From 374648c045fcfa50e0443371bb1cc3abe7b02aec Mon Sep 17 00:00:00 2001 From: Nomura <72407407+Nomura-RH@users.noreply.github.com> Date: Fri, 16 Dec 2022 20:57:24 +0100 Subject: [PATCH] Split most remaining overlays --- asm/{overlay10.s => ov10_0221F800.s} | 116 +- asm/ov11_0221F800.s | 133 + asm/{overlay11.s => ov11_0221F840.s} | 50 +- asm/ov12_0221FC20.s | 8289 ++ asm/ov12_022237EC.s | 121 + asm/ov12_0222389C.s | 1311 + asm/ov12_0222421C.s | 2015 + asm/ov12_02225104.s | 772 + asm/ov12_02225640.s | 330 + asm/ov12_02225864.s | 2468 + asm/ov12_02226998.s | 53 + asm/ov12_022269C0.s | 249 + asm/ov12_02226B84.s | 8134 ++ asm/ov12_0222AC70.s | 5210 ++ asm/ov12_0222D6B0.s | 2125 + asm/ov12_0222E784.s | 183 + asm/ov12_0222E91C.s | 1673 + asm/ov12_0222F700.s | 9863 +++ asm/ov12_022346A4.s | 964 + asm/ov12_02234E44.s | 519 + asm/ov12_02235254.s | 1670 + asm/ov12_02235E94.s | 4423 + asm/ov12_02237E54.s | 106 + asm/ov12_02237EFC.s | 276 + asm/ov12_022380BC.s | 556 + asm/ov12_022384F0.s | 103 + asm/ov13_0221FC20.s | 3945 + asm/ov13_02221A88.s | 5039 ++ asm/ov13_02224500.s | 2393 + asm/ov13_02225710.s | 1882 + asm/ov13_022264F4.s | 1729 + asm/ov13_02227288.s | 1008 + asm/ov13_02227A4C.s | 238 + asm/ov13_02227BDC.s | 731 + asm/ov13_02228128.s | 1233 + asm/ov13_02228A38.s | 420 + asm/{overlay14.s => ov14_0221FC20.s} | 27 +- asm/ov16_0223B140.s | 5572 ++ asm/ov16_0223DF00.s | 5414 ++ asm/ov16_022405FC.s | 22919 +++++ asm/ov16_0224B940.s | 12277 +++ asm/ov16_0225177C.s | 22366 +++++ asm/ov16_0225BFFC.s | 1601 + asm/ov16_0225CBB8.s | 15561 ++++ asm/ov16_02264798.s | 111 + asm/ov16_0226485C.s | 5118 ++ asm/ov16_02266F1C.s | 2976 + asm/ov16_02268520.s | 278 + asm/ov16_0226871C.s | 9582 +++ asm/ov16_0226D094.s | 1496 + asm/ov16_0226DB7C.s | 385 + asm/ov16_0226DE44.s | 421 + asm/ov16_0226E148.s | 144 + asm/ov17_0223B140.s | 3273 + asm/ov17_0223CB1C.s | 1956 + asm/ov17_0223DAD0.s | 2779 + asm/ov17_0223F118.s | 919 + asm/ov17_0223F7E4.s | 3639 + asm/ov17_02241270.s | 212 + asm/ov17_022413D8.s | 5148 ++ asm/ov17_02243AC4.s | 243 + asm/ov17_02243C28.s | 4716 ++ asm/ov17_02245F14.s | 2202 + asm/ov17_02246ECC.s | 1299 + asm/ov17_022476F8.s | 459 + asm/ov17_02247A48.s | 3264 + asm/ov17_022492DC.s | 1876 + asm/ov17_0224A0FC.s | 6276 ++ asm/ov17_0224CFB8.s | 3390 + asm/ov17_0224E930.s | 1012 + asm/ov17_0224F080.s | 184 + asm/ov17_0224F18C.s | 475 + asm/ov17_0224F4D4.s | 2333 + asm/ov17_02250744.s | 2889 + asm/ov17_02251D6C.s | 1775 + asm/ov17_02252A70.s | 46 + asm/ov17_02252AB0.s | 306 + asm/ov17_02252CEC.s | 95 + asm/ov19_021D0D80.s | 10648 +++ asm/ov19_021D603C.s | 233 + asm/ov19_021D61B0.s | 3220 + asm/ov19_021D79F8.s | 2333 + asm/ov19_021D8B54.s | 2998 + asm/ov19_021DA270.s | 747 + asm/ov19_021DA814.s | 156 + asm/ov19_021DA92C.s | 1282 + asm/ov19_021DB2FC.s | 812 + asm/ov19_021DB8E4.s | 1731 + asm/ov19_021DC5F0.s | 1335 + asm/ov19_021DCF88.s | 2800 + asm/ov19_021DE3E8.s | 1094 + asm/ov19_021DEC04.s | 1739 + asm/ov19_021DF964.s | 607 + asm/{overlay1.s => ov1_021D0D80.s} | 15 +- asm/ov20_021D0D80.s | 2658 + asm/ov20_021D2098.s | 1841 + asm/ov20_021D2EA4.s | 1279 + asm/ov20_021D3864.s | 284 + asm/ov20_021D3A54.s | 879 + asm/ov20_021D40E8.s | 817 + asm/ov20_021D4728.s | 921 + asm/ov20_021D4E38.s | 301 + asm/ov20_021D5044.s | 175 + asm/ov21_021D0D80.s | 2382 + asm/ov21_021D1F90.s | 37 + asm/ov21_021D1FA4.s | 2460 + asm/ov21_021D3208.s | 1974 + asm/ov21_021D3FE0.s | 360 + asm/ov21_021D423C.s | 167 + asm/ov21_021D4340.s | 1119 + asm/ov21_021D4C0C.s | 396 + asm/ov21_021D4EE4.s | 418 + asm/ov21_021D517C.s | 685 + asm/ov21_021D5600.s | 263 + asm/ov21_021D57B4.s | 462 + asm/ov21_021D5AEC.s | 3622 + asm/ov21_021D76B0.s | 1971 + asm/ov21_021D85B0.s | 2055 + asm/ov21_021D94BC.s | 7392 ++ asm/ov21_021DC9BC.s | 2574 + asm/ov21_021DDD2C.s | 1270 + asm/ov21_021DE668.s | 2226 + asm/ov21_021DF734.s | 2924 + asm/ov21_021E0C68.s | 1720 + asm/ov21_021E1924.s | 2212 + asm/ov21_021E29DC.s | 2985 + asm/ov21_021E3FFC.s | 1724 + asm/ov21_021E4CA4.s | 2601 + asm/ov21_021E6014.s | 1171 + asm/ov21_021E68F4.s | 1426 + asm/ov21_021E737C.s | 2212 + asm/ov21_021E8484.s | 1206 + asm/ov21_021E8D48.s | 1804 + asm/ov22_02254DE0.s | 409 + asm/ov22_02255094.s | 1722 + asm/ov22_02255D44.s | 3555 + asm/ov22_022578F4.s | 923 + asm/ov22_02257F50.s | 1387 + asm/ov22_022588F0.s | 69 + asm/ov22_0225894C.s | 101 + asm/ov22_022589E0.s | 872 + asm/ov22_02259098.s | 566 + asm/ov22_02259484.s | 145 + asm/ov22_02259560.s | 335 + asm/ov22_022597BC.s | 621 + asm/ov22_02259C58.s | 1050 + asm/ov22_0225A428.s | 1482 + asm/ov22_0225AF44.s | 54 + asm/ov22_0225AF8C.s | 925 + asm/ov22_0225B660.s | 851 + asm/ov23_0223E140.s | 7163 ++ asm/ov23_022416A8.s | 1178 + asm/ov23_02241F74.s | 2700 + asm/ov23_0224340C.s | 11512 +++ asm/ov23_02248C08.s | 410 + asm/ov23_02248F1C.s | 1318 + asm/ov23_02249918.s | 164 + asm/ov23_022499E4.s | 1045 + asm/ov23_0224A1D0.s | 1889 + asm/ov23_0224B05C.s | 5663 ++ asm/ov23_0224DC40.s | 2862 + asm/ov23_0224F294.s | 4009 + asm/ov23_0225128C.s | 1906 + asm/ov23_022521F0.s | 2422 + asm/ov23_02253598.s | 953 + asm/ov23_02253D40.s | 773 + asm/ov23_0225426C.s | 48 + asm/ov23_0225429C.s | 48 + asm/ov23_022542CC.s | 944 + asm/ov23_02254A14.s | 3267 + asm/{overlay24.s => ov24_02253CE0.s} | 12 +- asm/ov25_02253CE0.s | 1287 + asm/ov25_02254560.s | 1467 + asm/ov25_02255090.s | 687 + asm/ov25_02255540.s | 807 + asm/ov25_02255ACC.s | 462 + asm/ov25_02255DBC.s | 120 + asm/ov26_022561C0.s | 344 + asm/{overlay26.s => ov26_02256404.s} | 339 +- asm/ov27_022561C0.s | 891 + asm/{overlay27.s => ov27_0225680C.s} | 897 +- asm/ov28_022561C0.s | 1084 + asm/ov28_0225697C.s | 753 + asm/ov28_02256E9C.s | 1081 + asm/{overlay29.s => ov29_022561C0.s} | 592 +- asm/ov29_022566C8.s | 605 + asm/ov30_022561C0.s | 331 + asm/{overlay30.s => ov30_022563EC.s} | 330 +- asm/{overlay31.s => ov31_022561C0.s} | 301 +- asm/ov31_02256554.s | 306 + asm/ov32_022561C0.s | 380 + asm/{overlay32.s => ov32_02256470.s} | 387 +- asm/ov33_022561C0.s | 406 + asm/{overlay33.s => ov33_02256474.s} | 456 +- asm/ov34_022561C0.s | 508 + asm/{overlay34.s => ov34_02256540.s} | 515 +- asm/ov35_022561C0.s | 349 + asm/{overlay35.s => ov35_02256410.s} | 352 +- asm/ov36_022561C0.s | 339 + asm/{overlay36.s => ov36_02256404.s} | 342 +- asm/{overlay37.s => ov37_022561C0.s} | 282 +- asm/ov37_022563D4.s | 287 + asm/{overlay38.s => ov38_022561C0.s} | 188 +- asm/ov38_0225632C.s | 193 + asm/{overlay39.s => ov39_022561C0.s} | 300 +- asm/ov39_022563DC.s | 305 + asm/ov40_022561C0.s | 381 + asm/{overlay40.s => ov40_0225645C.s} | 384 +- asm/{overlay41.s => ov41_022561C0.s} | 758 +- asm/ov41_022567B0.s | 771 + asm/ov42_022561C0.s | 317 + asm/{overlay42.s => ov42_022563D4.s} | 330 +- asm/ov43_022561C0.s | 531 + asm/{overlay43.s => ov43_02256544.s} | 526 +- asm/ov44_022561C0.s | 573 + asm/{overlay44.s => ov44_022565BC.s} | 588 +- asm/ov45_022561C0.s | 732 + asm/{overlay45.s => ov45_022566EC.s} | 731 +- asm/{overlay46.s => ov46_022561C0.s} | 702 +- asm/ov46_02256BCC.s | 707 + asm/{overlay47.s => ov47_022561C0.s} | 548 +- asm/ov47_02256634.s | 553 + asm/ov48_022561C0.s | 483 + asm/{overlay48.s => ov48_0225650C.s} | 478 +- asm/{overlay49.s => ov49_022561C0.s} | 279 +- asm/ov49_022563D4.s | 288 + asm/ov50_022561C0.s | 482 + asm/{overlay50.s => ov50_02256510.s} | 489 +- asm/{overlay51.s => ov51_022561C0.s} | 188 +- asm/ov51_0225632C.s | 193 + asm/ov52_022561C0.s | 724 + asm/{overlay52.s => ov52_02256694.s} | 711 +- asm/ov53_022561C0.s | 354 + asm/{overlay53.s => ov53_02256420.s} | 353 +- asm/ov54_022561C0.s | 363 + asm/{overlay54.s => ov54_0225642C.s} | 362 +- asm/{overlay55.s => ov55_022561C0.s} | 197 +- asm/ov55_0225632C.s | 202 + asm/{overlay56.s => ov56_022561C0.s} | 40 +- asm/{overlay57.s => ov57_021D0D80.s} | 57 +- asm/ov57_021D0F30.s | 40 + asm/{overlay58.s => ov58_021D0D80.s} | 68 +- asm/{overlay59.s => ov59_021D0D80.s} | 1249 +- asm/ov59_021D2A2C.s | 174 + asm/ov59_021D2B44.s | 636 + asm/ov59_021D2F88.s | 436 + asm/ov5_021D0D80.s | 1608 + asm/ov5_021D1A94.s | 235 + asm/ov5_021D1C30.s | 2380 + asm/ov5_021D2F14.s | 1127 + asm/ov5_021D37AC.s | 1685 + asm/ov5_021D431C.s | 1950 + asm/ov5_021D521C.s | 611 + asm/ov5_021D56BC.s | 146 + asm/ov5_021D57BC.s | 136 + asm/ov5_021D5878.s | 417 + asm/ov5_021D5B40.s | 79 + asm/ov5_021D5BC0.s | 180 + asm/ov5_021D5CB0.s | 306 + asm/ov5_021D5EB8.s | 11768 +++ asm/ov5_021DB888.s | 1048 + asm/ov5_021DC018.s | 2590 + asm/ov5_021DD42C.s | 374 + asm/ov5_021DD6FC.s | 535 + asm/ov5_021DDAE4.s | 133 + asm/ov5_021DDBE8.s | 3343 + asm/ov5_021DF440.s | 1089 + asm/ov5_021DFB54.s | 2887 + asm/ov5_021E1154.s | 280 + asm/ov5_021E135C.s | 323 + asm/ov5_021E15F4.s | 747 + asm/ov5_021E1B08.s | 319 + asm/ov5_021E1D20.s | 461 + asm/ov5_021E2098.s | 287 + asm/ov5_021E22B0.s | 81 + asm/ov5_021E2338.s | 7792 ++ asm/ov5_021E622C.s | 2743 + asm/ov5_021E779C.s | 6450 ++ asm/ov5_021EA714.s | 184 + asm/ov5_021EA874.s | 930 + asm/ov5_021EAFA4.s | 266 + asm/ov5_021EB1A0.s | 3288 + asm/ov5_021ECA70.s | 251 + asm/ov5_021ECC20.s | 309 + asm/ov5_021ECE40.s | 3490 + asm/ov5_021EE75C.s | 87 + asm/ov5_021EE7D4.s | 376 + asm/ov5_021EEAC8.s | 249 + asm/ov5_021EEC68.s | 402 + asm/ov5_021EEF34.s | 443 + asm/ov5_021EF250.s | 209 + asm/ov5_021EF3A8.s | 187 + asm/ov5_021EF4BC.s | 371 + asm/ov5_021EF75C.s | 512 + asm/ov5_021EFB0C.s | 770 + asm/ov5_021F007C.s | 866 + asm/ov5_021F067C.s | 265 + asm/ov5_021F0824.s | 88 + asm/ov5_021F08CC.s | 825 + asm/ov5_021F0E84.s | 44 + asm/ov5_021F0EB0.s | 233 + asm/ov5_021F101C.s | 107 + asm/ov5_021F10E8.s | 361 + asm/ov5_021F134C.s | 633 + asm/ov5_021F17B8.s | 684 + asm/ov5_021F1CC8.s | 530 + asm/ov5_021F204C.s | 523 + asm/ov5_021F23D0.s | 276 + asm/ov5_021F25C0.s | 371 + asm/ov5_021F2850.s | 337 + asm/ov5_021F2A7C.s | 199 + asm/ov5_021F2BD0.s | 196 + asm/ov5_021F2D20.s | 730 + asm/ov5_021F3284.s | 283 + asm/ov5_021F348C.s | 427 + asm/ov5_021F37A8.s | 355 + asm/ov5_021F3A50.s | 359 + asm/ov5_021F3D00.s | 223 + asm/ov5_021F3E74.s | 233 + asm/ov5_021F4018.s | 346 + asm/ov5_021F428C.s | 746 + asm/ov5_021F47B0.s | 833 + asm/ov5_021F4DAC.s | 62 + asm/ov5_021F4E08.s | 332 + asm/ov5_021F5060.s | 62 + asm/ov5_021F50BC.s | 265 + asm/ov5_021F5284.s | 244 + asm/ov5_021F5428.s | 246 + asm/ov5_021F55CC.s | 234 + asm/ov5_021F575C.s | 188 + asm/ov5_021F5894.s | 224 + asm/ov5_021F5A10.s | 869 + asm/ov5_021F600C.s | 243 + asm/ov5_021F61BC.s | 372 + asm/ov5_021F6454.s | 2482 + asm/ov5_021F77A8.s | 1536 + asm/ov5_021F8370.s | 289 + asm/ov5_021F8560.s | 552 + asm/ov5_021FAF40.s | 216 + asm/ov5_021FF6B8.s | 24 + asm/ov62_0222F2C0.s | 1735 + asm/ov62_022300D8.s | 2784 + asm/ov62_02231690.s | 6667 ++ asm/ov62_02234A10.s | 1041 + asm/ov62_02235278.s | 1536 + asm/ov62_02235E64.s | 1773 + asm/ov62_02236CBC.s | 2019 + asm/ov62_02237D24.s | 3893 + asm/ov62_02239D60.s | 5599 ++ asm/ov62_0223CAEC.s | 2556 + asm/ov62_0223DFA8.s | 6037 ++ asm/ov62_0224112C.s | 120 + asm/ov62_02241204.s | 10933 +++ asm/ov62_02246B00.s | 2475 + asm/ov62_02247D74.s | 796 + asm/ov62_02248408.s | 406 + asm/ov63_0222AE60.s | 2059 + asm/ov63_0222BCE8.s | 194 + asm/ov63_0222BE18.s | 1736 + asm/ov63_0222CA88.s | 348 + asm/ov63_0222CCE4.s | 658 + asm/ov63_0222D160.s | 73 + asm/ov63_0222D1C0.s | 790 + asm/ov63_0222D77C.s | 219 + asm/{overlay64.s => ov64_0222DCE0.s} | 160 +- asm/{overlay65.s => ov65_0222DCE0.s} | 7808 +- asm/ov65_02235060.s | 2760 + asm/ov65_02236474.s | 59 + asm/ov65_0223648C.s | 4952 ++ asm/{overlay67.s => ov67_0225C700.s} | 28 +- asm/{overlay68.s => ov68_0225C700.s} | 64 +- asm/{overlay69.s => ov69_0225C700.s} | 68 +- asm/ov6_0223E140.s | 5890 ++ asm/ov6_02240C9C.s | 3418 + asm/ov6_022426AC.s | 386 + asm/ov6_02242984.s | 192 + asm/ov6_02242AF0.s | 617 + asm/ov6_02242F74.s | 94 + asm/ov6_02243004.s | 116 + asm/ov6_022430C4.s | 204 + asm/ov6_02243218.s | 51 + asm/ov6_02243258.s | 6345 ++ asm/ov6_02246034.s | 171 + asm/ov6_02246184.s | 338 + asm/ov6_02246444.s | 258 + asm/ov6_022465FC.s | 602 + asm/ov6_02246A30.s | 221 + asm/ov6_02246B74.s | 138 + asm/ov6_02246BF4.s | 33 + asm/ov6_02246C24.s | 371 + asm/ov6_02246F00.s | 193 + asm/ov6_02247078.s | 89 + asm/ov6_02247100.s | 661 + asm/ov6_022475B0.s | 99 + asm/ov6_02247660.s | 189 + asm/ov6_022477B8.s | 78 + asm/ov6_02247830.s | 261 + asm/ov6_02247A0C.s | 397 + asm/ov6_02247D30.s | 292 + asm/ov6_02247F5C.s | 125 + asm/ov6_02248050.s | 1278 + asm/ov6_02248948.s | 105 + asm/ov6_022489E4.s | 585 + asm/ov70_0225C700.s | 170 + asm/ov70_0225C858.s | 245 + asm/ov70_0225C9B4.s | 2237 + asm/ov70_0225D9A4.s | 6629 ++ asm/ov70_02260A70.s | 139 + asm/ov70_02260B44.s | 2633 + asm/ov70_02261E10.s | 2114 + asm/ov70_02262DA8.s | 478 + asm/ov70_022630A4.s | 5674 ++ asm/ov70_02265F38.s | 1881 + asm/ov70_02266E9C.s | 4229 + asm/ov70_02269190.s | 6456 ++ asm/ov70_0226C338.s | 412 + asm/ov70_0226C60C.s | 338 + asm/ov70_0226C8B4.s | 596 + asm/ov70_0226CC74.s | 219 + asm/ov70_0226CE54.s | 870 + asm/{overlay71.s => ov71_0223B140.s} | 1802 +- asm/ov71_0223C69C.s | 1018 + asm/ov71_0223CF0C.s | 532 + asm/ov71_0223D324.s | 241 + asm/{overlay72.s => ov72_0223D7A0.s} | 64 +- asm/{overlay73.s => ov73_021D0D80.s} | 766 +- asm/ov73_021D3250.s | 697 + asm/{overlay74.s => ov74_021D0D80.s} | 48 +- asm/{overlay75.s => ov75_021D0D80.s} | 40 +- asm/ov76_0223B140.s | 1005 + asm/ov76_0223B870.s | 3435 + asm/ov76_0223D338.s | 3223 + asm/ov77_021D0D80.s | 3005 + asm/ov77_021D25B0.s | 5819 ++ asm/ov77_021D54B0.s | 2244 + asm/ov77_021D6670.s | 814 + asm/ov77_021D6C70.s | 853 + asm/{overlay78.s => ov78_021D0D80.s} | 32 +- asm/ov79_021D0D80.s | 1409 + asm/ov79_021D183C.s | 1151 + asm/ov79_021D20F4.s | 224 + asm/ov79_021D2268.s | 2686 + asm/ov79_021D3768.s | 214 + asm/ov7_02249960.s | 3450 + asm/ov7_0224B4E8.s | 1245 + asm/ov7_0224BE9C.s | 1879 + asm/ov7_0224CD28.s | 4019 + asm/ov80_021D0D80.s | 891 + asm/{overlay80.s => ov80_021D1458.s} | 1476 +- asm/ov80_021D2A08.s | 167 + asm/ov80_021D2AF4.s | 483 + asm/ov81_021D0D80.s | 1108 + asm/{overlay81.s => ov81_021D1610.s} | 1079 +- asm/ov82_0223B140.s | 222 + asm/{overlay82.s => ov82_0223B2E0.s} | 237 +- asm/ov83_0223B5A0.s | 2460 + asm/ov83_0223C958.s | 970 + asm/ov83_0223D144.s | 29 + asm/ov83_0223D150.s | 510 + asm/ov83_0223D4CC.s | 272 + asm/ov83_0223D6A8.s | 4565 + asm/ov83_0223F7F4.s | 1471 + asm/{overlay84.s => ov84_0223B5A0.s} | 3866 +- asm/ov84_0223F040.s | 2448 + asm/ov84_022403F4.s | 1348 + asm/{overlay85.s => ov85_02241440.s} | 40 +- asm/{overlay86.s => ov86_0223B140.s} | 90 +- asm/ov87_021D0D80.s | 395 + asm/{overlay87.s => ov87_021D106C.s} | 426 +- asm/{overlay88.s => ov88_0223B140.s} | 614 +- asm/ov88_0223E9C4.s | 569 + asm/{overlay8.s => ov8_02249960.s} | 200 +- asm/{overlay90.s => ov90_021D0D80.s} | 68 +- asm/{overlay91.s => ov91_021D0D80.s} | 64 +- asm/{overlay92.s => ov92_021D0D80.s} | 80 +- asm/{overlay93.s => ov93_021D0D80.s} | 453 +- asm/ov93_021D111C.s | 456 + asm/ov94_0223B140.s | 1598 + asm/ov94_0223BCB0.s | 1201 + asm/ov94_0223C610.s | 1392 + asm/ov94_0223D0C4.s | 1416 + asm/ov94_0223DC04.s | 1089 + asm/ov94_0223E46C.s | 2821 + asm/ov94_0223FB48.s | 3209 + asm/ov94_022414B8.s | 2838 + asm/ov94_02242AD0.s | 2683 + asm/ov94_02243EF8.s | 647 + asm/ov94_022443E0.s | 132 + asm/ov94_022444C8.s | 584 + asm/ov94_02244950.s | 2182 + asm/ov95_02246C20.s | 1479 + asm/ov95_022476F0.s | 628 + asm/ov95_02247B6C.s | 1284 + asm/ov95_02248590.s | 2297 + asm/ov95_02249740.s | 1083 + asm/ov95_02249F90.s | 525 + asm/ov95_0224A390.s | 1075 + asm/ov95_0224ABC0.s | 1062 + asm/ov95_0224B3D8.s | 1360 + asm/ov96_0223B140.s | 763 + asm/ov96_0223B6A0.s | 812 + asm/{overlay96.s => ov96_0223BCE0.s} | 1516 +- asm/{overlay9.s => ov9_02249960.s} | 1292 +- asm/overlay12.s | 50831 ------------ asm/overlay13.s | 17981 ---- asm/overlay16.s | 105437 ------------------------ asm/overlay17.s | 49940 ----------- asm/overlay19.s | 31369 ------- asm/overlay20.s | 9005 -- asm/overlay21.s | 53449 ------------ asm/overlay22.s | 14917 ---- asm/overlay23.s | 49397 ----------- asm/overlay25.s | 4721 -- asm/overlay28.s | 2802 - asm/overlay5.s | 83920 ------------------- asm/overlay6.s | 23102 ------ asm/overlay62.s | 49697 ----------- asm/overlay63.s | 5946 -- asm/overlay7.s | 10384 --- asm/overlay70.s | 34722 -------- asm/overlay76.s | 7590 -- asm/overlay77.s | 12375 --- asm/overlay79.s | 5524 -- asm/overlay83.s | 10087 --- asm/overlay94.s | 21241 ----- asm/overlay95.s | 10493 --- main.lsf | 590 +- 527 files changed, 714330 insertions(+), 698211 deletions(-) rename asm/{overlay10.s => ov10_0221F800.s} (97%) create mode 100644 asm/ov11_0221F800.s rename asm/{overlay11.s => ov11_0221F840.s} (75%) create mode 100644 asm/ov12_0221FC20.s create mode 100644 asm/ov12_022237EC.s create mode 100644 asm/ov12_0222389C.s create mode 100644 asm/ov12_0222421C.s create mode 100644 asm/ov12_02225104.s create mode 100644 asm/ov12_02225640.s create mode 100644 asm/ov12_02225864.s create mode 100644 asm/ov12_02226998.s create mode 100644 asm/ov12_022269C0.s create mode 100644 asm/ov12_02226B84.s create mode 100644 asm/ov12_0222AC70.s create mode 100644 asm/ov12_0222D6B0.s create mode 100644 asm/ov12_0222E784.s create mode 100644 asm/ov12_0222E91C.s create mode 100644 asm/ov12_0222F700.s create mode 100644 asm/ov12_022346A4.s create mode 100644 asm/ov12_02234E44.s create mode 100644 asm/ov12_02235254.s create mode 100644 asm/ov12_02235E94.s create mode 100644 asm/ov12_02237E54.s create mode 100644 asm/ov12_02237EFC.s create mode 100644 asm/ov12_022380BC.s create mode 100644 asm/ov12_022384F0.s create mode 100644 asm/ov13_0221FC20.s create mode 100644 asm/ov13_02221A88.s create mode 100644 asm/ov13_02224500.s create mode 100644 asm/ov13_02225710.s create mode 100644 asm/ov13_022264F4.s create mode 100644 asm/ov13_02227288.s create mode 100644 asm/ov13_02227A4C.s create mode 100644 asm/ov13_02227BDC.s create mode 100644 asm/ov13_02228128.s create mode 100644 asm/ov13_02228A38.s rename asm/{overlay14.s => ov14_0221FC20.s} (99%) create mode 100644 asm/ov16_0223B140.s create mode 100644 asm/ov16_0223DF00.s create mode 100644 asm/ov16_022405FC.s create mode 100644 asm/ov16_0224B940.s create mode 100644 asm/ov16_0225177C.s create mode 100644 asm/ov16_0225BFFC.s create mode 100644 asm/ov16_0225CBB8.s create mode 100644 asm/ov16_02264798.s create mode 100644 asm/ov16_0226485C.s create mode 100644 asm/ov16_02266F1C.s create mode 100644 asm/ov16_02268520.s create mode 100644 asm/ov16_0226871C.s create mode 100644 asm/ov16_0226D094.s create mode 100644 asm/ov16_0226DB7C.s create mode 100644 asm/ov16_0226DE44.s create mode 100644 asm/ov16_0226E148.s create mode 100644 asm/ov17_0223B140.s create mode 100644 asm/ov17_0223CB1C.s create mode 100644 asm/ov17_0223DAD0.s create mode 100644 asm/ov17_0223F118.s create mode 100644 asm/ov17_0223F7E4.s create mode 100644 asm/ov17_02241270.s create mode 100644 asm/ov17_022413D8.s create mode 100644 asm/ov17_02243AC4.s create mode 100644 asm/ov17_02243C28.s create mode 100644 asm/ov17_02245F14.s create mode 100644 asm/ov17_02246ECC.s create mode 100644 asm/ov17_022476F8.s create mode 100644 asm/ov17_02247A48.s create mode 100644 asm/ov17_022492DC.s create mode 100644 asm/ov17_0224A0FC.s create mode 100644 asm/ov17_0224CFB8.s create mode 100644 asm/ov17_0224E930.s create mode 100644 asm/ov17_0224F080.s create mode 100644 asm/ov17_0224F18C.s create mode 100644 asm/ov17_0224F4D4.s create mode 100644 asm/ov17_02250744.s create mode 100644 asm/ov17_02251D6C.s create mode 100644 asm/ov17_02252A70.s create mode 100644 asm/ov17_02252AB0.s create mode 100644 asm/ov17_02252CEC.s create mode 100644 asm/ov19_021D0D80.s create mode 100644 asm/ov19_021D603C.s create mode 100644 asm/ov19_021D61B0.s create mode 100644 asm/ov19_021D79F8.s create mode 100644 asm/ov19_021D8B54.s create mode 100644 asm/ov19_021DA270.s create mode 100644 asm/ov19_021DA814.s create mode 100644 asm/ov19_021DA92C.s create mode 100644 asm/ov19_021DB2FC.s create mode 100644 asm/ov19_021DB8E4.s create mode 100644 asm/ov19_021DC5F0.s create mode 100644 asm/ov19_021DCF88.s create mode 100644 asm/ov19_021DE3E8.s create mode 100644 asm/ov19_021DEC04.s create mode 100644 asm/ov19_021DF964.s rename asm/{overlay1.s => ov1_021D0D80.s} (69%) create mode 100644 asm/ov20_021D0D80.s create mode 100644 asm/ov20_021D2098.s create mode 100644 asm/ov20_021D2EA4.s create mode 100644 asm/ov20_021D3864.s create mode 100644 asm/ov20_021D3A54.s create mode 100644 asm/ov20_021D40E8.s create mode 100644 asm/ov20_021D4728.s create mode 100644 asm/ov20_021D4E38.s create mode 100644 asm/ov20_021D5044.s create mode 100644 asm/ov21_021D0D80.s create mode 100644 asm/ov21_021D1F90.s create mode 100644 asm/ov21_021D1FA4.s create mode 100644 asm/ov21_021D3208.s create mode 100644 asm/ov21_021D3FE0.s create mode 100644 asm/ov21_021D423C.s create mode 100644 asm/ov21_021D4340.s create mode 100644 asm/ov21_021D4C0C.s create mode 100644 asm/ov21_021D4EE4.s create mode 100644 asm/ov21_021D517C.s create mode 100644 asm/ov21_021D5600.s create mode 100644 asm/ov21_021D57B4.s create mode 100644 asm/ov21_021D5AEC.s create mode 100644 asm/ov21_021D76B0.s create mode 100644 asm/ov21_021D85B0.s create mode 100644 asm/ov21_021D94BC.s create mode 100644 asm/ov21_021DC9BC.s create mode 100644 asm/ov21_021DDD2C.s create mode 100644 asm/ov21_021DE668.s create mode 100644 asm/ov21_021DF734.s create mode 100644 asm/ov21_021E0C68.s create mode 100644 asm/ov21_021E1924.s create mode 100644 asm/ov21_021E29DC.s create mode 100644 asm/ov21_021E3FFC.s create mode 100644 asm/ov21_021E4CA4.s create mode 100644 asm/ov21_021E6014.s create mode 100644 asm/ov21_021E68F4.s create mode 100644 asm/ov21_021E737C.s create mode 100644 asm/ov21_021E8484.s create mode 100644 asm/ov21_021E8D48.s create mode 100644 asm/ov22_02254DE0.s create mode 100644 asm/ov22_02255094.s create mode 100644 asm/ov22_02255D44.s create mode 100644 asm/ov22_022578F4.s create mode 100644 asm/ov22_02257F50.s create mode 100644 asm/ov22_022588F0.s create mode 100644 asm/ov22_0225894C.s create mode 100644 asm/ov22_022589E0.s create mode 100644 asm/ov22_02259098.s create mode 100644 asm/ov22_02259484.s create mode 100644 asm/ov22_02259560.s create mode 100644 asm/ov22_022597BC.s create mode 100644 asm/ov22_02259C58.s create mode 100644 asm/ov22_0225A428.s create mode 100644 asm/ov22_0225AF44.s create mode 100644 asm/ov22_0225AF8C.s create mode 100644 asm/ov22_0225B660.s create mode 100644 asm/ov23_0223E140.s create mode 100644 asm/ov23_022416A8.s create mode 100644 asm/ov23_02241F74.s create mode 100644 asm/ov23_0224340C.s create mode 100644 asm/ov23_02248C08.s create mode 100644 asm/ov23_02248F1C.s create mode 100644 asm/ov23_02249918.s create mode 100644 asm/ov23_022499E4.s create mode 100644 asm/ov23_0224A1D0.s create mode 100644 asm/ov23_0224B05C.s create mode 100644 asm/ov23_0224DC40.s create mode 100644 asm/ov23_0224F294.s create mode 100644 asm/ov23_0225128C.s create mode 100644 asm/ov23_022521F0.s create mode 100644 asm/ov23_02253598.s create mode 100644 asm/ov23_02253D40.s create mode 100644 asm/ov23_0225426C.s create mode 100644 asm/ov23_0225429C.s create mode 100644 asm/ov23_022542CC.s create mode 100644 asm/ov23_02254A14.s rename asm/{overlay24.s => ov24_02253CE0.s} (94%) create mode 100644 asm/ov25_02253CE0.s create mode 100644 asm/ov25_02254560.s create mode 100644 asm/ov25_02255090.s create mode 100644 asm/ov25_02255540.s create mode 100644 asm/ov25_02255ACC.s create mode 100644 asm/ov25_02255DBC.s create mode 100644 asm/ov26_022561C0.s rename asm/{overlay26.s => ov26_02256404.s} (55%) create mode 100644 asm/ov27_022561C0.s rename asm/{overlay27.s => ov27_0225680C.s} (53%) create mode 100644 asm/ov28_022561C0.s create mode 100644 asm/ov28_0225697C.s create mode 100644 asm/ov28_02256E9C.s rename asm/{overlay29.s => ov29_022561C0.s} (54%) create mode 100644 asm/ov29_022566C8.s create mode 100644 asm/ov30_022561C0.s rename asm/{overlay30.s => ov30_022563EC.s} (53%) rename asm/{overlay31.s => ov31_022561C0.s} (62%) create mode 100644 asm/ov31_02256554.s create mode 100644 asm/ov32_022561C0.s rename asm/{overlay32.s => ov32_02256470.s} (75%) create mode 100644 asm/ov33_022561C0.s rename asm/{overlay33.s => ov33_02256474.s} (86%) create mode 100644 asm/ov34_022561C0.s rename asm/{overlay34.s => ov34_02256540.s} (56%) create mode 100644 asm/ov35_022561C0.s rename asm/{overlay35.s => ov35_02256410.s} (55%) create mode 100644 asm/ov36_022561C0.s rename asm/{overlay36.s => ov36_02256404.s} (56%) rename asm/{overlay37.s => ov37_022561C0.s} (52%) create mode 100644 asm/ov37_022563D4.s rename asm/{overlay38.s => ov38_022561C0.s} (55%) create mode 100644 asm/ov38_0225632C.s rename asm/{overlay39.s => ov39_022561C0.s} (52%) create mode 100644 asm/ov39_022563DC.s create mode 100644 asm/ov40_022561C0.s rename asm/{overlay40.s => ov40_0225645C.s} (67%) rename asm/{overlay41.s => ov41_022561C0.s} (52%) create mode 100644 asm/ov41_022567B0.s create mode 100644 asm/ov42_022561C0.s rename asm/{overlay42.s => ov42_022563D4.s} (56%) create mode 100644 asm/ov43_022561C0.s rename asm/{overlay43.s => ov43_02256544.s} (57%) create mode 100644 asm/ov44_022561C0.s rename asm/{overlay44.s => ov44_022565BC.s} (63%) create mode 100644 asm/ov45_022561C0.s rename asm/{overlay45.s => ov45_022566EC.s} (50%) rename asm/{overlay46.s => ov46_022561C0.s} (65%) create mode 100644 asm/ov46_02256BCC.s rename asm/{overlay47.s => ov47_022561C0.s} (52%) create mode 100644 asm/ov47_02256634.s create mode 100644 asm/ov48_022561C0.s rename asm/{overlay48.s => ov48_0225650C.s} (59%) rename asm/{overlay49.s => ov49_022561C0.s} (51%) create mode 100644 asm/ov49_022563D4.s create mode 100644 asm/ov50_022561C0.s rename asm/{overlay50.s => ov50_02256510.s} (57%) rename asm/{overlay51.s => ov51_022561C0.s} (55%) create mode 100644 asm/ov51_0225632C.s create mode 100644 asm/ov52_022561C0.s rename asm/{overlay52.s => ov52_02256694.s} (55%) create mode 100644 asm/ov53_022561C0.s rename asm/{overlay53.s => ov53_02256420.s} (64%) create mode 100644 asm/ov54_022561C0.s rename asm/{overlay54.s => ov54_0225642C.s} (50%) rename asm/{overlay55.s => ov55_022561C0.s} (54%) create mode 100644 asm/ov55_0225632C.s rename asm/{overlay56.s => ov56_022561C0.s} (97%) rename asm/{overlay57.s => ov57_021D0D80.s} (84%) create mode 100644 asm/ov57_021D0F30.s rename asm/{overlay58.s => ov58_021D0D80.s} (97%) rename asm/{overlay59.s => ov59_021D0D80.s} (75%) create mode 100644 asm/ov59_021D2A2C.s create mode 100644 asm/ov59_021D2B44.s create mode 100644 asm/ov59_021D2F88.s create mode 100644 asm/ov5_021D0D80.s create mode 100644 asm/ov5_021D1A94.s create mode 100644 asm/ov5_021D1C30.s create mode 100644 asm/ov5_021D2F14.s create mode 100644 asm/ov5_021D37AC.s create mode 100644 asm/ov5_021D431C.s create mode 100644 asm/ov5_021D521C.s create mode 100644 asm/ov5_021D56BC.s create mode 100644 asm/ov5_021D57BC.s create mode 100644 asm/ov5_021D5878.s create mode 100644 asm/ov5_021D5B40.s create mode 100644 asm/ov5_021D5BC0.s create mode 100644 asm/ov5_021D5CB0.s create mode 100644 asm/ov5_021D5EB8.s create mode 100644 asm/ov5_021DB888.s create mode 100644 asm/ov5_021DC018.s create mode 100644 asm/ov5_021DD42C.s create mode 100644 asm/ov5_021DD6FC.s create mode 100644 asm/ov5_021DDAE4.s create mode 100644 asm/ov5_021DDBE8.s create mode 100644 asm/ov5_021DF440.s create mode 100644 asm/ov5_021DFB54.s create mode 100644 asm/ov5_021E1154.s create mode 100644 asm/ov5_021E135C.s create mode 100644 asm/ov5_021E15F4.s create mode 100644 asm/ov5_021E1B08.s create mode 100644 asm/ov5_021E1D20.s create mode 100644 asm/ov5_021E2098.s create mode 100644 asm/ov5_021E22B0.s create mode 100644 asm/ov5_021E2338.s create mode 100644 asm/ov5_021E622C.s create mode 100644 asm/ov5_021E779C.s create mode 100644 asm/ov5_021EA714.s create mode 100644 asm/ov5_021EA874.s create mode 100644 asm/ov5_021EAFA4.s create mode 100644 asm/ov5_021EB1A0.s create mode 100644 asm/ov5_021ECA70.s create mode 100644 asm/ov5_021ECC20.s create mode 100644 asm/ov5_021ECE40.s create mode 100644 asm/ov5_021EE75C.s create mode 100644 asm/ov5_021EE7D4.s create mode 100644 asm/ov5_021EEAC8.s create mode 100644 asm/ov5_021EEC68.s create mode 100644 asm/ov5_021EEF34.s create mode 100644 asm/ov5_021EF250.s create mode 100644 asm/ov5_021EF3A8.s create mode 100644 asm/ov5_021EF4BC.s create mode 100644 asm/ov5_021EF75C.s create mode 100644 asm/ov5_021EFB0C.s create mode 100644 asm/ov5_021F007C.s create mode 100644 asm/ov5_021F067C.s create mode 100644 asm/ov5_021F0824.s create mode 100644 asm/ov5_021F08CC.s create mode 100644 asm/ov5_021F0E84.s create mode 100644 asm/ov5_021F0EB0.s create mode 100644 asm/ov5_021F101C.s create mode 100644 asm/ov5_021F10E8.s create mode 100644 asm/ov5_021F134C.s create mode 100644 asm/ov5_021F17B8.s create mode 100644 asm/ov5_021F1CC8.s create mode 100644 asm/ov5_021F204C.s create mode 100644 asm/ov5_021F23D0.s create mode 100644 asm/ov5_021F25C0.s create mode 100644 asm/ov5_021F2850.s create mode 100644 asm/ov5_021F2A7C.s create mode 100644 asm/ov5_021F2BD0.s create mode 100644 asm/ov5_021F2D20.s create mode 100644 asm/ov5_021F3284.s create mode 100644 asm/ov5_021F348C.s create mode 100644 asm/ov5_021F37A8.s create mode 100644 asm/ov5_021F3A50.s create mode 100644 asm/ov5_021F3D00.s create mode 100644 asm/ov5_021F3E74.s create mode 100644 asm/ov5_021F4018.s create mode 100644 asm/ov5_021F428C.s create mode 100644 asm/ov5_021F47B0.s create mode 100644 asm/ov5_021F4DAC.s create mode 100644 asm/ov5_021F4E08.s create mode 100644 asm/ov5_021F5060.s create mode 100644 asm/ov5_021F50BC.s create mode 100644 asm/ov5_021F5284.s create mode 100644 asm/ov5_021F5428.s create mode 100644 asm/ov5_021F55CC.s create mode 100644 asm/ov5_021F575C.s create mode 100644 asm/ov5_021F5894.s create mode 100644 asm/ov5_021F5A10.s create mode 100644 asm/ov5_021F600C.s create mode 100644 asm/ov5_021F61BC.s create mode 100644 asm/ov5_021F6454.s create mode 100644 asm/ov5_021F77A8.s create mode 100644 asm/ov5_021F8370.s create mode 100644 asm/ov5_021F8560.s create mode 100644 asm/ov5_021FAF40.s create mode 100644 asm/ov5_021FF6B8.s create mode 100644 asm/ov62_0222F2C0.s create mode 100644 asm/ov62_022300D8.s create mode 100644 asm/ov62_02231690.s create mode 100644 asm/ov62_02234A10.s create mode 100644 asm/ov62_02235278.s create mode 100644 asm/ov62_02235E64.s create mode 100644 asm/ov62_02236CBC.s create mode 100644 asm/ov62_02237D24.s create mode 100644 asm/ov62_02239D60.s create mode 100644 asm/ov62_0223CAEC.s create mode 100644 asm/ov62_0223DFA8.s create mode 100644 asm/ov62_0224112C.s create mode 100644 asm/ov62_02241204.s create mode 100644 asm/ov62_02246B00.s create mode 100644 asm/ov62_02247D74.s create mode 100644 asm/ov62_02248408.s create mode 100644 asm/ov63_0222AE60.s create mode 100644 asm/ov63_0222BCE8.s create mode 100644 asm/ov63_0222BE18.s create mode 100644 asm/ov63_0222CA88.s create mode 100644 asm/ov63_0222CCE4.s create mode 100644 asm/ov63_0222D160.s create mode 100644 asm/ov63_0222D1C0.s create mode 100644 asm/ov63_0222D77C.s rename asm/{overlay64.s => ov64_0222DCE0.s} (97%) rename asm/{overlay65.s => ov65_0222DCE0.s} (65%) create mode 100644 asm/ov65_02235060.s create mode 100644 asm/ov65_02236474.s create mode 100644 asm/ov65_0223648C.s rename asm/{overlay67.s => ov67_0225C700.s} (97%) rename asm/{overlay68.s => ov68_0225C700.s} (97%) rename asm/{overlay69.s => ov69_0225C700.s} (98%) create mode 100644 asm/ov6_0223E140.s create mode 100644 asm/ov6_02240C9C.s create mode 100644 asm/ov6_022426AC.s create mode 100644 asm/ov6_02242984.s create mode 100644 asm/ov6_02242AF0.s create mode 100644 asm/ov6_02242F74.s create mode 100644 asm/ov6_02243004.s create mode 100644 asm/ov6_022430C4.s create mode 100644 asm/ov6_02243218.s create mode 100644 asm/ov6_02243258.s create mode 100644 asm/ov6_02246034.s create mode 100644 asm/ov6_02246184.s create mode 100644 asm/ov6_02246444.s create mode 100644 asm/ov6_022465FC.s create mode 100644 asm/ov6_02246A30.s create mode 100644 asm/ov6_02246B74.s create mode 100644 asm/ov6_02246BF4.s create mode 100644 asm/ov6_02246C24.s create mode 100644 asm/ov6_02246F00.s create mode 100644 asm/ov6_02247078.s create mode 100644 asm/ov6_02247100.s create mode 100644 asm/ov6_022475B0.s create mode 100644 asm/ov6_02247660.s create mode 100644 asm/ov6_022477B8.s create mode 100644 asm/ov6_02247830.s create mode 100644 asm/ov6_02247A0C.s create mode 100644 asm/ov6_02247D30.s create mode 100644 asm/ov6_02247F5C.s create mode 100644 asm/ov6_02248050.s create mode 100644 asm/ov6_02248948.s create mode 100644 asm/ov6_022489E4.s create mode 100644 asm/ov70_0225C700.s create mode 100644 asm/ov70_0225C858.s create mode 100644 asm/ov70_0225C9B4.s create mode 100644 asm/ov70_0225D9A4.s create mode 100644 asm/ov70_02260A70.s create mode 100644 asm/ov70_02260B44.s create mode 100644 asm/ov70_02261E10.s create mode 100644 asm/ov70_02262DA8.s create mode 100644 asm/ov70_022630A4.s create mode 100644 asm/ov70_02265F38.s create mode 100644 asm/ov70_02266E9C.s create mode 100644 asm/ov70_02269190.s create mode 100644 asm/ov70_0226C338.s create mode 100644 asm/ov70_0226C60C.s create mode 100644 asm/ov70_0226C8B4.s create mode 100644 asm/ov70_0226CC74.s create mode 100644 asm/ov70_0226CE54.s rename asm/{overlay71.s => ov71_0223B140.s} (62%) create mode 100644 asm/ov71_0223C69C.s create mode 100644 asm/ov71_0223CF0C.s create mode 100644 asm/ov71_0223D324.s rename asm/{overlay72.s => ov72_0223D7A0.s} (96%) rename asm/{overlay73.s => ov73_021D0D80.s} (87%) create mode 100644 asm/ov73_021D3250.s rename asm/{overlay74.s => ov74_021D0D80.s} (96%) rename asm/{overlay75.s => ov75_021D0D80.s} (97%) create mode 100644 asm/ov76_0223B140.s create mode 100644 asm/ov76_0223B870.s create mode 100644 asm/ov76_0223D338.s create mode 100644 asm/ov77_021D0D80.s create mode 100644 asm/ov77_021D25B0.s create mode 100644 asm/ov77_021D54B0.s create mode 100644 asm/ov77_021D6670.s create mode 100644 asm/ov77_021D6C70.s rename asm/{overlay78.s => ov78_021D0D80.s} (98%) create mode 100644 asm/ov79_021D0D80.s create mode 100644 asm/ov79_021D183C.s create mode 100644 asm/ov79_021D20F4.s create mode 100644 asm/ov79_021D2268.s create mode 100644 asm/ov79_021D3768.s create mode 100644 asm/ov7_02249960.s create mode 100644 asm/ov7_0224B4E8.s create mode 100644 asm/ov7_0224BE9C.s create mode 100644 asm/ov7_0224CD28.s create mode 100644 asm/ov80_021D0D80.s rename asm/{overlay80.s => ov80_021D1458.s} (65%) create mode 100644 asm/ov80_021D2A08.s create mode 100644 asm/ov80_021D2AF4.s create mode 100644 asm/ov81_021D0D80.s rename asm/{overlay81.s => ov81_021D1610.s} (77%) create mode 100644 asm/ov82_0223B140.s rename asm/{overlay82.s => ov82_0223B2E0.s} (62%) create mode 100644 asm/ov83_0223B5A0.s create mode 100644 asm/ov83_0223C958.s create mode 100644 asm/ov83_0223D144.s create mode 100644 asm/ov83_0223D150.s create mode 100644 asm/ov83_0223D4CC.s create mode 100644 asm/ov83_0223D6A8.s create mode 100644 asm/ov83_0223F7F4.s rename asm/{overlay84.s => ov84_0223B5A0.s} (66%) create mode 100644 asm/ov84_0223F040.s create mode 100644 asm/ov84_022403F4.s rename asm/{overlay85.s => ov85_02241440.s} (97%) rename asm/{overlay86.s => ov86_0223B140.s} (97%) create mode 100644 asm/ov87_021D0D80.s rename asm/{overlay87.s => ov87_021D106C.s} (77%) rename asm/{overlay88.s => ov88_0223B140.s} (92%) create mode 100644 asm/ov88_0223E9C4.s rename asm/{overlay8.s => ov8_02249960.s} (94%) rename asm/{overlay90.s => ov90_021D0D80.s} (95%) rename asm/{overlay91.s => ov91_021D0D80.s} (97%) rename asm/{overlay92.s => ov92_021D0D80.s} (96%) rename asm/{overlay93.s => ov93_021D0D80.s} (50%) create mode 100644 asm/ov93_021D111C.s create mode 100644 asm/ov94_0223B140.s create mode 100644 asm/ov94_0223BCB0.s create mode 100644 asm/ov94_0223C610.s create mode 100644 asm/ov94_0223D0C4.s create mode 100644 asm/ov94_0223DC04.s create mode 100644 asm/ov94_0223E46C.s create mode 100644 asm/ov94_0223FB48.s create mode 100644 asm/ov94_022414B8.s create mode 100644 asm/ov94_02242AD0.s create mode 100644 asm/ov94_02243EF8.s create mode 100644 asm/ov94_022443E0.s create mode 100644 asm/ov94_022444C8.s create mode 100644 asm/ov94_02244950.s create mode 100644 asm/ov95_02246C20.s create mode 100644 asm/ov95_022476F0.s create mode 100644 asm/ov95_02247B6C.s create mode 100644 asm/ov95_02248590.s create mode 100644 asm/ov95_02249740.s create mode 100644 asm/ov95_02249F90.s create mode 100644 asm/ov95_0224A390.s create mode 100644 asm/ov95_0224ABC0.s create mode 100644 asm/ov95_0224B3D8.s create mode 100644 asm/ov96_0223B140.s create mode 100644 asm/ov96_0223B6A0.s rename asm/{overlay96.s => ov96_0223BCE0.s} (70%) rename asm/{overlay9.s => ov9_02249960.s} (88%) delete mode 100644 asm/overlay12.s delete mode 100644 asm/overlay13.s delete mode 100644 asm/overlay16.s delete mode 100644 asm/overlay17.s delete mode 100644 asm/overlay19.s delete mode 100644 asm/overlay20.s delete mode 100644 asm/overlay21.s delete mode 100644 asm/overlay22.s delete mode 100644 asm/overlay23.s delete mode 100644 asm/overlay25.s delete mode 100644 asm/overlay28.s delete mode 100644 asm/overlay5.s delete mode 100644 asm/overlay6.s delete mode 100644 asm/overlay62.s delete mode 100644 asm/overlay63.s delete mode 100644 asm/overlay7.s delete mode 100644 asm/overlay70.s delete mode 100644 asm/overlay76.s delete mode 100644 asm/overlay77.s delete mode 100644 asm/overlay79.s delete mode 100644 asm/overlay83.s delete mode 100644 asm/overlay94.s delete mode 100644 asm/overlay95.s diff --git a/asm/overlay10.s b/asm/ov10_0221F800.s similarity index 97% rename from asm/overlay10.s rename to asm/ov10_0221F800.s index 25a4180b4..ec1ed9dbb 100644 --- a/asm/overlay10.s +++ b/asm/ov10_0221F800.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov10_0221F800 ov10_0221F800: ; 0x0221F800 push {r3, r4, r5, lr} @@ -6268,12 +6271,115 @@ _02222A5E: ; .align 2, 0 _02222A60: .word 0x00000BC4 thumb_func_end ov10_02222A48 - ; 0x02222A64 - .rodata - .incbin "incbin/overlay10_rodata.bin" - .bss - .space 0x0 + .global Unk_ov10_02222A64 +Unk_ov10_02222A64: ; 0x02222A64 + .incbin "incbin/overlay10_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov10_02222A68 +Unk_ov10_02222A68: ; 0x02222A68 + .incbin "incbin/overlay10_rodata.bin", 0x4, 0xC - 0x4 + + .global Unk_ov10_02222A70 +Unk_ov10_02222A70: ; 0x02222A70 + .incbin "incbin/overlay10_rodata.bin", 0xC, 0x18 - 0xC + + .global Unk_ov10_02222A7C +Unk_ov10_02222A7C: ; 0x02222A7C + .incbin "incbin/overlay10_rodata.bin", 0x18, 0x24 - 0x18 + + .global Unk_ov10_02222A88 +Unk_ov10_02222A88: ; 0x02222A88 + .incbin "incbin/overlay10_rodata.bin", 0x24, 0x34 - 0x24 + + .global Unk_ov10_02222A98 +Unk_ov10_02222A98: ; 0x02222A98 + .incbin "incbin/overlay10_rodata.bin", 0x34, 0x44 - 0x34 + + .global Unk_ov10_02222AA8 +Unk_ov10_02222AA8: ; 0x02222AA8 + .incbin "incbin/overlay10_rodata.bin", 0x44, 0x58 - 0x44 + + .global Unk_ov10_02222ABC +Unk_ov10_02222ABC: ; 0x02222ABC + .incbin "incbin/overlay10_rodata.bin", 0x58, 0x6C - 0x58 + + .global Unk_ov10_02222AD0 +Unk_ov10_02222AD0: ; 0x02222AD0 + .incbin "incbin/overlay10_rodata.bin", 0x6C, 0x80 - 0x6C + + .global Unk_ov10_02222AE4 +Unk_ov10_02222AE4: ; 0x02222AE4 + .incbin "incbin/overlay10_rodata.bin", 0x80, 0x98 - 0x80 + + .global Unk_ov10_02222AFC +Unk_ov10_02222AFC: ; 0x02222AFC + .incbin "incbin/overlay10_rodata.bin", 0x98, 0xB0 - 0x98 + + .global Unk_ov10_02222B14 +Unk_ov10_02222B14: ; 0x02222B14 + .incbin "incbin/overlay10_rodata.bin", 0xB0, 0xC8 - 0xB0 + + .global Unk_ov10_02222B2C +Unk_ov10_02222B2C: ; 0x02222B2C + .incbin "incbin/overlay10_rodata.bin", 0xC8, 0xE4 - 0xC8 + + .global Unk_ov10_02222B48 +Unk_ov10_02222B48: ; 0x02222B48 + .incbin "incbin/overlay10_rodata.bin", 0xE4, 0x100 - 0xE4 + + .global Unk_ov10_02222B64 +Unk_ov10_02222B64: ; 0x02222B64 + .incbin "incbin/overlay10_rodata.bin", 0x100, 0x11C - 0x100 + + .global Unk_ov10_02222B80 +Unk_ov10_02222B80: ; 0x02222B80 + .incbin "incbin/overlay10_rodata.bin", 0x11C, 0x138 - 0x11C + + .global Unk_ov10_02222B9C +Unk_ov10_02222B9C: ; 0x02222B9C + .incbin "incbin/overlay10_rodata.bin", 0x138, 0x154 - 0x138 + + .global Unk_ov10_02222BB8 +Unk_ov10_02222BB8: ; 0x02222BB8 + .incbin "incbin/overlay10_rodata.bin", 0x154, 0x170 - 0x154 + + .global Unk_ov10_02222BD4 +Unk_ov10_02222BD4: ; 0x02222BD4 + .incbin "incbin/overlay10_rodata.bin", 0x170, 0x18C - 0x170 + + .global Unk_ov10_02222BF0 +Unk_ov10_02222BF0: ; 0x02222BF0 + .incbin "incbin/overlay10_rodata.bin", 0x18C, 0x1AC - 0x18C + + .global Unk_ov10_02222C10 +Unk_ov10_02222C10: ; 0x02222C10 + .incbin "incbin/overlay10_rodata.bin", 0x1AC, 0x1D4 - 0x1AC + + .global Unk_ov10_02222C38 +Unk_ov10_02222C38: ; 0x02222C38 + .incbin "incbin/overlay10_rodata.bin", 0x1D4, 0x208 - 0x1D4 + + .global Unk_ov10_02222C6C +Unk_ov10_02222C6C: ; 0x02222C6C + .incbin "incbin/overlay10_rodata.bin", 0x208, 0x244 - 0x208 + + .global Unk_ov10_02222CA8 +Unk_ov10_02222CA8: ; 0x02222CA8 + .incbin "incbin/overlay10_rodata.bin", 0x244, 0x290 - 0x244 + + .global Unk_ov10_02222CF4 +Unk_ov10_02222CF4: ; 0x02222CF4 + .incbin "incbin/overlay10_rodata.bin", 0x290, 0x350 - 0x290 + + .global Unk_ov10_02222DB4 +Unk_ov10_02222DB4: ; 0x02222DB4 + .incbin "incbin/overlay10_rodata.bin", 0x350, 0x4D8 - 0x350 + + .global Unk_ov10_02222F3C +Unk_ov10_02222F3C: ; 0x02222F3C + .incbin "incbin/overlay10_rodata.bin", 0x4D8, 0x348 + diff --git a/asm/ov11_0221F800.s b/asm/ov11_0221F800.s new file mode 100644 index 000000000..5c5919842 --- /dev/null +++ b/asm/ov11_0221F800.s @@ -0,0 +1,133 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov11_0221F800 +ov11_0221F800: ; 0x0221F800 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0221F810 + lsl r1, r0, #2 + ldr r0, _0221F814 ; =0x0221FBD0 + ldr r0, [r0, r1] + bx lr +_0221F810: + ldr r0, _0221F818 ; =0x0221F96C + bx lr + ; .align 2, 0 +_0221F814: .word 0x0221FBD0 +_0221F818: .word 0x0221F96C + thumb_func_end ov11_0221F800 + + thumb_func_start ov11_0221F81C +ov11_0221F81C: ; 0x0221F81C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r3, #0 + bl ov11_0221F800 + ldr r3, [sp, #0x10] + add r1, r0, #0 + mov r0, #0x20 + lsl r3, r3, #0x14 + str r0, [sp] + add r0, r5, #0 + add r2, r4, #0 + lsr r3, r3, #0x10 + bl sub_02002FBC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov11_0221F81C + + .rodata + + + .global Unk_ov11_0221F94C +Unk_ov11_0221F94C: ; 0x0221F94C + .incbin "incbin/overlay11_rodata.bin", 0x0, 0x20 - 0x0 + + .global Unk_ov11_0221F96C +Unk_ov11_0221F96C: ; 0x0221F96C + .incbin "incbin/overlay11_rodata.bin", 0x20, 0x40 - 0x20 + + .global Unk_ov11_0221F98C +Unk_ov11_0221F98C: ; 0x0221F98C + .incbin "incbin/overlay11_rodata.bin", 0x40, 0x60 - 0x40 + + .global Unk_ov11_0221F9AC +Unk_ov11_0221F9AC: ; 0x0221F9AC + .incbin "incbin/overlay11_rodata.bin", 0x60, 0x80 - 0x60 + + .global Unk_ov11_0221F9CC +Unk_ov11_0221F9CC: ; 0x0221F9CC + .incbin "incbin/overlay11_rodata.bin", 0x80, 0xA0 - 0x80 + + .global Unk_ov11_0221F9EC +Unk_ov11_0221F9EC: ; 0x0221F9EC + .incbin "incbin/overlay11_rodata.bin", 0xA0, 0xC0 - 0xA0 + + .global Unk_ov11_0221FA0C +Unk_ov11_0221FA0C: ; 0x0221FA0C + .incbin "incbin/overlay11_rodata.bin", 0xC0, 0xE0 - 0xC0 + + .global Unk_ov11_0221FA2C +Unk_ov11_0221FA2C: ; 0x0221FA2C + .incbin "incbin/overlay11_rodata.bin", 0xE0, 0x100 - 0xE0 + + .global Unk_ov11_0221FA4C +Unk_ov11_0221FA4C: ; 0x0221FA4C + .incbin "incbin/overlay11_rodata.bin", 0x100, 0x120 - 0x100 + + .global Unk_ov11_0221FA6C +Unk_ov11_0221FA6C: ; 0x0221FA6C + .incbin "incbin/overlay11_rodata.bin", 0x120, 0x140 - 0x120 + + .global Unk_ov11_0221FA8C +Unk_ov11_0221FA8C: ; 0x0221FA8C + .incbin "incbin/overlay11_rodata.bin", 0x140, 0x160 - 0x140 + + .global Unk_ov11_0221FAAC +Unk_ov11_0221FAAC: ; 0x0221FAAC + .incbin "incbin/overlay11_rodata.bin", 0x160, 0x180 - 0x160 + + .global Unk_ov11_0221FACC +Unk_ov11_0221FACC: ; 0x0221FACC + .incbin "incbin/overlay11_rodata.bin", 0x180, 0x1A0 - 0x180 + + .global Unk_ov11_0221FAEC +Unk_ov11_0221FAEC: ; 0x0221FAEC + .incbin "incbin/overlay11_rodata.bin", 0x1A0, 0x1C0 - 0x1A0 + + .global Unk_ov11_0221FB0C +Unk_ov11_0221FB0C: ; 0x0221FB0C + .incbin "incbin/overlay11_rodata.bin", 0x1C0, 0x1E0 - 0x1C0 + + .global Unk_ov11_0221FB2C +Unk_ov11_0221FB2C: ; 0x0221FB2C + .incbin "incbin/overlay11_rodata.bin", 0x1E0, 0x200 - 0x1E0 + + .global Unk_ov11_0221FB4C +Unk_ov11_0221FB4C: ; 0x0221FB4C + .incbin "incbin/overlay11_rodata.bin", 0x200, 0x220 - 0x200 + + .global Unk_ov11_0221FB6C +Unk_ov11_0221FB6C: ; 0x0221FB6C + .incbin "incbin/overlay11_rodata.bin", 0x220, 0x240 - 0x220 + + .global Unk_ov11_0221FB8C +Unk_ov11_0221FB8C: ; 0x0221FB8C + .incbin "incbin/overlay11_rodata.bin", 0x240, 0x260 - 0x240 + + .global Unk_ov11_0221FBAC +Unk_ov11_0221FBAC: ; 0x0221FBAC + .incbin "incbin/overlay11_rodata.bin", 0x260, 0x284 - 0x260 + + .global Unk_ov11_0221FBD0 +Unk_ov11_0221FBD0: ; 0x0221FBD0 + .incbin "incbin/overlay11_rodata.bin", 0x284, 0x48 + diff --git a/asm/overlay11.s b/asm/ov11_0221F840.s similarity index 75% rename from asm/overlay11.s rename to asm/ov11_0221F840.s index 682153986..4e79fc852 100644 --- a/asm/overlay11.s +++ b/asm/ov11_0221F840.s @@ -1,45 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov11_0221F800 -ov11_0221F800: ; 0x0221F800 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0221F810 - lsl r1, r0, #2 - ldr r0, _0221F814 ; =0x0221FBD0 - ldr r0, [r0, r1] - bx lr -_0221F810: - ldr r0, _0221F818 ; =0x0221F96C - bx lr - ; .align 2, 0 -_0221F814: .word 0x0221FBD0 -_0221F818: .word 0x0221F96C - thumb_func_end ov11_0221F800 - - thumb_func_start ov11_0221F81C -ov11_0221F81C: ; 0x0221F81C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r3, #0 - bl ov11_0221F800 - ldr r3, [sp, #0x10] - add r1, r0, #0 - mov r0, #0x20 - lsl r3, r3, #0x14 - str r0, [sp] - add r0, r5, #0 - add r2, r4, #0 - lsr r3, r3, #0x10 - bl sub_02002FBC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov11_0221F81C thumb_func_start ov11_0221F840 ov11_0221F840: ; 0x0221F840 @@ -177,13 +142,4 @@ ov11_0221F930: ; 0x0221F930 pop {r4, pc} nop _0221F948: .word 0x02100DF4 - thumb_func_end ov11_0221F930 - ; 0x0221F94C - - - .rodata - .incbin "incbin/overlay11_rodata.bin" - - - .bss - .space 0x0 + thumb_func_end ov11_0221F930 \ No newline at end of file diff --git a/asm/ov12_0221FC20.s b/asm/ov12_0221FC20.s new file mode 100644 index 000000000..d18eb0bdd --- /dev/null +++ b/asm/ov12_0221FC20.s @@ -0,0 +1,8289 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0221FC20 +ov12_0221FC20: ; 0x0221FC20 + add r1, r0, #0 + add r1, #0x8d + ldrb r1, [r1] + cmp r1, #0 + bne _0221FC32 + ldr r1, _0221FC40 ; =ov12_0221FC44 + add r0, #0xbc + str r1, [r0, #0] + bx lr +_0221FC32: + add r1, r0, #0 + add r1, #0x8d + ldrb r1, [r1] + add r0, #0x8d + sub r1, r1, #1 + strb r1, [r0] + bx lr + ; .align 2, 0 +_0221FC40: .word ov12_0221FC44 + thumb_func_end ov12_0221FC20 + + thumb_func_start ov12_0221FC44 +ov12_0221FC44: ; 0x0221FC44 + push {r4, lr} + add r4, r0, #0 +_0221FC48: + ldr r0, [r4, #0x18] + ldr r0, [r0, #0] + bl ov12_02223164 + add r1, r0, #0 + add r0, r4, #0 + blx r1 + add r0, r4, #0 + add r0, #0x8d + ldrb r0, [r0] + cmp r0, #0 + bne _0221FC66 + ldr r0, [r4, #0x10] + cmp r0, #1 + beq _0221FC48 +_0221FC66: + pop {r4, pc} + thumb_func_end ov12_0221FC44 + + thumb_func_start ov12_0221FC68 +ov12_0221FC68: ; 0x0221FC68 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + cmp r0, #1 + beq _0221FC78 + cmp r0, #2 + beq _0221FC86 + b _0221FC94 +_0221FC78: + add r0, r1, #0 + add r0, #0x8e + ldrh r0, [r0] + add r1, #0x8e + add r0, r0, #1 + strh r0, [r1] + b _0221FC98 +_0221FC86: + add r0, r1, #0 + add r0, #0x90 + ldrh r0, [r0] + add r1, #0x90 + add r0, r0, #1 + strh r0, [r1] + b _0221FC98 +_0221FC94: + bl sub_02022974 +_0221FC98: + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + thumb_func_end ov12_0221FC68 + + thumb_func_start ov12_0221FCA4 +ov12_0221FCA4: ; 0x0221FCA4 + push {r4, lr} + add r4, r2, #0 + cmp r0, #1 + beq _0221FCB2 + cmp r0, #2 + beq _0221FCC0 + b _0221FCCE +_0221FCB2: + add r0, r1, #0 + add r0, #0x8e + ldrh r0, [r0] + add r1, #0x8e + sub r0, r0, #1 + strh r0, [r1] + b _0221FCD2 +_0221FCC0: + add r0, r1, #0 + add r0, #0x90 + ldrh r0, [r0] + add r1, #0x90 + sub r0, r0, #1 + strh r0, [r1] + b _0221FCD2 +_0221FCCE: + bl sub_02022974 +_0221FCD2: + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0221FCA4 + + thumb_func_start ov12_0221FCDC +ov12_0221FCDC: ; 0x0221FCDC + push {r3, r4, r5, lr} + mov r1, #0x6f + lsl r1, r1, #2 + add r5, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _0221FCF8 + cmp r4, #0 + bne _0221FCF4 + bl sub_02022974 +_0221FCF4: + mov r0, #0 + pop {r3, r4, r5, pc} +_0221FCF8: + mov r2, #0x6f + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + mov r1, #0x47 + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + lsl r1, r1, #2 + bl sub_02018144 + add r1, r4, #0 + add r1, #0xc0 + str r0, [r1, #0] + mov r0, #7 + add r1, r5, #0 + bl sub_02006C24 + mov r1, #0x69 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x1b + add r1, r5, #0 + bl sub_02006C24 + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x15 + add r1, r5, #0 + bl sub_02006C24 + mov r1, #0x6b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x16 + add r1, r5, #0 + bl sub_02006C24 + mov r1, #0x1b + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #0x17 + add r1, r5, #0 + bl sub_02006C24 + mov r1, #0x6d + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x18 + add r1, r5, #0 + bl sub_02006C24 + mov r2, #0x6e + lsl r2, r2, #2 + str r0, [r4, r2] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0221FD80 + bne _0221FD7C + bl sub_02022974 +_0221FD7C: + mov r0, #0 + pop {r3, r4, r5, pc} +_0221FD80: + mov r1, #0 + sub r2, #0x9c + bl sub_020D5124 + mov r1, #0 + str r1, [r4, #0xc] + str r1, [r4, #0x18] + add r2, r4, #0 + add r3, r1, #0 +_0221FD92: + add r0, r2, #0 + add r0, #0xcc + add r1, r1, #1 + add r2, r2, #4 + str r3, [r0, #0] + cmp r1, #4 + blt _0221FD92 + mov r0, #0x59 + add r2, r4, #0 + mov r1, #0 + lsl r0, r0, #2 +_0221FDA8: + add r3, r3, #1 + str r1, [r2, r0] + add r2, r2, #4 + cmp r3, #5 + blt _0221FDA8 + mov r0, #0x5e + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #1 + str r0, [r4, #0xc] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_0221FCDC + + thumb_func_start ov12_0221FDC0 +ov12_0221FDC0: ; 0x0221FDC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _0221FDCE + bl sub_02022974 +_0221FDCE: + str r4, [r5, #8] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0221FDC0 + + thumb_func_start ov12_0221FDD4 +ov12_0221FDD4: ; 0x0221FDD4 + push {r4, lr} + add r4, r0, #0 + bne _0221FDDE + bl sub_02022974 +_0221FDDE: + ldr r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0221FDD4 + + thumb_func_start ov12_0221FDE4 +ov12_0221FDE4: ; 0x0221FDE4 + push {r4, lr} + add r4, r0, #0 + bne _0221FDEE + bl sub_02022974 +_0221FDEE: + ldr r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0221FDE4 + + thumb_func_start ov12_0221FDF4 +ov12_0221FDF4: ; 0x0221FDF4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl ov12_022201B4 + cmp r0, #0 + bne _0221FE04 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0221FE04: + mov r6, #0x69 + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #2 +_0221FE0C: + ldr r0, [r5, r6] + bl sub_02006CA8 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _0221FE0C + add r0, r7, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r7, #0 + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_0221FDF4 + + thumb_func_start ov12_0221FE30 +ov12_0221FE30: ; 0x0221FE30 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r4, r0, #0 + add r5, r1, #0 + str r2, [sp] + str r3, [sp, #4] + bl ov12_02220474 + add r0, r4, #0 + bl ov12_022201B4 + cmp r0, #0 + bne _0221FE50 + add sp, #0x3c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0221FE50: + mov r3, #0 + mov r2, #1 + add r1, r3, #0 +_0221FE56: + add r0, r4, r3 + add r0, #0x6c + strb r2, [r0] + add r0, r4, r3 + add r0, #0x7c + add r3, r3, #1 + strb r1, [r0] + cmp r3, #0x10 + blt _0221FE56 + add r3, r4, #0 + mov r0, #0 +_0221FE6C: + add r2, r3, #0 + add r2, #0x94 + add r1, r1, #1 + add r3, r3, #4 + str r0, [r2, #0] + cmp r1, #0xa + blt _0221FE6C + add r3, r4, #0 + mov r2, #0 +_0221FE7E: + str r2, [r3, #0x30] + add r1, r3, #0 + str r2, [r3, #0x28] + add r1, #0x2c + strb r2, [r1] + add r1, r3, #0 + add r1, #0x2d + add r0, r0, #1 + add r3, #0xc + strb r2, [r1] + cmp r0, #3 + blt _0221FE7E + add r0, r4, #0 + add r0, #0xc0 + ldrb r1, [r5] + ldr r0, [r0, #0] + strb r1, [r0] + add r0, r4, #0 + add r0, #0xc0 + ldrb r1, [r5, #1] + ldr r0, [r0, #0] + strb r1, [r0, #1] + add r0, r4, #0 + add r0, #0xc0 + ldrh r1, [r5, #2] + ldr r0, [r0, #0] + strh r1, [r0, #2] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r5, #4] + ldr r0, [r0, #0] + str r1, [r0, #4] + add r0, r4, #0 + add r0, #0xc0 + ldrh r1, [r5, #8] + ldr r0, [r0, #0] + strh r1, [r0, #8] + add r0, r4, #0 + add r0, #0xc0 + ldrh r1, [r5, #0xc] + ldr r0, [r0, #0] + strh r1, [r0, #0xa] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r5, #0x10] + ldr r0, [r0, #0] + str r1, [r0, #0xc] + add r0, r4, #0 + add r0, #0xc0 + ldrh r1, [r5, #0xa] + ldr r0, [r0, #0] + strh r1, [r0, #0x10] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r5, #0x54] + ldr r0, [r0, #0] + strh r1, [r0, #0x12] + add r0, r4, #0 + add r0, #0xc0 + ldrh r1, [r5, #0x14] + ldr r0, [r0, #0] + strh r1, [r0, #0x14] + add r0, r4, #0 + add r0, #0xc0 + ldrh r1, [r5, #0x16] + ldr r0, [r0, #0] + strh r1, [r0, #0x16] + ldrh r0, [r5, #0xe] + lsl r0, r0, #0x1e + lsr r2, r0, #0x1f + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + str r2, [r1, r0] + ldr r0, [sp, #4] + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + str r1, [r0, #0] + ldr r0, [sp, #4] + ldr r0, [r0, #0] + cmp r0, #0 + bne _0221FF30 + bl sub_02022974 +_0221FF30: + ldr r0, [sp, #4] + mov r2, #0 + ldr r1, [r0, #4] + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r7, r2, #0 + ldr r1, [r0, #8] + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] + ldr r0, [sp, #4] + ldr r1, [r0, #0x30] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xd4 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r1, r2, #0 + add r3, r0, #0 + mov ip, r3 +_0221FF5E: + add r5, r4, #0 + add r5, #0xc0 + ldr r5, [r5, #0] + ldr r3, [r0, #0xc] + add r5, r5, r1 + add r5, #0xb0 + str r3, [r5, #0] + ldr r3, [sp, #4] + add r5, r4, #0 + add r5, #0xc0 + add r6, r3, r2 + ldr r5, [r5, #0] + ldrb r3, [r6, #0x1c] + add r5, r5, r2 + add r5, #0xc0 + strb r3, [r5] + add r5, r4, #0 + add r5, #0xc0 + ldr r5, [r5, #0] + ldr r3, [r0, #0x20] + add r5, r5, r1 + add r5, #0xc4 + str r3, [r5, #0] + add r5, r4, #0 + add r5, #0xc0 + mov r3, ip + ldr r5, [r5, #0] + ldrh r3, [r3, #0x34] + add r5, r5, r7 + add r5, #0xd8 + strh r3, [r5] + add r5, r4, #0 + add r3, r6, #0 + add r5, #0xc0 + add r3, #0x3c + ldr r5, [r5, #0] + ldrb r3, [r3] + add r5, r5, r2 + add r5, #0xe0 + strb r3, [r5] + add r3, r6, #0 + add r5, r4, #0 + add r5, #0xc0 + add r3, #0x40 + ldr r5, [r5, #0] + ldrb r3, [r3] + add r5, r5, r2 + add r5, #0xe4 + strb r3, [r5] + add r5, r4, #0 + add r5, #0xc0 + add r6, #0x44 + ldr r5, [r5, #0] + ldrb r3, [r6] + add r5, r5, r2 + add r5, #0xe8 + strb r3, [r5] + add r5, r4, #0 + add r5, #0xc0 + ldr r5, [r5, #0] + ldr r3, [r0, #0x48] + add r5, r5, r1 + add r5, #0xec + str r3, [r5, #0] + add r5, r4, #0 + add r5, #0xc0 + ldr r5, [r5, #0] + ldr r3, [r0, #0x58] + add r5, r5, r1 + add r5, #0xfc + str r3, [r5, #0] + mov r3, ip + add r3, r3, #2 + add r2, r2, #1 + add r0, r0, #4 + add r1, r1, #4 + add r7, r7, #2 + mov ip, r3 + cmp r2, #4 + blt _0221FF5E + ldr r5, [sp, #4] + mov r2, #0x61 + lsl r2, r2, #2 + add r5, #0x6c + add r3, r4, r2 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [sp, #4] + add r0, #0x84 + ldr r3, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + add r0, r2, #0 + sub r0, #0x78 + str r3, [r1, r0] + ldr r0, [sp, #4] + add r0, #0x8c + ldr r3, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + add r0, r2, #0 + sub r0, #0x70 + str r3, [r1, r0] + ldr r0, [sp, #4] + add r0, #0x88 + ldr r3, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + add r0, r2, #0 + sub r0, #0x74 + str r3, [r1, r0] + ldr r0, [sp] + sub r2, #0x62 + cmp r0, r2 + bne _0222007E + ldr r5, _02220154 ; =0x02238680 + add r3, sp, #8 + mov r2, #6 +_02220058: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02220058 + ldr r0, [r5, #0] + str r0, [r3, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #0x12] + cmp r0, #0x18 + blo _02220076 + mov r0, #0xa1 + str r0, [sp] + b _0222007E +_02220076: + lsl r1, r0, #2 + add r0, sp, #8 + ldr r0, [r0, r1] + str r0, [sp] +_0222007E: + ldr r0, [sp] + cmp r0, #0 + beq _0222008A + ldr r1, _02220158 ; =0x000001D3 + cmp r0, r1 + ble _0222008E +_0222008A: + mov r0, #1 + str r0, [sp] +_0222008E: + ldr r0, [sp, #4] + ldr r0, [r0, #0x68] + str r0, [r4, #4] + ldr r1, [sp] + ldr r2, [r4, #0] + bl sub_02006AC0 + str r0, [r4, #0x14] + cmp r0, #0 + bne _022200AE + bne _022200A8 + bl sub_02022974 +_022200A8: + add sp, #0x3c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022200AE: + str r0, [r4, #0x18] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0201A008 + mov r1, #0x1a + lsl r1, r1, #4 + strb r0, [r4, r1] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0201A008 + ldr r1, _0222015C ; =0x000001A1 + strb r0, [r4, r1] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_0201A008 + ldr r1, _02220160 ; =0x000001A2 + strb r0, [r4, r1] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_0201A008 + ldr r1, _02220164 ; =0x000001A3 + mov r3, #0 + strb r0, [r4, r1] + add r2, r4, #0 + add r1, r3, #0 +_022200F8: + add r0, r2, #0 + add r0, #0xdc + add r3, r3, #1 + add r2, r2, #4 + str r1, [r0, #0] + cmp r3, #0xa + blt _022200F8 + mov r2, #0x4f + lsl r2, r2, #2 + add r3, r2, #0 + add r5, r4, #0 + mov r0, #0 + add r3, #0x14 +_02220112: + str r0, [r5, r2] + str r0, [r5, r3] + add r1, r1, #1 + add r5, r5, #4 + cmp r1, #5 + blt _02220112 + mov r1, #6 + lsl r1, r1, #6 + str r0, [r4, r1] + add r1, r4, #0 + ldr r2, _02220168 ; =ov12_0221FC44 + add r1, #0xbc + str r2, [r1, #0] + add r1, r4, #0 + add r1, #0x8d + strb r0, [r1] + add r0, r4, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02220144 + mov r0, #0x67 + mov r1, #7 + lsl r0, r0, #2 + b _0222014A +_02220144: + mov r1, #0xff + add r0, r1, #0 + add r0, #0x9d +_0222014A: + str r1, [r4, r0] + mov r0, #1 + str r0, [r4, #0x10] + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02220154: .word 0x02238680 +_02220158: .word 0x000001D3 +_0222015C: .word 0x000001A1 +_02220160: .word 0x000001A2 +_02220164: .word 0x000001A3 +_02220168: .word ov12_0221FC44 + thumb_func_end ov12_0221FE30 + + thumb_func_start ov12_0222016C +ov12_0222016C: ; 0x0222016C + push {r4, lr} + add r4, r0, #0 + bl ov12_022201B4 + cmp r0, #0 + bne _0222017C + mov r0, #0 + pop {r4, pc} +_0222017C: + add r0, r4, #0 + add r4, #0xbc + ldr r1, [r4, #0] + blx r1 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_0222016C + + thumb_func_start ov12_02220188 +ov12_02220188: ; 0x02220188 + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _02220192 + mov r0, #1 + bx lr +_02220192: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220188 + + thumb_func_start ov12_02220198 +ov12_02220198: ; 0x02220198 + push {r3, lr} + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _022201AA + bne _022201A6 + bl sub_02022974 +_022201A6: + mov r0, #0 + pop {r3, pc} +_022201AA: + bl sub_020181C4 + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02220198 + + thumb_func_start ov12_022201B4 +ov12_022201B4: ; 0x022201B4 + cmp r0, #0 + bne _022201BC + mov r0, #0 + bx lr +_022201BC: + ldr r0, [r0, #0xc] + cmp r0, #1 + bne _022201C6 + mov r0, #1 + bx lr +_022201C6: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_022201B4 + + thumb_func_start ov12_022201CC +ov12_022201CC: ; 0x022201CC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + str r3, [sp] + mov r0, #1 + add r1, r6, #0 + add r2, r5, #0 + add r3, r4, #0 + bl ov12_0221FC68 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov12_022201CC + + thumb_func_start ov12_022201E8 +ov12_022201E8: ; 0x022201E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _02220200 ; =0x0000044C + add r4, r1, #0 + add r3, r2, #0 + str r0, [sp] + mov r0, #1 + add r1, r5, #0 + add r2, r4, #0 + bl ov12_0221FC68 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02220200: .word 0x0000044C + thumb_func_end ov12_022201E8 + + thumb_func_start ov12_02220204 +ov12_02220204: ; 0x02220204 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + str r3, [sp] + mov r0, #2 + add r1, r6, #0 + add r2, r5, #0 + add r3, r4, #0 + bl ov12_0221FC68 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov12_02220204 + + thumb_func_start ov12_02220220 +ov12_02220220: ; 0x02220220 + add r3, r0, #0 + add r2, r1, #0 + add r1, r3, #0 + ldr r3, _0222022C ; =ov12_0221FCA4 + mov r0, #1 + bx r3 + ; .align 2, 0 +_0222022C: .word ov12_0221FCA4 + thumb_func_end ov12_02220220 + + thumb_func_start ov12_02220230 +ov12_02220230: ; 0x02220230 + add r3, r0, #0 + add r2, r1, #0 + add r1, r3, #0 + ldr r3, _0222023C ; =ov12_0221FCA4 + mov r0, #2 + bx r3 + ; .align 2, 0 +_0222023C: .word ov12_0221FCA4 + thumb_func_end ov12_02220230 + + thumb_func_start ov12_02220240 +ov12_02220240: ; 0x02220240 + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #0x14] + bx lr + thumb_func_end ov12_02220240 + + thumb_func_start ov12_02220248 +ov12_02220248: ; 0x02220248 + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #0x16] + bx lr + thumb_func_end ov12_02220248 + + thumb_func_start ov12_02220250 +ov12_02220250: ; 0x02220250 + add r0, #0xc0 + ldr r1, [r0, #0] + ldr r0, [r1, #0x18] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x1c] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220250 + + thumb_func_start ov12_02220260 +ov12_02220260: ; 0x02220260 + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + ldr r0, [r0, #0x1c] + bx lr + thumb_func_end ov12_02220260 + + thumb_func_start ov12_0222026C +ov12_0222026C: ; 0x0222026C + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + ldr r0, [r0, #0x5c] + bx lr + thumb_func_end ov12_0222026C + + thumb_func_start ov12_02220278 +ov12_02220278: ; 0x02220278 + add r0, #0xc4 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220278 + + thumb_func_start ov12_02220280 +ov12_02220280: ; 0x02220280 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #0xa + blt _0222028E + bl sub_02022974 +_0222028E: + lsl r0, r5, #2 + add r0, r4, r0 + add r0, #0x94 + ldr r0, [r0, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02220280 + + thumb_func_start ov12_02220298 +ov12_02220298: ; 0x02220298 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0xa + blt _022202A6 + bl sub_02022974 +_022202A6: + cmp r5, #0 + bne _022202AE + bl sub_02022974 +_022202AE: + add r5, #0xdc + lsl r4, r4, #2 + ldr r0, [r5, r4] + cmp r0, #0 + bne _022202BC + bl sub_02022974 +_022202BC: + ldr r0, [r5, r4] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02220298 + + thumb_func_start ov12_022202C0 +ov12_022202C0: ; 0x022202C0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #5 + blt _022202CE + bl sub_02022974 +_022202CE: + cmp r5, #0 + bne _022202D6 + bl sub_02022974 +_022202D6: + mov r0, #0x4f + lsl r0, r0, #2 + add r5, r5, r0 + lsl r4, r4, #2 + ldr r0, [r5, r4] + cmp r0, #0 + bne _022202E8 + bl sub_02022974 +_022202E8: + ldr r0, [r5, r4] + pop {r3, r4, r5, pc} + thumb_func_end ov12_022202C0 + + thumb_func_start ov12_022202EC +ov12_022202EC: ; 0x022202EC + push {r4, lr} + add r4, r0, #0 + bne _022202F6 + bl sub_02022974 +_022202F6: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022202EC + + thumb_func_start ov12_02220300 +ov12_02220300: ; 0x02220300 + add r0, #0xcc + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220300 + + thumb_func_start ov12_02220308 +ov12_02220308: ; 0x02220308 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220308 + + thumb_func_start ov12_02220314 +ov12_02220314: ; 0x02220314 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x3c + bl sub_02018144 + add r4, r0, #0 + bne _0222032C + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, pc} +_0222032C: + mov r1, #0 + mov r2, #0x3c + bl sub_020D5124 + add r0, r5, #0 + add r0, #0x90 + ldrh r0, [r0] + add r5, #0x90 + add r0, r0, #1 + strh r0, [r5] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02220314 + + thumb_func_start ov12_02220344 +ov12_02220344: ; 0x02220344 + ldr r3, _02220350 ; =sub_0200D9E8 + str r0, [r1, #0x38] + ldr r0, _02220354 ; =ov12_0222035C + ldr r2, _02220358 ; =0x0000044C + bx r3 + nop +_02220350: .word sub_0200D9E8 +_02220354: .word ov12_0222035C +_02220358: .word 0x0000044C + thumb_func_end ov12_02220344 + + thumb_func_start ov12_0222035C +ov12_0222035C: ; 0x0222035C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02220398 ; =0x0223862C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + bne _02220396 + ldr r0, [r4, #0x38] + add r1, r0, #0 + add r1, #0x90 + ldrh r1, [r1] + cmp r1, #0 + beq _0222038A + add r1, r0, #0 + add r1, #0x90 + ldrh r1, [r1] + add r0, #0x90 + sub r1, r1, #1 + strh r1, [r0] +_0222038A: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02220396: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02220398: .word 0x0223862C + thumb_func_end ov12_0222035C + + thumb_func_start ov12_0222039C +ov12_0222039C: ; 0x0222039C + mov r0, #0 + bx lr + thumb_func_end ov12_0222039C + + thumb_func_start ov12_022203A0 +ov12_022203A0: ; 0x022203A0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r1, [r5, #4] + add r0, r1, #1 + strb r0, [r5, #4] + ldrb r0, [r5, #3] + cmp r1, r0 + bhs _022203B4 + mov r0, #1 + pop {r3, r4, r5, pc} +_022203B4: + mov r0, #0 + strb r0, [r5, #4] + ldr r2, [r5, #0x14] + ldr r1, [r5, #0x10] + mov r4, #1 + add r1, r2, r1 + str r1, [r5, #0x14] + ldr r1, [r5, #0x10] + cmp r1, #0 + bne _022203CC + add r4, r0, #0 + b _022203E4 +_022203CC: + ldr r2, [r5, #0xc] + ldr r1, [r5, #8] + cmp r1, r2 + ldr r1, [r5, #0x14] + bge _022203DE + cmp r1, r2 + blt _022203E4 + add r4, r0, #0 + b _022203E4 +_022203DE: + cmp r1, r2 + bgt _022203E4 + add r4, r0, #0 +_022203E4: + ldr r0, [r5, #0x14] + bl sub_02005818 + ldrh r0, [r5, #0x1a] + bl sub_020057D4 + cmp r0, #0 + bne _022203F6 + mov r4, #0 +_022203F6: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022203A0 + + thumb_func_start ov12_022203FC +ov12_022203FC: ; 0x022203FC + ldr r3, _02220400 ; =ov12_022203A0 + bx r3 + ; .align 2, 0 +_02220400: .word ov12_022203A0 + thumb_func_end ov12_022203FC + + thumb_func_start ov12_02220404 +ov12_02220404: ; 0x02220404 + ldr r3, _02220408 ; =ov12_022203A0 + bx r3 + ; .align 2, 0 +_02220408: .word ov12_022203A0 + thumb_func_end ov12_02220404 + + thumb_func_start ov12_0222040C +ov12_0222040C: ; 0x0222040C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r1, [r5, #4] + add r0, r1, #1 + strb r0, [r5, #4] + ldrb r0, [r5, #3] + cmp r1, r0 + bhs _02220420 + mov r0, #1 + pop {r3, r4, r5, pc} +_02220420: + mov r0, #0 + strb r0, [r5, #4] + ldrb r0, [r5, #0x18] + mov r4, #1 + sub r0, r0, #1 + strb r0, [r5, #0x18] + ldrh r0, [r5, #0x1a] + bl sub_02005748 + ldrh r0, [r5, #0x1a] + ldr r1, _02220448 ; =0x0000FFFF + ldr r2, [r5, #0x14] + bl sub_020057FC + ldrb r0, [r5, #0x18] + cmp r0, #0 + bne _02220444 + mov r4, #0 +_02220444: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02220448: .word 0x0000FFFF + thumb_func_end ov12_0222040C + + thumb_func_start ov12_0222044C +ov12_0222044C: ; 0x0222044C + push {r4, lr} + add r4, r0, #0 + ldrb r2, [r4, #3] + mov r0, #1 + sub r1, r2, #1 + strb r1, [r4, #3] + cmp r2, #0 + bne _0222046E + ldrh r0, [r4, #0x1a] + bl sub_02005748 + ldrh r0, [r4, #0x1a] + ldr r1, _02220470 ; =0x0000FFFF + ldr r2, [r4, #0x14] + bl sub_020057FC + mov r0, #0 +_0222046E: + pop {r4, pc} + ; .align 2, 0 +_02220470: .word 0x0000FFFF + thumb_func_end ov12_0222044C + + thumb_func_start ov12_02220474 +ov12_02220474: ; 0x02220474 + push {r3, lr} + ldr r0, _02220488 ; =0x04000050 + mov r3, #8 + mov r1, #0 + mov r2, #0x3f + str r3, [sp] + bl sub_020BF55C + pop {r3, pc} + nop +_02220488: .word 0x04000050 + thumb_func_end ov12_02220474 + + thumb_func_start ov12_0222048C +ov12_0222048C: ; 0x0222048C + push {r3, r4} + add r2, r0, #0 + mov r1, #1 + add r2, #0x8d + strb r1, [r2] + ldr r3, _022204C0 ; =0x021BF67C + lsl r2, r1, #9 + ldr r4, [r3, #0x44] + tst r2, r4 + beq _022204BC + add r2, r1, #0 + add r2, #0xff + tst r2, r4 + beq _022204BC + ldr r2, [r3, #0x48] + lsl r1, r1, #0xa + tst r1, r2 + beq _022204BC + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + mov r1, #0 + add r0, #0x8d + strb r1, [r0] +_022204BC: + pop {r3, r4} + bx lr + ; .align 2, 0 +_022204C0: .word 0x021BF67C + thumb_func_end ov12_0222048C + + thumb_func_start ov12_022204C4 +ov12_022204C4: ; 0x022204C4 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0x8d + strb r2, [r1] + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r1, _022204E0 ; =ov12_0221FC20 + add r0, #0xbc + str r1, [r0, #0] + bx lr + ; .align 2, 0 +_022204E0: .word ov12_0221FC20 + thumb_func_end ov12_022204C4 + + thumb_func_start ov12_022204E4 +ov12_022204E4: ; 0x022204E4 + add r1, r0, #0 + add r1, #0x8e + ldrh r1, [r1] + cmp r1, #0 + bne _022204FC + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + mov r1, #0 + add r0, #0x8d + strb r1, [r0] + bx lr +_022204FC: + mov r1, #1 + add r0, #0x8d + strb r1, [r0] + bx lr + thumb_func_end ov12_022204E4 + + thumb_func_start ov12_02220504 +ov12_02220504: ; 0x02220504 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + cmp r3, #0xa + bhs _02220522 + lsl r1, r3, #2 + add r0, r0, r1 + add r0, #0x94 + str r2, [r0, #0] +_02220522: + bx lr + thumb_func_end ov12_02220504 + + thumb_func_start ov12_02220524 +ov12_02220524: ; 0x02220524 + ldr r1, [r0, #0x18] + mov r3, #0 + add r1, r1, #4 + str r1, [r0, #0x18] + add r2, r3, #0 +_0222052E: + add r1, r0, #0 + add r1, #0x94 + add r3, r3, #1 + add r0, r0, #4 + str r2, [r1, #0] + cmp r3, #0xa + blt _0222052E + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220524 + + thumb_func_start ov12_02220540 +ov12_02220540: ; 0x02220540 + cmp r1, #5 + bhi _0222058C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02220550: ; jump table + .short _0222055C - _02220550 - 2 ; case 0 + .short _02220564 - _02220550 - 2 ; case 1 + .short _0222056C - _02220550 - 2 ; case 2 + .short _02220574 - _02220550 - 2 ; case 3 + .short _0222057C - _02220550 - 2 ; case 4 + .short _02220584 - _02220550 - 2 ; case 5 +_0222055C: + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bx lr +_02220564: + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #8] + bx lr +_0222056C: + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #0xa] + bx lr +_02220574: + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bx lr +_0222057C: + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #0x10] + bx lr +_02220584: + add r0, #0xc0 + ldr r0, [r0, #0] + ldrh r0, [r0, #0x12] + bx lr +_0222058C: + mov r0, #0 + bx lr + thumb_func_end ov12_02220540 + + thumb_func_start ov12_02220590 +ov12_02220590: ; 0x02220590 + push {r3, r4, r5, r6, r7, lr} + add r3, r0, #0 + mov r0, #0 + str r2, [sp] + add r6, r0, #0 + add r5, r1, #0 + mov ip, r0 + add r7, r1, #0 +_022205A0: + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r2, r2, r6 + add r2, #0xb0 + ldr r2, [r2, #0] + str r2, [r5, #8] + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r2, r2, r6 + add r2, #0xc4 + ldr r2, [r2, #0] + str r2, [r5, #0x18] + add r2, r3, #0 + add r2, #0xc0 + ldr r4, [r2, #0] + mov r2, ip + add r2, r4, r2 + add r2, #0xd8 + ldrh r2, [r2] + strh r2, [r7, #0x28] + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r7, r7, #2 + add r2, r2, r0 + add r2, #0xe0 + ldrb r4, [r2] + add r2, r1, r0 + add r2, #0x30 + strb r4, [r2] + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r2, r2, r0 + add r2, #0xe4 + ldrb r4, [r2] + add r2, r1, r0 + add r2, #0x34 + strb r4, [r2] + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r2, r2, r0 + add r2, #0xe8 + ldrb r4, [r2] + add r2, r1, r0 + add r2, #0x38 + strb r4, [r2] + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r2, r2, r6 + add r2, #0xec + ldr r2, [r2, #0] + add r6, r6, #4 + str r2, [r5, #0x3c] + add r2, r3, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r5, r5, #4 + add r2, r2, r0 + add r2, #0xc0 + ldrb r4, [r2] + add r2, r1, r0 + add r2, #0x4c + strb r4, [r2] + mov r2, ip + add r2, r2, #2 + add r0, r0, #1 + mov ip, r2 + cmp r0, #4 + blt _022205A0 + ldr r0, [sp] + cmp r0, #3 + bhi _0222069E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02220646: ; jump table + .short _0222064E - _02220646 - 2 ; case 0 + .short _02220662 - _02220646 - 2 ; case 1 + .short _02220676 - _02220646 - 2 ; case 2 + .short _0222068A - _02220646 - 2 ; case 3 +_0222064E: + add r0, r3, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r3, #0xc0 + ldrh r0, [r0, #0x14] + str r0, [r1, #0] + ldr r0, [r3, #0] + ldrh r0, [r0, #0x16] + str r0, [r1, #4] + pop {r3, r4, r5, r6, r7, pc} +_02220662: + add r0, r3, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r3, #0xc0 + ldrh r0, [r0, #0x14] + str r0, [r1, #0] + ldr r0, [r3, #0] + ldrh r0, [r0, #0x14] + str r0, [r1, #4] + pop {r3, r4, r5, r6, r7, pc} +_02220676: + add r0, r3, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r3, #0xc0 + ldrh r0, [r0, #0x14] + str r0, [r1, #0] + ldr r0, [r3, #0] + ldrh r0, [r0, #0x14] + str r0, [r1, #4] + pop {r3, r4, r5, r6, r7, pc} +_0222068A: + add r0, r3, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r3, #0xc0 + ldrh r0, [r0, #0x14] + str r0, [r1, #0] + ldr r0, [r3, #0] + ldrh r0, [r0, #0x14] + str r0, [r1, #4] + pop {r3, r4, r5, r6, r7, pc} +_0222069E: + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02220590 + + thumb_func_start ov12_022206A4 +ov12_022206A4: ; 0x022206A4 + push {r3, r4, r5, lr} + sub sp, #0x50 + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r4, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + add r1, sp, #0 + add r2, r4, #0 + bl ov12_02220590 + cmp r4, #2 + add r0, sp, #0 + bne _022206CE + ldr r1, [r5, #0] + bl ov12_02238390 + add sp, #0x50 + pop {r3, r4, r5, pc} +_022206CE: + cmp r4, #3 + bne _022206DC + ldr r1, [r5, #0] + bl ov12_022380CC + add sp, #0x50 + pop {r3, r4, r5, pc} +_022206DC: + ldr r1, [r5, #0] + bl ov12_022380BC + add sp, #0x50 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022206A4 + + thumb_func_start ov12_022206E8 +ov12_022206E8: ; 0x022206E8 + push {r4, lr} + sub sp, #0x50 + add r4, r0, #0 + ldr r1, [r4, #0x18] + add r1, r1, #4 + str r1, [r4, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r4, #0x18] + add r1, sp, #0 + bl ov12_02220590 + ldr r1, [r4, #0] + add r0, sp, #0 + bl ov12_022382BC + add sp, #0x50 + pop {r4, pc} + thumb_func_end ov12_022206E8 + + thumb_func_start ov12_0222070C +ov12_0222070C: ; 0x0222070C + ldr r1, [r0, #0x18] + mov r2, #0 + add r1, r1, #4 + str r1, [r0, #0x18] + add r3, r0, #0 +_02220716: + ldr r1, [r3, #0x30] + cmp r1, #1 + beq _02220742 + mov r1, #0xc + mul r1, r2 + mov r2, #1 + add r1, r0, r1 + str r2, [r1, #0x30] + add r2, r1, #0 + mov r3, #0 + add r2, #0x2c + strb r3, [r2] + ldr r2, [r0, #0x18] + ldr r3, [r2, #0] + add r2, r1, #0 + add r2, #0x2d + strb r3, [r2] + ldr r2, [r0, #0x18] + add r2, r2, #4 + str r2, [r0, #0x18] + str r2, [r1, #0x28] + bx lr +_02220742: + add r2, r2, #1 + add r3, #0xc + cmp r2, #3 + blt _02220716 + bx lr + thumb_func_end ov12_0222070C + + thumb_func_start ov12_0222074C +ov12_0222074C: ; 0x0222074C + push {r3, r4} + ldr r1, [r0, #0x18] + add r3, r0, #0 + add r1, r1, #4 + add r3, #0x18 + str r1, [r0, #0x18] + mov r2, #2 +_0222075A: + ldr r1, [r3, #0x30] + cmp r1, #0 + beq _0222078E + add r4, r2, #0 + mov r1, #0xc + add r2, r0, #0 + mul r4, r1 + add r2, #0x2c + ldrb r1, [r2, r4] + add r1, r1, #1 + strb r1, [r2, r4] + ldrb r3, [r2, r4] + add r2, r0, r4 + add r1, r2, #0 + add r1, #0x2d + ldrb r1, [r1] + cmp r3, r1 + bne _02220786 + mov r0, #0 + str r0, [r2, #0x30] + pop {r3, r4} + bx lr +_02220786: + ldr r1, [r2, #0x28] + str r1, [r0, #0x18] + pop {r3, r4} + bx lr +_0222078E: + sub r3, #0xc + sub r2, r2, #1 + bpl _0222075A + pop {r3, r4} + bx lr + thumb_func_end ov12_0222074C + + thumb_func_start ov12_02220798 +ov12_02220798: ; 0x02220798 + push {r3, r4, r5, r6, r7, lr} + ldr r1, _02220994 ; =0x0000017E + add r5, r0, #0 + ldrb r0, [r5, r1] + mov r6, #0 + cmp r0, #1 + bhs _022207B6 + add r0, r5, #0 + mov r2, #1 + add r0, #0x8d + strb r2, [r0] + ldrb r0, [r5, r1] + add r0, r0, #1 + strb r0, [r5, r1] + pop {r3, r4, r5, r6, r7, pc} +_022207B6: + add r7, r6, #0 + add r4, r6, #0 +_022207BA: + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r4 + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _022207CE + bl sub_02014710 + add r6, r6, r0 +_022207CE: + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #0x10 + blt _022207BA + cmp r6, #0 + bne _022207EE + add r0, r5, #0 + add r0, #0x8e + ldrh r0, [r0] + cmp r0, #0 + bne _022207EE + add r0, r5, #0 + add r0, #0x90 + ldrh r0, [r0] + cmp r0, #0 + beq _022207FE +_022207EE: + add r0, r5, #0 + mov r1, #1 + add r0, #0x8d + strb r1, [r0] + ldr r0, _02220998 ; =0x0000017D + mov r1, #0 + strb r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_022207FE: + bl sub_020057E0 + cmp r0, #0 + beq _02220828 + ldr r0, _02220998 ; =0x0000017D + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + ldrb r1, [r5, r0] + cmp r1, #0x5a + bls _02220820 + mov r1, #0 + strb r1, [r5, r0] + add r0, r5, #0 + add r0, #0x8d + strb r1, [r0] + b _02220828 +_02220820: + mov r0, #1 + add r5, #0x8d + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_02220828: + ldr r0, _02220998 ; =0x0000017D + mov r1, #0 + strb r1, [r5, r0] + add r0, r0, #1 + strb r1, [r5, r0] + add r0, r5, #0 + add r2, r1, #0 +_02220836: + add r1, r1, #1 + str r2, [r0, #0x1c] + add r0, r0, #4 + cmp r1, #3 + blt _02220836 + add r1, r5, #0 + mov r4, #0 +_02220844: + add r0, r1, #0 + str r4, [r1, #0x28] + add r0, #0x2c + strb r4, [r0] + add r0, r1, #0 + add r0, #0x2d + strb r4, [r0] + str r4, [r1, #0x30] + add r2, r2, #1 + add r1, #0xc + cmp r2, #3 + blt _02220844 + add r7, r5, #0 + mov r6, #0 +_02220860: + add r0, r7, #0 + add r0, #0xcc + ldr r1, [r0, #0] + cmp r1, #0 + beq _02220878 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200D0B0 +_02220878: + add r0, r7, #0 + add r0, #0xcc + add r4, r4, #1 + add r7, r7, #4 + str r6, [r0, #0] + cmp r4, #4 + blt _02220860 +_02220886: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02221238 + add r6, r6, #1 + cmp r6, #5 + blt _02220886 + mov r6, #0 + add r4, r6, #0 + add r7, r6, #0 +_0222089A: + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r4 + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _022208B6 + bl ov12_02223894 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r4 + str r7, [r0, #0x1c] +_022208B6: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #0x10 + blt _0222089A + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + cmp r1, #0 + beq _022208CC + mov r1, #0 + str r1, [r5, r0] +_022208CC: + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #0 + bne _02220920 + bl ov16_0223F9F0 + add r0, r5, #0 + mov r1, #1 + bl ov12_022233B0 + add r4, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + add r3, r0, #0 + lsl r0, r4, #0x18 + mov r1, #1 + lsr r0, r0, #0x18 + lsl r1, r1, #0xe + mov r2, #0 + bl sub_02019690 + add r0, r5, #0 + bl ov12_02220278 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov12_022233B0 + add r1, r0, #0 + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl sub_02019EBC + mov r0, #2 + mov r1, #1 + bl sub_02019120 + b _02220924 +_02220920: + bl ov17_022413D8 +_02220924: + mov r1, #0x1a + lsl r1, r1, #4 + ldrb r1, [r5, r1] + mov r0, #0 + bl sub_02019060 + ldr r1, _0222099C ; =0x000001A1 + mov r0, #1 + ldrb r1, [r5, r1] + bl sub_02019060 + ldr r1, _022209A0 ; =0x000001A2 + mov r0, #2 + ldrb r1, [r5, r1] + bl sub_02019060 + ldr r1, _022209A4 ; =0x000001A3 + mov r0, #3 + ldrb r1, [r5, r1] + bl sub_02019060 + add r0, r5, #0 + add r0, #0xc4 + mov r2, #0 + ldr r0, [r0, #0] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r5, #0 + add r0, #0xc4 + mov r2, #0 + ldr r0, [r0, #0] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + add r0, r5, #0 + add r0, #0xc4 + mov r1, #3 + ldr r0, [r0, #0] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + mov r0, #0 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02220994: .word 0x0000017E +_02220998: .word 0x0000017D +_0222099C: .word 0x000001A1 +_022209A0: .word 0x000001A2 +_022209A4: .word 0x000001A3 + thumb_func_end ov12_02220798 + + thumb_func_start ov12_022209A8 +ov12_022209A8: ; 0x022209A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r4, [r0, #0] + add r1, r0, #4 + str r1, [r5, #0x18] + ldr r0, [r1, #0] + str r0, [sp] + add r0, r1, #4 + str r0, [r5, #0x18] + ldr r7, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + str r4, [r0, #0x18] + add r0, r5, r4 + add r0, #0x7c + ldrb r0, [r0] + cmp r0, #0 + beq _02220A06 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + add r1, sp, #4 + bl sub_02014734 + mov r0, #0 + ldr r1, [sp, #8] + mvn r0, r0 + mul r0, r1 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, sp, #4 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + bl sub_02014744 +_02220A06: + add r0, r5, #0 + add r0, #0xc0 + add r1, r5, r4 + add r1, #0x6c + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldrb r1, [r1] + ldr r0, [r0, #0x1c] + bl sub_02014788 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r1, [sp] + add r0, r0, r6 + ldr r0, [r0, #0x1c] + add r2, r7, #0 + add r3, r5, #0 + bl ov12_02223880 + add r5, #0xc0 + ldr r1, [r5, #0] + str r0, [r1, #0x5c] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022209A8 + + thumb_func_start ov12_02220A3C +ov12_02220A3C: ; 0x02220A3C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r4, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r7, [r0, #0] + add r1, r0, #4 + str r1, [r5, #0x18] + ldr r0, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + str r0, [sp, #4] + ldr r0, [r1, #0] + str r0, [sp] + add r0, r1, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + str r4, [r0, #0x18] + add r0, r5, r4 + add r0, #0x7c + ldrb r0, [r0] + cmp r0, #0 + beq _02220AA2 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + add r1, sp, #8 + bl sub_02014734 + mov r0, #0 + ldr r1, [sp, #0xc] + mvn r0, r0 + mul r0, r1 + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, sp, #8 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + bl sub_02014744 +_02220AA2: + add r0, r5, #0 + add r0, #0xc0 + add r1, r5, r4 + add r1, #0x6c + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldrb r1, [r1] + ldr r0, [r0, #0x1c] + bl sub_02014788 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r1, [sp, #4] + add r0, r0, r6 + ldr r0, [r0, #0x1c] + ldr r2, [sp] + add r3, r5, #0 + bl ov12_02223880 + add r5, #0xc0 + ldr r2, [r5, #0] + lsl r1, r7, #2 + add r1, r2, r1 + str r0, [r1, #0x5c] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02220A3C + + thumb_func_start ov12_02220ADC +ov12_02220ADC: ; 0x02220ADC + push {r4, r5, r6, lr} + sub sp, #0x90 + ldr r5, _02220B30 ; =0x022386B4 + add r4, r0, #0 + add r3, sp, #0 + mov r2, #0x12 +_02220AE8: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02220AE8 + add r0, r4, #0 + bl ov12_02220240 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_02220248 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov12_02235254 + mov r1, #0x18 + add r3, r5, #0 + mul r3, r1 + add r2, sp, #0 + lsl r1, r0, #2 + add r0, r2, r3 + ldr r4, [r1, r0] + cmp r4, #0xff + bne _02220B28 + bl sub_02022974 +_02220B28: + sub r0, r4, #1 + add sp, #0x90 + pop {r4, r5, r6, pc} + nop +_02220B30: .word 0x022386B4 + thumb_func_end ov12_02220ADC + + thumb_func_start ov12_02220B34 +ov12_02220B34: ; 0x02220B34 + push {r4, r5, r6, lr} + sub sp, #0x90 + ldr r5, _02220B88 ; =0x02238744 + add r4, r0, #0 + add r3, sp, #0 + mov r2, #0x12 +_02220B40: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02220B40 + add r0, r4, #0 + bl ov12_02220240 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_02220248 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov12_02235254 + mov r1, #0x18 + add r3, r5, #0 + mul r3, r1 + add r2, sp, #0 + lsl r1, r0, #2 + add r0, r2, r3 + ldr r4, [r1, r0] + cmp r4, #0xff + bne _02220B80 + bl sub_02022974 +_02220B80: + add r0, r4, #0 + add sp, #0x90 + pop {r4, r5, r6, pc} + nop +_02220B88: .word 0x02238744 + thumb_func_end ov12_02220B34 + + thumb_func_start ov12_02220B8C +ov12_02220B8C: ; 0x02220B8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r0, #0x18 + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r4, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + mov r1, #0 + add r2, sp, #0x10 +_02220BA4: + ldr r3, [r5, #0x18] + add r1, r1, #1 + ldr r3, [r3, #0] + str r3, [r2, #0] + ldr r3, [r0, #0] + add r2, r2, #4 + add r3, r3, #4 + str r3, [r0, #0] + cmp r1, #6 + blt _02220BA4 + ldr r1, [r5, #0x18] + ldr r1, [r1, #0] + str r1, [sp] + ldr r1, [r0, #0] + add r1, r1, #4 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + str r4, [r0, #0x18] + add r0, r5, r4 + add r0, #0x7c + ldrb r0, [r0] + cmp r0, #0 + beq _02220C02 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + add r1, sp, #4 + bl sub_02014734 + mov r0, #0 + ldr r1, [sp, #8] + mvn r0, r0 + mul r0, r1 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, sp, #4 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + bl sub_02014744 +_02220C02: + add r0, r5, #0 + bl ov12_02220ADC + add r7, r0, #0 + add r0, r5, #0 + add r0, #0xc0 + add r1, r5, r4 + add r1, #0x6c + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldrb r1, [r1] + ldr r0, [r0, #0x1c] + bl sub_02014788 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r2, r7, #2 + add r0, r0, r6 + add r1, sp, #0x10 + ldr r1, [r1, r2] + ldr r0, [r0, #0x1c] + ldr r2, [sp] + add r3, r5, #0 + bl ov12_02223880 + add r5, #0xc0 + ldr r1, [r5, #0] + str r0, [r1, #0x5c] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02220B8C + + thumb_func_start ov12_02220C44 +ov12_02220C44: ; 0x02220C44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r0, #0x18 + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r4, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + mov r1, #0 + add r2, sp, #0x10 +_02220C5C: + ldr r3, [r5, #0x18] + add r1, r1, #1 + ldr r3, [r3, #0] + str r3, [r2, #0] + ldr r3, [r0, #0] + add r2, r2, #4 + add r3, r3, #4 + str r3, [r0, #0] + cmp r1, #4 + blt _02220C5C + ldr r1, [r5, #0x18] + ldr r1, [r1, #0] + str r1, [sp] + ldr r1, [r0, #0] + add r1, r1, #4 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + str r4, [r0, #0x18] + add r0, r5, r4 + add r0, #0x7c + ldrb r0, [r0] + cmp r0, #0 + beq _02220CBA + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + add r1, sp, #4 + bl sub_02014734 + mov r0, #0 + ldr r1, [sp, #8] + mvn r0, r0 + mul r0, r1 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, sp, #4 + add r0, r0, r6 + ldr r0, [r0, #0x1c] + bl sub_02014744 +_02220CBA: + add r0, r5, #0 + bl ov12_02220B34 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0xc0 + add r1, r5, r4 + add r1, #0x6c + ldr r0, [r0, #0] + lsl r6, r4, #2 + add r0, r0, r6 + ldrb r1, [r1] + ldr r0, [r0, #0x1c] + bl sub_02014788 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r2, r7, #2 + add r0, r0, r6 + add r1, sp, #0x10 + ldr r1, [r1, r2] + ldr r0, [r0, #0x1c] + ldr r2, [sp] + add r3, r5, #0 + bl ov12_02223880 + add r5, #0xc0 + ldr r1, [r5, #0] + str r0, [r1, #0x5c] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02220C44 + + thumb_func_start ov12_02220CFC +ov12_02220CFC: ; 0x02220CFC + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r5, r0, #0 + add r7, r6, #0 + add r4, r6, #0 +_02220D06: + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r4 + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _02220D1A + bl sub_02014710 + add r6, r6, r0 +_02220D1A: + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #0x10 + blt _02220D06 + cmp r6, #0 + bne _02220D34 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + mov r0, #0 + add r5, #0x8d + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_02220D34: + mov r0, #1 + add r5, #0x8d + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02220CFC + + thumb_func_start ov12_02220D3C +ov12_02220D3C: ; 0x02220D3C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r4, r1, #2 + add r0, r0, r4 + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _02220D60 + bl sub_02022974 +_02220D60: + ldr r0, [r5, #0x18] + mov r2, #0 + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r5, #0] + bl ov12_022237F0 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r1, r1, r4 + str r0, [r1, #0x1c] + add r0, r5, #0 + mov r1, #2 + add r0, #0x8d + strb r1, [r0] + ldr r0, _02220D8C ; =ov12_0221FC20 + add r5, #0xbc + str r0, [r5, #0] + pop {r3, r4, r5, pc} + nop +_02220D8C: .word ov12_0221FC20 + thumb_func_end ov12_02220D3C + + thumb_func_start ov12_02220D90 +ov12_02220D90: ; 0x02220D90 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r4, r1, #2 + add r0, r0, r4 + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _02220DB6 + bl sub_02022974 +_02220DB6: + ldr r0, [r5, #0x18] + mov r1, #0x64 + ldr r2, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r5, #0] + mov r3, #0 + bl ov12_02223818 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r1, r1, r4 + str r0, [r1, #0x1c] + add r0, r5, #0 + mov r1, #2 + add r0, #0x8d + strb r1, [r0] + ldr r0, _02220DE4 ; =ov12_0221FC20 + add r5, #0xbc + str r0, [r5, #0] + pop {r3, r4, r5, pc} + nop +_02220DE4: .word ov12_0221FC20 + thumb_func_end ov12_02220D90 + + thumb_func_start ov12_02220DE8 +ov12_02220DE8: ; 0x02220DE8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r4, r1, #2 + add r0, r0, r4 + ldr r0, [r0, #0x1c] + bl ov12_02223894 + add r5, #0xc0 + ldr r0, [r5, #0] + mov r1, #0 + add r0, r0, r4 + str r1, [r0, #0x1c] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02220DE8 + + thumb_func_start ov12_02220E14 +ov12_02220E14: ; 0x02220E14 + ldr r1, [r0, #0x18] + mov r3, #0 + add r1, r1, #4 + str r1, [r0, #0x18] + add r2, r0, #0 +_02220E1E: + ldr r1, [r2, #0x1c] + cmp r1, #0 + bne _02220E3A + ldr r1, [r0, #0x18] + add r2, r1, #4 + lsl r1, r3, #2 + add r1, r0, r1 + str r2, [r1, #0x1c] + ldr r2, [r0, #0x18] + ldr r1, [r2, #0] + lsl r1, r1, #2 + add r1, r2, r1 + str r1, [r0, #0x18] + bx lr +_02220E3A: + add r3, r3, #1 + add r2, r2, #4 + cmp r3, #3 + blt _02220E1E + bx lr + thumb_func_end ov12_02220E14 + + thumb_func_start ov12_02220E44 +ov12_02220E44: ; 0x02220E44 + ldr r1, [r0, #0x18] + add r3, r0, #0 + add r1, r1, #4 + str r1, [r0, #0x18] + mov r2, #2 + add r3, #8 +_02220E50: + ldr r1, [r3, #0x1c] + cmp r1, #0 + beq _02220E66 + add r3, r0, #0 + add r3, #0x1c + lsl r2, r2, #2 + ldr r1, [r3, r2] + str r1, [r0, #0x18] + mov r0, #0 + str r0, [r3, r2] + bx lr +_02220E66: + sub r3, r3, #4 + sub r2, r2, #1 + bpl _02220E50 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220E44 + + thumb_func_start ov12_02220E70 +ov12_02220E70: ; 0x02220E70 + push {r3, r4} + ldr r2, [r0, #0x18] + add r1, r0, #0 + add r2, r2, #4 + str r2, [r0, #0x18] + ldr r4, [r2, #0] + add r2, r2, #4 + str r2, [r0, #0x18] + ldr r3, [r2, #0] + add r2, r2, #4 + str r2, [r0, #0x18] + lsl r2, r4, #2 + add r2, r0, r2 + add r2, #0x94 + ldr r2, [r2, #0] + add r1, #0x18 + cmp r3, r2 + bne _02220E9E + ldr r1, [r0, #0x18] + ldr r1, [r1, #0] + str r1, [r0, #0x18] + pop {r3, r4} + bx lr +_02220E9E: + ldr r0, [r1, #0] + add r0, r0, #4 + str r0, [r1, #0] + pop {r3, r4} + bx lr + thumb_func_end ov12_02220E70 + + thumb_func_start ov12_02220EA8 +ov12_02220EA8: ; 0x02220EA8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + bl ov12_02223178 + cmp r0, #0 + ldr r0, [r4, #0x18] + beq _02220EC8 + ldr r0, [r0, #0] + str r0, [r4, #0x18] + pop {r4, pc} +_02220EC8: + add r0, r0, #4 + str r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02220EA8 + + thumb_func_start ov12_02220ED0 +ov12_02220ED0: ; 0x02220ED0 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r1, r0, #4 + str r1, [r4, #0x18] + ldr r0, [r1, #0] + add r1, r1, #4 + str r1, [r4, #0x18] + bl ov12_02226998 + add r7, r0, #0 + ldr r0, [r4, #0x18] + add r2, r4, #0 + ldr r5, [r0, #0] + add r0, r0, #4 + add r2, #0x18 + mov r3, #0 + str r0, [r4, #0x18] + cmp r5, #0 + bls _02220F12 + add r6, r4, #0 +_02220EFA: + ldr r0, [r4, #0x18] + add r3, r3, #1 + ldr r1, [r0, #0] + add r0, r6, #0 + add r0, #0x94 + str r1, [r0, #0] + ldr r0, [r2, #0] + add r6, r6, #4 + add r0, r0, #4 + str r0, [r2, #0] + cmp r3, r5 + blo _02220EFA +_02220F12: + cmp r3, #0xa + bge _02220F2A + lsl r0, r3, #2 + add r2, r4, r0 + mov r1, #0 +_02220F1C: + add r0, r2, #0 + add r0, #0x94 + add r3, r3, #1 + add r2, r2, #4 + str r1, [r0, #0] + cmp r3, #0xa + blt _02220F1C +_02220F2A: + add r0, r4, #0 + blx r7 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02220ED0 + + thumb_func_start ov12_02220F30 +ov12_02220F30: ; 0x02220F30 + ldr r2, [r0, #0x18] + add r1, r0, #0 + add r2, r2, #4 + str r2, [r0, #0x18] + add r2, r0, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r1, #0x18 + ldrh r3, [r2, #0x10] + mov r2, #1 + tst r2, r3 + beq _02220F4E + ldr r2, [r1, #0] + add r2, r2, #4 + str r2, [r1, #0] +_02220F4E: + ldr r2, [r0, #0x18] + ldr r1, [r2, #0] + lsl r1, r1, #2 + add r1, r2, r1 + str r1, [r0, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02220F30 + + thumb_func_start ov12_02220F5C +ov12_02220F5C: ; 0x02220F5C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x18] + add r1, r1, #4 + str r1, [r4, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r4, #0x18] + cmp r2, #0 + bne _02220F7E + add r1, r4, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + ldrh r1, [r1, #0x14] + bl ov12_0223525C + b _02220F8A +_02220F7E: + add r1, r4, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + ldrh r1, [r1, #0x16] + bl ov12_0223525C +_02220F8A: + cmp r0, #4 + bne _02220F94 + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] +_02220F94: + ldr r1, [r4, #0x18] + ldr r0, [r1, #0] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov12_02220F5C + + thumb_func_start ov12_02220FA0 +ov12_02220FA0: ; 0x02220FA0 + push {r4, r5} + sub sp, #0x10 + ldr r5, _02220FF8 ; =0x022385A4 + add r2, sp, #0 + add r4, r0, #0 + add r3, r2, #0 + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldr r1, [r4, #0x18] + add r0, r4, #0 + add r1, r1, #4 + str r1, [r4, #0x18] + add r1, r4, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r0, #0x18 + ldr r1, [r1, #0xc] + cmp r1, #0 + beq _02220FE6 + ldr r2, [r0, #0] + add r2, r2, #4 + str r2, [r0, #0] + mov r2, #0 +_02220FD2: + ldr r5, [r3, #0] + tst r5, r1 + bne _02220FE6 + ldr r5, [r0, #0] + add r2, r2, #1 + add r5, r5, #4 + add r3, r3, #4 + str r5, [r0, #0] + cmp r2, #4 + blo _02220FD2 +_02220FE6: + ldr r1, [r4, #0x18] + ldr r0, [r1, #0] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [r4, #0x18] + add sp, #0x10 + pop {r4, r5} + bx lr + nop +_02220FF8: .word 0x022385A4 + thumb_func_end ov12_02220FA0 + + thumb_func_start ov12_02220FFC +ov12_02220FFC: ; 0x02220FFC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x18] + add r1, r1, #4 + str r1, [r4, #0x18] + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222101A + ldr r1, [r4, #0x18] + ldr r0, [r1, #0] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [r4, #0x18] + pop {r4, pc} +_0222101A: + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02220FFC + + thumb_func_start ov12_02221024 +ov12_02221024: ; 0x02221024 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r1, r1, #4 + str r1, [r5, #0x18] + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + ldrh r1, [r1, #0x14] + bl ov12_0223525C + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r4, r0, #0 + ldrh r1, [r1, #0x16] + add r0, r5, #0 + bl ov12_0223525C + cmp r4, r0 + bne _0222105A + ldr r1, [r5, #0x18] + ldr r0, [r1, #0] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [r5, #0x18] + pop {r3, r4, r5, pc} +_0222105A: + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02221024 + + thumb_func_start ov12_02221064 +ov12_02221064: ; 0x02221064 + ldr r2, [r0, #0x18] + add r1, r0, #0 + add r2, r2, #4 + str r2, [r0, #0x18] + ldr r3, [r2, #0] + add r2, r2, #4 + str r2, [r0, #0x18] + add r2, r0, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r1, #0x18 + ldrh r2, [r2, #0x10] + cmp r3, r2 + bne _0222108E + ldr r0, [r0, #0x18] + ldr r2, [r1, #0] + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r2, r0 + str r0, [r1, #0] + bx lr +_0222108E: + ldr r0, [r1, #0] + add r0, r0, #4 + str r0, [r1, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221064 + + thumb_func_start ov12_02221098 +ov12_02221098: ; 0x02221098 + ldr r1, [r0, #0x18] + add r2, r1, #4 + str r2, [r0, #0x18] + ldr r1, [r2, #0] + lsl r1, r1, #2 + add r1, r2, r1 + str r1, [r0, #0x18] + bx lr + thumb_func_end ov12_02221098 + + thumb_func_start ov12_022210A8 +ov12_022210A8: ; 0x022210A8 + push {r4, r5, r6, lr} + add r4, r0, #0 + cmp r1, #7 + bhi _02221186 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022210BC: ; jump table + .short _022210CC - _022210BC - 2 ; case 0 + .short _022210D4 - _022210BC - 2 ; case 1 + .short _022210DC - _022210BC - 2 ; case 2 + .short _022210EA - _022210BC - 2 ; case 3 + .short _022210F8 - _022210BC - 2 ; case 4 + .short _0222111E - _022210BC - 2 ; case 5 + .short _02221144 - _022210BC - 2 ; case 6 + .short _02221166 - _022210BC - 2 ; case 7 +_022210CC: + add r4, #0xc0 + ldr r0, [r4, #0] + ldrh r6, [r0, #0x14] + b _02221186 +_022210D4: + add r4, #0xc0 + ldr r0, [r4, #0] + ldrh r6, [r0, #0x16] + b _02221186 +_022210DC: + add r4, #0xc0 + ldr r1, [r4, #0] + ldrh r1, [r1, #0x14] + bl ov12_022352AC + add r6, r0, #0 + b _02221186 +_022210EA: + add r4, #0xc0 + ldr r1, [r4, #0] + ldrh r1, [r1, #0x16] + bl ov12_022352AC + add r6, r0, #0 + b _02221186 +_022210F8: + mov r6, #0xff + mov r5, #0 +_022210FC: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #0 + beq _0222110C + cmp r0, #2 + bne _02221110 +_0222110C: + add r6, r5, #0 + b _02221116 +_02221110: + add r5, r5, #1 + cmp r5, #4 + blt _022210FC +_02221116: + cmp r6, #0xff + bne _02221186 + mov r6, #0 + b _02221186 +_0222111E: + mov r6, #0xff + mov r5, #0 +_02221122: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #1 + beq _02221132 + cmp r0, #3 + bne _02221136 +_02221132: + add r6, r5, #0 + b _0222113C +_02221136: + add r5, r5, #1 + cmp r5, #4 + blt _02221122 +_0222113C: + cmp r6, #0xff + bne _02221186 + mov r6, #0 + b _02221186 +_02221144: + mov r6, #0xff + mov r5, #0 +_02221148: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #4 + bne _02221158 + add r6, r5, #0 + b _0222115E +_02221158: + add r5, r5, #1 + cmp r5, #4 + blt _02221148 +_0222115E: + cmp r6, #0xff + bne _02221186 + mov r6, #0 + b _02221186 +_02221166: + mov r6, #0xff + mov r5, #0 +_0222116A: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #5 + bne _0222117A + add r6, r5, #0 + b _02221180 +_0222117A: + add r5, r5, #1 + cmp r5, #4 + blt _0222116A +_02221180: + cmp r6, #0xff + bne _02221186 + mov r6, #0 +_02221186: + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_022210A8 + + thumb_func_start ov12_0222118C +ov12_0222118C: ; 0x0222118C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldrb r0, [r5, #5] + cmp r0, #0 + beq _022211A8 + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + ldrb r1, [r5, #4] + ldrb r0, [r5, #5] + cmp r1, r0 + bne _022211D6 + mov r0, #0 + strb r0, [r5, #4] +_022211A8: + ldr r0, [r5, #8] + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r5, #8] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + ldr r0, [r5, #8] + mov r1, #0x29 + bl sub_020080C0 + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_0200D4C4 +_022211D6: + pop {r4, r5, r6, pc} + thumb_func_end ov12_0222118C + + thumb_func_start ov12_022211D8 +ov12_022211D8: ; 0x022211D8 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldrb r0, [r5, #5] + cmp r0, #0 + beq _022211F4 + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + ldrb r1, [r5, #4] + ldrb r0, [r5, #5] + cmp r1, r0 + bne _02221236 + mov r0, #0 + strb r0, [r5, #4] +_022211F4: + ldr r0, [r5, #8] + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r5, #8] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + ldr r0, [r5, #8] + mov r1, #0x29 + bl sub_020080C0 + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + sub r6, #0x28 + ldr r0, [r5, #0] + mov r1, #2 + mov r2, #0 + neg r3, r6 + bl sub_02019184 + sub r4, #0x28 + ldr r0, [r5, #0] + mov r1, #2 + mov r2, #3 + neg r3, r4 + bl sub_02019184 +_02221236: + pop {r4, r5, r6, pc} + thumb_func_end ov12_022211D8 + + thumb_func_start ov12_02221238 +ov12_02221238: ; 0x02221238 + push {r3, r4, r5, lr} + add r4, r0, #0 + cmp r1, #4 + bne _02221264 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02221282 + ldr r0, [r0, #0xc] + bl sub_0200DA58 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x5e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r3, r4, r5, pc} +_02221264: + mov r0, #0x59 + lsl r0, r0, #2 + lsl r5, r1, #2 + add r4, r4, r0 + ldr r0, [r4, r5] + cmp r0, #0 + beq _02221282 + ldr r0, [r0, #0xc] + bl sub_0200DA58 + ldr r0, [r4, r5] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, r5] +_02221282: + pop {r3, r4, r5, pc} + thumb_func_end ov12_02221238 + + thumb_func_start ov12_02221284 +ov12_02221284: ; 0x02221284 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221284 + + thumb_func_start ov12_02221288 +ov12_02221288: ; 0x02221288 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221288 + + thumb_func_start ov12_0222128C +ov12_0222128C: ; 0x0222128C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r2, r1, #4 + str r2, [r5, #0x18] + ldr r1, [r2, #0] + add r2, r2, #4 + str r2, [r5, #0x18] + ldr r6, [r2, #0] + add r2, r2, #4 + str r2, [r5, #0x18] + bl ov12_022210A8 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r4, #2 + add r1, r0, r1 + add r1, #0xb0 + ldr r2, [r1, #0] + add r0, r0, r4 + ldr r1, [r2, #4] + add r0, #0xe8 + str r1, [sp, #0x14] + ldr r1, [r2, #8] + ldrb r7, [r0] + str r1, [sp, #0x10] + ldr r1, [r2, #0] + add r0, r5, #0 + str r1, [sp, #0x18] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022212EA + add r0, r5, #0 + add r1, r4, #0 + bl ov12_022232D0 + add r1, r7, #0 + bl ov12_022384F0 + cmp r0, #1 + bne _022212EA + ldr r7, _02221418 ; =0x00000109 + b _022212EE +_022212EA: + mov r7, #0x42 + lsl r7, r7, #2 +_022212EE: + mov r0, #2 + bl sub_02019F28 + mov r2, #0x19 + mov r1, #0 + lsl r2, r2, #8 + bl sub_020C4CF4 + mov r0, #2 + mov r1, #0 + bl sub_02019120 + mov r0, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xc4 + mov r3, #0x32 + ldr r0, [r0, #0] + ldr r2, [sp, #0x18] + mov r1, #2 + lsl r3, r3, #6 + bl sub_0201958C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x80 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + ldr r3, [r5, #0] + bl sub_02003050 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #0] + add r2, r5, #0 + str r0, [sp, #0xc] + mov r0, #0x69 + lsl r0, r0, #2 + add r2, #0xc4 + ldr r0, [r5, r0] + ldr r2, [r2, #0] + add r1, r7, #0 + mov r3, #2 + bl sub_0200710C + cmp r6, #1 + bne _0222139E + ldr r0, [r5, #0] + mov r1, #0x10 + bl sub_02018144 + mov r1, #0x5e + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r5, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + ldr r0, [r5, r1] + add r1, r4, #0 + str r2, [r0, #0] + add r0, r5, #0 + bl ov12_022232FC + mov r1, #0x5e + lsl r1, r1, #2 + ldr r2, [r5, r1] + str r0, [r2, #8] + ldr r0, [r5, r1] + mov r2, #0 + strb r2, [r0, #4] + ldr r0, [r5, r1] + strb r2, [r0, #5] + ldr r0, _0222141C ; =ov12_022211D8 + ldr r1, [r5, r1] + ldr r2, _02221420 ; =0x00001001 + bl sub_0200D9E8 + mov r1, #0x5e + lsl r1, r1, #2 + ldr r1, [r5, r1] + str r0, [r1, #0xc] +_0222139E: + add r0, r5, #0 + add r1, r4, #0 + bl ov12_022232FC + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_022232FC + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_022232FC + mov r1, #0x29 + bl sub_020080C0 + sub r0, r6, r0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + add r0, r5, #0 + add r0, #0xc4 + sub r7, #0x28 + ldr r0, [r0, #0] + mov r1, #2 + mov r2, #0 + neg r3, r7 + bl sub_02019184 + add r0, r5, #0 + add r0, #0xc4 + sub r6, #0x28 + ldr r0, [r0, #0] + mov r1, #2 + mov r2, #3 + neg r3, r6 + bl sub_02019184 + mov r0, #2 + mov r1, #1 + bl sub_02019120 + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + lsl r1, r1, #0x18 + mov r0, #2 + lsr r1, r1, #0x18 + bl sub_02019060 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02221418: .word 0x00000109 +_0222141C: .word ov12_022211D8 +_02221420: .word 0x00001001 + thumb_func_end ov12_0222128C + + thumb_func_start ov12_02221424 +ov12_02221424: ; 0x02221424 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r0, r0, #4 + add r0, r0, #4 + str r0, [r4, #0x18] + mov r0, #2 + bl sub_02019F28 + mov r2, #0x19 + mov r1, #0 + lsl r2, r2, #8 + bl sub_020C4CF4 + add r0, r4, #0 + mov r1, #4 + bl ov12_02221238 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02221424 + + thumb_func_start ov12_0222144C +ov12_0222144C: ; 0x0222144C + push {r4, lr} + sub sp, #0x18 + ldr r3, _022214C0 ; =0x022385E4 + add r2, sp, #0 + add r4, r0, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200C704 + mov r1, #0x4e + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + add r0, #0xac + ldr r0, [r0, #0] + mov r2, #5 + bl sub_0200C7C0 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200C738 + mov r2, #0x11 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r1, #0x4e + add r0, #0xac + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + add r2, sp, #0 + bl sub_0200CB30 + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 +_022214C0: .word 0x022385E4 + thumb_func_end ov12_0222144C + + thumb_func_start ov12_022214C4 +ov12_022214C4: ; 0x022214C4 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0x18] + ldr r1, _0222157C ; =0x00004E21 + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r2, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r4, r2, r1 + ldrh r3, [r0, #0x14] + lsr r2, r1, #2 + add r0, #0xac + mul r2, r3 + add r4, r4, r2 + mov r2, #0 + str r2, [sp] + mov r2, #1 + str r2, [sp, #4] + mov r2, #0x6a + str r4, [sp, #8] + lsr r1, r1, #6 + lsl r2, r2, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + ldr r2, [r5, r2] + mov r3, #0x4c + bl sub_0200CC3C + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r5, #0 + str r0, [sp] + mov r3, #0x4b + str r3, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + add r0, r5, #0 + str r4, [sp, #0x14] + add r2, #0xc0 + ldr r2, [r2, #0] + add r0, #0xc8 + add r2, #0xac + add r3, #0xed + ldr r0, [r0, #0] + ldr r2, [r2, #0] + ldr r3, [r5, r3] + mov r1, #2 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + add r0, r5, #0 + mov r2, #0x4e + str r4, [sp, #4] + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r2, r2, #2 + add r0, #0xac + ldr r1, [r5, r2] + add r2, #0x70 + ldr r0, [r0, #0] + ldr r2, [r5, r2] + mov r3, #0x4d + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + add r0, r5, #0 + mov r2, #0x4e + str r4, [sp, #4] + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r2, r2, #2 + add r0, #0xac + ldr r1, [r5, r2] + add r2, #0x70 + ldr r0, [r0, #0] + ldr r2, [r5, r2] + mov r3, #0x4e + bl sub_0200CE54 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222157C: .word 0x00004E21 + thumb_func_end ov12_022214C4 + + thumb_func_start ov12_02221580 +ov12_02221580: ; 0x02221580 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x78 + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r7, [r1, #0] + add r2, r1, #4 + str r2, [r5, #0x18] + ldr r1, [r2, #0] + add r2, r2, #4 + str r2, [r5, #0x18] + str r1, [sp, #0x10] + ldr r1, [r2, #0] + str r1, [sp, #0xc] + add r1, r2, #4 + str r1, [r5, #0x18] + ldr r3, [r1, #0] + add r1, r1, #4 + ldr r2, _022217A8 ; =0x00004E21 + str r1, [r5, #0x18] + add r1, r3, r2 + add r3, r5, #0 + add r3, #0xc0 + ldr r3, [r3, #0] + ldrh r6, [r3, #0x14] + lsr r3, r2, #2 + mul r3, r6 + add r3, r1, r3 + str r3, [sp, #0x60] + add r3, r5, #0 + add r3, #0xc0 + ldr r3, [r3, #0] + ldrh r6, [r3, #0x14] + lsr r3, r2, #2 + mul r3, r6 + add r3, r1, r3 + str r3, [sp, #0x64] + add r3, r5, #0 + add r3, #0xc0 + ldr r3, [r3, #0] + ldrh r6, [r3, #0x14] + lsr r3, r2, #2 + lsr r2, r2, #2 + mul r3, r6 + add r3, r1, r3 + str r3, [sp, #0x68] + add r3, r5, #0 + add r3, #0xc0 + ldr r3, [r3, #0] + ldrh r3, [r3, #0x14] + mul r2, r3 + add r1, r1, r2 + str r1, [sp, #0x6c] + mov r1, #0 + str r1, [sp, #0x70] + str r1, [sp, #0x74] + add r1, r7, #0 + bl ov12_022210A8 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r7, #2 + add r1, r0, r1 + add r1, #0xb0 + ldr r2, [r1, #0] + add r0, r0, r7 + ldr r1, [r2, #4] + add r0, #0xe8 + str r1, [sp, #0x20] + ldr r1, [r2, #8] + ldrb r0, [r0] + str r1, [sp, #0x1c] + ldr r1, [r2, #0] + str r0, [sp, #0x18] + str r1, [sp, #0x28] + add r0, r5, #0 + add r1, r7, #0 + bl ov12_022232FC + add r6, r0, #0 + beq _0222164E + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + add r0, r6, #0 + mov r1, #0x29 + bl sub_020080C0 + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_0222164E: + ldr r0, [sp, #0x14] + add r1, sp, #0x2c + strh r0, [r1] + strh r4, [r1, #2] + mov r0, #0 + strh r0, [r1, #4] + strh r0, [r1, #6] + mov r1, #0x64 + str r1, [sp, #0x34] + mov r1, #1 + str r0, [sp, #0x38] + str r1, [sp, #0x3c] + str r1, [sp, #0x58] + str r0, [sp, #0x5c] + add r2, sp, #0x60 + add r3, sp, #0x2c +_0222166E: + ldr r1, [r2, #0] + add r0, r0, #1 + str r1, [r3, #0x14] + add r2, r2, #4 + add r3, r3, #4 + cmp r0, #6 + blt _0222166E + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r1, #0x4e + add r0, #0xac + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + add r2, sp, #0x2c + bl sub_0200CE6C + str r0, [sp, #0x24] + cmp r6, #0 + bne _022216A0 + mov r1, #0 + bl sub_0200D3F4 + b _022216B4 +_022216A0: + add r0, r6, #0 + mov r1, #6 + bl sub_020080C0 + cmp r0, #1 + bne _022216B4 + ldr r0, [sp, #0x24] + mov r1, #0 + bl sub_0200D3F4 +_022216B4: + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _022216D8 + add r0, r5, #0 + add r1, r7, #0 + bl ov12_022232D0 + ldr r1, [sp, #0x18] + bl ov12_022384F0 + cmp r0, #1 + bne _022216D8 + ldr r0, [sp, #0x24] + mov r1, #1 + bl sub_0200D7D4 +_022216D8: + add r0, r5, #0 + add r1, r7, #0 + bl ov12_022232FC + cmp r0, #0 + beq _022216FC + ldr r0, [sp, #0x24] + ldr r0, [r0, #0] + bl sub_02021F98 + add r1, r0, #0 + mov r3, #0x32 + ldr r1, [r1, #4] + ldr r2, [sp, #0x28] + mov r0, #0x13 + lsl r3, r3, #6 + bl sub_0201DC68 +_022216FC: + add r0, r5, #0 + add r1, r7, #0 + bl ov12_022232FC + cmp r0, #0 + beq _02221734 + ldr r0, [sp, #0x24] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + mov r1, #2 + str r1, [sp] + mov r1, #0x20 + lsl r0, r0, #0x14 + str r1, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x1c] + ldr r3, [r5, #0] + bl sub_02003050 +_02221734: + ldr r0, [sp, #0xc] + lsl r4, r0, #2 + mov r0, #0x4f + lsl r0, r0, #2 + add r6, r5, r0 + ldr r0, [r6, r4] + cmp r0, #0 + beq _02221748 + bl sub_02022974 +_02221748: + ldr r0, [sp, #0x24] + mov r2, #1 + str r0, [r6, r4] + mov r0, #0x15 + add r1, r5, r4 + lsl r0, r0, #4 + str r2, [r1, r0] + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _022217A2 + add r0, r5, #0 + add r1, r7, #0 + bl ov12_022232FC + cmp r0, #0 + beq _022217A2 + mov r0, #0x59 + lsl r0, r0, #2 + add r6, r5, r0 + ldr r0, [r5, #0] + mov r1, #0x10 + bl sub_02018144 + str r0, [r6, r4] + ldr r1, [r6, r4] + ldr r0, [sp, #0x24] + str r0, [r1, #0] + add r0, r5, #0 + add r1, r7, #0 + bl ov12_022232FC + ldr r1, [r6, r4] + ldr r2, _022217AC ; =0x00001001 + str r0, [r1, #8] + ldr r0, [r6, r4] + mov r1, #0 + strb r1, [r0, #4] + ldr r0, [r6, r4] + strb r1, [r0, #5] + ldr r0, _022217B0 ; =ov12_0222118C + ldr r1, [r6, r4] + bl sub_0200D9E8 + ldr r1, [r6, r4] + str r0, [r1, #0xc] +_022217A2: + add sp, #0x78 + pop {r3, r4, r5, r6, r7, pc} + nop +_022217A8: .word 0x00004E21 +_022217AC: .word 0x00001001 +_022217B0: .word ov12_0222118C + thumb_func_end ov12_02221580 + + thumb_func_start ov12_022217B4 +ov12_022217B4: ; 0x022217B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] + mov r0, #0x4e + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _022217D6 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200D0B0 +_022217D6: + mov r0, #0x4e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} + thumb_func_end ov12_022217B4 + + thumb_func_start ov12_022217E0 +ov12_022217E0: ; 0x022217E0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + mov r0, #0x4f + lsl r0, r0, #2 + lsl r4, r1, #2 + add r6, r5, r0 + ldr r0, [r6, r4] + cmp r0, #0 + beq _02221802 + bl sub_0200D0F4 +_02221802: + mov r0, #0x15 + mov r2, #0 + add r1, r5, r4 + lsl r0, r0, #4 + str r2, [r1, r0] + str r2, [r6, r4] + pop {r4, r5, r6, pc} + thumb_func_end ov12_022217E0 + + thumb_func_start ov12_02221810 +ov12_02221810: ; 0x02221810 + push {r3, lr} + ldr r2, [r1, #0xc] + cmp r2, #0 + bne _0222181E + bl sub_0200DA58 + pop {r3, pc} +_0222181E: + mov r0, #0x4e + ldr r2, [r1, #0] + lsl r0, r0, #2 + ldr r0, [r2, r0] + cmp r0, #0 + beq _02221830 + ldr r0, [r1, #4] + bl sub_0200C7EC +_02221830: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02221810 + + thumb_func_start ov12_02221834 +ov12_02221834: ; 0x02221834 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r6, r5, #0 + add r1, r0, #4 + str r1, [r5, #0x18] + ldr r0, [r1, #0] + add r6, #0x54 + str r0, [sp] + add r0, r1, #4 + str r0, [r5, #0x18] + ldr r2, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + lsl r4, r2, #4 + str r0, [sp, #8] + add r0, #0x4c + lsl r1, r1, #2 + str r0, [sp, #8] + str r5, [r0, r4] + mov r0, #0x4e + lsl r0, r0, #2 + ldr r3, [r5, r0] + add r2, r5, r4 + str r3, [r2, #0x50] + add r1, r5, r1 + add r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0 + str r0, [r6, r4] + mov r0, #1 + str r0, [r2, #0x58] + ldr r0, [r6, r4] + bl sub_0200D3F4 + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + beq _02221890 + b _022219DE +_02221890: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_02235254 + str r0, [sp, #4] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_02235254 + add r7, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + bl ov12_022210A8 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022232FC + cmp r0, #0 + beq _022218CC + mov r1, #6 + bl sub_020080C0 + b _022218CE +_022218CC: + mov r0, #0 +_022218CE: + cmp r0, #1 + ldr r0, [r6, r4] + bne _022218DC + mov r1, #0 + bl sub_0200D3F4 + b _022218E2 +_022218DC: + mov r1, #1 + bl sub_0200D3F4 +_022218E2: + ldr r0, [sp] + cmp r0, #3 + bhi _022219D0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022218F4: ; jump table + .short _022218FC - _022218F4 - 2 ; case 0 + .short _0222194A - _022218F4 - 2 ; case 1 + .short _02221922 - _022218F4 - 2 ; case 2 + .short _0222198E - _022218F4 - 2 ; case 3 +_022218FC: + ldr r0, [sp, #4] + sub r0, r0, #3 + cmp r0, #1 + bhi _0222190E + ldr r0, [r6, r4] + mov r1, #1 + bl sub_0200D474 + b _022219D0 +_0222190E: + add r5, #0x54 + ldr r0, [r5, r4] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, r4] + mov r1, #0xff + bl sub_0200D474 + b _022219D0 +_02221922: + ldr r0, [sp, #4] + cmp r0, #5 + beq _0222192C + cmp r0, #2 + bne _02221936 +_0222192C: + ldr r0, [r6, r4] + mov r1, #1 + bl sub_0200D474 + b _022219D0 +_02221936: + add r5, #0x54 + ldr r0, [r5, r4] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, r4] + mov r1, #0xff + bl sub_0200D474 + b _022219D0 +_0222194A: + cmp r7, #5 + bhi _022219D0 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222195A: ; jump table + .short _022219D0 - _0222195A - 2 ; case 0 + .short _022219D0 - _0222195A - 2 ; case 1 + .short _02221966 - _0222195A - 2 ; case 2 + .short _02221970 - _0222195A - 2 ; case 3 + .short _0222197A - _0222195A - 2 ; case 4 + .short _02221984 - _0222195A - 2 ; case 5 +_02221966: + ldr r0, [r6, r4] + mov r1, #0xff + bl sub_0200D474 + b _022219D0 +_02221970: + ldr r0, [r6, r4] + mov r1, #1 + bl sub_0200D474 + b _022219D0 +_0222197A: + ldr r0, [r6, r4] + mov r1, #1 + bl sub_0200D474 + b _022219D0 +_02221984: + ldr r0, [r6, r4] + mov r1, #0xff + bl sub_0200D474 + b _022219D0 +_0222198E: + cmp r7, #5 + bhi _022219D0 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222199E: ; jump table + .short _022219D0 - _0222199E - 2 ; case 0 + .short _022219D0 - _0222199E - 2 ; case 1 + .short _022219AA - _0222199E - 2 ; case 2 + .short _022219B4 - _0222199E - 2 ; case 3 + .short _022219BE - _0222199E - 2 ; case 4 + .short _022219C8 - _0222199E - 2 ; case 5 +_022219AA: + ldr r0, [r6, r4] + mov r1, #1 + bl sub_0200D474 + b _022219D0 +_022219B4: + ldr r0, [r6, r4] + mov r1, #0xff + bl sub_0200D474 + b _022219D0 +_022219BE: + ldr r0, [r6, r4] + mov r1, #0xff + bl sub_0200D474 + b _022219D0 +_022219C8: + ldr r0, [r6, r4] + mov r1, #1 + bl sub_0200D474 +_022219D0: + ldr r1, [sp, #8] + mov r2, #1 + ldr r0, _022219E4 ; =ov12_02221810 + add r1, r1, r4 + lsl r2, r2, #0xc + bl sub_0200D9E8 +_022219DE: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022219E4: .word ov12_02221810 + thumb_func_end ov12_02221834 + + thumb_func_start ov12_022219E8 +ov12_022219E8: ; 0x022219E8 + ldr r1, [r0, #0x18] + mov r2, #0 + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + lsl r1, r3, #4 + add r0, r0, r1 + str r2, [r0, #0x58] + bx lr + ; .align 2, 0 + thumb_func_end ov12_022219E8 + + thumb_func_start ov12_02221A00 +ov12_02221A00: ; 0x02221A00 + ldr r1, [r0, #0x18] + ldr r3, _02221A10 ; =ov12_02221238 + add r2, r1, #4 + str r2, [r0, #0x18] + ldr r1, [r2, #0] + add r2, r2, #4 + str r2, [r0, #0x18] + bx r3 + ; .align 2, 0 +_02221A10: .word ov12_02221238 + thumb_func_end ov12_02221A00 + + thumb_func_start ov12_02221A14 +ov12_02221A14: ; 0x02221A14 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + add r0, r0, r3 + add r0, #0x6c + strb r2, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221A14 + + thumb_func_start ov12_02221A30 +ov12_02221A30: ; 0x02221A30 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + add r0, r0, r3 + add r0, #0x7c + strb r2, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221A30 + + thumb_func_start ov12_02221A4C +ov12_02221A4C: ; 0x02221A4C + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221A4C + + thumb_func_start ov12_02221A50 +ov12_02221A50: ; 0x02221A50 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02221A50 + + thumb_func_start ov12_02221A54 +ov12_02221A54: ; 0x02221A54 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r5, r0, #0 + ldrh r1, [r1, #0x14] + add r0, r4, #0 + add r6, r2, #0 + bl ov12_0223525C + add r7, r0, #0 + add r0, r4, #0 + add r4, #0xc0 + ldr r1, [r4, #0] + ldrh r1, [r1, #0x16] + bl ov12_0223525C + lsl r1, r6, #2 + add r1, r5, r1 + ldr r1, [r1, #0x1c] + cmp r1, #2 + bne _02221A98 + cmp r7, r0 + bne _02221A90 + cmp r0, #3 + beq _02221A8C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02221A8C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02221A90: + cmp r0, #3 + bne _02221AA4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02221A98: + cmp r1, #0 + beq _02221AA4 + cmp r0, #3 + bne _02221AA4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02221AA4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02221A54 + + thumb_func_start ov12_02221AA8 +ov12_02221AA8: ; 0x02221AA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r1, #0 + add r0, r3, #0 + mov r1, #0 + add r4, r2, #0 + str r3, [sp, #0x10] + bl ov12_022234E4 + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r2, r5, #0 + str r0, [sp, #0xc] + add r2, #0xc4 + ldr r2, [r2, #0] + mov r0, #7 + add r3, r4, #0 + bl sub_02006E3C + ldr r0, [sp, #0x10] + mov r1, #1 + bl ov12_022234E4 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x90 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + ldr r3, [r5, #0] + mov r1, #7 + bl sub_02003050 + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + bl sub_02019EBC + add r0, r5, #0 + mov r6, #2 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02221B1C + mov r6, #4 + b _02221B2C +_02221B1C: + add r0, r7, #0 + add r1, r5, #0 + mov r2, #7 + bl ov12_02221A54 + cmp r0, #1 + bne _02221B2C + mov r6, #3 +_02221B2C: + ldr r0, [sp, #0x10] + add r1, r6, #0 + bl ov12_022234E4 + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r5, #0xc4 + str r0, [sp, #0xc] + ldr r2, [r5, #0] + mov r0, #7 + add r3, r4, #0 + bl sub_02006E60 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_02221AA8 + + thumb_func_start ov12_02221B54 +ov12_02221B54: ; 0x02221B54 + lsl r0, r0, #0x10 + and r0, r1 + cmp r1, r0 + bne _02221B60 + mov r0, #1 + bx lr +_02221B60: + mov r0, #0 + bx lr + thumb_func_end ov12_02221B54 + + thumb_func_start ov12_02221B64 +ov12_02221B64: ; 0x02221B64 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r3, _02221BB4 ; =0x02238594 + add r2, sp, #0 + add r5, r0, #0 + add r4, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r7, _02221BB8 ; =0x02238644 + mov r6, #0 +_02221B7C: + ldr r0, [r5, #0x18] + ldr r1, [r4, #0] + bl ov12_02221B54 + cmp r0, #0 + beq _02221BA6 + ldr r0, [r4, #0] + mov r1, #0 + lsr r2, r0, #0x10 + cmp r2, #2 + blt _02221B9E +_02221B92: + lsr r0, r2, #0x1f + add r0, r2, r0 + asr r2, r0, #1 + add r1, r1, #1 + cmp r2, #2 + bge _02221B92 +_02221B9E: + lsl r1, r1, #2 + ldr r1, [r7, r1] + add r0, r5, #0 + blx r1 +_02221BA6: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blo _02221B7C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02221BB4: .word 0x02238594 +_02221BB8: .word 0x02238644 + thumb_func_end ov12_02221B64 + + thumb_func_start ov12_02221BBC +ov12_02221BBC: ; 0x02221BBC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x4c + bl sub_02018144 + add r4, r0, #0 + bne _02221BD4 + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, pc} +_02221BD4: + mov r1, #0 + mov r2, #0x4c + bl sub_020D5124 + mov r0, #0 + str r0, [r4, #0] + strb r0, [r4, #5] + str r5, [r4, #0x48] + strb r0, [r4, #9] + mov r0, #0x1f + strb r0, [r4, #0xa] + mov r0, #0x1d + strb r0, [r4, #0xb] + mov r0, #2 + strb r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + cmp r0, #1 + bne _02221C0E + mov r0, #0 + strb r0, [r4, #9] + mov r0, #0x1f + strb r0, [r4, #0xa] + mov r0, #0xf + strb r0, [r4, #0xb] + mov r0, #7 + strb r0, [r4, #0xc] +_02221C0E: + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + cmp r0, #2 + bne _02221C2A + mov r0, #7 + strb r0, [r4, #9] + mov r0, #0xf + strb r0, [r4, #0xa] + mov r0, #0x1d + strb r0, [r4, #0xb] + mov r0, #2 + strb r0, [r4, #0xc] +_02221C2A: + mov r1, #0 + add r2, r5, #0 + add r3, r4, #0 +_02221C30: + add r0, r2, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, r1, #1 + str r0, [r3, #0x1c] + add r2, r2, #4 + add r3, r3, #4 + cmp r1, #0xa + blt _02221C30 + mov r0, #0x5f + mov r1, #1 + lsl r0, r0, #2 + strb r1, [r5, r0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02221BBC + + thumb_func_start ov12_02221C50 +ov12_02221C50: ; 0x02221C50 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrb r0, [r5, #5] + cmp r0, #0 + beq _02221C64 + cmp r0, #1 + beq _02221CA2 + cmp r0, #2 + beq _02221CF4 + b _02221D3E +_02221C64: + ldr r0, [r5, #0x48] + mov r1, #2 + bl ov12_02222590 + ldr r0, [r5, #0x48] + mov r1, #2 + bl ov12_02223428 + add r4, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #1 + bl ov12_02223428 + lsl r1, r4, #0x18 + mov r0, #3 + lsr r1, r1, #0x18 + bl sub_02019060 + lsl r1, r4, #0x18 + mov r0, #2 + lsr r1, r1, #0x18 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019120 + ldrb r0, [r5, #5] + add r0, r0, #1 + strb r0, [r5, #5] + b _02221D42 +_02221CA2: + ldr r0, [r5, #0x48] + mov r1, #3 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r2, #2 + add r3, r1, #0 + bl sub_02018898 + ldr r0, [r5, #0x48] + bl ov12_0221FDD4 + cmp r0, #1 + beq _02221CCC + ldr r0, [r5, #0x48] + mov r2, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #3 + add r3, r2, #0 + bl sub_02018898 +_02221CCC: + ldr r1, [r5, #0x48] + ldr r3, [r5, #0x10] + add r0, r5, #0 + mov r2, #3 + bl ov12_02221AA8 + ldrb r0, [r5, #9] + mov r1, #4 + mov r2, #8 + str r0, [sp] + ldrb r3, [r5, #0xa] + ldr r0, _02221D48 ; =0x04000050 + bl sub_020BF55C + add r0, r5, #0 + bl ov12_02221B64 + ldrb r0, [r5, #5] + add r0, r0, #1 + strb r0, [r5, #5] +_02221CF4: + ldrb r1, [r5, #9] + ldrb r0, [r5, #0xb] + mov r2, #0 + cmp r1, r0 + bhs _02221D04 + add r0, r1, #2 + strb r0, [r5, #9] + b _02221D06 +_02221D04: + add r2, r2, #1 +_02221D06: + ldrb r1, [r5, #0xa] + ldrb r0, [r5, #0xc] + cmp r1, r0 + bls _02221D14 + sub r0, r1, #2 + strb r0, [r5, #0xa] + b _02221D16 +_02221D14: + add r2, r2, #1 +_02221D16: + cmp r2, #2 + bne _02221D28 + ldrb r0, [r5, #0xb] + strb r0, [r5, #9] + ldrb r0, [r5, #0xc] + strb r0, [r5, #0xa] + ldrb r0, [r5, #5] + add r0, r0, #1 + strb r0, [r5, #5] +_02221D28: + ldrb r0, [r5, #9] + ldrb r1, [r5, #0xa] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02221D4C ; =0x04000052 + strh r1, [r0] + ldrb r0, [r5, #5] + cmp r0, #2 + beq _02221D42 + mov r0, #0 + pop {r3, r4, r5, pc} +_02221D3E: + mov r0, #0 + pop {r3, r4, r5, pc} +_02221D42: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_02221D48: .word 0x04000050 +_02221D4C: .word 0x04000052 + thumb_func_end ov12_02221C50 + + thumb_func_start ov12_02221D50 +ov12_02221D50: ; 0x02221D50 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + ldrb r0, [r4, #5] + cmp r0, #4 + bls _02221D5E + b _02221F30 +_02221D5E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02221D6A: ; jump table + .short _02221D74 - _02221D6A - 2 ; case 0 + .short _02221D82 - _02221D6A - 2 ; case 1 + .short _02221DC4 - _02221D6A - 2 ; case 2 + .short _02221E0A - _02221D6A - 2 ; case 3 + .short _02221F0C - _02221D6A - 2 ; case 4 +_02221D74: + mov r0, #2 + mov r1, #1 + bl sub_02019120 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02221D82: + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov12_02223428 + add r5, r0, #0 + ldr r0, [r4, #0x48] + mov r1, #1 + bl ov12_02223428 + lsl r1, r5, #0x18 + mov r0, #3 + lsr r1, r1, #0x18 + bl sub_02019060 + lsl r1, r5, #0x18 + mov r0, #2 + lsr r1, r1, #0x18 + bl sub_02019060 + ldrb r0, [r4, #0xa] + mov r1, #4 + mov r2, #8 + str r0, [sp] + ldrb r3, [r4, #9] + ldr r0, _02221F3C ; =0x04000050 + bl sub_020BF55C + add r0, r4, #0 + bl ov12_02221B64 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02221DC4: + ldrb r1, [r4, #9] + ldrb r0, [r4, #0xb] + mov r2, #0 + cmp r1, r0 + bhs _02221DD4 + add r0, r1, #2 + strb r0, [r4, #9] + b _02221DD6 +_02221DD4: + add r2, r2, #1 +_02221DD6: + ldrb r1, [r4, #0xa] + ldrb r0, [r4, #0xc] + cmp r1, r0 + bls _02221DE4 + sub r0, r1, #2 + strb r0, [r4, #0xa] + b _02221DE6 +_02221DE4: + add r2, r2, #1 +_02221DE6: + cmp r2, #2 + bne _02221DFC + ldrb r0, [r4, #0xb] + add r0, r0, #2 + strb r0, [r4, #9] + ldrb r0, [r4, #0xc] + sub r0, r0, #2 + strb r0, [r4, #0xa] + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02221DFC: + ldrb r0, [r4, #0xa] + ldrb r1, [r4, #9] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02221F40 ; =0x04000052 + strh r1, [r0] + b _02221F36 +_02221E0A: + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _02221E1E + ldr r0, [r4, #0x48] + bl ov12_02222338 +_02221E1E: + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _02221E32 + ldr r0, [r4, #0x48] + bl ov12_02222338 +_02221E32: + ldr r0, [r4, #0x48] + mov r2, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + ldr r0, [r4, #0x48] + mov r1, #3 + add r0, #0xc4 + ldr r0, [r0, #0] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #0x48] + mov r1, #3 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r2, #2 + mov r3, #4 + bl sub_02018898 + ldr r0, [r4, #0x48] + bl ov12_0221FDD4 + cmp r0, #0 + bne _02221E8C + ldr r0, [r4, #0x48] + mov r1, #3 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r2, #0 + mov r3, #1 + bl sub_02018898 + ldr r0, [r4, #0x48] + mov r1, #3 + bl ov12_02223460 + ldr r0, [r4, #0x48] + bl ov12_02223488 + b _02221EE0 +_02221E8C: + ldr r2, [r4, #0x48] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r2, #0] + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [sp, #0xc] + ldr r0, [r2, r1] + add r1, r1, #4 + ldr r1, [r2, r1] + add r2, #0xc4 + ldr r2, [r2, #0] + mov r3, #3 + bl sub_02006E3C + mov r2, #0x66 + lsl r2, r2, #2 + add r1, r2, #0 + ldr r3, [r4, #0x48] + mov r0, #0 + str r0, [sp] + ldr r0, [r3, r2] + sub r1, #0x14 + lsl r0, r0, #5 + str r0, [sp, #4] + sub r0, r2, #4 + ldr r0, [r3, r0] + sub r2, #0xc + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r3, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + ldr r1, [r3, r1] + ldr r2, [r3, r2] + ldr r3, [r3, #0] + bl sub_02003050 +_02221EE0: + ldr r2, [r4, #0x48] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r2, #0] + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [sp, #0xc] + ldr r0, [r2, r1] + add r1, #0xc + ldr r1, [r2, r1] + add r2, #0xc4 + ldr r2, [r2, #0] + mov r3, #3 + bl sub_02006E60 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + b _02221F36 +_02221F0C: + ldr r0, [r4, #0x48] + bl ov12_0221FDD4 + cmp r0, #0 + bne _02221F1C + bl ov16_0223F9F0 + b _02221F20 +_02221F1C: + bl ov17_022413D8 +_02221F20: + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov12_02222664 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + b _02221F36 +_02221F30: + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, pc} +_02221F36: + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02221F3C: .word 0x04000050 +_02221F40: .word 0x04000052 + thumb_func_end ov12_02221D50 + + thumb_func_start ov12_02221F44 +ov12_02221F44: ; 0x02221F44 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + ldrb r0, [r4, #5] + cmp r0, #0 + beq _02221F56 + cmp r0, #1 + beq _02221FD2 + b _0222204E +_02221F56: + ldrb r0, [r4, #0xd] + ldr r2, [r4, #0x48] + cmp r0, #0 + bne _02221F94 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r5, #0x67 + add r0, r2, #0 + str r3, [sp, #8] + lsl r5, r5, #2 + ldr r2, [r2, r5] + add r0, #0xc8 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + mov r1, #1 + lsr r2, r2, #0x10 + bl sub_02003178 + mov r1, #0 + str r1, [sp] + ldr r0, [r4, #0x48] + add r2, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + add r2, #0x64 + mov r3, #0x10 + bl sub_02003A2C + b _02221FCC +_02221F94: + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _02222068 ; =0x0000FFFF + mov r5, #0x67 + str r0, [sp, #8] + add r0, r2, #0 + lsl r5, r5, #2 + ldr r2, [r2, r5] + add r0, #0xc8 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + mov r1, #1 + lsr r2, r2, #0x10 + bl sub_02003178 + ldr r0, _02222068 ; =0x0000FFFF + add r2, r5, #0 + str r0, [sp] + ldr r0, [r4, #0x48] + mov r1, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + add r2, #0x64 + mov r3, #0x10 + bl sub_02003A2C +_02221FCC: + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02221FD2: + ldr r0, [r4, #0x48] + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02222062 + ldr r0, [r4, #0x48] + mov r2, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #3 + add r3, r2, #0 + bl sub_02018898 + ldr r1, [r4, #0x48] + ldr r3, [r4, #0x10] + add r0, r4, #0 + mov r2, #3 + bl ov12_02221AA8 + ldrb r0, [r4, #0xd] + cmp r0, #0 + bne _0222201C + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + str r3, [sp, #8] + ldr r0, [r4, #0x48] + mov r1, #1 + add r0, #0xc8 + ldr r0, [r0, #0] + lsl r2, r1, #9 + bl sub_02003178 + b _02222036 +_0222201C: + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + ldr r0, _02222068 ; =0x0000FFFF + str r3, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0x48] + mov r1, #1 + add r0, #0xc8 + ldr r0, [r0, #0] + lsl r2, r1, #9 + bl sub_02003178 +_02222036: + add r0, r4, #0 + bl ov12_02221B64 + mov r0, #0x5f + ldr r1, [r4, #0x48] + mov r2, #2 + lsl r0, r0, #2 + strb r2, [r1, r0] + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + b _02222062 +_0222204E: + ldr r0, [r4, #0x48] + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02222062 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_02222062: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02222068: .word 0x0000FFFF + thumb_func_end ov12_02221F44 + + thumb_func_start ov12_0222206C +ov12_0222206C: ; 0x0222206C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + ldrb r0, [r4, #5] + cmp r0, #3 + bls _0222207A + b _02222276 +_0222207A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02222086: ; jump table + .short _0222208E - _02222086 - 2 ; case 0 + .short _0222209A - _02222086 - 2 ; case 1 + .short _02222114 - _02222086 - 2 ; case 2 + .short _02222204 - _02222086 - 2 ; case 3 +_0222208E: + add r0, r4, #0 + bl ov12_02221B64 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_0222209A: + ldrb r0, [r4, #0xd] + cmp r0, #0 + bne _022220D6 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r3, [sp, #8] + ldr r0, [r4, #0x48] + mov r1, #1 + add r0, #0xc8 + ldr r0, [r0, #0] + lsl r2, r1, #9 + bl sub_02003178 + ldr r3, [r4, #0x48] + mov r1, #0 + mov r2, #0x67 + add r0, r3, #0 + str r1, [sp] + lsl r2, r2, #2 + ldr r2, [r3, r2] + add r0, #0xc8 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + lsr r2, r2, #0x10 + mov r3, #0x10 + bl sub_02003A2C + b _0222210E +_022220D6: + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _022222A0 ; =0x0000FFFF + mov r1, #1 + str r0, [sp, #8] + ldr r0, [r4, #0x48] + lsl r2, r1, #9 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_02003178 + mov r2, #0x67 + ldr r3, [r4, #0x48] + ldr r0, _022222A0 ; =0x0000FFFF + lsl r2, r2, #2 + str r0, [sp] + add r0, r3, #0 + ldr r2, [r3, r2] + add r0, #0xc8 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + mov r1, #0 + lsr r2, r2, #0x10 + mov r3, #0x10 + bl sub_02003A2C +_0222210E: + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02222114: + ldr r0, [r4, #0x48] + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + beq _02222124 + b _0222229A +_02222124: + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _02222138 + ldr r0, [r4, #0x48] + bl ov12_02222338 +_02222138: + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0222214C + ldr r0, [r4, #0x48] + bl ov12_02222338 +_0222214C: + mov r0, #3 + mov r1, #0 + bl sub_02019120 + ldr r0, [r4, #0x48] + bl ov12_0221FDD4 + cmp r0, #0 + bne _0222217E + ldr r0, [r4, #0x48] + mov r1, #3 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r2, #0 + mov r3, #1 + bl sub_02018898 + ldr r0, [r4, #0x48] + mov r1, #3 + bl ov12_02223460 + ldr r0, [r4, #0x48] + bl ov12_02223488 + b _022221D2 +_0222217E: + ldr r2, [r4, #0x48] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r2, #0] + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [sp, #0xc] + ldr r0, [r2, r1] + add r1, r1, #4 + ldr r1, [r2, r1] + add r2, #0xc4 + ldr r2, [r2, #0] + mov r3, #3 + bl sub_02006E3C + mov r2, #0x66 + lsl r2, r2, #2 + add r1, r2, #0 + ldr r3, [r4, #0x48] + mov r0, #0 + str r0, [sp] + ldr r0, [r3, r2] + sub r1, #0x14 + lsl r0, r0, #5 + str r0, [sp, #4] + sub r0, r2, #4 + ldr r0, [r3, r0] + sub r2, #0xc + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r3, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + ldr r1, [r3, r1] + ldr r2, [r3, r2] + ldr r3, [r3, #0] + bl sub_02003050 +_022221D2: + ldr r2, [r4, #0x48] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r2, #0] + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [sp, #0xc] + ldr r0, [r2, r1] + add r1, #0xc + ldr r1, [r2, r1] + add r2, #0xc4 + ldr r2, [r2, #0] + mov r3, #3 + bl sub_02006E60 + mov r0, #3 + mov r1, #1 + bl sub_02019120 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02222204: + ldr r0, [r4, #0x48] + mov r2, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + ldr r0, [r4, #0x48] + mov r1, #3 + add r0, #0xc4 + ldr r0, [r0, #0] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldrb r0, [r4, #0xd] + ldr r2, [r4, #0x48] + cmp r0, #0 + bne _0222224E + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + mov r5, #0x67 + add r0, r2, #0 + str r3, [sp, #8] + lsl r5, r5, #2 + ldr r2, [r2, r5] + add r0, #0xc8 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + mov r1, #1 + lsr r2, r2, #0x10 + bl sub_02003178 + b _02222270 +_0222224E: + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + mov r5, #0x67 + ldr r0, _022222A0 ; =0x0000FFFF + str r3, [sp, #4] + str r0, [sp, #8] + add r0, r2, #0 + lsl r5, r5, #2 + ldr r2, [r2, r5] + add r0, #0xc8 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + mov r1, #1 + lsr r2, r2, #0x10 + bl sub_02003178 +_02222270: + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02222276: + ldr r0, [r4, #0x48] + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0222229A + mov r0, #0x5f + ldr r1, [r4, #0x48] + mov r2, #2 + lsl r0, r0, #2 + strb r2, [r1, r0] + ldrb r0, [r4, #5] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} +_0222229A: + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022222A0: .word 0x0000FFFF + thumb_func_end ov12_0222206C + + thumb_func_start ov12_022222A4 +ov12_022222A4: ; 0x022222A4 + push {r3, lr} + add r0, r1, #0 + bl ov12_02221B64 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov12_022222A4 + + thumb_func_start ov12_022222B0 +ov12_022222B0: ; 0x022222B0 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov12_02221B64 + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _022222CE + ldr r0, [r4, #0x48] + bl ov12_02222338 +_022222CE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022222B0 + + thumb_func_start ov12_022222D4 +ov12_022222D4: ; 0x022222D4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #1 + bne _022222EE + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} +_022222EE: + mov r3, #4 + mov r1, #8 + ldrsh r2, [r4, r3] + ldrsh r0, [r4, r1] + add r0, r2, r0 + strh r0, [r4, #4] + mov r0, #6 + ldrsh r2, [r4, r0] + mov r0, #0xa + ldrsh r0, [r4, r0] + add r0, r2, r0 + strh r0, [r4, #6] + ldrsh r0, [r4, r1] + cmp r0, #0 + beq _0222231C + ldr r1, [r4, #0xc] + ldrsh r3, [r4, r3] + lsl r1, r1, #0x18 + ldr r0, [r4, #0] + lsr r1, r1, #0x18 + mov r2, #0 + bl sub_02019184 +_0222231C: + mov r0, #0xa + ldrsh r0, [r4, r0] + cmp r0, #0 + beq _02222336 + ldr r1, [r4, #0xc] + mov r3, #6 + lsl r1, r1, #0x18 + ldrsh r3, [r4, r3] + ldr r0, [r4, #0] + lsr r1, r1, #0x18 + mov r2, #3 + bl sub_02019184 +_02222336: + pop {r3, r4, r5, pc} + thumb_func_end ov12_022222D4 + + thumb_func_start ov12_02222338 +ov12_02222338: ; 0x02222338 + push {r4, lr} + add r4, r0, #0 + bne _02222342 + bl sub_02022974 +_02222342: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + cmp r1, #0 + beq _02222350 + mov r0, #1 + str r0, [r1, #0x18] +_02222350: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02222338 + + thumb_func_start ov12_02222354 +ov12_02222354: ; 0x02222354 + mov r1, #0x67 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov12_02222354 + + thumb_func_start ov12_0222235C +ov12_0222235C: ; 0x0222235C + mov r0, #0 + bx lr + thumb_func_end ov12_0222235C + + thumb_func_start ov12_02222360 +ov12_02222360: ; 0x02222360 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #0x20 + ldr r0, [r0, #0] + bl sub_02018144 + add r4, r0, #0 + ldr r0, [r5, #0x48] + mov r2, #6 + add r0, #0xc4 + ldr r0, [r0, #0] + str r0, [r4, #0] + ldr r0, [r5, #0x48] + add r0, #0x9c + ldr r0, [r0, #0] + strh r0, [r4, #4] + ldr r0, [r5, #0x48] + add r0, #0xa0 + ldr r0, [r0, #0] + strh r0, [r4, #6] + ldr r0, [r5, #0x48] + add r0, #0x94 + ldr r0, [r0, #0] + strh r0, [r4, #8] + ldr r0, [r5, #0x48] + add r0, #0x98 + ldr r0, [r0, #0] + strh r0, [r4, #0xa] + mov r0, #3 + str r0, [r4, #0xc] + str r0, [r4, #0x10] + ldr r1, [r5, #0x48] + add r0, r5, #0 + bl ov12_02221A54 + cmp r0, #1 + bne _022223D4 + mov r0, #8 + ldrsh r1, [r4, r0] + sub r0, #9 + mul r0, r1 + strh r0, [r4, #8] + mov r0, #0xa + ldrsh r1, [r4, r0] + sub r0, #0xb + mul r0, r1 + strh r0, [r4, #0xa] + mov r0, #4 + ldrsh r1, [r4, r0] + sub r0, r0, #5 + mul r0, r1 + strh r0, [r4, #4] + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r0, #7 + mul r0, r1 + strh r0, [r4, #6] +_022223D4: + mov r0, #1 + str r0, [r4, #0x14] + mov r1, #0 + str r1, [r4, #0x18] + mov r1, #6 + ldr r2, [r5, #0x48] + lsl r1, r1, #6 + str r4, [r2, r1] + add r1, r5, #0 + add r1, #0x44 + ldrh r2, [r1] + mov r1, #1 + add r5, #0x44 + bic r2, r1 + orr r0, r2 + strh r0, [r5] + ldr r0, _02222404 ; =ov12_022222D4 + ldr r2, _02222408 ; =0x00001001 + add r1, r4, #0 + bl sub_0200D9E8 + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02222404: .word ov12_022222D4 +_02222408: .word 0x00001001 + thumb_func_end ov12_02222360 + + thumb_func_start ov12_0222240C +ov12_0222240C: ; 0x0222240C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r4, [r0, #0x48] + str r0, [sp] + ldr r0, [r4, #0] + mov r1, #0x20 + bl sub_02018144 + add r6, r0, #0 + ldr r0, [r4, #0] + mov r1, #0xc4 + bl sub_02018144 + str r0, [r6, #0x1c] + mov r0, #6 + lsl r0, r0, #6 + str r6, [r4, r0] + ldr r0, [sp] + mov r1, #2 + add r0, #0x44 + ldrh r0, [r0] + add r2, r0, #0 + ldr r0, [sp] + orr r2, r1 + add r0, #0x44 + strh r2, [r0] + mov r0, #0 + str r0, [r6, #0x18] + add r0, r4, #0 + bl ov12_022233EC + bl ov12_022266F0 + add r5, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl ov12_022266E8 + add r1, r0, #0 + ldr r2, [r4, #0] + add r0, r5, #0 + bl ov12_02226544 + mov r4, #0 + ldr r1, [r6, #0x1c] + ldr r7, _022224DC ; =0x02238660 + add r1, #0xc0 + str r0, [r1, #0] + str r4, [sp, #4] + add r5, r4, #0 +_02222470: + ldr r0, [r6, #0x1c] + strh r4, [r0, r5] + ldr r0, [r6, #0x1c] + add r1, r0, r5 + ldrsh r0, [r0, r5] + add r0, #8 + strh r0, [r1, #2] + mov r0, #0 + ldrsh r1, [r7, r0] + ldr r0, [r6, #0x1c] + add r0, r0, r5 + strh r1, [r0, #4] + ldr r0, [r6, #0x1c] + add r1, r0, r5 + mov r0, #0 + strh r0, [r1, #6] + add r1, r0, #0 + bl ov12_022266E8 + ldr r1, [r6, #0x1c] + mov r2, #6 + add r1, r1, r5 + str r0, [r1, #8] + ldr r0, [sp] + add r1, r0, #0 + ldr r1, [r1, #0x48] + bl ov12_02221A54 + cmp r0, #1 + bne _022224BA + ldr r0, [r6, #0x1c] + mov r1, #4 + add r0, r0, r5 + ldrsh r2, [r0, r1] + sub r1, r1, #5 + mul r1, r2 + strh r1, [r0, #4] +_022224BA: + ldr r0, [sp, #4] + add r4, #8 + add r0, r0, #1 + add r5, #0xc + add r7, r7, #2 + str r0, [sp, #4] + cmp r0, #0x10 + blt _02222470 + mov r2, #1 + ldr r0, _022224E0 ; =ov12_022224F8 + add r1, r6, #0 + lsl r2, r2, #0xc + bl sub_0200D9E8 + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022224DC: .word 0x02238660 +_022224E0: .word ov12_022224F8 + thumb_func_end ov12_0222240C + + thumb_func_start ov12_022224E4 +ov12_022224E4: ; 0x022224E4 + add r1, r0, #0 + add r1, #0x44 + ldrh r2, [r1] + mov r1, #2 + add r0, #0x44 + orr r1, r2 + strh r1, [r0] + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_022224E4 + + thumb_func_start ov12_022224F8 +ov12_022224F8: ; 0x022224F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x18] + ldr r4, [r5, #0x1c] + cmp r0, #1 + bne _02222526 + add r4, #0xc0 + ldr r0, [r4, #0] + bl ov12_022265C0 + ldr r0, [r5, #0x1c] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02222526: + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + bl ov12_022265E4 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] +_02222536: + mov r0, #6 + ldrsh r1, [r4, r0] + mov r0, #4 + ldrsh r0, [r4, r0] + add r0, r1, r0 + strh r0, [r4, #6] + mov r0, #0 + ldrsh r6, [r4, r0] + mov r0, #2 + ldrsh r0, [r4, r0] + cmp r6, r0 + bge _0222257E + ldr r0, [sp] + lsl r1, r6, #2 + add r5, r0, r1 + mov r7, #2 +_02222556: + ldr r1, [r4, #8] + mov r2, #6 + lsl r0, r1, #0x10 + asr r1, r1, #0x10 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + lsl r1, r1, #0x10 + ldrsh r2, [r4, r2] + asr r0, r0, #0x10 + lsr r1, r1, #0x10 + add r0, r0, r2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov12_022266E8 + stmia r5!, {r0} + ldrsh r0, [r4, r7] + add r6, r6, #1 + cmp r6, r0 + blt _02222556 +_0222257E: + ldr r0, [sp, #4] + add r4, #0xc + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #0x10 + blt _02222536 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022224F8 + + thumb_func_start ov12_02222590 +ov12_02222590: ; 0x02222590 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + bl ov12_02223428 + add r1, r0, #0 + lsl r0, r4, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + mov r1, #0 + bl sub_02019120 + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _022225D4 + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + mov r2, #2 + mov r3, #4 + bl sub_02018898 + b _022225F8 +_022225D4: + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + mov r2, #0 + mov r3, #1 + bl sub_02018898 + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + mov r2, #2 + mov r3, #4 + bl sub_02018898 +_022225F8: + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + bl sub_02019EBC + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02222636 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #0] + mov r1, #0x61 + add r2, r5, #0 + lsl r1, r1, #2 + str r0, [sp, #0xc] + ldr r0, [r5, r1] + add r1, r1, #4 + add r2, #0xc4 + ldr r1, [r5, r1] + ldr r2, [r2, #0] + add r3, r4, #0 + bl sub_02006E3C + b _0222263E +_02222636: + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02223460 +_0222263E: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #0] + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [sp, #0xc] + ldr r0, [r5, r1] + add r1, #0xc + ldr r1, [r5, r1] + add r5, #0xc4 + ldr r2, [r5, #0] + add r3, r4, #0 + bl sub_02006E60 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02222590 + + thumb_func_start ov12_02222664 +ov12_02222664: ; 0x02222664 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #1 + add r5, r0, #0 + bl ov12_02223428 + add r1, r0, #0 + lsl r0, r4, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222269C + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + mov r2, #2 + mov r3, #3 + bl sub_02018898 + b _022226C0 +_0222269C: + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + mov r2, #0 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02018898 + add r0, r5, #0 + add r0, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + mov r2, #2 + mov r3, #3 + bl sub_02018898 +_022226C0: + add r5, #0xc4 + lsl r1, r4, #0x18 + ldr r0, [r5, #0] + lsr r1, r1, #0x18 + bl sub_02019EBC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02222664 + + thumb_func_start ov12_022226D0 +ov12_022226D0: ; 0x022226D0 + add r1, r0, #0 + add r1, #0x44 + ldrh r2, [r1] + mov r1, #1 + add r0, #0x44 + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_022226D0 + + thumb_func_start ov12_022226E8 +ov12_022226E8: ; 0x022226E8 + push {r3, lr} + ldr r0, [r0, #0x48] + bl ov12_02222338 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov12_022226E8 + + thumb_func_start ov12_022226F4 +ov12_022226F4: ; 0x022226F4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0x14] + add r5, r0, #0 + lsl r3, r2, #2 + ldr r2, _02222720 ; =0x022385CC + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + bne _0222271E + mov r0, #0x5f + ldr r1, [r4, #0x48] + mov r2, #0 + lsl r0, r0, #2 + strb r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0222271E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02222720: .word 0x022385CC + thumb_func_end ov12_022226F4 + + thumb_func_start ov12_02222724 +ov12_02222724: ; 0x02222724 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02221BBC + add r4, r0, #0 + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strb r0, [r4, #0xd] + ldr r0, [r5, #0x18] + ldr r2, _02222768 ; =0x0000044C + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + str r0, [r4, #0x10] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + lsl r0, r1, #0x10 + lsr r0, r0, #0x10 + str r0, [r4, #0x14] + ldr r0, _0222276C ; =0xFFFF0000 + and r0, r1 + lsr r0, r0, #0x10 + str r0, [r4, #0x18] + ldr r0, _02222770 ; =ov12_022226F4 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02222768: .word 0x0000044C +_0222276C: .word 0xFFFF0000 +_02222770: .word ov12_022226F4 + thumb_func_end ov12_02222724 + + thumb_func_start ov12_02222774 +ov12_02222774: ; 0x02222774 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r2, r1, #4 + str r2, [r0, #0x18] + ldr r1, [r2, #0] + add r2, r2, #4 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + str r2, [r0, #0x18] + cmp r3, #3 + bhi _022227C8 + add r2, r3, r3 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0222279A: ; jump table + .short _022227A2 - _0222279A - 2 ; case 0 + .short _022227AC - _0222279A - 2 ; case 1 + .short _022227B6 - _0222279A - 2 ; case 2 + .short _022227C0 - _0222279A - 2 ; case 3 +_022227A2: + mov r2, #6 + lsl r2, r2, #6 + ldr r0, [r0, r2] + strh r1, [r0, #8] + bx lr +_022227AC: + mov r2, #6 + lsl r2, r2, #6 + ldr r0, [r0, r2] + strh r1, [r0, #0xa] + bx lr +_022227B6: + mov r2, #6 + lsl r2, r2, #6 + ldr r0, [r0, r2] + strh r1, [r0, #4] + bx lr +_022227C0: + mov r2, #6 + lsl r2, r2, #6 + ldr r0, [r0, r2] + strh r1, [r0, #4] +_022227C8: + bx lr + ; .align 2, 0 + thumb_func_end ov12_02222774 + + thumb_func_start ov12_022227CC +ov12_022227CC: ; 0x022227CC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02221BBC + add r4, r0, #0 + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strb r0, [r4, #0xd] + ldr r0, [r5, #0x18] + ldr r2, _02222814 ; =0x0000044C + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + str r0, [r4, #0x10] + ldr r0, [r5, #0x18] + add r1, r0, #4 + str r1, [r5, #0x18] + ldr r0, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + lsl r1, r0, #0x10 + lsr r1, r1, #0x10 + add r1, r1, #3 + str r1, [r4, #0x14] + ldr r1, _02222818 ; =0xFFFF0000 + and r0, r1 + lsr r0, r0, #0x10 + str r0, [r4, #0x18] + ldr r0, _0222281C ; =ov12_022226F4 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_02222814: .word 0x0000044C +_02222818: .word 0xFFFF0000 +_0222281C: .word ov12_022226F4 + thumb_func_end ov12_022227CC + + thumb_func_start ov12_02222820 +ov12_02222820: ; 0x02222820 + mov r1, #0x5f + lsl r1, r1, #2 + ldrb r1, [r0, r1] + cmp r1, #2 + bne _02222838 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + mov r1, #0 + add r0, #0x8d + strb r1, [r0] + bx lr +_02222838: + mov r1, #1 + add r0, #0x8d + strb r1, [r0] + bx lr + thumb_func_end ov12_02222820 + + thumb_func_start ov12_02222840 +ov12_02222840: ; 0x02222840 + mov r1, #0x5f + lsl r1, r1, #2 + ldrb r1, [r0, r1] + cmp r1, #0 + bne _02222858 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + mov r1, #0 + add r0, #0x8d + strb r1, [r0] + bx lr +_02222858: + mov r1, #1 + add r0, #0x8d + strb r1, [r0] + bx lr + thumb_func_end ov12_02222840 + + thumb_func_start ov12_02222860 +ov12_02222860: ; 0x02222860 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x18] + mov r1, #0 + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r4, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r4, #0 + bl ov12_022234E4 + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r2, r5, #0 + str r0, [sp, #0xc] + add r2, #0xc4 + ldr r2, [r2, #0] + mov r0, #7 + mov r3, #3 + bl sub_02006E3C + add r0, r4, #0 + mov r1, #1 + bl ov12_022234E4 + mov r2, #0 + str r2, [sp] + add r1, r0, #0 + ldr r0, [r5, #0] + add r3, r2, #0 + str r0, [sp, #4] + mov r0, #7 + bl sub_02006E84 + add r0, r4, #0 + mov r1, #2 + bl ov12_022234E4 + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r5, #0xc4 + str r0, [sp, #0xc] + ldr r2, [r5, #0] + mov r0, #7 + mov r3, #3 + bl sub_02006E60 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02222860 + + thumb_func_start ov12_022228DC +ov12_022228DC: ; 0x022228DC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov12_02221BBC + add r4, r0, #0 + ldr r0, [r5, #0x18] + add r1, r0, #4 + str r1, [r5, #0x18] + ldr r0, [r1, #0] + str r0, [sp] + add r0, r1, #4 + str r0, [r5, #0x18] + ldr r7, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r6, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222290E + str r6, [r4, #0x10] + b _02222926 +_0222290E: + add r0, r5, #0 + add r5, #0xc0 + ldr r1, [r5, #0] + ldrh r1, [r1, #0x16] + bl ov12_0223525C + cmp r0, #3 + bne _02222922 + str r7, [r4, #0x10] + b _02222926 +_02222922: + ldr r0, [sp] + str r0, [r4, #0x10] +_02222926: + ldr r0, _02222934 ; =ov12_022226F4 + ldr r2, _02222938 ; =0x0000044C + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02222934: .word ov12_022226F4 +_02222938: .word 0x0000044C + thumb_func_end ov12_022228DC + + thumb_func_start ov12_0222293C +ov12_0222293C: ; 0x0222293C + bx lr + ; .align 2, 0 + thumb_func_end ov12_0222293C + + thumb_func_start ov12_02222940 +ov12_02222940: ; 0x02222940 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02222940 + + thumb_func_start ov12_02222944 +ov12_02222944: ; 0x02222944 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02222944 + + thumb_func_start ov12_02222948 +ov12_02222948: ; 0x02222948 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02222948 + + thumb_func_start ov12_0222294C +ov12_0222294C: ; 0x0222294C + bx lr + ; .align 2, 0 + thumb_func_end ov12_0222294C + + thumb_func_start ov12_02222950 +ov12_02222950: ; 0x02222950 + ldr r1, [r0, #0x18] + ldr r3, _02222964 ; =sub_02005748 + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + lsl r0, r2, #0x10 + lsr r0, r0, #0x10 + bx r3 + ; .align 2, 0 +_02222964: .word sub_02005748 + thumb_func_end ov12_02222950 + + thumb_func_start ov12_02222968 +ov12_02222968: ; 0x02222968 + ldr r1, [r0, #0x18] + ldr r3, _02222980 ; =sub_020057A4 + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + lsl r0, r2, #0x10 + lsr r0, r0, #0x10 + mov r1, #0 + bx r3 + nop +_02222980: .word sub_020057A4 + thumb_func_end ov12_02222968 + + thumb_func_start ov12_02222984 +ov12_02222984: ; 0x02222984 + push {r3, r4, r5, lr} + ldr r1, [r0, #0x18] + add r2, r1, #4 + str r2, [r0, #0x18] + ldr r1, [r2, #0] + lsl r1, r1, #0x10 + lsr r4, r1, #0x10 + add r1, r2, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + lsl r1, r2, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + add r5, r0, #0 + add r0, r4, #0 + bl sub_02005748 + ldr r1, _022229B8 ; =0x0000FFFF + add r0, r4, #0 + add r2, r5, #0 + bl sub_020057FC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022229B8: .word 0x0000FFFF + thumb_func_end ov12_02222984 + + thumb_func_start ov12_022229BC +ov12_022229BC: ; 0x022229BC + push {r3, lr} + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + lsl r1, r2, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + bl sub_02005818 + pop {r3, pc} + thumb_func_end ov12_022229BC + + thumb_func_start ov12_022229D8 +ov12_022229D8: ; 0x022229D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02220314 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020D5124 + mov r0, #1 + strb r0, [r4] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strh r0, [r4, #0x1a] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + str r0, [r4, #8] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + str r0, [r4, #0xc] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + str r0, [r4, #0x10] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strb r0, [r4, #3] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r4, #8] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #8] + ldr r1, [r4, #0xc] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #0xc] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x10] + lsl r0, r0, #0x18 + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + asr r0, r0, #0x18 + asr r1, r1, #0x18 + asr r2, r2, #0x18 + bl ov12_02223234 + str r0, [r4, #0x10] + ldrh r0, [r4, #0x1a] + bl sub_02005748 + ldrh r0, [r4, #0x1a] + ldr r1, _02222A74 ; =0x0000FFFF + ldr r2, [r4, #8] + bl sub_020057FC + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02220344 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02222A74: .word 0x0000FFFF + thumb_func_end ov12_022229D8 + + thumb_func_start ov12_02222A78 +ov12_02222A78: ; 0x02222A78 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02220314 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020D5124 + mov r0, #2 + strb r0, [r4] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strh r0, [r4, #0x1a] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #8] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #0xc] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #0x10] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strb r0, [r4, #3] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldrh r0, [r4, #0x1a] + bl sub_02005748 + ldrh r0, [r4, #0x1a] + ldr r1, _02222AEC ; =0x0000FFFF + ldr r2, [r4, #8] + bl sub_020057FC + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02220344 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02222AEC: .word 0x0000FFFF + thumb_func_end ov12_02222A78 + + thumb_func_start ov12_02222AF0 +ov12_02222AF0: ; 0x02222AF0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02220314 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020D5124 + mov r0, #1 + strb r0, [r4] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strh r0, [r4, #0x1a] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #8] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #0xc] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #0x10] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strb r0, [r4, #3] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r4, #8] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #8] + ldr r1, [r4, #0xc] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #0x10] + ldrh r0, [r4, #0x1a] + bl sub_02005748 + ldrh r0, [r4, #0x1a] + ldr r1, _02222B90 ; =0x0000FFFF + ldr r2, [r4, #8] + bl sub_020057FC + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02220344 + pop {r3, r4, r5, pc} + nop +_02222B90: .word 0x0000FFFF + thumb_func_end ov12_02222AF0 + + thumb_func_start ov12_02222B94 +ov12_02222B94: ; 0x02222B94 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02220314 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020D5124 + mov r0, #4 + strb r0, [r4] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strh r0, [r4, #0x1a] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #0x14] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strb r0, [r4, #3] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strb r0, [r4, #0x18] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldrb r0, [r4, #3] + strb r0, [r4, #4] + ldr r1, [r4, #0x14] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #0x14] + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02220344 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02222B94 + + thumb_func_start ov12_02222BF8 +ov12_02222BF8: ; 0x02222BF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_02220314 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020D5124 + mov r0, #5 + strb r0, [r4] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strh r0, [r4, #0x1a] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [r4, #0x14] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r0, [r0, #0] + strb r0, [r4, #3] + ldr r0, [r5, #0x18] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r4, #0x14] + add r0, r5, #0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + str r0, [r4, #0x14] + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02220344 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02222BF8 + + thumb_func_start ov12_02222C50 +ov12_02222C50: ; 0x02222C50 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02222C50 + + thumb_func_start ov12_02222C54 +ov12_02222C54: ; 0x02222C54 + push {r4, lr} + add r4, r0, #0 + add r0, #0x90 + ldrh r0, [r0] + cmp r0, #0 + beq _02222C70 + add r0, r4, #0 + mov r1, #1 + add r0, #0x8d + strb r1, [r0] + ldr r0, _02222CA8 ; =0x0000017D + mov r1, #0 + strb r1, [r4, r0] + pop {r4, pc} +_02222C70: + bl sub_020057E0 + cmp r0, #0 + beq _02222C94 + ldr r0, _02222CA8 ; =0x0000017D + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r1, [r4, r0] + cmp r1, #0x5a + bls _02222C8C + mov r1, #0 + strb r1, [r4, r0] + pop {r4, pc} +_02222C8C: + mov r0, #1 + add r4, #0x8d + strb r0, [r4] + pop {r4, pc} +_02222C94: + add r0, r4, #0 + mov r1, #0 + add r0, #0x8d + strb r1, [r0] + ldr r0, _02222CA8 ; =0x0000017D + strb r1, [r4, r0] + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 +_02222CA8: .word 0x0000017D + thumb_func_end ov12_02222C54 + + thumb_func_start ov12_02222CAC +ov12_02222CAC: ; 0x02222CAC + push {r3, lr} + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + str r1, [r0, #0x18] + lsl r0, r2, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #0x10 + ldr r0, _02222CD8 ; =0x04001050 + mov r1, #1 + mov r2, #2 + lsr r3, r3, #0x10 + bl sub_020BF55C + pop {r3, pc} + nop +_02222CD8: .word 0x04001050 + thumb_func_end ov12_02222CAC + + thumb_func_start ov12_02222CDC +ov12_02222CDC: ; 0x02222CDC + ldr r3, _02222CE0 ; =ov12_02220474 + bx r3 + ; .align 2, 0 +_02222CE0: .word ov12_02220474 + thumb_func_end ov12_02222CDC + + thumb_func_start ov12_02222CE4 +ov12_02222CE4: ; 0x02222CE4 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02222CE4 + + thumb_func_start ov12_02222CE8 +ov12_02222CE8: ; 0x02222CE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r6, r5, #0 + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r5, #0x18] + ldr r7, [r0, #0] + add r0, r0, #4 + lsl r4, r1, #2 + add r6, #0xcc + str r0, [r5, #0x18] + ldr r0, [r6, r4] + cmp r0, #0 + beq _02222D10 + bl sub_02022974 +_02222D10: + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200C704 + str r0, [r6, r4] + ldr r0, [r6, r4] + cmp r0, #0 + bne _02222D2A + bl sub_02022974 +_02222D2A: + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r1, [r6, r4] + add r0, #0xac + ldr r0, [r0, #0] + add r2, r7, #0 + bl sub_0200C7C0 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200C738 + mov r2, #0x11 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C + add r0, r5, #0 + mov r1, #0 + add r2, sp, #0 + add r0, #0x18 +_02222D5C: + ldr r3, [r5, #0x18] + add r1, r1, #1 + ldr r3, [r3, #0] + str r3, [r2, #0] + ldr r3, [r0, #0] + add r2, r2, #4 + add r3, r3, #4 + str r3, [r0, #0] + cmp r1, #6 + blt _02222D5C + add r5, #0xc0 + ldr r0, [r5, #0] + ldr r1, [r6, r4] + add r0, #0xac + ldr r0, [r0, #0] + add r2, sp, #0 + bl sub_0200CB30 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02222CE8 + + thumb_func_start ov12_02222D84 +ov12_02222D84: ; 0x02222D84 + push {r3, r4, lr} + sub sp, #0xc + add r2, r0, #0 + ldr r0, [r2, #0x18] + mov r4, #0x6b + add r0, r0, #4 + str r0, [r2, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r2, #0x18] + ldr r3, [r0, #0] + add r0, r0, #4 + str r0, [r2, #0x18] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02222DC8 ; =0x00001388 + lsl r1, r1, #2 + add r0, r3, r0 + str r0, [sp, #8] + add r0, r2, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, r2, r1 + add r0, #0xac + add r1, #0xcc + lsl r4, r4, #2 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, r4] + bl sub_0200CC3C + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02222DC8: .word 0x00001388 + thumb_func_end ov12_02222D84 + + thumb_func_start ov12_02222DCC +ov12_02222DCC: ; 0x02222DCC + push {r4, lr} + sub sp, #0x18 + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r0, r0, #4 + str r0, [r4, #0x18] + ldr r3, [r0, #0] + add r0, r0, #4 + str r0, [r4, #0x18] + ldr r1, [r0, #0] + add r2, r0, #4 + str r2, [r4, #0x18] + ldr r0, [r2, #0] + add r2, r2, #4 + str r2, [r4, #0x18] + mov r2, #0x1b + lsl r2, r2, #4 + ldr r2, [r4, r2] + lsl r3, r3, #2 + str r2, [sp] + str r1, [sp, #4] + mov r2, #0 + str r2, [sp, #8] + mov r2, #1 + str r2, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02222E28 ; =0x00001388 + add r2, r4, #0 + add r0, r1, r0 + str r0, [sp, #0x14] + add r2, #0xc0 + ldr r2, [r2, #0] + add r0, r4, #0 + add r3, r4, r3 + add r0, #0xc8 + add r2, #0xac + add r3, #0xcc + ldr r0, [r0, #0] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + mov r1, #2 + bl sub_0200CDC4 + add sp, #0x18 + pop {r4, pc} + nop +_02222E28: .word 0x00001388 + thumb_func_end ov12_02222DCC + + thumb_func_start ov12_02222E2C +ov12_02222E2C: ; 0x02222E2C + push {r4, lr} + sub sp, #8 + add r2, r0, #0 + ldr r0, [r2, #0x18] + mov r4, #0x6d + add r0, r0, #4 + str r0, [r2, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r2, #0x18] + ldr r3, [r0, #0] + add r0, r0, #4 + str r0, [r2, #0x18] + mov r0, #1 + str r0, [sp] + ldr r0, _02222E70 ; =0x00001388 + lsl r1, r1, #2 + add r0, r3, r0 + str r0, [sp, #4] + add r0, r2, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, r2, r1 + add r0, #0xac + add r1, #0xcc + lsl r4, r4, #2 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, r4] + bl sub_0200CE24 + add sp, #8 + pop {r4, pc} + nop +_02222E70: .word 0x00001388 + thumb_func_end ov12_02222E2C + + thumb_func_start ov12_02222E74 +ov12_02222E74: ; 0x02222E74 + push {r4, lr} + sub sp, #8 + add r2, r0, #0 + ldr r0, [r2, #0x18] + mov r4, #0x6e + add r0, r0, #4 + str r0, [r2, #0x18] + ldr r1, [r0, #0] + add r0, r0, #4 + str r0, [r2, #0x18] + ldr r3, [r0, #0] + add r0, r0, #4 + str r0, [r2, #0x18] + mov r0, #1 + str r0, [sp] + ldr r0, _02222EB8 ; =0x00001388 + lsl r1, r1, #2 + add r0, r3, r0 + str r0, [sp, #4] + add r0, r2, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, r2, r1 + add r0, #0xac + add r1, #0xcc + lsl r4, r4, #2 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, r4] + bl sub_0200CE54 + add sp, #8 + pop {r4, pc} + nop +_02222EB8: .word 0x00001388 + thumb_func_end ov12_02222E74 + + thumb_func_start ov12_02222EBC +ov12_02222EBC: ; 0x02222EBC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r4, r0, #0 + ldr r1, [r4, #0x18] + add r1, r1, #4 + str r1, [r4, #0x18] + ldr r5, [r1, #0] + add r2, r1, #4 + str r2, [r4, #0x18] + ldr r1, [r2, #0] + str r1, [sp] + add r1, r2, #4 + str r1, [r4, #0x18] + bl ov12_02220248 + add r6, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #0 + bl ov12_022258E0 + add r1, sp, #0xc + strh r0, [r1] + add r0, r4, #0 + add r1, r6, #0 + mov r2, #1 + bl ov12_022258E0 + add r2, sp, #0xc + strh r0, [r2, #2] + mov r1, #0 + strh r1, [r2, #4] + strh r1, [r2, #6] + mov r0, #0x64 + str r0, [sp, #0x14] + mov r0, #1 + str r0, [sp, #0x1c] + str r0, [sp, #0x38] + add r0, r4, #0 + ldr r3, _02222FC4 ; =0x00001388 + str r1, [sp, #0x18] + str r1, [sp, #0x3c] + add r2, sp, #0xc + add r0, #0x18 +_02222F14: + ldr r6, [r4, #0x18] + add r1, r1, #1 + ldr r6, [r6, #0] + add r6, r6, r3 + str r6, [r2, #0x14] + ldr r6, [r0, #0] + add r2, r2, #4 + add r6, r6, #4 + str r6, [r0, #0] + cmp r1, #6 + blt _02222F14 + mov r0, #0x41 + lsl r0, r0, #2 + add r3, sp, #0xc + add r2, r4, r0 + mov r6, #6 +_02222F34: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _02222F34 + ldr r0, [r3, #0] + lsl r7, r5, #2 + str r0, [r2, #0] + add r0, r4, #0 + str r0, [sp, #8] + add r0, #0xcc + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r1, [sp, #8] + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r1, r7] + add r2, sp, #0xc + bl sub_0200CE6C + str r0, [sp, #4] + ldr r0, [r4, #0x18] + add r2, r4, #0 + ldr r3, [r0, #0] + add r0, r0, #4 + add r2, #0x18 + mov r6, #0 + str r0, [r4, #0x18] + cmp r3, #0 + ble _02222F8C + add r5, r4, #0 +_02222F74: + ldr r0, [r4, #0x18] + add r6, r6, #1 + ldr r1, [r0, #0] + add r0, r5, #0 + add r0, #0x94 + str r1, [r0, #0] + ldr r0, [r2, #0] + add r5, r5, #4 + add r0, r0, #4 + str r0, [r2, #0] + cmp r6, r3 + blt _02222F74 +_02222F8C: + cmp r6, #0xa + bge _02222FA4 + lsl r0, r6, #2 + add r2, r4, r0 + mov r1, #0 +_02222F96: + add r0, r2, #0 + add r0, #0x94 + add r6, r6, #1 + add r2, r2, #4 + str r1, [r0, #0] + cmp r6, #0xa + blt _02222F96 +_02222FA4: + ldr r0, [sp] + bl ov12_022269AC + add r5, r0, #0 + add r0, r4, #0 + add r4, #0xc0 + ldr r1, [r4, #0] + ldr r2, [sp, #8] + add r1, #0xac + ldr r1, [r1, #0] + ldr r2, [r2, r7] + ldr r3, [sp, #4] + blx r5 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_02222FC4: .word 0x00001388 + thumb_func_end ov12_02222EBC + + thumb_func_start ov12_02222FC8 +ov12_02222FC8: ; 0x02222FC8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r4, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r7, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + bl ov12_02220248 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov12_022258E0 + add r1, sp, #0 + strh r0, [r1] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + bl ov12_022258E0 + add r2, sp, #0 + strh r0, [r2, #2] + mov r1, #0 + strh r1, [r2, #4] + strh r1, [r2, #6] + mov r0, #0x64 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0x10] + str r0, [sp, #0x2c] + add r0, r5, #0 + ldr r3, _02223078 ; =0x00001388 + str r1, [sp, #0xc] + str r1, [sp, #0x30] + add r2, sp, #0 + add r0, #0x18 +_0222301E: + ldr r6, [r5, #0x18] + add r1, r1, #1 + ldr r6, [r6, #0] + add r6, r6, r3 + str r6, [r2, #0x14] + ldr r6, [r0, #0] + add r2, r2, #4 + add r6, r6, #4 + str r6, [r0, #0] + cmp r1, #6 + blt _0222301E + mov r0, #0x41 + lsl r0, r0, #2 + add r6, sp, #0 + add r3, r5, r0 + mov r2, #6 +_0222303E: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0222303E + ldr r0, [r6, #0] + lsl r1, r4, #2 + str r0, [r3, #0] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r1, r5, r1 + add r0, #0xac + add r1, #0xcc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, sp, #0 + bl sub_0200CE6C + add r5, #0xdc + lsl r4, r7, #2 + add r6, r0, #0 + ldr r0, [r5, r4] + cmp r0, #0 + beq _02223072 + bl sub_02022974 +_02223072: + str r6, [r5, r4] + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02223078: .word 0x00001388 + thumb_func_end ov12_02222FC8 + + thumb_func_start ov12_0222307C +ov12_0222307C: ; 0x0222307C + push {r3, r4, r5, lr} + ldr r1, [r0, #0x18] + add r5, r0, #0 + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r2, [r1, #0] + add r1, r1, #4 + add r5, #0xcc + lsl r4, r2, #2 + str r1, [r0, #0x18] + ldr r1, [r5, r4] + cmp r1, #0 + beq _022230A2 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200D0B0 +_022230A2: + mov r0, #0 + str r0, [r5, r4] + pop {r3, r4, r5, pc} + thumb_func_end ov12_0222307C + + thumb_func_start ov12_022230A8 +ov12_022230A8: ; 0x022230A8 + ldr r1, [r0, #0x18] + add r1, r1, #4 + str r1, [r0, #0x18] + ldr r3, [r1, #0] + add r2, r1, #4 + str r2, [r0, #0x18] + ldr r1, [r2, #0] + add r2, r2, #4 + str r2, [r0, #0x18] + lsl r2, r3, #2 + add r2, r0, r2 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r3, _022230C8 ; =sub_0200D3F4 + ldr r0, [r2, r0] + bx r3 + ; .align 2, 0 +_022230C8: .word sub_0200D3F4 + thumb_func_end ov12_022230A8 + + thumb_func_start ov12_022230CC +ov12_022230CC: ; 0x022230CC + ldr r3, _022230D0 ; =sub_02022974 + bx r3 + ; .align 2, 0 +_022230D0: .word sub_02022974 + thumb_func_end ov12_022230CC + + thumb_func_start ov12_022230D4 +ov12_022230D4: ; 0x022230D4 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r1, [r5, #0x18] + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r4, [r1, #0] + add r1, r1, #4 + str r1, [r5, #0x18] + ldr r1, [r1, #0] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + bl ov12_0222317C + ldr r1, [r5, #0x18] + add r2, r1, #4 + str r2, [r5, #0x18] + ldr r1, [r2, #0] + add r2, r2, #4 + str r2, [r5, #0x18] + add r2, r5, #0 + add r2, #0xc0 + ldr r6, [r2, #0] + ldrh r3, [r6, #0x14] + str r0, [sp] + lsl r2, r3, #1 + mov r0, #0x46 + add r2, r6, r2 + add r3, r6, r3 + lsl r0, r0, #2 + str r1, [sp, #4] + ldr r1, [r6, r0] + add r2, #0xd8 + str r1, [sp, #8] + ldr r1, [r5, #0] + add r3, #0xe8 + str r1, [sp, #0xc] + sub r0, #0xc + ldrh r2, [r2] + ldrb r3, [r3] + ldr r0, [r6, r0] + add r1, r4, #0 + bl sub_02077D3C + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov12_022230D4 + + thumb_func_start ov12_02223134 +ov12_02223134: ; 0x02223134 + push {r4, lr} + add r4, r0, #0 + bl sub_0200598C + cmp r0, #0 + bne _02223158 + ldr r0, [r4, #0x18] + add r1, r0, #4 + str r1, [r4, #0x18] + ldr r0, [r1, #0] + add r1, r1, #4 + str r1, [r4, #0x18] + mov r1, #0 + add r4, #0x8d + strb r1, [r4] + bl sub_0200592C + pop {r4, pc} +_02223158: + mov r0, #1 + add r4, #0x8d + strb r0, [r4] + pop {r4, pc} + thumb_func_end ov12_02223134 + + thumb_func_start ov12_02223160 +ov12_02223160: ; 0x02223160 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02223160 + + thumb_func_start ov12_02223164 +ov12_02223164: ; 0x02223164 + cmp r0, #0x55 + bls _0222316C + mov r0, #0 + bx lr +_0222316C: + lsl r1, r0, #2 + ldr r0, _02223174 ; =0x022387D4 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_02223174: .word 0x022387D4 + thumb_func_end ov12_02223164 + + thumb_func_start ov12_02223178 +ov12_02223178: ; 0x02223178 + ldrb r0, [r0, #1] + bx lr + thumb_func_end ov12_02223178 + + thumb_func_start ov12_0222317C +ov12_0222317C: ; 0x0222317C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02220240 + add r7, r0, #0 + add r0, r5, #0 + bl ov12_02220248 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + bl ov12_0223525C + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223525C + add r0, r5, #0 + add r1, r7, #0 + bl ov12_0223525C + cmp r0, #3 + bne _022231B8 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #4 + beq _0222321E +_022231B8: + add r0, r5, #0 + add r1, r7, #0 + bl ov12_0223525C + cmp r0, #4 + bne _022231D8 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #3 + bne _022231D8 + mov r0, #0 + mvn r0, r0 + mul r4, r0 + b _0222321E +_022231D8: + add r0, r5, #0 + add r1, r7, #0 + bl ov12_0223525C + cmp r0, #3 + bne _022231FC + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #3 + bne _022231FC + cmp r4, #0 + ble _0222321E + mov r0, #0 + mvn r0, r0 + mul r4, r0 + b _0222321E +_022231FC: + add r0, r5, #0 + add r1, r7, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222321E + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222321E + cmp r4, #0 + bge _0222321E + mov r0, #0 + mvn r0, r0 + mul r4, r0 +_0222321E: + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222322E + mov r0, #0 + mvn r0, r0 + mul r4, r0 +_0222322E: + lsl r0, r4, #0x18 + asr r0, r0, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_0222317C + + thumb_func_start ov12_02223234 +ov12_02223234: ; 0x02223234 + push {r3, lr} + cmp r0, r1 + bge _02223246 + add r0, r2, #0 + bl sub_020D4070 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + pop {r3, pc} +_02223246: + cmp r0, r1 + ble _02223258 + add r0, r2, #0 + bl sub_020D4070 + neg r0, r0 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + pop {r3, pc} +_02223258: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov12_02223234 + + thumb_func_start ov12_0222325C +ov12_0222325C: ; 0x0222325C + push {r3, r4, r5, lr} + ldr r4, [r0, #0x18] + add r3, r0, #0 + add r4, r4, #4 + str r4, [r0, #0x18] + ldr r5, [r4, #0] + add r4, r4, #4 + add r3, #0x18 + str r4, [r0, #0x18] + cmp r5, r2 + beq _0222327E + cmp r5, r2 + beq _0222327A + bl sub_02022974 +_0222327A: + mov r0, #0 + pop {r3, r4, r5, pc} +_0222327E: + mov r4, #0 + cmp r2, #0 + ble _02223298 +_02223284: + ldr r5, [r0, #0x18] + add r4, r4, #1 + ldr r5, [r5, #0] + str r5, [r1, #0] + ldr r5, [r3, #0] + add r1, r1, #4 + add r5, r5, #4 + str r5, [r3, #0] + cmp r4, r2 + blt _02223284 +_02223298: + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov12_0222325C + + thumb_func_start ov12_0222329C +ov12_0222329C: ; 0x0222329C + push {r3, r4} + add r4, r0, #0 + mov r0, #0x41 + lsl r0, r0, #2 + add r3, r1, r0 + mov r2, #6 +_022232A8: + ldmia r3!, {r0, r1} + stmia r4!, {r0, r1} + sub r2, r2, #1 + bne _022232A8 + ldr r0, [r3, #0] + str r0, [r4, #0] + pop {r3, r4} + bx lr + thumb_func_end ov12_0222329C + + thumb_func_start ov12_022232B8 +ov12_022232B8: ; 0x022232B8 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r1 + add r0, #0xc0 + ldrb r0, [r0] + bx lr + thumb_func_end ov12_022232B8 + + thumb_func_start ov12_022232C4 +ov12_022232C4: ; 0x022232C4 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r1 + add r0, #0xe0 + ldrb r0, [r0] + bx lr + thumb_func_end ov12_022232C4 + + thumb_func_start ov12_022232D0 +ov12_022232D0: ; 0x022232D0 + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #1 + add r0, r2, r0 + add r0, #0xd8 + ldrh r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_022232D0 + + thumb_func_start ov12_022232E0 +ov12_022232E0: ; 0x022232E0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r1 + add r0, #0xe8 + ldrb r0, [r0] + bx lr + thumb_func_end ov12_022232E0 + + thumb_func_start ov12_022232EC +ov12_022232EC: ; 0x022232EC + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + add r0, #0xec + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_022232EC + + thumb_func_start ov12_022232FC +ov12_022232FC: ; 0x022232FC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r4, r1, #2 + add r0, r0, r4 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02223314 + mov r0, #0 + pop {r3, r4, r5, pc} +_02223314: + bl sub_02008B38 + cmp r0, #0 + beq _02223328 + add r5, #0xc0 + ldr r0, [r5, #0] + add r0, r0, r4 + add r0, #0xc4 + ldr r0, [r0, #0] + pop {r3, r4, r5, pc} +_02223328: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_022232FC + + thumb_func_start ov12_0222332C +ov12_0222332C: ; 0x0222332C + add r0, #0xc8 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_0222332C + + thumb_func_start ov12_02223334 +ov12_02223334: ; 0x02223334 + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bx lr + thumb_func_end ov12_02223334 + + thumb_func_start ov12_02223344 +ov12_02223344: ; 0x02223344 + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bx lr + thumb_func_end ov12_02223344 + + thumb_func_start ov12_02223354 +ov12_02223354: ; 0x02223354 + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov12_02223354 + + thumb_func_start ov12_02223364 +ov12_02223364: ; 0x02223364 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, #0xd4 + ldr r1, [r0, #0] + mov r0, #2 + tst r0, r1 + beq _02223376 + mov r0, #1 + bx lr +_02223376: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_02223364 + + thumb_func_start ov12_0222337C +ov12_0222337C: ; 0x0222337C + add r0, #0xc0 + ldr r2, [r0, #0] + lsl r0, r1, #2 + add r0, r2, r0 + add r0, #0xfc + ldr r1, [r0, #0] + ldr r0, _02223398 ; =0x200400C0 + tst r0, r1 + beq _02223392 + mov r0, #1 + bx lr +_02223392: + mov r0, #0 + bx lr + nop +_02223398: .word 0x200400C0 + thumb_func_end ov12_0222337C + + thumb_func_start ov12_0222339C +ov12_0222339C: ; 0x0222339C + push {r3, lr} + bl ov12_0221FDD4 + cmp r0, #1 + bne _022233AA + mov r0, #2 + pop {r3, pc} +_022233AA: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_0222339C + + thumb_func_start ov12_022233B0 +ov12_022233B0: ; 0x022233B0 + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _022233E8 ; =0x02238614 + add r2, sp, #0 + add r5, r0, #0 + add r4, r1, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _022233DC + add r0, sp, #0xc + lsl r1, r4, #2 + add sp, #0x18 + ldr r0, [r0, r1] + pop {r3, r4, r5, pc} +_022233DC: + lsl r1, r4, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_022233E8: .word 0x02238614 + thumb_func_end ov12_022233B0 + + thumb_func_start ov12_022233EC +ov12_022233EC: ; 0x022233EC + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _02223424 ; =0x022385FC + add r2, sp, #0 + add r5, r0, #0 + add r4, r1, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02223418 + add r0, sp, #0xc + lsl r1, r4, #2 + add sp, #0x18 + ldr r0, [r0, r1] + pop {r3, r4, r5, pc} +_02223418: + lsl r1, r4, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_02223424: .word 0x022385FC + thumb_func_end ov12_022233EC + + thumb_func_start ov12_02223428 +ov12_02223428: ; 0x02223428 + push {r3, lr} + cmp r1, #3 + bhi _0222345E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222343A: ; jump table + .short _02223442 - _0222343A - 2 ; case 0 + .short _0222344A - _0222343A - 2 ; case 1 + .short _02223452 - _0222343A - 2 ; case 2 + .short _0222345A - _0222343A - 2 ; case 3 +_02223442: + bl ov12_0221FDD4 + mov r0, #0 + pop {r3, pc} +_0222344A: + bl ov12_0221FDD4 + mov r0, #1 + pop {r3, pc} +_02223452: + bl ov12_0221FDD4 + mov r0, #3 + pop {r3, pc} +_0222345A: + bl ov12_0222339C +_0222345E: + pop {r3, pc} + thumb_func_end ov12_02223428 + + thumb_func_start ov12_02223460 +ov12_02223460: ; 0x02223460 + push {r3, lr} + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + add r0, r2, #0 + add r2, #0xc0 + ldr r3, [r2, #0] + mov r2, #0x11 + add r0, #0xc4 + lsl r2, r2, #4 + lsl r1, r1, #0x18 + ldr r2, [r3, r2] + mov r3, #1 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + lsl r3, r3, #0x10 + bl sub_0201958C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02223460 + + thumb_func_start ov12_02223488 +ov12_02223488: ; 0x02223488 + push {r3, lr} + mov r2, #2 + add r1, r0, #0 + lsl r2, r2, #8 + str r2, [sp] + add r1, #0xc0 + add r0, #0xc8 + ldr r1, [r1, #0] + sub r2, #0xec + ldr r1, [r1, r2] + mov r2, #0 + ldr r0, [r0, #0] + add r3, r2, #0 + bl sub_02002FBC + pop {r3, pc} + thumb_func_end ov12_02223488 + + thumb_func_start ov12_022234A8 +ov12_022234A8: ; 0x022234A8 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl ov12_022210A8 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r0, r0, r4 + add r0, #0xe8 + ldrb r6, [r0] + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _022234DE + add r0, r5, #0 + add r1, r4, #0 + bl ov12_022232D0 + add r1, r6, #0 + bl ov12_022384F0 + cmp r0, #1 + bne _022234DE + mov r0, #1 + pop {r4, r5, r6, pc} +_022234DE: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_022234A8 + + thumb_func_start ov12_022234E4 +ov12_022234E4: ; 0x022234E4 + mov r2, #0x14 + mul r2, r0 + ldr r0, _022234F4 ; =0x02238928 + lsl r1, r1, #2 + add r0, r0, r2 + ldr r0, [r1, r0] + bx lr + nop +_022234F4: .word 0x02238928 + thumb_func_end ov12_022234E4 + + thumb_func_start ov12_022234F8 +ov12_022234F8: ; 0x022234F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x98 + ldr r3, _02223758 ; =0x022385B4 + add r5, r2, #0 + add r2, sp, #0x80 + add r7, r0, #0 + str r1, [sp, #0x18] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp, #0x18] + mov r1, #0x58 + bl sub_02018144 + add r4, r0, #0 + ldr r0, [sp, #0x18] + str r0, [r4, #0] + str r5, [r4, #4] + add r0, r7, #0 + bl ov16_0223E010 + str r0, [r4, #8] + add r0, r7, #0 + bl ov16_0223E018 + str r0, [r4, #0xc] + add r0, r7, #0 + bl ov16_0223E064 + str r0, [r4, #0x10] + mov r6, #0 + add r5, r4, #0 +_0222353E: + mov r0, #0 + str r0, [r5, #0x24] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0223F2AC + str r0, [r5, #0x34] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0222353E + add r1, r4, #0 + add r0, r7, #0 + add r1, #0x44 + bl ov16_0223F87C + add r1, r4, #0 + add r0, r7, #0 + add r1, #0x48 + bl ov16_0223F8AC + ldr r1, [sp, #0x18] + mov r0, #0x1b + bl sub_02006C24 + add r6, r0, #0 + mov r7, #0 + str r4, [sp, #0x1c] +_02223576: + ldr r0, [r4, #4] + cmp r7, r0 + beq _02223580 + cmp r0, #0xff + bne _022235EA +_02223580: + ldr r1, [sp, #0x1c] + ldr r1, [r1, #0x48] + cmp r1, #0 + beq _022235EA + ldr r1, _0222375C ; =0x0000D903 + mov r3, #0x4c + add r2, r7, r1 + ldr r1, _02223760 ; =0x00001388 + mul r1, r0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + add r5, r2, r1 + str r0, [sp, #4] + str r5, [sp, #8] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + add r2, r6, #0 + bl sub_0200CC3C + str r6, [sp] + mov r0, #0x4b + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r5, [sp, #0x14] + ldr r0, [r4, #0x10] + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + mov r1, #2 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + str r5, [sp, #4] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + add r2, r6, #0 + mov r3, #0x4d + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + str r5, [sp, #4] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + add r2, r6, #0 + mov r3, #0x4e + bl sub_0200CE54 +_022235EA: + ldr r0, [sp, #0x1c] + add r7, r7, #1 + add r0, r0, #4 + str r0, [sp, #0x1c] + cmp r7, #4 + blt _02223576 + add r0, r6, #0 + bl sub_02006CA8 + mov r0, #0 + str r0, [sp, #0x2c] + add r7, r4, #0 +_02223602: + ldr r1, [r4, #4] + ldr r0, [sp, #0x2c] + cmp r0, r1 + beq _02223610 + cmp r1, #0xff + beq _02223610 + b _02223744 +_02223610: + ldr r2, _0222375C ; =0x0000D903 + ldr r0, [sp, #0x2c] + add r3, r1, #0 + add r0, r0, r2 + ldr r2, _02223760 ; =0x00001388 + mul r3, r2 + add r1, r0, r3 + str r1, [r7, #0x14] + ldr r1, [r4, #4] + add r3, r1, #0 + mul r3, r2 + add r1, r0, r3 + str r1, [sp, #0x68] + ldr r1, [r4, #4] + add r3, r1, #0 + mul r3, r2 + add r1, r0, r3 + str r1, [sp, #0x6c] + ldr r1, [r4, #4] + add r3, r1, #0 + mul r3, r2 + add r1, r0, r3 + str r1, [sp, #0x70] + ldr r1, [r4, #4] + mul r2, r1 + mov r1, #0 + add r0, r0, r2 + str r0, [sp, #0x74] + str r1, [sp, #0x78] + str r1, [sp, #0x7c] + ldr r2, [r7, #0x34] + ldr r5, [r7, #0x48] + ldr r0, [r2, #4] + cmp r5, #0 + str r0, [sp, #0x28] + ldr r0, [r2, #8] + str r0, [sp, #0x24] + ldr r0, [r2, #0] + str r0, [sp, #0x20] + beq _02223744 + add r0, r5, #0 + bl sub_020080C0 + str r0, [sp, #0x30] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + add r0, r5, #0 + mov r1, #0x29 + bl sub_020080C0 + sub r2, r6, r0 + ldr r0, [sp, #0x30] + add r1, sp, #0x34 + strh r0, [r1] + strh r2, [r1, #2] + mov r0, #0 + strh r0, [r1, #4] + strh r0, [r1, #6] + ldr r1, [sp, #0x2c] + add r3, sp, #0x34 + add r1, r4, r1 + add r1, #0x44 + ldrb r1, [r1] + lsl r2, r1, #2 + add r1, sp, #0x80 + ldr r1, [r1, r2] + str r0, [sp, #0x40] + str r1, [sp, #0x3c] + mov r1, #1 + str r1, [sp, #0x44] + str r1, [sp, #0x60] + str r0, [sp, #0x64] + add r2, sp, #0x68 +_022236AA: + ldr r1, [r2, #0] + add r0, r0, #1 + str r1, [r3, #0x14] + add r2, r2, #4 + add r3, r3, #4 + cmp r0, #6 + blt _022236AA + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + add r2, sp, #0x34 + bl sub_0200CE6C + add r6, r0, #0 + bl sub_0200D330 + str r6, [r7, #0x24] + cmp r5, #0 + bne _022236D8 + add r0, r6, #0 + mov r1, #0 + bl sub_0200D3F4 + b _02223700 +_022236D8: + add r0, r5, #0 + bl sub_02008B38 + cmp r0, #0 + bne _022236EC + add r0, r6, #0 + mov r1, #0 + bl sub_0200D3F4 + b _02223700 +_022236EC: + add r0, r5, #0 + mov r1, #6 + bl sub_020080C0 + cmp r0, #1 + bne _02223700 + add r0, r6, #0 + mov r1, #0 + bl sub_0200D3F4 +_02223700: + cmp r5, #0 + beq _0222371A + ldr r0, [r6, #0] + bl sub_02021F98 + add r1, r0, #0 + mov r3, #0x32 + ldr r1, [r1, #4] + ldr r2, [sp, #0x20] + mov r0, #0x13 + lsl r3, r3, #6 + bl sub_0201DC68 +_0222371A: + cmp r5, #0 + beq _02223744 + ldr r0, [r6, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + mov r1, #2 + str r1, [sp] + mov r1, #0x20 + lsl r0, r0, #0x14 + str r1, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #0x10] + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x24] + ldr r3, [r4, #0] + bl sub_02003050 +_02223744: + ldr r0, [sp, #0x2c] + add r7, r7, #4 + add r0, r0, #1 + str r0, [sp, #0x2c] + cmp r0, #4 + bge _02223752 + b _02223602 +_02223752: + add r0, r4, #0 + add sp, #0x98 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02223758: .word 0x022385B4 +_0222375C: .word 0x0000D903 +_02223760: .word 0x00001388 + thumb_func_end ov12_022234F8 + + thumb_func_start ov12_02223764 +ov12_02223764: ; 0x02223764 + ldr r3, _0222376C ; =ov12_022234F8 + mov r2, #0xff + bx r3 + nop +_0222376C: .word ov12_022234F8 + thumb_func_end ov12_02223764 + + thumb_func_start ov12_02223770 +ov12_02223770: ; 0x02223770 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 +_02223778: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _02223794 + ldr r0, [r5, #0xc] + ldr r1, [r4, #0x14] + bl sub_0200D070 + ldr r0, [r5, #0xc] + ldr r1, [r4, #0x14] + bl sub_0200D080 + ldr r0, [r4, #0x24] + bl sub_0200D0F4 +_02223794: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _02223778 + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02223770 + + thumb_func_start ov12_022237A4 +ov12_022237A4: ; 0x022237A4 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 +_022237AC: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _022237C8 + ldr r0, [r5, #0xc] + ldr r1, [r4, #0x14] + bl sub_0200D070 + ldr r0, [r5, #0xc] + ldr r1, [r4, #0x14] + bl sub_0200D080 + ldr r0, [r4, #0x24] + bl sub_0200D0F4 +_022237C8: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _022237AC + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov12_022237A4 + + thumb_func_start ov12_022237D8 +ov12_022237D8: ; 0x022237D8 + push {r4, lr} + add r4, r0, #0 + bne _022237E2 + bl sub_02022974 +_022237E2: + ldr r0, [r4, #4] + add r0, r4, r0 + add r0, #0x44 + ldrb r0, [r0] + pop {r4, pc} + thumb_func_end ov12_022237D8 + + .rodata + + + .global Unk_ov12_02238594 +Unk_ov12_02238594: ; 0x02238594 + .incbin "incbin/overlay12_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov12_022385A4 +Unk_ov12_022385A4: ; 0x022385A4 + .incbin "incbin/overlay12_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov12_022385B4 +Unk_ov12_022385B4: ; 0x022385B4 + .incbin "incbin/overlay12_rodata.bin", 0x20, 0x38 - 0x20 + + .global Unk_ov12_022385CC +Unk_ov12_022385CC: ; 0x022385CC + .incbin "incbin/overlay12_rodata.bin", 0x38, 0x50 - 0x38 + + .global Unk_ov12_022385E4 +Unk_ov12_022385E4: ; 0x022385E4 + .incbin "incbin/overlay12_rodata.bin", 0x50, 0x68 - 0x50 + + .global Unk_ov12_022385FC +Unk_ov12_022385FC: ; 0x022385FC + .incbin "incbin/overlay12_rodata.bin", 0x68, 0x80 - 0x68 + + .global Unk_ov12_02238614 +Unk_ov12_02238614: ; 0x02238614 + .incbin "incbin/overlay12_rodata.bin", 0x80, 0x98 - 0x80 + + .global Unk_ov12_0223862C +Unk_ov12_0223862C: ; 0x0223862C + .incbin "incbin/overlay12_rodata.bin", 0x98, 0xB0 - 0x98 + + .global Unk_ov12_02238644 +Unk_ov12_02238644: ; 0x02238644 + .incbin "incbin/overlay12_rodata.bin", 0xB0, 0xCC - 0xB0 + + .global Unk_ov12_02238660 +Unk_ov12_02238660: ; 0x02238660 + .incbin "incbin/overlay12_rodata.bin", 0xCC, 0xEC - 0xCC + + .global Unk_ov12_02238680 +Unk_ov12_02238680: ; 0x02238680 + .incbin "incbin/overlay12_rodata.bin", 0xEC, 0x120 - 0xEC + + .global Unk_ov12_022386B4 +Unk_ov12_022386B4: ; 0x022386B4 + .incbin "incbin/overlay12_rodata.bin", 0x120, 0x1B0 - 0x120 + + .global Unk_ov12_02238744 +Unk_ov12_02238744: ; 0x02238744 + .incbin "incbin/overlay12_rodata.bin", 0x1B0, 0x240 - 0x1B0 + + .global Unk_ov12_022387D4 +Unk_ov12_022387D4: ; 0x022387D4 + .incbin "incbin/overlay12_rodata.bin", 0x240, 0x394 - 0x240 + + .global Unk_ov12_02238928 +Unk_ov12_02238928: ; 0x02238928 + .incbin "incbin/overlay12_rodata.bin", 0x394, 0x488 + diff --git a/asm/ov12_022237EC.s b/asm/ov12_022237EC.s new file mode 100644 index 000000000..7f70236df --- /dev/null +++ b/asm/ov12_022237EC.s @@ -0,0 +1,121 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_022237EC +ov12_022237EC: ; 0x022237EC + bx lr + ; .align 2, 0 + thumb_func_end ov12_022237EC + + thumb_func_start ov12_022237F0 +ov12_022237F0: ; 0x022237F0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + bl ov11_0221F840 + add r4, r0, #0 + mov r0, #0x1d + add r1, r6, #0 + add r2, r5, #0 + bl sub_020144C4 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0xa + add r3, r7, #0 + bl sub_020144CC + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022237F0 + + thumb_func_start ov12_02223818 +ov12_02223818: ; 0x02223818 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + bl ov11_0221F840 + add r4, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_020144C4 + add r1, r0, #0 + ldr r3, [sp] + add r0, r4, #0 + mov r2, #0xa + bl sub_020144CC + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02223818 + + thumb_func_start ov12_02223844 +ov12_02223844: ; 0x02223844 + ldr r3, _02223848 ; =sub_02006CB8 + bx r3 + ; .align 2, 0 +_02223848: .word sub_02006CB8 + thumb_func_end ov12_02223844 + + thumb_func_start ov12_0222384C +ov12_0222384C: ; 0x0222384C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r7, r2, #0 + str r3, [sp] + bl ov11_0221F888 + add r4, r0, #0 + bne _02223864 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02223864: + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov12_02223844 + add r1, r0, #0 + ldr r3, [sp] + add r0, r4, #0 + mov r2, #0xa + bl sub_020144CC + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_0222384C + + thumb_func_start ov12_02223880 +ov12_02223880: ; 0x02223880 + push {r4, lr} + lsl r4, r2, #2 + ldr r2, _02223890 ; =0x02238DB0 + ldr r2, [r2, r4] + bl sub_020146F4 + pop {r4, pc} + nop +_02223890: .word 0x02238DB0 + thumb_func_end ov12_02223880 + + thumb_func_start ov12_02223894 +ov12_02223894: ; 0x02223894 + ldr r3, _02223898 ; =ov11_0221F8D8 + bx r3 + ; .align 2, 0 +_02223898: .word ov11_0221F8D8 + thumb_func_end ov12_02223894 + + .rodata + + + .global Unk_ov12_02238DB0 +Unk_ov12_02238DB0: ; 0x02238DB0 + .incbin "incbin/overlay12_rodata.bin", 0x81C, 0x5C + diff --git a/asm/ov12_0222389C.s b/asm/ov12_0222389C.s new file mode 100644 index 000000000..8401f6af0 --- /dev/null +++ b/asm/ov12_0222389C.s @@ -0,0 +1,1311 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222389C +ov12_0222389C: ; 0x0222389C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r2, #0 + mov r4, #1 + bl ov12_02235254 + add r5, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov12_02235254 + cmp r5, #5 + bhi _022238D8 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022238C2: ; jump table + .short _022238D8 - _022238C2 - 2 ; case 0 + .short _022238CE - _022238C2 - 2 ; case 1 + .short _022238D8 - _022238C2 - 2 ; case 2 + .short _022238D2 - _022238C2 - 2 ; case 3 + .short _022238D8 - _022238C2 - 2 ; case 4 + .short _022238D6 - _022238C2 - 2 ; case 5 +_022238CE: + sub r4, r4, #2 + b _022238D8 +_022238D2: + sub r4, r4, #2 + b _022238D8 +_022238D6: + sub r4, r4, #2 +_022238D8: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_0222389C + + thumb_func_start ov12_022238DC +ov12_022238DC: ; 0x022238DC + bx lr + ; .align 2, 0 + thumb_func_end ov12_022238DC + + thumb_func_start ov12_022238E0 +ov12_022238E0: ; 0x022238E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + bl sub_02014764 + add r4, r0, #0 + bl ov12_02220240 + add r0, r4, #0 + bl ov12_02220248 + add r0, r4, #0 + bl ov12_02220250 + add r6, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov12_0223525C + cmp r0, #3 + bne _02223916 + add r0, r4, #0 + mov r1, #1 + add r2, sp, #0x28 + bl ov12_02235508 + b _0222394E +_02223916: + add r0, r4, #0 + mov r1, #1 + bl ov12_02235254 + str r0, [sp] + bl ov12_02235310 + str r0, [sp, #4] + add r0, r6, #0 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r4, r0, #0 + ldr r0, [sp, #4] + add r1, sp, #0x28 + add r2, r4, #0 + add r3, r7, #0 + bl ov12_02235448 + ldr r0, [sp] + add r1, sp, #0x1c + add r2, r4, #0 + add r3, r7, #0 + bl ov12_02235448 +_0222394E: + ldr r0, [r5, #0x20] + ldr r1, [sp, #0x28] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0x2c] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0x30] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + mov r0, #1 + add r1, sp, #0x10 + bl ov12_02235760 + add r0, r6, #0 + bl sub_02014784 + add r4, r0, #0 + add r0, sp, #8 + add r1, r4, #0 + bl sub_02020A94 + add r0, sp, #8 + add r1, r4, #0 + bl sub_020209D4 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022238E0 + + thumb_func_start ov12_02223998 +ov12_02223998: ; 0x02223998 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + bl sub_02014764 + add r4, r0, #0 + bl ov12_02220248 + add r6, r0, #0 + add r0, r4, #0 + bl ov12_02220250 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #0 + add r2, sp, #0xc + bl ov12_02235508 + ldr r0, [r5, #0x20] + ldr r1, [sp, #0xc] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0x10] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0x14] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add r0, r6, #0 + add r1, sp, #0 + bl ov12_02235760 + add r0, r7, #0 + add r1, sp, #0 + bl sub_02014744 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02223998 + + thumb_func_start ov12_022239F4 +ov12_022239F4: ; 0x022239F4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + bl sub_02014764 + add r5, r0, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + add r2, sp, #0 + bl ov12_02235508 + ldr r0, [r4, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r4, #0x30] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022239F4 + + thumb_func_start ov12_02223A38 +ov12_02223A38: ; 0x02223A38 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + bl sub_02014764 + add r5, r0, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + add r2, sp, #0 + bl ov12_02235508 + ldr r0, [r4, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r4, #0x30] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02223A38 + + thumb_func_start ov12_02223A7C +ov12_02223A7C: ; 0x02223A7C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02014764 + add r4, r0, #0 + bl ov12_02220240 + add r6, r0, #0 + add r0, r4, #0 + bl ov12_02220248 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0 + bl ov12_02235508 + ldr r0, [r5, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02223A7C + + thumb_func_start ov12_02223AC8 +ov12_02223AC8: ; 0x02223AC8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02014764 + add r6, r0, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_0223525C + cmp r0, #3 + beq _02223AF4 + mov r4, #1 + b _02223AF6 +_02223AF4: + mov r4, #0 +_02223AF6: + add r0, r6, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r4, #0 + add r1, sp, #0 + add r3, r7, #0 + bl ov12_02235448 + ldr r0, [r5, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_02223AC8 + + thumb_func_start ov12_02223B30 +ov12_02223B30: ; 0x02223B30 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02014764 + add r6, r0, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_0223525C + cmp r0, #3 + beq _02223B5C + mov r4, #1 + b _02223B5E +_02223B5C: + mov r4, #0 +_02223B5E: + add r0, r6, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r4, #0 + add r1, sp, #0 + add r3, r7, #0 + bl ov12_02235448 + ldr r0, [r5, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_02223B30 + + thumb_func_start ov12_02223B98 +ov12_02223B98: ; 0x02223B98 + push {r4, r5, r6, r7, lr} + sub sp, #0x9c + add r5, r0, #0 + add r1, sp, #0 + mov r0, #0 + strh r0, [r1] + strh r0, [r1, #2] + strh r0, [r1, #4] + strh r0, [r1, #6] + strh r0, [r1, #8] + strh r0, [r1, #0xa] + ldr r3, _02223C38 ; =0x02238E0C + add r2, sp, #0x54 + mov r1, #0x24 +_02223BB4: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _02223BB4 + ldr r3, _02223C3C ; =0x02238E54 + add r2, sp, #0xc + mov r1, #0x24 +_02223BC6: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _02223BC6 + bl sub_02014764 + add r4, r0, #0 + bl ov12_02220240 + add r6, r0, #0 + add r0, r4, #0 + bl ov12_02220248 + add r7, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov12_02235254 + add r6, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov12_02235254 + lsl r2, r0, #1 + mov r0, #0xc + add r1, r6, #0 + mul r1, r0 + add r0, sp, #0x54 + add r0, r0, r1 + ldrsh r4, [r2, r0] + mov r3, #0xac + add r0, r4, #0 + ldr r4, [r5, #0x20] + mul r0, r3 + ldr r4, [r4, #0] + ldr r4, [r4, #4] + add r0, r0, r4 + str r0, [r5, #0x28] + add r0, sp, #0xc + add r0, r0, r1 + ldrsh r0, [r2, r0] + add r1, r0, #0 + ldr r0, [r5, #0x20] + mul r1, r3 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + str r0, [r5, #0x30] + add sp, #0x9c + pop {r4, r5, r6, r7, pc} + nop +_02223C38: .word 0x02238E0C +_02223C3C: .word 0x02238E54 + thumb_func_end ov12_02223B98 + + thumb_func_start ov12_02223C40 +ov12_02223C40: ; 0x02223C40 + push {r3, r4} + add r3, r2, #0 + add r3, #8 + cmp r0, #7 + bhi _02223CD0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02223C56: ; jump table + .short _02223CD0 - _02223C56 - 2 ; case 0 + .short _02223C66 - _02223C56 - 2 ; case 1 + .short _02223C70 - _02223C56 - 2 ; case 2 + .short _02223C7A - _02223C56 - 2 ; case 3 + .short _02223C84 - _02223C56 - 2 ; case 4 + .short _02223C96 - _02223C56 - 2 ; case 5 + .short _02223CA8 - _02223C56 - 2 ; case 6 + .short _02223CBA - _02223C56 - 2 ; case 7 +_02223C66: + ldr r0, [r2, #0] + mul r1, r0 + str r1, [r2, #0] + pop {r3, r4} + bx lr +_02223C70: + ldr r0, [r2, #4] + mul r1, r0 + str r1, [r2, #4] + pop {r3, r4} + bx lr +_02223C7A: + ldr r0, [r3, #0] + mul r1, r0 + str r1, [r3, #0] + pop {r3, r4} + bx lr +_02223C84: + ldr r0, [r2, #0] + add r3, r0, #0 + mul r3, r1 + str r3, [r2, #0] + ldr r0, [r2, #4] + mul r1, r0 + str r1, [r2, #4] + pop {r3, r4} + bx lr +_02223C96: + ldr r0, [r2, #0] + add r4, r0, #0 + mul r4, r1 + str r4, [r2, #0] + ldr r0, [r3, #0] + mul r1, r0 + str r1, [r3, #0] + pop {r3, r4} + bx lr +_02223CA8: + ldr r0, [r2, #4] + add r4, r0, #0 + mul r4, r1 + str r4, [r2, #4] + ldr r0, [r3, #0] + mul r1, r0 + str r1, [r3, #0] + pop {r3, r4} + bx lr +_02223CBA: + ldr r0, [r2, #0] + add r4, r0, #0 + mul r4, r1 + str r4, [r2, #0] + ldr r0, [r2, #4] + add r4, r0, #0 + mul r4, r1 + str r4, [r2, #4] + ldr r0, [r3, #0] + mul r1, r0 + str r1, [r3, #0] +_02223CD0: + pop {r3, r4} + bx lr + thumb_func_end ov12_02223C40 + + thumb_func_start ov12_02223CD4 +ov12_02223CD4: ; 0x02223CD4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r2, #0 + add r5, r1, #0 + add r1, r3, #0 + add r7, sp, #0x10 + mov r2, #0 + str r2, [r7, #0] + ldr r3, [sp, #0x30] + str r2, [r7, #4] + ldr r4, [sp, #0x38] + str r2, [r7, #8] + cmp r3, #5 + bhi _02223D7E + add r3, r3, r3 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_02223CFC: ; jump table + .short _02223D7E - _02223CFC - 2 ; case 0 + .short _02223D08 - _02223CFC - 2 ; case 1 + .short _02223D2E - _02223CFC - 2 ; case 2 + .short _02223D42 - _02223CFC - 2 ; case 3 + .short _02223D4A - _02223CFC - 2 ; case 4 + .short _02223D54 - _02223CFC - 2 ; case 5 +_02223D08: + add r0, r5, #0 + add r1, r7, #0 + bl sub_02014988 + add r1, sp, #0x20 + mov r0, #0x14 + ldrsb r0, [r1, r0] + ldr r1, [sp, #0x10] + add r2, r1, #0 + mul r2, r0 + ldr r1, [sp, #0x14] + str r2, [sp, #0x10] + add r2, r1, #0 + mul r2, r0 + ldr r1, [sp, #0x18] + str r2, [sp, #0x14] + mul r0, r1 + str r0, [sp, #0x18] + b _02223D7E +_02223D2E: + str r2, [sp, #0x10] + add r1, sp, #0x20 + mov r0, #0x14 + ldrsb r1, [r1, r0] + mov r0, #0x32 + lsl r0, r0, #6 + mul r0, r1 + str r0, [sp, #0x14] + str r2, [sp, #0x18] + b _02223D7E +_02223D42: + add r2, r7, #0 + bl ov12_02235508 + b _02223D7E +_02223D4A: + add r1, r6, #0 + add r2, r7, #0 + bl ov12_02235508 + b _02223D7E +_02223D54: + add r1, sp, #0 + str r2, [r1, #0] + str r2, [r1, #4] + str r2, [r1, #8] + str r2, [r1, #0xc] + mov r2, #4 + bl ov12_0222325C + ldr r0, [sp] + add r2, sp, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + mov r1, #0x14 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + str r0, [sp, #0x18] + ldrsb r1, [r2, r1] + ldr r0, [sp, #0xc] + add r2, r7, #0 + bl ov12_02223C40 +_02223D7E: + ldr r1, [sp, #0x10] + ldr r0, [r4, #0] + sub r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [r4, #4] + sub r0, r1, r0 + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [r4, #8] + sub r0, r1, r0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #0x10 + bl sub_02014970 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02223CD4 + + thumb_func_start ov12_02223DA4 +ov12_02223DA4: ; 0x02223DA4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r2, #0 + add r5, r1, #0 + add r1, r3, #0 + add r7, sp, #0x10 + mov r2, #0 + str r2, [r7, #0] + ldr r3, [sp, #0x30] + str r2, [r7, #4] + ldr r4, [sp, #0x38] + str r2, [r7, #8] + cmp r3, #5 + bhi _02223E4E + add r3, r3, r3 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_02223DCC: ; jump table + .short _02223E4E - _02223DCC - 2 ; case 0 + .short _02223DD8 - _02223DCC - 2 ; case 1 + .short _02223DFE - _02223DCC - 2 ; case 2 + .short _02223E12 - _02223DCC - 2 ; case 3 + .short _02223E1A - _02223DCC - 2 ; case 4 + .short _02223E24 - _02223DCC - 2 ; case 5 +_02223DD8: + add r0, r5, #0 + add r1, r7, #0 + bl sub_020148A8 + add r1, sp, #0x20 + mov r0, #0x14 + ldrsb r0, [r1, r0] + ldr r1, [sp, #0x10] + add r2, r1, #0 + mul r2, r0 + ldr r1, [sp, #0x14] + str r2, [sp, #0x10] + add r2, r1, #0 + mul r2, r0 + ldr r1, [sp, #0x18] + str r2, [sp, #0x14] + mul r0, r1 + str r0, [sp, #0x18] + b _02223E4E +_02223DFE: + str r2, [sp, #0x10] + add r1, sp, #0x20 + mov r0, #0x14 + ldrsb r1, [r1, r0] + mov r0, #0x32 + lsl r0, r0, #6 + mul r0, r1 + str r0, [sp, #0x14] + str r2, [sp, #0x18] + b _02223E4E +_02223E12: + add r2, r7, #0 + bl ov12_02235508 + b _02223E4E +_02223E1A: + add r1, r6, #0 + add r2, r7, #0 + bl ov12_02235508 + b _02223E4E +_02223E24: + add r1, sp, #0 + str r2, [r1, #0] + str r2, [r1, #4] + str r2, [r1, #8] + str r2, [r1, #0xc] + mov r2, #4 + bl ov12_0222325C + ldr r0, [sp] + add r2, sp, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + mov r1, #0x14 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + str r0, [sp, #0x18] + ldrsb r1, [r2, r1] + ldr r0, [sp, #0xc] + add r2, r7, #0 + bl ov12_02223C40 +_02223E4E: + ldr r1, [sp, #0x10] + ldr r0, [r4, #0] + sub r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [r4, #4] + sub r0, r1, r0 + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [r4, #8] + sub r0, r1, r0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #0x10 + bl sub_02014890 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02223DA4 + + thumb_func_start ov12_02223E74 +ov12_02223E74: ; 0x02223E74 + push {r4, r5, r6, r7, lr} + sub sp, #0x94 + add r6, r0, #0 + add r7, r2, #0 + add r4, r1, #0 + str r3, [sp, #0xc] + bl ov12_02220250 + add r0, r6, #0 + add r1, r7, #0 + bl ov12_02235254 + str r0, [sp, #0x10] + ldr r1, [sp, #0xc] + add r0, r6, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r6, #0 + add r1, sp, #0x7c + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, sp, #0x70 + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, sp, #0x58 + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, sp, #0x64 + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, sp, #0x40 + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, sp, #0x34 + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, sp, #0x4c + mov r2, #3 + bl ov12_0222325C + ldr r0, [sp, #0x10] + cmp r0, #5 + bhi _02223EFC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02223EF0: ; jump table + .short _02223EFC - _02223EF0 - 2 ; case 0 + .short _02223F0C - _02223EF0 - 2 ; case 1 + .short _02223F22 - _02223EF0 - 2 ; case 2 + .short _02223F56 - _02223EF0 - 2 ; case 3 + .short _02223FA0 - _02223EF0 - 2 ; case 4 + .short _02223FD4 - _02223EF0 - 2 ; case 5 +_02223EFC: + ldr r1, [sp, #0x7c] + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x80] + strh r1, [r0, #2] + ldr r1, [sp, #0x84] + strh r1, [r0, #4] + b _0222401C +_02223F0C: + ldr r0, [sp, #0x7c] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x80] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x84] + neg r1, r1 + strh r1, [r0, #4] + b _0222401C +_02223F22: + cmp r5, #3 + add r0, sp, #0x14 + bne _02223F36 + ldr r1, [sp, #0x70] + strh r1, [r0] + ldr r1, [sp, #0x74] + strh r1, [r0, #2] + ldr r1, [sp, #0x78] + strh r1, [r0, #4] + b _0222401C +_02223F36: + cmp r5, #5 + bne _02223F48 + ldr r1, [sp, #0x58] + strh r1, [r0] + ldr r1, [sp, #0x5c] + strh r1, [r0, #2] + ldr r1, [sp, #0x60] + strh r1, [r0, #4] + b _0222401C +_02223F48: + ldr r1, [sp, #0x64] + strh r1, [r0] + ldr r1, [sp, #0x68] + strh r1, [r0, #2] + ldr r1, [sp, #0x6c] + strh r1, [r0, #4] + b _0222401C +_02223F56: + cmp r5, #2 + bne _02223F70 + ldr r0, [sp, #0x70] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x74] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x78] + neg r1, r1 + strh r1, [r0, #4] + b _0222401C +_02223F70: + cmp r5, #5 + bne _02223F8A + ldr r0, [sp, #0x64] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x68] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x6c] + neg r1, r1 + strh r1, [r0, #4] + b _0222401C +_02223F8A: + ldr r0, [sp, #0x40] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x44] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x48] + neg r1, r1 + strh r1, [r0, #4] + b _0222401C +_02223FA0: + cmp r5, #3 + add r0, sp, #0x14 + bne _02223FB4 + ldr r1, [sp, #0x40] + strh r1, [r0] + ldr r1, [sp, #0x44] + strh r1, [r0, #2] + ldr r1, [sp, #0x48] + strh r1, [r0, #4] + b _0222401C +_02223FB4: + cmp r5, #5 + bne _02223FC6 + ldr r1, [sp, #0x34] + strh r1, [r0] + ldr r1, [sp, #0x38] + strh r1, [r0, #2] + ldr r1, [sp, #0x3c] + strh r1, [r0, #4] + b _0222401C +_02223FC6: + ldr r1, [sp, #0x4c] + strh r1, [r0] + ldr r1, [sp, #0x50] + strh r1, [r0, #2] + ldr r1, [sp, #0x54] + strh r1, [r0, #4] + b _0222401C +_02223FD4: + cmp r5, #3 + bne _02223FEE + ldr r0, [sp, #0x4c] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x50] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x54] + neg r1, r1 + strh r1, [r0, #4] + b _0222401C +_02223FEE: + cmp r5, #2 + bne _02224008 + ldr r0, [sp, #0x58] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x5c] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x60] + neg r1, r1 + strh r1, [r0, #4] + b _0222401C +_02224008: + ldr r0, [sp, #0x34] + neg r1, r0 + add r0, sp, #0x14 + strh r1, [r0] + ldr r1, [sp, #0x38] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x3c] + neg r1, r1 + strh r1, [r0, #4] +_0222401C: + ldr r2, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + bl ov12_0222389C + add r5, r0, #0 + add r1, sp, #0x28 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r6, #0 + mov r2, #3 + bl ov12_0222325C + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #0x1c + bl ov12_02235508 + ldr r0, [sp, #0x28] + cmp r0, #0 + bne _02224088 + ldr r0, [sp, #0x2c] + cmp r0, #0 + bne _02224088 + ldr r0, [sp, #0x30] + cmp r0, #0 + bne _02224088 + add r3, sp, #0x1c + ldmia r3!, {r0, r1} + add r2, sp, #0x88 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [r4, #0x20] + ldr r0, [sp, #0x1c] + ldr r1, [r1, #0] + ldr r1, [r1, #4] + add r0, r0, r1 + str r0, [r4, #0x28] + ldr r1, [r4, #0x20] + ldr r0, [sp, #0x20] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r0, r0, r1 + str r0, [r4, #0x2c] + ldr r1, [r4, #0x20] + ldr r0, [sp, #0x24] + ldr r1, [r1, #0] + ldr r1, [r1, #0xc] + add r0, r0, r1 + str r0, [r4, #0x30] + b _022240DC +_02224088: + ldr r2, [sp, #0x28] + ldr r1, [sp, #0x2c] + ldr r0, [sp, #0x30] + str r2, [sp, #0x88] + str r1, [sp, #0x8c] + str r0, [sp, #0x90] + cmp r2, #0 + bne _022240A2 + mov r0, #0x32 + lsl r0, r0, #6 + cmp r1, r0 + bne _022240A2 + mov r5, #1 +_022240A2: + ldr r1, [sp, #0x88] + add r0, r1, #0 + ldr r1, [sp, #0x8c] + mul r0, r5 + add r2, r1, #0 + mul r2, r5 + ldr r1, [sp, #0x24] + str r2, [sp, #0x8c] + add r2, r1, #0 + mul r2, r5 + str r0, [sp, #0x88] + str r2, [sp, #0x90] + ldr r1, [r4, #0x20] + ldr r1, [r1, #0] + ldr r1, [r1, #4] + add r0, r0, r1 + str r0, [r4, #0x28] + ldr r1, [r4, #0x20] + ldr r0, [sp, #0x8c] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r0, r0, r1 + str r0, [r4, #0x2c] + ldr r1, [r4, #0x20] + ldr r0, [sp, #0x90] + ldr r1, [r1, #0] + ldr r1, [r1, #0xc] + add r0, r0, r1 + str r0, [r4, #0x30] +_022240DC: + ldr r0, [sp, #0xa8] + cmp r0, #0 + beq _0222411A + cmp r0, #1 + beq _022240EC + cmp r0, #2 + beq _02224104 + b _0222411A +_022240EC: + ldr r0, [sp, #0xac] + ldr r3, [sp, #0xc] + str r0, [sp] + str r5, [sp, #4] + add r0, sp, #0x88 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov12_02223CD4 + b _0222411A +_02224104: + ldr r0, [sp, #0xac] + ldr r3, [sp, #0xc] + str r0, [sp] + str r5, [sp, #4] + add r0, sp, #0x88 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov12_02223DA4 +_0222411A: + add r1, sp, #0x14 + ldrh r2, [r1] + add r0, r4, #0 + add r0, #0x50 + strh r2, [r0] + add r0, r4, #0 + ldrh r2, [r1, #2] + add r0, #0x52 + add r4, #0x54 + strh r2, [r0] + ldrh r0, [r1, #4] + strh r0, [r4] + add sp, #0x94 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02223E74 + + thumb_func_start ov12_02224138 +ov12_02224138: ; 0x02224138 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + bl sub_02014764 + add r6, r0, #0 + bl ov12_02220240 + str r0, [sp, #8] + add r0, r6, #0 + bl ov12_02220248 + add r3, r0, #0 + str r5, [sp] + ldr r2, [sp, #8] + add r0, r6, #0 + add r1, r7, #0 + str r4, [sp, #4] + bl ov12_02223E74 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_02224138 + + thumb_func_start ov12_02224168 +ov12_02224168: ; 0x02224168 + ldr r3, _02224170 ; =ov12_02224138 + mov r1, #0 + add r2, r1, #0 + bx r3 + ; .align 2, 0 +_02224170: .word ov12_02224138 + thumb_func_end ov12_02224168 + + thumb_func_start ov12_02224174 +ov12_02224174: ; 0x02224174 + ldr r3, _0222417C ; =ov12_02224138 + mov r1, #1 + add r2, r1, #0 + bx r3 + ; .align 2, 0 +_0222417C: .word ov12_02224138 + thumb_func_end ov12_02224174 + + thumb_func_start ov12_02224180 +ov12_02224180: ; 0x02224180 + ldr r3, _02224188 ; =ov12_02224138 + mov r1, #1 + mov r2, #2 + bx r3 + ; .align 2, 0 +_02224188: .word ov12_02224138 + thumb_func_end ov12_02224180 + + thumb_func_start ov12_0222418C +ov12_0222418C: ; 0x0222418C + ldr r3, _02224194 ; =ov12_02224138 + mov r1, #1 + mov r2, #3 + bx r3 + ; .align 2, 0 +_02224194: .word ov12_02224138 + thumb_func_end ov12_0222418C + + thumb_func_start ov12_02224198 +ov12_02224198: ; 0x02224198 + ldr r3, _022241A0 ; =ov12_02224138 + mov r1, #1 + mov r2, #4 + bx r3 + ; .align 2, 0 +_022241A0: .word ov12_02224138 + thumb_func_end ov12_02224198 + + thumb_func_start ov12_022241A4 +ov12_022241A4: ; 0x022241A4 + ldr r3, _022241AC ; =ov12_02224138 + mov r1, #1 + mov r2, #5 + bx r3 + ; .align 2, 0 +_022241AC: .word ov12_02224138 + thumb_func_end ov12_022241A4 + + thumb_func_start ov12_022241B0 +ov12_022241B0: ; 0x022241B0 + ldr r3, _022241B8 ; =ov12_02224138 + mov r1, #2 + mov r2, #1 + bx r3 + ; .align 2, 0 +_022241B8: .word ov12_02224138 + thumb_func_end ov12_022241B0 + + thumb_func_start ov12_022241BC +ov12_022241BC: ; 0x022241BC + ldr r3, _022241C4 ; =ov12_02224138 + mov r1, #2 + add r2, r1, #0 + bx r3 + ; .align 2, 0 +_022241C4: .word ov12_02224138 + thumb_func_end ov12_022241BC + + thumb_func_start ov12_022241C8 +ov12_022241C8: ; 0x022241C8 + ldr r3, _022241D0 ; =ov12_02224138 + mov r1, #2 + mov r2, #3 + bx r3 + ; .align 2, 0 +_022241D0: .word ov12_02224138 + thumb_func_end ov12_022241C8 + + thumb_func_start ov12_022241D4 +ov12_022241D4: ; 0x022241D4 + ldr r3, _022241DC ; =ov12_02224138 + mov r1, #2 + mov r2, #4 + bx r3 + ; .align 2, 0 +_022241DC: .word ov12_02224138 + thumb_func_end ov12_022241D4 + + thumb_func_start ov12_022241E0 +ov12_022241E0: ; 0x022241E0 + ldr r3, _022241E8 ; =ov12_02224138 + mov r1, #2 + mov r2, #5 + bx r3 + ; .align 2, 0 +_022241E8: .word ov12_02224138 + thumb_func_end ov12_022241E0 + + thumb_func_start ov12_022241EC +ov12_022241EC: ; 0x022241EC + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + bl sub_02014764 + add r4, r0, #0 + bl ov12_02220240 + add r6, r0, #0 + add r0, r4, #0 + bl ov12_02220248 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r0, r4, #0 + add r1, r5, #0 + add r3, r6, #0 + bl ov12_02223E74 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_022241EC + + .rodata + + + .global Unk_ov12_02238E0C +Unk_ov12_02238E0C: ; 0x02238E0C + .incbin "incbin/overlay12_rodata.bin", 0x878, 0x8C0 - 0x878 + + .global Unk_ov12_02238E54 +Unk_ov12_02238E54: ; 0x02238E54 + .incbin "incbin/overlay12_rodata.bin", 0x8C0, 0x48 + diff --git a/asm/ov12_0222421C.s b/asm/ov12_0222421C.s new file mode 100644 index 000000000..f9cdcb81c --- /dev/null +++ b/asm/ov12_0222421C.s @@ -0,0 +1,2015 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222421C +ov12_0222421C: ; 0x0222421C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0x14] + add r5, r0, #0 + cmp r2, #0 + beq _0222422C + bl ov12_022242E0 +_0222422C: + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _0222423A + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02224614 +_0222423A: + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _02224248 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02224E74 +_02224248: + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02224EA8 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0222425E + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02224EB8 +_0222425E: + pop {r3, r4, r5, pc} + thumb_func_end ov12_0222421C + + thumb_func_start ov12_02224260 +ov12_02224260: ; 0x02224260 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [r1, #0] + add r6, r2, #0 + add r0, r4, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r4, #0 + bl ov12_0223525C + cmp r0, #3 + beq _02224288 + mov r5, #1 + b _0222428A +_02224288: + mov r5, #0 +_0222428A: + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235448 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02224260 + + thumb_func_start ov12_022242A0 +ov12_022242A0: ; 0x022242A0 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [r1, #0] + add r6, r2, #0 + add r0, r4, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r4, #0 + bl ov12_0223525C + cmp r0, #3 + beq _022242C8 + mov r5, #1 + b _022242CA +_022242C8: + mov r5, #0 +_022242CA: + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235448 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022242A0 + + thumb_func_start ov12_022242E0 +ov12_022242E0: ; 0x022242E0 + push {r3, r4, r5, r6, lr} + sub sp, #0xbc + add r4, r1, #0 + ldr r2, [r4, #0x14] + add r5, r0, #0 + cmp r2, #0x64 + bgt _02224348 + blt _022242F2 + b _022244BC +_022242F2: + cmp r2, #0x22 + bhi _0222434E + add r3, r2, r2 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_02224302: ; jump table + .short _022245C6 - _02224302 - 2 ; case 0 + .short _02224350 - _02224302 - 2 ; case 1 + .short _0222435C - _02224302 - 2 ; case 2 + .short _02224458 - _02224302 - 2 ; case 3 + .short _02224494 - _02224302 - 2 ; case 4 + .short _022244A8 - _02224302 - 2 ; case 5 + .short _02224368 - _02224302 - 2 ; case 6 + .short _02224374 - _02224302 - 2 ; case 7 + .short _02224440 - _02224302 - 2 ; case 8 + .short _0222444C - _02224302 - 2 ; case 9 + .short _02224380 - _02224302 - 2 ; case 10 + .short _0222438C - _02224302 - 2 ; case 11 + .short _022244E8 - _02224302 - 2 ; case 12 + .short _022244F8 - _02224302 - 2 ; case 13 + .short _02224398 - _02224302 - 2 ; case 14 + .short _022243A4 - _02224302 - 2 ; case 15 + .short _022243B0 - _02224302 - 2 ; case 16 + .short _022243BC - _02224302 - 2 ; case 17 + .short _022243C8 - _02224302 - 2 ; case 18 + .short _022243D4 - _02224302 - 2 ; case 19 + .short _022243E0 - _02224302 - 2 ; case 20 + .short _022243EC - _02224302 - 2 ; case 21 + .short _022243F8 - _02224302 - 2 ; case 22 + .short _02224404 - _02224302 - 2 ; case 23 + .short _02224410 - _02224302 - 2 ; case 24 + .short _0222441C - _02224302 - 2 ; case 25 + .short _02224428 - _02224302 - 2 ; case 26 + .short _02224434 - _02224302 - 2 ; case 27 + .short _02224508 - _02224302 - 2 ; case 28 + .short _022245C6 - _02224302 - 2 ; case 29 + .short _02224558 - _02224302 - 2 ; case 30 + .short _0222452E - _02224302 - 2 ; case 31 + .short _02224590 - _02224302 - 2 ; case 32 + .short _02224514 - _02224302 - 2 ; case 33 + .short _02224522 - _02224302 - 2 ; case 34 +_02224348: + cmp r2, #0x65 + bne _0222434E + b _022244D2 +_0222434E: + b _022245C6 +_02224350: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235508 + b _022245C6 +_0222435C: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235508 + b _022245C6 +_02224368: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235538 + b _022245C6 +_02224374: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235538 + b _022245C6 +_02224380: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235568 + b _022245C6 +_0222438C: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235568 + b _022245C6 +_02224398: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235598 + b _022245C6 +_022243A4: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235598 + b _022245C6 +_022243B0: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_022355C8 + b _022245C6 +_022243BC: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_022355C8 + b _022245C6 +_022243C8: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_022355F8 + b _022245C6 +_022243D4: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_022355F8 + b _022245C6 +_022243E0: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235628 + b _022245C6 +_022243EC: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235628 + b _022245C6 +_022243F8: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235658 + b _022245C6 +_02224404: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235658 + b _022245C6 +_02224410: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235688 + b _022245C6 +_0222441C: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235688 + b _022245C6 +_02224428: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_022356B8 + b _022245C6 +_02224434: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_022356B8 + b _022245C6 +_02224440: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235718 + b _022245C6 +_0222444C: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235718 + b _022245C6 +_02224458: + ldr r0, [r4, #0] + add r1, sp, #0xa0 + mov r2, #4 + bl ov12_0222325C + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #0xa4] + str r0, [sp, #0xb0] + ldr r0, [sp, #0xa8] + str r0, [sp, #0xb4] + ldr r0, [sp, #0xac] + str r0, [sp, #0xb8] + ldr r0, [sp, #0xa0] + cmp r0, #1 + bne _02224480 + mov r0, #1 + strb r0, [r4, #8] +_02224480: + mov r0, #8 + ldrsb r1, [r4, r0] + ldr r2, [sp, #0xb0] + mul r1, r2 + str r1, [sp, #0xb0] + ldrsb r0, [r4, r0] + ldr r1, [sp, #0xb4] + mul r0, r1 + str r0, [sp, #0xb4] + b _022245C6 +_02224494: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235508 + add r0, r4, #0 + add r1, sp, #0xb0 + bl ov12_02225094 + b _022245C6 +_022244A8: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235508 + add r0, r4, #0 + add r1, sp, #0xb0 + bl ov12_02225094 + b _022245C6 +_022244BC: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235508 + ldr r1, [r4, #0x24] + add r0, r4, #0 + add r2, sp, #0xb0 + bl ov12_02225008 + b _022245C6 +_022244D2: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0xb0 + bl ov12_02235508 + ldr r1, [r4, #0x28] + add r0, r4, #0 + add r2, sp, #0xb0 + bl ov12_02225008 + b _022245C6 +_022244E8: + add r2, sp, #0xb0 + bl ov12_022242A0 + add r0, r4, #0 + add r1, sp, #0xb0 + bl ov12_02225094 + b _022245C6 +_022244F8: + add r2, sp, #0xb0 + bl ov12_02224260 + add r0, r4, #0 + add r1, sp, #0xb0 + bl ov12_02225094 + b _022245C6 +_02224508: + ldr r0, _022245FC ; =0x00002CE0 + str r0, [sp, #0xb0] + mov r0, #0 + str r0, [sp, #0xb4] + str r0, [sp, #0xb8] + b _022245C6 +_02224514: + ldr r0, _02224600 ; =0xFFFFEC78 + str r0, [sp, #0xb0] + ldr r0, _02224604 ; =0xFFFFE890 + str r0, [sp, #0xb4] + mov r0, #0 + str r0, [sp, #0xb8] + b _022245C6 +_02224522: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0xb0 + bl ov12_02235508 + b _022245C6 +_0222452E: + ldr r6, _02224608 ; =0x02238EAC + add r3, sp, #0x70 + mov r2, #6 +_02224534: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02224534 + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + bl ov12_02235254 + lsl r1, r0, #3 + add r0, sp, #0x70 + ldr r0, [r0, r1] + str r0, [sp, #0xb0] + add r0, sp, #0x74 + ldr r0, [r0, r1] + str r0, [sp, #0xb4] + mov r0, #0 + str r0, [sp, #0xb8] + b _022245C6 +_02224558: + ldr r6, _0222460C ; =0x02238F44 + add r3, sp, #0x38 + mov r2, #7 +_0222455E: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0222455E + ldr r0, [r4, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02224574 + mov r0, #6 + b _0222457C +_02224574: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + bl ov12_02235254 +_0222457C: + lsl r1, r0, #3 + add r0, sp, #0x38 + ldr r0, [r0, r1] + str r0, [sp, #0xb0] + add r0, sp, #0x3c + ldr r0, [r0, r1] + str r0, [sp, #0xb4] + mov r0, #0 + str r0, [sp, #0xb8] + b _022245C6 +_02224590: + ldr r6, _02224610 ; =0x02238F0C + add r3, sp, #0 + mov r2, #7 +_02224596: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02224596 + ldr r0, [r4, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022245AC + mov r0, #6 + b _022245B4 +_022245AC: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + bl ov12_02235254 +_022245B4: + lsl r1, r0, #3 + add r0, sp, #0 + ldr r0, [r0, r1] + str r0, [sp, #0xb0] + add r0, sp, #4 + ldr r0, [r0, r1] + str r0, [sp, #0xb4] + mov r0, #0 + str r0, [sp, #0xb8] +_022245C6: + add r2, sp, #0xb0 + ldmia r2!, {r0, r1} + add r4, #0x2c + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0xb0] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0xb4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #0xb8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add sp, #0xbc + pop {r3, r4, r5, r6, pc} + nop +_022245FC: .word 0x00002CE0 +_02224600: .word 0xFFFFEC78 +_02224604: .word 0xFFFFE890 +_02224608: .word 0x02238EAC +_0222460C: .word 0x02238F44 +_02224610: .word 0x02238F0C + thumb_func_end ov12_022242E0 + + thumb_func_start ov12_02224614 +ov12_02224614: ; 0x02224614 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x148 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r1, #0] + ldr r1, [r1, #0x24] + bl ov12_02235254 + str r0, [sp, #0x18] + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x28] + bl ov12_02235254 + str r0, [sp, #0x14] + ldr r0, [sp, #4] + ldr r0, [r0, #0x18] + cmp r0, #0x1a + bls _0222463E + b _02224E38 +_0222463E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222464A: ; jump table + .short _02224680 - _0222464A - 2 ; case 0 + .short _0222468C - _0222464A - 2 ; case 1 + .short _0222468C - _0222464A - 2 ; case 2 + .short _02224DA2 - _0222464A - 2 ; case 3 + .short _022246F4 - _0222464A - 2 ; case 4 + .short _022247AE - _0222464A - 2 ; case 5 + .short _02224AE0 - _0222464A - 2 ; case 6 + .short _02224AE0 - _0222464A - 2 ; case 7 + .short _02224868 - _0222464A - 2 ; case 8 + .short _02224868 - _0222464A - 2 ; case 9 + .short _022248D0 - _0222464A - 2 ; case 10 + .short _022248D0 - _0222464A - 2 ; case 11 + .short _0222491E - _0222464A - 2 ; case 12 + .short _0222491E - _0222464A - 2 ; case 13 + .short _02224966 - _0222464A - 2 ; case 14 + .short _02224966 - _0222464A - 2 ; case 15 + .short _022249AE - _0222464A - 2 ; case 16 + .short _022249AE - _0222464A - 2 ; case 17 + .short _02224A50 - _0222464A - 2 ; case 18 + .short _02224A50 - _0222464A - 2 ; case 19 + .short _02224A98 - _0222464A - 2 ; case 20 + .short _02224A98 - _0222464A - 2 ; case 21 + .short _02224DB6 - _0222464A - 2 ; case 22 + .short _02224E38 - _0222464A - 2 ; case 23 + .short _02224E0A - _0222464A - 2 ; case 24 + .short _02224DC6 - _0222464A - 2 ; case 25 + .short _02224DD8 - _0222464A - 2 ; case 26 +_02224680: + mov r1, #0 + add r0, sp, #0x20 + strh r1, [r0] + strh r1, [r0, #2] + strh r1, [r0, #4] + b _02224E38 +_0222468C: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022246C6 + ldr r0, [sp, #4] + ldr r0, [r0, #0x10] + cmp r0, #2 + add r0, sp, #0x20 + bne _022246B4 + ldr r1, _022249E8 ; =0xFFFFF2F8 + strh r1, [r0] + mov r1, #0x73 + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_022246B4: + mov r1, #0x92 + lsl r1, r1, #4 + strh r1, [r0] + ldr r1, _022249EC ; =0xFFFFFA60 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_022246C6: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _022249F0 ; =0x022396AC + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _022249F4 ; =0x022396B0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _022249F8 ; =0x022396B4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_022246F4: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02224730 + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _022249F0 ; =0x022396AC + add r2, r2, r0 + ldr r2, [r1, r2] + neg r3, r2 + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _022249F4 ; =0x022396B0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _022249F8 ; =0x022396B4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_02224730: + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x24] + bl ov12_0223525C + add r4, r0, #0 + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x28] + bl ov12_0223525C + cmp r4, r0 + bne _0222477C + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _022249F0 ; =0x022396AC + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _022249F4 ; =0x022396B0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _022249F8 ; =0x022396B4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_0222477C: + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x24] + bl ov12_0223525C + cmp r0, #3 + add r0, sp, #0x20 + bne _022247A0 + mov r1, #0x3b + lsl r1, r1, #6 + strh r1, [r0] + mov r1, #0x21 + lsl r1, r1, #6 + strh r1, [r0, #2] + ldr r1, _022249FC ; =0x000005FC + strh r1, [r0, #4] + b _02224E38 +_022247A0: + ldr r1, _02224A00 ; =0xFFFFEF7C + strh r1, [r0] + ldr r1, _02224A04 ; =0xFFFFF558 + strh r1, [r0, #2] + ldr r1, _022249FC ; =0x000005FC + strh r1, [r0, #4] + b _02224E38 +_022247AE: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022247EA + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _022249F0 ; =0x022396AC + add r2, r2, r0 + ldr r2, [r1, r2] + neg r3, r2 + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _022249F4 ; =0x022396B0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _022249F8 ; =0x022396B4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_022247EA: + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x24] + bl ov12_0223525C + add r4, r0, #0 + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x28] + bl ov12_0223525C + cmp r4, r0 + bne _02224836 + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _022249F0 ; =0x022396AC + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _022249F4 ; =0x022396B0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _022249F8 ; =0x022396B4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_02224836: + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x24] + bl ov12_0223525C + cmp r0, #3 + add r0, sp, #0x20 + bne _0222485A + mov r1, #0x3b + lsl r1, r1, #6 + strh r1, [r0] + mov r1, #0x21 + lsl r1, r1, #6 + strh r1, [r0, #2] + ldr r1, _022249FC ; =0x000005FC + strh r1, [r0, #4] + b _02224E38 +_0222485A: + ldr r1, _02224A00 ; =0xFFFFEF7C + strh r1, [r0] + ldr r1, _02224A04 ; =0xFFFFF558 + strh r1, [r0, #2] + ldr r1, _022249FC ; =0x000005FC + strh r1, [r0, #4] + b _02224E38 +_02224868: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022248A2 + ldr r0, [sp, #4] + ldr r0, [r0, #0x10] + cmp r0, #2 + add r0, sp, #0x20 + bne _02224890 + ldr r1, _02224A08 ; =0xFFFFF6E0 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_02224890: + mov r1, #0x92 + lsl r1, r1, #4 + strh r1, [r0] + ldr r1, _022249EC ; =0xFFFFFA60 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_022248A2: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224A0C ; =0x02238FEC + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224A10 ; =0x02238FF0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224A14 ; =0x02238FF4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_022248D0: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022248F0 + ldr r1, _02224A08 ; =0xFFFFF6E0 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_022248F0: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224A18 ; =0x0223919C + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224A10 ; =0x02238FF0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224A14 ; =0x02238FF4 + add r0, r3, r0 + ldr r1, [r1, r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r2, #4] + b _02224E38 +_0222491E: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222493E + ldr r1, _02224A1C ; =0xFFFFF488 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_0222493E: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224A20 ; =0x022394FC + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224A24 ; =0x02239500 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224A28 ; =0x02239504 + add r0, r3, r0 + ldr r0, [r1, r0] + strh r0, [r2, #4] + b _02224E38 +_02224966: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02224986 + ldr r1, _02224A08 ; =0xFFFFF6E0 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_02224986: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224A2C ; =0x0223985C + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224A30 ; =0x02239860 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224A34 ; =0x02239864 + add r0, r3, r0 + ldr r0, [r1, r0] + strh r0, [r2, #4] + b _02224E38 +_022249AE: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _022249CE + ldr r1, _02224A08 ; =0xFFFFF6E0 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_022249CE: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224A38 ; =0x0223934C + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224A3C ; =0x02239350 + b _02224A40 + ; .align 2, 0 +_022249E8: .word 0xFFFFF2F8 +_022249EC: .word 0xFFFFFA60 +_022249F0: .word 0x022396AC +_022249F4: .word 0x022396B0 +_022249F8: .word 0x022396B4 +_022249FC: .word 0x000005FC +_02224A00: .word 0xFFFFEF7C +_02224A04: .word 0xFFFFF558 +_02224A08: .word 0xFFFFF6E0 +_02224A0C: .word 0x02238FEC +_02224A10: .word 0x02238FF0 +_02224A14: .word 0x02238FF4 +_02224A18: .word 0x0223919C +_02224A1C: .word 0xFFFFF488 +_02224A20: .word 0x022394FC +_02224A24: .word 0x02239500 +_02224A28: .word 0x02239504 +_02224A2C: .word 0x0223985C +_02224A30: .word 0x02239860 +_02224A34: .word 0x02239864 +_02224A38: .word 0x0223934C +_02224A3C: .word 0x02239350 +_02224A40: + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224D60 ; =0x02239354 + add r0, r3, r0 + ldr r0, [r1, r0] + strh r0, [r2, #4] + b _02224E38 +_02224A50: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02224A70 + ldr r1, _02224D64 ; =0xFFFFF6E0 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_02224A70: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224D68 ; =0x02239A0C + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224D6C ; =0x02239A10 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224D70 ; =0x02239A14 + add r0, r3, r0 + ldr r0, [r1, r0] + strh r0, [r2, #4] + b _02224E38 +_02224A98: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02224AB8 + ldr r1, _02224D74 ; =0xFFFFEF10 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x5a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x2e + lsl r1, r1, #4 + strh r1, [r0, #4] + b _02224E38 +_02224AB8: + ldr r0, [sp, #0x14] + mov r1, #0xc + mul r1, r0 + ldr r2, [sp, #0x18] + mov r0, #0x48 + mul r0, r2 + ldr r2, _02224D78 ; =0x02239BBC + add r2, r2, r0 + ldr r3, [r1, r2] + add r2, sp, #0x20 + strh r3, [r2] + ldr r3, _02224D7C ; =0x02239BC0 + add r3, r3, r0 + ldr r3, [r1, r3] + strh r3, [r2, #2] + ldr r3, _02224D80 ; =0x02239BC4 + add r0, r3, r0 + ldr r0, [r1, r0] + strh r0, [r2, #4] + b _02224E38 +_02224AE0: + ldr r4, _02224D84 ; =0x02238F7C + add r3, sp, #0xd8 + mov r2, #0xe +_02224AE6: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02224AE6 + ldr r3, _02224D88 ; =0x02238E9C + add r2, sp, #0x58 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r1, sp, #0xc8 + mov r0, #0 + str r1, [sp, #0xc] + add r1, sp, #0xb8 + mov ip, r0 + str r1, [sp, #0x1c] + add r0, sp, #0xd8 + add r7, sp, #0xa8 + add r6, sp, #0x98 + add r5, sp, #0x88 + add r1, sp, #0x78 + add r2, sp, #0x68 +_02224B12: + ldr r4, [r0, #0] + ldr r3, [sp, #0xc] + str r4, [r3, #0] + ldr r4, [r0, #0x10] + ldr r3, [sp, #0x1c] + str r4, [r3, #0] + ldr r3, [r0, #0x20] + stmia r7!, {r3} + ldr r3, [r0, #0x30] + stmia r6!, {r3} + ldr r3, [r0, #0x40] + stmia r5!, {r3} + ldr r3, [r0, #0x50] + stmia r1!, {r3} + ldr r3, [r0, #0x60] + add r0, r0, #4 + stmia r2!, {r3} + ldr r3, [sp, #0xc] + add r3, r3, #4 + str r3, [sp, #0xc] + ldr r3, [sp, #0x1c] + add r3, r3, #4 + str r3, [sp, #0x1c] + mov r3, ip + add r3, r3, #1 + mov ip, r3 + cmp r3, #4 + blt _02224B12 + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02224B8E + mov r0, #0 + str r0, [sp, #8] + add r0, sp, #0x58 + str r0, [sp, #0x10] + add r7, sp, #0xc8 + add r6, sp, #0xb8 + add r0, sp, #0xa8 + add r1, sp, #0x98 + add r2, sp, #0x88 + add r3, sp, #0x78 + add r4, sp, #0x68 +_02224B6C: + ldr r5, [sp, #0x10] + ldr r5, [r5, #0] + stmia r7!, {r5} + stmia r6!, {r5} + stmia r0!, {r5} + stmia r1!, {r5} + stmia r2!, {r5} + stmia r3!, {r5} + stmia r4!, {r5} + ldr r5, [sp, #0x10] + add r5, r5, #4 + str r5, [sp, #0x10] + ldr r5, [sp, #8] + add r5, r5, #1 + str r5, [sp, #8] + cmp r5, #4 + blt _02224B6C +_02224B8E: + ldr r0, [sp, #0x18] + cmp r0, #5 + bhi _02224BAC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02224BA0: ; jump table + .short _02224BAC - _02224BA0 - 2 ; case 0 + .short _02224BBC - _02224BA0 - 2 ; case 1 + .short _02224BE8 - _02224BA0 - 2 ; case 2 + .short _02224C20 - _02224BA0 - 2 ; case 3 + .short _02224CAE - _02224BA0 - 2 ; case 4 + .short _02224CE6 - _02224BA0 - 2 ; case 5 +_02224BAC: + ldr r1, [sp, #0xc8] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0xcc] + strh r1, [r0, #2] + ldr r1, [sp, #0xd0] + strh r1, [r0, #4] + b _02224E38 +_02224BBC: + ldr r0, [sp, #0xd4] + cmp r0, #1 + bne _02224BD2 + ldr r1, [sp, #0xc8] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0xcc] + strh r1, [r0, #2] + ldr r1, [sp, #0xd0] + strh r1, [r0, #4] + b _02224E38 +_02224BD2: + ldr r0, [sp, #0xc8] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0xcc] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0xd0] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224BE8: + ldr r0, [sp, #0x14] + cmp r0, #3 + bne _02224BFE + ldr r1, [sp, #0xb8] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0xbc] + strh r1, [r0, #2] + ldr r1, [sp, #0xc0] + strh r1, [r0, #4] + b _02224E38 +_02224BFE: + cmp r0, #5 + add r0, sp, #0x20 + bne _02224C12 + ldr r1, [sp, #0x98] + strh r1, [r0] + ldr r1, [sp, #0x9c] + strh r1, [r0, #2] + ldr r1, [sp, #0xa0] + strh r1, [r0, #4] + b _02224E38 +_02224C12: + ldr r1, [sp, #0xa8] + strh r1, [r0] + ldr r1, [sp, #0xac] + strh r1, [r0, #2] + ldr r1, [sp, #0xb0] + strh r1, [r0, #4] + b _02224E38 +_02224C20: + ldr r0, [sp, #0x14] + cmp r0, #2 + bne _02224C52 + ldr r0, [sp, #0xc4] + cmp r0, #1 + bne _02224C3C + ldr r1, [sp, #0xb8] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0xbc] + strh r1, [r0, #2] + ldr r1, [sp, #0xc0] + strh r1, [r0, #4] + b _02224E38 +_02224C3C: + ldr r0, [sp, #0xb8] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0xbc] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0xc0] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224C52: + cmp r0, #5 + bne _02224C82 + ldr r0, [sp, #0xb4] + cmp r0, #1 + bne _02224C72 + ldr r0, [sp, #0x88] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x8c] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x90] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224C72: + ldr r1, [sp, #0x88] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x8c] + strh r1, [r0, #2] + ldr r1, [sp, #0x90] + strh r1, [r0, #4] + b _02224E38 +_02224C82: + ldr r0, [sp, #0x84] + cmp r0, #1 + bne _02224C98 + ldr r1, [sp, #0x78] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x7c] + strh r1, [r0, #2] + ldr r1, [sp, #0x80] + strh r1, [r0, #4] + b _02224E38 +_02224C98: + ldr r0, [sp, #0x78] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x7c] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x80] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224CAE: + ldr r0, [sp, #0x14] + cmp r0, #3 + bne _02224CC4 + ldr r1, [sp, #0x78] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x7c] + strh r1, [r0, #2] + ldr r1, [sp, #0x80] + strh r1, [r0, #4] + b _02224E38 +_02224CC4: + cmp r0, #5 + add r0, sp, #0x20 + bne _02224CD8 + ldr r1, [sp, #0x68] + strh r1, [r0] + ldr r1, [sp, #0x6c] + strh r1, [r0, #2] + ldr r1, [sp, #0x70] + strh r1, [r0, #4] + b _02224E38 +_02224CD8: + ldr r1, [sp, #0x88] + strh r1, [r0] + ldr r1, [sp, #0x8c] + strh r1, [r0, #2] + ldr r1, [sp, #0x90] + strh r1, [r0, #4] + b _02224E38 +_02224CE6: + ldr r0, [sp, #0x14] + cmp r0, #3 + bne _02224D18 + ldr r0, [sp, #0xc4] + cmp r0, #1 + bne _02224D02 + ldr r1, [sp, #0x88] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x8c] + strh r1, [r0, #2] + ldr r1, [sp, #0x90] + strh r1, [r0, #4] + b _02224E38 +_02224D02: + ldr r0, [sp, #0x88] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x8c] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x90] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224D18: + cmp r0, #2 + bne _02224D48 + ldr r0, [sp, #0xc4] + cmp r0, #1 + bne _02224D32 + ldr r1, [sp, #0x98] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x9c] + strh r1, [r0, #2] + ldr r1, [sp, #0xa0] + strh r1, [r0, #4] + b _02224E38 +_02224D32: + ldr r0, [sp, #0x98] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x9c] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0xa0] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224D48: + ldr r0, [sp, #0xc4] + cmp r0, #1 + bne _02224D8C + ldr r1, [sp, #0x68] + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x6c] + strh r1, [r0, #2] + ldr r1, [sp, #0x70] + strh r1, [r0, #4] + b _02224E38 + nop +_02224D60: .word 0x02239354 +_02224D64: .word 0xFFFFF6E0 +_02224D68: .word 0x02239A0C +_02224D6C: .word 0x02239A10 +_02224D70: .word 0x02239A14 +_02224D74: .word 0xFFFFEF10 +_02224D78: .word 0x02239BBC +_02224D7C: .word 0x02239BC0 +_02224D80: .word 0x02239BC4 +_02224D84: .word 0x02238F7C +_02224D88: .word 0x02238E9C +_02224D8C: + ldr r0, [sp, #0x68] + neg r1, r0 + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, [sp, #0x6c] + neg r1, r1 + strh r1, [r0, #2] + ldr r1, [sp, #0x70] + neg r1, r1 + strh r1, [r0, #4] + b _02224E38 +_02224DA2: + ldr r1, _02224E58 ; =0xFFFFFCE0 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x4b + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0x7d + lsl r1, r1, #2 + strh r1, [r0, #4] + b _02224E38 +_02224DB6: + ldr r1, _02224E5C ; =0xFFFFF2AE + add r0, sp, #0x20 + strh r1, [r0] + ldr r1, _02224E60 ; =0xFFFFF5AC + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + b _02224E38 +_02224DC6: + ldr r1, _02224E64 ; =0xFFFFF290 + add r0, sp, #0x20 + strh r1, [r0] + mov r1, #0x7a + lsl r1, r1, #4 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + b _02224E38 +_02224DD8: + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x24] + bl ov12_0223525C + cmp r0, #3 + add r0, sp, #0x20 + bne _02224DFC + mov r1, #0x3b + lsl r1, r1, #6 + strh r1, [r0] + mov r1, #0x21 + lsl r1, r1, #6 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + b _02224E38 +_02224DFC: + ldr r1, _02224E68 ; =0xFFFFE890 + strh r1, [r0] + ldr r1, _02224E6C ; =0xFFFFF768 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + b _02224E38 +_02224E0A: + ldr r4, _02224E70 ; =0x02238EDC + add r3, sp, #0x28 + mov r2, #6 +_02224E10: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02224E10 + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r1, [r1, #0x24] + bl ov12_02235254 + lsl r2, r0, #3 + add r0, sp, #0x28 + ldr r1, [r0, r2] + add r0, sp, #0x20 + strh r1, [r0] + add r1, sp, #0x2c + ldr r1, [r1, r2] + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] +_02224E38: + add r1, sp, #0x20 + ldr r0, [sp] + ldrh r2, [r1] + add r0, #0x50 + strh r2, [r0] + ldr r0, [sp] + ldrh r2, [r1, #2] + add r0, #0x52 + strh r2, [r0] + ldr r0, [sp] + ldrh r1, [r1, #4] + add r0, #0x54 + str r0, [sp] + strh r1, [r0] + add sp, #0x148 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02224E58: .word 0xFFFFFCE0 +_02224E5C: .word 0xFFFFF2AE +_02224E60: .word 0xFFFFF5AC +_02224E64: .word 0xFFFFF290 +_02224E68: .word 0xFFFFE890 +_02224E6C: .word 0xFFFFF768 +_02224E70: .word 0x02238EDC + thumb_func_end ov12_02224614 + + thumb_func_start ov12_02224E74 +ov12_02224E74: ; 0x02224E74 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + bl ov12_02225614 + add r6, r0, #0 + mov r4, #0 + cmp r6, #0 + ble _02224EA4 +_02224E86: + add r0, r4, #0 + bl ov12_022255EC + ldr r1, [r5, #0x1c] + and r1, r0 + cmp r0, r1 + bne _02224E9E + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov12_022255D4 +_02224E9E: + add r4, r4, #1 + cmp r4, r6 + blt _02224E86 +_02224EA4: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02224E74 + + thumb_func_start ov12_02224EA8 +ov12_02224EA8: ; 0x02224EA8 + add r3, r0, #0 + add r2, r1, #0 + add r1, r3, #0 + ldr r3, _02224EB4 ; =ov12_0222584C + ldr r0, [r2, #0x20] + bx r3 + ; .align 2, 0 +_02224EB4: .word ov12_0222584C + thumb_func_end ov12_02224EA8 + + thumb_func_start ov12_02224EB8 +ov12_02224EB8: ; 0x02224EB8 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #0] + ldr r1, [r6, #0x24] + bl ov12_02235254 + ldr r0, [r6, #0] + ldr r1, [r6, #0x28] + bl ov12_02235254 + ldr r1, [r6, #0xc] + cmp r1, #3 + bhi _02224F00 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02224EE0: ; jump table + .short _02224F00 - _02224EE0 - 2 ; case 0 + .short _02224EE8 - _02224EE0 - 2 ; case 1 + .short _02224EF6 - _02224EE0 - 2 ; case 2 + .short _02224F00 - _02224EE0 - 2 ; case 3 +_02224EE8: + cmp r0, #0 + bne _02224EF2 + mov r4, #1 + lsl r4, r4, #8 + b _02224F00 +_02224EF2: + ldr r4, _02224F0C ; =0xFFFFEC00 + b _02224F00 +_02224EF6: + cmp r0, #0 + bne _02224EFE + mov r4, #0 + b _02224F00 +_02224EFE: + ldr r4, _02224F10 ; =0xFFFFEB00 +_02224F00: + ldr r0, [r5, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r4, r0 + str r0, [r5, #0x30] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02224F0C: .word 0xFFFFEC00 +_02224F10: .word 0xFFFFEB00 + thumb_func_end ov12_02224EB8 + + thumb_func_start ov12_02224F14 +ov12_02224F14: ; 0x02224F14 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl sub_02014764 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x38 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_02220250 + str r0, [r4, #4] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0xc + mov r2, #6 + bl ov12_0222325C + ldr r0, [r4, #0x10] + cmp r0, #4 + bhi _02224F5C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02224F52: ; jump table + .short _02224F5C - _02224F52 - 2 ; case 0 + .short _02224F6E - _02224F52 - 2 ; case 1 + .short _02224F80 - _02224F52 - 2 ; case 2 + .short _02224F92 - _02224F52 - 2 ; case 3 + .short _02224FA4 - _02224F52 - 2 ; case 4 +_02224F5C: + ldr r0, [r4, #0] + bl ov12_02220240 + str r0, [r4, #0x24] + ldr r0, [r4, #0] + bl ov12_02220248 + str r0, [r4, #0x28] + b _02224FB4 +_02224F6E: + ldr r0, [r4, #0] + bl ov12_02220248 + str r0, [r4, #0x24] + ldr r0, [r4, #0] + bl ov12_02220240 + str r0, [r4, #0x28] + b _02224FB4 +_02224F80: + ldr r0, [r4, #0] + bl ov12_02220240 + str r0, [r4, #0x24] + ldr r0, [r4, #0] + bl ov12_02220248 + str r0, [r4, #0x28] + b _02224FB4 +_02224F92: + ldr r0, [r4, #0] + bl ov12_02220248 + str r0, [r4, #0x24] + ldr r0, [r4, #0] + bl ov12_02220240 + str r0, [r4, #0x28] + b _02224FB4 +_02224FA4: + ldr r0, [r4, #0] + bl ov12_02220240 + str r0, [r4, #0x24] + ldr r0, [r4, #0] + bl ov12_02220248 + str r0, [r4, #0x28] +_02224FB4: + add r0, r6, #0 + add r1, r4, #0 + bl ov12_0222421C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02224F14 + + thumb_func_start ov12_02224FC4 +ov12_02224FC4: ; 0x02224FC4 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + ldr r1, [r6, #0x24] + mov r4, #1 + bl ov12_02235254 + add r5, r0, #0 + ldr r0, [r6, #0] + ldr r1, [r6, #0x28] + bl ov12_02235254 + cmp r5, #5 + bhi _02225002 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02224FEC: ; jump table + .short _02225002 - _02224FEC - 2 ; case 0 + .short _02224FF8 - _02224FEC - 2 ; case 1 + .short _02225002 - _02224FEC - 2 ; case 2 + .short _02224FFC - _02224FEC - 2 ; case 3 + .short _02225002 - _02224FEC - 2 ; case 4 + .short _02225000 - _02224FEC - 2 ; case 5 +_02224FF8: + sub r4, r4, #2 + b _02225002 +_02224FFC: + sub r4, r4, #2 + b _02225002 +_02225000: + sub r4, r4, #2 +_02225002: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02224FC4 + + thumb_func_start ov12_02225008 +ov12_02225008: ; 0x02225008 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r0, sp, #0x20 + mov r4, #0 + str r4, [r0, #0] + str r4, [r0, #4] + add r6, r1, #0 + add r7, r2, #0 + str r4, [r0, #8] +_0222501C: + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov12_02235254 + cmp r4, r0 + ldr r0, [r5, #0] + bne _02225034 + add r1, sp, #0x10 + mov r2, #4 + bl ov12_0222325C + b _0222503C +_02225034: + add r1, sp, #0 + mov r2, #4 + bl ov12_0222325C +_0222503C: + add r4, r4, #1 + cmp r4, #6 + blt _0222501C + add r0, r5, #0 + bl ov12_02224FC4 + strb r0, [r5, #8] + ldr r0, [sp, #0x14] + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + str r0, [sp, #0x24] + ldr r0, [sp, #0x1c] + str r0, [sp, #0x28] + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _02225060 + mov r0, #1 + strb r0, [r5, #8] +_02225060: + mov r1, #8 + ldrsb r0, [r5, r1] + ldr r2, [sp, #0x20] + ldr r3, [sp, #0x24] + mul r0, r2 + str r0, [sp, #0x20] + ldrsb r2, [r5, r1] + mul r2, r3 + str r2, [sp, #0x24] + ldrsb r1, [r5, r1] + ldr r2, [sp, #0x28] + mul r1, r2 + str r1, [sp, #0x28] + ldr r1, [r7, #0] + add r0, r1, r0 + str r0, [r7, #0] + ldr r1, [r7, #4] + ldr r0, [sp, #0x24] + add r0, r1, r0 + str r0, [r7, #4] + ldr r1, [r7, #8] + ldr r0, [sp, #0x28] + add r0, r1, r0 + str r0, [r7, #8] + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_02225008 + + thumb_func_start ov12_02225094 +ov12_02225094: ; 0x02225094 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + add r4, r1, #0 + add r1, sp, #0 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + ldr r0, [r5, #0] + add r1, sp, #0xc + mov r2, #4 + bl ov12_0222325C + add r0, r5, #0 + bl ov12_02224FC4 + strb r0, [r5, #8] + ldr r0, [sp, #0x10] + str r0, [sp] + ldr r0, [sp, #0x14] + str r0, [sp, #4] + ldr r0, [sp, #0x18] + str r0, [sp, #8] + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _022250CE + mov r0, #1 + strb r0, [r5, #8] +_022250CE: + mov r1, #8 + ldrsb r0, [r5, r1] + ldr r2, [sp] + ldr r3, [sp, #4] + mul r0, r2 + str r0, [sp] + ldrsb r2, [r5, r1] + mul r2, r3 + str r2, [sp, #4] + ldrsb r1, [r5, r1] + ldr r2, [sp, #8] + mul r1, r2 + str r1, [sp, #8] + ldr r1, [r4, #0] + add r0, r1, r0 + str r0, [r4, #0] + ldr r1, [r4, #4] + ldr r0, [sp, #4] + add r0, r1, r0 + str r0, [r4, #4] + ldr r1, [r4, #8] + ldr r0, [sp, #8] + add r0, r1, r0 + str r0, [r4, #8] + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02225094 + + .rodata + + + .global Unk_ov12_02238E9C +Unk_ov12_02238E9C: ; 0x02238E9C + .incbin "incbin/overlay12_rodata.bin", 0x908, 0x918 - 0x908 + + .global Unk_ov12_02238EAC +Unk_ov12_02238EAC: ; 0x02238EAC + .incbin "incbin/overlay12_rodata.bin", 0x918, 0x948 - 0x918 + + .global Unk_ov12_02238EDC +Unk_ov12_02238EDC: ; 0x02238EDC + .incbin "incbin/overlay12_rodata.bin", 0x948, 0x978 - 0x948 + + .global Unk_ov12_02238F0C +Unk_ov12_02238F0C: ; 0x02238F0C + .incbin "incbin/overlay12_rodata.bin", 0x978, 0x9B0 - 0x978 + + .global Unk_ov12_02238F44 +Unk_ov12_02238F44: ; 0x02238F44 + .incbin "incbin/overlay12_rodata.bin", 0x9B0, 0x9E8 - 0x9B0 + + .global Unk_ov12_02238F7C +Unk_ov12_02238F7C: ; 0x02238F7C + .incbin "incbin/overlay12_rodata.bin", 0x9E8, 0xA58 - 0x9E8 + + .global Unk_ov12_02238FEC +Unk_ov12_02238FEC: ; 0x02238FEC + .incbin "incbin/overlay12_rodata.bin", 0xA58, 0xC08 - 0xA58 + + .global Unk_ov12_0223919C +Unk_ov12_0223919C: ; 0x0223919C + .incbin "incbin/overlay12_rodata.bin", 0xC08, 0xDB8 - 0xC08 + + .global Unk_ov12_0223934C +Unk_ov12_0223934C: ; 0x0223934C + .incbin "incbin/overlay12_rodata.bin", 0xDB8, 0xF68 - 0xDB8 + + .global Unk_ov12_022394FC +Unk_ov12_022394FC: ; 0x022394FC + .incbin "incbin/overlay12_rodata.bin", 0xF68, 0x1118 - 0xF68 + + .global Unk_ov12_022396AC +Unk_ov12_022396AC: ; 0x022396AC + .incbin "incbin/overlay12_rodata.bin", 0x1118, 0x12C8 - 0x1118 + + .global Unk_ov12_0223985C +Unk_ov12_0223985C: ; 0x0223985C + .incbin "incbin/overlay12_rodata.bin", 0x12C8, 0x1478 - 0x12C8 + + .global Unk_ov12_02239A0C +Unk_ov12_02239A0C: ; 0x02239A0C + .incbin "incbin/overlay12_rodata.bin", 0x1478, 0x1628 - 0x1478 + + .global Unk_ov12_02239BBC +Unk_ov12_02239BBC: ; 0x02239BBC + .incbin "incbin/overlay12_rodata.bin", 0x1628, 0x1B0 + diff --git a/asm/ov12_02225104.s b/asm/ov12_02225104.s new file mode 100644 index 000000000..e1550ed67 --- /dev/null +++ b/asm/ov12_02225104.s @@ -0,0 +1,772 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02225104 +ov12_02225104: ; 0x02225104 + ldr r3, _0222510C ; =ov12_0222325C + ldr r0, [r0, #0] + mov r2, #5 + bx r3 + ; .align 2, 0 +_0222510C: .word ov12_0222325C + thumb_func_end ov12_02225104 + + thumb_func_start ov12_02225110 +ov12_02225110: ; 0x02225110 + mov r0, #1 + bx lr + thumb_func_end ov12_02225110 + + thumb_func_start ov12_02225114 +ov12_02225114: ; 0x02225114 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + add r4, r1, #0 + add r1, sp, #0 + mov r0, #0 + strh r0, [r1] + strh r0, [r1, #2] + strh r0, [r1, #4] + add r0, r4, #0 + add r1, sp, #8 + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _02225140 + mov r0, #1 + strb r0, [r4, #8] +_02225140: + ldr r0, [sp, #8] + cmp r0, #3 + bgt _0222515E + cmp r0, #0 + blt _022251CA + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02225156: ; jump table + .short _02225162 - _02225156 - 2 ; case 0 + .short _0222518E - _02225156 - 2 ; case 1 + .short _022251CA - _02225156 - 2 ; case 2 + .short _022251CA - _02225156 - 2 ; case 3 +_0222515E: + cmp r0, #0xff + b _022251CA +_02225162: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014874 + add r2, sp, #0 + mov r0, #0 + mov r1, #8 + ldrsh r3, [r2, r0] + ldrsb r0, [r4, r1] + mul r0, r3 + strh r0, [r2] + mov r0, #2 + ldrsh r3, [r2, r0] + ldrsb r0, [r4, r1] + mul r0, r3 + strh r0, [r2, #2] + mov r0, #4 + ldrsh r3, [r2, r0] + ldrsb r0, [r4, r1] + mul r0, r3 + strh r0, [r2, #4] + b _022251CA +_0222518E: + ldr r0, [sp, #0x10] + add r2, sp, #0 + strh r0, [r2] + ldr r0, [sp, #0x14] + mov r1, #8 + strh r0, [r2, #2] + ldr r0, [sp, #0x18] + strh r0, [r2, #4] + mov r0, #0 + ldrsh r3, [r2, r0] + ldrsb r0, [r4, r1] + mul r0, r3 + strh r0, [r2] + mov r0, #2 + ldrsh r3, [r2, r0] + ldrsb r0, [r4, r1] + mul r0, r3 + strh r0, [r2, #2] + mov r0, #4 + ldrsh r3, [r2, r0] + ldrsb r0, [r4, r1] + add r1, sp, #0 + mul r0, r3 + strh r0, [r2, #4] + add r0, r5, #0 + bl sub_02014874 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, pc} +_022251CA: + add r1, sp, #0 + mov r0, #0 + ldrsh r2, [r1, r0] + ldr r0, [r4, #0x2c] + sub r0, r2, r0 + strh r0, [r1] + mov r0, #2 + ldrsh r2, [r1, r0] + ldr r0, [r4, #0x30] + sub r0, r2, r0 + strh r0, [r1, #2] + mov r0, #4 + ldrsh r2, [r1, r0] + ldr r0, [r4, #0x34] + sub r0, r2, r0 + strh r0, [r1, #4] + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014874 + mov r0, #1 + add sp, #0x1c + pop {r4, r5, pc} + thumb_func_end ov12_02225114 + + thumb_func_start ov12_022251F8 +ov12_022251F8: ; 0x022251F8 + mov r0, #1 + bx lr + thumb_func_end ov12_022251F8 + + thumb_func_start ov12_022251FC +ov12_022251FC: ; 0x022251FC + mov r0, #1 + bx lr + thumb_func_end ov12_022251FC + + thumb_func_start ov12_02225200 +ov12_02225200: ; 0x02225200 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r5, r0, #0 + add r4, r1, #0 + add r1, sp, #0 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + add r1, sp, #0xc + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _0222522C + mov r0, #1 + strb r0, [r4, #8] +_0222522C: + ldr r0, [sp, #0xc] + cmp r0, #3 + bgt _0222524A + cmp r0, #0 + blt _022252AA + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02225242: ; jump table + .short _0222524E - _02225242 - 2 ; case 0 + .short _02225272 - _02225242 - 2 ; case 1 + .short _02225294 - _02225242 - 2 ; case 2 + .short _022252A0 - _02225242 - 2 ; case 3 +_0222524A: + cmp r0, #0xff + b _022252AA +_0222524E: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020148A8 + mov r0, #8 + ldrsb r1, [r4, r0] + ldr r2, [sp] + mul r1, r2 + str r1, [sp] + ldrsb r1, [r4, r0] + ldr r2, [sp, #4] + mul r1, r2 + str r1, [sp, #4] + ldrsb r0, [r4, r0] + ldr r1, [sp, #8] + mul r0, r1 + str r0, [sp, #8] + b _022252AA +_02225272: + ldr r2, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x1c] + str r2, [sp] + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #8 + ldrsb r6, [r4, r3] + mul r6, r2 + str r6, [sp] + ldrsb r2, [r4, r3] + mul r2, r1 + str r2, [sp, #4] + ldrsb r1, [r4, r3] + mul r1, r0 + str r1, [sp, #8] + b _022252AA +_02225294: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0 + bl ov12_02235508 + b _022252AA +_022252A0: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0 + bl ov12_02235508 +_022252AA: + ldr r1, [sp] + ldr r0, [r4, #0x2c] + sub r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r4, #0x30] + sub r0, r1, r0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014890 + mov r0, #1 + add sp, #0x20 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02225200 + + thumb_func_start ov12_022252C8 +ov12_022252C8: ; 0x022252C8 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + add r0, sp, #0 + strh r1, [r0] + add r0, r4, #0 + add r1, sp, #4 + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #8] + cmp r0, #1 + bne _022252F0 + mov r0, #1 + strb r0, [r4, #8] +_022252F0: + ldr r0, [sp, #4] + cmp r0, #3 + bgt _0222530E + cmp r0, #0 + blt _0222533C + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02225306: ; jump table + .short _02225312 - _02225306 - 2 ; case 0 + .short _0222532A - _02225306 - 2 ; case 1 + .short _0222533C - _02225306 - 2 ; case 2 + .short _0222533C - _02225306 - 2 ; case 3 +_0222530E: + cmp r0, #0xff + b _0222533C +_02225312: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020148F4 + add r1, sp, #0 + mov r0, #0 + ldrsh r2, [r1, r0] + mov r0, #8 + ldrsb r0, [r4, r0] + mul r0, r2 + strh r0, [r1] + b _0222533C +_0222532A: + ldr r0, [sp, #0xc] + add r1, sp, #0 + strh r0, [r1] + mov r0, #0 + ldrsh r2, [r1, r0] + mov r0, #8 + ldrsb r0, [r4, r0] + mul r0, r2 + strh r0, [r1] +_0222533C: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020148DC + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022252C8 + + thumb_func_start ov12_0222534C +ov12_0222534C: ; 0x0222534C + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + add r0, sp, #0 + strh r1, [r0] + add r0, r4, #0 + add r1, sp, #4 + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #8] + cmp r0, #1 + bne _02225374 + mov r0, #1 + strb r0, [r4, #8] +_02225374: + ldr r0, [sp, #4] + cmp r0, #3 + bgt _02225392 + cmp r0, #0 + blt _022253BC + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222538A: ; jump table + .short _02225396 - _0222538A - 2 ; case 0 + .short _022253AC - _0222538A - 2 ; case 1 + .short _022253BC - _0222538A - 2 ; case 2 + .short _022253BC - _0222538A - 2 ; case 3 +_02225392: + cmp r0, #0xff + b _022253BC +_02225396: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014924 + add r1, sp, #0 + mov r0, #8 + ldrh r2, [r1] + ldrsb r0, [r4, r0] + mul r0, r2 + strh r0, [r1] + b _022253BC +_022253AC: + ldr r0, [sp, #0xc] + add r1, sp, #0 + strh r0, [r1] + mov r0, #8 + ldrh r2, [r1] + ldrsb r0, [r4, r0] + mul r0, r2 + strh r0, [r1] +_022253BC: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014910 + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222534C + + thumb_func_start ov12_022253CC +ov12_022253CC: ; 0x022253CC + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + add r0, sp, #0 + strh r1, [r0] + add r0, r4, #0 + add r1, sp, #4 + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #8] + cmp r0, #1 + bne _022253F4 + mov r0, #1 + strb r0, [r4, #8] +_022253F4: + ldr r1, [sp, #4] + cmp r1, #3 + bgt _02225412 + cmp r1, #0 + blt _02225426 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222540A: ; jump table + .short _02225416 - _0222540A - 2 ; case 0 + .short _02225420 - _0222540A - 2 ; case 1 + .short _02225426 - _0222540A - 2 ; case 2 + .short _02225426 - _0222540A - 2 ; case 3 +_02225412: + cmp r1, #0xff + b _02225426 +_02225416: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014954 + b _02225426 +_02225420: + ldr r1, [sp, #0xc] + add r0, sp, #0 + strh r1, [r0] +_02225426: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02014940 + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov12_022253CC + + thumb_func_start ov12_02225434 +ov12_02225434: ; 0x02225434 + mov r0, #1 + bx lr + thumb_func_end ov12_02225434 + + thumb_func_start ov12_02225438 +ov12_02225438: ; 0x02225438 + mov r0, #1 + bx lr + thumb_func_end ov12_02225438 + + thumb_func_start ov12_0222543C +ov12_0222543C: ; 0x0222543C + mov r0, #1 + bx lr + thumb_func_end ov12_0222543C + + thumb_func_start ov12_02225440 +ov12_02225440: ; 0x02225440 + mov r0, #1 + bx lr + thumb_func_end ov12_02225440 + + thumb_func_start ov12_02225444 +ov12_02225444: ; 0x02225444 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r7, r0, #0 + add r4, r1, #0 + add r1, sp, #0 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + add r1, sp, #0xc + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _02225470 + mov r0, #1 + strb r0, [r4, #8] +_02225470: + ldr r0, [sp, #0xc] + cmp r0, #4 + bgt _02225490 + cmp r0, #0 + blt _0222552A + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02225486: ; jump table + .short _02225494 - _02225486 - 2 ; case 0 + .short _022254B8 - _02225486 - 2 ; case 1 + .short _02225514 - _02225486 - 2 ; case 2 + .short _02225520 - _02225486 - 2 ; case 3 + .short _022254DA - _02225486 - 2 ; case 4 +_02225490: + cmp r0, #0xff + b _0222552A +_02225494: + add r0, r7, #0 + add r1, sp, #0 + bl sub_02014988 + mov r0, #8 + ldrsb r1, [r4, r0] + ldr r2, [sp] + mul r1, r2 + str r1, [sp] + ldrsb r1, [r4, r0] + ldr r2, [sp, #4] + mul r1, r2 + str r1, [sp, #4] + ldrsb r0, [r4, r0] + ldr r1, [sp, #8] + mul r0, r1 + str r0, [sp, #8] + b _0222552A +_022254B8: + ldr r2, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x1c] + str r2, [sp] + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #8 + ldrsb r5, [r4, r3] + mul r5, r2 + str r5, [sp] + ldrsb r2, [r4, r3] + mul r2, r1 + str r2, [sp, #4] + ldrsb r1, [r4, r3] + mul r1, r0 + str r1, [sp, #8] + b _0222552A +_022254DA: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0 + bl ov12_02235508 + ldr r1, [sp] + ldr r5, [sp, #0x14] + add r0, r1, #0 + ldr r6, [sp, #0x18] + mul r0, r5 + add r1, r6, #0 + bl sub_020E1F6C + ldr r1, [sp, #4] + str r0, [sp] + add r0, r1, #0 + mul r0, r5 + add r1, r6, #0 + bl sub_020E1F6C + ldr r1, [sp, #8] + str r0, [sp, #4] + add r0, r1, #0 + mul r0, r5 + add r1, r6, #0 + bl sub_020E1F6C + str r0, [sp, #8] + b _0222552A +_02225514: + ldr r0, [r4, #0] + ldr r1, [r4, #0x24] + add r2, sp, #0 + bl ov12_02235508 + b _0222552A +_02225520: + ldr r0, [r4, #0] + ldr r1, [r4, #0x28] + add r2, sp, #0 + bl ov12_02235508 +_0222552A: + ldr r1, [sp] + ldr r0, [r4, #0x2c] + sub r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r4, #0x30] + sub r0, r1, r0 + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [r4, #0x34] + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r7, #0 + add r1, sp, #0 + bl sub_02014970 + mov r0, #1 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02225444 + + thumb_func_start ov12_02225550 +ov12_02225550: ; 0x02225550 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + add r0, sp, #0 + strh r1, [r0] + add r0, r4, #0 + add r1, sp, #4 + bl ov12_02225104 + add r0, r4, #0 + bl ov12_02224FC4 + strb r0, [r4, #8] + ldr r0, [sp, #8] + cmp r0, #1 + bne _02225578 + mov r0, #1 + strb r0, [r4, #8] +_02225578: + ldr r0, [sp, #4] + cmp r0, #3 + bgt _02225596 + cmp r0, #0 + blt _022255C4 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222558E: ; jump table + .short _0222559A - _0222558E - 2 ; case 0 + .short _022255B2 - _0222558E - 2 ; case 1 + .short _022255C4 - _0222558E - 2 ; case 2 + .short _022255C4 - _0222558E - 2 ; case 3 +_02225596: + cmp r0, #0xff + b _022255C4 +_0222559A: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020149D4 + add r1, sp, #0 + mov r0, #0 + ldrsh r2, [r1, r0] + mov r0, #8 + ldrsb r0, [r4, r0] + mul r0, r2 + strh r0, [r1] + b _022255C4 +_022255B2: + ldr r0, [sp, #0xc] + add r1, sp, #0 + strh r0, [r1] + mov r0, #0 + ldrsh r2, [r1, r0] + mov r0, #8 + ldrsb r0, [r4, r0] + mul r0, r2 + strh r0, [r1] +_022255C4: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020149BC + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02225550 + + thumb_func_start ov12_022255D4 +ov12_022255D4: ; 0x022255D4 + push {r3, lr} + add r3, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + ldr r2, _022255E8 ; =0x02239D6C + lsl r3, r3, #2 + ldr r2, [r2, r3] + blx r2 + pop {r3, pc} + nop +_022255E8: .word 0x02239D6C + thumb_func_end ov12_022255D4 + + thumb_func_start ov12_022255EC +ov12_022255EC: ; 0x022255EC + push {r3, r4, r5} + sub sp, #0x3c + ldr r4, _02225610 ; =0x02239DA4 + add r5, r0, #0 + add r3, sp, #0 + mov r2, #7 +_022255F8: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _022255F8 + ldr r0, [r4, #0] + lsl r1, r5, #2 + str r0, [r3, #0] + add r0, sp, #0 + ldr r0, [r0, r1] + add sp, #0x3c + pop {r3, r4, r5} + bx lr + ; .align 2, 0 +_02225610: .word 0x02239DA4 + thumb_func_end ov12_022255EC + + thumb_func_start ov12_02225614 +ov12_02225614: ; 0x02225614 + push {r4, r5, r6, lr} + mov r4, #0 + ldr r6, _0222563C ; =0x0000FEFE + add r5, r4, #0 +_0222561C: + add r0, r4, #0 + bl ov12_022255EC + add r4, r4, #1 + cmp r0, r6 + beq _0222562E + add r5, r5, #1 + cmp r5, #0xff + blt _0222561C +_0222562E: + cmp r5, #0xff + blt _02225636 + mov r0, #0 + pop {r4, r5, r6, pc} +_02225636: + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_0222563C: .word 0x0000FEFE + thumb_func_end ov12_02225614 + + .rodata + + + .global Unk_ov12_02239D6C +Unk_ov12_02239D6C: ; 0x02239D6C + .incbin "incbin/overlay12_rodata.bin", 0x17D8, 0x1810 - 0x17D8 + + .global Unk_ov12_02239DA4 +Unk_ov12_02239DA4: ; 0x02239DA4 + .incbin "incbin/overlay12_rodata.bin", 0x1810, 0x3C + diff --git a/asm/ov12_02225640.s b/asm/ov12_02225640.s new file mode 100644 index 000000000..0a137bc8c --- /dev/null +++ b/asm/ov12_02225640.s @@ -0,0 +1,330 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02225640 +ov12_02225640: ; 0x02225640 + ldr r3, _02225648 ; =ov12_0222325C + ldr r0, [r0, #0] + mov r2, #4 + bx r3 + ; .align 2, 0 +_02225648: .word ov12_0222325C + thumb_func_end ov12_02225640 + + thumb_func_start ov12_0222564C +ov12_0222564C: ; 0x0222564C + push {r3, lr} + sub sp, #8 + add r2, sp, #0 + mov r0, #0 + strh r0, [r2] + strh r0, [r2, #2] + strh r0, [r2, #4] + strh r0, [r2, #6] + ldr r0, [r1, #4] + bl sub_02014784 + add r1, r0, #0 + add r0, sp, #0 + bl sub_020209D4 + mov r0, #1 + add sp, #8 + pop {r3, pc} + thumb_func_end ov12_0222564C + + thumb_func_start ov12_02225670 +ov12_02225670: ; 0x02225670 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldr r1, _022256A8 ; =0x02239DE0 + add r0, sp, #0 + ldrh r2, [r1, #0x20] + strh r2, [r0] + ldrh r2, [r1, #0x22] + strh r2, [r0, #2] + ldrh r2, [r1, #0x24] + ldrh r1, [r1, #0x26] + strh r2, [r0, #4] + strh r1, [r0, #6] + ldr r0, [r4, #4] + bl sub_02014784 + add r5, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02014788 + add r0, sp, #0 + add r1, r5, #0 + bl sub_020209D4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022256A8: .word 0x02239DE0 + thumb_func_end ov12_02225670 + + thumb_func_start ov12_022256AC +ov12_022256AC: ; 0x022256AC + push {r4, lr} + sub sp, #0x18 + add r4, r1, #0 + add r1, sp, #0 + mov r0, #0 + strh r0, [r1] + strh r0, [r1, #2] + strh r0, [r1, #4] + strh r0, [r1, #6] + add r0, r4, #0 + add r1, sp, #8 + bl ov12_02225640 + ldr r1, [sp, #0xc] + add r0, sp, #0 + strh r1, [r0] + ldr r1, [sp, #0x10] + strh r1, [r0, #2] + ldr r1, [sp, #0x14] + strh r1, [r0, #4] + ldr r0, [r4, #4] + bl sub_02014784 + add r1, r0, #0 + add r0, sp, #0 + bl sub_020209D4 + mov r0, #1 + add sp, #0x18 + pop {r4, pc} + thumb_func_end ov12_022256AC + + thumb_func_start ov12_022256E8 +ov12_022256E8: ; 0x022256E8 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldr r1, _02225720 ; =0x02239DE0 + add r0, sp, #0 + ldrh r2, [r1, #0x18] + strh r2, [r0] + ldrh r2, [r1, #0x1a] + strh r2, [r0, #2] + ldrh r2, [r1, #0x1c] + ldrh r1, [r1, #0x1e] + strh r2, [r0, #4] + strh r1, [r0, #6] + ldr r0, [r4, #4] + bl sub_02014784 + add r5, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02014788 + add r0, sp, #0 + add r1, r5, #0 + bl sub_020209D4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02225720: .word 0x02239DE0 + thumb_func_end ov12_022256E8 + + thumb_func_start ov12_02225724 +ov12_02225724: ; 0x02225724 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r1, _02225780 ; =0x02239DE0 + add r0, sp, #0 + ldrh r2, [r1, #0x10] + strh r2, [r0, #8] + ldrh r2, [r1, #0x12] + strh r2, [r0, #0xa] + ldrh r2, [r1, #0x14] + strh r2, [r0, #0xc] + ldrh r2, [r1, #0x16] + strh r2, [r0, #0xe] + ldrh r2, [r1, #0x28] + strh r2, [r0] + ldrh r2, [r1, #0x2a] + strh r2, [r0, #2] + ldrh r2, [r1, #0x2c] + strh r2, [r0, #4] + ldrh r1, [r1, #0x2e] + strh r1, [r0, #6] + ldr r0, [r4, #4] + bl sub_02014784 + add r5, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02014788 + ldr r0, [r4, #0] + bl ov12_0221FDD4 + cmp r0, #1 + bne _02225772 + add r0, sp, #8 + add r1, r5, #0 + bl sub_020209D4 + b _0222577A +_02225772: + add r0, sp, #0 + add r1, r5, #0 + bl sub_020209D4 +_0222577A: + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02225780: .word 0x02239DE0 + thumb_func_end ov12_02225724 + + thumb_func_start ov12_02225784 +ov12_02225784: ; 0x02225784 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldr r1, _022257BC ; =0x02239DE0 + add r0, sp, #0 + ldrh r2, [r1] + strh r2, [r0] + ldrh r2, [r1, #2] + strh r2, [r0, #2] + ldrh r2, [r1, #4] + ldrh r1, [r1, #6] + strh r2, [r0, #4] + strh r1, [r0, #6] + ldr r0, [r4, #4] + bl sub_02014784 + add r5, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02014788 + add r0, sp, #0 + add r1, r5, #0 + bl sub_020209D4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022257BC: .word 0x02239DE0 + thumb_func_end ov12_02225784 + + thumb_func_start ov12_022257C0 +ov12_022257C0: ; 0x022257C0 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldr r1, _022257F8 ; =0x02239DE0 + add r0, sp, #0 + ldrh r2, [r1, #8] + strh r2, [r0] + ldrh r2, [r1, #0xa] + strh r2, [r0, #2] + ldrh r2, [r1, #0xc] + ldrh r1, [r1, #0xe] + strh r2, [r0, #4] + strh r1, [r0, #6] + ldr r0, [r4, #4] + bl sub_02014784 + add r5, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02014788 + add r0, sp, #0 + add r1, r5, #0 + bl sub_020209D4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022257F8: .word 0x02239DE0 + thumb_func_end ov12_022257C0 + + thumb_func_start ov12_022257FC +ov12_022257FC: ; 0x022257FC + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r0, [r5, #4] + bl sub_02014784 + add r4, r0, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #0x24] + add r2, sp, #0 + bl ov12_022356E8 + add r0, sp, #0 + add r1, r4, #0 + bl sub_02020ACC + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022257FC + + thumb_func_start ov12_02225824 +ov12_02225824: ; 0x02225824 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r0, [r5, #4] + bl sub_02014784 + add r4, r0, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #0x28] + add r2, sp, #0 + bl ov12_022356E8 + add r0, sp, #0 + add r1, r4, #0 + bl sub_02020ACC + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02225824 + + thumb_func_start ov12_0222584C +ov12_0222584C: ; 0x0222584C + push {r3, lr} + add r3, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + ldr r2, _02225860 ; =0x02239E10 + lsl r3, r3, #2 + ldr r2, [r2, r3] + blx r2 + pop {r3, pc} + nop +_02225860: .word 0x02239E10 + thumb_func_end ov12_0222584C + + .rodata + + + .global Unk_ov12_02239DE0 +Unk_ov12_02239DE0: ; 0x02239DE0 + .incbin "incbin/overlay12_rodata.bin", 0x184C, 0x1854 - 0x184C + + .global Unk_ov12_02239DE8 +Unk_ov12_02239DE8: ; 0x02239DE8 + .incbin "incbin/overlay12_rodata.bin", 0x1854, 0x185C - 0x1854 + + .global Unk_ov12_02239DF0 +Unk_ov12_02239DF0: ; 0x02239DF0 + .incbin "incbin/overlay12_rodata.bin", 0x185C, 0x1864 - 0x185C + + .global Unk_ov12_02239DF8 +Unk_ov12_02239DF8: ; 0x02239DF8 + .incbin "incbin/overlay12_rodata.bin", 0x1864, 0x186C - 0x1864 + + .global Unk_ov12_02239E00 +Unk_ov12_02239E00: ; 0x02239E00 + .incbin "incbin/overlay12_rodata.bin", 0x186C, 0x1874 - 0x186C + + .global Unk_ov12_02239E08 +Unk_ov12_02239E08: ; 0x02239E08 + .incbin "incbin/overlay12_rodata.bin", 0x1874, 0x187C - 0x1874 + + .global Unk_ov12_02239E10 +Unk_ov12_02239E10: ; 0x02239E10 + .incbin "incbin/overlay12_rodata.bin", 0x187C, 0x24 + diff --git a/asm/ov12_02225864.s b/asm/ov12_02225864.s new file mode 100644 index 000000000..b53f8d6e1 --- /dev/null +++ b/asm/ov12_02225864.s @@ -0,0 +1,2468 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02225864 +ov12_02225864: ; 0x02225864 + push {r3, r4, r5, r6} + cmp r2, #0 + beq _0222587A + mov r4, #0x18 + add r6, r0, #0 + mul r6, r4 + ldr r4, _02225890 ; =0x02239E34 + lsl r5, r1, #2 + add r4, r4, r6 + ldrsh r4, [r5, r4] + strh r4, [r2] +_0222587A: + cmp r3, #0 + beq _0222588C + mov r2, #0x18 + mul r2, r0 + ldr r0, _02225894 ; =0x02239E36 + lsl r1, r1, #2 + add r0, r0, r2 + ldrsh r0, [r1, r0] + strh r0, [r3] +_0222588C: + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_02225890: .word 0x02239E34 +_02225894: .word 0x02239E36 + thumb_func_end ov12_02225864 + + thumb_func_start ov12_02225898 +ov12_02225898: ; 0x02225898 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _022258B8 + mov r0, #0 + add r1, r5, #2 + add r2, r4, #0 + add r3, r6, #0 + bl ov12_02225864 + pop {r3, r4, r5, r6, r7, pc} +_022258B8: + add r0, r7, #0 + bl ov12_02223364 + cmp r0, #1 + bne _022258D0 + mov r0, #1 + sub r1, r5, #2 + add r2, r4, #0 + add r3, r6, #0 + bl ov12_02225864 + pop {r3, r4, r5, r6, r7, pc} +_022258D0: + mov r0, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov12_02225864 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02225898 + + thumb_func_start ov12_022258E0 +ov12_022258E0: ; 0x022258E0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r2, #0 + bl ov12_02235254 + add r4, r0, #0 + add r0, r7, #0 + bl ov12_02223364 + cmp r0, #1 + bne _022258FA + mov r5, #1 + b _022258FC +_022258FA: + mov r5, #0 +_022258FC: + add r0, r7, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02225908 + add r4, r4, #2 +_02225908: + cmp r6, #3 + bhi _02225940 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02225918: ; jump table + .short _02225920 - _02225918 - 2 ; case 0 + .short _02225930 - _02225918 - 2 ; case 1 + .short _02225920 - _02225918 - 2 ; case 2 + .short _02225930 - _02225918 - 2 ; case 3 +_02225920: + mov r0, #0x18 + add r2, r5, #0 + mul r2, r0 + ldr r0, _02225948 ; =0x02239E34 + lsl r1, r4, #2 + add r0, r0, r2 + ldrsh r0, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_02225930: + mov r0, #0x18 + add r2, r5, #0 + mul r2, r0 + ldr r0, _0222594C ; =0x02239E36 + lsl r1, r4, #2 + add r0, r0, r2 + ldrsh r0, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_02225940: + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02225948: .word 0x02239E34 +_0222594C: .word 0x02239E36 + thumb_func_end ov12_022258E0 + + thumb_func_start ov12_02225950 +ov12_02225950: ; 0x02225950 + push {r3, lr} + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, pc} + thumb_func_end ov12_02225950 + + thumb_func_start ov12_02225964 +ov12_02225964: ; 0x02225964 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r5, #1 + bl ov12_0223525C + add r4, r0, #0 + add r0, r6, #0 + bl ov12_0221FDD4 + cmp r0, #0 + beq _02225982 + cmp r4, #3 + bne _02225988 + sub r5, r5, #2 + b _02225988 +_02225982: + cmp r4, #4 + bne _02225988 + sub r5, r5, #2 +_02225988: + add r0, r5, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02225964 + + thumb_func_start ov12_0222598C +ov12_0222598C: ; 0x0222598C + push {r4, lr} + mov r4, #1 + bl ov12_0223525C + cmp r0, #4 + bne _0222599A + sub r4, r4, #2 +_0222599A: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222598C + + thumb_func_start ov12_022259A0 +ov12_022259A0: ; 0x022259A0 + ldr r3, _022259A8 ; =sub_020BCFD0 + sub r0, r1, r0 + lsl r1, r2, #0xc + bx r3 + ; .align 2, 0 +_022259A8: .word sub_020BCFD0 + thumb_func_end ov12_022259A0 + + thumb_func_start ov12_022259AC +ov12_022259AC: ; 0x022259AC + push {r3, lr} + sub r0, r1, r0 + add r1, r2, #0 + bl sub_020BCFD0 + add r1, sp, #0 + str r0, [sp] + bl sub_020BDBCC + cmp r0, #0 + beq _022259CC + mov r0, #1 + ldr r1, [sp] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] +_022259CC: + ldr r0, [sp] + cmp r0, #0 + bge _022259D4 + neg r0, r0 +_022259D4: + str r0, [sp] + asr r0, r0, #0xc + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_022259AC + + thumb_func_start ov12_022259DC +ov12_022259DC: ; 0x022259DC + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #0 + ldrsh r1, [r4, r1] + add r1, r2, r1 + mov r2, #2 + ldrsh r2, [r4, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, pc} + thumb_func_end ov12_022259DC + + thumb_func_start ov12_022259FC +ov12_022259FC: ; 0x022259FC + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov12_02225FA4 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl sub_0200D6E8 + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_022259FC + + thumb_func_start ov12_02225A18 +ov12_02225A18: ; 0x02225A18 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + add r6, r3, #0 + ldrsh r3, [r5, r1] + add r0, r4, #0 + add r2, r2, r3 + bl sub_02007DEC + mov r2, #2 + ldrsh r2, [r5, r2] + add r0, r4, #0 + mov r1, #1 + add r2, r6, r2 + bl sub_02007DEC + pop {r4, r5, r6, pc} + thumb_func_end ov12_02225A18 + + thumb_func_start ov12_02225A3C +ov12_02225A3C: ; 0x02225A3C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r2, #0 + add r4, r1, #0 + ldrsh r2, [r5, r2] + add r0, r4, #0 + mov r1, #0xc + bl sub_02007DEC + mov r2, #2 + ldrsh r2, [r5, r2] + add r0, r4, #0 + mov r1, #0xd + bl sub_02007DEC + pop {r3, r4, r5, pc} + thumb_func_end ov12_02225A3C + + thumb_func_start ov12_02225A5C +ov12_02225A5C: ; 0x02225A5C + push {r3, r4, r5, lr} + add r4, r3, #0 + add r5, r0, #0 + ldr r3, [sp, #0x1c] + ldr r0, [sp, #0x14] + str r3, [r5, #4] + str r1, [r5, #8] + str r0, [r5, #0xc] + ldr r0, [sp, #0x18] + str r4, [r5, #0x10] + str r0, [r5, #0x14] + sub r0, r2, r1 + add r1, r3, #0 + bl sub_020E1F6C + str r0, [r5, #0x18] + add r0, sp, #0 + ldrh r0, [r0, #0x10] + ldr r1, [sp, #0x1c] + sub r0, r0, r4 + bl sub_020E1F6C + str r0, [r5, #0x1c] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02225A5C + + thumb_func_start ov12_02225A8C +ov12_02225A8C: ; 0x02225A8C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + str r3, [sp] + cmp r5, #0 + bne _02225A9E + bl sub_02022974 +_02225A9E: + cmp r4, r7 + bls _02225AAA + add r0, sp, #8 + ldrh r1, [r0, #0x1c] + neg r1, r1 + strh r1, [r0, #0x1c] +_02225AAA: + add r1, sp, #8 + mov r0, #0x1c + ldrsh r6, [r1, r0] + lsl r0, r4, #0xc + lsl r1, r7, #0xc + lsl r2, r6, #0xc + bl ov12_022259AC + str r0, [r5, #4] + ldr r0, [sp, #0x1c] + str r4, [r5, #8] + str r0, [r5, #0xc] + ldr r0, [sp] + str r0, [r5, #0x10] + ldr r0, [sp, #0x20] + str r0, [r5, #0x14] + str r6, [r5, #0x18] + add r0, sp, #8 + ldrh r1, [r0, #0x10] + ldr r0, [sp] + sub r0, r1, r0 + ldr r1, [r5, #4] + bl sub_020E1F6C + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02225A8C + + thumb_func_start ov12_02225AE0 +ov12_02225AE0: ; 0x02225AE0 + push {r4, lr} + add r4, r0, #0 + bne _02225AEA + bl sub_02022974 +_02225AEA: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225B6E + ldr r1, [r4, #8] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [r4, #8] + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x1c] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r0, [r4, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [r4, #8] + ldr r0, [r4, #0x10] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [r4, #0x10] + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #8] + ldr r2, [r4, #0xc] + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02225B74 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + asr r0, r1, #0xc + strh r0, [r4] + ldr r0, [r4, #0x10] + ldr r2, [r4, #0x14] + asr r0, r0, #4 + lsl r0, r0, #1 + add r0, r0, #1 + lsl r1, r0, #1 + ldr r0, _02225B74 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + asr r0, r1, #0xc + strh r0, [r4, #2] + mov r0, #1 + pop {r4, pc} +_02225B6E: + mov r0, #0 + pop {r4, pc} + nop +_02225B74: .word 0x020F983C + thumb_func_end ov12_02225AE0 + + thumb_func_start ov12_02225B78 +ov12_02225B78: ; 0x02225B78 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov12_02225AE0 + cmp r0, #0 + beq _02225B9A + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov12_022259DC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02225B9A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02225B78 + + thumb_func_start ov12_02225BA0 +ov12_02225BA0: ; 0x02225BA0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov12_02225AE0 + cmp r0, #0 + beq _02225BC2 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov12_02225A18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02225BC2: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02225BA0 + + thumb_func_start ov12_02225BC8 +ov12_02225BC8: ; 0x02225BC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + str r2, [sp] + cmp r5, #0 + bne _02225BDC + bl sub_02022974 +_02225BDC: + strh r4, [r5] + strh r6, [r5, #2] + add r0, sp, #0x10 + ldrh r7, [r0, #0x14] + lsl r0, r4, #0xc + str r0, [sp, #4] + str r7, [r5, #4] + ldr r1, [sp] + add r2, r7, #0 + lsl r1, r1, #0xc + bl ov12_022259A0 + str r0, [r5, #8] + lsl r4, r6, #0xc + add r2, sp, #0x10 + mov r1, #0x10 + ldrsh r1, [r2, r1] + add r0, r4, #0 + add r2, r7, #0 + lsl r1, r1, #0xc + bl ov12_022259A0 + str r0, [r5, #0xc] + ldr r0, [sp, #4] + str r0, [r5, #0x10] + str r4, [r5, #0x14] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02225BC8 + + thumb_func_start ov12_02225C14 +ov12_02225C14: ; 0x02225C14 + push {r4, lr} + add r4, r0, #0 + bne _02225C1E + bl sub_02022974 +_02225C1E: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225C4A + ldr r1, [r4, #0x10] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r1, [r4, #0x14] + ldr r0, [r4, #0xc] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r0, [r4, #0x10] + asr r0, r0, #0xc + strh r0, [r4] + ldr r0, [r4, #0x14] + asr r0, r0, #0xc + strh r0, [r4, #2] + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} +_02225C4A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02225C14 + + thumb_func_start ov12_02225C50 +ov12_02225C50: ; 0x02225C50 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02225C14 + cmp r0, #0 + beq _02225C6E + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov12_022259DC + mov r0, #1 + pop {r3, r4, r5, pc} +_02225C6E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02225C50 + + thumb_func_start ov12_02225C74 +ov12_02225C74: ; 0x02225C74 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02225C14 + cmp r0, #0 + beq _02225C92 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov12_02225A18 + mov r0, #1 + pop {r3, r4, r5, pc} +_02225C92: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02225C74 + + thumb_func_start ov12_02225C98 +ov12_02225C98: ; 0x02225C98 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r4, sp, #0x10 + mov r1, #0x14 + ldrsh r1, [r4, r1] + str r1, [sp] + ldrh r1, [r4, #0x18] + str r1, [sp, #4] + add r1, r2, #0 + add r2, r3, #0 + mov r3, #0x10 + ldrsh r3, [r4, r3] + bl ov12_02225BC8 + mov r1, #0 + strh r1, [r5] + ldr r0, _02225CDC ; =0x0000BFFF + strh r1, [r5, #2] + str r0, [sp] + ldr r0, [sp, #0x2c] + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r4, #0 + ldrh r0, [r0, #0x18] + ldr r3, _02225CE0 ; =0x00003FFF + add r2, r1, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + bl ov12_02225A5C + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02225CDC: .word 0x0000BFFF +_02225CE0: .word 0x00003FFF + thumb_func_end ov12_02225C98 + + thumb_func_start ov12_02225CE4 +ov12_02225CE4: ; 0x02225CE4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _02225CF2 + bl sub_02022974 +_02225CF2: + cmp r4, #0 + bne _02225CFA + bl sub_02022974 +_02225CFA: + add r0, r5, #0 + bl ov12_02225C14 + add r6, r0, #0 + add r0, r4, #0 + bl ov12_02225AE0 + mov r2, #0 + ldrsh r3, [r5, r2] + ldrsh r1, [r4, r2] + add r1, r3, r1 + strh r1, [r5] + mov r1, #2 + ldrsh r3, [r5, r1] + ldrsh r1, [r4, r1] + add r1, r3, r1 + strh r1, [r5, #2] + cmp r6, r0 + bne _02225D28 + cmp r6, #0 + bne _02225D28 + add r0, r2, #0 + pop {r4, r5, r6, pc} +_02225D28: + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02225CE4 + + thumb_func_start ov12_02225D2C +ov12_02225D2C: ; 0x02225D2C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + bl ov12_02225CE4 + cmp r0, #0 + beq _02225D4A + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov12_022259DC + mov r0, #1 + pop {r3, r4, r5, pc} +_02225D4A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02225D2C + + thumb_func_start ov12_02225D50 +ov12_02225D50: ; 0x02225D50 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + cmp r5, #0 + bne _02225D62 + bl sub_02022974 +_02225D62: + str r6, [r5, #0] + lsl r0, r6, #0xc + lsl r1, r7, #0xc + add r2, r4, #0 + str r4, [r5, #4] + bl ov12_022259A0 + asr r0, r0, #0xc + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02225D50 + + thumb_func_start ov12_02225D78 +ov12_02225D78: ; 0x02225D78 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + cmp r5, #0 + bne _02225D8A + bl sub_02022974 +_02225D8A: + str r6, [r5, #0] + lsl r6, r6, #0xc + add r0, r6, #0 + lsl r1, r7, #0xc + add r2, r4, #0 + str r4, [r5, #4] + bl ov12_022259A0 + str r0, [r5, #8] + str r6, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02225D78 + + thumb_func_start ov12_02225DA0 +ov12_02225DA0: ; 0x02225DA0 + push {r4, lr} + add r4, r0, #0 + bne _02225DAA + bl sub_02022974 +_02225DAA: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225DC2 + ldr r1, [r4, #0] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [r4, #0] + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} +_02225DC2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02225DA0 + + thumb_func_start ov12_02225DC8 +ov12_02225DC8: ; 0x02225DC8 + push {r4, lr} + add r4, r0, #0 + bne _02225DD2 + bl sub_02022974 +_02225DD2: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225DEE + ldr r1, [r4, #0xc] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [r4, #0xc] + asr r0, r0, #0xc + str r0, [r4, #0] + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} +_02225DEE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02225DC8 + + thumb_func_start ov12_02225DF4 +ov12_02225DF4: ; 0x02225DF4 + push {r3, r4, r5, lr} + ldr r4, [sp, #0x10] + add r5, r0, #0 + str r4, [r5, #4] + str r1, [r5, #8] + sub r0, r2, r1 + add r1, r4, #0 + str r3, [r5, #0xc] + bl sub_020E2178 + str r0, [r5, #0x10] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02225DF4 + + thumb_func_start ov12_02225E0C +ov12_02225E0C: ; 0x02225E0C + push {r4, lr} + add r4, r0, #0 + bne _02225E16 + bl sub_02022974 +_02225E16: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225E5E + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [r4, #8] + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #8] + ldr r2, [r4, #0xc] + asr r0, r0, #4 + lsl r0, r0, #1 + add r0, r0, #1 + lsl r1, r0, #1 + ldr r0, _02225E64 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + asr r0, r1, #0xc + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} +_02225E5E: + mov r0, #0 + pop {r4, pc} + nop +_02225E64: .word 0x020F983C + thumb_func_end ov12_02225E0C + + thumb_func_start ov12_02225E68 +ov12_02225E68: ; 0x02225E68 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r4, #0 + bne _02225E7A + bl sub_02022974 +_02225E7A: + ldr r0, [sp, #0x18] + add r1, r6, #0 + str r0, [r4, #4] + lsl r0, r5, #8 + bl sub_020E1F6C + add r5, r0, #0 + lsl r0, r7, #8 + add r1, r6, #0 + bl sub_020E1F6C + add r1, r0, #0 + ldr r2, [sp, #0x18] + lsl r0, r5, #0xc + lsl r1, r1, #0xc + bl ov12_022259A0 + str r0, [r4, #8] + lsl r0, r5, #0x10 + asr r0, r0, #0x10 + strh r0, [r4] + strh r0, [r4, #2] + mov r0, #0 + ldrsh r0, [r4, r0] + lsl r0, r0, #0xc + str r0, [r4, #0x10] + mov r0, #2 + ldrsh r0, [r4, r0] + lsl r0, r0, #0xc + str r0, [r4, #0x14] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02225E68 + + thumb_func_start ov12_02225EB8 +ov12_02225EB8: ; 0x02225EB8 + push {r4, lr} + add r4, r0, #0 + bne _02225EC2 + bl sub_02022974 +_02225EC2: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225EEC + sub r0, r0, #1 + str r0, [r4, #4] + ldr r1, [r4, #0x10] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r1, [r4, #0x14] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r0, [r4, #0x10] + asr r0, r0, #0xc + strh r0, [r4] + ldr r0, [r4, #0x14] + asr r0, r0, #0xc + strh r0, [r4, #2] + mov r0, #1 + pop {r4, pc} +_02225EEC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov12_02225EB8 + + thumb_func_start ov12_02225EF0 +ov12_02225EF0: ; 0x02225EF0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + cmp r5, #0 + bne _02225F02 + bl sub_02022974 +_02225F02: + ldr r0, [sp, #0x20] + add r1, sp, #8 + str r0, [r5, #4] + mov r0, #0x14 + ldrsh r4, [r1, r0] + lsl r0, r6, #8 + add r1, r4, #0 + bl sub_020E1F6C + add r6, r0, #0 + lsl r0, r7, #8 + add r1, r4, #0 + bl sub_020E1F6C + add r1, r0, #0 + ldr r2, [sp, #0x20] + lsl r0, r6, #0xc + lsl r1, r1, #0xc + bl ov12_022259A0 + str r0, [r5, #8] + ldr r0, [sp] + add r1, r4, #0 + lsl r0, r0, #8 + bl sub_020E1F6C + add r7, r0, #0 + add r1, sp, #8 + mov r0, #0x10 + ldrsh r0, [r1, r0] + add r1, r4, #0 + lsl r0, r0, #8 + bl sub_020E1F6C + add r1, r0, #0 + ldr r2, [sp, #0x20] + lsl r0, r7, #0xc + lsl r1, r1, #0xc + bl ov12_022259A0 + str r0, [r5, #0xc] + strh r6, [r5] + strh r7, [r5, #2] + mov r0, #0 + ldrsh r0, [r5, r0] + lsl r0, r0, #0xc + str r0, [r5, #0x10] + mov r0, #2 + ldrsh r0, [r5, r0] + lsl r0, r0, #0xc + str r0, [r5, #0x14] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02225EF0 + + thumb_func_start ov12_02225F6C +ov12_02225F6C: ; 0x02225F6C + push {r4, lr} + add r4, r0, #0 + bne _02225F76 + bl sub_02022974 +_02225F76: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02225FA0 + sub r0, r0, #1 + str r0, [r4, #4] + ldr r1, [r4, #0x10] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r1, [r4, #0x14] + ldr r0, [r4, #0xc] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r0, [r4, #0x10] + asr r0, r0, #0xc + strh r0, [r4] + ldr r0, [r4, #0x14] + asr r0, r0, #0xc + strh r0, [r4, #2] + mov r0, #1 + pop {r4, pc} +_02225FA0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov12_02225F6C + + thumb_func_start ov12_02225FA4 +ov12_02225FA4: ; 0x02225FA4 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0 + ldrsh r0, [r5, r0] + add r4, r1, #0 + add r6, r2, #0 + bl sub_020E17B4 + ldr r1, _02225FD0 ; =0x43800000 + bl sub_020E1304 + str r0, [r4, #0] + mov r0, #2 + ldrsh r0, [r5, r0] + bl sub_020E17B4 + ldr r1, _02225FD0 ; =0x43800000 + bl sub_020E1304 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + nop +_02225FD0: .word 0x43800000 + thumb_func_end ov12_02225FA4 + + thumb_func_start ov12_02225FD4 +ov12_02225FD4: ; 0x02225FD4 + push {r3, r4, lr} + sub sp, #4 + lsl r1, r1, #1 + mov r0, #0x50 + sub r0, r0, r1 + lsl r4, r0, #0xc + asr r1, r4, #0x1f + add r0, r4, #0 + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + lsl r1, r2, #9 + bl sub_020BCFD0 + sub r0, r4, r0 + add r1, sp, #0 + bl sub_020BDBCC + cmp r0, #0 + beq _02226012 + mov r1, #2 + lsl r1, r1, #0xa + add r0, r0, r1 +_02226012: + ldr r1, [sp] + add r0, r1, r0 + asr r1, r0, #0xc + lsr r0, r1, #0x1f + add r0, r1, r0 + lsl r0, r0, #0xf + asr r0, r0, #0x10 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02225FD4 + + thumb_func_start ov12_02226024 +ov12_02226024: ; 0x02226024 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r3, #0 + bl ov12_02225FD4 + add r2, r0, #0 + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _0222604E + mov r0, #0 + mvn r0, r0 + mul r0, r2 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + sub r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_0222604E: + add r0, r5, #0 + mov r1, #1 + add r2, r4, r2 + bl sub_02007DEC + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02226024 + + thumb_func_start ov12_0222605C +ov12_0222605C: ; 0x0222605C + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r3, #0 + bl ov12_02225FD4 + add r4, r0, #0 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _02226086 + mov r0, #0 + mvn r0, r0 + mul r0, r4 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + sub r0, r5, r7 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 +_02226086: + add r1, sp, #0 + add r0, r6, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r2, sp, #0 + mov r1, #2 + ldrsh r1, [r2, r1] + add r2, r5, r4 + lsl r2, r2, #0x10 + add r0, r6, #0 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_0222605C + + thumb_func_start ov12_022260A8 +ov12_022260A8: ; 0x022260A8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02225EB8 + cmp r0, #0 + beq _022260C2 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_022259FC + mov r0, #1 + pop {r3, r4, r5, pc} +_022260C2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022260A8 + + thumb_func_start ov12_022260C8 +ov12_022260C8: ; 0x022260C8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02225EB8 + cmp r0, #0 + beq _022260E2 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02225A3C + mov r0, #1 + pop {r3, r4, r5, pc} +_022260E2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022260C8 + + thumb_func_start ov12_022260E8 +ov12_022260E8: ; 0x022260E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02225F6C + cmp r0, #0 + beq _02226102 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02225A3C + mov r0, #1 + pop {r3, r4, r5, pc} +_02226102: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022260E8 + + thumb_func_start ov12_02226108 +ov12_02226108: ; 0x02226108 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _0222611A + bl sub_02022974 +_0222611A: + str r7, [r5, #4] + ldr r0, [sp, #0x18] + str r7, [r5, #8] + str r0, [r5, #0xc] + mov r1, #0 + str r1, [r5, #0x10] + str r6, [r5, #0x14] + str r4, [r5, #0x18] + neg r0, r6 + str r0, [r5, #0x1c] + neg r0, r4 + str r0, [r5, #0x20] + strh r1, [r5] + strh r1, [r5, #2] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02226108 + + thumb_func_start ov12_02226138 +ov12_02226138: ; 0x02226138 + push {r4, lr} + add r4, r0, #0 + bne _02226142 + bl sub_02022974 +_02226142: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02226196 + ldr r0, [r4, #4] + add r1, r0, #1 + str r1, [r4, #4] + ldr r0, [r4, #8] + cmp r1, r0 + blt _02226192 + mov r2, #0 + str r2, [r4, #4] + ldrsh r0, [r4, r2] + ldr r1, [r4, #0x1c] + str r0, [r4, #0x1c] + cmp r1, #0 + bne _02226166 + strh r2, [r4] + b _0222616A +_02226166: + neg r0, r1 + strh r0, [r4] +_0222616A: + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x20] + str r0, [r4, #0x20] + cmp r1, #0 + bne _0222617A + mov r0, #0 + b _0222617C +_0222617A: + neg r0, r1 +_0222617C: + strh r0, [r4, #2] + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #4 + blt _02226192 + mov r0, #0 + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + sub r0, r0, #1 + str r0, [r4, #0xc] +_02226192: + mov r0, #1 + pop {r4, pc} +_02226196: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02226138 + + thumb_func_start ov12_0222619C +ov12_0222619C: ; 0x0222619C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov12_02226138 + cmp r0, #0 + beq _022261BE + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov12_02225A18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022261BE: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_0222619C + + thumb_func_start ov12_022261C4 +ov12_022261C4: ; 0x022261C4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + strh r3, [r7] + add r0, sp, #8 + mov r1, #0x10 + ldrsh r1, [r0, r1] + mov r6, #0 + strh r1, [r7, #2] + add r1, r7, #0 + add r1, #0x94 + str r2, [r1, #0] + add r1, r7, #0 + ldrh r2, [r0, #0x14] + add r1, #0xa8 + strh r2, [r1] + add r1, r7, #0 + add r1, #0xaa + strh r6, [r1] + ldrb r1, [r0, #0x18] + add r2, r7, #0 + add r2, #0xac + mov ip, r1 + strb r1, [r2] + add r1, r7, #0 + add r1, #0xad + strb r6, [r1] + ldrb r1, [r0, #0x1c] + add r0, r7, #0 + add r0, #0xae + strb r1, [r0] + mov r0, ip + cmp r0, #0 + ble _02226226 + add r5, r7, #0 +_0222620A: + ldr r4, [sp] + add r3, r5, #4 + mov r2, #4 +_02226210: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02226210 + ldr r0, [r4, #0] + add r6, r6, #1 + str r0, [r3, #0] + mov r0, ip + add r5, #0x24 + cmp r6, r0 + blt _0222620A +_02226226: + add r0, r7, #0 + ldr r1, [sp, #0x28] + add r0, #0x98 + str r1, [r0, #0] + add r0, r7, #0 + ldr r1, [sp, #0x2c] + add r0, #0x9c + str r1, [r0, #0] + add r0, r7, #0 + ldr r1, [sp, #0x30] + add r0, #0xa0 + str r1, [r0, #0] + add r0, r7, #0 + ldr r1, [sp, #0x34] + add r0, #0xa4 + str r1, [r0, #0] + add r0, r7, #0 + add r0, #0xac + ldrb r0, [r0] + mov r5, #0 + cmp r0, #0 + ble _02226270 + add r4, r7, #0 + add r6, r5, #0 +_02226256: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_0200D3F4 + add r0, r7, #0 + add r0, #0xac + ldrb r0, [r0] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, r0 + blt _02226256 +_02226270: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022261C4 + + thumb_func_start ov12_02226274 +ov12_02226274: ; 0x02226274 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0 + add r2, sp, #0x10 + mov r1, #1 +_02226280: + add r0, r0, #1 + stmia r2!, {r1} + cmp r0, #4 + blt _02226280 + add r0, r5, #0 + add r0, #0xa8 + ldrh r2, [r0] + add r0, r5, #0 + add r0, #0xaa + ldrh r0, [r0] + cmp r2, r0 + bhi _022262C0 + add r0, r5, #0 + add r0, #0xad + ldrb r0, [r0] + lsl r0, r0, #2 + add r0, r5, r0 + add r0, #0x98 + ldr r0, [r0, #0] + bl sub_0200D3F4 + add r0, r5, #0 + add r0, #0xad + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xad + strb r1, [r0] + add r0, r5, #0 + mov r1, #0 + add r0, #0xaa + strh r1, [r0] +_022262C0: + add r0, r5, #0 + add r0, #0xad + ldrb r1, [r0] + add r0, r5, #0 + add r0, #0xac + ldrb r0, [r0] + cmp r1, r0 + bhs _022262DE + add r0, r5, #0 + add r0, #0xaa + ldrh r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xaa + strh r1, [r0] +_022262DE: + mov r0, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xad + ldrb r0, [r0] + cmp r0, #0 + ble _0222637E + add r0, sp, #0x10 + add r7, r5, #4 + str r0, [sp, #4] + add r6, r5, #0 + add r4, r5, #0 +_022262F6: + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r7, #0 + blx r1 + ldr r1, [sp, #4] + cmp r0, #0 + str r0, [r1, #0] + beq _02226354 + add r0, r5, #0 + add r0, #0xae + ldrb r0, [r0] + cmp r0, #0 + bne _0222633A + mov r1, #0 + mov r2, #4 + ldrsh r1, [r5, r1] + ldrsh r2, [r6, r2] + add r0, r4, #0 + add r0, #0x98 + add r1, r1, r2 + mov r2, #2 + ldrsh r3, [r5, r2] + mov r2, #6 + ldrsh r2, [r6, r2] + lsl r1, r1, #0x10 + ldr r0, [r0, #0] + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + b _02226360 +_0222633A: + add r0, r7, #0 + add r1, sp, #0xc + add r2, sp, #8 + bl ov12_02225FA4 + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + bl sub_0200D6E8 + b _02226360 +_02226354: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 +_02226360: + ldr r0, [sp, #4] + add r7, #0x24 + add r0, r0, #4 + str r0, [sp, #4] + ldr r0, [sp] + add r6, #0x24 + add r0, r0, #1 + str r0, [sp] + add r0, r5, #0 + add r0, #0xad + ldrb r1, [r0] + ldr r0, [sp] + add r4, r4, #4 + cmp r0, r1 + blt _022262F6 +_0222637E: + add r5, #0xac + ldrb r2, [r5] + mov r3, #0 + cmp r2, #0 + ble _0222639E + add r1, sp, #0x10 +_0222638A: + ldr r0, [r1, #0] + cmp r0, #1 + bne _02226396 + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02226396: + add r3, r3, #1 + add r1, r1, #4 + cmp r3, r2 + blt _0222638A +_0222639E: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02226274 + + thumb_func_start ov12_022263A4 +ov12_022263A4: ; 0x022263A4 + push {r3, r4, r5, lr} + sub sp, #0x10 + ldr r3, _022263D4 ; =0x0000FFFF + add r4, r1, #0 + mov r1, #2 + str r3, [sp] + lsl r1, r1, #0x10 + str r1, [sp, #4] + ldr r1, _022263D8 ; =0xFFFF8000 + add r5, r0, #0 + str r1, [sp, #8] + str r2, [sp, #0xc] + mov r1, #0 + add r2, r3, #0 + add r3, r1, #0 + bl ov12_02225A5C + ldr r0, [r5, #4] + add r1, r0, #0 + mul r1, r4 + str r1, [r5, #4] + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_022263D4: .word 0x0000FFFF +_022263D8: .word 0xFFFF8000 + thumb_func_end ov12_022263A4 + + thumb_func_start ov12_022263DC +ov12_022263DC: ; 0x022263DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_02225C14 + cmp r0, #0 + bne _022263F8 + mov r0, #1 + str r0, [r4, #0x24] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} +_022263F8: + mov r0, #0 + ldrsh r1, [r4, r0] + cmp r1, #0 + bge _02226402 + strh r0, [r4] +_02226402: + mov r0, #2 + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _0222640E + mov r0, #0 + strh r0, [r4, #2] +_0222640E: + mov r0, #0 + ldrsh r1, [r4, r0] + mov r0, #2 + ldrsh r0, [r4, r0] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02226420 ; =0x04000052 + strh r1, [r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02226420: .word 0x04000052 + thumb_func_end ov12_022263DC + + thumb_func_start ov12_02226424 +ov12_02226424: ; 0x02226424 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, sp, #8 + mov r5, #0x10 + ldrsh r5, [r6, r5] + add r4, r0, #0 + str r5, [sp] + ldr r5, [sp, #0x1c] + lsl r5, r5, #0x10 + lsr r5, r5, #0x10 + str r5, [sp, #4] + bl ov12_02225BC8 + mov r2, #0 + ldr r0, _02226450 ; =ov12_022263DC + add r1, r4, #0 + str r2, [r4, #0x24] + bl sub_0200D9E8 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_02226450: .word ov12_022263DC + thumb_func_end ov12_02226424 + + thumb_func_start ov12_02226454 +ov12_02226454: ; 0x02226454 + ldr r0, [r0, #0x24] + bx lr + thumb_func_end ov12_02226454 + + thumb_func_start ov12_02226458 +ov12_02226458: ; 0x02226458 + push {r3, lr} + ldr r0, [r1, #8] + cmp r0, #0 + beq _0222646C + mov r0, #1 + str r0, [r1, #0xc] + ldr r0, [r1, #0x18] + ldr r1, [r1, #0x10] + blx r1 + pop {r3, pc} +_0222646C: + bl sub_02013BA8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02226458 + + thumb_func_start ov12_02226474 +ov12_02226474: ; 0x02226474 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _0222648E + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0222648E + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x14] + blx r1 + mov r0, #0 + str r0, [r4, #0xc] +_0222648E: + pop {r4, pc} + thumb_func_end ov12_02226474 + + thumb_func_start ov12_02226490 +ov12_02226490: ; 0x02226490 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _022264A2 + bl sub_02022974 +_022264A2: + mov r0, #1 + str r0, [r5, #8] + mov r2, #0 + str r2, [r5, #0xc] + str r4, [r5, #0x18] + str r6, [r5, #0x10] + ldr r0, _022264C8 ; =ov12_02226458 + str r7, [r5, #0x14] + add r1, r5, #0 + bl sub_0200DA3C + str r0, [r5, #4] + ldr r0, _022264CC ; =ov12_02226474 + add r1, r5, #0 + mov r2, #0 + bl sub_0200DA04 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022264C8: .word ov12_02226458 +_022264CC: .word ov12_02226474 + thumb_func_end ov12_02226490 + + thumb_func_start ov12_022264D0 +ov12_022264D0: ; 0x022264D0 + push {r4, lr} + add r4, r0, #0 + bne _022264DA + bl sub_02022974 +_022264DA: + ldr r0, [r4, #4] + cmp r0, #0 + beq _022264E4 + bl sub_0200DA58 +_022264E4: + ldr r0, [r4, #0] + cmp r0, #0 + beq _022264EE + bl sub_0200DA58 +_022264EE: + bl sub_02013BA8 + pop {r4, pc} + thumb_func_end ov12_022264D0 + + thumb_func_start ov12_022264F4 +ov12_022264F4: ; 0x022264F4 + push {r4, lr} + add r4, r0, #0 + bne _022264FE + bl sub_02022974 +_022264FE: + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} + thumb_func_end ov12_022264F4 + + thumb_func_start ov12_02226504 +ov12_02226504: ; 0x02226504 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_02013B68 + add r5, r0, #0 + bl sub_02013BA8 + mov r1, #0x62 + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r5, #0 + mov r2, #4 + mov r3, #1 + bl sub_02013BB8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02226504 + + thumb_func_start ov12_02226528 +ov12_02226528: ; 0x02226528 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_02013B94 + add r0, r4, #0 + bl ov12_02226504 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02226528 + + thumb_func_start ov12_0222653C +ov12_0222653C: ; 0x0222653C + ldr r3, _02226540 ; =ov12_02226504 + bx r3 + ; .align 2, 0 +_02226540: .word ov12_02226504 + thumb_func_end ov12_0222653C + + thumb_func_start ov12_02226544 +ov12_02226544: ; 0x02226544 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r2, #0 + add r5, r0, #0 + ldr r1, _022265B4 ; =0x00000624 + add r0, r7, #0 + bl sub_02018144 + ldr r2, _022265B4 ; =0x00000624 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + cmp r4, #0 + bne _02226566 + bl sub_02022974 +_02226566: + mov r2, #0x32 + add r1, r4, #0 + lsl r2, r2, #4 + add r0, r7, #0 + add r1, #0x20 + add r2, r4, r2 + bl sub_02013B10 + str r0, [r4, #0x1c] + cmp r0, #0 + bne _02226580 + bl sub_02022974 +_02226580: + mov r0, #0x62 + lsl r0, r0, #4 + add r1, r4, #0 + mov r2, #3 + str r5, [r4, r0] + add r0, r6, #0 + add r1, #0x20 + lsl r2, r2, #8 + bl sub_020C4B4C + mov r2, #0x32 + lsl r2, r2, #4 + add r1, r4, r2 + add r0, r6, #0 + sub r2, #0x20 + bl sub_020C4B4C + ldr r2, _022265B8 ; =ov12_02226528 + ldr r3, _022265BC ; =ov12_0222653C + add r0, r4, #0 + add r1, r4, #0 + bl ov12_02226490 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022265B4: .word 0x00000624 +_022265B8: .word ov12_02226528 +_022265BC: .word ov12_0222653C + thumb_func_end ov12_02226544 + + thumb_func_start ov12_022265C0 +ov12_022265C0: ; 0x022265C0 + push {r4, lr} + add r4, r0, #0 + bne _022265CA + bl sub_02022974 +_022265CA: + add r0, r4, #0 + bl ov12_022264D0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _022265DA + bl sub_02013B40 +_022265DA: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022265C0 + + thumb_func_start ov12_022265E4 +ov12_022265E4: ; 0x022265E4 + push {r4, lr} + add r4, r0, #0 + bne _022265EE + bl sub_02022974 +_022265EE: + ldr r0, [r4, #0x1c] + bl sub_02013B54 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022265E4 + + thumb_func_start ov12_022265F8 +ov12_022265F8: ; 0x022265F8 + push {r4, lr} + add r4, r0, #0 + bne _02226602 + bl sub_02022974 +_02226602: + add r0, r4, #0 + bl ov12_022264F4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022265F8 + + thumb_func_start ov12_0222660C +ov12_0222660C: ; 0x0222660C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_02013DA4 + ldr r0, [r4, #0x1c] + bl sub_02013DDC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222660C + + thumb_func_start ov12_02226620 +ov12_02226620: ; 0x02226620 + ldr r3, _02226628 ; =sub_02013DDC + ldr r0, [r0, #0x1c] + bx r3 + nop +_02226628: .word sub_02013DDC + thumb_func_end ov12_02226620 + + thumb_func_start ov12_0222662C +ov12_0222662C: ; 0x0222662C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + str r1, [sp, #0x14] + ldr r0, [sp, #0x40] + mov r1, #0x20 + str r2, [sp, #0x18] + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + bne _02226648 + bl sub_02022974 +_02226648: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + ldr r0, [sp, #0x34] + bl ov12_022266F0 + add r6, r0, #0 + ldr r0, [sp, #0x40] + bl sub_02013BE0 + str r0, [r4, #0x1c] + str r5, [sp] + add r1, sp, #0x20 + mov r0, #0x10 + ldrsh r0, [r1, r0] + add r1, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x3c] + str r6, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x38] + str r0, [sp, #0x10] + ldr r0, [r4, #0x1c] + ldr r2, [sp, #0x14] + ldr r3, [sp, #0x18] + bl sub_02013C10 + ldr r2, _02226694 ; =ov12_0222660C + ldr r3, _02226698 ; =ov12_02226620 + add r0, r4, #0 + add r1, r4, #0 + bl ov12_02226490 + add r0, r4, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02226694: .word ov12_0222660C +_02226698: .word ov12_02226620 + thumb_func_end ov12_0222662C + + thumb_func_start ov12_0222669C +ov12_0222669C: ; 0x0222669C + push {r4, lr} + add r4, r0, #0 + bne _022266A6 + bl sub_02022974 +_022266A6: + add r0, r4, #0 + bl ov12_022264D0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _022266B6 + bl sub_02013D74 +_022266B6: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222669C + + thumb_func_start ov12_022266C0 +ov12_022266C0: ; 0x022266C0 + push {r4, lr} + add r4, r0, #0 + bne _022266CA + bl sub_02022974 +_022266CA: + ldr r0, [r4, #0x1c] + bl sub_02013D94 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022266C0 + + thumb_func_start ov12_022266D4 +ov12_022266D4: ; 0x022266D4 + push {r4, lr} + add r4, r0, #0 + bne _022266DE + bl sub_02022974 +_022266DE: + add r0, r4, #0 + bl ov12_022264F4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022266D4 + + thumb_func_start ov12_022266E8 +ov12_022266E8: ; 0x022266E8 + lsl r1, r1, #0x10 + orr r0, r1 + bx lr + ; .align 2, 0 + thumb_func_end ov12_022266E8 + + thumb_func_start ov12_022266F0 +ov12_022266F0: ; 0x022266F0 + cmp r0, #3 + bhi _02226716 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02226700: ; jump table + .short _02226708 - _02226700 - 2 ; case 0 + .short _0222670C - _02226700 - 2 ; case 1 + .short _02226710 - _02226700 - 2 ; case 2 + .short _02226714 - _02226700 - 2 ; case 3 +_02226708: + ldr r0, _02226718 ; =0x04000010 + bx lr +_0222670C: + ldr r0, _0222671C ; =0x04000014 + bx lr +_02226710: + ldr r0, _02226720 ; =0x04000018 + bx lr +_02226714: + ldr r0, _02226724 ; =0x0400001C +_02226716: + bx lr + ; .align 2, 0 +_02226718: .word 0x04000010 +_0222671C: .word 0x04000014 +_02226720: .word 0x04000018 +_02226724: .word 0x0400001C + thumb_func_end ov12_022266F0 + + thumb_func_start ov12_02226728 +ov12_02226728: ; 0x02226728 + add r2, r0, r2 + lsr r0, r2, #0x1f + add r0, r2, r0 + asr r2, r0, #1 + ldr r0, [sp] + add r1, r1, r3 + strh r2, [r0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + ldr r0, [sp, #4] + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02226728 + + thumb_func_start ov12_02226744 +ov12_02226744: ; 0x02226744 + push {r3, lr} + sub r1, r1, r3 + neg r1, r1 + sub r0, r0, r2 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + asr r1, r1, #0x10 + add r2, r1, #0 + asr r0, r0, #0x10 + mul r2, r1 + add r1, r0, #0 + mul r1, r0 + add r0, r2, r1 + lsl r0, r0, #0xc + bl sub_020BCFF0 + ldr r1, [sp, #8] + str r0, [r1, #0] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02226744 + + thumb_func_start ov12_0222676C +ov12_0222676C: ; 0x0222676C + push {r4, r5, r6, lr} + add r6, r0, #0 + sub r0, r1, r3 + neg r0, r0 + lsl r0, r0, #0x10 + sub r1, r6, r2 + asr r4, r0, #0x10 + lsl r1, r1, #0x10 + ldr r5, [sp, #0x10] + lsl r0, r4, #0xc + asr r1, r1, #4 + bl sub_020BDA20 + strh r0, [r5] + ldrh r1, [r5] + cmp r1, #0 + beq _0222679C + cmp r4, #0 + bge _0222679C + ldr r0, _022267A0 ; =0x00007FFF + sub r1, r1, r0 + ldr r0, _022267A4 ; =0x0000FFFF + mul r0, r1 + strh r0, [r5] +_0222679C: + pop {r4, r5, r6, pc} + nop +_022267A0: .word 0x00007FFF +_022267A4: .word 0x0000FFFF + thumb_func_end ov12_0222676C + + thumb_func_start ov12_022267A8 +ov12_022267A8: ; 0x022267A8 + cmp r2, #0 + ldr r3, [r0, #0] + bge _022267C0 + add r2, r3, r2 + cmp r2, r1 + ble _022267BA + str r2, [r0, #0] + mov r0, #0 + bx lr +_022267BA: + str r1, [r0, #0] + mov r0, #1 + bx lr +_022267C0: + add r2, r3, r2 + cmp r2, r1 + bge _022267CC + str r2, [r0, #0] + mov r0, #0 + bx lr +_022267CC: + str r1, [r0, #0] + mov r0, #1 + bx lr + ; .align 2, 0 + thumb_func_end ov12_022267A8 + + thumb_func_start ov12_022267D4 +ov12_022267D4: ; 0x022267D4 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02226844 + mov r0, #0x17 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0x17] + ldrsb r1, [r4, r0] + mov r0, #0x16 + ldrsb r0, [r4, r0] + cmp r1, r0 + blt _02226844 + mov r0, #0 + strb r0, [r4, #0x17] + ldrb r0, [r4, #0x14] + str r0, [sp] + ldrh r0, [r4, #0x10] + str r0, [sp, #4] + ldrh r2, [r4, #0xc] + ldrh r3, [r4, #0xe] + ldr r0, [r4, #0x18] + ldr r1, [r4, #8] + bl sub_020039B0 + ldrb r3, [r4, #0x13] + ldrb r1, [r4, #0x14] + cmp r1, r3 + bne _0222681A + mov r0, #0 + add sp, #8 + str r0, [r4, #0] + pop {r4, pc} +_0222681A: + mov r0, #0x15 + ldrsb r2, [r4, r0] + add r1, r1, r2 + lsl r0, r1, #0x18 + asr r0, r0, #0x18 + cmp r2, #0 + ble _02226838 + cmp r0, r3 + ble _02226832 + add sp, #8 + strb r3, [r4, #0x14] + pop {r4, pc} +_02226832: + add sp, #8 + strb r1, [r4, #0x14] + pop {r4, pc} +_02226838: + cmp r0, r3 + bge _02226842 + add sp, #8 + strb r3, [r4, #0x14] + pop {r4, pc} +_02226842: + strb r1, [r4, #0x14] +_02226844: + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_022267D4 + + thumb_func_start ov12_02226848 +ov12_02226848: ; 0x02226848 + push {r4, lr} + add r4, r0, #0 + bne _02226852 + bl sub_02022974 +_02226852: + ldr r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02226848 + + thumb_func_start ov12_02226858 +ov12_02226858: ; 0x02226858 + push {r4, lr} + add r4, r0, #0 + bne _02226862 + bl sub_02022974 +_02226862: + ldr r0, [r4, #4] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov12_02226858 + + thumb_func_start ov12_02226870 +ov12_02226870: ; 0x02226870 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, r1, #0 + mov r1, #0x1c + add r6, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + bne _02226888 + bl sub_02022974 +_02226888: + str r5, [r4, #0x18] + str r6, [r4, #8] + strh r7, [r4, #0xc] + add r1, sp, #8 + ldrh r0, [r1, #0x10] + strh r0, [r4, #0xe] + ldrh r0, [r1, #0x24] + strh r0, [r4, #0x10] + ldrb r2, [r1, #0x1c] + add r0, sp, #0x28 + ldrb r0, [r0] + strb r2, [r4, #0x12] + strb r0, [r4, #0x13] + strb r2, [r4, #0x14] + mov r0, #0x14 + ldrsb r0, [r1, r0] + strb r0, [r4, #0x16] + strb r0, [r4, #0x17] + ldrb r2, [r4, #0x12] + ldrb r0, [r4, #0x13] + cmp r2, r0 + bhs _022268BA + mov r0, #0x18 + ldrsb r0, [r1, r0] + b _022268C0 +_022268BA: + mov r0, #0x18 + ldrsb r0, [r1, r0] + neg r0, r0 +_022268C0: + strb r0, [r4, #0x15] + mov r0, #1 + str r0, [r4, #0] + ldr r0, _022268D8 ; =ov12_022267D4 + ldr r2, [sp, #0x30] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022268D8: .word ov12_022267D4 + thumb_func_end ov12_02226870 + + thumb_func_start ov12_022268DC +ov12_022268DC: ; 0x022268DC + push {r4, r5, r6, r7} + mov r7, #0 + cmp r1, #0 + ble _0222691E + mov r2, #0x97 +_022268E6: + ldrh r6, [r0] + mov r3, #0x1f + add r7, r7, #1 + asr r4, r6, #0xa + and r4, r3 + add r5, r4, #0 + mov r3, #0x1d + mul r5, r3 + mov r3, #0x1f + and r3, r6 + mov r4, #0x4c + mul r4, r3 + asr r6, r6, #5 + mov r3, #0x1f + and r3, r6 + add r6, r3, #0 + mul r6, r2 + add r3, r4, r6 + add r3, r5, r3 + asr r5, r3, #8 + lsl r4, r5, #0xa + lsl r3, r5, #5 + orr r3, r4 + orr r3, r5 + strh r3, [r0] + add r0, r0, #2 + cmp r7, r1 + blt _022268E6 +_0222691E: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov12_022268DC + + thumb_func_start ov12_02226924 +ov12_02226924: ; 0x02226924 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_0222332C + mov r1, #0 + bl sub_0200316C + add r4, r0, #0 + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02226948 + add r0, r4, #0 + mov r1, #0x30 + bl ov12_022268DC + pop {r3, r4, r5, pc} +_02226948: + add r0, r4, #0 + mov r1, #0x80 + bl ov12_022268DC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02226924 + + thumb_func_start ov12_02226954 +ov12_02226954: ; 0x02226954 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + bl ov12_0222332C + add r4, r0, #0 + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02226980 + mov r1, #0 + str r1, [sp] + mov r0, #0x60 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02003120 + add sp, #8 + pop {r3, r4, r5, pc} +_02226980: + mov r1, #0 + mov r0, #1 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02003120 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02226954 + + .rodata + + + .global Unk_ov12_02239E34 +Unk_ov12_02239E34: ; 0x02239E34 + .incbin "incbin/overlay12_rodata.bin", 0x18A0, 0x30 + diff --git a/asm/ov12_02226998.s b/asm/ov12_02226998.s new file mode 100644 index 000000000..9fcf133bc --- /dev/null +++ b/asm/ov12_02226998.s @@ -0,0 +1,53 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02226998 +ov12_02226998: ; 0x02226998 + cmp r0, #0x54 + blo _022269A0 + mov r0, #0 + bx lr +_022269A0: + lsl r1, r0, #2 + ldr r0, _022269A8 ; =0x02239EEC + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_022269A8: .word 0x02239EEC + thumb_func_end ov12_02226998 + + thumb_func_start ov12_022269AC +ov12_022269AC: ; 0x022269AC + cmp r0, #0x21 + blo _022269B4 + mov r0, #0 + bx lr +_022269B4: + lsl r1, r0, #2 + ldr r0, _022269BC ; =0x02239E68 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_022269BC: .word 0x02239E68 + thumb_func_end ov12_022269AC + + .rodata + + + .global Unk_ov12_02239E64 +Unk_ov12_02239E64: ; 0x02239E64 + .incbin "incbin/overlay12_rodata.bin", 0x18D0, 0x18D4 - 0x18D0 + + .global Unk_ov12_02239E68 +Unk_ov12_02239E68: ; 0x02239E68 + .incbin "incbin/overlay12_rodata.bin", 0x18D4, 0x1958 - 0x18D4 + + .global Unk_ov12_02239EEC +Unk_ov12_02239EEC: ; 0x02239EEC + .incbin "incbin/overlay12_rodata.bin", 0x1958, 0x150 + diff --git a/asm/ov12_022269C0.s b/asm/ov12_022269C0.s new file mode 100644 index 000000000..85cebae22 --- /dev/null +++ b/asm/ov12_022269C0.s @@ -0,0 +1,249 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_022269C0 +ov12_022269C0: ; 0x022269C0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_022269C0 + + thumb_func_start ov12_022269C4 +ov12_022269C4: ; 0x022269C4 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _022269D6 + cmp r0, #1 + beq _022269DC + pop {r4, pc} +_022269D6: + add r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_022269DC: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov12_022269C4 + + thumb_func_start ov12_022269EC +ov12_022269EC: ; 0x022269EC + push {r4, lr} + add r4, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r2, r0, #0 + mov r0, #0 + strb r0, [r2] + mov r3, #1 + ldr r1, _02226A10 ; =ov12_022269C4 + add r0, r4, #0 + lsl r3, r3, #0xc + str r4, [r2, #4] + bl ov12_022201CC + pop {r4, pc} + nop +_02226A10: .word ov12_022269C4 + thumb_func_end ov12_022269EC + + thumb_func_start ov12_02226A14 +ov12_02226A14: ; 0x02226A14 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _02226A26 + cmp r0, #1 + beq _02226A2C + pop {r4, pc} +_02226A26: + add r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_02226A2C: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220230 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov12_02226A14 + + thumb_func_start ov12_02226A3C +ov12_02226A3C: ; 0x02226A3C + push {r4, lr} + add r4, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r2, r0, #0 + mov r0, #0 + strb r0, [r2] + mov r3, #1 + ldr r1, _02226A60 ; =ov12_02226A14 + add r0, r4, #0 + lsl r3, r3, #0xc + str r4, [r2, #4] + bl ov12_02220204 + pop {r4, pc} + nop +_02226A60: .word ov12_02226A14 + thumb_func_end ov12_02226A3C + + thumb_func_start ov12_02226A64 +ov12_02226A64: ; 0x02226A64 + push {r4, lr} + add r4, r1, #0 + ldrb r1, [r4] + cmp r1, #0 + beq _02226A74 + cmp r1, #1 + beq _02226A7A + pop {r4, pc} +_02226A74: + add r0, r1, #1 + strb r0, [r4] + pop {r4, pc} +_02226A7A: + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02226A64 + + thumb_func_start ov12_02226A88 +ov12_02226A88: ; 0x02226A88 + push {r4, lr} + add r4, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r1, r0, #0 + mov r0, #0 + strb r0, [r1] + mov r2, #1 + ldr r0, _02226AA8 ; =ov12_02226A64 + lsl r2, r2, #0xc + str r4, [r1, #4] + bl sub_0200D9E8 + pop {r4, pc} + ; .align 2, 0 +_02226AA8: .word ov12_02226A64 + thumb_func_end ov12_02226A88 + + thumb_func_start ov12_02226AAC +ov12_02226AAC: ; 0x02226AAC + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldrb r0, [r5] + cmp r0, #0 + beq _02226ABE + cmp r0, #1 + beq _02226B04 + pop {r4, r5, r6, pc} +_02226ABE: + ldr r0, [r5, #0x14] + ldr r0, [r0, #0] + bl sub_0200D324 + ldr r0, [r5, #0x18] + ldr r0, [r0, #0] + bl sub_0200D324 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0200D324 + ldr r0, [r5, #0x14] + mov r1, #1 + ldr r0, [r0, #0] + mov r2, #0 + bl sub_0200D5AC + ldr r0, [r5, #0x18] + mov r1, #0 + ldr r0, [r0, #0] + mvn r1, r1 + mov r2, #0 + bl sub_0200D5AC + ldr r0, [r5, #0x1c] + mov r1, #1 + ldr r0, [r0, #0] + add r2, r1, #0 + bl sub_0200D5AC + ldr r0, [r5, #0xc] + bl sub_0200C7EC + pop {r4, r5, r6, pc} +_02226B04: + ldr r0, [r5, #0x10] + ldr r4, [r5, #4] + bl sub_0200D0F4 + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + add r1, r6, #0 + bl ov12_02220220 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02226AAC + + thumb_func_start ov12_02226B1C +ov12_02226B1C: ; 0x02226B1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r6, r1, #0 + mov r1, #0x73 + str r0, [sp] + mov r0, #5 + lsl r1, r1, #2 + add r7, r2, #0 + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + bne _02226B3A + bl sub_02022974 +_02226B3A: + mov r0, #0 + strb r0, [r4] + str r6, [r4, #8] + str r7, [r4, #0xc] + ldr r0, [sp] + str r5, [r4, #0x10] + str r0, [r4, #4] + ldr r1, [sp] + add r0, sp, #4 + bl ov12_0222329C + str r5, [r4, #0x14] + mov r6, #1 + add r5, r4, #4 + add r7, sp, #4 +_02226B58: + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + add r2, r7, #0 + bl sub_0200CE6C + str r0, [r5, #0x14] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _02226B58 + mov r3, #1 + ldr r0, [sp] + ldr r1, _02226B80 ; =ov12_02226AAC + add r2, r4, #0 + lsl r3, r3, #0xc + bl ov12_022201CC + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02226B80: .word ov12_02226AAC + thumb_func_end ov12_02226B1C \ No newline at end of file diff --git a/asm/ov12_02226B84.s b/asm/ov12_02226B84.s new file mode 100644 index 000000000..7378f0b4b --- /dev/null +++ b/asm/ov12_02226B84.s @@ -0,0 +1,8134 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02226B84 +ov12_02226B84: ; 0x02226B84 + push {r4, lr} + mov r1, #0xc + add r2, r1, #0 + add r2, #0xf4 + add r4, r0, #0 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + pop {r4, pc} + thumb_func_end ov12_02226B84 + + thumb_func_start ov12_02226BA0 +ov12_02226BA0: ; 0x02226BA0 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r2, r0, #0 + ldrb r0, [r5, #4] + cmp r0, #0 + beq _02226BB2 + cmp r0, #1 + beq _02226BD4 + b _02226C9E +_02226BB2: + mov r0, #0x26 + ldrsh r0, [r5, r0] + mov r1, #0x20 + mov r2, #0x22 + str r0, [sp] + mov r3, #0x24 + add r0, r5, #0 + ldrsh r1, [r5, r1] + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + add r0, #0x7c + bl ov12_02226108 + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_02226BD4: + add r0, r5, #0 + add r0, #0x7c + bl ov12_02226138 + cmp r0, #0 + bne _02226BE8 + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_02226BE8: + ldr r2, [r5, #0x28] + mov r1, #1 + lsl r1, r1, #8 + add r0, r2, #0 + and r0, r1 + cmp r0, r1 + bne _02226C34 + ldr r0, [r5, #0] + mov r6, #0 + cmp r0, #0 + ble _02226C82 + add r4, r5, #0 + mov r7, #0x32 +_02226C02: + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _02226C28 + mov r2, #0x7c + mov r3, #0x30 + ldrsh r2, [r5, r2] + ldrsh r3, [r4, r3] + mov r1, #0 + add r2, r2, r3 + bl sub_02007DEC + mov r2, #0x7e + ldrsh r3, [r5, r2] + ldrsh r2, [r4, r7] + ldr r0, [r4, #0x34] + mov r1, #1 + add r2, r3, r2 + bl sub_02007DEC +_02226C28: + ldr r0, [r5, #0] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _02226C02 + b _02226C82 +_02226C34: + lsl r0, r1, #1 + and r2, r0 + cmp r2, r0 + bne _02226C82 + ldr r0, [r5, #0] + mov r6, #0 + cmp r0, #0 + ble _02226C7C + add r4, r5, #0 + mov r7, #0x32 +_02226C48: + ldr r0, [r4, #0x38] + cmp r0, #0 + beq _02226C72 + mov r1, #0x7c + mov r2, #0x30 + ldrsh r1, [r5, r1] + ldrsh r2, [r4, r2] + add r1, r1, r2 + mov r2, #0x7e + ldrsh r3, [r5, r2] + ldrsh r2, [r4, r7] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #0x38] + bl sub_0200D330 +_02226C72: + ldr r0, [r5, #0] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _02226C48 +_02226C7C: + ldr r0, [r5, #0x10] + bl sub_0200C7EC +_02226C82: + mov r0, #1 + ldr r1, [r5, #0x28] + lsl r0, r0, #0xa + and r1, r0 + cmp r1, r0 + bne _02226CAC + mov r3, #0x7c + ldrsh r3, [r5, r3] + ldr r0, [r5, #0x18] + mov r1, #3 + mov r2, #0 + bl sub_02019184 + pop {r3, r4, r5, r6, r7, pc} +_02226C9E: + ldr r0, [r5, #8] + add r1, r2, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 +_02226CAC: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02226BA0 + + thumb_func_start ov12_02226CB0 +ov12_02226CB0: ; 0x02226CB0 + push {r3, r4, r5, lr} + mov r1, #0xa0 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #4 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + strh r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0x22] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + strh r0, [r4, #0x24] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #0x26] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + mov r2, #1 + lsl r2, r2, #8 + str r0, [r4, #0x28] + add r1, r0, #0 + and r0, r2 + cmp r0, r2 + bne _02226D10 + add r2, r4, #0 + add r0, r5, #0 + add r2, #0x2c + add r3, r4, #0 + bl ov12_02235998 + b _02226D26 +_02226D10: + lsl r0, r2, #1 + add r3, r1, #0 + and r3, r0 + cmp r3, r0 + bne _02226D26 + add r2, r4, #0 + add r0, r5, #0 + add r2, #0x2c + add r3, r4, #0 + bl ov12_02235D74 +_02226D26: + ldr r0, [r4, #8] + ldr r1, _02226D34 ; =ov12_02226BA0 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_02226D34: .word ov12_02226BA0 + thumb_func_end ov12_02226CB0 + + thumb_func_start ov12_02226D38 +ov12_02226D38: ; 0x02226D38 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x1c] + cmp r0, #3 + bhi _02226E02 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02226D50: ; jump table + .short _02226D58 - _02226D50 - 2 ; case 0 + .short _02226D76 - _02226D50 - 2 ; case 1 + .short _02226DB8 - _02226D50 - 2 ; case 2 + .short _02226DC4 - _02226D50 - 2 ; case 3 +_02226D58: + ldrh r0, [r4, #0x18] + mov r1, #4 + mov r2, #0x39 + str r0, [sp] + ldrh r3, [r4, #0x16] + ldr r0, _02226EA4 ; =0x04000050 + bl sub_020BF55C + mov r0, #2 + mov r1, #1 + bl sub_02019120 + ldrb r0, [r4, #0x1c] + add r0, r0, #1 + strb r0, [r4, #0x1c] +_02226D76: + ldrh r1, [r4, #8] + ldrh r2, [r4, #0x16] + mov r0, #0 + sub r1, r1, #2 + cmp r2, r1 + bge _02226D88 + add r1, r2, #2 + strh r1, [r4, #0x16] + b _02226D8A +_02226D88: + add r0, r0, #1 +_02226D8A: + ldrh r1, [r4, #0x18] + cmp r1, #9 + bls _02226D96 + sub r1, r1, #2 + strh r1, [r4, #0x18] + b _02226D98 +_02226D96: + add r0, r0, #1 +_02226D98: + cmp r0, #2 + bne _02226DAA + ldrh r0, [r4, #8] + strh r0, [r4, #0x16] + mov r0, #7 + strh r0, [r4, #0x18] + ldrb r0, [r4, #0x1c] + add r0, r0, #1 + strb r0, [r4, #0x1c] +_02226DAA: + ldrh r0, [r4, #0x18] + ldrh r1, [r4, #0x16] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02226EA8 ; =0x04000052 + strh r1, [r0] + b _02226E1A +_02226DB8: + ldr r1, [r4, #4] + cmp r1, #0 + beq _02226E1A + add r0, r0, #1 + strb r0, [r4, #0x1c] + b _02226E1A +_02226DC4: + ldrh r0, [r4, #0x16] + mov r1, #0 + cmp r0, #2 + bls _02226DD2 + sub r0, r0, #2 + strh r0, [r4, #0x16] + b _02226DD4 +_02226DD2: + add r1, r1, #1 +_02226DD4: + ldrh r0, [r4, #0x18] + cmp r0, #0x1d + bhs _02226DE0 + add r0, r0, #2 + strh r0, [r4, #0x18] + b _02226DE2 +_02226DE0: + add r1, r1, #1 +_02226DE2: + cmp r1, #2 + bne _02226DF4 + mov r0, #0 + strh r0, [r4, #0x16] + mov r0, #0x1f + strh r0, [r4, #0x18] + ldrb r0, [r4, #0x1c] + add r0, r0, #1 + strb r0, [r4, #0x1c] +_02226DF4: + ldrh r0, [r4, #0x18] + ldrh r1, [r4, #0x16] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02226EA8 ; =0x04000052 + strh r1, [r0] + b _02226E1A +_02226E02: + mov r0, #2 + mov r1, #0 + bl sub_02019120 + ldr r0, [r4, #0x20] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_02226E1A: + mov r1, #0x10 + ldrsh r3, [r4, r1] + cmp r3, #0 + ble _02226E2C + mov r0, #0xc + ldrsh r2, [r4, r0] + lsl r0, r1, #5 + cmp r2, r0 + bge _02226E3A +_02226E2C: + cmp r3, #0 + bge _02226E3E + mov r0, #0xc + ldrsh r1, [r4, r0] + ldr r0, _02226EAC ; =0xFFFFFE64 + cmp r1, r0 + bgt _02226E3E +_02226E3A: + mov r0, #1 + str r0, [r4, #4] +_02226E3E: + mov r0, #0xa + ldrsh r1, [r4, r0] + mov r0, #0xe + ldrsh r0, [r4, r0] + add r0, r1, r0 + strh r0, [r4, #0xa] + mov r0, #0xc + ldrsh r2, [r4, r0] + mov r0, #0x10 + ldrsh r1, [r4, r0] + add r1, r2, r1 + strh r1, [r4, #0xc] + ldrh r2, [r4, #0x12] + ldrh r1, [r4, #0x14] + cmp r2, r1 + bhs _02226E82 + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _02226E68 + add r0, r0, #1 + b _02226E6A +_02226E68: + mov r0, #0 +_02226E6A: + strh r0, [r4, #0x10] + mov r0, #0xe + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _02226E78 + add r0, r0, #1 + b _02226E7A +_02226E78: + mov r0, #0 +_02226E7A: + strh r0, [r4, #0xe] + mov r0, #0 + strh r0, [r4, #0x14] + b _02226E86 +_02226E82: + add r0, r1, #1 + strh r0, [r4, #0x14] +_02226E86: + mov r3, #0xa + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #3 + bl sub_02019184 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02226EA4: .word 0x04000050 +_02226EA8: .word 0x04000052 +_02226EAC: .word 0xFFFFFE64 + thumb_func_end ov12_02226D38 + + thumb_func_start ov12_02226EB0 +ov12_02226EB0: ; 0x02226EB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0xb8 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x1c + bl ov12_0223595C + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #0xe] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strh r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + strh r0, [r4, #8] + add r0, r5, #0 + mov r1, #7 + bl ov12_02220280 + strh r0, [r4, #0x12] + mov r0, #0 + strh r0, [r4, #0x14] + ldr r0, [r4, #0] + cmp r0, #0 + beq _02226F5C + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + bne _02226F5C + mov r0, #0xa + ldrsh r1, [r4, r0] + sub r0, #0xb + mul r0, r1 + strh r0, [r4, #0xa] + mov r1, #0xc + add r0, r1, #0 + ldrsh r2, [r4, r1] + sub r0, #0xd + mul r0, r2 + strh r0, [r4, #0xc] + mov r0, #0xe + ldrsh r2, [r4, r0] + sub r0, #0xf + mul r0, r2 + strh r0, [r4, #0xe] + mov r0, #0x10 + ldrsh r2, [r4, r0] + sub r0, #0x11 + mul r0, r2 + strh r0, [r4, #0x10] + ldrsh r0, [r4, r1] + sub r0, #0x54 + strh r0, [r4, #0xc] + b _02226F64 +_02226F5C: + mov r0, #0xc + ldrsh r0, [r4, r0] + add r0, #0x54 + strh r0, [r4, #0xc] +_02226F64: + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02226F78 + mov r0, #0xe + ldrsh r1, [r4, r0] + sub r0, #0xf + mul r0, r1 + strh r0, [r4, #0xe] +_02226F78: + mov r1, #0 + strh r1, [r4, #0x16] + mov r0, #0x1f + strh r0, [r4, #0x18] + mov r0, #2 + str r1, [r4, #4] + bl sub_02019120 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + mov r1, #0 + add r7, r0, #0 + bl ov12_022234E4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r2, [r4, #0x30] + mov r0, #7 + add r1, r6, #0 + mov r3, #2 + bl sub_02006E3C + add r0, r7, #0 + mov r1, #1 + bl ov12_022234E4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x90 + str r0, [sp, #8] + ldr r0, [r4, #0x34] + mov r1, #7 + add r2, r6, #0 + bl sub_02003050 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_02019EBC + add r0, r5, #0 + mov r6, #2 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02226FF8 + mov r6, #4 + b _0222700C +_02226FF8: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222700C + mov r6, #3 +_0222700C: + add r0, r7, #0 + add r1, r6, #0 + bl ov12_022234E4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r2, [r4, #0x30] + mov r0, #7 + add r1, r6, #0 + mov r3, #2 + bl sub_02006E60 + mov r3, #0xa + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #3 + bl sub_02019184 + ldr r0, [r4, #0x20] + ldr r1, _02227060 ; =ov12_02226D38 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02227060: .word ov12_02226D38 + thumb_func_end ov12_02226EB0 + + thumb_func_start ov12_02227064 +ov12_02227064: ; 0x02227064 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x1c] + cmp r0, #3 + bhi _0222712A + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222707C: ; jump table + .short _02227084 - _0222707C - 2 ; case 0 + .short _022270A2 - _0222707C - 2 ; case 1 + .short _022270E0 - _0222707C - 2 ; case 2 + .short _022270EC - _0222707C - 2 ; case 3 +_02227084: + ldrh r0, [r4, #0x18] + mov r1, #4 + mov r2, #0x39 + str r0, [sp] + ldrh r3, [r4, #0x16] + ldr r0, _022271CC ; =0x04000050 + bl sub_020BF55C + mov r0, #2 + mov r1, #1 + bl sub_02019120 + ldrb r0, [r4, #0x1c] + add r0, r0, #1 + strb r0, [r4, #0x1c] +_022270A2: + ldrh r0, [r4, #0x16] + mov r1, #0 + cmp r0, #0x10 + bhs _022270B0 + add r0, r0, #2 + strh r0, [r4, #0x16] + b _022270B2 +_022270B0: + add r1, r1, #1 +_022270B2: + ldrh r0, [r4, #0x18] + cmp r0, #4 + bls _022270BE + sub r0, r0, #2 + strh r0, [r4, #0x18] + b _022270C0 +_022270BE: + add r1, r1, #1 +_022270C0: + cmp r1, #2 + bne _022270D2 + mov r0, #0x10 + strh r0, [r4, #0x16] + mov r0, #4 + strh r0, [r4, #0x18] + ldrb r0, [r4, #0x1c] + add r0, r0, #1 + strb r0, [r4, #0x1c] +_022270D2: + ldrh r0, [r4, #0x18] + ldrh r1, [r4, #0x16] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _022271D0 ; =0x04000052 + strh r1, [r0] + b _02227142 +_022270E0: + ldr r1, [r4, #4] + cmp r1, #0 + beq _02227142 + add r0, r0, #1 + strb r0, [r4, #0x1c] + b _02227142 +_022270EC: + ldrh r0, [r4, #0x16] + mov r1, #0 + cmp r0, #2 + bls _022270FA + sub r0, r0, #2 + strh r0, [r4, #0x16] + b _022270FC +_022270FA: + add r1, r1, #1 +_022270FC: + ldrh r0, [r4, #0x18] + cmp r0, #0x10 + bhs _02227108 + add r0, r0, #2 + strh r0, [r4, #0x18] + b _0222710A +_02227108: + add r1, r1, #1 +_0222710A: + cmp r1, #2 + bne _0222711C + mov r0, #0 + strh r0, [r4, #0x16] + mov r0, #0x1f + strh r0, [r4, #0x18] + ldrb r0, [r4, #0x1c] + add r0, r0, #1 + strb r0, [r4, #0x1c] +_0222711C: + ldrh r0, [r4, #0x18] + ldrh r1, [r4, #0x16] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _022271D0 ; =0x04000052 + strh r1, [r0] + b _02227142 +_0222712A: + mov r0, #2 + mov r1, #0 + bl sub_02019120 + ldr r0, [r4, #0x20] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_02227142: + mov r1, #0x10 + ldrsh r3, [r4, r1] + cmp r3, #0 + ble _02227154 + mov r0, #0xc + ldrsh r2, [r4, r0] + lsl r0, r1, #5 + cmp r2, r0 + bge _02227162 +_02227154: + cmp r3, #0 + bge _02227166 + mov r0, #0xc + ldrsh r1, [r4, r0] + ldr r0, _022271D4 ; =0xFFFFFE64 + cmp r1, r0 + bgt _02227166 +_02227162: + mov r0, #1 + str r0, [r4, #4] +_02227166: + mov r0, #0xa + ldrsh r1, [r4, r0] + mov r0, #0xe + ldrsh r0, [r4, r0] + add r0, r1, r0 + strh r0, [r4, #0xa] + mov r0, #0xc + ldrsh r2, [r4, r0] + mov r0, #0x10 + ldrsh r1, [r4, r0] + add r1, r2, r1 + strh r1, [r4, #0xc] + ldrh r2, [r4, #0x12] + ldrh r1, [r4, #0x14] + cmp r2, r1 + bhs _022271AA + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _02227190 + add r0, r0, #1 + b _02227192 +_02227190: + mov r0, #0 +_02227192: + strh r0, [r4, #0x10] + mov r0, #0xe + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _022271A0 + add r0, r0, #1 + b _022271A2 +_022271A0: + mov r0, #0 +_022271A2: + strh r0, [r4, #0xe] + mov r0, #0 + strh r0, [r4, #0x14] + b _022271AE +_022271AA: + add r0, r1, #1 + strh r0, [r4, #0x14] +_022271AE: + mov r3, #0xa + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #3 + bl sub_02019184 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022271CC: .word 0x04000050 +_022271D0: .word 0x04000052 +_022271D4: .word 0xFFFFFE64 + thumb_func_end ov12_02227064 + + thumb_func_start ov12_022271D8 +ov12_022271D8: ; 0x022271D8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0xb8 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x1c + bl ov12_0223595C + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #0xe] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strh r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + strh r0, [r4, #8] + add r0, r5, #0 + mov r1, #7 + bl ov12_02220280 + strh r0, [r4, #0x12] + mov r0, #0 + strh r0, [r4, #0x14] + ldr r0, [r4, #0] + cmp r0, #0 + beq _02227284 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + bne _02227284 + mov r0, #0xa + ldrsh r1, [r4, r0] + sub r0, #0xb + mul r0, r1 + strh r0, [r4, #0xa] + mov r1, #0xc + add r0, r1, #0 + ldrsh r2, [r4, r1] + sub r0, #0xd + mul r0, r2 + strh r0, [r4, #0xc] + mov r0, #0xe + ldrsh r2, [r4, r0] + sub r0, #0xf + mul r0, r2 + strh r0, [r4, #0xe] + mov r0, #0x10 + ldrsh r2, [r4, r0] + sub r0, #0x11 + mul r0, r2 + strh r0, [r4, #0x10] + ldrsh r0, [r4, r1] + sub r0, #0x54 + strh r0, [r4, #0xc] + b _0222728C +_02227284: + mov r0, #0xc + ldrsh r0, [r4, r0] + add r0, #0x54 + strh r0, [r4, #0xc] +_0222728C: + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _022272A0 + mov r0, #0xe + ldrsh r1, [r4, r0] + sub r0, #0xf + mul r0, r1 + strh r0, [r4, #0xe] +_022272A0: + mov r0, #4 + strh r0, [r4, #0x16] + mov r0, #0x10 + strh r0, [r4, #0x18] + mov r1, #0 + strh r1, [r4, #0x16] + strh r0, [r4, #0x18] + mov r0, #2 + str r1, [r4, #4] + bl sub_02019120 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + mov r1, #0 + add r7, r0, #0 + bl ov12_022234E4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r2, [r4, #0x30] + mov r0, #7 + add r1, r6, #0 + mov r3, #2 + bl sub_02006E3C + add r0, r7, #0 + mov r1, #1 + bl ov12_022234E4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x90 + str r0, [sp, #8] + ldr r0, [r4, #0x34] + mov r1, #7 + add r2, r6, #0 + bl sub_02003050 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_02019EBC + add r0, r5, #0 + mov r6, #2 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02227326 + mov r6, #4 + b _0222733A +_02227326: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222733A + mov r6, #3 +_0222733A: + add r0, r7, #0 + add r1, r6, #0 + bl ov12_022234E4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r2, [r4, #0x30] + mov r0, #7 + add r1, r6, #0 + mov r3, #2 + bl sub_02006E60 + mov r3, #0xa + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x30] + mov r1, #2 + mov r2, #3 + bl sub_02019184 + ldr r0, [r4, #0x20] + ldr r1, _0222738C ; =ov12_02227064 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222738C: .word ov12_02227064 + thumb_func_end ov12_022271D8 + + thumb_func_start ov12_02227390 +ov12_02227390: ; 0x02227390 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _022273A6 + cmp r0, #1 + beq _022273A6 + cmp r0, #2 + beq _022273D8 + pop {r3, r4, r5, pc} +_022273A6: + add r0, r4, #0 + add r0, #0xc + bl ov12_02225DA0 + cmp r0, #1 + bne _022273C2 + ldr r2, [r4, #0xc] + ldr r0, [r4, #8] + lsl r2, r2, #0x10 + mov r1, #9 + lsr r2, r2, #0x10 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_022273C2: + add r0, r4, #0 + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x20] + ldr r3, [r4, #0x24] + add r0, #0xc + bl ov12_02225D50 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_022273D8: + ldr r0, [r4, #8] + mov r1, #0xa + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #0xb + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #9 + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02227390 + + thumb_func_start ov12_02227408 +ov12_02227408: ; 0x02227408 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x2c + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + str r5, [r4, #4] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #0x24] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + add r7, r0, #0 + beq _02227442 + cmp r7, #2 + bne _0222744C +_02227442: + ldr r0, [r4, #4] + bl ov12_02220248 + str r0, [sp] + b _02227454 +_0222744C: + ldr r0, [r4, #4] + bl ov12_02220240 + str r0, [sp] +_02227454: + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r2, r0, #0 + add r0, r4, #0 + ldr r1, [r4, #0x20] + ldr r3, [r4, #0x24] + add r0, #0xc + bl ov12_02225D50 + ldr r1, [sp] + add r0, r5, #0 + bl ov12_02225964 + add r6, r0, #0 + ldr r0, [r4, #0x14] + add r1, r0, #0 + mul r1, r6 + str r1, [r4, #0x14] + cmp r7, #2 + bne _02227486 + mov r0, #0 + mvn r0, r0 + mul r6, r0 +_02227486: + ldr r0, [r4, #4] + ldr r1, [sp] + bl ov12_022232FC + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + cmp r0, #1 + bne _022274B0 + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strh r0, [r4, #0x28] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + b _022274B8 +_022274B0: + mov r0, #0x28 + add r1, r6, #0 + mul r1, r0 + strh r1, [r4, #0x28] +_022274B8: + strh r0, [r4, #0x2a] + mov r2, #0x28 + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #0xa + bl sub_02007DEC + mov r2, #0x2a + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #0xb + bl sub_02007DEC + ldr r0, [r4, #4] + ldr r1, _022274E0 ; =ov12_02227390 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022274E0: .word ov12_02227390 + thumb_func_end ov12_02227408 + + thumb_func_start ov12_022274E4 +ov12_022274E4: ; 0x022274E4 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x2c + mov r2, #0x2e + add r5, r0, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x28] + add r0, r4, #4 + bl ov12_02225BA0 + cmp r0, #0 + bne _02227530 + mov r2, #0x2c + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x2e + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x28] + mov r1, #1 + sub r2, #8 + bl sub_02007DEC + ldr r0, [r4, #0x28] + mov r1, #9 + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02227530: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022274E4 + + thumb_func_start ov12_02227534 +ov12_02227534: ; 0x02227534 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + str r5, [r4, #0] + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r2, r0, #0 + add r0, r4, #4 + add r1, r6, #0 + bl ov12_022263A4 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + cmp r0, #8 + bgt _0222757E + cmp r0, #2 + blt _022275F0 + beq _02227584 + cmp r0, #4 + beq _022275A0 + cmp r0, #8 + beq _022275C4 + b _022275F0 +_0222757E: + cmp r0, #0x10 + beq _022275D6 + b _022275F0 +_02227584: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x28] + mov r0, #0 + ldr r1, [r4, #0x10] + mvn r0, r0 + mul r0, r1 + str r0, [r4, #0x10] + b _022275F4 +_022275A0: + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022352AC + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x28] + mov r0, #0 + ldr r1, [r4, #0x10] + mvn r0, r0 + mul r0, r1 + str r0, [r4, #0x10] + b _022275F4 +_022275C4: + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x28] + b _022275F4 +_022275D6: + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022352AC + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x28] + b _022275F4 +_022275F0: + bl sub_02022974 +_022275F4: + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x2c] + ldr r0, [r4, #0x28] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x2e] + mov r0, #0x2e + ldrsh r0, [r4, r0] + ldr r1, _0222761C ; =ov12_022274E4 + add r2, r4, #0 + add r0, #8 + strh r0, [r4, #0x2e] + ldr r0, [r4, #0] + bl ov12_022201E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222761C: .word ov12_022274E4 + thumb_func_end ov12_02227534 + + thumb_func_start ov12_02227620 +ov12_02227620: ; 0x02227620 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, [r5, #0x14] + add r4, r1, #0 + mov r1, #1 + add r6, r2, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x14] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200D4C4 + mov r0, #0 + str r0, [r5, #0x40] + mov r0, #4 + mov r1, #0xa + add r5, #0x18 + str r0, [sp] + add r0, r5, #0 + add r2, r1, #0 + mov r3, #0xe + bl ov12_02225E68 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02227620 + + thumb_func_start ov12_02227658 +ov12_02227658: ; 0x02227658 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r1, [r4, #0x14] + add r0, #0x18 + bl ov12_022260A8 + cmp r0, #0 + bne _02227694 + ldr r0, [r4, #0x40] + cmp r0, #0 + beq _0222767E + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D3F4 + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_0222767E: + mov r0, #1 + str r0, [r4, #0x40] + mov r0, #2 + add r4, #0x18 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xe + mov r2, #0xa + mov r3, #0xc + bl ov12_02225E68 +_02227694: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02227658 + + thumb_func_start ov12_0222769C +ov12_0222769C: ; 0x0222769C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r1, [r4, #0x48] + mov r5, #0 + cmp r1, #4 + bhi _02227734 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022276B4: ; jump table + .short _022276BE - _022276B4 - 2 ; case 0 + .short _022276E4 - _022276B4 - 2 ; case 1 + .short _022276F4 - _022276B4 - 2 ; case 2 + .short _02227722 - _022276B4 - 2 ; case 3 + .short _02227732 - _022276B4 - 2 ; case 4 +_022276BE: + mov r1, #0x4c + ldrsh r3, [r4, r1] + ldr r2, [r4, #0x3c] + mov r1, #0x18 + mul r1, r2 + mov r2, #0x4e + ldrsh r2, [r4, r2] + add r1, r3, r1 + lsl r1, r1, #0x10 + sub r2, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02227620 + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] + b _02227734 +_022276E4: + bl ov12_02227658 + cmp r0, #0 + beq _02227734 + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] + b _02227734 +_022276F4: + ldr r1, [r4, #0x44] + sub r1, r1, #1 + str r1, [r4, #0x44] + bpl _02227734 + ldr r1, [r4, #0x48] + add r1, r1, #1 + str r1, [r4, #0x48] + mov r1, #0x4c + ldrsh r3, [r4, r1] + ldr r2, [r4, #0x3c] + mov r1, #0x18 + mul r1, r2 + mov r2, #0x4e + ldrsh r2, [r4, r2] + sub r1, r3, r1 + lsl r1, r1, #0x10 + sub r2, #0x18 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02227620 + b _02227734 +_02227722: + bl ov12_02227658 + cmp r0, #0 + beq _02227734 + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] + b _02227734 +_02227732: + mov r5, #1 +_02227734: + add r0, r5, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_0222769C + + thumb_func_start ov12_02227738 +ov12_02227738: ; 0x02227738 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0222774A + cmp r0, #1 + beq _0222775C + b _02227772 +_0222774A: + add r0, r4, #0 + bl ov12_0222769C + cmp r0, #0 + beq _02227772 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02227772 +_0222775C: + ldr r0, [r4, #0x14] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_02227772: + ldr r0, [r4, #8] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02227738 + + thumb_func_start ov12_0222777C +ov12_0222777C: ; 0x0222777C + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x50 + add r5, r0, #0 + str r2, [sp] + add r6, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + ldr r0, [sp] + str r7, [r4, #4] + str r0, [r4, #8] + str r6, [r4, #0x14] + add r0, r6, #0 + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x14] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #4 + str r0, [r4, #0x44] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + add r5, r0, #0 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x4c + strh r0, [r1] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x4e + strh r0, [r1] + ldr r0, [r4, #0] + ldr r1, _02227804 ; =ov12_02227738 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02227804: .word ov12_02227738 + thumb_func_end ov12_0222777C + + thumb_func_start ov12_02227808 +ov12_02227808: ; 0x02227808 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl sub_0200384C + cmp r0, #0 + bne _02227826 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_02227826: + pop {r3, r4, r5, pc} + thumb_func_end ov12_02227808 + + thumb_func_start ov12_02227828 +ov12_02227828: ; 0x02227828 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r1, #8 + add r5, r0, #0 + bl ov12_02235E50 + add r6, r0, #0 + str r5, [r6, #0] + add r0, r5, #0 + bl ov12_0222332C + str r0, [r6, #4] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + cmp r0, #0 + beq _02227856 + cmp r0, #1 + beq _02227862 + cmp r0, #2 + beq _02227868 + b _0222786E +_02227856: + add r0, r5, #0 + bl ov12_02222354 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + b _02227872 +_02227862: + mov r4, #1 + lsl r4, r4, #8 + b _02227872 +_02227868: + mov r4, #2 + lsl r4, r4, #8 + b _02227872 +_0222786E: + bl sub_02022974 +_02227872: + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + ldr r1, [sp, #0xc] + lsl r0, r0, #0x10 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + ldr r1, [sp, #0x10] + lsl r3, r7, #0x18 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [r6, #4] + mov r1, #1 + add r2, r4, #0 + asr r3, r3, #0x18 + bl sub_02003178 + ldr r0, [r6, #0] + ldr r1, _022278CC ; =ov12_02227808 + add r2, r6, #0 + bl ov12_022201E8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_022278CC: .word ov12_02227808 + thumb_func_end ov12_02227828 + + thumb_func_start ov12_022278D0 +ov12_022278D0: ; 0x022278D0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #5 + bhi _02227978 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022278E8: ; jump table + .short _022278F4 - _022278E8 - 2 ; case 0 + .short _0222790C - _022278E8 - 2 ; case 1 + .short _0222791E - _022278E8 - 2 ; case 2 + .short _02227930 - _022278E8 - 2 ; case 3 + .short _02227948 - _022278E8 - 2 ; case 4 + .short _0222796A - _022278E8 - 2 ; case 5 +_022278F4: + ldr r0, [r4, #0x14] + mov r1, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r2, [r4, #0x18] + ldr r3, [r4, #0x10] + bl sub_020086FC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0222790C: + ldr r0, [r4, #4] + bl sub_020087B4 + cmp r0, #0 + bne _02227978 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0222791E: + ldr r1, [r4, #0x1c] + cmp r1, #0 + bne _0222792A + add r0, r0, #1 + str r0, [r4, #8] + b _02227930 +_0222792A: + sub r0, r1, #1 + str r0, [r4, #0x1c] + pop {r3, r4, r5, pc} +_02227930: + ldr r0, [r4, #0x14] + mov r2, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r1, [r4, #0x18] + ldr r3, [r4, #0x10] + bl sub_020086FC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_02227948: + ldr r0, [r4, #4] + bl sub_020087B4 + cmp r0, #0 + bne _02227978 + ldr r0, [r4, #0xc] + sub r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0 + bgt _02227964 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_02227964: + mov r0, #0 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0222796A: + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_02227978: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_022278D0 + + thumb_func_start ov12_0222797C +ov12_0222797C: ; 0x0222797C + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x20 + add r4, r0, #0 + bl ov12_02235E50 + add r6, r0, #0 + str r4, [r6, #0] + mov r1, #0 + add r0, r4, #0 + str r1, [r6, #4] + bl ov12_02220280 + ldr r2, _02227B44 ; =0x00000802 + cmp r0, r2 + bgt _022279B6 + bge _02227A3C + cmp r0, #8 + bgt _022279B0 + cmp r0, #2 + blt _022279AE + beq _022279CE + cmp r0, #4 + beq _022279E0 + cmp r0, #8 + beq _02227A06 +_022279AE: + b _02227AF4 +_022279B0: + cmp r0, #0x10 + beq _02227A18 + b _02227AF4 +_022279B6: + add r1, r2, #6 + cmp r0, r1 + bgt _022279C6 + bge _02227A98 + add r1, r2, #2 + cmp r0, r1 + beq _02227A6C + b _02227AF4 +_022279C6: + add r2, #0xe + cmp r0, r2 + beq _02227AC8 + b _02227AF4 +_022279CE: + add r0, r4, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_022279E0: + add r0, r4, #0 + bl ov12_02223364 + cmp r0, #1 + beq _022279EC + b _02227AF8 +_022279EC: + ldr r0, [r6, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022352AC + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227A06: + add r0, r4, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227A18: + add r0, r4, #0 + bl ov12_02223364 + cmp r0, #1 + bne _02227AF8 + ldr r0, [r6, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022352AC + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227A3C: + mov r7, #0xff + mov r5, #0 +_02227A40: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #0 + beq _02227A50 + cmp r0, #2 + bne _02227A54 +_02227A50: + add r7, r5, #0 + b _02227A5A +_02227A54: + add r5, r5, #1 + cmp r5, #4 + blt _02227A40 +_02227A5A: + cmp r7, #0xff + bne _02227A60 + mov r7, #0 +_02227A60: + ldr r0, [r6, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227A6C: + mov r7, #0xff + mov r5, #0 +_02227A70: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #4 + bne _02227A80 + add r7, r5, #0 + b _02227A86 +_02227A80: + add r5, r5, #1 + cmp r5, #4 + blt _02227A70 +_02227A86: + cmp r7, #0xff + bne _02227A8C + mov r7, #0 +_02227A8C: + ldr r0, [r6, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227A98: + mov r7, #0xff + mov r5, #0 +_02227A9C: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #1 + beq _02227AAC + cmp r0, #3 + bne _02227AB0 +_02227AAC: + add r7, r5, #0 + b _02227AB6 +_02227AB0: + add r5, r5, #1 + cmp r5, #4 + blt _02227A9C +_02227AB6: + cmp r7, #0xff + bne _02227ABC + mov r7, #0 +_02227ABC: + ldr r0, [r6, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227AC8: + mov r7, #0xff + mov r5, #0 +_02227ACC: + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022232B8 + cmp r0, #5 + bne _02227ADC + add r7, r5, #0 + b _02227AE2 +_02227ADC: + add r5, r5, #1 + cmp r5, #4 + blt _02227ACC +_02227AE2: + cmp r7, #0xff + bne _02227AE8 + mov r7, #0 +_02227AE8: + ldr r0, [r6, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r6, #4] + b _02227AF8 +_02227AF4: + bl sub_02022974 +_02227AF8: + ldr r0, [r6, #4] + cmp r0, #0 + bne _02227B06 + add r0, r6, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_02227B06: + add r0, r4, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r6, #0x10] + add r0, r4, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r6, #0xc] + add r0, r4, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r6, #0x14] + add r0, r4, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r6, #0x18] + add r0, r4, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r6, #0x1c] + ldr r0, [r6, #0] + ldr r1, _02227B48 ; =ov12_022278D0 + add r2, r6, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02227B44: .word 0x00000802 +_02227B48: .word ov12_022278D0 + thumb_func_end ov12_0222797C + + thumb_func_start ov12_02227B4C +ov12_02227B4C: ; 0x02227B4C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #4 + bls _02227B5C + b _02227CB0 +_02227B5C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02227B68: ; jump table + .short _02227B72 - _02227B68 - 2 ; case 0 + .short _02227BC0 - _02227B68 - 2 ; case 1 + .short _02227C12 - _02227B68 - 2 ; case 2 + .short _02227C3C - _02227B68 - 2 ; case 3 + .short _02227C9E - _02227B68 - 2 ; case 4 +_02227B72: + ldr r0, [r4, #0x4c] + asr r0, r0, #0x10 + str r0, [sp] + ldr r1, [r4, #0x3c] + ldr r2, [r4, #0x44] + ldr r3, [r4, #0x40] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x14 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225E68 + add r0, r4, #0 + add r0, #0x14 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x50] + cmp r0, #1 + bne _02227BAE + ldr r1, [sp, #8] + mov r0, #0 + bl sub_020E1A9C + str r0, [sp, #8] +_02227BAE: + ldr r0, [r4, #0x10] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + bl sub_0200D6E8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02227CB0 +_02227BC0: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x14 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x50] + cmp r0, #1 + bne _02227BE6 + ldr r1, [sp, #8] + mov r0, #0 + bl sub_020E1A9C + str r0, [sp, #8] +_02227BE6: + ldr r0, [r4, #0x10] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + bl sub_0200D6E8 + cmp r5, #0 + beq _02227C0A + mov r0, #0 + str r0, [sp] + mov r1, #0xc + mov r2, #0xe + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r3, [r4, #0x28] + bl ov12_0222605C + b _02227CB0 +_02227C0A: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02227CB0 +_02227C12: + ldr r0, [r4, #0x4c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r1, [r4, #0x40] + ldr r2, [r4, #0x44] + ldr r3, [r4, #0x3c] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x14 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225E68 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02227CB0 +_02227C3C: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x14 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x50] + cmp r0, #1 + bne _02227C62 + ldr r1, [sp, #8] + mov r0, #0 + bl sub_020E1A9C + str r0, [sp, #8] +_02227C62: + ldr r0, [r4, #0x10] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + bl sub_0200D6E8 + cmp r5, #0 + beq _02227C86 + mov r0, #0 + str r0, [sp] + mov r1, #0xc + mov r2, #0xe + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r3, [r4, #0x28] + bl ov12_0222605C + b _02227CB0 +_02227C86: + ldr r0, [r4, #0x48] + sub r0, r0, #1 + str r0, [r4, #0x48] + cmp r0, #0 + bgt _02227C98 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02227CB0 +_02227C98: + mov r0, #0 + str r0, [r4, #8] + b _02227CB0 +_02227C9E: + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add sp, #0xc + pop {r4, r5, pc} +_02227CB0: + ldr r0, [r4, #4] + bl sub_0200C7EC + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02227B4C + + thumb_func_start ov12_02227CBC +ov12_02227CBC: ; 0x02227CBC + push {r4, r5, r6, lr} + mov r1, #0x54 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + cmp r0, #0 + bne _02227CFE + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 + b _02227D1C +_02227CFE: + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 +_02227D1C: + strh r0, [r4, #0xe] + add r0, r6, #0 + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #0x29 + bl sub_020080C0 + mov r1, #0xc + ldrsh r1, [r4, r1] + sub r0, r1, r0 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r4, #0x38] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #0x3c] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #0x40] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r4, #0x44] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0x48] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + str r0, [r4, #0x4c] + add r0, r5, #0 + mov r1, #7 + bl ov12_02220280 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022202C0 + str r0, [r4, #0x10] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x10] + mov r1, #2 + bl sub_0200D6A4 + ldr r1, [r4, #0x38] + mov r2, #0x10 + ldr r0, [r4, #0] + sub r2, r2, r1 + bl ov12_02235780 + ldr r0, [r4, #0] + ldr r1, _02227DDC ; =ov12_02227B4C + add r2, r4, #0 + bl ov12_022201E8 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + cmp r0, #0 + beq _02227DCA + mov r1, #1 + b _02227DCC +_02227DCA: + mov r1, #0 +_02227DCC: + ldr r0, [r4, #0] + bl ov12_022234A8 + cmp r0, #1 + bne _02227DDA + mov r0, #1 + str r0, [r4, #0x50] +_02227DDA: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02227DDC: .word ov12_02227B4C + thumb_func_end ov12_02227CBC + + thumb_func_start ov12_02227DE0 +ov12_02227DE0: ; 0x02227DE0 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #5 + bls _02227DF0 + b _02227F2C +_02227DF0: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02227DFC: ; jump table + .short _02227E08 - _02227DFC - 2 ; case 0 + .short _02227E4C - _02227DFC - 2 ; case 1 + .short _02227E7C - _02227DFC - 2 ; case 2 + .short _02227E90 - _02227DFC - 2 ; case 3 + .short _02227ED6 - _02227DFC - 2 ; case 4 + .short _02227F18 - _02227DFC - 2 ; case 5 +_02227E08: + ldr r0, [r4, #0x40] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x44] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #0x4c] + asr r0, r0, #0x10 + str r0, [sp, #8] + ldr r1, [r4, #0x34] + ldr r2, [r4, #0x38] + ldr r3, [r4, #0x3c] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225EF0 + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_022260C8 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02227E4C: + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_022260E8 + cmp r0, #0 + beq _02227E72 + mov r0, #0 + str r0, [sp] + mov r1, #8 + mov r2, #0xa + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + bl ov12_02226024 + add sp, #0xc + pop {r4, r5, pc} +_02227E72: + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02227E7C: + ldr r1, [r4, #0x50] + cmp r1, #0 + bne _02227E88 + add r0, r0, #1 + str r0, [r4, #4] + b _02227E90 +_02227E88: + sub r0, r1, #1 + add sp, #0xc + str r0, [r4, #0x50] + pop {r4, r5, pc} +_02227E90: + ldr r0, [r4, #0x3c] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x44] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #0x4c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r1, [r4, #0x38] + ldr r2, [r4, #0x34] + ldr r3, [r4, #0x40] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225EF0 + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_022260E8 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02227ED6: + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_022260E8 + cmp r0, #0 + beq _02227EFC + mov r0, #0 + str r0, [sp] + mov r1, #8 + mov r2, #0xa + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + bl ov12_02226024 + add sp, #0xc + pop {r4, r5, pc} +_02227EFC: + ldr r0, [r4, #0x48] + sub r0, r0, #1 + str r0, [r4, #0x48] + cmp r0, #0 + bgt _02227F10 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02227F10: + mov r0, #0 + add sp, #0xc + str r0, [r4, #4] + pop {r4, r5, pc} +_02227F18: + ldr r0, [r4, #0xc] + bl ov12_02226B84 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_02227F2C: + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov12_02227DE0 + + thumb_func_start ov12_02227F30 +ov12_02227F30: ; 0x02227F30 + push {r4, r5, r6, r7, lr} + sub sp, #0x54 + add r5, r0, #0 + mov r1, #0x54 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + str r5, [r4, #0] + bl ov12_02220280 + ldr r2, _02228134 ; =0x00000802 + cmp r0, r2 + bgt _02227F74 + bge _02227FE0 + mov r2, #0x42 + lsl r2, r2, #2 + cmp r0, r2 + bgt _02227F6C + sub r1, r2, #6 + cmp r0, r1 + blt _02227F6A + beq _02227F8C + sub r1, r2, #4 + cmp r0, r1 + beq _02227F8C + cmp r0, r2 + beq _02227FB6 +_02227F6A: + b _02228096 +_02227F6C: + add r2, #8 + cmp r0, r2 + beq _02227FB6 + b _02228096 +_02227F74: + add r1, r2, #6 + cmp r0, r1 + bgt _02227F84 + bge _0222803C + add r1, r2, #2 + cmp r0, r1 + beq _02228010 + b _02228096 +_02227F84: + add r2, #0xe + cmp r0, r2 + beq _0222806C + b _02228096 +_02227F8C: + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 + strh r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r1, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #4 + add r3, sp, #0 + bl ov12_02235998 + ldr r0, [sp, #0xc] + str r0, [r4, #0xc] + b _02228096 +_02227FB6: + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 + strh r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r1, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #4 + add r3, sp, #0 + bl ov12_02235998 + ldr r0, [sp, #0xc] + str r0, [r4, #0xc] + b _02228096 +_02227FE0: + mov r7, #0xff + mov r6, #0 +_02227FE4: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232B8 + cmp r0, #0 + beq _02227FF4 + cmp r0, #2 + bne _02227FF8 +_02227FF4: + add r7, r6, #0 + b _02227FFE +_02227FF8: + add r6, r6, #1 + cmp r6, #4 + blt _02227FE4 +_02227FFE: + cmp r7, #0xff + bne _02228004 + mov r7, #0 +_02228004: + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r4, #0xc] + b _02228096 +_02228010: + mov r7, #0xff + mov r6, #0 +_02228014: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232B8 + cmp r0, #4 + bne _02228024 + add r7, r6, #0 + b _0222802A +_02228024: + add r6, r6, #1 + cmp r6, #4 + blt _02228014 +_0222802A: + cmp r7, #0xff + bne _02228030 + mov r7, #0 +_02228030: + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r4, #0xc] + b _02228096 +_0222803C: + mov r7, #0xff + mov r6, #0 +_02228040: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232B8 + cmp r0, #1 + beq _02228050 + cmp r0, #3 + bne _02228054 +_02228050: + add r7, r6, #0 + b _0222805A +_02228054: + add r6, r6, #1 + cmp r6, #4 + blt _02228040 +_0222805A: + cmp r7, #0xff + bne _02228060 + mov r7, #0 +_02228060: + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r4, #0xc] + b _02228096 +_0222806C: + mov r7, #0xff + mov r6, #0 +_02228070: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232B8 + cmp r0, #5 + bne _02228080 + add r7, r6, #0 + b _02228086 +_02228080: + add r6, r6, #1 + cmp r6, #4 + blt _02228070 +_02228086: + cmp r7, #0xff + bne _0222808C + mov r7, #0 +_0222808C: + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_022232FC + str r0, [r4, #0xc] +_02228096: + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022280A6 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x54 + pop {r4, r5, r6, r7, pc} +_022280A6: + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #8] + ldr r0, [r4, #0xc] + mov r1, #0x29 + bl sub_020080C0 + strh r0, [r4, #0xa] + mov r0, #0xa + ldrsh r0, [r4, r0] + mov r1, #1 + add r0, #0x10 + strh r0, [r4, #0xa] + add r0, r5, #0 + bl ov12_02220280 + str r0, [r4, #0x34] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #0x38] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #0x3c] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r4, #0x40] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0x44] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + str r0, [r4, #0x48] + add r0, r5, #0 + mov r1, #7 + bl ov12_02220280 + str r0, [r4, #0x4c] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [r4, #0x48] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + asr r0, r0, #0x10 + str r0, [r4, #0x50] + ldr r0, [r4, #0] + ldr r1, _02228138 ; =ov12_02227DE0 + add r2, r4, #0 + bl ov12_022201E8 + add r1, r4, #0 + bl ov12_02227DE0 + add sp, #0x54 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02228134: .word 0x00000802 +_02228138: .word ov12_02227DE0 + thumb_func_end ov12_02227F30 + + thumb_func_start ov12_0222813C +ov12_0222813C: ; 0x0222813C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #8 + bl ov12_02226454 + cmp r0, #0 + beq _0222815E + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + pop {r3, r4, r5, pc} +_0222815E: + ldr r0, [r4, #4] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222813C + + thumb_func_start ov12_02228168 +ov12_02228168: ; 0x02228168 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0x30 + add r7, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r7, [r4, #0] + add r0, r7, #0 + bl ov12_022202EC + str r0, [r4, #4] + add r0, r7, #0 + mov r1, #0 + bl ov12_02220280 + add r6, r0, #0 + mov r5, #0 +_0222818C: + mov r0, #1 + lsl r0, r5 + tst r0, r6 + beq _022281A2 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_022202C0 + mov r1, #1 + bl sub_0200D810 +_022281A2: + add r5, r5, #1 + cmp r5, #4 + blt _0222818C + add r0, r7, #0 + mov r1, #1 + bl ov12_02220280 + add r5, r0, #0 + add r0, r7, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r2, [sp, #8] + add r1, r5, #0 + bl ov12_02235780 + add r0, r7, #0 + mov r1, #2 + bl ov12_02220280 + add r6, r0, #0 + add r0, r7, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [sp, #0xc] + add r0, r7, #0 + mov r1, #5 + bl ov12_02220280 + ldr r1, [sp, #0xc] + ldr r3, [sp, #8] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + str r1, [sp] + str r0, [sp, #4] + add r0, r4, #0 + lsl r1, r5, #0x10 + lsl r2, r6, #0x10 + lsl r3, r3, #0x10 + add r0, #8 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02226424 + ldr r0, [r4, #0] + ldr r1, _02228210 ; =ov12_0222813C + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02228210: .word ov12_0222813C + thumb_func_end ov12_02228168 + + thumb_func_start ov12_02228214 +ov12_02228214: ; 0x02228214 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + mov r1, #1 + bl ov12_02220280 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0 + bl ov12_02220280 + add r1, r0, #0 + add r0, r6, #0 + add r2, sp, #4 + add r3, sp, #0 + bl ov12_02235998 + ldr r0, [sp] + mov r4, #0 + cmp r0, #0 + ble _02228262 + mov r7, #6 +_02228240: + ldr r1, [sp, #0x14] + add r0, r6, #0 + bl ov12_0222337C + cmp r0, #1 + bne _02228250 + cmp r5, #0 + beq _0222825A +_02228250: + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r2, r5, #0 + bl sub_02007DEC +_0222825A: + ldr r0, [sp] + add r4, r4, #1 + cmp r4, r0 + blt _02228240 +_02228262: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02228214 + + thumb_func_start ov12_02228268 +ov12_02228268: ; 0x02228268 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, [r4, #4] + ldr r0, [r4, #8] + cmp r1, r0 + blt _022282B6 + ldr r0, [r4, #0] + cmp r0, #0 + ldr r0, [r4, #0x14] + bne _02228296 + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0x3c] + add r1, r5, #0 + bl ov12_02220220 + pop {r3, r4, r5, pc} +_02228296: + mov r1, #6 + bl sub_020080C0 + add r3, r0, #0 + mov r2, #1 + ldr r0, [r4, #0x14] + mov r1, #6 + eor r2, r3 + bl sub_02007DEC + ldr r0, [r4, #0] + sub r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_022282B6: + add r0, r1, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02228268 + + thumb_func_start ov12_022282BC +ov12_022282BC: ; 0x022282BC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x40 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + str r5, [r4, #0x3c] + bl ov12_02220280 + lsl r0, r0, #1 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r1, r4, #0 + str r0, [r4, #8] + add r0, r5, #0 + add r1, #0x20 + bl ov12_0223595C + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022232FC + str r0, [r4, #0x14] + ldr r0, [r4, #0x3c] + ldr r1, _02228308 ; =ov12_02228268 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_02228308: .word ov12_02228268 + thumb_func_end ov12_022282BC + + thumb_func_start ov12_0222830C +ov12_0222830C: ; 0x0222830C + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + cmp r0, #0 + beq _02228324 + cmp r0, #1 + beq _02228358 + b _02228382 +_02228324: + mov r0, #0x16 + ldrsh r3, [r4, r0] + mov r0, #0x14 + ldrsh r1, [r4, r0] + mov r2, #0xc + str r3, [sp] + ldr r0, [r4, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldrsh r2, [r4, r2] + add r0, r4, #0 + add r0, #0x40 + add r2, r1, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + add r4, #0x24 + add sp, #8 + add r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_02228358: + add r0, r4, #0 + add r0, #0x40 + bl ov12_02225C14 + cmp r0, #0 + bne _02228372 + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] +_02228372: + mov r2, #0x40 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_02228382: + ldr r0, [r4, #0x64] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_0222830C + + thumb_func_start ov12_02228394 +ov12_02228394: ; 0x02228394 + push {r4, r5, r6, lr} + mov r1, #0x68 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0x64] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + mov r6, #0xff + add r1, r6, #0 + add r1, #9 + cmp r0, r1 + bgt _022283E0 + add r1, r6, #3 + cmp r0, r1 + blt _02228436 + beq _022283EA + add r1, r6, #5 + cmp r0, r1 + beq _022283F4 + add r1, r6, #0 + add r1, #9 + cmp r0, r1 + beq _02228410 + b _02228436 +_022283E0: + add r1, r6, #0 + add r1, #0x11 + cmp r0, r1 + beq _0222841A + b _02228436 +_022283EA: + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + b _0222843A +_022283F4: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + bne _0222843A + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _0222843A +_02228410: + add r0, r5, #0 + bl ov12_02220248 + add r6, r0, #0 + b _0222843A +_0222841A: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + bne _0222843A + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _0222843A +_02228436: + bl sub_02022974 +_0222843A: + cmp r6, #0xff + bne _02228446 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_02228446: + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x24 + bl ov12_0223595C + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232FC + add r1, r4, #0 + add r1, #0x14 + str r0, [r4, #0x18] + bl ov12_02235918 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + cmp r0, #0 + bgt _02228478 + mov r0, #0xc + ldrsh r1, [r4, r0] + sub r0, #0xd + mul r0, r1 + strh r0, [r4, #0xc] +_02228478: + ldr r0, [r4, #0x64] + ldr r1, _02228484 ; =ov12_0222830C + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02228484: .word ov12_0222830C + thumb_func_end ov12_02228394 + + thumb_func_start ov12_02228488 +ov12_02228488: ; 0x02228488 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _022284A0 + cmp r0, #1 + beq _022284E2 + b _0222850C +_022284A0: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _022284B0 + mov r0, #0xff + add r4, #0x20 + add sp, #8 + strb r0, [r4] + pop {r4, pc} +_022284B0: + mov r0, #0x12 + ldrsh r3, [r4, r0] + mov r0, #0x10 + ldrsh r1, [r4, r0] + mov r2, #0x64 + str r3, [sp] + ldr r0, [r4, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldrsh r2, [r4, r2] + add r0, r4, #0 + add r0, #0x3c + add r2, r1, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] +_022284E2: + add r0, r4, #0 + add r0, #0x3c + bl ov12_02225C14 + cmp r0, #0 + bne _022284FC + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] +_022284FC: + mov r2, #0x3c + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_0222850C: + ldr r0, [r4, #0x60] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02228488 + + thumb_func_start ov12_02228520 +ov12_02228520: ; 0x02228520 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x68 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0x60] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x64 + strh r0, [r1] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r1, r4, #0 + add r7, r0, #0 + add r0, r5, #0 + add r1, #0x20 + bl ov12_0223595C + mov r6, #0xff + add r0, r6, #0 + add r0, #9 + cmp r7, r0 + bgt _0222857C + add r0, r6, #3 + cmp r7, r0 + blt _022285D2 + beq _02228586 + add r0, r6, #5 + cmp r7, r0 + beq _02228590 + add r0, r6, #0 + add r0, #9 + cmp r7, r0 + beq _022285AC + b _022285D2 +_0222857C: + add r0, r6, #0 + add r0, #0x11 + cmp r7, r0 + beq _022285B6 + b _022285D2 +_02228586: + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + b _022285D6 +_02228590: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + bne _022285D6 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _022285D6 +_022285AC: + add r0, r5, #0 + bl ov12_02220248 + add r6, r0, #0 + b _022285D6 +_022285B6: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + bne _022285D6 + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _022285D6 +_022285D2: + bl sub_02022974 +_022285D6: + cmp r6, #0xff + bne _022285E2 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_022285E2: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232FC + add r1, r4, #0 + add r1, #0x10 + str r0, [r4, #0x14] + bl ov12_02235918 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + cmp r0, #0 + bgt _02228610 + mov r0, #0x64 + ldrsh r1, [r4, r0] + sub r0, #0x65 + add r2, r1, #0 + mul r2, r0 + add r0, r4, #0 + add r0, #0x64 + strh r2, [r0] +_02228610: + add r0, r5, #0 + bl ov12_0221FDD4 + ldr r0, [r4, #0x60] + ldr r1, _02228628 ; =ov12_02228488 + add r2, r4, #0 + bl ov12_022201E8 + add r1, r4, #0 + bl ov12_02228488 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02228628: .word ov12_02228488 + thumb_func_end ov12_02228520 + + thumb_func_start ov12_0222862C +ov12_0222862C: ; 0x0222862C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bls _0222863C + b _022287BA +_0222863C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02228648: ; jump table + .short _02228650 - _02228648 - 2 ; case 0 + .short _022286B2 - _02228648 - 2 ; case 1 + .short _022286FC - _02228648 - 2 ; case 2 + .short _0222874A - _02228648 - 2 ; case 3 +_02228650: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + bne _022286A8 + add r0, r4, #0 + add r0, #0x38 + bl ov12_02226138 + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xd + bl sub_02007DEC + mov r2, #0x38 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02008274 + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x28] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_022286A8: + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_022286B2: + ldrb r0, [r4, #9] + add r0, r0, #1 + strb r0, [r4, #9] + ldrb r1, [r4, #9] + ldrb r0, [r4, #0xa] + cmp r1, r0 + bhi _022286C2 + b _022287C8 +_022286C2: + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov12_02220280 + add r5, r0, #0 + ldr r0, [r4, #0xc] + mov r1, #1 + bl ov12_02220280 + add r6, r0, #0 + ldr r0, [r4, #0xc] + mov r1, #3 + bl ov12_02220280 + str r0, [sp] + add r0, r4, #0 + lsl r1, r5, #0x10 + lsl r3, r6, #0x10 + add r0, #0x14 + asr r1, r1, #0x10 + mov r2, #0x64 + asr r3, r3, #0x10 + bl ov12_02225E68 + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_022286FC: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + bne _02228740 + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x28] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02228740: + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222874A: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + ldr r0, [r4, #0x10] + bne _0222878E + mov r2, #0x14 + ldrsh r2, [r4, r2] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x28] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222878E: + mov r1, #0xc + add r2, r1, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0x10] + add r2, #0xf3 + bl sub_02007DEC + mov r2, #2 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007DEC + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_022287BA: + ldr r0, [r4, #0xc] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_022287C8: + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov12_0222862C + + thumb_func_start ov12_022287CC +ov12_022287CC: ; 0x022287CC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x5c + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4, #8] + strb r0, [r4] + str r5, [r4, #0xc] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r0, #0 + strb r0, [r4, #9] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strb r0, [r4, #0xa] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + ldr r0, [r4, #0xc] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_02223354 + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x64 + lsl r3, r6, #0x10 + add r0, #0x14 + add r2, r1, #0 + asr r3, r3, #0x10 + bl ov12_02225E68 + mov r0, #0xa + str r0, [sp] + add r0, r4, #0 + mov r2, #0 + add r0, #0x38 + mov r1, #2 + add r3, r2, #0 + bl ov12_02226108 + ldr r0, [r4, #0xc] + ldr r1, _02228864 ; =ov12_0222862C + add r2, r4, #0 + bl ov12_022201E8 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02228864: .word ov12_0222862C + thumb_func_end ov12_022287CC + + thumb_func_start ov12_02228868 +ov12_02228868: ; 0x02228868 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bls _02228878 + b _022289F8 +_02228878: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02228884: ; jump table + .short _0222888C - _02228884 - 2 ; case 0 + .short _022288EE - _02228884 - 2 ; case 1 + .short _0222893A - _02228884 - 2 ; case 2 + .short _02228988 - _02228884 - 2 ; case 3 +_0222888C: + add r0, r4, #0 + add r0, #0x20 + bl ov12_02225F6C + cmp r0, #1 + bne _022288E4 + add r0, r4, #0 + add r0, #0x44 + bl ov12_02226138 + mov r2, #0x20 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x22 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xd + bl sub_02007DEC + mov r2, #0x44 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_02008274 + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x34] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_022288E4: + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_022288EE: + ldrb r0, [r4, #9] + add r0, r0, #1 + strb r0, [r4, #9] + ldrb r1, [r4, #9] + ldrb r0, [r4, #0xa] + cmp r1, r0 + bhi _022288FE + b _02228A06 +_022288FE: + ldr r3, [r4, #0x10] + ldr r2, [r4, #0xc] + lsl r0, r3, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + asr r1, r2, #0x10 + mov r0, #0x64 + str r0, [sp, #4] + ldr r0, [r4, #0x14] + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + asr r3, r3, #0x10 + str r0, [sp, #8] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x20 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225EF0 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222893A: + add r0, r4, #0 + add r0, #0x20 + bl ov12_02225F6C + cmp r0, #1 + bne _0222897E + mov r2, #0x20 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x22 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x34] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_0222897E: + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_02228988: + add r0, r4, #0 + add r0, #0x20 + bl ov12_02225F6C + cmp r0, #1 + ldr r0, [r4, #0x1c] + bne _022289CC + mov r2, #0x20 + ldrsh r2, [r4, r2] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x22 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x34] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_022289CC: + mov r1, #0xc + add r2, r1, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0x1c] + add r2, #0xf3 + bl sub_02007DEC + mov r2, #2 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_02007DEC + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_022289F8: + ldr r0, [r4, #0x18] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02228A06: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02228868 + + thumb_func_start ov12_02228A0C +ov12_02228A0C: ; 0x02228A0C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x68 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4, #8] + strb r0, [r4] + str r5, [r4, #0x18] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0x18] + bl ov12_022232FC + str r0, [r4, #0x1c] + mov r0, #0 + strb r0, [r4, #9] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + strb r0, [r4, #0xa] + ldr r0, [r4, #0x18] + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #0xc] + ldr r0, [r4, #0x18] + mov r1, #4 + bl ov12_02220280 + str r0, [r4, #0x10] + ldr r0, [r4, #0x18] + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0x14] + ldr r0, [r4, #0x18] + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0 + add r3, r4, #2 + bl ov12_02225898 + ldr r0, [r4, #0x18] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0x18] + bl ov12_02223354 + str r0, [r4, #4] + mov r1, #2 + ldrsh r1, [r4, r1] + add r0, r1, r0 + strh r0, [r4, #2] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + asr r0, r0, #0x10 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + asr r0, r0, #0x10 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r6, [sp] + mov r1, #0x64 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r3, [sp, #0xc] + add r0, #0x20 + add r2, r7, #0 + bl ov12_02225EF0 + mov r0, #0xa + str r0, [sp] + add r0, r4, #0 + mov r2, #0 + add r0, #0x44 + mov r1, #2 + add r3, r2, #0 + bl ov12_02226108 + ldr r0, [r4, #0x18] + ldr r1, _02228B0C ; =ov12_02228868 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02228B0C: .word ov12_02228868 + thumb_func_end ov12_02228A0C + + thumb_func_start ov12_02228B10 +ov12_02228B10: ; 0x02228B10 + push {r3, r4, r5, lr} + mov r2, #1 + lsl r2, r2, #0x1a + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r2, #0] + ldr r0, _02228B3C ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + ldr r0, [r4, #8] + mov r1, #2 + bl ov12_02222664 + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + nop +_02228B3C: .word 0xFFFF1FFF + thumb_func_end ov12_02228B10 + + thumb_func_start ov12_02228B40 +ov12_02228B40: ; 0x02228B40 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x28 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r0, r5, #0 + add r1, r4, #4 + bl ov12_0223595C + ldr r0, [r4, #8] + mov r1, #2 + bl ov12_02222590 + ldr r0, [r4, #8] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x24] + mov r1, #2 + bl sub_0200D810 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_0200D6A4 + ldr r1, _02228BC0 ; =0x3F99999A + ldr r0, [r4, #0x24] + add r2, r1, #0 + bl sub_0200D6E8 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _02228BC4 ; =0xFFFF1FFF + and r2, r1 + lsr r1, r0, #0xb + orr r1, r2 + str r1, [r0, #0] + add r0, #0x4a + ldrh r2, [r0] + mov r1, #0x3f + bic r2, r1 + mov r1, #0x1b + orr r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _02228BC8 ; =0xFFFFC0FF + and r2, r1 + mov r1, #7 + lsl r1, r1, #8 + orr r1, r2 + strh r1, [r0] + ldr r0, [r4, #8] + ldr r1, _02228BCC ; =ov12_02228B10 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_02228BC0: .word 0x3F99999A +_02228BC4: .word 0xFFFF1FFF +_02228BC8: .word 0xFFFFC0FF +_02228BCC: .word ov12_02228B10 + thumb_func_end ov12_02228B40 + + thumb_func_start ov12_02228BD0 +ov12_02228BD0: ; 0x02228BD0 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _02228BE8 + cmp r0, #1 + beq _02228C24 + b _02228C5A +_02228BE8: + mov r0, #0x12 + ldrsh r3, [r4, r0] + mov r0, #0x10 + ldrsh r1, [r4, r0] + mov r0, #0x66 + ldrsh r0, [r4, r0] + mov r2, #0x64 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldrsh r2, [r4, r2] + add r0, r4, #0 + add r0, #0x3c + add r2, r1, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] +_02228C24: + add r0, r4, #0 + add r0, #0x3c + bl ov12_02225C14 + cmp r0, #0 + bne _02228C3E + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] +_02228C3E: + mov r2, #0x3c + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x3e + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_02228C5A: + ldr r0, [r4, #0x60] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_02228BD0 + + thumb_func_start ov12_02228C6C +ov12_02228C6C: ; 0x02228C6C + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x68 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0x60] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x64 + strh r0, [r1] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x66 + strh r0, [r1] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + add r1, r4, #0 + add r7, r0, #0 + add r0, r5, #0 + add r1, #0x20 + bl ov12_0223595C + mov r6, #0xff + add r0, r6, #0 + add r0, #9 + cmp r7, r0 + bgt _02228CD6 + add r0, r6, #3 + cmp r7, r0 + blt _02228D2C + beq _02228CE0 + add r0, r6, #5 + cmp r7, r0 + beq _02228CEA + add r0, r6, #0 + add r0, #9 + cmp r7, r0 + beq _02228D06 + b _02228D2C +_02228CD6: + add r0, r6, #0 + add r0, #0x11 + cmp r7, r0 + beq _02228D10 + b _02228D2C +_02228CE0: + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + b _02228D30 +_02228CEA: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + bne _02228D30 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _02228D30 +_02228D06: + add r0, r5, #0 + bl ov12_02220248 + add r6, r0, #0 + b _02228D30 +_02228D10: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + bne _02228D30 + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _02228D30 +_02228D2C: + bl sub_02022974 +_02228D30: + cmp r6, #0xff + bne _02228D3C + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_02228D3C: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x14] + cmp r0, #0 + bne _02228D52 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_02228D52: + add r1, r4, #0 + add r1, #0x10 + bl ov12_02235918 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + cmp r0, #0 + bgt _02228D86 + mov r0, #0x64 + ldrsh r1, [r4, r0] + sub r0, #0x65 + add r2, r1, #0 + mul r2, r0 + add r0, r4, #0 + add r0, #0x64 + strh r2, [r0] + mov r0, #0x66 + ldrsh r1, [r4, r0] + sub r0, #0x67 + add r2, r1, #0 + mul r2, r0 + add r0, r4, #0 + add r0, #0x66 + strh r2, [r0] +_02228D86: + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02228DA0 + mov r0, #0x66 + ldrsh r1, [r4, r0] + sub r0, #0x67 + add r2, r1, #0 + mul r2, r0 + add r0, r4, #0 + add r0, #0x66 + strh r2, [r0] +_02228DA0: + ldr r0, [r4, #0x60] + ldr r1, _02228DB4 ; =ov12_02228BD0 + add r2, r4, #0 + bl ov12_022201E8 + add r1, r4, #0 + bl ov12_02228BD0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02228DB4: .word ov12_02228BD0 + thumb_func_end ov12_02228C6C + + thumb_func_start ov12_02228DB8 +ov12_02228DB8: ; 0x02228DB8 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x20 + mov r2, #0x22 + add r5, r0, #0 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x24] + add r0, #0x30 + bl ov12_02225BA0 + cmp r0, #0 + bne _02228DFC + mov r2, #0x20 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x24] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x22 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x24] + mov r1, #1 + sub r2, #8 + bl sub_02007DEC + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02228DFC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02228DB8 + + thumb_func_start ov12_02228E00 +ov12_02228E00: ; 0x02228E00 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0x54 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r2, r4, #0 + add r1, r0, #0 + add r0, r5, #0 + add r2, #0x1c + add r3, sp, #0 + bl ov12_02235998 + mov r0, #0x22 + ldrsh r0, [r4, r0] + mov r1, #1 + add r0, #8 + strh r0, [r4, #0x22] + add r0, r5, #0 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x30 + add r1, r6, #0 + bl ov12_022263A4 + ldr r1, [r4, #0x3c] + add r2, r4, #0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r4, #0x3c] + ldr r1, [r4, #0x44] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r4, #0x44] + ldr r0, [r4, #4] + ldr r1, _02228E74 ; =ov12_02228DB8 + bl ov12_022201E8 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02228E74: .word ov12_02228DB8 + thumb_func_end ov12_02228E00 + + thumb_func_start ov12_02228E78 +ov12_02228E78: ; 0x02228E78 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + bne _02228EB0 + add r0, r4, #0 + add r0, #0x30 + bl ov12_02225C14 + cmp r0, #0 + bne _02228E96 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_02228E96: + mov r2, #0x30 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x24] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x32 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_02007DEC + pop {r4, pc} +_02228EB0: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov12_02228E78 + + thumb_func_start ov12_02228EC0 +ov12_02228EC0: ; 0x02228EC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0x5c + add r6, r0, #0 + bl ov12_02235E50 + add r5, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + bl ov12_0223595C + add r0, r6, #0 + mov r1, #0 + bl ov12_02220280 + add r4, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov12_02220280 + add r7, r0, #0 + cmp r4, #8 + bgt _02228EFE + cmp r4, #2 + blt _02228F3C + beq _02228F04 + cmp r4, #4 + beq _02228F0E + cmp r4, #8 + beq _02228F20 + b _02228F3C +_02228EFE: + cmp r4, #0x10 + beq _02228F2A + b _02228F3C +_02228F04: + add r0, r6, #0 + bl ov12_02220240 + str r0, [sp, #8] + b _02228F40 +_02228F0E: + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022352AC + str r0, [sp, #8] + b _02228F40 +_02228F20: + add r0, r6, #0 + bl ov12_02220248 + str r0, [sp, #8] + b _02228F40 +_02228F2A: + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022352AC + str r0, [sp, #8] + b _02228F40 +_02228F3C: + bl sub_02022974 +_02228F40: + add r2, r5, #0 + ldr r1, [sp, #8] + add r0, r6, #0 + add r2, #0x54 + bl ov12_022353AC + add r2, r5, #0 + add r0, r6, #0 + add r1, r4, #0 + add r2, #0x1c + add r3, sp, #0xc + bl ov12_02235998 + add r0, r5, #0 + mov r1, #0 + add r0, #0x58 + strh r1, [r0] + add r0, r5, #0 + add r0, #0x5a + strh r1, [r0] + ldr r0, [r5, #4] + ldr r1, [sp, #8] + bl ov12_0223525C + cmp r0, #3 + bne _02228F7A + mov r1, #0x4f + mvn r1, r1 + b _02228F7E +_02228F7A: + mov r1, #0x15 + lsl r1, r1, #4 +_02228F7E: + add r0, r5, #0 + add r0, #0x58 + strh r1, [r0] + mov r0, #0x22 + ldrsh r3, [r5, r0] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r3, [sp] + str r0, [sp, #4] + mov r1, #0x20 + mov r2, #0x58 + add r0, r5, #0 + ldrsh r1, [r5, r1] + ldrsh r2, [r5, r2] + add r0, #0x30 + bl ov12_02225BC8 + ldr r0, [r5, #4] + ldr r1, _02228FB0 ; =ov12_02228E78 + add r2, r5, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02228FB0: .word ov12_02228E78 + thumb_func_end ov12_02228EC0 + + thumb_func_start ov12_02228FB4 +ov12_02228FB4: ; 0x02228FB4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r1, #0x5c + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r7, r0, #0 + cmp r6, #8 + bgt _02228FFC + cmp r6, #2 + blt _0222903A + beq _02229002 + cmp r6, #4 + beq _0222900C + cmp r6, #8 + beq _0222901E + b _0222903A +_02228FFC: + cmp r6, #0x10 + beq _02229028 + b _0222903A +_02229002: + add r0, r5, #0 + bl ov12_02220240 + str r0, [sp, #8] + b _0222903E +_0222900C: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + str r0, [sp, #8] + b _0222903E +_0222901E: + add r0, r5, #0 + bl ov12_02220248 + str r0, [sp, #8] + b _0222903E +_02229028: + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + str r0, [sp, #8] + b _0222903E +_0222903A: + bl sub_02022974 +_0222903E: + add r2, r4, #0 + ldr r1, [sp, #8] + add r0, r5, #0 + add r2, #0x54 + bl ov12_022353AC + add r2, r4, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, #0x1c + add r3, sp, #0x10 + bl ov12_02235998 + add r0, r4, #0 + mov r1, #0 + add r0, #0x58 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x5a + strh r1, [r0] + ldr r0, [r4, #4] + ldr r1, [sp, #8] + bl ov12_0223525C + cmp r0, #3 + bne _02229078 + mov r1, #0x4f + mvn r1, r1 + b _0222907C +_02229078: + mov r1, #0x15 + lsl r1, r1, #4 +_0222907C: + add r0, r4, #0 + add r0, #0x58 + strh r1, [r0] + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _022290A6 + mov r0, #0x22 + ldrsh r3, [r4, r0] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r3, [sp] + str r0, [sp, #4] + mov r1, #0x20 + mov r2, #0x58 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + add r0, #0x30 + bl ov12_02225BC8 + b _022290CA +_022290A6: + ldr r1, [sp, #8] + add r0, r5, #0 + mov r2, #0 + bl ov12_022258E0 + add r2, r0, #0 + mov r0, #0x22 + ldrsh r3, [r4, r0] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r3, [sp] + str r0, [sp, #4] + mov r1, #0x58 + add r0, r4, #0 + ldrsh r1, [r4, r1] + add r0, #0x30 + bl ov12_02225BC8 +_022290CA: + ldr r0, [r4, #4] + ldr r1, _022290D8 ; =ov12_02228E78 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022290D8: .word ov12_02228E78 + thumb_func_end ov12_02228FB4 + + thumb_func_start ov12_022290DC +ov12_022290DC: ; 0x022290DC + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + mov r1, #0 + add r5, r0, #0 + bl ov12_02220280 + add r4, r0, #0 + cmp r4, #8 + bgt _022290FE + cmp r4, #2 + blt _0222913C + beq _02229104 + cmp r4, #4 + beq _0222910E + cmp r4, #8 + beq _02229120 + b _0222913C +_022290FE: + cmp r4, #0x10 + beq _0222912A + b _0222913C +_02229104: + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + b _02229140 +_0222910E: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _02229140 +_02229120: + add r0, r5, #0 + bl ov12_02220248 + add r6, r0, #0 + b _02229140 +_0222912A: + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r6, r0, #0 + b _02229140 +_0222913C: + bl sub_02022974 +_02229140: + add r0, r5, #0 + add r1, r6, #0 + add r2, sp, #0 + bl ov12_022353AC + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #8 + add r3, sp, #4 + bl ov12_02235998 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02223354 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + mov r1, #0 + add r2, sp, #0 + ldrsh r2, [r2, r1] + ldr r0, [sp, #0x10] + bl sub_02007DEC + add r3, sp, #0 + mov r2, #2 + ldrsh r2, [r3, r2] + ldr r0, [sp, #0x10] + mov r1, #1 + add r2, r2, r4 + bl sub_02007DEC + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_022290DC + + thumb_func_start ov12_02229184 +ov12_02229184: ; 0x02229184 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + bl ov12_02226848 + cmp r0, #0 + bne _022291A8 + ldr r0, [r4, #0x30] + bl ov12_02226858 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_022291A8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02229184 + + thumb_func_start ov12_022291AC +ov12_022291AC: ; 0x022291AC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + mov r1, #0x34 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [sp, #0x1c] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [sp, #0x20] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [sp, #0x24] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + add r2, r4, #0 + str r0, [sp, #0x28] + add r0, r5, #0 + add r1, r7, #0 + add r2, #0x1c + add r3, sp, #0x2c + bl ov12_02235D74 + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r7, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + lsl r0, r6, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + lsl r3, r7, #0x14 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [sp, #0x20] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x24] + lsr r3, r3, #0x10 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + ldr r0, [sp, #0x28] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x14] + ldr r0, _02229270 ; =0x0000044C + str r0, [sp, #0x18] + ldr r0, [r4, #0x18] + bl ov12_02226870 + str r0, [r4, #0x30] + ldr r0, [r4, #4] + ldr r1, _02229274 ; =ov12_02229184 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_02229270: .word 0x0000044C +_02229274: .word ov12_02229184 + thumb_func_end ov12_022291AC + + thumb_func_start ov12_02229278 +ov12_02229278: ; 0x02229278 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + bne _022292EC + ldr r0, [r4, #0x4c] + add r1, r0, #1 + str r1, [r4, #0x4c] + ldr r0, [r4, #0x44] + cmp r1, r0 + blt _02229300 + mov r1, #0 + str r1, [r4, #0x4c] + ldr r0, [r4, #0x48] + cmp r0, #0 + ldr r0, [r4, #0x54] + bne _022292B0 + cmp r0, #0 + bge _022292A2 + str r1, [r4, #0x54] +_022292A2: + ldr r0, [r4, #0x54] + cmp r0, #0 + bne _022292C4 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _022292C4 +_022292B0: + cmp r0, #0x50 + ble _022292B8 + mov r0, #0x50 + str r0, [r4, #0x54] +_022292B8: + ldr r0, [r4, #0x54] + cmp r0, #0x50 + bne _022292C4 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_022292C4: + ldr r0, [r4, #0x24] + ldr r2, [r4, #0x54] + mov r1, #0x12 + bl sub_02007DEC + ldr r0, [r4, #0x24] + ldr r2, [r4, #0x50] + mov r1, #1 + bl sub_02007DEC + mov r0, #0x42 + ldrsh r1, [r4, r0] + ldr r2, [r4, #0x50] + sub r1, r2, r1 + str r1, [r4, #0x50] + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x54] + add r0, r1, r0 + str r0, [r4, #0x54] + pop {r3, r4, r5, pc} +_022292EC: + ldr r0, [r4, #0x24] + bl ov12_02226B84 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02229300: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02229278 + + thumb_func_start ov12_02229304 +ov12_02229304: ; 0x02229304 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x58 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r6, r0, #0 + add r2, r4, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, #0x1c + add r3, sp, #4 + bl ov12_02235998 + cmp r6, #8 + bgt _02229346 + cmp r6, #2 + blt _02229384 + beq _0222934C + cmp r6, #4 + beq _02229356 + cmp r6, #8 + beq _02229368 + b _02229384 +_02229346: + cmp r6, #0x10 + beq _02229372 + b _02229384 +_0222934C: + add r0, r5, #0 + bl ov12_02220240 + add r7, r0, #0 + b _02229388 +_02229356: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r7, r0, #0 + b _02229388 +_02229368: + add r0, r5, #0 + bl ov12_02220248 + add r7, r0, #0 + b _02229388 +_02229372: + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r7, r0, #0 + b _02229388 +_02229384: + bl sub_02022974 +_02229388: + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r4, #0x48] + cmp r0, #0 + ldr r0, [r4, #0x24] + bne _022293DC + mov r1, #1 + bl sub_020080C0 + str r0, [r4, #0x50] + ldr r0, [r4, #0x24] + mov r1, #0x12 + bl sub_020080C0 + mov r1, #0x50 + sub r0, r1, r0 + str r0, [r4, #0x54] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x40 + strh r0, [r1] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x42 + strh r0, [r1] + mov r0, #0x42 + ldrsh r1, [r4, r0] + sub r0, #0x43 + add r2, r1, #0 + mul r2, r0 + add r0, r4, #0 + add r0, #0x42 + strh r2, [r0] + b _0222940A +_022293DC: + mov r1, #1 + bl sub_020080C0 + str r0, [r4, #0x50] + ldr r0, [r4, #0x24] + mov r1, #0x12 + bl sub_020080C0 + str r0, [r4, #0x54] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x40 + strh r0, [r1] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + add r1, r4, #0 + add r1, #0x42 + strh r0, [r1] +_0222940A: + mov r0, #0 + str r0, [r4, #0x30] + str r0, [r4, #0x34] + mov r0, #0x50 + str r0, [r4, #0x38] + add r0, r5, #0 + add r1, r7, #0 + bl ov12_02223354 + mov r1, #0x50 + sub r0, r1, r0 + str r0, [r4, #0x3c] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r4, #0x44] + mov r0, #0 + str r0, [r4, #0x4c] + ldr r0, [r4, #0x3c] + str r0, [sp] + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x30] + ldr r2, [r4, #0x34] + ldr r3, [r4, #0x38] + bl sub_020086D4 + ldr r0, [r4, #4] + ldr r1, _02229450 ; =ov12_02229278 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02229450: .word ov12_02229278 + thumb_func_end ov12_02229304 + + thumb_func_start ov12_02229454 +ov12_02229454: ; 0x02229454 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + cmp r1, #8 + bgt _0222946E + cmp r1, #2 + blt _022294A4 + beq _02229474 + cmp r1, #4 + beq _0222947C + cmp r1, #8 + beq _0222948C + b _022294A4 +_0222946E: + cmp r1, #0x10 + beq _02229494 + b _022294A4 +_02229474: + bl ov12_02220240 + add r4, r0, #0 + b _022294A8 +_0222947C: + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r4, r0, #0 + b _022294A8 +_0222948C: + bl ov12_02220248 + add r4, r0, #0 + b _022294A8 +_02229494: + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022352AC + add r4, r0, #0 + b _022294A8 +_022294A4: + bl sub_02022974 +_022294A8: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02229454 + + thumb_func_start ov12_022294AC +ov12_022294AC: ; 0x022294AC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _022294BE + cmp r0, #1 + beq _02229504 + pop {r3, r4, r5, pc} +_022294BE: + ldr r0, [r4, #0x24] + add r1, r0, #1 + str r1, [r4, #0x24] + ldr r0, [r4, #0x20] + cmp r1, r0 + blt _02229536 + mov r0, #0 + str r0, [r4, #0x24] + mov r0, #0x1c + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x44] + add r2, r1, r0 + str r2, [r4, #0x44] + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_02007DEC + mov r0, #0x1c + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x3c] + sub r1, r1, r0 + str r1, [r4, #0x3c] + ldr r0, [r4, #0x40] + cmp r1, r0 + ble _022294F8 + str r0, [r4, #0x3c] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_022294F8: + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x3c] + mov r1, #0x12 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_02229504: + ldr r0, [r4, #0x30] + mov r1, #0xe + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x48] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x40] + mov r1, #0x12 + bl sub_02007DEC + ldr r0, [r4, #0x30] + bl ov12_02226B84 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02229536: + pop {r3, r4, r5, pc} + thumb_func_end ov12_022294AC + + thumb_func_start ov12_02229538 +ov12_02229538: ; 0x02229538 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222954A + cmp r0, #1 + beq _0222958E + pop {r3, r4, r5, pc} +_0222954A: + ldr r0, [r4, #0x24] + add r1, r0, #1 + str r1, [r4, #0x24] + ldr r0, [r4, #0x20] + cmp r1, r0 + blt _022295C0 + mov r0, #0 + str r0, [r4, #0x24] + mov r0, #0x1c + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x44] + add r2, r1, r0 + str r2, [r4, #0x44] + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_02007DEC + mov r0, #0x1c + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x3c] + sub r0, r1, r0 + str r0, [r4, #0x3c] + bpl _02229582 + mov r0, #0 + str r0, [r4, #0x3c] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_02229582: + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x3c] + mov r1, #0x12 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_0222958E: + ldr r0, [r4, #0x30] + mov r1, #0xe + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x48] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x40] + mov r1, #0x12 + bl sub_02007DEC + ldr r0, [r4, #0x30] + bl ov12_02226B84 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_022295C0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02229538 + + thumb_func_start ov12_022295C4 +ov12_022295C4: ; 0x022295C4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _022295D6 + cmp r0, #1 + beq _02229618 + pop {r3, r4, r5, pc} +_022295D6: + ldr r0, [r4, #0x24] + add r1, r0, #1 + str r1, [r4, #0x24] + ldr r0, [r4, #0x20] + cmp r1, r0 + blt _02229636 + mov r0, #0 + str r0, [r4, #0x24] + mov r1, #0x1c + ldrsh r2, [r4, r1] + ldr r3, [r4, #0x3c] + sub r2, r3, r2 + str r2, [r4, #0x3c] + ldrsh r1, [r4, r1] + ldr r2, [r4, #0x40] + add r1, r2, r1 + str r1, [r4, #0x40] + ldr r1, [r4, #0x3c] + cmp r1, #0 + bge _02229606 + str r0, [r4, #0x3c] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_02229606: + ldr r0, [r4, #0x40] + mov r1, #0 + str r0, [sp] + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x3c] + mov r3, #0x50 + bl sub_020086D4 + pop {r3, r4, r5, pc} +_02229618: + ldr r0, [r4, #0x30] + mov r1, #0xe + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0x30] + bl ov12_02226B84 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02229636: + pop {r3, r4, r5, pc} + thumb_func_end ov12_022295C4 + + thumb_func_start ov12_02229638 +ov12_02229638: ; 0x02229638 + push {r4, r5, r6, lr} + sub sp, #8 + mov r1, #0x50 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #0x1c] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r6, r0, #0 + add r2, r4, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, #0x28 + add r3, sp, #4 + bl ov12_02235998 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02229454 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + cmp r0, #0 + beq _022296BA + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02223354 + mov r3, #0x50 + sub r0, r3, r0 + str r0, [r4, #0x3c] + mov r1, #0 + str r1, [r4, #0x40] + str r1, [sp] + ldr r0, [r4, #0x30] + ldr r2, [r4, #0x3c] + bl sub_020086D4 + ldr r0, [r4, #4] + ldr r1, _0222972C ; =ov12_022295C4 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r4, r5, r6, pc} +_022296BA: + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_020080C0 + str r0, [r4, #0x44] + str r0, [r4, #0x48] + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02223354 + mov r3, #0x50 + sub r0, r3, r0 + str r0, [r4, #0x3c] + str r0, [r4, #0x40] + mov r0, #0x1c + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _022296FA + ldr r0, [r4, #0x3c] + mov r1, #0 + str r0, [sp] + ldr r0, [r4, #0x30] + add r2, r1, #0 + bl sub_020086D4 + ldr r0, [r4, #4] + ldr r1, _02229730 ; =ov12_02229538 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r4, r5, r6, pc} +_022296FA: + mov r0, #0 + str r0, [r4, #0x3c] + ldr r1, [r4, #0x44] + ldr r0, [r4, #0x40] + add r2, r1, r0 + str r2, [r4, #0x44] + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0x3c] + mov r1, #0 + str r0, [sp] + ldr r0, [r4, #0x30] + add r2, r1, #0 + mov r3, #0x50 + bl sub_020086D4 + ldr r0, [r4, #4] + ldr r1, _02229734 ; =ov12_022294AC + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222972C: .word ov12_022295C4 +_02229730: .word ov12_02229538 +_02229734: .word ov12_022294AC + thumb_func_end ov12_02229638 + + thumb_func_start ov12_02229738 +ov12_02229738: ; 0x02229738 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222974C + cmp r0, #1 + beq _0222976C + b _022297FC +_0222974C: + ldr r0, [r4, #0x10] + str r0, [sp] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r3, [r4, #0xc] + add r0, #0xd4 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02226108 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222976C: + add r0, r4, #0 + add r0, #0xd4 + bl ov12_02226138 + cmp r0, #0 + bne _022297C0 + ldrb r1, [r4, #1] + ldr r0, [r4, #0x18] + cmp r1, r0 + ldrb r0, [r4] + blt _02229786 + add r0, r0, #1 + b _02229788 +_02229786: + sub r0, r0, #1 +_02229788: + strb r0, [r4] + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _022297A0 + ldr r1, [r4, #0x1c] + mov r2, #0 + lsl r1, r1, #0x18 + ldr r0, [r4, #0x28] + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02019184 +_022297A0: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _022297B6 + ldr r1, [r4, #0x1c] + ldr r0, [r4, #0x28] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #3 + mov r3, #0 + bl sub_02019184 +_022297B6: + ldrb r0, [r4, #1] + add sp, #4 + add r0, r0, #1 + strb r0, [r4, #1] + pop {r3, r4, pc} +_022297C0: + mov r3, #0xd4 + ldrsh r0, [r4, r3] + cmp r0, #0 + beq _022297DC + mov r0, #1 + str r0, [r4, #0x20] + ldr r1, [r4, #0x1c] + ldrsh r3, [r4, r3] + lsl r1, r1, #0x18 + ldr r0, [r4, #0x28] + lsr r1, r1, #0x18 + mov r2, #0 + bl sub_02019184 +_022297DC: + mov r3, #0xd6 + ldrsh r0, [r4, r3] + cmp r0, #0 + beq _0222980A + mov r0, #1 + str r0, [r4, #0x24] + ldr r1, [r4, #0x1c] + ldrsh r3, [r4, r3] + lsl r1, r1, #0x18 + ldr r0, [r4, #0x28] + lsr r1, r1, #0x18 + mov r2, #3 + bl sub_02019184 + add sp, #4 + pop {r3, r4, pc} +_022297FC: + ldr r0, [r4, #0x2c] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222980A: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02229738 + + thumb_func_start ov12_02229810 +ov12_02229810: ; 0x02229810 + push {r3, r4, r5, lr} + mov r1, #0xf8 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + str r5, [r4, #0x2c] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #0x30] + ldr r0, [r4, #0x2c] + bl ov12_02220278 + str r0, [r4, #0x28] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r4, #0x18] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + cmp r0, #0 + bne _02229876 + mov r0, #3 + b _02229878 +_02229876: + mov r0, #2 +_02229878: + str r0, [r4, #0x1c] + ldr r0, [r4, #0x2c] + ldr r1, _02229888 ; =ov12_02229738 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_02229888: .word ov12_02229738 + thumb_func_end ov12_02229810 + + thumb_func_start ov12_0222988C +ov12_0222988C: ; 0x0222988C + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #0x2c] + ldr r3, [r4, #0x24] + cmp r3, r0 + beq _022298A0 + ldr r1, [r4, #0x28] + cmp r1, r0 + bne _022298B0 +_022298A0: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} +_022298B0: + mov r1, #0x20 + ldrsh r2, [r4, r1] + cmp r2, #0 + bge _022298D2 + add r2, r3, r2 + cmp r2, #0 + ble _022298CA + str r2, [r4, #0x24] + ldrsh r0, [r4, r1] + ldr r2, [r4, #0x28] + add r0, r2, r0 + str r0, [r4, #0x28] + b _022298EA +_022298CA: + str r0, [r4, #0x24] + ldr r0, [r4, #0x2c] + str r0, [r4, #0x28] + b _022298EA +_022298D2: + add r2, r3, r2 + cmp r2, #0xf + bge _022298E4 + str r2, [r4, #0x24] + ldrsh r0, [r4, r1] + ldr r2, [r4, #0x28] + add r0, r2, r0 + str r0, [r4, #0x28] + b _022298EA +_022298E4: + str r0, [r4, #0x24] + ldr r0, [r4, #0x2c] + str r0, [r4, #0x28] +_022298EA: + ldr r0, [r4, #0x1c] + bl sub_0200D330 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x24] + lsl r0, r0, #4 + orr r1, r0 + ldr r0, _02229904 ; =0x0400004D + strb r1, [r0] + ldr r0, [r4, #0xc] + bl sub_0200C7EC + pop {r4, pc} + ; .align 2, 0 +_02229904: .word 0x0400004D + thumb_func_end ov12_0222988C + + thumb_func_start ov12_02229908 +ov12_02229908: ; 0x02229908 + push {r3, r4, r5, lr} + mov r1, #0x30 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r0, [r4, #4] + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0x20] + ldr r0, [r4, #4] + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #0x24] + ldr r0, [r4, #4] + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #0x28] + ldr r0, [r4, #4] + mov r1, #0 + bl ov12_02220280 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022202C0 + mov r1, #1 + str r0, [r4, #0x1c] + bl sub_0200D3F4 + mov r0, #0x20 + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _0222995E + mov r0, #0 + b _02229960 +_0222995E: + mov r0, #0xf +_02229960: + str r0, [r4, #0x2c] + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_0200D7FC + ldr r0, [r4, #4] + ldr r1, _0222997C ; =ov12_0222988C + add r2, r4, #0 + bl ov12_022201E8 + add r1, r4, #0 + bl ov12_0222988C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222997C: .word ov12_0222988C + thumb_func_end ov12_02229908 + + thumb_func_start ov12_02229980 +ov12_02229980: ; 0x02229980 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + strh r0, [r4, #0xe] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #4] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strh r0, [r4, #6] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + str r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #8 + bl ov12_02220280 + str r0, [r4, #0x30] + add r0, r5, #0 + mov r1, #7 + bl ov12_02220280 + ldr r2, _02229A4C ; =0xFFFF0000 + mov r1, #0 + and r2, r0 + lsl r0, r0, #0x10 + str r1, [r4, #0x1c] + lsr r2, r2, #0x10 + str r2, [r4, #0x20] + lsr r0, r0, #0x10 + str r0, [r4, #0x24] + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _022299F6 + str r1, [r4, #0x20] +_022299F6: + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _02229A00 + mov r0, #0xff + str r0, [r4, #0x24] +_02229A00: + ldr r1, [r4, #0] + add r0, r5, #0 + bl ov12_0222026C + str r0, [r4, #0x38] + add r0, r5, #0 + bl ov12_02220250 + str r0, [r4, #0x34] + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _02229A2A + add r0, r5, #0 + bl ov12_02220240 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov12_02220248 + str r0, [r4, #0x18] + b _02229A3E +_02229A2A: + cmp r0, #1 + bne _02229A3E + add r0, r5, #0 + bl ov12_02220248 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov12_02220240 + str r0, [r4, #0x18] +_02229A3E: + ldr r0, [r4, #0x38] + cmp r0, #0 + bne _02229A48 + bl sub_02022974 +_02229A48: + pop {r3, r4, r5, pc} + nop +_02229A4C: .word 0xFFFF0000 + thumb_func_end ov12_02229980 + + thumb_func_start ov12_02229A50 +ov12_02229A50: ; 0x02229A50 + ldr r0, [r0, #8] + mov r1, #0 + cmp r0, #0 + beq _02229A62 +_02229A58: + ldrh r2, [r0, #0x26] + ldrh r3, [r0, #0x24] + ldr r0, [r0, #0] + cmp r0, #0 + bne _02229A58 +_02229A62: + cmp r2, r3 + beq _02229A68 + mov r1, #1 +_02229A68: + add r0, r1, #0 + bx lr + thumb_func_end ov12_02229A50 + + thumb_func_start ov12_02229A6C +ov12_02229A6C: ; 0x02229A6C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x38] + bl ov12_02229A50 + add r4, r0, #0 + mov r0, #4 + ldrsh r0, [r5, r0] + ldr r1, [r5, #0x28] + cmp r1, r0 + bge _02229A8A + add r0, r1, #1 + str r0, [r5, #0x28] + pop {r4, r5, r6, pc} +_02229A8A: + add r0, r5, #0 + add r0, #0xa8 + bl ov12_02225C14 + cmp r0, #0 + bne _02229AB2 + cmp r4, #0 + bne _02229AB2 + ldr r0, [r5, #0x34] + ldr r1, [r5, #0x38] + bl sub_02014724 + ldr r0, [r5, #0x40] + add r1, r6, #0 + bl ov12_02220220 + add r0, r5, #0 + bl ov12_02235E80 + pop {r4, r5, r6, pc} +_02229AB2: + ldr r1, [r5, #0x1c] + ldr r0, [r5, #0x20] + cmp r0, r1 + bgt _02229AC0 + ldr r0, [r5, #0x24] + cmp r0, r1 + bge _02229AC6 +_02229AC0: + ldr r0, [r5, #0x24] + cmp r0, #0xff + bne _02229B24 +_02229AC6: + mov r0, #0xa8 + ldrsh r2, [r5, r0] + ldr r1, [r5, #0x38] + mov r3, #0xac + add r0, r2, #0 + ldr r2, [r1, #0x20] + mul r0, r3 + ldr r2, [r2, #0] + ldr r2, [r2, #4] + add r0, r0, r2 + str r0, [r1, #0x28] + mov r0, #0xaa + ldrsh r4, [r5, r0] + ldr r2, [r5, #0x38] + add r1, r4, #0 + mul r1, r3 + ldr r3, [r2, #0x20] + ldr r3, [r3, #0] + ldr r3, [r3, #8] + add r1, r1, r3 + str r1, [r2, #0x2c] + ldr r1, [r5, #0x30] + cmp r1, #0 + beq _02229B24 + mov r1, #6 + ldrsh r1, [r5, r1] + add r0, #0xbe + bl sub_020E1F6C + ldr r1, [r5, #0x2c] + add r0, r1, r0 + str r0, [r5, #0x2c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + mov r1, #0xaa + ldrsh r2, [r5, r1] + mov r1, #0xac + mul r1, r2 + add r2, r1, r0 + ldr r1, [r5, #0x38] + ldr r0, [r1, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r2, r0 + str r0, [r1, #0x2c] +_02229B24: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02229A6C + + thumb_func_start ov12_02229B28 +ov12_02229B28: ; 0x02229B28 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + mov r1, #0x41 + lsl r1, r1, #2 + add r6, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x3c + bl ov12_0223595C + add r0, r6, #0 + add r1, r4, #0 + bl ov12_02229980 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_02225964 + add r5, r0, #0 + ldr r1, [r4, #0x14] + add r0, r6, #0 + add r2, sp, #0x18 + bl ov12_02235508 + ldr r1, [r4, #0x18] + add r0, r6, #0 + add r2, sp, #0xc + bl ov12_02235508 + ldr r0, [sp, #0x18] + mov r1, #0xac + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [sp, #0xc] + mov r1, #0xac + bl sub_020E1F6C + add r7, r0, #0 + ldr r0, [sp, #0x1c] + mov r1, #0xac + bl sub_020E1F6C + str r0, [sp, #8] + ldr r0, [sp, #0x10] + mov r1, #0xac + bl sub_020E1F6C + mov r1, #0xe + ldrsh r1, [r4, r1] + add r2, r1, #0 + mul r2, r5 + add r0, r0, r2 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldrh r0, [r4, #6] + lsl r1, r6, #0x10 + mov r2, #0xc + str r0, [sp, #4] + ldrsh r2, [r4, r2] + add r0, r4, #0 + add r0, #0xa8 + add r3, r2, #0 + mul r3, r5 + add r2, r7, r3 + ldr r3, [sp, #8] + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + cmp r5, #0 + ldr r2, _02229C4C ; =0x00005C71 + ble _02229BE0 + ldr r1, _02229C50 ; =0x00000E38 + add r0, r4, #0 + add r0, #0xf0 + mul r1, r5 + mul r2, r5 + mov r3, #0xa + bl ov12_02225D50 + b _02229BF0 +_02229BE0: + ldr r1, _02229C54 ; =0x00003FFF + add r0, r4, #0 + add r0, #0xf0 + mul r1, r5 + mul r2, r5 + mov r3, #0xa + bl ov12_02225D50 +_02229BF0: + ldr r0, [r4, #0x20] + mov r5, #0 + cmp r0, #0 + ble _02229C0A + add r6, r4, #0 + add r6, #0xa8 +_02229BFC: + add r0, r6, #0 + bl ov12_02225C14 + ldr r0, [r4, #0x20] + add r5, r5, #1 + cmp r5, r0 + blt _02229BFC +_02229C0A: + ldr r0, [r4, #0x24] + cmp r0, #0xff + beq _02229C14 + add r0, r0, #1 + str r0, [r4, #0x1c] +_02229C14: + mov r0, #0xa8 + ldrsh r3, [r4, r0] + ldr r1, [r4, #0x38] + mov r2, #0xac + add r0, r3, #0 + ldr r3, [r1, #0x20] + mul r0, r2 + ldr r3, [r3, #0] + ldr r3, [r3, #4] + add r0, r0, r3 + str r0, [r1, #0x28] + mov r1, #0xaa + ldrsh r1, [r4, r1] + ldr r0, [r4, #0x38] + mul r2, r1 + ldr r1, [r0, #0x20] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r1, r2, r1 + str r1, [r0, #0x2c] + ldr r0, [r4, #0x40] + ldr r1, _02229C58 ; =ov12_02229A6C + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02229C4C: .word 0x00005C71 +_02229C50: .word 0x00000E38 +_02229C54: .word 0x00003FFF +_02229C58: .word ov12_02229A6C + thumb_func_end ov12_02229B28 + + thumb_func_start ov12_02229C5C +ov12_02229C5C: ; 0x02229C5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + mov r1, #0x41 + lsl r1, r1, #2 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x3c + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #6] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strh r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0x28] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + ldr r2, _02229DE8 ; =0xFFFF0000 + mov r1, #0 + and r2, r0 + lsl r0, r0, #0x10 + str r1, [r4, #0x1c] + lsr r2, r2, #0x10 + str r2, [r4, #0x20] + lsr r0, r0, #0x10 + str r0, [r4, #0x24] + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _02229CCE + str r1, [r4, #0x20] +_02229CCE: + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _02229CD8 + mov r0, #0xff + str r0, [r4, #0x24] +_02229CD8: + ldr r1, [r4, #0] + add r0, r5, #0 + bl ov12_0222026C + str r0, [r4, #0x38] + add r0, r5, #0 + bl ov12_02220250 + str r0, [r4, #0x34] + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _02229D00 + add r0, r5, #0 + bl ov12_02220240 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov12_02220240 + b _02229D0E +_02229D00: + add r0, r5, #0 + bl ov12_02220248 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov12_02220248 +_02229D0E: + str r0, [r4, #0x18] + ldr r0, [r4, #0x38] + cmp r0, #0 + bne _02229D1A + bl sub_02022974 +_02229D1A: + ldr r1, [r4, #0x14] + add r0, r5, #0 + add r2, sp, #0x14 + bl ov12_02235508 + ldr r1, [r4, #0x18] + add r0, r5, #0 + add r2, sp, #8 + bl ov12_02235508 + cmp r6, #0 + bne _02229D3E + add r0, sp, #0x14 + bl ov12_02235748 + ldr r0, [sp, #8] + str r0, [sp, #0x14] + b _02229D48 +_02229D3E: + add r0, sp, #8 + bl ov12_02235748 + ldr r0, [sp, #0x14] + str r0, [sp, #8] +_02229D48: + ldr r0, [sp, #0x14] + mov r1, #0xac + bl sub_020E1F6C + add r5, r0, #0 + ldr r0, [sp, #8] + mov r1, #0xac + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [sp, #0x18] + mov r1, #0xac + bl sub_020E1F6C + add r7, r0, #0 + ldr r0, [sp, #0xc] + mov r1, #0xac + bl sub_020E1F6C + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldrh r0, [r4, #6] + lsl r1, r5, #0x10 + lsl r2, r6, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + lsl r3, r7, #0x10 + add r0, #0xa8 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + ldr r0, [r4, #0x20] + mov r5, #0 + cmp r0, #0 + ble _02229DA6 + add r6, r4, #0 + add r6, #0xa8 +_02229D98: + add r0, r6, #0 + bl ov12_02225C14 + ldr r0, [r4, #0x20] + add r5, r5, #1 + cmp r5, r0 + blt _02229D98 +_02229DA6: + ldr r0, [r4, #0x24] + cmp r0, #0xff + beq _02229DB0 + add r0, r0, #1 + str r0, [r4, #0x1c] +_02229DB0: + mov r0, #0xa8 + ldrsh r3, [r4, r0] + ldr r1, [r4, #0x38] + mov r2, #0xac + add r0, r3, #0 + ldr r3, [r1, #0x20] + mul r0, r2 + ldr r3, [r3, #0] + ldr r3, [r3, #4] + add r0, r0, r3 + str r0, [r1, #0x28] + mov r1, #0xaa + ldrsh r1, [r4, r1] + ldr r0, [r4, #0x38] + mul r2, r1 + ldr r1, [r0, #0x20] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r1, r2, r1 + str r1, [r0, #0x2c] + ldr r0, [r4, #0x40] + ldr r1, _02229DEC ; =ov12_02229A6C + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02229DE8: .word 0xFFFF0000 +_02229DEC: .word ov12_02229A6C + thumb_func_end ov12_02229C5C + + thumb_func_start ov12_02229DF0 +ov12_02229DF0: ; 0x02229DF0 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x38] + bl ov12_02229A50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xa8 + add r1, #0xcc + bl ov12_02225CE4 + cmp r0, #0 + bne _02229E2A + cmp r4, #0 + bne _02229E2A + ldr r0, [r5, #0x34] + ldr r1, [r5, #0x38] + bl sub_02014724 + ldr r0, [r5, #0x40] + add r1, r6, #0 + bl ov12_02220220 + add r0, r5, #0 + bl ov12_02235E80 + pop {r4, r5, r6, pc} +_02229E2A: + mov r1, #0xa8 + ldrsh r1, [r5, r1] + ldr r0, [r5, #0x38] + mov r2, #0xac + add r3, r1, #0 + ldr r1, [r0, #0x20] + mul r3, r2 + ldr r1, [r1, #0] + ldr r1, [r1, #4] + add r1, r3, r1 + str r1, [r0, #0x28] + mov r1, #0xaa + ldrsh r1, [r5, r1] + ldr r0, [r5, #0x38] + mul r2, r1 + ldr r1, [r0, #0x20] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r1, r2, r1 + str r1, [r0, #0x2c] + pop {r4, r5, r6, pc} + thumb_func_end ov12_02229DF0 + + thumb_func_start ov12_02229E54 +ov12_02229E54: ; 0x02229E54 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + mov r1, #0x41 + lsl r1, r1, #2 + add r6, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x3c + bl ov12_0223595C + add r0, r6, #0 + add r1, r4, #0 + bl ov12_02229980 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_02225964 + add r5, r0, #0 + ldr r1, [r4, #0x14] + add r0, r6, #0 + add r2, sp, #0x20 + bl ov12_02235508 + ldr r1, [r4, #0x18] + add r0, r6, #0 + add r2, sp, #0x14 + bl ov12_02235508 + ldr r0, [sp, #0x20] + mov r1, #0xac + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0xac + bl sub_020E1F6C + str r0, [sp, #0x10] + ldr r0, [sp, #0x24] + mov r1, #0xac + bl sub_020E1F6C + add r7, r0, #0 + ldr r0, [sp, #0x18] + mov r1, #0xac + bl sub_020E1F6C + lsl r1, r7, #0x10 + asr r1, r1, #0x10 + str r1, [sp] + mov r1, #0xe + ldrsh r1, [r4, r1] + mov r3, #0xc + add r2, r1, #0 + mul r2, r5 + add r0, r0, r2 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldrh r0, [r4, #6] + lsl r2, r6, #0x10 + add r1, r4, #0 + str r0, [sp, #8] + ldr r0, [r4, #8] + add r1, #0xcc + lsl r0, r0, #0xc + neg r0, r0 + str r0, [sp, #0xc] + ldrsh r6, [r4, r3] + add r0, r4, #0 + add r0, #0xa8 + add r3, r6, #0 + ldr r6, [sp, #0x10] + mul r3, r5 + add r3, r6, r3 + lsl r3, r3, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225C98 + cmp r5, #0 + ldr r2, _02229F8C ; =0x00005C71 + ble _02229F1A + ldr r1, _02229F90 ; =0x00000E38 + add r0, r4, #0 + add r0, #0xf0 + mul r1, r5 + mul r2, r5 + mov r3, #0xa + bl ov12_02225D50 + b _02229F2A +_02229F1A: + ldr r1, _02229F94 ; =0x00003FFF + add r0, r4, #0 + add r0, #0xf0 + mul r1, r5 + mul r2, r5 + mov r3, #0xa + bl ov12_02225D50 +_02229F2A: + ldr r0, [r4, #0x20] + mov r5, #0 + cmp r0, #0 + ble _02229F4A + add r6, r4, #0 + add r7, r4, #0 + add r6, #0xa8 + add r7, #0xcc +_02229F3A: + add r0, r6, #0 + add r1, r7, #0 + bl ov12_02225CE4 + ldr r0, [r4, #0x20] + add r5, r5, #1 + cmp r5, r0 + blt _02229F3A +_02229F4A: + ldr r0, [r4, #0x24] + cmp r0, #0xff + beq _02229F54 + add r0, r0, #1 + str r0, [r4, #0x1c] +_02229F54: + mov r0, #0xa8 + ldrsh r3, [r4, r0] + ldr r1, [r4, #0x38] + mov r2, #0xac + add r0, r3, #0 + ldr r3, [r1, #0x20] + mul r0, r2 + ldr r3, [r3, #0] + ldr r3, [r3, #4] + add r0, r0, r3 + str r0, [r1, #0x28] + mov r1, #0xaa + ldrsh r1, [r4, r1] + ldr r0, [r4, #0x38] + mul r2, r1 + ldr r1, [r0, #0x20] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r1, r2, r1 + str r1, [r0, #0x2c] + ldr r0, [r4, #0x40] + ldr r1, _02229F98 ; =ov12_02229DF0 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_02229F8C: .word 0x00005C71 +_02229F90: .word 0x00000E38 +_02229F94: .word 0x00003FFF +_02229F98: .word ov12_02229DF0 + thumb_func_end ov12_02229E54 + + thumb_func_start ov12_02229F9C +ov12_02229F9C: ; 0x02229F9C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x38] + bl ov12_02229A50 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x58 + bl ov12_02225AE0 + cmp r0, #0 + bne _02229FD2 + cmp r4, #0 + bne _02229FD2 + ldr r0, [r5, #0x34] + ldr r1, [r5, #0x38] + bl sub_02014724 + ldr r0, [r5, #0x40] + add r1, r6, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_02229FD2: + add r0, r5, #0 + add r0, #0x8c + ldr r2, [r0, #0] + mov r0, #0x5a + ldrsh r0, [r5, r0] + mov r3, #0xac + add r1, r0, #0 + mul r1, r3 + add r1, r2, r1 + add r2, r5, #0 + add r2, #0x88 + ldr r4, [r2, #0] + mov r2, #0x58 + ldrsh r2, [r5, r2] + ldr r0, [r5, #0x38] + mul r3, r2 + ldr r2, [r0, #0x20] + add r3, r4, r3 + ldr r2, [r2, #0] + ldr r2, [r2, #4] + add r2, r3, r2 + str r2, [r0, #0x28] + ldr r2, [r5, #0x38] + ldr r0, [r2, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r2, #0x2c] + pop {r4, r5, r6, pc} + thumb_func_end ov12_02229F9C + + thumb_func_start ov12_0222A00C +ov12_0222A00C: ; 0x0222A00C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0x94 + add r4, r0, #0 + bl ov12_02235E50 + add r5, r0, #0 + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x3c + bl ov12_0223595C + add r0, r4, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r5, #0] + add r0, r4, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r5, #4] + add r0, r4, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r5, #0xc] + add r0, r4, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r5, #8] + add r0, r4, #0 + mov r1, #4 + bl ov12_02220280 + str r0, [r5, #0x10] + add r0, r4, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r5, #0x14] + add r0, r4, #0 + mov r1, #6 + bl ov12_02220280 + str r0, [r5, #0x18] + add r0, r4, #0 + mov r1, #7 + bl ov12_02220280 + str r0, [r5, #0x1c] + add r0, r4, #0 + mov r1, #8 + bl ov12_02220280 + str r0, [r5, #0x20] + cmp r0, #0 + bne _0222A08A + add r0, r4, #0 + bl ov12_02220240 + b _0222A090 +_0222A08A: + add r0, r4, #0 + bl ov12_02220248 +_0222A090: + str r0, [r5, #0x24] + add r2, r5, #0 + ldr r1, [r5, #0x24] + add r0, r4, #0 + add r2, #0x88 + bl ov12_02235508 + ldr r1, [r5, #0] + add r0, r4, #0 + bl ov12_0222026C + str r0, [r5, #0x38] + add r0, r4, #0 + mov r1, #9 + bl ov12_02220280 + add r1, r0, #0 + add r0, r4, #0 + bl ov12_02220260 + str r0, [r5, #0x34] + ldr r1, [r5, #4] + ldr r0, _0222A170 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + add r4, r0, #0 + ldr r1, [r5, #0xc] + ldr r0, _0222A170 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + add r6, r0, #0 + ldr r1, [r5, #8] + ldr r0, _0222A170 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + add r7, r0, #0 + ldr r1, [r5, #0x10] + ldr r0, _0222A170 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x14] + lsl r1, r4, #0x10 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r0, [r5, #0x18] + lsl r2, r6, #0x10 + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [r5, #0x1c] + lsl r3, r7, #0x10 + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0x58 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl ov12_02225A5C + add r0, r5, #0 + add r0, #0x58 + bl ov12_02225AE0 + add r0, r5, #0 + add r0, #0x8c + ldr r2, [r0, #0] + mov r0, #0x5a + ldrsh r0, [r5, r0] + mov r3, #0x58 + mov r4, #0xac + add r1, r0, #0 + add r0, r5, #0 + mul r1, r4 + ldrsh r3, [r5, r3] + add r0, #0x88 + add r2, r2, r1 + ldr r1, [r5, #0x38] + ldr r0, [r0, #0] + mul r4, r3 + add r3, r0, r4 + ldr r0, [r1, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r3, r0 + str r0, [r1, #0x28] + ldr r1, [r5, #0x38] + ldr r0, [r1, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r2, r0 + str r0, [r1, #0x2c] + ldr r0, [r5, #0x40] + ldr r1, _0222A174 ; =ov12_02229F9C + add r2, r5, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222A170: .word 0x0000FFFF +_0222A174: .word ov12_02229F9C + thumb_func_end ov12_0222A00C + + thumb_func_start ov12_0222A178 +ov12_0222A178: ; 0x0222A178 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D3B8 + cmp r0, #0 + ldr r0, [r4, #0x1c] + bne _0222A19E + bl sub_0200D0F4 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_0222A19E: + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222A178 + + thumb_func_start ov12_0222A1AC +ov12_0222A1AC: ; 0x0222A1AC + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x20 + add r5, r0, #0 + add r4, r3, #0 + bl ov12_02235E50 + add r7, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + str r4, [r7, #0x1c] + bl ov12_02220280 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200D5DC + ldr r0, [r7, #4] + ldr r1, _0222A1F0 ; =ov12_0222A178 + add r2, r7, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222A1F0: .word ov12_0222A178 + thumb_func_end ov12_0222A1AC + + thumb_func_start ov12_0222A1F4 +ov12_0222A1F4: ; 0x0222A1F4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222A206 + cmp r0, #1 + beq _0222A284 + b _0222A31C +_0222A206: + ldr r1, [r4, #0x34] + ldr r0, _0222A340 ; =0x0223A03C + lsl r2, r1, #1 + ldrsh r6, [r0, r2] + add r0, r1, #1 + str r0, [r4, #0x34] + cmp r6, #0xff + beq _0222A256 + cmp r6, #0 + bne _0222A24A + ldr r0, [r4, #0x1c] + bl sub_0200D454 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov12_0222339C + cmp r5, r0 + ldr r0, [r4, #4] + bne _0222A23E + mov r1, #2 + bl ov12_02223428 + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D460 + b _0222A24A +_0222A23E: + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D460 +_0222A24A: + ldr r0, [r4, #0x1c] + add r1, r6, #0 + mov r2, #0 + bl sub_0200D5DC + b _0222A332 +_0222A256: + ldr r0, [r4, #0x1c] + mov r1, #2 + bl sub_0200D6A4 + add r0, r4, #0 + ldr r2, _0222A344 ; =0x00000E38 + add r0, #0x20 + mov r1, #0 + mov r3, #4 + bl ov12_02225D50 + mov r1, #7 + ldr r0, [r4, #0x1c] + mvn r1, r1 + mov r2, #0x10 + bl sub_0200D7E0 + mov r0, #0 + str r0, [r4, #0x34] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222A332 +_0222A284: + add r0, r4, #0 + add r0, #0x20 + bl ov12_02225DA0 + cmp r0, #1 + bne _0222A29E + ldr r1, [r4, #0x20] + ldr r0, [r4, #0x1c] + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0200D79C + b _0222A332 +_0222A29E: + ldr r0, [r4, #0x34] + cmp r0, #5 + ble _0222A2AC + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222A332 +_0222A2AC: + add r0, r0, #1 + str r0, [r4, #0x34] + cmp r0, #5 + bhi _0222A332 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222A2C0: ; jump table + .short _0222A332 - _0222A2C0 - 2 ; case 0 + .short _0222A2CC - _0222A2C0 - 2 ; case 1 + .short _0222A2DC - _0222A2C0 - 2 ; case 2 + .short _0222A2EC - _0222A2C0 - 2 ; case 3 + .short _0222A2FC - _0222A2C0 - 2 ; case 4 + .short _0222A30C - _0222A2C0 - 2 ; case 5 +_0222A2CC: + add r0, r4, #0 + ldr r1, _0222A344 ; =0x00000E38 + ldr r2, _0222A348 ; =0xFFFFF1C8 + add r0, #0x20 + mov r3, #4 + bl ov12_02225D50 + b _0222A332 +_0222A2DC: + add r0, r4, #0 + ldr r1, _0222A348 ; =0xFFFFF1C8 + ldr r2, _0222A344 ; =0x00000E38 + add r0, #0x20 + mov r3, #4 + bl ov12_02225D50 + b _0222A332 +_0222A2EC: + add r0, r4, #0 + ldr r1, _0222A344 ; =0x00000E38 + ldr r2, _0222A348 ; =0xFFFFF1C8 + add r0, #0x20 + mov r3, #4 + bl ov12_02225D50 + b _0222A332 +_0222A2FC: + add r0, r4, #0 + ldr r1, _0222A348 ; =0xFFFFF1C8 + ldr r2, _0222A344 ; =0x00000E38 + add r0, #0x20 + mov r3, #4 + bl ov12_02225D50 + b _0222A332 +_0222A30C: + add r0, r4, #0 + ldr r1, _0222A344 ; =0x00000E38 + add r0, #0x20 + mov r2, #0 + mov r3, #2 + bl ov12_02225D50 + b _0222A332 +_0222A31C: + ldr r0, [r4, #0x1c] + bl sub_0200D0F4 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_0222A332: + ldr r0, [r4, #0x1c] + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200C7EC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222A340: .word 0x0223A03C +_0222A344: .word 0x00000E38 +_0222A348: .word 0xFFFFF1C8 + thumb_func_end ov12_0222A1F4 + + thumb_func_start ov12_0222A34C +ov12_0222A34C: ; 0x0222A34C + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x38 + add r5, r0, #0 + add r6, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + str r6, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0x34] + add r0, r5, #0 + bl ov12_02220248 + add r7, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #0 + bl ov12_022258E0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #1 + bl ov12_022258E0 + add r2, r0, #0 + ldr r0, [r4, #0x1c] + add r1, r6, #0 + bl sub_0200D4C4 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + ldr r0, [r4, #0x1c] + bne _0222A3AC + mov r1, #1 + bl sub_0200D364 + b _0222A3B2 +_0222A3AC: + mov r1, #0 + bl sub_0200D364 +_0222A3B2: + ldr r0, [r4, #4] + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D460 + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #0xc + bl sub_0200D5DC + ldr r0, [r4, #4] + ldr r1, _0222A3D8 ; =ov12_0222A1F4 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222A3D8: .word ov12_0222A1F4 + thumb_func_end ov12_0222A34C + + thumb_func_start ov12_0222A3DC +ov12_0222A3DC: ; 0x0222A3DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D3B8 + cmp r0, #0 + ldr r0, [r4, #0x1c] + bne _0222A402 + bl sub_0200D0F4 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_0222A402: + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222A3DC + + thumb_func_start ov12_0222A410 +ov12_0222A410: ; 0x0222A410 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x38 + add r5, r0, #0 + add r6, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + str r6, [r4, #0x1c] + bl ov12_02220248 + add r7, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #0 + bl ov12_022258E0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #1 + bl ov12_022258E0 + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222A458 + mov r6, #0x48 + mov r2, #0x20 + mov r5, #0 + b _0222A46E +_0222A458: + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov12_0223525C + cmp r0, #3 + bne _0222A46A + mov r2, #0x7e + mov r5, #1 + b _0222A46E +_0222A46A: + mov r2, #0x20 + mov r5, #0 +_0222A46E: + ldr r0, [r4, #0x1c] + add r1, r6, #0 + bl sub_0200D4C4 + ldr r0, [r4, #0x1c] + add r1, r5, #0 + bl sub_0200D364 + ldr r0, [r4, #4] + mov r1, #2 + bl ov12_02223428 + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D460 + ldr r0, [r4, #4] + ldr r1, _0222A49C ; =ov12_0222A3DC + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222A49C: .word ov12_0222A3DC + thumb_func_end ov12_0222A410 + + thumb_func_start ov12_0222A4A0 +ov12_0222A4A0: ; 0x0222A4A0 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhi _0222A592 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222A4BA: ; jump table + .short _0222A4C2 - _0222A4BA - 2 ; case 0 + .short _0222A4E8 - _0222A4BA - 2 ; case 1 + .short _0222A500 - _0222A4BA - 2 ; case 2 + .short _0222A53C - _0222A4BA - 2 ; case 3 +_0222A4C2: + mov r0, #0xa0 + str r0, [sp] + mov r3, #0x70 + mov r0, #1 + str r3, [sp, #4] + mov r2, #0x15 + str r2, [sp, #8] + lsl r0, r0, #0x12 + str r0, [sp, #0xc] + add r0, r4, #0 + add r0, #0x24 + add r1, #0x48 + sub r2, #0x33 + bl ov12_02225C98 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222A5AA +_0222A4E8: + add r0, r4, #0 + ldr r2, [r4, #0x1c] + add r0, #0x24 + add r1, #0x48 + bl ov12_02225D2C + cmp r0, #0 + bne _0222A5AA + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222A5AA +_0222A500: + ldr r0, [r4, #0x1c] + bl sub_0200D3B8 + cmp r0, #0 + bne _0222A5AA + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_0200D810 + add r0, r4, #0 + add r2, r4, #0 + mov r1, #0x10 + add r0, #0x20 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0x21 + strb r1, [r0] + add r1, r4, #0 + add r1, #0x20 + add r2, #0x21 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #4] + bl ov12_02235780 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222A5AA +_0222A53C: + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _0222A554 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] +_0222A554: + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #0x10 + bhs _0222A56C + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x21 + strb r1, [r0] +_0222A56C: + add r0, r4, #0 + add r0, #0x20 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222A5BC ; =0x04000052 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + bne _0222A5AA + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222A5AA +_0222A592: + ldr r0, [r4, #0x1c] + bl sub_0200D0F4 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x10 + pop {r3, r4, r5, pc} +_0222A5AA: + ldr r0, [r4, #0x1c] + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200C7EC + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0222A5BC: .word 0x04000052 + thumb_func_end ov12_0222A4A0 + + thumb_func_start ov12_0222A5C0 +ov12_0222A5C0: ; 0x0222A5C0 + push {r4, r5, r6, lr} + mov r1, #0x6c + add r6, r0, #0 + add r5, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl ov12_0223595C + mov r1, #0x1d + str r5, [r4, #0x1c] + add r0, r5, #0 + mvn r1, r1 + mov r2, #0xa0 + bl sub_0200D4C4 + ldr r0, [r4, #4] + mov r1, #2 + bl ov12_02223428 + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D460 + ldr r0, [r4, #4] + ldr r1, _0222A600 ; =ov12_0222A4A0 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222A600: .word ov12_0222A4A0 + thumb_func_end ov12_0222A5C0 + + thumb_func_start ov12_0222A604 +ov12_0222A604: ; 0x0222A604 + push {r4, lr} + mov r1, #0 + add r4, r0, #0 + bl ov12_02220280 + cmp r0, #0 + beq _0222A61A + add r0, r4, #0 + bl ov12_02226924 + pop {r4, pc} +_0222A61A: + add r0, r4, #0 + bl ov12_02226954 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222A604 + + thumb_func_start ov12_0222A624 +ov12_0222A624: ; 0x0222A624 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r0, #0 + ldrb r0, [r4] + cmp r0, #0x18 + bls _0222A632 + b _0222A826 +_0222A632: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222A63E: ; jump table + .short _0222A670 - _0222A63E - 2 ; case 0 + .short _0222A826 - _0222A63E - 2 ; case 1 + .short _0222A826 - _0222A63E - 2 ; case 2 + .short _0222A826 - _0222A63E - 2 ; case 3 + .short _0222A826 - _0222A63E - 2 ; case 4 + .short _0222A71C - _0222A63E - 2 ; case 5 + .short _0222A71C - _0222A63E - 2 ; case 6 + .short _0222A746 - _0222A63E - 2 ; case 7 + .short _0222A826 - _0222A63E - 2 ; case 8 + .short _0222A826 - _0222A63E - 2 ; case 9 + .short _0222A760 - _0222A63E - 2 ; case 10 + .short _0222A760 - _0222A63E - 2 ; case 11 + .short _0222A78A - _0222A63E - 2 ; case 12 + .short _0222A826 - _0222A63E - 2 ; case 13 + .short _0222A826 - _0222A63E - 2 ; case 14 + .short _0222A7A2 - _0222A63E - 2 ; case 15 + .short _0222A7A2 - _0222A63E - 2 ; case 16 + .short _0222A7CC - _0222A63E - 2 ; case 17 + .short _0222A826 - _0222A63E - 2 ; case 18 + .short _0222A826 - _0222A63E - 2 ; case 19 + .short _0222A826 - _0222A63E - 2 ; case 20 + .short _0222A826 - _0222A63E - 2 ; case 21 + .short _0222A7E4 - _0222A63E - 2 ; case 22 + .short _0222A7E4 - _0222A63E - 2 ; case 23 + .short _0222A80E - _0222A63E - 2 ; case 24 +_0222A670: + ldr r0, [r4, #0x34] + ldr r1, _0222A86C ; =0xFFFF1FFF + cmp r0, #0 + bne _0222A6CA + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + add r5, r0, #0 + and r2, r1 + lsr r1, r0, #0xd + orr r1, r2 + str r1, [r0, #0] + add r5, #0x48 + ldrh r3, [r5] + mov r2, #0x3f + mov r1, #0xf + bic r3, r2 + orr r1, r3 + mov r3, #0x20 + orr r1, r3 + strh r1, [r5] + add r5, r0, #0 + add r5, #0x4a + ldrh r6, [r5] + mov r1, #0x1f + bic r6, r2 + orr r1, r6 + orr r1, r3 + strh r1, [r5] + add r1, r0, #0 + mov r2, #0x80 + add r1, #0x40 + strh r2, [r1] + ldr r1, _0222A870 ; =0x0000A0C0 + add r0, #0x44 + strh r1, [r0] + bl sub_0201D2E8 + mov r1, #5 + bl sub_020E1F6C + add r1, #0x23 + add sp, #4 + str r1, [r4, #0x3c] + pop {r3, r4, r5, r6, pc} +_0222A6CA: + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + add r5, r0, #0 + and r2, r1 + lsr r1, r0, #0xd + orr r1, r2 + str r1, [r0, #0] + add r5, #0x48 + ldrh r3, [r5] + mov r2, #0x3f + mov r1, #0xf + bic r3, r2 + orr r1, r3 + mov r3, #0x20 + orr r1, r3 + strh r1, [r5] + add r5, r0, #0 + add r5, #0x4a + ldrh r6, [r5] + mov r1, #0x1f + bic r6, r2 + orr r1, r6 + orr r1, r3 + strh r1, [r5] + add r1, r0, #0 + lsl r2, r3, #0xa + add r1, #0x40 + strh r2, [r1] + ldr r1, _0222A874 ; =0x000056C0 + add r0, #0x44 + strh r1, [r0] + bl sub_0201D2E8 + mov r1, #5 + bl sub_020E1F6C + add r1, #0x23 + add sp, #4 + str r1, [r4, #0x3c] + pop {r3, r4, r5, r6, pc} +_0222A71C: + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _0222A74C + ldr r0, [r4, #0x38] + cmp r0, #0 + bne _0222A74C + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A746: + ldr r0, [r4, #0x38] + cmp r0, #1 + bne _0222A74E +_0222A74C: + b _0222A868 +_0222A74E: + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A760: + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _0222A868 + ldr r0, [r4, #0x38] + cmp r0, #1 + bne _0222A868 + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A78A: + ldr r0, [r4, #0x38] + cmp r0, #2 + beq _0222A868 + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A7A2: + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _0222A868 + ldr r0, [r4, #0x38] + cmp r0, #2 + bne _0222A868 + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A7CC: + ldr r0, [r4, #0x38] + cmp r0, #3 + beq _0222A868 + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A7E4: + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _0222A868 + ldr r0, [r4, #0x38] + cmp r0, #3 + bne _0222A868 + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #8 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A80E: + ldr r0, [r4, #0x38] + cmp r0, #4 + beq _0222A868 + add r0, r0, #1 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #8 + bl sub_0200D5DC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222A826: + ldr r1, [r4, #0x3c] + cmp r0, r1 + ble _0222A868 + ldr r0, [r4, #0x38] + cmp r0, #0x14 + ldr r0, [r4, #0x1c] + bge _0222A862 + mov r1, #0 + mov r2, #4 + bl sub_0200D5DC + add r1, sp, #0 + ldr r0, [r4, #0x1c] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r0, sp, #0 + mov r1, #0 + ldrsh r0, [r0, r1] + cmp r0, #0x82 + ble _0222A858 + ldr r0, [r4, #0x1c] + bl sub_0200D3F4 +_0222A858: + ldr r0, [r4, #0x38] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0x38] + pop {r3, r4, r5, r6, pc} +_0222A862: + mov r1, #0 + bl sub_0200D3F4 +_0222A868: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0222A86C: .word 0xFFFF1FFF +_0222A870: .word 0x0000A0C0 +_0222A874: .word 0x000056C0 + thumb_func_end ov12_0222A624 + + thumb_func_start ov12_0222A878 +ov12_0222A878: ; 0x0222A878 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _0222A88A + add r0, r4, #0 + bl ov12_0222A624 +_0222A88A: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + ldrb r1, [r4] + ldr r0, [r4, #0x24] + cmp r1, r0 + blt _0222A8E2 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _0222A8F0 ; =0xFFFF1FFF + and r1, r2 + add r2, r0, #0 + str r1, [r0, #0] + add r2, #0x48 + ldrh r3, [r2] + mov r1, #0x3f + bic r3, r1 + strh r3, [r2] + add r2, r0, #0 + add r2, #0x4a + ldrh r3, [r2] + bic r3, r1 + strh r3, [r2] + add r2, r0, #0 + mov r1, #0 + add r2, #0x40 + strh r1, [r2] + add r0, #0x44 + strh r1, [r0] + ldr r0, [r4, #0x1c] + bl sub_0200D3F4 + ldr r0, [r4, #0xc] + bl sub_0200C7EC + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_0222A8E2: + ldr r0, [r4, #0x1c] + bl sub_0200D330 + ldr r0, [r4, #0xc] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222A8F0: .word 0xFFFF1FFF + thumb_func_end ov12_0222A878 + + thumb_func_start ov12_0222A8F4 +ov12_0222A8F4: ; 0x0222A8F4 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x40 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r4, #0x24] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #0x28] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #0x2c] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0x30] + add r0, r5, #0 + mov r1, #6 + bl ov12_02220280 + str r0, [r4, #0x34] + ldr r0, [r4, #4] + ldr r1, [r4, #0x20] + bl ov12_022202C0 + str r0, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0x38] + ldr r1, [r4, #0x28] + cmp r1, #0xff + beq _0222A966 + add r0, r5, #0 + bl ov12_02223428 + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_0200D460 +_0222A966: + ldr r1, [r4, #0x2c] + cmp r1, #0xff + beq _0222A972 + ldr r0, [r4, #0x1c] + bl sub_0200D474 +_0222A972: + add r0, r5, #0 + bl ov12_02223364 + cmp r0, #1 + beq _0222A9A4 + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + cmp r0, #2 + beq _0222A994 + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + cmp r0, #3 + bne _0222A9A4 +_0222A994: + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_0200D3F4 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_0222A9A4: + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + add r7, r0, #0 + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_02220248 + str r0, [sp] + ldr r0, [r4, #0x2c] + cmp r0, #0xff + beq _0222A9F2 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02235254 + add r6, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + bl ov12_02235254 + cmp r7, #3 + bhi _0222A9F2 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222A9E6: ; jump table + .short _0222A9EE - _0222A9E6 - 2 ; case 0 + .short _0222AA78 - _0222A9E6 - 2 ; case 1 + .short _0222AA34 - _0222A9E6 - 2 ; case 2 + .short _0222AABC - _0222A9E6 - 2 ; case 3 +_0222A9EE: + cmp r6, #5 + bls _0222A9F4 +_0222A9F2: + b _0222AAFE +_0222A9F4: + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222AA00: ; jump table + .short _0222AAFE - _0222AA00 - 2 ; case 0 + .short _0222AAFE - _0222AA00 - 2 ; case 1 + .short _0222AA0C - _0222AA00 - 2 ; case 2 + .short _0222AA16 - _0222AA00 - 2 ; case 3 + .short _0222AA20 - _0222AA00 - 2 ; case 4 + .short _0222AA2A - _0222AA00 - 2 ; case 5 +_0222AA0C: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AA16: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AA20: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AA2A: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AA34: + cmp r6, #5 + bhi _0222AAFE + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222AA44: ; jump table + .short _0222AAFE - _0222AA44 - 2 ; case 0 + .short _0222AAFE - _0222AA44 - 2 ; case 1 + .short _0222AA50 - _0222AA44 - 2 ; case 2 + .short _0222AA5A - _0222AA44 - 2 ; case 3 + .short _0222AA64 - _0222AA44 - 2 ; case 4 + .short _0222AA6E - _0222AA44 - 2 ; case 5 +_0222AA50: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AA5A: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AA64: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AA6E: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AA78: + cmp r0, #5 + bhi _0222AAFE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222AA88: ; jump table + .short _0222AAFE - _0222AA88 - 2 ; case 0 + .short _0222AAFE - _0222AA88 - 2 ; case 1 + .short _0222AA94 - _0222AA88 - 2 ; case 2 + .short _0222AA9E - _0222AA88 - 2 ; case 3 + .short _0222AAA8 - _0222AA88 - 2 ; case 4 + .short _0222AAB2 - _0222AA88 - 2 ; case 5 +_0222AA94: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AA9E: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AAA8: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AAB2: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AABC: + cmp r0, #5 + bhi _0222AAFE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222AACC: ; jump table + .short _0222AAFE - _0222AACC - 2 ; case 0 + .short _0222AAFE - _0222AACC - 2 ; case 1 + .short _0222AAD8 - _0222AACC - 2 ; case 2 + .short _0222AAE2 - _0222AACC - 2 ; case 3 + .short _0222AAEC - _0222AACC - 2 ; case 4 + .short _0222AAF6 - _0222AACC - 2 ; case 5 +_0222AAD8: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + b _0222AAFE +_0222AAE2: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AAEC: + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + b _0222AAFE +_0222AAF6: + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 +_0222AAFE: + ldr r0, [r4, #4] + ldr r1, _0222AB0C ; =ov12_0222A878 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222AB0C: .word ov12_0222A878 + thumb_func_end ov12_0222A8F4 + + thumb_func_start ov12_0222AB10 +ov12_0222AB10: ; 0x0222AB10 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r2, r0, #0 + ldr r0, [r6, #0x2c] + cmp r0, #0 + bne _0222AB2C + ldr r0, [r6, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_0222AB2C: + sub r0, r0, #1 + str r0, [r6, #0x2c] + mov r4, #0 + add r5, r6, #0 +_0222AB34: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _0222AB3E + bl sub_0200D330 +_0222AB3E: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0222AB34 + ldr r0, [r6, #0xc] + bl sub_0200C7EC + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_0222AB10 + + thumb_func_start ov12_0222AB50 +ov12_0222AB50: ; 0x0222AB50 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x34 + add r4, r0, #0 + bl ov12_02235E50 + add r7, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov12_0223595C + add r0, r4, #0 + mov r1, #0 + bl ov12_02220280 + cmp r0, #0 + bne _0222AB74 + mov r0, #3 + b _0222AB7C +_0222AB74: + add r0, r4, #0 + mov r1, #0 + bl ov12_02220280 +_0222AB7C: + ldr r5, _0222ABB4 ; =0x0223B120 + str r0, [r7, #0x2c] + mov r6, #0 + add r4, r7, #0 +_0222AB84: + ldr r0, [r7, #4] + add r1, r6, #0 + bl ov12_022202C0 + str r0, [r4, #0x1c] + cmp r0, #0 + beq _0222AB98 + ldr r1, [r5, #0] + bl sub_0200D474 +_0222AB98: + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #4 + blt _0222AB84 + ldr r0, [r7, #4] + ldr r1, _0222ABB8 ; =ov12_0222AB10 + add r2, r7, #0 + bl ov12_022201E8 + add r1, r7, #0 + bl ov12_0222AB10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222ABB4: .word 0x0223B120 +_0222ABB8: .word ov12_0222AB10 + thumb_func_end ov12_0222AB50 + + thumb_func_start ov12_0222ABBC +ov12_0222ABBC: ; 0x0222ABBC + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5, #8] + cmp r0, #0 + beq _0222ABD0 + cmp r0, #1 + beq _0222AC16 + b _0222AC2E +_0222ABD0: + mov r0, #0 + str r0, [r5, #0] + ldr r0, [r5, #0xc] + mov r1, #2 + bl ov12_022233EC + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl ov12_022266E8 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl ov12_0221FDE4 + mov r1, #0xc8 + str r1, [sp] + mov r3, #2 + str r4, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + str r6, [sp, #0xc] + str r0, [sp, #0x10] + add r0, r1, #0 + mov r1, #0xa0 + mov r2, #0xb6 + lsl r3, r3, #0x10 + bl ov12_0222662C + str r0, [r5, #0x24] + ldrb r0, [r5, #8] + add sp, #0x14 + add r0, r0, #1 + strb r0, [r5, #8] + pop {r3, r4, r5, r6, pc} +_0222AC16: + ldr r0, [r5, #0] + add r1, r0, #1 + str r1, [r5, #0] + ldr r0, [r5, #4] + cmp r1, r0 + blt _0222AC3C + ldr r0, [r5, #0x24] + bl ov12_0222669C + ldrb r0, [r5, #8] + add r0, r0, #1 + strb r0, [r5, #8] +_0222AC2E: + ldr r0, [r5, #0xc] + add r1, r4, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 +_0222AC3C: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov12_0222ABBC + + thumb_func_start ov12_0222AC40 +ov12_0222AC40: ; 0x0222AC40 + push {r3, r4, r5, lr} + mov r1, #0x28 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #8 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #4] + ldr r0, [r4, #0xc] + ldr r1, _0222AC6C ; =ov12_0222ABBC + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222AC6C: .word ov12_0222ABBC + thumb_func_end ov12_0222AC40 + + .rodata + + + .global Unk_ov12_0223A03C +Unk_ov12_0223A03C: ; 0x0223A03C + .incbin "incbin/overlay12_rodata.bin", 0x1AA8, 0x56 + + + .data + + + .global Unk_ov12_0223B120 +Unk_ov12_0223B120: ; 0x0223B120 + .incbin "incbin/overlay12_data.bin", 0x0, 0x10 + diff --git a/asm/ov12_0222AC70.s b/asm/ov12_0222AC70.s new file mode 100644 index 000000000..5b00da9ec --- /dev/null +++ b/asm/ov12_0222AC70.s @@ -0,0 +1,5210 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222AC70 +ov12_0222AC70: ; 0x0222AC70 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + str r0, [sp, #0xc] + ldrb r0, [r4] + cmp r0, #3 + bls _0222AC80 + b _0222ADF2 +_0222AC80: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222AC8C: ; jump table + .short _0222AC94 - _0222AC8C - 2 ; case 0 + .short _0222AD46 - _0222AC8C - 2 ; case 1 + .short _0222AD64 - _0222AC8C - 2 ; case 2 + .short _0222ADBE - _0222AC8C - 2 ; case 3 +_0222AC94: + ldrb r0, [r4, #4] + mov r7, #0 + add r1, r7, #0 + add r0, r0, #1 + strb r0, [r4, #4] + ldr r0, [r4, #8] + bl ov12_02220280 + cmp r0, #0 + ble _0222AD0A + ldr r6, _0222AE60 ; =0x0223A09E + add r5, r4, #0 +_0222ACAC: + add r1, sp, #0x10 + ldr r0, [r5, #0x14] + add r1, #2 + add r2, sp, #0x10 + bl sub_0200D550 + ldrb r1, [r4, #4] + ldrb r0, [r6] + cmp r1, r0 + blo _0222ACF0 + add r0, r4, r7 + ldrb r1, [r0, #1] + add r1, r1, #1 + strb r1, [r0, #1] + ldrb r2, [r0, #1] + ldrb r1, [r6, #1] + cmp r2, r1 + blo _0222ACF8 + mov r1, #0 + strb r1, [r0, #1] + ldr r0, [r5, #0x14] + bl sub_0200D408 + cmp r0, #1 + ldr r0, [r5, #0x14] + bne _0222ACE8 + mov r1, #0 + bl sub_0200D3F4 + b _0222ACF8 +_0222ACE8: + mov r1, #1 + bl sub_0200D3F4 + b _0222ACF8 +_0222ACF0: + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D3F4 +_0222ACF8: + ldr r0, [r4, #8] + mov r1, #0 + add r5, r5, #4 + add r6, r6, #2 + add r7, r7, #1 + bl ov12_02220280 + cmp r7, r0 + blt _0222ACAC +_0222AD0A: + ldrb r0, [r4, #4] + cmp r0, #0x2d + blo _0222ADA8 + mov r5, #0 + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222AD3A + add r6, r4, #0 + mov r7, #1 +_0222AD22: + ldr r0, [r6, #0x14] + add r1, r7, #0 + bl sub_0200D3F4 + ldr r0, [r4, #8] + mov r1, #0 + add r6, r6, #4 + add r5, r5, #1 + bl ov12_02220280 + cmp r5, r0 + blt _0222AD22 +_0222AD3A: + mov r0, #0 + strb r0, [r4, #4] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222AE2C +_0222AD46: + mov r1, #0x64 + str r1, [sp] + str r1, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x20 + mov r2, #0x3c + add r3, r1, #0 + bl ov12_02225EF0 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222AE2C +_0222AD64: + add r0, r4, #0 + add r0, #0x20 + bl ov12_02225F6C + cmp r0, #1 + bne _0222ADAA + mov r5, #0 + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222AE2C + add r7, r4, #0 + add r6, r4, #0 + add r7, #0x20 +_0222AD84: + add r0, r7, #0 + add r1, sp, #0x18 + add r2, sp, #0x14 + bl ov12_02225FA4 + ldr r0, [r6, #0x14] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x14] + bl sub_0200D6E8 + ldr r0, [r4, #8] + mov r1, #0 + add r6, r6, #4 + add r5, r5, #1 + bl ov12_02220280 + cmp r5, r0 + blt _0222AD84 +_0222ADA8: + b _0222AE2C +_0222ADAA: + ldrb r0, [r4, #4] + add r0, r0, #1 + strb r0, [r4, #4] + ldrb r0, [r4, #4] + cmp r0, #0x2d + blo _0222AE2C + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222AE2C +_0222ADBE: + ldrb r0, [r4, #5] + cmp r0, #0 + beq _0222ADC8 + sub r0, r0, #1 + strb r0, [r4, #5] +_0222ADC8: + ldrb r0, [r4, #6] + cmp r0, #0xf + bhs _0222ADD2 + add r0, r0, #1 + strb r0, [r4, #6] +_0222ADD2: + ldrb r0, [r4, #5] + cmp r0, #0 + bne _0222ADE4 + ldrb r0, [r4, #6] + cmp r0, #0xf + bne _0222ADE4 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222ADE4: + ldrb r0, [r4, #6] + ldrb r1, [r4, #5] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222AE64 ; =0x04000052 + strh r1, [r0] + b _0222AE2C +_0222ADF2: + mov r5, #0 + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222AE1A + add r6, r4, #0 + add r7, r5, #0 +_0222AE04: + ldr r0, [r6, #0x14] + bl sub_0200D0F4 + ldr r0, [r4, #8] + add r1, r7, #0 + add r6, r6, #4 + add r5, r5, #1 + bl ov12_02220280 + cmp r5, r0 + blt _0222AE04 +_0222AE1A: + ldr r0, [r4, #8] + ldr r1, [sp, #0xc] + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} +_0222AE2C: + mov r5, #0 + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222AE56 + add r6, r4, #0 + add r7, r5, #0 +_0222AE3E: + ldr r0, [r6, #0x14] + ldr r0, [r0, #0] + bl sub_0200D324 + ldr r0, [r4, #8] + add r1, r7, #0 + add r6, r6, #4 + add r5, r5, #1 + bl ov12_02220280 + cmp r5, r0 + blt _0222AE3E +_0222AE56: + ldr r0, [r4, #0x10] + bl sub_0200C7EC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222AE60: .word 0x0223A09E +_0222AE64: .word 0x04000052 + thumb_func_end ov12_0222AC70 + + thumb_func_start ov12_0222AE68 +ov12_0222AE68: ; 0x0222AE68 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r0, [sp] + add r5, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov12_0221FDE4 + mov r1, #0x44 + bl sub_02018144 + add r4, r0, #0 + bne _0222AE86 + bl sub_02022974 +_0222AE86: + mov r0, #0 + strb r0, [r4, #4] + strb r0, [r4] + str r5, [r4, #0xc] + ldr r0, [sp] + str r6, [r4, #0x10] + str r0, [r4, #8] + ldr r1, [sp] + add r0, sp, #8 + bl ov12_0222329C + mov r1, #0 + mvn r1, r1 + ldr r0, [r4, #8] + add r2, r1, #0 + bl ov12_02235780 + mov r0, #0xf + strb r0, [r4, #5] + mov r0, #0 + strb r0, [r4, #6] + ldrb r0, [r4, #6] + ldrb r1, [r4, #5] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222AF98 ; =0x04000052 + strh r1, [r0] + ldr r0, [sp] + str r7, [r4, #0x14] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [sp] + bl ov12_0223525C + cmp r0, #3 + bne _0222AEE2 + ldr r0, [sp] + bl ov12_0221FDD4 + add r1, r0, #0 + mov r0, #0 + add r2, sp, #4 + bl ov12_02235350 + b _0222AEF2 +_0222AEE2: + ldr r0, [sp] + bl ov12_0221FDD4 + add r1, r0, #0 + mov r0, #1 + add r2, sp, #4 + bl ov12_02235350 +_0222AEF2: + ldr r0, [r4, #8] + mov r1, #0 + mov r6, #1 + bl ov12_02220280 + cmp r0, #1 + ble _0222AF2C + add r5, r4, #4 + add r7, sp, #4 +_0222AF04: + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r2, sp, #8 + bl sub_0200CE6C + str r0, [r5, #0x14] + mov r1, #0 + mov r2, #2 + ldrsh r1, [r7, r1] + ldrsh r2, [r7, r2] + bl sub_0200D4C4 + ldr r0, [r4, #8] + mov r1, #0 + add r5, r5, #4 + add r6, r6, #1 + bl ov12_02220280 + cmp r6, r0 + blt _0222AF04 +_0222AF2C: + add r3, sp, #4 + mov r1, #0 + mov r2, #2 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #0x14] + bl sub_0200D4C4 + mov r6, #0 + ldr r0, [r4, #8] + add r1, r6, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222AF86 + add r5, r4, #0 + add r7, r6, #0 +_0222AF4E: + add r1, r4, r6 + mov r0, #0 + strb r0, [r1, #1] + ldr r0, [r5, #0x14] + mov r1, #2 + bl sub_0200D6A4 + mov r2, #0x20 + sub r2, r2, r7 + lsl r2, r2, #0x10 + ldr r0, [r5, #0x14] + mov r1, #0 + asr r2, r2, #0x10 + bl sub_0200D5DC + ldr r0, [r5, #0x14] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #8] + mov r1, #0 + add r5, r5, #4 + add r7, r7, #4 + add r6, r6, #1 + bl ov12_02220280 + cmp r6, r0 + blt _0222AF4E +_0222AF86: + mov r3, #1 + ldr r0, [sp] + ldr r1, _0222AF9C ; =ov12_0222AC70 + add r2, r4, #0 + lsl r3, r3, #0xc + bl ov12_022201CC + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222AF98: .word 0x04000052 +_0222AF9C: .word ov12_0222AC70 + thumb_func_end ov12_0222AE68 + + thumb_func_start ov12_0222AFA0 +ov12_0222AFA0: ; 0x0222AFA0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #5 + bls _0222AFB0 + b _0222B180 +_0222AFB0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222AFBC: ; jump table + .short _0222AFC8 - _0222AFBC - 2 ; case 0 + .short _0222B02A - _0222AFBC - 2 ; case 1 + .short _0222B044 - _0222AFBC - 2 ; case 2 + .short _0222B068 - _0222AFBC - 2 ; case 3 + .short _0222B0C2 - _0222AFBC - 2 ; case 4 + .short _0222B110 - _0222AFBC - 2 ; case 5 +_0222AFC8: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + bne _0222B020 + add r0, r4, #0 + add r0, #0x38 + bl ov12_02226138 + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xd + bl sub_02007DEC + mov r2, #0x38 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02008274 + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x28] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222B020: + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B02A: + mov r0, #0x1f + str r0, [sp] + mov r1, #0 + ldr r0, [r4, #0x10] + mov r2, #0xa + add r3, r1, #0 + bl sub_020086FC + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B044: + ldr r0, [r4, #0x10] + bl sub_020087B4 + cmp r0, #0 + bne _0222B072 + mov r0, #0x1f + str r0, [sp] + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #0xa + add r3, r2, #0 + bl sub_020086FC + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B068: + ldr r0, [r4, #0x10] + bl sub_020087B4 + cmp r0, #0 + beq _0222B074 +_0222B072: + b _0222B18E +_0222B074: + ldrb r0, [r4, #8] + add r0, r0, #1 + strb r0, [r4, #8] + ldrb r0, [r4, #8] + cmp r0, #3 + blo _0222B0BA + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov12_02220280 + add r5, r0, #0 + ldr r0, [r4, #0xc] + mov r1, #1 + bl ov12_02220280 + add r6, r0, #0 + ldr r0, [r4, #0xc] + mov r1, #3 + bl ov12_02220280 + str r0, [sp] + add r0, r4, #0 + lsl r1, r5, #0x10 + lsl r3, r6, #0x10 + add r0, #0x14 + asr r1, r1, #0x10 + mov r2, #0x64 + asr r3, r3, #0x10 + bl ov12_02225E68 + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B0BA: + mov r0, #1 + add sp, #4 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B0C2: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + bne _0222B106 + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x28] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222B106: + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B110: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + ldr r0, [r4, #0x10] + bne _0222B154 + mov r2, #0x14 + ldrsh r2, [r4, r2] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x28] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222B154: + mov r1, #0xc + add r2, r1, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0x10] + add r2, #0xf3 + bl sub_02007DEC + mov r2, #2 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007DEC + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222B180: + ldr r0, [r4, #0xc] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222B18E: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_0222AFA0 + + thumb_func_start ov12_0222B194 +ov12_0222B194: ; 0x0222B194 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x5c + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4, #8] + strb r0, [r4] + str r5, [r4, #0xc] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + ldr r0, [r4, #0xc] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_02223354 + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x64 + lsl r3, r6, #0x10 + add r0, #0x14 + add r2, r1, #0 + asr r3, r3, #0x10 + bl ov12_02225E68 + mov r0, #0xa + str r0, [sp] + add r0, r4, #0 + mov r2, #0 + add r0, #0x38 + mov r1, #2 + add r3, r2, #0 + bl ov12_02226108 + ldr r0, [r4, #0xc] + ldr r1, _0222B21C ; =ov12_0222AFA0 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0222B21C: .word ov12_0222AFA0 + thumb_func_end ov12_0222B194 + + thumb_func_start ov12_0222B220 +ov12_0222B220: ; 0x0222B220 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #4 + bls _0222B230 + b _0222B448 +_0222B230: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222B23C: ; jump table + .short _0222B246 - _0222B23C - 2 ; case 0 + .short _0222B2AC - _0222B23C - 2 ; case 1 + .short _0222B310 - _0222B23C - 2 ; case 2 + .short _0222B374 - _0222B23C - 2 ; case 3 + .short _0222B3D8 - _0222B23C - 2 ; case 4 +_0222B246: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #1 + bne _0222B28A + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x24] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_0222B28A: + mov r1, #0x96 + str r1, [sp] + mov r0, #0x64 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + add r0, r4, #0 + mov r2, #0x32 + add r0, #0x10 + add r3, r2, #0 + bl ov12_02225EF0 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222B2AC: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #1 + bne _0222B2F0 + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x24] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_0222B2F0: + mov r2, #0x64 + str r2, [sp] + str r2, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + mov r1, #0x32 + mov r3, #0x96 + bl ov12_02225EF0 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222B310: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #1 + bne _0222B354 + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x24] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_0222B354: + mov r2, #0x96 + mov r1, #0x64 + str r2, [sp] + str r1, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + add r3, r1, #0 + bl ov12_02225EF0 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222B374: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #1 + bne _0222B3B8 + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x24] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_0222B3B8: + mov r2, #0x64 + str r2, [sp] + str r2, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0x96 + add r0, #0x10 + add r3, r1, #0 + bl ov12_02225EF0 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222B3D8: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #1 + ldr r0, [r4, #0xc] + bne _0222B41C + mov r2, #0x10 + ldrsh r2, [r4, r2] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + ldrsh r0, [r4, r0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x24] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r3, r4, pc} +_0222B41C: + mov r1, #0xc + add r2, r1, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0xc] + add r2, #0xf3 + bl sub_02007DEC + mov r2, #2 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02007DEC + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222B448: + ldr r0, [r4, #8] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222B220 + + thumb_func_start ov12_0222B45C +ov12_0222B45C: ; 0x0222B45C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x58 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + str r5, [r4, #8] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_02223354 + str r0, [r4, #4] + mov r0, #0x32 + str r0, [sp] + mov r1, #0x64 + str r1, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + mov r2, #0x96 + add r3, r1, #0 + bl ov12_02225EF0 + ldr r0, [r4, #8] + ldr r1, _0222B4C4 ; =ov12_0222B220 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0xc + pop {r4, r5, pc} + nop +_0222B4C4: .word ov12_0222B220 + thumb_func_end ov12_0222B45C + + thumb_func_start ov12_0222B4C8 +ov12_0222B4C8: ; 0x0222B4C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + add r2, r0, #0 + ldrb r0, [r5, #1] + cmp r0, #0 + beq _0222B4E2 + cmp r0, #1 + beq _0222B5C8 + cmp r0, #2 + bne _0222B4E0 + b _0222B62A +_0222B4E0: + b _0222B65E +_0222B4E2: + ldrb r3, [r5] + mov r0, #0x1f + lsr r2, r3, #0x1f + lsl r1, r3, #0x1f + sub r1, r1, r2 + ror r1, r0 + add r0, r2, r1 + lsl r0, r0, #1 + add r1, r3, #1 + str r0, [sp, #0xc] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp, #8] + ldr r1, [sp, #0xc] + mov r0, #6 + mul r0, r1 + ldr r1, _0222B67C ; =0x0223A102 + ldrsh r2, [r1, r0] + ldr r1, [sp, #8] + sub r7, r2, r1 + mov r1, #0xa + ldrsh r3, [r5, r1] + ldr r1, _0222B680 ; =0x0223A100 + ldrsh r6, [r1, r0] + mov r1, #8 + ldrsh r2, [r5, r1] + ldr r1, _0222B684 ; =0x0223A0FE + ldrsh r4, [r1, r0] + lsl r0, r7, #0x10 + str r3, [sp] + add r1, r2, r4 + lsr r0, r0, #0x10 + add r2, r2, r6 + str r0, [sp, #4] + add r0, r5, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, #0x28 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + mov r0, #0xa + ldrsh r3, [r5, r0] + mov r0, #8 + ldrsh r2, [r5, r0] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + sub r1, r2, r4 + str r3, [sp] + sub r2, r2, r6 + str r0, [sp, #4] + add r0, r5, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, #0x4c + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + ldr r0, [sp, #0xc] + add r1, r0, #1 + mov r0, #6 + mul r0, r1 + ldr r1, _0222B67C ; =0x0223A102 + ldrsh r2, [r1, r0] + ldr r1, [sp, #8] + sub r7, r2, r1 + mov r1, #0xa + ldrsh r3, [r5, r1] + ldr r1, _0222B680 ; =0x0223A100 + ldrsh r6, [r1, r0] + mov r1, #8 + ldrsh r2, [r5, r1] + ldr r1, _0222B684 ; =0x0223A0FE + ldrsh r4, [r1, r0] + lsl r0, r7, #0x10 + str r3, [sp] + add r1, r2, r4 + lsr r0, r0, #0x10 + add r2, r2, r6 + str r0, [sp, #4] + add r0, r5, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, #0x70 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + mov r0, #0xa + ldrsh r3, [r5, r0] + mov r0, #8 + ldrsh r2, [r5, r0] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + sub r1, r2, r4 + str r3, [sp] + sub r2, r2, r6 + str r0, [sp, #4] + add r0, r5, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, #0x94 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02225BC8 + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] +_0222B5C8: + mov r0, #0 + add r7, r5, #0 + str r0, [sp, #0x10] + str r0, [sp, #0x14] + add r7, #0x28 + add r6, r5, #0 + add r4, r5, #0 +_0222B5D6: + add r0, r7, #0 + bl ov12_02225C14 + cmp r0, #0 + bne _0222B5EC + ldr r0, [sp, #0x10] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + b _0222B5FA +_0222B5EC: + mov r1, #0x28 + mov r2, #0x2a + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r4, #0x18] + bl sub_0200D4C4 +_0222B5FA: + ldr r0, [r4, #0x18] + bl sub_0200D330 + ldr r0, [sp, #0x14] + add r7, #0x24 + add r0, r0, #1 + add r6, #0x24 + add r4, r4, #4 + str r0, [sp, #0x14] + cmp r0, #4 + blt _0222B5D6 + ldr r0, [sp, #0x10] + cmp r0, #4 + bne _0222B670 + ldrb r0, [r5] + cmp r0, #9 + bne _0222B624 + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] + b _0222B670 +_0222B624: + mov r0, #0 + strb r0, [r5, #1] + b _0222B670 +_0222B62A: + ldrb r0, [r5, #4] + cmp r0, #0 + beq _0222B634 + sub r0, r0, #1 + strb r0, [r5, #4] +_0222B634: + ldrb r0, [r5, #5] + cmp r0, #0xf + bhs _0222B63E + add r0, r0, #1 + strb r0, [r5, #5] +_0222B63E: + ldrb r0, [r5, #4] + cmp r0, #0 + bne _0222B650 + ldrb r0, [r5, #5] + cmp r0, #0xf + bne _0222B650 + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] +_0222B650: + ldrb r0, [r5, #5] + ldrb r1, [r5, #4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222B688 ; =0x04000052 + strh r1, [r0] + b _0222B670 +_0222B65E: + ldr r0, [r5, #0xc] + add r1, r2, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_0222B670: + ldr r0, [r5, #0x14] + bl sub_0200C7EC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222B67C: .word 0x0223A102 +_0222B680: .word 0x0223A100 +_0222B684: .word 0x0223A0FE +_0222B688: .word 0x04000052 + thumb_func_end ov12_0222B4C8 + + thumb_func_start ov12_0222B68C +ov12_0222B68C: ; 0x0222B68C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x18] + bl ov12_0221FDE4 + mov r1, #0xb8 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4, #1] + strb r0, [r4] + ldr r0, [sp, #0x18] + str r0, [r4, #0xc] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #8] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0xa] + ldr r0, [r4, #0x10] + mov r1, #0x29 + bl sub_020080C0 + mov r1, #0xa + ldrsh r1, [r4, r1] + sub r0, r1, r0 + strh r0, [r4, #0xa] + ldr r0, [r4, #0xc] + bl ov12_022202EC + str r0, [r4, #0x14] + mov r0, #8 + strb r0, [r4, #4] + mov r1, #6 + strb r1, [r4, #5] + sub r1, r1, #7 + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl ov12_02235780 + ldrb r0, [r4, #5] + ldrb r1, [r4, #4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222B90C ; =0x04000052 + strh r1, [r0] + ldr r0, [r4, #0xc] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_02223334 + str r0, [sp, #0x20] + ldr r0, [r4, #0xc] + bl ov12_0222339C + add r7, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_02223344 + str r0, [sp, #0x1c] + mov r6, #0 + add r5, r4, #0 +_0222B72A: + ldr r0, [r4, #0xc] + add r1, r6, #0 + bl ov12_022202C0 + mov r1, #1 + str r0, [r5, #0x18] + bl sub_0200D810 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0222B72A + ldr r0, [r4, #0xc] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_0223525C + cmp r0, #3 + ldr r0, [r4, #0x18] + bne _0222B81A + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x20] + mov r1, #0x14 + bl sub_0200D474 + ldr r0, [r4, #0x24] + mov r1, #0x14 + bl sub_0200D474 + ldr r0, [r4, #0x18] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x1c] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x20] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x24] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x18] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [r4, #0xc] + bl ov12_0222332C + add r6, r0, #0 + ldr r0, [sp, #0x18] + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r5, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + add r0, r6, #0 + bl sub_02003B08 + ldr r0, [r4, #0x20] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [r4, #0xc] + bl ov12_0222332C + add r6, r0, #0 + ldr r0, [sp, #0x18] + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r5, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0xc4 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + add r0, r6, #0 + bl sub_02003B08 + b _0222B8FC +_0222B81A: + mov r1, #0x14 + bl sub_0200D474 + ldr r0, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200D474 + ldr r0, [r4, #0x20] + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x24] + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x18] + add r1, r7, #1 + bl sub_0200D460 + ldr r0, [r4, #0x1c] + add r1, r7, #1 + bl sub_0200D460 + ldr r0, [r4, #0x20] + add r1, r7, #1 + bl sub_0200D460 + ldr r0, [r4, #0x24] + add r1, r7, #1 + bl sub_0200D460 + ldr r0, [r4, #0x18] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x1c] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x20] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x24] + add r1, r7, #0 + bl sub_0200D460 + ldr r0, [r4, #0x18] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [r4, #0xc] + bl ov12_0222332C + add r6, r0, #0 + ldr r0, [sp, #0x18] + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r5, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0xc4 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + add r0, r6, #0 + bl sub_02003B08 + ldr r0, [r4, #0x20] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [r4, #0xc] + bl ov12_0222332C + add r6, r0, #0 + ldr r0, [sp, #0x18] + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r5, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + add r0, r6, #0 + bl sub_02003B08 +_0222B8FC: + ldr r0, [r4, #0xc] + ldr r1, _0222B910 ; =ov12_0222B4C8 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_0222B90C: .word 0x04000052 +_0222B910: .word ov12_0222B4C8 + thumb_func_end ov12_0222B68C + + thumb_func_start ov12_0222B914 +ov12_0222B914: ; 0x0222B914 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222B926 + cmp r0, #1 + beq _0222B980 + b _0222B9C0 +_0222B926: + ldrb r1, [r4, #2] + ldr r5, _0222B9D0 ; =0x0223A099 + mov r2, #0x64 + lsl r0, r1, #1 + add r3, r1, r0 + ldr r0, _0222B9D4 ; =0x0223A09A + ldr r1, _0222B9D8 ; =0x0223A098 + ldrb r0, [r0, r3] + ldrb r1, [r1, r3] + ldrb r3, [r5, r3] + str r0, [sp] + add r0, r4, #0 + add r0, #0xc + bl ov12_02225E68 + ldrb r0, [r4, #2] + cmp r0, #0 + ldr r0, _0222B9DC ; =0x00007FFF + bne _0222B95C + str r0, [sp] + mov r1, #0 + ldr r0, [r4, #8] + mov r2, #6 + add r3, r1, #0 + bl sub_020086FC + b _0222B96A +_0222B95C: + str r0, [sp] + mov r2, #0 + ldr r0, [r4, #8] + mov r1, #6 + add r3, r2, #0 + bl sub_020086FC +_0222B96A: + ldrb r1, [r4, #2] + mov r0, #1 + eor r0, r1 + strb r0, [r4, #2] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0222B980: + add r0, r4, #0 + add r0, #0xc + bl ov12_02225EB8 + cmp r0, #0 + bne _0222B9A8 + ldr r0, [r4, #8] + bl sub_020087B4 + cmp r0, #0 + bne _0222B9A8 + ldrb r0, [r4, #1] + cmp r0, #4 + ldrb r0, [r4] + bhs _0222B9A4 + sub r0, r0, #1 + strb r0, [r4] + b _0222B9A8 +_0222B9A4: + add r0, r0, #1 + strb r0, [r4] +_0222B9A8: + mov r1, #0xc + ldrsh r2, [r4, r1] + ldr r0, [r4, #8] + bl sub_02007DEC + mov r2, #0xe + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #0xd + bl sub_02007DEC + pop {r3, r4, r5, pc} +_0222B9C0: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222B9D0: .word 0x0223A099 +_0222B9D4: .word 0x0223A09A +_0222B9D8: .word 0x0223A098 +_0222B9DC: .word 0x00007FFF + thumb_func_end ov12_0222B914 + + thumb_func_start ov12_0222B9E0 +ov12_0222B9E0: ; 0x0222B9E0 + push {r3, r4, r5, lr} + mov r1, #0x30 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #2] + strb r0, [r4, #1] + str r5, [r4, #4] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #8] + ldr r0, [r4, #4] + ldr r1, _0222BA14 ; =ov12_0222B914 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_0222BA14: .word ov12_0222B914 + thumb_func_end ov12_0222B9E0 + + thumb_func_start ov12_0222BA18 +ov12_0222BA18: ; 0x0222BA18 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222BA2C + cmp r0, #1 + beq _0222BA66 + b _0222BABE +_0222BA2C: + ldrb r1, [r4, #1] + ldr r2, _0222BAD0 ; =0x0223A0E0 + ldr r5, _0222BAD4 ; =0x0223A0E1 + lsl r0, r1, #2 + add r3, r1, r0 + ldr r0, _0222BAD8 ; =0x0223A0E2 + ldr r1, _0222BADC ; =0x0223A0DF + ldrb r0, [r0, r3] + ldrb r1, [r1, r3] + ldrb r2, [r2, r3] + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + ldr r0, _0222BAE0 ; =0x0223A0E3 + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225EF0 + ldrb r0, [r4, #1] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0222BA66: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #0 + bne _0222BA84 + ldrb r0, [r4, #1] + cmp r0, #3 + ldrb r0, [r4] + bhs _0222BA80 + sub r0, r0, #1 + strb r0, [r4] + b _0222BA84 +_0222BA80: + add r0, r0, #1 + strb r0, [r4] +_0222BA84: + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #2 + mov r1, #4 + ldrsh r0, [r4, r0] + ldrsh r1, [r4, r1] + ldr r2, [r4, #0x24] + bl ov12_02225FD4 + mov r2, #2 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + add sp, #0xc + pop {r4, r5, pc} +_0222BABE: + ldr r0, [r4, #8] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0222BAD0: .word 0x0223A0E0 +_0222BAD4: .word 0x0223A0E1 +_0222BAD8: .word 0x0223A0E2 +_0222BADC: .word 0x0223A0DF +_0222BAE0: .word 0x0223A0E3 + thumb_func_end ov12_0222BA18 + + thumb_func_start ov12_0222BAE4 +ov12_0222BAE4: ; 0x0222BAE4 + push {r3, r4, r5, lr} + mov r1, #0x34 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + str r5, [r4, #8] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_02223354 + strh r0, [r4, #4] + ldr r0, [r4, #8] + ldr r1, _0222BB2C ; =ov12_0222BA18 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222BB2C: .word ov12_0222BA18 + thumb_func_end ov12_0222BAE4 + + thumb_func_start ov12_0222BB30 +ov12_0222BB30: ; 0x0222BB30 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #5 + bls _0222BB40 + b _0222BCA0 +_0222BB40: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222BB4C: ; jump table + .short _0222BB58 - _0222BB4C - 2 ; case 0 + .short _0222BB92 - _0222BB4C - 2 ; case 1 + .short _0222BBD4 - _0222BB4C - 2 ; case 2 + .short _0222BBFE - _0222BB4C - 2 ; case 3 + .short _0222BC20 - _0222BB4C - 2 ; case 4 + .short _0222BC5E - _0222BB4C - 2 ; case 5 +_0222BB58: + ldrb r1, [r4, #1] + ldr r2, _0222BCE0 ; =0x0223A0B8 + ldr r5, _0222BCE4 ; =0x0223A0B9 + lsl r0, r1, #2 + add r3, r1, r0 + ldr r0, _0222BCE8 ; =0x0223A0BA + ldr r1, _0222BCEC ; =0x0223A0B7 + ldrb r0, [r0, r3] + ldrb r1, [r1, r3] + ldrb r2, [r2, r3] + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + ldr r0, _0222BCF0 ; =0x0223A0BB + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225EF0 + ldrb r0, [r4, #1] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0222BB92: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #0 + bne _0222BBA4 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222BBA4: + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #0 + str r0, [sp] + mov r1, #2 + mov r2, #6 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + bl ov12_02226024 + add sp, #0xc + pop {r4, r5, pc} +_0222BBD4: + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + mov r1, #0 + add r3, r0, #0 + lsl r3, r3, #0x10 + str r1, [sp] + mov r0, #5 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x10 + add r2, r1, #0 + asr r3, r3, #0x10 + bl ov12_02225BC8 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0222BBFE: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225C14 + cmp r0, #0 + bne _0222BC10 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222BC10: + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02007DEC + add sp, #0xc + pop {r4, r5, pc} +_0222BC20: + ldrb r1, [r4, #1] + ldr r2, _0222BCE0 ; =0x0223A0B8 + ldr r5, _0222BCE4 ; =0x0223A0B9 + lsl r0, r1, #2 + add r3, r1, r0 + ldr r0, _0222BCE8 ; =0x0223A0BA + ldr r1, _0222BCEC ; =0x0223A0B7 + ldrb r0, [r0, r3] + ldrb r1, [r1, r3] + ldrb r2, [r2, r3] + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + ldr r0, _0222BCF0 ; =0x0223A0BB + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225EF0 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0222BC5E: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225F6C + cmp r0, #0 + bne _0222BC70 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222BC70: + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #1 + str r0, [sp] + mov r1, #2 + mov r2, #6 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + bl ov12_02226024 + add sp, #0xc + pop {r4, r5, pc} +_0222BCA0: + mov r2, #4 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0xc] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #0xc] + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0xc] + add r2, #0xf3 + bl sub_02007DEC + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0222BCE0: .word 0x0223A0B8 +_0222BCE4: .word 0x0223A0B9 +_0222BCE8: .word 0x0223A0BA +_0222BCEC: .word 0x0223A0B7 +_0222BCF0: .word 0x0223A0BB + thumb_func_end ov12_0222BB30 + + thumb_func_start ov12_0222BCF4 +ov12_0222BCF4: ; 0x0222BCF4 + push {r3, r4, r5, lr} + mov r1, #0x34 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + str r5, [r4, #8] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + mov r0, #2 + ldrsh r0, [r4, r0] + strh r0, [r4, #4] + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_02223354 + strh r0, [r4, #6] + ldr r0, [r4, #8] + ldr r1, _0222BD44 ; =ov12_0222BB30 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_0222BD44: .word ov12_0222BB30 + thumb_func_end ov12_0222BCF4 + + thumb_func_start ov12_0222BD48 +ov12_0222BD48: ; 0x0222BD48 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #4 + bhi _0222BE32 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222BD62: ; jump table + .short _0222BD6C - _0222BD62 - 2 ; case 0 + .short _0222BDA6 - _0222BD62 - 2 ; case 1 + .short _0222BDC4 - _0222BD62 - 2 ; case 2 + .short _0222BDDA - _0222BD62 - 2 ; case 3 + .short _0222BE14 - _0222BD62 - 2 ; case 4 +_0222BD6C: + ldr r0, [r4, #8] + bl ov12_02222354 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _0222BE44 ; =0x00007FFF + mov r1, #1 + str r0, [sp, #8] + lsl r2, r2, #0x10 + ldr r0, [r4, #4] + lsr r2, r2, #0x10 + sub r3, r1, #3 + bl sub_02003178 + mov r1, #0 + str r1, [sp] + ldr r0, [r4, #0x10] + mov r2, #0x10 + add r3, r1, #0 + bl sub_020086FC + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222BDA6: + ldr r0, [r4, #4] + bl sub_0200384C + cmp r0, #0 + bne _0222BE40 + ldr r0, [r4, #0x10] + bl sub_020087B4 + cmp r0, #0 + bne _0222BE40 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222BDC4: + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #5 + bls _0222BE40 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222BDDA: + ldr r0, [r4, #8] + bl ov12_02222354 + add r2, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0222BE44 ; =0x00007FFF + mov r1, #1 + str r0, [sp, #8] + lsl r2, r2, #0x10 + ldr r0, [r4, #4] + lsr r2, r2, #0x10 + sub r3, r1, #3 + bl sub_02003178 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0x10] + mov r1, #0x10 + add r3, r2, #0 + bl sub_020086FC + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222BE14: + ldr r0, [r4, #4] + bl sub_0200384C + cmp r0, #0 + bne _0222BE40 + ldr r0, [r4, #0x10] + bl sub_020087B4 + cmp r0, #0 + bne _0222BE40 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222BE32: + ldr r0, [r4, #8] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222BE40: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0222BE44: .word 0x00007FFF + thumb_func_end ov12_0222BD48 + + thumb_func_start ov12_0222BE48 +ov12_0222BE48: ; 0x0222BE48 + push {r3, r4, r5, lr} + mov r1, #0x14 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #8] + add r0, r5, #0 + bl ov12_0222332C + str r0, [r4, #4] + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + str r0, [r4, #0x10] + ldr r0, [r4, #8] + ldr r1, _0222BE7C ; =ov12_0222BD48 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_0222BE7C: .word ov12_0222BD48 + thumb_func_end ov12_0222BE48 + + thumb_func_start ov12_0222BE80 +ov12_0222BE80: ; 0x0222BE80 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222BE94 + cmp r0, #1 + beq _0222BF00 + b _0222BF74 +_0222BE94: + ldrb r1, [r4, #1] + ldr r2, _0222BF88 ; =0x0223A0C2 + ldr r5, _0222BF8C ; =0x0223A0C3 + lsl r0, r1, #2 + add r3, r1, r0 + ldr r0, _0222BF90 ; =0x0223A0C4 + ldr r1, _0222BF94 ; =0x0223A0C1 + ldrb r0, [r0, r3] + ldrb r1, [r1, r3] + ldrb r2, [r2, r3] + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + ldr r0, _0222BF98 ; =0x0223A0C5 + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225EF0 + ldrb r1, [r4, #1] + ldr r6, _0222BF9C ; =0x0223A0A4 + lsl r0, r1, #1 + add r5, r1, r0 + mov r0, #4 + ldrsh r3, [r4, r0] + ldr r0, _0222BFA0 ; =0x0223A0A5 + mov r1, #0 + ldrb r0, [r0, r5] + add r2, r1, #0 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, _0222BFA4 ; =0x0223A0A6 + ldrb r0, [r0, r5] + ldrb r5, [r6, r5] + str r0, [sp, #4] + add r3, r3, r5 + add r0, r4, #0 + lsl r3, r3, #0x10 + add r0, #0x34 + asr r3, r3, #0x10 + bl ov12_02225BC8 + ldrb r0, [r4, #1] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222BF00: + add r0, r4, #0 + add r0, #0x10 + mov r5, #0 + bl ov12_02225F6C + cmp r0, #0 + bne _0222BF10 + add r5, r5, #1 +_0222BF10: + add r0, r4, #0 + add r0, #0x34 + bl ov12_02225C14 + cmp r0, #0 + bne _0222BF1E + add r5, r5, #1 +_0222BF1E: + cmp r5, #2 + blt _0222BF44 + ldrb r0, [r4, #1] + cmp r0, #3 + blo _0222BF40 + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] + mov r0, #0 + strb r0, [r4, #1] + ldrb r0, [r4, #2] + cmp r0, #3 + blo _0222BF44 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222BF44 +_0222BF40: + mov r0, #0 + strb r0, [r4] +_0222BF44: + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0xd + bl sub_02007DEC + mov r0, #0 + str r0, [sp] + mov r1, #0x36 + mov r2, #6 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + bl ov12_02226024 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0222BF74: + ldr r0, [r4, #8] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0222BF88: .word 0x0223A0C2 +_0222BF8C: .word 0x0223A0C3 +_0222BF90: .word 0x0223A0C4 +_0222BF94: .word 0x0223A0C1 +_0222BF98: .word 0x0223A0C5 +_0222BF9C: .word 0x0223A0A4 +_0222BFA0: .word 0x0223A0A5 +_0222BFA4: .word 0x0223A0A6 + thumb_func_end ov12_0222BE80 + + thumb_func_start ov12_0222BFA8 +ov12_0222BFA8: ; 0x0222BFA8 + push {r3, r4, r5, lr} + mov r1, #0x58 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + str r5, [r4, #8] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #4] + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_02223354 + strh r0, [r4, #6] + ldr r0, [r4, #8] + ldr r1, _0222BFF0 ; =ov12_0222BE80 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222BFF0: .word ov12_0222BE80 + thumb_func_end ov12_0222BFA8 + + thumb_func_start ov12_0222BFF4 +ov12_0222BFF4: ; 0x0222BFF4 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222C00A + cmp r0, #1 + beq _0222C022 + cmp r0, #2 + beq _0222C042 + b _0222C084 +_0222C00A: + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #0xa + blo _0222C0A0 + mov r0, #0 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C0A0 +_0222C022: + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x10] + mov r1, #2 + bl sub_0200D810 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C0A0 +_0222C042: + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #0xa + blo _0222C0A0 + ldr r0, _0222C0B4 ; =0x0400004A + mov r1, #0x3f + ldrh r2, [r0] + bic r2, r1 + mov r1, #0x1f + orr r2, r1 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0222C0B8 ; =0xFFFFC0FF + lsl r1, r1, #8 + and r2, r3 + orr r1, r2 + strh r1, [r0] + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C0A0 +_0222C084: + mov r3, #1 + lsl r3, r3, #0x1a + ldr r1, [r3, #0] + ldr r0, _0222C0BC ; =0xFFFF1FFF + and r0, r1 + str r0, [r3, #0] + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} +_0222C0A0: + ldr r0, [r4, #0xc] + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200D330 + ldr r0, [r4, #8] + bl sub_0200C7EC + pop {r4, pc} + ; .align 2, 0 +_0222C0B4: .word 0x0400004A +_0222C0B8: .word 0xFFFFC0FF +_0222C0BC: .word 0xFFFF1FFF + thumb_func_end ov12_0222BFF4 + + thumb_func_start ov12_0222C0C0 +ov12_0222C0C0: ; 0x0222C0C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + mov r1, #0x14 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #4] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #8] + ldr r0, [r4, #4] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0xc] + ldr r0, [r4, #4] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x10] + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _0222C198 ; =0xFFFF1FFF + and r2, r1 + lsr r1, r0, #0xb + orr r1, r2 + str r1, [r0, #0] + add r0, #0x4a + ldrh r2, [r0] + mov r1, #0x3f + bic r2, r1 + mov r1, #0x1f + orr r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _0222C19C ; =0xFFFFC0FF + and r2, r1 + mov r1, #0x12 + lsl r1, r1, #8 + orr r1, r2 + strh r1, [r0] + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02223334 + add r7, r0, #0 + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02223344 + str r0, [sp, #0x18] + ldr r0, [r4, #0xc] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov12_0222332C + str r0, [sp, #0x1c] + add r0, r5, #0 + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r1, #0x20 + lsl r0, r6, #0x14 + str r1, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r1, #0xe0 + str r1, [sp, #0xc] + str r1, [sp, #0x10] + str r1, [sp, #0x14] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + add r2, r7, #0 + bl sub_02003B08 + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #4] + ldr r1, _0222C1A0 ; =ov12_0222BFF4 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222C198: .word 0xFFFF1FFF +_0222C19C: .word 0xFFFFC0FF +_0222C1A0: .word ov12_0222BFF4 + thumb_func_end ov12_0222C0C0 + + thumb_func_start ov12_0222C1A4 +ov12_0222C1A4: ; 0x0222C1A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bls _0222C1B4 + b _0222C396 +_0222C1B4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222C1C0: ; jump table + .short _0222C1C8 - _0222C1C0 - 2 ; case 0 + .short _0222C1DA - _0222C1C0 - 2 ; case 1 + .short _0222C2F2 - _0222C1C0 - 2 ; case 2 + .short _0222C32A - _0222C1C0 - 2 ; case 3 +_0222C1C8: + ldr r0, [r4, #0xc] + mov r1, #0xe + mov r2, #1 + bl sub_02007DEC + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C3B2 +_0222C1DA: + mov r0, #0 + add r6, r4, #0 + ldr r7, _0222C3BC ; =0x0223A094 + str r0, [sp, #0x10] + str r0, [sp, #0x14] + add r5, r4, #0 + add r6, #0x20 +_0222C1E8: + ldrb r0, [r5, #0x18] + cmp r0, #0 + beq _0222C1F4 + cmp r0, #1 + beq _0222C222 + b _0222C270 +_0222C1F4: + ldrb r0, [r5, #0x19] + add r0, r0, #1 + strb r0, [r5, #0x19] + ldrb r1, [r5, #0x19] + ldrb r0, [r7] + cmp r1, r0 + blo _0222C276 + mov r0, #5 + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + mov r0, #5 + mov r1, #0x64 + str r0, [sp, #8] + add r0, r6, #0 + mov r2, #5 + add r3, r1, #0 + bl ov12_02225EF0 + ldrb r0, [r5, #0x18] + add r0, r0, #1 + strb r0, [r5, #0x18] + b _0222C276 +_0222C222: + add r0, r6, #0 + bl ov12_02225F6C + cmp r0, #0 + bne _0222C234 + ldrb r0, [r5, #0x18] + add r0, r0, #1 + strb r0, [r5, #0x18] + b _0222C276 +_0222C234: + add r0, r6, #0 + add r1, sp, #0x28 + add r2, sp, #0x24 + bl ov12_02225FA4 + mov r0, #8 + ldrsb r0, [r4, r0] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, [sp, #0x28] + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [r5, #0x1c] + ldr r2, [sp, #0x24] + bl sub_0200D6E8 + mov r0, #0 + str r0, [sp] + mov r1, #2 + ldr r2, [r4, #4] + ldrsh r1, [r4, r1] + lsl r2, r2, #0x10 + ldr r0, [r5, #0x1c] + ldr r3, [r5, #0x34] + asr r2, r2, #0x10 + bl ov12_0222605C + b _0222C276 +_0222C270: + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] +_0222C276: + ldr r0, [r5, #0x1c] + bl sub_0200D330 + ldr r0, [sp, #0x14] + add r5, #0x2c + add r0, r0, #1 + add r7, r7, #1 + add r6, #0x2c + str r0, [sp, #0x14] + cmp r0, #3 + blt _0222C1E8 + ldr r0, [sp, #0x10] + cmp r0, #3 + bge _0222C294 + b _0222C3B2 +_0222C294: + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #3 + bhs _0222C2EA + mov r6, #0 + add r5, r4, #0 + add r7, r6, #0 +_0222C2A6: + add r1, sp, #0x18 + ldr r0, [r5, #0x1c] + add r1, #2 + add r2, sp, #0x18 + bl sub_0200D550 + add r2, sp, #0x18 + mov r1, #2 + ldrsh r1, [r2, r1] + mov r2, #2 + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x1c] + bl sub_0200D4C4 + mov r0, #8 + ldrsb r0, [r4, r0] + bl sub_020E17B4 + add r1, r0, #0 + mov r2, #0xfe + ldr r0, [r5, #0x1c] + lsl r2, r2, #0x16 + bl sub_0200D6E8 + strb r7, [r5, #0x18] + strb r7, [r5, #0x19] + add r6, r6, #1 + add r5, #0x2c + cmp r6, #3 + blt _0222C2A6 + ldrb r0, [r4] + sub r0, r0, #1 + strb r0, [r4] + b _0222C3B2 +_0222C2EA: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C3B2 +_0222C2F2: + add r5, r4, #0 + mov r7, #0 + add r6, r4, #0 + add r5, #0x20 +_0222C2FA: + ldr r0, [r6, #0x1c] + mov r1, #0 + bl sub_0200D810 + mov r0, #0x64 + str r0, [sp] + str r0, [sp, #4] + mov r0, #5 + mov r1, #5 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #0x64 + add r3, r1, #0 + bl ov12_02225EF0 + add r7, r7, #1 + add r6, #0x2c + add r5, #0x2c + cmp r7, #3 + blt _0222C2FA + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C3B2 +_0222C32A: + mov r7, #0 + add r6, r4, #0 + str r7, [sp, #0xc] + add r6, #0x20 + add r5, r4, #0 +_0222C334: + add r0, r6, #0 + bl ov12_02225F6C + cmp r0, #0 + bne _0222C342 + add r7, r7, #1 + b _0222C37C +_0222C342: + add r0, r6, #0 + add r1, sp, #0x20 + add r2, sp, #0x1c + bl ov12_02225FA4 + mov r0, #8 + ldrsb r0, [r4, r0] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, [sp, #0x20] + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [r5, #0x1c] + ldr r2, [sp, #0x1c] + bl sub_0200D6E8 + mov r0, #0 + str r0, [sp] + mov r1, #2 + ldr r2, [r4, #4] + ldrsh r1, [r4, r1] + lsl r2, r2, #0x10 + ldr r0, [r5, #0x1c] + ldr r3, [r5, #0x34] + asr r2, r2, #0x10 + bl ov12_0222605C +_0222C37C: + ldr r0, [sp, #0xc] + add r6, #0x2c + add r0, r0, #1 + add r5, #0x2c + str r0, [sp, #0xc] + cmp r0, #3 + blt _0222C334 + cmp r7, #3 + blt _0222C3B2 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222C3B2 +_0222C396: + ldr r0, [r4, #0xc] + mov r1, #0xe + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0x10] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} +_0222C3B2: + ldr r0, [r4, #0x14] + bl sub_0200C7EC + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222C3BC: .word 0x0223A094 + thumb_func_end ov12_0222C1A4 + + thumb_func_start ov12_0222C3C0 +ov12_0222C3C0: ; 0x0222C3C0 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x9c + str r0, [sp] + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + ldr r0, [sp] + str r0, [r4, #0x10] + bl ov12_022202EC + str r0, [r4, #0x14] + ldr r0, [r4, #0x10] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + ldr r0, [r4, #0xc] + mov r1, #0x29 + bl sub_020080C0 + mov r1, #2 + ldrsh r1, [r4, r1] + sub r0, r1, r0 + strh r0, [r4, #2] + ldr r0, [r4, #0x10] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl ov12_02223354 + mov r1, #0 + str r0, [r4, #4] + mvn r1, r1 + ldr r0, [r4, #0x10] + add r2, r1, #0 + bl ov12_02235780 + mov r6, #0 + ldr r1, _0222C49C ; =0x0000060C + ldr r0, _0222C4A0 ; =0x04000052 + add r5, r4, #0 + strh r1, [r0] + add r7, r6, #0 +_0222C42C: + strb r7, [r5, #0x18] + strb r7, [r5, #0x19] + ldr r0, [r4, #0x10] + add r1, r6, #0 + bl ov12_022202C0 + str r0, [r5, #0x1c] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r5, #0x1c] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x1c] + add r1, r6, #1 + bl sub_0200D474 + add r6, r6, #1 + add r5, #0x2c + cmp r6, #3 + blt _0222C42C + ldr r0, [sp] + mov r1, #0 + bl ov12_022234A8 + cmp r0, #1 + bne _0222C46A + mov r0, #0 + mvn r0, r0 + b _0222C46C +_0222C46A: + mov r0, #1 +_0222C46C: + strb r0, [r4, #8] + mov r6, #0 + add r5, r4, #0 + mov r7, #8 +_0222C474: + ldrsb r0, [r4, r7] + bl sub_020E17B4 + add r1, r0, #0 + mov r2, #0xfe + ldr r0, [r5, #0x1c] + lsl r2, r2, #0x16 + bl sub_0200D6E8 + add r6, r6, #1 + add r5, #0x2c + cmp r6, #3 + blt _0222C474 + ldr r0, [r4, #0x10] + ldr r1, _0222C4A4 ; =ov12_0222C1A4 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222C49C: .word 0x0000060C +_0222C4A0: .word 0x04000052 +_0222C4A4: .word ov12_0222C1A4 + thumb_func_end ov12_0222C3C0 + + thumb_func_start ov12_0222C4A8 +ov12_0222C4A8: ; 0x0222C4A8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bls _0222C4B8 + b _0222C5E2 +_0222C4B8: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222C4C4: ; jump table + .short _0222C4CC - _0222C4C4 - 2 ; case 0 + .short _0222C4FE - _0222C4C4 - 2 ; case 1 + .short _0222C512 - _0222C4C4 - 2 ; case 2 + .short _0222C56E - _0222C4C4 - 2 ; case 3 +_0222C4CC: + ldr r0, [r4, #0xc] + bl ov12_0222332C + add r5, r0, #0 + ldr r0, [r4, #0xc] + bl ov12_02222354 + add r2, r0, #0 + mov r1, #0 + lsl r2, r2, #0x10 + str r1, [sp] + mov r0, #0xa + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #1 + add r0, r5, #0 + lsr r2, r2, #0x10 + add r3, r1, #0 + bl sub_02003178 + ldrb r0, [r4] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, r7, pc} +_0222C4FE: + ldr r0, [r4, #0xc] + bl ov12_0222332C + bl sub_0200384C + cmp r0, #0 + bne _0222C5F0 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222C512: + mov r0, #5 + str r0, [sp] + ldrb r1, [r4, #1] + add r0, r4, #0 + add r0, #0xb4 + lsl r2, r1, #1 + ldr r1, _0222C5F4 ; =0x0223A0EE + ldrsh r1, [r1, r2] + mov r2, #0 + add r3, r2, #0 + bl ov12_02226108 + ldrb r0, [r4, #2] + cmp r0, #0 + ldr r0, [r4, #0xc] + bne _0222C544 + bl ov12_0222332C + mov r1, #0 + mov r2, #0xff + mov r3, #0xa + str r1, [sp] + bl sub_02003A2C + b _0222C556 +_0222C544: + bl ov12_0222332C + ldr r1, _0222C5F8 ; =0x00007FFF + mov r2, #0xff + str r1, [sp] + mov r1, #0 + mov r3, #0xa + bl sub_02003A2C +_0222C556: + mov r0, #3 + strb r0, [r4, #3] + ldrb r1, [r4, #2] + mov r0, #1 + eor r0, r1 + strb r0, [r4, #2] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222C56E: + add r0, r4, #0 + add r0, #0xb4 + bl ov12_02226138 + cmp r0, #0 + bne _0222C58C + ldrb r0, [r4, #1] + cmp r0, #8 + ldrb r0, [r4] + blo _0222C588 + add r0, r0, #1 + strb r0, [r4] + b _0222C58C +_0222C588: + sub r0, r0, #1 + strb r0, [r4] +_0222C58C: + ldrb r0, [r4, #3] + cmp r0, #0 + beq _0222C5AE + sub r0, r0, #1 + strb r0, [r4, #3] + ldrb r0, [r4, #3] + cmp r0, #0 + bne _0222C5AE + ldr r0, [r4, #0xc] + bl ov12_0222332C + mov r1, #0 + mov r2, #0xff + add r3, r1, #0 + str r1, [sp] + bl sub_02003A2C +_0222C5AE: + mov r6, #0 + add r5, r4, #0 + mov r7, #0x14 +_0222C5B4: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _0222C5C8 + mov r2, #0xb4 + ldrsh r3, [r4, r2] + ldrsh r2, [r5, r7] + mov r1, #0 + add r2, r3, r2 + bl sub_02007DEC +_0222C5C8: + add r6, r6, #1 + add r5, #0x14 + cmp r6, #4 + blt _0222C5B4 + mov r3, #0xb4 + ldrsh r3, [r4, r3] + ldr r0, [r4, #8] + mov r1, #3 + mov r2, #0 + bl sub_02019184 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0222C5E2: + ldr r0, [r4, #0xc] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222C5F0: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222C5F4: .word 0x0223A0EE +_0222C5F8: .word 0x00007FFF + thumb_func_end ov12_0222C4A8 + + thumb_func_start ov12_0222C5FC +ov12_0222C5FC: ; 0x0222C5FC + push {r3, r4, r5, r6, r7, lr} + mov r1, #0xd8 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + str r5, [r4, #0xc] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + bl ov12_02220278 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + bl ov12_02223364 + cmp r0, #1 + bne _0222C62E + mov r1, #0x40 + b _0222C630 +_0222C62E: + mov r1, #0xa +_0222C630: + add r2, r4, #0 + add r0, r5, #0 + add r2, #0x14 + add r3, r4, #4 + bl ov12_02235998 + ldr r0, [r4, #4] + mov r6, #0 + cmp r0, #0 + ble _0222C666 + add r5, r4, #0 + add r7, r6, #0 +_0222C648: + ldr r0, [r5, #0x1c] + add r1, r7, #0 + bl sub_020080C0 + strh r0, [r5, #0x14] + ldr r0, [r5, #0x1c] + mov r1, #1 + bl sub_020080C0 + strh r0, [r5, #0x16] + ldr r0, [r4, #4] + add r6, r6, #1 + add r5, #0x14 + cmp r6, r0 + blt _0222C648 +_0222C666: + ldr r0, [r4, #0xc] + ldr r1, _0222C674 ; =ov12_0222C4A8 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222C674: .word ov12_0222C4A8 + thumb_func_end ov12_0222C5FC + + thumb_func_start ov12_0222C678 +ov12_0222C678: ; 0x0222C678 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + bne _0222C6C2 + add r0, r4, #0 + add r0, #0x40 + bl ov12_02225C14 + cmp r0, #0 + bne _0222C696 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222C696: + add r0, r4, #0 + add r0, #0x1c + bl ov12_02226138 + add r0, r4, #0 + add r0, #0x64 + bl ov12_02226454 + mov r1, #0x40 + mov r2, #0x42 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + bl sub_0200D4C4 + ldr r0, [r4, #0x18] + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200C7EC + pop {r4, pc} +_0222C6C2: + ldr r0, [r4, #0xc] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222C678 + + thumb_func_start ov12_0222C6D4 +ov12_0222C6D4: ; 0x0222C6D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x8c + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + str r5, [r4, #0xc] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + bl ov12_02220278 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x18] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + cmp r0, #0 + ldr r0, [r4, #0xc] + bne _0222C718 + bl ov12_02220248 + b _0222C71C +_0222C718: + bl ov12_02220240 +_0222C71C: + add r6, r0, #0 + ldr r0, [r4, #0xc] + add r1, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x14] + add r1, r4, #4 + bl ov12_02235918 + ldr r0, [r4, #0x14] + mov r1, #0x29 + bl sub_020080C0 + mov r1, #6 + ldrsh r1, [r4, r1] + sub r0, r1, r0 + strh r0, [r4, #6] + ldr r0, [r4, #0xc] + add r1, r6, #0 + bl ov12_02225964 + add r7, r0, #0 + ldr r0, [r4, #0xc] + add r1, r6, #0 + bl ov12_0222598C + add r6, r0, #0 + mov r0, #6 + ldrsh r3, [r4, r0] + mov r0, #4 + ldrsh r1, [r4, r0] + mov r2, #0x14 + add r0, r6, #0 + mul r0, r2 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + str r2, [sp, #4] + sub r2, #0x28 + mul r2, r7 + add r2, r1, r2 + add r0, r4, #0 + lsl r2, r2, #0x10 + add r0, #0x40 + asr r2, r2, #0x10 + bl ov12_02225BC8 + add r0, r5, #0 + mov r1, #2 + bl ov12_022233EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov12_022233EC + mov r5, #1 + add r3, r5, #0 + lsl r3, r6 + add r1, r0, #0 + add r6, r3, #0 + mov r2, #0x20 + add r3, r5, #0 + orr r6, r2 + lsl r3, r1 + add r1, r6, #0 + orr r1, r3 + sub r2, #0x21 + ldr r0, [r4, #0xc] + orr r1, r5 + add r3, r2, #0 + bl ov12_022357BC + mov r1, #0x1f + mov r2, #0 + str r1, [sp] + mov r0, #0xf + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x64 + add r3, r2, #0 + bl ov12_02226424 + ldr r0, [r4, #0x18] + add r1, r5, #0 + bl sub_0200D810 + ldr r0, [r4, #0xc] + ldr r1, _0222C7DC ; =ov12_0222C678 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222C7DC: .word ov12_0222C678 + thumb_func_end ov12_0222C6D4 + + thumb_func_start ov12_0222C7E0 +ov12_0222C7E0: ; 0x0222C7E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222C7F2 + cmp r0, #1 + beq _0222C832 + b _0222C862 +_0222C7F2: + ldrb r0, [r4, #1] + cmp r0, #0 + ldrb r0, [r4, #2] + bne _0222C804 + lsl r3, r0, #3 + ldr r0, _0222C87C ; =0x0223A118 + ldr r2, [r0, r3] + neg r1, r2 + b _0222C80C +_0222C804: + lsl r3, r0, #3 + ldr r0, _0222C87C ; =0x0223A118 + ldr r1, [r0, r3] + neg r2, r1 +_0222C80C: + ldr r5, _0222C880 ; =0x0223A11C + add r0, r4, #0 + ldr r3, [r5, r3] + add r0, #0x5c + bl ov12_02225D50 + ldrb r0, [r4, #1] + cmp r0, #1 + bne _0222C824 + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] +_0222C824: + ldrb r1, [r4, #1] + mov r0, #1 + eor r0, r1 + strb r0, [r4, #1] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222C832: + add r0, r4, #0 + add r0, #0x5c + bl ov12_02225DA0 + cmp r0, #1 + bne _0222C84E + ldr r2, [r4, #0x5c] + ldr r0, [r4, #0x28] + lsl r2, r2, #0x10 + mov r1, #9 + lsr r2, r2, #0x10 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_0222C84E: + ldrb r0, [r4, #2] + cmp r0, #5 + ldrb r0, [r4] + blo _0222C85C + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0222C85C: + sub r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0222C862: + ldr r0, [r4, #0x28] + mov r1, #9 + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222C87C: .word 0x0223A118 +_0222C880: .word 0x0223A11C + thumb_func_end ov12_0222C7E0 + + thumb_func_start ov12_0222C884 +ov12_0222C884: ; 0x0222C884 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222C898 + cmp r0, #1 + beq _0222C8BC + b _0222C8E6 +_0222C898: + mov r0, #0x22 + ldrsh r0, [r4, r0] + mov r1, #0x1c + mov r2, #0x1e + str r0, [sp] + mov r3, #0x20 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + add r0, #0x38 + bl ov12_02226108 + ldrb r0, [r4] + add sp, #8 + add r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_0222C8BC: + ldr r0, [r4, #0x2c] + add r1, sp, #4 + bl ov12_02235918 + add r0, r4, #0 + add r3, sp, #4 + mov r1, #0 + mov r2, #2 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r3, [r4, #0x2c] + add r0, #0x38 + bl ov12_0222619C + cmp r0, #0 + bne _0222C8F4 + ldrb r0, [r4] + add sp, #8 + add r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_0222C8E6: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222C8F4: + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_0222C884 + + thumb_func_start ov12_0222C8F8 +ov12_0222C8F8: ; 0x0222C8F8 + push {r4, r5, r6, lr} + mov r1, #0x70 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0x28] + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0x2c] + ldr r0, [r4, #0x28] + mov r1, #0xb + mov r2, #0x64 + bl sub_02007DEC + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0x1c] + add r0, r5, #0 + mov r1, #2 + bl ov12_02220280 + strh r0, [r4, #0x1e] + add r0, r5, #0 + mov r1, #3 + bl ov12_02220280 + strh r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #4 + bl ov12_02220280 + strh r0, [r4, #0x22] + add r0, r5, #0 + mov r1, #5 + bl ov12_02220280 + str r0, [r4, #0x24] + cmp r6, #0 + ldr r0, [r4, #4] + bne _0222C982 + ldr r1, _0222C98C ; =ov12_0222C7E0 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} +_0222C982: + ldr r1, _0222C990 ; =ov12_0222C884 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222C98C: .word ov12_0222C7E0 +_0222C990: .word ov12_0222C884 + thumb_func_end ov12_0222C8F8 + + thumb_func_start ov12_0222C994 +ov12_0222C994: ; 0x0222C994 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r2, r0, #0 + ldrb r0, [r5] + cmp r0, #0 + beq _0222C9A6 + cmp r0, #1 + beq _0222C9C8 + b _0222CA1C +_0222C9A6: + ldr r2, [r5, #0x48] + mov r0, #0xa + add r1, r2, #2 + str r0, [sp] + add r0, r5, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, #0x4c + asr r1, r1, #0x10 + asr r2, r2, #0x10 + mov r3, #0 + bl ov12_02226108 + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_0222C9C8: + add r0, r5, #0 + add r0, #0x4c + bl ov12_02226138 + cmp r0, #0 + bne _0222C9DC + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_0222C9DC: + mov r6, #0 + add r4, r5, #0 + mov r7, #0x28 +_0222C9E2: + ldr r0, [r4, #0x38] + cmp r0, #0 + beq _0222C9F6 + mov r2, #0x4c + ldrsh r3, [r5, r2] + ldrsh r2, [r4, r7] + mov r1, #0 + add r2, r3, r2 + bl sub_02007DEC +_0222C9F6: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0222C9E2 + mov r3, #0x4c + ldrsh r3, [r5, r3] + ldr r0, [r5, #0x14] + mov r1, #3 + mov r2, #0 + bl sub_02019184 + mov r3, #0x4e + mov r1, #3 + ldrsh r3, [r5, r3] + ldr r0, [r5, #0x14] + add r2, r1, #0 + bl sub_02019184 + pop {r3, r4, r5, r6, r7, pc} +_0222CA1C: + ldr r0, [r5, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_0222C994 + + thumb_func_start ov12_0222CA2C +ov12_0222CA2C: ; 0x0222CA2C + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x70 + add r4, r0, #0 + bl ov12_02235E50 + add r7, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov12_0223595C + ldr r0, [r7, #4] + mov r1, #1 + bl ov12_02220540 + cmp r0, #0x46 + bgt _0222CA5C + bge _0222CA7E + cmp r0, #0x1e + bgt _0222CA56 + beq _0222CA8A + b _0222CA90 +_0222CA56: + cmp r0, #0x32 + beq _0222CA84 + b _0222CA90 +_0222CA5C: + cmp r0, #0x6e + bgt _0222CA68 + bge _0222CA72 + cmp r0, #0x5a + beq _0222CA78 + b _0222CA90 +_0222CA68: + cmp r0, #0x96 + bne _0222CA90 + mov r0, #6 + str r0, [r7, #0x48] + b _0222CA94 +_0222CA72: + mov r0, #5 + str r0, [r7, #0x48] + b _0222CA94 +_0222CA78: + mov r0, #4 + str r0, [r7, #0x48] + b _0222CA94 +_0222CA7E: + mov r0, #3 + str r0, [r7, #0x48] + b _0222CA94 +_0222CA84: + mov r0, #2 + str r0, [r7, #0x48] + b _0222CA94 +_0222CA8A: + mov r0, #1 + str r0, [r7, #0x48] + b _0222CA94 +_0222CA90: + mov r0, #0 + str r0, [r7, #0x48] +_0222CA94: + add r5, r7, #0 + mov r6, #0 + add r4, r7, #0 + add r5, #0x28 +_0222CA9C: + ldr r0, [r7, #4] + add r1, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x38] + cmp r0, #0 + beq _0222CAB0 + add r1, r5, #0 + bl ov12_02235918 +_0222CAB0: + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #4 + blt _0222CA9C + ldr r0, [r7, #4] + ldr r1, _0222CAC8 ; =ov12_0222C994 + add r2, r7, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222CAC8: .word ov12_0222C994 + thumb_func_end ov12_0222CA2C + + thumb_func_start ov12_0222CACC +ov12_0222CACC: ; 0x0222CACC + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222CAE0 + cmp r0, #1 + beq _0222CB0E + b _0222CB7C +_0222CAE0: + mov r0, #0xa + str r0, [sp] + add r0, r4, #0 + mov r2, #0 + add r0, #0x40 + mov r1, #0x14 + add r3, r2, #0 + bl ov12_02226108 + mov r0, #0xa + str r0, [sp] + add r0, r4, #0 + mov r2, #0 + add r0, #0x64 + mov r1, #2 + add r3, r2, #0 + bl ov12_02226108 + ldrb r0, [r4] + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, pc} +_0222CB0E: + add r0, r4, #0 + add r0, #0x40 + bl ov12_02226138 + cmp r0, #0 + bne _0222CB22 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222CB72 +_0222CB22: + mov r1, #0x2c + ldrsh r2, [r4, r1] + mov r1, #0x40 + ldrsh r1, [r4, r1] + ldr r0, [r4, #0x38] + add r1, r2, r1 + mov r2, #0x2e + ldrsh r3, [r4, r2] + mov r2, #0x42 + ldrsh r2, [r4, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r1, #0x40 + ldrsh r2, [r4, r1] + mov r1, #0x2c + ldrsh r1, [r4, r1] + ldr r0, [r4, #0x3c] + sub r1, r2, r1 + mov r2, #0x2e + ldrsh r3, [r4, r2] + mov r2, #0x42 + ldrsh r2, [r4, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #0x38] + bl sub_0200D330 + ldr r0, [r4, #0x3c] + bl sub_0200D330 +_0222CB72: + ldr r0, [r4, #0xc] + bl sub_0200C7EC + add sp, #4 + pop {r3, r4, pc} +_0222CB7C: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0222CACC + + thumb_func_start ov12_0222CB90 +ov12_0222CB90: ; 0x0222CB90 + push {r3, r4, r5, lr} + mov r1, #0x88 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r0, [r4, #4] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x38] + ldr r0, [r4, #4] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x3c] + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0x30] + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0x34] + add r1, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0x28 + bl ov12_02235918 + add r1, r4, #0 + ldr r0, [r4, #0x34] + add r1, #0x2c + bl ov12_02235918 + ldr r0, [r4, #4] + ldr r1, _0222CBF8 ; =ov12_0222CACC + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222CBF8: .word ov12_0222CACC + thumb_func_end ov12_0222CB90 + + thumb_func_start ov12_0222CBFC +ov12_0222CBFC: ; 0x0222CBFC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + ldr r2, [r4, #0x38] + add r0, #0x8c + add r1, #0xb0 + bl ov12_02225D2C + cmp r0, #0 + bne _0222CC28 + ldr r0, [r4, #0x38] + bl sub_0200D0F4 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl ov12_02235E80 + pop {r3, r4, r5, pc} +_0222CC28: + add r0, r4, #0 + add r0, #0xd4 + bl ov12_02225DA0 + cmp r0, #1 + bne _0222CC44 + add r1, r4, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + ldr r0, [r4, #0x38] + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0200D79C +_0222CC44: + ldr r0, [r4, #0x38] + bl sub_0200D330 + ldr r0, [r4, #0x20] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222CBFC + + thumb_func_start ov12_0222CC54 +ov12_0222CC54: ; 0x0222CC54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0xe8 + add r6, r0, #0 + add r7, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x10 + bl ov12_0223595C + add r0, r6, #0 + mov r1, #0 + bl ov12_02220280 + strh r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #1 + bl ov12_02220280 + strh r0, [r4, #0xe] + add r0, r6, #0 + mov r1, #2 + bl ov12_02220280 + str r0, [r4, #4] + add r0, r6, #0 + mov r1, #3 + bl ov12_02220280 + str r0, [r4, #8] + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_02225964 + add r5, r0, #0 + add r0, r7, #0 + mov r1, #2 + str r7, [r4, #0x38] + bl sub_0200D6A4 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x44] + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x58] + add r1, r4, #0 + ldr r0, [r4, #0x44] + add r1, #0x40 + bl ov12_02235918 + add r1, r4, #0 + ldr r0, [r4, #0x58] + add r1, #0x54 + bl ov12_02235918 + mov r0, #0x42 + ldrsh r0, [r4, r0] + mov r3, #0x54 + str r0, [sp] + mov r0, #0x56 + ldrsh r2, [r4, r0] + mov r0, #0xe + ldrsh r0, [r4, r0] + add r1, r0, #0 + mul r1, r5 + add r0, r2, r1 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #4] + add r1, r4, #0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #8] + mov r2, #0x40 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldrsh r3, [r4, r3] + add r0, r4, #0 + ldrsh r2, [r4, r2] + mov ip, r3 + mov r3, #0xc + ldrsh r3, [r4, r3] + add r0, #0x8c + add r1, #0xb0 + add r7, r3, #0 + mul r7, r5 + mov r3, ip + add r3, r3, r7 + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + bl ov12_02225C98 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232B8 + cmp r0, #4 + bne _0222CD5C + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232B8 + cmp r0, #2 + bne _0222CD5C + mov r0, #0 + mvn r0, r0 + mul r5, r0 +_0222CD5C: + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232B8 + cmp r0, #5 + bne _0222CD86 + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232B8 + cmp r0, #3 + bne _0222CD86 + mov r0, #0 + mvn r0, r0 + mul r5, r0 +_0222CD86: + cmp r5, #0 + ldr r2, _0222CDE0 ; =0x00005C71 + ble _0222CD9E + ldr r1, _0222CDE4 ; =0x00000E38 + add r0, r4, #0 + add r0, #0xd4 + mul r1, r5 + mul r2, r5 + mov r3, #0xa + bl ov12_02225D50 + b _0222CDAE +_0222CD9E: + ldr r1, _0222CDE8 ; =0x00003FFF + add r0, r4, #0 + add r0, #0xd4 + mul r1, r5 + mul r2, r5 + mov r3, #0xa + bl ov12_02225D50 +_0222CDAE: + add r1, r4, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + ldr r0, [r4, #0x38] + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0200D79C + add r0, r4, #0 + add r1, r4, #0 + ldr r2, [r4, #0x38] + add r0, #0x8c + add r1, #0xb0 + bl ov12_02225D2C + ldr r0, [r4, #0x38] + bl sub_0200D330 + ldr r0, [r4, #0x14] + ldr r1, _0222CDEC ; =ov12_0222CBFC + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222CDE0: .word 0x00005C71 +_0222CDE4: .word 0x00000E38 +_0222CDE8: .word 0x00003FFF +_0222CDEC: .word ov12_0222CBFC + thumb_func_end ov12_0222CC54 + + thumb_func_start ov12_0222CDF0 +ov12_0222CDF0: ; 0x0222CDF0 + push {r4, r5, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x18] + cmp r0, #3 + bls _0222CE00 + b _0222CF6C +_0222CE00: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222CE0C: ; jump table + .short _0222CE14 - _0222CE0C - 2 ; case 0 + .short _0222CE44 - _0222CE0C - 2 ; case 1 + .short _0222CEE4 - _0222CE0C - 2 ; case 2 + .short _0222CEF6 - _0222CE0C - 2 ; case 3 +_0222CE14: + mov r0, #0x12 + ldrsh r2, [r4, r0] + mov r0, #0x96 + mov r3, #0x3c + str r0, [sp] + mov r1, #0x64 + str r1, [sp, #4] + mov r0, #0xc + mul r1, r2 + mul r3, r2 + lsl r2, r3, #0x10 + str r0, [sp, #8] + add r0, r4, #0 + lsl r1, r1, #0x10 + add r0, #0x9c + asr r1, r1, #0x10 + asr r2, r2, #0x10 + mov r3, #5 + bl ov12_02225EF0 + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] + b _0222CF8A +_0222CE44: + add r0, r4, #0 + add r0, #0x9c + bl ov12_02225F6C + cmp r0, #0 + bne _0222CE82 + mov r0, #0x12 + ldrsh r2, [r4, r0] + mov r0, #0xa + mov r1, #0x3c + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + mov r0, #0xc + mul r1, r2 + str r0, [sp, #8] + add r0, r4, #0 + lsl r1, r1, #0x10 + mov r3, #0x96 + add r5, r2, #0 + mul r5, r3 + lsl r2, r5, #0x10 + add r0, #0x9c + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02225EF0 + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] + b _0222CF8A +_0222CE82: + add r0, r4, #0 + add r0, #0x9c + add r1, sp, #0x18 + add r2, sp, #0x14 + bl ov12_02225FA4 + ldr r0, [r4, #0x40] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x14] + bl sub_0200D6E8 + mov r0, #0x16 + add r2, r4, #0 + add r2, #0xb0 + ldrsh r0, [r4, r0] + ldr r2, [r2, #0] + mov r1, #0x10 + bl ov12_02225FD4 + mov r2, #0x16 + add r3, r0, #0 + ldrsh r2, [r4, r2] + mov r1, #0x14 + ldrsh r1, [r4, r1] + add r2, r2, r3 + lsl r2, r2, #0x10 + ldr r0, [r4, #0x40] + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldrb r1, [r4, #0xc] + ldrb r0, [r4, #0x10] + cmp r1, r0 + bhs _0222CECA + add r0, r1, #1 + strb r0, [r4, #0xc] +_0222CECA: + ldrb r1, [r4, #0xd] + ldrb r0, [r4, #0x11] + cmp r1, r0 + bls _0222CED6 + sub r0, r1, #1 + strb r0, [r4, #0xd] +_0222CED6: + ldrb r0, [r4, #0xd] + ldrb r1, [r4, #0xc] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222CF9C ; =0x04000052 + strh r1, [r0] + b _0222CF8A +_0222CEE4: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #4 + blt _0222CF8A + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] + b _0222CF8A +_0222CEF6: + add r0, r4, #0 + add r0, #0x9c + bl ov12_02225F6C + cmp r0, #0 + bne _0222CF0A + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] + b _0222CF8A +_0222CF0A: + add r0, r4, #0 + add r0, #0x9c + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov12_02225FA4 + ldr r0, [r4, #0x40] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl sub_0200D6E8 + mov r0, #0x16 + add r2, r4, #0 + add r2, #0xb0 + ldrsh r0, [r4, r0] + ldr r2, [r2, #0] + mov r1, #0x10 + bl ov12_02225FD4 + mov r2, #0x16 + add r3, r0, #0 + ldrsh r2, [r4, r2] + mov r1, #0x14 + ldrsh r1, [r4, r1] + add r2, r2, r3 + lsl r2, r2, #0x10 + ldr r0, [r4, #0x40] + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldrb r1, [r4, #0xc] + ldrb r0, [r4, #0xe] + cmp r1, r0 + bls _0222CF52 + sub r0, r1, #1 + strb r0, [r4, #0xc] +_0222CF52: + ldrb r1, [r4, #0xd] + ldrb r0, [r4, #0xf] + cmp r1, r0 + bhs _0222CF5E + add r0, r1, #1 + strb r0, [r4, #0xd] +_0222CF5E: + ldrb r0, [r4, #0xd] + ldrb r1, [r4, #0xc] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222CF9C ; =0x04000052 + strh r1, [r0] + b _0222CF8A +_0222CF6C: + ldr r0, [r4, #0x44] + bl sub_0200D0F4 + ldr r0, [r4, #0x48] + bl sub_0200D0F4 + ldr r0, [r4, #0x1c] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl ov12_02235E80 + add sp, #0x1c + pop {r4, r5, pc} +_0222CF8A: + ldr r0, [r4, #0x40] + bl sub_0200D330 + ldr r0, [r4, #0x28] + bl sub_0200C7EC + add sp, #0x1c + pop {r4, r5, pc} + nop +_0222CF9C: .word 0x04000052 + thumb_func_end ov12_0222CDF0 + + thumb_func_start ov12_0222CFA0 +ov12_0222CFA0: ; 0x0222CFA0 + push {r4, r5, lr} + sub sp, #0x14 + mov r1, #0xd4 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x18 + bl ov12_0223595C + add r0, r5, #0 + mov r1, #0 + bl ov12_02220298 + str r0, [r4, #0x44] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220298 + mov r1, #0 + str r0, [r4, #0x48] + mvn r1, r1 + ldr r0, [r4, #0x1c] + add r2, r1, #0 + bl ov12_02235780 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + mov r1, #0 + strb r1, [r4, #0xc] + mov r0, #0x1f + strb r0, [r4, #0xd] + strb r1, [r4, #0xe] + strb r0, [r4, #0xf] + strb r0, [r4, #0x10] + mov r0, #4 + strb r0, [r4, #0x11] + add r0, r5, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222D030 + ldr r0, [r4, #0x44] + mov r1, #0 + str r0, [r4, #0x40] + ldr r0, [r4, #0x48] + bl sub_0200D3F4 + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_0200D364 + mov r0, #0xb3 + strh r0, [r4, #0x14] + mov r0, #0x78 + strh r0, [r4, #0x16] + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x40] + add r1, r1, #1 + bl sub_0200D460 + mov r0, #0 + mvn r0, r0 + strh r0, [r4, #0x12] + b _0222D090 +_0222D030: + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222D060 + ldr r0, [r4, #0x48] + mov r1, #0 + str r0, [r4, #0x40] + ldr r0, [r4, #0x44] + bl sub_0200D3F4 + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_0200D364 + mov r0, #0x90 + strh r0, [r4, #0x14] + mov r0, #0x40 + strh r0, [r4, #0x16] + b _0222D08C +_0222D060: + ldr r0, [r4, #0x44] + mov r1, #0 + str r0, [r4, #0x40] + ldr r0, [r4, #0x48] + bl sub_0200D3F4 + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4c + strh r0, [r4, #0x14] + mov r0, #0x78 + strh r0, [r4, #0x16] + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x40] + add r1, r1, #1 + bl sub_0200D460 +_0222D08C: + mov r0, #1 + strh r0, [r4, #0x12] +_0222D090: + mov r1, #0x14 + mov r2, #0x16 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x40] + bl sub_0200D4C4 + ldr r0, [r4, #0x40] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_0200D810 + mov r0, #0x12 + ldrsh r0, [r4, r0] + mov r3, #0x64 + add r1, r0, #0 + mov r0, #5 + str r0, [sp] + mul r1, r3 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + str r3, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x9c + add r2, r1, #0 + bl ov12_02225EF0 + add r0, r4, #0 + add r0, #0x9c + bl ov12_02225F6C + add r0, r4, #0 + add r0, #0x9c + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov12_02225FA4 + ldr r0, [r4, #0x40] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl sub_0200D6E8 + mov r0, #0x16 + add r2, r4, #0 + add r2, #0xb0 + ldrsh r0, [r4, r0] + ldr r2, [r2, #0] + mov r1, #0x10 + bl ov12_02225FD4 + mov r2, #0x16 + add r3, r0, #0 + ldrsh r2, [r4, r2] + mov r1, #0x14 + ldrsh r1, [r4, r1] + add r2, r2, r3 + lsl r2, r2, #0x10 + ldr r0, [r4, #0x40] + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #0x1c] + ldr r1, _0222D124 ; =ov12_0222CDF0 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x14 + pop {r4, r5, pc} + nop +_0222D124: .word ov12_0222CDF0 + thumb_func_end ov12_0222CFA0 + + thumb_func_start ov12_0222D128 +ov12_0222D128: ; 0x0222D128 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r4, r1, #0 + str r0, [sp, #0x10] + ldrb r0, [r4] + cmp r0, #8 + bls _0222D138 + b _0222D48C +_0222D138: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222D144: ; jump table + .short _0222D156 - _0222D144 - 2 ; case 0 + .short _0222D18E - _0222D144 - 2 ; case 1 + .short _0222D1E8 - _0222D144 - 2 ; case 2 + .short _0222D202 - _0222D144 - 2 ; case 3 + .short _0222D236 - _0222D144 - 2 ; case 4 + .short _0222D2BA - _0222D144 - 2 ; case 5 + .short _0222D34C - _0222D144 - 2 ; case 6 + .short _0222D3EA - _0222D144 - 2 ; case 7 + .short _0222D432 - _0222D144 - 2 ; case 8 +_0222D156: + ldrb r1, [r4, #0xc] + ldr r2, _0222D470 ; =0x0223A0D1 + ldr r5, _0222D474 ; =0x0223A0D2 + lsl r0, r1, #2 + add r3, r1, r0 + ldr r0, _0222D478 ; =0x0223A0D3 + ldr r1, _0222D47C ; =0x0223A0D0 + ldrb r0, [r0, r3] + ldrb r1, [r1, r3] + ldrb r2, [r2, r3] + str r0, [sp] + mov r0, #0x64 + str r0, [sp, #4] + ldr r0, _0222D480 ; =0x0223A0D4 + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xcc + bl ov12_02225EF0 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D18E: + add r0, r4, #0 + add r0, #0xcc + bl ov12_02225F6C + cmp r0, #1 + bne _0222D1D4 + mov r2, #0xcc + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xc + bl sub_02007DEC + mov r2, #0xce + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #0xd + bl sub_02007DEC + mov r0, #0x20 + add r2, r4, #0 + add r2, #0xe0 + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x24] + ldr r2, [r2, #0] + bl ov12_02225FD4 + mov r2, #0x20 + add r3, r0, #0 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r2, r2, r3 + bl sub_02007DEC + b _0222D4C6 +_0222D1D4: + ldrb r0, [r4, #0xc] + cmp r0, #3 + ldrb r0, [r4] + blo _0222D1E2 + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D1E2: + sub r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D1E8: + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #1 + blo _0222D2C6 + mov r0, #0 + strb r0, [r4, #1] + strb r0, [r4, #0xc] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D202: + add r1, sp, #0x2c + ldr r0, [r4, #0x30] + add r1, #2 + add r2, sp, #0x2c + bl sub_0200D550 + add r1, sp, #0x14 + mov r0, #0x18 + ldrsh r0, [r1, r0] + cmp r0, #0x68 + bgt _0222D22E + ldr r0, [r4, #0x30] + mov r1, #0 + mov r2, #2 + bl sub_0200D5DC + ldr r0, [r4, #0x7c] + mov r1, #0 + mov r2, #2 + bl sub_0200D5DC + b _0222D4C6 +_0222D22E: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D236: + add r1, sp, #0x28 + ldr r0, [r4, #0x30] + add r1, #2 + add r2, sp, #0x28 + bl sub_0200D550 + add r1, sp, #0x14 + mov r0, #0x14 + ldrsh r0, [r1, r0] + cmp r0, #0x68 + bgt _0222D262 + ldr r0, [r4, #0x30] + mov r1, #0 + mov r2, #2 + bl sub_0200D5DC + ldr r0, [r4, #0x7c] + mov r1, #0 + mov r2, #2 + bl sub_0200D5DC + b _0222D26E +_0222D262: + ldr r0, _0222D484 ; =0x04000052 + mov r1, #0x10 + strh r1, [r0] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222D26E: + ldrb r0, [r4, #1] + mov r1, #0x10 + add r2, r1, #0 + add r0, r0, #1 + strb r0, [r4, #1] + add r0, r4, #4 + bl ov12_022267A8 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + add r0, #8 + sub r2, #0x10 + bl ov12_022267A8 + ldr r0, [r4, #8] + ldr r1, [r4, #4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222D484 ; =0x04000052 + strh r1, [r0] + ldrb r0, [r4, #1] + cmp r0, #0xa + bne _0222D2A8 + ldr r0, [r4, #0x30] + mov r1, #0 + mov r2, #0x10 + bl sub_0200D5DC +_0222D2A8: + ldrb r0, [r4, #1] + cmp r0, #0xc + bne _0222D2C6 + ldr r0, [r4, #0x7c] + mov r1, #0 + mov r2, #0x10 + bl sub_0200D5DC + b _0222D4C6 +_0222D2BA: + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #1 + bhs _0222D2C8 +_0222D2C6: + b _0222D4C6 +_0222D2C8: + mov r0, #0 + strb r0, [r4, #1] + add r1, sp, #0x24 + ldr r0, [r4, #0x30] + add r1, #2 + add r2, sp, #0x24 + bl sub_0200D550 + add r1, sp, #0x20 + ldr r0, [r4, #0x7c] + add r1, #2 + add r2, sp, #0x20 + bl sub_0200D550 + add r0, r4, #0 + add r0, #0xc8 + str r0, [sp] + add r0, r4, #0 + add r0, #0xca + str r0, [sp, #4] + add r3, sp, #0x14 + mov r0, #0x12 + mov r1, #0x10 + mov r2, #0xe + mov r5, #0xc + ldrsh r0, [r3, r0] + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldrsh r3, [r3, r5] + bl ov12_02226728 + add r0, r4, #0 + add r0, #0x2c + str r0, [sp] + mov r3, #0xca + add r2, sp, #0x14 + mov r0, #0x12 + mov r1, #0x10 + ldrsh r0, [r2, r0] + ldrsh r1, [r2, r1] + mov r2, #0xc8 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + bl ov12_02226744 + add r0, r4, #0 + add r0, #0x28 + str r0, [sp] + mov r3, #0xca + add r2, sp, #0x14 + mov r0, #0x12 + mov r1, #0x10 + ldrsh r0, [r2, r0] + ldrsh r1, [r2, r1] + mov r2, #0xc8 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + bl ov12_0222676C + mov r0, #0xa + lsl r0, r0, #0xe + str r0, [r4, #0x2c] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D34C: + ldr r3, _0222D488 ; =0x0223A0AD + add r2, sp, #0x30 + mov r1, #0xa +_0222D352: + ldrb r0, [r3] + add r3, r3, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0222D352 + add r1, sp, #0x1c + ldr r0, [r4, #0x30] + add r1, #2 + add r2, sp, #0x1c + bl sub_0200D550 + add r1, sp, #0x18 + ldr r0, [r4, #0x7c] + add r1, #2 + add r2, sp, #0x18 + bl sub_0200D550 + add r3, sp, #0x14 + mov r0, #8 + ldrsh r0, [r3, r0] + mov r2, #0xa + str r0, [sp] + mov r0, #4 + ldrsh r0, [r3, r0] + str r0, [sp, #4] + str r2, [sp, #8] + ldrb r1, [r4, #0xc] + ldr r0, [r4, #0x2c] + lsl r5, r1, #1 + add r1, sp, #0x30 + ldrsb r1, [r1, r5] + mov r5, #6 + mul r1, r0 + str r1, [sp, #0xc] + ldrsh r2, [r3, r2] + add r0, r4, #0 + add r1, r4, #0 + ldrsh r3, [r3, r5] + add r0, #0x34 + add r1, #0x58 + bl ov12_02225C98 + add r3, sp, #0x14 + mov r0, #4 + ldrsh r0, [r3, r0] + mov r5, #0xa + str r0, [sp] + mov r0, #8 + ldrsh r0, [r3, r0] + str r0, [sp, #4] + str r5, [sp, #8] + ldrb r1, [r4, #0xc] + ldr r0, [r4, #0x2c] + lsl r2, r1, #1 + add r1, sp, #0x30 + add r1, #1 + ldrsb r1, [r1, r2] + mov r2, #6 + mul r1, r0 + str r1, [sp, #0xc] + ldrsh r2, [r3, r2] + add r0, r4, #0 + add r1, r4, #0 + ldrsh r3, [r3, r5] + add r0, #0x80 + add r1, #0xa4 + bl ov12_02225C98 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D3EA: + add r0, r4, #0 + ldr r2, [r4, #0x30] + add r0, #0x34 + add r1, #0x58 + mov r5, #0 + bl ov12_02225D2C + cmp r0, #0 + bne _0222D402 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 +_0222D402: + add r0, r4, #0 + add r1, r4, #0 + ldr r2, [r4, #0x7c] + add r0, #0x80 + add r1, #0xa4 + bl ov12_02225D2C + cmp r0, #0 + bne _0222D41A + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 +_0222D41A: + cmp r5, #2 + bne _0222D4C6 + ldrb r0, [r4, #0xc] + cmp r0, #5 + ldrb r0, [r4] + bne _0222D42C + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D42C: + sub r0, r0, #1 + strb r0, [r4] + b _0222D4C6 +_0222D432: + mov r5, #0 + add r0, r4, #4 + add r1, r5, #0 + sub r2, r5, #2 + bl ov12_022267A8 + cmp r0, #1 + bne _0222D444 + add r5, r5, #1 +_0222D444: + add r0, r4, #0 + add r0, #8 + mov r1, #0x10 + mov r2, #2 + bl ov12_022267A8 + cmp r0, #1 + bne _0222D456 + add r5, r5, #1 +_0222D456: + ldr r0, [r4, #8] + ldr r1, [r4, #4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222D484 ; =0x04000052 + cmp r5, #2 + strh r1, [r0] + bne _0222D4C6 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222D4C6 + nop +_0222D470: .word 0x0223A0D1 +_0222D474: .word 0x0223A0D2 +_0222D478: .word 0x0223A0D3 +_0222D47C: .word 0x0223A0D0 +_0222D480: .word 0x0223A0D4 +_0222D484: .word 0x04000052 +_0222D488: .word 0x0223A0AD +_0222D48C: + mov r6, #0 + ldr r0, [r4, #0x10] + add r1, r6, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222D4B4 + add r5, r4, #0 + add r7, r6, #0 +_0222D49E: + ldr r0, [r5, #0x30] + bl sub_0200D0F4 + ldr r0, [r4, #0x10] + add r1, r7, #0 + add r5, #0x4c + add r6, r6, #1 + bl ov12_02220280 + cmp r6, r0 + blt _0222D49E +_0222D4B4: + ldr r0, [r4, #0x10] + ldr r1, [sp, #0x10] + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} +_0222D4C6: + mov r6, #0 + ldr r0, [r4, #0x10] + add r1, r6, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222D532 + add r5, r4, #0 + add r7, sp, #0x14 +_0222D4D8: + add r1, sp, #0x14 + ldr r0, [r5, #0x30] + add r1, #2 + add r2, sp, #0x14 + bl sub_0200D550 + mov r0, #0 + ldrsh r0, [r7, r0] + cmp r0, #0x50 + bge _0222D4FC + ldr r0, [r4, #0x10] + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r5, #0x30] + bl sub_0200D460 + b _0222D522 +_0222D4FC: + mov r0, #2 + ldrsh r0, [r7, r0] + cmp r0, #0x80 + ldr r0, [r4, #0x10] + ble _0222D514 + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r5, #0x30] + bl sub_0200D460 + b _0222D522 +_0222D514: + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r5, #0x30] + add r1, r1, #1 + bl sub_0200D460 +_0222D522: + ldr r0, [r4, #0x10] + mov r1, #0 + add r5, #0x4c + add r6, r6, #1 + bl ov12_02220280 + cmp r6, r0 + blt _0222D4D8 +_0222D532: + ldrb r0, [r4] + cmp r0, #4 + blo _0222D566 + mov r5, #0 + ldr r0, [r4, #0x10] + add r1, r5, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222D560 + add r6, r4, #0 + add r7, r5, #0 +_0222D54A: + ldr r0, [r6, #0x30] + bl sub_0200D330 + ldr r0, [r4, #0x10] + add r1, r7, #0 + add r6, #0x4c + add r5, r5, #1 + bl ov12_02220280 + cmp r5, r0 + blt _0222D54A +_0222D560: + ldr r0, [r4, #0x18] + bl sub_0200C7EC +_0222D566: + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_0222D128 + + thumb_func_start ov12_0222D56C +ov12_0222D56C: ; 0x0222D56C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r1, #0 + mov r1, #0xf0 + str r0, [sp] + add r6, r2, #0 + add r7, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r1, #0 + strb r1, [r4] + ldr r0, [sp] + strb r1, [r4, #1] + str r0, [r4, #0x10] + str r6, [r4, #0x18] + str r5, [r4, #0x14] + str r1, [r4, #4] + mov r0, #0x10 + str r0, [r4, #8] + ldr r0, [r4, #0x10] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl ov12_022232FC + str r0, [r4, #0x1c] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x20] + ldr r0, [r4, #0x10] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl ov12_02223354 + str r0, [r4, #0x24] + ldr r0, [sp] + mov r1, #2 + bl ov12_022233EC + add r5, r0, #0 + ldr r0, [sp] + mov r1, #1 + bl ov12_022233EC + mov r2, #1 + add r1, r2, #0 + add r3, r0, #0 + lsl r1, r5 + add r5, r2, #0 + lsl r5, r3 + orr r1, r5 + orr r1, r2 + sub r2, r2, #2 + ldr r0, [r4, #0x10] + add r3, r2, #0 + bl ov12_022357BC + ldr r0, [r4, #8] + ldr r1, [r4, #4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222D6A8 ; =0x04000052 + strh r1, [r0] + ldr r1, [sp] + add r0, sp, #4 + bl ov12_0222329C + str r7, [r4, #0x30] + ldr r0, [r4, #0x10] + mov r1, #0 + mov r6, #1 + bl ov12_02220280 + cmp r0, #1 + ble _0222D62E + add r5, r4, #0 + add r5, #0x4c + add r7, sp, #4 +_0222D612: + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + add r2, r7, #0 + bl sub_0200CE6C + str r0, [r5, #0x30] + ldr r0, [r4, #0x10] + mov r1, #0 + add r5, #0x4c + add r6, r6, #1 + bl ov12_02220280 + cmp r6, r0 + blt _0222D612 +_0222D62E: + mov r6, #0 + ldr r0, [r4, #0x10] + add r1, r6, #0 + bl ov12_02220280 + cmp r0, #0 + ble _0222D668 + add r5, r4, #0 + mov r7, #1 +_0222D640: + ldr r0, [r5, #0x30] + add r1, r7, #0 + bl sub_0200D810 + ldr r0, [r4, #0x10] + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r5, #0x30] + add r1, r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x10] + mov r1, #0 + add r5, #0x4c + add r6, r6, #1 + bl ov12_02220280 + cmp r6, r0 + blt _0222D640 +_0222D668: + ldr r0, [sp] + bl ov12_0221FDD4 + cmp r0, #1 + ldr r0, [r4, #0x30] + bne _0222D688 + mov r1, #0xa0 + mov r2, #0x36 + bl sub_0200D4C4 + ldr r0, [r4, #0x7c] + mov r1, #0x50 + mov r2, #0x27 + bl sub_0200D4C4 + b _0222D69A +_0222D688: + mov r1, #0x64 + mov r2, #0x36 + bl sub_0200D4C4 + ldr r0, [r4, #0x7c] + mov r1, #0xb4 + mov r2, #0x27 + bl sub_0200D4C4 +_0222D69A: + ldr r0, [r4, #0x10] + ldr r1, _0222D6AC ; =ov12_0222D128 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222D6A8: .word 0x04000052 +_0222D6AC: .word ov12_0222D128 + thumb_func_end ov12_0222D56C + + .rodata + + + .global Unk_ov12_0223A094 +Unk_ov12_0223A094: ; 0x0223A094 + .incbin "incbin/overlay12_rodata.bin", 0x1B00, 0x1B04 - 0x1B00 + + .global Unk_ov12_0223A098 +Unk_ov12_0223A098: ; 0x0223A098 + .incbin "incbin/overlay12_rodata.bin", 0x1B04, 0x1B0A - 0x1B04 + + .global Unk_ov12_0223A09E +Unk_ov12_0223A09E: ; 0x0223A09E + .incbin "incbin/overlay12_rodata.bin", 0x1B0A, 0x1B10 - 0x1B0A + + .global Unk_ov12_0223A0A4 +Unk_ov12_0223A0A4: ; 0x0223A0A4 + .incbin "incbin/overlay12_rodata.bin", 0x1B10, 0x1B19 - 0x1B10 + + .global Unk_ov12_0223A0AD +Unk_ov12_0223A0AD: ; 0x0223A0AD + .incbin "incbin/overlay12_rodata.bin", 0x1B19, 0x1B23 - 0x1B19 + + .global Unk_ov12_0223A0B7 +Unk_ov12_0223A0B7: ; 0x0223A0B7 + .incbin "incbin/overlay12_rodata.bin", 0x1B23, 0x1B2D - 0x1B23 + + .global Unk_ov12_0223A0C1 +Unk_ov12_0223A0C1: ; 0x0223A0C1 + .incbin "incbin/overlay12_rodata.bin", 0x1B2D, 0x1B3C - 0x1B2D + + .global Unk_ov12_0223A0D0 +Unk_ov12_0223A0D0: ; 0x0223A0D0 + .incbin "incbin/overlay12_rodata.bin", 0x1B3C, 0x1B4B - 0x1B3C + + .global Unk_ov12_0223A0DF +Unk_ov12_0223A0DF: ; 0x0223A0DF + .incbin "incbin/overlay12_rodata.bin", 0x1B4B, 0x1B5A - 0x1B4B + + .global Unk_ov12_0223A0EE +Unk_ov12_0223A0EE: ; 0x0223A0EE + .incbin "incbin/overlay12_rodata.bin", 0x1B5A, 0x1B6A - 0x1B5A + + .global Unk_ov12_0223A0FE +Unk_ov12_0223A0FE: ; 0x0223A0FE + .incbin "incbin/overlay12_rodata.bin", 0x1B6A, 0x1B84 - 0x1B6A + + .global Unk_ov12_0223A118 +Unk_ov12_0223A118: ; 0x0223A118 + .incbin "incbin/overlay12_rodata.bin", 0x1B84, 0x28 + diff --git a/asm/ov12_0222D6B0.s b/asm/ov12_0222D6B0.s new file mode 100644 index 000000000..dfd588941 --- /dev/null +++ b/asm/ov12_0222D6B0.s @@ -0,0 +1,2125 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222D6B0 +ov12_0222D6B0: ; 0x0222D6B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + ldrb r0, [r5] + cmp r0, #0 + beq _0222D6C2 + cmp r0, #1 + beq _0222D736 + b _0222D76A +_0222D6C2: + ldrb r0, [r5, #6] + cmp r0, #0xf + bhs _0222D6CC + add r0, r0, #1 + strb r0, [r5, #6] +_0222D6CC: + ldrb r0, [r5, #7] + cmp r0, #0 + beq _0222D6D6 + sub r0, r0, #1 + strb r0, [r5, #7] +_0222D6D6: + ldrb r0, [r5, #7] + ldrb r1, [r5, #6] + mov r6, #0 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222D7B8 ; =0x04000052 + strh r1, [r0] + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + ldrb r0, [r5, #5] + cmp r0, #0 + ble _0222D728 + ldr r4, _0222D7BC ; =0x0223A144 + add r7, r5, #0 +_0222D6F4: + add r1, sp, #0 + ldr r0, [r7, #0x14] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + ldrb r1, [r5, #4] + ldrb r0, [r4] + cmp r1, r0 + blo _0222D71C + add r0, r5, r6 + ldrb r1, [r0, #1] + add r1, r1, #1 + strb r1, [r0, #1] + ldrb r2, [r0, #1] + ldrb r1, [r4, #1] + cmp r2, r1 + blo _0222D71C + mov r1, #0 + strb r1, [r0, #1] +_0222D71C: + ldrb r0, [r5, #5] + add r6, r6, #1 + add r7, r7, #4 + add r4, r4, #2 + cmp r6, r0 + blt _0222D6F4 +_0222D728: + ldrb r0, [r5, #4] + cmp r0, #0x2d + blo _0222D794 + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + b _0222D794 +_0222D736: + ldrb r0, [r5, #6] + cmp r0, #0 + beq _0222D740 + sub r0, r0, #1 + strb r0, [r5, #6] +_0222D740: + ldrb r0, [r5, #7] + cmp r0, #0xf + bhs _0222D74A + add r0, r0, #1 + strb r0, [r5, #7] +_0222D74A: + ldrb r0, [r5, #6] + cmp r0, #0 + bne _0222D75C + ldrb r0, [r5, #7] + cmp r0, #0xf + bne _0222D75C + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] +_0222D75C: + ldrb r0, [r5, #7] + ldrb r1, [r5, #6] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222D7B8 ; =0x04000052 + strh r1, [r0] + b _0222D794 +_0222D76A: + ldrb r0, [r5, #5] + mov r6, #0 + cmp r0, #0 + ble _0222D784 + add r4, r5, #0 +_0222D774: + ldr r0, [r4, #0x14] + bl sub_0200D0F4 + ldrb r0, [r5, #5] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _0222D774 +_0222D784: + ldr r0, [r5, #8] + add r1, r7, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_0222D794: + ldrb r0, [r5, #5] + mov r6, #0 + cmp r0, #0 + ble _0222D7B0 + add r4, r5, #0 +_0222D79E: + ldr r0, [r4, #0x14] + ldr r0, [r0, #0] + bl sub_0200D324 + ldrb r0, [r5, #5] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _0222D79E +_0222D7B0: + ldr r0, [r5, #0x10] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222D7B8: .word 0x04000052 +_0222D7BC: .word 0x0223A144 + thumb_func_end ov12_0222D6B0 + + thumb_func_start ov12_0222D7C0 +ov12_0222D7C0: ; 0x0222D7C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r7, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + str r3, [sp] + bl ov12_0221FDE4 + mov r1, #0x44 + bl sub_02018144 + add r4, r0, #0 + bne _0222D7DE + bl sub_02022974 +_0222D7DE: + mov r0, #0 + strb r0, [r4, #4] + strb r0, [r4] + str r5, [r4, #0xc] + str r6, [r4, #0x10] + add r0, sp, #4 + add r1, r7, #0 + str r7, [r4, #8] + bl ov12_0222329C + mov r1, #0 + mvn r1, r1 + ldr r0, [r4, #8] + add r2, r1, #0 + bl ov12_02235780 + ldr r0, [r4, #8] + mov r1, #0 + bl ov12_02220280 + strb r0, [r4, #5] + mov r0, #0 + strb r0, [r4, #6] + mov r0, #0xf + strb r0, [r4, #7] + ldrb r0, [r4, #7] + ldrb r1, [r4, #6] + mov r6, #1 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222D924 ; =0x04000052 + strh r1, [r0] + ldr r0, [sp] + str r0, [r4, #0x14] + ldrb r0, [r4, #5] + cmp r0, #1 + ble _0222D840 + add r5, r4, #4 +_0222D82A: + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r2, sp, #4 + bl sub_0200CE6C + str r0, [r5, #0x14] + ldrb r0, [r4, #5] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0222D82A +_0222D840: + add r0, r7, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r7, #0 + bl ov12_0223525C + cmp r0, #3 + bne _0222D894 + add r0, r7, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r7, #0 + bl ov12_0223525C + cmp r0, #3 + bne _0222D880 + add r0, r7, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r7, #0 + bl ov12_0223525C + cmp r0, #3 + bne _0222D880 + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D364 + b _0222D888 +_0222D880: + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D364 +_0222D888: + ldr r0, [r4, #0x14] + mov r1, #0x80 + mov r2, #0x50 + bl sub_0200D4C4 + b _0222D8D4 +_0222D894: + add r0, r7, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r7, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222D8C2 + add r0, r7, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r7, #0 + bl ov12_0223525C + cmp r0, #4 + bne _0222D8C2 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D364 + b _0222D8CA +_0222D8C2: + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D364 +_0222D8CA: + ldr r0, [r4, #0x14] + mov r1, #0x80 + mov r2, #0x50 + bl sub_0200D4C4 +_0222D8D4: + ldrb r0, [r4, #5] + mov r6, #0 + cmp r0, #0 + ble _0222D914 + add r5, r4, #0 +_0222D8DE: + add r1, r4, r6 + mov r0, #0 + strb r0, [r1, #1] + ldr r0, [r5, #0x14] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r5, #0x14] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #8] + bl ov12_0221FDD4 + cmp r0, #1 + bne _0222D90A + mov r2, #0xfe + ldr r0, [r5, #0x14] + ldr r1, _0222D928 ; =0xBF800000 + lsl r2, r2, #0x16 + bl sub_0200D6E8 +_0222D90A: + ldrb r0, [r4, #5] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0222D8DE +_0222D914: + ldr r1, _0222D92C ; =ov12_0222D6B0 + ldr r3, _0222D930 ; =0x0000044C + add r0, r7, #0 + add r2, r4, #0 + bl ov12_022201CC + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222D924: .word 0x04000052 +_0222D928: .word 0xBF800000 +_0222D92C: .word ov12_0222D6B0 +_0222D930: .word 0x0000044C + thumb_func_end ov12_0222D7C0 + + thumb_func_start ov12_0222D934 +ov12_0222D934: ; 0x0222D934 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r7, r0, #0 + ldrb r0, [r4] + mov r6, #0 + cmp r0, #3 + bls _0222D946 + b _0222DAEC +_0222D946: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222D952: ; jump table + .short _0222D95A - _0222D952 - 2 ; case 0 + .short _0222D98E - _0222D952 - 2 ; case 1 + .short _0222DA66 - _0222D952 - 2 ; case 2 + .short _0222DAB2 - _0222D952 - 2 ; case 3 +_0222D95A: + ldrb r0, [r4, #9] + cmp r0, #0xf + bhs _0222D964 + add r0, r0, #1 + strb r0, [r4, #9] +_0222D964: + ldrb r0, [r4, #0xa] + cmp r0, #0 + beq _0222D96E + sub r0, r0, #1 + strb r0, [r4, #0xa] +_0222D96E: + ldrb r0, [r4, #9] + cmp r0, #0xf + bne _0222D980 + ldrb r0, [r4, #0xa] + cmp r0, #0 + bne _0222D980 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222D980: + ldrb r0, [r4, #0xa] + ldrb r1, [r4, #9] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222DB48 ; =0x04000052 + strh r1, [r0] + b _0222DB18 +_0222D98E: + ldr r0, [r4, #0x30] + cmp r0, #3 + bhi _0222D9F4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222D9A0: ; jump table + .short _0222D9A8 - _0222D9A0 - 2 ; case 0 + .short _0222D9C2 - _0222D9A0 - 2 ; case 1 + .short _0222D9DC - _0222D9A0 - 2 ; case 2 + .short _0222D9DC - _0222D9A0 - 2 ; case 3 +_0222D9A8: + ldr r0, [r4, #0x18] + mov r1, #1 + str r0, [r4, #0x34] + ldr r0, [r4, #0x24] + str r0, [r4, #0x38] + ldr r0, [r4, #0x34] + bl sub_0200D3F4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl sub_0200D3F4 + b _0222D9F4 +_0222D9C2: + ldr r0, [r4, #0x1c] + mov r1, #1 + str r0, [r4, #0x34] + ldr r0, [r4, #0x20] + str r0, [r4, #0x38] + ldr r0, [r4, #0x34] + bl sub_0200D3F4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl sub_0200D3F4 + b _0222D9F4 +_0222D9DC: + ldr r0, [r4, #0x28] + mov r1, #1 + str r0, [r4, #0x34] + ldr r0, [r4, #0x2c] + str r0, [r4, #0x38] + ldr r0, [r4, #0x34] + bl sub_0200D3F4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl sub_0200D3F4 +_0222D9F4: + add r1, sp, #8 + ldr r0, [r4, #0x34] + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + ldr r1, [r4, #0x30] + ldr r0, _0222DB4C ; =0x0223A17C + lsl r2, r1, #3 + ldrsh r0, [r0, r2] + ldr r5, _0222DB50 ; =0x0223A17A + add r3, sp, #8 + str r0, [sp] + ldr r0, _0222DB54 ; =0x0223A140 + ldrsh r2, [r5, r2] + ldrb r0, [r0, r1] + mov r1, #2 + mov r5, #0 + str r0, [sp, #4] + ldrsh r1, [r3, r1] + add r0, r4, #0 + ldrsh r3, [r3, r5] + add r0, #0x3c + bl ov12_02225BC8 + add r1, sp, #8 + ldr r0, [r4, #0x38] + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + ldr r1, [r4, #0x30] + ldr r0, _0222DB58 ; =0x0223A180 + lsl r2, r1, #3 + ldrsh r0, [r0, r2] + ldr r5, _0222DB5C ; =0x0223A17E + add r3, sp, #8 + str r0, [sp] + ldr r0, _0222DB54 ; =0x0223A140 + ldrsh r2, [r5, r2] + ldrb r0, [r0, r1] + mov r1, #2 + mov r5, #0 + str r0, [sp, #4] + ldrsh r1, [r3, r1] + add r0, r4, #0 + ldrsh r3, [r3, r5] + add r0, #0x60 + bl ov12_02225BC8 + ldr r0, [r4, #0x30] + add r0, r0, #1 + str r0, [r4, #0x30] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222DB18 +_0222DA66: + add r0, r4, #0 + ldr r1, [r4, #0x34] + add r0, #0x3c + add r5, r6, #0 + bl ov12_02225C50 + cmp r0, #0 + bne _0222DA78 + add r5, r5, #1 +_0222DA78: + add r0, r4, #0 + ldr r1, [r4, #0x38] + add r0, #0x60 + bl ov12_02225C50 + cmp r0, #0 + bne _0222DA88 + add r5, r5, #1 +_0222DA88: + cmp r5, #2 + blt _0222DB18 + ldr r0, [r4, #0x30] + cmp r0, #3 + bgt _0222DAAA + ldr r0, [r4, #0x34] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x38] + mov r1, #0 + bl sub_0200D3F4 + ldrb r0, [r4] + sub r0, r0, #1 + strb r0, [r4] + b _0222DB18 +_0222DAAA: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222DB18 +_0222DAB2: + ldrb r0, [r4, #9] + cmp r0, #0 + beq _0222DABC + sub r0, r0, #1 + strb r0, [r4, #9] +_0222DABC: + ldrb r0, [r4, #0xa] + cmp r0, #0xf + bhs _0222DAC6 + add r0, r0, #1 + strb r0, [r4, #0xa] +_0222DAC6: + ldrb r1, [r4, #0xa] + cmp r1, #7 + blo _0222DACE + mov r6, #1 +_0222DACE: + ldrb r0, [r4, #9] + cmp r0, #0 + bne _0222DADE + cmp r1, #0xf + bne _0222DADE + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222DADE: + ldrb r0, [r4, #0xa] + ldrb r1, [r4, #9] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222DB48 ; =0x04000052 + strh r1, [r0] + b _0222DB18 +_0222DAEC: + ldrb r0, [r4, #8] + mov r6, #0 + cmp r0, #0 + ble _0222DB06 + add r5, r4, #0 +_0222DAF6: + ldr r0, [r5, #0x18] + bl sub_0200D0F4 + ldrb r0, [r4, #8] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0222DAF6 +_0222DB06: + ldr r0, [r4, #0xc] + add r1, r7, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0222DB18: + ldrb r0, [r4] + cmp r0, #3 + bhs _0222DB3E + cmp r6, #0 + bne _0222DB3E + ldrb r0, [r4, #8] + mov r6, #0 + cmp r0, #0 + ble _0222DB3E + add r5, r4, #0 +_0222DB2C: + ldr r0, [r5, #0x18] + ldr r0, [r0, #0] + bl sub_0200D324 + ldrb r0, [r4, #8] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0222DB2C +_0222DB3E: + ldr r0, [r4, #0x14] + bl sub_0200C7EC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222DB48: .word 0x04000052 +_0222DB4C: .word 0x0223A17C +_0222DB50: .word 0x0223A17A +_0222DB54: .word 0x0223A140 +_0222DB58: .word 0x0223A180 +_0222DB5C: .word 0x0223A17E + thumb_func_end ov12_0222D934 + + thumb_func_start ov12_0222DB60 +ov12_0222DB60: ; 0x0222DB60 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + str r0, [sp] + add r5, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov12_0221FDE4 + mov r1, #0x84 + bl sub_02018144 + add r4, r0, #0 + bne _0222DB7E + bl sub_02022974 +_0222DB7E: + mov r0, #0 + strb r0, [r4, #7] + strb r0, [r4] + str r5, [r4, #0x10] + str r6, [r4, #0x14] + str r0, [r4, #0x30] + ldr r0, [sp] + ldr r1, [sp] + str r0, [r4, #0xc] + add r0, sp, #4 + bl ov12_0222329C + mov r1, #0 + mvn r1, r1 + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl ov12_02235780 + mov r1, #0 + strb r1, [r4, #9] + mov r0, #0xf + strb r0, [r4, #0xa] + ldrb r0, [r4, #0xa] + ldrb r2, [r4, #9] + lsl r0, r0, #8 + orr r2, r0 + ldr r0, _0222DC88 ; =0x04000052 + strh r2, [r0] + ldr r0, [r4, #0xc] + bl ov12_02220280 + strb r0, [r4, #8] + str r7, [r4, #0x18] + ldrb r0, [r4, #8] + mov r6, #1 + cmp r0, #1 + ble _0222DBE2 + add r5, r4, #4 + add r7, sp, #4 +_0222DBCC: + ldr r0, [r4, #0x10] + ldr r1, [r4, #0x14] + add r2, r7, #0 + bl sub_0200CE6C + str r0, [r5, #0x18] + ldrb r0, [r4, #8] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0222DBCC +_0222DBE2: + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x20] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r4, #0x28] + mov r1, #2 + bl sub_0200D364 + ldr r0, [r4, #0x2c] + mov r1, #3 + bl sub_0200D364 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_0200D7D4 + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_0200D7D4 + ldrb r0, [r4, #8] + mov r7, #0 + cmp r0, #0 + ble _0222DC58 + ldr r6, _0222DC8C ; =0x0223A162 + add r5, r4, #0 +_0222DC2E: + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D390 + mov r1, #0 + mov r2, #2 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r5, #0x18] + bl sub_0200D4C4 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D810 + ldrb r0, [r4, #8] + add r7, r7, #1 + add r5, r5, #4 + add r6, r6, #4 + cmp r7, r0 + blt _0222DC2E +_0222DC58: + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x20] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x2c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [sp] + ldr r1, _0222DC90 ; =ov12_0222D934 + ldr r3, _0222DC94 ; =0x0000044C + add r2, r4, #0 + bl ov12_022201CC + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222DC88: .word 0x04000052 +_0222DC8C: .word 0x0223A162 +_0222DC90: .word ov12_0222D934 +_0222DC94: .word 0x0000044C + thumb_func_end ov12_0222DB60 + + thumb_func_start ov12_0222DC98 +ov12_0222DC98: ; 0x0222DC98 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #7 + bls _0222DCA8 + b _0222DE00 +_0222DCA8: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222DCB4: ; jump table + .short _0222DCC4 - _0222DCB4 - 2 ; case 0 + .short _0222DCD8 - _0222DCB4 - 2 ; case 1 + .short _0222DCFA - _0222DCB4 - 2 ; case 2 + .short _0222DD28 - _0222DCB4 - 2 ; case 3 + .short _0222DD56 - _0222DCB4 - 2 ; case 4 + .short _0222DD74 - _0222DCB4 - 2 ; case 5 + .short _0222DD9C - _0222DCB4 - 2 ; case 6 + .short _0222DDE4 - _0222DCB4 - 2 ; case 7 +_0222DCC4: + ldrb r0, [r4, #0xe] + sub r0, r0, #1 + strb r0, [r4, #0xe] + ldrb r0, [r4, #0xe] + cmp r0, #0xa + bhi _0222DCE4 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DCD8: + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xd] + cmp r0, #3 + bhs _0222DCE6 +_0222DCE4: + b _0222DE0E +_0222DCE6: + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #0 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DCFA: + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xd] + cmp r0, #3 + bhi _0222DD1C + ldr r0, [r4, #0x38] + ldr r1, _0222DE18 ; =0x3DCCCCCD + bl sub_020E0B00 + str r0, [r4, #0x38] + ldr r1, [r4, #0x38] + ldr r0, [r4, #0x10] + add r2, r1, #0 + bl sub_0200D6E8 + b _0222DE0E +_0222DD1C: + mov r0, #0 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DD28: + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xd] + cmp r0, #3 + bhi _0222DD4A + ldr r0, [r4, #0x38] + ldr r1, _0222DE18 ; =0x3DCCCCCD + bl sub_020E1A9C + str r0, [r4, #0x38] + ldr r1, [r4, #0x38] + ldr r0, [r4, #0x10] + add r2, r1, #0 + bl sub_0200D6E8 + b _0222DE0E +_0222DD4A: + mov r0, #0 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DD56: + ldrb r0, [r4, #0xe] + sub r0, r0, #1 + strb r0, [r4, #0xe] + ldrb r0, [r4, #0xe] + cmp r0, #0xa + bhi _0222DE0E + ldr r0, [r4, #0x3c] + mov r1, #1 + str r1, [r0, #0] + mov r0, #0 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DD74: + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xd] + cmp r0, #0x1e + bls _0222DD8C + mov r0, #0 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DD8C: + ldr r0, [r4, #0x3c] + ldr r0, [r0, #0] + cmp r0, #2 + bne _0222DE0E + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DD9C: + bl sub_0201D2E8 + mov r1, #0xa + bl sub_020E1F6C + add r5, r1, #0 + add r2, sp, #8 + ldr r0, [r4, #0x10] + add r1, sp, #8 + add r2, #2 + add r5, #0xa + bl sub_0200D550 + ldrb r0, [r4, #0xf] + add r3, sp, #8 + mov r1, #0 + lsl r2, r0, #2 + ldr r0, _0222DE1C ; =0x0223A14C + ldrsh r0, [r0, r2] + str r0, [sp] + lsl r0, r5, #0x10 + ldr r5, _0222DE20 ; =0x0223A14A + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldrsh r2, [r5, r2] + add r0, r4, #0 + mov r5, #2 + ldrsh r1, [r3, r1] + ldrsh r3, [r3, r5] + add r0, #0x14 + bl ov12_02225BC8 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + b _0222DE0E +_0222DDE4: + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x14 + bl ov12_02225C50 + cmp r0, #0 + bne _0222DE0E + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_0200D3F4 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_0222DE00: + ldr r0, [r4, #0x3c] + mov r1, #3 + str r1, [r0, #0] + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_0222DE0E: + ldr r0, [r4, #0x10] + bl sub_0200D330 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0222DE18: .word 0x3DCCCCCD +_0222DE1C: .word 0x0223A14C +_0222DE20: .word 0x0223A14A + thumb_func_end ov12_0222DC98 + + thumb_func_start ov12_0222DE24 +ov12_0222DE24: ; 0x0222DE24 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhi _0222DEE0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222DE3C: ; jump table + .short _0222DE44 - _0222DE3C - 2 ; case 0 + .short _0222DE70 - _0222DE3C - 2 ; case 1 + .short _0222DE92 - _0222DE3C - 2 ; case 2 + .short _0222DEBE - _0222DE3C - 2 ; case 3 +_0222DE44: + ldrb r6, [r4, #2] + mov r3, #1 + mov r2, #0 + cmp r6, #0 + ble _0222DE64 + ldr r0, _0222DEF8 ; =0x00000514 + add r5, r4, #0 +_0222DE52: + ldr r1, [r5, r0] + cmp r1, #1 + beq _0222DE5C + mov r3, #0 + b _0222DE64 +_0222DE5C: + add r2, r2, #1 + add r5, r5, #4 + cmp r2, r6 + blt _0222DE52 +_0222DE64: + cmp r3, #1 + bne _0222DEF0 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222DEF0 +_0222DE70: + ldrb r0, [r4, #2] + mov r5, #0 + cmp r0, #0 + ble _0222DE8A + ldr r0, _0222DEF8 ; =0x00000514 + add r3, r4, #0 + mov r2, #2 +_0222DE7E: + str r2, [r3, r0] + ldrb r1, [r4, #2] + add r5, r5, #1 + add r3, r3, #4 + cmp r5, r1 + blt _0222DE7E +_0222DE8A: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222DEF0 +_0222DE92: + ldrb r5, [r4, #2] + mov r2, #1 + mov r6, #0 + cmp r5, #0 + ble _0222DEB2 + ldr r0, _0222DEF8 ; =0x00000514 + add r3, r4, #0 +_0222DEA0: + ldr r1, [r3, r0] + cmp r1, #3 + beq _0222DEAA + mov r2, #0 + b _0222DEB2 +_0222DEAA: + add r6, r6, #1 + add r3, r3, #4 + cmp r6, r5 + blt _0222DEA0 +_0222DEB2: + cmp r2, #1 + bne _0222DEF0 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222DEF0 +_0222DEBE: + ldrb r0, [r4, #2] + mov r6, #0 + cmp r0, #0 + ble _0222DED8 + add r5, r4, #0 +_0222DEC8: + ldr r0, [r5, #0x24] + bl sub_0200D0F4 + ldrb r0, [r4, #2] + add r6, r6, #1 + add r5, #0x40 + cmp r6, r0 + blt _0222DEC8 +_0222DED8: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222DEF0 +_0222DEE0: + ldr r0, [r4, #8] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_0222DEF0: + ldr r0, [r4, #0x10] + bl sub_0200C7EC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222DEF8: .word 0x00000514 + thumb_func_end ov12_0222DE24 + + thumb_func_start ov12_0222DEFC +ov12_0222DEFC: ; 0x0222DEFC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + str r0, [sp] + add r4, r1, #0 + add r5, r2, #0 + add r7, r3, #0 + bl ov12_0221FDE4 + ldr r1, _0222E064 ; =0x00000564 + bl sub_02018144 + add r6, r0, #0 + bne _0222DF1A + bl sub_02022974 +_0222DF1A: + mov r0, #0 + strb r0, [r6, #1] + strb r0, [r6] + str r4, [r6, #0xc] + ldr r0, [sp] + str r5, [r6, #0x10] + str r0, [r6, #8] + ldr r1, [sp] + add r0, sp, #0x1c + bl ov12_0222329C + mov r1, #0 + mvn r1, r1 + ldr r0, [r6, #8] + add r2, r1, #0 + bl ov12_02235780 + ldr r0, [r6, #8] + mov r1, #0 + bl ov12_02220280 + strb r0, [r6, #2] + mov r0, #0xc + strb r0, [r6, #2] + str r7, [r6, #0x24] + mov r4, #0 + ldrb r0, [r6, #2] + str r4, [sp, #4] + cmp r0, #0 + ble _0222E052 + ldr r0, _0222E068 ; =0x00000514 + add r5, r6, #0 + add r0, r6, r0 + str r0, [sp, #0x10] + add r0, r6, #0 + str r0, [sp, #0xc] + add r0, #0x14 + str r0, [sp, #0xc] +_0222DF66: + cmp r4, #0 + beq _0222DF76 + ldr r0, [r6, #0xc] + ldr r1, [r6, #0x10] + add r2, sp, #0x1c + bl sub_0200CE6C + str r0, [r5, #0x24] +_0222DF76: + add r1, r5, #0 + ldr r7, [r5, #0x24] + add r1, #0x20 + mov r0, #0 + strb r0, [r1] + add r1, r5, #0 + add r1, #0x21 + strb r0, [r1] + bl sub_0201D2E8 + mov r1, #0xa + bl sub_020E1F6C + add r1, #0xa + add r0, r5, #0 + add r1, r4, r1 + add r0, #0x22 + strb r1, [r0] + bl sub_0201D2E8 + mov r1, #6 + bl sub_020E1F6C + add r0, r5, #0 + add r0, #0x23 + strb r1, [r0] + mov r0, #0xfe + lsl r0, r0, #0x16 + str r0, [r5, #0x4c] + ldr r0, [r6, #8] + ldr r1, _0222E06C ; =0x0223A19A + str r0, [r5, #0x14] + ldr r0, [r6, #0xc] + str r0, [r5, #0x18] + ldr r0, [r6, #0x10] + str r0, [r5, #0x1c] + ldr r0, [sp, #0x10] + str r0, [r5, #0x50] + ldr r0, [sp, #4] + lsl r0, r0, #3 + str r0, [sp, #0x18] + add r0, r1, r0 + str r0, [sp, #8] + bl sub_0201D2E8 + ldr r2, [sp, #8] + mov r1, #6 + ldrsh r1, [r2, r1] + bl sub_020E1F6C + ldr r2, [sp, #8] + mov r0, #2 + ldrsh r0, [r2, r0] + add r0, r0, r1 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0x14] + bl sub_0201D2E8 + ldr r2, [sp, #8] + mov r1, #4 + ldrsh r1, [r2, r1] + bl sub_020E1F6C + ldr r2, _0222E06C ; =0x0223A19A + ldr r0, [sp, #0x18] + ldrsh r0, [r2, r0] + add r0, r0, r1 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl sub_0200D4C4 + add r0, r7, #0 + mov r1, #2 + bl sub_0200D6A4 + ldr r1, [r5, #0x4c] + add r0, r7, #0 + add r2, r1, #0 + bl sub_0200D6E8 + add r0, r7, #0 + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [sp] + ldr r1, _0222E070 ; =ov12_0222DC98 + ldr r2, [sp, #0xc] + ldr r3, _0222E074 ; =0x0000044B + bl ov12_022201CC + ldr r0, [sp, #4] + mov r1, #6 + add r0, r0, #1 + bl sub_020E1F6C + ldr r0, [sp, #0x10] + add r4, r4, #1 + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + str r1, [sp, #4] + add r0, #0x40 + str r0, [sp, #0xc] + ldrb r0, [r6, #2] + add r5, #0x40 + cmp r4, r0 + blt _0222DF66 +_0222E052: + ldr r0, [sp] + ldr r1, _0222E078 ; =ov12_0222DE24 + ldr r3, _0222E07C ; =0x0000044D + add r2, r6, #0 + bl ov12_022201CC + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222E064: .word 0x00000564 +_0222E068: .word 0x00000514 +_0222E06C: .word 0x0223A19A +_0222E070: .word ov12_0222DC98 +_0222E074: .word 0x0000044B +_0222E078: .word ov12_0222DE24 +_0222E07C: .word 0x0000044D + thumb_func_end ov12_0222DEFC + + thumb_func_start ov12_0222E080 +ov12_0222E080: ; 0x0222E080 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #4] + cmp r0, #3 + bhi _0222E166 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222E09A: ; jump table + .short _0222E0A2 - _0222E09A - 2 ; case 0 + .short _0222E0C0 - _0222E09A - 2 ; case 1 + .short _0222E112 - _0222E09A - 2 ; case 2 + .short _0222E13C - _0222E09A - 2 ; case 3 +_0222E0A2: + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + ldrb r0, [r4, #4] + add r0, r0, #1 + strb r0, [r4, #4] + b _0222E18C +_0222E0C0: + add r0, r4, #0 + add r0, #0x2c + bl ov12_02226454 + cmp r0, #0 + beq _0222E18C + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #8] + mov r1, #1 + bl ov12_022233EC + add r5, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl ov12_022266E8 + add r6, r0, #0 + ldr r0, [r4, #8] + bl ov12_0221FDE4 + mov r1, #0xc8 + str r1, [sp] + mov r3, #3 + str r5, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + str r6, [sp, #0xc] + str r0, [sp, #0x10] + add r0, r1, #0 + mov r1, #0xa0 + add r2, r1, #0 + add r2, #0xcc + lsl r3, r3, #0xe + bl ov12_0222662C + str r0, [r4, #0x28] + ldrb r0, [r4, #4] + add r0, r0, #1 + strb r0, [r4, #4] + b _0222E18C +_0222E112: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + cmp r0, #0x78 + blt _0222E18C + ldr r0, [r4, #0x28] + bl ov12_0222669C + mov r1, #2 + mov r2, #0x10 + str r1, [sp] + add r0, r4, #0 + str r2, [sp, #4] + add r0, #0x2c + add r3, r2, #0 + bl ov12_02226424 + ldrb r0, [r4, #4] + add r0, r0, #1 + strb r0, [r4, #4] + b _0222E18C +_0222E13C: + add r0, r4, #0 + add r0, #0x2c + bl ov12_02226454 + cmp r0, #0 + beq _0222E18C + ldr r0, [r4, #8] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov12_022232FC + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + ldrb r0, [r4, #4] + add r0, r0, #1 + strb r0, [r4, #4] + b _0222E18C +_0222E166: + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _0222E1A4 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + ldr r0, [r4, #8] + mov r1, #2 + bl ov12_02222664 + ldr r0, [r4, #8] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_0222E18C: + ldr r0, [r4, #0x24] + bl sub_0200D330 + ldr r0, [r4, #0x20] + bl sub_0200D330 + ldr r0, [r4, #0x10] + bl sub_0200C7EC + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_0222E1A4: .word 0xFFFF1FFF + thumb_func_end ov12_0222E080 + + thumb_func_start ov12_0222E1A8 +ov12_0222E1A8: ; 0x0222E1A8 + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #0x54 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #4 + bl ov12_0223595C + ldr r0, [r4, #8] + mov r1, #0 + bl ov12_022202C0 + mov r1, #2 + str r0, [r4, #0x20] + bl sub_0200D810 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _0222E23C ; =0xFFFF1FFF + and r2, r1 + lsr r1, r0, #0xb + orr r1, r2 + str r1, [r0, #0] + add r0, #0x4a + ldrh r2, [r0] + mov r1, #0x3f + bic r2, r1 + mov r1, #0x1b + orr r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _0222E240 ; =0xFFFFC0FF + and r2, r1 + mov r1, #0x17 + lsl r1, r1, #8 + orr r1, r2 + strh r1, [r0] + ldr r0, [r4, #8] + mov r1, #1 + bl ov12_022202C0 + mov r1, #1 + str r0, [r4, #0x24] + bl sub_0200D810 + mov r1, #0x10 + str r1, [sp] + add r0, r4, #0 + mov r2, #2 + str r1, [sp, #4] + add r0, #0x2c + add r3, r2, #0 + bl ov12_02226424 + ldr r0, [r4, #8] + mov r1, #2 + bl ov12_02222590 + mov r0, #2 + mov r1, #1 + bl sub_02019120 + ldr r0, [r4, #8] + ldr r1, _0222E244 ; =ov12_0222E080 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0222E23C: .word 0xFFFF1FFF +_0222E240: .word 0xFFFFC0FF +_0222E244: .word ov12_0222E080 + thumb_func_end ov12_0222E1A8 + + thumb_func_start ov12_0222E248 +ov12_0222E248: ; 0x0222E248 + push {r4, lr} + add r4, r0, #0 + bl sub_0200D408 + cmp r0, #1 + bne _0222E25A + add r0, r4, #0 + bl sub_0200D330 +_0222E25A: + pop {r4, pc} + thumb_func_end ov12_0222E248 + + thumb_func_start ov12_0222E25C +ov12_0222E25C: ; 0x0222E25C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r1, [sp, #4] + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #0x1c + ldrsh r0, [r0, r1] + cmp r0, #0 + bgt _0222E280 + ldr r0, [sp, #4] + ldr r0, [r0, #0x30] + bl ov12_0222E248 + ldr r0, [sp, #4] + ldr r0, [r0, #0x34] + bl ov12_0222E248 + b _0222E286 +_0222E280: + sub r1, r0, #1 + ldr r0, [sp, #4] + strh r1, [r0, #0x1c] +_0222E286: + ldr r0, [sp, #4] + ldr r0, [r0, #0x28] + bl ov12_0222E248 + ldr r0, [sp, #4] + ldr r0, [r0, #0x2c] + bl ov12_0222E248 + ldr r4, [sp, #4] + mov r6, #0 + add r7, r6, #0 + add r5, r4, #0 +_0222E29E: + mov r0, #0x1e + ldrsh r0, [r4, r0] + add r0, r0, #1 + strh r0, [r4, #0x1e] + mov r0, #0x1e + ldrsh r0, [r4, r0] + cmp r0, #0x28 + blt _0222E2B8 + ldr r0, [r5, #0x28] + mov r1, #0 + bl sub_0200D3F4 + add r6, r6, #1 +_0222E2B8: + add r7, r7, #1 + add r4, r4, #2 + add r5, r5, #4 + cmp r7, #4 + blt _0222E29E + cmp r6, #4 + bne _0222E2EC + ldr r4, [sp, #4] + mov r5, #0 +_0222E2CA: + ldr r0, [r4, #0x28] + bl sub_0200D0F4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #4 + blt _0222E2CA + ldr r0, [sp, #4] + ldr r1, [sp] + ldr r0, [r0, #4] + bl ov12_02220220 + ldr r0, [sp, #4] + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0222E2EC: + ldr r0, [sp, #4] + ldr r0, [r0, #0x10] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_0222E25C + + thumb_func_start ov12_0222E2F8 +ov12_0222E2F8: ; 0x0222E2F8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + mov r1, #0x38 + add r5, r0, #0 + add r4, r3, #0 + bl ov12_02235E50 + add r6, r0, #0 + mov r0, #0xa + strh r0, [r6, #0x1c] + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223595C + ldr r1, [r6, #4] + add r0, sp, #0 + bl ov12_0222329C + str r4, [r6, #0x28] + mov r0, #0 + strh r0, [r6, #0x1e] + mov r7, #1 + add r4, r6, #2 + add r5, r6, #4 +_0222E328: + mov r0, #0 + strh r0, [r4, #0x1e] + ldr r0, [r6, #8] + ldr r1, [r6, #0x10] + add r2, sp, #0 + bl sub_0200CE6C + str r0, [r5, #0x28] + add r7, r7, #1 + add r4, r4, #2 + add r5, r5, #4 + cmp r7, #4 + blt _0222E328 + ldr r0, [r6, #0x28] + mov r1, #1 + bl sub_0200D7D4 + ldr r0, [r6, #0x2c] + mov r1, #1 + bl sub_0200D7D4 + mov r1, #0x1f + ldr r0, [r6, #0x28] + mvn r1, r1 + mov r2, #0 + bl sub_0200D5DC + mov r1, #0x1f + ldr r0, [r6, #0x2c] + mvn r1, r1 + mov r2, #0x20 + bl sub_0200D5DC + ldr r0, [r6, #0x30] + mov r1, #0x20 + mov r2, #0 + bl sub_0200D5DC + mov r1, #0x20 + ldr r0, [r6, #0x34] + add r2, r1, #0 + bl sub_0200D5DC + ldr r0, [r6, #4] + ldr r1, _0222E38C ; =ov12_0222E25C + add r2, r6, #0 + bl ov12_022201E8 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222E38C: .word ov12_0222E25C + thumb_func_end ov12_0222E2F8 + + thumb_func_start ov12_0222E390 +ov12_0222E390: ; 0x0222E390 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r1, #0 + mov r4, #0 + str r0, [sp, #0x1c] + str r4, [sp, #0x20] + add r6, r5, #0 + add r7, r5, #0 +_0222E3A0: + mov r0, #0x22 + ldrsh r0, [r6, r0] + add r0, r0, #1 + strh r0, [r6, #0x22] + mov r0, #0x22 + ldrsh r0, [r6, r0] + cmp r0, #0x14 + blt _0222E3F2 + ldr r0, [r7, #0x2c] + bl ov12_0222E248 + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x6e + bne _0222E3F2 + mov r1, #0 + mvn r1, r1 + ldr r0, [r5, #4] + add r2, r1, #0 + bl ov12_02235780 + ldr r0, [r5, #0x2c] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x34] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x38] + mov r1, #1 + bl sub_0200D810 + mov r0, #0xf + str r0, [r5, #0x54] + mov r0, #0 + str r0, [r5, #0x58] +_0222E3F2: + add r4, r4, #1 + add r6, r6, #2 + add r7, r7, #4 + cmp r4, #4 + blt _0222E3A0 + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x32 + bne _0222E436 + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _0222E610 ; =0x0000FFFF + str r0, [sp, #0x14] + ldr r0, _0222E614 ; =0x000003EA + str r0, [sp, #0x18] + ldr r3, [r5, #0x1c] + ldr r0, [r5, #0x18] + lsl r3, r3, #0x14 + lsr r3, r3, #0x10 + bl ov12_02226870 + str r0, [r5, #0x3c] +_0222E436: + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x3c + bne _0222E470 + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _0222E610 ; =0x0000FFFF + str r0, [sp, #0x14] + ldr r0, _0222E614 ; =0x000003EA + str r0, [sp, #0x18] + ldr r3, [r5, #0x1c] + ldr r0, [r5, #0x18] + lsl r3, r3, #0x14 + lsr r3, r3, #0x10 + bl ov12_02226870 + str r0, [r5, #0x40] +_0222E470: + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x46 + bne _0222E4AA + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _0222E610 ; =0x0000FFFF + str r0, [sp, #0x14] + ldr r0, _0222E614 ; =0x000003EA + str r0, [sp, #0x18] + ldr r3, [r5, #0x1c] + ldr r0, [r5, #0x18] + lsl r3, r3, #0x14 + lsr r3, r3, #0x10 + bl ov12_02226870 + str r0, [r5, #0x44] +_0222E4AA: + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x50 + bne _0222E4E4 + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _0222E610 ; =0x0000FFFF + str r0, [sp, #0x14] + ldr r0, _0222E614 ; =0x000003EA + str r0, [sp, #0x18] + ldr r3, [r5, #0x1c] + ldr r0, [r5, #0x18] + lsl r3, r3, #0x14 + lsr r3, r3, #0x10 + bl ov12_02226870 + str r0, [r5, #0x48] +_0222E4E4: + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x5a + bne _0222E51E + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _0222E610 ; =0x0000FFFF + str r0, [sp, #0x14] + ldr r0, _0222E614 ; =0x000003EA + str r0, [sp, #0x18] + ldr r3, [r5, #0x1c] + ldr r0, [r5, #0x18] + lsl r3, r3, #0x14 + lsr r3, r3, #0x10 + bl ov12_02226870 + str r0, [r5, #0x4c] +_0222E51E: + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x64 + bne _0222E558 + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _0222E610 ; =0x0000FFFF + str r0, [sp, #0x14] + ldr r0, _0222E614 ; =0x000003EA + str r0, [sp, #0x18] + ldr r3, [r5, #0x1c] + ldr r0, [r5, #0x18] + lsl r3, r3, #0x14 + lsr r3, r3, #0x10 + bl ov12_02226870 + str r0, [r5, #0x50] +_0222E558: + mov r1, #0x22 + ldrsh r0, [r5, r1] + cmp r0, #0x6e + bne _0222E592 + sub r1, #0x23 + ldr r0, [r5, #4] + add r2, r1, #0 + bl ov12_02235780 + ldr r0, [r5, #0x2c] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x34] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x38] + mov r1, #1 + bl sub_0200D810 + mov r0, #0xf + str r0, [r5, #0x54] + mov r0, #0 + str r0, [r5, #0x58] +_0222E592: + mov r0, #0x22 + ldrsh r0, [r5, r0] + cmp r0, #0x6e + blt _0222E5CA + ldr r0, [r5, #0x54] + cmp r0, #0 + ble _0222E5A4 + sub r0, r0, #1 + str r0, [r5, #0x54] +_0222E5A4: + ldr r0, [r5, #0x58] + cmp r0, #0xf + bge _0222E5AE + add r0, r0, #1 + str r0, [r5, #0x58] +_0222E5AE: + ldr r0, [r5, #0x58] + ldr r1, [r5, #0x54] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222E618 ; =0x04000052 + strh r1, [r0] + ldr r0, [r5, #0x54] + cmp r0, #0 + bne _0222E5CA + ldr r0, [r5, #0x58] + cmp r0, #0xf + bne _0222E5CA + mov r0, #4 + str r0, [sp, #0x20] +_0222E5CA: + ldr r0, [sp, #0x20] + cmp r0, #4 + bne _0222E606 + mov r6, #0 + add r4, r5, #0 +_0222E5D4: + ldr r0, [r4, #0x2c] + bl sub_0200D0F4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0222E5D4 + mov r6, #0 + add r4, r5, #0 +_0222E5E6: + ldr r0, [r4, #0x3c] + bl ov12_02226858 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #6 + blt _0222E5E6 + ldr r0, [r5, #4] + ldr r1, [sp, #0x1c] + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} +_0222E606: + ldr r0, [r5, #0x10] + bl sub_0200C7EC + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222E610: .word 0x0000FFFF +_0222E614: .word 0x000003EA +_0222E618: .word 0x04000052 + thumb_func_end ov12_0222E390 + + thumb_func_start ov12_0222E61C +ov12_0222E61C: ; 0x0222E61C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + mov r1, #0x5c + str r0, [sp] + add r5, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0xa + strh r0, [r4, #0x20] + ldr r0, [sp] + add r1, r4, #0 + bl ov12_0223595C + ldr r1, [r4, #4] + add r0, sp, #0xc + bl ov12_0222329C + str r5, [r4, #0x2c] + mov r0, #0 + strh r0, [r4, #0x22] + mov r0, #1 + str r0, [sp, #8] + mov r7, #5 + add r6, r4, #2 + add r5, r4, #4 +_0222E650: + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r2, r0, #0x1e + sub r2, r2, r1 + mov r0, #0x1e + ror r2, r0 + add r0, r1, r2 + add r0, r7, r0 + strh r0, [r6, #0x22] + ldr r0, [r4, #8] + ldr r1, [r4, #0x10] + add r2, sp, #0xc + bl sub_0200CE6C + str r0, [r5, #0x2c] + ldr r0, [sp, #8] + add r7, r7, #5 + add r0, r0, #1 + add r6, r6, #2 + add r5, r5, #4 + str r0, [sp, #8] + cmp r0, #4 + blt _0222E650 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D7D4 + ldr r0, [r4, #0x34] + mov r1, #1 + bl sub_0200D7D4 + ldr r0, [sp] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [sp] + bl ov12_022232FC + mov r1, #0 + add r5, r0, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + add r0, r5, #0 + mov r1, #0x29 + bl sub_020080C0 + ldr r0, [sp] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [sp] + bl ov12_0223525C + cmp r0, #3 + bne _0222E6D2 + mov r7, #0x8c + b _0222E6D4 +_0222E6D2: + mov r7, #0x54 +_0222E6D4: + mov r6, #0 + add r5, r4, #0 +_0222E6D8: + ldr r0, [r5, #0x2c] + ldr r1, [sp, #4] + add r2, r7, #0 + bl sub_0200D4C4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0222E6D8 + ldr r0, [sp] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [sp] + bl ov12_0223525C + cmp r0, #3 + ldr r0, [r4, #0x2c] + bne _0222E71E + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x34] + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x30] + mov r1, #0x12 + bl sub_0200D474 + ldr r0, [r4, #0x38] + mov r1, #0x12 + bl sub_0200D474 + b _0222E73C +_0222E71E: + mov r1, #0x12 + bl sub_0200D474 + ldr r0, [r4, #0x34] + mov r1, #0x12 + bl sub_0200D474 + ldr r0, [r4, #0x30] + mov r1, #0xa + bl sub_0200D474 + ldr r0, [r4, #0x38] + mov r1, #0xa + bl sub_0200D474 +_0222E73C: + mov r1, #0x1f + ldr r0, [r4, #0x2c] + mvn r1, r1 + mov r2, #0 + bl sub_0200D5DC + mov r1, #0x27 + ldr r0, [r4, #0x38] + mvn r1, r1 + mov r2, #4 + bl sub_0200D5DC + ldr r0, [r4, #0x34] + mov r1, #0x20 + mov r2, #0 + bl sub_0200D5DC + ldr r0, [r4, #0x30] + mov r1, #0x28 + mov r2, #4 + bl sub_0200D5DC + ldr r0, [r4, #0x2c] + bl sub_0200D43C + str r0, [r4, #0x1c] + ldr r0, [r4, #4] + ldr r1, _0222E780 ; =ov12_0222E390 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222E780: .word ov12_0222E390 + thumb_func_end ov12_0222E61C + + .rodata + + + .global Unk_ov12_0223A140 +Unk_ov12_0223A140: ; 0x0223A140 + .incbin "incbin/overlay12_rodata.bin", 0x1BAC, 0x1BB0 - 0x1BAC + + .global Unk_ov12_0223A144 +Unk_ov12_0223A144: ; 0x0223A144 + .incbin "incbin/overlay12_rodata.bin", 0x1BB0, 0x1BB6 - 0x1BB0 + + .global Unk_ov12_0223A14A +Unk_ov12_0223A14A: ; 0x0223A14A + .incbin "incbin/overlay12_rodata.bin", 0x1BB6, 0x1BCE - 0x1BB6 + + .global Unk_ov12_0223A162 +Unk_ov12_0223A162: ; 0x0223A162 + .incbin "incbin/overlay12_rodata.bin", 0x1BCE, 0x1BE6 - 0x1BCE + + .global Unk_ov12_0223A17A +Unk_ov12_0223A17A: ; 0x0223A17A + .incbin "incbin/overlay12_rodata.bin", 0x1BE6, 0x1C06 - 0x1BE6 + + .global Unk_ov12_0223A19A +Unk_ov12_0223A19A: ; 0x0223A19A + .incbin "incbin/overlay12_rodata.bin", 0x1C06, 0x30 + diff --git a/asm/ov12_0222E784.s b/asm/ov12_0222E784.s new file mode 100644 index 000000000..5fb2b1554 --- /dev/null +++ b/asm/ov12_0222E784.s @@ -0,0 +1,183 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222E784 +ov12_0222E784: ; 0x0222E784 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + bne _0222E80A + add r0, r4, #0 + add r0, #0x60 + bl ov12_02225F6C + cmp r0, #0 + bne _0222E7C8 + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl ov12_02235E80 + add sp, #0xc + pop {r4, r5, pc} +_0222E7C8: + add r0, r4, #0 + add r0, #0x60 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x28] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + bl sub_0200D6E8 + mov r0, #0 + str r0, [sp] + mov r1, #0x58 + mov r2, #0x5a + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x28] + ldr r3, [r4, #0x74] + bl ov12_0222605C + ldr r0, [r4, #0x28] + bl sub_0200D330 + ldr r0, [r4, #0x3c] + bl sub_0200D330 + ldr r0, [r4, #0x50] + bl sub_0200D330 + ldr r0, [r4, #0xc] + bl sub_0200C7EC +_0222E80A: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222E784 + + thumb_func_start ov12_0222E810 +ov12_0222E810: ; 0x0222E810 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x84 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + mov r1, #1 + str r0, [r4, #0x24] + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x58 + strh r0, [r1] + mov r0, #0x58 + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0x5c + strh r1, [r0] + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02223354 + add r1, r4, #0 + add r1, #0x5a + strh r0, [r1] + add r0, r5, #0 + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x28] + add r0, r5, #0 + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x3c] + add r0, r5, #0 + mov r1, #2 + bl ov12_022202C0 + str r0, [r4, #0x50] + ldr r0, [r4, #0x28] + mov r1, #2 + bl sub_0200D6A4 + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200D460 + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0200D460 + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x50] + bl sub_0200D460 + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232B8 + sub r0, r0, #3 + cmp r0, #1 + ldr r0, [r4, #0x28] + bhi _0222E8DE + mov r1, #0x1e + bl sub_0200D474 + ldr r0, [r4, #0x3c] + mov r1, #0x32 + bl sub_0200D474 + ldr r0, [r4, #0x50] + mov r1, #0x46 + bl sub_0200D474 + b _0222E8F4 +_0222E8DE: + mov r1, #0x3c + bl sub_0200D474 + ldr r0, [r4, #0x3c] + mov r1, #0x46 + bl sub_0200D474 + ldr r0, [r4, #0x50] + mov r1, #0x32 + bl sub_0200D474 +_0222E8F4: + mov r2, #0x14 + mov r1, #0x64 + str r2, [sp] + str r1, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x60 + add r3, r1, #0 + bl ov12_02225EF0 + ldr r0, [r4, #4] + ldr r1, _0222E918 ; =ov12_0222E784 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0222E918: .word ov12_0222E784 + thumb_func_end ov12_0222E810 \ No newline at end of file diff --git a/asm/ov12_0222E91C.s b/asm/ov12_0222E91C.s new file mode 100644 index 000000000..0fbb7bab5 --- /dev/null +++ b/asm/ov12_0222E91C.s @@ -0,0 +1,1673 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222E91C +ov12_0222E91C: ; 0x0222E91C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222E930 + cmp r0, #1 + beq _0222EA2E + b _0222EA7C +_0222E930: + add r0, r4, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + bne _0222E9AA + mov r0, #0x22 + ldrsh r3, [r4, r0] + mov r0, #0x20 + ldrsh r1, [r4, r0] + mov r0, #3 + add r2, r1, #0 + str r3, [sp] + add r2, #0x30 + str r0, [sp, #4] + add r0, r4, #0 + lsl r2, r2, #0x10 + add r0, #0x34 + asr r2, r2, #0x10 + bl ov12_02225BC8 + mov r0, #0x22 + ldrsh r1, [r4, r0] + mov r0, #0xa4 + ldrsh r0, [r4, r0] + add r2, r1, r0 + mov r0, #0x20 + ldrsh r1, [r4, r0] + lsl r0, r2, #0x10 + asr r3, r0, #0x10 + add r2, r1, #0 + add r2, #0x30 + lsl r2, r2, #0x10 + str r3, [sp] + mov r0, #6 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x58 + asr r2, r2, #0x10 + bl ov12_02225BC8 + mov r0, #0x22 + ldrsh r1, [r4, r0] + mov r0, #0xa4 + ldrsh r0, [r4, r0] + add r2, r1, r0 + mov r0, #0x20 + ldrsh r1, [r4, r0] + lsl r0, r2, #0x10 + asr r3, r0, #0x10 + add r2, r1, #0 + add r2, #0x30 + lsl r2, r2, #0x10 + str r3, [sp] + mov r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x7c + asr r2, r2, #0x10 + bl ov12_02225BC8 + b _0222EA18 +_0222E9AA: + mov r0, #0x22 + ldrsh r3, [r4, r0] + mov r0, #0x20 + ldrsh r2, [r4, r0] + mov r0, #3 + add r1, r2, #0 + str r3, [sp] + add r1, #0x30 + str r0, [sp, #4] + add r0, r4, #0 + lsl r1, r1, #0x10 + add r0, #0x34 + asr r1, r1, #0x10 + bl ov12_02225BC8 + mov r0, #0x22 + ldrsh r1, [r4, r0] + mov r0, #0xa4 + ldrsh r0, [r4, r0] + add r1, r1, r0 + mov r0, #0x20 + ldrsh r2, [r4, r0] + lsl r0, r1, #0x10 + asr r3, r0, #0x10 + add r1, r2, #0 + add r1, #0x30 + lsl r1, r1, #0x10 + str r3, [sp] + mov r0, #6 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x58 + asr r1, r1, #0x10 + bl ov12_02225BC8 + mov r0, #0x22 + ldrsh r1, [r4, r0] + mov r0, #0xa4 + ldrsh r0, [r4, r0] + add r1, r1, r0 + mov r0, #0x20 + ldrsh r2, [r4, r0] + lsl r0, r1, #0x10 + asr r3, r0, #0x10 + add r1, r2, #0 + add r1, #0x30 + lsl r1, r1, #0x10 + str r3, [sp] + mov r0, #9 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x7c + asr r1, r1, #0x10 + bl ov12_02225BC8 +_0222EA18: + add r0, r4, #0 + add r0, #0xa0 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xa0 + strb r1, [r0] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222EA8E +_0222EA2E: + add r0, r4, #0 + ldr r1, [r4, #0x28] + add r0, #0x58 + mov r5, #0 + bl ov12_02225C50 + cmp r0, #0 + bne _0222EA40 + add r5, r5, #1 +_0222EA40: + add r0, r4, #0 + ldr r1, [r4, #0x24] + add r0, #0x34 + bl ov12_02225C74 + cmp r0, #0 + bne _0222EA50 + add r5, r5, #1 +_0222EA50: + add r0, r4, #0 + ldr r1, [r4, #0x30] + add r0, #0x7c + bl ov12_02225C50 + cmp r0, #0 + bne _0222EA60 + add r5, r5, #1 +_0222EA60: + cmp r5, #3 + blt _0222EA8E + add r0, r4, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #1 + ldrb r0, [r4] + bne _0222EA76 + sub r0, r0, #1 + strb r0, [r4] + b _0222EA8E +_0222EA76: + add r0, r0, #1 + strb r0, [r4] + b _0222EA8E +_0222EA7C: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl ov12_02235E80 + add sp, #8 + pop {r3, r4, r5, pc} +_0222EA8E: + ldr r0, [r4, #0x28] + bl sub_0200D330 + ldr r0, [r4, #0xc] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222E91C + + thumb_func_start ov12_0222EAA0 +ov12_0222EAA0: ; 0x0222EAA0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + mov r1, #0xa8 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + add r0, r4, #0 + mov r1, #0 + add r0, #0xa1 + strb r1, [r0] + add r0, r4, #0 + mov r1, #8 + add r0, #0xa2 + strb r1, [r0] + add r0, r4, #0 + add r0, #0xa3 + strb r1, [r0] + sub r1, #9 + ldr r0, [r4, #4] + add r2, r1, #0 + bl ov12_02235780 + add r0, r4, #0 + add r0, #0xa2 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0xa3 + ldrb r0, [r0] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222EC10 ; =0x04000052 + strh r1, [r0] + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0x24] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x20] + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x22] + ldr r0, [r4, #4] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x28] + ldr r0, [r4, #4] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x30] + ldr r0, [r4, #0x24] + mov r1, #0x29 + bl sub_020080C0 + neg r1, r0 + add r0, r4, #0 + add r0, #0xa4 + strh r1, [r0] + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02223334 + add r7, r0, #0 + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02223344 + str r0, [sp, #0x18] + ldr r0, [r4, #4] + ldr r5, [r4, #0x28] + bl ov12_0222339C + add r1, r0, #0 + add r0, r5, #0 + add r1, r1, #1 + bl sub_0200D460 + ldr r0, [r5, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov12_0222332C + str r0, [sp, #0x1c] + ldr r0, [r4, #4] + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r6, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0xc4 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + add r2, r7, #0 + bl sub_02003B08 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #4] + ldr r5, [r4, #0x30] + bl ov12_0222339C + add r1, r0, #0 + add r0, r5, #0 + add r1, r1, #1 + bl sub_0200D460 + ldr r0, [r5, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov12_0222332C + str r0, [sp, #0x20] + ldr r0, [r4, #4] + bl ov12_0221FDE4 + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r6, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0xc4 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x18] + add r2, r7, #0 + bl sub_02003B08 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #4] + ldr r1, _0222EC14 ; =ov12_0222E91C + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_0222EC10: .word 0x04000052 +_0222EC14: .word ov12_0222E91C + thumb_func_end ov12_0222EAA0 + + thumb_func_start ov12_0222EC18 +ov12_0222EC18: ; 0x0222EC18 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r6, #0 + str r0, [sp] + str r1, [sp, #4] + add r7, r6, #0 + add r4, r1, #0 + add r5, r1, #0 +_0222EC28: + mov r0, #0x1e + ldrsh r0, [r4, r0] + add r0, r0, #1 + strh r0, [r4, #0x1e] + mov r0, #0x1e + ldrsh r0, [r4, r0] + cmp r0, #0x20 + blt _0222EC50 + ldr r0, [r5, #0x30] + bl ov12_0222E248 + mov r0, #0x1e + ldrsh r0, [r4, r0] + cmp r0, #0xa0 + blt _0222EC50 + ldr r0, [r5, #0x30] + mov r1, #0 + bl sub_0200D3F4 + add r6, r6, #1 +_0222EC50: + add r7, r7, #1 + add r4, r4, #2 + add r5, r5, #4 + cmp r7, #8 + blt _0222EC28 + cmp r6, #8 + bne _0222EC84 + ldr r4, [sp, #4] + mov r5, #0 +_0222EC62: + ldr r0, [r4, #0x30] + bl sub_0200D0F4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #8 + blt _0222EC62 + ldr r0, [sp, #4] + ldr r1, [sp] + ldr r0, [r0, #4] + bl ov12_02220220 + ldr r0, [sp, #4] + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0222EC84: + ldr r0, [sp, #4] + ldr r0, [r0, #0x10] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_0222EC18 + + thumb_func_start ov12_0222EC90 +ov12_0222EC90: ; 0x0222EC90 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + mov r1, #0x74 + add r6, r0, #0 + add r5, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + mov r0, #0xa + strh r0, [r4, #0x1c] + add r0, r6, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r1, [r4, #4] + add r0, sp, #0x24 + bl ov12_0222329C + str r5, [r4, #0x30] + mov r6, #1 + add r5, r4, #4 + mov r7, #0x1f +_0222ECBC: + ldr r0, [r4, #8] + ldr r1, [r4, #0x10] + add r2, sp, #0x24 + bl sub_0200CE6C + str r0, [r5, #0x30] + lsr r1, r6, #0x1f + lsl r0, r6, #0x1f + sub r0, r0, r1 + ror r0, r7 + add r0, r1, r0 + beq _0222ECDC + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D7D4 +_0222ECDC: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #8 + blt _0222ECBC + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + mov r1, #0 + add r5, r0, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + mov r1, #0 + str r0, [sp, #0x1c] + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [sp, #0x1c] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r0, #0x14 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x50 + add r1, r7, #0 + add r2, r6, #0 + add r3, r5, #0 + bl ov12_02225BC8 + mov r7, #0 + ldr r0, [r4, #4] + add r6, r7, #0 + str r7, [sp, #0x14] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_0223525C + cmp r0, #4 + bne _0222ED60 + mov r0, #1 + str r0, [sp, #0x14] +_0222ED60: + add r0, r4, #0 + str r0, [sp, #0x20] + add r0, #0x50 + add r5, r4, #0 + str r0, [sp, #0x20] +_0222ED6A: + ldr r0, [sp, #0x20] + bl ov12_02225C14 + str r0, [sp, #0x18] + lsr r2, r7, #0x1f + lsl r1, r7, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _0222EDA2 + ldr r0, [sp, #0x14] + cmp r0, #0 + bne _0222ED9E + cmp r6, #8 + bge _0222EDA2 + mov r1, #0x50 + mov r2, #0x52 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x30] + bl sub_0200D4C4 + add r5, r5, #4 + add r6, r6, #1 + b _0222EDA2 +_0222ED9E: + mov r0, #0 + str r0, [sp, #0x14] +_0222EDA2: + ldr r0, [sp, #0x18] + add r7, r7, #1 + cmp r0, #1 + beq _0222ED6A + ldr r0, [r4, #4] + mov r1, #1 + bl ov12_02223428 + str r0, [sp, #0x10] + ldr r0, [r4, #4] + mov r1, #2 + bl ov12_02223428 + add r7, r0, #0 + mov r6, #0 + str r4, [sp, #0xc] + add r5, r4, #0 +_0222EDC4: + mov r0, #8 + sub r0, r0, r6 + str r0, [sp, #8] + lsl r1, r0, #2 + ldr r0, [sp, #0xc] + strh r1, [r0, #0x1e] + ldr r0, [r4, #4] + bl ov12_0221FDD4 + cmp r0, #0 + bne _0222EE20 + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_0223525C + cmp r0, #3 + bne _0222EE02 + cmp r6, #4 + ldr r0, [r5, #0x30] + bge _0222EDFA + add r1, r7, #0 + bl sub_0200D460 + b _0222EE16 +_0222EDFA: + ldr r1, [sp, #0x10] + bl sub_0200D460 + b _0222EE16 +_0222EE02: + cmp r6, #4 + ldr r0, [r5, #0x30] + blt _0222EE10 + add r1, r7, #0 + bl sub_0200D460 + b _0222EE16 +_0222EE10: + ldr r1, [sp, #0x10] + bl sub_0200D460 +_0222EE16: + ldr r0, [r5, #0x30] + ldr r1, [sp, #8] + bl sub_0200D474 + b _0222EE30 +_0222EE20: + ldr r0, [r5, #0x30] + add r1, r6, #0 + bl sub_0200D474 + ldr r0, [r5, #0x30] + add r1, r7, #0 + bl sub_0200D460 +_0222EE30: + ldr r0, [sp, #0xc] + add r6, r6, #1 + add r0, r0, #2 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r6, #8 + blt _0222EDC4 + ldr r0, [r4, #4] + ldr r1, _0222EE4C ; =ov12_0222EC18 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222EE4C: .word ov12_0222EC18 + thumb_func_end ov12_0222EC90 + + thumb_func_start ov12_0222EE50 +ov12_0222EE50: ; 0x0222EE50 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5] + cmp r0, #0 + beq _0222EE66 + cmp r0, #1 + beq _0222EEF4 + cmp r0, #2 + b _0222EF52 +_0222EE66: + ldr r0, [r5, #0x28] + cmp r0, #0xe + ble _0222EEBC + ldr r0, [r5, #0x30] + ldr r1, _0222EF98 ; =0x3E4CCCCD + bl sub_020E1A9C + str r0, [r5, #0x30] + ldr r0, [r5, #0x2c] + ldr r1, _0222EF98 ; =0x3E4CCCCD + bl sub_020E0B00 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x30] + bl sub_020E16BC + ldr r2, _0222EF9C ; =0x9999999A + ldr r3, _0222EFA0 ; =0x3FC99999 + bl sub_020E0E54 + bhi _0222EEA0 + ldrb r0, [r5] + mov r1, #0 + add r0, r0, #1 + strb r0, [r5] + ldr r0, [r5, #0x1c] + bl sub_0200D3F4 + b _0222EF7A +_0222EEA0: + mov r0, #0x36 + ldrsb r0, [r5, r0] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, [r5, #0x2c] + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [r5, #0x1c] + ldr r2, [r5, #0x30] + bl sub_0200D6E8 + b _0222EF7A +_0222EEBC: + add r0, r5, #0 + add r0, #0x34 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x34 + strb r1, [r0] + add r0, r5, #0 + add r0, #0x35 + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0x35 + strb r1, [r0] + add r0, r5, #0 + add r0, #0x34 + ldrb r1, [r0] + add r0, r5, #0 + add r0, #0x35 + ldrb r0, [r0] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222EFA4 ; =0x04000052 + strh r1, [r0] + ldr r0, [r5, #0x28] + add r0, r0, #1 + str r0, [r5, #0x28] + b _0222EF7A +_0222EEF4: + ldr r0, [r5, #0x3c] + bl ov12_02226848 + cmp r0, #0 + bne _0222EF7A + ldr r0, [r5, #0x38] + bl ov12_02226858 + ldr r0, [r5, #0x3c] + bl ov12_02226858 + ldr r0, [r5, #0x24] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r4, r0, #0 + ldr r0, [r5, #4] + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + lsl r3, r4, #0x14 + str r2, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + str r2, [sp, #0x10] + ldr r0, _0222EFA8 ; =0x0000FFFF + mov r2, #2 + str r0, [sp, #0x14] + ldr r0, _0222EFAC ; =0x0000044C + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + ldr r0, [r5, #0x18] + bl ov12_02226870 + str r0, [r5, #0x3c] + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + b _0222EF7A +_0222EF52: + ldr r0, [r5, #0x3c] + bl ov12_02226848 + cmp r0, #0 + bne _0222EF7A + ldr r0, [r5, #0x20] + bl sub_0200D330 + ldr r0, [r5, #0x3c] + bl ov12_02226858 + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 + add sp, #0x1c + pop {r4, r5, pc} +_0222EF7A: + ldr r0, [r5, #0x1c] + bl sub_0200D330 + ldr r0, [r5, #0x20] + bl sub_0200D330 + ldr r0, [r5, #0x24] + bl sub_0200D330 + ldr r0, [r5, #0xc] + bl sub_0200C7EC + add sp, #0x1c + pop {r4, r5, pc} + nop +_0222EF98: .word 0x3E4CCCCD +_0222EF9C: .word 0x9999999A +_0222EFA0: .word 0x3FC99999 +_0222EFA4: .word 0x04000052 +_0222EFA8: .word 0x0000FFFF +_0222EFAC: .word 0x0000044C + thumb_func_end ov12_0222EE50 + + thumb_func_start ov12_0222EFB0 +ov12_0222EFB0: ; 0x0222EFB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + mov r1, #0x40 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r0, [r4, #4] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x1c] + ldr r0, [r4, #4] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x20] + ldr r0, [r4, #4] + mov r1, #2 + bl ov12_022202C0 + str r0, [r4, #0x24] + mov r6, #0 + str r6, [r4, #0x28] + add r0, r5, #0 + sub r6, #0x20 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_02225964 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + mul r0, r6 + add r6, r0, #0 + mov r0, #0xfe + lsl r0, r0, #0x16 + str r0, [r4, #0x2c] + str r0, [r4, #0x30] + add r0, r5, #0 + mov r1, #1 + bl ov12_022234A8 + cmp r0, #1 + bne _0222F01A + mov r1, #0 + mvn r1, r1 + b _0222F01C +_0222F01A: + mov r1, #1 +_0222F01C: + add r0, r4, #0 + add r0, #0x36 + strb r1, [r0] + add r1, sp, #0x24 + ldr r0, [r4, #0x20] + add r1, #2 + add r2, sp, #0x24 + bl sub_0200D550 + add r2, sp, #0x24 + mov r1, #2 + ldrsh r1, [r2, r1] + mov r3, #0 + ldrsh r2, [r2, r3] + add r1, r1, r6 + lsl r1, r1, #0x10 + ldr r0, [r4, #0x1c] + asr r1, r1, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #0x1c] + mov r1, #2 + bl sub_0200D6A4 + mov r0, #0x36 + ldrsb r0, [r4, r0] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, [r4, #0x2c] + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [r4, #0x1c] + ldr r2, [r4, #0x30] + bl sub_0200D6E8 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + lsl r3, r6, #0x14 + str r2, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r2, [sp, #0xc] + mov r0, #0xf + str r0, [sp, #0x10] + ldr r0, _0222F1F8 ; =0x0000FFFF + mov r2, #2 + str r0, [sp, #0x14] + ldr r0, _0222F1FC ; =0x0000044C + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + ldr r0, [r4, #0x18] + bl ov12_02226870 + str r0, [r4, #0x38] + ldr r0, [r4, #0x24] + ldr r0, [r0, #0] + bl sub_02021F9C + mov r1, #1 + bl sub_0201FAB4 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDE4 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + lsl r3, r6, #0x14 + str r2, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r2, [sp, #0xc] + mov r0, #0xf + str r0, [sp, #0x10] + ldr r0, _0222F1F8 ; =0x0000FFFF + mov r2, #2 + str r0, [sp, #0x14] + ldr r0, _0222F1FC ; =0x0000044C + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + ldr r0, [r4, #0x18] + bl ov12_02226870 + str r0, [r4, #0x3c] + ldr r0, [r4, #4] + bl ov12_02220240 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_02235254 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldr r0, [r4, #4] + bl ov12_0221FDD4 + add r1, r0, #0 + add r0, r5, #0 + add r2, sp, #0x2c + bl ov12_02235350 + add r2, sp, #0x28 + ldr r0, [r4, #0x1c] + add r1, sp, #0x28 + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #3 + bne _0222F138 + ldr r0, [r4, #0x1c] + mov r1, #1 + mov r5, #0 + bl sub_0200D460 + ldr r0, [r4, #0x1c] + add r1, r5, #0 + bl sub_0200D474 + b _0222F14A +_0222F138: + ldr r0, [r4, #0x1c] + mov r1, #2 + bl sub_0200D460 + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_0200D474 + mov r5, #2 +_0222F14A: + ldr r0, [r4, #4] + bl ov12_02220248 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_022232D0 + add r7, r0, #0 + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_022232C4 + str r0, [sp, #0x1c] + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_022232E0 + str r0, [sp, #0x20] + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_022232EC + ldr r1, [sp, #0x1c] + ldr r3, [sp, #0x20] + str r0, [sp] + lsl r0, r7, #0x10 + lsl r1, r1, #0x18 + lsl r2, r5, #0x18 + lsl r3, r3, #0x18 + lsr r0, r0, #0x10 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_02076648 + add r2, r0, #0 + add r5, sp, #0x24 + mov r3, #0xa + ldrsh r3, [r5, r3] + mov r1, #4 + ldrsh r1, [r5, r1] + add r2, r3, r2 + lsl r2, r2, #0x10 + ldr r0, [r4, #0x1c] + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_0200D3F4 + add r0, r4, #0 + mov r1, #0 + add r0, #0x34 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0xf + add r0, #0x35 + strb r1, [r0] + sub r1, #0x10 + ldr r0, [r4, #4] + add r2, r1, #0 + bl ov12_02235780 + add r0, r4, #0 + add r0, #0x34 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + add r2, r4, #0 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0222F200 ; =0x04000052 + strh r1, [r0] + ldr r0, [r4, #4] + ldr r1, _0222F204 ; =ov12_0222EE50 + bl ov12_022201E8 + add r1, r4, #0 + bl ov12_0222EE50 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222F1F8: .word 0x0000FFFF +_0222F1FC: .word 0x0000044C +_0222F200: .word 0x04000052 +_0222F204: .word ov12_0222EE50 + thumb_func_end ov12_0222EFB0 + + thumb_func_start ov12_0222F208 +ov12_0222F208: ; 0x0222F208 + push {r3, r4, r5, lr} + sub sp, #0x58 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0222F21C + cmp r0, #1 + beq _0222F262 + b _0222F2DC +_0222F21C: + ldr r0, [r4, #0x68] + mov r1, #0x20 + lsl r0, r0, #2 + add r2, r4, r0 + ldr r0, [r2, #0x78] + lsl r0, r0, #0x10 + asr r3, r0, #0x10 + str r3, [sp] + mov r0, #0xf + str r0, [sp, #4] + ldr r2, [r2, #0x6c] + add r0, r4, #0 + lsl r2, r2, #0x10 + ldrsh r1, [r4, r1] + add r0, #0x30 + asr r2, r2, #0x10 + bl ov12_02225BC8 + ldr r2, [r4, #0x68] + ldr r0, [r4, #0x24] + lsl r2, r2, #2 + add r2, r4, r2 + add r2, #0x84 + ldr r2, [r2, #0] + mov r1, #2 + bl sub_02007DEC + ldr r0, [r4, #0x24] + mov r1, #0x2c + mov r2, #1 + bl sub_02007DEC + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_0222F262: + add r0, r4, #0 + add r0, #0x30 + bl ov12_02225C14 + cmp r0, #0 + bne _0222F2C0 + ldr r0, [r4, #0x68] + add r0, r0, #1 + str r0, [r4, #0x68] + cmp r0, #2 + ble _0222F280 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _0222F2B6 +_0222F280: + ldr r0, [r4, #0x58] + cmp r0, #0 + bne _0222F2B2 + ldr r0, [r4, #4] + add r1, sp, #8 + mov r2, #3 + bl ov12_02220590 + ldr r0, [r4, #0x68] + cmp r0, #2 + ldr r0, [r4, #4] + bne _0222F2A6 + bl ov12_0221FDE4 + add r1, r0, #0 + add r0, sp, #8 + bl ov12_022382BC + b _0222F2B2 +_0222F2A6: + bl ov12_0221FDE4 + add r1, r0, #0 + add r0, sp, #8 + bl ov12_022380CC +_0222F2B2: + mov r0, #0 + strb r0, [r4] +_0222F2B6: + ldr r0, [r4, #0x24] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x20] +_0222F2C0: + mov r2, #0x30 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x24] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x32 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_02007DEC + add sp, #0x58 + pop {r3, r4, r5, pc} +_0222F2DC: + ldr r0, [r4, #0x24] + mov r1, #0x2c + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x58 + pop {r3, r4, r5, pc} + thumb_func_end ov12_0222F208 + + thumb_func_start ov12_0222F2F8 +ov12_0222F2F8: ; 0x0222F2F8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0x90 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223595C + ldr r0, [r4, #4] + bl ov12_02220240 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + add r2, r4, #0 + ldr r0, [r4, #4] + add r2, #0x5c + bl ov12_022353AC + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + add r2, r4, #0 + ldr r0, [r4, #4] + add r2, #0x60 + bl ov12_022353AC + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #3 + bne _0222F34A + mov r1, #1 + b _0222F34E +_0222F34A: + mov r1, #0 + mvn r1, r1 +_0222F34E: + add r0, r4, #0 + add r0, #0x54 + strh r1, [r0] + ldr r0, [r4, #4] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_0223525C + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_0223525C + cmp r6, r0 + bne _0222F37A + mov r0, #1 + b _0222F37C +_0222F37A: + mov r0, #0 +_0222F37C: + str r0, [r4, #0x58] + mov r1, #0 + add r0, r5, #0 + str r1, [r4, #0x68] + bl ov12_02220280 + add r2, r4, #0 + add r1, r0, #0 + add r0, r5, #0 + add r2, #0x1c + add r3, sp, #0 + bl ov12_02235998 + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_020080C0 + mov r1, #0x5e + ldrsh r2, [r4, r1] + mov r3, #0x54 + sub r0, r0, r2 + ldrsh r2, [r4, r3] + cmp r2, #0 + ble _0222F3EE + add r2, r3, #0 + add r2, #0xfb + str r2, [r4, #0x6c] + sub r3, #0xa4 + str r3, [r4, #0x70] + mov r2, #0x5c + ldrsh r2, [r4, r2] + str r2, [r4, #0x74] + ldrsh r2, [r4, r1] + add r2, r2, r0 + str r2, [r4, #0x78] + mov r2, #0x62 + ldrsh r2, [r4, r2] + add r2, r2, r0 + str r2, [r4, #0x7c] + ldrsh r1, [r4, r1] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0xa + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0222F444 ; =0xFFFFFD76 + add r0, #0x88 + str r1, [r0, #0] + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_020080C0 + b _0222F42E +_0222F3EE: + add r2, r3, #0 + sub r2, #0xa4 + str r2, [r4, #0x6c] + add r3, #0xfb + str r3, [r4, #0x70] + mov r2, #0x5c + ldrsh r2, [r4, r2] + str r2, [r4, #0x74] + ldrsh r2, [r4, r1] + add r2, r2, r0 + str r2, [r4, #0x78] + mov r2, #0x62 + ldrsh r2, [r4, r2] + add r2, r2, r0 + str r2, [r4, #0x7c] + ldrsh r1, [r4, r1] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0222F444 ; =0xFFFFFD76 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0xa + add r0, #0x88 + str r1, [r0, #0] + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_020080C0 +_0222F42E: + add r1, r4, #0 + add r1, #0x8c + str r0, [r1, #0] + ldr r0, [r4, #4] + ldr r1, _0222F448 ; =ov12_0222F208 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0222F444: .word 0xFFFFFD76 +_0222F448: .word ov12_0222F208 + thumb_func_end ov12_0222F2F8 + + thumb_func_start ov12_0222F44C +ov12_0222F44C: ; 0x0222F44C + push {r3, r4, lr} + sub sp, #4 + add r4, r2, #0 + ldr r2, [sp, #0x10] + str r2, [sp] + mov r2, #0x50 + sub r2, r2, r3 + add r3, r4, #0 + bl sub_020086D4 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_0222F44C + + thumb_func_start ov12_0222F464 +ov12_0222F464: ; 0x0222F464 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #3 + bls _0222F478 + b _0222F59A +_0222F478: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222F484: ; jump table + .short _0222F48C - _0222F484 - 2 ; case 0 + .short _0222F4E8 - _0222F484 - 2 ; case 1 + .short _0222F52A - _0222F484 - 2 ; case 2 + .short _0222F580 - _0222F484 - 2 ; case 3 +_0222F48C: + ldr r2, [r4, #0x10] + add r2, #0x4f + str r2, [r4, #0x10] + cmp r2, #0x50 + blt _0222F4B4 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add sp, #4 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] + ldr r1, [r4, #0x14] + mov r0, #1 + eor r0, r1 + str r0, [r4, #0x14] + mov r0, #0 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, pc} +_0222F4B4: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _0222F4D0 + mov r0, #2 + str r0, [sp] + ldr r3, [r4, #0] + ldr r0, [r4, #0x1c] + add r3, r3, #2 + mov r1, #0 + lsl r3, r3, #1 + bl ov12_0222F44C + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222F4D0: + mov r0, #2 + str r0, [sp] + ldr r3, [r4, #0] + mov r1, #0x50 + add r3, r3, #2 + ldr r0, [r4, #0x1c] + sub r1, r1, r2 + lsl r3, r3, #1 + bl ov12_0222F44C + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222F4E8: + ldr r0, [r4, #4] + mov r3, #0xff + sub r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0xc] + lsl r3, r3, #8 + add r2, r0, #1 + str r2, [r4, #0xc] + ldr r6, [r4, #8] + ldr r1, [r4, #4] + lsl r0, r6, #8 + add r5, r0, #0 + add r6, #0x50 + lsl r0, r6, #0x18 + and r5, r3 + lsr r0, r0, #0x18 + lsl r1, r1, #8 + orr r5, r0 + ldr r0, _0222F5E4 ; =0x04000040 + and r3, r1 + lsl r1, r2, #0x18 + lsr r1, r1, #0x18 + strh r5, [r0] + orr r1, r3 + strh r1, [r0, #4] + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222F52A: + ldr r0, [r4, #4] + mov r3, #0xff + sub r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0xc] + lsl r3, r3, #8 + add r2, r0, #1 + str r2, [r4, #0xc] + ldr r6, [r4, #8] + ldr r1, [r4, #4] + lsl r0, r6, #8 + add r5, r0, #0 + add r6, #0x50 + lsl r0, r6, #0x18 + and r5, r3 + lsr r0, r0, #0x18 + lsl r1, r1, #8 + orr r5, r0 + ldr r0, _0222F5E4 ; =0x04000040 + and r3, r1 + lsl r1, r2, #0x18 + lsr r1, r1, #0x18 + strh r5, [r0] + orr r1, r3 + strh r1, [r0, #4] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + cmp r0, #0x26 + ble _0222F576 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222F576: + mov r0, #0 + add r4, #0x20 + add sp, #4 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222F580: + ldr r0, [r4, #0x1c] + mov r1, #0xe + mov r2, #0 + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #4 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0222F59A: + mov r0, #1 + lsl r0, r0, #0x1a + ldr r3, [r0, #0] + ldr r1, _0222F5E8 ; =0xFFFF1FFF + and r1, r3 + add r3, r0, #0 + str r1, [r0, #0] + add r3, #0x48 + ldrh r5, [r3] + mov r1, #0x3f + bic r5, r1 + strh r5, [r3] + add r3, r0, #0 + add r3, #0x4a + ldrh r5, [r3] + bic r5, r1 + add r1, r0, #0 + strh r5, [r3] + mov r3, #0 + add r1, #0x40 + strh r3, [r1] + add r0, #0x44 + strh r3, [r0] + ldr r0, [r4, #0x24] + add r1, r2, #0 + bl ov12_02220220 + ldr r0, [r4, #0x1c] + ldr r2, [r4, #0x18] + mov r1, #0x17 + bl sub_02007DEC + add r0, r4, #0 + bl sub_020181C4 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0222F5E4: .word 0x04000040 +_0222F5E8: .word 0xFFFF1FFF + thumb_func_end ov12_0222F464 + + thumb_func_start ov12_0222F5EC +ov12_0222F5EC: ; 0x0222F5EC + push {r4, r5, r6, lr} + mov r1, #0x50 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x20 + bl ov12_0223595C + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_022232FC + str r0, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_02235254 + cmp r0, #3 + beq _0222F62C + cmp r0, #4 + bne _0222F640 +_0222F62C: + add r0, r5, #0 + bl ov12_0222339C + add r1, r0, #0 + sub r1, r1, #1 + lsl r1, r1, #0x18 + mov r0, #2 + lsr r1, r1, #0x18 + bl sub_02019060 +_0222F640: + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0x1c] + mov r1, #0x29 + bl sub_020080C0 + sub r0, r5, r0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0x1c] + mov r1, #0x17 + bl sub_020080C0 + str r0, [r4, #0x18] + ldr r0, [r4, #0x1c] + mov r1, #0x17 + mov r2, #8 + bl sub_02007DEC + sub r6, #0x28 + str r6, [r4, #8] + add r5, #0x28 + mov r6, #1 + lsl r6, r6, #0x1a + add r3, r6, #0 + str r5, [r4, #4] + mov r1, #0 + str r1, [r4, #0x10] + ldr r0, [r4, #4] + add r3, #0x48 + str r0, [r4, #0xc] + str r1, [r4, #0x14] + ldr r1, [r6, #0] + ldr r0, _0222F6F8 ; =0xFFFF1FFF + and r1, r0 + lsr r0, r6, #0xd + orr r0, r1 + str r0, [r6, #0] + ldrh r2, [r3] + mov r1, #0x3f + mov r0, #0x1f + bic r2, r1 + orr r0, r2 + mov r2, #0x20 + orr r0, r2 + strh r0, [r3] + add r3, r6, #0 + add r3, #0x4a + ldrh r5, [r3] + mov r0, #0x1b + bic r5, r1 + orr r0, r5 + orr r0, r2 + strh r0, [r3] + ldr r2, [r4, #8] + mov r0, #0xff + lsl r1, r2, #8 + add r2, #0x50 + lsl r0, r0, #8 + lsl r2, r2, #0x18 + and r1, r0 + lsr r2, r2, #0x18 + orr r2, r1 + add r1, r6, #0 + ldr r5, [r4, #0xc] + ldr r3, [r4, #4] + add r1, #0x40 + strh r2, [r1] + lsl r1, r3, #8 + and r1, r0 + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + orr r0, r1 + add r6, #0x44 + strh r0, [r6] + ldr r0, [r4, #0x24] + ldr r1, _0222F6FC ; =ov12_0222F464 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + nop +_0222F6F8: .word 0xFFFF1FFF +_0222F6FC: .word ov12_0222F464 + thumb_func_end ov12_0222F5EC \ No newline at end of file diff --git a/asm/ov12_0222F700.s b/asm/ov12_0222F700.s new file mode 100644 index 000000000..077919cd7 --- /dev/null +++ b/asm/ov12_0222F700.s @@ -0,0 +1,9863 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_0222F700 +ov12_0222F700: ; 0x0222F700 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + mov r1, #0xe8 + mov r2, #0xea + add r5, r0, #0 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #8] + add r0, #0xc + bl ov12_02225BA0 + str r0, [sp] + add r0, r4, #0 + add r0, #0x38 + bl ov12_02226274 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_0200C7EC + mov r1, #0 + add r2, sp, #0 +_0222F734: + ldr r0, [r2, #0] + cmp r0, #1 + beq _0222F76A + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #3 + blt _0222F734 + mov r2, #0xe8 + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02007DEC + mov r2, #0xea + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #1 + sub r2, #8 + bl sub_02007DEC + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222F76A: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222F700 + + thumb_func_start ov12_0222F770 +ov12_0222F770: ; 0x0222F770 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0xf0 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #4] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #8] + bl sub_020080C0 + add r1, r4, #0 + add r1, #0xe8 + strh r0, [r1] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0xea + strh r0, [r1] + ldr r0, [r4, #8] + mov r1, #0x29 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0xec + strh r0, [r1] + mov r0, #0xea + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xea + add r1, #8 + strh r1, [r0] + add r0, r4, #0 + add r0, #0xc + mov r1, #1 + mov r2, #8 + bl ov12_022263A4 + add r0, sp, #0x20 + mov r1, #1 + mov r2, #0xa + bl ov12_022263A4 + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + ldr r1, [r4, #0x18] + mov r6, #0 + add r2, r1, #0 + mul r2, r0 + str r2, [r4, #0x18] + ldr r1, [sp, #0x2c] + add r5, r4, #0 + mul r0, r1 + str r0, [sp, #0x2c] + mov r7, #0x64 +_0222F808: + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov12_022202C0 + str r0, [r5, #0x30] + add r1, r7, #0 + bl sub_0200D474 + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D810 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _0222F808 + mov r0, #0xea + ldrsh r1, [r4, r0] + mov r0, #0xec + ldrsh r0, [r4, r0] + mov r3, #0xe8 + ldr r2, _0222F880 ; =ov12_02225AE0 + sub r0, r1, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0x30] + str r0, [sp, #0x10] + ldr r0, [r4, #0x34] + str r0, [sp, #0x14] + str r1, [sp, #0x18] + str r1, [sp, #0x1c] + add r0, r4, #0 + ldrsh r3, [r4, r3] + add r0, #0x38 + add r1, sp, #0x20 + bl ov12_022261C4 + mov r1, #0 + mvn r1, r1 + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov12_02235780 + ldr r0, [r4, #0] + ldr r1, _0222F884 ; =ov12_0222F700 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222F880: .word ov12_02225AE0 +_0222F884: .word ov12_0222F700 + thumb_func_end ov12_0222F770 + + thumb_func_start ov12_0222F888 +ov12_0222F888: ; 0x0222F888 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #6 + bls _0222F898 + b _0222F9DE +_0222F898: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222F8A4: ; jump table + .short _0222F8B2 - _0222F8A4 - 2 ; case 0 + .short _0222F8F4 - _0222F8A4 - 2 ; case 1 + .short _0222F92A - _0222F8A4 - 2 ; case 2 + .short _0222F942 - _0222F8A4 - 2 ; case 3 + .short _0222F972 - _0222F8A4 - 2 ; case 4 + .short _0222F98A - _0222F8A4 - 2 ; case 5 + .short _0222F9AE - _0222F8A4 - 2 ; case 6 +_0222F8B2: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225C14 + cmp r0, #0 + beq _0222F8D4 + mov r2, #0x48 + mov r3, #0x4a + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_02225A18 + add sp, #8 + pop {r3, r4, r5, pc} +_0222F8D4: + mov r2, #0 + str r2, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0x10 + add r0, r4, #0 + ldrsh r1, [r4, r1] + add r0, #0x10 + add r3, r2, #0 + bl ov12_02225BC8 + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0222F8F4: + add r0, r4, #0 + add r0, #0x34 + bl ov12_02225DA0 + cmp r0, #0 + beq _0222F90E + ldr r0, [r4, #0xc] + ldr r2, [r4, #0x34] + mov r1, #9 + bl sub_02007DEC + add sp, #8 + pop {r3, r4, r5, pc} +_0222F90E: + add r0, r4, #0 + ldr r1, [r4, #0x34] + add r0, #0x34 + mov r2, #0 + mov r3, #4 + bl ov12_02225D50 + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #2 + strh r0, [r4, #8] + pop {r3, r4, r5, pc} +_0222F92A: + mov r0, #8 + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, #8] + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _0222F9DE + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0222F942: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225C14 + cmp r0, #0 + beq _0222F964 + mov r2, #0x48 + mov r3, #0x4a + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_02225A18 + add sp, #8 + pop {r3, r4, r5, pc} +_0222F964: + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0x20 + strh r0, [r4, #8] + pop {r3, r4, r5, pc} +_0222F972: + mov r0, #8 + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, #8] + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _0222F9DE + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0222F98A: + add r0, r4, #0 + add r0, #0x34 + bl ov12_02225DA0 + cmp r0, #0 + beq _0222F9A4 + ldr r0, [r4, #0xc] + ldr r2, [r4, #0x34] + mov r1, #9 + bl sub_02007DEC + add sp, #8 + pop {r3, r4, r5, pc} +_0222F9A4: + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0222F9AE: + mov r2, #0x48 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x4a + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0xc] + mov r1, #9 + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0222F9DE: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0222F888 + + thumb_func_start ov12_0222F9E4 +ov12_0222F9E4: ; 0x0222F9E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0xf0 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #0xc] + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x48 + strh r0, [r1] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x4a + strh r0, [r1] + mov r1, #0 + add r0, r4, #0 + str r1, [sp] + mov r2, #3 + str r2, [sp, #4] + add r0, #0x10 + sub r2, #0x23 + add r3, r1, #0 + bl ov12_02225BC8 + add r0, r4, #0 + ldr r2, _0222FAF4 ; =0x00000E38 + add r0, #0x34 + mov r1, #0 + mov r3, #8 + bl ov12_02225D50 + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + ldr r1, [r4, #0x18] + add r2, r1, #0 + mul r2, r0 + str r2, [r4, #0x18] + ldr r1, [r4, #0x3c] + mul r0, r1 + str r0, [r4, #0x3c] + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r6, #3 + bne _0222FAB2 + cmp r0, #3 + bne _0222FAB2 + mov r1, #0xa + add r2, r1, #0 + ldr r0, [r4, #0xc] + sub r2, #0x32 + bl sub_02007DEC + ldr r0, [r4, #0xc] + mov r1, #0xb + mov r2, #0x28 + bl sub_02007DEC + b _0222FAE6 +_0222FAB2: + cmp r6, #4 + bne _0222FAD0 + cmp r0, #4 + bne _0222FAD0 + ldr r0, [r4, #0xc] + mov r1, #0xa + mov r2, #0x28 + bl sub_02007DEC + ldr r0, [r4, #0xc] + mov r1, #0xb + mov r2, #0x28 + bl sub_02007DEC + b _0222FAE6 +_0222FAD0: + mov r2, #0x28 + ldr r0, [r4, #0xc] + mov r1, #0xa + mul r2, r7 + bl sub_02007DEC + ldr r0, [r4, #0xc] + mov r1, #0xb + mov r2, #0x28 + bl sub_02007DEC +_0222FAE6: + ldr r0, [r4, #0] + ldr r1, _0222FAF8 ; =ov12_0222F888 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222FAF4: .word 0x00000E38 +_0222FAF8: .word ov12_0222F888 + thumb_func_end ov12_0222F9E4 + + thumb_func_start ov12_0222FAFC +ov12_0222FAFC: ; 0x0222FAFC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r4, [sp, #0x10] + bl sub_0200CE6C + str r0, [r5, #0] + add r6, r4, #4 + add r3, r5, #4 + mov r2, #4 +_0222FB14: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0222FB14 + ldr r0, [r6, #0] + add r2, r5, #0 + str r0, [r3, #0] + add r3, r4, #0 + add r3, #0x28 + ldmia r3!, {r0, r1} + add r2, #0x28 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + mov r0, #0x3c + ldrsh r0, [r4, r0] + strh r0, [r5, #0x3c] + mov r0, #0x3e + ldrsh r0, [r4, r0] + strh r0, [r5, #0x3e] + mov r0, #0x40 + ldrsh r1, [r4, r0] + add r0, r5, #0 + add r0, #0x40 + strh r1, [r0] + ldr r0, [r4, #0x44] + mov r1, #0 + str r0, [r5, #0x44] + str r1, [r5, #0x48] + ldr r0, [r5, #0] + bl sub_0200D3F4 + ldr r0, [r5, #0] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_0200D460 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_0222FAFC + + thumb_func_start ov12_0222FB6C +ov12_0222FB6C: ; 0x0222FB6C + ldr r3, _0222FB74 ; =sub_0200D0F4 + ldr r0, [r0, #0] + bx r3 + nop +_0222FB74: .word sub_0200D0F4 + thumb_func_end ov12_0222FB6C + + thumb_func_start ov12_0222FB78 +ov12_0222FB78: ; 0x0222FB78 + ldr r3, _0222FB80 ; =sub_0200D3F4 + ldr r0, [r0, #0] + bx r3 + nop +_0222FB80: .word sub_0200D3F4 + thumb_func_end ov12_0222FB78 + + thumb_func_start ov12_0222FB84 +ov12_0222FB84: ; 0x0222FB84 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #0x48] + cmp r0, #0 + bne _0222FB96 + add sp, #0x10 + mov r0, #1 + pop {r4, pc} +_0222FB96: + ldr r0, [r4, #0x44] + cmp r0, #0 + beq _0222FBA6 + cmp r0, #1 + beq _0222FBA6 + cmp r0, #2 + beq _0222FC28 + b _0222FC2E +_0222FBA6: + add r0, r4, #4 + bl ov12_02225AE0 + cmp r0, #0 + beq _0222FBE6 + add r0, r4, #0 + add r0, #0x28 + bl ov12_02225E0C + mov r0, #0x3c + ldrsh r1, [r4, r0] + ldr r0, [r4, #0x28] + add r0, r1, r0 + str r0, [r4, #0x1c] + mov r1, #0x3e + ldrsh r2, [r4, r1] + mov r1, #4 + ldrsh r1, [r4, r1] + ldr r0, [r4, #0] + add r1, r2, r1 + mov r2, #0x40 + ldrsh r3, [r4, r2] + mov r2, #6 + ldrsh r2, [r4, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + b _0222FC2E +_0222FBE6: + ldr r0, [r4, #0x44] + cmp r0, #1 + bge _0222FC20 + cmp r0, #0 + bne _0222FC0E + ldr r1, [r4, #0xc] + ldr r2, _0222FC34 ; =0x00007FFF + lsl r1, r1, #0x10 + str r2, [sp] + ldr r0, [r4, #0x10] + lsr r1, r1, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #0x18] + add r3, r1, #0 + str r0, [sp, #8] + ldr r0, _0222FC38 ; =0x0000071C + str r0, [sp, #0xc] + add r0, r4, #4 + bl ov12_02225A8C +_0222FC0E: + ldr r0, [r4, #8] + ldr r2, _0222FC3C ; =0x0000FFFF + str r0, [sp] + add r0, r4, #0 + ldr r3, _0222FC40 ; =0xFFFFF000 + add r0, #0x28 + mov r1, #0 + bl ov12_02225DF4 +_0222FC20: + ldr r0, [r4, #0x44] + add r0, r0, #1 + str r0, [r4, #0x44] + b _0222FC2E +_0222FC28: + add sp, #0x10 + mov r0, #0 + pop {r4, pc} +_0222FC2E: + mov r0, #1 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0222FC34: .word 0x00007FFF +_0222FC38: .word 0x0000071C +_0222FC3C: .word 0x0000FFFF +_0222FC40: .word 0xFFFFF000 + thumb_func_end ov12_0222FB84 + + thumb_func_start ov12_0222FC44 +ov12_0222FC44: ; 0x0222FC44 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + cmp r0, #6 + bhi _0222FCB8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222FC60: ; jump table + .short _0222FC6E - _0222FC60 - 2 ; case 0 + .short _0222FC86 - _0222FC60 - 2 ; case 1 + .short _0222FCD2 - _0222FC60 - 2 ; case 2 + .short _0222FCE8 - _0222FC60 - 2 ; case 3 + .short _0222FD88 - _0222FC60 - 2 ; case 4 + .short _0222FDB2 - _0222FC60 - 2 ; case 5 + .short _0222FDF2 - _0222FC60 - 2 ; case 6 +_0222FC6E: + add r0, r4, #0 + add r0, #0xc + bl ov12_0222FB84 + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + b _0222FE1C +_0222FC86: + add r0, r4, #0 + add r0, #0xfc + ldr r1, [r0, #0] + add r0, r4, #0 + add r1, #0xa + add r0, #0xfc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xfc + ldr r0, [r0, #0] + mov r1, #0xa + bl sub_020E1F6C + mov r1, #0x1f + sub r1, r1, r0 + lsl r1, r1, #8 + orr r1, r0 + ldr r0, _0222FE24 ; =0x04000052 + strh r1, [r0] + add r0, r4, #0 + add r0, #0xfc + ldr r1, [r0, #0] + ldr r0, _0222FE28 ; =0x00000136 + cmp r1, r0 + bge _0222FCBA +_0222FCB8: + b _0222FE1C +_0222FCBA: + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_0200D810 + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + b _0222FE1C +_0222FCD2: + ldr r1, _0222FE2C ; =0x0000FFFF + ldr r0, _0222FE24 ; =0x04000052 + strh r1, [r0] + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + b _0222FE1C +_0222FCE8: + add r0, r4, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + cmp r0, #0 + bgt _0222FD2C + add r0, r4, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + mov r2, #0x4c + add r3, r0, #0 + mul r3, r2 + add r0, r4, r3 + mov r1, #1 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + mul r2, r0 + add r0, r4, r2 + ldr r0, [r0, #0x58] + bl sub_0200D3F4 + add r0, r4, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #8 + add r0, #0xf4 + str r1, [r0, #0] +_0222FD2C: + add r0, r4, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + cmp r0, #2 + bge _0222FD44 + add r0, r4, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xf4 + str r1, [r0, #0] +_0222FD44: + add r0, r4, #0 + add r0, #0xc + bl ov12_0222FB84 + add r5, r4, #0 + add r6, r0, #0 + mov r7, #0 + add r5, #0x58 +_0222FD54: + add r0, r5, #0 + bl ov12_0222FB84 + str r0, [sp] + cmp r0, #0 + bne _0222FD68 + add r0, r5, #0 + mov r1, #0 + bl ov12_0222FB78 +_0222FD68: + ldr r0, [sp] + add r7, r7, #1 + orr r6, r0 + add r5, #0x4c + cmp r7, #2 + blt _0222FD54 + cmp r6, #0 + bne _0222FE1C + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + b _0222FE1C +_0222FD88: + ldr r0, [r4, #0xc] + bl sub_0200D330 + ldr r0, [r4, #0xc] + ldr r0, [r0, #0] + bl sub_02021FD0 + cmp r0, #0 + bne _0222FE1C + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0200D810 + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + b _0222FE1C +_0222FDB2: + add r0, r4, #0 + add r0, #0xfc + ldr r1, [r0, #0] + add r0, r4, #0 + sub r1, #0xa + add r0, #0xfc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xfc + ldr r0, [r0, #0] + mov r1, #0xa + bl sub_020E1F6C + mov r1, #0x1f + sub r1, r1, r0 + lsl r1, r1, #8 + orr r1, r0 + ldr r0, _0222FE24 ; =0x04000052 + strh r1, [r0] + add r0, r4, #0 + add r0, #0xfc + ldr r0, [r0, #0] + cmp r0, #0 + bgt _0222FE1C + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + b _0222FE1C +_0222FDF2: + add r5, r4, #0 + mov r6, #0 + add r5, #0x58 +_0222FDF8: + add r0, r5, #0 + bl ov12_0222FB6C + add r6, r6, #1 + add r5, #0x4c + cmp r6, #2 + blt _0222FDF8 + ldr r0, [r4, #0xc] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_0222FE1C: + ldr r0, [r4, #8] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222FE24: .word 0x04000052 +_0222FE28: .word 0x00000136 +_0222FE2C: .word 0x0000FFFF + thumb_func_end ov12_0222FC44 + + thumb_func_start ov12_0222FE30 +ov12_0222FE30: ; 0x0222FE30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp, #0x10] + bl ov12_0221FDE4 + mov r1, #1 + lsl r1, r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + mov r1, #8 + add r0, #0xf4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + ldr r1, [sp, #0x10] + lsl r0, r0, #0x11 + str r1, [r4, #0xc] + mov r1, #0 + str r1, [r4, #0x50] + ldr r2, _0222FF68 ; =0x0000BFFF + neg r0, r0 + str r2, [sp] + str r0, [sp, #4] + ldr r1, _0222FF6C ; =0xFFFF8000 + ldr r0, _0222FF70 ; =0x0000071C + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + lsr r1, r1, #0x12 + add r0, #0x10 + add r3, r1, #0 + bl ov12_02225A8C + ldr r0, [r4, #0x14] + ldr r2, _0222FF74 ; =0x0000FFFF + str r0, [sp] + add r0, r4, #0 + ldr r3, _0222FF78 ; =0xFFFFF000 + add r0, #0x34 + mov r1, #0 + bl ov12_02225DF4 + add r0, r4, #0 + ldr r1, [r4, #0x28] + add r0, #0x48 + strh r1, [r0] + mov r0, #1 + str r0, [r4, #0x54] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov12_022258E0 + add r1, r4, #0 + add r1, #0x4a + strh r0, [r1] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + bl ov12_022258E0 + add r1, r4, #0 + add r1, #0x4c + strh r0, [r1] + mov r1, #0x4a + mov r2, #0x4c + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + bl sub_0200D4C4 + ldr r0, [r4, #0xc] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0200D460 + ldr r1, [r4, #0] + add r0, sp, #0x14 + bl ov12_0222329C + mov r0, #0x4a + ldrsh r0, [r4, r0] + add r1, sp, #0x14 + add r5, r4, #0 + strh r0, [r1] + mov r0, #0x4c + ldrsh r0, [r4, r0] + add r7, r4, #0 + mov r6, #0 + strh r0, [r1, #2] + add r5, #0x58 + add r7, #0xc +_0222FF16: + str r7, [sp] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + add r0, r5, #0 + add r3, sp, #0x14 + bl ov12_0222FAFC + add r6, r6, #1 + add r5, #0x4c + cmp r6, #2 + blt _0222FF16 + add r0, r4, #0 + mov r1, #0 + add r0, #0xfc + str r1, [r0, #0] + ldr r0, [r4, #0] + mov r2, #0x1f + bl ov12_02235780 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0200D810 + mov r6, #0 + add r5, r4, #0 + mov r7, #1 +_0222FF4A: + ldr r0, [r5, #0x58] + add r1, r7, #0 + bl sub_0200D810 + add r6, r6, #1 + add r5, #0x4c + cmp r6, #2 + blt _0222FF4A + ldr r0, [r4, #0] + ldr r1, _0222FF7C ; =ov12_0222FC44 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222FF68: .word 0x0000BFFF +_0222FF6C: .word 0xFFFF8000 +_0222FF70: .word 0x0000071C +_0222FF74: .word 0x0000FFFF +_0222FF78: .word 0xFFFFF000 +_0222FF7C: .word ov12_0222FC44 + thumb_func_end ov12_0222FE30 + + thumb_func_start ov12_0222FF80 +ov12_0222FF80: ; 0x0222FF80 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r2, #0x60 + ldrsh r3, [r4, r2] + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x5c] + mov r1, #0 + add r2, r3, r2 + bl sub_02007DEC + mov r2, #0x62 + ldrsh r3, [r4, r2] + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x5c] + mov r1, #1 + add r2, r3, r2 + bl sub_02007DEC + mov r1, #0x60 + ldrsh r2, [r4, r1] + mov r1, #0x10 + ldrsh r1, [r4, r1] + ldr r0, [r4, #0x58] + add r1, r2, r1 + mov r2, #0x62 + ldrsh r3, [r4, r2] + mov r2, #0x12 + ldrsh r2, [r4, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r3, r3, r2 + mov r2, #0x66 + ldrsh r2, [r4, r2] + sub r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add r0, r4, #0 + add r0, #0x34 + add r1, sp, #4 + add r2, sp, #0 + bl ov12_02225FA4 + mov r0, #0x64 + ldrsh r0, [r4, r0] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, _02230014 ; =0x3DCCCCCD + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [sp, #4] + bl sub_020E0B00 + add r1, r0, #0 + str r1, [sp, #4] + ldr r0, [r4, #0x58] + ldr r2, [sp] + bl sub_0200D6E8 + mov r0, #0x64 + ldrsh r1, [r4, r0] + sub r0, #0x65 + add r4, #0x64 + mul r0, r1 + strh r0, [r4] + add sp, #8 + pop {r4, pc} + nop +_02230014: .word 0x3DCCCCCD + thumb_func_end ov12_0222FF80 + + thumb_func_start ov12_02230018 +ov12_02230018: ; 0x02230018 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02230030 + cmp r0, #1 + beq _0223006A + cmp r0, #2 + beq _022300A6 + b _022300B8 +_02230030: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02226138 + add r0, r4, #0 + add r0, #0x34 + bl ov12_02225F6C + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0222FF80 + cmp r5, #0 + bne _022300B8 + mov r2, #0xa + str r2, [sp] + str r2, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x34 + mov r1, #0xc + mov r3, #0xf + bl ov12_02225EF0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022300B8 +_0223006A: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02226138 + add r0, r4, #0 + add r0, #0x34 + bl ov12_02225F6C + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0222FF80 + cmp r5, #0 + bne _022300B8 + mov r2, #0x60 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x5c] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x62 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022300B8 +_022300A6: + ldr r0, [r4, #0] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, pc} +_022300B8: + ldr r0, [r4, #4] + bl sub_0200C7EC + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02230018 + + thumb_func_start ov12_022300C4 +ov12_022300C4: ; 0x022300C4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x68 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #8] + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #0x5c] + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x60 + strh r0, [r1] + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x62 + strh r0, [r1] + ldr r0, [r4, #0x5c] + mov r1, #0x29 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x66 + strh r0, [r1] + mov r0, #6 + str r0, [sp] + add r0, r4, #0 + add r0, #0x10 + mov r1, #2 + mov r2, #0 + mov r3, #1 + bl ov12_02226108 + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x58] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x58] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x58] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x58] + mov r1, #1 + bl sub_0200D460 + mov r0, #0xf + str r0, [sp] + mov r1, #0xa + str r1, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x34 + mov r2, #0xc + add r3, r1, #0 + bl ov12_02225EF0 + add r0, r4, #0 + mov r1, #1 + add r0, #0x64 + strh r1, [r0] + ldr r0, [r4, #0] + mov r1, #0x1c + mov r2, #0xf + bl ov12_02235780 + ldr r0, [r4, #0] + ldr r1, _02230190 ; =ov12_02230018 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02230190: .word ov12_02230018 + thumb_func_end ov12_022300C4 + + thumb_func_start ov12_02230194 +ov12_02230194: ; 0x02230194 + mov r2, #0x12 + ldrsh r2, [r0, r2] + mov r3, #0x10 + ldrsh r0, [r0, r3] + neg r2, r2 + lsl r2, r2, #0x10 + neg r0, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + orr r0, r2 + mov r2, #3 + ldr r3, _022301B0 ; =sub_020C4B4C + lsl r2, r2, #8 + bx r3 + ; .align 2, 0 +_022301B0: .word sub_020C4B4C + thumb_func_end ov12_02230194 + + thumb_func_start ov12_022301B4 +ov12_022301B4: ; 0x022301B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x18] + bl ov12_022266C0 + str r0, [sp, #0xc] + ldr r1, [sp, #0xc] + add r0, r5, #0 + bl ov12_02230194 + add r0, r5, #0 + add r0, #0x1c + bl ov12_02225C14 + str r0, [sp, #8] + mov r0, #0x14 + ldrsh r4, [r5, r0] + mov r0, #0x16 + ldrsh r0, [r5, r0] + cmp r4, r0 + bgt _02230254 + ldr r1, [sp, #0xc] + lsl r2, r4, #2 + add r1, r1, r2 + str r1, [sp] +_022301E8: + ldr r1, [sp] + sub r0, r0, r4 + ldr r2, [r1, #0] + lsl r1, r2, #0x10 + asr r1, r1, #0x10 + str r1, [sp, #4] + lsr r1, r2, #0x10 + lsl r1, r1, #0x10 + asr r7, r1, #0x10 + mov r1, #0x1e + ldrsh r1, [r5, r1] + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + sub r0, r7, r0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + mov r0, #0x1c + ldrsh r1, [r5, r0] + mov r0, #0x14 + ldrsh r0, [r5, r0] + add r0, #0x28 + sub r0, r0, r4 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [sp, #4] + sub r0, r1, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + sub r6, r4, #1 + bpl _02230230 + add r6, #0xc0 +_02230230: + ldr r0, [sp, #4] + lsl r1, r7, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + bl ov12_022266E8 + ldr r1, [sp, #0xc] + lsl r2, r6, #2 + str r0, [r1, r2] + ldr r0, [sp] + add r4, r4, #1 + add r0, r0, #4 + str r0, [sp] + mov r0, #0x16 + ldrsh r0, [r5, r0] + cmp r4, r0 + ble _022301E8 +_02230254: + ldr r0, [sp, #8] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022301B4 + + thumb_func_start ov12_0223025C +ov12_0223025C: ; 0x0223025C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #4] + cmp r0, #4 + bhi _022302C4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02230276: ; jump table + .short _02230280 - _02230276 - 2 ; case 0 + .short _022302B2 - _02230276 - 2 ; case 1 + .short _022302DA - _02230276 - 2 ; case 2 + .short _0223032A - _02230276 - 2 ; case 3 + .short _0223034A - _02230276 - 2 ; case 4 +_02230280: + add r0, r4, #0 + bl ov12_022301B4 + cmp r0, #0 + bne _022302C4 + ldr r0, [r4, #4] + mov r1, #0x1f + add r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0] + mov r2, #0 + bl ov12_022357EC + mov r1, #0x1f + mov r2, #0 + str r1, [sp] + mov r0, #0x10 + add r4, #0x40 + str r0, [sp, #4] + add r0, r4, #0 + add r3, r2, #0 + bl ov12_02226424 + add sp, #8 + pop {r4, r5, r6, pc} +_022302B2: + add r0, r4, #0 + bl ov12_022301B4 + add r0, r4, #0 + add r0, #0x40 + bl ov12_02226454 + cmp r0, #0 + bne _022302C6 +_022302C4: + b _022303CC +_022302C6: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0x18] + bl ov12_022266D4 + mov r0, #0 + add sp, #8 + str r0, [r4, #8] + pop {r4, r5, r6, pc} +_022302DA: + ldr r0, [r4, #0] + bl ov12_02220278 + mov r3, #0x10 + ldrsh r3, [r4, r3] + mov r1, #2 + mov r2, #0 + neg r3, r3 + bl sub_02019184 + ldr r0, [r4, #0] + bl ov12_02220278 + mov r3, #0x12 + ldrsh r3, [r4, r3] + mov r1, #2 + mov r2, #3 + neg r3, r3 + bl sub_02019184 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #8 + ble _022303CC + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1f + add r0, #0x40 + add r3, r2, #0 + bl ov12_02226424 + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, r6, pc} +_0223032A: + add r0, r4, #0 + add r0, #0x40 + bl ov12_02226454 + cmp r0, #0 + beq _022303CC + ldr r0, [r4, #0xc] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, r6, pc} +_0223034A: + ldr r0, [r4, #0x18] + bl ov12_0222669C + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_02223428 + add r1, r0, #0 + lsl r0, r5, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + lsl r1, r1, #0x18 + mov r0, #0 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_0221FDE4 + add r3, r0, #0 + lsl r0, r5, #0x18 + mov r1, #1 + lsr r0, r0, #0x18 + lsl r1, r1, #0xe + mov r2, #0 + bl sub_02019690 + ldr r0, [r4, #0] + bl ov12_02220278 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r1, r0, #0 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019EBC + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_022303CC: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov12_0223025C + + thumb_func_start ov12_022303D0 +ov12_022303D0: ; 0x022303D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x68 + bl sub_02018144 + mov r1, #0 + mov r2, #0x68 + add r4, r0, #0 + bl sub_020D5124 + ldr r1, _02230538 ; =ov12_0223025C + str r5, [r4, #0] + add r0, r5, #0 + add r2, r4, #0 + bl ov12_022201E8 + str r0, [sp, #0x14] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x10] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x12] + ldr r0, [r4, #0xc] + mov r1, #0x29 + bl sub_020080C0 + mov r1, #0x12 + ldrsh r2, [r4, r1] + sub r0, r2, r0 + strh r0, [r4, #0x12] + mov r0, #0x10 + ldrsh r0, [r4, r0] + mov r2, #1 + sub r0, #0x28 + strh r0, [r4, #0x10] + ldrsh r0, [r4, r1] + mov r1, #6 + sub r0, #0x28 + strh r0, [r4, #0x12] + ldr r0, [r4, #0xc] + bl sub_02007DEC + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + add r6, r0, #0 + mov r0, #0x12 + ldrsh r1, [r4, r0] + sub r1, #8 + strh r1, [r4, #0x14] + ldrsh r0, [r4, r0] + add r0, #0x58 + strh r0, [r4, #0x16] + mov r0, #0x14 + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _0223046C + mov r0, #0 + strh r0, [r4, #0x14] +_0223046C: + mov r0, #0x16 + ldrsh r0, [r4, r0] + cmp r0, #0xc0 + ble _02230478 + mov r0, #0xc0 + strh r0, [r4, #0x16] +_02230478: + add r0, r5, #0 + mov r1, #1 + bl ov12_022233EC + add r7, r0, #0 + ldr r0, [sp, #0x14] + bl sub_0201CED4 + str r0, [sp, #0x18] + ldrh r0, [r4, #0x10] + ldrh r1, [r4, #0x12] + bl ov12_022266E8 + str r0, [sp, #0x1c] + add r0, r5, #0 + bl ov12_0221FDE4 + mov r1, #0x50 + str r1, [sp] + ldr r1, [sp, #0x18] + str r7, [sp, #4] + add r1, r1, #1 + str r1, [sp, #8] + ldr r1, [sp, #0x1c] + ldr r2, _0223053C ; =0x0000038E + str r1, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0x14 + mov r1, #0x16 + ldrsh r0, [r4, r0] + ldrsh r1, [r4, r1] + lsl r3, r6, #0xf + lsl r0, r0, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl ov12_0222662C + str r0, [r4, #0x18] + mov r0, #0x28 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + add r0, #0x1c + mov r2, #0x50 + add r3, r1, #0 + bl ov12_02225BC8 + ldr r0, [r4, #0x24] + add r1, r0, #0 + mul r1, r6 + str r1, [r4, #0x24] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + sub r0, r0, #3 + cmp r0, #1 + bhi _0223052A + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + lsl r0, r5, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x18 + mov r0, #0 + lsr r1, r1, #0x18 + bl sub_02019060 +_0223052A: + ldr r0, [sp, #0x14] + add r1, r4, #0 + bl ov12_0223025C + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02230538: .word ov12_0223025C +_0223053C: .word 0x0000038E + thumb_func_end ov12_022303D0 + + thumb_func_start ov12_02230540 +ov12_02230540: ; 0x02230540 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bhi _022305F0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223055A: ; jump table + .short _02230562 - _0223055A - 2 ; case 0 + .short _02230588 - _0223055A - 2 ; case 1 + .short _0223059A - _0223055A - 2 ; case 2 + .short _022305DE - _0223055A - 2 ; case 3 +_02230562: + add r0, r4, #0 + add r0, #0x38 + bl ov12_02225DC8 + ldr r2, [r4, #0x38] + mov r1, #0x1f + sub r1, r1, r2 + lsl r1, r1, #8 + orr r2, r1 + ldr r1, _022305FC ; =0x04000052 + cmp r0, #0 + strh r2, [r1] + bne _022305F0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0xc] + b _022305F0 +_02230588: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0x20 + ble _022305F0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022305F0 +_0223059A: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x14 + add r1, sp, #4 + add r2, sp, #0 + bl ov12_02225FA4 + ldr r0, [r4, #0x4c] + cmp r0, #1 + bne _022305C0 + ldr r1, [sp, #4] + mov r0, #0 + bl sub_020E1A9C + str r0, [sp, #4] +_022305C0: + ldr r0, [r4, #0x10] + ldr r1, [sp, #4] + ldr r2, [sp] + bl sub_0200D6E8 + cmp r5, #0 + bne _022305F0 + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022305F0 +_022305DE: + ldr r0, [r4, #0] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, pc} +_022305F0: + ldr r0, [r4, #4] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + nop +_022305FC: .word 0x04000052 + thumb_func_end ov12_02230540 + + thumb_func_start ov12_02230600 +ov12_02230600: ; 0x02230600 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + add r2, r0, #0 + ldr r0, [r5, #4] + cmp r0, #0 + beq _0223061C + cmp r0, #1 + beq _022306A4 + cmp r0, #2 + bne _02230618 + b _02230742 +_02230618: + add sp, #0xc + pop {r4, r5, pc} +_0223061C: + add r0, r5, #0 + add r0, #0x14 + bl ov12_02226138 + mov r2, #0x38 + mov r3, #0x3a + add r0, r5, #0 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + ldr r1, [r5, #8] + add r0, #0x14 + bl ov12_02225A18 + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _02230656 + mov r3, #0x3a + ldrsh r4, [r5, r3] + ldr r3, [r5, #0x3c] + mov r2, #0x38 + sub r3, r4, r3 + add r0, r5, #0 + lsl r3, r3, #0x10 + ldrsh r2, [r5, r2] + ldr r1, [r5, #0xc] + add r0, #0x14 + asr r3, r3, #0x10 + bl ov12_022259DC +_02230656: + ldr r0, [r5, #8] + bl sub_020087B4 + cmp r0, #0 + bne _02230750 + mov r2, #0 + str r2, [sp] + ldr r0, [r5, #8] + mov r1, #0x10 + add r3, r2, #0 + bl sub_020086FC + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _0223069A + ldr r0, [r5, #0xc] + bl ov12_02225950 + mov r1, #1 + add r4, r1, #0 + lsl r4, r0 + ldr r0, [r5, #0] + bl ov12_0222332C + mov r1, #0x10 + str r1, [sp] + mov r3, #0 + lsl r2, r4, #0x10 + str r3, [sp, #4] + mov r1, #4 + lsr r2, r2, #0x10 + str r3, [sp, #8] + bl sub_02003178 +_0223069A: + ldr r0, [r5, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r5, #4] + pop {r4, r5, pc} +_022306A4: + add r0, r5, #0 + add r0, #0x14 + bl ov12_02226138 + mov r2, #0x38 + mov r3, #0x3a + add r0, r5, #0 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + ldr r1, [r5, #8] + add r0, #0x14 + bl ov12_02225A18 + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _022306DE + mov r3, #0x3a + ldrsh r4, [r5, r3] + ldr r3, [r5, #0x3c] + mov r2, #0x38 + sub r3, r4, r3 + add r0, r5, #0 + lsl r3, r3, #0x10 + ldrsh r2, [r5, r2] + ldr r1, [r5, #0xc] + add r0, #0x14 + asr r3, r3, #0x10 + bl ov12_022259DC +_022306DE: + ldr r0, [r5, #8] + bl sub_020087B4 + cmp r0, #0 + bne _02230750 + mov r2, #0x38 + ldrsh r2, [r5, r2] + ldr r0, [r5, #8] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x3a + ldrsh r2, [r5, r2] + ldr r0, [r5, #8] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _02230738 + ldr r0, [r5, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r5, #0] + bl ov12_0222337C + cmp r0, #0 + bne _02230722 + ldr r0, [r5, #8] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC +_02230722: + mov r2, #0x3a + ldrsh r3, [r5, r2] + ldr r2, [r5, #0x3c] + mov r1, #0x38 + sub r2, r3, r2 + lsl r2, r2, #0x10 + ldrsh r1, [r5, r1] + ldr r0, [r5, #0xc] + asr r2, r2, #0x10 + bl sub_0200D4C4 +_02230738: + ldr r0, [r5, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r5, #4] + pop {r4, r5, pc} +_02230742: + ldr r0, [r5, #0] + add r1, r2, #0 + bl ov12_02220220 + add r0, r5, #0 + bl sub_020181C4 +_02230750: + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov12_02230600 + + thumb_func_start ov12_02230754 +ov12_02230754: ; 0x02230754 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x50 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x50 + bl sub_020D5124 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #4] + add r0, r5, #0 + bl ov12_0221FDD4 + str r0, [r4, #0x4c] + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x10] + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + mov r2, #0xa + add r0, #0x14 + mov r1, #0xe + add r3, r2, #0 + bl ov12_02225E68 + add r0, r4, #0 + add r0, #0x38 + mov r1, #0 + mov r2, #0x10 + mov r3, #8 + bl ov12_02225D78 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x1f + bl ov12_02235780 + ldr r0, [r4, #0x10] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x4c] + cmp r0, #1 + ldr r0, [r4, #0x10] + bne _022307D4 + ldr r1, _022307F8 ; =0xBFB33333 + ldr r2, _022307FC ; =0x3FB33333 + bl sub_0200D6E8 + b _022307DC +_022307D4: + ldr r1, _022307FC ; =0x3FB33333 + add r2, r1, #0 + bl sub_0200D6E8 +_022307DC: + ldr r0, [r4, #0x10] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0] + ldr r1, _02230800 ; =ov12_02230540 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022307F8: .word 0xBFB33333 +_022307FC: .word 0x3FB33333 +_02230800: .word ov12_02230540 + thumb_func_end ov12_02230754 + + thumb_func_start ov12_02230804 +ov12_02230804: ; 0x02230804 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl ov12_0221FDE4 + mov r1, #0x40 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x40 + bl sub_020D5124 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x38] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x3a] + ldr r0, [r4, #8] + mov r1, #0x29 + bl sub_020080C0 + str r0, [r4, #0x3c] + mov r1, #4 + add r0, r4, #0 + str r1, [sp] + add r0, #0x14 + mov r2, #0 + mov r3, #1 + bl ov12_02226108 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + mov r1, #0x14 + ldrsh r1, [r4, r1] + mov r2, #0x10 + add r0, r1, r0 + mov r1, #0 + strh r0, [r4, #0x14] + str r1, [sp] + ldr r0, [r4, #8] + add r3, r1, #0 + bl sub_020086FC + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + cmp r5, #2 + bne _022308B0 + cmp r0, #4 + beq _022308B8 +_022308B0: + cmp r5, #5 + bne _022308FE + cmp r0, #3 + bne _022308FE +_022308B8: + ldr r0, [r4, #0xc] + bl ov12_02225950 + mov r1, #1 + add r5, r1, #0 + lsl r5, r0 + ldr r0, [r4, #0] + bl ov12_0222332C + mov r3, #0 + lsl r2, r5, #0x10 + str r3, [sp] + mov r1, #0x10 + str r1, [sp, #4] + mov r1, #4 + lsr r2, r2, #0x10 + str r3, [sp, #8] + bl sub_02003178 + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222337C + cmp r0, #0 + bne _022308FE + ldr r0, [r4, #8] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC +_022308FE: + ldr r0, [r4, #0] + ldr r1, _0223090C ; =ov12_02230600 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223090C: .word ov12_02230600 + thumb_func_end ov12_02230804 + + thumb_func_start ov12_02230910 +ov12_02230910: ; 0x02230910 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #8] + mov r5, #0 + cmp r0, #3 + bhi _0223098C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223092A: ; jump table + .short _02230932 - _0223092A - 2 ; case 0 + .short _0223094A - _0223092A - 2 ; case 1 + .short _02230970 - _0223092A - 2 ; case 2 + .short _0223098A - _0223092A - 2 ; case 3 +_02230932: + add r0, r4, #0 + add r0, #0x1c + bl ov12_02226454 + cmp r0, #1 + bne _0223098C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0x20 + str r0, [r4, #0x44] + b _0223098C +_0223094A: + ldr r0, [r4, #0x44] + sub r0, r0, #1 + str r0, [r4, #0x44] + bpl _0223098C + ldr r0, [r4, #8] + mov r1, #8 + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0x10 + str r0, [sp] + mov r0, #0x18 + add r4, #0x1c + str r0, [sp, #4] + add r0, r4, #0 + add r2, r5, #0 + add r3, r1, #0 + bl ov12_02226424 + b _0223098C +_02230970: + add r0, r4, #0 + add r0, #0x1c + bl ov12_02226454 + cmp r0, #1 + bne _0223098C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + ldr r0, [r4, #0x14] + bl ov12_0222669C + b _0223098C +_0223098A: + mov r5, #1 +_0223098C: + add r0, r5, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02230910 + + thumb_func_start ov12_02230994 +ov12_02230994: ; 0x02230994 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _022309AA + cmp r0, #1 + beq _022309DE + cmp r0, #2 + beq _022309F0 + pop {r4, r5, r6, pc} +_022309AA: + add r0, r4, #0 + bl ov12_02230910 + ldr r0, [r4, #0x48] + bl sub_0200D408 + cmp r0, #1 + bne _022309D6 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222337C + cmp r0, #0 + bne _022309D6 + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC +_022309D6: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, r6, pc} +_022309DE: + add r0, r4, #0 + bl ov12_02230910 + cmp r0, #0 + beq _02230A88 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, r6, pc} +_022309F0: + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_02223428 + add r1, r0, #0 + lsl r0, r5, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + lsl r1, r1, #0x18 + mov r0, #0 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222337C + cmp r0, #0 + bne _02230A3E + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC +_02230A3E: + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_0221FDE4 + add r3, r0, #0 + lsl r0, r5, #0x18 + mov r1, #1 + lsr r0, r0, #0x18 + lsl r1, r1, #0xe + mov r2, #0 + bl sub_02019690 + ldr r0, [r4, #0] + bl ov12_02220278 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r1, r0, #0 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019EBC + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02230A88: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02230994 + + thumb_func_start ov12_02230A8C +ov12_02230A8C: ; 0x02230A8C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + mov r1, #0x4c + add r7, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r7, [r4, #0] + add r0, r7, #0 + bl ov12_0222332C + str r0, [r4, #0x18] + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x10 + bl ov12_022357EC + mov r2, #8 + str r2, [sp] + mov r0, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x1c + mov r1, #0 + mov r3, #0x10 + bl ov12_02226424 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #0x10] + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0x10] + mov r1, #0x29 + bl sub_020080C0 + sub r0, r5, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + sub r0, #0x28 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x48] + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + cmp r0, #5 + beq _02230B1C + cmp r0, #2 + bne _02230B2E +_02230B1C: + ldr r0, [r4, #0x48] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x48] + mov r1, #2 + bl sub_0200D460 + b _02230B6A +_02230B2E: + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + str r0, [sp, #0x14] + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [sp, #0x14] + lsl r1, r1, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x18 + mov r0, #0 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0x48] + mov r1, #0 + bl sub_0200D3F4 +_02230B6A: + add r0, r7, #0 + mov r1, #1 + bl ov12_022233EC + neg r1, r5 + lsl r1, r1, #0x10 + sub r6, #0x28 + str r0, [sp, #0x18] + lsl r0, r6, #0x10 + asr r0, r0, #0x10 + neg r0, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + bl ov12_022266E8 + add r6, r0, #0 + add r0, r7, #0 + bl ov12_0221FDE4 + mov r1, #0x64 + str r1, [sp] + ldr r1, [sp, #0x18] + mov r3, #5 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + str r6, [sp, #0xc] + str r0, [sp, #0x10] + lsl r0, r5, #0x18 + add r5, #0x50 + lsl r1, r5, #0x18 + ldr r2, _02230BD8 ; =0x0000038E + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + lsl r3, r3, #0xc + bl ov12_0222662C + mov r2, #1 + str r0, [r4, #0x14] + mov r1, #0 + str r1, [sp] + ldr r0, [r4, #0x18] + lsl r2, r2, #8 + mov r3, #8 + bl sub_02003A2C + ldr r0, [r4, #0] + ldr r1, _02230BDC ; =ov12_02230994 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02230BD8: .word 0x0000038E +_02230BDC: .word ov12_02230994 + thumb_func_end ov12_02230A8C + + thumb_func_start ov12_02230BE0 +ov12_02230BE0: ; 0x02230BE0 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #3 + bhi _02230CE2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02230BFA: ; jump table + .short _02230C02 - _02230BFA - 2 ; case 0 + .short _02230C52 - _02230BFA - 2 ; case 1 + .short _02230C90 - _02230BFA - 2 ; case 2 + .short _02230CCA - _02230BFA - 2 ; case 3 +_02230C02: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + bne _02230C34 + add r0, r4, #0 + add r0, #0x14 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x54] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, [sp, #8] + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [r4, #0x10] + ldr r2, [sp, #4] + bl sub_0200D6E8 + b _02230CE2 +_02230C34: + ldr r0, [r4, #0xc] + mov r1, #0xa + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #5 + str r0, [r4, #0x4c] + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + add r0, #0x14 + add r2, r1, #0 + mov r3, #1 + bl ov12_02225E68 + b _02230CE2 +_02230C52: + add r0, r4, #0 + add r0, #0x38 + bl ov12_02225DA0 + ldr r1, [r4, #0x38] + add r5, r0, #0 + lsl r1, r1, #0x10 + ldr r0, [r4, #0x10] + lsr r1, r1, #0x10 + bl sub_0200D79C + cmp r5, #0 + bne _02230CE2 + ldr r0, [r4, #0x4c] + cmp r0, #0 + ble _02230C88 + sub r0, r0, #1 + str r0, [r4, #0x4c] + add r0, r4, #0 + ldr r1, [r4, #0x38] + ldr r2, [r4, #0x50] + add r0, #0x38 + mov r3, #4 + str r1, [r4, #0x50] + bl ov12_02225D50 + b _02230CE2 +_02230C88: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02230CE2 +_02230C90: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #1 + bne _02230CC2 + add r0, r4, #0 + add r0, #0x14 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x54] + bl sub_020E17B4 + add r1, r0, #0 + ldr r0, [sp, #8] + bl sub_020E18B0 + add r1, r0, #0 + ldr r0, [r4, #0x10] + ldr r2, [sp, #4] + bl sub_0200D6E8 + b _02230CE2 +_02230CC2: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02230CE2 +_02230CCA: + ldr r0, [r4, #0x10] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, pc} +_02230CE2: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov12_02230BE0 + + thumb_func_start ov12_02230CEC +ov12_02230CEC: ; 0x02230CEC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + mov r1, #0x58 + add r5, r0, #0 + add r7, r2, #0 + str r3, [sp, #4] + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + add r7, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_022234A8 + cmp r0, #1 + bne _02230D2C + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x54] + neg r6, r7 + b _02230D32 +_02230D2C: + mov r0, #1 + str r0, [r4, #0x54] + add r6, r7, #0 +_02230D32: + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0 + bl ov12_022258E0 + str r0, [sp, #8] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #1 + bl ov12_022258E0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + mov r1, #2 + str r0, [r4, #0x10] + bl sub_0200D6A4 + mov r1, #0xfe + lsl r1, r1, #0x16 + ldr r0, [r4, #0x10] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r0, [r4, #0x10] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + bl sub_0200D4C4 + mov r1, #0x28 + mul r1, r7 + lsl r1, r1, #0x10 + ldr r0, [r4, #0x10] + asr r1, r1, #0x10 + mov r2, #0 + bl sub_0200D5DC + ldr r0, [r4, #0x10] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D460 + mov r1, #0xb + mvn r1, r1 + mul r1, r6 + lsl r1, r1, #0x10 + ldr r0, [r4, #0x10] + asr r1, r1, #0x10 + mov r2, #0xc + bl sub_0200D7E0 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + bl ov12_0223525C + cmp r0, #4 + ldr r0, [r4, #0x10] + bne _02230DC4 + mov r1, #1 + bl sub_0200D364 + b _02230DCA +_02230DC4: + mov r1, #0 + bl sub_0200D364 +_02230DCA: + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + mov r2, #0xa + add r0, #0x14 + mov r1, #1 + add r3, r2, #0 + bl ov12_02225E68 + cmp r6, #0 + blt _02230DF2 + add r0, r4, #0 + ldr r1, _02230E14 ; =0x0000FF48 + ldr r2, _02230E18 ; =0x0000E38D + add r0, #0x38 + mov r3, #4 + bl ov12_02225D50 + ldr r0, _02230E14 ; =0x0000FF48 + b _02230E02 +_02230DF2: + add r0, r4, #0 + ldr r2, _02230E1C ; =0x00001C71 + add r0, #0x38 + mov r1, #0 + mov r3, #4 + bl ov12_02225D50 + mov r0, #0 +_02230E02: + str r0, [r4, #0x50] + ldr r0, [r4, #0] + ldr r1, _02230E20 ; =ov12_02230BE0 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02230E14: .word 0x0000FF48 +_02230E18: .word 0x0000E38D +_02230E1C: .word 0x00001C71 +_02230E20: .word ov12_02230BE0 + thumb_func_end ov12_02230CEC + + thumb_func_start ov12_02230E24 +ov12_02230E24: ; 0x02230E24 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + str r1, [r5, #0] + add r6, r3, #0 + mov r3, #8 + mov r1, #0xa + add r4, r2, #0 + add r0, r5, #4 + add r2, r1, #0 + str r3, [sp] + bl ov12_02225E68 + mov r0, #3 + str r0, [r5, #0x2c] + mov r0, #8 + str r0, [r5, #0x30] + mov r0, #0xa + str r0, [r5, #0x34] + ldr r0, [sp, #0x18] + add r1, r4, #0 + str r0, [r5, #0x28] + ldr r0, [r5, #0] + add r2, r6, #0 + bl sub_0200D4C4 + ldr r0, [r5, #0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200D4C4 + ldr r0, [r5, #0] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r5, #0] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_0200D460 + ldr r0, [sp, #0x18] + cmp r0, #0 + beq _02230E8C + mov r2, #0xfe + ldr r0, [r5, #0] + ldr r1, _02230E98 ; =0xBF800000 + lsl r2, r2, #0x16 + bl sub_0200D6E8 +_02230E8C: + ldr r0, [r5, #0] + mov r1, #0 + bl sub_0200D3F4 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02230E98: .word 0xBF800000 + thumb_func_end ov12_02230E24 + + thumb_func_start ov12_02230E9C +ov12_02230E9C: ; 0x02230E9C + ldr r3, _02230EA4 ; =sub_0200D0F4 + ldr r0, [r0, #0] + bx r3 + nop +_02230EA4: .word sub_0200D0F4 + thumb_func_end ov12_02230E9C + + thumb_func_start ov12_02230EA8 +ov12_02230EA8: ; 0x02230EA8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200D390 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02230EA8 + + thumb_func_start ov12_02230EC0 +ov12_02230EC0: ; 0x02230EC0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, r4, #4 + bl ov12_02225EB8 + cmp r0, #1 + bne _02230F04 + add r0, r4, #4 + add r1, sp, #8 + add r2, sp, #4 + bl ov12_02225FA4 + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _02230EF6 + ldr r1, [sp, #8] + mov r0, #0 + bl sub_020E1A9C + add r1, r0, #0 + mov r2, #0xfe + ldr r0, [r4, #0] + lsl r2, r2, #0x16 + bl sub_0200D6E8 + b _02230F36 +_02230EF6: + mov r2, #0xfe + ldr r0, [r4, #0] + ldr r1, [sp, #8] + lsl r2, r2, #0x16 + bl sub_0200D6E8 + b _02230F36 +_02230F04: + ldr r0, [r4, #0x2c] + cmp r0, #0 + ble _02230F30 + sub r0, r0, #1 + str r0, [r4, #0x2c] + mov r0, #8 + str r0, [sp] + ldr r1, [r4, #0x30] + ldr r3, [r4, #0x34] + lsl r1, r1, #0x10 + lsl r3, r3, #0x10 + add r0, r4, #4 + asr r1, r1, #0x10 + mov r2, #0xa + asr r3, r3, #0x10 + bl ov12_02225E68 + ldr r1, [r4, #0x30] + ldr r0, [r4, #0x34] + str r0, [r4, #0x30] + str r1, [r4, #0x34] + b _02230F36 +_02230F30: + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_02230F36: + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov12_02230EC0 + + thumb_func_start ov12_02230F3C +ov12_02230F3C: ; 0x02230F3C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #3 + bhi _02231008 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02230F54: ; jump table + .short _02230F5C - _02230F54 - 2 ; case 0 + .short _02230F8E - _02230F54 - 2 ; case 1 + .short _02230FAC - _02230F54 - 2 ; case 2 + .short _02230FCC - _02230F54 - 2 ; case 3 +_02230F5C: + ldr r0, [r4, #0x10] + cmp r0, #4 + blt _02230F86 + mov r0, #0 + str r0, [r4, #0x10] + ldr r1, [r4, #0x14] + add r2, r4, #0 + mov r0, #0x38 + add r2, #0x44 + mul r0, r1 + add r0, r2, r0 + bl ov12_02230EA8 + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + cmp r0, #4 + blt _02230F86 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] +_02230F86: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _02231008 +_02230F8E: + mov r1, #0x1c + mov r2, #0x1e + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x18] + add r0, #0x20 + bl ov12_0222619C + cmp r0, #0 + bne _02231008 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231008 +_02230FAC: + add r6, r4, #0 + mov r5, #0 + add r6, #0x44 +_02230FB2: + add r0, r6, #0 + bl ov12_02230EC0 + add r5, r5, #1 + add r6, #0x38 + cmp r5, #4 + blt _02230FB2 + cmp r0, #0 + bne _02231008 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231008 +_02230FCC: + mov r2, #0x1c + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x1e + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_02007DEC + add r5, r4, #0 + mov r6, #0 + add r5, #0x44 +_02230FEA: + add r0, r5, #0 + bl ov12_02230E9C + add r6, r6, #1 + add r5, #0x38 + cmp r6, #4 + blt _02230FEA + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_02231008: + ldr r0, [r4, #8] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02230F3C + + thumb_func_start ov12_02231010 +ov12_02231010: ; 0x02231010 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + str r1, [sp, #4] + mov r1, #0x4a + lsl r1, r1, #2 + add r4, r0, #0 + str r2, [sp, #8] + str r3, [sp, #0xc] + bl ov12_02235E50 + add r7, r0, #0 + ldr r0, [sp, #4] + str r4, [r7, #0] + str r0, [r7, #4] + ldr r0, [sp, #8] + str r0, [r7, #8] + add r0, r4, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r7, #0] + bl ov12_022232FC + str r0, [r7, #0x18] + mov r1, #0 + bl sub_020080C0 + strh r0, [r7, #0x1c] + ldr r0, [r7, #0x18] + mov r1, #1 + bl sub_020080C0 + strh r0, [r7, #0x1e] + add r0, r7, #0 + mov r3, #1 + add r0, #0x20 + mov r1, #4 + mov r2, #0 + str r3, [sp] + bl ov12_02226108 + mov r0, #0x1e + ldrsh r4, [r7, r0] + ldr r1, [r7, #0] + add r0, sp, #0x14 + add r4, #0x10 + mov r5, #0 + bl ov12_0222329C + add r0, r5, #0 + add r6, r7, #0 + str r0, [sp, #0x10] + add r6, #0x44 +_0223107A: + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02231094 + str r5, [sp] + mov r2, #0x1c + lsl r3, r4, #0x10 + ldrsh r2, [r7, r2] + ldr r1, [sp, #0xc] + add r0, r6, #0 + asr r3, r3, #0x10 + bl ov12_02230E24 + b _022310B0 +_02231094: + ldr r0, [sp, #4] + ldr r1, [sp, #8] + add r2, sp, #0x14 + bl sub_0200CE6C + lsl r3, r4, #0x10 + add r1, r0, #0 + str r5, [sp] + mov r2, #0x1c + ldrsh r2, [r7, r2] + add r0, r6, #0 + asr r3, r3, #0x10 + bl ov12_02230E24 +_022310B0: + mov r0, #1 + eor r5, r0 + ldr r0, [sp, #0x10] + sub r4, #0xa + add r0, r0, #1 + add r6, #0x38 + str r0, [sp, #0x10] + cmp r0, #4 + blt _0223107A + ldr r0, [r7, #0] + ldr r1, _022310D0 ; =ov12_02230F3C + add r2, r7, #0 + bl ov12_022201E8 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022310D0: .word ov12_02230F3C + thumb_func_end ov12_02231010 + + thumb_func_start ov12_022310D4 +ov12_022310D4: ; 0x022310D4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #6 + bls _022310E4 + b _02231296 +_022310E4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022310F0: ; jump table + .short _022310FE - _022310F0 - 2 ; case 0 + .short _02231140 - _022310F0 - 2 ; case 1 + .short _022311A0 - _022310F0 - 2 ; case 2 + .short _022311E0 - _022310F0 - 2 ; case 3 + .short _02231200 - _022310F0 - 2 ; case 4 + .short _0223123E - _022310F0 - 2 ; case 5 + .short _0223127E - _022310F0 - 2 ; case 6 +_022310FE: + add r0, r4, #0 + add r0, #0x18 + bl ov12_02225C14 + cmp r0, #0 + beq _02231120 + mov r2, #0x14 + mov r3, #0x16 + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0x10] + add r0, #0x18 + bl ov12_02225A18 + add sp, #0x10 + pop {r3, r4, r5, pc} +_02231120: + mov r2, #0 + str r2, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0x18 + add r0, r4, #0 + ldrsh r1, [r4, r1] + add r0, #0x18 + add r3, r2, #0 + bl ov12_02225BC8 + ldr r0, [r4, #0xc] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02231140: + add r0, r4, #0 + add r0, #0x18 + bl ov12_02225C14 + cmp r0, #0 + beq _02231162 + mov r2, #0x14 + mov r3, #0x16 + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0x10] + add r0, #0x18 + bl ov12_02225A18 + add sp, #0x10 + pop {r3, r4, r5, pc} +_02231162: + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007DEC + mov r1, #0 + str r1, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r2, [r4, #0x3c] + add r0, r4, #0 + lsl r2, r2, #5 + neg r2, r2 + lsl r2, r2, #0x10 + add r0, #0x18 + asr r2, r2, #0x10 + add r3, r1, #0 + bl ov12_02225BC8 + ldr r0, [r4, #0xc] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022311A0: + add r0, r4, #0 + ldr r2, [r4, #0x48] + add r0, #0x4c + add r1, #0x70 + bl ov12_02225D2C + cmp r0, #0 + bne _02231296 + mov r0, #0x46 + ldrsh r0, [r4, r0] + add r1, r4, #0 + mov r2, #0x44 + str r0, [sp] + mov r0, #0x16 + ldrsh r0, [r4, r0] + mov r3, #0x14 + add r1, #0x70 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + ldr r0, _022312A0 ; =0xFFFE0000 + str r0, [sp, #0xc] + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + add r0, #0x4c + bl ov12_02225C98 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231296 +_022311E0: + add r0, r4, #0 + ldr r2, [r4, #0x48] + add r0, #0x4c + add r1, #0x70 + bl ov12_02225D2C + cmp r0, #0 + bne _02231296 + ldr r0, [r4, #0x48] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231296 +_02231200: + add r0, r4, #0 + add r0, #0x18 + bl ov12_02225C14 + cmp r0, #0 + beq _02231220 + mov r2, #0x14 + mov r3, #0x16 + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0x10] + add r0, #0x18 + bl ov12_02225A18 + b _02231296 +_02231220: + mov r2, #0 + str r2, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r1, #0x18 + add r0, r4, #0 + ldrsh r1, [r4, r1] + add r0, #0x18 + add r3, r2, #0 + bl ov12_02225BC8 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231296 +_0223123E: + add r0, r4, #0 + add r0, #0x18 + bl ov12_02225C14 + cmp r0, #0 + beq _0223125E + mov r2, #0x14 + mov r3, #0x16 + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0x10] + add r0, #0x18 + bl ov12_02225A18 + b _02231296 +_0223125E: + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231296 +_0223127E: + ldr r0, [r4, #0x48] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x10 + pop {r3, r4, r5, pc} +_02231296: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022312A0: .word 0xFFFE0000 + thumb_func_end ov12_022310D4 + + thumb_func_start ov12_022312A4 +ov12_022312A4: ; 0x022312A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + mov r1, #0x94 + add r5, r0, #0 + str r2, [sp, #0x10] + add r6, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + ldr r0, [sp, #0x10] + str r7, [r4, #4] + str r0, [r4, #8] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x14] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x16] + mov r1, #0 + str r1, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r2, [r4, #0x3c] + add r0, r4, #0 + lsl r2, r2, #4 + neg r2, r2 + lsl r2, r2, #0x10 + add r0, #0x18 + asr r2, r2, #0x10 + add r3, r1, #0 + bl ov12_02225BC8 + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #0x40] + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x44 + strh r0, [r1] + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x46 + strh r0, [r1] + add r0, r6, #0 + mov r1, #1 + str r6, [r4, #0x48] + bl sub_0200D390 + ldr r0, [r4, #0x48] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x48] + mov r1, #1 + bl sub_0200D460 + mov r0, #0x16 + ldrsh r0, [r4, r0] + add r1, r4, #0 + mov r2, #0x14 + str r0, [sp] + mov r0, #0x46 + ldrsh r0, [r4, r0] + mov r3, #0x44 + add r1, #0x70 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #2 + lsl r0, r0, #0x10 + str r0, [sp, #0xc] + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + add r0, #0x4c + bl ov12_02225C98 + ldr r0, [r4, #0] + ldr r1, _0223138C ; =ov12_022310D4 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223138C: .word ov12_022310D4 + thumb_func_end ov12_022312A4 + + thumb_func_start ov12_02231390 +ov12_02231390: ; 0x02231390 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bhi _0223143A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022313AA: ; jump table + .short _022313B2 - _022313AA - 2 ; case 0 + .short _022313DE - _022313AA - 2 ; case 1 + .short _02231402 - _022313AA - 2 ; case 2 + .short _02231428 - _022313AA - 2 ; case 3 +_022313B2: + mov r2, #0x1a + ldrsh r3, [r4, r2] + mov r2, #0x68 + ldrsh r2, [r4, r2] + mov r1, #0x18 + ldrsh r1, [r4, r1] + sub r2, r3, r2 + add r0, r4, #0 + lsl r2, r2, #0x10 + ldr r3, [r4, #0x14] + add r0, #0x1c + asr r2, r2, #0x10 + bl ov12_02225B78 + cmp r0, #0 + bne _0223143A + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0x10 + str r0, [r4, #0xc] + b _0223143A +_022313DE: + ldr r0, [r4, #0xc] + sub r0, r0, #1 + str r0, [r4, #0xc] + bpl _0223143A + ldr r0, [r4, #8] + mov r2, #0x10 + add r0, r0, #1 + str r0, [r4, #8] + mov r1, #0 + str r1, [sp] + mov r0, #0x20 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x40 + add r3, r2, #0 + bl ov12_02226424 + b _0223143A +_02231402: + add r0, r4, #0 + add r0, #0x40 + bl ov12_02226454 + cmp r0, #0 + beq _0223143A + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223143A +_02231428: + ldr r0, [r4, #0] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r4, pc} +_0223143A: + ldr r0, [r4, #4] + bl sub_0200C7EC + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_02231390 + + thumb_func_start ov12_02231444 +ov12_02231444: ; 0x02231444 + push {r4, r5, r6, lr} + sub sp, #8 + mov r1, #0x6c + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #4] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x18] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x1a] + ldr r0, [r4, #0x10] + mov r1, #0x29 + bl sub_020080C0 + add r1, r4, #0 + add r1, #0x68 + strh r0, [r1] + mov r0, #0x1a + ldrsh r0, [r4, r0] + mov r1, #0 + add r0, #8 + strh r0, [r4, #0x1a] + ldr r0, [r4, #0] + bl ov12_022202C0 + str r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x1c + mov r1, #2 + mov r2, #0x10 + bl ov12_022263A4 + ldr r0, [r4, #0] + mov r1, #0x10 + mov r2, #0 + bl ov12_02235780 + mov r1, #0x10 + str r1, [sp] + mov r0, #0x20 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0 + add r0, #0x40 + add r3, r2, #0 + bl ov12_02226424 + ldr r0, [r4, #0x28] + add r2, r4, #0 + add r1, r0, #0 + mul r1, r6 + str r1, [r4, #0x28] + ldr r0, [r4, #0] + ldr r1, _02231504 ; =ov12_02231390 + bl ov12_022201E8 + ldr r0, [r4, #4] + bl sub_0200C7EC + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02231504: .word ov12_02231390 + thumb_func_end ov12_02231444 + + thumb_func_start ov12_02231508 +ov12_02231508: ; 0x02231508 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x38] + mov r4, #0 + cmp r0, #0 + beq _0223151E + cmp r0, #1 + beq _02231552 + cmp r0, #2 + beq _0223157E + b _02231580 +_0223151E: + add r0, r5, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #0 + beq _02231538 + mov r2, #0x16 + ldrsh r2, [r5, r2] + ldr r0, [r5, #0x10] + mov r1, #0xd + bl sub_02007DEC + b _02231580 +_02231538: + ldr r0, [r5, #0x38] + mov r2, #0xa + add r0, r0, #1 + str r0, [r5, #0x38] + mov r0, #0xc + add r5, #0x14 + str r0, [sp] + add r0, r5, #0 + mov r1, #0xf + add r3, r2, #0 + bl ov12_02225E68 + b _02231580 +_02231552: + add r0, r5, #0 + add r0, #0x14 + bl ov12_02225EB8 + cmp r0, #0 + ldr r0, [r5, #0x10] + beq _0223156C + mov r2, #0x16 + ldrsh r2, [r5, r2] + mov r1, #0xd + bl sub_02007DEC + b _02231580 +_0223156C: + mov r1, #0xd + add r2, r1, #0 + add r2, #0xf3 + bl sub_02007DEC + ldr r0, [r5, #0x38] + add r0, r0, #1 + str r0, [r5, #0x38] + b _02231580 +_0223157E: + mov r4, #1 +_02231580: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02231508 + + thumb_func_start ov12_02231584 +ov12_02231584: ; 0x02231584 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x40] + mov r4, #0 + cmp r0, #0 + beq _0223159C + cmp r0, #1 + beq _022315E2 + cmp r0, #2 + beq _022315FE + b _02231600 +_0223159C: + add r0, r5, #0 + ldr r1, [r5, #0x3c] + add r0, #0x44 + bl ov12_022260A8 + add r0, r5, #0 + add r0, #0x68 + bl ov12_02225C14 + cmp r0, #0 + beq _022315C6 + mov r2, #0xb4 + mov r3, #0xb6 + add r0, r5, #0 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + ldr r1, [r5, #0x3c] + add r0, #0x68 + bl ov12_022259DC + b _02231600 +_022315C6: + ldr r0, [r5, #0x40] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r5, #0x40] + str r1, [sp] + mov r0, #8 + add r5, #0x8c + str r0, [sp, #4] + add r0, r5, #0 + add r2, r4, #0 + mov r3, #0xe + bl ov12_02226424 + b _02231600 +_022315E2: + add r0, r5, #0 + add r0, #0x8c + bl ov12_02226454 + cmp r0, #0 + beq _02231600 + ldr r0, [r5, #0x3c] + add r1, r4, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x40] + add r0, r0, #1 + str r0, [r5, #0x40] + b _02231600 +_022315FE: + mov r4, #1 +_02231600: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02231584 + + thumb_func_start ov12_02231608 +ov12_02231608: ; 0x02231608 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0223161A + cmp r0, #1 + beq _02231632 + b _02231648 +_0223161A: + add r0, r4, #0 + bl ov12_02231508 + add r0, r4, #0 + bl ov12_02231584 + cmp r0, #0 + beq _02231648 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231648 +_02231632: + ldr r0, [r4, #0x3c] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_02231648: + ldr r0, [r4, #8] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + thumb_func_end ov12_02231608 + + thumb_func_start ov12_02231650 +ov12_02231650: ; 0x02231650 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + mov r1, #0xb8 + add r6, r0, #0 + add r7, r2, #0 + str r3, [sp, #8] + bl ov12_02235E50 + add r4, r0, #0 + str r6, [r4, #0] + str r5, [r4, #4] + str r7, [r4, #8] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02225964 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222598C + add r5, r0, #0 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #0x10] + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + mov r0, #0xc + str r0, [sp] + add r0, r4, #0 + mov r1, #0xa + add r0, #0x14 + add r2, r1, #0 + mov r3, #0xf + bl ov12_02225E68 + ldr r0, [sp, #8] + mov r1, #1 + str r0, [r4, #0x3c] + bl sub_0200D390 + ldr r0, [r4, #0x3c] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x3c] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_0200D460 + ldr r0, [sp, #0xc] + lsl r0, r0, #5 + add r1, r7, r0 + add r0, r4, #0 + add r0, #0xb4 + strh r1, [r0] + add r0, r4, #0 + add r0, #0xb6 + strh r6, [r0] + cmp r5, #0 + bge _02231706 + mov r1, #7 + b _02231708 +_02231706: + mov r1, #0x17 +_02231708: + mvn r1, r1 + add r0, r1, #0 + mul r0, r5 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r1, #0 + mov r0, #0x20 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x68 + add r2, r1, #0 + add r3, r1, #0 + bl ov12_02225BC8 + mov r0, #0x20 + str r0, [sp] + add r0, r4, #0 + add r0, #0x44 + mov r1, #5 + mov r2, #0xa + mov r3, #0xc + bl ov12_02225E68 + mov r0, #0x1a + str r0, [sp] + ldr r0, _02231758 ; =0x04000050 + mov r1, #0 + mov r2, #0x3f + mov r3, #0x1f + bl sub_020BF55C + ldr r0, [r4, #0] + ldr r1, _0223175C ; =ov12_02231608 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02231758: .word 0x04000050 +_0223175C: .word ov12_02231608 + thumb_func_end ov12_02231650 + + thumb_func_start ov12_02231760 +ov12_02231760: ; 0x02231760 + push {r3, lr} + sub sp, #8 + ldr r1, [r0, #0x68] + cmp r1, #5 + bhi _02231814 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02231776: ; jump table + .short _02231782 - _02231776 - 2 ; case 0 + .short _02231798 - _02231776 - 2 ; case 1 + .short _022317B2 - _02231776 - 2 ; case 2 + .short _022317CC - _02231776 - 2 ; case 3 + .short _022317E6 - _02231776 - 2 ; case 4 + .short _022317FC - _02231776 - 2 ; case 5 +_02231782: + mov r2, #0x28 + str r2, [sp] + mov r1, #8 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x18 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_02231798: + mov r1, #0x4f + mvn r1, r1 + str r1, [sp] + mov r1, #8 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x18 + add r2, r1, #0 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_022317B2: + mov r1, #0x50 + str r1, [sp] + mov r1, #8 + str r1, [sp, #4] + mov r1, #0 + add r2, r1, #0 + add r0, #0x18 + sub r2, #0x50 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_022317CC: + mov r1, #0x4f + mvn r1, r1 + str r1, [sp] + mov r1, #8 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x18 + add r2, r1, #0 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_022317E6: + mov r2, #0x50 + str r2, [sp] + mov r1, #8 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x18 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_022317FC: + mov r2, #0x27 + mvn r2, r2 + str r2, [sp] + mov r1, #8 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x18 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_02231814: + bl sub_02022974 + add sp, #8 + pop {r3, pc} + thumb_func_end ov12_02231760 + + thumb_func_start ov12_0223181C +ov12_0223181C: ; 0x0223181C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #4 + bls _0223182C + b _02231940 +_0223182C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02231838: ; jump table + .short _02231842 - _02231838 - 2 ; case 0 + .short _0223185E - _02231838 - 2 ; case 1 + .short _022318E0 - _02231838 - 2 ; case 2 + .short _02231916 - _02231838 - 2 ; case 3 + .short _02231928 - _02231838 - 2 ; case 4 +_02231842: + ldr r0, [r4, #0x6c] + add r0, r0, #1 + str r0, [r4, #0x6c] + cmp r0, #4 + ble _02231940 + add r0, r4, #0 + bl ov12_02231760 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x6c] + b _02231940 +_0223185E: + add r0, r4, #0 + add r0, #0x18 + bl ov12_02225C14 + cmp r0, #0 + beq _0223187E + mov r2, #0x64 + mov r3, #0x66 + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0x14] + add r0, #0x18 + bl ov12_022259DC + b _02231940 +_0223187E: + ldr r0, [r4, #0x68] + add r0, r0, #1 + str r0, [r4, #0x68] + cmp r0, #6 + bge _022318AE + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #0x64 + ldrsh r1, [r4, r0] + mov r0, #0x18 + ldrsh r0, [r4, r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x64 + strh r1, [r0] + mov r0, #0x66 + ldrsh r1, [r4, r0] + mov r0, #0x1a + ldrsh r0, [r4, r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x66 + strh r1, [r0] + b _02231940 +_022318AE: + ldr r0, [r4, #0xc] + mov r1, #1 + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0x14] + bl sub_0200D810 + mov r1, #0x10 + add r0, r4, #0 + mov r2, #0 + str r1, [sp] + add r0, #0x3c + add r3, r2, #0 + str r1, [sp, #4] + bl ov12_02226424 + ldr r0, _0223194C ; =0x00007FFF + mov r1, #0 + str r0, [sp] + ldr r0, [r4, #0x10] + mov r2, #0xa + add r3, r1, #0 + bl sub_020086FC + b _02231940 +_022318E0: + add r0, r4, #0 + add r0, #0x3c + bl ov12_02226454 + cmp r0, #0 + beq _022318F4 + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D3F4 +_022318F4: + ldr r0, [r4, #0x10] + bl sub_020087B4 + cmp r0, #0 + bne _02231940 + ldr r0, [r4, #0xc] + mov r2, #0 + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, _0223194C ; =0x00007FFF + mov r1, #0xa + str r0, [sp] + ldr r0, [r4, #0x10] + add r3, r2, #0 + bl sub_020086FC + b _02231940 +_02231916: + ldr r0, [r4, #0x10] + bl sub_020087B4 + cmp r0, #0 + bne _02231940 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231940 +_02231928: + ldr r0, [r4, #0x14] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, pc} +_02231940: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223194C: .word 0x00007FFF + thumb_func_end ov12_0223181C + + thumb_func_start ov12_02231950 +ov12_02231950: ; 0x02231950 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x70 + add r5, r0, #0 + str r2, [sp] + add r6, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + ldr r0, [sp] + str r7, [r4, #4] + str r0, [r4, #8] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x10] + str r6, [r4, #0x14] + add r0, r6, #0 + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D460 + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x64 + add r2, #0x66 + bl sub_0200D550 + ldr r0, [r4, #0] + ldr r1, _022319A8 ; =ov12_0223181C + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022319A8: .word ov12_0223181C + thumb_func_end ov12_02231950 + + thumb_func_start ov12_022319AC +ov12_022319AC: ; 0x022319AC + push {r3, lr} + sub sp, #8 + ldr r1, [r0, #0x50] + cmp r1, #3 + bhi _02231A2E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022319C2: ; jump table + .short _022319CA - _022319C2 - 2 ; case 0 + .short _022319E0 - _022319C2 - 2 ; case 1 + .short _022319FA - _022319C2 - 2 ; case 2 + .short _02231A14 - _022319C2 - 2 ; case 3 +_022319CA: + mov r2, #0x50 + str r2, [sp] + mov r1, #4 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x28 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_022319E0: + mov r1, #0x4f + mvn r1, r1 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x28 + add r2, r1, #0 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_022319FA: + mov r1, #0x50 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + mov r1, #0 + add r2, r1, #0 + add r0, #0x28 + sub r2, #0x50 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_02231A14: + mov r1, #0x27 + mvn r1, r1 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x28 + mov r2, #0x28 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_02231A2E: + bl sub_02022974 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_022319AC + + thumb_func_start ov12_02231A38 +ov12_02231A38: ; 0x02231A38 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #6 + bhi _02231B42 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02231A52: ; jump table + .short _02231A60 - _02231A52 - 2 ; case 0 + .short _02231A7C - _02231A52 - 2 ; case 1 + .short _02231AE8 - _02231A52 - 2 ; case 2 + .short _02231B44 - _02231A52 - 2 ; case 3 + .short _02231BA6 - _02231A52 - 2 ; case 4 + .short _02231BC6 - _02231A52 - 2 ; case 5 + .short _02231BF4 - _02231A52 - 2 ; case 6 +_02231A60: + ldr r0, [r4, #0x54] + add r0, r0, #1 + str r0, [r4, #0x54] + cmp r0, #1 + ble _02231B42 + add r0, r4, #0 + bl ov12_022319AC + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x54] + b _02231C0C +_02231A7C: + add r0, r4, #0 + add r0, #0x28 + bl ov12_02225C14 + cmp r0, #0 + beq _02231A9C + mov r2, #0x4c + mov r3, #0x4e + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #0x24] + add r0, #0x28 + bl ov12_022259DC + b _02231C0C +_02231A9C: + ldr r0, [r4, #0x50] + add r0, r0, #1 + str r0, [r4, #0x50] + cmp r0, #4 + bge _02231ACC + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #0x4c + ldrsh r1, [r4, r0] + mov r0, #0x28 + ldrsh r0, [r4, r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x4c + strh r1, [r0] + mov r0, #0x4e + ldrsh r1, [r4, r0] + mov r0, #0x2a + ldrsh r0, [r4, r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x4e + strh r1, [r0] + b _02231C0C +_02231ACC: + ldr r0, [r4, #0xc] + mov r1, #1 + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #8 + str r0, [r4, #0x54] + ldr r0, [r4, #0x24] + bl sub_0200D364 + ldr r0, [r4, #0x24] + mov r1, #1 + bl sub_0200D390 + b _02231C0C +_02231AE8: + ldr r0, [r4, #0x54] + sub r0, r0, #1 + str r0, [r4, #0x54] + bpl _02231B42 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl ov12_0222332C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_02222354 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _02231C18 ; =0x0000FFFF + mov r1, #1 + lsl r2, r2, #0x10 + add r3, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + lsr r2, r2, #0x10 + sub r3, #9 + bl sub_02003178 + ldr r7, _02231C18 ; =0x0000FFFF + mov r6, #0 + add r5, r4, #0 +_02231B28: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _02231B3A + mov r1, #0xe + mov r2, #0x10 + mov r3, #0 + str r7, [sp] + bl sub_020086FC +_02231B3A: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _02231B28 +_02231B42: + b _02231C0C +_02231B44: + ldr r0, [r4, #0] + bl ov12_0222332C + bl sub_0200384C + cmp r0, #0 + bne _02231C0C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl ov12_0222332C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_02222354 + add r2, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02231C18 ; =0x0000FFFF + mov r1, #1 + lsl r2, r2, #0x10 + add r3, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + lsr r2, r2, #0x10 + sub r3, #9 + bl sub_02003178 + ldr r7, _02231C18 ; =0x0000FFFF + mov r6, #0 + add r5, r4, #0 +_02231B8A: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _02231B9C + mov r2, #0 + mov r1, #2 + add r3, r2, #0 + str r7, [sp] + bl sub_020086FC +_02231B9C: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _02231B8A + b _02231C0C +_02231BA6: + ldr r0, [r4, #0] + bl ov12_0222332C + bl sub_0200384C + cmp r0, #0 + bne _02231C0C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #4 + str r0, [r4, #0x54] + str r0, [r4, #0x50] + mov r0, #0 + str r0, [r4, #0x58] + b _02231C0C +_02231BC6: + ldr r0, [r4, #0x54] + sub r0, r0, #1 + str r0, [r4, #0x54] + bpl _02231C0C + mov r0, #4 + str r0, [r4, #0x54] + ldr r0, [r4, #0x50] + sub r0, r0, #1 + str r0, [r4, #0x50] + bpl _02231BE2 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02231C0C +_02231BE2: + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x58] + bl sub_0200D3F4 + ldr r1, [r4, #0x58] + mov r0, #1 + eor r0, r1 + str r0, [r4, #0x58] + b _02231C0C +_02231BF4: + ldr r0, [r4, #0x24] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_02231C0C: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02231C18: .word 0x0000FFFF + thumb_func_end ov12_02231A38 + + thumb_func_start ov12_02231C1C +ov12_02231C1C: ; 0x02231C1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + mov r1, #0x5c + add r4, r0, #0 + str r2, [sp, #4] + add r7, r3, #0 + bl ov12_02235E50 + add r6, r0, #0 + str r4, [r6, #0] + ldr r0, [sp, #4] + str r5, [r6, #4] + str r0, [r6, #8] + add r0, r4, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + str r0, [r6, #0x10] + mov r4, #0 + add r5, r6, #0 +_02231C4C: + ldr r0, [r6, #0] + add r1, r4, #0 + bl ov12_022232FC + str r0, [r5, #0x14] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02231C4C + str r7, [r6, #0x24] + add r0, r7, #0 + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r6, #0x24] + mov r1, #1 + bl sub_0200D460 + add r1, r6, #0 + add r2, r6, #0 + ldr r0, [r6, #0x24] + add r1, #0x4c + add r2, #0x4e + bl sub_0200D550 + mov r1, #0x4c + ldrsh r2, [r6, r1] + add r0, r6, #0 + add r0, #0x4c + sub r2, #0x28 + strh r2, [r0] + mov r2, #0x4e + ldrsh r3, [r6, r2] + add r0, r6, #0 + add r0, #0x4e + sub r3, #0x28 + strh r3, [r0] + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r6, #0x24] + bl sub_0200D4C4 + ldr r0, [r6, #0x24] + mov r1, #1 + bl sub_0200D810 + mov r0, #0xf + mvn r0, r0 + str r0, [r6, #0x54] + mov r0, #0x1a + str r0, [sp] + ldr r0, _02231CCC ; =0x04000050 + mov r1, #0 + mov r2, #0x3f + mov r3, #0x1f + bl sub_020BF55C + ldr r0, [r6, #0] + ldr r1, _02231CD0 ; =ov12_02231A38 + add r2, r6, #0 + bl ov12_022201E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02231CCC: .word 0x04000050 +_02231CD0: .word ov12_02231A38 + thumb_func_end ov12_02231C1C + + thumb_func_start ov12_02231CD4 +ov12_02231CD4: ; 0x02231CD4 + push {r3, r4, r5, lr} + ldr r2, _02231D14 ; =0x00000AAA + add r4, r0, #0 + add r5, r1, #0 + add r0, #0x10 + mov r1, #0 + mov r3, #3 + bl ov12_02225D78 + cmp r5, #0 + beq _02231D00 + mov r0, #0 + ldr r1, [r4, #0x18] + mvn r0, r0 + mul r0, r1 + str r0, [r4, #0x18] + ldr r0, [r4, #8] + mov r1, #0xa + mov r2, #0x10 + bl sub_02007DEC + b _02231D0C +_02231D00: + mov r1, #0xa + add r2, r1, #0 + ldr r0, [r4, #8] + sub r2, #0x1a + bl sub_02007DEC +_02231D0C: + mov r0, #0 + str r0, [r4, #0x4c] + str r0, [r4, #0x50] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02231D14: .word 0x00000AAA + thumb_func_end ov12_02231CD4 + + thumb_func_start ov12_02231D18 +ov12_02231D18: ; 0x02231D18 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x4c] + mov r5, #0 + cmp r0, #3 + bhi _02231E22 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02231D32: ; jump table + .short _02231D3A - _02231D32 - 2 ; case 0 + .short _02231D7A - _02231D32 - 2 ; case 1 + .short _02231DD6 - _02231D32 - 2 ; case 2 + .short _02231E20 - _02231D32 - 2 ; case 3 +_02231D3A: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225DC8 + ldr r0, [r4, #8] + ldr r2, [r4, #0x10] + mov r1, #9 + bl sub_02007DEC + ldr r0, [r4, #0x50] + sub r0, r0, #1 + str r0, [r4, #0x50] + bpl _02231E22 + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] + mov r0, #0xe + ldrsh r3, [r4, r0] + mov r0, #0xc + ldrsh r1, [r4, r0] + add r0, r3, #2 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r0, #2 + add r4, #0x24 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r1, #0 + bl ov12_02225BC8 + b _02231E22 +_02231D7A: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225DC8 + cmp r0, #0 + beq _02231D90 + ldr r0, [r4, #8] + ldr r2, [r4, #0x10] + mov r1, #9 + bl sub_02007DEC +_02231D90: + add r0, r4, #0 + ldr r1, [r4, #8] + add r0, #0x24 + bl ov12_02225C74 + cmp r0, #0 + bne _02231E22 + ldr r0, [r4, #0x4c] + mov r2, #0 + add r0, r0, #1 + str r0, [r4, #0x4c] + ldr r1, [r4, #0x10] + add r0, r4, #0 + lsl r1, r1, #0x10 + add r0, #0x10 + asr r1, r1, #0x10 + mov r3, #3 + bl ov12_02225D78 + mov r0, #0xe + ldrsh r3, [r4, r0] + mov r0, #0xc + ldrsh r1, [r4, r0] + mov r0, #2 + add r4, #0x24 + str r3, [sp] + add r3, r3, #2 + lsl r3, r3, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r1, #0 + asr r3, r3, #0x10 + bl ov12_02225BC8 + b _02231E22 +_02231DD6: + add r0, r4, #0 + ldr r1, [r4, #8] + add r0, #0x24 + bl ov12_02225C74 + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225DC8 + cmp r0, #0 + ldr r0, [r4, #8] + beq _02231DF8 + ldr r2, [r4, #0x10] + mov r1, #9 + bl sub_02007DEC + b _02231E22 +_02231DF8: + mov r2, #0xc + ldrsh r2, [r4, r2] + add r1, r5, #0 + bl sub_02007DEC + mov r2, #0xe + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #9 + add r2, r5, #0 + bl sub_02007DEC + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] + b _02231E22 +_02231E20: + mov r5, #1 +_02231E22: + add r0, r5, #0 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02231D18 + + thumb_func_start ov12_02231E28 +ov12_02231E28: ; 0x02231E28 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02231E3A + cmp r0, #1 + beq _02231E6C + pop {r4, pc} +_02231E3A: + add r0, r4, #0 + bl ov12_02231D18 + cmp r0, #0 + beq _02231E7A + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] + cmp r0, #4 + bge _02231E64 + ldr r1, [r4, #0x54] + mov r0, #1 + eor r1, r0 + add r0, r4, #0 + str r1, [r4, #0x54] + bl ov12_02231CD4 + add r0, r4, #0 + bl ov12_02231D18 + pop {r4, pc} +_02231E64: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02231E6C: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02231E7A: + pop {r4, pc} + thumb_func_end ov12_02231E28 + + thumb_func_start ov12_02231E7C +ov12_02231E7C: ; 0x02231E7C + push {r4, r5, r6, lr} + mov r1, #0x58 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #4] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02225964 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220280 + cmp r0, #0 + bne _02231EC8 + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0xc] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + b _02231EE8 +_02231EC8: + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0xc] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 +_02231EE8: + strh r0, [r4, #0xe] + ldr r0, [r4, #8] + mov r1, #0xb + mov r2, #0x32 + bl sub_02007DEC + cmp r6, #1 + bne _02231EFC + mov r0, #0 + b _02231EFE +_02231EFC: + mov r0, #1 +_02231EFE: + str r0, [r4, #0x54] + ldr r1, [r4, #0x54] + add r0, r4, #0 + bl ov12_02231CD4 + ldr r0, [r4, #4] + ldr r1, _02231F14 ; =ov12_02231E28 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02231F14: .word ov12_02231E28 + thumb_func_end ov12_02231E7C + + thumb_func_start ov12_02231F18 +ov12_02231F18: ; 0x02231F18 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x38] + mov r5, #0 + cmp r0, #3 + bhi _02231FD4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02231F30: ; jump table + .short _02231F38 - _02231F30 - 2 ; case 0 + .short _02231F68 - _02231F30 - 2 ; case 1 + .short _02231F8A - _02231F30 - 2 ; case 2 + .short _02231FBA - _02231F30 - 2 ; case 3 +_02231F38: + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_022260C8 + cmp r0, #0 + beq _02231F60 + add r0, r5, #0 + str r0, [sp] + ldr r1, [r4, #0x3c] + ldr r2, [r4, #0x40] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02226024 + b _02231FD4 +_02231F60: + ldr r0, [r4, #0x38] + add r0, r0, #1 + str r0, [r4, #0x38] + b _02231FD4 +_02231F68: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bpl _02231FD4 + ldr r0, [r4, #0x38] + mov r2, #0xa + add r0, r0, #1 + str r0, [r4, #0x38] + mov r0, #8 + add r4, #0x10 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xf + add r3, r2, #0 + bl ov12_02225E68 + b _02231FD4 +_02231F8A: + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + bl ov12_022260C8 + cmp r0, #0 + beq _02231FB2 + add r0, r5, #0 + str r0, [sp] + ldr r1, [r4, #0x3c] + ldr r2, [r4, #0x40] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x24] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02226024 + b _02231FD4 +_02231FB2: + ldr r0, [r4, #0x38] + add r0, r0, #1 + str r0, [r4, #0x38] + b _02231FD4 +_02231FBA: + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #0xc] + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0xc] + add r2, #0xf3 + bl sub_02007DEC + mov r5, #1 +_02231FD4: + add r0, r5, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02231F18 + + thumb_func_start ov12_02231FD8 +ov12_02231FD8: ; 0x02231FD8 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _02231FEE + cmp r0, #1 + beq _02232004 + cmp r0, #2 + beq _02232014 + pop {r4, pc} +_02231FEE: + add r0, r4, #0 + bl ov12_02231F18 + cmp r0, #0 + beq _02232022 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0x10 + str r0, [r4, #8] + pop {r4, pc} +_02232004: + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + bpl _02232022 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, pc} +_02232014: + ldr r0, [r4, #0] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_02232022: + pop {r4, pc} + thumb_func_end ov12_02231FD8 + + thumb_func_start ov12_02232024 +ov12_02232024: ; 0x02232024 + push {r3, r4, r5, lr} + mov r1, #0x44 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xa + add r0, #0x10 + add r2, r1, #0 + mov r3, #0xf + bl ov12_02225E68 + mov r0, #4 + str r0, [r4, #0x34] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 + str r0, [r4, #0x40] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + str r0, [r4, #0x3c] + ldr r0, [r4, #0] + ldr r1, _02232080 ; =ov12_02231FD8 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_02232080: .word ov12_02231FD8 + thumb_func_end ov12_02232024 + + thumb_func_start ov12_02232084 +ov12_02232084: ; 0x02232084 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x74] + mov r1, #0x64 + bl sub_020E1F6C + add r4, r0, #0 + ldr r0, [r5, #0x78] + mov r1, #0x64 + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [r5, #0x70] + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp] + add r0, r5, #0 + lsl r1, r4, #0x10 + lsl r3, r6, #0x10 + add r0, #0x18 + asr r1, r1, #0x10 + mov r2, #0xa + asr r3, r3, #0x10 + bl ov12_02225E68 + ldr r0, [r5, #0] + mov r1, #0x10 + mov r2, #0 + bl ov12_02235780 + ldr r0, [r5, #0x70] + mov r1, #0x64 + bl sub_020E1F6C + mov r1, #6 + str r1, [sp] + lsl r0, r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x3c + mov r1, #0x10 + mov r2, #0xa + mov r3, #0 + bl ov12_02226424 + mov r0, #0 + str r0, [r5, #0x64] + str r0, [r5, #0x68] + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02232084 + + thumb_func_start ov12_022320EC +ov12_022320EC: ; 0x022320EC + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [r4, #0x64] + mov r5, #0 + cmp r0, #3 + bhi _022321C0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02232104: ; jump table + .short _0223210C - _02232104 - 2 ; case 0 + .short _02232152 - _02232104 - 2 ; case 1 + .short _022321A8 - _02232104 - 2 ; case 2 + .short _022321BE - _02232104 - 2 ; case 3 +_0223210C: + add r0, r4, #0 + ldr r1, [r4, #0x14] + add r0, #0x18 + bl ov12_022260A8 + cmp r0, #0 + bne _022321C0 + ldr r0, [r4, #0x78] + mov r1, #0x64 + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [r4, #0x74] + mov r1, #0x64 + bl sub_020E1F6C + add r7, r0, #0 + ldr r0, [r4, #0x70] + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp] + add r0, r4, #0 + lsl r1, r6, #0x10 + lsl r3, r7, #0x10 + add r0, #0x18 + asr r1, r1, #0x10 + mov r2, #0xa + asr r3, r3, #0x10 + bl ov12_02225E68 + ldr r0, [r4, #0x64] + add r0, r0, #1 + str r0, [r4, #0x64] + b _022321C0 +_02232152: + add r0, r4, #0 + ldr r1, [r4, #0x14] + add r0, #0x18 + bl ov12_022260A8 + cmp r0, #0 + bne _022321C0 + ldr r0, [r4, #0x68] + add r0, r0, #1 + str r0, [r4, #0x68] + cmp r0, #2 + bge _022321A0 + add r0, r5, #0 + str r0, [r4, #0x64] + ldr r0, [r4, #0x74] + mov r1, #0x64 + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [r4, #0x78] + mov r1, #0x64 + bl sub_020E1F6C + add r7, r0, #0 + ldr r0, [r4, #0x70] + mov r1, #0x64 + bl sub_020E1F6C + lsl r1, r6, #0x10 + lsl r3, r7, #0x10 + add r4, #0x18 + str r0, [sp] + add r0, r4, #0 + asr r1, r1, #0x10 + mov r2, #0xa + asr r3, r3, #0x10 + bl ov12_02225E68 + b _022321C0 +_022321A0: + ldr r0, [r4, #0x64] + add r0, r0, #1 + str r0, [r4, #0x64] + b _022321C0 +_022321A8: + add r0, r4, #0 + add r0, #0x3c + bl ov12_02226454 + cmp r0, #0 + beq _022321C0 + ldr r0, [r4, #0x64] + mov r5, #1 + add r0, r0, #1 + str r0, [r4, #0x64] + b _022321C0 +_022321BE: + mov r5, #1 +_022321C0: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022320EC + + thumb_func_start ov12_022321C4 +ov12_022321C4: ; 0x022321C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0x7c] + mov r4, #0 + cmp r1, #0 + beq _022321DA + cmp r1, #1 + beq _022321EC + cmp r1, #2 + beq _02232236 + b _02232238 +_022321DA: + bl ov12_02232084 + add r0, r5, #0 + bl ov12_022320EC + ldr r0, [r5, #0x7c] + add r0, r0, #1 + str r0, [r5, #0x7c] + b _02232238 +_022321EC: + bl ov12_022320EC + cmp r0, #0 + beq _02232238 + ldr r0, [r5, #0x6c] + sub r0, r0, #1 + str r0, [r5, #0x6c] + bmi _0223222C + ldr r0, [r5, #0x70] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [r5, #0x70] + sub r0, r1, r0 + str r0, [r5, #0x70] + ldr r0, [r5, #0x74] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [r5, #0x74] + sub r0, r1, r0 + str r0, [r5, #0x74] + ldr r0, [r5, #0x78] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [r5, #0x78] + sub r0, r1, r0 + str r0, [r5, #0x78] + add r0, r4, #0 + str r0, [r5, #0x7c] + b _02232238 +_0223222C: + ldr r0, [r5, #0x7c] + mov r4, #1 + add r0, r0, #1 + str r0, [r5, #0x7c] + b _02232238 +_02232236: + mov r4, #1 +_02232238: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_022321C4 + + thumb_func_start ov12_0223223C +ov12_0223223C: ; 0x0223223C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #4 + bls _0223224C + b _0223236C +_0223224C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02232258: ; jump table + .short _02232262 - _02232258 - 2 ; case 0 + .short _022322A8 - _02232258 - 2 ; case 1 + .short _02232308 - _02232258 - 2 ; case 2 + .short _02232338 - _02232258 - 2 ; case 3 + .short _02232354 - _02232258 - 2 ; case 4 +_02232262: + add r0, r4, #0 + bl ov12_022321C4 + cmp r0, #0 + beq _0223236C + ldr r0, [r4, #0xc] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0x1e + str r0, [r4, #0x10] + ldr r0, [r4, #0x14] + bl sub_0200D364 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D390 + mov r1, #0xfe + lsl r1, r1, #0x16 + ldr r0, [r4, #0x14] + add r2, r1, #0 + bl sub_0200D6E8 + mov r1, #0 + mov r2, #0x10 + str r1, [sp] + mov r0, #4 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x3c + add r3, r2, #0 + bl ov12_02226424 + b _0223236C +_022322A8: + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _022322C6 + mov r0, #1 + str r0, [sp] + mov r0, #8 + mov r1, #0x10 + mov r2, #0 + mov r3, #0xd + bl sub_0200AAE0 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x10] + b _022322CC +_022322C6: + ble _022322CC + sub r0, r0, #1 + str r0, [r4, #0x10] +_022322CC: + mov r0, #0 + ldr r1, [r4, #0x10] + mvn r0, r0 + cmp r1, r0 + bne _022322F6 + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _022322F6 + mov r0, #1 + str r0, [sp] + mov r0, #8 + mov r1, #0 + mov r2, #0x10 + mov r3, #0xd + bl sub_0200AAE0 + mov r0, #1 + mvn r0, r0 + str r0, [r4, #0x10] +_022322F6: + ldr r0, [r4, #0x14] + bl sub_0200D3B8 + cmp r0, #0 + bne _0223236C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223236C +_02232308: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _0223236C + ldr r0, [r4, #0xc] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + mov r2, #0 + bl ov12_02235780 + mov r1, #0x10 + mov r2, #0 + str r1, [sp] + mov r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x3c + add r3, r2, #0 + bl ov12_02226424 + b _0223236C +_02232338: + add r0, r4, #0 + add r0, #0x3c + bl ov12_02226454 + cmp r0, #0 + beq _0223236C + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223236C +_02232354: + ldr r0, [r4, #0x14] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, pc} +_0223236C: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0223223C + + thumb_func_start ov12_02232378 +ov12_02232378: ; 0x02232378 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x80 + add r6, r0, #0 + str r2, [sp] + add r5, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r6, [r4, #0] + ldr r0, [sp] + str r7, [r4, #4] + str r0, [r4, #8] + str r5, [r4, #0x14] + add r0, r5, #0 + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x14] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x14] + mov r1, #4 + bl sub_0200D3CC + mov r0, #3 + str r0, [r4, #0x6c] + mov r0, #0x19 + lsl r0, r0, #4 + str r0, [r4, #0x70] + ldr r0, _022323DC ; =0x000005DC + ldr r1, _022323E0 ; =ov12_0223223C + str r0, [r4, #0x74] + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [r4, #0x78] + ldr r0, [r4, #0] + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022323DC: .word 0x000005DC +_022323E0: .word ov12_0223223C + thumb_func_end ov12_02232378 + + thumb_func_start ov12_022323E4 +ov12_022323E4: ; 0x022323E4 + push {r3, lr} + sub sp, #8 + ldr r1, [r0, #0x34] + cmp r1, #3 + bhi _0223242C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022323FA: ; jump table + .short _02232402 - _022323FA - 2 ; case 0 + .short _0223241A - _022323FA - 2 ; case 1 + .short _02232402 - _022323FA - 2 ; case 2 + .short _0223241A - _022323FA - 2 ; case 3 +_02232402: + mov r1, #0x20 + str r1, [sp] + mov r1, #6 + str r1, [sp, #4] + mov r1, #0 + add r0, #0x10 + add r2, r1, #0 + add r3, r1, #0 + bl ov12_02225BC8 + add sp, #8 + pop {r3, pc} +_0223241A: + mov r1, #0 + str r1, [sp] + mov r2, #6 + str r2, [sp, #4] + add r0, #0x10 + add r2, r1, #0 + mov r3, #0x20 + bl ov12_02225BC8 +_0223242C: + add sp, #8 + pop {r3, pc} + thumb_func_end ov12_022323E4 + + thumb_func_start ov12_02232430 +ov12_02232430: ; 0x02232430 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02232446 + cmp r0, #1 + beq _02232454 + cmp r0, #2 + beq _0223248C + pop {r4, pc} +_02232446: + add r0, r4, #0 + bl ov12_022323E4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02232454: + add r0, r4, #0 + add r0, #0x10 + bl ov12_02225C14 + cmp r0, #0 + beq _02232474 + mov r2, #0xc + mov r3, #0xe + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + ldr r1, [r4, #8] + add r0, #0x10 + bl ov12_02225A18 + pop {r4, pc} +_02232474: + ldr r0, [r4, #0x34] + add r0, r0, #1 + str r0, [r4, #0x34] + cmp r0, #4 + bge _02232484 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} +_02232484: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_0223248C: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov12_02232430 + + thumb_func_start ov12_0223249C +ov12_0223249C: ; 0x0223249C + push {r3, r4, r5, lr} + mov r1, #0x38 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #4] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0xc] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0xe] + mov r0, #0 + str r0, [r4, #0x34] + ldr r0, [r4, #4] + ldr r1, _022324DC ; =ov12_02232430 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022324DC: .word ov12_02232430 + thumb_func_end ov12_0223249C + + thumb_func_start ov12_022324E0 +ov12_022324E0: ; 0x022324E0 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #0] + cmp r0, #6 + bhi _02232542 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022324FA: ; jump table + .short _02232508 - _022324FA - 2 ; case 0 + .short _02232526 - _022324FA - 2 ; case 1 + .short _0223259E - _022324FA - 2 ; case 2 + .short _022325E2 - _022324FA - 2 ; case 3 + .short _02232620 - _022324FA - 2 ; case 4 + .short _02232668 - _022324FA - 2 ; case 5 + .short _02232698 - _022324FA - 2 ; case 6 +_02232508: + add r0, r4, #0 + add r0, #0x14 + mov r1, #1 + mov r2, #0x40 + bl ov12_022263A4 + ldr r1, [r4, #0x20] + ldr r0, [r4, #8] + add sp, #8 + mul r0, r1 + str r0, [r4, #0x20] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02232526: + mov r2, #0x12 + ldrsh r2, [r4, r2] + mov r1, #0x10 + add r0, r4, #0 + add r2, #8 + lsl r2, r2, #0x10 + ldrsh r1, [r4, r1] + ldr r3, [r4, #0xc] + add r0, #0x14 + asr r2, r2, #0x10 + bl ov12_02225BA0 + cmp r0, #0 + beq _02232544 +_02232542: + b _022326A6 +_02232544: + mov r2, #0x10 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x12 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02007DEC + mov r0, #0x10 + ldrsh r1, [r4, r0] + mov r3, #0 + mov r0, #2 + add r2, r1, #0 + str r3, [sp] + add r2, #0x20 + str r0, [sp, #4] + add r0, r4, #0 + lsl r2, r2, #0x10 + add r0, #0x14 + asr r2, r2, #0x10 + bl ov12_02225BC8 + ldr r1, [r4, #0x1c] + ldr r0, [r4, #8] + mul r0, r1 + str r0, [r4, #0x1c] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225C14 + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_0223259E: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225C14 + cmp r0, #0 + beq _022325BA + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_022325BA: + mov r0, #0x3c + ldrsh r1, [r4, r0] + mov r3, #0 + mov r0, #2 + str r3, [sp] + str r0, [sp, #4] + ldr r2, [r4, #8] + add r0, r4, #0 + lsl r2, r2, #5 + add r2, r1, r2 + lsl r2, r2, #0x10 + add r0, #0x40 + asr r2, r2, #0x10 + bl ov12_02225BC8 + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_022325E2: + add r0, r4, #0 + add r0, #0x40 + bl ov12_02225C14 + cmp r0, #0 + beq _022325FE + mov r2, #0x40 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x38] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_022325FE: + mov r3, #0 + str r3, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r1, #0x14 + mov r2, #0x10 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + add r0, #0x14 + bl ov12_02225BC8 + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02232620: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02225C14 + cmp r0, #0 + ldr r0, [r4, #0xc] + beq _0223263C + mov r2, #0x14 + ldrsh r2, [r4, r2] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_0223263C: + mov r2, #0x10 + ldrsh r2, [r4, r2] + mov r1, #0 + bl sub_02007DEC + mov r3, #0 + str r3, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r1, #0x40 + mov r2, #0x3c + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + add r0, #0x40 + bl ov12_02225BC8 + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02232668: + add r0, r4, #0 + add r0, #0x40 + bl ov12_02225C14 + cmp r0, #0 + ldr r0, [r4, #0x38] + beq _02232684 + mov r2, #0x40 + ldrsh r2, [r4, r2] + mov r1, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, pc} +_02232684: + mov r2, #0x3c + ldrsh r2, [r4, r2] + mov r1, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02232698: + ldr r0, [r4, #4] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_022326A6: + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_022324E0 + + thumb_func_start ov12_022326AC +ov12_022326AC: ; 0x022326AC + push {r3, r4, r5, lr} + mov r1, #0x64 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #4] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_02225964 + str r0, [r4, #8] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0xc] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x10] + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x12] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov12_022232FC + str r0, [r4, #0x38] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x3c] + ldr r0, [r4, #0x38] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x3e] + ldr r0, [r4, #4] + ldr r1, _0223271C ; =ov12_022324E0 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_0223271C: .word ov12_022324E0 + thumb_func_end ov12_022326AC + + thumb_func_start ov12_02232720 +ov12_02232720: ; 0x02232720 + push {lr} + sub sp, #0xc + mov r1, #0 + str r1, [r0, #0x40] + mov r1, #8 + str r1, [sp] + mov r1, #0xa + str r1, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + add r0, #0x1c + mov r2, #9 + add r3, r1, #0 + bl ov12_02225EF0 + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov12_02232720 + + thumb_func_start ov12_02232744 +ov12_02232744: ; 0x02232744 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x40] + mov r5, #0 + cmp r0, #3 + bhi _02232836 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223275E: ; jump table + .short _02232766 - _0223275E - 2 ; case 0 + .short _022327AC - _0223275E - 2 ; case 1 + .short _022327EE - _0223275E - 2 ; case 2 + .short _02232834 - _0223275E - 2 ; case 3 +_02232766: + add r0, r4, #0 + ldr r1, [r4, #0x18] + add r0, #0x1c + bl ov12_022260E8 + cmp r0, #0 + beq _0223278A + add r0, r5, #0 + str r0, [sp] + mov r1, #0x44 + mov r2, #0x46 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + ldr r3, [r4, #0x30] + bl ov12_02226024 + b _02232836 +_0223278A: + ldr r0, [r4, #0x40] + mov r1, #9 + add r0, r0, #1 + str r0, [r4, #0x40] + mov r0, #0xf + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + add r4, #0x1c + str r0, [sp, #8] + add r0, r4, #0 + mov r2, #0xb + mov r3, #8 + bl ov12_02225EF0 + b _02232836 +_022327AC: + add r0, r4, #0 + ldr r1, [r4, #0x18] + add r0, #0x1c + bl ov12_022260E8 + cmp r0, #0 + beq _022327D0 + add r0, r5, #0 + str r0, [sp] + mov r1, #0x44 + mov r2, #0x46 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + ldr r3, [r4, #0x30] + bl ov12_02226024 + b _02232836 +_022327D0: + ldr r0, [r4, #0x40] + mov r2, #0xa + add r0, r0, #1 + str r0, [r4, #0x40] + str r2, [sp] + str r2, [sp, #4] + mov r0, #2 + add r4, #0x1c + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xb + mov r3, #0xf + bl ov12_02225EF0 + b _02232836 +_022327EE: + add r0, r4, #0 + ldr r1, [r4, #0x18] + add r0, #0x1c + bl ov12_022260E8 + cmp r0, #0 + beq _02232812 + add r0, r5, #0 + str r0, [sp] + mov r1, #0x44 + mov r2, #0x46 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x18] + ldr r3, [r4, #0x30] + bl ov12_02226024 + b _02232836 +_02232812: + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #0x18] + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0x18] + add r2, #0xf3 + bl sub_02007DEC + ldr r0, [r4, #0x40] + mov r5, #1 + add r0, r0, #1 + str r0, [r4, #0x40] + b _02232836 +_02232834: + mov r5, #1 +_02232836: + add r0, r5, #0 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov12_02232744 + + thumb_func_start ov12_0223283C +ov12_0223283C: ; 0x0223283C + push {r3, r4, r5, lr} + add r4, r2, #0 + mov r2, #0 + str r2, [r1, #0] + add r5, r0, #0 + mov r1, #0x64 + bl sub_0200D474 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D460 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D3F4 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D390 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D3A4 + add r0, r5, #0 + mov r1, #0 + bl sub_0200D364 + add r0, r5, #0 + mov r1, #0 + bl sub_0200D3CC + mov r1, #0x37 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_0200D34C + pop {r3, r4, r5, pc} + thumb_func_end ov12_0223283C + + thumb_func_start ov12_02232888 +ov12_02232888: ; 0x02232888 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + mov r4, #0 + cmp r1, #0 + beq _0223289A + cmp r1, #1 + beq _022328AC + b _022328B0 +_0223289A: + bl sub_0200D3B8 + cmp r0, #0 + bne _022328B2 + ldr r0, [r5, #0] + mov r4, #1 + add r0, r0, #1 + str r0, [r5, #0] + b _022328B2 +_022328AC: + mov r4, #1 + b _022328B2 +_022328B0: + mov r4, #1 +_022328B2: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02232888 + + thumb_func_start ov12_022328B8 +ov12_022328B8: ; 0x022328B8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + ldr r0, [r6, #0xc] + cmp r0, #5 + bls _022328C6 + b _022329D8 +_022328C6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022328D2: ; jump table + .short _022328DE - _022328D2 - 2 ; case 0 + .short _02232902 - _022328D2 - 2 ; case 1 + .short _0223293A - _022328D2 - 2 ; case 2 + .short _0223296A - _022328D2 - 2 ; case 3 + .short _02232990 - _022328D2 - 2 ; case 4 + .short _022329B6 - _022328D2 - 2 ; case 5 +_022328DE: + add r0, r6, #0 + bl ov12_02232720 + ldr r0, [r6, #0x10] + add r1, r6, #0 + lsl r2, r0, #2 + add r0, r6, r2 + add r1, #0x60 + add r1, r1, r2 + mov r2, #2 + ldr r0, [r0, #0x48] + lsl r2, r2, #0xc + bl ov12_0223283C + ldr r0, [r6, #0xc] + add r0, r0, #1 + str r0, [r6, #0xc] + b _022329D8 +_02232902: + add r0, r6, #0 + bl ov12_02232744 + add r4, r0, #0 + ldr r0, [r6, #0x10] + add r1, r6, #0 + lsl r2, r0, #2 + add r0, r6, r2 + add r1, #0x60 + ldr r0, [r0, #0x48] + add r1, r1, r2 + bl ov12_02232888 + cmp r4, r0 + bne _022329D8 + cmp r4, #1 + bne _022329D8 + ldr r0, [r6, #0x10] + mov r1, #1 + lsl r0, r0, #2 + add r0, r6, r0 + ldr r0, [r0, #0x48] + bl sub_0200D364 + ldr r0, [r6, #0xc] + add r0, r0, #1 + str r0, [r6, #0xc] + b _022329D8 +_0223293A: + ldr r0, [r6, #0x10] + add r2, r6, #0 + add r2, #0x78 + lsl r1, r0, #2 + ldr r0, [r2, r1] + sub r0, r0, #1 + str r0, [r2, r1] + ldr r1, [r6, #0x10] + lsl r0, r1, #2 + add r0, r6, r0 + ldr r0, [r0, #0x78] + cmp r0, #0 + bge _022329D8 + add r0, r1, #1 + str r0, [r6, #0x10] + cmp r0, #6 + bge _02232962 + mov r0, #0 + str r0, [r6, #0xc] + b _022329D8 +_02232962: + ldr r0, [r6, #0xc] + add r0, r0, #1 + str r0, [r6, #0xc] + b _022329D8 +_0223296A: + add r4, r6, #0 + mov r7, #0 + add r4, #0x60 + add r5, r6, #0 +_02232972: + mov r2, #2 + ldr r0, [r5, #0x48] + add r1, r4, #0 + lsl r2, r2, #0xc + bl ov12_0223283C + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #6 + blt _02232972 + ldr r0, [r6, #0xc] + add r0, r0, #1 + str r0, [r6, #0xc] + b _022329D8 +_02232990: + add r4, r6, #0 + mov r7, #0 + add r4, #0x60 + add r5, r6, #0 +_02232998: + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl ov12_02232888 + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #6 + blt _02232998 + cmp r0, #1 + bne _022329D8 + ldr r0, [r6, #0xc] + add r0, r0, #1 + str r0, [r6, #0xc] + b _022329D8 +_022329B6: + mov r5, #0 + add r4, r6, #0 +_022329BA: + ldr r0, [r4, #0x48] + bl sub_0200D0F4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #6 + blt _022329BA + ldr r0, [r6, #0] + add r1, r7, #0 + bl ov12_02220220 + add r0, r6, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_022329D8: + ldr r0, [r6, #8] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022328B8 + + thumb_func_start ov12_022329E0 +ov12_022329E0: ; 0x022329E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + str r1, [sp] + mov r1, #0x90 + add r4, r0, #0 + str r2, [sp, #4] + str r3, [sp, #8] + bl ov12_02235E50 + ldr r1, [sp] + str r4, [r0, #0] + str r1, [r0, #4] + ldr r1, [sp, #4] + str r0, [sp, #0x14] + str r1, [r0, #8] + ldr r0, [r0, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + bl ov12_022232FC + ldr r1, [sp, #0x14] + str r0, [r1, #0x18] + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + ldr r0, [sp, #0x14] + mov r1, #1 + ldr r0, [r0, #0x18] + bl sub_020080C0 + ldr r1, [sp, #0x14] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add r1, #0x44 + str r0, [sp, #0xc] + strh r0, [r1] + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + bl ov12_02223354 + ldr r1, [sp, #0x14] + add r1, #0x46 + strh r0, [r1] + ldr r1, [sp, #0x14] + add r0, sp, #0x1c + ldr r1, [r1, #0] + bl ov12_0222329C + ldr r5, [sp, #0x14] + mov r4, #0 +_02232A58: + cmp r4, #0 + bne _02232A60 + ldr r0, [sp, #8] + b _02232A6A +_02232A60: + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, sp, #0x1c + bl sub_0200CE6C +_02232A6A: + str r0, [r5, #0x48] + ldr r0, [r5, #0x48] + mov r1, #0 + bl sub_0200D3F4 + lsr r0, r4, #0x1f + add r0, r4, r0 + asr r1, r0, #1 + ldr r0, _02232B30 ; =0x00001555 + mov r2, #3 + mul r0, r1 + asr r0, r0, #4 + lsl r0, r0, #2 + ldr r1, _02232B34 ; =0x020F983C + str r0, [sp, #0x18] + add r1, r1, r0 + mov r0, #2 + ldrsh r0, [r1, r0] + lsl r2, r2, #0x10 + mov r3, #0 + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r2, r0, r2 + ldr r0, _02232B38 ; =0x00000000 + adc r1, r0 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + lsl r0, r1, #4 + asr r6, r0, #0x10 + mov r2, #3 + ldr r1, _02232B34 ; =0x020F983C + ldr r0, [sp, #0x18] + lsl r2, r2, #0x10 + ldrsh r0, [r1, r0] + mov r3, #0 + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _02232B38 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + lsl r0, r0, #4 + asr r0, r0, #0x10 + str r0, [sp, #0x10] + lsr r2, r4, #0x1f + lsl r1, r4, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + bne _02232AF2 + add r0, r7, r6 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r5, #0x48] + mov r1, #1 + bl sub_0200D7D4 + b _02232AF8 +_02232AF2: + sub r0, r7, r6 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 +_02232AF8: + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x10] + sub r0, r1, r0 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + ldr r0, [r5, #0x48] + add r1, r6, #0 + bl sub_0200D4C4 + cmp r4, #2 + bge _02232B12 + mov r0, #8 + b _02232B14 +_02232B12: + mov r0, #0 +_02232B14: + add r4, r4, #1 + str r0, [r5, #0x78] + add r5, r5, #4 + cmp r4, #6 + blt _02232A58 + ldr r0, [sp, #0x14] + ldr r1, _02232B3C ; =ov12_022328B8 + ldr r0, [r0, #0] + ldr r2, [sp, #0x14] + bl ov12_022201E8 + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + nop +_02232B30: .word 0x00001555 +_02232B34: .word 0x020F983C +_02232B38: .word 0x00000000 +_02232B3C: .word ov12_022328B8 + thumb_func_end ov12_022329E0 + + thumb_func_start ov12_02232B40 +ov12_02232B40: ; 0x02232B40 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #5 + bhi _02232B80 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02232B5A: ; jump table + .short _02232B66 - _02232B5A - 2 ; case 0 + .short _02232B76 - _02232B5A - 2 ; case 1 + .short _02232BD6 - _02232B5A - 2 ; case 2 + .short _02232C32 - _02232B5A - 2 ; case 3 + .short _02232C62 - _02232B5A - 2 ; case 4 + .short _02232C86 - _02232B5A - 2 ; case 5 +_02232B66: + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_0200D390 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02232C9E +_02232B76: + ldr r0, [r4, #0x5c] + bl sub_0200D3B8 + cmp r0, #0 + beq _02232B82 +_02232B80: + b _02232C9E +_02232B82: + ldr r0, [r4, #0x5c] + mov r1, #0 + bl sub_0200D390 + ldr r0, [r4, #0xc] + mov r1, #0xa + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + add r0, #0x14 + add r2, r1, #0 + mov r3, #0 + bl ov12_02225E68 + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + add r5, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + add r3, r0, #0 + mov r0, #0x8a + ldrsh r0, [r4, r0] + lsl r1, r5, #0x10 + lsl r3, r3, #0x10 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r2, #0x88 + add r0, r4, #0 + ldrsh r2, [r4, r2] + add r0, #0x38 + asr r1, r1, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + b _02232C9E +_02232BD6: + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x38 + bl ov12_02225C74 + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x14 + bl ov12_022260C8 + cmp r0, #0 + bne _02232C9E + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #0x10] + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0x10] + add r2, #0xf3 + bl sub_02007DEC + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_0200D364 + mov r1, #1 + ldr r0, [r4, #0x5c] + lsl r1, r1, #0xc + bl sub_0200D3A4 + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_0200D390 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02232C9E +_02232C32: + ldr r0, [r4, #0x5c] + bl sub_0200D3B8 + cmp r0, #0 + bne _02232C9E + ldr r0, [r4, #0x5c] + mov r1, #0 + bl sub_0200D390 + ldr r0, [r4, #0xc] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #0xc] + str r1, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r3, #0x8a + add r0, r4, #0 + ldrsh r3, [r4, r3] + add r0, #0x60 + add r2, r1, #0 + bl ov12_02225BC8 + b _02232C9E +_02232C62: + add r0, r4, #0 + add r0, #0x60 + bl ov12_02225C14 + cmp r0, #0 + beq _02232C7E + mov r1, #0x88 + mov r2, #0x62 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x5c] + bl sub_0200D4C4 + b _02232C9E +_02232C7E: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02232C9E +_02232C86: + ldr r0, [r4, #0x5c] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, pc} +_02232C9E: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02232B40 + + thumb_func_start ov12_02232CA8 +ov12_02232CA8: ; 0x02232CA8 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x8c + add r5, r0, #0 + str r2, [sp] + add r6, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + ldr r0, [sp] + str r7, [r4, #4] + str r0, [r4, #8] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #6 + mov r2, #0 + str r0, [r4, #0x10] + bl sub_02007DEC + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0 + bl ov12_022258E0 + add r1, r4, #0 + add r1, #0x88 + strh r0, [r1] + add r0, r5, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #1 + bl ov12_022258E0 + add r1, r4, #0 + add r1, #0x8a + strh r0, [r1] + str r6, [r4, #0x5c] + add r0, r6, #0 + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_0200D460 + mov r1, #0x88 + mov r2, #0x8a + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x5c] + bl sub_0200D4C4 + ldr r0, [r4, #0] + ldr r1, _02232D34 ; =ov12_02232B40 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02232D34: .word ov12_02232B40 + thumb_func_end ov12_02232CA8 + + thumb_func_start ov12_02232D38 +ov12_02232D38: ; 0x02232D38 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + add r0, r1, #0 + bl ov12_02225950 + mov r1, #1 + add r2, r1, #0 + lsl r2, r0 + mov r0, #0 + lsl r2, r2, #0x10 + add r4, #0xc4 + str r0, [sp] + ldr r0, [r4, #0] + mov r1, #2 + lsr r2, r2, #0x10 + mov r3, #8 + bl sub_02003A2C + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02232D38 + + thumb_func_start ov12_02232D64 +ov12_02232D64: ; 0x02232D64 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r1, #0xa + mov r0, #0x14 + str r0, [sp] + str r1, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x28 + add r2, r1, #0 + add r3, r1, #0 + bl ov12_02225EF0 + mov r0, #4 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xa + add r0, #0x4c + add r2, r1, #0 + mov r3, #1 + bl ov12_02225E68 + add r0, r4, #0 + mov r1, #0 + add r0, #0x94 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #6 + add r0, #0x98 + str r1, [r0, #0] + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + add r1, r0, #0 + lsl r2, r1, #1 + ldr r1, _02232E00 ; =0x0223A1CC + ldr r0, [r4, #0x20] + ldrh r1, [r1, r2] + bl sub_0200D3F4 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_0200D3F4 + add r0, r4, #0 + add r0, #0x28 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov12_02225FA4 + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _02232DE8 + ldr r1, [sp, #0x10] + mov r0, #0 + bl sub_020E1A9C + str r0, [sp, #0x10] +_02232DE8: + ldr r0, [r4, #0x18] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl sub_0200D6E8 + ldr r1, [r4, #0x18] + add r0, r4, #0 + bl ov12_02232D38 + add sp, #0x14 + pop {r3, r4, pc} + nop +_02232E00: .word 0x0223A1CC + thumb_func_end ov12_02232D64 + + thumb_func_start ov12_02232E04 +ov12_02232E04: ; 0x02232E04 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + add r0, #0x94 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + beq _02232E20 + cmp r0, #1 + beq _02232EA8 + cmp r0, #2 + bne _02232E1E + b _02232F28 +_02232E1E: + b _02232F2A +_02232E20: + add r0, r5, #0 + add r0, #0x28 + bl ov12_02225F6C + add r0, r5, #0 + add r0, #0x28 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov12_02225FA4 + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _02232E48 + ldr r1, [sp, #0x10] + add r0, r4, #0 + bl sub_020E1A9C + str r0, [sp, #0x10] +_02232E48: + ldr r0, [r5, #0x18] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl sub_0200D6E8 + mov r0, #0 + str r0, [sp] + ldr r1, [r5, #0x14] + ldr r2, [r5, #0x10] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #0x18] + ldr r3, [r5, #0x3c] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_0222605C + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + bge _02232F2A + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + mov r3, #0x14 + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x94 + str r1, [r0, #0] + str r3, [sp] + mov r1, #0xa + str r1, [sp, #4] + mov r0, #4 + add r5, #0x28 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #1 + bl ov12_02225EF0 + b _02232F2A +_02232EA8: + add r0, r5, #0 + add r0, #0x28 + bl ov12_02225F6C + add r0, r5, #0 + add r0, #0x4c + bl ov12_02225EB8 + cmp r0, #0 + beq _02232F06 + mov r0, #0x4c + ldrsh r0, [r5, r0] + add r1, sp, #0x10 + add r2, sp, #0xc + strh r0, [r5, #0x28] + add r0, r5, #0 + add r0, #0x28 + bl ov12_02225FA4 + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _02232EE2 + ldr r1, [sp, #0x10] + add r0, r4, #0 + bl sub_020E1A9C + str r0, [sp, #0x10] +_02232EE2: + ldr r0, [r5, #0x18] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl sub_0200D6E8 + mov r0, #0 + str r0, [sp] + ldr r1, [r5, #0x14] + ldr r2, [r5, #0x10] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #0x18] + ldr r3, [r5, #0x3c] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_0222605C + b _02232F2A +_02232F06: + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x94 + str r1, [r0, #0] + ldr r0, [r5, #0x20] + add r1, r4, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x18] + add r1, r4, #0 + bl sub_0200D3F4 + mov r4, #1 + b _02232F2A +_02232F28: + mov r4, #1 +_02232F2A: + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov12_02232E04 + + thumb_func_start ov12_02232F30 +ov12_02232F30: ; 0x02232F30 + push {r4, lr} + sub sp, #0x18 + add r4, r0, #0 + add r1, sp, #0xc + ldr r0, [r4, #0x1c] + add r1, #2 + add r2, sp, #0xc + bl sub_0200D550 + add r1, sp, #0xc + mov r0, #0 + ldrsh r3, [r1, r0] + mov r0, #2 + ldrsh r1, [r1, r0] + mov r0, #8 + str r3, [sp] + sub r3, #0x40 + str r0, [sp, #4] + add r0, r4, #0 + lsl r3, r3, #0x10 + add r0, #0x70 + add r2, r1, #0 + asr r3, r3, #0x10 + bl ov12_02225BC8 + mov r2, #0xa + str r2, [sp] + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x28 + mov r1, #2 + mov r3, #0x14 + bl ov12_02225EF0 + add r0, r4, #0 + add r0, #0x28 + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov12_02225FA4 + add r0, r4, #0 + add r0, #0xcc + ldr r0, [r0, #0] + cmp r0, #1 + bne _02232F98 + ldr r1, [sp, #0x14] + mov r0, #0 + bl sub_020E1A9C + str r0, [sp, #0x14] +_02232F98: + ldr r0, [r4, #0x1c] + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + bl sub_0200D6E8 + add r0, r4, #0 + ldr r1, [r4, #0x1c] + add r0, #0x70 + bl ov12_02225C50 + add r0, r4, #0 + mov r1, #0 + add r0, #0x94 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #6 + add r0, #0x98 + str r1, [r0, #0] + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + add r1, r0, #0 + lsl r2, r1, #1 + ldr r1, _02232FEC ; =0x0223A1CC + ldr r0, [r4, #0x24] + ldrh r1, [r1, r2] + bl sub_0200D3F4 + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_0200D3F4 + ldr r1, [r4, #0x1c] + add r0, r4, #0 + bl ov12_02232D38 + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 +_02232FEC: .word 0x0223A1CC + thumb_func_end ov12_02232F30 + + thumb_func_start ov12_02232FF0 +ov12_02232FF0: ; 0x02232FF0 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r0, #0x94 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + beq _0223300A + cmp r0, #1 + beq _0223303A + cmp r0, #2 + beq _0223308C + b _0223308E +_0223300A: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x1c] + add r0, #0x70 + bl ov12_02225C50 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + bge _0223308E + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r5, #0x94 + add r0, r0, #1 + str r0, [r5, #0] + b _0223308E +_0223303A: + add r0, r5, #0 + ldr r1, [r5, #0x1c] + add r0, #0x70 + bl ov12_02225C50 + add r0, r5, #0 + add r0, #0x28 + bl ov12_02225F6C + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x28 + add r1, sp, #4 + add r2, sp, #0 + bl ov12_02225FA4 + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + cmp r0, #1 + bne _0223306E + ldr r1, [sp, #4] + add r0, r4, #0 + bl sub_020E1A9C + str r0, [sp, #4] +_0223306E: + ldr r0, [r5, #0x1c] + ldr r1, [sp, #4] + ldr r2, [sp] + bl sub_0200D6E8 + cmp r6, #0 + bne _0223308E + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r5, #0x94 + add r0, r0, #1 + str r0, [r5, #0] + mov r4, #1 + b _0223308E +_0223308C: + mov r4, #1 +_0223308E: + add r0, r4, #0 + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02232FF0 + + thumb_func_start ov12_02233094 +ov12_02233094: ; 0x02233094 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r0, #6 + bhi _0223316E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022330AE: ; jump table + .short _022330BC - _022330AE - 2 ; case 0 + .short _022330E0 - _022330AE - 2 ; case 1 + .short _022330FA - _022330AE - 2 ; case 2 + .short _02233110 - _022330AE - 2 ; case 3 + .short _02233126 - _022330AE - 2 ; case 4 + .short _0223314C - _022330AE - 2 ; case 5 + .short _02233160 - _022330AE - 2 ; case 6 +_022330BC: + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x10 + bl ov12_02235780 + mov r2, #8 + str r2, [sp] + add r0, r4, #0 + str r2, [sp, #4] + add r0, #0x9c + mov r1, #0 + mov r3, #0x10 + bl ov12_02226424 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223316E +_022330E0: + add r0, r4, #0 + add r0, #0x9c + bl ov12_02226454 + cmp r0, #0 + beq _0223316E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + bl ov12_02232D64 + b _0223316E +_022330FA: + add r0, r4, #0 + bl ov12_02232E04 + cmp r0, #0 + beq _0223316E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #2 + str r0, [r4, #0xc] + b _0223316E +_02233110: + ldr r0, [r4, #0xc] + sub r0, r0, #1 + str r0, [r4, #0xc] + bpl _0223316E + add r0, r4, #0 + bl ov12_02232F30 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223316E +_02233126: + add r0, r4, #0 + bl ov12_02232FF0 + cmp r0, #0 + beq _0223316E + ldr r0, [r4, #8] + mov r1, #8 + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0x10 + str r0, [sp] + add r0, r4, #0 + add r0, #0x9c + mov r2, #0 + add r3, r1, #0 + str r1, [sp, #4] + bl ov12_02226424 + b _0223316E +_0223314C: + add r0, r4, #0 + add r0, #0x9c + bl ov12_02226454 + cmp r0, #0 + beq _0223316E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223316E +_02233160: + ldr r0, [r4, #0] + add r1, r2, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 +_0223316E: + ldr r0, [r4, #4] + bl sub_0200C7EC + add sp, #8 + pop {r4, pc} + thumb_func_end ov12_02233094 + + thumb_func_start ov12_02233178 +ov12_02233178: ; 0x02233178 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0xd0 + add r6, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r6, [r4, #0] + add r0, r6, #0 + bl ov12_022202EC + str r0, [r4, #4] + ldr r0, [r4, #0] + bl ov12_0222332C + add r1, r4, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + add r7, r0, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + add r0, r7, #0 + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + add r0, r7, #0 + mov r1, #0x29 + bl sub_020080C0 + sub r0, r5, r0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [sp, #4] + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + ldr r0, [sp, #4] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [sp, #4] + mov r1, #0x29 + bl sub_020080C0 + sub r0, r6, r0 + lsl r0, r0, #0x10 + str r5, [r4, #0x14] + asr r6, r0, #0x10 + ldr r0, [r4, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x18] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x18] + ldr r1, [sp] + add r2, r5, #0 + bl sub_0200D4C4 + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x18] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x1c] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x1c] + add r1, r7, #0 + add r2, r6, #0 + bl sub_0200D4C4 + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x1c] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x1c] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x1c] + mov r1, #0 + mov r2, #0x28 + bl sub_0200D7E0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_022234A8 + add r1, r4, #0 + add r1, #0xc8 + str r0, [r1, #0] + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022234A8 + add r1, r4, #0 + add r1, #0xcc + str r0, [r1, #0] + ldr r0, [r4, #0] + mov r1, #2 + bl ov12_022202C0 + str r0, [r4, #0x20] + ldr r0, [r4, #0] + mov r1, #3 + bl ov12_022202C0 + str r0, [r4, #0x24] + ldr r0, [r4, #0x20] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x24] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0] + ldr r1, _022332E4 ; =ov12_02233094 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022332E4: .word ov12_02233094 + thumb_func_end ov12_02233178 + + thumb_func_start ov12_022332E8 +ov12_022332E8: ; 0x022332E8 + push {r4, lr} + sub sp, #0x20 + mov r2, #0xa + add r4, r0, #0 + add r0, #0xf8 + mov r1, #0x19 + add r3, r2, #0 + str r2, [sp] + bl ov12_02225E68 + mov r0, #0x3a + ldrsh r0, [r4, r0] + add r1, r4, #0 + mov r3, #0x38 + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + ldr r0, [r4, #0x44] + ldr r2, _02233334 ; =ov12_02225EB8 + str r0, [sp, #0x10] + ldr r0, [r4, #0x40] + add r1, #0xf8 + str r0, [sp, #0x14] + ldr r0, [r4, #0x3c] + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp, #0x1c] + add r0, r4, #0 + ldrsh r3, [r4, r3] + add r0, #0x48 + bl ov12_022261C4 + add sp, #0x20 + pop {r4, pc} + ; .align 2, 0 +_02233334: .word ov12_02225EB8 + thumb_func_end ov12_022332E8 + + thumb_func_start ov12_02233338 +ov12_02233338: ; 0x02233338 + push {r4, lr} + sub sp, #0x20 + add r4, r0, #0 + mov r0, #6 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xa + add r0, #0xf8 + add r2, r1, #0 + mov r3, #0x19 + bl ov12_02225E68 + mov r0, #0x3a + ldrsh r0, [r4, r0] + add r1, r4, #0 + mov r3, #0x38 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + ldr r0, [r4, #0x3c] + ldr r2, _02233390 ; =ov12_02225EB8 + str r0, [sp, #0x10] + ldr r0, [r4, #0x40] + add r1, #0xf8 + str r0, [sp, #0x14] + ldr r0, [r4, #0x44] + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp, #0x1c] + add r0, r4, #0 + ldrsh r3, [r4, r3] + add r0, #0x48 + bl ov12_022261C4 + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_0200D3F4 + add sp, #0x20 + pop {r4, pc} + ; .align 2, 0 +_02233390: .word ov12_02225EB8 + thumb_func_end ov12_02233338 + + thumb_func_start ov12_02233394 +ov12_02233394: ; 0x02233394 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #4 + bhi _0223344C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022333AC: ; jump table + .short _022333B6 - _022333AC - 2 ; case 0 + .short _022333C4 - _022333AC - 2 ; case 1 + .short _022333F2 - _022333AC - 2 ; case 2 + .short _02233416 - _022333AC - 2 ; case 3 + .short _0223342A - _022333AC - 2 ; case 4 +_022333B6: + add r0, r4, #0 + bl ov12_022332E8 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223344C +_022333C4: + add r0, r4, #0 + add r0, #0x48 + bl ov12_02226274 + cmp r0, #0 + bne _0223344C + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0xc] + mov r1, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #6 + str r0, [sp] + add r0, r4, #0 + add r0, #0x14 + mov r2, #0 + mov r3, #1 + bl ov12_02226108 + b _0223344C +_022333F2: + mov r1, #0x38 + mov r2, #0x3a + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x10] + add r0, #0x14 + bl ov12_0222619C + cmp r0, #0 + bne _0223344C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + add r0, r4, #0 + bl ov12_02233338 + b _0223344C +_02233416: + add r0, r4, #0 + add r0, #0x48 + bl ov12_02226274 + cmp r0, #0 + bne _0223344C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223344C +_0223342A: + mov r6, #0 + add r5, r4, #0 +_0223342E: + ldr r0, [r5, #0x3c] + bl sub_0200D0F4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _0223342E + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_02220220 + pop {r3, r4, r5, r6, r7, pc} +_0223344C: + ldr r0, [r4, #8] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02233394 + + thumb_func_start ov12_02233454 +ov12_02233454: ; 0x02233454 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r6, r1, #0 + mov r1, #0x47 + lsl r1, r1, #2 + add r5, r0, #0 + str r2, [sp] + add r7, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + ldr r0, [sp] + str r6, [r4, #4] + str r0, [r4, #8] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x38] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x3a] + ldr r0, [r4, #0x10] + mov r1, #0x29 + bl sub_020080C0 + mov r1, #0x3a + ldrsh r1, [r4, r1] + sub r0, r1, r0 + strh r0, [r4, #0x3a] + add r0, sp, #4 + add r1, r5, #0 + bl ov12_0222329C + mov r6, #0 + add r5, r4, #0 +_022334B0: + cmp r6, #0 + bne _022334C0 + add r0, r7, #0 + mov r1, #1 + str r7, [r5, #0x3c] + bl sub_0200D364 + b _022334D2 +_022334C0: + ldr r0, [r4, #4] + ldr r1, [r4, #8] + add r2, sp, #4 + bl sub_0200CE6C + mov r1, #1 + str r0, [r5, #0x3c] + bl sub_0200D810 +_022334D2: + ldr r0, [r5, #0x3c] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0x3c] + mov r1, #1 + bl sub_0200D460 + mov r1, #0x38 + mov r2, #0x3a + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x3c] + bl sub_0200D4C4 + ldr r0, [r5, #0x3c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x3c] + mov r1, #2 + bl sub_0200D6A4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _022334B0 + ldr r0, [r4, #0] + ldr r1, _02233518 ; =ov12_02233394 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02233518: .word ov12_02233394 + thumb_func_end ov12_02233454 + + thumb_func_start ov12_0223351C +ov12_0223351C: ; 0x0223351C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r7, #0 + add r6, r5, #0 + str r1, [sp, #0x10] + add r6, #0x30 + add r4, r7, #0 +_0223352C: + mov r0, #0 + str r0, [sp] + mov r0, #0x32 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0 + str r0, [sp, #0xc] + ldr r2, _0223356C ; =0x00007FFF + add r0, r6, #0 + add r3, r1, #0 + bl ov12_02225A5C + ldr r0, [r5, #0x38] + add r7, r7, #1 + add r0, r0, r4 + str r0, [r5, #0x38] + ldr r1, [r5, #0x48] + ldr r0, [sp, #0x10] + add r6, #0x24 + mul r0, r1 + str r0, [r5, #0x48] + ldr r0, _02233570 ; =0x00002AAA + add r5, #0x24 + add r4, r4, r0 + cmp r7, #6 + blt _0223352C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223356C: .word 0x00007FFF +_02233570: .word 0x00002AAA + thumb_func_end ov12_0223351C + + thumb_func_start ov12_02233574 +ov12_02233574: ; 0x02233574 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + mov r0, #0 + str r0, [sp, #4] + add r0, r6, #0 + str r0, [sp] + add r0, #0x30 + str r0, [sp] + add r5, r6, #0 + add r4, r6, #0 +_0223358A: + ldr r0, [sp] + bl ov12_02225AE0 + ldr r1, [r5, #0x38] + mov r2, #0xa + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02233630 ; =0x020F983C + ldr r3, [r6, #0x14] + ldrsh r0, [r0, r1] + lsl r2, r2, #0xc + mul r2, r3 + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r3, r1, #0 + mov r1, #0x13 + lsl r1, r1, #4 + mov r2, #0x30 + add r7, r0, #0 + ldrsh r1, [r6, r1] + ldrsh r2, [r5, r2] + ldr r0, [r4, #0x18] + add r1, r1, r2 + ldr r2, _02233634 ; =0x00000132 + lsl r1, r1, #0x10 + ldrsh r2, [r6, r2] + asr r1, r1, #0x10 + mov ip, r2 + mov r2, #2 + lsl r2, r2, #0xa + add r7, r7, r2 + ldr r2, _02233638 ; =0x00000000 + adc r3, r2 + lsl r2, r3, #0x14 + lsr r3, r7, #0xc + orr r3, r2 + lsl r2, r3, #4 + asr r2, r2, #0x10 + mov r3, ip + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r1, [r5, #0x38] + ldr r0, _0223363C ; =0x00003FFF + cmp r1, r0 + blt _02233606 + ldr r0, _02233640 ; =0x0000BF49 + cmp r1, r0 + bgt _02233606 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_0200D460 + b _02233616 +_02233606: + ldr r0, [r6, #0] + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r4, #0x18] + add r1, r1, #1 + bl sub_0200D460 +_02233616: + ldr r0, [sp] + add r5, #0x24 + add r0, #0x24 + str r0, [sp] + ldr r0, [sp, #4] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #6 + blt _0223358A + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02233630: .word 0x020F983C +_02233634: .word 0x00000132 +_02233638: .word 0x00000000 +_0223363C: .word 0x00003FFF +_02233640: .word 0x0000BF49 + thumb_func_end ov12_02233574 + + thumb_func_start ov12_02233644 +ov12_02233644: ; 0x02233644 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #4 + bhi _0223372A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223365E: ; jump table + .short _02233668 - _0223365E - 2 ; case 0 + .short _0223369E - _0223365E - 2 ; case 1 + .short _022336BE - _0223365E - 2 ; case 2 + .short _022336EA - _0223365E - 2 ; case 3 + .short _02233706 - _0223365E - 2 ; case 4 +_02233668: + ldr r0, [r4, #0] + mov r1, #1 + mov r2, #0xf + bl ov12_02235780 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, #0xfe + add r0, r4, r0 + mov r1, #1 + mov r2, #0x10 + mov r3, #0xf + bl ov12_02226424 + ldr r1, [r4, #0x14] + add r0, r4, #0 + bl ov12_0223351C + add r0, r4, #0 + bl ov12_02233574 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223372A +_0223369E: + add r0, r4, #0 + bl ov12_02233574 + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov12_02226454 + cmp r0, #0 + beq _0223372A + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0x1c + str r0, [r4, #0x10] + b _0223372A +_022336BE: + add r0, r4, #0 + bl ov12_02233574 + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + bpl _0223372A + ldr r0, [r4, #0xc] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0xf + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, #0xfe + add r0, r4, r0 + mov r2, #1 + mov r3, #0 + bl ov12_02226424 + b _0223372A +_022336EA: + add r0, r4, #0 + bl ov12_02233574 + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov12_02226454 + cmp r0, #0 + beq _0223372A + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223372A +_02233706: + mov r6, #0 + add r5, r4, #0 +_0223370A: + ldr r0, [r5, #0x18] + bl sub_0200D0F4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #6 + blt _0223370A + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_02220220 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0223372A: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02233644 + + thumb_func_start ov12_02233734 +ov12_02233734: ; 0x02233734 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r1, #0 + mov r1, #0x4d + lsl r1, r1, #2 + add r4, r0, #0 + str r2, [sp] + add r7, r3, #0 + bl ov12_02235E50 + add r6, r0, #0 + str r4, [r6, #0] + ldr r0, [sp] + str r5, [r6, #4] + str r0, [r6, #8] + add r0, r4, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + mov r1, #0 + add r5, r0, #0 + bl sub_020080C0 + mov r1, #0x13 + lsl r1, r1, #4 + strh r0, [r6, r1] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + ldr r1, _022337D8 ; =0x00000132 + strh r0, [r6, r1] + add r0, sp, #4 + add r1, r4, #0 + bl ov12_0222329C + mov r4, #0 + add r5, r6, #0 +_02233786: + cmp r4, #0 + bne _0223378E + str r7, [r5, #0x18] + b _0223379A +_0223378E: + ldr r0, [r6, #4] + ldr r1, [r6, #8] + add r2, sp, #4 + bl sub_0200CE6C + str r0, [r5, #0x18] +_0223379A: + ldr r0, [r5, #0x18] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D390 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02233786 + ldr r0, [r6, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_02225964 + str r0, [r6, #0x14] + ldr r0, [r6, #0] + ldr r1, _022337DC ; =ov12_02233644 + add r2, r6, #0 + bl ov12_022201E8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022337D8: .word 0x00000132 +_022337DC: .word ov12_02233644 + thumb_func_end ov12_02233734 + + thumb_func_start ov12_022337E0 +ov12_022337E0: ; 0x022337E0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r1, #0 + add r1, sp, #8 + add r5, r2, #0 + add r1, #2 + add r2, sp, #8 + add r6, r0, #0 + add r4, r3, #0 + bl sub_0200D550 + add r0, sp, #8 + mov r1, #0 + ldrsh r3, [r0, r1] + mov r1, #2 + ldrsh r2, [r0, r1] + lsl r0, r4, #7 + neg r0, r0 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + lsl r1, r2, #0x10 + lsl r4, r5, #8 + add r2, r2, r4 + str r0, [sp] + mov r0, #0x3b + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + add r0, r6, #0 + mov r1, #1 + bl sub_0200D3F4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_022337E0 + + thumb_func_start ov12_02233834 +ov12_02233834: ; 0x02233834 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl ov12_02225C50 + cmp r0, #0 + beq _022338EE + add r1, sp, #8 + add r0, r4, #0 + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + add r1, sp, #8 + mov r0, #2 + ldrsh r0, [r1, r0] + mov r1, #0x5b + lsl r1, r1, #2 + str r0, [sp] + ldr r0, [sp] + mov r2, #0xe + mul r1, r0 + lsl r0, r1, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _022338F4 ; =0x020F983C + lsl r2, r2, #0xc + ldrsh r0, [r0, r1] + mov r3, #0 + asr r7, r0, #0x1f + add r1, r7, #0 + str r0, [sp, #4] + bl sub_020E1F1C + add r3, r0, #0 + add r5, r1, #0 + add r6, sp, #8 + mov r2, #0 + ldrsh r2, [r6, r2] + mov r6, #2 + lsl r6, r6, #0xa + add r0, r4, #0 + add r6, r3, r6 + ldr r3, _022338F8 ; =0x00000000 + ldr r1, [sp] + adc r5, r3 + lsl r3, r5, #0x14 + lsr r5, r6, #0xc + orr r5, r3 + lsl r3, r5, #4 + asr r3, r3, #0x10 + add r2, r2, r3 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r2, #0xae + ldr r0, [sp, #4] + add r1, r7, #0 + lsl r2, r2, #2 + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + neg r0, r1 + bl sub_020E17B4 + ldr r1, _022338FC ; =0x45800000 + bl sub_020E1304 + add r1, r0, #0 + mov r0, #0xfe + lsl r0, r0, #0x16 + bl sub_020E0B00 + add r1, r0, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_0200D6E8 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022338EE: + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022338F4: .word 0x020F983C +_022338F8: .word 0x00000000 +_022338FC: .word 0x45800000 + thumb_func_end ov12_02233834 + + thumb_func_start ov12_02233900 +ov12_02233900: ; 0x02233900 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x9d + add r7, r0, #0 + lsl r1, r1, #2 + ldr r0, [r7, r1] + cmp r0, #0xf + bge _02233948 + sub r0, r1, #4 + ldr r0, [r7, r0] + add r2, r0, #1 + sub r0, r1, #4 + str r2, [r7, r0] + ldr r0, [r7, r0] + cmp r0, #6 + ble _02233948 + mov r2, #0 + sub r0, r1, #4 + str r2, [r7, r0] + ldr r1, [r7, r1] + add r3, r7, #0 + lsl r0, r1, #2 + mov r2, #0x24 + add r0, r7, r0 + add r3, #0x54 + mul r2, r1 + add r1, r3, r2 + ldr r0, [r0, #0x18] + ldr r2, [r7, #0x10] + ldr r3, [r7, #0x14] + bl ov12_022337E0 + mov r0, #0x9d + lsl r0, r0, #2 + ldr r1, [r7, r0] + add r1, r1, #1 + str r1, [r7, r0] +_02233948: + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r4, #0 + cmp r0, #0 + ble _02233974 + add r6, r7, #0 + add r6, #0x54 + add r5, r7, #0 +_0223395A: + ldr r0, [r5, #0x18] + add r1, r6, #0 + bl ov12_02233834 + str r0, [sp] + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r7, r0] + add r4, r4, #1 + add r6, #0x24 + add r5, r5, #4 + cmp r4, r0 + blt _0223395A +_02233974: + cmp r0, #0xf + blt _02233982 + ldr r0, [sp] + cmp r0, #1 + bne _02233982 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02233982: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02233900 + + thumb_func_start ov12_02233988 +ov12_02233988: ; 0x02233988 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + add r0, r6, #0 + bl ov12_02233900 + cmp r0, #0 + beq _022339BA + mov r4, #0 + add r5, r6, #0 +_0223399C: + ldr r0, [r5, #0x18] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _0223399C + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r6, #0] + add r1, r7, #0 + bl ov12_02220220 + pop {r3, r4, r5, r6, r7, pc} +_022339BA: + ldr r0, [r6, #8] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02233988 + + thumb_func_start ov12_022339C4 +ov12_022339C4: ; 0x022339C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r5, r1, #0 + mov r1, #0x9e + lsl r1, r1, #2 + add r4, r0, #0 + str r2, [sp] + add r7, r3, #0 + bl ov12_02235E50 + add r6, r0, #0 + str r4, [r6, #0] + ldr r0, [sp] + str r5, [r6, #4] + str r0, [r6, #8] + add r0, r4, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + mov r1, #0 + add r5, r0, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + add r0, sp, #0xc + add r1, r4, #0 + bl ov12_0222329C + mov r4, #0 + add r5, r6, #0 +_02233A18: + cmp r4, #0 + bne _02233A20 + str r7, [r5, #0x18] + b _02233A2C +_02233A20: + ldr r0, [r6, #4] + ldr r1, [r6, #8] + add r2, sp, #0xc + bl sub_0200CE6C + str r0, [r5, #0x18] +_02233A2C: + ldr r0, [r5, #0x18] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r5, #0x18] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r5, #0x18] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x18] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + bl sub_0200D4C4 + add r0, r4, #0 + mov r1, #3 + bl sub_020E1F6C + ldr r0, [r5, #0x18] + bl sub_0200D364 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _02233A18 + ldr r0, [r6, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_02225964 + str r0, [r6, #0x10] + ldr r0, [r6, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_0222598C + str r0, [r6, #0x14] + ldr r0, [r6, #0] + ldr r1, _02233A9C ; =ov12_02233988 + add r2, r6, #0 + bl ov12_022201E8 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_02233A9C: .word ov12_02233988 + thumb_func_end ov12_022339C4 + + thumb_func_start ov12_02233AA0 +ov12_02233AA0: ; 0x02233AA0 + ldr r1, [r0, #0x2c] + cmp r1, #0 + beq _02233AB0 + cmp r1, #1 + beq _02233AC4 + cmp r1, #2 + beq _02233AD8 + bx lr +_02233AB0: + ldr r1, _02233AEC ; =0x00007FFF + str r1, [r0, #0x18] + mov r1, #5 + str r1, [r0, #0x24] + mov r1, #1 + lsl r1, r1, #0x10 + str r1, [r0, #0x1c] + mov r1, #0x10 + str r1, [r0, #0x28] + bx lr +_02233AC4: + ldr r1, _02233AEC ; =0x00007FFF + str r1, [r0, #0x18] + mov r1, #4 + mvn r1, r1 + str r1, [r0, #0x24] + ldr r1, _02233AF0 ; =0xFFFF0000 + str r1, [r0, #0x1c] + mov r1, #0x10 + str r1, [r0, #0x28] + bx lr +_02233AD8: + ldr r1, _02233AEC ; =0x00007FFF + str r1, [r0, #0x18] + mov r1, #0xa + str r1, [r0, #0x24] + lsl r1, r1, #0xd + str r1, [r0, #0x1c] + mov r1, #0x10 + str r1, [r0, #0x28] + bx lr + nop +_02233AEC: .word 0x00007FFF +_02233AF0: .word 0xFFFF0000 + thumb_func_end ov12_02233AA0 + + thumb_func_start ov12_02233AF4 +ov12_02233AF4: ; 0x02233AF4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #4] + bl ov12_022265E4 + str r0, [sp, #8] + ldr r0, [r5, #0x10] + str r0, [sp] + str r0, [sp, #4] + sub r0, #8 + str r0, [sp, #4] + ldr r0, [sp] + add r0, #0x58 + str r0, [sp] + ldr r0, [sp, #4] + cmp r0, #0 + bge _02233B1C + mov r0, #0 + str r0, [sp, #4] +_02233B1C: + ldr r0, [sp] + cmp r0, #0xc0 + ble _02233B26 + mov r0, #0xc0 + str r0, [sp] +_02233B26: + mov r0, #0 + ldr r1, [r5, #0x20] + mvn r0, r0 + mul r0, r1 + ldr r4, [sp, #4] + str r0, [r5, #0x20] + ldr r0, [sp] + add r1, r4, #0 + cmp r1, r0 + bge _02233BC6 +_02233B3A: + mov r0, #2 + tst r0, r4 + ldr r1, [r5, #0x1c] + beq _02233B4A + ldr r0, [r5, #0x20] + lsl r0, r0, #0xc + add r2, r1, r0 + b _02233B50 +_02233B4A: + ldr r0, [r5, #0x20] + lsl r0, r0, #0xc + sub r2, r1, r0 +_02233B50: + ldr r1, [sp, #4] + ldr r0, [r5, #0x18] + sub r3, r4, r1 + ldr r1, _02233BCC ; =0x00000199 + mul r1, r3 + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02233BD0 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r2, r0, r2 + ldr r0, _02233BD4 ; =0x00000000 + adc r1, r0 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + lsl r0, r1, #4 + asr r7, r0, #0x10 + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x24] + sub r0, r4, r0 + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + add r0, r7, r0 + lsl r0, r0, #0x10 + ldr r1, [r5, #0x30] + asr r7, r0, #0x10 + lsl r0, r1, #0x10 + lsr r1, r1, #0x10 + lsl r1, r1, #0x10 + asr r0, r0, #0x10 + asr r1, r1, #0x10 + sub r6, r4, #1 + bpl _02233BAA + add r6, #0xc0 +_02233BAA: + add r0, r0, r7 + lsl r0, r0, #0x10 + lsl r1, r1, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + bl ov12_022266E8 + ldr r1, [sp, #8] + lsl r2, r6, #2 + str r0, [r1, r2] + ldr r0, [sp] + add r4, r4, #1 + cmp r4, r0 + blt _02233B3A +_02233BC6: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02233BCC: .word 0x00000199 +_02233BD0: .word 0x020F983C +_02233BD4: .word 0x00000000 + thumb_func_end ov12_02233AF4 + + thumb_func_start ov12_02233BD8 +ov12_02233BD8: ; 0x02233BD8 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02233BEE + cmp r0, #1 + beq _02233C02 + cmp r0, #2 + beq _02233C2C + pop {r4, r5, r6, pc} +_02233BEE: + add r0, r4, #0 + bl ov12_02233AA0 + add r0, r4, #0 + bl ov12_02233AF4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r4, r5, r6, pc} +_02233C02: + ldr r0, [r4, #0x28] + sub r0, r0, #1 + str r0, [r4, #0x28] + add r0, r4, #0 + bl ov12_02233AF4 + ldr r0, [r4, #0x28] + cmp r0, #0 + bge _02233CD0 + ldr r0, [r4, #0x2c] + add r0, r0, #1 + str r0, [r4, #0x2c] + cmp r0, #3 + bge _02233C24 + mov r0, #0 + str r0, [r4, #8] + pop {r4, r5, r6, pc} +_02233C24: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r4, r5, r6, pc} +_02233C2C: + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222337C + cmp r0, #0 + bne _02233C48 + ldr r0, [r4, #0xc] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC +_02233C48: + ldr r0, [r4, #4] + bl ov12_022265F8 + ldr r0, [r4, #4] + bl ov12_022265C0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_02223428 + add r1, r0, #0 + lsl r0, r5, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + lsl r1, r1, #0x18 + mov r0, #0 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_0221FDE4 + add r3, r0, #0 + lsl r0, r5, #0x18 + mov r1, #1 + lsr r0, r0, #0x18 + lsl r1, r1, #0xe + mov r2, #0 + bl sub_02019690 + ldr r0, [r4, #0] + bl ov12_02220278 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r1, r0, #0 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019EBC + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov12_02220220 +_02233CD0: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02233BD8 + + thumb_func_start ov12_02233CD4 +ov12_02233CD4: ; 0x02233CD4 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x34 + add r7, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r7, [r4, #0] + add r0, r7, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + mov r1, #0 + str r0, [r4, #0xc] + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0xc] + mov r1, #0x29 + bl sub_020080C0 + sub r0, r5, r0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222337C + cmp r0, #0 + bne _02233D32 + ldr r0, [r4, #0xc] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC +_02233D32: + sub r6, #0x28 + lsl r0, r6, #0x10 + str r5, [r4, #0x14] + sub r5, #0x28 + asr r0, r0, #0x10 + neg r0, r0 + neg r1, r5 + lsl r0, r0, #0x10 + lsl r1, r1, #0x10 + str r5, [r4, #0x10] + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + bl ov12_022266E8 + str r0, [r4, #0x30] + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233EC + bl ov12_022266F0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_0221FDE4 + add r2, r0, #0 + ldr r1, [r4, #0x30] + add r0, r5, #0 + bl ov12_02226544 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #0x20] + add r0, r7, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02235254 + sub r0, r0, #3 + cmp r0, #1 + bhi _02233DBA + ldr r0, [r4, #0] + mov r1, #1 + bl ov12_022233B0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + lsl r0, r5, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + ldr r0, [r4, #0] + bl ov12_0222339C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x18 + mov r0, #0 + lsr r1, r1, #0x18 + bl sub_02019060 +_02233DBA: + ldr r0, [r4, #0] + ldr r1, _02233DC8 ; =ov12_02233BD8 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02233DC8: .word ov12_02233BD8 + thumb_func_end ov12_02233CD4 + + thumb_func_start ov12_02233DCC +ov12_02233DCC: ; 0x02233DCC + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #5 + bls _02233DDC + b _02233F20 +_02233DDC: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02233DE8: ; jump table + .short _02233DF4 - _02233DE8 - 2 ; case 0 + .short _02233E3A - _02233DE8 - 2 ; case 1 + .short _02233E74 - _02233DE8 - 2 ; case 2 + .short _02233EAE - _02233DE8 - 2 ; case 3 + .short _02233EFA - _02233DE8 - 2 ; case 4 + .short _02233F12 - _02233DE8 - 2 ; case 5 +_02233DF4: + mov r2, #0 + str r2, [sp] + mov r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xc + mov r1, #0x7f + add r3, r2, #0 + bl ov12_02225BC8 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02233F24 ; =0xFFFF1FFF + and r1, r0 + lsr r0, r2, #0xd + orr r0, r1 + str r0, [r2, #0] + mov r1, #0 + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov12_02235838 + ldr r1, _02233F28 ; =0x04000040 + mov r0, #0xff + strh r0, [r1] + mov r0, #0xbf + strh r0, [r1, #4] + mov r0, #7 + str r0, [r4, #8] + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02233E3A: + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + bpl _02233F20 + ldr r0, [r4, #0] + bl ov12_0222332C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_02222354 + add r2, r0, #0 + mov r3, #0 + lsl r2, r2, #0x10 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _02233F2C ; =0x0000FFFF + mov r1, #1 + str r0, [sp, #8] + add r0, r5, #0 + lsr r2, r2, #0x10 + bl sub_02003178 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02233E74: + add r0, r4, #0 + add r0, #0xc + bl ov12_02225C14 + cmp r0, #0 + beq _02233EA4 + mov r0, #0xc + ldrsh r2, [r4, r0] + mov r0, #0x7f + add sp, #0xc + sub r0, r0, r2 + lsl r1, r0, #8 + mov r0, #0xff + lsl r0, r0, #8 + add r2, #0x80 + and r1, r0 + lsl r0, r2, #0x18 + lsr r0, r0, #0x18 + orr r0, r1 + ldr r1, _02233F28 ; =0x04000040 + strh r0, [r1] + mov r0, #0xbf + strh r0, [r1, #4] + pop {r4, r5, pc} +_02233EA4: + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02233EAE: + ldr r0, [r4, #0] + bl ov12_0222332C + bl sub_0200384C + cmp r0, #0 + bne _02233F20 + ldr r0, [r4, #4] + mov r2, #1 + add r0, r0, #1 + str r0, [r4, #4] + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02233F24 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + ldr r0, [r4, #0] + bl ov12_0222332C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov12_02222354 + add r2, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + lsl r2, r2, #0x10 + ldr r0, _02233F2C ; =0x0000FFFF + str r3, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #1 + lsr r2, r2, #0x10 + bl sub_02003178 + add sp, #0xc + pop {r4, r5, pc} +_02233EFA: + ldr r0, [r4, #0] + bl ov12_0222332C + bl sub_0200384C + cmp r0, #0 + bne _02233F20 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02233F12: + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_02233F20: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02233F24: .word 0xFFFF1FFF +_02233F28: .word 0x04000040 +_02233F2C: .word 0x0000FFFF + thumb_func_end ov12_02233DCC + + thumb_func_start ov12_02233F30 +ov12_02233F30: ; 0x02233F30 + push {r4, lr} + mov r1, #0x34 + add r4, r0, #0 + bl ov12_02235E50 + add r2, r0, #0 + ldr r1, _02233F48 ; =ov12_02233DCC + add r0, r4, #0 + str r4, [r2, #0] + bl ov12_022201E8 + pop {r4, pc} + ; .align 2, 0 +_02233F48: .word ov12_02233DCC + thumb_func_end ov12_02233F30 + + thumb_func_start ov12_02233F4C +ov12_02233F4C: ; 0x02233F4C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #4 + bhi _02233FFC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02233F66: ; jump table + .short _02233F70 - _02233F66 - 2 ; case 0 + .short _02233F96 - _02233F66 - 2 ; case 1 + .short _02233FAA - _02233F66 - 2 ; case 2 + .short _02233FD0 - _02233F66 - 2 ; case 3 + .short _02233FE4 - _02233F66 - 2 ; case 4 +_02233F70: + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x10 + bl ov12_02235780 + mov r1, #0 + mov r2, #0x10 + str r1, [sp] + mov r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x14 + add r3, r2, #0 + bl ov12_02226424 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02233FFC +_02233F96: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02226454 + cmp r0, #0 + beq _02233FFC + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02233FFC +_02233FAA: + ldr r0, [r4, #0x10] + bl sub_0200D3B8 + cmp r0, #0 + bne _02233FFC + ldr r0, [r4, #0xc] + mov r2, #0 + add r0, r0, #1 + str r0, [r4, #0xc] + mov r1, #0x10 + str r1, [sp] + mov r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x14 + add r3, r2, #0 + bl ov12_02226424 + b _02233FFC +_02233FD0: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02226454 + cmp r0, #0 + beq _02233FFC + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02233FFC +_02233FE4: + ldr r0, [r4, #0x10] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, pc} +_02233FFC: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02233F4C + + thumb_func_start ov12_02234008 +ov12_02234008: ; 0x02234008 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x3c + add r6, r0, #0 + str r2, [sp] + add r5, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r6, [r4, #0] + ldr r0, [sp] + str r7, [r4, #4] + str r0, [r4, #8] + str r5, [r4, #0x10] + add r0, r5, #0 + mov r1, #1 + bl sub_0200D390 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0] + ldr r1, _02234040 ; =ov12_02233F4C + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02234040: .word ov12_02233F4C + thumb_func_end ov12_02234008 + + thumb_func_start ov12_02234044 +ov12_02234044: ; 0x02234044 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #4 + bhi _02234108 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223405E: ; jump table + .short _02234068 - _0223405E - 2 ; case 0 + .short _022340D2 - _0223405E - 2 ; case 1 + .short _02234114 - _0223405E - 2 ; case 2 + .short _02234180 - _0223405E - 2 ; case 3 + .short _022341D2 - _0223405E - 2 ; case 4 +_02234068: + ldr r0, [r4, #0x68] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x6c] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #0x74] + asr r0, r0, #0x10 + str r0, [sp, #8] + ldr r1, [r4, #0x5c] + ldr r2, [r4, #0x60] + ldr r3, [r4, #0x64] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x14 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225EF0 + mov r1, #0xa + mov r2, #8 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x10] + add r0, #0x38 + bl ov12_0222619C + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x14 + bl ov12_022260E8 + mov r0, #0 + str r0, [sp] + mov r1, #8 + mov r2, #0xc + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r3, [r4, #0x28] + bl ov12_02226024 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_022340D2: + mov r1, #0xa + mov r2, #8 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x10] + add r0, #0x38 + bl ov12_0222619C + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x14 + bl ov12_022260E8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + mov r1, #8 + mov r2, #0xc + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r3, [r4, #0x28] + bl ov12_02226024 + cmp r5, #0 + beq _0223410A +_02234108: + b _02234210 +_0223410A: + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02234114: + ldr r0, [r4, #0x64] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x6c] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #0x74] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r1, [r4, #0x60] + ldr r2, [r4, #0x5c] + ldr r3, [r4, #0x68] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x14 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225EF0 + mov r1, #0xa + mov r2, #8 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x10] + add r0, #0x38 + bl ov12_0222619C + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x14 + bl ov12_022260E8 + mov r0, #0 + str r0, [sp] + mov r1, #8 + mov r2, #0xc + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r3, [r4, #0x28] + bl ov12_02226024 + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_02234180: + mov r1, #0xa + mov r2, #8 + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x10] + add r0, #0x38 + bl ov12_0222619C + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x14 + bl ov12_022260E8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + mov r1, #8 + mov r2, #0xc + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r3, [r4, #0x28] + bl ov12_02226024 + cmp r5, #0 + bne _02234210 + ldr r0, [r4, #0x70] + sub r0, r0, #1 + str r0, [r4, #0x70] + cmp r0, #0 + bgt _022341CA + ldr r0, [r4, #4] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, pc} +_022341CA: + mov r0, #0 + add sp, #0xc + str r0, [r4, #4] + pop {r4, r5, pc} +_022341D2: + mov r2, #0xa + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02007DEC + mov r2, #8 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007DEC + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #0x10] + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0x10] + add r2, #0xf3 + bl sub_02007DEC + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_02234210: + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov12_02234044 + + thumb_func_start ov12_02234214 +ov12_02234214: ; 0x02234214 + push {r3, r4, r5, lr} + mov r1, #0x78 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_02223354 + strh r0, [r4, #0xc] + ldr r0, [r4, #0] + bl ov12_02220248 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #8] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0xa] + mov r1, #0xa + str r1, [r4, #0x5c] + mov r0, #7 + str r0, [r4, #0x60] + str r1, [r4, #0x64] + mov r0, #0x1e + str r0, [r4, #0x68] + str r1, [r4, #0x6c] + mov r3, #1 + ldr r0, _02234288 ; =0x00040003 + str r3, [r4, #0x70] + str r0, [r4, #0x74] + mov r1, #2 + add r0, r4, #0 + str r1, [sp] + add r0, #0x38 + mov r2, #0 + bl ov12_02226108 + ldr r0, [r4, #0] + ldr r1, _0223428C ; =ov12_02234044 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, pc} + nop +_02234288: .word 0x00040003 +_0223428C: .word ov12_02234044 + thumb_func_end ov12_02234214 + + thumb_func_start ov12_02234290 +ov12_02234290: ; 0x02234290 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r4, #0x2c] + add r0, #8 + bl ov12_02225C50 + cmp r0, #0 + bne _022342BA + ldr r0, [r4, #0x2c] + bl sub_0200D0F4 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + pop {r3, r4, r5, pc} +_022342BA: + ldr r0, [r4, #4] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02234290 + + thumb_func_start ov12_022342C4 +ov12_022342C4: ; 0x022342C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r1, #0x30 + add r5, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r5, [r4, #0] + add r0, r5, #0 + bl ov12_02220300 + str r0, [r4, #4] + add r0, r5, #0 + bl ov12_02220240 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0223525C + cmp r0, #3 + bne _02234308 + add r0, r5, #0 + mov r1, #0 + bl ov12_02220298 + str r0, [r4, #0x2c] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220298 + bl sub_0200D0F4 + b _0223431E +_02234308: + add r0, r5, #0 + mov r1, #1 + bl ov12_02220298 + str r0, [r4, #0x2c] + add r0, r5, #0 + mov r1, #0 + bl ov12_02220298 + bl sub_0200D0F4 +_0223431E: + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + add r7, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0222598C + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov12_022258E0 + str r0, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + bl ov12_022258E0 + ldr r1, [sp, #0x10] + lsl r2, r7, #6 + add r6, r1, r2 + ldr r1, [sp, #0xc] + lsl r1, r1, #4 + neg r1, r1 + add r5, r0, r1 + str r1, [sp, #8] + lsl r1, r6, #0x10 + lsl r2, r5, #0x10 + ldr r0, [r4, #0x2c] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [sp, #8] + mov r2, #0x30 + add r0, r5, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + mul r2, r7 + str r0, [sp] + mov r0, #6 + add r2, r6, r2 + str r0, [sp, #4] + add r0, r4, #0 + lsl r1, r6, #0x10 + lsl r2, r2, #0x10 + lsl r3, r5, #0x10 + add r0, #8 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + ldr r0, [r4, #0] + ldr r1, _0223439C ; =ov12_02234290 + add r2, r4, #0 + bl ov12_022201E8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223439C: .word ov12_02234290 + thumb_func_end ov12_022342C4 + + thumb_func_start ov12_022343A0 +ov12_022343A0: ; 0x022343A0 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #5 + bls _022343B0 + b _022344CC +_022343B0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022343BC: ; jump table + .short _022343C8 - _022343BC - 2 ; case 0 + .short _022343E2 - _022343BC - 2 ; case 1 + .short _02234430 - _022343BC - 2 ; case 2 + .short _0223444C - _022343BC - 2 ; case 3 + .short _0223448E - _022343BC - 2 ; case 4 + .short _022344A6 - _022343BC - 2 ; case 5 +_022343C8: + mov r1, #4 + add r0, r4, #0 + str r1, [sp] + add r0, #0x40 + mov r2, #0 + mov r3, #1 + bl ov12_02226108 + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, r6, pc} +_022343E2: + mov r1, #0x18 + mov r2, #0x1a + add r0, r4, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x14] + add r0, #0x40 + bl ov12_0222619C + cmp r0, #0 + bne _022344CC + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0x1a + ldrsh r3, [r4, r0] + mov r0, #0x18 + ldrsh r1, [r4, r0] + ldr r2, [r4, #0x10] + sub r0, #0x1f + mul r0, r2 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + add r0, r4, #0 + ldr r4, [r4, #0xc] + mov r2, #0x28 + mul r2, r4 + add r2, r1, r2 + lsl r2, r2, #0x10 + add r0, #0x1c + asr r2, r2, #0x10 + bl ov12_02225BC8 + add sp, #8 + pop {r4, r5, r6, pc} +_02234430: + add r0, r4, #0 + ldr r1, [r4, #0x14] + add r0, #0x1c + bl ov12_02225C74 + cmp r0, #0 + bne _022344CC + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #8 + str r0, [r4, #8] + pop {r4, r5, r6, pc} +_0223444C: + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + bpl _022344CC + ldr r0, [r4, #4] + mov r5, #0x28 + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0x1a + ldrsh r3, [r4, r0] + mov r0, #0x18 + ldrsh r2, [r4, r0] + mov r0, #4 + str r3, [sp] + str r0, [sp, #4] + ldr r1, [r4, #0xc] + add r0, r4, #0 + add r6, r1, #0 + mul r6, r5 + add r1, r2, r6 + lsl r1, r1, #0x10 + ldr r4, [r4, #0x10] + sub r5, #0x2f + mul r5, r4 + add r3, r3, r5 + lsl r3, r3, #0x10 + add r0, #0x1c + asr r1, r1, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + add sp, #8 + pop {r4, r5, r6, pc} +_0223448E: + add r0, r4, #0 + ldr r1, [r4, #0x14] + add r0, #0x1c + bl ov12_02225C74 + cmp r0, #0 + bne _022344CC + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, r5, r6, pc} +_022344A6: + mov r2, #0x18 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x1a + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_02007DEC + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_022344CC: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov12_022343A0 + + thumb_func_start ov12_022344D0 +ov12_022344D0: ; 0x022344D0 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r1, #0x64 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + str r5, [r4, #0] + bl ov12_02220240 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x14] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x18] + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x1a] + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + str r0, [r4, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0222598C + str r0, [r4, #0x10] + ldr r0, [r4, #0] + ldr r1, _02234524 ; =ov12_022343A0 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + nop +_02234524: .word ov12_022343A0 + thumb_func_end ov12_022344D0 + + thumb_func_start ov12_02234528 +ov12_02234528: ; 0x02234528 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #4 + bls _02234538 + b _02234648 +_02234538: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02234544: ; jump table + .short _0223454E - _02234544 - 2 ; case 0 + .short _02234584 - _02234544 - 2 ; case 1 + .short _022345AC - _02234544 - 2 ; case 2 + .short _0223460A - _02234544 - 2 ; case 3 + .short _02234622 - _02234544 - 2 ; case 4 +_0223454E: + mov r0, #0x16 + ldrsh r3, [r4, r0] + mov r0, #0x14 + ldrsh r1, [r4, r0] + ldr r0, [r4, #0xc] + mov r5, #4 + lsl r0, r0, #4 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + str r5, [sp, #4] + ldr r2, [r4, #8] + sub r5, #0x2c + mul r5, r2 + add r2, r1, r5 + add r0, r4, #0 + lsl r2, r2, #0x10 + add r0, #0x18 + asr r2, r2, #0x10 + bl ov12_02225BC8 + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_02234584: + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x18 + bl ov12_02225C74 + cmp r0, #0 + bne _02234648 + ldr r0, [r4, #4] + mov r1, #4 + add r0, r0, #1 + str r0, [r4, #4] + add r4, #0x3c + add r0, r4, #0 + mov r2, #0 + mov r3, #1 + str r1, [sp] + bl ov12_02226108 + add sp, #8 + pop {r3, r4, r5, pc} +_022345AC: + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r5, r0, #0x10 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + add r0, r4, #0 + ldr r3, [r4, #0x10] + add r0, #0x3c + add r1, r5, #0 + bl ov12_0222619C + cmp r0, #0 + bne _02234648 + ldr r0, [r4, #4] + mov r5, #4 + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0x16 + ldrsh r3, [r4, r0] + mov r0, #0x14 + ldrsh r2, [r4, r0] + add r0, r4, #0 + add r0, #0x18 + str r3, [sp] + str r5, [sp, #4] + ldr r1, [r4, #8] + ldr r4, [r4, #0xc] + sub r5, #0x2c + mul r5, r1 + lsl r4, r4, #4 + add r1, r2, r5 + add r3, r3, r4 + lsl r1, r1, #0x10 + lsl r3, r3, #0x10 + asr r1, r1, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + add sp, #8 + pop {r3, r4, r5, pc} +_0223460A: + add r0, r4, #0 + ldr r1, [r4, #0x10] + add r0, #0x18 + bl ov12_02225C74 + cmp r0, #0 + bne _02234648 + ldr r0, [r4, #4] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_02234622: + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02007DEC + mov r2, #0x16 + ldrsh r2, [r4, r2] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007DEC + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 +_02234648: + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02234528 + + thumb_func_start ov12_0223464C +ov12_0223464C: ; 0x0223464C + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r1, #0x60 + bl ov12_02235E50 + add r4, r0, #0 + add r0, r5, #0 + str r5, [r4, #0] + bl ov12_02220248 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov12_022232FC + str r0, [r4, #0x10] + mov r1, #0 + bl sub_020080C0 + strh r0, [r4, #0x14] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #0x16] + add r0, r5, #0 + add r1, r6, #0 + bl ov12_02225964 + str r0, [r4, #8] + add r0, r5, #0 + add r1, r6, #0 + bl ov12_0222598C + str r0, [r4, #0xc] + ldr r0, [r4, #0] + ldr r1, _022346A0 ; =ov12_02234528 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + nop +_022346A0: .word ov12_02234528 + thumb_func_end ov12_0223464C + + .rodata + + + .global Unk_ov12_0223A1CC +Unk_ov12_0223A1CC: ; 0x0223A1CC + .incbin "incbin/overlay12_rodata.bin", 0x1C38, 0xC + diff --git a/asm/ov12_022346A4.s b/asm/ov12_022346A4.s new file mode 100644 index 000000000..d693d3eea --- /dev/null +++ b/asm/ov12_022346A4.s @@ -0,0 +1,964 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_022346A4 +ov12_022346A4: ; 0x022346A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r7, r1, #0 + add r4, r0, #0 + mov r1, #0xac + add r6, r2, #0 + str r3, [sp] + bl ov12_02235E50 + str r4, [r0, #0] + str r0, [sp, #4] + str r6, [r0, #0xc] + add r0, r4, #0 + bl ov12_02220240 + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02225964 + ldr r1, [sp, #4] + str r0, [r1, #0x10] + ldr r1, [r1, #0] + add r0, sp, #8 + bl ov12_0222329C + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov12_022258E0 + add r1, sp, #8 + strh r0, [r1] + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov12_022258E0 + add r1, sp, #8 + ldr r5, [sp, #4] + strh r0, [r1, #2] + mov r4, #0 +_022346F8: + cmp r4, #0 + add r2, sp, #8 + bne _02234712 + ldr r0, [sp] + mov r1, #0 + str r0, [r5, #0x14] + ldrsh r1, [r2, r1] + add r3, r2, #0 + mov r2, #2 + ldrsh r2, [r3, r2] + bl sub_0200D4C4 + b _0223471C +_02234712: + add r0, r7, #0 + add r1, r6, #0 + bl sub_0200CE6C + str r0, [r5, #0x14] +_0223471C: + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x14] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0x14] + mov r1, #1 + bl sub_0200D460 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _022346F8 + ldr r0, [sp, #4] + ldr r1, _0223474C ; =ov12_02234750 + ldr r0, [r0, #0] + ldr r2, [sp, #4] + bl ov12_022201E8 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223474C: .word ov12_02234750 + thumb_func_end ov12_022346A4 + + thumb_func_start ov12_02234750 +ov12_02234750: ; 0x02234750 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #4] + cmp r0, #4 + bhi _02234834 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02234768: ; jump table + .short _02234772 - _02234768 - 2 ; case 0 + .short _0223479A - _02234768 - 2 ; case 1 + .short _022347BA - _02234768 - 2 ; case 2 + .short _022347EC - _02234768 - 2 ; case 3 + .short _02234812 - _02234768 - 2 ; case 4 +_02234772: + add r2, r4, #0 + ldr r0, [r4, #0x14] + ldr r3, [r4, #0x10] + add r1, #0x1c + add r2, #0x64 + bl ov12_0223483C + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x1c + add r2, #0x64 + bl ov12_0223489C + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #8 + str r0, [r4, #8] + b _02234834 +_0223479A: + ldr r0, [r4, #8] + add r2, r4, #0 + sub r0, r0, #1 + str r0, [r4, #8] + ldr r0, [r4, #0x14] + add r1, #0x1c + add r2, #0x64 + bl ov12_0223489C + ldr r0, [r4, #8] + cmp r0, #0 + bge _02234834 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _02234834 +_022347BA: + add r2, r4, #0 + ldr r0, [r4, #0x18] + ldr r3, [r4, #0x10] + add r1, #0x40 + add r2, #0x88 + bl ov12_0223483C + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x18] + add r1, #0x40 + add r2, #0x88 + bl ov12_0223489C + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x1c + add r2, #0x64 + bl ov12_0223489C + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _02234834 +_022347EC: + add r2, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x1c + add r2, #0x64 + bl ov12_0223489C + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x18] + add r1, #0x40 + add r2, #0x88 + bl ov12_0223489C + cmp r0, #0 + beq _02234834 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _02234834 +_02234812: + mov r6, #0 + add r5, r4, #0 +_02234816: + ldr r0, [r5, #0x14] + bl sub_0200D0F4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _02234816 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_02234834: + ldr r0, [r4, #0xc] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02234750 + + thumb_func_start ov12_0223483C +ov12_0223483C: ; 0x0223483C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + add r5, r0, #0 + mov r1, #2 + add r7, r2, #0 + add r4, r3, #0 + bl sub_0200D6A4 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D3F4 + add r1, sp, #8 + add r0, r5, #0 + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + add r1, sp, #8 + mov r0, #0 + ldrsh r3, [r1, r0] + mov r0, #2 + ldrsh r1, [r1, r0] + add r0, r3, #0 + sub r0, #0x20 + lsl r0, r0, #0x10 + lsl r2, r4, #4 + asr r0, r0, #0x10 + add r2, r1, r2 + str r0, [sp] + mov r0, #0x20 + lsl r2, r2, #0x10 + str r0, [sp, #4] + add r0, r6, #0 + asr r2, r2, #0x10 + bl ov12_02225BC8 + mov r0, #0x20 + mov r2, #0xa + str r0, [sp] + add r0, r7, #0 + mov r1, #2 + add r3, r2, #0 + bl ov12_02225E68 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_0223483C + + thumb_func_start ov12_0223489C +ov12_0223489C: ; 0x0223489C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + add r1, r5, #0 + bl ov12_02225C50 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_022260A8 + cmp r0, #0 + beq _022348BA + mov r0, #0 + pop {r3, r4, r5, pc} +_022348BA: + add r0, r5, #0 + mov r1, #0 + bl sub_0200D3F4 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0223489C + + thumb_func_start ov12_022348C8 +ov12_022348C8: ; 0x022348C8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x3c + add r6, r0, #0 + add r7, r2, #0 + add r5, r3, #0 + bl ov12_02235E50 + add r4, r0, #0 + str r6, [r4, #0] + str r7, [r4, #0xc] + str r5, [r4, #0x10] + add r0, r5, #0 + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #0x10] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r4, #0x10] + bl sub_0200D43C + str r0, [r4, #8] + ldr r0, [r4, #0] + ldr r1, _02234914 ; =ov12_02234918 + add r2, r4, #0 + bl ov12_022201E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02234914: .word ov12_02234918 + thumb_func_end ov12_022348C8 + + thumb_func_start ov12_02234918 +ov12_02234918: ; 0x02234918 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #4 + bhi _02234A04 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02234932: ; jump table + .short _0223493C - _02234932 - 2 ; case 0 + .short _0223496C - _02234932 - 2 ; case 1 + .short _02234992 - _02234932 - 2 ; case 2 + .short _022349D0 - _02234932 - 2 ; case 3 + .short _022349EC - _02234932 - 2 ; case 4 +_0223493C: + mov r0, #4 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x14 + mov r1, #0 + mov r2, #0x10 + mov r3, #0x14 + bl ov12_02226424 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x14 + bl ov12_02235780 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _02234A04 +_0223496C: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02226454 + cmp r0, #0 + beq _02234A04 + ldr r0, [r4, #4] + mov r1, #1 + add r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0x10] + bl sub_0200D390 + mov r1, #1 + ldr r0, [r4, #0x10] + lsl r1, r1, #0xc + bl sub_0200D3A4 + b _02234A04 +_02234992: + ldr r0, [r4, #0x10] + bl sub_0200D3E0 + mov r1, #3 + bl sub_020E1F6C + ldr r2, [r4, #8] + ldr r0, [r4, #0x10] + add r1, r2, r1 + bl sub_0200D430 + ldr r0, [r4, #0x10] + bl sub_0200D3B8 + cmp r0, #0 + bne _02234A04 + ldr r0, [r4, #4] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0x14 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x14 + mov r2, #0 + mov r3, #4 + bl ov12_02226424 + b _02234A04 +_022349D0: + add r0, r4, #0 + add r0, #0x14 + bl ov12_02226454 + cmp r0, #0 + beq _02234A04 + ldr r0, [r4, #4] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0x10] + bl sub_0200D3F4 + b _02234A04 +_022349EC: + ldr r0, [r4, #0x10] + bl sub_0200D0F4 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, pc} +_02234A04: + ldr r0, [r4, #0xc] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02234918 + + thumb_func_start ov12_02234A10 +ov12_02234A10: ; 0x02234A10 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + str r1, [sp, #4] + str r2, [sp, #8] + mov r1, #0x54 + add r5, r0, #0 + str r3, [sp, #0xc] + bl ov12_02235E50 + ldr r1, [sp, #8] + str r5, [r0, #0] + str r0, [sp, #0x14] + str r1, [r0, #8] + ldr r0, [r0, #0] + bl ov12_02220240 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_02225964 + ldr r1, [sp, #0x14] + str r0, [sp, #0x10] + ldr r1, [r1, #0] + add r0, sp, #0x18 + bl ov12_0222329C + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov12_022258E0 + add r1, sp, #0x18 + strh r0, [r1] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov12_022258E0 + ldr r7, [sp, #0x14] + ldr r6, [sp, #0x14] + ldr r5, [sp, #0x14] + add r1, sp, #0x18 + add r7, #0x3c + add r6, #0x24 + strh r0, [r1, #2] + mov r4, #5 + add r5, #0x14 + add r7, #0x14 + add r6, #0x14 +_02234A74: + cmp r4, #5 + add r2, sp, #0x18 + bne _02234A8E + ldr r0, [sp, #0xc] + mov r1, #0 + str r0, [r5, #0xc] + ldrsh r1, [r2, r1] + add r3, r2, #0 + mov r2, #2 + ldrsh r2, [r3, r2] + bl sub_0200D4C4 + b _02234A98 +_02234A8E: + ldr r0, [sp, #4] + ldr r1, [sp, #8] + bl sub_0200CE6C + str r0, [r5, #0xc] +_02234A98: + ldr r0, [r5, #0xc] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0xc] + mov r1, #1 + bl sub_0200D460 + ldr r0, [r5, #0xc] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [sp, #0x10] + add r1, r6, #0 + str r0, [sp] + ldr r0, [r5, #0xc] + add r2, r7, #0 + add r3, r4, #0 + bl ov12_02234AE0 + sub r5, r5, #4 + sub r7, r7, #4 + sub r6, r6, #4 + sub r4, r4, #1 + bpl _02234A74 + ldr r0, [sp, #0x14] + ldr r1, _02234ADC ; =ov12_02234B64 + ldr r0, [r0, #0] + ldr r2, [sp, #0x14] + bl ov12_022201E8 + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + nop +_02234ADC: .word ov12_02234B64 + thumb_func_end ov12_02234A10 + + thumb_func_start ov12_02234AE0 +ov12_02234AE0: ; 0x02234AE0 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r6, r1, #0 + lsr r1, r4, #0x1f + add r1, r4, r1 + asr r1, r1, #1 + add r5, r0, #0 + add r7, r2, #0 + bl sub_0200D364 + lsl r0, r4, #1 + str r0, [r7, #0] + mov r0, #0x10 + add r1, sp, #0 + str r0, [r6, #0] + add r0, r5, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + mov r1, #2 + add r6, r1, #0 + add r2, sp, #0 + sub r6, #0xe + mul r6, r4 + ldr r0, [sp, #0x18] + ldrsh r3, [r2, r1] + add r6, #0x28 + add r4, r0, #0 + mul r4, r6 + add r0, r3, r4 + mov r3, #0 + strh r0, [r2, #2] + ldrsh r0, [r2, r3] + add r0, #0x28 + strh r0, [r2] + ldrsh r1, [r2, r1] + ldrsh r2, [r2, r3] + add r0, r5, #0 + bl sub_0200D4C4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02234AE0 + + thumb_func_start ov12_02234B34 +ov12_02234B34: ; 0x02234B34 + push {r3, lr} + ldr r3, [r2, #0] + cmp r3, #0 + ble _02234B4A + sub r1, r3, #1 + str r1, [r2, #0] + bne _02234B60 + mov r1, #1 + bl sub_0200D3F4 + b _02234B60 +_02234B4A: + ldr r2, [r1, #0] + cmp r2, #0 + ble _02234B56 + sub r0, r2, #1 + str r0, [r1, #0] + b _02234B60 +_02234B56: + mov r1, #0 + bl sub_0200D3F4 + mov r0, #1 + pop {r3, pc} +_02234B60: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov12_02234B34 + + thumb_func_start ov12_02234B64 +ov12_02234B64: ; 0x02234B64 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r1, #4] + str r1, [sp] + cmp r0, #0 + beq _02234B76 + cmp r0, #1 + beq _02234BA8 + b _02234BCC +_02234B76: + add r6, r1, #0 + add r4, r1, #0 + mov r7, #0 + add r6, #0x3c + add r4, #0x24 + add r5, r1, #0 +_02234B82: + ldr r0, [r5, #0xc] + add r1, r4, #0 + add r2, r6, #0 + bl ov12_02234B34 + add r7, r7, #1 + add r6, r6, #4 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #6 + blt _02234B82 + cmp r0, #0 + beq _02234BCC + ldr r0, [sp] + ldr r0, [r0, #4] + add r1, r0, #1 + ldr r0, [sp] + str r1, [r0, #4] + b _02234BCC +_02234BA8: + mov r5, #0 + add r4, r1, #0 +_02234BAC: + ldr r0, [r4, #0xc] + bl sub_0200D0F4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #6 + blt _02234BAC + ldr r0, [sp] + add r1, r6, #0 + ldr r0, [r0, #0] + bl ov12_02220220 + ldr r0, [sp] + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_02234BCC: + ldr r0, [sp] + ldr r0, [r0, #8] + bl sub_0200C7EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02234B64 + + thumb_func_start ov12_02234BD8 +ov12_02234BD8: ; 0x02234BD8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r7, #0 + add r6, r5, #0 + str r1, [sp, #0x10] + add r6, #0x30 + add r4, r7, #0 +_02234BE8: + mov r0, #0 + str r0, [sp] + mov r0, #0x32 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0 + str r0, [sp, #0xc] + ldr r2, _02234C28 ; =0x00007FFF + add r0, r6, #0 + add r3, r1, #0 + bl ov12_02225A5C + ldr r0, [r5, #0x38] + add r7, r7, #1 + add r0, r0, r4 + str r0, [r5, #0x38] + ldr r1, [r5, #0x48] + ldr r0, [sp, #0x10] + add r6, #0x24 + mul r0, r1 + str r0, [r5, #0x48] + ldr r0, _02234C2C ; =0x00002AAA + add r5, #0x24 + add r4, r4, r0 + cmp r7, #6 + blt _02234BE8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02234C28: .word 0x00007FFF +_02234C2C: .word 0x00002AAA + thumb_func_end ov12_02234BD8 + + thumb_func_start ov12_02234C30 +ov12_02234C30: ; 0x02234C30 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0 + add r7, r6, #0 + str r0, [sp] + add r7, #0x30 + add r4, r6, #0 + add r5, r6, #0 +_02234C40: + add r0, r7, #0 + bl ov12_02225AE0 + mov r1, #0x13 + lsl r1, r1, #4 + mov r2, #0x30 + ldrsh r1, [r6, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x18] + add r1, r1, r2 + ldr r2, _02234C9C ; =0x00000132 + lsl r1, r1, #0x10 + ldrsh r2, [r6, r2] + asr r1, r1, #0x10 + bl sub_0200D4C4 + ldr r1, [r4, #0x38] + ldr r0, _02234CA0 ; =0x00003FFF + cmp r1, r0 + blt _02234C78 + ldr r0, _02234CA4 ; =0x0000BF49 + cmp r1, r0 + bgt _02234C78 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D460 + b _02234C88 +_02234C78: + ldr r0, [r6, #0] + bl ov12_0222339C + add r1, r0, #0 + ldr r0, [r5, #0x18] + add r1, r1, #1 + bl sub_0200D460 +_02234C88: + ldr r0, [sp] + add r7, #0x24 + add r0, r0, #1 + add r4, #0x24 + add r5, r5, #4 + str r0, [sp] + cmp r0, #6 + blt _02234C40 + pop {r3, r4, r5, r6, r7, pc} + nop +_02234C9C: .word 0x00000132 +_02234CA0: .word 0x00003FFF +_02234CA4: .word 0x0000BF49 + thumb_func_end ov12_02234C30 + + thumb_func_start ov12_02234CA8 +ov12_02234CA8: ; 0x02234CA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #4 + bhi _02234D8E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02234CC2: ; jump table + .short _02234CCC - _02234CC2 - 2 ; case 0 + .short _02234D02 - _02234CC2 - 2 ; case 1 + .short _02234D22 - _02234CC2 - 2 ; case 2 + .short _02234D4E - _02234CC2 - 2 ; case 3 + .short _02234D6A - _02234CC2 - 2 ; case 4 +_02234CCC: + ldr r0, [r4, #0] + mov r1, #1 + mov r2, #0xf + bl ov12_02235780 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, #0xfe + add r0, r4, r0 + mov r1, #1 + mov r2, #0x10 + mov r3, #0xf + bl ov12_02226424 + ldr r1, [r4, #0x14] + add r0, r4, #0 + bl ov12_02234BD8 + add r0, r4, #0 + bl ov12_02234C30 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02234D8E +_02234D02: + add r0, r4, #0 + bl ov12_02234C30 + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov12_02226454 + cmp r0, #0 + beq _02234D8E + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0x1c + str r0, [r4, #0x10] + b _02234D8E +_02234D22: + add r0, r4, #0 + bl ov12_02234C30 + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + bpl _02234D8E + ldr r0, [r4, #0xc] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0xf + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, #0xfe + add r0, r4, r0 + mov r2, #1 + mov r3, #0 + bl ov12_02226424 + b _02234D8E +_02234D4E: + add r0, r4, #0 + bl ov12_02234C30 + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov12_02226454 + cmp r0, #0 + beq _02234D8E + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02234D8E +_02234D6A: + mov r6, #0 + add r5, r4, #0 +_02234D6E: + ldr r0, [r5, #0x18] + bl sub_0200D0F4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #6 + blt _02234D6E + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov12_02220220 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02234D8E: + ldr r0, [r4, #8] + bl sub_0200C7EC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02234CA8 + + thumb_func_start ov12_02234D98 +ov12_02234D98: ; 0x02234D98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r1, #0 + mov r1, #0x4d + lsl r1, r1, #2 + add r4, r0, #0 + str r2, [sp] + add r7, r3, #0 + bl ov12_02235E50 + add r6, r0, #0 + str r4, [r6, #0] + ldr r0, [sp] + str r5, [r6, #4] + str r0, [r6, #8] + add r0, r4, #0 + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_022232FC + mov r1, #0 + add r5, r0, #0 + bl sub_020080C0 + mov r1, #0x13 + lsl r1, r1, #4 + strh r0, [r6, r1] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + ldr r1, _02234E3C ; =0x00000132 + strh r0, [r6, r1] + add r0, sp, #4 + add r1, r4, #0 + bl ov12_0222329C + mov r4, #0 + add r5, r6, #0 +_02234DEA: + cmp r4, #0 + bne _02234DF2 + str r7, [r5, #0x18] + b _02234DFE +_02234DF2: + ldr r0, [r6, #4] + ldr r1, [r6, #8] + add r2, sp, #4 + bl sub_0200CE6C + str r0, [r5, #0x18] +_02234DFE: + ldr r0, [r5, #0x18] + mov r1, #0x64 + bl sub_0200D474 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_0200D390 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02234DEA + ldr r0, [r6, #0] + bl ov12_02220240 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov12_02225964 + str r0, [r6, #0x14] + ldr r0, [r6, #0] + ldr r1, _02234E40 ; =ov12_02234CA8 + add r2, r6, #0 + bl ov12_022201E8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02234E3C: .word 0x00000132 +_02234E40: .word ov12_02234CA8 + thumb_func_end ov12_02234D98 \ No newline at end of file diff --git a/asm/ov12_02234E44.s b/asm/ov12_02234E44.s new file mode 100644 index 000000000..3a97197f6 --- /dev/null +++ b/asm/ov12_02234E44.s @@ -0,0 +1,519 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02234E44 +ov12_02234E44: ; 0x02234E44 + strh r1, [r0, #0xc] + strh r2, [r0, #0xe] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02234E44 + + thumb_func_start ov12_02234E4C +ov12_02234E4C: ; 0x02234E4C + strh r1, [r0, #0x14] + strh r2, [r0, #0x16] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02234E4C + + thumb_func_start ov12_02234E54 +ov12_02234E54: ; 0x02234E54 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x1c] + add r4, r1, #0 + bl ov12_0221FDE4 + add r6, r0, #0 + ldr r0, [r5, #0x1c] + mov r1, #3 + bl ov12_02223428 + add r1, r0, #0 + lsl r0, r4, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r6, [sp, #0xc] + ldr r1, [r5, #4] + ldr r0, [r5, #0] + lsl r2, r1, #4 + ldr r1, _02234EE4 ; =0x0223A1D8 + add r3, r4, #0 + ldr r1, [r1, r2] + ldr r2, [r5, #0x2c] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x80 + str r0, [sp, #8] + ldr r2, [r5, #4] + ldr r0, [r5, #0x30] + lsl r3, r2, #4 + ldr r2, _02234EE8 ; =0x0223A1DC + ldr r1, [r5, #0] + ldr r2, [r2, r3] + add r3, r6, #0 + bl sub_02003050 + lsl r1, r4, #0x18 + ldr r0, [r5, #0x2c] + lsr r1, r1, #0x18 + bl sub_02019EBC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r6, [sp, #0xc] + ldr r1, [r5, #4] + ldr r0, [r5, #0] + lsl r2, r1, #4 + ldr r1, _02234EEC ; =0x0223A1E0 + add r3, r4, #0 + ldr r1, [r1, r2] + ldr r2, [r5, #0x2c] + bl sub_02006E60 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02234EE4: .word 0x0223A1D8 +_02234EE8: .word 0x0223A1DC +_02234EEC: .word 0x0223A1E0 + thumb_func_end ov12_02234E54 + + thumb_func_start ov12_02234EF0 +ov12_02234EF0: ; 0x02234EF0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x18] + cmp r0, #3 + bhi _02234FAC + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02234F08: ; jump table + .short _02234F10 - _02234F08 - 2 ; case 0 + .short _02234F20 - _02234F08 - 2 ; case 1 + .short _02234F38 - _02234F08 - 2 ; case 2 + .short _02234F58 - _02234F08 - 2 ; case 3 +_02234F10: + add r0, r4, #0 + mov r1, #2 + bl ov12_02234E54 + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] + b _02234FFA +_02234F20: + ldrh r0, [r4, #0x16] + mov r1, #4 + mov r2, #0x39 + str r0, [sp] + ldrh r3, [r4, #0x14] + ldr r0, _02235048 ; =0x04000050 + bl sub_020BF55C + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] + b _02234FFA +_02234F38: + add r1, r4, #0 + add r1, #0x40 + ldrb r1, [r1] + cmp r1, #0x14 + bls _02234F48 + add r0, r0, #1 + strb r0, [r4, #0x18] + b _02234FFA +_02234F48: + add r0, r4, #0 + add r0, #0x40 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x40 + strb r1, [r0] + b _02234FFA +_02234F58: + ldrh r0, [r4, #0x14] + cmp r0, #0 + beq _02234F62 + sub r0, r0, #1 + strh r0, [r4, #0x14] +_02234F62: + ldrh r0, [r4, #0x16] + cmp r0, #0x10 + bhs _02234F6C + add r0, r0, #1 + strh r0, [r4, #0x16] +_02234F6C: + ldrh r0, [r4, #0x14] + cmp r0, #0 + bne _02234F9E + ldrh r0, [r4, #0x16] + cmp r0, #0x10 + bne _02234F9E + ldr r0, [r4, #0x2c] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x34] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x38] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_0200D3F4 + ldrb r0, [r4, #0x18] + add r0, r0, #1 + strb r0, [r4, #0x18] +_02234F9E: + ldrh r0, [r4, #0x16] + ldrh r1, [r4, #0x14] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0223504C ; =0x04000052 + strh r1, [r0] + b _02234FFA +_02234FAC: + ldr r0, _02235050 ; =0x0400004A + mov r1, #0x3f + ldrh r2, [r0] + bic r2, r1 + mov r1, #0x1f + orr r2, r1 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _02235054 ; =0xFFFFC0FF + lsl r1, r1, #8 + and r2, r3 + orr r1, r2 + strh r1, [r0] + mov r2, #0 + ldr r0, [r4, #0x2c] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + ldr r0, [r4, #0x2c] + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02235058 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + ldr r0, [r4, #0x1c] + add r1, r5, #0 + bl ov12_02220220 + add r0, r4, #0 + bl ov12_02235E80 + pop {r3, r4, r5, pc} +_02234FFA: + mov r3, #0x10 + mov r0, #0xc + ldrsh r1, [r4, r3] + ldrsh r0, [r4, r0] + mov r2, #0 + add r0, r1, r0 + strh r0, [r4, #0x10] + mov r0, #0x12 + ldrsh r1, [r4, r0] + mov r0, #0xe + ldrsh r0, [r4, r0] + add r0, r1, r0 + strh r0, [r4, #0x12] + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x2c] + mov r1, #2 + bl sub_02019184 + mov r3, #0x12 + ldrsh r3, [r4, r3] + ldr r0, [r4, #0x2c] + mov r1, #2 + mov r2, #3 + bl sub_02019184 + ldr r0, [r4, #0x34] + bl sub_0200D330 + ldr r0, [r4, #0x38] + bl sub_0200D330 + ldr r0, [r4, #0x3c] + bl sub_0200D330 + ldr r0, [r4, #0x24] + bl sub_0200C7EC + pop {r3, r4, r5, pc} + nop +_02235048: .word 0x04000050 +_0223504C: .word 0x04000052 +_02235050: .word 0x0400004A +_02235054: .word 0xFFFFC0FF +_02235058: .word 0xFFFF1FFF + thumb_func_end ov12_02234EF0 + + thumb_func_start ov12_0223505C +ov12_0223505C: ; 0x0223505C + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #7 + str r1, [r4, #0] + add r5, r0, #0 + mov r1, #0 + bl ov12_02220280 + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #1 + bl ov12_02220280 + str r0, [r4, #8] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0223505C + + thumb_func_start ov12_0223507C +ov12_0223507C: ; 0x0223507C + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x44 + add r6, r0, #0 + bl ov12_02235E50 + add r4, r0, #0 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x18 + bl ov12_0223595C + add r2, r4, #0 + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x1c] + mov r1, #0 + bl ov12_022202C0 + str r0, [r4, #0x34] + ldr r0, [r4, #0x1c] + mov r1, #1 + bl ov12_022202C0 + str r0, [r4, #0x38] + ldr r0, [r4, #0x1c] + mov r1, #2 + bl ov12_022202C0 + str r0, [r4, #0x3c] + ldr r0, [r4, #0x1c] + mov r1, #2 + bl ov12_02223428 + ldr r0, [r4, #0x34] + mov r1, #2 + bl sub_0200D460 + ldr r0, [r4, #0x38] + mov r1, #2 + bl sub_0200D460 + ldr r0, [r4, #8] + cmp r0, #0 + bne _022350E6 + add r0, r6, #0 + bl ov12_02220240 + b _022350EC +_022350E6: + add r0, r6, #0 + bl ov12_02220248 +_022350EC: + add r1, r0, #0 + add r0, r6, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r6, #0 + bl ov12_0221FDD4 + cmp r0, #1 + bne _02235124 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x1c] + mov r1, #2 + bl ov12_02223428 + add r5, r0, #0 + ldr r0, [r4, #0x34] + add r1, r5, #0 + bl sub_0200D460 + ldr r0, [r4, #0x38] + add r1, r5, #0 + bl sub_0200D460 + b _02235148 +_02235124: + cmp r5, #1 + bhi _02235132 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_0200D3F4 + b _02235148 +_02235132: + sub r0, r5, #3 + cmp r0, #1 + ldr r0, [r4, #0x3c] + bhi _02235142 + mov r1, #3 + bl sub_0200D460 + b _02235148 +_02235142: + mov r1, #1 + bl sub_0200D460 +_02235148: + ldr r0, _02235194 ; =0x0400004A + ldr r1, _02235198 ; =0xFFFFC0FF + ldrh r2, [r0] + and r2, r1 + mov r1, #0x16 + lsl r1, r1, #8 + orr r2, r1 + lsr r1, r0, #0xd + orr r1, r2 + strh r1, [r0] + ldrh r2, [r0] + mov r1, #0x3f + bic r2, r1 + mov r1, #0x1b + orr r2, r1 + mov r1, #0x20 + orr r2, r1 + strh r2, [r0] + lsl r3, r1, #0x15 + ldr r2, [r3, #0] + ldr r0, _0223519C ; =0xFFFF1FFF + and r2, r0 + lsl r0, r1, #0xa + orr r0, r2 + str r0, [r3, #0] + ldr r0, [r4, #0x38] + mov r1, #2 + bl sub_0200D810 + mov r0, #0 + strh r0, [r4, #0x10] + strh r0, [r4, #0x12] + ldr r0, [r4, #0x1c] + ldr r1, _022351A0 ; =ov12_02234EF0 + add r2, r4, #0 + bl ov12_022201E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02235194: .word 0x0400004A +_02235198: .word 0xFFFFC0FF +_0223519C: .word 0xFFFF1FFF +_022351A0: .word ov12_02234EF0 + thumb_func_end ov12_0223507C + + thumb_func_start ov12_022351A4 +ov12_022351A4: ; 0x022351A4 + push {r4, lr} + sub sp, #0x18 + add r1, sp, #0 + add r4, r0, #0 + bl ov12_0223505C + add r0, sp, #0 + mov r1, #0 + mov r2, #3 + bl ov12_02234E44 + add r0, sp, #0 + mov r1, #0xc + mov r2, #4 + bl ov12_02234E4C + add r0, r4, #0 + add r1, sp, #0 + bl ov12_0223507C + add sp, #0x18 + pop {r4, pc} + thumb_func_end ov12_022351A4 + + thumb_func_start ov12_022351D0 +ov12_022351D0: ; 0x022351D0 + push {r4, lr} + sub sp, #0x18 + add r1, sp, #0 + add r4, r0, #0 + bl ov12_0223505C + mov r1, #0 + add r0, sp, #0 + sub r2, r1, #3 + bl ov12_02234E44 + add r0, sp, #0 + mov r1, #0xc + mov r2, #4 + bl ov12_02234E4C + add r0, r4, #0 + add r1, sp, #0 + bl ov12_0223507C + add sp, #0x18 + pop {r4, pc} + thumb_func_end ov12_022351D0 + + thumb_func_start ov12_022351FC +ov12_022351FC: ; 0x022351FC + push {r4, lr} + sub sp, #0x18 + add r1, sp, #0 + add r4, r0, #0 + bl ov12_0223505C + add r0, sp, #0 + mov r1, #0 + mov r2, #3 + bl ov12_02234E44 + add r0, sp, #0 + mov r1, #0xc + mov r2, #4 + bl ov12_02234E4C + add r0, r4, #0 + add r1, sp, #0 + bl ov12_0223507C + add sp, #0x18 + pop {r4, pc} + thumb_func_end ov12_022351FC + + thumb_func_start ov12_02235228 +ov12_02235228: ; 0x02235228 + push {r4, lr} + sub sp, #0x18 + add r1, sp, #0 + add r4, r0, #0 + bl ov12_0223505C + mov r1, #0 + add r0, sp, #0 + sub r2, r1, #6 + bl ov12_02234E44 + add r0, sp, #0 + mov r1, #0xc + mov r2, #4 + bl ov12_02234E4C + add r0, r4, #0 + add r1, sp, #0 + bl ov12_0223507C + add sp, #0x18 + pop {r4, pc} + thumb_func_end ov12_02235228 + + .rodata + + + .global Unk_ov12_0223A1D8 +Unk_ov12_0223A1D8: ; 0x0223A1D8 + .incbin "incbin/overlay12_rodata.bin", 0x1C44, 0x40 + diff --git a/asm/ov12_02235254.s b/asm/ov12_02235254.s new file mode 100644 index 000000000..aa8830df2 --- /dev/null +++ b/asm/ov12_02235254.s @@ -0,0 +1,1670 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02235254 +ov12_02235254: ; 0x02235254 + ldr r3, _02235258 ; =ov12_022232B8 + bx r3 + ; .align 2, 0 +_02235258: .word ov12_022232B8 + thumb_func_end ov12_02235254 + + thumb_func_start ov12_0223525C +ov12_0223525C: ; 0x0223525C + push {r4, lr} + bl ov12_022232B8 + cmp r0, #5 + bhi _02235284 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02235272: ; jump table + .short _0223527E - _02235272 - 2 ; case 0 + .short _02235282 - _02235272 - 2 ; case 1 + .short _0223527E - _02235272 - 2 ; case 2 + .short _02235282 - _02235272 - 2 ; case 3 + .short _0223527E - _02235272 - 2 ; case 4 + .short _02235282 - _02235272 - 2 ; case 5 +_0223527E: + mov r4, #3 + b _02235284 +_02235282: + mov r4, #4 +_02235284: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov12_0223525C + + thumb_func_start ov12_02235288 +ov12_02235288: ; 0x02235288 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r4, #0 +_02235290: + add r0, r6, #0 + add r1, r4, #0 + bl ov12_022232B8 + cmp r0, r5 + bne _022352A0 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_022352A0: + add r4, r4, #1 + cmp r4, #4 + blt _02235290 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02235288 + + thumb_func_start ov12_022352AC +ov12_022352AC: ; 0x022352AC + push {r4, r5, r6, lr} + add r6, r0, #0 + bl ov12_022232B8 + add r5, r0, #0 + cmp r5, #1 + bls _0223530C + mov r4, #0 +_022352BC: + add r0, r6, #0 + add r1, r4, #0 + bl ov12_022232B8 + cmp r5, #5 + bhi _02235300 + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022352D4: ; jump table + .short _02235300 - _022352D4 - 2 ; case 0 + .short _02235300 - _022352D4 - 2 ; case 1 + .short _022352E0 - _022352D4 - 2 ; case 2 + .short _022352F0 - _022352D4 - 2 ; case 3 + .short _022352E8 - _022352D4 - 2 ; case 4 + .short _022352F8 - _022352D4 - 2 ; case 5 +_022352E0: + cmp r0, #4 + bne _02235300 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_022352E8: + cmp r0, #2 + bne _02235300 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_022352F0: + cmp r0, #5 + bne _02235300 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_022352F8: + cmp r0, #3 + bne _02235300 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_02235300: + add r4, r4, #1 + cmp r4, #4 + blt _022352BC + bl sub_02022974 + add r0, r5, #0 +_0223530C: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_022352AC + + thumb_func_start ov12_02235310 +ov12_02235310: ; 0x02235310 + push {r3, lr} + cmp r0, #5 + bhi _02235346 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02235322: ; jump table + .short _0223532E - _02235322 - 2 ; case 0 + .short _02235332 - _02235322 - 2 ; case 1 + .short _02235336 - _02235322 - 2 ; case 2 + .short _0223533A - _02235322 - 2 ; case 3 + .short _0223533E - _02235322 - 2 ; case 4 + .short _02235342 - _02235322 - 2 ; case 5 +_0223532E: + mov r0, #1 + pop {r3, pc} +_02235332: + mov r0, #0 + pop {r3, pc} +_02235336: + mov r0, #3 + pop {r3, pc} +_0223533A: + mov r0, #2 + pop {r3, pc} +_0223533E: + mov r0, #5 + pop {r3, pc} +_02235342: + mov r0, #4 + pop {r3, pc} +_02235346: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02235310 + + thumb_func_start ov12_02235350 +ov12_02235350: ; 0x02235350 + push {r3, r4, r5, r6} + sub sp, #0x30 + ldr r6, _022353A4 ; =0x0223A230 + add r5, sp, #0x18 + mov r4, #0xc +_0223535A: + ldrh r3, [r6] + add r6, r6, #2 + strh r3, [r5] + add r5, r5, #2 + sub r4, r4, #1 + bne _0223535A + ldr r6, _022353A8 ; =0x0223A248 + add r5, sp, #0 + mov r4, #0xc +_0223536C: + ldrh r3, [r6] + add r6, r6, #2 + strh r3, [r5] + add r5, r5, #2 + sub r4, r4, #1 + bne _0223536C + cmp r1, #0 + beq _02235390 + lsl r3, r0, #2 + add r0, sp, #0 + add r1, r0, r3 + ldrh r0, [r0, r3] + add sp, #0x30 + strh r0, [r2] + ldrh r0, [r1, #2] + strh r0, [r2, #2] + pop {r3, r4, r5, r6} + bx lr +_02235390: + lsl r3, r0, #2 + add r0, sp, #0x18 + add r1, r0, r3 + ldrh r0, [r0, r3] + strh r0, [r2] + ldrh r0, [r1, #2] + strh r0, [r2, #2] + add sp, #0x30 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_022353A4: .word 0x0223A230 +_022353A8: .word 0x0223A248 + thumb_func_end ov12_02235350 + + thumb_func_start ov12_022353AC +ov12_022353AC: ; 0x022353AC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + bl ov12_02235254 + add r6, r0, #0 + add r0, r5, #0 + bl ov12_0221FDD4 + add r1, r0, #0 + add r0, r6, #0 + add r2, r4, #0 + bl ov12_02235350 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_022353AC + + thumb_func_start ov12_022353CC +ov12_022353CC: ; 0x022353CC + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x114 + add r7, r2, #0 + mov r2, #0x12 + str r3, [sp] + ldr r6, _02235440 ; =0x0223A260 + add r5, r0, #0 + add r4, r1, #0 + add r3, sp, #4 + lsl r2, r2, #4 +_022353E8: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _022353E8 + cmp r7, #1 + bne _0223540A + cmp r5, #0 + beq _022353FE + cmp r5, #1 + beq _02235402 + b _02235406 +_022353FE: + mov r5, #6 + b _0223540A +_02235402: + mov r5, #7 + b _0223540A +_02235406: + bl sub_02022974 +_0223540A: + mov r0, #0x12 + lsl r0, r0, #4 + add r1, sp, #4 + mul r0, r5 + add r0, r1, r0 + ldr r1, _02235444 ; =0x00000908 + add r1, sp + ldr r1, [r1, #0x10] + lsl r2, r1, #1 + ldr r1, [sp] + add r2, r1, r2 + mov r1, #0xc + add r3, r2, #0 + mul r3, r1 + add r1, r0, r3 + ldr r2, [r1, #8] + ldr r1, [r1, #4] + ldr r0, [r0, r3] + str r0, [r4, #0] + str r1, [r4, #4] + str r2, [r4, #8] + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x114 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02235440: .word 0x0223A260 +_02235444: .word 0x00000908 + thumb_func_end ov12_022353CC + + thumb_func_start ov12_02235448 +ov12_02235448: ; 0x02235448 + push {r3, r4, lr} + sub sp, #4 + mov r4, #0 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02235448 + + thumb_func_start ov12_02235458 +ov12_02235458: ; 0x02235458 + push {r3, r4, lr} + sub sp, #4 + mov r4, #1 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02235458 + + thumb_func_start ov12_02235468 +ov12_02235468: ; 0x02235468 + push {r3, r4, lr} + sub sp, #4 + mov r4, #2 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02235468 + + thumb_func_start ov12_02235478 +ov12_02235478: ; 0x02235478 + push {r3, r4, lr} + sub sp, #4 + mov r4, #3 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02235478 + + thumb_func_start ov12_02235488 +ov12_02235488: ; 0x02235488 + push {r3, r4, lr} + sub sp, #4 + mov r4, #4 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02235488 + + thumb_func_start ov12_02235498 +ov12_02235498: ; 0x02235498 + push {r3, r4, lr} + sub sp, #4 + mov r4, #5 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02235498 + + thumb_func_start ov12_022354A8 +ov12_022354A8: ; 0x022354A8 + push {r3, r4, lr} + sub sp, #4 + mov r4, #6 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_022354A8 + + thumb_func_start ov12_022354B8 +ov12_022354B8: ; 0x022354B8 + push {r3, r4, lr} + sub sp, #4 + mov r4, #7 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_022354B8 + + thumb_func_start ov12_022354C8 +ov12_022354C8: ; 0x022354C8 + push {r3, r4, lr} + sub sp, #4 + mov r4, #8 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_022354C8 + + thumb_func_start ov12_022354D8 +ov12_022354D8: ; 0x022354D8 + push {r3, r4, lr} + sub sp, #4 + mov r4, #9 + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_022354D8 + + thumb_func_start ov12_022354E8 +ov12_022354E8: ; 0x022354E8 + push {r3, r4, lr} + sub sp, #4 + mov r4, #0xa + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_022354E8 + + thumb_func_start ov12_022354F8 +ov12_022354F8: ; 0x022354F8 + push {r3, r4, lr} + sub sp, #4 + mov r4, #0xb + str r4, [sp] + bl ov12_022353CC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_022354F8 + + thumb_func_start ov12_02235508 +ov12_02235508: ; 0x02235508 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235448 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235508 + + thumb_func_start ov12_02235538 +ov12_02235538: ; 0x02235538 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235458 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235538 + + thumb_func_start ov12_02235568 +ov12_02235568: ; 0x02235568 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235468 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235568 + + thumb_func_start ov12_02235598 +ov12_02235598: ; 0x02235598 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235478 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235598 + + thumb_func_start ov12_022355C8 +ov12_022355C8: ; 0x022355C8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235488 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022355C8 + + thumb_func_start ov12_022355F8 +ov12_022355F8: ; 0x022355F8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_02235498 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022355F8 + + thumb_func_start ov12_02235628 +ov12_02235628: ; 0x02235628 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_022354A8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235628 + + thumb_func_start ov12_02235658 +ov12_02235658: ; 0x02235658 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_022354B8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235658 + + thumb_func_start ov12_02235688 +ov12_02235688: ; 0x02235688 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_022354C8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235688 + + thumb_func_start ov12_022356B8 +ov12_022356B8: ; 0x022356B8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_022354D8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022356B8 + + thumb_func_start ov12_022356E8 +ov12_022356E8: ; 0x022356E8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_022354E8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022356E8 + + thumb_func_start ov12_02235718 +ov12_02235718: ; 0x02235718 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov12_02220250 + bl sub_02014790 + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov12_02235254 + add r5, r0, #0 + add r0, r4, #0 + bl ov12_0221FDD4 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov12_022354F8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_02235718 + + thumb_func_start ov12_02235748 +ov12_02235748: ; 0x02235748 + mov r2, #0 + ldr r1, _02235754 ; =0x000068D0 + str r2, [r0, #0] + str r1, [r0, #4] + str r2, [r0, #8] + bx lr + ; .align 2, 0 +_02235754: .word 0x000068D0 + thumb_func_end ov12_02235748 + + thumb_func_start ov12_02235758 +ov12_02235758: ; 0x02235758 + push {r3, lr} + bl ov12_02235448 + pop {r3, pc} + thumb_func_end ov12_02235758 + + thumb_func_start ov12_02235760 +ov12_02235760: ; 0x02235760 + push {r3, lr} + add r3, r1, #0 + cmp r0, #0 + bne _02235770 + add r0, r3, #0 + bl sub_02014770 + pop {r3, pc} +_02235770: + ldr r2, _0223577C ; =0x0223A224 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + pop {r3, pc} + ; .align 2, 0 +_0223577C: .word 0x0223A224 + thumb_func_end ov12_02235760 + + thumb_func_start ov12_02235780 +ov12_02235780: ; 0x02235780 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0 + mvn r1, r1 + add r4, r2, #0 + cmp r5, r1 + bne _02235790 + mov r5, #0x1a +_02235790: + mov r1, #0 + mvn r1, r1 + cmp r4, r1 + bne _0223579A + mov r4, #5 +_0223579A: + mov r1, #2 + bl ov12_022233EC + mov r1, #1 + add r2, r1, #0 + lsl r2, r0 + orr r2, r1 + ldr r0, _022357B8 ; =0x04000050 + mov r1, #0 + add r3, r5, #0 + str r4, [sp] + bl sub_020BF55C + pop {r3, r4, r5, pc} + nop +_022357B8: .word 0x04000050 + thumb_func_end ov12_02235780 + + thumb_func_start ov12_022357BC +ov12_022357BC: ; 0x022357BC + push {r3, r4, r5, lr} + mov r0, #0 + add r4, r2, #0 + mvn r0, r0 + add r5, r1, #0 + cmp r4, r0 + bne _022357CC + mov r4, #0x1a +_022357CC: + mov r0, #0 + mvn r0, r0 + cmp r3, r0 + bne _022357D6 + mov r3, #5 +_022357D6: + ldr r0, _022357E8 ; =0x04000050 + str r3, [sp] + mov r1, #0 + add r2, r5, #0 + add r3, r4, #0 + bl sub_020BF55C + pop {r3, r4, r5, pc} + nop +_022357E8: .word 0x04000050 + thumb_func_end ov12_022357BC + + thumb_func_start ov12_022357EC +ov12_022357EC: ; 0x022357EC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0 + add r5, r1, #0 + mvn r0, r0 + add r4, r2, #0 + cmp r5, r0 + bne _022357FE + mov r5, #0x1a +_022357FE: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _02235808 + mov r4, #5 +_02235808: + add r0, r6, #0 + mov r1, #2 + bl ov12_022233EC + mov r1, #1 + add r2, r1, #0 + lsl r2, r0 + mov r0, #0x11 + add r7, r2, #0 + orr r7, r0 + add r0, r6, #0 + bl ov12_022233EC + mov r1, #1 + lsl r1, r0 + ldr r0, _02235834 ; =0x04000050 + add r2, r7, #0 + add r3, r5, #0 + str r4, [sp] + bl sub_020BF55C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02235834: .word 0x04000050 + thumb_func_end ov12_022357EC + + thumb_func_start ov12_02235838 +ov12_02235838: ; 0x02235838 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #0 + bne _0223588C + mov r1, #1 + bl ov12_022233EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_022233EC + add r7, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov12_022233EC + add r2, r0, #0 + mov r0, #1 + add r3, r0, #0 + add r1, r0, #0 + lsl r3, r7 + lsl r0, r2 + lsl r1, r6 + orr r0, r3 + orr r1, r0 + mov r0, #0x11 + add r2, r1, #0 + orr r2, r0 + ldr r0, _0223590C ; =0x04000048 + ldrh r1, [r0] + mov r0, #0x3f + bic r1, r0 + orr r1, r2 + cmp r4, #0 + beq _02235886 + mov r0, #0x20 + orr r1, r0 +_02235886: + ldr r0, _0223590C ; =0x04000048 + strh r1, [r0] + b _022358D6 +_0223588C: + mov r1, #1 + bl ov12_022233EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl ov12_022233EC + add r7, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov12_022233EC + add r2, r0, #0 + mov r0, #1 + add r3, r0, #0 + add r1, r0, #0 + lsl r0, r2 + lsl r3, r7 + lsl r1, r6 + orr r0, r3 + orr r1, r0 + ldr r2, _0223590C ; =0x04000048 + add r3, r1, #0 + mov r0, #0x11 + orr r3, r0 + ldrh r1, [r2] + ldr r0, _02235910 ; =0xFFFFC0FF + and r1, r0 + lsl r0, r3, #8 + orr r1, r0 + cmp r4, #0 + beq _022358D2 + lsr r0, r2, #0xd + orr r1, r0 +_022358D2: + ldr r0, _0223590C ; =0x04000048 + strh r1, [r0] +_022358D6: + add r0, r5, #0 + mov r1, #0 + bl ov12_022233EC + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov12_022233EC + mov r1, #1 + add r2, r1, #0 + lsl r1, r0 + lsl r2, r4 + orr r1, r2 + add r3, r1, #0 + ldr r1, _02235914 ; =0x0400004A + mov r0, #0x11 + orr r3, r0 + ldrh r2, [r1] + mov r0, #0x3f + bic r2, r0 + orr r2, r3 + mov r0, #0x20 + orr r0, r2 + strh r0, [r1] + pop {r3, r4, r5, r6, r7, pc} + nop +_0223590C: .word 0x04000048 +_02235910: .word 0xFFFFC0FF +_02235914: .word 0x0400004A + thumb_func_end ov12_02235838 + + thumb_func_start ov12_02235918 +ov12_02235918: ; 0x02235918 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _0223592A + mov r0, #0 + strh r0, [r4] + strh r0, [r4, #2] + pop {r3, r4, r5, pc} +_0223592A: + bl sub_02008B38 + cmp r0, #0 + bne _0223593A + mov r0, #0 + strh r0, [r4] + strh r0, [r4, #2] + pop {r3, r4, r5, pc} +_0223593A: + add r0, r5, #0 + mov r1, #0 + bl sub_020080C0 + strh r0, [r4] + add r0, r5, #0 + mov r1, #1 + bl sub_020080C0 + strh r0, [r4, #2] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02235918 + + thumb_func_start ov12_02235950 +ov12_02235950: ; 0x02235950 + ldr r3, _02235958 ; =sub_0200D550 + add r2, r1, #2 + bx r3 + nop +_02235958: .word sub_0200D550 + thumb_func_end ov12_02235950 + + thumb_func_start ov12_0223595C +ov12_0223595C: ; 0x0223595C + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0 + strb r1, [r4] + strb r1, [r4, #1] + strb r1, [r4, #2] + add r5, r0, #0 + strb r1, [r4, #3] + str r5, [r4, #4] + bl ov12_02220308 + str r0, [r4, #8] + add r0, r5, #0 + bl ov12_022202EC + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov12_02220300 + str r0, [r4, #0x10] + add r0, r5, #0 + bl ov12_02220278 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov12_0222332C + str r0, [r4, #0x18] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_0223595C + + thumb_func_start ov12_02235998 +ov12_02235998: ; 0x02235998 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + add r4, r3, #0 + mov r1, #0 + str r1, [r4, #0] + mov r1, #0x40 + and r1, r7 + add r6, r0, #0 + add r5, r2, #0 + cmp r1, #0x40 + beq _022359B2 + b _02235AD4 +_022359B2: + bl ov12_02220240 + add r7, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + cmp r0, #0 + beq _022359F4 + str r7, [r1, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_022359F4: + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022352AC + str r0, [sp, #4] + ldr r1, [sp, #4] + add r0, r6, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + ldr r1, [r0, #8] + cmp r1, #0 + beq _02235A3C + ldr r1, [sp, #4] + str r1, [r0, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235A3C: + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022232B8 + bl ov12_02235310 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_02235288 + add r7, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + cmp r0, #0 + beq _02235A8E + str r7, [r1, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235A8E: + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022352AC + add r7, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022232FC + ldr r2, [r4, #0] + mov r1, #0x14 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + str r0, [r2, #8] + ldr r0, [r4, #0] + add r2, r0, #0 + mul r2, r1 + add r2, r5, r2 + ldr r0, [r2, #8] + cmp r0, #0 + beq _02235BB6 + str r7, [r2, #0x10] + ldr r0, [r4, #0] + mul r1, r0 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02235AD4: + mov r1, #0x20 + and r1, r7 + cmp r1, #0x20 + bne _02235BD4 + bl ov12_02220240 + add r7, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022352AC + str r0, [sp, #8] + cmp r0, r7 + beq _02235B2E + ldr r1, [sp, #8] + add r0, r6, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + ldr r1, [r0, #8] + cmp r1, #0 + beq _02235B2E + ldr r1, [sp, #8] + str r1, [r0, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235B2E: + add r0, r6, #0 + add r1, r7, #0 + bl ov12_022232B8 + bl ov12_02235310 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_02235288 + str r0, [sp] + cmp r0, r7 + beq _02235B86 + ldr r1, [sp] + add r0, r6, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + ldr r1, [r0, #8] + cmp r1, #0 + beq _02235B86 + ldr r1, [sp] + str r1, [r0, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235B86: + ldr r1, [sp] + add r0, r6, #0 + bl ov12_022352AC + str r0, [sp, #0xc] + cmp r0, r7 + beq _02235BB6 + ldr r1, [sp, #0xc] + add r0, r6, #0 + bl ov12_022232FC + ldr r2, [r4, #0] + mov r1, #0x14 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + str r0, [r2, #8] + ldr r0, [r4, #0] + add r2, r0, #0 + mul r2, r1 + add r2, r5, r2 + ldr r0, [r2, #8] + cmp r0, #0 + bne _02235BB8 +_02235BB6: + b _02235D6E +_02235BB8: + ldr r0, [sp, #0xc] + str r0, [r2, #0x10] + ldr r0, [r4, #0] + mul r1, r0 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02235BD4: + mov r1, #2 + and r1, r7 + cmp r1, #2 + bne _02235C2E + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + ldr r0, [r0, #8] + cmp r0, #0 + beq _02235C2E + add r0, r6, #0 + bl ov12_02220240 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235C2E: + add r0, r6, #0 + bl ov12_02223364 + cmp r0, #1 + bne _02235CA4 + mov r0, #4 + and r0, r7 + cmp r0, #4 + bne _02235CA4 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022352AC + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + ldr r0, [r0, #8] + cmp r0, #0 + beq _02235CA4 + add r0, r6, #0 + bl ov12_02220240 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022352AC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235CA4: + mov r0, #8 + and r0, r7 + cmp r0, #8 + bne _02235D00 + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232FC + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #8] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + ldr r0, [r0, #8] + cmp r0, #0 + beq _02235D00 + add r0, r6, #0 + bl ov12_02220248 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #0x10] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235D00: + add r0, r6, #0 + bl ov12_02223364 + cmp r0, #1 + bne _02235D6E + mov r0, #0x10 + and r0, r7 + cmp r0, #0x10 + bne _02235D6E + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022352AC + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022232FC + ldr r2, [r4, #0] + mov r1, #0x14 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + str r0, [r2, #8] + ldr r0, [r4, #0] + mul r1, r0 + add r0, r5, r1 + ldr r0, [r0, #8] + cmp r0, #0 + beq _02235D6E + add r0, r6, #0 + bl ov12_02220248 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022352AC + ldr r2, [r4, #0] + mov r1, #0x14 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + str r0, [r2, #0x10] + ldr r0, [r4, #0] + mul r1, r0 + add r1, r5, r1 + ldr r0, [r1, #8] + add r1, r1, #4 + bl ov12_02235918 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235D6E: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02235998 + + thumb_func_start ov12_02235D74 +ov12_02235D74: ; 0x02235D74 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r3, #0 + mov r1, #0 + str r1, [r4, #0] + mov r1, #2 + and r1, r6 + add r7, r0, #0 + add r5, r2, #0 + cmp r1, #2 + bne _02235DB4 + ldr r1, [r4, #0] + bl ov12_022202C0 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #0xc] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #0xc] + add r1, r1, #4 + bl ov12_02235950 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235DB4: + mov r0, #4 + and r0, r6 + cmp r0, #4 + bne _02235DE8 + ldr r1, [r4, #0] + add r0, r7, #0 + bl ov12_022202C0 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #0xc] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #0xc] + add r1, r1, #4 + bl ov12_02235950 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235DE8: + mov r0, #8 + and r0, r6 + cmp r0, #8 + bne _02235E1C + ldr r1, [r4, #0] + add r0, r7, #0 + bl ov12_022202C0 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r3, #0x14 + add r1, r0, #0 + mul r1, r3 + add r0, r5, r1 + str r2, [r0, #0xc] + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r3 + add r1, r5, r1 + ldr r0, [r1, #0xc] + add r1, r1, #4 + bl ov12_02235950 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235E1C: + mov r0, #0x10 + and r0, r6 + cmp r0, #0x10 + bne _02235E4C + ldr r1, [r4, #0] + add r0, r7, #0 + bl ov12_022202C0 + ldr r2, [r4, #0] + mov r1, #0x14 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + str r0, [r2, #0xc] + ldr r0, [r4, #0] + mul r1, r0 + add r1, r5, r1 + ldr r0, [r1, #0xc] + add r1, r1, #4 + bl ov12_02235950 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02235E4C: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02235D74 + + thumb_func_start ov12_02235E50 +ov12_02235E50: ; 0x02235E50 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r4, #0 + bne _02235E5E + bl sub_02022974 +_02235E5E: + add r0, r4, #0 + bl ov12_0221FDE4 + add r1, r5, #0 + bl sub_02018144 + add r4, r0, #0 + bne _02235E72 + bl sub_02022974 +_02235E72: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02235E50 + + thumb_func_start ov12_02235E80 +ov12_02235E80: ; 0x02235E80 + push {r4, lr} + add r4, r0, #0 + bne _02235E8A + bl sub_02022974 +_02235E8A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02235E80 + + .rodata + + + .global Unk_ov12_0223A218 +Unk_ov12_0223A218: ; 0x0223A218 + .incbin "incbin/overlay12_rodata.bin", 0x1C84, 0x1C90 - 0x1C84 + + .global Unk_ov12_0223A224 +Unk_ov12_0223A224: ; 0x0223A224 + .incbin "incbin/overlay12_rodata.bin", 0x1C90, 0x1C9C - 0x1C90 + + .global Unk_ov12_0223A230 +Unk_ov12_0223A230: ; 0x0223A230 + .incbin "incbin/overlay12_rodata.bin", 0x1C9C, 0x1CB4 - 0x1C9C + + .global Unk_ov12_0223A248 +Unk_ov12_0223A248: ; 0x0223A248 + .incbin "incbin/overlay12_rodata.bin", 0x1CB4, 0x1CCC - 0x1CB4 + + .global Unk_ov12_0223A260 +Unk_ov12_0223A260: ; 0x0223A260 + .incbin "incbin/overlay12_rodata.bin", 0x1CCC, 0x900 + diff --git a/asm/ov12_02235E94.s b/asm/ov12_02235E94.s new file mode 100644 index 000000000..eaba03bd2 --- /dev/null +++ b/asm/ov12_02235E94.s @@ -0,0 +1,4423 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02235E94 +ov12_02235E94: ; 0x02235E94 + cmp r0, #1 + blt _02235E9E + ldr r1, _02235EAC ; =0x00000113 + cmp r0, r1 + ble _02235EA2 +_02235E9E: + mov r0, #4 + b _02235EA8 +_02235EA2: + cmp r0, #0xff + blt _02235EA8 + sub r0, #0xff +_02235EA8: + sub r0, r0, #1 + bx lr + ; .align 2, 0 +_02235EAC: .word 0x00000113 + thumb_func_end ov12_02235E94 + + thumb_func_start ov12_02235EB0 +ov12_02235EB0: ; 0x02235EB0 + push {r3, r4, r5} + sub sp, #0x2c + ldr r5, _02235EEC ; =0x0223AC0C + add r2, r0, #0 + add r4, sp, #0 + mov r3, #5 +_02235EBC: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _02235EBC + ldr r0, [r5, #0] + str r0, [r4, #0] + mov r0, #0 + add r3, r0, #0 + add r4, sp, #0 +_02235ECE: + ldr r1, [r4, #0] + cmp r2, r1 + bne _02235EDC + add sp, #0x2c + mov r0, #1 + pop {r3, r4, r5} + bx lr +_02235EDC: + add r3, r3, #1 + add r4, r4, #4 + cmp r3, #0xb + blo _02235ECE + add sp, #0x2c + pop {r3, r4, r5} + bx lr + nop +_02235EEC: .word 0x0223AC0C + thumb_func_end ov12_02235EB0 + + thumb_func_start ov12_02235EF0 +ov12_02235EF0: ; 0x02235EF0 + push {r4, r5} + sub sp, #0x18 + ldr r3, _02235F28 ; =0x0223AB6C + add r2, sp, #0 + add r5, r0, #0 + add r4, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0 + add r2, r0, #0 +_02235F0C: + ldr r1, [r4, #0] + cmp r5, r1 + bne _02235F1A + add sp, #0x18 + mov r0, #1 + pop {r4, r5} + bx lr +_02235F1A: + add r2, r2, #1 + add r4, r4, #4 + cmp r2, #6 + blo _02235F0C + add sp, #0x18 + pop {r4, r5} + bx lr + ; .align 2, 0 +_02235F28: .word 0x0223AB6C + thumb_func_end ov12_02235EF0 + + thumb_func_start ov12_02235F2C +ov12_02235F2C: ; 0x02235F2C + push {r3, r4, r5} + sub sp, #0xc + ldr r5, _02235F60 ; =0x0223AB60 + add r3, r0, #0 + ldmia r5!, {r0, r1} + add r4, sp, #0 + add r2, r4, #0 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r4, #0] + mov r0, #1 + mov r4, #0 +_02235F44: + ldr r1, [r2, #0] + cmp r3, r1 + bne _02235F52 + add sp, #0xc + mov r0, #0 + pop {r3, r4, r5} + bx lr +_02235F52: + add r4, r4, #1 + add r2, r2, #4 + cmp r4, #3 + blo _02235F44 + add sp, #0xc + pop {r3, r4, r5} + bx lr + ; .align 2, 0 +_02235F60: .word 0x0223AB60 + thumb_func_end ov12_02235F2C + + thumb_func_start ov12_02235F64 +ov12_02235F64: ; 0x02235F64 + push {r3, lr} + bl ov12_02235E94 + lsl r1, r0, #3 + ldr r0, _02235F74 ; =0x0223AD70 + ldr r0, [r0, r1] + pop {r3, pc} + nop +_02235F74: .word 0x0223AD70 + thumb_func_end ov12_02235F64 + + thumb_func_start ov12_02235F78 +ov12_02235F78: ; 0x02235F78 + push {r3, lr} + bl ov12_02235E94 + lsl r1, r0, #3 + ldr r0, _02235F88 ; =0x0223AD74 + ldr r0, [r0, r1] + pop {r3, pc} + nop +_02235F88: .word 0x0223AD74 + thumb_func_end ov12_02235F78 + + thumb_func_start ov12_02235F8C +ov12_02235F8C: ; 0x02235F8C + push {r3, lr} + bl ov12_02235E94 + mov r1, #0xc + mul r1, r0 + ldr r0, _02235F9C ; =0x0223AE10 + ldr r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 +_02235F9C: .word 0x0223AE10 + thumb_func_end ov12_02235F8C + + thumb_func_start ov12_02235FA0 +ov12_02235FA0: ; 0x02235FA0 + push {r3, lr} + bl ov12_02235E94 + mov r1, #0xc + mul r1, r0 + ldr r0, _02235FB0 ; =0x0223AE18 + ldr r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 +_02235FB0: .word 0x0223AE18 + thumb_func_end ov12_02235FA0 + + thumb_func_start ov12_02235FB4 +ov12_02235FB4: ; 0x02235FB4 + push {r3, lr} + bl ov12_02235E94 + mov r1, #0xc + mul r1, r0 + ldr r0, _02235FC4 ; =0x0223AE14 + ldr r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 +_02235FC4: .word 0x0223AE14 + thumb_func_end ov12_02235FB4 + + thumb_func_start ov12_02235FC8 +ov12_02235FC8: ; 0x02235FC8 + push {r4, lr} + add r4, r1, #0 + bl ov12_02235E94 + lsl r2, r0, #4 + ldr r0, _02235FDC ; =0x0223AF00 + lsl r1, r4, #2 + add r0, r0, r2 + ldr r0, [r1, r0] + pop {r4, pc} + ; .align 2, 0 +_02235FDC: .word 0x0223AF00 + thumb_func_end ov12_02235FC8 + + thumb_func_start ov12_02235FE0 +ov12_02235FE0: ; 0x02235FE0 + push {r4, lr} + mov r1, #0xb8 + add r4, r0, #0 + bl sub_02018144 + cmp r0, #0 + bne _02235FF6 + bl sub_02022974 + mov r0, #0 + pop {r4, pc} +_02235FF6: + add r1, r0, #0 + str r4, [r0, #0] + mov r2, #0 + add r1, #0x88 + str r2, [r1, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02235FE0 + + thumb_func_start ov12_02236004 +ov12_02236004: ; 0x02236004 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl ov12_02235FE0 + add r1, r5, #0 + add r4, r0, #0 + bl ov12_02236030 + mov r1, #0 + str r1, [r4, #0x10] + add r2, r4, #0 + add r0, r1, #0 +_0223601C: + str r0, [r2, #0x14] + str r0, [r2, #0x38] + str r0, [r2, #0x5c] + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #9 + blt _0223601C + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02236004 + + thumb_func_start ov12_02236030 +ov12_02236030: ; 0x02236030 + push {r4, lr} + add r3, r1, #0 + add r4, r0, #0 + ldmia r3!, {r0, r1} + add r2, r4, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #0xa2 + str r0, [r2, #0] + ldr r0, [r4, #0xc] + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + cmp r0, #0xd + blt _0223605E + bl sub_02022974 +_0223605E: + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + cmp r0, #0 + bne _0223608A + add r0, r4, #0 + mov r2, #0 + add r0, #0x94 + str r2, [r0, #0] + ldr r0, [r4, #8] + cmp r0, #0 + beq _0223607C + add r4, #0x98 + str r0, [r4, #0] + pop {r4, pc} +_0223607C: + ldr r0, [r4, #0xc] + mov r1, #0x9b + bl sub_02074470 + add r4, #0x98 + str r0, [r4, #0] + pop {r4, pc} +_0223608A: + add r0, r4, #0 + mov r1, #1 + add r0, #0x94 + str r1, [r0, #0] + ldr r0, [r4, #0xc] + add r4, #0xa0 + mov r1, #0xab + add r2, r4, #0 + bl sub_02074470 + pop {r4, pc} + thumb_func_end ov12_02236030 + + thumb_func_start ov12_022360A0 +ov12_022360A0: ; 0x022360A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r1, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #3 + bls _022360B4 + b _0223631C +_022360B4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022360C0: ; jump table + .short _022360C8 - _022360C0 - 2 ; case 0 + .short _02236166 - _022360C0 - 2 ; case 1 + .short _022361F6 - _022360C0 - 2 ; case 2 + .short _02236286 - _022360C0 - 2 ; case 3 +_022360C8: + ldr r1, [r4, #0] + mov r0, #0x63 + bl sub_02006C24 + add r1, r4, #0 + add r1, #0x8c + str r0, [r1, #0] + add r0, r4, #0 + add r6, r4, #0 + str r0, [sp, #0x14] + add r0, #0xa0 + mov r5, #0 + add r6, #0x10 + str r0, [sp, #0x14] +_022360E4: + ldr r0, [sp, #0x14] + add r1, r5, #0 + bl sub_0202CA64 + add r7, r0, #0 + beq _02236150 + bl sub_0202CA7C + cmp r0, #0 + beq _02236150 + cmp r0, #0x51 + bge _02236150 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02098188 + str r0, [sp, #0x10] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + str r7, [r0, #0x38] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _0223611E + bl sub_02022974 +_0223611E: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [r4, #0] + ldr r2, [sp, #0x10] + mov r3, #0 + bl ov12_0222384C + ldr r1, [r4, #0x10] + lsl r1, r1, #2 + add r1, r4, r1 + str r0, [r1, #0x14] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _0223614A + bne _02236150 + bl sub_02022974 + b _02236150 +_0223614A: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] +_02236150: + add r5, r5, #1 + cmp r5, #2 + blt _022360E4 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r4, #0x90 + add r0, r0, #1 + add sp, #0x24 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_02236166: + add r0, r4, #0 + add r6, r4, #0 + str r0, [sp, #0x18] + add r0, #0xa0 + mov r5, #2 + add r6, #0x10 + str r0, [sp, #0x18] +_02236174: + ldr r0, [sp, #0x18] + add r1, r5, #0 + bl sub_0202CA64 + add r7, r0, #0 + beq _022361E0 + bl sub_0202CA7C + cmp r0, #0 + beq _022361E0 + cmp r0, #0x51 + bge _022361E0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02098188 + str r0, [sp, #4] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + str r7, [r0, #0x38] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _022361AE + bl sub_02022974 +_022361AE: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [r4, #0] + ldr r2, [sp, #4] + mov r3, #0 + bl ov12_0222384C + ldr r1, [r4, #0x10] + lsl r1, r1, #2 + add r1, r4, r1 + str r0, [r1, #0x14] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _022361DA + bne _022361E0 + bl sub_02022974 + b _022361E0 +_022361DA: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] +_022361E0: + add r5, r5, #1 + cmp r5, #4 + blt _02236174 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r4, #0x90 + add r0, r0, #1 + add sp, #0x24 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_022361F6: + add r0, r4, #0 + add r6, r4, #0 + str r0, [sp, #0x1c] + add r0, #0xa0 + mov r5, #4 + add r6, #0x10 + str r0, [sp, #0x1c] +_02236204: + ldr r0, [sp, #0x1c] + add r1, r5, #0 + bl sub_0202CA64 + add r7, r0, #0 + beq _02236270 + bl sub_0202CA7C + cmp r0, #0 + beq _02236270 + cmp r0, #0x51 + bge _02236270 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02098188 + str r0, [sp, #8] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + str r7, [r0, #0x38] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _0223623E + bl sub_02022974 +_0223623E: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [r4, #0] + ldr r2, [sp, #8] + mov r3, #0 + bl ov12_0222384C + ldr r1, [r4, #0x10] + lsl r1, r1, #2 + add r1, r4, r1 + str r0, [r1, #0x14] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _0223626A + bne _02236270 + bl sub_02022974 + b _02236270 +_0223626A: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] +_02236270: + add r5, r5, #1 + cmp r5, #6 + blt _02236204 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r4, #0x90 + add r0, r0, #1 + add sp, #0x24 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_02236286: + add r0, r4, #0 + add r6, r4, #0 + str r0, [sp, #0x20] + add r0, #0xa0 + mov r5, #6 + add r6, #0x10 + str r0, [sp, #0x20] +_02236294: + ldr r0, [sp, #0x20] + add r1, r5, #0 + bl sub_0202CA64 + add r7, r0, #0 + beq _02236300 + bl sub_0202CA7C + cmp r0, #0 + beq _02236300 + cmp r0, #0x51 + bge _02236300 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02098188 + str r0, [sp, #0xc] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + str r7, [r0, #0x38] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _022362CE + bl sub_02022974 +_022362CE: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [r4, #0] + ldr r2, [sp, #0xc] + mov r3, #0 + bl ov12_0222384C + ldr r1, [r4, #0x10] + lsl r1, r1, #2 + add r1, r4, r1 + str r0, [r1, #0x14] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _022362FA + bne _02236300 + bl sub_02022974 + b _02236300 +_022362FA: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] +_02236300: + add r5, r5, #1 + cmp r5, #8 + blt _02236294 + add r0, r4, #0 + mov r1, #0xff + add r0, #0x90 + add r4, #0x8c + str r1, [r0, #0] + ldr r0, [r4, #0] + bl sub_02006CA8 + ldr r0, [sp] + bl sub_0200DA58 +_0223631C: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov12_022360A0 + + thumb_func_start ov12_02236320 +ov12_02236320: ; 0x02236320 + push {r4, lr} + add r4, r0, #0 + add r0, #0x94 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02236350 + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + bl ov12_02235F64 + add r2, r0, #0 + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + mov r1, #0x63 + mov r3, #0 + bl ov12_02223818 + str r0, [r4, #0x14] + mov r0, #0xff + add r4, #0x90 + str r0, [r4, #0] + pop {r4, pc} +_02236350: + mov r1, #0 + add r0, r4, #0 + mov r2, #0xfa + str r1, [r4, #0x10] + add r0, #0x90 + str r1, [r0, #0] + ldr r0, _02236370 ; =ov12_022360A0 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + add r1, r4, #0 + bl ov12_022360A0 + pop {r4, pc} + nop +_02236370: .word ov12_022360A0 + thumb_func_end ov12_02236320 + + thumb_func_start ov12_02236374 +ov12_02236374: ; 0x02236374 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0xff + bne _02236380 + mov r0, #1 + bx lr +_02236380: + mov r0, #0 + bx lr + thumb_func_end ov12_02236374 + + thumb_func_start ov12_02236384 +ov12_02236384: ; 0x02236384 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r1, #1 + add r0, #0x88 + str r1, [r0, #0] + bl ov12_02220474 + add r0, r5, #0 + add r1, r4, #0 + bl ov12_0223646C + mov r2, #0xfa + ldr r0, _022363B0 ; =ov12_022363CC + add r1, r5, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + add r5, #0x84 + str r0, [r5, #0] + pop {r3, r4, r5, pc} + nop +_022363B0: .word ov12_022363CC + thumb_func_end ov12_02236384 + + thumb_func_start ov12_022363B4 +ov12_022363B4: ; 0x022363B4 + ldr r3, _022363BC ; =ov12_02236384 + ldr r1, _022363C0 ; =ov12_02236598 + bx r3 + nop +_022363BC: .word ov12_02236384 +_022363C0: .word ov12_02236598 + thumb_func_end ov12_022363B4 + + thumb_func_start ov12_022363C4 +ov12_022363C4: ; 0x022363C4 + add r0, #0x88 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_022363C4 + + thumb_func_start ov12_022363CC +ov12_022363CC: ; 0x022363CC + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + str r0, [sp] + ldr r0, [r6, #0x10] + mov r7, #0 + cmp r0, #9 + ble _022363DE + bl sub_02022974 +_022363DE: + ldr r0, [r6, #0x10] + mov r4, #0 + cmp r0, #0 + ble _02236416 + add r5, r6, #0 +_022363E8: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _0223640C + bl sub_02014710 + cmp r0, #0 + bne _0223640A + ldr r0, [r5, #0x5c] + cmp r0, #0 + beq _0223640A + ldr r0, [r5, #0x14] + bl ov12_02223894 + mov r0, #0 + str r0, [r5, #0x14] + str r0, [r5, #0x5c] + b _0223640C +_0223640A: + mov r7, #1 +_0223640C: + ldr r0, [r6, #0x10] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _022363E8 +_02236416: + cmp r7, #0 + bne _02236426 + mov r0, #0 + add r6, #0x88 + str r0, [r6, #0] + ldr r0, [sp] + bl sub_0200DA58 +_02236426: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022363CC + + thumb_func_start ov12_02236428 +ov12_02236428: ; 0x02236428 + ldr r3, _0223642C ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_0223642C: .word sub_020181C4 + thumb_func_end ov12_02236428 + + thumb_func_start ov12_02236430 +ov12_02236430: ; 0x02236430 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _02236464 + ldr r0, [r4, #0xc] + mov r1, #1 + str r1, [r0, #0] + ldr r0, [r4, #0x10] + ldr r2, [r4, #0x18] + mov r1, #0 + add r3, r4, #0 + bl sub_020146F4 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02014788 + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_02236464: + sub r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02236430 + + thumb_func_start ov12_0223646C +ov12_0223646C: ; 0x0223646C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r7, r1, #0 + cmp r0, #0 + bne _022364AA + add r0, r6, #0 + add r0, #0x98 + ldr r0, [r0, #0] + bl ov12_02235F78 + add r5, r0, #0 + mov r4, #0 + cmp r5, #0 + ble _0223649E +_0223648C: + ldr r0, [r6, #0x14] + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl sub_020146F4 + add r4, r4, #1 + cmp r4, r5 + blt _0223648C +_0223649E: + mov r1, #1 + str r1, [r6, #0x5c] + ldr r0, [r6, #0x14] + bl sub_02014788 + pop {r3, r4, r5, r6, r7, pc} +_022364AA: + ldr r0, [r6, #0x10] + mov r7, #0 + cmp r0, #0 + ble _02236510 + add r0, r6, #0 + str r0, [sp] + add r0, #0x5c + add r5, r6, #0 + str r0, [sp] +_022364BC: + ldr r0, [r6, #0] + mov r1, #0x1c + bl sub_02018144 + add r4, r0, #0 + bne _022364CC + bl sub_02022974 +_022364CC: + str r7, [r4, #0] + ldr r0, [r6, #4] + str r0, [r4, #8] + ldr r0, _02236514 ; =ov12_022365D4 + str r0, [r4, #0x18] + mov r0, #0 + str r0, [r5, #0x5c] + ldr r0, [sp] + str r0, [r4, #0xc] + ldr r0, [r5, #0x14] + str r0, [r4, #0x10] + ldr r0, [r5, #0x38] + str r0, [r4, #0x14] + cmp r0, #0 + bne _022364EE + bl sub_02022974 +_022364EE: + ldr r0, [r4, #0x14] + bl ov12_02237EA0 + str r0, [r4, #4] + ldr r0, _02236518 ; =ov12_02236430 + ldr r2, _0223651C ; =0x000003E9 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r0, [sp] + add r7, r7, #1 + add r0, r0, #4 + str r0, [sp] + ldr r0, [r6, #0x10] + add r5, r5, #4 + cmp r7, r0 + blt _022364BC +_02236510: + pop {r3, r4, r5, r6, r7, pc} + nop +_02236514: .word ov12_022365D4 +_02236518: .word ov12_02236430 +_0223651C: .word 0x000003E9 + thumb_func_end ov12_0223646C + + thumb_func_start ov12_02236520 +ov12_02236520: ; 0x02236520 + push {r3, r4, r5, lr} + mov r2, #0 + mov r3, #1 + add r5, r0, #0 + add r4, r1, #0 + bl ov12_02235758 + cmp r5, #5 + bhi _02236576 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223653E: ; jump table + .short _0223654A - _0223653E - 2 ; case 0 + .short _02236552 - _0223653E - 2 ; case 1 + .short _0223655C - _0223653E - 2 ; case 2 + .short _02236564 - _0223653E - 2 ; case 3 + .short _0223656E - _0223653E - 2 ; case 4 + .short _02236576 - _0223653E - 2 ; case 5 +_0223654A: + mov r5, #0 + add r0, r5, #0 + sub r0, #0x10 + b _0223657E +_02236552: + mov r5, #0xe + mvn r5, r5 + add r0, r5, #0 + sub r0, #0xa + b _0223657E +_0223655C: + mov r5, #7 + mvn r5, r5 + sub r0, r5, #4 + b _0223657E +_02236564: + mov r5, #0xd + mvn r5, r5 + add r0, r5, #0 + sub r0, #0xb + b _0223657E +_0223656E: + mov r5, #7 + mvn r5, r5 + sub r0, r5, #4 + b _0223657E +_02236576: + mov r5, #0xf + mvn r5, r5 + add r0, r5, #0 + sub r0, #0xd +_0223657E: + add r5, #0xa + ldr r3, [r4, #0] + mov r1, #0xac + add r2, r5, #0 + mul r2, r1 + sub r2, r3, r2 + str r2, [r4, #0] + add r0, #0x20 + ldr r2, [r4, #4] + mul r1, r0 + sub r0, r2, r1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} + thumb_func_end ov12_02236520 + + thumb_func_start ov12_02236598 +ov12_02236598: ; 0x02236598 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl sub_02014764 + ldr r0, [r0, #4] + add r1, sp, #0 + bl ov12_02236520 + ldr r0, [r4, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r4, #0x30] + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02236598 + + thumb_func_start ov12_022365D4 +ov12_022365D4: ; 0x022365D4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02014764 + add r4, r0, #0 + ldr r0, [r4, #8] + add r1, sp, #0 + bl ov12_02236520 + ldr r0, [r4, #0x14] + bl sub_0202CA7C + bl sub_020981AC + ldr r0, [r4, #0x14] + bl sub_0202CA80 + add r6, r0, #0 + ldr r0, [r4, #0x14] + bl sub_0202CA84 + sub r6, #0xbe + lsl r1, r6, #0x10 + asr r3, r1, #0x10 + ldr r2, [sp] + mov r1, #0xac + add r4, r3, #0 + mul r4, r1 + add r3, r2, r4 + mov r4, #0x64 + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + ldr r2, [sp, #4] + mul r1, r0 + add r0, r2, r1 + str r3, [sp] + str r0, [sp, #4] + ldr r0, [r5, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r3, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov12_022365D4 + + thumb_func_start ov12_02236648 +ov12_02236648: ; 0x02236648 + push {r4, lr} + add r4, r0, #0 + bl sub_02014764 + mov r1, #2 + ldrsh r2, [r0, r1] + mov r1, #0x64 + mov r3, #0xac + sub r1, r1, r2 + lsl r1, r1, #0x10 + asr r2, r1, #0x10 + add r1, r2, #0 + mov r2, #0 + ldrsh r0, [r0, r2] + mul r1, r3 + sub r0, #0x81 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add r2, r0, #0 + ldr r0, [r4, #0x20] + mul r2, r3 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r2, r0 + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x20] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + str r0, [r4, #0x30] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02236648 + + thumb_func_start ov12_02236690 +ov12_02236690: ; 0x02236690 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + mov r1, #0x24 + bl sub_02018144 + add r4, r0, #0 + bne _022366A4 + bl sub_02022974 +_022366A4: + ldmia r5!, {r0, r1} + add r2, r4, #0 + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _022366C8 + ldr r0, _022366EC ; =0x00000113 + bl ov12_02235F8C + str r0, [r4, #0x20] + ldr r0, _022366EC ; =0x00000113 + bl ov12_02235FA0 + b _022366D6 +_022366C8: + ldr r0, [r4, #4] + bl ov12_02235F8C + str r0, [r4, #0x20] + ldr r0, [r4, #4] + bl ov12_02235FA0 +_022366D6: + str r0, [r4, #0x1c] + ldr r0, [r4, #8] + ldr r2, [r4, #0x20] + mov r1, #0x63 + mov r3, #0 + bl ov12_02223818 + str r0, [r4, #0x18] + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_022366EC: .word 0x00000113 + thumb_func_end ov12_02236690 + + thumb_func_start ov12_022366F0 +ov12_022366F0: ; 0x022366F0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r1, [r5, #0xc] + cmp r1, #0xff + bne _0223674A + ldr r0, [r5, #0x10] + cmp r0, #0 + beq _02236720 + ldr r0, [r5, #0x1c] + mov r4, #0 + cmp r0, #0 + ble _02236754 + ldr r6, _02236760 ; =ov12_02236648 +_0223670A: + ldr r0, [r5, #0x18] + add r1, r4, #0 + add r2, r6, #0 + add r3, r5, #0 + bl sub_020146F4 + ldr r0, [r5, #0x1c] + add r4, r4, #1 + cmp r4, r0 + blt _0223670A + b _02236754 +_02236720: + ldr r0, [r5, #0x1c] + mov r4, #0 + cmp r0, #0 + ble _02236754 + ldr r6, _02236760 ; =ov12_02236648 +_0223672A: + ldr r0, [r5, #4] + bl ov12_02235FB4 + cmp r4, r0 + beq _02236740 + ldr r0, [r5, #0x18] + add r1, r4, #0 + add r2, r6, #0 + add r3, r5, #0 + bl sub_020146F4 +_02236740: + ldr r0, [r5, #0x1c] + add r4, r4, #1 + cmp r4, r0 + blt _0223672A + b _02236754 +_0223674A: + ldr r0, [r5, #0x18] + ldr r2, _02236760 ; =ov12_02236648 + add r3, r5, #0 + bl sub_020146F4 +_02236754: + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_02014788 + pop {r4, r5, r6, pc} + nop +_02236760: .word ov12_02236648 + thumb_func_end ov12_022366F0 + + thumb_func_start ov12_02236764 +ov12_02236764: ; 0x02236764 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl sub_02014710 + cmp r0, #0 + bne _0223677C + ldr r0, [r4, #0x18] + bl ov12_02223894 + mov r0, #0 + pop {r4, pc} +_0223677C: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_02236764 + + thumb_func_start ov12_02236780 +ov12_02236780: ; 0x02236780 + ldr r3, _02236784 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_02236784: .word sub_020181C4 + thumb_func_end ov12_02236780 + + thumb_func_start ov12_02236788 +ov12_02236788: ; 0x02236788 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _0223679C + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #1 + bl ov12_02237828 +_0223679C: + add r0, r4, #0 + mov r1, #2 + bl ov12_0223782C + cmp r0, #1 + bne _022367AC + mov r0, #0 + pop {r4, pc} +_022367AC: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_02236788 + + thumb_func_start ov12_022367B0 +ov12_022367B0: ; 0x022367B0 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _022367C4 + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #3 + bl ov12_02237828 +_022367C4: + add r0, r4, #0 + mov r1, #4 + bl ov12_0223782C + cmp r0, #1 + bne _022367D4 + mov r0, #0 + pop {r4, pc} +_022367D4: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_022367B0 + + thumb_func_start ov12_022367D8 +ov12_022367D8: ; 0x022367D8 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _022367EC + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #5 + bl ov12_02237828 +_022367EC: + add r0, r4, #0 + mov r1, #6 + bl ov12_0223782C + cmp r0, #1 + bne _022367FC + mov r0, #0 + pop {r4, pc} +_022367FC: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_022367D8 + + thumb_func_start ov12_02236800 +ov12_02236800: ; 0x02236800 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _02236814 + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #7 + bl ov12_02237828 +_02236814: + add r0, r4, #0 + mov r1, #0xe + bl ov12_0223782C + cmp r0, #1 + bne _02236824 + mov r0, #0 + pop {r4, pc} +_02236824: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_02236800 + + thumb_func_start ov12_02236828 +ov12_02236828: ; 0x02236828 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _0223683C + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #0xf + bl ov12_02237828 +_0223683C: + add r0, r4, #0 + mov r1, #0x12 + bl ov12_0223782C + cmp r0, #1 + bne _0223684C + mov r0, #0 + pop {r4, pc} +_0223684C: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_02236828 + + thumb_func_start ov12_02236850 +ov12_02236850: ; 0x02236850 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _02236864 + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #0x13 + bl ov12_02237828 +_02236864: + add r0, r4, #0 + mov r1, #0x1b + bl ov12_0223782C + cmp r0, #1 + bne _02236874 + mov r0, #0 + pop {r4, pc} +_02236874: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_02236850 + + thumb_func_start ov12_02236878 +ov12_02236878: ; 0x02236878 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _0223688C + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #0x15 + bl ov12_02237828 +_0223688C: + add r0, r4, #0 + mov r1, #0x16 + bl ov12_0223782C + cmp r0, #1 + bne _0223689C + mov r0, #0 + pop {r4, pc} +_0223689C: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_02236878 + + thumb_func_start ov12_022368A0 +ov12_022368A0: ; 0x022368A0 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _022368B4 + add r1, r1, #1 + str r1, [r4, #4] + mov r1, #0x17 + bl ov12_02237828 +_022368B4: + add r0, r4, #0 + mov r1, #0x1b + bl ov12_0223782C + cmp r0, #1 + bne _022368C4 + mov r0, #0 + pop {r4, pc} +_022368C4: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_022368A0 + + thumb_func_start ov12_022368C8 +ov12_022368C8: ; 0x022368C8 + str r1, [r0, #0] + mov r1, #0 + str r1, [r0, #4] + bx lr + thumb_func_end ov12_022368C8 + + thumb_func_start ov12_022368D0 +ov12_022368D0: ; 0x022368D0 + push {r3, lr} + ldr r1, [r0, #0] + lsl r2, r1, #2 + ldr r1, _022368E0 ; =0x0223AB9C + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + nop +_022368E0: .word 0x0223AB9C + thumb_func_end ov12_022368D0 + + thumb_func_start ov12_022368E4 +ov12_022368E4: ; 0x022368E4 + str r1, [r0, #0x14] + mov r1, #0 + str r1, [r0, #8] + str r1, [r0, #0xc] + str r1, [r0, #0x10] + bx lr + thumb_func_end ov12_022368E4 + + thumb_func_start ov12_022368F0 +ov12_022368F0: ; 0x022368F0 + mov r0, #1 + bx lr + thumb_func_end ov12_022368F0 + + thumb_func_start ov12_022368F4 +ov12_022368F4: ; 0x022368F4 + push {r4, lr} + add r4, r0, #0 + bl ov12_02236F24 + cmp r0, #0 + bne _02236908 + add r0, r4, #0 + mov r1, #2 + bl ov12_022368E4 +_02236908: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_022368F4 + + thumb_func_start ov12_0223690C +ov12_0223690C: ; 0x0223690C + push {r3, lr} + mov r1, #3 + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_0223690C + + thumb_func_start ov12_02236918 +ov12_02236918: ; 0x02236918 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bhi _022369E8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02236930: ; jump table + .short _02236938 - _02236930 - 2 ; case 0 + .short _0223698E - _02236930 - 2 ; case 1 + .short _022369A4 - _02236930 - 2 ; case 2 + .short _022369C0 - _02236930 - 2 ; case 3 +_02236938: + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D364 + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + add r2, sp, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, sp, #0 + str r0, [sp, #8] + mov r0, #0xff + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0x30] + add r2, #2 + bl sub_0200D550 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xb4 + add r1, #0x94 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov12_02223764 + add r1, r4, #0 + add r1, #0xd8 + str r0, [r1, #0] + add r0, sp, #0 + bl ov12_02236690 + add r1, r4, #0 + add r1, #0xd0 + str r0, [r1, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022369F0 +_0223698E: + ldr r0, [r4, #0x30] + bl sub_0200D3E0 + cmp r0, #2 + blt _022369F0 + mov r0, #0 + str r0, [r4, #0x24] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022369F0 +_022369A4: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_022366F0 + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + bl ov12_02223770 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022369F0 +_022369C0: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_02236764 + cmp r0, #0 + bne _022369F0 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3CC + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_02236780 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022369F0 +_022369E8: + add r0, r4, #0 + mov r1, #4 + bl ov12_022368E4 +_022369F0: + mov r0, #1 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02236918 + + thumb_func_start ov12_022369F8 +ov12_022369F8: ; 0x022369F8 + mov r0, #1 + bx lr + thumb_func_end ov12_022369F8 + + thumb_func_start ov12_022369FC +ov12_022369FC: ; 0x022369FC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0xc] + cmp r1, #0 + bne _02236A3C + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0xb8 + add r2, #0xba + bl sub_0200D550 + add r0, r4, #0 + mov r1, #0x3c + add r0, #0xbc + strh r1, [r0] + add r0, r4, #0 + mov r1, #0xb4 + add r0, #0xbe + strh r1, [r0] + add r0, r4, #0 + mov r1, #0xa + add r0, #0xc0 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0xc + add r0, #0xc8 + str r1, [r0, #0] + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _02236A4C +_02236A3C: + bl ov12_02236F24 + cmp r0, #0 + bne _02236A4C + add r0, r4, #0 + mov r1, #6 + bl ov12_022368E4 +_02236A4C: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov12_022369FC + + thumb_func_start ov12_02236A50 +ov12_02236A50: ; 0x02236A50 + mov r0, #1 + bx lr + thumb_func_end ov12_02236A50 + + thumb_func_start ov12_02236A54 +ov12_02236A54: ; 0x02236A54 + push {r3, lr} + mov r1, #8 + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236A54 + + thumb_func_start ov12_02236A60 +ov12_02236A60: ; 0x02236A60 + push {r3, lr} + mov r1, #9 + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236A60 + + thumb_func_start ov12_02236A6C +ov12_02236A6C: ; 0x02236A6C + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02236A7E + cmp r0, #1 + beq _02236AB2 + b _02236AF4 +_02236A7E: + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xc + str r0, [sp, #4] + ldr r0, _02236B10 ; =0x0000037F + mov r3, #1 + add r5, r3, #0 + str r0, [sp, #8] + add r0, r4, #0 + lsl r5, r2 + add r0, #0xb0 + lsl r2, r5, #0x10 + ldr r0, [r0, #0] + mov r1, #4 + lsr r2, r2, #0x10 + sub r3, r3, #2 + bl sub_02003178 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236B0A +_02236AB2: + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02236B0A + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r2, r0, #0 + mov r0, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02236B10 ; =0x0000037F + mov r3, #1 + add r5, r3, #0 + str r0, [sp, #8] + add r0, r4, #0 + lsl r5, r2 + add r0, #0xb0 + lsl r2, r5, #0x10 + ldr r0, [r0, #0] + mov r1, #4 + lsr r2, r2, #0x10 + sub r3, r3, #2 + bl sub_02003178 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236B0A +_02236AF4: + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02236B0A + add r0, r4, #0 + mov r1, #0xa + bl ov12_022368E4 +_02236B0A: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02236B10: .word 0x0000037F + thumb_func_end ov12_02236A6C + + thumb_func_start ov12_02236B14 +ov12_02236B14: ; 0x02236B14 + push {r3, lr} + mov r1, #0xb + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236B14 + + thumb_func_start ov12_02236B20 +ov12_02236B20: ; 0x02236B20 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02236B32 + cmp r0, #1 + beq _02236B72 + b _02236B8E +_02236B32: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #1 + blt _02236B8E + add r1, sp, #8 + ldr r0, [r4, #0x30] + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + add r1, sp, #8 + mov r0, #0 + ldrsh r3, [r1, r0] + mov r0, #2 + ldrsh r1, [r1, r0] + add r0, r3, #0 + add r0, #0x20 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x48 + add r2, r1, #0 + bl ov12_02225BC8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236B8E +_02236B72: + add r0, r4, #0 + ldr r1, [r4, #0x30] + add r0, #0x48 + bl ov12_02225C50 + cmp r0, #0 + bne _02236B8E + ldr r0, [r4, #8] + mov r1, #0xd + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + bl ov12_022368E4 +_02236B8E: + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov12_02236B20 + + thumb_func_start ov12_02236B94 +ov12_02236B94: ; 0x02236B94 + mov r0, #1 + bx lr + thumb_func_end ov12_02236B94 + + thumb_func_start ov12_02236B98 +ov12_02236B98: ; 0x02236B98 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r1, [r5, #8] + cmp r1, #0 + beq _02236BA8 + cmp r1, #1 + beq _02236BBE + b _02236C1E +_02236BA8: + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #0 + bl sub_0200D3CC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02236BBE: + ldr r1, [r5, #0xc] + mov r0, #6 + add r2, r1, #0 + mul r2, r0 + ldr r0, _02236C28 ; =0x0223ACF2 + ldr r1, _02236C2C ; =0x0223ACF4 + ldrsh r0, [r0, r2] + ldrh r1, [r1, r2] + str r0, [sp] + ldr r0, [r5, #0x30] + bl sub_0200D3CC + ldr r0, [r5, #0xc] + ldr r4, _02236C30 ; =0x0223ABE4 + add r0, r0, #1 + str r0, [r5, #0xc] + mov r6, #0 + mov r7, #0x75 +_02236BE2: + ldr r1, [r5, #0xc] + ldr r0, [r4, #0] + cmp r1, r0 + bne _02236BF6 + ldr r0, [r4, #4] + add r1, r7, #0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_02005728 +_02236BF6: + add r6, r6, #1 + add r4, #8 + cmp r6, #5 + blt _02236BE2 + ldr r0, [r5, #0xc] + cmp r0, #0x14 + bgt _02236C0A + ldr r0, [sp] + cmp r0, #0xff + bne _02236C12 +_02236C0A: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02236C24 +_02236C12: + ldr r0, [r5, #0x30] + ldr r2, [sp] + mov r1, #0 + bl sub_0200D5DC + b _02236C24 +_02236C1E: + mov r1, #0xe + bl ov12_022368E4 +_02236C24: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02236C28: .word 0x0223ACF2 +_02236C2C: .word 0x0223ACF4 +_02236C30: .word 0x0223ABE4 + thumb_func_end ov12_02236B98 + + thumb_func_start ov12_02236C34 +ov12_02236C34: ; 0x02236C34 + mov r0, #1 + bx lr + thumb_func_end ov12_02236C34 + + thumb_func_start ov12_02236C38 +ov12_02236C38: ; 0x02236C38 + push {r3, lr} + ldr r1, [r0, #0xc] + add r1, r1, #1 + str r1, [r0, #0xc] + cmp r1, #0xe + blt _02236C54 + ldr r1, [r0, #8] + add r1, r1, #1 + str r1, [r0, #8] + mov r1, #0 + str r1, [r0, #0xc] + mov r1, #0x10 + bl ov12_022368E4 +_02236C54: + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236C38 + + thumb_func_start ov12_02236C58 +ov12_02236C58: ; 0x02236C58 + push {r3, lr} + mov r1, #0x11 + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236C58 + + thumb_func_start ov12_02236C64 +ov12_02236C64: ; 0x02236C64 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + cmp r0, #0 + beq _02236C74 + cmp r0, #1 + beq _02236C84 + b _02236CEC +_02236C74: + ldr r0, [r5, #0x18] + cmp r0, #3 + blt _02236C7E + bl sub_02022974 +_02236C7E: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02236C84: + ldr r1, [r5, #0x18] + mov r0, #0x18 + add r3, r1, #0 + mul r3, r0 + ldr r0, _02236CF0 ; =0x0223AC38 + ldr r1, [r5, #0xc] + add r0, r0, r3 + lsl r2, r1, #1 + ldrsh r4, [r2, r0] + add r0, r1, #1 + str r0, [r5, #0xc] + cmp r0, #0xb + bgt _02236CA2 + cmp r4, #0xff + bne _02236CC2 +_02236CA2: + ldr r0, [r5, #8] + mov r1, #0 + add r0, r0, #1 + str r0, [r5, #8] + ldr r0, [r5, #0x18] + add r0, r0, #1 + str r0, [r5, #0x18] + ldr r0, [r5, #0x30] + bl sub_0200D79C + add r0, r5, #0 + mov r1, #0x12 + bl ov12_022368E4 + mov r0, #1 + pop {r3, r4, r5, pc} +_02236CC2: + cmp r0, #5 + bne _02236CCE + ldr r0, _02236CF4 ; =0x000005FE + mov r1, #0x75 + bl sub_02005728 +_02236CCE: + ldr r0, [r5, #0x30] + add r1, r4, #0 + mov r2, #0 + bl sub_0200D5DC + ldr r0, _02236CF8 ; =0x0001FFFE + mov r1, #0x5a + mul r0, r4 + lsl r1, r1, #2 + bl sub_020E1F6C + add r1, r0, #0 + ldr r0, [r5, #0x30] + bl sub_0200D7C0 +_02236CEC: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02236CF0: .word 0x0223AC38 +_02236CF4: .word 0x000005FE +_02236CF8: .word 0x0001FFFE + thumb_func_end ov12_02236C64 + + thumb_func_start ov12_02236CFC +ov12_02236CFC: ; 0x02236CFC + mov r0, #1 + bx lr + thumb_func_end ov12_02236CFC + + thumb_func_start ov12_02236D00 +ov12_02236D00: ; 0x02236D00 + push {r3, lr} + mov r1, #0x14 + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236D00 + + thumb_func_start ov12_02236D0C +ov12_02236D0C: ; 0x02236D0C + push {r3, lr} + mov r1, #0x1b + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236D0C + + thumb_func_start ov12_02236D18 +ov12_02236D18: ; 0x02236D18 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bhi _02236DEC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02236D30: ; jump table + .short _02236D38 - _02236D30 - 2 ; case 0 + .short _02236D6A - _02236D30 - 2 ; case 1 + .short _02236DB2 - _02236D30 - 2 ; case 2 + .short _02236DC4 - _02236D30 - 2 ; case 3 +_02236D38: + ldr r0, [r4, #0x30] + bl sub_0200D43C + mov r1, #0 + mov r3, #1 + add r2, r0, #0 + add r5, r3, #0 + lsl r5, r2 + lsl r2, r5, #0x10 + str r1, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + str r1, [sp, #8] + add r0, #0xb0 + ldr r0, [r0, #0] + mov r1, #4 + lsr r2, r2, #0x10 + sub r3, r3, #6 + bl sub_02003178 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236E02 +_02236D6A: + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02236E02 + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + add r1, r4, #0 + str r0, [sp, #0x10] + add r1, #0x94 + ldr r1, [r1, #0] + str r1, [sp, #0x14] + bl ov12_02235FB4 + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp, #0x1c] + add r2, sp, #0xc + ldr r0, [r4, #0x30] + add r1, sp, #0xc + add r2, #2 + bl sub_0200D550 + add r0, sp, #0xc + bl ov12_02236690 + add r1, r4, #0 + add r1, #0xd0 + str r0, [r1, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236E02 +_02236DB2: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_022366F0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236E02 +_02236DC4: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_02236764 + cmp r0, #0 + bne _02236E02 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3CC + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_02236780 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236E02 +_02236DEC: + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02236E02 + add r0, r4, #0 + mov r1, #0x16 + bl ov12_022368E4 +_02236E02: + mov r0, #1 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov12_02236D18 + + thumb_func_start ov12_02236E08 +ov12_02236E08: ; 0x02236E08 + mov r0, #1 + bx lr + thumb_func_end ov12_02236E08 + + thumb_func_start ov12_02236E0C +ov12_02236E0C: ; 0x02236E0C + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _02236E1E + cmp r1, #1 + beq _02236E50 + b _02236E64 +_02236E1E: + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r2, r0, #0 + mov r0, #0xa + str r0, [sp] + mov r0, #0 + mov r3, #1 + add r5, r3, #0 + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r4, #0 + lsl r5, r2 + add r0, #0xb0 + lsl r2, r5, #0x10 + ldr r0, [r0, #0] + mov r1, #4 + lsr r2, r2, #0x10 + sub r3, r3, #6 + bl sub_02003178 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236E6A +_02236E50: + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _02236E6A + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236E6A +_02236E64: + mov r1, #0x18 + bl ov12_022368E4 +_02236E6A: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov12_02236E0C + + thumb_func_start ov12_02236E70 +ov12_02236E70: ; 0x02236E70 + push {r3, lr} + mov r1, #0x19 + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236E70 + + thumb_func_start ov12_02236E7C +ov12_02236E7C: ; 0x02236E7C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _02236E8C + cmp r1, #1 + beq _02236E9A + b _02236EF2 +_02236E8C: + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D810 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02236E9A: + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _02236EC2 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x21 + strb r1, [r0] + b _02236EDE +_02236EC2: + add r0, r4, #0 + mov r1, #0 + add r0, #0x20 + strb r1, [r0] + add r0, r4, #0 + mov r2, #0xf + add r0, #0x21 + strb r2, [r0] + ldr r0, [r4, #0x30] + bl sub_0200D3F4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02236EDE: + add r0, r4, #0 + add r0, #0x20 + add r4, #0x21 + ldrb r1, [r0] + ldrb r0, [r4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02236EFC ; =0x04000052 + strh r1, [r0] + b _02236EF8 +_02236EF2: + mov r1, #0x1a + bl ov12_022368E4 +_02236EF8: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_02236EFC: .word 0x04000052 + thumb_func_end ov12_02236E7C + + thumb_func_start ov12_02236F00 +ov12_02236F00: ; 0x02236F00 + push {r3, lr} + mov r1, #0x1b + bl ov12_022368E4 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov12_02236F00 + + thumb_func_start ov12_02236F0C +ov12_02236F0C: ; 0x02236F0C + mov r0, #0 + bx lr + thumb_func_end ov12_02236F0C + + thumb_func_start ov12_02236F10 +ov12_02236F10: ; 0x02236F10 + push {r3, lr} + ldr r1, [r0, #0x14] + lsl r2, r1, #2 + ldr r1, _02236F20 ; =0x0223AC80 + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + nop +_02236F20: .word 0x0223AC80 + thumb_func_end ov12_02236F10 + + thumb_func_start ov12_02236F24 +ov12_02236F24: ; 0x02236F24 + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bls _02236F32 + b _02237132 +_02236F32: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02236F3E: ; jump table + .short _02236F46 - _02236F3E - 2 ; case 0 + .short _02236FB4 - _02236F3E - 2 ; case 1 + .short _022370AE - _02236F3E - 2 ; case 2 + .short _02237112 - _02236F3E - 2 ; case 3 +_02236F46: + mov r0, #0xba + ldrsh r0, [r4, r0] + add r1, r4, #0 + mov r2, #0xb8 + str r0, [sp] + mov r0, #0xbe + ldrsh r0, [r4, r0] + mov r3, #0xbc + add r1, #0x6c + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + add r0, #0x48 + bl ov12_02225C98 + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EB0 + cmp r0, #1 + bne _0223709C + bl sub_0201D2E8 + mov r1, #0x14 + bl sub_020E1F6C + add r1, #0xa + ldr r0, [r4, #0x30] + lsl r1, r1, #0xd + bl sub_0200D7C0 + b _022371CE +_02236FB4: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EB0 + cmp r0, #1 + bne _02237052 + mov r1, #2 + ldr r0, [r4, #0x30] + lsl r1, r1, #0xc + bl sub_0200D7C0 + add r0, r4, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, #0xa + cmp r2, r0 + ble _02236FEE + mov r1, #2 + ldr r0, [r4, #0x30] + lsl r1, r1, #0xc + bl sub_0200D7C0 +_02236FEE: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EF0 + cmp r0, #1 + bne _02237052 + add r0, r4, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, #0xa + cmp r2, r0 + bne _02237052 + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + add r1, r4, #0 + lsl r3, r3, #0x14 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _022371D4 ; =0x0000FFFF + add r1, #0x94 + str r0, [sp, #0x14] + ldr r0, _022371D8 ; =0x000003EA + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov12_02226870 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] +_02237052: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #6 + blt _0223708A + cmp r0, #8 + bgt _0223708A + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r2, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + cmp r1, r2 + ble _0223708A + add r0, r2, #5 + cmp r1, r0 + blt _0223709C +_0223708A: + add r0, r4, #0 + add r1, r4, #0 + ldr r2, [r4, #0x30] + add r0, #0x48 + add r1, #0x6c + bl ov12_02225D2C + cmp r0, #0 + beq _0223709E +_0223709C: + b _022371CE +_0223709E: + add r0, r4, #0 + mov r1, #0 + bl ov12_02237E24 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022371CE +_022370AE: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EF0 + cmp r0, #1 + bne _022370E2 + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022370E2 + bl ov12_02226848 + cmp r0, #1 + beq _022371CE + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl ov12_02226858 + mov r0, #1 + str r0, [r4, #0x28] + add sp, #0x1c + mov r0, #0 + pop {r3, r4, pc} +_022370E2: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0xf + blt _022370F6 + mov r0, #1 + str r0, [r4, #0x28] + add sp, #0x1c + mov r0, #0 + pop {r3, r4, pc} +_022370F6: + add r0, r4, #0 + add r0, #0xa0 + ldr r1, [r0, #0] + ldr r0, _022371DC ; =0x00000111 + cmp r1, r0 + bne _0223710A + ldr r0, _022371E0 ; =0x000007E8 + mov r1, #0x75 + bl sub_02005728 +_0223710A: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022371CE +_02237112: + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D364 + add r0, r4, #0 + mov r1, #1 + bl ov12_02237E30 + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022371CE +_02237132: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #5 + bne _0223718C + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0xc + beq _02237188 + cmp r0, #0xd + beq _02237188 + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + add r1, r4, #0 + lsl r3, r3, #0x14 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _022371D4 ; =0x0000FFFF + add r1, #0x94 + str r0, [sp, #0x14] + ldr r0, _022371D8 ; =0x000003EA + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov12_02226870 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] +_02237188: + mov r0, #1 + str r0, [r4, #0x28] +_0223718C: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0xf + ble _022371CE + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0xc + beq _022371C8 + cmp r0, #0xd + beq _022371C8 + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl ov12_02226848 + cmp r0, #1 + beq _022371CE + add r4, #0xd4 + ldr r0, [r4, #0] + bl ov12_02226858 +_022371C8: + add sp, #0x1c + mov r0, #0 + pop {r3, r4, pc} +_022371CE: + mov r0, #1 + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_022371D4: .word 0x0000FFFF +_022371D8: .word 0x000003EA +_022371DC: .word 0x00000111 +_022371E0: .word 0x000007E8 + thumb_func_end ov12_02236F24 + + thumb_func_start ov12_022371E4 +ov12_022371E4: ; 0x022371E4 + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bls _022371F2 + b _022373DE +_022371F2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022371FE: ; jump table + .short _02237206 - _022371FE - 2 ; case 0 + .short _02237274 - _022371FE - 2 ; case 1 + .short _0223736E - _022371FE - 2 ; case 2 + .short _022373BE - _022371FE - 2 ; case 3 +_02237206: + mov r0, #0xba + ldrsh r0, [r4, r0] + add r1, r4, #0 + mov r2, #0xb8 + str r0, [sp] + mov r0, #0xbe + ldrsh r0, [r4, r0] + mov r3, #0xbc + add r1, #0x6c + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, r4, #0 + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + add r0, #0x48 + bl ov12_02225C98 + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EB0 + cmp r0, #1 + bne _0223735C + bl sub_0201D2E8 + mov r1, #0x14 + bl sub_020E1F6C + add r1, #0xa + ldr r0, [r4, #0x30] + lsl r1, r1, #0xd + bl sub_0200D7C0 + b _02237466 +_02237274: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EB0 + cmp r0, #1 + bne _02237312 + mov r1, #2 + ldr r0, [r4, #0x30] + lsl r1, r1, #0xc + bl sub_0200D7C0 + add r0, r4, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, #0xa + cmp r2, r0 + ble _022372AE + mov r1, #2 + ldr r0, [r4, #0x30] + lsl r1, r1, #0xc + bl sub_0200D7C0 +_022372AE: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EF0 + cmp r0, #1 + bne _02237312 + add r0, r4, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, #0xa + cmp r2, r0 + bne _02237312 + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + add r1, r4, #0 + lsl r3, r3, #0x14 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _0223746C ; =0x0000FFFF + add r1, #0x94 + str r0, [sp, #0x14] + ldr r0, _02237470 ; =0x000003EA + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov12_02226870 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] +_02237312: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #6 + blt _0223734A + cmp r0, #8 + bgt _0223734A + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r2, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + cmp r1, r2 + ble _0223734A + add r0, r2, #5 + cmp r1, r0 + blt _0223735C +_0223734A: + add r0, r4, #0 + add r1, r4, #0 + ldr r2, [r4, #0x30] + add r0, #0x48 + add r1, #0x6c + bl ov12_02225D2C + cmp r0, #0 + beq _0223735E +_0223735C: + b _02237466 +_0223735E: + add r0, r4, #0 + mov r1, #0 + bl ov12_02237E24 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237466 +_0223736E: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235EF0 + cmp r0, #1 + bne _022373A2 + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022373A2 + bl ov12_02226848 + cmp r0, #1 + beq _02237466 + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl ov12_02226858 + mov r0, #1 + str r0, [r4, #0x28] + add sp, #0x1c + mov r0, #0 + pop {r3, r4, pc} +_022373A2: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0xf + blt _022373B6 + mov r0, #1 + str r0, [r4, #0x28] + add sp, #0x1c + mov r0, #0 + pop {r3, r4, pc} +_022373B6: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237466 +_022373BE: + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D364 + add r0, r4, #0 + mov r1, #0 + bl ov12_02237E30 + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237466 +_022373DE: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #5 + bne _02237432 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_0200D3CC + ldr r0, [r4, #0x30] + bl sub_0200D43C + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + sub r0, #0x12 + str r0, [sp, #4] + mov r2, #2 + add r1, r4, #0 + lsl r3, r3, #0x14 + str r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0xe + str r0, [sp, #0x10] + ldr r0, _0223746C ; =0x0000FFFF + add r1, #0x94 + str r0, [sp, #0x14] + ldr r0, _02237470 ; =0x000003EA + lsr r3, r3, #0x10 + str r0, [sp, #0x18] + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov12_02226870 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] + mov r0, #1 + str r0, [r4, #0x28] +_02237432: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0xf + ble _02237466 + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl ov12_02226848 + cmp r0, #1 + beq _02237466 + add r4, #0xd4 + ldr r0, [r4, #0] + bl ov12_02226858 + add sp, #0x1c + mov r0, #0 + pop {r3, r4, pc} +_02237466: + mov r0, #1 + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_0223746C: .word 0x0000FFFF +_02237470: .word 0x000003EA + thumb_func_end ov12_022371E4 + + thumb_func_start ov12_02237474 +ov12_02237474: ; 0x02237474 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #7 + bls _02237482 + b _022375FA +_02237482: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223748E: ; jump table + .short _0223749E - _0223748E - 2 ; case 0 + .short _022374DC - _0223748E - 2 ; case 1 + .short _0223750C - _0223748E - 2 ; case 2 + .short _02237542 - _0223748E - 2 ; case 3 + .short _02237552 - _0223748E - 2 ; case 4 + .short _02237580 - _0223748E - 2 ; case 5 + .short _022375AE - _0223748E - 2 ; case 6 + .short _022375DC - _0223748E - 2 ; case 7 +_0223749E: + mov r1, #0 + bl ov12_02237E30 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D364 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #2 + blt _022374F2 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3CC + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_022374DC: + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #2 + bge _022374F4 +_022374F2: + b _02237600 +_022374F4: + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_0200D3CC + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_0223750C: + add r0, #0xa0 + ldr r0, [r0, #0] + add r2, sp, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, sp, #0 + str r0, [sp, #8] + mov r0, #0xff + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0x30] + add r2, #2 + bl sub_0200D550 + add r0, sp, #0 + bl ov12_02236690 + add r1, r4, #0 + add r1, #0xd0 + str r0, [r1, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_02237542: + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_022366F0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_02237552: + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #6 + blt _02237600 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_0200D3CC + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_02237580: + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #6 + blt _02237600 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D3CC + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_022375AE: + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #6 + blt _02237600 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3CC + add r0, r4, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_022375DC: + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_02236764 + cmp r0, #0 + bne _02237600 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl ov12_02236780 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237600 +_022375FA: + add sp, #0x14 + mov r0, #0 + pop {r3, r4, pc} +_02237600: + mov r0, #1 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02237474 + + thumb_func_start ov12_02237608 +ov12_02237608: ; 0x02237608 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02237618 + cmp r0, #1 + beq _0223764C + b _0223767E +_02237618: + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0223762E + ldr r1, _0223768C ; =0xFFFFE001 + add r0, r4, #0 + add r0, #0x34 + lsr r2, r1, #0x13 + mov r3, #0xa + bl ov12_02225D50 + b _0223763C +_0223762E: + add r0, r4, #0 + ldr r1, _02237690 ; =0x00001FFF + ldr r2, _0223768C ; =0xFFFFE001 + add r0, #0x34 + mov r3, #0xa + bl ov12_02225D50 +_0223763C: + ldr r1, [r4, #0x10] + mov r0, #1 + eor r0, r1 + str r0, [r4, #0x10] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237686 +_0223764C: + ldr r1, [r4, #0x34] + ldr r0, [r4, #0x30] + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0200D79C + add r0, r4, #0 + add r0, #0x34 + bl ov12_02225DA0 + cmp r0, #0 + bne _02237686 + ldr r0, [r4, #0xc] + cmp r0, #1 + blt _02237672 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237686 +_02237672: + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + b _02237686 +_0223767E: + mov r0, #0 + add r4, #0xc4 + str r0, [r4, #0] + pop {r4, pc} +_02237686: + mov r0, #1 + pop {r4, pc} + nop +_0223768C: .word 0xFFFFE001 +_02237690: .word 0x00001FFF + thumb_func_end ov12_02237608 + + thumb_func_start ov12_02237694 +ov12_02237694: ; 0x02237694 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0xff + bne _022376A6 + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_022376A6: + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _022376CA + add r1, sp, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r2, [r1, r0] + add r0, r4, #0 + add r0, #0xb8 + strh r2, [r0] + mov r0, #0 + ldrsh r0, [r1, r0] + add r4, #0xba + strh r0, [r4] +_022376CA: + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov12_02237694 + + thumb_func_start ov12_022376D0 +ov12_022376D0: ; 0x022376D0 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _02237722 + add r0, r4, #0 + add r0, #0xdc + ldr r0, [r0, #0] + cmp r0, #0 + ble _022376FA + add r0, r4, #0 + add r0, #0xdc + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xdc + str r1, [r0, #0] + ldr r0, [r4, #0x2c] + bl sub_0200C7EC + pop {r4, pc} +_022376FA: + add r1, #0x98 + ldr r1, [r1, #0] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02237724 ; =0x0223AB84 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + bne _02237710 + mov r0, #0 + str r0, [r4, #0x1c] +_02237710: + ldr r0, [r4, #0x24] + cmp r0, #1 + bne _0223771C + ldr r0, [r4, #0x30] + bl sub_0200D330 +_0223771C: + ldr r0, [r4, #0x2c] + bl sub_0200C7EC +_02237722: + pop {r4, pc} + ; .align 2, 0 +_02237724: .word 0x0223AB84 + thumb_func_end ov12_022376D0 + + thumb_func_start ov12_02237728 +ov12_02237728: ; 0x02237728 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + mov r1, #0xe0 + bl sub_02018144 + mov r1, #0 + mov r2, #0xe0 + add r4, r0, #0 + bl sub_020C4CF4 + cmp r4, #0 + bne _02237746 + bl sub_02022974 +_02237746: + add r3, r4, #0 + add r3, #0x90 + mov r2, #5 +_0223774C: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223774C + mov r0, #0 + str r0, [r4, #8] + str r0, [r4, #0x10] + str r0, [r4, #0xc] + str r0, [r4, #0x14] + str r0, [r4, #0x18] + str r0, [r4, #0] + str r0, [r4, #4] + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200C704 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #0 + add r0, #0xdc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov12_02235F2C + str r0, [r4, #0x24] + add r0, r4, #0 + mov r2, #0 + add r0, #0xc4 + str r2, [r0, #0] + add r0, r4, #0 + mov r1, #0x10 + add r0, #0x20 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x21 + strb r2, [r0] + bl ov12_02220474 + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r0, r0, #0x1f + sub r0, r0, r1 + mov r2, #0x1f + ror r0, r2 + add r0, r1, r0 + beq _022377BA + add r0, r4, #0 + mov r1, #1 + add r0, #0x22 + strb r1, [r0] + b _022377C2 +_022377BA: + add r0, r4, #0 + sub r2, #0x20 + add r0, #0x22 + strb r2, [r0] +_022377C2: + add r0, r4, #0 + bl ov12_02237C54 + add r0, r4, #0 + bl ov12_02237D8C + add r0, r4, #0 + bl ov12_022378A0 + mov r0, #1 + str r0, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0x28] + mov r2, #0xfa + ldr r0, _022377F4 ; =ov12_022376D0 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + add r1, r4, #0 + add r1, #0xcc + str r0, [r1, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_022377F4: .word ov12_022376D0 + thumb_func_end ov12_02237728 + + thumb_func_start ov12_022377F8 +ov12_022377F8: ; 0x022377F8 + push {r4, lr} + add r4, r0, #0 + bne _02237802 + bl sub_02022974 +_02237802: + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0223780C + mov r0, #1 + pop {r4, pc} +_0223780C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov12_022377F8 + + thumb_func_start ov12_02237810 +ov12_02237810: ; 0x02237810 + push {r4, lr} + add r4, r0, #0 + bne _0223781A + bl sub_02022974 +_0223781A: + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _02237824 + mov r0, #1 + pop {r4, pc} +_02237824: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov12_02237810 + + thumb_func_start ov12_02237828 +ov12_02237828: ; 0x02237828 + str r1, [r0, #0x14] + bx lr + thumb_func_end ov12_02237828 + + thumb_func_start ov12_0223782C +ov12_0223782C: ; 0x0223782C + ldr r0, [r0, #0x14] + cmp r0, r1 + bne _02237836 + mov r0, #1 + bx lr +_02237836: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov12_0223782C + + thumb_func_start ov12_0223783C +ov12_0223783C: ; 0x0223783C + push {r4, lr} + add r4, r0, #0 + bne _02237846 + bl sub_02022974 +_02237846: + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r4, #0x2c] + bl sub_0200D0B0 + ldr r0, [r4, #0x30] + bl sub_0200D0F4 + add r0, r4, #0 + add r0, #0xcc + ldr r0, [r0, #0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_0223783C + + thumb_func_start ov12_0223786C +ov12_0223786C: ; 0x0223786C + add r2, r0, #0 + add r0, #0x98 + str r1, [r0, #0] + mov r0, #0 + str r0, [r2, #8] + str r0, [r2, #0xc] + str r0, [r2, #0x10] + mov r0, #1 + add r1, r2, #0 + str r0, [r2, #0x1c] + ldr r0, [r2, #0x30] + ldr r3, _0223788C ; =sub_0200D550 + add r1, #0xb8 + add r2, #0xba + bx r3 + nop +_0223788C: .word sub_0200D550 + thumb_func_end ov12_0223786C + + thumb_func_start ov12_02237890 +ov12_02237890: ; 0x02237890 + push {r4, lr} + add r4, r0, #0 + bne _0223789A + bl sub_02022974 +_0223789A: + add r4, #0x98 + ldr r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov12_02237890 + + thumb_func_start ov12_022378A0 +ov12_022378A0: ; 0x022378A0 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0xb8 + add r2, #0xba + bl sub_0200D550 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0x11 + bls _022378BE + b _02237B0C +_022378BE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022378CA: ; jump table + .short _022378EE - _022378CA - 2 ; case 0 + .short _022378EE - _022378CA - 2 ; case 1 + .short _022378EE - _022378CA - 2 ; case 2 + .short _022378EE - _022378CA - 2 ; case 3 + .short _022378EE - _022378CA - 2 ; case 4 + .short _022378EE - _022378CA - 2 ; case 5 + .short _0223790C - _022378CA - 2 ; case 6 + .short _02237932 - _022378CA - 2 ; case 7 + .short _02237966 - _022378CA - 2 ; case 8 + .short _0223798C - _022378CA - 2 ; case 9 + .short _022379B2 - _022378CA - 2 ; case 10 + .short _022379D8 - _022378CA - 2 ; case 11 + .short _022379FE - _022378CA - 2 ; case 12 + .short _02237A2A - _022378CA - 2 ; case 13 + .short _02237A62 - _022378CA - 2 ; case 14 + .short _02237A88 - _022378CA - 2 ; case 15 + .short _02237AB4 - _022378CA - 2 ; case 16 + .short _02237AE0 - _022378CA - 2 ; case 17 +_022378EE: + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0xbc + add r2, #0xbe + bl sub_0200D550 + add r0, r4, #0 + mov r1, #0 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xc + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} +_0223790C: + mov r0, #0 + add r2, r4, #0 + add r3, r4, #0 + add r1, r0, #0 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x30 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_02237932: + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0xb8 + add r2, #0xba + bl sub_0200D550 + add r2, r4, #0 + add r3, r4, #0 + mov r0, #1 + mov r1, #4 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x30 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_02237966: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #1 + mov r1, #2 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x30 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_0223798C: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0 + mov r1, #1 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x30 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_022379B2: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #1 + mov r1, #3 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x30 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_022379D8: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #1 + mov r1, #5 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x30 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_022379FE: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0 + mov r1, #1 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x10 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x10 + strh r1, [r0] + mov r0, #0xc + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} +_02237A2A: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0 + mov r1, #1 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x20 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbc + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbc + sub r1, #0x14 + strh r1, [r0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x26 + strh r1, [r0] + mov r0, #0x10 + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} +_02237A62: + add r0, r4, #0 + mov r1, #0x80 + add r0, #0xbc + strh r1, [r0] + add r0, r4, #0 + mov r1, #0x40 + add r0, #0xbe + strh r1, [r0] + add r0, r4, #0 + mov r1, #0x20 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #0x20 + strh r1, [r0] + b _02237B0C +_02237A88: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0 + mov r1, #1 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x40 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #8 + strh r1, [r0] + mov r0, #0x10 + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} +_02237AB4: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #1 + mov r1, #3 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x40 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #8 + strh r1, [r0] + mov r0, #0x10 + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} +_02237AE0: + add r2, r4, #0 + add r3, r4, #0 + mov r0, #1 + mov r1, #5 + add r2, #0xbc + add r3, #0xbe + bl ov12_02225864 + add r0, r4, #0 + mov r1, #0x40 + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0xbe + ldrsh r1, [r4, r0] + add r0, r4, #0 + add r0, #0xbe + add r1, #8 + strh r1, [r0] + mov r0, #0x10 + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} +_02237B0C: + mov r0, #0x14 + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov12_022378A0 + + thumb_func_start ov12_02237B14 +ov12_02237B14: ; 0x02237B14 + push {r4, lr} + add r0, #0x90 + ldr r0, [r0, #0] + add r3, r1, #0 + add r4, r2, #0 + cmp r0, #0x11 + bls _02237B24 + b _02237C50 +_02237B24: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02237B30: ; jump table + .short _02237B54 - _02237B30 - 2 ; case 0 + .short _02237B6A - _02237B30 - 2 ; case 1 + .short _02237B80 - _02237B30 - 2 ; case 2 + .short _02237BAC - _02237B30 - 2 ; case 3 + .short _02237B96 - _02237B30 - 2 ; case 4 + .short _02237BC2 - _02237B30 - 2 ; case 5 + .short _02237BD8 - _02237B30 - 2 ; case 6 + .short _02237BE2 - _02237B30 - 2 ; case 7 + .short _02237BEC - _02237B30 - 2 ; case 8 + .short _02237BF6 - _02237B30 - 2 ; case 9 + .short _02237C04 - _02237B30 - 2 ; case 10 + .short _02237C12 - _02237B30 - 2 ; case 11 + .short _02237C20 - _02237B30 - 2 ; case 12 + .short _02237C2E - _02237B30 - 2 ; case 13 + .short _02237C3C - _02237B30 - 2 ; case 14 + .short _02237C46 - _02237B30 - 2 ; case 15 + .short _02237C46 - _02237B30 - 2 ; case 16 + .short _02237C46 - _02237B30 - 2 ; case 17 +_02237B54: + mov r0, #0 + add r2, r3, #0 + add r1, r0, #0 + add r3, r4, #0 + bl ov12_02225864 + mov r0, #0 + ldrsh r0, [r4, r0] + add r0, #0x28 + strh r0, [r4] + pop {r4, pc} +_02237B6A: + add r2, r3, #0 + mov r0, #0 + mov r1, #1 + add r3, r4, #0 + bl ov12_02225864 + mov r0, #0 + ldrsh r0, [r4, r0] + add r0, #0x26 + strh r0, [r4] + pop {r4, pc} +_02237B80: + add r2, r3, #0 + mov r0, #1 + mov r1, #2 + add r3, r4, #0 + bl ov12_02225864 + mov r0, #0 + ldrsh r0, [r4, r0] + add r0, #0x28 + strh r0, [r4] + pop {r4, pc} +_02237B96: + add r2, r3, #0 + mov r0, #1 + mov r1, #4 + add r3, r4, #0 + bl ov12_02225864 + mov r0, #0 + ldrsh r0, [r4, r0] + add r0, #0x28 + strh r0, [r4] + pop {r4, pc} +_02237BAC: + add r2, r3, #0 + mov r0, #1 + mov r1, #3 + add r3, r4, #0 + bl ov12_02225864 + mov r0, #0 + ldrsh r0, [r4, r0] + add r0, #0x26 + strh r0, [r4] + pop {r4, pc} +_02237BC2: + add r2, r3, #0 + mov r0, #1 + mov r1, #5 + add r3, r4, #0 + bl ov12_02225864 + mov r0, #0 + ldrsh r0, [r4, r0] + add r0, #0x26 + strh r0, [r4] + pop {r4, pc} +_02237BD8: + mov r0, #0xa + strh r0, [r3] + mov r0, #0x64 + strh r0, [r4] + pop {r4, pc} +_02237BE2: + mov r0, #0xa + strh r0, [r3] + mov r0, #0x64 + strh r0, [r4] + pop {r4, pc} +_02237BEC: + mov r0, #0xa + strh r0, [r3] + mov r0, #0x64 + strh r0, [r4] + pop {r4, pc} +_02237BF6: + mov r0, #0 + add r2, r3, #0 + add r1, r0, #0 + add r3, r4, #0 + bl ov12_02225864 + pop {r4, pc} +_02237C04: + mov r0, #0 + add r2, r3, #0 + add r1, r0, #0 + add r3, r4, #0 + bl ov12_02225864 + pop {r4, pc} +_02237C12: + mov r0, #0 + add r2, r3, #0 + add r1, r0, #0 + add r3, r4, #0 + bl ov12_02225864 + pop {r4, pc} +_02237C20: + mov r0, #0 + add r2, r3, #0 + add r1, r0, #0 + add r3, r4, #0 + bl ov12_02225864 + pop {r4, pc} +_02237C2E: + mov r0, #0 + add r2, r3, #0 + add r1, r0, #0 + add r3, r4, #0 + bl ov12_02225864 + pop {r4, pc} +_02237C3C: + mov r0, #0xe6 + strh r0, [r3] + mov r0, #0x20 + strh r0, [r4] + pop {r4, pc} +_02237C46: + mov r0, #0x1d + mvn r0, r0 + strh r0, [r3] + mov r0, #0xa0 + strh r0, [r4] +_02237C50: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov12_02237B14 + + thumb_func_start ov12_02237C54 +ov12_02237C54: ; 0x02237C54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r5, #0x2c] + mov r2, #0xa + bl sub_0200C7C0 + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02237C84 + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200C738 + mov r2, #0x11 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C +_02237C84: + mov r1, #0 + add r2, sp, #0x20 + mov r0, #0xa +_02237C8A: + add r1, r1, #1 + stmia r2!, {r0} + cmp r1, #6 + blt _02237C8A + mov r0, #0 + str r0, [sp, #0x30] + str r0, [sp, #0x34] + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r5, #0x2c] + add r2, sp, #0x20 + bl sub_0200CB30 + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + mov r1, #0 + bl ov12_02235FC8 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + mov r1, #1 + bl ov12_02235FC8 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + mov r1, #2 + bl ov12_02235FC8 + str r0, [sp, #0x18] + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + mov r1, #3 + bl ov12_02235FC8 + add r1, r5, #0 + add r1, #0x94 + str r0, [sp, #0x1c] + ldr r1, [r1, #0] + mov r0, #0x1b + bl sub_02006C24 + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x9c + ldr r1, [r0, #0] + ldr r0, _02237D88 ; =0x00001770 + add r2, r4, #0 + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r5, #0x2c] + add r3, r7, #0 + bl sub_0200CC3C + str r4, [sp] + add r2, r5, #0 + str r6, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + add r0, r5, #0 + add r0, #0x9c + ldr r1, [r0, #0] + ldr r0, _02237D88 ; =0x00001770 + add r2, #0xac + add r0, r1, r0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + ldr r2, [r2, #0] + ldr r3, [r5, #0x2c] + mov r1, #2 + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + add r0, r5, #0 + add r0, #0x9c + ldr r1, [r0, #0] + ldr r0, _02237D88 ; =0x00001770 + ldr r3, [sp, #0x18] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r5, #0x2c] + add r2, r4, #0 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + add r0, r5, #0 + add r0, #0x9c + ldr r1, [r0, #0] + ldr r0, _02237D88 ; =0x00001770 + ldr r3, [sp, #0x1c] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r5, #0x2c] + add r2, r4, #0 + bl sub_0200CE54 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02237D88: .word 0x00001770 + thumb_func_end ov12_02237C54 + + thumb_func_start ov12_02237D8C +ov12_02237D8C: ; 0x02237D8C + push {r3, r4, lr} + sub sp, #0x34 + add r2, sp, #0 + add r1, sp, #0 + add r2, #2 + add r4, r0, #0 + bl ov12_02237B14 + mov r0, #0 + add r1, sp, #0 + strh r0, [r1, #4] + strh r0, [r1, #6] + mov r1, #1 + str r1, [sp, #0x10] + add r1, r4, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + add r1, #0xa4 + ldr r1, [r1, #0] + ldr r2, _02237E08 ; =0x00001770 + str r1, [sp, #0x2c] + str r0, [sp, #0x30] + add r3, sp, #0 +_02237DBA: + add r1, r4, #0 + add r1, #0x9c + ldr r1, [r1, #0] + add r0, r0, #1 + add r1, r1, r2 + str r1, [r3, #0x14] + add r3, r3, #4 + cmp r0, #6 + blt _02237DBA + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + ldr r1, [r4, #0x2c] + add r2, sp, #0 + bl sub_0200CE6C + str r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3CC + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x30] + bl sub_0200D330 + bl ov12_02220474 + add sp, #0x34 + pop {r3, r4, pc} + ; .align 2, 0 +_02237E08: .word 0x00001770 + thumb_func_end ov12_02237D8C + + thumb_func_start ov12_02237E0C +ov12_02237E0C: ; 0x02237E0C + ldr r3, _02237E14 ; =sub_0200D3F4 + ldr r0, [r0, #0x30] + bx r3 + nop +_02237E14: .word sub_0200D3F4 + thumb_func_end ov12_02237E0C + + thumb_func_start ov12_02237E18 +ov12_02237E18: ; 0x02237E18 + ldr r3, _02237E20 ; =sub_0200D4C4 + ldr r0, [r0, #0x30] + bx r3 + nop +_02237E20: .word sub_0200D4C4 + thumb_func_end ov12_02237E18 + + thumb_func_start ov12_02237E24 +ov12_02237E24: ; 0x02237E24 + ldr r3, _02237E2C ; =sub_0200D79C + ldr r0, [r0, #0x30] + bx r3 + nop +_02237E2C: .word sub_0200D79C + thumb_func_end ov12_02237E24 + + thumb_func_start ov12_02237E30 +ov12_02237E30: ; 0x02237E30 + str r1, [r0, #0x24] + bx lr + thumb_func_end ov12_02237E30 + + thumb_func_start ov12_02237E34 +ov12_02237E34: ; 0x02237E34 + ldr r3, _02237E3C ; =sub_0200D474 + ldr r0, [r0, #0x30] + bx r3 + nop +_02237E3C: .word sub_0200D474 + thumb_func_end ov12_02237E34 + + thumb_func_start ov12_02237E40 +ov12_02237E40: ; 0x02237E40 + ldr r3, _02237E48 ; =sub_0200D460 + ldr r0, [r0, #0x30] + bx r3 + nop +_02237E48: .word sub_0200D460 + thumb_func_end ov12_02237E40 + + thumb_func_start ov12_02237E4C +ov12_02237E4C: ; 0x02237E4C + add r0, #0xdc + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov12_02237E4C + + .rodata + + + .global Unk_ov12_0223AB60 +Unk_ov12_0223AB60: ; 0x0223AB60 + .incbin "incbin/overlay12_rodata.bin", 0x25CC, 0x25D8 - 0x25CC + + .global Unk_ov12_0223AB6C +Unk_ov12_0223AB6C: ; 0x0223AB6C + .incbin "incbin/overlay12_rodata.bin", 0x25D8, 0x25F0 - 0x25D8 + + .global Unk_ov12_0223AB84 +Unk_ov12_0223AB84: ; 0x0223AB84 + .incbin "incbin/overlay12_rodata.bin", 0x25F0, 0x2608 - 0x25F0 + + .global Unk_ov12_0223AB9C +Unk_ov12_0223AB9C: ; 0x0223AB9C + .incbin "incbin/overlay12_rodata.bin", 0x2608, 0x2628 - 0x2608 + + .global Unk_ov12_0223ABBC +Unk_ov12_0223ABBC: ; 0x0223ABBC + .incbin "incbin/overlay12_rodata.bin", 0x2628, 0x2650 - 0x2628 + + .global Unk_ov12_0223ABE4 +Unk_ov12_0223ABE4: ; 0x0223ABE4 + .incbin "incbin/overlay12_rodata.bin", 0x2650, 0x2678 - 0x2650 + + .global Unk_ov12_0223AC0C +Unk_ov12_0223AC0C: ; 0x0223AC0C + .incbin "incbin/overlay12_rodata.bin", 0x2678, 0x26A4 - 0x2678 + + .global Unk_ov12_0223AC38 +Unk_ov12_0223AC38: ; 0x0223AC38 + .incbin "incbin/overlay12_rodata.bin", 0x26A4, 0x26EC - 0x26A4 + + .global Unk_ov12_0223AC80 +Unk_ov12_0223AC80: ; 0x0223AC80 + .incbin "incbin/overlay12_rodata.bin", 0x26EC, 0x275C - 0x26EC + + .global Unk_ov12_0223ACF0 +Unk_ov12_0223ACF0: ; 0x0223ACF0 + .incbin "incbin/overlay12_rodata.bin", 0x275C, 0x27DC - 0x275C + + .global Unk_ov12_0223AD70 +Unk_ov12_0223AD70: ; 0x0223AD70 + .incbin "incbin/overlay12_rodata.bin", 0x27DC, 0x287C - 0x27DC + + .global Unk_ov12_0223AE10 +Unk_ov12_0223AE10: ; 0x0223AE10 + .incbin "incbin/overlay12_rodata.bin", 0x287C, 0x296C - 0x287C + + .global Unk_ov12_0223AF00 +Unk_ov12_0223AF00: ; 0x0223AF00 + .incbin "incbin/overlay12_rodata.bin", 0x296C, 0x140 + diff --git a/asm/ov12_02237E54.s b/asm/ov12_02237E54.s new file mode 100644 index 000000000..9feddef87 --- /dev/null +++ b/asm/ov12_02237E54.s @@ -0,0 +1,106 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02237E54 +ov12_02237E54: ; 0x02237E54 + push {r3, lr} + sub r1, r1, r3 + neg r1, r1 + sub r0, r0, r2 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + asr r1, r1, #0x10 + add r2, r1, #0 + asr r0, r0, #0x10 + mul r2, r1 + add r1, r0, #0 + mul r1, r0 + add r0, r2, r1 + lsl r0, r0, #0xc + bl sub_020BCFF0 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_02237E54 + + thumb_func_start ov12_02237E80 +ov12_02237E80: ; 0x02237E80 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0202CA80 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0202CA84 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0xbe + mov r3, #0x46 + bl ov12_02237E54 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02237E80 + + thumb_func_start ov12_02237EA0 +ov12_02237EA0: ; 0x02237EA0 + push {r4, lr} + sub sp, #8 + ldr r3, _02237EF8 ; =0x0223B040 + add r4, r0, #0 + add r2, sp, #0 + mov r1, #7 +_02237EAC: + ldrb r0, [r3] + add r3, r3, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _02237EAC + add r0, r4, #0 + bl sub_0202CA7C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_020981AC + cmp r0, #0 + bne _02237EEE + add r0, r4, #0 + bl ov12_02237E80 + cmp r0, #0x38 + blt _02237ED8 + mov r0, #3 + b _02237EE6 +_02237ED8: + add r0, r0, #1 + mov r1, #0x14 + bl sub_020E1F6C + cmp r0, #3 + blt _02237EE6 + mov r0, #3 +_02237EE6: + add r1, sp, #0 + add sp, #8 + ldrb r0, [r1, r0] + pop {r4, pc} +_02237EEE: + add r0, sp, #0 + ldrb r0, [r0, #1] + add sp, #8 + pop {r4, pc} + nop +_02237EF8: .word 0x0223B040 + thumb_func_end ov12_02237EA0 + + .rodata + + + .global Unk_ov12_0223B040 +Unk_ov12_0223B040: ; 0x0223B040 + .incbin "incbin/overlay12_rodata.bin", 0x2AAC, 0x7 + diff --git a/asm/ov12_02237EFC.s b/asm/ov12_02237EFC.s new file mode 100644 index 000000000..1ca36d9c9 --- /dev/null +++ b/asm/ov12_02237EFC.s @@ -0,0 +1,276 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_02237EFC +ov12_02237EFC: ; 0x02237EFC + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x48 + add r6, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _02237F14 + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} +_02237F14: + bl ov12_02220474 + str r6, [r4, #0] + cmp r5, #0 + beq _02237F22 + ldr r0, [r5, #0] + str r0, [r4, #4] +_02237F22: + mov r1, #0 + add r2, r4, #0 + add r0, r1, #0 +_02237F28: + add r1, r1, #1 + str r0, [r2, #8] + add r2, r2, #4 + cmp r1, #0x10 + blt _02237F28 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02237EFC + + thumb_func_start ov12_02237F38 +ov12_02237F38: ; 0x02237F38 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r4, #0 + add r3, r0, #0 +_02237F40: + ldr r2, [r3, #8] + cmp r2, #0 + bne _02237F60 + add r4, r0, #0 + ldr r0, [r0, #0] + add r4, #8 + lsl r6, r5, #2 + bl ov12_02237FC8 + str r0, [r4, r6] + ldr r0, [r4, r6] + mov r1, #0 + str r1, [r0, #0x18] + ldr r4, [r4, r6] + str r5, [r4, #0] + b _02237F68 +_02237F60: + add r5, r5, #1 + add r3, r3, #4 + cmp r5, #0x10 + blt _02237F40 +_02237F68: + cmp r4, #0 + bne _02237F70 + bl sub_02022974 +_02237F70: + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02237F38 + + thumb_func_start ov12_02237F74 +ov12_02237F74: ; 0x02237F74 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02237F7C: + ldr r0, [r5, #8] + cmp r0, #0 + beq _02237F86 + bl sub_020181C4 +_02237F86: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x10 + blt _02237F7C + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02237F74 + + thumb_func_start ov12_02237F98 +ov12_02237F98: ; 0x02237F98 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_02237F9E: + ldr r0, [r5, #8] + cmp r0, #0 + beq _02237FBC + ldr r0, [r0, #0x10] + bl ov12_02223894 + ldr r1, [r5, #8] + ldr r0, [r1, #0x20] + cmp r0, #0 + beq _02237FBC + ldr r0, [r1, #0x18] + cmp r0, #0 + beq _02237FBC + bl sub_0200DA58 +_02237FBC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x10 + blt _02237F9E + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02237F98 + + thumb_func_start ov12_02237FC8 +ov12_02237FC8: ; 0x02237FC8 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x24 + add r5, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _02237FE0 + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} +_02237FE0: + str r5, [r4, #4] + ldr r1, [r6, #0] + ldr r0, [r6, #4] + str r1, [r4, #8] + str r0, [r4, #0xc] + ldr r0, [r4, #8] + bl ov12_02238088 + str r0, [r4, #0x1c] + ldr r0, [r4, #4] + ldr r1, [r4, #8] + mov r2, #1 + bl ov12_022237F0 + str r0, [r4, #0x10] + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov12_02237FC8 + + thumb_func_start ov12_02238004 +ov12_02238004: ; 0x02238004 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + str r1, [r4, #0x20] + ldr r1, _02238024 ; =ov12_02238080 + bl ov12_02238054 + mov r2, #0xfa + ldr r0, _02238028 ; =ov12_02238030 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0x18] + pop {r4, pc} + nop +_02238024: .word ov12_02238080 +_02238028: .word ov12_02238030 + thumb_func_end ov12_02238004 + + thumb_func_start ov12_0223802C +ov12_0223802C: ; 0x0223802C + ldr r0, [r0, #0x20] + bx lr + thumb_func_end ov12_0223802C + + thumb_func_start ov12_02238030 +ov12_02238030: ; 0x02238030 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x10] + bl sub_02014710 + cmp r0, #0 + bne _02238050 + mov r0, #0 + str r0, [r4, #0x20] + ldr r0, [r4, #0x10] + bl ov12_02223894 + add r0, r5, #0 + bl sub_0200DA58 +_02238050: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov12_02238030 + + thumb_func_start ov12_02238054 +ov12_02238054: ; 0x02238054 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x1c] + add r6, r1, #0 + mov r4, #0 + cmp r0, #0 + ble _02238076 +_02238062: + ldr r0, [r5, #0x10] + add r1, r4, #0 + add r2, r6, #0 + add r3, r5, #0 + bl sub_020146F4 + ldr r0, [r5, #0x1c] + add r4, r4, #1 + cmp r4, r0 + blt _02238062 +_02238076: + ldr r0, [r5, #0x10] + ldr r1, [r5, #0xc] + bl sub_02014788 + pop {r4, r5, r6, pc} + thumb_func_end ov12_02238054 + + thumb_func_start ov12_02238080 +ov12_02238080: ; 0x02238080 + ldr r3, _02238084 ; =sub_02014764 + bx r3 + ; .align 2, 0 +_02238084: .word sub_02014764 + thumb_func_end ov12_02238080 + + thumb_func_start ov12_02238088 +ov12_02238088: ; 0x02238088 + push {r3, r4, r5, lr} + sub sp, #0x58 + ldr r4, _022380B8 ; =0x0223B048 + add r5, r0, #0 + add r3, sp, #0 + mov r2, #0xb +_02238094: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02238094 + sub r0, r5, #5 + cmp r0, #0x16 + blo _022380AC + bl sub_02022974 + add sp, #0x58 + mov r0, #0 + pop {r3, r4, r5, pc} +_022380AC: + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + add sp, #0x58 + pop {r3, r4, r5, pc} + nop +_022380B8: .word 0x0223B048 + thumb_func_end ov12_02238088 + + .rodata + + + .global Unk_ov12_0223B048 +Unk_ov12_0223B048: ; 0x0223B048 + .incbin "incbin/overlay12_rodata.bin", 0x2AB4, 0x58 + diff --git a/asm/ov12_022380BC.s b/asm/ov12_022380BC.s new file mode 100644 index 000000000..d69ab5536 --- /dev/null +++ b/asm/ov12_022380BC.s @@ -0,0 +1,556 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_022380BC +ov12_022380BC: ; 0x022380BC + push {r3, lr} + add r3, r1, #0 + ldr r1, [r0, #0] + mov r2, #0 + bl ov12_022380DC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_022380BC + + thumb_func_start ov12_022380CC +ov12_022380CC: ; 0x022380CC + push {r3, lr} + add r3, r1, #0 + ldr r1, [r0, #4] + mov r2, #1 + bl ov12_022380DC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov12_022380CC + + thumb_func_start ov12_022380DC +ov12_022380DC: ; 0x022380DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + add r7, r2, #0 + str r3, [sp, #0x10] + bl sub_020089B0 + ldr r0, [r5, #4] + lsl r1, r0, #1 + add r1, r5, r1 + ldrh r6, [r1, #0x28] + add r1, r5, r0 + add r1, #0x30 + ldrb r1, [r1] + add r2, r5, r0 + add r2, #0x38 + str r1, [sp, #0x1c] + add r1, r5, r0 + lsl r0, r0, #2 + ldrb r2, [r2] + add r0, r5, r0 + add r1, #0x34 + ldr r0, [r0, #0x3c] + ldrb r1, [r1] + str r2, [sp, #0x18] + str r0, [sp, #0x14] + cmp r7, #0 + beq _02238132 + add r0, r5, r4 + add r0, #0x4c + ldrb r2, [r0] + mov r0, #1 + tst r0, r2 + beq _0223812E + mov r4, #0 + b _02238144 +_0223812E: + mov r4, #2 + b _02238144 +_02238132: + add r0, r5, r4 + add r0, #0x4c + ldrb r2, [r0] + mov r0, #1 + tst r0, r2 + beq _02238142 + mov r4, #2 + b _02238144 +_02238142: + mov r4, #0 +_02238144: + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x14] + lsl r1, r6, #0x10 + lsl r2, r2, #0x18 + lsl r3, r4, #0x18 + str r0, [sp, #8] + add r0, sp, #0x28 + lsr r1, r1, #0x10 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_02075FB4 + ldr r0, [r5, #0] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_02008A90 + add r7, r0, #0 + add r3, sp, #0x28 + add r2, r7, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_020089A0 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r4, [sp, #8] + ldrh r0, [r7, #6] + str r0, [sp, #0xc] + ldr r3, [r5, #0] + ldrh r0, [r7] + lsl r3, r3, #2 + add r3, r5, r3 + ldr r3, [r3, #8] + ldrh r1, [r7, #2] + ldr r3, [r3, #0] + bl sub_02013750 + ldr r1, [r5, #0] + ldr r3, [sp, #0x18] + lsl r1, r1, #2 + add r1, r5, r1 + lsl r2, r4, #0x18 + lsl r3, r3, #0x18 + ldrh r0, [r7] + ldr r1, [r1, #8] + lsr r2, r2, #0x18 + str r0, [r1, #4] + ldr r1, [r5, #0] + ldrh r0, [r7, #4] + lsl r1, r1, #2 + add r1, r5, r1 + ldr r1, [r1, #8] + lsr r3, r3, #0x18 + str r0, [r1, #8] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + str r0, [sp] + lsl r0, r6, #0x10 + lsl r1, r1, #0x18 + lsr r0, r0, #0x10 + lsr r1, r1, #0x18 + bl sub_02076648 + ldr r1, [r5, #0] + lsl r1, r1, #2 + add r1, r5, r1 + ldr r1, [r1, #8] + str r0, [r1, #0xc] + ldr r0, [r5, #0] + lsl r1, r0, #2 + add r1, r5, r1 + ldr r1, [r1, #8] + add r0, r5, r0 + ldr r1, [r1, #0xc] + add r0, #0x4c + lsl r1, r1, #0x18 + asr r7, r1, #0x18 + ldrb r0, [r0] + mov r1, #1 + bl ov12_022384CC + str r0, [sp, #0x20] + ldr r0, [r5, #0] + ldr r2, [sp, #0x20] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + mov r1, #1 + add r2, r2, r7 + bl sub_02007DEC + cmp r4, #2 + bne _022382B8 + ldr r1, [sp, #0x10] + mov r0, #0x93 + bl sub_02006C24 + add r1, sp, #0x24 + lsl r2, r6, #0x10 + add r1, #2 + lsr r2, r2, #0x10 + add r4, r0, #0 + bl sub_02078A80 + add r1, sp, #0x24 + lsl r2, r6, #0x10 + add r0, r4, #0 + add r1, #1 + lsr r2, r2, #0x10 + bl sub_02078AA4 + lsl r2, r6, #0x10 + add r0, r4, #0 + add r1, sp, #0x24 + lsr r2, r2, #0x10 + bl sub_02078AC8 + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, [r5, #0] + add r2, sp, #0x24 + lsl r0, r0, #2 + add r0, r5, r0 + ldrb r2, [r2] + ldr r0, [r0, #0x18] + mov r1, #0x2e + bl sub_02007DEC + ldr r0, [r5, #0] + ldr r2, [sp, #0x20] + lsl r0, r0, #2 + add r0, r5, r0 + add r2, #0x24 + ldr r0, [r0, #0x18] + mov r1, #0x14 + str r2, [sp, #0x20] + bl sub_02007DEC + ldr r0, [r5, #0] + add r3, sp, #0x24 + lsl r0, r0, #2 + mov r2, #1 + add r0, r5, r0 + ldrsb r2, [r3, r2] + ldr r0, [r0, #0x18] + mov r1, #0x15 + bl sub_02007DEC + ldr r0, [r5, #0] + mov r2, #0x24 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + mov r1, #0x16 + sub r2, r2, r7 + bl sub_02007DEC + ldr r0, [r5, #0] + add r3, sp, #0x24 + lsl r0, r0, #2 + mov r2, #2 + add r0, r5, r0 + ldrsb r2, [r3, r2] + ldr r0, [r0, #0x18] + mov r1, #0x29 + bl sub_02007DEC +_022382B8: + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022380DC + + thumb_func_start ov12_022382BC +ov12_022382BC: ; 0x022382BC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0] + str r1, [sp, #0x10] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_02008A0C + ldr r0, [r5, #0] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_02008A90 + add r4, r0, #0 + ldr r0, [r5, #0] + lsl r1, r0, #1 + add r1, r5, r1 + ldrh r1, [r1, #0x28] + lsl r3, r0, #2 + str r1, [sp, #0x1c] + add r1, r5, r0 + add r1, #0x30 + ldrb r1, [r1] + str r1, [sp, #0x18] + add r1, r5, r0 + add r1, #0x38 + ldrb r1, [r1] + add r0, r5, r0 + add r0, #0x4c + str r1, [sp, #0x14] + add r1, r5, r3 + ldr r7, [r1, #0x3c] + ldrb r1, [r0] + mov r0, #1 + tst r0, r1 + beq _0223830E + mov r6, #2 + b _02238310 +_0223830E: + mov r6, #0 +_02238310: + str r7, [sp] + mov r0, #0 + str r0, [sp, #4] + str r6, [sp, #8] + ldrh r0, [r4, #6] + add r3, r5, r3 + ldr r2, [sp, #0x10] + str r0, [sp, #0xc] + ldr r3, [r3, #8] + ldrh r0, [r4] + ldrh r1, [r4, #2] + ldr r3, [r3, #0] + bl sub_02013750 + ldr r1, [r5, #0] + ldrh r0, [r4] + lsl r1, r1, #2 + add r1, r5, r1 + ldr r1, [r1, #8] + ldr r3, [sp, #0x14] + str r0, [r1, #4] + ldr r1, [r5, #0] + lsl r2, r6, #0x18 + lsl r1, r1, #2 + add r1, r5, r1 + lsl r3, r3, #0x18 + ldrh r0, [r4, #4] + ldr r1, [r1, #8] + lsr r2, r2, #0x18 + str r0, [r1, #8] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + lsl r0, r0, #0x10 + lsl r1, r1, #0x18 + str r7, [sp] + lsr r0, r0, #0x10 + lsr r1, r1, #0x18 + lsr r3, r3, #0x18 + bl sub_02076648 + ldr r1, [r5, #0] + lsl r1, r1, #2 + add r1, r5, r1 + ldr r1, [r1, #8] + str r0, [r1, #0xc] + ldr r0, [r5, #0] + mov r1, #1 + lsl r4, r0, #2 + add r0, r5, r0 + add r0, #0x4c + ldrb r0, [r0] + bl ov12_022384CC + add r1, r5, r4 + add r2, r0, #0 + ldr r0, [r1, #8] + ldr r3, [r0, #0xc] + ldr r0, [r1, #0x18] + mov r1, #1 + add r2, r3, r2 + bl sub_02007DEC + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov12_022382BC + + thumb_func_start ov12_02238390 +ov12_02238390: ; 0x02238390 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_020089B0 + mov r0, #0x75 + add r2, sp, #0 + strh r0, [r2, #4] + mov r0, #0xfa + strh r0, [r2, #8] + mov r0, #0 + strh r0, [r2, #0xa] + strb r0, [r2, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, r5, r0 + add r1, #0x4c + ldrb r3, [r1] + mov r1, #1 + tst r1, r3 + beq _022383CC + mov r1, #0xf9 + strh r1, [r2, #6] + mov r4, #0x87 + b _022383D2 +_022383CC: + mov r1, #0xf8 + strh r1, [r2, #6] + mov r4, #0x86 +_022383D2: + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_02008A90 + add r7, r0, #0 + add r3, sp, #4 + add r2, r7, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + bl sub_020089A0 + ldr r3, [r5, #0] + ldrh r0, [r7] + lsl r3, r3, #2 + add r3, r5, r3 + ldr r3, [r3, #8] + ldrh r1, [r7, #2] + ldr r3, [r3, #0] + add r2, r6, #0 + bl sub_02013610 + ldr r2, [r5, #0] + add r1, sp, #0 + lsl r2, r2, #2 + add r2, r5, r2 + ldrh r0, [r1, #4] + ldr r2, [r2, #8] + str r0, [r2, #4] + ldr r0, [r5, #0] + ldrh r1, [r1, #8] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #8] + add r2, r4, #0 + str r1, [r0, #8] + add r0, sp, #0 + mov r1, #0x79 + bl sub_02006AA4 + add r0, sp, #0 + ldrb r1, [r0] + ldr r0, [r5, #0] + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #8] + str r1, [r0, #0xc] + ldr r0, [r5, #0] + mov r1, #1 + lsl r4, r0, #2 + add r0, r5, r0 + add r0, #0x4c + ldrb r0, [r0] + bl ov12_022384CC + add r2, r5, r4 + ldr r1, [r2, #8] + ldr r1, [r1, #0xc] + add r4, r1, r0 + ldr r0, [r2, #0x18] + mov r1, #1 + add r2, r4, #0 + bl sub_02007DEC + ldr r1, [r5, #0] + mov r2, #1 + add r0, r5, r1 + add r0, #0x4c + ldrb r0, [r0] + tst r0, r2 + beq _022384C6 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + mov r1, #0x2e + bl sub_02007DEC + ldr r0, [r5, #0] + add r2, sp, #0 + ldrb r3, [r2] + lsl r0, r0, #2 + add r0, r5, r0 + mov r2, #0x24 + sub r2, r2, r3 + ldr r0, [r0, #0x18] + mov r1, #0x14 + add r2, r4, r2 + bl sub_02007DEC + ldr r0, [r5, #0] + mov r1, #0x15 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r5, #0] + add r2, sp, #0 + lsl r0, r0, #2 + ldrb r3, [r2] + add r0, r5, r0 + mov r2, #0x24 + ldr r0, [r0, #0x18] + mov r1, #0x16 + sub r2, r2, r3 + bl sub_02007DEC + ldr r0, [r5, #0] + mov r1, #0x29 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + mov r2, #0 + bl sub_02007DEC +_022384C6: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov12_02238390 + + thumb_func_start ov12_022384CC +ov12_022384CC: ; 0x022384CC + cmp r1, #0 + bne _022384D8 + lsl r1, r0, #2 + ldr r0, _022384E8 ; =0x0223B0A0 + ldrsh r0, [r0, r1] + bx lr +_022384D8: + mov r2, #6 + mul r2, r0 + ldr r0, _022384EC ; =0x0223B0B8 + lsl r1, r1, #1 + add r0, r0, r2 + ldrsh r0, [r1, r0] + bx lr + nop +_022384E8: .word 0x0223B0A0 +_022384EC: .word 0x0223B0B8 + thumb_func_end ov12_022384CC + + .rodata + + + .global Unk_ov12_0223B0A0 +Unk_ov12_0223B0A0: ; 0x0223B0A0 + .incbin "incbin/overlay12_rodata.bin", 0x2B0C, 0x2B24 - 0x2B0C + + .global Unk_ov12_0223B0B8 +Unk_ov12_0223B0B8: ; 0x0223B0B8 + .incbin "incbin/overlay12_rodata.bin", 0x2B24, 0x2B48 - 0x2B24 + + .global Unk_ov12_0223B0DC +Unk_ov12_0223B0DC: ; 0x0223B0DC + .incbin "incbin/overlay12_rodata.bin", 0x2B48, 0x24 + diff --git a/asm/ov12_022384F0.s b/asm/ov12_022384F0.s new file mode 100644 index 000000000..517a56a72 --- /dev/null +++ b/asm/ov12_022384F0.s @@ -0,0 +1,103 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov12_022384F0 +ov12_022384F0: ; 0x022384F0 + ldr r2, _02238590 ; =0x0000013B + cmp r0, r2 + bhi _0223851E + bhs _0223857E + cmp r0, #0x7d + bhi _0223850C + bhs _0223857E + cmp r0, #0x63 + bhi _02238506 + beq _0223857E + b _0223858A +_02238506: + cmp r0, #0x78 + beq _0223857E + b _0223858A +_0223850C: + cmp r0, #0xc9 + bhi _02238518 + bhs _0223857E + cmp r0, #0x9f + beq _0223857E + b _0223858A +_02238518: + cmp r0, #0xd7 + beq _0223857E + b _0223858A +_0223851E: + add r3, r2, #0 + add r3, #0x5c + cmp r0, r3 + bhi _0223855E + add r1, r2, #0 + add r1, #0x5b + cmp r0, r1 + blo _0223853E + add r1, r2, #0 + add r1, #0x5b + cmp r0, r1 + beq _0223857E + add r2, #0x5c + cmp r0, r2 + beq _0223857E + b _0223858A +_0223853E: + add r1, r2, #0 + add r1, #0x2c + cmp r0, r1 + bhi _02238556 + add r1, r2, #0 + add r1, #0x2c + cmp r0, r1 + bhs _0223857E + add r2, #0x14 + cmp r0, r2 + beq _0223857E + b _0223858A +_02238556: + add r2, #0x4a + cmp r0, r2 + beq _0223857E + b _0223858A +_0223855E: + add r3, r2, #0 + add r3, #0x99 + cmp r0, r3 + bhi _02238576 + add r1, r2, #0 + add r1, #0x99 + cmp r0, r1 + bhs _0223857E + add r2, #0x98 + cmp r0, r2 + beq _0223857E + b _0223858A +_02238576: + add r2, #0xb1 + cmp r0, r2 + beq _02238582 + b _0223858A +_0223857E: + mov r0, #0 + bx lr +_02238582: + cmp r1, #1 + bne _0223858A + mov r0, #0 + bx lr +_0223858A: + mov r0, #1 + bx lr + nop +_02238590: .word 0x0000013B + thumb_func_end ov12_022384F0 \ No newline at end of file diff --git a/asm/ov13_0221FC20.s b/asm/ov13_0221FC20.s new file mode 100644 index 000000000..de014d691 --- /dev/null +++ b/asm/ov13_0221FC20.s @@ -0,0 +1,3945 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_0221FC20 +ov13_0221FC20: ; 0x0221FC20 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r0, [r5, #0x11] + cmp r0, #5 + bls _0221FC2E + mov r0, #0 + strb r0, [r5, #0x11] +_0221FC2E: + ldr r0, _0221FC98 ; =ov13_0221FCAC + ldr r1, _0221FC9C ; =0x00002090 + ldr r3, [r5, #0xc] + mov r2, #0 + bl sub_0200679C + bl sub_0201CED0 + ldr r2, _0221FC9C ; =0x00002090 + add r4, r0, #0 + mov r1, #0 + bl sub_020D5124 + str r5, [r4, #0] + ldr r0, [r5, #8] + bl ov16_0223DF00 + mov r1, #0x79 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #8] + bl ov16_0223E064 + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, _0221FCA0 ; =0x00002078 + mov r1, #0 + strb r1, [r4, r0] + ldrb r1, [r5, #0x11] + sub r0, r0, #2 + strb r1, [r4, r0] + ldr r0, [r5, #8] + bl ov16_0223F1F8 + ldr r3, _0221FCA4 ; =0x00002077 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1c + ldrb r1, [r4, r3] + mov r2, #0xf0 + lsr r0, r0, #0x18 + bic r1, r2 + orr r0, r1 + strb r0, [r4, r3] + ldr r0, [r5, #8] + ldr r1, [r5, #0x28] + bl ov16_0223E1F8 + ldr r1, _0221FCA8 ; =0x0000208F + strb r0, [r4, r1] + pop {r3, r4, r5, pc} + nop +_0221FC98: .word ov13_0221FCAC +_0221FC9C: .word 0x00002090 +_0221FCA0: .word 0x00002078 +_0221FCA4: .word 0x00002077 +_0221FCA8: .word 0x0000208F + thumb_func_end ov13_0221FC20 + + thumb_func_start ov13_0221FCAC +ov13_0221FCAC: ; 0x0221FCAC + push {r4, lr} + ldr r2, _0221FE54 ; =0x00002078 + add r4, r1, #0 + ldrb r2, [r4, r2] + cmp r2, #0x1a + bls _0221FCBA + b _0221FE3C +_0221FCBA: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0221FCC6: ; jump table + .short _0221FCFC - _0221FCC6 - 2 ; case 0 + .short _0221FD08 - _0221FCC6 - 2 ; case 1 + .short _0221FD14 - _0221FCC6 - 2 ; case 2 + .short _0221FD20 - _0221FCC6 - 2 ; case 3 + .short _0221FD2C - _0221FCC6 - 2 ; case 4 + .short _0221FD38 - _0221FCC6 - 2 ; case 5 + .short _0221FD44 - _0221FCC6 - 2 ; case 6 + .short _0221FD50 - _0221FCC6 - 2 ; case 7 + .short _0221FD5C - _0221FCC6 - 2 ; case 8 + .short _0221FD68 - _0221FCC6 - 2 ; case 9 + .short _0221FD74 - _0221FCC6 - 2 ; case 10 + .short _0221FD80 - _0221FCC6 - 2 ; case 11 + .short _0221FD8C - _0221FCC6 - 2 ; case 12 + .short _0221FD98 - _0221FCC6 - 2 ; case 13 + .short _0221FDA4 - _0221FCC6 - 2 ; case 14 + .short _0221FDB0 - _0221FCC6 - 2 ; case 15 + .short _0221FDBC - _0221FCC6 - 2 ; case 16 + .short _0221FDC8 - _0221FCC6 - 2 ; case 17 + .short _0221FDD4 - _0221FCC6 - 2 ; case 18 + .short _0221FDE0 - _0221FCC6 - 2 ; case 19 + .short _0221FDEC - _0221FCC6 - 2 ; case 20 + .short _0221FDF8 - _0221FCC6 - 2 ; case 21 + .short _0221FE04 - _0221FCC6 - 2 ; case 22 + .short _0221FE10 - _0221FCC6 - 2 ; case 23 + .short _0221FE1C - _0221FCC6 - 2 ; case 24 + .short _0221FE28 - _0221FCC6 - 2 ; case 25 + .short _0221FE34 - _0221FCC6 - 2 ; case 26 +_0221FCFC: + add r0, r4, #0 + bl ov13_0221FE5C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD08: + add r0, r4, #0 + bl ov13_0221FF60 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD14: + add r0, r4, #0 + bl ov13_0222012C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD20: + add r0, r4, #0 + bl ov13_022201DC + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD2C: + add r0, r4, #0 + bl ov13_0222029C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD38: + add r0, r4, #0 + bl ov13_022203A0 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD44: + add r0, r4, #0 + bl ov13_0222072C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD50: + add r0, r4, #0 + bl ov13_02220738 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD5C: + add r0, r4, #0 + bl ov13_02220744 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD68: + add r0, r4, #0 + bl ov13_02220750 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD74: + add r0, r4, #0 + bl ov13_0222075C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD80: + add r0, r4, #0 + bl ov13_02220768 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD8C: + add r0, r4, #0 + bl ov13_0222078C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FD98: + add r0, r4, #0 + bl ov13_022207B8 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDA4: + add r0, r4, #0 + bl ov13_022207DC + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDB0: + add r0, r4, #0 + bl ov13_0222081C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDBC: + add r0, r4, #0 + bl ov13_02220834 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDC8: + add r0, r4, #0 + bl ov13_02220848 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDD4: + add r0, r4, #0 + bl ov13_02220864 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDE0: + add r0, r4, #0 + bl ov13_02220418 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDEC: + add r0, r4, #0 + bl ov13_0222050C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FDF8: + add r0, r4, #0 + bl ov13_02220628 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FE04: + add r0, r4, #0 + bl ov13_0222088C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FE10: + add r0, r4, #0 + bl ov13_022208A4 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FE1C: + add r0, r4, #0 + bl ov13_02220A4C + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FE28: + add r0, r4, #0 + bl ov13_02220B78 + ldr r1, _0221FE54 ; =0x00002078 + strb r0, [r4, r1] + b _0221FE3C +_0221FE34: + bl ov13_02220BA4 + cmp r0, #1 + beq _0221FE50 +_0221FE3C: + add r0, r4, #0 + bl ov13_0222537C + ldr r0, _0221FE58 ; =0x00001FB4 + ldr r0, [r4, r0] + bl sub_0200C7EC + add r0, r4, #0 + bl ov13_0222601C +_0221FE50: + pop {r4, pc} + nop +_0221FE54: .word 0x00002078 +_0221FE58: .word 0x00001FB4 + thumb_func_end ov13_0221FCAC + + thumb_func_start ov13_0221FE5C +ov13_0221FE5C: ; 0x0221FE5C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0221FF50 ; =0x04001050 + mov r1, #0 + strh r1, [r0] + ldr r0, [r5, #0] + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #3 + ldr r0, _0221FF54 ; =0x0000207A + bne _0221FE7C + mov r1, #6 + strb r1, [r5, r0] + mov r4, #0x13 + b _0221FE80 +_0221FE7C: + strb r1, [r5, r0] + mov r4, #1 +_0221FE80: + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + bl ov13_02228A38 + ldr r1, _0221FF58 ; =0x00002088 + str r0, [r5, r1] + add r0, r5, #0 + bl ov13_02220F98 + add r0, r5, #0 + bl ov13_02220C0C + add r0, r5, #0 + bl ov13_02220D4C + add r0, r5, #0 + bl ov13_02220F08 + ldr r1, [r5, #0] + mov r0, #2 + ldr r1, [r1, #0xc] + bl sub_02002BB8 + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_02221738 + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_022260EC + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_02226444 + add r0, r5, #0 + bl ov13_02224500 + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_02224B7C + add r0, r5, #0 + bl ov13_02221A88 + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_02221BF8 + ldr r0, [r5, #0] + add r0, #0x32 + ldrb r0, [r0] + cmp r0, #0 + beq _0221FF00 + ldr r0, _0221FF58 ; =0x00002088 + mov r1, #1 + ldr r0, [r5, r0] + bl ov13_02228A60 +_0221FF00: + ldr r0, _0221FF54 ; =0x0000207A + ldrb r0, [r5, r0] + cmp r0, #0 + bne _0221FF1A + add r0, r5, #0 + mov r1, #0 + bl ov13_022219AC + cmp r0, #1 + bne _0221FF1A + ldr r0, [r5, #0] + mov r1, #1 + strb r1, [r0, #0x11] +_0221FF1A: + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_0222563C + ldr r1, _0221FF54 ; =0x0000207A + add r0, r5, #0 + ldrb r1, [r5, r1] + bl ov13_022214E0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x7a + lsl r0, r0, #2 + mov r1, #0xa + add r3, r1, #0 + ldr r0, [r5, r0] + ldr r2, _0221FF5C ; =0x0000FFFF + sub r3, #0x12 + bl sub_02003178 + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0221FF50: .word 0x04001050 +_0221FF54: .word 0x0000207A +_0221FF58: .word 0x00002088 +_0221FF5C: .word 0x0000FFFF + thumb_func_end ov13_0221FE5C + + thumb_func_start ov13_0221FF60 +ov13_0221FF60: ; 0x0221FF60 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200384C + cmp r0, #0 + beq _0221FF76 + mov r0, #1 + pop {r4, pc} +_0221FF76: + add r0, r4, #0 + bl ov13_0222124C + cmp r0, #1 + bne _0221FFCE + ldr r1, [r4, #0] + ldrb r0, [r1, #0x11] + cmp r0, #6 + bne _0221FFA2 + add r1, #0x35 + ldrb r0, [r1] + cmp r0, #1 + beq _0221FFCE + ldr r0, _0221FFD4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + mov r0, #0x19 + pop {r4, pc} +_0221FFA2: + ldr r0, _0221FFD4 ; =0x000005DD + bl sub_02005748 + ldr r1, [r4, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + bl ov13_02225FCC + ldr r0, [r4, #0] + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #2 + bne _0221FFC4 + add r0, r4, #0 + bl ov13_0221FFDC + pop {r4, pc} +_0221FFC4: + ldr r0, _0221FFD8 ; =0x00002079 + mov r1, #7 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_0221FFCE: + mov r0, #1 + pop {r4, pc} + nop +_0221FFD4: .word 0x000005DD +_0221FFD8: .word 0x00002079 + thumb_func_end ov13_0221FF60 + + thumb_func_start ov13_0221FFDC +ov13_0221FFDC: ; 0x0221FFDC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r5, #0] + ldrb r1, [r4, #0x11] + cmp r1, #0 + bne _0221FFEE + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _0221FFF8 +_0221FFEE: + cmp r1, #1 + bne _02220014 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _02220014 +_0221FFF8: + add r0, r5, #0 + bl ov13_0222449C + add r0, r5, #0 + bl ov13_022240E0 + ldr r0, [r5, #0] + mov r1, #6 + strb r1, [r0, #0x11] + ldr r0, _02220120 ; =0x00002079 + mov r1, #0x19 + strb r1, [r5, r0] + mov r0, #0x11 + pop {r3, r4, r5, pc} +_02220014: + ldrh r0, [r4, #0x22] + ldr r2, [r4, #0xc] + mov r1, #0x24 + bl sub_0207CFF0 + cmp r0, #0 + beq _0222004A + ldrh r0, [r4, #0x22] + ldr r2, [r4, #0xc] + mov r1, #0x25 + bl sub_0207CFF0 + cmp r0, #0 + bne _0222004A + ldrb r1, [r4, #0x11] + mov r0, #0x50 + mul r0, r1 + add r0, r5, r0 + ldrb r0, [r0, #0x1b] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _0222004A + ldr r0, _02220120 ; =0x00002079 + mov r1, #0xd + strb r1, [r5, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_0222004A: + ldrh r0, [r4, #0x22] + mov r3, #0 + str r0, [sp] + ldrb r2, [r4, #0x11] + ldr r0, [r4, #8] + ldr r1, [r4, #0x28] + add r2, r4, r2 + add r2, #0x2c + ldrb r2, [r2] + bl ov16_0223E30C + cmp r0, #1 + bne _022200FA + ldrh r0, [r4, #0x22] + ldr r2, [r4, #0xc] + mov r1, #0x25 + bl sub_0207CFF0 + cmp r0, #0 + beq _0222007A + ldr r0, _02220120 ; =0x00002079 + mov r1, #0xd + strb r1, [r5, r0] + b _022200F0 +_0222007A: + ldrb r1, [r4, #0x11] + add r0, r5, #0 + bl ov13_022213F0 + cmp r0, #1 + bne _022200EA + ldrh r0, [r4, #0x22] + ldr r2, [r4, #0xc] + mov r1, #0x17 + bl sub_0207CFF0 + cmp r0, #0 + bne _022200EA + add r2, r4, #0 + add r2, #0x33 + ldrh r1, [r4, #0x22] + ldrb r2, [r2] + ldr r0, [r4, #8] + ldr r3, [r4, #0xc] + bl ov13_02221A54 + ldrb r2, [r4, #0x11] + ldr r0, [r4, #8] + ldr r1, [r4, #0x28] + add r2, r4, r2 + add r2, #0x2c + ldrb r2, [r2] + bl ov16_0223DFAC + ldrb r2, [r4, #0x11] + mov r1, #0x50 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + str r0, [r2, #4] + ldrb r0, [r4, #0x11] + mov r2, #0 + mul r1, r0 + add r0, r5, r1 + ldr r0, [r0, #4] + mov r1, #0xa3 + bl sub_02074470 + strh r0, [r4, #0x20] + ldrb r1, [r4, #0x11] + mov r0, #0x50 + ldrh r2, [r4, #0x20] + mul r0, r1 + add r0, r5, r0 + ldrh r0, [r0, #0x14] + mov r1, #0x19 + sub r0, r2, r0 + strh r0, [r4, #0x20] + ldr r0, _02220120 ; =0x00002079 + strb r1, [r5, r0] + b _022200F0 +_022200EA: + ldr r0, _02220120 ; =0x00002079 + mov r1, #0x17 + strb r1, [r5, r0] +_022200F0: + ldr r0, _02220124 ; =0x0000207C + mov r1, #0 + strb r1, [r5, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_022200FA: + ldr r2, _02220128 ; =0x00001FA8 + mov r1, #0x51 + ldr r0, [r5, r2] + add r2, #8 + ldr r2, [r5, r2] + bl sub_0200B1B8 + add r0, r5, #0 + bl ov13_022240E0 + ldr r0, [r5, #0] + mov r1, #6 + strb r1, [r0, #0x11] + ldr r0, _02220120 ; =0x00002079 + mov r1, #0x19 + strb r1, [r5, r0] + mov r0, #0x11 + pop {r3, r4, r5, pc} + nop +_02220120: .word 0x00002079 +_02220124: .word 0x0000207C +_02220128: .word 0x00001FA8 + thumb_func_end ov13_0221FFDC + + thumb_func_start ov13_0222012C +ov13_0222012C: ; 0x0222012C + push {r4, lr} + add r4, r0, #0 + bl ov13_022212C4 + cmp r0, #3 + bhi _022201CE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02220144: ; jump table + .short _0222014C - _02220144 - 2 ; case 0 + .short _02220172 - _02220144 - 2 ; case 1 + .short _02220194 - _02220144 - 2 ; case 2 + .short _022201B6 - _02220144 - 2 ; case 3 +_0222014C: + ldr r0, _022201D4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #7 + bl ov13_02225FCC + add r0, r4, #0 + bl ov13_022217A4 + cmp r0, #1 + bne _02220168 + mov r0, #0x19 + pop {r4, pc} +_02220168: + ldr r0, _022201D8 ; =0x00002079 + mov r1, #0xf + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_02220172: + add r0, r4, #0 + bl ov13_0222194C + cmp r0, #1 + beq _022201CE + ldr r0, _022201D4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #8 + bl ov13_02225FCC + ldr r0, _022201D8 ; =0x00002079 + mov r1, #8 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_02220194: + add r0, r4, #0 + bl ov13_0222194C + cmp r0, #1 + beq _022201CE + ldr r0, _022201D4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xa + bl ov13_02225FCC + ldr r0, _022201D8 ; =0x00002079 + mov r1, #9 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_022201B6: + ldr r0, _022201D4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _022201D8 ; =0x00002079 + mov r1, #6 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_022201CE: + mov r0, #2 + pop {r4, pc} + nop +_022201D4: .word 0x000005DD +_022201D8: .word 0x00002079 + thumb_func_end ov13_0222012C + + thumb_func_start ov13_022201DC +ov13_022201DC: ; 0x022201DC + push {r4, lr} + add r4, r0, #0 + bl ov13_0222130C + cmp r0, #3 + bhi _0222028C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022201F4: ; jump table + .short _022201FC - _022201F4 - 2 ; case 0 + .short _0222022A - _022201F4 - 2 ; case 1 + .short _02220256 - _022201F4 - 2 ; case 2 + .short _0222026E - _022201F4 - 2 ; case 3 +_022201FC: + ldr r1, [r4, #0] + mov r2, #0 + ldrb r1, [r1, #0x11] + add r0, r4, #0 + mvn r2, r2 + bl ov13_02221428 + cmp r0, #0xff + beq _0222028C + ldr r1, [r4, #0] + strb r0, [r1, #0x11] + ldr r0, _02220290 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xc + bl ov13_02225FCC + ldr r0, _02220294 ; =0x00002079 + mov r1, #0xe + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_0222022A: + ldr r1, [r4, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + mov r2, #1 + bl ov13_02221428 + cmp r0, #0xff + beq _0222028C + ldr r1, [r4, #0] + strb r0, [r1, #0x11] + ldr r0, _02220290 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xd + bl ov13_02225FCC + ldr r0, _02220294 ; =0x00002079 + mov r1, #0xe + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_02220256: + ldr r0, _02220290 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xb + bl ov13_02225FCC + ldr r0, _02220294 ; =0x00002079 + mov r1, #9 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_0222026E: + ldr r0, _02220290 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _02220298 ; =0x0000208C + mov r1, #1 + strb r1, [r4, r0] + mov r1, #7 + sub r0, #0x13 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r4, pc} +_0222028C: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02220290: .word 0x000005DD +_02220294: .word 0x00002079 +_02220298: .word 0x0000208C + thumb_func_end ov13_022201DC + + thumb_func_start ov13_0222029C +ov13_0222029C: ; 0x0222029C + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov13_02221354 + add r5, r0, #0 + cmp r5, #7 + bhi _0222038E + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022202B6: ; jump table + .short _022202C6 - _022202B6 - 2 ; case 0 + .short _022202C6 - _022202B6 - 2 ; case 1 + .short _022202C6 - _022202B6 - 2 ; case 2 + .short _022202C6 - _022202B6 - 2 ; case 3 + .short _022202FE - _022202B6 - 2 ; case 4 + .short _0222032C - _022202B6 - 2 ; case 5 + .short _02220358 - _022202B6 - 2 ; case 6 + .short _02220370 - _022202B6 - 2 ; case 7 +_022202C6: + ldr r0, [r4, #0] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r1, r4, r0 + lsl r0, r5, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x34] + cmp r0, #0 + beq _0222038E + ldr r0, _02220394 ; =0x000005DD + bl sub_02005748 + add r1, r5, #0 + add r1, #0xe + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl ov13_02225FCC + ldr r0, [r4, #0] + mov r1, #0xa + add r0, #0x34 + strb r5, [r0] + ldr r0, _02220398 ; =0x00002079 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_022202FE: + ldr r1, [r4, #0] + mov r2, #0 + ldrb r1, [r1, #0x11] + add r0, r4, #0 + mvn r2, r2 + bl ov13_02221428 + cmp r0, #0xff + beq _0222038E + ldr r1, [r4, #0] + strb r0, [r1, #0x11] + ldr r0, _02220394 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xc + bl ov13_02225FCC + ldr r0, _02220398 ; =0x00002079 + mov r1, #0xe + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_0222032C: + ldr r1, [r4, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + mov r2, #1 + bl ov13_02221428 + cmp r0, #0xff + beq _0222038E + ldr r1, [r4, #0] + strb r0, [r1, #0x11] + ldr r0, _02220394 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xd + bl ov13_02225FCC + ldr r0, _02220398 ; =0x00002079 + mov r1, #0xe + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_02220358: + ldr r0, _02220394 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #9 + bl ov13_02225FCC + ldr r0, _02220398 ; =0x00002079 + mov r1, #8 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_02220370: + ldr r0, _02220394 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _0222039C ; =0x0000208C + mov r1, #2 + strb r1, [r4, r0] + mov r1, #7 + sub r0, #0x13 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_0222038E: + mov r0, #4 + pop {r3, r4, r5, pc} + nop +_02220394: .word 0x000005DD +_02220398: .word 0x00002079 +_0222039C: .word 0x0000208C + thumb_func_end ov13_0222029C + + thumb_func_start ov13_022203A0 +ov13_022203A0: ; 0x022203A0 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov13_0222139C + add r5, r0, #0 + cmp r5, #4 + bhi _0222040A + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022203BA: ; jump table + .short _022203C4 - _022203BA - 2 ; case 0 + .short _022203C4 - _022203BA - 2 ; case 1 + .short _022203C4 - _022203BA - 2 ; case 2 + .short _022203C4 - _022203BA - 2 ; case 3 + .short _022203F2 - _022203BA - 2 ; case 4 +_022203C4: + ldr r1, [r4, #0] + add r0, r1, #0 + add r0, #0x34 + ldrb r0, [r0] + cmp r0, r5 + beq _022203E2 + ldrb r1, [r1, #0x11] + mov r0, #0x50 + mul r0, r1 + add r1, r4, r0 + lsl r0, r5, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x34] + cmp r0, #0 + beq _0222040A +_022203E2: + ldr r0, _02220410 ; =0x000005DD + bl sub_02005748 + ldr r0, [r4, #0] + add r0, #0x34 + strb r5, [r0] + mov r0, #0xa + pop {r3, r4, r5, pc} +_022203F2: + ldr r0, _02220410 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _02220414 ; =0x00002079 + mov r1, #9 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_0222040A: + mov r0, #5 + pop {r3, r4, r5, pc} + nop +_02220410: .word 0x000005DD +_02220414: .word 0x00002079 + thumb_func_end ov13_022203A0 + + thumb_func_start ov13_02220418 +ov13_02220418: ; 0x02220418 + push {r3, r4, r5, lr} + ldr r1, _022204F4 ; =0x02228E0C + add r4, r0, #0 + bl ov13_022213E4 + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _02220442 + ldr r0, _022204F8 ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228B64 + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _02220448 + mov r5, #6 + b _02220448 +_02220442: + add r0, r4, #0 + bl ov13_022256E8 +_02220448: + cmp r5, #6 + bhi _022204F0 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02220458: ; jump table + .short _02220466 - _02220458 - 2 ; case 0 + .short _02220466 - _02220458 - 2 ; case 1 + .short _02220466 - _02220458 - 2 ; case 2 + .short _02220466 - _02220458 - 2 ; case 3 + .short _02220466 - _02220458 - 2 ; case 4 + .short _02220490 - _02220458 - 2 ; case 5 + .short _022204D0 - _02220458 - 2 ; case 6 +_02220466: + lsl r0, r5, #0x18 + lsr r1, r0, #0x18 + ldr r0, [r4, #0] + add r0, #0x34 + strb r1, [r0] + ldr r0, _022204FC ; =0x0000208D + strb r1, [r4, r0] + ldr r0, _02220500 ; =0x000005DD + bl sub_02005748 + add r5, #0x17 + lsl r1, r5, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl ov13_02225FCC + ldr r0, _02220504 ; =0x00002079 + mov r1, #0xc + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_02220490: + ldr r0, _02220508 ; =0x00002077 + ldrb r3, [r4, r0] + lsl r1, r3, #0x18 + lsr r1, r1, #0x1c + beq _022204F0 + mov r2, #0xf + add r1, r3, #0 + bic r1, r2 + lsl r2, r3, #0x1c + lsr r3, r2, #0x1c + mov r2, #1 + eor r2, r3 + lsl r2, r2, #0x18 + lsr r3, r2, #0x18 + mov r2, #0xf + and r2, r3 + orr r1, r2 + strb r1, [r4, r0] + add r0, #0x16 + strb r5, [r4, r0] + ldr r0, _02220500 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x12 + bl ov13_02225FCC + ldr r0, _02220504 ; =0x00002079 + mov r1, #0xb + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_022204D0: + ldr r0, [r4, #0] + mov r1, #4 + add r0, #0x34 + strb r1, [r0] + ldr r0, _02220500 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _02220504 ; =0x00002079 + mov r1, #0x19 + strb r1, [r4, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_022204F0: + mov r0, #0x13 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022204F4: .word 0x02228E0C +_022204F8: .word 0x00002088 +_022204FC: .word 0x0000208D +_02220500: .word 0x000005DD +_02220504: .word 0x00002079 +_02220508: .word 0x00002077 + thumb_func_end ov13_02220418 + + thumb_func_start ov13_0222050C +ov13_0222050C: ; 0x0222050C + push {r3, r4, r5, lr} + ldr r1, _02220610 ; =0x02228D14 + add r5, r0, #0 + bl ov13_022213E4 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _02220536 + ldr r0, _02220614 ; =0x00002088 + ldr r0, [r5, r0] + bl ov13_02228B64 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _0222053C + mov r4, #2 + b _0222053C +_02220536: + add r0, r5, #0 + bl ov13_022256E8 +_0222053C: + cmp r4, #0 + beq _0222054A + cmp r4, #1 + beq _022205A6 + cmp r4, #2 + beq _022205EC + b _0222060A +_0222054A: + ldr r0, _02220618 ; =0x000005DD + bl sub_02005748 + ldr r0, _0222061C ; =0x00002077 + ldrb r0, [r5, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + bne _02220564 + add r0, r5, #0 + mov r1, #0x1c + bl ov13_02225FCC + b _0222056C +_02220564: + add r0, r5, #0 + mov r1, #0x1d + bl ov13_02225FCC +_0222056C: + add r0, r5, #0 + bl ov13_022219DC + cmp r0, #1 + bne _0222059C + add r0, r5, #0 + bl ov13_02223118 + ldr r0, _0222061C ; =0x00002077 + ldrb r0, [r5, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + bne _0222058E + add r0, r5, #0 + bl ov13_02221A04 + b _02220594 +_0222058E: + add r0, r5, #0 + bl ov13_02221A3C +_02220594: + ldr r0, _02220620 ; =0x00002079 + mov r1, #0x14 + strb r1, [r5, r0] + b _022205A2 +_0222059C: + ldr r0, _02220620 ; =0x00002079 + mov r1, #0x19 + strb r1, [r5, r0] +_022205A2: + mov r0, #0x16 + pop {r3, r4, r5, pc} +_022205A6: + ldr r0, _0222061C ; =0x00002077 + ldrb r0, [r5, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + beq _0222060A + ldr r0, _02220618 ; =0x000005DD + bl sub_02005748 + add r0, r5, #0 + mov r1, #0x12 + bl ov13_02225FCC + ldr r2, _0222061C ; =0x00002077 + mov r1, #0xf + ldrb r3, [r5, r2] + add r0, r3, #0 + bic r0, r1 + lsl r1, r3, #0x1c + lsr r3, r1, #0x1c + mov r1, #1 + eor r1, r3 + lsl r1, r1, #0x18 + lsr r3, r1, #0x18 + mov r1, #0xf + and r1, r3 + orr r0, r1 + strb r0, [r5, r2] + add r0, r2, #0 + add r0, #0x17 + strb r4, [r5, r0] + mov r1, #0xc + add r0, r2, #2 + strb r1, [r5, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_022205EC: + ldr r0, _02220618 ; =0x000005DD + bl sub_02005748 + add r0, r5, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _02220624 ; =0x0000208E + mov r1, #0 + strb r1, [r5, r0] + mov r1, #0xb + sub r0, #0x15 + strb r1, [r5, r0] + mov r0, #0x16 + pop {r3, r4, r5, pc} +_0222060A: + mov r0, #0x14 + pop {r3, r4, r5, pc} + nop +_02220610: .word 0x02228D14 +_02220614: .word 0x00002088 +_02220618: .word 0x000005DD +_0222061C: .word 0x00002077 +_02220620: .word 0x00002079 +_02220624: .word 0x0000208E + thumb_func_end ov13_0222050C + + thumb_func_start ov13_02220628 +ov13_02220628: ; 0x02220628 + push {r3, r4, r5, r6, lr} + sub sp, #4 + ldr r1, _02220714 ; =0x02228D64 + add r4, r0, #0 + ldr r6, [r4, #0] + bl ov13_022213E4 + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _02220656 + ldr r0, _02220718 ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228B64 + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _0222065C + mov r5, #4 + b _0222065C +_02220656: + add r0, r4, #0 + bl ov13_022256E8 +_0222065C: + cmp r5, #4 + bhi _0222070E + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222066C: ; jump table + .short _02220676 - _0222066C - 2 ; case 0 + .short _02220676 - _0222066C - 2 ; case 1 + .short _02220676 - _0222066C - 2 ; case 2 + .short _02220676 - _0222066C - 2 ; case 3 + .short _022206F4 - _0222066C - 2 ; case 4 +_02220676: + ldrb r1, [r6, #0x11] + mov r0, #0x50 + mul r0, r1 + add r1, r4, r0 + lsl r0, r5, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x34] + cmp r0, #0 + beq _0222070E + ldr r0, [r4, #0] + add r0, #0x34 + strb r5, [r0] + ldr r0, _0222071C ; =0x000005DD + bl sub_02005748 + add r1, r5, #0 + add r1, #0x13 + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl ov13_02225FCC + ldrh r0, [r6, #0x22] + add r3, r5, #0 + str r0, [sp] + ldrb r2, [r6, #0x11] + ldr r0, [r6, #8] + ldr r1, [r6, #0x28] + add r2, r6, r2 + add r2, #0x2c + ldrb r2, [r2] + bl ov16_0223E30C + cmp r0, #1 + bne _022206CE + ldr r0, _02220720 ; =0x0000207C + mov r1, #0 + strb r1, [r4, r0] + mov r1, #0x17 + sub r0, r0, #3 + strb r1, [r4, r0] + add sp, #4 + mov r0, #0x16 + pop {r3, r4, r5, r6, pc} +_022206CE: + ldr r2, _02220724 ; =0x00001FA8 + mov r1, #0x51 + ldr r0, [r4, r2] + add r2, #8 + ldr r2, [r4, r2] + bl sub_0200B1B8 + add r0, r4, #0 + bl ov13_022240E0 + ldr r0, [r4, #0] + mov r1, #6 + strb r1, [r0, #0x11] + ldr r0, _02220728 ; =0x00002079 + mov r1, #0x19 + strb r1, [r4, r0] + add sp, #4 + mov r0, #0x11 + pop {r3, r4, r5, r6, pc} +_022206F4: + ldr r0, _0222071C ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov13_02225FCC + ldr r0, _02220728 ; =0x00002079 + mov r1, #6 + strb r1, [r4, r0] + add sp, #4 + mov r0, #0x16 + pop {r3, r4, r5, r6, pc} +_0222070E: + mov r0, #0x15 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02220714: .word 0x02228D64 +_02220718: .word 0x00002088 +_0222071C: .word 0x000005DD +_02220720: .word 0x0000207C +_02220724: .word 0x00001FA8 +_02220728: .word 0x00002079 + thumb_func_end ov13_02220628 + + thumb_func_start ov13_0222072C +ov13_0222072C: ; 0x0222072C + push {r3, lr} + mov r1, #0 + bl ov13_022216C0 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov13_0222072C + + thumb_func_start ov13_02220738 +ov13_02220738: ; 0x02220738 + push {r3, lr} + mov r1, #1 + bl ov13_022216C0 + mov r0, #2 + pop {r3, pc} + thumb_func_end ov13_02220738 + + thumb_func_start ov13_02220744 +ov13_02220744: ; 0x02220744 + push {r3, lr} + mov r1, #2 + bl ov13_022216C0 + mov r0, #3 + pop {r3, pc} + thumb_func_end ov13_02220744 + + thumb_func_start ov13_02220750 +ov13_02220750: ; 0x02220750 + push {r3, lr} + mov r1, #3 + bl ov13_022216C0 + mov r0, #4 + pop {r3, pc} + thumb_func_end ov13_02220750 + + thumb_func_start ov13_0222075C +ov13_0222075C: ; 0x0222075C + push {r3, lr} + mov r1, #4 + bl ov13_022216C0 + mov r0, #5 + pop {r3, pc} + thumb_func_end ov13_0222075C + + thumb_func_start ov13_02220768 +ov13_02220768: ; 0x02220768 + push {r3, lr} + ldr r1, _02220788 ; =0x00002077 + ldrb r1, [r0, r1] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + bne _0222077C + mov r1, #6 + bl ov13_022216C0 + b _02220782 +_0222077C: + mov r1, #8 + bl ov13_022216C0 +_02220782: + mov r0, #0x13 + pop {r3, pc} + nop +_02220788: .word 0x00002077 + thumb_func_end ov13_02220768 + + thumb_func_start ov13_0222078C +ov13_0222078C: ; 0x0222078C + push {r4, lr} + add r4, r0, #0 + bl ov13_022252E8 + ldr r0, _022207B4 ; =0x00002077 + ldrb r0, [r4, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + bne _022207A8 + add r0, r4, #0 + mov r1, #7 + bl ov13_022216C0 + b _022207B0 +_022207A8: + add r0, r4, #0 + mov r1, #9 + bl ov13_022216C0 +_022207B0: + mov r0, #0x14 + pop {r4, pc} + ; .align 2, 0 +_022207B4: .word 0x00002077 + thumb_func_end ov13_0222078C + + thumb_func_start ov13_022207B8 +ov13_022207B8: ; 0x022207B8 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl ov13_022216C0 + ldr r2, [r4, #0] + mov r1, #0x25 + ldrh r0, [r2, #0x22] + ldr r2, [r2, #0xc] + bl sub_0207CFF0 + cmp r0, #0 + beq _022207D6 + mov r0, #0x18 + pop {r4, pc} +_022207D6: + mov r0, #0x15 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_022207B8 + + thumb_func_start ov13_022207DC +ov13_022207DC: ; 0x022207DC + push {r4, lr} + ldr r1, _02220818 ; =0x0000207A + add r4, r0, #0 + ldrb r1, [r4, r1] + bl ov13_02224B7C + ldr r1, _02220818 ; =0x0000207A + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02221BF8 + ldr r1, _02220818 ; =0x0000207A + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_022260EC + ldr r1, _02220818 ; =0x0000207A + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_022214E0 + ldr r0, _02220818 ; =0x0000207A + ldrb r0, [r4, r0] + cmp r0, #2 + bne _02220812 + mov r0, #3 + pop {r4, pc} +_02220812: + mov r0, #4 + pop {r4, pc} + nop +_02220818: .word 0x0000207A + thumb_func_end ov13_022207DC + + thumb_func_start ov13_0222081C +ov13_0222081C: ; 0x0222081C + push {r4, lr} + add r4, r0, #0 + bl ov13_022240E0 + ldr r0, _02220830 ; =0x00002079 + mov r1, #0x10 + strb r1, [r4, r0] + mov r0, #0x11 + pop {r4, pc} + nop +_02220830: .word 0x00002079 + thumb_func_end ov13_0222081C + + thumb_func_start ov13_02220834 +ov13_02220834: ; 0x02220834 + push {r3, lr} + ldr r1, _02220844 ; =0x00002060 + add r0, r0, r1 + mov r1, #0 + bl sub_0200E084 + mov r0, #2 + pop {r3, pc} + ; .align 2, 0 +_02220844: .word 0x00002060 + thumb_func_end ov13_02220834 + + thumb_func_start ov13_02220848 +ov13_02220848: ; 0x02220848 + push {r3, lr} + ldr r1, _02220860 ; =0x0000207B + ldrb r0, [r0, r1] + bl sub_0201D724 + cmp r0, #0 + bne _0222085A + mov r0, #0x12 + pop {r3, pc} +_0222085A: + mov r0, #0x11 + pop {r3, pc} + nop +_02220860: .word 0x0000207B + thumb_func_end ov13_02220848 + + thumb_func_start ov13_02220864 +ov13_02220864: ; 0x02220864 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02220884 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _0222087A + bl sub_02022798 + cmp r0, #1 + bne _02220880 +_0222087A: + ldr r0, _02220888 ; =0x00002079 + ldrb r0, [r4, r0] + pop {r4, pc} +_02220880: + mov r0, #0x12 + pop {r4, pc} + ; .align 2, 0 +_02220884: .word 0x021BF67C +_02220888: .word 0x00002079 + thumb_func_end ov13_02220864 + + thumb_func_start ov13_0222088C +ov13_0222088C: ; 0x0222088C + ldr r1, _022208A0 ; =0x00001FA3 + ldrb r2, [r0, r1] + lsl r2, r2, #0x18 + lsr r2, r2, #0x1f + bne _0222089C + add r1, #0xd6 + ldrb r0, [r0, r1] + bx lr +_0222089C: + mov r0, #0x16 + bx lr + ; .align 2, 0 +_022208A0: .word 0x00001FA3 + thumb_func_end ov13_0222088C + + thumb_func_start ov13_022208A4 +ov13_022208A4: ; 0x022208A4 + push {r3, r4, r5, r6, r7, lr} + ldr r7, _02220A3C ; =0x0000207C + add r4, r0, #0 + ldrb r1, [r4, r7] + ldr r5, [r4, #0] + cmp r1, #4 + bls _022208B4 + b _02220A38 +_022208B4: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022208C0: ; jump table + .short _022208CA - _022208C0 - 2 ; case 0 + .short _0222098E - _022208C0 - 2 ; case 1 + .short _022209B6 - _022208C0 - 2 ; case 2 + .short _022209EE - _022208C0 - 2 ; case 3 + .short _02220A0E - _022208C0 - 2 ; case 4 +_022208CA: + ldrb r2, [r5, #0x11] + ldr r0, [r5, #8] + ldr r1, [r5, #0x28] + add r2, r5, r2 + add r2, #0x2c + ldrb r2, [r2] + bl ov16_0223DFAC + ldrb r2, [r5, #0x11] + mov r1, #0x50 + mul r1, r2 + add r1, r4, r1 + str r0, [r1, #4] + add r0, r4, #0 + bl ov13_02224144 + sub r0, r7, #2 + ldrb r0, [r4, r0] + ldrb r1, [r5, #0x11] + cmp r0, #5 + bne _02220914 + mov r0, #0x50 + mul r0, r1 + add r5, #0x34 + ldrb r1, [r5] + add r0, r4, r0 + ldr r0, [r0, #4] + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + add r1, r7, #4 + strh r0, [r4, r1] + mov r2, #2 + sub r0, r1, #4 + strb r2, [r4, r0] + b _02220986 +_02220914: + mov r0, #0x50 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #4] + bl sub_0208E9F0 + add r6, r0, #0 + ldrb r0, [r5, #0x11] + add r3, r4, #0 + mov r7, #0x50 + add r2, r0, #0 + add r3, #0x1b + mul r2, r7 + ldrb r1, [r3, r2] + mov r0, #0x78 + bic r1, r0 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1c + lsr r0, r0, #0x19 + orr r0, r1 + strb r0, [r3, r2] + ldrb r0, [r5, #0x11] + add r1, r0, #0 + mul r1, r7 + add r1, r4, r1 + ldrb r1, [r1, #0x1b] + lsl r1, r1, #0x19 + lsr r1, r1, #0x1c + cmp r1, #7 + bne _0222096A + add r0, #0xd + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02220A40 ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D3F4 + ldrb r1, [r5, #0x11] + add r0, r4, #0 + bl ov13_022234A8 +_0222096A: + ldrb r1, [r5, #0x11] + mov r0, #0x50 + mov r2, #0 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #4] + mov r1, #0xa3 + bl sub_02074470 + ldr r1, _02220A44 ; =0x0000207E + mov r2, #4 + strh r0, [r4, r1] + sub r0, r1, #2 + strb r2, [r4, r0] +_02220986: + ldr r0, _02220A48 ; =0x000005EC + bl sub_02005748 + b _02220A38 +_0222098E: + ldrb r1, [r5, #0x11] + add r6, r4, #0 + mov r2, #0x50 + add r3, r1, #0 + add r6, #0x14 + mul r3, r2 + add r1, r7, #2 + ldrh r2, [r4, r1] + ldrh r1, [r6, r3] + cmp r2, r1 + beq _022209B0 + add r1, r1, #1 + strh r1, [r6, r3] + ldrb r1, [r5, #0x11] + bl ov13_02223448 + b _02220A38 +_022209B0: + mov r0, #3 + strb r0, [r4, r7] + b _02220A38 +_022209B6: + ldrb r3, [r5, #0x11] + add r1, r4, #0 + mov r2, #0x50 + add r1, #0x36 + mul r2, r3 + add r6, r1, r2 + add r1, r5, #0 + add r1, #0x34 + ldrb r1, [r1] + lsl r3, r1, #3 + add r1, r7, #4 + ldrh r2, [r4, r1] + ldrb r1, [r6, r3] + cmp r2, r1 + beq _022209E8 + add r1, r1, #1 + strb r1, [r6, r3] + add r5, #0x34 + ldrb r2, [r5] + add r1, r2, #1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl ov13_02223F5C + b _02220A38 +_022209E8: + mov r0, #3 + strb r0, [r4, r7] + b _02220A38 +_022209EE: + add r2, r5, #0 + add r2, #0x33 + ldrh r1, [r5, #0x22] + ldrb r2, [r2] + ldr r0, [r5, #8] + ldr r3, [r5, #0xc] + bl ov13_02221A54 + add r0, r4, #0 + bl ov13_022240E0 + mov r1, #0x19 + sub r0, r7, #3 + strb r1, [r4, r0] + mov r0, #0x11 + pop {r3, r4, r5, r6, r7, pc} +_02220A0E: + ldrb r1, [r5, #0x11] + add r3, r4, #0 + mov r2, #0x50 + mul r2, r1 + add r1, r7, #2 + add r3, #0x14 + ldrh r6, [r4, r1] + ldrh r1, [r3, r2] + cmp r6, r1 + beq _02220A32 + add r1, r1, #1 + strh r1, [r3, r2] + ldrb r1, [r5, #0x11] + bl ov13_02223448 + add r0, r4, #0 + bl ov13_022264C4 +_02220A32: + ldr r0, _02220A3C ; =0x0000207C + mov r1, #1 + strb r1, [r4, r0] +_02220A38: + mov r0, #0x17 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02220A3C: .word 0x0000207C +_02220A40: .word 0x00001FB8 +_02220A44: .word 0x0000207E +_02220A48: .word 0x000005EC + thumb_func_end ov13_022208A4 + + thumb_func_start ov13_02220A4C +ov13_02220A4C: ; 0x02220A4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + str r0, [sp, #4] + ldr r0, _02220B6C ; =0x0000207C + ldrb r0, [r5, r0] + cmp r0, #0 + beq _02220A68 + cmp r0, #1 + beq _02220AD2 + cmp r0, #2 + beq _02220B3C + b _02220B64 +_02220A68: + ldr r2, [sp, #4] + ldr r0, [sp, #4] + ldrb r3, [r2, #0x11] + ldr r1, [sp, #4] + ldr r0, [r0, #8] + add r2, r2, r3 + add r2, #0x2c + ldrb r2, [r2] + ldr r1, [r1, #0x28] + bl ov16_0223DFAC + ldr r1, [sp, #4] + mov r7, #0 + ldrb r2, [r1, #0x11] + mov r1, #0x50 + add r6, r7, #0 + mul r1, r2 + add r1, r5, r1 + str r0, [r1, #4] + add r4, r5, #0 +_02220A90: + ldr r0, [sp, #4] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r1, r5, r0 + add r0, r1, r6 + ldrh r0, [r0, #0x34] + cmp r0, #0 + beq _02220AB4 + ldr r0, [r1, #4] + add r1, r7, #0 + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + mov r1, #0x82 + lsl r1, r1, #6 + strh r0, [r4, r1] +_02220AB4: + add r7, r7, #1 + add r6, #8 + add r4, r4, #2 + cmp r7, #4 + blo _02220A90 + add r0, r5, #0 + bl ov13_02224144 + ldr r0, _02220B70 ; =0x000005EC + bl sub_02005748 + ldr r0, _02220B6C ; =0x0000207C + mov r1, #1 + strb r1, [r5, r0] + b _02220B64 +_02220AD2: + mov r6, #0 + add r4, r6, #0 + str r6, [sp] + add r7, r5, #0 +_02220ADA: + ldr r0, [sp, #4] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r1, r5, r0 + ldr r0, [sp] + add r1, r1, r0 + ldrh r0, [r1, #0x34] + cmp r0, #0 + bne _02220AF2 + add r6, r6, #1 + b _02220B22 +_02220AF2: + mov r0, #0x82 + add r2, r1, #0 + lsl r0, r0, #6 + add r2, #0x36 + ldrh r0, [r7, r0] + ldrb r2, [r2] + cmp r0, r2 + beq _02220B20 + add r0, r1, #0 + add r0, #0x36 + ldrb r0, [r0] + lsl r2, r4, #0x10 + add r1, #0x36 + add r0, r0, #1 + strb r0, [r1] + add r1, r4, #1 + lsl r1, r1, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov13_02223F5C + b _02220B22 +_02220B20: + add r6, r6, #1 +_02220B22: + ldr r0, [sp] + add r4, r4, #1 + add r0, #8 + add r7, r7, #2 + str r0, [sp] + cmp r4, #4 + blo _02220ADA + cmp r6, #4 + bne _02220B64 + ldr r0, _02220B6C ; =0x0000207C + mov r1, #2 + strb r1, [r5, r0] + b _02220B64 +_02220B3C: + ldr r2, [sp, #4] + ldr r1, [sp, #4] + ldr r0, [sp, #4] + add r2, #0x33 + ldr r3, [sp, #4] + ldrh r1, [r1, #0x22] + ldrb r2, [r2] + ldr r0, [r0, #8] + ldr r3, [r3, #0xc] + bl ov13_02221A54 + add r0, r5, #0 + bl ov13_022240E0 + ldr r0, _02220B74 ; =0x00002079 + mov r1, #0x19 + strb r1, [r5, r0] + add sp, #8 + mov r0, #0x11 + pop {r3, r4, r5, r6, r7, pc} +_02220B64: + mov r0, #0x18 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02220B6C: .word 0x0000207C +_02220B70: .word 0x000005EC +_02220B74: .word 0x00002079 + thumb_func_end ov13_02220A4C + + thumb_func_start ov13_02220B78 +ov13_02220B78: ; 0x02220B78 + push {lr} + sub sp, #0xc + mov r2, #0 + str r2, [sp] + mov r1, #0x10 + str r1, [sp, #4] + mov r1, #0x7a + str r2, [sp, #8] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0xa + add r3, r1, #0 + ldr r2, _02220BA0 ; =0x0000FFFF + sub r3, #0x12 + bl sub_02003178 + mov r0, #0x1a + add sp, #0xc + pop {pc} + nop +_02220BA0: .word 0x0000FFFF + thumb_func_end ov13_02220B78 + + thumb_func_start ov13_02220BA4 +ov13_02220BA4: ; 0x02220BA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x7a + add r4, r1, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200384C + cmp r0, #0 + beq _02220BBC + mov r0, #0 + pop {r3, r4, r5, pc} +_02220BBC: + add r0, r4, #0 + bl ov13_02220F60 + add r0, r4, #0 + bl ov13_02224970 + add r0, r4, #0 + bl ov13_02221BC8 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov13_02220D1C + ldr r0, _02220C08 ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228A5C + ldr r1, [r4, #0] + add r1, #0x32 + strb r0, [r1] + ldr r0, _02220C08 ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228A50 + mov r0, #2 + bl sub_02002C60 + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x36 + strb r1, [r0] + add r0, r5, #0 + bl sub_020067D0 + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_02220C08: .word 0x00002088 + thumb_func_end ov13_02220BA4 + + thumb_func_start ov13_02220C0C +ov13_02220C0C: ; 0x02220C0C + push {r3, r4, r5, lr} + sub sp, #0x80 + ldr r5, _02220D08 ; =0x02228D04 + add r3, sp, #0x70 + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + mov r1, #1 + bl sub_020183A0 + ldr r5, _02220D0C ; =0x02228D7C + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #7 + str r0, [r3, #0] + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r3, #0 + bl sub_020183C4 + ldr r5, _02220D10 ; =0x02228DB4 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #6 + str r0, [r3, #0] + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r3, #0 + bl sub_020183C4 + ldr r5, _02220D14 ; =0x02228DD0 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r3, #0 + bl sub_020183C4 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019EBC + ldr r5, _02220D18 ; =0x02228D98 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r3, #0 + bl sub_020183C4 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_02019EBC + ldr r3, [r4, #0] + mov r0, #5 + ldr r3, [r3, #0xc] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [r4, #0] + mov r0, #4 + ldr r3, [r3, #0xc] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_0201C3C0 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_0201C3C0 + add sp, #0x80 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02220D08: .word 0x02228D04 +_02220D0C: .word 0x02228D7C +_02220D10: .word 0x02228DB4 +_02220D14: .word 0x02228DD0 +_02220D18: .word 0x02228D98 + thumb_func_end ov13_02220C0C + + thumb_func_start ov13_02220D1C +ov13_02220D1C: ; 0x02220D1C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x1f + mov r1, #0 + bl sub_0201FF74 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + mov r1, #7 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02220D1C + + thumb_func_start ov13_02220D4C +ov13_02220D4C: ; 0x02220D4C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #0x48 + ldr r1, [r1, #0xc] + bl sub_02006C24 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldr r1, [r5, #0] + mov r2, #0x79 + ldr r1, [r1, #0xc] + lsl r2, r2, #2 + str r1, [sp, #0xc] + ldr r2, [r5, r2] + mov r1, #0x16 + mov r3, #7 + add r4, r0, #0 + bl sub_020070E8 + ldr r2, [r5, #0] + add r0, r4, #0 + ldr r2, [r2, #0xc] + mov r1, #0x14 + bl sub_02006CB8 + add r1, sp, #0x10 + add r6, r0, #0 + bl sub_020A7248 + ldr r1, [sp, #0x10] + add r0, r5, #0 + add r1, #0xc + bl ov13_02225710 + add r0, r6, #0 + bl sub_020181C4 + ldr r2, [r5, #0] + add r0, r4, #0 + ldr r2, [r2, #0xc] + mov r1, #0x15 + bl sub_02006CB8 + add r1, sp, #0x10 + add r6, r0, #0 + bl sub_020A7248 + ldr r1, [sp, #0x10] + add r0, r5, #0 + add r1, #0xc + bl ov13_02225A3C + add r0, r6, #0 + bl sub_020181C4 + mov r0, #1 + str r0, [sp] + lsl r0, r0, #9 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #0x7a + ldr r3, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r3, #0xc] + mov r1, #0x48 + mov r2, #0x17 + bl sub_02003050 + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02003164 + add r2, r0, #0 + ldr r0, _02220F04 ; =0x00001F60 + mov r1, #6 + lsl r1, r1, #6 + add r1, r2, r1 + add r0, r5, r0 + mov r2, #0x40 + bl sub_020D50B8 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + mov r0, #0x7a + ldr r3, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r3, #0xc] + mov r1, #0xe + mov r2, #6 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xf0 + str r0, [sp, #8] + ldr r3, [r5, #0] + add r0, #0xf8 + ldr r0, [r5, r0] + ldr r3, [r3, #0xc] + mov r1, #0xe + mov r2, #7 + bl sub_02003050 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223EDE0 + add r4, r0, #0 + bl sub_0200DD04 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #0] + mov r2, #0x79 + ldr r0, [r0, #0xc] + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r2, [r5, r2] + mov r0, #0x26 + mov r3, #4 + bl sub_02006E3C + add r0, r4, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + mov r0, #0x7a + ldr r3, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r3, #0xc] + mov r1, #0x26 + bl sub_02003050 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02003164 + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x20 + ldr r0, [r0, #0xc] + bl sub_02018144 + mov r1, #0x1a + lsl r1, r1, #4 + add r1, r6, r1 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020D50B8 + mov r0, #0x4d + lsl r0, r0, #2 + add r1, r6, r0 + ldrb r3, [r1] + add r2, r4, #0 + add r2, #0xe + strb r3, [r4, #0xe] + ldrb r3, [r1, #1] + strb r3, [r2, #1] + ldrb r3, [r1, #2] + strb r3, [r2, #2] + ldrb r1, [r1, #3] + mov r3, #0xd0 + strb r1, [r2, #3] + add r2, r0, #4 + add r1, r0, #4 + ldrb r2, [r6, r2] + add r1, r6, r1 + add r0, #0xb4 + strb r2, [r4, #6] + ldrb r2, [r1, #1] + strb r2, [r4, #7] + ldrb r2, [r1, #2] + strb r2, [r4, #8] + ldrb r1, [r1, #3] + mov r2, #1 + strb r1, [r4, #9] + mov r1, #0x20 + str r1, [sp] + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02002FBC + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_02220F04: .word 0x00001F60 + thumb_func_end ov13_02220D4C + + thumb_func_start ov13_02220F08 +ov13_02220F08: ; 0x02220F08 + push {r4, lr} + add r4, r0, #0 + ldr r3, [r4, #0] + mov r0, #0 + ldr r3, [r3, #0xc] + mov r1, #0x1a + mov r2, #3 + bl sub_0200B144 + ldr r1, _02220F50 ; =0x00001FA8 + mov r2, #0 + str r0, [r4, r1] + ldr r3, [r4, #0] + mov r0, #0xf + ldr r3, [r3, #0xc] + mov r1, #0xe + bl sub_0200C440 + ldr r1, _02220F54 ; =0x00001FA4 + str r0, [r4, r1] + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + bl sub_0200B358 + ldr r1, _02220F58 ; =0x00001FAC + str r0, [r4, r1] + ldr r1, [r4, #0] + mov r0, #2 + ldr r1, [r1, #0xc] + lsl r0, r0, #8 + bl sub_02023790 + ldr r1, _02220F5C ; =0x00001FB0 + str r0, [r4, r1] + pop {r4, pc} + nop +_02220F50: .word 0x00001FA8 +_02220F54: .word 0x00001FA4 +_02220F58: .word 0x00001FAC +_02220F5C: .word 0x00001FB0 + thumb_func_end ov13_02220F08 + + thumb_func_start ov13_02220F60 +ov13_02220F60: ; 0x02220F60 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02220F88 ; =0x00001FA8 + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _02220F8C ; =0x00001FA4 + ldr r0, [r4, r0] + bl sub_0200C560 + ldr r0, _02220F90 ; =0x00001FAC + ldr r0, [r4, r0] + bl sub_0200B3F0 + ldr r0, _02220F94 ; =0x00001FB0 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + nop +_02220F88: .word 0x00001FA8 +_02220F8C: .word 0x00001FA4 +_02220F90: .word 0x00001FAC +_02220F94: .word 0x00001FB0 + thumb_func_end ov13_02220F60 + + thumb_func_start ov13_02220F98 +ov13_02220F98: ; 0x02220F98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0207A0F8 + cmp r0, #0 + bgt _02220FB2 + b _02221246 +_02220FB2: + ldr r0, [sp, #8] + mov r1, #0x50 + mul r1, r0 + ldr r0, [sp] + str r1, [sp, #4] + add r4, r0, r1 + ldr r0, [r0, #0] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + bl sub_0207A0FC + str r0, [r4, #4] + mov r1, #5 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #8] + ldrh r0, [r4, #8] + cmp r0, #0 + bne _02220FDC + b _0222122A +_02220FDC: + ldr r0, [sp, #8] + mov r1, #0x50 + add r5, r0, #0 + mul r5, r1 + ldr r0, [sp] + mov r1, #0xa5 + add r4, r0, r5 + ldr r0, [r4, #4] + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xa] + ldr r0, [r4, #4] + mov r1, #0xa6 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xc] + ldr r0, [r4, #4] + mov r1, #0xa7 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xe] + ldr r0, [r4, #4] + mov r1, #0xa8 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x10] + ldr r0, [r4, #4] + mov r1, #0xa9 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x12] + ldr r0, [r4, #4] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x14] + ldr r0, [r4, #4] + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x16] + ldr r0, [r4, #4] + mov r1, #0xb1 + mov r2, #0 + bl sub_02074470 + strb r0, [r4, #0x18] + ldr r0, [r4, #4] + mov r1, #0xb2 + mov r2, #0 + bl sub_02074470 + ldr r6, [sp] + strb r0, [r4, #0x19] + ldr r0, [r4, #4] + add r6, #0x1a + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + ldrb r1, [r6, r5] + mov r2, #0x7f + lsl r0, r0, #0x18 + bic r1, r2 + lsr r2, r0, #0x18 + mov r0, #0x7f + and r0, r2 + orr r0, r1 + strb r0, [r6, r5] + ldr r0, [r4, #4] + mov r1, #0xb0 + mov r2, #0 + bl sub_02074470 + cmp r0, #1 + ldrb r1, [r6, r5] + bne _0222108C + mov r0, #0x80 + bic r1, r0 + strb r1, [r6, r5] + b _02221092 +_0222108C: + mov r0, #0x80 + orr r0, r1 + strb r0, [r6, r5] +_02221092: + ldr r0, [sp] + add r4, r0, r5 + add r6, r0, #0 + ldr r0, [r4, #4] + add r6, #0x1b + bl sub_02075D6C + ldrb r1, [r6, r5] + mov r2, #7 + bic r1, r2 + mov r2, #7 + and r0, r2 + orr r0, r1 + strb r0, [r6, r5] + ldr r0, [r4, #4] + bl sub_0208E9F0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1c + ldrb r1, [r6, r5] + mov r2, #0x78 + lsr r0, r0, #0x19 + bic r1, r2 + orr r0, r1 + strb r0, [r6, r5] + ldr r0, [r4, #4] + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1f + ldrb r1, [r6, r5] + mov r2, #0x80 + lsr r0, r0, #0x18 + bic r1, r2 + orr r0, r1 + strb r0, [r6, r5] + ldr r0, [r4, #4] + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x1c] + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x1e] + ldr r0, [r4, #4] + mov r1, #8 + mov r2, #0 + bl sub_02074470 + ldr r6, [sp] + str r0, [r4, #0x20] + add r6, #0x1a + ldrb r1, [r6, r5] + ldrh r0, [r4, #8] + lsl r1, r1, #0x19 + lsr r1, r1, #0x19 + bl sub_02075AD0 + str r0, [r4, #0x24] + ldrb r0, [r6, r5] + lsl r0, r0, #0x19 + lsr r1, r0, #0x19 + cmp r1, #0x64 + bne _0222112A + ldr r0, [sp] + add r4, r0, r5 + ldr r0, [r4, #0x24] + b _02221136 +_0222112A: + ldr r0, [sp] + add r1, r1, #1 + add r4, r0, r5 + ldrh r0, [r4, #8] + bl sub_02075AD0 +_02221136: + str r0, [r4, #0x28] + ldr r0, [r4, #4] + mov r1, #0x13 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x2c + strb r0, [r1] + ldr r0, [r4, #4] + mov r1, #0x14 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x2d + strb r0, [r1] + ldr r0, [r4, #4] + mov r1, #0x15 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x2e + strb r0, [r1] + ldr r0, [r4, #4] + mov r1, #0x16 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x2f + strb r0, [r1] + ldr r0, [r4, #4] + mov r1, #0x17 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x30 + strb r0, [r1] + ldr r0, [r4, #4] + mov r1, #0xa2 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x31 + strb r0, [r1] + ldr r0, [r4, #4] + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r4, #0x32 + strb r0, [r4] + ldr r1, [sp] + ldr r0, [sp, #4] + add r1, #0x34 + add r7, r1, r0 + ldr r1, [sp] + mov r4, #0 + add r6, r1, r0 +_022211B4: + lsl r0, r4, #3 + add r1, r4, #0 + str r0, [sp, #0xc] + add r5, r7, r0 + ldr r0, [r6, #4] + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #0xc] + strh r0, [r7, r1] + add r0, r1, #0 + ldrh r0, [r7, r0] + cmp r0, #0 + beq _02221220 + add r1, r4, #0 + ldr r0, [r6, #4] + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + strb r0, [r5, #2] + add r1, r4, #0 + ldr r0, [r6, #4] + add r1, #0x3e + mov r2, #0 + bl sub_02074470 + strb r0, [r5, #3] + ldrh r0, [r5] + ldrb r1, [r5, #3] + bl sub_020790DC + strb r0, [r5, #3] + ldrh r0, [r5] + mov r1, #3 + bl sub_020790C4 + strb r0, [r5, #4] + ldrh r0, [r5] + mov r1, #1 + bl sub_020790C4 + strb r0, [r5, #5] + ldrh r0, [r5] + mov r1, #4 + bl sub_020790C4 + strb r0, [r5, #6] + ldrh r0, [r5] + mov r1, #2 + bl sub_020790C4 + strb r0, [r5, #7] +_02221220: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #4 + blo _022211B4 +_0222122A: + ldr r0, [sp, #8] + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0207A0F8 + ldr r1, [sp, #8] + cmp r1, r0 + bge _02221246 + b _02220FB2 +_02221246: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02220F98 + + thumb_func_start ov13_0222124C +ov13_0222124C: ; 0x0222124C + push {r3, r4, r5, lr} + ldr r1, _022212BC ; =0x02228DEC + add r4, r0, #0 + bl ov13_022213E4 + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _02221298 + ldr r0, _022212C0 ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228B64 + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _02221276 + mov r5, #6 + b _02221280 +_02221276: + add r0, r0, #1 + cmp r5, r0 + bne _02221280 + mov r0, #0 + pop {r3, r4, r5, pc} +_02221280: + cmp r5, #6 + beq _02221290 + add r0, r4, #0 + add r1, r5, #0 + bl ov13_022213F0 + cmp r0, #0 + beq _022212B6 +_02221290: + ldr r0, [r4, #0] + strb r5, [r0, #0x11] + mov r0, #1 + pop {r3, r4, r5, pc} +_02221298: + cmp r5, #6 + beq _022212A8 + add r0, r4, #0 + add r1, r5, #0 + bl ov13_022213F0 + cmp r0, #0 + beq _022212B6 +_022212A8: + ldr r0, [r4, #0] + strb r5, [r0, #0x11] + add r0, r4, #0 + bl ov13_022256E8 + mov r0, #1 + pop {r3, r4, r5, pc} +_022212B6: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022212BC: .word 0x02228DEC +_022212C0: .word 0x00002088 + thumb_func_end ov13_0222124C + + thumb_func_start ov13_022212C4 +ov13_022212C4: ; 0x022212C4 + push {r3, r4, r5, lr} + ldr r1, _02221304 ; =0x02228D24 + add r5, r0, #0 + bl ov13_022213E4 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _022212F8 + ldr r0, _02221308 ; =0x00002088 + ldr r0, [r5, r0] + bl ov13_02228B64 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022212EE + mov r4, #3 + b _022212FE +_022212EE: + add r0, r0, #1 + cmp r4, r0 + bne _022212FE + mov r0, #0xff + pop {r3, r4, r5, pc} +_022212F8: + add r0, r5, #0 + bl ov13_022256E8 +_022212FE: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02221304: .word 0x02228D24 +_02221308: .word 0x00002088 + thumb_func_end ov13_022212C4 + + thumb_func_start ov13_0222130C +ov13_0222130C: ; 0x0222130C + push {r3, r4, r5, lr} + ldr r1, _0222134C ; =0x02228D38 + add r5, r0, #0 + bl ov13_022213E4 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _02221340 + ldr r0, _02221350 ; =0x00002088 + ldr r0, [r5, r0] + bl ov13_02228B64 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _02221336 + mov r4, #3 + b _02221346 +_02221336: + add r0, r0, #1 + cmp r4, r0 + bne _02221346 + mov r0, #0xff + pop {r3, r4, r5, pc} +_02221340: + add r0, r5, #0 + bl ov13_022256E8 +_02221346: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222134C: .word 0x02228D38 +_02221350: .word 0x00002088 + thumb_func_end ov13_0222130C + + thumb_func_start ov13_02221354 +ov13_02221354: ; 0x02221354 + push {r3, r4, r5, lr} + ldr r1, _02221394 ; =0x02228E2C + add r5, r0, #0 + bl ov13_022213E4 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _02221388 + ldr r0, _02221398 ; =0x00002088 + ldr r0, [r5, r0] + bl ov13_02228B64 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _0222137E + mov r4, #7 + b _0222138E +_0222137E: + add r0, r0, #1 + cmp r4, r0 + bne _0222138E + mov r0, #0xff + pop {r3, r4, r5, pc} +_02221388: + add r0, r5, #0 + bl ov13_022256E8 +_0222138E: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02221394: .word 0x02228E2C +_02221398: .word 0x00002088 + thumb_func_end ov13_02221354 + + thumb_func_start ov13_0222139C +ov13_0222139C: ; 0x0222139C + push {r3, r4, r5, lr} + ldr r1, _022213DC ; =0x02228D4C + add r5, r0, #0 + bl ov13_022213E4 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _022213D0 + ldr r0, _022213E0 ; =0x00002088 + ldr r0, [r5, r0] + bl ov13_02228B64 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022213C6 + mov r4, #4 + b _022213D6 +_022213C6: + add r0, r0, #1 + cmp r4, r0 + bne _022213D6 + mov r0, #0xff + pop {r3, r4, r5, pc} +_022213D0: + add r0, r5, #0 + bl ov13_022256E8 +_022213D6: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022213DC: .word 0x02228D4C +_022213E0: .word 0x00002088 + thumb_func_end ov13_0222139C + + thumb_func_start ov13_022213E4 +ov13_022213E4: ; 0x022213E4 + ldr r3, _022213EC ; =sub_02022664 + add r0, r1, #0 + bx r3 + nop +_022213EC: .word sub_02022664 + thumb_func_end ov13_022213E4 + + thumb_func_start ov13_022213F0 +ov13_022213F0: ; 0x022213F0 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x50 + add r5, r0, #0 + mul r1, r4 + add r1, r5, r1 + ldrh r1, [r1, #8] + cmp r1, #0 + bne _02221406 + mov r0, #0 + pop {r3, r4, r5, pc} +_02221406: + cmp r4, #0 + beq _02221420 + bl ov13_0222196C + cmp r0, #0 + bne _0222141C + add r0, r5, #0 + bl ov13_0222198C + cmp r0, #0 + beq _02221424 +_0222141C: + cmp r4, #1 + bne _02221424 +_02221420: + mov r0, #1 + pop {r3, r4, r5, pc} +_02221424: + mov r0, #2 + pop {r3, r4, r5, pc} + thumb_func_end ov13_022213F0 + + thumb_func_start ov13_02221428 +ov13_02221428: ; 0x02221428 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r7, r2, #0 + add r6, r4, #0 + bl ov13_0222198C + cmp r0, #1 + bne _022214A0 + ldr r2, _022214DC ; =0x02228CFC + add r1, sp, #0 + ldrb r3, [r2] + add r0, sp, #0 + mov r4, #0 + strb r3, [r1] + ldrb r3, [r2, #1] + strb r3, [r1, #1] + ldrb r3, [r2, #2] + strb r3, [r1, #2] + ldrb r3, [r2, #3] + strb r3, [r1, #3] + ldrb r3, [r2, #4] + ldrb r2, [r2, #5] + strb r3, [r1, #4] + strb r2, [r1, #5] +_0222145C: + ldrb r1, [r0] + cmp r6, r1 + beq _0222146A + add r4, r4, #1 + add r0, r0, #1 + cmp r4, #6 + blt _0222145C +_0222146A: + add r4, r4, r7 + bpl _02221472 + mov r4, #5 + b _02221478 +_02221472: + cmp r4, #6 + blt _02221478 + mov r4, #0 +_02221478: + add r0, sp, #0 + ldrb r1, [r0, r4] + cmp r6, r1 + beq _022214D4 + add r0, r5, #0 + bl ov13_022213F0 + cmp r0, #0 + beq _0222146A + add r0, sp, #0 + ldrb r0, [r0, r4] + mov r1, #0x50 + mul r1, r0 + add r1, r5, r1 + ldrb r1, [r1, #0x1b] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1f + bne _0222146A + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022214A0: + add r4, r4, r7 + bpl _022214A8 + mov r4, #5 + b _022214AE +_022214A8: + cmp r4, #6 + blt _022214AE + mov r4, #0 +_022214AE: + cmp r6, r4 + beq _022214D4 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_022213F0 + cmp r0, #0 + beq _022214A0 + mov r0, #0x50 + mul r0, r4 + add r0, r5, r0 + ldrb r0, [r0, #0x1b] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _022214A0 + lsl r0, r4, #0x18 + add sp, #8 + lsr r0, r0, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_022214D4: + mov r0, #0xff + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022214DC: .word 0x02228CFC + thumb_func_end ov13_02221428 + + thumb_func_start ov13_022214E0 +ov13_022214E0: ; 0x022214E0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + cmp r1, #2 + bne _0222155E + ldr r0, [r6, #0] + add r2, r6, #4 + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r0, r2, r0 + ldrb r1, [r0, #0x16] + lsl r1, r1, #0x19 + lsr r1, r1, #0x19 + cmp r1, #0x64 + bhs _0222150A + ldr r2, [r0, #0x20] + ldr r1, [r0, #0x24] + ldr r0, [r0, #0x1c] + sub r1, r1, r2 + sub r0, r0, r2 + b _0222150E +_0222150A: + mov r1, #0 + add r0, r1, #0 +_0222150E: + mov r2, #0x40 + bl sub_0208C0BC + add r4, r0, #0 + mov r5, #0 + mov r7, #0x1e +_0222151A: + cmp r4, #8 + blo _02221522 + add r1, r7, #0 + b _0222152A +_02221522: + add r0, r4, #0 + add r0, #0x16 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 +_0222152A: + add r2, r5, #0 + add r2, #0xa + lsl r2, r2, #0x10 + add r0, r6, #0 + lsr r2, r2, #0x10 + mov r3, #8 + bl ov13_02221560 + cmp r4, #8 + bhs _02221542 + mov r4, #0 + b _02221548 +_02221542: + sub r4, #8 + lsl r0, r4, #0x18 + lsr r4, r0, #0x18 +_02221548: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #8 + blo _0222151A + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r1, #7 + bl sub_0201C3C0 +_0222155E: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_022214E0 + + thumb_func_start ov13_02221560 +ov13_02221560: ; 0x02221560 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + lsl r1, r3, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #1 + str r1, [sp, #4] + add r4, r2, #0 + str r1, [sp, #8] + mov r1, #0x10 + str r1, [sp, #0xc] + mov r1, #0x79 + lsl r1, r1, #2 + ldr r0, [r0, r1] + lsl r3, r4, #0x18 + mov r1, #7 + add r2, r5, #0 + lsr r3, r3, #0x18 + bl sub_02019CB8 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov13_02221560 + + thumb_func_start ov13_02221590 +ov13_02221590: ; 0x02221590 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0xe + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x10 + lsl r6, r2, #1 + add r4, r1, #0 + str r0, [sp, #0xc] + mov r0, #0x79 + add r7, r6, #2 + lsl r0, r0, #2 + lsl r3, r7, #0x18 + ldr r0, [r5, r0] + mov r1, #7 + add r2, r4, #0 + lsr r3, r3, #0x18 + bl sub_02019CB8 + mov r0, #0xe + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + mov r0, #0x79 + add r6, r6, #3 + lsl r0, r0, #2 + add r2, r4, #1 + lsl r2, r2, #0x10 + lsl r3, r6, #0x18 + ldr r0, [r5, r0] + mov r1, #7 + lsr r2, r2, #0x10 + lsr r3, r3, #0x18 + bl sub_02019CB8 + mov r0, #0xf + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + mov r0, #0x79 + add r2, r4, #0 + lsl r0, r0, #2 + add r2, #0x20 + lsl r2, r2, #0x10 + lsl r3, r7, #0x18 + ldr r0, [r5, r0] + mov r1, #7 + lsr r2, r2, #0x10 + lsr r3, r3, #0x18 + bl sub_02019CB8 + mov r0, #0xf + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + mov r0, #0x79 + lsl r0, r0, #2 + add r4, #0x21 + lsl r2, r4, #0x10 + lsl r3, r6, #0x18 + ldr r0, [r5, r0] + mov r1, #7 + lsr r2, r2, #0x10 + lsr r3, r3, #0x18 + bl sub_02019CB8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_02221590 + + thumb_func_start ov13_02221630 +ov13_02221630: ; 0x02221630 + push {r4, r5, r6, lr} + ldr r6, _02221650 ; =0x00000125 + add r5, r0, #0 + mov r4, #0 +_02221638: + lsl r2, r4, #0x18 + add r0, r5, #0 + add r1, r6, #0 + lsr r2, r2, #0x18 + bl ov13_02221590 + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #6 + blo _02221638 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02221650: .word 0x00000125 + thumb_func_end ov13_02221630 + + thumb_func_start ov13_02221654 +ov13_02221654: ; 0x02221654 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + cmp r1, #9 + bne _022216BE + bl ov13_02221630 + ldr r1, [r5, #0] + add r0, r1, #0 + add r0, #0x34 + ldrb r2, [r0] + cmp r2, #4 + bhs _0222167C + ldrb r1, [r1, #0x11] + mov r0, #0x50 + mul r0, r1 + add r1, r5, r0 + lsl r0, r2, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x34] + b _0222167E +_0222167C: + ldrh r0, [r1, #0x24] +_0222167E: + mov r1, #0xa + bl sub_020790C4 + bl sub_02095734 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x18 + asr r6, r0, #0x18 + mov r4, #0 + cmp r6, #0 + ble _022216B2 + mov r7, #5 + lsl r7, r7, #6 +_0222169C: + lsl r2, r4, #0x18 + add r0, r5, #0 + add r1, r7, #0 + lsr r2, r2, #0x18 + bl ov13_02221590 + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, r6 + blt _0222169C +_022216B2: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #7 + bl sub_0201C3C0 +_022216BE: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_02221654 + + thumb_func_start ov13_022216C0 +ov13_022216C0: ; 0x022216C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov13_02221738 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #4 + mov r2, #0 + bl sub_02019F04 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #5 + mov r2, #0 + bl sub_02019F04 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02224B7C + add r0, r5, #0 + bl ov13_02221BB0 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02221AC4 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02221BF8 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_022214E0 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02221654 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_0222563C + add r0, r5, #0 + add r1, r4, #0 + bl ov13_022260EC + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02226444 + ldr r0, _02221734 ; =0x0000207A + strb r4, [r5, r0] + pop {r3, r4, r5, pc} + nop +_02221734: .word 0x0000207A + thumb_func_end ov13_022216C0 + + thumb_func_start ov13_02221738 +ov13_02221738: ; 0x02221738 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r2, _022217A0 ; =0x02228E50 + add r5, r0, #0 + lsl r0, r1, #3 + mov r4, #0 + add r6, r2, r0 +_02221746: + ldr r2, [r5, #0] + ldr r1, [r6, #0] + ldr r2, [r2, #0xc] + mov r0, #0x48 + bl sub_02006AC0 + add r1, sp, #0xc + add r7, r0, #0 + bl sub_020A7248 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + mov r0, #0x79 + lsl r0, r0, #2 + add r1, r4, #6 + ldr r2, [sp, #0xc] + lsl r1, r1, #0x18 + ldr r0, [r5, r0] + lsr r1, r1, #0x18 + add r2, #0xc + mov r3, #0 + bl sub_020198C0 + mov r0, #0x79 + lsl r0, r0, #2 + add r1, r4, #6 + lsl r1, r1, #0x18 + ldr r0, [r5, r0] + lsr r1, r1, #0x18 + bl sub_0201C3C0 + add r0, r7, #0 + bl sub_020181C4 + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #2 + blo _02221746 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022217A0: .word 0x02228E50 + thumb_func_end ov13_02221738 + + thumb_func_start ov13_022217A4 +ov13_022217A4: ; 0x022217A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + mov r2, #0x50 + ldrb r1, [r1, #0x11] + add r3, r5, #4 + mul r2, r1 + add r4, r3, r2 + bl ov13_022219AC + cmp r0, #1 + bne _02221800 + ldr r0, _02221940 ; =0x00001FA8 + mov r1, #0x50 + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + add r4, r0, #0 + ldr r0, [r1, #8] + ldr r1, [r1, #0x28] + bl ov16_0223E258 + add r1, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E120 + add r2, r0, #0 + ldr r0, _02221944 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200BA74 + ldr r1, _02221944 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02221800: + ldrh r0, [r4, #0x10] + cmp r0, #0 + bne _0222183C + ldr r0, _02221940 ; =0x00001FA8 + mov r1, #0x4d + ldr r0, [r5, r0] + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, [r4, #0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02221944 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02221944 ; =0x00001FAC + add r2, r6, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0222183C: + ldr r2, [r5, #0] + ldrb r0, [r2, #0x11] + add r0, r2, r0 + add r0, #0x2c + ldrb r1, [r0] + ldrb r0, [r2, #0x14] + cmp r0, r1 + beq _02221852 + ldrb r0, [r2, #0x15] + cmp r0, r1 + bne _02221888 +_02221852: + ldr r0, _02221940 ; =0x00001FA8 + mov r1, #0x4c + ldr r0, [r5, r0] + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, [r4, #0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02221944 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02221944 ; =0x00001FAC + add r2, r6, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02221888: + add r0, r5, #0 + bl ov13_0222194C + cmp r0, #1 + bne _022218A4 + ldr r2, _02221940 ; =0x00001FA8 + mov r1, #0x4f + ldr r0, [r5, r2] + add r2, #8 + ldr r2, [r5, r2] + bl sub_0200B1B8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022218A4: + ldr r2, [r5, #0] + ldrb r1, [r2, #0x12] + cmp r1, #6 + beq _022218F4 + ldrb r4, [r2, #0x11] + add r0, r2, r4 + add r0, #0x2c + ldrb r0, [r0] + cmp r1, r0 + bne _022218F4 + ldr r0, _02221940 ; =0x00001FA8 + mov r1, #0x5d + ldr r0, [r5, r0] + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x50 + mul r0, r4 + add r0, r5, r0 + ldr r0, [r0, #4] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02221944 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02221944 ; =0x00001FAC + add r2, r6, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022218F4: + ldrh r0, [r2, #0x24] + cmp r0, #0 + beq _0222193C + ldr r1, _02221948 ; =0x00002076 + mov r0, #0x50 + ldrb r2, [r5, r1] + sub r1, #0xce + add r4, r5, #4 + add r6, r2, #0 + mul r6, r0 + ldr r0, [r5, r1] + mov r1, #0x4e + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [r4, r6] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02221944 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02221944 ; =0x00001FAC + add r2, r7, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r7, #0 + bl sub_020237BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0222193C: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02221940: .word 0x00001FA8 +_02221944: .word 0x00001FAC +_02221948: .word 0x00002076 + thumb_func_end ov13_022217A4 + + thumb_func_start ov13_0222194C +ov13_0222194C: ; 0x0222194C + ldr r1, [r0, #0] + ldrb r2, [r1, #0x11] + mov r1, #0x50 + mul r1, r2 + add r0, r0, r1 + ldrb r0, [r0, #0x1b] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + beq _02221962 + mov r0, #1 + b _02221964 +_02221962: + mov r0, #0 +_02221964: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr + ; .align 2, 0 + thumb_func_end ov13_0222194C + + thumb_func_start ov13_0222196C +ov13_0222196C: ; 0x0222196C + push {r3, lr} + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl ov16_0223DF0C + cmp r0, #0x4a + beq _02221988 + cmp r0, #0x4b + beq _02221988 + mov r1, #0x12 + tst r0, r1 + beq _02221988 + mov r0, #1 + pop {r3, pc} +_02221988: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov13_0222196C + + thumb_func_start ov13_0222198C +ov13_0222198C: ; 0x0222198C + push {r3, lr} + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl ov16_0223DF0C + cmp r0, #0x4a + beq _022219A8 + cmp r0, #0x4b + beq _022219A8 + mov r1, #8 + tst r0, r1 + beq _022219A8 + mov r0, #1 + pop {r3, pc} +_022219A8: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov13_0222198C + + thumb_func_start ov13_022219AC +ov13_022219AC: ; 0x022219AC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov13_0222198C + cmp r0, #1 + bne _022219D4 + ldr r0, _022219D8 ; =0x0000208F + ldrb r0, [r5, r0] + cmp r0, #2 + bne _022219CC + mov r0, #1 + add r1, r4, #0 + tst r1, r0 + beq _022219D4 + pop {r3, r4, r5, pc} +_022219CC: + mov r0, #1 + add r1, r4, #0 + tst r1, r0 + beq _022219D6 +_022219D4: + mov r0, #0 +_022219D6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022219D8: .word 0x0000208F + thumb_func_end ov13_022219AC + + thumb_func_start ov13_022219DC +ov13_022219DC: ; 0x022219DC + ldr r2, [r0, #0] + add r1, r2, #0 + add r1, #0x34 + ldrb r3, [r1] + cmp r3, #4 + bne _022219EC + ldrh r0, [r2, #0x24] + b _022219FA +_022219EC: + ldrb r2, [r2, #0x11] + mov r1, #0x50 + mul r1, r2 + add r1, r0, r1 + lsl r0, r3, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x34] +_022219FA: + ldr r3, _02221A00 ; =sub_0207D28C + bx r3 + nop +_02221A00: .word sub_0207D28C + thumb_func_end ov13_022219DC + + thumb_func_start ov13_02221A04 +ov13_02221A04: ; 0x02221A04 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02221A34 ; =0x00002020 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0200D3F4 + ldr r0, _02221A38 ; =0x00002070 + ldr r0, [r4, r0] + add r0, #0xa0 + bl sub_0201AD10 + ldr r0, _02221A38 ; =0x00002070 + ldr r0, [r4, r0] + add r0, #0x60 + bl sub_0201AD10 + ldr r0, _02221A38 ; =0x00002070 + ldr r0, [r4, r0] + add r0, #0x70 + bl sub_0201AD10 + pop {r4, pc} + nop +_02221A34: .word 0x00002020 +_02221A38: .word 0x00002070 + thumb_func_end ov13_02221A04 + + thumb_func_start ov13_02221A3C +ov13_02221A3C: ; 0x02221A3C + push {r4, lr} + add r4, r0, #0 + bl ov13_02221630 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #7 + bl sub_0201C3C0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02221A3C + + thumb_func_start ov13_02221A54 +ov13_02221A54: ; 0x02221A54 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r4, #0x41 + beq _02221A78 + cmp r4, #0x43 + beq _02221A78 + cmp r4, #0x42 + beq _02221A78 + bl ov16_0223E1AC + add r1, r4, #0 + mov r2, #1 + add r3, r7, #0 + bl sub_0207D60C +_02221A78: + add r0, r5, #0 + bl ov16_0223E1B0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0207DA1C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_02221A54 + + .rodata + + + .global Unk_ov13_02228CFC +Unk_ov13_02228CFC: ; 0x02228CFC + .incbin "incbin/overlay13_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov13_02228D04 +Unk_ov13_02228D04: ; 0x02228D04 + .incbin "incbin/overlay13_rodata.bin", 0x8, 0x18 - 0x8 + + .global Unk_ov13_02228D14 +Unk_ov13_02228D14: ; 0x02228D14 + .incbin "incbin/overlay13_rodata.bin", 0x18, 0x28 - 0x18 + + .global Unk_ov13_02228D24 +Unk_ov13_02228D24: ; 0x02228D24 + .incbin "incbin/overlay13_rodata.bin", 0x28, 0x3C - 0x28 + + .global Unk_ov13_02228D38 +Unk_ov13_02228D38: ; 0x02228D38 + .incbin "incbin/overlay13_rodata.bin", 0x3C, 0x50 - 0x3C + + .global Unk_ov13_02228D4C +Unk_ov13_02228D4C: ; 0x02228D4C + .incbin "incbin/overlay13_rodata.bin", 0x50, 0x68 - 0x50 + + .global Unk_ov13_02228D64 +Unk_ov13_02228D64: ; 0x02228D64 + .incbin "incbin/overlay13_rodata.bin", 0x68, 0x80 - 0x68 + + .global Unk_ov13_02228D7C +Unk_ov13_02228D7C: ; 0x02228D7C + .incbin "incbin/overlay13_rodata.bin", 0x80, 0x9C - 0x80 + + .global Unk_ov13_02228D98 +Unk_ov13_02228D98: ; 0x02228D98 + .incbin "incbin/overlay13_rodata.bin", 0x9C, 0xB8 - 0x9C + + .global Unk_ov13_02228DB4 +Unk_ov13_02228DB4: ; 0x02228DB4 + .incbin "incbin/overlay13_rodata.bin", 0xB8, 0xD4 - 0xB8 + + .global Unk_ov13_02228DD0 +Unk_ov13_02228DD0: ; 0x02228DD0 + .incbin "incbin/overlay13_rodata.bin", 0xD4, 0xF0 - 0xD4 + + .global Unk_ov13_02228DEC +Unk_ov13_02228DEC: ; 0x02228DEC + .incbin "incbin/overlay13_rodata.bin", 0xF0, 0x110 - 0xF0 + + .global Unk_ov13_02228E0C +Unk_ov13_02228E0C: ; 0x02228E0C + .incbin "incbin/overlay13_rodata.bin", 0x110, 0x130 - 0x110 + + .global Unk_ov13_02228E2C +Unk_ov13_02228E2C: ; 0x02228E2C + .incbin "incbin/overlay13_rodata.bin", 0x130, 0x154 - 0x130 + + .global Unk_ov13_02228E50 +Unk_ov13_02228E50: ; 0x02228E50 + .incbin "incbin/overlay13_rodata.bin", 0x154, 0x50 + diff --git a/asm/ov13_02221A88.s b/asm/ov13_02221A88.s new file mode 100644 index 000000000..7ed5bc8ae --- /dev/null +++ b/asm/ov13_02221A88.s @@ -0,0 +1,5039 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02221A88 +ov13_02221A88: ; 0x02221A88 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, _02221AB8 ; =0x00002050 + ldr r4, _02221ABC ; =0x02228EA0 + mov r6, #0 + add r5, r7, r0 +_02221A94: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r7, r0] + add r1, r5, #0 + add r2, r4, #0 + bl sub_0201A8D4 + add r6, r6, #1 + add r4, #8 + add r5, #0x10 + cmp r6, #2 + blo _02221A94 + ldr r1, _02221AC0 ; =0x0000207A + add r0, r7, #0 + ldrb r1, [r7, r1] + bl ov13_02221AC4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02221AB8: .word 0x00002050 +_02221ABC: .word 0x02228EA0 +_02221AC0: .word 0x0000207A + thumb_func_end ov13_02221A88 + + thumb_func_start ov13_02221AC4 +ov13_02221AC4: ; 0x02221AC4 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + cmp r1, #9 + bhi _02221B44 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02221AD8: ; jump table + .short _02221AEC - _02221AD8 - 2 ; case 0 + .short _02221AF6 - _02221AD8 - 2 ; case 1 + .short _02221B00 - _02221AD8 - 2 ; case 2 + .short _02221B0A - _02221AD8 - 2 ; case 3 + .short _02221B14 - _02221AD8 - 2 ; case 4 + .short _02221B1E - _02221AD8 - 2 ; case 5 + .short _02221B28 - _02221AD8 - 2 ; case 6 + .short _02221B32 - _02221AD8 - 2 ; case 7 + .short _02221B28 - _02221AD8 - 2 ; case 8 + .short _02221B3C - _02221AD8 - 2 ; case 9 +_02221AEC: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #6 + ldr r6, _02221B88 ; =0x02228F54 + strb r1, [r4, r0] + b _02221B44 +_02221AF6: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #4 + ldr r6, _02221B8C ; =0x02228EDC + strb r1, [r4, r0] + b _02221B44 +_02221B00: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #0x23 + ldr r6, _02221B90 ; =0x022290FC + strb r1, [r4, r0] + b _02221B44 +_02221B0A: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #0xb + ldr r6, _02221B94 ; =0x02228FBC + strb r1, [r4, r0] + b _02221B44 +_02221B14: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #0x11 + ldr r6, _02221B98 ; =0x02229074 + strb r1, [r4, r0] + b _02221B44 +_02221B1E: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #5 + ldr r6, _02221B9C ; =0x02228EFC + strb r1, [r4, r0] + b _02221B44 +_02221B28: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #6 + ldr r6, _02221BA0 ; =0x02228F24 + strb r1, [r4, r0] + b _02221B44 +_02221B32: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #0xc + ldr r6, _02221BA4 ; =0x02229014 + strb r1, [r4, r0] + b _02221B44 +_02221B3C: + ldr r0, _02221B84 ; =0x00002074 + mov r1, #7 + ldr r6, _02221BA8 ; =0x02228F84 + strb r1, [r4, r0] +_02221B44: + ldr r1, _02221B84 ; =0x00002074 + ldr r0, [r4, #0] + ldrb r1, [r4, r1] + ldr r0, [r0, #0xc] + bl sub_0201A778 + ldr r1, _02221BAC ; =0x00002070 + mov r5, #0 + str r0, [r4, r1] + add r0, r1, #4 + ldrb r0, [r4, r0] + cmp r0, #0 + bls _02221B82 + add r7, r1, #4 +_02221B60: + ldr r1, _02221BAC ; =0x00002070 + mov r0, #0x79 + ldr r2, [r4, r1] + lsl r0, r0, #2 + lsl r1, r5, #4 + add r1, r2, r1 + lsl r2, r5, #3 + ldr r0, [r4, r0] + add r2, r6, r2 + bl sub_0201A8D4 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldrb r0, [r4, r7] + cmp r5, r0 + blo _02221B60 +_02221B82: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02221B84: .word 0x00002074 +_02221B88: .word 0x02228F54 +_02221B8C: .word 0x02228EDC +_02221B90: .word 0x022290FC +_02221B94: .word 0x02228FBC +_02221B98: .word 0x02229074 +_02221B9C: .word 0x02228EFC +_02221BA0: .word 0x02228F24 +_02221BA4: .word 0x02229014 +_02221BA8: .word 0x02228F84 +_02221BAC: .word 0x00002070 + thumb_func_end ov13_02221AC4 + + thumb_func_start ov13_02221BB0 +ov13_02221BB0: ; 0x02221BB0 + ldr r1, _02221BC0 ; =0x00002070 + add r2, r0, #0 + ldr r0, [r2, r1] + add r1, r1, #4 + ldr r3, _02221BC4 ; =sub_0201A928 + ldrb r1, [r2, r1] + bx r3 + nop +_02221BC0: .word 0x00002070 +_02221BC4: .word sub_0201A928 + thumb_func_end ov13_02221BB0 + + thumb_func_start ov13_02221BC8 +ov13_02221BC8: ; 0x02221BC8 + push {r3, r4, r5, lr} + ldr r1, _02221BF0 ; =0x00002070 + add r5, r0, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldrb r1, [r5, r1] + bl sub_0201A928 + ldr r0, _02221BF4 ; =0x00002050 + mov r4, #0 + add r5, r5, r0 +_02221BDE: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #2 + blo _02221BDE + pop {r3, r4, r5, pc} + nop +_02221BF0: .word 0x00002070 +_02221BF4: .word 0x00002050 + thumb_func_end ov13_02221BC8 + + thumb_func_start ov13_02221BF8 +ov13_02221BF8: ; 0x02221BF8 + push {r3, lr} + cmp r1, #9 + bhi _02221C52 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02221C0A: ; jump table + .short _02221C1E - _02221C0A - 2 ; case 0 + .short _02221C24 - _02221C0A - 2 ; case 1 + .short _02221C2A - _02221C0A - 2 ; case 2 + .short _02221C30 - _02221C0A - 2 ; case 3 + .short _02221C36 - _02221C0A - 2 ; case 4 + .short _02221C3C - _02221C0A - 2 ; case 5 + .short _02221C42 - _02221C0A - 2 ; case 6 + .short _02221C48 - _02221C0A - 2 ; case 7 + .short _02221C42 - _02221C0A - 2 ; case 8 + .short _02221C4E - _02221C0A - 2 ; case 9 +_02221C1E: + bl ov13_0222339C + pop {r3, pc} +_02221C24: + bl ov13_022234C8 + pop {r3, pc} +_02221C2A: + bl ov13_022237F8 + pop {r3, pc} +_02221C30: + bl ov13_022236B8 + pop {r3, pc} +_02221C36: + bl ov13_02223A10 + pop {r3, pc} +_02221C3C: + bl ov13_02223E68 + pop {r3, pc} +_02221C42: + bl ov13_02223B74 + pop {r3, pc} +_02221C48: + bl ov13_02223C9C + pop {r3, pc} +_02221C4E: + bl ov13_02223F7C +_02221C52: + pop {r3, pc} + thumb_func_end ov13_02221BF8 + + thumb_func_start ov13_02221C54 +ov13_02221C54: ; 0x02221C54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r6, r0, #0 + ldr r0, _02221DE4 ; =0x00002070 + str r3, [sp, #0x14] + ldr r5, [r6, r0] + lsl r4, r1, #4 + ldr r0, [sp, #0x14] + mov r1, #0x50 + mul r1, r0 + add r7, r6, #4 + add r0, r7, r1 + str r1, [sp, #0x24] + ldr r1, [r6, #0] + str r0, [sp, #0x20] + ldr r1, [r1, #0xc] + mov r0, #0xc + str r2, [sp, #0x10] + bl sub_02023790 + ldr r1, [sp, #0x14] + str r0, [sp, #0x1c] + ldr r0, _02221DE8 ; =0x00001FA8 + lsl r2, r1, #2 + ldr r1, _02221DEC ; =0x02228EC4 + ldr r0, [r6, r0] + ldr r1, [r1, r2] + bl sub_0200B1EC + str r0, [sp, #0x18] + ldr r0, [sp, #0x24] + ldr r0, [r7, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02221DF0 ; =0x00001FAC + mov r1, #0 + ldr r0, [r6, r0] + bl sub_0200B5CC + ldr r0, _02221DF0 ; =0x00001FAC + ldr r1, [sp, #0x1c] + ldr r0, [r6, r0] + ldr r2, [sp, #0x18] + bl sub_0200C388 + ldr r0, [sp, #0x10] + add r3, sp, #0x38 + cmp r0, #0 + bne _02221CD6 + ldrb r7, [r3, #0x14] + mov r0, #0xff + ldr r1, [sp, #0x10] + str r7, [sp] + str r0, [sp, #4] + ldr r0, _02221DF4 ; =0x000F0E00 + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldrb r3, [r3, #0x10] + add r0, r5, r4 + bl sub_0201D78C + b _02221CF2 +_02221CD6: + ldrb r7, [r3, #0x14] + mov r0, #0xff + ldr r1, [sp, #0x10] + str r7, [sp] + str r0, [sp, #4] + ldr r0, _02221DF8 ; =0x00070809 + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldrb r3, [r3, #0x10] + add r0, r5, r4 + bl sub_0201D78C +_02221CF2: + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x20] + ldrb r0, [r0, #0x16] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _02221DD8 + ldr r0, [sp, #0x20] + ldrb r0, [r0, #0x17] + lsl r1, r0, #0x18 + lsr r1, r1, #0x1f + bne _02221DD8 + lsl r0, r0, #0x1d + lsr r0, r0, #0x1d + bne _02221D76 + ldr r0, _02221DE8 ; =0x00001FA8 + mov r1, #0x10 + ldr r0, [r6, r0] + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, r4 + bl sub_0201C294 + str r0, [sp, #0x28] + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + ldr r1, [sp, #0x28] + str r7, [sp] + lsl r1, r1, #3 + sub r3, r1, r0 + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02221D5A + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02221DFC ; =0x00070800 + mov r1, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + b _02221D6E +_02221D5A: + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02221E00 ; =0x000A0B00 + mov r1, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C +_02221D6E: + add r0, r6, #0 + bl sub_020237BC + b _02221DD8 +_02221D76: + cmp r0, #1 + bne _02221DD8 + ldr r0, _02221DE8 ; =0x00001FA8 + mov r1, #0x11 + ldr r0, [r6, r0] + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, r4 + bl sub_0201C294 + str r0, [sp, #0x2c] + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + ldr r1, [sp, #0x2c] + str r7, [sp] + lsl r1, r1, #3 + sub r3, r1, r0 + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02221DBE + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0xc1 + lsl r0, r0, #0xa + str r0, [sp, #8] + mov r1, #0 + add r0, r5, r4 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + b _02221DD2 +_02221DBE: + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02221E04 ; =0x000C0D00 + mov r1, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C +_02221DD2: + add r0, r6, #0 + bl sub_020237BC +_02221DD8: + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_02221DE4: .word 0x00002070 +_02221DE8: .word 0x00001FA8 +_02221DEC: .word 0x02228EC4 +_02221DF0: .word 0x00001FAC +_02221DF4: .word 0x000F0E00 +_02221DF8: .word 0x00070809 +_02221DFC: .word 0x00070800 +_02221E00: .word 0x000A0B00 +_02221E04: .word 0x000C0D00 + thumb_func_end ov13_02221C54 + + thumb_func_start ov13_02221E08 +ov13_02221E08: ; 0x02221E08 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02221E4C ; =0x00002070 + lsl r4, r1, #4 + ldr r1, [r5, r0] + add r3, #8 + add r1, r1, r4 + str r1, [sp, #4] + str r3, [sp, #8] + add r1, sp, #0x10 + ldrb r1, [r1, #0x10] + mov r3, #0x50 + mul r3, r2 + str r1, [sp, #0xc] + add r2, r5, r3 + ldrb r2, [r2, #0x1a] + sub r0, #0xcc + ldr r0, [r5, r0] + lsl r2, r2, #0x19 + mov r1, #1 + lsr r2, r2, #0x19 + mov r3, #3 + bl sub_0200C648 + ldr r0, _02221E4C ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02221E4C: .word 0x00002070 + thumb_func_end ov13_02221E08 + + thumb_func_start ov13_02221E50 +ov13_02221E50: ; 0x02221E50 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x50 + add r7, r3, #0 + mul r0, r2 + add r3, r5, #4 + add r0, r3, r0 + str r0, [sp, #0xc] + add r0, sp, #0x18 + ldrb r6, [r0, #0x10] + ldr r0, _02221EC8 ; =0x00002070 + lsl r4, r1, #4 + ldr r1, [r5, r0] + sub r0, #0xcc + add r1, r1, r4 + str r1, [sp] + str r7, [sp, #4] + str r6, [sp, #8] + ldr r1, [sp, #0xc] + ldr r0, [r5, r0] + ldrh r1, [r1, #0x10] + mov r2, #3 + mov r3, #1 + bl sub_0200C5BC + add r3, r7, #0 + ldr r2, _02221ECC ; =0x00001FA4 + str r6, [sp] + ldr r0, [r5, r2] + add r2, #0xcc + ldr r2, [r5, r2] + mov r1, #0 + add r2, r2, r4 + add r3, #0x18 + bl sub_0200C578 + ldr r0, _02221EC8 ; =0x00002070 + add r7, #0x20 + ldr r1, [r5, r0] + sub r0, #0xcc + add r1, r1, r4 + str r1, [sp] + str r7, [sp, #4] + str r6, [sp, #8] + ldr r1, [sp, #0xc] + ldr r0, [r5, r0] + ldrh r1, [r1, #0x12] + mov r2, #3 + mov r3, #0 + bl sub_0200C5BC + ldr r0, _02221EC8 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02221EC8: .word 0x00002070 +_02221ECC: .word 0x00001FA4 + thumb_func_end ov13_02221E50 + + thumb_func_start ov13_02221ED0 +ov13_02221ED0: ; 0x02221ED0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r0, #0 + mov r0, #0x50 + str r1, [sp, #8] + mul r0, r2 + add r1, r4, #4 + str r3, [sp, #0xc] + add r5, r1, r0 + ldrh r0, [r5, #0x10] + ldrh r1, [r5, #0x12] + mov r2, #0x30 + mov r7, #1 + bl sub_0208C0BC + str r0, [sp, #0x14] + ldrh r0, [r5, #0x10] + ldrh r1, [r5, #0x12] + mov r2, #0x30 + bl sub_0208C104 + cmp r0, #4 + bhi _02221F2E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02221F0A: ; jump table + .short _02221F14 - _02221F0A - 2 ; case 0 + .short _02221F2C - _02221F0A - 2 ; case 1 + .short _02221F28 - _02221F0A - 2 ; case 2 + .short _02221F26 - _02221F0A - 2 ; case 3 + .short _02221F26 - _02221F0A - 2 ; case 4 +_02221F14: + ldr r0, _02221FA4 ; =0x00002070 + ldr r1, [r4, r0] + ldr r0, [sp, #8] + lsl r0, r0, #4 + add r0, r1, r0 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02221F26: + b _02221F2E +_02221F28: + mov r7, #3 + b _02221F2E +_02221F2C: + mov r7, #5 +_02221F2E: + add r0, sp, #0x20 + ldrb r6, [r0, #0x10] + add r0, r7, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + lsl r5, r0, #4 + ldr r0, [sp, #0x14] + add r3, r6, #1 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02221FA4 ; =0x00002070 + lsl r1, r1, #0x18 + ldr r0, [r4, r0] + lsl r3, r3, #0x10 + ldr r2, [sp, #0xc] + add r0, r0, r5 + lsr r1, r1, #0x18 + lsr r3, r3, #0x10 + bl sub_0201AE78 + ldr r0, [sp, #0x14] + add r3, r6, #2 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02221FA4 ; =0x00002070 + lsl r3, r3, #0x10 + ldr r0, [r4, r0] + ldr r2, [sp, #0xc] + add r0, r0, r5 + add r1, r7, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x10] + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02221FA4 ; =0x00002070 + add r3, r6, #4 + ldr r0, [r4, r0] + lsl r1, r1, #0x18 + lsl r3, r3, #0x10 + ldr r2, [sp, #0xc] + add r0, r0, r5 + lsr r1, r1, #0x18 + lsr r3, r3, #0x10 + bl sub_0201AE78 + ldr r0, _02221FA4 ; =0x00002070 + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02221FA4: .word 0x00002070 + thumb_func_end ov13_02221ED0 + + thumb_func_start ov13_02221FA8 +ov13_02221FA8: ; 0x02221FA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0] + mov r0, #0x10 + ldr r1, [r1, #0xc] + add r7, r2, #0 + bl sub_02023790 + add r6, r0, #0 + ldr r0, _02222020 ; =0x00001FA8 + mov r1, #8 + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r2, #0x50 + mul r2, r7 + str r0, [sp, #0x10] + ldr r0, _02222024 ; =0x00001FAC + add r2, r5, r2 + ldrh r2, [r2, #0x1c] + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200B6A0 + ldr r0, _02222024 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222028 ; =0x000F0E00 + lsl r4, r4, #4 + str r0, [sp, #8] + ldr r0, _0222202C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r2, r6, #0 + add r0, r0, r4 + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0222202C ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222020: .word 0x00001FA8 +_02222024: .word 0x00001FAC +_02222028: .word 0x000F0E00 +_0222202C: .word 0x00002070 + thumb_func_end ov13_02221FA8 + + thumb_func_start ov13_02222030 +ov13_02222030: ; 0x02222030 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0x50 + add r7, r1, #0 + add r1, r4, #4 + mul r0, r2 + add r5, r1, r0 + ldrh r0, [r5, #0x1a] + cmp r0, #0 + bne _02222054 + ldr r0, _022220BC ; =0x00001FA8 + mov r1, #0x14 + ldr r0, [r4, r0] + bl sub_0200B1EC + add r6, r0, #0 + b _0222208A +_02222054: + ldr r1, [r4, #0] + mov r0, #0x12 + ldr r1, [r1, #0xc] + bl sub_02023790 + add r6, r0, #0 + ldr r0, _022220BC ; =0x00001FA8 + mov r1, #9 + ldr r0, [r4, r0] + bl sub_0200B1EC + str r0, [sp, #0x10] + ldr r0, _022220C0 ; =0x00001FAC + ldrh r2, [r5, #0x1a] + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B70C + ldr r0, _022220C0 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r4, r0] + add r1, r6, #0 + bl sub_0200C388 + ldr r0, [sp, #0x10] + bl sub_020237BC +_0222208A: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022220C4 ; =0x000F0E00 + lsl r5, r7, #4 + str r0, [sp, #8] + ldr r0, _022220C8 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r4, r0] + add r2, r6, #0 + add r0, r0, r5 + add r3, r1, #0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _022220C8 ; =0x00002070 + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022220BC: .word 0x00001FA8 +_022220C0: .word 0x00001FAC +_022220C4: .word 0x000F0E00 +_022220C8: .word 0x00002070 + thumb_func_end ov13_02222030 + + thumb_func_start ov13_022220CC +ov13_022220CC: ; 0x022220CC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + str r1, [sp, #0x10] + ldr r1, [r5, #0] + ldr r0, _02222164 ; =0x00002070 + ldr r1, [r1, #0xc] + ldr r4, [r5, r0] + mov r0, #0x10 + str r3, [sp, #0x14] + lsl r6, r2, #4 + bl sub_02023790 + add r7, r0, #0 + ldr r0, _02222168 ; =0x00001FA8 + ldr r1, [sp, #0x14] + ldr r0, [r5, r0] + bl sub_0200B1EC + str r0, [sp, #0x18] + ldr r0, _0222216C ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200B630 + ldr r0, _0222216C ; =0x00001FAC + ldr r2, [sp, #0x18] + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_0200C388 + add r0, sp, #0x20 + ldrh r0, [r0, #0x10] + cmp r0, #2 + bne _02222130 + add r0, r4, r6 + bl sub_0201C294 + add r5, r0, #0 + add r0, sp, #0x20 + ldrh r0, [r0, #0x10] + add r1, r7, #0 + mov r2, #0 + bl sub_02002D7C + lsl r1, r5, #3 + sub r0, r1, r0 + lsr r3, r0, #1 + b _02222132 +_02222130: + mov r3, #0 +_02222132: + add r1, sp, #0x20 + ldrh r0, [r1, #0x14] + add r2, r7, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x38] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldrh r1, [r1, #0x10] + add r0, r4, r6 + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222164: .word 0x00002070 +_02222168: .word 0x00001FA8 +_0222216C: .word 0x00001FAC + thumb_func_end ov13_022220CC + + thumb_func_start ov13_02222170 +ov13_02222170: ; 0x02222170 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, _022221BC ; =0x00001FA8 + str r2, [sp, #0x10] + add r5, r1, #0 + ldr r0, [r4, r0] + add r6, r3, #0 + mov r1, #0xe + bl sub_0200B1EC + add r7, r0, #0 + str r6, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022221C0 ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, _022221C4 ; =0x00002070 + lsl r5, r5, #4 + ldr r0, [r4, r0] + ldr r3, [sp, #0x10] + add r0, r0, r5 + add r2, r7, #0 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, _022221C4 ; =0x00002070 + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_022221BC: .word 0x00001FA8 +_022221C0: .word 0x000F0E00 +_022221C4: .word 0x00002070 + thumb_func_end ov13_02222170 + + thumb_func_start ov13_022221C8 +ov13_022221C8: ; 0x022221C8 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _02222220 ; =0x00002050 + add r5, r1, #0 + mov r1, #1 + add r0, r4, r0 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + ldr r0, _02222220 ; =0x00002050 + mov r1, #0xf + add r0, r4, r0 + bl sub_0201ADA4 + ldr r0, _02222224 ; =0x00001FA8 + add r1, r5, #0 + ldr r0, [r4, r0] + bl sub_0200B1EC + add r5, r0, #0 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222228 ; =0x00010200 + mov r1, #1 + str r0, [sp, #8] + ldr r0, _02222220 ; =0x00002050 + add r2, r5, #0 + add r0, r4, r0 + str r3, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + ldr r0, _02222220 ; =0x00002050 + add r0, r4, r0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02222220: .word 0x00002050 +_02222224: .word 0x00001FA8 +_02222228: .word 0x00010200 + thumb_func_end ov13_022221C8 + + thumb_func_start ov13_0222222C +ov13_0222222C: ; 0x0222222C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r3, _02222288 ; =0x00002070 + lsl r4, r1, #4 + ldr r5, [r0, r3] + sub r3, #0xc8 + ldr r0, [r0, r3] + add r1, r2, #0 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #2 + add r1, r7, #0 + mov r2, #0 + bl sub_02002D7C + add r6, r0, #0 + add r0, r5, r4 + bl sub_0201C294 + add r3, r0, #0 + mov r0, #6 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222228C ; =0x00070809 + lsl r3, r3, #3 + str r0, [sp, #8] + mov r0, #0 + sub r3, r3, r6 + str r0, [sp, #0xc] + add r0, r5, r4 + mov r1, #2 + add r2, r7, #0 + lsr r3, r3, #1 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02222288: .word 0x00002070 +_0222228C: .word 0x00070809 + thumb_func_end ov13_0222222C + + thumb_func_start ov13_02222290 +ov13_02222290: ; 0x02222290 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + mov r0, #0x50 + mul r0, r1 + add r2, r5, #4 + add r4, r2, r0 + ldr r1, _0222244C ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r5, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldr r0, [r5, r1] + mov r1, #0x17 + bl sub_0200B1EC + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r2, _02222450 ; =0x000F0E00 + add r0, #0x31 + str r2, [sp, #8] + ldr r2, _02222454 ; =0x00002070 + str r1, [sp, #0xc] + ldr r2, [r5, r2] + add r3, r1, #0 + add r0, r2, r0 + add r2, r7, #0 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, _02222458 ; =0x00001FA8 + mov r1, #0x18 + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x18] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + str r0, [sp, #0x1c] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldrb r2, [r4, #0x16] + ldr r0, _0222245C ; =0x00001FAC + mov r3, #3 + lsl r2, r2, #0x19 + ldr r0, [r5, r0] + lsr r2, r2, #0x19 + bl sub_0200B60C + ldr r0, _0222245C ; =0x00001FAC + ldr r1, [sp, #0x1c] + ldr r0, [r5, r0] + ldr r2, [sp, #0x18] + bl sub_0200C388 + mov r1, #0 + add r0, r6, #0 + add r0, #0xb + lsl r7, r0, #4 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222450 ; =0x000F0E00 + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + ldr r0, _02222454 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r1, #0 + add r0, r0, r7 + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, _02222458 ; =0x00001FA8 + mov r1, #0x19 + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0 + str r0, [sp, #0x20] + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r2, _02222450 ; =0x000F0E00 + add r0, #0x41 + str r2, [sp, #8] + ldr r2, _02222454 ; =0x00002070 + str r1, [sp, #0xc] + ldr r2, [r5, r2] + add r3, r1, #0 + add r0, r2, r0 + ldr r2, [sp, #0x20] + bl sub_0201D78C + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, _02222458 ; =0x00001FA8 + mov r1, #0x1a + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x14] + ldr r1, [r1, #0xc] + mov r0, #0xe + bl sub_02023790 + str r0, [sp, #0x10] + ldrb r0, [r4, #0x16] + lsl r0, r0, #0x19 + lsr r0, r0, #0x19 + cmp r0, #0x64 + bhs _022223B0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222245C ; =0x00001FAC + ldr r2, [r4, #0x24] + ldr r3, [r4, #0x1c] + ldr r0, [r5, r0] + sub r2, r2, r3 + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + b _022223C4 +_022223B0: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222245C ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + mov r3, #6 + bl sub_0200B60C +_022223C4: + ldr r0, _0222245C ; =0x00001FAC + ldr r1, [sp, #0x10] + ldr r0, [r5, r0] + ldr r2, [sp, #0x14] + bl sub_0200C388 + ldr r0, _02222454 ; =0x00002070 + add r6, #0xc + ldr r0, [r5, r0] + lsl r4, r6, #4 + add r0, r0, r4 + bl sub_0201C294 + add r6, r0, #0 + mov r0, #0 + ldr r1, [sp, #0x10] + add r2, r0, #0 + bl sub_02002D7C + lsl r1, r6, #3 + sub r0, r1, r0 + lsl r0, r0, #0x10 + mov r1, #0 + lsr r3, r0, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222460 ; =0x00010200 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + ldr r0, _02222454 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, [sp, #0x10] + bl sub_020237BC + ldr r0, _02222454 ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _02222454 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r7 + bl sub_0201A9A4 + ldr r0, _02222454 ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #5 + lsl r0, r0, #6 + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _02222454 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222244C: .word 0x00002075 +_02222450: .word 0x000F0E00 +_02222454: .word 0x00002070 +_02222458: .word 0x00001FA8 +_0222245C: .word 0x00001FAC +_02222460: .word 0x00010200 + thumb_func_end ov13_02222290 + + thumb_func_start ov13_02222464 +ov13_02222464: ; 0x02222464 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + add r5, r0, #0 + ldr r1, _02222548 ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r5, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, r1] + mov r1, #0x20 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222254C ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _02222550 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r1, #0 + add r0, #0xe0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222554 ; =0x00001FA8 + mov r1, #0x21 + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x10] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + mov r2, #0x50 + add r6, r0, #0 + mul r2, r7 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222558 ; =0x00001FAC + add r2, r5, r2 + ldrh r2, [r2, #0xa] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222558 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r4, #5 + lsl r4, r0, #4 + ldr r0, _02222550 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsl r0, r0, #0x18 + mov r1, #0 + lsr r3, r0, #0x18 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222255C ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _02222550 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222550 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0xe0 + bl sub_0201A9A4 + ldr r0, _02222550 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02222548: .word 0x00002075 +_0222254C: .word 0x000F0E00 +_02222550: .word 0x00002070 +_02222554: .word 0x00001FA8 +_02222558: .word 0x00001FAC +_0222255C: .word 0x00010200 + thumb_func_end ov13_02222464 + + thumb_func_start ov13_02222560 +ov13_02222560: ; 0x02222560 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + add r5, r0, #0 + ldr r1, _02222644 ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r5, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, r1] + mov r1, #0x22 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222648 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _0222264C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r1, #0 + add r0, #0xf0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222650 ; =0x00001FA8 + mov r1, #0x23 + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x10] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + mov r2, #0x50 + add r6, r0, #0 + mul r2, r7 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222654 ; =0x00001FAC + add r2, r5, r2 + ldrh r2, [r2, #0xc] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222654 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r4, #6 + lsl r4, r0, #4 + ldr r0, _0222264C ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsl r0, r0, #0x18 + mov r1, #0 + lsr r3, r0, #0x18 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222658 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _0222264C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0222264C ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0xf0 + bl sub_0201A9A4 + ldr r0, _0222264C ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02222644: .word 0x00002075 +_02222648: .word 0x000F0E00 +_0222264C: .word 0x00002070 +_02222650: .word 0x00001FA8 +_02222654: .word 0x00001FAC +_02222658: .word 0x00010200 + thumb_func_end ov13_02222560 + + thumb_func_start ov13_0222265C +ov13_0222265C: ; 0x0222265C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + add r5, r0, #0 + ldr r1, _02222744 ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r5, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, r1] + mov r1, #0x28 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r2, #0xff + str r2, [sp, #4] + ldr r0, _02222748 ; =0x000F0E00 + add r2, r2, #1 + str r0, [sp, #8] + ldr r0, _0222274C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r1, #0 + add r0, r0, r2 + add r2, r6, #0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222750 ; =0x00001FA8 + mov r1, #0x29 + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x10] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + mov r2, #0x50 + add r6, r0, #0 + mul r2, r7 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222754 ; =0x00001FAC + add r2, r5, r2 + ldrh r2, [r2, #0xe] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222754 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r4, #7 + lsl r4, r0, #4 + ldr r0, _0222274C ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsl r0, r0, #0x18 + mov r1, #0 + lsr r3, r0, #0x18 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222758 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _0222274C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0222274C ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _0222274C ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222744: .word 0x00002075 +_02222748: .word 0x000F0E00 +_0222274C: .word 0x00002070 +_02222750: .word 0x00001FA8 +_02222754: .word 0x00001FAC +_02222758: .word 0x00010200 + thumb_func_end ov13_0222265C + + thumb_func_start ov13_0222275C +ov13_0222275C: ; 0x0222275C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + add r4, r0, #0 + ldr r1, _02222844 ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r4, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [r4, r1] + mov r1, #0x24 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r2, _02222848 ; =0x000F0E00 + add r0, #0x11 + str r2, [sp, #8] + ldr r2, _0222284C ; =0x00002070 + str r1, [sp, #0xc] + ldr r2, [r4, r2] + add r3, r1, #0 + add r0, r2, r0 + add r2, r6, #0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222850 ; =0x00001FA8 + mov r1, #0x25 + ldr r0, [r4, r0] + bl sub_0200B1EC + ldr r1, [r4, #0] + str r0, [sp, #0x10] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + mov r2, #0x50 + add r6, r0, #0 + mul r2, r7 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222854 ; =0x00001FAC + add r2, r4, r2 + ldrh r2, [r2, #0x10] + ldr r0, [r4, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222854 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r4, r0] + add r1, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, _0222284C ; =0x00002070 + add r5, #8 + ldr r0, [r4, r0] + lsl r5, r5, #4 + add r0, r0, r5 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsl r0, r0, #0x18 + mov r1, #0 + lsr r3, r0, #0x18 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222858 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _0222284C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0222284C ; =0x00002070 + ldr r1, [r4, r0] + mov r0, #0x11 + lsl r0, r0, #4 + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _0222284C ; =0x00002070 + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222844: .word 0x00002075 +_02222848: .word 0x000F0E00 +_0222284C: .word 0x00002070 +_02222850: .word 0x00001FA8 +_02222854: .word 0x00001FAC +_02222858: .word 0x00010200 + thumb_func_end ov13_0222275C + + thumb_func_start ov13_0222285C +ov13_0222285C: ; 0x0222285C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + add r4, r0, #0 + ldr r1, _02222944 ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r4, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [r4, r1] + mov r1, #0x26 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r2, _02222948 ; =0x000F0E00 + add r0, #0x21 + str r2, [sp, #8] + ldr r2, _0222294C ; =0x00002070 + str r1, [sp, #0xc] + ldr r2, [r4, r2] + add r3, r1, #0 + add r0, r2, r0 + add r2, r6, #0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222950 ; =0x00001FA8 + mov r1, #0x27 + ldr r0, [r4, r0] + bl sub_0200B1EC + ldr r1, [r4, #0] + str r0, [sp, #0x10] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + mov r2, #0x50 + add r6, r0, #0 + mul r2, r7 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222954 ; =0x00001FAC + add r2, r4, r2 + ldrh r2, [r2, #0x12] + ldr r0, [r4, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222954 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r4, r0] + add r1, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, _0222294C ; =0x00002070 + add r5, #9 + ldr r0, [r4, r0] + lsl r5, r5, #4 + add r0, r0, r5 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsl r0, r0, #0x18 + mov r1, #0 + lsr r3, r0, #0x18 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222958 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _0222294C ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0222294C ; =0x00002070 + ldr r1, [r4, r0] + mov r0, #0x12 + lsl r0, r0, #4 + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _0222294C ; =0x00002070 + ldr r0, [r4, r0] + add r0, r0, r5 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222944: .word 0x00002075 +_02222948: .word 0x000F0E00 +_0222294C: .word 0x00002070 +_02222950: .word 0x00001FA8 +_02222954: .word 0x00001FAC +_02222958: .word 0x00010200 + thumb_func_end ov13_0222285C + + thumb_func_start ov13_0222295C +ov13_0222295C: ; 0x0222295C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + mov r0, #0x50 + mul r0, r1 + add r2, r5, #4 + add r7, r2, r0 + ldr r1, _02222ADC ; =0x00002075 + mov r0, #0x16 + ldrb r2, [r5, r1] + sub r1, #0xcd + mul r0, r2 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, r1] + mov r1, #0x1c + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222AE0 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _02222AE4 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r1, #0 + add r0, #0xd0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, _02222AE8 ; =0x00001FA8 + mov r1, #0x1f + ldr r0, [r5, r0] + bl sub_0200B1EC + str r0, [sp, #0x10] + mov r0, #0 + ldr r1, [sp, #0x10] + add r2, r0, #0 + bl sub_02002D7C + str r0, [sp, #0x14] + ldr r0, _02222AE4 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201C294 + lsl r1, r0, #3 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + sub r0, r1, r0 + lsl r0, r0, #0xf + lsr r6, r0, #0x10 + add r0, r4, #4 + mov r1, #0 + lsl r4, r0, #4 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222AEC ; =0x00010200 + add r3, r6, #0 + str r0, [sp, #8] + ldr r0, _02222AE4 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + ldr r0, _02222AE8 ; =0x00001FA8 + mov r1, #0x1d + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x18] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + str r0, [sp, #0x1c] + mov r1, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222AF0 ; =0x00001FAC + ldrh r2, [r7, #0x10] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222AF0 ; =0x00001FAC + ldr r1, [sp, #0x1c] + ldr r0, [r5, r0] + ldr r2, [sp, #0x18] + bl sub_0200C388 + mov r0, #0 + ldr r1, [sp, #0x1c] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222AEC ; =0x00010200 + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + ldr r0, _02222AE4 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + sub r3, r6, r3 + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, _02222AE8 ; =0x00001FA8 + mov r1, #0x1e + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x20] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + str r0, [sp, #0x24] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222AF0 ; =0x00001FAC + ldrh r2, [r7, #0x12] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222AF0 ; =0x00001FAC + ldr r1, [sp, #0x24] + ldr r0, [r5, r0] + ldr r2, [sp, #0x20] + bl sub_0200C388 + mov r1, #0 + ldr r3, [sp, #0x14] + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222AEC ; =0x00010200 + ldr r2, [sp, #0x24] + str r0, [sp, #8] + ldr r0, _02222AE4 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r6, r3 + add r0, r0, r4 + bl sub_0201D78C + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, [sp, #0x24] + bl sub_020237BC + ldr r0, _02222AE4 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0xd0 + bl sub_0201A9A4 + ldr r0, _02222AE4 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222ADC: .word 0x00002075 +_02222AE0: .word 0x000F0E00 +_02222AE4: .word 0x00002070 +_02222AE8: .word 0x00001FA8 +_02222AEC: .word 0x00010200 +_02222AF0: .word 0x00001FAC + thumb_func_end ov13_0222295C + + thumb_func_start ov13_02222AF4 +ov13_02222AF4: ; 0x02222AF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _02222B60 ; =0x00002075 + add r6, r1, #0 + ldrb r1, [r5, r0] + ldr r3, [r5, #0] + mov r2, #0x99 + add r4, r1, #0 + mov r0, #0x16 + mul r4, r0 + ldr r3, [r3, #0xc] + mov r0, #1 + mov r1, #0x1a + lsl r2, r2, #2 + bl sub_0200B144 + mov r1, #0x50 + mul r1, r6 + add r1, r5, r1 + ldrh r1, [r1, #0x1c] + add r7, r0, #0 + bl sub_0200B1EC + add r6, r0, #0 + mov r1, #0 + add r0, r4, #2 + lsl r4, r0, #4 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222B64 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _02222B68 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r3, r1, #0 + add r0, r0, r4 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + ldr r0, _02222B68 ; =0x00002070 + ldr r0, [r5, r0] + add r0, r0, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222B60: .word 0x00002075 +_02222B64: .word 0x00010200 +_02222B68: .word 0x00002070 + thumb_func_end ov13_02222AF4 + + thumb_func_start ov13_02222B6C +ov13_02222B6C: ; 0x02222B6C + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r2, _02222BAC ; =0x00002070 + lsl r4, r1, #4 + ldr r5, [r0, r2] + sub r2, #0xc8 + ldr r0, [r0, r2] + mov r1, #0x33 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222BB0 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02222BAC: .word 0x00002070 +_02222BB0: .word 0x000F0E00 + thumb_func_end ov13_02222B6C + + thumb_func_start ov13_02222BB4 +ov13_02222BB4: ; 0x02222BB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r2, [sp, #0x10] + add r5, r0, #0 + ldr r2, _02222C90 ; =0x00002070 + ldr r0, [sp, #0x10] + lsl r6, r1, #4 + ldr r4, [r5, r2] + cmp r0, #0 + bne _02222C0E + sub r2, #0xc8 + ldr r0, [r5, r2] + mov r1, #0x32 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r4, r6 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r5 + lsl r0, r0, #0x10 + mov r1, #0 + lsr r3, r0, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222C94 ; =0x00010200 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + b _02222C84 +_02222C0E: + sub r2, #0xc8 + ldr r0, [r5, r2] + mov r1, #0x34 + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x14] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222C98 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222C98 ; =0x00001FAC + ldr r2, [sp, #0x14] + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r4, r6 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r5 + lsl r0, r0, #0x10 + mov r1, #0 + lsr r3, r0, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222C94 ; =0x00010200 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC +_02222C84: + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02222C90: .word 0x00002070 +_02222C94: .word 0x00010200 +_02222C98: .word 0x00001FAC + thumb_func_end ov13_02222BB4 + + thumb_func_start ov13_02222C9C +ov13_02222C9C: ; 0x02222C9C + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r2, _02222CDC ; =0x00002070 + lsl r4, r1, #4 + ldr r5, [r0, r2] + sub r2, #0xc8 + ldr r0, [r0, r2] + mov r1, #0x30 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222CE0 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02222CDC: .word 0x00002070 +_02222CE0: .word 0x000F0E00 + thumb_func_end ov13_02222C9C + + thumb_func_start ov13_02222CE4 +ov13_02222CE4: ; 0x02222CE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r2, [sp, #0x10] + add r5, r0, #0 + ldr r2, _02222DC0 ; =0x00002070 + ldr r0, [sp, #0x10] + lsl r6, r1, #4 + ldr r4, [r5, r2] + cmp r0, #1 + bhi _02222D3E + sub r2, #0xc8 + ldr r0, [r5, r2] + mov r1, #0x32 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r4, r6 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r5 + lsl r0, r0, #0x10 + mov r1, #0 + lsr r3, r0, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222DC4 ; =0x00010200 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + b _02222DB4 +_02222D3E: + sub r2, #0xc8 + ldr r0, [r5, r2] + mov r1, #0x31 + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x14] + ldr r1, [r1, #0xc] + mov r0, #8 + bl sub_02023790 + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02222DC8 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _02222DC8 ; =0x00001FAC + ldr r2, [sp, #0x14] + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r4, r6 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r5 + lsl r0, r0, #0x10 + mov r1, #0 + lsr r3, r0, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222DC4 ; =0x00010200 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC +_02222DB4: + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02222DC0: .word 0x00002070 +_02222DC4: .word 0x00010200 +_02222DC8: .word 0x00001FAC + thumb_func_end ov13_02222CE4 + + thumb_func_start ov13_02222DCC +ov13_02222DCC: ; 0x02222DCC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r3, r0, #0 + ldr r0, _02222E20 ; =0x00002070 + add r6, r2, #0 + ldr r5, [r3, r0] + ldr r3, [r3, #0] + lsl r4, r1, #4 + ldr r2, _02222E24 ; =0x00000286 + ldr r3, [r3, #0xc] + mov r0, #1 + mov r1, #0x1a + bl sub_0200B144 + add r1, r6, #0 + add r7, r0, #0 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222E28 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222E20: .word 0x00002070 +_02222E24: .word 0x00000286 +_02222E28: .word 0x00010200 + thumb_func_end ov13_02222DCC + + thumb_func_start ov13_02222E2C +ov13_02222E2C: ; 0x02222E2C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldr r0, _02222E8C ; =0x00002070 + lsl r4, r1, #4 + ldr r5, [r6, r0] + add r0, r2, #0 + mov r1, #0xa + bl sub_020790C4 + bl sub_0209577C + ldr r3, [r6, #0] + add r7, r0, #0 + ldr r3, [r3, #0xc] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xd2 + bl sub_0200B144 + add r1, r7, #0 + str r0, [sp, #0x10] + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222E90 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x10] + bl sub_0200B190 + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222E8C: .word 0x00002070 +_02222E90: .word 0x00010200 + thumb_func_end ov13_02222E2C + + thumb_func_start ov13_02222E94 +ov13_02222E94: ; 0x02222E94 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r2, _02222EF0 ; =0x00002070 + lsl r4, r1, #4 + ldr r5, [r0, r2] + sub r2, #0xc8 + ldr r0, [r0, r2] + mov r1, #0x35 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r5, r4 + bl sub_0201C294 + lsl r0, r0, #3 + sub r1, r0, r6 + lsr r0, r1, #0x1f + add r0, r1, r0 + lsl r0, r0, #0xf + mov r1, #0 + lsr r3, r0, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222EF4 ; =0x000F0E00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r5, r4 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02222EF0: .word 0x00002070 +_02222EF4: .word 0x000F0E00 + thumb_func_end ov13_02222E94 + + thumb_func_start ov13_02222EF8 +ov13_02222EF8: ; 0x02222EF8 + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r3, _02222F6C ; =0x00002070 + lsl r4, r1, #4 + ldr r5, [r0, r3] + cmp r2, #0 + beq _02222F10 + cmp r2, #1 + beq _02222F1E + cmp r2, #2 + beq _02222F2C + b _02222F38 +_02222F10: + sub r3, #0xc8 + ldr r0, [r0, r3] + mov r1, #0x36 + bl sub_0200B1EC + add r6, r0, #0 + b _02222F38 +_02222F1E: + sub r3, #0xc8 + ldr r0, [r0, r3] + mov r1, #0x38 + bl sub_0200B1EC + add r6, r0, #0 + b _02222F38 +_02222F2C: + sub r3, #0xc8 + ldr r0, [r0, r3] + mov r1, #0x37 + bl sub_0200B1EC + add r6, r0, #0 +_02222F38: + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + mov r3, #0x38 + bl sub_02002EEC + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02222F70 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02222F6C: .word 0x00002070 +_02222F70: .word 0x00010200 + thumb_func_end ov13_02222EF8 + + thumb_func_start ov13_02222F74 +ov13_02222F74: ; 0x02222F74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, _02223098 ; =0x00002070 + lsl r6, r1, #4 + ldr r4, [r5, r0] + sub r0, #0xc8 + ldr r0, [r5, r0] + mov r1, #0x2e + str r2, [sp, #0x10] + str r3, [sp, #0x14] + bl sub_0200B1EC + str r0, [sp, #0x18] + mov r0, #0 + ldr r1, [sp, #0x18] + add r2, r0, #0 + bl sub_02002D7C + str r0, [sp, #0x1c] + add r0, r4, r6 + bl sub_0201C294 + lsl r1, r0, #3 + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x18] + sub r0, r1, r0 + lsr r7, r0, #1 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222309C ; =0x000F0E00 + add r3, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, _022230A0 ; =0x00001FA8 + mov r1, #0x2c + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x20] + ldr r1, [r1, #0xc] + mov r0, #6 + bl sub_02023790 + mov r1, #0 + str r0, [sp, #0x24] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022230A4 ; =0x00001FAC + ldr r2, [sp, #0x10] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _022230A4 ; =0x00001FAC + ldr r1, [sp, #0x24] + ldr r0, [r5, r0] + ldr r2, [sp, #0x20] + bl sub_0200C388 + mov r0, #0 + ldr r1, [sp, #0x24] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222309C ; =0x000F0E00 + ldr r2, [sp, #0x24] + str r0, [sp, #8] + add r0, r4, r6 + sub r3, r7, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, [sp, #0x24] + bl sub_020237BC + ldr r0, _022230A0 ; =0x00001FA8 + mov r1, #0x2d + ldr r0, [r5, r0] + bl sub_0200B1EC + ldr r1, [r5, #0] + str r0, [sp, #0x28] + ldr r1, [r1, #0xc] + mov r0, #6 + bl sub_02023790 + mov r1, #0 + str r0, [sp, #0x2c] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022230A4 ; =0x00001FAC + ldr r2, [sp, #0x14] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + ldr r0, _022230A4 ; =0x00001FAC + ldr r1, [sp, #0x2c] + ldr r0, [r5, r0] + ldr r2, [sp, #0x28] + bl sub_0200C388 + mov r1, #0 + ldr r3, [sp, #0x1c] + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222309C ; =0x000F0E00 + ldr r2, [sp, #0x2c] + str r0, [sp, #8] + add r0, r4, r6 + add r3, r7, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x2c] + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02223098: .word 0x00002070 +_0222309C: .word 0x000F0E00 +_022230A0: .word 0x00001FA8 +_022230A4: .word 0x00001FAC + thumb_func_end ov13_02222F74 + + thumb_func_start ov13_022230A8 +ov13_022230A8: ; 0x022230A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + lsl r4, r1, #4 + ldr r1, [r0, #0] + ldr r2, _02223110 ; =0x00002070 + add r1, #0x34 + ldrb r1, [r1] + ldr r5, [r0, r2] + cmp r1, #4 + bne _022230C8 + sub r2, #0xc8 + ldr r0, [r0, r2] + mov r1, #0x3b + bl sub_0200B1EC + b _022230D2 +_022230C8: + sub r2, #0xc8 + ldr r0, [r0, r2] + mov r1, #0x3a + bl sub_0200B1EC +_022230D2: + add r6, r0, #0 + mov r0, #2 + add r1, r6, #0 + mov r2, #0 + bl sub_02002D7C + add r7, r0, #0 + mov r0, #6 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02223114 ; =0x00070809 + mov r3, #0x60 + str r0, [sp, #8] + mov r0, #0 + sub r3, r3, r7 + str r0, [sp, #0xc] + add r0, r5, r4 + mov r1, #2 + add r2, r6, #0 + lsr r3, r3, #1 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02223110: .word 0x00002070 +_02223114: .word 0x00070809 + thumb_func_end ov13_022230A8 + + thumb_func_start ov13_02223118 +ov13_02223118: ; 0x02223118 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _02223170 ; =0x0000207A + ldrb r1, [r4, r0] + cmp r1, #7 + bne _0222312E + sub r0, #0xa + ldr r5, [r4, r0] + add r5, #0x80 + b _02223134 +_0222312E: + sub r0, #0xa + ldr r5, [r4, r0] + add r5, #0x50 +_02223134: + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223174 ; =0x00001FA8 + mov r1, #0x3c + ldr r0, [r4, r0] + bl sub_0200B1EC + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02223178 ; =0x00010200 + add r2, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02223170: .word 0x0000207A +_02223174: .word 0x00001FA8 +_02223178: .word 0x00010200 + thumb_func_end ov13_02223118 + + thumb_func_start ov13_0222317C +ov13_0222317C: ; 0x0222317C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + str r1, [sp, #0x10] + ldr r1, [r5, #0] + ldr r0, _022232B8 ; =0x00002070 + ldr r1, [r1, #0xc] + ldr r4, [r5, r0] + mov r0, #6 + lsl r6, r2, #4 + bl sub_02023790 + add r7, r0, #0 + ldr r0, _022232BC ; =0x00001FA8 + mov r1, #0x2b + ldr r0, [r5, r0] + bl sub_0200B1EC + str r0, [sp, #0x14] + mov r0, #0x18 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022232C0 ; =0x000F0E00 + ldr r2, [sp, #0x14] + str r0, [sp, #8] + mov r1, #0 + add r0, r4, r6 + mov r3, #0x28 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, _022232BC ; =0x00001FA8 + mov r1, #0x2e + ldr r0, [r5, r0] + bl sub_0200B1EC + str r0, [sp, #0x18] + mov r0, #0 + ldr r1, [sp, #0x18] + add r2, r0, #0 + bl sub_02002D7C + str r0, [sp, #0x1c] + mov r0, #0x18 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022232C0 ; =0x000F0E00 + ldr r2, [sp, #0x18] + str r0, [sp, #8] + mov r1, #0 + add r0, r4, r6 + mov r3, #0x50 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, _022232BC ; =0x00001FA8 + mov r1, #0x2d + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0 + str r0, [sp, #0x20] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + ldr r0, _022232C4 ; =0x00001FAC + ldrb r2, [r2, #3] + ldr r0, [r5, r0] + mov r3, #2 + bl sub_0200B60C + ldr r0, _022232C4 ; =0x00001FAC + ldr r2, [sp, #0x20] + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_0200C388 + mov r0, #0x18 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022232C0 ; =0x000F0E00 + ldr r3, [sp, #0x1c] + str r0, [sp, #8] + mov r1, #0 + add r3, #0x50 + add r0, r4, r6 + add r2, r7, #0 + str r1, [sp, #0xc] + str r3, [sp, #0x1c] + bl sub_0201D78C + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, _022232BC ; =0x00001FA8 + mov r1, #0x2c + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0 + str r0, [sp, #0x24] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + ldr r0, _022232C4 ; =0x00001FAC + ldrb r2, [r2, #2] + ldr r0, [r5, r0] + mov r3, #2 + bl sub_0200B60C + ldr r0, _022232C4 ; =0x00001FAC + ldr r2, [sp, #0x24] + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + add r5, r0, #0 + mov r0, #0x18 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022232C0 ; =0x000F0E00 + mov r3, #0x50 + str r0, [sp, #8] + mov r1, #0 + add r0, r4, r6 + add r2, r7, #0 + sub r3, r3, r5 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x24] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022232B8: .word 0x00002070 +_022232BC: .word 0x00001FA8 +_022232C0: .word 0x000F0E00 +_022232C4: .word 0x00001FAC + thumb_func_end ov13_0222317C + + thumb_func_start ov13_022232C8 +ov13_022232C8: ; 0x022232C8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + str r1, [sp, #0x10] + ldr r1, [r5, #0] + ldr r0, _0222338C ; =0x00002070 + ldr r1, [r1, #0xc] + ldr r4, [r5, r0] + mov r0, #6 + lsl r6, r2, #4 + bl sub_02023790 + str r0, [sp, #0x14] + ldr r0, _02223390 ; =0x00001FA8 + mov r1, #0x2b + ldr r0, [r5, r0] + bl sub_0200B1EC + str r0, [sp, #0x18] + mov r0, #0 + ldr r1, [sp, #0x18] + add r2, r0, #0 + bl sub_02002D7C + add r7, r0, #0 + ldr r0, [sp, #0x18] + bl sub_020237BC + add r7, #0x28 + mov r0, #0x50 + sub r0, r0, r7 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + mov r0, #0x10 + lsl r2, r7, #0x10 + str r0, [sp, #4] + add r0, r4, r6 + mov r1, #0 + lsr r2, r2, #0x10 + mov r3, #0x18 + bl sub_0201AE78 + ldr r0, _02223390 ; =0x00001FA8 + mov r1, #0x2c + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + ldr r0, _02223394 ; =0x00001FAC + ldrb r2, [r2, #2] + ldr r0, [r5, r0] + mov r3, #2 + bl sub_0200B60C + ldr r0, _02223394 ; =0x00001FAC + ldr r1, [sp, #0x14] + ldr r0, [r5, r0] + add r2, r7, #0 + bl sub_0200C388 + mov r0, #0 + ldr r1, [sp, #0x14] + add r2, r0, #0 + bl sub_02002D7C + add r5, r0, #0 + mov r0, #0x18 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02223398 ; =0x000F0E00 + mov r3, #0x50 + str r0, [sp, #8] + mov r1, #0 + ldr r2, [sp, #0x14] + add r0, r4, r6 + sub r3, r3, r5 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0222338C: .word 0x00002070 +_02223390: .word 0x00001FA8 +_02223394: .word 0x00001FAC +_02223398: .word 0x000F0E00 + thumb_func_end ov13_022232C8 + + thumb_func_start ov13_0222339C +ov13_0222339C: ; 0x0222339C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0] + mov r4, #0 + ldr r0, [r0, #0] + bl sub_0207A0F8 + cmp r0, #0 + ble _02223422 + add r0, r4, #0 + add r7, r5, #0 + str r0, [sp, #8] + add r6, r5, #0 + add r7, #0x1b +_022233BA: + ldr r0, _02223444 ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #8] + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldrh r0, [r6, #8] + cmp r0, #0 + beq _0222340A + mov r0, #0x20 + str r0, [sp] + mov r0, #8 + lsl r3, r4, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + lsr r3, r3, #0x10 + bl ov13_02221C54 + ldrb r0, [r7] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _022233F6 + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov13_02223448 +_022233F6: + ldr r0, [r6, #4] + bl sub_0208E9F0 + cmp r0, #7 + bne _0222340A + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov13_022234A8 +_0222340A: + ldr r0, [sp, #8] + add r6, #0x50 + add r0, #0x10 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r7, #0x50 + ldr r0, [r0, #0] + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _022233BA +_02223422: + ldr r0, [r5, #0] + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #2 + bne _02223438 + add r0, r5, #0 + mov r1, #7 + bl ov13_022221C8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_02223438: + add r0, r5, #0 + mov r1, #6 + bl ov13_022221C8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02223444: .word 0x00002070 + thumb_func_end ov13_0222339C + + thumb_func_start ov13_02223448 +ov13_02223448: ; 0x02223448 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x18 + str r0, [sp] + mov r0, #8 + add r6, r1, #0 + str r0, [sp, #4] + ldr r0, _022234A4 ; =0x00002070 + lsl r4, r6, #4 + ldr r0, [r5, r0] + mov r1, #0 + add r0, r0, r4 + mov r2, #0x38 + mov r3, #0x20 + bl sub_0201AE78 + mov r2, #0x40 + str r2, [sp] + mov r0, #8 + str r0, [sp, #4] + ldr r0, _022234A4 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + mov r3, #0x18 + add r0, r0, r4 + bl sub_0201AE78 + mov r0, #0x20 + str r0, [sp] + add r0, r5, #0 + add r1, r6, #0 + add r2, r6, #0 + mov r3, #0x38 + bl ov13_02221E50 + mov r0, #0x18 + str r0, [sp] + add r0, r5, #0 + add r1, r6, #0 + add r2, r6, #0 + mov r3, #0x40 + bl ov13_02221ED0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022234A4: .word 0x00002070 + thumb_func_end ov13_02223448 + + thumb_func_start ov13_022234A8 +ov13_022234A8: ; 0x022234A8 + push {r3, lr} + mov r2, #0x50 + mul r2, r1 + add r2, r0, r2 + ldrb r2, [r2, #0x1b] + lsl r2, r2, #0x18 + lsr r2, r2, #0x1f + bne _022234C4 + mov r2, #0x20 + str r2, [sp] + add r2, r1, #0 + mov r3, #0 + bl ov13_02221E08 +_022234C4: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov13_022234A8 + + thumb_func_start ov13_022234C8 +ov13_022234C8: ; 0x022234C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0222354C ; =0x00002070 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0201ADA4 + ldr r0, _0222354C ; =0x00002070 + mov r1, #0 + ldr r0, [r4, r0] + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, _0222354C ; =0x00002070 + mov r1, #0 + ldr r0, [r4, r0] + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, _0222354C ; =0x00002070 + mov r1, #0 + ldr r0, [r4, r0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r1, [r4, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + bl ov13_02223550 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf + bl ov13_0222222C + ldr r0, [r4, #0] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r0, r4, r0 + ldrb r0, [r0, #0x1b] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _02223536 + add r0, r4, #0 + mov r1, #2 + mov r2, #0x12 + bl ov13_0222222C + add r0, r4, #0 + mov r1, #3 + mov r2, #0x13 + bl ov13_0222222C + pop {r4, pc} +_02223536: + ldr r0, _0222354C ; =0x00002070 + ldr r0, [r4, r0] + add r0, #0x20 + bl sub_0201A9A4 + ldr r0, _0222354C ; =0x00002070 + ldr r0, [r4, r0] + add r0, #0x30 + bl sub_0201A9A4 + pop {r4, pc} + ; .align 2, 0 +_0222354C: .word 0x00002070 + thumb_func_end ov13_022234C8 + + thumb_func_start ov13_02223550 +ov13_02223550: ; 0x02223550 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, _0222369C ; =0x00002070 + add r6, r1, #0 + ldr r0, [r4, r0] + ldr r1, [r4, #0] + str r0, [sp, #0x18] + mov r0, #0x50 + add r7, r6, #0 + add r5, r4, #4 + mul r7, r0 + add r0, r5, r7 + str r0, [sp, #0x14] + ldr r1, [r1, #0xc] + mov r0, #0xc + bl sub_02023790 + str r0, [sp, #0x10] + ldr r0, _022236A0 ; =0x00001FA8 + ldr r1, _022236A4 ; =0x02228EC4 + lsl r2, r6, #2 + ldr r0, [r4, r0] + ldr r1, [r1, r2] + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, [r5, r7] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _022236A8 ; =0x00001FAC + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0200B5CC + ldr r0, _022236A8 ; =0x00001FAC + ldr r1, [sp, #0x10] + ldr r0, [r4, r0] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + mov r5, #0 + ldrb r0, [r0, #0x16] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _022235E4 + ldr r0, [sp, #0x14] + ldrb r0, [r0, #0x17] + lsl r1, r0, #0x18 + lsr r1, r1, #0x1f + bne _022235E4 + lsl r0, r0, #0x1d + lsr r0, r0, #0x1d + bne _022235D4 + ldr r0, _022236A0 ; =0x00001FA8 + mov r1, #0x10 + ldr r0, [r4, r0] + bl sub_0200B1EC + add r5, r0, #0 + b _022235E4 +_022235D4: + cmp r0, #1 + bne _022235E4 + ldr r0, _022236A0 ; =0x00001FA8 + mov r1, #0x11 + ldr r0, [r4, r0] + bl sub_0200B1EC + add r5, r0, #0 +_022235E4: + ldr r1, [sp, #0x10] + mov r0, #2 + mov r2, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r5, #0 + bne _022235FC + mov r7, #0 + add r4, r7, #0 + b _0222360C +_022235FC: + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + mov r4, #8 +_0222360C: + ldr r0, [sp, #0x18] + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r6 + sub r0, r0, r7 + sub r1, r0, r4 + lsr r0, r1, #0x1f + add r0, r1, r0 + lsl r0, r0, #0x17 + lsr r7, r0, #0x18 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022236AC ; =0x00070809 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + mov r1, #2 + add r3, r7, #0 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + cmp r5, #0 + beq _02223692 + ldr r0, [sp, #0x14] + ldrb r0, [r0, #0x17] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1d + bne _02223670 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022236B0 ; =0x000A0B00 + add r3, r7, r6 + str r0, [sp, #8] + mov r1, #0 + ldr r0, [sp, #0x18] + add r2, r5, #0 + add r3, r4, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + b _0222368C +_02223670: + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022236B4 ; =0x000C0D00 + add r3, r7, r6 + str r0, [sp, #8] + mov r1, #0 + ldr r0, [sp, #0x18] + add r2, r5, #0 + add r3, r4, r3 + str r1, [sp, #0xc] + bl sub_0201D78C +_0222368C: + add r0, r5, #0 + bl sub_020237BC +_02223692: + ldr r0, [sp, #0x18] + bl sub_0201A9A4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222369C: .word 0x00002070 +_022236A0: .word 0x00001FA8 +_022236A4: .word 0x02228EC4 +_022236A8: .word 0x00001FAC +_022236AC: .word 0x00070809 +_022236B0: .word 0x000A0B00 +_022236B4: .word 0x000C0D00 + thumb_func_end ov13_02223550 + + thumb_func_start ov13_022236B8 +ov13_022236B8: ; 0x022236B8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + ldr r0, _022237E8 ; =0x00002075 + mov r1, #6 + ldrb r2, [r5, r0] + sub r0, r0, #5 + mul r1, r2 + lsl r1, r1, #0x10 + lsr r6, r1, #0x10 + ldr r1, [r5, r0] + lsl r0, r6, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r6, #1 + lsl r0, r0, #4 + str r0, [sp, #0x18] + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0x18] + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r6, #2 + lsl r0, r0, #4 + str r0, [sp, #0x14] + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0x14] + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r6, #3 + lsl r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0x10] + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r6, #4 + lsl r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0xc] + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _022237EC ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x50 + bl sub_0201ADA4 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r3, [r5, #0] + add r0, r5, #0 + ldrb r3, [r3, #0x11] + add r1, r6, #0 + bl ov13_02221C54 + add r0, r5, #0 + str r0, [sp, #0x1c] + add r0, #0x34 + mov r4, #0 + add r7, r6, #1 + str r0, [sp, #0x1c] +_02223752: + ldr r0, [r5, #0] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x1c] + lsl r1, r4, #3 + add r0, r0, r2 + str r1, [sp, #0x20] + ldrh r1, [r0, r1] + str r0, [sp, #0x24] + cmp r1, #0 + beq _02223794 + mov r0, #2 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + ldr r0, _022237F0 ; =0x00070809 + ldr r3, _022237F4 ; =0x02228EB0 + lsl r6, r4, #2 + str r0, [sp, #8] + ldr r3, [r3, r6] + add r0, r5, #0 + add r2, r7, r4 + bl ov13_022220CC + ldr r2, [sp, #0x20] + ldr r1, [sp, #0x24] + add r0, r5, #0 + add r1, r1, r2 + add r2, r7, r4 + bl ov13_0222317C +_02223794: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #4 + blo _02223752 + add r0, r5, #0 + mov r1, #5 + mov r2, #0x12 + bl ov13_0222222C + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0x18] + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0x14] + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0x10] + add r0, r1, r0 + bl sub_0201A9A4 + ldr r0, _022237EC ; =0x00002070 + ldr r1, [r5, r0] + ldr r0, [sp, #0xc] + add r0, r1, r0 + bl sub_0201A9A4 + ldr r1, _022237E8 ; =0x00002075 + mov r0, #1 + ldrb r2, [r5, r1] + eor r0, r2 + strb r0, [r5, r1] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_022237E8: .word 0x00002075 +_022237EC: .word 0x00002070 +_022237F0: .word 0x00070809 +_022237F4: .word 0x02228EB0 + thumb_func_end ov13_022236B8 + + thumb_func_start ov13_022237F8 +ov13_022237F8: ; 0x022237F8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _02223A08 ; =0x00002075 + mov r1, #0x16 + ldrb r2, [r5, r0] + sub r0, r0, #5 + add r4, r2, #0 + mul r4, r1 + ldr r1, [r5, r0] + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #5 + lsl r0, r0, #6 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0xe0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0xf0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #0x11 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #0x12 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0xd0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + lsl r0, r4, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #0 + add r0, #0xa + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #0 + add r0, #0xb + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #0 + add r0, #0xc + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #5 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #6 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #7 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #0 + add r0, #8 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #0 + add r0, #9 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #4 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #1 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #2 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223A0C ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #3 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r3, [r5, #0] + add r0, r5, #0 + ldrb r3, [r3, #0x11] + add r1, r4, #0 + bl ov13_02221C54 + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_0222295C + mov r3, #0 + str r3, [sp] + ldr r2, [r5, #0] + add r1, r4, #0 + ldrb r2, [r2, #0x11] + add r0, r5, #0 + add r1, #0xa + bl ov13_02221ED0 + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_02222290 + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_02222464 + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_02222560 + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_0222265C + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_0222275C + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_0222285C + ldr r2, [r5, #0] + add r0, r5, #0 + ldrb r2, [r2, #0x11] + add r1, r4, #1 + bl ov13_02221FA8 + ldr r2, [r5, #0] + add r0, r5, #0 + ldrb r2, [r2, #0x11] + add r1, r4, #3 + bl ov13_02222030 + ldr r1, [r5, #0] + add r0, r5, #0 + ldrb r1, [r1, #0x11] + bl ov13_02222AF4 + add r0, r5, #0 + mov r1, #0x15 + mov r2, #0x13 + bl ov13_0222222C + ldr r1, _02223A08 ; =0x00002075 + mov r0, #1 + ldrb r2, [r5, r1] + eor r0, r2 + strb r0, [r5, r1] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02223A08: .word 0x00002075 +_02223A0C: .word 0x00002070 + thumb_func_end ov13_022237F8 + + thumb_func_start ov13_02223A10 +ov13_02223A10: ; 0x02223A10 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _02223B64 ; =0x00002075 + mov r1, #0xb + ldrb r2, [r5, r0] + sub r0, r0, #5 + ldr r0, [r5, r0] + add r4, r2, #0 + mul r4, r1 + add r0, #0x60 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x70 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x80 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x90 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0xa0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #1 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + ldr r1, [r5, r0] + lsl r0, r4, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #2 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #3 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #5 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02223B68 ; =0x00002070 + ldr r1, [r5, r0] + add r0, r4, #4 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0] + add r2, r5, #0 + ldrb r3, [r0, #0x11] + add r0, #0x34 + ldrb r0, [r0] + mov r1, #0x50 + add r2, #0x34 + mul r1, r3 + add r1, r2, r1 + lsl r0, r0, #3 + add r7, r1, r0 + mov r2, #0 + str r2, [sp] + add r0, r5, #0 + mov r1, #6 + str r2, [sp, #4] + bl ov13_02221C54 + mov r2, #0 + add r0, r5, #0 + mov r1, #7 + add r3, r2, #0 + bl ov13_02222170 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02223B6C ; =0x000F0E00 + add r2, r4, #0 + str r0, [sp, #8] + ldr r3, [r5, #0] + ldrh r1, [r7] + add r3, #0x34 + ldrb r3, [r3] + add r0, r5, #0 + lsl r6, r3, #2 + ldr r3, _02223B70 ; =0x02228EB0 + ldr r3, [r3, r6] + bl ov13_022220CC + add r0, r5, #0 + mov r1, #8 + bl ov13_02222B6C + ldrb r2, [r7, #6] + add r0, r5, #0 + add r1, r4, #2 + bl ov13_02222BB4 + add r0, r5, #0 + mov r1, #9 + bl ov13_02222C9C + ldrb r2, [r7, #7] + add r0, r5, #0 + add r1, r4, #3 + bl ov13_02222CE4 + ldrh r2, [r7] + add r0, r5, #0 + add r1, r4, #4 + bl ov13_02222DCC + add r0, r5, #0 + mov r1, #0xa + bl ov13_02222E94 + ldrb r2, [r7, #5] + add r0, r5, #0 + add r1, r4, #5 + bl ov13_02222EF8 + ldrb r2, [r7, #2] + ldrb r3, [r7, #3] + add r0, r5, #0 + add r1, r4, #1 + bl ov13_02222F74 + ldr r1, _02223B64 ; =0x00002075 + mov r0, #1 + ldrb r2, [r5, r1] + eor r0, r2 + strb r0, [r5, r1] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02223B64: .word 0x00002075 +_02223B68: .word 0x00002070 +_02223B6C: .word 0x000F0E00 +_02223B70: .word 0x02228EB0 + thumb_func_end ov13_02223A10 + + thumb_func_start ov13_02223B74 +ov13_02223B74: ; 0x02223B74 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, _02223C90 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0201ADA4 + ldr r0, _02223C90 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, _02223C90 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, _02223C90 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _02223C90 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201ADA4 + ldr r0, _02223C90 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x50 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + ldr r3, [r5, #0] + add r0, r5, #0 + ldrb r3, [r3, #0x11] + add r2, r1, #0 + bl ov13_02221C54 + add r0, r5, #0 + mov r6, #0 + str r0, [sp, #0x10] + add r0, #0x34 + ldr r7, _02223C94 ; =0x02228EB0 + add r4, r6, #0 + str r0, [sp, #0x10] +_02223BE0: + ldr r0, [r5, #0] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x10] + add r0, r0, r2 + ldrh r1, [r0, r4] + str r0, [sp, #0xc] + cmp r1, #0 + beq _02223C18 + mov r0, #2 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + ldr r0, _02223C98 ; =0x00070809 + add r2, r6, #1 + str r0, [sp, #8] + ldr r3, [r7, #0] + add r0, r5, #0 + bl ov13_022220CC + ldr r1, [sp, #0xc] + add r0, r5, #0 + add r1, r1, r4 + add r2, r6, #1 + bl ov13_0222317C +_02223C18: + add r6, r6, #1 + add r4, #8 + add r7, r7, #4 + cmp r6, #4 + blo _02223BE0 + mov r0, #2 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + ldr r0, _02223C98 ; =0x00070809 + mov r2, #5 + str r0, [sp, #8] + ldr r1, [r5, #0] + add r0, r5, #0 + ldrh r1, [r1, #0x24] + mov r3, #0x49 + bl ov13_022220CC + ldr r0, [r5, #0] + mov r1, #5 + ldrh r0, [r0, #0x24] + bl sub_020790C4 + add r1, sp, #0x14 + strb r0, [r1, #2] + ldrb r0, [r1, #2] + mov r2, #5 + strb r0, [r1, #3] + add r0, r5, #0 + add r1, sp, #0x14 + bl ov13_0222317C + ldr r0, _02223C90 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x10 + bl sub_0201A9A4 + ldr r0, _02223C90 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x20 + bl sub_0201A9A4 + ldr r0, _02223C90 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x30 + bl sub_0201A9A4 + ldr r0, _02223C90 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201A9A4 + ldr r0, _02223C90 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x50 + bl sub_0201A9A4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02223C90: .word 0x00002070 +_02223C94: .word 0x02228EB0 +_02223C98: .word 0x00070809 + thumb_func_end ov13_02223B74 + + thumb_func_start ov13_02223C9C +ov13_02223C9C: ; 0x02223C9C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x60 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x50 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x70 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x90 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0xa0 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x80 + bl sub_0201ADA4 + ldr r0, _02223E5C ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0xb0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + ldr r3, [r5, #0] + add r0, r5, #0 + ldrb r3, [r3, #0x11] + add r2, r1, #0 + bl ov13_02221C54 + mov r2, #0 + add r0, r5, #0 + mov r1, #2 + add r3, r2, #0 + bl ov13_02222170 + add r0, r5, #0 + mov r1, #4 + bl ov13_02222B6C + add r0, r5, #0 + mov r1, #5 + bl ov13_02222C9C + add r0, r5, #0 + mov r1, #9 + bl ov13_02222E94 + ldr r1, [r5, #0] + add r0, r1, #0 + add r0, #0x34 + ldrb r3, [r0] + cmp r3, #4 + bhs _02223DD8 + ldrb r1, [r1, #0x11] + add r2, r5, #0 + mov r0, #0x50 + add r2, #0x34 + mul r0, r1 + add r7, r2, r0 + lsl r0, r3, #3 + str r0, [sp, #0xc] + add r4, r7, r0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02223E60 ; =0x000F0E00 + lsl r6, r3, #2 + str r0, [sp, #8] + ldr r1, [sp, #0xc] + ldr r3, _02223E64 ; =0x02228EB0 + ldrh r1, [r7, r1] + ldr r3, [r3, r6] + add r0, r5, #0 + mov r2, #1 + bl ov13_022220CC + ldrb r2, [r4, #6] + add r0, r5, #0 + mov r1, #6 + bl ov13_02222BB4 + ldrb r2, [r4, #7] + add r0, r5, #0 + mov r1, #7 + bl ov13_02222CE4 + ldr r2, [sp, #0xc] + add r0, r5, #0 + ldrh r2, [r7, r2] + mov r1, #8 + bl ov13_02222DCC + ldrb r2, [r4, #5] + add r0, r5, #0 + mov r1, #0xa + bl ov13_02222EF8 + ldrb r2, [r4, #2] + ldrb r3, [r4, #3] + add r0, r5, #0 + mov r1, #3 + bl ov13_02222F74 + b _02223E4E +_02223DD8: + ldrh r0, [r1, #0x24] + mov r1, #5 + bl sub_020790C4 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02223E60 ; =0x000F0E00 + mov r2, #1 + str r0, [sp, #8] + ldr r1, [r5, #0] + add r0, r5, #0 + ldrh r1, [r1, #0x24] + mov r3, #0x49 + bl ov13_022220CC + ldr r2, [r5, #0] + add r0, r5, #0 + ldrh r2, [r2, #0x24] + mov r1, #8 + bl ov13_02222DCC + ldr r0, [r5, #0] + mov r1, #4 + ldrh r0, [r0, #0x24] + bl sub_020790C4 + add r2, r0, #0 + add r0, r5, #0 + mov r1, #6 + bl ov13_02222BB4 + ldr r0, [r5, #0] + mov r1, #2 + ldrh r0, [r0, #0x24] + bl sub_020790C4 + add r2, r0, #0 + add r0, r5, #0 + mov r1, #7 + bl ov13_02222CE4 + ldr r0, [r5, #0] + mov r1, #1 + ldrh r0, [r0, #0x24] + bl sub_020790C4 + add r2, r0, #0 + add r0, r5, #0 + mov r1, #0xa + bl ov13_02222EF8 + add r0, r5, #0 + mov r1, #3 + add r2, r4, #0 + add r3, r4, #0 + bl ov13_02222F74 +_02223E4E: + add r0, r5, #0 + mov r1, #0xb + bl ov13_022230A8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02223E5C: .word 0x00002070 +_02223E60: .word 0x000F0E00 +_02223E64: .word 0x02228EB0 + thumb_func_end ov13_02223C9C + + thumb_func_start ov13_02223E68 +ov13_02223E68: ; 0x02223E68 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, _02223F50 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0201ADA4 + ldr r0, _02223F50 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, _02223F50 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, _02223F50 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _02223F50 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + ldr r3, [r5, #0] + add r0, r5, #0 + ldrb r3, [r3, #0x11] + add r2, r1, #0 + bl ov13_02221C54 + add r0, r5, #0 + mov r6, #0 + str r0, [sp, #0x10] + add r0, #0x34 + ldr r7, _02223F54 ; =0x02228EB0 + add r4, r6, #0 + str r0, [sp, #0x10] +_02223EC8: + ldr r0, [r5, #0] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x10] + add r0, r0, r2 + ldrh r1, [r0, r4] + str r0, [sp, #0xc] + cmp r1, #0 + beq _02223F00 + mov r0, #2 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + ldr r0, _02223F58 ; =0x00070809 + add r2, r6, #1 + str r0, [sp, #8] + ldr r3, [r7, #0] + add r0, r5, #0 + bl ov13_022220CC + ldr r1, [sp, #0xc] + add r0, r5, #0 + add r1, r1, r4 + add r2, r6, #1 + bl ov13_0222317C +_02223F00: + add r6, r6, #1 + add r4, #8 + add r7, r7, #4 + cmp r6, #4 + blo _02223EC8 + ldr r2, [r5, #0] + mov r1, #0x25 + ldrh r0, [r2, #0x22] + ldr r2, [r2, #0xc] + bl sub_0207CFF0 + cmp r0, #0 + bne _02223F22 + add r0, r5, #0 + mov r1, #0x5e + bl ov13_022221C8 +_02223F22: + ldr r0, _02223F50 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x10 + bl sub_0201A9A4 + ldr r0, _02223F50 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x20 + bl sub_0201A9A4 + ldr r0, _02223F50 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x30 + bl sub_0201A9A4 + ldr r0, _02223F50 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02223F50: .word 0x00002070 +_02223F54: .word 0x02228EB0 +_02223F58: .word 0x00070809 + thumb_func_end ov13_02223E68 + + thumb_func_start ov13_02223F5C +ov13_02223F5C: ; 0x02223F5C + push {r3, r4, r5, lr} + ldr r4, [r0, #0] + add r3, r1, #0 + ldrb r5, [r4, #0x11] + add r1, r0, #0 + mov r4, #0x50 + add r1, #0x34 + mul r4, r5 + add r4, r1, r4 + lsl r1, r2, #3 + add r1, r4, r1 + add r2, r3, #0 + bl ov13_022232C8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov13_02223F5C + + thumb_func_start ov13_02223F7C +ov13_02223F7C: ; 0x02223F7C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0201ADA4 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201ADA4 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x50 + bl sub_0201ADA4 + ldr r0, _022240D0 ; =0x00002070 + mov r1, #0 + ldr r0, [r5, r0] + add r0, #0x60 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + ldr r3, [r5, #0] + add r0, r5, #0 + ldrb r3, [r3, #0x11] + add r2, r1, #0 + bl ov13_02221C54 + mov r2, #0 + add r0, r5, #0 + mov r1, #2 + add r3, r2, #0 + bl ov13_02222170 + ldr r0, _022240D4 ; =0x00001FA8 + mov r1, #0x39 + ldr r0, [r5, r0] + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + mov r3, #0x60 + bl sub_02002EEC + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022240D8 ; =0x000F0E00 + add r2, r4, #0 + str r0, [sp, #8] + ldr r0, _022240D0 ; =0x00002070 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + ldr r0, _022240D0 ; =0x00002070 + ldr r0, [r5, r0] + add r0, #0x40 + bl sub_0201A9A4 + ldr r1, [r5, #0] + add r0, r1, #0 + add r0, #0x34 + ldrb r3, [r0] + cmp r3, #4 + bhs _0222408A + ldrb r1, [r1, #0x11] + add r2, r5, #0 + mov r0, #0x50 + add r2, #0x34 + mul r0, r1 + add r4, r2, r0 + lsl r7, r3, #3 + add r0, r4, r7 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022240D8 ; =0x000F0E00 + lsl r6, r3, #2 + str r0, [sp, #8] + ldr r3, _022240DC ; =0x02228EB0 + ldrh r1, [r4, r7] + ldr r3, [r3, r6] + add r0, r5, #0 + mov r2, #1 + bl ov13_022220CC + ldrh r2, [r4, r7] + add r0, r5, #0 + mov r1, #5 + bl ov13_02222E2C + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x10] + ldrb r2, [r2, #2] + ldrb r3, [r3, #3] + add r0, r5, #0 + mov r1, #3 + bl ov13_02222F74 + b _022240C4 +_0222408A: + ldrh r0, [r1, #0x24] + mov r1, #5 + bl sub_020790C4 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022240D8 ; =0x000F0E00 + mov r2, #1 + str r0, [sp, #8] + ldr r1, [r5, #0] + add r0, r5, #0 + ldrh r1, [r1, #0x24] + mov r3, #0x49 + bl ov13_022220CC + ldr r2, [r5, #0] + add r0, r5, #0 + ldrh r2, [r2, #0x24] + mov r1, #5 + bl ov13_02222E2C + add r0, r5, #0 + mov r1, #3 + add r2, r4, #0 + add r3, r4, #0 + bl ov13_02222F74 +_022240C4: + add r0, r5, #0 + mov r1, #6 + bl ov13_022230A8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022240D0: .word 0x00002070 +_022240D4: .word 0x00001FA8 +_022240D8: .word 0x000F0E00 +_022240DC: .word 0x02228EB0 + thumb_func_end ov13_02223F7C + + thumb_func_start ov13_022240E0 +ov13_022240E0: ; 0x022240E0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02224104 ; =0x00002060 + mov r1, #1 + add r0, r4, r0 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + ldr r0, _02224104 ; =0x00002060 + mov r1, #0xf + add r0, r4, r0 + bl sub_0201ADA4 + add r0, r4, #0 + bl ov13_02224108 + pop {r4, pc} + ; .align 2, 0 +_02224104: .word 0x00002060 + thumb_func_end ov13_022240E0 + + thumb_func_start ov13_02224108 +ov13_02224108: ; 0x02224108 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #1 + bl sub_02002AC8 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl ov16_0223EDF0 + mov r3, #0 + str r3, [sp] + str r0, [sp, #4] + ldr r2, _0222413C ; =0x00002060 + str r3, [sp, #8] + add r0, r4, r2 + sub r2, #0xb0 + ldr r2, [r4, r2] + mov r1, #1 + bl sub_0201D738 + ldr r1, _02224140 ; =0x0000207B + strb r0, [r4, r1] + add sp, #0xc + pop {r3, r4, pc} + nop +_0222413C: .word 0x00002060 +_02224140: .word 0x0000207B + thumb_func_end ov13_02224108 + + thumb_func_start ov13_02224144 +ov13_02224144: ; 0x02224144 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + mov r1, #0 + str r0, [sp, #0xc] + ldr r2, [sp, #0xc] + ldrh r0, [r0, #0x22] + ldr r2, [r2, #0xc] + bl sub_0207CF48 + ldr r2, [sp, #0xc] + add r6, r0, #0 + ldrb r3, [r2, #0x11] + ldr r0, [sp, #0xc] + ldr r1, [sp, #0xc] + add r2, r2, r3 + add r2, #0x2c + ldrb r2, [r2] + ldr r0, [r0, #8] + ldr r1, [r1, #0x28] + bl ov16_0223DFAC + mov r1, #0xa3 + mov r2, #0 + add r7, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r6, #0 + mov r1, #0xf + mov r4, #0 + bl sub_0207D014 + cmp r0, #0 + beq _02224198 + mov r0, #1 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_02224198: + add r0, r6, #0 + mov r1, #0x10 + bl sub_0207D014 + cmp r0, #0 + beq _022241AC + mov r0, #2 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_022241AC: + add r0, r6, #0 + mov r1, #0x11 + bl sub_0207D014 + cmp r0, #0 + beq _022241C0 + mov r0, #4 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_022241C0: + add r0, r6, #0 + mov r1, #0x12 + bl sub_0207D014 + cmp r0, #0 + beq _022241D4 + mov r0, #8 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_022241D4: + add r0, r6, #0 + mov r1, #0x13 + bl sub_0207D014 + cmp r0, #0 + beq _022241E8 + mov r0, #0x10 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_022241E8: + add r0, r6, #0 + mov r1, #0x14 + bl sub_0207D014 + cmp r0, #0 + beq _022241FC + mov r0, #0x20 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_022241FC: + add r0, r6, #0 + mov r1, #0x15 + bl sub_0207D014 + cmp r0, #0 + beq _02224210 + mov r0, #0x40 + orr r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_02224210: + ldr r0, [sp, #0xc] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r0, r5, r0 + ldrh r1, [r0, #0x14] + cmp r1, #0 + bne _0222425A + ldr r0, [sp, #8] + cmp r0, #0 + beq _0222425A + ldr r0, _02224494 ; =0x00001FA8 + mov r1, #0x58 + ldr r0, [r5, r0] + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_0222425A: + ldr r0, [sp, #8] + cmp r0, r1 + beq _022242B6 + ldr r0, _02224494 ; =0x00001FA8 + mov r1, #0x52 + ldr r0, [r5, r0] + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + mov r0, #0 + str r0, [sp] + mov r1, #1 + ldr r2, [sp, #0xc] + str r1, [sp, #4] + ldrb r3, [r2, #0x11] + mov r2, #0x50 + ldr r0, _02224498 ; =0x00001FAC + mul r2, r3 + add r2, r5, r2 + ldrh r3, [r2, #0x14] + ldr r2, [sp, #8] + ldr r0, [r5, r0] + sub r2, r2, r3 + mov r3, #3 + bl sub_0200B60C + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_022242B6: + add r0, r6, #0 + mov r1, #0x24 + bl sub_0207D014 + cmp r0, #0 + bne _022242CE + add r0, r6, #0 + mov r1, #0x25 + bl sub_0207D014 + cmp r0, #0 + beq _022242DE +_022242CE: + ldr r2, _02224494 ; =0x00001FA8 + mov r1, #0x57 + ldr r0, [r5, r2] + add r2, #8 + ldr r2, [r5, r2] + bl sub_0200B1B8 + b _0222448A +_022242DE: + cmp r4, #1 + ldr r0, _02224494 ; =0x00001FA8 + bne _02224316 + ldr r0, [r5, r0] + mov r1, #0x5c + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_02224316: + cmp r4, #2 + bne _0222434C + ldr r0, [r5, r0] + mov r1, #0x53 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_0222434C: + cmp r4, #4 + bne _02224382 + ldr r0, [r5, r0] + mov r1, #0x55 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_02224382: + cmp r4, #8 + bne _022243B8 + ldr r0, [r5, r0] + mov r1, #0x56 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_022243B8: + cmp r4, #0x10 + bne _022243EE + ldr r0, [r5, r0] + mov r1, #0x54 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_022243EE: + cmp r4, #0x20 + bne _02224424 + ldr r0, [r5, r0] + mov r1, #0x5a + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_02224424: + cmp r4, #0x40 + bne _0222445A + ldr r0, [r5, r0] + mov r1, #0x5b + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + b _0222448A +_0222445A: + ldr r0, [r5, r0] + mov r1, #0x59 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r7, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _02224498 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r1, _02224498 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC +_0222448A: + add r0, r6, #0 + bl sub_020181C4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02224494: .word 0x00001FA8 +_02224498: .word 0x00001FAC + thumb_func_end ov13_02224144 + + thumb_func_start ov13_0222449C +ov13_0222449C: ; 0x0222449C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r3, [r5, #0] + ldrb r2, [r3, #0x11] + ldr r0, [r3, #8] + ldr r1, [r3, #0x28] + add r2, r3, r2 + add r2, #0x2c + ldrb r2, [r2] + bl ov16_0223DFAC + add r6, r0, #0 + ldr r0, _022244F4 ; =0x00001FA8 + mov r1, #0x5f + ldr r0, [r5, r0] + bl sub_0200B1EC + add r4, r0, #0 + add r0, r6, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, _022244F8 ; =0x00001FAC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200B5CC + ldr r0, _022244F8 ; =0x00001FAC + ldr r2, _022244FC ; =0x00000175 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0200B630 + ldr r1, _022244F8 ; =0x00001FAC + add r2, r4, #0 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022244F4: .word 0x00001FA8 +_022244F8: .word 0x00001FAC +_022244FC: .word 0x00000175 + thumb_func_end ov13_0222449C + + .rodata + + + .global Unk_ov13_02228EA0 +Unk_ov13_02228EA0: ; 0x02228EA0 + .incbin "incbin/overlay13_rodata.bin", 0x1A4, 0x1B4 - 0x1A4 + + .global Unk_ov13_02228EB0 +Unk_ov13_02228EB0: ; 0x02228EB0 + .incbin "incbin/overlay13_rodata.bin", 0x1B4, 0x1C8 - 0x1B4 + + .global Unk_ov13_02228EC4 +Unk_ov13_02228EC4: ; 0x02228EC4 + .incbin "incbin/overlay13_rodata.bin", 0x1C8, 0x1E0 - 0x1C8 + + .global Unk_ov13_02228EDC +Unk_ov13_02228EDC: ; 0x02228EDC + .incbin "incbin/overlay13_rodata.bin", 0x1E0, 0x200 - 0x1E0 + + .global Unk_ov13_02228EFC +Unk_ov13_02228EFC: ; 0x02228EFC + .incbin "incbin/overlay13_rodata.bin", 0x200, 0x228 - 0x200 + + .global Unk_ov13_02228F24 +Unk_ov13_02228F24: ; 0x02228F24 + .incbin "incbin/overlay13_rodata.bin", 0x228, 0x258 - 0x228 + + .global Unk_ov13_02228F54 +Unk_ov13_02228F54: ; 0x02228F54 + .incbin "incbin/overlay13_rodata.bin", 0x258, 0x288 - 0x258 + + .global Unk_ov13_02228F84 +Unk_ov13_02228F84: ; 0x02228F84 + .incbin "incbin/overlay13_rodata.bin", 0x288, 0x2C0 - 0x288 + + .global Unk_ov13_02228FBC +Unk_ov13_02228FBC: ; 0x02228FBC + .incbin "incbin/overlay13_rodata.bin", 0x2C0, 0x318 - 0x2C0 + + .global Unk_ov13_02229014 +Unk_ov13_02229014: ; 0x02229014 + .incbin "incbin/overlay13_rodata.bin", 0x318, 0x378 - 0x318 + + .global Unk_ov13_02229074 +Unk_ov13_02229074: ; 0x02229074 + .incbin "incbin/overlay13_rodata.bin", 0x378, 0x400 - 0x378 + + .global Unk_ov13_022290FC +Unk_ov13_022290FC: ; 0x022290FC + .incbin "incbin/overlay13_rodata.bin", 0x400, 0x118 + diff --git a/asm/ov13_02224500.s b/asm/ov13_02224500.s new file mode 100644 index 000000000..e174cf24d --- /dev/null +++ b/asm/ov13_02224500.s @@ -0,0 +1,2393 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02224500 +ov13_02224500: ; 0x02224500 + push {r4, lr} + add r4, r0, #0 + bl ov13_0222453C + add r0, r4, #0 + bl ov13_02224588 + add r0, r4, #0 + bl ov13_02224670 + add r0, r4, #0 + bl ov13_02224720 + add r0, r4, #0 + bl ov13_02224798 + add r0, r4, #0 + bl ov13_02224848 + add r0, r4, #0 + bl ov13_02224948 + add r0, r4, #0 + bl ov13_0222554C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + pop {r4, pc} + thumb_func_end ov13_02224500 + + thumb_func_start ov13_0222453C +ov13_0222453C: ; 0x0222453C + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _02224580 ; =0x022292EC + add r2, sp, #0 + add r5, r0, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + add r4, r0, #0 + bl sub_0200C704 + ldr r1, _02224584 ; =0x00001FB4 + mov r2, #0x2b + str r0, [r5, r1] + ldr r1, [r5, r1] + add r0, r4, #0 + bl sub_0200C7C0 + ldr r1, _02224584 ; =0x00001FB4 + add r0, r4, #0 + ldr r1, [r5, r1] + add r2, sp, #0 + bl sub_0200CB30 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_02224580: .word 0x022292EC +_02224584: .word 0x00001FB4 + thumb_func_end ov13_0222453C + + thumb_func_start ov13_02224588 +ov13_02224588: ; 0x02224588 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + ldr r1, [r6, #0] + mov r0, #0x13 + ldr r1, [r1, #0xc] + bl sub_02006C24 + add r7, r0, #0 + ldr r0, [r6, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + str r0, [sp, #0x18] + bl sub_02079FD0 + str r7, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _02224668 ; =0x0000B007 + ldr r3, _0222466C ; =0x00001FB4 + str r0, [sp, #0x14] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [sp, #0x18] + ldr r3, [r6, r3] + bl sub_0200CDC4 + bl sub_02079FD8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02224668 ; =0x0000B007 + ldr r1, _0222466C ; =0x00001FB4 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CE24 + bl sub_02079FE4 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02224668 ; =0x0000B007 + ldr r1, _0222466C ; =0x00001FB4 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CE54 + mov r4, #0 + add r5, r6, #0 +_02224604: + ldrh r0, [r5, #8] + cmp r0, #0 + beq _0222462E + ldr r0, [r5, #4] + bl sub_02079D80 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02224668 ; =0x0000B007 + ldr r1, _0222466C ; =0x00001FB4 + add r0, r4, r0 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CC3C + b _02224654 +_0222462E: + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + bl sub_02079D8C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02224668 ; =0x0000B007 + ldr r1, _0222466C ; =0x00001FB4 + add r0, r4, r0 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CC3C +_02224654: + add r4, r4, #1 + add r5, #0x50 + cmp r4, #6 + blo _02224604 + add r0, r7, #0 + bl sub_02006CA8 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02224668: .word 0x0000B007 +_0222466C: .word 0x00001FB4 + thumb_func_end ov13_02224588 + + thumb_func_start ov13_02224670 +ov13_02224670: ; 0x02224670 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + ldr r1, [r5, #0] + add r4, r0, #0 + ldr r1, [r1, #0xc] + mov r0, #0x27 + bl sub_02006C24 + add r6, r0, #0 + bl sub_0208E9E4 + str r6, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _02224714 ; =0x0000B008 + ldr r3, _02224718 ; =0x00001FB4 + str r0, [sp, #0x14] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r5, r3] + mov r1, #3 + add r2, r4, #0 + bl sub_0200CDC4 + bl sub_0208E9E8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02224714 ; =0x0000B008 + ldr r1, _02224718 ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + add r0, r4, #0 + add r2, r6, #0 + bl sub_0200CE24 + bl sub_0208E9EC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02224714 ; =0x0000B008 + ldr r1, _02224718 ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + add r0, r4, #0 + add r2, r6, #0 + bl sub_0200CE54 + bl sub_0208E9E0 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0222471C ; =0x0000B00D + ldr r1, _02224718 ; =0x00001FB4 + str r0, [sp, #8] + ldr r1, [r5, r1] + add r0, r4, #0 + add r2, r6, #0 + bl sub_0200CC3C + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_02224714: .word 0x0000B008 +_02224718: .word 0x00001FB4 +_0222471C: .word 0x0000B00D + thumb_func_end ov13_02224670 + + thumb_func_start ov13_02224720 +ov13_02224720: ; 0x02224720 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + add r6, r0, #0 + mov r0, #2 + str r0, [sp] + ldr r0, _02224788 ; =0x0000B009 + ldr r3, _0222478C ; =0x00001FB4 + str r0, [sp, #4] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r5, r3] + mov r1, #3 + add r2, r6, #0 + bl sub_0207C9B0 + ldr r1, _0222478C ; =0x00001FB4 + ldr r2, _02224788 ; =0x0000B009 + ldr r1, [r5, r1] + add r0, r6, #0 + add r3, r2, #0 + bl sub_0207C9EC + ldr r4, _02224790 ; =0x0000B00E + add r7, r4, #6 +_0222475C: + ldr r1, _0222478C ; =0x00001FB4 + str r4, [sp] + ldr r1, [r5, r1] + add r0, r6, #0 + mov r2, #2 + mov r3, #0 + bl sub_0207C948 + add r4, r4, #1 + cmp r4, r7 + bls _0222475C + ldr r0, _02224794 ; =0x0000B015 + ldr r1, _0222478C ; =0x00001FB4 + str r0, [sp] + ldr r1, [r5, r1] + add r0, r6, #0 + mov r2, #2 + mov r3, #0 + bl sub_0207CAC4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02224788: .word 0x0000B009 +_0222478C: .word 0x00001FB4 +_02224790: .word 0x0000B00E +_02224794: .word 0x0000B015 + thumb_func_end ov13_02224720 + + thumb_func_start ov13_02224798 +ov13_02224798: ; 0x02224798 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #0x14 + ldr r1, [r1, #0xc] + bl sub_02006C24 + add r4, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + add r6, r0, #0 + bl sub_02081934 + str r4, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0222483C ; =0x0000B00A + ldr r3, _02224840 ; =0x00001FB4 + str r0, [sp, #0x14] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r5, r3] + mov r1, #3 + add r2, r6, #0 + bl sub_0200CDC4 + bl sub_02081938 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0222483C ; =0x0000B00A + ldr r1, _02224840 ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0200CE24 + bl sub_0208193C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0222483C ; =0x0000B00A + ldr r1, _02224840 ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0200CE54 + bl sub_02081930 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02224844 ; =0x0000B016 + ldr r1, _02224840 ; =0x00001FB4 + str r0, [sp, #8] + ldr r1, [r5, r1] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0200CC3C + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_0222483C: .word 0x0000B00A +_02224840: .word 0x00001FB4 +_02224844: .word 0x0000B016 + thumb_func_end ov13_02224798 + + thumb_func_start ov13_02224848 +ov13_02224848: ; 0x02224848 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + add r4, r0, #0 + mov r0, #0x48 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _022248CC ; =0x0000B00B + ldr r3, _022248D0 ; =0x00001FB4 + str r0, [sp, #0x14] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r3, [r5, r3] + mov r1, #3 + add r2, r4, #0 + bl sub_0200CD7C + mov r0, #0 + str r0, [sp] + ldr r0, _022248CC ; =0x0000B00B + ldr r1, _022248D0 ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + add r0, r4, #0 + mov r2, #0x48 + mov r3, #0x19 + bl sub_0200CE0C + mov r0, #0 + str r0, [sp] + ldr r0, _022248CC ; =0x0000B00B + ldr r1, _022248D0 ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + add r0, r4, #0 + mov r2, #0x48 + mov r3, #0x18 + bl sub_0200CE3C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _022248D4 ; =0x0000B017 + ldr r1, _022248D0 ; =0x00001FB4 + str r0, [sp, #8] + ldr r1, [r5, r1] + add r0, r4, #0 + mov r2, #0x48 + mov r3, #0x1a + bl sub_0200CBDC + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022248CC: .word 0x0000B00B +_022248D0: .word 0x00001FB4 +_022248D4: .word 0x0000B017 + thumb_func_end ov13_02224848 + + thumb_func_start ov13_022248D8 +ov13_022248D8: ; 0x022248D8 + push {r4, r5, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + ldr r0, [r0, #8] + bl ov16_0223E010 + mov r2, #0 + add r1, sp, #0 + strh r2, [r1] + strh r2, [r1, #2] + strh r2, [r1, #4] + strh r2, [r1, #6] + mov r1, #0x14 + ldr r3, _02224930 ; =0x02229524 + mul r1, r4 + ldr r3, [r3, r1] + str r2, [sp, #0xc] + str r3, [sp, #8] + mov r3, #2 + str r3, [sp, #0x10] + ldr r3, _02224934 ; =0x02229514 + str r2, [sp, #0x30] + ldr r3, [r3, r1] + add r2, sp, #0 + str r3, [sp, #0x14] + ldr r3, _02224938 ; =0x02229518 + ldr r3, [r3, r1] + str r3, [sp, #0x18] + ldr r3, _0222493C ; =0x0222951C + ldr r3, [r3, r1] + str r3, [sp, #0x1c] + ldr r3, _02224940 ; =0x02229520 + ldr r1, [r3, r1] + str r1, [sp, #0x20] + mov r1, #1 + str r1, [sp, #0x2c] + ldr r1, _02224944 ; =0x00001FB4 + ldr r1, [r5, r1] + bl sub_0200CE6C + add sp, #0x34 + pop {r4, r5, pc} + ; .align 2, 0 +_02224930: .word 0x02229524 +_02224934: .word 0x02229514 +_02224938: .word 0x02229518 +_0222493C: .word 0x0222951C +_02224940: .word 0x02229520 +_02224944: .word 0x00001FB4 + thumb_func_end ov13_022248D8 + + thumb_func_start ov13_02224948 +ov13_02224948: ; 0x02224948 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r7, _0222496C ; =0x00001FB8 + mov r4, #0 + add r5, r6, #0 +_02224952: + add r0, r6, #0 + add r1, r4, #0 + bl ov13_022248D8 + str r0, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x26 + blo _02224952 + add r0, r6, #0 + bl ov13_022249CC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222496C: .word 0x00001FB8 + thumb_func_end ov13_02224948 + + thumb_func_start ov13_02224970 +ov13_02224970: ; 0x02224970 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + ldr r6, _022249A4 ; =0x00001FB8 + str r0, [sp] + mov r4, #0 + add r5, r7, #0 +_02224984: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x26 + blo _02224984 + add r0, r7, #0 + bl ov13_022255B8 + ldr r1, _022249A8 ; =0x00001FB4 + ldr r0, [sp] + ldr r1, [r7, r1] + bl sub_0200D0B0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022249A4: .word 0x00001FB8 +_022249A8: .word 0x00001FB4 + thumb_func_end ov13_02224970 + + thumb_func_start ov13_022249AC +ov13_022249AC: ; 0x022249AC + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + mov r1, #1 + add r6, r0, #0 + bl sub_0200D3F4 + lsl r1, r5, #0x10 + lsl r2, r4, #0x10 + add r0, r6, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov13_022249AC + + thumb_func_start ov13_022249CC +ov13_022249CC: ; 0x022249CC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r5, #0 + mov r7, #0 + add r4, #0x1b + add r6, r5, #0 +_022249D8: + ldrh r0, [r5, #8] + cmp r0, #0 + beq _022249F8 + add r1, r5, #0 + ldrb r2, [r4] + add r1, #0x32 + ldrb r1, [r1] + lsl r2, r2, #0x18 + lsr r2, r2, #0x1f + bl sub_02079EDC + add r1, r0, #0 + ldr r0, _02224A08 ; =0x00001FD4 + ldr r0, [r6, r0] + bl sub_0200D41C +_022249F8: + add r7, r7, #1 + add r5, #0x50 + add r4, #0x50 + add r6, r6, #4 + cmp r7, #6 + blt _022249D8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02224A08: .word 0x00001FD4 + thumb_func_end ov13_022249CC + + thumb_func_start ov13_02224A0C +ov13_02224A0C: ; 0x02224A0C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r3, #0 + ldr r0, [r0, #8] + add r7, r1, #0 + add r4, r2, #0 + bl ov16_0223E010 + str r0, [sp, #8] + bl sub_0207C944 + str r0, [sp, #0xc] + add r0, r6, #0 + bl sub_0207C908 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r1, _02224A58 ; =0x00001FB4 + str r4, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [r5, r1] + ldr r2, [sp, #0xc] + bl sub_0200D948 + add r0, r6, #0 + bl sub_0207C92C + add r1, r0, #0 + add r0, r7, #0 + add r1, r1, #4 + bl sub_0200D41C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02224A58: .word 0x00001FB4 + thumb_func_end ov13_02224A0C + + thumb_func_start ov13_02224A5C +ov13_02224A5C: ; 0x02224A5C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r2, #0 + ldr r0, [r0, #8] + add r6, r1, #0 + bl ov16_0223E010 + add r7, r0, #0 + bl sub_0207CAC0 + str r0, [sp, #8] + add r0, r4, #0 + bl sub_0207CA90 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, _02224AA8 ; =0x0000B015 + ldr r1, _02224AAC ; =0x00001FB4 + str r0, [sp, #4] + ldr r1, [r5, r1] + ldr r2, [sp, #8] + add r0, r7, #0 + bl sub_0200D948 + add r0, r4, #0 + bl sub_0207CAA8 + add r1, r0, #0 + add r0, r6, #0 + add r1, r1, #4 + bl sub_0200D41C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02224AA8: .word 0x0000B015 +_02224AAC: .word 0x00001FB4 + thumb_func_end ov13_02224A5C + + thumb_func_start ov13_02224AB0 +ov13_02224AB0: ; 0x02224AB0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + cmp r6, #7 + beq _02224AD0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200D364 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov13_022249AC +_02224AD0: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02224AB0 + + thumb_func_start ov13_02224AD4 +ov13_02224AD4: ; 0x02224AD4 + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, _02224B18 ; =0x00002004 + add r5, r0, #0 + add r6, r2, #0 + ldrb r3, [r4, #0x14] + ldr r1, [r5, r1] + ldr r2, _02224B1C ; =0x0000B00E + bl ov13_02224A0C + ldr r0, _02224B18 ; =0x00002004 + ldr r1, [r6, #0] + ldr r0, [r5, r0] + ldr r2, [r6, #4] + bl ov13_022249AC + ldrb r3, [r4, #0x15] + ldrb r0, [r4, #0x14] + cmp r0, r3 + beq _02224B14 + ldr r1, _02224B20 ; =0x00002008 + ldr r2, _02224B24 ; =0x0000B00F + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov13_02224A0C + ldr r0, _02224B20 ; =0x00002008 + ldr r1, [r6, #8] + ldr r0, [r5, r0] + ldr r2, [r6, #0xc] + bl ov13_022249AC +_02224B14: + pop {r4, r5, r6, pc} + nop +_02224B18: .word 0x00002004 +_02224B1C: .word 0x0000B00E +_02224B20: .word 0x00002008 +_02224B24: .word 0x0000B00F + thumb_func_end ov13_02224AD4 + + thumb_func_start ov13_02224B28 +ov13_02224B28: ; 0x02224B28 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r0, #0 + beq _02224B58 + bl sub_0207D2D0 + cmp r0, #1 + bne _02224B46 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D364 + b _02224B4E +_02224B46: + add r0, r5, #0 + mov r1, #0 + bl sub_0200D364 +_02224B4E: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov13_022249AC +_02224B58: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov13_02224B28 + + thumb_func_start ov13_02224B5C +ov13_02224B5C: ; 0x02224B5C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r0, #0 + beq _02224B7A + add r0, r5, #0 + mov r1, #2 + bl sub_0200D364 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov13_022249AC +_02224B7A: + pop {r4, r5, r6, pc} + thumb_func_end ov13_02224B5C + + thumb_func_start ov13_02224B7C +ov13_02224B7C: ; 0x02224B7C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r7, _02224C10 ; =0x00001FB8 + str r1, [sp] + mov r5, #0 + add r4, r6, #0 +_02224B88: + ldr r0, [r4, r7] + mov r1, #0 + bl sub_0200D3F4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #0x26 + blo _02224B88 + ldr r0, [sp] + cmp r0, #9 + bhi _02224C0C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02224BAA: ; jump table + .short _02224BBE - _02224BAA - 2 ; case 0 + .short _02224BC6 - _02224BAA - 2 ; case 1 + .short _02224BCE - _02224BAA - 2 ; case 2 + .short _02224BD6 - _02224BAA - 2 ; case 3 + .short _02224BDE - _02224BAA - 2 ; case 4 + .short _02224BE6 - _02224BAA - 2 ; case 5 + .short _02224BEE - _02224BAA - 2 ; case 6 + .short _02224BF6 - _02224BAA - 2 ; case 7 + .short _02224BFE - _02224BAA - 2 ; case 8 + .short _02224C06 - _02224BAA - 2 ; case 9 +_02224BBE: + add r0, r6, #0 + bl ov13_02224C14 + pop {r3, r4, r5, r6, r7, pc} +_02224BC6: + add r0, r6, #0 + bl ov13_02224CB0 + pop {r3, r4, r5, r6, r7, pc} +_02224BCE: + add r0, r6, #0 + bl ov13_02224D08 + pop {r3, r4, r5, r6, r7, pc} +_02224BD6: + add r0, r6, #0 + bl ov13_02224DA0 + pop {r3, r4, r5, r6, r7, pc} +_02224BDE: + add r0, r6, #0 + bl ov13_02224E78 + pop {r3, r4, r5, r6, r7, pc} +_02224BE6: + add r0, r6, #0 + bl ov13_0222506C + pop {r3, r4, r5, r6, r7, pc} +_02224BEE: + add r0, r6, #0 + bl ov13_02224F3C + pop {r3, r4, r5, r6, r7, pc} +_02224BF6: + add r0, r6, #0 + bl ov13_02224FA8 + pop {r3, r4, r5, r6, r7, pc} +_02224BFE: + add r0, r6, #0 + bl ov13_02225150 + pop {r3, r4, r5, r6, r7, pc} +_02224C06: + add r0, r6, #0 + bl ov13_022250D8 +_02224C0C: + pop {r3, r4, r5, r6, r7, pc} + nop +_02224C10: .word 0x00001FB8 + thumb_func_end ov13_02224B7C + + thumb_func_start ov13_02224C14 +ov13_02224C14: ; 0x02224C14 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + mov r0, #0 + str r0, [sp, #4] + add r0, r6, #0 + str r0, [sp] + add r0, #0x1b + ldr r4, _02224C98 ; =0x02229404 + ldr r7, _02224C9C ; =0x02229434 + add r5, r6, #0 + str r0, [sp] +_02224C2C: + ldrh r0, [r6, #8] + cmp r0, #0 + beq _02224C7A + ldr r0, _02224CA0 ; =0x00001FD4 + ldr r1, [r4, #0] + ldr r0, [r5, r0] + ldr r2, [r4, #4] + bl ov13_022249AC + ldr r0, [sp] + ldr r1, _02224CA4 ; =0x00001FEC + ldrb r0, [r0] + ldr r1, [r5, r1] + ldr r2, [r7, #0] + lsl r0, r0, #0x19 + ldr r3, [r7, #4] + lsr r0, r0, #0x1c + bl ov13_02224AB0 + ldr r1, _02224CA8 ; =0x00001FB8 + ldr r2, [r4, #0] + ldr r3, [r4, #4] + ldrh r0, [r6, #0x1e] + ldr r1, [r5, r1] + add r2, #8 + add r3, #8 + bl ov13_02224B28 + add r0, r6, #0 + add r0, #0x31 + ldr r1, _02224CAC ; =0x00002038 + ldr r2, [r4, #0] + ldr r3, [r4, #4] + ldrb r0, [r0] + ldr r1, [r5, r1] + add r2, #0x10 + add r3, #8 + bl ov13_02224B5C +_02224C7A: + ldr r0, [sp] + add r6, #0x50 + add r0, #0x50 + str r0, [sp] + ldr r0, [sp, #4] + add r4, #8 + add r0, r0, #1 + add r5, r5, #4 + add r7, #8 + str r0, [sp, #4] + cmp r0, #6 + blt _02224C2C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02224C98: .word 0x02229404 +_02224C9C: .word 0x02229434 +_02224CA0: .word 0x00001FD4 +_02224CA4: .word 0x00001FEC +_02224CA8: .word 0x00001FB8 +_02224CAC: .word 0x00002038 + thumb_func_end ov13_02224C14 + + thumb_func_start ov13_02224CB0 +ov13_02224CB0: ; 0x02224CB0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02224D04 ; =0x00001FB8 + mov r2, #0x48 + ldr r0, [r1, r0] + mov r1, #0x80 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x50 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224D04 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x88 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r4, #0x2d + ldrb r1, [r1, #0x11] + ldrb r0, [r4] + mov r3, #0x50 + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224D04 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x90 + bl ov13_02224B5C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02224D04: .word 0x00001FB8 + thumb_func_end ov13_02224CB0 + + thumb_func_start ov13_02224D08 +ov13_02224D08: ; 0x02224D08 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02224D94 ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrb r0, [r4, #0x17] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r0, r0, #0x19 + add r1, #0xd + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224D94 ; =0x00001FB8 + lsr r0, r0, #0x1c + ldr r1, [r2, r1] + mov r2, #0xc6 + bl ov13_02224AB0 + ldr r2, _02224D98 ; =0x022292C4 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02224AD4 + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224D94 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + add r0, #0x2d + ldrb r0, [r0] + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224D94 ; =0x00001FB8 + mov r3, #0x14 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + ldr r1, _02224D9C ; =0x00001FD0 + ldrh r0, [r4, #0x1a] + ldr r1, [r5, r1] + mov r2, #0x14 + mov r3, #0x84 + bl ov13_02224B28 + pop {r3, r4, r5, pc} + nop +_02224D94: .word 0x00001FB8 +_02224D98: .word 0x022292C4 +_02224D9C: .word 0x00001FD0 + thumb_func_end ov13_02224D08 + + thumb_func_start ov13_02224DA0 +ov13_02224DA0: ; 0x02224DA0 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + ldr r0, [r0, #0] + ldrb r2, [r0, #0x11] + ldr r0, [sp] + add r1, r0, #4 + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r1, r0, #2 + ldr r0, [sp] + mov r2, #0xc + add r1, r0, r1 + ldr r0, _02224E64 ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r1, [sp] + ldrb r0, [r4, #0x17] + ldr r1, [r1, #0] + mov r3, #0x14 + ldrb r1, [r1, #0x11] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1c + add r1, #0xd + lsl r2, r1, #2 + ldr r1, [sp] + add r2, r1, r2 + ldr r1, _02224E64 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0xc6 + bl ov13_02224AB0 + ldr r0, [sp] + ldr r2, _02224E68 ; =0x022292A4 + add r1, r4, #0 + bl ov13_02224AD4 + ldr r1, [sp] + ldrh r0, [r4, #0x1a] + ldr r1, [r1, #0] + mov r3, #0x14 + ldrb r1, [r1, #0x11] + lsl r2, r1, #2 + ldr r1, [sp] + add r2, r1, r2 + ldr r1, _02224E64 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [sp] + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0x2d + ldrb r1, [r1, #0x11] + ldrb r0, [r0] + mov r3, #0x14 + add r1, #0x20 + lsl r2, r1, #2 + ldr r1, [sp] + add r2, r1, r2 + ldr r1, _02224E64 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + ldr r5, [sp] + ldr r6, _02224E6C ; =0x02229324 + mov r7, #0 +_02224E30: + ldrh r0, [r4, #0x30] + cmp r0, #0 + beq _02224E56 + add r3, r4, #0 + ldr r1, _02224E70 ; =0x0000200C + add r3, #0x34 + ldr r2, _02224E74 ; =0x0000B010 + ldrb r3, [r3] + ldr r0, [sp] + ldr r1, [r5, r1] + add r2, r7, r2 + bl ov13_02224A0C + ldr r0, _02224E70 ; =0x0000200C + ldr r1, [r6, #0] + ldr r0, [r5, r0] + ldr r2, [r6, #4] + bl ov13_022249AC +_02224E56: + add r7, r7, #1 + add r4, #8 + add r5, r5, #4 + add r6, #8 + cmp r7, #4 + blo _02224E30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02224E64: .word 0x00001FB8 +_02224E68: .word 0x022292A4 +_02224E6C: .word 0x02229324 +_02224E70: .word 0x0000200C +_02224E74: .word 0x0000B010 + thumb_func_end ov13_02224DA0 + + thumb_func_start ov13_02224E78 +ov13_02224E78: ; 0x02224E78 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02224F30 ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrb r0, [r4, #0x17] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r0, r0, #0x19 + add r1, #0xd + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224F30 ; =0x00001FB8 + lsr r0, r0, #0x1c + ldr r1, [r2, r1] + mov r2, #0xc6 + bl ov13_02224AB0 + ldr r2, _02224F34 ; =0x022292B4 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02224AD4 + ldr r0, [r5, #0] + mov r2, #0x30 + add r0, #0x34 + ldrb r0, [r0] + add r0, #0x15 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02224F30 ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0x88 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224F30 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + add r0, #0x2d + ldrb r0, [r0] + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224F30 ; =0x00001FB8 + mov r3, #0x14 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + ldr r2, [r5, #0] + ldr r1, _02224F38 ; =0x00002020 + add r2, #0x34 + ldrb r2, [r2] + ldr r1, [r5, r1] + add r0, r5, #0 + lsl r2, r2, #3 + add r2, r4, r2 + add r2, #0x35 + ldrb r2, [r2] + bl ov13_02224A5C + ldr r0, _02224F38 ; =0x00002020 + mov r1, #0x18 + ldr r0, [r5, r0] + mov r2, #0x58 + bl ov13_022249AC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02224F30: .word 0x00001FB8 +_02224F34: .word 0x022292B4 +_02224F38: .word 0x00002020 + thumb_func_end ov13_02224E78 + + thumb_func_start ov13_02224F3C +ov13_02224F3C: ; 0x02224F3C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02224FA0 ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r2, _02224FA4 ; =0x02229294 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02224AD4 + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224FA0 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r4, #0x2d + ldrb r1, [r1, #0x11] + ldrb r0, [r4] + mov r3, #0x14 + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02224FA0 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + add r0, r5, #0 + bl ov13_022252E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02224FA0: .word 0x00001FB8 +_02224FA4: .word 0x02229294 + thumb_func_end ov13_02224F3C + + thumb_func_start ov13_02224FA8 +ov13_02224FA8: ; 0x02224FA8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02225060 ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r2, _02225064 ; =0x02229284 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02224AD4 + ldr r0, [r5, #0] + mov r2, #0x30 + add r0, #0x34 + ldrb r0, [r0] + add r0, #0x15 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _02225060 ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0x88 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02225060 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + add r0, #0x2d + ldrb r0, [r0] + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _02225060 ; =0x00001FB8 + mov r3, #0x14 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + ldr r1, [r5, #0] + add r0, r1, #0 + add r0, #0x34 + ldrb r2, [r0] + cmp r2, #4 + bhs _0222503E + lsl r2, r2, #3 + add r2, r4, r2 + ldr r1, _02225068 ; =0x00002020 + add r2, #0x35 + ldrb r2, [r2] + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov13_02224A5C + b _02225052 +_0222503E: + ldrh r0, [r1, #0x24] + mov r1, #1 + bl sub_020790C4 + ldr r1, _02225068 ; =0x00002020 + add r2, r0, #0 + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov13_02224A5C +_02225052: + ldr r0, _02225068 ; =0x00002020 + mov r1, #0x18 + ldr r0, [r5, r0] + mov r2, #0x58 + bl ov13_022249AC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02225060: .word 0x00001FB8 +_02225064: .word 0x02229284 +_02225068: .word 0x00002020 + thumb_func_end ov13_02224FA8 + + thumb_func_start ov13_0222506C +ov13_0222506C: ; 0x0222506C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _022250D0 ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r2, _022250D4 ; =0x02229294 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02224AD4 + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _022250D0 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r4, #0x2d + ldrb r1, [r1, #0x11] + ldrb r0, [r4] + mov r3, #0x14 + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _022250D0 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + add r0, r5, #0 + bl ov13_022252E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022250D0: .word 0x00001FB8 +_022250D4: .word 0x02229294 + thumb_func_end ov13_0222506C + + thumb_func_start ov13_022250D8 +ov13_022250D8: ; 0x022250D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0222514C ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r0, [r5, #0] + mov r2, #0x48 + add r0, #0x34 + ldrb r0, [r0] + add r0, #0x15 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0222514C ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0x88 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _0222514C ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r4, #0x2d + ldrb r1, [r1, #0x11] + ldrb r0, [r4] + mov r3, #0x14 + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _0222514C ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + add r0, r5, #0 + bl ov13_02225420 + pop {r3, r4, r5, pc} + nop +_0222514C: .word 0x00001FB8 + thumb_func_end ov13_022250D8 + + thumb_func_start ov13_02225150 +ov13_02225150: ; 0x02225150 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r1, r5, #4 + ldrb r2, [r0, #0x11] + mov r0, #0x50 + mul r0, r2 + add r4, r1, r0 + add r0, r2, #7 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _022251B0 ; =0x00001FB8 + mov r2, #0xc + ldr r0, [r1, r0] + mov r1, #0x18 + bl ov13_022249AC + ldr r1, [r5, #0] + ldrh r0, [r4, #0x1a] + ldrb r1, [r1, #0x11] + mov r3, #0x14 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _022251B0 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x20 + bl ov13_02224B28 + ldr r1, [r5, #0] + add r4, #0x2d + ldrb r1, [r1, #0x11] + ldrb r0, [r4] + mov r3, #0x14 + add r1, #0x20 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _022251B0 ; =0x00001FB8 + ldr r1, [r2, r1] + mov r2, #0x28 + bl ov13_02224B5C + add r0, r5, #0 + bl ov13_022252E8 + add r0, r5, #0 + bl ov13_02225420 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022251B0: .word 0x00001FB8 + thumb_func_end ov13_02225150 + + thumb_func_start ov13_022251B4 +ov13_022251B4: ; 0x022251B4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + add r2, r6, #4 + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mov r4, #0 + mul r0, r1 + add r0, r2, r0 + str r0, [sp] +_022251C8: + ldr r0, [sp] + lsl r5, r4, #3 + add r3, r0, r5 + ldrh r0, [r3, #0x30] + cmp r0, #0 + beq _022251FC + lsl r0, r4, #2 + add r3, #0x34 + add r7, r6, r0 + ldr r1, _02225234 ; =0x0000200C + ldr r2, _02225238 ; =0x0000B010 + ldrb r3, [r3] + ldr r1, [r7, r1] + add r0, r6, #0 + add r2, r4, r2 + bl ov13_02224A0C + ldr r0, _0222523C ; =0x022293DC + ldr r1, _0222523C ; =0x022293DC + add r2, r0, r5 + ldr r0, _02225234 ; =0x0000200C + ldr r1, [r1, r5] + ldr r0, [r7, r0] + ldr r2, [r2, #4] + bl ov13_022249AC +_022251FC: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #4 + blo _022251C8 + ldr r0, [r6, #0] + ldrh r0, [r0, #0x24] + cmp r0, #0 + beq _02225232 + mov r1, #3 + bl sub_020790C4 + add r3, r0, #0 + ldr r1, _02225240 ; =0x0000201C + lsl r3, r3, #0x18 + ldr r1, [r6, r1] + ldr r2, _02225244 ; =0x0000B014 + add r0, r6, #0 + lsr r3, r3, #0x18 + bl ov13_02224A0C + ldr r0, _02225240 ; =0x0000201C + mov r1, #0x58 + ldr r0, [r6, r0] + mov r2, #0xb0 + bl ov13_022249AC +_02225232: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02225234: .word 0x0000200C +_02225238: .word 0x0000B010 +_0222523C: .word 0x022293DC +_02225240: .word 0x0000201C +_02225244: .word 0x0000B014 + thumb_func_end ov13_022251B4 + + thumb_func_start ov13_02225248 +ov13_02225248: ; 0x02225248 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0] + add r2, r7, #4 + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mov r4, #0 + mul r0, r1 + add r0, r2, r0 + str r0, [sp] +_0222525C: + ldr r0, [sp] + lsl r5, r4, #3 + add r0, r0, r5 + ldrh r0, [r0, #0x30] + cmp r0, #0 + beq _0222529A + lsl r1, r4, #2 + add r6, r7, r1 + mov r1, #0xb + bl sub_020790C4 + add r3, r0, #0 + ldr r1, _022252D4 ; =0x0000200C + ldr r2, _022252D8 ; =0x0000B010 + add r3, #0x12 + lsl r3, r3, #0x18 + ldr r1, [r6, r1] + add r0, r7, #0 + add r2, r4, r2 + lsr r3, r3, #0x18 + bl ov13_02224A0C + ldr r0, _022252DC ; =0x022293DC + ldr r1, _022252DC ; =0x022293DC + add r2, r0, r5 + ldr r0, _022252D4 ; =0x0000200C + ldr r1, [r1, r5] + ldr r0, [r6, r0] + ldr r2, [r2, #4] + bl ov13_022249AC +_0222529A: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #4 + blo _0222525C + ldr r0, [r7, #0] + ldrh r0, [r0, #0x24] + cmp r0, #0 + beq _022252D2 + mov r1, #0xb + bl sub_020790C4 + add r3, r0, #0 + ldr r1, _022252E0 ; =0x0000201C + add r3, #0x12 + lsl r3, r3, #0x18 + ldr r1, [r7, r1] + ldr r2, _022252E4 ; =0x0000B014 + add r0, r7, #0 + lsr r3, r3, #0x18 + bl ov13_02224A0C + ldr r0, _022252E0 ; =0x0000201C + mov r1, #0x58 + ldr r0, [r7, r0] + mov r2, #0xb0 + bl ov13_022249AC +_022252D2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022252D4: .word 0x0000200C +_022252D8: .word 0x0000B010 +_022252DC: .word 0x022293DC +_022252E0: .word 0x0000201C +_022252E4: .word 0x0000B014 + thumb_func_end ov13_02225248 + + thumb_func_start ov13_022252E8 +ov13_022252E8: ; 0x022252E8 + push {r3, lr} + ldr r1, _02225300 ; =0x00002077 + ldrb r1, [r0, r1] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + bne _022252FA + bl ov13_022251B4 + pop {r3, pc} +_022252FA: + bl ov13_02225248 + pop {r3, pc} + ; .align 2, 0 +_02225300: .word 0x00002077 + thumb_func_end ov13_022252E8 + + thumb_func_start ov13_02225304 +ov13_02225304: ; 0x02225304 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_0200D37C + cmp r4, r0 + beq _02225322 + add r0, r5, #0 + mov r1, #0 + bl sub_0200D3CC + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D364 +_02225322: + pop {r3, r4, r5, pc} + thumb_func_end ov13_02225304 + + thumb_func_start ov13_02225324 +ov13_02225324: ; 0x02225324 + push {r3, lr} + add r2, r0, #0 + ldrh r0, [r2, #0x10] + cmp r0, #0 + bne _02225332 + mov r0, #0 + pop {r3, pc} +_02225332: + ldrb r1, [r2, #0x17] + lsl r1, r1, #0x19 + lsr r1, r1, #0x1c + cmp r1, #7 + beq _02225344 + cmp r1, #6 + beq _02225344 + mov r0, #5 + pop {r3, pc} +_02225344: + ldrh r1, [r2, #0x12] + mov r2, #0x30 + bl sub_0208C104 + cmp r0, #4 + bhi _02225376 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222535C: ; jump table + .short _02225376 - _0222535C - 2 ; case 0 + .short _02225372 - _0222535C - 2 ; case 1 + .short _0222536E - _0222535C - 2 ; case 2 + .short _0222536A - _0222535C - 2 ; case 3 + .short _02225366 - _0222535C - 2 ; case 4 +_02225366: + mov r0, #1 + pop {r3, pc} +_0222536A: + mov r0, #2 + pop {r3, pc} +_0222536E: + mov r0, #3 + pop {r3, pc} +_02225372: + mov r0, #4 + pop {r3, pc} +_02225376: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov13_02225324 + + thumb_func_start ov13_0222537C +ov13_0222537C: ; 0x0222537C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + mov r4, #0 + ldr r0, [r0, #0] + bl sub_0207A0F8 + cmp r0, #0 + ble _022253D4 + add r7, r5, #4 +_02225390: + mov r0, #0x50 + add r1, r4, #0 + mul r1, r0 + add r0, r5, r1 + ldrh r0, [r0, #8] + cmp r0, #0 + beq _022253C2 + add r0, r7, r1 + bl ov13_02225324 + add r1, r0, #0 + lsl r0, r4, #2 + add r6, r5, r0 + ldr r0, _022253D8 ; =0x00001FD4 + lsl r1, r1, #0x18 + ldr r0, [r6, r0] + lsr r1, r1, #0x18 + bl ov13_02225304 + ldr r0, _022253D8 ; =0x00001FD4 + mov r1, #1 + ldr r0, [r6, r0] + lsl r1, r1, #0xc + bl sub_0200D34C +_022253C2: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_0207A0F8 + cmp r4, r0 + blt _02225390 +_022253D4: + pop {r3, r4, r5, r6, r7, pc} + nop +_022253D8: .word 0x00001FD4 + thumb_func_end ov13_0222537C + + thumb_func_start ov13_022253DC +ov13_022253DC: ; 0x022253DC + push {r4, lr} + add r4, r2, #0 + cmp r4, r1 + ble _02225402 + add r0, #0x2c + sub r1, r4, r1 + mul r1, r0 + lsl r0, r1, #0x10 + mov r1, #0x4b + lsl r1, r1, #2 + bl sub_020E2178 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + pop {r4, pc} +_02225402: + add r0, #0x2c + sub r1, r1, r4 + mul r1, r0 + lsl r0, r1, #0x10 + mov r1, #0x4b + lsl r1, r1, #2 + bl sub_020E2178 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add r0, r4, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + pop {r4, pc} + thumb_func_end ov13_022253DC + + thumb_func_start ov13_02225420 +ov13_02225420: ; 0x02225420 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + add r5, r6, #4 + ldrb r1, [r0, #0x11] + mov r0, #0x50 + add r4, r1, #0 + mul r4, r0 + ldr r0, _02225538 ; =0x00002024 + mov r1, #0 + ldr r0, [r6, r0] + bl ov13_02225304 + ldr r0, _0222553C ; =0x00002028 + mov r1, #1 + ldr r0, [r6, r0] + bl ov13_02225304 + ldr r0, _02225540 ; =0x0000202C + mov r1, #3 + ldr r0, [r6, r0] + bl ov13_02225304 + ldr r0, _02225544 ; =0x00002030 + mov r1, #4 + ldr r0, [r6, r0] + bl ov13_02225304 + ldr r0, _02225548 ; =0x00002034 + mov r1, #2 + ldr r0, [r6, r0] + bl ov13_02225304 + add r0, r5, r4 + add r0, #0x28 + mov r1, #0x90 + ldrb r0, [r0] + add r2, r1, #0 + bl ov13_022253DC + add r7, r0, #0 + add r0, r5, r4 + add r0, #0x28 + ldrb r0, [r0] + mov r1, #2 + mov r2, #0x18 + bl ov13_022253DC + add r2, r0, #0 + ldr r0, _02225538 ; =0x00002024 + add r1, r7, #0 + ldr r0, [r6, r0] + bl ov13_022249AC + add r0, r5, r4 + add r0, #0x29 + ldrb r0, [r0] + mov r1, #0xa4 + mov r2, #0x90 + bl ov13_022253DC + add r7, r0, #0 + add r0, r5, r4 + add r0, #0x29 + ldrb r0, [r0] + mov r1, #0x10 + mov r2, #0x18 + bl ov13_022253DC + add r2, r0, #0 + ldr r0, _0222553C ; =0x00002028 + add r1, r7, #0 + ldr r0, [r6, r0] + bl ov13_022249AC + add r0, r5, r4 + add r0, #0x2a + ldrb r0, [r0] + mov r1, #0x9c + mov r2, #0x90 + bl ov13_022253DC + add r7, r0, #0 + add r0, r5, r4 + add r0, #0x2a + ldrb r0, [r0] + mov r1, #0x29 + mov r2, #0x18 + bl ov13_022253DC + add r2, r0, #0 + ldr r0, _02225540 ; =0x0000202C + add r1, r7, #0 + ldr r0, [r6, r0] + bl ov13_022249AC + add r0, r5, r4 + add r0, #0x2b + ldrb r0, [r0] + mov r1, #0x83 + mov r2, #0x8f + bl ov13_022253DC + add r7, r0, #0 + add r0, r5, r4 + add r0, #0x2b + ldrb r0, [r0] + mov r1, #0x29 + mov r2, #0x18 + bl ov13_022253DC + add r2, r0, #0 + ldr r0, _02225544 ; =0x00002030 + add r1, r7, #0 + ldr r0, [r6, r0] + bl ov13_022249AC + add r0, r5, r4 + add r0, #0x2c + ldrb r0, [r0] + mov r1, #0x7b + mov r2, #0x8f + bl ov13_022253DC + add r7, r0, #0 + add r0, r5, r4 + add r0, #0x2c + ldrb r0, [r0] + mov r1, #0x10 + mov r2, #0x18 + bl ov13_022253DC + add r2, r0, #0 + ldr r0, _02225548 ; =0x00002034 + add r1, r7, #0 + ldr r0, [r6, r0] + bl ov13_022249AC + pop {r3, r4, r5, r6, r7, pc} + nop +_02225538: .word 0x00002024 +_0222553C: .word 0x00002028 +_02225540: .word 0x0000202C +_02225544: .word 0x00002030 +_02225548: .word 0x00002034 + thumb_func_end ov13_02225420 + + thumb_func_start ov13_0222554C +ov13_0222554C: ; 0x0222554C + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl ov16_0223E010 + ldr r1, _022255A8 ; =0x0000B018 + mov r2, #0x7a + str r1, [sp] + sub r1, #0xc + str r1, [sp, #4] + str r1, [sp, #8] + str r1, [sp, #0xc] + ldr r1, _022255AC ; =0x00001FB4 + ldr r3, [r5, #0] + lsl r2, r2, #2 + ldr r1, [r5, r1] + ldr r2, [r5, r2] + ldr r3, [r3, #0xc] + add r4, r0, #0 + bl ov16_0226DB7C + ldr r3, _022255B0 ; =0x0000B00C + mov r0, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r1, _022255AC ; =0x00001FB4 + ldr r2, [r5, #0] + ldr r1, [r5, r1] + ldr r2, [r2, #0xc] + add r0, r4, #0 + add r3, #0xc + bl ov16_0226DC24 + add r1, r0, #0 + ldr r0, _022255B4 ; =0x00002088 + ldr r0, [r5, r0] + bl ov13_02228A64 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_022255A8: .word 0x0000B018 +_022255AC: .word 0x00001FB4 +_022255B0: .word 0x0000B00C +_022255B4: .word 0x00002088 + thumb_func_end ov13_0222554C + + thumb_func_start ov13_022255B8 +ov13_022255B8: ; 0x022255B8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, _022255E0 ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228A58 + bl ov16_0226DCA8 + ldr r2, _022255E4 ; =0x0000B00C + ldr r0, _022255E8 ; =0x00001FB4 + str r2, [sp] + add r1, r2, #0 + ldr r0, [r4, r0] + add r1, #0xc + add r3, r2, #0 + bl ov16_0226DBFC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_022255E0: .word 0x00002088 +_022255E4: .word 0x0000B00C +_022255E8: .word 0x00001FB4 + thumb_func_end ov13_022255B8 + + thumb_func_start ov13_022255EC +ov13_022255EC: ; 0x022255EC + push {r3, lr} + ldr r1, _02225610 ; =0x00002077 + ldrb r2, [r0, r1] + lsl r2, r2, #0x18 + lsr r2, r2, #0x1c + bne _02225604 + add r1, #0x11 + ldr r0, [r0, r1] + mov r1, #0x5f + bl ov13_02228AC8 + pop {r3, pc} +_02225604: + add r1, #0x11 + ldr r0, [r0, r1] + mov r1, #0x7f + bl ov13_02228AC8 + pop {r3, pc} + ; .align 2, 0 +_02225610: .word 0x00002077 + thumb_func_end ov13_022255EC + + thumb_func_start ov13_02225614 +ov13_02225614: ; 0x02225614 + push {r3, lr} + ldr r1, _02225638 ; =0x00002077 + ldrb r2, [r0, r1] + lsl r2, r2, #0x18 + lsr r2, r2, #0x1c + bne _0222562C + add r1, #0x11 + ldr r0, [r0, r1] + mov r1, #5 + bl ov13_02228AC8 + pop {r3, pc} +_0222562C: + add r1, #0x11 + ldr r0, [r0, r1] + mov r1, #7 + bl ov13_02228AC8 + pop {r3, pc} + ; .align 2, 0 +_02225638: .word 0x00002077 + thumb_func_end ov13_02225614 + + thumb_func_start ov13_0222563C +ov13_0222563C: ; 0x0222563C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, _022256DC ; =0x00002088 + ldr r1, _022256E0 ; =0x0222938C + lsl r2, r5, #2 + ldr r0, [r4, r0] + ldr r1, [r1, r2] + bl ov13_02228A9C + cmp r5, #9 + bhi _022256DA + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02225660: ; jump table + .short _02225674 - _02225660 - 2 ; case 0 + .short _0222568E - _02225660 - 2 ; case 1 + .short _022256DA - _02225660 - 2 ; case 2 + .short _022256A4 - _02225660 - 2 ; case 3 + .short _022256A4 - _02225660 - 2 ; case 4 + .short _022256DA - _02225660 - 2 ; case 5 + .short _022256B4 - _02225660 - 2 ; case 6 + .short _022256C8 - _02225660 - 2 ; case 7 + .short _022256B4 - _02225660 - 2 ; case 8 + .short _022256C8 - _02225660 - 2 ; case 9 +_02225674: + ldr r1, [r4, #0] + ldr r0, _022256DC ; =0x00002088 + ldrb r1, [r1, #0x11] + ldr r0, [r4, r0] + bl ov13_02228A68 + ldr r0, _022256E4 ; =0x0000208C + mov r1, #0 + strb r1, [r4, r0] + ldr r0, [r4, #0] + add r0, #0x34 + strb r1, [r0] + pop {r3, r4, r5, pc} +_0222568E: + ldr r1, _022256DC ; =0x00002088 + ldr r0, [r4, r1] + add r1, r1, #4 + ldrb r1, [r4, r1] + bl ov13_02228A68 + ldr r0, [r4, #0] + mov r1, #0 + add r0, #0x34 + strb r1, [r0] + pop {r3, r4, r5, pc} +_022256A4: + ldr r1, [r4, #0] + ldr r0, _022256DC ; =0x00002088 + add r1, #0x34 + ldrb r1, [r1] + ldr r0, [r4, r0] + bl ov13_02228A68 + pop {r3, r4, r5, pc} +_022256B4: + add r0, r4, #0 + bl ov13_022255EC + ldr r1, _022256DC ; =0x00002088 + ldr r0, [r4, r1] + add r1, r1, #5 + ldrb r1, [r4, r1] + bl ov13_02228A68 + pop {r3, r4, r5, pc} +_022256C8: + add r0, r4, #0 + bl ov13_02225614 + ldr r1, _022256DC ; =0x00002088 + ldr r0, [r4, r1] + add r1, r1, #6 + ldrb r1, [r4, r1] + bl ov13_02228A68 +_022256DA: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022256DC: .word 0x00002088 +_022256E0: .word 0x0222938C +_022256E4: .word 0x0000208C + thumb_func_end ov13_0222563C + + thumb_func_start ov13_022256E8 +ov13_022256E8: ; 0x022256E8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0222570C ; =0x00002088 + mov r1, #0 + ldr r0, [r4, r0] + bl ov13_02228A60 + ldr r0, _0222570C ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228A90 + ldr r0, _0222570C ; =0x00002088 + ldr r0, [r4, r0] + bl ov13_02228A58 + bl ov16_0226DDE8 + pop {r4, pc} + ; .align 2, 0 +_0222570C: .word 0x00002088 + thumb_func_end ov13_022256E8 + + .rodata + + + .global Unk_ov13_02229214 +Unk_ov13_02229214: ; 0x02229214 + .incbin "incbin/overlay13_rodata.bin", 0x518, 0x520 - 0x518 + + .global Unk_ov13_0222921C +Unk_ov13_0222921C: ; 0x0222921C + .incbin "incbin/overlay13_rodata.bin", 0x520, 0x528 - 0x520 + + .global Unk_ov13_02229224 +Unk_ov13_02229224: ; 0x02229224 + .incbin "incbin/overlay13_rodata.bin", 0x528, 0x530 - 0x528 + + .global Unk_ov13_0222922C +Unk_ov13_0222922C: ; 0x0222922C + .incbin "incbin/overlay13_rodata.bin", 0x530, 0x538 - 0x530 + + .global Unk_ov13_02229234 +Unk_ov13_02229234: ; 0x02229234 + .incbin "incbin/overlay13_rodata.bin", 0x538, 0x540 - 0x538 + + .global Unk_ov13_0222923C +Unk_ov13_0222923C: ; 0x0222923C + .incbin "incbin/overlay13_rodata.bin", 0x540, 0x548 - 0x540 + + .global Unk_ov13_02229244 +Unk_ov13_02229244: ; 0x02229244 + .incbin "incbin/overlay13_rodata.bin", 0x548, 0x550 - 0x548 + + .global Unk_ov13_0222924C +Unk_ov13_0222924C: ; 0x0222924C + .incbin "incbin/overlay13_rodata.bin", 0x550, 0x558 - 0x550 + + .global Unk_ov13_02229254 +Unk_ov13_02229254: ; 0x02229254 + .incbin "incbin/overlay13_rodata.bin", 0x558, 0x560 - 0x558 + + .global Unk_ov13_0222925C +Unk_ov13_0222925C: ; 0x0222925C + .incbin "incbin/overlay13_rodata.bin", 0x560, 0x568 - 0x560 + + .global Unk_ov13_02229264 +Unk_ov13_02229264: ; 0x02229264 + .incbin "incbin/overlay13_rodata.bin", 0x568, 0x570 - 0x568 + + .global Unk_ov13_0222926C +Unk_ov13_0222926C: ; 0x0222926C + .incbin "incbin/overlay13_rodata.bin", 0x570, 0x578 - 0x570 + + .global Unk_ov13_02229274 +Unk_ov13_02229274: ; 0x02229274 + .incbin "incbin/overlay13_rodata.bin", 0x578, 0x580 - 0x578 + + .global Unk_ov13_0222927C +Unk_ov13_0222927C: ; 0x0222927C + .incbin "incbin/overlay13_rodata.bin", 0x580, 0x588 - 0x580 + + .global Unk_ov13_02229284 +Unk_ov13_02229284: ; 0x02229284 + .incbin "incbin/overlay13_rodata.bin", 0x588, 0x598 - 0x588 + + .global Unk_ov13_02229294 +Unk_ov13_02229294: ; 0x02229294 + .incbin "incbin/overlay13_rodata.bin", 0x598, 0x5A8 - 0x598 + + .global Unk_ov13_022292A4 +Unk_ov13_022292A4: ; 0x022292A4 + .incbin "incbin/overlay13_rodata.bin", 0x5A8, 0x5B8 - 0x5A8 + + .global Unk_ov13_022292B4 +Unk_ov13_022292B4: ; 0x022292B4 + .incbin "incbin/overlay13_rodata.bin", 0x5B8, 0x5C8 - 0x5B8 + + .global Unk_ov13_022292C4 +Unk_ov13_022292C4: ; 0x022292C4 + .incbin "incbin/overlay13_rodata.bin", 0x5C8, 0x5D8 - 0x5C8 + + .global Unk_ov13_022292D4 +Unk_ov13_022292D4: ; 0x022292D4 + .incbin "incbin/overlay13_rodata.bin", 0x5D8, 0x5F0 - 0x5D8 + + .global Unk_ov13_022292EC +Unk_ov13_022292EC: ; 0x022292EC + .incbin "incbin/overlay13_rodata.bin", 0x5F0, 0x608 - 0x5F0 + + .global Unk_ov13_02229304 +Unk_ov13_02229304: ; 0x02229304 + .incbin "incbin/overlay13_rodata.bin", 0x608, 0x628 - 0x608 + + .global Unk_ov13_02229324 +Unk_ov13_02229324: ; 0x02229324 + .incbin "incbin/overlay13_rodata.bin", 0x628, 0x648 - 0x628 + + .global Unk_ov13_02229344 +Unk_ov13_02229344: ; 0x02229344 + .incbin "incbin/overlay13_rodata.bin", 0x648, 0x668 - 0x648 + + .global Unk_ov13_02229364 +Unk_ov13_02229364: ; 0x02229364 + .incbin "incbin/overlay13_rodata.bin", 0x668, 0x690 - 0x668 + + .global Unk_ov13_0222938C +Unk_ov13_0222938C: ; 0x0222938C + .incbin "incbin/overlay13_rodata.bin", 0x690, 0x6B8 - 0x690 + + .global Unk_ov13_022293B4 +Unk_ov13_022293B4: ; 0x022293B4 + .incbin "incbin/overlay13_rodata.bin", 0x6B8, 0x6E0 - 0x6B8 + + .global Unk_ov13_022293DC +Unk_ov13_022293DC: ; 0x022293DC + .incbin "incbin/overlay13_rodata.bin", 0x6E0, 0x708 - 0x6E0 + + .global Unk_ov13_02229404 +Unk_ov13_02229404: ; 0x02229404 + .incbin "incbin/overlay13_rodata.bin", 0x708, 0x738 - 0x708 + + .global Unk_ov13_02229434 +Unk_ov13_02229434: ; 0x02229434 + .incbin "incbin/overlay13_rodata.bin", 0x738, 0x768 - 0x738 + + .global Unk_ov13_02229464 +Unk_ov13_02229464: ; 0x02229464 + .incbin "incbin/overlay13_rodata.bin", 0x768, 0x7A0 - 0x768 + + .global Unk_ov13_0222949C +Unk_ov13_0222949C: ; 0x0222949C + .incbin "incbin/overlay13_rodata.bin", 0x7A0, 0x7D8 - 0x7A0 + + .global Unk_ov13_022294D4 +Unk_ov13_022294D4: ; 0x022294D4 + .incbin "incbin/overlay13_rodata.bin", 0x7D8, 0x818 - 0x7D8 + + .global Unk_ov13_02229514 +Unk_ov13_02229514: ; 0x02229514 + .incbin "incbin/overlay13_rodata.bin", 0x818, 0x30C + diff --git a/asm/ov13_02225710.s b/asm/ov13_02225710.s new file mode 100644 index 000000000..43ef155ee --- /dev/null +++ b/asm/ov13_02225710.s @@ -0,0 +1,1882 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02225710 +ov13_02225710: ; 0x02225710 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x7b + lsl r0, r0, #2 + mov r2, #0 + add r0, r5, r0 + add r3, r2, #0 + add r4, r1, #0 + bl ov13_02225AF0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xab + lsl r0, r0, #2 + mov r3, #6 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + str r3, [sp, #4] + bl ov13_02225AF0 + mov r0, #0x10 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0xdb + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + mov r3, #0xc + bl ov13_02225AF0 + mov r0, #0x10 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _022259D0 ; =0x0000042C + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x12 + bl ov13_02225AF0 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _022259D4 ; =0x000004EC + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0 + bl ov13_02225AF0 + ldr r0, _022259D8 ; =0x000005AC + mov r2, #0x10 + str r2, [sp] + mov r3, #6 + add r0, r5, r0 + add r1, r4, #0 + str r3, [sp, #4] + bl ov13_02225AF0 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _022259DC ; =0x0000066C + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0xc + bl ov13_02225AF0 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _022259E0 ; =0x0000072C + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0x12 + bl ov13_02225AF0 + mov r0, #0xd + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _022259E4 ; =0x000007EC + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x27 + bl ov13_02225AF0 + mov r0, #0xd + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _022259E8 ; =0x0000086E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x2c + bl ov13_02225AF0 + mov r2, #0xd + str r2, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #0x8f + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x27 + bl ov13_02225AF0 + mov r2, #0xd + str r2, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _022259EC ; =0x00000972 + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0x2c + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022259F0 ; =0x000009F4 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x31 + bl ov13_02225AF0 + ldr r0, _022259F4 ; =0x00000A26 + mov r2, #5 + str r2, [sp] + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x31 + str r2, [sp, #4] + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022259F8 ; =0x00000A58 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xa + mov r3, #0x31 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022259FC ; =0x00000A8A + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xf + mov r3, #0x31 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02225A00 ; =0x00000ABC + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x36 + bl ov13_02225AF0 + ldr r0, _02225A04 ; =0x00000AEE + mov r2, #5 + str r2, [sp] + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x36 + str r2, [sp, #4] + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0xb2 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0xa + mov r3, #0x36 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02225A08 ; =0x00000B52 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xf + mov r3, #0x36 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02225A0C ; =0x00000B84 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1a + mov r3, #0x18 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02225A10 ; =0x00000BB6 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1a + mov r3, #0x1d + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02225A14 ; =0x00000BE8 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1a + mov r3, #0x22 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02225A18 ; =0x00000C1A + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1a + mov r3, #0x27 + bl ov13_02225AF0 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #0x6d + lsl r0, r0, #6 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + mov r3, #0x18 + bl ov13_02225AF0 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _02225A1C ; =0x00001C44 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x1d + bl ov13_02225AF0 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _02225A20 ; =0x00001D48 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x22 + bl ov13_02225AF0 + mov r0, #9 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _02225A24 ; =0x00001E4C + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x31 + bl ov13_02225AF0 + mov r0, #9 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _02225A28 ; =0x00001E94 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x35 + bl ov13_02225AF0 + mov r0, #9 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _02225A2C ; =0x00001EDC + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x39 + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02225A30 ; =0x00001F24 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x3b + bl ov13_02225AF0 + mov r2, #5 + str r2, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02225A34 ; =0x00001F38 + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0x3b + bl ov13_02225AF0 + mov r0, #5 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02225A38 ; =0x00001F4C + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xa + mov r3, #0x3b + bl ov13_02225AF0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_022259D0: .word 0x0000042C +_022259D4: .word 0x000004EC +_022259D8: .word 0x000005AC +_022259DC: .word 0x0000066C +_022259E0: .word 0x0000072C +_022259E4: .word 0x000007EC +_022259E8: .word 0x0000086E +_022259EC: .word 0x00000972 +_022259F0: .word 0x000009F4 +_022259F4: .word 0x00000A26 +_022259F8: .word 0x00000A58 +_022259FC: .word 0x00000A8A +_02225A00: .word 0x00000ABC +_02225A04: .word 0x00000AEE +_02225A08: .word 0x00000B52 +_02225A0C: .word 0x00000B84 +_02225A10: .word 0x00000BB6 +_02225A14: .word 0x00000BE8 +_02225A18: .word 0x00000C1A +_02225A1C: .word 0x00001C44 +_02225A20: .word 0x00001D48 +_02225A24: .word 0x00001E4C +_02225A28: .word 0x00001E94 +_02225A2C: .word 0x00001EDC +_02225A30: .word 0x00001F24 +_02225A34: .word 0x00001F38 +_02225A38: .word 0x00001F4C + thumb_func_end ov13_02225710 + + thumb_func_start ov13_02225A3C +ov13_02225A3C: ; 0x02225A3C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x1e + str r0, [sp] + mov r0, #0x11 + str r0, [sp, #4] + ldr r0, _02225AE4 ; =0x00000C4C + mov r2, #0 + add r0, r5, r0 + add r3, r2, #0 + add r4, r1, #0 + bl ov13_02225AF0 + mov r0, #0x1e + str r0, [sp] + ldr r0, _02225AE8 ; =0x00001048 + mov r3, #0x11 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + str r3, [sp, #4] + bl ov13_02225AF0 + mov r0, #0x1e + str r0, [sp] + mov r0, #0x11 + str r0, [sp, #4] + ldr r0, _02225AEC ; =0x00001444 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x22 + bl ov13_02225AF0 + mov r0, #0x10 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x61 + lsl r0, r0, #6 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + mov r3, #0x33 + bl ov13_02225AF0 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x19 + lsl r0, r0, #8 + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x33 + bl ov13_02225AF0 + mov r0, #0x10 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x67 + lsl r0, r0, #6 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + mov r3, #0x39 + bl ov13_02225AF0 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x6a + lsl r0, r0, #6 + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x39 + bl ov13_02225AF0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02225AE4: .word 0x00000C4C +_02225AE8: .word 0x00001048 +_02225AEC: .word 0x00001444 + thumb_func_end ov13_02225A3C + + thumb_func_start ov13_02225AF0 +ov13_02225AF0: ; 0x02225AF0 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r0, sp, #8 + mov lr, r3 + ldrb r3, [r0, #0x14] + mov r6, #0 + mov ip, r3 + cmp r3, #0 + ble _02225B3C + ldrb r3, [r0, #0x10] + lsl r2, r2, #1 + add r7, r1, r2 +_02225B08: + mov r2, #0 + cmp r3, #0 + ble _02225B30 + mov r0, lr + add r0, r0, r6 + lsl r0, r0, #6 + add r5, r7, r0 + add r0, r6, #0 + mul r0, r3 + lsl r1, r0, #1 + ldr r0, [sp] + add r4, r0, r1 +_02225B20: + lsl r1, r2, #1 + ldrh r0, [r5, r1] + strh r0, [r4, r1] + add r0, r2, #1 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + cmp r2, r3 + blt _02225B20 +_02225B30: + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + mov r0, ip + cmp r6, r0 + blt _02225B08 +_02225B3C: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02225AF0 + + thumb_func_start ov13_02225B40 +ov13_02225B40: ; 0x02225B40 + cmp r1, #0x21 + bhi _02225C26 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02225B50: ; jump table + .short _02225B94 - _02225B50 - 2 ; case 0 + .short _02225B94 - _02225B50 - 2 ; case 1 + .short _02225B94 - _02225B50 - 2 ; case 2 + .short _02225B94 - _02225B50 - 2 ; case 3 + .short _02225B94 - _02225B50 - 2 ; case 4 + .short _02225B94 - _02225B50 - 2 ; case 5 + .short _02225BB2 - _02225B50 - 2 ; case 6 + .short _02225BBE - _02225B50 - 2 ; case 7 + .short _02225BCC - _02225B50 - 2 ; case 8 + .short _02225BCC - _02225B50 - 2 ; case 9 + .short _02225BCC - _02225B50 - 2 ; case 10 + .short _02225BCC - _02225B50 - 2 ; case 11 + .short _02225BD8 - _02225B50 - 2 ; case 12 + .short _02225BE4 - _02225B50 - 2 ; case 13 + .short _02225BF0 - _02225B50 - 2 ; case 14 + .short _02225BF0 - _02225B50 - 2 ; case 15 + .short _02225BF0 - _02225B50 - 2 ; case 16 + .short _02225BF0 - _02225B50 - 2 ; case 17 + .short _02225C0E - _02225B50 - 2 ; case 18 + .short _02225BF0 - _02225B50 - 2 ; case 19 + .short _02225BF0 - _02225B50 - 2 ; case 20 + .short _02225BF0 - _02225B50 - 2 ; case 21 + .short _02225BF0 - _02225B50 - 2 ; case 22 + .short _02225BF0 - _02225B50 - 2 ; case 23 + .short _02225BF0 - _02225B50 - 2 ; case 24 + .short _02225BF0 - _02225B50 - 2 ; case 25 + .short _02225BF0 - _02225B50 - 2 ; case 26 + .short _02225BF0 - _02225B50 - 2 ; case 27 + .short _02225BFE - _02225B50 - 2 ; case 28 + .short _02225BFE - _02225B50 - 2 ; case 29 + .short _02225C1A - _02225B50 - 2 ; case 30 + .short _02225C1A - _02225B50 - 2 ; case 31 + .short _02225C1A - _02225B50 - 2 ; case 32 + .short _02225C1A - _02225B50 - 2 ; case 33 +_02225B94: + cmp r3, #0 + bne _02225BA6 + mov r1, #0x7b + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0xc0 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BA6: + ldr r1, _02225C2C ; =0x000004EC + add r1, r0, r1 + mov r0, #0xc0 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BB2: + ldr r1, _02225C30 ; =0x00000B84 + add r1, r0, r1 + mov r0, #0x32 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BBE: + ldr r1, _02225C34 ; =0x00000C4C + add r1, r0, r1 + mov r0, #0xff + lsl r0, r0, #2 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BCC: + ldr r1, _02225C38 ; =0x000007EC + add r1, r0, r1 + mov r0, #0x82 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BD8: + ldr r1, _02225C3C ; =0x000009F4 + add r1, r0, r1 + mov r0, #0x32 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BE4: + ldr r1, _02225C40 ; =0x00000ABC + add r1, r0, r1 + mov r0, #0x32 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BF0: + mov r1, #0x61 + lsl r1, r1, #6 + add r1, r0, r1 + mov r0, #0xc0 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225BFE: + mov r1, #0x6d + lsl r1, r1, #6 + add r1, r0, r1 + lsl r0, r2, #6 + add r0, r2, r0 + lsl r0, r0, #2 + add r0, r1, r0 + bx lr +_02225C0E: + ldr r1, _02225C44 ; =0x00001E4C + add r1, r0, r1 + mov r0, #0x48 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225C1A: + ldr r1, _02225C48 ; =0x00001F24 + add r1, r0, r1 + mov r0, #0x14 + mul r0, r2 + add r0, r1, r0 + bx lr +_02225C26: + mov r0, #0 + bx lr + nop +_02225C2C: .word 0x000004EC +_02225C30: .word 0x00000B84 +_02225C34: .word 0x00000C4C +_02225C38: .word 0x000007EC +_02225C3C: .word 0x000009F4 +_02225C40: .word 0x00000ABC +_02225C44: .word 0x00001E4C +_02225C48: .word 0x00001F24 + thumb_func_end ov13_02225B40 + + thumb_func_start ov13_02225C4C +ov13_02225C4C: ; 0x02225C4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r2, #0 + add r2, r3, #0 + add r3, sp, #0x10 + add r4, r1, #0 + ldrb r3, [r3, #0x10] + add r1, r7, #0 + str r0, [sp] + bl ov13_02225B40 + add r1, r0, #0 + ldr r2, _02225D80 ; =0x02229926 + lsl r0, r7, #2 + ldrb r6, [r2, r0] + ldr r2, _02225D84 ; =0x02229927 + ldrb r0, [r2, r0] + add r5, r6, #0 + mul r5, r0 + add r0, r4, #0 + lsl r2, r5, #1 + bl sub_020D50B8 + cmp r7, #5 + bgt _02225C9A + cmp r7, #0 + blt _02225D7C + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02225C8E: ; jump table + .short _02225CA2 - _02225C8E - 2 ; case 0 + .short _02225CA2 - _02225C8E - 2 ; case 1 + .short _02225CA2 - _02225C8E - 2 ; case 2 + .short _02225CA2 - _02225C8E - 2 ; case 3 + .short _02225CA2 - _02225C8E - 2 ; case 4 + .short _02225CA2 - _02225C8E - 2 ; case 5 +_02225C9A: + cmp r7, #0x1b + beq _02225D5C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02225CA2: + mov r0, #0x50 + add r1, r7, #0 + mul r1, r0 + ldr r0, [sp] + add r0, r0, r1 + ldrh r1, [r0, #8] + cmp r1, #0 + beq _02225D7C + ldrb r1, [r0, #0x1b] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1f + beq _02225D02 + lsl r2, r6, #1 + add r0, r2, #5 + lsl r0, r0, #1 + ldrh r1, [r4, r0] + add r0, sp, #4 + strh r1, [r0] + add r1, r6, r2 + add r1, r1, #5 + lsl r1, r1, #1 + ldrh r1, [r4, r1] + strh r1, [r0, #2] + mov r1, #0 + add r0, sp, #4 +_02225CD4: + add r5, r1, #2 + lsl r3, r1, #1 + add r7, r5, #0 + mul r7, r6 + lsl r5, r7, #1 + ldrh r3, [r0, r3] + mov r2, #0 + add r5, r4, r5 +_02225CE4: + lsl r7, r2, #1 + add r2, r2, #1 + lsl r2, r2, #0x18 + add r7, r5, r7 + lsr r2, r2, #0x18 + strh r3, [r7, #0xc] + cmp r2, #9 + blo _02225CE4 + add r1, r1, #1 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + cmp r1, #2 + blo _02225CD4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02225D02: + ldrh r0, [r0, #0x14] + cmp r0, #0 + bne _02225D2C + mov r1, #0 + cmp r5, #0 + ble _02225D7C + mov r3, #2 + ldr r2, _02225D88 ; =0x00000FFF + lsl r3, r3, #0xc +_02225D14: + lsl r0, r1, #1 + ldrh r6, [r4, r0] + and r6, r2 + orr r6, r3 + strh r6, [r4, r0] + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, r5 + blt _02225D14 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02225D2C: + lsl r1, r7, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + bl ov13_022219AC + cmp r0, #1 + bne _02225D7C + mov r1, #0 + cmp r5, #0 + ble _02225D7C + ldr r2, _02225D88 ; =0x00000FFF + add r3, r2, #1 +_02225D44: + lsl r0, r1, #1 + ldrh r6, [r4, r0] + and r6, r2 + orr r6, r3 + strh r6, [r4, r0] + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, r5 + blt _02225D44 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02225D5C: + mov r1, #0 + cmp r5, #0 + ble _02225D7C + mov r3, #0xa + ldr r2, _02225D88 ; =0x00000FFF + lsl r3, r3, #0xc +_02225D68: + lsl r0, r1, #1 + ldrh r6, [r4, r0] + and r6, r2 + orr r6, r3 + strh r6, [r4, r0] + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, r5 + blt _02225D68 +_02225D7C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02225D80: .word 0x02229926 +_02225D84: .word 0x02229927 +_02225D88: .word 0x00000FFF + thumb_func_end ov13_02225C4C + + thumb_func_start ov13_02225D8C +ov13_02225D8C: ; 0x02225D8C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r1, [sp, #0xc] + str r2, [sp, #0x10] + str r3, [sp, #0x14] + add r5, r0, #0 + ldr r0, [sp, #0xc] + lsl r4, r0, #2 + ldr r0, _02225DF8 ; =0x02229927 + ldrb r7, [r0, r4] + ldr r0, _02225DFC ; =0x02229926 + ldrb r6, [r0, r4] + ldr r0, [r5, #0] + add r1, r6, #0 + mul r1, r7 + ldr r0, [r0, #0xc] + lsl r1, r1, #1 + bl sub_02018144 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + add r0, r5, #0 + bl ov13_02225C4C + ldr r0, _02225E00 ; =0x02229925 + ldr r3, _02225E04 ; =0x02229924 + ldrb r0, [r0, r4] + ldrb r3, [r3, r4] + ldr r2, [sp, #0x18] + str r0, [sp] + str r6, [sp, #4] + mov r0, #0x79 + str r7, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl sub_020198C0 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl sub_0201C3C0 + ldr r0, [sp, #0x18] + bl sub_020181C4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02225DF8: .word 0x02229927 +_02225DFC: .word 0x02229926 +_02225E00: .word 0x02229925 +_02225E04: .word 0x02229924 + thumb_func_end ov13_02225D8C + + thumb_func_start ov13_02225E08 +ov13_02225E08: ; 0x02225E08 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02225EA8 ; =0x0222989C + lsl r3, r1, #2 + ldr r6, [r0, r3] + cmp r6, #0 + beq _02225EA6 + cmp r1, #5 + bhi _02225E22 + ldr r0, _02225EAC ; =0x0222988C + ldrb r0, [r0, r2] + str r0, [sp] + b _02225E28 +_02225E22: + ldr r0, _02225EB0 ; =0x0222987C + ldrb r0, [r0, r2] + str r0, [sp] +_02225E28: + cmp r2, #0 + beq _02225E36 + cmp r2, #1 + beq _02225E3A + cmp r2, #2 + beq _02225E3E + b _02225E40 +_02225E36: + mov r7, #1 + b _02225E40 +_02225E3A: + mov r7, #0 + b _02225E40 +_02225E3E: + mov r7, #1 +_02225E40: + cmp r1, #0xe + blo _02225E74 + cmp r1, #0x11 + bhi _02225E74 + ldr r1, _02225EB4 ; =0x00002070 + ldr r2, [sp] + ldr r0, [r5, r1] + add r1, r1, #5 + ldrb r1, [r5, r1] + mov r3, #0 + ldrb r1, [r6, r1] + lsl r1, r1, #4 + add r0, r0, r1 + add r1, r7, #0 + bl sub_0201C04C + ldr r1, _02225EB4 ; =0x00002070 + ldr r0, [r5, r1] + add r1, r1, #5 + ldrb r1, [r5, r1] + ldrb r1, [r6, r1] + lsl r1, r1, #4 + add r0, r0, r1 + bl sub_0201A9A4 + pop {r3, r4, r5, r6, r7, pc} +_02225E74: + mov r4, #0 +_02225E76: + ldrb r2, [r6, r4] + cmp r2, #0xff + beq _02225EA6 + ldr r0, _02225EB4 ; =0x00002070 + mov r3, #0 + ldr r1, [r5, r0] + lsl r0, r2, #4 + add r0, r1, r0 + ldr r2, [sp] + add r1, r7, #0 + bl sub_0201C04C + ldr r0, _02225EB4 ; =0x00002070 + ldr r1, [r5, r0] + ldrb r0, [r6, r4] + lsl r0, r0, #4 + add r0, r1, r0 + bl sub_0201A9A4 + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #8 + blo _02225E76 +_02225EA6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02225EA8: .word 0x0222989C +_02225EAC: .word 0x0222988C +_02225EB0: .word 0x0222987C +_02225EB4: .word 0x00002070 + thumb_func_end ov13_02225E08 + + thumb_func_start ov13_02225EB8 +ov13_02225EB8: ; 0x02225EB8 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #0x1b + bhi _02225FBC + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02225ECE: ; jump table + .short _02225F06 - _02225ECE - 2 ; case 0 + .short _02225F06 - _02225ECE - 2 ; case 1 + .short _02225F06 - _02225ECE - 2 ; case 2 + .short _02225F06 - _02225ECE - 2 ; case 3 + .short _02225F06 - _02225ECE - 2 ; case 4 + .short _02225F06 - _02225ECE - 2 ; case 5 + .short _02225FBC - _02225ECE - 2 ; case 6 + .short _02225F44 - _02225ECE - 2 ; case 7 + .short _02225FBC - _02225ECE - 2 ; case 8 + .short _02225FBC - _02225ECE - 2 ; case 9 + .short _02225FBC - _02225ECE - 2 ; case 10 + .short _02225FBC - _02225ECE - 2 ; case 11 + .short _02225FBC - _02225ECE - 2 ; case 12 + .short _02225FBC - _02225ECE - 2 ; case 13 + .short _02225F76 - _02225ECE - 2 ; case 14 + .short _02225F76 - _02225ECE - 2 ; case 15 + .short _02225F76 - _02225ECE - 2 ; case 16 + .short _02225F76 - _02225ECE - 2 ; case 17 + .short _02225FBC - _02225ECE - 2 ; case 18 + .short _02225F8E - _02225ECE - 2 ; case 19 + .short _02225F8E - _02225ECE - 2 ; case 20 + .short _02225F8E - _02225ECE - 2 ; case 21 + .short _02225F8E - _02225ECE - 2 ; case 22 + .short _02225FA6 - _02225ECE - 2 ; case 23 + .short _02225FA6 - _02225ECE - 2 ; case 24 + .short _02225FA6 - _02225ECE - 2 ; case 25 + .short _02225FA6 - _02225ECE - 2 ; case 26 + .short _02225FA6 - _02225ECE - 2 ; case 27 +_02225F06: + ldr r0, _02225FC0 ; =0x02229896 + lsl r1, r2, #1 + ldrsh r6, [r0, r1] + add r0, r5, #0 + add r0, #0xd + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + add r2, r6, #0 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + lsl r0, r5, #2 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + add r2, r6, #0 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + add r0, r5, #7 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + add r2, r6, #0 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + pop {r4, r5, r6, pc} +_02225F44: + ldr r0, _02225FC8 ; =0x02229890 + lsl r1, r2, #1 + ldrsh r5, [r0, r1] + ldr r0, [r4, #0] + ldrb r0, [r0, #0x11] + add r2, r5, #0 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + ldr r0, [r4, #0] + add r2, r5, #0 + ldrb r0, [r0, #0x11] + add r0, r0, #7 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + pop {r4, r5, r6, pc} +_02225F76: + add r0, r5, #7 + lsl r0, r0, #2 + lsl r3, r2, #1 + ldr r2, _02225FC8 ; =0x02229890 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + ldrsh r2, [r2, r3] + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + pop {r4, r5, r6, pc} +_02225F8E: + add r0, r5, #2 + lsl r0, r0, #2 + lsl r3, r2, #1 + ldr r2, _02225FC8 ; =0x02229890 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + ldrsh r2, [r2, r3] + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC + pop {r4, r5, r6, pc} +_02225FA6: + sub r0, r5, #2 + lsl r0, r0, #2 + lsl r3, r2, #1 + ldr r2, _02225FC8 ; =0x02229890 + add r1, r4, r0 + ldr r0, _02225FC4 ; =0x00001FB8 + ldrsh r2, [r2, r3] + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D5DC +_02225FBC: + pop {r4, r5, r6, pc} + nop +_02225FC0: .word 0x02229896 +_02225FC4: .word 0x00001FB8 +_02225FC8: .word 0x02229890 + thumb_func_end ov13_02225EB8 + + thumb_func_start ov13_02225FCC +ov13_02225FCC: ; 0x02225FCC + push {r4, r5, r6, lr} + ldr r3, _02226014 ; =0x00001FA3 + add r5, r0, #0 + ldrb r6, [r5, r3] + mov r2, #0x70 + add r4, r1, #0 + bic r6, r2 + strb r6, [r5, r3] + cmp r4, #5 + bhi _02225FF6 + bl ov13_022213F0 + cmp r0, #2 + bne _02225FF6 + ldr r1, _02226014 ; =0x00001FA3 + mov r0, #0x70 + ldrb r2, [r5, r1] + bic r2, r0 + mov r0, #0x10 + orr r0, r2 + strb r0, [r5, r1] +_02225FF6: + ldr r0, _02226018 ; =0x00001FA0 + mov r2, #0 + strb r2, [r5, r0] + add r1, r0, #1 + strb r2, [r5, r1] + add r1, r0, #2 + strb r4, [r5, r1] + add r1, r0, #3 + ldrb r2, [r5, r1] + mov r1, #0x80 + add r0, r0, #3 + orr r1, r2 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} + nop +_02226014: .word 0x00001FA3 +_02226018: .word 0x00001FA0 + thumb_func_end ov13_02225FCC + + thumb_func_start ov13_0222601C +ov13_0222601C: ; 0x0222601C + push {r4, lr} + ldr r2, _022260E0 ; =0x00001FA3 + add r4, r0, #0 + ldrb r3, [r4, r2] + lsl r1, r3, #0x18 + lsr r1, r1, #0x1f + beq _022260DC + sub r1, r2, #3 + ldrb r1, [r4, r1] + cmp r1, #0 + beq _0222603C + cmp r1, #1 + beq _02226070 + cmp r1, #2 + beq _022260A4 + pop {r4, pc} +_0222603C: + sub r1, r2, #1 + ldrb r1, [r4, r1] + lsl r3, r3, #0x19 + mov r2, #1 + lsr r3, r3, #0x1d + bl ov13_02225D8C + ldr r1, _022260E4 ; =0x00001FA2 + add r0, r4, #0 + ldrb r1, [r4, r1] + mov r2, #1 + bl ov13_02225E08 + ldr r1, _022260E4 ; =0x00001FA2 + add r0, r4, #0 + ldrb r1, [r4, r1] + mov r2, #1 + bl ov13_02225EB8 + ldr r0, _022260E8 ; =0x00001FA1 + mov r1, #0 + strb r1, [r4, r0] + mov r1, #1 + sub r0, r0, #1 + strb r1, [r4, r0] + pop {r4, pc} +_02226070: + sub r1, r2, #1 + ldrb r1, [r4, r1] + lsl r3, r3, #0x19 + mov r2, #2 + lsr r3, r3, #0x1d + bl ov13_02225D8C + ldr r1, _022260E4 ; =0x00001FA2 + add r0, r4, #0 + ldrb r1, [r4, r1] + mov r2, #2 + bl ov13_02225E08 + ldr r1, _022260E4 ; =0x00001FA2 + add r0, r4, #0 + ldrb r1, [r4, r1] + mov r2, #2 + bl ov13_02225EB8 + ldr r0, _022260E8 ; =0x00001FA1 + mov r1, #0 + strb r1, [r4, r0] + mov r1, #2 + sub r0, r0, #1 + strb r1, [r4, r0] + pop {r4, pc} +_022260A4: + sub r1, r2, #1 + ldrb r1, [r4, r1] + lsl r3, r3, #0x19 + mov r2, #0 + lsr r3, r3, #0x1d + bl ov13_02225D8C + ldr r1, _022260E4 ; =0x00001FA2 + add r0, r4, #0 + ldrb r1, [r4, r1] + mov r2, #0 + bl ov13_02225E08 + ldr r1, _022260E4 ; =0x00001FA2 + add r0, r4, #0 + ldrb r1, [r4, r1] + mov r2, #0 + bl ov13_02225EB8 + ldr r0, _022260E8 ; =0x00001FA1 + mov r1, #0 + strb r1, [r4, r0] + add r1, r0, #2 + ldrb r2, [r4, r1] + mov r1, #0x80 + add r0, r0, #2 + bic r2, r1 + strb r2, [r4, r0] +_022260DC: + pop {r4, pc} + nop +_022260E0: .word 0x00001FA3 +_022260E4: .word 0x00001FA2 +_022260E8: .word 0x00001FA1 + thumb_func_end ov13_0222601C + + thumb_func_start ov13_022260EC +ov13_022260EC: ; 0x022260EC + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + cmp r1, #9 + bls _022260F6 + b _0222643E +_022260F6: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02226102: ; jump table + .short _02226116 - _02226102 - 2 ; case 0 + .short _0222618E - _02226102 - 2 ; case 1 + .short _022261EA - _02226102 - 2 ; case 2 + .short _0222623E - _02226102 - 2 ; case 3 + .short _022262DC - _02226102 - 2 ; case 4 + .short _02226328 - _02226102 - 2 ; case 5 + .short _02226380 - _02226102 - 2 ; case 6 + .short _022263E0 - _02226102 - 2 ; case 7 + .short _02226380 - _02226102 - 2 ; case 8 + .short _02226410 - _02226102 - 2 ; case 9 +_02226116: + mov r5, #0 + mov r6, #3 + mov r7, #1 +_0222611C: + add r0, r4, #0 + add r1, r5, #0 + bl ov13_022213F0 + cmp r0, #0 + bne _02226138 + lsl r1, r5, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r2, r6, #0 + add r3, r7, #0 + bl ov13_02225D8C + b _0222615E +_02226138: + cmp r0, #1 + bne _0222614C + lsl r1, r5, #0x18 + mov r2, #0 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl ov13_02225D8C + b _0222615E +_0222614C: + cmp r0, #2 + bne _0222615E + lsl r1, r5, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + mov r2, #0 + mov r3, #1 + bl ov13_02225D8C +_0222615E: + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #6 + blo _0222611C + ldr r0, [r4, #0] + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #1 + bne _02226180 + add r0, r4, #0 + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_02226180: + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_0222618E: + mov r2, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #7 + add r3, r2, #0 + bl ov13_02225D8C + ldr r0, [r4, #0] + ldrb r1, [r0, #0x11] + mov r0, #0x50 + mul r0, r1 + add r0, r4, r0 + ldrb r0, [r0, #0x1b] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + beq _022261D0 + add r0, r4, #0 + mov r1, #8 + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C + add r0, r4, #0 + mov r1, #0xa + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_022261D0: + mov r2, #0 + add r0, r4, #0 + mov r1, #8 + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0xa + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_022261EA: + bl ov13_02226484 + cmp r0, #1 + bne _0222620C + mov r2, #0 + add r0, r4, #0 + mov r1, #0xc + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0xd + add r3, r2, #0 + bl ov13_02225D8C + b _02226224 +_0222620C: + add r0, r4, #0 + mov r1, #0xc + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C + add r0, r4, #0 + mov r1, #0xd + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C +_02226224: + mov r2, #0 + add r0, r4, #0 + mov r1, #0xb + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_0222623E: + bl ov13_02226484 + cmp r0, #1 + bne _02226260 + mov r2, #0 + add r0, r4, #0 + mov r1, #0xc + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0xd + add r3, r2, #0 + bl ov13_02225D8C + b _02226278 +_02226260: + add r0, r4, #0 + mov r1, #0xc + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C + add r0, r4, #0 + mov r1, #0xd + mov r2, #3 + mov r3, #0 + bl ov13_02225D8C +_02226278: + mov r5, #0 + mov r7, #3 + mov r6, #0x50 +_0222627E: + ldr r0, [r4, #0] + lsl r1, r5, #3 + ldrb r0, [r0, #0x11] + add r2, r0, #0 + mul r2, r6 + add r0, r4, r2 + add r0, r1, r0 + ldrh r0, [r0, #0x34] + cmp r0, #0 + beq _022262A6 + add r1, r5, #0 + add r1, #0xe + lsl r1, r1, #0x18 + mov r2, #0 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl ov13_02225D8C + b _022262B8 +_022262A6: + add r1, r5, #0 + add r1, #0xe + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r2, r7, #0 + mov r3, #0 + bl ov13_02225D8C +_022262B8: + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #4 + blo _0222627E + mov r2, #0 + add r0, r4, #0 + mov r1, #9 + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_022262DC: + mov r2, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + mov r5, #0 + mov r6, #2 + add r7, r5, #0 +_022262EC: + ldr r0, [r4, #0] + add r0, #0x34 + ldrb r0, [r0] + cmp r0, r5 + bne _0222630A + add r1, r5, #0 + add r1, #0x1e + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r2, r6, #0 + add r3, r7, #0 + bl ov13_02225D8C + b _0222631C +_0222630A: + add r1, r5, #0 + add r1, #0x1e + lsl r1, r1, #0x18 + mov r2, #0 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl ov13_02225D8C +_0222631C: + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #4 + blo _022262EC + pop {r3, r4, r5, r6, r7, pc} +_02226328: + mov r5, #0 + mov r7, #3 + mov r6, #0x50 +_0222632E: + ldr r0, [r4, #0] + lsl r1, r5, #3 + ldrb r0, [r0, #0x11] + add r2, r0, #0 + mul r2, r6 + add r0, r4, r2 + add r0, r1, r0 + ldrh r0, [r0, #0x34] + cmp r0, #0 + beq _02226356 + add r1, r5, #0 + add r1, #0x13 + lsl r1, r1, #0x18 + mov r2, #0 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl ov13_02225D8C + b _02226368 +_02226356: + add r1, r5, #0 + add r1, #0x13 + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + add r2, r7, #0 + mov r3, #0 + bl ov13_02225D8C +_02226368: + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #4 + blo _0222632E + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_02226380: + mov r2, #0 + mov r1, #0x17 + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0x18 + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0x19 + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0x1a + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #0x1b + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + ldr r0, _02226440 ; =0x00002077 + ldrb r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + cmp r0, #1 + bne _0222643E + mov r2, #0 + add r0, r4, #0 + mov r1, #0x12 + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_022263E0: + mov r2, #0 + mov r1, #0x1c + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + ldr r0, _02226440 ; =0x00002077 + ldrb r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + cmp r0, #1 + bne _0222643E + mov r2, #0 + add r0, r4, #0 + mov r1, #0x12 + add r3, r2, #0 + bl ov13_02225D8C + pop {r3, r4, r5, r6, r7, pc} +_02226410: + mov r2, #0 + mov r1, #0x1d + add r3, r2, #0 + bl ov13_02225D8C + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl ov13_02225D8C + ldr r0, _02226440 ; =0x00002077 + ldrb r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + cmp r0, #1 + bne _0222643E + mov r2, #0 + add r0, r4, #0 + mov r1, #0x12 + add r3, r2, #0 + bl ov13_02225D8C +_0222643E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02226440: .word 0x00002077 + thumb_func_end ov13_022260EC + + thumb_func_start ov13_02226444 +ov13_02226444: ; 0x02226444 + push {r3, lr} + add r2, r0, #0 + cmp r1, #3 + bne _02226466 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x7a + lsl r0, r0, #2 + mov r1, #0x7e + lsl r1, r1, #6 + ldr r0, [r2, r0] + add r1, r2, r1 + mov r2, #1 + mov r3, #0xc0 + bl sub_02002FBC + pop {r3, pc} +_02226466: + mov r0, #0x20 + str r0, [sp] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r1, _02226480 ; =0x00001F60 + ldr r0, [r2, r0] + add r1, r2, r1 + mov r2, #1 + mov r3, #0xc0 + bl sub_02002FBC + pop {r3, pc} + nop +_02226480: .word 0x00001F60 + thumb_func_end ov13_02226444 + + thumb_func_start ov13_02226484 +ov13_02226484: ; 0x02226484 + push {r4, r5} + mov r2, #0 + add r1, r2, #0 + mov r3, #0x50 +_0222648C: + add r4, r1, #0 + mul r4, r3 + add r5, r0, r4 + ldrh r4, [r5, #8] + cmp r4, #0 + beq _022264A6 + ldrb r4, [r5, #0x1b] + lsl r4, r4, #0x18 + lsr r4, r4, #0x1f + bne _022264A6 + add r2, r2, #1 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 +_022264A6: + add r1, r1, #1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + cmp r1, #6 + blo _0222648C + cmp r2, #2 + blo _022264B8 + mov r0, #1 + b _022264BA +_022264B8: + mov r0, #0 +_022264BA: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov13_02226484 + + thumb_func_start ov13_022264C4 +ov13_022264C4: ; 0x022264C4 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + ldrb r1, [r1, #0x11] + bl ov13_022213F0 + cmp r0, #2 + bne _022264E4 + ldr r1, [r4, #0] + add r0, r4, #0 + ldrb r1, [r1, #0x11] + mov r2, #0 + mov r3, #1 + bl ov13_02225D8C + pop {r4, pc} +_022264E4: + ldr r1, [r4, #0] + mov r2, #0 + ldrb r1, [r1, #0x11] + add r0, r4, #0 + add r3, r2, #0 + bl ov13_02225D8C + pop {r4, pc} + thumb_func_end ov13_022264C4 + + .rodata + + + .global Unk_ov13_02229820 +Unk_ov13_02229820: ; 0x02229820 + .incbin "incbin/overlay13_rodata.bin", 0xB24, 0xB28 - 0xB24 + + .global Unk_ov13_02229824 +Unk_ov13_02229824: ; 0x02229824 + .incbin "incbin/overlay13_rodata.bin", 0xB28, 0xB2C - 0xB28 + + .global Unk_ov13_02229828 +Unk_ov13_02229828: ; 0x02229828 + .incbin "incbin/overlay13_rodata.bin", 0xB2C, 0xB30 - 0xB2C + + .global Unk_ov13_0222982C +Unk_ov13_0222982C: ; 0x0222982C + .incbin "incbin/overlay13_rodata.bin", 0xB30, 0xB34 - 0xB30 + + .global Unk_ov13_02229830 +Unk_ov13_02229830: ; 0x02229830 + .incbin "incbin/overlay13_rodata.bin", 0xB34, 0xB38 - 0xB34 + + .global Unk_ov13_02229834 +Unk_ov13_02229834: ; 0x02229834 + .incbin "incbin/overlay13_rodata.bin", 0xB38, 0xB3C - 0xB38 + + .global Unk_ov13_02229838 +Unk_ov13_02229838: ; 0x02229838 + .incbin "incbin/overlay13_rodata.bin", 0xB3C, 0xB40 - 0xB3C + + .global Unk_ov13_0222983C +Unk_ov13_0222983C: ; 0x0222983C + .incbin "incbin/overlay13_rodata.bin", 0xB40, 0xB44 - 0xB40 + + .global Unk_ov13_02229840 +Unk_ov13_02229840: ; 0x02229840 + .incbin "incbin/overlay13_rodata.bin", 0xB44, 0xB48 - 0xB44 + + .global Unk_ov13_02229844 +Unk_ov13_02229844: ; 0x02229844 + .incbin "incbin/overlay13_rodata.bin", 0xB48, 0xB4C - 0xB48 + + .global Unk_ov13_02229848 +Unk_ov13_02229848: ; 0x02229848 + .incbin "incbin/overlay13_rodata.bin", 0xB4C, 0xB50 - 0xB4C + + .global Unk_ov13_0222984C +Unk_ov13_0222984C: ; 0x0222984C + .incbin "incbin/overlay13_rodata.bin", 0xB50, 0xB54 - 0xB50 + + .global Unk_ov13_02229850 +Unk_ov13_02229850: ; 0x02229850 + .incbin "incbin/overlay13_rodata.bin", 0xB54, 0xB58 - 0xB54 + + .global Unk_ov13_02229854 +Unk_ov13_02229854: ; 0x02229854 + .incbin "incbin/overlay13_rodata.bin", 0xB58, 0xB5C - 0xB58 + + .global Unk_ov13_02229858 +Unk_ov13_02229858: ; 0x02229858 + .incbin "incbin/overlay13_rodata.bin", 0xB5C, 0xB60 - 0xB5C + + .global Unk_ov13_0222985C +Unk_ov13_0222985C: ; 0x0222985C + .incbin "incbin/overlay13_rodata.bin", 0xB60, 0xB64 - 0xB60 + + .global Unk_ov13_02229860 +Unk_ov13_02229860: ; 0x02229860 + .incbin "incbin/overlay13_rodata.bin", 0xB64, 0xB68 - 0xB64 + + .global Unk_ov13_02229864 +Unk_ov13_02229864: ; 0x02229864 + .incbin "incbin/overlay13_rodata.bin", 0xB68, 0xB6C - 0xB68 + + .global Unk_ov13_02229868 +Unk_ov13_02229868: ; 0x02229868 + .incbin "incbin/overlay13_rodata.bin", 0xB6C, 0xB70 - 0xB6C + + .global Unk_ov13_0222986C +Unk_ov13_0222986C: ; 0x0222986C + .incbin "incbin/overlay13_rodata.bin", 0xB70, 0xB74 - 0xB70 + + .global Unk_ov13_02229870 +Unk_ov13_02229870: ; 0x02229870 + .incbin "incbin/overlay13_rodata.bin", 0xB74, 0xB78 - 0xB74 + + .global Unk_ov13_02229874 +Unk_ov13_02229874: ; 0x02229874 + .incbin "incbin/overlay13_rodata.bin", 0xB78, 0xB7C - 0xB78 + + .global Unk_ov13_02229878 +Unk_ov13_02229878: ; 0x02229878 + .incbin "incbin/overlay13_rodata.bin", 0xB7C, 0xB80 - 0xB7C + + .global Unk_ov13_0222987C +Unk_ov13_0222987C: ; 0x0222987C + .incbin "incbin/overlay13_rodata.bin", 0xB80, 0xB84 - 0xB80 + + .global Unk_ov13_02229880 +Unk_ov13_02229880: ; 0x02229880 + .incbin "incbin/overlay13_rodata.bin", 0xB84, 0xB88 - 0xB84 + + .global Unk_ov13_02229884 +Unk_ov13_02229884: ; 0x02229884 + .incbin "incbin/overlay13_rodata.bin", 0xB88, 0xB8C - 0xB88 + + .global Unk_ov13_02229888 +Unk_ov13_02229888: ; 0x02229888 + .incbin "incbin/overlay13_rodata.bin", 0xB8C, 0xB90 - 0xB8C + + .global Unk_ov13_0222988C +Unk_ov13_0222988C: ; 0x0222988C + .incbin "incbin/overlay13_rodata.bin", 0xB90, 0xB94 - 0xB90 + + .global Unk_ov13_02229890 +Unk_ov13_02229890: ; 0x02229890 + .incbin "incbin/overlay13_rodata.bin", 0xB94, 0xB9A - 0xB94 + + .global Unk_ov13_02229896 +Unk_ov13_02229896: ; 0x02229896 + .incbin "incbin/overlay13_rodata.bin", 0xB9A, 0xBA0 - 0xB9A + + .global Unk_ov13_0222989C +Unk_ov13_0222989C: ; 0x0222989C + .incbin "incbin/overlay13_rodata.bin", 0xBA0, 0xC28 - 0xBA0 + + .global Unk_ov13_02229924 +Unk_ov13_02229924: ; 0x02229924 + .incbin "incbin/overlay13_rodata.bin", 0xC28, 0x88 + diff --git a/asm/ov13_022264F4.s b/asm/ov13_022264F4.s new file mode 100644 index 000000000..5789fa51c --- /dev/null +++ b/asm/ov13_022264F4.s @@ -0,0 +1,1729 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_022264F4 +ov13_022264F4: ; 0x022264F4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _02226584 ; =ov13_02226590 + ldr r1, _02226588 ; =0x0000115C + ldr r3, [r5, #0xc] + mov r2, #0x64 + bl sub_0200679C + bl sub_0201CED0 + ldr r2, _02226588 ; =0x0000115C + add r4, r0, #0 + mov r1, #0 + bl sub_020D5124 + str r5, [r4, #0] + ldr r0, [r5, #0] + bl ov16_0223DF00 + str r0, [r4, #4] + ldr r0, [r5, #0] + bl ov16_0223E064 + str r0, [r4, #8] + ldr r0, _0222658C ; =0x0000114A + mov r1, #0 + strb r1, [r4, r0] + ldr r0, [r5, #0] + bl ov16_0223E1B0 + add r6, r0, #0 + mov r5, #0 +_02226534: + ldr r3, [r4, #0] + add r0, r6, #0 + add r2, r3, #0 + add r2, #0x27 + add r3, #0x2c + add r1, r5, #0 + add r2, r2, r5 + add r3, r3, r5 + bl sub_0207D9D8 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #5 + blo _02226534 + add r0, r6, #0 + bl sub_0207D9E4 + ldr r1, [r4, #0] + strh r0, [r1, #0x20] + add r0, r6, #0 + bl sub_0207D9E8 + ldr r1, [r4, #0] + strb r0, [r1, #0x1f] + add r0, r4, #0 + bl ov13_02227A4C + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + beq _02226582 + ldr r0, [r4, #0] + mov r1, #1 + str r1, [r0, #0x14] +_02226582: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02226584: .word ov13_02226590 +_02226588: .word 0x0000115C +_0222658C: .word 0x0000114A + thumb_func_end ov13_022264F4 + + thumb_func_start ov13_02226590 +ov13_02226590: ; 0x02226590 + push {r4, lr} + ldr r2, _02226688 ; =0x0000114A + add r4, r1, #0 + ldrb r2, [r4, r2] + cmp r2, #0xe + bhi _02226676 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022265A8: ; jump table + .short _022265C6 - _022265A8 - 2 ; case 0 + .short _022265D2 - _022265A8 - 2 ; case 1 + .short _022265DE - _022265A8 - 2 ; case 2 + .short _022265EA - _022265A8 - 2 ; case 3 + .short _022265F6 - _022265A8 - 2 ; case 4 + .short _02226602 - _022265A8 - 2 ; case 5 + .short _0222660E - _022265A8 - 2 ; case 6 + .short _0222661A - _022265A8 - 2 ; case 7 + .short _02226626 - _022265A8 - 2 ; case 8 + .short _02226632 - _022265A8 - 2 ; case 9 + .short _0222663E - _022265A8 - 2 ; case 10 + .short _0222664A - _022265A8 - 2 ; case 11 + .short _02226656 - _022265A8 - 2 ; case 12 + .short _02226662 - _022265A8 - 2 ; case 13 + .short _0222666E - _022265A8 - 2 ; case 14 +_022265C6: + add r0, r4, #0 + bl ov13_0222668C + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_022265D2: + add r0, r4, #0 + bl ov13_02226760 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_022265DE: + add r0, r4, #0 + bl ov13_02226838 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_022265EA: + add r0, r4, #0 + bl ov13_022269C0 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_022265F6: + add r0, r4, #0 + bl ov13_02226C48 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_02226602: + add r0, r4, #0 + bl ov13_02226C54 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_0222660E: + add r0, r4, #0 + bl ov13_02226C60 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_0222661A: + add r0, r4, #0 + bl ov13_02226948 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_02226626: + add r0, r4, #0 + bl ov13_02226C6C + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_02226632: + add r0, r4, #0 + bl ov13_02226C7C + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_0222663E: + add r0, r4, #0 + bl ov13_02226C94 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_0222664A: + add r0, r4, #0 + bl ov13_02226CBC + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_02226656: + add r0, r4, #0 + bl ov13_02226D94 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_02226662: + add r0, r4, #0 + bl ov13_02226CD4 + ldr r1, _02226688 ; =0x0000114A + strb r0, [r4, r1] + b _02226676 +_0222666E: + bl ov13_02226CFC + cmp r0, #1 + beq _02226686 +_02226676: + add r0, r4, #0 + bl ov13_02228848 + mov r0, #0xc3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200C7EC +_02226686: + pop {r4, pc} + ; .align 2, 0 +_02226688: .word 0x0000114A + thumb_func_end ov13_02226590 + + thumb_func_start ov13_0222668C +ov13_0222668C: ; 0x0222668C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, _02226750 ; =0x04001050 + mov r1, #0 + strh r1, [r0] + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + bl ov13_02228A38 + str r0, [r4, #0x34] + add r0, r4, #0 + bl ov13_02226ED0 + add r0, r4, #0 + bl ov13_02226FC4 + add r0, r4, #0 + bl ov13_022270B8 + ldr r1, [r4, #0] + mov r0, #2 + ldr r1, [r1, #0xc] + bl sub_02002BB8 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl ov16_0223E1B0 + bl sub_0207D9EC + ldr r1, _02226754 ; =0x0000114D + strb r0, [r4, r1] + add r0, r4, #0 + bl ov13_02227AC8 + ldr r1, _02226758 ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02228924 + add r0, r4, #0 + bl ov13_02227288 + ldr r1, _02226758 ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02227350 + add r0, r4, #0 + bl ov13_02227BDC + ldr r1, _02226758 ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02227E68 + ldr r0, [r4, #0] + add r0, #0x25 + ldrb r0, [r0] + cmp r0, #0 + beq _02226710 + ldr r0, [r4, #0x34] + mov r1, #1 + bl ov13_02228A60 +_02226710: + ldr r1, _02226758 ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02228008 + ldr r1, _02226758 ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_022280F0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r1, #0xa + str r0, [sp, #8] + add r3, r1, #0 + ldr r0, [r4, #8] + ldr r2, _0222675C ; =0x0000FFFF + sub r3, #0x12 + bl sub_02003178 + ldr r0, [r4, #0] + ldr r0, [r0, #0x14] + cmp r0, #1 + bne _0222674A + add sp, #0xc + mov r0, #0xc + pop {r3, r4, pc} +_0222674A: + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02226750: .word 0x04001050 +_02226754: .word 0x0000114D +_02226758: .word 0x0000114C +_0222675C: .word 0x0000FFFF + thumb_func_end ov13_0222668C + + thumb_func_start ov13_02226760 +ov13_02226760: ; 0x02226760 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0200384C + cmp r0, #0 + beq _02226772 + mov r0, #1 + pop {r3, r4, r5, pc} +_02226772: + ldr r1, _0222682C ; =0x02229A1C + add r0, r4, #0 + bl ov13_02227238 + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _02226798 + ldr r0, [r4, #0x34] + bl ov13_02228B64 + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _0222679E + mov r5, #5 + b _0222679E +_02226798: + add r0, r4, #0 + bl ov13_02228050 +_0222679E: + cmp r5, #5 + bhi _02226828 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022267AE: ; jump table + .short _022267BA - _022267AE - 2 ; case 0 + .short _022267BA - _022267AE - 2 ; case 1 + .short _022267BA - _022267AE - 2 ; case 2 + .short _022267BA - _022267AE - 2 ; case 3 + .short _022267DA - _022267AE - 2 ; case 4 + .short _0222680A - _022267AE - 2 ; case 5 +_022267BA: + ldr r0, _02226830 ; =0x000005DD + bl sub_02005748 + lsl r0, r5, #0x18 + lsr r1, r0, #0x18 + ldr r0, _02226834 ; =0x0000114D + mov r2, #5 + strb r1, [r4, r0] + sub r0, r0, #2 + strb r2, [r4, r0] + add r0, r4, #0 + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_022267DA: + ldr r0, [r4, #0] + ldrh r0, [r0, #0x20] + cmp r0, #0 + beq _02226828 + ldr r0, _02226830 ; =0x000005DD + bl sub_02005748 + ldr r0, [r4, #0] + ldrb r1, [r0, #0x1f] + ldr r0, _02226834 ; =0x0000114D + strb r1, [r4, r0] + mov r1, #6 + sub r0, r0, #2 + strb r1, [r4, r0] + add r0, r4, #0 + bl ov13_02227A7C + add r0, r4, #0 + mov r1, #4 + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_0222680A: + ldr r0, _02226830 ; =0x000005DD + bl sub_02005748 + ldr r0, [r4, #0] + mov r2, #0 + strh r2, [r0, #0x1c] + ldr r0, [r4, #0] + mov r1, #4 + strb r1, [r0, #0x1e] + add r0, r4, #0 + mov r1, #5 + bl ov13_0222880C + mov r0, #0xd + pop {r3, r4, r5, pc} +_02226828: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0222682C: .word 0x02229A1C +_02226830: .word 0x000005DD +_02226834: .word 0x0000114D + thumb_func_end ov13_02226760 + + thumb_func_start ov13_02226838 +ov13_02226838: ; 0x02226838 + push {r3, r4, r5, lr} + ldr r1, _02226938 ; =0x02229A38 + add r4, r0, #0 + bl ov13_02227238 + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _02226860 + ldr r0, [r4, #0x34] + bl ov13_02228B64 + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _02226866 + mov r5, #8 + b _02226866 +_02226860: + add r0, r4, #0 + bl ov13_02228050 +_02226866: + cmp r5, #8 + bhi _02226934 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02226876: ; jump table + .short _02226888 - _02226876 - 2 ; case 0 + .short _02226888 - _02226876 - 2 ; case 1 + .short _02226888 - _02226876 - 2 ; case 2 + .short _02226888 - _02226876 - 2 ; case 3 + .short _02226888 - _02226876 - 2 ; case 4 + .short _02226888 - _02226876 - 2 ; case 5 + .short _022268BE - _02226876 - 2 ; case 6 + .short _022268EC - _02226876 - 2 ; case 7 + .short _0222691A - _02226876 - 2 ; case 8 +_02226888: + add r0, r4, #0 + add r1, r5, #0 + bl ov13_02227BA8 + cmp r0, #0 + beq _02226934 + ldr r0, _0222693C ; =0x000005DD + bl sub_02005748 + ldr r0, _02226940 ; =0x0000114D + ldr r2, [r4, #0] + ldrb r1, [r4, r0] + sub r0, r0, #2 + add r1, r2, r1 + add r1, #0x27 + strb r5, [r1] + mov r1, #6 + strb r1, [r4, r0] + add r1, r5, #6 + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_022268BE: + ldr r0, _02226940 ; =0x0000114D + ldrb r1, [r4, r0] + add r0, r0, #7 + add r1, r4, r1 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02226934 + ldr r0, _0222693C ; =0x000005DD + bl sub_02005748 + ldr r0, _02226944 ; =0x0000114B + mov r1, #7 + strb r1, [r4, r0] + sub r1, #8 + add r0, r0, #3 + strb r1, [r4, r0] + add r0, r4, #0 + mov r1, #0xc + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_022268EC: + ldr r0, _02226940 ; =0x0000114D + ldrb r1, [r4, r0] + add r0, r0, #7 + add r1, r4, r1 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02226934 + ldr r0, _0222693C ; =0x000005DD + bl sub_02005748 + ldr r0, _02226944 ; =0x0000114B + mov r1, #7 + strb r1, [r4, r0] + mov r1, #1 + add r0, r0, #3 + strb r1, [r4, r0] + add r0, r4, #0 + mov r1, #0xd + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_0222691A: + ldr r0, _0222693C ; =0x000005DD + bl sub_02005748 + ldr r0, _02226944 ; =0x0000114B + mov r1, #4 + strb r1, [r4, r0] + add r0, r4, #0 + mov r1, #0xe + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_02226934: + mov r0, #2 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02226938: .word 0x02229A38 +_0222693C: .word 0x000005DD +_02226940: .word 0x0000114D +_02226944: .word 0x0000114B + thumb_func_end ov13_02226838 + + thumb_func_start ov13_02226948 +ov13_02226948: ; 0x02226948 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, _022269B8 ; =0x0000114D + ldr r1, [r4, #0] + ldrb r2, [r4, r0] + mov r3, #0 + add r5, r1, r2 + mov r1, #0x2c + ldrsb r2, [r5, r1] + add r5, #0x27 + add r1, r0, #1 + strb r3, [r5] + ldrsb r1, [r4, r1] + add r1, r2, r1 + lsl r1, r1, #0x18 + asr r2, r1, #0x18 + ldrb r1, [r4, r0] + add r0, r0, #7 + add r5, r4, r1 + ldrb r5, [r5, r0] + cmp r2, r5 + ble _0222697E + ldr r0, [r4, #0] + add r0, r0, r1 + add r0, #0x2c + strb r3, [r0] + b _02226992 +_0222697E: + cmp r2, #0 + ldr r0, [r4, #0] + bge _0222698C + add r0, r0, r1 + add r0, #0x2c + strb r5, [r0] + b _02226992 +_0222698C: + add r0, r0, r1 + add r0, #0x2c + strb r2, [r0] +_02226992: + add r0, r4, #0 + bl ov13_02227650 + add r0, r4, #0 + bl ov13_02227698 + ldr r1, _022269BC ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02227E68 + ldr r1, _022269BC ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_02228924 + mov r0, #2 + pop {r3, r4, r5, pc} + nop +_022269B8: .word 0x0000114D +_022269BC: .word 0x0000114C + thumb_func_end ov13_02226948 + + thumb_func_start ov13_022269C0 +ov13_022269C0: ; 0x022269C0 + push {r3, r4, r5, lr} + ldr r1, _02226A4C ; =0x022299AC + add r5, r0, #0 + bl ov13_02227238 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _022269E8 + ldr r0, [r5, #0x34] + bl ov13_02228B64 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022269EE + mov r4, #1 + b _022269EE +_022269E8: + add r0, r5, #0 + bl ov13_02228050 +_022269EE: + cmp r4, #0 + beq _022269F8 + cmp r4, #1 + beq _02226A2E + b _02226A48 +_022269F8: + ldr r0, _02226A50 ; =0x000005DD + bl sub_02005748 + ldr r1, _02226A54 ; =0x0000114D + ldr r2, [r5, #0] + ldrb r1, [r5, r1] + add r0, r5, #0 + add r1, r2, r1 + add r1, #0x27 + ldrb r1, [r1] + bl ov13_02227BA8 + ldr r1, [r5, #0] + mov r2, #0 + strh r0, [r1, #0x1c] + ldr r0, _02226A54 ; =0x0000114D + ldrb r1, [r5, r0] + ldr r0, [r5, #0] + strb r1, [r0, #0x1e] + add r0, r5, #0 + mov r1, #0xf + bl ov13_0222880C + add r0, r5, #0 + bl ov13_02226A5C + pop {r3, r4, r5, pc} +_02226A2E: + ldr r0, _02226A50 ; =0x000005DD + bl sub_02005748 + ldr r0, _02226A58 ; =0x0000114B + mov r1, #5 + strb r1, [r5, r0] + add r0, r5, #0 + mov r1, #0x10 + mov r2, #0 + bl ov13_0222880C + mov r0, #0xb + pop {r3, r4, r5, pc} +_02226A48: + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02226A4C: .word 0x022299AC +_02226A50: .word 0x000005DD +_02226A54: .word 0x0000114D +_02226A58: .word 0x0000114B + thumb_func_end ov13_022269C0 + + thumb_func_start ov13_02226A5C +ov13_02226A5C: ; 0x02226A5C + push {r3, r4, r5, r6, r7, lr} + ldr r1, _02226C3C ; =0x0000114D + add r5, r0, #0 + ldrb r1, [r5, r1] + ldr r4, [r5, #0] + cmp r1, #3 + beq _02226A6C + b _02226B86 +_02226A6C: + bl ov13_02227244 + add r7, r0, #0 + ldrh r0, [r4, #0x1c] + ldr r2, [r4, #0xc] + mov r1, #7 + bl sub_0207CFF0 + add r6, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _02226ADE + ldrh r0, [r4, #0x1c] + cmp r0, #0x37 + beq _02226ADE + cmp r6, #3 + beq _02226ADE + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + add r2, r7, #0 + bl ov16_0223DFAC + add r6, r0, #0 + ldr r0, [r5, #0x10] + mov r1, #0x2e + bl sub_0200B1EC + add r4, r0, #0 + add r0, r6, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200B5CC + ldr r0, [r5, #0x14] + ldr r2, _02226C40 ; =0x00000175 + mov r1, #1 + bl sub_0200B630 + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226ADE: + ldrh r0, [r4, #0x1c] + add r2, r7, #0 + mov r3, #0 + str r0, [sp] + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + bl ov16_0223E30C + cmp r0, #1 + bne _02226B04 + ldr r2, _02226C3C ; =0x0000114D + ldrh r1, [r4, #0x1c] + ldrb r2, [r5, r2] + ldr r0, [r4, #0] + ldr r3, [r4, #0xc] + bl ov13_02227260 + mov r0, #0xd + pop {r3, r4, r5, r6, r7, pc} +_02226B04: + cmp r6, #3 + bne _02226B6C + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + bne _02226B26 + ldr r2, _02226C3C ; =0x0000114D + ldrh r1, [r4, #0x1c] + ldrb r2, [r5, r2] + ldr r0, [r4, #0] + ldr r3, [r4, #0xc] + bl ov13_02227260 + mov r0, #0xd + pop {r3, r4, r5, r6, r7, pc} +_02226B26: + ldr r3, [r4, #0xc] + add r0, r1, #0 + mov r1, #0x1a + mov r2, #0xd5 + bl sub_0200B144 + mov r1, #0x24 + add r7, r0, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, [r5, #0x14] + ldr r2, [r4, #4] + mov r1, #0 + bl sub_0200B498 + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226B6C: + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x18] + mov r1, #0x22 + bl sub_0200B1B8 + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226B86: + cmp r1, #2 + bne _02226C36 + add r0, r4, #0 + add r0, #0x22 + ldrb r0, [r0] + cmp r0, #1 + bne _02226BAE + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x18] + mov r1, #0x2c + bl sub_0200B1B8 + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226BAE: + add r0, r4, #0 + add r0, #0x23 + ldrb r0, [r0] + cmp r0, #1 + bne _02226BD2 + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x18] + mov r1, #0x2f + bl sub_0200B1B8 + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226BD2: + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + cmp r0, #1 + bne _02226BF6 + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x18] + mov r1, #0x30 + bl sub_0200B1B8 + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226BF6: + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + bl ov16_0223DF20 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E228 + add r4, r0, #0 + add r0, r6, #0 + bl sub_0207A0F8 + cmp r0, #6 + bne _02226C36 + add r0, r4, #0 + bl sub_020799A0 + cmp r0, #0x12 + bne _02226C36 + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x18] + mov r1, #0x2d + bl sub_0200B1B8 + add r0, r5, #0 + bl ov13_022279F4 + ldr r0, _02226C44 ; =0x0000114B + mov r1, #8 + strb r1, [r5, r0] + mov r0, #9 + pop {r3, r4, r5, r6, r7, pc} +_02226C36: + mov r0, #0xd + pop {r3, r4, r5, r6, r7, pc} + nop +_02226C3C: .word 0x0000114D +_02226C40: .word 0x00000175 +_02226C44: .word 0x0000114B + thumb_func_end ov13_02226A5C + + thumb_func_start ov13_02226C48 +ov13_02226C48: ; 0x02226C48 + push {r3, lr} + mov r1, #0 + bl ov13_022271D0 + mov r0, #1 + pop {r3, pc} + thumb_func_end ov13_02226C48 + + thumb_func_start ov13_02226C54 +ov13_02226C54: ; 0x02226C54 + push {r3, lr} + mov r1, #1 + bl ov13_022271D0 + mov r0, #2 + pop {r3, pc} + thumb_func_end ov13_02226C54 + + thumb_func_start ov13_02226C60 +ov13_02226C60: ; 0x02226C60 + push {r3, lr} + mov r1, #2 + bl ov13_022271D0 + mov r0, #3 + pop {r3, pc} + thumb_func_end ov13_02226C60 + + thumb_func_start ov13_02226C6C +ov13_02226C6C: ; 0x02226C6C + push {r3, lr} + add r0, #0x1c + mov r1, #0 + bl sub_0200E084 + mov r0, #3 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov13_02226C6C + + thumb_func_start ov13_02226C7C +ov13_02226C7C: ; 0x02226C7C + push {r3, lr} + add r0, #0x32 + ldrb r0, [r0] + bl sub_0201D724 + cmp r0, #0 + bne _02226C8E + mov r0, #0xa + pop {r3, pc} +_02226C8E: + mov r0, #9 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov13_02226C7C + + thumb_func_start ov13_02226C94 +ov13_02226C94: ; 0x02226C94 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02226CB4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _02226CAA + bl sub_02022798 + cmp r0, #1 + bne _02226CB0 +_02226CAA: + ldr r0, _02226CB8 ; =0x0000114B + ldrb r0, [r4, r0] + pop {r4, pc} +_02226CB0: + mov r0, #0xa + pop {r4, pc} + ; .align 2, 0 +_02226CB4: .word 0x021BF67C +_02226CB8: .word 0x0000114B + thumb_func_end ov13_02226C94 + + thumb_func_start ov13_02226CBC +ov13_02226CBC: ; 0x02226CBC + ldr r1, _02226CD0 ; =0x0000113E + ldrb r2, [r0, r1] + cmp r2, #2 + bne _02226CCA + add r1, #0xd + ldrb r0, [r0, r1] + bx lr +_02226CCA: + mov r0, #0xb + bx lr + nop +_02226CD0: .word 0x0000113E + thumb_func_end ov13_02226CBC + + thumb_func_start ov13_02226CD4 +ov13_02226CD4: ; 0x02226CD4 + push {lr} + sub sp, #0xc + mov r2, #0 + str r2, [sp] + mov r1, #0x10 + str r1, [sp, #4] + str r2, [sp, #8] + mov r1, #0xa + add r3, r1, #0 + ldr r0, [r0, #8] + ldr r2, _02226CF8 ; =0x0000FFFF + sub r3, #0x12 + bl sub_02003178 + mov r0, #0xe + add sp, #0xc + pop {pc} + nop +_02226CF8: .word 0x0000FFFF + thumb_func_end ov13_02226CD4 + + thumb_func_start ov13_02226CFC +ov13_02226CFC: ; 0x02226CFC + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #8] + bl sub_0200384C + cmp r0, #0 + beq _02226D10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02226D10: + add r0, r5, #0 + bl ov13_02227E08 + add r0, r5, #0 + bl ov13_02227334 + add r0, r5, #0 + bl ov13_022270F8 + ldr r0, [r5, #4] + bl ov13_02226F9C + ldr r0, [r5, #0x34] + bl ov13_02228A5C + ldr r1, [r5, #0] + add r1, #0x25 + strb r0, [r1] + ldr r0, [r5, #0x34] + bl ov13_02228A50 + mov r0, #2 + bl sub_02002C60 + ldr r1, [r5, #0] + ldrh r0, [r1, #0x1c] + cmp r0, #0 + beq _02226D7C + ldr r0, [r1, #0] + bl ov16_0223E1B0 + add r6, r0, #0 + mov r4, #0 +_02226D52: + ldr r3, [r5, #0] + add r0, r6, #0 + add r2, r3, r4 + add r3, r3, r4 + add r2, #0x27 + add r3, #0x2c + ldrb r2, [r2] + ldrb r3, [r3] + add r1, r4, #0 + bl sub_0207D9F0 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #5 + blo _02226D52 + ldr r1, _02226D90 ; =0x0000114D + add r0, r6, #0 + ldrb r1, [r5, r1] + bl sub_0207DA24 +_02226D7C: + ldr r0, [r5, #0] + mov r1, #1 + add r0, #0x26 + strb r1, [r0] + add r0, r7, #0 + bl sub_020067D0 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_02226D90: .word 0x0000114D + thumb_func_end ov13_02226CFC + + thumb_func_start ov13_02226D94 +ov13_02226D94: ; 0x02226D94 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0200384C + cmp r0, #0 + beq _02226DA6 + mov r0, #0xc + pop {r4, pc} +_02226DA6: + ldr r0, _02226EC0 ; =0x00001159 + ldrb r0, [r4, r0] + cmp r0, #4 + bls _02226DB0 + b _02226EBA +_02226DB0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02226DBC: ; jump table + .short _02226DC6 - _02226DBC - 2 ; case 0 + .short _02226E08 - _02226DBC - 2 ; case 1 + .short _02226E18 - _02226DBC - 2 ; case 2 + .short _02226E62 - _02226DBC - 2 ; case 3 + .short _02226E72 - _02226DBC - 2 ; case 4 +_02226DC6: + ldr r0, [r4, #0x38] + bl ov16_0226DFD4 + cmp r0, #1 + bne _02226DFE + ldr r0, _02226EC4 ; =0x000005DD + bl sub_02005748 + ldr r0, _02226EC8 ; =0x0000114D + mov r1, #2 + strb r1, [r4, r0] + mov r2, #0xc + sub r0, r0, #2 + strb r2, [r4, r0] + add r0, r4, #0 + mov r2, #0 + bl ov13_0222880C + ldr r0, _02226ECC ; =0x0000115A + mov r1, #0 + strb r1, [r4, r0] + sub r1, r0, #1 + ldrb r1, [r4, r1] + sub r0, r0, #1 + add r1, r1, #1 + strb r1, [r4, r0] + mov r0, #0xb + pop {r4, pc} +_02226DFE: + ldr r0, _02226ECC ; =0x0000115A + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _02226EBA +_02226E08: + add r0, r4, #0 + bl ov13_02226C54 + ldr r0, _02226EC0 ; =0x00001159 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _02226EBA +_02226E18: + ldr r0, [r4, #0x38] + bl ov16_0226DFD4 + cmp r0, #1 + bne _02226E58 + ldr r0, _02226EC4 ; =0x000005DD + bl sub_02005748 + ldr r0, _02226EC8 ; =0x0000114D + ldr r3, [r4, #0] + ldrb r1, [r4, r0] + mov r2, #0 + sub r0, r0, #2 + add r1, r3, r1 + add r1, #0x27 + strb r2, [r1] + mov r1, #0xc + strb r1, [r4, r0] + add r0, r4, #0 + mov r1, #6 + bl ov13_0222880C + ldr r0, _02226ECC ; =0x0000115A + mov r1, #0 + strb r1, [r4, r0] + sub r1, r0, #1 + ldrb r1, [r4, r1] + sub r0, r0, #1 + add r1, r1, #1 + strb r1, [r4, r0] + mov r0, #0xb + pop {r4, pc} +_02226E58: + ldr r0, _02226ECC ; =0x0000115A + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _02226EBA +_02226E62: + add r0, r4, #0 + bl ov13_02226C60 + ldr r0, _02226EC0 ; =0x00001159 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _02226EBA +_02226E72: + ldr r0, [r4, #0x38] + bl ov16_0226DFD4 + cmp r0, #1 + bne _02226EB2 + ldr r0, _02226EC4 ; =0x000005DD + bl sub_02005748 + ldr r1, _02226EC8 ; =0x0000114D + ldr r2, [r4, #0] + ldrb r1, [r4, r1] + add r0, r4, #0 + add r1, r2, r1 + add r1, #0x27 + ldrb r1, [r1] + bl ov13_02227BA8 + ldr r1, [r4, #0] + mov r2, #0 + strh r0, [r1, #0x1c] + ldr r0, _02226EC8 ; =0x0000114D + ldrb r1, [r4, r0] + ldr r0, [r4, #0] + strb r1, [r0, #0x1e] + add r0, r4, #0 + mov r1, #0xf + bl ov13_0222880C + add r0, r4, #0 + bl ov13_02226A5C + pop {r4, pc} +_02226EB2: + ldr r0, _02226ECC ; =0x0000115A + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] +_02226EBA: + mov r0, #0xc + pop {r4, pc} + nop +_02226EC0: .word 0x00001159 +_02226EC4: .word 0x000005DD +_02226EC8: .word 0x0000114D +_02226ECC: .word 0x0000115A + thumb_func_end ov13_02226D94 + + thumb_func_start ov13_02226ED0 +ov13_02226ED0: ; 0x02226ED0 + push {r4, r5, lr} + sub sp, #0x64 + ldr r5, _02226F8C ; =0x022299B8 + add r3, sp, #0x54 + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + mov r1, #1 + bl sub_020183A0 + ldr r5, _02226F90 ; =0x02229A00 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #6 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r5, _02226F94 ; =0x022299E4 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #4] + mov r1, #5 + bl sub_02019EBC + ldr r5, _02226F98 ; =0x022299C8 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02019EBC + ldr r3, [r4, #0] + mov r0, #5 + ldr r3, [r3, #0xc] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [r4, #0] + mov r0, #4 + ldr r3, [r3, #0xc] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r0, [r4, #4] + mov r1, #5 + bl sub_0201C3C0 + ldr r0, [r4, #4] + mov r1, #4 + bl sub_0201C3C0 + add sp, #0x64 + pop {r4, r5, pc} + ; .align 2, 0 +_02226F8C: .word 0x022299B8 +_02226F90: .word 0x02229A00 +_02226F94: .word 0x022299E4 +_02226F98: .word 0x022299C8 + thumb_func_end ov13_02226ED0 + + thumb_func_start ov13_02226F9C +ov13_02226F9C: ; 0x02226F9C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x17 + mov r1, #0 + bl sub_0201FF74 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #6 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02226F9C + + thumb_func_start ov13_02226FC4 +ov13_02226FC4: ; 0x02226FC4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #0x4d + ldr r1, [r1, #0xc] + bl sub_02006C24 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldr r1, [r5, #0] + mov r3, #6 + ldr r1, [r1, #0xc] + add r4, r0, #0 + str r1, [sp, #0xc] + ldr r2, [r5, #4] + mov r1, #2 + bl sub_020070E8 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldr r0, [r5, #0] + mov r3, #6 + ldr r0, [r0, #0xc] + str r0, [sp, #0xc] + ldr r2, [r5, #4] + add r0, r4, #0 + bl sub_0200710C + ldr r2, [r5, #0] + add r0, r4, #0 + ldr r2, [r2, #0xc] + mov r1, #1 + bl sub_02006CB8 + add r1, sp, #0x10 + add r6, r0, #0 + bl sub_020A7248 + ldr r1, [sp, #0x10] + add r0, r5, #0 + add r1, #0xc + bl ov13_02228128 + add r0, r6, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #1 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #6 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r3, [r5, #0] + ldr r0, [r5, #8] + ldr r3, [r3, #0xc] + mov r1, #0x4d + mov r2, #3 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xf0 + str r0, [sp, #8] + ldr r3, [r5, #0] + ldr r0, [r5, #8] + ldr r3, [r3, #0xc] + mov r1, #0xe + mov r2, #7 + bl sub_02003050 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl ov16_0223EDE0 + add r4, r0, #0 + bl sub_0200DD04 + add r1, r0, #0 + ldr r0, _022270B4 ; =0x000003E2 + mov r3, #4 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0x26 + bl sub_02006E3C + add r0, r4, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + ldr r3, [r5, #0] + ldr r0, [r5, #8] + ldr r3, [r3, #0xc] + mov r1, #0x26 + bl sub_02003050 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022270B4: .word 0x000003E2 + thumb_func_end ov13_02226FC4 + + thumb_func_start ov13_022270B8 +ov13_022270B8: ; 0x022270B8 + push {r4, lr} + add r4, r0, #0 + ldr r3, [r4, #0] + mov r0, #0 + ldr r3, [r3, #0xc] + mov r1, #0x1a + mov r2, #2 + bl sub_0200B144 + str r0, [r4, #0x10] + ldr r3, [r4, #0] + mov r0, #0xf + ldr r3, [r3, #0xc] + mov r1, #0xe + mov r2, #0 + bl sub_0200C440 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + bl sub_0200B358 + str r0, [r4, #0x14] + ldr r1, [r4, #0] + mov r0, #2 + ldr r1, [r1, #0xc] + lsl r0, r0, #8 + bl sub_02023790 + str r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_022270B8 + + thumb_func_start ov13_022270F8 +ov13_022270F8: ; 0x022270F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl sub_0200B190 + ldr r0, [r4, #0xc] + bl sub_0200C560 + ldr r0, [r4, #0x14] + bl sub_0200B3F0 + ldr r0, [r4, #0x18] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_022270F8 + + thumb_func_start ov13_02227118 +ov13_02227118: ; 0x02227118 + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + beq _0222712A + cmp r1, #1 + beq _02227144 + cmp r1, #2 + beq _02227160 + pop {r4, pc} +_0222712A: + mov r2, #0 + ldr r0, [r4, #4] + mov r1, #6 + add r3, r2, #0 + bl sub_0201C63C + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + pop {r4, pc} +_02227144: + mov r1, #6 + add r3, r1, #0 + ldr r0, [r4, #4] + mov r2, #0 + add r3, #0xfa + bl sub_0201C63C + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + pop {r4, pc} +_02227160: + mov r2, #0 + ldr r0, [r4, #4] + mov r1, #6 + add r3, r2, #0 + bl sub_0201C63C + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #4] + mov r1, #6 + add r3, #0xfd + bl sub_0201C63C + pop {r4, pc} + thumb_func_end ov13_02227118 + + thumb_func_start ov13_0222717C +ov13_0222717C: ; 0x0222717C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + cmp r1, #2 + bne _022271C6 + mov r0, #0x1c + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _022271CC ; =0x0000114D + mov r1, #6 + ldrb r0, [r4, r0] + mov r2, #2 + mov r3, #0x23 + add r0, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_02019E2C + mov r0, #0x1c + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + ldr r0, _022271CC ; =0x0000114D + mov r1, #6 + ldrb r0, [r4, r0] + mov r2, #2 + mov r3, #0x28 + add r0, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_02019E2C +_022271C6: + add sp, #0xc + pop {r3, r4, pc} + nop +_022271CC: .word 0x0000114D + thumb_func_end ov13_0222717C + + thumb_func_start ov13_022271D0 +ov13_022271D0: ; 0x022271D0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov13_0222717C + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02227118 + ldr r0, [r5, #4] + mov r1, #4 + mov r2, #0 + bl sub_02019F04 + ldr r0, [r5, #4] + mov r1, #5 + mov r2, #0 + bl sub_02019F04 + add r0, r5, #0 + bl ov13_02227324 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_022272AC + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02227350 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02228924 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02228008 + add r0, r5, #0 + add r1, r4, #0 + bl ov13_022280F0 + ldr r1, _02227234 ; =0x0000114C + add r0, r5, #0 + strb r4, [r5, r1] + ldrb r1, [r5, r1] + bl ov13_02227E68 + pop {r3, r4, r5, pc} + nop +_02227234: .word 0x0000114C + thumb_func_end ov13_022271D0 + + thumb_func_start ov13_02227238 +ov13_02227238: ; 0x02227238 + ldr r3, _02227240 ; =sub_02022664 + add r0, r1, #0 + bx r3 + nop +_02227240: .word sub_02022664 + thumb_func_end ov13_02227238 + + thumb_func_start ov13_02227244 +ov13_02227244: ; 0x02227244 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #0] + bl ov16_0223DF10 + add r1, r0, #0 + ldr r0, [r5, #0] + ldr r3, [r4, #0x10] + ldr r0, [r0, #0] + mov r2, #2 + bl ov16_0225B45C + pop {r3, r4, r5, pc} + thumb_func_end ov13_02227244 + + thumb_func_start ov13_02227260 +ov13_02227260: ; 0x02227260 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r3, #0 + add r6, r0, #0 + add r7, r2, #0 + bl ov16_0223E1AC + add r1, r5, #0 + mov r2, #1 + add r3, r4, #0 + bl sub_0207D60C + add r0, r6, #0 + bl ov16_0223E1B0 + add r1, r5, #0 + add r2, r7, #0 + bl sub_0207DA1C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_02227260 + + .rodata + + + .global Unk_ov13_022299AC +Unk_ov13_022299AC: ; 0x022299AC + .incbin "incbin/overlay13_rodata.bin", 0xCB0, 0xCBC - 0xCB0 + + .global Unk_ov13_022299B8 +Unk_ov13_022299B8: ; 0x022299B8 + .incbin "incbin/overlay13_rodata.bin", 0xCBC, 0xCCC - 0xCBC + + .global Unk_ov13_022299C8 +Unk_ov13_022299C8: ; 0x022299C8 + .incbin "incbin/overlay13_rodata.bin", 0xCCC, 0xCE8 - 0xCCC + + .global Unk_ov13_022299E4 +Unk_ov13_022299E4: ; 0x022299E4 + .incbin "incbin/overlay13_rodata.bin", 0xCE8, 0xD04 - 0xCE8 + + .global Unk_ov13_02229A00 +Unk_ov13_02229A00: ; 0x02229A00 + .incbin "incbin/overlay13_rodata.bin", 0xD04, 0xD20 - 0xD04 + + .global Unk_ov13_02229A1C +Unk_ov13_02229A1C: ; 0x02229A1C + .incbin "incbin/overlay13_rodata.bin", 0xD20, 0xD3C - 0xD20 + + .global Unk_ov13_02229A38 +Unk_ov13_02229A38: ; 0x02229A38 + .incbin "incbin/overlay13_rodata.bin", 0xD3C, 0x28 + diff --git a/asm/ov13_02227288.s b/asm/ov13_02227288.s new file mode 100644 index 000000000..fbbfb4889 --- /dev/null +++ b/asm/ov13_02227288.s @@ -0,0 +1,1008 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02227288 +ov13_02227288: ; 0x02227288 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #4] + ldr r2, _022272A4 ; =0x02229A60 + add r1, #0x1c + bl sub_0201A8D4 + ldr r1, _022272A8 ; =0x0000114C + add r0, r4, #0 + ldrb r1, [r4, r1] + bl ov13_022272AC + pop {r4, pc} + ; .align 2, 0 +_022272A4: .word 0x02229A60 +_022272A8: .word 0x0000114C + thumb_func_end ov13_02227288 + + thumb_func_start ov13_022272AC +ov13_022272AC: ; 0x022272AC + push {r4, r5, r6, lr} + add r5, r0, #0 + cmp r1, #0 + beq _022272BE + cmp r1, #1 + beq _022272C8 + cmp r1, #2 + beq _022272D2 + b _022272DA +_022272BE: + mov r1, #5 + add r0, #0x30 + ldr r6, _02227318 ; =0x02229A88 + strb r1, [r0] + b _022272DA +_022272C8: + mov r1, #0x1a + add r0, #0x30 + ldr r6, _0222731C ; =0x02229AE0 + strb r1, [r0] + b _022272DA +_022272D2: + ldr r6, _02227320 ; =0x02229A68 + mov r1, #4 + add r0, #0x30 + strb r1, [r0] +_022272DA: + add r1, r5, #0 + ldr r0, [r5, #0] + add r1, #0x30 + ldrb r1, [r1] + ldr r0, [r0, #0xc] + bl sub_0201A778 + str r0, [r5, #0x2c] + add r0, r5, #0 + add r0, #0x30 + ldrb r0, [r0] + mov r4, #0 + cmp r0, #0 + bls _02227316 +_022272F6: + ldr r2, [r5, #0x2c] + lsl r1, r4, #4 + add r1, r2, r1 + lsl r2, r4, #3 + ldr r0, [r5, #4] + add r2, r6, r2 + bl sub_0201A8D4 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, r5, #0 + add r0, #0x30 + ldrb r0, [r0] + cmp r4, r0 + blo _022272F6 +_02227316: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02227318: .word 0x02229A88 +_0222731C: .word 0x02229AE0 +_02227320: .word 0x02229A68 + thumb_func_end ov13_022272AC + + thumb_func_start ov13_02227324 +ov13_02227324: ; 0x02227324 + add r1, r0, #0 + ldr r0, [r1, #0x2c] + add r1, #0x30 + ldr r3, _02227330 ; =sub_0201A928 + ldrb r1, [r1] + bx r3 + ; .align 2, 0 +_02227330: .word sub_0201A928 + thumb_func_end ov13_02227324 + + thumb_func_start ov13_02227334 +ov13_02227334: ; 0x02227334 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x30 + ldrb r1, [r1] + ldr r0, [r4, #0x2c] + bl sub_0201A928 + add r4, #0x1c + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02227334 + + thumb_func_start ov13_02227350 +ov13_02227350: ; 0x02227350 + push {r3, lr} + cmp r1, #0 + beq _02227360 + cmp r1, #1 + beq _02227366 + cmp r1, #2 + beq _0222736C + pop {r3, pc} +_02227360: + bl ov13_022273CC + pop {r3, pc} +_02227366: + bl ov13_02227888 + pop {r3, pc} +_0222736C: + bl ov13_02227974 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov13_02227350 + + thumb_func_start ov13_02227374 +ov13_02227374: ; 0x02227374 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r5, [r0, #0x2c] + lsl r4, r1, #4 + ldr r0, [r0, #0x10] + add r1, r2, #0 + add r6, r3, #0 + bl sub_0200B1EC + str r0, [sp, #0x10] + ldr r1, [sp, #0x10] + add r0, r6, #0 + mov r2, #0 + bl sub_02002D7C + add r7, r0, #0 + add r0, r5, r4 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsr r3, r0, #1 + ldr r0, [sp, #0x28] + ldr r2, [sp, #0x10] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + add r1, r6, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r5, r4 + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02227374 + + thumb_func_start ov13_022273CC +ov13_022273CC: ; 0x022273CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r6, #0 + add r5, r0, #0 + add r4, r6, #0 + add r7, r6, #0 +_022273D8: + ldr r0, [r5, #0x2c] + add r1, r7, #0 + add r0, r0, r4 + bl sub_0201ADA4 + add r6, r6, #1 + add r4, #0x10 + cmp r6, #5 + blo _022273D8 + mov r0, #8 + str r0, [sp] + ldr r0, _022274A4 ; =0x00030201 + mov r1, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r1, #0 + mov r3, #2 + bl ov13_02227374 + mov r0, #0x18 + str r0, [sp] + ldr r0, _022274A4 ; =0x00030201 + mov r1, #0 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #1 + mov r3, #2 + bl ov13_02227374 + mov r0, #8 + str r0, [sp] + ldr r0, _022274A4 ; =0x00030201 + mov r2, #2 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + add r3, r2, #0 + bl ov13_02227374 + mov r0, #0x18 + str r0, [sp] + ldr r0, _022274A4 ; =0x00030201 + mov r1, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #3 + mov r3, #2 + bl ov13_02227374 + mov r0, #8 + str r0, [sp] + ldr r0, _022274A4 ; =0x00030201 + mov r1, #2 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #7 + add r3, r1, #0 + bl ov13_02227374 + mov r0, #8 + str r0, [sp] + ldr r0, _022274A4 ; =0x00030201 + mov r1, #3 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #6 + mov r3, #2 + bl ov13_02227374 + ldr r0, [r5, #0] + ldrh r0, [r0, #0x20] + cmp r0, #0 + beq _0222749E + ldr r0, [r5, #0x10] + mov r1, #8 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #6 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022274A4 ; =0x00030201 + mov r3, #0 + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r5, #0x2c] + mov r1, #2 + add r0, #0x40 + add r2, r4, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + ldr r0, [r5, #0x2c] + add r0, #0x40 + bl sub_0201A9A4 +_0222749E: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022274A4: .word 0x00030201 + thumb_func_end ov13_022273CC + + thumb_func_start ov13_022274A8 +ov13_022274A8: ; 0x022274A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r4, [r5, #0x2c] + lsl r6, r3, #4 + add r7, r1, #0 + add r0, r4, r6 + mov r1, #0 + str r2, [sp, #0x10] + bl sub_0201ADA4 + ldr r0, _02227544 ; =0x0000114D + lsl r7, r7, #2 + ldrb r1, [r5, r0] + mov r0, #0x90 + mul r0, r1 + add r0, r5, r0 + add r0, r0, r7 + ldrh r0, [r0, #0x3c] + cmp r0, #0 + beq _0222753A + ldr r1, [sp, #0x10] + ldr r0, [r5, #0x10] + lsl r2, r1, #3 + ldr r1, _02227548 ; =0x02229AB0 + ldr r1, [r1, r2] + bl sub_0200B1EC + ldr r2, _02227544 ; =0x0000114D + str r0, [sp, #0x14] + ldrb r3, [r5, r2] + mov r2, #0x90 + ldr r0, [r5, #0x14] + mul r2, r3 + add r2, r5, r2 + add r2, r2, r7 + ldrh r2, [r2, #0x3c] + mov r1, #0 + bl sub_0200B70C + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r2, [sp, #0x14] + bl sub_0200C388 + ldr r0, [sp, #0x30] + ldr r1, [r5, #0x18] + mov r2, #0 + bl sub_02002D7C + add r7, r0, #0 + add r0, r4, r6 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsr r3, r0, #1 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x34] + ldr r1, [sp, #0x30] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r5, #0x18] + add r0, r4, r6 + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC +_0222753A: + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02227544: .word 0x0000114D +_02227548: .word 0x02229AB0 + thumb_func_end ov13_022274A8 + + thumb_func_start ov13_0222754C +ov13_0222754C: ; 0x0222754C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r4, [r5, #0x2c] + lsl r7, r3, #4 + add r6, r1, #0 + add r0, r4, r7 + mov r1, #0 + str r2, [sp, #0x10] + bl sub_0201ADA4 + ldr r0, _022275D8 ; =0x0000114D + lsl r6, r6, #2 + ldrb r1, [r5, r0] + mov r0, #0x90 + mul r0, r1 + add r0, r5, r0 + add r0, r0, r6 + ldrh r0, [r0, #0x3e] + cmp r0, #0 + beq _022275CE + ldr r1, [sp, #0x10] + ldr r0, [r5, #0x10] + lsl r2, r1, #3 + ldr r1, _022275DC ; =0x02229AB4 + ldr r1, [r1, r2] + bl sub_0200B1EC + mov r1, #0 + str r0, [sp, #0x14] + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, _022275D8 ; =0x0000114D + ldr r0, [r5, #0x14] + ldrb r3, [r5, r2] + mov r2, #0x90 + mul r2, r3 + add r2, r5, r2 + add r2, r2, r6 + ldrh r2, [r2, #0x3e] + mov r3, #3 + bl sub_0200B60C + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r2, [sp, #0x14] + bl sub_0200C388 + ldr r0, [sp, #0x34] + mov r3, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x30] + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r2, [r5, #0x18] + add r0, r4, r7 + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC +_022275CE: + add r0, r4, r7 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022275D8: .word 0x0000114D +_022275DC: .word 0x02229AB4 + thumb_func_end ov13_0222754C + + thumb_func_start ov13_022275E0 +ov13_022275E0: ; 0x022275E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r0, #0 + ldr r0, _02227644 ; =0x0000114D + add r5, r1, #0 + ldrb r0, [r6, r0] + ldr r1, [r6, #0] + add r0, r1, r0 + add r0, #0x2c + ldrb r1, [r0] + mov r0, #6 + mul r0, r1 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0x31 + ldrb r0, [r0] + cmp r0, #0 + bne _02227608 + mov r4, #0 + b _0222760A +_02227608: + mov r4, #0xc +_0222760A: + mov r0, #2 + str r0, [sp] + ldr r0, _02227648 ; =0x00030201 + ldr r1, [sp, #0xc] + lsl r7, r5, #1 + str r0, [sp, #4] + add r0, r6, #0 + add r1, r5, r1 + add r2, r5, #0 + add r3, r4, r7 + bl ov13_022274A8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _0222764C ; =0x00010200 + ldr r1, [sp, #0xc] + add r3, r4, #1 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, r1 + add r2, r5, #0 + add r3, r3, r7 + bl ov13_0222754C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02227644: .word 0x0000114D +_02227648: .word 0x00030201 +_0222764C: .word 0x00010200 + thumb_func_end ov13_022275E0 + + thumb_func_start ov13_02227650 +ov13_02227650: ; 0x02227650 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x13 + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r0, [r4, #4] + mov r1, #5 + add r3, r2, #0 + bl sub_02019CB8 + mov r5, #0 +_02227672: + add r0, r4, #0 + add r1, r5, #0 + bl ov13_022275E0 + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #6 + blo _02227672 + add r0, r4, #0 + add r0, #0x31 + ldrb r1, [r0] + mov r0, #1 + add r4, #0x31 + eor r0, r1 + strb r0, [r4] + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov13_02227650 + + thumb_func_start ov13_02227698 +ov13_02227698: ; 0x02227698 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0x19 + ldr r1, [r5, #0x2c] + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x10] + mov r1, #0x1c + ldr r4, [r5, #0x2c] + bl sub_0200B1EC + str r0, [sp, #0x10] + mov r0, #0 + ldr r1, [sp, #0x10] + add r2, r0, #0 + bl sub_02002D7C + add r7, r0, #0 + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, r0, r7 + lsr r6, r0, #1 + mov r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022277C0 ; =0x00010200 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + mov r0, #0x19 + lsl r0, r0, #4 + mov r1, #0 + add r0, r4, r0 + add r3, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + ldr r0, [r5, #0x10] + mov r1, #0x1d + bl sub_0200B1EC + mov r1, #0 + str r0, [sp, #0x14] + ldr r3, _022277C4 ; =0x0000114D + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, _022277C4 ; =0x0000114D + add r3, r3, #7 + ldrb r2, [r5, r2] + ldr r0, [r5, #0x14] + add r2, r5, r2 + ldrb r2, [r2, r3] + mov r3, #2 + add r2, r2, #1 + bl sub_0200B60C + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r2, [sp, #0x14] + bl sub_0200C388 + mov r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022277C0 ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r2, [r5, #0x18] + add r0, r4, r0 + add r3, r6, r7 + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, [r5, #0x10] + mov r1, #0x1e + bl sub_0200B1EC + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r3, _022277C4 ; =0x0000114D + ldr r2, [r5, #0] + ldrb r3, [r5, r3] + ldr r0, [r5, #0x14] + add r2, r2, r3 + add r2, #0x2c + ldrb r2, [r2] + mov r3, #2 + add r2, r2, #1 + bl sub_0200B60C + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + add r2, r7, #0 + bl sub_0200C388 + mov r0, #0 + ldr r1, [r5, #0x18] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022277C0 ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r2, [r5, #0x18] + add r0, r4, r0 + sub r3, r6, r3 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_022277C0: .word 0x00010200 +_022277C4: .word 0x0000114D + thumb_func_end ov13_02227698 + + thumb_func_start ov13_022277C8 +ov13_022277C8: ; 0x022277C8 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #6 + ldr r1, [r4, #0x2c] + lsl r0, r0, #6 + add r0, r1, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _02227880 ; =0x0000114D + ldrb r0, [r4, r0] + cmp r0, #3 + bhi _0222787C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022277F0: ; jump table + .short _022277F8 - _022277F0 - 2 ; case 0 + .short _02227824 - _022277F0 - 2 ; case 1 + .short _02227850 - _022277F0 - 2 ; case 2 + .short _02227868 - _022277F0 - 2 ; case 3 +_022277F8: + mov r0, #4 + str r0, [sp] + ldr r0, _02227884 ; =0x00010200 + mov r1, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x16 + mov r3, #0 + bl ov13_02227374 + mov r0, #0x14 + str r0, [sp] + ldr r0, _02227884 ; =0x00010200 + mov r1, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x17 + mov r3, #0 + bl ov13_02227374 + add sp, #8 + pop {r4, pc} +_02227824: + mov r0, #4 + str r0, [sp] + ldr r0, _02227884 ; =0x00010200 + mov r1, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0 + bl ov13_02227374 + mov r0, #0x14 + str r0, [sp] + ldr r0, _02227884 ; =0x00010200 + mov r1, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x19 + mov r3, #0 + bl ov13_02227374 + add sp, #8 + pop {r4, pc} +_02227850: + mov r0, #0xc + str r0, [sp] + ldr r0, _02227884 ; =0x00010200 + mov r1, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1a + mov r3, #0 + bl ov13_02227374 + add sp, #8 + pop {r4, pc} +_02227868: + mov r0, #0xc + str r0, [sp] + ldr r0, _02227884 ; =0x00010200 + mov r1, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov13_02227374 +_0222787C: + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_02227880: .word 0x0000114D +_02227884: .word 0x00010200 + thumb_func_end ov13_022277C8 + + thumb_func_start ov13_02227888 +ov13_02227888: ; 0x02227888 + push {r4, lr} + add r4, r0, #0 + bl ov13_02227650 + add r0, r4, #0 + bl ov13_022277C8 + add r0, r4, #0 + bl ov13_02227698 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02227888 + + thumb_func_start ov13_022278A0 +ov13_022278A0: ; 0x022278A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r6, r1, #0 + mov r1, #9 + ldr r4, [r5, #0x2c] + bl sub_0200B1EC + ldr r2, _02227908 ; =0x0000114D + add r7, r0, #0 + ldrb r3, [r5, r2] + mov r2, #0x90 + ldr r0, [r5, #0x14] + mul r2, r3 + add r2, r5, r2 + lsl r3, r6, #2 + add r2, r2, r3 + ldrh r2, [r2, #0x3c] + mov r1, #0 + bl sub_0200B70C + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + add r2, r7, #0 + bl sub_0200C388 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0222790C ; =0x00010200 + add r3, r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r5, #0x18] + add r0, r4, #0 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02227908: .word 0x0000114D +_0222790C: .word 0x00010200 + thumb_func_end ov13_022278A0 + + thumb_func_start ov13_02227910 +ov13_02227910: ; 0x02227910 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0] + ldr r4, [r5, #0x2c] + ldr r1, [r1, #0xc] + mov r0, #0x82 + add r4, #0x20 + bl sub_02023790 + ldr r1, _0222796C ; =0x0000114D + add r7, r0, #0 + ldrb r2, [r5, r1] + mov r1, #0x90 + mul r1, r2 + add r2, r5, r1 + lsl r1, r6, #2 + add r1, r2, r1 + ldr r2, [r5, #0] + ldrh r1, [r1, #0x3c] + ldr r2, [r2, #0xc] + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + bl sub_0207CFC8 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02227970 ; =0x00010200 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, #0 + mov r3, #4 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222796C: .word 0x0000114D +_02227970: .word 0x00010200 + thumb_func_end ov13_02227910 + + thumb_func_start ov13_02227974 +ov13_02227974: ; 0x02227974 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r6, #0 + add r5, r0, #0 + add r4, r6, #0 + add r7, r6, #0 +_02227980: + ldr r0, [r5, #0x2c] + add r1, r7, #0 + add r0, r0, r4 + bl sub_0201ADA4 + add r6, r6, #1 + add r4, #0x10 + cmp r6, #4 + blo _02227980 + ldr r0, _022279E8 ; =0x0000114D + ldr r1, [r5, #0] + ldrb r2, [r5, r0] + add r0, r1, r2 + add r0, #0x27 + ldrb r4, [r0] + add r0, r1, r2 + add r0, #0x2c + ldrb r1, [r0] + mov r0, #6 + add r6, r1, #0 + mul r6, r0 + add r0, r5, #0 + add r1, r4, r6 + bl ov13_022278A0 + mov r2, #0 + str r2, [sp] + ldr r0, _022279EC ; =0x00010200 + str r2, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, r6 + mov r3, #1 + bl ov13_0222754C + add r0, r5, #0 + add r1, r4, r6 + bl ov13_02227910 + mov r0, #6 + str r0, [sp] + ldr r0, _022279F0 ; =0x00030201 + mov r1, #3 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1f + mov r3, #2 + bl ov13_02227374 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022279E8: .word 0x0000114D +_022279EC: .word 0x00010200 +_022279F0: .word 0x00030201 + thumb_func_end ov13_02227974 + + thumb_func_start ov13_022279F4 +ov13_022279F4: ; 0x022279F4 + push {r4, lr} + ldr r2, _02227A18 ; =0x000003E2 + add r4, r0, #0 + add r0, #0x1c + mov r1, #1 + mov r3, #0xe + bl sub_0200E060 + add r0, r4, #0 + add r0, #0x1c + mov r1, #0xf + bl sub_0201ADA4 + add r0, r4, #0 + bl ov13_02227A1C + pop {r4, pc} + nop +_02227A18: .word 0x000003E2 + thumb_func_end ov13_022279F4 + + thumb_func_start ov13_02227A1C +ov13_02227A1C: ; 0x02227A1C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #1 + bl sub_02002AC8 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl ov16_0223EDF0 + mov r3, #0 + str r3, [sp] + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x18] + add r0, #0x1c + mov r1, #1 + bl sub_0201D738 + add r4, #0x32 + strb r0, [r4] + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov13_02227A1C + + .rodata + + + .global Unk_ov13_02229A60 +Unk_ov13_02229A60: ; 0x02229A60 + .incbin "incbin/overlay13_rodata.bin", 0xD64, 0xD6C - 0xD64 + + .global Unk_ov13_02229A68 +Unk_ov13_02229A68: ; 0x02229A68 + .incbin "incbin/overlay13_rodata.bin", 0xD6C, 0xD8C - 0xD6C + + .global Unk_ov13_02229A88 +Unk_ov13_02229A88: ; 0x02229A88 + .incbin "incbin/overlay13_rodata.bin", 0xD8C, 0xDB4 - 0xD8C + + .global Unk_ov13_02229AB0 +Unk_ov13_02229AB0: ; 0x02229AB0 + .incbin "incbin/overlay13_rodata.bin", 0xDB4, 0xDE4 - 0xDB4 + + .global Unk_ov13_02229AE0 +Unk_ov13_02229AE0: ; 0x02229AE0 + .incbin "incbin/overlay13_rodata.bin", 0xDE4, 0xD0 + diff --git a/asm/ov13_02227A4C.s b/asm/ov13_02227A4C.s new file mode 100644 index 000000000..37b331b27 --- /dev/null +++ b/asm/ov13_02227A4C.s @@ -0,0 +1,238 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02227A4C +ov13_02227A4C: ; 0x02227A4C + push {r4, lr} + add r4, r0, #0 + ldr r3, [r4, #0] + ldrh r1, [r3, #0x20] + cmp r1, #0 + bne _02227A5C + mov r0, #0 + pop {r4, pc} +_02227A5C: + ldr r0, [r3, #8] + ldr r3, [r3, #0xc] + mov r2, #1 + bl sub_0207D688 + cmp r0, #0 + bne _02227A76 + ldr r1, [r4, #0] + mov r0, #0 + strh r0, [r1, #0x20] + ldr r1, [r4, #0] + strb r0, [r1, #0x1f] + pop {r4, pc} +_02227A76: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02227A4C + + thumb_func_start ov13_02227A7C +ov13_02227A7C: ; 0x02227A7C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02227AC4 ; =0x0000114D + ldr r6, [r5, #0] + ldrb r7, [r5, r0] + mov r0, #0x90 + ldrh r2, [r6, #0x20] + mul r0, r7 + mov r4, #0 + add r1, r5, r0 +_02227A90: + ldrh r0, [r1, #0x3c] + cmp r2, r0 + bne _02227ABA + add r0, r4, #0 + mov r1, #6 + bl sub_020E2178 + add r0, r6, r7 + add r0, #0x27 + strb r1, [r0] + add r0, r4, #0 + mov r1, #6 + bl sub_020E2178 + ldr r1, _02227AC4 ; =0x0000114D + ldr r2, [r5, #0] + ldrb r1, [r5, r1] + add r1, r2, r1 + add r1, #0x2c + strb r0, [r1] + pop {r3, r4, r5, r6, r7, pc} +_02227ABA: + add r4, r4, #1 + add r1, r1, #4 + cmp r4, #0x24 + blo _02227A90 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02227AC4: .word 0x0000114D + thumb_func_end ov13_02227A7C + + thumb_func_start ov13_02227AC8 +ov13_02227AC8: ; 0x02227AC8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0 + str r0, [sp, #4] +_02227AD2: + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] +_02227ADE: + ldr r0, [r4, #0] + ldr r2, [sp] + ldr r0, [r0, #8] + lsl r2, r2, #0x10 + ldr r1, [sp, #8] + lsr r2, r2, #0x10 + bl sub_0207D910 + add r5, r0, #0 + beq _02227B50 + ldrh r0, [r5] + cmp r0, #0 + beq _02227B48 + ldrh r1, [r5, #2] + cmp r1, #0 + beq _02227B48 + ldr r2, [r4, #0] + mov r1, #0xd + ldr r2, [r2, #0xc] + bl sub_0207CFF0 + add r7, r0, #0 + ldr r1, _02227B9C ; =0x02229BB0 + mov r0, #0 +_02227B0E: + mov r2, #1 + lsl r2, r0 + tst r2, r7 + beq _02227B40 + ldrb r2, [r1] + mov r3, #0x90 + add r6, r2, #0 + mul r6, r3 + add r3, r4, r2 + ldr r2, _02227BA0 ; =0x0000114F + ldrb r2, [r3, r2] + add r3, r4, r6 + lsl r2, r2, #2 + add r2, r2, r3 + ldrh r3, [r5] + strh r3, [r2, #0x3c] + ldrh r3, [r5, #2] + strh r3, [r2, #0x3e] + ldrb r2, [r1] + add r6, r4, r2 + ldr r2, _02227BA0 ; =0x0000114F + ldrb r2, [r6, r2] + add r3, r2, #1 + ldr r2, _02227BA0 ; =0x0000114F + strb r3, [r6, r2] +_02227B40: + add r0, r0, #1 + add r1, r1, #1 + cmp r0, #5 + blo _02227B0E +_02227B48: + ldr r0, [sp] + add r0, r0, #1 + str r0, [sp] + b _02227ADE +_02227B50: + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #8 + blo _02227AD2 + mov r5, #0 + add r7, r5, #0 +_02227B5E: + ldr r0, _02227BA0 ; =0x0000114F + add r6, r4, r5 + ldrb r0, [r6, r0] + cmp r0, #0 + bne _02227B6E + ldr r0, _02227BA4 ; =0x00001154 + strb r7, [r6, r0] + b _02227B7A +_02227B6E: + sub r0, r0, #1 + mov r1, #6 + bl sub_020E1F6C + ldr r1, _02227BA4 ; =0x00001154 + strb r0, [r6, r1] +_02227B7A: + ldr r1, [r4, #0] + ldr r0, _02227BA4 ; =0x00001154 + add r2, r1, r5 + add r2, #0x2c + ldrb r0, [r6, r0] + ldrb r2, [r2] + cmp r0, r2 + bhs _02227B90 + add r1, r1, r5 + add r1, #0x2c + strb r0, [r1] +_02227B90: + add r5, r5, #1 + cmp r5, #5 + blo _02227B5E + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02227B9C: .word 0x02229BB0 +_02227BA0: .word 0x0000114F +_02227BA4: .word 0x00001154 + thumb_func_end ov13_02227AC8 + + thumb_func_start ov13_02227BA8 +ov13_02227BA8: ; 0x02227BA8 + push {r3, r4} + ldr r2, _02227BD8 ; =0x0000114D + ldr r3, [r0, #0] + ldrb r2, [r0, r2] + add r3, r3, r2 + add r3, #0x2c + ldrb r4, [r3] + mov r3, #6 + mul r3, r4 + add r1, r1, r3 + lsl r3, r1, #2 + mov r1, #0x90 + mul r1, r2 + add r0, r0, r1 + add r1, r0, r3 + ldrh r0, [r1, #0x3c] + cmp r0, #0 + beq _02227BD2 + ldrh r1, [r1, #0x3e] + cmp r1, #0 + bne _02227BD4 +_02227BD2: + mov r0, #0 +_02227BD4: + pop {r3, r4} + bx lr + ; .align 2, 0 +_02227BD8: .word 0x0000114D + thumb_func_end ov13_02227BA8 + + .rodata + + + .global Unk_ov13_02229BB0 +Unk_ov13_02229BB0: ; 0x02229BB0 + .incbin "incbin/overlay13_rodata.bin", 0xEB4, 0x5 + diff --git a/asm/ov13_02227BDC.s b/asm/ov13_02227BDC.s new file mode 100644 index 000000000..3cda509ed --- /dev/null +++ b/asm/ov13_02227BDC.s @@ -0,0 +1,731 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02227BDC +ov13_02227BDC: ; 0x02227BDC + push {r4, lr} + add r4, r0, #0 + bl ov13_02227C08 + add r0, r4, #0 + bl ov13_02227C54 + add r0, r4, #0 + bl ov13_02227DE8 + add r0, r4, #0 + bl ov13_02227F7C + add r0, r4, #0 + bl ov13_02228070 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02227BDC + + thumb_func_start ov13_02227C08 +ov13_02227C08: ; 0x02227C08 + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _02227C50 ; =0x02229BE4 + add r2, sp, #0 + add r5, r0, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl ov16_0223E010 + add r4, r0, #0 + bl sub_0200C704 + mov r1, #0xc3 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r1, [r5, r1] + add r0, r4, #0 + mov r2, #0xc + bl sub_0200C7C0 + mov r1, #0xc3 + lsl r1, r1, #2 + ldr r1, [r5, r1] + add r0, r4, #0 + add r2, sp, #0 + bl sub_0200CB30 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_02227C50: .word 0x02229BE4 + thumb_func_end ov13_02227C08 + + thumb_func_start ov13_02227C54 +ov13_02227C54: ; 0x02227C54 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + ldr r1, [r6, #0] + mov r0, #0x10 + ldr r1, [r1, #0xc] + bl sub_02006C24 + add r7, r0, #0 + ldr r0, [r6, #0] + ldr r0, [r0, #0] + bl ov16_0223E010 + str r0, [sp, #0x18] + mov r4, #0 +_02227C72: + ldr r0, _02227D0C ; =0x0000B4B7 + add r5, r4, r0 + mov r0, #1 + add r1, r0, #0 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0xc3 + str r5, [sp, #8] + lsl r1, r1, #2 + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CC3C + mov r0, #1 + mov r1, #2 + bl sub_0207CE78 + str r7, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + mov r3, #0xc3 + str r5, [sp, #0x14] + lsl r3, r3, #2 + ldr r0, [r6, #8] + ldr r2, [sp, #0x18] + ldr r3, [r6, r3] + mov r1, #3 + bl sub_0200CDC4 + add r4, r4, #1 + cmp r4, #6 + blo _02227C72 + bl sub_0207CF40 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02227D0C ; =0x0000B4B7 + mov r1, #0xc3 + str r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CE24 + bl sub_0207CF44 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02227D0C ; =0x0000B4B7 + mov r1, #0xc3 + str r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [sp, #0x18] + ldr r1, [r6, r1] + add r2, r7, #0 + bl sub_0200CE54 + add r0, r7, #0 + bl sub_02006CA8 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02227D0C: .word 0x0000B4B7 + thumb_func_end ov13_02227C54 + + thumb_func_start ov13_02227D10 +ov13_02227D10: ; 0x02227D10 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + ldr r0, [r0, #0] + add r4, r2, #0 + bl ov16_0223E010 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r1, #0xc3 + str r4, [sp, #4] + lsl r1, r1, #2 + ldr r1, [r5, r1] + add r0, r7, #0 + mov r2, #0x10 + bl sub_0200D948 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02227D10 + + thumb_func_start ov13_02227D48 +ov13_02227D48: ; 0x02227D48 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r0, r1, #0 + mov r1, #2 + add r4, r2, #0 + bl sub_0207CE78 + add r2, r0, #0 + mov r0, #3 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + lsl r0, r4, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r3, [r5, #0] + ldr r0, [r5, #8] + ldr r3, [r3, #0xc] + mov r1, #0x10 + bl sub_02003050 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov13_02227D48 + + thumb_func_start ov13_02227D78 +ov13_02227D78: ; 0x02227D78 + push {r4, r5, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + ldr r0, [r0, #0] + bl ov16_0223E010 + mov r2, #0 + add r1, sp, #0 + strh r2, [r1] + strh r2, [r1, #2] + strh r2, [r1, #4] + strh r2, [r1, #6] + mov r1, #0x14 + ldr r3, _02227DD4 ; =0x02229CCC + mul r1, r4 + ldr r3, [r3, r1] + str r2, [sp, #0xc] + str r3, [sp, #8] + mov r3, #2 + str r3, [sp, #0x10] + ldr r3, _02227DD8 ; =0x02229CBC + str r2, [sp, #0x30] + ldr r3, [r3, r1] + add r2, sp, #0 + str r3, [sp, #0x14] + ldr r3, _02227DDC ; =0x02229CC0 + ldr r3, [r3, r1] + str r3, [sp, #0x18] + ldr r3, _02227DE0 ; =0x02229CC4 + ldr r3, [r3, r1] + str r3, [sp, #0x1c] + ldr r3, _02227DE4 ; =0x02229CC8 + ldr r1, [r3, r1] + str r1, [sp, #0x20] + mov r1, #1 + str r1, [sp, #0x2c] + mov r1, #0xc3 + lsl r1, r1, #2 + ldr r1, [r5, r1] + bl sub_0200CE6C + add sp, #0x34 + pop {r4, r5, pc} + nop +_02227DD4: .word 0x02229CCC +_02227DD8: .word 0x02229CBC +_02227DDC: .word 0x02229CC0 +_02227DE0: .word 0x02229CC4 +_02227DE4: .word 0x02229CC8 + thumb_func_end ov13_02227D78 + + thumb_func_start ov13_02227DE8 +ov13_02227DE8: ; 0x02227DE8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r7, #0x31 + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #4 +_02227DF4: + add r0, r6, #0 + add r1, r4, #0 + bl ov13_02227D78 + str r0, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blo _02227DF4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_02227DE8 + + thumb_func_start ov13_02227E08 +ov13_02227E08: ; 0x02227E08 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0] + ldr r0, [r0, #0] + bl ov16_0223E010 + mov r6, #0x31 + str r0, [sp] + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #4 +_02227E1E: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blo _02227E1E + add r0, r7, #0 + bl ov13_02227FDC + add r0, r7, #0 + bl ov13_022280C8 + mov r1, #0xc3 + lsl r1, r1, #2 + ldr r0, [sp] + ldr r1, [r7, r1] + bl sub_0200D0B0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02227E08 + + thumb_func_start ov13_02227E48 +ov13_02227E48: ; 0x02227E48 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + mov r1, #1 + add r6, r0, #0 + bl sub_0200D3F4 + lsl r1, r5, #0x10 + lsl r2, r4, #0x10 + add r0, r6, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov13_02227E48 + + thumb_func_start ov13_02227E68 +ov13_02227E68: ; 0x02227E68 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0x31 + str r0, [sp] + add r7, r1, #0 + mov r4, #0 + add r5, r0, #0 + lsl r6, r6, #4 +_02227E76: + ldr r0, [r5, r6] + mov r1, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blo _02227E76 + cmp r7, #0 + beq _02227E94 + cmp r7, #1 + beq _02227E9C + cmp r7, #2 + beq _02227EA4 + pop {r3, r4, r5, r6, r7, pc} +_02227E94: + ldr r0, [sp] + bl ov13_02227EAC + pop {r3, r4, r5, r6, r7, pc} +_02227E9C: + ldr r0, [sp] + bl ov13_02227EE0 + pop {r3, r4, r5, r6, r7, pc} +_02227EA4: + ldr r0, [sp] + bl ov13_02227F38 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov13_02227E68 + + thumb_func_start ov13_02227EAC +ov13_02227EAC: ; 0x02227EAC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + ldrh r1, [r1, #0x20] + cmp r1, #0 + beq _02227EDA + ldr r2, _02227EDC ; =0x0000B4B7 + bl ov13_02227D10 + ldr r1, [r4, #0] + ldr r3, _02227EDC ; =0x0000B4B7 + ldrh r1, [r1, #0x20] + add r0, r4, #0 + mov r2, #0 + bl ov13_02227D48 + mov r0, #0x31 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x18 + mov r2, #0xb2 + bl ov13_02227E48 +_02227EDA: + pop {r4, pc} + ; .align 2, 0 +_02227EDC: .word 0x0000B4B7 + thumb_func_end ov13_02227EAC + + thumb_func_start ov13_02227EE0 +ov13_02227EE0: ; 0x02227EE0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r6, _02227F30 ; =0x02229C44 + mov r4, #0 + add r7, r5, #0 +_02227EEA: + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02227BA8 + str r0, [sp] + cmp r0, #0 + beq _02227F22 + ldr r2, _02227F34 ; =0x0000B4B7 + ldr r1, [sp] + add r0, r5, #0 + add r2, r4, r2 + bl ov13_02227D10 + ldr r3, _02227F34 ; =0x0000B4B7 + lsl r2, r4, #0x10 + ldr r1, [sp] + add r0, r5, #0 + lsr r2, r2, #0x10 + add r3, r4, r3 + bl ov13_02227D48 + mov r0, #0x31 + lsl r0, r0, #4 + ldr r0, [r7, r0] + ldr r1, [r6, #0] + ldr r2, [r6, #4] + bl ov13_02227E48 +_02227F22: + add r4, r4, #1 + add r6, #8 + add r7, r7, #4 + cmp r4, #6 + blo _02227EEA + pop {r3, r4, r5, r6, r7, pc} + nop +_02227F30: .word 0x02229C44 +_02227F34: .word 0x0000B4B7 + thumb_func_end ov13_02227EE0 + + thumb_func_start ov13_02227F38 +ov13_02227F38: ; 0x02227F38 + push {r3, r4, r5, lr} + ldr r1, _02227F74 ; =0x0000114D + add r4, r0, #0 + ldrb r1, [r4, r1] + ldr r2, [r4, #0] + add r1, r2, r1 + add r1, #0x27 + ldrb r1, [r1] + bl ov13_02227BA8 + add r5, r0, #0 + ldr r2, _02227F78 ; =0x0000B4B7 + add r0, r4, #0 + add r1, r5, #0 + bl ov13_02227D10 + ldr r3, _02227F78 ; =0x0000B4B7 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov13_02227D48 + mov r0, #0x31 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x28 + mov r2, #0x2c + bl ov13_02227E48 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02227F74: .word 0x0000114D +_02227F78: .word 0x0000B4B7 + thumb_func_end ov13_02227F38 + + thumb_func_start ov13_02227F7C +ov13_02227F7C: ; 0x02227F7C + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl ov16_0223E010 + ldr r1, _02227FD8 ; =0x0000B4BE + add r4, r0, #0 + str r1, [sp] + str r1, [sp, #4] + sub r1, r1, #5 + str r1, [sp, #8] + str r1, [sp, #0xc] + mov r1, #0xc3 + ldr r3, [r5, #0] + lsl r1, r1, #2 + ldr r1, [r5, r1] + ldr r2, [r5, #8] + ldr r3, [r3, #0xc] + bl ov16_0226DB7C + ldr r3, _02227FD8 ; =0x0000B4BE + mov r1, #0xc3 + str r3, [sp] + sub r0, r3, #5 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r2, [r5, #0] + lsl r1, r1, #2 + ldr r1, [r5, r1] + ldr r2, [r2, #0xc] + add r0, r4, #0 + bl ov16_0226DC24 + add r1, r0, #0 + ldr r0, [r5, #0x34] + bl ov13_02228A64 + add sp, #0x14 + pop {r4, r5, pc} + nop +_02227FD8: .word 0x0000B4BE + thumb_func_end ov13_02227F7C + + thumb_func_start ov13_02227FDC +ov13_02227FDC: ; 0x02227FDC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x34] + bl ov13_02228A58 + bl ov16_0226DCA8 + ldr r3, _02228004 ; =0x0000B4B9 + mov r0, #0xc3 + add r1, r3, #5 + str r3, [sp] + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r2, r1, #0 + bl ov16_0226DBFC + add sp, #4 + pop {r3, r4, pc} + nop +_02228004: .word 0x0000B4B9 + thumb_func_end ov13_02227FDC + + thumb_func_start ov13_02228008 +ov13_02228008: ; 0x02228008 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, _02228048 ; =0x02229BC8 + lsl r2, r4, #2 + ldr r0, [r5, #0x34] + ldr r1, [r1, r2] + bl ov13_02228A9C + cmp r4, #0 + beq _02228026 + cmp r4, #1 + beq _02228032 + cmp r4, #2 + pop {r3, r4, r5, pc} +_02228026: + ldr r1, _0222804C ; =0x0000114D + ldr r0, [r5, #0x34] + ldrb r1, [r5, r1] + bl ov13_02228A68 + pop {r3, r4, r5, pc} +_02228032: + ldr r1, _0222804C ; =0x0000114D + ldr r2, [r5, #0] + ldrb r1, [r5, r1] + ldr r0, [r5, #0x34] + add r1, r2, r1 + add r1, #0x27 + ldrb r1, [r1] + bl ov13_02228A68 + pop {r3, r4, r5, pc} + nop +_02228048: .word 0x02229BC8 +_0222804C: .word 0x0000114D + thumb_func_end ov13_02228008 + + thumb_func_start ov13_02228050 +ov13_02228050: ; 0x02228050 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x34] + mov r1, #0 + bl ov13_02228A60 + ldr r0, [r4, #0x34] + bl ov13_02228A90 + ldr r0, [r4, #0x34] + bl ov13_02228A58 + bl ov16_0226DDE8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov13_02228050 + + thumb_func_start ov13_02228070 +ov13_02228070: ; 0x02228070 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl ov16_0223E010 + ldr r1, _022280C4 ; =0x0000B4BD + add r4, r0, #0 + str r1, [sp] + str r1, [sp, #4] + sub r1, r1, #5 + str r1, [sp, #8] + str r1, [sp, #0xc] + mov r1, #0xc3 + ldr r2, [r5, #0] + lsl r1, r1, #2 + ldr r1, [r5, r1] + ldr r2, [r2, #0xc] + ldr r3, [r5, #8] + bl ov16_0226DE44 + ldr r3, _022280C4 ; =0x0000B4BD + mov r1, #0xc3 + str r3, [sp] + sub r0, r3, #5 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r2, [r5, #0] + lsl r1, r1, #2 + ldr r1, [r5, r1] + ldr r2, [r2, #0xc] + add r0, r4, #0 + bl ov16_0226DEEC + str r0, [r5, #0x38] + add sp, #0x14 + pop {r4, r5, pc} + nop +_022280C4: .word 0x0000B4BD + thumb_func_end ov13_02228070 + + thumb_func_start ov13_022280C8 +ov13_022280C8: ; 0x022280C8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x38] + bl ov16_0226DF68 + ldr r3, _022280EC ; =0x0000B4B8 + mov r0, #0xc3 + add r1, r3, #5 + str r3, [sp] + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r2, r1, #0 + bl ov16_0226DEC4 + add sp, #4 + pop {r3, r4, pc} + nop +_022280EC: .word 0x0000B4B8 + thumb_func_end ov13_022280C8 + + thumb_func_start ov13_022280F0 +ov13_022280F0: ; 0x022280F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x14] + cmp r0, #1 + bne _02228116 + lsl r3, r1, #3 + ldr r1, _02228120 ; =0x02229BFC + ldr r2, _02228124 ; =0x02229C00 + ldr r0, [r4, #0x38] + ldr r1, [r1, r3] + ldr r2, [r2, r3] + bl ov16_0226DFB0 + ldr r0, [r4, #0x38] + mov r1, #0x3c + bl ov16_0226DFD0 + pop {r4, pc} +_02228116: + ldr r0, [r4, #0x38] + bl ov16_0226DFBC + pop {r4, pc} + nop +_02228120: .word 0x02229BFC +_02228124: .word 0x02229C00 + thumb_func_end ov13_022280F0 + + .rodata + + + .global Unk_ov13_02229BB8 +Unk_ov13_02229BB8: ; 0x02229BB8 + .incbin "incbin/overlay13_rodata.bin", 0xEBC, 0xEC4 - 0xEBC + + .global Unk_ov13_02229BC0 +Unk_ov13_02229BC0: ; 0x02229BC0 + .incbin "incbin/overlay13_rodata.bin", 0xEC4, 0xECC - 0xEC4 + + .global Unk_ov13_02229BC8 +Unk_ov13_02229BC8: ; 0x02229BC8 + .incbin "incbin/overlay13_rodata.bin", 0xECC, 0xED8 - 0xECC + + .global Unk_ov13_02229BD4 +Unk_ov13_02229BD4: ; 0x02229BD4 + .incbin "incbin/overlay13_rodata.bin", 0xED8, 0xEE8 - 0xED8 + + .global Unk_ov13_02229BE4 +Unk_ov13_02229BE4: ; 0x02229BE4 + .incbin "incbin/overlay13_rodata.bin", 0xEE8, 0xF00 - 0xEE8 + + .global Unk_ov13_02229BFC +Unk_ov13_02229BFC: ; 0x02229BFC + .incbin "incbin/overlay13_rodata.bin", 0xF00, 0xF18 - 0xF00 + + .global Unk_ov13_02229C14 +Unk_ov13_02229C14: ; 0x02229C14 + .incbin "incbin/overlay13_rodata.bin", 0xF18, 0xF48 - 0xF18 + + .global Unk_ov13_02229C44 +Unk_ov13_02229C44: ; 0x02229C44 + .incbin "incbin/overlay13_rodata.bin", 0xF48, 0xF78 - 0xF48 + + .global Unk_ov13_02229C74 +Unk_ov13_02229C74: ; 0x02229C74 + .incbin "incbin/overlay13_rodata.bin", 0xF78, 0xFC0 - 0xF78 + + .global Unk_ov13_02229CBC +Unk_ov13_02229CBC: ; 0x02229CBC + .incbin "incbin/overlay13_rodata.bin", 0xFC0, 0x78 + diff --git a/asm/ov13_02228128.s b/asm/ov13_02228128.s new file mode 100644 index 000000000..3cd2a5e9e --- /dev/null +++ b/asm/ov13_02228128.s @@ -0,0 +1,1233 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02228128 +ov13_02228128: ; 0x02228128 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #0xca + lsl r0, r0, #2 + mov r2, #0 + add r0, r5, r0 + add r3, r2, #0 + add r4, r1, #0 + bl ov13_02228460 + mov r0, #0x10 + str r0, [sp] + ldr r0, _022283E4 ; =0x00000448 + mov r3, #9 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + str r3, [sp, #4] + bl ov13_02228460 + mov r0, #0x10 + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + ldr r0, _022283E8 ; =0x00000568 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x12 + bl ov13_02228460 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _022283EC ; =0x00000688 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x1b + bl ov13_02228460 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _022283F0 ; =0x0000078C + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x20 + bl ov13_02228460 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #0x89 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + mov r2, #0 + mov r3, #0x25 + bl ov13_02228460 + mov r0, #0x1a + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r0, _022283F4 ; =0x00000994 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x25 + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022283F8 ; =0x00000A98 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x39 + bl ov13_02228460 + ldr r0, _022283FC ; =0x00000ACA + mov r2, #5 + str r2, [sp] + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x39 + str r2, [sp, #4] + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228400 ; =0x00000AFC + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xa + mov r3, #0x39 + bl ov13_02228460 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _02228404 ; =0x00000B2E + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0 + bl ov13_02228460 + ldr r0, _02228408 ; =0x00000BEE + mov r2, #0x10 + str r2, [sp] + mov r3, #6 + add r0, r5, r0 + add r1, r4, #0 + str r3, [sp, #4] + bl ov13_02228460 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _0222840C ; =0x00000CAE + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0xc + bl ov13_02228460 + mov r2, #0x10 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _02228410 ; =0x00000D6E + add r1, r4, #0 + add r0, r5, r0 + mov r3, #0x12 + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228414 ; =0x00000E2E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x2f + bl ov13_02228460 + mov r0, #0xe6 + mov r2, #5 + lsl r0, r0, #4 + str r2, [sp] + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x2f + str r2, [sp, #4] + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228418 ; =0x00000E92 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xa + mov r3, #0x2f + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222841C ; =0x00000EC4 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xf + mov r3, #0x2f + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228420 ; =0x00000EF6 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + mov r3, #0x34 + bl ov13_02228460 + ldr r0, _02228424 ; =0x00000F28 + mov r2, #5 + str r2, [sp] + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0x34 + str r2, [sp, #4] + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228428 ; =0x00000F5A + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xa + mov r3, #0x34 + bl ov13_02228460 + mov r0, #5 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222842C ; =0x00000F8C + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0xf + mov r3, #0x34 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228430 ; =0x00000FBE + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x2f + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228434 ; =0x00000FDE + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x18 + mov r3, #0x2f + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228438 ; =0x00000FFE + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1c + mov r3, #0x2f + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222843C ; =0x0000101E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x33 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228440 ; =0x0000103E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x18 + mov r3, #0x33 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228444 ; =0x0000105E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1c + mov r3, #0x33 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228448 ; =0x0000107E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x37 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222844C ; =0x0000109E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x18 + mov r3, #0x37 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228450 ; =0x000010BE + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1c + mov r3, #0x37 + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228454 ; =0x000010DE + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x14 + mov r3, #0x3b + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02228458 ; =0x000010FE + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x18 + mov r3, #0x3b + bl ov13_02228460 + mov r0, #4 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0222845C ; =0x0000111E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0x1c + mov r3, #0x3b + bl ov13_02228460 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022283E4: .word 0x00000448 +_022283E8: .word 0x00000568 +_022283EC: .word 0x00000688 +_022283F0: .word 0x0000078C +_022283F4: .word 0x00000994 +_022283F8: .word 0x00000A98 +_022283FC: .word 0x00000ACA +_02228400: .word 0x00000AFC +_02228404: .word 0x00000B2E +_02228408: .word 0x00000BEE +_0222840C: .word 0x00000CAE +_02228410: .word 0x00000D6E +_02228414: .word 0x00000E2E +_02228418: .word 0x00000E92 +_0222841C: .word 0x00000EC4 +_02228420: .word 0x00000EF6 +_02228424: .word 0x00000F28 +_02228428: .word 0x00000F5A +_0222842C: .word 0x00000F8C +_02228430: .word 0x00000FBE +_02228434: .word 0x00000FDE +_02228438: .word 0x00000FFE +_0222843C: .word 0x0000101E +_02228440: .word 0x0000103E +_02228444: .word 0x0000105E +_02228448: .word 0x0000107E +_0222844C: .word 0x0000109E +_02228450: .word 0x000010BE +_02228454: .word 0x000010DE +_02228458: .word 0x000010FE +_0222845C: .word 0x0000111E + thumb_func_end ov13_02228128 + + thumb_func_start ov13_02228460 +ov13_02228460: ; 0x02228460 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r0, sp, #8 + mov lr, r3 + ldrb r3, [r0, #0x14] + mov r6, #0 + mov ip, r3 + cmp r3, #0 + ble _022284AC + ldrb r3, [r0, #0x10] + lsl r2, r2, #1 + add r7, r1, r2 +_02228478: + mov r2, #0 + cmp r3, #0 + ble _022284A0 + mov r0, lr + add r0, r0, r6 + lsl r0, r0, #6 + add r5, r7, r0 + add r0, r6, #0 + mul r0, r3 + lsl r1, r0, #1 + ldr r0, [sp] + add r4, r0, r1 +_02228490: + lsl r1, r2, #1 + ldrh r0, [r5, r1] + strh r0, [r4, r1] + add r0, r2, #1 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + cmp r2, r3 + blt _02228490 +_022284A0: + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + mov r0, ip + cmp r6, r0 + blt _02228478 +_022284AC: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_02228460 + + thumb_func_start ov13_022284B0 +ov13_022284B0: ; 0x022284B0 + cmp r1, #0x10 + bhi _0222853E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022284C0: ; jump table + .short _022284E2 - _022284C0 - 2 ; case 0 + .short _022284E2 - _022284C0 - 2 ; case 1 + .short _022284E2 - _022284C0 - 2 ; case 2 + .short _022284E2 - _022284C0 - 2 ; case 3 + .short _022284F2 - _022284C0 - 2 ; case 4 + .short _02228500 - _022284C0 - 2 ; case 5 + .short _0222850C - _022284C0 - 2 ; case 6 + .short _0222850C - _022284C0 - 2 ; case 7 + .short _0222850C - _022284C0 - 2 ; case 8 + .short _0222850C - _022284C0 - 2 ; case 9 + .short _0222850C - _022284C0 - 2 ; case 10 + .short _0222850C - _022284C0 - 2 ; case 11 + .short _02228518 - _022284C0 - 2 ; case 12 + .short _02228524 - _022284C0 - 2 ; case 13 + .short _02228500 - _022284C0 - 2 ; case 14 + .short _02228530 - _022284C0 - 2 ; case 15 + .short _02228500 - _022284C0 - 2 ; case 16 +_022284E2: + mov r1, #0xca + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0x12 + lsl r0, r0, #4 + mul r0, r2 + add r0, r1, r0 + bx lr +_022284F2: + ldr r1, _02228544 ; =0x00000688 + add r1, r0, r1 + lsl r0, r2, #6 + add r0, r2, r0 + lsl r0, r0, #2 + add r0, r1, r0 + bx lr +_02228500: + ldr r1, _02228548 ; =0x00000A98 + add r1, r0, r1 + mov r0, #0x32 + mul r0, r2 + add r0, r1, r0 + bx lr +_0222850C: + ldr r1, _0222854C ; =0x00000B2E + add r1, r0, r1 + mov r0, #0xc0 + mul r0, r2 + add r0, r1, r0 + bx lr +_02228518: + ldr r1, _02228550 ; =0x00000E2E + add r1, r0, r1 + mov r0, #0x32 + mul r0, r2 + add r0, r1, r0 + bx lr +_02228524: + ldr r1, _02228554 ; =0x00000EF6 + add r1, r0, r1 + mov r0, #0x32 + mul r0, r2 + add r0, r1, r0 + bx lr +_02228530: + ldr r1, _02228544 ; =0x00000688 + add r1, r0, r1 + lsl r0, r2, #6 + add r0, r2, r0 + lsl r0, r0, #2 + add r0, r1, r0 + bx lr +_0222853E: + mov r0, #0 + bx lr + nop +_02228544: .word 0x00000688 +_02228548: .word 0x00000A98 +_0222854C: .word 0x00000B2E +_02228550: .word 0x00000E2E +_02228554: .word 0x00000EF6 + thumb_func_end ov13_022284B0 + + thumb_func_start ov13_02228558 +ov13_02228558: ; 0x02228558 + cmp r2, #3 + bne _02228560 + mov r0, #5 + bx lr +_02228560: + cmp r1, #0x10 + bhi _022285BE + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02228570: ; jump table + .short _02228592 - _02228570 - 2 ; case 0 + .short _02228592 - _02228570 - 2 ; case 1 + .short _02228592 - _02228570 - 2 ; case 2 + .short _02228592 - _02228570 - 2 ; case 3 + .short _02228596 - _02228570 - 2 ; case 4 + .short _0222859A - _02228570 - 2 ; case 5 + .short _0222859E - _02228570 - 2 ; case 6 + .short _0222859E - _02228570 - 2 ; case 7 + .short _0222859E - _02228570 - 2 ; case 8 + .short _0222859E - _02228570 - 2 ; case 9 + .short _0222859E - _02228570 - 2 ; case 10 + .short _0222859E - _02228570 - 2 ; case 11 + .short _0222859A - _02228570 - 2 ; case 12 + .short _0222859A - _02228570 - 2 ; case 13 + .short _0222859A - _02228570 - 2 ; case 14 + .short _022285AA - _02228570 - 2 ; case 15 + .short _0222859A - _02228570 - 2 ; case 16 +_02228592: + mov r0, #0 + bx lr +_02228596: + mov r0, #3 + bx lr +_0222859A: + mov r0, #2 + bx lr +_0222859E: + ldr r1, _022285C4 ; =0x0000114D + ldrb r0, [r0, r1] + add r0, #8 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bx lr +_022285AA: + cmp r3, #2 + bne _022285BA + ldr r1, _022285C4 ; =0x0000114D + ldrb r0, [r0, r1] + add r0, #8 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bx lr +_022285BA: + mov r0, #1 + bx lr +_022285BE: + mov r0, #0 + bx lr + nop +_022285C4: .word 0x0000114D + thumb_func_end ov13_02228558 + + thumb_func_start ov13_022285C8 +ov13_022285C8: ; 0x022285C8 + push {r4, r5, r6, r7} + cmp r2, #0 + bne _022285D8 + ldr r2, _0222862C ; =0x00000FBE + add r2, r0, r2 + lsl r0, r3, #5 + add r0, r2, r0 + b _02228600 +_022285D8: + cmp r2, #1 + bne _022285E6 + ldr r2, _02228630 ; =0x0000101E + add r2, r0, r2 + lsl r0, r3, #5 + add r0, r2, r0 + b _02228600 +_022285E6: + cmp r2, #2 + bne _022285F4 + ldr r2, _02228634 ; =0x0000107E + add r2, r0, r2 + lsl r0, r3, #5 + add r0, r2, r0 + b _02228600 +_022285F4: + cmp r2, #3 + bne _02228628 + ldr r2, _02228638 ; =0x000010DE + add r2, r0, r2 + lsl r0, r3, #5 + add r0, r2, r0 +_02228600: + mov r2, #0 +_02228602: + lsl r4, r2, #3 + lsl r5, r2, #5 + mov r3, #0 + add r4, r0, r4 + add r5, r1, r5 +_0222860C: + lsl r6, r3, #1 + ldrh r7, [r4, r6] + add r3, r3, #1 + lsl r3, r3, #0x10 + add r6, r5, r6 + lsr r3, r3, #0x10 + strh r7, [r6, #0xc] + cmp r3, #4 + blo _0222860C + add r2, r2, #1 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + cmp r2, #4 + blo _02228602 +_02228628: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_0222862C: .word 0x00000FBE +_02228630: .word 0x0000101E +_02228634: .word 0x0000107E +_02228638: .word 0x000010DE + thumb_func_end ov13_022285C8 + + thumb_func_start ov13_0222863C +ov13_0222863C: ; 0x0222863C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r2, [sp, #4] + str r3, [sp, #8] + add r5, r1, #0 + ldr r1, [sp, #4] + ldr r2, [sp, #8] + str r0, [sp] + bl ov13_022284B0 + add r3, sp, #0x10 + add r4, r0, #0 + ldrb r3, [r3, #0x10] + ldr r0, [sp] + ldr r1, [sp, #4] + ldr r2, [sp, #8] + bl ov13_02228558 + lsl r0, r0, #0x1c + lsr r2, r0, #0x10 + ldr r0, [sp, #4] + ldr r6, _022286A8 ; =0x02229D7F + lsl r3, r0, #2 + ldr r0, _022286AC ; =0x02229D7E + ldrb r6, [r6, r3] + ldrb r0, [r0, r3] + mov r1, #0 + mul r6, r0 + cmp r6, #0 + ble _02228698 + ldr r0, _022286B0 ; =0x02229D7C + ldr r7, _022286B4 ; =0x00000FFF + add r3, r0, r3 +_0222867E: + lsl r0, r1, #1 + ldrh r6, [r4, r0] + and r6, r7 + orr r6, r2 + strh r6, [r5, r0] + add r0, r1, #1 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldrb r6, [r3, #2] + ldrb r0, [r3, #3] + mul r0, r6 + cmp r1, r0 + blt _0222867E +_02228698: + ldr r0, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r1, r5, #0 + bl ov13_022285C8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022286A8: .word 0x02229D7F +_022286AC: .word 0x02229D7E +_022286B0: .word 0x02229D7C +_022286B4: .word 0x00000FFF + thumb_func_end ov13_0222863C + + thumb_func_start ov13_022286B8 +ov13_022286B8: ; 0x022286B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r1, [sp, #0xc] + str r2, [sp, #0x10] + str r3, [sp, #0x14] + add r5, r0, #0 + ldr r0, [sp, #0xc] + lsl r4, r0, #2 + ldr r0, _0222871C ; =0x02229D7F + ldrb r7, [r0, r4] + ldr r0, _02228720 ; =0x02229D7E + ldrb r6, [r0, r4] + ldr r0, [r5, #0] + add r1, r6, #0 + mul r1, r7 + ldr r0, [r0, #0xc] + lsl r1, r1, #1 + bl sub_02018144 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + add r0, r5, #0 + bl ov13_0222863C + ldr r0, _02228724 ; =0x02229D7D + ldr r3, _02228728 ; =0x02229D7C + ldrb r0, [r0, r4] + ldrb r3, [r3, r4] + ldr r2, [sp, #0x18] + str r0, [sp] + str r6, [sp, #4] + str r7, [sp, #8] + ldr r0, [r5, #4] + mov r1, #6 + bl sub_020198C0 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_0201C3C0 + ldr r0, [sp, #0x18] + bl sub_020181C4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0222871C: .word 0x02229D7F +_02228720: .word 0x02229D7E +_02228724: .word 0x02229D7D +_02228728: .word 0x02229D7C + thumb_func_end ov13_022286B8 + + thumb_func_start ov13_0222872C +ov13_0222872C: ; 0x0222872C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + cmp r1, #6 + blo _0222874A + cmp r1, #0xb + bhi _0222874A + add r0, #0x31 + ldrb r0, [r0] + cmp r0, #0 + bne _0222874A + add r1, #0xb + ldr r0, _022287A0 ; =0x02229DC0 + lsl r1, r1, #2 + ldr r4, [r0, r1] + b _02228750 +_0222874A: + ldr r0, _022287A0 ; =0x02229DC0 + lsl r1, r1, #2 + ldr r4, [r0, r1] +_02228750: + cmp r4, #0 + beq _0222879C + cmp r2, #0 + beq _02228760 + cmp r2, #1 + beq _02228768 + cmp r2, #2 + bne _0222876E +_02228760: + mov r0, #1 + str r0, [sp] + mov r7, #2 + b _0222876E +_02228768: + mov r0, #0 + str r0, [sp] + mov r7, #4 +_0222876E: + mov r5, #0 +_02228770: + ldrb r0, [r4, r5] + cmp r0, #0xff + beq _0222879C + ldr r1, [r6, #0x2c] + lsl r0, r0, #4 + add r0, r1, r0 + ldr r1, [sp] + add r2, r7, #0 + mov r3, #0 + bl sub_0201C04C + ldrb r0, [r4, r5] + ldr r1, [r6, #0x2c] + lsl r0, r0, #4 + add r0, r1, r0 + bl sub_0201A9A4 + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #8 + blo _02228770 +_0222879C: + pop {r3, r4, r5, r6, r7, pc} + nop +_022287A0: .word 0x02229DC0 + thumb_func_end ov13_0222872C + + thumb_func_start ov13_022287A4 +ov13_022287A4: ; 0x022287A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + cmp r1, #6 + blo _022287C0 + cmp r1, #0xb + bhi _022287C0 + sub r0, r1, #6 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x31 + lsl r0, r0, #4 + ldr r6, [r1, r0] + b _022287E4 +_022287C0: + cmp r1, #4 + bne _02228808 + mov r7, #0x31 + mov r4, #0 + lsl r7, r7, #4 +_022287CA: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r6, [r0, r7] + add r0, r6, #0 + bl sub_0200D408 + cmp r0, #0 + bne _022287E4 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #6 + blo _022287CA +_022287E4: + ldr r0, [sp] + cmp r0, #0 + beq _022287F2 + cmp r0, #1 + beq _022287FE + cmp r0, #2 + bne _02228808 +_022287F2: + add r0, r6, #0 + mov r1, #0 + mov r2, #2 + bl sub_0200D5DC + pop {r3, r4, r5, r6, r7, pc} +_022287FE: + mov r1, #0 + add r0, r6, #0 + sub r2, r1, #4 + bl sub_0200D5DC +_02228808: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov13_022287A4 + + thumb_func_start ov13_0222880C +ov13_0222880C: ; 0x0222880C + push {r4, r5} + ldr r3, _02228844 ; =0x0000113E + mov r5, #0 + strb r5, [r0, r3] + add r4, r3, #1 + strb r5, [r0, r4] + add r4, r3, #2 + strb r1, [r0, r4] + add r1, r3, #3 + ldrb r4, [r0, r1] + mov r1, #0xf0 + bic r4, r1 + lsl r1, r2, #0x1c + lsr r1, r1, #0x18 + add r2, r4, #0 + orr r2, r1 + add r1, r3, #3 + strb r2, [r0, r1] + ldrb r2, [r0, r1] + mov r1, #0xf + bic r2, r1 + mov r1, #1 + orr r2, r1 + add r1, r3, #3 + strb r2, [r0, r1] + pop {r4, r5} + bx lr + nop +_02228844: .word 0x0000113E + thumb_func_end ov13_0222880C + + thumb_func_start ov13_02228848 +ov13_02228848: ; 0x02228848 + push {r4, lr} + ldr r3, _0222891C ; =0x00001141 + add r4, r0, #0 + ldrb r1, [r4, r3] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + beq _02228918 + sub r1, r3, #3 + ldrb r1, [r4, r1] + cmp r1, #0 + beq _02228868 + cmp r1, #1 + beq _022288A0 + cmp r1, #2 + beq _022288D8 + pop {r4, pc} +_02228868: + sub r1, r3, #1 + add r3, #0xb + ldrb r1, [r4, r1] + ldrb r3, [r4, r3] + mov r2, #1 + bl ov13_022286B8 + mov r1, #0x45 + lsl r1, r1, #6 + ldrb r1, [r4, r1] + add r0, r4, #0 + mov r2, #1 + bl ov13_0222872C + mov r1, #0x45 + lsl r1, r1, #6 + ldrb r1, [r4, r1] + add r0, r4, #0 + mov r2, #1 + bl ov13_022287A4 + ldr r0, _02228920 ; =0x0000113F + mov r1, #0 + strb r1, [r4, r0] + mov r1, #1 + sub r0, r0, #1 + strb r1, [r4, r0] + pop {r4, pc} +_022288A0: + sub r1, r3, #1 + add r3, #0xb + ldrb r1, [r4, r1] + ldrb r3, [r4, r3] + mov r2, #2 + bl ov13_022286B8 + mov r1, #0x45 + lsl r1, r1, #6 + ldrb r1, [r4, r1] + add r0, r4, #0 + mov r2, #2 + bl ov13_0222872C + mov r1, #0x45 + lsl r1, r1, #6 + ldrb r1, [r4, r1] + add r0, r4, #0 + mov r2, #2 + bl ov13_022287A4 + ldr r0, _02228920 ; =0x0000113F + mov r1, #0 + strb r1, [r4, r0] + mov r1, #2 + sub r0, r0, #1 + strb r1, [r4, r0] + pop {r4, pc} +_022288D8: + sub r1, r3, #1 + add r3, #0xb + ldrb r1, [r4, r1] + ldrb r3, [r4, r3] + mov r2, #0 + bl ov13_022286B8 + mov r1, #0x45 + lsl r1, r1, #6 + ldrb r1, [r4, r1] + add r0, r4, #0 + mov r2, #0 + bl ov13_0222872C + mov r1, #0x45 + lsl r1, r1, #6 + ldrb r1, [r4, r1] + add r0, r4, #0 + mov r2, #0 + bl ov13_022287A4 + ldr r0, _02228920 ; =0x0000113F + mov r2, #0 + strb r2, [r4, r0] + sub r1, r0, #1 + strb r2, [r4, r1] + add r1, r0, #2 + ldrb r2, [r4, r1] + mov r1, #0xf + add r0, r0, #2 + bic r2, r1 + strb r2, [r4, r0] +_02228918: + pop {r4, pc} + nop +_0222891C: .word 0x00001141 +_02228920: .word 0x0000113F + thumb_func_end ov13_02228848 + + thumb_func_start ov13_02228924 +ov13_02228924: ; 0x02228924 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + beq _02228936 + cmp r6, #1 + beq _02228994 + cmp r6, #2 + beq _02228A1A + pop {r3, r4, r5, r6, r7, pc} +_02228936: + mov r1, #0 + add r2, r1, #0 + add r3, r6, #0 + bl ov13_022286B8 + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + add r0, r5, #0 + mov r1, #2 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + add r0, r5, #0 + mov r1, #3 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + ldr r0, [r5, #0] + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0222897A + add r0, r5, #0 + mov r1, #4 + mov r2, #3 + add r3, r6, #0 + bl ov13_022286B8 + b _02228986 +_0222897A: + add r0, r5, #0 + mov r1, #4 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 +_02228986: + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + pop {r3, r4, r5, r6, r7, pc} +_02228994: + mov r4, #0 + mov r7, #3 +_02228998: + add r0, r5, #0 + add r1, r4, #0 + bl ov13_02227BA8 + cmp r0, #0 + bne _022289B6 + add r1, r4, #6 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r2, r7, #0 + add r3, r6, #0 + bl ov13_022286B8 + b _022289C6 +_022289B6: + add r1, r4, #6 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 +_022289C6: + add r4, r4, #1 + cmp r4, #6 + blo _02228998 + ldr r0, _02228A34 ; =0x0000114D + ldrb r1, [r5, r0] + add r0, r0, #7 + add r1, r5, r1 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _022289F4 + add r0, r5, #0 + mov r1, #0xc + mov r2, #3 + add r3, r6, #0 + bl ov13_022286B8 + add r0, r5, #0 + mov r1, #0xd + mov r2, #3 + add r3, r6, #0 + bl ov13_022286B8 + b _02228A0C +_022289F4: + add r0, r5, #0 + mov r1, #0xc + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + add r0, r5, #0 + mov r1, #0xd + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 +_02228A0C: + add r0, r5, #0 + mov r1, #0xe + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + pop {r3, r4, r5, r6, r7, pc} +_02228A1A: + mov r1, #0xf + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + add r0, r5, #0 + mov r1, #0x10 + mov r2, #0 + add r3, r6, #0 + bl ov13_022286B8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02228A34: .word 0x0000114D + thumb_func_end ov13_02228924 + + .rodata + + + .global Unk_ov13_02229D34 +Unk_ov13_02229D34: ; 0x02229D34 + .incbin "incbin/overlay13_rodata.bin", 0x1038, 0x103C - 0x1038 + + .global Unk_ov13_02229D38 +Unk_ov13_02229D38: ; 0x02229D38 + .incbin "incbin/overlay13_rodata.bin", 0x103C, 0x1040 - 0x103C + + .global Unk_ov13_02229D3C +Unk_ov13_02229D3C: ; 0x02229D3C + .incbin "incbin/overlay13_rodata.bin", 0x1040, 0x1044 - 0x1040 + + .global Unk_ov13_02229D40 +Unk_ov13_02229D40: ; 0x02229D40 + .incbin "incbin/overlay13_rodata.bin", 0x1044, 0x1048 - 0x1044 + + .global Unk_ov13_02229D44 +Unk_ov13_02229D44: ; 0x02229D44 + .incbin "incbin/overlay13_rodata.bin", 0x1048, 0x104C - 0x1048 + + .global Unk_ov13_02229D48 +Unk_ov13_02229D48: ; 0x02229D48 + .incbin "incbin/overlay13_rodata.bin", 0x104C, 0x1050 - 0x104C + + .global Unk_ov13_02229D4C +Unk_ov13_02229D4C: ; 0x02229D4C + .incbin "incbin/overlay13_rodata.bin", 0x1050, 0x1054 - 0x1050 + + .global Unk_ov13_02229D50 +Unk_ov13_02229D50: ; 0x02229D50 + .incbin "incbin/overlay13_rodata.bin", 0x1054, 0x1058 - 0x1054 + + .global Unk_ov13_02229D54 +Unk_ov13_02229D54: ; 0x02229D54 + .incbin "incbin/overlay13_rodata.bin", 0x1058, 0x105C - 0x1058 + + .global Unk_ov13_02229D58 +Unk_ov13_02229D58: ; 0x02229D58 + .incbin "incbin/overlay13_rodata.bin", 0x105C, 0x1060 - 0x105C + + .global Unk_ov13_02229D5C +Unk_ov13_02229D5C: ; 0x02229D5C + .incbin "incbin/overlay13_rodata.bin", 0x1060, 0x1064 - 0x1060 + + .global Unk_ov13_02229D60 +Unk_ov13_02229D60: ; 0x02229D60 + .incbin "incbin/overlay13_rodata.bin", 0x1064, 0x1068 - 0x1064 + + .global Unk_ov13_02229D64 +Unk_ov13_02229D64: ; 0x02229D64 + .incbin "incbin/overlay13_rodata.bin", 0x1068, 0x106C - 0x1068 + + .global Unk_ov13_02229D68 +Unk_ov13_02229D68: ; 0x02229D68 + .incbin "incbin/overlay13_rodata.bin", 0x106C, 0x1070 - 0x106C + + .global Unk_ov13_02229D6C +Unk_ov13_02229D6C: ; 0x02229D6C + .incbin "incbin/overlay13_rodata.bin", 0x1070, 0x1074 - 0x1070 + + .global Unk_ov13_02229D70 +Unk_ov13_02229D70: ; 0x02229D70 + .incbin "incbin/overlay13_rodata.bin", 0x1074, 0x1078 - 0x1074 + + .global Unk_ov13_02229D74 +Unk_ov13_02229D74: ; 0x02229D74 + .incbin "incbin/overlay13_rodata.bin", 0x1078, 0x107C - 0x1078 + + .global Unk_ov13_02229D78 +Unk_ov13_02229D78: ; 0x02229D78 + .incbin "incbin/overlay13_rodata.bin", 0x107C, 0x1080 - 0x107C + + .global Unk_ov13_02229D7C +Unk_ov13_02229D7C: ; 0x02229D7C + .incbin "incbin/overlay13_rodata.bin", 0x1080, 0x10C4 - 0x1080 + + .global Unk_ov13_02229DC0 +Unk_ov13_02229DC0: ; 0x02229DC0 + .incbin "incbin/overlay13_rodata.bin", 0x10C4, 0x5C + diff --git a/asm/ov13_02228A38.s b/asm/ov13_02228A38.s new file mode 100644 index 000000000..0c6590c28 --- /dev/null +++ b/asm/ov13_02228A38.s @@ -0,0 +1,420 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov13_02228A38 +ov13_02228A38: ; 0x02228A38 + push {r3, lr} + mov r1, #0x10 + bl sub_02018144 + add r3, r0, #0 + mov r2, #0x10 + mov r1, #0 +_02228A46: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _02228A46 + pop {r3, pc} + thumb_func_end ov13_02228A38 + + thumb_func_start ov13_02228A50 +ov13_02228A50: ; 0x02228A50 + ldr r3, _02228A54 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_02228A54: .word sub_020181C4 + thumb_func_end ov13_02228A50 + + thumb_func_start ov13_02228A58 +ov13_02228A58: ; 0x02228A58 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov13_02228A58 + + thumb_func_start ov13_02228A5C +ov13_02228A5C: ; 0x02228A5C + ldrb r0, [r0, #8] + bx lr + thumb_func_end ov13_02228A5C + + thumb_func_start ov13_02228A60 +ov13_02228A60: ; 0x02228A60 + strb r1, [r0, #8] + bx lr + thumb_func_end ov13_02228A60 + + thumb_func_start ov13_02228A64 +ov13_02228A64: ; 0x02228A64 + str r1, [r0, #0] + bx lr + thumb_func_end ov13_02228A64 + + thumb_func_start ov13_02228A68 +ov13_02228A68: ; 0x02228A68 + push {r3, r4, lr} + sub sp, #4 + strb r1, [r0, #9] + ldrb r1, [r0, #8] + cmp r1, #1 + bne _02228A8C + ldrb r1, [r0, #9] + ldr r2, [r0, #4] + lsl r4, r1, #3 + add r3, r2, r4 + ldrb r1, [r3, #3] + str r1, [sp] + ldrb r1, [r2, r4] + ldrb r2, [r3, #2] + ldrb r3, [r3, #1] + ldr r0, [r0, #0] + bl ov16_0226DD7C +_02228A8C: + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov13_02228A68 + + thumb_func_start ov13_02228A90 +ov13_02228A90: ; 0x02228A90 + mov r1, #0 + strb r1, [r0, #9] + mov r1, #0xff + strb r1, [r0, #0xa] + bx lr + ; .align 2, 0 + thumb_func_end ov13_02228A90 + + thumb_func_start ov13_02228A9C +ov13_02228A9C: ; 0x02228A9C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + bl ov13_02228A90 + mov r0, #0 + str r5, [r4, #4] + mvn r0, r0 + str r0, [r4, #0xc] + ldrb r0, [r4, #8] + cmp r0, #1 + bne _02228AC6 + ldr r3, [r4, #4] + ldrb r0, [r3, #3] + str r0, [sp] + ldrb r1, [r3] + ldrb r2, [r3, #2] + ldrb r3, [r3, #1] + ldr r0, [r4, #0] + bl ov16_0226DD7C +_02228AC6: + pop {r3, r4, r5, pc} + thumb_func_end ov13_02228A9C + + thumb_func_start ov13_02228AC8 +ov13_02228AC8: ; 0x02228AC8 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov13_02228AC8 + + thumb_func_start ov13_02228ACC +ov13_02228ACC: ; 0x02228ACC + push {r3, r4, lr} + sub sp, #4 + ldrb r1, [r0, #8] + cmp r1, #1 + bne _02228ADC + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_02228ADC: + ldr r1, _02228B10 ; =0x021BF67C + ldr r2, [r1, #0x48] + mov r1, #0xf3 + tst r1, r2 + beq _02228B08 + mov r1, #1 + strb r1, [r0, #8] + ldrb r1, [r0, #9] + ldr r2, [r0, #4] + lsl r4, r1, #3 + add r3, r2, r4 + ldrb r1, [r3, #3] + str r1, [sp] + ldrb r1, [r2, r4] + ldrb r2, [r3, #2] + ldrb r3, [r3, #1] + ldr r0, [r0, #0] + bl ov16_0226DD7C + ldr r0, _02228B14 ; =0x000005DC + bl sub_02005748 +_02228B08: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_02228B10: .word 0x021BF67C +_02228B14: .word 0x000005DC + thumb_func_end ov13_02228ACC + + thumb_func_start ov13_02228B18 +ov13_02228B18: ; 0x02228B18 + cmp r1, #3 + bhi _02228B60 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02228B28: ; jump table + .short _02228B30 - _02228B28 - 2 ; case 0 + .short _02228B3C - _02228B28 - 2 ; case 1 + .short _02228B48 - _02228B28 - 2 ; case 2 + .short _02228B54 - _02228B28 - 2 ; case 3 +_02228B30: + ldrb r1, [r0, #5] + mov r0, #0x80 + tst r0, r1 + beq _02228B60 + mov r0, #1 + bx lr +_02228B3C: + ldrb r1, [r0, #4] + mov r0, #0x80 + tst r0, r1 + beq _02228B60 + mov r0, #1 + bx lr +_02228B48: + ldrb r1, [r0, #7] + mov r0, #0x80 + tst r0, r1 + beq _02228B60 + mov r0, #1 + bx lr +_02228B54: + ldrb r1, [r0, #6] + mov r0, #0x80 + tst r0, r1 + beq _02228B60 + mov r0, #1 + bx lr +_02228B60: + mov r0, #0 + bx lr + thumb_func_end ov13_02228B18 + + thumb_func_start ov13_02228B64 +ov13_02228B64: ; 0x02228B64 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + bl ov13_02228ACC + cmp r0, #0 + bne _02228B7A + mov r0, #0 + add sp, #0x14 + mvn r0, r0 + pop {r4, r5, r6, r7, pc} +_02228B7A: + ldr r0, _02228CF0 ; =0x021BF67C + mov r1, #0x40 + ldr r0, [r0, #0x48] + tst r1, r0 + beq _02228B9E + mov r1, #0 + str r1, [sp] + ldrb r0, [r5, #9] + add r2, r1, #0 + add r3, r1, #0 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r5, #4] + bl sub_0201E028 + add r4, r0, #0 + mov r6, #0 + b _02228C06 +_02228B9E: + mov r1, #0x80 + tst r1, r0 + beq _02228BC0 + mov r1, #0 + str r1, [sp] + ldrb r0, [r5, #9] + add r2, r1, #0 + add r3, r1, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_0201E028 + add r4, r0, #0 + mov r6, #1 + b _02228C06 +_02228BC0: + mov r1, #0x20 + tst r1, r0 + beq _02228BE2 + mov r1, #0 + str r1, [sp] + ldrb r0, [r5, #9] + add r2, r1, #0 + add r3, r1, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_0201E028 + add r4, r0, #0 + mov r6, #2 + b _02228C06 +_02228BE2: + mov r1, #0x10 + tst r0, r1 + beq _02228C04 + mov r1, #0 + str r1, [sp] + ldrb r0, [r5, #9] + add r2, r1, #0 + add r3, r1, #0 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_0201E028 + add r4, r0, #0 + mov r6, #3 + b _02228C06 +_02228C04: + mov r4, #0xff +_02228C06: + cmp r4, #0xff + beq _02228CC6 + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #0x80 + add r1, r4, #0 + tst r1, r0 + beq _02228C26 + ldrb r1, [r5, #0xa] + cmp r1, #0xff + beq _02228C20 + add r4, r1, #0 + b _02228C26 +_02228C20: + eor r0, r4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_02228C26: + mov r7, #0 +_02228C28: + mov r0, #1 + ldr r1, [r5, #0xc] + lsl r0, r4 + tst r0, r1 + bne _02228C60 + str r7, [sp, #0xc] + str r7, [sp] + str r4, [sp, #4] + str r6, [sp, #8] + ldr r0, [r5, #4] + add r1, r7, #0 + add r2, r7, #0 + add r3, r7, #0 + bl sub_0201E028 + mov r1, #0x7f + and r0, r1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, r4 + beq _02228C58 + ldrb r0, [r5, #9] + cmp r1, r0 + bne _02228C5C +_02228C58: + ldrb r4, [r5, #9] + b _02228C60 +_02228C5C: + add r4, r1, #0 + b _02228C28 +_02228C60: + ldrb r0, [r5, #9] + cmp r0, r4 + beq _02228CBE + ldr r0, [r5, #4] + lsl r7, r4, #3 + add r1, sp, #0x10 + add r2, sp, #0x10 + add r0, r0, r7 + add r1, #3 + add r2, #2 + bl sub_0201E010 + ldr r0, [r5, #4] + add r1, sp, #0x10 + add r0, r0, r7 + add r1, #1 + add r2, sp, #0x10 + bl sub_0201E01C + ldr r0, [r5, #4] + add r1, r6, #0 + add r0, r0, r7 + bl ov13_02228B18 + cmp r0, #1 + bne _02228CA0 + ldr r0, [sp, #0xc] + cmp r0, #0 + beq _02228CA0 + ldrb r0, [r5, #9] + strb r0, [r5, #0xa] + b _02228CA4 +_02228CA0: + mov r0, #0xff + strb r0, [r5, #0xa] +_02228CA4: + strb r4, [r5, #9] + add r3, sp, #0x10 + ldrb r0, [r3] + str r0, [sp] + ldrb r1, [r3, #3] + ldrb r2, [r3, #1] + ldrb r3, [r3, #2] + ldr r0, [r5, #0] + bl ov16_0226DD7C + ldr r0, _02228CF4 ; =0x000005DC + bl sub_02005748 +_02228CBE: + mov r0, #0 + add sp, #0x14 + mvn r0, r0 + pop {r4, r5, r6, r7, pc} +_02228CC6: + ldr r0, _02228CF0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _02228CD6 + add sp, #0x14 + ldrb r0, [r5, #9] + pop {r4, r5, r6, r7, pc} +_02228CD6: + mov r0, #2 + tst r1, r0 + beq _02228CEA + ldr r0, _02228CF8 ; =0x000005DD + bl sub_02005748 + mov r0, #1 + add sp, #0x14 + mvn r0, r0 + pop {r4, r5, r6, r7, pc} +_02228CEA: + sub r0, r0, #3 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02228CF0: .word 0x021BF67C +_02228CF4: .word 0x000005DC +_02228CF8: .word 0x000005DD + thumb_func_end ov13_02228B64 \ No newline at end of file diff --git a/asm/overlay14.s b/asm/ov14_0221FC20.s similarity index 99% rename from asm/overlay14.s rename to asm/ov14_0221FC20.s index d9fa02f52..d400a5eb3 100644 --- a/asm/overlay14.s +++ b/asm/ov14_0221FC20.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov14_0221FC20 ov14_0221FC20: ; 0x0221FC20 push {r3, r4, r5, r6, r7, lr} @@ -9956,12 +9959,26 @@ _02224898: .word 0x000003D3 _0222489C: .word 0x000003D1 _022248A0: .word 0x000003D6 thumb_func_end ov14_022244B0 - ; 0x022248A4 - .rodata - .incbin "incbin/overlay14_rodata.bin" + .global Unk_ov14_022248A4 +Unk_ov14_022248A4: ; 0x022248A4 + .incbin "incbin/overlay14_rodata.bin", 0x0, 0xA5BC + + .global Unk_ov14_0222EE60 +Unk_ov14_0222EE60: ; 0x0222EE60 + .incbin "incbin/overlay14_rodata.bin", 0xA5BC, 0x18 - 0x0 + + .global Unk_ov14_0222EE78 +Unk_ov14_0222EE78: ; 0x0222EE78 + .incbin "incbin/overlay14_rodata.bin", 0xA5BC + 0x18, 0x30 - 0x18 + + .global Unk_ov14_0222EE90 +Unk_ov14_0222EE90: ; 0x0222EE90 + .incbin "incbin/overlay14_rodata.bin", 0xA5BC + 0x30, 0x4C - 0x30 + + .global Unk_ov14_0222EEAC +Unk_ov14_0222EEAC: ; 0x0222EEAC + .incbin "incbin/overlay14_rodata.bin", 0xA5BC + 0x4C, 0x1B4 - .bss - .space 0x0 diff --git a/asm/ov16_0223B140.s b/asm/ov16_0223B140.s new file mode 100644 index 000000000..582ada105 --- /dev/null +++ b/asm/ov16_0223B140.s @@ -0,0 +1,5572 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0223B140 +ov16_0223B140: ; 0x0223B140 + push {r4, r5, r6, lr} + sub sp, #0x28 + add r4, r1, #0 + add r6, r0, #0 + bl sub_02006840 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0xf + bls _0223B156 + b _0223B370 +_0223B156: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223B162: ; jump table + .short _0223B182 - _0223B162 - 2 ; case 0 + .short _0223B1AE - _0223B162 - 2 ; case 1 + .short _0223B1E8 - _0223B162 - 2 ; case 2 + .short _0223B1FE - _0223B162 - 2 ; case 3 + .short _0223B214 - _0223B162 - 2 ; case 4 + .short _0223B224 - _0223B162 - 2 ; case 5 + .short _0223B23A - _0223B162 - 2 ; case 6 + .short _0223B256 - _0223B162 - 2 ; case 7 + .short _0223B268 - _0223B162 - 2 ; case 8 + .short _0223B284 - _0223B162 - 2 ; case 9 + .short _0223B29A - _0223B162 - 2 ; case 10 + .short _0223B2B6 - _0223B162 - 2 ; case 11 + .short _0223B2D2 - _0223B162 - 2 ; case 12 + .short _0223B2D8 - _0223B162 - 2 ; case 13 + .short _0223B348 - _0223B162 - 2 ; case 14 + .short _0223B36A - _0223B162 - 2 ; case 15 +_0223B182: + mov r2, #0xb + mov r0, #3 + mov r1, #5 + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, [r5, #0] + mov r0, #4 + tst r0, r1 + beq _0223B1A8 + mov r0, #0x63 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0x10 + tst r0, r1 + bne _0223B1A8 + mov r0, #1 + str r0, [r4, #0] + b _0223B370 +_0223B1A8: + mov r0, #3 + str r0, [r4, #0] + b _0223B370 +_0223B1AE: + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223D10C + mov r0, #0x4b + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02038F8C + bl sub_020389B8 + cmp r0, #0 + bne _0223B1D6 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x14 + bl sub_0202CF28 + b _0223B1E2 +_0223B1D6: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x19 + bl sub_0202CF28 +_0223B1E2: + mov r0, #2 + str r0, [r4, #0] + b _0223B370 +_0223B1E8: + add r0, r6, #0 + bl ov16_0223D354 + cmp r0, #1 + bne _0223B260 + add r0, r6, #0 + bl ov16_0223D7B4 + mov r0, #3 + str r0, [r4, #0] + b _0223B370 +_0223B1FE: + add r0, r6, #0 + bl ov16_0223D800 + cmp r0, #1 + bne _0223B20E + mov r0, #4 + str r0, [r4, #0] + b _0223B370 +_0223B20E: + mov r0, #5 + str r0, [r4, #0] + b _0223B370 +_0223B214: + add r0, r6, #0 + bl ov16_0223D944 + cmp r0, #1 + bne _0223B260 + mov r0, #5 + str r0, [r4, #0] + b _0223B370 +_0223B224: + add r0, r6, #0 + bl ov16_0223D98C + cmp r0, #1 + bne _0223B234 + mov r0, #6 + str r0, [r4, #0] + b _0223B370 +_0223B234: + mov r0, #8 + str r0, [r4, #0] + b _0223B370 +_0223B23A: + add r0, r6, #0 + bl ov16_0223DAD4 + cmp r0, #1 + bne _0223B260 + ldr r0, _0223B378 ; =0x0000000A + bl sub_02006514 + mov r0, #7 + str r0, [r4, #0] + mov r0, #0x3d + bl sub_020364F0 + b _0223B370 +_0223B256: + mov r0, #0x3d + bl sub_02036540 + cmp r0, #0 + bne _0223B262 +_0223B260: + b _0223B370 +_0223B262: + mov r0, #8 + str r0, [r4, #0] + b _0223B370 +_0223B268: + ldr r0, _0223B37C ; =0x0000000B + mov r1, #2 + bl sub_02006590 + ldr r0, _0223B380 ; =0x0000000C + mov r1, #2 + bl sub_02006590 + add r0, r6, #0 + bl ov16_0223B790 + mov r0, #9 + str r0, [r4, #0] + b _0223B370 +_0223B284: + add r0, r6, #0 + bl ov16_0223BBD0 + cmp r0, #1 + bne _0223B370 + add r0, r6, #0 + bl ov16_0223BCB4 + mov r0, #0xa + str r0, [r4, #0] + b _0223B370 +_0223B29A: + add r0, r6, #0 + bl ov16_0223DB1C + cmp r0, #1 + bne _0223B2AA + mov r0, #0xb + str r0, [r4, #0] + b _0223B370 +_0223B2AA: + mov r0, #5 + bl sub_0201807C + mov r0, #0xd + str r0, [r4, #0] + b _0223B370 +_0223B2B6: + add r0, r6, #0 + bl ov16_0223DD10 + cmp r0, #1 + bne _0223B370 + ldr r0, _0223B378 ; =0x0000000A + bl sub_02006514 + mov r0, #5 + bl sub_0201807C + mov r0, #0xc + str r0, [r4, #0] + b _0223B370 +_0223B2D2: + mov r0, #0xf + str r0, [r4, #0] + b _0223B370 +_0223B2D8: + add r1, sp, #0x24 + add r2, sp, #0x20 + bl ov16_0223ECC4 + add r6, r0, #0 + beq _0223B342 + mov r0, #3 + mov r1, #0x49 + lsl r2, r0, #0x10 + bl sub_02017FC8 + ldr r0, [r5, #4] + ldr r1, [sp, #0x24] + bl sub_0207A0FC + add r1, r0, #0 + mov r0, #0x5a + lsl r0, r0, #2 + ldr r2, [r5, r0] + mov r3, #0x49 + str r2, [sp] + add r2, r0, #0 + sub r2, #0x58 + ldr r2, [r5, r2] + str r2, [sp, #4] + add r2, r0, #0 + sub r2, #0x60 + ldr r2, [r5, r2] + str r2, [sp, #8] + add r2, r0, #0 + sub r2, #0x24 + ldr r2, [r5, r2] + sub r0, #0x40 + str r2, [sp, #0xc] + ldr r0, [r5, r0] + add r2, r6, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x20] + str r0, [sp, #0x14] + mov r0, #3 + str r0, [sp, #0x18] + str r3, [sp, #0x1c] + add r3, #0xe7 + ldr r0, [r5, #4] + ldr r3, [r5, r3] + bl sub_0207AE68 + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xe + str r0, [r4, #0] + b _0223B370 +_0223B342: + mov r0, #0xf + str r0, [r4, #0] + b _0223B370 +_0223B348: + mov r0, #0x66 + lsl r0, r0, #2 + ldr r5, [r5, r0] + add r0, r5, #0 + bl sub_0207B0D0 + cmp r0, #1 + bne _0223B370 + add r0, r5, #0 + bl sub_0207B0E0 + mov r0, #0x49 + bl sub_0201807C + mov r0, #0xd + str r0, [r4, #0] + b _0223B370 +_0223B36A: + add sp, #0x28 + mov r0, #1 + pop {r4, r5, r6, pc} +_0223B370: + mov r0, #0 + add sp, #0x28 + pop {r4, r5, r6, pc} + nop +_0223B378: .word 0x0000000A +_0223B37C: .word 0x0000000B +_0223B380: .word 0x0000000C + thumb_func_end ov16_0223B140 + + thumb_func_start ov16_0223B384 +ov16_0223B384: ; 0x0223B384 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov16_02268A14 + ldr r0, [r4, #4] + bl ov16_022687A0 + ldr r1, _0223B3D0 ; =0x000023FF + mov r0, #4 + ldrb r2, [r4, r1] + orr r0, r2 + strb r0, [r4, r1] + mov r0, #2 + bl sub_02002C60 + add r0, r4, #0 + mov r1, #3 + bl ov16_0223F314 + ldr r0, _0223B3D4 ; =0x00002445 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0223B3C0 + ldr r0, _0223B3D8 ; =0x0000000C + bl sub_02006514 + b _0223B3C6 +_0223B3C0: + ldr r0, _0223B3DC ; =0x0000000E + bl sub_02006514 +_0223B3C6: + ldr r0, _0223B3E0 ; =0x0000000D + mov r1, #2 + bl sub_02006590 + pop {r4, pc} + ; .align 2, 0 +_0223B3D0: .word 0x000023FF +_0223B3D4: .word 0x00002445 +_0223B3D8: .word 0x0000000C +_0223B3DC: .word 0x0000000E +_0223B3E0: .word 0x0000000D + thumb_func_end ov16_0223B384 + + thumb_func_start ov16_0223B3E4 +ov16_0223B3E4: ; 0x0223B3E4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov16_02268A14 + ldr r0, [r4, #8] + bl sub_0201A8FC + ldr r0, [r4, #4] + bl ov16_0223C288 + add r0, r4, #0 + bl ov16_0223C2BC + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x90 + add r1, #0x94 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200D0B0 + add r4, #0x90 + ldr r0, [r4, #0] + bl sub_0200C8D4 + bl sub_0201DC3C + mov r0, #2 + bl sub_02002C60 + pop {r4, pc} + thumb_func_end ov16_0223B3E4 + + thumb_func_start ov16_0223B430 +ov16_0223B430: ; 0x0223B430 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _0223B528 ; =0x0000000D + bl sub_02006514 + ldr r0, _0223B52C ; =0x00002445 + ldrb r0, [r5, r0] + cmp r0, #0 + bne _0223B44E + ldr r0, _0223B530 ; =0x0000000C + mov r1, #2 + bl sub_02006590 + b _0223B456 +_0223B44E: + ldr r0, _0223B534 ; =0x0000000E + mov r1, #2 + bl sub_02006590 +_0223B456: + add r0, r5, #0 + mov r1, #0 + bl ov16_0223F314 + bl sub_02024208 + add r4, r0, #0 + bl sub_02024200 + add r1, r0, #0 + mov r0, #0 + add r2, r4, #0 + bl sub_020C4AF0 + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_0223F6E4 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_0223E1B4 + add r3, r0, #0 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + add r1, r4, #0 + str r0, [sp] + add r0, r6, #0 + add r2, r5, #0 + bl ov16_022687C8 + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #2 + mov r1, #5 + bl sub_02002BB8 + ldr r1, _0223B538 ; =0x000023FF + mov r0, #2 + ldrb r2, [r5, r1] + orr r0, r2 + strb r0, [r5, r1] + ldr r0, [r5, #4] + bl ov16_02268744 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov16_02268A88 + mov r0, #1 + str r0, [sp] + mov r3, #0 + mov r2, #0x67 + str r3, [sp, #4] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r6, #0 + add r1, r4, #0 + bl ov16_02268C04 + mov r1, #0x67 + lsl r1, r1, #2 + ldr r1, [r5, r1] + add r0, r4, #0 + bl ov16_02268D40 + add r0, r6, #0 + bl sub_02006CA8 + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #1 + bl sub_020027A8 + add r0, r5, #0 + bl ov16_0223DD4C + add r5, #0x90 + ldr r0, [r5, #0] + bl sub_0200C738 + mov r2, #0x11 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223B528: .word 0x0000000D +_0223B52C: .word 0x00002445 +_0223B530: .word 0x0000000C +_0223B534: .word 0x0000000E +_0223B538: .word 0x000023FF + thumb_func_end ov16_0223B430 + + thumb_func_start ov16_0223B53C +ov16_0223B53C: ; 0x0223B53C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0201A8FC + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #3 + bl sub_02019044 + add r0, r4, #0 + bl ov16_0223F3EC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0223B53C + + thumb_func_start ov16_0223B578 +ov16_0223B578: ; 0x0223B578 + push {r4, r5, r6, lr} + sub sp, #0x68 + ldr r1, _0223B72C ; =0x000023FF + add r5, r0, #0 + ldrb r2, [r5, r1] + mov r0, #1 + ldr r4, _0223B730 ; =0x0226E3A4 + bic r2, r0 + mov r0, #1 + orr r0, r2 + strb r0, [r5, r1] + add r3, sp, #0x14 + mov r2, #0xa +_0223B592: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223B592 + ldr r0, [r4, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r5, #4] + add r2, sp, #0x14 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02019EBC + ldr r0, [r5, #4] + mov r1, #2 + add r2, sp, #0x30 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #4] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #4] + mov r1, #3 + add r2, sp, #0x4c + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #4] + mov r1, #3 + bl sub_02019EBC + ldr r1, _0223B734 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r2, r0 + strh r2, [r1] + add r1, r0, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl ov16_0223EDE0 + add r4, r0, #0 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r1, #1 + ldr r0, [r5, #4] + add r2, r1, #0 + mov r3, #0xa + bl sub_0200E218 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + ldr r1, _0223B738 ; =0x00002404 + ldr r2, [r5, #4] + ldr r1, [r5, r1] + mov r0, #7 + add r1, r1, #3 + mov r3, #3 + bl sub_02006E3C + add r0, r5, #0 + bl ov16_0223EC04 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r3, _0223B738 ; =0x00002404 + ldr r0, [r5, #0x28] + ldr r6, [r5, r3] + mov r1, #7 + lsl r3, r6, #1 + add r3, r6, r3 + add r3, #0xac + add r2, r3, r2 + mov r3, #5 + bl sub_02003050 + add r0, r4, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xa0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + mov r1, #0x26 + mov r3, #5 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xb0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + mov r1, #0xe + mov r2, #7 + mov r3, #5 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #7 + mov r1, #2 + mov r3, #3 + bl sub_02006E60 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _0223B73C ; =0xFFFF1FFF + ldr r3, _0223B740 ; =0x04001000 + and r2, r1 + str r2, [r0, #0] + ldr r2, [r3, #0] + and r1, r2 + add r2, r0, #0 + str r1, [r3, #0] + add r2, #0x48 + ldrh r3, [r2] + mov r1, #0x3f + add r0, #0x4a + bic r3, r1 + strh r3, [r2] + ldrh r2, [r0] + bic r2, r1 + strh r2, [r0] + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r0, _0223B744 ; =ov16_0223CE68 + add r1, r5, #0 + bl sub_02017798 + ldr r0, _0223B72C ; =0x000023FF + mov r3, #2 + ldrb r1, [r5, r0] + mov r2, #1 + orr r1, r3 + strb r1, [r5, r0] + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r5, #4] + ldr r1, [r5, #8] + bl sub_0201A7E8 + ldr r0, [r5, #8] + mov r1, #0xff + bl sub_0201ADA4 + ldr r0, [r5, #8] + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + add r0, r5, #0 + bl ov16_0223DD4C + add sp, #0x68 + pop {r4, r5, r6, pc} + nop +_0223B72C: .word 0x000023FF +_0223B730: .word 0x0226E3A4 +_0223B734: .word 0x04000008 +_0223B738: .word 0x00002404 +_0223B73C: .word 0xFFFF1FFF +_0223B740: .word 0x04001000 +_0223B744: .word ov16_0223CE68 + thumb_func_end ov16_0223B578 + + thumb_func_start ov16_0223B748 +ov16_0223B748: ; 0x0223B748 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223B784 ; =0x00002445 + add r4, r1, #0 + ldrb r0, [r5, r0] + cmp r0, r4 + bne _0223B75A + bl sub_02022974 +_0223B75A: + ldr r0, _0223B784 ; =0x00002445 + cmp r4, #0 + strb r4, [r5, r0] + bne _0223B772 + ldr r0, _0223B788 ; =0x0000000E + bl sub_02006514 + ldr r0, _0223B78C ; =0x0000000C + mov r1, #2 + bl sub_02006590 + pop {r3, r4, r5, pc} +_0223B772: + ldr r0, _0223B78C ; =0x0000000C + bl sub_02006514 + ldr r0, _0223B788 ; =0x0000000E + mov r1, #2 + bl sub_02006590 + pop {r3, r4, r5, pc} + nop +_0223B784: .word 0x00002445 +_0223B788: .word 0x0000000E +_0223B78C: .word 0x0000000C + thumb_func_end ov16_0223B748 + + thumb_func_start ov16_0223B790 +ov16_0223B790: ; 0x0223B790 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + add r7, r0, #0 + bl sub_020241F8 + add r5, r0, #0 + bl sub_020241F0 + add r1, r0, #0 + mov r0, #0 + add r2, r5, #0 + bl sub_020C4AF0 + bl sub_02024208 + add r5, r0, #0 + bl sub_02024200 + add r1, r0, #0 + mov r0, #0 + add r2, r5, #0 + bl sub_020C4AF0 + bl ov16_0223CD7C + str r0, [r4, #0] + bl sub_020177A4 + mov r0, #2 + mov r1, #5 + bl sub_02002BB8 + mov r0, #0xe + mov r1, #2 + mov r2, #0xf + mov r3, #5 + bl sub_0200C440 + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r2, [r4, r1] + add r0, r1, #4 + str r2, [r4, r0] + mov r0, #5 + bl sub_02002F38 + str r0, [r4, #0x28] + mov r1, #1 + bl sub_02003858 + mov r2, #2 + ldr r0, [r4, #0x28] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #5 + bl sub_02002F70 + mov r1, #1 + ldr r0, [r4, #0x28] + lsl r2, r1, #9 + mov r3, #5 + bl sub_02002F70 + mov r2, #7 + ldr r0, [r4, #0x28] + mov r1, #2 + lsl r2, r2, #6 + mov r3, #5 + bl sub_02002F70 + mov r2, #2 + ldr r0, [r4, #0x28] + mov r1, #3 + lsl r2, r2, #8 + mov r3, #5 + bl sub_02002F70 + mov r0, #5 + bl sub_02018340 + str r0, [r4, #4] + mov r0, #5 + mov r1, #3 + bl sub_0201A778 + str r0, [r4, #8] + mov r6, #0 + add r5, r4, #0 +_0223B850: + mov r1, #0x32 + mov r0, #5 + lsl r1, r1, #6 + bl sub_02018144 + mov r1, #0x1d + lsl r1, r1, #4 + str r0, [r5, r1] + add r6, r6, #1 + add r5, #0x10 + cmp r6, #4 + blt _0223B850 + mov r0, #0x40 + mov r1, #5 + bl sub_0201DBEC + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_0223F6E4 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_0223E1B4 + add r3, r0, #0 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r4, r0] + add r1, r6, #0 + str r0, [sp] + add r0, r5, #0 + add r2, r4, #0 + bl ov16_022687C8 + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r5, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + ldr r1, [r4, #4] + add r0, r4, #0 + bl ov16_0223C004 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r4, #4] + ldr r1, [r4, #8] + mov r2, #1 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, [r4, #8] + mov r1, #0xff + bl sub_0201ADA4 + ldr r0, [r4, #8] + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r0, #5 + bl sub_0200C6E4 + add r1, r4, #0 + add r1, #0x90 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + ldr r1, _0223BB90 ; =0x0226E2E4 + ldr r2, _0223BB94 ; =0x0226E29C + mov r3, #0x20 + bl sub_0200C73C + ldr r1, _0223BB98 ; =0x00100010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl sub_0200C704 + add r1, r4, #0 + add r1, #0x94 + str r0, [r1, #0] + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x90 + add r1, #0x94 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x80 + bl sub_0200C7C0 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x90 + add r1, #0x94 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, _0223BB9C ; =0x0226E2B0 + bl sub_0200CB30 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl sub_0200C738 + mov r2, #0x11 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov16_02268A88 + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r3, #0 + mov r2, #0x67 + str r3, [sp, #4] + lsl r2, r2, #2 + ldr r2, [r4, r2] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02268C04 + mov r1, #0x67 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov16_02268D40 + add r0, r6, #0 + bl sub_02006CA8 + add r0, r5, #0 + bl sub_02006CA8 + mov r0, #5 + bl sub_0200762C + add r1, r4, #0 + add r1, #0x88 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0 + mov r2, #0xc0 + bl sub_02008A84 + add r0, r4, #0 + bl ov16_0223F36C + bl ov16_0223CE28 + mov r0, #5 + bl ov12_0221FCDC + add r1, r4, #0 + add r1, #0x8c + str r0, [r1, #0] + add r0, r4, #0 + bl ov16_0223C210 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r2, #0x17 + mov r0, #1 + mov r1, #0x1a + lsl r2, r2, #4 + mov r3, #5 + bl sub_0200B144 + str r0, [r4, #0xc] + mov r0, #1 + mov r1, #0x1a + mov r2, #0 + mov r3, #5 + bl sub_0200B144 + str r0, [r4, #0x10] + mov r0, #5 + bl sub_0200B358 + str r0, [r4, #0x14] + mov r0, #5 + lsl r0, r0, #6 + mov r1, #5 + bl sub_02023790 + str r0, [r4, #0x18] + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_02003164 + ldr r1, _0223BBA0 ; =0x00002228 + mov r2, #0xe0 + add r1, r4, r1 + bl sub_020C4B18 + ldr r0, [r4, #0x28] + mov r1, #2 + bl sub_02003164 + ldr r1, _0223BBA4 ; =0x00002308 + mov r2, #0xe0 + add r1, r4, r1 + bl sub_020C4B18 + add r0, r4, #0 + bl ov16_0223EC04 + mov r1, #0 + lsl r6, r0, #2 + str r1, [sp] + mov r0, #0x70 + str r0, [sp, #4] + ldr r3, _0223BBA8 ; =0x00002404 + mov r5, #0xc + ldr r3, [r4, r3] + ldr r0, [r4, #0x28] + mul r5, r3 + ldr r3, _0223BBAC ; =0x0226E44C + mov r2, #2 + add r3, r3, r5 + ldr r3, [r6, r3] + lsl r3, r3, #0x10 + lsr r3, r3, #0x10 + bl sub_020038B0 + mov r0, #0xc0 + str r0, [sp] + add r0, #0x40 + str r0, [sp, #4] + ldr r3, _0223BBA8 ; =0x00002404 + mov r5, #0xc + ldr r3, [r4, r3] + ldr r0, [r4, #0x28] + mul r5, r3 + ldr r3, _0223BBAC ; =0x0226E44C + mov r1, #0 + add r3, r3, r5 + ldr r3, [r6, r3] + mov r2, #2 + lsl r3, r3, #0x10 + lsr r3, r3, #0x10 + bl sub_020038B0 + mov r0, #0 + str r0, [sp] + mov r0, #0xdf + str r0, [sp, #4] + ldr r3, _0223BBA8 ; =0x00002404 + mov r5, #0xc + ldr r3, [r4, r3] + mov r1, #2 + mul r5, r3 + ldr r3, _0223BBAC ; =0x0226E44C + ldr r0, [r4, #0x28] + add r3, r3, r5 + ldr r3, [r6, r3] + add r2, r1, #0 + lsl r3, r3, #0x10 + lsr r3, r3, #0x10 + bl sub_020038B0 + mov r1, #0 + mov r0, #0xa0 + str r0, [sp] + mov r0, #0xc0 + str r0, [sp, #4] + ldr r0, [r4, #0x28] + add r2, r1, #0 + add r3, r1, #0 + bl sub_020038B0 + mov r2, #0 + str r2, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [r4, #0x28] + mov r1, #1 + add r3, r2, #0 + bl sub_020038B0 + mov r2, #0 + str r2, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [r4, #0x28] + ldr r3, _0223BBB0 ; =0x0000FFFF + mov r1, #3 + bl sub_020038B0 + ldr r0, [r4, #0x28] + mov r1, #0 + mov r2, #0xb + mov r3, #5 + bl sub_0201567C + mov r1, #0x1b + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02015738 + ldr r0, _0223BBB4 ; =ov16_0223CF48 + ldr r2, _0223BBB8 ; =0x0000EA60 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x1c] + ldr r0, _0223BBBC ; =ov16_0223CF8C + ldr r2, _0223BBC0 ; =0x0000C350 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x20] + mov r2, #0x4b + ldr r0, _0223BBC4 ; =ov16_0223D0C4 + add r1, r4, #0 + lsl r2, r2, #4 + bl sub_0200DA04 + str r0, [r4, #0x24] + mov r1, #0x32 + ldr r0, _0223BBC8 ; =0x00002438 + mvn r1, r1 + str r1, [r4, r0] + add r0, r4, #0 + bl ov16_0223DD4C + add r0, r4, #0 + bl ov16_0223E1B0 + bl sub_0207D9F8 + mov r0, #5 + mov r1, #4 + mov r2, #0 + bl sub_02015F84 + mov r1, #0x72 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #4 + mov r1, #5 + bl sub_0201DCC8 + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, _0223BBCC ; =0x0000240C + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + beq _0223BB8A + mov r0, #0x6f + mov r1, #0x92 + mov r5, #0 + lsl r0, r0, #2 + lsl r1, r1, #6 +_0223BB7C: + add r2, r7, r5 + ldrb r3, [r2, r0] + add r2, r4, r5 + add r5, r5, #1 + strb r3, [r2, r1] + cmp r5, #4 + blt _0223BB7C +_0223BB8A: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223BB90: .word 0x0226E2E4 +_0223BB94: .word 0x0226E29C +_0223BB98: .word 0x00100010 +_0223BB9C: .word 0x0226E2B0 +_0223BBA0: .word 0x00002228 +_0223BBA4: .word 0x00002308 +_0223BBA8: .word 0x00002404 +_0223BBAC: .word 0x0226E44C +_0223BBB0: .word 0x0000FFFF +_0223BBB4: .word ov16_0223CF48 +_0223BBB8: .word 0x0000EA60 +_0223BBBC: .word ov16_0223CF8C +_0223BBC0: .word 0x0000C350 +_0223BBC4: .word ov16_0223D0C4 +_0223BBC8: .word 0x00002438 +_0223BBCC: .word 0x0000240C + thumb_func_end ov16_0223B790 + + thumb_func_start ov16_0223BBD0 +ov16_0223BBD0: ; 0x0223BBD0 + push {r3, r4, r5, r6, r7, lr} + bl sub_0200682C + add r4, r0, #0 + ldr r2, [r4, #0x2c] + mov r1, #4 + tst r1, r2 + beq _0223BC16 + ldr r1, _0223BCA8 ; =0x0000240C + mov r2, #0x10 + ldr r3, [r4, r1] + tst r2, r3 + bne _0223BC16 + sub r1, #0x10 + ldrb r1, [r4, r1] + cmp r1, #0 + beq _0223BBF8 + ldr r1, [r4, #0x30] + bl ov16_0224B990 +_0223BBF8: + ldr r0, [r4, #0x44] + mov r6, #0 + cmp r0, #0 + ble _0223BCA2 + add r5, r4, #0 +_0223BC02: + ldr r1, [r5, #0x34] + add r0, r4, #0 + bl ov16_0225C0DC + ldr r0, [r4, #0x44] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0223BC02 + b _0223BCA2 +_0223BC16: + ldr r0, _0223BCAC ; =0x000023FC + ldrb r0, [r4, r0] + cmp r0, #0 + beq _0223BC32 + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0224B990 + ldr r1, _0223BCB0 ; =0x000023FE + strb r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02264988 +_0223BC32: + ldr r0, [r4, #0x44] + mov r6, #0 + cmp r0, #0 + ble _0223BC58 + add r5, r4, #0 + add r7, r6, #0 +_0223BC3E: + ldr r1, [r5, #0x34] + add r0, r4, #0 + bl ov16_0225C0DC + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02264988 + ldr r0, [r4, #0x44] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0223BC3E +_0223BC58: + ldr r0, _0223BCB0 ; =0x000023FE + ldrb r1, [r4, r0] + cmp r1, #0 + bne _0223BCA2 + sub r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _0223BC7C + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0224B990 + ldr r1, _0223BCB0 ; =0x000023FE + strb r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02264988 +_0223BC7C: + ldr r0, [r4, #0x44] + mov r6, #0 + cmp r0, #0 + ble _0223BCA2 + add r5, r4, #0 + add r7, r6, #0 +_0223BC88: + ldr r1, [r5, #0x34] + add r0, r4, #0 + bl ov16_0225C0DC + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02264988 + ldr r0, [r4, #0x44] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0223BC88 +_0223BCA2: + ldr r0, _0223BCB0 ; =0x000023FE + ldrb r0, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BCA8: .word 0x0000240C +_0223BCAC: .word 0x000023FC +_0223BCB0: .word 0x000023FE + thumb_func_end ov16_0223BBD0 + + thumb_func_start ov16_0223BCB4 +ov16_0223BCB4: ; 0x0223BCB4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + ldr r3, _0223BFD4 ; =0x0000244C + mov r2, #0x67 + ldr r1, [r4, r3] + add r7, r0, #0 + lsl r2, r2, #2 + str r1, [r7, r2] + add r1, r3, #0 + sub r1, #0x40 + ldr r1, [r4, r1] + sub r2, #0x10 + str r1, [r7, r2] + sub r3, #0x40 + ldr r2, [r4, r3] + mov r1, #0x10 + tst r1, r2 + bne _0223BCE8 + bl sub_0202F8AC +_0223BCE8: + ldr r0, _0223BFD8 ; =0x00002445 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _0223BCF8 + add r0, r4, #0 + mov r1, #0 + bl ov16_0223B748 +_0223BCF8: + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + add r0, r4, #0 + bl ov16_0223EE70 + ldr r0, _0223BFDC ; =0x00002420 + ldrb r0, [r4, r0] + cmp r0, #4 + beq _0223BD26 + ldr r0, [r4, #0x6c] + mov r1, #0 + bl sub_0207A0FC + add r1, r0, #0 + add r0, r4, #0 + bl ov16_0223EF68 +_0223BD26: + mov r0, #0 + str r0, [sp] + add r6, r7, #0 + add r5, r4, #0 +_0223BD2E: + ldr r0, [r5, #0x68] + ldr r1, [r6, #4] + bl sub_0207A21C + ldr r0, [r5, #0x68] + bl sub_020181C4 + add r1, r6, #0 + add r1, #0xf8 + ldr r0, [r5, #0x48] + ldr r1, [r1, #0] + bl sub_02025E80 + ldr r0, [r5, #0x48] + bl sub_020181C4 + ldr r0, [sp] + add r6, r6, #4 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp] + cmp r0, #4 + blt _0223BD2E + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02015760 + mov r1, #0x42 + lsl r1, r1, #2 + ldr r0, [r4, #0x58] + ldr r1, [r7, r1] + bl sub_0207D3EC + ldr r0, [r4, #0x58] + bl sub_020181C4 + mov r1, #0x11 + lsl r1, r1, #4 + ldr r0, [r4, #0x60] + ldr r1, [r7, r1] + bl sub_02026338 + ldr r0, [r4, #0x60] + bl sub_020181C4 + mov r0, #0x45 + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + str r1, [r7, r0] + add r1, r0, #0 + ldr r2, [r4, #0x5c] + sub r1, #8 + str r2, [r7, r1] + add r1, r0, #0 + add r1, #0xac + ldr r2, [r4, r1] + add r1, r0, #0 + add r1, #0xa4 + str r2, [r7, r1] + add r1, r4, #0 + add r1, #0x98 + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0x14 + str r2, [r7, r1] + add r1, r4, #0 + add r1, #0x9c + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0x20 + str r2, [r7, r1] + add r1, r0, #0 + ldr r2, _0223BFE0 ; =0x00002414 + add r1, #0x7c + ldr r3, [r4, r2] + add r0, #0x5c + str r3, [r7, r1] + add r1, r2, #0 + add r1, #0xc + ldrb r3, [r4, r1] + mov r1, #0x3f + add r2, #0x28 + and r1, r3 + str r1, [r7, #0x14] + ldr r1, [r4, r2] + mov r2, #4 + str r1, [r7, r0] + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r3, #0 + bl ov16_0225B45C + mov r1, #0x5e + lsl r1, r1, #2 + str r0, [r7, r1] + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #3 + mov r3, #0 + bl ov16_0225B45C + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r7, r1] + mov r3, #0 + add r0, r2, r0 + str r0, [r7, r1] + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #6 + bl ov16_0225B45C + add r5, r0, #0 + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #6 + mov r3, #2 + bl ov16_0225B45C + mov r1, #0x4f + lsl r1, r1, #2 + ldr r2, [r7, r1] + add r0, r5, r0 + add r0, r2, r0 + str r0, [r7, r1] + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #7 + mov r3, #0 + bl ov16_0225B45C + add r5, r0, #0 + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #7 + mov r3, #2 + bl ov16_0225B45C + mov r1, #5 + lsl r1, r1, #6 + ldr r2, [r7, r1] + add r0, r5, r0 + add r0, r2, r0 + str r0, [r7, r1] + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #3 + mov r3, #0 + bl ov16_0225B45C + mov r1, #0x6d + lsl r1, r1, #2 + str r0, [r7, r1] + ldr r0, _0223BFE4 ; =0x00002478 + add r1, #0x10 + ldr r0, [r4, r0] + mov r6, #0 + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + str r0, [r7, r1] + mov r7, #0x1d + add r5, r4, #0 + lsl r7, r7, #4 +_0223BE76: + ldr r0, [r5, r7] + bl sub_020181C4 + add r6, r6, #1 + add r5, #0x10 + cmp r6, #4 + blt _0223BE76 + ldr r0, [r4, #0x18] + bl sub_020181C4 + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_02002FA0 + ldr r0, [r4, #0x28] + mov r1, #1 + bl sub_02002FA0 + ldr r0, [r4, #0x28] + mov r1, #2 + bl sub_02002FA0 + ldr r0, [r4, #0x28] + mov r1, #3 + bl sub_02002FA0 + ldr r0, [r4, #0x28] + bl sub_02002F54 + ldr r0, [r4, #0xc] + bl sub_0200B190 + ldr r0, [r4, #0x10] + bl sub_0200B190 + ldr r0, [r4, #0x14] + bl sub_0200B3F0 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02015FB8 + bl sub_020141E4 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl ov12_0221FDF4 + ldr r0, [r4, #0x30] + bl ov16_0224B9DC + ldr r0, [r4, #0x44] + mov r6, #0 + cmp r0, #0 + ble _0223BF00 + ldr r7, _0223BFE8 ; =0x000023FD + add r5, r4, #0 +_0223BEEC: + ldrb r2, [r4, r7] + ldr r1, [r5, #0x34] + add r0, r4, #0 + bl ov16_0225C104 + ldr r0, [r4, #0x44] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r0 + blt _0223BEEC +_0223BF00: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_02007B6C + ldr r0, _0223BFE8 ; =0x000023FD + ldrb r0, [r4, r0] + cmp r0, #2 + beq _0223BF18 + add r0, r4, #0 + bl ov16_0223B3E4 +_0223BF18: + mov r0, #0 + bl sub_02002AC8 + mov r0, #0 + bl sub_02002AE4 + mov r0, #0 + bl sub_02002B20 + ldr r0, [r4, #8] + mov r1, #3 + bl sub_0201A928 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200C560 + mov r0, #2 + bl sub_02002C60 + ldr r0, [r4, #0x1c] + bl sub_0200DA58 + ldr r0, [r4, #0x20] + bl sub_0200DA58 + bl sub_0201E530 + ldr r0, [r4, #0] + bl ov16_0223CE20 + ldr r0, _0223BFEC ; =0x00002434 + ldr r0, [r4, r0] + bl sub_0201D2DC + add r0, r4, #0 + bl ov16_0223F450 + cmp r0, #0 + beq _0223BF8C + ldr r0, _0223BFF0 ; =0x00000704 + mov r1, #0 + bl sub_020057A4 +_0223BF8C: + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201DCF0 + add r0, r4, #0 + bl ov16_0223F710 + cmp r0, #0 + beq _0223BFA6 + mov r0, #0x7f + bl sub_0200500C +_0223BFA6: + ldr r0, _0223BFF4 ; =0x0000247C + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223BFB2 + bl ov16_0226E174 +_0223BFB2: + add r0, r4, #0 + bl sub_020181C4 + ldr r0, _0223BFF8 ; =0x0000000B + bl sub_02006514 + ldr r0, _0223BFFC ; =0x0000000C + bl sub_02006514 + bl sub_020389B8 + cmp r0, #0 + bne _0223BFD2 + ldr r0, _0223C000 ; =0x00000015 + bl sub_02006514 +_0223BFD2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BFD4: .word 0x0000244C +_0223BFD8: .word 0x00002445 +_0223BFDC: .word 0x00002420 +_0223BFE0: .word 0x00002414 +_0223BFE4: .word 0x00002478 +_0223BFE8: .word 0x000023FD +_0223BFEC: .word 0x00002434 +_0223BFF0: .word 0x00000704 +_0223BFF4: .word 0x0000247C +_0223BFF8: .word 0x0000000B +_0223BFFC: .word 0x0000000C +_0223C000: .word 0x00000015 + thumb_func_end ov16_0223BCB4 + + thumb_func_start ov16_0223C004 +ov16_0223C004: ; 0x0223C004 + push {r4, r5, r6, r7, lr} + sub sp, #0x9c + add r5, r0, #0 + add r4, r1, #0 + bl sub_0201FF00 + mov r0, #0 + bl sub_0200F338 + mov r0, #1 + bl sub_0200F338 + ldr r6, _0223C1EC ; =0x0226E32C + add r3, sp, #0x20 + mov r2, #5 +_0223C022: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223C022 + add r0, sp, #0x20 + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + ldr r6, _0223C1F0 ; =0x0226E26C + add r3, sp, #0x10 + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r1, _0223C1F4 ; =0x000023FF + mov r0, #1 + ldrb r2, [r5, r1] + ldr r6, _0223C1F8 ; =0x0226E3F8 + add r3, sp, #0x48 + bic r2, r0 + mov r0, #1 + orr r0, r2 + strb r0, [r5, r1] + mov r2, #0xa +_0223C090: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223C090 + ldr r0, [r6, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + add r2, sp, #0x48 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #2 + add r2, sp, #0x64 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #3 + add r2, sp, #0x80 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + ldr r1, _0223C1FC ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r2, r0 + strh r2, [r1] + add r1, r0, #0 + bl sub_0201FF0C + add r0, r4, #0 + bl ov16_02268744 + add r0, r5, #0 + bl ov16_0223EDE0 + add r7, r0, #0 + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #5 + mov r1, #1 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0xa + bl sub_0200E218 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + ldr r1, _0223C200 ; =0x00002404 + mov r0, #7 + ldr r1, [r5, r1] + add r2, r4, #0 + add r1, r1, #3 + mov r3, #3 + bl sub_02006E3C + add r0, r5, #0 + bl ov16_0223EC04 + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r2, _0223C200 ; =0x00002404 + ldr r0, [r5, #0x28] + ldr r3, [r5, r2] + mov r1, #7 + lsl r2, r3, #1 + add r2, r3, r2 + add r2, #0xac + add r2, r2, r6 + mov r3, #5 + bl sub_02003050 + add r0, r7, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xa0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + mov r1, #0x26 + mov r3, #5 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xb0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + mov r1, #0xe + mov r2, #7 + mov r3, #5 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #7 + mov r1, #2 + add r2, r4, #0 + mov r3, #3 + bl sub_02006E60 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _0223C204 ; =0xFFFF1FFF + ldr r3, _0223C208 ; =0x04001000 + and r2, r1 + str r2, [r0, #0] + ldr r2, [r3, #0] + and r1, r2 + add r2, r0, #0 + str r1, [r3, #0] + add r2, #0x48 + ldrh r3, [r2] + mov r1, #0x3f + add r0, #0x4a + bic r3, r1 + strh r3, [r2] + ldrh r2, [r0] + bic r2, r1 + strh r2, [r0] + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r0, _0223C20C ; =ov16_0223CE68 + add r1, r5, #0 + bl sub_02017798 + add sp, #0x9c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223C1EC: .word 0x0226E32C +_0223C1F0: .word 0x0226E26C +_0223C1F4: .word 0x000023FF +_0223C1F8: .word 0x0226E3F8 +_0223C1FC: .word 0x04000008 +_0223C200: .word 0x00002404 +_0223C204: .word 0xFFFF1FFF +_0223C208: .word 0x04001000 +_0223C20C: .word ov16_0223CE68 + thumb_func_end ov16_0223C004 + + thumb_func_start ov16_0223C210 +ov16_0223C210: ; 0x0223C210 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov16_0223E22C + add r4, r0, #0 + mov r0, #0x5f + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0 + add r3, r4, #0 + bl ov16_022686CC + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #1 + add r3, r4, #0 + bl ov16_022686CC + add r0, r5, #0 + bl ov16_0223DF10 + str r0, [sp] + ldr r0, [r5, #0x44] + mov r4, #0 + cmp r0, #0 + ble _0223C282 + add r6, r5, #0 +_0223C24C: + ldr r1, [sp] + add r0, r5, #0 + mov r2, #2 + add r3, r4, #0 + bl ov16_0225B45C + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0223DFAC + mov r1, #0x9b + mov r2, #0 + bl sub_02074470 + add r2, r0, #0 + ldr r1, [r6, #0x34] + add r0, r5, #0 + add r3, r7, #0 + bl ov16_0225C038 + ldr r0, [r5, #0x44] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, r0 + blt _0223C24C +_0223C282: + bl ov16_0223DECC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0223C210 + + thumb_func_start ov16_0223C288 +ov16_0223C288: ; 0x0223C288 + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #3 + bl sub_02019044 + add r0, r4, #0 + bl ov16_022687A0 + pop {r4, pc} + thumb_func_end ov16_0223C288 + + thumb_func_start ov16_0223C2BC +ov16_0223C2BC: ; 0x0223C2BC + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223C2BC + + thumb_func_start ov16_0223C2C0 +ov16_0223C2C0: ; 0x0223C2C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + add r4, r0, #0 + ldr r0, [r1, #0] + str r1, [sp, #4] + str r0, [r4, #0x2c] + mov r7, #0 + add r6, r4, #0 + add r5, r1, #0 +_0223C2D2: + mov r0, #5 + bl sub_02025E6C + add r1, r0, #0 + add r0, r5, #0 + str r1, [r6, #0x48] + add r0, #0xf8 + ldr r0, [r0, #0] + bl sub_02025E80 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r7, r7, #1 + str r0, [r6, #0x78] + add r6, r6, #4 + add r5, r5, #4 + cmp r7, #4 + blt _0223C2D2 + mov r1, #0x1b + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldrh r1, [r0, r1] + ldr r0, _0223C62C ; =0x00002446 + ldr r3, [sp, #4] + strh r1, [r4, r0] + mov r0, #0x1a + ldr r1, _0223C630 ; =0x00002468 + mov r6, #0 + add r5, r4, #0 + lsl r0, r0, #4 +_0223C310: + ldr r2, [r3, r0] + add r6, r6, #1 + str r2, [r5, r1] + add r3, r3, #4 + add r5, r5, #4 + cmp r6, #4 + blt _0223C310 + bl sub_0201D2D0 + ldr r1, _0223C634 ; =0x00002434 + ldr r2, [sp, #4] + str r0, [r4, r1] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r3, [r2, r0] + add r2, r1, #0 + add r2, #0x14 + str r3, [r4, r2] + ldr r2, [sp, #4] + ldr r3, [r2, r0] + add r2, r1, #0 + add r2, #0x18 + str r3, [r4, r2] + ldr r2, [sp, #4] + sub r0, #0x10 + ldr r0, [r2, r0] + sub r1, #0x28 + str r0, [r4, r1] + mov r0, #5 + bl sub_0207D3C0 + str r0, [r4, #0x58] + mov r1, #0x42 + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + ldr r1, [r4, #0x58] + bl sub_0207D3EC + mov r0, #5 + bl sub_02026324 + str r0, [r4, #0x60] + mov r1, #0x11 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + ldr r1, [r4, #0x60] + bl sub_02026338 + mov r1, #0x45 + lsl r1, r1, #2 + ldr r0, [sp, #4] + add r2, r1, #0 + ldr r0, [r0, r1] + add r3, r1, #0 + str r0, [r4, #0x64] + ldr r0, [sp, #4] + add r2, #0x1c + ldr r2, [r0, r2] + add r0, r1, #0 + add r0, #0xa0 + str r2, [r4, r0] + add r2, r1, #0 + ldr r0, [sp, #4] + add r2, #0x38 + ldr r2, [r0, r2] + add r0, r1, #0 + add r0, #0xa4 + str r2, [r4, r0] + add r2, r1, #0 + ldr r0, [sp, #4] + sub r2, #8 + ldr r0, [r0, r2] + add r2, r1, #0 + str r0, [r4, #0x5c] + ldr r0, [sp, #4] + add r2, #0xa4 + ldr r2, [r0, r2] + add r0, r1, #0 + add r0, #0xac + str r2, [r4, r0] + add r2, r1, #0 + ldr r0, [sp, #4] + add r2, #0x14 + ldr r2, [r0, r2] + add r0, r4, #0 + add r0, #0x98 + str r2, [r0, #0] + add r2, r1, #0 + ldr r0, [sp, #4] + add r2, #0x50 + ldr r2, [r0, r2] + ldr r0, _0223C638 ; =0x00002424 + add r3, #0x20 + str r2, [r4, r0] + ldr r2, [sp, #4] + ldr r3, [r2, r3] + add r2, r4, #0 + add r2, #0x9c + str r3, [r2, #0] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x7c + ldr r3, [r2, r3] + add r2, r0, #0 + sub r2, #0x10 + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x40 + ldr r3, [r2, r3] + add r2, r0, #0 + sub r2, #0x24 + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x3c + ldr r3, [r2, r3] + add r2, r0, #0 + sub r2, #0x20 + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x44 + ldr r3, [r2, r3] + add r2, r0, #0 + sub r2, #0x1c + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x4c + ldr r3, [r2, r3] + add r2, r0, #0 + sub r2, #0x14 + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x80 + ldr r3, [r2, r3] + add r2, r0, #0 + sub r2, #8 + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x54 + ldr r3, [r2, r3] + add r2, r0, #4 + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x58 + ldr r3, [r2, r3] + add r2, r0, #0 + add r2, #0xc + str r3, [r4, r2] + add r3, r1, #0 + ldr r2, [sp, #4] + add r3, #0x60 + ldr r2, [r2, r3] + add r0, #8 + str r2, [r4, r0] + ldr r0, [sp, #4] + add r1, #0x30 + ldr r0, [r0, r1] + mov r1, #0x87 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp, #4] + sub r1, #0xd8 + ldr r0, [r0, r1] + cmp r0, #0 + bne _0223C46E + bl sub_02022974 +_0223C46E: + ldr r5, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r4, [sp, #0x34] + add r6, r5, #0 + add r7, r4, #0 +_0223C47A: + ldr r0, [sp, #0x34] + ldr r1, [r5, #0x18] + add r0, #0xa0 + strh r1, [r0] + add r3, r6, #0 + add r2, r7, #0 + mov r0, #6 + add r3, #0x28 + add r2, #0xac + mov ip, r0 +_0223C48E: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, ip + sub r0, r0, #1 + mov ip, r0 + bne _0223C48E + ldr r0, [r3, #0] + add r5, r5, #4 + str r0, [r2, #0] + ldr r0, [sp, #0x34] + add r6, #0x34 + add r0, r0, #2 + str r0, [sp, #0x34] + ldr r0, [sp, #8] + add r7, #0x34 + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #4 + blt _0223C47A + add r0, r4, #0 + bl ov16_0224B940 + str r0, [r4, #0x30] + mov r6, #0 + add r5, r4, #0 + mov r7, #5 +_0223C4C2: + add r0, r7, #0 + bl sub_02079FF4 + str r0, [r5, #0x68] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0223C4C2 + mov r0, #0 + ldr r6, [sp, #4] + str r0, [sp, #0xc] +_0223C4D8: + ldr r0, [r6, #4] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223C50A +_0223C4E4: + ldr r0, [r6, #4] + add r1, r5, #0 + bl sub_0207A0FC + add r7, r0, #0 + bl sub_02075D6C + str r0, [sp, #0x44] + add r0, r7, #0 + mov r1, #0x6f + add r2, sp, #0x44 + bl sub_02074B30 + ldr r0, [r6, #4] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223C4E4 +_0223C50A: + ldr r0, [sp, #0xc] + add r6, r6, #4 + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #4 + blt _0223C4D8 + ldr r0, [r4, #0x2c] + mov r1, #4 + tst r1, r0 + bne _0223C520 + b _0223C8CC +_0223C520: + add r0, r4, #0 + bl sub_0207A6DC + add r0, r4, #0 + bl ov16_0223F6E4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x38] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_0223DD90 + ldr r1, [r4, #0x2c] + mov r0, #0x80 + tst r0, r1 + beq _0223C606 + ldr r6, _0223C63C ; =0x0226E560 + mov r5, #0 + add r7, r4, #0 +_0223C548: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + str r0, [r7, #0x34] + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #4 + blt _0223C548 + str r5, [r4, #0x44] + mov r6, #0 + add r5, r4, #0 +_0223C56A: + ldr r1, [r5, #0x34] + add r0, r4, #0 + bl ov16_02263730 + ldr r0, [sp, #4] + ldr r1, [r5, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [sp, #4] + add r6, r6, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223C56A + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0x44] + cmp r0, #0 + ble _0223C5FC + add r7, r4, #0 +_0223C596: + ldr r0, [r7, #0x68] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223C5E0 +_0223C5A2: + ldr r0, [r7, #0x68] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C5D4 + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C5D4 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C5E0 +_0223C5D4: + ldr r0, [r7, #0x68] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223C5A2 +_0223C5E0: + str r5, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x10] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #0x10] + ldr r1, [r4, #0x44] + add r0, r0, #1 + add r7, r7, #4 + str r0, [sp, #0x10] + cmp r0, r1 + blt _0223C596 +_0223C5FC: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + b _0223C8C2 +_0223C606: + mov r0, #8 + tst r0, r1 + beq _0223C702 + mov r5, #0 + add r6, r4, #0 +_0223C610: + add r0, sp, #0x40 + strb r5, [r0] + ldr r1, [sp, #0x38] + add r0, r4, #0 + bl ov16_0223F6F0 + lsl r1, r5, #0x10 + add r7, r0, #0 + add r0, r4, #0 + lsr r1, r1, #0x10 + bl ov16_0223F6F0 + ldr r1, _0223C640 ; =0x0226E28C + b _0223C644 + ; .align 2, 0 +_0223C62C: .word 0x00002446 +_0223C630: .word 0x00002468 +_0223C634: .word 0x00002434 +_0223C638: .word 0x00002424 +_0223C63C: .word 0x0226E560 +_0223C640: .word 0x0226E28C +_0223C644: + lsl r2, r7, #2 + add r1, r1, r2 + ldrb r1, [r0, r1] + add r0, sp, #0x40 + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + str r0, [r6, #0x34] + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #4 + blt _0223C610 + str r5, [r4, #0x44] + mov r6, #0 + add r5, r4, #0 +_0223C666: + ldr r1, [r5, #0x34] + add r0, r4, #0 + bl ov16_02263730 + ldr r0, [sp, #4] + ldr r1, [r5, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [sp, #4] + add r6, r6, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223C666 + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r4, #0x44] + cmp r0, #0 + ble _0223C6F8 + add r7, r4, #0 +_0223C692: + ldr r0, [r7, #0x68] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223C6DC +_0223C69E: + ldr r0, [r7, #0x68] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C6D0 + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C6D0 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C6DC +_0223C6D0: + ldr r0, [r7, #0x68] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223C69E +_0223C6DC: + str r5, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x14] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #0x14] + ldr r1, [r4, #0x44] + add r0, r0, #1 + add r7, r7, #4 + str r0, [sp, #0x14] + cmp r0, r1 + blt _0223C692 +_0223C6F8: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + b _0223C8C2 +_0223C702: + mov r0, #2 + tst r0, r1 + bne _0223C70A + b _0223C816 +_0223C70A: + ldr r0, [sp, #0x38] + ldr r1, _0223C9DC ; =0x0226E264 + lsl r0, r0, #2 + mov r5, #0 + add r6, r1, r0 + add r7, r4, #0 +_0223C716: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + add r1, r0, #0 + add r0, r4, #0 + str r1, [r7, #0x34] + bl ov16_02263730 + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #4 + blt _0223C716 + str r5, [r4, #0x44] + mov r6, #0 + add r5, r4, #0 +_0223C740: + ldr r0, [sp, #4] + ldr r1, [r5, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [sp, #4] + add r6, r6, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223C740 + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #0x44] + cmp r0, #0 + ble _0223C814 +_0223C762: + ldr r0, [sp, #0x18] + mov r1, #1 + and r0, r1 + str r0, [sp, #0x30] + lsl r0, r0, #2 + add r7, r4, r0 + ldr r0, [r7, #0x68] + mov r6, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223C7FA +_0223C77A: + ldr r0, [r7, #0x68] + add r1, r6, #0 + bl sub_0207A0FC + ldr r1, [sp, #0x18] + add r5, r0, #0 + cmp r1, #1 + ble _0223C7C6 + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x30] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B45C + cmp r6, r0 + beq _0223C7EE + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C7EE + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C7EE + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C7FA + b _0223C7EE +_0223C7C6: + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C7EE + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C7EE + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C7FA +_0223C7EE: + ldr r0, [r7, #0x68] + add r6, r6, #1 + bl sub_0207A0F8 + cmp r6, r0 + blt _0223C77A +_0223C7FA: + str r6, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x18] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #0x18] + ldr r1, [r4, #0x44] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, r1 + blt _0223C762 +_0223C814: + b _0223C8C2 +_0223C816: + ldr r0, [sp, #0x38] + ldr r1, _0223C9E0 ; =0x0226E260 + lsl r0, r0, #1 + mov r5, #0 + add r6, r1, r0 + add r7, r4, #0 +_0223C822: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + add r1, r0, #0 + add r0, r4, #0 + str r1, [r7, #0x34] + bl ov16_02263730 + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #2 + blt _0223C822 + mov r0, #0 + str r5, [r4, #0x44] + str r0, [sp, #0x1c] + add r7, r4, #0 +_0223C84E: + ldr r0, [sp, #4] + ldr r1, [r7, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [r7, #0x68] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223C8A2 +_0223C864: + ldr r0, [r7, #0x68] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C896 + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C896 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C8A2 +_0223C896: + ldr r0, [r7, #0x68] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223C864 +_0223C8A2: + str r5, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x1c] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #4] + add r7, r7, #4 + add r0, r0, #4 + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #4 + blt _0223C84E +_0223C8C2: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + b _0223CC84 +_0223C8CC: + mov r1, #0x10 + tst r1, r0 + beq _0223C9D2 + ldr r6, _0223C9E4 ; =0x0226E560 + mov r5, #0 + add r7, r4, #0 +_0223C8D8: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + add r1, r0, #0 + add r0, r4, #0 + str r1, [r7, #0x34] + bl ov16_02263730 + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #4 + blt _0223C8D8 + str r5, [r4, #0x44] + mov r6, #0 + add r5, r4, #0 +_0223C902: + ldr r0, [sp, #4] + ldr r1, [r5, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [sp, #4] + add r6, r6, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223C902 + ldr r0, [r4, #0x44] + mov r7, #0 + cmp r0, #0 + ble _0223C9C2 +_0223C922: + add r0, r4, #0 + add r1, r7, #0 + mov r5, #0 + bl ov16_0223DF60 + cmp r0, #0 + ble _0223C9A6 +_0223C930: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov16_0223DFAC + add r6, r0, #0 + cmp r7, #2 + bne _0223C970 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C998 + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C998 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C998 + ldr r0, [sp, #0x3c] + cmp r0, r5 + bne _0223C9A6 + b _0223C998 +_0223C970: + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223C998 + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C998 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223C9A6 +_0223C998: + add r0, r4, #0 + add r1, r7, #0 + add r5, r5, #1 + bl ov16_0223DF60 + cmp r5, r0 + blt _0223C930 +_0223C9A6: + str r5, [sp] + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #2 + add r3, r7, #0 + bl ov16_0225B540 + cmp r7, #0 + bne _0223C9BA + str r5, [sp, #0x3c] +_0223C9BA: + ldr r0, [r4, #0x44] + add r7, r7, #1 + cmp r7, r0 + blt _0223C922 +_0223C9C2: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + ldr r0, _0223C9E8 ; =0x000023FC + mov r1, #1 + strb r1, [r4, r0] + b _0223CC84 +_0223C9D2: + mov r1, #8 + tst r1, r0 + beq _0223CAB4 + ldr r6, _0223C9E4 ; =0x0226E560 + b _0223C9EC + ; .align 2, 0 +_0223C9DC: .word 0x0226E264 +_0223C9E0: .word 0x0226E260 +_0223C9E4: .word 0x0226E560 +_0223C9E8: .word 0x000023FC +_0223C9EC: + mov r5, #0 + add r7, r4, #0 +_0223C9F0: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + add r1, r0, #0 + add r0, r4, #0 + str r1, [r7, #0x34] + bl ov16_02263730 + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #4 + blt _0223C9F0 + str r5, [r4, #0x44] + mov r6, #0 + add r5, r4, #0 +_0223CA1A: + ldr r0, [sp, #4] + ldr r1, [r5, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [sp, #4] + add r6, r6, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223CA1A + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [r4, #0x44] + cmp r0, #0 + ble _0223CAA4 + add r7, r4, #0 +_0223CA3E: + ldr r0, [r7, #0x68] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223CA88 +_0223CA4A: + ldr r0, [r7, #0x68] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223CA7C + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CA7C + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CA88 +_0223CA7C: + ldr r0, [r7, #0x68] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223CA4A +_0223CA88: + str r5, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x20] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #0x20] + ldr r1, [r4, #0x44] + add r0, r0, #1 + add r7, r7, #4 + str r0, [sp, #0x20] + cmp r0, r1 + blt _0223CA3E +_0223CAA4: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + ldr r0, _0223CD28 ; =0x000023FC + mov r1, #1 + strb r1, [r4, r0] + b _0223CC84 +_0223CAB4: + mov r1, #2 + tst r0, r1 + bne _0223CABC + b _0223CBD0 +_0223CABC: + ldr r6, _0223CD2C ; =0x0226E560 + mov r5, #0 + add r7, r4, #0 +_0223CAC2: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + add r1, r0, #0 + add r0, r4, #0 + str r1, [r7, #0x34] + bl ov16_02263730 + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #4 + blt _0223CAC2 + str r5, [r4, #0x44] + mov r6, #0 + add r5, r4, #0 +_0223CAEC: + ldr r0, [sp, #4] + ldr r1, [r5, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [sp, #4] + add r6, r6, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223CAEC + mov r0, #0 + str r0, [sp, #0x24] + ldr r0, [r4, #0x44] + cmp r0, #0 + ble _0223CBC0 +_0223CB0E: + ldr r0, [sp, #0x24] + mov r1, #1 + and r0, r1 + str r0, [sp, #0x2c] + lsl r0, r0, #2 + add r7, r4, r0 + ldr r0, [r7, #0x68] + mov r6, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223CBA6 +_0223CB26: + ldr r0, [r7, #0x68] + add r1, r6, #0 + bl sub_0207A0FC + ldr r1, [sp, #0x24] + add r5, r0, #0 + cmp r1, #1 + ble _0223CB72 + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x2c] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B45C + cmp r6, r0 + beq _0223CB9A + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223CB9A + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CB9A + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CBA6 + b _0223CB9A +_0223CB72: + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223CB9A + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CB9A + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CBA6 +_0223CB9A: + ldr r0, [r7, #0x68] + add r6, r6, #1 + bl sub_0207A0F8 + cmp r6, r0 + blt _0223CB26 +_0223CBA6: + str r6, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x24] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #0x24] + ldr r1, [r4, #0x44] + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, r1 + blt _0223CB0E +_0223CBC0: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + ldr r0, _0223CD28 ; =0x000023FC + mov r1, #1 + strb r1, [r4, r0] + b _0223CC84 +_0223CBD0: + ldr r6, _0223CD30 ; =0x0226E25C + mov r5, #0 + add r7, r4, #0 +_0223CBD6: + add r0, sp, #0x40 + strb r5, [r0] + ldrb r1, [r6] + strb r1, [r0, #1] + add r0, r4, #0 + add r1, sp, #0x40 + bl ov16_0225BFFC + add r1, r0, #0 + add r0, r4, #0 + str r1, [r7, #0x34] + bl ov16_02263730 + add r5, r5, #1 + add r6, r6, #1 + add r7, r7, #4 + cmp r5, #2 + blt _0223CBD6 + mov r0, #0 + str r5, [r4, #0x44] + str r0, [sp, #0x28] + add r7, r4, #0 +_0223CC02: + ldr r0, [sp, #4] + ldr r1, [r7, #0x68] + ldr r0, [r0, #4] + bl sub_0207A21C + ldr r0, [r7, #0x68] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223CC56 +_0223CC18: + ldr r0, [r7, #0x68] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0223CC4A + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CC4A + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223CC56 +_0223CC4A: + ldr r0, [r7, #0x68] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223CC18 +_0223CC56: + str r5, [sp] + ldr r1, [r4, #0x30] + ldr r3, [sp, #0x28] + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B540 + ldr r0, [sp, #4] + add r7, r7, #4 + add r0, r0, #4 + str r0, [sp, #4] + ldr r0, [sp, #0x28] + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, #4 + blt _0223CC02 + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_0225A1B0 + ldr r0, _0223CD28 ; =0x000023FC + mov r1, #1 + strb r1, [r4, r0] +_0223CC84: + mov r0, #2 + ldr r1, [r4, #0x2c] + lsl r0, r0, #8 + tst r0, r1 + beq _0223CCA0 + ldr r0, [r4, #0x6c] + mov r1, #0 + bl sub_0207A0FC + add r2, r4, #0 + mov r1, #0x90 + add r2, #0xf4 + bl sub_02074470 +_0223CCA0: + ldr r1, [r4, #0x2c] + mov r0, #1 + tst r0, r1 + beq _0223CD22 + add r0, r4, #0 + add r0, #0xe1 + ldrb r0, [r0] + bl ov16_0223CD3C + cmp r0, #1 + beq _0223CCC2 + ldr r0, _0223CD34 ; =0x00000149 + ldrb r0, [r4, r0] + bl ov16_0223CD3C + cmp r0, #1 + bne _0223CD22 +_0223CCC2: + ldr r0, [r4, #0x68] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223CCF2 + ldr r6, _0223CD38 ; =0x00002408 + mov r7, #3 +_0223CCD2: + ldr r0, [r4, #0x68] + add r1, r5, #0 + bl sub_0207A0FC + ldr r2, [r4, r6] + add r1, r7, #0 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + bl sub_02075C74 + ldr r0, [r4, #0x68] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223CCD2 +_0223CCF2: + ldr r0, [r4, #0x70] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0223CD22 + ldr r6, _0223CD38 ; =0x00002408 + mov r7, #3 +_0223CD02: + ldr r0, [r4, #0x70] + add r1, r5, #0 + bl sub_0207A0FC + ldr r2, [r4, r6] + add r1, r7, #0 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + bl sub_02075C74 + ldr r0, [r4, #0x70] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0223CD02 +_0223CD22: + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CD28: .word 0x000023FC +_0223CD2C: .word 0x0226E560 +_0223CD30: .word 0x0226E25C +_0223CD34: .word 0x00000149 +_0223CD38: .word 0x00002408 + thumb_func_end ov16_0223C2C0 + + thumb_func_start ov16_0223CD3C +ov16_0223CD3C: ; 0x0223CD3C + sub r0, #0x3e + cmp r0, #0x11 + bhi _0223CD76 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223CD4E: ; jump table + .short _0223CD72 - _0223CD4E - 2 ; case 0 + .short _0223CD76 - _0223CD4E - 2 ; case 1 + .short _0223CD72 - _0223CD4E - 2 ; case 2 + .short _0223CD72 - _0223CD4E - 2 ; case 3 + .short _0223CD72 - _0223CD4E - 2 ; case 4 + .short _0223CD72 - _0223CD4E - 2 ; case 5 + .short _0223CD72 - _0223CD4E - 2 ; case 6 + .short _0223CD72 - _0223CD4E - 2 ; case 7 + .short _0223CD76 - _0223CD4E - 2 ; case 8 + .short _0223CD76 - _0223CD4E - 2 ; case 9 + .short _0223CD76 - _0223CD4E - 2 ; case 10 + .short _0223CD76 - _0223CD4E - 2 ; case 11 + .short _0223CD72 - _0223CD4E - 2 ; case 12 + .short _0223CD72 - _0223CD4E - 2 ; case 13 + .short _0223CD72 - _0223CD4E - 2 ; case 14 + .short _0223CD72 - _0223CD4E - 2 ; case 15 + .short _0223CD72 - _0223CD4E - 2 ; case 16 + .short _0223CD72 - _0223CD4E - 2 ; case 17 +_0223CD72: + mov r0, #1 + bx lr +_0223CD76: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223CD3C + + thumb_func_start ov16_0223CD7C +ov16_0223CD7C: ; 0x0223CD7C + push {r3, lr} + sub sp, #8 + mov r2, #2 + mov r1, #0 + ldr r0, _0223CD98 ; =ov16_0223CD9C + str r2, [sp] + str r0, [sp, #4] + mov r0, #5 + add r3, r1, #0 + bl sub_02024220 + add sp, #8 + pop {r3, pc} + nop +_0223CD98: .word ov16_0223CD9C + thumb_func_end ov16_0223CD7C + + thumb_func_start ov16_0223CD9C +ov16_0223CD9C: ; 0x0223CD9C + push {r3, lr} + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _0223CE08 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r2, [r0] + ldr r1, _0223CE0C ; =0xFFFFCFFD + and r2, r1 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0223CE10 ; =0x0000CFFB + and r3, r2 + strh r3, [r0] + ldrh r3, [r0] + sub r2, #0x1c + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r0, #0 + ldr r2, _0223CE14 ; =0x00007FFF + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _0223CE18 ; =0xBFFF0000 + ldr r0, _0223CE1C ; =0x04000580 + str r1, [r0, #0] + pop {r3, pc} + ; .align 2, 0 +_0223CE08: .word 0x04000008 +_0223CE0C: .word 0xFFFFCFFD +_0223CE10: .word 0x0000CFFB +_0223CE14: .word 0x00007FFF +_0223CE18: .word 0xBFFF0000 +_0223CE1C: .word 0x04000580 + thumb_func_end ov16_0223CD9C + + thumb_func_start ov16_0223CE20 +ov16_0223CE20: ; 0x0223CE20 + ldr r3, _0223CE24 ; =sub_020242C4 + bx r3 + ; .align 2, 0 +_0223CE24: .word sub_020242C4 + thumb_func_end ov16_0223CE20 + + thumb_func_start ov16_0223CE28 +ov16_0223CE28: ; 0x0223CE28 + push {r3, r4, r5, lr} + ldr r3, _0223CE60 ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _0223CE64 ; =0x02100DF4 + mov r1, #0 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0xc0 + add r2, r1, #0 + blx r3 + add r5, r0, #0 + cmp r4, #0 + bne _0223CE50 + bl sub_02022974 +_0223CE50: + cmp r5, #0 + bne _0223CE58 + bl sub_02022974 +_0223CE58: + bl sub_02014000 + pop {r3, r4, r5, pc} + nop +_0223CE60: .word 0x02100DEC +_0223CE64: .word 0x02100DF4 + thumb_func_end ov16_0223CE28 + + thumb_func_start ov16_0223CE68 +ov16_0223CE68: ; 0x0223CE68 + push {r3, r4, r5, lr} + sub sp, #0x50 + ldr r1, _0223CF00 ; =0x000023FF + add r4, r0, #0 + ldrb r2, [r4, r1] + lsl r0, r2, #0x1f + lsr r0, r0, #0x1f + beq _0223CE88 + mov r0, #1 + bic r2, r0 + strb r2, [r4, r1] + ldr r0, _0223CF04 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, _0223CF08 ; =0x04001050 + strh r1, [r0] +_0223CE88: + ldr r1, _0223CF00 ; =0x000023FF + ldrb r2, [r4, r1] + lsl r0, r2, #0x1e + lsr r0, r0, #0x1f + beq _0223CEAC + mov r0, #2 + bic r2, r0 + strb r2, [r4, r1] + ldr r5, _0223CF0C ; =0x0226E354 + add r3, sp, #0x28 + mov r2, #5 +_0223CE9E: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223CE9E + add r0, sp, #0x28 + bl sub_0201FE94 +_0223CEAC: + ldr r1, _0223CF00 ; =0x000023FF + ldrb r2, [r4, r1] + lsl r0, r2, #0x1d + lsr r0, r0, #0x1f + beq _0223CED0 + mov r0, #4 + bic r2, r0 + strb r2, [r4, r1] + ldr r5, _0223CF10 ; =0x0226E37C + add r3, sp, #0 + mov r2, #5 +_0223CEC2: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223CEC2 + add r0, sp, #0 + bl sub_0201FE94 +_0223CED0: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_02008A94 + bl sub_0201DCAC + bl sub_0200C800 + ldr r0, [r4, #0x28] + bl sub_02003694 + ldr r0, [r4, #4] + bl sub_0201C2B8 + ldr r3, _0223CF14 ; =0x027E0000 + ldr r1, _0223CF18 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + add sp, #0x50 + pop {r3, r4, r5, pc} + nop +_0223CF00: .word 0x000023FF +_0223CF04: .word 0x04000050 +_0223CF08: .word 0x04001050 +_0223CF0C: .word 0x0226E354 +_0223CF10: .word 0x0226E37C +_0223CF14: .word 0x027E0000 +_0223CF18: .word 0x00003FF8 + thumb_func_end ov16_0223CE68 + + thumb_func_start ov16_0223CF1C +ov16_0223CF1C: ; 0x0223CF1C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02003694 + bl sub_0201DCAC + ldr r0, [r4, #4] + bl sub_0201C2B8 + ldr r3, _0223CF40 ; =0x027E0000 + ldr r1, _0223CF44 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_0223CF40: .word 0x027E0000 +_0223CF44: .word 0x00003FF8 + thumb_func_end ov16_0223CF1C + + thumb_func_start ov16_0223CF48 +ov16_0223CF48: ; 0x0223CF48 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #4] + mov r0, #5 + bl sub_02038A1C + ldr r0, _0223CF88 ; =0x000023FD + ldrb r0, [r4, r0] + cmp r0, #0 + beq _0223CF60 + cmp r0, #3 + bne _0223CF86 +_0223CF60: + cmp r0, #0 + bne _0223CF68 + bl ov11_0221F8F0 +_0223CF68: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_02007768 + add r4, #0x94 + ldr r0, [r4, #0] + bl sub_0200C7EC + bl sub_0200C808 + mov r0, #1 + mov r1, #0 + bl sub_020241BC +_0223CF86: + pop {r4, pc} + ; .align 2, 0 +_0223CF88: .word 0x000023FD + thumb_func_end ov16_0223CF48 + + thumb_func_start ov16_0223CF8C +ov16_0223CF8C: ; 0x0223CF8C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov16_0223DF1C + str r0, [sp] + add r0, r5, #0 + mov r6, #0 + bl ov16_0223F450 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + beq _0223CFB2 + b _0223D0BC +_0223CFB2: + mov r0, #2 + tst r0, r4 + beq _0223CFD0 + mov r0, #1 + tst r0, r4 + beq _0223D0BC + ldr r0, _0223D0C0 ; =0x00000704 + add r1, r6, #0 + bl sub_020057A4 + add r0, r5, #0 + mov r1, #2 + bl ov16_0223F460 + pop {r3, r4, r5, r6, r7, pc} +_0223CFD0: + ldr r0, [sp] + add r4, r6, #0 + cmp r0, #0 + ble _0223D03E +_0223CFD8: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223DF14 + add r7, r0, #0 + bl ov16_02263AF0 + cmp r0, #0 + bne _0223CFF6 + add r0, r5, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0223D00E +_0223CFF6: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223E208 + cmp r0, #0 + bne _0223D036 + add r0, r5, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0223D036 +_0223D00E: + add r0, r7, #0 + bl ov16_02263B08 + add r1, r0, #0 + beq _0223D036 + ldr r0, [r1, #0x28] + ldr r1, [r1, #0x2c] + lsl r0, r0, #0x10 + lsl r1, r1, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + mov r2, #0x30 + bl sub_0208C104 + cmp r0, #1 + bne _0223D036 + add r0, r4, #0 + bl sub_020787CC + orr r6, r0 +_0223D036: + ldr r0, [sp] + add r4, r4, #1 + cmp r4, r0 + blt _0223CFD8 +_0223D03E: + cmp r6, #0 + beq _0223D064 + add r0, r5, #0 + bl ov16_0223F450 + cmp r0, #0 + bne _0223D064 + ldr r0, _0223D0C0 ; =0x00000704 + bl sub_02005748 + add r0, r5, #0 + mov r1, #1 + bl ov16_0223F460 + add r0, r5, #0 + mov r1, #4 + bl ov16_0223F48C + b _0223D082 +_0223D064: + cmp r6, #0 + bne _0223D082 + add r0, r5, #0 + bl ov16_0223F450 + cmp r0, #0 + beq _0223D082 + ldr r0, _0223D0C0 ; =0x00000704 + mov r1, #0 + bl sub_020057A4 + add r0, r5, #0 + mov r1, #0 + bl ov16_0223F460 +_0223D082: + add r0, r5, #0 + bl ov16_0223F450 + cmp r0, #0 + beq _0223D0BC + add r0, r5, #0 + bl ov16_0223F47C + add r4, r0, #0 + ldr r0, _0223D0C0 ; =0x00000704 + bl sub_020057D4 + cmp r0, #0 + bne _0223D0BC + sub r1, r4, #1 + bne _0223D0B2 + ldr r0, _0223D0C0 ; =0x00000704 + bl sub_02005748 + add r0, r5, #0 + mov r1, #4 + bl ov16_0223F48C + pop {r3, r4, r5, r6, r7, pc} +_0223D0B2: + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov16_0223F48C +_0223D0BC: + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D0C0: .word 0x00000704 + thumb_func_end ov16_0223CF8C + + thumb_func_start ov16_0223D0C4 +ov16_0223D0C4: ; 0x0223D0C4 + push {r3, r4, r5, lr} + ldr r3, _0223D0F0 ; =0x00002438 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, r3] + mov r1, #1 + add r0, r0, #3 + str r0, [r4, r3] + ldr r0, [r4, #4] + ldr r3, [r4, r3] + mov r2, #3 + bl sub_02019184 + ldr r0, _0223D0F0 ; =0x00002438 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223D0EC + add r0, r5, #0 + bl sub_0200DA58 +_0223D0EC: + pop {r3, r4, r5, pc} + nop +_0223D0F0: .word 0x00002438 + thumb_func_end ov16_0223D0C4 + + thumb_func_start ov16_0223D0F4 +ov16_0223D0F4: ; 0x0223D0F4 + push {r3, lr} + bl sub_020389B8 + cmp r0, #0 + bne _0223D106 + ldr r0, _0223D108 ; =0x00000015 + mov r1, #2 + bl sub_02006590 +_0223D106: + pop {r3, pc} + ; .align 2, 0 +_0223D108: .word 0x00000015 + thumb_func_end ov16_0223D0F4 + + thumb_func_start ov16_0223D10C +ov16_0223D10C: ; 0x0223D10C + push {r4, r5, r6, lr} + sub sp, #0x68 + add r4, r1, #0 + ldr r1, _0223D330 ; =0x00001028 + mov r2, #5 + bl sub_0200681C + add r5, r0, #0 + ldr r0, _0223D334 ; =0x00001020 + str r4, [r5, #0] + mov r2, #0 + strb r2, [r5, r0] + add r1, r0, #1 + strb r2, [r5, r1] + add r0, r0, #2 + strh r2, [r5, r0] + mov r0, #5 + bl sub_02002F38 + str r0, [r5, #0xc] + mov r1, #1 + bl sub_02003858 + mov r2, #2 + ldr r0, [r5, #0xc] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #5 + bl sub_02002F70 + mov r1, #0 + mov r0, #1 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + mov r2, #2 + add r3, r1, #0 + bl sub_020038B0 + mov r0, #5 + bl sub_02018340 + str r0, [r5, #4] + mov r0, #5 + mov r1, #1 + bl sub_0201A778 + str r0, [r5, #8] + add r0, r5, #0 + bl sub_0207A744 + bl sub_0201FF00 + ldr r6, _0223D338 ; =0x0226E304 + add r3, sp, #0x40 + mov r2, #5 +_0223D17E: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223D17E + add r0, sp, #0x40 + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #5 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #8 + bl sub_020C4AF0 + ldr r6, _0223D33C ; =0x0226E27C + add r3, sp, #0x30 + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r6, _0223D340 ; =0x0226E2C8 + add r3, sp, #0x14 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r5, #4] + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02019EBC + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02027B50 + add r4, r0, #0 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r1, #1 + ldr r0, [r5, #4] + add r2, r1, #0 + mov r3, #0xa + bl sub_0200E218 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xb0 + str r0, [sp, #8] + ldr r0, [r5, #0xc] + mov r1, #0xe + mov r2, #7 + mov r3, #5 + bl sub_02003050 + add r0, r4, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xa0 + str r0, [sp, #8] + ldr r0, [r5, #0xc] + mov r1, #0x26 + mov r3, #5 + bl sub_02003050 + mov r1, #0 + mov r0, #1 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + add r2, r1, #0 + add r3, r1, #0 + bl sub_020038B0 + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r5, #4] + ldr r1, [r5, #8] + mov r2, #1 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, [r5, #8] + mov r1, #0xff + bl sub_0201ADA4 + ldr r0, [r5, #8] + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r2, #0x17 + mov r0, #1 + mov r1, #0x1a + lsl r2, r2, #4 + mov r3, #5 + bl sub_0200B144 + add r4, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + mov r1, #5 + bl sub_02023790 + add r6, r0, #0 + ldr r1, _0223D344 ; =0x0000039B + add r0, r4, #0 + add r2, r6, #0 + bl sub_0200B1B8 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + ldr r0, [r5, #8] + mov r1, #1 + add r2, r6, #0 + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B190 + ldr r0, _0223D348 ; =ov16_0223CF1C + add r1, r5, #0 + bl sub_02017798 + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + str r3, [sp, #8] + ldr r0, [r5, #0xc] + ldr r2, _0223D34C ; =0x0000FFFF + mov r1, #5 + bl sub_02003178 + ldr r0, [r5, #8] + mov r1, #1 + bl sub_0200E7FC + ldr r1, _0223D350 ; =0x00001024 + str r0, [r5, r1] + bl ov16_0223DECC + add sp, #0x68 + pop {r4, r5, r6, pc} + nop +_0223D330: .word 0x00001028 +_0223D334: .word 0x00001020 +_0223D338: .word 0x0226E304 +_0223D33C: .word 0x0226E27C +_0223D340: .word 0x0226E2C8 +_0223D344: .word 0x0000039B +_0223D348: .word ov16_0223CF1C +_0223D34C: .word 0x0000FFFF +_0223D350: .word 0x00001024 + thumb_func_end ov16_0223D10C + + thumb_func_start ov16_0223D354 +ov16_0223D354: ; 0x0223D354 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + bl sub_0200682C + add r4, r0, #0 + ldr r1, [r4, #4] + mov r0, #5 + bl sub_02038A1C + ldr r0, _0223D658 ; =0x00001021 + mov r7, #0 + ldrb r1, [r4, r0] + cmp r1, #0x21 + bls _0223D372 + b _0223D798 +_0223D372: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223D37E: ; jump table + .short _0223D3C2 - _0223D37E - 2 ; case 0 + .short _0223D3D8 - _0223D37E - 2 ; case 1 + .short _0223D3EC - _0223D37E - 2 ; case 2 + .short _0223D3FC - _0223D37E - 2 ; case 3 + .short _0223D436 - _0223D37E - 2 ; case 4 + .short _0223D70E - _0223D37E - 2 ; case 5 + .short _0223D44E - _0223D37E - 2 ; case 6 + .short _0223D468 - _0223D37E - 2 ; case 7 + .short _0223D70E - _0223D37E - 2 ; case 8 + .short _0223D47C - _0223D37E - 2 ; case 9 + .short _0223D498 - _0223D37E - 2 ; case 10 + .short _0223D70E - _0223D37E - 2 ; case 11 + .short _0223D4AC - _0223D37E - 2 ; case 12 + .short _0223D4C6 - _0223D37E - 2 ; case 13 + .short _0223D70E - _0223D37E - 2 ; case 14 + .short _0223D4DA - _0223D37E - 2 ; case 15 + .short _0223D4F4 - _0223D37E - 2 ; case 16 + .short _0223D70E - _0223D37E - 2 ; case 17 + .short _0223D508 - _0223D37E - 2 ; case 18 + .short _0223D522 - _0223D37E - 2 ; case 19 + .short _0223D70E - _0223D37E - 2 ; case 20 + .short _0223D536 - _0223D37E - 2 ; case 21 + .short _0223D57A - _0223D37E - 2 ; case 22 + .short _0223D70E - _0223D37E - 2 ; case 23 + .short _0223D5B6 - _0223D37E - 2 ; case 24 + .short _0223D5EA - _0223D37E - 2 ; case 25 + .short _0223D70E - _0223D37E - 2 ; case 26 + .short _0223D624 - _0223D37E - 2 ; case 27 + .short _0223D664 - _0223D37E - 2 ; case 28 + .short _0223D70E - _0223D37E - 2 ; case 29 + .short _0223D6A0 - _0223D37E - 2 ; case 30 + .short _0223D6D4 - _0223D37E - 2 ; case 31 + .short _0223D70E - _0223D37E - 2 ; case 32 + .short _0223D77E - _0223D37E - 2 ; case 33 +_0223D3C2: + add r0, r7, #0 + bl sub_0200F338 + mov r0, #1 + bl sub_02036378 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D3D8: + ldr r0, [r4, #0xc] + bl sub_0200384C + cmp r0, #0 + bne _0223D486 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D3EC: + mov r0, #0x32 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D3FC: + mov r0, #0x32 + bl sub_02036540 + cmp r0, #0 + beq _0223D41E + mov r0, #0x33 + bl sub_020364F0 + ldr r0, _0223D65C ; =0x00001022 + add r1, r7, #0 + strh r1, [r4, r0] + sub r1, r0, #1 + ldrb r1, [r4, r1] + sub r0, r0, #1 + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D41E: + ldr r0, _0223D65C ; =0x00001022 + ldrh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + ldrh r1, [r4, r0] + ldr r0, _0223D660 ; =0x00000708 + cmp r1, r0 + bls _0223D486 + mov r0, #1 + bl sub_02038AE0 + b _0223D798 +_0223D436: + mov r1, #5 + add r0, r4, #0 + lsl r1, r1, #6 + bl sub_0207A8F4 + cmp r0, #1 + bne _0223D486 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D44E: + add r0, r4, #0 + bl sub_0207A960 + cmp r0, #1 + bne _0223D486 + mov r0, #0x34 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D468: + add r0, r4, #0 + bl sub_0207A988 + cmp r0, #1 + bne _0223D486 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D47C: + add r0, r4, #0 + bl sub_0207A9CC + cmp r0, #1 + beq _0223D488 +_0223D486: + b _0223D798 +_0223D488: + mov r0, #0x35 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D498: + add r0, r4, #0 + bl sub_0207A9F8 + cmp r0, #1 + bne _0223D592 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D4AC: + add r0, r4, #0 + bl sub_0207AA38 + cmp r0, #1 + bne _0223D592 + mov r0, #0x36 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D4C6: + add r0, r4, #0 + bl sub_0207AA5C + cmp r0, #1 + bne _0223D592 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D4DA: + add r0, r4, #0 + bl sub_0207AAA0 + cmp r0, #1 + bne _0223D592 + mov r0, #0x37 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D4F4: + add r0, r4, #0 + bl sub_0207AAC8 + cmp r0, #1 + bne _0223D592 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D508: + add r0, r4, #0 + bl sub_0207AAFC + cmp r0, #1 + bne _0223D592 + mov r0, #0x38 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D522: + add r0, r4, #0 + bl sub_0207AB58 + cmp r0, #1 + bne _0223D592 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D536: + ldr r1, [r4, #0] + ldr r2, [r1, #0] + mov r1, #0x80 + tst r1, r2 + bne _0223D546 + mov r1, #0x21 + strb r1, [r4, r0] + b _0223D798 +_0223D546: + bl sub_0203608C + cmp r0, #0 + beq _0223D55E + mov r0, #0x39 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D55E: + add r0, r4, #0 + mov r1, #1 + bl sub_0207AB9C + cmp r0, #1 + bne _0223D592 + mov r0, #0x39 + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D57A: + mov r1, #1 + sub r0, r0, #1 + strb r1, [r4, r0] + bl sub_0203608C + cmp r0, #0 + beq _0223D59E + mov r0, #0x39 + bl sub_02036540 + cmp r0, #1 + beq _0223D594 +_0223D592: + b _0223D798 +_0223D594: + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D59E: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x39 + bl sub_0207ABD0 + cmp r0, #1 + bne _0223D694 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D5B6: + bl sub_0203608C + cmp r0, #0 + beq _0223D5CE + mov r0, #0x3a + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D5CE: + add r0, r4, #0 + mov r1, #3 + bl sub_0207AB9C + cmp r0, #1 + bne _0223D694 + mov r0, #0x3a + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D5EA: + mov r1, #1 + sub r0, r0, #1 + strb r1, [r4, r0] + bl sub_0203608C + cmp r0, #0 + beq _0223D60C + mov r0, #0x3a + bl sub_02036540 + cmp r0, #1 + bne _0223D694 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D60C: + add r0, r4, #0 + mov r1, #3 + mov r2, #0x3a + bl sub_0207ABD0 + cmp r0, #1 + bne _0223D694 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D624: + bl sub_0203608C + cmp r0, #0 + beq _0223D63C + mov r0, #0x3b + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D63C: + add r0, r4, #0 + mov r1, #1 + bl sub_0207AC28 + cmp r0, #1 + bne _0223D694 + mov r0, #0x3b + bl sub_020364F0 + ldr r0, _0223D658 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 + ; .align 2, 0 +_0223D658: .word 0x00001021 +_0223D65C: .word 0x00001022 +_0223D660: .word 0x00000708 +_0223D664: + mov r1, #1 + sub r0, r0, #1 + strb r1, [r4, r0] + bl sub_0203608C + cmp r0, #0 + beq _0223D686 + mov r0, #0x3b + bl sub_02036540 + cmp r0, #1 + bne _0223D694 + ldr r0, _0223D7A0 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D686: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x3b + bl sub_0207AC54 + cmp r0, #1 + beq _0223D696 +_0223D694: + b _0223D798 +_0223D696: + ldr r0, _0223D7A0 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D6A0: + bl sub_0203608C + cmp r0, #0 + beq _0223D6B8 + mov r0, #0x3c + bl sub_020364F0 + ldr r0, _0223D7A0 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D6B8: + add r0, r4, #0 + mov r1, #3 + bl sub_0207AC28 + cmp r0, #1 + bne _0223D798 + mov r0, #0x3c + bl sub_020364F0 + ldr r0, _0223D7A0 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D6D4: + mov r1, #1 + sub r0, r0, #1 + strb r1, [r4, r0] + bl sub_0203608C + cmp r0, #0 + beq _0223D6F6 + mov r0, #0x3c + bl sub_02036540 + cmp r0, #1 + bne _0223D798 + ldr r0, _0223D7A0 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D6F6: + add r0, r4, #0 + mov r1, #3 + mov r2, #0x3c + bl sub_0207AC54 + cmp r0, #1 + bne _0223D798 + ldr r0, _0223D7A0 ; =0x00001021 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0223D798 +_0223D70E: + bl sub_02035E18 + ldr r1, _0223D7A4 ; =0x00001020 + ldrb r2, [r4, r1] + cmp r2, r0 + bne _0223D764 + add r0, r1, #1 + ldrb r0, [r4, r0] + cmp r0, #0x14 + bne _0223D734 + add r6, r7, #0 + add r5, r4, #0 +_0223D726: + ldr r0, [r5, #0x10] + bl sub_020181C4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0223D726 +_0223D734: + ldr r0, _0223D7A4 ; =0x00001020 + mov r3, #0 + strb r3, [r4, r0] + add r1, r0, #2 + strh r3, [r4, r1] + add r1, r0, #1 + ldrb r1, [r4, r1] + add r2, r1, #1 + add r1, r0, #1 + strb r2, [r4, r1] + add r0, r0, #1 + ldrb r0, [r4, r0] + cmp r0, #0x21 + bne _0223D798 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r3, [sp, #8] + ldr r0, [r4, #0xc] + ldr r2, _0223D7A8 ; =0x0000FFFF + mov r1, #5 + bl sub_02003178 + b _0223D798 +_0223D764: + add r0, r1, #2 + ldrh r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrh r1, [r4, r0] + ldr r0, _0223D7AC ; =0x00000708 + cmp r1, r0 + bls _0223D798 + mov r0, #1 + bl sub_02038AE0 + b _0223D798 +_0223D77E: + ldr r0, [r4, #0xc] + bl sub_0200384C + cmp r0, #0 + bne _0223D798 + ldr r0, _0223D7B0 ; =0x00001024 + mov r7, #1 + ldr r0, [r4, r0] + bl sub_0200EBA0 + mov r0, #0 + bl sub_02036378 +_0223D798: + add r0, r7, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0223D7A0: .word 0x00001021 +_0223D7A4: .word 0x00001020 +_0223D7A8: .word 0x0000FFFF +_0223D7AC: .word 0x00000708 +_0223D7B0: .word 0x00001024 + thumb_func_end ov16_0223D354 + + thumb_func_start ov16_0223D7B4 +ov16_0223D7B4: ; 0x0223D7B4 + push {r4, lr} + bl sub_0200682C + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02002FA0 + ldr r0, [r4, #0xc] + bl sub_02002F54 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_0201A928 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov16_0223D7B4 + + thumb_func_start ov16_0223D800 +ov16_0223D800: ; 0x0223D800 + push {r3, r4, r5, lr} + ldr r1, _0223D938 ; =0x00002484 + add r5, r0, #0 + mov r2, #5 + bl sub_0200681C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + add r5, r0, #0 + ldr r2, _0223D938 ; =0x00002484 + mov r0, #0 + add r1, r4, #0 + bl sub_020C4BB8 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223C2C0 + ldr r0, [r4, #0x2c] + mov r1, #4 + tst r1, r0 + beq _0223D840 + ldr r1, _0223D93C ; =0x0000240C + ldr r2, [r4, r1] + mov r1, #0x10 + tst r1, r2 + bne _0223D840 + mov r1, #0x80 + tst r0, r1 + beq _0223D848 +_0223D840: + bl sub_02039794 + mov r0, #0 + pop {r3, r4, r5, pc} +_0223D848: + ldr r0, _0223D940 ; =0x0000000A + mov r1, #2 + bl sub_02006590 + ldr r1, [r4, #0x2c] + mov r0, #8 + tst r0, r1 + bne _0223D85C + mov r0, #0 + pop {r3, r4, r5, pc} +_0223D85C: + mov r0, #5 + mov r1, #0x30 + bl sub_02018144 + mov r1, #0x71 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [r4, r1] + mov r0, #0 + mov r2, #0x30 + bl sub_020C4BB8 + bl sub_0203608C + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + add r0, r5, #0 + bl sub_020362F4 + cmp r0, #3 + bhi _0223D8E0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223D892: ; jump table + .short _0223D89A - _0223D892 - 2 ; case 0 + .short _0223D8C0 - _0223D892 - 2 ; case 1 + .short _0223D8C0 - _0223D892 - 2 ; case 2 + .short _0223D89A - _0223D892 - 2 ; case 3 +_0223D89A: + lsl r0, r5, #2 + add r0, r4, r0 + ldr r1, [r0, #0x68] + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r1, [r0, #4] + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223E258 + lsl r0, r0, #2 + add r0, r4, r0 + ldr r1, [r0, #0x68] + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r1, [r0, #0xc] + b _0223D8E0 +_0223D8C0: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223E258 + lsl r0, r0, #2 + add r0, r4, r0 + ldr r2, [r0, #0x68] + mov r0, #0x71 + lsl r0, r0, #2 + ldr r1, [r4, r0] + str r2, [r1, #4] + lsl r1, r5, #2 + add r1, r4, r1 + ldr r1, [r1, #0x68] + ldr r0, [r4, r0] + str r1, [r0, #0xc] +_0223D8E0: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r2, #5 + str r2, [r1, #0x24] + ldr r0, [r4, r0] + mov r1, #0 + add r0, #0x28 + strb r1, [r0] + add r0, r5, #0 + bl sub_020362F4 + cmp r0, #3 + bhi _0223D92A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223D908: ; jump table + .short _0223D910 - _0223D908 - 2 ; case 0 + .short _0223D91E - _0223D908 - 2 ; case 1 + .short _0223D91E - _0223D908 - 2 ; case 2 + .short _0223D910 - _0223D908 - 2 ; case 3 +_0223D910: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + add r0, #0x29 + strb r1, [r0] + b _0223D92A +_0223D91E: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + add r0, #0x29 + strb r1, [r0] +_0223D92A: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov11_0221F800 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D938: .word 0x00002484 +_0223D93C: .word 0x0000240C +_0223D940: .word 0x0000000A + thumb_func_end ov16_0223D800 + + thumb_func_start ov16_0223D944 +ov16_0223D944: ; 0x0223D944 + push {r3, r4, r5, r6, r7, lr} + bl sub_0200682C + add r6, r0, #0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #0 + beq _0223D986 + mov r4, #0 + mov r7, #0x71 + add r5, r4, #0 + lsl r7, r7, #2 +_0223D962: + ldr r0, [r6, r7] + add r0, r0, r5 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _0223D970 + bl sub_020181C4 +_0223D970: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223D962 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223D986: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223D944 + + thumb_func_start ov16_0223D98C +ov16_0223D98C: ; 0x0223D98C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + ldr r0, [r4, #0x2c] + mov r1, #4 + tst r1, r0 + beq _0223D9B4 + ldr r1, _0223DAD0 ; =0x0000240C + ldr r2, [r4, r1] + mov r1, #0x10 + tst r1, r2 + bne _0223D9B4 + mov r1, #0x80 + tst r0, r1 + beq _0223D9BC +_0223D9B4: + bl sub_02039794 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0223D9BC: + bl sub_0203608C + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + mov r0, #5 + mov r1, #0x30 + bl sub_02018144 + mov r1, #0x71 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [r4, r1] + mov r0, #0 + mov r2, #0x30 + bl sub_020C4BB8 + ldr r1, [r4, #0x2c] + mov r0, #8 + tst r0, r1 + beq _0223DA3A + mov r6, #0 + add r5, r4, #0 +_0223D9E8: + add r0, r6, #0 + bl sub_020362F4 + mov r2, #0x71 + lsl r2, r2, #2 + ldr r2, [r4, r2] + lsl r0, r0, #2 + ldr r1, [r5, #0x68] + add r0, r2, r0 + str r1, [r0, #4] + add r0, r6, #0 + bl sub_020362F4 + add r7, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #5 + bl sub_02025F04 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r2, [r4, r1] + lsl r1, r7, #2 + add r1, r2, r1 + add r6, r6, #1 + add r5, r5, #4 + str r0, [r1, #0x14] + cmp r6, #4 + blt _0223D9E8 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r2, #5 + str r2, [r1, #0x24] + ldr r1, [r4, r0] + mov r2, #1 + add r1, #0x28 + strb r2, [r1] + ldr r0, [r4, r0] + add r0, #0x29 + strb r2, [r0] + b _0223DAC0 +_0223DA3A: + add r0, r5, #0 + lsl r7, r5, #2 + bl sub_020362F4 + mov r2, #0x71 + lsl r2, r2, #2 + add r1, r4, r7 + ldr r2, [r4, r2] + lsl r0, r0, #2 + ldr r1, [r1, #0x68] + add r0, r2, r0 + str r1, [r0, #4] + mov r0, #1 + eor r0, r5 + lsl r6, r0, #2 + str r0, [sp] + bl sub_020362F4 + add r1, r4, r6 + ldr r2, [r1, #0x68] + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r4, r1] + lsl r0, r0, #2 + add r0, r1, r0 + str r2, [r0, #4] + add r0, r5, #0 + bl sub_020362F4 + add r5, r0, #0 + add r0, r4, r7 + ldr r0, [r0, #0x48] + mov r1, #5 + bl sub_02025F04 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r2, [r4, r1] + lsl r1, r5, #2 + add r1, r2, r1 + str r0, [r1, #0x14] + ldr r0, [sp] + bl sub_020362F4 + add r5, r0, #0 + add r0, r4, r6 + ldr r0, [r0, #0x48] + mov r1, #5 + bl sub_02025F04 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r3, [r4, r1] + lsl r2, r5, #2 + add r2, r3, r2 + str r0, [r2, #0x14] + ldr r0, [r4, r1] + mov r2, #5 + str r2, [r0, #0x24] + ldr r0, [r4, r1] + mov r2, #1 + add r0, #0x28 + strb r2, [r0] + ldr r0, [r4, r1] + mov r2, #0 + add r0, #0x29 + strb r2, [r0] +_0223DAC0: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov11_0221F800 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223DAD0: .word 0x0000240C + thumb_func_end ov16_0223D98C + + thumb_func_start ov16_0223DAD4 +ov16_0223DAD4: ; 0x0223DAD4 + push {r3, r4, r5, r6, r7, lr} + bl sub_0200682C + add r6, r0, #0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #0 + beq _0223DB16 + mov r4, #0 + mov r7, #0x71 + add r5, r4, #0 + lsl r7, r7, #2 +_0223DAF2: + ldr r0, [r6, r7] + add r0, r0, r5 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _0223DB00 + bl sub_020181C4 +_0223DB00: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223DAF2 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223DB16: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223DAD4 + + thumb_func_start ov16_0223DB1C +ov16_0223DB1C: ; 0x0223DB1C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + bl sub_02006840 + add r7, r0, #0 + ldr r0, [r7, #0] + mov r1, #4 + tst r1, r0 + beq _0223DB40 + mov r1, #0x63 + lsl r1, r1, #2 + ldr r2, [r7, r1] + mov r1, #0x10 + tst r1, r2 + bne _0223DB40 + mov r1, #0x80 + tst r0, r1 + beq _0223DB46 +_0223DB40: + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223DB46: + bl sub_0203608C + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + ldr r0, _0223DD08 ; =0x0000000A + mov r1, #2 + bl sub_02006590 + mov r0, #5 + mov r1, #0x30 + bl sub_02018144 + add r6, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + str r6, [r7, r0] + mov r0, #0 + add r1, r6, #0 + mov r2, #0x30 + bl sub_020C4BB8 + str r7, [r6, #0] + ldr r0, [r7, #0x14] + cmp r0, #5 + bhi _0223DBFA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223DB84: ; jump table + .short _0223DBFA - _0223DB84 - 2 ; case 0 + .short _0223DB90 - _0223DB84 - 2 ; case 1 + .short _0223DBB4 - _0223DB84 - 2 ; case 2 + .short _0223DBD8 - _0223DB84 - 2 ; case 3 + .short _0223DBFA - _0223DB84 - 2 ; case 4 + .short _0223DBD8 - _0223DB84 - 2 ; case 5 +_0223DB90: + bl sub_020389B8 + cmp r0, #0 + bne _0223DBA6 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #0x15 + bl sub_0202CF28 + b _0223DBFA +_0223DBA6: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #0x1a + bl sub_0202CF28 + b _0223DBFA +_0223DBB4: + bl sub_020389B8 + cmp r0, #0 + bne _0223DBCA + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #0x16 + bl sub_0202CF28 + b _0223DBFA +_0223DBCA: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #0x1b + bl sub_0202CF28 + b _0223DBFA +_0223DBD8: + bl sub_020389B8 + cmp r0, #0 + bne _0223DBEE + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #0x17 + bl sub_0202CF28 + b _0223DBFA +_0223DBEE: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #0x1c + bl sub_0202CF28 +_0223DBFA: + ldr r1, [r7, #0] + mov r0, #8 + tst r0, r1 + beq _0223DC64 + mov r4, #0 + add r5, r7, #0 +_0223DC06: + add r0, r4, #0 + bl sub_020362F4 + lsl r0, r0, #2 + ldr r1, [r5, #4] + add r0, r6, r0 + str r1, [r0, #4] + add r0, r4, #0 + bl sub_020362F4 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + mov r1, #5 + bl sub_02025F04 + ldr r1, [sp, #8] + add r4, r4, #1 + lsl r1, r1, #2 + add r1, r6, r1 + add r5, r5, #4 + str r0, [r1, #0x14] + cmp r4, #4 + blt _0223DC06 + mov r0, #5 + str r0, [r6, #0x24] + add r0, r6, #0 + mov r1, #2 + add r0, #0x28 + strb r1, [r0] + add r0, r6, #0 + mov r1, #1 + add r0, #0x29 + strb r1, [r0] + ldr r1, [r7, #0x14] + cmp r1, #5 + beq _0223DC5A + add r0, r6, #0 + add r0, #0x2a + strb r1, [r0] + b _0223DCF0 +_0223DC5A: + add r0, r6, #0 + mov r1, #3 + add r0, #0x2a + strb r1, [r0] + b _0223DCF0 +_0223DC64: + lsl r0, r4, #2 + str r0, [sp] + add r0, r4, #0 + bl sub_020362F4 + ldr r1, [sp] + lsl r0, r0, #2 + add r1, r7, r1 + ldr r1, [r1, #4] + add r0, r6, r0 + str r1, [r0, #4] + mov r0, #1 + eor r0, r4 + lsl r5, r0, #2 + str r0, [sp, #4] + bl sub_020362F4 + add r1, r7, r5 + lsl r0, r0, #2 + ldr r1, [r1, #4] + add r0, r6, r0 + str r1, [r0, #4] + add r0, r4, #0 + bl sub_020362F4 + add r4, r0, #0 + ldr r0, [sp] + mov r1, #5 + add r0, r7, r0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl sub_02025F04 + lsl r1, r4, #2 + add r1, r6, r1 + str r0, [r1, #0x14] + ldr r0, [sp, #4] + bl sub_020362F4 + add r4, r0, #0 + add r0, r7, r5 + add r0, #0xf8 + ldr r0, [r0, #0] + mov r1, #5 + bl sub_02025F04 + lsl r1, r4, #2 + add r1, r6, r1 + str r0, [r1, #0x14] + mov r0, #5 + str r0, [r6, #0x24] + add r0, r6, #0 + mov r1, #2 + add r0, #0x28 + strb r1, [r0] + add r0, r6, #0 + mov r1, #0 + add r0, #0x29 + strb r1, [r0] + ldr r1, [r7, #0x14] + cmp r1, #5 + beq _0223DCE8 + add r0, r6, #0 + add r0, #0x2a + strb r1, [r0] + b _0223DCF0 +_0223DCE8: + add r0, r6, #0 + mov r1, #3 + add r0, #0x2a + strb r1, [r0] +_0223DCF0: + ldr r0, _0223DD0C ; =0x000001B2 + ldrb r1, [r7, r0] + add r0, r6, #0 + add r0, #0x2c + strb r1, [r0] + add r0, r6, #0 + bl ov11_0221F800 + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0223DD08: .word 0x0000000A +_0223DD0C: .word 0x000001B2 + thumb_func_end ov16_0223DB1C + + thumb_func_start ov16_0223DD10 +ov16_0223DD10: ; 0x0223DD10 + push {r4, r5, r6, lr} + bl sub_02006840 + mov r1, #0x66 + lsl r1, r1, #2 + ldr r6, [r0, r1] + add r0, r6, #0 + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #0 + beq _0223DD46 + mov r4, #0 + add r5, r6, #0 +_0223DD2A: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _0223DD34 + bl sub_020181C4 +_0223DD34: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223DD2A + add r0, r6, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, r5, r6, pc} +_0223DD46: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0223DD10 + + thumb_func_start ov16_0223DD4C +ov16_0223DD4C: ; 0x0223DD4C + push {r3, lr} + ldr r2, [r0, #0x2c] + ldr r1, _0223DD88 ; =0x00000404 + tst r1, r2 + bne _0223DD60 + ldr r1, _0223DD8C ; =0x0000240C + ldr r1, [r0, r1] + mov r0, #0x10 + tst r0, r1 + beq _0223DD74 +_0223DD60: + mov r0, #1 + bl sub_02002AE4 + mov r0, #1 + bl sub_02002AC8 + mov r0, #0 + bl sub_02002B20 + pop {r3, pc} +_0223DD74: + mov r0, #3 + bl sub_02002AE4 + mov r0, #1 + bl sub_02002AC8 + mov r0, #1 + bl sub_02002B20 + pop {r3, pc} + ; .align 2, 0 +_0223DD88: .word 0x00000404 +_0223DD8C: .word 0x0000240C + thumb_func_end ov16_0223DD4C + + thumb_func_start ov16_0223DD90 +ov16_0223DD90: ; 0x0223DD90 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + ldr r2, _0223DEC4 ; =0x0000240C + str r0, [sp] + ldr r3, [r0, r2] + mov r0, #0x10 + tst r0, r3 + beq _0223DDAC + ldr r0, [sp] + mov r1, #1 + sub r2, #0x10 + strb r1, [r0, r2] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} +_0223DDAC: + mov r0, #0x5f + mov r3, #0 + add r4, sp, #0x30 + add r5, sp, #0x20 + lsl r0, r0, #2 +_0223DDB6: + stmia r4!, {r3} + ldr r2, [r1, r0] + add r3, r3, #1 + add r1, r1, #4 + stmia r5!, {r2} + cmp r3, #4 + blt _0223DDB6 + bl sub_0203608C + str r0, [sp, #0x10] + bl sub_02035E18 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + sub r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #0 + ble _0223DE36 + add r0, sp, #0x30 + add r2, sp, #0x20 + str r0, [sp, #8] + str r2, [sp, #0x18] + mov ip, r0 +_0223DDE8: + ldr r0, [sp, #4] + add r5, r0, #1 + ldr r0, [sp, #0xc] + cmp r5, r0 + bge _0223DE22 + ldr r1, [sp, #0x18] + lsl r0, r5, #2 + add r3, r1, r0 + mov r1, ip + add r4, r1, r0 +_0223DDFC: + ldr r0, [r3, #0] + ldr r7, [r2, #0] + str r0, [sp, #0x1c] + cmp r7, r0 + bge _0223DE16 + ldr r0, [sp, #8] + ldr r1, [r4, #0] + ldr r6, [r0, #0] + str r1, [r0, #0] + ldr r0, [sp, #0x1c] + str r6, [r4, #0] + str r0, [r2, #0] + str r7, [r3, #0] +_0223DE16: + ldr r0, [sp, #0xc] + add r5, r5, #1 + add r3, r3, #4 + add r4, r4, #4 + cmp r5, r0 + blt _0223DDFC +_0223DE22: + ldr r0, [sp, #8] + add r2, r2, #4 + add r0, r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r1, r0, #1 + ldr r0, [sp, #0x14] + str r1, [sp, #4] + cmp r1, r0 + blt _0223DDE8 +_0223DE36: + ldr r1, [sp, #0x30] + ldr r0, [sp, #0x10] + cmp r1, r0 + bne _0223DE4A + ldr r0, [sp] + ldr r1, _0223DEC8 ; =0x000023FC + mov r2, #1 + strb r2, [r0, r1] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} +_0223DE4A: + ldr r0, [sp] + ldr r1, [r0, #0x2c] + mov r0, #0x80 + tst r0, r1 + bne _0223DEBE + mov r0, #8 + tst r0, r1 + beq _0223DEB0 + ldr r0, [sp, #0x10] + bl sub_020362F4 + add r4, r0, #0 + ldr r0, [sp, #0x30] + bl sub_020362F4 + cmp r0, #3 + bhi _0223DEBE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223DE78: ; jump table + .short _0223DE80 - _0223DE78 - 2 ; case 0 + .short _0223DE98 - _0223DE78 - 2 ; case 1 + .short _0223DE80 - _0223DE78 - 2 ; case 2 + .short _0223DE98 - _0223DE78 - 2 ; case 3 +_0223DE80: + mov r0, #1 + tst r0, r4 + beq _0223DEBE + ldr r1, _0223DEC4 ; =0x0000240C + ldr r0, [sp] + ldr r2, [r0, r1] + mov r0, #0x20 + orr r2, r0 + ldr r0, [sp] + add sp, #0x40 + str r2, [r0, r1] + pop {r3, r4, r5, r6, r7, pc} +_0223DE98: + mov r0, #1 + tst r0, r4 + bne _0223DEBE + ldr r1, _0223DEC4 ; =0x0000240C + ldr r0, [sp] + ldr r2, [r0, r1] + mov r0, #0x20 + orr r2, r0 + ldr r0, [sp] + add sp, #0x40 + str r2, [r0, r1] + pop {r3, r4, r5, r6, r7, pc} +_0223DEB0: + ldr r1, _0223DEC4 ; =0x0000240C + ldr r0, [sp] + ldr r2, [r0, r1] + mov r0, #0x20 + orr r2, r0 + ldr r0, [sp] + str r2, [r0, r1] +_0223DEBE: + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223DEC4: .word 0x0000240C +_0223DEC8: .word 0x000023FC + thumb_func_end ov16_0223DD90 + + thumb_func_start ov16_0223DECC +ov16_0223DECC: ; 0x0223DECC + push {r3, lr} + bl sub_02039734 + bl sub_020389B8 + cmp r0, #0 + beq _0223DEE8 + bl ov4_021D7EAC + mov r1, #3 + sub r0, r1, r0 + bl sub_020397B0 + pop {r3, pc} +_0223DEE8: + bl sub_02033E1C + cmp r0, #0 + beq _0223DEFC + bl sub_020CE814 + mov r1, #3 + sub r0, r1, r0 + bl sub_020397B0 +_0223DEFC: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_0223DECC + + .rodata + + + .global Unk_ov16_0226E25C +Unk_ov16_0226E25C: ; 0x0226E25C + .incbin "incbin/overlay16_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov16_0226E260 +Unk_ov16_0226E260: ; 0x0226E260 + .incbin "incbin/overlay16_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov16_0226E264 +Unk_ov16_0226E264: ; 0x0226E264 + .incbin "incbin/overlay16_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov16_0226E26C +Unk_ov16_0226E26C: ; 0x0226E26C + .incbin "incbin/overlay16_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov16_0226E27C +Unk_ov16_0226E27C: ; 0x0226E27C + .incbin "incbin/overlay16_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov16_0226E28C +Unk_ov16_0226E28C: ; 0x0226E28C + .incbin "incbin/overlay16_rodata.bin", 0x30, 0x40 - 0x30 + + .global Unk_ov16_0226E29C +Unk_ov16_0226E29C: ; 0x0226E29C + .incbin "incbin/overlay16_rodata.bin", 0x40, 0x54 - 0x40 + + .global Unk_ov16_0226E2B0 +Unk_ov16_0226E2B0: ; 0x0226E2B0 + .incbin "incbin/overlay16_rodata.bin", 0x54, 0x6C - 0x54 + + .global Unk_ov16_0226E2C8 +Unk_ov16_0226E2C8: ; 0x0226E2C8 + .incbin "incbin/overlay16_rodata.bin", 0x6C, 0x88 - 0x6C + + .global Unk_ov16_0226E2E4 +Unk_ov16_0226E2E4: ; 0x0226E2E4 + .incbin "incbin/overlay16_rodata.bin", 0x88, 0xA8 - 0x88 + + .global Unk_ov16_0226E304 +Unk_ov16_0226E304: ; 0x0226E304 + .incbin "incbin/overlay16_rodata.bin", 0xA8, 0xD0 - 0xA8 + + .global Unk_ov16_0226E32C +Unk_ov16_0226E32C: ; 0x0226E32C + .incbin "incbin/overlay16_rodata.bin", 0xD0, 0xF8 - 0xD0 + + .global Unk_ov16_0226E354 +Unk_ov16_0226E354: ; 0x0226E354 + .incbin "incbin/overlay16_rodata.bin", 0xF8, 0x120 - 0xF8 + + .global Unk_ov16_0226E37C +Unk_ov16_0226E37C: ; 0x0226E37C + .incbin "incbin/overlay16_rodata.bin", 0x120, 0x148 - 0x120 + + .global Unk_ov16_0226E3A4 +Unk_ov16_0226E3A4: ; 0x0226E3A4 + .incbin "incbin/overlay16_rodata.bin", 0x148, 0x19C - 0x148 + + .global Unk_ov16_0226E3F8 +Unk_ov16_0226E3F8: ; 0x0226E3F8 + .incbin "incbin/overlay16_rodata.bin", 0x19C, 0x1F0 - 0x19C + + .global Unk_ov16_0226E44C +Unk_ov16_0226E44C: ; 0x0226E44C + .incbin "incbin/overlay16_rodata.bin", 0x1F0, 0x304 - 0x1F0 + + .global Unk_ov16_0226E560 +Unk_ov16_0226E560: ; 0x0226E560 + .incbin "incbin/overlay16_rodata.bin", 0x304, 0x4 + + .section .sinit, 4 + .word ov16_0223D0F4 diff --git a/asm/ov16_0223DF00.s b/asm/ov16_0223DF00.s new file mode 100644 index 000000000..6fa080b9c --- /dev/null +++ b/asm/ov16_0223DF00.s @@ -0,0 +1,5414 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0223DF00 +ov16_0223DF00: ; 0x0223DF00 + ldr r0, [r0, #4] + bx lr + thumb_func_end ov16_0223DF00 + + thumb_func_start ov16_0223DF04 +ov16_0223DF04: ; 0x0223DF04 + ldr r2, [r0, #8] + lsl r0, r1, #4 + add r0, r2, r0 + bx lr + thumb_func_end ov16_0223DF04 + + thumb_func_start ov16_0223DF0C +ov16_0223DF0C: ; 0x0223DF0C + ldr r0, [r0, #0x2c] + bx lr + thumb_func_end ov16_0223DF0C + + thumb_func_start ov16_0223DF10 +ov16_0223DF10: ; 0x0223DF10 + ldr r0, [r0, #0x30] + bx lr + thumb_func_end ov16_0223DF10 + + thumb_func_start ov16_0223DF14 +ov16_0223DF14: ; 0x0223DF14 + lsl r1, r1, #2 + add r0, r0, r1 + ldr r0, [r0, #0x34] + bx lr + thumb_func_end ov16_0223DF14 + + thumb_func_start ov16_0223DF1C +ov16_0223DF1C: ; 0x0223DF1C + ldr r0, [r0, #0x44] + bx lr + thumb_func_end ov16_0223DF1C + + thumb_func_start ov16_0223DF20 +ov16_0223DF20: ; 0x0223DF20 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223DF3E + mov r3, #0x10 + tst r2, r3 + beq _0223DF46 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223DF46 +_0223DF3E: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x68] + pop {r3, r4, r5, pc} +_0223DF46: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223DF58 + lsl r0, r4, #0x1f + lsr r0, r0, #0x1d + add r0, r5, r0 + ldr r0, [r0, #0x68] + pop {r3, r4, r5, pc} +_0223DF58: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x68] + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223DF20 + + thumb_func_start ov16_0223DF60 +ov16_0223DF60: ; 0x0223DF60 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223DF7E + mov r3, #0x10 + tst r2, r3 + beq _0223DF8A + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223DF8A +_0223DF7E: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x68] + bl sub_0207A0F8 + pop {r3, r4, r5, pc} +_0223DF8A: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223DFA0 + lsl r0, r4, #0x1f + lsr r0, r0, #0x1d + add r0, r5, r0 + ldr r0, [r0, #0x68] + bl sub_0207A0F8 + pop {r3, r4, r5, pc} +_0223DFA0: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x68] + bl sub_0207A0F8 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223DF60 + + thumb_func_start ov16_0223DFAC +ov16_0223DFAC: ; 0x0223DFAC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r2, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223DFCC + mov r3, #0x10 + tst r2, r3 + beq _0223DFDA + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223DFDA +_0223DFCC: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x68] + add r1, r6, #0 + bl sub_0207A0FC + pop {r4, r5, r6, pc} +_0223DFDA: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223DFF2 + lsl r0, r4, #0x1f + lsr r0, r0, #0x1d + add r0, r5, r0 + ldr r0, [r0, #0x68] + add r1, r6, #0 + bl sub_0207A0FC + pop {r4, r5, r6, pc} +_0223DFF2: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x68] + add r1, r6, #0 + bl sub_0207A0FC + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223DFAC + + thumb_func_start ov16_0223E000 +ov16_0223E000: ; 0x0223E000 + add r0, #0x88 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223E000 + + thumb_func_start ov16_0223E008 +ov16_0223E008: ; 0x0223E008 + add r0, #0x8c + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223E008 + + thumb_func_start ov16_0223E010 +ov16_0223E010: ; 0x0223E010 + add r0, #0x90 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223E010 + + thumb_func_start ov16_0223E018 +ov16_0223E018: ; 0x0223E018 + add r0, #0x94 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223E018 + + thumb_func_start ov16_0223E020 +ov16_0223E020: ; 0x0223E020 + mov r2, #0x5f + lsl r2, r2, #2 + add r2, r0, r2 + lsl r0, r1, #4 + add r0, r2, r0 + bx lr + thumb_func_end ov16_0223E020 + + thumb_func_start ov16_0223E02C +ov16_0223E02C: ; 0x0223E02C + mov r1, #0x67 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223E02C + + thumb_func_start ov16_0223E034 +ov16_0223E034: ; 0x0223E034 + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r1, r0] + bx lr + thumb_func_end ov16_0223E034 + + thumb_func_start ov16_0223E040 +ov16_0223E040: ; 0x0223E040 + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0x1a + lsl r0, r0, #4 + str r2, [r1, r0] + bx lr + thumb_func_end ov16_0223E040 + + thumb_func_start ov16_0223E04C +ov16_0223E04C: ; 0x0223E04C + mov r1, #0x6a + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223E04C + + thumb_func_start ov16_0223E054 +ov16_0223E054: ; 0x0223E054 + mov r1, #0x6b + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223E054 + + thumb_func_start ov16_0223E05C +ov16_0223E05C: ; 0x0223E05C + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov16_0223E05C + + thumb_func_start ov16_0223E060 +ov16_0223E060: ; 0x0223E060 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov16_0223E060 + + thumb_func_start ov16_0223E064 +ov16_0223E064: ; 0x0223E064 + ldr r0, [r0, #0x28] + bx lr + thumb_func_end ov16_0223E064 + + thumb_func_start ov16_0223E068 +ov16_0223E068: ; 0x0223E068 + ldr r0, [r0, #0x60] + bx lr + thumb_func_end ov16_0223E068 + + thumb_func_start ov16_0223E06C +ov16_0223E06C: ; 0x0223E06C + mov r1, #0x8a + lsl r1, r1, #2 + add r0, r0, r1 + bx lr + thumb_func_end ov16_0223E06C + + thumb_func_start ov16_0223E074 +ov16_0223E074: ; 0x0223E074 + ldr r1, _0223E07C ; =0x00001228 + add r0, r0, r1 + bx lr + nop +_0223E07C: .word 0x00001228 + thumb_func_end ov16_0223E074 + + thumb_func_start ov16_0223E080 +ov16_0223E080: ; 0x0223E080 + ldr r1, _0223E088 ; =0x000023E8 + add r0, r0, r1 + bx lr + nop +_0223E088: .word 0x000023E8 + thumb_func_end ov16_0223E080 + + thumb_func_start ov16_0223E08C +ov16_0223E08C: ; 0x0223E08C + ldr r1, _0223E094 ; =0x000023EA + add r0, r0, r1 + bx lr + nop +_0223E094: .word 0x000023EA + thumb_func_end ov16_0223E08C + + thumb_func_start ov16_0223E098 +ov16_0223E098: ; 0x0223E098 + ldr r1, _0223E0A0 ; =0x000023EC + add r0, r0, r1 + bx lr + nop +_0223E0A0: .word 0x000023EC + thumb_func_end ov16_0223E098 + + thumb_func_start ov16_0223E0A4 +ov16_0223E0A4: ; 0x0223E0A4 + ldr r1, _0223E0AC ; =0x000023EE + add r0, r0, r1 + bx lr + nop +_0223E0AC: .word 0x000023EE + thumb_func_end ov16_0223E0A4 + + thumb_func_start ov16_0223E0B0 +ov16_0223E0B0: ; 0x0223E0B0 + ldr r1, _0223E0B8 ; =0x000023F0 + add r0, r0, r1 + bx lr + nop +_0223E0B8: .word 0x000023F0 + thumb_func_end ov16_0223E0B0 + + thumb_func_start ov16_0223E0BC +ov16_0223E0BC: ; 0x0223E0BC + ldr r1, _0223E0C4 ; =0x000023F2 + add r0, r0, r1 + bx lr + nop +_0223E0C4: .word 0x000023F2 + thumb_func_end ov16_0223E0BC + + thumb_func_start ov16_0223E0C8 +ov16_0223E0C8: ; 0x0223E0C8 + mov r1, #0x1d + lsl r1, r1, #4 + add r0, r0, r1 + bx lr + thumb_func_end ov16_0223E0C8 + + thumb_func_start ov16_0223E0D0 +ov16_0223E0D0: ; 0x0223E0D0 + ldr r0, [r0, #0x14] + bx lr + thumb_func_end ov16_0223E0D0 + + thumb_func_start ov16_0223E0D4 +ov16_0223E0D4: ; 0x0223E0D4 + ldr r0, [r0, #0x18] + bx lr + thumb_func_end ov16_0223E0D4 + + thumb_func_start ov16_0223E0D8 +ov16_0223E0D8: ; 0x0223E0D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223E0F6 + mov r3, #0x10 + tst r2, r3 + beq _0223E100 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223E100 +_0223E0F6: + lsl r0, r4, #1 + add r0, r5, r0 + add r0, #0xa0 + ldrh r0, [r0] + pop {r3, r4, r5, pc} +_0223E100: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223E114 + lsl r0, r4, #0x1f + lsr r0, r0, #0x1e + add r0, r5, r0 + add r0, #0xa0 + ldrh r0, [r0] + pop {r3, r4, r5, pc} +_0223E114: + lsl r0, r4, #1 + add r0, r5, r0 + add r0, #0xa0 + ldrh r0, [r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0223E0D8 + + thumb_func_start ov16_0223E120 +ov16_0223E120: ; 0x0223E120 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223E13E + mov r3, #0x10 + tst r2, r3 + beq _0223E148 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223E148 +_0223E13E: + mov r0, #0x34 + add r5, #0xac + mul r0, r4 + add r0, r5, r0 + pop {r3, r4, r5, pc} +_0223E148: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223E160 + mov r0, #1 + add r1, r4, #0 + and r1, r0 + mov r0, #0x34 + add r5, #0xac + mul r0, r1 + add r0, r5, r0 + pop {r3, r4, r5, pc} +_0223E160: + mov r0, #0x34 + add r5, #0xac + mul r0, r4 + add r0, r5, r0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0223E120 + + thumb_func_start ov16_0223E16C +ov16_0223E16C: ; 0x0223E16C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223E18A + mov r3, #0x10 + tst r2, r3 + beq _0223E192 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223E192 +_0223E18A: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x48] + pop {r3, r4, r5, pc} +_0223E192: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223E1A4 + lsl r0, r4, #0x1f + lsr r0, r0, #0x1d + add r0, r5, r0 + ldr r0, [r0, #0x48] + pop {r3, r4, r5, pc} +_0223E1A4: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x48] + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223E16C + + thumb_func_start ov16_0223E1AC +ov16_0223E1AC: ; 0x0223E1AC + ldr r0, [r0, #0x58] + bx lr + thumb_func_end ov16_0223E1AC + + thumb_func_start ov16_0223E1B0 +ov16_0223E1B0: ; 0x0223E1B0 + ldr r0, [r0, #0x5c] + bx lr + thumb_func_end ov16_0223E1B0 + + thumb_func_start ov16_0223E1B4 +ov16_0223E1B4: ; 0x0223E1B4 + lsl r1, r1, #2 + add r0, r0, r1 + ldr r3, _0223E1C0 ; =sub_02025F30 + ldr r0, [r0, #0x48] + bx r3 + nop +_0223E1C0: .word sub_02025F30 + thumb_func_end ov16_0223E1B4 + + thumb_func_start ov16_0223E1C4 +ov16_0223E1C4: ; 0x0223E1C4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + add r7, r1, #0 + mov r4, #0 + cmp r0, #0 + ble _0223E1E8 + add r5, r6, #0 +_0223E1D4: + ldr r0, [r5, #0x34] + bl ov16_02263AE4 + cmp r7, r0 + beq _0223E1E8 + ldr r0, [r6, #0x44] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0223E1D4 +_0223E1E8: + ldr r0, [r6, #0x44] + cmp r4, r0 + blt _0223E1F2 + bl sub_02022974 +_0223E1F2: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223E1C4 + + thumb_func_start ov16_0223E1F8 +ov16_0223E1F8: ; 0x0223E1F8 + lsl r1, r1, #2 + add r0, r0, r1 + ldr r3, _0223E204 ; =ov16_02263AE4 + ldr r0, [r0, #0x34] + bx r3 + nop +_0223E204: .word ov16_02263AE4 + thumb_func_end ov16_0223E1F8 + + thumb_func_start ov16_0223E208 +ov16_0223E208: ; 0x0223E208 + push {r3, lr} + lsl r1, r1, #2 + add r0, r0, r1 + ldr r0, [r0, #0x34] + bl ov16_02263AE4 + mov r1, #1 + and r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_0223E208 + + thumb_func_start ov16_0223E220 +ov16_0223E220: ; 0x0223E220 + mov r1, #0x1b + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223E220 + + thumb_func_start ov16_0223E228 +ov16_0223E228: ; 0x0223E228 + ldr r0, [r0, #0x64] + bx lr + thumb_func_end ov16_0223E228 + + thumb_func_start ov16_0223E22C +ov16_0223E22C: ; 0x0223E22C + mov r1, #9 + lsl r1, r1, #0xa + ldr r0, [r0, r1] + cmp r0, #0x18 + bgt _0223E23A + cmp r0, #0 + bge _0223E23C +_0223E23A: + mov r0, #0x18 +_0223E23C: + bx lr + ; .align 2, 0 + thumb_func_end ov16_0223E22C + + thumb_func_start ov16_0223E240 +ov16_0223E240: ; 0x0223E240 + ldr r1, _0223E248 ; =0x00002404 + ldr r0, [r0, r1] + bx lr + nop +_0223E248: .word 0x00002404 + thumb_func_end ov16_0223E240 + + thumb_func_start ov16_0223E24C +ov16_0223E24C: ; 0x0223E24C + ldr r1, _0223E254 ; =0x00002408 + ldr r0, [r0, r1] + bx lr + nop +_0223E254: .word 0x00002408 + thumb_func_end ov16_0223E24C + + thumb_func_start ov16_0223E258 +ov16_0223E258: ; 0x0223E258 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + bl ov16_0223DF1C + str r0, [sp] + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _0223E274 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_0223E274: + ldr r0, [sp] + mov r4, #0 + cmp r0, #0 + ble _0223E29E +_0223E27C: + cmp r4, r5 + beq _0223E296 + add r0, r6, #0 + add r1, r4, #0 + bl ov16_0223E208 + add r7, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223E208 + cmp r7, r0 + beq _0223E29E +_0223E296: + ldr r0, [sp] + add r4, r4, #1 + cmp r4, r0 + blt _0223E27C +_0223E29E: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223E258 + + thumb_func_start ov16_0223E2A4 +ov16_0223E2A4: ; 0x0223E2A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + str r2, [sp] + bl ov16_0223DF1C + str r0, [sp, #4] + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _0223E2C8 + mov r0, #1 + add sp, #8 + eor r0, r6 + pop {r3, r4, r5, r6, r7, pc} +_0223E2C8: + ldr r0, [sp, #4] + mov r4, #0 + cmp r0, #0 + ble _0223E304 +_0223E2D0: + cmp r4, r6 + beq _0223E2FC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223E1F8 + mov r1, #2 + and r1, r0 + ldr r0, [sp] + cmp r0, r1 + bne _0223E2FC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223E208 + add r7, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223E208 + cmp r7, r0 + bne _0223E304 +_0223E2FC: + ldr r0, [sp, #4] + add r4, r4, #1 + cmp r4, r0 + blt _0223E2D0 +_0223E304: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223E2A4 + + thumb_func_start ov16_0223E30C +ov16_0223E30C: ; 0x0223E30C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r1, #0 + ldr r1, [sp, #0x38] + add r6, r2, #0 + str r1, [sp, #0x38] + add r1, r0, #0 + ldr r1, [r1, #0x30] + add r4, r3, #0 + str r1, [sp, #0x1c] + mov r1, #0 + str r1, [sp, #0x14] + ldr r1, [sp, #0x1c] + str r0, [sp, #4] + mov r2, #2 + add r3, r7, #0 + bl ov16_0225B45C + str r0, [sp, #0x10] + ldr r0, [sp, #4] + bl ov16_0223DF0C + cmp r0, #3 + beq _0223E356 + ldr r0, [sp, #4] + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + beq _0223E37C + ldr r0, [sp, #4] + add r1, r7, #0 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + bne _0223E37C +_0223E356: + ldr r0, [sp, #4] + add r1, r7, #0 + bl ov16_0223E258 + add r3, r0, #0 + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + mov r2, #2 + bl ov16_0225B45C + str r0, [sp, #0xc] + cmp r0, r6 + bne _0223E380 + ldr r0, [sp, #4] + add r1, r7, #0 + bl ov16_0223E258 + add r7, r0, #0 + b _0223E380 +_0223E37C: + ldr r0, [sp, #0x10] + str r0, [sp, #0xc] +_0223E380: + ldr r0, [sp, #4] + add r1, r7, #0 + add r2, r6, #0 + bl ov16_0223DFAC + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x38] + mov r1, #0xf + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E414 + ldr r0, [sp, #0x18] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + mov r1, #7 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E414 + mov r1, #7 + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + mov r1, #0xa0 + add r2, sp, #0x20 + bl sub_02074B30 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E3D0 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E410 +_0223E3D0: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + mov r1, #7 + str r0, [sp, #0x20] + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + add r3, sp, #0x20 + bl ov16_022523E8 + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + ldr r1, _0223E624 ; =0xF7FFFFFF + str r0, [sp, #0x20] + and r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + add r3, sp, #0x20 + bl ov16_022523E8 +_0223E410: + mov r0, #1 + str r0, [sp, #0x14] +_0223E414: + ldr r0, [sp, #0x38] + mov r1, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E478 + ldr r0, [sp, #0x18] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + ldr r1, _0223E628 ; =0x00000F88 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E478 + ldr r1, _0223E62C ; =0xFFFFF077 + add r2, sp, #0x20 + and r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + mov r1, #0xa0 + bl sub_02074B30 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E454 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E474 +_0223E454: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + ldr r1, _0223E62C ; =0xFFFFF077 + str r0, [sp, #0x20] + and r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + add r3, sp, #0x20 + bl ov16_022523E8 +_0223E474: + mov r0, #1 + str r0, [sp, #0x14] +_0223E478: + ldr r0, [sp, #0x38] + mov r1, #0x11 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E4DC + ldr r0, [sp, #0x18] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + mov r1, #0x10 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E4DC + mov r1, #0x10 + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + mov r1, #0xa0 + add r2, sp, #0x20 + bl sub_02074B30 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E4B8 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E4D8 +_0223E4B8: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + mov r1, #0x10 + str r0, [sp, #0x20] + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + add r3, sp, #0x20 + bl ov16_022523E8 +_0223E4D8: + mov r0, #1 + str r0, [sp, #0x14] +_0223E4DC: + ldr r0, [sp, #0x38] + mov r1, #0x12 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E540 + ldr r0, [sp, #0x18] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + mov r1, #0x20 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E540 + mov r1, #0x20 + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + mov r1, #0xa0 + add r2, sp, #0x20 + bl sub_02074B30 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E51C + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E53C +_0223E51C: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + mov r1, #0x20 + str r0, [sp, #0x20] + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + add r3, sp, #0x20 + bl ov16_022523E8 +_0223E53C: + mov r0, #1 + str r0, [sp, #0x14] +_0223E540: + ldr r0, [sp, #0x38] + mov r1, #0x13 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E5A4 + ldr r0, [sp, #0x18] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + mov r1, #0x40 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E5A4 + mov r1, #0x40 + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + mov r1, #0xa0 + add r2, sp, #0x20 + bl sub_02074B30 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E580 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E5A0 +_0223E580: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + mov r1, #0x40 + str r0, [sp, #0x20] + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x34 + add r3, sp, #0x20 + bl ov16_022523E8 +_0223E5A0: + mov r0, #1 + str r0, [sp, #0x14] +_0223E5A4: + ldr r0, [sp, #0x38] + mov r1, #0x14 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E5EC + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E5C2 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E5EC +_0223E5C2: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + mov r1, #7 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E5EC + mov r1, #7 + bic r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + add r3, sp, #0x20 + bl ov16_022523E8 + mov r0, #1 + str r0, [sp, #0x14] +_0223E5EC: + ldr r0, [sp, #0x38] + mov r1, #0x15 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E648 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E60A + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E648 +_0223E60A: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + mov r1, #0xf + lsl r1, r1, #0x10 + str r0, [sp, #0x20] + tst r1, r0 + beq _0223E648 + ldr r1, _0223E630 ; =0xFFF0FFFF + b _0223E634 + ; .align 2, 0 +_0223E624: .word 0xF7FFFFFF +_0223E628: .word 0x00000F88 +_0223E62C: .word 0xFFFFF077 +_0223E630: .word 0xFFF0FFFF +_0223E634: + mov r2, #0x35 + and r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + add r3, sp, #0x20 + bl ov16_022523E8 + mov r0, #1 + str r0, [sp, #0x14] +_0223E648: + ldr r0, [sp, #0x38] + mov r1, #0x16 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E6A2 + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + mov r2, #1 + add r3, r7, #0 + bl ov16_0225B45C + str r0, [sp, #0x20] + cmp r0, #0 + bne _0223E6A2 + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + mov r2, #0 + add r3, r7, #0 + bl ov16_0225B45C + mov r1, #0x40 + str r0, [sp, #0x20] + orr r0, r1 + str r0, [sp, #0x20] + str r0, [sp] + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + mov r2, #0 + add r3, r7, #0 + bl ov16_0225B540 + mov r0, #5 + str r0, [sp] + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + mov r2, #1 + add r3, r7, #0 + bl ov16_0225B540 + mov r0, #1 + str r0, [sp, #0x14] +_0223E6A2: + ldr r0, [sp, #0x38] + mov r1, #0x1b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E6E0 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E6C0 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E6E0 +_0223E6C0: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x13 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0xc + bge _0223E6E0 + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x13 + mov r3, #1 + bl ov16_02252A14 + mov r0, #1 + str r0, [sp, #0x14] +_0223E6E0: + ldr r0, [sp, #0x38] + mov r1, #0x1c + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E71E + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E6FE + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E71E +_0223E6FE: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x14 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0xc + bge _0223E71E + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x14 + mov r3, #1 + bl ov16_02252A14 + mov r0, #1 + str r0, [sp, #0x14] +_0223E71E: + ldr r0, [sp, #0x38] + mov r1, #0x1d + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E75C + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E73C + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E75C +_0223E73C: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x16 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0xc + bge _0223E75C + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x16 + mov r3, #1 + bl ov16_02252A14 + mov r0, #1 + str r0, [sp, #0x14] +_0223E75C: + ldr r0, [sp, #0x38] + mov r1, #0x1e + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E79A + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E77A + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E79A +_0223E77A: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x17 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0xc + bge _0223E79A + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x17 + mov r3, #1 + bl ov16_02252A14 + mov r0, #1 + str r0, [sp, #0x14] +_0223E79A: + ldr r0, [sp, #0x38] + mov r1, #0x1f + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E7D8 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E7B8 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E7D8 +_0223E7B8: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x15 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0xc + bge _0223E7D8 + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x15 + mov r3, #1 + bl ov16_02252A14 + mov r0, #1 + str r0, [sp, #0x14] +_0223E7D8: + ldr r0, [sp, #0x38] + mov r1, #0x20 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E816 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E7F6 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E816 +_0223E7F6: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x18 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0xc + bge _0223E816 + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x18 + mov r3, #1 + bl ov16_02252A14 + mov r0, #1 + str r0, [sp, #0x14] +_0223E816: + ldr r0, [sp, #0x38] + mov r1, #0x21 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E860 + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E834 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E860 +_0223E834: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + mov r1, #1 + lsl r1, r1, #0x14 + add r2, r0, #0 + str r0, [sp, #0x20] + tst r2, r1 + bne _0223E860 + orr r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + add r3, sp, #0x20 + bl ov16_022523E8 + mov r0, #1 + str r0, [sp, #0x14] +_0223E860: + ldr r0, [sp, #0x38] + mov r1, #0x24 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E8F6 + ldr r0, [sp, #0x38] + mov r1, #0x37 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #0x20] + add r1, r4, #0 + ldr r0, [sp, #0x18] + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + add r5, r0, #0 + add r1, r4, #0 + ldr r0, [sp, #0x18] + add r1, #0x42 + mov r2, #0 + bl sub_02074470 + cmp r5, r0 + beq _0223E8F6 + add r1, r4, #0 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x20] + add r1, #0x3a + bl sub_0207536C + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E8B8 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E8F2 +_0223E8B8: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + mov r1, #2 + lsl r1, r1, #0x14 + tst r0, r1 + bne _0223E8F2 + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x4b + mov r3, #0 + bl ov16_02252060 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020787CC + tst r0, r5 + bne _0223E8F2 + add r4, #0x1f + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r1, r7, #0 + add r2, r4, #0 + bl ov16_02252A14 +_0223E8F2: + mov r0, #1 + str r0, [sp, #0x14] +_0223E8F6: + ldr r0, [sp, #0x38] + mov r1, #0x25 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E994 + ldr r0, [sp, #0x38] + mov r1, #0x37 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #0x20] + mov r4, #0 +_0223E91A: + add r1, r4, #0 + ldr r0, [sp, #0x18] + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + add r5, r0, #0 + add r1, r4, #0 + ldr r0, [sp, #0x18] + add r1, #0x42 + mov r2, #0 + bl sub_02074470 + cmp r5, r0 + beq _0223E98E + add r1, r4, #0 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x20] + add r1, #0x3a + bl sub_0207536C + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223E950 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223E98A +_0223E950: + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + mov r1, #2 + lsl r1, r1, #0x14 + tst r0, r1 + bne _0223E98A + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x4b + mov r3, #0 + bl ov16_02252060 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020787CC + tst r0, r5 + bne _0223E98A + add r2, r4, #0 + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r1, r7, #0 + add r2, #0x1f + bl ov16_02252A14 +_0223E98A: + mov r0, #1 + str r0, [sp, #0x14] +_0223E98E: + add r4, r4, #1 + cmp r4, #4 + blt _0223E91A +_0223E994: + ldr r0, [sp, #0x38] + mov r1, #0x26 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + bne _0223E9A8 + b _0223EAB0 +_0223E9A8: + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x38] + mov r1, #0x17 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223E9D2 + ldr r0, [sp, #0x18] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223E9DE + mov r0, #1 + str r0, [sp, #0x20] + b _0223E9DE +_0223E9D2: + ldr r0, [sp, #0x18] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x20] +_0223E9DE: + ldr r0, [sp, #0x20] + cmp r0, #0 + beq _0223EAB0 + ldr r0, [sp, #0x18] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r4, r0, #0 + ldr r0, [sp, #0x18] + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + cmp r4, r0 + beq _0223EAB0 + ldr r0, [sp, #0x38] + mov r1, #0x36 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #0x20] + cmp r0, #0xfd + beq _0223EA3E + cmp r0, #0xfe + beq _0223EA28 + cmp r0, #0xff + bne _0223EA5E + ldr r0, [sp, #0x18] + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x20] + b _0223EA5E +_0223EA28: + ldr r0, [sp, #0x18] + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + lsr r0, r0, #1 + str r0, [sp, #0x20] + bne _0223EA5E + mov r0, #1 + str r0, [sp, #0x20] + b _0223EA5E +_0223EA3E: + ldr r0, [sp, #0x18] + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + mov r1, #0x19 + mul r1, r0 + add r0, r1, #0 + mov r1, #0x64 + bl sub_020E2178 + str r0, [sp, #0x20] + cmp r0, #0 + bne _0223EA5E + mov r0, #1 + str r0, [sp, #0x20] +_0223EA5E: + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x20] + mov r1, #0xa3 + bl sub_0207536C + ldr r0, [sp, #0x38] + mov r1, #0x17 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + bne _0223EAAC + ldr r0, [sp, #4] + add r1, r7, #0 + bl ov16_0223E208 + cmp r0, #0 + beq _0223EA94 + ldr r0, [sp, #0x1c] + add r1, r7, #0 + mov r2, #0x5f + add r3, sp, #0x20 + bl ov16_022523E8 + b _0223EAAC +_0223EA94: + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223EAA0 + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223EAAC +_0223EAA0: + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r1, r7, #0 + mov r2, #0x2f + bl ov16_02252A14 +_0223EAAC: + mov r0, #1 + str r0, [sp, #0x14] +_0223EAB0: + ldr r0, [sp, #0x38] + mov r1, #0x2d + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223EAE6 + ldr r0, [sp, #0x18] + mov r1, #9 + mov r2, #0 + bl sub_02074470 + cmp r0, #0x64 + bhs _0223EAE6 + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _0223EAE6 + ldr r0, [sp, #0x38] + mov r1, #0x38 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #8] +_0223EAE6: + ldr r0, [sp, #0x38] + mov r1, #0x2e + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223EB2A + ldr r0, [sp, #0x18] + mov r1, #9 + mov r2, #0 + bl sub_02074470 + cmp r0, #0x64 + blo _0223EB2A + ldr r0, [sp, #0x18] + mov r1, #9 + mov r2, #0 + bl sub_02074470 + cmp r0, #0xc8 + bhs _0223EB2A + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _0223EB2A + ldr r0, [sp, #0x38] + mov r1, #0x39 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #8] +_0223EB2A: + ldr r0, [sp, #0x38] + mov r1, #0x2f + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _0223EB60 + ldr r0, [sp, #0x18] + mov r1, #9 + mov r2, #0 + bl sub_02074470 + cmp r0, #0xc8 + blo _0223EB60 + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _0223EB60 + ldr r0, [sp, #0x38] + mov r1, #0x3a + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #8] +_0223EB60: + ldr r0, [sp, #8] + cmp r0, #0 + beq _0223EBE6 + ble _0223EBC4 + ldr r0, [sp, #0x18] + mov r1, #0x9b + mov r2, #0 + bl sub_02074470 + cmp r0, #0xb + bne _0223EB7C + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_0223EB7C: + ldr r0, [sp, #0x18] + mov r1, #0x98 + mov r2, #0 + bl sub_02074470 + add r4, r0, #0 + ldr r0, [sp, #4] + bl ov16_0223E24C + cmp r4, r0 + bne _0223EB98 + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_0223EB98: + ldr r0, [sp, #0x18] + mov r1, #6 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x20] + ldr r0, [sp, #0x38] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0x35 + bne _0223EBC4 + ldr r1, [sp, #8] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp, #8] +_0223EBC4: + ldr r0, [sp, #0x18] + ldr r2, [sp, #8] + mov r1, #9 + bl sub_0207536C + ldr r0, [sp, #0x10] + cmp r0, r6 + beq _0223EBDA + ldr r0, [sp, #0xc] + cmp r0, r6 + bne _0223EBE6 +_0223EBDA: + ldr r0, [sp, #0x1c] + ldr r3, [sp, #8] + add r1, r7, #0 + mov r2, #0x2c + bl ov16_02252A14 +_0223EBE6: + ldr r0, [sp, #0x14] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_0223E30C + + thumb_func_start ov16_0223EBEC +ov16_0223EBEC: ; 0x0223EBEC + ldr r1, _0223EBF4 ; =0x0000240C + ldr r0, [r0, r1] + bx lr + nop +_0223EBF4: .word 0x0000240C + thumb_func_end ov16_0223EBEC + + thumb_func_start ov16_0223EBF8 +ov16_0223EBF8: ; 0x0223EBF8 + ldr r1, _0223EC00 ; =0x00002410 + ldr r0, [r0, r1] + bx lr + nop +_0223EC00: .word 0x00002410 + thumb_func_end ov16_0223EBF8 + + thumb_func_start ov16_0223EC04 +ov16_0223EC04: ; 0x0223EC04 + ldr r2, _0223EC54 ; =0x00002404 + ldr r1, [r0, r2] + cmp r1, #5 + bhi _0223EC4E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223EC18: ; jump table + .short _0223EC24 - _0223EC18 - 2 ; case 0 + .short _0223EC24 - _0223EC18 - 2 ; case 1 + .short _0223EC24 - _0223EC18 - 2 ; case 2 + .short _0223EC24 - _0223EC18 - 2 ; case 3 + .short _0223EC24 - _0223EC18 - 2 ; case 4 + .short _0223EC24 - _0223EC18 - 2 ; case 5 +_0223EC24: + add r2, #0xc + ldr r1, [r0, r2] + cmp r1, #4 + bhi _0223EC50 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223EC38: ; jump table + .short _0223EC42 - _0223EC38 - 2 ; case 0 + .short _0223EC42 - _0223EC38 - 2 ; case 1 + .short _0223EC46 - _0223EC38 - 2 ; case 2 + .short _0223EC4A - _0223EC38 - 2 ; case 3 + .short _0223EC4A - _0223EC38 - 2 ; case 4 +_0223EC42: + mov r0, #0 + bx lr +_0223EC46: + mov r0, #1 + bx lr +_0223EC4A: + mov r0, #2 + bx lr +_0223EC4E: + mov r0, #0 +_0223EC50: + bx lr + nop +_0223EC54: .word 0x00002404 + thumb_func_end ov16_0223EC04 + + thumb_func_start ov16_0223EC58 +ov16_0223EC58: ; 0x0223EC58 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov16_0223E1F8 + cmp r0, #4 + bne _0223ECC0 + ldr r1, [r5, #0x2c] + mov r0, #8 + tst r0, r1 + bne _0223ECC0 + mov r0, #4 + tst r0, r1 + beq _0223EC8A + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223E258 + bl sub_020787CC + tst r0, r4 + bne _0223ECC0 + mov r0, #1 + pop {r4, r5, r6, pc} +_0223EC8A: + ldr r1, [r5, #0x30] + add r0, r5, #0 + mov r2, #0xc + mov r3, #0 + bl ov16_0225B45C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldr r1, [r5, #0x30] + add r0, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_0225B45C + cmp r0, #0xe + bne _0223ECAE + cmp r6, #0x10 + bhi _0223ECB8 +_0223ECAE: + mov r0, #0 + bl sub_020787CC + tst r0, r4 + beq _0223ECBC +_0223ECB8: + mov r0, #0 + pop {r4, r5, r6, pc} +_0223ECBC: + mov r0, #1 + pop {r4, r5, r6, pc} +_0223ECC0: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223EC58 + + thumb_func_start ov16_0223ECC4 +ov16_0223ECC4: ; 0x0223ECC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x14] + add r4, r1, #0 + add r7, r2, #0 + cmp r0, #1 + beq _0223ECE6 + cmp r0, #4 + beq _0223ECE6 + cmp r0, #5 + beq _0223ECE6 + ldr r0, [sp, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0223ECE6: + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223ED5A +_0223ECF0: + mov r0, #0 + str r0, [r4, #0] + cmp r0, #6 + bge _0223ED28 + mov r6, #0x5e + lsl r6, r6, #2 +_0223ECFC: + bl sub_020787CC + ldr r1, [r5, r6] + tst r0, r1 + beq _0223ED1E + ldr r0, [r4, #0] + bl sub_020787CC + mov r3, #0x5e + lsl r3, r3, #2 + mov r2, #0 + mvn r2, r2 + ldr r1, [r5, r3] + eor r0, r2 + and r0, r1 + str r0, [r5, r3] + b _0223ED28 +_0223ED1E: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + cmp r0, #6 + blt _0223ECFC +_0223ED28: + ldr r1, [r4, #0] + cmp r1, #6 + bge _0223ED50 + ldr r0, [r5, #4] + bl sub_0207A0FC + mov r3, #0x59 + str r7, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + add r1, r0, #0 + lsl r3, r3, #0x10 + ldr r0, [r5, #4] + mov r2, #0 + lsr r3, r3, #0x10 + bl sub_02076B94 + str r0, [sp, #4] + cmp r0, #0 + bne _0223ED5C +_0223ED50: + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223ECF0 +_0223ED5A: + ldr r0, [sp, #4] +_0223ED5C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0223ECC4 + + thumb_func_start ov16_0223ED60 +ov16_0223ED60: ; 0x0223ED60 + ldr r1, _0223ED68 ; =0x000023FC + ldrb r0, [r0, r1] + bx lr + nop +_0223ED68: .word 0x000023FC + thumb_func_end ov16_0223ED60 + + thumb_func_start ov16_0223ED6C +ov16_0223ED6C: ; 0x0223ED6C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #0 + bne _0223ED7A + bl sub_02022974 +_0223ED7A: + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #5 + mov r3, #0 + bl ov16_0225B45C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r4, pc} + thumb_func_end ov16_0223ED6C + + thumb_func_start ov16_0223ED8C +ov16_0223ED8C: ; 0x0223ED8C + ldr r1, _0223ED94 ; =0x00002414 + ldr r0, [r0, r1] + bx lr + nop +_0223ED94: .word 0x00002414 + thumb_func_end ov16_0223ED8C + + thumb_func_start ov16_0223ED98 +ov16_0223ED98: ; 0x0223ED98 + ldr r2, _0223EDA0 ; =0x00002414 + str r1, [r0, r2] + bx lr + nop +_0223EDA0: .word 0x00002414 + thumb_func_end ov16_0223ED98 + + thumb_func_start ov16_0223EDA4 +ov16_0223EDA4: ; 0x0223EDA4 + mov r1, #0x6d + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223EDA4 + + thumb_func_start ov16_0223EDAC +ov16_0223EDAC: ; 0x0223EDAC + push {r3, lr} + ldr r2, [r0, #0x2c] + mov r1, #4 + tst r1, r2 + beq _0223EDC4 + ldr r1, _0223EDDC ; =0x0000240C + ldr r2, [r0, r1] + mov r1, #0x10 + tst r1, r2 + bne _0223EDC4 + mov r0, #1 + pop {r3, pc} +_0223EDC4: + mov r1, #0x6d + lsl r1, r1, #2 + ldr r0, [r0, r1] + bl sub_02027AF8 + cmp r0, #0 + bne _0223EDD6 + mov r0, #1 + pop {r3, pc} +_0223EDD6: + mov r0, #0 + pop {r3, pc} + nop +_0223EDDC: .word 0x0000240C + thumb_func_end ov16_0223EDAC + + thumb_func_start ov16_0223EDE0 +ov16_0223EDE0: ; 0x0223EDE0 + mov r1, #0x6d + lsl r1, r1, #2 + ldr r3, _0223EDEC ; =sub_02027B50 + ldr r0, [r0, r1] + bx r3 + nop +_0223EDEC: .word sub_02027B50 + thumb_func_end ov16_0223EDE0 + + thumb_func_start ov16_0223EDF0 +ov16_0223EDF0: ; 0x0223EDF0 + push {r3, lr} + ldr r2, [r0, #0x2c] + mov r1, #4 + tst r1, r2 + beq _0223EE08 + ldr r1, _0223EE14 ; =0x0000240C + ldr r2, [r0, r1] + mov r1, #0x10 + tst r1, r2 + bne _0223EE08 + mov r0, #1 + pop {r3, pc} +_0223EE08: + mov r1, #0x6d + lsl r1, r1, #2 + ldr r0, [r0, r1] + bl sub_02027AC0 + pop {r3, pc} + ; .align 2, 0 +_0223EE14: .word 0x0000240C + thumb_func_end ov16_0223EDF0 + + thumb_func_start ov16_0223EE18 +ov16_0223EE18: ; 0x0223EE18 + mov r1, #0x6d + lsl r1, r1, #2 + ldr r3, _0223EE24 ; =sub_02027B14 + ldr r0, [r0, r1] + bx r3 + nop +_0223EE24: .word sub_02027B14 + thumb_func_end ov16_0223EE18 + + thumb_func_start ov16_0223EE28 +ov16_0223EE28: ; 0x0223EE28 + mov r1, #0x72 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223EE28 + + thumb_func_start ov16_0223EE30 +ov16_0223EE30: ; 0x0223EE30 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223EE4E + mov r3, #0x10 + tst r2, r3 + beq _0223EE56 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223EE56 +_0223EE4E: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x78] + pop {r3, r4, r5, pc} +_0223EE56: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223EE68 + lsl r0, r4, #0x1f + lsr r0, r0, #0x1d + add r0, r5, r0 + ldr r0, [r0, #0x78] + pop {r3, r4, r5, pc} +_0223EE68: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x78] + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223EE30 + + thumb_func_start ov16_0223EE70 +ov16_0223EE70: ; 0x0223EE70 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r1, #0xa9 + ldr r2, [r5, #0x2c] + lsl r1, r1, #2 + tst r1, r2 + bne _0223EF26 + mov r4, #0 + add r1, r4, #0 + bl ov16_0223DF60 + cmp r0, #0 + ble _0223EF26 + add r7, r4, #0 +_0223EE8C: + add r0, r5, #0 + mov r1, #0 + add r2, r4, #0 + bl ov16_0223DFAC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + mov r0, #0x67 + lsl r0, r0, #2 + cmp r1, r0 + bne _0223EF18 + add r0, r4, #0 + bl sub_020787CC + ldr r1, _0223EF28 ; =0x00002418 + ldrb r1, [r5, r1] + tst r0, r1 + beq _0223EF18 + add r0, r5, #0 + bl ov16_0223E22C + cmp r0, #0x17 + bhi _0223EF00 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223EED0: ; jump table + .short _0223EF04 - _0223EED0 - 2 ; case 0 + .short _0223EF04 - _0223EED0 - 2 ; case 1 + .short _0223EF00 - _0223EED0 - 2 ; case 2 + .short _0223EF00 - _0223EED0 - 2 ; case 3 + .short _0223EF04 - _0223EED0 - 2 ; case 4 + .short _0223EF04 - _0223EED0 - 2 ; case 5 + .short _0223EF00 - _0223EED0 - 2 ; case 6 + .short _0223EF00 - _0223EED0 - 2 ; case 7 + .short _0223EF00 - _0223EED0 - 2 ; case 8 + .short _0223EF0A - _0223EED0 - 2 ; case 9 + .short _0223EF00 - _0223EED0 - 2 ; case 10 + .short _0223EF0A - _0223EED0 - 2 ; case 11 + .short _0223EF0A - _0223EED0 - 2 ; case 12 + .short _0223EF0A - _0223EED0 - 2 ; case 13 + .short _0223EF0A - _0223EED0 - 2 ; case 14 + .short _0223EF0A - _0223EED0 - 2 ; case 15 + .short _0223EF0A - _0223EED0 - 2 ; case 16 + .short _0223EF04 - _0223EED0 - 2 ; case 17 + .short _0223EF0A - _0223EED0 - 2 ; case 18 + .short _0223EF0A - _0223EED0 - 2 ; case 19 + .short _0223EF0A - _0223EED0 - 2 ; case 20 + .short _0223EF0A - _0223EED0 - 2 ; case 21 + .short _0223EF0A - _0223EED0 - 2 ; case 22 + .short _0223EF04 - _0223EED0 - 2 ; case 23 +_0223EF00: + str r7, [sp] + b _0223EF0E +_0223EF04: + mov r0, #1 + str r0, [sp] + b _0223EF0E +_0223EF0A: + mov r0, #2 + str r0, [sp] +_0223EF0E: + add r0, r6, #0 + mov r1, #0x70 + add r2, sp, #0 + bl sub_02074B30 +_0223EF18: + add r0, r5, #0 + mov r1, #0 + add r4, r4, #1 + bl ov16_0223DF60 + cmp r4, r0 + blt _0223EE8C +_0223EF26: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223EF28: .word 0x00002418 + thumb_func_end ov16_0223EE70 + + thumb_func_start ov16_0223EF2C +ov16_0223EF2C: ; 0x0223EF2C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r2, #0 + add r4, r1, #0 + bl sub_020787CC + ldr r1, _0223EF44 ; =0x00002418 + add r2, r5, r1 + ldrb r1, [r2, r4] + orr r0, r1 + strb r0, [r2, r4] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223EF44: .word 0x00002418 + thumb_func_end ov16_0223EF2C + + thumb_func_start ov16_0223EF48 +ov16_0223EF48: ; 0x0223EF48 + push {r4, lr} + add r4, r0, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223EF64 + add r0, r1, #0 + bl sub_02076B10 + add r4, #0x98 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_02056A48 +_0223EF64: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0223EF48 + + thumb_func_start ov16_0223EF68 +ov16_0223EF68: ; 0x0223EF68 + push {r3, r4, lr} + sub sp, #4 + add r3, r0, #0 + mov r0, #5 + str r0, [sp] + ldr r4, _0223EF88 ; =0x00002420 + add r0, r3, #0 + ldrb r2, [r3, r4] + add r4, r4, #2 + add r0, #0x9c + ldrh r3, [r3, r4] + ldr r0, [r0, #0] + bl sub_0206D160 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223EF88: .word 0x00002420 + thumb_func_end ov16_0223EF68 + + thumb_func_start ov16_0223EF8C +ov16_0223EF8C: ; 0x0223EF8C + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + mov r1, #1 + add r4, r0, #0 + mov r0, #5 + lsl r1, r1, #0x10 + bl sub_02018144 + mov r1, #0x22 + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #5 + sub r1, #0x20 + bl sub_02018144 + mov r1, #0x89 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, r1, #4 + mov r2, #1 + ldr r0, _0223F1E4 ; =0x06010000 + ldr r1, [r4, r1] + lsl r2, r2, #0x10 + bl sub_020C4B68 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r5, [r4, r0] + ldr r0, [r4, #0x28] + mov r1, #0 + bl sub_02003164 + mov r2, #2 + add r1, r5, #0 + lsl r2, r2, #8 + bl sub_020C4B68 + mov r0, #0x19 + lsl r0, r0, #0x16 + str r0, [sp, #0x24] + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl sub_02021F98 + ldr r1, [r0, #4] + ldr r0, [sp, #0x24] + add r0, r0, r1 + str r0, [sp, #0x24] + mov r0, #0x14 + str r0, [sp, #0x28] + lsl r0, r0, #0xb + str r0, [sp, #0xc] +_0223EFF8: + mov r0, #0x10 + mov ip, r0 + lsl r0, r0, #6 + str r0, [sp, #0x14] + ldr r0, [sp, #0x28] + mov r7, #1 + sub r0, #0x14 + lsl r1, r0, #8 + ldr r0, [sp, #0x24] + add r0, r0, r1 + str r0, [sp, #0x10] +_0223F00E: + mov r0, ip + sub r0, #0x10 + ldr r1, [sp, #0x10] + lsl r3, r0, #5 + add r3, r1, r3 + ldr r5, [sp, #0xc] + ldr r1, [sp, #0x14] + mov r2, #0 + add r6, r5, r1 +_0223F020: + cmp r0, #8 + bge _0223F048 + add r1, r2, #0 + tst r1, r7 + beq _0223F03A + lsr r1, r2, #0x1f + add r1, r2, r1 + asr r1, r1, #1 + ldrb r5, [r3, r1] + mov r1, #0xf0 + and r1, r5 + asr r1, r1, #4 + b _0223F076 +_0223F03A: + lsr r1, r2, #0x1f + add r1, r2, r1 + asr r1, r1, #1 + ldrb r5, [r3, r1] + mov r1, #0xf + and r1, r5 + b _0223F076 +_0223F048: + mov r1, #1 + tst r1, r2 + beq _0223F064 + lsr r1, r2, #0x1f + add r1, r2, r1 + asr r1, r1, #1 + add r5, r3, r1 + mov r1, #7 + lsl r1, r1, #8 + ldrb r5, [r5, r1] + mov r1, #0xf0 + and r1, r5 + asr r1, r1, #4 + b _0223F076 +_0223F064: + lsr r1, r2, #0x1f + add r1, r2, r1 + asr r1, r1, #1 + add r5, r3, r1 + mov r1, #7 + lsl r1, r1, #8 + ldrb r5, [r5, r1] + mov r1, #0xf + and r1, r5 +_0223F076: + cmp r1, #0 + beq _0223F086 + mov r5, #0x22 + lsl r5, r5, #4 + ldr r5, [r4, r5] + add r1, #0x70 + add r5, r6, r5 + strb r1, [r2, r5] +_0223F086: + add r2, r2, #1 + cmp r2, #0x40 + blt _0223F020 + ldr r0, [sp, #0x14] + add r0, #0x40 + str r0, [sp, #0x14] + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #0x20 + blt _0223F00E + mov r1, #2 + ldr r0, [sp, #0xc] + lsl r1, r1, #0xa + add r0, r0, r1 + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, #0x1c + blt _0223EFF8 + mov r0, #0x19 + lsl r0, r0, #0x16 + str r0, [sp, #8] + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl sub_02021F98 + ldr r1, [r0, #4] + ldr r0, [sp, #8] + mov r7, #0x26 + add r0, r0, r1 + str r0, [sp, #8] + mov r3, #0 + mov r0, #0xf + mov r1, #0xf0 + lsl r7, r7, #0xa + mov r2, #1 +_0223F0D6: + add r5, r3, #0 + tst r5, r2 + beq _0223F0EC + lsr r5, r3, #0x1f + add r5, r3, r5 + asr r6, r5, #1 + ldr r5, [sp, #8] + ldrb r5, [r5, r6] + and r5, r1 + asr r5, r5, #4 + b _0223F0F8 +_0223F0EC: + lsr r5, r3, #0x1f + add r5, r3, r5 + asr r6, r5, #1 + ldr r5, [sp, #8] + ldrb r5, [r5, r6] + and r5, r0 +_0223F0F8: + cmp r5, #0 + beq _0223F108 + mov r6, #0x22 + lsl r6, r6, #4 + ldr r6, [r4, r6] + add r5, #0x70 + add r6, r6, r3 + strb r5, [r6, r7] +_0223F108: + mov r5, #2 + add r3, r3, #1 + lsl r5, r5, #0xa + cmp r3, r5 + blt _0223F0D6 + mov r0, #0x1c + str r0, [sp, #4] + lsl r0, r0, #0xb + str r0, [sp, #0x18] +_0223F11A: + ldr r0, [sp, #4] + mov r2, #0 + sub r0, #0x1c + lsl r1, r0, #8 + ldr r0, [sp, #8] + str r2, [sp, #0x20] + add r0, r0, r1 + str r0, [sp, #0x1c] + mov r7, #1 +_0223F12C: + asr r0, r2, #2 + lsr r0, r0, #0x1d + add r0, r2, r0 + asr r0, r0, #3 + lsl r1, r0, #0xa + ldr r0, [sp, #0x1c] + lsr r5, r2, #0x1f + add r6, r0, r1 + lsl r1, r2, #0x1d + sub r1, r1, r5 + mov r0, #0x1d + ror r1, r0 + add r0, r5, r1 + lsl r0, r0, #5 + ldr r5, [sp, #0x18] + ldr r1, [sp, #0x20] + mov r3, #0 + add r0, r6, r0 + add r1, r5, r1 +_0223F152: + add r5, r3, #0 + tst r5, r7 + beq _0223F16E + lsr r5, r3, #0x1f + add r5, r3, r5 + asr r5, r5, #1 + add r6, r0, r5 + mov r5, #1 + lsl r5, r5, #0xa + ldrb r6, [r6, r5] + mov r5, #0xf0 + and r5, r6 + asr r5, r5, #4 + b _0223F180 +_0223F16E: + lsr r5, r3, #0x1f + add r5, r3, r5 + asr r5, r5, #1 + add r6, r0, r5 + mov r5, #1 + lsl r5, r5, #0xa + ldrb r6, [r6, r5] + mov r5, #0xf + and r5, r6 +_0223F180: + cmp r5, #0 + beq _0223F190 + mov r6, #0x22 + lsl r6, r6, #4 + ldr r6, [r4, r6] + add r5, #0x70 + add r6, r1, r6 + strb r5, [r3, r6] +_0223F190: + add r3, r3, #1 + cmp r3, #0x40 + blt _0223F152 + ldr r0, [sp, #0x20] + add r2, r2, #1 + add r0, #0x40 + str r0, [sp, #0x20] + cmp r2, #0x18 + blt _0223F12C + mov r3, #2 + ldr r0, [sp, #0x18] + lsl r3, r3, #0xa + add r0, r0, r3 + str r0, [sp, #0x18] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #0x20 + blt _0223F11A + mov r0, #0 + mov r2, #0x22 + str r0, [sp] + lsl r2, r2, #4 + ldr r0, [r4, #4] + ldr r2, [r4, r2] + mov r1, #3 + lsl r3, r3, #5 + bl sub_0201958C + mov r0, #0x5f + lsl r0, r0, #2 + add r0, r4, r0 + bl ov16_02268700 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov16_02268700 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_0223F1E4: .word 0x06010000 + thumb_func_end ov16_0223EF8C + + thumb_func_start ov16_0223F1E8 +ov16_0223F1E8: ; 0x0223F1E8 + mov r1, #0x22 + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223F1E8 + + thumb_func_start ov16_0223F1F0 +ov16_0223F1F0: ; 0x0223F1F0 + mov r1, #0x89 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223F1F0 + + thumb_func_start ov16_0223F1F8 +ov16_0223F1F8: ; 0x0223F1F8 + ldr r1, _0223F200 ; =0x00002428 + ldr r0, [r0, r1] + bx lr + nop +_0223F200: .word 0x00002428 + thumb_func_end ov16_0223F1F8 + + thumb_func_start ov16_0223F204 +ov16_0223F204: ; 0x0223F204 + ldr r1, _0223F20C ; =0x00002228 + add r0, r0, r1 + bx lr + nop +_0223F20C: .word 0x00002228 + thumb_func_end ov16_0223F204 + + thumb_func_start ov16_0223F210 +ov16_0223F210: ; 0x0223F210 + ldr r1, _0223F218 ; =0x00002308 + add r0, r0, r1 + bx lr + nop +_0223F218: .word 0x00002308 + thumb_func_end ov16_0223F210 + + thumb_func_start ov16_0223F21C +ov16_0223F21C: ; 0x0223F21C + ldr r1, _0223F224 ; =0x0000242C + ldr r0, [r0, r1] + bx lr + nop +_0223F224: .word 0x0000242C + thumb_func_end ov16_0223F21C + + thumb_func_start ov16_0223F228 +ov16_0223F228: ; 0x0223F228 + ldr r1, _0223F230 ; =0x00002421 + ldrb r0, [r0, r1] + bx lr + nop +_0223F230: .word 0x00002421 + thumb_func_end ov16_0223F228 + + thumb_func_start ov16_0223F234 +ov16_0223F234: ; 0x0223F234 + ldr r2, _0223F23C ; =0x00002421 + strb r1, [r0, r2] + bx lr + nop +_0223F23C: .word 0x00002421 + thumb_func_end ov16_0223F234 + + thumb_func_start ov16_0223F240 +ov16_0223F240: ; 0x0223F240 + ldr r1, _0223F248 ; =0x00002430 + ldr r0, [r0, r1] + bx lr + nop +_0223F248: .word 0x00002430 + thumb_func_end ov16_0223F240 + + thumb_func_start ov16_0223F24C +ov16_0223F24C: ; 0x0223F24C + push {r3, lr} + ldr r2, _0223F264 ; =0x0000240C + ldr r3, [r0, r2] + mov r2, #0x10 + tst r2, r3 + bne _0223F262 + mov r2, #0x87 + lsl r2, r2, #2 + ldr r0, [r0, r2] + bl sub_0202CF28 +_0223F262: + pop {r3, pc} + ; .align 2, 0 +_0223F264: .word 0x0000240C + thumb_func_end ov16_0223F24C + + thumb_func_start ov16_0223F268 +ov16_0223F268: ; 0x0223F268 + push {r3, lr} + ldr r1, _0223F284 ; =0x0000240C + ldr r2, [r0, r1] + mov r1, #0x10 + tst r1, r2 + bne _0223F280 + mov r1, #0x87 + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0x16 + bl sub_0202CFEC +_0223F280: + pop {r3, pc} + nop +_0223F284: .word 0x0000240C + thumb_func_end ov16_0223F268 + + thumb_func_start ov16_0223F288 +ov16_0223F288: ; 0x0223F288 + mov r2, #0x91 + lsl r2, r2, #6 + str r1, [r0, r2] + bx lr + thumb_func_end ov16_0223F288 + + thumb_func_start ov16_0223F290 +ov16_0223F290: ; 0x0223F290 + ldr r2, _0223F298 ; =0x00002444 + strb r1, [r0, r2] + bx lr + nop +_0223F298: .word 0x00002444 + thumb_func_end ov16_0223F290 + + thumb_func_start ov16_0223F29C +ov16_0223F29C: ; 0x0223F29C + mov r1, #0x6f + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov16_0223F29C + + thumb_func_start ov16_0223F2A4 +ov16_0223F2A4: ; 0x0223F2A4 + mov r2, #0x6f + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov16_0223F2A4 + + thumb_func_start ov16_0223F2AC +ov16_0223F2AC: ; 0x0223F2AC + mov r2, #0x1d + lsl r2, r2, #4 + add r2, r0, r2 + lsl r0, r1, #4 + add r0, r2, r0 + bx lr + thumb_func_end ov16_0223F2AC + + thumb_func_start ov16_0223F2B8 +ov16_0223F2B8: ; 0x0223F2B8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #4 + blt _0223F2C6 + bl sub_02022974 +_0223F2C6: + lsl r0, r5, #4 + ldr r0, [r4, r0] + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223F2B8 + + thumb_func_start ov16_0223F2CC +ov16_0223F2CC: ; 0x0223F2CC + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #4 + blt _0223F2DC + bl sub_02022974 +_0223F2DC: + lsl r0, r4, #4 + add r0, r5, r0 + str r6, [r0, #4] + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223F2CC + + thumb_func_start ov16_0223F2E4 +ov16_0223F2E4: ; 0x0223F2E4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #4 + blt _0223F2F4 + bl sub_02022974 +_0223F2F4: + lsl r0, r4, #4 + add r0, r5, r0 + str r6, [r0, #8] + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223F2E4 + + thumb_func_start ov16_0223F2FC +ov16_0223F2FC: ; 0x0223F2FC + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #4 + blt _0223F30C + bl sub_02022974 +_0223F30C: + lsl r0, r4, #4 + add r0, r5, r0 + str r6, [r0, #0xc] + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223F2FC + + thumb_func_start ov16_0223F314 +ov16_0223F314: ; 0x0223F314 + ldr r2, _0223F31C ; =0x000023FD + strb r1, [r0, r2] + bx lr + nop +_0223F31C: .word 0x000023FD + thumb_func_end ov16_0223F314 + + thumb_func_start ov16_0223F320 +ov16_0223F320: ; 0x0223F320 + ldr r2, _0223F328 ; =0x000023F4 + str r1, [r0, r2] + bx lr + nop +_0223F328: .word 0x000023F4 + thumb_func_end ov16_0223F320 + + thumb_func_start ov16_0223F32C +ov16_0223F32C: ; 0x0223F32C + ldr r2, _0223F334 ; =0x000023F8 + str r1, [r0, r2] + bx lr + nop +_0223F334: .word 0x000023F8 + thumb_func_end ov16_0223F32C + + thumb_func_start ov16_0223F338 +ov16_0223F338: ; 0x0223F338 + ldr r2, _0223F340 ; =0x000023F4 + ldr r0, [r0, r2] + strb r1, [r0] + bx lr + ; .align 2, 0 +_0223F340: .word 0x000023F4 + thumb_func_end ov16_0223F338 + + thumb_func_start ov16_0223F344 +ov16_0223F344: ; 0x0223F344 + ldr r2, _0223F34C ; =0x000023F8 + ldr r0, [r0, r2] + strb r1, [r0] + bx lr + ; .align 2, 0 +_0223F34C: .word 0x000023F8 + thumb_func_end ov16_0223F344 + + thumb_func_start ov16_0223F350 +ov16_0223F350: ; 0x0223F350 + ldr r2, _0223F358 ; =0x000023FE + strb r1, [r0, r2] + bx lr + nop +_0223F358: .word 0x000023FE + thumb_func_end ov16_0223F350 + + thumb_func_start ov16_0223F35C +ov16_0223F35C: ; 0x0223F35C + lsl r1, r1, #2 + add r0, r0, r1 + ldr r3, _0223F368 ; =ov16_02263B08 + ldr r0, [r0, #0x34] + bx r3 + nop +_0223F368: .word ov16_02263B08 + thumb_func_end ov16_0223F35C + + thumb_func_start ov16_0223F36C +ov16_0223F36C: ; 0x0223F36C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + mov r7, #0 + cmp r0, #0 + ble _0223F3B8 + add r5, r6, #0 +_0223F37A: + ldr r0, [r5, #0x34] + bl ov16_02263B08 + add r4, r0, #0 + str r6, [r4, #0xc] + ldr r0, [r5, #0x34] + bl ov16_02263AE4 + str r0, [sp] + add r0, r6, #0 + bl ov16_0223DF0C + add r1, r0, #0 + ldr r0, [sp] + bl ov16_0226825C + add r1, r4, #0 + add r1, #0x25 + strb r0, [r1] + add r0, r4, #0 + bl ov16_022672C4 + add r0, r4, #0 + mov r1, #0 + bl ov16_02267620 + ldr r0, [r6, #0x44] + add r7, r7, #1 + add r5, r5, #4 + cmp r7, r0 + blt _0223F37A +_0223F3B8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223F36C + + thumb_func_start ov16_0223F3BC +ov16_0223F3BC: ; 0x0223F3BC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + mov r4, #0 + cmp r0, #0 + ble _0223F3E8 + add r5, r6, #0 + mov r7, #1 +_0223F3CC: + ldr r0, [r5, #0x34] + bl ov16_02263B08 + ldr r1, [r0, #0x28] + cmp r1, #0 + beq _0223F3DE + add r1, r7, #0 + bl ov16_02267620 +_0223F3DE: + ldr r0, [r6, #0x44] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0223F3CC +_0223F3E8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223F3BC + + thumb_func_start ov16_0223F3EC +ov16_0223F3EC: ; 0x0223F3EC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + mov r4, #0 + cmp r0, #0 + ble _0223F412 + add r5, r6, #0 + add r7, r4, #0 +_0223F3FC: + ldr r0, [r5, #0x34] + bl ov16_02263B08 + add r1, r7, #0 + bl ov16_02267620 + ldr r0, [r6, #0x44] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0223F3FC +_0223F412: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0223F3EC + + thumb_func_start ov16_0223F414 +ov16_0223F414: ; 0x0223F414 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + mov r4, #0 + cmp r0, #0 + ble _0223F436 + add r5, r6, #0 +_0223F422: + ldr r0, [r5, #0x34] + bl ov16_02263B08 + bl ov16_02267360 + ldr r0, [r6, #0x44] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0223F422 +_0223F436: + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223F414 + + thumb_func_start ov16_0223F438 +ov16_0223F438: ; 0x0223F438 + ldr r1, _0223F440 ; =0x00002420 + ldrb r0, [r0, r1] + bx lr + nop +_0223F440: .word 0x00002420 + thumb_func_end ov16_0223F438 + + thumb_func_start ov16_0223F444 +ov16_0223F444: ; 0x0223F444 + ldr r2, _0223F44C ; =0x00002420 + strb r1, [r0, r2] + bx lr + nop +_0223F44C: .word 0x00002420 + thumb_func_end ov16_0223F444 + + thumb_func_start ov16_0223F450 +ov16_0223F450: ; 0x0223F450 + ldr r1, _0223F45C ; =0x000023FF + ldrb r0, [r0, r1] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1e + bx lr + nop +_0223F45C: .word 0x000023FF + thumb_func_end ov16_0223F450 + + thumb_func_start ov16_0223F460 +ov16_0223F460: ; 0x0223F460 + push {r3, r4} + ldr r3, _0223F478 ; =0x000023FF + lsl r1, r1, #0x1e + ldrb r4, [r0, r3] + mov r2, #0x18 + lsr r1, r1, #0x1b + bic r4, r2 + orr r1, r4 + strb r1, [r0, r3] + pop {r3, r4} + bx lr + nop +_0223F478: .word 0x000023FF + thumb_func_end ov16_0223F460 + + thumb_func_start ov16_0223F47C +ov16_0223F47C: ; 0x0223F47C + ldr r1, _0223F488 ; =0x000023FF + ldrb r0, [r0, r1] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1d + bx lr + nop +_0223F488: .word 0x000023FF + thumb_func_end ov16_0223F47C + + thumb_func_start ov16_0223F48C +ov16_0223F48C: ; 0x0223F48C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0xf + blo _0223F49A + bl sub_02022974 +_0223F49A: + ldr r1, _0223F4AC ; =0x000023FF + mov r0, #0xe0 + ldrb r2, [r5, r1] + bic r2, r0 + lsl r0, r4, #0x1d + lsr r0, r0, #0x18 + orr r0, r2 + strb r0, [r5, r1] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223F4AC: .word 0x000023FF + thumb_func_end ov16_0223F48C + + thumb_func_start ov16_0223F4B0 +ov16_0223F4B0: ; 0x0223F4B0 + ldr r2, _0223F4B8 ; =0x0000243C + str r1, [r0, r2] + bx lr + nop +_0223F4B8: .word 0x0000243C + thumb_func_end ov16_0223F4B0 + + thumb_func_start ov16_0223F4BC +ov16_0223F4BC: ; 0x0223F4BC + push {r3, r4} + ldr r2, _0223F4DC ; =0x00002448 + ldr r1, _0223F4E0 ; =0x41C64E6D + ldr r3, [r0, r2] + add r4, r3, #0 + mul r4, r1 + ldr r1, _0223F4E4 ; =0x00006073 + add r1, r4, r1 + str r1, [r0, r2] + ldr r0, [r0, r2] + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + pop {r3, r4} + bx lr + nop +_0223F4DC: .word 0x00002448 +_0223F4E0: .word 0x41C64E6D +_0223F4E4: .word 0x00006073 + thumb_func_end ov16_0223F4BC + + thumb_func_start ov16_0223F4E8 +ov16_0223F4E8: ; 0x0223F4E8 + ldr r1, _0223F4F0 ; =0x0000244C + ldr r0, [r0, r1] + bx lr + nop +_0223F4F0: .word 0x0000244C + thumb_func_end ov16_0223F4E8 + + thumb_func_start ov16_0223F4F4 +ov16_0223F4F4: ; 0x0223F4F4 + ldr r2, _0223F4FC ; =0x0000244C + str r1, [r0, r2] + bx lr + nop +_0223F4FC: .word 0x0000244C + thumb_func_end ov16_0223F4F4 + + thumb_func_start ov16_0223F500 +ov16_0223F500: ; 0x0223F500 + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r1, _0223F52C ; =0x0000240C + mov r3, #0x10 + ldr r4, [r0, r1] + tst r4, r3 + bne _0223F528 + add r1, #0x54 + add r4, r0, r1 + lsl r5, r6, #1 + ldrh r1, [r4, r5] + lsl r0, r3, #6 + cmp r1, r0 + bhs _0223F528 + add r0, r6, #0 + bl sub_0202F868 + ldrh r0, [r4, r5] + add r0, r0, #1 + strh r0, [r4, r5] +_0223F528: + pop {r4, r5, r6, pc} + nop +_0223F52C: .word 0x0000240C + thumb_func_end ov16_0223F500 + + thumb_func_start ov16_0223F530 +ov16_0223F530: ; 0x0223F530 + push {r3, r4, r5, r6, r7, lr} + str r2, [sp] + add r3, r1, #0 + ldr r1, [sp] + mov r2, #0xff + strb r2, [r1] + ldr r1, _0223F584 ; =0x0000240C + mov r6, #0x10 + ldr r2, [r0, r1] + and r2, r6 + beq _0223F568 + add r1, #0x54 + lsl r5, r3, #1 + add r4, r0, r1 + ldrh r1, [r4, r5] + lsl r6, r6, #6 + cmp r1, r6 + bhs _0223F568 + add r0, r3, #0 + bl sub_0202F884 + ldr r1, [sp] + mov r7, #0 + strb r0, [r1] + ldrh r0, [r4, r5] + add r0, r0, #1 + strh r0, [r4, r5] + b _0223F57E +_0223F568: + cmp r2, #0 + beq _0223F57E + lsl r1, r3, #1 + add r1, r0, r1 + ldr r0, _0223F588 ; =0x00002460 + ldrh r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0xa + cmp r1, r0 + blo _0223F57E + mov r7, #1 +_0223F57E: + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F584: .word 0x0000240C +_0223F588: .word 0x00002460 + thumb_func_end ov16_0223F530 + + thumb_func_start ov16_0223F58C +ov16_0223F58C: ; 0x0223F58C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + mov r6, #0 + ldr r0, [r0, #0x44] + add r7, r6, #0 + str r1, [sp, #4] + cmp r0, #0 + ble _0223F620 +_0223F59E: + ldr r0, [sp] + lsl r1, r7, #1 + add r5, r0, r1 + ldr r0, _0223F630 ; =0x00002460 + add r1, r0, #0 + sub r1, #0x10 + ldrh r2, [r5, r0] + ldrh r1, [r5, r1] + cmp r2, r1 + beq _0223F612 + add r1, r6, #1 + lsl r1, r1, #0x18 + lsr r2, r1, #0x18 + ldr r1, [sp, #4] + add r3, r0, #0 + strb r7, [r1, r6] + add r1, r2, #1 + lsl r1, r1, #0x18 + sub r3, #0x10 + lsr r6, r1, #0x18 + ldrh r1, [r5, r0] + ldrh r3, [r5, r3] + mov r4, #0 + sub r3, r1, r3 + ldr r1, [sp, #4] + strb r3, [r1, r2] + ldrh r1, [r5, r0] + sub r0, #0x10 + ldrh r0, [r5, r0] + sub r0, r1, r0 + cmp r0, #0 + ble _0223F60A +_0223F5DE: + ldr r1, _0223F634 ; =0x00002450 + add r0, r7, #0 + ldrh r1, [r5, r1] + add r1, r4, r1 + bl sub_0202F884 + add r2, r6, #1 + lsl r2, r2, #0x18 + add r1, r6, #0 + lsr r6, r2, #0x18 + ldr r2, [sp, #4] + strb r0, [r2, r1] + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + ldr r0, _0223F630 ; =0x00002460 + ldrh r1, [r5, r0] + sub r0, #0x10 + ldrh r0, [r5, r0] + sub r0, r1, r0 + cmp r4, r0 + blt _0223F5DE +_0223F60A: + ldr r0, _0223F630 ; =0x00002460 + ldrh r1, [r5, r0] + sub r0, #0x10 + strh r1, [r5, r0] +_0223F612: + add r0, r7, #1 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, [sp] + ldr r0, [r0, #0x44] + cmp r7, r0 + blt _0223F59E +_0223F620: + cmp r6, #0x1c + bls _0223F628 + bl sub_02022974 +_0223F628: + add r0, r6, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F630: .word 0x00002460 +_0223F634: .word 0x00002450 + thumb_func_end ov16_0223F58C + + thumb_func_start ov16_0223F638 +ov16_0223F638: ; 0x0223F638 + push {r0, r1, r2, r3} + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + mov r1, #0 + add r0, sp, #8 + strb r1, [r0] + ldr r0, [sp] + add r6, r2, #0 + ldr r1, [r0, #0x2c] + mov r0, #4 + tst r0, r1 + beq _0223F6C2 + ldr r1, _0223F6CC ; =0x000023FC + ldr r0, [sp] + ldrb r0, [r0, r1] + cmp r0, #0 + bne _0223F6C2 + add r0, sp, #0x20 + ldrh r0, [r0, #4] + cmp r0, #0 + beq _0223F6C2 +_0223F664: + add r0, r6, #0 + add r1, sp, #8 + add r2, sp, #0x24 + bl ov16_0223F6D4 + add r5, r0, #0 + add r0, r6, #0 + add r1, sp, #8 + add r2, sp, #0x24 + bl ov16_0223F6D4 + add r7, r0, #0 + mov r4, #0 + cmp r7, #0 + ble _0223F6AA + ldr r0, [sp] + lsl r1, r5, #1 + add r0, r0, r1 + str r0, [sp, #4] +_0223F68A: + add r0, r6, #0 + add r1, sp, #8 + add r2, sp, #0x24 + bl ov16_0223F6D4 + add r2, r0, #0 + ldr r3, [sp, #4] + ldr r1, _0223F6D0 ; =0x00002458 + add r0, r5, #0 + ldrh r1, [r3, r1] + add r1, r4, r1 + bl sub_0202F868 + add r4, r4, #1 + cmp r4, r7 + blt _0223F68A +_0223F6AA: + ldr r0, [sp] + lsl r1, r5, #1 + add r2, r0, r1 + ldr r0, _0223F6D0 ; =0x00002458 + ldrh r0, [r2, r0] + add r1, r0, r7 + ldr r0, _0223F6D0 ; =0x00002458 + strh r1, [r2, r0] + add r0, sp, #0x20 + ldrh r0, [r0, #4] + cmp r0, #0 + bne _0223F664 +_0223F6C2: + add sp, #0xc + pop {r4, r5, r6, r7} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 +_0223F6CC: .word 0x000023FC +_0223F6D0: .word 0x00002458 + thumb_func_end ov16_0223F638 + + thumb_func_start ov16_0223F6D4 +ov16_0223F6D4: ; 0x0223F6D4 + ldrh r3, [r2] + sub r3, r3, #1 + strh r3, [r2] + ldrb r3, [r1] + add r2, r3, #1 + strb r2, [r1] + ldrb r0, [r0, r3] + bx lr + thumb_func_end ov16_0223F6D4 + + thumb_func_start ov16_0223F6E4 +ov16_0223F6E4: ; 0x0223F6E4 + ldr r1, _0223F6EC ; =0x00002446 + ldrh r0, [r0, r1] + bx lr + nop +_0223F6EC: .word 0x00002446 + thumb_func_end ov16_0223F6E4 + + thumb_func_start ov16_0223F6F0 +ov16_0223F6F0: ; 0x0223F6F0 + lsl r1, r1, #2 + add r1, r0, r1 + ldr r0, _0223F6FC ; =0x00002468 + ldr r0, [r1, r0] + bx lr + nop +_0223F6FC: .word 0x00002468 + thumb_func_end ov16_0223F6F0 + + thumb_func_start ov16_0223F700 +ov16_0223F700: ; 0x0223F700 + mov r3, #0x34 + mul r3, r1 + add r1, r0, r3 + lsl r0, r2, #1 + add r0, r1, r0 + add r0, #0xb0 + ldrh r0, [r0] + bx lr + thumb_func_end ov16_0223F700 + + thumb_func_start ov16_0223F710 +ov16_0223F710: ; 0x0223F710 + ldr r1, _0223F71C ; =0x00002478 + ldr r0, [r0, r1] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bx lr + nop +_0223F71C: .word 0x00002478 + thumb_func_end ov16_0223F710 + + thumb_func_start ov16_0223F720 +ov16_0223F720: ; 0x0223F720 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, _0223F79C ; =0x0000240C + add r5, r0, #0 + ldr r3, [r5, r1] + mov r2, #0x10 + tst r2, r3 + beq _0223F796 + add r1, #0x6c + ldr r1, [r5, r1] + lsl r1, r1, #0x1f + lsr r1, r1, #0x1f + bne _0223F796 + ldr r1, [r5, #0x30] + mov r2, #0xd + mov r3, #0 + bl ov16_0225B45C + cmp r0, #0x2b + beq _0223F796 + ldr r1, [r5, #0x30] + add r0, r5, #0 + mov r2, #0xe + mov r3, #0 + bl ov16_0225B45C + cmp r0, #0x2b + beq _0223F796 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov16_0226CEB0 + mov r1, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + bl sub_0200569C + mov r0, #0 + bl sub_0200500C + ldr r1, _0223F7A0 ; =0x00002478 + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r5, r1] +_0223F796: + add sp, #0xc + pop {r4, r5, pc} + nop +_0223F79C: .word 0x0000240C +_0223F7A0: .word 0x00002478 + thumb_func_end ov16_0223F720 + + thumb_func_start ov16_0223F7A4 +ov16_0223F7A4: ; 0x0223F7A4 + push {r4, lr} + ldr r1, _0223F7E4 ; =0x0000240C + add r4, r0, #0 + ldr r3, [r4, r1] + mov r2, #0x10 + tst r2, r3 + beq _0223F7DA + add r1, #0x6c + ldr r1, [r4, r1] + lsl r1, r1, #0x1f + lsr r1, r1, #0x1f + bne _0223F7DA + ldr r1, [r4, #0x30] + mov r2, #0xd + mov r3, #0 + bl ov16_0225B45C + cmp r0, #0x2b + beq _0223F7DA + ldr r1, [r4, #0x30] + add r0, r4, #0 + mov r2, #0xe + mov r3, #0 + bl ov16_0225B45C + cmp r0, #0x2b + bne _0223F7DE +_0223F7DA: + mov r0, #0 + pop {r4, pc} +_0223F7DE: + mov r0, #1 + pop {r4, pc} + nop +_0223F7E4: .word 0x0000240C + thumb_func_end ov16_0223F7A4 + + thumb_func_start ov16_0223F7E8 +ov16_0223F7E8: ; 0x0223F7E8 + push {r4, lr} + ldr r1, _0223F808 ; =0x0000240C + add r4, r0, #0 + ldr r3, [r4, r1] + mov r2, #0x10 + tst r2, r3 + beq _0223F806 + add r1, #0x70 + ldr r1, [r4, r1] + cmp r1, #0 + bne _0223F806 + bl ov16_0226E148 + ldr r1, _0223F80C ; =0x0000247C + str r0, [r4, r1] +_0223F806: + pop {r4, pc} + ; .align 2, 0 +_0223F808: .word 0x0000240C +_0223F80C: .word 0x0000247C + thumb_func_end ov16_0223F7E8 + + thumb_func_start ov16_0223F810 +ov16_0223F810: ; 0x0223F810 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r2, [r5, #0x2c] + mov r3, #8 + add r4, r1, #0 + tst r3, r2 + bne _0223F82E + mov r3, #0x10 + tst r2, r3 + beq _0223F838 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _0223F838 +_0223F82E: + mov r0, #0x92 + add r1, r5, r4 + lsl r0, r0, #6 + ldrb r0, [r1, r0] + pop {r3, r4, r5, pc} +_0223F838: + ldr r1, [r5, #0x2c] + mov r0, #2 + tst r0, r1 + beq _0223F84E + mov r0, #1 + and r0, r4 + add r1, r5, r0 + mov r0, #0x92 + lsl r0, r0, #6 + ldrb r0, [r1, r0] + pop {r3, r4, r5, pc} +_0223F84E: + mov r0, #0x92 + add r1, r5, r4 + lsl r0, r0, #6 + ldrb r0, [r1, r0] + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223F810 + + thumb_func_start ov16_0223F858 +ov16_0223F858: ; 0x0223F858 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + add r7, r1, #0 + mov r4, #0 + cmp r0, #0 + ble _0223F87A + add r5, r6, #0 +_0223F868: + ldr r0, [r5, #0x34] + bl ov16_02263AE4 + strb r4, [r7, r0] + ldr r0, [r6, #0x44] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0223F868 +_0223F87A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0223F858 + + thumb_func_start ov16_0223F87C +ov16_0223F87C: ; 0x0223F87C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + mov r1, #0 + mov r0, #0xff +_0223F886: + strb r0, [r6, r1] + add r1, r1, #1 + cmp r1, #4 + blt _0223F886 + ldr r0, [r7, #0x44] + mov r5, #0 + cmp r0, #0 + ble _0223F8AA + add r4, r7, #0 +_0223F898: + ldr r0, [r4, #0x34] + bl ov16_02263AE4 + strb r0, [r6, r5] + ldr r0, [r7, #0x44] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, r0 + blt _0223F898 +_0223F8AA: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0223F87C + + thumb_func_start ov16_0223F8AC +ov16_0223F8AC: ; 0x0223F8AC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0 + add r6, r1, #0 + add r5, r0, #0 +_0223F8B6: + add r0, r0, #1 + stmia r1!, {r5} + cmp r0, #4 + blt _0223F8B6 + ldr r0, [r7, #0x44] + cmp r0, #0 + ble _0223F8D8 + add r4, r7, #0 +_0223F8C6: + ldr r0, [r4, #0x34] + bl ov16_02263AFC + stmia r6!, {r0} + ldr r0, [r7, #0x44] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, r0 + blt _0223F8C6 +_0223F8D8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0223F8AC + + thumb_func_start ov16_0223F8DC +ov16_0223F8DC: ; 0x0223F8DC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x44] + add r7, r1, #0 + mov r4, #0 + cmp r0, #0 + ble _0223F902 + add r5, r6, #0 +_0223F8EC: + ldr r0, [r5, #0x34] + bl ov16_02263B08 + add r1, r7, #0 + bl ov16_022675D8 + ldr r0, [r6, #0x44] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0223F8EC +_0223F902: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0223F8DC + + thumb_func_start ov16_0223F904 +ov16_0223F904: ; 0x0223F904 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02025F58 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, r5, #0 + bl sub_02077550 + ldr r1, _0223F934 ; =0x0226E564 + lsl r0, r0, #2 + ldrb r1, [r1, r4] + add r4, r1, #0 + mul r4, r0 + add r0, r6, #0 + bl sub_02025F74 + cmp r4, r0 + bls _0223F930 + add r4, r0, #0 +_0223F930: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223F934: .word 0x0226E564 + thumb_func_end ov16_0223F904 + + thumb_func_start ov16_0223F938 +ov16_0223F938: ; 0x0223F938 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + lsl r0, r6, #2 + add r0, r5, r0 + ldr r0, [r0, #0x34] + bl ov16_02263AE4 + add r4, r0, #0 + ldr r1, [r5, #0x30] + add r0, r5, #0 + mov r2, #2 + add r3, r6, #0 + bl ov16_0225B45C + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223DFAC + add r6, r0, #0 + ldr r0, [r5, #0x2c] + mov r1, #0x84 + tst r1, r0 + bne _0223F97E + mov r1, #1 + tst r1, r4 + bne _0223F976 + sub r0, #0x4a + cmp r0, #1 + bhi _0223F97E +_0223F976: + ldr r0, [r5, #0x60] + add r1, r6, #0 + bl sub_020272A4 +_0223F97E: + mov r0, #1 + tst r0, r4 + bne _0223F99E + add r0, r6, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + mov r1, #0x67 + lsl r1, r1, #2 + cmp r0, r1 + bne _0223F99E + ldr r0, [r5, #0x60] + add r1, r6, #0 + bl sub_0202736C +_0223F99E: + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223F938 + + thumb_func_start ov16_0223F9A0 +ov16_0223F9A0: ; 0x0223F9A0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x34] + bl ov16_02263AE4 + ldr r2, [r5, #0x2c] + mov r1, #0x84 + tst r1, r2 + bne _0223F9DC + mov r1, #1 + tst r0, r1 + beq _0223F9DC + ldr r1, [r5, #0x30] + add r0, r5, #0 + mov r2, #2 + add r3, r4, #0 + bl ov16_0225B45C + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223DFAC + add r1, r0, #0 + ldr r0, [r5, #0x60] + bl sub_0202736C +_0223F9DC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0223F9A0 + + thumb_func_start ov16_0223F9E0 +ov16_0223F9E0: ; 0x0223F9E0 + ldr r3, _0223F9EC ; =sub_02026F9C + lsl r1, r1, #0x10 + ldr r0, [r0, #0x60] + lsr r1, r1, #0x10 + bx r3 + nop +_0223F9EC: .word sub_02026F9C + thumb_func_end ov16_0223F9E0 + + thumb_func_start ov16_0223F9F0 +ov16_0223F9F0: ; 0x0223F9F0 + ldr r0, _0223F9F8 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + bx lr + ; .align 2, 0 +_0223F9F8: .word 0x04000050 + thumb_func_end ov16_0223F9F0 + + thumb_func_start ov16_0223F9FC +ov16_0223F9FC: ; 0x0223F9FC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r4, r0, #0 + mov r1, #0 + str r2, [sp, #0xc] + add r7, r3, #0 + bl ov16_0223DF04 + add r6, r0, #0 + ldr r1, [r4, #0x2c] + mov r0, #0x80 + tst r0, r1 + beq _0223FAE0 + ldr r0, _0223FB14 ; =0x00002710 + cmp r5, r0 + bne _0223FA6E + cmp r7, #0x64 + bne _0223FA34 + ldr r0, [sp, #0xc] + mov r1, #0x34 + add r4, #0xd0 + mul r1, r0 + add r0, r4, r1 + mov r1, #5 + bl sub_02014B34 + b _0223FA44 +_0223FA34: + ldr r0, [sp, #0xc] + mov r1, #0x34 + add r4, #0xd8 + mul r1, r0 + add r0, r4, r1 + mov r1, #5 + bl sub_02014B34 +_0223FA44: + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + ldr r0, [sp, #0x28] + str r3, [sp] + str r0, [sp, #4] + ldr r0, _0223FB18 ; =ov16_022405A4 + mov r1, #1 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0201D738 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020237BC + b _0223FB0C +_0223FA6E: + cmp r7, #0x64 + bne _0223FA7A + lsl r0, r5, #1 + add r0, r5, r0 + add r7, r0, #1 + b _0223FA80 +_0223FA7A: + lsl r0, r5, #1 + add r0, r5, r0 + add r7, r0, #2 +_0223FA80: + mov r5, #0 +_0223FA82: + ldr r0, [r4, #0x48] + bl sub_02025FCC + cmp r0, #0 + beq _0223FA94 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #4 + blt _0223FA82 +_0223FA94: + cmp r5, #4 + bne _0223FA9C + ldr r2, _0223FB1C ; =0x00000266 + b _0223FA9E +_0223FA9C: + ldr r2, _0223FB20 ; =0x00000265 +_0223FA9E: + mov r0, #0 + mov r1, #0x1a + mov r3, #5 + bl sub_0200B144 + add r1, r7, #0 + str r0, [sp, #0x10] + bl sub_0200B1EC + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + ldr r0, [sp, #0x28] + str r3, [sp] + str r0, [sp, #4] + ldr r0, _0223FB18 ; =ov16_022405A4 + mov r1, #1 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0201D738 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x10] + bl sub_0200B190 + b _0223FB0C +_0223FAE0: + ldr r2, [r4, #0x18] + add r0, r5, #0 + add r1, r7, #0 + mov r3, #5 + bl sub_020792F8 + add r0, r6, #0 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + ldr r0, [sp, #0x28] + str r3, [sp] + str r0, [sp, #4] + ldr r0, _0223FB18 ; =ov16_022405A4 + mov r1, #1 + str r0, [sp, #8] + ldr r2, [r4, #0x18] + add r0, r6, #0 + bl sub_0201D738 + add r5, r0, #0 +_0223FB0C: + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FB14: .word 0x00002710 +_0223FB18: .word ov16_022405A4 +_0223FB1C: .word 0x00000266 +_0223FB20: .word 0x00000265 + thumb_func_end ov16_0223F9FC + + thumb_func_start ov16_0223FB24 +ov16_0223FB24: ; 0x0223FB24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp, #0xc] + add r5, r0, #0 + add r4, r2, #0 + mov r1, #0 + add r6, r3, #0 + bl ov16_0223DF04 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223FBE8 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223FDE4 + ldr r1, [sp, #0xc] + add r0, r5, #0 + add r2, r4, #0 + bl ov16_02240584 + add r0, r7, #0 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + ldr r0, _0223FB74 ; =ov16_022405A4 + str r6, [sp, #4] + str r0, [sp, #8] + ldr r2, [r5, #0x18] + add r0, r7, #0 + mov r1, #1 + bl sub_0201D738 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FB74: .word ov16_022405A4 + thumb_func_end ov16_0223FB24 + + thumb_func_start ov16_0223FB78 +ov16_0223FB78: ; 0x0223FB78 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r3, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r7, #0 + add r6, r2, #0 + bl ov16_0223FBE8 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_0223FDE4 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_02240584 + ldr r1, [sp, #0x28] + mov r0, #1 + tst r0, r1 + beq _0223FBAC + add r0, r4, #0 + mov r1, #0xff + bl sub_0201ADA4 +_0223FBAC: + ldr r1, [sp, #0x28] + mov r0, #2 + tst r0, r1 + beq _0223FBC4 + mov r0, #0 + ldr r1, [r5, #0x18] + add r2, r0, #0 + bl sub_02002D7C + ldr r1, [sp, #0x2c] + sub r3, r1, r0 + b _0223FBC6 +_0223FBC4: + mov r3, #0 +_0223FBC6: + ldr r0, [sp, #0x24] + mov r1, #0 + str r0, [sp] + ldr r0, [sp, #0x30] + str r0, [sp, #4] + ldr r0, _0223FBE4 ; =ov16_022405A4 + str r0, [sp, #8] + add r0, r4, #0 + ldr r4, [sp, #0x20] + ldr r2, [r5, #0x18] + add r3, r4, r3 + bl sub_0201D738 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FBE4: .word ov16_022405A4 + thumb_func_end ov16_0223FB78 + + thumb_func_start ov16_0223FBE8 +ov16_0223FBE8: ; 0x0223FBE8 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + bl ov16_0223DF0C + add r5, r0, #0 + ldrb r0, [r4, #1] + mov r1, #0x80 + tst r1, r0 + bne _0223FC0E + mov r1, #0x40 + tst r1, r0 + beq _0223FC18 + ldr r1, [r4, #0x20] + add r0, r6, #0 + bl ov16_0223E208 + cmp r0, #0 + bne _0223FC10 +_0223FC0E: + b _0223FDE2 +_0223FC10: + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FC18: + mov r1, #0x3f + and r0, r1 + cmp r0, #0x3c + bls _0223FC22 + b _0223FDDE +_0223FC22: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223FC2E: ; jump table + .short _0223FDE2 - _0223FC2E - 2 ; case 0 + .short _0223FCA8 - _0223FC2E - 2 ; case 1 + .short _0223FCC0 - _0223FC2E - 2 ; case 2 + .short _0223FDE2 - _0223FC2E - 2 ; case 3 + .short _0223FDE2 - _0223FC2E - 2 ; case 4 + .short _0223FDE2 - _0223FC2E - 2 ; case 5 + .short _0223FDE2 - _0223FC2E - 2 ; case 6 + .short _0223FDE2 - _0223FC2E - 2 ; case 7 + .short _0223FDE2 - _0223FC2E - 2 ; case 8 + .short _0223FD22 - _0223FC2E - 2 ; case 9 + .short _0223FCC0 - _0223FC2E - 2 ; case 10 + .short _0223FCC0 - _0223FC2E - 2 ; case 11 + .short _0223FCC0 - _0223FC2E - 2 ; case 12 + .short _0223FCC0 - _0223FC2E - 2 ; case 13 + .short _0223FCC0 - _0223FC2E - 2 ; case 14 + .short _0223FCC0 - _0223FC2E - 2 ; case 15 + .short _0223FCC0 - _0223FC2E - 2 ; case 16 + .short _0223FCC0 - _0223FC2E - 2 ; case 17 + .short _0223FCC0 - _0223FC2E - 2 ; case 18 + .short _0223FCC0 - _0223FC2E - 2 ; case 19 + .short _0223FCE6 - _0223FC2E - 2 ; case 20 + .short _0223FCFE - _0223FC2E - 2 ; case 21 + .short _0223FDE2 - _0223FC2E - 2 ; case 22 + .short _0223FCFE - _0223FC2E - 2 ; case 23 + .short _0223FDE2 - _0223FC2E - 2 ; case 24 + .short _0223FDE2 - _0223FC2E - 2 ; case 25 + .short _0223FDE2 - _0223FC2E - 2 ; case 26 + .short _0223FDE2 - _0223FC2E - 2 ; case 27 + .short _0223FDE2 - _0223FC2E - 2 ; case 28 + .short _0223FDE2 - _0223FC2E - 2 ; case 29 + .short _0223FDE2 - _0223FC2E - 2 ; case 30 + .short _0223FD22 - _0223FC2E - 2 ; case 31 + .short _0223FD22 - _0223FC2E - 2 ; case 32 + .short _0223FD22 - _0223FC2E - 2 ; case 33 + .short _0223FCC0 - _0223FC2E - 2 ; case 34 + .short _0223FCC0 - _0223FC2E - 2 ; case 35 + .short _0223FD80 - _0223FC2E - 2 ; case 36 + .short _0223FCC0 - _0223FC2E - 2 ; case 37 + .short _0223FCC0 - _0223FC2E - 2 ; case 38 + .short _0223FCC0 - _0223FC2E - 2 ; case 39 + .short _0223FCC0 - _0223FC2E - 2 ; case 40 + .short _0223FCC0 - _0223FC2E - 2 ; case 41 + .short _0223FCC0 - _0223FC2E - 2 ; case 42 + .short _0223FD80 - _0223FC2E - 2 ; case 43 + .short _0223FCC0 - _0223FC2E - 2 ; case 44 + .short _0223FCC0 - _0223FC2E - 2 ; case 45 + .short _0223FCC0 - _0223FC2E - 2 ; case 46 + .short _0223FCC0 - _0223FC2E - 2 ; case 47 + .short _0223FCFE - _0223FC2E - 2 ; case 48 + .short _0223FDE2 - _0223FC2E - 2 ; case 49 + .short _0223FDE2 - _0223FC2E - 2 ; case 50 + .short _0223FDE2 - _0223FC2E - 2 ; case 51 + .short _0223FD80 - _0223FC2E - 2 ; case 52 + .short _0223FD80 - _0223FC2E - 2 ; case 53 + .short _0223FD80 - _0223FC2E - 2 ; case 54 + .short _0223FD80 - _0223FC2E - 2 ; case 55 + .short _0223FDE2 - _0223FC2E - 2 ; case 56 + .short _0223FDE2 - _0223FC2E - 2 ; case 57 + .short _0223FDE2 - _0223FC2E - 2 ; case 58 + .short _0223FDE2 - _0223FC2E - 2 ; case 59 + .short _0223FDE2 - _0223FC2E - 2 ; case 60 +_0223FCA8: + ldr r1, [r4, #4] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FCDC + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FCC0: + ldr r1, [r4, #4] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FCDC + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + mov r0, #1 + tst r0, r5 + bne _0223FCDE +_0223FCDC: + b _0223FDE2 +_0223FCDE: + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FCE6: + ldr r1, [r4, #8] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FCFE: + ldr r1, [r4, #8] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + mov r0, #1 + tst r0, r5 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FD22: + ldr r1, [r4, #4] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FD5C + ldrh r0, [r4, #2] + add r0, r0, #3 + strh r0, [r4, #2] + mov r0, #1 + tst r0, r5 + beq _0223FD44 + ldrh r0, [r4, #2] + add r0, r0, #2 + strh r0, [r4, #2] +_0223FD44: + ldr r1, [r4, #8] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FD5C: + ldr r1, [r4, #8] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + mov r0, #1 + tst r0, r5 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FD80: + ldr r1, [r4, #4] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDBA + ldrh r0, [r4, #2] + add r0, r0, #3 + strh r0, [r4, #2] + mov r0, #1 + tst r0, r5 + beq _0223FDA2 + ldrh r0, [r4, #2] + add r0, r0, #2 + strh r0, [r4, #2] +_0223FDA2: + ldr r1, [r4, #0xc] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FDBA: + ldr r1, [r4, #0xc] + add r0, r6, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223E208 + cmp r0, #0 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + mov r0, #1 + tst r0, r5 + beq _0223FDE2 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_0223FDDE: + bl sub_02022974 +_0223FDE2: + pop {r4, r5, r6, pc} + thumb_func_end ov16_0223FBE8 + + thumb_func_start ov16_0223FDE4 +ov16_0223FDE4: ; 0x0223FDE4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r2, [r4, #1] + mov r1, #0x3f + add r5, r0, #0 + and r1, r2 + cmp r1, #0x3c + bls _0223FDF6 + b _0224045A +_0223FDF6: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223FE02: ; jump table + .short _0224045E - _0223FE02 - 2 ; case 0 + .short _0224045E - _0223FE02 - 2 ; case 1 + .short _0223FE7C - _0223FE02 - 2 ; case 2 + .short _0223FE86 - _0223FE02 - 2 ; case 3 + .short _0223FE90 - _0223FE02 - 2 ; case 4 + .short _0223FE9A - _0223FE02 - 2 ; case 5 + .short _0223FEA4 - _0223FE02 - 2 ; case 6 + .short _0223FEAE - _0223FE02 - 2 ; case 7 + .short _0223FEBA - _0223FE02 - 2 ; case 8 + .short _0223FEC4 - _0223FE02 - 2 ; case 9 + .short _0223FED8 - _0223FE02 - 2 ; case 10 + .short _0223FEEC - _0223FE02 - 2 ; case 11 + .short _0223FF00 - _0223FE02 - 2 ; case 12 + .short _0223FF14 - _0223FE02 - 2 ; case 13 + .short _0223FF28 - _0223FE02 - 2 ; case 14 + .short _0223FF3C - _0223FE02 - 2 ; case 15 + .short _0223FF50 - _0223FE02 - 2 ; case 16 + .short _0223FF64 - _0223FE02 - 2 ; case 17 + .short _0223FF78 - _0223FE02 - 2 ; case 18 + .short _0223FF8C - _0223FE02 - 2 ; case 19 + .short _0223FE86 - _0223FE02 - 2 ; case 20 + .short _0223FFA0 - _0223FE02 - 2 ; case 21 + .short _0223FFB4 - _0223FE02 - 2 ; case 22 + .short _0223FFC8 - _0223FE02 - 2 ; case 23 + .short _0223FFDC - _0223FE02 - 2 ; case 24 + .short _0223FFF0 - _0223FE02 - 2 ; case 25 + .short _02240004 - _0223FE02 - 2 ; case 26 + .short _02240018 - _0223FE02 - 2 ; case 27 + .short _0224002C - _0223FE02 - 2 ; case 28 + .short _02240040 - _0223FE02 - 2 ; case 29 + .short _02240054 - _0223FE02 - 2 ; case 30 + .short _02240068 - _0223FE02 - 2 ; case 31 + .short _02240086 - _0223FE02 - 2 ; case 32 + .short _022400A4 - _0223FE02 - 2 ; case 33 + .short _022400C2 - _0223FE02 - 2 ; case 34 + .short _022400E0 - _0223FE02 - 2 ; case 35 + .short _022400FE - _0223FE02 - 2 ; case 36 + .short _0224011C - _0223FE02 - 2 ; case 37 + .short _0224013A - _0223FE02 - 2 ; case 38 + .short _02240158 - _0223FE02 - 2 ; case 39 + .short _02240176 - _0223FE02 - 2 ; case 40 + .short _02240194 - _0223FE02 - 2 ; case 41 + .short _022401B2 - _0223FE02 - 2 ; case 42 + .short _022401D0 - _0223FE02 - 2 ; case 43 + .short _022401EE - _0223FE02 - 2 ; case 44 + .short _0224020C - _0223FE02 - 2 ; case 45 + .short _0224022A - _0223FE02 - 2 ; case 46 + .short _02240248 - _0223FE02 - 2 ; case 47 + .short _02240266 - _0223FE02 - 2 ; case 48 + .short _02240284 - _0223FE02 - 2 ; case 49 + .short _022402A2 - _0223FE02 - 2 ; case 50 + .short _022402C0 - _0223FE02 - 2 ; case 51 + .short _022402DE - _0223FE02 - 2 ; case 52 + .short _02240306 - _0223FE02 - 2 ; case 53 + .short _0224032E - _0223FE02 - 2 ; case 54 + .short _02240356 - _0223FE02 - 2 ; case 55 + .short _0224037E - _0223FE02 - 2 ; case 56 + .short _022403A6 - _0223FE02 - 2 ; case 57 + .short _022403CE - _0223FE02 - 2 ; case 58 + .short _022403F6 - _0223FE02 - 2 ; case 59 + .short _0224041E - _0223FE02 - 2 ; case 60 +_0223FE7C: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0223FE86: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_0223FE90: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_022404F8 + pop {r3, r4, r5, pc} +_0223FE9A: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_0223FEA4: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224049C + pop {r3, r4, r5, pc} +_0223FEAE: + ldr r2, [r4, #4] + ldr r3, [r4, #0x1c] + mov r1, #0 + bl ov16_022404B4 + pop {r3, r4, r5, pc} +_0223FEBA: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + pop {r3, r4, r5, pc} +_0223FEC4: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0223FED8: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_0223FEEC: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + pop {r3, r4, r5, pc} +_0223FF00: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404F8 + pop {r3, r4, r5, pc} +_0223FF14: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404E0 + pop {r3, r4, r5, pc} +_0223FF28: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240510 + pop {r3, r4, r5, pc} +_0223FF3C: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_0223FF50: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240534 + pop {r3, r4, r5, pc} +_0223FF64: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224049C + pop {r3, r4, r5, pc} +_0223FF78: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + pop {r3, r4, r5, pc} +_0223FF8C: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240574 + pop {r3, r4, r5, pc} +_0223FFA0: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240484 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0223FFB4: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240484 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_0223FFC8: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_022404EC + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0223FFDC: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240490 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_0223FFF0: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224049C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224049C + pop {r3, r4, r5, pc} +_02240004: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + pop {r3, r4, r5, pc} +_02240018: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0224002C: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_02240040: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224049C + pop {r3, r4, r5, pc} +_02240054: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + pop {r3, r4, r5, pc} +_02240068: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_02240086: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_022404EC + pop {r3, r4, r5, pc} +_022400A4: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_022400C2: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240484 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_022400E0: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240484 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_0224049C + pop {r3, r4, r5, pc} +_022400FE: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0224011C: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_0224013A: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_02240158: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_022404F8 + pop {r3, r4, r5, pc} +_02240176: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_022404E0 + pop {r3, r4, r5, pc} +_02240194: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240504 + pop {r3, r4, r5, pc} +_022401B2: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_0224049C + pop {r3, r4, r5, pc} +_022401D0: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_022401EE: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_0224020C: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_022404F8 + pop {r3, r4, r5, pc} +_0224022A: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240504 + pop {r3, r4, r5, pc} +_02240248: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240574 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240574 + pop {r3, r4, r5, pc} +_02240266: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240490 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240538 + pop {r3, r4, r5, pc} +_02240284: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_022402A2: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_022402C0: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_022402DE: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_02240484 + pop {r3, r4, r5, pc} +_02240306: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_022404EC + pop {r3, r4, r5, pc} +_0224032E: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_022404EC + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_022404F8 + pop {r3, r4, r5, pc} +_02240356: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240460 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240490 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_02240490 + pop {r3, r4, r5, pc} +_0224037E: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_0224055C + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_02240460 + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_0224055C + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_022403A6: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_022403CE: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_0224055C + pop {r3, r4, r5, pc} +_022403F6: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240544 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_0224055C + pop {r3, r4, r5, pc} +_0224041E: + ldr r2, [r4, #4] + mov r1, #0 + bl ov16_02240544 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov16_0224055C + ldr r2, [r4, #0xc] + add r0, r5, #0 + mov r1, #2 + bl ov16_02240460 + ldr r2, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl ov16_02240544 + ldr r2, [r4, #0x14] + add r0, r5, #0 + mov r1, #4 + bl ov16_0224055C + ldr r2, [r4, #0x18] + add r0, r5, #0 + mov r1, #5 + bl ov16_02240460 + pop {r3, r4, r5, pc} +_0224045A: + bl sub_02022974 +_0224045E: + pop {r3, r4, r5, pc} + thumb_func_end ov16_0223FDE4 + + thumb_func_start ov16_02240460 +ov16_02240460: ; 0x02240460 + push {r3, r4, r5, lr} + mov r3, #0xff + lsl r3, r3, #8 + add r4, r1, #0 + lsl r1, r2, #0x18 + and r2, r3 + add r5, r0, #0 + lsr r1, r1, #0x18 + asr r2, r2, #8 + bl ov16_0223DFAC + add r2, r0, #0 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl sub_0200B5CC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02240460 + + thumb_func_start ov16_02240484 +ov16_02240484: ; 0x02240484 + ldr r3, _0224048C ; =sub_0200B630 + ldr r0, [r0, #0x14] + bx r3 + nop +_0224048C: .word sub_0200B630 + thumb_func_end ov16_02240484 + + thumb_func_start ov16_02240490 +ov16_02240490: ; 0x02240490 + ldr r3, _02240498 ; =sub_0200B70C + ldr r0, [r0, #0x14] + bx r3 + nop +_02240498: .word sub_0200B70C + thumb_func_end ov16_02240490 + + thumb_func_start ov16_0224049C +ov16_0224049C: ; 0x0224049C + push {r3, lr} + sub sp, #8 + mov r3, #0 + str r3, [sp] + mov r3, #1 + str r3, [sp, #4] + ldr r0, [r0, #0x14] + mov r3, #5 + bl sub_0200B60C + add sp, #8 + pop {r3, pc} + thumb_func_end ov16_0224049C + + thumb_func_start ov16_022404B4 +ov16_022404B4: ; 0x022404B4 + push {r4, lr} + sub sp, #8 + cmp r3, #0 + beq _022404CC + mov r4, #1 + str r4, [sp] + str r4, [sp, #4] + ldr r0, [r0, #0x14] + bl sub_0200B60C + add sp, #8 + pop {r4, pc} +_022404CC: + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r0, [r0, #0x14] + mov r3, #5 + bl sub_0200B60C + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_022404B4 + + thumb_func_start ov16_022404E0 +ov16_022404E0: ; 0x022404E0 + ldr r3, _022404E8 ; =sub_0200B7EC + ldr r0, [r0, #0x14] + bx r3 + nop +_022404E8: .word sub_0200B7EC + thumb_func_end ov16_022404E0 + + thumb_func_start ov16_022404EC +ov16_022404EC: ; 0x022404EC + ldr r3, _022404F4 ; =sub_0200B6A0 + ldr r0, [r0, #0x14] + bx r3 + nop +_022404F4: .word sub_0200B6A0 + thumb_func_end ov16_022404EC + + thumb_func_start ov16_022404F8 +ov16_022404F8: ; 0x022404F8 + ldr r3, _02240500 ; =sub_0200B824 + ldr r0, [r0, #0x14] + bx r3 + nop +_02240500: .word sub_0200B824 + thumb_func_end ov16_022404F8 + + thumb_func_start ov16_02240504 +ov16_02240504: ; 0x02240504 + ldr r3, _0224050C ; =sub_0200B85C + ldr r0, [r0, #0x14] + bx r3 + nop +_0224050C: .word sub_0200B85C + thumb_func_end ov16_02240504 + + thumb_func_start ov16_02240510 +ov16_02240510: ; 0x02240510 + push {r3, r4, r5, lr} + mov r3, #0xff + lsl r3, r3, #8 + add r4, r1, #0 + lsl r1, r2, #0x18 + and r2, r3 + add r5, r0, #0 + lsr r1, r1, #0x18 + asr r2, r2, #8 + bl ov16_0223DFAC + add r2, r0, #0 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl sub_0200B538 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02240510 + + thumb_func_start ov16_02240534 +ov16_02240534: ; 0x02240534 + bx lr + ; .align 2, 0 + thumb_func_end ov16_02240534 + + thumb_func_start ov16_02240538 +ov16_02240538: ; 0x02240538 + ldr r3, _02240540 ; =sub_0200B890 + ldr r0, [r0, #0x14] + bx r3 + nop +_02240540: .word sub_0200B890 + thumb_func_end ov16_02240538 + + thumb_func_start ov16_02240544 +ov16_02240544: ; 0x02240544 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r1, r2, #0 + bl ov16_0223E120 + add r2, r0, #0 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl sub_0200B9D0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02240544 + + thumb_func_start ov16_0224055C +ov16_0224055C: ; 0x0224055C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r1, r2, #0 + bl ov16_0223E120 + add r2, r0, #0 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl sub_0200BA74 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0224055C + + thumb_func_start ov16_02240574 +ov16_02240574: ; 0x02240574 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x64] + bl sub_0200BD40 + pop {r4, pc} + thumb_func_end ov16_02240574 + + thumb_func_start ov16_02240584 +ov16_02240584: ; 0x02240584 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + ldrh r1, [r2, #2] + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + pop {r3, r4, r5, pc} + thumb_func_end ov16_02240584 + + thumb_func_start ov16_022405A4 +ov16_022405A4: ; 0x022405A4 + push {r4, lr} + mov r4, #0 + cmp r1, #5 + bhi _022405EA + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022405B8: ; jump table + .short _022405EA - _022405B8 - 2 ; case 0 + .short _022405C4 - _022405B8 - 2 ; case 1 + .short _022405CC - _022405B8 - 2 ; case 2 + .short _022405D4 - _022405B8 - 2 ; case 3 + .short _022405DC - _022405B8 - 2 ; case 4 + .short _022405E4 - _022405B8 - 2 ; case 5 +_022405C4: + bl sub_020057E0 + add r4, r0, #0 + b _022405EA +_022405CC: + bl sub_020061E4 + add r4, r0, #0 + b _022405EA +_022405D4: + ldr r0, _022405F0 ; =0x00000484 + bl sub_02006150 + b _022405EA +_022405DC: + ldr r0, _022405F4 ; =0x000005E6 + bl sub_02005748 + b _022405EA +_022405E4: + ldr r0, _022405F8 ; =0x00000483 + bl sub_02006150 +_022405EA: + add r0, r4, #0 + pop {r4, pc} + nop +_022405F0: .word 0x00000484 +_022405F4: .word 0x000005E6 +_022405F8: .word 0x00000483 + thumb_func_end ov16_022405A4 + + .rodata + + + .global Unk_ov16_0226E564 +Unk_ov16_0226E564: ; 0x0226E564 + .incbin "incbin/overlay16_rodata.bin", 0x308, 0x9 + diff --git a/asm/ov16_022405FC.s b/asm/ov16_022405FC.s new file mode 100644 index 000000000..0fa315286 --- /dev/null +++ b/asm/ov16_022405FC.s @@ -0,0 +1,22919 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_022405FC +ov16_022405FC: ; 0x022405FC + push {r3, r4, r5, r6, r7, lr} + ldr r7, _02240644 ; =0x0226E72C + add r5, r0, #0 + add r4, r1, #0 +_02240604: + add r2, r4, #0 + add r2, #0xb4 + ldr r2, [r2, #0] + add r0, r5, #0 + lsl r2, r2, #2 + add r3, r4, r2 + mov r2, #0x27 + lsl r2, r2, #8 + ldr r2, [r3, r2] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r2, [r7, r2] + blx r2 + add r6, r0, #0 + ldr r0, _02240648 ; =0x00003154 + ldr r0, [r4, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _02240636 + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + beq _02240604 +_02240636: + ldr r1, _02240648 ; =0x00003154 + mov r0, #1 + ldr r2, [r4, r1] + bic r2, r0 + str r2, [r4, r1] + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240644: .word 0x0226E72C +_02240648: .word 0x00003154 + thumb_func_end ov16_022405FC + + thumb_func_start ov16_0224064C +ov16_0224064C: ; 0x0224064C + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + mov r1, #0 + bl ov16_02264A8C + mov r0, #0 + pop {r4, pc} + thumb_func_end ov16_0224064C + + thumb_func_start ov16_02240664 +ov16_02240664: ; 0x02240664 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + cmp r0, #0 + beq _0224068A + cmp r0, #3 + beq _022406D6 + cmp r0, #4 + beq _022406A8 +_0224068A: + mov r5, #0 + cmp r6, #0 + ble _022406D6 +_02240690: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02264AB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 + add r5, r5, #1 + cmp r5, r6 + blt _02240690 + b _022406D6 +_022406A8: + mov r5, #0 + cmp r6, #0 + ble _022406D6 + mov r7, #1 +_022406B0: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _022406DC ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _022406D0 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02264AB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 +_022406D0: + add r5, r5, #1 + cmp r5, r6 + blt _022406B0 +_022406D6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022406DC: .word 0x00000195 + thumb_func_end ov16_02240664 + + thumb_func_start ov16_022406E0 +ov16_022406E0: ; 0x022406E0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r7, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + cmp r0, #6 + bhi _02240718 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224070A: ; jump table + .short _02240718 - _0224070A - 2 ; case 0 + .short _022407BC - _0224070A - 2 ; case 1 + .short _02240806 - _0224070A - 2 ; case 2 + .short _02240736 - _0224070A - 2 ; case 3 + .short _0224077A - _0224070A - 2 ; case 4 + .short _02240718 - _0224070A - 2 ; case 5 + .short _02240850 - _0224070A - 2 ; case 6 +_02240718: + mov r5, #0 + cmp r7, #0 + ble _02240734 +_0224071E: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02264BB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 + add r5, r5, #1 + cmp r5, r7 + blt _0224071E +_02240734: + b _02240898 +_02240736: + mov r5, #0 + cmp r7, #0 + ble _02240764 +_0224073C: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _0224089C ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _0224075E + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02264BB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 +_0224075E: + add r5, r5, #1 + cmp r5, r7 + blt _0224073C +_02240764: + add r0, r4, #0 + add r1, r6, #0 + mov r2, #1 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _02240898 +_0224077A: + mov r5, #0 + cmp r7, #0 + ble _022407BA +_02240780: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _0224089C ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _022407B4 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_022535E0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02264BB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 +_022407B4: + add r5, r5, #1 + cmp r5, r7 + blt _02240780 +_022407BA: + b _02240898 +_022407BC: + ldr r1, [r6, #0x64] + add r0, r4, #0 + bl ov16_0223DF14 + ldr r1, _0224089C ; =0x00000195 + mov r2, #1 + ldrb r0, [r0, r1] + tst r0, r2 + bne _022407E2 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _022407F4 +_022407E2: + ldr r1, [r6, #0x64] + add r0, r6, #0 + bl ov16_022535E0 + ldr r2, [r6, #0x64] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 +_022407F4: + ldr r1, [r6, #0x64] + add r0, r4, #0 + bl ov16_0223F938 + ldr r1, [r6, #0x64] + add r0, r4, #0 + bl ov16_02264BB4 + b _02240898 +_02240806: + ldr r1, [r6, #0x6c] + add r0, r4, #0 + bl ov16_0223DF14 + ldr r1, _0224089C ; =0x00000195 + mov r2, #1 + ldrb r0, [r0, r1] + tst r0, r2 + bne _0224082C + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _0224083E +_0224082C: + ldr r1, [r6, #0x6c] + add r0, r6, #0 + bl ov16_022535E0 + ldr r2, [r6, #0x6c] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 +_0224083E: + ldr r1, [r6, #0x6c] + add r0, r4, #0 + bl ov16_0223F938 + ldr r1, [r6, #0x6c] + add r0, r4, #0 + bl ov16_02264BB4 + b _02240898 +_02240850: + ldr r1, [r6, #0x78] + add r0, r4, #0 + bl ov16_0223DF14 + ldr r1, _0224089C ; =0x00000195 + mov r2, #1 + ldrb r0, [r0, r1] + tst r0, r2 + bne _02240876 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _02240888 +_02240876: + ldr r1, [r6, #0x78] + add r0, r6, #0 + bl ov16_022535E0 + ldr r2, [r6, #0x78] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 +_02240888: + ldr r1, [r6, #0x78] + add r0, r4, #0 + bl ov16_0223F938 + ldr r1, [r6, #0x78] + add r0, r4, #0 + bl ov16_02264BB4 +_02240898: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224089C: .word 0x00000195 + thumb_func_end ov16_022406E0 + + thumb_func_start ov16_022408A0 +ov16_022408A0: ; 0x022408A0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r7, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + cmp r0, #6 + bhi _022408D8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022408CA: ; jump table + .short _022408D8 - _022408CA - 2 ; case 0 + .short _0224098A - _022408CA - 2 ; case 1 + .short _022409D8 - _022408CA - 2 ; case 2 + .short _022408FC - _022408CA - 2 ; case 3 + .short _02240944 - _022408CA - 2 ; case 4 + .short _022408D8 - _022408CA - 2 ; case 5 + .short _02240A26 - _022408CA - 2 ; case 6 +_022408D8: + mov r5, #0 + cmp r7, #0 + ble _022408FA + add r6, r5, #0 +_022408E0: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + add r3, r6, #0 + bl ov16_02264CE8 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 + add r5, r5, #1 + cmp r5, r7 + blt _022408E0 +_022408FA: + b _02240A72 +_022408FC: + mov r5, #0 + cmp r7, #0 + ble _0224092E +_02240902: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02240A78 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _02240928 + mov r2, #0 + add r0, r4, #0 + add r1, r5, #0 + add r3, r2, #0 + bl ov16_02264CE8 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 +_02240928: + add r5, r5, #1 + cmp r5, r7 + blt _02240902 +_0224092E: + add r0, r4, #0 + add r1, r6, #0 + mov r2, #1 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _02240A72 +_02240944: + mov r5, #0 + cmp r7, #0 + ble _02240988 +_0224094A: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02240A78 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _02240982 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_022535E0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov16_022535F0 + mov r2, #0 + add r0, r4, #0 + add r1, r5, #0 + add r3, r2, #0 + bl ov16_02264CE8 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223F938 +_02240982: + add r5, r5, #1 + cmp r5, r7 + blt _0224094A +_02240988: + b _02240A72 +_0224098A: + ldr r1, [r6, #0x64] + add r0, r4, #0 + bl ov16_0223DF14 + ldr r1, _02240A78 ; =0x00000195 + mov r2, #1 + ldrb r0, [r0, r1] + tst r0, r2 + bne _022409B0 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _022409C2 +_022409B0: + ldr r1, [r6, #0x64] + add r0, r6, #0 + bl ov16_022535E0 + ldr r2, [r6, #0x64] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 +_022409C2: + ldr r1, [r6, #0x64] + add r0, r4, #0 + bl ov16_0223F938 + mov r2, #0 + ldr r1, [r6, #0x64] + add r0, r4, #0 + add r3, r2, #0 + bl ov16_02264CE8 + b _02240A72 +_022409D8: + ldr r1, [r6, #0x6c] + add r0, r4, #0 + bl ov16_0223DF14 + ldr r1, _02240A78 ; =0x00000195 + mov r2, #1 + ldrb r0, [r0, r1] + tst r0, r2 + bne _022409FE + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _02240A10 +_022409FE: + ldr r1, [r6, #0x6c] + add r0, r6, #0 + bl ov16_022535E0 + ldr r2, [r6, #0x6c] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 +_02240A10: + ldr r1, [r6, #0x6c] + add r0, r4, #0 + bl ov16_0223F938 + mov r2, #0 + ldr r1, [r6, #0x6c] + add r0, r4, #0 + add r3, r2, #0 + bl ov16_02264CE8 + b _02240A72 +_02240A26: + ldr r1, [r6, #0x78] + add r0, r4, #0 + bl ov16_0223DF14 + ldr r1, _02240A78 ; =0x00000195 + mov r2, #1 + ldrb r0, [r0, r1] + tst r0, r2 + bne _02240A4C + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022535F0 + b _02240A5E +_02240A4C: + ldr r1, [r6, #0x78] + add r0, r6, #0 + bl ov16_022535E0 + ldr r2, [r6, #0x78] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_022535F0 +_02240A5E: + ldr r1, [r6, #0x78] + add r0, r4, #0 + bl ov16_0223F938 + mov r2, #0 + ldr r1, [r6, #0x78] + add r0, r4, #0 + add r3, r2, #0 + bl ov16_02264CE8 +_02240A72: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240A78: .word 0x00000195 + thumb_func_end ov16_022408A0 + + thumb_func_start ov16_02240A7C +ov16_02240A7C: ; 0x02240A7C + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + bl ov16_0223DF1C + add r7, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r2, r0, #0 + beq _02240AA4 + cmp r2, #3 + beq _02240ABC + cmp r2, #4 + beq _02240AE6 + b _02240B1E +_02240AA4: + mov r4, #0 + cmp r7, #0 + ble _02240B30 +_02240AAA: + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov16_02264EF8 + add r4, r4, #1 + cmp r4, r7 + blt _02240AAA + b _02240B30 +_02240ABC: + mov r4, #0 + cmp r7, #0 + ble _02240B30 +_02240AC2: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223DF14 + ldr r1, _02240B34 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _02240ADE + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov16_02264EF8 +_02240ADE: + add r4, r4, #1 + cmp r4, r7 + blt _02240AC2 + b _02240B30 +_02240AE6: + mov r4, #0 + cmp r7, #0 + ble _02240B30 +_02240AEC: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223DF14 + ldr r1, _02240B34 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _02240B16 + add r0, r4, #0 + bl sub_020787CC + ldr r1, _02240B38 ; =0x00003108 + ldrb r1, [r6, r1] + tst r0, r1 + bne _02240B16 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov16_02264EF8 +_02240B16: + add r4, r4, #1 + cmp r4, r7 + blt _02240AEC + b _02240B30 +_02240B1E: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02264EF8 +_02240B30: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240B34: .word 0x00000195 +_02240B38: .word 0x00003108 + thumb_func_end ov16_02240A7C + + thumb_func_start ov16_02240B3C +ov16_02240B3C: ; 0x02240B3C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_02265108 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02240B3C + + thumb_func_start ov16_02240B68 +ov16_02240B68: ; 0x02240B68 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + cmp r0, #0 + beq _02240B8E + cmp r0, #3 + beq _02240BF2 + cmp r0, #4 + beq _02240C32 +_02240B8E: + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + beq _02240BC0 + mov r5, #0 + cmp r6, #0 + ble _02240C7C + ldr r7, _02240C80 ; =0x00000195 +_02240BA2: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #4 + beq _02240BB8 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265124 +_02240BB8: + add r5, r5, #1 + cmp r5, r6 + blt _02240BA2 + b _02240C7C +_02240BC0: + mov r5, #0 + cmp r6, #0 + ble _02240C7C + mov r7, #8 +_02240BC8: + add r0, r4, #0 + bl ov16_0223DF0C + tst r0, r7 + bne _02240BE2 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02240BE2 + cmp r5, #1 + bgt _02240C7C +_02240BE2: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265124 + add r5, r5, #1 + cmp r5, r6 + blt _02240BC8 + b _02240C7C +_02240BF2: + mov r5, #0 + cmp r6, #0 + ble _02240C7C + mov r7, #1 +_02240BFA: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02240C80 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + bne _02240C2A + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265124 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240C2A + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02240C7C +_02240C2A: + add r5, r5, #1 + cmp r5, r6 + blt _02240BFA + b _02240C7C +_02240C32: + mov r5, #0 + cmp r6, #0 + ble _02240C7C + mov r7, #1 +_02240C3A: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02240C80 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _02240C76 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265124 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240C76 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + bne _02240C76 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02240C7C +_02240C76: + add r5, r5, #1 + cmp r5, r6 + blt _02240C3A +_02240C7C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240C80: .word 0x00000195 + thumb_func_end ov16_02240B68 + + thumb_func_start ov16_02240C84 +ov16_02240C84: ; 0x02240C84 + push {r3, r4, r5, r6, r7, lr} + str r1, [sp] + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + ldr r0, [sp] + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [sp] + bl ov16_02248AD0 + add r5, r0, #0 + ldr r0, [sp] + bl ov16_02248AD0 + add r7, r0, #0 + cmp r5, #0 + beq _02240CB4 + cmp r5, #3 + beq _02240CE8 + cmp r5, #4 + beq _02240D2A +_02240CB4: + mov r5, #0 + cmp r6, #0 + ble _02240D76 +_02240CBA: + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240CD6 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02240CD6 + cmp r5, #1 + bgt _02240D76 +_02240CD6: + add r0, r4, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02265154 + add r5, r5, #1 + cmp r5, r6 + blt _02240CBA + b _02240D76 +_02240CE8: + mov r5, #0 + cmp r6, #0 + ble _02240D76 +_02240CEE: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02240D8C ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _02240D22 + add r0, r4, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02265154 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240D22 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02240D76 +_02240D22: + add r5, r5, #1 + cmp r5, r6 + blt _02240CEE + b _02240D76 +_02240D2A: + mov r5, #0 + cmp r6, #0 + ble _02240D76 +_02240D30: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02240D8C ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _02240D70 + add r0, r4, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02265154 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240D70 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + bne _02240D70 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02240D76 +_02240D70: + add r5, r5, #1 + cmp r5, r6 + blt _02240D30 +_02240D76: + ldr r1, _02240D90 ; =0x00003154 + ldr r0, [sp] + ldr r2, [r0, r1] + mov r0, #1 + bic r2, r0 + mov r0, #1 + orr r2, r0 + ldr r0, [sp] + str r2, [r0, r1] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240D8C: .word 0x00000195 +_02240D90: .word 0x00003154 + thumb_func_end ov16_02240C84 + + thumb_func_start ov16_02240D94 +ov16_02240D94: ; 0x02240D94 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r5, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + cmp r0, #0xc + bhi _02240DD8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02240DBE: ; jump table + .short _02240DD8 - _02240DBE - 2 ; case 0 + .short _02240DD8 - _02240DBE - 2 ; case 1 + .short _02240DD8 - _02240DBE - 2 ; case 2 + .short _02240E0A - _02240DBE - 2 ; case 3 + .short _02240E4A - _02240DBE - 2 ; case 4 + .short _02240DD8 - _02240DBE - 2 ; case 5 + .short _02240DD8 - _02240DBE - 2 ; case 6 + .short _02240DD8 - _02240DBE - 2 ; case 7 + .short _02240DD8 - _02240DBE - 2 ; case 8 + .short _02240E96 - _02240DBE - 2 ; case 9 + .short _02240EC2 - _02240DBE - 2 ; case 10 + .short _02240EEE - _02240DBE - 2 ; case 11 + .short _02240F16 - _02240DBE - 2 ; case 12 +_02240DD8: + mov r6, #0 + cmp r5, #0 + ble _02240E08 + mov r7, #8 +_02240DE0: + add r0, r4, #0 + bl ov16_0223DF0C + tst r0, r7 + bne _02240DFA + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02240DFA + cmp r6, #1 + bgt _02240E08 +_02240DFA: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + add r6, r6, #1 + cmp r6, r5 + blt _02240DE0 +_02240E08: + b _02240F3C +_02240E0A: + mov r6, #0 + cmp r5, #0 + ble _02240E48 + mov r7, #1 +_02240E12: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _02240F40 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + bne _02240E42 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240E42 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02240F3C +_02240E42: + add r6, r6, #1 + cmp r6, r5 + blt _02240E12 +_02240E48: + b _02240F3C +_02240E4A: + mov r6, #0 + cmp r5, #0 + ble _02240F3C + mov r7, #1 +_02240E52: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _02240F40 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _02240E8E + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02240E8E + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + bne _02240E8E + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02240F3C +_02240E8E: + add r6, r6, #1 + cmp r6, r5 + blt _02240E52 + b _02240F3C +_02240E96: + mov r6, #0 + cmp r5, #0 + ble _02240F3C + ldr r7, _02240F40 ; =0x00000195 +_02240E9E: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #0 + beq _02240EB0 + cmp r0, #2 + bne _02240EBA +_02240EB0: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + b _02240F3C +_02240EBA: + add r6, r6, #1 + cmp r6, r5 + blt _02240E9E + b _02240F3C +_02240EC2: + mov r6, #0 + cmp r5, #0 + ble _02240F3C + ldr r7, _02240F40 ; =0x00000195 +_02240ECA: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #1 + beq _02240EDC + cmp r0, #3 + bne _02240EE6 +_02240EDC: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + b _02240F3C +_02240EE6: + add r6, r6, #1 + cmp r6, r5 + blt _02240ECA + b _02240F3C +_02240EEE: + mov r6, #0 + cmp r5, #0 + ble _02240F3C + ldr r7, _02240F40 ; =0x00000195 +_02240EF6: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #4 + bne _02240F0E + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + b _02240F3C +_02240F0E: + add r6, r6, #1 + cmp r6, r5 + blt _02240EF6 + b _02240F3C +_02240F16: + mov r6, #0 + cmp r5, #0 + ble _02240F3C + ldr r7, _02240F40 ; =0x00000195 +_02240F1E: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #5 + bne _02240F36 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0226518C + b _02240F3C +_02240F36: + add r6, r6, #1 + cmp r6, r5 + blt _02240F1E +_02240F3C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240F40: .word 0x00000195 + thumb_func_end ov16_02240D94 + + thumb_func_start ov16_02240F44 +ov16_02240F44: ; 0x02240F44 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r5, r0, #0 + add r0, r7, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r7, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r7, #0 + bl ov16_02248AD0 + add r7, r0, #0 + cmp r6, #0xc + bhi _02240F92 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02240F78: ; jump table + .short _02240F92 - _02240F78 - 2 ; case 0 + .short _02240F92 - _02240F78 - 2 ; case 1 + .short _02240F92 - _02240F78 - 2 ; case 2 + .short _02240FBA - _02240F78 - 2 ; case 3 + .short _02240FF0 - _02240F78 - 2 ; case 4 + .short _02240F92 - _02240F78 - 2 ; case 5 + .short _02240F92 - _02240F78 - 2 ; case 6 + .short _02240F92 - _02240F78 - 2 ; case 7 + .short _02240F92 - _02240F78 - 2 ; case 8 + .short _02241026 - _02240F78 - 2 ; case 9 + .short _02241054 - _02240F78 - 2 ; case 10 + .short _02241082 - _02240F78 - 2 ; case 11 + .short _022410AC - _02240F78 - 2 ; case 12 +_02240F92: + mov r6, #0 + cmp r5, #0 + ble _02240FB8 +_02240F98: + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02240FA8 + cmp r6, #1 + bgt _02240FB8 +_02240FA8: + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + add r6, r6, #1 + cmp r6, r5 + blt _02240F98 +_02240FB8: + b _022410D4 +_02240FBA: + mov r6, #0 + cmp r5, #0 + ble _02240FEE +_02240FC0: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _022410D8 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _02240FE8 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _022410D4 +_02240FE8: + add r6, r6, #1 + cmp r6, r5 + blt _02240FC0 +_02240FEE: + b _022410D4 +_02240FF0: + mov r6, #0 + cmp r5, #0 + ble _022410D4 +_02240FF6: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _022410D8 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _0224101E + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _022410D4 +_0224101E: + add r6, r6, #1 + cmp r6, r5 + blt _02240FF6 + b _022410D4 +_02241026: + mov r6, #0 + cmp r5, #0 + ble _022410D4 +_0224102C: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _022410D8 ; =0x00000195 + ldrb r0, [r0, r1] + cmp r0, #0 + beq _02241040 + cmp r0, #2 + bne _0224104C +_02241040: + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + b _022410D4 +_0224104C: + add r6, r6, #1 + cmp r6, r5 + blt _0224102C + b _022410D4 +_02241054: + mov r6, #0 + cmp r5, #0 + ble _022410D4 +_0224105A: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _022410D8 ; =0x00000195 + ldrb r0, [r0, r1] + cmp r0, #1 + beq _0224106E + cmp r0, #3 + bne _0224107A +_0224106E: + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + b _022410D4 +_0224107A: + add r6, r6, #1 + cmp r6, r5 + blt _0224105A + b _022410D4 +_02241082: + mov r6, #0 + cmp r5, #0 + ble _022410D4 +_02241088: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _022410D8 ; =0x00000195 + ldrb r0, [r0, r1] + cmp r0, #4 + bne _022410A4 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + b _022410D4 +_022410A4: + add r6, r6, #1 + cmp r6, r5 + blt _02241088 + b _022410D4 +_022410AC: + mov r6, #0 + cmp r5, #0 + ble _022410D4 +_022410B2: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _022410D8 ; =0x00000195 + ldrb r0, [r0, r1] + cmp r0, #5 + bne _022410CE + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_022651A8 + b _022410D4 +_022410CE: + add r6, r6, #1 + cmp r6, r5 + blt _022410B2 +_022410D4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022410D8: .word 0x00000195 + thumb_func_end ov16_02240F44 + + thumb_func_start ov16_022410DC +ov16_022410DC: ; 0x022410DC + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + bl ov16_0223DF1C + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r4, #0 + cmp r5, #0 + ble _02241104 +_022410F6: + add r0, r6, #0 + add r1, r4, #0 + bl ov16_02266460 + add r4, r4, #1 + cmp r4, r5 + blt _022410F6 +_02241104: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_022410DC + + thumb_func_start ov16_02241108 +ov16_02241108: ; 0x02241108 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + add r0, r7, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r7, #0 + bl ov16_02248AD0 + add r2, r0, #0 + beq _02241130 + cmp r2, #3 + beq _0224114A + cmp r2, #4 + beq _02241176 + b _022411A2 +_02241130: + mov r5, #0 + cmp r6, #0 + ble _022411B6 +_02241136: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #0 + bl ov16_022651DC + add r5, r5, #1 + cmp r5, r6 + blt _02241136 + b _022411B6 +_0224114A: + mov r5, #0 + cmp r6, #0 + ble _022411B6 +_02241150: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _022411BC ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _0224116E + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #0 + bl ov16_022651DC +_0224116E: + add r5, r5, #1 + cmp r5, r6 + blt _02241150 + b _022411B6 +_02241176: + mov r5, #0 + cmp r6, #0 + ble _022411B6 +_0224117C: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _022411BC ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _0224119A + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #0 + bl ov16_022651DC +_0224119A: + add r5, r5, #1 + cmp r5, r6 + blt _0224117C + b _022411B6 +_022411A2: + add r0, r4, #0 + add r1, r7, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + mov r3, #0 + bl ov16_022651DC +_022411B6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022411BC: .word 0x00000195 + thumb_func_end ov16_02241108 + + thumb_func_start ov16_022411C0 +ov16_022411C0: ; 0x022411C0 + push {r3, r4, r5, r6, r7, lr} + str r1, [sp] + add r5, r0, #0 + bl ov16_0223DF1C + add r7, r0, #0 + ldr r0, [sp] + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [sp] + bl ov16_02248AD0 + add r2, r0, #0 + ldr r4, _02241280 ; =0x00000000 + beq _022411EA + cmp r2, #3 + beq _02241204 + cmp r2, #4 + beq _02241236 + b _02241268 +_022411EA: + cmp r7, #0 + ble _0224127C + add r6, r4, #0 +_022411F0: + ldr r1, [sp] + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov16_022651DC + add r4, r4, #1 + cmp r4, r7 + blt _022411F0 + b _0224127C +_02241204: + add r6, r4, #0 + cmp r7, #0 + ble _0224127C +_0224120A: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _02241284 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _0224122E + ldr r1, [sp] + add r0, r5, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov16_022651DC + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_0224122E: + add r6, r6, #1 + cmp r6, r7 + blt _0224120A + b _0224127C +_02241236: + add r6, r4, #0 + cmp r7, #0 + ble _0224127C +_0224123C: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223DF14 + ldr r1, _02241284 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + beq _02241260 + ldr r1, [sp] + add r0, r5, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov16_022651DC + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_02241260: + add r6, r6, #1 + cmp r6, r7 + blt _0224123C + b _0224127C +_02241268: + ldr r1, [sp] + add r0, r5, #0 + bl ov16_0224A984 + add r2, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + add r3, r4, #0 + bl ov16_022651DC +_0224127C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241280: .word 0x00000000 +_02241284: .word 0x00000195 + thumb_func_end ov16_022411C0 + + thumb_func_start ov16_02241288 +ov16_02241288: ; 0x02241288 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + add r0, r7, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r7, #0 + bl ov16_02248AD0 + add r2, r0, #0 + beq _022412B0 + cmp r2, #3 + beq _022412C6 + cmp r2, #4 + beq _022412FC + b _02241324 +_022412B0: + mov r5, #0 + cmp r6, #0 + ble _02241334 +_022412B6: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265314 + add r5, r5, #1 + cmp r5, r6 + blt _022412B6 + b _02241334 +_022412C6: + mov r5, #0 + cmp r6, #0 + ble _02241334 +_022412CC: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02241338 ; =0x00000195 + ldrb r1, [r0, r1] + mov r0, #1 + tst r0, r1 + bne _022412F4 + add r0, r5, #0 + bl sub_020787CC + ldr r1, _0224133C ; =0x00003108 + ldrb r1, [r7, r1] + tst r0, r1 + bne _022412F4 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265314 +_022412F4: + add r5, r5, #1 + cmp r5, r6 + blt _022412CC + b _02241334 +_022412FC: + mov r5, #0 + cmp r6, #0 + ble _02241334 + mov r7, #1 +_02241304: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02241338 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _0224131C + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02265314 +_0224131C: + add r5, r5, #1 + cmp r5, r6 + blt _02241304 + b _02241334 +_02241324: + add r0, r4, #0 + add r1, r7, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_02265314 +_02241334: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241338: .word 0x00000195 +_0224133C: .word 0x00003108 + thumb_func_end ov16_02241288 + + thumb_func_start ov16_02241340 +ov16_02241340: ; 0x02241340 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov16_02251FC8 + cmp r0, #0 + beq _02241358 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + b _0224135E +_02241358: + add r0, r4, #0 + bl ov16_0225201C +_0224135E: + ldr r1, _02241370 ; =0x00003154 + mov r0, #1 + ldr r2, [r4, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r4, r1] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02241370: .word 0x00003154 + thumb_func_end ov16_02241340 + + thumb_func_start ov16_02241374 +ov16_02241374: ; 0x02241374 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r1, #0 + ldr r1, [r5, #0x64] + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x60 + bne _0224138C + mov r4, #0 + b _022413A0 +_0224138C: + ldr r0, _022414C0 ; =0x00002160 + ldr r4, [r5, r0] + cmp r4, #0 + bne _022413A0 + ldr r0, _022414C4 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022414C8 ; =0x000003E2 + ldrb r4, [r1, r0] +_022413A0: + ldr r0, [r5, #0x6c] + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r7, #0 + bl ov16_0223E208 + mov r3, #6 + lsl r3, r3, #6 + add r6, r0, #0 + ldr r0, [r5, r3] + ldr r1, _022414CC ; =0x00002154 + str r0, [sp] + ldr r0, [r5, r1] + ldr r2, _022414C4 ; =0x00003044 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0x64] + lsl r4, r6, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + add r4, r5, r4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + sub r0, r1, #4 + ldr r0, [r5, r0] + add r3, #0x3c + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x14] + ldr r2, [r5, r2] + ldr r3, [r4, r3] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0225A280 + ldr r1, _022414D0 ; =0x00002144 + str r0, [r5, r1] + add r0, r1, #0 + add r0, #0xc + ldr r2, [r5, r1] + ldr r0, [r5, r0] + mul r0, r2 + str r0, [r5, r1] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02258AB8 + cmp r0, #0x62 + bne _0224142C + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + ldr r1, _022414D0 ; =0x00002144 + add r0, #0x64 + ldr r1, [r5, r1] + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, _022414D0 ; =0x00002144 + str r0, [r5, r1] +_0224142C: + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02258AB8 + cmp r0, #0x69 + bne _0224145A + ldr r0, _022414D0 ; =0x00002144 + ldr r2, [r5, #0x64] + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r2 + add r2, r5, r0 + ldr r0, _022414D4 ; =0x00002DCC + ldr r0, [r2, r0] + lsl r0, r0, #5 + lsr r0, r0, #0x1c + add r0, #0xa + mul r0, r1 + mov r1, #0xa + bl sub_020E2178 + ldr r1, _022414D0 ; =0x00002144 + str r0, [r5, r1] +_0224145A: + ldr r2, [r5, #0x64] + mov r1, #0xc0 + add r0, r2, #0 + mul r0, r1 + ldr r2, _022414D4 ; =0x00002DCC + add r3, r5, r0 + ldr r3, [r3, r2] + lsl r3, r3, #1 + lsr r3, r3, #0x1f + beq _022414BA + add r2, #0x10 + add r3, r5, r2 + add r1, #0xb4 + ldr r2, [r5, r1] + ldr r1, [r3, r0] + cmp r2, r1 + bne _02241480 + sub r1, r1, #1 + str r1, [r3, r0] +_02241480: + ldr r2, [r5, #0x64] + mov r1, #0xc0 + add r0, r2, #0 + mul r0, r1 + add r1, #0xb4 + ldr r3, [r5, r1] + ldr r1, _022414D8 ; =0x00002DDC + add r2, r5, r0 + ldr r2, [r2, r1] + sub r2, r3, r2 + cmp r2, #2 + bge _022414AE + ldr r0, _022414D0 ; =0x00002144 + ldr r1, [r5, r0] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, _022414D0 ; =0x00002144 + add sp, #0x1c + str r0, [r5, r1] + pop {r4, r5, r6, r7, pc} +_022414AE: + sub r1, #0x10 + add r3, r5, r1 + ldr r2, [r3, r0] + ldr r1, _022414DC ; =0xBFFFFFFF + and r1, r2 + str r1, [r3, r0] +_022414BA: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_022414C0: .word 0x00002160 +_022414C4: .word 0x00003044 +_022414C8: .word 0x000003E2 +_022414CC: .word 0x00002154 +_022414D0: .word 0x00002144 +_022414D4: .word 0x00002DCC +_022414D8: .word 0x00002DDC +_022414DC: .word 0xBFFFFFFF + thumb_func_end ov16_02241374 + + thumb_func_start ov16_022414E0 +ov16_022414E0: ; 0x022414E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02241374 + ldr r2, _02241514 ; =0x00002144 + add r0, r5, #0 + ldr r2, [r4, r2] + add r1, r4, #0 + bl ov16_0225AEB8 + ldr r1, _02241514 ; =0x00002144 + str r0, [r4, r1] + mov r0, #0 + ldr r2, [r4, r1] + mvn r0, r0 + mul r0, r2 + str r0, [r4, r1] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02241514: .word 0x00002144 + thumb_func_end ov16_022414E0 + + thumb_func_start ov16_02241518 +ov16_02241518: ; 0x02241518 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02241374 + ldr r1, _02241540 ; =0x00002144 + mov r0, #0 + ldr r2, [r4, r1] + mvn r0, r0 + mul r0, r2 + str r0, [r4, r1] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02241540: .word 0x00002144 + thumb_func_end ov16_02241518 + + thumb_func_start ov16_02241544 +ov16_02241544: ; 0x02241544 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, _02241580 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #1 + tst r0, r1 + bne _02241564 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02265B68 +_02241564: + ldr r1, _02241580 ; =0x0000213C + mov r0, #1 + ldr r2, [r4, r1] + orr r0, r2 + str r0, [r4, r1] + add r0, r1, #4 + ldr r2, [r4, r0] + mov r0, #4 + orr r2, r0 + add r0, r1, #4 + str r2, [r4, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02241580: .word 0x0000213C + thumb_func_end ov16_02241544 + + thumb_func_start ov16_02241584 +ov16_02241584: ; 0x02241584 + push {r4, r5, lr} + sub sp, #0x44 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + add r1, sp, #0x24 + bl ov16_0224ABEC + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x24 + add r3, sp, #0 + bl ov16_0224ACB8 + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0 + bl ov16_02265BA0 + mov r0, #0 + add sp, #0x44 + pop {r4, r5, pc} + thumb_func_end ov16_02241584 + + thumb_func_start ov16_022415B8 +ov16_022415B8: ; 0x022415B8 + push {r4, r5, lr} + sub sp, #0x44 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + add r1, sp, #0x24 + bl ov16_0224ABEC + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x24 + add r3, sp, #0 + bl ov16_0224ACB8 + add r1, sp, #0 + ldrb r2, [r1, #1] + mov r0, #0x80 + orr r0, r2 + strb r0, [r1, #1] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0 + bl ov16_02265BA0 + mov r0, #0 + add sp, #0x44 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022415B8 + + thumb_func_start ov16_022415F8 +ov16_022415F8: ; 0x022415F8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r1, r4, #0 + add r4, #0xf4 + add r0, r5, #0 + add r2, r4, #0 + bl ov16_02265BA0 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022415F8 + + thumb_func_start ov16_02241618 +ov16_02241618: ; 0x02241618 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + add r1, sp, #0 + bl ov16_0224ABEC + add r1, r4, #0 + add r4, #0xf4 + add r0, r5, #0 + add r2, sp, #0 + add r3, r4, #0 + bl ov16_0224ACB8 + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02241618 + + thumb_func_start ov16_02241644 +ov16_02241644: ; 0x02241644 + push {r3, r4, r5, r6, lr} + sub sp, #0x44 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + add r1, sp, #0x24 + bl ov16_0224ABEC + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x24 + add r3, sp, #0 + bl ov16_0224ACB8 + add r1, sp, #0 + ldrb r2, [r1, #1] + mov r0, #0x40 + orr r0, r2 + strb r0, [r1, #1] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + str r0, [sp, #0x20] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0 + bl ov16_02265BA0 + mov r0, #0 + add sp, #0x44 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02241644 + + thumb_func_start ov16_02241698 +ov16_02241698: ; 0x02241698 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + cmp r0, #0xff + bne _022416B6 + mov r0, #0x49 + lsl r0, r0, #2 + b _022416B8 +_022416B6: + ldr r0, _02241708 ; =0x00003044 +_022416B8: + ldr r0, [r5, r0] + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, _0224170C ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #1 + lsl r0, r0, #0xe + tst r0, r1 + bne _022416D4 + add r0, r6, #0 + bl ov16_0223EDAC + cmp r0, #1 + beq _022416D8 +_022416D4: + cmp r4, #0x90 + bne _022416EE +_022416D8: + ldr r1, _0224170C ; =0x0000213C + mov r0, #1 + ldr r2, [r5, r1] + lsl r0, r0, #0xe + orr r0, r2 + str r0, [r5, r1] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_02265BBC +_022416EE: + add r0, r6, #0 + bl ov16_0223EDAC + cmp r0, #0 + bne _02241702 + ldr r2, _02241710 ; =0x00000123 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248B08 +_02241702: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02241708: .word 0x00003044 +_0224170C: .word 0x0000213C +_02241710: .word 0x00000123 + thumb_func_end ov16_02241698 + + thumb_func_start ov16_02241714 +ov16_02241714: ; 0x02241714 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + cmp r6, #0xff + bne _02241746 + mov r0, #0x49 + lsl r0, r0, #2 + b _02241748 +_02241746: + ldr r0, _022417B4 ; =0x00003044 +_02241748: + ldr r0, [r4, r0] + add r1, r4, #0 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r5, #0 + add r2, r7, #0 + bl ov16_0224A984 + str r0, [sp, #4] + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r7, r0, #0 + ldr r0, _022417B8 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #1 + lsl r0, r0, #0xe + tst r0, r1 + bne _0224177C + add r0, r5, #0 + bl ov16_0223EDAC + cmp r0, #1 + beq _02241780 +_0224177C: + cmp r6, #0x90 + bne _0224179A +_02241780: + ldr r1, _022417B8 ; =0x0000213C + mov r0, #1 + ldr r2, [r4, r1] + lsl r0, r0, #0xe + orr r0, r2 + str r0, [r4, r1] + ldr r3, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + str r7, [sp] + bl ov16_02265BEC +_0224179A: + add r0, r5, #0 + bl ov16_0223EDAC + cmp r0, #0 + bne _022417AE + ldr r2, _022417BC ; =0x00000123 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248B08 +_022417AE: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022417B4: .word 0x00003044 +_022417B8: .word 0x0000213C +_022417BC: .word 0x00000123 + thumb_func_end ov16_02241714 + + thumb_func_start ov16_022417C0 +ov16_022417C0: ; 0x022417C0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + ldr r2, _022417F0 ; =0x0000216C + add r1, r0, #0 + ldr r2, [r4, r2] + add r0, r5, #0 + bl ov16_02265C1C + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022417F0: .word 0x0000216C + thumb_func_end ov16_022417C0 + + thumb_func_start ov16_022417F4 +ov16_022417F4: ; 0x022417F4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + ldr r0, _02241888 ; =0x00002D8C + add r7, r2, #0 + add r5, r4, r0 + mov r0, #0xc0 + mul r7, r0 + ldr r0, _0224188C ; =0x0000215C + ldr r6, [r5, r7] + ldr r3, [r4, r0] + add r1, r3, r6 + cmp r1, #0 + bgt _02241832 + neg r1, r6 + sub r0, #0x14 + str r1, [r4, r0] + b _02241836 +_02241832: + sub r0, #0x14 + str r3, [r4, r0] +_02241836: + ldr r0, _02241890 ; =0x00002148 + ldr r6, [r4, r0] + cmp r6, #0 + bge _0224184C + mov r0, #0x59 + lsl r0, r0, #2 + add r3, r4, r0 + lsl r1, r2, #2 + ldr r0, [r3, r1] + sub r0, r0, r6 + str r0, [r3, r1] +_0224184C: + mov r0, #0xc0 + add r3, r2, #0 + mul r3, r0 + ldr r0, _02241888 ; =0x00002D8C + ldr r6, _0224188C ; =0x0000215C + add r1, r4, r0 + ldr r0, [r1, r3] + ldr r6, [r4, r6] + add r0, r0, r6 + str r0, [r1, r3] + ldr r1, [r1, r3] + cmp r1, #0 + bge _0224186C + mov r0, #0 + str r0, [r5, r7] + b _0224187A +_0224186C: + add r0, r4, r3 + ldr r3, _02241888 ; =0x00002D8C + add r3, r3, #4 + ldr r0, [r0, r3] + cmp r1, r0 + bls _0224187A + str r0, [r5, r7] +_0224187A: + ldr r0, [sp] + add r1, r4, #0 + bl ov16_02253EC0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241888: .word 0x00002D8C +_0224188C: .word 0x0000215C +_02241890: .word 0x00002148 + thumb_func_end ov16_022417F4 + + thumb_func_start ov16_02241894 +ov16_02241894: ; 0x02241894 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02265C38 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02241894 + + thumb_func_start ov16_022418C0 +ov16_022418C0: ; 0x022418C0 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0224A984 + add r4, r0, #0 + mov r1, #0xc0 + mul r1, r4 + add r2, r5, r1 + ldr r1, _0224191C ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + bne _02241916 + str r4, [r5, #0x74] + bl sub_020787CC + ldr r1, _02241920 ; =0x0000213C + lsl r0, r0, #0x18 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] + mov r0, #0x55 + lsl r0, r0, #2 + add r2, r5, r0 + lsl r1, r4, #2 + ldr r0, [r2, r1] + add r0, r0, #1 + str r0, [r2, r1] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224B850 +_02241916: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_0224191C: .word 0x00002D8C +_02241920: .word 0x0000213C + thumb_func_end ov16_022418C0 + + thumb_func_start ov16_02241924 +ov16_02241924: ; 0x02241924 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r2, [r4, #0x74] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02265D98 + ldr r0, [r4, #0x74] + bl sub_020787CC + ldr r2, _02241980 ; =0x0000213C + lsl r3, r0, #0x18 + mov r0, #0 + mvn r0, r0 + ldr r1, [r4, r2] + eor r0, r3 + and r0, r1 + str r0, [r4, r2] + ldr r0, [r4, #0x74] + bl sub_020787CC + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r4, r1] + lsl r0, r0, #0x1c + orr r0, r2 + str r0, [r4, r1] + ldr r0, [r4, #0x74] + mov r2, #0x27 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, #0x68 + str r2, [r0, r1] + ldr r2, [r4, #0x74] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02254744 + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02241980: .word 0x0000213C + thumb_func_end ov16_02241924 + + thumb_func_start ov16_02241984 +ov16_02241984: ; 0x02241984 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + bne _022419BE + ldr r0, _02241A10 ; =0x021BF67C + ldr r1, [r0, #0x48] + ldr r0, _02241A14 ; =0x00000C03 + tst r0, r1 + bne _022419B8 + bl sub_02022798 + cmp r0, #0 + beq _022419BE +_022419B8: + add r0, r5, #0 + add r0, #0xf0 + str r6, [r0, #0] +_022419BE: + ldr r1, [r4, #0x2c] + mov r0, #4 + tst r0, r1 + beq _022419D4 + ldr r0, _02241A18 ; =0x0000240C + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + bne _022419D4 + mov r4, #2 + b _022419D6 +_022419D4: + mov r4, #1 +_022419D6: + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + cmp r6, r0 + ble _022419F4 + mov r1, #1 + add r0, r5, #0 + mvn r1, r1 + bl ov16_02248AF0 + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, r4 + b _022419F6 +_022419F4: + mov r1, #0 +_022419F6: + add r0, r5, #0 + add r0, #0xf0 + str r1, [r0, #0] + ldr r1, _02241A1C ; =0x00003154 + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r5, r1] + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02241A10: .word 0x021BF67C +_02241A14: .word 0x00000C03 +_02241A18: .word 0x0000240C +_02241A1C: .word 0x00003154 + thumb_func_end ov16_02241984 + + thumb_func_start ov16_02241A20 +ov16_02241A20: ; 0x02241A20 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r3, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_02265EAC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02241A20 + + thumb_func_start ov16_02241A58 +ov16_02241A58: ; 0x02241A58 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r6, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r6, #0 + bl ov16_02248B10 + cmp r7, #6 + bhi _02241AF6 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02241AA2: ; jump table + .short _02241AB0 - _02241AA2 - 2 ; case 0 + .short _02241ABA - _02241AA2 - 2 ; case 1 + .short _02241AC4 - _02241AA2 - 2 ; case 2 + .short _02241ACE - _02241AA2 - 2 ; case 3 + .short _02241AD8 - _02241AA2 - 2 ; case 4 + .short _02241AE2 - _02241AA2 - 2 ; case 5 + .short _02241AEC - _02241AA2 - 2 ; case 6 +_02241AB0: + ldr r0, [r0, #0] + cmp r0, r4 + beq _02241AF6 + mov r5, #0 + b _02241AF6 +_02241ABA: + ldr r0, [r0, #0] + cmp r0, r4 + bne _02241AF6 + mov r5, #0 + b _02241AF6 +_02241AC4: + ldr r0, [r0, #0] + cmp r0, r4 + bgt _02241AF6 + mov r5, #0 + b _02241AF6 +_02241ACE: + ldr r0, [r0, #0] + cmp r0, r4 + ble _02241AF6 + mov r5, #0 + b _02241AF6 +_02241AD8: + ldr r0, [r0, #0] + tst r0, r4 + bne _02241AF6 + mov r5, #0 + b _02241AF6 +_02241AE2: + ldr r0, [r0, #0] + tst r0, r4 + beq _02241AF6 + mov r5, #0 + b _02241AF6 +_02241AEC: + ldr r0, [r0, #0] + and r0, r4 + cmp r4, r0 + beq _02241AF6 + mov r5, #0 +_02241AF6: + cmp r5, #0 + beq _02241B02 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02248AF0 +_02241B02: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02241A58 + + thumb_func_start ov16_02241B08 +ov16_02241B08: ; 0x02241B08 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r6, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + ldr r2, [sp, #8] + add r0, r6, #0 + mov r3, #0 + bl ov16_02252060 + cmp r7, #6 + bhi _02241BAC + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02241B66: ; jump table + .short _02241B74 - _02241B66 - 2 ; case 0 + .short _02241B7C - _02241B66 - 2 ; case 1 + .short _02241B84 - _02241B66 - 2 ; case 2 + .short _02241B8C - _02241B66 - 2 ; case 3 + .short _02241B94 - _02241B66 - 2 ; case 4 + .short _02241B9C - _02241B66 - 2 ; case 5 + .short _02241BA4 - _02241B66 - 2 ; case 6 +_02241B74: + cmp r0, r4 + beq _02241BAC + mov r5, #0 + b _02241BAC +_02241B7C: + cmp r0, r4 + bne _02241BAC + mov r5, #0 + b _02241BAC +_02241B84: + cmp r0, r4 + bgt _02241BAC + mov r5, #0 + b _02241BAC +_02241B8C: + cmp r0, r4 + ble _02241BAC + mov r5, #0 + b _02241BAC +_02241B94: + tst r0, r4 + bne _02241BAC + mov r5, #0 + b _02241BAC +_02241B9C: + tst r0, r4 + beq _02241BAC + mov r5, #0 + b _02241BAC +_02241BA4: + and r0, r4 + cmp r4, r0 + beq _02241BAC + mov r5, #0 +_02241BAC: + cmp r5, #0 + beq _02241BB8 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02248AF0 +_02241BB8: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02241B08 + + thumb_func_start ov16_02241BC0 +ov16_02241BC0: ; 0x02241BC0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02265ECC + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02241BC0 + + thumb_func_start ov16_02241BDC +ov16_02241BDC: ; 0x02241BDC + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248B00 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov16_02241BDC + + thumb_func_start ov16_02241BFC +ov16_02241BFC: ; 0x02241BFC + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r2, _02241C20 ; =0x00003044 + add r0, r4, #0 + ldr r2, [r4, r2] + mov r1, #0x1e + lsl r2, r2, #4 + add r3, r4, r2 + ldr r2, _02241C24 ; =0x000003DE + ldrh r2, [r3, r2] + bl ov16_02248B00 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02241C20: .word 0x00003044 +_02241C24: .word 0x000003DE + thumb_func_end ov16_02241BFC + + thumb_func_start ov16_02241C28 +ov16_02241C28: ; 0x02241C28 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + ldr r2, _02241CC0 ; =0x0000213C + mov r1, #1 + ldr r3, [r4, r2] + bic r3, r1 + str r3, [r4, r2] + ldr r3, [r4, r2] + ldr r1, _02241CC4 ; =0xFFFFBFFF + and r1, r3 + mov r3, #0x49 + lsl r3, r3, #2 + str r1, [r4, r2] + ldr r2, [r4, r3] + ldr r1, _02241CC8 ; =0x00003044 + cmp r0, #0 + str r2, [r4, r1] + bne _02241C98 + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r3, [r4, r3] + ldr r2, [r4, #0x64] + lsl r3, r3, #0x10 + add r0, r5, #0 + add r1, r4, #0 + lsr r3, r3, #0x10 + bl ov16_02253954 + str r0, [r4, #0x6c] + mov r3, #0x49 + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r2, [r4, #0x64] + lsl r3, r3, #0x10 + add r0, r5, #0 + add r1, r4, #0 + lsr r3, r3, #0x10 + bl ov16_02253C98 + ldr r0, [r4, #0x64] + ldr r2, [r4, #0x6c] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02241CCC ; =0x000021AC + str r2, [r1, r0] +_02241C98: + ldr r0, [r4, #0x6c] + cmp r0, #0xff + bne _02241CAE + mov r2, #0x26 + str r2, [r4, #0xc] + add r0, r4, #0 + mov r1, #1 + add r2, #0xf3 + bl ov16_02248B00 + b _02241CBA +_02241CAE: + ldr r2, _02241CC8 ; =0x00003044 + add r0, r4, #0 + ldr r2, [r4, r2] + mov r1, #0 + bl ov16_02248B00 +_02241CBA: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02241CC0: .word 0x0000213C +_02241CC4: .word 0xFFFFBFFF +_02241CC8: .word 0x00003044 +_02241CCC: .word 0x000021AC + thumb_func_end ov16_02241C28 + + thumb_func_start ov16_02241CD0 +ov16_02241CD0: ; 0x02241CD0 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + bne _02241CFA + add r0, r5, #0 + bl ov16_0223EBEC + mov r1, #1 + tst r0, r1 + beq _02241D02 +_02241CFA: + ldr r0, _02241D2C ; =0x00002150 + mov r1, #1 + str r1, [r4, r0] + b _02241D26 +_02241D02: + ldr r3, [r4, #0x6c] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov16_0225B45C + ldr r1, _02241D30 ; =0x0000214C + ldr r1, [r4, r1] + str r1, [sp] + str r0, [sp, #4] + ldr r2, [r4, #0x64] + ldr r3, [r4, #0x6c] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225AEE4 + ldr r1, _02241D2C ; =0x00002150 + str r0, [r4, r1] +_02241D26: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02241D2C: .word 0x00002150 +_02241D30: .word 0x0000214C + thumb_func_end ov16_02241CD0 + + thumb_func_start ov16_02241D34 +ov16_02241D34: ; 0x02241D34 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r7, r0, #0 + bl ov16_0223DF0C + add r4, r0, #0 + ldr r1, [r5, #0x74] + add r0, r7, #0 + bl ov16_0223DF14 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r1, r0, #0 + ldr r0, _02241EA8 ; =0x00000195 + ldrb r2, [r6, r0] + mov r0, #1 + tst r0, r2 + beq _02241D6E + mov r0, #0xa9 + lsl r0, r0, #2 + tst r0, r4 + beq _02241D70 +_02241D6E: + b _02241E9C +_02241D70: + mov r0, #0 + str r0, [sp, #4] + ldr r1, [sp, #4] + str r0, [sp] + add r4, r0, #0 + add r0, r7, #0 + bl ov16_0223DF20 + bl sub_0207A0F8 + cmp r0, #0 + ble _02241DFE +_02241D88: + add r0, r7, #0 + mov r1, #0 + add r2, r4, #0 + bl ov16_0223DFAC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02241DEC + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02241DEC + add r0, r4, #0 + bl sub_020787CC + ldr r1, [r5, #0x74] + asr r1, r1, #1 + lsl r1, r1, #0x1f + lsr r1, r1, #0x1d + add r1, r5, r1 + add r1, #0xa4 + ldr r1, [r1, #0] + tst r0, r1 + beq _02241DCC + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_02241DCC: + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + add r0, r5, #0 + mov r2, #1 + bl ov16_0225B0FC + cmp r0, #0x33 + bne _02241DEC + ldr r0, [sp] + add r0, r0, #1 + str r0, [sp] +_02241DEC: + add r0, r7, #0 + mov r1, #0 + add r4, r4, #1 + bl ov16_0223DF20 + bl sub_0207A0F8 + cmp r4, r0 + blt _02241D88 +_02241DFE: + ldr r1, [r5, #0x74] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r1, r0] + mov r1, #9 + bl sub_020759F0 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r2, [r5, #0x74] + mov r0, #0xc0 + mul r0, r2 + add r2, r5, r0 + ldr r0, _02241EAC ; =0x00002D74 + ldrb r0, [r2, r0] + mul r0, r1 + mov r1, #7 + bl sub_020E1F6C + lsl r0, r0, #0x10 + ldr r1, [sp] + lsr r0, r0, #0x10 + cmp r1, #0 + beq _02241E76 + lsr r4, r0, #1 + ldr r1, [sp, #4] + add r0, r4, #0 + bl sub_020E1F6C + add r1, r5, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x9c + ldr r0, [r0, #0] + cmp r0, #0 + bne _02241E56 + add r0, r5, #0 + mov r1, #1 + add r0, #0x9c + str r1, [r0, #0] +_02241E56: + ldr r1, [sp] + add r0, r4, #0 + bl sub_020E1F6C + add r1, r5, #0 + add r1, #0xa0 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02241EA2 + mov r0, #1 + add r5, #0xa0 + str r0, [r5, #0] + b _02241EA2 +_02241E76: + ldr r1, [sp, #4] + bl sub_020E1F6C + add r1, r5, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x9c + ldr r0, [r0, #0] + cmp r0, #0 + bne _02241E94 + add r0, r5, #0 + mov r1, #1 + add r0, #0x9c + str r1, [r0, #0] +_02241E94: + mov r0, #0 + add r5, #0xa0 + str r0, [r5, #0] + b _02241EA2 +_02241E9C: + add r0, r5, #0 + bl ov16_02248AF0 +_02241EA2: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241EA8: .word 0x00000195 +_02241EAC: .word 0x00002D74 + thumb_func_end ov16_02241D34 + + thumb_func_start ov16_02241EB0 +ov16_02241EB0: ; 0x02241EB0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #5 + mov r1, #0x58 + bl sub_02018144 + mov r1, #0x5e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r2, #0 + str r5, [r0, #0] + ldr r0, [r4, r1] + str r4, [r0, #4] + ldr r0, [r4, r1] + str r2, [r0, #0x28] + ldr r0, [r4, r1] + str r2, [r0, #0x48] + ldr r0, _02241EEC ; =ov16_02248E74 + ldr r1, [r4, r1] + bl sub_0200D9E8 + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02241EEC: .word ov16_02248E74 + thumb_func_end ov16_02241EB0 + + thumb_func_start ov16_02241EF0 +ov16_02241EF0: ; 0x02241EF0 + push {r4, lr} + mov r0, #0x5e + add r4, r1, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02241F06 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 +_02241F06: + ldr r1, _02241F18 ; =0x00003154 + mov r0, #1 + ldr r2, [r4, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r4, r1] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02241F18: .word 0x00003154 + thumb_func_end ov16_02241EF0 + + thumb_func_start ov16_02241F1C +ov16_02241F1C: ; 0x02241F1C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02241F1C + + thumb_func_start ov16_02241F34 +ov16_02241F34: ; 0x02241F34 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #8] + add r6, r0, #0 + bl ov16_0223DF1C + add r7, r0, #0 + ldr r0, [sp, #8] + mov r1, #1 + bl ov16_02248AF0 + mov r4, #0 + add r5, r4, #0 + cmp r7, #0 + ble _02241F8C + ldr r0, [sp, #8] + str r0, [sp, #0xc] +_02241F56: + mov r0, #0x4f + ldr r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _02241F80 + add r0, r5, #0 + bl sub_020787CC + orr r4, r0 + mov r0, #0 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r1, [sp, #8] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #1 + bl ov16_02265A8C +_02241F80: + ldr r0, [sp, #0xc] + add r5, r5, #1 + add r0, r0, #4 + str r0, [sp, #0xc] + cmp r5, r7 + blt _02241F56 +_02241F8C: + mov r5, #0 + cmp r7, #0 + ble _02241FE4 +_02241F92: + add r0, r6, #0 + bl ov16_0223DF0C + cmp r0, #7 + bne _02241FCC + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223E258 + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_020787CC + tst r0, r4 + bne _02241FDE + ldr r0, [sp, #0x10] + bl sub_020787CC + tst r0, r4 + bne _02241FDE + add r0, r5, #0 + bl sub_020787CC + orr r4, r0 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_022666E0 + b _02241FDE +_02241FCC: + add r0, r5, #0 + bl sub_020787CC + tst r0, r4 + bne _02241FDE + add r0, r6, #0 + add r1, r5, #0 + bl ov16_022666E0 +_02241FDE: + add r5, r5, #1 + cmp r5, r7 + blt _02241F92 +_02241FE4: + mov r0, #0 + cmp r7, #0 + ble _02242006 + mov r1, #0x4f + ldr r4, [sp, #8] + lsl r1, r1, #2 + mov r2, #1 +_02241FF2: + ldr r3, [r4, r1] + tst r3, r2 + beq _02241FFE + ldr r1, [sp, #8] + str r0, [r1, #0x78] + b _02242006 +_02241FFE: + add r0, r0, #1 + add r4, r4, #4 + cmp r0, r7 + blt _02241FF2 +_02242006: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_02241F34 + + thumb_func_start ov16_0224200C +ov16_0224200C: ; 0x0224200C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + add r5, r1, #0 + bl ov16_0223DF1C + add r7, r0, #0 + mov r6, #0 + add r0, r6, #0 + cmp r7, #0 + ble _0224203A + mov r4, #0x4f + add r1, r5, #0 + lsl r4, r4, #2 + mov r2, #1 +_0224202A: + ldr r3, [r1, r4] + tst r3, r2 + beq _02242032 + add r6, r6, #1 +_02242032: + add r0, r0, #1 + add r1, r1, #4 + cmp r0, r7 + blt _0224202A +_0224203A: + mov r4, #0 + cmp r7, #0 + ble _022420B6 + str r5, [sp, #8] + str r5, [sp, #4] +_02242044: + mov r0, #0x4f + ldr r1, [sp, #8] + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022420A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _022420A0 + mov r0, #0x23 + ldr r1, [sp, #4] + lsl r0, r0, #8 + ldrb r0, [r1, r0] + add r1, r5, r4 + sub r6, r6, #1 + sub r2, r0, #1 + ldr r0, _02242128 ; =0x000021A0 + strb r2, [r1, r0] + add r0, r4, #0 + bl sub_020787CC + mov r1, #0x85 + lsl r1, r1, #6 + ldr r1, [r5, r1] + lsl r0, r0, #0x18 + tst r0, r1 + bne _022420A0 + add r0, r4, #0 + bl sub_020787CC + mov r1, #0x85 + lsl r1, r1, #6 + ldr r1, [r5, r1] + lsl r0, r0, #0x18 + orr r1, r0 + mov r0, #0x85 + lsl r0, r0, #6 + str r1, [r5, r0] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_022666E0 +_022420A0: + ldr r0, [sp, #8] + ldr r1, [sp, #4] + add r0, r0, #4 + str r0, [sp, #8] + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + add r4, r4, #1 + str r0, [sp, #4] + cmp r4, r7 + blt _02242044 +_022420B6: + cmp r6, #0 + bne _02242112 + mov r4, #0 + cmp r7, #0 + ble _022420FE + str r5, [sp, #0xc] + add r6, r5, #0 +_022420C4: + mov r0, #0x4f + ldr r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022420EC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _022420EC + mov r2, #0x23 + lsl r2, r2, #8 + ldrb r2, [r6, r2] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223F500 +_022420EC: + ldr r0, [sp, #0xc] + add r4, r4, #1 + add r0, r0, #4 + str r0, [sp, #0xc] + mov r0, #1 + lsl r0, r0, #8 + add r6, r6, r0 + cmp r4, r7 + blt _022420C4 +_022420FE: + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r5, r1] + ldr r0, _0224212C ; =0xF0FFFFFF + and r0, r2 + str r0, [r5, r1] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 +_02242112: + ldr r1, _02242130 ; =0x00003154 + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r5, r1] + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02242128: .word 0x000021A0 +_0224212C: .word 0xF0FFFFFF +_02242130: .word 0x00003154 + thumb_func_end ov16_0224200C + + thumb_func_start ov16_02242134 +ov16_02242134: ; 0x02242134 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + cmp r0, #1 + beq _02242156 + cmp r0, #6 + beq _0224215A + cmp r0, #0x12 + beq _0224215E + b _02242160 +_02242156: + ldr r4, [r5, #0x64] + b _02242160 +_0224215A: + ldr r4, [r5, #0x78] + b _02242160 +_0224215E: + ldr r4, [r5, #0x6c] +_02242160: + mov r0, #0x4f + lsl r0, r0, #2 + add r3, r5, r0 + lsl r2, r4, #2 + ldr r1, [r3, r2] + mov r0, #1 + bic r1, r0 + add r0, r4, #0 + str r1, [r3, r2] + bl sub_020787CC + ldr r3, _022421C4 ; =0x00003108 + mov r2, #0 + mvn r2, r2 + eor r0, r2 + ldrb r1, [r5, r3] + add r2, r4, #0 + and r0, r1 + ldr r1, _022421C8 ; =0x000021A0 + strb r0, [r5, r3] + add r0, r5, r1 + sub r1, r1, #4 + add r6, r5, r1 + ldrb r1, [r0, r4] + strb r1, [r6, r4] + mov r1, #6 + strb r1, [r0, r4] + ldrb r3, [r6, r4] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0225177C + ldrb r3, [r6, r4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0225A200 + ldr r0, _022421CC ; =0x00002E4C + add r2, r4, #0 + ldr r1, [r5, r0] + ldr r0, _022421D0 ; =0x00003122 + strh r1, [r5, r0] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0225433C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022421C4: .word 0x00003108 +_022421C8: .word 0x000021A0 +_022421CC: .word 0x00002E4C +_022421D0: .word 0x00003122 + thumb_func_end ov16_02242134 + + thumb_func_start ov16_022421D4 +ov16_022421D4: ; 0x022421D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + bl ov16_0223DF1C + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + mov r0, #0 + cmp r4, #0 + ble _02242216 + mov r2, #0x4f + add r1, r5, #0 + lsl r2, r2, #2 + mov r3, #1 +_022421FC: + ldr r6, [r1, r2] + tst r6, r3 + beq _0224220E + str r0, [r5, #0x78] + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _02242216 +_0224220E: + add r0, r0, #1 + add r1, r1, #4 + cmp r0, r4 + blt _022421FC +_02242216: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_022421D4 + + thumb_func_start ov16_0224221C +ov16_0224221C: ; 0x0224221C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + mov r0, #5 + mov r1, #0x58 + bl sub_02018144 + mov r1, #0x5e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r2, #0 + str r5, [r0, #0] + ldr r0, [r4, r1] + str r4, [r0, #4] + ldr r0, [r4, r1] + str r2, [r0, #0x28] + ldr r0, [r4, r1] + str r6, [r0, #0x24] + add r0, r1, #0 + sub r0, #0x50 + ldr r3, [r4, r0] + ldr r0, [r4, r1] + str r3, [r0, #0x2c] + ldr r0, _02242268 ; =ov16_02249B80 + ldr r1, [r4, r1] + bl sub_0200D9E8 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02242268: .word ov16_02249B80 + thumb_func_end ov16_0224221C + + thumb_func_start ov16_0224226C +ov16_0224226C: ; 0x0224226C + push {r4, lr} + mov r0, #0x5e + add r4, r1, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02242282 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 +_02242282: + ldr r1, _02242294 ; =0x00003154 + mov r0, #1 + ldr r2, [r4, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r4, r1] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02242294: .word 0x00003154 + thumb_func_end ov16_0224226C + + thumb_func_start ov16_02242298 +ov16_02242298: ; 0x02242298 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + ldr r0, _02242304 ; =0x0000217D + ldrb r0, [r5, r0] + cmp r0, #0 + bne _02242300 + cmp r4, #0 + bne _022422F0 + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x5c + bne _022422D2 + mov r4, #5 + b _022422F0 +_022422D2: + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #3 + and r0, r1 + cmp r0, #2 + bge _022422E4 + add r4, r0, #2 + b _022422F0 +_022422E4: + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #3 + and r0, r1 + add r4, r0, #2 +_022422F0: + lsl r0, r4, #0x18 + ldr r1, _02242308 ; =0x0000217C + lsr r2, r0, #0x18 + strb r2, [r5, r1] + add r0, r1, #1 + strb r2, [r5, r0] + add r1, #0xc + str r7, [r5, r1] +_02242300: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242304: .word 0x0000217D +_02242308: .word 0x0000217C + thumb_func_end ov16_02242298 + + thumb_func_start ov16_0224230C +ov16_0224230C: ; 0x0224230C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r4, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r2, [sp] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_02248B10 + add r4, r0, #0 + cmp r6, #0x14 + bhi _022423F6 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224234E: ; jump table + .short _022423F6 - _0224234E - 2 ; case 0 + .short _022423F6 - _0224234E - 2 ; case 1 + .short _022423F6 - _0224234E - 2 ; case 2 + .short _022423F6 - _0224234E - 2 ; case 3 + .short _022423F6 - _0224234E - 2 ; case 4 + .short _022423F6 - _0224234E - 2 ; case 5 + .short _022423F6 - _0224234E - 2 ; case 6 + .short _02242378 - _0224234E - 2 ; case 7 + .short _0224237C - _0224234E - 2 ; case 8 + .short _02242384 - _0224234E - 2 ; case 9 + .short _0224238C - _0224234E - 2 ; case 10 + .short _02242394 - _0224234E - 2 ; case 11 + .short _022423A2 - _0224234E - 2 ; case 12 + .short _022423AC - _0224234E - 2 ; case 13 + .short _022423B8 - _0224234E - 2 ; case 14 + .short _022423C0 - _0224234E - 2 ; case 15 + .short _022423C8 - _0224234E - 2 ; case 16 + .short _022423D2 - _0224234E - 2 ; case 17 + .short _022423D8 - _0224234E - 2 ; case 18 + .short _022423E6 - _0224234E - 2 ; case 19 + .short _022423EE - _0224234E - 2 ; case 20 +_02242378: + str r5, [r4, #0] + b _022423FA +_0224237C: + ldr r0, [r4, #0] + add r0, r0, r5 + str r0, [r4, #0] + b _022423FA +_02242384: + ldr r0, [r4, #0] + sub r0, r0, r5 + str r0, [r4, #0] + b _022423FA +_0224238C: + ldr r0, [r4, #0] + orr r0, r5 + str r0, [r4, #0] + b _022423FA +_02242394: + mov r0, #0 + mvn r0, r0 + ldr r1, [r4, #0] + eor r0, r5 + and r0, r1 + str r0, [r4, #0] + b _022423FA +_022423A2: + ldr r0, [r4, #0] + add r1, r0, #0 + mul r1, r5 + str r1, [r4, #0] + b _022423FA +_022423AC: + ldr r0, [r4, #0] + add r1, r5, #0 + bl sub_020E1F6C + str r0, [r4, #0] + b _022423FA +_022423B8: + ldr r0, [r4, #0] + lsl r0, r5 + str r0, [r4, #0] + b _022423FA +_022423C0: + ldr r0, [r4, #0] + lsr r0, r5 + str r0, [r4, #0] + b _022423FA +_022423C8: + add r0, r5, #0 + bl sub_020787CC + str r0, [r4, #0] + b _022423FA +_022423D2: + bl sub_02022974 + b _022423FA +_022423D8: + ldr r0, [r4, #0] + sub r0, r0, r5 + str r0, [r4, #0] + bpl _022423FA + mov r0, #0 + str r0, [r4, #0] + b _022423FA +_022423E6: + ldr r0, [r4, #0] + eor r0, r5 + str r0, [r4, #0] + b _022423FA +_022423EE: + ldr r0, [r4, #0] + and r0, r5 + str r0, [r4, #0] + b _022423FA +_022423F6: + bl sub_02022974 +_022423FA: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224230C + + thumb_func_start ov16_02242400 +ov16_02242400: ; 0x02242400 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + mov r0, #0xb5 + add r5, r1, #0 + lsl r0, r0, #6 + add r2, r5, r0 + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r6, r2, r0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #0x14] + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #0x10] + add r0, r5, #0 + bl ov16_02248AD0 + ldr r1, _02242764 ; =0x0000213C + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #8] + ldr r2, [r5, r1] + ldr r0, _02242768 ; =0xFFFDFFFF + and r2, r0 + str r2, [r5, r1] + add r1, r5, #0 + add r1, #0x8c + ldr r4, [r1, #0] + cmp r4, #0x2e + blt _02242460 + asr r7, r0, #0x11 + mov r0, #0x4e + mov r1, #0xd + lsl r0, r0, #2 + sub r4, #0x2e + str r1, [r5, r0] + b _02242490 +_02242460: + cmp r4, #0x27 + blt _02242472 + mov r0, #0x4e + mov r1, #0xc + lsl r0, r0, #2 + sub r4, #0x27 + mov r7, #2 + str r1, [r5, r0] + b _02242490 +_02242472: + cmp r4, #0x16 + blt _02242484 + asr r7, r0, #0x12 + mov r0, #0x4e + mov r1, #0xd + lsl r0, r0, #2 + sub r4, #0x16 + str r1, [r5, r0] + b _02242490 +_02242484: + mov r0, #0x4e + mov r1, #0xc + lsl r0, r0, #2 + sub r4, #0xf + mov r7, #1 + str r1, [r5, r0] +_02242490: + cmp r7, #0 + bgt _02242496 + b _022425CE +_02242496: + add r1, r4, #1 + add r6, #0x18 + add r0, r6, r1 + str r0, [sp, #4] + ldrsb r0, [r6, r1] + cmp r0, #0xc + bne _022424FA + ldr r1, _02242764 ; =0x0000213C + mov r0, #2 + ldr r2, [r5, r1] + lsl r0, r0, #0x10 + orr r0, r2 + str r0, [r5, r1] + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + sub r0, r0, #2 + cmp r0, #1 + bhi _022424C6 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02248AF0 + b _022429F4 +_022424C6: + add r0, r5, #0 + mov r1, #0x8e + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0xc + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r1, r4, #1 + add r0, #0xfc + str r1, [r0, #0] + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov16_02248AF0 + b _022429F4 +_022424FA: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #3 + bne _02242546 + add r0, r5, #0 + ldr r1, _0224276C ; =0x0000026E + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x27 + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02242770 ; =0x00002D67 + add r2, r5, r2 + ldrb r2, [r2, r0] + add r0, r5, #0 + add r0, #0xfc + str r2, [r0, #0] + add r0, r4, #1 + add r1, #0x40 + str r0, [r5, r1] + b _022425B2 +_02242546: + cmp r0, #5 + bne _02242582 + mov r1, #0xbd + add r0, r5, #0 + lsl r1, r1, #2 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x2d + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + mov r1, #0x4a + lsl r1, r1, #2 + ldr r2, [r5, r1] + add r0, r5, #0 + add r0, #0xfc + str r2, [r0, #0] + add r0, r4, #1 + sub r1, #0x28 + str r0, [r5, r1] + b _022425B2 +_02242582: + cmp r7, #1 + bne _0224258A + ldr r1, _02242774 ; =0x000002EE + b _0224258C +_0224258A: + ldr r1, _02242778 ; =0x000002F1 +_0224258C: + add r0, r5, #0 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0xc + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r4, #1 + add r5, #0xfc + str r0, [r5, #0] +_022425B2: + ldr r0, [sp, #4] + mov r1, #0 + ldrsb r0, [r0, r1] + add r2, r0, r7 + ldr r0, [sp, #4] + strb r2, [r0] + ldrsb r0, [r0, r1] + cmp r0, #0xc + bgt _022425C6 + b _022429F4 +_022425C6: + ldr r0, [sp, #4] + mov r1, #0xc + strb r1, [r0] + b _022429F4 +_022425CE: + add r0, r5, #0 + add r0, #0x90 + ldr r1, [r0, #0] + mov r0, #2 + lsl r0, r0, #0x1a + tst r1, r0 + beq _022425DE + b _02242958 +_022425DE: + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + ldr r2, [r5, #0x64] + cmp r2, r1 + bne _022425EC + b _022428A0 +_022425EC: + ldr r0, [sp] + bl ov16_0223E208 + lsl r0, r0, #3 + mov r1, #0x71 + add r0, r5, r0 + lsl r1, r1, #2 + ldr r0, [r0, r1] + lsl r0, r0, #0x11 + lsr r0, r0, #0x1d + beq _0224262A + add r0, r5, #0 + sub r1, #0xb3 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #2 + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + mov r0, #1 + str r0, [sp, #8] + b _02242908 +_0224262A: + add r2, r5, #0 + add r2, #0x94 + ldr r1, [r5, #0x64] + ldr r2, [r2, #0] + add r0, r5, #0 + mov r3, #0x1d + bl ov16_02255AB4 + cmp r0, #1 + beq _02242652 + add r2, r5, #0 + add r2, #0x94 + ldr r1, [r5, #0x64] + ldr r2, [r2, #0] + add r0, r5, #0 + mov r3, #0x49 + bl ov16_02255AB4 + cmp r0, #1 + bne _022426F4 +_02242652: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #3 + bne _022426B6 + add r0, r5, #0 + ldr r1, _0224277C ; =0x000002D7 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x35 + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02242770 ; =0x00002D67 + ldrb r1, [r1, r0] + add r0, r5, #0 + add r0, #0xfc + str r1, [r0, #0] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255560 + mov r1, #1 + lsl r1, r1, #8 + str r0, [r5, r1] + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02242770 ; =0x00002D67 + add r2, r5, r2 + ldrb r0, [r2, r0] + add r1, #0x44 + str r0, [r5, r1] + b _022426EE +_022426B6: + add r0, r5, #0 + ldr r1, _02242780 ; =0x0000029D + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0xb + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02242770 ; =0x00002D67 + ldrb r1, [r1, r0] + add r0, r5, #0 + add r0, #0xfc + str r1, [r0, #0] +_022426EE: + mov r0, #1 + str r0, [sp, #8] + b _02242908 +_022426F4: + add r2, r5, #0 + add r2, #0x94 + ldr r1, [r5, #0x64] + ldr r2, [r2, #0] + add r0, r5, #0 + mov r3, #0x33 + bl ov16_02255AB4 + cmp r0, #1 + bne _0224270E + add r0, r4, #1 + cmp r0, #6 + beq _02242726 +_0224270E: + add r2, r5, #0 + add r2, #0x94 + ldr r1, [r5, #0x64] + ldr r2, [r2, #0] + add r0, r5, #0 + mov r3, #0x34 + bl ov16_02255AB4 + cmp r0, #1 + bne _022427F4 + cmp r4, #0 + bne _022427F4 +_02242726: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #3 + bne _022427AC + add r0, r5, #0 + ldr r1, _0224277C ; =0x000002D7 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x35 + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02242770 ; =0x00002D67 + b _02242784 + nop +_02242764: .word 0x0000213C +_02242768: .word 0xFFFDFFFF +_0224276C: .word 0x0000026E +_02242770: .word 0x00002D67 +_02242774: .word 0x000002EE +_02242778: .word 0x000002F1 +_0224277C: .word 0x000002D7 +_02242780: .word 0x0000029D +_02242784: + ldrb r1, [r1, r0] + add r0, r5, #0 + add r0, #0xfc + str r1, [r0, #0] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255560 + mov r1, #1 + lsl r1, r1, #8 + str r0, [r5, r1] + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _022429FC ; =0x00002D67 + add r2, r5, r2 + ldrb r0, [r2, r0] + add r1, #0x44 + b _022427EC +_022427AC: + mov r1, #0xb + add r0, r5, #0 + lsl r1, r1, #6 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x27 + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _022429FC ; =0x00002D67 + add r2, r5, r2 + ldrb r2, [r2, r0] + add r0, r5, #0 + add r0, #0xfc + str r2, [r0, #0] + add r0, r4, #1 + add r1, #0x40 +_022427EC: + str r0, [r5, r1] + mov r0, #1 + str r0, [sp, #8] + b _02242908 +_022427F4: + add r0, r4, #1 + add r1, r6, r0 + mov r0, #0x18 + ldrsb r0, [r1, r0] + cmp r0, #0 + bne _0224285E + ldr r1, _02242A00 ; =0x0000213C + mov r0, #2 + ldr r2, [r5, r1] + lsl r0, r0, #0x10 + orr r0, r2 + str r0, [r5, r1] + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + sub r0, r0, #2 + cmp r0, #1 + bhi _02242826 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242826: + add r0, r5, #0 + mov r1, #0x91 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0xc + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r1, r4, #1 + add r0, #0xfc + str r1, [r0, #0] + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224285E: + add r2, r5, #0 + add r2, #0x94 + ldr r1, [r5, #0x64] + ldr r2, [r2, #0] + add r0, r5, #0 + mov r3, #0x13 + bl ov16_02255AB4 + cmp r0, #1 + bne _02242882 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #2 + bne _02242882 + mov r0, #1 + str r0, [sp, #8] + b _02242908 +_02242882: + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02242A04 ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x18 + tst r0, r1 + beq _02242908 + mov r0, #2 + str r0, [sp, #8] + b _02242908 +_022428A0: + add r1, r4, #1 + add r2, r6, r1 + mov r1, #0x18 + ldrsb r1, [r2, r1] + cmp r1, #0 + bne _02242908 + ldr r1, _02242A00 ; =0x0000213C + lsr r0, r0, #0xa + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + sub r0, r0, #2 + cmp r0, #1 + bhi _022428D0 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022428D0: + add r0, r5, #0 + mov r1, #0x91 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0xc + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + add r1, r4, #1 + add r0, #0xfc + str r1, [r0, #0] + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242908: + ldr r0, [sp, #8] + cmp r0, #2 + bne _02242926 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #1 + bne _02242926 + ldr r1, [sp, #0xc] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242926: + ldr r0, [sp, #8] + cmp r0, #0 + beq _02242944 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #2 + bne _02242944 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242944: + ldr r0, [sp, #8] + cmp r0, #0 + beq _02242958 + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242958: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #3 + bne _022429AC + add r0, r5, #0 + ldr r1, _02242A08 ; =0x00000296 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x36 + add r0, #0xf5 + strb r1, [r0] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _022429FC ; =0x00002D67 + ldrb r1, [r1, r0] + add r0, r5, #0 + add r0, #0xfc + str r1, [r0, #0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + mov r1, #1 + lsl r1, r1, #8 + str r0, [r5, r1] + add r2, r4, #1 + add r0, r1, #4 + str r2, [r5, r0] + b _022429E0 +_022429AC: + mov r0, #0 + mvn r0, r0 + cmp r7, r0 + bne _022429B8 + ldr r1, _02242A0C ; =0x000002FA + b _022429BA +_022429B8: + ldr r1, _02242A10 ; =0x000002FD +_022429BA: + add r0, r5, #0 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0xc + add r0, #0xf5 + strb r1, [r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r4, #1 + add r5, #0xfc + str r0, [r5, #0] +_022429E0: + add r6, #0x18 + add r1, r4, #1 + ldrsb r0, [r6, r1] + add r0, r0, r7 + strb r0, [r6, r1] + ldrsb r0, [r6, r1] + cmp r0, #0 + bge _022429F4 + mov r0, #0 + strb r0, [r6, r1] +_022429F4: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_022429FC: .word 0x00002D67 +_02242A00: .word 0x0000213C +_02242A04: .word 0x00002DB0 +_02242A08: .word 0x00000296 +_02242A0C: .word 0x000002FA +_02242A10: .word 0x000002FD + thumb_func_end ov16_02242400 + + thumb_func_start ov16_02242A14 +ov16_02242A14: ; 0x02242A14 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + ldr r0, [sp] + ldr r2, [sp, #8] + add r1, r5, #0 + bl ov16_0224A984 + str r0, [sp, #4] + ldr r1, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02252060 + str r0, [sp, #0xc] + cmp r7, #0x14 + bhi _02242B00 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242A6E: ; jump table + .short _02242B00 - _02242A6E - 2 ; case 0 + .short _02242B00 - _02242A6E - 2 ; case 1 + .short _02242B00 - _02242A6E - 2 ; case 2 + .short _02242B00 - _02242A6E - 2 ; case 3 + .short _02242B00 - _02242A6E - 2 ; case 4 + .short _02242B00 - _02242A6E - 2 ; case 5 + .short _02242B00 - _02242A6E - 2 ; case 6 + .short _02242A98 - _02242A6E - 2 ; case 7 + .short _02242A9C - _02242A6E - 2 ; case 8 + .short _02242AA2 - _02242A6E - 2 ; case 9 + .short _02242AA8 - _02242A6E - 2 ; case 10 + .short _02242AAE - _02242A6E - 2 ; case 11 + .short _02242ABA - _02242A6E - 2 ; case 12 + .short _02242AC2 - _02242A6E - 2 ; case 13 + .short _02242ACC - _02242A6E - 2 ; case 14 + .short _02242AD2 - _02242A6E - 2 ; case 15 + .short _02242AD8 - _02242A6E - 2 ; case 16 + .short _02242AE2 - _02242A6E - 2 ; case 17 + .short _02242AE8 - _02242A6E - 2 ; case 18 + .short _02242AF4 - _02242A6E - 2 ; case 19 + .short _02242AFA - _02242A6E - 2 ; case 20 +_02242A98: + str r4, [sp, #0xc] + b _02242B04 +_02242A9C: + add r0, r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242AA2: + sub r0, r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242AA8: + orr r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242AAE: + mov r1, #0 + mvn r1, r1 + eor r1, r4 + and r0, r1 + str r0, [sp, #0xc] + b _02242B04 +_02242ABA: + add r1, r0, #0 + mul r1, r4 + str r1, [sp, #0xc] + b _02242B04 +_02242AC2: + add r1, r4, #0 + bl sub_020E1F6C + str r0, [sp, #0xc] + b _02242B04 +_02242ACC: + lsl r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242AD2: + lsr r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242AD8: + add r0, r4, #0 + bl sub_020787CC + str r0, [sp, #0xc] + b _02242B04 +_02242AE2: + bl sub_02022974 + b _02242B04 +_02242AE8: + sub r0, r0, r4 + str r0, [sp, #0xc] + bpl _02242B04 + mov r0, #0 + str r0, [sp, #0xc] + b _02242B04 +_02242AF4: + eor r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242AFA: + and r0, r4 + str r0, [sp, #0xc] + b _02242B04 +_02242B00: + bl sub_02022974 +_02242B04: + cmp r6, #0x1a + bne _02242B1A + ldr r1, [sp, #4] + ldr r2, [sp, #0xc] + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl ov16_0224B928 +_02242B1A: + ldr r1, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + add r3, sp, #0xc + bl ov16_022523E8 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r5, #0 + bl ov16_02253EC0 + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02242A14 + + thumb_func_start ov16_02242B38 +ov16_02242B38: ; 0x02242B38 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_0224A984 + ldr r1, _02242B70 ; =0x0000218C + add r2, r5, r1 + lsl r1, r0, #2 + ldr r0, [r2, r1] + orr r0, r4 + str r0, [r2, r1] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242B70: .word 0x0000218C + thumb_func_end ov16_02242B38 + + thumb_func_start ov16_02242B74 +ov16_02242B74: ; 0x02242B74 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + add r2, r7, #0 + bl ov16_02265EE8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02242B74 + + thumb_func_start ov16_02242BAC +ov16_02242BAC: ; 0x02242BAC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + cmp r4, #0 + bne _02242C22 + ldr r0, [sp] + bl ov16_0223DF1C + mov r4, #0 + str r0, [sp, #4] + cmp r0, #0 + ble _02242C64 +_02242BEE: + cmp r7, #0 + bne _02242C0C + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _02242C18 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] + b _02242C64 +_02242C0C: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r6, r0 + beq _02242C64 +_02242C18: + ldr r0, [sp, #4] + add r4, r4, #1 + cmp r4, r0 + blt _02242BEE + b _02242C64 +_02242C22: + ldr r0, [sp] + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r4, r0, #0 + cmp r7, #0 + bne _02242C4C + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _02242C64 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] + b _02242C64 +_02242C4C: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r6, r0 + beq _02242C64 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] +_02242C64: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02242BAC + + thumb_func_start ov16_02242C6C +ov16_02242C6C: ; 0x02242C6C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r7, #0 + bl ov16_0223F4BC + add r1, r4, #1 + bl sub_020E1F6C + mov r0, #0x4d + add r1, r6, r1 + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02242C6C + + thumb_func_start ov16_02242CA4 +ov16_02242CA4: ; 0x02242CA4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_02248B10 + add r4, r0, #0 + ldr r2, [sp] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_02248B10 + add r1, r0, #0 + cmp r6, #0x14 + bhi _02242DB2 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02242CF2: ; jump table + .short _02242DB2 - _02242CF2 - 2 ; case 0 + .short _02242DB2 - _02242CF2 - 2 ; case 1 + .short _02242DB2 - _02242CF2 - 2 ; case 2 + .short _02242DB2 - _02242CF2 - 2 ; case 3 + .short _02242DB2 - _02242CF2 - 2 ; case 4 + .short _02242DB2 - _02242CF2 - 2 ; case 5 + .short _02242DB2 - _02242CF2 - 2 ; case 6 + .short _02242D1C - _02242CF2 - 2 ; case 7 + .short _02242D22 - _02242CF2 - 2 ; case 8 + .short _02242D2C - _02242CF2 - 2 ; case 9 + .short _02242D36 - _02242CF2 - 2 ; case 10 + .short _02242D40 - _02242CF2 - 2 ; case 11 + .short _02242D50 - _02242CF2 - 2 ; case 12 + .short _02242D5A - _02242CF2 - 2 ; case 13 + .short _02242D66 - _02242CF2 - 2 ; case 14 + .short _02242D72 - _02242CF2 - 2 ; case 15 + .short _02242D7E - _02242CF2 - 2 ; case 16 + .short _02242D88 - _02242CF2 - 2 ; case 17 + .short _02242D8E - _02242CF2 - 2 ; case 18 + .short _02242D9E - _02242CF2 - 2 ; case 19 + .short _02242DA8 - _02242CF2 - 2 ; case 20 +_02242D1C: + ldr r0, [r1, #0] + str r0, [r4, #0] + b _02242DB6 +_02242D22: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + add r0, r2, r0 + str r0, [r4, #0] + b _02242DB6 +_02242D2C: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + sub r0, r2, r0 + str r0, [r4, #0] + b _02242DB6 +_02242D36: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + orr r0, r2 + str r0, [r4, #0] + b _02242DB6 +_02242D40: + mov r0, #0 + ldr r1, [r1, #0] + mvn r0, r0 + ldr r2, [r4, #0] + eor r0, r1 + and r0, r2 + str r0, [r4, #0] + b _02242DB6 +_02242D50: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + mul r0, r2 + str r0, [r4, #0] + b _02242DB6 +_02242D5A: + ldr r0, [r4, #0] + ldr r1, [r1, #0] + bl sub_020E1F6C + str r0, [r4, #0] + b _02242DB6 +_02242D66: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + add r1, r2, #0 + lsl r1, r0 + str r1, [r4, #0] + b _02242DB6 +_02242D72: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + add r1, r2, #0 + lsr r1, r0 + str r1, [r4, #0] + b _02242DB6 +_02242D7E: + ldr r0, [r1, #0] + bl sub_020787CC + str r0, [r4, #0] + b _02242DB6 +_02242D88: + ldr r0, [r4, #0] + str r0, [r1, #0] + b _02242DB6 +_02242D8E: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + sub r0, r2, r0 + str r0, [r4, #0] + bpl _02242DB6 + mov r0, #0 + str r0, [r4, #0] + b _02242DB6 +_02242D9E: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + eor r0, r2 + str r0, [r4, #0] + b _02242DB6 +_02242DA8: + ldr r2, [r4, #0] + ldr r0, [r1, #0] + and r0, r2 + str r0, [r4, #0] + b _02242DB6 +_02242DB2: + bl sub_02022974 +_02242DB6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02242CA4 + + thumb_func_start ov16_02242DBC +ov16_02242DBC: ; 0x02242DBC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r5, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + ldr r2, [sp, #4] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0224A984 + str r0, [sp] + ldr r1, [sp] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02252060 + str r0, [sp, #0xc] + ldr r2, [sp, #8] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_02248B10 + add r1, r0, #0 + cmp r5, #0x14 + bhi _02242EE2 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02242E22: ; jump table + .short _02242EE2 - _02242E22 - 2 ; case 0 + .short _02242EE2 - _02242E22 - 2 ; case 1 + .short _02242EE2 - _02242E22 - 2 ; case 2 + .short _02242EE2 - _02242E22 - 2 ; case 3 + .short _02242EE2 - _02242E22 - 2 ; case 4 + .short _02242EE2 - _02242E22 - 2 ; case 5 + .short _02242EE2 - _02242E22 - 2 ; case 6 + .short _02242E4C - _02242E22 - 2 ; case 7 + .short _02242E52 - _02242E22 - 2 ; case 8 + .short _02242E5C - _02242E22 - 2 ; case 9 + .short _02242E66 - _02242E22 - 2 ; case 10 + .short _02242E70 - _02242E22 - 2 ; case 11 + .short _02242E80 - _02242E22 - 2 ; case 12 + .short _02242E8A - _02242E22 - 2 ; case 13 + .short _02242E96 - _02242E22 - 2 ; case 14 + .short _02242EA2 - _02242E22 - 2 ; case 15 + .short _02242EAE - _02242E22 - 2 ; case 16 + .short _02242EB8 - _02242E22 - 2 ; case 17 + .short _02242EBE - _02242E22 - 2 ; case 18 + .short _02242ECE - _02242E22 - 2 ; case 19 + .short _02242ED8 - _02242E22 - 2 ; case 20 +_02242E4C: + ldr r0, [r1, #0] + str r0, [sp, #0xc] + b _02242EE6 +_02242E52: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + add r0, r2, r0 + str r0, [sp, #0xc] + b _02242EE6 +_02242E5C: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + sub r0, r2, r0 + str r0, [sp, #0xc] + b _02242EE6 +_02242E66: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + orr r0, r2 + str r0, [sp, #0xc] + b _02242EE6 +_02242E70: + ldr r2, [r1, #0] + mov r1, #0 + mvn r1, r1 + ldr r0, [sp, #0xc] + eor r1, r2 + and r0, r1 + str r0, [sp, #0xc] + b _02242EE6 +_02242E80: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + mul r0, r2 + str r0, [sp, #0xc] + b _02242EE6 +_02242E8A: + ldr r0, [sp, #0xc] + ldr r1, [r1, #0] + bl sub_020E1F6C + str r0, [sp, #0xc] + b _02242EE6 +_02242E96: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + add r1, r2, #0 + lsl r1, r0 + str r1, [sp, #0xc] + b _02242EE6 +_02242EA2: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + add r1, r2, #0 + lsr r1, r0 + str r1, [sp, #0xc] + b _02242EE6 +_02242EAE: + ldr r0, [r1, #0] + bl sub_020787CC + str r0, [sp, #0xc] + b _02242EE6 +_02242EB8: + ldr r0, [sp, #0xc] + str r0, [r1, #0] + b _02242EE6 +_02242EBE: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + sub r0, r2, r0 + str r0, [sp, #0xc] + bpl _02242EE6 + mov r0, #0 + str r0, [sp, #0xc] + b _02242EE6 +_02242ECE: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + eor r0, r2 + str r0, [sp, #0xc] + b _02242EE6 +_02242ED8: + ldr r2, [sp, #0xc] + ldr r0, [r1, #0] + and r0, r2 + str r0, [sp, #0xc] + b _02242EE6 +_02242EE2: + bl sub_02022974 +_02242EE6: + cmp r5, #0x11 + beq _02242F16 + cmp r6, #0x1a + bne _02242F00 + ldr r1, [sp] + ldr r2, [sp, #0xc] + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl ov16_0224B928 +_02242F00: + ldr r1, [sp] + add r0, r4, #0 + add r2, r6, #0 + add r3, sp, #0xc + bl ov16_022523E8 + ldr r2, [sp] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_02253EC0 +_02242F16: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02242DBC + + thumb_func_start ov16_02242F1C +ov16_02242F1C: ; 0x02242F1C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_02248AF0 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02242F1C + + thumb_func_start ov16_02242F3C +ov16_02242F3C: ; 0x02242F3C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248B08 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov16_02242F3C + + thumb_func_start ov16_02242F5C +ov16_02242F5C: ; 0x02242F5C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248B10 + add r2, r0, #0 + ldr r2, [r2, #0] + add r0, r4, #0 + mov r1, #1 + bl ov16_02248B08 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02242F5C + + thumb_func_start ov16_02242F8C +ov16_02242F8C: ; 0x02242F8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + mov r4, #0 + bl ov16_0223DF0C + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r5, #0x64] + lsl r0, r1, #1 + add r2, r5, r0 + ldr r0, _0224308C ; =0x00003084 + ldrh r2, [r2, r0] + cmp r2, #0 + beq _02242FB6 + add r4, r2, #0 + b _02243002 +_02242FB6: + mov r2, #2 + tst r2, r7 + beq _02243002 + lsl r1, r1, #3 + add r4, r5, r1 + add r1, r0, #0 + add r1, #0xe + ldrh r3, [r4, r1] + add r1, r0, #0 + add r1, #0xc + ldrh r2, [r4, r1] + add r1, r0, #0 + add r1, #8 + add r0, #0xa + ldrh r1, [r4, r1] + ldrh r0, [r4, r0] + add r0, r1, r0 + add r0, r2, r0 + add r4, r3, r0 + beq _02243002 + ldr r7, _02243090 ; =0x0000308C +_02242FE0: + add r0, r6, #0 + bl ov16_0223F4BC + ldr r1, [r5, #0x64] + lsl r3, r0, #0x1e + lsl r2, r1, #3 + lsr r1, r0, #0x1f + sub r3, r3, r1 + mov r0, #0x1e + ror r3, r0 + add r0, r1, r3 + lsl r1, r0, #1 + add r0, r5, r2 + add r0, r1, r0 + ldrh r4, [r0, r7] + cmp r4, #0 + beq _02242FE0 +_02243002: + cmp r4, #0 + beq _0224306C + lsl r1, r4, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + bl ov16_0225B084 + cmp r0, #1 + bne _0224306C + ldr r1, _02243094 ; =0x0000213C + lsl r3, r4, #0x10 + ldr r2, [r5, r1] + mov r0, #1 + bic r2, r0 + str r2, [r5, r1] + ldr r2, [r5, r1] + ldr r0, _02243098 ; =0xFFFFBFFF + lsr r3, r3, #0x10 + and r0, r2 + str r0, [r5, r1] + ldr r0, _0224309C ; =0x00003044 + add r1, r5, #0 + str r4, [r5, r0] + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r2, [r5, #0x64] + add r0, r6, #0 + bl ov16_02253954 + str r0, [r5, #0x6c] + cmp r0, #0xff + bne _02243056 + mov r2, #0x26 + str r2, [r5, #0xc] + add r0, r5, #0 + mov r1, #1 + add r2, #0xf3 + bl ov16_02248B00 + b _02243086 +_02243056: + ldr r1, [r5, #0x64] + lsl r1, r1, #4 + add r2, r5, r1 + ldr r1, _022430A0 ; =0x000021AC + str r0, [r2, r1] + add r0, r5, #0 + mov r1, #0 + add r2, r4, #0 + bl ov16_02248B00 + b _02243086 +_0224306C: + ldr r2, [r5, #0x64] + mov r0, #0xb5 + lsl r0, r0, #2 + mov r1, #0x1c + add r3, r2, #0 + mul r3, r1 + add r0, r5, r0 + ldr r2, [r0, r3] + mov r1, #1 + bic r2, r1 + mov r1, #1 + orr r1, r2 + str r1, [r0, r3] +_02243086: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224308C: .word 0x00003084 +_02243090: .word 0x0000308C +_02243094: .word 0x0000213C +_02243098: .word 0xFFFFBFFF +_0224309C: .word 0x00003044 +_022430A0: .word 0x000021AC + thumb_func_end ov16_02242F8C + + thumb_func_start ov16_022430A4 +ov16_022430A4: ; 0x022430A4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_0223DF1C + mov r2, #0 + cmp r0, #0 + ble _022430E4 + ldr r6, _022430E8 ; =0x00002D58 + mov r1, #6 + add r5, r6, #0 + add r5, #0x58 +_022430C6: + mov r7, #0 +_022430C8: + add r3, r4, r7 + add r7, r7, #1 + strb r1, [r3, r6] + cmp r7, #8 + blt _022430C8 + ldr r3, _022430EC ; =0x00002DB0 + add r2, r2, #1 + ldr r7, [r4, r3] + ldr r3, _022430F0 ; =0xFFEFFFFF + and r3, r7 + str r3, [r4, r5] + add r4, #0xc0 + cmp r2, r0 + blt _022430C6 +_022430E4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022430E8: .word 0x00002D58 +_022430EC: .word 0x00002DB0 +_022430F0: .word 0xFFEFFFFF + thumb_func_end ov16_022430A4 + + thumb_func_start ov16_022430F4 +ov16_022430F4: ; 0x022430F4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02253EF0 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_022430F4 + + thumb_func_start ov16_02243120 +ov16_02243120: ; 0x02243120 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02253F20 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02243120 + + thumb_func_start ov16_0224314C +ov16_0224314C: ; 0x0224314C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + add r2, r7, #0 + bl ov16_02265FB8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224314C + + thumb_func_start ov16_02243184 +ov16_02243184: ; 0x02243184 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + add r2, r7, #0 + bl ov16_02265FD8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02243184 + + thumb_func_start ov16_022431BC +ov16_022431BC: ; 0x022431BC + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r7, r0, #0 + add r5, r1, #0 + str r2, [sp] + mov r0, #5 + mov r1, #0x6c + bl sub_02018144 + add r4, r0, #0 + ldr r0, [sp] + add r6, r7, #0 + lsl r0, r0, #1 + add r6, #0xa0 + str r0, [sp, #4] + ldrh r0, [r6, r0] + add r1, sp, #8 + bl sub_0207938C + ldr r0, [sp, #4] + add r1, r4, #0 + ldrh r0, [r6, r0] + bl sub_0207939C + add r0, sp, #8 + ldrb r1, [r0] + cmp r1, #3 + bhi _02243208 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02243200: ; jump table + .short _02243208 - _02243200 - 2 ; case 0 + .short _0224321A - _02243200 - 2 ; case 1 + .short _0224322A - _02243200 - 2 ; case 2 + .short _0224323C - _02243200 - 2 ; case 3 +_02243208: + add r0, sp, #8 + ldrb r0, [r0, #3] + sub r0, r0, #1 + lsl r0, r0, #3 + add r0, r4, r0 + ldrh r0, [r0, #2] + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + b _0224324C +_0224321A: + ldrb r0, [r0, #3] + sub r0, r0, #1 + lsl r0, r0, #4 + add r0, r4, r0 + ldrh r0, [r0, #2] + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + b _0224324C +_0224322A: + ldrb r0, [r0, #3] + sub r1, r0, #1 + mov r0, #0xa + mul r0, r1 + add r0, r4, r0 + ldrh r0, [r0, #2] + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + b _0224324C +_0224323C: + ldrb r0, [r0, #3] + sub r1, r0, #1 + mov r0, #0x12 + mul r0, r1 + add r0, r4, r0 + ldrh r0, [r0, #2] + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 +_0224324C: + ldr r2, [r7, #0x2c] + mov r0, #0x10 + tst r0, r2 + bne _02243258 + cmp r2, #0x4b + bne _0224326E +_02243258: + add r0, sp, #8 + ldrb r2, [r0, #1] + ldr r0, _022432AC ; =0x02270B20 + lsl r1, r1, #2 + ldrb r0, [r0, r2] + ldr r2, _022432B0 ; =0x00002168 + ldr r2, [r5, r2] + add r5, r0, #0 + mul r1, r2 + mul r5, r1 + b _0224329E +_0224326E: + mov r0, #2 + tst r0, r2 + add r0, sp, #8 + beq _0224328C + ldrb r2, [r0, #1] + ldr r0, _022432AC ; =0x02270B20 + lsl r1, r1, #2 + ldrb r0, [r0, r2] + ldr r2, _022432B0 ; =0x00002168 + ldr r2, [r5, r2] + add r5, r0, #0 + mul r1, r2 + lsl r1, r1, #1 + mul r5, r1 + b _0224329E +_0224328C: + ldrb r2, [r0, #1] + ldr r0, _022432AC ; =0x02270B20 + lsl r1, r1, #2 + ldrb r0, [r0, r2] + ldr r2, _022432B0 ; =0x00002168 + ldr r2, [r5, r2] + add r5, r0, #0 + mul r1, r2 + mul r5, r1 +_0224329E: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_022432AC: .word 0x02270B20 +_022432B0: .word 0x00002168 + thumb_func_end ov16_022431BC + + thumb_func_start ov16_022432B4 +ov16_022432B4: ; 0x022432B4 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, _02243330 ; =0x00002420 + ldrb r0, [r5, r0] + cmp r0, #1 + bne _022432FE + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + bl ov16_022431BC + add r4, r0, #0 + ldr r1, [r5, #0x2c] + mov r0, #0x10 + tst r0, r1 + bne _022432E2 + cmp r1, #0x4b + bne _022432EE +_022432E2: + add r0, r5, #0 + add r1, r6, #0 + mov r2, #3 + bl ov16_022431BC + add r4, r4, r0 +_022432EE: + add r0, r5, #0 + mov r1, #0 + bl ov16_0223E16C + add r1, r4, #0 + bl sub_02025F94 + b _02243316 +_022432FE: + ldr r0, [r5, #0x68] + ldr r1, [r5, #0x48] + bl ov16_0223F904 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov16_0223E16C + add r1, r4, #0 + bl sub_02025FB8 +_02243316: + cmp r4, #0 + beq _02243322 + mov r0, #0x13 + lsl r0, r0, #4 + str r4, [r6, r0] + b _0224332A +_02243322: + mov r0, #0x13 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r6, r0] +_0224332A: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02243330: .word 0x00002420 + thumb_func_end ov16_022432B4 + + thumb_func_start ov16_02243334 +ov16_02243334: ; 0x02243334 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_0223EDAC + cmp r0, #1 + beq _0224336C + cmp r4, #0xf + beq _0224336C + cmp r4, #0x10 + beq _0224336C + add r0, r4, #0 + sub r0, #0x19 + cmp r0, #1 + bhi _02243392 +_0224336C: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_0224A984 + add r7, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov16_0225B1DC + cmp r0, #1 + bne _02243392 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov16_02265FF8 +_02243392: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02243334 + + thumb_func_start ov16_02243398 +ov16_02243398: ; 0x02243398 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_0223EDAC + cmp r0, #1 + beq _022433DA + cmp r4, #0xf + beq _022433DA + cmp r4, #0x10 + beq _022433DA + add r0, r4, #0 + sub r0, #0x19 + cmp r0, #1 + bhi _0224341C +_022433DA: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_0224A984 + add r7, r0, #0 + ldr r2, [sp, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0224A984 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov16_0225B1DC + cmp r0, #1 + bne _0224341C + ldr r1, [sp, #8] + add r0, r5, #0 + add r2, r4, #0 + bl ov16_0225B1DC + cmp r0, #1 + bne _0224341C + ldr r3, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + str r4, [sp] + bl ov16_02266028 +_0224341C: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02243398 + + thumb_func_start ov16_02243424 +ov16_02243424: ; 0x02243424 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov16_02248B10 + add r4, r0, #0 + add r0, r7, #0 + bl ov16_0223EDAC + cmp r0, #1 + beq _02243474 + cmp r6, #0xf + beq _02243474 + cmp r6, #0x10 + beq _02243474 + ldr r0, [r4, #0] + sub r0, #0x19 + cmp r0, #1 + bhi _0224348E +_02243474: + ldr r1, [sp] + ldr r2, [r4, #0] + add r0, r5, #0 + bl ov16_0225B1DC + cmp r0, #1 + bne _0224348E + ldr r2, [sp] + ldr r3, [r4, #0] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_02265FF8 +_0224348E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02243424 + + thumb_func_start ov16_02243494 +ov16_02243494: ; 0x02243494 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r1, r4, #0 + ldr r3, _022434C8 ; =0x0000219C + add r4, r4, r2 + ldrb r3, [r4, r3] + add r0, r5, #0 + bl ov16_02266058 + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022434C8: .word 0x0000219C + thumb_func_end ov16_02243494 + + thumb_func_start ov16_022434CC +ov16_022434CC: ; 0x022434CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r1, r4, #0 + ldr r3, _02243500 ; =0x0000219C + add r4, r4, r2 + ldrb r3, [r4, r3] + add r0, r5, #0 + bl ov16_0226609C + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02243500: .word 0x0000219C + thumb_func_end ov16_022434CC + + thumb_func_start ov16_02243504 +ov16_02243504: ; 0x02243504 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_022660E8 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02243504 + + thumb_func_start ov16_02243530 +ov16_02243530: ; 0x02243530 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02266100 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02243530 + + thumb_func_start ov16_0224355C +ov16_0224355C: ; 0x0224355C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + mov r2, #0x13 + lsl r2, r2, #4 + add r1, r0, #0 + ldr r2, [r4, r2] + add r0, r5, #0 + bl ov16_02265FD8 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0224355C + + thumb_func_start ov16_0224358C +ov16_0224358C: ; 0x0224358C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x79 + bne _022435BE + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02248AF0 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022435BE: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _022436FC ; =0x00002D4C + mov r6, #0 +_022435CA: + ldrh r1, [r2, r0] + cmp r1, #0 + beq _022435D8 + add r6, r6, #1 + add r2, r2, #2 + cmp r6, #4 + blt _022435CA +_022435D8: + mov r0, #0 + str r0, [sp, #8] + cmp r6, #0 + ble _02243650 + add r7, r0, #0 +_022435E2: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r0, r4, r0 + add r2, r7, r0 + ldr r0, _022436FC ; =0x00002D4C + ldrh r0, [r2, r0] + cmp r0, #0xa0 + beq _02243644 + lsl r0, r0, #4 + add r2, r4, r0 + ldr r0, _02243700 ; =0x000003E2 + ldrb r5, [r2, r0] + cmp r5, #9 + bne _02243624 + add r0, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #7 + beq _0224361E + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #7 + bne _02243622 +_0224361E: + mov r5, #7 + b _02243624 +_02243622: + mov r5, #0 +_02243624: + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r5, r0 + beq _02243644 + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r5, r0 + bne _02243650 +_02243644: + ldr r0, [sp, #8] + add r7, r7, #2 + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, r6 + blt _022435E2 +_02243650: + ldr r0, [sp, #8] + cmp r0, r6 + bne _02243660 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02248AF0 + b _022436F4 +_02243660: + ldr r7, _022436FC ; =0x00002D4C +_02243662: + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r6, #0 + bl sub_020E1F6C + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + lsl r1, r1, #1 + add r0, r4, r0 + add r0, r1, r0 + ldrh r0, [r0, r7] + cmp r0, #0xa0 + beq _02243662 + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02243700 ; =0x000003E2 + ldrb r5, [r1, r0] + cmp r5, #9 + bne _022436B2 + add r1, r2, #0 + add r0, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #7 + beq _022436AC + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #7 + bne _022436B0 +_022436AC: + mov r5, #7 + b _022436B2 +_022436B0: + mov r5, #0 +_022436B2: + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r5, r0 + beq _02243662 + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r5, r0 + beq _02243662 + ldr r1, [r4, #0x64] + lsl r0, r5, #0x18 + add r3, r1, #0 + mov r2, #0xc0 + mul r3, r2 + ldr r1, _02243704 ; =0x00002D64 + lsr r0, r0, #0x18 + add r3, r4, r3 + strb r0, [r3, r1] + ldr r3, [r4, #0x64] + add r1, r1, #1 + add r6, r3, #0 + mul r6, r2 + add r3, r4, r6 + strb r0, [r3, r1] + add r2, #0x70 + str r5, [r4, r2] +_022436F4: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022436FC: .word 0x00002D4C +_02243700: .word 0x000003E2 +_02243704: .word 0x00002D64 + thumb_func_end ov16_0224358C + + thumb_func_start ov16_02243708 +ov16_02243708: ; 0x02243708 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r6, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r0, [sp] + add r1, r6, #0 + add r2, r4, #0 + bl ov16_02248B10 + add r4, r0, #0 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r6, #0 + bl ov16_02248B10 + cmp r7, #6 + bhi _022437C0 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224375E: ; jump table + .short _0224376C - _0224375E - 2 ; case 0 + .short _02243778 - _0224375E - 2 ; case 1 + .short _02243784 - _0224375E - 2 ; case 2 + .short _02243790 - _0224375E - 2 ; case 3 + .short _0224379C - _0224375E - 2 ; case 4 + .short _022437A8 - _0224375E - 2 ; case 5 + .short _022437B4 - _0224375E - 2 ; case 6 +_0224376C: + ldr r1, [r4, #0] + ldr r0, [r0, #0] + cmp r1, r0 + beq _022437C0 + mov r5, #0 + b _022437C0 +_02243778: + ldr r1, [r4, #0] + ldr r0, [r0, #0] + cmp r1, r0 + bne _022437C0 + mov r5, #0 + b _022437C0 +_02243784: + ldr r1, [r4, #0] + ldr r0, [r0, #0] + cmp r1, r0 + bhi _022437C0 + mov r5, #0 + b _022437C0 +_02243790: + ldr r1, [r4, #0] + ldr r0, [r0, #0] + cmp r1, r0 + bls _022437C0 + mov r5, #0 + b _022437C0 +_0224379C: + ldr r1, [r4, #0] + ldr r0, [r0, #0] + tst r0, r1 + bne _022437C0 + mov r5, #0 + b _022437C0 +_022437A8: + ldr r1, [r4, #0] + ldr r0, [r0, #0] + tst r0, r1 + beq _022437C0 + mov r5, #0 + b _022437C0 +_022437B4: + ldr r1, [r0, #0] + ldr r0, [r4, #0] + and r0, r1 + cmp r1, r0 + beq _022437C0 + mov r5, #0 +_022437C0: + cmp r5, #0 + beq _022437CC + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02248AF0 +_022437CC: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02243708 + + thumb_func_start ov16_022437D4 +ov16_022437D4: ; 0x022437D4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r6, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r0, [sp] + add r1, r6, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + ldr r2, [sp, #4] + add r0, r6, #0 + mov r3, #0 + bl ov16_02252060 + add r4, r0, #0 + ldr r0, [sp] + ldr r2, [sp, #8] + add r1, r6, #0 + bl ov16_02248B10 + cmp r7, #6 + bhi _02243894 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224383E: ; jump table + .short _0224384C - _0224383E - 2 ; case 0 + .short _02243856 - _0224383E - 2 ; case 1 + .short _02243860 - _0224383E - 2 ; case 2 + .short _0224386A - _0224383E - 2 ; case 3 + .short _02243874 - _0224383E - 2 ; case 4 + .short _0224387E - _0224383E - 2 ; case 5 + .short _02243888 - _0224383E - 2 ; case 6 +_0224384C: + ldr r0, [r0, #0] + cmp r4, r0 + beq _02243894 + mov r5, #0 + b _02243894 +_02243856: + ldr r0, [r0, #0] + cmp r4, r0 + bne _02243894 + mov r5, #0 + b _02243894 +_02243860: + ldr r0, [r0, #0] + cmp r4, r0 + bhi _02243894 + mov r5, #0 + b _02243894 +_0224386A: + ldr r0, [r0, #0] + cmp r4, r0 + bls _02243894 + mov r5, #0 + b _02243894 +_02243874: + ldr r0, [r0, #0] + tst r0, r4 + bne _02243894 + mov r5, #0 + b _02243894 +_0224387E: + ldr r0, [r0, #0] + tst r0, r4 + beq _02243894 + mov r5, #0 + b _02243894 +_02243888: + ldr r1, [r0, #0] + add r0, r1, #0 + and r0, r4 + cmp r1, r0 + beq _02243894 + mov r5, #0 +_02243894: + cmp r5, #0 + beq _022438A0 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02248AF0 +_022438A0: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_022437D4 + + thumb_func_start ov16_022438A8 +ov16_022438A8: ; 0x022438A8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r1, _022438F0 ; =0x00002168 + ldr r2, [r4, r0] + ldr r1, [r4, r1] + add r3, r2, #0 + mul r3, r1 + add r1, r0, #0 + sub r1, #0x1c + str r3, [r4, r1] + add r1, r0, #0 + sub r1, #0x1c + ldr r2, [r4, r1] + ldr r1, _022438F4 ; =0x0000FFFF + cmp r2, r1 + ble _022438DA + sub r0, #0x1c + str r1, [r4, r0] +_022438DA: + add r0, r5, #0 + mov r1, #0 + bl ov16_0223E16C + mov r1, #0x13 + lsl r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02025F94 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022438F0: .word 0x00002168 +_022438F4: .word 0x0000FFFF + thumb_func_end ov16_022438A8 + + thumb_func_start ov16_022438F8 +ov16_022438F8: ; 0x022438F8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + ldr r1, [r5, #0x64] + add r0, r7, #0 + bl ov16_0223E208 + add r6, r0, #0 + mov r0, #0x6f + lsl r0, r0, #2 + add r3, r5, r0 + lsl r2, r6, #2 + ldr r1, [r3, r2] + mov r4, #2 + tst r4, r1 + beq _0224393C + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 + ldr r1, _022439CC ; =0x0000216C + mov r0, #0x40 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] + b _022439C8 +_0224393C: + mov r4, #2 + orr r1, r4 + str r1, [r3, r2] + add r1, r0, #0 + add r1, #8 + add r4, r5, r1 + lsl r6, r6, #3 + ldr r2, [r4, r6] + ldr r1, _022439D0 ; =0xFFFFFC7F + add r0, #0xc4 + and r1, r2 + orr r0, r1 + str r0, [r4, r6] + ldr r0, [r4, r6] + mov r1, #0x60 + bic r0, r1 + ldr r1, [r5, #0x64] + lsl r1, r1, #0x1e + lsr r1, r1, #0x19 + orr r0, r1 + str r0, [r4, r6] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02258AB8 + cmp r0, #0x61 + bne _02243990 + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + ldr r1, [r4, r6] + ldr r2, _022439D0 ; =0xFFFFFC7F + and r2, r1 + lsl r1, r1, #0x16 + lsr r1, r1, #0x1d + add r0, r1, r0 + lsl r0, r0, #0x1d + lsr r0, r0, #0x16 + orr r0, r2 + str r0, [r4, r6] +_02243990: + add r0, r5, #0 + mov r1, #0x14 + add r0, #0xf5 + strb r1, [r0] + ldr r0, _022439D4 ; =0x00003044 + mov r2, #1 + ldr r1, [r5, r0] + add r0, r5, #0 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0xfc + str r1, [r0, #0] + ldr r3, [r5, #0x64] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_022554E0 + cmp r0, #2 + bne _022439C2 + mov r0, #0xc0 + add r5, #0xf6 + strh r0, [r5] + b _022439C8 +_022439C2: + mov r0, #0xbe + add r5, #0xf6 + strh r0, [r5] +_022439C8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022439CC: .word 0x0000216C +_022439D0: .word 0xFFFFFC7F +_022439D4: .word 0x00003044 + thumb_func_end ov16_022438F8 + + thumb_func_start ov16_022439D8 +ov16_022439D8: ; 0x022439D8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + ldr r1, [r5, #0x64] + add r0, r7, #0 + bl ov16_0223E208 + add r6, r0, #0 + mov r0, #0x6f + lsl r0, r0, #2 + add r3, r5, r0 + lsl r2, r6, #2 + ldr r1, [r3, r2] + mov r4, #1 + tst r4, r1 + beq _02243A1C + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 + ldr r1, _02243AB0 ; =0x0000216C + mov r0, #0x40 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] + b _02243AAA +_02243A1C: + mov r4, #1 + orr r1, r4 + add r0, #8 + add r4, r5, r0 + lsl r6, r6, #3 + str r1, [r3, r2] + ldr r1, [r4, r6] + mov r0, #0x1c + bic r1, r0 + mov r0, #0x14 + orr r0, r1 + str r0, [r4, r6] + ldr r0, [r4, r6] + mov r1, #3 + bic r0, r1 + ldr r2, [r5, #0x64] + mov r1, #3 + and r1, r2 + orr r0, r1 + str r0, [r4, r6] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02258AB8 + cmp r0, #0x61 + bne _02243A72 + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + ldr r1, [r4, r6] + add r3, r0, #0 + mov r0, #0x1c + add r2, r1, #0 + bic r2, r0 + lsl r0, r1, #0x1b + lsr r0, r0, #0x1d + add r0, r0, r3 + lsl r0, r0, #0x1d + lsr r0, r0, #0x1b + orr r0, r2 + str r0, [r4, r6] +_02243A72: + add r0, r5, #0 + mov r1, #0x14 + add r0, #0xf5 + strb r1, [r0] + ldr r0, _02243AB4 ; =0x00003044 + mov r2, #1 + ldr r1, [r5, r0] + add r0, r5, #0 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0xfc + str r1, [r0, #0] + ldr r3, [r5, #0x64] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_022554E0 + cmp r0, #2 + bne _02243AA4 + mov r0, #0xc4 + add r5, #0xf6 + strh r0, [r5] + b _02243AAA +_02243AA4: + mov r0, #0xc2 + add r5, #0xf6 + strh r0, [r5] +_02243AAA: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243AB0: .word 0x0000216C +_02243AB4: .word 0x00003044 + thumb_func_end ov16_022439D8 + + thumb_func_start ov16_02243AB8 +ov16_02243AB8: ; 0x02243AB8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + mov r5, #0x6f + add r2, r0, #0 + lsl r5, r5, #2 + add r1, r4, r5 + lsl r0, r2, #2 + ldr r6, [r1, r0] + mov r3, #0x40 + tst r3, r6 + beq _02243AFC + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02248AF0 + ldr r1, _02243B2C ; =0x0000216C + mov r0, #0x40 + ldr r2, [r4, r1] + orr r0, r2 + str r0, [r4, r1] + b _02243B26 +_02243AFC: + mov r3, #0x40 + orr r3, r6 + str r3, [r1, r0] + add r5, #8 + lsl r0, r2, #3 + add r1, r4, r5 + ldr r3, [r1, r0] + ldr r2, _02243B30 ; =0xFFFF8FFF + and r3, r2 + mov r2, #5 + lsl r2, r2, #0xc + orr r2, r3 + str r2, [r1, r0] + ldr r3, [r1, r0] + ldr r2, _02243B34 ; =0xFFFFF3FF + and r3, r2 + ldr r2, [r4, #0x64] + lsl r2, r2, #0x1e + lsr r2, r2, #0x14 + orr r2, r3 + str r2, [r1, r0] +_02243B26: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243B2C: .word 0x0000216C +_02243B30: .word 0xFFFF8FFF +_02243B34: .word 0xFFFFF3FF + thumb_func_end ov16_02243AB8 + + thumb_func_start ov16_02243B38 +ov16_02243B38: ; 0x02243B38 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, _02243D0C ; =0x0000213C + mov r0, #1 + ldr r2, [r4, r1] + lsl r0, r0, #0xa + orr r0, r2 + str r0, [r4, r1] + ldr r1, [r4, #0x64] + ldr r2, [r4, #0x6c] + add r0, r4, #0 + mov r3, #5 + bl ov16_02255AB4 + cmp r0, #1 + bne _02243B70 + ldr r1, _02243D10 ; =0x0000216C + mov r0, #2 + ldr r2, [r4, r1] + lsl r0, r0, #0x12 + orr r0, r2 + str r0, [r4, r1] + b _02243D08 +_02243B70: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r1, [r1, r0] + mov r0, #0x18 + tst r0, r1 + bne _02243BF8 + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x63 + beq _02243BF8 + ldr r1, [r4, #0x6c] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x63 + beq _02243BF8 + ldr r0, _02243D14 ; =0x00003044 + mov r2, #0xc0 + ldr r0, [r4, r0] + ldr r5, [r4, #0x6c] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02243D18 ; =0x000003E3 + ldrb r1, [r1, r0] + ldr r0, [r4, #0x64] + add r3, r0, #0 + mul r3, r2 + add r0, r4, r3 + ldr r3, _02243D1C ; =0x00002D74 + mul r2, r5 + add r2, r4, r2 + ldrb r0, [r0, r3] + ldrb r2, [r2, r3] + sub r0, r0, r2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r5 + bge _02243BF4 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _02243D1C ; =0x00002D74 + add r2, r4, r2 + ldrb r3, [r2, r1] + ldr r2, [r4, #0x6c] + mul r0, r2 + add r0, r4, r0 + ldrb r0, [r0, r1] + cmp r3, r0 + blo _02243BF4 + mov r3, #1 + b _02243CB2 +_02243BF4: + mov r3, #0 + b _02243CB2 +_02243BF8: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r3, r4, r0 + ldr r0, _02243D20 ; =0x00002DCC + ldr r1, [r4, #0x64] + ldr r2, [r3, r0] + lsl r2, r2, #0x1e + lsr r2, r2, #0x1e + cmp r1, r2 + bne _02243C18 + sub r0, #0xc + ldr r2, [r3, r0] + mov r0, #0x18 + tst r0, r2 + bne _02243C2E +_02243C18: + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x63 + beq _02243C2E + ldr r1, [r4, #0x6c] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x63 + bne _02243C4C +_02243C2E: + ldr r0, [r4, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r3, [r4, #0x6c] + add r0, r4, r2 + ldr r2, _02243D1C ; =0x00002D74 + mul r1, r3 + add r1, r4, r1 + ldrb r0, [r0, r2] + ldrb r1, [r1, r2] + cmp r0, r1 + blo _02243C4C + mov r3, #1 + b _02243CA6 +_02243C4C: + ldr r0, _02243D14 ; =0x00003044 + mov r2, #0xc0 + ldr r0, [r4, r0] + ldr r5, [r4, #0x6c] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02243D18 ; =0x000003E3 + ldrb r1, [r1, r0] + ldr r0, [r4, #0x64] + add r3, r0, #0 + mul r3, r2 + add r0, r4, r3 + ldr r3, _02243D1C ; =0x00002D74 + mul r2, r5 + add r2, r4, r2 + ldrb r0, [r0, r3] + ldrb r2, [r2, r3] + sub r0, r0, r2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r5 + bge _02243CA4 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _02243D1C ; =0x00002D74 + add r2, r4, r2 + ldrb r3, [r2, r1] + ldr r2, [r4, #0x6c] + mul r0, r2 + add r0, r4, r0 + ldrb r0, [r0, r1] + cmp r3, r0 + blo _02243CA4 + mov r3, #1 + b _02243CA6 +_02243CA4: + mov r3, #0 +_02243CA6: + ldr r1, _02243D10 ; =0x0000216C + mov r0, #1 + ldr r2, [r4, r1] + lsl r0, r0, #0xa + orr r0, r2 + str r0, [r4, r1] +_02243CB2: + cmp r3, #0 + beq _02243CD8 + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02243D24 ; =0x00002D8C + ldr r0, [r1, r0] + ldr r1, _02243D28 ; =0x00002144 + neg r0, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x28 + ldr r2, [r4, r0] + mov r0, #0x20 + orr r0, r2 + add r1, #0x28 + str r0, [r4, r1] + b _02243D08 +_02243CD8: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _02243D1C ; =0x00002D74 + add r2, r4, r2 + ldrb r3, [r2, r1] + ldr r2, [r4, #0x6c] + mul r0, r2 + add r0, r4, r0 + ldrb r0, [r0, r1] + cmp r3, r0 + ldr r1, _02243D10 ; =0x0000216C + blo _02243CFE + ldr r2, [r4, r1] + mov r0, #1 + orr r0, r2 + str r0, [r4, r1] + b _02243D08 +_02243CFE: + mov r0, #1 + ldr r2, [r4, r1] + lsl r0, r0, #0xc + orr r0, r2 + str r0, [r4, r1] +_02243D08: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02243D0C: .word 0x0000213C +_02243D10: .word 0x0000216C +_02243D14: .word 0x00003044 +_02243D18: .word 0x000003E3 +_02243D1C: .word 0x00002D74 +_02243D20: .word 0x00002DCC +_02243D24: .word 0x00002D8C +_02243D28: .word 0x00002144 + thumb_func_end ov16_02243B38 + + thumb_func_start ov16_02243D2C +ov16_02243D2C: ; 0x02243D2C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_02248B10 + add r4, r0, #0 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_022563F8 + str r0, [r4, #0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02243D2C + + thumb_func_start ov16_02243D64 +ov16_02243D64: ; 0x02243D64 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_02248B10 + add r4, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02248B10 + add r1, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bge _02243DA6 + mov r5, #0 + mvn r5, r5 + b _02243DA8 +_02243DA6: + mov r5, #1 +_02243DA8: + ldr r0, [r4, #0] + ldr r1, [r1, #0] + bl sub_020E1F6C + str r0, [r4, #0] + cmp r0, #0 + bne _02243DB8 + str r5, [r4, #0] +_02243DB8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02243D64 + + thumb_func_start ov16_02243DBC +ov16_02243DBC: ; 0x02243DBC + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + str r0, [sp] + ldr r0, [r6, #0x6c] + lsl r0, r0, #1 + add r1, r6, r0 + ldr r0, _02243EE0 ; =0x0000307C + ldrh r0, [r1, r0] + bl ov16_0225AFF4 + cmp r0, #0 + beq _02243E16 + ldr r0, [r6, #0x64] + mov r2, #2 + mov r3, #0xc0 + add r1, r0, #0 + mul r1, r3 + add r0, r6, r1 + ldr r1, _02243EE4 ; =0x00002DB0 + mov ip, r0 + ldr r0, [r0, r1] + lsl r2, r2, #0x14 + tst r0, r2 + bne _02243E16 + ldr r0, [r6, #0x6c] + add r4, r0, #0 + mul r4, r3 + add r4, r6, r4 + ldr r4, [r4, r1] + lsl r1, r2, #3 + tst r1, r4 + bne _02243E16 + lsl r0, r0, #1 + add r1, r6, r0 + ldr r0, _02243EE0 ; =0x0000307C + ldrh r7, [r1, r0] + cmp r7, #0 + bne _02243E20 +_02243E16: + ldr r1, [sp] + add r0, r6, #0 + bl ov16_02248AF0 + b _02243EDC +_02243E20: + mov r2, #0 + sub r3, #0xc1 + mov r4, ip + add r5, r2, #0 +_02243E28: + ldr r0, _02243EE8 ; =0x00002D4C + ldrh r0, [r4, r0] + cmp r7, r0 + beq _02243E50 + mov r0, ip + add r1, r0, r5 + ldr r0, _02243EE8 ; =0x00002D4C + ldrh r0, [r1, r0] + cmp r0, #0x66 + bne _02243E46 + mov r0, #0 + mvn r0, r0 + cmp r3, r0 + bne _02243E46 + add r3, r2, #0 +_02243E46: + add r2, r2, #1 + add r4, r4, #2 + add r5, r5, #2 + cmp r2, #4 + blt _02243E28 +_02243E50: + cmp r2, #4 + bne _02243ED4 + mov r4, #0x49 + lsl r4, r4, #2 + str r7, [r6, r4] + ldr r2, [r6, #0x64] + mov r1, #0xc0 + add r5, r2, #0 + mul r5, r1 + add r5, r6, r5 + lsl r2, r3, #1 + add r5, r5, r2 + ldr r0, [r6, r4] + ldr r2, _02243EE8 ; =0x00002D4C + strh r0, [r5, r2] + ldr r0, [r6, r4] + lsl r0, r0, #4 + add r4, r6, r0 + mov r0, #0xf9 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #5 + bhs _02243E80 + b _02243E82 +_02243E80: + mov r0, #5 +_02243E82: + ldr r4, [r6, #0x64] + add r2, #0x20 + mul r1, r4 + add r1, r6, r1 + add r1, r1, r3 + strb r0, [r1, r2] + add r0, r3, #0 + bl sub_020787CC + ldr r1, _02243EEC ; =0x00002DCC + mov r4, #0xc0 + add r3, r6, r1 + ldr r1, [r6, #0x64] + mov r5, #0x3c + add r2, r1, #0 + mul r2, r4 + ldr r7, [r3, r2] + add r1, r7, #0 + bic r1, r5 + lsl r5, r7, #0x1a + lsr r5, r5, #0x1c + orr r0, r5 + lsl r0, r0, #0x1c + lsr r0, r0, #0x1a + orr r0, r1 + str r0, [r3, r2] + add r0, r4, #0 + add r0, #0x64 + ldr r1, [r6, r0] + add r0, r4, #0 + add r0, #0xc3 + cmp r1, r0 + bne _02243EDC + ldr r0, [r6, #0x64] + add r2, r0, #0 + mul r2, r4 + ldr r1, [r3, r2] + ldr r0, _02243EF0 ; =0xFFFFE3FF + and r0, r1 + str r0, [r3, r2] + b _02243EDC +_02243ED4: + ldr r1, [sp] + add r0, r6, #0 + bl ov16_02248AF0 +_02243EDC: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243EE0: .word 0x0000307C +_02243EE4: .word 0x00002DB0 +_02243EE8: .word 0x00002D4C +_02243EEC: .word 0x00002DCC +_02243EF0: .word 0xFFFFE3FF + thumb_func_end ov16_02243DBC + + thumb_func_start ov16_02243EF4 +ov16_02243EF4: ; 0x02243EF4 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r4, _02243F4C ; =0x00002D4C +_02243F04: + add r0, r7, #0 + bl ov16_0223F4BC + ldr r1, _02243F50 ; =0x000001D3 + bl sub_020E1F6C + add r0, r1, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r3, [r6, #0x64] + mov r0, #0xc0 + mul r0, r3 + mov r1, #0 + add r2, r6, r0 +_02243F20: + ldrh r0, [r2, r4] + cmp r5, r0 + beq _02243F2E + add r1, r1, #1 + add r2, r2, #2 + cmp r1, #4 + blt _02243F20 +_02243F2E: + cmp r1, #4 + bne _02243F04 + add r2, r3, #0 + add r0, r7, #0 + add r1, r6, #0 + add r3, r5, #0 + bl ov16_0225B02C + cmp r0, #0 + beq _02243F04 + mov r0, #0x49 + lsl r0, r0, #2 + str r5, [r6, r0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243F4C: .word 0x00002D4C +_02243F50: .word 0x000001D3 + thumb_func_end ov16_02243EF4 + + thumb_func_start ov16_02243F54 +ov16_02243F54: ; 0x02243F54 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + mov r0, #0xb5 + lsl r0, r0, #6 + add r2, r4, r0 + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + lsl r1, r1, #1 + add r0, r2, r0 + add r2, r4, r1 + ldr r1, _02244008 ; =0x0000307C + ldrh r1, [r2, r1] + bl ov16_02254EE0 + add r3, r0, #0 + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + ldr r7, _0224400C ; =0x00002DE8 + add r1, r4, r0 + ldrh r0, [r1, r7] + cmp r0, #0 + bne _02243FFA + cmp r3, #4 + beq _02243FFA + add r0, r7, #0 + add r1, r1, r3 + sub r0, #0x7c + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02243FFA + lsl r0, r2, #1 + add r1, r4, r0 + ldr r0, _02244008 ; =0x0000307C + ldrh r1, [r1, r0] + cmp r1, #0 + beq _02243FFA + mov r0, #0xc0 + add r0, #0x64 + str r1, [r4, r0] + mov r0, #0xc0 + add r0, #0x64 + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + ldr r0, [r4, r0] + add r1, r4, r1 + strh r0, [r1, r7] + add r0, r5, #0 + bl ov16_0223F4BC + add r1, r7, #0 + sub r1, #0x20 + add r3, r4, r1 + ldr r4, [r4, #0x6c] + mov r1, #0xc0 + add r2, r4, #0 + mul r2, r1 + ldr r1, [r3, r2] + mov r4, #7 + bic r1, r4 + lsr r5, r0, #0x1f + lsl r4, r0, #0x1e + sub r4, r4, r5 + mov r0, #0x1e + ror r4, r0 + add r0, r5, r4 + add r4, r0, #3 + mov r0, #7 + and r0, r4 + orr r0, r1 + str r0, [r3, r2] + b _02244002 +_02243FFA: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02244002: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244008: .word 0x0000307C +_0224400C: .word 0x00002DE8 + thumb_func_end ov16_02243F54 + + thumb_func_start ov16_02244010 +ov16_02244010: ; 0x02244010 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r5, #0x64] + lsl r0, r1, #6 + add r2, r5, r0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r4, [r2, r0] + ldr r0, [sp] + bl ov16_0223E208 + str r0, [sp, #4] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223E208 + ldr r6, [r5, #0x64] + add r3, r0, #0 + lsl r0, r6, #6 + add r1, r5, r0 + lsl r0, r4, #2 + add r0, r1, r0 + mov r1, #0x76 + lsl r1, r1, #2 + ldr r7, [r0, r1] + cmp r7, #0 + beq _022440D6 + ldr r0, [sp, #4] + cmp r0, r3 + beq _022440D6 + mov r0, #0xc0 + mul r0, r4 + add r2, r5, r0 + ldr r0, _02244100 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _022440D6 + ldr r0, _02244104 ; =0x00002144 + lsl r2, r7, #1 + sub r1, #0x14 + str r2, [r5, r0] + add r1, r5, r1 + lsl r0, r3, #3 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _02244090 + lsl r0, r0, #9 + lsr r0, r0, #0x1e + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + ldr r1, _02244100 ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _02244090 + str r0, [r5, #0x6c] + b _02244092 +_02244090: + str r4, [r5, #0x6c] +_02244092: + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02244100 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + bne _022440CA + ldr r0, [sp] + ldr r2, [r5, #0x64] + add r1, r5, #0 + bl ov16_02257028 + mov r1, #0xc0 + mul r1, r0 + str r0, [r5, #0x6c] + ldr r0, _02244100 ; =0x00002D8C + add r1, r5, r1 + ldr r0, [r1, r0] + cmp r0, #0 + bne _022440CA + mov r2, #0x26 + str r2, [r5, #0xc] + add r0, r5, #0 + mov r1, #1 + add r2, #0xf3 + bl ov16_02248B00 +_022440CA: + ldr r1, [r5, #0x64] + ldr r2, [r5, #0x6c] + add r0, r5, #0 + bl ov16_0225B408 + b _022440F8 +_022440D6: + mov r0, #0xb5 + lsl r0, r0, #2 + mov r1, #0x1c + add r3, r6, #0 + mul r3, r1 + add r0, r5, r0 + ldr r2, [r0, r3] + mov r1, #1 + bic r2, r1 + mov r1, #1 + orr r1, r2 + str r1, [r0, r3] + ldr r1, _02244108 ; =0x0000216C + mov r0, #0x40 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] +_022440F8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244100: .word 0x00002D8C +_02244104: .word 0x00002144 +_02244108: .word 0x0000216C + thumb_func_end ov16_02244010 + + thumb_func_start ov16_0224410C +ov16_0224410C: ; 0x0224410C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r5, #0x64] + lsl r0, r1, #6 + add r2, r5, r0 + mov r0, #2 + lsl r0, r0, #8 + ldr r4, [r2, r0] + ldr r0, [sp] + bl ov16_0223E208 + str r0, [sp, #4] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223E208 + ldr r6, [r5, #0x64] + add r3, r0, #0 + lsl r0, r6, #6 + add r1, r5, r0 + lsl r0, r4, #2 + add r0, r1, r0 + mov r1, #0x1f + lsl r1, r1, #4 + ldr r7, [r0, r1] + cmp r7, #0 + beq _022441D2 + ldr r0, [sp, #4] + cmp r0, r3 + beq _022441D2 + mov r0, #0xc0 + mul r0, r4 + add r2, r5, r0 + ldr r0, _022441FC ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _022441D2 + ldr r0, _02244200 ; =0x00002144 + lsl r2, r7, #1 + sub r1, #0x2c + str r2, [r5, r0] + add r1, r5, r1 + lsl r0, r3, #3 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _0224418C + lsl r0, r0, #9 + lsr r0, r0, #0x1e + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + ldr r1, _022441FC ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _0224418C + str r0, [r5, #0x6c] + b _0224418E +_0224418C: + str r4, [r5, #0x6c] +_0224418E: + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _022441FC ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + bne _022441C6 + ldr r0, [sp] + ldr r2, [r5, #0x64] + add r1, r5, #0 + bl ov16_02257028 + mov r1, #0xc0 + mul r1, r0 + str r0, [r5, #0x6c] + ldr r0, _022441FC ; =0x00002D8C + add r1, r5, r1 + ldr r0, [r1, r0] + cmp r0, #0 + bne _022441C6 + mov r2, #0x26 + str r2, [r5, #0xc] + add r0, r5, #0 + mov r1, #1 + add r2, #0xf3 + bl ov16_02248B00 +_022441C6: + ldr r1, [r5, #0x64] + ldr r2, [r5, #0x6c] + add r0, r5, #0 + bl ov16_0225B408 + b _022441F4 +_022441D2: + mov r0, #0xb5 + lsl r0, r0, #2 + mov r1, #0x1c + add r3, r6, #0 + mul r3, r1 + add r0, r5, r0 + ldr r2, [r0, r3] + mov r1, #1 + bic r2, r1 + mov r1, #1 + orr r1, r2 + str r1, [r0, r3] + ldr r1, _02244204 ; =0x0000216C + mov r0, #0x40 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] +_022441F4: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022441FC: .word 0x00002D8C +_02244200: .word 0x00002144 +_02244204: .word 0x0000216C + thumb_func_end ov16_0224410C + + thumb_func_start ov16_02244208 +ov16_02244208: ; 0x02244208 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + mov r0, #0xb5 + lsl r0, r0, #6 + add r2, r5, r0 + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + lsl r1, r1, #1 + add r0, r2, r0 + add r2, r5, r1 + ldr r1, _022442E0 ; =0x0000307C + ldrh r1, [r2, r1] + bl ov16_02254EE0 + ldr r1, [r5, #0x6c] + add r4, r0, #0 + lsl r1, r1, #1 + add r2, r5, r1 + ldr r1, _022442E0 ; =0x0000307C + add r0, r5, #0 + ldrh r1, [r2, r1] + bl ov16_0225B084 + cmp r0, #0 + bne _02244250 + mov r4, #4 +_02244250: + ldr r0, [r5, #0x6c] + mov r2, #0xc0 + add r1, r0, #0 + mul r1, r2 + ldr r3, _022442E4 ; =0x00002DEC + add r6, r5, r1 + ldrh r1, [r6, r3] + cmp r1, #0 + bne _022442CA + cmp r4, #4 + beq _022442CA + add r1, r3, #0 + add r6, r6, r4 + sub r1, #0x80 + ldrb r1, [r6, r1] + cmp r1, #0 + beq _022442CA + lsl r0, r0, #1 + add r1, r5, r0 + ldr r0, _022442E0 ; =0x0000307C + ldrh r1, [r1, r0] + cmp r1, #0 + beq _022442CA + add r0, r2, #0 + add r0, #0x64 + str r1, [r5, r0] + ldr r1, [r5, #0x6c] + add r0, r2, #0 + add r0, #0x64 + add r6, r1, #0 + mul r6, r2 + ldr r0, [r5, r0] + add r1, r5, r6 + strh r0, [r1, r3] + ldr r0, [r5, #0x6c] + add r1, r0, #0 + mul r1, r2 + add r1, r5, r1 + add r0, r3, #2 + strh r4, [r1, r0] + ldr r0, [sp] + bl ov16_0223F4BC + ldr r1, _022442E8 ; =0x00002DC8 + ldr r2, [r5, #0x6c] + add r4, r5, r1 + mov r1, #0xc0 + add r5, r2, #0 + mul r5, r1 + mov r1, #5 + bl sub_020E1F6C + ldr r2, [r4, r5] + mov r0, #0x38 + bic r2, r0 + add r0, r1, #3 + lsl r0, r0, #0x1d + lsr r0, r0, #0x1a + orr r0, r2 + str r0, [r4, r5] + b _022442DC +_022442CA: + ldr r1, _022442EC ; =0x0000216C + mov r0, #0x40 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_022442DC: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022442E0: .word 0x0000307C +_022442E4: .word 0x00002DEC +_022442E8: .word 0x00002DC8 +_022442EC: .word 0x0000216C + thumb_func_end ov16_02244208 + + thumb_func_start ov16_022442F0 +ov16_022442F0: ; 0x022442F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x79 + bne _02244322 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02244322: + ldr r0, [r5, #0x64] + lsl r0, r0, #1 + add r2, r5, r0 + ldr r0, _02244498 ; =0x000030C4 + ldrh r1, [r2, r0] + cmp r1, #0 + beq _02244338 + add r0, #8 + ldrh r0, [r2, r0] + cmp r0, #0xff + bne _0224433A +_02244338: + b _02244488 +_0224433A: + add r0, r5, #0 + bl ov16_0225582C + cmp r0, #0 + beq _0224436E + ldr r0, [r5, #0x64] + lsl r0, r0, #1 + add r1, r5, r0 + ldr r0, _0224449C ; =0x000030CC + ldrh r1, [r1, r0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _022444A0 ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0xc + tst r0, r1 + beq _0224436E + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224436E: + ldr r0, [r5, #0x64] + mov r6, #0 + lsl r0, r0, #1 + add r1, r5, r0 + ldr r0, _022444A4 ; =0x000030D4 + ldrh r7, [r1, r0] +_0224437A: + add r0, sp, #0xc + str r0, [sp] + add r2, sp, #0xc + add r3, sp, #0xc + ldr r0, [sp, #4] + ldr r1, _022444A8 ; =0x0000FFFF + add r2, #2 + add r3, #1 + bl ov16_0225588C + add r0, sp, #0xc + ldrb r0, [r0, #2] + cmp r0, r7 + bne _022443EC + add r0, sp, #0xc + ldrb r0, [r0] + cmp r0, #5 + bhi _022443EC + add r0, sp, #0xc + ldrb r4, [r0, #1] + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r4, r0 + beq _022443EC + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r4, r0 + beq _022443EC + ldr r0, [r5, #0x64] + add r3, sp, #0xc + mov r2, #0xc0 + add r1, r0, #0 + mul r1, r2 + add r0, r5, r1 + ldr r1, _022444AC ; =0x00002D64 + add sp, #0x10 + strb r4, [r0, r1] + ldr r4, [r5, #0x64] + ldrb r0, [r3, #1] + add r6, r4, #0 + mul r6, r2 + add r4, r5, r6 + add r1, r1, #1 + strb r0, [r4, r1] + ldrb r0, [r3, #1] + add r2, #0x70 + str r0, [r5, r2] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022443EC: + mov r0, #0xfa + add r6, r6, #1 + lsl r0, r0, #2 + cmp r6, r0 + blt _0224437A + add r0, sp, #0xc + mov r6, #0 + str r0, [sp] + add r2, sp, #0xc + add r3, sp, #0xc + ldr r0, [sp, #4] + add r1, r6, #0 + add r2, #2 + add r3, #1 + bl ov16_0225588C + cmp r0, #1 + bne _02244488 +_02244410: + add r0, sp, #0xc + ldrb r0, [r0, #2] + cmp r0, r7 + bne _0224446E + add r0, sp, #0xc + ldrb r0, [r0] + cmp r0, #5 + bhi _0224446E + add r0, sp, #0xc + ldrb r4, [r0, #1] + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r4, r0 + beq _0224446E + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r4, r0 + beq _0224446E + ldr r0, [r5, #0x64] + add r3, sp, #0xc + mov r2, #0xc0 + add r1, r0, #0 + mul r1, r2 + add r0, r5, r1 + ldr r1, _022444AC ; =0x00002D64 + add sp, #0x10 + strb r4, [r0, r1] + ldr r4, [r5, #0x64] + ldrb r0, [r3, #1] + add r6, r4, #0 + mul r6, r2 + add r4, r5, r6 + add r1, r1, #1 + strb r0, [r4, r1] + ldrb r0, [r3, #1] + add r2, #0x70 + str r0, [r5, r2] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224446E: + add r0, sp, #0xc + add r6, r6, #1 + str r0, [sp] + add r2, sp, #0xc + add r3, sp, #0xc + ldr r0, [sp, #4] + add r1, r6, #0 + add r2, #2 + add r3, #1 + bl ov16_0225588C + cmp r0, #1 + beq _02244410 +_02244488: + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244498: .word 0x000030C4 +_0224449C: .word 0x000030CC +_022444A0: .word 0x00002DB0 +_022444A4: .word 0x000030D4 +_022444A8: .word 0x0000FFFF +_022444AC: .word 0x00002D64 + thumb_func_end ov16_022442F0 + + thumb_func_start ov16_022444B0 +ov16_022444B0: ; 0x022444B0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + mov r0, #0 + add r6, r1, #0 + mvn r0, r0 + str r0, [sp, #8] + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + mov ip, r0 + ldr r1, [r6, #0x64] + mov r0, #0xc0 + mul r0, r1 + str r0, [sp, #4] + add r3, r6, r0 + ldr r0, _022445C0 ; =0x00002DB0 + ldr r1, [r3, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r1 + bne _02244502 + ldr r0, [r6, #0x6c] + lsl r0, r0, #1 + add r1, r6, r0 + ldr r0, _022445C4 ; =0x000030AC + ldrh r7, [r1, r0] + cmp r7, #0xa5 + beq _02244502 + cmp r7, #0xa6 + beq _02244502 + mov r0, #7 + lsl r0, r0, #6 + cmp r7, r0 + beq _02244502 + cmp r7, #0 + bne _0224450C +_02244502: + add r0, r6, #0 + mov r1, ip + bl ov16_02248AF0 + b _022445BA +_0224450C: + mov r0, #0 + add r1, r3, #0 + add r2, r0, #0 +_02244512: + ldr r4, _022445C8 ; =0x00002D4C + ldrh r4, [r1, r4] + cmp r4, #0xa6 + beq _02244524 + ldr r4, _022445C8 ; =0x00002D4C + add r5, r3, r2 + ldrh r4, [r5, r4] + cmp r7, r4 + beq _02244544 +_02244524: + ldr r4, _022445C8 ; =0x00002D4C + add r5, r3, r2 + ldrh r4, [r5, r4] + cmp r4, #0xa6 + bne _0224453A + mov r5, #0 + ldr r4, [sp, #8] + mvn r5, r5 + cmp r4, r5 + bne _0224453A + str r0, [sp, #8] +_0224453A: + add r0, r0, #1 + add r1, r1, #2 + add r2, r2, #2 + cmp r0, #4 + blt _02244512 +_02244544: + cmp r0, #4 + bne _022445B2 + ldr r0, [sp, #4] + add r1, r6, r0 + ldr r0, [sp, #8] + lsl r0, r0, #1 + add r1, r1, r0 + ldr r0, _022445C8 ; =0x00002D4C + strh r7, [r1, r0] + ldr r1, [r6, #0x6c] + ldr r3, [r6, #0x64] + lsl r1, r1, #1 + add r2, r6, r1 + ldr r1, _022445C4 ; =0x000030AC + add r0, #0x20 + ldrh r1, [r2, r1] + lsl r1, r1, #4 + add r2, r6, r1 + mov r1, #0xf9 + lsl r1, r1, #2 + ldrb r1, [r2, r1] + mov r2, #0xc0 + mul r2, r3 + add r3, r6, r2 + ldr r2, [sp, #8] + add r2, r3, r2 + strb r1, [r2, r0] + ldr r0, [sp] + ldr r2, [r6, #0x64] + add r1, r6, #0 + bl ov16_022662FC + ldr r0, [r6, #0x6c] + lsl r0, r0, #1 + add r1, r6, r0 + ldr r0, _022445C4 ; =0x000030AC + ldrh r1, [r1, r0] + mov r0, #0x49 + lsl r0, r0, #2 + str r1, [r6, r0] + ldr r1, [r6, r0] + add r0, #0x5f + cmp r1, r0 + bne _022445BA + ldr r0, _022445CC ; =0x00002DCC + ldr r1, [r6, #0x64] + add r3, r6, r0 + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, [r3, r2] + ldr r0, _022445D0 ; =0xFFFFE3FF + and r0, r1 + str r0, [r3, r2] + b _022445BA +_022445B2: + add r0, r6, #0 + mov r1, ip + bl ov16_02248AF0 +_022445BA: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022445C0: .word 0x00002DB0 +_022445C4: .word 0x000030AC +_022445C8: .word 0x00002D4C +_022445CC: .word 0x00002DCC +_022445D0: .word 0xFFFFE3FF + thumb_func_end ov16_022444B0 + + thumb_func_start ov16_022445D4 +ov16_022445D4: ; 0x022445D4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + mov r7, #0 + str r0, [sp, #8] + add r6, r7, #0 + add r4, r7, #0 +_022445F2: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r0, r5, r0 + add r1, r4, r0 + ldr r0, _0224469C ; =0x00002D4C + ldrh r0, [r1, r0] + bl ov16_02255918 + cmp r0, #0 + bne _02244632 + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r0, r5, r0 + add r1, r4, r0 + ldr r0, _0224469C ; =0x00002D4C + ldrh r1, [r1, r0] + mov r0, #0x42 + lsl r0, r0, #2 + cmp r1, r0 + beq _02244632 + cmp r1, #0xfd + beq _02244632 + add r0, #0xb8 + cmp r1, r0 + beq _02244632 + add r0, r5, #0 + bl ov16_0225582C + cmp r0, #0 + beq _0224463A +_02244632: + add r0, r6, #0 + bl sub_020787CC + orr r7, r0 +_0224463A: + add r6, r6, #1 + add r4, r4, #2 + cmp r6, #4 + blt _022445F2 + mov r0, #2 + mvn r0, r0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [r5, #0x64] + add r1, r5, #0 + add r3, r7, #0 + bl ov16_02254A6C + add r4, r0, #0 + cmp r4, #0xf + bne _02244664 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 + b _02244696 +_02244664: + mov r7, #0x1e +_02244666: + ldr r0, [sp, #4] + bl ov16_0223F4BC + lsr r1, r0, #0x1f + lsl r0, r0, #0x1e + sub r0, r0, r1 + ror r0, r7 + add r6, r1, r0 + add r0, r6, #0 + bl sub_020787CC + tst r0, r4 + bne _02244666 + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + add r2, r5, r2 + lsl r0, r6, #1 + add r2, r2, r0 + ldr r0, _0224469C ; =0x00002D4C + add r1, #0x64 + ldrh r0, [r2, r0] + str r0, [r5, r1] +_02244696: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224469C: .word 0x00002D4C + thumb_func_end ov16_022445D4 + + thumb_func_start ov16_022446A0 +ov16_022446A0: ; 0x022446A0 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _022446E4 ; =0x00002D8C + add r2, r4, r0 + ldr r0, [r2, r1] + add r1, r1, #4 + ldr r1, [r2, r1] + mov r2, #0x40 + bl sub_0208C0BC + ldr r3, _022446E8 ; =0x0226E584 + mov r2, #0 +_022446C6: + ldrb r1, [r3] + cmp r0, r1 + ble _022446D4 + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #6 + blo _022446C6 +_022446D4: + ldr r0, _022446EC ; =0x0226E585 + lsl r1, r2, #1 + ldrb r1, [r0, r1] + ldr r0, _022446F0 ; =0x00002154 + str r1, [r4, r0] + mov r0, #0 + pop {r4, pc} + nop +_022446E4: .word 0x00002D8C +_022446E8: .word 0x0226E584 +_022446EC: .word 0x0226E585 +_022446F0: .word 0x00002154 + thumb_func_end ov16_022446A0 + + thumb_func_start ov16_022446F4 +ov16_022446F4: ; 0x022446F4 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + ldr r2, [r5, #0x6c] + add r4, r0, #0 + lsl r0, r2, #1 + add r1, r5, r0 + ldr r0, _02244790 ; =0x0000307C + ldrh r1, [r1, r0] + cmp r1, #0 + beq _02244782 + mov r0, #0xb5 + lsl r0, r0, #6 + mov r3, #0xc0 + add r0, r5, r0 + mul r3, r2 + add r0, r0, r3 + bl ov16_02254EE0 + add r2, r0, #0 + cmp r2, #4 + beq _02244740 + ldr r0, [r5, #0x6c] + mov r1, #0xc0 + mul r1, r0 + add r1, r5, r1 + add r3, r1, r2 + ldr r1, _02244794 ; =0x00002D6C + ldrb r3, [r3, r1] + cmp r3, #0 + bne _0224474A +_02244740: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _0224478A +_0224474A: + mov r1, #4 + cmp r3, #4 + bge _02244752 + add r1, r3, #0 +_02244752: + lsl r0, r0, #1 + add r3, r5, r0 + ldr r0, _02244790 ; =0x0000307C + ldrh r3, [r3, r0] + mov r0, #0x49 + lsl r0, r0, #2 + str r3, [r5, r0] + add r0, #0xc + str r1, [r5, r0] + ldr r0, _02244794 ; =0x00002D6C + ldr r4, [r5, #0x6c] + mov r3, #0xc0 + add r0, r5, r0 + mul r3, r4 + add r3, r0, r3 + ldrb r0, [r3, r2] + sub r0, r0, r1 + strb r0, [r3, r2] + ldr r2, [r5, #0x6c] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02253EC0 + b _0224478A +_02244782: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 +_0224478A: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02244790: .word 0x0000307C +_02244794: .word 0x00002D6C + thumb_func_end ov16_022446F4 + + thumb_func_start ov16_02244798 +ov16_02244798: ; 0x02244798 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + bl ov16_0223DF0C + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r1, #0x4d + mov r0, #0 + lsl r1, r1, #2 + ldr r2, _022448D8 ; =0x00003044 + str r0, [r5, r1] + ldr r2, [r5, r2] + cmp r2, #0xd7 + bne _02244866 + sub r1, #0x10 + str r2, [r5, r1] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x2b + beq _022447EE + ldr r2, [r5, #0x64] + mov r0, #0xc0 + add r3, r2, #0 + mul r3, r0 + ldr r2, _022448DC ; =0x00002DAC + mov r1, #0 + add r3, r5, r3 + str r1, [r3, r2] + add r1, r2, #4 + ldr r2, [r5, #0x64] + add r1, r5, r1 + mul r0, r2 + ldr r3, [r1, r0] + ldr r2, _022448E0 ; =0xF7FFFFFF + and r2, r3 + str r2, [r1, r0] + b _022447FA +_022447EE: + mov r1, #0x4d + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r0, #5 + orr r0, r2 + str r0, [r5, r1] +_022447FA: + mov r0, #2 + tst r0, r4 + beq _02244858 + add r0, r7, #0 + add r1, r5, #0 + mov r2, #0x10 + bl ov16_0224A984 + add r4, r0, #0 + bl sub_020787CC + ldr r1, _022448E4 ; =0x00003108 + ldrb r1, [r5, r1] + tst r0, r1 + bne _022448C6 + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r4, #0 + mov r3, #0x2b + bl ov16_02255AB4 + cmp r0, #0 + bne _02244842 + mov r0, #0xc0 + mul r0, r4 + ldr r1, _022448DC ; =0x00002DAC + mov r3, #0 + add r2, r5, r0 + str r3, [r2, r1] + add r1, r1, #4 + add r3, r5, r1 + ldr r2, [r3, r0] + ldr r1, _022448E0 ; =0xF7FFFFFF + and r1, r2 + str r1, [r3, r0] + b _022448C6 +_02244842: + mov r1, #0x46 + lsl r1, r1, #2 + add r0, r1, #0 + str r4, [r5, r1] + add r0, #0x1c + ldr r2, [r5, r0] + mov r0, #0xa + orr r0, r2 + add r1, #0x1c + str r0, [r5, r1] + b _022448C6 +_02244858: + mov r1, #0x4d + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r0, #8 + orr r0, r2 + str r0, [r5, r1] + b _022448C6 +_02244866: + ldr r3, [r5, #0x64] + mov r2, #0xc0 + mul r2, r3 + add r3, r5, r2 + ldr r2, _022448DC ; =0x00002DAC + str r0, [r3, r2] + add r0, r2, #4 + add r6, r5, r0 + ldr r0, [r5, #0x64] + mov r2, #0xc0 + add r3, r0, #0 + mul r3, r2 + ldr r2, [r6, r3] + ldr r0, _022448E0 ; =0xF7FFFFFF + and r0, r2 + str r0, [r6, r3] + mov r0, #2 + tst r0, r4 + beq _022448BE + add r0, r7, #0 + add r1, r5, #0 + mov r2, #0x10 + bl ov16_0224A984 + add r4, r0, #0 + bl sub_020787CC + ldr r1, _022448E4 ; =0x00003108 + ldrb r1, [r5, r1] + tst r0, r1 + bne _022448C6 + mov r0, #0xc0 + mul r0, r4 + ldr r1, _022448DC ; =0x00002DAC + mov r3, #0 + add r2, r5, r0 + str r3, [r2, r1] + add r1, r1, #4 + add r3, r5, r1 + ldr r2, [r3, r0] + ldr r1, _022448E0 ; =0xF7FFFFFF + and r1, r2 + str r1, [r3, r0] + b _022448C6 +_022448BE: + ldr r2, [r5, r1] + mov r0, #8 + orr r0, r2 + str r0, [r5, r1] +_022448C6: + ldr r3, _022448D8 ; =0x00003044 + ldr r2, [r5, #0x64] + ldr r3, [r5, r3] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_02266498 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022448D8: .word 0x00003044 +_022448DC: .word 0x00002DAC +_022448E0: .word 0xF7FFFFFF +_022448E4: .word 0x00003108 + thumb_func_end ov16_02244798 + + thumb_func_start ov16_022448E8 +ov16_022448E8: ; 0x022448E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r6, #0 + bl ov16_0223DF0C + str r0, [sp, #4] + ldr r1, [r5, #0x64] + add r0, r6, #0 + bl ov16_0223E208 + add r7, r0, #0 + ldr r1, [r5, #0x64] + add r0, r6, #0 + bl ov16_0223E208 + cmp r0, #0 + beq _02244938 + ldr r0, [sp, #4] + mov r1, #0x84 + tst r0, r1 + bne _02244938 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _022449FC +_02244938: + ldr r0, [r5, #0x64] + add r1, r5, r0 + ldr r0, _02244A04 ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + lsl r1, r7, #3 + add r2, r5, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #3 + lsr r1, r1, #0x1a + tst r0, r1 + beq _02244960 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _022449FC +_02244960: + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x79 + beq _02244978 + ldr r1, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x79 + bne _02244982 +_02244978: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _022449FC +_02244982: + ldr r2, [r5, #0x6c] + mov r0, #0xc0 + add r1, r2, #0 + mul r1, r0 + ldr r3, _02244A08 ; =0x00002DB8 + add r0, r5, r1 + ldrh r0, [r0, r3] + cmp r0, #0x70 + bne _0224499E + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _022449FC +_0224499E: + add r3, #0x14 + add r3, r5, r3 + ldr r1, [r3, r1] + lsl r3, r1, #3 + lsr r3, r3, #0x1f + bne _022449B0 + lsl r1, r1, #2 + lsr r1, r1, #0x1f + beq _022449BA +_022449B0: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _022449FC +_022449BA: + cmp r0, #0 + beq _022449D6 + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r3, #0x3c + bl ov16_02255AB4 + cmp r0, #1 + bne _022449D6 + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 + b _022449FC +_022449D6: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02244A08 ; =0x00002DB8 + ldrh r0, [r1, r0] + cmp r0, #0 + bne _022449F4 + ldr r2, [r5, #0x6c] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02255980 + cmp r0, #0 + bne _022449FC +_022449F4: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 +_022449FC: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244A04: .word 0x0000219C +_02244A08: .word 0x00002DB8 + thumb_func_end ov16_022448E8 + + thumb_func_start ov16_02244A0C +ov16_02244A0C: ; 0x02244A0C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + ldr r1, [r5, #0x64] + str r0, [sp, #8] + lsl r0, r1, #1 + add r2, r5, r0 + ldr r0, _02244B2C ; =0x0000305C + ldrh r0, [r2, r0] + cmp r0, #0xb6 + beq _02244A4C + cmp r0, #0xc5 + beq _02244A4C + cmp r0, #0xcb + beq _02244A4C + ldr r0, _02244B30 ; =0x00002DC8 + add r3, r1, #0 + mov r2, #0xc0 + add r0, r5, r0 + mul r3, r2 + ldr r2, [r0, r3] + ldr r1, _02244B34 ; =0xFFFFE7FF + and r1, r2 + str r1, [r0, r3] +_02244A4C: + ldr r0, _02244B38 ; =0x00003150 + ldr r0, [r5, r0] + cmp r0, #1 + beq _02244A5A + mov r0, #1 + str r0, [sp, #4] + b _02244A5E +_02244A5A: + mov r0, #0 + str r0, [sp, #4] +_02244A5E: + ldr r6, [r5, #0x64] + ldr r0, _02244B30 ; =0x00002DC8 + add r7, r6, #0 + add r4, r5, r0 + mov r0, #0xc0 + mul r7, r0 + ldr r0, [sp] + bl ov16_0223F4BC + ldr r1, [r4, r7] + lsl r1, r1, #0x13 + lsr r1, r1, #0x1e + lsl r2, r1, #1 + ldr r1, _02244B3C ; =0x0226E57C + ldrh r1, [r1, r2] + cmp r1, r0 + blo _02244B16 + ldr r0, [sp, #4] + cmp r0, #0 + beq _02244B16 + ldr r0, _02244B40 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02244B44 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x6f + bne _02244AAE + mov r2, #0x75 + lsl r2, r2, #2 + add r0, r5, r2 + lsl r4, r6, #6 + ldr r3, [r0, r4] + mov r1, #4 + orr r1, r3 + str r1, [r0, r4] + add r0, r5, #0 + sub r2, #0xba + add r0, #0xf6 + strh r2, [r0] +_02244AAE: + ldr r0, _02244B40 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02244B44 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x74 + bne _02244ADA + mov r2, #0x75 + ldr r1, [r5, #0x64] + lsl r2, r2, #2 + lsl r4, r1, #6 + add r0, r5, r2 + add r1, r2, #0 + ldr r3, [r0, r4] + add r1, #0x2c + orr r1, r3 + str r1, [r0, r4] + add r0, r5, #0 + sub r2, #0x1a + add r0, #0xf6 + strh r2, [r0] +_02244ADA: + add r0, r5, #0 + mov r1, #2 + add r0, #0xf5 + strb r1, [r0] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + ldr r2, [r5, #0x64] + mov r0, #0xc0 + add r1, r2, #0 + mul r1, r0 + ldr r0, _02244B30 ; =0x00002DC8 + add r0, r5, r0 + ldr r3, [r0, r1] + lsl r2, r3, #0x13 + lsr r4, r2, #0x1e + cmp r4, #3 + bhs _02244B26 + ldr r2, _02244B34 ; =0xFFFFE7FF + and r3, r2 + add r2, r4, #1 + lsl r2, r2, #0x1e + lsr r2, r2, #0x13 + orr r2, r3 + str r2, [r0, r1] + b _02244B26 +_02244B16: + ldr r1, [r4, r7] + ldr r0, _02244B34 ; =0xFFFFE7FF + and r0, r1 + str r0, [r4, r7] + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02248AF0 +_02244B26: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244B2C: .word 0x0000305C +_02244B30: .word 0x00002DC8 +_02244B34: .word 0xFFFFE7FF +_02244B38: .word 0x00003150 +_02244B3C: .word 0x0226E57C +_02244B40: .word 0x00003044 +_02244B44: .word 0x000003DE + thumb_func_end ov16_02244A0C + + thumb_func_start ov16_02244B48 +ov16_02244B48: ; 0x02244B48 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02244BB4 ; =0x00002D90 + ldr r0, [r1, r0] + mov r1, #4 + bl ov16_022563F8 + ldr r1, [r5, #0x64] + mov r2, #0xc0 + add r3, r1, #0 + mul r3, r2 + add r1, r5, r3 + ldr r3, _02244BB8 ; =0x00002D8C + ldr r1, [r1, r3] + cmp r1, r0 + bgt _02244B8A + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 + b _02244BAE +_02244B8A: + ldr r1, _02244BBC ; =0x0000215C + neg r4, r0 + str r4, [r5, r1] + ldr r1, [r5, #0x64] + add r4, r1, #0 + add r1, r3, #0 + mul r4, r2 + add r3, #0x24 + add r4, r5, r4 + add r1, #0x54 + str r0, [r4, r1] + ldr r0, [r5, #0x64] + add r3, r5, r3 + mul r2, r0 + ldr r1, [r3, r2] + ldr r0, _02244BC0 ; =0xFFFF1FFF + and r0, r1 + str r0, [r3, r2] +_02244BAE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02244BB4: .word 0x00002D90 +_02244BB8: .word 0x00002D8C +_02244BBC: .word 0x0000215C +_02244BC0: .word 0xFFFF1FFF + thumb_func_end ov16_02244B48 + + thumb_func_start ov16_02244BC4 +ov16_02244BC4: ; 0x02244BC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp] + str r1, [sp, #4] + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [sp, #4] + bl ov16_02248AD0 + str r0, [sp, #0x1c] + ldr r0, [sp] + bl ov16_0223DF0C + add r4, r0, #0 + mov r0, #1 + tst r0, r4 + bne _02244BEC + b _02244D3E +_02244BEC: + ldr r1, [sp, #4] + ldr r0, [sp] + ldr r1, [r1, #0x6c] + mov r7, #0 + bl ov16_0223DF20 + ldr r1, [sp, #4] + str r0, [sp, #0x18] + ldr r0, [sp] + ldr r1, [r1, #0x6c] + bl ov16_0223DF60 + add r6, r0, #0 + mov r0, #8 + tst r0, r4 + bne _02244C20 + mov r0, #0x10 + tst r0, r4 + beq _02244C38 + ldr r1, [sp, #4] + ldr r0, [sp] + ldr r1, [r1, #0x6c] + bl ov16_0223E208 + cmp r0, #0 + beq _02244C38 +_02244C20: + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #4] + ldr r1, [r0, #0x6c] + add r1, r0, r1 + ldr r0, _02244D58 ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #0xc] + str r0, [sp, #8] + b _02244C78 +_02244C38: + mov r0, #2 + str r0, [sp, #0x14] + tst r0, r4 + beq _02244C62 + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + ldr r1, [r0, #0x6c] + add r2, r0, r1 + ldr r0, _02244D58 ; =0x0000219C + ldrb r0, [r2, r0] + str r0, [sp, #0xc] + ldr r0, [sp] + bl ov16_0223E258 + ldr r1, [sp, #4] + add r1, r1, r0 + ldr r0, _02244D58 ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #8] + b _02244C78 +_02244C62: + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #4] + ldr r1, [r0, #0x6c] + add r1, r0, r1 + ldr r0, _02244D58 ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #0xc] + str r0, [sp, #8] +_02244C78: + ldr r5, [sp, #0x10] + add r0, r5, #0 + cmp r0, r6 + bge _02244CBA +_02244C80: + ldr r0, [sp, #0x18] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02244CB4 + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _02244CB4 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02244CB4 + add r7, r7, #1 +_02244CB4: + add r5, r5, #1 + cmp r5, r6 + blt _02244C80 +_02244CBA: + ldr r0, [sp, #0x14] + cmp r7, r0 + bgt _02244CCA + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + bl ov16_02248AF0 + b _02244D52 +_02244CCA: + ldr r0, [sp] + ldr r1, [sp, #4] + bl ov16_022559FC + cmp r0, #0 + beq _02244D34 + mov r7, #5 +_02244CD8: + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r6, #0 + bl sub_020E1F6C + ldr r0, [sp, #0x10] + add r5, r1, #0 + add r5, r5, r0 + ldr r0, [sp, #0xc] + cmp r5, r0 + beq _02244CD8 + ldr r0, [sp, #8] + cmp r5, r0 + beq _02244CD8 + ldr r0, [sp, #0x18] + add r1, r5, #0 + bl sub_0207A0FC + add r1, r7, #0 + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02244CD8 + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #1 + beq _02244CD8 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02244CD8 + ldr r0, [sp, #4] + ldr r1, [r0, #0x6c] + add r1, r0, r1 + ldr r0, _02244D5C ; =0x000021A0 + strb r5, [r1, r0] + b _02244D52 +_02244D34: + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + bl ov16_02248AF0 + b _02244D52 +_02244D3E: + ldr r0, [sp] + ldr r1, [sp, #4] + bl ov16_022559FC + cmp r0, #0 + bne _02244D52 + ldr r0, [sp, #4] + ldr r1, [sp, #0x1c] + bl ov16_02248AF0 +_02244D52: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244D58: .word 0x0000219C +_02244D5C: .word 0x000021A0 + thumb_func_end ov16_02244BC4 + + thumb_func_start ov16_02244D60 +ov16_02244D60: ; 0x02244D60 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r5, [r4, #0x64] + ldr r1, _02244F30 ; =0x00002DB0 + add r0, r5, #0 + mov r2, #0xc0 + mov r5, #2 + add r3, r4, r1 + mul r0, r2 + ldr r6, [r3, r0] + lsl r5, r5, #0x14 + orr r5, r6 + str r5, [r3, r0] + ldr r3, [r4, #0x64] + mov r0, #0 + add r5, r3, #0 + mul r5, r2 + add r3, r1, #0 + add r5, r4, r5 + add r3, #0x38 + strh r0, [r5, r3] + add r3, r1, #0 + add r3, #0x18 + ldr r6, [r4, #0x64] + add r5, r4, r3 + add r3, r6, #0 + mul r3, r2 + ldr r7, [r5, r3] + mov r6, #7 + bic r7, r6 + str r7, [r5, r3] + ldr r3, [r4, #0x6c] + add r5, r3, #0 + mul r5, r2 + add r3, r1, #0 + add r5, r4, r5 + sub r3, #8 + ldr r3, [r5, r3] + ldr r5, [r4, #0x64] + add r6, r5, #0 + mul r6, r2 + add r5, r1, #0 + add r6, r4, r6 + add r5, #0x34 + str r3, [r6, r5] + ldr r3, [r4, #0x6c] + add r5, r3, #0 + mul r5, r2 + add r3, r1, #0 + add r5, r4, r5 + add r3, #0xe + ldrb r3, [r5, r3] + ldr r5, [r4, #0x64] + add r6, r5, #0 + lsl r3, r3, #0x1c + mul r6, r2 + add r5, r1, #0 + lsr r3, r3, #0x1c + add r6, r4, r6 + add r5, #0x4a + strh r3, [r6, r5] + add r3, r1, #0 + add r3, #0x1c + ldr r6, [r4, #0x64] + add r5, r4, r3 + add r3, r6, #0 + mul r3, r2 + ldr r7, [r5, r3] + mov r6, #0x3c + bic r7, r6 + str r7, [r5, r3] + ldr r6, [r4, #0x64] + sub r1, #0x70 + add r3, r6, #0 + mul r3, r2 + ldr r7, [r5, r3] + ldr r6, _02244F34 ; =0xFFFFE3FF + and r6, r7 + str r6, [r5, r3] + add r5, r4, r1 + ldr r1, [r4, #0x64] + add r3, r1, #0 + mul r3, r2 + ldr r1, [r4, #0x6c] + add r3, r5, r3 + mul r2, r1 + add r2, r5, r2 +_02244E16: + ldrb r1, [r2, r0] + strb r1, [r3, r0] + add r0, r0, #1 + cmp r0, #0x28 + blo _02244E16 + ldr r3, [r4, #0x64] + ldr r1, _02244F38 ; =0x00002D68 + add r6, r3, #0 + mov r2, #0xc0 + add r0, r4, r1 + mul r6, r2 + ldr r5, [r0, r6] + mov r3, #1 + bic r5, r3 + str r5, [r0, r6] + ldr r3, [r4, #0x64] + add r6, r3, #0 + mul r6, r2 + ldr r5, [r0, r6] + mov r3, #2 + bic r5, r3 + str r5, [r0, r6] + ldr r3, [r4, #0x64] + add r6, r3, #0 + mul r6, r2 + ldr r5, [r0, r6] + mov r3, #4 + bic r5, r3 + str r5, [r0, r6] + ldr r3, [r4, #0x64] + add r6, r3, #0 + mul r6, r2 + ldr r5, [r0, r6] + mov r3, #8 + bic r5, r3 + str r5, [r0, r6] + ldr r3, [r4, #0x64] + add r6, r3, #0 + mul r6, r2 + ldr r5, [r0, r6] + mov r3, #0x10 + bic r5, r3 + str r5, [r0, r6] + ldr r3, [r4, #0x64] + add r6, r3, #0 + mul r6, r2 + ldr r5, [r0, r6] + mov r3, #0x20 + bic r5, r3 + str r5, [r0, r6] + ldr r5, [r4, #0x64] + add r3, r5, #0 + mul r3, r2 + ldr r6, [r0, r3] + ldr r5, _02244F3C ; =0xFFFFFEFF + and r5, r6 + str r5, [r0, r3] + ldr r5, [r4, #0x64] + add r3, r5, #0 + mul r3, r2 + ldr r6, [r0, r3] + ldr r5, _02244F40 ; =0xFFFFFDFF + and r5, r6 + str r5, [r0, r3] + ldr r5, [r4, #0x64] + add r3, r5, #0 + mul r3, r2 + ldr r6, [r0, r3] + ldr r5, _02244F44 ; =0xFFFFFBFF + and r5, r6 + str r5, [r0, r3] + add r3, r1, #0 + add r3, #0x60 + add r6, r4, r3 + ldr r3, [r4, #0x64] + add r1, #0x70 + add r5, r3, #0 + mul r5, r2 + ldr r7, [r6, r5] + ldr r3, _02244F48 ; =0xBFFFFFFF + and r3, r7 + add r7, r2, #0 + add r7, #0x90 + ldr r7, [r4, r7] + lsl r7, r7, #0x1f + lsr r7, r7, #1 + orr r3, r7 + str r3, [r6, r5] + add r3, r2, #0 + add r3, #0x90 + ldr r3, [r4, r3] + add r6, r3, #1 + ldr r3, [r4, #0x64] + add r5, r3, #0 + mul r5, r2 + add r3, r4, r5 + str r6, [r3, r1] + ldr r1, [r4, #0x64] + add r5, r1, #0 + mul r5, r2 + ldr r3, [r0, r5] + mov r1, #0x40 + bic r3, r1 + str r3, [r0, r5] + ldr r1, [r4, #0x64] + mov r6, #0 + add r3, r1, #0 + mul r3, r2 + ldr r2, [r0, r3] + mov r1, #0x80 + bic r2, r1 + str r2, [r0, r3] + mov r0, #0xf9 + add r5, r6, #0 + mov r1, #5 + lsl r0, r0, #2 +_02244EFE: + ldr r3, [r4, #0x64] + mov r2, #0xc0 + mul r2, r3 + add r3, r4, r2 + ldr r2, _02244F4C ; =0x00002D4C + add r7, r3, r5 + ldrh r2, [r7, r2] + lsl r2, r2, #4 + add r2, r4, r2 + ldrb r2, [r2, r0] + cmp r2, #5 + bhs _02244F1E + add r7, r3, r6 + ldr r3, _02244F50 ; =0x00002D6C + strb r2, [r7, r3] + b _02244F24 +_02244F1E: + ldr r2, _02244F50 ; =0x00002D6C + add r3, r3, r6 + strb r1, [r3, r2] +_02244F24: + add r6, r6, #1 + add r5, r5, #2 + cmp r6, #4 + blt _02244EFE + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244F30: .word 0x00002DB0 +_02244F34: .word 0xFFFFE3FF +_02244F38: .word 0x00002D68 +_02244F3C: .word 0xFFFFFEFF +_02244F40: .word 0xFFFFFDFF +_02244F44: .word 0xFFFFFBFF +_02244F48: .word 0xBFFFFFFF +_02244F4C: .word 0x00002D4C +_02244F50: .word 0x00002D6C + thumb_func_end ov16_02244D60 + + thumb_func_start ov16_02244F54 +ov16_02244F54: ; 0x02244F54 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + mov r2, #0x72 + mov r1, #1 + add r3, r0, #0 + eor r3, r1 + lsl r0, r3, #3 + add r5, r4, r0 + lsl r2, r2, #2 + ldr r5, [r5, r2] + lsl r5, r5, #0x1e + lsr r5, r5, #0x1e + cmp r5, #3 + bne _02244FAA + mov r0, #0xb5 + lsl r0, r0, #2 + add r2, r4, r0 + ldr r3, [r4, #0x64] + mov r0, #0x1c + mul r0, r3 + ldr r5, [r2, r0] + mov r3, #1 + bic r5, r3 + orr r1, r5 + str r1, [r2, r0] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 + b _02244FD2 +_02244FAA: + add r1, r2, #0 + sub r1, #0xc + lsl r6, r3, #2 + add r1, r4, r1 + ldr r5, [r1, r6] + mov r3, #4 + orr r3, r5 + str r3, [r1, r6] + add r2, r4, r2 + ldr r4, [r2, r0] + mov r3, #3 + add r1, r4, #0 + bic r1, r3 + lsl r3, r4, #0x1e + lsr r3, r3, #0x1e + add r4, r3, #1 + mov r3, #3 + and r3, r4 + orr r1, r3 + str r1, [r2, r0] +_02244FD2: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02244F54 + + thumb_func_start ov16_02244FD8 +ov16_02244FD8: ; 0x02244FD8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl ov16_0223E208 + lsl r0, r0, #3 + add r1, r5, r0 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1e + lsr r1, r0, #0x1e + beq _02245046 + mov r0, #0xc0 + mul r0, r4 + ldr r4, _02245054 ; =0x00002D8C + add r0, r5, r0 + ldr r2, [r0, r4] + cmp r2, #0 + beq _02245046 + mov r2, #5 + sub r1, r2, r1 + ldr r3, _02245058 ; =0x0000215C + lsl r1, r1, #1 + str r1, [r5, r3] + add r1, r4, #4 + ldr r1, [r0, r1] + sub r0, r2, #6 + mul r0, r1 + ldr r1, [r5, r3] + bl ov16_022563F8 + ldr r1, _02245058 ; =0x0000215C + str r0, [r5, r1] + b _0224504E +_02245046: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_0224504E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245054: .word 0x00002D8C +_02245058: .word 0x0000215C + thumb_func_end ov16_02244FD8 + + thumb_func_start ov16_0224505C +ov16_0224505C: ; 0x0224505C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + str r1, [sp] + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [sp] + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r4, #0 + bl ov16_0223DF1C + mov r2, #0x4d + mov r7, #0 + str r0, [sp, #4] + add r1, r0, #0 + ldr r0, [sp] + lsl r2, r2, #2 + str r1, [r0, r2] + ldr r0, [sp, #4] + add r6, r7, #0 + cmp r0, #0 + ble _022450EC + ldr r4, [sp] + ldr r1, _02245100 ; =0x00002DC8 + add r0, r4, #0 + add r5, r0, r1 +_02245098: + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x20 + tst r0, r1 + bne _022450BE + ldr r0, _02245104 ; =0x00002D8C + ldr r0, [r4, r0] + cmp r0, #0 + beq _022450BE + ldr r0, [sp] + add r2, r6, #0 + add r1, r0, #0 + ldr r1, [r1, #0x64] + mov r3, #0x2b + bl ov16_02255AB4 + cmp r0, #1 + bne _022450C2 +_022450BE: + add r7, r7, #1 + b _022450E0 +_022450C2: + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x20 + orr r1, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + str r1, [r4, r0] + ldr r1, [r5, #0] + ldr r0, _02245108 ; =0xFFFF9FFF + and r1, r0 + mov r0, #6 + lsl r0, r0, #0xc + orr r0, r1 + str r0, [r5, #0] +_022450E0: + ldr r0, [sp, #4] + add r6, r6, #1 + add r4, #0xc0 + add r5, #0xc0 + cmp r6, r0 + blt _02245098 +_022450EC: + ldr r0, [sp, #4] + cmp r7, r0 + bne _022450FA + ldr r0, [sp] + ldr r1, [sp, #8] + bl ov16_02248AF0 +_022450FA: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245100: .word 0x00002DC8 +_02245104: .word 0x00002D8C +_02245108: .word 0xFFFF9FFF + thumb_func_end ov16_0224505C + + thumb_func_start ov16_0224510C +ov16_0224510C: ; 0x0224510C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248B10 + ldr r1, _0224513C ; =0x00003104 + ldr r1, [r4, r1] + add r2, r4, r1 + ldr r1, _02245140 ; =0x000021EC + ldrb r1, [r2, r1] + str r1, [r0, #0] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0224513C: .word 0x00003104 +_02245140: .word 0x000021EC + thumb_func_end ov16_0224510C + + thumb_func_start ov16_02245144 +ov16_02245144: ; 0x02245144 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_02248B10 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_0223DF1C + ldr r1, [r6, #0] + cmp r1, r0 + bhs _02245182 + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_02245182: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02245144 + + thumb_func_start ov16_02245188 +ov16_02245188: ; 0x02245188 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0224A984 + add r4, r0, #0 + mov r0, #0x4e + mov r3, #0 + lsl r0, r0, #2 + str r3, [r5, r0] + ldr r0, _02245430 ; =0x0000215C + add r1, r4, #0 + str r3, [r5, r0] + add r0, r5, #0 + mov r2, #0x1b + bl ov16_02252060 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + add r7, r0, #0 + mov r0, #0xd + str r0, [sp] + add r0, r6, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _022451F8 + mov r0, #0x4c + str r0, [sp] + add r0, r6, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _022451FA +_022451F8: + b _02245428 +_022451FA: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0xc + tst r0, r1 + beq _02245264 + ldr r0, [sp, #4] + cmp r0, #5 + beq _02245264 + cmp r7, #5 + beq _02245264 + cmp r0, #8 + beq _02245264 + cmp r7, #8 + beq _02245264 + cmp r0, #4 + beq _02245264 + cmp r7, #4 + beq _02245264 + mov r0, #0xc0 + add r6, r4, #0 + mul r6, r0 + ldr r0, _02245434 ; =0x00002D8C + add r1, r5, r6 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02245264 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #8 + beq _02245264 + mov r3, #0xb7 + add r1, r5, r6 + lsl r3, r3, #6 + ldr r2, [r1, r3] + ldr r0, _02245438 ; =0x00040080 + tst r0, r2 + bne _02245264 + mov r0, #0xc9 + add r2, r0, #0 + add r2, #0x5b + str r0, [r5, r2] + sub r3, #0x30 + ldr r1, [r1, r3] + sub r0, #0xca + mul r0, r1 + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _02245430 ; =0x0000215C + str r0, [r5, r1] +_02245264: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x30 + tst r0, r1 + beq _022452CC + mov r0, #0xc0 + add r6, r4, #0 + mul r6, r0 + ldr r0, _02245434 ; =0x00002D8C + add r2, r5, r6 + ldr r1, [r2, r0] + cmp r1, #0 + beq _022452CC + add r0, #0x34 + ldr r1, [r2, r0] + ldr r0, _02245438 ; =0x00040080 + tst r0, r1 + bne _022452CC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x57 + beq _022452A2 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x5e + bne _022452B8 +_022452A2: + ldr r0, _0224543C ; =0x00002D90 + add r1, r5, r6 + ldr r1, [r1, r0] + mov r0, #0 + mvn r0, r0 + mul r0, r1 + mov r1, #8 + bl ov16_022563F8 + ldr r1, _02245430 ; =0x0000215C + str r0, [r5, r1] +_022452B8: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x5e + bne _022452CC + mov r0, #0x4e + mov r1, #2 + lsl r0, r0, #2 + str r1, [r5, r0] +_022452CC: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0xc0 + tst r1, r0 + beq _0224534E + ldr r1, _02245434 ; =0x00002D8C + add r6, r4, #0 + mul r6, r0 + add r0, r5, r1 + str r0, [sp, #8] + ldr r0, [r0, r6] + cmp r0, #0 + beq _0224534E + add r0, r5, r6 + add r1, #0x34 + ldr r1, [r0, r1] + ldr r0, _02245438 ; =0x00040080 + tst r0, r1 + bne _0224534E + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x73 + bne _0224531A + ldr r0, _0224543C ; =0x00002D90 + add r1, r5, r6 + ldr r0, [r1, r0] + ldr r1, [sp, #8] + ldr r1, [r1, r6] + cmp r1, r0 + bhs _0224534E + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _02245430 ; =0x0000215C + str r0, [r5, r1] + b _0224534E +_0224531A: + ldr r0, [sp, #4] + cmp r0, #0xf + beq _0224534E + cmp r7, #0xf + beq _0224534E + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x51 + beq _0224534E + ldr r1, _02245440 ; =0x00000102 + add r0, r1, #0 + add r0, #0x22 + str r1, [r5, r0] + ldr r0, _0224543C ; =0x00002D90 + add r1, r5, r6 + ldr r1, [r1, r0] + mov r0, #0 + mvn r0, r0 + mul r0, r1 + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _02245430 ; =0x0000215C + str r0, [r5, r1] +_0224534E: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #3 + tst r0, r1 + beq _02245428 + ldr r1, _02245434 ; =0x00002D8C + mov r0, #0xc0 + add r6, r4, #0 + mul r6, r0 + add r7, r5, r1 + ldr r0, [r7, r6] + cmp r0, #0 + beq _02245390 + add r1, r1, #4 + add r1, r5, r1 + str r1, [sp, #0xc] + ldr r1, [r1, r6] + cmp r0, r1 + bhs _02245390 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x2c + bne _02245390 + ldr r0, [sp, #0xc] + mov r1, #0x10 + ldr r0, [r0, r6] + bl ov16_022563F8 + ldr r1, _02245430 ; =0x0000215C + str r0, [r5, r1] +_02245390: + ldr r0, [r7, r6] + cmp r0, #0 + beq _022453BC + ldr r1, _0224543C ; =0x00002D90 + add r1, r5, r1 + str r1, [sp, #0x10] + ldr r1, [r1, r6] + cmp r0, r1 + bhs _022453BC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x57 + bne _022453BC + ldr r0, [sp, #0x10] + mov r1, #8 + ldr r0, [r0, r6] + bl ov16_022563F8 + ldr r1, _02245430 ; =0x0000215C + str r0, [r5, r1] +_022453BC: + ldr r0, [r7, r6] + cmp r0, #0 + beq _02245428 + ldr r0, _02245444 ; =0x00002DAC + add r7, r5, r0 + ldr r0, [r7, r6] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + beq _02245428 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x5d + bne _02245428 + ldr r0, [r7, r6] + mov r1, #7 + tst r1, r0 + beq _022453EC + mov r0, #0x13 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + b _02245420 +_022453EC: + ldr r1, _02245448 ; =0x00000F88 + tst r1, r0 + beq _022453FC + mov r0, #0x13 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r5, r0] + b _02245420 +_022453FC: + mov r1, #0x10 + tst r1, r0 + beq _0224540C + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r5, r0] + b _02245420 +_0224540C: + mov r1, #0x40 + tst r0, r1 + beq _0224541A + mov r0, #3 + add r1, #0xf0 + str r0, [r5, r1] + b _02245420 +_0224541A: + mov r0, #4 + add r1, #0xf0 + str r0, [r5, r1] +_02245420: + mov r0, #0x4e + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] +_02245428: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02245430: .word 0x0000215C +_02245434: .word 0x00002D8C +_02245438: .word 0x00040080 +_0224543C: .word 0x00002D90 +_02245440: .word 0x00000102 +_02245444: .word 0x00002DAC +_02245448: .word 0x00000F88 + thumb_func_end ov16_02245188 + + thumb_func_start ov16_0224544C +ov16_0224544C: ; 0x0224544C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r6, [r4, #0x64] + mov r0, #0xb5 + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x1c + add r1, r6, #0 + mul r1, r0 + ldr r3, [r2, r1] + ldr r0, _0224554C ; =0xFFFFFE3F + mov r7, #0xc0 + and r0, r3 + add r3, r6, #0 + mul r3, r7 + add r6, r4, r3 + ldr r3, _02245550 ; =0x00002DC8 + ldr r6, [r6, r3] + sub r3, #0x18 + lsl r6, r6, #0xe + lsr r6, r6, #0x1d + lsl r6, r6, #0x1d + lsr r6, r6, #0x17 + orr r0, r6 + str r0, [r2, r1] + ldr r2, [r4, #0x64] + add r0, r2, #0 + mul r0, r7 + add r0, r4, r0 + ldr r1, [r0, r3] + mov r0, #1 + lsl r0, r0, #0xc + tst r0, r1 + bne _022454BA + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02253EF0 + ldr r0, _02245550 ; =0x00002DC8 + ldr r2, [r4, #0x64] + add r1, r4, r0 + add r0, r7, #0 + mul r0, r2 + ldr r3, [r1, r0] + ldr r2, _02245554 ; =0xFFFC7FFF + and r3, r2 + mov r2, #0xa + lsl r2, r2, #0xe + orr r2, r3 + str r2, [r1, r0] +_022454BA: + ldr r1, [r4, #0x64] + ldr r0, _02245550 ; =0x00002DC8 + mov r7, #0xc0 + add r3, r1, #0 + add r6, r4, r0 + mul r3, r7 + ldr r1, [r6, r3] + ldr r2, _02245554 ; =0xFFFC7FFF + and r2, r1 + lsl r1, r1, #0xe + lsr r1, r1, #0x1d + sub r1, r1, #1 + lsl r1, r1, #0x1d + lsr r1, r1, #0xe + orr r1, r2 + str r1, [r6, r3] + ldr r2, [r4, #0x64] + add r1, r2, #0 + mul r1, r7 + add r1, r4, r1 + ldr r0, [r1, r0] + lsl r0, r0, #0xe + lsr r0, r0, #0x1d + bne _022454F2 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02253F20 +_022454F2: + ldr r0, _02245558 ; =0x00003044 + mov r2, #1 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _0224555C ; =0x000003E1 + ldrb r1, [r1, r0] + ldr r0, _02245560 ; =0x00002154 + str r1, [r4, r0] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02245550 ; =0x00002DC8 + ldr r0, [r1, r0] + lsl r0, r0, #0xe + lsr r1, r0, #0x1d + mov r0, #5 + sub r3, r0, r1 + cmp r3, #1 + ble _0224552A + ldr r0, _02245560 ; =0x00002154 +_0224551E: + ldr r1, [r4, r0] + add r2, r2, #1 + lsl r1, r1, #1 + str r1, [r4, r0] + cmp r2, r3 + blt _0224551E +_0224552A: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02245564 ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x1e + tst r0, r1 + beq _02245546 + ldr r0, _02245560 ; =0x00002154 + ldr r1, [r4, r0] + lsl r1, r1, #1 + str r1, [r4, r0] +_02245546: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224554C: .word 0xFFFFFE3F +_02245550: .word 0x00002DC8 +_02245554: .word 0xFFFC7FFF +_02245558: .word 0x00003044 +_0224555C: .word 0x000003E1 +_02245560: .word 0x00002154 +_02245564: .word 0x00002DB0 + thumb_func_end ov16_0224544C + + thumb_func_start ov16_02245568 +ov16_02245568: ; 0x02245568 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r2, [r4, #0x64] + mov r0, #0xc0 + add r1, r2, #0 + mul r1, r0 + ldr r0, _022455E4 ; =0x00002DC8 + add r0, r4, r0 + ldr r3, [r0, r1] + lsl r2, r3, #0xb + lsr r5, r2, #0x1d + cmp r5, #5 + bhs _02245598 + ldr r2, _022455E8 ; =0xFFE3FFFF + and r3, r2 + add r2, r5, #1 + lsl r2, r2, #0x1d + lsr r2, r2, #0xb + orr r2, r3 + str r2, [r0, r1] +_02245598: + ldr r0, _022455EC ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _022455F0 ; =0x000003E1 + ldrb r1, [r1, r0] + ldr r0, _022455F4 ; =0x00002154 + str r1, [r4, r0] + ldr r2, [r4, #0x64] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _022455E4 ; =0x00002DC8 + mov r0, #1 + ldr r1, [r2, r1] + lsl r1, r1, #0xb + lsr r1, r1, #0x1d + cmp r1, #1 + bls _022455DE + ldr r3, _022455F4 ; =0x00002154 + ldr r2, _022455E4 ; =0x00002DC8 + mov r1, #0xc0 +_022455C4: + ldr r5, [r4, r3] + add r0, r0, #1 + lsl r5, r5, #1 + str r5, [r4, r3] + ldr r5, [r4, #0x64] + add r6, r5, #0 + mul r6, r1 + add r5, r4, r6 + ldr r5, [r5, r2] + lsl r5, r5, #0xb + lsr r5, r5, #0x1d + cmp r0, r5 + blo _022455C4 +_022455DE: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_022455E4: .word 0x00002DC8 +_022455E8: .word 0xFFE3FFFF +_022455EC: .word 0x00003044 +_022455F0: .word 0x000003E1 +_022455F4: .word 0x00002154 + thumb_func_end ov16_02245568 + + thumb_func_start ov16_022455F8 +ov16_022455F8: ; 0x022455F8 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r3, r0, #0 + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + mov r5, #0xc0 + add r1, r0, #0 + mul r1, r5 + ldr r6, _02245674 ; =0x00002DBE + add r1, r4, r1 + ldrb r0, [r1, r6] + lsl r0, r0, #0x1c + lsr r2, r0, #0x1c + add r0, r5, #0 + add r0, #0x58 + ldr r0, [r4, r0] + mul r5, r0 + add r5, r4, r5 + ldrb r5, [r5, r6] + lsl r5, r5, #0x1c + lsr r5, r5, #0x1c + cmp r5, r2 + beq _0224564A + sub r6, #0xe + ldr r6, [r1, r6] + mov r1, #0xf + lsl r1, r1, #0x10 + tst r1, r6 + bne _0224564A + cmp r5, #2 + beq _0224564A + cmp r2, #2 + bne _02245654 +_0224564A: + add r0, r4, #0 + add r1, r3, #0 + bl ov16_02248AF0 + b _0224566E +_02245654: + bl sub_020787CC + ldr r1, _02245678 ; =0x00002DB0 + mov r2, #0xc0 + add r1, r4, r1 + add r4, #0x94 + ldr r3, [r4, #0] + lsl r0, r0, #0x10 + add r4, r3, #0 + mul r4, r2 + ldr r2, [r1, r4] + orr r0, r2 + str r0, [r1, r4] +_0224566E: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02245674: .word 0x00002DBE +_02245678: .word 0x00002DB0 + thumb_func_end ov16_022455F8 + + thumb_func_start ov16_0224567C +ov16_0224567C: ; 0x0224567C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + mov r5, #0x6f + add r2, r0, #0 + lsl r5, r5, #2 + add r1, r4, r5 + lsl r0, r2, #2 + ldr r6, [r1, r0] + mov r3, #8 + tst r3, r6 + beq _022456C0 + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02248AF0 + ldr r1, _02245704 ; =0x0000216C + mov r0, #0x40 + ldr r2, [r4, r1] + orr r0, r2 + str r0, [r4, r1] + b _02245700 +_022456C0: + mov r3, #8 + orr r3, r6 + str r3, [r1, r0] + add r5, #8 + lsl r0, r2, #3 + add r1, r4, r5 + ldr r3, [r1, r0] + ldr r2, _02245708 ; =0xFFF1FFFF + and r3, r2 + mov r2, #0xa + lsl r2, r2, #0x10 + orr r2, r3 + str r2, [r1, r0] + ldr r3, [r1, r0] + ldr r2, _0224570C ; =0xFFFE7FFF + and r3, r2 + ldr r2, [r4, #0x64] + lsl r2, r2, #0x1e + lsr r2, r2, #0xf + orr r2, r3 + str r2, [r1, r0] + add r0, r4, #0 + mov r1, #1 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + ldr r1, [r4, #0x64] + add r0, #0xf8 + str r1, [r0, #0] + mov r0, #0xc6 + add r4, #0xf6 + strh r0, [r4] +_02245700: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245704: .word 0x0000216C +_02245708: .word 0xFFF1FFFF +_0224570C: .word 0xFFFE7FFF + thumb_func_end ov16_0224567C + + thumb_func_start ov16_02245710 +ov16_02245710: ; 0x02245710 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_0223F4BC + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x66 + bge _0224573C + ldr r0, _02245778 ; =0x00002154 + mov r1, #0x28 + str r1, [r4, r0] + b _02245772 +_0224573C: + cmp r0, #0xb2 + bge _02245748 + ldr r0, _02245778 ; =0x00002154 + mov r1, #0x50 + str r1, [r4, r0] + b _02245772 +_02245748: + cmp r0, #0xcc + bge _02245754 + ldr r0, _02245778 ; =0x00002154 + mov r1, #0x78 + str r1, [r4, r0] + b _02245772 +_02245754: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224577C ; =0x00002D90 + ldr r0, [r1, r0] + mov r1, #4 + bl ov16_022563F8 + ldr r1, _02245780 ; =0x0000215C + str r0, [r4, r1] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02245772: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02245778: .word 0x00002154 +_0224577C: .word 0x00002D90 +_02245780: .word 0x0000215C + thumb_func_end ov16_02245710 + + thumb_func_start ov16_02245784 +ov16_02245784: ; 0x02245784 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, _02245824 ; =0x00003120 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _02245814 + add r0, r5, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + ldr r0, _02245824 ; =0x00003120 + strb r1, [r4, r0] + ldrb r1, [r4, r0] + cmp r1, #5 + bhs _022457BC + ldr r1, _02245828 ; =0x00002154 + mov r2, #0xa + str r2, [r4, r1] + mov r1, #4 + strb r1, [r4, r0] + b _02245814 +_022457BC: + cmp r1, #0xf + bhs _022457CC + ldr r1, _02245828 ; =0x00002154 + mov r2, #0x1e + str r2, [r4, r1] + mov r1, #5 + strb r1, [r4, r0] + b _02245814 +_022457CC: + cmp r1, #0x23 + bhs _022457DC + ldr r1, _02245828 ; =0x00002154 + mov r2, #0x32 + str r2, [r4, r1] + mov r1, #6 + strb r1, [r4, r0] + b _02245814 +_022457DC: + cmp r1, #0x41 + bhs _022457EC + ldr r1, _02245828 ; =0x00002154 + mov r2, #0x46 + str r2, [r4, r1] + mov r1, #7 + strb r1, [r4, r0] + b _02245814 +_022457EC: + cmp r1, #0x55 + bhs _022457FC + ldr r1, _02245828 ; =0x00002154 + mov r2, #0x5a + str r2, [r4, r1] + mov r1, #8 + strb r1, [r4, r0] + b _02245814 +_022457FC: + cmp r1, #0x5f + ldr r1, _02245828 ; =0x00002154 + bhs _0224580C + mov r2, #0x6e + str r2, [r4, r1] + mov r1, #9 + strb r1, [r4, r0] + b _02245814 +_0224580C: + mov r2, #0x96 + str r2, [r4, r1] + mov r1, #0xa + strb r1, [r4, r0] +_02245814: + ldr r0, _02245824 ; =0x00003120 + ldrb r1, [r4, r0] + mov r0, #0x13 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02245824: .word 0x00003120 +_02245828: .word 0x00002154 + thumb_func_end ov16_02245784 + + thumb_func_start ov16_0224582C +ov16_0224582C: ; 0x0224582C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r4, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_02255B10 + cmp r0, #0 + bne _02245876 + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 + b _0224588A +_02245876: + cmp r7, #1 + bne _0224588A + mov r0, #0x4f + lsl r0, r0, #2 + add r3, r5, r0 + lsl r2, r4, #2 + ldr r1, [r3, r2] + mov r0, #1 + orr r0, r1 + str r0, [r3, r2] +_0224588A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224582C + + thumb_func_start ov16_02245890 +ov16_02245890: ; 0x02245890 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, [r4, #0x64] + bl ov16_0223E208 + ldr r1, [r4, #0x64] + mov r6, #0xe + ldr r5, _022459CC ; =0x00002DB0 + add r2, r1, #0 + mov r3, #0xc0 + mul r2, r3 + add r1, r4, r5 + ldr r7, [r1, r2] + lsl r6, r6, #0xc + tst r6, r7 + beq _022458EC + ldr r0, _022459D0 ; =0xFFFF1FFF + and r0, r7 + str r0, [r1, r2] + ldr r0, [r4, #0x64] + mov r2, #0x74 + add r1, r0, #0 + add r0, r5, #0 + mul r1, r3 + add r1, r4, r1 + add r0, #0x1c + ldr r0, [r1, r0] + add r5, #0x3a + lsl r0, r0, #0x18 + lsr r1, r0, #0x1e + add r0, r3, #0 + add r0, #0x58 + str r1, [r4, r0] + ldr r0, [r4, #0x64] + add r1, r0, #0 + mul r1, r3 + add r0, r4, r1 + ldrh r0, [r0, r5] + add r3, #0x64 + mov r1, #1 + str r0, [r4, r3] + add r0, r4, #0 + bl ov16_02248B08 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022458EC: + add r5, #0x10 + add r5, r4, r5 + ldr r1, [r5, r2] + mov r6, #4 + tst r6, r1 + beq _02245922 + mov r0, #4 + bic r1, r0 + str r1, [r5, r2] + ldr r0, [r4, #0x64] + add r2, r0, #0 + mul r2, r3 + ldr r1, [r5, r2] + mov r0, #3 + bic r1, r0 + str r1, [r5, r2] + mov r1, #0x49 + add r0, r1, #0 + add r0, #0xdb + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x75 + bl ov16_02248B08 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02245922: + mov r1, #0x72 + lsl r1, r1, #2 + add r6, r4, r1 + lsl r5, r0, #3 + ldr r2, [r6, r5] + lsl r3, r2, #0x1e + lsr r3, r3, #0x1e + beq _0224595E + sub r1, #0xc + lsl r3, r0, #2 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #4 + bic r2, r0 + str r2, [r1, r3] + ldr r1, [r6, r5] + mov r0, #3 + bic r1, r0 + str r1, [r6, r5] + mov r1, #0xbf + add r0, r1, #0 + add r0, #0x65 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x75 + bl ov16_02248B08 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224595E: + lsl r2, r2, #0x1c + lsr r2, r2, #0x1e + beq _02245992 + add r2, r1, #0 + sub r2, #0xc + lsl r7, r0, #2 + add r3, r4, r2 + ldr r2, [r3, r7] + ldr r0, _022459D4 ; =0xFFFFFBFF + and r0, r2 + str r0, [r3, r7] + ldr r2, [r6, r5] + mov r0, #0xc + bic r2, r0 + add r0, r1, #0 + str r2, [r6, r5] + sub r0, #0x42 + sub r1, #0xa4 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x75 + bl ov16_02248B08 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02245992: + add r2, r1, #0 + sub r2, #0xc + add r2, r4, r2 + lsl r0, r0, #2 + ldr r6, [r2, r0] + mov r5, #0x80 + add r3, r6, #0 + tst r3, r5 + beq _022459BE + mov r3, #0x80 + bic r6, r3 + str r6, [r2, r0] + sub r1, #0xa + add r5, #0xa4 + str r1, [r4, r5] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x75 + bl ov16_02248B08 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022459BE: + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022459CC: .word 0x00002DB0 +_022459D0: .word 0xFFFF1FFF +_022459D4: .word 0xFFFFFBFF + thumb_func_end ov16_02245890 + + thumb_func_start ov16_022459D8 +ov16_022459D8: ; 0x022459D8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + ldr r0, _02245A70 ; =0x000080FF + tst r0, r1 + beq _02245A1A + mov r0, #0xd + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02245A1A + mov r0, #0x4c + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02245A2E +_02245A1A: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02245A74 ; =0x00002D90 + ldr r0, [r1, r0] + lsr r1, r0, #1 + ldr r0, _02245A78 ; =0x0000215C + str r1, [r4, r0] + b _02245A6A +_02245A2E: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x30 + tst r0, r1 + ldr r1, [r4, #0x64] + beq _02245A56 + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02245A74 ; =0x00002D90 + ldr r1, [r1, r0] + mov r0, #0x14 + mul r0, r1 + mov r1, #0x1e + bl ov16_022563F8 + ldr r1, _02245A78 ; =0x0000215C + str r0, [r4, r1] + b _02245A6A +_02245A56: + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02245A74 ; =0x00002D90 + ldr r0, [r1, r0] + mov r1, #4 + bl ov16_022563F8 + ldr r1, _02245A78 ; =0x0000215C + str r0, [r4, r1] +_02245A6A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02245A70: .word 0x000080FF +_02245A74: .word 0x00002D90 +_02245A78: .word 0x0000215C + thumb_func_end ov16_022459D8 + + thumb_func_start ov16_02245A7C +ov16_02245A7C: ; 0x02245A7C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, _02245B5C ; =0x00002D54 + ldr r1, [r4, #0x64] + add r3, r4, r0 + mov r0, #0xc0 + mul r0, r1 + ldr r1, [r3, r0] + mov r5, #2 + lsl r0, r1, #2 + lsr r0, r0, #0x1b + and r0, r5 + lsl r2, r0, #4 + lsl r0, r1, #7 + lsr r0, r0, #0x1b + and r0, r5 + lsl r7, r0, #3 + lsl r0, r1, #0xc + lsr r0, r0, #0x1b + and r0, r5 + lsl r0, r0, #2 + mov ip, r0 + lsl r0, r1, #0x11 + lsr r0, r0, #0x1b + and r0, r5 + lsl r6, r0, #1 + lsl r0, r1, #0x1b + lsr r0, r0, #0x1b + lsl r1, r1, #0x16 + and r0, r5 + lsr r1, r1, #0x1b + lsr r0, r0, #1 + and r1, r5 + orr r0, r1 + add r1, r6, #0 + orr r1, r0 + mov r0, ip + orr r0, r1 + orr r0, r7 + add r1, r2, #0 + orr r1, r0 + ldr r0, _02245B60 ; =0x00002154 + str r1, [r4, r0] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r5, [r3, r0] + lsl r0, r5, #2 + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r6, r0, #0x1a + lsl r0, r5, #7 + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r3, r0, #0x1b + lsl r0, r5, #0xc + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r2, r0, #0x1c + lsl r0, r5, #0x11 + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r7, r0, #0x1d + lsl r0, r5, #0x1b + lsr r1, r0, #0x1b + mov r0, #1 + and r0, r1 + lsl r1, r5, #0x16 + lsr r1, r1, #0x1b + lsl r1, r1, #0x1f + lsr r1, r1, #0x1e + orr r0, r1 + orr r0, r7 + orr r0, r2 + orr r0, r3 + add r1, r6, #0 + orr r1, r0 + ldr r0, _02245B60 ; =0x00002154 + add r0, #0xc + str r1, [r4, r0] + ldr r0, _02245B60 ; =0x00002154 + ldr r1, [r4, r0] + mov r0, #0x28 + mul r0, r1 + mov r1, #0x3f + bl sub_020E1F6C + ldr r1, _02245B60 ; =0x00002154 + add r0, #0x1e + str r0, [r4, r1] + add r1, #0xc + ldr r1, [r4, r1] + mov r0, #0xf + mul r0, r1 + mov r1, #0x3f + bl sub_020E1F6C + add r1, r0, #1 + ldr r0, _02245B64 ; =0x00002160 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #9 + blt _02245B56 + add r1, r1, #1 + str r1, [r4, r0] +_02245B56: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245B5C: .word 0x00002D54 +_02245B60: .word 0x00002154 +_02245B64: .word 0x00002160 + thumb_func_end ov16_02245A7C + + thumb_func_start ov16_02245B68 +ov16_02245B68: ; 0x02245B68 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r2, _02245BC0 ; =0x00002D58 + mov r1, #0 + mov r3, #0xc0 + add r5, r2, #0 +_02245B7C: + ldr r6, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r6 + ldr r6, [r4, #0x64] + add r0, r4, r0 + add r0, r1, r0 + add r7, r6, #0 + mul r7, r3 + add r6, r4, r7 + add r6, r1, r6 + ldrsb r0, [r0, r2] + add r1, r1, #1 + cmp r1, #8 + strb r0, [r6, r5] + blt _02245B7C + ldr r0, [r4, #0x64] + ldr r6, [r4, #0x6c] + mov r3, #0xc0 + add r1, r0, #0 + ldr r5, _02245BC4 ; =0x00002DB0 + mul r1, r3 + mul r3, r6 + add r2, r4, r5 + add r3, r4, r3 + ldr r4, [r3, r5] + mov r3, #1 + lsl r3, r3, #0x14 + ldr r0, [r2, r1] + and r3, r4 + orr r0, r3 + str r0, [r2, r1] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245BC0: .word 0x00002D58 +_02245BC4: .word 0x00002DB0 + thumb_func_end ov16_02245B68 + + thumb_func_start ov16_02245BC8 +ov16_02245BC8: ; 0x02245BC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + ldr r1, [r4, #0x6c] + add r2, r0, #0 + mov r0, #0x62 + add r3, r4, r1 + lsl r0, r0, #2 + ldrb r0, [r3, r0] + cmp r0, #0 + bne _02245CA0 + add r0, r7, #0 + bl ov16_0223E208 + mov r1, #0x6f + lsl r1, r1, #2 + lsl r3, r0, #2 + add r5, r4, r1 + ldr r2, [r5, r3] + mov r0, #0x10 + orr r0, r2 + str r0, [r5, r3] + ldr r0, [r4, #0x6c] + add r2, r1, #0 + add r6, r4, r0 + sub r2, #0x34 + mov r0, #3 + strb r0, [r6, r2] + ldr r0, _02245CB0 ; =0x00003044 + ldr r6, [r4, r0] + ldr r0, [r4, #0x6c] + lsl r0, r0, #1 + add r2, r4, r0 + add r0, r1, #0 + sub r0, #0x2c + strh r6, [r2, r0] + ldr r2, [r4, #0x6c] + ldr r0, [r4, #0x64] + lsl r2, r2, #2 + add r2, r4, r2 + sub r1, #0x24 + str r0, [r2, r1] + mov r0, #3 + lsl r0, r0, #7 + ldr r0, [r4, r0] + ldr r2, _02245CB0 ; =0x00003044 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0x64] + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [r4, #0x6c] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r2, [r4, r2] + ldr r3, [r5, r3] + add r0, r7, #0 + bl ov16_0225A280 + mov r1, #0 + add r2, r0, #0 + mvn r1, r1 + mul r2, r1 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0225AEB8 + ldr r1, [r4, #0x6c] + lsl r1, r1, #2 + add r2, r4, r1 + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0x64] + lsl r0, r0, #6 + add r2, r4, r0 + add r0, r1, #0 + add r0, #0x2c + ldr r0, [r2, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _02245CA8 + ldr r0, [r4, #0x6c] + add r5, r4, r1 + lsl r4, r0, #2 + ldr r1, [r5, r4] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + str r0, [r5, r4] + b _02245CA8 +_02245CA0: + add r0, r4, #0 + add r1, r2, #0 + bl ov16_02248AF0 +_02245CA8: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245CB0: .word 0x00003044 + thumb_func_end ov16_02245BC8 + + thumb_func_start ov16_02245CB4 +ov16_02245CB4: ; 0x02245CB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0224A984 + add r6, r0, #0 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_0224B3E8 + str r0, [sp] + ldr r2, [sp, #0xc] + add r0, r5, #0 + add r1, r4, #0 + add r3, r6, #0 + bl ov16_0224B9F4 + ldr r0, _02245D2C ; =0x0000216C + ldr r1, [r4, r0] + ldr r0, _02245D30 ; =0x001FD849 + tst r0, r1 + beq _02245D24 + ldr r1, [sp, #8] + add r0, r4, #0 + bl ov16_02248AF0 +_02245D24: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245D2C: .word 0x0000216C +_02245D30: .word 0x001FD849 + thumb_func_end ov16_02245CB4 + + thumb_func_start ov16_02245D34 +ov16_02245D34: ; 0x02245D34 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #0 + bl ov16_02255C00 + cmp r0, #0 + beq _02245D62 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02245D62: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02245D34 + + thumb_func_start ov16_02245D68 +ov16_02245D68: ; 0x02245D68 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r5, #0x64] + add r0, r7, #0 + bl ov16_0223DF60 + ldr r1, _02245FA0 ; =0x0000217D + str r0, [sp] + ldrb r0, [r5, r1] + cmp r0, #0 + bne _02245DFC + mov r0, #2 + strb r0, [r5, r1] + add r0, r1, #0 + mov r2, #0xfd + add r0, #0xb + str r2, [r5, r0] + mov r2, #0 + add r0, r1, #2 + strb r2, [r5, r0] + add r6, r1, #2 +_02245D9E: + ldr r2, _02245FA4 ; =0x0000217F + ldr r1, [r5, #0x64] + ldrb r2, [r5, r2] + add r0, r7, #0 + bl ov16_0223DFAC + ldr r1, _02245FA4 ; =0x0000217F + add r4, r0, #0 + ldrb r3, [r5, r1] + ldr r1, [r5, #0x64] + add r2, r5, r1 + ldr r1, _02245FA8 ; =0x0000219C + ldrb r1, [r2, r1] + cmp r3, r1 + beq _02245DFC + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02245DF4 + add r0, r4, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02245DF4 + add r0, r4, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02245FAC ; =0x000001EE + cmp r0, r1 + beq _02245DF4 + add r0, r4, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02245DFC +_02245DF4: + ldrb r0, [r5, r6] + add r0, r0, #1 + strb r0, [r5, r6] + b _02245D9E +_02245DFC: + ldr r2, _02245FA4 ; =0x0000217F + ldr r1, [r5, #0x64] + ldrb r2, [r5, r2] + add r0, r7, #0 + bl ov16_0223DFAC + add r4, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + add r0, r4, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r4, r0, #0 + ldr r0, [sp, #4] + add r1, r6, #0 + mov r2, #1 + bl sub_020759CC + ldr r1, _02245FB0 ; =0x00002144 + ldr r2, _02245FB4 ; =0x00003044 + str r0, [r5, r1] + ldr r2, [r5, r2] + ldr r0, [r5, r1] + lsl r2, r2, #4 + add r3, r5, r2 + ldr r2, _02245FB8 ; =0x000003E1 + ldrb r2, [r3, r2] + mul r2, r0 + str r2, [r5, r1] + lsl r0, r4, #1 + mov r1, #5 + bl sub_020E1F6C + ldr r1, _02245FB0 ; =0x00002144 + add r0, r0, #2 + ldr r2, [r5, r1] + mul r0, r2 + str r0, [r5, r1] + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + mov r1, #0xb5 + add r2, r5, r0 + lsl r1, r1, #6 + ldrh r0, [r2, r1] + add r1, #0x26 + ldrb r1, [r2, r1] + mov r2, #2 + lsl r1, r1, #0x1b + lsr r1, r1, #0x1b + bl sub_020759CC + add r1, r0, #0 + ldr r0, _02245FB0 ; =0x00002144 + ldr r0, [r5, r0] + bl sub_020E2178 + ldr r1, _02245FB0 ; =0x00002144 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0x32 + bl sub_020E1F6C + ldr r1, _02245FB0 ; =0x00002144 + str r0, [r5, r1] + ldr r0, [r5, r1] + add r0, r0, #2 + str r0, [r5, r1] + add r0, r1, #0 + add r0, #0xc + ldr r2, [r5, r1] + ldr r0, [r5, r0] + mul r0, r2 + str r0, [r5, r1] + ldr r0, [r5, #0x64] + lsl r0, r0, #6 + add r2, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r2, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _02245EC8 + ldr r1, [r5, r1] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, _02245FB0 ; =0x00002144 + str r0, [r5, r1] +_02245EC8: + ldr r2, _02245FB0 ; =0x00002144 + add r0, r7, #0 + ldr r2, [r5, r2] + add r1, r5, #0 + bl ov16_0225AEB8 + ldr r1, _02245FB0 ; =0x00002144 + str r0, [r5, r1] + mov r0, #0 + ldr r2, [r5, r1] + mvn r0, r0 + mul r0, r2 + str r0, [r5, r1] + add r0, r5, #0 + add r3, r1, #0 + ldr r2, _02245FBC ; =0x000001E1 + add r0, #0xf6 + strh r2, [r0] + add r0, r5, #0 + mov r2, #2 + add r0, #0xf5 + strb r2, [r0] + add r3, #0x3b + ldrb r3, [r5, r3] + ldr r0, [r5, #0x64] + add r6, r1, #0 + lsl r3, r3, #8 + orr r3, r0 + add r0, r5, #0 + add r0, #0xf8 + str r3, [r0, #0] + add r0, r1, #0 + add r0, #0x3b + ldrb r0, [r5, r0] + add r6, #0x3b + add r3, r0, #1 + add r0, r1, #0 + add r0, #0x3b + strb r3, [r5, r0] + add r0, r1, #0 + add r0, #0x38 + strb r2, [r5, r0] + add r0, r1, #0 + add r0, #0x3b + ldrb r2, [r5, r0] + ldr r0, [sp] + cmp r2, r0 + bge _02245F92 +_02245F28: + ldr r1, [r5, #0x64] + add r0, r7, #0 + bl ov16_0223DFAC + ldr r1, _02245FA4 ; =0x0000217F + add r4, r0, #0 + ldrb r3, [r5, r1] + ldr r1, [r5, #0x64] + add r2, r5, r1 + ldr r1, _02245FA8 ; =0x0000219C + ldrb r1, [r2, r1] + cmp r3, r1 + beq _02245F98 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02245F7A + add r0, r4, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02245F7A + add r0, r4, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02245FAC ; =0x000001EE + cmp r0, r1 + beq _02245F7A + add r0, r4, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02245F98 +_02245F7A: + ldrb r0, [r5, r6] + add r0, r0, #1 + strb r0, [r5, r6] + ldr r0, _02245FA4 ; =0x0000217F + ldrb r2, [r5, r0] + ldr r0, [sp] + cmp r2, r0 + blt _02245F28 + ldr r0, _02245FC0 ; =0x0000217C + mov r1, #1 + strb r1, [r5, r0] + b _02245F98 +_02245F92: + mov r0, #1 + add r1, #0x38 + strb r0, [r5, r1] +_02245F98: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245FA0: .word 0x0000217D +_02245FA4: .word 0x0000217F +_02245FA8: .word 0x0000219C +_02245FAC: .word 0x000001EE +_02245FB0: .word 0x00002144 +_02245FB4: .word 0x00003044 +_02245FB8: .word 0x000003E1 +_02245FBC: .word 0x000001E1 +_02245FC0: .word 0x0000217C + thumb_func_end ov16_02245D68 + + thumb_func_start ov16_02245FC4 +ov16_02245FC4: ; 0x02245FC4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + mov r1, #0x71 + lsl r1, r1, #2 + mov r2, #1 + add r1, r4, r1 + lsl r0, r0, #3 + ldr r3, [r1, r0] + lsl r2, r2, #0x14 + orr r2, r3 + str r2, [r1, r0] + ldr r3, [r1, r0] + ldr r2, _02246000 ; =0xFF9FFFFF + and r3, r2 + ldr r2, [r4, #0x64] + lsl r2, r2, #0x1e + lsr r2, r2, #9 + orr r2, r3 + str r2, [r1, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02246000: .word 0xFF9FFFFF + thumb_func_end ov16_02245FC4 + + thumb_func_start ov16_02246004 +ov16_02246004: ; 0x02246004 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _0224608E + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0x10 + bl ov16_0224A984 + add r4, r0, #0 + bl sub_020787CC + ldr r1, _0224609C ; =0x00003108 + ldrb r1, [r5, r1] + tst r0, r1 + bne _02246084 + lsl r0, r4, #4 + add r1, r5, r0 + ldr r0, _022460A0 ; =0x000021A8 + ldr r0, [r1, r0] + cmp r0, #0x27 + beq _02246084 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _022460A4 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02246084 + ldr r0, [r5, #0x64] + mov r2, #0x75 + lsl r0, r0, #6 + add r0, r5, r0 + lsl r2, r2, #2 + ldr r0, [r0, r2] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + bne _02246084 + add r1, r5, r2 + lsl r0, r4, #6 + ldr r3, [r1, r0] + lsl r3, r3, #0x1c + lsr r3, r3, #0x1f + bne _02246084 + sub r2, #0xbc + str r4, [r5, r2] + ldr r3, [r1, r0] + mov r2, #8 + orr r2, r3 + str r2, [r1, r0] + b _02246096 +_02246084: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02248AF0 + b _02246096 +_0224608E: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02246096: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_0224609C: .word 0x00003108 +_022460A0: .word 0x000021A8 +_022460A4: .word 0x00002D8C + thumb_func_end ov16_02246004 + + thumb_func_start ov16_022460A8 +ov16_022460A8: ; 0x022460A8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r5, #0 + bl ov16_0223DF0C + str r0, [sp, #8] + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + str r0, [sp] + ldr r1, [r4, #0x6c] + add r0, r5, #0 + bl ov16_0223E208 + add r7, r0, #0 + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + cmp r0, #0 + beq _02246102 + ldr r0, [sp, #8] + mov r1, #0x84 + tst r0, r1 + bne _02246102 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 + b _022461A0 +_02246102: + ldr r0, [r4, #0x64] + add r1, r4, r0 + ldr r0, _022461A8 ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + ldr r1, [sp] + lsl r1, r1, #3 + add r2, r4, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #3 + lsr r1, r1, #0x1a + tst r0, r1 + bne _02246140 + ldr r0, [r4, #0x6c] + add r1, r4, r0 + ldr r0, _022461A8 ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + lsl r1, r7, #3 + add r2, r4, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #3 + lsr r1, r1, #0x1a + tst r0, r1 + beq _0224614A +_02246140: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 + b _022461A0 +_0224614A: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + add r3, r4, r2 + ldr r2, _022461AC ; =0x00002DB8 + ldrh r3, [r3, r2] + cmp r3, #0 + bne _02246168 + ldr r3, [r4, #0x6c] + mul r0, r3 + add r0, r4, r0 + ldrh r0, [r0, r2] + cmp r0, #0 + beq _0224617E +_02246168: + add r0, r4, #0 + bl ov16_022559DC + cmp r0, #0 + beq _0224617E + ldr r1, [r4, #0x6c] + add r0, r4, #0 + bl ov16_022559DC + cmp r0, #0 + bne _02246188 +_0224617E: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 + b _022461A0 +_02246188: + ldr r1, [r4, #0x64] + ldr r2, [r4, #0x6c] + add r0, r4, #0 + mov r3, #0x3c + bl ov16_02255AB4 + cmp r0, #1 + bne _022461A0 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02248AF0 +_022461A0: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022461A8: .word 0x0000219C +_022461AC: .word 0x00002DB8 + thumb_func_end ov16_022460A8 + + thumb_func_start ov16_022461B0 +ov16_022461B0: ; 0x022461B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + mov r2, #0x63 + lsl r2, r2, #2 + ldr r3, [r4, #0x64] + add r5, r4, r2 + add r1, r0, #0 + ldrb r0, [r5, r3] + cmp r0, #0 + beq _022461DA + add r0, r4, #0 + bl ov16_02248AF0 + b _022461EA +_022461DA: + mov r0, #2 + strb r0, [r5, r3] + ldr r0, [r4, #0x64] + add r2, #0x2c + add r1, r4, r0 + ldr r0, _022461F0 ; =0x0000219C + ldrb r0, [r1, r0] + strb r0, [r1, r2] +_022461EA: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022461F0: .word 0x0000219C + thumb_func_end ov16_022461B0 + + thumb_func_start ov16_022461F4 +ov16_022461F4: ; 0x022461F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + str r0, [sp] + str r1, [sp, #4] + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [sp, #4] + bl ov16_02248AD0 + ldr r1, [sp, #4] + str r0, [sp, #0x14] + ldr r0, [sp] + ldr r1, [r1, #0x64] + mov r7, #0 + bl ov16_0223DF60 + str r0, [sp, #0xc] + add r0, r7, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + cmp r0, #0 + ble _022462A2 + add r5, sp, #0x18 +_02246226: + ldr r0, [sp, #4] + ldr r1, [r0, #0x64] + add r2, r0, r1 + ldr r0, _022462D0 ; =0x0000219C + ldrb r2, [r2, r0] + ldr r0, [sp, #0x10] + cmp r0, r2 + beq _02246296 + ldr r0, [sp] + ldr r2, [sp, #0x10] + bl ov16_0223DFAC + mov r1, #0xae + mov r2, #0 + str r0, [sp, #8] + bl sub_02074470 + cmp r0, #0 + beq _02246296 + ldr r0, [sp, #8] + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _022462D4 ; =0x000001EE + cmp r0, r1 + beq _02246296 + mov r4, #0 +_0224625E: + add r1, r4, #0 + ldr r0, [sp, #8] + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r6, #0 + bl ov16_02255918 + cmp r0, #0 + bne _02246290 + ldr r1, [sp, #4] + ldr r0, [sp] + add r2, r1, #0 + ldr r2, [r2, #0x64] + add r3, r6, #0 + bl ov16_0225B02C + cmp r0, #1 + bne _02246290 + strh r6, [r5] + add r5, r5, #2 + add r7, r7, #1 +_02246290: + add r4, r4, #1 + cmp r4, #4 + blt _0224625E +_02246296: + ldr r0, [sp, #0x10] + add r1, r0, #1 + ldr r0, [sp, #0xc] + str r1, [sp, #0x10] + cmp r1, r0 + blt _02246226 +_022462A2: + cmp r7, #0 + beq _022462C2 + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r7, #0 + bl sub_020E1F6C + lsl r1, r1, #1 + add r0, sp, #0x18 + ldrh r2, [r0, r1] + mov r1, #0x49 + ldr r0, [sp, #4] + lsl r1, r1, #2 + str r2, [r0, r1] + b _022462CA +_022462C2: + ldr r0, [sp, #4] + ldr r1, [sp, #0x14] + bl ov16_02248AF0 +_022462CA: + mov r0, #0 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022462D0: .word 0x0000219C +_022462D4: .word 0x000001EE + thumb_func_end ov16_022461F4 + + thumb_func_start ov16_022462D8 +ov16_022462D8: ; 0x022462D8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + mov r4, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _02246306 +_022462FA: + add r0, r5, #0 + add r4, r4, #1 + bl ov16_0223DF1C + cmp r4, r0 + blt _022462FA +_02246306: + ldr r0, _02246330 ; =0x00003150 + ldr r0, [r6, r0] + cmp r0, #1 + bne _02246318 + add r0, r6, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _0224632A +_02246318: + mov r0, #0x75 + lsl r0, r0, #2 + add r3, r6, r0 + ldr r0, [r6, #0x64] + lsl r2, r0, #6 + ldr r1, [r3, r2] + mov r0, #0x10 + orr r0, r1 + str r0, [r3, r2] +_0224632A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02246330: .word 0x00003150 + thumb_func_end ov16_022462D8 + + thumb_func_start ov16_02246334 +ov16_02246334: ; 0x02246334 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r5, #0x64] + add r0, r6, #0 + bl ov16_0223E208 + add r1, r5, #0 + ldr r4, [r5, #0x64] + add r1, #0x84 + str r4, [r1, #0] + ldr r1, [r5, #0x6c] + lsl r0, r0, #3 + str r1, [r5, #0x64] + mov r1, #0x71 + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _0224637E + lsl r0, r0, #9 + lsr r0, r0, #0x1e + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + ldr r1, _022463DC ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _0224637E + str r0, [r5, #0x6c] + b _022463CA +_0224637E: + ldr r0, _022463E0 ; =0x00003044 + ldr r3, [r5, r0] + lsl r0, r3, #4 + add r1, r5, r0 + ldr r0, _022463E4 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #4 + beq _02246392 + cmp r0, #8 + bne _02246396 +_02246392: + str r4, [r5, #0x6c] + b _022463CA +_02246396: + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + lsl r3, r3, #0x10 + ldr r2, [r5, #0x64] + add r0, r6, #0 + add r1, r5, #0 + lsr r3, r3, #0x10 + bl ov16_02253954 + mov r1, #0xb5 + lsl r1, r1, #2 + add r2, r5, r1 + mov r1, #0x1c + mul r1, r0 + ldr r1, [r2, r1] + lsl r2, r1, #0x1e + lsr r2, r2, #0x1f + bne _022463C4 + lsl r1, r1, #0x1d + lsr r1, r1, #0x1f + beq _022463C8 +_022463C4: + str r0, [r5, #0x6c] + b _022463CA +_022463C8: + str r4, [r5, #0x6c] +_022463CA: + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r5, r1] + mov r0, #8 + orr r0, r2 + str r0, [r5, r1] + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022463DC: .word 0x00002D8C +_022463E0: .word 0x00003044 +_022463E4: .word 0x000003E6 + thumb_func_end ov16_02246334 + + thumb_func_start ov16_022463E8 +ov16_022463E8: ; 0x022463E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r5, #0x64] + ldr r0, [r5, #0x6c] + lsl r4, r1, #6 + add r2, r5, r4 + lsl r1, r0, #2 + add r2, r2, r1 + mov r1, #0x76 + lsl r1, r1, #2 + ldr r1, [r2, r1] + cmp r1, #0 + beq _0224641A + bl sub_020787CC + mov r1, #0x7b + add r2, r5, r4 + lsl r1, r1, #2 + ldr r1, [r2, r1] + tst r0, r1 + bne _02246440 +_0224641A: + ldr r0, [r5, #0x6c] + add r2, r5, r4 + lsl r1, r0, #2 + add r2, r2, r1 + mov r1, #0x1f + lsl r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, #0 + beq _02246448 + bl sub_020787CC + ldr r1, [r5, #0x64] + lsl r1, r1, #6 + add r2, r5, r1 + mov r1, #0x81 + lsl r1, r1, #2 + ldr r1, [r2, r1] + tst r0, r1 + beq _02246448 +_02246440: + ldr r0, _02246454 ; =0x00002158 + mov r1, #0x14 + str r1, [r5, r0] + b _0224644E +_02246448: + ldr r0, _02246454 ; =0x00002158 + mov r1, #0xa + str r1, [r5, r0] +_0224644E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02246454: .word 0x00002158 + thumb_func_end ov16_022463E8 + + thumb_func_start ov16_02246458 +ov16_02246458: ; 0x02246458 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r1, [r4, #0x6c] + add r0, r5, #0 + bl ov16_0223E208 + lsl r1, r0, #2 + add r2, r4, r1 + mov r1, #0x6f + lsl r1, r1, #2 + ldr r2, [r2, r1] + mov r1, #1 + tst r1, r2 + bne _0224648C + mov r1, #2 + tst r1, r2 + beq _022464BC +_0224648C: + mov r5, #0x6f + lsl r5, r5, #2 + add r2, r4, r5 + lsl r1, r0, #2 + ldr r6, [r2, r1] + mov r3, #1 + bic r6, r3 + str r6, [r2, r1] + ldr r6, [r2, r1] + mov r3, #2 + bic r6, r3 + add r5, #8 + str r6, [r2, r1] + lsl r2, r0, #3 + add r3, r4, r5 + ldr r1, [r3, r2] + mov r0, #0x1c + bic r1, r0 + str r1, [r3, r2] + ldr r1, [r3, r2] + ldr r0, _022464C8 ; =0xFFFFFC7F + and r0, r1 + str r0, [r3, r2] + b _022464C4 +_022464BC: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_022464C4: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022464C8: .word 0xFFFFFC7F + thumb_func_end ov16_02246458 + + thumb_func_start ov16_022464CC +ov16_022464CC: ; 0x022464CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + mov r0, #0xb7 + lsl r0, r0, #6 + add r3, r4, r0 + ldr r0, [r4, #0x6c] + mov r5, #0xc0 + add r2, r0, #0 + mul r2, r5 + ldr r0, [r3, r2] + lsl r5, r5, #5 + tst r5, r0 + beq _022464FE + add r0, r4, #0 + bl ov16_02248AF0 + b _02246506 +_022464FE: + mov r1, #1 + lsl r1, r1, #0xc + orr r0, r1 + str r0, [r3, r2] +_02246506: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022464CC + + thumb_func_start ov16_0224650C +ov16_0224650C: ; 0x0224650C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r1, [r5, #0x6c] + add r0, r4, #0 + bl ov16_0223E208 + add r4, r0, #0 + ldr r2, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r1, r5, r0 + ldr r0, _02246618 ; =0x00002DB8 + ldrh r0, [r1, r0] + cmp r0, #0 + beq _02246586 + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r3, #0x3c + bl ov16_02255AB4 + cmp r0, #1 + bne _02246586 + add r0, r5, #0 + ldr r1, _0224661C ; =0x000002CA + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x25 + add r0, #0xf5 + strb r1, [r0] + ldr r1, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + ldr r0, [r5, #0x6c] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02246620 ; =0x00002D67 + add r2, r5, r2 + ldrb r2, [r2, r0] + add r0, r5, #0 + add r0, #0xfc + str r2, [r0, #0] + ldr r0, _02246624 ; =0x00003044 + add r1, #0x40 + ldr r0, [r5, r0] + str r0, [r5, r1] + b _02246614 +_02246586: + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02246618 ; =0x00002DB8 + ldrh r0, [r1, r0] + cmp r0, #0 + beq _0224660C + mov r1, #0x8a + add r0, r5, #0 + lsl r1, r1, #2 + add r0, #0xf6 + strh r1, [r0] + add r0, r5, #0 + mov r1, #0x21 + add r0, #0xf5 + strb r1, [r0] + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + ldr r1, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02255560 + add r1, r5, #0 + add r1, #0xfc + str r0, [r1, #0] + ldr r0, [r5, #0x6c] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + add r0, r5, r2 + ldr r2, _02246618 ; =0x00002DB8 + ldrh r3, [r0, r2] + add r0, r1, #0 + add r0, #0x40 + str r3, [r5, r0] + ldr r3, [r5, #0x6c] + mov r0, #0 + mul r1, r3 + add r1, r5, r1 + strh r0, [r1, r2] + ldr r0, [r5, #0x6c] + add r1, r5, r0 + ldr r0, _02246628 ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + mov r1, #0x71 + lsl r1, r1, #2 + add r3, r5, r1 + lsl r2, r4, #3 + ldr r4, [r3, r2] + ldr r1, _0224662C ; =0xE07FFFFF + and r1, r4 + lsl r4, r4, #3 + lsr r4, r4, #0x1a + orr r0, r4 + lsl r0, r0, #0x1a + lsr r0, r0, #3 + orr r0, r1 + str r0, [r3, r2] + b _02246614 +_0224660C: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02246614: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02246618: .word 0x00002DB8 +_0224661C: .word 0x000002CA +_02246620: .word 0x00002D67 +_02246624: .word 0x00003044 +_02246628: .word 0x0000219C +_0224662C: .word 0xE07FFFFF + thumb_func_end ov16_0224650C + + thumb_func_start ov16_02246630 +ov16_02246630: ; 0x02246630 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, _02246678 ; =0x00002154 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02246674 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _0224667C ; =0x00003044 + ldr r1, [r4, r1] + lsl r1, r1, #4 + add r2, r4, r1 + ldr r1, _02246680 ; =0x000003E1 + ldrb r3, [r2, r1] + ldr r1, _02246684 ; =0x00002D8C + add r2, r4, r0 + ldr r0, [r2, r1] + add r1, r1, #4 + ldr r1, [r2, r1] + mul r0, r3 + bl sub_020E2178 + ldr r1, _02246678 ; =0x00002154 + str r0, [r4, r1] + ldr r0, [r4, r1] + cmp r0, #0 + bne _02246674 + mov r0, #1 + str r0, [r4, r1] +_02246674: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02246678: .word 0x00002154 +_0224667C: .word 0x00003044 +_02246680: .word 0x000003E1 +_02246684: .word 0x00002D8C + thumb_func_end ov16_02246630 + + thumb_func_start ov16_02246688 +ov16_02246688: ; 0x02246688 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r1, #0 + str r0, [sp] + add r0, r7, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r7, #0 + bl ov16_02248AD0 + str r0, [sp, #0x14] + ldr r0, [sp] + ldr r1, [r7, #0x64] + mov r2, #0 + bl ov16_0223E2A4 + add r4, r0, #0 + ldr r0, [sp] + ldr r1, [r7, #0x64] + mov r2, #2 + bl ov16_0223E2A4 + mov r6, #0xb7 + add r3, r0, #0 + lsl r6, r6, #6 + add r1, r4, #0 + mov r0, #0xc0 + mov r4, #1 + add r2, r7, r6 + mul r1, r0 + ldr r5, [r2, r1] + lsl r4, r4, #0x1e + orr r5, r4 + str r5, [r2, r1] + add r1, r3, #0 + mul r1, r0 + ldr r3, [r2, r1] + orr r3, r4 + str r3, [r2, r1] + ldr r1, [r7, #0x64] + mul r0, r1 + add r0, r7, r0 + ldr r2, [r0, r6] + lsr r0, r4, #0x11 + tst r0, r2 + beq _022466F0 + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl ov16_02248AF0 + b _02246794 +_022466F0: + ldr r0, [sp] + bl ov16_0223E208 + str r0, [sp, #0x10] + ldr r0, [sp] + bl ov16_0223DF1C + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + cmp r0, #0 + ble _0224676A + str r7, [sp, #4] +_0224670C: + ldr r0, [sp] + ldr r1, [sp, #0xc] + bl ov16_0223E208 + ldr r1, [sp, #0x10] + cmp r1, r0 + beq _02246758 + mov r2, #0 + ldr r0, _0224679C ; =0x00002D4C + add r4, r2, #0 +_02246720: + ldr r1, [r7, #0x64] + mov r6, #0xc0 + mul r6, r1 + add r1, r7, r6 + add r6, r1, r4 + ldr r1, _0224679C ; =0x00002D4C + ldr r5, [sp, #4] + ldrh r6, [r6, r1] + mov r3, #0 +_02246732: + ldrh r1, [r5, r0] + cmp r6, r1 + bne _02246740 + cmp r6, #0 + beq _02246740 + cmp r1, #0 + bne _02246748 +_02246740: + add r3, r3, #1 + add r5, r5, #2 + cmp r3, #4 + blt _02246732 +_02246748: + cmp r3, #4 + bne _02246754 + add r2, r2, #1 + add r4, r4, #2 + cmp r2, #4 + blt _02246720 +_02246754: + cmp r3, #4 + bne _0224676A +_02246758: + ldr r0, [sp, #4] + add r0, #0xc0 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp, #8] + str r1, [sp, #0xc] + cmp r1, r0 + blt _0224670C +_0224676A: + ldr r1, [sp, #0xc] + ldr r0, [sp, #8] + cmp r1, r0 + bne _0224677C + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl ov16_02248AF0 + b _02246794 +_0224677C: + mov r0, #0xb7 + ldr r1, [r7, #0x64] + lsl r0, r0, #6 + add r3, r7, r0 + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + mov r0, #2 + ldr r1, [r3, r2] + lsl r0, r0, #0xc + orr r0, r1 + str r0, [r3, r2] +_02246794: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224679C: .word 0x00002D4C + thumb_func_end ov16_02246688 + + thumb_func_start ov16_022467A0 +ov16_022467A0: ; 0x022467A0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + ldr r1, [r4, #0x6c] + add r0, r7, #0 + bl ov16_0223E208 + ldr r5, [r4, #0x74] + mov r0, #0xc0 + mul r0, r5 + add r1, r4, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0xe + tst r0, r1 + beq _02246838 + ldr r1, [r4, #0x64] + add r0, r7, #0 + bl ov16_0223E208 + add r6, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0223E208 + cmp r6, r0 + beq _02246838 + ldr r6, [r4, #0x64] + mov r1, #0xc0 + add r0, r6, #0 + mul r0, r1 + ldr r2, _02246844 ; =0x00002D8C + add r5, r4, r0 + ldr r0, [r5, r2] + cmp r0, #0 + beq _02246838 + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r3, [r4, r0] + cmp r3, #0xa5 + beq _02246838 + lsl r3, r6, #1 + add r3, r4, r3 + add r0, #0x7c + ldrh r0, [r3, r0] + add r3, r2, #0 + mov r6, #0 + add r5, r5, r0 + sub r3, #0x20 + strb r6, [r5, r3] + ldr r3, [r4, #0x64] + lsl r0, r0, #1 + add r5, r3, #0 + mul r5, r1 + add r3, r4, r5 + add r0, r3, r0 + sub r2, #0x40 + ldrh r0, [r0, r2] + add r1, #0x64 + str r0, [r4, r1] + ldr r2, [r4, #0x64] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_02253EC0 + b _02246840 +_02246838: + ldr r1, [sp] + add r0, r4, #0 + bl ov16_02248AF0 +_02246840: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246844: .word 0x00002D8C + thumb_func_end ov16_022467A0 + + thumb_func_start ov16_02246848 +ov16_02246848: ; 0x02246848 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + mov r4, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _02246876 +_0224686A: + add r0, r5, #0 + add r4, r4, #1 + bl ov16_0223DF1C + cmp r4, r0 + blt _0224686A +_02246876: + ldr r0, _022468A0 ; =0x00003150 + ldr r0, [r6, r0] + cmp r0, #1 + bne _02246888 + add r0, r6, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _0224689A +_02246888: + mov r0, #0x75 + lsl r0, r0, #2 + add r3, r6, r0 + ldr r0, [r6, #0x64] + lsl r2, r0, #6 + ldr r1, [r3, r2] + mov r0, #0x20 + orr r0, r1 + str r0, [r3, r2] +_0224689A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022468A0: .word 0x00003150 + thumb_func_end ov16_02246848 + + thumb_func_start ov16_022468A4 +ov16_022468A4: ; 0x022468A4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _022468F0 ; =0x00002D60 + ldr r5, _022468F4 ; =0x0226E5F0 + ldr r3, [r2, r1] + ldr r1, _022468F8 ; =0x0000FFFF + mov r0, #0 +_022468C2: + ldrh r2, [r5] + cmp r2, r3 + bge _022468D2 + add r5, r5, #4 + ldrh r2, [r5] + add r0, r0, #1 + cmp r2, r1 + bne _022468C2 +_022468D2: + lsl r2, r0, #2 + ldr r0, _022468F4 ; =0x0226E5F0 + ldrh r1, [r0, r2] + ldr r0, _022468F8 ; =0x0000FFFF + cmp r1, r0 + beq _022468E4 + ldr r0, _022468FC ; =0x0226E5F2 + ldrh r1, [r0, r2] + b _022468E6 +_022468E4: + mov r1, #0x78 +_022468E6: + ldr r0, _02246900 ; =0x00002154 + str r1, [r4, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022468F0: .word 0x00002D60 +_022468F4: .word 0x0226E5F0 +_022468F8: .word 0x0000FFFF +_022468FC: .word 0x0226E5F2 +_02246900: .word 0x00002154 + thumb_func_end ov16_022468A4 + + thumb_func_start ov16_02246904 +ov16_02246904: ; 0x02246904 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #0xd + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _022469AC + mov r0, #0x4c + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _022469AC + mov r1, #6 + lsl r1, r1, #6 + ldr r2, [r4, r1] + ldr r0, _022469B0 ; =0x000080FF + tst r0, r2 + ldr r0, _022469B4 ; =0x00003044 + beq _0224699E + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r2, r4, r0 + ldr r0, _022469B8 ; =0x000003E1 + ldrb r0, [r2, r0] + lsl r2, r0, #1 + ldr r0, _022469BC ; =0x00002154 + str r2, [r4, r0] + ldr r2, [r4, r1] + mov r1, #3 + tst r1, r2 + beq _02246966 + mov r1, #0xb + add r0, #0xc + str r1, [r4, r0] +_02246966: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0xc + tst r0, r1 + beq _02246978 + ldr r0, _022469C0 ; =0x00002160 + mov r1, #5 + str r1, [r4, r0] +_02246978: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x30 + tst r0, r1 + beq _0224698A + ldr r0, _022469C0 ; =0x00002160 + mov r1, #0xa + str r1, [r4, r0] +_0224698A: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0xc0 + tst r0, r1 + beq _022469AC + ldr r0, _022469C0 ; =0x00002160 + mov r1, #0xf + str r1, [r4, r0] + b _022469AC +_0224699E: + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _022469B8 ; =0x000003E1 + ldrb r1, [r1, r0] + ldr r0, _022469BC ; =0x00002154 + str r1, [r4, r0] +_022469AC: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022469B0: .word 0x000080FF +_022469B4: .word 0x00003044 +_022469B8: .word 0x000003E1 +_022469BC: .word 0x00002154 +_022469C0: .word 0x00002160 + thumb_func_end ov16_02246904 + + thumb_func_start ov16_022469C4 +ov16_022469C4: ; 0x022469C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #0x10] + ldr r0, [sp] + bl ov16_0223DF1C + mov r7, #0 + str r0, [sp, #0xc] + cmp r0, #0 + bgt _022469EC + b _02246AFE +_022469EC: + mov r0, #0xb5 + lsl r0, r0, #6 + add r0, r5, r0 + str r5, [sp, #8] + add r4, r5, #0 + str r0, [sp, #4] +_022469F8: + ldr r1, [sp, #8] + ldr r0, _02246B40 ; =0x000021A8 + ldr r0, [r1, r0] + cmp r0, #0x27 + beq _02246AE6 + ldr r0, _02246B44 ; =0x00002D8C + ldr r0, [r4, r0] + cmp r0, #0 + beq _02246AE6 + ldr r0, _02246B48 ; =0x00002DAC + ldr r1, [r4, r0] + mov r0, #0x27 + tst r0, r1 + bne _02246AE6 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255EC0 + cmp r0, #0 + bne _02246AE6 + ldr r0, [sp] + add r1, r7, #0 + bl ov16_0223E208 + str r0, [sp, #0x14] + ldr r0, [sp] + ldr r1, [r5, #0x78] + bl ov16_0223E208 + ldr r1, [sp, #0x14] + cmp r1, r0 + beq _02246AE6 + ldr r0, _02246B4C ; =0x00002DEC + ldrh r6, [r4, r0] + cmp r6, #0 + beq _02246A50 + add r0, r0, #2 + ldrh r0, [r4, r0] + lsl r0, r0, #1 + add r1, r4, r0 + ldr r0, _02246B50 ; =0x00002D4C + ldrh r0, [r1, r0] + cmp r6, r0 + beq _02246A5A +_02246A50: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255570 + add r6, r0, #0 +_02246A5A: + cmp r6, #0 + beq _02246AE6 + lsl r1, r6, #0x10 + ldr r0, [sp, #4] + lsr r1, r1, #0x10 + bl ov16_02254EE0 + str r0, [sp, #0x18] + lsl r0, r6, #4 + add r1, r5, r0 + ldr r0, _02246B54 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x80 + bne _02246AE6 + ldr r0, [sp, #0x18] + add r1, r4, r0 + ldr r0, _02246B58 ; =0x00002D6C + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02246AE6 + ldr r0, _02246B58 ; =0x00002D6C + add r1, r5, r0 + mov r0, #0xc0 + mul r0, r7 + add r4, r1, r0 + ldr r0, [sp, #0x18] + ldrb r0, [r4, r0] + sub r1, r0, #1 + ldr r0, [sp, #0x18] + strb r1, [r4, r0] + ldr r1, [r5, #0x78] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x2e + bne _02246AB0 + ldr r0, [sp, #0x18] + ldrb r0, [r4, r0] + cmp r0, #0 + beq _02246AB0 + sub r1, r0, #1 + ldr r0, [sp, #0x18] + strb r1, [r4, r0] +_02246AB0: + ldr r0, [sp] + add r1, r5, #0 + bl ov16_02255F94 + str r7, [r5, #0x64] + ldr r0, [r5, #0x78] + lsl r2, r7, #1 + str r0, [r5, #0x6c] + ldr r1, _02246B5C ; =0x00002158 + mov r0, #0x14 + str r0, [r5, r1] + ldr r0, _02246B60 ; =0x00003044 + add r2, r5, r2 + str r6, [r5, r0] + add r0, #0x38 + strh r6, [r2, r0] + lsl r0, r7, #4 + mov r2, #0x27 + add r0, r5, r0 + add r1, #0x50 + str r2, [r0, r1] + ldr r0, [sp] + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02253EC0 + b _02246AFE +_02246AE6: + ldr r0, [sp, #8] + add r7, r7, #1 + add r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r4, #0xc0 + add r0, #0xc0 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + cmp r7, r0 + bge _02246AFE + b _022469F8 +_02246AFE: + ldr r0, [sp, #0xc] + cmp r7, r0 + bne _02246B0E + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02248AF0 + b _02246B3A +_02246B0E: + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02258AB8 + add r4, r0, #0 + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + cmp r4, #0x37 + beq _02246B2E + cmp r4, #0x73 + beq _02246B2E + cmp r4, #0x7d + bne _02246B3A +_02246B2E: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02246B64 ; =0x00002DF8 + strh r6, [r1, r0] +_02246B3A: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246B40: .word 0x000021A8 +_02246B44: .word 0x00002D8C +_02246B48: .word 0x00002DAC +_02246B4C: .word 0x00002DEC +_02246B50: .word 0x00002D4C +_02246B54: .word 0x000003DE +_02246B58: .word 0x00002D6C +_02246B5C: .word 0x00002158 +_02246B60: .word 0x00003044 +_02246B64: .word 0x00002DF8 + thumb_func_end ov16_022469C4 + + thumb_func_start ov16_02246B68 +ov16_02246B68: ; 0x02246B68 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [r4, #0x64] + ldr r3, _02246BA8 ; =0x00002144 + str r0, [sp] + ldr r0, [r4, #0x6c] + ldr r2, _02246BAC ; =0x00003044 + str r0, [sp, #4] + ldr r0, [r4, r3] + add r1, r4, #0 + str r0, [sp, #8] + add r0, r3, #0 + add r0, #0x28 + add r0, r4, r0 + str r0, [sp, #0xc] + add r3, #0x1c + ldr r2, [r4, r2] + ldr r3, [r4, r3] + add r0, r5, #0 + bl ov16_02254FA8 + ldr r1, _02246BA8 ; =0x00002144 + str r0, [r4, r1] + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02246BA8: .word 0x00002144 +_02246BAC: .word 0x00003044 + thumb_func_end ov16_02246B68 + + thumb_func_start ov16_02246BB0 +ov16_02246BB0: ; 0x02246BB0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + mov r6, #0 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r5, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + ldr r0, [sp] + ldr r2, [sp, #8] + add r1, r4, #0 + bl ov16_0224A984 + cmp r7, #6 + bhi _02246CA2 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246BFC: ; jump table + .short _02246C0A - _02246BFC - 2 ; case 0 + .short _02246C20 - _02246BFC - 2 ; case 1 + .short _02246C36 - _02246BFC - 2 ; case 2 + .short _02246C4C - _02246BFC - 2 ; case 3 + .short _02246C62 - _02246BFC - 2 ; case 4 + .short _02246C78 - _02246BFC - 2 ; case 5 + .short _02246C8E - _02246BFC - 2 ; case 6 +_02246C0A: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 + b _02246CA2 +_02246C20: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 + b _02246CA2 +_02246C36: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 + b _02246CA2 +_02246C4C: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 + b _02246CA2 +_02246C62: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 + b _02246CA2 +_02246C78: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 + b _02246CA2 +_02246C8E: + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + cmp r5, r0 + bne _02246CA2 + mov r6, #1 +_02246CA2: + cmp r6, #0 + beq _02246CAE + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02248AF0 +_02246CAE: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_02246BB0 + + thumb_func_start ov16_02246CB4 +ov16_02246CB4: ; 0x02246CB4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r2, [sp] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0224A984 + cmp r6, #6 + bhi _02246DA8 + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246CF4: ; jump table + .short _02246D02 - _02246CF4 - 2 ; case 0 + .short _02246D1A - _02246CF4 - 2 ; case 1 + .short _02246D32 - _02246CF4 - 2 ; case 2 + .short _02246D4A - _02246CF4 - 2 ; case 3 + .short _02246D62 - _02246CF4 - 2 ; case 4 + .short _02246D7A - _02246CF4 - 2 ; case 5 + .short _02246D92 - _02246CF4 - 2 ; case 6 +_02246D02: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #1 + bic r2, r0 + mov r0, #1 + and r0, r5 + orr r0, r2 + str r0, [r1, r3] + b _02246DA8 +_02246D1A: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #2 + bic r2, r0 + lsl r0, r5, #0x1f + lsr r0, r0, #0x1e + orr r0, r2 + str r0, [r1, r3] + b _02246DA8 +_02246D32: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #4 + bic r2, r0 + lsl r0, r5, #0x1f + lsr r0, r0, #0x1d + orr r0, r2 + str r0, [r1, r3] + b _02246DA8 +_02246D4A: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #8 + bic r2, r0 + lsl r0, r5, #0x1f + lsr r0, r0, #0x1c + orr r0, r2 + str r0, [r1, r3] + b _02246DA8 +_02246D62: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #0x10 + bic r2, r0 + lsl r0, r5, #0x1f + lsr r0, r0, #0x1b + orr r0, r2 + str r0, [r1, r3] + b _02246DA8 +_02246D7A: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #0x20 + bic r2, r0 + lsl r0, r5, #0x1f + lsr r0, r0, #0x1a + orr r0, r2 + str r0, [r1, r3] + b _02246DA8 +_02246D92: + mov r1, #0x75 + lsl r1, r1, #2 + lsl r3, r0, #6 + add r1, r4, r1 + ldr r2, [r1, r3] + mov r0, #0x40 + bic r2, r0 + lsl r0, r5, #0x1f + lsr r0, r0, #0x19 + orr r0, r2 + str r0, [r1, r3] +_02246DA8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02246CB4 + + thumb_func_start ov16_02246DAC +ov16_02246DAC: ; 0x02246DAC + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [r4, #0x6c] + ldr r1, _02246DE8 ; =0x000021F0 + lsl r0, r0, #2 + add r0, r4, r0 + ldr r2, [r0, r1] + mov r0, #0x19 + mul r0, r2 + ldr r2, [r4, #0x64] + lsl r2, r2, #2 + add r2, r4, r2 + ldr r1, [r2, r1] + bl sub_020E2178 + add r1, r0, #1 + ldr r0, _02246DEC ; =0x00002154 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0x96 + ble _02246DE2 + mov r1, #0x96 + str r1, [r4, r0] +_02246DE2: + mov r0, #0 + pop {r4, pc} + nop +_02246DE8: .word 0x000021F0 +_02246DEC: .word 0x00002154 + thumb_func_end ov16_02246DAC + + thumb_func_start ov16_02246DF0 +ov16_02246DF0: ; 0x02246DF0 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + ldr r1, [r5, #0x64] + add r0, r6, #0 + bl ov16_0223E208 + ldr r1, [r5, #0x64] + add r7, r0, #0 + lsl r1, r1, #6 + add r2, r5, r1 + mov r1, #0x83 + lsl r1, r1, #2 + ldr r1, [r2, r1] + add r0, r6, #0 + bl ov16_0223E208 + add r4, r0, #0 + ldr r0, [r5, #0x64] + mov r2, #0x82 + lsl r0, r0, #6 + add r0, r5, r0 + lsl r2, r2, #2 + ldr r1, [r0, r2] + cmp r1, #0 + beq _02246ED0 + cmp r7, r4 + beq _02246ED0 + add r2, r2, #4 + ldr r2, [r0, r2] + mov r0, #0xc0 + mul r0, r2 + add r2, r5, r0 + ldr r0, _02246EDC ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _02246ED0 + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, _02246EE0 ; =0x00002144 + str r0, [r5, r1] + mov r0, #0x71 + lsl r0, r0, #2 + add r1, r5, r0 + lsl r0, r4, #3 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _02246E7E + lsl r0, r0, #9 + lsr r0, r0, #0x1e + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + ldr r1, _02246EDC ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _02246E7E + str r0, [r5, #0x6c] + b _02246E8C +_02246E7E: + ldr r0, [r5, #0x64] + lsl r0, r0, #6 + add r1, r5, r0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r1, r0] + str r0, [r5, #0x6c] +_02246E8C: + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02246EDC ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + bne _02246EC4 + ldr r2, [r5, #0x64] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02257028 + mov r1, #0xc0 + mul r1, r0 + str r0, [r5, #0x6c] + ldr r0, _02246EDC ; =0x00002D8C + add r1, r5, r1 + ldr r0, [r1, r0] + cmp r0, #0 + bne _02246EC4 + mov r2, #0x26 + str r2, [r5, #0xc] + add r0, r5, #0 + mov r1, #1 + add r2, #0xf3 + bl ov16_02248B00 +_02246EC4: + ldr r1, [r5, #0x64] + ldr r2, [r5, #0x6c] + add r0, r5, #0 + bl ov16_0225B408 + b _02246ED8 +_02246ED0: + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 +_02246ED8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246EDC: .word 0x00002D8C +_02246EE0: .word 0x00002144 + thumb_func_end ov16_02246DF0 + + thumb_func_start ov16_02246EE4 +ov16_02246EE4: ; 0x02246EE4 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r0, [r4, #0x6c] + ldr r1, _02246F20 ; =0x000021A8 + lsl r0, r0, #4 + add r0, r4, r0 + ldr r0, [r0, r1] + cmp r0, #0x27 + ldr r0, _02246F24 ; =0x00003044 + bne _02246F0E + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r2, r4, r0 + ldr r0, _02246F28 ; =0x000003E1 + ldrb r0, [r2, r0] + lsl r0, r0, #1 + b _02246F18 +_02246F0E: + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r2, r4, r0 + ldr r0, _02246F28 ; =0x000003E1 + ldrb r0, [r2, r0] +_02246F18: + sub r1, #0x54 + str r0, [r4, r1] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02246F20: .word 0x000021A8 +_02246F24: .word 0x00003044 +_02246F28: .word 0x000003E1 + thumb_func_end ov16_02246EE4 + + thumb_func_start ov16_02246F2C +ov16_02246F2C: ; 0x02246F2C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + lsl r0, r1, #1 + add r1, r4, r0 + ldr r0, _02246F60 ; =0x000030BC + ldrh r0, [r1, r0] + add r1, r2, r0 + ldr r0, _02246F64 ; =0x00002D6C + ldrb r1, [r1, r0] + cmp r1, #4 + bls _02246F54 + mov r1, #4 +_02246F54: + ldr r0, _02246F68 ; =0x0226E574 + ldrb r1, [r0, r1] + ldr r0, _02246F6C ; =0x00002154 + str r1, [r4, r0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02246F60: .word 0x000030BC +_02246F64: .word 0x00002D6C +_02246F68: .word 0x0226E574 +_02246F6C: .word 0x00002154 + thumb_func_end ov16_02246F2C + + thumb_func_start ov16_02246F70 +ov16_02246F70: ; 0x02246F70 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r3, r4, r0 + ldr r1, _02246FA0 ; =0x00002D8C + mov r0, #0x78 + ldr r2, [r3, r1] + add r1, r1, #4 + ldr r1, [r3, r1] + mul r0, r2 + bl sub_020E2178 + add r1, r0, #1 + ldr r0, _02246FA4 ; =0x00002154 + str r1, [r4, r0] + mov r0, #0 + pop {r4, pc} + nop +_02246FA0: .word 0x00002D8C +_02246FA4: .word 0x00002154 + thumb_func_end ov16_02246F70 + + thumb_func_start ov16_02246FA8 +ov16_02246FA8: ; 0x02246FA8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + ldr r3, _02247054 ; =0x00002DEC + add r0, r5, r0 + ldrh r4, [r0, r3] + cmp r4, #0 + beq _02246FDC + add r2, r3, #2 + ldrh r2, [r0, r2] + sub r3, #0xa0 + lsl r2, r2, #1 + add r0, r0, r2 + ldrh r0, [r0, r3] + cmp r4, r0 + beq _02246FE4 +_02246FDC: + add r0, r5, #0 + bl ov16_02255570 + add r4, r0, #0 +_02246FE4: + ldr r0, [r5, #0x6c] + lsl r1, r0, #4 + add r2, r5, r1 + ldr r1, _02247058 ; =0x000021A8 + ldr r1, [r2, r1] + cmp r1, #0x27 + beq _02247048 + lsl r0, r0, #6 + add r1, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _02247048 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225B0C0 + cmp r0, #1 + bne _02247048 + lsl r0, r4, #4 + add r1, r5, r0 + ldr r0, _0224705C ; =0x000003E1 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02247048 + ldr r2, [r5, #0x64] + ldr r3, _02247060 ; =0x00002DCC + add r0, r2, #0 + mov r6, #0xc0 + add r1, r5, r3 + mul r0, r6 + mov r2, #1 + ldr r7, [r1, r0] + lsl r2, r2, #0x1e + orr r2, r7 + str r2, [r1, r0] + add r0, r6, #0 + add r0, #0xb4 + ldr r2, [r5, r0] + ldr r0, [r5, #0x64] + add r3, #0x10 + add r1, r0, #0 + mul r1, r6 + add r0, r5, r1 + str r2, [r0, r3] + add r6, #0x64 + str r4, [r5, r6] + b _02247050 +_02247048: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02247050: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247054: .word 0x00002DEC +_02247058: .word 0x000021A8 +_0224705C: .word 0x000003E1 +_02247060: .word 0x00002DCC + thumb_func_end ov16_02246FA8 + + thumb_func_start ov16_02247064 +ov16_02247064: ; 0x02247064 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r0, _022470BC ; =0x00003048 + ldr r0, [r4, r0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov16_02255918 + cmp r0, #0 + bne _022470B0 + ldr r0, _022470BC ; =0x00003048 + ldr r3, [r4, r0] + cmp r3, #0 + beq _022470B0 + lsl r3, r3, #0x10 + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + lsr r3, r3, #0x10 + bl ov16_0225B02C + cmp r0, #1 + bne _022470B0 + ldr r0, _022470BC ; =0x00003048 + ldr r1, [r4, r0] + mov r0, #0x49 + lsl r0, r0, #2 + str r1, [r4, r0] + b _022470B8 +_022470B0: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_022470B8: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022470BC: .word 0x00003048 + thumb_func_end ov16_02247064 + + thumb_func_start ov16_022470C0 +ov16_022470C0: ; 0x022470C0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + ldr r5, _02247110 ; =0x00002D58 + mov r1, #0 + ldr r3, [r4, #0x6c] + mov r2, #0xc0 + mul r2, r3 + add r3, r4, r2 + add r0, r1, #0 + add r2, r3, #0 + add r6, r5, #0 +_022470DE: + ldrsb r7, [r2, r6] + cmp r7, #6 + ble _022470EC + add r7, r3, r0 + ldrsb r7, [r7, r5] + sub r7, r7, #6 + add r1, r1, r7 +_022470EC: + add r0, r0, #1 + add r2, r2, #1 + cmp r0, #8 + blt _022470DE + mov r0, #0x14 + add r2, r1, #0 + mul r2, r0 + ldr r0, _02247114 ; =0x00002154 + add r2, #0x3c + str r2, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0xc8 + ble _0224710A + mov r1, #0xc8 + str r1, [r4, r0] +_0224710A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247110: .word 0x00002D58 +_02247114: .word 0x00002154 + thumb_func_end ov16_022470C0 + + thumb_func_start ov16_02247118 +ov16_02247118: ; 0x02247118 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + ldr r6, _02247188 ; =0x00002DEC + add r2, r5, r0 + ldrh r0, [r2, r6] + cmp r0, #0 + beq _0224714C + add r3, r6, #2 + ldrh r3, [r2, r3] + sub r6, #0xa0 + lsl r3, r3, #1 + add r2, r2, r3 + ldrh r2, [r2, r6] + cmp r0, r2 + beq _02247152 +_0224714C: + add r0, r5, #0 + bl ov16_02255570 +_02247152: + ldr r1, [r5, #0x6c] + lsl r2, r1, #4 + add r3, r5, r2 + ldr r2, _0224718C ; =0x000021A8 + ldr r2, [r3, r2] + cmp r2, #0x27 + beq _0224717C + lsl r0, r0, #4 + add r2, r5, r0 + ldr r0, _02247190 ; =0x000003E1 + ldrb r0, [r2, r0] + cmp r0, #0 + bne _02247184 + lsl r0, r1, #6 + add r1, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _02247184 +_0224717C: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248AF0 +_02247184: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02247188: .word 0x00002DEC +_0224718C: .word 0x000021A8 +_02247190: .word 0x000003E1 + thumb_func_end ov16_02247118 + + thumb_func_start ov16_02247194 +ov16_02247194: ; 0x02247194 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + ldr r2, [sp, #8] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r7, #0 + bl ov16_0223E208 + ldr r1, [sp, #4] + cmp r1, #0 + beq _022471E6 + cmp r1, #1 + beq _022471E6 + cmp r1, #2 + beq _02247264 + b _0224733E +_022471E6: + cmp r6, #5 + bls _022471EC + b _0224733E +_022471EC: + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022471F8: ; jump table + .short _02247204 - _022471F8 - 2 ; case 0 + .short _02247214 - _022471F8 - 2 ; case 1 + .short _02247224 - _022471F8 - 2 ; case 2 + .short _02247234 - _022471F8 - 2 ; case 3 + .short _02247244 - _022471F8 - 2 ; case 4 + .short _02247254 - _022471F8 - 2 ; case 5 +_02247204: + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1b + lsr r5, r0, #0x1d + b _0224733E +_02247214: + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x16 + lsr r5, r0, #0x1d + b _0224733E +_02247224: + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x11 + lsr r5, r0, #0x1d + b _0224733E +_02247234: + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0xc + lsr r5, r0, #0x1d + b _0224733E +_02247244: + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1e + lsr r5, r0, #0x1e + b _0224733E +_02247254: + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r5, r0, #0x1e + b _0224733E +_02247264: + cmp r6, #5 + bhi _0224733E + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02247274: ; jump table + .short _02247280 - _02247274 - 2 ; case 0 + .short _022472A0 - _02247274 - 2 ; case 1 + .short _022472C0 - _02247274 - 2 ; case 2 + .short _022472E0 - _02247274 - 2 ; case 3 + .short _02247300 - _02247274 - 2 ; case 4 + .short _02247320 - _02247274 - 2 ; case 5 +_02247280: + mov r2, #0x71 + lsl r2, r2, #2 + add r6, r4, r2 + lsl r3, r0, #3 + ldr r7, [r6, r3] + mov r1, #0x1c + bic r7, r1 + sub r2, #8 + str r7, [r6, r3] + add r3, r4, r2 + lsl r2, r0, #2 + ldr r1, [r3, r2] + mov r0, #1 + bic r1, r0 + str r1, [r3, r2] + b _0224733E +_022472A0: + mov r2, #0x71 + lsl r2, r2, #2 + add r6, r4, r2 + lsl r7, r0, #3 + ldr r3, [r6, r7] + ldr r1, _02247368 ; =0xFFFFFC7F + sub r2, #8 + and r1, r3 + add r3, r4, r2 + lsl r2, r0, #2 + str r1, [r6, r7] + ldr r1, [r3, r2] + mov r0, #2 + bic r1, r0 + str r1, [r3, r2] + b _0224733E +_022472C0: + mov r2, #0x71 + lsl r2, r2, #2 + add r6, r4, r2 + lsl r7, r0, #3 + ldr r3, [r6, r7] + ldr r1, _0224736C ; =0xFFFF8FFF + sub r2, #8 + and r1, r3 + add r3, r4, r2 + lsl r2, r0, #2 + str r1, [r6, r7] + ldr r1, [r3, r2] + mov r0, #0x40 + bic r1, r0 + str r1, [r3, r2] + b _0224733E +_022472E0: + mov r2, #0x71 + lsl r2, r2, #2 + add r6, r4, r2 + lsl r7, r0, #3 + ldr r3, [r6, r7] + ldr r1, _02247370 ; =0xFFF1FFFF + sub r2, #8 + and r1, r3 + add r3, r4, r2 + lsl r2, r0, #2 + str r1, [r6, r7] + ldr r1, [r3, r2] + mov r0, #8 + bic r1, r0 + str r1, [r3, r2] + b _0224733E +_02247300: + mov r2, #0x72 + lsl r2, r2, #2 + add r6, r4, r2 + lsl r3, r0, #3 + ldr r7, [r6, r3] + mov r1, #3 + bic r7, r1 + sub r2, #0xc + str r7, [r6, r3] + add r3, r4, r2 + lsl r2, r0, #2 + ldr r1, [r3, r2] + mov r0, #4 + bic r1, r0 + str r1, [r3, r2] + b _0224733E +_02247320: + mov r2, #0x72 + lsl r2, r2, #2 + add r6, r4, r2 + lsl r3, r0, #3 + ldr r7, [r6, r3] + mov r1, #0xc + bic r7, r1 + sub r2, #0xc + str r7, [r6, r3] + lsl r3, r0, #2 + add r1, r4, r2 + ldr r2, [r1, r3] + ldr r0, _02247374 ; =0xFFFFFBFF + and r0, r2 + str r0, [r1, r3] +_0224733E: + ldr r0, [sp, #4] + cmp r0, #0 + bne _02247350 + cmp r5, #0 + bne _02247350 + ldr r1, [sp] + add r0, r4, #0 + bl ov16_02248AF0 +_02247350: + ldr r0, [sp, #4] + cmp r0, #1 + bne _02247362 + cmp r5, #0 + beq _02247362 + ldr r1, [sp] + add r0, r4, #0 + bl ov16_02248AF0 +_02247362: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247368: .word 0xFFFFFC7F +_0224736C: .word 0xFFFF8FFF +_02247370: .word 0xFFF1FFFF +_02247374: .word 0xFFFFFBFF + thumb_func_end ov16_02247194 + + thumb_func_start ov16_02247378 +ov16_02247378: ; 0x02247378 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + ldr r0, [r4, #0x6c] + lsl r0, r0, #6 + add r2, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r2, r0] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + bne _022473A4 + add r0, r4, #0 + bl ov16_02248AF0 +_022473A4: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov16_02247378 + + thumb_func_start ov16_022473A8 +ov16_022473A8: ; 0x022473A8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + ldr r0, [r4, #0x6c] + mov r2, #0xc0 + add r3, r0, #0 + mul r3, r2 + add r5, r4, r3 + ldr r3, _022473F0 ; =0x00002DAC + ldr r0, [r5, r3] + cmp r0, #0 + bne _022473E6 + add r0, r3, #4 + ldr r5, [r5, r0] + mov r0, #1 + lsl r0, r0, #0x18 + tst r0, r5 + bne _022473E6 + ldr r0, [r4, #0x64] + mul r2, r0 + add r0, r4, r2 + ldr r0, [r0, r3] + cmp r0, #0 + bne _022473EC +_022473E6: + add r0, r4, #0 + bl ov16_02248AF0 +_022473EC: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022473F0: .word 0x00002DAC + thumb_func_end ov16_022473A8 + + thumb_func_start ov16_022473F4 +ov16_022473F4: ; 0x022473F4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02256128 + ldr r2, [r4, #0x64] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _0224743C ; =0x00002DCC + ldr r1, [r2, r1] + lsl r1, r1, #0x13 + lsr r2, r1, #0x1d + sub r1, r0, #1 + cmp r2, r1 + blo _0224742E + cmp r0, #2 + bge _02247436 +_0224742E: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02247436: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_0224743C: .word 0x00002DCC + thumb_func_end ov16_022473F4 + + thumb_func_start ov16_02247440 +ov16_02247440: ; 0x02247440 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + mov r2, #0x72 + mov r1, #1 + add r3, r0, #0 + eor r3, r1 + lsl r0, r3, #3 + add r5, r4, r0 + lsl r2, r2, #2 + ldr r5, [r5, r2] + lsl r5, r5, #0x1c + lsr r5, r5, #0x1e + cmp r5, #2 + bne _02247496 + mov r0, #0xb5 + lsl r0, r0, #2 + add r2, r4, r0 + ldr r3, [r4, #0x64] + mov r0, #0x1c + mul r0, r3 + ldr r5, [r2, r0] + mov r3, #1 + bic r5, r3 + orr r1, r5 + str r1, [r2, r0] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 + b _022474BE +_02247496: + add r5, r2, #0 + sub r5, #0xc + add r5, r4, r5 + lsl r3, r3, #2 + ldr r6, [r5, r3] + lsl r1, r1, #0xa + orr r1, r6 + str r1, [r5, r3] + add r2, r4, r2 + ldr r4, [r2, r0] + mov r3, #0xc + add r1, r4, #0 + bic r1, r3 + lsl r3, r4, #0x1c + lsr r3, r3, #0x1e + add r3, r3, #1 + lsl r3, r3, #0x1e + lsr r3, r3, #0x1c + orr r1, r3 + str r1, [r2, r0] +_022474BE: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02247440 + + thumb_func_start ov16_022474C4 +ov16_022474C4: ; 0x022474C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r7, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov16_0223E208 + mov r1, #0x72 + lsl r1, r1, #2 + add r4, r5, r1 + lsl r6, r0, #3 + str r0, [sp] + ldr r0, [r4, r6] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1e + beq _0224755E + sub r1, #0x94 + str r0, [r5, r1] + add r0, r5, #0 + mov r1, #6 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x94 + str r7, [r0, #0] + ldr r1, [r5, #0x78] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #3 + beq _0224753C + ldr r1, [r5, #0x78] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #3 + bne _02247566 +_0224753C: + mov r0, #0x6f + ldr r1, [sp] + lsl r0, r0, #2 + add r2, r5, r0 + lsl r1, r1, #2 + ldr r7, [r2, r1] + ldr r3, _0224756C ; =0xFFFFFBFF + sub r0, #0x88 + and r3, r7 + str r3, [r2, r1] + ldr r2, [r4, r6] + mov r1, #0xc + bic r2, r1 + str r2, [r4, r6] + mov r1, #0 + str r1, [r5, r0] + b _02247566 +_0224755E: + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02248AF0 +_02247566: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224756C: .word 0xFFFFFBFF + thumb_func_end ov16_022474C4 + + thumb_func_start ov16_02247570 +ov16_02247570: ; 0x02247570 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #8] + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + cmp r4, #0 + bne _02247620 + add r0, r6, #0 + bl ov16_0223DF1C + mov r6, #0 + str r0, [sp] + cmp r0, #0 + ble _02247688 +_022475B2: + ldr r0, _02247690 ; =0x000021EC + add r1, r5, r6 + ldrb r4, [r1, r0] + ldr r0, [sp, #8] + cmp r0, #0 + bne _022475EA + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov16_02255AB4 + cmp r0, #1 + bne _02247616 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02247694 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02247616 + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] + b _02247688 +_022475EA: + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov16_02255AB4 + cmp r0, #0 + beq _02247608 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02247694 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + bne _02247616 +_02247608: + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] + b _02247688 +_02247616: + ldr r0, [sp] + add r6, r6, #1 + cmp r6, r0 + blt _022475B2 + b _02247688 +_02247620: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r4, r0, #0 + ldr r0, [sp, #8] + cmp r0, #0 + bne _0224765E + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov16_02255AB4 + cmp r0, #1 + bne _02247688 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02247694 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02247688 + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] + b _02247688 +_0224765E: + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov16_02255AB4 + cmp r0, #0 + beq _0224767C + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02247694 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + bne _02247688 +_0224767C: + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02248AF0 + add r5, #0x80 + str r4, [r5, #0] +_02247688: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02247690: .word 0x000021EC +_02247694: .word 0x00002D8C + thumb_func_end ov16_02247570 + + thumb_func_start ov16_02247698 +ov16_02247698: ; 0x02247698 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0224A984 + add r7, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223E208 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_0223E208 + cmp r6, r0 + bne _022476F4 + ldr r1, [sp] + add r0, r4, #0 + bl ov16_02248AF0 +_022476F4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02247698 + + thumb_func_start ov16_022476F8 +ov16_022476F8: ; 0x022476F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #0 + str r0, [sp, #8] + ldr r1, [sp, #8] + add r0, r7, #0 + bl ov16_0223DF60 + cmp r0, #0 + bgt _02247718 + b _02247862 +_02247718: + ldr r2, [sp, #8] + add r0, r7, #0 + mov r1, #0 + bl ov16_0223DFAC + mov r1, #0xae + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + cmp r0, #0x35 + bne _022477E6 + cmp r6, #0 + beq _022477E6 + ldr r0, _02247868 ; =0x000001EE + cmp r6, r0 + beq _022477E6 + ldr r0, [sp, #4] + cmp r0, #0 + bne _022477E6 + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #0 + bne _022477E6 + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + add r5, r1, #0 + add r0, r4, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + sub r0, r0, #1 + mov r1, #0xa + bl sub_020E2178 + lsl r0, r0, #0x18 + lsr r3, r0, #0x18 + cmp r3, #0xa + blo _0224779E + mov r3, #9 +_0224779E: + mov r1, #0 + ldr r2, _0224786C ; =0x0226EAA8 + str r1, [sp, #0xc] +_022477A4: + ldrb r0, [r2] + cmp r0, r5 + ble _022477BE + ldr r2, [sp, #0xc] + ldr r5, _02247870 ; =0x0226E66C + add r2, r3, r2 + lsl r2, r2, #1 + add r0, r4, #0 + mov r1, #6 + add r2, r5, r2 + bl sub_02074B30 + b _022477E6 +_022477BE: + cmp r5, #0x62 + blt _022477DC + cmp r5, #0x63 + bgt _022477DC + mov r2, #0x63 + sub r2, r2, r5 + add r2, r3, r2 + lsl r3, r2, #1 + ldr r2, _02247874 ; =0x0226E590 + add r0, r4, #0 + mov r1, #6 + add r2, r2, r3 + bl sub_02074B30 + b _022477E6 +_022477DC: + add r1, r1, #1 + add r2, r2, #1 + str r1, [sp, #0xc] + cmp r1, #9 + blt _022477A4 +_022477E6: + ldr r0, [sp] + cmp r0, #0x76 + bne _0224784C + cmp r6, #0 + beq _0224784C + ldr r0, _02247868 ; =0x000001EE + cmp r6, r0 + beq _0224784C + ldr r0, [sp, #4] + cmp r0, #0 + bne _0224784C + mov r2, #0 + add r0, r4, #0 + mov r1, #0xa1 + str r2, [sp, #0xc] + mov r5, #0xa + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, #0xa + ble _0224781E + ldr r0, [sp, #0xc] +_02247814: + add r5, #0xa + add r0, r0, #1 + cmp r5, r1 + blt _02247814 + str r0, [sp, #0xc] +_0224781E: + ldr r0, [sp, #0xc] + cmp r0, #0xa + blt _02247828 + bl sub_02022974 +_02247828: + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + ldr r2, [sp, #0xc] + ldr r0, _02247878 ; =0x0226EAB4 + ldrb r0, [r0, r2] + cmp r1, r0 + bge _0224784C + mov r0, #0x5e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #6 + add r2, sp, #0xc + bl sub_02074B30 +_0224784C: + ldr r0, [sp, #8] + mov r1, #0 + add r0, r0, #1 + str r0, [sp, #8] + add r0, r7, #0 + bl ov16_0223DF60 + ldr r1, [sp, #8] + cmp r1, r0 + bge _02247862 + b _02247718 +_02247862: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247868: .word 0x000001EE +_0224786C: .word 0x0226EAA8 +_02247870: .word 0x0226E66C +_02247874: .word 0x0226E590 +_02247878: .word 0x0226EAB4 + thumb_func_end ov16_022476F8 + + thumb_func_start ov16_0224787C +ov16_0224787C: ; 0x0224787C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r0, #0xb5 + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + add r3, r4, r0 + mov r0, #0x1c + add r2, r1, #0 + mul r2, r0 + ldr r1, [r3, r2] + mov r0, #0x10 + orr r0, r1 + str r0, [r3, r2] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0224787C + + thumb_func_start ov16_022478A4 +ov16_022478A4: ; 0x022478A4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_022588A4 + cmp r0, #1 + bne _022478E0 + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_022478E0: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_022478A4 + + thumb_func_start ov16_022478E4 +ov16_022478E4: ; 0x022478E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp, #4] + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r5, #0 + bl ov16_0224A984 + add r1, r0, #0 + cmp r6, #0 + bne _02247938 + add r0, r5, #0 + bl ov16_02258AB8 + cmp r4, r0 + bne _0224794A + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _0224794A +_02247938: + add r0, r5, #0 + bl ov16_02258AB8 + cmp r4, r0 + beq _0224794A + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_0224794A: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_022478E4 + + thumb_func_start ov16_02247950 +ov16_02247950: ; 0x02247950 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248B10 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_02258874 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov16_0225B0FC + str r0, [r6, #0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02247950 + + thumb_func_start ov16_0224799C +ov16_0224799C: ; 0x0224799C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02248B10 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_02258874 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B0FC + str r0, [r6, #0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224799C + + thumb_func_start ov16_022479E8 +ov16_022479E8: ; 0x022479E8 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x79 + bne _02247A16 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02248AF0 + mov r0, #0 + pop {r4, r5, r6, pc} +_02247A16: + add r0, r4, #0 + bl ov16_0223E22C + cmp r0, #0xc + ble _02247A22 + mov r0, #0xc +_02247A22: + ldr r1, _02247A78 ; =0x0226EAC0 + mov r2, #0x1b + ldrb r4, [r1, r0] + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r3, #0 + bl ov16_02252060 + cmp r4, r0 + beq _02247A6A + ldr r1, [r5, #0x64] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r4, r0 + beq _02247A6A + ldr r1, [r5, #0x64] + lsl r0, r4, #0x18 + add r3, r1, #0 + mov r2, #0xc0 + mul r3, r2 + ldr r1, _02247A7C ; =0x00002D64 + lsr r0, r0, #0x18 + add r3, r5, r3 + strb r0, [r3, r1] + ldr r3, [r5, #0x64] + add r1, r1, #1 + add r6, r3, #0 + mul r6, r2 + add r3, r5, r6 + strb r0, [r3, r1] + add r2, #0x70 + str r4, [r5, r2] + b _02247A72 +_02247A6A: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02247A72: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02247A78: .word 0x0226EAC0 +_02247A7C: .word 0x00002D64 + thumb_func_end ov16_022479E8 + + thumb_func_start ov16_02247A80 +ov16_02247A80: ; 0x02247A80 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_0223E22C + cmp r0, #0xc + ble _02247A9A + mov r0, #0xc +_02247A9A: + lsl r1, r0, #1 + ldr r0, _02247AAC ; =0x0226E652 + ldrh r1, [r0, r1] + mov r0, #0x49 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02247AAC: .word 0x0226E652 + thumb_func_end ov16_02247A80 + + thumb_func_start ov16_02247AB0 +ov16_02247AB0: ; 0x02247AB0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_0223E22C + cmp r0, #0xc + ble _02247ACA + mov r0, #0xc +_02247ACA: + lsl r1, r0, #2 + ldr r0, _02247AD8 ; =0x0226E690 + ldr r1, [r0, r1] + ldr r0, _02247ADC ; =0x00002174 + str r1, [r4, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02247AD8: .word 0x0226E690 +_02247ADC: .word 0x00002174 + thumb_func_end ov16_02247AB0 + + thumb_func_start ov16_02247AE0 +ov16_02247AE0: ; 0x02247AE0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r5, r0, #0 + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02258B18 + cmp r0, #0 + beq _02247B12 + ldr r1, _02247B20 ; =0x00002154 + str r0, [r4, r1] + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02258B2C + ldr r1, _02247B24 ; =0x00002160 + str r0, [r4, r1] + b _02247B1A +_02247B12: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02248AF0 +_02247B1A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02247B20: .word 0x00002154 +_02247B24: .word 0x00002160 + thumb_func_end ov16_02247AE0 + + thumb_func_start ov16_02247B28 +ov16_02247B28: ; 0x02247B28 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _02247BA0 ; =0x00002DB8 + ldrh r0, [r1, r0] + cmp r0, #0 + beq _02247B6E + ldr r1, [r4, #0x64] + add r0, r4, #0 + mov r3, #0x3c + bl ov16_02255AB4 + cmp r0, #1 + bne _02247B6E + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _02247B9C +_02247B6E: + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r3, r4, r0 + ldr r0, _02247BA0 ; =0x00002DB8 + ldrh r1, [r3, r0] + cmp r1, #0 + beq _02247B88 + add r0, #0x14 + ldr r0, [r3, r0] + lsl r0, r0, #3 + lsr r0, r0, #0x1f + bne _02247B94 +_02247B88: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02258CB4 + cmp r0, #1 + beq _02247B9C +_02247B94: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02247B9C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247BA0: .word 0x00002DB8 + thumb_func_end ov16_02247B28 + + thumb_func_start ov16_02247BA4 +ov16_02247BA4: ; 0x02247BA4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02259204 + cmp r0, #1 + beq _02247BD0 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02247BD0: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02247BA4 + + thumb_func_start ov16_02247BD4 +ov16_02247BD4: ; 0x02247BD4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + str r2, [sp, #8] + bl ov16_02265B2C + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02247BD4 + + thumb_func_start ov16_02247C04 +ov16_02247C04: ; 0x02247C04 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov16_02259AB4 + add r4, r0, #0 + beq _02247C4C + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r1, r0, #0 + cmp r4, #0xff + bne _02247C3A + add r0, r5, #0 + bl ov16_02248AF0 + b _02247C42 +_02247C3A: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_02247C42: + add r0, r6, #0 + mov r1, #0 + add r2, r4, #0 + bl ov16_0223F500 +_02247C4C: + ldr r1, _02247C60 ; =0x00003154 + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r5, r1] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247C60: .word 0x00003154 + thumb_func_end ov16_02247C04 + + thumb_func_start ov16_02247C64 +ov16_02247C64: ; 0x02247C64 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + bl ov16_0223DF1C + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + mov r2, #0 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov16_02265A8C + mov r0, #0 + str r0, [r4, #0x78] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02247C64 + + thumb_func_start ov16_02247C94 +ov16_02247C94: ; 0x02247C94 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #0 + bl ov16_02259AB4 + add r5, r0, #0 + beq _02247CC6 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + cmp r5, #0xff + bne _02247CC0 + add r0, r4, #0 + bl ov16_02248AF0 + b _02247CC6 +_02247CC0: + ldr r0, _02247CD8 ; =0x000021A0 + sub r1, r5, #1 + strb r1, [r4, r0] +_02247CC6: + ldr r1, _02247CDC ; =0x00003154 + mov r0, #1 + ldr r2, [r4, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r4, r1] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02247CD8: .word 0x000021A0 +_02247CDC: .word 0x00003154 + thumb_func_end ov16_02247C94 + + thumb_func_start ov16_02247CE0 +ov16_02247CE0: ; 0x02247CE0 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + beq _02247CFE + add r0, r4, #0 + bl ov16_02266A38 +_02247CFE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02247CE0 + + thumb_func_start ov16_02247D04 +ov16_02247D04: ; 0x02247D04 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl ov16_0223E208 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + add r2, r0, #0 + lsl r0, r6, #2 + add r1, r5, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #0x80 + tst r0, r1 + beq _02247DF8 + mov r0, #0xc0 + add r6, r4, #0 + mul r6, r0 + ldr r0, _02247E04 ; =0x00002D8C + add r1, r5, r6 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02247DF8 + lsl r1, r7, #0x18 + lsl r2, r2, #0x18 + mov r0, #5 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl ov16_022558CC + cmp r0, #0x14 + bgt _02247D96 + bge _02247DBE + cmp r0, #0 + bgt _02247D90 + beq _02247DCE + b _02247DDA +_02247D90: + cmp r0, #0xa + beq _02247DC6 + b _02247DDA +_02247D96: + cmp r0, #0x50 + bgt _02247DA2 + bge _02247DAE + cmp r0, #0x28 + beq _02247DB6 + b _02247DDA +_02247DA2: + cmp r0, #0xa0 + bne _02247DDA + ldr r0, _02247E08 ; =0x0000215C + mov r1, #2 + str r1, [r5, r0] + b _02247DDE +_02247DAE: + ldr r0, _02247E08 ; =0x0000215C + mov r1, #4 + str r1, [r5, r0] + b _02247DDE +_02247DB6: + ldr r0, _02247E08 ; =0x0000215C + mov r1, #8 + str r1, [r5, r0] + b _02247DDE +_02247DBE: + ldr r0, _02247E08 ; =0x0000215C + mov r1, #0x10 + str r1, [r5, r0] + b _02247DDE +_02247DC6: + ldr r0, _02247E08 ; =0x0000215C + mov r1, #0x20 + str r1, [r5, r0] + b _02247DDE +_02247DCE: + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02247DDA: + bl sub_02022974 +_02247DDE: + ldr r0, _02247E0C ; =0x00002D90 + add r1, r5, r6 + ldr r1, [r1, r0] + mov r0, #0 + mvn r0, r0 + mul r0, r1 + ldr r1, _02247E08 ; =0x0000215C + ldr r1, [r5, r1] + bl ov16_022563F8 + ldr r1, _02247E08 ; =0x0000215C + str r0, [r5, r1] + b _02247E00 +_02247DF8: + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02248AF0 +_02247E00: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247E04: .word 0x00002D8C +_02247E08: .word 0x0000215C +_02247E0C: .word 0x00002D90 + thumb_func_end ov16_02247D04 + + thumb_func_start ov16_02247E10 +ov16_02247E10: ; 0x02247E10 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x20 + ldr r0, _02247E8C ; =0x00003044 + bne _02247E44 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02247E90 ; =0x000003E5 + ldrb r0, [r1, r0] + lsl r0, r0, #0x11 + lsr r4, r0, #0x10 + b _02247E4E +_02247E44: + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02247E90 ; =0x000003E5 + ldrb r4, [r1, r0] +_02247E4E: + cmp r4, #0 + bne _02247E56 + bl sub_02022974 +_02247E56: + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r4 + bge _02247E7E + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02247E94 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02247E7E + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02247E7E: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247E8C: .word 0x00003044 +_02247E90: .word 0x000003E5 +_02247E94: .word 0x00002D8C + thumb_func_end ov16_02247E10 + + thumb_func_start ov16_02247E98 +ov16_02247E98: ; 0x02247E98 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + ldr r0, [r5, #0x64] + mov r4, #0xc0 + add r1, r0, #0 + mul r1, r4 + mov r0, #0xb5 + add r3, r5, r1 + lsl r0, r0, #6 + add r1, r4, #0 + ldrh r2, [r3, r0] + add r1, #0xf9 + cmp r2, r1 + bne _02247F36 + ldr r1, [r5, #0x6c] + add r2, r1, #0 + mul r2, r4 + add r1, r0, #0 + add r2, r5, r2 + add r1, #0x4c + ldr r1, [r2, r1] + cmp r1, #0 + beq _02247F36 + add r0, #0x70 + ldr r1, [r3, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r1 + bne _02247F36 + add r0, r6, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + bne _02247EFE + ldr r1, [r5, #0x64] + add r0, r6, #0 + bl ov16_0223EE30 + bl sub_02006494 + b _02247F06 +_02247EFE: + ldr r1, [r5, #0x64] + add r0, r6, #0 + bl ov16_0223F810 +_02247F06: + cmp r0, #0 + beq _02247F12 + cmp r0, #1 + beq _02247F16 + cmp r0, #2 + beq _02247F1A +_02247F12: + mov r4, #0 + b _02247F1C +_02247F16: + mov r4, #0xa + b _02247F1C +_02247F1A: + mov r4, #0x1e +_02247F1C: + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r4 + ble _02247F3E + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _02247F3E +_02247F36: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_02247F3E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02247E98 + + thumb_func_start ov16_02247F44 +ov16_02247F44: ; 0x02247F44 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + ldr r0, _02247F74 ; =0x000003DE + add r2, r4, r0 + ldr r0, _02247F78 ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r0, r2, r0 + bl sub_02079104 + mov r1, #0x4d + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0 + pop {r4, pc} + nop +_02247F74: .word 0x000003DE +_02247F78: .word 0x00003044 + thumb_func_end ov16_02247F44 + + thumb_func_start ov16_02247F7C +ov16_02247F7C: ; 0x02247F7C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + ldr r3, [sp] + add r0, r5, #0 + add r2, r7, #0 + bl ov16_022664F8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02247F7C + + thumb_func_start ov16_02247FBC +ov16_02247FBC: ; 0x02247FBC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_0226651C + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02247FBC + + thumb_func_start ov16_02247FE8 +ov16_02247FE8: ; 0x02247FE8 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + mov r1, #0 + bl ov16_022665AC + mov r0, #0 + pop {r4, pc} + thumb_func_end ov16_02247FE8 + + thumb_func_start ov16_02248000 +ov16_02248000: ; 0x02248000 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, _0224803C ; =0x0000219C + str r0, [sp] + add r3, r4, r1 + ldrb r2, [r3, r2] + add r0, r5, #0 + mov r3, #0 + bl ov16_0223E30C + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0224803C: .word 0x0000219C + thumb_func_end ov16_02248000 + + thumb_func_start ov16_02248040 +ov16_02248040: ; 0x02248040 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255DE8 + cmp r0, #0 + beq _0224807E + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_0224807E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02248040 + + thumb_func_start ov16_02248084 +ov16_02248084: ; 0x02248084 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_022665E4 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02248084 + + thumb_func_start ov16_022480B0 +ov16_022480B0: ; 0x022480B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_0226660C + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022480B0 + + thumb_func_start ov16_022480DC +ov16_022480DC: ; 0x022480DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_02266634 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022480DC + + thumb_func_start ov16_02248108 +ov16_02248108: ; 0x02248108 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_0226665C + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02248108 + + thumb_func_start ov16_02248134 +ov16_02248134: ; 0x02248134 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02266684 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02248134 + + thumb_func_start ov16_0224814C +ov16_0224814C: ; 0x0224814C + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_022666A0 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0224814C + + thumb_func_start ov16_02248164 +ov16_02248164: ; 0x02248164 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + ldr r3, [sp] + add r0, r5, #0 + add r2, r7, #0 + bl ov16_022666BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02248164 + + thumb_func_start ov16_022481A4 +ov16_022481A4: ; 0x022481A4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0226673C + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_022481A4 + + thumb_func_start ov16_022481D0 +ov16_022481D0: ; 0x022481D0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + mov r2, #0x4e + lsl r2, r2, #2 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r4, r2 + bl ov16_0225708C + cmp r0, #0 + bne _02248200 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02248200: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_022481D0 + + thumb_func_start ov16_02248204 +ov16_02248204: ; 0x02248204 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r2, r0, #0 + cmp r2, #3 + beq _0224822A + cmp r2, #4 + beq _02248252 + b _0224827A +_0224822A: + mov r5, #0 + cmp r6, #0 + ble _0224828A + mov r7, #1 +_02248232: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02248290 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + bne _0224824A + add r0, r4, #0 + add r1, r5, #0 + bl ov16_022667E8 +_0224824A: + add r5, r5, #1 + cmp r5, r6 + blt _02248232 + b _0224828A +_02248252: + mov r5, #0 + cmp r6, #0 + ble _0224828A + mov r7, #1 +_0224825A: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02248290 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _02248272 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_022667E8 +_02248272: + add r5, r5, #1 + cmp r5, r6 + blt _0224825A + b _0224828A +_0224827A: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_022667E8 +_0224828A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248290: .word 0x00000195 + thumb_func_end ov16_02248204 + + thumb_func_start ov16_02248294 +ov16_02248294: ; 0x02248294 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + bl ov16_0223DF1C + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r2, r0, #0 + cmp r2, #3 + beq _022482BA + cmp r2, #4 + beq _022482E2 + b _0224830A +_022482BA: + mov r5, #0 + cmp r6, #0 + ble _0224831A + mov r7, #1 +_022482C2: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02248320 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + bne _022482DA + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02266804 +_022482DA: + add r5, r5, #1 + cmp r5, r6 + blt _022482C2 + b _0224831A +_022482E2: + mov r5, #0 + cmp r6, #0 + ble _0224831A + mov r7, #1 +_022482EA: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _02248320 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _02248302 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02266804 +_02248302: + add r5, r5, #1 + cmp r5, r6 + blt _022482EA + b _0224831A +_0224830A: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_02266804 +_0224831A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248320: .word 0x00000195 + thumb_func_end ov16_02248294 + + thumb_func_start ov16_02248324 +ov16_02248324: ; 0x02248324 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + str r1, [sp, #4] + add r0, r1, #0 + mov r1, #1 + mov r5, #0 + bl ov16_02248AF0 + ldr r0, [sp, #4] + bl ov16_02248AD0 + add r4, r0, #0 + ldr r0, [sp, #4] + bl ov16_02248AD0 + str r0, [sp, #0x14] + ldr r0, [sp] + bl ov16_0223DF0C + str r0, [sp, #0xc] + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r4, #0 + bl ov16_0224A984 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + mov r1, #8 + tst r0, r1 + bne _02248376 + ldr r0, [sp, #0xc] + mov r1, #0x10 + tst r0, r1 + beq _0224845E + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223E208 + cmp r0, #0 + beq _0224845E +_02248376: + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223DF20 + add r7, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223E258 + add r1, r0, #0 + ldr r0, [sp] + bl ov16_0223DF20 + str r0, [sp, #8] + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223DF14 + add r0, r7, #0 + mov r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _022483E4 +_022483A6: + add r0, r7, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _022483D8 + add r0, r6, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _022484CC ; =0x000001EE + cmp r0, r1 + beq _022483D8 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r5, r5, r0 +_022483D8: + add r0, r7, #0 + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _022483A6 +_022483E4: + ldr r0, [sp, #0xc] + sub r0, #0x4a + str r0, [sp, #0xc] + cmp r0, #1 + bhi _02248406 + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223E208 + cmp r0, #0 + bne _02248406 + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223E1F8 + cmp r0, #2 + beq _02248450 +_02248406: + ldr r0, [sp, #8] + mov r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02248450 + ldr r7, _022484CC ; =0x000001EE +_02248414: + ldr r0, [sp, #8] + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02248444 + add r0, r6, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + cmp r0, r7 + beq _02248444 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r5, r5, r0 +_02248444: + ldr r0, [sp, #8] + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _02248414 +_02248450: + cmp r5, #0 + bne _022484C6 + ldr r0, [sp, #4] + ldr r1, [sp, #0x14] + bl ov16_02248AF0 + b _022484C6 +_0224845E: + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223DF20 + add r7, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223DF14 + add r0, r7, #0 + mov r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _022484BA +_0224847C: + add r0, r7, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _022484AE + add r0, r6, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _022484CC ; =0x000001EE + cmp r0, r1 + beq _022484AE + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r5, r5, r0 +_022484AE: + add r0, r7, #0 + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _0224847C +_022484BA: + cmp r5, #0 + bne _022484C6 + ldr r0, [sp, #4] + ldr r1, [sp, #0x14] + bl ov16_02248AF0 +_022484C6: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022484CC: .word 0x000001EE + thumb_func_end ov16_02248324 + + thumb_func_start ov16_022484D0 +ov16_022484D0: ; 0x022484D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r6, r1, #0 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r6, #0 + bl ov16_02248AD0 + mov ip, r0 + ldr r1, [r6, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r0, r6, r0 + add r5, r0, #1 + ldr r7, _02248548 ; =0x00002D58 + mov r4, #0 + mov r3, #1 + add r0, sp, #4 +_022484FA: + ldrsb r1, [r5, r7] + cmp r1, #0xc + bge _02248508 + lsl r1, r4, #2 + sub r2, r3, #1 + add r4, r4, #1 + str r2, [r0, r1] +_02248508: + add r3, r3, #1 + add r5, r5, #1 + cmp r3, #8 + blt _022484FA + cmp r4, #0 + beq _02248538 + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r4, #0 + bl sub_020E1F6C + lsl r1, r1, #2 + add r0, sp, #4 + ldr r0, [r0, r1] + ldr r1, _0224854C ; =0x00002170 + add r0, #0x27 + str r0, [r6, r1] + mov r0, #2 + ldr r2, [r6, r1] + lsl r0, r0, #0x1e + orr r0, r2 + str r0, [r6, r1] + b _02248540 +_02248538: + add r0, r6, #0 + mov r1, ip + bl ov16_02248AF0 +_02248540: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02248548: .word 0x00002D58 +_0224854C: .word 0x00002170 + thumb_func_end ov16_022484D0 + + thumb_func_start ov16_02248550 +ov16_02248550: ; 0x02248550 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + ldr r0, _02248594 ; =0x00002DB8 + add r5, r2, #0 + add r6, r4, r0 + mov r0, #0xc0 + mul r5, r0 + lsl r0, r2, #1 + add r1, r4, r0 + ldrh r3, [r6, r5] + ldr r0, _02248598 ; =0x00003124 + strh r3, [r1, r0] + mov r0, #0 + strh r0, [r6, r5] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_02253EC0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248594: .word 0x00002DB8 +_02248598: .word 0x00003124 + thumb_func_end ov16_02248550 + + thumb_func_start ov16_0224859C +ov16_0224859C: ; 0x0224859C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r1, r0, #0 + ldr r0, [r4, #0x64] + ldr r2, _022485DC ; =0x00003124 + lsl r0, r0, #1 + add r0, r4, r0 + ldrh r3, [r0, r2] + cmp r3, #0 + beq _022485D0 + mov r0, #0x4a + lsl r0, r0, #2 + str r3, [r4, r0] + ldr r0, [r4, #0x64] + mov r1, #0 + lsl r0, r0, #1 + add r0, r4, r0 + strh r1, [r0, r2] + b _022485D6 +_022485D0: + add r0, r4, #0 + bl ov16_02248AF0 +_022485D6: + mov r0, #0 + pop {r4, pc} + nop +_022485DC: .word 0x00003124 + thumb_func_end ov16_0224859C + + thumb_func_start ov16_022485E0 +ov16_022485E0: ; 0x022485E0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + mov r2, #0x4e + lsl r2, r2, #2 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r4, r2 + bl ov16_022588BC + cmp r0, #0 + bne _02248610 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02248610: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_022485E0 + + thumb_func_start ov16_02248614 +ov16_02248614: ; 0x02248614 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02266820 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02248614 + + thumb_func_start ov16_0224862C +ov16_0224862C: ; 0x0224862C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0226683C + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0224862C + + thumb_func_start ov16_02248648 +ov16_02248648: ; 0x02248648 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_022668D0 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02248648 + + thumb_func_start ov16_02248660 +ov16_02248660: ; 0x02248660 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + mov r4, #0 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r2, r0, #0 + ldr r0, [sp] + add r1, r5, #0 + bl ov16_0224A984 + add r7, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02258AB8 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov16_02258ACC + str r0, [sp, #4] + cmp r6, #0x41 + bne _022486B2 + ldr r0, [sp] + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + ldr r0, [sp, #4] + cmp r1, r0 + bge _022486B2 + mov r4, #1 +_022486B2: + cmp r6, #0x67 + bne _022486CA + mov r0, #0xc0 + mul r0, r7 + add r2, r5, r0 + ldr r0, _02248700 ; =0x00002D8C + ldr r1, [r2, r0] + add r0, r0, #4 + ldr r0, [r2, r0] + cmp r1, r0 + bne _022486CA + mov r4, #1 +_022486CA: + cmp r4, #0 + beq _022486F8 + mov r1, #0xc0 + add r0, r7, #0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _02248700 ; =0x00002D8C + ldr r3, [r2, r0] + ldr r2, _02248704 ; =0x0000215C + ldr r0, [r5, r2] + add r0, r0, r3 + cmp r0, #0 + bgt _022486F8 + sub r0, r3, #1 + neg r0, r0 + str r0, [r5, r2] + add r0, r2, #0 + add r0, #0x10 + ldr r0, [r5, r0] + add r1, #0x40 + orr r0, r1 + add r2, #0x10 + str r0, [r5, r2] +_022486F8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248700: .word 0x00002D8C +_02248704: .word 0x0000215C + thumb_func_end ov16_02248660 + + thumb_func_start ov16_02248708 +ov16_02248708: ; 0x02248708 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0224A984 + add r1, r0, #0 + mov r0, #0xc0 + add r4, r1, #0 + mul r4, r0 + ldr r0, _02248798 ; =0x00002D8C + add r2, r5, r4 + ldr r0, [r2, r0] + cmp r0, #0 + beq _0224878A + ldr r0, _0224879C ; =0x0000219C + add r2, r5, r1 + ldrb r2, [r2, r0] + cmp r2, #6 + beq _0224878A + add r0, r6, #0 + bl ov16_0223DFAC + add r6, r0, #0 + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + str r0, [sp] + add r0, r6, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + add r2, r0, #0 + ldr r0, _022487A0 ; =0x00002D67 + add r1, r5, r4 + ldrb r0, [r1, r0] + cmp r0, #0x1e + beq _02248792 + ldr r1, [sp] + add r0, r5, #0 + bl ov16_022577A4 + cmp r0, #0 + bne _02248792 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 + b _02248792 +_0224878A: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02248AF0 +_02248792: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248798: .word 0x00002D8C +_0224879C: .word 0x0000219C +_022487A0: .word 0x00002D67 + thumb_func_end ov16_02248708 + + thumb_func_start ov16_022487A4 +ov16_022487A4: ; 0x022487A4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0224A984 + mov r1, #0xc0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _022487FC ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #1 + lsl r1, r1, #0x18 + tst r1, r2 + bne _022487F0 + mov r1, #0x1c + mul r1, r0 + mov r0, #0xba + add r1, r4, r1 + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #8 + tst r0, r1 + beq _022487F8 +_022487F0: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_022487F8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022487FC: .word 0x00002DB0 + thumb_func_end ov16_022487A4 + + thumb_func_start ov16_02248800 +ov16_02248800: ; 0x02248800 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + mov r0, #0xd + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02248840 + mov r0, #0x4c + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02248848 +_02248840: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02248848: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02248800 + + thumb_func_start ov16_02248850 +ov16_02248850: ; 0x02248850 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02257028 + str r0, [r4, #0x6c] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02248850 + + thumb_func_start ov16_02248880 +ov16_02248880: ; 0x02248880 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + mov r2, #0x4e + lsl r2, r2, #2 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r4, r2 + bl ov16_0225B228 + cmp r0, #0 + bne _022488B0 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_022488B0: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02248880 + + thumb_func_start ov16_022488B4 +ov16_022488B4: ; 0x022488B4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0226692C + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_022488B4 + + thumb_func_start ov16_022488E0 +ov16_022488E0: ; 0x022488E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_022669D8 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_022488E0 + + thumb_func_start ov16_0224890C +ov16_0224890C: ; 0x0224890C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224A984 + add r1, r0, #0 + add r0, r5, #0 + add r2, r7, #0 + bl ov16_02266A18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224890C + + thumb_func_start ov16_02248944 +ov16_02248944: ; 0x02248944 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov16_0223DF60 + cmp r0, #6 + bne _02248970 + ldr r0, [r5, #0x64] + bl sub_020799A0 + cmp r0, #0x12 + beq _02248980 +_02248970: + ldr r0, _02248984 ; =0x00002414 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02248980 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02248AF0 +_02248980: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02248984: .word 0x00002414 + thumb_func_end ov16_02248944 + + thumb_func_start ov16_02248988 +ov16_02248988: ; 0x02248988 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + ldr r2, [r4, #0x2c] + mov r1, #4 + tst r1, r2 + beq _022489B2 + ldr r1, _022489EC ; =0x0000240C + ldr r2, [r4, r1] + mov r1, #0x10 + tst r1, r2 + bne _022489B2 + mov r4, #2 + b _022489B4 +_022489B2: + mov r4, #1 +_022489B4: + add r1, r5, #0 + add r1, #0xf0 + ldr r1, [r1, #0] + cmp r0, r1 + ble _022489D2 + mov r1, #1 + add r0, r5, #0 + mvn r1, r1 + bl ov16_02248AF0 + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r1, r0, r4 + b _022489D4 +_022489D2: + mov r1, #0 +_022489D4: + add r0, r5, #0 + add r0, #0xf0 + str r1, [r0, #0] + ldr r1, _022489F0 ; =0x00003154 + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + str r0, [r5, r1] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022489EC: .word 0x0000240C +_022489F0: .word 0x00003154 + thumb_func_end ov16_02248988 + + thumb_func_start ov16_022489F4 +ov16_022489F4: ; 0x022489F4 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r5, #0 + bl ov16_02248AD0 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_02248AD0 + add r1, r0, #0 + ldr r0, _02248A2C ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r2, r5, r0 + ldr r0, _02248A30 ; =0x000003E2 + ldrb r0, [r2, r0] + cmp r4, r0 + bne _02248A26 + add r0, r5, #0 + bl ov16_02248AF0 +_02248A26: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02248A2C: .word 0x00003044 +_02248A30: .word 0x000003E2 + thumb_func_end ov16_022489F4 + + thumb_func_start ov16_02248A34 +ov16_02248A34: ; 0x02248A34 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r6, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + add r7, r0, #0 + add r0, r4, #0 + bl ov16_02248AD0 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_02248B10 + add r1, r0, #0 + ldr r1, [r1, #0] + ldr r2, [sp] + add r0, r6, #0 + bl sub_020759CC + mov r1, #0x4d + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02248A34 + + thumb_func_start ov16_02248A7C +ov16_02248A7C: ; 0x02248A7C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov16_02248AF0 + add r0, r4, #0 + bl ov16_02248AD0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224A984 + add r2, r0, #0 + add r1, r4, #0 + ldr r3, _02248AB0 ; =0x0000219C + add r4, r4, r2 + ldrb r3, [r4, r3] + add r0, r5, #0 + bl ov16_02251C94 + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02248AB0: .word 0x0000219C + thumb_func_end ov16_02248A7C + + thumb_func_start ov16_02248AB4 +ov16_02248AB4: ; 0x02248AB4 + ldr r2, _02248AC8 ; =0x00003154 + mov r0, #1 + ldr r3, [r1, r2] + bic r3, r0 + mov r0, #1 + orr r0, r3 + str r0, [r1, r2] + ldr r3, _02248ACC ; =ov16_02251EF4 + add r0, r1, #0 + bx r3 + ; .align 2, 0 +_02248AC8: .word 0x00003154 +_02248ACC: .word ov16_02251EF4 + thumb_func_end ov16_02248AB4 + + thumb_func_start ov16_02248AD0 +ov16_02248AD0: ; 0x02248AD0 + add r1, r0, #0 + add r1, #0xb4 + ldr r1, [r1, #0] + lsl r1, r1, #2 + add r2, r0, r1 + mov r1, #0x27 + lsl r1, r1, #8 + ldr r2, [r2, r1] + add r1, r0, #0 + add r1, #0xb4 + ldr r1, [r1, #0] + add r0, #0xb4 + add r1, r1, #1 + str r1, [r0, #0] + add r0, r2, #0 + bx lr + thumb_func_end ov16_02248AD0 + + thumb_func_start ov16_02248AF0 +ov16_02248AF0: ; 0x02248AF0 + add r2, r0, #0 + add r2, #0xb4 + ldr r2, [r2, #0] + add r0, #0xb4 + add r1, r2, r1 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_02248AF0 + + thumb_func_start ov16_02248B00 +ov16_02248B00: ; 0x02248B00 + ldr r3, _02248B04 ; =ov16_02251E1C + bx r3 + ; .align 2, 0 +_02248B04: .word ov16_02251E1C + thumb_func_end ov16_02248B00 + + thumb_func_start ov16_02248B08 +ov16_02248B08: ; 0x02248B08 + ldr r3, _02248B0C ; =ov16_02251E5C + bx r3 + ; .align 2, 0 +_02248B0C: .word ov16_02251E5C + thumb_func_end ov16_02248B08 + + thumb_func_start ov16_02248B10 +ov16_02248B10: ; 0x02248B10 + push {r4, lr} + add r4, r1, #0 + cmp r2, #0x45 + bls _02248B1A + b _02248E0C +_02248B1A: + add r1, r2, r2 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02248B26: ; jump table + .short _02248BB2 - _02248B26 - 2 ; case 0 + .short _02248BB6 - _02248B26 - 2 ; case 1 + .short _02248BBC - _02248B26 - 2 ; case 2 + .short _02248BC2 - _02248B26 - 2 ; case 3 + .short _02248BC8 - _02248B26 - 2 ; case 4 + .short _02248BCE - _02248B26 - 2 ; case 5 + .short _02248BD4 - _02248B26 - 2 ; case 6 + .short _02248BDA - _02248B26 - 2 ; case 7 + .short _02248BE2 - _02248B26 - 2 ; case 8 + .short _02248BE8 - _02248B26 - 2 ; case 9 + .short _02248BF0 - _02248B26 - 2 ; case 10 + .short _02248BF6 - _02248B26 - 2 ; case 11 + .short _02248C08 - _02248B26 - 2 ; case 12 + .short _02248C1A - _02248B26 - 2 ; case 13 + .short _02248C30 - _02248B26 - 2 ; case 14 + .short _02248C36 - _02248B26 - 2 ; case 15 + .short _02248C3C - _02248B26 - 2 ; case 16 + .short _02248C42 - _02248B26 - 2 ; case 17 + .short _02248C48 - _02248B26 - 2 ; case 18 + .short _02248C4E - _02248B26 - 2 ; case 19 + .short _02248C54 - _02248B26 - 2 ; case 20 + .short _02248C5C - _02248B26 - 2 ; case 21 + .short _02248C68 - _02248B26 - 2 ; case 22 + .short _02248C70 - _02248B26 - 2 ; case 23 + .short _02248C78 - _02248B26 - 2 ; case 24 + .short _02248C7E - _02248B26 - 2 ; case 25 + .short _02248C86 - _02248B26 - 2 ; case 26 + .short _02248C8E - _02248B26 - 2 ; case 27 + .short _02248C96 - _02248B26 - 2 ; case 28 + .short _02248C9E - _02248B26 - 2 ; case 29 + .short _02248CA4 - _02248B26 - 2 ; case 30 + .short _02248CAA - _02248B26 - 2 ; case 31 + .short _02248CB0 - _02248B26 - 2 ; case 32 + .short _02248CB6 - _02248B26 - 2 ; case 33 + .short _02248CBC - _02248B26 - 2 ; case 34 + .short _02248CC2 - _02248B26 - 2 ; case 35 + .short _02248CCA - _02248B26 - 2 ; case 36 + .short _02248CD2 - _02248B26 - 2 ; case 37 + .short _02248CDA - _02248B26 - 2 ; case 38 + .short _02248CE2 - _02248B26 - 2 ; case 39 + .short _02248CE8 - _02248B26 - 2 ; case 40 + .short _02248CF0 - _02248B26 - 2 ; case 41 + .short _02248CFE - _02248B26 - 2 ; case 42 + .short _02248D0C - _02248B26 - 2 ; case 43 + .short _02248D14 - _02248B26 - 2 ; case 44 + .short _02248D1A - _02248B26 - 2 ; case 45 + .short _02248D28 - _02248B26 - 2 ; case 46 + .short _02248D36 - _02248B26 - 2 ; case 47 + .short _02248D46 - _02248B26 - 2 ; case 48 + .short _02248D56 - _02248B26 - 2 ; case 49 + .short _02248D68 - _02248B26 - 2 ; case 50 + .short _02248D6E - _02248B26 - 2 ; case 51 + .short _02248D74 - _02248B26 - 2 ; case 52 + .short _02248D7A - _02248B26 - 2 ; case 53 + .short _02248D86 - _02248B26 - 2 ; case 54 + .short _02248D8C - _02248B26 - 2 ; case 55 + .short _02248D92 - _02248B26 - 2 ; case 56 + .short _02248D98 - _02248B26 - 2 ; case 57 + .short _02248D9E - _02248B26 - 2 ; case 58 + .short _02248DA4 - _02248B26 - 2 ; case 59 + .short _02248DAA - _02248B26 - 2 ; case 60 + .short _02248DB2 - _02248B26 - 2 ; case 61 + .short _02248DB8 - _02248B26 - 2 ; case 62 + .short _02248DBC - _02248B26 - 2 ; case 63 + .short _02248DC2 - _02248B26 - 2 ; case 64 + .short _02248DC8 - _02248B26 - 2 ; case 65 + .short _02248DD8 - _02248B26 - 2 ; case 66 + .short _02248DE8 - _02248B26 - 2 ; case 67 + .short _02248DF6 - _02248B26 - 2 ; case 68 + .short _02248E06 - _02248B26 - 2 ; case 69 +_02248BB2: + add r0, #0x2c + pop {r4, pc} +_02248BB6: + ldr r0, _02248E10 ; =0x0000214C + add r0, r4, r0 + pop {r4, pc} +_02248BBC: + ldr r0, _02248E14 ; =0x00002170 + add r0, r4, r0 + pop {r4, pc} +_02248BC2: + ldr r0, _02248E18 ; =0x00002174 + add r0, r4, r0 + pop {r4, pc} +_02248BC8: + ldr r0, _02248E1C ; =0x00002178 + add r0, r4, r0 + pop {r4, pc} +_02248BCE: + add r4, #0x88 + add r0, r4, #0 + pop {r4, pc} +_02248BD4: + ldr r0, _02248E20 ; =0x0000213C + add r0, r4, r0 + pop {r4, pc} +_02248BDA: + mov r0, #6 + lsl r0, r0, #6 + add r0, r4, r0 + pop {r4, pc} +_02248BE2: + ldr r0, _02248E24 ; =0x00002158 + add r0, r4, r0 + pop {r4, pc} +_02248BE8: + mov r0, #0x4d + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248BF0: + ldr r0, _02248E28 ; =0x0000216C + add r0, r4, r0 + pop {r4, pc} +_02248BF6: + ldr r1, [r4, #0x64] + bl ov16_0223E208 + mov r1, #0x6f + lsl r1, r1, #2 + add r1, r4, r1 + lsl r0, r0, #2 + add r0, r1, r0 + pop {r4, pc} +_02248C08: + ldr r1, [r4, #0x6c] + bl ov16_0223E208 + mov r1, #0x6f + lsl r1, r1, #2 + add r1, r4, r1 + lsl r0, r0, #2 + add r0, r1, r0 + pop {r4, pc} +_02248C1A: + add r1, r4, #0 + add r1, #0x94 + ldr r1, [r1, #0] + bl ov16_0223E208 + mov r1, #0x6f + lsl r1, r1, #2 + add r1, r4, r1 + lsl r0, r0, #2 + add r0, r1, r0 + pop {r4, pc} +_02248C30: + ldr r0, _02248E2C ; =0x00002144 + add r0, r4, r0 + pop {r4, pc} +_02248C36: + add r4, #0x64 + add r0, r4, #0 + pop {r4, pc} +_02248C3C: + add r4, #0x6c + add r0, r4, #0 + pop {r4, pc} +_02248C42: + add r4, #0x94 + add r0, r4, #0 + pop {r4, pc} +_02248C48: + add r4, #0x74 + add r0, r4, #0 + pop {r4, pc} +_02248C4E: + add r4, #0x78 + add r0, r4, #0 + pop {r4, pc} +_02248C54: + mov r0, #0x46 + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248C5C: + ldr r0, _02248E30 ; =0x000030E4 + add r1, r4, r0 + ldr r0, [r4, #0x64] + lsl r0, r0, #2 + add r0, r1, r0 + pop {r4, pc} +_02248C68: + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + pop {r4, pc} +_02248C70: + mov r0, #0x53 + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248C78: + ldr r0, _02248E34 ; =0x00003044 + add r0, r4, r0 + pop {r4, pc} +_02248C7E: + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + pop {r4, pc} +_02248C86: + mov r0, #0x47 + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248C8E: + mov r0, #0x12 + lsl r0, r0, #4 + add r0, r4, r0 + pop {r4, pc} +_02248C96: + mov r0, #0xc1 + lsl r0, r0, #6 + add r0, r4, r0 + pop {r4, pc} +_02248C9E: + add r4, #0x98 + add r0, r4, #0 + pop {r4, pc} +_02248CA4: + ldr r0, _02248E38 ; =0x00002154 + add r0, r4, r0 + pop {r4, pc} +_02248CAA: + add r4, #0x38 + add r0, r4, #0 + pop {r4, pc} +_02248CB0: + ldr r0, _02248E3C ; =0x0000215C + add r0, r4, r0 + pop {r4, pc} +_02248CB6: + ldr r1, _02248E40 ; =0x00002420 + add r0, r0, r1 + pop {r4, pc} +_02248CBC: + add r4, #0x8c + add r0, r4, #0 + pop {r4, pc} +_02248CC2: + mov r0, #0x49 + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248CCA: + mov r0, #0x4a + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248CD2: + mov r0, #0x4b + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248CDA: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248CE2: + ldr r0, _02248E44 ; =0x00003104 + add r0, r4, r0 + pop {r4, pc} +_02248CE8: + mov r0, #0x86 + lsl r0, r0, #6 + add r0, r4, r0 + pop {r4, pc} +_02248CF0: + mov r0, #0x7b + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, [r4, #0x64] + lsl r0, r0, #6 + add r0, r1, r0 + pop {r4, pc} +_02248CFE: + mov r0, #0x81 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, [r4, #0x64] + lsl r0, r0, #6 + add r0, r1, r0 + pop {r4, pc} +_02248D0C: + mov r0, #0x4e + lsl r0, r0, #2 + add r0, r4, r0 + pop {r4, pc} +_02248D14: + ldr r0, _02248E48 ; =0x00002150 + add r0, r4, r0 + pop {r4, pc} +_02248D1A: + mov r0, #0x82 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, [r4, #0x64] + lsl r0, r0, #6 + add r0, r1, r0 + pop {r4, pc} +_02248D28: + mov r0, #0x82 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, [r4, #0x6c] + lsl r0, r0, #6 + add r0, r1, r0 + pop {r4, pc} +_02248D36: + mov r0, #0xba + lsl r0, r0, #2 + add r2, r4, r0 + ldr r1, [r4, #0x64] + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} +_02248D46: + mov r0, #0xba + lsl r0, r0, #2 + add r2, r4, r0 + ldr r1, [r4, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} +_02248D56: + mov r0, #0xba + lsl r0, r0, #2 + add r2, r4, r0 + add r4, #0x94 + ldr r1, [r4, #0] + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} +_02248D68: + ldr r0, _02248E4C ; =0x00003114 + add r0, r4, r0 + pop {r4, pc} +_02248D6E: + ldr r0, _02248E50 ; =0x00003118 + add r0, r4, r0 + pop {r4, pc} +_02248D74: + ldr r1, _02248E54 ; =0x0000240C + add r0, r0, r1 + pop {r4, pc} +_02248D7A: + ldr r0, _02248E58 ; =0x0000304C + add r1, r4, r0 + ldr r0, [r4, #0x64] + lsl r0, r0, #2 + add r0, r1, r0 + pop {r4, pc} +_02248D86: + ldr r0, _02248E5C ; =0x00002148 + add r0, r4, r0 + pop {r4, pc} +_02248D8C: + ldr r1, _02248E60 ; =0x00002414 + add r0, r0, r1 + pop {r4, pc} +_02248D92: + add r4, #0x7c + add r0, r4, #0 + pop {r4, pc} +_02248D98: + ldr r0, _02248E64 ; =0x00002160 + add r0, r4, r0 + pop {r4, pc} +_02248D9E: + ldr r0, _02248E68 ; =0x00002164 + add r0, r4, r0 + pop {r4, pc} +_02248DA4: + ldr r1, _02248E6C ; =0x0000241C + add r0, r0, r1 + pop {r4, pc} +_02248DAA: + mov r0, #0x85 + lsl r0, r0, #6 + add r0, r4, r0 + pop {r4, pc} +_02248DB2: + add r4, #0xec + add r0, r4, #0 + pop {r4, pc} +_02248DB8: + add r0, #0x44 + pop {r4, pc} +_02248DBC: + add r4, #0x68 + add r0, r4, #0 + pop {r4, pc} +_02248DC2: + add r4, #0x70 + add r0, r4, #0 + pop {r4, pc} +_02248DC8: + mov r0, #0xb6 + lsl r0, r0, #2 + add r2, r4, r0 + ldr r1, [r4, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} +_02248DD8: + mov r0, #0x21 + lsl r0, r0, #4 + add r1, r4, r0 + sub r0, #0xf8 + ldr r0, [r4, r0] + lsl r0, r0, #6 + add r0, r1, r0 + pop {r4, pc} +_02248DE8: + mov r0, #0x21 + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, [r4, #0x6c] + lsl r0, r0, #6 + add r0, r1, r0 + pop {r4, pc} +_02248DF6: + mov r0, #0xbb + lsl r0, r0, #2 + add r2, r4, r0 + ldr r1, [r4, #0x64] + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} +_02248E06: + ldr r0, _02248E70 ; =0x00003150 + add r0, r4, r0 + pop {r4, pc} +_02248E0C: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02248E10: .word 0x0000214C +_02248E14: .word 0x00002170 +_02248E18: .word 0x00002174 +_02248E1C: .word 0x00002178 +_02248E20: .word 0x0000213C +_02248E24: .word 0x00002158 +_02248E28: .word 0x0000216C +_02248E2C: .word 0x00002144 +_02248E30: .word 0x000030E4 +_02248E34: .word 0x00003044 +_02248E38: .word 0x00002154 +_02248E3C: .word 0x0000215C +_02248E40: .word 0x00002420 +_02248E44: .word 0x00003104 +_02248E48: .word 0x00002150 +_02248E4C: .word 0x00003114 +_02248E50: .word 0x00003118 +_02248E54: .word 0x0000240C +_02248E58: .word 0x0000304C +_02248E5C: .word 0x00002148 +_02248E60: .word 0x00002414 +_02248E64: .word 0x00002160 +_02248E68: .word 0x00002164 +_02248E6C: .word 0x0000241C +_02248E70: .word 0x00003150 + thumb_func_end ov16_02248B10 + + thumb_func_start ov16_02248E74 +ov16_02248E74: ; 0x02248E74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xd8 + add r4, r1, #0 + str r0, [sp, #0x14] + ldr r0, [r4, #0] + bl ov16_0223E05C + str r0, [sp, #0x40] + ldr r0, [r4, #0] + bl ov16_0223DF0C + str r0, [sp, #0x3c] + ldr r0, [r4, #4] + mov r7, #0 + ldr r0, [r0, #0x74] + ldr r5, [r4, #0x48] + asr r1, r0, #1 + mov r0, #1 + and r0, r1 + str r0, [sp, #0x44] + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223DF60 + cmp r5, r0 + bge _02248EF6 + ldr r0, [sp, #0x44] + lsl r0, r0, #2 + str r0, [sp, #0x28] +_02248EAE: + ldr r0, [r4, #0] + mov r1, #0 + add r2, r5, #0 + bl ov16_0223DFAC + mov r1, #6 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r1, #1 + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0x33 + beq _02248EF6 + add r0, r5, #0 + bl sub_020787CC + add r2, r0, #0 + ldr r1, [r4, #4] + ldr r0, [sp, #0x28] + add r0, r0, r1 + add r0, #0xa4 + ldr r0, [r0, #0] + tst r0, r2 + bne _02248EF6 + ldr r0, [r4, #0] + mov r1, #0 + add r5, r5, #1 + bl ov16_0223DF60 + cmp r5, r0 + blt _02248EAE +_02248EF6: + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF60 + cmp r5, r0 + bne _02248F08 + mov r0, #0x26 + str r0, [r4, #0x28] + b _02248F24 +_02248F08: + ldr r0, [sp, #0x3c] + mov r2, #2 + tst r0, r2 + beq _02248F24 + ldr r0, [sp, #0x3c] + mov r1, #0x40 + tst r0, r1 + bne _02248F24 + ldr r1, [r4, #4] + ldr r0, _0224920C ; =0x0000219E + ldrb r0, [r1, r0] + cmp r0, r5 + bne _02248F24 + add r7, r2, #0 +_02248F24: + ldr r0, [r4, #0x28] + cmp r0, #0x26 + bls _02248F2E + bl _0224998E +_02248F2E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02248F3A: ; jump table + .short _02248F88 - _02248F3A - 2 ; case 0 + .short _0224915A - _02248F3A - 2 ; case 1 + .short _02249172 - _02248F3A - 2 ; case 2 + .short _02249184 - _02248F3A - 2 ; case 3 + .short _022491B0 - _02248F3A - 2 ; case 4 + .short _022491C4 - _02248F3A - 2 ; case 5 + .short _022491FC - _02248F3A - 2 ; case 6 + .short _022492FC - _02248F3A - 2 ; case 7 + .short _02249318 - _02248F3A - 2 ; case 8 + .short _02249336 - _02248F3A - 2 ; case 9 + .short _022493DE - _02248F3A - 2 ; case 10 + .short _02249522 - _02248F3A - 2 ; case 11 + .short _022494A0 - _02248F3A - 2 ; case 12 + .short _02249522 - _02248F3A - 2 ; case 13 + .short _02249544 - _02248F3A - 2 ; case 14 + .short _022495A6 - _02248F3A - 2 ; case 15 + .short _0224965A - _02248F3A - 2 ; case 16 + .short _022496BA - _02248F3A - 2 ; case 17 + .short _0224968C - _02248F3A - 2 ; case 18 + .short _022496BA - _02248F3A - 2 ; case 19 + .short _022496D2 - _02248F3A - 2 ; case 20 + .short _022496F2 - _02248F3A - 2 ; case 21 + .short _0224973A - _02248F3A - 2 ; case 22 + .short _0224975E - _02248F3A - 2 ; case 23 + .short _0224984A - _02248F3A - 2 ; case 24 + .short _022496BA - _02248F3A - 2 ; case 25 + .short _02249872 - _02248F3A - 2 ; case 26 + .short _022496BA - _02248F3A - 2 ; case 27 + .short _022498AE - _02248F3A - 2 ; case 28 + .short _022496BA - _02248F3A - 2 ; case 29 + .short _022498D6 - _02248F3A - 2 ; case 30 + .short _02249796 - _02248F3A - 2 ; case 31 + .short _022496BA - _02248F3A - 2 ; case 32 + .short _022497C0 - _02248F3A - 2 ; case 33 + .short _022497E2 - _02248F3A - 2 ; case 34 + .short _02249832 - _02248F3A - 2 ; case 35 + .short _0224993C - _02248F3A - 2 ; case 36 + .short _02249952 - _02248F3A - 2 ; case 37 + .short _02249978 - _02248F3A - 2 ; case 38 +_02248F88: + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r1, #1 + mov r2, #5 + bl sub_0207CFF0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x3c] + mov r1, #1 + and r0, r1 + str r0, [sp, #0x20] + bne _02248FE6 + ldr r1, [r4, #4] + ldr r0, _02249210 ; =0x00002E4C + ldr r2, _02249214 ; =0x00002FCC + ldr r0, [r1, r0] + ldr r1, [r1, r2] + add r0, r0, r1 + bne _02248FE6 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02248FE6 + ldr r1, [r4, #4] + ldr r0, _02249218 ; =0x00003144 + ldr r0, [r1, r0] + cmp r0, #0 + bne _02248FE6 + ldr r0, _0224921C ; =0x00000467 + bl sub_0200549C + ldr r1, [r4, #4] + ldr r0, _02249218 ; =0x00003144 + mov r2, #1 + str r2, [r1, r0] + ldr r0, [r4, #0] + mov r1, #2 + bl ov16_0223F460 +_02248FE6: + mov r0, #0 + str r0, [sp, #0x38] + mov r1, #1 + add r0, sp, #0xb4 + strh r1, [r0, #2] + ldr r2, [sp, #0x38] + add r0, r6, #0 + mov r1, #0xa3 + bl sub_02074470 + cmp r0, #0 + beq _0224900C + add r0, r6, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + cmp r0, #0x64 + bne _0224900E +_0224900C: + b _0224911A +_0224900E: + ldr r0, [r4, #4] + str r0, [sp, #0x24] + add r0, r5, #0 + bl sub_020787CC + ldr r1, [sp, #0x44] + lsl r2, r1, #2 + ldr r1, [sp, #0x24] + add r1, r1, r2 + add r1, #0xa4 + ldr r1, [r1, #0] + tst r0, r1 + beq _02249030 + ldr r0, [sp, #0x24] + add r0, #0x9c + ldr r0, [r0, #0] + str r0, [sp, #0x38] +_02249030: + ldr r0, [sp, #0x18] + cmp r0, #0x33 + bne _02249044 + ldr r0, [sp, #0x24] + add r0, #0xa0 + str r0, [sp, #0x24] + ldr r1, [r0, #0] + ldr r0, [sp, #0x38] + add r0, r0, r1 + str r0, [sp, #0x38] +_02249044: + ldr r0, [sp, #0x18] + cmp r0, #0x42 + bne _02249058 + ldr r1, [sp, #0x38] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E2178 + str r0, [sp, #0x38] +_02249058: + ldr r0, [sp, #0x20] + cmp r0, #0 + beq _0224906C + ldr r1, [sp, #0x38] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E2178 + str r0, [sp, #0x38] +_0224906C: + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov16_02259B38 + cmp r0, #0 + bne _022490AE + add r0, r6, #0 + mov r1, #0xc + mov r2, #0 + bl sub_02074470 + ldr r1, _02249220 ; =0x020E4C44 + ldrb r1, [r1] + cmp r1, r0 + beq _0224909A + ldr r1, [sp, #0x38] + mov r0, #0xaa + mul r0, r1 + mov r1, #0x64 + bl sub_020E2178 + str r0, [sp, #0x38] + b _022490A8 +_0224909A: + ldr r1, [sp, #0x38] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E2178 + str r0, [sp, #0x38] +_022490A8: + mov r1, #2 + add r0, sp, #0xb4 + strh r1, [r0, #2] +_022490AE: + add r0, r6, #0 + mov r1, #8 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x4c] + add r0, r6, #0 + bl sub_02075AAC + ldr r1, [sp, #0x4c] + sub r0, r1, r0 + str r0, [r4, #0x3c] + ldr r1, [sp, #0x4c] + ldr r0, [sp, #0x38] + add r2, r1, r0 + str r2, [sp, #0x4c] + ldr r3, [r4, #4] + ldr r0, _02249224 ; =0x0000219C + add r1, r3, r7 + ldrb r0, [r1, r0] + cmp r5, r0 + bne _022490E4 + mov r0, #0xc0 + mul r0, r7 + add r1, r3, r0 + ldr r0, _02249228 ; =0x00002DA4 + str r2, [r1, r0] +_022490E4: + add r0, r6, #0 + mov r1, #8 + add r2, sp, #0x4c + bl sub_02074B30 + ldr r0, [r4, #4] + ldr r1, [r0, #0x74] + str r0, [sp, #0x1c] + add r6, r1, #0 + mov r0, #0xc0 + mul r6, r0 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223DF20 + ldr r2, [sp, #0x1c] + mov r3, #0xb5 + add r6, r2, r6 + lsl r3, r3, #6 + ldrh r2, [r6, r3] + add r3, #0x26 + ldrb r3, [r6, r3] + add r1, r5, #0 + lsl r3, r3, #0x1b + lsr r3, r3, #0x1b + bl ov16_022499C0 +_0224911A: + ldr r0, [sp, #0x38] + cmp r0, #0 + beq _02249152 + mov r1, #0x11 + add r0, sp, #0xb4 + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r0, [sp, #0x38] + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #7 + str r0, [r4, #0x34] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249152: + mov r0, #0x25 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224915A: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02249206 + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249172: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _02249206 + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249184: + ldr r1, [r4, #4] + ldr r0, _02249224 ; =0x0000219C + add r2, r1, r7 + ldrb r0, [r2, r0] + cmp r5, r0 + bne _022491A8 + ldr r0, [r4, #0] + ldr r3, [r4, #0x3c] + add r2, r7, #0 + bl ov16_02265D14 + mov r0, #0 + str r0, [r4, #0x3c] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022491A8: + mov r0, #5 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022491B0: + ldr r0, [r4, #4] + bl ov16_02251FC8 + cmp r0, #0 + beq _02249206 + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022491C4: + add r0, r6, #0 + bl sub_02076B14 + cmp r0, #0 + beq _022491F4 + ldr r1, [r4, #4] + ldr r0, _02249224 ; =0x0000219C + add r2, r1, r7 + ldrb r0, [r2, r0] + cmp r5, r0 + bne _022491EC + ldr r0, [r4, #0] + add r2, r7, #0 + mov r3, #8 + bl ov16_02265FF8 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0226614C +_022491EC: + mov r0, #6 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022491F4: + mov r0, #0x25 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022491FC: + ldr r0, [r4, #4] + bl ov16_02251FC8 + cmp r0, #0 + bne _02249208 +_02249206: + b _0224998E +_02249208: + ldr r2, _0224922C ; =0x0226E608 + b _02249230 + ; .align 2, 0 +_0224920C: .word 0x0000219E +_02249210: .word 0x00002E4C +_02249214: .word 0x00002FCC +_02249218: .word 0x00003144 +_0224921C: .word 0x00000467 +_02249220: .word 0x020E4C44 +_02249224: .word 0x0000219C +_02249228: .word 0x00002DA4 +_0224922C: .word 0x0226E608 +_02249230: + add r3, sp, #0x9c + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r6, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x34] + mov r0, #5 + mov r1, #0x18 + bl sub_02018144 + mov r1, #0x5f + ldr r2, [r4, #4] + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #4] + ldr r0, [r0, r1] + mov r1, #0 + str r0, [sp, #0x30] + str r1, [sp, #0x50] +_02249264: + lsl r2, r1, #2 + add r1, sp, #0x9c + ldr r1, [r1, r2] + add r0, r6, #0 + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #0x50] + lsl r2, r1, #2 + ldr r1, [sp, #0x30] + str r0, [r1, r2] + ldr r0, [sp, #0x50] + add r1, r0, #1 + str r1, [sp, #0x50] + cmp r1, #6 + blt _02249264 + ldr r0, [r4, #0] + bl ov16_0223E24C + add r2, r0, #0 + lsl r2, r2, #0x10 + add r0, r6, #0 + mov r1, #0 + lsr r2, r2, #0x10 + bl sub_02075C74 + add r0, r6, #0 + bl sub_020741B8 + ldr r1, [r4, #4] + ldr r0, _022495E8 ; =0x0000219C + add r2, r1, r7 + ldrb r3, [r2, r0] + cmp r5, r3 + bne _022492B2 + ldr r0, [r4, #0] + add r2, r7, #0 + bl ov16_02251C94 +_022492B2: + add r0, r5, #0 + bl sub_020787CC + ldr r1, [r4, #4] + ldr r2, _022495EC ; =0x00003109 + ldrb r3, [r1, r2] + orr r0, r3 + strb r0, [r1, r2] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r7, #0 + bl ov16_022661CC + mov r1, #3 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0x11 + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r0, [sp, #0x34] + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #7 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022492FC: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _0224930C + b _0224998E +_0224930C: + mov r0, #8 + str r0, [r4, #0x28] + mov r0, #0 + add sp, #0xd8 + str r0, [r4, #0x38] + pop {r3, r4, r5, r6, r7, pc} +_02249318: + ldr r0, [r4, #4] + add r1, r0, r7 + ldr r0, _022495E8 ; =0x0000219C + ldrb r0, [r1, r0] + cmp r5, r0 + beq _0224932E + ldr r0, [r4, #0] + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0224B520 +_0224932E: + mov r0, #9 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249336: + ldr r0, [r4, #0] + bl ov16_0223DF00 + add r6, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223DF04 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E064 + add r7, r0, #0 + ldr r0, _022495F0 ; =0x04000008 + mov r2, #3 + ldrh r1, [r0] + bic r1, r2 + mov r2, #2 + orr r1, r2 + strh r1, [r0] + mov r0, #1 + add r1, r0, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + ldr r0, [r4, #0] + mov r1, #2 + bl ov16_0223F8DC + mov r0, #5 + str r0, [sp] + add r0, r6, #0 + mov r1, #2 + mov r2, #1 + mov r3, #0 + bl sub_0200DA60 + bl sub_0200DAA0 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x80 + str r0, [sp, #8] + add r0, r7, #0 + mov r1, #0x26 + mov r3, #5 + bl sub_02003050 + mov r0, #7 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #0xc + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + mov r0, #0xa + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, r5, #0 + mov r2, #2 + mov r3, #0x11 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0xff + bl sub_0201ADA4 + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + mov r3, #8 + bl sub_0200DC48 + mov r0, #0xa + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022493DE: + ldr r3, _022495F4 ; =0x0226E620 + add r2, sp, #0x84 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r3, _022495F8 ; =0x0226E5A8 + add r2, sp, #0x6c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223DF04 + add r7, r0, #0 + mov r0, #0x5f + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + str r0, [sp, #0x2c] + mov r0, #0 + str r0, [sp, #0x50] +_02249416: + ldr r2, _022495FC ; =0x000003B3 + add r1, sp, #0xb4 + strh r2, [r1, #2] + mov r2, #4 + strb r2, [r1, #1] + lsl r2, r0, #2 + add r1, sp, #0x84 + ldr r1, [r1, r2] + lsl r0, r0, #4 + str r1, [sp, #0xb8] + mov r1, #0 + str r1, [sp] + str r0, [sp, #4] + add r0, r1, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r4, #0] + ldr r2, [sp, #0x40] + add r1, r7, #0 + add r3, sp, #0xb4 + bl ov16_0223FB78 + mov r1, #0xed + ldr r5, [sp, #0x50] + lsl r1, r1, #2 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #7 + strb r1, [r0, #1] + lsl r2, r5, #2 + add r1, sp, #0x6c + ldr r1, [r1, r2] + add r0, r6, #0 + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #0x2c] + lsl r2, r5, #2 + ldr r1, [r1, r2] + ldr r2, [sp, #0x40] + sub r0, r0, r1 + str r0, [sp, #0xb8] + mov r0, #2 + str r0, [sp, #0xd0] + mov r0, #0x50 + str r0, [sp] + lsl r0, r5, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0x1c + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r7, #0 + add r3, sp, #0xb4 + bl ov16_0223FB78 + ldr r0, [sp, #0x50] + add r0, r0, #1 + str r0, [sp, #0x50] + cmp r0, #6 + blt _02249416 + mov r0, #0xb + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022494A0: + ldr r3, _02249600 ; =0x0226E5D8 + add r2, sp, #0x54 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223DF04 + mov r1, #0x24 + str r1, [sp] + mov r1, #0x60 + str r1, [sp, #4] + mov r1, #0xf + mov r2, #0x50 + mov r3, #0 + add r7, r0, #0 + bl sub_0201AE78 + mov r1, #0 + str r1, [sp, #0x50] + add r5, sp, #0xb4 +_022494D2: + ldr r0, _02249604 ; =0x000003B5 + lsl r2, r1, #2 + add r1, sp, #0x54 + strh r0, [r5, #2] + mov r0, #7 + ldr r1, [r1, r2] + strb r0, [r5, #1] + add r0, r6, #0 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xb8] + mov r0, #3 + str r0, [sp, #0xd0] + mov r0, #0x48 + str r0, [sp] + ldr r0, [sp, #0x50] + ldr r2, [sp, #0x40] + lsl r0, r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0x24 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r7, #0 + add r3, r5, #0 + bl ov16_0223FB78 + ldr r0, [sp, #0x50] + add r1, r0, #1 + str r1, [sp, #0x50] + cmp r1, #6 + blt _022494D2 + mov r0, #0xd + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249522: + ldr r0, _02249608 ; =0x021BF67C + ldr r1, [r0, #0x48] + ldr r0, _0224960C ; =0x00000C03 + tst r0, r1 + bne _02249534 + bl sub_02022798 + cmp r0, #0 + beq _022495C2 +_02249534: + ldr r0, _02249610 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249544: + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223DF04 + add r6, r0, #0 + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + bl sub_0201A8FC + ldr r1, _022495F0 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r2, r0 + strh r2, [r1] + mov r1, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223F8DC + ldr r0, [r4, #4] + add r1, r0, r7 + ldr r0, _022495E8 ; =0x0000219C + ldrb r0, [r1, r0] + cmp r5, r0 + beq _02249592 + ldr r0, [r4, #0] + add r1, r4, #0 + bl ov16_0224B7CC +_02249592: + mov r0, #0x5f + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_020181C4 + mov r0, #0xf + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022495A6: + ldr r0, [r4, #0] + bl ov16_0223DF00 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x38 + add r2, sp, #0x48 + bl sub_0207727C + cmp r0, #0 + beq _022495CC + ldr r1, _02249614 ; =0x0000FFFE + cmp r0, r1 + bne _022495C4 +_022495C2: + b _0224998E +_022495C4: + add r1, r1, #1 + cmp r0, r1 + beq _022495D4 + b _022495E2 +_022495CC: + mov r0, #3 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022495D4: + add r0, sp, #0x48 + ldrh r0, [r0] + add sp, #0xd8 + str r0, [r4, #0x40] + mov r0, #0x10 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022495E2: + ldr r1, [r4, #4] + ldr r0, _022495E8 ; =0x0000219C + b _02249618 + ; .align 2, 0 +_022495E8: .word 0x0000219C +_022495EC: .word 0x00003109 +_022495F0: .word 0x04000008 +_022495F4: .word 0x0226E620 +_022495F8: .word 0x0226E5A8 +_022495FC: .word 0x000003B3 +_02249600: .word 0x0226E5D8 +_02249604: .word 0x000003B5 +_02249608: .word 0x021BF67C +_0224960C: .word 0x00000C03 +_02249610: .word 0x000005DC +_02249614: .word 0x0000FFFE +_02249618: + add r2, r1, r7 + ldrb r3, [r2, r0] + cmp r5, r3 + bne _02249628 + ldr r0, [r4, #0] + add r2, r7, #0 + bl ov16_02251C94 +_02249628: + mov r1, #4 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0xa + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + add r0, sp, #0x48 + ldrh r0, [r0] + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x24 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224965A: + ldr r1, _02249994 ; =0x0000049A + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0xa + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r0, [r4, #0x40] + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224968C: + ldr r1, _02249998 ; =0x0000049B + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #2 + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022496BA: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _022496FE + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022496D2: + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r3, _0224999C ; =0x0000049C + add r2, r7, #0 + bl ov16_02265B2C + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022496F2: + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov16_02259AB4 + cmp r0, #0 + bne _02249700 +_022496FE: + b _0224998E +_02249700: + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _02249714 + mov r0, #0x1f + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249714: + ldr r1, _022499A0 ; =0x0000049F + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x16 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224973A: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02249840 + ldr r0, [r4, #0] + ldr r2, [r4, #0x40] + add r1, r7, #0 + add r3, r5, #0 + bl ov16_022664C4 + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224975E: + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _02249772 + mov r0, #0x1f + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249772: + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _02249840 + ldr r1, [r4, #4] + lsl r0, r7, #8 + add r1, r1, r0 + mov r0, #0x23 + lsl r0, r0, #8 + ldrb r0, [r1, r0] + add sp, #0xd8 + sub r0, r0, #1 + str r0, [r4, #0x44] + mov r0, #0x18 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249796: + mov r1, #0x4a + lsl r1, r1, #4 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022497C0: + mov r0, #2 + str r0, [sp] + ldr r0, [r4, #0x40] + ldr r3, _022499A4 ; =0x000004A1 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r7, #0 + bl ov16_02265B2C + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022497E2: + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _02249840 + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _02249802 + mov r0, #0x10 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249802: + ldr r1, _022499A8 ; =0x000004A4 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0xa + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r0, [r4, #0x40] + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x23 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249832: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _02249842 +_02249840: + b _0224998E +_02249842: + mov r0, #0xf + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224984A: + ldr r1, _022499AC ; =0x000004A5 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249872: + ldr r1, _022499B0 ; =0x000004A6 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0xa + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r1, [r4, #0x44] + add r0, r6, #0 + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022498AE: + ldr r1, _022499B4 ; =0x000004A7 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + ldr r0, [r4, #0x28] + add sp, #0xd8 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_022498D6: + ldr r1, _022499B8 ; =0x000004A8 + add r0, sp, #0xb4 + strh r1, [r0, #2] + mov r1, #0xa + strb r1, [r0, #1] + lsl r0, r5, #8 + orr r0, r7 + str r0, [sp, #0xb8] + ldr r0, [r4, #0x40] + str r0, [sp, #0xbc] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x40] + add r2, sp, #0xb4 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0 + str r0, [sp, #0x50] + ldr r1, [r4, #0x44] + add r0, r6, #0 + add r1, #0x3e + add r2, sp, #0x50 + bl sub_02074B30 + ldr r1, [r4, #0x40] + ldr r2, [r4, #0x44] + lsl r1, r1, #0x10 + lsl r2, r2, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x10 + lsr r2, r2, #0x18 + bl sub_02077230 + ldr r1, [r4, #4] + ldr r0, _022499BC ; =0x0000219C + add r2, r1, r7 + ldrb r3, [r2, r0] + cmp r5, r3 + bne _02249934 + ldr r0, [r4, #0] + add r2, r7, #0 + bl ov16_02251C94 +_02249934: + mov r0, #0x24 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224993C: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0224998E + mov r0, #0xf + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249952: + add r0, r5, #0 + bl sub_020787CC + ldr r1, [sp, #0x44] + ldr r2, [r4, #4] + mov r3, #0 + mvn r3, r3 + add r2, #0xa4 + lsl r1, r1, #2 + ldr r6, [r2, r1] + eor r0, r3 + and r0, r6 + str r0, [r2, r1] + add r0, r5, #1 + str r0, [r4, #0x48] + mov r0, #0 + add sp, #0xd8 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249978: + mov r0, #0x5e + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #2 + str r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x14] + bl sub_0200DA58 +_0224998E: + add sp, #0xd8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02249994: .word 0x0000049A +_02249998: .word 0x0000049B +_0224999C: .word 0x0000049C +_022499A0: .word 0x0000049F +_022499A4: .word 0x000004A1 +_022499A8: .word 0x000004A4 +_022499AC: .word 0x000004A5 +_022499B0: .word 0x000004A6 +_022499B4: .word 0x000004A7 +_022499B8: .word 0x000004A8 +_022499BC: .word 0x0000219C + thumb_func_end ov16_02248E74 + + thumb_func_start ov16_022499C0 +ov16_022499C0: ; 0x022499C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp] + str r1, [sp, #4] + add r0, r2, #0 + add r1, r3, #0 + mov r2, #5 + mov r4, #0 + bl sub_02075874 + add r7, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #4] + bl sub_0207A0FC + mov r1, #6 + add r2, r4, #0 + str r0, [sp, #0x14] + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r6, #0 + mov r1, #1 + mov r2, #5 + bl sub_0207CFF0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #2 + mov r2, #5 + bl sub_0207CFF0 + add r6, r0, #0 + add r0, r4, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x1c] + add r0, sp, #0x20 + str r0, [sp, #0xc] +_02249A0E: + ldr r1, [sp, #0x1c] + ldr r0, [sp, #0x14] + add r1, #0xd + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #0xc] + strb r0, [r1] + add r0, r1, #0 + ldrb r1, [r0] + ldr r0, [sp, #0x18] + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #6 + blt _02249A0E + mov r0, #0 + str r0, [sp, #8] + add r0, sp, #0x20 + str r0, [sp, #0x10] +_02249A44: + ldr r1, [sp, #0x18] + ldr r0, _02249B7C ; =0x000001FE + cmp r1, r0 + blo _02249A4E + b _02249B72 +_02249A4E: + ldr r0, [sp, #8] + cmp r0, #5 + bhi _02249AFA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02249A60: ; jump table + .short _02249A6C - _02249A60 - 2 ; case 0 + .short _02249A84 - _02249A60 - 2 ; case 1 + .short _02249A9C - _02249A60 - 2 ; case 2 + .short _02249AB4 - _02249A60 - 2 ; case 3 + .short _02249ACC - _02249A60 - 2 ; case 4 + .short _02249AE4 - _02249A60 - 2 ; case 5 +_02249A6C: + add r0, r7, #0 + mov r1, #0xa + bl sub_020758B0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + cmp r5, #0x7a + bne _02249AFA + add r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _02249AFA +_02249A84: + add r0, r7, #0 + mov r1, #0xb + bl sub_020758B0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + cmp r5, #0x75 + bne _02249AFA + add r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _02249AFA +_02249A9C: + add r0, r7, #0 + mov r1, #0xc + bl sub_020758B0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + cmp r5, #0x76 + bne _02249AFA + add r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _02249AFA +_02249AB4: + add r0, r7, #0 + mov r1, #0xd + bl sub_020758B0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + cmp r5, #0x79 + bne _02249AFA + add r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _02249AFA +_02249ACC: + add r0, r7, #0 + mov r1, #0xe + bl sub_020758B0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + cmp r5, #0x77 + bne _02249AFA + add r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _02249AFA +_02249AE4: + add r0, r7, #0 + mov r1, #0xf + bl sub_020758B0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + cmp r5, #0x78 + bne _02249AFA + add r0, r4, r6 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_02249AFA: + ldr r0, [sp, #4] + bl sub_020787CC + add r1, r0, #0 + lsl r1, r1, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + bl sub_02077758 + cmp r0, #0 + beq _02249B14 + lsl r0, r4, #0x11 + asr r4, r0, #0x10 +_02249B14: + cmp r5, #0x32 + bne _02249B1C + lsl r0, r4, #0x11 + asr r4, r0, #0x10 +_02249B1C: + ldr r0, [sp, #0x18] + ldr r1, _02249B7C ; =0x000001FE + add r0, r0, r4 + cmp r0, r1 + ble _02249B2E + sub r0, r0, r1 + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_02249B2E: + ldr r0, [sp, #0x10] + ldrb r0, [r0] + add r0, r0, r4 + cmp r0, #0xff + ble _02249B40 + sub r0, #0xff + sub r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_02249B40: + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x10] + ldrb r0, [r0] + add r1, r0, r4 + ldr r0, [sp, #0x10] + strb r1, [r0] + ldr r0, [sp, #0x18] + ldr r1, [sp, #8] + add r0, r0, r4 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r1, #0xd + bl sub_02074B30 + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #6 + bge _02249B72 + b _02249A44 +_02249B72: + add r0, r7, #0 + bl sub_020759B8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249B7C: .word 0x000001FE + thumb_func_end ov16_022499C0 + + thumb_func_start ov16_02249B80 +ov16_02249B80: ; 0x02249B80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x158 + add r4, r1, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + bl ov16_0223E05C + str r0, [sp, #0x20] + ldr r0, [r4, #0] + bl ov16_0223E064 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E000 + mov r7, #1 + str r0, [sp, #0x24] + add r0, r7, #0 + ldr r6, [r4, #4] + bl sub_020787CC + ldr r1, _02249ED4 ; =0x00003108 + ldrb r1, [r6, r1] + tst r0, r1 + beq _02249BB4 + mov r7, #3 +_02249BB4: + ldr r0, [r4, #0x28] + cmp r0, #0x20 + bls _02249BBE + bl _0224A716 +_02249BBE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02249BCA: ; jump table + .short _02249C0C - _02249BCA - 2 ; case 0 + .short _02249CCC - _02249BCA - 2 ; case 1 + .short _02249D18 - _02249BCA - 2 ; case 2 + .short _02249D46 - _02249BCA - 2 ; case 3 + .short _02249D70 - _02249BCA - 2 ; case 4 + .short _02249D84 - _02249BCA - 2 ; case 5 + .short _02249DB8 - _02249BCA - 2 ; case 6 + .short _02249DDA - _02249BCA - 2 ; case 7 + .short _02249DFA - _02249BCA - 2 ; case 8 + .short _02249E40 - _02249BCA - 2 ; case 9 + .short _02249E5E - _02249BCA - 2 ; case 10 + .short _02249FA0 - _02249BCA - 2 ; case 11 + .short _02249FEE - _02249BCA - 2 ; case 12 + .short _0224A082 - _02249BCA - 2 ; case 13 + .short _0224A0D6 - _02249BCA - 2 ; case 14 + .short _0224A104 - _02249BCA - 2 ; case 15 + .short _0224A134 - _02249BCA - 2 ; case 16 + .short _0224A1C4 - _02249BCA - 2 ; case 17 + .short _0224A1EA - _02249BCA - 2 ; case 18 + .short _0224A212 - _02249BCA - 2 ; case 19 + .short _0224A26A - _02249BCA - 2 ; case 20 + .short _0224A364 - _02249BCA - 2 ; case 21 + .short _0224A3B2 - _02249BCA - 2 ; case 22 + .short _0224A3B2 - _02249BCA - 2 ; case 23 + .short _0224A522 - _02249BCA - 2 ; case 24 + .short _0224A570 - _02249BCA - 2 ; case 25 + .short _0224A5C8 - _02249BCA - 2 ; case 26 + .short _0224A60E - _02249BCA - 2 ; case 27 + .short _0224A63E - _02249BCA - 2 ; case 28 + .short _0224A656 - _02249BCA - 2 ; case 29 + .short _0224A66C - _02249BCA - 2 ; case 30 + .short _0224A6A4 - _02249BCA - 2 ; case 31 + .short _0224A6D4 - _02249BCA - 2 ; case 32 +_02249C0C: + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _02249C88 + mov r0, #3 + str r0, [sp, #0x138] + mov r0, #5 + str r0, [sp, #0x134] + ldr r0, _02249ED8 ; =0x00004E20 + add r0, r7, r0 + str r0, [sp, #0x13c] + ldr r0, [r4, #0x2c] + str r0, [sp, #0x140] + ldr r0, [r4, #0] + bl ov16_0223E010 + str r0, [sp, #0x14c] + ldr r0, [r4, #0] + bl ov16_0223E064 + str r0, [sp, #0x150] + mov r0, #1 + str r0, [sp, #0x144] + mov r0, #0 + str r0, [sp, #0x148] + ldr r0, [r4, #0] + str r0, [sp, #0x154] + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02249C5C + cmp r7, #1 + bne _02249C56 + mov r0, #0x10 + str r0, [sp, #0x130] + b _02249C60 +_02249C56: + mov r0, #0x11 + str r0, [sp, #0x130] + b _02249C60 +_02249C5C: + mov r0, #0xf + str r0, [sp, #0x130] +_02249C60: + add r0, sp, #0x130 + bl ov12_02237728 + str r0, [r4, #8] + mov r0, #1 + str r0, [r4, #0x28] + ldr r0, _02249EDC ; =0x0000070A + bl sub_02005748 + ldr r2, [r4, #0] + ldr r0, _02249EE0 ; =0x00002422 + ldrh r1, [r2, r0] + add r1, r1, #1 + strh r1, [r2, r0] + ldr r0, [r4, #8] + mov r1, #0 + bl ov12_022368C8 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_02249C88: + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF14 + add r5, r0, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237890 + cmp r0, #4 + beq _02249D5C + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + add r5, #0x88 + str r0, [r4, #8] + mov r0, #0 + str r0, [r5, #0] + mov r0, #1 + str r0, [r4, #0x28] + ldr r0, _02249EDC ; =0x0000070A + bl sub_02005748 + ldr r2, [r4, #0] + ldr r0, _02249EE0 ; =0x00002422 + ldrh r1, [r2, r0] + add r1, r1, #1 + strh r1, [r2, r0] + ldr r0, [r4, #8] + mov r1, #0 + bl ov12_022368C8 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_02249CCC: + ldr r0, [r4, #8] + mov r1, #0 + bl ov12_022368D0 + cmp r0, #0 + bne _02249D5C + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + beq _02249CFC + ldr r0, _02249EE4 ; =0x000005E6 + mov r1, #0x75 + bl sub_02005728 + ldr r0, [r4, #8] + mov r1, #2 + bl ov12_022368C8 + mov r0, #0x19 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249CFC: + ldr r0, _02249EE8 ; =0x00000708 + mov r1, #0x75 + bl sub_02005728 + ldr r0, [r4, #8] + mov r1, #1 + bl ov12_022368C8 + mov r0, #2 + str r0, [r4, #0x28] + mov r0, #0x17 + add sp, #0x158 + str r0, [r4, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_02249D18: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _02249D5C + ldr r0, [r4, #0] + ldr r2, [r4, #0x2c] + add r1, r7, #0 + bl ov16_02265050 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov16_0224A724 + str r0, [r4, #0x38] + cmp r0, #4 + bge _02249D3A + b _02249D3C +_02249D3A: + mov r0, #3 +_02249D3C: + str r0, [r4, #0x3c] + mov r0, #3 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249D46: + ldr r0, [r4, #8] + mov r1, #1 + bl ov12_022368D0 + cmp r0, #0 + bne _02249D5C + ldr r0, [r4, #4] + bl ov16_02251FC8 + cmp r0, #0 + bne _02249D60 +_02249D5C: + bl _0224A716 +_02249D60: + ldr r0, [r4, #8] + mov r1, #3 + bl ov12_022368C8 + mov r0, #4 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249D70: + ldr r0, [r4, #8] + mov r1, #3 + bl ov12_022368D0 + cmp r0, #0 + bne _02249E72 + mov r0, #5 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249D84: + ldr r0, [r4, #0x3c] + cmp r0, #0 + bne _02249DA4 + ldr r0, [r4, #0x38] + cmp r0, #4 + bne _02249D9C + mov r0, #7 + str r0, [r4, #0x28] + mov r0, #0xc + add sp, #0x158 + str r0, [r4, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_02249D9C: + mov r0, #0x1c + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249DA4: + ldr r0, [r4, #8] + mov r1, #4 + bl ov12_022368C8 + mov r0, #6 + str r0, [r4, #0x28] + mov r0, #0xc + add sp, #0x158 + str r0, [r4, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_02249DB8: + ldr r0, [r4, #8] + mov r1, #4 + bl ov12_022368D0 + cmp r0, #0 + bne _02249E72 + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _02249E72 + ldr r0, [r4, #0x3c] + add sp, #0x158 + sub r0, r0, #1 + str r0, [r4, #0x3c] + mov r0, #5 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249DDA: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _02249E72 + ldr r0, [r4, #8] + mov r1, #6 + bl ov12_022368C8 + ldr r0, _02249EEC ; =0x00000709 + mov r1, #0x75 + bl sub_02005728 + mov r0, #8 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249DFA: + ldr r0, [r4, #8] + mov r1, #6 + bl ov12_022368D0 + cmp r0, #0 + bne _02249E72 + ldr r1, _02249EF0 ; =0x00000363 + add r0, sp, #0x10c + strh r1, [r0, #2] + mov r1, #0x82 + strb r1, [r0, #1] + str r7, [sp, #0x110] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + add r2, sp, #0x10c + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x1e + str r0, [r4, #0x34] + mov r0, #9 + str r0, [r4, #0x28] + ldr r0, _02249EF4 ; =0x00000467 + bl sub_0200549C + ldr r0, [r4, #0] + mov r1, #2 + bl ov16_0223F460 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_02249E40: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02249E72 + mov r0, #0xa + str r0, [r4, #0x28] + ldr r0, [r4, #8] + mov r1, #7 + bl ov12_022368C8 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_02249E5E: + ldr r0, [r4, #8] + mov r1, #7 + bl ov12_022368D0 + cmp r0, #0 + bne _02249E72 + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + beq _02249E76 +_02249E72: + bl _0224A716 +_02249E76: + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223F4B0 + ldr r2, [r4, #4] + ldr r0, [r4, #0] + add r3, r2, r7 + ldr r2, _02249EF8 ; =0x0000219C + add r1, r7, #0 + ldrb r2, [r3, r2] + bl ov16_0223DFAC + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #6 + lsl r1, r1, #8 + tst r0, r1 + beq _02249F20 + ldr r2, [r4, #4] + ldr r0, [r4, #0] + add r3, r2, r7 + ldr r2, _02249EF8 ; =0x0000219C + add r1, r7, #0 + ldrb r2, [r3, r2] + bl ov16_0223DFAC + add r2, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov16_02259A5C + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _02249EFC ; =0x0000FFFF + b _02249F00 + nop +_02249ED4: .word 0x00003108 +_02249ED8: .word 0x00004E20 +_02249EDC: .word 0x0000070A +_02249EE0: .word 0x00002422 +_02249EE4: .word 0x000005E6 +_02249EE8: .word 0x00000708 +_02249EEC: .word 0x00000709 +_02249EF0: .word 0x00000363 +_02249EF4: .word 0x00000467 +_02249EF8: .word 0x0000219C +_02249EFC: .word 0x0000FFFF +_02249F00: + add r0, r5, #0 + mov r1, #0xf + mov r3, #1 + bl sub_02003178 + mov r1, #0 + ldr r0, [sp, #0x24] + mov r2, #0x10 + add r3, r1, #0 + str r1, [sp] + bl sub_0200872C + mov r0, #0x20 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249F20: + add r0, r6, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F9E0 + cmp r0, #0 + beq _02249F6E + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _0224A290 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #5 + mov r3, #1 + bl sub_02003178 + mov r1, #0 + ldr r0, [sp, #0x24] + mov r2, #0x10 + add r3, r1, #0 + str r1, [sp] + bl sub_0200872C + mov r0, #0x10 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_02249F6E: + ldr r1, _0224A294 ; =0x00000367 + add r0, sp, #0xe8 + strh r1, [r0, #2] + mov r1, #0x82 + strb r1, [r0, #1] + str r7, [sp, #0xec] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + add r2, sp, #0xe8 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x1e + str r0, [r4, #0x34] + mov r0, #0xb + str r0, [r4, #0x28] + ldr r0, [r4, #0] + bl ov16_0223F268 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_02249FA0: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02249FF8 + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _02249FF8 + mov r0, #0xc + str r0, [r4, #0x28] + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _0224A290 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #5 + mov r3, #1 + bl sub_02003178 + mov r1, #0 + ldr r0, [sp, #0x24] + str r1, [sp] + mov r2, #0x10 + add r3, r1, #0 + bl sub_0200872C + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_02249FEE: + add r0, r5, #0 + bl sub_0200384C + cmp r0, #0 + beq _02249FFA +_02249FF8: + b _0224A716 +_02249FFA: + ldr r0, [r4, #8] + bl ov12_0223783C + ldr r0, [sp, #0x24] + bl sub_02007DD4 + ldr r0, [r4, #0] + bl ov16_0223B53C + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223E020 + mov r1, #0 + bl ov16_022686BC + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223E020 + mov r1, #0 + bl ov16_022686BC + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF14 + mov r1, #0 + bl ov16_02263B20 + ldr r0, [r4, #0] + bl ov16_0223DF00 + str r0, [sp, #0xd0] + ldr r0, [r4, #0] + bl ov16_0223E064 + str r0, [sp, #0xd4] + ldr r0, [sp, #0x24] + add r1, r7, #0 + str r0, [sp, #0xd8] + mov r0, #5 + str r0, [sp, #0xdc] + ldr r2, [r4, #4] + ldr r0, [r4, #0] + add r3, r2, r7 + ldr r2, _0224A298 ; =0x0000219C + ldrb r2, [r3, r2] + bl ov16_0223DFAC + str r0, [sp, #0xe0] + ldr r0, [r4, #0] + bl ov16_0223E068 + bl sub_0207A280 + str r0, [sp, #0xe4] + bl sub_0201EE9C + str r0, [r4, #0x54] + add r0, sp, #0xd0 + bl ov21_021E8D48 + str r0, [r4, #0x50] + mov r0, #0xd + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A082: + ldr r0, [r4, #0x50] + bl ov21_021E8DEC + cmp r0, #0 + beq _0224A13E + ldr r0, _0224A29C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224A09C + mov r0, #0xe + str r0, [r4, #0x28] + b _0224A0AE +_0224A09C: + bl sub_02022798 + cmp r0, #0 + beq _0224A0AE + ldr r0, _0224A2A0 ; =0x000005DC + bl sub_02005748 + mov r0, #0xe + str r0, [r4, #0x28] +_0224A0AE: + ldr r0, [r4, #0x28] + cmp r0, #0xe + bne _0224A13E + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _0224A290 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #5 + mov r3, #1 + bl sub_02003178 + ldr r0, [r4, #0x50] + mov r1, #0 + bl ov21_021E8E04 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_0224A0D6: + ldr r0, [r4, #0x50] + bl ov21_021E8E00 + add r5, r0, #0 + mov r1, #0 + mov r2, #4 + bl sub_02008274 + add r0, r5, #0 + mov r1, #0 + bl sub_020080C0 + cmp r0, #0x80 + blt _0224A13E + add r0, r5, #0 + mov r1, #0 + mov r2, #0x80 + bl sub_02007DEC + mov r0, #0xf + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A104: + ldr r0, [r4, #0x50] + bl ov21_021E8DD0 + ldr r0, [r4, #0x54] + bl sub_0201EEB8 + ldr r0, [r4, #0] + bl ov16_0223B578 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r2, _0224A290 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #5 + mov r3, #1 + bl sub_02003178 + mov r0, #0x11 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A134: + add r0, r5, #0 + bl sub_0200384C + cmp r0, #0 + beq _0224A140 +_0224A13E: + b _0224A716 +_0224A140: + ldr r2, [r4, #4] + ldr r0, [r4, #0] + add r3, r2, r7 + ldr r2, _0224A298 ; =0x0000219C + add r1, r7, #0 + ldrb r2, [r3, r2] + bl ov16_0223DFAC + add r6, r0, #0 + ldr r0, [r4, #8] + bl ov12_0223783C + ldr r0, [sp, #0x24] + bl sub_02007DD4 + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF14 + mov r1, #0 + bl ov16_02263B20 + ldr r0, [r4, #0] + bl ov16_0223B53C + ldr r0, [r4, #0] + bl ov16_0223B578 + add r0, sp, #0xc0 + add r1, r6, #0 + mov r2, #2 + bl sub_02075EF4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x24] + add r1, sp, #0xc0 + mov r2, #0x80 + mov r3, #0x48 + bl sub_02007C34 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r2, _0224A290 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #5 + mov r3, #1 + bl sub_02003178 + mov r2, #0 + ldr r0, [sp, #0x24] + mov r1, #0x10 + add r3, r2, #0 + str r2, [sp] + bl sub_0200872C + mov r0, #0x11 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A1C4: + add r0, r5, #0 + bl sub_0200384C + cmp r0, #0 + bne _0224A274 + mov r0, #0x12 + str r0, [r4, #0x28] + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #0 + bl sub_02015738 + add r0, r5, #0 + mov r1, #1 + bl sub_02003858 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_0224A1EA: + ldr r1, [r4, #4] + mov r0, #5 + str r0, [sp] + mov r2, #0 + ldr r0, _0224A298 ; =0x0000219C + str r2, [sp, #4] + add r3, r1, r7 + ldrb r0, [r3, r0] + mov r3, #0xd9 + lsl r3, r3, #2 + orr r0, r7 + str r0, [sp, #8] + ldr r0, [r4, #0] + bl ov16_02265B2C + ldr r0, [r4, #0x28] + add sp, #0x158 + add r0, r0, #1 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A212: + add r0, r6, #0 + mov r1, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _0224A274 + ldr r0, [r4, #4] + mov r1, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _0224A232 + mov r0, #0x16 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A232: + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _0224A290 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #0xf + mov r3, #1 + bl sub_02003178 + mov r1, #0 + ldr r0, [sp, #0x24] + mov r2, #0x10 + add r3, r1, #0 + str r1, [sp] + bl sub_0200872C + mov r0, #0x14 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A26A: + add r0, r5, #0 + bl sub_0200384C + cmp r0, #0 + beq _0224A276 +_0224A274: + b _0224A716 +_0224A276: + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r2, [r4, #4] + ldr r0, [r4, #0] + add r3, r2, r7 + ldr r2, _0224A298 ; =0x0000219C + b _0224A2A4 + ; .align 2, 0 +_0224A290: .word 0x0000FFFF +_0224A294: .word 0x00000367 +_0224A298: .word 0x0000219C +_0224A29C: .word 0x021BF67C +_0224A2A0: .word 0x000005DC +_0224A2A4: + add r1, r7, #0 + ldrb r2, [r3, r2] + bl ov16_0223DFAC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223EDA4 + str r0, [sp] + mov r0, #5 + mov r1, #1 + add r2, r5, #0 + mov r3, #0xa + bl sub_0208712C + add r5, r0, #0 + str r5, [r4, #0x54] + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF60 + cmp r0, #6 + bge _0224A2E0 + mov r0, #0 + b _0224A2EA +_0224A2E0: + ldr r0, [r4, #0] + bl ov16_0223F240 + ldr r1, _0224A588 ; =0x00000496 + add r0, r0, r1 +_0224A2EA: + str r0, [r5, #0x44] + add r0, r6, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + str r0, [r5, #8] + ldr r0, [r4, #0] + bl ov16_0223E228 + str r0, [r5, #0x48] + add r0, r6, #0 + mov r1, #0x6f + mov r2, #0 + bl sub_02074470 + str r0, [r5, #0x10] + ldr r0, _0224A58C ; =0x020F2DAC + add r1, r5, #0 + mov r2, #5 + bl sub_020067E8 + str r0, [r4, #0x50] + mov r0, #0x15 + str r0, [r4, #0x28] + ldr r0, [r4, #0] + bl ov16_0223F414 + ldr r0, [r4, #0] + mov r5, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _0224A352 + add r7, r5, #0 +_0224A330: + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov16_0223DF14 + add r6, r0, #0 + ldr r0, [r6, #0x18] + cmp r0, #0 + beq _0224A346 + bl sub_0200D0F4 + str r7, [r6, #0x18] +_0224A346: + ldr r0, [r4, #0] + add r5, r5, #1 + bl ov16_0223DF1C + cmp r5, r0 + blt _0224A330 +_0224A352: + ldr r0, [r4, #0] + bl ov16_0223B3E4 + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223F314 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_0224A364: + ldr r0, [r4, #0x50] + bl sub_02006844 + cmp r0, #0 + beq _0224A3BC + ldr r2, [r4, #4] + ldr r5, [r4, #0x54] + add r3, r2, r7 + ldr r2, _0224A590 ; =0x0000219C + ldr r0, [r4, #0] + ldrb r2, [r3, r2] + add r1, r7, #0 + bl ov16_0223DFAC + ldr r1, [r5, #0x14] + cmp r1, #0 + bne _0224A396 + ldr r2, [r5, #0x18] + mov r1, #0x78 + bl sub_02074B30 + ldr r0, [r4, #0] + mov r1, #0x31 + bl ov16_0223F24C +_0224A396: + add r0, r5, #0 + bl sub_0208716C + ldr r0, [r4, #0x50] + bl sub_02006814 + ldr r0, [r4, #0] + mov r1, #2 + bl ov16_0223F314 + mov r0, #0x17 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A3B2: + add r0, r5, #0 + bl sub_0200384C + cmp r0, #0 + beq _0224A3BE +_0224A3BC: + b _0224A716 +_0224A3BE: + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF20 + ldr r2, [r4, #4] + str r0, [sp, #0x28] + add r3, r2, r7 + ldr r2, _0224A590 ; =0x0000219C + ldr r0, [r4, #0] + ldrb r2, [r3, r2] + add r1, r7, #0 + bl ov16_0223DFAC + add r6, r0, #0 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223F9A0 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r6, #0 + bl ov16_02259A5C + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov16_0223EF48 + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov16_0223EF68 + mov r1, #0 + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #9 + bl ov16_022666BC + ldr r0, [sp, #0x28] + add r1, r6, #0 + bl sub_0207A048 + cmp r0, #1 + bne _0224A452 + ldr r0, [r4, #0x28] + cmp r0, #0x16 + bne _0224A44A + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _0224A594 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #0xf + mov r3, #1 + bl sub_02003178 + mov r1, #0 + ldr r0, [sp, #0x24] + mov r2, #0x10 + add r3, r1, #0 + str r1, [sp] + bl sub_0200872C +_0224A44A: + mov r0, #0x20 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A452: + ldr r0, [r4, #0] + bl ov16_0223E228 + str r0, [sp, #0x1c] + bl sub_0207999C + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + bl sub_020799A0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x14] + bl sub_02079A94 + mov r5, #0 +_0224A472: + add r1, r5, #0 + add r0, r6, #0 + add r1, #0x42 + mov r2, #0 + bl sub_02074470 + add r1, r5, #0 + str r0, [sp, #0x2c] + add r0, r6, #0 + add r1, #0x3a + add r2, sp, #0x2c + bl sub_02074B30 + add r5, r5, #1 + cmp r5, #4 + blt _0224A472 + add r0, r6, #0 + bl sub_02077A00 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224A4A8 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223F9A0 +_0224A4A8: + add r0, r6, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x14] + bl sub_020798A0 + ldr r0, [r4, #0x28] + cmp r0, #0x16 + bne _0224A51A + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x14] + cmp r1, r0 + ldr r0, [r4, #0] + bne _0224A4E0 + bl ov16_0223F240 + ldr r1, _0224A588 ; =0x00000496 + add r1, r0, r1 + add r0, sp, #0x9c + strh r1, [r0, #2] + mov r1, #0x93 + strb r1, [r0, #1] + ldr r0, [sp, #0x18] + str r7, [sp, #0xa0] + str r0, [sp, #0xa4] + b _0224A4FA +_0224A4E0: + bl ov16_0223F240 + ldr r1, _0224A598 ; =0x00000498 + add r1, r0, r1 + add r0, sp, #0x9c + strh r1, [r0, #2] + mov r1, #0xaf + strb r1, [r0, #1] + ldr r0, [sp, #0x18] + str r7, [sp, #0xa0] + str r0, [sp, #0xa4] + ldr r0, [sp, #0x14] + str r0, [sp, #0xa8] +_0224A4FA: + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + add r2, sp, #0x9c + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x1e + str r0, [r4, #0x34] + mov r0, #0x18 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A51A: + mov r0, #0x20 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A522: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0224A5DE + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _0224A5DE + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _0224A594 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #0xf + mov r3, #1 + bl sub_02003178 + mov r1, #0 + ldr r0, [sp, #0x24] + mov r2, #0x10 + add r3, r1, #0 + str r1, [sp] + bl sub_0200872C + mov r0, #0x20 + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A570: + ldr r0, [r4, #8] + mov r1, #2 + bl ov12_022368D0 + cmp r0, #0 + bne _0224A5DE + ldr r0, [r4, #8] + bl ov12_0223783C + ldr r1, _0224A59C ; =0x0000035B + b _0224A5A0 + nop +_0224A588: .word 0x00000496 +_0224A58C: .word 0x020F2DAC +_0224A590: .word 0x0000219C +_0224A594: .word 0x0000FFFF +_0224A598: .word 0x00000498 +_0224A59C: .word 0x0000035B +_0224A5A0: + add r0, sp, #0x78 + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + add r2, sp, #0x78 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x1e + str r0, [r4, #0x34] + mov r0, #0x1a + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A5C8: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0224A5DE + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + beq _0224A5E0 +_0224A5DE: + b _0224A716 +_0224A5E0: + mov r1, #0xd7 + lsl r1, r1, #2 + add r0, sp, #0x2c + strh r1, [r0, #0x2a] + mov r1, #0 + add r0, sp, #0x54 + strb r1, [r0, #1] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + add r2, sp, #0x54 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x1e + str r0, [r4, #0x34] + mov r0, #0x1b + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A60E: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0224A716 + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _0224A716 + mov r0, #0x5e + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #2 + str r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x10] + bl sub_0200DA58 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_0224A63E: + ldr r0, [r4, #0] + ldr r2, [r4, #0x2c] + add r1, r7, #0 + mov r3, #1 + bl ov16_02264CE8 + mov r0, #0x1d + str r0, [r4, #0x28] + mov r0, #2 + add sp, #0x158 + str r0, [r4, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_0224A656: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _0224A716 + ldr r0, [r4, #8] + bl ov12_0223783C + mov r0, #0x1e + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A66C: + add r0, r6, #0 + bl ov16_02251FC8 + cmp r0, #0 + beq _0224A716 + ldr r1, [r4, #0x38] + ldr r0, _0224A71C ; =0x0000035F + add r1, r1, r0 + add r0, sp, #0x2c + strh r1, [r0, #6] + mov r1, #0 + strb r1, [r0, #5] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + add r2, sp, #0x30 + bl ov16_0223FB24 + str r0, [r4, #0x30] + mov r0, #0x1e + str r0, [r4, #0x34] + mov r0, #0x1f + add sp, #0x158 + str r0, [r4, #0x28] + pop {r3, r4, r5, r6, r7, pc} +_0224A6A4: + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0224A716 + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bne _0224A716 + mov r0, #0x5e + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #2 + str r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x10] + bl sub_0200DA58 + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} +_0224A6D4: + add r0, r5, #0 + bl sub_0200384C + cmp r0, #0 + bne _0224A716 + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #6 + lsl r1, r1, #8 + tst r0, r1 + beq _0224A6F8 + ldr r0, [r4, #8] + bl ov12_0223783C + ldr r0, [sp, #0x24] + bl sub_02007DD4 +_0224A6F8: + ldr r1, [r4, #0] + ldr r0, _0224A720 ; =0x00002420 + mov r2, #4 + strb r2, [r1, r0] + mov r0, #0x5e + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #2 + str r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x10] + bl sub_0200DA58 +_0224A716: + add sp, #0x158 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224A71C: .word 0x0000035F +_0224A720: .word 0x00002420 + thumb_func_end ov16_02249B80 + + thumb_func_start ov16_0224A724 +ov16_0224A724: ; 0x0224A724 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r4, r1, #0 + bl ov16_0223DF0C + mov r1, #6 + lsl r1, r1, #8 + tst r0, r1 + beq _0224A73E + add sp, #8 + mov r0, #4 + pop {r3, r4, r5, r6, r7, pc} +_0224A73E: + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r4, #0x6c] + cmp r0, #5 + bne _0224A776 + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r1, r0] + mov r1, #8 + bl sub_020759F0 + ldr r1, _0224A954 ; =0x0000311C + ldr r2, _0224A958 ; =0x0226E638 + ldrb r1, [r4, r1] + lsl r1, r1, #1 + ldrb r2, [r2, r1] + mul r2, r0 + add r0, r2, #0 + ldr r2, _0224A95C ; =0x0226E639 + ldrb r1, [r2, r1] + bl sub_020E2178 + str r0, [sp] + b _0224A78A +_0224A776: + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r1, r0] + mov r1, #8 + bl sub_020759F0 + str r0, [sp] +_0224A78A: + ldr r1, [r4, #0x6c] + add r0, r4, #0 + mov r2, #0x1b + mov r3, #0 + mov r5, #0xa + bl ov16_02252060 + add r7, r0, #0 + ldr r1, [r4, #0x6c] + add r0, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + add r1, r0, #0 + mov r0, #0x4a + lsl r0, r0, #2 + ldr r2, [r4, r0] + cmp r2, #5 + ble _0224A878 + cmp r2, #0xf + bhi _0224A87E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224A7C2: ; jump table + .short _0224A87E - _0224A7C2 - 2 ; case 0 + .short _0224A87E - _0224A7C2 - 2 ; case 1 + .short _0224A87E - _0224A7C2 - 2 ; case 2 + .short _0224A87E - _0224A7C2 - 2 ; case 3 + .short _0224A87E - _0224A7C2 - 2 ; case 4 + .short _0224A87E - _0224A7C2 - 2 ; case 5 + .short _0224A7E2 - _0224A7C2 - 2 ; case 6 + .short _0224A7F6 - _0224A7C2 - 2 ; case 7 + .short _0224A804 - _0224A7C2 - 2 ; case 8 + .short _0224A820 - _0224A7C2 - 2 ; case 9 + .short _0224A83C - _0224A7C2 - 2 ; case 10 + .short _0224A87E - _0224A7C2 - 2 ; case 11 + .short _0224A87E - _0224A7C2 - 2 ; case 12 + .short _0224A84A - _0224A7C2 - 2 ; case 13 + .short _0224A87E - _0224A7C2 - 2 ; case 14 + .short _0224A86C - _0224A7C2 - 2 ; case 15 +_0224A7E2: + cmp r7, #0xb + beq _0224A7F2 + cmp r1, #0xb + beq _0224A7F2 + cmp r7, #6 + beq _0224A7F2 + cmp r1, #6 + bne _0224A87E +_0224A7F2: + mov r5, #0x1e + b _0224A87E +_0224A7F6: + add r0, r6, #0 + bl ov16_0223E22C + cmp r0, #7 + bne _0224A87E + mov r5, #0x23 + b _0224A87E +_0224A804: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224A960 ; =0x00002D74 + ldrb r1, [r1, r0] + cmp r1, #0x28 + bhs _0224A87E + mov r0, #0x28 + sub r5, r0, r1 + cmp r5, #0xa + bhs _0224A87E + mov r5, #0xa + b _0224A87E +_0224A820: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + mov r1, #0xb5 + lsl r1, r1, #6 + ldrh r1, [r2, r1] + add r0, r6, #0 + bl ov16_0223F9E0 + cmp r0, #1 + bne _0224A87E + mov r5, #0x1e + b _0224A87E +_0224A83C: + add r0, #0x28 + ldr r5, [r4, r0] + add r5, #0xa + cmp r5, #0x28 + bls _0224A87E + mov r5, #0x28 + b _0224A87E +_0224A84A: + add r0, r6, #0 + bl ov16_0223EBF8 + cmp r0, #3 + beq _0224A868 + add r0, r6, #0 + bl ov16_0223EBF8 + cmp r0, #4 + beq _0224A868 + add r0, r6, #0 + bl ov16_0223E22C + cmp r0, #5 + bne _0224A87E +_0224A868: + mov r5, #0x23 + b _0224A87E +_0224A86C: + add r0, #0x28 + ldr r0, [r4, r0] + cmp r0, #1 + bge _0224A87E + mov r5, #0x28 + b _0224A87E +_0224A878: + ldr r0, _0224A964 ; =0x0226E570 + sub r1, r2, #2 + ldrb r5, [r0, r1] +_0224A87E: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + add r7, r1, #0 + mul r7, r0 + ldr r0, _0224A968 ; =0x00002D90 + add r1, r4, r7 + ldr r1, [r1, r0] + lsl r0, r1, #1 + add r0, r1, r0 + ldr r1, [sp] + str r0, [sp, #4] + add r0, r1, #0 + mul r0, r5 + mov r1, #0xa + bl sub_020E2178 + ldr r1, _0224A96C ; =0x00002D8C + add r2, r4, r7 + ldr r1, [r2, r1] + lsl r2, r1, #1 + ldr r1, [sp, #4] + sub r1, r1, r2 + mul r1, r0 + add r0, r1, #0 + ldr r1, [sp, #4] + bl sub_020E2178 + add r1, r0, #0 + ldr r0, _0224A970 ; =0x00002DAC + add r2, r4, r7 + ldr r2, [r2, r0] + mov r0, #0x27 + tst r0, r2 + beq _0224A8C4 + lsl r1, r1, #1 +_0224A8C4: + mov r0, #0xd8 + tst r0, r2 + beq _0224A8D6 + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E2178 + add r1, r0, #0 +_0224A8D6: + cmp r1, #0xff + blo _0224A8DE + mov r5, #4 + b _0224A94E +_0224A8DE: + ldr r0, _0224A974 ; =0x040002B0 + mov r2, #0 + strh r2, [r0] + mov r0, #0xff + lsl r0, r0, #0x10 + bl sub_020E2178 + ldr r1, _0224A978 ; =0x040002B8 + add r2, r1, #0 + str r0, [r1, #0] + sub r2, #8 + lsr r0, r1, #0xb +_0224A8F6: + ldrh r1, [r2] + tst r1, r0 + bne _0224A8F6 + ldr r0, _0224A974 ; =0x040002B0 + lsr r1, r0, #0xb +_0224A900: + ldrh r2, [r0] + tst r2, r1 + bne _0224A900 + ldr r3, _0224A97C ; =0x040002B4 + mov r1, #0 + ldr r2, [r3, #0] + strh r1, [r0] + str r2, [r3, #4] + sub r2, r3, #4 + lsr r0, r3, #0xb +_0224A914: + ldrh r1, [r2] + tst r1, r0 + bne _0224A914 + ldr r2, _0224A974 ; =0x040002B0 + lsr r0, r2, #0xb +_0224A91E: + ldrh r1, [r2] + tst r1, r0 + bne _0224A91E + ldr r1, _0224A97C ; =0x040002B4 + ldr r0, _0224A980 ; =0x000FFFF0 + ldr r1, [r1, #0] + bl sub_020E2178 + add r7, r0, #0 + mov r5, #0 +_0224A932: + add r0, r6, #0 + bl ov16_0223F4BC + cmp r0, r7 + bhs _0224A942 + add r5, r5, #1 + cmp r5, #4 + blt _0224A932 +_0224A942: + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #1 + bne _0224A94E + mov r5, #4 +_0224A94E: + add r0, r5, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A954: .word 0x0000311C +_0224A958: .word 0x0226E638 +_0224A95C: .word 0x0226E639 +_0224A960: .word 0x00002D74 +_0224A964: .word 0x0226E570 +_0224A968: .word 0x00002D90 +_0224A96C: .word 0x00002D8C +_0224A970: .word 0x00002DAC +_0224A974: .word 0x040002B0 +_0224A978: .word 0x040002B8 +_0224A97C: .word 0x040002B4 +_0224A980: .word 0x000FFFF0 + thumb_func_end ov16_0224A724 + + thumb_func_start ov16_0224A984 +ov16_0224A984: ; 0x0224A984 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r0, #0 + add r6, r1, #0 + cmp r2, #0x16 + bgt _0224A9CE + cmp r2, #0 + blt _0224A9D4 + add r1, r2, r2 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224A9A0: ; jump table + .short _0224A9D4 - _0224A9A0 - 2 ; case 0 + .short _0224A9D4 - _0224A9A0 - 2 ; case 1 + .short _0224A9D8 - _0224A9A0 - 2 ; case 2 + .short _0224AA74 - _0224A9A0 - 2 ; case 3 + .short _0224A9F0 - _0224A9A0 - 2 ; case 4 + .short _0224A9DC - _0224A9A0 - 2 ; case 5 + .short _0224A9E0 - _0224A9A0 - 2 ; case 6 + .short _0224A9E4 - _0224A9A0 - 2 ; case 7 + .short _0224A9EA - _0224A9A0 - 2 ; case 8 + .short _0224AA9A - _0224A9A0 - 2 ; case 9 + .short _0224AA16 - _0224A9A0 - 2 ; case 10 + .short _0224AAC2 - _0224A9A0 - 2 ; case 11 + .short _0224AA3E - _0224A9A0 - 2 ; case 12 + .short _0224A9D4 - _0224A9A0 - 2 ; case 13 + .short _0224AAF8 - _0224A9A0 - 2 ; case 14 + .short _0224AB00 - _0224A9A0 - 2 ; case 15 + .short _0224AB08 - _0224A9A0 - 2 ; case 16 + .short _0224AB44 - _0224A9A0 - 2 ; case 17 + .short _0224A9D4 - _0224A9A0 - 2 ; case 18 + .short _0224AB80 - _0224A9A0 - 2 ; case 19 + .short _0224ABAA - _0224A9A0 - 2 ; case 20 + .short _0224ABD4 - _0224A9A0 - 2 ; case 21 + .short _0224A9E0 - _0224A9A0 - 2 ; case 22 +_0224A9CE: + cmp r2, #0xff + bne _0224A9D4 + b _0224ABD4 +_0224A9D4: + ldr r5, [r6, #0x64] + b _0224ABDA +_0224A9D8: + ldr r5, [r6, #0x6c] + b _0224ABDA +_0224A9DC: + ldr r5, [r6, #0x74] + b _0224ABDA +_0224A9E0: + ldr r5, [r6, #0x78] + b _0224ABDA +_0224A9E4: + add r6, #0x94 + ldr r5, [r6, #0] + b _0224ABDA +_0224A9EA: + add r6, #0x80 + ldr r5, [r6, #0] + b _0224ABDA +_0224A9F0: + bl ov16_0223DF1C + add r6, r0, #0 + mov r5, #0 + cmp r6, #0 + ble _0224AA14 + mov r7, #1 +_0224A9FE: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _0224ABE8 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + bne _0224AA14 + add r5, r5, #1 + cmp r5, r6 + blt _0224A9FE +_0224AA14: + b _0224ABDA +_0224AA16: + bl ov16_0223DF1C + add r6, r0, #0 + mov r5, #0 + cmp r6, #0 + ble _0224AA3C + ldr r7, _0224ABE8 ; =0x00000195 +_0224AA24: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #3 + beq _0224AA3C + cmp r0, #1 + beq _0224AA3C + add r5, r5, #1 + cmp r5, r6 + blt _0224AA24 +_0224AA3C: + b _0224ABDA +_0224AA3E: + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _0224AA4C + mov r6, #5 + b _0224AA4E +_0224AA4C: + mov r6, #1 +_0224AA4E: + add r0, r4, #0 + bl ov16_0223DF1C + add r7, r0, #0 + mov r5, #0 + cmp r7, #0 + ble _0224AA72 +_0224AA5C: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _0224ABE8 ; =0x00000195 + ldrb r0, [r0, r1] + cmp r0, r6 + beq _0224AA72 + add r5, r5, #1 + cmp r5, r7 + blt _0224AA5C +_0224AA72: + b _0224ABDA +_0224AA74: + bl ov16_0223DF1C + add r6, r0, #0 + mov r5, #0 + cmp r6, #0 + ble _0224AA98 + mov r7, #1 +_0224AA82: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _0224ABE8 ; =0x00000195 + ldrb r0, [r0, r1] + tst r0, r7 + beq _0224AA98 + add r5, r5, #1 + cmp r5, r6 + blt _0224AA82 +_0224AA98: + b _0224ABDA +_0224AA9A: + bl ov16_0223DF1C + add r6, r0, #0 + mov r5, #0 + cmp r6, #0 + ble _0224AAC0 + ldr r7, _0224ABE8 ; =0x00000195 +_0224AAA8: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldrb r0, [r0, r7] + cmp r0, #2 + beq _0224AAC0 + cmp r0, #0 + beq _0224AAC0 + add r5, r5, #1 + cmp r5, r6 + blt _0224AAA8 +_0224AAC0: + b _0224ABDA +_0224AAC2: + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _0224AAD0 + mov r6, #4 + b _0224AAD2 +_0224AAD0: + mov r6, #0 +_0224AAD2: + add r0, r4, #0 + bl ov16_0223DF1C + add r7, r0, #0 + mov r5, #0 + cmp r7, #0 + ble _0224ABDA +_0224AAE0: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223DF14 + ldr r1, _0224ABE8 ; =0x00000195 + ldrb r0, [r0, r1] + cmp r0, r6 + beq _0224ABDA + add r5, r5, #1 + cmp r5, r7 + blt _0224AAE0 + b _0224ABDA +_0224AAF8: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r5, [r6, r0] + b _0224ABDA +_0224AB00: + mov r0, #0x12 + lsl r0, r0, #4 + ldr r5, [r6, r0] + b _0224ABDA +_0224AB08: + bl ov16_0223DF1C + mov r5, #0 + str r0, [sp, #4] + cmp r0, #0 + ble _0224AB3A +_0224AB14: + ldr r7, [r6, #0x64] + cmp r5, r7 + beq _0224AB32 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223E208 + str r0, [sp, #8] + add r0, r4, #0 + add r1, r7, #0 + bl ov16_0223E208 + ldr r1, [sp, #8] + cmp r1, r0 + beq _0224AB3A +_0224AB32: + ldr r0, [sp, #4] + add r5, r5, #1 + cmp r5, r0 + blt _0224AB14 +_0224AB3A: + ldr r0, [sp, #4] + cmp r5, r0 + bne _0224ABDA + mov r5, #0 + b _0224ABDA +_0224AB44: + bl ov16_0223DF1C + mov r5, #0 + str r0, [sp] + cmp r0, #0 + ble _0224AB76 +_0224AB50: + ldr r7, [r6, #0x6c] + cmp r5, r7 + beq _0224AB6E + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223E208 + str r0, [sp, #0xc] + add r0, r4, #0 + add r1, r7, #0 + bl ov16_0223E208 + ldr r1, [sp, #0xc] + cmp r1, r0 + beq _0224AB76 +_0224AB6E: + ldr r0, [sp] + add r5, r5, #1 + cmp r5, r0 + blt _0224AB50 +_0224AB76: + ldr r0, [sp] + cmp r5, r0 + bne _0224ABDA + mov r5, #0 + b _0224ABDA +_0224AB80: + bl ov16_0223DF1C + add r7, r0, #0 + ldr r1, [r6, #0x64] + add r0, r4, #0 + bl ov16_0223E208 + add r6, r0, #0 + mov r5, #0 + cmp r7, #0 + ble _0224ABDA +_0224AB96: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223E208 + cmp r6, r0 + bne _0224ABDA + add r5, r5, #1 + cmp r5, r7 + blt _0224AB96 + b _0224ABDA +_0224ABAA: + bl ov16_0223DF1C + add r7, r0, #0 + ldr r1, [r6, #0x6c] + add r0, r4, #0 + bl ov16_0223E208 + add r6, r0, #0 + mov r5, #0 + cmp r7, #0 + ble _0224ABDA +_0224ABC0: + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0223E208 + cmp r6, r0 + bne _0224ABDA + add r5, r5, #1 + cmp r5, r7 + blt _0224ABC0 + b _0224ABDA +_0224ABD4: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r5, [r6, r0] +_0224ABDA: + cmp r5, #0xff + bne _0224ABE2 + bl sub_02022974 +_0224ABE2: + add r0, r5, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224ABE8: .word 0x00000195 + thumb_func_end ov16_0224A984 + + thumb_func_start ov16_0224ABEC +ov16_0224ABEC: ; 0x0224ABEC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r4, r1, #0 + mov r6, #0 + bl ov16_02248AD0 + str r0, [r4, #0] + add r0, r7, #0 + bl ov16_02248AD0 + str r0, [r4, #4] + cmp r0, #0x3c + bhi _0224ACA0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224AC12: ; jump table + .short _0224AC8C - _0224AC12 - 2 ; case 0 + .short _0224AC8E - _0224AC12 - 2 ; case 1 + .short _0224AC8E - _0224AC12 - 2 ; case 2 + .short _0224AC8E - _0224AC12 - 2 ; case 3 + .short _0224AC8E - _0224AC12 - 2 ; case 4 + .short _0224AC8E - _0224AC12 - 2 ; case 5 + .short _0224AC8E - _0224AC12 - 2 ; case 6 + .short _0224AC8E - _0224AC12 - 2 ; case 7 + .short _0224AC8E - _0224AC12 - 2 ; case 8 + .short _0224AC92 - _0224AC12 - 2 ; case 9 + .short _0224AC92 - _0224AC12 - 2 ; case 10 + .short _0224AC92 - _0224AC12 - 2 ; case 11 + .short _0224AC92 - _0224AC12 - 2 ; case 12 + .short _0224AC92 - _0224AC12 - 2 ; case 13 + .short _0224AC92 - _0224AC12 - 2 ; case 14 + .short _0224AC92 - _0224AC12 - 2 ; case 15 + .short _0224AC92 - _0224AC12 - 2 ; case 16 + .short _0224AC92 - _0224AC12 - 2 ; case 17 + .short _0224AC92 - _0224AC12 - 2 ; case 18 + .short _0224AC92 - _0224AC12 - 2 ; case 19 + .short _0224AC92 - _0224AC12 - 2 ; case 20 + .short _0224AC92 - _0224AC12 - 2 ; case 21 + .short _0224AC92 - _0224AC12 - 2 ; case 22 + .short _0224AC92 - _0224AC12 - 2 ; case 23 + .short _0224AC92 - _0224AC12 - 2 ; case 24 + .short _0224AC92 - _0224AC12 - 2 ; case 25 + .short _0224AC92 - _0224AC12 - 2 ; case 26 + .short _0224AC92 - _0224AC12 - 2 ; case 27 + .short _0224AC92 - _0224AC12 - 2 ; case 28 + .short _0224AC92 - _0224AC12 - 2 ; case 29 + .short _0224AC92 - _0224AC12 - 2 ; case 30 + .short _0224AC96 - _0224AC12 - 2 ; case 31 + .short _0224AC96 - _0224AC12 - 2 ; case 32 + .short _0224AC96 - _0224AC12 - 2 ; case 33 + .short _0224AC96 - _0224AC12 - 2 ; case 34 + .short _0224AC96 - _0224AC12 - 2 ; case 35 + .short _0224AC96 - _0224AC12 - 2 ; case 36 + .short _0224AC96 - _0224AC12 - 2 ; case 37 + .short _0224AC96 - _0224AC12 - 2 ; case 38 + .short _0224AC96 - _0224AC12 - 2 ; case 39 + .short _0224AC96 - _0224AC12 - 2 ; case 40 + .short _0224AC96 - _0224AC12 - 2 ; case 41 + .short _0224AC96 - _0224AC12 - 2 ; case 42 + .short _0224AC96 - _0224AC12 - 2 ; case 43 + .short _0224AC96 - _0224AC12 - 2 ; case 44 + .short _0224AC96 - _0224AC12 - 2 ; case 45 + .short _0224AC96 - _0224AC12 - 2 ; case 46 + .short _0224AC96 - _0224AC12 - 2 ; case 47 + .short _0224AC96 - _0224AC12 - 2 ; case 48 + .short _0224AC96 - _0224AC12 - 2 ; case 49 + .short _0224AC96 - _0224AC12 - 2 ; case 50 + .short _0224AC96 - _0224AC12 - 2 ; case 51 + .short _0224AC9A - _0224AC12 - 2 ; case 52 + .short _0224AC9A - _0224AC12 - 2 ; case 53 + .short _0224AC9A - _0224AC12 - 2 ; case 54 + .short _0224AC9A - _0224AC12 - 2 ; case 55 + .short _0224AC9A - _0224AC12 - 2 ; case 56 + .short _0224AC9A - _0224AC12 - 2 ; case 57 + .short _0224AC9A - _0224AC12 - 2 ; case 58 + .short _0224AC9A - _0224AC12 - 2 ; case 59 + .short _0224AC9E - _0224AC12 - 2 ; case 60 +_0224AC8C: + b _0224ACA0 +_0224AC8E: + mov r6, #1 + b _0224ACA0 +_0224AC92: + mov r6, #2 + b _0224ACA0 +_0224AC96: + mov r6, #3 + b _0224ACA0 +_0224AC9A: + mov r6, #4 + b _0224ACA0 +_0224AC9E: + mov r6, #6 +_0224ACA0: + mov r5, #0 + cmp r6, #0 + ble _0224ACB6 +_0224ACA6: + add r0, r7, #0 + bl ov16_02248AD0 + str r0, [r4, #8] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, r6 + blt _0224ACA6 +_0224ACB6: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0224ABEC + + thumb_func_start ov16_0224ACB8 +ov16_0224ACB8: ; 0x0224ACB8 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + ldr r2, [r4, #0] + add r5, r3, #0 + strh r2, [r5, #2] + ldr r2, [r4, #4] + add r7, r0, #0 + strb r2, [r5, #1] + ldrb r2, [r5, #1] + add r6, r1, #0 + cmp r2, #0x3c + bls _0224ACD2 + b _0224B3B4 +_0224ACD2: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224ACDE: ; jump table + .short _0224B3B4 - _0224ACDE - 2 ; case 0 + .short _0224AD58 - _0224ACDE - 2 ; case 1 + .short _0224AD62 - _0224ACDE - 2 ; case 2 + .short _0224AD6C - _0224ACDE - 2 ; case 3 + .short _0224AD78 - _0224ACDE - 2 ; case 4 + .short _0224AD84 - _0224ACDE - 2 ; case 5 + .short _0224AD90 - _0224ACDE - 2 ; case 6 + .short _0224AD90 - _0224ACDE - 2 ; case 7 + .short _0224AD9C - _0224ACDE - 2 ; case 8 + .short _0224ADA6 - _0224ACDE - 2 ; case 9 + .short _0224ADBC - _0224ACDE - 2 ; case 10 + .short _0224ADD0 - _0224ACDE - 2 ; case 11 + .short _0224ADE6 - _0224ACDE - 2 ; case 12 + .short _0224ADFA - _0224ACDE - 2 ; case 13 + .short _0224AE0E - _0224ACDE - 2 ; case 14 + .short _0224AE24 - _0224ACDE - 2 ; case 15 + .short _0224AE38 - _0224ACDE - 2 ; case 16 + .short _0224AE4C - _0224ACDE - 2 ; case 17 + .short _0224AE60 - _0224ACDE - 2 ; case 18 + .short _0224AE76 - _0224ACDE - 2 ; case 19 + .short _0224AE84 - _0224ACDE - 2 ; case 20 + .short _0224AE9C - _0224ACDE - 2 ; case 21 + .short _0224AEB4 - _0224ACDE - 2 ; case 22 + .short _0224AECA - _0224ACDE - 2 ; case 23 + .short _0224AEE0 - _0224ACDE - 2 ; case 24 + .short _0224AEF6 - _0224ACDE - 2 ; case 25 + .short _0224AF0C - _0224ACDE - 2 ; case 26 + .short _0224AF22 - _0224ACDE - 2 ; case 27 + .short _0224AF38 - _0224ACDE - 2 ; case 28 + .short _0224AF4C - _0224ACDE - 2 ; case 29 + .short _0224AF60 - _0224ACDE - 2 ; case 30 + .short _0224AF76 - _0224ACDE - 2 ; case 31 + .short _0224AF96 - _0224ACDE - 2 ; case 32 + .short _0224AFB8 - _0224ACDE - 2 ; case 33 + .short _0224AFD8 - _0224ACDE - 2 ; case 34 + .short _0224AFF6 - _0224ACDE - 2 ; case 35 + .short _0224B014 - _0224ACDE - 2 ; case 36 + .short _0224B036 - _0224ACDE - 2 ; case 37 + .short _0224B056 - _0224ACDE - 2 ; case 38 + .short _0224B076 - _0224ACDE - 2 ; case 39 + .short _0224B096 - _0224ACDE - 2 ; case 40 + .short _0224B0B6 - _0224ACDE - 2 ; case 41 + .short _0224B0D6 - _0224ACDE - 2 ; case 42 + .short _0224B0F6 - _0224ACDE - 2 ; case 43 + .short _0224B116 - _0224ACDE - 2 ; case 44 + .short _0224B134 - _0224ACDE - 2 ; case 45 + .short _0224B152 - _0224ACDE - 2 ; case 46 + .short _0224B170 - _0224ACDE - 2 ; case 47 + .short _0224B182 - _0224ACDE - 2 ; case 48 + .short _0224B1A4 - _0224ACDE - 2 ; case 49 + .short _0224B1C6 - _0224ACDE - 2 ; case 50 + .short _0224B1E8 - _0224ACDE - 2 ; case 51 + .short _0224B208 - _0224ACDE - 2 ; case 52 + .short _0224B234 - _0224ACDE - 2 ; case 53 + .short _0224B262 - _0224ACDE - 2 ; case 54 + .short _0224B28E - _0224ACDE - 2 ; case 55 + .short _0224B2B8 - _0224ACDE - 2 ; case 56 + .short _0224B2E6 - _0224ACDE - 2 ; case 57 + .short _0224B314 - _0224ACDE - 2 ; case 58 + .short _0224B342 - _0224ACDE - 2 ; case 59 + .short _0224B370 - _0224ACDE - 2 ; case 60 +_0224AD58: + ldr r2, [r4, #8] + bl ov16_0224A984 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224AD62: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224AD6C: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224AD78: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B4C8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224AD84: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224AD90: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224AD9C: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0224ADA6: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224ADBC: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224ADD0: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224ADE6: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B4C8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224ADFA: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B488 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE0E: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B4E0 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE24: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE38: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B4F8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE4C: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE60: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE76: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r0, [r4, #0xc] + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE84: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224A984 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AE9C: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AEB4: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AECA: + ldr r2, [r4, #8] + bl ov16_0224B494 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AEE0: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AEF6: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AF0C: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AF22: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AF38: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AF4C: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AF60: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224AF76: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224AF96: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224AFB8: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224AFD8: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224AFF6: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B014: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B036: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B056: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B076: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B4C8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B096: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B488 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B0B6: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B4D4 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B0D6: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B47C + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B0F6: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B116: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B134: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B4C8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B152: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B4D4 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B170: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r0, [r4, #0xc] + str r0, [r5, #8] + ldr r0, [r4, #0x10] + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B182: + ldr r1, [r4, #8] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B504 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B1A4: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B1C6: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B1E8: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224B208: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r1, [r4, #0x14] + add r0, r6, #0 + bl ov16_0224B3E8 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B234: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r2, [r4, #0x14] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B262: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B494 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r1, [r4, #0x14] + add r0, r6, #0 + bl ov16_0224B4C8 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B28E: + ldr r2, [r4, #8] + bl ov16_0224B3B8 + str r0, [r5, #4] + ldr r1, [r4, #0xc] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r1, [r4, #0x14] + add r0, r6, #0 + bl ov16_0224B404 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B2B8: + ldr r2, [r4, #8] + bl ov16_0224B518 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #0xc] + ldr r2, [r4, #0x14] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B2E6: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r2, [r4, #0x14] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B314: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r2, [r4, #0x14] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B342: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B510 + str r0, [r5, #0xc] + ldr r2, [r4, #0x14] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224B370: + ldr r2, [r4, #8] + bl ov16_0224B510 + str r0, [r5, #4] + ldr r2, [r4, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #8] + ldr r2, [r4, #0x10] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0xc] + ldr r2, [r4, #0x14] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B510 + str r0, [r5, #0x10] + ldr r2, [r4, #0x18] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B518 + str r0, [r5, #0x14] + ldr r2, [r4, #0x1c] + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0224B3B8 + str r0, [r5, #0x18] +_0224B3B4: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224ACB8 + + thumb_func_start ov16_0224B3B8 +ov16_0224B3B8: ; 0x0224B3B8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + bl ov16_0224A984 + cmp r4, #0x16 + bne _0224B3D2 + ldr r1, _0224B3E0 ; =0x000021A0 + add r2, r5, r0 + ldrb r1, [r2, r1] + lsl r1, r1, #8 + orr r0, r1 + pop {r3, r4, r5, pc} +_0224B3D2: + ldr r1, _0224B3E4 ; =0x0000219C + add r2, r5, r0 + ldrb r1, [r2, r1] + lsl r1, r1, #8 + orr r0, r1 + pop {r3, r4, r5, pc} + nop +_0224B3E0: .word 0x000021A0 +_0224B3E4: .word 0x0000219C + thumb_func_end ov16_0224B3B8 + + thumb_func_start ov16_0224B3E8 +ov16_0224B3E8: ; 0x0224B3E8 + cmp r1, #1 + beq _0224B3F2 + cmp r1, #0xff + beq _0224B3F8 + bx lr +_0224B3F2: + ldr r1, _0224B400 ; =0x00003044 + ldr r0, [r0, r1] + bx lr +_0224B3F8: + mov r1, #0x49 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_0224B400: .word 0x00003044 + thumb_func_end ov16_0224B3E8 + + thumb_func_start ov16_0224B404 +ov16_0224B404: ; 0x0224B404 + push {r4, lr} + cmp r1, #0x15 + bgt _0224B41C + bge _0224B452 + cmp r1, #2 + bgt _0224B474 + cmp r1, #1 + blt _0224B474 + beq _0224B422 + cmp r1, #2 + beq _0224B43A + b _0224B474 +_0224B41C: + cmp r1, #0xff + beq _0224B46E + b _0224B474 +_0224B422: + ldr r3, [r0, #0x64] + mov r1, #0xc0 + mul r1, r3 + add r2, r0, r1 + ldr r1, _0224B478 ; =0x00002DB8 + ldrh r4, [r2, r1] + lsl r1, r3, #0x18 + lsr r1, r1, #0x18 + add r2, r4, #0 + bl ov16_0224B934 + b _0224B474 +_0224B43A: + ldr r3, [r0, #0x6c] + mov r1, #0xc0 + mul r1, r3 + add r2, r0, r1 + ldr r1, _0224B478 ; =0x00002DB8 + ldrh r4, [r2, r1] + lsl r1, r3, #0x18 + lsr r1, r1, #0x18 + add r2, r4, #0 + bl ov16_0224B934 + b _0224B474 +_0224B452: + mov r1, #0x46 + lsl r1, r1, #2 + ldr r3, [r0, r1] + mov r1, #0xc0 + mul r1, r3 + add r2, r0, r1 + ldr r1, _0224B478 ; =0x00002DB8 + ldrh r4, [r2, r1] + lsl r1, r3, #0x18 + lsr r1, r1, #0x18 + add r2, r4, #0 + bl ov16_0224B934 + b _0224B474 +_0224B46E: + mov r1, #0x4a + lsl r1, r1, #2 + ldr r4, [r0, r1] +_0224B474: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 +_0224B478: .word 0x00002DB8 + thumb_func_end ov16_0224B404 + + thumb_func_start ov16_0224B47C +ov16_0224B47C: ; 0x0224B47C + cmp r1, #0xff + bne _0224B486 + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, r1] +_0224B486: + bx lr + thumb_func_end ov16_0224B47C + + thumb_func_start ov16_0224B488 +ov16_0224B488: ; 0x0224B488 + cmp r1, #0xff + bne _0224B492 + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, r1] +_0224B492: + bx lr + thumb_func_end ov16_0224B488 + + thumb_func_start ov16_0224B494 +ov16_0224B494: ; 0x0224B494 + push {r3, r4, r5, lr} + add r5, r1, #0 + cmp r2, #0xff + bne _0224B4A4 + mov r0, #0x4b + lsl r0, r0, #2 + ldr r4, [r5, r0] + b _0224B4C0 +_0224B4A4: + bl ov16_0224A984 + add r1, r0, #0 + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _0224B4C4 ; =0x00002D67 + lsl r1, r1, #0x18 + ldrb r4, [r2, r0] + add r0, r5, #0 + lsr r1, r1, #0x18 + add r2, r4, #0 + bl ov16_0224B928 +_0224B4C0: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B4C4: .word 0x00002D67 + thumb_func_end ov16_0224B494 + + thumb_func_start ov16_0224B4C8 +ov16_0224B4C8: ; 0x0224B4C8 + cmp r1, #0xff + bne _0224B4D2 + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, r1] +_0224B4D2: + bx lr + thumb_func_end ov16_0224B4C8 + + thumb_func_start ov16_0224B4D4 +ov16_0224B4D4: ; 0x0224B4D4 + cmp r1, #0xff + bne _0224B4DE + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, r1] +_0224B4DE: + bx lr + thumb_func_end ov16_0224B4D4 + + thumb_func_start ov16_0224B4E0 +ov16_0224B4E0: ; 0x0224B4E0 + push {r4, lr} + add r4, r1, #0 + bl ov16_0224A984 + ldr r1, _0224B4F4 ; =0x0000219C + add r2, r4, r0 + ldrb r1, [r2, r1] + lsl r1, r1, #8 + orr r0, r1 + pop {r4, pc} + ; .align 2, 0 +_0224B4F4: .word 0x0000219C + thumb_func_end ov16_0224B4E0 + + thumb_func_start ov16_0224B4F8 +ov16_0224B4F8: ; 0x0224B4F8 + cmp r1, #0xff + bne _0224B502 + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, r1] +_0224B502: + bx lr + thumb_func_end ov16_0224B4F8 + + thumb_func_start ov16_0224B504 +ov16_0224B504: ; 0x0224B504 + cmp r1, #0xff + bne _0224B50E + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, r1] +_0224B50E: + bx lr + thumb_func_end ov16_0224B504 + + thumb_func_start ov16_0224B510 +ov16_0224B510: ; 0x0224B510 + ldr r3, _0224B514 ; =ov16_0224A984 + bx r3 + ; .align 2, 0 +_0224B514: .word ov16_0224A984 + thumb_func_end ov16_0224B510 + + thumb_func_start ov16_0224B518 +ov16_0224B518: ; 0x0224B518 + ldr r3, _0224B51C ; =ov16_0224A984 + bx r3 + ; .align 2, 0 +_0224B51C: .word ov16_0224A984 + thumb_func_end ov16_0224B518 + + thumb_func_start ov16_0224B520 +ov16_0224B520: ; 0x0224B520 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x78 + add r7, r0, #0 + add r5, r1, #0 + str r2, [sp, #0x18] + bl ov16_0223E05C + str r0, [sp, #0x28] + add r0, r7, #0 + bl ov16_0223E0D4 + str r0, [sp, #0x20] + add r0, r7, #0 + bl ov16_0223E0D0 + str r0, [sp, #0x24] + add r0, r7, #0 + bl ov16_0223DF00 + str r0, [sp, #0x1c] + add r0, r7, #0 + bl ov16_0223E010 + add r6, r0, #0 + add r0, r7, #0 + bl ov16_0223E018 + add r4, r0, #0 + add r0, r7, #0 + bl ov16_0223E064 + add r7, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0224B7A0 ; =0x00004E35 + mov r3, #0x1b + str r0, [sp, #8] + add r2, r3, #0 + add r0, r6, #0 + add r1, r4, #0 + add r3, #0xe5 + bl sub_0200CBDC + mov r0, #0x1b + str r0, [sp] + mov r0, #0x52 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #2 + str r1, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0224B7A4 ; =0x00004E30 + add r2, r6, #0 + str r0, [sp, #0x14] + add r0, r7, #0 + add r3, r4, #0 + bl sub_0200CD7C + mov r0, #1 + str r0, [sp] + ldr r0, _0224B7A8 ; =0x00004E2D + mov r3, #0x1b + str r0, [sp, #4] + add r2, r3, #0 + add r0, r6, #0 + add r1, r4, #0 + add r3, #0xe6 + bl sub_0200CE0C + mov r0, #1 + str r0, [sp] + ldr r0, _0224B7A8 ; =0x00004E2D + mov r3, #0x1b + str r0, [sp, #4] + add r2, r3, #0 + add r0, r6, #0 + add r1, r4, #0 + add r3, #0xe7 + bl sub_0200CE3C + ldr r2, _0224B7AC ; =0x0226E6C4 + add r0, r6, #0 + add r1, r4, #0 + bl sub_0200CE6C + str r0, [r5, #0xc] + bl sub_0200D330 + ldr r0, [sp, #0x18] + bl sub_02079D80 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0224B7B0 ; =0x00004E36 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r6, #0 + mov r2, #0x13 + bl sub_0200D888 + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0224B7B4 ; =0x00004E31 + mov r1, #2 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CD7C + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0224B7B8 ; =0x00004E2E + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0224B7B8 ; =0x00004E2E + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x13 + bl sub_0200CE3C + ldr r2, _0224B7BC ; =0x0226E6F8 + add r0, r6, #0 + add r1, r4, #0 + bl sub_0200CE6C + str r0, [r5, #0x10] + ldr r0, [sp, #0x18] + bl sub_02079FC4 + add r1, r0, #0 + ldr r0, [r5, #0x10] + ldr r0, [r0, #0] + bl sub_02021F24 + ldr r0, [r5, #0x10] + bl sub_0200D330 + mov r0, #1 + mov r1, #5 + bl sub_02012744 + str r0, [r5, #0x50] + ldr r0, [sp, #0x18] + mov r1, #0xb0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0224B688 + mov r0, #2 + b _0224B692 +_0224B688: + ldr r0, [sp, #0x18] + mov r1, #0x6f + mov r2, #0 + bl sub_02074470 +_0224B692: + cmp r0, #0 + bne _0224B6A4 + mov r1, #0x3b + ldr r0, [sp, #0x28] + lsl r1, r1, #4 + bl sub_0200B1EC + add r6, r0, #0 + b _0224B6BE +_0224B6A4: + cmp r0, #1 + bne _0224B6B4 + ldr r0, [sp, #0x28] + ldr r1, _0224B7C0 ; =0x000003B1 + bl sub_0200B1EC + add r6, r0, #0 + b _0224B6BE +_0224B6B4: + ldr r0, [sp, #0x28] + ldr r1, _0224B7C4 ; =0x000003B2 + bl sub_0200B1EC + add r6, r0, #0 +_0224B6BE: + ldr r0, [sp, #0x18] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [sp, #0x24] + mov r1, #0 + bl sub_0200B5CC + ldr r0, [sp, #0x18] + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r1, #1 + ldr r0, [sp, #0x24] + mov r3, #3 + str r1, [sp, #4] + bl sub_0200B60C + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x20] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + add r0, sp, #0x68 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + add r1, sp, #0x68 + mov r2, #0xc + mov r3, #4 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0224B7C8 ; =0x00010200 + ldr r2, [sp, #0x20] + str r0, [sp, #8] + add r0, sp, #0x68 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, sp, #0x68 + mov r1, #1 + mov r2, #5 + bl sub_02012898 + mov r1, #1 + add r2, r1, #0 + add r3, sp, #0x5c + bl sub_0201ED94 + ldr r0, [r5, #0x50] + str r0, [sp, #0x2c] + add r0, sp, #0x68 + str r0, [sp, #0x30] + add r0, r4, #0 + bl sub_0200D9B0 + str r0, [sp, #0x34] + ldr r1, _0224B7A4 ; =0x00004E30 + add r0, r4, #0 + bl sub_0200D04C + mov r1, #0 + str r0, [sp, #0x38] + ldr r0, [sp, #0x60] + str r1, [sp, #0x3c] + str r0, [sp, #0x40] + mov r0, #0xb0 + str r0, [sp, #0x44] + mov r0, #8 + str r0, [sp, #0x48] + mov r0, #0x64 + str r0, [sp, #0x50] + mov r0, #1 + str r0, [sp, #0x54] + mov r0, #5 + str r0, [sp, #0x58] + add r0, sp, #0x2c + str r1, [sp, #0x4c] + bl sub_020127E8 + add r2, r5, #0 + add r3, sp, #0x5c + str r0, [r5, #0x14] + ldmia r3!, {r0, r1} + add r2, #0x18 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #1 + str r0, [r2, #0] + ldr r0, [r5, #0x14] + bl sub_02012AC0 + add r0, sp, #0x68 + bl sub_0201A8FC + add sp, #0x78 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B7A0: .word 0x00004E35 +_0224B7A4: .word 0x00004E30 +_0224B7A8: .word 0x00004E2D +_0224B7AC: .word 0x0226E6C4 +_0224B7B0: .word 0x00004E36 +_0224B7B4: .word 0x00004E31 +_0224B7B8: .word 0x00004E2E +_0224B7BC: .word 0x0226E6F8 +_0224B7C0: .word 0x000003B1 +_0224B7C4: .word 0x000003B2 +_0224B7C8: .word 0x00010200 + thumb_func_end ov16_0224B520 + + thumb_func_start ov16_0224B7CC +ov16_0224B7CC: ; 0x0224B7CC + push {r3, r4, r5, lr} + add r5, r1, #0 + bl ov16_0223E018 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0200D0F4 + ldr r0, [r5, #0x10] + bl sub_0200D0F4 + ldr r0, [r5, #0x14] + bl sub_02012870 + add r0, r5, #0 + add r0, #0x18 + bl sub_0201EE28 + ldr r1, _0224B838 ; =0x00004E35 + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0224B83C ; =0x00004E30 + add r0, r4, #0 + bl sub_0200D080 + ldr r1, _0224B840 ; =0x00004E2D + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224B840 ; =0x00004E2D + add r0, r4, #0 + bl sub_0200D0A0 + ldr r1, _0224B844 ; =0x00004E36 + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0224B848 ; =0x00004E31 + add r0, r4, #0 + bl sub_0200D080 + ldr r1, _0224B84C ; =0x00004E2E + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224B84C ; =0x00004E2E + add r0, r4, #0 + bl sub_0200D0A0 + ldr r0, [r5, #0x50] + bl sub_020127BC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B838: .word 0x00004E35 +_0224B83C: .word 0x00004E30 +_0224B840: .word 0x00004E2D +_0224B844: .word 0x00004E36 +_0224B848: .word 0x00004E31 +_0224B84C: .word 0x00004E2E + thumb_func_end ov16_0224B7CC + + thumb_func_start ov16_0224B850 +ov16_0224B850: ; 0x0224B850 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r1, r2, #0 + add r5, r0, #0 + str r2, [sp] + bl ov16_0223E208 + cmp r0, #0 + bne _0224B91C + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _0224B8A0 + add r0, r5, #0 + mov r1, #3 + bl ov16_0223E1C4 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + add r0, r5, #0 + mov r1, #5 + bl ov16_0223E1C4 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + mov r2, #0xc0 + add r0, r1, #0 + mul r0, r2 + mul r2, r6 + ldr r3, _0224B920 ; =0x00002D74 + add r0, r4, r0 + add r2, r4, r2 + ldrb r0, [r0, r3] + ldrb r2, [r2, r3] + cmp r0, r2 + bls _0224B8AC + add r6, r1, #0 + b _0224B8AC +_0224B8A0: + add r0, r5, #0 + mov r1, #1 + bl ov16_0223E1C4 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 +_0224B8AC: + ldr r1, [sp] + add r0, r5, #0 + add r2, r1, #0 + add r3, r4, r2 + ldr r2, _0224B924 ; =0x0000219C + ldrb r2, [r3, r2] + bl ov16_0223DFAC + add r7, r0, #0 + ldr r0, [sp] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + add r0, r4, r2 + ldr r2, _0224B920 ; =0x00002D74 + mul r1, r6 + add r1, r4, r1 + ldrb r0, [r0, r2] + ldrb r1, [r1, r2] + cmp r1, r0 + bls _0224B908 + sub r0, r1, r0 + cmp r0, #0x1e + blt _0224B8F2 + add r0, r5, #0 + bl ov16_0223E24C + add r2, r0, #0 + lsl r2, r2, #0x10 + add r0, r7, #0 + mov r1, #8 + lsr r2, r2, #0x10 + bl sub_02075C74 + pop {r3, r4, r5, r6, r7, pc} +_0224B8F2: + add r0, r5, #0 + bl ov16_0223E24C + add r2, r0, #0 + lsl r2, r2, #0x10 + add r0, r7, #0 + mov r1, #6 + lsr r2, r2, #0x10 + bl sub_02075C74 + pop {r3, r4, r5, r6, r7, pc} +_0224B908: + add r0, r5, #0 + bl ov16_0223E24C + add r2, r0, #0 + lsl r2, r2, #0x10 + add r0, r7, #0 + mov r1, #6 + lsr r2, r2, #0x10 + bl sub_02075C74 +_0224B91C: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B920: .word 0x00002D74 +_0224B924: .word 0x0000219C + thumb_func_end ov16_0224B850 + + thumb_func_start ov16_0224B928 +ov16_0224B928: ; 0x0224B928 + add r1, r0, r1 + mov r0, #0x39 + lsl r0, r0, #4 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_0224B928 + + thumb_func_start ov16_0224B934 +ov16_0224B934: ; 0x0224B934 + lsl r1, r1, #1 + add r1, r0, r1 + mov r0, #0xe5 + lsl r0, r0, #2 + strh r2, [r1, r0] + bx lr + thumb_func_end ov16_0224B934 + + .rodata + + + .global Unk_ov16_0226E570 +Unk_ov16_0226E570: ; 0x0226E570 + .incbin "incbin/overlay16_rodata.bin", 0x314, 0x318 - 0x314 + + .global Unk_ov16_0226E574 +Unk_ov16_0226E574: ; 0x0226E574 + .incbin "incbin/overlay16_rodata.bin", 0x318, 0x320 - 0x318 + + .global Unk_ov16_0226E57C +Unk_ov16_0226E57C: ; 0x0226E57C + .incbin "incbin/overlay16_rodata.bin", 0x320, 0x328 - 0x320 + + .global Unk_ov16_0226E584 +Unk_ov16_0226E584: ; 0x0226E584 + .incbin "incbin/overlay16_rodata.bin", 0x328, 0x334 - 0x328 + + .global Unk_ov16_0226E590 +Unk_ov16_0226E590: ; 0x0226E590 + .incbin "incbin/overlay16_rodata.bin", 0x334, 0x34C - 0x334 + + .global Unk_ov16_0226E5A8 +Unk_ov16_0226E5A8: ; 0x0226E5A8 + .incbin "incbin/overlay16_rodata.bin", 0x34C, 0x364 - 0x34C + + .global Unk_ov16_0226E5C0 +Unk_ov16_0226E5C0: ; 0x0226E5C0 + .incbin "incbin/overlay16_rodata.bin", 0x364, 0x37C - 0x364 + + .global Unk_ov16_0226E5D8 +Unk_ov16_0226E5D8: ; 0x0226E5D8 + .incbin "incbin/overlay16_rodata.bin", 0x37C, 0x394 - 0x37C + + .global Unk_ov16_0226E5F0 +Unk_ov16_0226E5F0: ; 0x0226E5F0 + .incbin "incbin/overlay16_rodata.bin", 0x394, 0x3AC - 0x394 + + .global Unk_ov16_0226E608 +Unk_ov16_0226E608: ; 0x0226E608 + .incbin "incbin/overlay16_rodata.bin", 0x3AC, 0x3C4 - 0x3AC + + .global Unk_ov16_0226E620 +Unk_ov16_0226E620: ; 0x0226E620 + .incbin "incbin/overlay16_rodata.bin", 0x3C4, 0x3DC - 0x3C4 + + .global Unk_ov16_0226E638 +Unk_ov16_0226E638: ; 0x0226E638 + .incbin "incbin/overlay16_rodata.bin", 0x3DC, 0x3F6 - 0x3DC + + .global Unk_ov16_0226E652 +Unk_ov16_0226E652: ; 0x0226E652 + .incbin "incbin/overlay16_rodata.bin", 0x3F6, 0x410 - 0x3F6 + + .global Unk_ov16_0226E66C +Unk_ov16_0226E66C: ; 0x0226E66C + .incbin "incbin/overlay16_rodata.bin", 0x410, 0x434 - 0x410 + + .global Unk_ov16_0226E690 +Unk_ov16_0226E690: ; 0x0226E690 + .incbin "incbin/overlay16_rodata.bin", 0x434, 0x468 - 0x434 + + .global Unk_ov16_0226E6C4 +Unk_ov16_0226E6C4: ; 0x0226E6C4 + .incbin "incbin/overlay16_rodata.bin", 0x468, 0x49C - 0x468 + + .global Unk_ov16_0226E6F8 +Unk_ov16_0226E6F8: ; 0x0226E6F8 + .incbin "incbin/overlay16_rodata.bin", 0x49C, 0x4D0 - 0x49C + + .global Unk_ov16_0226E72C +Unk_ov16_0226E72C: ; 0x0226E72C + .incbin "incbin/overlay16_rodata.bin", 0x4D0, 0x84C - 0x4D0 + + .global Unk_ov16_0226EAA8 +Unk_ov16_0226EAA8: ; 0x0226EAA8 + .incbin "incbin/overlay16_rodata.bin", 0x84C, 0x858 - 0x84C + + .global Unk_ov16_0226EAB4 +Unk_ov16_0226EAB4: ; 0x0226EAB4 + .incbin "incbin/overlay16_rodata.bin", 0x858, 0x864 - 0x858 + + .global Unk_ov16_0226EAC0 +Unk_ov16_0226EAC0: ; 0x0226EAC0 + .incbin "incbin/overlay16_rodata.bin", 0x864, 0xD + + + .data + + + .global Unk_ov16_02270B20 +Unk_ov16_02270B20: ; 0x02270B20 + .incbin "incbin/overlay16_data.bin", 0x0, 0x69 + diff --git a/asm/ov16_0224B940.s b/asm/ov16_0224B940.s new file mode 100644 index 000000000..ce99c80f9 --- /dev/null +++ b/asm/ov16_0224B940.s @@ -0,0 +1,12277 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0224B940 +ov16_0224B940: ; 0x0224B940 + push {r3, r4, r5, lr} + ldr r1, _0224B984 ; =0x00003158 + add r5, r0, #0 + mov r0, #5 + bl sub_02018144 + add r4, r0, #0 + ldr r2, _0224B984 ; =0x00003158 + mov r0, #0 + add r1, r4, #0 + bl sub_020C4BB8 + add r0, r4, #0 + bl ov16_022541C4 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_022542B8 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02251604 + ldr r0, _0224B988 ; =0x000003DE + add r0, r4, r0 + bl sub_020790B0 + mov r0, #5 + bl sub_0207D388 + ldr r1, _0224B98C ; =0x00002120 + str r0, [r4, r1] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B984: .word 0x00003158 +_0224B988: .word 0x000003DE +_0224B98C: .word 0x00002120 + thumb_func_end ov16_0224B940 + + thumb_func_start ov16_0224B990 +ov16_0224B990: ; 0x0224B990 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, _0224B9D4 ; =0x0000311F + add r5, r0, #0 + ldrb r1, [r4, r1] + cmp r1, #0 + bne _0224B9B6 + bl ov16_0223F438 + cmp r0, #0 + beq _0224B9B6 + add r0, r5, #0 + bl ov16_0223F438 + mov r1, #0x40 + tst r0, r1 + bne _0224B9B6 + mov r0, #0x29 + str r0, [r4, #8] +_0224B9B6: + ldr r2, [r4, #8] + add r0, r5, #0 + lsl r3, r2, #2 + ldr r2, _0224B9D8 ; =0x0226EAEC + add r1, r4, #0 + ldr r2, [r2, r3] + blx r2 + ldr r0, [r4, #8] + cmp r0, #0x2c + bne _0224B9CE + mov r0, #1 + pop {r3, r4, r5, pc} +_0224B9CE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0224B9D4: .word 0x0000311F +_0224B9D8: .word 0x0226EAEC + thumb_func_end ov16_0224B990 + + thumb_func_start ov16_0224B9DC +ov16_0224B9DC: ; 0x0224B9DC + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224B9F0 ; =0x00002120 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 +_0224B9F0: .word 0x00002120 + thumb_func_end ov16_0224B9DC + + thumb_func_start ov16_0224B9F4 +ov16_0224B9F4: ; 0x0224B9F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r6, [sp, #0x20] + add r5, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + str r3, [sp, #4] + str r6, [sp] + bl ov16_0224EF20 + ldr r0, [sp, #0x20] + ldr r3, [sp, #4] + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov16_0224F274 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0224B9F4 + + thumb_func_start ov16_0224BA1C +ov16_0224BA1C: ; 0x0224BA1C + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r5, r1, #0 + bl ov16_0223DF1C + add r7, r0, #0 + mov r4, #0 + cmp r7, #0 + ble _0224BA44 +_0224BA2E: + ldr r3, _0224BA54 ; =0x0000219C + add r6, r5, r4 + ldrb r3, [r6, r3] + ldr r0, [sp] + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0225177C + add r4, r4, #1 + cmp r4, r7 + blt _0224BA2E +_0224BA44: + ldr r0, _0224BA58 ; =0x00002E4C + ldr r1, [r5, r0] + ldr r0, _0224BA5C ; =0x00003122 + strh r1, [r5, r0] + mov r0, #1 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} + nop +_0224BA54: .word 0x0000219C +_0224BA58: .word 0x00002E4C +_0224BA5C: .word 0x00003122 + thumb_func_end ov16_0224BA1C + + thumb_func_start ov16_0224BA60 +ov16_0224BA60: ; 0x0224BA60 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #2 + str r0, [r4, #0xc] + pop {r4, pc} + thumb_func_end ov16_0224BA60 + + thumb_func_start ov16_0224BA78 +ov16_0224BA78: ; 0x0224BA78 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_02253FCC + cmp r0, #0 + beq _0224BA9A + add r0, r4, #0 + mov r1, #1 + mov r2, #0x29 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #3 + str r0, [r4, #0xc] + b _0224BA9E +_0224BA9A: + mov r0, #3 + str r0, [r4, #8] +_0224BA9E: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255FBC + pop {r3, r4, r5, pc} + thumb_func_end ov16_0224BA78 + + thumb_func_start ov16_0224BAA8 +ov16_0224BAA8: ; 0x0224BAA8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_02256414 + add r2, r0, #0 + beq _0224BAC8 + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224BAC8: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255FBC + add r0, r5, #0 + bl ov16_0223F7E8 + mov r0, #4 + str r0, [r4, #8] + pop {r3, r4, r5, pc} + thumb_func_end ov16_0224BAA8 + + thumb_func_start ov16_0224BADC +ov16_0224BADC: ; 0x0224BADC + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r7, r1, #0 + bl ov16_0223DF1C + add r5, r0, #0 + mov r4, #0 + cmp r5, #0 + ble _0224BB0C + add r6, r7, #0 + add r2, r4, #0 +_0224BAF2: + mov r0, #0xb7 + strb r2, [r7, r4] + lsl r0, r0, #6 + ldr r1, [r6, r0] + add r0, r0, #4 + str r1, [r6, r0] + add r3, r7, r4 + ldr r0, _0224BB24 ; =0x0000314C + add r4, r4, #1 + strb r2, [r3, r0] + add r6, #0xc0 + cmp r4, r5 + blt _0224BAF2 +_0224BB0C: + ldr r0, [sp] + mov r1, #0 + bl ov16_0223F288 + ldr r0, [sp] + mov r1, #1 + bl ov16_0223B748 + mov r0, #5 + str r0, [r7, #8] + pop {r3, r4, r5, r6, r7, pc} + nop +_0224BB24: .word 0x0000314C + thumb_func_end ov16_0224BADC + + thumb_func_start ov16_0224BB28 +ov16_0224BB28: ; 0x0224BB28 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xa0 + add r7, r0, #0 + str r1, [sp, #0x1c] + bl ov16_0223DF1C + str r0, [sp, #0x64] + add r0, r7, #0 + bl ov16_0223DF0C + str r0, [sp, #0x28] + mov r4, #0 + ldr r0, [sp, #0x64] + str r4, [sp, #0x60] + cmp r0, #0 + bgt _0224BB4C + bl _0224C3E8 +_0224BB4C: + ldr r0, [sp, #0x1c] + mov r1, #0x75 + lsl r1, r1, #2 + str r0, [sp, #0x58] + add r0, r0, r1 + str r0, [sp, #0x54] + ldr r0, [sp, #0x1c] + ldr r1, _0224BE64 ; =0x000021AC + str r0, [sp, #0x50] + str r0, [sp, #0x4c] + str r0, [sp, #0x48] + add r0, r0, r1 + str r0, [sp, #0x44] + mov r1, #0x23 + ldr r0, [sp, #0x1c] + lsl r1, r1, #8 + add r0, r0, r1 + str r0, [sp, #0x40] + ldr r0, [sp, #0x28] + mov r1, #2 + and r0, r1 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x28] + mov r1, #8 + and r0, r1 + str r0, [sp, #0x38] + ldr r0, [sp, #0x28] + lsl r1, r1, #6 + and r0, r1 + str r0, [sp, #0x34] + ldr r0, [sp, #0x28] + mov r1, #0x20 + and r0, r1 + str r0, [sp, #0x30] + ldr r0, [sp, #0x28] + mov r1, #4 + and r0, r1 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + mov r1, #0x80 + and r0, r1 + str r0, [sp, #0x24] + ldr r0, [sp, #0x28] + mov r1, #1 + and r0, r1 + str r0, [sp, #0x20] +_0224BBA8: + ldr r0, [sp, #0x1c] + add r5, r0, r4 + ldrb r0, [r0, r4] + cmp r0, #0x11 + bls _0224BBB4 + b _0224C3AE +_0224BBB4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224BBC0: ; jump table + .short _0224BBE4 - _0224BBC0 - 2 ; case 0 + .short _0224BCC4 - _0224BBC0 - 2 ; case 1 + .short _0224BC80 - _0224BBC0 - 2 ; case 2 + .short _0224BF46 - _0224BBC0 - 2 ; case 3 + .short _0224BF54 - _0224BBC0 - 2 ; case 4 + .short _0224C03A - _0224BBC0 - 2 ; case 5 + .short _0224C074 - _0224BBC0 - 2 ; case 6 + .short _0224C0B2 - _0224BBC0 - 2 ; case 7 + .short _0224C0C0 - _0224BBC0 - 2 ; case 8 + .short _0224C0EE - _0224BBC0 - 2 ; case 9 + .short _0224C162 - _0224BBC0 - 2 ; case 10 + .short _0224C1C0 - _0224BBC0 - 2 ; case 11 + .short _0224C2B8 - _0224BBC0 - 2 ; case 12 + .short _0224C308 - _0224BBC0 - 2 ; case 13 + .short _0224C33C - _0224BBC0 - 2 ; case 14 + .short _0224C344 - _0224BBC0 - 2 ; case 15 + .short _0224C35E - _0224BBC0 - 2 ; case 16 + .short _0224C3A2 - _0224BBC0 - 2 ; case 17 +_0224BBE4: + ldr r0, [sp, #0x3c] + cmp r0, #0 + beq _0224BC08 + ldr r0, [sp, #0x38] + cmp r0, #0 + bne _0224BC08 + cmp r4, #2 + bne _0224BBFC + ldr r0, [sp, #0x1c] + ldrb r0, [r0] + cmp r0, #0xe + bne _0224BCF4 +_0224BBFC: + cmp r4, #3 + bne _0224BC08 + ldr r0, [sp, #0x1c] + ldrb r0, [r0, #1] + cmp r0, #0xe + bne _0224BCF4 +_0224BC08: + add r0, r4, #0 + bl sub_020787CC + ldr r2, _0224BE68 ; =0x00003108 + ldr r1, [sp, #0x1c] + ldrb r1, [r1, r2] + tst r0, r1 + beq _0224BC26 + mov r0, #0xd + strb r0, [r5] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x27 + str r2, [r0, r1] + b _0224C3AE +_0224BC26: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259A28 + cmp r0, #0 + bne _0224BC4A + ldr r0, [sp, #0x54] + mov r2, #0xd + ldr r1, [r0, #0] + mov r0, #2 + orr r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + strb r2, [r5] + str r2, [r0, r1] + b _0224C3AE +_0224BC4A: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223DF14 + bl ov16_02263AF0 + cmp r0, #1 + beq _0224BC66 + mov r1, #0x15 + ldr r0, [sp, #0x1c] + lsl r1, r1, #4 + ldr r0, [r0, r1] + cmp r0, #0 + beq _0224BC7A +_0224BC66: + ldr r3, _0224BE70 ; =0x0000219C + ldr r1, [sp, #0x1c] + ldrb r3, [r5, r3] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_02265330 + mov r0, #1 + strb r0, [r5] + b _0224C3AE +_0224BC7A: + mov r0, #2 + strb r0, [r5] + b _0224C3AE +_0224BC80: + ldr r0, [sp, #0x64] + mov r6, #0 + cmp r0, #0 + ble _0224BCAC +_0224BC88: + cmp r6, r4 + beq _0224BCA4 + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0223DF14 + bl ov16_02263AF0 + cmp r0, #1 + bne _0224BCA4 + ldr r0, [sp, #0x1c] + ldrb r0, [r0, r6] + cmp r0, #0xe + bne _0224BCAC +_0224BCA4: + ldr r0, [sp, #0x64] + add r6, r6, #1 + cmp r6, r0 + blt _0224BC88 +_0224BCAC: + ldr r0, [sp, #0x64] + cmp r6, r0 + bne _0224BCF4 + ldr r3, _0224BE70 ; =0x0000219C + ldr r1, [sp, #0x1c] + ldrb r3, [r5, r3] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_02265330 + mov r0, #1 + strb r0, [r5] +_0224BCC4: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _0224BCF4 + mov r1, #0x23 + ldr r0, [sp, #0x50] + lsl r1, r1, #8 + ldrb r2, [r0, r1] + ldr r1, _0224BE74 ; =0x000021B4 + ldr r0, [sp, #0x58] + str r2, [r0, r1] + ldr r0, [sp, #0x34] + cmp r0, #0 + beq _0224BD18 + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #1 + beq _0224BCF6 + cmp r0, #4 + beq _0224BD06 +_0224BCF4: + b _0224C3AE +_0224BCF6: + mov r0, #0x11 + strb r0, [r5] + mov r1, #0xd + strb r1, [r5, #4] + ldr r2, _0224BE6C ; =0x000021A8 + ldr r1, [sp, #0x58] + str r0, [r1, r2] + b _0224C3AE +_0224BD06: + mov r0, #0x11 + strb r0, [r5] + mov r0, #0xd + strb r0, [r5, #4] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x10 + str r2, [r0, r1] + b _0224C3AE +_0224BD18: + ldr r0, [sp, #0x30] + cmp r0, #0 + beq _0224BD9A + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #5 + bhi _0224BDDC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224BD36: ; jump table + .short _0224C3AE - _0224BD36 - 2 ; case 0 + .short _0224BD42 - _0224BD36 - 2 ; case 1 + .short _0224BD52 - _0224BD36 - 2 ; case 2 + .short _0224BD64 - _0224BD36 - 2 ; case 3 + .short _0224BD76 - _0224BD36 - 2 ; case 4 + .short _0224BD88 - _0224BD36 - 2 ; case 5 +_0224BD42: + mov r0, #0x11 + strb r0, [r5] + mov r1, #0xd + strb r1, [r5, #4] + ldr r2, _0224BE6C ; =0x000021A8 + ldr r1, [sp, #0x58] + str r0, [r1, r2] + b _0224C3AE +_0224BD52: + mov r0, #0x11 + strb r0, [r5] + mov r0, #0xd + strb r0, [r5, #4] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x12 + str r2, [r0, r1] + b _0224C3AE +_0224BD64: + mov r0, #0x11 + strb r0, [r5] + mov r0, #0xd + strb r0, [r5, #4] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x13 + str r2, [r0, r1] + b _0224C3AE +_0224BD76: + mov r0, #0x11 + strb r0, [r5] + mov r0, #0xd + strb r0, [r5, #4] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x10 + str r2, [r0, r1] + b _0224C3AE +_0224BD88: + mov r0, #0x11 + strb r0, [r5] + mov r0, #0xd + strb r0, [r5] + ldr r1, _0224BE6C ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x14 + str r2, [r0, r1] + b _0224C3AE +_0224BD9A: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0xff + beq _0224BDB0 + ldr r1, _0224BE78 ; =0x0000314C + mov r0, #1 + ldrb r2, [r5, r1] + orr r0, r2 + strb r0, [r5, r1] +_0224BDB0: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #4 + bgt _0224BDD6 + cmp r0, #0 + blt _0224BDDC + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224BDCC: ; jump table + .short _0224C3AE - _0224BDCC - 2 ; case 0 + .short _0224BDDE - _0224BDCC - 2 ; case 1 + .short _0224BE96 - _0224BDCC - 2 ; case 2 + .short _0224BEEC - _0224BDCC - 2 ; case 3 + .short _0224BEFA - _0224BDCC - 2 ; case 4 +_0224BDD6: + cmp r0, #0xff + bne _0224BDDC + b _0224BF08 +_0224BDDC: + b _0224C3AE +_0224BDDE: + mov r0, #0 + mvn r0, r0 + str r0, [sp] + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + mov r3, #0 + bl ov16_02254A6C + cmp r0, #0xf + bne _0224BE1E + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #1 + bic r1, r0 + mov r0, #1 + orr r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] + add r0, r7, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0224BE16 + mov r0, #0xd + strb r0, [r5] + b _0224BE8C +_0224BE16: + mov r0, #0x11 + strb r0, [r5] + strb r1, [r5, #4] + b _0224BE8C +_0224BE1E: + ldr r3, _0224BE7C ; =0x00002DEC + ldr r0, [sp, #0x4c] + ldrh r0, [r0, r3] + cmp r0, #0 + beq _0224BE88 + ldr r0, [sp, #0x4c] + add r1, r3, #2 + ldrh r2, [r0, r1] + ldr r1, _0224BE80 ; =0x000030BC + ldr r0, [sp, #0x48] + strh r2, [r0, r1] + ldr r0, [sp, #0x4c] + sub r1, #8 + ldrh r2, [r0, r3] + ldr r0, [sp, #0x48] + strh r2, [r0, r1] + ldr r1, _0224BE84 ; =0x000021B0 + ldr r0, [sp, #0x58] + mov r2, #0 + str r2, [r0, r1] + add r0, r7, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0224BE58 + mov r0, #0xd + strb r0, [r5] + b _0224BE8C +_0224BE58: + mov r0, #0x11 + strb r0, [r5] + mov r0, #0xd + strb r0, [r5, #4] + b _0224BE8C + nop +_0224BE64: .word 0x000021AC +_0224BE68: .word 0x00003108 +_0224BE6C: .word 0x000021A8 +_0224BE70: .word 0x0000219C +_0224BE74: .word 0x000021B4 +_0224BE78: .word 0x0000314C +_0224BE7C: .word 0x00002DEC +_0224BE80: .word 0x000030BC +_0224BE84: .word 0x000021B0 +_0224BE88: + mov r0, #3 + strb r0, [r5] +_0224BE8C: + ldr r1, _0224C1A4 ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0xd + str r2, [r0, r1] + b _0224C3AE +_0224BE96: + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #0x84 + tst r0, r1 + beq _0224BEDE + ldr r1, _0224C1A8 ; =0x00000251 + add r0, sp, #0x78 + strh r1, [r0, #6] + mov r1, #0 + strb r1, [r0, #5] + mov r0, sp + str r0, [sp, #0x68] + sub r0, #8 + str r0, [sp, #0x68] + add r2, sp, #0x7c + add r3, r0, #0 + mov r6, #4 +_0224BEBA: + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + sub r6, r6, #1 + bne _0224BEBA + ldr r0, [r2, #0] + add r1, r4, #0 + str r0, [r3, #0] + ldr r0, [sp, #0x68] + ldmia r0!, {r2, r3} + str r0, [sp, #0x68] + add r0, r7, #0 + bl ov16_02266168 + mov r0, #0xf + strb r0, [r5] + mov r0, #0 + strb r0, [r5, #4] + b _0224C3AE +_0224BEDE: + ldr r1, _0224C1A4 ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0xe + str r2, [r0, r1] + mov r0, #7 + strb r0, [r5] + b _0224C3AE +_0224BEEC: + ldr r1, _0224C1A4 ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0xf + str r2, [r0, r1] + mov r0, #9 + strb r0, [r5] + b _0224C3AE +_0224BEFA: + ldr r1, _0224C1A4 ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x10 + str r2, [r0, r1] + mov r0, #0xb + strb r0, [r5] + b _0224C3AE +_0224BF08: + ldr r0, [sp, #0x2c] + cmp r0, #0 + beq _0224BF2A + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0226647C + mov r0, #0 + strb r0, [r5] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E258 + ldr r1, [sp, #0x1c] + mov r2, #0 + strb r2, [r1, r0] + b _0224C3AE +_0224BF2A: + ldr r0, [sp, #0x3c] + cmp r0, #0 + beq _0224BF72 + cmp r4, #2 + bne _0224BF72 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0226647C + ldr r0, [sp, #0x1c] + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #2] + b _0224C3AE +_0224BF46: + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_022656F0 + mov r0, #4 + strb r0, [r5] +_0224BF54: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _0224BF66 + mov r0, #0 + strb r0, [r5] + b _0224C3AE +_0224BF66: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + bne _0224BF74 +_0224BF72: + b _0224C3AE +_0224BF74: + mov r1, #0x23 + ldr r0, [sp, #0x50] + lsl r1, r1, #8 + ldrb r0, [r0, r1] + sub r3, r0, #1 + cmp r3, #4 + bne _0224BF90 + ldr r1, _0224C1A4 ; =0x000021A8 + ldr r0, [sp, #0x58] + mov r2, #0x10 + str r2, [r0, r1] + mov r0, #0xb + strb r0, [r5] + b _0224C3AE +_0224BF90: + add r0, sp, #0x7c + str r0, [sp] + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_02254CA8 + cmp r0, #0 + bne _0224BFF8 + add r0, r7, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0224BFC6 + add r0, r7, #0 + mov r1, #1 + bl ov16_0223F720 + add r0, r7, #0 + bl ov16_0223DF10 + add r1, r0, #0 + add r0, r7, #0 + bl ov16_0225B444 + b _0224C3AE +_0224BFC6: + mov r0, sp + str r0, [sp, #0x6c] + sub r0, #8 + str r0, [sp, #0x6c] + add r2, sp, #0x7c + add r3, r0, #0 + mov r6, #4 +_0224BFD4: + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + sub r6, r6, #1 + bne _0224BFD4 + ldr r0, [r2, #0] + add r1, r4, #0 + str r0, [r3, #0] + ldr r0, [sp, #0x6c] + ldmia r0!, {r2, r3} + str r0, [sp, #0x6c] + add r0, r7, #0 + bl ov16_02266168 + mov r0, #0xf + strb r0, [r5] + mov r0, #3 + strb r0, [r5, #4] + b _0224C3AE +_0224BFF8: + mov r3, #0x23 + ldr r0, [sp, #0x50] + lsl r3, r3, #8 + ldrb r2, [r0, r3] + ldr r1, _0224C1AC ; =0x000021B0 + ldr r0, [sp, #0x58] + str r2, [r0, r1] + ldr r0, [sp, #0x50] + ldrb r0, [r0, r3] + ldr r3, _0224C1B0 ; =0x000030BC + sub r1, r0, #1 + ldr r0, [sp, #0x48] + strh r1, [r0, r3] + ldrh r0, [r0, r3] + lsl r1, r0, #1 + ldr r0, [sp, #0x4c] + add r1, r0, r1 + ldr r0, _0224C1B4 ; =0x00002D4C + ldrh r2, [r1, r0] + add r1, r3, #0 + ldr r0, [sp, #0x48] + sub r1, #8 + strh r2, [r0, r1] + mov r0, #5 + strb r0, [r5] + add r0, r3, #0 + add r0, #0x90 + ldrb r1, [r5, r0] + mov r0, #2 + add r3, #0x90 + orr r0, r1 + strb r0, [r5, r3] + b _0224C3AE +_0224C03A: + add r0, sp, #0x78 + str r0, [sp] + ldr r1, _0224C1B0 ; =0x000030BC + ldr r0, [sp, #0x48] + lsl r2, r4, #0x18 + ldrh r0, [r0, r1] + ldr r1, [sp, #0x1c] + ldr r3, [sp, #0x28] + str r0, [sp, #4] + ldr r0, [sp, #0x44] + lsr r2, r2, #0x18 + str r0, [sp, #8] + add r0, r7, #0 + bl ov16_02250DE4 + cmp r0, #0 + beq _0224C06E + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x78] + add r0, r7, #0 + add r3, r4, #0 + bl ov16_022657AC + mov r0, #6 + strb r0, [r5] + b _0224C3AE +_0224C06E: + mov r0, #0xd + strb r0, [r5] + b _0224C3AE +_0224C074: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _0224C086 + mov r0, #3 + strb r0, [r5] + b _0224C3AE +_0224C086: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _0224C180 + mov r1, #0x23 + ldr r0, [sp, #0x50] + lsl r1, r1, #8 + ldrb r0, [r0, r1] + ldr r1, _0224C1B8 ; =0x000021AC + sub r2, r0, #1 + ldr r0, [sp, #0x58] + str r2, [r0, r1] + mov r0, #0xd + strb r0, [r5] + ldr r1, _0224C1BC ; =0x0000314C + mov r0, #4 + ldrb r2, [r5, r1] + orr r0, r2 + strb r0, [r5, r1] + b _0224C3AE +_0224C0B2: + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_022658E8 + mov r0, #8 + strb r0, [r5] +_0224C0C0: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _0224C0D2 + mov r0, #0 + strb r0, [r5] + b _0224C3AE +_0224C0D2: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _0224C180 + ldr r0, [sp, #0x40] + ldr r1, _0224C1AC ; =0x000021B0 + ldr r2, [r0, #0] + ldr r0, [sp, #0x58] + str r2, [r0, r1] + mov r0, #0xd + strb r0, [r5] + b _0224C3AE +_0224C0EE: + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + mov r6, #6 + bl ov16_02258BA8 + str r0, [sp, #0x5c] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E1F8 + cmp r0, #4 + beq _0224C114 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E1F8 + cmp r0, #5 + bne _0224C14C +_0224C114: + ldr r0, [sp, #0x28] + cmp r0, #3 + beq _0224C132 + cmp r0, #7 + beq _0224C132 + cmp r0, #0x83 + beq _0224C132 + cmp r0, #0x13 + bne _0224C14C + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E1F8 + cmp r0, #4 + bne _0224C14C +_0224C132: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E258 + lsl r1, r0, #4 + ldr r0, [sp, #0x1c] + add r2, r0, r1 + ldr r0, _0224C1A4 ; =0x000021A8 + ldr r1, [r2, r0] + cmp r1, #0xf + bne _0224C14C + add r0, #8 + ldr r6, [r2, r0] +_0224C14C: + ldr r0, [sp, #0x5c] + ldr r1, [sp, #0x1c] + str r0, [sp] + add r0, r7, #0 + add r2, r4, #0 + mov r3, #0 + str r6, [sp, #4] + bl ov16_02265A8C + mov r0, #0xa + strb r0, [r5] +_0224C162: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _0224C174 + mov r0, #0 + strb r0, [r5] + b _0224C3AE +_0224C174: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + bne _0224C182 +_0224C180: + b _0224C3AE +_0224C182: + mov r3, #0x23 + ldr r0, [sp, #0x50] + lsl r3, r3, #8 + ldrb r0, [r0, r3] + ldr r1, _0224C1AC ; =0x000021B0 + sub r2, r0, #1 + ldr r0, [sp, #0x58] + str r2, [r0, r1] + ldr r0, [sp, #0x50] + sub r1, #0x10 + ldrb r0, [r0, r3] + sub r0, r0, #1 + strb r0, [r5, r1] + mov r0, #0xd + strb r0, [r5] + b _0224C3AE + nop +_0224C1A4: .word 0x000021A8 +_0224C1A8: .word 0x00000251 +_0224C1AC: .word 0x000021B0 +_0224C1B0: .word 0x000030BC +_0224C1B4: .word 0x00002D4C +_0224C1B8: .word 0x000021AC +_0224C1BC: .word 0x0000314C +_0224C1C0: + ldr r0, [sp, #0x24] + cmp r0, #0 + beq _0224C1E0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r1, [sp, #0x1c] + ldr r3, _0224C438 ; =0x000003BB + add r0, r7, #0 + add r2, r4, #0 + bl ov16_02265B2C + mov r0, #0xc + strb r0, [r5] + b _0224C3AE +_0224C1E0: + ldr r0, [sp, #0x20] + cmp r0, #0 + beq _0224C24C + ldr r0, [sp, #0x2c] + cmp r0, #0 + bne _0224C24C + add r0, r7, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0224C210 + add r0, r7, #0 + mov r1, #1 + bl ov16_0223F720 + add r0, r7, #0 + bl ov16_0223DF10 + add r1, r0, #0 + add r0, r7, #0 + bl ov16_0225B444 + b _0224C3AE +_0224C210: + mov r1, #0 + add r0, sp, #0x78 + strb r1, [r0, #5] + ldr r1, _0224C43C ; =0x00000319 + add r2, sp, #0x7c + strh r1, [r0, #6] + mov r0, sp + str r0, [sp, #0x70] + sub r0, #8 + str r0, [sp, #0x70] + add r3, r0, #0 + mov r6, #4 +_0224C228: + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + sub r6, r6, #1 + bne _0224C228 + ldr r0, [r2, #0] + add r1, r4, #0 + str r0, [r3, #0] + ldr r0, [sp, #0x70] + ldmia r0!, {r2, r3} + str r0, [sp, #0x70] + add r0, r7, #0 + bl ov16_02266168 + mov r0, #0xf + strb r0, [r5] + mov r0, #0 + strb r0, [r5, #4] + b _0224C3AE +_0224C24C: + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + add r3, sp, #0x7c + bl ov16_02255C00 + cmp r0, #0 + beq _0224C2B2 + add r0, r7, #0 + bl ov16_0223EBEC + mov r1, #0x10 + tst r0, r1 + beq _0224C280 + add r0, r7, #0 + mov r1, #1 + bl ov16_0223F720 + add r0, r7, #0 + bl ov16_0223DF10 + add r1, r0, #0 + add r0, r7, #0 + bl ov16_0225B444 + b _0224C3AE +_0224C280: + mov r0, sp + str r0, [sp, #0x74] + sub r0, #8 + str r0, [sp, #0x74] + add r2, sp, #0x7c + add r3, r0, #0 + mov r6, #4 +_0224C28E: + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + sub r6, r6, #1 + bne _0224C28E + ldr r0, [r2, #0] + add r1, r4, #0 + str r0, [r3, #0] + ldr r0, [sp, #0x74] + ldmia r0!, {r2, r3} + str r0, [sp, #0x74] + add r0, r7, #0 + bl ov16_02266168 + mov r0, #0xf + strb r0, [r5] + mov r0, #0 + strb r0, [r5, #4] + b _0224C3AE +_0224C2B2: + mov r0, #0xc + strb r0, [r5] + b _0224C3AE +_0224C2B8: + ldr r0, [sp, #0x24] + cmp r0, #0 + beq _0224C2E2 + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _0224C2E6 + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0xff + bne _0224C2DC + mov r0, #0 + strb r0, [r5] + b _0224C2E6 +_0224C2DC: + mov r0, #0xd + strb r0, [r5] + b _0224C2E6 +_0224C2E2: + mov r0, #0xd + strb r0, [r5] +_0224C2E6: + ldr r0, [sp, #0x3c] + cmp r0, #0 + beq _0224C3AE + ldr r0, [sp, #0x38] + cmp r0, #0 + bne _0224C3AE + ldrb r0, [r5] + cmp r0, #0xd + bne _0224C3AE + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E258 + ldr r1, [sp, #0x1c] + mov r2, #0xd + strb r2, [r1, r0] + b _0224C3AE +_0224C308: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0226647C + ldr r0, [sp, #0x28] + cmp r0, #7 + bne _0224C330 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E258 + ldr r1, [sp, #0x1c] + ldrb r0, [r1, r0] + cmp r0, #0xe + bne _0224C338 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_022666E0 + b _0224C338 +_0224C330: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_022666E0 +_0224C338: + mov r0, #0xe + strb r0, [r5] +_0224C33C: + ldr r0, [sp, #0x60] + add r0, r0, #1 + str r0, [sp, #0x60] + b _0224C3AE +_0224C344: + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02259AB4 + cmp r0, #0 + beq _0224C3AE + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02252040 + ldrb r0, [r5, #4] + strb r0, [r5] + b _0224C3AE +_0224C35E: + mov r1, #2 + add r0, sp, #0x78 + strb r1, [r0, #5] + mov r1, #0x26 + lsl r1, r1, #4 + strh r1, [r0, #6] + ldr r0, [sp, #0x1c] + add r1, r4, #0 + bl ov16_02255560 + str r0, [sp, #0x80] + mov r0, sp + sub r0, #8 + mov ip, r0 + add r2, sp, #0x7c + add r3, r0, #0 + mov r6, #4 +_0224C380: + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + sub r6, r6, #1 + bne _0224C380 + ldr r0, [r2, #0] + add r1, r4, #0 + str r0, [r3, #0] + mov r0, ip + ldmia r0!, {r2, r3} + add r0, r7, #0 + bl ov16_02266168 + mov r0, #0xf + strb r0, [r5] + mov r0, #0xd + strb r0, [r5, #4] + b _0224C3AE +_0224C3A2: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_022665C8 + ldrb r0, [r5, #4] + strb r0, [r5] +_0224C3AE: + ldr r0, [sp, #0x58] + ldr r1, [sp, #0x50] + add r0, #0x10 + str r0, [sp, #0x58] + ldr r0, [sp, #0x54] + add r4, r4, #1 + add r0, #0x40 + str r0, [sp, #0x54] + mov r0, #1 + lsl r0, r0, #8 + add r1, r1, r0 + str r1, [sp, #0x50] + ldr r1, [sp, #0x4c] + add r1, #0xc0 + str r1, [sp, #0x4c] + ldr r1, [sp, #0x48] + add r1, r1, #2 + str r1, [sp, #0x48] + ldr r1, [sp, #0x44] + add r1, #0x10 + str r1, [sp, #0x44] + ldr r1, [sp, #0x40] + add r0, r1, r0 + str r0, [sp, #0x40] + ldr r0, [sp, #0x64] + cmp r4, r0 + bge _0224C3E8 + bl _0224BBA8 +_0224C3E8: + ldr r1, [sp, #0x60] + ldr r0, [sp, #0x64] + cmp r1, r0 + bne _0224C434 + ldr r1, [sp, #0x1c] + add r0, r7, #0 + bl ov16_02251694 + add r0, r7, #0 + mov r1, #0 + bl ov16_0223B748 + ldr r0, [sp, #0x1c] + mov r1, #6 + str r1, [r0, #8] + ldr r0, [sp, #0x64] + mov r6, #0 + cmp r0, #0 + ble _0224C434 + ldr r4, [sp, #0x1c] +_0224C410: + ldr r0, _0224C440 ; =0x000021A8 + ldr r0, [r4, r0] + cmp r0, #0xf + bne _0224C42A + ldr r1, [sp, #0x1c] + add r0, r7, #0 + add r3, r1, #0 + add r5, r3, r6 + ldr r3, _0224C444 ; =0x000021A0 + add r2, r6, #0 + ldrb r3, [r5, r3] + bl ov16_0225A200 +_0224C42A: + ldr r0, [sp, #0x64] + add r6, r6, #1 + add r4, #0x10 + cmp r6, r0 + blt _0224C410 +_0224C434: + add sp, #0xa0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C438: .word 0x000003BB +_0224C43C: .word 0x00000319 +_0224C440: .word 0x000021A8 +_0224C444: .word 0x000021A0 + thumb_func_end ov16_0224BB28 + + thumb_func_start ov16_0224C448 +ov16_0224C448: ; 0x0224C448 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + add r5, r1, #0 + bl ov16_0223DF1C + str r0, [sp, #0x14] + ldr r0, [sp, #4] + bl ov16_0223DF0C + mov r2, #0x22 + lsl r2, r2, #4 + mov r1, #0 + tst r2, r0 + beq _0224C47E + ldr r0, [sp, #0x14] + add r4, r1, #0 + cmp r0, #0 + ble _0224C47C + ldr r1, _0224C5B8 ; =0x000021E8 +_0224C470: + add r0, r5, r4 + strb r4, [r0, r1] + ldr r0, [sp, #0x14] + add r4, r4, #1 + cmp r4, r0 + blt _0224C470 +_0224C47C: + b _0224C5B0 +_0224C47E: + mov r2, #4 + tst r0, r2 + beq _0224C4A6 + ldr r0, [sp, #0x14] + add r4, r1, #0 + cmp r0, #0 + ble _0224C4BE + ldr r2, _0224C5BC ; =0x000021B4 + add r3, r5, #0 +_0224C490: + ldr r0, [r3, r2] + cmp r0, #4 + bne _0224C49A + mov r1, #5 + b _0224C4BE +_0224C49A: + ldr r0, [sp, #0x14] + add r4, r4, #1 + add r3, #0x10 + cmp r4, r0 + blt _0224C490 + b _0224C4BE +_0224C4A6: + ldr r0, _0224C5BC ; =0x000021B4 + ldr r0, [r5, r0] + cmp r0, #4 + bne _0224C4B2 + add r4, r1, #0 + mov r1, #5 +_0224C4B2: + ldr r0, _0224C5C0 ; =0x000021D4 + ldr r0, [r5, r0] + cmp r0, #4 + bne _0224C4BE + mov r4, #2 + mov r1, #5 +_0224C4BE: + cmp r1, #5 + bne _0224C4E6 + ldr r0, _0224C5B8 ; =0x000021E8 + ldr r2, [sp, #0x14] + strb r4, [r5, r0] + mov r1, #1 + mov r0, #0 + cmp r2, #0 + ble _0224C5B0 + ldr r3, _0224C5B8 ; =0x000021E8 +_0224C4D2: + cmp r0, r4 + beq _0224C4DC + add r2, r5, r1 + strb r0, [r2, r3] + add r1, r1, #1 +_0224C4DC: + ldr r2, [sp, #0x14] + add r0, r0, #1 + cmp r0, r2 + blt _0224C4D2 + b _0224C5B0 +_0224C4E6: + ldr r0, [sp, #0x14] + mov r2, #0 + cmp r0, #0 + ble _0224C50E + ldr r4, _0224C5B8 ; =0x000021E8 + add r0, r5, #0 + add r6, r4, #0 + sub r6, #0x34 +_0224C4F6: + ldr r3, [r0, r6] + sub r3, r3, #2 + cmp r3, #1 + bhi _0224C504 + add r3, r5, r1 + strb r2, [r3, r4] + add r1, r1, #1 +_0224C504: + ldr r3, [sp, #0x14] + add r2, r2, #1 + add r0, #0x10 + cmp r2, r3 + blt _0224C4F6 +_0224C50E: + ldr r0, [sp, #0x14] + mov r2, #0 + cmp r0, #0 + ble _0224C538 + ldr r4, _0224C5B8 ; =0x000021E8 + add r0, r5, #0 + add r6, r4, #0 + sub r6, #0x34 +_0224C51E: + ldr r3, [r0, r6] + cmp r3, #2 + beq _0224C52E + cmp r3, #3 + beq _0224C52E + add r3, r5, r1 + strb r2, [r3, r4] + add r1, r1, #1 +_0224C52E: + ldr r3, [sp, #0x14] + add r2, r2, #1 + add r0, #0x10 + cmp r2, r3 + blt _0224C51E +_0224C538: + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x14] + sub r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #0 + ble _0224C5B0 +_0224C546: + ldr r0, [sp, #8] + add r7, r0, #1 + ldr r0, [sp, #0x14] + cmp r7, r0 + bge _0224C5A4 + ldr r0, [sp, #8] + add r0, r5, r0 + str r0, [sp, #0x10] +_0224C556: + ldr r1, [sp, #0x10] + ldr r0, _0224C5B8 ; =0x000021E8 + ldrb r6, [r1, r0] + add r1, r5, r7 + ldrb r4, [r1, r0] + lsl r0, r6, #4 + str r1, [sp, #0xc] + add r1, r5, r0 + ldr r0, _0224C5BC ; =0x000021B4 + ldr r0, [r1, r0] + lsl r1, r4, #4 + add r2, r5, r1 + ldr r1, _0224C5BC ; =0x000021B4 + ldr r1, [r2, r1] + cmp r0, r1 + bne _0224C59C + cmp r0, #1 + beq _0224C57E + mov r0, #1 + b _0224C580 +_0224C57E: + mov r0, #0 +_0224C580: + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov16_02252EC8 + cmp r0, #0 + beq _0224C59C + ldr r1, [sp, #0x10] + ldr r0, _0224C5B8 ; =0x000021E8 + strb r4, [r1, r0] + ldr r1, [sp, #0xc] + strb r6, [r1, r0] +_0224C59C: + ldr r0, [sp, #0x14] + add r7, r7, #1 + cmp r7, r0 + blt _0224C556 +_0224C5A4: + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [sp, #8] + cmp r1, r0 + blt _0224C546 +_0224C5B0: + mov r0, #7 + str r0, [r5, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C5B8: .word 0x000021E8 +_0224C5BC: .word 0x000021B4 +_0224C5C0: .word 0x000021D4 + thumb_func_end ov16_0224C448 + + thumb_func_start ov16_0224C5C4 +ov16_0224C5C4: ; 0x0224C5C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + mov r1, #0 + str r0, [sp] + str r1, [sp, #4] + bl ov16_0223DF1C + add r7, r0, #0 +_0224C5D6: + ldr r0, [r4, #0x28] + cmp r0, #3 + bls _0224C5DE + b _0224C6F0 +_0224C5DE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224C5EA: ; jump table + .short _0224C5F2 - _0224C5EA - 2 ; case 0 + .short _0224C68C - _0224C5EA - 2 ; case 1 + .short _0224C6CA - _0224C5EA - 2 ; case 2 + .short _0224C6E8 - _0224C5EA - 2 ; case 3 +_0224C5F2: + ldr r0, [r4, #0x2c] + cmp r0, r7 + bge _0224C680 + add r6, r4, #0 + add r6, #0x2c +_0224C5FC: + add r1, r4, r0 + ldr r0, _0224C704 ; =0x000021E8 + ldrb r5, [r1, r0] + add r0, r5, #0 + bl sub_020787CC + ldr r1, _0224C708 ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + ldr r0, [r6, #0] + beq _0224C618 + add r0, r0, #1 + str r0, [r6, #0] + b _0224C67A +_0224C618: + add r0, r0, #1 + str r0, [r6, #0] + mov r0, #0xc0 + mul r0, r5 + add r1, r4, r0 + ldr r0, _0224C70C ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + bne _0224C67A + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255570 + mov r1, #0x42 + lsl r1, r1, #2 + cmp r0, r1 + bne _0224C67A + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255EC0 + cmp r0, #0 + bne _0224C67A + lsl r0, r5, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _0224C67A + ldr r0, [sp] + bl ov16_02266AA0 + mov r0, #0x46 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xe8 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #8 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224C67A: + ldr r0, [r4, #0x2c] + cmp r0, r7 + blt _0224C5FC +_0224C680: + mov r0, #0 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] + b _0224C6F0 +_0224C68C: + mov r6, #0 + cmp r7, #0 + ble _0224C6C2 + add r5, r4, #0 +_0224C694: + ldr r0, _0224C710 ; =0x00002DB0 + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #0x16 + tst r0, r1 + beq _0224C6BA + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02255570 + cmp r0, #0x63 + beq _0224C6BA + ldr r0, _0224C710 ; =0x00002DB0 + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #0x16 + and r1, r0 + ldr r0, _0224C710 ; =0x00002DB0 + str r1, [r5, r0] +_0224C6BA: + add r6, r6, #1 + add r5, #0xc0 + cmp r6, r7 + blt _0224C694 +_0224C6C2: + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] + b _0224C6F0 +_0224C6CA: + mov r6, #0 + add r5, r4, #0 +_0224C6CE: + ldr r0, [sp] + bl ov16_0223F4BC + ldr r1, _0224C714 ; =0x0000310C + add r6, r6, #1 + strh r0, [r5, r1] + add r5, r5, #2 + cmp r6, #4 + blt _0224C6CE + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] + b _0224C6F0 +_0224C6E8: + mov r0, #0 + str r0, [r4, #0x28] + mov r0, #2 + str r0, [sp, #4] +_0224C6F0: + ldr r0, [sp, #4] + cmp r0, #0 + bne _0224C6F8 + b _0224C5D6 +_0224C6F8: + cmp r0, #2 + bne _0224C700 + mov r0, #8 + str r0, [r4, #8] +_0224C700: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C704: .word 0x000021E8 +_0224C708: .word 0x00003108 +_0224C70C: .word 0x00002DAC +_0224C710: .word 0x00002DB0 +_0224C714: .word 0x0000310C + thumb_func_end ov16_0224C5C4 + + thumb_func_start ov16_0224C718 +ov16_0224C718: ; 0x0224C718 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r4, r1, #0 + bl ov16_0223DF1C + add r5, r0, #0 + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0225B444 + cmp r0, #0 + bne _0224C784 + ldr r1, _0224C788 ; =0x00003150 + mov r0, #0 + str r0, [r4, r1] + cmp r5, #0 + ble _0224C754 + ldr r3, _0224C788 ; =0x00003150 + ldr r2, _0224C78C ; =0x000021A8 + add r1, r4, #0 +_0224C740: + ldr r6, [r1, r2] + cmp r6, #0x27 + beq _0224C74C + ldr r6, [r4, r3] + add r6, r6, #1 + str r6, [r4, r3] +_0224C74C: + add r0, r0, #1 + add r1, #0x10 + cmp r0, r5 + blt _0224C740 +_0224C754: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_02255FBC + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, r5 + bne _0224C774 + add r0, r4, #0 + mov r1, #0 + add r0, #0xec + str r1, [r0, #0] + mov r0, #9 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224C774: + add r1, r4, r0 + ldr r0, _0224C790 ; =0x000021E8 + ldrb r1, [r1, r0] + sub r0, #0x40 + lsl r1, r1, #4 + add r1, r4, r1 + ldr r0, [r1, r0] + str r0, [r4, #8] +_0224C784: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C788: .word 0x00003150 +_0224C78C: .word 0x000021A8 +_0224C790: .word 0x000021E8 + thumb_func_end ov16_0224C718 + + thumb_func_start ov16_0224C794 +ov16_0224C794: ; 0x0224C794 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r0, [sp] + add r4, r1, #0 + mov r5, #0 + bl ov16_0223DF1C + str r0, [sp, #4] +_0224C7A4: + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #1 + bl ov16_02250EF4 + cmp r0, #1 + beq _0224C7CE + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r1, #0 + bl ov16_02250F98 + cmp r0, #1 + beq _0224C7CE + ldr r0, [sp] + add r1, r4, #0 + bl ov16_02250A48 + cmp r0, #1 + bne _0224C7D0 +_0224C7CE: + b _0224CF76 +_0224C7D0: + ldr r0, [r4, #0x10] + cmp r0, #0xd + bhi _0224C8AA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224C7E2: ; jump table + .short _0224C7FE - _0224C7E2 - 2 ; case 0 + .short _0224C8B8 - _0224C7E2 - 2 ; case 1 + .short _0224C962 - _0224C7E2 - 2 ; case 2 + .short _0224CA0E - _0224C7E2 - 2 ; case 3 + .short _0224CABC - _0224C7E2 - 2 ; case 4 + .short _0224CB38 - _0224C7E2 - 2 ; case 5 + .short _0224CBB4 - _0224C7E2 - 2 ; case 6 + .short _0224CC74 - _0224C7E2 - 2 ; case 7 + .short _0224CD04 - _0224C7E2 - 2 ; case 8 + .short _0224CD94 - _0224C7E2 - 2 ; case 9 + .short _0224CE28 - _0224C7E2 - 2 ; case 10 + .short _0224CEBE - _0224C7E2 - 2 ; case 11 + .short _0224CF00 - _0224C7E2 - 2 ; case 12 + .short _0224CF58 - _0224C7E2 - 2 ; case 13 +_0224C7FE: + ldr r6, [r4, #0x14] + cmp r6, #2 + bge _0224C8A6 + mov r0, #0x71 + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #0x38] + add r0, r4, #0 + str r0, [sp, #8] + add r0, #0x14 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0x1c] + mov r0, #0x1c + str r0, [sp, #0x18] +_0224C81C: + lsl r0, r6, #2 + mov r1, #0x6f + add r0, r4, r0 + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r1, #1 + tst r1, r2 + beq _0224C892 + ldr r1, [sp, #0x38] + lsl r3, r6, #3 + ldr r7, [r1, r3] + ldr r2, [sp, #0x18] + add r1, r7, #0 + str r7, [sp, #0x2c] + bic r1, r2 + str r1, [sp, #0x2c] + lsl r1, r7, #0x1b + lsr r1, r1, #0x1d + sub r1, r1, #1 + lsl r1, r1, #0x1d + lsr r2, r1, #0x1b + ldr r1, [sp, #0x2c] + orr r2, r1 + ldr r1, [sp, #0x38] + str r2, [r1, r3] + ldr r1, [r1, r3] + lsl r1, r1, #0x1b + lsr r1, r1, #0x1d + bne _0224C892 + mov r1, #0x6f + lsl r1, r1, #2 + ldr r2, [r0, r1] + ldr r1, [sp, #0x1c] + bic r2, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r2, [r0, r1] + mov r1, #0x73 + add r0, r1, #0 + add r0, #0xb1 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x32 + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r4, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r6, #0 + bl ov16_0225B120 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r5, #1 +_0224C892: + ldr r0, [sp, #8] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #8] + cmp r5, #0 + str r1, [r0, #0] + bne _0224C8A6 + ldr r6, [r4, #0x14] + cmp r6, #2 + blt _0224C81C +_0224C8A6: + cmp r5, #0 + beq _0224C8AC +_0224C8AA: + b _0224CF5A +_0224C8AC: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224C8B8: + ldr r6, [r4, #0x14] + cmp r6, #2 + bge _0224C952 + mov r0, #0x71 + lsl r0, r0, #2 + add r7, r4, r0 + add r0, r4, #0 + str r0, [sp, #0xc] + add r0, #0x14 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x20] +_0224C8D0: + lsl r0, r6, #2 + add r3, r4, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r1, [r3, r0] + mov r0, #2 + tst r0, r1 + beq _0224C93E + lsl r2, r6, #3 + ldr r1, [r7, r2] + ldr r0, _0224CBF0 ; =0xFFFFFC7F + and r0, r1 + str r0, [sp, #0x30] + lsl r0, r1, #0x16 + lsr r0, r0, #0x1d + sub r0, r0, #1 + lsl r0, r0, #0x1d + lsr r1, r0, #0x16 + ldr r0, [sp, #0x30] + orr r0, r1 + str r0, [r7, r2] + ldr r0, [r7, r2] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1d + bne _0224C93E + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r3, r0] + ldr r1, [sp, #0x20] + mov r2, #0x32 + bic r0, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r3, r1] + mov r1, #0x71 + add r0, r1, #0 + add r0, #0xb3 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r4, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r6, #0 + bl ov16_0225B120 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r5, #1 +_0224C93E: + ldr r0, [sp, #0xc] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0xc] + cmp r5, #0 + str r1, [r0, #0] + bne _0224C952 + ldr r6, [r4, #0x14] + cmp r6, #2 + blt _0224C8D0 +_0224C952: + cmp r5, #0 + bne _0224CA00 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224C962: + ldr r6, [r4, #0x14] + cmp r6, #2 + bge _0224C9FC + mov r0, #0x71 + lsl r0, r0, #2 + add r7, r4, r0 + add r0, r4, #0 + str r0, [sp, #0x10] + add r0, #0x14 + str r0, [sp, #0x10] + mov r0, #0x40 + str r0, [sp, #0x24] +_0224C97A: + lsl r0, r6, #2 + add r3, r4, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r1, [r3, r0] + mov r0, #0x40 + tst r0, r1 + beq _0224C9E8 + lsl r2, r6, #3 + ldr r1, [r7, r2] + ldr r0, _0224CBF4 ; =0xFFFF8FFF + and r0, r1 + str r0, [sp, #0x34] + lsl r0, r1, #0x11 + lsr r0, r0, #0x1d + sub r0, r0, #1 + lsl r0, r0, #0x1d + lsr r1, r0, #0x11 + ldr r0, [sp, #0x34] + orr r0, r1 + str r0, [r7, r2] + ldr r0, [r7, r2] + lsl r0, r0, #0x11 + lsr r0, r0, #0x1d + bne _0224C9E8 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r3, r0] + ldr r1, [sp, #0x24] + mov r2, #0x32 + bic r0, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r3, r1] + mov r1, #0x36 + add r0, r1, #0 + add r0, #0xee + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r4, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r6, #0 + bl ov16_0225B120 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r5, #1 +_0224C9E8: + ldr r0, [sp, #0x10] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x10] + cmp r5, #0 + str r1, [r0, #0] + bne _0224C9FC + ldr r6, [r4, #0x14] + cmp r6, #2 + blt _0224C97A +_0224C9FC: + cmp r5, #0 + beq _0224CA02 +_0224CA00: + b _0224CF5A +_0224CA02: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224CA0E: + ldr r7, [r4, #0x14] + cmp r7, #2 + bge _0224CAAC + mov r0, #0x71 + lsl r0, r0, #2 + add r6, r4, r0 + add r0, r4, #0 + str r0, [sp, #0x14] + add r0, #0x14 + str r0, [sp, #0x14] + mov r0, #8 + str r0, [sp, #0x28] +_0224CA26: + lsl r0, r7, #2 + add r3, r4, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r1, [r3, r0] + mov r0, #8 + tst r0, r1 + beq _0224CA98 + lsl r0, r7, #3 + ldr r2, [r6, r0] + ldr r1, _0224CBF8 ; =0xFFF1FFFF + and r1, r2 + mov ip, r1 + lsl r1, r2, #0xc + lsr r1, r1, #0x1d + sub r1, r1, #1 + lsl r1, r1, #0x1d + lsr r2, r1, #0xc + mov r1, ip + orr r1, r2 + str r1, [r6, r0] + ldr r1, [r6, r0] + lsl r1, r1, #0xc + lsr r1, r1, #0x1d + bne _0224CA98 + mov r1, #0x6f + lsl r1, r1, #2 + ldr r1, [r3, r1] + ldr r2, [sp, #0x28] + bic r1, r2 + mov r2, #0x6f + lsl r2, r2, #2 + str r1, [r3, r2] + ldr r0, [r6, r0] + lsl r0, r0, #0xf + lsr r1, r0, #0x1e + add r0, r2, #0 + sub r0, #0xa4 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x6e + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r4, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r7, #0 + bl ov16_0225B120 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r5, #1 +_0224CA98: + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x14] + cmp r5, #0 + str r1, [r0, #0] + bne _0224CAAC + ldr r7, [r4, #0x14] + cmp r7, #2 + blt _0224CA26 +_0224CAAC: + cmp r5, #0 + bne _0224CB2A + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224CABC: + ldr r6, [r4, #0x14] + cmp r6, #2 + bge _0224CB26 + add r7, r4, #0 + add r7, #0x14 +_0224CAC6: + lsl r0, r6, #2 + mov r1, #0x6f + add r0, r4, r0 + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r1, #3 + lsl r1, r1, #8 + tst r1, r2 + beq _0224CB16 + mov r1, #0x6f + lsl r1, r1, #2 + ldr r2, [r0, r1] + sub r1, #0xbc + sub r2, r2, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r2, [r0, r1] + ldr r1, [r0, r1] + mov r0, #3 + lsl r0, r0, #8 + tst r0, r1 + bne _0224CB16 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xe9 + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r4, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r6, #0 + bl ov16_0225B120 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r5, #1 +_0224CB16: + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + cmp r5, #0 + bne _0224CB26 + ldr r6, [r4, #0x14] + cmp r6, #2 + blt _0224CAC6 +_0224CB26: + cmp r5, #0 + beq _0224CB2C +_0224CB2A: + b _0224CF5A +_0224CB2C: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224CB38: + ldr r6, [r4, #0x14] + cmp r6, #2 + bge _0224CBA4 + add r7, r4, #0 + add r7, #0x14 +_0224CB42: + lsl r0, r6, #2 + mov r1, #0x6f + add r0, r4, r0 + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r1, #7 + lsl r1, r1, #0xc + tst r1, r2 + beq _0224CB94 + mov r1, #0x6f + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r1, #1 + lsl r1, r1, #0xc + sub r2, r2, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r2, [r0, r1] + ldr r1, [r0, r1] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r1 + bne _0224CB94 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xfa + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r4, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r6, #0 + bl ov16_0225B120 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r5, #1 +_0224CB94: + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + cmp r5, #0 + bne _0224CBA4 + ldr r6, [r4, #0x14] + cmp r6, #2 + blt _0224CB42 +_0224CBA4: + cmp r5, #0 + bne _0224CC66 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224CBB4: + ldr r0, [r4, #0x14] + ldr r1, [sp, #4] + cmp r0, r1 + bge _0224CC62 + add r6, r4, #0 + mov r7, #2 + add r6, #0x14 +_0224CBC2: + add r1, r4, r0 + ldr r0, _0224CBFC ; =0x000021EC + ldrb r2, [r1, r0] + mov r0, #0x63 + lsl r0, r0, #2 + add r1, r4, r2 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0224CC50 + mov r0, #0x63 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + sub r3, r0, #1 + mov r0, #0x63 + lsl r0, r0, #2 + strb r3, [r1, r0] + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224CC50 + mov r0, #0xc0 + mul r0, r2 + ldr r3, _0224CC00 ; =0x00002D8C + b _0224CC04 + ; .align 2, 0 +_0224CBF0: .word 0xFFFFFC7F +_0224CBF4: .word 0xFFFF8FFF +_0224CBF8: .word 0xFFF1FFFF +_0224CBFC: .word 0x000021EC +_0224CC00: .word 0x00002D8C +_0224CC04: + add r0, r4, r0 + ldr r3, [r0, r3] + cmp r3, #0 + beq _0224CC50 + mov r3, #0x46 + lsl r3, r3, #2 + str r2, [r4, r3] + add r3, r4, #0 + add r3, #0xf5 + strb r7, [r3] + add r5, r4, #0 + ldr r3, _0224CF3C ; =0x00000215 + add r5, #0xf6 + strh r3, [r5] + sub r3, #0x5d + ldrb r1, [r1, r3] + lsl r1, r1, #8 + orr r2, r1 + add r1, r4, #0 + add r1, #0xf8 + str r2, [r1, #0] + ldr r1, _0224CF40 ; =0x00002D90 + ldr r0, [r0, r1] + add r1, r7, #0 + bl ov16_022563F8 + ldr r1, _0224CF44 ; =0x0000215C + mov r2, #0x88 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r5, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224CC50: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + cmp r5, #0 + bne _0224CC62 + ldr r0, [r4, #0x14] + ldr r1, [sp, #4] + cmp r0, r1 + blt _0224CBC2 +_0224CC62: + cmp r5, #0 + beq _0224CC68 +_0224CC66: + b _0224CF5A +_0224CC68: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + b _0224CF5A +_0224CC74: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r2, #3 + tst r2, r1 + beq _0224CCFC + mov r2, #2 + tst r1, r2 + beq _0224CCAA + add r0, r4, #0 + ldr r1, _0224CF48 ; =0x00000321 + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CCF2 +_0224CCAA: + add r1, r0, #4 + ldr r1, [r4, r1] + sub r2, r1, #1 + add r1, r0, #4 + str r2, [r4, r1] + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0224CCD0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xea + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CCF2 +_0224CCD0: + add r0, r4, #0 + ldr r1, _0224CF48 ; =0x00000321 + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224CCF2: + mov r0, #0x4e + mov r1, #0x13 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r5, #1 +_0224CCFC: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224CF5A +_0224CD04: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r2, #0xc + tst r2, r1 + beq _0224CD8C + mov r2, #8 + tst r1, r2 + beq _0224CD3A + add r0, r4, #0 + ldr r1, _0224CF4C ; =0x00000325 + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CD82 +_0224CD3A: + add r1, r0, #4 + ldr r1, [r4, r1] + sub r2, r1, #1 + add r1, r0, #4 + str r2, [r4, r1] + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0224CD60 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xeb + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CD82 +_0224CD60: + add r0, r4, #0 + ldr r1, _0224CF4C ; =0x00000325 + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224CD82: + mov r0, #0x4e + mov r1, #0x15 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r5, #1 +_0224CD8C: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224CF5A +_0224CD94: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r2, #0x30 + tst r2, r1 + beq _0224CE20 + mov r2, #0x20 + tst r1, r2 + beq _0224CDCC + mov r1, #0xca + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CE16 +_0224CDCC: + add r1, r0, #4 + ldr r1, [r4, r1] + sub r2, r1, #1 + add r1, r0, #4 + str r2, [r4, r1] + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0224CDF2 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xec + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CE16 +_0224CDF2: + mov r1, #0xca + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224CE16: + mov r0, #0x4e + mov r1, #0x16 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r5, #1 +_0224CE20: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224CF5A +_0224CE28: + mov r0, #6 + lsl r0, r0, #6 + ldr r2, [r4, r0] + mov r1, #0xc0 + add r0, r2, #0 + tst r0, r1 + beq _0224CEB6 + mov r0, #0x80 + tst r0, r2 + beq _0224CE60 + add r0, r4, #0 + ldr r1, _0224CF50 ; =0x0000032B + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CEAC +_0224CE60: + add r0, r1, #0 + add r0, #0xc4 + ldr r0, [r4, r0] + sub r2, r0, #1 + add r0, r1, #0 + add r0, #0xc4 + add r1, #0xc4 + str r2, [r4, r0] + ldr r0, [r4, r1] + cmp r0, #0 + bne _0224CE8A + add r0, r4, #0 + mov r1, #1 + mov r2, #0xed + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224CEAC +_0224CE8A: + add r0, r4, #0 + ldr r1, _0224CF50 ; =0x0000032B + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224CEAC: + mov r0, #0x4e + mov r1, #0x14 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r5, #1 +_0224CEB6: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224CF5A +_0224CEBE: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #2 + lsl r0, r0, #0xe + tst r0, r1 + beq _0224CEF8 + add r0, r4, #0 + ldr r1, _0224CF54 ; =0x0000032D + add r0, #0xf6 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x68 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r1, #0x12 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x4e + lsl r0, r0, #2 + str r1, [r4, r0] + mov r5, #1 +_0224CEF8: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224CF5A +_0224CF00: + mov r1, #6 + lsl r1, r1, #6 + ldr r3, [r4, r1] + mov r2, #7 + lsl r2, r2, #0xc + add r0, r3, #0 + tst r0, r2 + beq _0224CF32 + mov r0, #1 + lsl r0, r0, #0xc + sub r0, r3, r0 + str r0, [r4, r1] + ldr r0, [r4, r1] + tst r0, r2 + bne _0224CF32 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xee + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r5, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224CF32: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224CF5A + nop +_0224CF3C: .word 0x00000215 +_0224CF40: .word 0x00002D90 +_0224CF44: .word 0x0000215C +_0224CF48: .word 0x00000321 +_0224CF4C: .word 0x00000325 +_0224CF50: .word 0x0000032B +_0224CF54: .word 0x0000032D +_0224CF58: + mov r5, #2 +_0224CF5A: + cmp r5, #0 + bne _0224CF60 + b _0224C7A4 +_0224CF60: + cmp r5, #1 + bne _0224CF6A + ldr r0, [sp] + bl ov16_02266AA0 +_0224CF6A: + cmp r5, #2 + bne _0224CF76 + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #0xa + str r0, [r4, #8] +_0224CF76: + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0224C794 + + thumb_func_start ov16_0224CF7C +ov16_0224CF7C: ; 0x0224CF7C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + mov r1, #0 + str r1, [sp, #0x10] + str r0, [sp, #4] + bl ov16_0223DF1C + ldr r1, [r4, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #1 + bl ov16_02250EF4 + cmp r0, #1 + beq _0224CFB8 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r1, #0 + bl ov16_02250F98 + cmp r0, #1 + beq _0224CFB8 + ldr r0, [sp, #4] + add r1, r4, #0 + bl ov16_02250A48 + cmp r0, #1 + bne _0224CFBC +_0224CFB8: + bl _0224D998 +_0224CFBC: + ldr r1, [r4, #0x1c] + ldr r0, [sp, #0xc] + cmp r1, r0 + blt _0224CFC8 + bl _0224D98E +_0224CFC8: + ldr r0, _0224D2F8 ; =0x000021EC + add r1, r4, r1 + ldrb r5, [r1, r0] + add r0, r5, #0 + bl sub_020787CC + ldr r1, _0224D2FC ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + beq _0224CFE6 + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + bl _0224D982 +_0224CFE6: + ldr r0, [r4, #0x18] + cmp r0, #0x1a + bls _0224CFF0 + bl _0224D972 +_0224CFF0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224CFFC: ; jump table + .short _0224D032 - _0224CFFC - 2 ; case 0 + .short _0224D09A - _0224CFFC - 2 ; case 1 + .short _0224D11C - _0224CFFC - 2 ; case 2 + .short _0224D138 - _0224CFFC - 2 ; case 3 + .short _0224D154 - _0224CFFC - 2 ; case 4 + .short _0224D170 - _0224CFFC - 2 ; case 5 + .short _0224D1DA - _0224CFFC - 2 ; case 6 + .short _0224D22C - _0224CFFC - 2 ; case 7 + .short _0224D2AC - _0224CFFC - 2 ; case 8 + .short _0224D2E8 - _0224CFFC - 2 ; case 9 + .short _0224D356 - _0224CFFC - 2 ; case 10 + .short _0224D394 - _0224CFFC - 2 ; case 11 + .short _0224D40C - _0224CFFC - 2 ; case 12 + .short _0224D490 - _0224CFFC - 2 ; case 13 + .short _0224D590 - _0224CFFC - 2 ; case 14 + .short _0224D5F8 - _0224CFFC - 2 ; case 15 + .short _0224D6AC - _0224CFFC - 2 ; case 16 + .short _0224D73C - _0224CFFC - 2 ; case 17 + .short _0224D75A - _0224CFFC - 2 ; case 18 + .short _0224D7A0 - _0224CFFC - 2 ; case 19 + .short _0224D7EC - _0224CFFC - 2 ; case 20 + .short _0224D836 - _0224CFFC - 2 ; case 21 + .short _0224D880 - _0224CFFC - 2 ; case 22 + .short _0224D8CA - _0224CFFC - 2 ; case 23 + .short _0224D91A - _0224CFFC - 2 ; case 24 + .short _0224D94E - _0224CFFC - 2 ; case 25 + .short _0224D968 - _0224CFFC - 2 ; case 26 +_0224D032: + mov r6, #0xc0 + add r0, r5, #0 + mul r0, r6 + add r3, r4, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + mov r1, #1 + ldr r2, [r3, r0] + lsl r1, r1, #0xa + tst r1, r2 + beq _0224D090 + add r1, r0, #0 + sub r1, #0x34 + ldr r2, [r3, r1] + add r1, r0, #0 + sub r1, #0x30 + ldr r1, [r3, r1] + cmp r2, r1 + beq _0224D090 + cmp r2, #0 + beq _0224D090 + add r0, #0xc + ldr r0, [r3, r0] + lsl r0, r0, #0xd + lsr r0, r0, #0x1d + beq _0224D076 + add r6, #0x58 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xef + str r5, [r4, r6] + bl ov16_02251E1C + b _0224D084 +_0224D076: + add r6, #0x58 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x89 + str r5, [r4, r6] + bl ov16_02251E1C +_0224D084: + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D090: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + bl _0224D972 +_0224D09A: + mov r6, #0xc0 + add r0, r5, #0 + mul r0, r6 + add r3, r4, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + mov r1, #1 + ldr r2, [r3, r0] + lsl r1, r1, #0x18 + tst r1, r2 + beq _0224D112 + add r1, r0, #0 + sub r1, #0x34 + ldr r2, [r3, r1] + add r1, r0, #0 + sub r1, #0x30 + ldr r1, [r3, r1] + cmp r2, r1 + beq _0224D112 + cmp r2, #0 + beq _0224D112 + add r1, r0, #0 + add r1, #0xc + ldr r1, [r3, r1] + lsl r1, r1, #0xd + lsr r1, r1, #0x1d + beq _0224D0E0 + add r6, #0x58 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xef + str r5, [r4, r6] + bl ov16_02251E1C + b _0224D106 +_0224D0E0: + add r1, r6, #0 + add r1, #0x58 + str r5, [r4, r1] + add r1, r6, #0 + add r1, #0xc8 + add r6, #0x64 + str r1, [r4, r6] + sub r0, #0x30 + ldr r0, [r3, r0] + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _0224D300 ; =0x0000215C + mov r2, #0xa9 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C +_0224D106: + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D112: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + bl _0224D972 +_0224D11C: + ldr r0, [sp, #4] + add r1, r4, #0 + add r2, r5, #0 + bl ov16_022562E8 + cmp r0, #1 + bne _0224D12E + mov r0, #1 + str r0, [sp, #0x10] +_0224D12E: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + bl _0224D972 +_0224D138: + ldr r0, [sp, #4] + add r1, r4, #0 + add r2, r5, #0 + bl ov16_022579A4 + cmp r0, #1 + bne _0224D14A + mov r0, #1 + str r0, [sp, #0x10] +_0224D14A: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + bl _0224D972 +_0224D154: + ldr r0, [sp, #4] + add r1, r4, #0 + add r2, r5, #0 + bl ov16_02258008 + cmp r0, #1 + bne _0224D166 + mov r0, #1 + str r0, [sp, #0x10] +_0224D166: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + bl _0224D972 +_0224D170: + mov r3, #0xc0 + add r0, r5, #0 + mul r0, r3 + mov r2, #0xb7 + add r6, r4, r0 + lsl r2, r2, #6 + ldr r0, [r6, r2] + mov r1, #4 + tst r1, r0 + beq _0224D1D2 + mov r1, #3 + and r0, r1 + add r1, r0, #0 + mul r1, r3 + add r0, r4, r1 + sub r2, #0x34 + ldr r0, [r0, r2] + cmp r0, #0 + beq _0224D1D2 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _0224D1D2 + ldr r0, _0224D304 ; =0x00002D8C + ldr r1, [r6, r0] + cmp r1, #0 + beq _0224D1D2 + add r0, #0x34 + ldr r1, [r6, r0] + mov r0, #3 + and r1, r0 + mov r0, #0x47 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x45 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D1D2: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D1DA: + mov r2, #0xc0 + add r0, r5, #0 + mul r0, r2 + ldr r3, _0224D308 ; =0x00002DAC + add r0, r4, r0 + ldr r1, [r0, r3] + mov r6, #8 + tst r1, r6 + beq _0224D224 + add r1, r3, #0 + sub r1, #0x20 + ldr r1, [r0, r1] + cmp r1, #0 + beq _0224D224 + add r2, #0x58 + str r5, [r4, r2] + sub r3, #0x1c + ldr r1, [r0, r3] + add r0, r6, #0 + sub r0, #9 + mul r0, r1 + add r1, r6, #0 + bl ov16_022563F8 + ldr r1, _0224D300 ; =0x0000215C + mov r2, #0x17 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D224: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D22C: + mov r0, #0xc0 + mul r0, r5 + ldr r1, _0224D308 ; =0x00002DAC + add r6, r4, r0 + ldr r0, [r6, r1] + mov r2, #0x80 + tst r0, r2 + beq _0224D2A4 + add r0, r1, #0 + sub r0, #0x20 + ldr r0, [r6, r0] + cmp r0, #0 + beq _0224D2A4 + add r2, #0x98 + str r5, [r4, r2] + sub r1, #0x1c + ldr r0, [r6, r1] + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _0224D300 ; =0x0000215C + str r0, [r4, r1] + ldr r1, _0224D308 ; =0x00002DAC + mov r0, #0xf + ldr r2, [r6, r1] + lsl r0, r0, #8 + add r3, r2, #0 + and r3, r0 + cmp r3, r0 + beq _0224D270 + mov r0, #1 + lsl r0, r0, #8 + add r0, r2, r0 + str r0, [r6, r1] +_0224D270: + ldr r2, _0224D308 ; =0x00002DAC + ldr r0, _0224D300 ; =0x0000215C + ldr r3, [r6, r2] + mov r2, #0xf + lsl r2, r2, #8 + and r2, r3 + ldr r1, [r4, r0] + lsr r2, r2, #8 + mul r2, r1 + str r2, [r4, r0] + mov r1, #0 + ldr r2, [r4, r0] + mvn r1, r1 + mul r1, r2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x17 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D2A4: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D2AC: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r6, r4, r1 + ldr r1, _0224D308 ; =0x00002DAC + mov r2, #0x10 + ldr r3, [r6, r1] + tst r2, r3 + beq _0224D2E0 + sub r1, #0x20 + ldr r1, [r6, r1] + cmp r1, #0 + beq _0224D2E0 + add r0, #0x58 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1a + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D2E0: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D2E8: + mov r6, #0xc0 + add r0, r5, #0 + mul r0, r6 + add r3, r4, r0 + ldr r7, _0224D30C ; =0x00002DB0 + ldr r0, _0224D2FC ; =0x00003108 + b _0224D310 + nop +_0224D2F8: .word 0x000021EC +_0224D2FC: .word 0x00003108 +_0224D300: .word 0x0000215C +_0224D304: .word 0x00002D8C +_0224D308: .word 0x00002DAC +_0224D30C: .word 0x00002DB0 +_0224D310: + ldr r2, [r3, r7] + lsl r0, r0, #0x18 + tst r0, r2 + beq _0224D34E + add r0, r7, #0 + sub r0, #0x24 + ldr r0, [r3, r0] + cmp r0, #0 + beq _0224D34E + sub r0, r7, #4 + ldr r1, [r3, r0] + mov r0, #7 + tst r0, r1 + beq _0224D348 + add r6, #0x58 + str r5, [r4, r6] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x5e + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] + b _0224D34E +_0224D348: + ldr r0, _0224D650 ; =0xF7FFFFFF + and r0, r2 + str r0, [r3, r7] +_0224D34E: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D356: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r6, r4, r1 + ldr r1, _0224D654 ; =0x00002DB0 + mov r2, #1 + ldr r3, [r6, r1] + lsl r2, r2, #0x1c + tst r2, r3 + beq _0224D38C + sub r1, #0x24 + ldr r1, [r6, r1] + cmp r1, #0 + beq _0224D38C + add r0, #0x58 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x62 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D38C: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D394: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r6, r4, r1 + ldr r1, _0224D654 ; =0x00002DB0 + mov r7, #0xe + ldr r3, [r6, r1] + lsl r7, r7, #0xc + add r2, r3, #0 + tst r2, r7 + beq _0224D404 + add r2, r1, #0 + sub r2, #0x24 + ldr r2, [r6, r2] + cmp r2, #0 + beq _0224D404 + mov r2, #2 + lsl r2, r2, #0xc + sub r2, r3, r2 + str r2, [r6, r1] + ldr r2, [r6, r1] + tst r2, r7 + beq _0224D3E0 + sub r1, #0x20 + ldr r1, [r6, r1] + sub r0, #0xc1 + mul r0, r1 + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _0224D658 ; =0x0000215C + mov r2, #0x3b + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + b _0224D3EA +_0224D3E0: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x3c + bl ov16_02251E1C +_0224D3EA: + ldr r0, _0224D65C ; =0x00002DEA + ldrh r1, [r6, r0] + mov r0, #0x49 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #0xc + str r5, [r4, r0] + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D404: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D40C: + mov r0, #0x7b + str r0, [sp] + ldr r0, [sp, #4] + add r1, r4, #0 + mov r2, #4 + add r3, r5, #0 + bl ov16_022555A4 + mov r1, #0x4e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xc0 + mul r0, r5 + add r6, r4, r0 + ldr r0, _0224D660 ; =0x00002DAC + ldr r1, [r6, r0] + mov r0, #7 + tst r0, r1 + beq _0224D488 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _0224D488 + ldr r1, _0224D664 ; =0x00002D8C + ldr r0, [r6, r1] + cmp r0, #0 + beq _0224D488 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224D488 + add r0, r1, #4 + ldr r1, [r6, r0] + mov r0, #0 + mvn r0, r0 + mul r0, r1 + mov r1, #8 + bl ov16_022563F8 + ldr r1, _0224D658 ; =0x0000215C + ldr r2, _0224D668 ; =0x00000107 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, _0224D66C ; =0x0000213C + mov r1, #0x40 + ldr r2, [r4, r0] + orr r2, r1 + str r2, [r4, r0] + add r1, #0xd8 + str r5, [r4, r1] + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D488: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D490: + mov r0, #0xc0 + mul r0, r5 + add r7, r4, r0 + ldr r0, _0224D654 ; =0x00002DB0 + ldr r1, [r7, r0] + mov r0, #0x70 + tst r0, r1 + beq _0224D580 + ldr r0, [sp, #0xc] + mov r6, #0 + cmp r0, #0 + ble _0224D4F2 +_0224D4A8: + mov r0, #0xc0 + mul r0, r6 + add r2, r4, r0 + ldr r0, _0224D660 ; =0x00002DAC + ldr r1, [r2, r0] + mov r0, #7 + tst r0, r1 + beq _0224D4E6 + ldr r0, _0224D664 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _0224D4E6 + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x2b + beq _0224D4E6 + mov r0, #0x46 + lsl r0, r0, #2 + str r6, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x13 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224D4F2 +_0224D4E6: + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + ldr r0, [sp, #0xc] + cmp r6, r0 + blt _0224D4A8 +_0224D4F2: + ldr r0, [sp, #0xc] + cmp r6, r0 + beq _0224D4FE + mov r0, #2 + str r0, [sp, #0x10] + b _0224D972 +_0224D4FE: + ldr r0, _0224D654 ; =0x00002DB0 + ldr r1, [r7, r0] + sub r1, #0x10 + str r1, [r7, r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255498 + cmp r0, #0 + ldr r2, _0224D654 ; =0x00002DB0 + beq _0224D538 + ldr r1, [r7, r2] + mov r0, #0x70 + bic r1, r0 + mov r6, #0xf1 + add r0, r5, #0 + str r1, [r7, r2] + bl sub_020787CC + add r3, r6, #0 + add r3, #0x8f + lsl r2, r0, #8 + add r0, r6, #0 + sub r0, #0xf2 + ldr r1, [r4, r3] + eor r0, r2 + and r0, r1 + str r0, [r4, r3] + b _0224D564 +_0224D538: + ldr r1, [r7, r2] + mov r0, #0x70 + tst r0, r1 + beq _0224D544 + mov r6, #0xf0 + b _0224D564 +_0224D544: + mov r0, #0x70 + bic r1, r0 + mov r6, #0xf1 + add r0, r5, #0 + str r1, [r7, r2] + bl sub_020787CC + add r3, r6, #0 + add r3, #0x8f + lsl r2, r0, #8 + add r0, r6, #0 + sub r0, #0xf2 + ldr r1, [r4, r3] + eor r0, r2 + and r0, r1 + str r0, [r4, r3] +_0224D564: + mov r0, #0x46 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + add r2, r6, #0 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D580: + ldr r0, [sp, #0x10] + cmp r0, #2 + bne _0224D588 + b _0224D972 +_0224D588: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D590: + mov r2, #0xc0 + add r0, r5, #0 + mul r0, r2 + add r6, r4, r0 + ldr r0, _0224D654 ; =0x00002DB0 + lsl r2, r2, #4 + ldr r1, [r6, r0] + tst r2, r1 + beq _0224D5F0 + mov r2, #1 + lsl r2, r2, #0xa + sub r1, r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255498 + cmp r0, #0 + beq _0224D5C2 + ldr r1, _0224D654 ; =0x00002DB0 + ldr r0, _0224D670 ; =0xFFFFF3FF + ldr r2, [r6, r1] + and r0, r2 + str r0, [r6, r1] + b _0224D5F0 +_0224D5C2: + ldr r0, _0224D654 ; =0x00002DB0 + ldr r1, [r6, r0] + mov r0, #3 + lsl r0, r0, #0xa + tst r0, r1 + bne _0224D5F0 + mov r0, #7 + tst r0, r1 + bne _0224D5F0 + add r0, r4, #0 + add r0, #0x94 + str r5, [r0, #0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x33 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D5F0: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D5F8: + mov r0, #0xc0 + add r6, r5, #0 + mul r6, r0 + add r0, r4, r6 + ldr r1, _0224D674 ; =0x00002DE8 + mov ip, r0 + ldrh r3, [r0, r1] + cmp r3, #0 + beq _0224D6A4 + ldr r7, _0224D678 ; =0x00002D4C + mov r2, #0 + mov r1, ip +_0224D610: + ldrh r0, [r1, r7] + cmp r3, r0 + beq _0224D61E + add r2, r2, #1 + add r1, r1, #2 + cmp r2, #4 + blt _0224D610 +_0224D61E: + cmp r2, #4 + bne _0224D62E + ldr r0, _0224D67C ; =0x00002DC8 + add r1, r4, r0 + ldr r2, [r1, r6] + mov r0, #7 + bic r2, r0 + str r2, [r1, r6] +_0224D62E: + ldr r1, _0224D67C ; =0x00002DC8 + add r0, r4, r6 + ldr r0, [r0, r1] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1d + beq _0224D680 + add r2, r4, r1 + ldr r1, [r2, r6] + mov r3, #7 + bic r1, r3 + sub r3, r0, #1 + mov r0, #7 + and r0, r3 + orr r0, r1 + str r0, [r2, r6] + b _0224D6A4 + nop +_0224D650: .word 0xF7FFFFFF +_0224D654: .word 0x00002DB0 +_0224D658: .word 0x0000215C +_0224D65C: .word 0x00002DEA +_0224D660: .word 0x00002DAC +_0224D664: .word 0x00002D8C +_0224D668: .word 0x00000107 +_0224D66C: .word 0x0000213C +_0224D670: .word 0xFFFFF3FF +_0224D674: .word 0x00002DE8 +_0224D678: .word 0x00002D4C +_0224D67C: .word 0x00002DC8 +_0224D680: + mov r2, #0 + add r1, #0x20 + mov r0, ip + strh r2, [r0, r1] + mov r0, #0x46 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x48 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D6A4: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D6AC: + mov r0, #0xc0 + add r6, r5, #0 + mul r6, r0 + add r0, r4, r6 + ldr r1, _0224D99C ; =0x00002DEC + str r0, [sp, #8] + ldrh r2, [r0, r1] + cmp r2, #0 + beq _0224D734 + ldr r7, _0224D9A0 ; =0x00002D4C + mov r3, #0 + add r1, r0, #0 +_0224D6C4: + ldrh r0, [r1, r7] + cmp r2, r0 + beq _0224D6D2 + add r3, r3, #1 + add r1, r1, #2 + cmp r3, #4 + blt _0224D6C4 +_0224D6D2: + cmp r3, #4 + beq _0224D6E4 + beq _0224D6F0 + ldr r0, [sp, #8] + add r1, r0, r3 + ldr r0, _0224D9A4 ; =0x00002D6C + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224D6F0 +_0224D6E4: + ldr r0, _0224D9A8 ; =0x00002DC8 + add r2, r4, r0 + ldr r1, [r2, r6] + mov r0, #0x38 + bic r1, r0 + str r1, [r2, r6] +_0224D6F0: + ldr r1, _0224D9A8 ; =0x00002DC8 + add r0, r4, r6 + ldr r0, [r0, r1] + lsl r0, r0, #0x1a + lsr r2, r0, #0x1d + beq _0224D710 + add r1, r4, r1 + sub r2, r2, #1 + lsl r2, r2, #0x1d + ldr r0, [r1, r6] + mov r3, #0x38 + bic r0, r3 + lsr r2, r2, #0x1a + orr r0, r2 + str r0, [r1, r6] + b _0224D734 +_0224D710: + ldr r0, [sp, #8] + mov r2, #0 + add r1, #0x24 + strh r2, [r0, r1] + mov r0, #0x46 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4a + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D734: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D73C: + mov r0, #0xc0 + mul r0, r5 + add r3, r4, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r2, [r3, r0] + mov r1, #0x18 + tst r1, r2 + beq _0224D752 + sub r2, #8 + str r2, [r3, r0] +_0224D752: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D75A: + mov r0, #0xc0 + mul r0, r5 + ldr r2, _0224D9A8 ; =0x00002DC8 + add r5, r4, r0 + ldr r1, [r5, r2] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1e + beq _0224D798 + add r3, r4, r2 + ldr r6, [r3, r0] + mov r1, #0xc0 + add r7, r6, #0 + bic r7, r1 + lsl r1, r6, #0x18 + lsr r1, r1, #0x1e + sub r1, r1, #1 + lsl r1, r1, #0x1e + lsr r1, r1, #0x18 + orr r1, r7 + str r1, [r3, r0] + ldr r0, [r3, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1e + bne _0224D798 + add r0, r2, #0 + sub r0, #8 + ldr r1, [r5, r0] + ldr r0, _0224D9AC ; =0xFFFFFDFF + sub r2, #8 + and r0, r1 + str r0, [r5, r2] +_0224D798: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D7A0: + ldr r0, _0224D9A8 ; =0x00002DC8 + mov r2, #0xc0 + add r3, r5, #0 + mul r3, r2 + add r1, r4, r0 + ldr r7, [r1, r3] + lsl r0, r7, #0x15 + lsr r6, r0, #0x1d + beq _0224D7E4 + ldr r0, _0224D9B0 ; =0xFFFFF8FF + and r7, r0 + sub r0, r6, #1 + lsl r0, r0, #0x1d + lsr r0, r0, #0x15 + orr r0, r7 + str r0, [r1, r3] + ldr r0, [r1, r3] + lsl r0, r0, #0x15 + lsr r0, r0, #0x1d + bne _0224D7E4 + add r0, r2, #0 + add r0, #0x58 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + add r2, #0x60 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D7E4: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D7EC: + ldr r0, _0224D9B4 ; =0x00002DCC + mov r1, #0xc0 + add r3, r5, #0 + mul r3, r1 + add r2, r4, r0 + ldr r7, [r2, r3] + lsl r0, r7, #0x10 + lsr r6, r0, #0x1d + beq _0224D82E + ldr r0, _0224D9B8 ; =0xFFFF1FFF + and r7, r0 + sub r0, r6, #1 + lsl r0, r0, #0x1d + lsr r0, r0, #0x10 + orr r0, r7 + str r0, [r2, r3] + ldr r0, [r2, r3] + lsl r0, r0, #0x10 + lsr r0, r0, #0x1d + bne _0224D82E + add r1, #0x58 + str r5, [r4, r1] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf2 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D82E: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D836: + ldr r0, _0224D9B4 ; =0x00002DCC + mov r1, #0xc0 + add r3, r5, #0 + mul r3, r1 + add r2, r4, r0 + ldr r7, [r2, r3] + lsl r0, r7, #0xd + lsr r6, r0, #0x1d + beq _0224D878 + ldr r0, _0224D9BC ; =0xFFF8FFFF + and r7, r0 + sub r0, r6, #1 + lsl r0, r0, #0x1d + lsr r0, r0, #0xd + orr r0, r7 + str r0, [r2, r3] + ldr r0, [r2, r3] + lsl r0, r0, #0xd + lsr r0, r0, #0x1d + bne _0224D878 + add r1, #0x58 + str r5, [r4, r1] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf3 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D878: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D880: + ldr r0, _0224D9B4 ; =0x00002DCC + mov r1, #0xc0 + add r3, r5, #0 + mul r3, r1 + add r2, r4, r0 + ldr r7, [r2, r3] + lsl r0, r7, #0xa + lsr r6, r0, #0x1d + beq _0224D8C2 + ldr r0, _0224D9C0 ; =0xFFC7FFFF + and r7, r0 + sub r0, r6, #1 + lsl r0, r0, #0x1d + lsr r0, r0, #0xa + orr r0, r7 + str r0, [r2, r3] + ldr r0, [r2, r3] + lsl r0, r0, #0xa + lsr r0, r0, #0x1d + bne _0224D8C2 + add r1, #0x58 + str r5, [r4, r1] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf4 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D8C2: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D8CA: + mov r6, #0xc0 + add r0, r5, #0 + mul r0, r6 + mov r3, #0xb7 + add r1, r4, r0 + lsl r3, r3, #6 + ldr r0, [r1, r3] + lsl r2, r6, #5 + tst r2, r0 + beq _0224D912 + mov r2, #2 + lsl r2, r2, #0xa + sub r0, r0, r2 + str r0, [r1, r3] + ldr r1, [r1, r3] + lsl r0, r6, #5 + tst r0, r1 + bne _0224D912 + add r0, r4, #0 + add r0, #0x94 + str r5, [r0, #0] + add r0, r4, #0 + mov r1, #4 + add r0, #0x88 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x12 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D912: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D91A: + ldr r0, [sp, #4] + add r1, r4, #0 + add r2, r5, #0 + add r3, sp, #0x14 + bl ov16_02258104 + cmp r0, #1 + bne _0224D946 + mov r0, #0x46 + lsl r0, r0, #2 + str r5, [r4, r0] + ldr r2, [sp, #0x14] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #0x10] +_0224D946: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D94E: + ldr r0, [sp, #4] + add r1, r4, #0 + add r2, r5, #0 + bl ov16_022587A4 + cmp r0, #1 + bne _0224D960 + mov r0, #1 + str r0, [sp, #0x10] +_0224D960: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0224D972 +_0224D968: + mov r0, #0 + str r0, [r4, #0x18] + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] +_0224D972: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _0224D982 + ldr r0, [sp, #4] + bl ov16_02266AA0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_0224D982: + ldr r1, [r4, #0x1c] + ldr r0, [sp, #0xc] + cmp r1, r0 + bge _0224D98E + bl _0224CFC8 +_0224D98E: + mov r0, #0 + str r0, [r4, #0x18] + str r0, [r4, #0x1c] + mov r0, #0xb + str r0, [r4, #8] +_0224D998: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D99C: .word 0x00002DEC +_0224D9A0: .word 0x00002D4C +_0224D9A4: .word 0x00002D6C +_0224D9A8: .word 0x00002DC8 +_0224D9AC: .word 0xFFFFFDFF +_0224D9B0: .word 0xFFFFF8FF +_0224D9B4: .word 0x00002DCC +_0224D9B8: .word 0xFFFF1FFF +_0224D9BC: .word 0xFFF8FFFF +_0224D9C0: .word 0xFFC7FFFF + thumb_func_end ov16_0224CF7C + + thumb_func_start ov16_0224D9C4 +ov16_0224D9C4: ; 0x0224D9C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + str r0, [sp] + bl ov16_0223DF1C + ldr r1, [r4, #8] + add r7, r0, #0 + add r0, r4, #0 + add r2, r1, #0 + mov r3, #1 + bl ov16_02250EF4 + cmp r0, #1 + bne _0224D9E4 + b _0224DBF4 +_0224D9E4: + ldr r0, [sp] + bl ov16_02266AA0 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224D9FC + cmp r0, #1 + beq _0224DAE6 + cmp r0, #2 + bne _0224D9FA + b _0224DBAC +_0224D9FA: + b _0224DBEA +_0224D9FC: + ldr r0, [r4, #0x24] + cmp r0, r7 + bge _0224DADC + add r5, r4, #0 + add r5, #0x24 +_0224DA06: + add r1, r4, r0 + ldr r0, _0224DBF8 ; =0x000021EC + ldrb r6, [r1, r0] + add r0, r6, #0 + bl sub_020787CC + ldr r1, _0224DBFC ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + ldr r0, [r5, #0] + beq _0224DA22 + add r0, r0, #1 + str r0, [r5, #0] + b _0224DAD6 +_0224DA22: + add r0, r0, #1 + mov r1, #0x62 + str r0, [r5, #0] + add r0, r4, r6 + lsl r1, r1, #2 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _0224DAD6 + mov r1, #0x62 + lsl r1, r1, #2 + ldrb r1, [r0, r1] + sub r2, r1, #1 + mov r1, #0x62 + lsl r1, r1, #2 + strb r2, [r0, r1] + ldrb r0, [r0, r1] + cmp r0, #0 + bne _0224DAD6 + mov r0, #0xc0 + mul r0, r6 + add r1, r4, r0 + ldr r0, _0224DC00 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224DAD6 + ldr r0, [sp] + add r1, r6, #0 + bl ov16_0223E208 + mov r2, #0x6f + lsl r2, r2, #2 + add r1, r4, r2 + lsl r5, r0, #2 + ldr r3, [r1, r5] + mov r0, #0x10 + bic r3, r0 + add r0, r4, #0 + str r3, [r1, r5] + add r2, #0x1f + add r0, #0xf6 + strh r2, [r0] + add r0, r4, #0 + mov r1, #0xa + add r0, #0xf5 + strb r1, [r0] + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02255560 + add r1, r4, #0 + add r1, #0xf8 + str r0, [r1, #0] + mov r0, #0x19 + lsl r0, r0, #4 + add r1, r4, #0 + add r3, r4, r0 + lsl r2, r6, #1 + ldrh r5, [r3, r2] + add r1, #0xfc + str r5, [r1, #0] + add r1, r0, #0 + sub r1, #0x78 + str r6, [r4, r1] + lsl r1, r6, #2 + add r5, r0, #0 + add r1, r4, r1 + add r5, #8 + ldr r6, [r1, r5] + add r5, r0, #0 + sub r5, #0x74 + str r6, [r4, r5] + ldrh r3, [r3, r2] + add r2, r0, #0 + sub r2, #0x6c + str r3, [r4, r2] + add r0, #0x18 + ldr r1, [r1, r0] + ldr r0, _0224DC04 ; =0x0000215C + mov r2, #0x79 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #8 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224DAD6: + ldr r0, [r4, #0x24] + cmp r0, r7 + blt _0224DA06 +_0224DADC: + ldr r0, [r4, #0x20] + add r0, r0, #1 + str r0, [r4, #0x20] + mov r0, #0 + str r0, [r4, #0x24] +_0224DAE6: + ldr r0, [r4, #0x24] + cmp r0, r7 + bge _0224DBA2 + add r5, r4, #0 + add r5, #0x24 +_0224DAF0: + add r1, r4, r0 + ldr r0, _0224DBF8 ; =0x000021EC + ldrb r6, [r1, r0] + add r0, r6, #0 + bl sub_020787CC + ldr r1, _0224DBFC ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + ldr r0, [r5, #0] + beq _0224DB0C + add r0, r0, #1 + str r0, [r5, #0] + b _0224DB9C +_0224DB0C: + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0xc0 + mul r0, r6 + mov r1, #0xb7 + add r3, r4, r0 + lsl r1, r1, #6 + ldr r2, [r3, r1] + mov r1, #0x20 + tst r1, r2 + beq _0224DB9C + ldr r7, _0224DC08 ; =0x00002DC8 + add r2, r4, r7 + ldr r1, [r2, r0] + lsl r1, r1, #0x11 + lsr r1, r1, #0x1e + bne _0224DB66 + add r1, r7, #0 + sub r1, #8 + add r1, r4, r1 + str r1, [sp, #4] + ldr r1, [r1, r0] + mov r5, #0x20 + bic r1, r5 + ldr r5, [sp, #4] + sub r7, #0x3c + str r1, [r5, r0] + ldr r0, [r2, r0] + lsl r0, r0, #0x11 + lsr r1, r0, #0x1e + mov r0, #0x13 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, [r3, r7] + ldr r1, _0224DC04 ; =0x0000215C + neg r0, r0 + str r0, [r4, r1] + add r0, r1, #0 + sub r0, #0x20 + ldr r2, [r4, r0] + mov r0, #0x40 + orr r0, r2 + sub r1, #0x20 + str r0, [r4, r1] + b _0224DB80 +_0224DB66: + mov r3, #0x13 + lsl r3, r3, #4 + str r1, [r4, r3] + ldr r3, [r2, r0] + ldr r1, _0224DC0C ; =0xFFFF9FFF + and r1, r3 + lsl r3, r3, #0x11 + lsr r3, r3, #0x1e + sub r3, r3, #1 + lsl r3, r3, #0x1e + lsr r3, r3, #0x11 + orr r1, r3 + str r1, [r2, r0] +_0224DB80: + mov r0, #0x46 + lsl r0, r0, #2 + str r6, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x66 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #8 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224DB9C: + ldr r0, [r4, #0x24] + cmp r0, r7 + blt _0224DAF0 +_0224DBA2: + ldr r0, [r4, #0x20] + add r0, r0, #1 + str r0, [r4, #0x20] + mov r0, #0 + str r0, [r4, #0x24] +_0224DBAC: + mov r1, #6 + lsl r1, r1, #6 + ldr r3, [r4, r1] + mov r2, #7 + lsl r2, r2, #0x10 + add r0, r3, #0 + tst r0, r2 + beq _0224DBE0 + mov r0, #1 + lsl r0, r0, #0x10 + sub r0, r3, r0 + str r0, [r4, r1] + ldr r0, [r4, r1] + tst r0, r2 + bne _0224DBE0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xfb + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #8 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224DBE0: + ldr r0, [r4, #0x20] + add r0, r0, #1 + str r0, [r4, #0x20] + mov r0, #0 + str r0, [r4, #0x24] +_0224DBEA: + mov r0, #0 + str r0, [r4, #0x20] + str r0, [r4, #0x24] + mov r0, #0xc + str r0, [r4, #8] +_0224DBF4: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DBF8: .word 0x000021EC +_0224DBFC: .word 0x00003108 +_0224DC00: .word 0x00002D8C +_0224DC04: .word 0x0000215C +_0224DC08: .word 0x00002DC8 +_0224DC0C: .word 0xFFFF9FFF + thumb_func_end ov16_0224D9C4 + + thumb_func_start ov16_0224DC10 +ov16_0224DC10: ; 0x0224DC10 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #8] + add r5, r0, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov16_02250F98 + cmp r0, #1 + beq _0224DC64 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02250A48 + cmp r0, #1 + beq _0224DC64 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225079C + cmp r0, #1 + beq _0224DC64 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r0, [r4, r1] + add r0, r0, #1 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x24 + ldr r0, [r4, r0] + add r1, #0x24 + add r0, r0, #1 + str r0, [r4, r1] + add r0, r4, #0 + bl ov16_022541C4 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02254990 + mov r0, #2 + str r0, [r4, #8] +_0224DC64: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0224DC10 + + thumb_func_start ov16_0224DC68 +ov16_0224DC68: ; 0x0224DC68 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xec + ldr r0, [r0, #0] + mov r4, #0 + add r1, r5, r0 + ldr r0, _0224DD90 ; =0x000021E8 + ldrb r2, [r1, r0] + lsl r0, r2, #6 + add r1, r5, r0 + mov r0, #0x75 + str r2, [r5, #0x64] + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _0224DC9C + mov r0, #0xc1 + mov r1, #0xa5 + lsl r0, r0, #6 + str r1, [r5, r0] + mov r4, #1 + b _0224DD60 +_0224DC9C: + mov r0, #0xc0 + mul r0, r2 + ldr r6, _0224DD94 ; =0x00002DEC + add r0, r5, r0 + ldrh r1, [r0, r6] + cmp r1, #0 + beq _0224DCC4 + add r3, r6, #2 + ldrh r3, [r0, r3] + sub r6, #0xa0 + lsl r3, r3, #1 + add r0, r0, r3 + ldrh r0, [r0, r6] + cmp r1, r0 + bne _0224DCC4 + mov r0, #0xc1 + lsl r0, r0, #6 + str r1, [r5, r0] + mov r4, #1 + b _0224DD60 +_0224DCC4: + cmp r1, #0 + beq _0224DD16 + mov r7, #0xc0 + add r0, r2, #0 + mul r0, r7 + ldr r3, _0224DD98 ; =0x00002DEE + add r0, r5, r0 + ldrh r6, [r0, r3] + lsl r6, r6, #1 + add r6, r0, r6 + add r0, r3, #0 + sub r0, #0xa2 + ldrh r0, [r6, r0] + cmp r1, r0 + beq _0224DD16 + mov r1, #0xc1 + lsl r1, r1, #6 + str r0, [r5, r1] + ldr r1, [r5, #0x64] + mov r0, #0 + add r2, r1, #0 + mul r2, r7 + add r2, r5, r2 + sub r1, r3, #2 + strh r0, [r2, r1] + ldr r1, [r5, #0x64] + mov r4, #1 + add r2, r1, #0 + mul r2, r7 + add r1, r5, r2 + strh r0, [r1, r3] + ldr r0, [r5, #0x64] + sub r3, #0x26 + add r2, r0, #0 + add r3, r5, r3 + mul r2, r7 + ldr r1, [r3, r2] + mov r0, #0x38 + bic r1, r0 + str r1, [r3, r2] + b _0224DD60 +_0224DD16: + add r0, r5, #0 + add r1, r2, #0 + bl ov16_02259A28 + cmp r0, #0 + bne _0224DD32 + ldr r0, [r5, #0x64] + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0224DD9C ; =0x0000304C + ldr r1, [r1, r0] + sub r0, #0xc + str r1, [r5, r0] + b _0224DD60 +_0224DD32: + ldr r2, [r5, #0x64] + mov r0, #0xc0 + mul r0, r2 + lsl r1, r2, #1 + add r3, r5, r0 + add r0, r5, r1 + ldr r1, _0224DDA0 ; =0x000030BC + ldrh r2, [r0, r1] + lsl r2, r2, #1 + add r3, r3, r2 + ldr r2, _0224DDA4 ; =0x00002D4C + ldrh r3, [r3, r2] + add r2, r1, #0 + sub r2, #8 + ldrh r0, [r0, r2] + cmp r0, r3 + beq _0224DD5C + sub r1, #0x7c + str r3, [r5, r1] + mov r4, #1 + b _0224DD60 +_0224DD5C: + sub r1, #0x7c + str r3, [r5, r1] +_0224DD60: + mov r3, #0xc1 + lsl r3, r3, #6 + ldr r1, [r5, r3] + add r0, r3, #4 + str r1, [r5, r0] + mov r0, #0x16 + str r0, [r5, #8] + str r4, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r3, [r5, r3] + ldr r0, [sp, #8] + lsl r3, r3, #0x10 + ldr r2, [r5, #0x64] + add r1, r5, #0 + lsr r3, r3, #0x10 + bl ov16_02253954 + str r0, [r5, #0x6c] + ldr r0, [sp, #8] + bl ov16_02266AA0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DD90: .word 0x000021E8 +_0224DD94: .word 0x00002DEC +_0224DD98: .word 0x00002DEE +_0224DD9C: .word 0x0000304C +_0224DDA0: .word 0x000030BC +_0224DDA4: .word 0x00002D4C + thumb_func_end ov16_0224DC68 + + thumb_func_start ov16_0224DDA8 +ov16_0224DDA8: ; 0x0224DDA8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0xec + ldr r2, [r2, #0] + add r7, r0, #0 + add r3, r4, r2 + ldr r2, _0224DEE4 ; =0x000021E8 + ldrb r2, [r3, r2] + str r2, [r4, #0x64] + bl ov16_02257028 + str r0, [r4, #0x6c] + ldr r0, _0224DEE8 ; =0x000021B0 + ldr r1, [r4, #0x64] + add r2, r4, r0 + lsl r0, r1, #4 + add r6, r2, r0 + add r0, r7, #0 + bl ov16_0223E208 + cmp r0, #0 + beq _0224DE50 + ldr r0, [r4, #0x64] + asr r0, r0, #1 + add r1, r4, r0 + ldr r0, _0224DEEC ; =0x000003D1 + ldrb r2, [r1, r0] + cmp r2, #4 + bhi _0224DE3C + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224DDF0: ; jump table + .short _0224DDFA - _0224DDF0 - 2 ; case 0 + .short _0224DDFE - _0224DDF0 - 2 ; case 1 + .short _0224DE02 - _0224DDF0 - 2 ; case 2 + .short _0224DE2C - _0224DDF0 - 2 ; case 3 + .short _0224DE3A - _0224DDF0 - 2 ; case 4 +_0224DDFA: + ldr r5, _0224DEF0 ; =0x00000121 + b _0224DE3C +_0224DDFE: + ldr r5, _0224DEF4 ; =0x0000010B + b _0224DE3C +_0224DE02: + add r0, r0, #2 + ldrb r0, [r1, r0] + mov r1, #1 + tst r1, r0 + beq _0224DE1C + mov r1, #0x3e + add r2, r0, #0 + tst r2, r1 + beq _0224DE1C + mov r0, #6 + add r1, #0xf2 + str r0, [r4, r1] + b _0224DE26 +_0224DE1C: + bl sub_020787EC + mov r1, #0x13 + lsl r1, r1, #4 + str r0, [r4, r1] +_0224DE26: + mov r5, #0x43 + lsl r5, r5, #2 + b _0224DE3C +_0224DE2C: + add r0, r0, #2 + ldrb r0, [r1, r0] + mov r5, #0x13 + lsl r5, r5, #4 + str r0, [r4, r5] + sub r5, #0x23 + b _0224DE3C +_0224DE3A: + ldr r5, _0224DEF8 ; =0x0000010E +_0224DE3C: + ldr r1, [r4, #0x64] + mov r0, #1 + bic r1, r0 + ldr r0, _0224DEFC ; =0x000003D6 + add r1, r4, r1 + ldrh r1, [r1, r0] + mov r0, #0x4a + lsl r0, r0, #2 + str r1, [r4, r0] + b _0224DEC2 +_0224DE50: + ldrb r0, [r6, #2] + cmp r0, #3 + bhi _0224DEBA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224DE62: ; jump table + .short _0224DE6A - _0224DE62 - 2 ; case 0 + .short _0224DE6A - _0224DE62 - 2 ; case 1 + .short _0224DE80 - _0224DE62 - 2 ; case 2 + .short _0224DE6A - _0224DE62 - 2 ; case 3 +_0224DE6A: + ldrh r1, [r6] + ldr r0, _0224DF00 ; =0x0000FFC1 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _0224DE7C + mov r5, #0xde + b _0224DEBA +_0224DE7C: + mov r5, #0xdf + b _0224DEBA +_0224DE80: + add r0, r7, #0 + mov r5, #0xb + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + bne _0224DEBA + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + bne _0224DEBA + add r0, r7, #0 + bl ov16_0223E1AC + ldrh r1, [r6] + mov r2, #1 + mov r3, #5 + bl sub_0207D60C + add r0, r7, #0 + bl ov16_0223E1B0 + ldrh r1, [r6] + ldrb r2, [r6, #2] + bl sub_0207DA1C +_0224DEBA: + ldrh r1, [r6] + mov r0, #0x4a + lsl r0, r0, #2 + str r1, [r4, r0] +_0224DEC2: + add r0, r4, #0 + mov r1, #1 + add r2, r5, #0 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + ldr r1, _0224DF04 ; =0x0000216C + mov r0, #2 + ldr r2, [r4, r1] + lsl r0, r0, #0x1e + orr r0, r2 + str r0, [r4, r1] + pop {r3, r4, r5, r6, r7, pc} + nop +_0224DEE4: .word 0x000021E8 +_0224DEE8: .word 0x000021B0 +_0224DEEC: .word 0x000003D1 +_0224DEF0: .word 0x00000121 +_0224DEF4: .word 0x0000010B +_0224DEF8: .word 0x0000010E +_0224DEFC: .word 0x000003D6 +_0224DF00: .word 0x0000FFC1 +_0224DF04: .word 0x0000216C + thumb_func_end ov16_0224DDA8 + + thumb_func_start ov16_0224DF08 +ov16_0224DF08: ; 0x0224DF08 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + mov r2, #9 + bl ov16_02251E1C + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + ldr r1, _0224DF48 ; =0x000021E8 + add r0, r4, r0 + ldrb r0, [r0, r1] + mov r2, #0 + str r0, [r4, #0x64] + str r0, [r4, #0x78] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x28 + str r0, [r4, #0xc] + mov r0, #0x4e + lsl r0, r0, #2 + str r2, [r4, r0] + add r0, r1, #0 + sub r0, #0x7c + ldr r2, [r4, r0] + mov r0, #2 + lsl r0, r0, #0x1e + orr r0, r2 + sub r1, #0x7c + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 +_0224DF48: .word 0x000021E8 + thumb_func_end ov16_0224DF08 + + thumb_func_start ov16_0224DF4C +ov16_0224DF4C: ; 0x0224DF4C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r1, #0xec + ldr r1, [r1, #0] + add r5, r0, #0 + add r2, r4, r1 + ldr r1, _0224E004 ; =0x000021E8 + ldrb r1, [r2, r1] + str r1, [r4, #0x64] + bl ov16_0223E208 + cmp r0, #0 + beq _0224DFBE + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + bne _0224DFBE + ldr r0, [r4, #0x64] + mov r2, #0xc0 + add r1, r0, #0 + mul r1, r2 + ldr r0, _0224E008 ; =0x00002DB0 + add r1, r4, r1 + ldr r1, [r1, r0] + ldr r0, _0224E00C ; =0x0400E000 + tst r0, r1 + beq _0224DFA2 + add r0, r4, #0 + mov r1, #1 + add r2, #0x5e + bl ov16_02251E1C + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224DFA2: + add r0, r4, #0 + mov r1, #1 + mov r2, #0xe6 + bl ov16_02251E1C + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x2b + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224DFBE: + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255DE8 + cmp r0, #0 + beq _0224DFE8 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + bl ov16_02251E1C + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x2b + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224DFE8: + add r0, r4, #0 + mov r1, #1 + mov r2, #8 + bl ov16_02251E1C + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224E004: .word 0x000021E8 +_0224E008: .word 0x00002DB0 +_0224E00C: .word 0x0400E000 + thumb_func_end ov16_0224DF4C + + thumb_func_start ov16_0224E010 +ov16_0224E010: ; 0x0224E010 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _0224E054 ; =0x00000113 + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0 + str r0, [r4, #0x64] + mov r0, #1 + str r0, [r4, #0x6c] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + mov r0, #0x4a + mov r1, #5 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r5, #0 + bl ov16_0223ED8C + sub r1, r0, #1 + add r0, r5, #0 + bl ov16_0223ED98 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov16_022661CC + pop {r3, r4, r5, pc} + nop +_0224E054: .word 0x00000113 + thumb_func_end ov16_0224E010 + + thumb_func_start ov16_0224E058 +ov16_0224E058: ; 0x0224E058 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xe3 + bl ov16_02251E1C + mov r0, #0 + str r0, [r4, #0x64] + mov r0, #1 + str r0, [r4, #0x6c] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + mov r0, #0x4e + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _0224E0B0 ; =0x0000311C + ldrb r1, [r4, r0] + cmp r1, #0xc + bhs _0224E096 + add r1, r1, #1 + strb r1, [r4, r0] +_0224E096: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224E0AC + ldr r0, _0224E0B4 ; =0x0000311D + ldrb r1, [r4, r0] + cmp r1, #0xc + bhs _0224E0AC + add r1, r1, #1 + strb r1, [r4, r0] +_0224E0AC: + pop {r3, r4, r5, pc} + nop +_0224E0B0: .word 0x0000311C +_0224E0B4: .word 0x0000311D + thumb_func_end ov16_0224E058 + + thumb_func_start ov16_0224E0B8 +ov16_0224E0B8: ; 0x0224E0B8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xe4 + bl ov16_02251E1C + mov r0, #0 + str r0, [r4, #0x64] + mov r0, #1 + str r0, [r4, #0x6c] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + mov r0, #0x4e + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _0224E114 ; =0x0000311D + ldrb r1, [r4, r0] + cmp r1, #0 + beq _0224E0F6 + sub r1, r1, #1 + strb r1, [r4, r0] +_0224E0F6: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _0224E112 + mov r1, #1 + sub r0, #8 + str r1, [r4, r0] + ldr r0, _0224E118 ; =0x0000311C + ldrb r1, [r4, r0] + cmp r1, #0 + beq _0224E112 + sub r1, r1, #1 + strb r1, [r4, r0] +_0224E112: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224E114: .word 0x0000311D +_0224E118: .word 0x0000311C + thumb_func_end ov16_0224E0B8 + + thumb_func_start ov16_0224E11C +ov16_0224E11C: ; 0x0224E11C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0xe5 + bl ov16_02251E1C + mov r0, #0 + str r0, [r4, #0x64] + mov r0, #1 + str r0, [r4, #0x6c] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x27 + str r0, [r4, #0xc] + pop {r4, pc} + thumb_func_end ov16_0224E11C + + thumb_func_start ov16_0224E13C +ov16_0224E13C: ; 0x0224E13C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + bl ov16_0223DF0C + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl ov16_0223E16C + str r0, [sp, #0x28] + mov r0, #0x84 + tst r0, r6 + beq _0224E162 + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E162: + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E208 + cmp r0, #0 + beq _0224E174 + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E174: + mov r0, #0x40 + tst r0, r6 + beq _0224E18C + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223E1F8 + cmp r0, #4 + bne _0224E18C + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E18C: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02259ADC + cmp r0, #1 + bne _0224E19E + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E19E: + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02259A28 + cmp r0, #0 + bne _0224E1B0 + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E1B0: + ldr r0, _0224E42C ; =0x00003044 + ldr r0, [r4, r0] + cmp r0, #0x75 + bne _0224E1CA + ldr r0, _0224E430 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #2 + lsl r0, r0, #8 + tst r0, r1 + beq _0224E1CA + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E1CA: + ldr r0, [sp, #0x28] + bl sub_02025F58 + cmp r0, #8 + blt _0224E1DA + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E1DA: + ldr r0, [sp, #0x28] + mov r6, #0xa + bl sub_02025F58 + cmp r0, #2 + blt _0224E1E8 + mov r6, #0x1e +_0224E1E8: + ldr r0, [sp, #0x28] + bl sub_02025F58 + cmp r0, #4 + blt _0224E1F4 + mov r6, #0x32 +_0224E1F4: + ldr r0, [sp, #0x28] + bl sub_02025F58 + cmp r0, #6 + blt _0224E200 + mov r6, #0x46 +_0224E200: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + str r0, [sp, #0x20] + add r1, r4, r0 + ldr r0, _0224E434 ; =0x00002D74 + ldrb r0, [r1, r0] + cmp r0, r6 + bhi _0224E218 + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E218: + add r0, r5, #0 + bl ov16_0223F4BC + ldr r1, [sp, #0x20] + lsl r0, r0, #0x18 + add r2, r4, r1 + ldr r1, _0224E434 ; =0x00002D74 + lsr r0, r0, #0x18 + ldrb r2, [r2, r1] + add r2, r6, r2 + mul r0, r2 + asr r0, r0, #8 + cmp r0, r6 + bge _0224E23A + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224E23A: + ldr r0, _0224E42C ; =0x00003044 + ldr r0, [r4, r0] + cmp r0, #0x63 + bne _0224E252 + add r1, #0x3c + add r0, r4, r1 + ldr r1, [sp, #0x20] + ldr r2, [r0, r1] + ldr r1, _0224E438 ; =0xFF7FFFFF + and r2, r1 + ldr r1, [sp, #0x20] + str r2, [r0, r1] +_0224E252: + ldr r0, [r4, #0x64] + mov r1, #0xc0 + mul r1, r0 + str r0, [sp, #0x1c] + ldr r0, _0224E43C ; =0x00002DAC + add r1, r4, r1 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _0224E27C + ldr r0, _0224E42C ; =0x00003044 + ldr r0, [r4, r0] + cmp r0, #0xad + beq _0224E272 + cmp r0, #0xd6 + bne _0224E27C +_0224E272: + mov r0, #0xfe + str r0, [r7, #0] + add sp, #0x30 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224E27C: + ldr r0, [sp, #0x1c] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _0224E434 ; =0x00002D74 + add r1, r4, r1 + ldrb r0, [r1, r0] + str r0, [sp, #0x24] + add r0, r5, #0 + bl ov16_0223F4BC + ldr r1, [sp, #0x24] + lsl r0, r0, #0x18 + add r1, r6, r1 + lsr r0, r0, #0x18 + mul r0, r1 + asr r0, r0, #8 + cmp r0, r6 + bge _0224E364 + ldr r0, [sp, #0x1c] + lsl r0, r0, #1 + add r1, r4, r0 + ldr r0, _0224E440 ; =0x000030BC + ldrh r0, [r1, r0] + bl sub_020787CC + add r3, r0, #0 + mov r0, #0 + mvn r0, r0 + str r0, [sp] + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02254A6C + add r6, r0, #0 + cmp r6, #0xf + bne _0224E2D0 + mov r0, #0xff + str r0, [r7, #0] + add sp, #0x30 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224E2D0: + add r0, r5, #0 + bl ov16_0223F4BC + mov r1, #3 + and r0, r1 + str r0, [sp, #0x2c] + bl sub_020787CC + tst r0, r6 + bne _0224E2D0 + ldr r0, [r4, #0x64] + ldr r3, _0224E440 ; =0x000030BC + lsl r0, r0, #1 + add r1, r4, r0 + ldr r0, [sp, #0x2c] + strh r0, [r1, r3] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + lsl r1, r1, #1 + add r1, r4, r1 + ldrh r1, [r1, r3] + add r0, r4, r0 + lsl r1, r1, #1 + add r1, r0, r1 + ldr r0, _0224E444 ; =0x00002D4C + ldrh r1, [r1, r0] + add r0, r3, #0 + sub r0, #0x7c + str r1, [r4, r0] + add r0, r3, #0 + sub r0, #0x7c + ldr r1, [r4, r0] + add r0, r3, #0 + sub r0, #0x78 + str r1, [r4, r0] + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + sub r3, #0x7c + ldr r3, [r4, r3] + ldr r2, [r4, #0x64] + lsl r3, r3, #0x10 + add r0, r5, #0 + add r1, r4, #0 + lsr r3, r3, #0x10 + bl ov16_02253954 + str r0, [r4, #0x6c] + cmp r0, #0xff + bne _0224E344 + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02257028 + b _0224E344 +_0224E344: + ldr r1, [r4, #0x64] + add sp, #0x30 + lsl r1, r1, #4 + add r2, r4, r1 + ldr r1, _0224E448 ; =0x000021AC + str r0, [r2, r1] + mov r0, #1 + lsl r0, r0, #8 + str r0, [r7, #0] + ldr r1, _0224E44C ; =0x00002184 + mov r0, #1 + ldr r2, [r4, r1] + orr r0, r2 + str r0, [r4, r1] + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_0224E364: + ldr r0, [sp, #0x24] + sub r0, r0, r6 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + add r0, r5, #0 + bl ov16_0223F4BC + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] + cmp r0, r6 + bge _0224E3BC + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224E43C ; =0x00002DAC + ldr r0, [r2, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bne _0224E3BC + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x48 + beq _0224E3BC + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0xf + beq _0224E3BC + mov r1, #6 + lsl r1, r1, #6 + mov r0, #0xf + ldr r2, [r4, r1] + lsl r0, r0, #8 + tst r0, r2 + bne _0224E3BC + sub r1, #0x7f + add sp, #0x30 + str r1, [r7, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224E3BC: + ldr r0, [sp, #0x18] + sub r0, r0, r6 + cmp r0, r6 + bge _0224E422 + ldr r1, [r4, #0x64] + mov r0, #0x46 + str r1, [r4, #0x6c] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r1, [r4, #0x64] + mov r3, #0 + str r3, [sp] + mov r0, #0x28 + str r0, [sp, #4] + lsl r0, r1, #0x18 + str r3, [sp, #8] + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r2, #1 + add r0, r5, #0 + add r1, r4, #0 + str r2, [sp, #0x14] + bl ov16_0225A280 + ldr r2, _0224E450 ; =0x0000215C + add r1, r4, #0 + str r0, [r4, r2] + ldr r2, [r4, r2] + add r0, r5, #0 + bl ov16_0225AEB8 + ldr r1, _0224E450 ; =0x0000215C + add sp, #0x30 + str r0, [r4, r1] + mov r0, #0 + ldr r2, [r4, r1] + mvn r0, r0 + mul r0, r2 + str r0, [r4, r1] + ldr r0, _0224E454 ; =0x00000102 + str r0, [r7, #0] + add r0, r1, #0 + sub r0, #0x20 + ldr r2, [r4, r0] + mov r0, #2 + orr r0, r2 + sub r1, #0x20 + str r0, [r4, r1] + mov r0, #3 + pop {r3, r4, r5, r6, r7, pc} +_0224E422: + mov r0, #0xff + str r0, [r7, #0] + mov r0, #1 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E42C: .word 0x00003044 +_0224E430: .word 0x0000213C +_0224E434: .word 0x00002D74 +_0224E438: .word 0xFF7FFFFF +_0224E43C: .word 0x00002DAC +_0224E440: .word 0x000030BC +_0224E444: .word 0x00002D4C +_0224E448: .word 0x000021AC +_0224E44C: .word 0x00002184 +_0224E450: .word 0x0000215C +_0224E454: .word 0x00000102 + thumb_func_end ov16_0224E13C + + thumb_func_start ov16_0224E458 +ov16_0224E458: ; 0x0224E458 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + ldr r3, [r5, #0x64] + mov r2, #0x1c + mul r2, r3 + add r6, r5, r2 + mov r2, #0xb5 + lsl r2, r2, #2 + ldr r2, [r6, r2] + str r0, [sp, #4] + lsl r2, r2, #0x1f + mov r4, #1 + lsr r2, r2, #0x1f + bne _0224E512 + ldr r6, [r5, #0x6c] + cmp r6, #0xff + beq _0224E512 + mov r2, #0xc1 + lsl r2, r2, #6 + ldr r7, [r5, r2] + ldr r2, _0224E5E0 ; =0x0000011E + cmp r7, r2 + bne _0224E496 + mov r2, #0x2e + str r2, [sp] + mov r2, #3 + bl ov16_022555A4 + add r4, r4, r0 + b _0224E512 +_0224E496: + lsl r0, r7, #4 + add r1, r5, r0 + ldr r0, _0224E5E4 ; =0x000003E6 + ldrh r1, [r1, r0] + cmp r1, #0x40 + bgt _0224E4C0 + bge _0224E4DC + cmp r1, #0x10 + bgt _0224E4BA + bge _0224E512 + cmp r1, #8 + bgt _0224E500 + cmp r1, #4 + blt _0224E500 + beq _0224E4EE + cmp r1, #8 + beq _0224E4DC + b _0224E500 +_0224E4BA: + cmp r1, #0x20 + beq _0224E512 + b _0224E500 +_0224E4C0: + add r0, r2, #0 + sub r0, #0x1e + cmp r1, r0 + bgt _0224E4D4 + sub r2, #0x1e + cmp r1, r2 + bge _0224E512 + cmp r1, #0x80 + beq _0224E4EE + b _0224E500 +_0224E4D4: + add r2, #0xe2 + cmp r1, r2 + beq _0224E512 + b _0224E500 +_0224E4DC: + mov r0, #0x2e + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #9 + bl ov16_022555A4 + add r4, r4, r0 + b _0224E512 +_0224E4EE: + mov r0, #0x2e + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #3 + bl ov16_022555A4 + add r4, r4, r0 + b _0224E512 +_0224E500: + cmp r3, r6 + beq _0224E512 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x2e + bne _0224E512 + add r4, r4, #1 +_0224E512: + mov r0, #0xb5 + lsl r0, r0, #6 + add r2, r5, r0 + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + mov r1, #0xc1 + lsl r1, r1, #6 + ldr r1, [r5, r1] + add r0, r2, r0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl ov16_02254EE0 + add r6, r0, #0 + ldr r1, [r5, #0x64] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r5, r0 + lsl r7, r1, #6 + ldr r3, [r0, r7] + lsl r2, r3, #0x1e + lsr r2, r2, #0x1f + bne _0224E58A + lsl r2, r3, #0x1f + lsr r2, r2, #0x1f + bne _0224E58A + mov r1, #2 + orr r1, r3 + str r1, [r0, r7] + ldr r0, _0224E5E8 ; =0x00002D6C + ldr r1, [r5, #0x64] + add r2, r5, r0 + mov r0, #0xc0 + mul r0, r1 + add r1, r2, r0 + ldrb r0, [r1, r6] + cmp r0, #0 + beq _0224E57C + cmp r6, #4 + bge _0224E57C + cmp r0, r4 + ble _0224E56C + sub r0, r0, r4 + b _0224E56E +_0224E56C: + mov r0, #0 +_0224E56E: + strb r0, [r1, r6] + ldr r0, [sp, #4] + ldr r2, [r5, #0x64] + add r1, r5, #0 + bl ov16_02253EC0 + b _0224E5D8 +_0224E57C: + ldr r1, _0224E5EC ; =0x0000216C + mov r0, #2 + ldr r2, [r5, r1] + lsl r0, r0, #8 + orr r0, r2 + str r0, [r5, r1] + b _0224E5D8 +_0224E58A: + mov r2, #0xc0 + add r0, r1, #0 + mul r0, r2 + add r0, r5, r0 + ldr r3, _0224E5E8 ; =0x00002D6C + add r4, r0, r6 + ldrb r4, [r4, r3] + cmp r4, #0 + bne _0224E5D8 + ldr r4, _0224E5F0 ; =0x0000213C + mov r7, #2 + ldr r4, [r5, r4] + lsl r7, r7, #8 + tst r4, r7 + bne _0224E5D8 + add r3, #0x44 + ldr r0, [r0, r3] + lsl r3, r7, #3 + tst r3, r0 + bne _0224E5D8 + lsl r2, r2, #4 + tst r0, r2 + bne _0224E5D8 + add r0, r1, #0 + bl sub_020787CC + add r1, r7, #0 + sub r1, #0x80 + ldr r2, [r5, r1] + lsl r0, r0, #8 + tst r0, r2 + bne _0224E5D8 + cmp r6, #4 + bge _0224E5D8 + ldr r0, _0224E5EC ; =0x0000216C + add r1, #0x80 + ldr r2, [r5, r0] + orr r1, r2 + str r1, [r5, r0] +_0224E5D8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224E5E0: .word 0x0000011E +_0224E5E4: .word 0x000003E6 +_0224E5E8: .word 0x00002D6C +_0224E5EC: .word 0x0000216C +_0224E5F0: .word 0x0000213C + thumb_func_end ov16_0224E458 + + thumb_func_start ov16_0224E5F4 +ov16_0224E5F4: ; 0x0224E5F4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + mov r4, #0 + ldr r0, [r5, #0x6c] + add r6, r4, #0 + cmp r0, #0xff + bne _0224E612 + ldr r1, _0224E6E0 ; =0x00003044 + add r0, r5, #0 + ldr r1, [r5, r1] + bl ov16_0225582C + cmp r0, #0 + beq _0224E644 +_0224E612: + ldr r0, [r5, #0x6c] + cmp r0, #0xff + bne _0224E658 + ldr r1, _0224E6E0 ; =0x00003044 + add r0, r5, #0 + ldr r1, [r5, r1] + bl ov16_0225582C + cmp r0, #1 + bne _0224E658 + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _0224E6E4 ; =0x00002DB0 + ldr r0, [r1, r0] + mov r1, #1 + lsl r1, r1, #0xc + tst r0, r1 + bne _0224E644 + ldr r0, _0224E6E8 ; =0x0000213C + ldr r2, [r5, r0] + lsr r0, r1, #3 + tst r0, r2 + beq _0224E658 +_0224E644: + ldr r2, _0224E6EC ; =0x00000119 + add r0, r5, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0x26 + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] + mov r4, #1 +_0224E658: + mov r0, #0xd + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224E69E + mov r0, #0x4c + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224E69E + ldr r0, _0224E6E0 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _0224E6F0 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x97 + bne _0224E69E + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x30 + tst r0, r1 + beq _0224E69E + mov r6, #1 +_0224E69E: + ldr r0, [r5, #0x6c] + cmp r0, #0xff + bne _0224E6DC + ldr r1, _0224E6E0 ; =0x00003044 + add r0, r5, #0 + ldr r1, [r5, r1] + bl ov16_0225582C + cmp r0, #1 + bne _0224E6DC + cmp r4, #0 + bne _0224E6DC + cmp r6, #0 + bne _0224E6DC + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02258AB8 + cmp r0, #0x63 + beq _0224E6DC + ldr r0, [r5, #0x64] + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + ldr r1, _0224E6E4 ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #1 + lsl r1, r1, #0xc + tst r1, r2 + bne _0224E6DC + str r0, [r5, #0x6c] +_0224E6DC: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E6E0: .word 0x00003044 +_0224E6E4: .word 0x00002DB0 +_0224E6E8: .word 0x0000213C +_0224E6EC: .word 0x00000119 +_0224E6F0: .word 0x000003DE + thumb_func_end ov16_0224E5F4 + + thumb_func_start ov16_0224E6F4 +ov16_0224E6F4: ; 0x0224E6F4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r1, _0224E774 ; =0x00003044 + ldr r2, [r4, r1] + lsl r1, r2, #4 + add r5, r4, r1 + ldr r1, _0224E778 ; =0x000003E6 + ldrh r3, [r5, r1] + cmp r3, #0x10 + beq _0224E728 + cmp r3, #0x20 + beq _0224E728 + sub r1, r1, #5 + ldrb r1, [r5, r1] + cmp r1, #0 + beq _0224E728 + ldr r1, _0224E77C ; =0x0000213C + ldr r3, [r4, r1] + mov r1, #2 + lsl r1, r1, #0xe + tst r1, r3 + bne _0224E728 + mov r1, #0x20 + tst r1, r3 + beq _0224E72C +_0224E728: + cmp r2, #0x56 + bne _0224E76C +_0224E72C: + ldr r1, [r4, #0x64] + ldr r3, _0224E780 ; =0x00002144 + str r1, [sp] + ldr r1, [r4, #0x6c] + str r1, [sp, #4] + ldr r1, [r4, r3] + str r1, [sp, #8] + add r1, r3, #0 + add r1, #0x28 + add r1, r4, r1 + str r1, [sp, #0xc] + add r3, #0x1c + ldr r3, [r4, r3] + add r1, r4, #0 + bl ov16_02254FA8 + ldr r1, _0224E780 ; =0x00002144 + str r0, [r4, r1] + add r1, #0x28 + ldr r1, [r4, r1] + mov r0, #8 + tst r0, r1 + beq _0224E76C + mov r0, #0xd1 + lsl r0, r0, #2 + add r3, r4, r0 + ldr r0, [r4, #0x64] + lsl r2, r0, #2 + ldr r1, [r3, r2] + mov r0, #2 + orr r0, r1 + str r0, [r3, r2] +_0224E76C: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0224E774: .word 0x00003044 +_0224E778: .word 0x000003E6 +_0224E77C: .word 0x0000213C +_0224E780: .word 0x00002144 + thumb_func_end ov16_0224E6F4 + + thumb_func_start ov16_0224E784 +ov16_0224E784: ; 0x0224E784 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + str r0, [sp, #0x18] + add r4, r1, #0 + ldr r0, _0224EAB0 ; =0x00003044 + add r5, r4, #0 + ldr r0, [r4, r0] + mov r7, #0 + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _0224EAB4 ; =0x000003DE + add r5, #0x50 + ldrh r0, [r1, r0] + str r0, [sp, #0x1c] + mov r0, #0xd1 + lsl r0, r0, #2 + add r6, r4, r0 + mov r0, #7 + str r0, [sp, #0x20] + mov r0, #8 + str r0, [sp, #0x24] + mov r0, #1 + str r0, [sp, #0x28] +_0224E7B2: + ldr r0, [r4, #0x50] + cmp r0, #0x10 + bls _0224E7BA + b _0224EE1E +_0224E7BA: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224E7C6: ; jump table + .short _0224E7E8 - _0224E7C6 - 2 ; case 0 + .short _0224E81C - _0224E7C6 - 2 ; case 1 + .short _0224E916 - _0224E7C6 - 2 ; case 2 + .short _0224E97C - _0224E7C6 - 2 ; case 3 + .short _0224E9A4 - _0224E7C6 - 2 ; case 4 + .short _0224E9E0 - _0224E7C6 - 2 ; case 5 + .short _0224EA26 - _0224E7C6 - 2 ; case 6 + .short _0224EA62 - _0224E7C6 - 2 ; case 7 + .short _0224EAAA - _0224E7C6 - 2 ; case 8 + .short _0224EB10 - _0224E7C6 - 2 ; case 9 + .short _0224EB4C - _0224E7C6 - 2 ; case 10 + .short _0224EB88 - _0224E7C6 - 2 ; case 11 + .short _0224EC6A - _0224E7C6 - 2 ; case 12 + .short _0224ECC8 - _0224E7C6 - 2 ; case 13 + .short _0224ED30 - _0224E7C6 - 2 ; case 14 + .short _0224EDE0 - _0224E7C6 - 2 ; case 15 + .short _0224EE18 - _0224E7C6 - 2 ; case 16 +_0224E7E8: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224EAB8 ; =0x00002DB0 + ldr r1, [r2, r0] + ldr r0, _0224EABC ; =0xFDFFFFFF + and r1, r0 + ldr r0, _0224EAB8 ; =0x00002DB0 + str r1, [r2, r0] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r1, [r2, r0] + ldr r0, _0224EAC0 ; =0xFFFFBFFF + and r1, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + str r1, [r2, r0] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224E81C: + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _0224EAC4 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _0224E90E + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0xf + lsl r0, r0, #8 + tst r0, r1 + beq _0224E866 + add r0, r4, #0 + add r1, r2, #0 + bl ov16_02255A4C + cmp r0, #0x2b + beq _0224E866 + mov r0, #0x46 + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x13 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224E90E +_0224E866: + ldr r0, _0224EAB0 ; =0x00003044 + ldr r0, [r4, r0] + cmp r0, #0xd6 + beq _0224E87C + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #0xd6 + bne _0224E87C + mov r0, #1 + b _0224E87E +_0224E87C: + mov r0, #0 +_0224E87E: + cmp r0, #0 + bne _0224E90E + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x30 + bne _0224E892 + mov r3, #2 + b _0224E894 +_0224E892: + mov r3, #1 +_0224E894: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224EAC4 ; =0x00002DAC + ldr r1, [r2, r0] + mov r0, #7 + and r0, r1 + cmp r0, r3 + ldr r0, _0224EAC4 ; =0x00002DAC + bhs _0224E8B2 + ldr r1, [r2, r0] + ldr r0, [sp, #0x20] + bic r1, r0 + b _0224E8B6 +_0224E8B2: + ldr r0, [r2, r0] + sub r1, r0, r3 +_0224E8B6: + ldr r0, _0224EAC4 ; =0x00002DAC + str r1, [r2, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _0224EAC4 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _0224E8F4 + ldr r0, _0224EAB0 ; =0x00003044 + ldr r0, [r4, r0] + cmp r0, #0xad + beq _0224E90E + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #0xd6 + beq _0224E90E + add r0, r4, #0 + mov r1, #1 + mov r2, #0x14 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #2 + b _0224E90E +_0224E8F4: + mov r0, #0x46 + lsl r0, r0, #2 + str r2, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x13 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224E90E: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224E916: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224EAC4 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + beq _0224E974 + ldr r0, [sp, #0x18] + bl ov16_0223F4BC + mov r1, #5 + bl sub_020E1F6C + cmp r1, #0 + beq _0224E958 + ldr r0, [sp, #0x1c] + cmp r0, #0x7d + beq _0224E974 + cmp r0, #0xfd + beq _0224E974 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1c + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 + b _0224E974 +_0224E958: + mov r0, #0x46 + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1d + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224E974: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224E97C: + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255EC0 + cmp r0, #1 + bne _0224E99C + add r0, r4, #0 + mov r1, #1 + mov r2, #0xbf + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224E99C: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224E9A4: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224EAB8 ; =0x00002DB0 + ldr r1, [r2, r0] + mov r0, #1 + lsl r0, r0, #0x16 + tst r0, r1 + beq _0224E9D8 + ldr r0, _0224EAB8 ; =0x00002DB0 + ldr r1, [r2, r0] + ldr r0, _0224EAC8 ; =0xFFBFFFFF + and r1, r0 + ldr r0, _0224EAB8 ; =0x00002DB0 + str r1, [r2, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x41 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224E9D8: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224E9E0: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224EAB8 ; =0x00002DB0 + ldr r1, [r2, r0] + mov r0, #8 + tst r0, r1 + beq _0224EA1E + ldr r0, _0224EAB8 ; =0x00002DB0 + ldr r1, [sp, #0x24] + ldr r0, [r2, r0] + bic r0, r1 + ldr r1, _0224EAB8 ; =0x00002DB0 + str r0, [r2, r1] + ldr r0, [r4, #0x64] + mov r1, #0x40 + lsl r0, r0, #2 + ldr r2, [r6, r0] + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224EA1E: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EA26: + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r3, [r4, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _0224EACC ; =0x00002DE8 + ldrh r0, [r1, r0] + cmp r3, r0 + bne _0224EA5A + lsl r0, r2, #2 + ldr r2, [r6, r0] + mov r1, #0x10 + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x47 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224EA5A: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EA62: + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _0224EAD0 ; =0x00002DC8 + ldr r0, [r1, r0] + lsl r0, r0, #0x15 + lsr r0, r0, #0x1d + beq _0224EAA2 + ldr r0, _0224EAB0 ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _0224EAD4 ; =0x000003E1 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224EAA2 + lsl r0, r2, #2 + ldr r2, [r6, r0] + mov r1, #0x20 + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x85 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224EAA2: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EAAA: + ldr r3, _0224EAB0 ; =0x00003044 + b _0224EAD8 + nop +_0224EAB0: .word 0x00003044 +_0224EAB4: .word 0x000003DE +_0224EAB8: .word 0x00002DB0 +_0224EABC: .word 0xFDFFFFFF +_0224EAC0: .word 0xFFFFBFFF +_0224EAC4: .word 0x00002DAC +_0224EAC8: .word 0xFFBFFFFF +_0224EACC: .word 0x00002DE8 +_0224EAD0: .word 0x00002DC8 +_0224EAD4: .word 0x000003E1 +_0224EAD8: + ldr r0, [sp, #0x18] + ldr r2, [r4, #0x64] + ldr r3, [r4, r3] + add r1, r4, #0 + bl ov16_02255EF4 + cmp r0, #0 + beq _0224EB08 + ldr r0, [r4, #0x64] + mov r1, #4 + lsl r0, r0, #2 + ldr r2, [r6, r0] + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x90 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224EB08: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EB10: + ldr r3, _0224EE38 ; =0x00003044 + ldr r0, [sp, #0x18] + ldr r2, [r4, #0x64] + ldr r3, [r4, r3] + add r1, r4, #0 + bl ov16_02256044 + cmp r0, #0 + beq _0224EB44 + ldr r0, [r4, #0x64] + mov r1, #1 + lsl r0, r0, #2 + ldr r2, [r6, r0] + lsl r1, r1, #8 + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x9d + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224EB44: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EB4C: + ldr r3, _0224EE38 ; =0x00003044 + ldr r0, [sp, #0x18] + ldr r2, [r4, #0x64] + ldr r3, [r4, r3] + add r1, r4, #0 + bl ov16_02256078 + cmp r0, #0 + beq _0224EB80 + ldr r0, [r4, #0x64] + mov r1, #2 + lsl r0, r0, #2 + ldr r2, [r6, r0] + lsl r1, r1, #8 + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xae + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224EB80: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EB88: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224EE3C ; =0x00002DB0 + ldr r1, [r2, r0] + mov r0, #7 + tst r0, r1 + bne _0224EBA2 + b _0224EE1E +_0224EBA2: + ldr r0, _0224EE3C ; =0x00002DB0 + ldr r0, [r2, r0] + sub r1, r0, #1 + ldr r0, _0224EE3C ; =0x00002DB0 + str r1, [r2, r0] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224EE3C ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _0224EC54 + ldr r0, [sp, #0x18] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _0224EBDE + add r0, r4, #0 + mov r2, #0x26 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224EE1E +_0224EBDE: + ldr r0, [r4, #0x64] + mov r1, #0x80 + lsl r0, r0, #2 + ldr r2, [r6, r0] + mov r3, #0 + orr r1, r2 + str r1, [r6, r0] + ldr r1, [r4, #0x64] + mov r0, #0x46 + str r1, [r4, #0x6c] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r4, #0x64] + mov r1, #0 + str r1, [sp] + mov r1, #0x28 + str r1, [sp, #4] + mov r1, #0 + lsl r0, r0, #0x18 + str r1, [sp, #8] + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r1, r4, #0 + mov r2, #0xa5 + bl ov16_0225A280 + ldr r1, _0224EE40 ; =0x0000215C + ldr r2, _0224EE40 ; =0x0000215C + str r0, [r4, r1] + ldr r0, [sp, #0x18] + ldr r2, [r4, r2] + add r1, r4, #0 + bl ov16_0225AEB8 + ldr r1, _0224EE40 ; =0x0000215C + str r0, [r4, r1] + add r0, r1, #0 + ldr r1, [r4, r0] + mov r0, #0 + add r2, r1, #0 + mvn r0, r0 + mul r2, r0 + ldr r0, _0224EE40 ; =0x0000215C + mov r1, #1 + str r2, [r4, r0] + add r0, r4, #0 + mov r2, #0x27 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x21 + str r0, [r4, #0xc] + mov r7, #1 + b _0224EE1E +_0224EC54: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x28 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224EE1E +_0224EC6A: + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _0224EE44 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x40 + tst r0, r1 + beq _0224ECC0 + add r0, r4, #0 + add r1, r2, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _0224ECC0 + ldr r0, [sp, #0x18] + bl ov16_0223F4BC + lsr r1, r0, #0x1f + lsl r2, r0, #0x1e + sub r2, r2, r1 + mov r0, #0x1e + ror r2, r0 + add r0, r1, r2 + bne _0224ECC0 + ldr r0, [r4, #0x64] + ldr r2, [sp, #0x28] + lsl r1, r0, #2 + ldr r0, [r6, r1] + bic r0, r2 + mov r2, #1 + orr r0, r2 + str r0, [r6, r1] + add r1, r2, #0 + add r0, r4, #0 + mov r2, #0x20 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224ECC0: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224ECC8: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224EE3C ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #0xf + lsl r0, r0, #0x10 + and r0, r1 + beq _0224ED28 + lsr r0, r0, #0x10 + bl sub_020787EC + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp, #0x18] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _0224ED08 + add r0, r4, #0 + mov r2, #0x6b + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224ED28 +_0224ED08: + ldr r0, [r4, #0x64] + mov r1, #8 + lsl r0, r0, #2 + ldr r2, [r6, r0] + orr r1, r2 + str r1, [r6, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x6c + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + mov r7, #1 +_0224ED28: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224ED30: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _0224EE3C ; =0x00002DB0 + ldr r1, [r2, r0] + mov r0, #3 + lsl r0, r0, #8 + tst r0, r1 + beq _0224EE1E + ldr r0, _0224EE3C ; =0x00002DB0 + ldr r1, [r2, r0] + mov r0, #1 + lsl r0, r0, #8 + sub r1, r1, r0 + ldr r0, _0224EE3C ; =0x00002DB0 + str r1, [r2, r0] + ldr r0, [r4, #0x64] + mov r1, #0xc0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _0224EE3C ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #3 + lsl r1, r1, #8 + tst r1, r2 + bne _0224EDCA + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _0224EE48 ; =0x000030E4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224EDCA + lsl r1, r0, #1 + ldr r0, _0224EE4C ; =0x00002144 + str r1, [r4, r0] + ldr r3, [r4, #0x64] + lsl r0, r3, #2 + add r1, r4, r0 + ldr r0, _0224EE50 ; =0x000030F4 + ldr r2, [r1, r0] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _0224EE54 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224ED9A + str r2, [r4, #0x6c] + b _0224EDCA +_0224ED9A: + ldr r0, [sp, #0x18] + add r1, r4, #0 + add r2, r3, #0 + bl ov16_02257028 + mov r1, #0xc0 + mul r1, r0 + str r0, [r4, #0x6c] + ldr r0, _0224EE54 ; =0x00002D8C + add r1, r4, r1 + ldr r0, [r1, r0] + cmp r0, #0 + bne _0224EDCA + ldr r2, _0224EE58 ; =0x0000011A + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0x26 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r7, #2 + b _0224EE1E +_0224EDCA: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x24 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + b _0224EE1E +_0224EDE0: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224EE44 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + beq _0224EE10 + ldr r0, [sp, #0x1c] + cmp r0, #0x7d + beq _0224EDFC + cmp r0, #0xfd + bne _0224EE10 +_0224EDFC: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1e + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r7, #2 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0224EE10: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224EE1E +_0224EE18: + mov r0, #0 + str r0, [r4, #0x50] + mov r7, #3 +_0224EE1E: + cmp r7, #0 + bne _0224EE24 + b _0224E7B2 +_0224EE24: + ldr r0, [sp, #0x18] + ldr r2, [r4, #0x64] + add r1, r4, #0 + bl ov16_02253EC0 + cmp r7, #1 + bne _0224EE78 + ldr r1, _0224EE5C ; =0x0000213C + b _0224EE60 + nop +_0224EE38: .word 0x00003044 +_0224EE3C: .word 0x00002DB0 +_0224EE40: .word 0x0000215C +_0224EE44: .word 0x00002DAC +_0224EE48: .word 0x000030E4 +_0224EE4C: .word 0x00002144 +_0224EE50: .word 0x000030F4 +_0224EE54: .word 0x00002D8C +_0224EE58: .word 0x0000011A +_0224EE5C: .word 0x0000213C +_0224EE60: + mov r0, #2 + ldr r2, [r4, r1] + orr r0, r2 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x30 + ldr r2, [r4, r0] + mov r0, #2 + lsl r0, r0, #0x1e + orr r0, r2 + add r1, #0x30 + str r0, [r4, r1] +_0224EE78: + cmp r7, #3 + beq _0224EE82 + add sp, #0x2c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224EE82: + mov r0, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_0224E784 + + thumb_func_start ov16_0224EE88 +ov16_0224EE88: ; 0x0224EE88 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r5, #0 + ldr r7, _0224EEF8 ; =0x0000216C + mov r4, #0 + add r6, #0x54 +_0224EE94: + ldr r0, [r5, #0x54] + cmp r0, #0 + beq _0224EEA0 + cmp r0, #1 + beq _0224EEE0 + b _0224EEE6 +_0224EEA0: + ldr r1, [r5, #0x64] + ldr r2, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02256148 + add r2, r0, #0 + beq _0224EEB8 + ldr r0, _0224EEF8 ; =0x0000216C + ldr r1, [r5, r0] + ldr r0, _0224EEFC ; =0x001FD849 + tst r0, r1 + beq _0224EEBC +_0224EEB8: + cmp r2, #0xb5 + bne _0224EED8 +_0224EEBC: + add r0, r5, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r5, #8] + mov r4, #1 + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] + mov r0, #2 + ldr r1, [r5, r7] + lsl r0, r0, #0x1e + orr r0, r1 + str r0, [r5, r7] +_0224EED8: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0224EEE6 +_0224EEE0: + mov r0, #0 + str r0, [r5, #0x54] + mov r4, #2 +_0224EEE6: + cmp r4, #0 + beq _0224EE94 + cmp r4, #2 + beq _0224EEF2 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224EEF2: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224EEF8: .word 0x0000216C +_0224EEFC: .word 0x001FD849 + thumb_func_end ov16_0224EE88 + + thumb_func_start ov16_0224EF00 +ov16_0224EF00: ; 0x0224EF00 + push {r4, lr} + add r4, r1, #0 + ldr r2, _0224EF1C ; =0x00000116 + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + nop +_0224EF1C: .word 0x00000116 + thumb_func_end ov16_0224EF00 + + thumb_func_start ov16_0224EF20 +ov16_0224EF20: ; 0x0224EF20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #4] + add r5, r1, #0 + add r6, r2, #0 + str r3, [sp, #8] + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + beq _0224EF3E + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224EF3E: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + ldr r0, [sp, #0x38] + ldr r2, _0224F24C ; =0x00002D5E + lsl r0, r0, #4 + str r0, [sp, #0x10] + add r1, r5, r0 + mov r0, #0x3e + lsl r0, r0, #4 + ldrb r0, [r1, r0] + add r1, r6, #0 + str r0, [sp, #0x18] + mov r0, #0xc0 + mul r1, r0 + str r1, [sp, #0xc] + add r1, r5, r1 + ldrsb r1, [r1, r2] + sub r1, r1, #6 + lsl r1, r1, #0x18 + asr r7, r1, #0x18 + ldr r1, [sp, #8] + mul r0, r1 + str r0, [sp, #0x14] + add r1, r5, r0 + add r0, r2, #1 + ldrsb r1, [r1, r0] + mov r0, #6 + sub r0, r0, r1 + lsl r0, r0, #0x18 + asr r4, r0, #0x18 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x56 + bne _0224EF8E + lsl r0, r7, #0x19 + asr r7, r0, #0x18 +_0224EF8E: + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0x56 + bl ov16_02255AB4 + cmp r0, #1 + bne _0224EFA2 + lsl r0, r4, #0x19 + asr r4, r0, #0x18 +_0224EFA2: + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0x6d + bl ov16_02255AB4 + cmp r0, #1 + bne _0224EFB4 + mov r7, #0 +_0224EFB4: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x6d + bne _0224EFC2 + mov r4, #0 +_0224EFC2: + ldr r0, _0224F250 ; =0x00002DB0 + ldr r1, [sp, #0x14] + add r2, r5, r0 + str r2, [sp, #0x1c] + ldr r1, [r2, r1] + mov r2, #2 + lsl r2, r2, #0x1c + tst r1, r2 + bne _0224EFE2 + ldr r1, [sp, #0x14] + add r0, #0x10 + add r1, r5, r1 + ldr r1, [r1, r0] + lsr r0, r2, #7 + tst r0, r1 + beq _0224EFE8 +_0224EFE2: + cmp r4, #0 + bge _0224EFE8 + mov r4, #0 +_0224EFE8: + add r0, r4, #6 + add r0, r0, r7 + lsl r0, r0, #0x18 + asr r7, r0, #0x18 + bpl _0224EFF4 + mov r7, #0 +_0224EFF4: + cmp r7, #0xc + ble _0224EFFA + mov r7, #0xc +_0224EFFA: + ldr r0, _0224F254 ; =0x000003E3 + add r1, r5, r0 + ldr r0, [sp, #0x10] + ldrb r4, [r1, r0] + cmp r4, #0 + bne _0224F00C + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F00C: + ldr r0, _0224F258 ; =0x0000213C + mov r1, #0x20 + ldr r0, [r5, r0] + add r2, r0, #0 + tst r2, r1 + beq _0224F01E + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F01E: + lsl r1, r1, #5 + tst r0, r1 + beq _0224F02A + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F02A: + mov r0, #0xd + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224F06C + mov r0, #0x4c + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224F06C + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x30 + tst r0, r1 + beq _0224F06C + ldr r0, [sp, #0x10] + add r1, r5, r0 + ldr r0, _0224F25C ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x98 + bne _0224F06C + mov r4, #0x32 +_0224F06C: + ldr r0, _0224F260 ; =0x0226EAD0 + lsl r1, r7, #1 + ldrb r0, [r0, r1] + ldr r2, _0224F264 ; =0x0226EAD1 + ldrb r1, [r2, r1] + mul r0, r4 + bl sub_020E2178 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0xe + bne _0224F09A + mov r0, #0x82 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F09A: + mov r0, #0xd + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224F132 + mov r0, #0x4c + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224F132 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0xc + tst r0, r1 + beq _0224F0EC + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + mov r3, #8 + bl ov16_02255AB4 + cmp r0, #1 + bne _0224F0EC + mov r0, #0x50 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F0EC: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0xc0 + tst r0, r1 + beq _0224F116 + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0x51 + bl ov16_02255AB4 + cmp r0, #1 + bne _0224F116 + mov r0, #0x50 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F116: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #0xe + tst r0, r1 + beq _0224F132 + mov r0, #6 + mul r0, r4 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F132: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x37 + bne _0224F152 + ldr r0, [sp, #0x18] + cmp r0, #0 + bne _0224F152 + mov r0, #0x50 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F152: + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0x4d + bl ov16_02255AB4 + cmp r0, #1 + bne _0224F17C + ldr r1, [sp, #0x1c] + ldr r0, [sp, #0x14] + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _0224F17C + mov r0, #0x32 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F17C: + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02258AB8 + add r7, r0, #0 + ldr r1, [sp, #8] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + cmp r7, #0x30 + bne _0224F1A2 + mov r1, #0x64 + sub r0, r1, r0 + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F1A2: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02258AB8 + add r7, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov16_02258ACC + add r6, r0, #0 + cmp r7, #0x5d + bne _0224F1CA + add r0, #0x64 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F1CA: + cmp r7, #0x68 + bne _0224F1EA + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_022588A4 + cmp r0, #1 + bne _0224F1EA + add r6, #0x64 + add r0, r4, #0 + mul r0, r6 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F1EA: + ldr r0, _0224F268 ; =0x00002DCC + ldr r1, [sp, #0xc] + add r0, r5, r0 + ldr r2, [r0, r1] + lsl r1, r2, #4 + lsr r1, r1, #0x1f + beq _0224F20E + ldr r1, _0224F26C ; =0xF7FFFFFF + and r2, r1 + ldr r1, [sp, #0xc] + str r2, [r0, r1] + mov r0, #0x78 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F20E: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r1 + beq _0224F22A + mov r0, #0xa + mul r0, r4 + mov r1, #6 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0224F22A: + ldr r0, [sp, #4] + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + add r0, r1, #1 + cmp r0, r4 + ble _0224F246 + ldr r1, _0224F270 ; =0x0000216C + mov r0, #1 + ldr r2, [r5, r1] + orr r0, r2 + str r0, [r5, r1] +_0224F246: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224F24C: .word 0x00002D5E +_0224F250: .word 0x00002DB0 +_0224F254: .word 0x000003E3 +_0224F258: .word 0x0000213C +_0224F25C: .word 0x000003DE +_0224F260: .word 0x0226EAD0 +_0224F264: .word 0x0226EAD1 +_0224F268: .word 0x00002DCC +_0224F26C: .word 0xF7FFFFFF +_0224F270: .word 0x0000216C + thumb_func_end ov16_0224EF20 + + thumb_func_start ov16_0224F274 +ov16_0224F274: ; 0x0224F274 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp, #4] + ldr r0, _0224F44C ; =0x0000213C + add r5, r1, #0 + ldr r1, [r5, r0] + mov r0, #0x20 + add r7, r2, #0 + add r4, r3, #0 + ldr r6, [sp, #0x20] + tst r0, r1 + beq _0224F292 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F292: + lsl r0, r4, #6 + add r1, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _0224F2F6 + lsl r0, r6, #4 + add r1, r5, r0 + ldr r0, _0224F450 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #2 + tst r0, r1 + beq _0224F2F6 + cmp r6, #0xae + bne _0224F2C2 + lsl r1, r6, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + bl ov16_02255950 + cmp r0, #1 + bne _0224F2F6 +_0224F2C2: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0225582C + cmp r0, #0 + beq _0224F2DA + ldr r0, _0224F44C ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #8 + tst r0, r1 + beq _0224F2F6 +_0224F2DA: + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02253F20 + ldr r1, _0224F454 ; =0x0000216C + mov r0, #2 + ldr r2, [r5, r1] + lsl r0, r0, #0xe + orr r0, r2 + str r0, [r5, r1] + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F2F6: + ldr r0, _0224F44C ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #1 + lsl r0, r0, #0xa + tst r0, r1 + bne _0224F348 + mov r0, #0xc0 + mul r0, r4 + add r3, r5, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r2, [r3, r0] + mov r1, #0x18 + tst r1, r2 + beq _0224F320 + add r0, #0xc + ldr r0, [r3, r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1e + cmp r7, r0 + beq _0224F338 +_0224F320: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x63 + beq _0224F338 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x63 + bne _0224F348 +_0224F338: + ldr r1, _0224F454 ; =0x0000216C + mov r0, #1 + ldr r2, [r5, r1] + add sp, #8 + bic r2, r0 + str r2, [r5, r1] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F348: + mov r0, #0xd + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224F3B6 + mov r0, #0x4c + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0224F3B6 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #3 + tst r0, r1 + beq _0224F392 + lsl r0, r6, #4 + add r1, r5, r0 + ldr r0, _0224F458 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x98 + bne _0224F392 + ldr r1, _0224F454 ; =0x0000216C + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + str r2, [r5, r1] +_0224F392: + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0xc0 + tst r0, r1 + beq _0224F3B6 + lsl r0, r6, #4 + add r2, r5, r0 + ldr r0, _0224F458 ; =0x000003DE + add r1, #0x44 + ldrh r0, [r2, r0] + cmp r0, r1 + bne _0224F3B6 + ldr r1, _0224F454 ; =0x0000216C + mov r0, #1 + ldr r2, [r5, r1] + bic r2, r0 + str r2, [r5, r1] +_0224F3B6: + ldr r1, _0224F454 ; =0x0000216C + mov r2, #1 + ldr r0, [r5, r1] + lsl r2, r2, #0xa + tst r0, r2 + bne _0224F446 + ldr r0, _0224F45C ; =0x00003044 + sub r2, #0x1a + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r0, r5, r0 + ldrh r0, [r0, r2] + cmp r0, #0x80 + beq _0224F446 + sub r1, #0x30 + ldr r0, [r5, r1] + mov r1, #4 + tst r1, r0 + bne _0224F3EE + mov r1, #0xc0 + mul r1, r4 + add r2, r5, r1 + mov r1, #0xb7 + lsl r1, r1, #6 + ldr r2, [r2, r1] + mov r1, #0x40 + tst r1, r2 + bne _0224F43A +_0224F3EE: + mov r2, #2 + lsl r2, r2, #0x12 + add r1, r0, #0 + tst r1, r2 + bne _0224F40A + mov r1, #0xc0 + mul r1, r4 + add r3, r5, r1 + mov r1, #0xb7 + lsl r1, r1, #6 + ldr r3, [r3, r1] + lsl r1, r2, #0xa + tst r1, r3 + bne _0224F43A +_0224F40A: + mov r1, #8 + tst r1, r0 + bne _0224F422 + mov r1, #0xc0 + mul r1, r4 + add r2, r5, r1 + mov r1, #0xb7 + lsl r1, r1, #6 + ldr r2, [r2, r1] + mov r1, #0x80 + tst r1, r2 + bne _0224F43A +_0224F422: + mov r1, #0x10 + tst r0, r1 + bne _0224F446 + mov r0, #0xc0 + mul r0, r4 + add r2, r5, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r2, [r2, r0] + lsl r0, r1, #0xe + tst r0, r2 + beq _0224F446 +_0224F43A: + ldr r1, _0224F454 ; =0x0000216C + mov r0, #1 + ldr r2, [r5, r1] + lsl r0, r0, #0x10 + orr r0, r2 + str r0, [r5, r1] +_0224F446: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224F44C: .word 0x0000213C +_0224F450: .word 0x000003E9 +_0224F454: .word 0x0000216C +_0224F458: .word 0x000003DE +_0224F45C: .word 0x00003044 + thumb_func_end ov16_0224F274 + + thumb_func_start ov16_0224F460 +ov16_0224F460: ; 0x0224F460 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + bl ov16_0223DF1C + add r2, r0, #0 + ldr r0, [r4, #0x6c] + cmp r0, #0xff + bne _0224F474 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F474: + ldr r6, _0224F5B0 ; =0x0000216C + ldr r1, _0224F5B4 ; =0x801FDA49 + ldr r3, [r4, r6] + add r7, r3, #0 + and r7, r1 + bne _0224F506 + mov r1, #0x75 + lsl r1, r1, #2 + lsl r0, r0, #6 + add r5, r4, r1 + ldr r3, [r5, r0] + mov ip, r0 + lsl r0, r3, #0x1b + lsr r0, r0, #0x1f + beq _0224F506 + ldr r0, _0224F5B8 ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _0224F5BC ; =0x000003E9 + ldrb r0, [r1, r0] + mov r1, #4 + tst r0, r1 + beq _0224F506 + mov r0, #0x10 + bic r3, r0 + mov r0, ip + str r3, [r5, r0] + ldr r2, [r4, #0x64] + mov r0, #0 + lsl r2, r2, #1 + add r3, r4, r2 + ldr r2, _0224F5B8 ; =0x00003044 + add r2, #0x18 + strh r0, [r3, r2] + ldr r2, [r4, #0x64] + ldr r0, _0224F5B8 ; =0x00003044 + lsl r2, r2, #1 + sub r0, r0, #4 + add r3, r4, r2 + ldr r2, _0224F5B8 ; =0x00003044 + ldr r0, [r4, r0] + add r2, #0x38 + strh r0, [r3, r2] + ldr r0, _0224F5B8 ; =0x00003044 + sub r0, r0, #4 + ldr r2, [r4, r0] + ldr r0, _0224F5B8 ; =0x00003044 + add r0, r0, #4 + str r2, [r4, r0] + add r0, r6, #0 + sub r0, #0x30 + ldr r2, [r4, r0] + lsl r0, r1, #0x12 + orr r0, r2 + sub r6, #0x30 + str r0, [r4, r6] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x8b + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r1, [r4, #0x6c] + ldr r2, [r4, #0x64] + add r0, r4, #0 + bl ov16_0225B408 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224F506: + mov r1, #0 + cmp r2, #0 + ble _0224F5AC + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r4, r0 +_0224F512: + ldr r3, _0224F5C0 ; =0x000021EC + add r5, r4, r1 + ldrb r5, [r5, r3] + cmp r7, #0 + bne _0224F5A6 + lsl r3, r5, #6 + str r3, [sp] + ldr r3, [r0, r3] + lsl r3, r3, #0x1a + lsr r3, r3, #0x1f + beq _0224F5A6 + ldr r3, _0224F5B8 ; =0x00003044 + ldr r3, [r4, r3] + lsl r3, r3, #4 + add r6, r4, r3 + ldr r3, _0224F5BC ; =0x000003E9 + ldrb r6, [r6, r3] + mov r3, #8 + tst r3, r6 + beq _0224F5A6 + mov r1, #0x46 + lsl r1, r1, #2 + str r5, [r4, r1] + ldr r1, [sp] + mov r7, #1 + ldr r2, [r0, r1] + mov r1, #0x20 + bic r2, r1 + ldr r1, [sp] + lsl r7, r7, #0x14 + str r2, [r0, r1] + ldr r2, _0224F5C4 ; =0x0000213C + ldr r0, [r4, r2] + tst r0, r7 + bne _0224F586 + ldr r1, [r4, #0x64] + mov r0, #0 + lsl r1, r1, #1 + add r3, r4, r1 + ldr r1, _0224F5C8 ; =0x0000305C + strh r0, [r3, r1] + add r0, r1, #0 + sub r0, #0x1c + ldr r6, [r4, r0] + ldr r0, [r4, #0x64] + lsl r0, r0, #1 + add r3, r4, r0 + add r0, r1, #0 + add r0, #0x20 + strh r6, [r3, r0] + add r0, r1, #0 + sub r0, #0x1c + ldr r0, [r4, r0] + sub r1, #0x14 + str r0, [r4, r1] + ldr r0, [r4, r2] + orr r0, r7 + str r0, [r4, r2] +_0224F586: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x92 + bl ov16_02251E1C + ldr r0, [r4, #8] + add r1, r5, #0 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + ldr r2, [r4, #0x64] + add r0, r4, #0 + bl ov16_0225B408 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224F5A6: + add r1, r1, #1 + cmp r1, r2 + blt _0224F512 +_0224F5AC: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224F5B0: .word 0x0000216C +_0224F5B4: .word 0x801FDA49 +_0224F5B8: .word 0x00003044 +_0224F5BC: .word 0x000003E9 +_0224F5C0: .word 0x000021EC +_0224F5C4: .word 0x0000213C +_0224F5C8: .word 0x0000305C + thumb_func_end ov16_0224F460 + + thumb_func_start ov16_0224F5CC +ov16_0224F5CC: ; 0x0224F5CC + push {r4, lr} + add r4, r1, #0 + bl ov16_022405FC + cmp r0, #1 + bne _0224F5E4 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + ldr r0, [r4, #0xc] + str r0, [r4, #8] +_0224F5E4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0224F5CC + + thumb_func_start ov16_0224F5E8 +ov16_0224F5E8: ; 0x0224F5E8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0x48] + add r5, r0, #0 + cmp r2, #6 + bhi _0224F6DE + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224F600: ; jump table + .short _0224F60E - _0224F600 - 2 ; case 0 + .short _0224F61A - _0224F600 - 2 ; case 1 + .short _0224F632 - _0224F600 - 2 ; case 2 + .short _0224F67E - _0224F600 - 2 ; case 3 + .short _0224F69A - _0224F600 - 2 ; case 4 + .short _0224F6AC - _0224F600 - 2 ; case 5 + .short _0224F6C8 - _0224F600 - 2 ; case 6 +_0224F60E: + bl ov16_0224EF00 + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] + pop {r3, r4, r5, pc} +_0224F61A: + ldr r2, _0224F724 ; =0x00002184 + ldr r3, [r4, r2] + mov r2, #4 + tst r2, r3 + bne _0224F62C + bl ov16_0224E784 + cmp r0, #1 + beq _0224F720 +_0224F62C: + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] +_0224F632: + ldr r0, _0224F724 ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #1 + tst r0, r1 + bne _0224F678 + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0 + bl ov16_0224E13C + cmp r0, #0 + beq _0224F678 + cmp r0, #1 + beq _0224F658 + cmp r0, #2 + beq _0224F65E + cmp r0, #3 + beq _0224F664 + b _0224F668 +_0224F658: + mov r0, #0x26 + str r0, [r4, #0xc] + b _0224F668 +_0224F65E: + ldr r0, [r4, #8] + str r0, [r4, #0xc] + b _0224F668 +_0224F664: + mov r0, #0x21 + str r0, [r4, #0xc] +_0224F668: + mov r0, #0x15 + str r0, [r4, #8] + ldr r2, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + pop {r3, r4, r5, pc} +_0224F678: + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] +_0224F67E: + ldr r0, _0224F724 ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #8 + tst r0, r1 + bne _0224F694 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224E458 + cmp r0, #1 + beq _0224F720 +_0224F694: + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] +_0224F69A: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224E5F4 + cmp r0, #1 + beq _0224F720 + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] +_0224F6AC: + ldr r0, _0224F724 ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #0x80 + tst r0, r1 + bne _0224F6C2 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224F460 + cmp r0, #1 + beq _0224F720 +_0224F6C2: + ldr r0, [r4, #0x48] + add r0, r0, #1 + str r0, [r4, #0x48] +_0224F6C8: + ldr r3, _0224F728 ; =0x00003044 + ldr r2, [r4, #0x64] + ldr r3, [r4, r3] + add r0, r5, #0 + lsl r3, r3, #0x10 + add r1, r4, #0 + lsr r3, r3, #0x10 + bl ov16_02253C98 + mov r0, #0 + str r0, [r4, #0x48] +_0224F6DE: + ldr r1, _0224F72C ; =0x0000216C + ldr r0, _0224F730 ; =0x801FDA49 + ldr r2, [r4, r1] + tst r0, r2 + beq _0224F6EE + mov r0, #0x19 + str r0, [r4, #8] + b _0224F718 +_0224F6EE: + add r0, r1, #0 + sub r0, #0x2c + ldr r2, [r4, r0] + mov r0, #0x40 + orr r0, r2 + sub r1, #0x2c + str r0, [r4, r1] + ldr r2, _0224F728 ; =0x00003044 + add r0, r4, #0 + ldr r2, [r4, r2] + mov r1, #0 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x17 + str r0, [r4, #0xc] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_022560B0 +_0224F718: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02259868 +_0224F720: + pop {r3, r4, r5, pc} + nop +_0224F724: .word 0x00002184 +_0224F728: .word 0x00003044 +_0224F72C: .word 0x0000216C +_0224F730: .word 0x801FDA49 + thumb_func_end ov16_0224F5E8 + + thumb_func_start ov16_0224F734 +ov16_0224F734: ; 0x0224F734 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0x4c] + add r5, r0, #0 + cmp r2, #6 + bhi _0224F814 + add r3, r2, r2 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_0224F74C: ; jump table + .short _0224F75A - _0224F74C - 2 ; case 0 + .short _0224F766 - _0224F74C - 2 ; case 1 + .short _0224F778 - _0224F74C - 2 ; case 2 + .short _0224F7A2 - _0224F74C - 2 ; case 3 + .short _0224F7CC - _0224F74C - 2 ; case 4 + .short _0224F7EE - _0224F74C - 2 ; case 5 + .short _0224F810 - _0224F74C - 2 ; case 6 +_0224F75A: + add r2, r2, #1 + str r2, [r4, #0x4c] + bl ov16_0224E5F4 + cmp r0, #1 + beq _0224F818 +_0224F766: + ldr r0, [r4, #0x4c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x4c] + add r0, r5, #0 + bl ov16_02253E3C + cmp r0, #1 + beq _0224F818 +_0224F778: + ldr r0, _0224F81C ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #0x20 + tst r0, r1 + bne _0224F79C + ldr r3, [r4, #0x6c] + cmp r3, #0xff + beq _0224F79C + ldr r0, _0224F820 ; =0x00003044 + add r1, r4, #0 + ldr r0, [r4, r0] + str r0, [sp] + ldr r2, [r4, #0x64] + add r0, r5, #0 + bl ov16_0224EF20 + cmp r0, #1 + beq _0224F818 +_0224F79C: + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] +_0224F7A2: + ldr r0, _0224F81C ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #0x40 + tst r0, r1 + bne _0224F7C6 + ldr r3, [r4, #0x6c] + cmp r3, #0xff + beq _0224F7C6 + ldr r0, _0224F820 ; =0x00003044 + add r1, r4, #0 + ldr r0, [r4, r0] + str r0, [sp] + ldr r2, [r4, #0x64] + add r0, r5, #0 + bl ov16_0224F274 + cmp r0, #1 + beq _0224F818 +_0224F7C6: + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] +_0224F7CC: + ldr r0, _0224F81C ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #2 + tst r0, r1 + bne _0224F7E8 + ldr r0, [r4, #0x6c] + cmp r0, #0xff + beq _0224F7E8 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224E6F4 + cmp r0, #1 + beq _0224F818 +_0224F7E8: + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] +_0224F7EE: + ldr r0, _0224F81C ; =0x00002184 + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + bne _0224F80A + ldr r0, [r4, #0x6c] + cmp r0, #0xff + beq _0224F80A + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0224EE88 + cmp r0, #1 + beq _0224F818 +_0224F80A: + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] +_0224F810: + mov r0, #0 + str r0, [r4, #0x4c] +_0224F814: + mov r0, #0x18 + str r0, [r4, #8] +_0224F818: + pop {r3, r4, r5, pc} + nop +_0224F81C: .word 0x00002184 +_0224F820: .word 0x00003044 + thumb_func_end ov16_0224F734 + + thumb_func_start ov16_0224F824 +ov16_0224F824: ; 0x0224F824 + push {r3, r4, lr} + sub sp, #4 + add r2, sp, #0 + add r4, r1, #0 + bl ov16_0225366C + cmp r0, #1 + bne _0224F84A + ldr r2, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x19 + add sp, #4 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_0224F84A: + mov r0, #0x19 + str r0, [r4, #8] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0224F824 + + thumb_func_start ov16_0224F854 +ov16_0224F854: ; 0x0224F854 + push {r4, lr} + ldr r0, _0224F8CC ; =0x0000216C + add r4, r1, #0 + ldr r1, [r4, r0] + mov r2, #2 + lsl r2, r2, #0x1e + add r3, r1, #0 + tst r3, r2 + beq _0224F86C + mov r0, #0x22 + str r0, [r4, #8] + pop {r4, pc} +_0224F86C: + lsr r2, r2, #0x16 + tst r2, r1 + beq _0224F886 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x2a + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x26 + str r0, [r4, #0xc] + pop {r4, pc} +_0224F886: + add r2, r0, #0 + add r2, #0x14 + ldr r2, [r4, r2] + cmp r2, #0 + beq _0224F8AC + mov r3, #1 + add r2, r1, #0 + tst r2, r3 + beq _0224F8AC + mov r2, #1 + bic r1, r2 + str r1, [r4, r0] + ldr r2, [r4, r0] + lsl r1, r3, #0xe + orr r1, r2 + str r1, [r4, r0] + mov r0, #0x1c + str r0, [r4, #8] + pop {r4, pc} +_0224F8AC: + ldr r0, _0224F8D0 ; =0x001FD849 + tst r0, r1 + beq _0224F8C6 + add r0, r4, #0 + mov r1, #1 + mov r2, #7 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x21 + str r0, [r4, #0xc] + pop {r4, pc} +_0224F8C6: + mov r0, #0x1a + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_0224F8CC: .word 0x0000216C +_0224F8D0: .word 0x001FD849 + thumb_func_end ov16_0224F854 + + thumb_func_start ov16_0224F8D4 +ov16_0224F8D4: ; 0x0224F8D4 + push {r4, lr} + add r4, r1, #0 + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x1b + str r0, [r4, #0xc] + pop {r4, pc} + thumb_func_end ov16_0224F8D4 + + thumb_func_start ov16_0224F8EC +ov16_0224F8EC: ; 0x0224F8EC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r2, _0224FC18 ; =0x0000216C + add r4, r1, #0 + ldr r1, [r4, r2] + add r7, r0, #0 + mov r0, #0x20 + tst r0, r1 + beq _0224F914 + ldr r0, [r4, #0x6c] + mov r1, #0xc0 + add r3, r0, #0 + mul r3, r1 + ldr r0, _0224FC1C ; =0x00002D90 + add r3, r4, r3 + ldr r0, [r3, r0] + sub r1, #0xc1 + mul r1, r0 + sub r2, #0x28 + str r1, [r4, r2] +_0224F914: + ldr r0, _0224FC20 ; =0x00002144 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0224F91E + b _0224FCEC +_0224F91E: + ldr r1, [r4, #0x6c] + add r0, r4, #0 + bl ov16_02258AB8 + str r0, [sp, #4] + ldr r1, [r4, #0x6c] + add r0, r4, #0 + mov r2, #0 + bl ov16_02258ACC + str r0, [sp] + ldr r0, _0224FC20 ; =0x00002144 + ldr r0, [r4, r0] + cmp r0, #0 + blt _0224F940 + bl sub_02022974 +_0224F940: + ldr r1, [r4, #0x64] + add r0, r7, #0 + bl ov16_0223E208 + add r5, r0, #0 + ldr r1, [r4, #0x6c] + add r0, r7, #0 + bl ov16_0223E208 + cmp r5, r0 + bne _0224F962 + ldr r1, [r4, #0x64] + add r0, r7, #0 + mov r2, #0 + mov r3, #0x61 + bl ov16_022666BC +_0224F962: + ldr r0, [r4, #0x6c] + ldr r2, [r4, #0x64] + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _0224FC24 ; =0x000030F4 + str r2, [r1, r0] + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + add r6, r1, #0 + mul r6, r0 + mov r2, #1 + ldr r1, _0224FC28 ; =0x00002DB0 + add r5, r4, r6 + ldr r3, [r5, r1] + lsl r2, r2, #0x18 + tst r2, r3 + beq _0224FA3C + ldr r2, _0224FC20 ; =0x00002144 + ldr r2, [r4, r2] + cmp r2, #0 + bge _0224FA3C + add r3, r1, #0 + add r3, #0x30 + ldr r3, [r5, r3] + add r5, r2, r3 + cmp r5, #0 + bgt _0224F9DE + mov r2, #0xbb + lsl r2, r2, #2 + add r6, r4, r2 + ldr r2, [r4, #0x64] + mov r5, #0x1c + mul r5, r2 + ldr r2, [r6, r5] + sub r2, r2, r3 + str r2, [r6, r5] + ldr r5, [r4, #0x6c] + add r3, r4, r1 + add r2, r5, #0 + mul r2, r0 + ldr r6, [r3, r2] + ldr r5, _0224FC2C ; =0xFEFFFFFF + and r5, r6 + str r5, [r3, r2] + ldr r2, [r4, #0x6c] + add r3, r2, #0 + add r2, r1, #0 + mul r3, r0 + add r3, r4, r3 + add r2, #0x30 + ldr r2, [r3, r2] + add r1, #0x30 + neg r3, r2 + ldr r2, _0224FC20 ; =0x00002144 + add r2, r2, #4 + str r3, [r4, r2] + ldr r2, [r4, #0x6c] + mov r3, #0 + mul r0, r2 + add r0, r4, r0 + str r3, [r0, r1] + b _0224FA0A +_0224F9DE: + mov r3, #0xbb + lsl r3, r3, #2 + add r6, r4, r3 + ldr r3, [r4, #0x64] + mov r5, #0x1c + mul r5, r3 + ldr r3, [r6, r5] + add r1, #0x30 + add r2, r3, r2 + str r2, [r6, r5] + ldr r2, [r4, #0x6c] + add r1, r4, r1 + mul r0, r2 + ldr r2, _0224FC20 ; =0x00002144 + ldr r3, [r1, r0] + ldr r2, [r4, r2] + add r2, r3, r2 + str r2, [r1, r0] + ldr r0, _0224FC20 ; =0x00002144 + ldr r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] +_0224FA0A: + mov r0, #0xba + lsl r0, r0, #2 + ldr r2, [r4, #0x6c] + add r1, r4, r0 + add r0, r2, #0 + mov r3, #0x1c + mul r0, r3 + ldr r5, [r1, r0] + mov r2, #8 + orr r2, r5 + str r2, [r1, r0] + ldr r0, [r4, #0x6c] + add r3, #0xfc + str r0, [r4, r3] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x5a + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x1c + add sp, #8 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224FA3C: + ldr r0, _0224FC30 ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _0224FC34 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x65 + bne _0224FA62 + ldr r0, _0224FC38 ; =0x00002D8C + add r1, r4, r6 + ldr r2, [r1, r0] + ldr r0, _0224FC20 ; =0x00002144 + ldr r1, [r4, r0] + add r1, r1, r2 + cmp r1, #0 + bgt _0224FA62 + sub r1, r2, #1 + neg r1, r1 + str r1, [r4, r0] +_0224FA62: + ldr r0, [r4, #0x6c] + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1f + bne _0224FAD0 + ldr r0, [sp, #4] + cmp r0, #0x41 + bne _0224FAA2 + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + ldr r0, [sp] + cmp r1, r0 + bge _0224FAA2 + ldr r2, [r4, #0x6c] + mov r0, #0xb5 + lsl r0, r0, #2 + mov r1, #0x1c + add r3, r2, #0 + mul r3, r1 + add r0, r4, r0 + ldr r2, [r0, r3] + mov r1, #0x20 + orr r1, r2 + str r1, [r0, r3] +_0224FAA2: + ldr r0, [sp, #4] + cmp r0, #0x67 + bne _0224FAD0 + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r3, r4, r0 + ldr r0, _0224FC38 ; =0x00002D8C + ldr r2, [r3, r0] + add r0, r0, #4 + ldr r0, [r3, r0] + cmp r2, r0 + bne _0224FAD0 + mov r0, #0xb5 + lsl r0, r0, #2 + add r3, r1, #0 + mov r2, #0x1c + add r0, r4, r0 + mul r3, r2 + ldr r2, [r0, r3] + mov r1, #0x20 + orr r1, r2 + str r1, [r0, r3] +_0224FAD0: + ldr r0, [r4, #0x6c] + lsl r1, r0, #6 + add r2, r4, r1 + mov r1, #0x75 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #0x16 + lsr r1, r1, #0x1f + bne _0224FAF4 + mov r1, #0x1c + mul r1, r0 + add r2, r4, r1 + mov r1, #0xb5 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #0x1a + lsr r1, r1, #0x1f + beq _0224FB3E +_0224FAF4: + mov r1, #0xc0 + mul r1, r0 + ldr r0, _0224FC38 ; =0x00002D8C + add r1, r4, r1 + ldr r2, _0224FC20 ; =0x00002144 + ldr r1, [r1, r0] + ldr r0, [r4, r2] + add r0, r0, r1 + cmp r0, #0 + bgt _0224FB3E + sub r0, r1, #1 + neg r0, r0 + str r0, [r4, r2] + ldr r0, [r4, #0x6c] + mov r1, #0x75 + lsl r0, r0, #6 + add r0, r4, r0 + lsl r1, r1, #2 + ldr r0, [r0, r1] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1f + beq _0224FB30 + add r0, r2, #0 + add r0, #0x28 + ldr r1, [r4, r0] + mov r0, #0x80 + orr r0, r1 + add r2, #0x28 + str r0, [r4, r2] + b _0224FB3E +_0224FB30: + add r0, r2, #0 + add r0, #0x28 + ldr r0, [r4, r0] + sub r1, #0xd4 + orr r0, r1 + add r2, #0x28 + str r0, [r4, r2] +_0224FB3E: + ldr r1, [r4, #0x6c] + ldr r0, _0224FC3C ; =0x000030E4 + lsl r3, r1, #2 + ldr r1, _0224FC20 ; =0x00002144 + add r0, r4, r0 + ldr r2, [r0, r3] + ldr r1, [r4, r1] + add r1, r2, r1 + str r1, [r0, r3] + ldr r0, _0224FC40 ; =0x00002DBC + ldr r1, [r4, #0x6c] + add r3, r4, r0 + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldrb r0, [r3, r2] + cmp r0, #0xff + bhs _0224FB66 + add r0, r0, #1 + strb r0, [r3, r2] +_0224FB66: + ldr r0, _0224FC30 ; =0x00003044 + mov r1, #0x3e + ldr r0, [r4, r0] + lsl r1, r1, #4 + lsl r0, r0, #4 + add r0, r4, r0 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _0224FBD4 + ldr r1, [r4, #0x6c] + ldr r0, _0224FC20 ; =0x00002144 + lsl r1, r1, #6 + add r2, r4, r1 + ldr r1, [r4, #0x64] + ldr r0, [r4, r0] + lsl r1, r1, #2 + add r2, r2, r1 + mov r1, #0x76 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0x6c] + ldr r2, [r4, #0x64] + lsl r0, r0, #6 + add r0, r4, r0 + add r1, #0x10 + str r2, [r0, r1] + ldr r0, [r4, #0x64] + bl sub_020787CC + mov r1, #0x7b + ldr r3, [r4, #0x6c] + lsl r1, r1, #2 + add r2, r4, r1 + lsl r5, r3, #6 + ldr r3, [r2, r5] + orr r0, r3 + str r0, [r2, r5] + ldr r2, [r4, #0x6c] + ldr r0, _0224FC20 ; =0x00002144 + add r5, r2, #0 + add r2, r1, #0 + mov r3, #0x1c + mul r5, r3 + ldr r0, [r4, r0] + add r5, r4, r5 + add r2, #0xec + str r0, [r5, r2] + ldr r0, [r4, #0x6c] + ldr r5, [r4, #0x64] + add r2, r0, #0 + mul r2, r3 + add r0, r4, r2 + add r1, #0xf0 + str r5, [r0, r1] + b _0224FC62 +_0224FBD4: + cmp r0, #1 + bne _0224FC62 + ldr r2, [r4, #0x6c] + ldr r0, _0224FC20 ; =0x00002144 + lsl r2, r2, #6 + add r3, r4, r2 + ldr r2, [r4, #0x64] + ldr r0, [r4, r0] + lsl r2, r2, #2 + add r2, r3, r2 + lsr r1, r1, #1 + str r0, [r2, r1] + ldr r0, [r4, #0x6c] + ldr r2, [r4, #0x64] + lsl r0, r0, #6 + add r1, r4, r0 + mov r0, #2 + lsl r0, r0, #8 + str r2, [r1, r0] + ldr r0, [r4, #0x64] + bl sub_020787CC + mov r1, #0x81 + ldr r3, [r4, #0x6c] + lsl r1, r1, #2 + add r2, r4, r1 + lsl r5, r3, #6 + ldr r3, [r2, r5] + orr r0, r3 + str r0, [r2, r5] + ldr r2, [r4, #0x6c] + ldr r0, _0224FC20 ; =0x00002144 + b _0224FC44 + nop +_0224FC18: .word 0x0000216C +_0224FC1C: .word 0x00002D90 +_0224FC20: .word 0x00002144 +_0224FC24: .word 0x000030F4 +_0224FC28: .word 0x00002DB0 +_0224FC2C: .word 0xFEFFFFFF +_0224FC30: .word 0x00003044 +_0224FC34: .word 0x000003DE +_0224FC38: .word 0x00002D8C +_0224FC3C: .word 0x000030E4 +_0224FC40: .word 0x00002DBC +_0224FC44: + add r5, r2, #0 + add r2, r1, #0 + mov r3, #0x1c + mul r5, r3 + ldr r0, [r4, r0] + add r5, r4, r5 + add r2, #0xdc + str r0, [r5, r2] + ldr r0, [r4, #0x6c] + ldr r5, [r4, #0x64] + add r2, r0, #0 + mul r2, r3 + add r0, r4, r2 + add r1, #0xe0 + str r5, [r0, r1] +_0224FC62: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0224FCF4 ; =0x00002D8C + ldr r2, [r1, r0] + ldr r0, _0224FCF8 ; =0x00002144 + ldr r1, [r4, r0] + add r0, r1, r2 + cmp r0, #0 + bgt _0224FC8E + mov r0, #0xbb + lsl r0, r0, #2 + add r1, r4, r0 + ldr r3, [r4, #0x64] + mov r0, #0x1c + mul r0, r3 + ldr r3, [r1, r0] + neg r2, r2 + add r2, r3, r2 + str r2, [r1, r0] + b _0224FCA2 +_0224FC8E: + ldr r3, [r4, #0x64] + mov r0, #0xbb + lsl r0, r0, #2 + mov r2, #0x1c + add r5, r3, #0 + add r0, r4, r0 + mul r5, r2 + ldr r2, [r0, r5] + add r1, r2, r1 + str r1, [r0, r5] +_0224FCA2: + ldr r3, _0224FCF8 ; =0x00002144 + ldr r0, [r4, #0x6c] + mov r2, #0x82 + lsl r0, r0, #6 + ldr r1, [r4, r3] + add r0, r4, r0 + lsl r2, r2, #2 + str r1, [r0, r2] + ldr r1, [r4, #0x6c] + ldr r0, [r4, #0x64] + lsl r1, r1, #6 + add r5, r4, r1 + add r1, r2, #4 + str r0, [r5, r1] + ldr r0, [r4, #0x6c] + sub r2, #0xf0 + str r0, [r4, r2] + ldr r0, [r4, r3] + add r3, #0x18 + str r0, [r4, r3] + add r0, r4, #0 + mov r1, #1 + mov r2, #2 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x1c + str r0, [r4, #0xc] + ldr r1, _0224FCFC ; =0x0000213C + mov r0, #2 + ldr r2, [r4, r1] + lsl r0, r0, #0xc + orr r0, r2 + add sp, #8 + str r0, [r4, r1] + pop {r3, r4, r5, r6, r7, pc} +_0224FCEC: + mov r0, #0x1c + str r0, [r4, #8] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224FCF4: .word 0x00002D8C +_0224FCF8: .word 0x00002144 +_0224FCFC: .word 0x0000213C + thumb_func_end ov16_0224F8EC + + thumb_func_start ov16_0224FD00 +ov16_0224FD00: ; 0x0224FD00 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r2, [r4, #0x38] + add r5, r0, #0 + cmp r2, #0 + beq _0224FD14 + cmp r2, #1 + beq _0224FDF2 + b _0224FEC8 +_0224FD14: + ldr r2, [r4, #0x3c] + cmp r2, #6 + bls _0224FD1C + b _0224FEC8 +_0224FD1C: + add r3, r2, r2 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_0224FD28: ; jump table + .short _0224FD36 - _0224FD28 - 2 ; case 0 + .short _0224FD42 - _0224FD28 - 2 ; case 1 + .short _0224FD54 - _0224FD28 - 2 ; case 2 + .short _0224FD88 - _0224FD28 - 2 ; case 3 + .short _0224FDA4 - _0224FD28 - 2 ; case 4 + .short _0224FDB2 - _0224FD28 - 2 ; case 5 + .short _0224FDDC - _0224FD28 - 2 ; case 6 +_0224FD36: + add r2, r2, #1 + str r2, [r4, #0x3c] + bl ov16_022511FC + cmp r0, #1 + beq _0224FDB0 +_0224FD42: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl ov16_02251218 + cmp r0, #1 + beq _0224FDB0 +_0224FD54: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + add r2, sp, #0xc + bl ov16_02253710 + cmp r0, #1 + bne _0224FD88 + ldr r0, _0224FED4 ; =0x0000216C + ldr r1, [r4, r0] + ldr r0, _0224FED8 ; =0x001FD849 + tst r0, r1 + bne _0224FD88 + ldr r2, [sp, #0xc] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224FD88: + ldr r0, [r4, #0x3c] + ldr r2, _0224FEDC ; =0x00000125 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224FDA4: + add r2, r2, #1 + str r2, [r4, #0x3c] + bl ov16_0225126C + cmp r0, #1 + bne _0224FDB2 +_0224FDB0: + b _0224FED0 +_0224FDB2: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + add r2, sp, #8 + bl ov16_0225708C + cmp r0, #1 + bne _0224FDDC + ldr r2, [sp, #8] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224FDDC: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl ov16_022512F8 + cmp r0, #1 + bne _0224FEC8 + add sp, #0x10 + pop {r3, r4, r5, pc} +_0224FDF2: + ldr r2, [r4, #0x3c] + cmp r2, #6 + bhi _0224FEC8 + add r3, r2, r2 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_0224FE04: ; jump table + .short _0224FE12 - _0224FE04 - 2 ; case 0 + .short _0224FE1E - _0224FE04 - 2 ; case 1 + .short _0224FE52 - _0224FE04 - 2 ; case 2 + .short _0224FE6E - _0224FE04 - 2 ; case 3 + .short _0224FE7A - _0224FE04 - 2 ; case 4 + .short _0224FEA4 - _0224FE04 - 2 ; case 5 + .short _0224FEB6 - _0224FE04 - 2 ; case 6 +_0224FE12: + add r2, r2, #1 + str r2, [r4, #0x3c] + bl ov16_022511FC + cmp r0, #1 + beq _0224FED0 +_0224FE1E: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + add r2, sp, #4 + bl ov16_02253710 + cmp r0, #1 + bne _0224FE52 + ldr r0, _0224FED4 ; =0x0000216C + ldr r1, [r4, r0] + ldr r0, _0224FED8 ; =0x001FD849 + tst r0, r1 + bne _0224FE52 + ldr r2, [sp, #4] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224FE52: + ldr r0, [r4, #0x3c] + ldr r2, _0224FEDC ; =0x00000125 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224FE6E: + add r2, r2, #1 + str r2, [r4, #0x3c] + bl ov16_0225126C + cmp r0, #1 + beq _0224FED0 +_0224FE7A: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + add r2, sp, #0 + bl ov16_0225708C + cmp r0, #1 + bne _0224FEA4 + ldr r2, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224FEA4: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl ov16_02251218 + cmp r0, #1 + beq _0224FED0 +_0224FEB6: + ldr r0, [r4, #0x3c] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl ov16_022512F8 + cmp r0, #1 + beq _0224FED0 +_0224FEC8: + mov r0, #0 + str r0, [r4, #0x3c] + mov r0, #0x1e + str r0, [r4, #8] +_0224FED0: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224FED4: .word 0x0000216C +_0224FED8: .word 0x001FD849 +_0224FEDC: .word 0x00000125 + thumb_func_end ov16_0224FD00 + + thumb_func_start ov16_0224FEE0 +ov16_0224FEE0: ; 0x0224FEE0 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0224FEE0 + + thumb_func_start ov16_0224FEE4 +ov16_0224FEE4: ; 0x0224FEE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r1, [r4, #0x40] + add r6, r0, #0 + cmp r1, #7 + bls _0224FEF4 + b _0225012E +_0224FEF4: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224FF00: ; jump table + .short _0224FF10 - _0224FF00 - 2 ; case 0 + .short _0224FF8A - _0224FF00 - 2 ; case 1 + .short _0224FF9E - _0224FF00 - 2 ; case 2 + .short _0224FFC4 - _0224FF00 - 2 ; case 3 + .short _0224FFD8 - _0224FF00 - 2 ; case 4 + .short _0224FFF2 - _0224FF00 - 2 ; case 5 + .short _0225001C - _0224FF00 - 2 ; case 6 + .short _022500B0 - _0224FF00 - 2 ; case 7 +_0224FF10: + mov r1, #0 + ldr r7, [r4, #0x44] + str r1, [sp, #4] + bl ov16_0223DF1C + cmp r7, r0 + bge _0224FF80 + add r5, r4, #0 + add r5, #0x44 +_0224FF22: + mov r0, #0xc0 + mul r0, r7 + mov r1, #0xb7 + add r0, r4, r0 + lsl r1, r1, #6 + ldr r2, [r0, r1] + ldr r1, _0225013C ; =0x200400C0 + tst r1, r2 + bne _0224FF68 + ldr r1, _02250140 ; =0x00002DC4 + ldr r2, [r0, r1] + ldr r1, _0225013C ; =0x200400C0 + tst r1, r2 + beq _0224FF68 + ldr r1, _02250140 ; =0x00002DC4 + ldr r2, [r0, r1] + ldr r1, _02250144 ; =0xDFFBFF3F + and r2, r1 + ldr r1, _02250140 ; =0x00002DC4 + str r2, [r0, r1] + ldr r2, _02250148 ; =0x0000011F + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0x46 + ldr r1, [r4, #0x44] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp, #4] +_0224FF68: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + ldr r0, [sp, #4] + cmp r0, #0 + bne _0224FFF0 + ldr r7, [r4, #0x44] + add r0, r6, #0 + bl ov16_0223DF1C + cmp r7, r0 + blt _0224FF22 +_0224FF80: + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + mov r0, #0 + str r0, [r4, #0x44] +_0224FF8A: + ldr r0, [r4, #0x40] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x40] + ldr r2, [r4, #8] + add r0, r6, #0 + bl ov16_02257808 + cmp r0, #1 + beq _0224FFF0 +_0224FF9E: + add r0, r6, #0 + add r1, r4, #0 + bl ov16_02256414 + add r2, r0, #0 + beq _0224FFBE + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0224FFBE: + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] +_0224FFC4: + ldr r0, [r4, #0x40] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x40] + ldr r2, [r4, #0x64] + add r0, r6, #0 + bl ov16_022579A4 + cmp r0, #1 + beq _0224FFF0 +_0224FFD8: + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + ldr r2, [r4, #0x6c] + cmp r2, #0xff + beq _0224FFF2 + add r0, r6, #0 + add r1, r4, #0 + bl ov16_022579A4 + cmp r0, #1 + bne _0224FFF2 +_0224FFF0: + b _02250138 +_0224FFF2: + ldr r0, [r4, #0x40] + add r1, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x40] + add r0, r6, #0 + add r2, sp, #0xc + bl ov16_022588BC + cmp r0, #1 + bne _0225001C + ldr r2, [sp, #0xc] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225001C: + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x60 + bne _0225002C + mov r2, #0 + b _02250040 +_0225002C: + ldr r0, _0225014C ; =0x00002160 + ldr r2, [r4, r0] + cmp r2, #0 + bne _02250040 + ldr r0, _02250150 ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02250154 ; =0x000003E2 + ldrb r2, [r1, r0] +_02250040: + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + ldr r3, [r4, #0x6c] + cmp r3, #0xff + beq _022500B0 + mov r0, #0xc0 + add r5, r3, #0 + mul r5, r0 + ldr r0, _02250158 ; =0x00002DAC + add r1, r4, r5 + ldr r1, [r1, r0] + mov r0, #0x20 + tst r1, r0 + beq _022500B0 + ldr r1, _0225015C ; =0x0000216C + lsl r0, r0, #9 + ldr r1, [r4, r1] + tst r0, r1 + bne _022500B0 + ldr r0, [r4, #0x64] + cmp r3, r0 + beq _022500B0 + mov r0, #0x1c + mul r0, r3 + add r7, r4, r0 + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r1, [r7, r0] + cmp r1, #0 + bne _02250086 + add r0, #8 + ldr r0, [r7, r0] + cmp r0, #0 + beq _022500B0 +_02250086: + ldr r0, _02250160 ; =0x00002D8C + add r1, r4, r5 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022500B0 + cmp r2, #0xa + bne _022500B0 + mov r0, #0x46 + lsl r0, r0, #2 + str r3, [r4, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1d + bl ov16_02251E1C + ldr r0, [r4, #8] + add sp, #0x10 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_022500B0: + mov r0, #0 + str r0, [sp] + ldr r7, [r4, #0x44] + add r0, r6, #0 + bl ov16_0223DF1C + cmp r7, r0 + bge _0225011E + add r5, r4, #0 + add r5, #0x44 +_022500C4: + ldr r0, _02250164 ; =0x000021EC + add r1, r4, r7 + ldrb r7, [r1, r0] + add r0, r7, #0 + bl sub_020787CC + ldr r1, _02250168 ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + ldr r0, [r5, #0] + beq _022500E0 + add r0, r0, #1 + str r0, [r5, #0] + b _02250112 +_022500E0: + add r0, r0, #1 + str r0, [r5, #0] + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + add r3, sp, #8 + bl ov16_02258104 + cmp r0, #1 + bne _02250112 + mov r0, #0x46 + lsl r0, r0, #2 + str r7, [r4, r0] + ldr r2, [sp, #8] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + str r0, [sp] + b _0225011E +_02250112: + ldr r7, [r4, #0x44] + add r0, r6, #0 + bl ov16_0223DF1C + cmp r7, r0 + blt _022500C4 +_0225011E: + ldr r0, [sp] + cmp r0, #0 + bne _0225012E + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + mov r0, #0 + str r0, [r4, #0x44] +_0225012E: + mov r0, #0 + str r0, [r4, #0x40] + str r0, [r4, #0x44] + mov r0, #0x1f + str r0, [r4, #8] +_02250138: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225013C: .word 0x200400C0 +_02250140: .word 0x00002DC4 +_02250144: .word 0xDFFBFF3F +_02250148: .word 0x0000011F +_0225014C: .word 0x00002160 +_02250150: .word 0x00003044 +_02250154: .word 0x000003E2 +_02250158: .word 0x00002DAC +_0225015C: .word 0x0000216C +_02250160: .word 0x00002D8C +_02250164: .word 0x000021EC +_02250168: .word 0x00003108 + thumb_func_end ov16_0224FEE4 + + thumb_func_start ov16_0225016C +ov16_0225016C: ; 0x0225016C + bx lr + ; .align 2, 0 + thumb_func_end ov16_0225016C + + thumb_func_start ov16_02250170 +ov16_02250170: ; 0x02250170 + push {r3, r4, r5, r6, r7, lr} + ldr r6, _0225025C ; =0x0000217D + add r4, r1, #0 + ldrb r2, [r4, r6] + str r0, [sp] + cmp r2, #0 + beq _02250256 + ldr r3, [r4, #0x74] + mov ip, r3 + cmp r3, #0xff + bne _02250208 + ldr r3, [r4, #0x64] + mov r7, #0xc0 + add r5, r3, #0 + mul r5, r7 + ldr r3, _02250260 ; =0x00002DAC + add r5, r4, r5 + ldr r5, [r5, r3] + mov r3, #7 + tst r3, r5 + bne _02250208 + add r3, r6, #0 + sub r3, #0x11 + ldr r5, [r4, r3] + mov r3, #1 + lsl r3, r3, #0xe + tst r3, r5 + bne _02250208 + sub r2, r6, #1 + ldrb r2, [r4, r2] + sub r3, r2, #1 + sub r2, r6, #1 + strb r3, [r4, r2] + ldrb r2, [r4, r2] + cmp r2, #0 + beq _022501EE + mov r3, #1 + add r2, r6, #3 + str r3, [r4, r2] + bl ov16_02255F94 + add r1, r6, #0 + sub r1, #0x41 + ldr r2, [r4, r1] + ldr r0, _02250264 ; =0xFFFFBFFF + and r0, r2 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x4c + ldr r0, [r4, r0] + add r1, #0x48 + str r0, [r4, r1] + ldr r2, _02250268 ; =0x00003044 + add r0, r4, #0 + ldr r2, [r4, r2] + mov r1, #0 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x17 + str r0, [r4, #0xc] + b _0225024E +_022501EE: + ldrb r0, [r4, r6] + add r7, #0x70 + mov r1, #1 + str r0, [r4, r7] + add r0, r4, #0 + mov r2, #0x11 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x21 + str r0, [r4, #0xc] + b _0225024E +_02250208: + mov r0, ip + cmp r0, #0xff + bne _02250222 + ldr r0, [r4, #0x64] + mov r1, #0xc0 + add r3, r0, #0 + mul r3, r1 + ldr r0, _02250260 ; =0x00002DAC + add r3, r4, r3 + ldr r3, [r3, r0] + mov r0, #7 + tst r0, r3 + beq _02250232 +_02250222: + ldr r0, _0225026C ; =0x0000217C + ldrb r0, [r4, r0] + sub r0, r2, r0 + add r1, r0, #1 + mov r0, #0x13 + lsl r0, r0, #4 + str r1, [r4, r0] + b _0225023C +_02250232: + ldr r0, _0225026C ; =0x0000217C + add r1, #0x70 + ldrb r0, [r4, r0] + sub r0, r2, r0 + str r0, [r4, r1] +_0225023C: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x11 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x21 + str r0, [r4, #0xc] +_0225024E: + ldr r0, [sp] + bl ov16_02266AA0 + pop {r3, r4, r5, r6, r7, pc} +_02250256: + mov r0, #0x21 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225025C: .word 0x0000217D +_02250260: .word 0x00002DAC +_02250264: .word 0xFFFFBFFF +_02250268: .word 0x00003044 +_0225026C: .word 0x0000217C + thumb_func_end ov16_02250170 + + thumb_func_start ov16_02250270 +ov16_02250270: ; 0x02250270 + push {r3, lr} + ldr r0, _02250294 ; =0x0000213C + ldr r2, [r1, r0] + mov r0, #0xf + lsl r0, r0, #0x18 + tst r0, r2 + beq _0225028C + add r0, r1, #0 + mov r1, #0x21 + add r2, r1, #0 + mov r3, #0 + bl ov16_02250EF4 + pop {r3, pc} +_0225028C: + mov r0, #0x22 + str r0, [r1, #8] + pop {r3, pc} + nop +_02250294: .word 0x0000213C + thumb_func_end ov16_02250270 + + thumb_func_start ov16_02250298 +ov16_02250298: ; 0x02250298 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #0x85 + lsl r1, r1, #6 + add r5, r0, #0 + ldr r2, [r4, r1] + mov r0, #8 + tst r0, r2 + beq _022502BC + mov r0, #8 + bic r2, r0 + str r2, [r4, r1] + ldr r0, [r4, #0x64] + str r0, [r4, #0x6c] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + str r0, [r4, #0x64] +_022502BC: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02250FF4 + ldr r0, _0225041C ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02250420 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #4 + bne _02250388 + ldr r0, _02250424 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #2 + tst r0, r1 + bne _02250388 + add r0, r5, #0 + bl ov16_0223DF1C + ldr r1, _02250428 ; =0x0000217E + ldrb r2, [r4, r1] + cmp r2, r0 + bge _02250388 + mov r2, #0xd + add r0, r1, #6 + str r2, [r4, r0] + add r0, r5, #0 + bl ov16_0223DF1C + ldr r1, [r4, #0x64] + add r0, r5, #0 + bl ov16_0223DF14 + bl ov16_02263AE4 + mov r1, #1 + add r7, r0, #0 + and r7, r1 +_0225030A: + ldr r1, _02250428 ; =0x0000217E + ldr r0, _02250428 ; =0x0000217E + ldrb r1, [r4, r1] + ldrb r0, [r4, r0] + add r2, r1, #1 + ldr r1, _02250428 ; =0x0000217E + strb r2, [r4, r1] + add r1, r4, r0 + ldr r0, _0225042C ; =0x000021EC + ldrb r6, [r1, r0] + add r0, r6, #0 + bl sub_020787CC + ldr r1, _02250430 ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + bne _02250372 + mov r0, #0xc0 + mul r0, r6 + add r1, r4, r0 + ldr r0, _02250434 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02250372 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223DF14 + str r0, [sp] + cmp r7, #0 + beq _02250352 + bl ov16_02263AE4 + mov r1, #1 + tst r0, r1 + beq _02250362 +_02250352: + cmp r7, #0 + bne _02250372 + ldr r0, [sp] + bl ov16_02263AE4 + mov r1, #1 + tst r0, r1 + beq _02250372 +_02250362: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255F94 + str r6, [r4, #0x6c] + mov r0, #0x16 + str r0, [r4, #8] + b _02250380 +_02250372: + add r0, r5, #0 + bl ov16_0223DF1C + ldr r1, _02250428 ; =0x0000217E + ldrb r1, [r4, r1] + cmp r1, r0 + blt _0225030A +_02250380: + add r0, r5, #0 + bl ov16_02266AA0 + pop {r3, r4, r5, r6, r7, pc} +_02250388: + ldr r0, _0225041C ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02250420 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #8 + bne _02250416 + ldr r0, _02250424 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #2 + tst r0, r1 + bne _02250416 + add r0, r5, #0 + bl ov16_0223DF1C + ldr r1, _02250428 ; =0x0000217E + ldrb r2, [r4, r1] + cmp r2, r0 + bge _02250416 + mov r2, #0xd + add r0, r1, #6 + str r2, [r4, r0] + add r0, r5, #0 + bl ov16_0223DF1C + ldr r7, _02250428 ; =0x0000217E +_022503BE: + ldr r0, _02250428 ; =0x0000217E + ldrb r1, [r4, r0] + ldrb r0, [r4, r7] + add r1, r4, r1 + add r0, r0, #1 + strb r0, [r4, r7] + ldr r0, _0225042C ; =0x000021EC + ldrb r6, [r1, r0] + add r0, r6, #0 + bl sub_020787CC + ldr r1, _02250430 ; =0x00003108 + ldrb r1, [r4, r1] + tst r0, r1 + bne _02250400 + mov r0, #0xc0 + mul r0, r6 + add r1, r4, r0 + ldr r0, _02250434 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02250400 + ldr r0, [r4, #0x64] + cmp r6, r0 + beq _02250400 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255F94 + str r6, [r4, #0x6c] + mov r0, #0x16 + str r0, [r4, #8] + b _0225040E +_02250400: + add r0, r5, #0 + bl ov16_0223DF1C + ldr r1, _02250428 ; =0x0000217E + ldrb r1, [r4, r1] + cmp r1, r0 + blt _022503BE +_0225040E: + add r0, r5, #0 + bl ov16_02266AA0 + pop {r3, r4, r5, r6, r7, pc} +_02250416: + mov r0, #0x23 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225041C: .word 0x00003044 +_02250420: .word 0x000003E6 +_02250424: .word 0x0000213C +_02250428: .word 0x0000217E +_0225042C: .word 0x000021EC +_02250430: .word 0x00003108 +_02250434: .word 0x00002D8C + thumb_func_end ov16_02250298 + + thumb_func_start ov16_02250438 +ov16_02250438: ; 0x02250438 + push {r4, lr} + ldr r0, _02250474 ; =0x0000213C + add r4, r1, #0 + ldr r1, [r4, r0] + mov r0, #0xf + lsl r0, r0, #0x1c + and r0, r1 + beq _0225046E + lsr r0, r0, #0x1c + bl sub_020787EC + str r0, [r4, #0x74] + ldr r1, _02250474 ; =0x0000213C + ldr r0, _02250478 ; =0x0FFFFFFF + ldr r2, [r4, r1] + and r0, r2 + str r0, [r4, r1] + ldr r2, _0225047C ; =0x00000115 + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x24 + str r0, [r4, #0xc] + pop {r4, pc} +_0225046E: + mov r0, #0x24 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_02250474: .word 0x0000213C +_02250478: .word 0x0FFFFFFF +_0225047C: .word 0x00000115 + thumb_func_end ov16_02250438 + + thumb_func_start ov16_02250480 +ov16_02250480: ; 0x02250480 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225143C + cmp r0, #1 + beq _02250490 + mov r0, #0x26 + str r0, [r4, #8] +_02250490: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02250480 + + thumb_func_start ov16_02250494 +ov16_02250494: ; 0x02250494 + bx lr + ; .align 2, 0 + thumb_func_end ov16_02250494 + + thumb_func_start ov16_02250498 +ov16_02250498: ; 0x02250498 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0x64] + add r5, r0, #0 + add r0, r4, #0 + bl ov16_02258AB8 + ldr r1, _022505AC ; =0x0000213C + lsl r0, r0, #0x18 + ldr r3, [r4, r1] + mov r2, #0x20 + lsr r0, r0, #0x18 + tst r2, r3 + bne _022504BE + add r1, r1, #4 + ldr r2, [r4, r1] + mov r1, #4 + tst r1, r2 + beq _02250512 +_022504BE: + cmp r0, #0x37 + beq _022504CA + cmp r0, #0x73 + beq _022504CA + cmp r0, #0x7d + bne _02250504 +_022504CA: + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #0xa5 + beq _02250512 + ldr r1, _022505B0 ; =0x00000171 + cmp r0, r1 + bne _022504E6 + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r4, r1] + mov r1, #0x10 + tst r1, r2 + bne _02250512 +_022504E6: + cmp r0, #0xe2 + bne _022504F6 + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r4, r1] + mov r1, #0x40 + tst r1, r2 + bne _02250512 +_022504F6: + ldr r2, [r4, #0x64] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _022505B4 ; =0x00002DF8 + strh r0, [r2, r1] + b _02250512 +_02250504: + ldr r2, [r4, #0x64] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _022505B4 ; =0x00002DF8 + mov r0, #0 + strh r0, [r2, r1] +_02250512: + ldr r0, _022505AC ; =0x0000213C + mov r1, #1 + ldr r2, [r4, r0] + lsl r1, r1, #0x14 + tst r1, r2 + bne _0225057A + add r0, r0, #4 + ldr r1, [r4, r0] + mov r0, #4 + tst r0, r1 + beq _02250540 + ldr r2, [r4, #0x64] + ldr r1, _022505B8 ; =0x00003044 + lsl r2, r2, #1 + add r3, r4, r2 + add r2, r1, #0 + ldr r0, [r4, r1] + add r2, #0x18 + strh r0, [r3, r2] + sub r0, r1, #4 + ldr r2, [r4, r0] + add r0, r1, #4 + b _0225054E +_02250540: + ldr r0, [r4, #0x64] + mov r2, #0 + lsl r0, r0, #1 + add r1, r4, r0 + ldr r0, _022505BC ; =0x0000305C + strh r2, [r1, r0] + sub r0, #0x14 +_0225054E: + str r2, [r4, r0] + mov r0, #0x85 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x40 + tst r0, r1 + beq _0225056E + mov r0, #0xc1 + ldr r1, [r4, #0x64] + lsl r0, r0, #6 + ldr r2, [r4, r0] + lsl r1, r1, #1 + add r1, r4, r1 + add r0, #0x3c + strh r2, [r1, r0] + b _0225057A +_0225056E: + ldr r0, [r4, #0x64] + mov r2, #0 + lsl r0, r0, #1 + add r1, r4, r0 + ldr r0, _022505C0 ; =0x0000307C + strh r2, [r1, r0] +_0225057A: + mov r0, #0x85 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #4 + tst r0, r1 + beq _02250596 + mov r0, #0xc1 + ldr r1, [r4, #0x64] + lsl r0, r0, #6 + ldr r2, [r4, r0] + lsl r1, r1, #1 + add r1, r4, r1 + add r0, #0x6c + strh r2, [r1, r0] +_02250596: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02250FF4 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225991C + mov r0, #0x27 + str r0, [r4, #8] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022505AC: .word 0x0000213C +_022505B0: .word 0x00000171 +_022505B4: .word 0x00002DF8 +_022505B8: .word 0x00003044 +_022505BC: .word 0x0000305C +_022505C0: .word 0x0000307C + thumb_func_end ov16_02250498 + + thumb_func_start ov16_022505C4 +ov16_022505C4: ; 0x022505C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + bne _02250646 + ldr r2, [r4, #0x64] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #0 + bl ov16_02257628 + cmp r0, #1 + beq _0225069C + ldr r2, [r4, #0x6c] + cmp r2, #0xff + beq _022505FA + add r0, r5, #0 + add r1, r4, #0 + mov r3, #0 + bl ov16_02257628 + cmp r0, #1 + beq _0225069C +_022505FA: + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r1, #0 + bl ov16_02250F98 + cmp r0, #1 + beq _0225069C + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02250A48 + cmp r0, #1 + beq _0225069C + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02256414 + add r2, r0, #0 + beq _02250632 + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_02250632: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_022513B0 + cmp r0, #1 + beq _0225069C + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02250E8C +_02250646: + add r1, r4, #0 + add r1, #0xec + ldr r1, [r1, #0] + mov r0, #0x27 + add r2, r4, r1 + ldr r1, _022506A0 ; =0x000021E8 + ldrb r2, [r2, r1] + sub r1, #0x40 + lsl r2, r2, #4 + add r2, r4, r2 + str r0, [r2, r1] + ldr r1, [r4, #0x64] + mov r0, #0x1c + mul r0, r1 + add r1, r4, r0 + mov r0, #0xb5 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1f + beq _02250684 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225B148 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255FBC + mov r1, #0 + b _0225068C +_02250684: + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + add r1, r0, #1 +_0225068C: + add r0, r4, #0 + add r0, #0xec + str r1, [r0, #0] + add r0, r4, #0 + bl ov16_022541C4 + mov r0, #8 + str r0, [r4, #8] +_0225069C: + pop {r3, r4, r5, pc} + nop +_022506A0: .word 0x000021E8 + thumb_func_end ov16_022505C4 + + thumb_func_start ov16_022506A4 +ov16_022506A4: ; 0x022506A4 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #1 + bl ov16_02250EF4 + cmp r0, #1 + beq _022506BC + mov r0, #0x27 + str r0, [r4, #8] +_022506BC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_022506A4 + + thumb_func_start ov16_022506C0 +ov16_022506C0: ; 0x022506C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223F438 + mov r1, #0x80 + tst r0, r1 + beq _022506D6 + mov r0, #0x2b + str r0, [r4, #8] + b _0225073E +_022506D6: + add r0, r5, #0 + bl ov16_0223F438 + cmp r0, #2 + beq _022506EA + add r0, r5, #0 + bl ov16_0223F438 + cmp r0, #3 + bne _022506FE +_022506EA: + add r0, r4, #0 + mov r1, #1 + mov r2, #5 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x2b + str r0, [r4, #0xc] + b _0225073E +_022506FE: + add r0, r5, #0 + bl ov16_0223F438 + cmp r0, #1 + bne _0225071C + add r0, r4, #0 + mov r1, #1 + mov r2, #4 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x2b + str r0, [r4, #0xc] + b _0225073E +_0225071C: + add r0, r5, #0 + bl ov16_0223F438 + cmp r0, #4 + bne _02250730 + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #0x2b + str r0, [r4, #0xc] + b _0225073E +_02250730: + add r0, r5, #0 + bl ov16_0223F438 + cmp r0, #5 + bne _0225073E + mov r0, #0x2b + str r0, [r4, #8] +_0225073E: + ldr r0, _02250748 ; =0x0000311F + mov r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} + nop +_02250748: .word 0x0000311F + thumb_func_end ov16_022506C0 + + thumb_func_start ov16_0225074C +ov16_0225074C: ; 0x0225074C + push {r4, lr} + add r4, r1, #0 + bl sub_0200F2AC + cmp r0, #1 + bne _0225075C + mov r0, #0x2b + str r0, [r4, #8] +_0225075C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0225074C + + thumb_func_start ov16_02250760 +ov16_02250760: ; 0x02250760 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + bl ov16_0223DF0C + mov r1, #4 + add r4, r0, #0 + and r4, r1 + bne _02250786 + add r0, r6, #0 + mov r1, #0 + bl ov16_0223DF20 + add r6, r0, #0 + bl sub_020776B0 + add r0, r6, #0 + bl sub_0207782C +_02250786: + cmp r4, #0 + beq _02250790 + mov r0, #0x16 + bl sub_020360DC +_02250790: + mov r0, #0x2c + str r0, [r5, #8] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02250760 + + thumb_func_start ov16_02250798 +ov16_02250798: ; 0x02250798 + bx lr + ; .align 2, 0 + thumb_func_end ov16_02250798 + + thumb_func_start ov16_0225079C +ov16_0225079C: ; 0x0225079C + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r1, [sp, #4] + mov r1, #0 + str r0, [sp] + str r1, [sp, #0x30] + bl ov16_0223DF1C + str r0, [sp, #0x28] + ldr r0, [sp] + bl ov16_0223DF0C + str r0, [sp, #0x24] + ldr r0, [sp, #4] + ldr r0, [r0, #8] + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + cmp r0, #0 + bgt _022507C8 + b _022509BA +_022507C8: + ldr r0, [sp, #4] + mov r1, #2 + str r0, [sp, #0x1c] + str r0, [sp, #0x18] + ldr r0, [sp, #0x24] + and r0, r1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + mov r1, #0x18 + and r0, r1 + str r0, [sp, #0x10] + ldr r0, [sp, #0x24] + mov r1, #0x10 + and r0, r1 + str r0, [sp, #0xc] +_022507E6: + mov r1, #0x4f + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r0, #1 + bic r2, r0 + ldr r0, [sp, #0x1c] + str r2, [r0, r1] + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02250802 + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02250814 +_02250802: + ldr r0, [sp, #0xc] + cmp r0, #0 + beq _022508FA + ldr r0, [sp] + ldr r1, [sp, #0x2c] + bl ov16_0223E208 + cmp r0, #0 + bne _022508FA +_02250814: + ldr r3, _02250A38 ; =0x00002D8C + ldr r0, [sp, #0x18] + ldr r0, [r0, r3] + cmp r0, #0 + bne _0225083C + ldr r1, [sp, #0x2c] + mov r2, #2 + add r4, r1, #0 + eor r4, r2 + mov r1, #0xc0 + add r5, r4, #0 + mul r5, r1 + ldr r1, [sp, #4] + add r1, r1, r5 + ldr r1, [r1, r3] + cmp r1, #0 + bne _0225083C + ldr r1, [sp, #0x2c] + tst r1, r2 + bne _02250840 +_0225083C: + cmp r0, #0 + beq _02250842 +_02250840: + b _022509A0 +_02250842: + ldr r0, [sp] + ldr r1, [sp, #0x2c] + mov r7, #0 + bl ov16_0223DF20 + add r6, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x2c] + bl ov16_0223DF14 + add r0, r6, #0 + add r5, r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _022508BA + ldr r0, [sp, #0x2c] + mov r1, #2 + eor r1, r0 + ldr r0, [sp, #4] + add r0, r0, r1 + str r0, [sp, #8] +_0225086E: + add r0, r6, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _022508AE + add r0, r4, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02250A3C ; =0x000001EE + cmp r0, r1 + beq _022508AE + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _022508AE + ldr r2, [sp, #8] + ldr r1, _02250A40 ; =0x0000219C + ldrb r1, [r2, r1] + cmp r5, r1 + beq _022508AE + add r7, r7, r0 +_022508AE: + add r0, r6, #0 + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0225086E +_022508BA: + cmp r7, #0 + bne _022508DE + ldr r0, [sp, #0x2c] + bl sub_020787CC + ldr r2, _02250A44 ; =0x00003108 + ldr r1, [sp, #4] + ldrb r1, [r1, r2] + orr r1, r0 + ldr r0, [sp, #4] + strb r1, [r0, r2] + add r1, r0, #0 + ldr r0, [sp, #0x2c] + mov r2, #6 + add r1, r1, r0 + ldr r0, _02250A40 ; =0x0000219C + strb r2, [r1, r0] + b _022509A0 +_022508DE: + ldr r1, [sp, #0x20] + ldr r0, [sp, #4] + str r1, [r0, #0xc] + mov r1, #0x15 + str r1, [r0, #8] + mov r1, #0x4f + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r0, #1 + orr r2, r0 + ldr r0, [sp, #0x1c] + str r2, [r0, r1] + b _022509A0 +_022508FA: + ldr r1, _02250A38 ; =0x00002D8C + ldr r0, [sp, #0x18] + ldr r0, [r0, r1] + cmp r0, #0 + bne _022509A0 + ldr r0, [sp] + ldr r1, [sp, #0x2c] + mov r7, #0 + bl ov16_0223DF20 + add r6, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x2c] + bl ov16_0223DF14 + add r0, r6, #0 + add r5, r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02250962 +_02250924: + add r0, r6, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02250956 + add r0, r4, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02250A3C ; =0x000001EE + cmp r0, r1 + beq _02250956 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r7, r7, r0 +_02250956: + add r0, r6, #0 + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _02250924 +_02250962: + cmp r7, #0 + bne _02250986 + ldr r0, [sp, #0x2c] + bl sub_020787CC + ldr r2, _02250A44 ; =0x00003108 + ldr r1, [sp, #4] + ldrb r1, [r1, r2] + orr r1, r0 + ldr r0, [sp, #4] + strb r1, [r0, r2] + add r1, r0, #0 + ldr r0, [sp, #0x2c] + mov r2, #6 + add r1, r1, r0 + ldr r0, _02250A40 ; =0x0000219C + strb r2, [r1, r0] + b _022509A0 +_02250986: + ldr r1, [sp, #0x20] + ldr r0, [sp, #4] + str r1, [r0, #0xc] + mov r1, #0x15 + str r1, [r0, #8] + mov r1, #0x4f + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r0, #1 + orr r2, r0 + ldr r0, [sp, #0x1c] + str r2, [r0, r1] +_022509A0: + ldr r0, [sp, #0x1c] + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, #0xc0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x2c] + add r1, r0, #1 + ldr r0, [sp, #0x28] + str r1, [sp, #0x2c] + cmp r1, r0 + bge _022509BA + b _022507E6 +_022509BA: + ldr r0, [sp, #4] + ldr r0, [r0, #8] + cmp r0, #0x15 + bne _02250A30 + ldr r0, [sp, #0x24] + mov r1, #0x86 + tst r0, r1 + bne _02250A22 + ldr r0, [sp] + bl ov16_0223EE18 + cmp r0, #0 + bne _02250A22 + mov r1, #0x4f + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r2, #1 + tst r0, r2 + beq _022509EC + ldr r0, [sp, #4] + add r1, r1, #4 + ldr r0, [r0, r1] + tst r0, r2 + bne _02250A22 +_022509EC: + ldr r0, [sp] + ldr r1, [sp, #4] + mov r2, #0 + bl ov16_02255B10 + cmp r0, #0 + beq _02250A22 + mov r1, #0x4f + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r2, #1 + tst r0, r2 + beq _02250A10 + mov r2, #0 + sub r1, r1, #4 + ldr r0, [sp, #4] + b _02250A14 +_02250A10: + ldr r0, [sp, #4] + sub r1, r1, #4 +_02250A14: + str r2, [r0, r1] + ldr r0, [sp, #4] + mov r1, #1 + mov r2, #0xe7 + bl ov16_02251E1C + b _02250A2C +_02250A22: + ldr r0, [sp, #4] + mov r1, #1 + mov r2, #0xa + bl ov16_02251E1C +_02250A2C: + mov r0, #1 + str r0, [sp, #0x30] +_02250A30: + ldr r0, [sp, #0x30] + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_02250A38: .word 0x00002D8C +_02250A3C: .word 0x000001EE +_02250A40: .word 0x0000219C +_02250A44: .word 0x00003108 + thumb_func_end ov16_0225079C + + thumb_func_start ov16_02250A48 +ov16_02250A48: ; 0x02250A48 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + str r0, [sp] + str r1, [sp, #4] + bl ov16_0223DF1C + str r0, [sp, #0x24] + ldr r0, [sp] + bl ov16_0223DF0C + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x1c] + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + cmp r0, #0 + bgt _02250A6C + b _02250CC6 +_02250A6C: + ldr r0, [sp, #0x20] + mov r1, #8 + and r0, r1 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + mov r1, #0x10 + and r0, r1 + str r0, [sp, #8] +_02250A7C: + ldr r0, [sp, #0x20] + sub r0, #0x4a + cmp r0, #1 + bhi _02250B16 + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223E208 + cmp r0, #0 + bne _02250B16 + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223E1F8 + cmp r0, #2 + bne _02250B38 + ldr r1, _02250D94 ; =0x00002D8C + ldr r0, [sp, #4] + ldr r0, [r0, r1] + cmp r0, #0 + bne _02250B38 + ldr r0, [sp] + ldr r1, [sp, #0x28] + mov r7, #0 + bl ov16_0223DF20 + add r6, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223DF14 + add r0, r6, #0 + add r4, r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02250B04 +_02250AC6: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r5, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02250AF8 + add r0, r5, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02250D98 ; =0x000001EE + cmp r0, r1 + beq _02250AF8 + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r7, r7, r0 +_02250AF8: + add r0, r6, #0 + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _02250AC6 +_02250B04: + cmp r7, #0 + bne _02250B38 + ldr r0, [sp, #0x1c] + mov r1, #2 + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + b _02250CB2 +_02250B16: + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _02250B2E + ldr r0, [sp, #8] + cmp r0, #0 + beq _02250C20 + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223E208 + cmp r0, #0 + beq _02250C20 +_02250B2E: + ldr r1, _02250D94 ; =0x00002D8C + ldr r0, [sp, #4] + ldr r0, [r0, r1] + cmp r0, #0 + beq _02250B3A +_02250B38: + b _02250CB2 +_02250B3A: + ldr r0, [sp] + ldr r1, [sp, #0x28] + mov r4, #0 + bl ov16_0223DF20 + add r7, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223E258 + add r1, r0, #0 + ldr r0, [sp] + bl ov16_0223DF20 + str r0, [sp, #0x18] + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223DF14 + str r0, [sp, #0x14] + add r0, r7, #0 + add r5, r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02250BAC +_02250B6E: + add r0, r7, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02250BA0 + add r0, r6, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02250D98 ; =0x000001EE + cmp r0, r1 + beq _02250BA0 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r4, r4, r0 +_02250BA0: + add r0, r7, #0 + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _02250B6E +_02250BAC: + ldr r0, [sp, #0x18] + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02250BF6 + ldr r7, _02250D98 ; =0x000001EE +_02250BBA: + ldr r0, [sp, #0x18] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02250BEA + add r0, r6, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + cmp r0, r7 + beq _02250BEA + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r4, r4, r0 +_02250BEA: + ldr r0, [sp, #0x18] + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _02250BBA +_02250BF6: + cmp r4, #0 + bne _02250CB2 + ldr r0, [sp, #0x14] + bl ov16_02263AE4 + mov r1, #1 + tst r0, r1 + beq _02250C12 + ldr r0, [sp, #0x1c] + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + b _02250CB2 +_02250C12: + ldr r0, [sp, #0x1c] + mov r1, #2 + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + b _02250CB2 +_02250C20: + ldr r1, _02250D94 ; =0x00002D8C + ldr r0, [sp, #4] + ldr r0, [r0, r1] + cmp r0, #0 + bne _02250CB2 + ldr r0, [sp] + ldr r1, [sp, #0x28] + mov r7, #0 + bl ov16_0223DF20 + add r6, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x28] + bl ov16_0223DF14 + str r0, [sp, #0x10] + add r0, r6, #0 + add r4, r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02250C8A +_02250C4C: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r5, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02250C7E + add r0, r5, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _02250D98 ; =0x000001EE + cmp r0, r1 + beq _02250C7E + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r7, r7, r0 +_02250C7E: + add r0, r6, #0 + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _02250C4C +_02250C8A: + cmp r7, #0 + bne _02250CB2 + ldr r0, [sp, #0x10] + bl ov16_02263AE4 + mov r1, #1 + tst r0, r1 + beq _02250CA6 + ldr r0, [sp, #0x1c] + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + b _02250CB2 +_02250CA6: + ldr r0, [sp, #0x1c] + mov r1, #2 + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] +_02250CB2: + ldr r0, [sp, #4] + add r0, #0xc0 + str r0, [sp, #4] + ldr r0, [sp, #0x28] + add r1, r0, #1 + ldr r0, [sp, #0x24] + str r1, [sp, #0x28] + cmp r1, r0 + bge _02250CC6 + b _02250A7C +_02250CC6: + ldr r0, [sp, #0x1c] + cmp r0, #1 + bne _02250CDC + ldr r0, [sp, #0x20] + mov r1, #1 + tst r0, r1 + beq _02250CDC + ldr r0, [sp, #0x20] + mov r1, #4 + tst r0, r1 + beq _02250CF2 +_02250CDC: + ldr r0, [sp, #0x1c] + cmp r0, #1 + bne _02250DC4 + ldr r0, [sp, #0x20] + mov r1, #0x80 + tst r0, r1 + beq _02250DC4 + ldr r0, [sp, #0x20] + mov r1, #4 + tst r0, r1 + bne _02250DC4 +_02250CF2: + ldr r0, [sp] + mov r1, #1 + bl ov16_0223E120 + ldrb r0, [r0, #1] + sub r0, #0x3e + cmp r0, #0x28 + bhi _02250D90 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02250D0E: ; jump table + .short _02250D60 - _02250D0E - 2 ; case 0 + .short _02250D90 - _02250D0E - 2 ; case 1 + .short _02250D60 - _02250D0E - 2 ; case 2 + .short _02250D88 - _02250D0E - 2 ; case 3 + .short _02250D88 - _02250D0E - 2 ; case 4 + .short _02250D88 - _02250D0E - 2 ; case 5 + .short _02250D88 - _02250D0E - 2 ; case 6 + .short _02250D70 - _02250D0E - 2 ; case 7 + .short _02250D90 - _02250D0E - 2 ; case 8 + .short _02250D90 - _02250D0E - 2 ; case 9 + .short _02250D78 - _02250D0E - 2 ; case 10 + .short _02250D78 - _02250D0E - 2 ; case 11 + .short _02250D60 - _02250D0E - 2 ; case 12 + .short _02250D60 - _02250D0E - 2 ; case 13 + .short _02250D60 - _02250D0E - 2 ; case 14 + .short _02250D60 - _02250D0E - 2 ; case 15 + .short _02250D60 - _02250D0E - 2 ; case 16 + .short _02250D60 - _02250D0E - 2 ; case 17 + .short _02250D90 - _02250D0E - 2 ; case 18 + .short _02250D90 - _02250D0E - 2 ; case 19 + .short _02250D90 - _02250D0E - 2 ; case 20 + .short _02250D90 - _02250D0E - 2 ; case 21 + .short _02250D90 - _02250D0E - 2 ; case 22 + .short _02250D90 - _02250D0E - 2 ; case 23 + .short _02250D80 - _02250D0E - 2 ; case 24 + .short _02250D78 - _02250D0E - 2 ; case 25 + .short _02250D78 - _02250D0E - 2 ; case 26 + .short _02250D78 - _02250D0E - 2 ; case 27 + .short _02250D90 - _02250D0E - 2 ; case 28 + .short _02250D90 - _02250D0E - 2 ; case 29 + .short _02250D90 - _02250D0E - 2 ; case 30 + .short _02250D90 - _02250D0E - 2 ; case 31 + .short _02250D90 - _02250D0E - 2 ; case 32 + .short _02250D90 - _02250D0E - 2 ; case 33 + .short _02250D90 - _02250D0E - 2 ; case 34 + .short _02250D68 - _02250D0E - 2 ; case 35 + .short _02250D90 - _02250D0E - 2 ; case 36 + .short _02250D68 - _02250D0E - 2 ; case 37 + .short _02250D68 - _02250D0E - 2 ; case 38 + .short _02250D68 - _02250D0E - 2 ; case 39 + .short _02250D68 - _02250D0E - 2 ; case 40 +_02250D60: + ldr r0, _02250D9C ; =0x00000469 + bl sub_0200549C + b _02250DBC +_02250D68: + ldr r0, _02250DA0 ; =0x000004B3 + bl sub_0200549C + b _02250DBC +_02250D70: + ldr r0, _02250DA4 ; =0x0000046A + bl sub_0200549C + b _02250DBC +_02250D78: + ldr r0, _02250DA8 ; =0x0000046B + bl sub_0200549C + b _02250DBC +_02250D80: + ldr r0, _02250DAC ; =0x0000046C + bl sub_0200549C + b _02250DBC +_02250D88: + ldr r0, _02250DB0 ; =0x0000046D + bl sub_0200549C + b _02250DBC +_02250D90: + ldr r0, _02250DB4 ; =0x00000468 + b _02250DB8 + ; .align 2, 0 +_02250D94: .word 0x00002D8C +_02250D98: .word 0x000001EE +_02250D9C: .word 0x00000469 +_02250DA0: .word 0x000004B3 +_02250DA4: .word 0x0000046A +_02250DA8: .word 0x0000046B +_02250DAC: .word 0x0000046C +_02250DB0: .word 0x0000046D +_02250DB4: .word 0x00000468 +_02250DB8: + bl sub_0200549C +_02250DBC: + ldr r0, [sp] + mov r1, #2 + bl ov16_0223F460 +_02250DC4: + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _02250DD2 + ldr r0, [sp] + ldr r1, [sp, #0x1c] + bl ov16_0223F444 +_02250DD2: + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _02250DDE + add sp, #0x2c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02250DDE: + mov r0, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_02250A48 + + thumb_func_start ov16_02250DE4 +ov16_02250DE4: ; 0x02250DE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + add r5, r1, #0 + ldr r0, _02250E7C ; =0x00002D4C + add r6, r2, #0 + mov r1, #0xc0 + add r0, r5, r0 + mul r1, r6 + add r0, r0, r1 + str r0, [sp, #8] + ldr r0, [sp, #0x2c] + ldr r1, [sp, #8] + lsl r0, r0, #1 + ldrh r1, [r1, r0] + str r3, [sp, #4] + ldr r4, [sp, #0x28] + ldr r7, [sp, #0x30] + str r0, [sp, #0xc] + cmp r1, #0xae + bne _02250E1E + add r0, r5, #0 + bl ov16_02255950 + cmp r0, #0 + bne _02250E1E + mov r0, #0x10 + str r0, [r4, #0] + b _02250E2E +_02250E1E: + ldr r1, [sp, #8] + ldr r0, [sp, #0xc] + ldrh r0, [r1, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02250E80 ; =0x000003E6 + ldrh r0, [r1, r0] + str r0, [r4, #0] +_02250E2E: + ldr r0, [sp, #4] + mov r1, #2 + tst r0, r1 + beq _02250E64 + ldr r0, [r4, #0] + add r1, #0xfe + cmp r0, r1 + bne _02250E5E + ldr r0, [sp] + add r1, r6, #0 + bl ov16_0223E258 + bl sub_020787CC + ldr r1, _02250E84 ; =0x00003108 + ldrb r1, [r5, r1] + tst r0, r1 + bne _02250E58 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02250E58: + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02250E5E: + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02250E64: + ldr r1, [r4, #0] + ldr r0, _02250E88 ; =0x00000251 + tst r0, r1 + beq _02250E70 + str r6, [r7, #0] + b _02250E76 +_02250E70: + mov r0, #1 + eor r0, r6 + str r0, [r7, #0] +_02250E76: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02250E7C: .word 0x00002D4C +_02250E80: .word 0x000003E6 +_02250E84: .word 0x00003108 +_02250E88: .word 0x00000251 + thumb_func_end ov16_02250DE4 + + thumb_func_start ov16_02250E8C +ov16_02250E8C: ; 0x02250E8C + push {r3, r4, r5, r6, r7, lr} + str r1, [sp] + bl ov16_0223DF1C + add r4, r0, #0 + mov r3, #0 + cmp r4, #0 + ble _02250EC6 + ldr r5, [sp] + add r7, r3, #0 + add r6, r5, #0 +_02250EA2: + ldr r0, _02250EE8 ; =0x00002DB0 + add r3, r3, #1 + ldr r2, [r6, r0] + ldr r0, _02250EEC ; =0x0000218C + ldr r1, [r5, r0] + mov r0, #0 + mvn r0, r0 + eor r0, r1 + add r1, r2, #0 + and r1, r0 + ldr r0, _02250EE8 ; =0x00002DB0 + str r1, [r6, r0] + ldr r0, _02250EEC ; =0x0000218C + add r6, #0xc0 + str r7, [r5, r0] + add r5, r5, #4 + cmp r3, r4 + blt _02250EA2 +_02250EC6: + ldr r1, [sp] + mov r0, #0 + ldr r1, [r1, #0x64] + lsl r2, r1, #1 + ldr r1, [sp] + add r1, r1, r2 + ldr r2, _02250EF0 ; =0x00003064 + strh r0, [r1, r2] + ldr r1, [sp] + add r2, #0x60 + ldr r1, [r1, #0x64] + lsl r3, r1, #1 + ldr r1, [sp] + add r1, r1, r3 + strh r0, [r1, r2] + pop {r3, r4, r5, r6, r7, pc} + nop +_02250EE8: .word 0x00002DB0 +_02250EEC: .word 0x0000218C +_02250EF0: .word 0x00003064 + thumb_func_end ov16_02250E8C + + thumb_func_start ov16_02250EF4 +ov16_02250EF4: ; 0x02250EF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _02250F8C ; =0x000021EC + str r1, [sp] + ldrb r0, [r5, r0] + add r6, r2, #0 + str r3, [sp, #4] + mov r4, #0 + bl sub_020787CC + ldr r1, _02250F90 ; =0x0000213C + lsl r0, r0, #0x18 + ldr r2, [r5, r1] + mov r1, #0xf + lsl r1, r1, #0x18 + tst r1, r2 + beq _02250F82 + add r1, r2, #0 + tst r1, r0 + bne _02250F36 + ldr r7, _02250F8C ; =0x000021EC + add r6, r7, #0 + sub r6, #0xb0 +_02250F24: + add r4, r4, #1 + add r0, r5, r4 + ldrb r0, [r0, r7] + bl sub_020787CC + ldr r1, [r5, r6] + lsl r0, r0, #0x18 + tst r1, r0 + beq _02250F24 +_02250F36: + ldr r2, _02250F90 ; =0x0000213C + mov r1, #0 + mvn r1, r1 + eor r1, r0 + ldr r3, [r5, r2] + asr r0, r0, #0x18 + and r1, r3 + str r1, [r5, r2] + bl sub_020787EC + str r0, [r5, #0x74] + ldr r0, [sp, #4] + cmp r0, #1 + bne _02250F5E + add r0, r5, #0 + mov r1, #1 + mov r2, #6 + bl ov16_02251E1C + b _02250F68 +_02250F5E: + add r0, r5, #0 + mov r1, #1 + mov r2, #0x53 + bl ov16_02251E1C +_02250F68: + mov r0, #0x15 + str r0, [r5, #8] + ldr r0, [sp] + mov r2, #0x27 + str r0, [r5, #0xc] + ldr r0, [r5, #0x74] + add sp, #8 + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02250F94 ; =0x000021A8 + str r2, [r1, r0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02250F82: + str r6, [r5, #8] + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02250F8C: .word 0x000021EC +_02250F90: .word 0x0000213C +_02250F94: .word 0x000021A8 + thumb_func_end ov16_02250EF4 + + thumb_func_start ov16_02250F98 +ov16_02250F98: ; 0x02250F98 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x85 + lsl r0, r0, #6 + add r4, r1, #0 + ldr r1, [r5, r0] + mov r0, #0xf + lsl r0, r0, #0x1c + tst r0, r1 + beq _02250FEC + mov r0, #1 + lsl r0, r0, #0x1c + add r2, r1, #0 + tst r2, r0 + bne _02250FBE +_02250FB6: + lsl r0, r0, #1 + add r2, r1, #0 + tst r2, r0 + beq _02250FB6 +_02250FBE: + mov r2, #0x85 + lsl r2, r2, #6 + mov r1, #0 + mvn r1, r1 + eor r1, r0 + ldr r3, [r5, r2] + asr r0, r0, #0x1c + and r1, r3 + str r1, [r5, r2] + bl sub_020787EC + mov r2, #0x45 + str r0, [r5, #0x74] + add r0, r5, #0 + mov r1, #1 + lsl r2, r2, #2 + bl ov16_02251E1C + mov r0, #0x15 + str r0, [r5, #8] + str r4, [r5, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} +_02250FEC: + str r2, [r5, #8] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02250F98 + + thumb_func_start ov16_02250FF4 +ov16_02250FF4: ; 0x02250FF4 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x60 + bne _02251008 + mov r4, #0 + b _0225101C +_02251008: + ldr r0, _022511D4 ; =0x00002160 + ldr r4, [r5, r0] + cmp r4, #0 + bne _0225101C + ldr r0, _022511D8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022511DC ; =0x000003E2 + ldrb r4, [r1, r0] +_0225101C: + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r2, [r5, r0] + mov r6, #0x10 + lsl r1, r2, #4 + add r3, r5, r1 + ldr r1, _022511E0 ; =0x000003E9 + ldrb r1, [r3, r1] + tst r1, r6 + beq _02251066 + ldr r3, _022511E4 ; =0x0000213C + lsl r6, r6, #0x10 + ldr r1, [r5, r3] + tst r1, r6 + bne _02251066 + ldr r1, [r5, #0x6c] + cmp r1, #0xff + beq _02251066 + add r3, r3, #4 + ldr r6, [r5, r3] + mov r3, #4 + tst r3, r6 + beq _02251066 + lsl r1, r1, #1 + add r3, r5, r1 + add r1, r0, #0 + add r1, #0x44 + strh r2, [r3, r1] + ldr r2, [r5, #0x6c] + ldr r1, [r5, r0] + lsl r2, r2, #3 + add r3, r5, r2 + ldr r2, [r5, #0x64] + add r0, #0x4c + lsl r2, r2, #1 + add r2, r3, r2 + strh r1, [r2, r0] +_02251066: + ldr r1, [r5, #0x6c] + cmp r1, #0xff + beq _022510B0 + add r0, r5, #0 + bl ov16_02258AB8 + ldr r1, _022511E4 ; =0x0000213C + lsl r0, r0, #0x18 + ldr r3, [r5, r1] + mov r2, #0x20 + lsr r0, r0, #0x18 + tst r2, r3 + bne _0225108A + add r1, r1, #4 + ldr r2, [r5, r1] + mov r1, #4 + tst r1, r2 + beq _022510A4 +_0225108A: + cmp r0, #0x37 + beq _022510A4 + cmp r0, #0x73 + beq _022510A4 + cmp r0, #0x7d + beq _022510A4 + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _022511E8 ; =0x00002DF8 + mov r2, #0 + strh r2, [r1, r0] +_022510A4: + ldr r0, _022511E4 ; =0x0000213C + mov r1, #1 + ldr r2, [r5, r0] + lsl r1, r1, #0x14 + tst r1, r2 + beq _022510B2 +_022510B0: + b _022511D2 +_022510B2: + add r0, r0, #4 + ldr r1, [r5, r0] + mov r0, #4 + tst r0, r1 + beq _022510F0 + ldr r1, [r5, #0x6c] + ldr r0, _022511D8 ; =0x00003044 + lsl r1, r1, #1 + add r2, r5, r1 + add r1, r0, #0 + ldr r3, [r5, r0] + add r1, #0x20 + strh r3, [r2, r1] + ldr r1, [r5, #0x6c] + ldr r3, [r5, #0x64] + lsl r1, r1, #1 + add r2, r5, r1 + add r1, r0, #0 + add r1, #0x28 + strh r3, [r2, r1] + ldr r1, [r5, #0x6c] + lsl r1, r1, #1 + add r2, r5, r1 + add r1, r0, #0 + add r1, #0x30 + strh r4, [r2, r1] + sub r1, r0, #4 + ldr r1, [r5, r1] + add r0, r0, #4 + str r1, [r5, r0] + b _0225111A +_022510F0: + ldr r0, [r5, #0x6c] + ldr r3, _022511EC ; =0x00003064 + lsl r0, r0, #1 + mov r1, #0 + add r0, r5, r0 + strh r1, [r0, r3] + ldr r2, [r5, #0x6c] + mov r0, #0xff + lsl r2, r2, #1 + add r6, r5, r2 + add r2, r3, #0 + add r2, #8 + strh r0, [r6, r2] + ldr r0, [r5, #0x6c] + lsl r0, r0, #1 + add r2, r5, r0 + add r0, r3, #0 + add r0, #0x10 + strh r1, [r2, r0] + sub r3, #0x1c + str r1, [r5, r3] +_0225111A: + mov r0, #0x85 + lsl r0, r0, #6 + ldr r2, [r5, r0] + mov r1, #0x40 + tst r1, r2 + beq _022511AE + add r0, #0x2c + ldr r0, [r5, r0] + ldr r2, _022511F0 ; =0x801FDA49 + tst r0, r2 + bne _022511AE + ldr r0, _022511D8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r1, r0, #4 + add r3, r5, r1 + ldr r1, _022511F4 ; =0x000003E6 + ldrh r3, [r3, r1] + cmp r3, #0x40 + bgt _02251150 + bge _02251164 + cmp r3, #0x10 + bgt _0225114A + beq _02251164 + b _0225118A +_0225114A: + cmp r3, #0x20 + beq _02251164 + b _0225118A +_02251150: + lsr r1, r2, #0x17 + cmp r3, r1 + bgt _0225115E + bge _02251164 + cmp r3, #0x80 + beq _02251164 + b _0225118A +_0225115E: + lsr r1, r2, #0x16 + cmp r3, r1 + bne _0225118A +_02251164: + ldr r1, [r5, #0x6c] + ldr r2, _022511F8 ; =0x000030C4 + lsl r1, r1, #1 + mov r0, #0 + add r1, r5, r1 + strh r0, [r1, r2] + ldr r1, [r5, #0x6c] + mov r4, #0xff + lsl r1, r1, #1 + add r3, r5, r1 + add r1, r2, #0 + add r1, #8 + strh r4, [r3, r1] + ldr r1, [r5, #0x6c] + add r2, #0x10 + lsl r1, r1, #1 + add r1, r5, r1 + strh r0, [r1, r2] + pop {r4, r5, r6, pc} +_0225118A: + ldr r1, [r5, #0x6c] + lsl r1, r1, #1 + add r2, r5, r1 + ldr r1, _022511F8 ; =0x000030C4 + strh r0, [r2, r1] + ldr r0, [r5, #0x6c] + ldr r3, [r5, #0x64] + lsl r0, r0, #1 + add r2, r5, r0 + add r0, r1, #0 + add r0, #8 + strh r3, [r2, r0] + ldr r0, [r5, #0x6c] + add r1, #0x10 + lsl r0, r0, #1 + add r0, r5, r0 + strh r4, [r0, r1] + pop {r4, r5, r6, pc} +_022511AE: + ldr r1, [r5, #0x6c] + ldr r2, _022511F8 ; =0x000030C4 + lsl r1, r1, #1 + mov r0, #0 + add r1, r5, r1 + strh r0, [r1, r2] + ldr r1, [r5, #0x6c] + mov r4, #0xff + lsl r1, r1, #1 + add r3, r5, r1 + add r1, r2, #0 + add r1, #8 + strh r4, [r3, r1] + ldr r1, [r5, #0x6c] + add r2, #0x10 + lsl r1, r1, #1 + add r1, r5, r1 + strh r0, [r1, r2] +_022511D2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022511D4: .word 0x00002160 +_022511D8: .word 0x00003044 +_022511DC: .word 0x000003E2 +_022511E0: .word 0x000003E9 +_022511E4: .word 0x0000213C +_022511E8: .word 0x00002DF8 +_022511EC: .word 0x00003064 +_022511F0: .word 0x801FDA49 +_022511F4: .word 0x000003E6 +_022511F8: .word 0x000030C4 + thumb_func_end ov16_02250FF4 + + thumb_func_start ov16_022511FC +ov16_022511FC: ; 0x022511FC + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x10 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_022511FC + + thumb_func_start ov16_02251218 +ov16_02251218: ; 0x02251218 + push {r3, r4, r5, lr} + ldr r2, _02251268 ; =0x0000216C + add r5, r1, #0 + ldr r0, [r5, r2] + mov r4, #0 + cmp r0, #0 + beq _0225124C + add r1, r2, #0 + add r1, #0x11 + ldrb r1, [r5, r1] + cmp r1, #0 + beq _0225124A + ldr r1, [r5, #0x74] + cmp r1, #0xff + bne _02251246 + add r2, #0x10 + ldrb r1, [r5, r2] + cmp r1, #1 + beq _02251246 + mov r1, #1 + lsl r1, r1, #0xe + tst r0, r1 + beq _0225124C +_02251246: + mov r4, #1 + b _0225124C +_0225124A: + mov r4, #1 +_0225124C: + cmp r4, #1 + bne _02251262 + add r0, r5, #0 + mov r1, #1 + mov r2, #0x15 + bl ov16_02251E1C + ldr r0, [r5, #8] + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] +_02251262: + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_02251268: .word 0x0000216C + thumb_func_end ov16_02251218 + + thumb_func_start ov16_0225126C +ov16_0225126C: ; 0x0225126C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r2, [r4, #0x6c] + mov r3, #0 + cmp r2, #0xff + bne _0225127C + add r0, r3, #0 + pop {r3, r4, r5, r6, r7, pc} +_0225127C: + mov r0, #0xc0 + add r5, r2, #0 + mul r5, r0 + mov r1, #2 + ldr r0, _022512EC ; =0x00002DB0 + add r7, r4, r5 + ldr r6, [r7, r0] + lsl r1, r1, #0x16 + tst r1, r6 + beq _022512E6 + ldr r1, _022512F0 ; =0x0000216C + mov r6, #2 + lsl r6, r6, #0x16 + ldr r1, [r4, r1] + lsr r6, r6, #9 + tst r1, r6 + bne _022512E6 + ldr r1, [r4, #0x64] + cmp r2, r1 + beq _022512E6 + sub r0, #0x24 + ldr r0, [r7, r0] + cmp r0, #0 + beq _022512E6 + mov r0, #0x1c + mul r0, r2 + add r2, r4, r0 + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r1, [r2, r0] + cmp r1, #0 + bne _022512C4 + add r0, #8 + ldr r0, [r2, r0] + cmp r0, #0 + beq _022512E6 +_022512C4: + ldr r0, _022512F4 ; =0x00002D59 + add r1, r4, r0 + ldrsb r0, [r1, r5] + cmp r0, #0xc + bge _022512E6 + add r0, r0, #1 + strb r0, [r1, r5] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf5 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r3, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_022512E6: + add r0, r3, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022512EC: .word 0x00002DB0 +_022512F0: .word 0x0000216C +_022512F4: .word 0x00002D59 + thumb_func_end ov16_0225126C + + thumb_func_start ov16_022512F8 +ov16_022512F8: ; 0x022512F8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r1, [r5, #0x64] + str r0, [sp] + add r0, r5, #0 + mov r4, #0 + bl ov16_02258AB8 + add r7, r0, #0 + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r4, #0 + bl ov16_02258ACC + add r6, r0, #0 + ldr r0, [r5, #0x6c] + cmp r0, #0xff + beq _02251396 + cmp r7, #0x38 + bne _02251396 + ldr r1, _0225139C ; =0x0000216C + ldr r2, [r5, r1] + ldr r1, _022513A0 ; =0x801FDA49 + tst r1, r2 + bne _02251396 + mov r1, #0x1c + mul r1, r0 + mov r0, #0xb6 + add r2, r5, r1 + lsl r0, r0, #2 + ldr r1, [r2, r0] + cmp r1, #0 + bne _02251342 + add r0, #8 + ldr r0, [r2, r0] + cmp r0, #0 + beq _02251396 +_02251342: + ldr r0, [sp] + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r6 + bge _02251396 + ldr r0, _022513A4 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022513A8 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + beq _02251396 + ldr r0, [r5, #0x6c] + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + ldr r1, _022513AC ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _02251396 + add r1, r5, #0 + add r1, #0x94 + str r0, [r1, #0] + add r0, r5, #0 + mov r1, #2 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #1 + mov r2, #0xe + bl ov16_02251E1C + ldr r0, [r5, #8] + mov r4, #1 + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] +_02251396: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225139C: .word 0x0000216C +_022513A0: .word 0x801FDA49 +_022513A4: .word 0x00003044 +_022513A8: .word 0x000003E9 +_022513AC: .word 0x00002D8C + thumb_func_end ov16_022512F8 + + thumb_func_start ov16_022513B0 +ov16_022513B0: ; 0x022513B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r7, [r5, #0x5c] + str r0, [sp] + mov r6, #0 + bl ov16_0223DF1C + cmp r7, r0 + bge _02251420 + add r4, r5, #0 + add r4, #0x5c +_022513C6: + mov r0, #0xc0 + mul r0, r7 + mov r1, #0xb7 + add r0, r5, r0 + lsl r1, r1, #6 + ldr r2, [r0, r1] + ldr r1, _0225142C ; =0x200400C0 + tst r1, r2 + bne _0225140A + ldr r1, _02251430 ; =0x00002DC4 + ldr r2, [r0, r1] + ldr r1, _0225142C ; =0x200400C0 + tst r1, r2 + beq _0225140A + ldr r1, _02251430 ; =0x00002DC4 + ldr r2, [r0, r1] + ldr r1, _02251434 ; =0xDFFBFF3F + and r2, r1 + ldr r1, _02251430 ; =0x00002DC4 + str r2, [r0, r1] + ldr r2, _02251438 ; =0x0000011F + add r0, r5, #0 + mov r1, #1 + bl ov16_02251E1C + mov r0, #0x46 + ldr r1, [r5, #0x5c] + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r0, [r5, #8] + mov r6, #1 + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] +_0225140A: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + cmp r6, #1 + beq _02251420 + ldr r0, [sp] + ldr r7, [r5, #0x5c] + bl ov16_0223DF1C + cmp r7, r0 + blt _022513C6 +_02251420: + cmp r6, #0 + bne _02251428 + mov r0, #0 + str r0, [r5, #0x5c] +_02251428: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225142C: .word 0x200400C0 +_02251430: .word 0x00002DC4 +_02251434: .word 0xDFFBFF3F +_02251438: .word 0x0000011F + thumb_func_end ov16_022513B0 + + thumb_func_start ov16_0225143C +ov16_0225143C: ; 0x0225143C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + mov r6, #0 + bl ov16_0223DF1C + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02258AB8 + str r0, [sp, #4] + ldr r1, [r4, #0x64] + add r0, r4, #0 + add r2, r6, #0 + bl ov16_02258ACC + ldr r1, [r4, #8] + str r0, [sp] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #1 + bl ov16_02250EF4 + cmp r0, #1 + bne _02251474 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02251474: + add r5, r4, #0 + add r5, #0x30 +_02251478: + ldr r0, [r4, #0x30] + cmp r0, #3 + bls _02251480 + b _022515D0 +_02251480: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225148C: ; jump table + .short _02251494 - _0225148C - 2 ; case 0 + .short _022514C4 - _0225148C - 2 ; case 1 + .short _02251544 - _0225148C - 2 ; case 2 + .short _022515C8 - _0225148C - 2 ; case 3 +_02251494: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _022515E8 ; =0x00002DB0 + add r0, r4, r0 + ldr r2, [r0, r1] + mov r1, #2 + lsl r1, r1, #0x16 + tst r1, r2 + beq _022514BC + ldr r1, _022515EC ; =0x00003044 + ldr r1, [r4, r1] + cmp r1, #0x63 + beq _022514BC + ldr r1, _022515E8 ; =0x00002DB0 + ldr r2, [r0, r1] + ldr r1, _022515F0 ; =0xFF7FFFFF + and r2, r1 + ldr r1, _022515E8 ; =0x00002DB0 + str r2, [r0, r1] +_022514BC: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022515D0 +_022514C4: + ldr r3, [r4, #0x6c] + cmp r3, #0xff + beq _0225153C + ldr r0, [sp, #4] + cmp r0, #0x58 + bne _0225153C + mov r0, #0x85 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + bne _0225153C + ldr r0, _022515F4 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #2 + lsl r0, r0, #0xc + tst r0, r1 + beq _0225153C + ldr r2, [r4, #0x64] + mov r0, #0x1c + mul r0, r2 + add r1, r4, r0 + mov r0, #0xbb + lsl r0, r0, #2 + ldr r7, [r1, r0] + cmp r7, #0 + beq _0225153C + cmp r2, r3 + beq _0225153C + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _022515F8 ; =0x00002D8C + ldr r1, [r2, r0] + add r0, r0, #4 + ldr r0, [r2, r0] + cmp r1, r0 + bhs _0225153C + cmp r1, #0 + beq _0225153C + ldr r1, [sp] + neg r0, r7 + bl ov16_022563F8 + ldr r1, _022515FC ; =0x0000215C + mov r2, #0xd5 + str r0, [r4, r1] + mov r0, #0x46 + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r6, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0225153C: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022515D0 +_02251544: + ldr r0, [sp, #4] + cmp r0, #0x62 + bne _022515C0 + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _022515C0 + mov r0, #0x85 + lsl r0, r0, #6 + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + bne _022515C0 + ldr r0, _022515F4 ; =0x0000213C + ldr r1, [r4, r0] + mov r0, #2 + lsl r0, r0, #0xc + tst r0, r1 + beq _022515C0 + ldr r0, _022515EC ; =0x00003044 + ldr r0, [r4, r0] + lsl r0, r0, #4 + add r1, r4, r0 + mov r0, #0x3e + lsl r0, r0, #4 + ldrb r0, [r1, r0] + cmp r0, #2 + beq _022515C0 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _022515F8 ; =0x00002D8C + add r0, r4, r0 + ldr r1, [r0, r1] + cmp r1, #0 + beq _022515C0 + ldr r1, _02251600 ; =0x00002D90 + ldr r1, [r0, r1] + mov r0, #0 + mvn r0, r0 + mul r0, r1 + mov r1, #0xa + bl ov16_022563F8 + ldr r1, _022515FC ; =0x0000215C + mov r2, #0xd6 + str r0, [r4, r1] + mov r0, #0x46 + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r6, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_022515C0: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022515D0 +_022515C8: + mov r0, #0 + str r0, [r4, #0x30] + str r0, [r4, #0x34] + mov r6, #2 +_022515D0: + cmp r6, #0 + bne _022515D6 + b _02251478 +_022515D6: + cmp r6, #1 + bne _022515E0 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022515E0: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022515E8: .word 0x00002DB0 +_022515EC: .word 0x00003044 +_022515F0: .word 0xFF7FFFFF +_022515F4: .word 0x0000213C +_022515F8: .word 0x00002D8C +_022515FC: .word 0x0000215C +_02251600: .word 0x00002D90 + thumb_func_end ov16_0225143C + + thumb_func_start ov16_02251604 +ov16_02251604: ; 0x02251604 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r1, [sp, #4] + str r0, [sp] + bl ov16_0223DF0C + mov r2, #0xd5 + add r4, r0, #0 + ldr r1, [sp, #4] + lsl r2, r2, #2 + add r1, r1, r2 + ldr r2, _02251684 ; =0x00001DE0 + mov r0, #0 + bl sub_020C4B4C + mov r0, #1 + tst r0, r4 + beq _02251678 + mov r0, #0xb9 + lsl r0, r0, #2 + tst r0, r4 + bne _02251678 + mov r6, #0 +_02251632: + mov r0, #1 + tst r0, r6 + beq _02251672 + asr r2, r6, #1 + ldr r0, [sp, #4] + lsl r1, r2, #3 + mov r4, #0 + add r7, r0, r1 + add r5, r0, r2 +_02251644: + ldr r0, [sp] + add r1, r6, #0 + add r2, r4, #0 + bl ov16_0223F700 + cmp r0, #0 + beq _0225166C + ldr r1, _02251688 ; =0x000003CD + ldrb r1, [r5, r1] + lsl r1, r1, #1 + add r2, r7, r1 + mov r1, #0xe7 + lsl r1, r1, #2 + strh r0, [r2, r1] + add r0, r1, #0 + add r0, #0x31 + ldrb r0, [r5, r0] + add r1, r0, #1 + ldr r0, _02251688 ; =0x000003CD + strb r1, [r5, r0] +_0225166C: + add r4, r4, #1 + cmp r4, #4 + blt _02251644 +_02251672: + add r6, r6, #1 + cmp r6, #4 + blt _02251632 +_02251678: + ldr r2, _0225168C ; =0x022248A4 + ldr r1, _02251690 ; =0x00002134 + ldr r0, [sp, #4] + str r2, [r0, r1] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251684: .word 0x00001DE0 +_02251688: .word 0x000003CD +_0225168C: .word 0x022248A4 +_02251690: .word 0x00002134 + thumb_func_end ov16_02251604 + + thumb_func_start ov16_02251694 +ov16_02251694: ; 0x02251694 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + str r1, [sp] + bl ov16_0223DF1C + mov r4, #0 + str r0, [sp, #4] + cmp r0, #0 + ble _02251768 + ldr r5, [sp] +_022516AA: + ldr r0, _0225176C ; =0x000021A8 + ldr r2, [r5, r0] + cmp r2, #0x27 + beq _0225175E + ldr r0, [sp] + add r7, r0, r4 + ldr r0, _02251770 ; =0x0000314C + ldrb r1, [r7, r0] + mov r0, #1 + tst r0, r1 + beq _022516CE + sub r2, #0xc + lsl r2, r2, #0x18 + add r0, r6, #0 + add r1, r4, #0 + lsr r2, r2, #0x18 + bl ov16_0223F500 +_022516CE: + ldr r0, _0225176C ; =0x000021A8 + ldr r0, [r5, r0] + sub r0, #0xd + cmp r0, #3 + bhi _0225175E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022516E4: ; jump table + .short _022516EC - _022516E4 - 2 ; case 0 + .short _02251724 - _022516E4 - 2 ; case 1 + .short _02251740 - _022516E4 - 2 ; case 2 + .short _02251754 - _022516E4 - 2 ; case 3 +_022516EC: + ldr r0, _02251770 ; =0x0000314C + ldrb r1, [r7, r0] + mov r0, #2 + tst r0, r1 + beq _02251706 + ldr r2, _02251774 ; =0x000021B0 + add r0, r6, #0 + ldr r2, [r5, r2] + add r1, r4, #0 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl ov16_0223F500 +_02251706: + ldr r0, _02251770 ; =0x0000314C + ldrb r1, [r7, r0] + mov r0, #4 + tst r0, r1 + beq _0225175E + ldr r2, _02251778 ; =0x000021AC + add r0, r6, #0 + ldr r2, [r5, r2] + add r1, r4, #0 + add r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl ov16_0223F500 + b _0225175E +_02251724: + ldr r2, _02251774 ; =0x000021B0 + add r0, r6, #0 + ldr r2, [r5, r2] + add r1, r4, #0 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl ov16_0223F500 + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + bl ov16_0223F500 + b _0225175E +_02251740: + ldr r2, _02251774 ; =0x000021B0 + add r0, r6, #0 + ldr r2, [r5, r2] + add r1, r4, #0 + add r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl ov16_0223F500 + b _0225175E +_02251754: + add r0, r6, #0 + add r1, r4, #0 + mov r2, #1 + bl ov16_0223F500 +_0225175E: + ldr r0, [sp, #4] + add r4, r4, #1 + add r5, #0x10 + cmp r4, r0 + blt _022516AA +_02251768: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225176C: .word 0x000021A8 +_02251770: .word 0x0000314C +_02251774: .word 0x000021B0 +_02251778: .word 0x000021AC + thumb_func_end ov16_02251694 + + .rodata + + + .global Unk_ov16_0226EAD0 +Unk_ov16_0226EAD0: ; 0x0226EAD0 + .incbin "incbin/overlay16_rodata.bin", 0x874, 0x890 - 0x874 + + .global Unk_ov16_0226EAEC +Unk_ov16_0226EAEC: ; 0x0226EAEC + .incbin "incbin/overlay16_rodata.bin", 0x890, 0xB4 + diff --git a/asm/ov16_0225177C.s b/asm/ov16_0225177C.s new file mode 100644 index 000000000..2623ad2b0 --- /dev/null +++ b/asm/ov16_0225177C.s @@ -0,0 +1,22366 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0225177C +ov16_0225177C: ; 0x0225177C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r1, #0 + str r2, [sp, #4] + add r1, r2, #0 + add r2, r3, #0 + str r0, [sp] + bl ov16_0223DFAC + ldr r1, [sp, #4] + mov r2, #0xc0 + add r5, r1, #0 + mov r1, #0xb5 + lsl r1, r1, #6 + add r1, r7, r1 + mul r5, r2 + str r1, [sp, #0x18] + mov r1, #5 + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + ldr r1, [sp, #0x18] + mov r2, #0 + strh r0, [r1, r5] + add r0, r4, #0 + mov r1, #0xa5 + bl sub_02074470 + ldr r1, _02251B34 ; =0x00002D42 + add r2, r7, r5 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa6 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B38 ; =0x00002D44 + add r2, r7, r5 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa7 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B3C ; =0x00002D46 + add r2, r7, r5 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa8 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B40 ; =0x00002D48 + add r2, r7, r5 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa9 + mov r2, #0 + bl sub_02074470 + add r1, r7, r5 + ldr r2, _02251B44 ; =0x00002D4A + str r1, [sp, #0xc] + strh r0, [r1, r2] + add r0, r1, #0 + mov r6, #0 + str r0, [sp, #0x14] + str r0, [sp, #0x10] +_02251806: + add r1, r6, #0 + add r0, r4, #0 + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp, #0x14] + ldr r1, _02251B48 ; =0x00002D4C + strh r0, [r2, r1] + add r1, r6, #0 + add r0, r4, #0 + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + ldr r2, [sp, #0x10] + ldr r1, _02251B4C ; =0x00002D6C + strb r0, [r2, r1] + add r1, r6, #0 + add r0, r4, #0 + add r1, #0x3e + mov r2, #0 + bl sub_02074470 + ldr r2, [sp, #0x10] + ldr r1, _02251B50 ; =0x00002D70 + add r6, r6, #1 + strb r0, [r2, r1] + ldr r0, [sp, #0x14] + add r0, r0, #2 + str r0, [sp, #0x14] + add r0, r2, #0 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r6, #4 + blt _02251806 + add r0, r1, #0 + sub r0, #0x1c + add r6, r7, r0 + add r0, r4, #0 + mov r1, #0x46 + mov r2, #0 + bl sub_02074470 + ldr r1, [r6, r5] + mov r2, #0x1f + bic r1, r2 + mov r2, #0x1f + and r0, r2 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x47 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x1b + ldr r2, [r6, r5] + ldr r1, _02251B54 ; =0xFFFFFC1F + lsr r0, r0, #0x16 + and r1, r2 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x48 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x1b + ldr r2, [r6, r5] + ldr r1, _02251B58 ; =0xFFFF83FF + lsr r0, r0, #0x11 + and r1, r2 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x49 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x1b + ldr r2, [r6, r5] + ldr r1, _02251B5C ; =0xFFF07FFF + lsr r0, r0, #0xc + and r1, r2 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x4a + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x1b + ldr r2, [r6, r5] + ldr r1, _02251B60 ; =0xFE0FFFFF + lsr r0, r0, #7 + and r1, r2 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x4b + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x1b + ldr r2, [r6, r5] + ldr r1, _02251B64 ; =0xC1FFFFFF + lsr r0, r0, #2 + and r1, r2 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + ldr r2, [r6, r5] + ldr r1, _02251B68 ; =0xBFFFFFFF + lsl r0, r0, #0x1f + and r1, r2 + lsr r0, r0, #1 + orr r0, r1 + str r0, [r6, r5] + add r0, r4, #0 + mov r1, #0x4d + mov r2, #0 + bl sub_02074470 + ldr r2, [r6, r5] + ldr r1, _02251B6C ; =0x7FFFFFFF + lsl r0, r0, #0x1f + and r1, r2 + orr r0, r1 + str r0, [r6, r5] + ldr r0, _02251B70 ; =0x0000213C + ldr r1, [r7, r0] + mov r0, #1 + lsl r0, r0, #8 + tst r0, r1 + bne _02251932 + ldr r0, _02251B74 ; =0x00002D58 + mov r2, #0 + mov r1, #6 +_02251924: + ldr r3, [sp, #0xc] + add r2, r2, #1 + strb r1, [r3, r0] + add r3, r3, #1 + str r3, [sp, #0xc] + cmp r2, #8 + blt _02251924 +_02251932: + ldr r0, _02251B78 ; =0x00002D68 + mov r1, #1 + add r0, r7, r0 + ldr r2, [r0, r5] + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #2 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #4 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #8 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #0x10 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #0x20 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #0x40 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + mov r1, #0x80 + bic r2, r1 + str r2, [r0, r5] + ldr r2, [r0, r5] + ldr r1, _02251B7C ; =0xFFFFFEFF + and r1, r2 + str r1, [r0, r5] + ldr r2, [r0, r5] + ldr r1, _02251B80 ; =0xFFFFFDFF + and r1, r2 + str r1, [r0, r5] + ldr r2, [r0, r5] + ldr r1, _02251B84 ; =0xFFFFFBFF + and r1, r2 + str r1, [r0, r5] + add r0, r4, #0 + mov r1, #0xb1 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B88 ; =0x00002D64 + add r2, r7, r5 + strb r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xb2 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B8C ; =0x00002D65 + add r2, r7, r5 + strb r0, [r2, r1] + add r1, #0x59 + add r0, r7, r1 + str r0, [sp, #0x1c] + add r0, r4, #0 + bl sub_02075D6C + ldr r1, [sp, #0x1c] + mov r2, #0xf + ldrb r1, [r1, r5] + bic r1, r2 + mov r2, #0xf + and r0, r2 + orr r1, r0 + ldr r0, [sp, #0x1c] + strb r1, [r0, r5] + ldr r0, _02251B90 ; =0x00002D66 + add r0, r7, r0 + str r0, [sp, #0x20] + add r0, r4, #0 + bl sub_02075E0C + ldr r1, [sp, #0x20] + lsl r0, r0, #0x1f + ldrb r1, [r1, r5] + mov r2, #0x20 + lsr r0, r0, #0x1a + bic r1, r2 + orr r1, r0 + ldr r0, [sp, #0x20] + strb r1, [r0, r5] + ldr r0, [sp] + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + beq _02251A12 + ldr r2, _02251B94 ; =0x00002D67 + mov r0, #0 + add r3, r7, r5 + add r1, r2, #0 + strb r0, [r3, r2] + add r2, #0x51 + add r1, #0x45 + add r2, r7, r2 + str r0, [r3, r1] + add r1, r2, r5 + str r1, [sp, #8] + strh r0, [r2, r5] + b _02251A46 +_02251A12: + add r0, r4, #0 + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B94 ; =0x00002D67 + add r2, r7, r5 + strb r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B98 ; =0x00002DAC + add r2, r7, r5 + str r0, [r2, r1] + add r1, #0xc + add r6, r7, r1 + add r0, r6, r5 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + strh r0, [r6, r5] +_02251A46: + ldr r0, [sp] + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + beq _02251A6E + ldr r0, [sp] + ldr r1, [sp, #4] + bl ov16_0223E208 + cmp r0, #0 + bne _02251A6E + ldr r0, [sp, #0x20] + ldrb r1, [r0, r5] + mov r0, #0x1f + bic r1, r0 + ldr r0, [sp, #0x20] + strb r1, [r0, r5] + b _02251A8E +_02251A6E: + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #0x20] + mov r2, #0x1f + ldrb r1, [r1, r5] + lsl r0, r0, #0x18 + bic r1, r2 + lsr r2, r0, #0x18 + mov r0, #0x1f + and r0, r2 + orr r1, r0 + ldr r0, [sp, #0x20] + strb r1, [r0, r5] +_02251A8E: + ldr r0, [sp, #4] + mov r1, #0xc0 + add r6, r0, #0 + mul r6, r1 + add r0, r4, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251B9C ; =0x00002D74 + add r2, r7, r6 + strb r0, [r2, r1] + add r0, r4, #0 + mov r1, #9 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251BA0 ; =0x00002D75 + add r2, r7, r6 + strb r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251BA4 ; =0x00002D8C + add r2, r7, r6 + str r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251BA8 ; =0x00002D90 + add r2, r7, r6 + str r0, [r2, r1] + add r0, r4, #0 + mov r1, #8 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251BAC ; =0x00002DA4 + add r2, r7, r6 + str r0, [r2, r1] + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_02074470 + ldr r1, _02251BB0 ; =0x00002DA8 + add r2, r7, r6 + str r0, [r2, r1] + add r0, r4, #0 + mov r1, #7 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251BB4 ; =0x00002DB4 + add r2, r7, r6 + str r0, [r2, r1] + add r0, r4, #0 + mov r1, #0x9d + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1c + ldrb r1, [r1, r5] + mov r2, #0xf0 + lsr r0, r0, #0x18 + bic r1, r2 + orr r1, r0 + ldr r0, [sp, #0x1c] + mov r2, #0 + strb r1, [r0, r5] + add r0, r4, #0 + mov r1, #0x9b + bl sub_02074470 + ldr r1, _02251BB8 ; =0x00002DBF + b _02251BBC + ; .align 2, 0 +_02251B34: .word 0x00002D42 +_02251B38: .word 0x00002D44 +_02251B3C: .word 0x00002D46 +_02251B40: .word 0x00002D48 +_02251B44: .word 0x00002D4A +_02251B48: .word 0x00002D4C +_02251B4C: .word 0x00002D6C +_02251B50: .word 0x00002D70 +_02251B54: .word 0xFFFFFC1F +_02251B58: .word 0xFFFF83FF +_02251B5C: .word 0xFFF07FFF +_02251B60: .word 0xFE0FFFFF +_02251B64: .word 0xC1FFFFFF +_02251B68: .word 0xBFFFFFFF +_02251B6C: .word 0x7FFFFFFF +_02251B70: .word 0x0000213C +_02251B74: .word 0x00002D58 +_02251B78: .word 0x00002D68 +_02251B7C: .word 0xFFFFFEFF +_02251B80: .word 0xFFFFFDFF +_02251B84: .word 0xFFFFFBFF +_02251B88: .word 0x00002D64 +_02251B8C: .word 0x00002D65 +_02251B90: .word 0x00002D66 +_02251B94: .word 0x00002D67 +_02251B98: .word 0x00002DAC +_02251B9C: .word 0x00002D74 +_02251BA0: .word 0x00002D75 +_02251BA4: .word 0x00002D8C +_02251BA8: .word 0x00002D90 +_02251BAC: .word 0x00002DA4 +_02251BB0: .word 0x00002DA8 +_02251BB4: .word 0x00002DB4 +_02251BB8: .word 0x00002DBF +_02251BBC: + add r2, r7, r6 + strb r0, [r2, r1] + ldr r0, [sp, #0x20] + ldrb r0, [r0, r5] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1b + bl sub_02098988 + mov r0, #5 + bl sub_02098700 + mov r1, #0 + mov r2, #5 + str r0, [sp, #0x24] + bl sub_0209872C + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x24] + ldrh r1, [r1, r5] + bl sub_02098828 + ldr r1, _02251C78 ; =0x00002D60 + add r2, r7, r6 + str r0, [r2, r1] + ldr r0, [sp, #0x24] + bl sub_020987BC + ldr r0, [sp, #0x24] + bl sub_02098718 + ldr r2, _02251C7C ; =0x00002D76 + add r0, r4, #0 + add r2, r7, r2 + mov r1, #0x75 + add r2, r2, r6 + bl sub_02074470 + ldr r2, _02251C80 ; =0x00002D94 + add r0, r4, #0 + add r2, r7, r2 + mov r1, #0x90 + add r2, r2, r6 + bl sub_02074470 + ldr r0, _02251C84 ; =0x00002DBC + mov r2, #0 + add r1, r7, r6 + strb r2, [r1, r0] + add r0, r0, #1 + strb r2, [r1, r0] + ldr r0, [sp] + ldr r1, [sp, #4] + bl ov16_0223E208 + add r4, r0, #0 + ldr r0, [sp, #4] + add r1, r7, r0 + ldr r0, _02251C88 ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + lsl r1, r4, #3 + add r2, r7, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #3 + lsr r1, r1, #0x1a + tst r0, r1 + beq _02251C5E + ldr r0, [sp, #8] + mov r1, #0 + strh r1, [r0] + ldr r0, _02251C8C ; =0x00002DCC + add sp, #0x28 + add r2, r7, r0 + ldr r1, [r2, r5] + ldr r0, _02251C90 ; =0xFFBFFFFF + and r0, r1 + str r0, [r2, r5] + pop {r3, r4, r5, r6, r7, pc} +_02251C5E: + ldr r0, [sp, #8] + ldrh r0, [r0] + cmp r0, #0 + beq _02251C74 + ldr r0, _02251C8C ; =0x00002DCC + add r2, r7, r0 + mov r0, #1 + ldr r1, [r2, r5] + lsl r0, r0, #0x16 + orr r0, r1 + str r0, [r2, r5] +_02251C74: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251C78: .word 0x00002D60 +_02251C7C: .word 0x00002D76 +_02251C80: .word 0x00002D94 +_02251C84: .word 0x00002DBC +_02251C88: .word 0x0000219C +_02251C8C: .word 0x00002DCC +_02251C90: .word 0xFFBFFFFF + thumb_func_end ov16_0225177C + + thumb_func_start ov16_02251C94 +ov16_02251C94: ; 0x02251C94 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r2, #0 + str r1, [sp] + add r1, r5, #0 + add r2, r3, #0 + bl ov16_0223DFAC + mov r1, #0xc0 + mul r1, r5 + str r1, [sp, #4] + mov r1, #0xa5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251DE8 ; =0x00002D42 + strh r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa6 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251DEC ; =0x00002D44 + strh r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa7 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251DF0 ; =0x00002D46 + strh r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa8 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251DF4 ; =0x00002D48 + strh r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa9 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251DF8 ; =0x00002D4A + strh r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251DFC ; =0x00002D74 + strb r0, [r2, r1] + add r0, r6, #0 + mov r1, #9 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251E00 ; =0x00002D75 + strb r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251E04 ; =0x00002D8C + str r0, [r2, r1] + add r0, r6, #0 + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251E08 ; =0x00002D90 + str r0, [r2, r1] + add r0, r1, #0 + add r0, #0x20 + ldr r2, [r2, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r2 + bne _02251DE4 + mov r0, #0xc0 + mul r0, r5 + ldr r2, [sp] + str r0, [sp, #8] + add r7, r2, r0 + add r1, #0x3c + add r0, r2, #0 + add r0, r0, r1 + mov r4, #0 + add r5, r7, #0 + str r0, [sp, #0xc] +_02251D82: + add r0, r4, #0 + bl sub_020787CC + ldr r2, [sp, #0xc] + ldr r1, [sp, #8] + ldr r1, [r2, r1] + lsl r1, r1, #0x1a + lsr r1, r1, #0x1c + tst r0, r1 + bne _02251DC6 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + ldr r1, _02251E0C ; =0x00002D4C + mov r2, #0 + strh r0, [r7, r1] + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x3a + bl sub_02074470 + ldr r1, _02251E10 ; =0x00002D6C + mov r2, #0 + strb r0, [r5, r1] + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x3e + bl sub_02074470 + ldr r1, _02251E14 ; =0x00002D70 + strb r0, [r5, r1] +_02251DC6: + add r4, r4, #1 + add r7, r7, #2 + add r5, r5, #1 + cmp r4, #4 + blt _02251D82 + add r0, r6, #0 + mov r1, #8 + mov r2, #0 + bl sub_02074470 + ldr r2, [sp] + ldr r1, [sp, #4] + add r2, r2, r1 + ldr r1, _02251E18 ; =0x00002DA4 + str r0, [r2, r1] +_02251DE4: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251DE8: .word 0x00002D42 +_02251DEC: .word 0x00002D44 +_02251DF0: .word 0x00002D46 +_02251DF4: .word 0x00002D48 +_02251DF8: .word 0x00002D4A +_02251DFC: .word 0x00002D74 +_02251E00: .word 0x00002D75 +_02251E04: .word 0x00002D8C +_02251E08: .word 0x00002D90 +_02251E0C: .word 0x00002D4C +_02251E10: .word 0x00002D6C +_02251E14: .word 0x00002D70 +_02251E18: .word 0x00002DA4 + thumb_func_end ov16_02251C94 + + thumb_func_start ov16_02251E1C +ov16_02251E1C: ; 0x02251E1C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl sub_02006B58 + mov r1, #0x19 + lsl r1, r1, #6 + cmp r0, r1 + blo _02251E38 + bl sub_02022974 +_02251E38: + add r0, r5, #0 + add r0, #0xac + str r4, [r0, #0] + add r0, r5, #0 + add r0, #0xb0 + str r6, [r0, #0] + add r0, r5, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x27 + lsl r0, r0, #8 + add r0, r5, r0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02006AA4 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02251E1C + + thumb_func_start ov16_02251E5C +ov16_02251E5C: ; 0x02251E5C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl sub_02006B58 + mov r1, #0x19 + lsl r1, r1, #6 + cmp r0, r1 + blo _02251E78 + bl sub_02022974 +_02251E78: + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #4 + blt _02251E86 + bl sub_02022974 +_02251E86: + add r1, r5, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + add r0, r5, #0 + add r0, #0xac + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r0, #0] + add r1, #0xbc + str r0, [r1, #0] + add r1, r5, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + add r0, r5, #0 + add r0, #0xb0 + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r0, #0] + add r1, #0xcc + str r0, [r1, #0] + add r1, r5, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + add r0, r5, #0 + add r0, #0xb4 + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r0, #0] + add r1, #0xdc + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + add r2, r6, #0 + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xac + str r4, [r0, #0] + add r0, r5, #0 + add r0, #0xb0 + str r6, [r0, #0] + add r0, r5, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x27 + lsl r0, r0, #8 + add r0, r5, r0 + add r1, r4, #0 + bl sub_02006AA4 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02251E5C + + thumb_func_start ov16_02251EF4 +ov16_02251EF4: ; 0x02251EF4 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + cmp r1, #0 + beq _02251F3E + add r1, r4, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + sub r2, r1, #1 + add r1, r4, #0 + add r1, #0xb8 + str r2, [r1, #0] + add r1, r4, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + lsl r2, r1, #2 + add r1, r4, r2 + add r2, r4, r2 + add r1, #0xbc + add r2, #0xcc + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov16_02251E1C + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + add r0, #0xdc + ldr r0, [r0, #0] + add r4, #0xb4 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} +_02251F3E: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02251EF4 + + thumb_func_start ov16_02251F44 +ov16_02251F44: ; 0x02251F44 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + lsl r0, r1, #6 + lsl r6, r2, #4 + add r1, r4, r0 + add r5, r1, r6 + mov r1, #0x22 + add r7, r3, #0 + mov r3, #0 + lsl r1, r1, #8 +_02251F58: + ldrb r2, [r5, r1] + cmp r2, #0 + bne _02251F6C + add r0, r4, r0 + add r0, r0, r6 + add r1, r0, r3 + mov r0, #0x22 + lsl r0, r0, #8 + strb r7, [r1, r0] + b _02251F74 +_02251F6C: + add r3, r3, #1 + add r5, r5, #1 + cmp r3, #0x10 + blt _02251F58 +_02251F74: + cmp r3, #0x10 + blt _02251F7C + bl sub_02022974 +_02251F7C: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02251F44 + + thumb_func_start ov16_02251F80 +ov16_02251F80: ; 0x02251F80 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + str r2, [sp] + add r4, r3, #0 + bne _02251F90 + bl sub_02022974 +_02251F90: + ldr r0, [sp] + lsl r6, r5, #6 + lsl r5, r0, #4 + add r0, r7, r6 + add r3, r0, r5 + mov r0, #0x22 + mov r2, #0 + lsl r0, r0, #8 +_02251FA0: + ldrb r1, [r3, r0] + cmp r4, r1 + bne _02251FB6 + add r1, r7, r6 + add r1, r1, r5 + add r3, r1, r2 + mov r1, #0x22 + mov r0, #0 + lsl r1, r1, #8 + strb r0, [r3, r1] + b _02251FBE +_02251FB6: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #0x10 + blt _02251FA0 +_02251FBE: + cmp r2, #0x10 + blt _02251FC6 + bl sub_02022974 +_02251FC6: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02251F80 + + thumb_func_start ov16_02251FC8 +ov16_02251FC8: ; 0x02251FC8 + push {r3, r4, r5, r6, r7, lr} + mov r2, #0 + mov r4, #0x22 + mov lr, r0 + mov ip, r2 + add r7, r0, #0 + add r6, r2, #0 + lsl r4, r4, #8 +_02251FD8: + mov r0, #0 + add r3, r7, #0 +_02251FDC: + add r1, r6, #0 +_02251FDE: + add r5, r3, r1 + ldrb r5, [r5, r4] + add r1, r1, #1 + add r2, r2, r5 + cmp r1, #0x10 + blt _02251FDE + add r0, r0, #1 + add r3, #0x10 + cmp r0, #4 + blt _02251FDC + mov r0, ip + add r0, r0, #1 + add r7, #0x40 + mov ip, r0 + cmp r0, #4 + blt _02251FD8 + cmp r2, #0 + bne _0225200A + ldr r1, _02252018 ; =0x00003148 + mov r3, #0 + mov r0, lr + str r3, [r0, r1] +_0225200A: + cmp r2, #0 + bne _02252012 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02252012: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02252018: .word 0x00003148 + thumb_func_end ov16_02251FC8 + + thumb_func_start ov16_0225201C +ov16_0225201C: ; 0x0225201C + push {r3, lr} + ldr r1, _02252038 ; =0x00003148 + ldr r2, [r0, r1] + add r2, r2, #1 + str r2, [r0, r1] + ldr r1, [r0, r1] + ldr r0, _0225203C ; =0x00000708 + cmp r1, r0 + ble _02252034 + mov r0, #1 + bl sub_02038AE0 +_02252034: + pop {r3, pc} + nop +_02252038: .word 0x00003148 +_0225203C: .word 0x00000708 + thumb_func_end ov16_0225201C + + thumb_func_start ov16_02252040 +ov16_02252040: ; 0x02252040 + push {r3, r4} + lsl r1, r1, #8 + add r4, r0, r1 + mov r3, #0 + mov r0, #0x23 + mov r1, #1 + add r2, r3, #0 + lsl r0, r0, #8 + lsl r1, r1, #8 +_02252052: + add r3, r3, #1 + strb r2, [r4, r0] + add r4, r4, #1 + cmp r3, r1 + blt _02252052 + pop {r3, r4} + bx lr + thumb_func_end ov16_02252040 + + thumb_func_start ov16_02252060 +ov16_02252060: ; 0x02252060 + push {r4, r5, r6, lr} + mov r4, #0xb5 + lsl r4, r4, #6 + add r5, r0, r4 + mov r6, #0xc0 + add r4, r1, #0 + mul r4, r6 + add r4, r5, r4 + cmp r2, #0x64 + bls _02252076 + b _022523DE +_02252076: + add r5, r2, r2 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_02252082: ; jump table + .short _0225214C - _02252082 - 2 ; case 0 + .short _02252150 - _02252082 - 2 ; case 1 + .short _02252154 - _02252082 - 2 ; case 2 + .short _02252158 - _02252082 - 2 ; case 3 + .short _0225215C - _02252082 - 2 ; case 4 + .short _02252160 - _02252082 - 2 ; case 5 + .short _02252164 - _02252082 - 2 ; case 6 + .short _02252164 - _02252082 - 2 ; case 7 + .short _02252164 - _02252082 - 2 ; case 8 + .short _02252164 - _02252082 - 2 ; case 9 + .short _0225216E - _02252082 - 2 ; case 10 + .short _02252176 - _02252082 - 2 ; case 11 + .short _0225217E - _02252082 - 2 ; case 12 + .short _02252186 - _02252082 - 2 ; case 13 + .short _0225218E - _02252082 - 2 ; case 14 + .short _02252196 - _02252082 - 2 ; case 15 + .short _0225219E - _02252082 - 2 ; case 16 + .short _022521A6 - _02252082 - 2 ; case 17 + .short _022521AC - _02252082 - 2 ; case 18 + .short _022521AC - _02252082 - 2 ; case 19 + .short _022521AC - _02252082 - 2 ; case 20 + .short _022521AC - _02252082 - 2 ; case 21 + .short _022521AC - _02252082 - 2 ; case 22 + .short _022521AC - _02252082 - 2 ; case 23 + .short _022521AC - _02252082 - 2 ; case 24 + .short _022521AC - _02252082 - 2 ; case 25 + .short _022521B6 - _02252082 - 2 ; case 26 + .short _022521BC - _02252082 - 2 ; case 27 + .short _022521BC - _02252082 - 2 ; case 28 + .short _022521C2 - _02252082 - 2 ; case 29 + .short _022521CC - _02252082 - 2 ; case 30 + .short _022521D6 - _02252082 - 2 ; case 31 + .short _022521D6 - _02252082 - 2 ; case 32 + .short _022521D6 - _02252082 - 2 ; case 33 + .short _022521D6 - _02252082 - 2 ; case 34 + .short _022521E0 - _02252082 - 2 ; case 35 + .short _022521E0 - _02252082 - 2 ; case 36 + .short _022521E0 - _02252082 - 2 ; case 37 + .short _022521E0 - _02252082 - 2 ; case 38 + .short _022521EA - _02252082 - 2 ; case 39 + .short _022521EA - _02252082 - 2 ; case 40 + .short _022521EA - _02252082 - 2 ; case 41 + .short _022521EA - _02252082 - 2 ; case 42 + .short _022521FE - _02252082 - 2 ; case 43 + .short _02252204 - _02252082 - 2 ; case 44 + .short _0225220A - _02252082 - 2 ; case 45 + .short _0225221C - _02252082 - 2 ; case 46 + .short _02252228 - _02252082 - 2 ; case 47 + .short _0225222C - _02252082 - 2 ; case 48 + .short _02252230 - _02252082 - 2 ; case 49 + .short _02252246 - _02252082 - 2 ; case 50 + .short _0225224A - _02252082 - 2 ; case 51 + .short _0225224E - _02252082 - 2 ; case 52 + .short _02252252 - _02252082 - 2 ; case 53 + .short _02252256 - _02252082 - 2 ; case 54 + .short _0225225A - _02252082 - 2 ; case 55 + .short _02252260 - _02252082 - 2 ; case 56 + .short _02252266 - _02252082 - 2 ; case 57 + .short _0225226C - _02252082 - 2 ; case 58 + .short _02252276 - _02252082 - 2 ; case 59 + .short _0225227C - _02252082 - 2 ; case 60 + .short _02252282 - _02252082 - 2 ; case 61 + .short _0225228C - _02252082 - 2 ; case 62 + .short _02252296 - _02252082 - 2 ; case 63 + .short _022522A0 - _02252082 - 2 ; case 64 + .short _022522AA - _02252082 - 2 ; case 65 + .short _022522B4 - _02252082 - 2 ; case 66 + .short _022522BE - _02252082 - 2 ; case 67 + .short _022522C8 - _02252082 - 2 ; case 68 + .short _022522D2 - _02252082 - 2 ; case 69 + .short _022522DC - _02252082 - 2 ; case 70 + .short _022522E6 - _02252082 - 2 ; case 71 + .short _022522F0 - _02252082 - 2 ; case 72 + .short _022522FA - _02252082 - 2 ; case 73 + .short _02252302 - _02252082 - 2 ; case 74 + .short _0225230C - _02252082 - 2 ; case 75 + .short _02252316 - _02252082 - 2 ; case 76 + .short _02252320 - _02252082 - 2 ; case 77 + .short _0225232A - _02252082 - 2 ; case 78 + .short _02252334 - _02252082 - 2 ; case 79 + .short _0225233E - _02252082 - 2 ; case 80 + .short _02252348 - _02252082 - 2 ; case 81 + .short _02252352 - _02252082 - 2 ; case 82 + .short _0225235C - _02252082 - 2 ; case 83 + .short _02252366 - _02252082 - 2 ; case 84 + .short _02252370 - _02252082 - 2 ; case 85 + .short _0225237A - _02252082 - 2 ; case 86 + .short _02252384 - _02252082 - 2 ; case 87 + .short _0225238A - _02252082 - 2 ; case 88 + .short _02252390 - _02252082 - 2 ; case 89 + .short _02252396 - _02252082 - 2 ; case 90 + .short _0225239C - _02252082 - 2 ; case 91 + .short _022523A2 - _02252082 - 2 ; case 92 + .short _022523A8 - _02252082 - 2 ; case 93 + .short _022523AE - _02252082 - 2 ; case 94 + .short _022523B4 - _02252082 - 2 ; case 95 + .short _022523BA - _02252082 - 2 ; case 96 + .short _022523C2 - _02252082 - 2 ; case 97 + .short _022523CA - _02252082 - 2 ; case 98 + .short _022523DE - _02252082 - 2 ; case 99 + .short _022523D4 - _02252082 - 2 ; case 100 +_0225214C: + ldrh r0, [r4] + pop {r4, r5, r6, pc} +_02252150: + ldrh r0, [r4, #2] + pop {r4, r5, r6, pc} +_02252154: + ldrh r0, [r4, #4] + pop {r4, r5, r6, pc} +_02252158: + ldrh r0, [r4, #6] + pop {r4, r5, r6, pc} +_0225215C: + ldrh r0, [r4, #8] + pop {r4, r5, r6, pc} +_02252160: + ldrh r0, [r4, #0xa] + pop {r4, r5, r6, pc} +_02252164: + sub r0, r2, #6 + lsl r0, r0, #1 + add r0, r4, r0 + ldrh r0, [r0, #0xc] + pop {r4, r5, r6, pc} +_0225216E: + ldr r0, [r4, #0x14] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_02252176: + ldr r0, [r4, #0x14] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_0225217E: + ldr r0, [r4, #0x14] + lsl r0, r0, #0x11 + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_02252186: + ldr r0, [r4, #0x14] + lsl r0, r0, #0xc + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_0225218E: + ldr r0, [r4, #0x14] + lsl r0, r0, #7 + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_02252196: + ldr r0, [r4, #0x14] + lsl r0, r0, #2 + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_0225219E: + ldr r0, [r4, #0x14] + lsl r0, r0, #1 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_022521A6: + ldr r0, [r4, #0x14] + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_022521AC: + sub r2, #0x12 + add r1, r4, r2 + mov r0, #0x18 + ldrsb r0, [r1, r0] + pop {r4, r5, r6, pc} +_022521B6: + add r4, #0x27 + ldrb r0, [r4] + pop {r4, r5, r6, pc} +_022521BC: + bl ov16_0225B734 + pop {r4, r5, r6, pc} +_022521C2: + add r4, #0x7e + ldrb r0, [r4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + pop {r4, r5, r6, pc} +_022521CC: + add r4, #0x26 + ldrb r0, [r4] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_022521D6: + sub r2, #0x1f + add r0, r4, r2 + add r0, #0x2c + ldrb r0, [r0] + pop {r4, r5, r6, pc} +_022521E0: + sub r2, #0x23 + add r0, r4, r2 + add r0, #0x30 + ldrb r0, [r0] + pop {r4, r5, r6, pc} +_022521EA: + sub r2, #0x27 + lsl r0, r2, #1 + add r1, r4, r2 + add r0, r4, r0 + add r1, #0x30 + ldrh r0, [r0, #0xc] + ldrb r1, [r1] + bl sub_020790DC + pop {r4, r5, r6, pc} +_022521FE: + add r4, #0x34 + ldrb r0, [r4] + pop {r4, r5, r6, pc} +_02252204: + add r4, #0x35 + ldrb r0, [r4] + pop {r4, r5, r6, pc} +_0225220A: + mov r1, #0 +_0225220C: + ldrh r0, [r4, #0x36] + add r1, r1, #1 + add r4, r4, #2 + strh r0, [r3] + add r3, r3, #2 + cmp r1, #0xb + blt _0225220C + b _022523E2 +_0225221C: + add r4, #0x36 + add r0, r3, #0 + add r1, r4, #0 + bl sub_02023D28 + b _022523E2 +_02252228: + ldr r0, [r4, #0x4c] + pop {r4, r5, r6, pc} +_0225222C: + ldr r0, [r4, #0x50] + pop {r4, r5, r6, pc} +_02252230: + mov r1, #0 +_02252232: + add r0, r4, #0 + add r0, #0x54 + ldrh r0, [r0] + add r1, r1, #1 + add r4, r4, #2 + strh r0, [r3] + add r3, r3, #2 + cmp r1, #0xb + blt _02252232 + b _022523E2 +_02252246: + ldr r0, [r4, #0x64] + pop {r4, r5, r6, pc} +_0225224A: + ldr r0, [r4, #0x68] + pop {r4, r5, r6, pc} +_0225224E: + ldr r0, [r4, #0x6c] + pop {r4, r5, r6, pc} +_02252252: + ldr r0, [r4, #0x70] + pop {r4, r5, r6, pc} +_02252256: + ldr r0, [r4, #0x74] + pop {r4, r5, r6, pc} +_0225225A: + add r4, #0x78 + ldrh r0, [r4] + pop {r4, r5, r6, pc} +_02252260: + add r4, #0x7c + ldrb r0, [r4] + pop {r4, r5, r6, pc} +_02252266: + add r4, #0x7d + ldrb r0, [r4] + pop {r4, r5, r6, pc} +_0225226C: + add r4, #0x7e + ldrb r0, [r4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + pop {r4, r5, r6, pc} +_02252276: + add r4, #0x80 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_0225227C: + add r4, #0x84 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252282: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_0225228C: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_02252296: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1e + pop {r4, r5, r6, pc} +_022522A0: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0x15 + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_022522AA: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0x13 + lsr r0, r0, #0x1e + pop {r4, r5, r6, pc} +_022522B4: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0x11 + lsr r0, r0, #0x1e + pop {r4, r5, r6, pc} +_022522BE: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0xe + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_022522C8: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #0xb + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_022522D2: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #8 + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_022522DC: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #5 + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_022522E6: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #2 + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_022522F0: + add r4, #0x88 + ldr r0, [r4, #0] + lsl r0, r0, #1 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_022522FA: + add r4, #0x88 + ldr r0, [r4, #0] + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_02252302: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1e + pop {r4, r5, r6, pc} +_0225230C: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1c + pop {r4, r5, r6, pc} +_02252316: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1e + pop {r4, r5, r6, pc} +_02252320: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1e + pop {r4, r5, r6, pc} +_0225232A: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0x13 + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_02252334: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_0225233E: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0xd + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_02252348: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #0xa + lsr r0, r0, #0x1d + pop {r4, r5, r6, pc} +_02252352: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #9 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_0225235C: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #5 + lsr r0, r0, #0x1c + pop {r4, r5, r6, pc} +_02252366: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #4 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_02252370: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #3 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_0225237A: + add r4, #0x8c + ldr r0, [r4, #0] + lsl r0, r0, #2 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_02252384: + add r4, #0x90 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_0225238A: + add r4, #0x94 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252390: + add r4, #0x98 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252396: + add r4, #0xa0 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_0225239C: + add r4, #0xa4 + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_022523A2: + add r4, #0xa8 + ldrh r0, [r4] + pop {r4, r5, r6, pc} +_022523A8: + add r4, #0xac + ldrh r0, [r4] + pop {r4, r5, r6, pc} +_022523AE: + add r4, #0xaa + ldrh r0, [r4] + pop {r4, r5, r6, pc} +_022523B4: + add r4, #0xbc + ldr r0, [r4, #0] + pop {r4, r5, r6, pc} +_022523BA: + ldr r0, [r4, #0x28] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_022523C2: + ldr r0, [r4, #0x28] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + pop {r4, r5, r6, pc} +_022523CA: + add r4, #0x26 + ldrb r0, [r4] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1b + pop {r4, r5, r6, pc} +_022523D4: + add r6, #0x78 + ldr r2, [r0, r6] + bl ov16_02252060 + pop {r4, r5, r6, pc} +_022523DE: + bl sub_02022974 +_022523E2: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02252060 + + thumb_func_start ov16_022523E8 +ov16_022523E8: ; 0x022523E8 + push {r4, r5, r6, lr} + add r5, r2, #0 + mov r2, #0xb5 + lsl r2, r2, #6 + add r4, r0, r2 + mov r6, #0xc0 + add r2, r1, #0 + mul r2, r6 + add r2, r4, r2 + cmp r5, #0x64 + bls _02252400 + b _022529FE +_02252400: + add r4, r5, r5 + add r4, pc + ldrh r4, [r4, #6] + lsl r4, r4, #0x10 + asr r4, r4, #0x10 + add pc, r4 +_0225240C: ; jump table + .short _022524D6 - _0225240C - 2 ; case 0 + .short _022524DC - _0225240C - 2 ; case 1 + .short _022524E2 - _0225240C - 2 ; case 2 + .short _022524E8 - _0225240C - 2 ; case 3 + .short _022524EE - _0225240C - 2 ; case 4 + .short _022524F4 - _0225240C - 2 ; case 5 + .short _022524FA - _0225240C - 2 ; case 6 + .short _022524FA - _0225240C - 2 ; case 7 + .short _022524FA - _0225240C - 2 ; case 8 + .short _022524FA - _0225240C - 2 ; case 9 + .short _02252506 - _0225240C - 2 ; case 10 + .short _02252518 - _0225240C - 2 ; case 11 + .short _0225252A - _0225240C - 2 ; case 12 + .short _0225253C - _0225240C - 2 ; case 13 + .short _0225254E - _0225240C - 2 ; case 14 + .short _02252560 - _0225240C - 2 ; case 15 + .short _02252572 - _0225240C - 2 ; case 16 + .short _02252584 - _0225240C - 2 ; case 17 + .short _02252594 - _0225240C - 2 ; case 18 + .short _02252594 - _0225240C - 2 ; case 19 + .short _02252594 - _0225240C - 2 ; case 20 + .short _02252594 - _0225240C - 2 ; case 21 + .short _02252594 - _0225240C - 2 ; case 22 + .short _02252594 - _0225240C - 2 ; case 23 + .short _02252594 - _0225240C - 2 ; case 24 + .short _02252594 - _0225240C - 2 ; case 25 + .short _022525A0 - _0225240C - 2 ; case 26 + .short _022525A8 - _0225240C - 2 ; case 27 + .short _022525B0 - _0225240C - 2 ; case 28 + .short _022525B8 - _0225240C - 2 ; case 29 + .short _022525D0 - _0225240C - 2 ; case 30 + .short _022525E8 - _0225240C - 2 ; case 31 + .short _022525E8 - _0225240C - 2 ; case 32 + .short _022525E8 - _0225240C - 2 ; case 33 + .short _022525E8 - _0225240C - 2 ; case 34 + .short _022525F4 - _0225240C - 2 ; case 35 + .short _022525F4 - _0225240C - 2 ; case 36 + .short _022525F4 - _0225240C - 2 ; case 37 + .short _022525F4 - _0225240C - 2 ; case 38 + .short _02252600 - _0225240C - 2 ; case 39 + .short _02252600 - _0225240C - 2 ; case 40 + .short _02252600 - _0225240C - 2 ; case 41 + .short _02252600 - _0225240C - 2 ; case 42 + .short _02252606 - _0225240C - 2 ; case 43 + .short _0225260E - _0225240C - 2 ; case 44 + .short _02252616 - _0225240C - 2 ; case 45 + .short _022529FE - _0225240C - 2 ; case 46 + .short _02252628 - _0225240C - 2 ; case 47 + .short _02252630 - _0225240C - 2 ; case 48 + .short _02252636 - _0225240C - 2 ; case 49 + .short _0225264C - _0225240C - 2 ; case 50 + .short _02252652 - _0225240C - 2 ; case 51 + .short _02252658 - _0225240C - 2 ; case 52 + .short _0225265E - _0225240C - 2 ; case 53 + .short _02252664 - _0225240C - 2 ; case 54 + .short _0225266A - _0225240C - 2 ; case 55 + .short _02252672 - _0225240C - 2 ; case 56 + .short _0225267A - _0225240C - 2 ; case 57 + .short _02252682 - _0225240C - 2 ; case 58 + .short _0225269A - _0225240C - 2 ; case 59 + .short _022526A2 - _0225240C - 2 ; case 60 + .short _022526AA - _0225240C - 2 ; case 61 + .short _022526C2 - _0225240C - 2 ; case 62 + .short _022526DA - _0225240C - 2 ; case 63 + .short _022526F2 - _0225240C - 2 ; case 64 + .short _0225270A - _0225240C - 2 ; case 65 + .short _02252722 - _0225240C - 2 ; case 66 + .short _0225273A - _0225240C - 2 ; case 67 + .short _02252752 - _0225240C - 2 ; case 68 + .short _0225276A - _0225240C - 2 ; case 69 + .short _02252782 - _0225240C - 2 ; case 70 + .short _0225279A - _0225240C - 2 ; case 71 + .short _022527B2 - _0225240C - 2 ; case 72 + .short _022527CA - _0225240C - 2 ; case 73 + .short _022527E0 - _0225240C - 2 ; case 74 + .short _022527F8 - _0225240C - 2 ; case 75 + .short _02252810 - _0225240C - 2 ; case 76 + .short _02252828 - _0225240C - 2 ; case 77 + .short _02252840 - _0225240C - 2 ; case 78 + .short _02252858 - _0225240C - 2 ; case 79 + .short _02252870 - _0225240C - 2 ; case 80 + .short _02252888 - _0225240C - 2 ; case 81 + .short _022528A0 - _0225240C - 2 ; case 82 + .short _02252910 - _0225240C - 2 ; case 83 + .short _02252928 - _0225240C - 2 ; case 84 + .short _02252940 - _0225240C - 2 ; case 85 + .short _02252958 - _0225240C - 2 ; case 86 + .short _02252970 - _0225240C - 2 ; case 87 + .short _02252978 - _0225240C - 2 ; case 88 + .short _02252980 - _0225240C - 2 ; case 89 + .short _02252988 - _0225240C - 2 ; case 90 + .short _02252990 - _0225240C - 2 ; case 91 + .short _02252998 - _0225240C - 2 ; case 92 + .short _022529A0 - _0225240C - 2 ; case 93 + .short _022529A8 - _0225240C - 2 ; case 94 + .short _022529B0 - _0225240C - 2 ; case 95 + .short _022529B8 - _0225240C - 2 ; case 96 + .short _022529CA - _0225240C - 2 ; case 97 + .short _022529DC - _0225240C - 2 ; case 98 + .short _022529FE - _0225240C - 2 ; case 99 + .short _022529F4 - _0225240C - 2 ; case 100 +_022524D6: + ldrh r0, [r3] + strh r0, [r2] + pop {r4, r5, r6, pc} +_022524DC: + ldrh r0, [r3] + strh r0, [r2, #2] + pop {r4, r5, r6, pc} +_022524E2: + ldrh r0, [r3] + strh r0, [r2, #4] + pop {r4, r5, r6, pc} +_022524E8: + ldrh r0, [r3] + strh r0, [r2, #6] + pop {r4, r5, r6, pc} +_022524EE: + ldrh r0, [r3] + strh r0, [r2, #8] + pop {r4, r5, r6, pc} +_022524F4: + ldrh r0, [r3] + strh r0, [r2, #0xa] + pop {r4, r5, r6, pc} +_022524FA: + sub r0, r5, #6 + lsl r0, r0, #1 + ldrh r1, [r3] + add r0, r2, r0 + strh r1, [r0, #0xc] + pop {r4, r5, r6, pc} +_02252506: + ldr r4, [r2, #0x14] + mov r0, #0x1f + bic r4, r0 + ldrb r1, [r3] + mov r0, #0x1f + and r0, r1 + orr r0, r4 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_02252518: + ldr r1, [r2, #0x14] + ldr r0, _022528AC ; =0xFFFFFC1F + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1b + lsr r0, r0, #0x16 + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_0225252A: + ldr r1, [r2, #0x14] + ldr r0, _022528B0 ; =0xFFFF83FF + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1b + lsr r0, r0, #0x11 + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_0225253C: + ldr r1, [r2, #0x14] + ldr r0, _022528B4 ; =0xFFF07FFF + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1b + lsr r0, r0, #0xc + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_0225254E: + ldr r1, [r2, #0x14] + ldr r0, _022528B8 ; =0xFE0FFFFF + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1b + lsr r0, r0, #7 + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_02252560: + ldr r1, [r2, #0x14] + ldr r0, _022528BC ; =0xC1FFFFFF + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1b + lsr r0, r0, #2 + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_02252572: + ldr r1, [r2, #0x14] + ldr r0, _022528C0 ; =0xBFFFFFFF + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #1 + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_02252584: + ldr r1, [r2, #0x14] + ldr r0, _022528C4 ; =0x7FFFFFFF + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + orr r0, r1 + str r0, [r2, #0x14] + pop {r4, r5, r6, pc} +_02252594: + mov r0, #0 + ldrsb r1, [r3, r0] + sub r5, #0x12 + add r0, r2, r5 + strb r1, [r0, #0x18] + pop {r4, r5, r6, pc} +_022525A0: + ldrb r0, [r3] + add r2, #0x27 + strb r0, [r2] + pop {r4, r5, r6, pc} +_022525A8: + ldrb r0, [r3] + add r2, #0x24 + strb r0, [r2] + pop {r4, r5, r6, pc} +_022525B0: + ldrb r0, [r3] + add r2, #0x25 + strb r0, [r2] + pop {r4, r5, r6, pc} +_022525B8: + add r0, r2, #0 + add r0, #0x7e + ldrb r4, [r0] + ldrb r1, [r3] + mov r0, #0xf + bic r4, r0 + mov r0, #0xf + and r0, r1 + orr r0, r4 + add r2, #0x7e + strb r0, [r2] + pop {r4, r5, r6, pc} +_022525D0: + add r0, r2, #0 + add r0, #0x26 + ldrb r1, [r0] + mov r0, #0x20 + add r2, #0x26 + bic r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1a + orr r0, r1 + strb r0, [r2] + pop {r4, r5, r6, pc} +_022525E8: + sub r5, #0x1f + add r0, r2, r5 + ldrb r1, [r3] + add r0, #0x2c + strb r1, [r0] + pop {r4, r5, r6, pc} +_022525F4: + sub r5, #0x23 + add r0, r2, r5 + ldrb r1, [r3] + add r0, #0x30 + strb r1, [r0] + pop {r4, r5, r6, pc} +_02252600: + bl sub_02022974 + pop {r4, r5, r6, pc} +_02252606: + ldrb r0, [r3] + add r2, #0x34 + strb r0, [r2] + pop {r4, r5, r6, pc} +_0225260E: + ldrb r0, [r3] + add r2, #0x35 + strb r0, [r2] + pop {r4, r5, r6, pc} +_02252616: + mov r1, #0 +_02252618: + ldrh r0, [r3] + add r1, r1, #1 + add r3, r3, #2 + strh r0, [r2, #0x36] + add r2, r2, #2 + cmp r1, #0xb + blt _02252618 + pop {r4, r5, r6, pc} +_02252628: + mov r0, #0 + ldrsh r0, [r3, r0] + str r0, [r2, #0x4c] + pop {r4, r5, r6, pc} +_02252630: + ldrh r0, [r3] + str r0, [r2, #0x50] + pop {r4, r5, r6, pc} +_02252636: + mov r4, #0 +_02252638: + ldrh r1, [r3] + add r0, r2, #0 + add r0, #0x54 + add r4, r4, #1 + strh r1, [r0] + add r3, r3, #2 + add r2, r2, #2 + cmp r4, #0xb + blt _02252638 + pop {r4, r5, r6, pc} +_0225264C: + ldr r0, [r3, #0] + str r0, [r2, #0x64] + pop {r4, r5, r6, pc} +_02252652: + ldr r0, [r3, #0] + str r0, [r2, #0x68] + pop {r4, r5, r6, pc} +_02252658: + ldr r0, [r3, #0] + str r0, [r2, #0x6c] + pop {r4, r5, r6, pc} +_0225265E: + ldr r0, [r3, #0] + str r0, [r2, #0x70] + pop {r4, r5, r6, pc} +_02252664: + ldr r0, [r3, #0] + str r0, [r2, #0x74] + pop {r4, r5, r6, pc} +_0225266A: + ldrh r0, [r3] + add r2, #0x78 + strh r0, [r2] + pop {r4, r5, r6, pc} +_02252672: + ldrb r0, [r3] + add r2, #0x7c + strb r0, [r2] + pop {r4, r5, r6, pc} +_0225267A: + ldrb r0, [r3] + add r2, #0x7d + strb r0, [r2] + pop {r4, r5, r6, pc} +_02252682: + add r0, r2, #0 + add r0, #0x7e + ldrb r1, [r0] + mov r0, #0xf0 + add r2, #0x7e + bic r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1c + lsr r0, r0, #0x18 + orr r0, r1 + strb r0, [r2] + pop {r4, r5, r6, pc} +_0225269A: + ldr r0, [r3, #0] + add r2, #0x80 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022526A2: + ldr r0, [r3, #0] + add r2, #0x84 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022526AA: + add r0, r2, #0 + add r0, #0x88 + ldr r4, [r0, #0] + mov r0, #7 + bic r4, r0 + ldrb r1, [r3] + mov r0, #7 + add r2, #0x88 + and r0, r1 + orr r0, r4 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022526C2: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + mov r0, #0x38 + bic r1, r0 + ldrb r0, [r3] + add r2, #0x88 + lsl r0, r0, #0x1d + lsr r0, r0, #0x1a + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022526DA: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + mov r0, #0xc0 + bic r1, r0 + ldrb r0, [r3] + add r2, #0x88 + lsl r0, r0, #0x1e + lsr r0, r0, #0x18 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022526F2: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528C8 ; =0xFFFFF8FF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0x15 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_0225270A: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528CC ; =0xFFFFE7FF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1e + lsr r0, r0, #0x13 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252722: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528D0 ; =0xFFFF9FFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1e + lsr r0, r0, #0x11 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_0225273A: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528D4 ; =0xFFFC7FFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0xe + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252752: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528D8 ; =0xFFE3FFFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0xb + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_0225276A: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528DC ; =0xFF1FFFFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #8 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252782: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528E0 ; =0xF8FFFFFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #5 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_0225279A: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528E4 ; =0xC7FFFFFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #2 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022527B2: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528C0 ; =0xBFFFFFFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #1 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022527CA: + add r0, r2, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _022528C4 ; =0x7FFFFFFF + add r2, #0x88 + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022527E0: + add r0, r2, #0 + add r0, #0x8c + ldr r4, [r0, #0] + mov r0, #3 + bic r4, r0 + ldrb r1, [r3] + mov r0, #3 + add r2, #0x8c + and r0, r1 + orr r0, r4 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022527F8: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + mov r0, #0x3c + bic r1, r0 + ldrb r0, [r3] + add r2, #0x8c + lsl r0, r0, #0x1c + lsr r0, r0, #0x1a + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252810: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + mov r0, #0xc0 + bic r1, r0 + ldrb r0, [r3] + add r2, #0x8c + lsl r0, r0, #0x1e + lsr r0, r0, #0x18 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252828: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _022528E8 ; =0xFFFFFCFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1e + lsr r0, r0, #0x16 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252840: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _022528EC ; =0xFFFFE3FF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0x13 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252858: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _022528F0 ; =0xFFFF1FFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0x10 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252870: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _022528F4 ; =0xFFF8FFFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0xd + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252888: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _022528F8 ; =0xFFC7FFFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0xa + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022528A0: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _022528FC ; =0xFFBFFFFF + b _02252900 + nop +_022528AC: .word 0xFFFFFC1F +_022528B0: .word 0xFFFF83FF +_022528B4: .word 0xFFF07FFF +_022528B8: .word 0xFE0FFFFF +_022528BC: .word 0xC1FFFFFF +_022528C0: .word 0xBFFFFFFF +_022528C4: .word 0x7FFFFFFF +_022528C8: .word 0xFFFFF8FF +_022528CC: .word 0xFFFFE7FF +_022528D0: .word 0xFFFF9FFF +_022528D4: .word 0xFFFC7FFF +_022528D8: .word 0xFFE3FFFF +_022528DC: .word 0xFF1FFFFF +_022528E0: .word 0xF8FFFFFF +_022528E4: .word 0xC7FFFFFF +_022528E8: .word 0xFFFFFCFF +_022528EC: .word 0xFFFFE3FF +_022528F0: .word 0xFFFF1FFF +_022528F4: .word 0xFFF8FFFF +_022528F8: .word 0xFFC7FFFF +_022528FC: .word 0xFFBFFFFF +_02252900: + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #9 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252910: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252A04 ; =0xF87FFFFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1c + lsr r0, r0, #5 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252928: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252A08 ; =0xF7FFFFFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #4 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252940: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252A0C ; =0xEFFFFFFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #3 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252958: + add r0, r2, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252A10 ; =0xDFFFFFFF + add r2, #0x8c + and r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #2 + orr r0, r1 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252970: + ldr r0, [r3, #0] + add r2, #0x90 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252978: + ldr r0, [r3, #0] + add r2, #0x94 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252980: + ldr r0, [r3, #0] + add r2, #0x98 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252988: + ldr r0, [r3, #0] + add r2, #0xa0 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252990: + ldr r0, [r3, #0] + add r2, #0xa4 + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_02252998: + ldrh r0, [r3] + add r2, #0xa8 + strh r0, [r2] + pop {r4, r5, r6, pc} +_022529A0: + ldrh r0, [r3] + add r2, #0xac + strh r0, [r2] + pop {r4, r5, r6, pc} +_022529A8: + ldrh r0, [r3] + add r2, #0xaa + strh r0, [r2] + pop {r4, r5, r6, pc} +_022529B0: + ldr r0, [r3, #0] + add r2, #0xbc + str r0, [r2, #0] + pop {r4, r5, r6, pc} +_022529B8: + ldr r1, [r2, #0x28] + mov r0, #0x40 + bic r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x19 + orr r0, r1 + str r0, [r2, #0x28] + pop {r4, r5, r6, pc} +_022529CA: + ldr r1, [r2, #0x28] + mov r0, #0x80 + bic r1, r0 + ldrb r0, [r3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x18 + orr r0, r1 + str r0, [r2, #0x28] + pop {r4, r5, r6, pc} +_022529DC: + add r0, r2, #0 + add r0, #0x26 + ldrb r4, [r0] + ldrb r1, [r3] + mov r0, #0x1f + bic r4, r0 + mov r0, #0x1f + and r0, r1 + orr r0, r4 + add r2, #0x26 + strb r0, [r2] + pop {r4, r5, r6, pc} +_022529F4: + add r6, #0x78 + ldr r2, [r0, r6] + bl ov16_022523E8 + pop {r4, r5, r6, pc} +_022529FE: + bl sub_02022974 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02252A04: .word 0xF87FFFFF +_02252A08: .word 0xF7FFFFFF +_02252A0C: .word 0xEFFFFFFF +_02252A10: .word 0xDFFFFFFF + thumb_func_end ov16_022523E8 + + thumb_func_start ov16_02252A14 +ov16_02252A14: ; 0x02252A14 + push {r4, lr} + mov r4, #0xb5 + lsl r4, r4, #6 + add r4, r0, r4 + mov r0, #0xc0 + mul r0, r1 + add r1, r2, #0 + add r0, r4, r0 + add r2, r3, #0 + bl ov16_02252A2C + pop {r4, pc} + thumb_func_end ov16_02252A14 + + thumb_func_start ov16_02252A2C +ov16_02252A2C: ; 0x02252A2C + push {r4, r5, r6, lr} + add r4, r0, #0 + add r5, r2, #0 + cmp r1, #0x62 + bls _02252A38 + b _02252E82 +_02252A38: + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02252A44: ; jump table + .short _02252E82 - _02252A44 - 2 ; case 0 + .short _02252B0A - _02252A44 - 2 ; case 1 + .short _02252B12 - _02252A44 - 2 ; case 2 + .short _02252B1A - _02252A44 - 2 ; case 3 + .short _02252B22 - _02252A44 - 2 ; case 4 + .short _02252B2A - _02252A44 - 2 ; case 5 + .short _02252E82 - _02252A44 - 2 ; case 6 + .short _02252E82 - _02252A44 - 2 ; case 7 + .short _02252E82 - _02252A44 - 2 ; case 8 + .short _02252E82 - _02252A44 - 2 ; case 9 + .short _02252B32 - _02252A44 - 2 ; case 10 + .short _02252B4A - _02252A44 - 2 ; case 11 + .short _02252B60 - _02252A44 - 2 ; case 12 + .short _02252B76 - _02252A44 - 2 ; case 13 + .short _02252B8C - _02252A44 - 2 ; case 14 + .short _02252BA2 - _02252A44 - 2 ; case 15 + .short _02252E82 - _02252A44 - 2 ; case 16 + .short _02252E82 - _02252A44 - 2 ; case 17 + .short _02252BB8 - _02252A44 - 2 ; case 18 + .short _02252BB8 - _02252A44 - 2 ; case 19 + .short _02252BB8 - _02252A44 - 2 ; case 20 + .short _02252BB8 - _02252A44 - 2 ; case 21 + .short _02252BB8 - _02252A44 - 2 ; case 22 + .short _02252BB8 - _02252A44 - 2 ; case 23 + .short _02252BB8 - _02252A44 - 2 ; case 24 + .short _02252BB8 - _02252A44 - 2 ; case 25 + .short _02252E82 - _02252A44 - 2 ; case 26 + .short _02252E82 - _02252A44 - 2 ; case 27 + .short _02252E82 - _02252A44 - 2 ; case 28 + .short _02252E82 - _02252A44 - 2 ; case 29 + .short _02252E82 - _02252A44 - 2 ; case 30 + .short _02252BD6 - _02252A44 - 2 ; case 31 + .short _02252BD6 - _02252A44 - 2 ; case 32 + .short _02252BD6 - _02252A44 - 2 ; case 33 + .short _02252BD6 - _02252A44 - 2 ; case 34 + .short _02252BFC - _02252A44 - 2 ; case 35 + .short _02252BFC - _02252A44 - 2 ; case 36 + .short _02252BFC - _02252A44 - 2 ; case 37 + .short _02252BFC - _02252A44 - 2 ; case 38 + .short _02252E82 - _02252A44 - 2 ; case 39 + .short _02252E82 - _02252A44 - 2 ; case 40 + .short _02252E82 - _02252A44 - 2 ; case 41 + .short _02252E82 - _02252A44 - 2 ; case 42 + .short _02252C08 - _02252A44 - 2 ; case 43 + .short _02252C16 - _02252A44 - 2 ; case 44 + .short _02252E82 - _02252A44 - 2 ; case 45 + .short _02252E82 - _02252A44 - 2 ; case 46 + .short _02252C32 - _02252A44 - 2 ; case 47 + .short _02252C44 - _02252A44 - 2 ; case 48 + .short _02252E82 - _02252A44 - 2 ; case 49 + .short _02252C4C - _02252A44 - 2 ; case 50 + .short _02252C54 - _02252A44 - 2 ; case 51 + .short _02252E82 - _02252A44 - 2 ; case 52 + .short _02252E82 - _02252A44 - 2 ; case 53 + .short _02252E82 - _02252A44 - 2 ; case 54 + .short _02252E82 - _02252A44 - 2 ; case 55 + .short _02252E82 - _02252A44 - 2 ; case 56 + .short _02252E82 - _02252A44 - 2 ; case 57 + .short _02252E82 - _02252A44 - 2 ; case 58 + .short _02252E82 - _02252A44 - 2 ; case 59 + .short _02252E82 - _02252A44 - 2 ; case 60 + .short _02252C5C - _02252A44 - 2 ; case 61 + .short _02252C7A - _02252A44 - 2 ; case 62 + .short _02252C98 - _02252A44 - 2 ; case 63 + .short _02252CB6 - _02252A44 - 2 ; case 64 + .short _02252CD2 - _02252A44 - 2 ; case 65 + .short _02252CEE - _02252A44 - 2 ; case 66 + .short _02252D0A - _02252A44 - 2 ; case 67 + .short _02252D26 - _02252A44 - 2 ; case 68 + .short _02252D42 - _02252A44 - 2 ; case 69 + .short _02252D5E - _02252A44 - 2 ; case 70 + .short _02252D7A - _02252A44 - 2 ; case 71 + .short _02252E82 - _02252A44 - 2 ; case 72 + .short _02252E82 - _02252A44 - 2 ; case 73 + .short _02252E82 - _02252A44 - 2 ; case 74 + .short _02252E82 - _02252A44 - 2 ; case 75 + .short _02252E82 - _02252A44 - 2 ; case 76 + .short _02252E82 - _02252A44 - 2 ; case 77 + .short _02252D96 - _02252A44 - 2 ; case 78 + .short _02252DB2 - _02252A44 - 2 ; case 79 + .short _02252DCE - _02252A44 - 2 ; case 80 + .short _02252E82 - _02252A44 - 2 ; case 81 + .short _02252E82 - _02252A44 - 2 ; case 82 + .short _02252E82 - _02252A44 - 2 ; case 83 + .short _02252E82 - _02252A44 - 2 ; case 84 + .short _02252E82 - _02252A44 - 2 ; case 85 + .short _02252E82 - _02252A44 - 2 ; case 86 + .short _02252DEA - _02252A44 - 2 ; case 87 + .short _02252DF8 - _02252A44 - 2 ; case 88 + .short _02252E06 - _02252A44 - 2 ; case 89 + .short _02252E14 - _02252A44 - 2 ; case 90 + .short _02252E82 - _02252A44 - 2 ; case 91 + .short _02252E82 - _02252A44 - 2 ; case 92 + .short _02252E82 - _02252A44 - 2 ; case 93 + .short _02252E82 - _02252A44 - 2 ; case 94 + .short _02252E22 - _02252A44 - 2 ; case 95 + .short _02252E30 - _02252A44 - 2 ; case 96 + .short _02252E48 - _02252A44 - 2 ; case 97 + .short _02252E60 - _02252A44 - 2 ; case 98 +_02252B0A: + ldrh r0, [r4, #2] + add r0, r0, r5 + strh r0, [r4, #2] + pop {r4, r5, r6, pc} +_02252B12: + ldrh r0, [r4, #4] + add r0, r0, r5 + strh r0, [r4, #4] + pop {r4, r5, r6, pc} +_02252B1A: + ldrh r0, [r4, #6] + add r0, r0, r5 + strh r0, [r4, #6] + pop {r4, r5, r6, pc} +_02252B22: + ldrh r0, [r4, #8] + add r0, r0, r5 + strh r0, [r4, #8] + pop {r4, r5, r6, pc} +_02252B2A: + ldrh r0, [r4, #0xa] + add r0, r0, r5 + strh r0, [r4, #0xa] + pop {r4, r5, r6, pc} +_02252B32: + ldr r2, [r4, #0x14] + mov r1, #0x1f + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x1b + lsr r1, r1, #0x1b + add r2, r1, r5 + mov r1, #0x1f + and r1, r2 + orr r0, r1 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02252B4A: + ldr r1, [r4, #0x14] + ldr r0, _02252E88 ; =0xFFFFFC1F + and r0, r1 + lsl r1, r1, #0x16 + lsr r1, r1, #0x1b + add r1, r1, r5 + lsl r1, r1, #0x1b + lsr r1, r1, #0x16 + orr r0, r1 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02252B60: + ldr r1, [r4, #0x14] + ldr r0, _02252E8C ; =0xFFFF83FF + and r0, r1 + lsl r1, r1, #0x11 + lsr r1, r1, #0x1b + add r1, r1, r5 + lsl r1, r1, #0x1b + lsr r1, r1, #0x11 + orr r0, r1 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02252B76: + ldr r1, [r4, #0x14] + ldr r0, _02252E90 ; =0xFFF07FFF + and r0, r1 + lsl r1, r1, #0xc + lsr r1, r1, #0x1b + add r1, r1, r5 + lsl r1, r1, #0x1b + lsr r1, r1, #0xc + orr r0, r1 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02252B8C: + ldr r1, [r4, #0x14] + ldr r0, _02252E94 ; =0xFE0FFFFF + and r0, r1 + lsl r1, r1, #7 + lsr r1, r1, #0x1b + add r1, r1, r5 + lsl r1, r1, #0x1b + lsr r1, r1, #7 + orr r0, r1 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02252BA2: + ldr r1, [r4, #0x14] + ldr r0, _02252E98 ; =0xC1FFFFFF + and r0, r1 + lsl r1, r1, #2 + lsr r1, r1, #0x1b + add r1, r1, r5 + lsl r1, r1, #0x1b + lsr r1, r1, #2 + orr r0, r1 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02252BB8: + add r4, #0x18 + sub r1, #0x12 + ldrsb r0, [r4, r1] + add r0, r5, r0 + bpl _02252BC8 + mov r0, #0 + strb r0, [r4, r1] + pop {r4, r5, r6, pc} +_02252BC8: + cmp r0, #0xc + ble _02252BD2 + mov r0, #0xc + strb r0, [r4, r1] + pop {r4, r5, r6, pc} +_02252BD2: + strb r0, [r4, r1] + pop {r4, r5, r6, pc} +_02252BD6: + add r6, r1, #0 + sub r6, #0x1f + lsl r0, r6, #1 + add r1, r4, r6 + add r0, r4, r0 + add r1, #0x30 + ldrh r0, [r0, #0xc] + ldrb r1, [r1] + bl sub_020790DC + add r4, #0x2c + ldrb r1, [r4, r6] + add r1, r5, r1 + cmp r1, r0 + ble _02252BF8 + strb r0, [r4, r6] + pop {r4, r5, r6, pc} +_02252BF8: + strb r1, [r4, r6] + pop {r4, r5, r6, pc} +_02252BFC: + add r4, #0x30 + sub r1, #0x23 + ldrb r0, [r4, r1] + add r0, r0, r5 + strb r0, [r4, r1] + pop {r4, r5, r6, pc} +_02252C08: + add r0, r4, #0 + add r0, #0x34 + ldrb r0, [r0] + add r4, #0x34 + add r0, r0, r5 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02252C16: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + add r0, r0, r5 + cmp r0, #0xff + ble _02252C26 + mov r0, #0xff + b _02252C2C +_02252C26: + cmp r0, #0 + bge _02252C2C + mov r0, #0 +_02252C2C: + add r4, #0x35 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02252C32: + ldr r0, [r4, #0x4c] + ldr r1, [r4, #0x50] + add r0, r0, r5 + cmp r0, r1 + bls _02252C40 + str r1, [r4, #0x4c] + pop {r4, r5, r6, pc} +_02252C40: + str r0, [r4, #0x4c] + pop {r4, r5, r6, pc} +_02252C44: + ldr r0, [r4, #0x50] + add r0, r0, r5 + str r0, [r4, #0x50] + pop {r4, r5, r6, pc} +_02252C4C: + ldr r0, [r4, #0x64] + add r0, r0, r5 + str r0, [r4, #0x64] + pop {r4, r5, r6, pc} +_02252C54: + ldr r0, [r4, #0x68] + add r0, r0, r5 + str r0, [r4, #0x68] + pop {r4, r5, r6, pc} +_02252C5C: + add r0, r4, #0 + add r0, #0x88 + ldr r2, [r0, #0] + mov r1, #7 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x1d + lsr r1, r1, #0x1d + add r2, r1, r5 + mov r1, #7 + and r1, r2 + orr r0, r1 + add r4, #0x88 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252C7A: + add r0, r4, #0 + add r0, #0x88 + ldr r2, [r0, #0] + mov r1, #0x38 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x1a + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0x1a + orr r0, r1 + add r4, #0x88 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252C98: + add r0, r4, #0 + add r0, #0x88 + ldr r2, [r0, #0] + mov r1, #0xc0 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x18 + lsr r1, r1, #0x1e + add r1, r1, r5 + lsl r1, r1, #0x1e + lsr r1, r1, #0x18 + orr r0, r1 + add r4, #0x88 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252CB6: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252E9C ; =0xFFFFF8FF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #0x15 + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0x15 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252CD2: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EA0 ; =0xFFFFE7FF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #0x13 + lsr r1, r1, #0x1e + add r1, r1, r5 + lsl r1, r1, #0x1e + lsr r1, r1, #0x13 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252CEE: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EA4 ; =0xFFFF9FFF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #0x11 + lsr r1, r1, #0x1e + add r1, r1, r5 + lsl r1, r1, #0x1e + lsr r1, r1, #0x11 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252D0A: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EA8 ; =0xFFFC7FFF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #0xe + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0xe + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252D26: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EAC ; =0xFFE3FFFF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #0xb + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0xb + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252D42: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EB0 ; =0xFF1FFFFF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #8 + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #8 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252D5E: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EB4 ; =0xF8FFFFFF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #5 + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #5 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252D7A: + add r0, r4, #0 + add r0, #0x88 + ldr r1, [r0, #0] + ldr r0, _02252EB8 ; =0xC7FFFFFF + add r4, #0x88 + and r0, r1 + lsl r1, r1, #2 + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #2 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252D96: + add r0, r4, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252EBC ; =0xFFFFE3FF + add r4, #0x8c + and r0, r1 + lsl r1, r1, #0x13 + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0x13 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252DB2: + add r0, r4, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252EC0 ; =0xFFFF1FFF + add r4, #0x8c + and r0, r1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0x10 + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252DCE: + add r0, r4, #0 + add r0, #0x8c + ldr r1, [r0, #0] + ldr r0, _02252EC4 ; =0xFFF8FFFF + add r4, #0x8c + and r0, r1 + lsl r1, r1, #0xd + lsr r1, r1, #0x1d + add r1, r1, r5 + lsl r1, r1, #0x1d + lsr r1, r1, #0xd + orr r0, r1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252DEA: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r4, #0x90 + add r0, r0, r5 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252DF8: + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r4, #0x94 + add r0, r0, r5 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252E06: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r4, #0x98 + add r0, r0, r5 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252E14: + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + add r4, #0xa0 + add r0, r0, r5 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252E22: + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + add r4, #0xbc + add r0, r0, r5 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_02252E30: + ldr r2, [r4, #0x28] + mov r1, #0x40 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x19 + lsr r1, r1, #0x1f + add r1, r1, r5 + lsl r1, r1, #0x1f + lsr r1, r1, #0x19 + orr r0, r1 + str r0, [r4, #0x28] + pop {r4, r5, r6, pc} +_02252E48: + ldr r2, [r4, #0x28] + mov r1, #0x80 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x18 + lsr r1, r1, #0x1f + add r1, r1, r5 + lsl r1, r1, #0x1f + lsr r1, r1, #0x18 + orr r0, r1 + str r0, [r4, #0x28] + pop {r4, r5, r6, pc} +_02252E60: + add r0, r4, #0 + add r0, #0x26 + ldrb r2, [r0] + mov r1, #0x1f + add r4, #0x26 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x1b + lsr r1, r1, #0x1b + add r1, r1, r5 + lsl r1, r1, #0x18 + lsr r2, r1, #0x18 + mov r1, #0x1f + and r1, r2 + orr r0, r1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02252E82: + bl sub_02022974 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02252E88: .word 0xFFFFFC1F +_02252E8C: .word 0xFFFF83FF +_02252E90: .word 0xFFF07FFF +_02252E94: .word 0xFE0FFFFF +_02252E98: .word 0xC1FFFFFF +_02252E9C: .word 0xFFFFF8FF +_02252EA0: .word 0xFFFFE7FF +_02252EA4: .word 0xFFFF9FFF +_02252EA8: .word 0xFFFC7FFF +_02252EAC: .word 0xFFE3FFFF +_02252EB0: .word 0xFF1FFFFF +_02252EB4: .word 0xF8FFFFFF +_02252EB8: .word 0xC7FFFFFF +_02252EBC: .word 0xFFFFE3FF +_02252EC0: .word 0xFFFF1FFF +_02252EC4: .word 0xFFF8FFFF + thumb_func_end ov16_02252A2C + + thumb_func_start ov16_02252EC8 +ov16_02252EC8: ; 0x02252EC8 + push {r4, r5, r6, r7, lr} + sub sp, #0x6c + str r0, [sp, #4] + ldr r0, [sp, #0x80] + str r3, [sp, #0xc] + str r0, [sp, #0x80] + mov r0, #0 + str r0, [sp, #0x64] + str r0, [sp, #0x60] + ldr r0, [sp, #0x64] + str r2, [sp, #8] + str r0, [sp, #0x5c] + ldr r0, [sp, #0x64] + ldr r3, _022531C4 ; =0x00002D8C + str r0, [sp, #0x48] + ldr r0, [sp, #0x64] + add r5, r1, #0 + str r0, [sp, #0x44] + ldr r0, [sp, #0x64] + str r0, [sp, #0x40] + ldr r0, [sp, #0x64] + str r0, [sp, #0x3c] + ldr r0, [sp, #0x64] + str r0, [sp, #0x38] + ldr r0, [sp, #0x64] + str r0, [sp, #0x34] + mov r0, #0xc0 + mul r2, r0 + str r2, [sp, #0x18] + add r2, r5, r3 + ldr r1, [sp, #0x18] + str r2, [sp, #0x68] + ldr r1, [r2, r1] + cmp r1, #0 + bne _02252F20 + ldr r2, [sp, #0xc] + mul r0, r2 + add r0, r5, r0 + ldr r0, [r0, r3] + cmp r0, #0 + beq _02252F20 + add sp, #0x6c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02252F20: + cmp r1, #0 + beq _02252F3A + ldr r0, [sp, #0xc] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _022531C4 ; =0x00002D8C + add r1, r5, r1 + ldr r0, [r1, r0] + cmp r0, #0 + bne _02252F3A + add sp, #0x6c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02252F3A: + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02255A4C + str r0, [sp, #0x2c] + ldr r1, [sp, #0xc] + add r0, r5, #0 + bl ov16_02255A4C + str r0, [sp, #0x28] + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02258AB8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x58] + ldr r1, [sp, #8] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x54] + ldr r1, [sp, #0xc] + add r0, r5, #0 + bl ov16_02258AB8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x50] + ldr r1, [sp, #0xc] + add r0, r5, #0 + mov r2, #0 + bl ov16_02258ACC + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x4c] + ldr r0, [sp, #0x18] + ldr r2, _022531C8 ; =0x00002D5B + add r0, r5, r0 + ldrsb r4, [r0, r2] + ldr r0, [sp, #0xc] + mov r1, #0xc0 + mul r1, r0 + add r0, r5, r1 + str r1, [sp, #0x14] + ldrsb r7, [r0, r2] + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x56 + bne _02252FBC + sub r0, r4, #6 + lsl r0, r0, #1 + add r4, r0, #6 + cmp r4, #0xc + ble _02252FB6 + mov r4, #0xc +_02252FB6: + cmp r4, #0 + bge _02252FBC + mov r4, #0 +_02252FBC: + ldr r1, [sp, #0xc] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x56 + bne _02252FDA + sub r0, r7, #6 + lsl r0, r0, #1 + add r7, r0, #6 + cmp r7, #0xc + ble _02252FD4 + mov r7, #0xc +_02252FD4: + cmp r7, #0 + bge _02252FDA + mov r7, #0 +_02252FDA: + ldr r0, [sp, #0x18] + lsl r1, r4, #1 + add r2, r5, r0 + ldr r0, _022531CC ; =0x00002D46 + ldrh r2, [r2, r0] + ldr r0, _022531D0 ; =0x0226EBE0 + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _022531D4 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, [sp, #0x14] + lsl r1, r7, #1 + add r2, r5, r0 + ldr r0, _022531CC ; =0x00002D46 + ldrh r2, [r2, r0] + ldr r0, _022531D0 ; =0x0226EBE0 + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _022531D4 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + add r4, r0, #0 + mov r0, #0xd + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02253082 + mov r0, #0x4c + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02253082 + ldr r0, [sp, #0x2c] + cmp r0, #0x21 + bne _02253048 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #3 + tst r0, r1 + bne _0225305A +_02253048: + ldr r0, [sp, #0x2c] + cmp r0, #0x22 + bne _0225305C + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x30 + tst r0, r1 + beq _0225305C +_0225305A: + lsl r6, r6, #1 +_0225305C: + ldr r0, [sp, #0x28] + cmp r0, #0x21 + bne _0225306E + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #3 + tst r0, r1 + bne _02253080 +_0225306E: + ldr r0, [sp, #0x28] + cmp r0, #0x22 + bne _02253082 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x30 + tst r0, r1 + beq _02253082 +_02253080: + lsl r4, r4, #1 +_02253082: + mov r0, #0 + str r0, [sp, #0x24] + ldr r0, [sp, #0x18] + ldr r7, _022531D8 ; =0x0226EBA8 + add r0, r5, r0 + str r0, [sp, #0x1c] +_0225308E: + ldr r2, [sp, #0x1c] + ldr r1, _022531DC ; =0x00002DB8 + add r0, r5, #0 + ldrh r1, [r2, r1] + mov r2, #1 + bl ov16_0225B0FC + ldrb r1, [r7] + cmp r1, r0 + bne _022530A6 + lsr r6, r6, #1 + b _022530B2 +_022530A6: + ldr r0, [sp, #0x24] + add r7, r7, #1 + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, #8 + blo _0225308E +_022530B2: + ldr r0, [sp, #0x58] + cmp r0, #0x73 + bne _022530C4 + mov r0, #0xf + mul r0, r6 + mov r1, #0xa + bl sub_020E2178 + add r6, r0, #0 +_022530C4: + ldr r0, [sp, #0x58] + cmp r0, #0x66 + bne _022530DA + ldr r0, [sp, #0x18] + add r1, r5, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r1, r0] + cmp r0, #0x84 + bne _022530DA + lsl r6, r6, #1 +_022530DA: + ldr r0, [sp, #0x2c] + cmp r0, #0x5f + bne _022530FC + ldr r0, [sp, #0x18] + add r1, r5, r0 + ldr r0, _022531E0 ; =0x00002DAC + ldr r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + beq _022530FC + mov r0, #0xf + mul r0, r6 + mov r1, #0xa + bl sub_020E2178 + add r6, r0, #0 + b _0225310C +_022530FC: + ldr r0, [sp, #0x18] + add r1, r5, r0 + ldr r0, _022531E0 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x40 + tst r0, r1 + beq _0225310C + lsr r6, r6, #2 +_0225310C: + ldr r0, [sp, #0x2c] + cmp r0, #0x70 + bne _02253128 + ldr r1, [sp, #0x18] + mov r0, #0x15 + add r2, r5, r1 + ldr r1, _022531E4 ; =0x00002DD8 + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r1, [r2, r1] + sub r0, r0, r1 + cmp r0, #5 + bge _02253128 + lsr r6, r6, #1 +_02253128: + ldr r0, [sp, #0x2c] + cmp r0, #0x54 + bne _02253146 + ldr r0, [sp, #0x18] + add r2, r5, r0 + ldr r0, _022531E8 ; =0x00002DCC + ldr r1, [r2, r0] + lsl r1, r1, #9 + lsr r1, r1, #0x1f + beq _02253146 + sub r0, #0x14 + ldrh r0, [r2, r0] + cmp r0, #0 + bne _02253146 + lsl r6, r6, #1 +_02253146: + ldr r0, [sp, #4] + ldr r1, [sp, #8] + bl ov16_0223E208 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #3 + lsl r0, r0, #8 + tst r0, r1 + beq _02253162 + lsl r6, r6, #1 +_02253162: + ldr r0, [sp, #0x58] + cmp r0, #0x34 + bne _022531A0 + ldr r1, [sp, #0x54] + mov r0, #0x64 + bl sub_020E1F6C + add r1, r0, #0 + ldr r0, [sp, #8] + lsl r0, r0, #1 + add r2, r5, r0 + ldr r0, _022531EC ; =0x0000310C + ldrh r0, [r2, r0] + bl sub_020E1F6C + cmp r1, #0 + bne _022531A0 + mov r0, #1 + str r0, [sp, #0x40] + ldr r0, [sp, #0x80] + cmp r0, #0 + bne _022531A0 + ldr r0, _022531E8 ; =0x00002DCC + ldr r1, [sp, #0x18] + add r0, r5, r0 + ldr r2, [r0, r1] + mov r1, #2 + lsl r1, r1, #0x1c + orr r2, r1 + ldr r1, [sp, #0x18] + str r2, [r0, r1] +_022531A0: + ldr r0, [sp, #0x58] + cmp r0, #0x2d + bne _02253224 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _022531BA + ldr r0, [sp, #0x54] + lsl r0, r0, #0x17 + lsr r0, r0, #0x18 + str r0, [sp, #0x54] +_022531BA: + ldr r0, [sp, #8] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _022531F0 ; =0x00002D90 + b _022531F4 + ; .align 2, 0 +_022531C4: .word 0x00002D8C +_022531C8: .word 0x00002D5B +_022531CC: .word 0x00002D46 +_022531D0: .word 0x0226EBE0 +_022531D4: .word 0x0226EBE1 +_022531D8: .word 0x0226EBA8 +_022531DC: .word 0x00002DB8 +_022531E0: .word 0x00002DAC +_022531E4: .word 0x00002DD8 +_022531E8: .word 0x00002DCC +_022531EC: .word 0x0000310C +_022531F0: .word 0x00002D90 +_022531F4: + add r1, r5, r1 + ldr r0, [r1, r0] + ldr r1, [sp, #0x54] + bl sub_020E2178 + ldr r2, [sp, #0x68] + ldr r1, [sp, #0x18] + ldr r1, [r2, r1] + cmp r1, r0 + bhi _02253224 + mov r0, #1 + str r0, [sp, #0x40] + ldr r0, [sp, #0x80] + cmp r0, #0 + bne _02253224 + ldr r0, _022534EC ; =0x00002DCC + ldr r1, [sp, #0x18] + add r0, r5, r0 + ldr r2, [r0, r1] + mov r1, #1 + lsl r1, r1, #0x1c + orr r2, r1 + ldr r1, [sp, #0x18] + str r2, [r0, r1] +_02253224: + ldr r0, [sp, #0x58] + cmp r0, #0x6b + bne _0225322E + mov r0, #1 + str r0, [sp, #0x38] +_0225322E: + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r7, _022534F0 ; =0x0226EBA8 + add r0, r5, r0 + str r0, [sp, #0x20] +_0225323A: + ldr r2, [sp, #0x20] + ldr r1, _022534F4 ; =0x00002DB8 + add r0, r5, #0 + ldrh r1, [r2, r1] + mov r2, #1 + bl ov16_0225B0FC + ldrb r1, [r7] + cmp r1, r0 + bne _02253252 + lsr r4, r4, #1 + b _0225325E +_02253252: + ldr r0, [sp, #0x10] + add r7, r7, #1 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #8 + blo _0225323A +_0225325E: + ldr r0, [sp, #0x50] + cmp r0, #0x73 + bne _02253270 + mov r0, #0xf + mul r0, r4 + mov r1, #0xa + bl sub_020E2178 + add r4, r0, #0 +_02253270: + ldr r0, [sp, #0x50] + cmp r0, #0x66 + bne _02253286 + ldr r0, [sp, #0x14] + add r1, r5, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r1, r0] + cmp r0, #0x84 + bne _02253286 + lsl r4, r4, #1 +_02253286: + ldr r0, [sp, #0x28] + cmp r0, #0x5f + bne _022532A8 + ldr r0, [sp, #0x14] + add r1, r5, r0 + ldr r0, _022534F8 ; =0x00002DAC + ldr r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + beq _022532A8 + mov r0, #0xf + mul r0, r4 + mov r1, #0xa + bl sub_020E2178 + add r4, r0, #0 + b _022532B8 +_022532A8: + ldr r0, [sp, #0x14] + add r1, r5, r0 + ldr r0, _022534F8 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x40 + tst r0, r1 + beq _022532B8 + lsr r4, r4, #2 +_022532B8: + ldr r0, [sp, #0x28] + cmp r0, #0x70 + bne _022532D4 + ldr r1, [sp, #0x14] + mov r0, #0x15 + add r2, r5, r1 + ldr r1, _022534FC ; =0x00002DD8 + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r1, [r2, r1] + sub r0, r0, r1 + cmp r0, #5 + bge _022532D4 + lsr r4, r4, #1 +_022532D4: + ldr r0, [sp, #0x28] + cmp r0, #0x54 + bne _022532F2 + ldr r0, [sp, #0x14] + add r2, r5, r0 + ldr r0, _022534EC ; =0x00002DCC + ldr r1, [r2, r0] + lsl r1, r1, #9 + lsr r1, r1, #0x1f + beq _022532F2 + sub r0, #0x14 + ldrh r0, [r2, r0] + cmp r0, #0 + bne _022532F2 + lsl r4, r4, #1 +_022532F2: + ldr r0, [sp, #4] + ldr r1, [sp, #0xc] + bl ov16_0223E208 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #3 + lsl r0, r0, #8 + tst r0, r1 + beq _0225330E + lsl r4, r4, #1 +_0225330E: + ldr r0, [sp, #0x50] + cmp r0, #0x34 + bne _0225334C + ldr r1, [sp, #0x4c] + mov r0, #0x64 + bl sub_020E1F6C + add r1, r0, #0 + ldr r0, [sp, #0xc] + lsl r0, r0, #1 + add r2, r5, r0 + ldr r0, _02253500 ; =0x0000310C + ldrh r0, [r2, r0] + bl sub_020E1F6C + cmp r1, #0 + bne _0225334C + mov r0, #1 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x80] + cmp r0, #0 + bne _0225334C + ldr r0, _022534EC ; =0x00002DCC + ldr r1, [sp, #0x14] + add r0, r5, r0 + ldr r2, [r0, r1] + mov r1, #2 + lsl r1, r1, #0x1c + orr r2, r1 + ldr r1, [sp, #0x14] + str r2, [r0, r1] +_0225334C: + ldr r0, [sp, #0x50] + cmp r0, #0x2d + bne _022533A0 + ldr r1, [sp, #0xc] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02253366 + ldr r0, [sp, #0x4c] + lsl r0, r0, #0x17 + lsr r0, r0, #0x18 + str r0, [sp, #0x4c] +_02253366: + ldr r0, [sp, #0xc] + mov r1, #0xc0 + add r7, r0, #0 + mul r7, r1 + ldr r0, _02253504 ; =0x00002D90 + add r1, r5, r7 + ldr r0, [r1, r0] + ldr r1, [sp, #0x4c] + bl sub_020E2178 + ldr r1, _02253508 ; =0x00002D8C + add r2, r5, r7 + ldr r2, [r2, r1] + cmp r2, r0 + bhi _022533A0 + mov r0, #1 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x80] + cmp r0, #0 + bne _022533A0 + add r1, #0x40 + add r0, r5, r1 + ldr r1, [sp, #0x14] + ldr r2, [r0, r1] + mov r1, #1 + lsl r1, r1, #0x1c + orr r2, r1 + ldr r1, [sp, #0x14] + str r2, [r0, r1] +_022533A0: + ldr r0, [sp, #0x50] + cmp r0, #0x6b + bne _022533AA + mov r0, #1 + str r0, [sp, #0x34] +_022533AA: + ldr r0, [sp, #8] + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0225350C ; =0x000021F0 + str r6, [r1, r0] + ldr r1, [sp, #0xc] + lsl r1, r1, #2 + add r1, r5, r1 + str r4, [r1, r0] + ldr r1, [sp, #0x80] + cmp r1, #0 + bne _02253462 + ldr r1, [sp, #0xc] + ldr r3, _02253510 ; =0x000030BC + lsl r1, r1, #4 + add r2, r5, r1 + add r1, r0, #0 + sub r1, #0x3c + ldr r1, [r2, r1] + sub r0, #0x3c + str r1, [sp, #0x30] + ldr r1, [sp, #8] + lsl r1, r1, #1 + add r1, r5, r1 + ldrh r2, [r1, r3] + ldr r1, [sp, #0xc] + lsl r1, r1, #1 + add r1, r5, r1 + ldrh r7, [r1, r3] + ldr r1, [sp, #8] + lsl r1, r1, #4 + add r1, r5, r1 + ldr r0, [r1, r0] + cmp r0, #1 + bne _0225341A + ldr r0, [sp, #8] + lsl r0, r0, #6 + add r1, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _02253408 + mov r0, #0xa5 + str r0, [sp, #0x60] + b _0225341A +_02253408: + ldr r1, [sp, #8] + add r0, r5, #0 + add r2, r2, #6 + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x60] +_0225341A: + ldr r0, [sp, #0x30] + cmp r0, #1 + bne _0225344A + ldr r0, [sp, #0xc] + lsl r0, r0, #6 + add r1, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _02253438 + mov r0, #0xa5 + str r0, [sp, #0x5c] + b _0225344A +_02253438: + ldr r1, [sp, #0xc] + add r0, r5, #0 + add r2, r7, #6 + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x5c] +_0225344A: + ldr r0, [sp, #0x60] + mov r1, #0xfa + lsl r0, r0, #4 + add r0, r5, r0 + lsl r1, r1, #2 + ldrsb r0, [r0, r1] + str r0, [sp, #0x48] + ldr r0, [sp, #0x5c] + lsl r0, r0, #4 + add r0, r5, r0 + ldrsb r0, [r0, r1] + str r0, [sp, #0x44] +_02253462: + ldr r1, [sp, #0x48] + ldr r0, [sp, #0x44] + cmp r1, r0 + beq _0225346C + b _022535D2 +_0225346C: + ldr r0, [sp, #0x40] + cmp r0, #0 + beq _02253498 + ldr r0, [sp, #0x3c] + cmp r0, #0 + beq _02253498 + cmp r6, r4 + bhs _02253482 + mov r0, #1 + str r0, [sp, #0x64] + b _022535DA +_02253482: + cmp r6, r4 + bne _022534D6 + ldr r0, [sp, #4] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _022534D6 + mov r0, #2 + str r0, [sp, #0x64] + b _022535DA +_02253498: + ldr r0, [sp, #0x40] + cmp r0, #0 + bne _022534AA + ldr r0, [sp, #0x3c] + cmp r0, #0 + beq _022534AA + mov r0, #1 + str r0, [sp, #0x64] + b _022535DA +_022534AA: + ldr r0, [sp, #0x40] + cmp r0, #0 + beq _022534BC + ldr r0, [sp, #0x3c] + cmp r0, #0 + bne _022534BC + mov r0, #0 + str r0, [sp, #0x64] + b _022535DA +_022534BC: + ldr r0, [sp, #0x38] + cmp r0, #0 + beq _02253514 + ldr r0, [sp, #0x34] + cmp r0, #0 + beq _02253514 + cmp r6, r4 + bls _022534D2 + mov r0, #1 + str r0, [sp, #0x64] + b _022535DA +_022534D2: + cmp r6, r4 + beq _022534D8 +_022534D6: + b _022535DA +_022534D8: + ldr r0, [sp, #4] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _022535DA + mov r0, #2 + str r0, [sp, #0x64] + b _022535DA + nop +_022534EC: .word 0x00002DCC +_022534F0: .word 0x0226EBA8 +_022534F4: .word 0x00002DB8 +_022534F8: .word 0x00002DAC +_022534FC: .word 0x00002DD8 +_02253500: .word 0x0000310C +_02253504: .word 0x00002D90 +_02253508: .word 0x00002D8C +_0225350C: .word 0x000021F0 +_02253510: .word 0x000030BC +_02253514: + ldr r0, [sp, #0x38] + cmp r0, #0 + beq _02253526 + ldr r0, [sp, #0x34] + cmp r0, #0 + bne _02253526 + mov r0, #1 + str r0, [sp, #0x64] + b _022535DA +_02253526: + ldr r0, [sp, #0x38] + cmp r0, #0 + bne _02253538 + ldr r0, [sp, #0x34] + cmp r0, #0 + beq _02253538 + mov r0, #0 + str r0, [sp, #0x64] + b _022535DA +_02253538: + ldr r0, [sp, #0x2c] + cmp r0, #0x64 + bne _02253564 + ldr r0, [sp, #0x28] + cmp r0, #0x64 + bne _02253564 + cmp r6, r4 + bls _0225354E + mov r0, #1 + str r0, [sp, #0x64] + b _022535DA +_0225354E: + cmp r6, r4 + bne _022535DA + ldr r0, [sp, #4] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _022535DA + mov r0, #2 + str r0, [sp, #0x64] + b _022535DA +_02253564: + ldr r0, [sp, #0x2c] + cmp r0, #0x64 + bne _02253576 + ldr r0, [sp, #0x28] + cmp r0, #0x64 + beq _02253576 + mov r0, #1 + str r0, [sp, #0x64] + b _022535DA +_02253576: + ldr r0, [sp, #0x2c] + cmp r0, #0x64 + beq _02253588 + ldr r0, [sp, #0x28] + cmp r0, #0x64 + bne _02253588 + mov r0, #0 + str r0, [sp, #0x64] + b _022535DA +_02253588: + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #7 + lsl r0, r0, #0x10 + tst r0, r1 + beq _022535B4 + cmp r6, r4 + bls _0225359E + mov r0, #1 + str r0, [sp, #0x64] +_0225359E: + cmp r6, r4 + bne _022535DA + ldr r0, [sp, #4] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _022535DA + mov r0, #2 + str r0, [sp, #0x64] + b _022535DA +_022535B4: + cmp r6, r4 + bhs _022535BC + mov r0, #1 + str r0, [sp, #0x64] +_022535BC: + cmp r6, r4 + bne _022535DA + ldr r0, [sp, #4] + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _022535DA + mov r0, #2 + str r0, [sp, #0x64] + b _022535DA +_022535D2: + cmp r1, r0 + bge _022535DA + mov r0, #1 + str r0, [sp, #0x64] +_022535DA: + ldr r0, [sp, #0x64] + add sp, #0x6c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_02252EC8 + + thumb_func_start ov16_022535E0 +ov16_022535E0: ; 0x022535E0 + asr r1, r1, #1 + lsl r1, r1, #0x1f + lsr r1, r1, #0x1d + add r0, r0, r1 + mov r2, #0 + add r0, #0xa4 + str r2, [r0, #0] + bx lr + thumb_func_end ov16_022535E0 + + thumb_func_start ov16_022535F0 +ov16_022535F0: ; 0x022535F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r2, [sp] + add r5, r1, #0 + mov r4, #0 + bl ov16_0223DF0C + add r7, r0, #0 + ldr r0, [sp] + mov r1, #0xc0 + mul r1, r0 + add r0, r5, r1 + str r0, [sp, #4] + ldr r0, [sp] + asr r0, r0, #1 + lsl r0, r0, #0x1f + lsr r0, r0, #0x1d + add r6, r5, r0 + add r6, #0xa4 +_02253616: + add r0, r4, #0 + bl sub_020787CC + ldr r1, _02253660 ; =0x00003108 + ldrb r1, [r5, r1] + tst r0, r1 + bne _0225364C + ldr r0, [sp] + bl sub_020787CC + ldr r1, _02253660 ; =0x00003108 + ldrb r1, [r5, r1] + tst r0, r1 + bne _0225364C + ldr r1, [sp, #4] + ldr r0, _02253664 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225364C + ldr r0, _02253668 ; =0x0000219C + add r1, r5, r4 + ldrb r0, [r1, r0] + bl sub_020787CC + ldr r1, [r6, #0] + orr r0, r1 + str r0, [r6, #0] +_0225364C: + add r4, r4, #2 + cmp r7, #0x4a + beq _0225365A + cmp r7, #0x4b + beq _0225365A + cmp r4, #2 + ble _02253616 +_0225365A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02253660: .word 0x00003108 +_02253664: .word 0x00002D8C +_02253668: .word 0x0000219C + thumb_func_end ov16_022535F0 + + thumb_func_start ov16_0225366C +ov16_0225366C: ; 0x0225366C + push {r4, r5, r6, lr} + ldr r0, _022536F8 ; =0x00002170 + add r5, r1, #0 + add r4, r2, #0 + ldr r2, [r5, r0] + mov r0, #2 + lsl r0, r0, #0x1c + mov r6, #0 + tst r0, r2 + beq _0225369E + add r0, r5, #0 + mov r1, #1 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _022536F8 ; =0x00002170 + add r1, r6, #0 + str r1, [r5, r0] + sub r0, r0, #4 + ldr r1, [r5, r0] + ldr r0, _022536FC ; =0x801FDA49 + tst r0, r1 + bne _022536F2 + mov r6, #1 + b _022536F2 +_0225369E: + cmp r2, #0 + beq _022536F2 + add r0, r5, #0 + mov r1, #1 + bl ov16_0225B5D0 + str r0, [r4, #0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02253700 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _022536EC + ldr r1, _02253704 ; =0x0000216C + ldr r2, _022536FC ; =0x801FDA49 + ldr r0, [r5, r1] + tst r2, r0 + beq _022536EA + add r1, r1, #4 + mov r2, #2 + ldr r1, [r5, r1] + lsl r2, r2, #0x16 + tst r2, r1 + beq _022536DC + ldr r2, _02253708 ; =0x00040008 + tst r2, r0 + bne _022536EA +_022536DC: + mov r2, #1 + lsl r2, r2, #0x1c + tst r1, r2 + beq _022536EC + ldr r1, _0225370C ; =0x00010001 + tst r0, r1 + beq _022536EC +_022536EA: + mov r6, #1 +_022536EC: + ldr r0, _022536F8 ; =0x00002170 + mov r1, #0 + str r1, [r5, r0] +_022536F2: + add r0, r6, #0 + pop {r4, r5, r6, pc} + nop +_022536F8: .word 0x00002170 +_022536FC: .word 0x801FDA49 +_02253700: .word 0x00002D8C +_02253704: .word 0x0000216C +_02253708: .word 0x00040008 +_0225370C: .word 0x00010001 + thumb_func_end ov16_0225366C + + thumb_func_start ov16_02253710 +ov16_02253710: ; 0x02253710 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r5, r1, #0 + ldr r0, _02253930 ; =0x00002174 + add r4, r2, #0 + ldr r2, [r5, r0] + mov r1, #2 + lsl r1, r1, #0x1c + add r3, r2, #0 + mov r6, #0 + tst r3, r1 + beq _02253746 + add r0, r5, #0 + mov r1, #2 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _02253930 ; =0x00002174 + add r1, r6, #0 + str r1, [r5, r0] + sub r0, #8 + ldr r1, [r5, r0] + ldr r0, _02253934 ; =0x801FDA49 + tst r0, r1 + bne _022537E6 + mov r6, #1 + b _0225392A +_02253746: + lsr r3, r1, #5 + tst r3, r2 + beq _0225377A + add r0, r5, #0 + mov r1, #2 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _02253930 ; =0x00002174 + add r1, r6, #0 + str r1, [r5, r0] + add r1, r5, #0 + add r1, #0x94 + ldr r1, [r1, #0] + add r0, r5, #0 + bl ov16_02259AC0 + cmp r0, #0 + bne _022537E6 + ldr r0, _02253938 ; =0x0000216C + ldr r1, [r5, r0] + ldr r0, _02253934 ; =0x801FDA49 + tst r0, r1 + bne _022537E6 + mov r6, #1 + b _0225392A +_0225377A: + lsr r3, r1, #4 + tst r3, r2 + beq _022537BC + add r0, r5, #0 + mov r1, #2 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _02253930 ; =0x00002174 + add r1, r6, #0 + str r1, [r5, r0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _0225393C ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _022537E6 + add r0, r5, #0 + bl ov16_02259AC0 + cmp r0, #0 + bne _022537E6 + ldr r0, _02253938 ; =0x0000216C + ldr r1, [r5, r0] + ldr r0, _02253934 ; =0x801FDA49 + tst r0, r1 + bne _022537E6 + mov r6, #1 + b _0225392A +_022537BC: + lsr r3, r1, #1 + tst r3, r2 + beq _022537EC + add r0, r5, #0 + mov r1, #2 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _02253930 ; =0x00002174 + add r1, r6, #0 + str r1, [r5, r0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _0225393C ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + bne _022537E8 +_022537E6: + b _0225392A +_022537E8: + mov r6, #1 + b _0225392A +_022537EC: + lsr r1, r1, #3 + tst r1, r2 + beq _02253878 + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x20 + ldr r0, _02253940 ; =0x00003044 + bne _02253810 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02253944 ; =0x000003E5 + ldrb r0, [r1, r0] + lsl r0, r0, #0x11 + lsr r6, r0, #0x10 + b _0225381A +_02253810: + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02253944 ; =0x000003E5 + ldrb r6, [r1, r0] +_0225381A: + cmp r6, #0 + bne _02253822 + bl sub_02022974 +_02253822: + ldr r0, [sp] + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r6 + bge _0225383E + ldr r1, _02253948 ; =0x0000213C + mov r0, #1 + ldr r2, [r5, r1] + lsl r0, r0, #0x16 + orr r0, r2 + str r0, [r5, r1] +_0225383E: + ldr r2, _02253930 ; =0x00002174 + add r0, r5, #0 + ldr r2, [r5, r2] + mov r1, #2 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r1, _02253930 ; =0x00002174 + mov r0, #0 + str r0, [r5, r1] + add r0, r5, #0 + add r0, #0x94 + ldr r2, [r0, #0] + mov r0, #0xc0 + mul r0, r2 + add r2, r5, r0 + ldr r0, _0225393C ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + bne _02253874 + add r0, r1, #0 + sub r0, #0x38 + ldr r2, [r5, r0] + ldr r0, _0225394C ; =0xFFBFFFFF + sub r1, #0x38 + and r0, r2 + str r0, [r5, r1] +_02253874: + mov r6, #1 + b _0225392A +_02253878: + cmp r2, #0 + beq _022538FC + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x20 + ldr r0, _02253940 ; =0x00003044 + bne _0225389A + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02253944 ; =0x000003E5 + ldrb r0, [r1, r0] + lsl r0, r0, #0x11 + lsr r7, r0, #0x10 + b _022538A4 +_0225389A: + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02253944 ; =0x000003E5 + ldrb r7, [r1, r0] +_022538A4: + cmp r7, #0 + bne _022538AC + bl sub_02022974 +_022538AC: + ldr r0, [sp] + bl ov16_0223F4BC + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, r7 + bge _0225392A + ldr r2, _02253930 ; =0x00002174 + add r0, r5, #0 + ldr r2, [r5, r2] + mov r1, #2 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _02253930 ; =0x00002174 + mov r1, #0 + str r1, [r5, r0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _0225393C ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _0225392A + add r0, r5, #0 + bl ov16_02259AC0 + cmp r0, #0 + bne _0225392A + ldr r0, _02253938 ; =0x0000216C + ldr r1, [r5, r0] + ldr r0, _02253934 ; =0x801FDA49 + tst r0, r1 + bne _0225392A + mov r6, #1 + b _0225392A +_022538FC: + add r0, r0, #4 + ldr r2, [r5, r0] + cmp r2, #0 + beq _0225392A + add r0, r5, #0 + mov r1, #3 + bl ov16_0225B5D0 + str r0, [r4, #0] + ldr r0, _02253950 ; =0x00002178 + add r1, r6, #0 + str r1, [r5, r0] + add r0, r5, #0 + add r0, #0x94 + ldr r1, [r0, #0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _0225393C ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225392A + mov r6, #1 +_0225392A: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02253930: .word 0x00002174 +_02253934: .word 0x801FDA49 +_02253938: .word 0x0000216C +_0225393C: .word 0x00002D8C +_02253940: .word 0x00003044 +_02253944: .word 0x000003E5 +_02253948: .word 0x0000213C +_0225394C: .word 0xFFBFFFFF +_02253950: .word 0x00002178 + thumb_func_end ov16_02253710 + + thumb_func_start ov16_02253954 +ov16_02253954: ; 0x02253954 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + mov r0, #0xff + add r4, r1, #0 + add r5, r2, #0 + str r0, [sp, #0xc] + cmp r3, #0 + beq _02253970 + lsl r0, r3, #4 + add r1, r4, r0 + ldr r0, _02253C1C ; =0x000003E6 + ldrh r0, [r1, r0] + b _02253972 +_02253970: + ldr r0, [sp, #0x34] +_02253972: + cmp r0, #4 + bne _02253A02 + add r0, r6, #0 + bl ov16_0223DF1C + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223DF14 + bl ov16_02263AE4 + ldr r1, _02253C20 ; =0x0000217E + mov r2, #0 + strb r2, [r4, r1] + ldrb r1, [r4, r1] + ldr r2, [sp, #8] + cmp r1, r2 + bge _022539F0 + mov r2, #1 + add r5, r0, #0 + and r5, r2 +_0225399E: + ldr r0, _02253C24 ; =0x000021EC + add r1, r4, r1 + ldrb r7, [r1, r0] + mov r0, #0xc0 + mul r0, r7 + add r1, r4, r0 + ldr r0, _02253C28 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _022539DE + add r0, r6, #0 + add r1, r7, #0 + bl ov16_0223DF14 + str r0, [sp] + cmp r5, #0 + beq _022539CA + bl ov16_02263AE4 + mov r1, #1 + tst r0, r1 + beq _022539DA +_022539CA: + cmp r5, #0 + bne _022539DE + ldr r0, [sp] + bl ov16_02263AE4 + mov r1, #1 + tst r0, r1 + beq _022539DE +_022539DA: + str r7, [sp, #0xc] + b _022539F0 +_022539DE: + ldr r0, _02253C20 ; =0x0000217E + ldrb r0, [r4, r0] + add r1, r0, #1 + ldr r0, _02253C20 ; =0x0000217E + strb r1, [r4, r0] + ldrb r1, [r4, r0] + ldr r0, [sp, #8] + cmp r1, r0 + blt _0225399E +_022539F0: + ldr r1, _02253C20 ; =0x0000217E + ldr r0, [sp, #8] + ldrb r2, [r4, r1] + cmp r2, r0 + bne _022539FC + b _02253C8C +_022539FC: + add r0, r2, #1 + strb r0, [r4, r1] + b _02253C8C +_02253A02: + cmp r0, #8 + bne _02253A52 + add r0, r6, #0 + bl ov16_0223DF1C + add r2, r0, #0 + ldr r0, _02253C20 ; =0x0000217E + mov r1, #0 + strb r1, [r4, r0] + ldrb r3, [r4, r0] + cmp r3, r2 + bge _02253A44 + ldr r7, _02253C28 ; =0x00002D8C +_02253A1C: + ldr r1, _02253C24 ; =0x000021EC + add r6, r4, r3 + ldrb r1, [r6, r1] + mov r6, #0xc0 + mul r6, r1 + add r6, r4, r6 + ldr r6, [r6, r7] + cmp r6, #0 + beq _02253A36 + cmp r1, r5 + beq _02253A36 + str r1, [sp, #0xc] + b _02253A44 +_02253A36: + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldr r1, _02253C20 ; =0x0000217E + ldrb r3, [r4, r1] + cmp r3, r2 + blt _02253A1C +_02253A44: + cmp r3, r2 + beq _02253B30 + ldr r0, _02253C20 ; =0x0000217E + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _02253C8C +_02253A52: + mov r1, #2 + lsl r1, r1, #8 + cmp r0, r1 + bne _02253AA0 + ldr r1, [sp, #0x30] + cmp r1, #1 + bne _02253AA0 + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02253A9C + add r0, r6, #0 + bl ov16_0223F4BC + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + bne _02253A9C + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223E258 + mov r1, #0xc0 + mul r1, r0 + str r0, [sp, #0xc] + ldr r0, _02253C28 ; =0x00002D8C + add r1, r4, r1 + ldr r0, [r1, r0] + cmp r0, #0 + bne _02253B30 + str r5, [sp, #0xc] + b _02253C8C +_02253A9C: + str r5, [sp, #0xc] + b _02253C8C +_02253AA0: + mov r1, #1 + lsl r1, r1, #0xa + cmp r0, r1 + bne _02253ABC + ldr r1, [sp, #0x30] + cmp r1, #1 + bne _02253ABC + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov16_02257028 + str r0, [sp, #0xc] + b _02253C8C +_02253ABC: + cmp r0, #0x80 + bne _02253ACE + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov16_02257028 + str r0, [sp, #0xc] + b _02253C8C +_02253ACE: + cmp r0, #0x10 + beq _02253ADE + cmp r0, #0x20 + beq _02253ADE + cmp r0, #1 + beq _02253ADE + cmp r0, #0x40 + bne _02253AE2 +_02253ADE: + str r5, [sp, #0xc] + b _02253C8C +_02253AE2: + mov r1, #1 + lsl r1, r1, #8 + cmp r0, r1 + bne _02253B06 + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02253B02 + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223E258 + str r0, [sp, #0xc] + b _02253C8C +_02253B02: + str r5, [sp, #0xc] + b _02253C8C +_02253B06: + lsl r1, r1, #1 + cmp r0, r1 + bne _02253B3A + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02253B36 + lsl r0, r5, #4 + add r1, r4, r0 + ldr r0, _02253C2C ; =0x000021AC + ldr r0, [r1, r0] + mov r1, #0xc0 + mul r1, r0 + str r0, [sp, #0xc] + ldr r0, _02253C28 ; =0x00002D8C + add r1, r4, r1 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253B32 +_02253B30: + b _02253C8C +_02253B32: + str r5, [sp, #0xc] + b _02253C8C +_02253B36: + str r5, [sp, #0xc] + b _02253C8C +_02253B3A: + cmp r0, #2 + beq _02253B44 + ldr r0, [sp, #0x30] + cmp r0, #1 + bne _02253C06 +_02253B44: + add r0, r6, #0 + bl ov16_0223DF0C + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223E208 + add r7, r0, #0 + mov r1, #1 + eor r7, r1 + add r0, r6, #0 + add r1, r5, #0 + mov r2, #0 + bl ov16_0223E2A4 + str r0, [sp, #0x14] + add r0, r6, #0 + add r1, r5, #0 + mov r2, #2 + bl ov16_0223E2A4 + str r0, [sp, #0x18] + ldr r0, [sp, #0x10] + mov r1, #2 + tst r0, r1 + beq _02253BEE + mov r0, #0x71 + lsl r0, r0, #2 + add r1, r4, r0 + lsl r0, r7, #3 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _02253BA0 + lsl r0, r0, #9 + lsr r0, r0, #0x1e + mov r1, #0xc0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02253C28 ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _02253BA0 + str r0, [sp, #0xc] + b _02253C8C +_02253BA0: + ldr r0, [sp, #0x14] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + add r0, r4, r2 + ldr r2, _02253C28 ; =0x00002D8C + ldr r0, [r0, r2] + cmp r0, #0 + beq _02253BD0 + ldr r3, [sp, #0x18] + mul r1, r3 + add r1, r4, r1 + ldr r1, [r1, r2] + cmp r1, #0 + beq _02253BD0 + add r0, r6, #0 + bl ov16_0223F4BC + lsl r0, r0, #0x1f + lsr r1, r0, #0x1d + add r0, sp, #0x14 + ldr r0, [r0, r1] + str r0, [sp, #0xc] + b _02253C8C +_02253BD0: + cmp r0, #0 + beq _02253BDA + ldr r0, [sp, #0x14] + str r0, [sp, #0xc] + b _02253C8C +_02253BDA: + ldr r2, [sp, #0x18] + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _02253C28 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253C8C + str r2, [sp, #0xc] + b _02253C8C +_02253BEE: + mov r0, #1 + add r2, r5, #0 + eor r2, r0 + mov r0, #0xc0 + mul r0, r2 + add r1, r4, r0 + ldr r0, _02253C28 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253C8C + str r2, [sp, #0xc] + b _02253C8C +_02253C06: + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0223E208 + mov r1, #1 + eor r0, r1 + str r0, [sp, #4] + lsl r0, r5, #4 + add r1, r4, r0 + ldr r0, _02253C2C ; =0x000021AC + b _02253C30 + ; .align 2, 0 +_02253C1C: .word 0x000003E6 +_02253C20: .word 0x0000217E +_02253C24: .word 0x000021EC +_02253C28: .word 0x00002D8C +_02253C2C: .word 0x000021AC +_02253C30: + ldr r7, [r1, r0] + add r0, r6, #0 + bl ov16_0223DF1C + mov r0, #0x71 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, [sp, #4] + lsl r0, r0, #3 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _02253C60 + lsl r0, r0, #9 + lsr r0, r0, #0x1e + mov r1, #0xc0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02253C94 ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _02253C60 + str r0, [sp, #0xc] + b _02253C8C +_02253C60: + mov r0, #0xc0 + mul r0, r7 + add r1, r4, r0 + ldr r0, _02253C94 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253C72 + str r7, [sp, #0xc] + b _02253C8C +_02253C72: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov16_02257028 + mov r1, #0xc0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02253C94 ; =0x00002D8C + ldr r1, [r2, r1] + cmp r1, #0 + beq _02253C8C + str r0, [sp, #0xc] +_02253C8C: + ldr r0, [sp, #0xc] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02253C94: .word 0x00002D8C + thumb_func_end ov16_02253954 + + thumb_func_start ov16_02253C98 +ov16_02253C98: ; 0x02253C98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x6c] + add r7, r2, #0 + add r6, r3, #0 + cmp r0, #0xff + beq _02253CF2 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x60 + beq _02253CF2 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x68 + beq _02253CF2 + ldr r0, [sp, #4] + add r1, r7, #0 + bl ov16_0223E208 + add r2, r0, #0 + mov r1, #1 + mov r0, #0x71 + eor r2, r1 + lsl r0, r0, #2 + add r1, r5, r0 + lsl r0, r2, #3 + ldr r0, [r1, r0] + lsl r1, r0, #0xb + lsr r1, r1, #0x1f + beq _02253CF4 + lsl r0, r0, #9 + lsr r1, r0, #0x1e + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02253E28 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253CF4 +_02253CF2: + b _02253E24 +_02253CF4: + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov16_0225B910 + str r0, [sp, #0xc] + cmp r0, #0 + bne _02253D10 + lsl r0, r6, #4 + add r1, r5, r0 + ldr r0, _02253E2C ; =0x000003E2 + ldrb r0, [r1, r0] + str r0, [sp, #0xc] +_02253D10: + ldr r0, [sp, #4] + bl ov16_0223DF1C + str r0, [sp, #8] + ldr r0, [sp, #0xc] + cmp r0, #0xd + bne _02253DA0 + lsl r0, r6, #4 + add r1, r5, r0 + ldr r0, _02253E30 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #0 + beq _02253D2E + cmp r0, #2 + bne _02253DA0 +_02253D2E: + ldr r0, _02253E34 ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #0x20 + tst r0, r1 + bne _02253DA0 + mov r0, #0x1f + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #9 + add r3, r7, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02253DA0 + ldr r0, [sp, #8] + mov r6, #0 + cmp r0, #0 + ble _02253D80 +_02253D54: + ldr r0, _02253E38 ; =0x000021EC + add r1, r5, r6 + ldrb r4, [r1, r0] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x1f + bne _02253D78 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02253E28 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253D78 + cmp r7, r4 + bne _02253D80 +_02253D78: + ldr r0, [sp, #8] + add r6, r6, #1 + cmp r6, r0 + blt _02253D54 +_02253D80: + ldr r0, [r5, #0x6c] + cmp r4, r0 + beq _02253E24 + mov r0, #0xb5 + lsl r0, r0, #2 + add r3, r5, r0 + mov r0, #0x1c + add r2, r4, #0 + mul r2, r0 + ldr r1, [r3, r2] + mov r0, #2 + orr r0, r1 + str r0, [r3, r2] + add sp, #0x10 + str r4, [r5, #0x6c] + pop {r3, r4, r5, r6, r7, pc} +_02253DA0: + ldr r0, [sp, #0xc] + cmp r0, #0xb + bne _02253E24 + lsl r0, r6, #4 + add r1, r5, r0 + ldr r0, _02253E30 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #0 + beq _02253DB6 + cmp r0, #2 + bne _02253E24 +_02253DB6: + ldr r0, _02253E34 ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #0x20 + tst r0, r1 + bne _02253E24 + mov r0, #0x72 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #9 + add r3, r7, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02253E24 + ldr r0, [sp, #8] + mov r6, #0 + cmp r0, #0 + ble _02253E08 +_02253DDC: + ldr r0, _02253E38 ; =0x000021EC + add r1, r5, r6 + ldrb r4, [r1, r0] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x72 + bne _02253E00 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02253E28 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02253E00 + cmp r7, r4 + bne _02253E08 +_02253E00: + ldr r0, [sp, #8] + add r6, r6, #1 + cmp r6, r0 + blt _02253DDC +_02253E08: + ldr r0, [r5, #0x6c] + cmp r4, r0 + beq _02253E24 + mov r0, #0xb5 + lsl r0, r0, #2 + add r3, r5, r0 + mov r0, #0x1c + add r2, r4, #0 + mul r2, r0 + ldr r1, [r3, r2] + mov r0, #4 + orr r0, r1 + str r0, [r3, r2] + str r4, [r5, #0x6c] +_02253E24: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02253E28: .word 0x00002D8C +_02253E2C: .word 0x000003E2 +_02253E30: .word 0x000003E6 +_02253E34: .word 0x0000213C +_02253E38: .word 0x000021EC + thumb_func_end ov16_02253C98 + + thumb_func_start ov16_02253E3C +ov16_02253E3C: ; 0x02253E3C + push {r3, r4, r5, lr} + ldr r0, _02253EB8 ; =0x0000216C + add r4, r1, #0 + ldr r1, [r4, r0] + ldr r0, _02253EBC ; =0x801FDA49 + mov r2, #0 + tst r0, r1 + bne _02253E7A + mov r0, #0xb5 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r3, [r4, #0x6c] + mov r0, #0x1c + mul r0, r3 + ldr r3, [r1, r0] + lsl r5, r3, #0x1e + lsr r5, r5, #0x1f + beq _02253E7A + mov r2, #2 + bic r3, r2 + str r3, [r1, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xb4 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r2, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_02253E7A: + ldr r0, _02253EB8 ; =0x0000216C + ldr r1, [r4, r0] + ldr r0, _02253EBC ; =0x801FDA49 + tst r0, r1 + bne _02253EB2 + mov r0, #0xb5 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r3, [r4, #0x6c] + mov r0, #0x1c + mul r0, r3 + ldr r3, [r1, r0] + lsl r5, r3, #0x1d + lsr r5, r5, #0x1f + beq _02253EB2 + mov r2, #4 + bic r3, r2 + str r3, [r1, r0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xb4 + bl ov16_02251E1C + ldr r0, [r4, #8] + mov r2, #1 + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_02253EB2: + add r0, r2, #0 + pop {r3, r4, r5, pc} + nop +_02253EB8: .word 0x0000216C +_02253EBC: .word 0x801FDA49 + thumb_func_end ov16_02253E3C + + thumb_func_start ov16_02253EC0 +ov16_02253EC0: ; 0x02253EC0 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r4, r2, #0 + mov r0, #0xc0 + add r5, r1, #0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _02253EEC ; =0x00002DB8 + ldrh r0, [r1, r0] + cmp r0, #0 + bne _02253EE0 + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov16_0225B830 +_02253EE0: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_022662FC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02253EEC: .word 0x00002DB8 + thumb_func_end ov16_02253EC0 + + thumb_func_start ov16_02253EF0 +ov16_02253EF0: ; 0x02253EF0 + push {r4, r5} + ldr r0, _02253F18 ; =0x00002DB0 + add r4, r2, #0 + add r5, r1, r0 + mov r0, #0xc0 + mul r4, r0 + mov r0, #1 + ldr r3, [r5, r4] + lsl r0, r0, #0xc + orr r0, r3 + str r0, [r5, r4] + ldr r0, _02253F1C ; =0x00003044 + lsl r2, r2, #2 + ldr r3, [r1, r0] + add r1, r1, r2 + add r0, #8 + str r3, [r1, r0] + pop {r4, r5} + bx lr + nop +_02253F18: .word 0x00002DB0 +_02253F1C: .word 0x00003044 + thumb_func_end ov16_02253EF0 + + thumb_func_start ov16_02253F20 +ov16_02253F20: ; 0x02253F20 + push {r4, r5} + ldr r4, _02253F64 ; =0x00002DB0 + add r3, r2, #0 + mov r0, #0xc0 + mul r3, r0 + add r0, r1, r4 + ldr r5, [r0, r3] + ldr r2, _02253F68 ; =0xFFFFEFFF + and r2, r5 + str r2, [r0, r3] + ldr r5, [r0, r3] + ldr r2, _02253F6C ; =0xFFFFFCFF + and r2, r5 + str r2, [r0, r3] + add r0, r4, #0 + add r0, #0x10 + add r5, r1, r0 + ldr r2, [r5, r3] + ldr r0, _02253F70 ; =0xDFFBFF3F + add r4, #0x18 + and r0, r2 + str r0, [r5, r3] + add r2, r1, r4 + ldr r1, [r2, r3] + ldr r0, _02253F74 ; =0xFFFC7FFF + and r0, r1 + str r0, [r2, r3] + ldr r1, [r2, r3] + ldr r0, _02253F78 ; =0xFFE3FFFF + and r0, r1 + str r0, [r2, r3] + pop {r4, r5} + bx lr + nop +_02253F64: .word 0x00002DB0 +_02253F68: .word 0xFFFFEFFF +_02253F6C: .word 0xFFFFFCFF +_02253F70: .word 0xDFFBFF3F +_02253F74: .word 0xFFFC7FFF +_02253F78: .word 0xFFE3FFFF + thumb_func_end ov16_02253F20 + + thumb_func_start ov16_02253F7C +ov16_02253F7C: ; 0x02253F7C + mov r2, #0xc0 + mul r2, r1 + add r1, r0, r2 + ldr r0, _02253FC8 ; =0x00002DAC + ldr r0, [r1, r0] + mov r1, #7 + tst r1, r0 + beq _02253F90 + mov r0, #1 + bx lr +_02253F90: + mov r1, #8 + tst r1, r0 + beq _02253F9A + mov r0, #2 + bx lr +_02253F9A: + mov r1, #0x10 + tst r1, r0 + beq _02253FA4 + mov r0, #3 + bx lr +_02253FA4: + mov r1, #0x20 + tst r1, r0 + beq _02253FAE + mov r0, #4 + bx lr +_02253FAE: + mov r1, #0x40 + tst r1, r0 + beq _02253FB8 + mov r0, #5 + bx lr +_02253FB8: + mov r1, #0x80 + tst r0, r1 + beq _02253FC2 + mov r0, #2 + bx lr +_02253FC2: + mov r0, #0 + bx lr + nop +_02253FC8: .word 0x00002DAC + thumb_func_end ov16_02253F7C + + thumb_func_start ov16_02253FCC +ov16_02253FCC: ; 0x02253FCC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + add r7, r1, #0 + bl ov16_0223DF0C + mov r1, #0x84 + tst r1, r0 + beq _02253FE4 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02253FE4: + mov r1, #1 + add r2, r0, #0 + tst r2, r1 + bne _02253FF2 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02253FF2: + mov r2, #2 + tst r0, r2 + beq _02253FFE + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02253FFE: + ldr r0, [sp] + bl ov16_0223E0D8 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #4] +_0225400A: + ldr r0, [sp, #4] + cmp r0, #4 + bls _02254012 + b _022541A8 +_02254012: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225401E: ; jump table + .short _02254028 - _0225401E - 2 ; case 0 + .short _0225406C - _0225401E - 2 ; case 1 + .short _022540B4 - _0225401E - 2 ; case 2 + .short _02254128 - _0225401E - 2 ; case 3 + .short _022541A8 - _0225401E - 2 ; case 4 +_02254028: + ldr r0, _022541B8 ; =0x00002E7C + ldrb r0, [r7, r0] + cmp r0, #1 + bne _02254064 + mov r0, #0x85 + lsl r0, r0, #6 + ldr r1, [r7, r0] + mov r0, #0x20 + tst r0, r1 + bne _02254064 + ldr r0, [sp, #8] + mov r1, #0xd + mov r2, #5 + bl sub_02079280 + cmp r0, #0 + beq _02254064 + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r7, r1] + mov r0, #0x20 + orr r0, r2 + str r0, [r7, r1] + mov r0, #0x13 + mov r1, #0xd + lsl r0, r0, #4 + str r1, [r7, r0] + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02254064: + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + b _022541A8 +_0225406C: + ldr r1, _022541BC ; =0x00002E7D + mov r0, #2 + ldrb r2, [r7, r1] + tst r0, r2 + bne _022540AC + add r0, r1, #0 + sub r0, #0x31 + sub r1, #0x2d + ldr r2, [r7, r0] + ldr r0, [r7, r1] + lsr r0, r0, #1 + cmp r2, r0 + bhi _022540AC + ldr r0, [sp, #8] + mov r1, #0xe + mov r2, #5 + bl sub_02079280 + cmp r0, #0 + beq _022540AC + ldr r1, _022541BC ; =0x00002E7D + mov r0, #2 + ldrb r2, [r7, r1] + add sp, #0xc + orr r0, r2 + strb r0, [r7, r1] + mov r0, #0x13 + mov r1, #0xe + lsl r0, r0, #4 + str r1, [r7, r0] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022540AC: + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + b _022541A8 +_022540B4: + ldr r0, _022541BC ; =0x00002E7D + ldrb r1, [r7, r0] + mov r0, #3 + tst r0, r1 + bne _02254120 + ldr r0, [sp] + mov r1, #1 + bl ov16_0223DF20 + mov r6, #0 + add r5, r0, #0 + add r4, r6, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _022540F6 +_022540D4: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _022540EA + add r6, r6, #1 +_022540EA: + add r0, r5, #0 + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _022540D4 +_022540F6: + cmp r6, #1 + bne _02254120 + ldr r0, [sp, #8] + mov r1, #0xf + mov r2, #5 + bl sub_02079280 + cmp r0, #0 + beq _02254120 + ldr r1, _022541BC ; =0x00002E7D + mov r0, #3 + ldrb r2, [r7, r1] + add sp, #0xc + orr r0, r2 + strb r0, [r7, r1] + mov r0, #0x13 + mov r1, #0xf + lsl r0, r0, #4 + str r1, [r7, r0] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02254120: + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + b _022541A8 +_02254128: + ldr r0, _022541BC ; =0x00002E7D + ldrb r1, [r7, r0] + mov r0, #4 + tst r0, r1 + bne _022541A2 + ldr r0, [sp] + mov r1, #1 + bl ov16_0223DF20 + mov r6, #0 + add r5, r0, #0 + add r4, r6, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0225416A +_02254148: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0225415E + add r6, r6, #1 +_0225415E: + add r0, r5, #0 + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _02254148 +_0225416A: + cmp r6, #1 + bne _022541A2 + ldr r0, _022541C0 ; =0x00002E4C + ldr r1, [r7, r0] + add r0, r0, #4 + ldr r0, [r7, r0] + lsr r0, r0, #1 + cmp r1, r0 + bhi _022541A2 + ldr r0, [sp, #8] + mov r1, #0x10 + mov r2, #5 + bl sub_02079280 + cmp r0, #0 + beq _022541A2 + ldr r1, _022541BC ; =0x00002E7D + mov r0, #4 + ldrb r2, [r7, r1] + add sp, #0xc + orr r0, r2 + strb r0, [r7, r1] + mov r0, #0x13 + mov r1, #0x10 + lsl r0, r0, #4 + str r1, [r7, r0] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022541A2: + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_022541A8: + ldr r0, [sp, #4] + cmp r0, #4 + beq _022541B0 + b _0225400A +_022541B0: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022541B8: .word 0x00002E7C +_022541BC: .word 0x00002E7D +_022541C0: .word 0x00002E4C + thumb_func_end ov16_02253FCC + + thumb_func_start ov16_022541C4 +ov16_022541C4: ; 0x022541C4 + push {r3, r4, r5, r6, r7, lr} + ldr r1, _022542A4 ; =0x00002144 + add r5, r0, #0 + mov r4, #0 + add r0, r1, #0 + str r4, [r5, r1] + mov r2, #1 + add r0, #0xc + str r2, [r5, r0] + add r0, r1, #0 + add r0, #8 + str r4, [r5, r0] + add r0, r1, #0 + add r0, #0x10 + str r4, [r5, r0] + add r0, r1, #0 + mov r2, #0xa + add r0, #0x14 + str r2, [r5, r0] + add r0, r1, #0 + add r0, #0x1c + str r4, [r5, r0] + add r0, r1, #0 + add r0, #0x20 + str r4, [r5, r0] + add r0, r1, #0 + add r0, #0x28 + str r4, [r5, r0] + mov r0, #0xff + add r2, r1, #0 + str r0, [r5, #0x74] + add r2, #0x2c + str r4, [r5, r2] + add r2, r1, #0 + add r2, #0x30 + str r4, [r5, r2] + add r2, r1, #0 + add r2, #0x34 + str r4, [r5, r2] + add r2, r5, #0 + add r2, #0x88 + str r4, [r2, #0] + add r2, r5, #0 + add r2, #0x8c + str r4, [r2, #0] + add r2, r5, #0 + add r2, #0x94 + str r0, [r2, #0] + add r0, r1, #0 + add r0, #0x38 + strb r4, [r5, r0] + add r0, r1, #0 + add r0, #0x39 + strb r4, [r5, r0] + add r0, r1, #0 + add r0, #0x3a + strb r4, [r5, r0] + add r0, r1, #0 + add r0, #0x3c + str r4, [r5, r0] + add r0, r1, #0 + str r4, [r5, #0x38] + add r0, #0x40 + str r4, [r5, r0] + add r0, r1, #0 + add r0, #0x44 + str r4, [r5, r0] + str r4, [r5, #0x10] + str r4, [r5, #0x18] + str r4, [r5, #0x20] + str r4, [r5, #0x28] + str r4, [r5, #0x30] + str r4, [r5, #0x3c] + str r4, [r5, #0x40] + str r4, [r5, #0x48] + str r4, [r5, #0x4c] + str r4, [r5, #0x50] + add r0, r1, #0 + str r4, [r5, #0x54] + sub r0, #8 + ldr r2, [r5, r0] + ldr r0, _022542A8 ; =0xFF800000 + mov r7, #6 + and r2, r0 + add r0, r1, #0 + sub r0, #8 + str r2, [r5, r0] + sub r0, r1, #4 + ldr r2, [r5, r0] + ldr r0, _022542AC ; =0xFFFFFEA1 + and r2, r0 + sub r0, r1, #4 + str r2, [r5, r0] + ldr r0, _022542B0 ; =0x00003120 + strb r4, [r5, r0] + mov r0, #0xb5 + lsl r0, r0, #2 + add r6, r5, r0 +_02254288: + mov r0, #0 + add r1, r6, #0 + mov r2, #0x1c + bl sub_020C4BB8 + add r1, r5, r4 + ldr r0, _022542B4 ; =0x000021A4 + add r4, r4, #1 + add r6, #0x1c + strb r7, [r1, r0] + cmp r4, #4 + blt _02254288 + pop {r3, r4, r5, r6, r7, pc} + nop +_022542A4: .word 0x00002144 +_022542A8: .word 0xFF800000 +_022542AC: .word 0xFFFFFEA1 +_022542B0: .word 0x00003120 +_022542B4: .word 0x000021A4 + thumb_func_end ov16_022541C4 + + thumb_func_start ov16_022542B8 +ov16_022542B8: ; 0x022542B8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + mov r4, #0 + add r5, r6, #0 +_022542C2: + ldr r0, _02254324 ; =0x0000306C + mov r1, #0xff + strh r1, [r5, r0] + ldr r0, _02254328 ; =0x000021A0 + add r2, r6, r4 + mov r1, #6 + strb r1, [r2, r0] + add r0, r7, #0 + bl ov16_0223F4BC + ldr r1, _0225432C ; =0x0000310C + add r4, r4, #1 + strh r0, [r5, r1] + add r5, r5, #2 + cmp r4, #4 + blt _022542C2 + ldr r0, _02254330 ; =0x00002168 + mov r1, #1 + str r1, [r6, r0] + mov r0, #0x5d + lsl r0, r0, #2 + str r1, [r6, r0] + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02254316 + add r0, r1, #0 + bl sub_020787CC + ldr r1, _02254334 ; =0x00003108 + ldrb r2, [r6, r1] + orr r0, r2 + strb r0, [r6, r1] + mov r0, #3 + bl sub_020787CC + ldr r1, _02254334 ; =0x00003108 + ldrb r2, [r6, r1] + orr r0, r2 + strb r0, [r6, r1] +_02254316: + ldr r0, _02254338 ; =0x0000311C + mov r1, #6 + strb r1, [r6, r0] + add r0, r0, #1 + strb r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_02254324: .word 0x0000306C +_02254328: .word 0x000021A0 +_0225432C: .word 0x0000310C +_02254330: .word 0x00002168 +_02254334: .word 0x00003108 +_02254338: .word 0x0000311C + thumb_func_end ov16_022542B8 + + thumb_func_start ov16_0225433C +ov16_0225433C: ; 0x0225433C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + str r1, [sp, #4] + str r0, [sp] + ldr r1, _02254680 ; =0x00002DC8 + ldr r0, [sp, #4] + add r4, r2, #0 + add r1, r0, r1 + mov r0, #0xc0 + mul r0, r4 + add r5, r1, r0 + str r5, [sp, #0x14] + add r3, sp, #0x20 + mov r2, #7 +_02254358: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02254358 + ldr r0, [sp] + bl ov16_0223DF1C + add r6, r0, #0 + ldr r0, [sp] + bl ov16_0223DF0C + ldr r1, [sp, #4] + lsl r2, r4, #4 + add r1, r1, r2 + ldr r2, _02254684 ; =0x000021A8 + mov r0, #0x27 + str r0, [r1, r2] + ldr r1, [sp, #4] + sub r2, #0x6c + ldr r1, [r1, r2] + add r0, #0xd9 + tst r0, r1 + bne _02254416 + mov r5, #0 + cmp r6, #0 + ble _022543F2 + ldr r1, [sp, #4] + ldr r2, _02254688 ; =0x00002DCC + add r0, r1, #0 + add r2, r0, r2 + mov r0, #0x18 + mov ip, r0 + mov r7, #3 +_0225439A: + ldr r0, _0225468C ; =0x00002DB0 + ldr r3, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x1a + tst r0, r3 + beq _022543BC + ldr r0, [r2, #0] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1e + cmp r4, r0 + bne _022543BC + ldr r0, _0225468C ; =0x00002DB0 + ldr r3, [r1, r0] + ldr r0, _02254690 ; =0xFBFFFFFF + and r3, r0 + ldr r0, _0225468C ; =0x00002DB0 + str r3, [r1, r0] +_022543BC: + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r3, [r1, r0] + mov r0, #0x18 + tst r0, r3 + beq _022543E8 + ldr r0, [r2, #0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1e + cmp r4, r0 + bne _022543E8 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r0, [r1, r0] + mov r3, ip + bic r0, r3 + mov r3, #0xb7 + lsl r3, r3, #6 + str r0, [r1, r3] + ldr r0, [r2, #0] + bic r0, r7 + str r0, [r2, #0] +_022543E8: + add r5, r5, #1 + add r1, #0xc0 + add r2, #0xc0 + cmp r5, r6 + blt _0225439A +_022543F2: + mov r0, #0xc0 + mul r0, r4 + str r0, [sp, #0xc] + ldr r2, [sp, #4] + ldr r1, [sp, #0xc] + mov r0, #0 + add r1, r2, r1 + ldr r2, _0225468C ; =0x00002DB0 + str r0, [r1, r2] + ldr r1, [sp, #4] + add r2, #0x10 + add r2, r1, r2 + ldr r1, [sp, #0xc] + add r1, r2, r1 + str r1, [sp, #0x10] + ldr r1, [sp, #0xc] + str r0, [r2, r1] + b _0225448E +_02254416: + mov r0, #0xc0 + mul r0, r4 + str r0, [sp, #0xc] + ldr r1, _0225468C ; =0x00002DB0 + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + add r0, r0, r1 + ldr r3, [r0, r2] + ldr r2, _02254694 ; =0x15100007 + and r3, r2 + ldr r2, [sp, #0xc] + str r3, [r0, r2] + add r2, r1, #0 + ldr r0, [sp, #4] + add r2, #0x10 + add r0, r0, r2 + ldr r2, [sp, #0xc] + add r2, r0, r2 + str r2, [sp, #0x10] + ldr r2, [sp, #0xc] + ldr r3, [r0, r2] + ldr r2, _02254698 ; =0x0FA3843F + and r3, r2 + ldr r2, [sp, #0xc] + str r3, [r0, r2] + mov r2, #0 + cmp r6, #0 + ble _0225448E + ldr r0, [sp, #4] + add r1, #0x1c + add r3, r0, #0 + add r1, r3, r1 + mov r7, #0x18 +_02254458: + mov r3, #0xb7 + lsl r3, r3, #6 + ldr r5, [r0, r3] + mov r3, #0x18 + tst r3, r5 + beq _02254484 + ldr r3, [r1, #0] + lsl r3, r3, #0x1e + lsr r3, r3, #0x1e + cmp r4, r3 + bne _02254484 + mov r3, #0xb7 + lsl r3, r3, #6 + ldr r5, [r0, r3] + bic r5, r7 + str r5, [r0, r3] + ldr r5, [r0, r3] + mov r3, #0x10 + orr r5, r3 + mov r3, #0xb7 + lsl r3, r3, #6 + str r5, [r0, r3] +_02254484: + add r2, r2, #1 + add r0, #0xc0 + add r1, #0xc0 + cmp r2, r6 + blt _02254458 +_0225448E: + mov r0, #0 + str r0, [sp, #8] + cmp r6, #0 + ble _022544F6 + ldr r5, [sp, #4] + ldr r1, _02254688 ; =0x00002DCC + add r0, r5, #0 + add r7, r0, r1 +_0225449E: + add r0, r4, #0 + bl sub_020787CC + ldr r1, _0225468C ; =0x00002DB0 + lsl r0, r0, #0x10 + ldr r1, [r5, r1] + tst r0, r1 + beq _022544C6 + add r0, r4, #0 + bl sub_020787CC + ldr r1, _0225468C ; =0x00002DB0 + lsl r2, r0, #0x10 + mov r0, #0 + mvn r0, r0 + ldr r1, [r5, r1] + eor r0, r2 + and r1, r0 + ldr r0, _0225468C ; =0x00002DB0 + str r1, [r5, r0] +_022544C6: + ldr r0, _0225468C ; =0x00002DB0 + ldr r1, [r5, r0] + mov r0, #0xe + lsl r0, r0, #0xc + tst r0, r1 + beq _022544E8 + ldr r0, [r7, #0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1e + cmp r4, r0 + bne _022544E8 + ldr r0, _0225468C ; =0x00002DB0 + ldr r1, [r5, r0] + ldr r0, _0225469C ; =0xFFFF1FFF + and r1, r0 + ldr r0, _0225468C ; =0x00002DB0 + str r1, [r5, r0] +_022544E8: + ldr r0, [sp, #8] + add r5, #0xc0 + add r0, r0, #1 + add r7, #0xc0 + str r0, [sp, #8] + cmp r0, r6 + blt _0225449E +_022544F6: + mov r2, #0 + add r1, r2, #0 +_022544FA: + ldr r0, [sp, #0x14] + strb r1, [r0, r2] + add r2, r2, #1 + cmp r2, #0x38 + blo _022544FA + ldr r1, _022546A0 ; =0x0000213C + ldr r0, [sp, #4] + ldr r1, [r0, r1] + mov r0, #1 + lsl r0, r0, #8 + tst r0, r1 + beq _022545AE + ldr r1, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x38] + add r0, r1, r0 + ldr r1, _022546A4 ; =0x00002DE0 + str r2, [r0, r1] + ldr r0, [sp, #4] + sub r1, #0x14 + add r0, r0, r1 + ldr r1, [sp, #0xc] + mov r2, #3 + ldr r1, [r0, r1] + bic r1, r2 + ldr r2, [sp, #0x24] + lsl r2, r2, #0x1e + lsr r3, r2, #0x1e + mov r2, #3 + and r2, r3 + orr r2, r1 + ldr r1, [sp, #0xc] + str r2, [r0, r1] + ldr r3, [sp, #0x20] + ldr r1, [sp, #0x14] + lsl r3, r3, #0x11 + lsr r3, r3, #0x1e + lsl r3, r3, #0x1e + ldr r1, [r1, #0] + ldr r2, _022546A8 ; =0xFFFF9FFF + lsr r3, r3, #0x11 + and r1, r2 + orr r3, r1 + ldr r1, [sp, #0x14] + str r3, [r1, #0] + ldr r1, [sp, #0xc] + ldr r3, [r0, r1] + asr r1, r2, #5 + ldr r2, [sp, #0x24] + and r1, r3 + lsl r2, r2, #0x16 + lsr r2, r2, #0x1e + lsl r2, r2, #0x1e + lsr r2, r2, #0x16 + orr r2, r1 + ldr r1, [sp, #0xc] + str r2, [r0, r1] + ldr r2, [r0, r1] + ldr r1, _0225469C ; =0xFFFF1FFF + and r1, r2 + ldr r2, [sp, #0x24] + lsl r2, r2, #0x10 + lsr r2, r2, #0x1d + lsl r2, r2, #0x1d + lsr r2, r2, #0x10 + orr r2, r1 + ldr r1, [sp, #0xc] + str r2, [r0, r1] + ldr r3, [sp, #0x24] + ldr r1, [r0, r1] + lsl r3, r3, #0xa + ldr r2, _022546AC ; =0xFFC7FFFF + lsr r3, r3, #0x1d + lsl r3, r3, #0x1d + and r1, r2 + lsr r3, r3, #0xa + orr r3, r1 + ldr r1, [sp, #0xc] + str r3, [r0, r1] + ldr r3, [r0, r1] + asr r1, r2, #3 + ldr r2, [sp, #0x24] + and r1, r3 + lsl r2, r2, #0xd + lsr r2, r2, #0x1d + lsl r2, r2, #0x1d + lsr r2, r2, #0xd + orr r2, r1 + ldr r1, [sp, #0xc] + str r2, [r0, r1] +_022545AE: + mov r0, #0xc0 + add r3, r0, #0 + ldr r2, [sp, #4] + add r3, #0x90 + ldr r2, [r2, r3] + add r1, r4, #0 + ldr r3, [sp, #4] + mul r1, r0 + add r5, r0, #0 + add r1, r3, r1 + ldr r3, _022546B0 ; =0x00002DD4 + add r2, r2, #1 + str r2, [r1, r3] + ldr r2, [sp, #4] + add r5, #0x90 + ldr r2, [r2, r5] + add r0, #0x90 + add r5, r2, #1 + add r2, r3, #4 + str r5, [r1, r2] + ldr r1, [sp, #0x14] + lsl r7, r4, #1 + ldr r2, [r1, #0] + ldr r1, _022546B4 ; =0xBFFFFFFF + mov r3, #0 + and r1, r2 + ldr r2, [sp, #4] + mov r5, #0xff + ldr r0, [r2, r0] + add r0, r0, #1 + lsl r0, r0, #0x1f + lsr r0, r0, #1 + orr r1, r0 + ldr r0, [sp, #0x14] + str r1, [r0, #0] + add r0, r2, #0 + add r2, r0, r7 + ldr r0, _022546B8 ; =0x0000305C + add r1, r0, #0 + strh r3, [r2, r0] + add r1, #8 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x10 + strh r5, [r2, r1] + add r1, r0, #0 + add r1, #0x18 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x20 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x28 + strh r3, [r2, r1] + ldr r1, [sp, #4] + lsl r5, r4, #3 + add r1, r1, r5 + add r5, r0, #0 + add r5, #0x30 + strh r3, [r1, r5] + add r5, r0, #0 + add r5, #0x32 + strh r3, [r1, r5] + add r5, r0, #0 + add r5, #0x34 + strh r3, [r1, r5] + add r5, r0, #0 + add r5, #0x36 + strh r3, [r1, r5] + add r1, r0, #0 + add r1, #0x50 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x68 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x70 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x78 + strh r3, [r2, r1] + add r0, #0x80 + strh r3, [r2, r0] + add r0, r4, #0 + bl sub_020787CC + mov r1, #6 + lsl r3, r0, #8 + mov r0, #0 + mvn r0, r0 + ldr r2, [sp, #4] + lsl r1, r1, #6 + ldr r2, [r2, r1] + eor r0, r3 + and r2, r0 + ldr r0, [sp, #4] + str r2, [r0, r1] + ldr r0, [sp, #0x10] + ldr r1, [r0, #0] + mov r0, #2 + lsl r0, r0, #0x16 + tst r0, r1 + beq _022546D6 + ldr r0, _022546BC ; =0x00002D42 + b _022546C0 + ; .align 2, 0 +_02254680: .word 0x00002DC8 +_02254684: .word 0x000021A8 +_02254688: .word 0x00002DCC +_0225468C: .word 0x00002DB0 +_02254690: .word 0xFBFFFFFF +_02254694: .word 0x15100007 +_02254698: .word 0x0FA3843F +_0225469C: .word 0xFFFF1FFF +_022546A0: .word 0x0000213C +_022546A4: .word 0x00002DE0 +_022546A8: .word 0xFFFF9FFF +_022546AC: .word 0xFFC7FFFF +_022546B0: .word 0x00002DD4 +_022546B4: .word 0xBFFFFFFF +_022546B8: .word 0x0000305C +_022546BC: .word 0x00002D42 +_022546C0: + ldr r1, [sp, #4] + add r5, r1, r0 + ldr r1, [sp, #0xc] + ldrh r3, [r5, r1] + add r1, r0, #2 + ldr r0, [sp, #4] + add r2, r0, r1 + ldr r0, [sp, #0xc] + ldrh r1, [r2, r0] + strh r1, [r5, r0] + strh r3, [r2, r0] +_022546D6: + mov r5, #0 + cmp r6, #0 + ble _0225471A + ldr r0, [sp, #4] + str r0, [sp, #0x18] + add r7, r0, r7 +_022546E2: + cmp r5, r4 + beq _02254706 + ldr r0, [sp] + add r1, r5, #0 + bl ov16_0223E208 + str r0, [sp, #0x1c] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223E208 + ldr r1, [sp, #0x1c] + cmp r1, r0 + beq _02254706 + ldr r1, [sp, #0x18] + ldr r0, _0225473C ; =0x00003084 + mov r2, #0 + strh r2, [r1, r0] +_02254706: + ldr r0, _02254740 ; =0x0000308C + mov r1, #0 + strh r1, [r7, r0] + ldr r0, [sp, #0x18] + add r5, r5, #1 + add r0, r0, #2 + str r0, [sp, #0x18] + add r7, #8 + cmp r5, r6 + blt _022546E2 +_0225471A: + lsl r1, r4, #0x18 + ldr r0, [sp, #4] + lsr r1, r1, #0x18 + bl ov16_0225B80C + lsl r1, r4, #0x18 + ldr r0, [sp, #4] + lsr r1, r1, #0x18 + bl ov16_0225B824 + lsl r1, r4, #0x18 + ldr r0, [sp, #4] + lsr r1, r1, #0x18 + bl ov16_0225B830 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225473C: .word 0x00003084 +_02254740: .word 0x0000308C + thumb_func_end ov16_0225433C + + thumb_func_start ov16_02254744 +ov16_02254744: ; 0x02254744 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #4] + str r0, [sp] + add r5, r2, #0 + bl ov16_0223DF1C + str r0, [sp, #0xc] + mov r0, #0xc0 + mul r0, r5 + ldr r1, [sp, #4] + str r0, [sp, #8] + add r3, r1, r0 + ldr r0, _02254968 ; =0x00002D58 + mov r2, #0 + mov r1, #6 +_02254764: + add r2, r2, #1 + strb r1, [r3, r0] + add r3, r3, #1 + cmp r2, #8 + blt _02254764 + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + ldr r0, [sp, #4] + mov r7, #0 + add r2, r0, r1 + ldr r1, _0225496C ; =0x00002DB0 + add r0, r1, #0 + str r7, [r2, r1] + add r0, #0x10 + str r7, [r2, r0] + ldr r0, [sp, #0xc] + cmp r0, #0 + ble _0225480A + ldr r4, [sp, #4] + add r1, #0x1c + add r0, r4, #0 + add r6, r0, r1 +_02254792: + ldr r0, _0225496C ; =0x00002DB0 + ldr r1, [r4, r0] + mov r0, #1 + lsl r0, r0, #0x1a + tst r0, r1 + beq _022547B4 + ldr r0, [r6, #0] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1e + cmp r5, r0 + bne _022547B4 + ldr r0, _0225496C ; =0x00002DB0 + ldr r1, [r4, r0] + ldr r0, _02254970 ; =0xFBFFFFFF + and r1, r0 + ldr r0, _0225496C ; =0x00002DB0 + str r1, [r4, r0] +_022547B4: + add r0, r5, #0 + bl sub_020787CC + ldr r1, _0225496C ; =0x00002DB0 + lsl r0, r0, #0x10 + ldr r1, [r4, r1] + tst r0, r1 + beq _022547DC + add r0, r5, #0 + bl sub_020787CC + ldr r1, _0225496C ; =0x00002DB0 + lsl r2, r0, #0x10 + mov r0, #0 + mvn r0, r0 + ldr r1, [r4, r1] + eor r0, r2 + and r1, r0 + ldr r0, _0225496C ; =0x00002DB0 + str r1, [r4, r0] +_022547DC: + ldr r0, _0225496C ; =0x00002DB0 + ldr r1, [r4, r0] + mov r0, #0xe + lsl r0, r0, #0xc + tst r0, r1 + beq _022547FE + ldr r0, [r6, #0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1e + cmp r5, r0 + bne _022547FE + ldr r0, _0225496C ; =0x00002DB0 + ldr r1, [r4, r0] + ldr r0, _02254974 ; =0xFFFF1FFF + and r1, r0 + ldr r0, _0225496C ; =0x00002DB0 + str r1, [r4, r0] +_022547FE: + ldr r0, [sp, #0xc] + add r7, r7, #1 + add r4, #0xc0 + add r6, #0xc0 + cmp r7, r0 + blt _02254792 +_0225480A: + ldr r1, _02254978 ; =0x00002DC8 + ldr r0, [sp, #4] + add r1, r0, r1 + ldr r0, [sp, #8] + add r6, r1, r0 + mov r1, #0 + add r0, r1, #0 +_02254818: + strb r0, [r6, r1] + add r1, r1, #1 + cmp r1, #0x38 + blo _02254818 + mov r2, #0x75 + ldr r1, [sp, #4] + lsl r2, r2, #2 + add r2, r1, r2 + lsl r1, r5, #6 + add r1, r2, r1 + mov r4, #0 +_0225482E: + strb r4, [r1, r0] + add r0, r0, #1 + cmp r0, #0x40 + blo _0225482E + mov r2, #0xc0 + add r3, r2, #0 + ldr r0, [sp, #4] + add r3, #0x90 + ldr r0, [r0, r3] + add r1, r5, #0 + ldr r3, [sp, #4] + mul r1, r2 + add r3, r3, r1 + add r1, r2, #0 + ldr r7, _0225497C ; =0x00002DD4 + add r0, r0, #1 + str r0, [r3, r7] + ldr r0, [sp, #4] + add r1, #0x90 + ldr r0, [r0, r1] + add r1, r7, #4 + add r0, r0, #1 + str r0, [r3, r1] + ldr r1, [r6, #0] + ldr r0, _02254980 ; =0xBFFFFFFF + add r2, #0x90 + and r0, r1 + ldr r1, [sp, #4] + mov r3, #0xff + ldr r1, [r1, r2] + add r1, r1, #1 + lsl r1, r1, #0x1f + lsr r1, r1, #1 + orr r0, r1 + str r0, [r6, #0] + ldr r0, [sp, #4] + lsl r6, r5, #1 + add r2, r0, r6 + ldr r0, _02254984 ; =0x0000305C + add r1, r0, #0 + strh r4, [r2, r0] + add r1, #8 + strh r4, [r2, r1] + add r1, r0, #0 + add r1, #0x10 + strh r3, [r2, r1] + add r1, r0, #0 + add r1, #0x18 + strh r4, [r2, r1] + add r1, r0, #0 + add r1, #0x20 + strh r4, [r2, r1] + add r1, r0, #0 + add r1, #0x28 + strh r4, [r2, r1] + ldr r1, [sp, #4] + lsl r3, r5, #3 + add r1, r1, r3 + add r3, r0, #0 + add r3, #0x30 + strh r4, [r1, r3] + add r3, r0, #0 + add r3, #0x32 + strh r4, [r1, r3] + add r3, r0, #0 + add r3, #0x34 + strh r4, [r1, r3] + add r3, r0, #0 + add r3, #0x36 + strh r4, [r1, r3] + add r1, r0, #0 + add r1, #0x50 + strh r4, [r2, r1] + add r1, r0, #0 + add r1, #0x68 + strh r4, [r2, r1] + add r1, r0, #0 + add r1, #0x70 + strh r4, [r2, r1] + add r1, r0, #0 + add r1, #0x78 + strh r4, [r2, r1] + add r0, #0x80 + strh r4, [r2, r0] + add r0, r5, #0 + bl sub_020787CC + mov r1, #6 + lsl r3, r0, #8 + mov r0, #0 + mvn r0, r0 + ldr r2, [sp, #4] + lsl r1, r1, #6 + ldr r2, [r2, r1] + eor r0, r3 + and r2, r0 + ldr r0, [sp, #4] + mov r4, #0 + str r2, [r0, r1] + ldr r0, [sp, #0xc] + cmp r0, #0 + ble _02254934 + ldr r7, [sp, #4] + add r0, r7, #0 + add r6, r0, r6 +_02254900: + cmp r4, r5 + beq _02254922 + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223E208 + str r0, [sp, #0x10] + ldr r0, [sp] + add r1, r5, #0 + bl ov16_0223E208 + ldr r1, [sp, #0x10] + cmp r1, r0 + beq _02254922 + ldr r0, _02254988 ; =0x00003084 + mov r1, #0 + strh r1, [r7, r0] +_02254922: + ldr r0, _0225498C ; =0x0000308C + mov r1, #0 + strh r1, [r6, r0] + ldr r0, [sp, #0xc] + add r4, r4, #1 + add r7, r7, #2 + add r6, #8 + cmp r4, r0 + blt _02254900 +_02254934: + mov r1, #0x4f + ldr r0, [sp, #4] + lsl r1, r1, #2 + add r3, r0, r1 + lsl r2, r5, #2 + ldr r1, [r3, r2] + mov r0, #1 + bic r1, r0 + str r1, [r3, r2] + lsl r1, r5, #0x18 + ldr r0, [sp, #4] + lsr r1, r1, #0x18 + bl ov16_0225B80C + lsl r1, r5, #0x18 + ldr r0, [sp, #4] + lsr r1, r1, #0x18 + bl ov16_0225B824 + lsl r1, r5, #0x18 + ldr r0, [sp, #4] + lsr r1, r1, #0x18 + bl ov16_0225B830 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02254968: .word 0x00002D58 +_0225496C: .word 0x00002DB0 +_02254970: .word 0xFBFFFFFF +_02254974: .word 0xFFFF1FFF +_02254978: .word 0x00002DC8 +_0225497C: .word 0x00002DD4 +_02254980: .word 0xBFFFFFFF +_02254984: .word 0x0000305C +_02254988: .word 0x00003084 +_0225498C: .word 0x0000308C + thumb_func_end ov16_02254744 + + thumb_func_start ov16_02254990 +ov16_02254990: ; 0x02254990 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #0x75 + add r5, r1, #0 + lsl r0, r0, #2 + add r7, r5, r0 + mov r0, #0xd1 + lsl r0, r0, #2 + add r6, r5, r0 + mov r0, #8 + add r4, r5, #0 + str r0, [sp, #8] +_022549AE: + mov r0, #0 + add r1, r7, #0 + mov r2, #0x40 + bl sub_020C4BB8 + mov r0, #0 + add r1, r6, #0 + mov r2, #4 + bl sub_020C4BB8 + ldr r0, _02254A58 ; =0x00002DB0 + ldr r1, [r4, r0] + ldr r0, [sp, #8] + bic r1, r0 + ldr r0, _02254A58 ; =0x00002DB0 + str r1, [r4, r0] + add r0, #0x20 + ldr r0, [r4, r0] + add r1, r0, #1 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r1, r0 + bge _022549EA + ldr r0, _02254A58 ; =0x00002DB0 + ldr r1, [r4, r0] + ldr r0, _02254A5C ; =0xFFBFFFFF + and r1, r0 + ldr r0, _02254A58 ; =0x00002DB0 + str r1, [r4, r0] +_022549EA: + ldr r0, _02254A60 ; =0x00002DAC + ldr r1, [r4, r0] + mov r0, #7 + tst r0, r1 + beq _02254A0A + ldr r0, _02254A58 ; =0x00002DB0 + ldr r1, [r4, r0] + mov r0, #1 + lsl r0, r0, #0xc + tst r0, r1 + beq _02254A0A + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r5, #0 + bl ov16_02253F20 +_02254A0A: + ldr r0, _02254A60 ; =0x00002DAC + ldr r1, [r4, r0] + mov r0, #7 + tst r0, r1 + beq _02254A2C + ldr r0, _02254A58 ; =0x00002DB0 + ldr r1, [r4, r0] + mov r0, #3 + lsl r0, r0, #0xa + tst r0, r1 + beq _02254A2C + ldr r0, _02254A58 ; =0x00002DB0 + ldr r1, [r4, r0] + ldr r0, _02254A64 ; =0xFFFFF3FF + and r1, r0 + ldr r0, _02254A58 ; =0x00002DB0 + str r1, [r4, r0] +_02254A2C: + ldr r0, [sp, #4] + add r7, #0x40 + add r0, r0, #1 + add r6, r6, #4 + add r4, #0xc0 + str r0, [sp, #4] + cmp r0, #4 + blt _022549AE + mov r2, #0x71 + lsl r2, r2, #2 + ldr r0, [r5, r2] + ldr r1, _02254A68 ; =0xFFEFFFFF + and r0, r1 + str r0, [r5, r2] + add r0, r2, #0 + add r0, #8 + ldr r0, [r5, r0] + add r2, #8 + and r0, r1 + str r0, [r5, r2] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02254A58: .word 0x00002DB0 +_02254A5C: .word 0xFFBFFFFF +_02254A60: .word 0x00002DAC +_02254A64: .word 0xFFFFF3FF +_02254A68: .word 0xFFEFFFFF + thumb_func_end ov16_02254990 + + thumb_func_start ov16_02254A6C +ov16_02254A6C: ; 0x02254A6C + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + str r0, [sp] + ldr r0, [sp, #0x70] + add r7, r1, #0 + str r0, [sp, #0x70] + str r2, [sp, #4] + add r0, r7, #0 + add r1, r2, #0 + add r5, r3, #0 + bl ov16_02258AB8 + str r0, [sp, #0x34] + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + add r4, r7, r1 + str r1, [sp, #0x38] + ldr r0, [sp, #0x70] + mov r1, #1 + and r0, r1 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x70] + mov r1, #2 + and r0, r1 + str r0, [sp, #0x28] + ldr r0, [sp, #0x70] + mov r1, #4 + and r0, r1 + str r0, [sp, #0x24] + ldr r0, [sp, #4] + mov r1, #8 + lsl r0, r0, #1 + add r0, r7, r0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x70] + mov r2, #0x10 + and r0, r1 + ldr r1, _02254C84 ; =0x00002DC8 + str r0, [sp, #0x1c] + add r0, r7, r1 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x70] + sub r1, #0x88 + and r0, r2 + str r0, [sp, #0x18] + ldr r0, [sp, #0x70] + mov r2, #0x20 + and r0, r2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x70] + mov r2, #0x40 + and r0, r2 + str r0, [sp, #0x10] + ldr r2, [sp, #0x70] + mov r0, #0x80 + and r2, r0 + str r2, [sp, #0xc] + lsl r2, r0, #2 + ldr r0, [sp, #0x70] + mov r6, #0 + and r0, r2 + str r0, [sp, #8] + add r0, r7, r1 + str r0, [sp, #0x40] + ldr r0, _02254C88 ; =0x00002DE8 + str r4, [sp, #0x30] + add r0, r4, r0 + str r0, [sp, #0x44] + ldr r0, _02254C8C ; =0x00002DB0 + add r0, r4, r0 + str r0, [sp, #0x48] + ldr r0, _02254C90 ; =0x00002DEC + add r0, r4, r0 + str r0, [sp, #0x4c] + ldr r0, _02254C94 ; =0x00002DF8 + add r0, r4, r0 + str r0, [sp, #0x50] + ldr r0, _02254C94 ; =0x00002DF8 + add r0, r4, r0 + str r0, [sp, #0x58] + ldr r0, _02254C94 ; =0x00002DF8 + add r0, r4, r0 + str r0, [sp, #0x54] +_02254B14: + ldr r0, _02254C98 ; =0x00002D4C + ldrh r0, [r4, r0] + cmp r0, #0 + bne _02254B2A + ldr r0, [sp, #0x2c] + cmp r0, #0 + beq _02254B2A + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254B2A: + ldr r1, [sp, #0x30] + ldr r0, _02254C9C ; =0x00002D6C + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02254B42 + ldr r0, [sp, #0x28] + cmp r0, #0 + beq _02254B42 + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254B42: + ldr r0, [sp, #0x44] + ldrh r1, [r0] + ldr r0, _02254C98 ; =0x00002D4C + ldrh r0, [r4, r0] + cmp r1, r0 + bne _02254B5C + ldr r0, [sp, #0x24] + cmp r0, #0 + beq _02254B5C + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254B5C: + ldr r1, [sp, #0x20] + ldr r0, _02254CA0 ; =0x0000307C + ldrh r1, [r1, r0] + ldr r0, _02254C98 ; =0x00002D4C + ldrh r0, [r4, r0] + cmp r1, r0 + bne _02254B84 + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _02254B84 + ldr r0, [sp, #0x48] + ldr r1, [r0, #0] + mov r0, #2 + lsl r0, r0, #0x1e + tst r0, r1 + beq _02254B84 + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254B84: + ldr r1, [sp, #0x3c] + ldr r0, [sp, #0x38] + ldr r0, [r1, r0] + lsl r0, r0, #0x15 + lsr r0, r0, #0x1d + beq _02254BAE + ldr r0, [sp, #0x18] + cmp r0, #0 + beq _02254BAE + ldr r0, _02254C98 ; =0x00002D4C + ldrh r0, [r4, r0] + lsl r0, r0, #4 + add r1, r7, r0 + ldr r0, _02254CA4 ; =0x000003E1 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02254BAE + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254BAE: + ldr r3, _02254C98 ; =0x00002D4C + ldr r0, [sp] + ldrh r3, [r4, r3] + ldr r2, [sp, #4] + add r1, r7, #0 + bl ov16_02255EF4 + cmp r0, #0 + beq _02254BCE + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02254BCE + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254BCE: + ldr r3, _02254C98 ; =0x00002D4C + ldr r0, [sp] + ldrh r3, [r4, r3] + ldr r2, [sp, #4] + add r1, r7, #0 + bl ov16_02256044 + cmp r0, #0 + beq _02254BEE + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02254BEE + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254BEE: + ldr r3, _02254C98 ; =0x00002D4C + ldr r0, [sp] + ldrh r3, [r4, r3] + ldr r2, [sp, #4] + add r1, r7, #0 + bl ov16_02256078 + cmp r0, #0 + beq _02254C0E + ldr r0, [sp, #0xc] + cmp r0, #0 + beq _02254C0E + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254C0E: + ldr r0, [sp, #0x4c] + ldrh r1, [r0] + cmp r1, #0 + beq _02254C26 + ldr r0, _02254C98 ; =0x00002D4C + ldrh r0, [r4, r0] + cmp r1, r0 + beq _02254C26 + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254C26: + ldr r0, [sp, #0x34] + cmp r0, #0x37 + beq _02254C34 + cmp r0, #0x73 + beq _02254C34 + cmp r0, #0x7d + bne _02254C6C +_02254C34: + ldr r0, [sp, #8] + cmp r0, #0 + beq _02254C6C + ldr r1, [sp, #0x40] + ldr r0, [sp, #0x38] + add r0, r1, r0 + ldr r1, [sp, #0x50] + ldrh r1, [r1] + bl ov16_02254EE0 + cmp r0, #4 + bne _02254C54 + ldr r0, [sp, #0x54] + mov r1, #0 + strh r1, [r0] + b _02254C6C +_02254C54: + ldr r0, [sp, #0x58] + ldrh r1, [r0] + cmp r1, #0 + beq _02254C6C + ldr r0, _02254C98 ; =0x00002D4C + ldrh r0, [r4, r0] + cmp r1, r0 + beq _02254C6C + add r0, r6, #0 + bl sub_020787CC + orr r5, r0 +_02254C6C: + ldr r0, [sp, #0x30] + add r6, r6, #1 + add r0, r0, #1 + add r4, r4, #2 + str r0, [sp, #0x30] + cmp r6, #4 + bge _02254C7C + b _02254B14 +_02254C7C: + add r0, r5, #0 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_02254C84: .word 0x00002DC8 +_02254C88: .word 0x00002DE8 +_02254C8C: .word 0x00002DB0 +_02254C90: .word 0x00002DEC +_02254C94: .word 0x00002DF8 +_02254C98: .word 0x00002D4C +_02254C9C: .word 0x00002D6C +_02254CA0: .word 0x0000307C +_02254CA4: .word 0x000003E1 + thumb_func_end ov16_02254A6C + + thumb_func_start ov16_02254CA8 +ov16_02254CA8: ; 0x02254CA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r3, #0 + mov r3, #1 + str r3, [sp, #8] + mov r3, #4 + str r3, [sp] + mov r3, #0 + str r0, [sp, #4] + add r5, r1, #0 + add r6, r2, #0 + ldr r4, [sp, #0x40] + bl ov16_02254A6C + str r0, [sp, #0xc] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0xc] + tst r0, r1 + beq _02254CFA + mov r0, #0xa + strb r0, [r4, #1] + ldr r0, _02254EBC ; =0x00000261 + add r1, r6, #0 + strh r0, [r4, #2] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + lsl r0, r7, #1 + add r1, r1, r0 + ldr r0, _02254EC0 ; =0x00002D4C + ldrh r0, [r1, r0] + str r0, [r4, #8] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254CFA: + mov r0, #8 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + str r0, [sp, #0x10] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0x10] + tst r0, r1 + beq _02254D32 + mov r0, #2 + strb r0, [r4, #1] + mov r0, #0x99 + lsl r0, r0, #2 + strh r0, [r4, #2] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254D32: + mov r0, #0x10 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + str r0, [sp, #0x14] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0x14] + tst r0, r1 + beq _02254D78 + mov r0, #0xa + strb r0, [r4, #1] + ldr r0, _02254EC4 ; =0x00000265 + add r1, r6, #0 + strh r0, [r4, #2] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + lsl r0, r7, #1 + add r1, r1, r0 + ldr r0, _02254EC0 ; =0x00002D4C + ldrh r0, [r1, r0] + str r0, [r4, #8] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254D78: + mov r0, #0x20 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + str r0, [sp, #0x18] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0x18] + tst r0, r1 + beq _02254DC0 + mov r0, #0xa + strb r0, [r4, #1] + mov r0, #0x9a + lsl r0, r0, #2 + strh r0, [r4, #2] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + lsl r0, r7, #1 + add r1, r1, r0 + ldr r0, _02254EC0 ; =0x00002D4C + ldrh r0, [r1, r0] + str r0, [r4, #8] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254DC0: + mov r0, #0x40 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + str r0, [sp, #0x1c] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0x1c] + tst r0, r1 + beq _02254E06 + mov r0, #0xa + strb r0, [r4, #1] + ldr r0, _02254EC8 ; =0x000003E9 + add r1, r6, #0 + strh r0, [r4, #2] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + lsl r0, r7, #1 + add r1, r1, r0 + ldr r0, _02254EC0 ; =0x00002D4C + ldrh r0, [r1, r0] + str r0, [r4, #8] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254E06: + mov r0, #0x80 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + str r0, [sp, #0x20] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0x20] + tst r0, r1 + beq _02254E50 + mov r0, #0x22 + strb r0, [r4, #1] + ldr r0, _02254ECC ; =0x00000421 + add r1, r6, #0 + strh r0, [r4, #2] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + ldr r0, _02254ED0 ; =0x00000179 + str r0, [r4, #8] + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + lsl r0, r7, #1 + add r1, r1, r0 + ldr r0, _02254EC0 ; =0x00002D4C + ldrh r0, [r1, r0] + str r0, [r4, #0xc] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254E50: + mov r0, #2 + lsl r0, r0, #8 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + str r0, [sp, #0x24] + add r0, r7, #0 + bl sub_020787CC + ldr r1, [sp, #0x24] + tst r0, r1 + beq _02254E90 + mov r0, #0x18 + strb r0, [r4, #1] + ldr r0, _02254ED4 ; =0x0000038F + strh r0, [r4, #2] + mov r0, #0xc0 + mul r0, r6 + add r2, r5, r0 + ldr r0, _02254ED8 ; =0x00002DB8 + ldrh r1, [r2, r0] + add r0, #0x40 + str r1, [r4, #4] + ldrh r0, [r2, r0] + str r0, [r4, #8] + mov r0, #0 + str r0, [sp, #8] + b _02254EB6 +_02254E90: + mov r0, #2 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov16_02254A6C + add r5, r0, #0 + add r0, r7, #0 + bl sub_020787CC + tst r0, r5 + beq _02254EB6 + mov r0, #0 + str r0, [sp, #8] + strb r0, [r4, #1] + ldr r0, _02254EDC ; =0x00000337 + strh r0, [r4, #2] +_02254EB6: + ldr r0, [sp, #8] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02254EBC: .word 0x00000261 +_02254EC0: .word 0x00002D4C +_02254EC4: .word 0x00000265 +_02254EC8: .word 0x000003E9 +_02254ECC: .word 0x00000421 +_02254ED0: .word 0x00000179 +_02254ED4: .word 0x0000038F +_02254ED8: .word 0x00002DB8 +_02254EDC: .word 0x00000337 + thumb_func_end ov16_02254CA8 + + thumb_func_start ov16_02254EE0 +ov16_02254EE0: ; 0x02254EE0 + mov r3, #0 +_02254EE2: + ldrh r2, [r0, #0xc] + cmp r1, r2 + beq _02254EF0 + add r3, r3, #1 + add r0, r0, #2 + cmp r3, #4 + blt _02254EE2 +_02254EF0: + add r0, r3, #0 + bx lr + thumb_func_end ov16_02254EE0 + + thumb_func_start ov16_02254EF4 +ov16_02254EF4: ; 0x02254EF4 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r1, r6, #0 + add r5, r0, #0 + add r4, r3, #0 + bl ov16_02258AB8 + mov r1, #1 + cmp r0, #0x6a + beq _02254F1A + mov r0, #0xc0 + mul r0, r6 + add r2, r5, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r2, [r2, r0] + lsl r0, r1, #0xa + tst r0, r2 + beq _02254F30 +_02254F1A: + lsl r0, r4, #1 + add r2, r4, r0 + ldr r0, _02254FA0 ; =0x0226ECD5 + ldrb r0, [r0, r2] + cmp r0, #2 + bne _02254F30 + ldr r0, _02254FA4 ; =0x0226ECD6 + ldrb r0, [r0, r2] + cmp r0, #0 + bne _02254F30 + mov r1, #0 +_02254F30: + lsl r0, r6, #6 + add r2, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r2, r0] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + beq _02254F4E + lsl r0, r4, #1 + add r2, r4, r0 + ldr r0, _02254FA0 ; =0x0226ECD5 + ldrb r0, [r0, r2] + cmp r0, #2 + bne _02254F4E + mov r1, #0 +_02254F4E: + mov r0, #6 + lsl r0, r0, #6 + ldr r2, [r5, r0] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r2 + beq _02254F72 + lsl r0, r4, #1 + add r2, r4, r0 + ldr r0, _02254FA0 ; =0x0226ECD5 + ldrb r0, [r0, r2] + cmp r0, #2 + bne _02254F72 + ldr r0, _02254FA4 ; =0x0226ECD6 + ldrb r0, [r0, r2] + cmp r0, #0 + bne _02254F72 + mov r1, #0 +_02254F72: + mov r0, #0xc0 + mul r0, r6 + add r2, r5, r0 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r2, [r2, r0] + mov r0, #1 + lsl r0, r0, #0x16 + tst r0, r2 + beq _02254F9C + lsl r0, r4, #1 + add r2, r4, r0 + ldr r0, _02254FA0 ; =0x0226ECD5 + ldrb r0, [r0, r2] + cmp r0, #0x11 + bne _02254F9C + ldr r0, _02254FA4 ; =0x0226ECD6 + ldrb r0, [r0, r2] + cmp r0, #0 + bne _02254F9C + mov r1, #0 +_02254F9C: + add r0, r1, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02254FA0: .word 0x0226ECD5 +_02254FA4: .word 0x0226ECD6 + thumb_func_end ov16_02254EF4 + + thumb_func_start ov16_02254FA8 +ov16_02254FA8: ; 0x02254FA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r0, [sp, #0x50] + add r5, r1, #0 + str r0, [sp, #0x50] + ldr r0, [sp, #0x54] + str r2, [sp, #8] + str r0, [sp, #0x54] + add r0, r2, #0 + add r4, r3, #0 + ldr r7, [sp, #0x48] + ldr r6, [sp, #0x4c] + cmp r0, #0xa5 + bne _02254FCA + ldr r0, [sp, #0x50] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} +_02254FCA: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02258AB8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x24] + add r0, r5, #0 + add r1, r7, #0 + mov r2, #0 + bl ov16_02258ACC + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02258AB8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x20] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov16_02258ACC + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x60 + bne _02255012 + mov r0, #0 + str r0, [sp, #0x28] + b _0225502A +_02255012: + cmp r4, #0 + beq _0225501E + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x28] + b _0225502A +_0225501E: + ldr r0, [sp, #8] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022552BC ; =0x000003E2 + ldrb r0, [r1, r0] + str r0, [sp, #0x28] +_0225502A: + ldr r0, [sp, #8] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022552C0 ; =0x000003E1 + ldrb r0, [r1, r0] + str r0, [sp, #0x14] + ldr r0, _022552C4 ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #0xa + tst r0, r1 + bne _02255088 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x28] + cmp r1, r0 + beq _02255066 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x28] + cmp r1, r0 + bne _02255088 +_02255066: + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x5b + bne _0225507A + ldr r0, [sp, #0x50] + lsl r0, r0, #1 + str r0, [sp, #0x50] + b _02255088 +_0225507A: + ldr r1, [sp, #0x50] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + str r0, [sp, #0x50] +_02255088: + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #0x1a + bl ov16_02255AB4 + cmp r0, #1 + bne _022550B4 + ldr r0, [sp, #0x28] + cmp r0, #4 + bne _022550B4 + ldr r0, [sp, #0x20] + cmp r0, #0x6a + beq _022550B4 + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #2 + lsl r0, r0, #0xa + orr r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] + b _022551D0 +_022550B4: + mov r0, #0xc0 + add r1, r6, #0 + mul r1, r0 + ldr r0, _022552C8 ; =0x00002DCC + add r3, r5, r1 + ldr r2, [r3, r0] + lsl r2, r2, #0x10 + lsr r2, r2, #0x1d + beq _022550EC + sub r0, #0xc + ldr r2, [r3, r0] + mov r0, #1 + lsl r0, r0, #0xa + tst r2, r0 + bne _022550EC + ldr r2, [sp, #0x28] + cmp r2, #4 + bne _022550EC + ldr r2, [sp, #0x20] + cmp r2, #0x6a + beq _022550EC + ldr r1, [sp, #0x54] + lsl r0, r0, #0xa + ldr r1, [r1, #0] + orr r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] + b _022551D0 +_022550EC: + add r0, r5, r1 + mov r4, #0 + str r0, [sp, #0x18] +_022550F2: + lsl r0, r4, #1 + ldr r1, _022552CC ; =0x0226ECD4 + add r0, r4, r0 + add r1, r1, r0 + str r1, [sp, #0xc] + ldr r1, _022552CC ; =0x0226ECD4 + ldrb r1, [r1, r0] + cmp r1, #0xfe + bne _02255122 + ldr r1, [sp, #0x18] + ldr r0, _022552D0 ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #2 + lsl r0, r0, #0x1c + tst r0, r1 + bne _022551D0 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x71 + beq _022551D0 + add r4, r4, #1 + b _022551C4 +_02255122: + ldr r0, [sp, #0x28] + cmp r0, r1 + bne _022551C2 + ldr r0, [sp, #0xc] + add r1, r6, #0 + ldrb r0, [r0, #1] + mov r2, #0x1b + mov r3, #0 + str r0, [sp, #0x10] + add r0, r5, #0 + bl ov16_02252060 + ldr r1, [sp, #0x10] + cmp r1, r0 + bne _02255168 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov16_02254EF4 + cmp r0, #1 + bne _02255168 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #0x54] + ldr r3, [sp, #0x50] + str r0, [sp, #4] + ldrb r2, [r2, #2] + add r0, r5, #0 + add r1, r7, #0 + bl ov16_0225B63C + str r0, [sp, #0x50] +_02255168: + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x10] + cmp r1, r0 + bne _022551C2 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + str r0, [sp, #0x2c] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x2c] + cmp r1, r0 + beq _022551C2 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov16_02254EF4 + cmp r0, #1 + bne _022551C2 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #0x54] + ldr r3, [sp, #0x50] + str r0, [sp, #4] + ldrb r2, [r2, #2] + add r0, r5, #0 + add r1, r7, #0 + bl ov16_0225B63C + str r0, [sp, #0x50] +_022551C2: + add r4, r4, #1 +_022551C4: + lsl r0, r4, #1 + add r1, r4, r0 + ldr r0, _022552CC ; =0x0226ECD4 + ldrb r0, [r0, r1] + cmp r0, #0xff + bne _022550F2 +_022551D0: + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #0x19 + bl ov16_02255AB4 + cmp r0, #1 + bne _02255214 + ldr r1, [sp, #8] + add r0, r5, #0 + bl ov16_0225B6C8 + cmp r0, #0 + beq _02255214 + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #2 + tst r0, r1 + beq _022551FE + mov r0, #6 + and r0, r1 + cmp r0, #6 + bne _02255214 +_022551FE: + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02255214 + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #1 + lsl r0, r0, #0x12 + orr r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] + b _022552B6 +_02255214: + ldr r0, _022552C4 ; =0x0000213C + ldr r2, [r5, r0] + mov r0, #2 + lsl r0, r0, #0xa + add r1, r2, #0 + tst r1, r0 + bne _022552A2 + lsl r0, r0, #4 + tst r0, r2 + bne _022552A2 + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #2 + tst r0, r1 + beq _0225527E + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _0225527E + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #0x6f + bl ov16_02255AB4 + cmp r0, #1 + beq _02255258 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #0x74 + bl ov16_02255AB4 + cmp r0, #1 + bne _02255266 +_02255258: + ldr r0, [sp, #0x50] + lsl r1, r0, #1 + add r0, r0, r1 + mov r1, #4 + bl ov16_022563F8 + str r0, [sp, #0x50] +_02255266: + ldr r0, [sp, #0x24] + cmp r0, #0x60 + bne _0225527E + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x50] + add r0, #0x64 + str r0, [sp, #0x1c] + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp, #0x50] +_0225527E: + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #4 + tst r0, r1 + beq _022552B6 + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _022552B6 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x6e + bne _022552B6 + ldr r0, [sp, #0x50] + lsl r0, r0, #1 + str r0, [sp, #0x50] + b _022552B6 +_022552A2: + ldr r0, [sp, #0x54] + ldr r1, [r0, #0] + mov r0, #2 + bic r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] + mov r0, #4 + bic r1, r0 + ldr r0, [sp, #0x54] + str r1, [r0, #0] +_022552B6: + ldr r0, [sp, #0x50] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022552BC: .word 0x000003E2 +_022552C0: .word 0x000003E1 +_022552C4: .word 0x0000213C +_022552C8: .word 0x00002DCC +_022552CC: .word 0x0226ECD4 +_022552D0: .word 0x00002DB0 + thumb_func_end ov16_02254FA8 + + thumb_func_start ov16_022552D4 +ov16_022552D4: ; 0x022552D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + ldr r0, [sp, #0x2c] + str r1, [sp] + str r0, [sp, #0x2c] + ldr r0, [sp, #0x30] + str r3, [sp, #4] + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + ldr r6, [sp, #0x38] + str r0, [sp, #0x34] + add r0, r1, #0 + cmp r0, #0xa5 + beq _022553EA + add r0, r3, #0 + cmp r0, #0x60 + bne _022552FE + mov r0, #0 + str r0, [sp, #0xc] + b _02255316 +_022552FE: + cmp r2, #0 + beq _0225530A + lsl r0, r2, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + b _02255316 +_0225530A: + add r0, r1, #0 + lsl r0, r0, #4 + add r1, r7, r0 + ldr r0, _022553F0 ; =0x000003E2 + ldrb r0, [r1, r0] + str r0, [sp, #0xc] +_02255316: + ldr r0, [sp, #4] + cmp r0, #0x68 + beq _02255346 + ldr r0, [sp, #0x28] + cmp r0, #0x1a + bne _02255346 + ldr r0, [sp, #0xc] + cmp r0, #4 + bne _02255346 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r7, r0] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r1 + bne _02255346 + ldr r0, [sp, #0x2c] + cmp r0, #0x6a + beq _02255346 + ldr r1, [r6, #0] + mov r0, #8 + orr r0, r1 + str r0, [r6, #0] + b _022553BA +_02255346: + mov r4, #0 +_02255348: + lsl r0, r4, #1 + add r1, r4, r0 + ldr r0, _022553F4 ; =0x0226ECD4 + add r5, r0, r1 + ldrb r1, [r0, r1] + cmp r1, #0xfe + bne _02255360 + ldr r0, [sp, #4] + cmp r0, #0x71 + beq _022553BA + add r4, r4, #1 + b _022553AE +_02255360: + ldr r0, [sp, #0xc] + cmp r0, r1 + bne _022553AC + ldrb r0, [r5, #1] + ldr r1, [sp, #0x30] + str r0, [sp, #8] + cmp r1, r0 + bne _02255386 + ldr r1, [sp, #0x2c] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_022553F8 + cmp r0, #1 + bne _02255386 + ldrb r0, [r5, #2] + add r1, r6, #0 + bl ov16_02255448 +_02255386: + ldr r1, [sp, #0x34] + ldr r0, [sp, #8] + cmp r1, r0 + bne _022553AC + ldr r1, [sp, #0x30] + ldr r0, [sp, #0x34] + cmp r1, r0 + beq _022553AC + ldr r1, [sp, #0x2c] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_022553F8 + cmp r0, #1 + bne _022553AC + ldrb r0, [r5, #2] + add r1, r6, #0 + bl ov16_02255448 +_022553AC: + add r4, r4, #1 +_022553AE: + lsl r0, r4, #1 + add r1, r4, r0 + ldr r0, _022553F4 ; =0x0226ECD4 + ldrb r0, [r0, r1] + cmp r0, #0xff + bne _02255348 +_022553BA: + ldr r0, [sp, #4] + cmp r0, #0x68 + beq _022553EA + ldr r0, [sp, #0x28] + cmp r0, #0x19 + bne _022553EA + ldr r1, [sp] + add r0, r7, #0 + bl ov16_0225B6C8 + cmp r0, #0 + beq _022553EA + ldr r1, [r6, #0] + mov r0, #2 + tst r0, r1 + beq _022553E2 + mov r0, #6 + and r0, r1 + cmp r0, #6 + bne _022553EA +_022553E2: + ldr r1, [r6, #0] + mov r0, #8 + orr r0, r1 + str r0, [r6, #0] +_022553EA: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022553F0: .word 0x000003E2 +_022553F4: .word 0x0226ECD4 + thumb_func_end ov16_022552D4 + + thumb_func_start ov16_022553F8 +ov16_022553F8: ; 0x022553F8 + push {r3, r4} + mov r3, #1 + cmp r1, #0x6a + bne _02255416 + lsl r1, r2, #1 + add r4, r2, r1 + ldr r1, _02255440 ; =0x0226ECD5 + ldrb r1, [r1, r4] + cmp r1, #2 + bne _02255416 + ldr r1, _02255444 ; =0x0226ECD6 + ldrb r1, [r1, r4] + cmp r1, #0 + bne _02255416 + mov r3, #0 +_02255416: + mov r1, #6 + lsl r1, r1, #6 + ldr r1, [r0, r1] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r1 + beq _0225543A + lsl r0, r2, #1 + add r1, r2, r0 + ldr r0, _02255440 ; =0x0226ECD5 + ldrb r0, [r0, r1] + cmp r0, #2 + bne _0225543A + ldr r0, _02255444 ; =0x0226ECD6 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _0225543A + mov r3, #0 +_0225543A: + add r0, r3, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 +_02255440: .word 0x0226ECD5 +_02255444: .word 0x0226ECD6 + thumb_func_end ov16_022553F8 + + thumb_func_start ov16_02255448 +ov16_02255448: ; 0x02255448 + cmp r0, #0 + beq _02255456 + cmp r0, #5 + beq _02255468 + cmp r0, #0x14 + beq _02255480 + bx lr +_02255456: + ldr r2, [r1, #0] + mov r0, #8 + orr r2, r0 + mov r0, #4 + bic r2, r0 + mov r0, #2 + bic r2, r0 + str r2, [r1, #0] + bx lr +_02255468: + ldr r2, [r1, #0] + mov r0, #2 + tst r0, r2 + beq _02255478 + mov r0, #2 + bic r2, r0 + str r2, [r1, #0] + bx lr +_02255478: + mov r0, #4 + orr r0, r2 + str r0, [r1, #0] + bx lr +_02255480: + ldr r2, [r1, #0] + mov r0, #4 + tst r0, r2 + beq _02255490 + mov r0, #4 + bic r2, r0 + str r2, [r1, #0] + bx lr +_02255490: + mov r0, #2 + orr r0, r2 + str r0, [r1, #0] + bx lr + thumb_func_end ov16_02255448 + + thumb_func_start ov16_02255498 +ov16_02255498: ; 0x02255498 + mov r2, #0xd1 + lsl r2, r2, #2 + add r2, r0, r2 + lsl r0, r1, #2 + ldr r0, [r2, r0] + lsl r1, r0, #0x1f + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x1e + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x1d + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x1c + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x1b + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x1a + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x19 + lsr r1, r1, #0x1f + bne _022554D8 + lsl r1, r0, #0x17 + lsr r1, r1, #0x1f + bne _022554D8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + beq _022554DC +_022554D8: + mov r0, #1 + bx lr +_022554DC: + mov r0, #0 + bx lr + thumb_func_end ov16_02255498 + + thumb_func_start ov16_022554E0 +ov16_022554E0: ; 0x022554E0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + add r5, r1, #0 + add r6, r2, #0 + str r3, [sp, #4] + mov r4, #0 + bl ov16_0223DF1C + add r7, r0, #0 + cmp r6, #0 + beq _022554FE + cmp r6, #1 + beq _02255522 + b _02255556 +_022554FE: + add r0, r4, #0 + cmp r7, #0 + ble _02255556 + ldr r2, _0225555C ; =0x00002D8C +_02255506: + ldr r1, [sp, #4] + cmp r0, r1 + beq _02255518 + ldr r1, [r5, r2] + cmp r1, #0 + beq _02255518 + add r1, r4, #1 + lsl r1, r1, #0x18 + lsr r4, r1, #0x18 +_02255518: + add r0, r0, #1 + add r5, #0xc0 + cmp r0, r7 + blt _02255506 + b _02255556 +_02255522: + add r6, r4, #0 + cmp r7, #0 + ble _02255556 +_02255528: + ldr r0, [sp] + add r1, r6, #0 + bl ov16_0223E208 + str r0, [sp, #8] + ldr r0, [sp] + ldr r1, [sp, #4] + bl ov16_0223E208 + ldr r1, [sp, #8] + cmp r1, r0 + bne _0225554E + ldr r0, _0225555C ; =0x00002D8C + ldr r0, [r5, r0] + cmp r0, #0 + beq _0225554E + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_0225554E: + add r6, r6, #1 + add r5, #0xc0 + cmp r6, r7 + blt _02255528 +_02255556: + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225555C: .word 0x00002D8C + thumb_func_end ov16_022554E0 + + thumb_func_start ov16_02255560 +ov16_02255560: ; 0x02255560 + add r2, r0, r1 + ldr r0, _0225556C ; =0x0000219C + ldrb r0, [r2, r0] + lsl r0, r0, #8 + orr r0, r1 + bx lr + ; .align 2, 0 +_0225556C: .word 0x0000219C + thumb_func_end ov16_02255560 + + thumb_func_start ov16_02255570 +ov16_02255570: ; 0x02255570 + push {r4, r5} + lsl r3, r1, #4 + add r5, r0, r3 + ldr r3, _0225559C ; =0x000021B4 + mov r2, #0 + ldr r4, [r5, r3] + cmp r4, #1 + bne _02255596 + sub r3, r3, #4 + ldr r3, [r5, r3] + cmp r3, #0 + beq _02255596 + mov r2, #0xc0 + mul r2, r1 + add r1, r0, r2 + lsl r0, r3, #1 + add r1, r1, r0 + ldr r0, _022555A0 ; =0x00002D4A + ldrh r2, [r1, r0] +_02255596: + add r0, r2, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_0225559C: .word 0x000021B4 +_022555A0: .word 0x00002D4A + thumb_func_end ov16_02255570 + + thumb_func_start ov16_022555A4 +ov16_022555A4: ; 0x022555A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + str r2, [sp, #4] + str r0, [sp] + add r7, r1, #0 + str r3, [sp, #8] + ldr r6, [sp, #0x70] + mov r4, #0 + bl ov16_0223DF1C + add r5, r0, #0 + ldr r0, [sp, #4] + cmp r0, #9 + bhi _02255618 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022555CC: ; jump table + .short _022555E0 - _022555CC - 2 ; case 0 + .short _0225561A - _022555CC - 2 ; case 1 + .short _02255666 - _022555CC - 2 ; case 2 + .short _022556A0 - _022555CC - 2 ; case 3 + .short _022556EC - _022555CC - 2 ; case 4 + .short _0225573E - _022555CC - 2 ; case 5 + .short _02255760 - _022555CC - 2 ; case 6 + .short _02255788 - _022555CC - 2 ; case 7 + .short _022557B4 - _022555CC - 2 ; case 8 + .short _022557E8 - _022555CC - 2 ; case 9 +_022555E0: + add r0, r4, #0 + str r0, [sp, #0x44] + cmp r5, #0 + ble _02255618 +_022555E8: + ldr r0, [sp] + ldr r1, [sp, #0x44] + bl ov16_0223E208 + str r0, [sp, #0x48] + ldr r0, [sp] + ldr r1, [sp, #8] + bl ov16_0223E208 + ldr r1, [sp, #0x48] + cmp r1, r0 + bne _0225560E + ldr r1, [sp, #0x44] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _0225560E + add r4, r4, #1 +_0225560E: + ldr r0, [sp, #0x44] + add r0, r0, #1 + str r0, [sp, #0x44] + cmp r0, r5 + blt _022555E8 +_02255618: + b _02255820 +_0225561A: + add r0, r4, #0 + str r0, [sp, #0xc] + cmp r5, #0 + ble _02255664 + str r7, [sp, #0x30] +_02255624: + ldr r0, [sp] + ldr r1, [sp, #0xc] + bl ov16_0223E208 + str r0, [sp, #0x4c] + ldr r0, [sp] + ldr r1, [sp, #8] + bl ov16_0223E208 + ldr r1, [sp, #0x4c] + cmp r1, r0 + bne _02255654 + ldr r1, [sp, #0x30] + ldr r0, _02255828 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02255654 + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _02255654 + add r4, r4, #1 +_02255654: + ldr r0, [sp, #0x30] + add r0, #0xc0 + str r0, [sp, #0x30] + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, r5 + blt _02255624 +_02255664: + b _02255820 +_02255666: + add r0, r4, #0 + str r0, [sp, #0x10] + cmp r5, #0 + ble _0225569E +_0225566E: + ldr r0, [sp] + ldr r1, [sp, #0x10] + bl ov16_0223E208 + str r0, [sp, #0x50] + ldr r0, [sp] + ldr r1, [sp, #8] + bl ov16_0223E208 + ldr r1, [sp, #0x50] + cmp r1, r0 + beq _02255694 + ldr r1, [sp, #0x10] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _02255694 + add r4, r4, #1 +_02255694: + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, r5 + blt _0225566E +_0225569E: + b _02255820 +_022556A0: + add r0, r4, #0 + str r0, [sp, #0x14] + cmp r5, #0 + ble _022556EA + str r7, [sp, #0x34] +_022556AA: + ldr r0, [sp] + ldr r1, [sp, #0x14] + bl ov16_0223E208 + str r0, [sp, #0x54] + ldr r0, [sp] + ldr r1, [sp, #8] + bl ov16_0223E208 + ldr r1, [sp, #0x54] + cmp r1, r0 + beq _022556DA + ldr r1, [sp, #0x34] + ldr r0, _02255828 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _022556DA + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _022556DA + add r4, r4, #1 +_022556DA: + ldr r0, [sp, #0x34] + add r0, #0xc0 + str r0, [sp, #0x34] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, r5 + blt _022556AA +_022556EA: + b _02255820 +_022556EC: + add r0, r4, #0 + str r0, [sp, #0x18] + cmp r5, #0 + ble _0225573C + str r7, [sp, #0x38] +_022556F6: + ldr r0, [sp] + ldr r1, [sp, #0x18] + bl ov16_0223E208 + str r0, [sp, #0x58] + ldr r0, [sp] + ldr r1, [sp, #8] + bl ov16_0223E208 + ldr r1, [sp, #0x58] + cmp r1, r0 + beq _0225572C + ldr r1, [sp, #0x38] + ldr r0, _02255828 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225572C + ldr r1, [sp, #0x18] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _0225572C + ldr r0, [sp, #0x18] + bl sub_020787CC + orr r4, r0 +_0225572C: + ldr r0, [sp, #0x38] + add r0, #0xc0 + str r0, [sp, #0x38] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, r5 + blt _022556F6 +_0225573C: + b _02255820 +_0225573E: + add r0, r4, #0 + str r0, [sp, #0x1c] + cmp r5, #0 + ble _02255820 +_02255746: + ldr r1, [sp, #0x1c] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _02255754 + add r4, r4, #1 +_02255754: + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, r5 + blt _02255746 + b _02255820 +_02255760: + add r0, r4, #0 + str r0, [sp, #0x20] + cmp r5, #0 + ble _02255820 +_02255768: + ldr r1, [sp, #0x20] + ldr r0, [sp, #8] + cmp r1, r0 + beq _0225577C + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _0225577C + add r4, r4, #1 +_0225577C: + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, r5 + blt _02255768 + b _02255820 +_02255788: + add r0, r4, #0 + str r0, [sp, #0x24] + cmp r5, #0 + ble _02255820 +_02255790: + ldr r1, [sp, #0x24] + ldr r0, [sp, #8] + cmp r1, r0 + beq _022557A8 + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _022557A8 + ldr r0, [sp, #0x24] + add r4, r0, #1 + b _02255820 +_022557A8: + ldr r0, [sp, #0x24] + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, r5 + blt _02255790 + b _02255820 +_022557B4: + add r0, r4, #0 + str r0, [sp, #0x28] + cmp r5, #0 + ble _02255820 + str r7, [sp, #0x3c] +_022557BE: + ldr r1, [sp, #0x28] + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _022557D6 + ldr r1, [sp, #0x3c] + ldr r0, _02255828 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _022557D6 + add r4, r4, #1 +_022557D6: + ldr r0, [sp, #0x3c] + add r0, #0xc0 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x28] + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, r5 + blt _022557BE + b _02255820 +_022557E8: + add r0, r4, #0 + str r0, [sp, #0x2c] + cmp r5, #0 + ble _02255820 + str r7, [sp, #0x40] +_022557F2: + ldr r1, [sp, #0x2c] + ldr r0, [sp, #8] + cmp r1, r0 + beq _02255810 + add r0, r7, #0 + bl ov16_02255A4C + cmp r6, r0 + bne _02255810 + ldr r1, [sp, #0x40] + ldr r0, _02255828 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02255810 + add r4, r4, #1 +_02255810: + ldr r0, [sp, #0x40] + add r0, #0xc0 + str r0, [sp, #0x40] + ldr r0, [sp, #0x2c] + add r0, r0, #1 + str r0, [sp, #0x2c] + cmp r0, r5 + blt _022557F2 +_02255820: + add r0, r4, #0 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_02255828: .word 0x00002D8C + thumb_func_end ov16_022555A4 + + thumb_func_start ov16_0225582C +ov16_0225582C: ; 0x0225582C + lsl r1, r1, #4 + add r1, r0, r1 + ldr r0, _02255888 ; =0x000003DE + ldrh r2, [r1, r0] + cmp r2, #0x9b + bgt _0225585E + cmp r2, #0x97 + blt _02255844 + beq _0225587E + cmp r2, #0x9b + beq _0225587E + b _02255882 +_02255844: + cmp r2, #0x27 + bgt _02255850 + bge _0225587E + cmp r2, #0x1a + beq _0225587E + b _02255882 +_02255850: + cmp r2, #0x4b + bgt _02255858 + beq _0225587E + b _02255882 +_02255858: + cmp r2, #0x91 + beq _0225587E + b _02255882 +_0225585E: + mov r1, #1 + lsl r1, r1, #8 + cmp r2, r1 + bgt _0225586E + bge _0225587E + cmp r2, #0xff + beq _0225587E + b _02255882 +_0225586E: + add r0, r1, #7 + cmp r2, r0 + bgt _02255878 + beq _0225587E + b _02255882 +_02255878: + add r1, #0x10 + cmp r2, r1 + bne _02255882 +_0225587E: + mov r0, #1 + bx lr +_02255882: + mov r0, #0 + bx lr + nop +_02255888: .word 0x000003DE + thumb_func_end ov16_0225582C + + thumb_func_start ov16_0225588C +ov16_0225588C: ; 0x0225588C + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + mov r2, #1 + cmp r1, #0x70 + blo _022558A4 + bl ov16_0223F4BC + mov r1, #0x70 + bl sub_020E2178 + mov r2, #0 +_022558A4: + lsl r0, r1, #1 + add r0, r1, r0 + ldr r1, _022558C0 ; =0x0226ECD4 + ldrb r1, [r1, r0] + strb r1, [r5] + ldr r1, _022558C4 ; =0x0226ECD5 + ldrb r1, [r1, r0] + strb r1, [r4] + ldr r1, _022558C8 ; =0x0226ECD6 + ldrb r1, [r1, r0] + ldr r0, [sp, #0x10] + strb r1, [r0] + add r0, r2, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022558C0: .word 0x0226ECD4 +_022558C4: .word 0x0226ECD5 +_022558C8: .word 0x0226ECD6 + thumb_func_end ov16_0225588C + + thumb_func_start ov16_022558CC +ov16_022558CC: ; 0x022558CC + push {r3, r4, r5, r6, r7, lr} + ldr r4, _02255914 ; =0x0226ECD4 + add r5, r1, #0 + str r0, [sp] + add r6, r2, #0 + mov r1, #0x28 +_022558D8: + ldrb r2, [r4] + ldr r0, [sp] + cmp r0, r2 + bne _02255906 + ldrb r7, [r4, #1] + cmp r5, r7 + bne _022558F2 + ldrb r0, [r4, #2] + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + add r1, r0, #0 +_022558F2: + cmp r6, r7 + bne _02255906 + cmp r5, r6 + beq _02255906 + ldrb r0, [r4, #2] + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + add r1, r0, #0 +_02255906: + add r4, r4, #3 + ldrb r0, [r4] + cmp r0, #0xff + bne _022558D8 + add r0, r1, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02255914: .word 0x0226ECD4 + thumb_func_end ov16_022558CC + + thumb_func_start ov16_02255918 +ov16_02255918: ; 0x02255918 + cmp r0, #0 + beq _02255940 + cmp r0, #0xd6 + beq _02255940 + ldr r2, _02255948 ; =0x0000017F + cmp r0, r2 + beq _02255940 + add r1, r2, #0 + sub r1, #0x6d + cmp r0, r1 + beq _02255940 + sub r1, r2, #1 + cmp r0, r1 + beq _02255940 + ldr r1, _0225594C ; =0x0000FF8A + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _02255944 +_02255940: + mov r0, #1 + bx lr +_02255944: + mov r0, #0 + bx lr + ; .align 2, 0 +_02255948: .word 0x0000017F +_0225594C: .word 0x0000FF8A + thumb_func_end ov16_02255918 + + thumb_func_start ov16_02255950 +ov16_02255950: ; 0x02255950 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #0xae + bne _0225597C + add r1, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #7 + beq _02255978 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #7 + bne _0225597C +_02255978: + mov r0, #1 + pop {r3, r4, r5, pc} +_0225597C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02255950 + + thumb_func_start ov16_02255980 +ov16_02255980: ; 0x02255980 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r2, #0 + add r5, r1, #0 + add r1, r6, #0 + mov r7, #0 + bl ov16_0223E208 + str r0, [sp] + ldr r0, _022559D4 ; =0x00002DB8 + add r4, r5, r0 + mov r0, #0xc0 + mul r0, r6 + str r0, [sp, #4] + ldrh r0, [r4, r0] + cmp r0, #0 + beq _022559CE + ldr r0, _022559D8 ; =0x0000219C + add r1, r5, r6 + ldrb r0, [r1, r0] + bl sub_020787CC + ldr r1, [sp] + lsl r1, r1, #3 + add r2, r5, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #3 + lsr r1, r1, #0x1a + tst r0, r1 + bne _022559CE + ldr r0, [sp, #4] + ldrh r0, [r4, r0] + bl sub_0207D2D0 + cmp r0, #0 + bne _022559CE + mov r7, #1 +_022559CE: + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022559D4: .word 0x00002DB8 +_022559D8: .word 0x0000219C + thumb_func_end ov16_02255980 + + thumb_func_start ov16_022559DC +ov16_022559DC: ; 0x022559DC + push {r3, lr} + mov r2, #0xc0 + mul r2, r1 + add r1, r0, r2 + ldr r0, _022559F8 ; =0x00002DB8 + ldrh r0, [r1, r0] + bl sub_0207D2D0 + cmp r0, #0 + bne _022559F4 + mov r0, #1 + pop {r3, pc} +_022559F4: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_022559F8: .word 0x00002DB8 + thumb_func_end ov16_022559DC + + thumb_func_start ov16_022559FC +ov16_022559FC: ; 0x022559FC + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r2, [r5, #0x6c] + mov r1, #0xc0 + add r4, r2, #0 + ldr r2, _02255A48 ; =0x00002D74 + mul r4, r1 + add r3, r5, r2 + ldrb r4, [r3, r4] + ldr r3, [r5, #0x64] + mov r6, #0 + mul r1, r3 + add r1, r5, r1 + ldrb r1, [r1, r2] + cmp r1, r4 + blo _02255A20 + mov r6, #1 + b _02255A44 +_02255A20: + bl ov16_0223F4BC + ldr r2, [r5, #0x64] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _02255A48 ; =0x00002D74 + lsl r0, r0, #0x18 + ldrb r1, [r2, r1] + lsr r0, r0, #0x18 + add r1, r1, r4 + mul r0, r1 + asr r0, r0, #8 + add r1, r0, #1 + lsr r0, r4, #2 + cmp r1, r0 + ble _02255A44 + mov r6, #1 +_02255A44: + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02255A48: .word 0x00002D74 + thumb_func_end ov16_022559FC + + thumb_func_start ov16_02255A4C +ov16_02255A4C: ; 0x02255A4C + push {r4, r5} + mov r2, #0xc0 + mul r2, r1 + mov r3, #0xb7 + mov r4, #2 + add r5, r0, r2 + lsl r3, r3, #6 + ldr r1, [r5, r3] + lsl r4, r4, #0x14 + tst r4, r1 + beq _02255A70 + sub r3, #0x59 + ldrb r3, [r5, r3] + cmp r3, #0x79 + beq _02255A70 + mov r0, #0 + pop {r4, r5} + bx lr +_02255A70: + mov r3, #6 + lsl r3, r3, #6 + ldr r4, [r0, r3] + mov r3, #7 + lsl r3, r3, #0xc + tst r3, r4 + beq _02255A8E + ldr r3, _02255AB0 ; =0x00002D67 + add r4, r0, r2 + ldrb r3, [r4, r3] + cmp r3, #0x1a + bne _02255A8E + mov r0, #0 + pop {r4, r5} + bx lr +_02255A8E: + mov r3, #1 + lsl r3, r3, #0xa + tst r1, r3 + beq _02255AA6 + ldr r1, _02255AB0 ; =0x00002D67 + add r3, r0, r2 + ldrb r1, [r3, r1] + cmp r1, #0x1a + bne _02255AA6 + mov r0, #0 + pop {r4, r5} + bx lr +_02255AA6: + add r1, r0, r2 + ldr r0, _02255AB0 ; =0x00002D67 + ldrb r0, [r1, r0] + pop {r4, r5} + bx lr + ; .align 2, 0 +_02255AB0: .word 0x00002D67 + thumb_func_end ov16_02255A4C + + thumb_func_start ov16_02255AB4 +ov16_02255AB4: ; 0x02255AB4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp] + add r4, r3, #0 + mov r6, #0 + bl ov16_02255A4C + cmp r0, #0x68 + beq _02255AD8 + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02255A4C + cmp r4, r0 + bne _02255B06 + mov r6, #1 + b _02255B06 +_02255AD8: + ldr r1, [sp] + add r0, r5, #0 + bl ov16_02255A4C + cmp r4, r0 + bne _02255B06 + mov r0, #0xb5 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x1c + mul r0, r7 + ldr r3, [r1, r0] + lsl r2, r3, #0x1c + lsr r2, r2, #0x1f + bne _02255B06 + mov r2, #8 + orr r3, r2 + str r3, [r1, r0] + ldr r1, _02255B0C ; =0x0000213C + lsl r0, r2, #0x14 + ldr r3, [r5, r1] + orr r0, r3 + str r0, [r5, r1] +_02255B06: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02255B0C: .word 0x0000213C + thumb_func_end ov16_02255AB4 + + thumb_func_start ov16_02255B10 +ov16_02255B10: ; 0x02255B10 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + mov r6, #0 + str r0, [sp] + str r1, [sp, #4] + add r4, r2, #0 + str r6, [sp, #0x18] + bl ov16_0223DF0C + add r5, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223DF20 + str r0, [sp, #0x14] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223DF60 + add r7, r0, #0 + mov r0, #8 + tst r0, r5 + bne _02255B52 + mov r0, #0x10 + tst r0, r5 + beq _02255B66 + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + beq _02255B66 +_02255B52: + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + mov r5, #0 + add r1, r0, r4 + ldr r0, _02255BFC ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #0xc] + str r0, [sp, #8] + b _02255BA2 +_02255B66: + mov r0, #2 + tst r0, r5 + beq _02255B90 + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + mov r5, #0 + add r1, r0, r4 + ldr r0, _02255BFC ; =0x0000219C + ldrb r0, [r1, r0] + add r1, r4, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + bl ov16_0223E258 + ldr r1, [sp, #4] + add r1, r1, r0 + ldr r0, _02255BFC ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #8] + b _02255BA2 +_02255B90: + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + mov r5, #0 + add r1, r0, r4 + ldr r0, _02255BFC ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #0xc] + str r0, [sp, #8] +_02255BA2: + cmp r5, r7 + bge _02255BEC +_02255BA6: + ldr r0, [sp, #0x14] + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02255BE6 + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _02255BE6 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02255BE6 + ldr r0, [sp, #0xc] + cmp r0, r5 + beq _02255BE6 + ldr r0, [sp, #8] + cmp r0, r5 + beq _02255BE6 + add r6, r6, #1 +_02255BE6: + add r5, r5, #1 + cmp r5, r7 + blt _02255BA6 +_02255BEC: + ldr r0, [sp, #0x10] + cmp r6, r0 + blt _02255BF6 + mov r0, #1 + str r0, [sp, #0x18] +_02255BF6: + ldr r0, [sp, #0x18] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255BFC: .word 0x0000219C + thumb_func_end ov16_02255B10 + + thumb_func_start ov16_02255C00 +ov16_02255C00: ; 0x02255C00 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r6, r2, #0 + add r7, r0, #0 + add r4, r3, #0 + bl ov16_0223DF0C + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02258AB8 + str r0, [sp, #8] + cmp r0, #0x3f + beq _02255C36 + mov r1, #0xa9 + ldr r0, [sp, #0xc] + lsl r1, r1, #2 + tst r0, r1 + bne _02255C36 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x32 + bne _02255C3C +_02255C36: + add sp, #0x14 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02255C3C: + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0223E208 + add r0, r7, #0 + bl ov16_0223DF1C + mov r0, #0x17 + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #9 + add r3, r6, #0 + bl ov16_022555A4 + str r0, [sp, #0x10] + cmp r0, #0 + beq _02255C92 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x17 + beq _02255C92 + cmp r4, #0 + bne _02255C76 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255C76: + mov r0, #0xb + strb r0, [r4, #1] + mov r0, #0x27 + strh r0, [r4, #2] + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0x17 + str r0, [r4, #8] + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255C92: + mov r0, #0x47 + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #3 + add r3, r6, #0 + bl ov16_022555A4 + str r0, [sp, #4] + cmp r0, #0 + beq _02255D44 + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r1 + bne _02255D1E + ldr r0, [sp, #8] + cmp r0, #0x6a + beq _02255D1E + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x1a + beq _02255D44 + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + ldr r0, _02255DD8 ; =0x00002DCC + ldr r0, [r1, r0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x1d + bne _02255D44 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #2 + beq _02255D44 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #2 + beq _02255D44 + cmp r4, #0 + bne _02255D02 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255D02: + mov r0, #0xb + strb r0, [r4, #1] + mov r0, #0x27 + strh r0, [r4, #2] + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0x47 + str r0, [r4, #8] + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255D1E: + cmp r4, #0 + bne _02255D28 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255D28: + mov r0, #0xb + strb r0, [r4, #1] + mov r0, #0x27 + strh r0, [r4, #2] + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0x47 + str r0, [r4, #8] + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255D44: + mov r0, #0x2a + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #3 + add r3, r6, #0 + bl ov16_022555A4 + add r7, r0, #0 + beq _02255D9E + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #8 + beq _02255D78 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #8 + bne _02255D9E +_02255D78: + cmp r4, #0 + bne _02255D82 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255D82: + mov r0, #0xb + strb r0, [r4, #1] + mov r0, #0x27 + strh r0, [r4, #2] + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255560 + str r0, [r4, #4] + mov r0, #0x2a + str r0, [r4, #8] + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255D9E: + mov r0, #0xc0 + mul r0, r6 + add r3, r5, r0 + ldr r0, _02255DDC ; =0x00002DB0 + ldr r1, _02255DE0 ; =0x0400E000 + ldr r2, [r3, r0] + tst r2, r1 + bne _02255DB8 + add r0, #0x10 + ldr r2, [r3, r0] + lsr r0, r1, #0x10 + tst r0, r2 + beq _02255DD0 +_02255DB8: + cmp r4, #0 + bne _02255DC2 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255DC2: + mov r0, #0 + strb r0, [r4, #1] + ldr r0, _02255DE4 ; =0x0000031A + add sp, #0x14 + strh r0, [r4, #2] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255DD0: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02255DD8: .word 0x00002DCC +_02255DDC: .word 0x00002DB0 +_02255DE0: .word 0x0400E000 +_02255DE4: .word 0x0000031A + thumb_func_end ov16_02255C00 + + thumb_func_start ov16_02255DE8 +ov16_02255DE8: ; 0x02255DE8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r2, #0 + str r0, [sp] + bl ov16_0223DF0C + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02258AB8 + mov r6, #0 + cmp r0, #0x3f + bne _02255E1C + mov r0, #0x75 + lsl r0, r0, #2 + add r3, r5, r0 + lsl r2, r4, #6 + ldr r1, [r3, r2] + ldr r0, _02255EB4 ; =0xFFFFFE7F + mov r6, #1 + and r1, r0 + mov r0, #0x80 + orr r0, r1 + str r0, [r3, r2] + b _02255EB0 +_02255E1C: + mov r0, #0xa9 + lsl r0, r0, #2 + tst r0, r7 + beq _02255E28 + mov r6, #1 + b _02255EB0 +_02255E28: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x32 + bne _02255E4C + mov r1, #0x75 + lsl r1, r1, #2 + add r5, r5, r1 + lsl r3, r4, #6 + ldr r2, [r5, r3] + ldr r0, _02255EB4 ; =0xFFFFFE7F + sub r1, #0xd4 + and r0, r2 + orr r0, r1 + str r0, [r5, r3] + mov r6, #1 + b _02255EB0 +_02255E4C: + mov r0, #1 + add r1, r4, #0 + eor r1, r0 + mov r2, #0xc0 + add r3, r1, #0 + mul r3, r2 + add r1, r5, r3 + ldr r3, _02255EB8 ; =0x00002D46 + mul r2, r4 + add r2, r5, r2 + ldrh r1, [r1, r3] + ldrh r2, [r2, r3] + cmp r2, r1 + bhs _02255E96 + lsl r0, r2, #7 + bl sub_020E1F6C + ldr r1, _02255EBC ; =0x0000311E + ldrb r2, [r5, r1] + mov r1, #0x1e + mul r1, r2 + add r0, r1, r0 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, [sp] + bl ov16_0223F4BC + lsr r1, r0, #0x1f + lsl r2, r0, #0x18 + sub r2, r2, r1 + mov r0, #0x18 + ror r2, r0 + add r0, r1, r2 + cmp r7, r0 + ble _02255E98 + mov r6, #1 + b _02255E98 +_02255E96: + add r6, r0, #0 +_02255E98: + cmp r6, #0 + bne _02255EA8 + ldr r0, [sp] + add r1, r4, #0 + mov r2, #0 + mov r3, #0x62 + bl ov16_022666BC +_02255EA8: + ldr r0, _02255EBC ; =0x0000311E + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] +_02255EB0: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255EB4: .word 0xFFFFFE7F +_02255EB8: .word 0x00002D46 +_02255EBC: .word 0x0000311E + thumb_func_end ov16_02255DE8 + + thumb_func_start ov16_02255EC0 +ov16_02255EC0: ; 0x02255EC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_02255A4C + cmp r0, #0x36 + bne _02255EEA + mov r2, #0xc0 + mul r2, r4 + add r3, r5, r2 + ldr r2, _02255EF0 ; =0x00002DC8 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r2, [r3, r2] + ldr r1, [r5, r0] + mov r0, #1 + lsl r2, r2, #1 + and r1, r0 + lsr r2, r2, #0x1f + cmp r1, r2 + bne _02255EEC +_02255EEA: + mov r0, #0 +_02255EEC: + pop {r3, r4, r5, pc} + nop +_02255EF0: .word 0x00002DC8 + thumb_func_end ov16_02255EC0 + + thumb_func_start ov16_02255EF4 +ov16_02255EF4: ; 0x02255EF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + mov r1, #0 + str r0, [sp] + add r4, r2, #0 + add r5, r3, #0 + str r1, [sp, #4] + bl ov16_0223DF1C + str r0, [sp, #0xc] + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223E208 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + mov r7, #0 + cmp r0, #0 + ble _02255F5E + ldr r4, _02255F64 ; =0x00002D4C +_02255F1E: + ldr r0, [sp] + add r1, r7, #0 + bl ov16_0223E208 + ldr r1, [sp, #8] + cmp r1, r0 + beq _02255F54 + mov r0, #0xb7 + lsl r0, r0, #6 + ldr r1, [r6, r0] + mov r0, #2 + lsl r0, r0, #0xc + tst r0, r1 + beq _02255F54 + mov r1, #0 + add r2, r6, #0 +_02255F3E: + ldrh r0, [r2, r4] + cmp r5, r0 + beq _02255F4C + add r1, r1, #1 + add r2, r2, #2 + cmp r1, #4 + blt _02255F3E +_02255F4C: + cmp r1, #4 + beq _02255F54 + mov r0, #1 + str r0, [sp, #4] +_02255F54: + ldr r0, [sp, #0xc] + add r7, r7, #1 + add r6, #0xc0 + cmp r7, r0 + blt _02255F1E +_02255F5E: + ldr r0, [sp, #4] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255F64: .word 0x00002D4C + thumb_func_end ov16_02255EF4 + + thumb_func_start ov16_02255F68 +ov16_02255F68: ; 0x02255F68 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + mov r6, #0 + bl ov16_0223DF1C + add r3, r6, #0 + cmp r0, #0 + ble _02255F90 + mov r1, #0xb7 + lsl r1, r1, #6 +_02255F7E: + ldr r2, [r5, r1] + tst r2, r4 + beq _02255F88 + mov r6, #1 + b _02255F90 +_02255F88: + add r3, r3, #1 + add r5, #0xc0 + cmp r3, r0 + blt _02255F7E +_02255F90: + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02255F68 + + thumb_func_start ov16_02255F94 +ov16_02255F94: ; 0x02255F94 + ldr r2, _02255FB4 ; =0x0000216C + mov r0, #0 + str r0, [r1, r2] + add r0, r2, #0 + mov r3, #1 + sub r0, #0x1c + str r3, [r1, r0] + add r0, r2, #0 + sub r0, #0x30 + ldr r3, [r1, r0] + ldr r0, _02255FB8 ; =0xFFEFFFFF + sub r2, #0x30 + and r0, r3 + str r0, [r1, r2] + bx lr + nop +_02255FB4: .word 0x0000216C +_02255FB8: .word 0xFFEFFFFF + thumb_func_end ov16_02255F94 + + thumb_func_start ov16_02255FBC +ov16_02255FBC: ; 0x02255FBC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + str r1, [sp, #8] + bl ov16_0223DF1C + mov r2, #0 + str r0, [sp, #0x14] + cmp r0, #0 + ble _02255FE0 + ldr r1, _02256040 ; =0x000021EC +_02255FD2: + ldr r0, [sp, #8] + add r0, r0, r2 + strb r2, [r0, r1] + ldr r0, [sp, #0x14] + add r2, r2, #1 + cmp r2, r0 + blt _02255FD2 +_02255FE0: + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + sub r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #0 + ble _0225603C +_02255FEE: + ldr r0, [sp, #0x10] + add r4, r0, #1 + ldr r0, [sp, #0x14] + cmp r4, r0 + bge _02256030 + ldr r1, [sp, #8] + ldr r0, [sp, #0x10] + add r6, r1, r0 +_02255FFE: + ldr r0, _02256040 ; =0x000021EC + ldr r1, [sp, #8] + ldrb r0, [r6, r0] + str r0, [sp, #0xc] + ldr r0, [sp, #8] + ldr r2, [sp, #0xc] + add r7, r0, r4 + ldr r0, _02256040 ; =0x000021EC + ldrb r5, [r7, r0] + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r5, #0 + bl ov16_02252EC8 + cmp r0, #0 + beq _02256028 + ldr r0, _02256040 ; =0x000021EC + ldr r1, [sp, #0xc] + strb r5, [r6, r0] + strb r1, [r7, r0] +_02256028: + ldr r0, [sp, #0x14] + add r4, r4, #1 + cmp r4, r0 + blt _02255FFE +_02256030: + ldr r0, [sp, #0x10] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [sp, #0x10] + cmp r1, r0 + blt _02255FEE +_0225603C: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02256040: .word 0x000021EC + thumb_func_end ov16_02255FBC + + thumb_func_start ov16_02256044 +ov16_02256044: ; 0x02256044 + push {r3, r4} + mov r2, #6 + lsl r2, r2, #6 + ldr r2, [r1, r2] + mov r1, #7 + lsl r1, r1, #0xc + mov r0, #0 + tst r1, r2 + beq _0225606E + ldr r4, _02256074 ; =0x0226EBD4 + add r2, r0, #0 +_0225605A: + ldrh r1, [r4] + cmp r3, r1 + bne _02256066 + mov r0, #1 + pop {r3, r4} + bx lr +_02256066: + add r2, r2, #1 + add r4, r4, #2 + cmp r2, #6 + blo _0225605A +_0225606E: + pop {r3, r4} + bx lr + nop +_02256074: .word 0x0226EBD4 + thumb_func_end ov16_02256044 + + thumb_func_start ov16_02256078 +ov16_02256078: ; 0x02256078 + push {r3, r4} + mov r4, #0xc0 + mul r4, r2 + add r2, r1, r4 + ldr r1, _022560A8 ; =0x00002DCC + mov r0, #0 + ldr r1, [r2, r1] + lsl r1, r1, #0xd + lsr r1, r1, #0x1d + beq _022560A4 + ldr r4, _022560AC ; =0x0226EBFA + add r2, r0, #0 +_02256090: + ldrh r1, [r4] + cmp r3, r1 + bne _0225609C + mov r0, #1 + pop {r3, r4} + bx lr +_0225609C: + add r2, r2, #1 + add r4, r4, #2 + cmp r2, #0xe + blo _02256090 +_022560A4: + pop {r3, r4} + bx lr + ; .align 2, 0 +_022560A8: .word 0x00002DCC +_022560AC: .word 0x0226EBFA + thumb_func_end ov16_02256078 + + thumb_func_start ov16_022560B0 +ov16_022560B0: ; 0x022560B0 + push {r4, r5, r6, r7} + mov r0, #0xc1 + lsl r0, r0, #6 + ldr r3, [r1, r0] + ldr r0, _02256118 ; =0x00000183 + cmp r3, r0 + beq _02256114 + ldr r4, [r1, #0x64] + mov r0, #0xc0 + add r2, r4, #0 + mul r2, r0 + ldr r4, _0225611C ; =0x00002DCC + add r0, r1, r2 + ldr r4, [r0, r4] + lsl r4, r4, #0x13 + lsr r7, r4, #0x1d + cmp r7, #4 + beq _02256114 + mov r6, #0 + cmp r7, #0 + bls _022560EA + ldr r4, _02256120 ; =0x00002DF0 +_022560DC: + ldrh r5, [r0, r4] + cmp r3, r5 + beq _02256114 + add r6, r6, #1 + add r0, r0, #2 + cmp r6, r7 + blo _022560DC +_022560EA: + add r2, r1, r2 + lsl r0, r6, #1 + add r2, r2, r0 + ldr r0, _02256120 ; =0x00002DF0 + strh r3, [r2, r0] + sub r0, #0x24 + add r2, r1, r0 + ldr r3, [r1, #0x64] + mov r0, #0xc0 + add r1, r3, #0 + mul r1, r0 + ldr r3, [r2, r1] + ldr r0, _02256124 ; =0xFFFFE3FF + and r0, r3 + lsl r3, r3, #0x13 + lsr r3, r3, #0x1d + add r3, r3, #1 + lsl r3, r3, #0x1d + lsr r3, r3, #0x13 + orr r0, r3 + str r0, [r2, r1] +_02256114: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_02256118: .word 0x00000183 +_0225611C: .word 0x00002DCC +_02256120: .word 0x00002DF0 +_02256124: .word 0xFFFFE3FF + thumb_func_end ov16_022560B0 + + thumb_func_start ov16_02256128 +ov16_02256128: ; 0x02256128 + mov r3, #0xc0 + mul r3, r2 + add r3, r1, r3 + ldr r1, _02256144 ; =0x00002D4C + mov r0, #0 +_02256132: + ldrh r2, [r3, r1] + cmp r2, #0 + beq _02256140 + add r0, r0, #1 + add r3, r3, #2 + cmp r0, #4 + blt _02256132 +_02256140: + bx lr + nop +_02256144: .word 0x00002D4C + thumb_func_end ov16_02256128 + + thumb_func_start ov16_02256148 +ov16_02256148: ; 0x02256148 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + mov r2, #0 + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp] + bl ov16_02255A4C + cmp r0, #0x60 + bne _02256160 + mov r6, #0 + b _02256174 +_02256160: + ldr r0, _022562C4 ; =0x00002160 + ldr r6, [r5, r0] + cmp r6, #0 + bne _02256174 + ldr r0, _022562C8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022562CC ; =0x000003E2 + ldrb r6, [r1, r0] +_02256174: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + mov r3, #0xa + bl ov16_02255AB4 + cmp r0, #1 + bne _022561A4 + cmp r6, #0xd + bne _022561A4 + cmp r7, r4 + beq _022561A4 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _022562D0 ; =0x00002D90 + ldr r0, [r1, r0] + mov r1, #4 + bl ov16_022563F8 + ldr r1, _022562D4 ; =0x0000215C + str r0, [r5, r1] + mov r0, #0xb2 + str r0, [sp] +_022561A4: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + mov r3, #0xb + bl ov16_02255AB4 + cmp r0, #1 + bne _022561EA + cmp r6, #0xb + bne _022561EA + ldr r0, _022562D8 ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #0x20 + tst r0, r1 + bne _022561EA + ldr r0, _022562C8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022562DC ; =0x000003E1 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _022561EA + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _022562D0 ; =0x00002D90 + ldr r0, [r1, r0] + mov r1, #4 + bl ov16_022563F8 + ldr r1, _022562D4 ; =0x0000215C + str r0, [r5, r1] + mov r0, #0xb2 + str r0, [sp] +_022561EA: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + mov r3, #0x12 + bl ov16_02255AB4 + cmp r0, #1 + bne _02256230 + cmp r6, #0xa + bne _02256230 + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _022562E0 ; =0x00002DAC + ldr r0, [r1, r0] + mov r1, #0x20 + tst r0, r1 + bne _02256230 + ldr r0, _022562D8 ; =0x0000213C + ldr r0, [r5, r0] + tst r0, r1 + bne _02256230 + ldr r0, _022562C8 ; =0x00003044 + ldr r3, [r5, r0] + lsl r0, r3, #4 + add r2, r5, r0 + ldr r0, _022562DC ; =0x000003E1 + ldrb r0, [r2, r0] + cmp r0, #0 + bne _0225622C + add r1, #0xe5 + cmp r3, r1 + bne _02256230 +_0225622C: + mov r0, #0xb3 + str r0, [sp] +_02256230: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + mov r3, #0x2b + bl ov16_02255AB4 + cmp r0, #1 + bne _0225625C + ldr r0, _022562C8 ; =0x00003044 + ldr r2, _022562E4 ; =0x02270B8C + ldr r3, [r5, r0] + mov r1, #0 +_02256248: + ldrh r0, [r2] + cmp r3, r0 + bne _02256254 + mov r0, #0xb5 + str r0, [sp] + b _0225625C +_02256254: + add r1, r1, #1 + add r2, r2, #2 + cmp r1, #0xc + blo _02256248 +_0225625C: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + mov r3, #0x4e + bl ov16_02255AB4 + cmp r0, #1 + bne _02256278 + cmp r6, #0xd + bne _02256278 + cmp r7, r4 + beq _02256278 + mov r0, #0xb6 + str r0, [sp] +_02256278: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + mov r3, #0x57 + bl ov16_02255AB4 + cmp r0, #1 + bne _022562BE + cmp r6, #0xb + bne _022562BE + ldr r0, _022562D8 ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #0x20 + tst r0, r1 + bne _022562BE + ldr r0, _022562C8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022562DC ; =0x000003E1 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _022562BE + mov r0, #0xc0 + mul r0, r4 + add r1, r5, r0 + ldr r0, _022562D0 ; =0x00002D90 + ldr r0, [r1, r0] + mov r1, #4 + bl ov16_022563F8 + ldr r1, _022562D4 ; =0x0000215C + str r0, [r5, r1] + mov r0, #0xb2 + str r0, [sp] +_022562BE: + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + nop +_022562C4: .word 0x00002160 +_022562C8: .word 0x00003044 +_022562CC: .word 0x000003E2 +_022562D0: .word 0x00002D90 +_022562D4: .word 0x0000215C +_022562D8: .word 0x0000213C +_022562DC: .word 0x000003E1 +_022562E0: .word 0x00002DAC +_022562E4: .word 0x02270B8C + thumb_func_end ov16_02256148 + + thumb_func_start ov16_022562E8 +ov16_022562E8: ; 0x022562E8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r4, r2, #0 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r6, #0 + bl ov16_02255A4C + cmp r0, #3 + beq _02256306 + cmp r0, #0x3d + beq _0225634C + b _022563CE +_02256306: + mov r2, #0xc0 + add r0, r4, #0 + mul r0, r2 + ldr r3, _022563EC ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r3] + cmp r1, #0 + beq _022563CE + add r1, r3, #0 + sub r1, #0x31 + ldrsb r1, [r0, r1] + cmp r1, #0xc + bge _022563CE + add r2, #0x90 + ldr r1, [r5, r2] + add r3, #0x48 + ldr r0, [r0, r3] + add r1, r1, #1 + cmp r1, r0 + beq _022563CE + add r0, r5, #0 + mov r1, #0x11 + add r0, #0x8c + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x94 + str r4, [r0, #0] + mov r0, #0xc + str r0, [sp, #4] + mov r6, #1 + b _022563CE +_0225634C: + ldr r1, _022563F0 ; =0x00002DAC + mov r0, #0xc0 + add r7, r4, #0 + mul r7, r0 + add r0, r5, r1 + str r0, [sp, #8] + ldr r0, [r0, r7] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + beq _022563CE + add r0, r5, r7 + sub r1, #0x20 + ldr r0, [r0, r1] + cmp r0, #0 + beq _022563CE + ldr r0, [sp] + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #3 + bge _022563CE + ldr r0, [sp, #8] + mov r1, #7 + ldr r0, [r0, r7] + tst r1, r0 + beq _0225638E + mov r0, #0x13 + add r1, r6, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + b _022563C2 +_0225638E: + ldr r1, _022563F4 ; =0x00000F88 + tst r1, r0 + beq _0225639E + mov r0, #0x13 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r5, r0] + b _022563C2 +_0225639E: + mov r1, #0x10 + tst r1, r0 + beq _022563AE + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r5, r0] + b _022563C2 +_022563AE: + mov r1, #0x40 + tst r0, r1 + beq _022563BC + mov r0, #3 + add r1, #0xf0 + str r0, [r5, r1] + b _022563C2 +_022563BC: + mov r0, #4 + add r1, #0xf0 + str r0, [r5, r1] +_022563C2: + mov r0, #0x46 + lsl r0, r0, #2 + str r4, [r5, r0] + mov r0, #0xbe + str r0, [sp, #4] + mov r6, #1 +_022563CE: + cmp r6, #1 + bne _022563E4 + ldr r2, [sp, #4] + add r0, r5, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r5, #8] + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] +_022563E4: + add r0, r6, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022563EC: .word 0x00002D8C +_022563F0: .word 0x00002DAC +_022563F4: .word 0x00000F88 + thumb_func_end ov16_022562E8 + + thumb_func_start ov16_022563F8 +ov16_022563F8: ; 0x022563F8 + push {r4, lr} + cmp r0, #0 + beq _02256412 + bge _02256406 + mov r4, #0 + mvn r4, r4 + b _02256408 +_02256406: + mov r4, #1 +_02256408: + bl sub_020E1F6C + cmp r0, #0 + bne _02256412 + add r0, r4, #0 +_02256412: + pop {r4, pc} + thumb_func_end ov16_022563F8 + + thumb_func_start ov16_02256414 +ov16_02256414: ; 0x02256414 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xd0 + add r6, r0, #0 + add r5, r1, #0 + bl ov16_0223DF1C + str r0, [sp, #0x80] + mov r0, #0 + str r0, [sp, #0x84] + str r0, [sp, #0xcc] + thumb_func_end ov16_02256414 + + thumb_func_start ov34_02256428 +ov34_02256428: ; 0x02256428 + ldr r0, [r5, #0x58] + cmp r0, #0xf + bls _02256432 + bl _02257008 +_02256432: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225643E: ; jump table + .short _0225645E - _0225643E - 2 ; case 0 + .short _022564FE - _0225643E - 2 ; case 1 + .short _022565C2 - _0225643E - 2 ; case 2 + .short _022566D2 - _0225643E - 2 ; case 3 + .short _02256778 - _0225643E - 2 ; case 4 + .short _022568AA - _0225643E - 2 ; case 5 + .short _022569EA - _0225643E - 2 ; case 6 + .short _02256BFC - _0225643E - 2 ; case 7 + .short _02256D54 - _0225643E - 2 ; case 8 + .short _02256E2C - _0225643E - 2 ; case 9 + .short _02256EA0 - _0225643E - 2 ; case 10 + .short _02256F2E - _0225643E - 2 ; case 11 + .short _02256F4A - _0225643E - 2 ; case 12 + .short _02256F84 - _0225643E - 2 ; case 13 + .short _02256FC0 - _0225643E - 2 ; case 14 + .short _02257000 - _0225643E - 2 ; case 15 +_0225645E: + ldr r0, _02256748 ; =0x00003121 + ldrb r0, [r5, r0] + cmp r0, #0 + bne _022564F4 + add r0, r6, #0 + bl ov16_0223F21C + ldr r1, _0225674C ; =0x000003E9 + cmp r0, r1 + bgt _022564A4 + bge _022564D6 + cmp r0, #0xf + bhi _022564E8 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02256484: ; jump table + .short _022564E8 - _02256484 - 2 ; case 0 + .short _022564E8 - _02256484 - 2 ; case 1 + .short _022564AC - _02256484 - 2 ; case 2 + .short _022564AC - _02256484 - 2 ; case 3 + .short _022564AC - _02256484 - 2 ; case 4 + .short _022564B6 - _02256484 - 2 ; case 5 + .short _022564B6 - _02256484 - 2 ; case 6 + .short _022564B6 - _02256484 - 2 ; case 7 + .short _022564E8 - _02256484 - 2 ; case 8 + .short _022564E8 - _02256484 - 2 ; case 9 + .short _022564C2 - _02256484 - 2 ; case 10 + .short _022564E8 - _02256484 - 2 ; case 11 + .short _022564E8 - _02256484 - 2 ; case 12 + .short _022564E8 - _02256484 - 2 ; case 13 + .short _022564CC - _02256484 - 2 ; case 14 + .short _022564CC - _02256484 - 2 ; case 15 +_022564A4: + ldr r1, _02256750 ; =0x000003EA + cmp r0, r1 + beq _022564E0 + b _022564E8 +_022564AC: + ldr r0, _02256754 ; =0x0000010F + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022564E8 +_022564B6: + mov r0, #0x11 + lsl r0, r0, #4 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022564E8 +_022564C2: + ldr r0, _02256758 ; =0x00000111 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022564E8 +_022564CC: + ldr r0, _0225675C ; =0x00000112 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022564E8 +_022564D6: + ldr r0, _02256760 ; =0x00000126 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022564E8 +_022564E0: + ldr r0, _02256764 ; =0x00000127 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] +_022564E8: + ldr r0, [sp, #0x84] + cmp r0, #1 + bne _022564F4 + ldr r0, _02256748 ; =0x00003121 + mov r1, #1 + strb r1, [r5, r0] +_022564F4: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + bl _02257008 +_022564FE: + ldr r0, [sp, #0x80] + mov r7, #0 + cmp r0, #0 + ble _022565AE + ldr r0, _02256768 ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0x90] +_0225650C: + ldr r0, _0225676C ; =0x000021EC + add r1, r5, r7 + ldrb r4, [r1, r0] + add r0, r6, #0 + mov r2, #0 + add r1, r4, #0 + bl ov16_0223E2A4 + str r0, [sp, #0x88] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #2 + bl ov16_0223E2A4 + add r3, r0, #0 + ldr r2, [sp, #0x88] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_0225B840 + mov r1, #0x12 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #0xc0 + mul r0, r4 + ldr r1, [sp, #0x90] + str r0, [sp, #0x8c] + ldr r0, [r1, r0] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + bne _022565A6 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r5, r0] + cmp r1, #0xff + beq _022565A6 + ldr r0, [sp, #0x8c] + ldr r2, _02256770 ; =0x00002D8C + add r0, r5, r0 + ldr r2, [r0, r2] + cmp r2, #0 + beq _022565A6 + ldr r2, _02256774 ; =0x00002DB8 + ldrh r0, [r0, r2] + cmp r0, #0x70 + beq _022565A6 + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + add r0, r2, #0 + sub r0, #0x2c + ldr r0, [r1, r0] + cmp r0, #0 + beq _022565A6 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x24 + bne _022565A6 + ldr r1, [sp, #0x90] + ldr r0, [sp, #0x8c] + ldr r1, [r1, r0] + mov r0, #4 + add r2, r1, #0 + orr r2, r0 + ldr r1, [sp, #0x90] + ldr r0, [sp, #0x8c] + str r2, [r1, r0] + mov r0, #0x46 + lsl r0, r0, #2 + str r4, [r5, r0] + mov r0, #0xbb + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022565AE +_022565A6: + ldr r0, [sp, #0x80] + add r7, r7, #1 + cmp r7, r0 + blt _0225650C +_022565AE: + ldr r0, [sp, #0x80] + cmp r7, r0 + beq _022565B8 + bl _02257008 +_022565B8: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + bl _02257008 +_022565C2: + mov r0, #0 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x80] + cmp r0, #0 + ble _022566C0 + ldr r0, _02256768 ; =0x00002D68 + add r7, r5, r0 + mov r0, #1 + str r0, [sp, #0xbc] + str r0, [sp, #0xb8] + str r0, [sp, #0xb4] + str r0, [sp, #0xb0] +_022565DA: + ldr r0, [sp, #0x2c] + add r1, r5, r0 + ldr r0, _0225676C ; =0x000021EC + ldrb r1, [r1, r0] + mov r0, #0xc0 + add r4, r1, #0 + mul r4, r0 + ldr r0, [r7, r4] + str r1, [sp, #0x10] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _022566A4 + ldr r0, _02256770 ; =0x00002D8C + add r1, r5, r4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022566A4 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x2d + bgt _02256610 + bge _02256640 + cmp r0, #2 + beq _0225661E + b _022566A4 +_02256610: + cmp r0, #0x46 + bgt _02256618 + beq _02256662 + b _022566A4 +_02256618: + cmp r0, #0x75 + beq _02256684 + b _022566A4 +_0225661E: + ldr r0, [r7, r4] + ldr r1, [sp, #0xb0] + bic r0, r1 + mov r1, #1 + orr r0, r1 + str r0, [r7, r4] + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #2 + tst r0, r1 + bne _022566A4 + mov r0, #0xb7 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022566A4 +_02256640: + ldr r0, [r7, r4] + ldr r1, [sp, #0xb4] + bic r0, r1 + mov r1, #1 + orr r0, r1 + str r0, [r7, r4] + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #8 + tst r0, r1 + bne _022566A4 + mov r0, #0xb8 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022566A4 +_02256662: + ldr r0, [r7, r4] + ldr r1, [sp, #0xb8] + bic r0, r1 + mov r1, #1 + orr r0, r1 + str r0, [r7, r4] + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x20 + tst r0, r1 + bne _022566A4 + mov r0, #0xb9 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _022566A4 +_02256684: + ldr r0, [r7, r4] + ldr r1, [sp, #0xbc] + bic r0, r1 + mov r1, #1 + orr r0, r1 + str r0, [r7, r4] + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x80 + tst r0, r1 + bne _022566A4 + mov r0, #0xfc + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] +_022566A4: + ldr r0, [sp, #0x84] + cmp r0, #1 + bne _022566B4 + mov r1, #0x46 + ldr r0, [sp, #0x10] + lsl r1, r1, #2 + str r0, [r5, r1] + b _022566C0 +_022566B4: + ldr r0, [sp, #0x2c] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x2c] + cmp r1, r0 + blt _022565DA +_022566C0: + ldr r1, [sp, #0x2c] + ldr r0, [sp, #0x80] + cmp r1, r0 + bne _0225673A + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + bl _02257008 +_022566D2: + ldr r0, [sp, #0x80] + mov r4, #0 + cmp r0, #0 + ble _02256734 + ldr r0, _02256768 ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0x94] +_022566E0: + ldr r0, _0225676C ; =0x000021EC + add r1, r5, r4 + ldrb r1, [r1, r0] + mov r0, #0xc0 + add r7, r1, #0 + mul r7, r0 + ldr r0, [sp, #0x94] + str r1, [sp, #0x14] + ldr r0, [r0, r7] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + bne _0225672C + ldr r0, _02256770 ; =0x00002D8C + add r1, r5, r7 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225672C + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x16 + bne _0225672C + ldr r0, [sp, #0x94] + ldr r1, [r0, r7] + mov r0, #2 + orr r1, r0 + ldr r0, [sp, #0x94] + str r1, [r0, r7] + mov r1, #0x46 + ldr r0, [sp, #0x14] + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xba + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256734 +_0225672C: + ldr r0, [sp, #0x80] + add r4, r4, #1 + cmp r4, r0 + blt _022566E0 +_02256734: + ldr r0, [sp, #0x80] + cmp r4, r0 + beq _0225673E +_0225673A: + bl _02257008 +_0225673E: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + bl _02257008 + ; .align 2, 0 +_02256748: .word 0x00003121 +_0225674C: .word 0x000003E9 +_02256750: .word 0x000003EA +_02256754: .word 0x0000010F +_02256758: .word 0x00000111 +_0225675C: .word 0x00000112 +_02256760: .word 0x00000126 +_02256764: .word 0x00000127 +_02256768: .word 0x00002D68 +_0225676C: .word 0x000021EC +_02256770: .word 0x00002D8C +_02256774: .word 0x00002DB8 +_02256778: + mov r0, #0 + str r0, [sp, #0x30] + ldr r0, [sp, #0x80] + cmp r0, #0 + bgt _02256784 + b _02256898 +_02256784: + ldr r0, _02256A8C ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0x9c] +_0225678A: + ldr r0, [sp, #0x30] + add r1, r5, r0 + ldr r0, _02256A90 ; =0x000021EC + ldrb r1, [r1, r0] + mov r0, #0xc0 + mul r0, r1 + str r1, [sp, #0x18] + ldr r1, [sp, #0x9c] + str r0, [sp, #0x98] + ldr r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + bne _0225688A + ldr r0, [sp, #0x98] + add r1, r5, r0 + ldr r0, _02256A94 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225688A + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x58 + bne _0225688A + mov r0, #0 + str r0, [sp, #0x78] + str r0, [sp, #0x74] + str r0, [sp, #0x7c] + ldr r0, [sp, #0x80] + cmp r0, #0 + ble _02256844 + add r4, r5, #0 +_022567CC: + ldr r1, [sp, #0x18] + add r0, r6, #0 + bl ov16_0223E208 + add r7, r0, #0 + ldr r1, [sp, #0x7c] + add r0, r6, #0 + bl ov16_0223E208 + cmp r7, r0 + beq _02256836 + ldr r0, _02256A98 ; =0x00002DB0 + ldr r1, [r4, r0] + mov r0, #1 + lsl r0, r0, #0x18 + tst r0, r1 + bne _02256836 + ldr r0, _02256A94 ; =0x00002D8C + ldr r0, [r4, r0] + cmp r0, #0 + beq _02256836 + ldr r0, _02256A9C ; =0x00002D5A + ldrsb r0, [r4, r0] + lsl r2, r0, #1 + ldr r0, _02256AA0 ; =0x0226EBE0 + add r1, r0, r2 + ldr r0, _02256AA4 ; =0x00002D44 + ldrb r1, [r1, #1] + ldrh r3, [r4, r0] + ldr r0, _02256AA0 ; =0x0226EBE0 + ldrb r0, [r0, r2] + mul r0, r3 + bl sub_020E1F6C + ldr r1, [sp, #0x78] + add r0, r1, r0 + str r0, [sp, #0x78] + ldr r0, _02256AA8 ; =0x00002D5D + ldrsb r0, [r4, r0] + lsl r2, r0, #1 + ldr r0, _02256AA0 ; =0x0226EBE0 + add r1, r0, r2 + ldr r0, _02256AAC ; =0x00002D4A + ldrb r1, [r1, #1] + ldrh r3, [r4, r0] + ldr r0, _02256AA0 ; =0x0226EBE0 + ldrb r0, [r0, r2] + mul r0, r3 + bl sub_020E1F6C + ldr r1, [sp, #0x74] + add r0, r1, r0 + str r0, [sp, #0x74] +_02256836: + ldr r0, [sp, #0x7c] + add r4, #0xc0 + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x7c] + cmp r1, r0 + blt _022567CC +_02256844: + ldr r1, [sp, #0x9c] + ldr r0, [sp, #0x98] + ldr r1, [r1, r0] + mov r0, #8 + add r2, r1, #0 + orr r2, r0 + ldr r1, [sp, #0x9c] + ldr r0, [sp, #0x98] + str r2, [r1, r0] + ldr r1, [sp, #0x78] + ldr r0, [sp, #0x74] + add r0, r1, r0 + beq _0225688A + ldr r0, [sp, #0x74] + cmp r1, r0 + blt _02256868 + mov r1, #0x12 + b _0225686A +_02256868: + mov r1, #0xf +_0225686A: + add r0, r5, #0 + add r0, #0x8c + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r1, r5, #0 + ldr r0, [sp, #0x18] + add r1, #0x94 + str r0, [r1, #0] + mov r0, #0xc + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256898 +_0225688A: + ldr r0, [sp, #0x30] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x30] + cmp r1, r0 + bge _02256898 + b _0225678A +_02256898: + ldr r1, [sp, #0x30] + ldr r0, [sp, #0x80] + cmp r1, r0 + beq _022568A2 + b _02257008 +_022568A2: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_022568AA: + mov r0, #0 + str r0, [sp, #0x34] + ldr r0, [sp, #0x80] + cmp r0, #0 + bgt _022568B6 + b _022569D8 +_022568B6: + ldr r0, _02256A8C ; =0x00002D68 + add r7, r5, r0 +_022568BA: + ldr r0, [sp, #0x34] + add r1, r5, r0 + ldr r0, _02256A90 ; =0x000021EC + ldrb r1, [r1, r0] + mov r0, #0xc0 + add r4, r1, #0 + mul r4, r0 + ldr r0, [r7, r4] + str r1, [sp, #0x1c] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1f + bne _022569CA + ldr r0, _02256A94 ; =0x00002D8C + add r1, r5, r4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022569CA + ldr r1, [sp, #0x1c] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x6b + bne _022569CA + ldr r1, [r7, r4] + mov r0, #0x10 + orr r0, r1 + str r0, [r7, r4] + mov r0, #0 + str r0, [sp, #0x70] + ldr r0, [sp, #0x80] + cmp r0, #0 + ble _022569B6 + add r0, r5, r4 + str r5, [sp, #0x50] + str r0, [sp, #0x4c] +_02256900: + ldr r1, [sp, #0x1c] + add r0, r6, #0 + bl ov16_0223E208 + add r4, r0, #0 + ldr r1, [sp, #0x70] + add r0, r6, #0 + bl ov16_0223E208 + cmp r4, r0 + beq _022569A4 + ldr r1, [sp, #0x50] + ldr r0, _02256A94 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _022569A4 + mov r0, #0 + str r0, [sp, #0x6c] + add r7, r1, #0 +_02256926: + ldr r0, _02256AB0 ; =0x00002D4C + ldrh r4, [r7, r0] + cmp r4, #0 + beq _02256992 + mov r0, #0 + str r0, [sp, #0xc8] + ldr r0, [sp, #0x70] + add r1, r5, #0 + str r0, [sp] + ldr r0, [sp, #0x1c] + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, _02256AB4 ; =0x00002144 + mov r3, #0 + ldr r0, [r5, r0] + str r0, [sp, #8] + add r0, sp, #0xc8 + str r0, [sp, #0xc] + add r0, r6, #0 + bl ov16_02254FA8 + ldr r1, _02256AB4 ; =0x00002144 + str r0, [r5, r1] + ldr r1, [sp, #0xc8] + mov r0, #8 + tst r0, r1 + bne _02256992 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225B8E4 + cmp r0, #0 + bne _02256992 + ldr r1, [sp, #0xc8] + mov r0, #2 + tst r0, r1 + bne _0225698C + lsl r0, r4, #4 + add r1, r5, r0 + ldr r0, _02256AB8 ; =0x000003DE + ldrh r0, [r1, r0] + cmp r0, #0x26 + bne _02256992 + ldr r1, [sp, #0x4c] + ldr r0, _02256ABC ; =0x00002D74 + ldr r2, [sp, #0x50] + ldrb r0, [r1, r0] + ldr r1, _02256ABC ; =0x00002D74 + ldrb r1, [r2, r1] + cmp r0, r1 + bhi _02256992 +_0225698C: + mov r0, #1 + str r0, [sp, #0x84] + b _0225699E +_02256992: + ldr r0, [sp, #0x6c] + add r7, r7, #2 + add r0, r0, #1 + str r0, [sp, #0x6c] + cmp r0, #4 + blt _02256926 +_0225699E: + ldr r0, [sp, #0x84] + cmp r0, #1 + beq _022569B6 +_022569A4: + ldr r0, [sp, #0x50] + add r0, #0xc0 + str r0, [sp, #0x50] + ldr r0, [sp, #0x70] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x70] + cmp r1, r0 + blt _02256900 +_022569B6: + ldr r0, [sp, #0x84] + cmp r0, #1 + bne _022569D8 + mov r1, #0x46 + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xc2 + str r0, [sp, #0xcc] + b _022569D8 +_022569CA: + ldr r0, [sp, #0x34] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x34] + cmp r1, r0 + bge _022569D8 + b _022568BA +_022569D8: + ldr r1, [sp, #0x34] + ldr r0, [sp, #0x80] + cmp r1, r0 + beq _022569E2 + b _02257008 +_022569E2: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_022569EA: + mov r0, #0 + str r0, [sp, #0x38] + ldr r0, [sp, #0x80] + cmp r0, #0 + bgt _022569F6 + b _02256BEA +_022569F6: + ldr r0, _02256A8C ; =0x00002D68 + add r7, r5, r0 +_022569FA: + ldr r0, [sp, #0x38] + add r1, r5, r0 + ldr r0, _02256A90 ; =0x000021EC + ldrb r1, [r1, r0] + mov r0, #0xc0 + add r4, r1, #0 + mul r4, r0 + ldr r0, [r7, r4] + str r1, [sp, #0x20] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + bne _02256A28 + ldr r0, _02256A94 ; =0x00002D8C + add r1, r5, r4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02256A28 + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x6c + beq _02256A2A +_02256A28: + b _02256BDC +_02256A2A: + ldr r1, [r7, r4] + mov r0, #0x20 + orr r0, r1 + str r0, [r7, r4] + mov r4, #0 + ldr r0, [sp, #0x80] + str r4, [sp, #0x5c] + str r4, [sp, #0x68] + cmp r0, #0 + bgt _02256A40 + b _02256B76 +_02256A40: + str r5, [sp, #0x58] +_02256A42: + ldr r1, [sp, #0x20] + add r0, r6, #0 + bl ov16_0223E208 + add r7, r0, #0 + ldr r1, [sp, #0x68] + add r0, r6, #0 + bl ov16_0223E208 + cmp r7, r0 + bne _02256A5A + b _02256B62 +_02256A5A: + ldr r1, [sp, #0x58] + ldr r0, _02256A94 ; =0x00002D8C + ldr r1, [r1, r0] + cmp r1, #0 + beq _02256B62 + ldr r0, [sp, #0x5c] + add r0, r0, r1 + str r0, [sp, #0x5c] + mov r0, #0 + str r0, [sp, #0x64] + ldr r0, [sp, #0x58] + str r0, [sp, #0x54] +_02256A72: + ldr r1, [sp, #0x54] + ldr r0, _02256AB0 ; =0x00002D4C + ldrh r7, [r1, r0] + ldr r1, _02256AC0 ; =0x000003E1 + lsl r0, r7, #4 + add r0, r5, r0 + ldrb r1, [r0, r1] + str r1, [sp, #0x60] + cmp r1, #1 + bne _02256B34 + ldr r1, _02256AB8 ; =0x000003DE + b _02256AC4 + nop +_02256A8C: .word 0x00002D68 +_02256A90: .word 0x000021EC +_02256A94: .word 0x00002D8C +_02256A98: .word 0x00002DB0 +_02256A9C: .word 0x00002D5A +_02256AA0: .word 0x0226EBE0 +_02256AA4: .word 0x00002D44 +_02256AA8: .word 0x00002D5D +_02256AAC: .word 0x00002D4A +_02256AB0: .word 0x00002D4C +_02256AB4: .word 0x00002144 +_02256AB8: .word 0x000003DE +_02256ABC: .word 0x00002D74 +_02256AC0: .word 0x000003E1 +_02256AC4: + ldrh r0, [r0, r1] + cmp r0, #0x59 + bgt _02256AD2 + bge _02256AFC + cmp r0, #0x26 + beq _02256AE0 + b _02256B18 +_02256AD2: + cmp r0, #0x90 + bgt _02256ADA + beq _02256AFC + b _02256B18 +_02256ADA: + cmp r0, #0xe3 + beq _02256AFC + b _02256B18 +_02256AE0: + cmp r4, #0x96 + blo _02256AF2 + bne _02256B52 + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _02256B52 +_02256AF2: + mov r4, #0x96 + add r0, r4, #0 + add r0, #0x8e + str r7, [r5, r0] + b _02256B52 +_02256AFC: + cmp r4, #0x78 + blo _02256B0E + bne _02256B52 + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _02256B52 +_02256B0E: + mov r4, #0x78 + add r0, r4, #0 + add r0, #0xac + str r7, [r5, r0] + b _02256B52 +_02256B18: + cmp r4, #0x50 + blo _02256B2A + bne _02256B52 + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _02256B52 +_02256B2A: + mov r4, #0x50 + add r0, r4, #0 + add r0, #0xd4 + str r7, [r5, r0] + b _02256B52 +_02256B34: + add r0, r1, #0 + cmp r4, r0 + blo _02256B4A + cmp r4, r0 + bne _02256B52 + add r0, r6, #0 + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _02256B52 +_02256B4A: + mov r0, #0x49 + lsl r0, r0, #2 + ldr r4, [sp, #0x60] + str r7, [r5, r0] +_02256B52: + ldr r0, [sp, #0x54] + add r0, r0, #2 + str r0, [sp, #0x54] + ldr r0, [sp, #0x64] + add r0, r0, #1 + str r0, [sp, #0x64] + cmp r0, #4 + blt _02256A72 +_02256B62: + ldr r0, [sp, #0x58] + add r0, #0xc0 + str r0, [sp, #0x58] + ldr r0, [sp, #0x68] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x68] + cmp r1, r0 + bge _02256B76 + b _02256A42 +_02256B76: + cmp r4, #0 + beq _02256B8C + mov r1, #0x46 + ldr r0, [sp, #0x20] + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xc3 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256BEA +_02256B8C: + ldr r0, [sp, #0x5c] + cmp r0, #0 + beq _02256BEA + ldr r2, [sp, #0x20] + add r0, r6, #0 + add r1, r5, #0 + bl ov16_02257028 + add r7, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov16_02256128 + add r4, r0, #0 + add r0, r6, #0 + bl ov16_0223F4BC + add r1, r4, #0 + bl sub_020E1F6C + mov r0, #0xc0 + add r2, r7, #0 + mul r2, r0 + lsl r3, r1, #1 + add r1, r5, r2 + add r2, r3, r1 + ldr r1, _02256EB4 ; =0x00002D4C + ldrh r2, [r2, r1] + add r1, r0, #0 + add r1, #0x64 + str r2, [r5, r1] + ldr r1, [sp, #0x20] + add r0, #0x58 + str r1, [r5, r0] + mov r0, #0xc3 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256BEA +_02256BDC: + ldr r0, [sp, #0x38] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x38] + cmp r1, r0 + bge _02256BEA + b _022569FA +_02256BEA: + ldr r1, [sp, #0x38] + ldr r0, [sp, #0x80] + cmp r1, r0 + beq _02256BF4 + b _02257008 +_02256BF4: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256BFC: + mov r0, #0 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x80] + cmp r0, #0 + bgt _02256C08 + b _02256D42 +_02256C08: + ldr r0, _02256EB8 ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0xa0] +_02256C0E: + ldr r0, [sp, #0x3c] + add r1, r5, r0 + ldr r0, _02256EBC ; =0x000021EC + ldrb r4, [r1, r0] + mov r0, #0xc0 + add r7, r4, #0 + mul r7, r0 + ldr r0, [sp, #0xa0] + ldr r0, [r0, r7] + lsl r0, r0, #0x17 + lsr r0, r0, #0x1f + bne _02256D22 + ldr r0, _02256EC0 ; =0x00002D8C + add r1, r5, r7 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02256D22 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x77 + bne _02256D22 + ldr r0, [sp, #0xa0] + ldr r1, [r0, r7] + mov r0, #1 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, [sp, #0xa0] + str r1, [r0, r7] + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02256CFC + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + bl ov16_0223E2A4 + str r0, [sp, #0xc0] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #2 + bl ov16_0223E2A4 + ldr r2, [sp, #0xc0] + mov r1, #0xc0 + mul r1, r2 + ldr r2, _02256EC0 ; =0x00002D8C + add r1, r5, r1 + ldr r3, [r1, r2] + str r0, [sp, #0xc4] + cmp r3, #0 + beq _02256CC0 + add r2, #0x2c + ldrh r2, [r1, r2] + cmp r2, #0 + beq _02256CC0 + mov r2, #0xc0 + mul r2, r0 + add r0, r5, r2 + ldr r2, _02256EC0 ; =0x00002D8C + ldr r2, [r0, r2] + cmp r2, #0 + beq _02256CC0 + ldr r2, _02256EC4 ; =0x00002DB8 + ldrh r0, [r0, r2] + cmp r0, #0 + beq _02256CC0 + add r0, r6, #0 + bl ov16_0223F4BC + lsl r0, r0, #0x1f + lsr r1, r0, #0x1d + add r0, sp, #0xc0 + ldr r1, [r0, r1] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02256EC4 ; =0x00002DB8 + ldrh r1, [r1, r0] + mov r0, #0x4a + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #1 + str r0, [sp, #0x84] + b _02256D22 +_02256CC0: + cmp r3, #0 + beq _02256CD8 + ldr r0, _02256EC4 ; =0x00002DB8 + ldrh r1, [r1, r0] + cmp r1, #0 + beq _02256CD8 + mov r0, #0x4a + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #1 + str r0, [sp, #0x84] + b _02256D22 +_02256CD8: + ldr r1, [sp, #0xc4] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02256EC0 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r1] + cmp r1, #0 + beq _02256D22 + ldr r1, _02256EC4 ; =0x00002DB8 + ldrh r1, [r0, r1] + cmp r1, #0 + beq _02256D22 + mov r0, #0x4a + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #1 + str r0, [sp, #0x84] + b _02256D22 +_02256CFC: + mov r0, #1 + add r1, r4, #0 + eor r1, r0 + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02256EC0 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r1] + cmp r1, #0 + beq _02256D22 + ldr r1, _02256EC4 ; =0x00002DB8 + ldrh r1, [r0, r1] + cmp r1, #0 + beq _02256D22 + mov r0, #0x4a + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #1 + str r0, [sp, #0x84] +_02256D22: + ldr r0, [sp, #0x84] + cmp r0, #1 + bne _02256D34 + mov r0, #0x46 + lsl r0, r0, #2 + str r4, [r5, r0] + mov r0, #0xfd + str r0, [sp, #0xcc] + b _02256D42 +_02256D34: + ldr r0, [sp, #0x3c] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x3c] + cmp r1, r0 + bge _02256D42 + b _02256C0E +_02256D42: + ldr r1, [sp, #0x3c] + ldr r0, [sp, #0x80] + cmp r1, r0 + beq _02256D4C + b _02257008 +_02256D4C: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256D54: + mov r0, #0 + str r0, [sp, #0x40] + ldr r0, [sp, #0x80] + cmp r0, #0 + ble _02256E1C + ldr r0, _02256EB8 ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0xa4] +_02256D64: + ldr r0, [sp, #0x40] + add r1, r5, r0 + ldr r0, _02256EBC ; =0x000021EC + ldrb r7, [r1, r0] + mov r0, #0xc0 + add r4, r7, #0 + mul r4, r0 + ldr r0, [sp, #0xa4] + ldr r0, [r0, r4] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + bne _02256DC0 + ldr r0, _02256EC0 ; =0x00002D8C + add r1, r5, r4 + ldr r0, [r1, r0] + str r1, [sp, #0x48] + cmp r0, #0 + beq _02256DC0 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x70 + bne _02256DC0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r2, [r5, r0] + ldr r1, [sp, #0x48] + ldr r0, _02256EC8 ; =0x00002DD8 + ldr r0, [r1, r0] + cmp r2, r0 + bgt _02256DC0 + ldr r0, [sp, #0xa4] + mov r2, #0x40 + ldr r0, [r0, r4] + add r1, r0, #0 + orr r1, r2 + ldr r0, [sp, #0xa4] + add r2, #0xd8 + str r1, [r0, r4] + str r7, [r5, r2] + mov r0, #0xc4 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256E1C +_02256DC0: + ldr r0, [sp, #0xa4] + ldr r0, [r0, r4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _02256E10 + ldr r0, _02256EC0 ; =0x00002D8C + add r1, r5, r4 + ldr r0, [r1, r0] + str r1, [sp, #0x44] + cmp r0, #0 + beq _02256E10 + add r0, r5, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x70 + bne _02256E10 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r2, [r5, r0] + ldr r1, [sp, #0x44] + ldr r0, _02256EC8 ; =0x00002DD8 + ldr r0, [r1, r0] + sub r0, r2, r0 + cmp r0, #5 + bne _02256E10 + ldr r0, [sp, #0xa4] + mov r2, #0x80 + ldr r0, [r0, r4] + add r1, r0, #0 + orr r1, r2 + ldr r0, [sp, #0xa4] + add r2, #0x98 + str r1, [r0, r4] + str r7, [r5, r2] + mov r0, #0xc5 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256E1C +_02256E10: + ldr r0, [sp, #0x40] + add r1, r0, #1 + ldr r0, [sp, #0x80] + str r1, [sp, #0x40] + cmp r1, r0 + blt _02256D64 +_02256E1C: + ldr r1, [sp, #0x40] + ldr r0, [sp, #0x80] + cmp r1, r0 + bne _02256E96 + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256E2C: + ldr r0, [sp, #0x80] + mov r4, #0 + cmp r0, #0 + ble _02256E90 + ldr r0, _02256EB8 ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0xa8] +_02256E3A: + ldr r0, _02256EBC ; =0x000021EC + add r1, r5, r4 + ldrb r1, [r1, r0] + mov r0, #0xc0 + add r7, r1, #0 + mul r7, r0 + ldr r0, [sp, #0xa8] + str r1, [sp, #0x24] + ldr r0, [r0, r7] + lsl r0, r0, #0x16 + lsr r0, r0, #0x1f + bne _02256E88 + ldr r0, _02256EC0 ; =0x00002D8C + add r1, r5, r7 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02256E88 + ldr r1, [sp, #0x24] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x68 + bne _02256E88 + ldr r0, [sp, #0xa8] + mov r2, #2 + ldr r0, [r0, r7] + lsl r2, r2, #8 + add r1, r0, #0 + orr r1, r2 + ldr r0, [sp, #0xa8] + sub r2, #0xe8 + str r1, [r0, r7] + ldr r0, [sp, #0x24] + str r0, [r5, r2] + mov r0, #0xb1 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256E90 +_02256E88: + ldr r0, [sp, #0x80] + add r4, r4, #1 + cmp r4, r0 + blt _02256E3A +_02256E90: + ldr r0, [sp, #0x80] + cmp r4, r0 + beq _02256E98 +_02256E96: + b _02257008 +_02256E98: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256EA0: + ldr r0, [sp, #0x80] + mov r4, #0 + cmp r0, #0 + ble _02256F20 + ldr r0, _02256EB8 ; =0x00002D68 + add r0, r5, r0 + str r0, [sp, #0xac] +_02256EAE: + ldr r0, _02256EBC ; =0x000021EC + b _02256ECC + nop +_02256EB4: .word 0x00002D4C +_02256EB8: .word 0x00002D68 +_02256EBC: .word 0x000021EC +_02256EC0: .word 0x00002D8C +_02256EC4: .word 0x00002DB8 +_02256EC8: .word 0x00002DD8 +_02256ECC: + add r1, r5, r4 + ldrb r1, [r1, r0] + mov r0, #0xc0 + add r7, r1, #0 + mul r7, r0 + ldr r0, [sp, #0xac] + str r1, [sp, #0x28] + ldr r0, [r0, r7] + lsl r0, r0, #0x15 + lsr r0, r0, #0x1f + bne _02256F18 + ldr r0, _02257018 ; =0x00002D8C + add r1, r5, r7 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02256F18 + ldr r1, [sp, #0x28] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x2e + bne _02256F18 + ldr r0, [sp, #0xac] + ldr r1, [r0, r7] + mov r0, #1 + lsl r0, r0, #0xa + orr r1, r0 + ldr r0, [sp, #0xac] + str r1, [r0, r7] + mov r1, #0x46 + ldr r0, [sp, #0x28] + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #5 + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256F20 +_02256F18: + ldr r0, [sp, #0x80] + add r4, r4, #1 + cmp r4, r0 + blt _02256EAE +_02256F20: + ldr r0, [sp, #0x80] + cmp r4, r0 + bne _02257008 + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256F2E: + add r0, r6, #0 + add r1, r5, #0 + add r2, sp, #0xcc + bl ov16_02259B9C + cmp r0, #1 + bne _02256F42 + mov r0, #1 + str r0, [sp, #0x84] + b _02257008 +_02256F42: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256F4A: + ldr r0, [sp, #0x80] + mov r4, #0 + cmp r0, #0 + ble _02256F7C + mov r7, #2 +_02256F54: + ldr r1, _0225701C ; =0x000021EC + add r2, r5, r4 + ldrb r2, [r2, r1] + mov r1, #0xc0 + add r0, r5, #0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _02257020 ; =0x00002DB8 + ldrh r1, [r2, r1] + mov r2, #1 + bl ov16_0225B0FC + cmp r0, #0x3a + bne _02256F74 + ldr r0, _02257024 ; =0x00002168 + str r7, [r5, r0] +_02256F74: + ldr r0, [sp, #0x80] + add r4, r4, #1 + cmp r4, r0 + blt _02256F54 +_02256F7C: + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256F84: + ldr r0, [sp, #0x80] + mov r4, #0 + cmp r0, #0 + ble _02256FB2 + ldr r7, _0225701C ; =0x000021EC +_02256F8E: + add r2, r5, r4 + ldrb r2, [r2, r7] + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov16_02257628 + cmp r0, #1 + bne _02256FAA + mov r0, #0xdd + str r0, [sp, #0xcc] + mov r0, #1 + str r0, [sp, #0x84] + b _02256FB2 +_02256FAA: + ldr r0, [sp, #0x80] + add r4, r4, #1 + cmp r4, r0 + blt _02256F8E +_02256FB2: + ldr r0, [sp, #0x80] + cmp r4, r0 + bne _02257008 + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02256FC0: + ldr r0, [sp, #0x80] + mov r4, #0 + cmp r0, #0 + ble _02256FF2 +_02256FC8: + ldr r0, _0225701C ; =0x000021EC + add r1, r5, r4 + ldrb r7, [r1, r0] + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, sp, #0xcc + bl ov16_02258104 + cmp r0, #1 + bne _02256FEA + mov r0, #0x46 + lsl r0, r0, #2 + str r7, [r5, r0] + mov r0, #1 + str r0, [sp, #0x84] + b _02256FF2 +_02256FEA: + ldr r0, [sp, #0x80] + add r4, r4, #1 + cmp r4, r0 + blt _02256FC8 +_02256FF2: + ldr r0, [sp, #0x80] + cmp r4, r0 + bne _02257008 + ldr r0, [r5, #0x58] + add r0, r0, #1 + str r0, [r5, #0x58] + b _02257008 +_02257000: + mov r0, #0 + str r0, [r5, #0x58] + mov r0, #2 + str r0, [sp, #0x84] +_02257008: + ldr r0, [sp, #0x84] + cmp r0, #0 + bne _02257012 + bl ov34_02256428 +_02257012: + ldr r0, [sp, #0xcc] + add sp, #0xd0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02257018: .word 0x00002D8C +_0225701C: .word 0x000021EC +_02257020: .word 0x00002DB8 +_02257024: .word 0x00002168 + thumb_func_end ov34_02256428 + + thumb_func_start ov16_02257028 +ov16_02257028: ; 0x02257028 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02257080 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov16_0223E2A4 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov16_0223E2A4 + str r0, [sp, #4] + add r0, r5, #0 + bl ov16_0223F4BC + mov r3, #1 + add r2, r0, #0 + and r2, r3 + lsl r0, r2, #2 + add r1, sp, #0 + ldr r0, [r1, r0] + mov r4, #0xc0 + mul r4, r0 + add r5, r6, r4 + ldr r4, _02257088 ; =0x00002D8C + ldr r4, [r5, r4] + cmp r4, #0 + bne _02257084 + add r0, r2, #0 + eor r0, r3 + lsl r0, r0, #2 + add sp, #8 + ldr r0, [r1, r0] + pop {r4, r5, r6, pc} +_02257080: + mov r0, #1 + eor r0, r4 +_02257084: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02257088: .word 0x00002D8C + thumb_func_end ov16_02257028 + + thumb_func_start ov16_0225708C +ov16_0225708C: ; 0x0225708C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r1, [r5, #0x6c] + add r7, r0, #0 + add r4, r2, #0 + mov r6, #0 + cmp r1, #0xff + bne _022570A0 + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} +_022570A0: + add r0, r5, #0 + bl ov16_02259AC0 + cmp r0, #1 + bne _022570AE + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} +_022570AE: + ldr r1, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x26 + bgt _022570DE + blt _022570BE + b _02257386 +_022570BE: + cmp r0, #0x10 + bgt _022570CA + bge _0225718C + cmp r0, #9 + beq _022570F6 + b _0225760A +_022570CA: + cmp r0, #0x1b + bgt _022570DC + cmp r0, #0x18 + blt _022570DC + bne _022570D6 + b _02257236 +_022570D6: + cmp r0, #0x1b + bne _022570DC + b _022572CA +_022570DC: + b _0225760A +_022570DE: + cmp r0, #0x38 + bgt _022570EE + blt _022570E6 + b _022574E0 +_022570E6: + cmp r0, #0x31 + bne _022570EC + b _0225744A +_022570EC: + b _0225760A +_022570EE: + cmp r0, #0x6a + bne _022570F4 + b _0225758A +_022570F4: + b _0225760A +_022570F6: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r3, _022573A8 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r3] + cmp r1, #0 + beq _022571D8 + add r1, r3, #0 + add r1, #0x20 + ldr r0, [r0, r1] + cmp r0, #0 + bne _022571D8 + ldr r1, _022573AC ; =0x0000216C + ldr r0, _022573B0 ; =0x801FDA49 + ldr r2, [r5, r1] + tst r0, r2 + bne _022571D8 + add r0, r1, #0 + sub r0, #0x30 + ldr r2, [r5, r0] + mov r0, #0x20 + tst r0, r2 + bne _022571D8 + sub r1, #0x2c + ldr r1, [r5, r1] + mov r0, #0x10 + tst r0, r1 + bne _022571D8 + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r5, r0 + lsr r1, r3, #4 + ldr r1, [r0, r1] + cmp r1, #0 + bne _0225714A + mov r1, #0x2e + lsl r1, r1, #4 + ldr r0, [r0, r1] + cmp r0, #0 + beq _022571D8 +_0225714A: + ldr r0, _022573B4 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022573B8 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022571D8 + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #3 + bge _022571D8 + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r0, #0x46 + ldr r1, [r5, #0x6c] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0x1f + str r0, [r4, #0] + mov r6, #1 + b _0225760A +_0225718C: + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x60 + bne _0225719C + add r7, r6, #0 + b _022571B6 +_0225719C: + ldr r0, _022573BC ; =0x00002160 + ldr r0, [r5, r0] + cmp r0, #0 + beq _022571AA + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + b _022571B6 +_022571AA: + ldr r0, _022573B4 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022573C0 ; =0x000003E2 + ldrb r7, [r1, r0] +_022571B6: + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _022573A8 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _022571D8 + ldr r0, _022573AC ; =0x0000216C + ldr r2, [r5, r0] + ldr r0, _022573B0 ; =0x801FDA49 + tst r0, r2 + bne _022571D8 + ldr r0, _022573B4 ; =0x00003044 + ldr r3, [r5, r0] + cmp r3, #0xa5 + bne _022571DA +_022571D8: + b _0225760A +_022571DA: + mov r0, #0x1c + ldr r2, _022573A8 ; =0x00002D8C + mul r0, r1 + add r0, r5, r0 + lsr r2, r2, #4 + ldr r2, [r0, r2] + cmp r2, #0 + bne _022571F4 + mov r2, #0x2e + lsl r2, r2, #4 + ldr r0, [r0, r2] + cmp r0, #0 + beq _022572E4 +_022571F4: + mov r0, #0x85 + lsl r0, r0, #6 + ldr r2, [r5, r0] + mov r0, #0x10 + tst r0, r2 + bne _022572E4 + lsl r0, r3, #4 + add r2, r5, r0 + ldr r0, _022573C4 ; =0x000003E1 + ldrb r0, [r2, r0] + cmp r0, #0 + beq _022572E4 + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r7, r0 + beq _022572E4 + ldr r1, [r5, #0x6c] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r7, r0 + beq _022572E4 + mov r0, #0xbc + str r0, [r4, #0] + add r0, #0x74 + str r7, [r5, r0] + mov r6, #1 + b _0225760A +_02257236: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _022573A8 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _022572E4 + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _022572E4 + ldr r1, _022573AC ; =0x0000216C + ldr r0, _022573B0 ; =0x801FDA49 + ldr r2, [r5, r1] + tst r0, r2 + bne _022572E4 + add r0, r1, #0 + sub r0, #0x30 + ldr r2, [r5, r0] + mov r0, #0x20 + tst r0, r2 + bne _022572E4 + sub r1, #0x2c + ldr r1, [r5, r1] + mov r0, #0x10 + tst r0, r1 + bne _022572E4 + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r2, r5, r0 + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r1, [r2, r0] + cmp r1, #0 + bne _0225728A + add r0, #8 + ldr r0, [r2, r0] + cmp r0, #0 + beq _022572E4 +_0225728A: + ldr r0, _022573B4 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022573B8 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022572E4 + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _022573C8 ; =0x00002D90 + add r2, r5, r2 + ldr r2, [r2, r0] + sub r1, #0xc1 + add r0, r2, #0 + mul r0, r1 + mov r1, #8 + bl ov16_022563F8 + ldr r1, _022573CC ; =0x0000215C + mov r6, #1 + str r0, [r5, r1] + mov r0, #0x46 + ldr r1, [r5, #0x64] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0xbd + str r0, [r4, #0] + b _0225760A +_022572CA: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r3, _022573A8 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r3] + cmp r1, #0 + beq _022572E4 + add r1, r3, #0 + add r1, #0x20 + ldr r0, [r0, r1] + cmp r0, #0 + beq _022572E6 +_022572E4: + b _0225760A +_022572E6: + ldr r1, _022573AC ; =0x0000216C + ldr r0, _022573B0 ; =0x801FDA49 + ldr r2, [r5, r1] + tst r0, r2 + bne _022573EC + add r0, r1, #0 + sub r0, #0x30 + ldr r2, [r5, r0] + mov r0, #0x20 + tst r0, r2 + bne _022573EC + sub r1, #0x2c + ldr r1, [r5, r1] + mov r0, #0x10 + tst r0, r1 + bne _022573EC + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r5, r0 + lsr r1, r3, #4 + ldr r1, [r0, r1] + cmp r1, #0 + bne _02257320 + mov r1, #0x2e + lsl r1, r1, #4 + ldr r0, [r0, r1] + cmp r0, #0 + beq _022573EC +_02257320: + ldr r0, _022573B4 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _022573B8 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022573EC + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #3 + bge _022573EC + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #3 + bl sub_020E1F6C + cmp r1, #0 + beq _0225735A + cmp r1, #1 + beq _02257360 + cmp r1, #2 + beq _02257366 +_0225735A: + mov r0, #0x16 + str r0, [r4, #0] + b _0225736A +_02257360: + mov r0, #0x1f + str r0, [r4, #0] + b _0225736A +_02257366: + mov r0, #0x12 + str r0, [r4, #0] +_0225736A: + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r0, #0x46 + ldr r1, [r5, #0x6c] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r6, #1 + b _0225760A +_02257386: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r3, _022573A8 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r3] + cmp r1, #0 + beq _022573EC + add r1, r3, #0 + add r1, #0x20 + ldr r0, [r0, r1] + cmp r0, #0 + bne _022573EC + ldr r1, _022573AC ; =0x0000216C + ldr r0, _022573B0 ; =0x801FDA49 + b _022573D0 + nop +_022573A8: .word 0x00002D8C +_022573AC: .word 0x0000216C +_022573B0: .word 0x801FDA49 +_022573B4: .word 0x00003044 +_022573B8: .word 0x000003E9 +_022573BC: .word 0x00002160 +_022573C0: .word 0x000003E2 +_022573C4: .word 0x000003E1 +_022573C8: .word 0x00002D90 +_022573CC: .word 0x0000215C +_022573D0: + ldr r2, [r5, r1] + tst r0, r2 + bne _022573EC + add r0, r1, #0 + sub r0, #0x30 + ldr r2, [r5, r0] + mov r0, #0x20 + tst r0, r2 + bne _022573EC + sub r1, #0x2c + ldr r1, [r5, r1] + mov r0, #0x10 + tst r0, r1 + beq _022573EE +_022573EC: + b _0225760A +_022573EE: + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r5, r0 + lsr r1, r3, #4 + ldr r1, [r0, r1] + cmp r1, #0 + bne _02257408 + mov r1, #0x2e + lsl r1, r1, #4 + ldr r0, [r0, r1] + cmp r0, #0 + beq _022574FE +_02257408: + ldr r0, _02257610 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02257614 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022574FE + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #3 + bge _022574FE + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r0, #0x46 + ldr r1, [r5, #0x6c] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0x16 + str r0, [r4, #0] + mov r6, #1 + b _0225760A +_0225744A: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r3, _02257618 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r3] + cmp r1, #0 + beq _022574FE + add r1, r3, #0 + add r1, #0x20 + ldr r0, [r0, r1] + cmp r0, #0 + bne _022574FE + ldr r1, _0225761C ; =0x0000216C + ldr r0, _02257620 ; =0x801FDA49 + ldr r2, [r5, r1] + tst r0, r2 + bne _022574FE + add r0, r1, #0 + sub r0, #0x30 + ldr r2, [r5, r0] + mov r0, #0x20 + tst r0, r2 + bne _022574FE + sub r1, #0x2c + ldr r1, [r5, r1] + mov r0, #0x10 + tst r0, r1 + bne _022574FE + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r5, r0 + lsr r1, r3, #4 + ldr r1, [r0, r1] + cmp r1, #0 + bne _0225749E + mov r1, #0x2e + lsl r1, r1, #4 + ldr r0, [r0, r1] + cmp r0, #0 + beq _022574FE +_0225749E: + ldr r0, _02257610 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02257614 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _022574FE + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #3 + bge _022574FE + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r0, #0x46 + ldr r1, [r5, #0x6c] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0x19 + str r0, [r4, #0] + mov r6, #1 + b _0225760A +_022574E0: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r3, _02257618 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r3] + cmp r1, #0 + beq _022574FE + add r1, r3, #0 + add r1, #0x24 + ldr r1, [r0, r1] + mov r0, #0xf + lsl r0, r0, #0x10 + tst r0, r1 + beq _02257500 +_022574FE: + b _0225760A +_02257500: + ldr r1, _0225761C ; =0x0000216C + ldr r0, _02257620 ; =0x801FDA49 + ldr r2, [r5, r1] + tst r0, r2 + bne _0225760A + add r0, r1, #0 + sub r0, #0x30 + ldr r2, [r5, r0] + mov r0, #0x20 + tst r0, r2 + bne _0225760A + sub r1, #0x2c + ldr r1, [r5, r1] + mov r0, #0x10 + tst r0, r1 + bne _0225760A + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r0, r5, r0 + lsr r2, r3, #4 + ldr r2, [r0, r2] + cmp r2, #0 + bne _0225753A + mov r2, #0x2e + lsl r2, r2, #4 + ldr r0, [r0, r2] + cmp r0, #0 + beq _0225760A +_0225753A: + ldr r0, _02257610 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r2, r5, r0 + ldr r0, _02257614 ; =0x000003E9 + ldrb r2, [r2, r0] + mov r0, #1 + tst r0, r2 + beq _0225760A + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02257618 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225760A + add r0, r7, #0 + bl ov16_0223F4BC + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #3 + bge _0225760A + add r0, r5, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r5, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r0, #0x46 + ldr r1, [r5, #0x6c] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0x6a + str r0, [r4, #0] + mov r6, #1 + b _0225760A +_0225758A: + ldr r1, [r5, #0x6c] + ldr r0, [r5, #0x74] + cmp r1, r0 + bne _0225760A + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _0225760A + mov r0, #6 + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + add r3, r6, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225760A + mov r2, #0x85 + lsl r2, r2, #6 + ldr r1, [r5, r2] + mov r0, #0x10 + tst r0, r1 + bne _0225760A + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _02257618 ; =0x00002D8C + ldr r3, [r1, r0] + cmp r3, #0 + beq _0225760A + add r2, #0x2c + ldr r3, [r5, r2] + ldr r2, _02257620 ; =0x801FDA49 + tst r2, r3 + bne _0225760A + ldr r2, _02257610 ; =0x00003044 + ldr r2, [r5, r2] + lsl r2, r2, #4 + add r3, r5, r2 + ldr r2, _02257614 ; =0x000003E9 + ldrb r3, [r3, r2] + mov r2, #1 + tst r3, r2 + beq _0225760A + add r0, r0, #4 + ldr r1, [r1, r0] + sub r0, r2, #2 + mul r0, r1 + mov r1, #4 + bl ov16_022563F8 + ldr r1, _02257624 ; =0x0000215C + mov r6, #1 + str r0, [r5, r1] + mov r0, #0x46 + ldr r1, [r5, #0x64] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0xc1 + str r0, [r4, #0] +_0225760A: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02257610: .word 0x00003044 +_02257614: .word 0x000003E9 +_02257618: .word 0x00002D8C +_0225761C: .word 0x0000216C +_02257620: .word 0x801FDA49 +_02257624: .word 0x0000215C + thumb_func_end ov16_0225708C + + thumb_func_start ov16_02257628 +ov16_02257628: ; 0x02257628 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r2, #0 + add r0, r4, #0 + add r1, r5, #0 + add r7, r3, #0 + mov r6, #0 + bl ov16_02255A4C + cmp r0, #0x28 + bgt _0225766E + bge _02257708 + cmp r0, #7 + bgt _02257648 + beq _022576B6 + b _02257760 +_02257648: + add r1, r0, #0 + sub r1, #0xc + cmp r1, #8 + bhi _02257678 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225765C: ; jump table + .short _02257724 - _0225765C - 2 ; case 0 + .short _02257760 - _0225765C - 2 ; case 1 + .short _02257760 - _0225765C - 2 ; case 2 + .short _022576D0 - _0225765C - 2 ; case 3 + .short _02257760 - _0225765C - 2 ; case 4 + .short _02257680 - _0225765C - 2 ; case 5 + .short _02257760 - _0225765C - 2 ; case 6 + .short _02257760 - _0225765C - 2 ; case 7 + .short _0225769A - _0225765C - 2 ; case 8 +_0225766E: + cmp r0, #0x48 + bgt _0225767A + bge _022576D0 + cmp r0, #0x29 + beq _022576EC +_02257678: + b _02257760 +_0225767A: + cmp r0, #0x54 + beq _02257742 + b _02257760 +_02257680: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02257794 ; =0x00002DAC + ldr r2, [r2, r1] + ldr r1, _02257798 ; =0x00000F88 + tst r1, r2 + beq _02257760 + mov r6, #1 + add r0, #0x70 + str r6, [r4, r0] + b _02257760 +_0225769A: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _0225779C ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #7 + tst r1, r2 + beq _02257760 + mov r1, #5 + add r0, #0x70 + str r1, [r4, r0] + mov r6, #1 + b _02257760 +_022576B6: + mov r0, #0xc0 + mul r0, r5 + add r1, r4, r0 + ldr r0, _02257794 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x40 + tst r1, r0 + beq _02257760 + mov r1, #3 + add r0, #0xf0 + str r1, [r4, r0] + mov r6, #1 + b _02257760 +_022576D0: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02257794 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #7 + tst r1, r2 + beq _02257760 + mov r1, #0 + add r0, #0x70 + str r1, [r4, r0] + mov r6, #1 + b _02257760 +_022576EC: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02257794 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #0x10 + tst r1, r2 + beq _02257760 + mov r1, #2 + add r0, #0x70 + str r1, [r4, r0] + mov r6, #1 + b _02257760 +_02257708: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _02257794 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #0x20 + tst r1, r2 + beq _02257760 + mov r1, #4 + add r0, #0x70 + str r1, [r4, r0] + mov r6, #1 + b _02257760 +_02257724: + mov r0, #0xc0 + add r1, r5, #0 + mul r1, r0 + add r2, r4, r1 + ldr r1, _0225779C ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #0xf + lsl r1, r1, #0x10 + tst r1, r2 + beq _02257760 + mov r1, #6 + add r0, #0x70 + str r1, [r4, r0] + mov r6, #1 + b _02257760 +_02257742: + mov r0, #0xc0 + add r3, r5, #0 + mul r3, r0 + ldr r0, _022577A0 ; =0x00002DB8 + add r1, r4, r3 + ldrh r1, [r1, r0] + cmp r1, #0 + beq _02257760 + add r0, #0x14 + add r2, r4, r0 + mov r0, #1 + ldr r1, [r2, r3] + lsl r0, r0, #0x16 + orr r0, r1 + str r0, [r2, r3] +_02257760: + cmp r6, #1 + bne _0225778E + mov r0, #0x46 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov16_02255A4C + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r4, r1] + cmp r7, #0 + bne _0225778E + add r0, r4, #0 + mov r1, #1 + mov r2, #0xdd + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_0225778E: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02257794: .word 0x00002DAC +_02257798: .word 0x00000F88 +_0225779C: .word 0x00002DB0 +_022577A0: .word 0x00002DB8 + thumb_func_end ov16_02257628 + + thumb_func_start ov16_022577A4 +ov16_022577A4: ; 0x022577A4 + mov r0, #0 + cmp r1, #0x28 + bgt _022577C4 + bge _022577FA + cmp r1, #7 + bgt _022577B4 + beq _022577DC + bx lr +_022577B4: + cmp r1, #0x11 + bgt _02257802 + cmp r1, #0xf + blt _02257802 + beq _022577E6 + cmp r1, #0x11 + beq _022577D2 + bx lr +_022577C4: + cmp r1, #0x29 + bgt _022577CC + beq _022577F0 + bx lr +_022577CC: + cmp r1, #0x48 + beq _022577E6 + bx lr +_022577D2: + ldr r1, _02257804 ; =0x00000F88 + tst r1, r2 + beq _02257802 + mov r0, #1 + bx lr +_022577DC: + mov r1, #0x40 + tst r1, r2 + beq _02257802 + mov r0, #1 + bx lr +_022577E6: + mov r1, #7 + tst r1, r2 + beq _02257802 + mov r0, #1 + bx lr +_022577F0: + mov r1, #0x10 + tst r1, r2 + beq _02257802 + mov r0, #1 + bx lr +_022577FA: + mov r1, #0x20 + tst r1, r2 + beq _02257802 + mov r0, #1 +_02257802: + bx lr + ; .align 2, 0 +_02257804: .word 0x00000F88 + thumb_func_end ov16_022577A4 + + thumb_func_start ov16_02257808 +ov16_02257808: ; 0x02257808 + push {r3, r4, r5, r6, r7, lr} + mov r5, #0 + add r4, r1, #0 + str r5, [sp] + ldr r1, [r4, #0x6c] + add r7, r0, #0 + add r6, r2, #0 + cmp r1, #0xff + beq _0225784A + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x1c + bne _0225784A + add r1, r4, #0 + add r1, #0x94 + ldr r0, [r4, #0x6c] + ldr r1, [r1, #0] + cmp r0, r1 + bne _0225784A + ldr r1, _02257998 ; =0x0000213C + ldr r2, [r4, r1] + mov r1, #0x80 + tst r2, r1 + beq _0225784A + add r1, #0x98 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r5, #1 + b _0225787A +_0225784A: + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x1c + bne _0225787A + add r1, r4, #0 + add r1, #0x94 + ldr r0, [r4, #0x64] + ldr r1, [r1, #0] + cmp r0, r1 + bne _0225787A + ldr r1, _02257998 ; =0x0000213C + ldr r2, [r4, r1] + mov r1, #0x80 + tst r2, r1 + beq _0225787A + add r1, #0x98 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, #0x6c] + add r0, #0x94 + str r1, [r0, #0] + mov r5, #1 +_0225787A: + cmp r5, #1 + bne _022578D2 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0225799C ; =0x00002DAC + ldr r0, [r1, r0] + ldr r1, _022579A0 ; =0x00000F88 + tst r1, r0 + beq _0225789A + mov r0, #0x16 + str r0, [sp] + b _022578B0 +_0225789A: + mov r1, #0x10 + tst r1, r0 + beq _022578A6 + mov r0, #0x19 + str r0, [sp] + b _022578B0 +_022578A6: + mov r1, #0x40 + tst r0, r1 + beq _022578B0 + mov r0, #0x1f + str r0, [sp] +_022578B0: + ldr r0, [sp] + cmp r0, #0 + beq _022578D2 + add r0, r4, #0 + mov r1, #3 + add r0, #0x88 + str r1, [r0, #0] + ldr r2, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + str r6, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_022578D2: + add r0, r7, #0 + add r1, r4, #0 + add r2, sp, #0 + bl ov16_02259B9C + add r5, r0, #0 + cmp r5, #1 + bne _022578F6 + ldr r2, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + str r6, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_022578F6: + ldr r1, [r4, #0x6c] + cmp r1, #0xff + beq _02257936 + add r0, r4, #0 + bl ov16_02258AB8 + cmp r0, #0x6c + bne _02257936 + add r1, r4, #0 + add r1, #0x94 + ldr r0, [r4, #0x6c] + ldr r1, [r1, #0] + cmp r0, r1 + bne _02257936 + mov r1, #0x1c + add r2, r0, #0 + mul r2, r1 + add r3, r4, r2 + mov r2, #0xba + lsl r2, r2, #2 + ldr r3, [r3, r2] + mov r2, #4 + tst r2, r3 + beq _02257936 + add r1, #0xfc + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, #0x64] + add r0, #0x94 + str r1, [r0, #0] + mov r5, #1 + b _02257970 +_02257936: + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02258AB8 + cmp r0, #0x6c + bne _02257970 + add r1, r4, #0 + add r1, #0x94 + ldr r0, [r4, #0x64] + ldr r1, [r1, #0] + cmp r0, r1 + bne _02257970 + mov r1, #0x1c + add r2, r0, #0 + mul r2, r1 + add r3, r4, r2 + mov r2, #0xba + lsl r2, r2, #2 + ldr r3, [r3, r2] + mov r2, #4 + tst r2, r3 + beq _02257970 + add r1, #0xfc + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, #0x6c] + add r0, #0x94 + str r1, [r0, #0] + mov r5, #1 +_02257970: + cmp r5, #1 + bne _02257994 + mov r0, #0x6a + str r0, [sp] + add r0, r4, #0 + mov r1, #5 + add r0, #0x88 + str r1, [r0, #0] + ldr r2, [sp] + add r0, r4, #0 + mov r1, #1 + bl ov16_02251E1C + str r6, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_02257994: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02257998: .word 0x0000213C +_0225799C: .word 0x00002DAC +_022579A0: .word 0x00000F88 + thumb_func_end ov16_02257808 + + thumb_func_start ov16_022579A4 +ov16_022579A4: ; 0x022579A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + add r4, r1, #0 + mov r0, #0 + str r0, [sp, #0xc] + str r2, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + bl ov16_02258AB8 + str r0, [sp, #0x10] + ldr r1, [sp, #4] + add r0, r4, #0 + mov r2, #0 + bl ov16_02258ACC + add r6, r0, #0 + ldr r0, [sp, #4] + mov r3, #0xc0 + add r5, r0, #0 + ldr r0, _02257CC8 ; =0x00002D8C + mul r5, r3 + add r1, r4, r0 + ldr r2, [r1, r5] + str r1, [sp, #0x14] + cmp r2, #0 + bne _022579DE + b _02257FD4 +_022579DE: + ldr r1, [sp, #0x10] + cmp r1, #0x36 + bls _022579E6 + b _02257FA6 +_022579E6: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022579F2: ; jump table + .short _02257FA6 - _022579F2 - 2 ; case 0 + .short _02257A60 - _022579F2 - 2 ; case 1 + .short _02257FA6 - _022579F2 - 2 ; case 2 + .short _02257FA6 - _022579F2 - 2 ; case 3 + .short _02257FA6 - _022579F2 - 2 ; case 4 + .short _02257A9A - _022579F2 - 2 ; case 5 + .short _02257AAE - _022579F2 - 2 ; case 6 + .short _02257AC2 - _022579F2 - 2 ; case 7 + .short _02257AD6 - _022579F2 - 2 ; case 8 + .short _02257AEA - _022579F2 - 2 ; case 9 + .short _02257B00 - _022579F2 - 2 ; case 10 + .short _02257B62 - _022579F2 - 2 ; case 11 + .short _02257B76 - _022579F2 - 2 ; case 12 + .short _02257A78 - _022579F2 - 2 ; case 13 + .short _02257BD4 - _022579F2 - 2 ; case 14 + .short _02257C10 - _022579F2 - 2 ; case 15 + .short _02257C4E - _022579F2 - 2 ; case 16 + .short _02257C8A - _022579F2 - 2 ; case 17 + .short _02257CE4 - _022579F2 - 2 ; case 18 + .short _02257FA6 - _022579F2 - 2 ; case 19 + .short _02257FA6 - _022579F2 - 2 ; case 20 + .short _02257FA6 - _022579F2 - 2 ; case 21 + .short _02257FA6 - _022579F2 - 2 ; case 22 + .short _02257FA6 - _022579F2 - 2 ; case 23 + .short _02257FA6 - _022579F2 - 2 ; case 24 + .short _02257FA6 - _022579F2 - 2 ; case 25 + .short _02257FA6 - _022579F2 - 2 ; case 26 + .short _02257FA6 - _022579F2 - 2 ; case 27 + .short _02257FA6 - _022579F2 - 2 ; case 28 + .short _02257FA6 - _022579F2 - 2 ; case 29 + .short _02257FA6 - _022579F2 - 2 ; case 30 + .short _02257FA6 - _022579F2 - 2 ; case 31 + .short _02257FA6 - _022579F2 - 2 ; case 32 + .short _02257FA6 - _022579F2 - 2 ; case 33 + .short _02257FA6 - _022579F2 - 2 ; case 34 + .short _02257FA6 - _022579F2 - 2 ; case 35 + .short _02257D20 - _022579F2 - 2 ; case 36 + .short _02257D66 - _022579F2 - 2 ; case 37 + .short _02257DAC - _022579F2 - 2 ; case 38 + .short _02257DF2 - _022579F2 - 2 ; case 39 + .short _02257E38 - _022579F2 - 2 ; case 40 + .short _02257E80 - _022579F2 - 2 ; case 41 + .short _02257EC2 - _022579F2 - 2 ; case 42 + .short _02257FA6 - _022579F2 - 2 ; case 43 + .short _02257F74 - _022579F2 - 2 ; case 44 + .short _02257FA6 - _022579F2 - 2 ; case 45 + .short _02257FA6 - _022579F2 - 2 ; case 46 + .short _02257FA6 - _022579F2 - 2 ; case 47 + .short _02257FA6 - _022579F2 - 2 ; case 48 + .short _02257F30 - _022579F2 - 2 ; case 49 + .short _02257FA6 - _022579F2 - 2 ; case 50 + .short _02257FA6 - _022579F2 - 2 ; case 51 + .short _02257FA6 - _022579F2 - 2 ; case 52 + .short _02257FA6 - _022579F2 - 2 ; case 53 + .short _02257F58 - _022579F2 - 2 ; case 54 +_02257A60: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r0, r0, #1 + cmp r2, r0 + bhi _02257AF6 + ldr r0, _02257CCC ; =0x0000215C + mov r7, #0xc6 + str r6, [r4, r0] + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257A78: + add r1, r4, r5 + add r0, r0, #4 + ldr r1, [r1, r0] + lsr r0, r1, #1 + cmp r2, r0 + bhi _02257AF6 + add r0, r6, #0 + mul r0, r1 + mov r1, #0x64 + bl ov16_022563F8 + ldr r1, _02257CCC ; =0x0000215C + mov r7, #0xc6 + str r0, [r4, r1] + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257A9A: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #0x40 + tst r0, r1 + beq _02257AF6 + mov r0, #1 + mov r7, #0xc7 + str r0, [sp, #0xc] + b _02257FA6 +_02257AAE: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02257AF6 + mov r0, #1 + mov r7, #0xc8 + str r0, [sp, #0xc] + b _02257FA6 +_02257AC2: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + ldr r0, _02257CD0 ; =0x00000F88 + tst r0, r1 + beq _02257AF6 + mov r0, #1 + mov r7, #0xc9 + str r0, [sp, #0xc] + b _02257FA6 +_02257AD6: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #0x10 + tst r0, r1 + beq _02257AF6 + mov r0, #1 + mov r7, #0xca + str r0, [sp, #0xc] + b _02257FA6 +_02257AEA: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + bne _02257AF8 +_02257AF6: + b _02257FA6 +_02257AF8: + mov r0, #1 + mov r7, #0xcb + str r0, [sp, #0xc] + b _02257FA6 +_02257B00: + mov r0, #0 + str r0, [sp, #8] + add r0, r4, r5 + ldr r3, _02257CD4 ; =0x00002D4C + add r1, r0, #0 +_02257B0A: + ldrh r2, [r0, r3] + cmp r2, #0 + beq _02257B18 + ldr r2, _02257CD8 ; =0x00002D6C + ldrb r2, [r1, r2] + cmp r2, #0 + beq _02257B26 +_02257B18: + ldr r2, [sp, #8] + add r0, r0, #2 + add r2, r2, #1 + add r1, r1, #1 + str r2, [sp, #8] + cmp r2, #4 + blt _02257B0A +_02257B26: + ldr r0, [sp, #8] + cmp r0, #4 + beq _02257C1C + mov r0, #0xb5 + lsl r0, r0, #6 + ldr r1, [sp, #8] + add r0, r4, r0 + add r0, r0, r5 + add r1, #0x1f + add r2, r6, #0 + bl ov16_02252A2C + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r4, #0 + bl ov16_02253EC0 + ldr r0, [sp, #8] + add r1, r4, r5 + lsl r0, r0, #1 + add r1, r1, r0 + ldr r0, _02257CD4 ; =0x00002D4C + mov r7, #0xcc + ldrh r1, [r1, r0] + mov r0, #0x49 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257B62: + add r1, r4, r5 + add r0, #0x24 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02257C1C + mov r0, #1 + mov r7, #0xcd + str r0, [sp, #0xc] + b _02257FA6 +_02257B76: + add r2, r0, #0 + add r1, r4, r5 + add r2, #0x20 + ldr r2, [r1, r2] + lsl r3, r2, #0x18 + lsr r3, r3, #0x18 + bne _02257B8E + add r0, #0x24 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02257C1C +_02257B8E: + mov r0, #0x40 + tst r0, r2 + beq _02257B96 + mov r7, #0xc7 +_02257B96: + mov r0, #7 + tst r0, r2 + beq _02257B9E + mov r7, #0xc8 +_02257B9E: + ldr r0, _02257CD0 ; =0x00000F88 + tst r0, r2 + beq _02257BA6 + mov r7, #0xc9 +_02257BA6: + mov r0, #0x10 + tst r0, r2 + beq _02257BAE + mov r7, #0xca +_02257BAE: + mov r0, #0x20 + tst r0, r2 + beq _02257BB6 + mov r7, #0xcb +_02257BB6: + ldr r0, _02257CDC ; =0x00002DB0 + add r1, r4, r5 + ldr r1, [r1, r0] + mov r0, #7 + and r0, r1 + beq _02257BC4 + mov r7, #0xcd +_02257BC4: + cmp r3, #0 + beq _02257BCE + cmp r0, #0 + beq _02257BCE + mov r7, #0xce +_02257BCE: + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257BD4: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02257C1C + add r1, r6, #0 + bl ov16_022563F8 + ldr r1, _02257CCC ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02257CE0 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02257C08 + mov r7, #0xcf + b _02257C0A +_02257C08: + mov r7, #0xc6 +_02257C0A: + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257C10: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bls _02257C1E +_02257C1C: + b _02257FA6 +_02257C1E: + add r1, r6, #0 + bl ov16_022563F8 + ldr r1, _02257CCC ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02257CE0 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02257C46 + mov r7, #0xcf + b _02257C48 +_02257C46: + mov r7, #0xc6 +_02257C48: + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257C4E: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02257D56 + add r1, r6, #0 + bl ov16_022563F8 + ldr r1, _02257CCC ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02257CE0 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02257C82 + mov r7, #0xcf + b _02257C84 +_02257C82: + mov r7, #0xc6 +_02257C84: + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257C8A: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02257D56 + add r1, r6, #0 + bl ov16_022563F8 + ldr r1, _02257CCC ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02257CE0 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02257CBE + mov r7, #0xcf + b _02257CC0 +_02257CBE: + mov r7, #0xc6 +_02257CC0: + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 + nop +_02257CC8: .word 0x00002D8C +_02257CCC: .word 0x0000215C +_02257CD0: .word 0x00000F88 +_02257CD4: .word 0x00002D4C +_02257CD8: .word 0x00002D6C +_02257CDC: .word 0x00002DB0 +_02257CE0: .word 0x00002DA8 +_02257CE4: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02257D56 + add r1, r6, #0 + bl ov16_022563F8 + ldr r1, _02257FDC ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02257FE0 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02257D18 + mov r7, #0xcf + b _02257D1A +_02257D18: + mov r7, #0xc6 +_02257D1A: + mov r0, #1 + str r0, [sp, #0xc] + b _02257FA6 +_02257D20: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257D32 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257D32: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257D56 + ldr r0, _02257FE8 ; =0x00002D59 + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + blt _02257D58 +_02257D56: + b _02257FA6 +_02257D58: + mov r1, #0x13 + mov r0, #1 + lsl r1, r1, #4 + str r0, [sp, #0xc] + str r0, [r4, r1] + mov r7, #0xd0 + b _02257FA6 +_02257D66: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257D78 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257D78: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257E6E + ldr r0, _02257FEC ; =0x00002D5A + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _02257E6E + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #1 + mov r7, #0xd0 + str r0, [sp, #0xc] + b _02257FA6 +_02257DAC: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257DBE + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257DBE: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257E6E + ldr r0, _02257FF0 ; =0x00002D5B + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _02257E6E + mov r0, #0x13 + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #1 + mov r7, #0xd0 + str r0, [sp, #0xc] + b _02257FA6 +_02257DF2: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257E04 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257E04: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257E6E + ldr r0, _02257FF4 ; =0x00002D5C + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _02257E6E + mov r0, #0x13 + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #1 + mov r7, #0xd0 + str r0, [sp, #0xc] + b _02257FA6 +_02257E38: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257E4A + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257E4A: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257E6E + ldr r0, _02257FF8 ; =0x00002D5D + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + blt _02257E70 +_02257E6E: + b _02257FA6 +_02257E70: + mov r0, #0x13 + mov r1, #5 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #1 + mov r7, #0xd0 + str r0, [sp, #0xc] + b _02257FA6 +_02257E80: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257E92 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257E92: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257FA6 + ldr r0, _02257FFC ; =0x00002DB0 + add r1, r4, r5 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x14 + tst r0, r1 + bne _02257FA6 + mov r0, #1 + mov r7, #0xd1 + str r0, [sp, #0xc] + b _02257FA6 +_02257EC2: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257ED4 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257ED4: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257FA6 + ldr r0, _02257FE8 ; =0x00002D59 + mov r2, #0 + add r3, r4, r5 +_02257EF4: + ldrsb r1, [r3, r0] + cmp r1, #0xc + blt _02257F02 + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #5 + blt _02257EF4 +_02257F02: + cmp r2, #5 + beq _02257FA6 + ldr r6, _02257FE8 ; =0x00002D59 + add r5, r4, r5 + mov r7, #5 +_02257F0C: + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r7, #0 + bl sub_020E1F6C + add r0, r5, r1 + ldrsb r0, [r0, r6] + cmp r0, #0xc + beq _02257F0C + mov r0, #0x13 + add r1, r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #1 + mov r7, #0xd2 + str r0, [sp, #0xc] + b _02257FA6 +_02257F30: + ldr r6, _02258000 ; =0x00002D58 + add r1, r4, r5 + mov r0, #0 + mov r5, #6 + add r3, r6, #0 +_02257F3A: + ldrsb r2, [r1, r3] + cmp r2, #6 + bge _02257F46 + mov r2, #1 + strb r5, [r1, r6] + str r2, [sp, #0xc] +_02257F46: + add r0, r0, #1 + add r1, r1, #1 + cmp r0, #8 + blt _02257F3A + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _02257FA6 + mov r7, #0xd3 + b _02257FA6 +_02257F58: + add r1, r4, r5 + add r0, #0x24 + ldr r1, [r1, r0] + mov r0, #0xf + lsl r0, r0, #0x10 + tst r0, r1 + beq _02257FA6 + mov r0, #6 + add r3, #0x70 + str r0, [r4, r3] + mov r0, #1 + mov r7, #0xd4 + str r0, [sp, #0xc] + b _02257FA6 +_02257F74: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02257F86 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r6, r0, #1 +_02257F86: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02257FE4 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02257FA6 + mov r0, #1 + ldr r7, _02258004 ; =0x00000109 + str r0, [sp, #0xc] +_02257FA6: + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _02257FD4 + mov r1, #0x46 + ldr r0, [sp, #4] + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02258874 + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + add r2, r7, #0 + bl ov16_02251E1C + ldr r0, [r4, #8] + str r0, [r4, #0xc] + mov r0, #0x15 + str r0, [r4, #8] +_02257FD4: + ldr r0, [sp, #0xc] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02257FDC: .word 0x0000215C +_02257FE0: .word 0x00002DA8 +_02257FE4: .word 0x00002D90 +_02257FE8: .word 0x00002D59 +_02257FEC: .word 0x00002D5A +_02257FF0: .word 0x00002D5B +_02257FF4: .word 0x00002D5C +_02257FF8: .word 0x00002D5D +_02257FFC: .word 0x00002DB0 +_02258000: .word 0x00002D58 +_02258004: .word 0x00000109 + thumb_func_end ov16_022579A4 + + thumb_func_start ov16_02258008 +ov16_02258008: ; 0x02258008 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r2, #0 + mov r7, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02258AB8 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov16_02258ACC + mov r0, #0xc0 + add r4, r6, #0 + mul r4, r0 + ldr r0, _022580F8 ; =0x00002D8C + add r1, r5, r0 + str r1, [sp, #8] + ldr r1, [r1, r4] + cmp r1, #0 + beq _022580F2 + ldr r2, [sp, #4] + cmp r2, #0x45 + beq _02258046 + add r0, r2, #0 + cmp r0, #0x6d + beq _02258062 + b _022580C8 +_02258046: + add r2, r5, r4 + add r0, r0, #4 + ldr r0, [r2, r0] + cmp r1, r0 + bhs _022580C8 + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _022580FC ; =0x0000215C + mov r7, #1 + str r0, [r5, r1] + mov r0, #0xd5 + str r0, [sp] + b _022580C8 +_02258062: + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1b + add r3, r7, #0 + bl ov16_02252060 + cmp r0, #3 + beq _02258082 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + add r3, r7, #0 + bl ov16_02252060 + cmp r0, #3 + bne _022580A2 +_02258082: + ldr r0, _02258100 ; =0x00002D90 + add r1, r5, r4 + ldr r0, [r1, r0] + ldr r1, [sp, #8] + ldr r1, [r1, r4] + cmp r1, r0 + bhs _022580C8 + mov r1, #0x10 + bl ov16_022563F8 + ldr r1, _022580FC ; =0x0000215C + mov r7, #1 + str r0, [r5, r1] + mov r0, #0xd5 + str r0, [sp] + b _022580C8 +_022580A2: + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _022580C8 + ldr r0, _02258100 ; =0x00002D90 + add r1, r5, r4 + ldr r1, [r1, r0] + sub r0, r7, #1 + mul r0, r1 + mov r1, #8 + bl ov16_022563F8 + ldr r1, _022580FC ; =0x0000215C + mov r7, #1 + str r0, [r5, r1] + mov r0, #0xd7 + str r0, [sp] +_022580C8: + cmp r7, #1 + bne _022580F2 + mov r0, #0x46 + lsl r0, r0, #2 + str r6, [r5, r0] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02258874 + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r2, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r5, #8] + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] +_022580F2: + add r0, r7, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022580F8: .word 0x00002D8C +_022580FC: .word 0x0000215C +_02258100: .word 0x00002D90 + thumb_func_end ov16_02258008 + + thumb_func_start ov16_02258104 +ov16_02258104: ; 0x02258104 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + add r4, r1, #0 + mov r0, #0 + str r0, [sp, #0xc] + str r2, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + add r6, r3, #0 + bl ov16_02258AB8 + str r0, [sp, #0x10] + ldr r1, [sp, #4] + add r0, r4, #0 + mov r2, #0 + bl ov16_02258ACC + add r7, r0, #0 + ldr r0, [sp, #4] + mov r3, #0xc0 + add r5, r0, #0 + ldr r0, _02258428 ; =0x00002D8C + mul r5, r3 + add r1, r4, r0 + ldr r2, [r1, r5] + str r1, [sp, #0x14] + cmp r2, #0 + bne _02258140 + b _0225879E +_02258140: + ldr r1, [sp, #0x10] + cmp r1, #0x36 + bhi _022581CC + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02258152: ; jump table + .short _0225878A - _02258152 - 2 ; case 0 + .short _022581C0 - _02258152 - 2 ; case 1 + .short _0225878A - _02258152 - 2 ; case 2 + .short _0225878A - _02258152 - 2 ; case 3 + .short _0225878A - _02258152 - 2 ; case 4 + .short _02258200 - _02258152 - 2 ; case 5 + .short _02258216 - _02258152 - 2 ; case 6 + .short _0225822C - _02258152 - 2 ; case 7 + .short _02258242 - _02258152 - 2 ; case 8 + .short _02258258 - _02258152 - 2 ; case 9 + .short _0225826E - _02258152 - 2 ; case 10 + .short _022582D2 - _02258152 - 2 ; case 11 + .short _022582EA - _02258152 - 2 ; case 12 + .short _022581DC - _02258152 - 2 ; case 13 + .short _022583E6 - _02258152 - 2 ; case 14 + .short _02258450 - _02258152 - 2 ; case 15 + .short _0225848E - _02258152 - 2 ; case 16 + .short _022584CC - _02258152 - 2 ; case 17 + .short _0225850A - _02258152 - 2 ; case 18 + .short _0225878A - _02258152 - 2 ; case 19 + .short _0225878A - _02258152 - 2 ; case 20 + .short _0225878A - _02258152 - 2 ; case 21 + .short _0225878A - _02258152 - 2 ; case 22 + .short _0225878A - _02258152 - 2 ; case 23 + .short _0225878A - _02258152 - 2 ; case 24 + .short _0225878A - _02258152 - 2 ; case 25 + .short _0225878A - _02258152 - 2 ; case 26 + .short _0225878A - _02258152 - 2 ; case 27 + .short _0225878A - _02258152 - 2 ; case 28 + .short _0225878A - _02258152 - 2 ; case 29 + .short _0225878A - _02258152 - 2 ; case 30 + .short _0225878A - _02258152 - 2 ; case 31 + .short _0225878A - _02258152 - 2 ; case 32 + .short _0225878A - _02258152 - 2 ; case 33 + .short _0225878A - _02258152 - 2 ; case 34 + .short _0225878A - _02258152 - 2 ; case 35 + .short _0225854A - _02258152 - 2 ; case 36 + .short _02258590 - _02258152 - 2 ; case 37 + .short _022585D8 - _02258152 - 2 ; case 38 + .short _02258620 - _02258152 - 2 ; case 39 + .short _0225866A - _02258152 - 2 ; case 40 + .short _022586B2 - _02258152 - 2 ; case 41 + .short _022586F6 - _02258152 - 2 ; case 42 + .short _0225878A - _02258152 - 2 ; case 43 + .short _022583B0 - _02258152 - 2 ; case 44 + .short _0225878A - _02258152 - 2 ; case 45 + .short _0225878A - _02258152 - 2 ; case 46 + .short _0225878A - _02258152 - 2 ; case 47 + .short _0225878A - _02258152 - 2 ; case 48 + .short _02258368 - _02258152 - 2 ; case 49 + .short _0225878A - _02258152 - 2 ; case 50 + .short _0225878A - _02258152 - 2 ; case 51 + .short _0225878A - _02258152 - 2 ; case 52 + .short _0225878A - _02258152 - 2 ; case 53 + .short _02258392 - _02258152 - 2 ; case 54 +_022581C0: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r0, r0, #1 + cmp r2, r0 + bls _022581CE +_022581CC: + b _0225878A +_022581CE: + ldr r0, _0225842C ; =0x0000215C + str r7, [r4, r0] + mov r0, #0xc6 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022581DC: + add r1, r4, r5 + add r0, r0, #4 + ldr r1, [r1, r0] + lsr r0, r1, #1 + cmp r2, r0 + bhi _022582DE + add r0, r7, #0 + mul r0, r1 + mov r1, #0x64 + bl ov16_022563F8 + ldr r1, _0225842C ; =0x0000215C + str r0, [r4, r1] + mov r0, #0xc6 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_02258200: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #0x40 + tst r0, r1 + beq _022582DE + mov r0, #0xc7 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_02258216: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _022582DE + mov r0, #0xc8 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_0225822C: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + ldr r0, _02258430 ; =0x00000F88 + tst r0, r1 + beq _022582DE + mov r0, #0xc9 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_02258242: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #0x10 + tst r0, r1 + beq _022582DE + mov r0, #0xca + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_02258258: + add r1, r4, r5 + add r0, #0x20 + ldr r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + beq _022582DE + mov r0, #0xcb + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_0225826E: + mov r0, #0 + str r0, [sp, #8] + add r0, r4, r5 + ldr r3, _02258434 ; =0x00002D4C + add r1, r0, #0 +_02258278: + ldrh r2, [r0, r3] + cmp r2, #0 + beq _02258286 + ldr r2, _02258438 ; =0x00002D6C + ldrb r2, [r1, r2] + cmp r2, #0 + beq _02258294 +_02258286: + ldr r2, [sp, #8] + add r0, r0, #2 + add r2, r2, #1 + add r1, r1, #1 + str r2, [sp, #8] + cmp r2, #4 + blt _02258278 +_02258294: + ldr r0, [sp, #8] + cmp r0, #4 + beq _022582DE + mov r0, #0xb5 + lsl r0, r0, #6 + ldr r1, [sp, #8] + add r0, r4, r0 + add r0, r0, r5 + add r1, #0x1f + add r2, r7, #0 + bl ov16_02252A2C + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r4, #0 + bl ov16_02253EC0 + ldr r0, [sp, #8] + add r1, r4, r5 + lsl r0, r0, #1 + add r1, r1, r0 + ldr r0, _02258434 ; =0x00002D4C + ldrh r1, [r1, r0] + mov r0, #0x49 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #0xcc + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022582D2: + add r1, r4, r5 + add r0, #0x24 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + bne _022582E0 +_022582DE: + b _0225878A +_022582E0: + mov r0, #0xcd + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022582EA: + add r1, r0, #0 + add r1, #0x20 + add r1, r4, r1 + ldr r2, [r1, r5] + lsl r3, r2, #0x18 + lsr r3, r3, #0x18 + bne _02258304 + add r3, r4, r5 + add r0, #0x24 + ldr r3, [r3, r0] + mov r0, #7 + tst r0, r3 + beq _022583F2 +_02258304: + mov r0, #0x40 + tst r0, r2 + beq _0225830E + mov r0, #0xc7 + str r0, [r6, #0] +_0225830E: + ldr r2, [r1, r5] + mov r0, #7 + tst r0, r2 + beq _0225831A + mov r0, #0xc8 + str r0, [r6, #0] +_0225831A: + ldr r2, [r1, r5] + ldr r0, _02258430 ; =0x00000F88 + tst r0, r2 + beq _02258326 + mov r0, #0xc9 + str r0, [r6, #0] +_02258326: + ldr r2, [r1, r5] + mov r0, #0x10 + tst r0, r2 + beq _02258332 + mov r0, #0xca + str r0, [r6, #0] +_02258332: + ldr r2, [r1, r5] + mov r0, #0x20 + tst r0, r2 + beq _0225833E + mov r0, #0xcb + str r0, [r6, #0] +_0225833E: + ldr r0, _0225843C ; =0x00002DB0 + mov r2, #7 + add r0, r4, r0 + ldr r3, [r0, r5] + tst r2, r3 + beq _0225834E + mov r2, #0xcd + str r2, [r6, #0] +_0225834E: + ldr r1, [r1, r5] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + beq _02258362 + ldr r1, [r0, r5] + mov r0, #7 + tst r0, r1 + beq _02258362 + mov r0, #0xce + str r0, [r6, #0] +_02258362: + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_02258368: + ldr r7, _02258440 ; =0x00002D58 + add r1, r4, r5 + mov r0, #0 + mov r5, #6 + add r3, r7, #0 +_02258372: + ldrsb r2, [r1, r3] + cmp r2, #6 + bge _0225837E + mov r2, #1 + strb r5, [r1, r7] + str r2, [sp, #0xc] +_0225837E: + add r0, r0, #1 + add r1, r1, #1 + cmp r0, #8 + blt _02258372 + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _022583F2 + mov r0, #0xd3 + str r0, [r6, #0] + b _0225878A +_02258392: + add r1, r4, r5 + add r0, #0x24 + ldr r1, [r1, r0] + mov r0, #0xf + lsl r0, r0, #0x10 + tst r0, r1 + beq _022583F2 + mov r0, #6 + add r3, #0x70 + str r0, [r4, r3] + mov r0, #0xd4 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022583B0: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _022583C2 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_022583C2: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258444 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _022583F2 + ldr r0, _02258448 ; =0x00000109 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022583E6: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bls _022583F4 +_022583F2: + b _0225878A +_022583F4: + add r1, r7, #0 + bl ov16_022563F8 + ldr r1, _0225842C ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _0225844C ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0225841C + mov r0, #0xcf + b _0225841E +_0225841C: + mov r0, #0xc6 +_0225841E: + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A + nop +_02258428: .word 0x00002D8C +_0225842C: .word 0x0000215C +_02258430: .word 0x00000F88 +_02258434: .word 0x00002D4C +_02258438: .word 0x00002D6C +_0225843C: .word 0x00002DB0 +_02258440: .word 0x00002D58 +_02258444: .word 0x00002D90 +_02258448: .word 0x00000109 +_0225844C: .word 0x00002DA8 +_02258450: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02258516 + add r1, r7, #0 + bl ov16_022563F8 + ldr r1, _02258740 ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02258744 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02258484 + mov r0, #0xcf + b _02258486 +_02258484: + mov r0, #0xc6 +_02258486: + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_0225848E: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02258516 + add r1, r7, #0 + bl ov16_022563F8 + ldr r1, _02258740 ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02258744 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _022584C2 + mov r0, #0xcf + b _022584C4 +_022584C2: + mov r0, #0xc6 +_022584C4: + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022584CC: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bhi _02258516 + add r1, r7, #0 + bl ov16_022563F8 + ldr r1, _02258740 ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02258744 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02258500 + mov r0, #0xcf + b _02258502 +_02258500: + mov r0, #0xc6 +_02258502: + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_0225850A: + add r1, r4, r5 + add r0, r0, #4 + ldr r0, [r1, r0] + lsr r1, r0, #1 + cmp r2, r1 + bls _02258518 +_02258516: + b _0225878A +_02258518: + add r1, r7, #0 + bl ov16_022563F8 + ldr r1, _02258740 ; =0x0000215C + add r2, r4, r5 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02258744 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02258540 + mov r0, #0xcf + b _02258542 +_02258540: + mov r0, #0xc6 +_02258542: + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_0225854A: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _0225855C + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_0225855C: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02258656 + ldr r0, _0225874C ; =0x00002D59 + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _02258656 + mov r1, #0x13 + mov r0, #1 + lsl r1, r1, #4 + str r0, [sp, #0xc] + str r0, [r4, r1] + mov r0, #0xd0 + str r0, [r6, #0] + b _0225878A +_02258590: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _022585A2 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_022585A2: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02258656 + ldr r0, _02258750 ; =0x00002D5A + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _02258656 + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0xd0 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022585D8: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _022585EA + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_022585EA: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02258656 + ldr r0, _02258754 ; =0x00002D5B + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _02258656 + mov r0, #0x13 + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0xd0 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_02258620: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02258632 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_02258632: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _02258656 + ldr r0, _02258758 ; =0x00002D5C + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + blt _02258658 +_02258656: + b _0225878A +_02258658: + mov r0, #0x13 + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0xd0 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_0225866A: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _0225867C + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_0225867C: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _0225878A + ldr r0, _0225875C ; =0x00002D5D + add r1, r4, r5 + ldrsb r0, [r1, r0] + cmp r0, #0xc + bge _0225878A + mov r0, #0x13 + mov r1, #5 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0xd0 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022586B2: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _022586C4 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_022586C4: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _0225878A + ldr r0, _02258760 ; =0x00002DB0 + add r1, r4, r5 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x14 + tst r0, r1 + bne _0225878A + mov r0, #0xd1 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] + b _0225878A +_022586F6: + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x52 + bne _02258708 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r7, r0, #1 +_02258708: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02258748 ; =0x00002D90 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020E2178 + ldr r1, [sp, #0x14] + ldr r1, [r1, r5] + cmp r1, r0 + bhi _0225878A + ldr r0, _0225874C ; =0x00002D59 + mov r2, #0 + add r3, r4, r5 +_02258728: + ldrsb r1, [r3, r0] + cmp r1, #0xc + blt _02258736 + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #5 + blt _02258728 +_02258736: + cmp r2, #5 + beq _0225878A + ldr r7, _0225874C ; =0x00002D59 + b _02258764 + nop +_02258740: .word 0x0000215C +_02258744: .word 0x00002DA8 +_02258748: .word 0x00002D90 +_0225874C: .word 0x00002D59 +_02258750: .word 0x00002D5A +_02258754: .word 0x00002D5B +_02258758: .word 0x00002D5C +_0225875C: .word 0x00002D5D +_02258760: .word 0x00002DB0 +_02258764: + add r5, r4, r5 +_02258766: + ldr r0, [sp] + bl ov16_0223F4BC + mov r1, #5 + bl sub_020E1F6C + add r0, r5, r1 + ldrsb r0, [r0, r7] + cmp r0, #0xc + beq _02258766 + mov r0, #0x13 + add r1, r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0xd2 + str r0, [r6, #0] + mov r0, #1 + str r0, [sp, #0xc] +_0225878A: + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _0225879E + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02258874 + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r4, r1] +_0225879E: + ldr r0, [sp, #0xc] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02258104 + + thumb_func_start ov16_022587A4 +ov16_022587A4: ; 0x022587A4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r4, r2, #0 + mov r6, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02258AB8 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_02258ACC + str r0, [sp, #8] + mov r0, #0xc0 + mul r0, r4 + str r0, [sp] + add r1, r5, r0 + ldr r0, _02258868 ; =0x00002D8C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02258860 + cmp r7, #0x64 + beq _022587E2 + cmp r7, #0x65 + beq _022587F8 + cmp r7, #0x74 + beq _0225880E + b _02258836 +_022587E2: + add r0, r5, #0 + add r0, #0x94 + str r4, [r0, #0] + add r0, r5, #0 + mov r1, #5 + add r0, #0x88 + str r1, [r0, #0] + mov r0, #0x2f + str r0, [sp, #4] + mov r6, #1 + b _02258836 +_022587F8: + add r0, r5, #0 + add r0, #0x94 + str r4, [r0, #0] + add r0, r5, #0 + mov r1, #5 + add r0, #0x88 + str r1, [r0, #0] + mov r0, #0x19 + str r0, [sp, #4] + mov r6, #1 + b _02258836 +_0225880E: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _02258836 + ldr r0, [sp] + add r1, r5, r0 + ldr r0, _0225886C ; =0x00002D90 + ldr r1, [r1, r0] + sub r0, r6, #1 + mul r0, r1 + ldr r1, [sp, #8] + bl ov16_022563F8 + ldr r1, _02258870 ; =0x0000215C + mov r6, #1 + str r0, [r5, r1] + mov r0, #0xd7 + str r0, [sp, #4] +_02258836: + cmp r6, #1 + bne _02258860 + mov r0, #0x46 + lsl r0, r0, #2 + str r4, [r5, r0] + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02258874 + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r2, [sp, #4] + add r0, r5, #0 + mov r1, #1 + bl ov16_02251E1C + ldr r0, [r5, #8] + str r0, [r5, #0xc] + mov r0, #0x15 + str r0, [r5, #8] +_02258860: + add r0, r6, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02258868: .word 0x00002D8C +_0225886C: .word 0x00002D90 +_02258870: .word 0x0000215C + thumb_func_end ov16_022587A4 + + thumb_func_start ov16_02258874 +ov16_02258874: ; 0x02258874 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_02255A4C + cmp r0, #0x67 + bne _02258886 + mov r0, #0 + pop {r3, r4, r5, pc} +_02258886: + mov r0, #0xc0 + mul r0, r4 + add r2, r5, r0 + ldr r0, _022588A0 ; =0x00002DCC + ldr r1, [r2, r0] + lsl r1, r1, #0xa + lsr r1, r1, #0x1d + beq _0225889A + mov r0, #0 + pop {r3, r4, r5, pc} +_0225889A: + sub r0, #0x14 + ldrh r0, [r2, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022588A0: .word 0x00002DCC + thumb_func_end ov16_02258874 + + thumb_func_start ov16_022588A4 +ov16_022588A4: ; 0x022588A4 + lsl r1, r1, #4 + add r1, r0, r1 + ldr r0, _022588B8 ; =0x000021A8 + ldr r0, [r1, r0] + cmp r0, #0x27 + bne _022588B4 + mov r0, #1 + bx lr +_022588B4: + mov r0, #0 + bx lr + ; .align 2, 0 +_022588B8: .word 0x000021A8 + thumb_func_end ov16_022588A4 + + thumb_func_start ov16_022588BC +ov16_022588BC: ; 0x022588BC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [r5, #0x6c] + str r0, [sp] + add r6, r2, #0 + mov r7, #0 + cmp r1, #0xff + bne _022588D4 + add sp, #0xc + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_022588D4: + add r0, r5, #0 + bl ov16_02259AC0 + cmp r0, #1 + bne _022588E4 + add sp, #0xc + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_022588E4: + ldr r1, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02258AB8 + add r4, r0, #0 + ldr r1, [r5, #0x6c] + add r0, r5, #0 + add r2, r7, #0 + bl ov16_02258ACC + str r0, [sp, #4] + ldr r0, [sp] + ldr r1, [r5, #0x64] + bl ov16_0223E208 + str r0, [sp, #8] + cmp r4, #0x2f + bgt _0225891A + cmp r4, #0x2b + blt _02258918 + bne _02258910 + b _02258A4C +_02258910: + cmp r4, #0x2e + beq _0225899C + cmp r4, #0x2f + beq _022589FA +_02258918: + b _02258A92 +_0225891A: + cmp r4, #0x74 + bne _02258984 + ldr r0, [r5, #0x64] + mov r1, #0xc0 + mul r1, r0 + add r3, r5, r1 + ldr r1, _02258A98 ; =0x00002D8C + ldr r2, [r3, r1] + cmp r2, #0 + beq _02258984 + add r1, #0x2c + ldrh r1, [r3, r1] + cmp r1, #0 + bne _02258984 + add r1, r5, r0 + ldr r0, _02258A9C ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + ldr r1, [sp, #8] + lsl r1, r1, #3 + add r2, r5, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r2, [r2, r1] + lsl r2, r2, #3 + lsr r2, r2, #0x1a + tst r0, r2 + bne _02258984 + ldr r0, _02258AA0 ; =0x00003044 + sub r1, #0xaa + ldr r0, [r5, r0] + cmp r0, r1 + beq _02258984 + ldr r2, [r5, #0x6c] + mov r1, #0x1c + mul r1, r2 + add r3, r5, r1 + mov r1, #0xb6 + lsl r1, r1, #2 + ldr r2, [r3, r1] + cmp r2, #0 + bne _02258978 + add r1, #8 + ldr r1, [r3, r1] + cmp r1, #0 + beq _02258984 +_02258978: + mov r1, #0x85 + lsl r1, r1, #6 + ldr r2, [r5, r1] + mov r1, #0x10 + tst r1, r2 + beq _02258986 +_02258984: + b _02258A92 +_02258986: + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _02258AA4 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r1, r0 + beq _02258A92 + mov r1, #0xd8 + str r1, [r6, #0] + add r7, r0, #0 + b _02258A92 +_0225899C: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _02258A98 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _02258A92 + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _02258A92 + mov r0, #0x85 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #0x10 + tst r0, r1 + bne _02258A92 + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r1, r5, r0 + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02258A92 + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02258AA8 ; =0x00002D90 + add r2, r5, r2 + ldr r2, [r2, r0] + sub r1, #0xc1 + add r0, r2, #0 + mul r0, r1 + ldr r1, [sp, #4] + bl ov16_022563F8 + ldr r1, _02258AAC ; =0x0000215C + mov r7, #1 + str r0, [r5, r1] + lsr r0, r1, #5 + str r0, [r6, #0] + b _02258A92 +_022589FA: + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _02258A98 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _02258A92 + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _02258A92 + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r1, r5, r0 + mov r0, #0x2e + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02258A92 + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02258AA8 ; =0x00002D90 + add r2, r5, r2 + ldr r2, [r2, r0] + sub r1, #0xc1 + add r0, r2, #0 + mul r0, r1 + ldr r1, [sp, #4] + bl ov16_022563F8 + ldr r1, _02258AAC ; =0x0000215C + mov r7, #1 + str r0, [r5, r1] + lsr r0, r1, #5 + str r0, [r6, #0] + b _02258A92 +_02258A4C: + ldr r1, [r5, #0x6c] + mov r0, #0xc0 + mul r0, r1 + ldr r2, _02258A98 ; =0x00002D8C + add r0, r5, r0 + ldr r1, [r0, r2] + cmp r1, #0 + beq _02258A92 + ldr r1, _02258AB0 ; =0x0000216C + ldr r3, [r5, r1] + mov r1, #2 + tst r1, r3 + beq _02258A92 + add r1, r2, #4 + ldr r0, [r0, r1] + ldr r1, [sp, #4] + bl ov16_022563F8 + ldr r1, _02258AAC ; =0x0000215C + mov r7, #1 + str r0, [r5, r1] + mov r1, #0xc6 + str r1, [r6, #0] + ldr r0, [r5, #0x6c] + add r1, #0x52 + str r0, [r5, r1] + ldr r0, [r5, #0x6c] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02258AB4 ; =0x00002DB8 + add r2, r5, r2 + ldrh r0, [r2, r0] + add r1, #0x68 + str r0, [r5, r1] +_02258A92: + add r0, r7, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02258A98: .word 0x00002D8C +_02258A9C: .word 0x0000219C +_02258AA0: .word 0x00003044 +_02258AA4: .word 0x000003E9 +_02258AA8: .word 0x00002D90 +_02258AAC: .word 0x0000215C +_02258AB0: .word 0x0000216C +_02258AB4: .word 0x00002DB8 + thumb_func_end ov16_022588BC + + thumb_func_start ov16_02258AB8 +ov16_02258AB8: ; 0x02258AB8 + push {r4, lr} + add r4, r0, #0 + bl ov16_02258874 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov16_0225B0FC + pop {r4, pc} + thumb_func_end ov16_02258AB8 + + thumb_func_start ov16_02258ACC +ov16_02258ACC: ; 0x02258ACC + push {r4, lr} + add r4, r0, #0 + cmp r2, #0 + beq _02258ADE + cmp r2, #1 + beq _02258AFA + cmp r2, #2 + beq _02258AE6 + b _02258B04 +_02258ADE: + bl ov16_02258874 + add r1, r0, #0 + b _02258B04 +_02258AE6: + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _02258B10 ; =0x00002DCC + ldr r0, [r2, r0] + lsl r0, r0, #0xa + lsr r0, r0, #0x1d + beq _02258AFA + mov r0, #0 + pop {r4, pc} +_02258AFA: + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02258B14 ; =0x00002DB8 + ldrh r1, [r1, r0] +_02258B04: + add r0, r4, #0 + mov r2, #2 + bl ov16_0225B0FC + pop {r4, pc} + nop +_02258B10: .word 0x00002DCC +_02258B14: .word 0x00002DB8 + thumb_func_end ov16_02258ACC + + thumb_func_start ov16_02258B18 +ov16_02258B18: ; 0x02258B18 + push {r4, lr} + add r4, r0, #0 + bl ov16_02258874 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0xb + bl ov16_0225B0FC + pop {r4, pc} + thumb_func_end ov16_02258B18 + + thumb_func_start ov16_02258B2C +ov16_02258B2C: ; 0x02258B2C + push {r4, lr} + add r4, r0, #0 + bl ov16_02258874 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0xc + bl ov16_0225B0FC + pop {r4, pc} + thumb_func_end ov16_02258B2C + + thumb_func_start ov16_02258B40 +ov16_02258B40: ; 0x02258B40 + mov r2, #0xc0 + mul r2, r1 + ldr r1, _02258B50 ; =0x00002DB8 + add r2, r0, r2 + ldrh r1, [r2, r1] + ldr r3, _02258B54 ; =ov16_0225B0FC + mov r2, #8 + bx r3 + ; .align 2, 0 +_02258B50: .word 0x00002DB8 +_02258B54: .word ov16_0225B0FC + thumb_func_end ov16_02258B40 + + thumb_func_start ov16_02258B58 +ov16_02258B58: ; 0x02258B58 + push {r3, lr} + mov r2, #0xc0 + mul r2, r1 + ldr r1, _02258B7C ; =0x00002DCC + add r3, r0, r2 + ldr r2, [r3, r1] + lsl r2, r2, #0xa + lsr r2, r2, #0x1d + beq _02258B6E + mov r0, #0 + pop {r3, pc} +_02258B6E: + sub r1, #0x14 + ldrh r1, [r3, r1] + mov r2, #9 + bl ov16_0225B0FC + pop {r3, pc} + nop +_02258B7C: .word 0x00002DCC + thumb_func_end ov16_02258B58 + + thumb_func_start ov16_02258B80 +ov16_02258B80: ; 0x02258B80 + push {r3, lr} + mov r2, #0xc0 + mul r2, r1 + ldr r1, _02258BA4 ; =0x00002DCC + add r3, r0, r2 + ldr r2, [r3, r1] + lsl r2, r2, #0xa + lsr r2, r2, #0x1d + beq _02258B96 + mov r0, #0 + pop {r3, pc} +_02258B96: + sub r1, #0x14 + ldrh r1, [r3, r1] + mov r2, #0xa + bl ov16_0225B0FC + pop {r3, pc} + nop +_02258BA4: .word 0x00002DCC + thumb_func_end ov16_02258B80 + + thumb_func_start ov16_02258BA8 +ov16_02258BA8: ; 0x02258BA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r2, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r6, #0 + bl ov16_02258AB8 + cmp r0, #0x7b + bne _02258BC6 + add sp, #8 + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} +_02258BC6: + mov r0, #0xc0 + add r7, r4, #0 + mul r7, r0 + ldr r0, _02258CA8 ; =0x00002DB0 + add r2, r5, r7 + ldr r1, [r2, r0] + ldr r3, _02258CAC ; =0x0400E000 + tst r1, r3 + bne _02258BE2 + add r0, #0x10 + ldr r1, [r2, r0] + lsr r0, r3, #0x10 + tst r0, r1 + beq _02258BE4 +_02258BE2: + mov r6, #1 +_02258BE4: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x17 + beq _02258C04 + mov r0, #0x17 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #3 + add r3, r4, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02258C38 +_02258C04: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #8 + beq _02258C24 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #8 + bne _02258C3A +_02258C24: + mov r0, #0x2a + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #3 + add r3, r4, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02258C3A +_02258C38: + mov r6, #1 +_02258C3A: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02255A4C + cmp r0, #0x1a + beq _02258C72 + ldr r0, _02258CB0 ; =0x00002DCC + add r1, r5, r7 + ldr r0, [r1, r0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x1d + bne _02258C72 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + cmp r0, #2 + beq _02258C72 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + cmp r0, #2 + bne _02258C8C +_02258C72: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02258AB8 + cmp r0, #0x6a + beq _02258C8C + mov r0, #6 + lsl r0, r0, #6 + ldr r1, [r5, r0] + mov r0, #7 + lsl r0, r0, #0xc + tst r0, r1 + beq _02258CA2 +_02258C8C: + mov r0, #0x47 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #3 + add r3, r4, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02258CA2 + mov r6, #1 +_02258CA2: + add r0, r6, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02258CA8: .word 0x00002DB0 +_02258CAC: .word 0x0400E000 +_02258CB0: .word 0x00002DCC + thumb_func_end ov16_02258BA8 + + thumb_func_start ov16_02258CB4 +ov16_02258CB4: ; 0x02258CB4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + str r0, [sp] + mov r6, #0 + str r2, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + add r5, r6, #0 + bl ov16_02258B40 + add r7, r0, #0 + ldr r1, [sp, #4] + add r0, r4, #0 + mov r2, #1 + bl ov16_02258ACC + str r0, [sp, #0x10] + ldr r1, [r4, #0x6c] + add r0, r4, #0 + bl ov16_02259AC0 + cmp r0, #1 + bne _02258CEA + add sp, #0x14 + add r0, r6, #0 + pop {r4, r5, r6, r7, pc} +_02258CEA: + cmp r7, #0x17 + bls _02258CF0 + b _0225916A +_02258CF0: + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02258CFC: ; jump table + .short _0225916A - _02258CFC - 2 ; case 0 + .short _02258D76 - _02258CFC - 2 ; case 1 + .short _02258D8E - _02258CFC - 2 ; case 2 + .short _02258DA6 - _02258CFC - 2 ; case 3 + .short _02258DBE - _02258CFC - 2 ; case 4 + .short _02258DD6 - _02258CFC - 2 ; case 5 + .short _02258DEE - _02258CFC - 2 ; case 6 + .short _02258D2C - _02258CFC - 2 ; case 7 + .short _02258E64 - _02258CFC - 2 ; case 8 + .short _02258E7C - _02258CFC - 2 ; case 9 + .short _02258D4C - _02258CFC - 2 ; case 10 + .short _02258EDE - _02258CFC - 2 ; case 11 + .short _02258F24 - _02258CFC - 2 ; case 12 + .short _02258F6A - _02258CFC - 2 ; case 13 + .short _02258FB0 - _02258CFC - 2 ; case 14 + .short _02258FF6 - _02258CFC - 2 ; case 15 + .short _02259066 - _02258CFC - 2 ; case 16 + .short _02259084 - _02258CFC - 2 ; case 17 + .short _022590A2 - _02258CFC - 2 ; case 18 + .short _022590C0 - _02258CFC - 2 ; case 19 + .short _022590DE - _02258CFC - 2 ; case 20 + .short _0225914A - _02258CFC - 2 ; case 21 + .short _022590FC - _02258CFC - 2 ; case 22 + .short _02259164 - _02258CFC - 2 ; case 23 +_02258D2C: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _02259028 ; =0x00002D8C + ldr r1, [r2, r0] + add r0, r0, #4 + ldr r0, [r2, r0] + cmp r1, r0 + beq _02258D48 + ldr r1, _0225902C ; =0x0000215C + ldr r0, [sp, #0x10] + mov r5, #0xc6 + str r0, [r4, r1] +_02258D48: + mov r6, #1 + b _02259180 +_02258D4C: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259030 ; =0x00002D90 + ldr r2, [r1, r0] + sub r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, r2 + beq _02258D72 + ldr r1, [sp, #0x10] + add r0, r1, #0 + mul r0, r2 + mov r1, #0x64 + bl ov16_022563F8 + ldr r1, _0225902C ; =0x0000215C + mov r5, #0xc6 + str r0, [r4, r1] +_02258D72: + mov r6, #1 + b _02259180 +_02258D76: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259034 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x40 + tst r0, r1 + beq _02258D8A + mov r5, #0xc7 +_02258D8A: + mov r6, #1 + b _02259180 +_02258D8E: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259034 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02258DA2 + mov r5, #0xc8 +_02258DA2: + mov r6, #1 + b _02259180 +_02258DA6: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259034 ; =0x00002DAC + ldr r1, [r1, r0] + ldr r0, _02259038 ; =0x00000F88 + tst r0, r1 + beq _02258DBA + mov r5, #0xc9 +_02258DBA: + mov r6, #1 + b _02259180 +_02258DBE: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259034 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x10 + tst r0, r1 + beq _02258DD2 + mov r5, #0xca +_02258DD2: + mov r6, #1 + b _02259180 +_02258DD6: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259034 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + beq _02258DEA + mov r5, #0xcb +_02258DEA: + mov r6, #1 + b _02259180 +_02258DEE: + str r5, [sp, #0xc] +_02258DF0: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r7, r1, #0 + mul r7, r0 + add r1, r4, r7 + ldr r0, _0225903C ; =0x00002D4C + add r2, r6, r1 + ldrh r0, [r2, r0] + cmp r0, #0 + beq _02258E22 + add r2, r5, r1 + ldr r1, _02259040 ; =0x00002D70 + ldrb r1, [r2, r1] + bl sub_020790DC + add r1, r4, r7 + add r2, r5, r1 + ldr r1, _02259044 ; =0x00002D6C + ldrb r1, [r2, r1] + sub r1, r0, r1 + ldr r0, [sp, #0xc] + cmp r1, r0 + ble _02258E22 + str r1, [sp, #0xc] + str r5, [sp, #8] +_02258E22: + add r5, r5, #1 + add r6, r6, #2 + cmp r5, #4 + blt _02258DF0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldr r1, [sp, #8] + add r0, r4, r0 + ldr r2, [sp, #0x10] + add r0, r0, r7 + add r1, #0x1f + bl ov16_02252A2C + ldr r0, [sp] + ldr r2, [r4, #0x64] + add r1, r4, #0 + bl ov16_02253EC0 + ldr r0, [r4, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, [sp, #8] + add r2, r4, r2 + lsl r0, r0, #1 + add r2, r2, r0 + ldr r0, _0225903C ; =0x00002D4C + add r1, #0x64 + ldrh r0, [r2, r0] + mov r5, #0xcc + mov r6, #1 + str r0, [r4, r1] + b _02259180 +_02258E64: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259048 ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02258E78 + mov r5, #0xcd +_02258E78: + mov r6, #1 + b _02259180 +_02258E7C: + ldr r2, [r4, #0x64] + mov r0, #0xc0 + add r1, r2, #0 + mul r1, r0 + ldr r6, _02259034 ; =0x00002DAC + add r0, r4, r1 + ldr r2, [r0, r6] + lsl r3, r2, #0x18 + lsr r3, r3, #0x18 + bne _02258E9A + add r6, r6, #4 + ldr r6, [r0, r6] + mov r0, #7 + tst r0, r6 + beq _02258EDA +_02258E9A: + mov r0, #0x40 + tst r0, r2 + beq _02258EA2 + mov r5, #0xc7 +_02258EA2: + mov r0, #7 + tst r0, r2 + beq _02258EAA + mov r5, #0xc8 +_02258EAA: + ldr r0, _02259038 ; =0x00000F88 + tst r0, r2 + beq _02258EB2 + mov r5, #0xc9 +_02258EB2: + mov r0, #0x10 + tst r0, r2 + beq _02258EBA + mov r5, #0xca +_02258EBA: + mov r0, #0x20 + tst r0, r2 + beq _02258EC2 + mov r5, #0xcb +_02258EC2: + ldr r0, _02259048 ; =0x00002DB0 + add r1, r4, r1 + ldr r1, [r1, r0] + mov r0, #7 + and r0, r1 + beq _02258ED0 + mov r5, #0xcd +_02258ED0: + cmp r3, #0 + beq _02258EDA + cmp r0, #0 + beq _02258EDA + mov r5, #0xce +_02258EDA: + mov r6, #1 + b _02259180 +_02258EDE: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259030 ; =0x00002D90 + add r2, r4, r0 + ldr r0, [r2, r1] + sub r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, r0 + beq _02258F20 + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225902C ; =0x0000215C + str r0, [r4, r1] + mov r0, #0x13 + add r1, r6, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _0225904C ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r6, #1 + cmp r0, r1 + bne _02258F1E + mov r5, #0xcf + b _02258F20 +_02258F1E: + mov r5, #0xc6 +_02258F20: + mov r6, #1 + b _02259180 +_02258F24: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259030 ; =0x00002D90 + add r2, r4, r0 + ldr r0, [r2, r1] + sub r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, r0 + beq _02258F66 + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225902C ; =0x0000215C + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _0225904C ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r6, #1 + cmp r0, r1 + bne _02258F64 + mov r5, #0xcf + b _02258F66 +_02258F64: + mov r5, #0xc6 +_02258F66: + mov r6, #1 + b _02259180 +_02258F6A: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259030 ; =0x00002D90 + add r2, r4, r0 + ldr r0, [r2, r1] + sub r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, r0 + beq _02258FAC + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225902C ; =0x0000215C + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _0225904C ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r6, #1 + cmp r0, r1 + bne _02258FAA + mov r5, #0xcf + b _02258FAC +_02258FAA: + mov r5, #0xc6 +_02258FAC: + mov r6, #1 + b _02259180 +_02258FB0: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259030 ; =0x00002D90 + add r2, r4, r0 + ldr r0, [r2, r1] + sub r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, r0 + beq _02258FF2 + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225902C ; =0x0000215C + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _0225904C ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r6, #1 + cmp r0, r1 + bne _02258FF0 + mov r5, #0xcf + b _02258FF2 +_02258FF0: + mov r5, #0xc6 +_02258FF2: + mov r6, #1 + b _02259180 +_02258FF6: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259030 ; =0x00002D90 + add r2, r4, r0 + ldr r0, [r2, r1] + sub r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, r0 + beq _02259062 + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225902C ; =0x0000215C + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x64] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _0225904C ; =0x00002DA8 + b _02259050 + ; .align 2, 0 +_02259028: .word 0x00002D8C +_0225902C: .word 0x0000215C +_02259030: .word 0x00002D90 +_02259034: .word 0x00002DAC +_02259038: .word 0x00000F88 +_0225903C: .word 0x00002D4C +_02259040: .word 0x00002D70 +_02259044: .word 0x00002D6C +_02259048: .word 0x00002DB0 +_0225904C: .word 0x00002DA8 +_02259050: + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r6, #1 + cmp r0, r1 + bne _02259060 + mov r5, #0xcf + b _02259062 +_02259060: + mov r5, #0xc6 +_02259062: + mov r6, #1 + b _02259180 +_02259066: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _022591E4 ; =0x00002D59 + add r2, r4, r2 + ldrsb r1, [r2, r1] + cmp r1, #0xc + bge _02259080 + mov r1, #1 + add r0, #0x70 + str r1, [r4, r0] + mov r5, #0xd0 +_02259080: + mov r6, #1 + b _02259180 +_02259084: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _022591E8 ; =0x00002D5A + add r2, r4, r2 + ldrsb r1, [r2, r1] + cmp r1, #0xc + bge _0225909E + mov r1, #2 + add r0, #0x70 + str r1, [r4, r0] + mov r5, #0xd0 +_0225909E: + mov r6, #1 + b _02259180 +_022590A2: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _022591EC ; =0x00002D5B + add r2, r4, r2 + ldrsb r1, [r2, r1] + cmp r1, #0xc + bge _022590BC + mov r1, #3 + add r0, #0x70 + str r1, [r4, r0] + mov r5, #0xd0 +_022590BC: + mov r6, #1 + b _02259180 +_022590C0: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _022591F0 ; =0x00002D5C + add r2, r4, r2 + ldrsb r1, [r2, r1] + cmp r1, #0xc + bge _022590DA + mov r1, #4 + add r0, #0x70 + str r1, [r4, r0] + mov r5, #0xd0 +_022590DA: + mov r6, #1 + b _02259180 +_022590DE: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, _022591F4 ; =0x00002D5D + add r2, r4, r2 + ldrsb r1, [r2, r1] + cmp r1, #0xc + bge _022590F8 + mov r1, #5 + add r0, #0x70 + str r1, [r4, r0] + mov r5, #0xd0 +_022590F8: + mov r6, #1 + b _02259180 +_022590FC: + ldr r2, [r4, #0x64] + mov r1, #0xc0 + mul r1, r2 + add r3, r4, r1 + ldr r1, _022591E4 ; =0x00002D59 + add r0, r6, #0 +_02259108: + ldrsb r2, [r3, r1] + cmp r2, #0xc + blt _02259116 + add r0, r0, #1 + add r3, r3, #1 + cmp r0, #5 + blt _02259108 +_02259116: + cmp r0, #5 + beq _02259146 + ldr r5, _022591E4 ; =0x00002D59 + mov r7, #5 + mov r6, #0xc0 +_02259120: + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r7, #0 + bl sub_020E1F6C + ldr r0, [r4, #0x64] + add r2, r0, #0 + mul r2, r6 + add r0, r4, r2 + add r0, r1, r0 + ldrsb r0, [r0, r5] + cmp r0, #0xc + beq _02259120 + mov r0, #0x13 + add r1, r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r5, #0xd2 +_02259146: + mov r6, #1 + b _02259180 +_0225914A: + ldr r1, [r4, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _022591F8 ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x14 + tst r0, r1 + bne _02259160 + mov r5, #0xd1 +_02259160: + mov r6, #1 + b _02259180 +_02259164: + ldr r5, _022591FC ; =0x00000109 + mov r6, #1 + b _02259180 +_0225916A: + ldr r0, [sp, #4] + mov r1, #0xc0 + mul r1, r0 + ldr r0, _02259200 ; =0x00002DB8 + add r1, r4, r1 + ldrh r0, [r1, r0] + bl sub_0207D324 + cmp r0, #1 + bne _02259180 + mov r6, #1 +_02259180: + cmp r6, #1 + bne _022591DE + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02255A4C + cmp r0, #0x67 + beq _022591A8 + ldr r1, [r4, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + mov r1, #0xb7 + add r2, r4, r2 + lsl r1, r1, #6 + ldr r2, [r2, r1] + mov r1, #1 + lsl r1, r1, #0x1a + tst r1, r2 + beq _022591B2 +_022591A8: + mov r0, #0x4e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _022591B6 +_022591B2: + add r0, #0x78 + str r5, [r4, r0] +_022591B6: + ldr r0, [sp, #4] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _02259200 ; =0x00002DB8 + add r2, r4, r2 + ldrh r0, [r2, r0] + add r1, #0x68 + str r0, [r4, r1] + ldr r2, [r4, #0x64] + mov r0, #0xba + lsl r0, r0, #2 + mov r1, #0x1c + add r3, r2, #0 + mul r3, r1 + add r0, r4, r0 + ldr r2, [r0, r3] + mov r1, #2 + orr r1, r2 + str r1, [r0, r3] +_022591DE: + add r0, r6, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022591E4: .word 0x00002D59 +_022591E8: .word 0x00002D5A +_022591EC: .word 0x00002D5B +_022591F0: .word 0x00002D5C +_022591F4: .word 0x00002D5D +_022591F8: .word 0x00002DB0 +_022591FC: .word 0x00000109 +_02259200: .word 0x00002DB8 + thumb_func_end ov16_02258CB4 + + thumb_func_start ov16_02259204 +ov16_02259204: ; 0x02259204 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + str r0, [sp] + str r2, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + bl ov16_02258B58 + add r6, r0, #0 + ldr r1, [sp, #4] + add r0, r4, #0 + mov r2, #2 + bl ov16_02258ACC + str r0, [sp, #0x10] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov16_02258B80 + ldr r1, _02259558 ; =0x00002154 + add r2, r4, #0 + str r0, [r4, r1] + ldr r0, _0225955C ; =0x00003118 + mov r5, #0 + str r5, [r4, r0] + add r2, #0x88 + str r5, [r2, #0] + ldr r1, [r4, r1] + cmp r1, #0 + bne _02259248 + add sp, #0x14 + add r0, r5, #0 + pop {r4, r5, r6, r7, pc} +_02259248: + cmp r6, #0x1e + bls _0225924E + b _022597D2 +_0225924E: + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225925A: ; jump table + .short _022597D2 - _0225925A - 2 ; case 0 + .short _022592C6 - _0225925A - 2 ; case 1 + .short _022592DE - _0225925A - 2 ; case 2 + .short _022592F6 - _0225925A - 2 ; case 3 + .short _0225930E - _0225925A - 2 ; case 4 + .short _02259326 - _0225925A - 2 ; case 5 + .short _0225933E - _0225925A - 2 ; case 6 + .short _02259298 - _0225925A - 2 ; case 7 + .short _022593C0 - _0225925A - 2 ; case 8 + .short _022593D8 - _0225925A - 2 ; case 9 + .short _022592A4 - _0225925A - 2 ; case 10 + .short _0225949E - _0225925A - 2 ; case 11 + .short _022594E0 - _0225925A - 2 ; case 12 + .short _02259522 - _0225925A - 2 ; case 13 + .short _02259592 - _0225925A - 2 ; case 14 + .short _022595D4 - _0225925A - 2 ; case 15 + .short _022596D0 - _0225925A - 2 ; case 16 + .short _022596EE - _0225925A - 2 ; case 17 + .short _0225970C - _0225925A - 2 ; case 18 + .short _0225972A - _0225925A - 2 ; case 19 + .short _02259748 - _0225925A - 2 ; case 20 + .short _022597B4 - _0225925A - 2 ; case 21 + .short _02259766 - _0225925A - 2 ; case 22 + .short _022597CE - _0225925A - 2 ; case 23 + .short _02259616 - _0225925A - 2 ; case 24 + .short _0225963E - _0225925A - 2 ; case 25 + .short _02259662 - _0225925A - 2 ; case 26 + .short _02259678 - _0225925A - 2 ; case 27 + .short _0225968E - _0225925A - 2 ; case 28 + .short _022596A4 - _0225925A - 2 ; case 29 + .short _022596BA - _0225925A - 2 ; case 30 +_02259298: + ldr r1, [sp, #0x10] + sub r2, r0, #4 + str r1, [r4, r2] + mov r1, #0xc6 + str r1, [r4, r0] + b _022597D2 +_022592A4: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259560 ; =0x00002D90 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + mul r0, r1 + mov r1, #0x64 + bl ov16_022563F8 + ldr r1, _02259564 ; =0x00003114 + mov r2, #0xc6 + str r0, [r4, r1] + add r0, r1, #4 + str r2, [r4, r0] + b _022597D2 +_022592C6: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _02259568 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #0x40 + tst r1, r2 + beq _02259380 + mov r1, #0xc7 + str r1, [r4, r0] + b _022597D2 +_022592DE: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _02259568 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #7 + tst r1, r2 + beq _02259380 + mov r1, #0xc8 + str r1, [r4, r0] + b _022597D2 +_022592F6: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _02259568 ; =0x00002DAC + ldr r2, [r2, r1] + ldr r1, _0225956C ; =0x00000F88 + tst r1, r2 + beq _02259380 + mov r1, #0xc9 + str r1, [r4, r0] + b _022597D2 +_0225930E: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _02259568 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #0x10 + tst r1, r2 + beq _02259380 + mov r1, #0xca + str r1, [r4, r0] + b _022597D2 +_02259326: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _02259568 ; =0x00002DAC + ldr r2, [r2, r1] + mov r1, #0x20 + tst r1, r2 + beq _02259380 + mov r1, #0xcb + str r1, [r4, r0] + b _022597D2 +_0225933E: + add r6, r5, #0 + add r7, r5, #0 +_02259342: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + str r0, [sp, #8] + ldr r0, _02259570 ; =0x00002D4C + add r2, r7, r1 + ldrh r0, [r2, r0] + cmp r0, #0 + beq _02259374 + add r2, r6, r1 + ldr r1, _02259574 ; =0x00002D70 + ldrb r1, [r2, r1] + bl sub_020790DC + ldr r1, [sp, #8] + add r1, r4, r1 + add r2, r6, r1 + ldr r1, _02259578 ; =0x00002D6C + ldrb r1, [r2, r1] + sub r0, r0, r1 + cmp r0, r5 + ble _02259374 + add r5, r0, #0 + str r6, [sp, #0xc] +_02259374: + add r6, r6, #1 + add r7, r7, #2 + cmp r6, #4 + blt _02259342 + cmp r5, #0 + bne _02259382 +_02259380: + b _022597D2 +_02259382: + mov r0, #0xb5 + lsl r0, r0, #6 + add r1, r4, r0 + ldr r0, [sp, #8] + ldr r2, [sp, #0x10] + add r0, r1, r0 + ldr r1, [sp, #0xc] + add r1, #0x1f + bl ov16_02252A2C + ldr r0, [sp] + ldr r2, [r4, #0x6c] + add r1, r4, #0 + bl ov16_02253EC0 + ldr r0, [r4, #0x6c] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, [sp, #0xc] + add r2, r4, r2 + lsl r0, r0, #1 + add r2, r2, r0 + ldr r0, _02259570 ; =0x00002D4C + add r1, #0x64 + ldrh r0, [r2, r0] + str r0, [r4, r1] + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xcc + str r1, [r4, r0] + b _022597D2 +_022593C0: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _0225957C ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #7 + tst r1, r2 + beq _02259494 + mov r1, #0xcd + str r1, [r4, r0] + b _022597D2 +_022593D8: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259568 ; =0x00002DAC + add r3, r4, r0 + ldr r0, [r3, r1] + lsl r2, r0, #0x18 + lsr r2, r2, #0x18 + bne _022593F4 + add r1, r1, #4 + ldr r2, [r3, r1] + mov r1, #7 + tst r1, r2 + beq _02259494 +_022593F4: + mov r1, #0x40 + tst r0, r1 + beq _02259400 + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xc7 + str r1, [r4, r0] +_02259400: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259568 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02259418 + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xc8 + str r1, [r4, r0] +_02259418: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259568 ; =0x00002DAC + ldr r1, [r1, r0] + ldr r0, _0225956C ; =0x00000F88 + tst r0, r1 + beq _02259430 + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xc9 + str r1, [r4, r0] +_02259430: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259568 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x10 + tst r0, r1 + beq _02259448 + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xca + str r1, [r4, r0] +_02259448: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259568 ; =0x00002DAC + ldr r1, [r1, r0] + mov r0, #0x20 + tst r0, r1 + beq _02259460 + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xcb + str r1, [r4, r0] +_02259460: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _0225957C ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #7 + tst r0, r1 + beq _02259478 + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xcd + str r1, [r4, r0] +_02259478: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _02259568 ; =0x00002DAC + ldr r1, [r2, r0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + beq _02259494 + add r0, r0, #4 + ldr r1, [r2, r0] + mov r0, #7 + tst r0, r1 + bne _02259496 +_02259494: + b _022597D2 +_02259496: + ldr r0, _0225955C ; =0x00003118 + mov r1, #0xce + str r1, [r4, r0] + b _022597D2 +_0225949E: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259560 ; =0x00002D90 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _02259564 ; =0x00003114 + str r0, [r4, r1] + mov r0, #0x13 + add r1, r5, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _02259580 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r5, #1 + cmp r0, r1 + ldr r0, _0225955C ; =0x00003118 + bne _022594DA + mov r1, #0xcf + str r1, [r4, r0] + b _022597D2 +_022594DA: + mov r1, #0xc6 + str r1, [r4, r0] + b _022597D2 +_022594E0: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259560 ; =0x00002D90 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _02259564 ; =0x00003114 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _02259580 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r5, #1 + cmp r0, r1 + ldr r0, _0225955C ; =0x00003118 + bne _0225951C + mov r1, #0xcf + str r1, [r4, r0] + b _022597D2 +_0225951C: + mov r1, #0xc6 + str r1, [r4, r0] + b _022597D2 +_02259522: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259560 ; =0x00002D90 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _02259564 ; =0x00003114 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _02259580 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r5, #1 + cmp r0, r1 + ldr r0, _0225955C ; =0x00003118 + b _02259584 + ; .align 2, 0 +_02259558: .word 0x00002154 +_0225955C: .word 0x00003118 +_02259560: .word 0x00002D90 +_02259564: .word 0x00003114 +_02259568: .word 0x00002DAC +_0225956C: .word 0x00000F88 +_02259570: .word 0x00002D4C +_02259574: .word 0x00002D70 +_02259578: .word 0x00002D6C +_0225957C: .word 0x00002DB0 +_02259580: .word 0x00002DA8 +_02259584: + bne _0225958C + mov r1, #0xcf + str r1, [r4, r0] + b _022597D2 +_0225958C: + mov r1, #0xc6 + str r1, [r4, r0] + b _022597D2 +_02259592: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259838 ; =0x00002D90 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225983C ; =0x00003114 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _02259840 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r5, #1 + cmp r0, r1 + ldr r0, _02259844 ; =0x00003118 + bne _022595CE + mov r1, #0xcf + str r1, [r4, r0] + b _022597D2 +_022595CE: + mov r1, #0xc6 + str r1, [r4, r0] + b _022597D2 +_022595D4: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02259838 ; =0x00002D90 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + bl ov16_022563F8 + ldr r1, _0225983C ; =0x00003114 + str r0, [r4, r1] + mov r0, #0x13 + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r2, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r2 + add r2, r4, r0 + ldr r0, _02259840 ; =0x00002DA8 + ldr r0, [r2, r0] + bl sub_02077648 + sub r1, r5, #1 + cmp r0, r1 + ldr r0, _02259844 ; =0x00003118 + bne _02259610 + mov r1, #0xcf + str r1, [r4, r0] + b _022597D2 +_02259610: + mov r1, #0xc6 + str r1, [r4, r0] + b _022597D2 +_02259616: + ldr r2, _02259848 ; =0x00002D58 + mov r6, #6 + mov r3, #0xd3 + mov r7, #0xc0 +_0225961E: + ldr r0, [r4, #0x6c] + add r1, r0, #0 + mul r1, r7 + add r0, r4, r1 + add r0, r0, r5 + ldrsb r1, [r0, r2] + cmp r1, #6 + bge _02259636 + ldr r1, _02259848 ; =0x00002D58 + strb r6, [r0, r1] + ldr r0, _02259844 ; =0x00003118 + str r3, [r4, r0] +_02259636: + add r5, r5, #1 + cmp r5, #8 + blt _0225961E + b _022597D2 +_0225963E: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + add r3, r2, #0 + mul r3, r1 + ldr r2, _0225984C ; =0x00002DB0 + add r3, r4, r3 + ldr r3, [r3, r2] + mov r2, #0xf + lsl r2, r2, #0x10 + tst r2, r3 + bne _02259656 + b _022597D2 +_02259656: + mov r2, #6 + add r1, #0x70 + str r2, [r4, r1] + mov r1, #0xd4 + str r1, [r4, r0] + b _022597D2 +_02259662: + add r2, r4, #0 + ldr r1, [sp, #4] + add r2, #0x94 + str r1, [r2, #0] + add r1, r4, #0 + mov r2, #2 + add r1, #0x88 + str r2, [r1, #0] + mov r1, #0xe + str r1, [r4, r0] + b _022597D2 +_02259678: + add r2, r4, #0 + ldr r1, [sp, #4] + add r2, #0x94 + str r1, [r2, #0] + add r1, r4, #0 + mov r2, #2 + add r1, #0x88 + str r2, [r1, #0] + mov r1, #0x1f + str r1, [r4, r0] + b _022597D2 +_0225968E: + add r2, r4, #0 + ldr r1, [sp, #4] + add r2, #0x94 + str r1, [r2, #0] + add r1, r4, #0 + mov r2, #2 + add r1, #0x88 + str r2, [r1, #0] + mov r1, #0x16 + str r1, [r4, r0] + b _022597D2 +_022596A4: + add r2, r4, #0 + ldr r1, [sp, #4] + add r2, #0x94 + str r1, [r2, #0] + add r1, r4, #0 + mov r2, #2 + add r1, #0x88 + str r2, [r1, #0] + mov r1, #0x2f + str r1, [r4, r0] + b _022597D2 +_022596BA: + add r2, r4, #0 + ldr r1, [sp, #4] + add r2, #0x94 + str r1, [r2, #0] + add r1, r4, #0 + mov r2, #2 + add r1, #0x88 + str r2, [r1, #0] + mov r1, #0x19 + str r1, [r4, r0] + b _022597D2 +_022596D0: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + add r3, r2, #0 + mul r3, r1 + ldr r2, _02259850 ; =0x00002D59 + add r3, r4, r3 + ldrsb r2, [r3, r2] + cmp r2, #0xc + bge _022597D2 + mov r2, #1 + add r1, #0x70 + str r2, [r4, r1] + mov r1, #0xd0 + str r1, [r4, r0] + b _022597D2 +_022596EE: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + add r3, r2, #0 + mul r3, r1 + ldr r2, _02259854 ; =0x00002D5A + add r3, r4, r3 + ldrsb r2, [r3, r2] + cmp r2, #0xc + bge _022597D2 + mov r2, #2 + add r1, #0x70 + str r2, [r4, r1] + mov r1, #0xd0 + str r1, [r4, r0] + b _022597D2 +_0225970C: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + add r3, r2, #0 + mul r3, r1 + ldr r2, _02259858 ; =0x00002D5B + add r3, r4, r3 + ldrsb r2, [r3, r2] + cmp r2, #0xc + bge _022597D2 + mov r2, #3 + add r1, #0x70 + str r2, [r4, r1] + mov r1, #0xd0 + str r1, [r4, r0] + b _022597D2 +_0225972A: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + add r3, r2, #0 + mul r3, r1 + ldr r2, _0225985C ; =0x00002D5C + add r3, r4, r3 + ldrsb r2, [r3, r2] + cmp r2, #0xc + bge _022597D2 + mov r2, #4 + add r1, #0x70 + str r2, [r4, r1] + mov r1, #0xd0 + str r1, [r4, r0] + b _022597D2 +_02259748: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + add r3, r2, #0 + mul r3, r1 + ldr r2, _02259860 ; =0x00002D5D + add r3, r4, r3 + ldrsb r2, [r3, r2] + cmp r2, #0xc + bge _022597D2 + mov r2, #5 + add r1, #0x70 + str r2, [r4, r1] + mov r1, #0xd0 + str r1, [r4, r0] + b _022597D2 +_02259766: + ldr r1, [r4, #0x6c] + mov r0, #0xc0 + mul r0, r1 + add r2, r4, r0 + ldr r0, _02259850 ; =0x00002D59 +_02259770: + ldrsb r1, [r2, r0] + cmp r1, #0xc + blt _0225977E + add r5, r5, #1 + add r2, r2, #1 + cmp r5, #5 + blt _02259770 +_0225977E: + cmp r5, #5 + beq _022597D2 + ldr r5, _02259850 ; =0x00002D59 + mov r7, #5 + mov r6, #0xc0 +_02259788: + ldr r0, [sp] + bl ov16_0223F4BC + add r1, r7, #0 + bl sub_020E1F6C + ldr r0, [r4, #0x6c] + add r2, r0, #0 + mul r2, r6 + add r0, r4, r2 + add r0, r1, r0 + ldrsb r0, [r0, r5] + cmp r0, #0xc + beq _02259788 + mov r0, #0x13 + add r1, r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02259844 ; =0x00003118 + mov r1, #0xd2 + str r1, [r4, r0] + b _022597D2 +_022597B4: + ldr r2, [r4, #0x6c] + mov r1, #0xc0 + mul r1, r2 + add r2, r4, r1 + ldr r1, _0225984C ; =0x00002DB0 + ldr r2, [r2, r1] + mov r1, #1 + lsl r1, r1, #0x14 + tst r1, r2 + bne _022597D2 + mov r1, #0xd1 + str r1, [r4, r0] + b _022597D2 +_022597CE: + ldr r1, _02259864 ; =0x00000109 + str r1, [r4, r0] +_022597D2: + ldr r0, [r4, #0x6c] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + add r0, r4, r2 + mov r2, #0xb7 + lsl r2, r2, #6 + ldr r3, [r0, r2] + mov r0, #1 + lsl r0, r0, #0x1a + tst r0, r3 + beq _022597F2 + ldr r0, _02259844 ; =0x00003118 + mov r1, #0 + str r1, [r4, r0] + b _02259832 +_022597F2: + ldr r0, [sp, #4] + sub r2, #8 + add r3, r0, #0 + mul r3, r1 + add r0, r4, r3 + ldrh r0, [r0, r2] + add r1, #0x68 + str r0, [r4, r1] + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0225982A + ldr r0, _02259844 ; =0x00003118 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0225982A + mov r0, #0xba + ldr r1, [r4, #0x64] + lsl r0, r0, #2 + add r3, r4, r0 + mov r0, #0x1c + add r2, r1, #0 + mul r2, r0 + ldr r1, [r3, r2] + mov r0, #2 + orr r0, r1 + str r0, [r3, r2] +_0225982A: + mov r0, #0x46 + ldr r1, [r4, #0x6c] + lsl r0, r0, #2 + str r1, [r4, r0] +_02259832: + mov r0, #1 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02259838: .word 0x00002D90 +_0225983C: .word 0x00003114 +_02259840: .word 0x00002DA8 +_02259844: .word 0x00003118 +_02259848: .word 0x00002D58 +_0225984C: .word 0x00002DB0 +_02259850: .word 0x00002D59 +_02259854: .word 0x00002D5A +_02259858: .word 0x00002D5B +_0225985C: .word 0x00002D5C +_02259860: .word 0x00002D5D +_02259864: .word 0x00000109 + thumb_func_end ov16_02259204 + + thumb_func_start ov16_02259868 +ov16_02259868: ; 0x02259868 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02258AB8 + cmp r0, #0x69 + bne _022598F6 + ldr r5, [r4, #0x64] + mov r6, #0xc0 + add r3, r5, #0 + mul r3, r6 + ldr r0, _0225990C ; =0x00002DB0 + add r2, r4, r3 + ldr r1, [r2, r0] + lsl r6, r6, #4 + tst r6, r1 + bne _0225990A + mov r6, #0x70 + tst r6, r1 + bne _0225990A + ldr r6, _02259910 ; =0x0000213C + ldr r7, [r4, r6] + mov r6, #2 + lsl r6, r6, #8 + tst r7, r6 + bne _0225990A + lsl r6, r6, #3 + tst r1, r6 + bne _0225990A + mov r6, #0xc1 + lsl r6, r6, #6 + lsl r5, r5, #1 + add r7, r4, r5 + add r5, r6, #0 + add r5, #0x9c + ldrh r5, [r7, r5] + ldr r1, [r4, r6] + cmp r1, r5 + bne _022598DC + add r1, r0, #0 + add r1, #0x1c + ldr r1, [r2, r1] + lsl r1, r1, #5 + lsr r5, r1, #0x1c + cmp r5, #0xa + bhs _0225990A + add r0, #0x1c + add r0, r4, r0 + ldr r2, [r0, r3] + ldr r1, _02259914 ; =0xF87FFFFF + and r2, r1 + add r1, r5, #1 + lsl r1, r1, #0x1c + lsr r1, r1, #5 + orr r1, r2 + str r1, [r0, r3] + pop {r3, r4, r5, r6, r7, pc} +_022598DC: + add r0, #0x1c + add r2, r4, r0 + ldr r1, [r2, r3] + ldr r0, _02259914 ; =0xF87FFFFF + and r0, r1 + str r0, [r2, r3] + ldr r0, [r4, #0x64] + ldr r1, [r4, r6] + lsl r0, r0, #1 + add r0, r4, r0 + add r6, #0x9c + strh r1, [r0, r6] + pop {r3, r4, r5, r6, r7, pc} +_022598F6: + ldr r0, _02259918 ; =0x00002DCC + ldr r1, [r4, #0x64] + add r3, r4, r0 + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, [r3, r2] + ldr r0, _02259914 ; =0xF87FFFFF + and r0, r1 + str r0, [r3, r2] +_0225990A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225990C: .word 0x00002DB0 +_02259910: .word 0x0000213C +_02259914: .word 0xF87FFFFF +_02259918: .word 0x00002DCC + thumb_func_end ov16_02259868 + + thumb_func_start ov16_0225991C +ov16_0225991C: ; 0x0225991C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, [r4, #0x64] + add r0, r4, #0 + bl ov16_02258AB8 + cmp r0, #0x69 + bne _022599A8 + ldr r5, _022599C0 ; =0x0000216C + ldr r0, _022599C4 ; =0x801FDA49 + ldr r1, [r4, r5] + tst r0, r1 + beq _022599BC + ldr r2, [r4, #0x64] + mov r0, #0xc1 + lsl r0, r0, #6 + lsl r1, r2, #1 + ldr r3, [r4, r0] + add r1, r4, r1 + add r0, #0x9c + ldrh r0, [r1, r0] + cmp r3, r0 + bne _022599BC + mov r0, #0xc0 + add r1, r2, #0 + mul r1, r0 + ldr r3, _022599C8 ; =0x00002DCC + add r6, r4, r1 + ldr r0, [r6, r3] + lsl r0, r0, #5 + lsr r0, r0, #0x1c + beq _022599BC + mov r7, #0x1c + mul r7, r2 + mov r2, #0xb5 + add r7, r4, r7 + lsl r2, r2, #2 + ldr r7, [r7, r2] + lsl r7, r7, #0x17 + lsr r7, r7, #0x1d + bne _022599BC + add r7, r3, #0 + sub r7, #0x1c + ldr r6, [r6, r7] + mov r7, #0xc0 + lsl r7, r7, #4 + tst r7, r6 + bne _022599BC + mov r7, #0x70 + tst r7, r6 + bne _022599BC + sub r5, #0x30 + ldr r5, [r4, r5] + sub r2, #0xd4 + tst r2, r5 + bne _022599BC + mov r2, #1 + lsl r2, r2, #0xc + tst r2, r6 + bne _022599BC + add r2, r4, r3 + sub r0, r0, #1 + lsl r0, r0, #0x1c + ldr r4, [r2, r1] + ldr r3, _022599CC ; =0xF87FFFFF + lsr r0, r0, #5 + and r3, r4 + orr r0, r3 + str r0, [r2, r1] + pop {r3, r4, r5, r6, r7, pc} +_022599A8: + ldr r0, _022599C8 ; =0x00002DCC + ldr r1, [r4, #0x64] + add r3, r4, r0 + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r1, [r3, r2] + ldr r0, _022599CC ; =0xF87FFFFF + and r0, r1 + str r0, [r3, r2] +_022599BC: + pop {r3, r4, r5, r6, r7, pc} + nop +_022599C0: .word 0x0000216C +_022599C4: .word 0x801FDA49 +_022599C8: .word 0x00002DCC +_022599CC: .word 0xF87FFFFF + thumb_func_end ov16_0225991C + + thumb_func_start ov16_022599D0 +ov16_022599D0: ; 0x022599D0 + push {r4, r5, r6, lr} + add r5, r0, #0 + cmp r3, #1 + bne _022599E2 + sub r0, r2, #2 + cmp r0, #1 + bhi _022599E2 + mov r0, #1 + b _022599E4 +_022599E2: + mov r0, #0 +_022599E4: + cmp r0, #1 + mov r0, #0xc0 + add r4, r1, #0 + mul r4, r0 + ldr r2, _02259A20 ; =0x00002D8C + add r1, r5, r4 + ldr r0, [r1, r2] + add r2, r2, #4 + ldr r1, [r1, r2] + lsl r0, r0, #0x10 + lsl r1, r1, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + mov r2, #0x30 + mov r6, #0 + bl sub_0208C104 + ldr r1, _02259A24 ; =0x00002DAC + add r2, r5, r4 + ldr r1, [r2, r1] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bne _02259A1A + cmp r0, #4 + beq _02259A1C + cmp r0, #3 + beq _02259A1C +_02259A1A: + mov r6, #0xb +_02259A1C: + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02259A20: .word 0x00002D8C +_02259A24: .word 0x00002DAC + thumb_func_end ov16_022599D0 + + thumb_func_start ov16_02259A28 +ov16_02259A28: ; 0x02259A28 + push {r3, r4} + mov r3, #0xc0 + add r4, r1, #0 + mul r4, r3 + add r1, r0, r4 + ldr r0, _02259A58 ; =0x00002DB0 + mov r2, #1 + ldr r0, [r1, r0] + lsl r1, r2, #0x16 + tst r1, r0 + bne _02259A50 + lsl r1, r3, #4 + tst r1, r0 + bne _02259A50 + mov r1, #0x70 + tst r1, r0 + bne _02259A50 + lsl r1, r2, #0xc + tst r0, r1 + beq _02259A52 +_02259A50: + mov r2, #0 +_02259A52: + add r0, r2, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 +_02259A58: .word 0x00002DB0 + thumb_func_end ov16_02259A28 + + thumb_func_start ov16_02259A5C +ov16_02259A5C: ; 0x02259A5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + add r6, r2, #0 + bl ov16_0223E16C + str r0, [sp, #0xc] + add r0, r5, #0 + bl ov16_0223E24C + str r0, [sp, #8] + add r0, r5, #0 + bl ov16_0223E22C + add r7, r0, #0 + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #2 + lsl r1, r1, #8 + tst r0, r1 + beq _02259A9A + add r0, r6, #0 + mov r1, #0x9b + mov r2, #0 + bl sub_02074470 + add r2, r0, #0 + b _02259A9E +_02259A9A: + sub r1, #0xd8 + ldr r2, [r4, r1] +_02259A9E: + str r7, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r1, [sp, #0xc] + ldr r3, [sp, #8] + add r0, r6, #0 + bl sub_02077E64 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02259A5C + + thumb_func_start ov16_02259AB4 +ov16_02259AB4: ; 0x02259AB4 + lsl r1, r1, #8 + add r1, r0, r1 + mov r0, #0x23 + lsl r0, r0, #8 + ldrb r0, [r1, r0] + bx lr + thumb_func_end ov16_02259AB4 + + thumb_func_start ov16_02259AC0 +ov16_02259AC0: ; 0x02259AC0 + mov r3, #0x1c + mul r3, r1 + add r1, r0, r3 + mov r0, #0xba + lsl r0, r0, #2 + ldr r1, [r1, r0] + mov r0, #8 + mov r2, #0 + tst r0, r1 + beq _02259AD6 + mov r2, #1 +_02259AD6: + add r0, r2, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov16_02259AC0 + + thumb_func_start ov16_02259ADC +ov16_02259ADC: ; 0x02259ADC + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #0 + bl ov16_0223E16C + add r4, r0, #0 + bl sub_02025F20 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02025F30 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02025EF0 + ldr r2, [r5, #0x64] + mov r1, #0xc0 + add r4, r2, #0 + mul r4, r1 + ldr r1, _02259B34 ; =0x00002DB4 + add r3, r5, r4 + ldr r2, [r3, r1] + cmp r6, r2 + bne _02259B30 + add r2, r1, #0 + add r2, #0xa + ldrb r2, [r3, r2] + lsl r2, r2, #0x18 + lsr r2, r2, #0x1c + cmp r7, r2 + bne _02259B30 + sub r1, #0x20 + add r1, r5, r1 + add r1, r1, r4 + mov r2, #7 + bl sub_02002238 + cmp r0, #0 + bne _02259B30 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02259B30: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02259B34: .word 0x00002DB4 + thumb_func_end ov16_02259ADC + + thumb_func_start ov16_02259B38 +ov16_02259B38: ; 0x02259B38 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + mov r1, #0 + bl ov16_0223E16C + add r4, r0, #0 + bl sub_02025F20 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02025F30 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02025EF0 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x90 + add r2, sp, #0 + bl sub_02074470 + add r0, r5, #0 + mov r1, #7 + mov r2, #0 + bl sub_02074470 + cmp r6, r0 + bne _02259B96 + add r0, r5, #0 + mov r1, #0x9d + mov r2, #0 + bl sub_02074470 + cmp r7, r0 + bne _02259B96 + add r0, r4, #0 + add r1, sp, #0 + mov r2, #7 + bl sub_02002238 + cmp r0, #0 + bne _02259B96 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02259B96: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_02259B38 + + thumb_func_start ov16_02259B9C +ov16_02259B9C: ; 0x02259B9C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r4, #0 + add r7, r0, #0 + add r5, r1, #0 + str r2, [sp, #4] + str r4, [sp, #8] + bl ov16_0223DF1C + cmp r0, #0 + bgt _02259BB4 + b _0225A16C +_02259BB4: + ldr r0, _02259EB4 ; =0x00002D66 + add r6, r5, r0 +_02259BB8: + ldr r0, _02259EB8 ; =0x000021EC + add r1, r5, r4 + ldrb r1, [r1, r0] + mov r0, #0x46 + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r3, [r5, r0] + mov r0, #0xc0 + mul r0, r3 + add r2, r5, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r1, [r2, r0] + ldr r0, _02259EBC ; =0x0000015F + cmp r1, r0 + bne _02259BEC + ldr r0, _02259EC0 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _02259BEC + add r0, r5, #0 + add r1, r3, #0 + bl ov16_02255A4C + cmp r0, #0x3b + beq _02259BEE +_02259BEC: + b _02259DDA +_02259BEE: + mov r0, #0xd + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02259C16 + mov r0, #0x4c + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + beq _02259C18 +_02259C16: + b _02259D88 +_02259C18: + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0xf3 + tst r1, r0 + bne _02259C76 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + ldr r2, _02259EC4 ; =0x00002D64 + add r1, r5, r1 + ldrb r2, [r1, r2] + cmp r2, #0 + beq _02259C76 + ldr r2, _02259EC8 ; =0x00002D65 + ldrb r2, [r1, r2] + cmp r2, #0 + beq _02259C76 + ldr r3, _02259EC4 ; =0x00002D64 + mov r2, #0 + mov r0, #0x46 + strb r2, [r1, r3] + lsl r0, r0, #2 + ldr r4, [r5, r0] + mov r1, #0xc0 + add r6, r4, #0 + mul r6, r1 + add r6, r5, r6 + add r4, r3, #1 + strb r2, [r6, r4] + ldr r0, [r5, r0] + add r2, r3, #2 + add r4, r0, #0 + mul r4, r1 + add r2, r5, r2 + ldrb r3, [r2, r4] + mov r0, #0x1f + add r1, #0x46 + bic r3, r0 + ldr r0, [sp, #4] + strb r3, [r2, r4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259C76: + mov r1, #0x30 + tst r1, r0 + beq _02259CD0 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + ldr r2, _02259EC4 ; =0x00002D64 + add r1, r5, r1 + ldrb r2, [r1, r2] + cmp r2, #0xa + beq _02259CD0 + ldr r2, _02259EC8 ; =0x00002D65 + ldrb r2, [r1, r2] + cmp r2, #0xa + beq _02259CD0 + ldr r3, _02259EC4 ; =0x00002D64 + mov r2, #0xa + mov r0, #0x46 + strb r2, [r1, r3] + lsl r0, r0, #2 + ldr r4, [r5, r0] + mov r1, #0xc0 + add r6, r4, #0 + mul r6, r1 + add r6, r5, r6 + add r4, r3, #1 + strb r2, [r6, r4] + add r2, r3, #2 + ldr r3, [r5, r0] + add r2, r5, r2 + add r0, r3, #0 + mul r0, r1 + ldrb r4, [r2, r0] + mov r3, #0x1f + add r1, #0x46 + bic r4, r3 + mov r3, #1 + str r3, [sp, #8] + orr r3, r4 + strb r3, [r2, r0] + ldr r0, [sp, #4] + str r1, [r0, #0] + b _0225A16C +_02259CD0: + mov r1, #3 + tst r1, r0 + beq _02259D2C + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + ldr r2, _02259EC4 ; =0x00002D64 + add r1, r5, r1 + ldrb r2, [r1, r2] + cmp r2, #0xb + beq _02259D2C + ldr r2, _02259EC8 ; =0x00002D65 + ldrb r2, [r1, r2] + cmp r2, #0xb + beq _02259D2C + ldr r3, _02259EC4 ; =0x00002D64 + mov r2, #0xb + mov r0, #0x46 + strb r2, [r1, r3] + lsl r0, r0, #2 + ldr r4, [r5, r0] + mov r1, #0xc0 + add r6, r4, #0 + mul r6, r1 + add r6, r5, r6 + add r4, r3, #1 + strb r2, [r6, r4] + add r2, r3, #2 + ldr r3, [r5, r0] + add r2, r5, r2 + add r0, r3, #0 + mul r0, r1 + ldrb r4, [r2, r0] + mov r3, #0x1f + add r1, #0x46 + bic r4, r3 + mov r3, #2 + orr r3, r4 + strb r3, [r2, r0] + ldr r0, [sp, #4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259D2C: + mov r1, #0xc0 + tst r0, r1 + beq _02259DDA + add r0, r1, #0 + add r0, #0x58 + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259EC4 ; =0x00002D64 + add r0, r5, r0 + ldrb r1, [r0, r1] + cmp r1, #0xf + beq _02259DDA + ldr r1, _02259EC8 ; =0x00002D65 + ldrb r1, [r0, r1] + cmp r1, #0xf + beq _02259DDA + ldr r3, _02259EC4 ; =0x00002D64 + mov r2, #0xf + strb r2, [r0, r3] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r4, [r5, r0] + mov r1, #0xc0 + add r6, r4, #0 + mul r6, r1 + add r6, r5, r6 + add r4, r3, #1 + strb r2, [r6, r4] + add r2, r3, #2 + ldr r3, [r5, r0] + add r2, r5, r2 + add r0, r3, #0 + mul r0, r1 + ldrb r4, [r2, r0] + mov r3, #0x1f + add r1, #0x46 + bic r4, r3 + mov r3, #3 + orr r3, r4 + strb r3, [r2, r0] + ldr r0, [sp, #4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259D88: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r1 + ldr r1, _02259EC4 ; =0x00002D64 + add r0, r5, r0 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _02259DDA + ldr r1, _02259EC8 ; =0x00002D65 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _02259DDA + ldr r3, _02259EC4 ; =0x00002D64 + mov r2, #0 + strb r2, [r0, r3] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r4, [r5, r0] + mov r1, #0xc0 + add r6, r4, #0 + mul r6, r1 + add r6, r5, r6 + add r4, r3, #1 + strb r2, [r6, r4] + ldr r0, [r5, r0] + add r2, r3, #2 + add r4, r0, #0 + mul r4, r1 + add r2, r5, r2 + ldrb r3, [r2, r4] + mov r0, #0x1f + add r1, #0x46 + bic r3, r0 + ldr r0, [sp, #4] + strb r3, [r2, r4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259DDA: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r1 + mov r1, #0xb5 + add r0, r5, r0 + lsl r1, r1, #6 + ldrh r2, [r0, r1] + ldr r1, _02259ECC ; =0x000001A5 + cmp r2, r1 + bne _02259DFA + ldr r1, _02259EC0 ; =0x00002D8C + ldr r0, [r0, r1] + cmp r0, #0 + bne _02259DFC +_02259DFA: + b _02259F26 +_02259DFC: + mov r0, #0xd + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02259F00 + mov r0, #0x4c + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02259F00 + mov r0, #6 + lsl r0, r0, #6 + ldr r2, [r5, r0] + mov r0, #0xf3 + tst r0, r2 + bne _02259E58 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0xc0 + add r3, r0, #0 + mul r3, r1 + ldrb r0, [r6, r3] + lsl r1, r0, #0x1b + lsr r1, r1, #0x1b + cmp r1, #1 + bne _02259E58 + mov r1, #0x1f + bic r0, r1 + strb r0, [r6, r3] + ldr r1, _02259ED0 ; =0x00000106 + ldr r0, [sp, #4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259E58: + mov r0, #0x30 + tst r0, r2 + beq _02259E86 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0xc0 + add r3, r0, #0 + mul r3, r1 + ldrb r0, [r6, r3] + lsl r1, r0, #0x1b + lsr r1, r1, #0x1b + bne _02259E86 + mov r1, #0x1f + bic r0, r1 + mov r1, #1 + orr r0, r1 + str r1, [sp, #8] + strb r0, [r6, r3] + ldr r1, _02259ED0 ; =0x00000106 + ldr r0, [sp, #4] + str r1, [r0, #0] + b _0225A16C +_02259E86: + mov r0, #3 + tst r0, r2 + beq _02259ED4 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0xc0 + add r3, r0, #0 + mul r3, r1 + ldrb r0, [r6, r3] + lsl r1, r0, #0x1b + lsr r1, r1, #0x1b + cmp r1, #1 + bne _02259ED4 + mov r1, #0x1f + bic r0, r1 + strb r0, [r6, r3] + ldr r1, _02259ED0 ; =0x00000106 + ldr r0, [sp, #4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C + ; .align 2, 0 +_02259EB4: .word 0x00002D66 +_02259EB8: .word 0x000021EC +_02259EBC: .word 0x0000015F +_02259EC0: .word 0x00002D8C +_02259EC4: .word 0x00002D64 +_02259EC8: .word 0x00002D65 +_02259ECC: .word 0x000001A5 +_02259ED0: .word 0x00000106 +_02259ED4: + mov r0, #0xc0 + tst r0, r2 + beq _02259F26 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r1 + ldrb r2, [r6, r0] + lsl r1, r2, #0x1b + lsr r1, r1, #0x1b + cmp r1, #1 + bne _02259F26 + mov r1, #0x1f + bic r2, r1 + strb r2, [r6, r0] + ldr r1, _0225A174 ; =0x00000106 + ldr r0, [sp, #4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259F00: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r1 + ldrb r2, [r6, r0] + lsl r1, r2, #0x1b + lsr r1, r1, #0x1b + cmp r1, #1 + bne _02259F26 + mov r1, #0x1f + bic r2, r1 + strb r2, [r6, r0] + ldr r1, _0225A174 ; =0x00000106 + ldr r0, [sp, #4] + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259F26: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r3, [r5, r0] + mov r0, #0xc0 + mul r0, r3 + add r2, r5, r0 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r1, [r2, r0] + ldr r0, _0225A178 ; =0x000001ED + cmp r1, r0 + bne _02259FA4 + ldr r0, _0225A17C ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _02259FA4 + add r0, r5, #0 + add r1, r3, #0 + bl ov16_02255A4C + cmp r0, #0x79 + bne _02259FA4 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0xc0 + mul r0, r1 + add r1, r5, r0 + ldr r0, _0225A180 ; =0x00002DB8 + mov r2, #5 + ldrh r0, [r1, r0] + mov r1, #1 + bl sub_0207CFF0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_02077988 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r1, [r5, r1] + mov r2, #0xc0 + add r3, r1, #0 + mul r3, r2 + ldrb r1, [r6, r3] + lsl r2, r1, #0x1b + lsr r2, r2, #0x1b + cmp r0, r2 + beq _02259FA4 + mov r2, #0x1f + lsl r0, r0, #0x18 + bic r1, r2 + lsr r0, r0, #0x18 + mov r2, #0x1f + and r0, r2 + orr r0, r1 + strb r0, [r6, r3] + ldr r0, [sp, #4] + add r2, #0xe7 + str r2, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_02259FA4: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #0xc0 + add r3, r1, #0 + mul r3, r0 + mov r0, #0xb5 + add r2, r5, r3 + lsl r0, r0, #6 + ldrh r1, [r2, r0] + ldr r0, _0225A184 ; =0x000001E7 + cmp r1, r0 + bne _0225A000 + ldr r0, _0225A17C ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _0225A000 + ldr r0, _0225A188 ; =0x00002D66 + ldrb r0, [r2, r0] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1b + cmp r0, #1 + bne _0225A000 + ldr r0, _0225A18C ; =0x00002DB0 + ldr r1, [r2, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r1 + bne _0225A002 + add r0, r7, #0 + bl ov16_0223EBEC + mov r1, #0x80 + tst r0, r1 + bne _0225A000 + add r0, r1, #0 + add r0, #0x98 + ldr r1, [r5, r0] + mov r0, #0xc0 + add r3, r1, #0 + mul r3, r0 + ldr r0, _0225A180 ; =0x00002DB8 + add r1, r5, r3 + ldrh r0, [r1, r0] + cmp r0, #0x70 + bne _0225A002 +_0225A000: + b _0225A15E +_0225A002: + ldr r0, _0225A18C ; =0x00002DB0 + add r1, r5, r3 + ldr r1, [r1, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r1 + bne _0225A012 + b _0225A150 +_0225A012: + mov r0, #5 + bl sub_02073C74 + add r4, r0, #0 + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _0225A036 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _0225A190 ; =0x000021AC + ldr r1, [r1, r0] + b _0225A040 +_0225A036: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r5, r0] + mov r0, #1 + eor r1, r0 +_0225A040: + ldr r2, _0225A194 ; =0x0000219C + add r3, r5, r1 + ldrb r2, [r3, r2] + add r0, r7, #0 + bl ov16_0223DFAC + add r1, r4, #0 + bl sub_020775EC + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #6 + add r2, sp, #0xc + bl sub_02074B30 + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x70 + add r2, sp, #0xc + bl sub_02074B30 + add r0, r4, #0 + bl sub_02077A00 + add r0, r4, #0 + mov r1, #0xa5 + mov r2, #0 + bl sub_02074470 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _0225A198 ; =0x00002D42 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa6 + mov r2, #0 + bl sub_02074470 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _0225A19C ; =0x00002D44 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa7 + mov r2, #0 + bl sub_02074470 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _0225A1A0 ; =0x00002D46 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa8 + mov r2, #0 + bl sub_02074470 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _0225A1A4 ; =0x00002D48 + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa9 + mov r2, #0 + bl sub_02074470 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [r5, r1] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _0225A1A8 ; =0x00002D4A + strh r0, [r2, r1] + add r0, r4, #0 + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + mov r6, #0x46 + lsl r6, r6, #2 + ldr r2, [r5, r6] + mov r1, #0xc0 + mul r1, r2 + add r2, r5, r1 + ldr r1, _0225A1AC ; =0x00002D67 + strb r0, [r2, r1] + sub r0, r1, #1 + add r3, r5, r0 + ldr r0, [r5, r6] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldrb r1, [r3, r2] + mov r0, #0x1f + bic r1, r0 + strb r1, [r3, r2] + mov r1, #0x85 + lsl r1, r1, #6 + mov r0, #1 + ldr r2, [r5, r1] + lsl r0, r0, #0x1a + orr r0, r2 + str r0, [r5, r1] + ldr r2, [r5, r6] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_022662FC + add r0, r4, #0 + bl sub_020181C4 + add r1, r6, #0 + ldr r0, [sp, #4] + sub r1, #0x12 + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_0225A150: + mov r1, #0x4a + ldr r0, [sp, #4] + lsl r1, r1, #2 + str r1, [r0, #0] + mov r0, #1 + str r0, [sp, #8] + b _0225A16C +_0225A15E: + add r0, r7, #0 + add r4, r4, #1 + bl ov16_0223DF1C + cmp r4, r0 + bge _0225A16C + b _02259BB8 +_0225A16C: + ldr r0, [sp, #8] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225A174: .word 0x00000106 +_0225A178: .word 0x000001ED +_0225A17C: .word 0x00002D8C +_0225A180: .word 0x00002DB8 +_0225A184: .word 0x000001E7 +_0225A188: .word 0x00002D66 +_0225A18C: .word 0x00002DB0 +_0225A190: .word 0x000021AC +_0225A194: .word 0x0000219C +_0225A198: .word 0x00002D42 +_0225A19C: .word 0x00002D44 +_0225A1A0: .word 0x00002D46 +_0225A1A4: .word 0x00002D48 +_0225A1A8: .word 0x00002D4A +_0225A1AC: .word 0x00002D67 + thumb_func_end ov16_02259B9C + + thumb_func_start ov16_0225A1B0 +ov16_0225A1B0: ; 0x0225A1B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp, #4] + str r1, [sp] + mov r7, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _0225A1F2 + ldr r5, [sp] + ldr r4, _0225A1F8 ; =0x0000312C +_0225A1C6: + mov r1, #0 +_0225A1C8: + add r0, r5, r1 + strb r1, [r0, r4] + add r1, r1, #1 + cmp r1, #6 + blt _0225A1C8 + ldr r1, [sp] + ldr r0, [sp, #4] + add r3, r1, #0 + add r6, r3, r7 + ldr r3, _0225A1FC ; =0x0000219C + add r2, r7, #0 + ldrb r3, [r6, r3] + bl ov16_0225A200 + ldr r0, [sp, #4] + add r5, r5, #6 + add r7, r7, #1 + bl ov16_0223DF1C + cmp r7, r0 + blt _0225A1C6 +_0225A1F2: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225A1F8: .word 0x0000312C +_0225A1FC: .word 0x0000219C + thumb_func_end ov16_0225A1B0 + + thumb_func_start ov16_0225A200 +ov16_0225A200: ; 0x0225A200 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + add r5, r2, #0 + add r4, r3, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r1, r0 + beq _0225A21A + mov r1, #0x18 + tst r1, r0 + beq _0225A22E +_0225A21A: + mov r1, #0x10 + tst r0, r1 + beq _0225A252 + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0223E1F8 + mov r1, #1 + tst r0, r1 + bne _0225A252 +_0225A22E: + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0223E1F8 + cmp r0, #4 + beq _0225A246 + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0223E1F8 + cmp r0, #5 + bne _0225A24A +_0225A246: + mov r1, #1 + b _0225A24C +_0225A24A: + mov r1, #0 +_0225A24C: + mov r0, #1 + and r5, r0 + b _0225A254 +_0225A252: + mov r1, #0 +_0225A254: + mov r2, #6 + mul r2, r5 + ldr r3, _0225A27C ; =0x0000312C + mov r0, #0 + add r7, r6, r2 +_0225A25E: + ldrb r5, [r7, r3] + cmp r4, r5 + beq _0225A26C + add r0, r0, #1 + add r7, r7, #1 + cmp r0, #6 + blt _0225A25E +_0225A26C: + ldr r3, _0225A27C ; =0x0000312C + add r3, r6, r3 + add r4, r3, r2 + ldrb r3, [r4, r1] + ldrb r2, [r4, r0] + strb r2, [r4, r1] + strb r3, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225A27C: .word 0x0000312C + thumb_func_end ov16_0225A200 + + thumb_func_start ov16_0225A280 +ov16_0225A280: ; 0x0225A280 + push {r4, r5, r6, r7, lr} + sub sp, #0x8c + str r0, [sp, #4] + ldr r0, [sp, #0xa0] + add r5, r1, #0 + str r0, [sp, #0xa0] + ldr r0, [sp, #0xb4] + str r2, [sp, #8] + str r0, [sp, #0xb4] + mov r0, #0 + str r0, [sp, #0x84] + ldr r0, [sp, #0xb4] + str r3, [sp, #0xc] + cmp r0, #1 + beq _0225A2A4 + bhi _0225A2A4 + bl sub_02022974 +_0225A2A4: + add r0, sp, #0x90 + ldrb r0, [r0, #0x1c] + mov r2, #1 + mov r3, #0 + str r0, [sp, #0x24] + ldr r1, [sp, #0x24] + add r0, r5, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] + add r0, sp, #0xb0 + ldrb r0, [r0] + mov r2, #2 + mov r3, #0 + str r0, [sp, #0x20] + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x78] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #4 + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #5 + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x13 + mov r3, #0 + bl ov16_02252060 + sub r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x70] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #0 + bl ov16_02252060 + sub r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x6c] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x16 + mov r3, #0 + bl ov16_02252060 + sub r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x68] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x17 + mov r3, #0 + bl ov16_02252060 + sub r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x64] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x2b + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r2, #0 + str r0, [sp, #0x60] + ldr r1, [sp, #0x24] + add r0, r5, #0 + add r3, r2, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r2, #0 + str r0, [sp, #0x58] + ldr r1, [sp, #0x20] + add r0, r5, #0 + add r3, r2, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x54] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x2f + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0x50] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x2f + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x30 + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x4c] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x30 + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + str r0, [sp, #0x48] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x34 + mov r3, #0 + bl ov16_02252060 + str r0, [sp, #0x44] + ldr r1, [sp, #0x24] + add r0, r5, #0 + bl ov16_02255A4C + add r7, r0, #0 + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov16_02255A4C + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x1d + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x40] + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x1d + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x3c] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x38] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x20] + add r0, r5, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x34] + ldr r1, [sp, #0x24] + add r0, r5, #0 + bl ov16_02258874 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov16_0225B0FC + str r0, [sp, #0x30] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov16_0225B0FC + str r0, [sp, #0x2c] + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov16_02258874 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov16_0225B0FC + str r0, [sp, #0x28] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov16_0225B0FC + ldr r0, [sp, #4] + bl ov16_0223DF0C + str r0, [sp, #0x5c] + add r0, sp, #0x90 + ldrh r4, [r0, #0x14] + cmp r4, #0 + bne _0225A4A4 + ldr r0, [sp, #8] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _0225A724 ; =0x000003E1 + ldrb r4, [r1, r0] +_0225A4A4: + cmp r7, #0x60 + bne _0225A4AC + mov r6, #0 + b _0225A4C8 +_0225A4AC: + add r0, sp, #0x90 + ldrb r1, [r0, #0x18] + cmp r1, #0 + bne _0225A4C0 + ldr r0, [sp, #8] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _0225A728 ; =0x000003E2 + ldrb r6, [r1, r0] + b _0225A4C8 +_0225A4C0: + mov r0, #0x3f + and r0, r1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 +_0225A4C8: + ldr r0, _0225A72C ; =0x00002158 + ldr r0, [r5, r0] + cmp r0, #0xa + bge _0225A4D4 + bl sub_02022974 +_0225A4D4: + ldr r0, _0225A72C ; =0x00002158 + mov r1, #0xa + ldr r0, [r5, r0] + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, sp, #0x90 + ldrb r0, [r0, #0x1c] + mov r1, #0xc0 + mul r1, r0 + add r2, r5, r1 + mov r1, #0xb7 + lsl r1, r1, #6 + ldr r2, [r2, r1] + mov r1, #2 + lsl r1, r1, #8 + tst r1, r2 + beq _0225A504 + cmp r6, #0xd + bne _0225A504 + lsl r1, r4, #0x11 + lsr r4, r1, #0x10 +_0225A504: + lsl r0, r0, #6 + add r1, r5, r0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _0225A522 + mov r0, #0xf + mul r0, r4 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A522: + cmp r7, #0x65 + bne _0225A53E + ldr r0, [sp, #8] + cmp r0, #0xa5 + beq _0225A53E + cmp r4, #0x3c + bhi _0225A53E + mov r0, #0xf + mul r0, r4 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A53E: + ldr r0, [sp, #8] + lsl r0, r0, #4 + str r0, [sp, #0x18] + add r1, r5, r0 + mov r0, #0x3e + lsl r0, r0, #4 + ldrb r0, [r1, r0] + cmp r7, #0x25 + str r0, [sp, #0x80] + beq _0225A556 + cmp r7, #0x4a + bne _0225A55E +_0225A556: + ldr r0, [sp, #0x7c] + lsl r0, r0, #0x11 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225A55E: + cmp r7, #0x70 + bne _0225A58C + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #3 + mov r3, #0 + bl ov16_0225B45C + str r0, [sp, #0x88] + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x59 + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x88] + sub r0, r1, r0 + cmp r0, #5 + bge _0225A58C + ldr r0, [sp, #0x7c] + lsl r0, r0, #0xf + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225A58C: + ldr r3, _0225A730 ; =0x0226EC92 + mov r2, #0 +_0225A590: + ldrb r1, [r3] + ldr r0, [sp, #0x30] + cmp r0, r1 + bne _0225A5B0 + ldrb r0, [r3, #1] + cmp r6, r0 + bne _0225A5B0 + ldr r0, [sp, #0x2c] + mov r1, #0x64 + add r0, #0x64 + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + b _0225A5B8 +_0225A5B0: + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #0x21 + blo _0225A590 +_0225A5B8: + ldr r0, [sp, #0x30] + cmp r0, #0x37 + bne _0225A5D0 + ldr r1, [sp, #0x7c] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225A5D0: + ldr r0, [sp, #0x30] + cmp r0, #0x7d + bne _0225A5E8 + ldr r1, [sp, #0x74] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] +_0225A5E8: + ldr r0, [sp, #0x30] + cmp r0, #0x3c + bne _0225A616 + ldr r0, [sp, #0x5c] + mov r1, #0x80 + tst r0, r1 + bne _0225A616 + ldr r1, _0225A734 ; =0x0000FE84 + ldr r0, [sp, #0x58] + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _0225A616 + ldr r1, [sp, #0x74] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] +_0225A616: + ldr r0, [sp, #0x28] + cmp r0, #0x3c + bne _0225A644 + ldr r0, [sp, #0x5c] + mov r1, #0x80 + tst r0, r1 + bne _0225A644 + ldr r1, _0225A734 ; =0x0000FE84 + ldr r0, [sp, #0x54] + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _0225A644 + ldr r1, [sp, #0x10] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] +_0225A644: + ldr r0, [sp, #0x30] + cmp r0, #0x3d + bne _0225A65A + ldr r1, _0225A738 ; =0x0000016E + ldr r0, [sp, #0x58] + cmp r0, r1 + bne _0225A65A + ldr r0, [sp, #0x74] + lsl r0, r0, #0x11 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] +_0225A65A: + ldr r0, [sp, #0x28] + cmp r0, #0x3e + bne _0225A670 + ldr r1, _0225A738 ; =0x0000016E + ldr r0, [sp, #0x54] + cmp r0, r1 + bne _0225A670 + ldr r0, [sp, #0x10] + lsl r0, r0, #0x11 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] +_0225A670: + ldr r0, [sp, #0x30] + cmp r0, #0x47 + bne _0225A680 + ldr r0, [sp, #0x58] + cmp r0, #0x19 + bne _0225A680 + lsl r0, r4, #0x11 + lsr r4, r0, #0x10 +_0225A680: + ldr r0, [sp, #0x28] + cmp r0, #0x5a + bne _0225A694 + ldr r0, [sp, #0x54] + cmp r0, #0x84 + bne _0225A694 + ldr r0, [sp, #0x78] + lsl r0, r0, #0x11 + lsr r0, r0, #0x10 + str r0, [sp, #0x78] +_0225A694: + ldr r0, [sp, #0x30] + cmp r0, #0x5b + bne _0225A6B0 + ldr r1, _0225A73C ; =0x0000FF98 + ldr r0, [sp, #0x58] + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _0225A6B0 + ldr r0, [sp, #0x7c] + lsl r0, r0, #0x11 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225A6B0: + ldr r0, [sp, #0x30] + cmp r0, #3 + bne _0225A6D6 + cmp r6, #0x10 + beq _0225A6BE + cmp r6, #8 + bne _0225A6D6 +_0225A6BE: + ldr r1, _0225A740 ; =0x000001E3 + ldr r0, [sp, #0x58] + cmp r0, r1 + bne _0225A6D6 + ldr r0, [sp, #0x2c] + mov r1, #0x64 + add r0, #0x64 + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A6D6: + ldr r0, [sp, #0x30] + cmp r0, #4 + bne _0225A6FE + cmp r6, #0x10 + beq _0225A6E4 + cmp r6, #0xb + bne _0225A6FE +_0225A6E4: + mov r1, #0x79 + ldr r0, [sp, #0x58] + lsl r1, r1, #2 + cmp r0, r1 + bne _0225A6FE + ldr r0, [sp, #0x2c] + mov r1, #0x64 + add r0, #0x64 + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A6FE: + ldr r0, [sp, #0x30] + cmp r0, #2 + bne _0225A75E + cmp r6, #0x10 + beq _0225A70C + cmp r6, #7 + bne _0225A75E +_0225A70C: + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x35 + mov r3, #0 + bl ov16_02252060 + mov r1, #2 + lsl r1, r1, #0x14 + tst r0, r1 + bne _0225A75E + ldr r1, _0225A744 ; =0x000001E7 + b _0225A748 + ; .align 2, 0 +_0225A724: .word 0x000003E1 +_0225A728: .word 0x000003E2 +_0225A72C: .word 0x00002158 +_0225A730: .word 0x0226EC92 +_0225A734: .word 0x0000FE84 +_0225A738: .word 0x0000016E +_0225A73C: .word 0x0000FF98 +_0225A740: .word 0x000001E3 +_0225A744: .word 0x000001E7 +_0225A748: + ldr r0, [sp, #0x58] + cmp r0, r1 + bne _0225A75E + ldr r0, [sp, #0x2c] + mov r1, #0x64 + add r0, #0x64 + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A75E: + ldr r0, [sp, #0x30] + cmp r0, #0x5e + bne _0225A77A + ldr r0, [sp, #0x80] + cmp r0, #0 + bne _0225A77A + ldr r0, [sp, #0x2c] + mov r1, #0x64 + add r0, #0x64 + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A77A: + ldr r0, [sp, #0x30] + cmp r0, #0x5f + bne _0225A798 + ldr r0, [sp, #0x80] + cmp r0, #1 + bne _0225A798 + ldr r0, [sp, #0x2c] + mov r1, #0x64 + add r0, #0x64 + str r0, [sp, #0x2c] + mul r0, r4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A798: + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r3, #0x2f + bl ov16_02255AB4 + cmp r0, #1 + bne _0225A7B4 + cmp r6, #0xa + beq _0225A7B0 + cmp r6, #0xf + bne _0225A7B4 +_0225A7B0: + lsl r0, r4, #0xf + lsr r4, r0, #0x10 +_0225A7B4: + cmp r7, #0x37 + bne _0225A7CA + ldr r1, [sp, #0x7c] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225A7CA: + cmp r7, #0x3e + bne _0225A7E6 + ldr r0, [sp, #0x48] + cmp r0, #0 + beq _0225A7E6 + ldr r1, [sp, #0x7c] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225A7E6: + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r3, #0x3f + bl ov16_02255AB4 + cmp r0, #1 + bne _0225A80E + ldr r0, [sp, #0x44] + cmp r0, #0 + beq _0225A80E + ldr r1, [sp, #0x78] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x78] +_0225A80E: + cmp r7, #0x39 + bne _0225A838 + mov r0, #0x3a + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [sp, #0x24] + add r1, r5, #0 + mov r2, #1 + bl ov16_022555A4 + cmp r0, #0 + beq _0225A838 + ldr r1, [sp, #0x74] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] +_0225A838: + cmp r7, #0x3a + bne _0225A862 + mov r0, #0x39 + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [sp, #0x24] + add r1, r5, #0 + mov r2, #1 + bl ov16_022555A4 + cmp r0, #0 + beq _0225A862 + ldr r1, [sp, #0x74] + mov r0, #0x96 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] +_0225A862: + cmp r6, #0xd + bne _0225A87A + mov r2, #1 + ldr r0, [sp, #4] + add r1, r5, #0 + lsl r2, r2, #0x10 + bl ov16_02255F68 + cmp r0, #0 + beq _0225A87A + lsl r0, r4, #0xf + lsr r4, r0, #0x10 +_0225A87A: + cmp r6, #0xa + bne _0225A892 + mov r2, #2 + ldr r0, [sp, #4] + add r1, r5, #0 + lsl r2, r2, #0x10 + bl ov16_02255F68 + cmp r0, #0 + beq _0225A892 + lsl r0, r4, #0xf + lsr r4, r0, #0x10 +_0225A892: + cmp r6, #0xc + bne _0225A8B6 + cmp r7, #0x41 + bne _0225A8B6 + ldr r0, [sp, #0x4c] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [sp, #0x50] + cmp r1, r0 + bgt _0225A8B6 + mov r0, #0x96 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A8B6: + cmp r6, #0xa + bne _0225A8DA + cmp r7, #0x42 + bne _0225A8DA + ldr r0, [sp, #0x4c] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [sp, #0x50] + cmp r1, r0 + bgt _0225A8DA + mov r0, #0x96 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A8DA: + cmp r6, #0xb + bne _0225A8FE + cmp r7, #0x43 + bne _0225A8FE + ldr r0, [sp, #0x4c] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [sp, #0x50] + cmp r1, r0 + bgt _0225A8FE + mov r0, #0x96 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A8FE: + cmp r6, #6 + bne _0225A922 + cmp r7, #0x44 + bne _0225A922 + ldr r0, [sp, #0x4c] + mov r1, #3 + bl sub_020E1F6C + ldr r1, [sp, #0x50] + cmp r1, r0 + bgt _0225A922 + mov r0, #0x96 + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A922: + cmp r6, #0xa + bne _0225A93A + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r3, #0x55 + bl ov16_02255AB4 + cmp r0, #1 + bne _0225A93A + lsl r0, r4, #0xf + lsr r4, r0, #0x10 +_0225A93A: + cmp r6, #0xa + bne _0225A95C + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r3, #0x57 + bl ov16_02255AB4 + cmp r0, #1 + bne _0225A95C + mov r0, #0x7d + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225A95C: + cmp r7, #0x56 + bne _0225A99C + ldr r0, [sp, #0x70] + mov r1, #5 + lsl r0, r0, #0x19 + asr r0, r0, #0x18 + str r0, [sp, #0x70] + ldr r0, [sp, #0x70] + mvn r1, r1 + cmp r0, r1 + bge _0225A974 + str r1, [sp, #0x70] +_0225A974: + ldr r0, [sp, #0x70] + cmp r0, #6 + ble _0225A97E + mov r0, #6 + str r0, [sp, #0x70] +_0225A97E: + ldr r0, [sp, #0x68] + mov r1, #5 + lsl r0, r0, #0x19 + asr r0, r0, #0x18 + str r0, [sp, #0x68] + ldr r0, [sp, #0x68] + mvn r1, r1 + cmp r0, r1 + bge _0225A992 + str r1, [sp, #0x68] +_0225A992: + ldr r0, [sp, #0x68] + cmp r0, #6 + ble _0225A99C + mov r0, #6 + str r0, [sp, #0x68] +_0225A99C: + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r3, #0x56 + bl ov16_02255AB4 + cmp r0, #1 + bne _0225A9E8 + ldr r0, [sp, #0x6c] + mov r1, #5 + lsl r0, r0, #0x19 + asr r0, r0, #0x18 + str r0, [sp, #0x6c] + ldr r0, [sp, #0x6c] + mvn r1, r1 + cmp r0, r1 + bge _0225A9C0 + str r1, [sp, #0x6c] +_0225A9C0: + ldr r0, [sp, #0x6c] + cmp r0, #6 + ble _0225A9CA + mov r0, #6 + str r0, [sp, #0x6c] +_0225A9CA: + ldr r0, [sp, #0x64] + mov r1, #5 + lsl r0, r0, #0x19 + asr r0, r0, #0x18 + str r0, [sp, #0x64] + ldr r0, [sp, #0x64] + mvn r1, r1 + cmp r0, r1 + bge _0225A9DE + str r1, [sp, #0x64] +_0225A9DE: + ldr r0, [sp, #0x64] + cmp r0, #6 + ble _0225A9E8 + mov r0, #6 + str r0, [sp, #0x64] +_0225A9E8: + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r3, #0x6d + bl ov16_02255AB4 + cmp r0, #1 + bne _0225A9FE + mov r0, #0 + str r0, [sp, #0x70] + str r0, [sp, #0x68] +_0225A9FE: + cmp r7, #0x6d + bne _0225AA08 + mov r0, #0 + str r0, [sp, #0x6c] + str r0, [sp, #0x64] +_0225AA08: + ldr r0, [sp, #0x70] + add r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x70] + ldr r0, [sp, #0x6c] + add r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x6c] + ldr r0, [sp, #0x68] + add r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x68] + ldr r0, [sp, #0x64] + add r0, r0, #6 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x64] + cmp r7, #0x4f + bne _0225AA56 + ldr r1, [sp, #0x40] + ldr r0, [sp, #0x3c] + cmp r1, r0 + bne _0225AA56 + add r0, r1, #0 + cmp r0, #2 + beq _0225AA56 + ldr r0, [sp, #0x3c] + cmp r0, #2 + beq _0225AA56 + mov r0, #0x7d + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225AA56: + cmp r7, #0x4f + bne _0225AA7C + ldr r1, [sp, #0x40] + ldr r0, [sp, #0x3c] + cmp r1, r0 + beq _0225AA7C + add r0, r1, #0 + cmp r0, #2 + beq _0225AA7C + ldr r0, [sp, #0x3c] + cmp r0, #2 + beq _0225AA7C + mov r0, #0x4b + mul r0, r4 + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 +_0225AA7C: + ldr r2, _0225AD6C ; =0x0226EC16 + mov r3, #0 +_0225AA80: + ldrh r1, [r2] + ldr r0, [sp, #8] + cmp r0, r1 + bne _0225AA9C + cmp r7, #0x59 + bne _0225AA9C + mov r0, #0xc + mul r0, r4 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + b _0225AAA4 +_0225AA9C: + add r3, r3, #1 + add r2, r2, #2 + cmp r3, #0xf + blo _0225AA80 +_0225AAA4: + mov r0, #0xd + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225AB76 + mov r0, #0x4c + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225AB76 + ldr r0, [sp, #0xa0] + mov r1, #0x30 + and r0, r1 + str r0, [sp, #0x1c] + beq _0225AAEC + cmp r7, #0x5e + bne _0225AAEC + ldr r1, [sp, #0x74] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x74] +_0225AAEC: + ldr r0, [sp, #0xa0] + mov r1, #0xc + tst r0, r1 + beq _0225AB12 + ldr r0, [sp, #0x38] + cmp r0, #5 + beq _0225AB00 + ldr r0, [sp, #0x34] + cmp r0, #5 + bne _0225AB12 +_0225AB00: + ldr r1, [sp, #0x10] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] +_0225AB12: + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _0225AB3E + mov r0, #0x7a + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [sp, #0x24] + add r1, r5, #0 + mov r2, #1 + bl ov16_022555A4 + cmp r0, #0 + beq _0225AB3E + ldr r1, [sp, #0x7c] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x7c] +_0225AB3E: + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _0225AB76 + ldr r1, [sp, #0x24] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x68 + beq _0225AB76 + mov r0, #0x7a + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r5, #0 + mov r2, #1 + bl ov16_022555A4 + cmp r0, #0 + beq _0225AB76 + ldr r1, [sp, #0x10] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] +_0225AB76: + ldr r0, [sp, #0x18] + add r1, r5, r0 + ldr r0, _0225AD70 ; =0x000003DE + ldrh r0, [r1, r0] + str r0, [sp, #0x14] + cmp r0, #7 + bne _0225AB8C + ldr r0, [sp, #0x78] + lsl r0, r0, #0xf + lsr r0, r0, #0x10 + str r0, [sp, #0x78] +_0225AB8C: + ldr r0, [sp, #0x80] + cmp r0, #0 + bne _0225AC8E + ldr r0, [sp, #0xb4] + cmp r0, #1 + bls _0225ABBA + ldr r0, [sp, #0x70] + cmp r0, #6 + ble _0225ABB4 + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldr r2, [sp, #0x7c] + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x84] + b _0225ABD0 +_0225ABB4: + ldr r0, [sp, #0x7c] + str r0, [sp, #0x84] + b _0225ABD0 +_0225ABBA: + ldr r0, [sp, #0x70] + ldr r2, [sp, #0x7c] + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x84] +_0225ABD0: + ldr r0, [sp, #0x84] + add r1, r0, #0 + ldr r0, [sp, #0x60] + mul r1, r4 + str r1, [sp, #0x84] + lsl r0, r0, #1 + mov r1, #5 + bl sub_020E1F6C + add r1, r0, #2 + ldr r0, [sp, #0x84] + mul r1, r0 + ldr r0, [sp, #0xb4] + str r1, [sp, #0x84] + cmp r0, #1 + bls _0225AC0C + ldr r0, [sp, #0x6c] + cmp r0, #6 + bge _0225AC22 + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldr r2, [sp, #0x78] + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x78] + b _0225AC22 +_0225AC0C: + ldr r0, [sp, #0x6c] + ldr r2, [sp, #0x78] + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x78] +_0225AC22: + ldr r0, [sp, #0x84] + ldr r1, [sp, #0x78] + bl sub_020E1F6C + mov r1, #0x32 + bl sub_020E1F6C + str r0, [sp, #0x84] + ldr r0, [sp, #0x48] + mov r1, #0x10 + tst r0, r1 + beq _0225AC48 + cmp r7, #0x3e + beq _0225AC48 + ldr r0, [sp, #0x84] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x84] +_0225AC48: + ldr r0, [sp, #0xc] + mov r2, #1 + tst r0, r2 + beq _0225AC5C + ldr r0, [sp, #0xb4] + cmp r0, #1 + bne _0225AC5C + ldr r0, [sp, #0x14] + cmp r0, #0xba + bne _0225AC5E +_0225AC5C: + b _0225AD86 +_0225AC5E: + ldr r0, [sp, #0x5c] + mov r1, #2 + tst r0, r1 + beq _0225AC82 + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r5, #0 + bl ov16_022554E0 + cmp r0, #2 + bne _0225AC82 + ldr r0, [sp, #0x84] + mov r1, #3 + lsl r0, r0, #1 + bl sub_020E1F6C + str r0, [sp, #0x84] + b _0225AD86 +_0225AC82: + ldr r0, [sp, #0x84] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x84] + b _0225AD86 +_0225AC8E: + cmp r0, #1 + bne _0225AD86 + ldr r0, [sp, #0xb4] + cmp r0, #1 + bls _0225ACBA + ldr r0, [sp, #0x68] + cmp r0, #6 + ble _0225ACB4 + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldr r2, [sp, #0x74] + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x84] + b _0225ACD0 +_0225ACB4: + ldr r0, [sp, #0x74] + str r0, [sp, #0x84] + b _0225ACD0 +_0225ACBA: + ldr r0, [sp, #0x68] + ldr r2, [sp, #0x74] + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x84] +_0225ACD0: + ldr r0, [sp, #0x84] + add r1, r0, #0 + ldr r0, [sp, #0x60] + mul r1, r4 + str r1, [sp, #0x84] + lsl r0, r0, #1 + mov r1, #5 + bl sub_020E1F6C + add r1, r0, #2 + ldr r0, [sp, #0x84] + mul r1, r0 + ldr r0, [sp, #0xb4] + str r1, [sp, #0x84] + cmp r0, #1 + bls _0225AD0C + ldr r0, [sp, #0x64] + cmp r0, #6 + bge _0225AD22 + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldr r2, [sp, #0x10] + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x10] + b _0225AD22 +_0225AD0C: + ldr r0, [sp, #0x64] + ldr r2, [sp, #0x10] + lsl r1, r0, #1 + ldr r0, _0225AD74 ; =0x0226EBE0 + ldrb r0, [r0, r1] + mul r0, r2 + ldr r2, _0225AD78 ; =0x0226EBE1 + ldrb r1, [r2, r1] + bl sub_020E1F6C + str r0, [sp, #0x10] +_0225AD22: + ldr r0, [sp, #0x84] + ldr r1, [sp, #0x10] + bl sub_020E1F6C + mov r1, #0x32 + bl sub_020E1F6C + str r0, [sp, #0x84] + ldr r0, [sp, #0xc] + mov r1, #2 + tst r0, r1 + beq _0225AD86 + ldr r0, [sp, #0xb4] + cmp r0, #1 + bne _0225AD86 + ldr r0, [sp, #0x14] + cmp r0, #0xba + beq _0225AD86 + ldr r0, [sp, #0x5c] + tst r0, r1 + beq _0225AD7C + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r5, #0 + mov r2, #1 + bl ov16_022554E0 + cmp r0, #2 + bne _0225AD7C + ldr r0, [sp, #0x84] + mov r1, #3 + lsl r0, r0, #1 + bl sub_020E1F6C + str r0, [sp, #0x84] + b _0225AD86 + nop +_0225AD6C: .word 0x0226EC16 +_0225AD70: .word 0x000003DE +_0225AD74: .word 0x0226EBE0 +_0225AD78: .word 0x0226EBE1 +_0225AD7C: + ldr r0, [sp, #0x84] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x84] +_0225AD86: + ldr r0, [sp, #0x5c] + mov r1, #2 + add r4, r0, #0 + and r4, r1 + beq _0225ADBC + ldr r0, [sp, #0x18] + add r1, r5, r0 + ldr r0, _0225AEB0 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #4 + bne _0225ADBC + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r5, #0 + mov r2, #1 + bl ov16_022554E0 + cmp r0, #2 + bne _0225ADBC + ldr r0, [sp, #0x84] + lsl r1, r0, #1 + add r1, r0, r1 + asr r0, r1, #1 + lsr r0, r0, #0x1e + add r0, r1, r0 + asr r0, r0, #2 + str r0, [sp, #0x84] +_0225ADBC: + cmp r4, #0 + beq _0225ADEC + ldr r0, [sp, #0x18] + add r1, r5, r0 + ldr r0, _0225AEB0 ; =0x000003E6 + ldrh r0, [r1, r0] + cmp r0, #8 + bne _0225ADEC + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r5, #0 + mov r2, #0 + bl ov16_022554E0 + cmp r0, #2 + blo _0225ADEC + ldr r0, [sp, #0x84] + lsl r1, r0, #1 + add r1, r0, r1 + asr r0, r1, #1 + lsr r0, r0, #0x1e + add r0, r1, r0 + asr r0, r0, #2 + str r0, [sp, #0x84] +_0225ADEC: + mov r0, #0xd + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225AE84 + mov r0, #0x4c + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225AE84 + ldr r0, [sp, #0xa0] + mov r1, #3 + tst r0, r1 + beq _0225AE40 + cmp r6, #0xa + beq _0225AE26 + cmp r6, #0xb + beq _0225AE32 + b _0225AE40 +_0225AE26: + ldr r0, [sp, #0x84] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x84] + b _0225AE40 +_0225AE32: + ldr r1, [sp, #0x84] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + str r0, [sp, #0x84] +_0225AE40: + ldr r1, _0225AEB4 ; =0x000080CF + ldr r0, [sp, #0xa0] + tst r0, r1 + beq _0225AE58 + ldr r0, [sp, #8] + cmp r0, #0x4c + bne _0225AE58 + ldr r0, [sp, #0x84] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x84] +_0225AE58: + ldr r0, [sp, #0xa0] + mov r1, #0x30 + tst r0, r1 + beq _0225AE84 + cmp r6, #0xa + beq _0225AE6A + cmp r6, #0xb + beq _0225AE7A + b _0225AE84 +_0225AE6A: + ldr r1, [sp, #0x84] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + str r0, [sp, #0x84] + b _0225AE84 +_0225AE7A: + ldr r0, [sp, #0x84] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x84] +_0225AE84: + ldr r1, [sp, #0x24] + add r0, r5, #0 + mov r2, #0x49 + mov r3, #0 + bl ov16_02252060 + cmp r0, #0 + beq _0225AEA6 + cmp r6, #0xa + bne _0225AEA6 + ldr r1, [sp, #0x84] + mov r0, #0xf + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + str r0, [sp, #0x84] +_0225AEA6: + ldr r0, [sp, #0x84] + add r0, r0, #2 + add sp, #0x8c + pop {r4, r5, r6, r7, pc} + nop +_0225AEB0: .word 0x000003E6 +_0225AEB4: .word 0x000080CF + thumb_func_end ov16_0225A280 + + thumb_func_start ov16_0225AEB8 +ov16_0225AEB8: ; 0x0225AEB8 + push {r4, lr} + add r4, r2, #0 + beq _0225AEDE + bl ov16_0223F4BC + lsr r2, r0, #0x1f + lsl r1, r0, #0x1c + sub r1, r1, r2 + mov r0, #0x1c + ror r1, r0 + add r0, r2, r1 + mov r1, #0x64 + sub r0, r1, r0 + mul r0, r4 + bl sub_020E1F6C + add r4, r0, #0 + bne _0225AEDE + mov r4, #1 +_0225AEDE: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0225AEB8 + + thumb_func_start ov16_0225AEE4 +ov16_0225AEE4: ; 0x0225AEE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + mov r0, #1 + add r4, r1, #0 + add r7, r2, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, r7, #0 + str r3, [sp, #4] + bl ov16_02258874 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov16_0225B0FC + mov r3, #0xb5 + lsl r3, r3, #6 + add r2, r3, #0 + mov r5, #0xc0 + add r1, r7, #0 + mul r1, r5 + add r6, r4, r1 + add r2, #0x70 + ldr r2, [r6, r2] + ldrh r1, [r6, r3] + mov ip, r2 + ldr r2, [sp, #4] + mul r5, r2 + add r2, r3, #0 + add r5, r4, r5 + add r2, #0x80 + ldr r2, [r5, r2] + add r3, #0x27 + str r2, [sp, #0xc] + ldrb r2, [r6, r3] + cmp r2, #0x69 + bne _0225AF36 + mov r2, #1 + b _0225AF38 +_0225AF36: + mov r2, #0 +_0225AF38: + cmp r0, #0x43 + bne _0225AF40 + mov r3, #1 + b _0225AF42 +_0225AF40: + mov r3, #0 +_0225AF42: + mov r6, #1 + lsl r6, r6, #0x14 + mov r5, ip + tst r5, r6 + beq _0225AF50 + mov r5, #1 + b _0225AF52 +_0225AF50: + mov r5, #0 +_0225AF52: + cmp r0, #0x59 + bne _0225AF5E + cmp r1, #0x71 + bne _0225AF5E + mov r6, #1 + b _0225AF60 +_0225AF5E: + mov r6, #0 +_0225AF60: + cmp r0, #0x5c + bne _0225AF6C + cmp r1, #0x53 + bne _0225AF6C + mov r1, #1 + b _0225AF6E +_0225AF6C: + mov r1, #0 +_0225AF6E: + lsl r5, r5, #1 + ldr r0, [sp, #0x28] + add r3, r3, r5 + add r0, r0, r3 + add r2, r2, r0 + lsl r0, r6, #1 + add r2, r2, r0 + lsl r0, r1, #1 + add r0, r2, r0 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #4 + bls _0225AF8A + mov r5, #4 +_0225AF8A: + ldr r0, [sp] + bl ov16_0223F4BC + ldr r1, _0225AFF0 ; =0x0226EBA0 + ldrb r1, [r1, r5] + bl sub_020E1F6C + cmp r1, #0 + bne _0225AFD4 + ldr r2, [sp, #4] + add r0, r4, #0 + add r1, r7, #0 + mov r3, #4 + bl ov16_02255AB4 + cmp r0, #0 + bne _0225AFD4 + ldr r2, [sp, #4] + add r0, r4, #0 + add r1, r7, #0 + mov r3, #0x4b + bl ov16_02255AB4 + cmp r0, #0 + bne _0225AFD4 + mov r0, #7 + ldr r1, [sp, #0x2c] + lsl r0, r0, #0xc + tst r0, r1 + bne _0225AFD4 + mov r1, #2 + ldr r0, [sp, #0xc] + lsl r1, r1, #0xe + tst r0, r1 + bne _0225AFD4 + mov r0, #2 + str r0, [sp, #8] +_0225AFD4: + ldr r0, [sp, #8] + cmp r0, #2 + bne _0225AFEA + add r0, r4, #0 + add r1, r7, #0 + bl ov16_02255A4C + cmp r0, #0x61 + bne _0225AFEA + mov r0, #3 + str r0, [sp, #8] +_0225AFEA: + ldr r0, [sp, #8] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225AFF0: .word 0x0226EBA0 + thumb_func_end ov16_0225AEE4 + + thumb_func_start ov16_0225AFF4 +ov16_0225AFF4: ; 0x0225AFF4 + push {r3, r4} + ldr r4, _0225B024 ; =0x0226EC5C + ldr r1, _0225B028 ; =0x0000FFFE + mov r3, #0 +_0225AFFC: + ldrh r2, [r4] + cmp r0, r2 + beq _0225B00C + add r4, r4, #2 + ldrh r2, [r4] + add r3, r3, #1 + cmp r2, r1 + bne _0225AFFC +_0225B00C: + ldr r0, _0225B024 ; =0x0226EC5C + lsl r1, r3, #1 + ldrh r1, [r0, r1] + ldr r0, _0225B028 ; =0x0000FFFE + cmp r1, r0 + bne _0225B01E + mov r0, #1 + pop {r3, r4} + bx lr +_0225B01E: + mov r0, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 +_0225B024: .word 0x0226EC5C +_0225B028: .word 0x0000FFFE + thumb_func_end ov16_0225AFF4 + + thumb_func_start ov16_0225B02C +ov16_0225B02C: ; 0x0225B02C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + str r2, [sp] + add r5, r3, #0 + mov r4, #0 + bl ov16_02256044 + cmp r0, #1 + beq _0225B050 + ldr r2, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r3, r5, #0 + bl ov16_02256078 + cmp r0, #1 + bne _0225B054 +_0225B050: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0225B054: + ldr r2, _0225B07C ; =0x0226EC5C + ldr r0, _0225B080 ; =0x0000FFFF +_0225B058: + ldrh r1, [r2] + cmp r5, r1 + beq _0225B068 + add r2, r2, #2 + ldrh r1, [r2] + add r4, r4, #1 + cmp r1, r0 + bne _0225B058 +_0225B068: + ldr r0, _0225B07C ; =0x0226EC5C + lsl r1, r4, #1 + ldrh r1, [r0, r1] + ldr r0, _0225B080 ; =0x0000FFFF + cmp r1, r0 + bne _0225B078 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225B078: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225B07C: .word 0x0226EC5C +_0225B080: .word 0x0000FFFF + thumb_func_end ov16_0225B02C + + thumb_func_start ov16_0225B084 +ov16_0225B084: ; 0x0225B084 + push {r4, r5} + lsl r1, r1, #4 + add r4, r0, r1 + ldr r1, _0225B0B8 ; =0x000003DE + ldr r3, _0225B0BC ; =0x0226EBB0 + ldrh r1, [r4, r1] + ldr r4, _0225B0B8 ; =0x000003DE + mov r2, #0 +_0225B094: + ldrh r5, [r3] + lsl r5, r5, #4 + add r5, r0, r5 + ldrh r5, [r5, r4] + cmp r1, r5 + beq _0225B0A8 + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #6 + blo _0225B094 +_0225B0A8: + cmp r2, #6 + bne _0225B0B2 + mov r0, #1 + pop {r4, r5} + bx lr +_0225B0B2: + mov r0, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_0225B0B8: .word 0x000003DE +_0225B0BC: .word 0x0226EBB0 + thumb_func_end ov16_0225B084 + + thumb_func_start ov16_0225B0C0 +ov16_0225B0C0: ; 0x0225B0C0 + push {r4, r5} + lsl r1, r1, #4 + add r4, r0, r1 + ldr r1, _0225B0F4 ; =0x000003DE + ldr r3, _0225B0F8 ; =0x0226EBC8 + ldrh r1, [r4, r1] + ldr r4, _0225B0F4 ; =0x000003DE + mov r2, #0 +_0225B0D0: + ldrh r5, [r3] + lsl r5, r5, #4 + add r5, r0, r5 + ldrh r5, [r5, r4] + cmp r1, r5 + beq _0225B0E4 + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #6 + blo _0225B0D0 +_0225B0E4: + cmp r2, #6 + bne _0225B0EE + mov r0, #1 + pop {r4, r5} + bx lr +_0225B0EE: + mov r0, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_0225B0F4: .word 0x000003DE +_0225B0F8: .word 0x0226EBC8 + thumb_func_end ov16_0225B0C0 + + thumb_func_start ov16_0225B0FC +ov16_0225B0FC: ; 0x0225B0FC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + mov r1, #0 + add r4, r2, #0 + bl sub_0207CE78 + add r1, r0, #0 + ldr r0, _0225B11C ; =0x00002120 + ldr r0, [r5, r0] + bl sub_0207D3B0 + add r1, r4, #0 + bl sub_0207D014 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225B11C: .word 0x00002120 + thumb_func_end ov16_0225B0FC + + thumb_func_start ov16_0225B120 +ov16_0225B120: ; 0x0225B120 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r2, #0 + bl ov16_0223DF1C + add r6, r0, #0 + mov r4, #0 + cmp r6, #0 + ble _0225B144 +_0225B132: + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E208 + cmp r5, r0 + beq _0225B144 + add r4, r4, #1 + cmp r4, r6 + blt _0225B132 +_0225B144: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0225B120 + + thumb_func_start ov16_0225B148 +ov16_0225B148: ; 0x0225B148 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + add r5, r1, #0 + bl ov16_0223DF1C + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + sub r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #0 + ble _0225B1CE +_0225B164: + ldr r0, [sp, #0x14] + add r7, r0, #1 + ldr r0, [sp, #0x10] + cmp r7, r0 + bge _0225B1C2 + ldr r0, [sp, #0x14] + add r0, r5, r0 + str r0, [sp, #0xc] +_0225B174: + ldr r1, [sp, #0xc] + ldr r0, _0225B1D4 ; =0x000021E8 + ldrb r6, [r1, r0] + add r1, r5, r7 + ldrb r4, [r1, r0] + lsl r0, r6, #4 + str r1, [sp, #8] + add r1, r5, r0 + ldr r0, _0225B1D8 ; =0x000021B4 + ldr r0, [r1, r0] + lsl r1, r4, #4 + add r2, r5, r1 + ldr r1, _0225B1D8 ; =0x000021B4 + ldr r1, [r2, r1] + cmp r0, r1 + bne _0225B1BA + cmp r0, #1 + beq _0225B19C + mov r0, #1 + b _0225B19E +_0225B19C: + mov r0, #0 +_0225B19E: + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov16_02252EC8 + cmp r0, #0 + beq _0225B1BA + ldr r1, [sp, #0xc] + ldr r0, _0225B1D4 ; =0x000021E8 + strb r4, [r1, r0] + ldr r1, [sp, #8] + strb r6, [r1, r0] +_0225B1BA: + ldr r0, [sp, #0x10] + add r7, r7, #1 + cmp r7, r0 + blt _0225B174 +_0225B1C2: + ldr r0, [sp, #0x14] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [sp, #0x14] + cmp r1, r0 + blt _0225B164 +_0225B1CE: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0225B1D4: .word 0x000021E8 +_0225B1D8: .word 0x000021B4 + thumb_func_end ov16_0225B148 + + thumb_func_start ov16_0225B1DC +ov16_0225B1DC: ; 0x0225B1DC + push {r4, r5} + mov r4, #0xc0 + mul r4, r1 + add r5, r0, r4 + ldr r0, _0225B21C ; =0x00002DB0 + mov r1, #1 + ldr r4, [r5, r0] + lsl r1, r1, #0x18 + mov r3, #0 + tst r1, r4 + bne _0225B1FC + add r0, #0x10 + ldr r1, [r5, r0] + ldr r0, _0225B220 ; =0x200400C0 + tst r0, r1 + beq _0225B214 +_0225B1FC: + ldr r4, _0225B224 ; =0x0226EC34 + mov r1, #0 +_0225B200: + ldr r0, [r4, #0] + cmp r2, r0 + bne _0225B20A + mov r3, #1 + b _0225B216 +_0225B20A: + add r1, r1, #1 + add r4, r4, #4 + cmp r1, #0xa + blo _0225B200 + b _0225B216 +_0225B214: + mov r3, #1 +_0225B216: + add r0, r3, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_0225B21C: .word 0x00002DB0 +_0225B220: .word 0x200400C0 +_0225B224: .word 0x0226EC34 + thumb_func_end ov16_0225B1DC + + thumb_func_start ov16_0225B228 +ov16_0225B228: ; 0x0225B228 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + ldr r1, [r5, #0x64] + str r0, [sp] + add r0, r5, #0 + add r4, r2, #0 + mov r6, #0 + bl ov16_02258AB8 + str r0, [sp, #0xc] + ldr r1, [r5, #0x64] + add r0, r5, #0 + add r2, r6, #0 + bl ov16_02258ACC + str r0, [sp, #0x10] + ldr r1, [r5, #0x6c] + add r0, r5, #0 + bl ov16_02258AB8 + add r7, r0, #0 + ldr r1, [r5, #0x6c] + add r0, r5, #0 + add r2, r6, #0 + bl ov16_02258ACC + str r0, [sp, #8] + ldr r0, [sp] + ldr r1, [r5, #0x64] + bl ov16_0223E208 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + cmp r0, #0x58 + bne _0225B2C4 + ldr r0, _0225B3EC ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #0xc + tst r0, r1 + beq _0225B2C4 + ldr r0, [r5, #0x64] + mov r1, #0x1c + mul r1, r0 + add r2, r5, r1 + mov r1, #0xbb + lsl r1, r1, #2 + ldr r2, [r2, r1] + cmp r2, #0 + beq _0225B2C4 + ldr r1, [r5, #0x6c] + cmp r0, r1 + beq _0225B2C4 + mov r1, #0xc0 + mul r1, r0 + ldr r3, _0225B3F0 ; =0x00002D8C + add r1, r5, r1 + ldr r0, [r1, r3] + add r3, r3, #4 + ldr r1, [r1, r3] + cmp r0, r1 + bhs _0225B2C4 + cmp r0, #0 + beq _0225B2C4 + ldr r1, [sp, #0x10] + neg r0, r2 + bl ov16_022563F8 + ldr r1, _0225B3F4 ; =0x0000215C + mov r6, #1 + str r0, [r5, r1] + mov r0, #0x46 + ldr r1, [r5, #0x64] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0xd5 + str r0, [r4, #0] +_0225B2C4: + ldr r0, [sp, #0xc] + cmp r0, #0x62 + bne _0225B326 + ldr r1, [r5, #0x64] + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _0225B326 + ldr r0, _0225B3EC ; =0x0000213C + ldr r1, [r5, r0] + mov r0, #2 + lsl r0, r0, #0xc + tst r0, r1 + beq _0225B326 + ldr r0, _0225B3F8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + mov r0, #0x3e + lsl r0, r0, #4 + ldrb r0, [r1, r0] + cmp r0, #2 + beq _0225B326 + ldr r1, [r5, #0x64] + mov r0, #0xc0 + add r2, r1, #0 + mul r2, r0 + ldr r3, _0225B3F0 ; =0x00002D8C + add r2, r5, r2 + ldr r1, [r2, r3] + cmp r1, #0 + beq _0225B326 + add r1, r3, #4 + ldr r1, [r2, r1] + sub r0, #0xc1 + mul r0, r1 + mov r1, #0xa + bl ov16_022563F8 + ldr r1, _0225B3F4 ; =0x0000215C + mov r6, #1 + str r0, [r5, r1] + mov r0, #0x46 + ldr r1, [r5, #0x64] + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0xd6 + str r0, [r4, #0] +_0225B326: + cmp r7, #0x2e + bne _0225B37A + ldr r1, [r5, #0x64] + mov r0, #0xc0 + mul r0, r1 + add r2, r5, r0 + ldr r0, _0225B3F0 ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _0225B37A + add r0, r5, #0 + bl ov16_02255A4C + cmp r0, #0x62 + beq _0225B37A + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r1, r5, r0 + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0225B37A + ldr r0, [r5, #0x64] + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r0, _0225B3FC ; =0x00002D90 + add r2, r5, r2 + ldr r2, [r2, r0] + sub r1, #0xc1 + add r0, r2, #0 + mul r0, r1 + ldr r1, [sp, #8] + bl ov16_022563F8 + ldr r1, _0225B3F4 ; =0x0000215C + mov r6, #1 + str r0, [r5, r1] + lsr r0, r1, #5 + str r0, [r4, #0] +_0225B37A: + cmp r7, #0x74 + bne _0225B3E6 + ldr r0, [r5, #0x64] + mov r1, #0xc0 + mul r1, r0 + add r3, r5, r1 + ldr r1, _0225B3F0 ; =0x00002D8C + ldr r2, [r3, r1] + cmp r2, #0 + beq _0225B3E6 + add r1, #0x2c + ldrh r1, [r3, r1] + cmp r1, #0 + bne _0225B3E6 + add r1, r5, r0 + ldr r0, _0225B400 ; =0x0000219C + ldrb r0, [r1, r0] + bl sub_020787CC + ldr r1, [sp, #4] + lsl r1, r1, #3 + add r2, r5, r1 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r1, [r2, r1] + lsl r1, r1, #3 + lsr r1, r1, #0x1a + tst r0, r1 + bne _0225B3E6 + ldr r1, [r5, #0x6c] + mov r0, #0x1c + mul r0, r1 + add r2, r5, r0 + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r1, [r2, r0] + cmp r1, #0 + bne _0225B3CE + add r0, #8 + ldr r0, [r2, r0] + cmp r0, #0 + beq _0225B3E6 +_0225B3CE: + ldr r0, _0225B3F8 ; =0x00003044 + ldr r0, [r5, r0] + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _0225B404 ; =0x000003E9 + ldrb r1, [r1, r0] + mov r0, #1 + tst r1, r0 + beq _0225B3E6 + mov r1, #0xd8 + str r1, [r4, #0] + add r6, r0, #0 +_0225B3E6: + add r0, r6, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225B3EC: .word 0x0000213C +_0225B3F0: .word 0x00002D8C +_0225B3F4: .word 0x0000215C +_0225B3F8: .word 0x00003044 +_0225B3FC: .word 0x00002D90 +_0225B400: .word 0x0000219C +_0225B404: .word 0x000003E9 + thumb_func_end ov16_0225B228 + + thumb_func_start ov16_0225B408 +ov16_0225B408: ; 0x0225B408 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r2, #0xff + beq _0225B438 + add r1, r2, #0 + bl ov16_02255A4C + cmp r0, #0x2e + bne _0225B438 + ldr r0, _0225B43C ; =0x00002D6C + add r1, r5, r0 + mov r0, #0xc0 + mul r0, r4 + add r0, r1, r0 + lsl r1, r4, #1 + add r2, r5, r1 + ldr r1, _0225B440 ; =0x000030BC + ldrh r2, [r2, r1] + ldrb r1, [r0, r2] + cmp r1, #0 + beq _0225B438 + sub r1, r1, #1 + strb r1, [r0, r2] +_0225B438: + pop {r3, r4, r5, pc} + nop +_0225B43C: .word 0x00002D6C +_0225B440: .word 0x000030BC + thumb_func_end ov16_0225B408 + + thumb_func_start ov16_0225B444 +ov16_0225B444: ; 0x0225B444 + push {r4, lr} + add r4, r1, #0 + bl ov16_0223F710 + cmp r0, #0 + beq _0225B458 + mov r0, #0x2a + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} +_0225B458: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov16_0225B444 + + thumb_func_start ov16_0225B45C +ov16_0225B45C: ; 0x0225B45C + push {r4, lr} + add r4, r1, #0 + cmp r2, #0xe + bhi _0225B51C + add r1, r2, r2 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225B470: ; jump table + .short _0225B48E - _0225B470 - 2 ; case 0 + .short _0225B4A0 - _0225B470 - 2 ; case 1 + .short _0225B4B6 - _0225B470 - 2 ; case 2 + .short _0225B4BE - _0225B470 - 2 ; case 3 + .short _0225B4C6 - _0225B470 - 2 ; case 4 + .short _0225B4CC - _0225B470 - 2 ; case 5 + .short _0225B4D2 - _0225B470 - 2 ; case 6 + .short _0225B4DE - _0225B470 - 2 ; case 7 + .short _0225B4EA - _0225B470 - 2 ; case 8 + .short _0225B4F4 - _0225B470 - 2 ; case 9 + .short _0225B4FC - _0225B470 - 2 ; case 10 + .short _0225B502 - _0225B470 - 2 ; case 11 + .short _0225B50A - _0225B470 - 2 ; case 12 + .short _0225B514 - _0225B470 - 2 ; case 13 + .short _0225B518 - _0225B470 - 2 ; case 14 +_0225B48E: + add r1, r3, #0 + bl ov16_0223E208 + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r1, r0] + pop {r4, pc} +_0225B4A0: + add r1, r3, #0 + bl ov16_0223E208 + lsl r0, r0, #3 + add r1, r4, r0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r0, r0, #0x11 + lsr r0, r0, #0x1d + pop {r4, pc} +_0225B4B6: + ldr r0, _0225B524 ; =0x0000219C + add r1, r4, r3 + ldrb r0, [r1, r0] + pop {r4, pc} +_0225B4BE: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + pop {r4, pc} +_0225B4C6: + ldr r0, _0225B528 ; =0x00003109 + ldrb r0, [r4, r0] + pop {r4, pc} +_0225B4CC: + ldr r0, _0225B52C ; =0x0000311D + ldrb r0, [r4, r0] + pop {r4, pc} +_0225B4D2: + lsl r0, r3, #2 + add r1, r4, r0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r1, r0] + pop {r4, pc} +_0225B4DE: + lsl r0, r3, #2 + add r1, r4, r0 + mov r0, #0x59 + lsl r0, r0, #2 + ldr r0, [r1, r0] + pop {r4, pc} +_0225B4EA: + lsl r0, r3, #4 + add r1, r4, r0 + ldr r0, _0225B530 ; =0x000021A8 + ldr r0, [r1, r0] + pop {r4, pc} +_0225B4F4: + mov r0, #0x3d + lsl r0, r0, #4 + ldrb r0, [r4, r0] + pop {r4, pc} +_0225B4FC: + ldr r0, _0225B534 ; =0x00003108 + ldrb r0, [r4, r0] + pop {r4, pc} +_0225B502: + ldr r0, _0225B538 ; =0x000003DA + add r1, r4, r3 + ldrb r0, [r1, r0] + pop {r4, pc} +_0225B50A: + lsl r0, r3, #4 + add r1, r4, r0 + ldr r0, _0225B53C ; =0x000021B0 + ldr r0, [r1, r0] + pop {r4, pc} +_0225B514: + ldr r0, [r4, #8] + pop {r4, pc} +_0225B518: + ldr r0, [r4, #0xc] + pop {r4, pc} +_0225B51C: + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0225B524: .word 0x0000219C +_0225B528: .word 0x00003109 +_0225B52C: .word 0x0000311D +_0225B530: .word 0x000021A8 +_0225B534: .word 0x00003108 +_0225B538: .word 0x000003DA +_0225B53C: .word 0x000021B0 + thumb_func_end ov16_0225B45C + + thumb_func_start ov16_0225B540 +ov16_0225B540: ; 0x0225B540 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [sp, #0x10] + cmp r2, #0xb + bhi _0225B5BE + add r1, r2, r2 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225B556: ; jump table + .short _0225B56E - _0225B556 - 2 ; case 0 + .short _0225B580 - _0225B556 - 2 ; case 1 + .short _0225B59E - _0225B556 - 2 ; case 2 + .short _0225B5A6 - _0225B556 - 2 ; case 3 + .short _0225B5BE - _0225B556 - 2 ; case 4 + .short _0225B5BE - _0225B556 - 2 ; case 5 + .short _0225B5BE - _0225B556 - 2 ; case 6 + .short _0225B5BE - _0225B556 - 2 ; case 7 + .short _0225B5BE - _0225B556 - 2 ; case 8 + .short _0225B5AE - _0225B556 - 2 ; case 9 + .short _0225B5BE - _0225B556 - 2 ; case 10 + .short _0225B5B6 - _0225B556 - 2 ; case 11 +_0225B56E: + add r1, r3, #0 + bl ov16_0223E208 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x6f + lsl r0, r0, #2 + str r4, [r1, r0] + pop {r3, r4, r5, pc} +_0225B580: + add r1, r3, #0 + bl ov16_0223E208 + mov r1, #0x71 + lsl r1, r1, #2 + add r1, r5, r1 + lsl r0, r0, #3 + ldr r3, [r1, r0] + ldr r2, _0225B5C4 ; =0xFFFF8FFF + and r3, r2 + lsl r2, r4, #0x1d + lsr r2, r2, #0x11 + orr r2, r3 + str r2, [r1, r0] + pop {r3, r4, r5, pc} +_0225B59E: + ldr r0, _0225B5C8 ; =0x0000219C + add r1, r5, r3 + strb r4, [r1, r0] + pop {r3, r4, r5, pc} +_0225B5A6: + mov r0, #0x15 + lsl r0, r0, #4 + str r4, [r5, r0] + pop {r3, r4, r5, pc} +_0225B5AE: + mov r0, #0x3d + lsl r0, r0, #4 + strb r4, [r5, r0] + pop {r3, r4, r5, pc} +_0225B5B6: + ldr r0, _0225B5CC ; =0x000003DA + add r1, r5, r3 + strb r4, [r1, r0] + pop {r3, r4, r5, pc} +_0225B5BE: + bl sub_02022974 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225B5C4: .word 0xFFFF8FFF +_0225B5C8: .word 0x0000219C +_0225B5CC: .word 0x000003DA + thumb_func_end ov16_0225B540 + + thumb_func_start ov16_0225B5D0 +ov16_0225B5D0: ; 0x0225B5D0 + push {r4, lr} + add r3, r0, #0 + add r3, #0x88 + str r1, [r3, #0] + add r3, r0, #0 + ldr r1, _0225B634 ; =0x007FFFFF + add r4, r2, #0 + and r4, r1 + add r3, #0x8c + str r4, [r3, #0] + lsl r1, r1, #0x17 + add r3, r2, #0 + and r3, r1 + add r1, r0, #0 + add r1, #0x90 + str r3, [r1, #0] + mov r3, #1 + lsl r3, r3, #0x1e + add r1, r2, #0 + tst r1, r3 + beq _0225B602 + ldr r1, [r0, #0x64] + add r0, #0x94 + str r1, [r0, #0] + b _0225B622 +_0225B602: + lsl r1, r3, #1 + tst r1, r2 + beq _0225B610 + ldr r1, [r0, #0x6c] + add r0, #0x94 + str r1, [r0, #0] + b _0225B622 +_0225B610: + lsr r1, r3, #1 + tst r1, r2 + bne _0225B61C + lsr r1, r3, #2 + tst r1, r2 + beq _0225B622 +_0225B61C: + mov r1, #0 + add r0, #0x94 + str r1, [r0, #0] +_0225B622: + cmp r4, #0x91 + blo _0225B62A + bl sub_02022974 +_0225B62A: + ldr r0, _0225B638 ; =0x0226EE24 + lsl r1, r4, #2 + ldr r0, [r0, r1] + pop {r4, pc} + nop +_0225B634: .word 0x007FFFFF +_0225B638: .word 0x0226EE24 + thumb_func_end ov16_0225B5D0 + + thumb_func_start ov16_0225B63C +ov16_0225B63C: ; 0x0225B63C + push {r3, r4, r5, lr} + ldr r1, _0225B6C4 ; =0x0000213C + add r5, r2, #0 + ldr r2, [r0, r1] + mov r0, #2 + lsl r0, r0, #0xa + add r1, r2, #0 + ldr r4, [sp, #0x14] + tst r1, r0 + bne _0225B666 + lsl r0, r0, #4 + tst r0, r2 + bne _0225B666 + cmp r3, #0 + beq _0225B666 + add r0, r3, #0 + mul r0, r5 + mov r1, #0xa + bl ov16_022563F8 + add r3, r0, #0 +_0225B666: + cmp r5, #0 + beq _0225B674 + cmp r5, #5 + beq _0225B686 + cmp r5, #0x14 + beq _0225B6A4 + b _0225B6C0 +_0225B674: + ldr r1, [r4, #0] + mov r0, #8 + orr r1, r0 + mov r0, #4 + bic r1, r0 + mov r0, #2 + bic r1, r0 + str r1, [r4, #0] + b _0225B6C0 +_0225B686: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _0225B6C0 + ldr r1, [r4, #0] + mov r0, #2 + tst r0, r1 + beq _0225B69C + mov r0, #2 + bic r1, r0 + str r1, [r4, #0] + b _0225B6C0 +_0225B69C: + mov r0, #4 + orr r0, r1 + str r0, [r4, #0] + b _0225B6C0 +_0225B6A4: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _0225B6C0 + ldr r1, [r4, #0] + mov r0, #4 + tst r0, r1 + beq _0225B6BA + mov r0, #4 + bic r1, r0 + str r1, [r4, #0] + b _0225B6C0 +_0225B6BA: + mov r0, #2 + orr r0, r1 + str r0, [r4, #0] +_0225B6C0: + add r0, r3, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225B6C4: .word 0x0000213C + thumb_func_end ov16_0225B63C + + thumb_func_start ov16_0225B6C8 +ov16_0225B6C8: ; 0x0225B6C8 + lsl r1, r1, #4 + add r2, r0, r1 + ldr r1, _0225B72C ; =0x000003DE + ldrh r3, [r2, r1] + cmp r3, #0x9b + bgt _0225B6FA + cmp r3, #0x97 + blt _0225B6E0 + beq _0225B71A + cmp r3, #0x9b + beq _0225B71A + b _0225B726 +_0225B6E0: + cmp r3, #0x27 + bgt _0225B6EC + bge _0225B71A + cmp r3, #0x1a + beq _0225B71A + b _0225B726 +_0225B6EC: + cmp r3, #0x4b + bgt _0225B6F4 + beq _0225B71A + b _0225B726 +_0225B6F4: + cmp r3, #0x91 + beq _0225B71A + b _0225B726 +_0225B6FA: + mov r2, #1 + lsl r2, r2, #8 + cmp r3, r2 + bgt _0225B70A + bge _0225B71A + cmp r3, #0xff + beq _0225B71A + b _0225B726 +_0225B70A: + add r1, r2, #7 + cmp r3, r1 + bgt _0225B714 + beq _0225B71A + b _0225B726 +_0225B714: + add r2, #0x11 + cmp r3, r2 + bne _0225B726 +_0225B71A: + ldr r1, _0225B730 ; =0x0000213C + ldr r1, [r0, r1] + mov r0, #2 + lsl r0, r0, #8 + and r0, r1 + bx lr +_0225B726: + mov r0, #1 + bx lr + nop +_0225B72C: .word 0x000003DE +_0225B730: .word 0x0000213C + thumb_func_end ov16_0225B6C8 + + thumb_func_start ov16_0225B734 +ov16_0225B734: ; 0x0225B734 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + cmp r2, #0x1b + bne _0225B74A + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + ldr r0, _0225B800 ; =0x00002D64 + ldrb r4, [r1, r0] + b _0225B75E +_0225B74A: + cmp r2, #0x1c + bne _0225B75A + mov r0, #0xc0 + mul r0, r6 + add r1, r5, r0 + ldr r0, _0225B804 ; =0x00002D65 + ldrb r4, [r1, r0] + b _0225B75E +_0225B75A: + bl sub_02022974 +_0225B75E: + mov r0, #0xc0 + mul r0, r6 + mov r2, #0xb5 + add r1, r5, r0 + lsl r2, r2, #6 + ldrh r3, [r1, r2] + ldr r0, _0225B808 ; =0x000001ED + cmp r3, r0 + bne _0225B7FA + add r0, r2, #0 + add r0, #0x27 + ldrb r0, [r1, r0] + cmp r0, #0x79 + bne _0225B7FA + add r2, #0x78 + ldrh r1, [r1, r2] + add r0, r5, #0 + mov r2, #1 + bl ov16_0225B0FC + sub r0, #0x7e + cmp r0, #0xf + bhi _0225B7F8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225B798: ; jump table + .short _0225B7B8 - _0225B798 - 2 ; case 0 + .short _0225B7BC - _0225B798 - 2 ; case 1 + .short _0225B7C0 - _0225B798 - 2 ; case 2 + .short _0225B7C4 - _0225B798 - 2 ; case 3 + .short _0225B7C8 - _0225B798 - 2 ; case 4 + .short _0225B7CC - _0225B798 - 2 ; case 5 + .short _0225B7D0 - _0225B798 - 2 ; case 6 + .short _0225B7D4 - _0225B798 - 2 ; case 7 + .short _0225B7D8 - _0225B798 - 2 ; case 8 + .short _0225B7DC - _0225B798 - 2 ; case 9 + .short _0225B7E0 - _0225B798 - 2 ; case 10 + .short _0225B7E4 - _0225B798 - 2 ; case 11 + .short _0225B7E8 - _0225B798 - 2 ; case 12 + .short _0225B7EC - _0225B798 - 2 ; case 13 + .short _0225B7F0 - _0225B798 - 2 ; case 14 + .short _0225B7F4 - _0225B798 - 2 ; case 15 +_0225B7B8: + mov r4, #0xa + b _0225B7FA +_0225B7BC: + mov r4, #0xb + b _0225B7FA +_0225B7C0: + mov r4, #0xd + b _0225B7FA +_0225B7C4: + mov r4, #0xc + b _0225B7FA +_0225B7C8: + mov r4, #0xf + b _0225B7FA +_0225B7CC: + mov r4, #1 + b _0225B7FA +_0225B7D0: + mov r4, #3 + b _0225B7FA +_0225B7D4: + mov r4, #4 + b _0225B7FA +_0225B7D8: + mov r4, #2 + b _0225B7FA +_0225B7DC: + mov r4, #0xe + b _0225B7FA +_0225B7E0: + mov r4, #6 + b _0225B7FA +_0225B7E4: + mov r4, #5 + b _0225B7FA +_0225B7E8: + mov r4, #7 + b _0225B7FA +_0225B7EC: + mov r4, #0x10 + b _0225B7FA +_0225B7F0: + mov r4, #0x11 + b _0225B7FA +_0225B7F4: + mov r4, #8 + b _0225B7FA +_0225B7F8: + mov r4, #0 +_0225B7FA: + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_0225B800: .word 0x00002D64 +_0225B804: .word 0x00002D65 +_0225B808: .word 0x000001ED + thumb_func_end ov16_0225B734 + + thumb_func_start ov16_0225B80C +ov16_0225B80C: ; 0x0225B80C + lsl r1, r1, #3 + add r3, r0, r1 + mov r2, #0 + mov r0, #0x37 + add r1, r2, #0 + lsl r0, r0, #4 +_0225B818: + add r2, r2, #1 + strh r1, [r3, r0] + add r3, r3, #2 + cmp r2, #4 + blt _0225B818 + bx lr + thumb_func_end ov16_0225B80C + + thumb_func_start ov16_0225B824 +ov16_0225B824: ; 0x0225B824 + add r1, r0, r1 + mov r0, #0x39 + mov r2, #0 + lsl r0, r0, #4 + strb r2, [r1, r0] + bx lr + thumb_func_end ov16_0225B824 + + thumb_func_start ov16_0225B830 +ov16_0225B830: ; 0x0225B830 + lsl r1, r1, #1 + add r1, r0, r1 + mov r0, #0xe5 + mov r2, #0 + lsl r0, r0, #2 + strh r2, [r1, r0] + bx lr + ; .align 2, 0 + thumb_func_end ov16_0225B830 + + thumb_func_start ov16_0225B840 +ov16_0225B840: ; 0x0225B840 + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + mov r2, #0xff + mov ip, r2 + mov r2, #0xc0 + add r7, r5, #0 + mul r7, r2 + ldr r2, _0225B8DC ; =0x00002D67 + add r6, r1, r7 + add r4, r3, #0 + ldrb r3, [r6, r2] + cmp r3, #0x3b + beq _0225B89C + cmp r3, #0x24 + beq _0225B89C + cmp r3, #0x79 + beq _0225B89C + add r2, #0x25 + ldr r2, [r6, r2] + cmp r2, #0 + beq _0225B89C + mov r2, #0xc0 + mul r2, r4 + add r6, r1, r2 + ldr r2, _0225B8DC ; =0x00002D67 + add r2, #0x25 + ldr r2, [r6, r2] + cmp r2, #0 + beq _0225B89C + ldr r2, _0225B8DC ; =0x00002D67 + ldrb r2, [r6, r2] + cmp r2, #0x3b + beq _0225B89C + cmp r2, #0x24 + beq _0225B89C + cmp r2, #0x79 + beq _0225B89C + bl ov16_0223F4BC + mov r1, #1 + tst r0, r1 + beq _0225B898 + mov ip, r4 + b _0225B8D6 +_0225B898: + mov ip, r5 + b _0225B8D6 +_0225B89C: + cmp r3, #0x3b + beq _0225B8B6 + cmp r3, #0x24 + beq _0225B8B6 + ldr r0, _0225B8E0 ; =0x00002D8C + add r2, r1, r7 + ldr r0, [r2, r0] + cmp r0, #0 + beq _0225B8B6 + cmp r3, #0x79 + beq _0225B8B6 + mov ip, r5 + b _0225B8D6 +_0225B8B6: + mov r0, #0xc0 + mul r0, r4 + add r2, r1, r0 + ldr r0, _0225B8DC ; =0x00002D67 + ldrb r1, [r2, r0] + cmp r1, #0x3b + beq _0225B8D6 + cmp r1, #0x24 + beq _0225B8D6 + add r0, #0x25 + ldr r0, [r2, r0] + cmp r0, #0 + beq _0225B8D6 + cmp r1, #0x79 + beq _0225B8D6 + mov ip, r4 +_0225B8D6: + mov r0, ip + pop {r3, r4, r5, r6, r7, pc} + nop +_0225B8DC: .word 0x00002D67 +_0225B8E0: .word 0x00002D8C + thumb_func_end ov16_0225B840 + + thumb_func_start ov16_0225B8E4 +ov16_0225B8E4: ; 0x0225B8E4 + lsl r1, r1, #4 + add r1, r0, r1 + ldr r0, _0225B908 ; =0x000003DE + ldr r3, _0225B90C ; =0x0226EBBC + ldrh r1, [r1, r0] + mov r2, #0 +_0225B8F0: + ldrh r0, [r3] + cmp r0, r1 + bne _0225B8FA + mov r0, #1 + bx lr +_0225B8FA: + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #6 + blo _0225B8F0 + mov r0, #0 + bx lr + nop +_0225B908: .word 0x000003DE +_0225B90C: .word 0x0226EBBC + thumb_func_end ov16_0225B8E4 + + thumb_func_start ov16_0225B910 +ov16_0225B910: ; 0x0225B910 + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + ldr r2, _0225BA7C ; =0x00000137 + add r7, r0, #0 + add r4, r1, #0 + cmp r3, r2 + bgt _0225B928 + blt _0225B922 + b _0225BA24 +_0225B922: + cmp r3, #0xed + beq _0225B9CA + b _0225BA76 +_0225B928: + add r0, r2, #0 + add r0, #0x34 + cmp r3, r0 + bgt _0225B938 + add r2, #0x34 + cmp r3, r2 + beq _0225B940 + b _0225BA76 +_0225B938: + add r2, #0x8a + cmp r3, r2 + beq _0225B94C + b _0225BA76 +_0225B940: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02258B2C + add r5, r0, #0 + b _0225BA78 +_0225B94C: + add r0, r4, #0 + add r1, r6, #0 + bl ov16_02258AB8 + sub r0, #0x7e + cmp r0, #0xf + bhi _0225B9C6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225B966: ; jump table + .short _0225B9A6 - _0225B966 - 2 ; case 0 + .short _0225B9AA - _0225B966 - 2 ; case 1 + .short _0225B9B2 - _0225B966 - 2 ; case 2 + .short _0225B9AE - _0225B966 - 2 ; case 3 + .short _0225B9BA - _0225B966 - 2 ; case 4 + .short _0225B986 - _0225B966 - 2 ; case 5 + .short _0225B98E - _0225B966 - 2 ; case 6 + .short _0225B992 - _0225B966 - 2 ; case 7 + .short _0225B98A - _0225B966 - 2 ; case 8 + .short _0225B9B6 - _0225B966 - 2 ; case 9 + .short _0225B99A - _0225B966 - 2 ; case 10 + .short _0225B996 - _0225B966 - 2 ; case 11 + .short _0225B99E - _0225B966 - 2 ; case 12 + .short _0225B9BE - _0225B966 - 2 ; case 13 + .short _0225B9C2 - _0225B966 - 2 ; case 14 + .short _0225B9A2 - _0225B966 - 2 ; case 15 +_0225B986: + mov r5, #1 + b _0225BA78 +_0225B98A: + mov r5, #2 + b _0225BA78 +_0225B98E: + mov r5, #3 + b _0225BA78 +_0225B992: + mov r5, #4 + b _0225BA78 +_0225B996: + mov r5, #5 + b _0225BA78 +_0225B99A: + mov r5, #6 + b _0225BA78 +_0225B99E: + mov r5, #7 + b _0225BA78 +_0225B9A2: + mov r5, #8 + b _0225BA78 +_0225B9A6: + mov r5, #0xa + b _0225BA78 +_0225B9AA: + mov r5, #0xb + b _0225BA78 +_0225B9AE: + mov r5, #0xc + b _0225BA78 +_0225B9B2: + mov r5, #0xd + b _0225BA78 +_0225B9B6: + mov r5, #0xe + b _0225BA78 +_0225B9BA: + mov r5, #0xf + b _0225BA78 +_0225B9BE: + mov r5, #0x10 + b _0225BA78 +_0225B9C2: + mov r5, #0x11 + b _0225BA78 +_0225B9C6: + mov r5, #0 + b _0225BA78 +_0225B9CA: + ldr r0, _0225BA80 ; =0x00002D54 + add r1, r4, r0 + mov r0, #0xc0 + mul r0, r6 + ldr r4, [r1, r0] + lsl r0, r4, #2 + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r5, r0, #0x1a + lsl r0, r4, #7 + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r3, r0, #0x1b + lsl r0, r4, #0xc + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r2, r0, #0x1c + lsl r0, r4, #0x11 + lsr r0, r0, #0x1b + lsl r0, r0, #0x1f + lsr r1, r0, #0x1d + lsl r0, r4, #0x1b + lsl r4, r4, #0x16 + lsr r4, r4, #0x1b + lsr r6, r0, #0x1b + mov r0, #1 + lsl r4, r4, #0x1f + and r0, r6 + lsr r4, r4, #0x1e + orr r0, r4 + orr r0, r1 + orr r0, r2 + orr r0, r3 + add r1, r5, #0 + orr r1, r0 + mov r0, #0xf + mul r0, r1 + mov r1, #0x3f + bl sub_020E1F6C + add r5, r0, #1 + cmp r5, #9 + blt _0225BA78 + add r5, r5, #1 + b _0225BA78 +_0225BA24: + mov r2, #0xd + str r2, [sp] + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225BA78 + mov r0, #0x4c + str r0, [sp] + add r0, r7, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225BA78 + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, _0225BA84 ; =0x000080FF + tst r1, r0 + beq _0225BA78 + mov r1, #3 + tst r1, r0 + beq _0225BA5C + mov r5, #0xb +_0225BA5C: + mov r1, #0xc + tst r1, r0 + beq _0225BA64 + mov r5, #5 +_0225BA64: + mov r1, #0x30 + tst r1, r0 + beq _0225BA6C + mov r5, #0xa +_0225BA6C: + mov r1, #0xc0 + tst r0, r1 + beq _0225BA78 + mov r5, #0xf + b _0225BA78 +_0225BA76: + mov r5, #0 +_0225BA78: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225BA7C: .word 0x00000137 +_0225BA80: .word 0x00002D54 +_0225BA84: .word 0x000080FF + thumb_func_end ov16_0225B910 + + thumb_func_start ov16_0225BA88 +ov16_0225BA88: ; 0x0225BA88 + push {r4, r5, r6, r7, lr} + sub sp, #0x94 + str r1, [sp, #0x18] + add r7, r0, #0 + bl ov16_0223DF10 + add r5, r0, #0 + ldr r0, [sp, #0x18] + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + bne _0225BAB4 + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + beq _0225BAB8 +_0225BAB4: + str r4, [sp, #0x44] + b _0225BAC6 +_0225BAB8: + ldr r1, [sp, #0x18] + add r0, r7, #0 + bl ov16_0223E258 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x44] +_0225BAC6: + ldr r2, [sp, #0x18] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_02257028 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + ldr r1, [sp, #0x18] + add r0, r7, #0 + bl ov16_0223DF60 + str r0, [sp, #0x40] + mov r0, #0 + str r0, [sp, #0x50] + add r0, r5, r4 + str r0, [sp, #0x34] + ldr r0, [sp, #0x44] + add r0, r5, r0 + str r0, [sp, #0x30] +_0225BAEC: + mov r0, #0 + str r0, [sp, #0x48] + mov r0, #6 + str r0, [sp, #0x38] + ldr r0, [sp, #0x40] + ldr r4, [sp, #0x48] + cmp r0, #0 + ble _0225BBF0 +_0225BAFC: + ldr r1, [sp, #0x18] + add r0, r7, #0 + add r2, r4, #0 + bl ov16_0223DFAC + mov r1, #0xae + mov r2, #0 + str r0, [sp, #0x68] + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + beq _0225BBD8 + ldr r0, _0225BE14 ; =0x000001EE + cmp r1, r0 + beq _0225BBD8 + ldr r0, [sp, #0x68] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0225BBD8 + add r0, r4, #0 + bl sub_020787CC + ldr r1, [sp, #0x50] + tst r0, r1 + bne _0225BBD8 + ldr r1, [sp, #0x34] + ldr r0, _0225BE18 ; =0x0000219C + ldrb r0, [r1, r0] + cmp r4, r0 + beq _0225BBD8 + ldr r1, [sp, #0x30] + ldr r0, _0225BE18 ; =0x0000219C + ldrb r0, [r1, r0] + cmp r4, r0 + beq _0225BBD8 + ldr r1, [sp, #0x34] + ldr r0, _0225BE1C ; =0x000021A4 + ldrb r0, [r1, r0] + cmp r4, r0 + beq _0225BBD8 + ldr r1, [sp, #0x30] + ldr r0, _0225BE1C ; =0x000021A4 + ldrb r0, [r1, r0] + cmp r4, r0 + beq _0225BBD8 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x60] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x5c] + ldr r0, [sp, #0x68] + mov r1, #0xb1 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x58] + ldr r0, [sp, #0x68] + mov r1, #0xb2 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x54] + ldr r0, [sp, #0x58] + ldr r1, [sp, #0x60] + ldr r2, [sp, #0x5c] + bl ov16_022558CC + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x4c] + ldr r0, [sp, #0x54] + ldr r1, [sp, #0x60] + ldr r2, [sp, #0x5c] + bl ov16_022558CC + ldr r1, [sp, #0x4c] + add r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x4c] + ldr r1, [sp, #0x48] + cmp r1, r0 + bhs _0225BBE8 + ldr r0, [sp, #0x4c] + str r0, [sp, #0x48] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x38] + b _0225BBE8 +_0225BBD8: + add r0, r4, #0 + bl sub_020787CC + ldr r1, [sp, #0x50] + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x50] +_0225BBE8: + ldr r0, [sp, #0x40] + add r4, r4, #1 + cmp r4, r0 + blt _0225BAFC +_0225BBF0: + ldr r0, [sp, #0x38] + cmp r0, #6 + beq _0225BCB8 + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x38] + add r0, r7, #0 + bl ov16_0223DFAC + add r4, r0, #0 + mov r0, #0 + str r0, [sp, #0x20] +_0225BC06: + ldr r1, [sp, #0x20] + add r0, r4, #0 + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x3c] + ldr r3, [sp, #0x3c] + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov16_0225BE3C + str r0, [sp, #0x6c] + ldr r0, [sp, #0x3c] + cmp r0, #0 + beq _0225BC90 + mov r0, #0 + str r0, [sp, #0x90] + add r0, r4, #0 + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x70] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02255A4C + str r0, [sp, #0x74] + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02258AB8 + str r0, [sp, #0x78] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1b + mov r3, #0 + bl ov16_02252060 + str r0, [sp, #0x7c] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0x1c + mov r3, #0 + bl ov16_02252060 + ldr r1, [sp, #0x74] + ldr r2, [sp, #0x6c] + str r1, [sp] + ldr r1, [sp, #0x78] + ldr r3, [sp, #0x70] + str r1, [sp, #4] + ldr r1, [sp, #0x7c] + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, sp, #0x90 + str r0, [sp, #0x10] + ldr r1, [sp, #0x3c] + add r0, r5, #0 + bl ov16_022552D4 + ldr r1, [sp, #0x90] + mov r0, #2 + tst r0, r1 + bne _0225BC9A +_0225BC90: + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #4 + blt _0225BC06 +_0225BC9A: + ldr r0, [sp, #0x20] + cmp r0, #4 + bne _0225BCB2 + ldr r0, [sp, #0x38] + bl sub_020787CC + ldr r1, [sp, #0x50] + orr r0, r1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x50] + b _0225BCBC +_0225BCB2: + ldr r0, [sp, #0x38] + add sp, #0x94 + pop {r4, r5, r6, r7, pc} +_0225BCB8: + mov r0, #0x3f + str r0, [sp, #0x50] +_0225BCBC: + ldr r0, [sp, #0x50] + cmp r0, #0x3f + beq _0225BCC4 + b _0225BAEC +_0225BCC4: + mov r0, #0 + str r0, [sp, #0x28] + mov r0, #6 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + str r0, [sp, #0x24] + ldr r0, [sp, #0x40] + cmp r0, #0 + bgt _0225BCD8 + b _0225BE0C +_0225BCD8: + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x24] + add r0, r7, #0 + bl ov16_0223DFAC + mov r1, #0xae + mov r2, #0 + str r0, [sp, #0x1c] + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + beq _0225BCF8 + ldr r0, _0225BE14 ; =0x000001EE + cmp r1, r0 + bne _0225BCFA +_0225BCF8: + b _0225BDFE +_0225BCFA: + ldr r0, [sp, #0x1c] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0225BDFE + ldr r0, _0225BE18 ; =0x0000219C + ldr r1, [sp, #0x34] + ldrb r2, [r1, r0] + ldr r1, [sp, #0x24] + cmp r1, r2 + beq _0225BDFE + ldr r1, [sp, #0x30] + ldrb r2, [r1, r0] + ldr r1, [sp, #0x24] + cmp r1, r2 + beq _0225BDFE + add r2, r0, #0 + ldr r1, [sp, #0x34] + add r2, #8 + ldrb r2, [r1, r2] + ldr r1, [sp, #0x24] + cmp r1, r2 + beq _0225BDFE + ldr r1, [sp, #0x30] + add r0, #8 + ldrb r1, [r1, r0] + ldr r0, [sp, #0x24] + cmp r0, r1 + beq _0225BDFE + mov r0, #0 + str r0, [sp, #0x64] + ldr r0, [sp, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x84] + ldr r0, [sp, #0x24] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x88] +_0225BD4C: + ldr r1, [sp, #0x64] + ldr r0, [sp, #0x1c] + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x8c] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x8c] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0225BE3C + str r0, [sp, #0x80] + ldr r0, [sp, #0x8c] + cmp r0, #0 + beq _0225BDE6 + lsl r0, r0, #4 + add r1, r5, r0 + ldr r0, _0225BE20 ; =0x000003E1 + ldrb r0, [r1, r0] + cmp r0, #1 + beq _0225BDE6 + add r0, r7, #0 + add r1, r6, #0 + bl ov16_0223E208 + add r3, r0, #0 + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r5, r0] + lsl r3, r3, #2 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x84] + add r4, r5, r3 + str r0, [sp, #0xc] + mov r3, #0x6f + str r6, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + lsl r3, r3, #2 + ldr r2, [sp, #0x8c] + ldr r3, [r4, r3] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0225A280 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + mov r0, #0 + str r0, [sp, #0x90] + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x80] + str r0, [sp] + str r6, [sp, #4] + str r1, [sp, #8] + add r0, sp, #0x90 + str r0, [sp, #0xc] + ldr r2, [sp, #0x8c] + add r0, r7, #0 + add r1, r5, #0 + bl ov16_02254FA8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x4c] + ldr r1, [sp, #0x90] + ldr r0, _0225BE24 ; =0x00140808 + tst r0, r1 + beq _0225BDE6 + mov r0, #0 + str r0, [sp, #0x4c] +_0225BDE6: + ldr r1, [sp, #0x28] + ldr r0, [sp, #0x4c] + cmp r1, r0 + bhs _0225BDF4 + str r0, [sp, #0x28] + ldr r0, [sp, #0x88] + str r0, [sp, #0x2c] +_0225BDF4: + ldr r0, [sp, #0x64] + add r0, r0, #1 + str r0, [sp, #0x64] + cmp r0, #4 + blt _0225BD4C +_0225BDFE: + ldr r0, [sp, #0x24] + add r1, r0, #1 + ldr r0, [sp, #0x40] + str r1, [sp, #0x24] + cmp r1, r0 + bge _0225BE0C + b _0225BCD8 +_0225BE0C: + ldr r0, [sp, #0x2c] + add sp, #0x94 + pop {r4, r5, r6, r7, pc} + nop +_0225BE14: .word 0x000001EE +_0225BE18: .word 0x0000219C +_0225BE1C: .word 0x000021A4 +_0225BE20: .word 0x000003E1 +_0225BE24: .word 0x00140808 + thumb_func_end ov16_0225BA88 + + thumb_func_start ov16_0225BE28 +ov16_0225BE28: ; 0x0225BE28 + push {r4, lr} + add r4, r1, #0 + bl ov16_0223DF10 + add r1, r0, r4 + ldr r0, _0225BE38 ; =0x000021A4 + ldrb r0, [r1, r0] + pop {r4, pc} + ; .align 2, 0 +_0225BE38: .word 0x000021A4 + thumb_func_end ov16_0225BE28 + + thumb_func_start ov16_0225BE3C +ov16_0225BE3C: ; 0x0225BE3C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r2, _0225BFF4 ; =0x00000137 + add r7, r0, #0 + add r6, r1, #0 + cmp r3, r2 + bgt _0225BE56 + blt _0225BE50 + b _0225BF9A +_0225BE50: + cmp r3, #0xed + beq _0225BF18 + b _0225BFEC +_0225BE56: + add r0, r2, #0 + add r0, #0x34 + cmp r3, r0 + bgt _0225BE66 + add r2, #0x34 + cmp r3, r2 + beq _0225BE6E + b _0225BFEC +_0225BE66: + add r2, #0x8a + cmp r3, r2 + beq _0225BE8A + b _0225BFEC +_0225BE6E: + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + mov r2, #0xc + bl ov16_0225B0FC + add r5, r0, #0 + b _0225BFEE +_0225BE8A: + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + mov r2, #1 + bl ov16_0225B0FC + sub r0, #0x7e + cmp r0, #0xf + bhi _0225BF14 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225BEB4: ; jump table + .short _0225BEF4 - _0225BEB4 - 2 ; case 0 + .short _0225BEF8 - _0225BEB4 - 2 ; case 1 + .short _0225BF00 - _0225BEB4 - 2 ; case 2 + .short _0225BEFC - _0225BEB4 - 2 ; case 3 + .short _0225BF08 - _0225BEB4 - 2 ; case 4 + .short _0225BED4 - _0225BEB4 - 2 ; case 5 + .short _0225BEDC - _0225BEB4 - 2 ; case 6 + .short _0225BEE0 - _0225BEB4 - 2 ; case 7 + .short _0225BED8 - _0225BEB4 - 2 ; case 8 + .short _0225BF04 - _0225BEB4 - 2 ; case 9 + .short _0225BEE8 - _0225BEB4 - 2 ; case 10 + .short _0225BEE4 - _0225BEB4 - 2 ; case 11 + .short _0225BEEC - _0225BEB4 - 2 ; case 12 + .short _0225BF0C - _0225BEB4 - 2 ; case 13 + .short _0225BF10 - _0225BEB4 - 2 ; case 14 + .short _0225BEF0 - _0225BEB4 - 2 ; case 15 +_0225BED4: + mov r5, #1 + b _0225BFEE +_0225BED8: + mov r5, #2 + b _0225BFEE +_0225BEDC: + mov r5, #3 + b _0225BFEE +_0225BEE0: + mov r5, #4 + b _0225BFEE +_0225BEE4: + mov r5, #5 + b _0225BFEE +_0225BEE8: + mov r5, #6 + b _0225BFEE +_0225BEEC: + mov r5, #7 + b _0225BFEE +_0225BEF0: + mov r5, #8 + b _0225BFEE +_0225BEF4: + mov r5, #0xa + b _0225BFEE +_0225BEF8: + mov r5, #0xb + b _0225BFEE +_0225BEFC: + mov r5, #0xc + b _0225BFEE +_0225BF00: + mov r5, #0xd + b _0225BFEE +_0225BF04: + mov r5, #0xe + b _0225BFEE +_0225BF08: + mov r5, #0xf + b _0225BFEE +_0225BF0C: + mov r5, #0x10 + b _0225BFEE +_0225BF10: + mov r5, #0x11 + b _0225BFEE +_0225BF14: + mov r5, #0 + b _0225BFEE +_0225BF18: + add r0, r4, #0 + mov r1, #0x4b + mov r2, #0 + bl sub_02074470 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0x4a + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + add r0, r4, #0 + mov r1, #0x49 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #0x48 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x46 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0x47 + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + lsl r2, r6, #0x1f + lsl r0, r5, #0x1f + lsr r5, r2, #0x1b + lsl r2, r7, #0x1f + lsr r4, r2, #0x1c + ldr r2, [sp, #4] + lsl r1, r1, #0x1f + lsl r2, r2, #0x1f + lsr r3, r2, #0x1d + ldr r2, [sp, #8] + mov r6, #1 + and r2, r6 + lsr r1, r1, #0x1e + orr r1, r2 + orr r1, r3 + orr r1, r4 + lsr r0, r0, #0x1a + orr r1, r5 + orr r1, r0 + mov r0, #0xf + mul r0, r1 + mov r1, #0x3f + bl sub_020E1F6C + add r5, r0, #1 + cmp r5, #9 + blt _0225BFEE + add r5, r5, #1 + b _0225BFEE +_0225BF9A: + mov r2, #0xd + str r2, [sp] + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225BFEE + mov r0, #0x4c + str r0, [sp] + add r0, r7, #0 + add r1, r6, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _0225BFEE + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r6, r0] + ldr r1, _0225BFF8 ; =0x000080FF + tst r1, r0 + beq _0225BFEE + mov r1, #3 + tst r1, r0 + beq _0225BFD2 + mov r5, #0xb +_0225BFD2: + mov r1, #0xc + tst r1, r0 + beq _0225BFDA + mov r5, #5 +_0225BFDA: + mov r1, #0x30 + tst r1, r0 + beq _0225BFE2 + mov r5, #0xa +_0225BFE2: + mov r1, #0xc0 + tst r0, r1 + beq _0225BFEE + mov r5, #0xf + b _0225BFEE +_0225BFEC: + mov r5, #0 +_0225BFEE: + add r0, r5, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225BFF4: .word 0x00000137 +_0225BFF8: .word 0x000080FF + thumb_func_end ov16_0225BE3C + + .rodata + + + .global Unk_ov16_0226EBA0 +Unk_ov16_0226EBA0: ; 0x0226EBA0 + .incbin "incbin/overlay16_rodata.bin", 0x944, 0x94C - 0x944 + + .global Unk_ov16_0226EBA8 +Unk_ov16_0226EBA8: ; 0x0226EBA8 + .incbin "incbin/overlay16_rodata.bin", 0x94C, 0x954 - 0x94C + + .global Unk_ov16_0226EBB0 +Unk_ov16_0226EBB0: ; 0x0226EBB0 + .incbin "incbin/overlay16_rodata.bin", 0x954, 0x960 - 0x954 + + .global Unk_ov16_0226EBBC +Unk_ov16_0226EBBC: ; 0x0226EBBC + .incbin "incbin/overlay16_rodata.bin", 0x960, 0x96C - 0x960 + + .global Unk_ov16_0226EBC8 +Unk_ov16_0226EBC8: ; 0x0226EBC8 + .incbin "incbin/overlay16_rodata.bin", 0x96C, 0x978 - 0x96C + + .global Unk_ov16_0226EBD4 +Unk_ov16_0226EBD4: ; 0x0226EBD4 + .incbin "incbin/overlay16_rodata.bin", 0x978, 0x984 - 0x978 + + .global Unk_ov16_0226EBE0 +Unk_ov16_0226EBE0: ; 0x0226EBE0 + .incbin "incbin/overlay16_rodata.bin", 0x984, 0x99E - 0x984 + + .global Unk_ov16_0226EBFA +Unk_ov16_0226EBFA: ; 0x0226EBFA + .incbin "incbin/overlay16_rodata.bin", 0x99E, 0x9BA - 0x99E + + .global Unk_ov16_0226EC16 +Unk_ov16_0226EC16: ; 0x0226EC16 + .incbin "incbin/overlay16_rodata.bin", 0x9BA, 0x9D8 - 0x9BA + + .global Unk_ov16_0226EC34 +Unk_ov16_0226EC34: ; 0x0226EC34 + .incbin "incbin/overlay16_rodata.bin", 0x9D8, 0xA00 - 0x9D8 + + .global Unk_ov16_0226EC5C +Unk_ov16_0226EC5C: ; 0x0226EC5C + .incbin "incbin/overlay16_rodata.bin", 0xA00, 0xA36 - 0xA00 + + .global Unk_ov16_0226EC92 +Unk_ov16_0226EC92: ; 0x0226EC92 + .incbin "incbin/overlay16_rodata.bin", 0xA36, 0xA78 - 0xA36 + + .global Unk_ov16_0226ECD4 +Unk_ov16_0226ECD4: ; 0x0226ECD4 + .incbin "incbin/overlay16_rodata.bin", 0xA78, 0xBC8 - 0xA78 + + .global Unk_ov16_0226EE24 +Unk_ov16_0226EE24: ; 0x0226EE24 + .incbin "incbin/overlay16_rodata.bin", 0xBC8, 0x244 + + + .data + + + .global Unk_ov16_02270B8C +Unk_ov16_02270B8C: ; 0x02270B8C + .incbin "incbin/overlay16_data.bin", 0x6C, 0x18 + diff --git a/asm/ov16_0225BFFC.s b/asm/ov16_0225BFFC.s new file mode 100644 index 000000000..69cbd99ec --- /dev/null +++ b/asm/ov16_0225BFFC.s @@ -0,0 +1,1601 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0225BFFC +ov16_0225BFFC: ; 0x0225BFFC + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x6b + mov r0, #5 + lsl r1, r1, #2 + bl sub_02018144 + add r4, r0, #0 + mov r2, #0x6b + mov r0, #0 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_020C4BB8 + mov r0, #0x65 + ldrb r1, [r5] + lsl r0, r0, #2 + strb r1, [r4, r0] + ldrb r1, [r5, #1] + add r0, r0, #1 + strb r1, [r4, r0] + mov r0, #0x93 + mov r1, #5 + bl sub_02006C24 + mov r1, #0x69 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0225BFFC + + thumb_func_start ov16_0225C038 +ov16_0225C038: ; 0x0225C038 + push {r4, r5, r6, lr} + sub sp, #0x28 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + bne _0225C0D0 + sub r1, #0x8b + ldrb r1, [r4, r1] + mov r0, #1 + tst r0, r1 + beq _0225C064 + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + beq _0225C0D0 +_0225C064: + ldr r0, _0225C0D4 ; =0x00000195 + ldr r1, _0225C0D8 ; =0x0226F174 + ldrb r2, [r4, r0] + sub r0, r0, #1 + ldrb r1, [r1, r2] + str r1, [sp] + mov r1, #5 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + ldrb r0, [r4, r0] + str r0, [sp, #0xc] + add r0, r5, #0 + str r6, [sp, #0x10] + bl ov16_0223E010 + str r0, [sp, #0x1c] + add r0, r5, #0 + bl ov16_0223E064 + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x18] + mov r0, #1 + str r0, [sp, #0x14] + add r0, sp, #0 + bl ov12_02237728 + add r1, r4, #0 + add r1, #0x88 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x64 + bl ov12_02237E34 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #2 + bl ov12_02237E40 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0 + bl ov12_02237E0C + add r4, #0x88 + ldr r0, [r4, #0] + mov r1, #0 + bl ov12_02237E30 +_0225C0D0: + add sp, #0x28 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225C0D4: .word 0x00000195 +_0225C0D8: .word 0x0226F174 + thumb_func_end ov16_0225C038 + + thumb_func_start ov16_0225C0DC +ov16_0225C0DC: ; 0x0225C0DC + push {r3, lr} + add r2, r1, #0 + add r2, #0x94 + ldrb r2, [r2] + cmp r2, #0 + beq _0225C0FE + mov r2, #0x6a + mov r3, #0 + lsl r2, r2, #2 + strb r3, [r1, r2] + add r2, r1, #0 + add r2, #0x94 + ldrb r2, [r2] + lsl r3, r2, #2 + ldr r2, _0225C100 ; =0x0226F068 + ldr r2, [r2, r3] + blx r2 +_0225C0FE: + pop {r3, pc} + ; .align 2, 0 +_0225C100: .word 0x0226F068 + thumb_func_end ov16_0225C0DC + + thumb_func_start ov16_0225C104 +ov16_0225C104: ; 0x0225C104 + push {r4, lr} + add r4, r1, #0 + cmp r2, #2 + beq _0225C114 + add r0, r4, #0 + add r0, #0x28 + bl ov16_02267360 +_0225C114: + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _0225C11E + bl sub_0200D0F4 +_0225C11E: + add r0, r4, #0 + bl ov16_022647D8 + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02006CA8 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C104 + + thumb_func_start ov16_0225C138 +ov16_0225C138: ; 0x0225C138 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0225C138 + + thumb_func_start ov16_0225C13C +ov16_0225C13C: ; 0x0225C13C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r1, #0x98 + ldr r1, [r1, #0] + add r5, r0, #0 + bl ov16_0223F4F4 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225CBB8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #1 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0225C13C + + thumb_func_start ov16_0225C168 +ov16_0225C168: ; 0x0225C168 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225CBDC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C168 + + thumb_func_start ov16_0225C17C +ov16_0225C17C: ; 0x0225C17C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225CE1C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C17C + + thumb_func_start ov16_0225C190 +ov16_0225C190: ; 0x0225C190 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225CF70 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C190 + + thumb_func_start ov16_0225C1A4 +ov16_0225C1A4: ; 0x0225C1A4 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D118 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C1A4 + + thumb_func_start ov16_0225C1B8 +ov16_0225C1B8: ; 0x0225C1B8 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D1C4 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C1B8 + + thumb_func_start ov16_0225C1CC +ov16_0225C1CC: ; 0x0225C1CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x20] + bl sub_02007DC8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #7 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C1CC + + thumb_func_start ov16_0225C1F0 +ov16_0225C1F0: ; 0x0225C1F0 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D228 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C1F0 + + thumb_func_start ov16_0225C204 +ov16_0225C204: ; 0x0225C204 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D360 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C204 + + thumb_func_start ov16_0225C218 +ov16_0225C218: ; 0x0225C218 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225D3CC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C218 + + thumb_func_start ov16_0225C228 +ov16_0225C228: ; 0x0225C228 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D414 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C228 + + thumb_func_start ov16_0225C23C +ov16_0225C23C: ; 0x0225C23C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D4A8 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C23C + + thumb_func_start ov16_0225C250 +ov16_0225C250: ; 0x0225C250 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225D570 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C250 + + thumb_func_start ov16_0225C260 +ov16_0225C260: ; 0x0225C260 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r4, #0 + add r6, #0x94 + add r1, r6, #0 + add r1, #0x29 + ldrb r1, [r1] + add r5, r0, #0 + bl ov16_0223F290 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0225D5B8 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C260 + + thumb_func_start ov16_0225C288 +ov16_0225C288: ; 0x0225C288 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D698 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C288 + + thumb_func_start ov16_0225C29C +ov16_0225C29C: ; 0x0225C29C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D708 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C29C + + thumb_func_start ov16_0225C2B0 +ov16_0225C2B0: ; 0x0225C2B0 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D794 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C2B0 + + thumb_func_start ov16_0225C2C4 +ov16_0225C2C4: ; 0x0225C2C4 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D840 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C2C4 + + thumb_func_start ov16_0225C2D8 +ov16_0225C2D8: ; 0x0225C2D8 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D8AC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C2D8 + + thumb_func_start ov16_0225C2EC +ov16_0225C2EC: ; 0x0225C2EC + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D8F0 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C2EC + + thumb_func_start ov16_0225C300 +ov16_0225C300: ; 0x0225C300 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D958 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C300 + + thumb_func_start ov16_0225C314 +ov16_0225C314: ; 0x0225C314 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225D9A8 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C314 + + thumb_func_start ov16_0225C328 +ov16_0225C328: ; 0x0225C328 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x20] + mov r1, #6 + bl sub_020080C0 + cmp r0, #1 + bne _0225C34A + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x17 + bl ov16_02266ABC + b _0225C352 +_0225C34A: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225DA44 +_0225C352: + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C328 + + thumb_func_start ov16_0225C35C +ov16_0225C35C: ; 0x0225C35C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DA74 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C35C + + thumb_func_start ov16_0225C370 +ov16_0225C370: ; 0x0225C370 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DB00 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C370 + + thumb_func_start ov16_0225C384 +ov16_0225C384: ; 0x0225C384 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DB74 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C384 + + thumb_func_start ov16_0225C398 +ov16_0225C398: ; 0x0225C398 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DC4C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C398 + + thumb_func_start ov16_0225C3AC +ov16_0225C3AC: ; 0x0225C3AC + push {r4, lr} + add r4, r1, #0 + bl ov16_0225DC7C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C3AC + + thumb_func_start ov16_0225C3BC +ov16_0225C3BC: ; 0x0225C3BC + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DCB0 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C3BC + + thumb_func_start ov16_0225C3D0 +ov16_0225C3D0: ; 0x0225C3D0 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DD44 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C3D0 + + thumb_func_start ov16_0225C3E4 +ov16_0225C3E4: ; 0x0225C3E4 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DD7C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C3E4 + + thumb_func_start ov16_0225C3F8 +ov16_0225C3F8: ; 0x0225C3F8 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DDD8 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C3F8 + + thumb_func_start ov16_0225C40C +ov16_0225C40C: ; 0x0225C40C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DE30 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C40C + + thumb_func_start ov16_0225C420 +ov16_0225C420: ; 0x0225C420 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225DE88 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C420 + + thumb_func_start ov16_0225C430 +ov16_0225C430: ; 0x0225C430 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DEDC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C430 + + thumb_func_start ov16_0225C444 +ov16_0225C444: ; 0x0225C444 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225DF34 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C444 + + thumb_func_start ov16_0225C454 +ov16_0225C454: ; 0x0225C454 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225DF6C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C454 + + thumb_func_start ov16_0225C468 +ov16_0225C468: ; 0x0225C468 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E008 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C468 + + thumb_func_start ov16_0225C47C +ov16_0225C47C: ; 0x0225C47C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + mov r2, #0x65 + add r6, #0x94 + lsl r2, r2, #2 + str r1, [sp, #4] + ldrb r1, [r1, r2] + ldrb r2, [r6, #1] + str r0, [sp] + lsl r2, r2, #0x1c + lsr r2, r2, #0x1c + bl ov16_0223DFAC + add r7, r0, #0 + mov r0, #2 + ldr r1, [r6, #0x1c] + lsl r0, r0, #0x14 + tst r0, r1 + bne _0225C4E4 + add r0, r6, #0 + add r5, r6, #0 + str r0, [sp, #8] + add r0, #0x16 + mov r4, #0 + add r5, #0xe + str r0, [sp, #8] +_0225C4B2: + add r0, r4, #0 + bl sub_020787CC + ldrb r1, [r6, #1] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1c + tst r0, r1 + bne _0225C4DC + add r1, r4, #0 + add r0, r7, #0 + add r1, #0x36 + add r2, r5, #0 + bl sub_02074B30 + ldr r2, [sp, #8] + add r1, r4, #0 + add r0, r7, #0 + add r1, #0x3a + add r2, r2, r4 + bl sub_02074B30 +_0225C4DC: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _0225C4B2 +_0225C4E4: + ldrb r0, [r6, #1] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + bl sub_020787CC + ldr r1, [r6, #8] + tst r0, r1 + bne _0225C500 + add r2, r6, #0 + add r0, r7, #0 + mov r1, #6 + add r2, #0xc + bl sub_02074B30 +_0225C500: + add r0, r7, #0 + mov r1, #0xa3 + add r2, r6, #2 + bl sub_02074B30 + add r0, r7, #0 + mov r1, #0xa0 + add r2, r6, #4 + bl sub_02074B30 + ldrh r0, [r6, #0x2a] + cmp r0, #0 + beq _0225C526 + add r2, r6, #0 + add r0, r7, #0 + mov r1, #0x70 + add r2, #0x20 + bl sub_02074B30 +_0225C526: + ldrh r0, [r6, #0x28] + cmp r0, #0 + beq _0225C53E + add r2, r6, #0 + add r0, r7, #0 + mov r1, #0xa + add r2, #0x24 + bl sub_02074B30 + add r0, r7, #0 + bl sub_0207418C +_0225C53E: + mov r2, #0x65 + ldr r1, [sp, #4] + lsl r2, r2, #2 + ldrb r1, [r1, r2] + ldrb r2, [r6] + ldr r0, [sp] + bl ov16_02266ABC + ldr r0, [sp, #4] + bl ov16_0225CBB0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_0225C47C + + thumb_func_start ov16_0225C558 +ov16_0225C558: ; 0x0225C558 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223DF0C + add r6, r0, #0 + add r0, r5, #0 + bl ov16_0223E02C + ldr r2, _0225C5A8 ; =0x00000196 + ldrb r1, [r4, r2] + cmp r1, #0 + bne _0225C58C + mov r1, #8 + and r1, r6 + bne _0225C584 + cmp r1, #0 + bne _0225C58C + sub r1, r2, #1 + ldrb r1, [r4, r1] + cmp r1, #4 + beq _0225C58C +_0225C584: + ldr r1, _0225C5AC ; =0xFFFFF300 + mov r2, #0 + bl ov16_0226947C +_0225C58C: + mov r1, #0x65 + add r2, r4, #0 + lsl r1, r1, #2 + add r2, #0x94 + ldrb r1, [r4, r1] + ldrb r2, [r2] + add r0, r5, #0 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + nop +_0225C5A8: .word 0x00000196 +_0225C5AC: .word 0xFFFFF300 + thumb_func_end ov16_0225C558 + + thumb_func_start ov16_0225C5B0 +ov16_0225C5B0: ; 0x0225C5B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x28 + bl ov16_022675AC + add r0, r4, #0 + bl ov16_022647D8 + mov r1, #0x65 + add r2, r4, #0 + lsl r1, r1, #2 + add r2, #0x94 + ldrb r1, [r4, r1] + ldrb r2, [r2] + add r0, r5, #0 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C5B0 + + thumb_func_start ov16_0225C5E0 +ov16_0225C5E0: ; 0x0225C5E0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r1, #0 + mov r1, #0 + str r1, [sp, #8] + mov r1, #0x65 + lsl r1, r1, #2 + add r4, r7, #0 + ldrb r1, [r7, r1] + str r0, [sp] + add r4, #0x94 + bl ov16_0223DF60 + mov r5, #0 + str r0, [sp, #4] + cmp r0, #0 + ble _0225C642 +_0225C602: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r7, r1] + ldr r0, [sp] + add r2, r5, #0 + bl ov16_0223DFAC + ldrb r1, [r4, #1] + add r6, r0, #0 + cmp r1, #0x68 + bne _0225C61C + mov r0, #0 + b _0225C624 +_0225C61C: + mov r1, #0xa + mov r2, #0 + bl sub_02074470 +_0225C624: + ldrh r1, [r4, #2] + cmp r1, #0xd7 + bne _0225C630 + bne _0225C63A + cmp r0, #0x2b + beq _0225C63A +_0225C630: + add r0, r6, #0 + mov r1, #0xa0 + add r2, sp, #8 + bl sub_02074B30 +_0225C63A: + ldr r0, [sp, #4] + add r5, r5, #1 + cmp r5, r0 + blt _0225C602 +_0225C642: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r7, r1] + ldrb r2, [r4] + ldr r0, [sp] + bl ov16_02266ABC + add r0, r7, #0 + bl ov16_0225CBB0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C5E0 + + thumb_func_start ov16_0225C65C +ov16_0225C65C: ; 0x0225C65C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E0BC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C65C + + thumb_func_start ov16_0225C670 +ov16_0225C670: ; 0x0225C670 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E0F4 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C670 + + thumb_func_start ov16_0225C684 +ov16_0225C684: ; 0x0225C684 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x10] + add r5, r1, #0 + ldr r0, _0225C778 ; =0x00000195 + add r4, r5, #0 + ldrb r1, [r5, r0] + mov r0, #1 + add r4, #0x94 + tst r0, r1 + beq _0225C69E + mov r6, #2 + b _0225C6A0 +_0225C69E: + mov r6, #0 +_0225C6A0: + ldrb r0, [r4, #5] + lsl r3, r6, #0x18 + lsr r3, r3, #0x18 + str r0, [sp] + ldrb r0, [r4, #1] + str r0, [sp, #4] + ldr r0, [r4, #8] + str r0, [sp, #8] + ldrh r1, [r4, #2] + ldrb r2, [r4, #4] + add r0, sp, #0x14 + bl sub_02075FB4 + ldr r0, [r5, #0x20] + bl sub_02008A90 + add r7, r0, #0 + add r2, sp, #0x14 + add r3, r7, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0x20] + bl sub_020089A0 + ldr r0, [sp, #0x10] + bl ov16_0223E0C8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + bl ov16_0223F2B8 + add r3, r0, #0 + ldr r0, [r4, #8] + mov r2, #5 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r6, [sp, #8] + ldrh r0, [r7, #6] + str r0, [sp, #0xc] + ldrh r0, [r7] + ldrh r1, [r7, #2] + bl sub_02013750 + ldr r0, [sp, #0x10] + bl ov16_0223E0C8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrh r2, [r7] + bl ov16_0223F2CC + ldr r0, [sp, #0x10] + bl ov16_0223E0C8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrh r2, [r7, #4] + bl ov16_0223F2E4 + ldr r0, [r4, #8] + lsl r2, r6, #0x18 + str r0, [sp] + ldrh r0, [r4, #2] + ldrb r1, [r4, #4] + ldrb r3, [r4, #1] + lsr r2, r2, #0x18 + bl sub_02076648 + add r6, r0, #0 + ldr r0, [sp, #0x10] + bl ov16_0223E0C8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + add r2, r6, #0 + bl ov16_0223F2FC + ldr r0, _0225C778 ; =0x00000195 + mov r1, #1 + ldrb r0, [r5, r0] + bl ov12_022384CC + add r2, r0, #0 + ldr r0, [r5, #0x20] + mov r1, #1 + add r2, r6, r2 + bl sub_02007DEC + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + ldr r0, [sp, #0x10] + bl ov16_02266ABC + add r0, r5, #0 + bl ov16_0225CBB0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_0225C778: .word 0x00000195 + thumb_func_end ov16_0225C684 + + thumb_func_start ov16_0225C77C +ov16_0225C77C: ; 0x0225C77C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223EF8C + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x2e + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0225C77C + + thumb_func_start ov16_0225C79C +ov16_0225C79C: ; 0x0225C79C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0225C83C ; =0x00000196 + add r4, r1, #0 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0225C822 + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_0223E02C + str r0, [sp, #8] + mov r3, #0 + str r3, [sp] + ldr r2, [sp, #8] + add r0, r6, #0 + add r1, r7, #0 + str r3, [sp, #4] + bl ov16_02268C04 + ldr r0, [sp, #8] + mov r1, #0 + bl ov16_0226BCCC + add r0, r6, #0 + bl sub_02006CA8 + add r0, r7, #0 + bl sub_02006CA8 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + bl ov16_0223E258 + add r1, r0, #0 + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + cmp r1, r0 + beq _0225C80E + add r0, r5, #0 + bl ov16_0223F35C + bl ov16_0226846C +_0225C80E: + add r0, r4, #0 + add r0, #0x28 + bl ov16_022675AC + ldr r0, [sp, #8] + bl ov16_02269218 + add r0, r4, #0 + bl ov16_022647D8 +_0225C822: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x2f + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0225C83C: .word 0x00000196 + thumb_func_end ov16_0225C79C + + thumb_func_start ov16_0225C840 +ov16_0225C840: ; 0x0225C840 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E134 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C840 + + thumb_func_start ov16_0225C854 +ov16_0225C854: ; 0x0225C854 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E17C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C854 + + thumb_func_start ov16_0225C868 +ov16_0225C868: ; 0x0225C868 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r6, r4, #0 + add r5, r0, #0 + add r6, #0x94 + bl ov16_0223E208 + cmp r0, #0 + beq _0225C88C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0225E1B4 + b _0225C89A +_0225C88C: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x32 + bl ov16_02266ABC +_0225C89A: + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C868 + + thumb_func_start ov16_0225C8A4 +ov16_0225C8A4: ; 0x0225C8A4 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r6, r4, #0 + add r5, r0, #0 + add r6, #0x94 + bl ov16_0223E208 + cmp r0, #0 + beq _0225C8C8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov16_0225E200 + b _0225C8D6 +_0225C8C8: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x33 + bl ov16_02266ABC +_0225C8D6: + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C8A4 + + thumb_func_start ov16_0225C8E0 +ov16_0225C8E0: ; 0x0225C8E0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223E010 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_0223E018 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_0223E064 + add r2, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov16_0226D094 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x34 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C8E0 + + thumb_func_start ov16_0225C91C +ov16_0225C91C: ; 0x0225C91C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223E018 + bl ov16_0226D12C + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x35 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0225C91C + + thumb_func_start ov16_0225C940 +ov16_0225C940: ; 0x0225C940 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r5, #0 + add r4, #0x94 + ldrb r1, [r4, #1] + add r6, r0, #0 + cmp r1, #0 + ldr r1, _0225C984 ; =0x00000196 + bne _0225C960 + ldrb r1, [r5, r1] + cmp r1, #0 + bne _0225C96C + ldrh r1, [r4, #2] + bl ov16_0223F24C + b _0225C96C +_0225C960: + ldrb r1, [r5, r1] + cmp r1, #0 + beq _0225C96C + ldrh r1, [r4, #2] + bl ov16_0223F24C +_0225C96C: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + add r0, r6, #0 + bl ov16_02266ABC + add r0, r5, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + nop +_0225C984: .word 0x00000196 + thumb_func_end ov16_0225C940 + + thumb_func_start ov16_0225C988 +ov16_0225C988: ; 0x0225C988 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + ldrh r1, [r2, #2] + add r5, r0, #0 + add r2, r2, #4 + bl ov16_0223F638 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225E23C + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0225C988 + + thumb_func_start ov16_0225C9AC +ov16_0225C9AC: ; 0x0225C9AC + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E294 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C9AC + + thumb_func_start ov16_0225C9C0 +ov16_0225C9C0: ; 0x0225C9C0 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225E2C8 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C9C0 + + thumb_func_start ov16_0225C9D0 +ov16_0225C9D0: ; 0x0225C9D0 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225E300 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C9D0 + + thumb_func_start ov16_0225C9E0 +ov16_0225C9E0: ; 0x0225C9E0 + push {r4, lr} + add r4, r1, #0 + bl ov16_0225E338 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225C9E0 + + thumb_func_start ov16_0225C9F0 +ov16_0225C9F0: ; 0x0225C9F0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r4, r6, #0 + add r4, #0x94 + ldrh r1, [r4, #2] + add r5, r0, #0 + add r2, r4, #4 + bl ov16_0223F638 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov16_0225E38C + add r0, r6, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0225C9F0 + + thumb_func_start ov16_0225CA14 +ov16_0225CA14: ; 0x0225CA14 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + ldrh r1, [r2, #2] + add r5, r0, #0 + add r2, r2, #4 + bl ov16_0223F638 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0225E3E0 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0225CA14 + + thumb_func_start ov16_0225CA38 +ov16_0225CA38: ; 0x0225CA38 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E434 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225CA38 + + thumb_func_start ov16_0225CA4C +ov16_0225CA4C: ; 0x0225CA4C + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E468 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225CA4C + + thumb_func_start ov16_0225CA60 +ov16_0225CA60: ; 0x0225CA60 + push {r4, lr} + add r4, r1, #0 + add r2, r4, #0 + add r2, #0x94 + bl ov16_0225E4C8 + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, pc} + thumb_func_end ov16_0225CA60 + + thumb_func_start ov16_0225CA74 +ov16_0225CA74: ; 0x0225CA74 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #4] + str r1, [sp, #0x10] + add r1, #0x94 + str r1, [sp, #0x10] + ldr r2, [sp, #0x10] + mov r7, #0 + ldrh r1, [r1, #2] + str r0, [sp] + add r2, #8 + str r7, [sp, #8] + bl ov16_0223F638 + ldr r0, [sp] + bl ov16_0223DF0C + mov r1, #0x80 + tst r0, r1 + beq _0225CAAC + ldr r1, [sp, #0x10] + ldr r0, [sp] + ldr r1, [r1, #4] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov16_0223F444 + b _0225CB64 +_0225CAAC: + add r0, r7, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + bl ov16_0223DF1C + cmp r0, #0 + ble _0225CB3A +_0225CABA: + ldr r0, [sp] + ldr r1, [sp, #0xc] + bl ov16_0223DF20 + add r6, r0, #0 + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0225CB28 +_0225CACE: + add r0, r6, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0225CB1C + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0225CB1C + ldr r0, [sp] + ldr r1, [sp, #0xc] + bl ov16_0223E208 + cmp r0, #0 + beq _0225CB10 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #8] + add r0, r1, r0 + str r0, [sp, #8] + b _0225CB1C +_0225CB10: + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + add r7, r7, r0 +_0225CB1C: + add r0, r6, #0 + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blt _0225CACE +_0225CB28: + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + ldr r0, [sp] + bl ov16_0223DF1C + ldr r1, [sp, #0xc] + cmp r1, r0 + blt _0225CABA +_0225CB3A: + cmp r7, #0 + bne _0225CB4E + ldr r0, [sp, #8] + cmp r0, #0 + bne _0225CB4E + ldr r0, [sp] + mov r1, #3 + bl ov16_0223F444 + b _0225CB64 +_0225CB4E: + cmp r7, #0 + bne _0225CB5C + ldr r0, [sp] + mov r1, #2 + bl ov16_0223F444 + b _0225CB64 +_0225CB5C: + ldr r0, [sp] + mov r1, #1 + bl ov16_0223F444 +_0225CB64: + mov r2, #0x65 + ldr r1, [sp, #4] + lsl r2, r2, #2 + ldrb r1, [r1, r2] + ldr r2, [sp, #0x10] + ldr r0, [sp] + ldrb r2, [r2] + bl ov16_02266ABC + ldr r0, [sp, #4] + bl ov16_0225CBB0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_0225CA74 + + thumb_func_start ov16_0225CB80 +ov16_0225CB80: ; 0x0225CB80 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + bl ov16_0223DF04 + add r6, r0, #0 + mov r1, #0xff + bl sub_0201ADA4 + add r0, r6, #0 + bl sub_0201ACCC + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x42 + bl ov16_02266ABC + add r0, r4, #0 + bl ov16_0225CBB0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0225CB80 + + thumb_func_start ov16_0225CBB0 +ov16_0225CBB0: ; 0x0225CBB0 + mov r1, #0 + add r0, #0x94 + strb r1, [r0] + bx lr + thumb_func_end ov16_0225CBB0 + + .rodata + + + .global Unk_ov16_0226F068 +Unk_ov16_0226F068: ; 0x0226F068 + .incbin "incbin/overlay16_rodata.bin", 0xE0C, 0x10C + diff --git a/asm/ov16_0225CBB8.s b/asm/ov16_0225CBB8.s new file mode 100644 index 000000000..e9d7b6316 --- /dev/null +++ b/asm/ov16_0225CBB8.s @@ -0,0 +1,15561 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0225CBB8 +ov16_0225CBB8: ; 0x0225CBB8 + push {r4, lr} + add r4, r0, #0 + mov r0, #5 + mov r1, #0x18 + bl sub_02018144 + add r1, r0, #0 + str r4, [r1, #0] + mov r2, #0 + strb r2, [r1, #0x14] + strb r2, [r1, #0x15] + ldr r0, _0225CBD8 ; =ov16_02263014 + strb r2, [r1, #0x16] + bl sub_0200D9E8 + pop {r4, pc} + ; .align 2, 0 +_0225CBD8: .word ov16_02263014 + thumb_func_end ov16_0225CBB8 + + thumb_func_start ov16_0225CBDC +ov16_0225CBDC: ; 0x0225CBDC + push {r4, r5, r6, r7, lr} + sub sp, #0x6c + str r0, [sp, #0x24] + add r6, r1, #0 + add r5, r2, #0 + bl ov16_0223E000 + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + bl ov16_0223DF0C + mov r0, #5 + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + mov r2, #0 + ldr r0, _0225CE00 ; =0x00000195 + strb r2, [r4, #0x12] + ldrb r0, [r6, r0] + mov r1, #1 + tst r0, r1 + beq _0225CC32 + mov r0, #2 + strb r0, [r4, #0x13] + ldr r0, [sp, #0x24] + bl ov16_0223E020 + str r0, [r4, #0xc] + ldr r1, _0225CE00 ; =0x00000195 + ldr r0, [r0, #0] + ldrb r2, [r6, r1] + mov r1, #1 + and r2, r1 + add r3, r2, #0 + mov r1, #6 + mul r3, r1 + ldr r1, _0225CE04 ; =0x0223B0B8 + mov r2, #0x58 + ldrsh r1, [r1, r3] + bl sub_0200D4C4 + b _0225CC58 +_0225CC32: + ldr r0, [sp, #0x24] + add r1, r2, #0 + strb r2, [r4, #0x13] + bl ov16_0223E020 + str r0, [r4, #0xc] + ldr r1, _0225CE00 ; =0x00000195 + ldr r0, [r0, #0] + ldrb r2, [r6, r1] + mov r1, #1 + and r2, r1 + add r3, r2, #0 + mov r1, #6 + mul r3, r1 + ldr r1, _0225CE04 ; =0x0223B0B8 + mov r2, #0x88 + ldrsh r1, [r1, r3] + bl sub_0200D4C4 +_0225CC58: + ldrb r0, [r5, #1] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _0225CC64 + mov r0, #1 + b _0225CC66 +_0225CC64: + mov r0, #0 +_0225CC66: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldrb r0, [r5, #1] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1b + str r0, [sp, #4] + ldr r0, [r5, #4] + str r0, [sp, #8] + ldrb r2, [r5, #1] + ldrh r1, [r5, #2] + ldrb r3, [r4, #0x13] + lsl r2, r2, #0x1e + add r0, sp, #0x5c + lsr r2, r2, #0x1e + bl sub_02075FB4 + ldr r0, [r5, #4] + str r0, [sp] + ldrb r3, [r5, #1] + ldrh r0, [r5, #2] + ldrb r2, [r4, #0x13] + lsl r1, r3, #0x1e + lsl r3, r3, #0x18 + lsr r1, r1, #0x1e + lsr r3, r3, #0x1b + bl sub_02076648 + str r0, [sp, #0x2c] + mov r0, #0x69 + lsl r0, r0, #2 + add r1, sp, #0x30 + ldrh r2, [r5, #2] + ldr r0, [r6, r0] + add r1, #2 + bl sub_02078A80 + mov r0, #0x69 + lsl r0, r0, #2 + add r1, sp, #0x30 + ldrh r2, [r5, #2] + ldr r0, [r6, r0] + add r1, #1 + bl sub_02078AA4 + mov r0, #0x69 + lsl r0, r0, #2 + ldrh r2, [r5, #2] + ldr r0, [r6, r0] + add r1, sp, #0x30 + bl sub_02078AC8 + mov r3, #0x69 + lsl r3, r3, #2 + ldr r0, [r6, r3] + sub r3, #0xf + add r1, sp, #0x30 + ldrh r2, [r5, #2] + ldrb r3, [r6, r3] + add r1, #3 + bl sub_020789BC + ldr r1, _0225CE00 ; =0x00000195 + mov r0, #6 + ldrb r2, [r6, r1] + ldr r3, _0225CE04 ; =0x0223B0B8 + add r7, r2, #0 + mul r7, r0 + ldr r0, _0225CE08 ; =0x0223B0BA + mov r2, #2 + ldrsh r0, [r0, r7] + ldrsh r3, [r3, r7] + str r0, [sp] + ldr r0, _0225CE0C ; =0x0223B0BC + ldrsh r0, [r0, r7] + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + str r0, [sp, #8] + add r0, sp, #0x30 + ldrsb r2, [r0, r2] + str r2, [sp, #0xc] + mov r2, #1 + ldrsb r2, [r0, r2] + str r2, [sp, #0x10] + ldrb r0, [r0] + add r2, sp, #0x5c + str r0, [sp, #0x14] + sub r0, r1, #1 + ldrb r0, [r6, r0] + ldr r1, [sp, #0x28] + str r0, [sp, #0x18] + add r0, sp, #0x30 + add r0, #3 + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + bl ov16_02263B30 + str r0, [r6, #0x20] + ldr r0, [r6, #0x20] + str r0, [r4, #8] + ldrb r0, [r4, #0x13] + cmp r0, #2 + bne _0225CD46 + mov r3, #0 + str r3, [sp] + mov r1, #8 + ldr r0, [r4, #8] + add r2, r1, #0 + bl sub_020086FC +_0225CD46: + ldrb r0, [r4, #0x13] + cmp r0, #2 + bne _0225CD86 + ldr r0, [sp, #0x24] + bl ov16_0223EBEC + mov r1, #0x40 + tst r0, r1 + beq _0225CD86 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + add r7, r0, #0 + ldr r0, [r4, #8] + mov r1, #0x2e + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #0 + mov r2, #0xc0 + bl sub_02007DEC + add r2, r7, #0 + ldr r0, [r4, #8] + mov r1, #1 + sub r2, #0x88 + bl sub_02007DEC + strh r7, [r4, #0x14] + b _0225CD92 +_0225CD86: + ldr r0, _0225CE00 ; =0x00000195 + ldrb r0, [r6, r0] + lsl r1, r0, #2 + ldr r0, _0225CE10 ; =0x0223B0A0 + ldrsh r0, [r0, r1] + strh r0, [r4, #0x14] +_0225CD92: + ldr r0, [sp, #0x24] + str r0, [r4, #0] + str r6, [r4, #4] + ldrb r0, [r5] + strb r0, [r4, #0x10] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r6, r0] + add r0, r0, #1 + strb r1, [r4, #0x11] + ldrh r1, [r5, #2] + strh r1, [r4, #0x16] + ldrb r1, [r5, #1] + lsl r1, r1, #0x18 + lsr r2, r1, #0x1b + add r1, r4, #0 + add r1, #0x2c + strb r2, [r1] + ldr r1, [r5, #8] + str r1, [r4, #0x18] + ldrb r0, [r6, r0] + str r0, [r4, #0x1c] + ldr r0, [r5, #4] + bl sub_02075BFC + str r0, [r4, #0x24] + ldrb r0, [r5, #1] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + str r0, [r4, #0x28] + ldrb r0, [r4, #0x13] + cmp r0, #2 + bne _0225CDEC + ldr r0, [sp, #0x24] + bl ov16_0223EBEC + mov r1, #0x40 + tst r0, r1 + beq _0225CDEC + ldr r0, _0225CE14 ; =ov16_0225E894 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + b _0225CDF6 +_0225CDEC: + ldr r0, _0225CE18 ; =ov16_0225E4E8 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 +_0225CDF6: + mov r0, #1 + bl sub_02005454 + add sp, #0x6c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225CE00: .word 0x00000195 +_0225CE04: .word 0x0223B0B8 +_0225CE08: .word 0x0223B0BA +_0225CE0C: .word 0x0223B0BC +_0225CE10: .word 0x0223B0A0 +_0225CE14: .word ov16_0225E894 +_0225CE18: .word ov16_0225E4E8 + thumb_func_end ov16_0225CBDC + + thumb_func_start ov16_0225CE1C +ov16_0225CE1C: ; 0x0225CE1C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r6, r1, #0 + add r5, r2, #0 + bl ov16_0223DF0C + mov r0, #5 + mov r1, #0x9c + bl sub_02018144 + add r4, r0, #0 + ldr r0, _0225CF68 ; =0x00000195 + ldrb r1, [r6, r0] + mov r0, #1 + tst r0, r1 + beq _0225CE42 + mov r1, #2 + b _0225CE44 +_0225CE42: + mov r1, #0 +_0225CE44: + add r0, r4, #0 + add r0, #0x84 + strb r1, [r0] + ldrb r0, [r5, #1] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _0225CE56 + mov r0, #1 + b _0225CE58 +_0225CE56: + mov r0, #0 +_0225CE58: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldrb r0, [r5, #1] + add r3, r4, #0 + add r3, #0x84 + lsl r0, r0, #0x18 + lsr r0, r0, #0x1b + str r0, [sp, #4] + ldr r0, [r5, #4] + str r0, [sp, #8] + ldrb r2, [r5, #1] + add r0, r4, #0 + ldrh r1, [r5, #2] + lsl r2, r2, #0x1e + ldrb r3, [r3] + add r0, #0x14 + lsr r2, r2, #0x1e + bl sub_02075FB4 + ldr r0, [r5, #4] + add r2, r4, #0 + str r0, [sp] + ldrb r3, [r5, #1] + add r2, #0x84 + ldrh r0, [r5, #2] + lsl r1, r3, #0x1e + lsl r3, r3, #0x18 + ldrb r2, [r2] + lsr r1, r1, #0x1e + lsr r3, r3, #0x1b + bl sub_02076648 + add r1, r4, #0 + add r1, #0x85 + strb r0, [r1] + mov r0, #0x69 + lsl r0, r0, #2 + add r1, r4, #0 + ldrh r2, [r5, #2] + ldr r0, [r6, r0] + add r1, #0x90 + bl sub_02078A80 + mov r0, #0x69 + lsl r0, r0, #2 + add r1, r4, #0 + ldrh r2, [r5, #2] + ldr r0, [r6, r0] + add r1, #0x91 + bl sub_02078AA4 + mov r0, #0x69 + lsl r0, r0, #2 + add r1, r4, #0 + ldrh r2, [r5, #2] + ldr r0, [r6, r0] + add r1, #0x93 + bl sub_02078AC8 + add r0, r6, #0 + bl ov16_02263B10 + str r7, [r4, #0] + add r0, r4, #0 + str r6, [r4, #4] + mov r1, #0 + add r0, #0x83 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x96 + strb r1, [r0] + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x80 + strb r1, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r2, [r6, r0] + add r1, r4, #0 + add r1, #0x81 + strb r2, [r1] + add r1, r4, #0 + ldrh r2, [r5, #2] + add r1, #0x86 + add r0, r0, #1 + strh r2, [r1] + ldrb r1, [r5, #1] + lsl r1, r1, #0x18 + lsr r2, r1, #0x1b + add r1, r4, #0 + add r1, #0x97 + strb r2, [r1] + ldrb r1, [r6, r0] + add r0, r4, #0 + add r0, #0x82 + strb r1, [r0] + add r0, r4, #0 + ldr r1, [r5, #8] + add r0, #0x88 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, [r5, #0xc] + add r0, #0x8c + strb r1, [r0] + ldr r0, [r5, #4] + bl sub_02075BFC + add r1, r4, #0 + add r1, #0x8d + strb r0, [r1] + add r0, r4, #0 + ldr r1, [r5, #0x10] + add r0, #0x8e + strh r1, [r0] + ldrb r0, [r5, #1] + lsl r0, r0, #0x1d + lsr r1, r0, #0x1f + add r0, r4, #0 + add r0, #0x92 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0x94 + strh r1, [r0] + mov r0, #1 + bl sub_02005454 + ldr r0, _0225CF6C ; =ov16_0225EA80 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0225CF68: .word 0x00000195 +_0225CF6C: .word ov16_0225EA80 + thumb_func_end ov16_0225CE1C + + thumb_func_start ov16_0225CF70 +ov16_0225CF70: ; 0x0225CF70 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov16_0223DF0C + mov r0, #5 + mov r1, #0x9c + bl sub_02018144 + add r5, r0, #0 + add r1, r5, #0 + mov r0, #0 + add r1, #0x83 + strb r0, [r1] + ldr r1, _0225D110 ; =0x00000195 + ldrb r2, [r6, r1] + mov r1, #1 + tst r1, r2 + beq _0225CFA4 + add r0, r5, #0 + mov r1, #2 + add r0, #0x84 + strb r1, [r0] + b _0225CFAA +_0225CFA4: + add r1, r5, #0 + add r1, #0x84 + strb r0, [r1] +_0225CFAA: + ldrb r0, [r4, #1] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _0225CFB6 + mov r0, #1 + b _0225CFB8 +_0225CFB6: + mov r0, #0 +_0225CFB8: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldrb r0, [r4, #1] + add r3, r5, #0 + add r3, #0x84 + lsl r0, r0, #0x18 + lsr r0, r0, #0x1b + str r0, [sp, #4] + ldr r0, [r4, #4] + str r0, [sp, #8] + ldrb r2, [r4, #1] + add r0, r5, #0 + ldrh r1, [r4, #2] + lsl r2, r2, #0x1e + ldrb r3, [r3] + add r0, #0x14 + lsr r2, r2, #0x1e + bl sub_02075FB4 + ldr r0, [r4, #4] + add r2, r5, #0 + str r0, [sp] + ldrb r3, [r4, #1] + add r2, #0x84 + ldrh r0, [r4, #2] + lsl r1, r3, #0x1e + lsl r3, r3, #0x18 + ldrb r2, [r2] + lsr r1, r1, #0x1e + lsr r3, r3, #0x1b + bl sub_02076648 + add r1, r5, #0 + add r1, #0x85 + strb r0, [r1] + mov r0, #0x69 + lsl r0, r0, #2 + add r1, r5, #0 + ldrh r2, [r4, #2] + ldr r0, [r6, r0] + add r1, #0x90 + bl sub_02078A80 + mov r0, #0x69 + lsl r0, r0, #2 + add r1, r5, #0 + ldrh r2, [r4, #2] + ldr r0, [r6, r0] + add r1, #0x91 + bl sub_02078AA4 + mov r0, #0x69 + lsl r0, r0, #2 + add r1, r5, #0 + ldrh r2, [r4, #2] + ldr r0, [r6, r0] + add r1, #0x93 + bl sub_02078AC8 + add r0, r6, #0 + bl ov16_02263B10 + str r7, [r5, #0] + str r6, [r5, #4] + add r0, r5, #0 + ldrb r1, [r4] + add r0, #0x80 + strb r1, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r2, [r6, r0] + add r1, r5, #0 + add r1, #0x81 + strb r2, [r1] + add r1, r5, #0 + ldrh r2, [r4, #2] + add r1, #0x86 + add r0, r0, #1 + strh r2, [r1] + ldrb r1, [r4, #1] + lsl r1, r1, #0x18 + lsr r2, r1, #0x1b + add r1, r5, #0 + add r1, #0x97 + strb r2, [r1] + ldrb r1, [r6, r0] + add r0, r5, #0 + add r0, #0x82 + strb r1, [r0] + add r0, r5, #0 + ldr r1, [r4, #8] + add r0, #0x88 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [r4, #0xc] + add r0, #0x8c + strb r1, [r0] + ldr r0, [r4, #4] + bl sub_02075BFC + add r1, r5, #0 + add r1, #0x8d + strb r0, [r1] + add r0, r5, #0 + ldr r1, [r4, #0x10] + add r0, #0x8e + strh r1, [r0] + ldrb r0, [r4, #1] + lsl r0, r0, #0x1d + lsr r1, r0, #0x1f + add r0, r5, #0 + add r0, #0x92 + strb r1, [r0] + add r0, r5, #0 + ldr r1, [r4, #0x14] + add r0, #0x94 + strh r1, [r0] + add r1, r5, #0 + mov r0, #0 + add r1, #0x96 + strb r0, [r1] + add r1, r5, #0 + ldr r2, [r4, #0x4c] + add r1, #0x98 + str r2, [r1, #0] + mov ip, r4 + add r7, r5, #0 + add r6, r4, #0 + add r1, r5, #0 +_0225D0BC: + mov r2, ip + add r2, #0x50 + ldrh r3, [r2] + add r2, r7, #0 + add r2, #0x40 + strh r3, [r2] + add r2, r4, r0 + add r2, #0x58 + ldrb r3, [r2] + add r2, r5, r0 + add r2, #0x48 + strb r3, [r2] + add r2, r4, r0 + add r2, #0x5c + ldrb r3, [r2] + add r2, r5, r0 + add r2, #0x4c + strb r3, [r2] + add r2, r4, r0 + add r2, #0x60 + ldrb r3, [r2] + add r2, r5, r0 + add r2, #0x50 + strb r3, [r2] + ldr r2, [r6, #0x64] + add r0, r0, #1 + str r2, [r1, #0x54] + mov r2, ip + add r2, r2, #2 + mov ip, r2 + add r7, r7, #2 + add r6, r6, #4 + add r1, r1, #4 + cmp r0, #4 + blt _0225D0BC + ldr r0, _0225D114 ; =ov16_0225F0C0 + add r1, r5, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225D110: .word 0x00000195 +_0225D114: .word ov16_0225F0C0 + thumb_func_end ov16_0225CF70 + + thumb_func_start ov16_0225D118 +ov16_0225D118: ; 0x0225D118 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x74 + str r2, [sp] + bl sub_02018144 + add r1, r0, #0 + str r5, [r1, #0] + str r4, [r1, #4] + ldr r0, [r4, #0x20] + add r7, r1, #0 + str r0, [r1, #8] + ldr r0, [sp] + ldrb r2, [r0] + add r0, r1, #0 + add r0, #0x68 + strb r2, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r3, [r4, r0] + add r2, r1, #0 + add r2, #0x69 + add r0, r0, #1 + strb r3, [r2] + ldrb r2, [r4, r0] + add r0, r1, #0 + add r0, #0x6a + strb r2, [r0] + add r2, r1, #0 + mov r0, #0 + add r2, #0x6b + strb r0, [r2] + ldr r2, [sp] + ldrb r3, [r2, #1] + add r2, r1, #0 + add r2, #0x6c + strb r3, [r2] + ldr r2, [sp] + ldrh r3, [r2, #2] + add r2, r1, #0 + add r2, #0x6e + strh r3, [r2] + ldr r2, [sp] + add r3, r1, #0 + ldr r2, [r2, #4] + str r2, [r1, #0x70] + ldr r2, [sp] + mov ip, r2 +_0225D17C: + mov r4, ip + ldrh r4, [r4, #8] + strh r4, [r7, #0x28] + ldr r4, [sp] + add r7, r7, #2 + add r6, r4, r0 + add r4, r1, r0 + ldrb r5, [r6, #0x10] + add r4, #0x30 + strb r5, [r4] + add r4, r1, r0 + ldrb r5, [r6, #0x14] + add r4, #0x34 + strb r5, [r4] + add r4, r1, r0 + ldrb r5, [r6, #0x18] + add r4, #0x38 + add r0, r0, #1 + strb r5, [r4] + ldr r4, [r2, #0x1c] + add r2, r2, #4 + str r4, [r3, #0x3c] + mov r4, ip + add r4, r4, #2 + add r3, r3, #4 + mov ip, r4 + cmp r0, #4 + blt _0225D17C + ldr r0, _0225D1C0 ; =ov16_0225F764 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225D1C0: .word ov16_0225F764 + thumb_func_end ov16_0225D118 + + thumb_func_start ov16_0225D1C4 +ov16_0225D1C4: ; 0x0225D1C4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r7, [r4, #0] + ldr r0, [r5, #0x20] + str r0, [r4, #4] + ldrb r0, [r6] + strb r0, [r4, #8] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + add r0, r0, #1 + strb r1, [r4, #9] + ldrb r0, [r5, r0] + mov r1, #0 + add r3, r1, #0 + strb r0, [r4, #0xa] + strb r1, [r4, #0xb] + ldrb r0, [r6, #1] + strb r0, [r4, #0xc] + ldrh r0, [r6, #2] + lsl r2, r0, #1 + ldr r0, _0225D220 ; =0x0226F1AE + ldrh r0, [r0, r2] + mov r2, #0x10 + str r0, [sp] + ldr r0, [r4, #4] + bl sub_020086FC + ldr r0, [r4, #4] + mov r1, #0x2d + mov r2, #1 + bl sub_02007DEC + ldr r0, _0225D224 ; =ov16_0225FA00 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225D220: .word 0x0226F1AE +_0225D224: .word ov16_0225FA00 + thumb_func_end ov16_0225D1C4 + + thumb_func_start ov16_0225D228 +ov16_0225D228: ; 0x0225D228 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x20 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r2, #0 + ldr r0, _0225D34C ; =0x00000195 + strb r2, [r4, #0xe] + ldrb r0, [r5, r0] + mov r1, #1 + tst r0, r1 + beq _0225D270 + mov r0, #2 + strb r0, [r4, #0xf] + add r0, r6, #0 + bl ov16_0223E020 + str r0, [r4, #4] + ldr r1, _0225D34C ; =0x00000195 + ldr r0, [r0, #0] + ldrb r2, [r5, r1] + mov r1, #1 + and r1, r2 + mov r2, #6 + mul r2, r1 + ldr r1, _0225D350 ; =0x0223B0B8 + ldrsh r1, [r1, r2] + mov r2, #0x58 + bl sub_0200D4C4 + b _0225D294 +_0225D270: + add r0, r6, #0 + add r1, r2, #0 + strb r2, [r4, #0xf] + bl ov16_0223E020 + str r0, [r4, #4] + ldr r1, _0225D34C ; =0x00000195 + ldr r0, [r0, #0] + ldrb r2, [r5, r1] + mov r1, #1 + and r1, r2 + mov r2, #6 + mul r2, r1 + ldr r1, _0225D350 ; =0x0223B0B8 + ldrsh r1, [r1, r2] + mov r2, #0x88 + bl sub_0200D4C4 +_0225D294: + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _0225D2B6 + add r0, r6, #0 + bl ov16_0223DF0C + mov r1, #0x10 + tst r0, r1 + beq _0225D2BE + ldr r0, _0225D34C ; =0x00000195 + ldrb r1, [r5, r0] + mov r0, #1 + tst r0, r1 + beq _0225D2BE +_0225D2B6: + ldr r0, _0225D34C ; =0x00000195 + ldrb r0, [r5, r0] + str r0, [sp, #8] + b _0225D2C8 +_0225D2BE: + ldr r0, _0225D34C ; =0x00000195 + ldrb r1, [r5, r0] + mov r0, #1 + and r0, r1 + str r0, [sp, #8] +_0225D2C8: + mov r1, #0x65 + ldrh r2, [r7, #2] + lsl r1, r1, #2 + ldrb r1, [r5, r1] + lsl r2, r2, #0x18 + add r0, r6, #0 + lsr r2, r2, #0x18 + bl ov16_02264768 + strh r0, [r7, #2] + ldr r1, [sp, #8] + mov r0, #6 + mul r0, r1 + ldr r1, _0225D350 ; =0x0223B0B8 + ldr r3, _0225D34C ; =0x00000195 + ldrsh r1, [r1, r0] + str r1, [sp] + ldr r1, _0225D354 ; =0x0223B0BA + ldrsh r0, [r1, r0] + ldr r1, [sp, #8] + str r0, [sp, #4] + ldrh r2, [r7, #2] + ldrb r3, [r5, r3] + add r0, r6, #0 + bl ov16_022643B8 + str r0, [r5, #0x18] + str r0, [r4, #8] + ldr r0, [sp, #8] + lsl r1, r0, #2 + ldr r0, _0225D358 ; =0x0223B0A0 + ldrsh r0, [r0, r1] + strh r0, [r4, #0x10] + str r6, [r4, #0] + ldrb r0, [r7] + strb r0, [r4, #0xc] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + add r0, r0, #1 + strb r1, [r4, #0xd] + ldrb r0, [r5, r0] + str r0, [r4, #0x14] + mov r0, #0 + str r0, [r4, #0x1c] + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0225D32C + cmp r0, #2 + bne _0225D33C +_0225D32C: + add r0, r6, #0 + bl ov16_0223DF00 + mov r1, #3 + mov r2, #2 + mov r3, #0x84 + bl sub_02019184 +_0225D33C: + ldr r0, _0225D35C ; =ov16_0225FA70 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0225D34C: .word 0x00000195 +_0225D350: .word 0x0223B0B8 +_0225D354: .word 0x0223B0BA +_0225D358: .word 0x0223B0A0 +_0225D35C: .word ov16_0225FA70 + thumb_func_end ov16_0225D228 + + thumb_func_start ov16_0225D360 +ov16_0225D360: ; 0x0225D360 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x1c + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + strb r0, [r4, #0xa] + str r6, [r4, #0] + ldrb r1, [r7] + strb r1, [r4, #8] + ldrb r1, [r7, #1] + str r1, [r4, #0x10] + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r2, [r5, r1] + strb r2, [r4, #9] + str r5, [r4, #4] + add r2, r1, #1 + ldrb r3, [r5, r2] + mov r2, #1 + tst r2, r3 + beq _0225D39A + mov r1, #2 + strb r1, [r4, #0xb] + b _0225D3BA +_0225D39A: + ldrb r1, [r5, r1] + add r0, r6, #0 + bl ov16_0223E120 + add r2, r0, #0 + mov r0, #0 + strb r0, [r4, #0xb] + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r2, #1] + add r0, r6, #0 + bl ov16_02264768 + bl sub_020788D0 +_0225D3BA: + str r0, [r4, #0xc] + ldr r0, _0225D3C8 ; =ov16_0225FD5C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225D3C8: .word ov16_0225FD5C + thumb_func_end ov16_0225D360 + + thumb_func_start ov16_0225D3CC +ov16_0225D3CC: ; 0x0225D3CC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x10 + bl sub_02018144 + add r1, r0, #0 + mov r0, #0 + strb r0, [r1, #0xa] + add r2, r4, #0 + str r5, [r1, #0] + add r2, #0x94 + ldrb r2, [r2] + strb r2, [r1, #8] + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r3, [r4, r2] + add r2, r2, #1 + strb r3, [r1, #9] + str r4, [r1, #4] + ldrb r3, [r4, r2] + mov r2, #1 + tst r2, r3 + beq _0225D402 + mov r0, #2 + b _0225D402 +_0225D402: + strb r0, [r1, #0xb] + ldr r0, _0225D410 ; =ov16_02260284 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_0225D410: .word ov16_02260284 + thumb_func_end ov16_0225D3CC + + thumb_func_start ov16_0225D414 +ov16_0225D414: ; 0x0225D414 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov16_0223E000 + mov r0, #5 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + ldr r1, _0225D494 ; =0x00000195 + strb r0, [r4, #0xa] + ldrb r2, [r5, r1] + mov r1, #1 + tst r1, r2 + beq _0225D43E + mov r0, #2 + b _0225D43E +_0225D43E: + strb r0, [r4, #0xb] + ldr r0, _0225D494 ; =0x00000195 + ldr r2, _0225D498 ; =0x0223B0DC + ldrb r3, [r5, r0] + mov r0, #1 + add r1, r3, #0 + and r1, r0 + mov r0, #6 + mul r0, r1 + ldrsh r2, [r2, r0] + str r2, [sp] + ldr r2, _0225D49C ; =0x0223B0DE + ldrsh r0, [r2, r0] + str r0, [sp, #4] + ldrh r2, [r6, #2] + add r0, r7, #0 + bl ov16_022643B8 + str r0, [r5, #0x18] + str r0, [r4, #4] + ldr r3, _0225D494 ; =0x00000195 + ldr r2, [r6, #4] + ldrb r0, [r5, r3] + lsl r2, r2, #1 + lsl r0, r0, #0x1f + lsr r1, r0, #0x1d + ldr r0, _0225D4A0 ; =0x0223B0A0 + add r0, r0, r1 + ldrsh r0, [r2, r0] + add r1, r4, #0 + mov r2, #0 + strh r0, [r4, #0xc] + str r7, [r4, #0] + ldrb r0, [r6] + strb r0, [r4, #8] + sub r0, r3, #1 + ldrb r0, [r5, r0] + strb r0, [r4, #9] + ldr r0, _0225D4A4 ; =ov16_02260384 + bl sub_0200D9E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225D494: .word 0x00000195 +_0225D498: .word 0x0223B0DC +_0225D49C: .word 0x0223B0DE +_0225D4A0: .word 0x0223B0A0 +_0225D4A4: .word ov16_02260384 + thumb_func_end ov16_0225D414 + + thumb_func_start ov16_0225D4A8 +ov16_0225D4A8: ; 0x0225D4A8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r6, #0 + add r4, #0x28 + add r7, r0, #0 + add r5, r2, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #1 + bl sub_020C4BB8 + mov r0, #0x65 + str r7, [r4, #0xc] + lsl r0, r0, #2 + ldrb r1, [r6, r0] + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r0, r7, #0 + bl ov16_0223DF0C + add r1, r0, #0 + ldr r0, _0225D568 ; =0x00000195 + ldrb r0, [r6, r0] + bl ov16_0226825C + add r1, r4, #0 + add r1, #0x25 + strb r0, [r1] + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x4c + strb r1, [r0] + mov r0, #2 + ldrsh r0, [r5, r0] + str r0, [r4, #0x28] + ldrh r0, [r5, #4] + str r0, [r4, #0x2c] + add r0, r4, #0 + ldrb r1, [r5, #1] + add r0, #0x48 + strb r1, [r0] + ldrb r0, [r5, #7] + lsl r0, r0, #0x19 + lsr r1, r0, #0x1e + add r0, r4, #0 + add r0, #0x49 + strb r1, [r0] + mov r1, #0 + str r1, [r4, #0x30] + ldr r0, [r5, #8] + str r0, [r4, #0x38] + ldr r0, [r5, #0xc] + str r0, [r4, #0x3c] + add r0, r4, #0 + ldrb r2, [r5, #6] + add r0, #0x26 + strb r2, [r0] + ldrb r0, [r5, #7] + lsl r0, r0, #0x1b + lsr r2, r0, #0x1b + add r0, r4, #0 + add r0, #0x4a + strb r2, [r0] + ldrb r0, [r5, #7] + lsl r0, r0, #0x18 + lsr r2, r0, #0x1f + add r0, r4, #0 + add r0, #0x4b + strb r2, [r0] + add r0, r4, #0 + ldrb r2, [r5, #0x14] + add r0, #0x4d + strb r2, [r0] + add r0, r4, #0 + ldr r2, [r5, #0x10] + add r0, #0x27 + strb r2, [r0] + add r0, r4, #0 + bl ov16_02267620 + mov r2, #0 + ldr r1, [r4, #0x28] + add r0, r4, #0 + mvn r2, r2 + bl ov16_02267084 + mov r2, #0xfa + ldr r0, _0225D56C ; =ov16_0226040C + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} + nop +_0225D568: .word 0x00000195 +_0225D56C: .word ov16_0226040C + thumb_func_end ov16_0225D4A8 + + thumb_func_start ov16_0225D570 +ov16_0225D570: ; 0x0225D570 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r5, #0 + add r4, #0x28 + add r6, r0, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #1 + bl sub_020C4BB8 + mov r0, #0x65 + str r6, [r4, #0xc] + lsl r0, r0, #2 + ldrb r1, [r5, r0] + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r5, #0x94 + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x4c + strb r1, [r0] + add r0, r4, #0 + mov r1, #1 + bl ov16_022676A8 + mov r2, #0xfa + ldr r0, _0225D5B4 ; =ov16_02260480 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225D5B4: .word ov16_02260480 + thumb_func_end ov16_0225D570 + + thumb_func_start ov16_0225D5B8 +ov16_0225D5B8: ; 0x0225D5B8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r0, #5 + mov r1, #0x3c + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #0x3c + bl sub_020C4BB8 + mov r2, #0 + strb r2, [r4, #0xa] + strb r2, [r4, #0xb] + str r5, [r4, #0] + ldrb r0, [r7] + mov r1, #0x65 + lsl r1, r1, #2 + strb r0, [r4, #8] + ldr r0, [sp] + add r5, r7, #0 + ldrb r0, [r0, r1] + add r1, r1, #1 + add r6, r4, #0 + strb r0, [r4, #9] + ldr r0, [sp] + ldrb r1, [r0, r1] + add r0, r4, #0 + add r0, #0x34 + strb r1, [r0] + ldr r0, [sp] + add r0, #0x28 + str r0, [r4, #4] + add r0, r4, #0 + ldrb r1, [r7, #1] + add r0, #0x23 + strb r1, [r0] + mov r0, #0x24 + ldrsh r0, [r7, r0] + strh r0, [r4, #0x36] + ldrh r0, [r7, #0x26] + strh r0, [r4, #0x38] + add r0, r7, #0 + add r0, #0x28 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0x3a + strb r1, [r0] + add r0, r7, #0 + add r0, #0x29 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0x3b + strb r1, [r0] +_0225D62A: + mov r3, #0 +_0225D62C: + add r0, r5, r3 + ldrb r1, [r0, #8] + add r0, r6, r3 + add r3, r3, #1 + strb r1, [r0, #0x10] + cmp r3, #6 + blt _0225D62C + add r2, r2, #1 + add r5, r5, #6 + add r6, r6, #6 + cmp r2, #2 + blt _0225D62A + mov r0, #0 + add r3, r0, #0 +_0225D648: + add r2, r7, r0 + ldrb r1, [r2, #8] + cmp r1, #2 + bne _0225D656 + add r1, r4, r0 + strb r3, [r1, #0x1c] + b _0225D65C +_0225D656: + ldrb r2, [r2, #2] + add r1, r4, r0 + strb r2, [r1, #0x1c] +_0225D65C: + add r0, r0, #1 + cmp r0, #6 + blt _0225D648 + mov r3, #0 + add r5, r7, #0 + add r6, r4, #0 +_0225D668: + ldrh r0, [r5, #0x14] + add r2, r7, r3 + add r5, r5, #2 + strh r0, [r6, #0x24] + ldrb r1, [r2, #0x1c] + add r0, r4, r3 + add r0, #0x2c + strb r1, [r0] + add r0, r4, r3 + add r2, #0x20 + ldrb r1, [r2] + add r0, #0x30 + add r3, r3, #1 + add r6, r6, #2 + strb r1, [r0] + cmp r3, #4 + blt _0225D668 + ldr r0, [sp] + add r1, r4, #0 + ldr r0, [r0, #0] + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0225D5B8 + + thumb_func_start ov16_0225D698 +ov16_0225D698: ; 0x0225D698 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r0, #5 + mov r1, #0x24 + add r7, r2, #0 + bl sub_02018144 + add r3, r0, #0 + mov r1, #0x65 + mov r4, #0 + add r0, #0x20 + strb r4, [r0] + ldr r0, [sp] + str r5, [r3, #0] + add r0, #0x94 + ldrb r0, [r0] + lsl r1, r1, #2 + add r5, r7, #0 + strb r0, [r3, #0x1c] + ldr r0, [sp] + add r6, r3, #0 + ldrb r0, [r0, r1] + add r1, r1, #1 + strb r0, [r3, #0x1d] + ldr r0, [sp] + ldrb r0, [r0, r1] + strb r0, [r3, #0x1e] + ldr r0, [sp] + add r0, #0x28 + str r0, [r3, #4] + ldrb r0, [r7, #1] + strb r0, [r3, #0x1f] +_0225D6DA: + ldrh r0, [r5, #4] + add r2, r7, r4 + add r1, r3, r4 + strh r0, [r6, #0xc] + ldrb r0, [r2, #0xc] + add r4, r4, #1 + add r5, r5, #2 + strb r0, [r1, #0x14] + ldrb r0, [r2, #0x10] + add r6, r6, #2 + cmp r4, #4 + strb r0, [r1, #0x18] + blt _0225D6DA + ldrh r0, [r7, #2] + add r1, r3, #0 + mov r2, #0 + strh r0, [r3, #0x22] + ldr r0, [sp] + ldr r0, [r0, #4] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0225D698 + + thumb_func_start ov16_0225D708 +ov16_0225D708: ; 0x0225D708 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + add r7, r1, #0 + mov r0, #5 + mov r1, #0x34 + add r5, r2, #0 + bl sub_02018144 + add r6, r0, #0 + mov r0, #0 + strb r0, [r6, #0xf] + ldr r0, [sp] + str r0, [r6, #0] + add r0, r7, #0 + add r0, #0x94 + ldrb r0, [r0] + strb r0, [r6, #0xc] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r7, r0] + add r0, r0, #1 + strb r1, [r6, #0xd] + ldrb r0, [r7, r0] + strb r0, [r6, #0xe] + ldrh r0, [r5, #2] + strh r0, [r6, #0x30] + add r0, r7, #0 + add r0, #0x28 + str r0, [r6, #4] + add r0, r6, #0 + ldrb r1, [r5, #1] + add r0, #0x32 + strb r1, [r0] + ldr r0, [sp] + add r1, sp, #4 + bl ov16_0223F87C + ldr r0, [sp] + bl ov16_0223DF1C + add r4, r0, #0 + ldr r0, [sp] + bl ov16_0223DF0C + mov r0, #0 + cmp r4, #0 + ble _0225D784 + add r1, r6, #0 +_0225D76A: + ldrh r2, [r5, #4] + add r0, r0, #1 + strh r2, [r1, #0x10] + ldrh r2, [r5, #6] + strh r2, [r1, #0x12] + ldrh r2, [r5, #8] + strh r2, [r1, #0x14] + ldrh r2, [r5, #0xa] + add r5, #8 + strh r2, [r1, #0x16] + add r1, #8 + cmp r0, r4 + blt _0225D76A +_0225D784: + ldr r0, [r7, #8] + add r1, r6, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0225D708 + + thumb_func_start ov16_0225D794 +ov16_0225D794: ; 0x0225D794 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + str r1, [sp] + mov r0, #5 + mov r1, #0x34 + str r2, [sp, #4] + bl sub_02018144 + add r4, r0, #0 + mov r0, #5 + mov r1, #0x34 + bl sub_02018144 + str r0, [r4, #8] + mov r0, #5 + mov r1, #0x38 + bl sub_02018144 + ldr r1, [r4, #8] + str r0, [r1, #4] + mov r0, #5 + bl sub_02079FF4 + ldr r1, [r4, #8] + mov r6, #0 + ldr r1, [r1, #4] + ldr r3, [sp, #4] + str r0, [r1, #0] + strb r6, [r4, #0xe] + str r5, [r4, #0] + ldr r0, [sp, #4] + mov r1, #0x65 + ldrb r0, [r0] + lsl r1, r1, #2 + add r5, r4, #0 + strb r0, [r4, #0xc] + ldr r0, [sp] + ldrb r0, [r0, r1] + add r1, r1, #1 + strb r0, [r4, #0xd] + ldr r0, [sp] + ldrb r0, [r0, r1] + strb r0, [r4, #0xf] + ldr r0, [sp, #4] + ldrb r0, [r0, #1] + strb r0, [r4, #0x14] + ldr r0, [sp, #4] + ldrb r0, [r0, #2] + strb r0, [r4, #0x15] + ldr r0, [sp, #4] + ldrb r0, [r0, #3] + strb r0, [r4, #0x16] +_0225D7FE: + ldr r0, [sp, #4] + ldr r1, [r4, #8] + add r7, r0, r6 + ldrb r0, [r7, #4] + add r1, r1, r6 + mov r2, #0 + strb r0, [r1, #0xc] +_0225D80C: + add r0, r3, r2 + ldrb r1, [r0, #8] + add r0, r5, r2 + add r2, r2, #1 + strb r1, [r0, #0x18] + cmp r2, #6 + blt _0225D80C + add r7, #0x20 + ldrb r1, [r7] + add r0, r4, r6 + add r0, #0x30 + add r6, r6, #1 + strb r1, [r0] + add r3, r3, #6 + add r5, r5, #6 + cmp r6, #4 + blt _0225D7FE + ldr r0, [sp] + add r1, r4, #0 + ldr r0, [r0, #0xc] + mov r2, #0 + bl sub_0200D9E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0225D794 + + thumb_func_start ov16_0225D840 +ov16_0225D840: ; 0x0225D840 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + str r1, [sp] + mov r0, #5 + mov r1, #0x34 + add r7, r2, #0 + bl sub_02018144 + add r2, r0, #0 + mov r3, #0 + strb r3, [r2, #0xa] + str r4, [r2, #0] + ldrb r0, [r7] + add r5, r7, #0 + add r6, r2, #0 + strb r0, [r2, #8] + ldrb r0, [r7, #1] + strb r0, [r2, #9] + ldrb r0, [r7, #2] + strb r0, [r2, #0xb] + ldr r0, [r7, #0x20] + str r0, [r2, #0x10] + ldrb r0, [r7, #3] + strb r0, [r2, #0x16] + add r0, r7, #0 + strh r3, [r2, #0x14] + add r0, #0x24 + ldrb r0, [r0] + strb r0, [r2, #0x18] +_0225D87A: + add r0, r7, r3 + ldrb r1, [r0, #4] + add r0, r2, r3 + mov r4, #0 + strb r1, [r0, #0xc] +_0225D884: + add r0, r5, r4 + ldrb r1, [r0, #8] + add r0, r6, r4 + add r4, r4, #1 + strb r1, [r0, #0x1c] + cmp r4, #6 + blt _0225D884 + add r3, r3, #1 + add r5, r5, #6 + add r6, r6, #6 + cmp r3, #4 + blt _0225D87A + ldr r0, [sp] + add r1, r2, #0 + ldr r0, [r0, #0x10] + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0225D840 + + thumb_func_start ov16_0225D8AC +ov16_0225D8AC: ; 0x0225D8AC + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x1c + add r4, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #0xe] + str r6, [r1, #0] + ldrb r0, [r4] + strb r0, [r1, #0xc] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + strb r0, [r1, #0xd] + add r0, r5, #0 + add r0, #0x28 + str r0, [r1, #4] + ldrh r0, [r4, #2] + str r0, [r1, #0x10] + ldrb r0, [r4, #1] + strb r0, [r1, #0xf] + ldr r0, [r4, #4] + strh r0, [r1, #0x18] + ldr r0, [r4, #8] + str r0, [r1, #0x14] + ldr r0, [r5, #0x14] + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225D8AC + + thumb_func_start ov16_0225D8F0 +ov16_0225D8F0: ; 0x0225D8F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + bl ov16_0223E060 + str r0, [sp] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r6, [r4, #0] + ldrb r0, [r5] + mov r1, #0x65 + lsl r1, r1, #2 + strb r0, [r4, #4] + ldrb r0, [r7, r1] + strb r0, [r4, #5] + ldrh r2, [r5, #2] + lsl r0, r2, #1 + add r2, r2, r0 + add r0, sp, #4 + strh r2, [r0, #2] + mov r2, #2 + strb r2, [r0, #1] + ldrb r0, [r5, #1] + ldrb r1, [r7, r1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [sp, #8] + add r0, r6, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r1, [sp] + add r0, r6, #0 + add r2, sp, #4 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225D954 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225D954: .word ov16_02262F7C + thumb_func_end ov16_0225D8F0 + + thumb_func_start ov16_0225D958 +ov16_0225D958: ; 0x0225D958 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + bl ov16_0223E05C + str r0, [sp] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + add r0, r6, #0 + str r5, [r4, #0] + add r0, #0x94 + ldrb r0, [r0] + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + add r2, r7, #0 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225D9A4 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225D9A4: .word ov16_02262F7C + thumb_func_end ov16_0225D958 + + thumb_func_start ov16_0225D9A8 +ov16_0225D9A8: ; 0x0225D9A8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x70 + add r4, r2, #0 + bl sub_02018144 + add r6, r0, #0 + mov r1, #0 + add r0, #0x6a + strb r1, [r0] + str r7, [r6, #0] + add r0, r5, #0 + str r5, [r6, #4] + add r0, #0x94 + ldrb r1, [r0] + add r0, r6, #0 + add r0, #0x68 + strb r1, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + add r0, r6, #0 + add r0, #0x69 + strb r1, [r0] + add r0, r7, #0 + bl ov16_0223E008 + add r3, r6, #0 + str r0, [r6, #0xc] + add r7, r4, #0 + add r3, #0x10 + mov r2, #0xb +_0225D9EC: + ldmia r7!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0225D9EC + ldr r0, [r5, #0x20] + str r0, [r6, #8] + ldr r0, [r4, #0x4c] + cmp r0, #1 + bne _0225DA0C + ldr r0, [r4, #0x50] + cmp r0, #0x19 + bne _0225DA0C + mov r0, #0x1a + mov r1, #1 + lsl r0, r0, #4 + str r1, [r5, r0] +_0225DA0C: + ldr r0, [r4, #0x4c] + cmp r0, #1 + bne _0225DA20 + ldr r0, [r4, #0x50] + cmp r0, #0x1a + bne _0225DA20 + mov r0, #0x1a + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] +_0225DA20: + ldrh r0, [r4, #2] + add r1, r6, #0 + add r1, #0x6c + str r0, [sp] + add r0, r6, #0 + ldr r2, [r4, #0x4c] + ldr r3, [r4, #0x50] + add r0, #0x6b + bl ov16_022645B8 + ldr r0, _0225DA40 ; =ov16_022626C0 + add r1, r6, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225DA40: .word ov16_022626C0 + thumb_func_end ov16_0225D9A8 + + thumb_func_start ov16_0225DA44 +ov16_0225DA44: ; 0x0225DA44 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0xc + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #9] + str r5, [r1, #0] + ldr r0, [r4, #0x20] + str r0, [r1, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + strb r0, [r1, #8] + ldr r0, _0225DA70 ; =ov16_0226292C + strb r2, [r1, #0xa] + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225DA70: .word ov16_0226292C + thumb_func_end ov16_0225DA44 + + thumb_func_start ov16_0225DA74 +ov16_0225DA74: ; 0x0225DA74 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + ldr r0, [r6, #0x2c] + add r5, r2, #0 + cmp r0, #0 + bne _0225DA86 + bl sub_02022974 +_0225DA86: + add r4, r6, #0 + add r4, #0x28 + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + bl sub_020C4CF4 + str r7, [r4, #0xc] + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x4c + strb r1, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r6, r0] + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r0, r7, #0 + bl ov16_0223DF0C + add r1, r0, #0 + ldr r0, _0225DAF4 ; =0x00000195 + ldrb r0, [r6, r0] + bl ov16_0226825C + add r1, r4, #0 + add r1, #0x25 + strb r0, [r1] + mov r0, #2 + ldrsh r0, [r5, r0] + str r0, [r4, #0x28] + ldrh r0, [r5, #4] + str r0, [r4, #0x2c] + ldr r0, [r5, #8] + str r0, [r4, #0x30] + add r0, r4, #0 + ldrb r1, [r5, #1] + add r0, #0x48 + strb r1, [r0] + ldr r1, [r5, #8] + ldr r0, _0225DAF8 ; =0x00007FFF + cmp r1, r0 + bne _0225DAE4 + mov r0, #0 + str r0, [r4, #0x28] + str r0, [r4, #0x30] +_0225DAE4: + mov r2, #0xfa + ldr r0, _0225DAFC ; =ov16_02262988 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225DAF4: .word 0x00000195 +_0225DAF8: .word 0x00007FFF +_0225DAFC: .word ov16_02262988 + thumb_func_end ov16_0225DA74 + + thumb_func_start ov16_0225DB00 +ov16_0225DB00: ; 0x0225DB00 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + ldr r0, [r6, #0x2c] + add r5, r2, #0 + cmp r0, #0 + bne _0225DB12 + bl sub_02022974 +_0225DB12: + add r4, r6, #0 + add r4, #0x28 + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + bl sub_020C4CF4 + str r7, [r4, #0xc] + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x4c + strb r1, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r2, [r6, r0] + add r1, r4, #0 + add r1, #0x24 + strb r2, [r1] + ldr r1, [r5, #4] + add r0, r0, #1 + str r1, [r4, #0x38] + ldr r1, [r5, #0xc] + str r1, [r4, #0x3c] + ldr r2, [r5, #8] + ldr r1, [r4, #0x38] + sub r1, r2, r1 + str r1, [r4, #0x40] + ldrb r0, [r6, r0] + cmp r0, #0 + bne _0225DB5E + mov r2, #0xfa + ldr r0, _0225DB70 ; =ov16_022629DC + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0225DB5E: + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x24 + add r4, #0x4c + ldrb r1, [r1] + ldrb r2, [r4] + bl ov16_02266ABC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225DB70: .word ov16_022629DC + thumb_func_end ov16_0225DB00 + + thumb_func_start ov16_0225DB74 +ov16_0225DB74: ; 0x0225DB74 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x74 + str r2, [sp] + bl sub_02018144 + add r1, r0, #0 + ldr r0, _0225DC44 ; =0x00000195 + ldrb r2, [r4, r0] + mov r0, #1 + tst r0, r2 + beq _0225DB94 + mov r2, #2 + b _0225DB96 +_0225DB94: + mov r2, #0 +_0225DB96: + add r0, r1, #0 + add r0, #0x67 + strb r2, [r0] + add r2, r1, #0 + mov r0, #0 + add r2, #0x66 + strb r0, [r2] + str r5, [r1, #0] + ldr r2, [sp] + str r4, [r1, #4] + ldrb r3, [r2] + add r2, r1, #0 + add r2, #0x64 + strb r3, [r2] + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r3, [r4, r2] + add r2, r1, #0 + add r2, #0x65 + strb r3, [r2] + ldr r2, [r4, #0x20] + add r7, r1, #0 + str r2, [r1, #8] + ldr r2, [sp] + ldrh r3, [r2, #2] + add r2, r1, #0 + add r2, #0x68 + strh r3, [r2] + ldr r2, [sp] + ldrb r3, [r2, #1] + add r2, r1, #0 + add r2, #0x6a + strb r3, [r2] + ldr r2, [sp] + ldrb r3, [r2, #8] + add r2, r1, #0 + add r2, #0x6b + strb r3, [r2] + ldr r2, [sp] + ldr r2, [r2, #4] + str r2, [r1, #0x6c] + ldr r2, [sp] + ldrb r3, [r2, #9] + add r2, r1, #0 + add r2, #0x70 + strh r3, [r2] + ldr r2, [sp] + ldrb r3, [r2, #0xa] + add r2, r1, #0 + add r2, #0x72 + strh r3, [r2] + ldr r2, [sp] + add r3, r1, #0 + mov ip, r2 +_0225DC02: + mov r4, ip + ldrh r4, [r4, #0xc] + strh r4, [r7, #0x24] + ldr r4, [sp] + add r7, r7, #2 + add r6, r4, r0 + add r4, r1, r0 + ldrb r5, [r6, #0x14] + add r4, #0x2c + strb r5, [r4] + add r4, r1, r0 + ldrb r5, [r6, #0x18] + add r4, #0x30 + strb r5, [r4] + add r4, r1, r0 + ldrb r5, [r6, #0x1c] + add r4, #0x34 + add r0, r0, #1 + strb r5, [r4] + ldr r4, [r2, #0x20] + add r2, r2, #4 + str r4, [r3, #0x38] + mov r4, ip + add r4, r4, #2 + add r3, r3, #4 + mov ip, r4 + cmp r0, #4 + blt _0225DC02 + ldr r0, _0225DC48 ; =ov16_02262A9C + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225DC44: .word 0x00000195 +_0225DC48: .word ov16_02262A9C + thumb_func_end ov16_0225DB74 + + thumb_func_start ov16_0225DC4C +ov16_0225DC4C: ; 0x0225DC4C + push {r3, r4, r5, lr} + add r5, r2, #0 + ldr r2, _0225DC78 ; =0x00000195 + mov r4, #1 + ldrb r2, [r1, r2] + tst r2, r4 + beq _0225DC5E + mov r4, #0x75 + b _0225DC60 +_0225DC5E: + sub r4, #0x76 +_0225DC60: + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r1, [r1, r2] + ldrb r2, [r5] + bl ov16_02266ABC + ldrh r0, [r5, #2] + add r1, r4, #0 + bl sub_02005728 + pop {r3, r4, r5, pc} + nop +_0225DC78: .word 0x00000195 + thumb_func_end ov16_0225DC4C + + thumb_func_start ov16_0225DC7C +ov16_0225DC7C: ; 0x0225DC7C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #6] + add r0, r4, #0 + str r5, [r1, #0] + add r0, #0x94 + ldrb r0, [r0] + strb r0, [r1, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + strb r0, [r1, #5] + ldr r0, _0225DCAC ; =ov16_02262D28 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_0225DCAC: .word ov16_02262D28 + thumb_func_end ov16_0225DC7C + + thumb_func_start ov16_0225DCB0 +ov16_0225DCB0: ; 0x0225DCB0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x68 + str r2, [sp] + bl sub_02018144 + add r1, r0, #0 + str r5, [r1, #0] + ldr r0, [sp] + str r4, [r1, #4] + ldrb r2, [r0] + add r0, r1, #0 + add r0, #0x60 + strb r2, [r0] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r2, [r4, r0] + add r0, r1, #0 + add r0, #0x61 + strb r2, [r0] + add r2, r1, #0 + mov r0, #0 + add r2, #0x62 + strb r0, [r2] + ldr r2, [sp] + add r7, r1, #0 + ldrb r3, [r2, #1] + add r2, r1, #0 + add r2, #0x63 + strb r3, [r2] + ldr r2, [sp] + add r3, r1, #0 + ldrb r2, [r2, #2] + str r2, [r1, #0x64] + ldr r2, [sp] + mov ip, r2 +_0225DCFC: + mov r4, ip + ldrh r4, [r4, #4] + strh r4, [r7, #0x20] + ldr r4, [sp] + add r7, r7, #2 + add r6, r4, r0 + add r4, r1, r0 + ldrb r5, [r6, #0xc] + add r4, #0x28 + strb r5, [r4] + add r4, r1, r0 + ldrb r5, [r6, #0x10] + add r4, #0x2c + strb r5, [r4] + add r4, r1, r0 + ldrb r5, [r6, #0x14] + add r4, #0x30 + add r0, r0, #1 + strb r5, [r4] + ldr r4, [r2, #0x18] + add r2, r2, #4 + str r4, [r3, #0x34] + mov r4, ip + add r4, r4, #2 + add r3, r3, #4 + mov ip, r4 + cmp r0, #4 + blt _0225DCFC + ldr r0, _0225DD40 ; =ov16_02262DC4 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225DD40: .word ov16_02262DC4 + thumb_func_end ov16_0225DCB0 + + thumb_func_start ov16_0225DD44 +ov16_0225DD44: ; 0x0225DD44 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x2c] + add r4, r2, #0 + cmp r0, #0 + bne _0225DD56 + bl sub_02022974 +_0225DD56: + ldrb r1, [r4, #1] + add r0, r5, #0 + add r0, #0x72 + strb r1, [r0] + add r0, r5, #0 + mov r2, #1 + ldr r1, [r5, #0x50] + add r0, #0x28 + lsl r2, r2, #8 + bl ov16_02267084 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + add r0, r6, #0 + bl ov16_02266ABC + pop {r4, r5, r6, pc} + thumb_func_end ov16_0225DD44 + + thumb_func_start ov16_0225DD7C +ov16_0225DD7C: ; 0x0225DD7C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + add r6, r0, #0 + add r7, r2, #0 + bl ov16_0223E0D8 + str r0, [sp, #4] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r6, [r4, #0] + ldrb r0, [r7] + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + strb r0, [r4, #5] + add r0, r6, #0 + bl ov16_0223EDF0 + str r0, [sp] + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r2, [r5, r2] + ldrb r3, [r7, #1] + ldr r1, [sp, #4] + add r0, r6, #0 + bl ov16_0223F9FC + strb r0, [r4, #6] + ldr r0, _0225DDD4 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225DDD4: .word ov16_02262F7C + thumb_func_end ov16_0225DD7C + + thumb_func_start ov16_0225DDD8 +ov16_0225DDD8: ; 0x0225DDD8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r3, sp, #4 + add r6, r1, #0 + add r7, r2, #0 + bl ov16_02263C1C + add r0, r5, #0 + bl ov16_0223E05C + str r0, [sp] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + ldrb r0, [r7] + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + add r2, sp, #4 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225DE2C ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225DE2C: .word ov16_02262F7C + thumb_func_end ov16_0225DDD8 + + thumb_func_start ov16_0225DE30 +ov16_0225DE30: ; 0x0225DE30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r3, sp, #4 + add r6, r1, #0 + add r7, r2, #0 + bl ov16_02263CF0 + add r0, r5, #0 + bl ov16_0223E05C + str r0, [sp] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + ldrb r0, [r7] + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + add r2, sp, #4 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225DE84 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225DE84: .word ov16_02262F7C + thumb_func_end ov16_0225DE30 + + thumb_func_start ov16_0225DE88 +ov16_0225DE88: ; 0x0225DE88 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r2, sp, #0 + add r6, r1, #0 + bl ov16_02263DD0 + add r0, r5, #0 + bl ov16_0223E05C + add r7, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + mov r0, #0x22 + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, sp, #0 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225DED8 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225DED8: .word ov16_02262F7C + thumb_func_end ov16_0225DE88 + + thumb_func_start ov16_0225DEDC +ov16_0225DEDC: ; 0x0225DEDC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r3, sp, #4 + add r6, r1, #0 + add r7, r2, #0 + bl ov16_02263E7C + add r0, r5, #0 + bl ov16_0223E05C + str r0, [sp] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + ldrb r0, [r7] + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r1, [sp] + add r0, r5, #0 + add r2, sp, #4 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225DF30 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225DF30: .word ov16_02262F7C + thumb_func_end ov16_0225DEDC + + thumb_func_start ov16_0225DF34 +ov16_0225DF34: ; 0x0225DF34 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0xc + bl sub_02018144 + add r1, r0, #0 + add r0, r4, #0 + str r5, [r1, #0] + add r0, #0x94 + ldrb r0, [r0] + mov r2, #0 + strb r0, [r1, #8] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + add r4, #0x28 + strb r0, [r1, #9] + strb r2, [r1, #0xa] + ldr r0, _0225DF68 ; =ov16_02262F30 + str r4, [r1, #4] + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_0225DF68: .word ov16_02262F30 + thumb_func_end ov16_0225DF34 + + thumb_func_start ov16_0225DF6C +ov16_0225DF6C: ; 0x0225DF6C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r1, _0225E000 ; =0x00000196 + add r4, r2, #0 + ldrb r2, [r5, r1] + add r6, r0, #0 + cmp r2, #0 + bne _0225DFBE + bl ov16_0223E05C + str r0, [sp] + mov r0, #5 + mov r1, #0xc + bl sub_02018144 + add r7, r0, #0 + str r6, [r7, #0] + ldrb r0, [r4] + strb r0, [r7, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + strb r0, [r7, #5] + mov r0, #0 + strb r0, [r7, #7] + add r0, r6, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r1, [sp] + add r0, r6, #0 + add r2, r4, #4 + bl ov16_0223FB24 + strb r0, [r7, #6] + ldr r0, _0225E004 ; =ov16_02262FC0 + add r1, r7, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_0225DFBE: + cmp r2, #1 + bne _0225DFDA + sub r1, r1, #2 + ldrb r1, [r5, r1] + bl ov16_022661B0 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + add r0, r6, #0 + bl ov16_02266ABC + pop {r3, r4, r5, r6, r7, pc} +_0225DFDA: + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + bne _0225DFF0 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + add r0, r6, #0 + bl ov16_022661B0 +_0225DFF0: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + add r0, r6, #0 + bl ov16_02266ABC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225E000: .word 0x00000196 +_0225E004: .word ov16_02262FC0 + thumb_func_end ov16_0225DF6C + + thumb_func_start ov16_0225E008 +ov16_0225E008: ; 0x0225E008 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r6, #0 + add r4, #0x28 + add r7, r0, #0 + add r5, r2, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #1 + bl sub_020C4BB8 + mov r0, #0x65 + str r7, [r4, #0xc] + lsl r0, r0, #2 + ldrb r1, [r6, r0] + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r0, r7, #0 + bl ov16_0223DF0C + add r1, r0, #0 + ldr r0, _0225E0B8 ; =0x00000195 + ldrb r0, [r6, r0] + bl ov16_0226825C + add r1, r4, #0 + add r1, #0x25 + strb r0, [r1] + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x4c + mov r2, #0 + strb r1, [r0] + mov r0, #2 + ldrsh r0, [r5, r0] + str r0, [r4, #0x28] + ldrh r0, [r5, #4] + str r0, [r4, #0x2c] + add r0, r4, #0 + ldrb r1, [r5, #1] + add r0, #0x48 + strb r1, [r0] + ldrb r0, [r5, #7] + lsl r0, r0, #0x19 + lsr r1, r0, #0x1e + add r0, r4, #0 + add r0, #0x49 + strb r1, [r0] + str r2, [r4, #0x30] + ldr r0, [r5, #8] + sub r2, #0x21 + str r0, [r4, #0x38] + ldr r0, [r5, #0xc] + str r0, [r4, #0x3c] + add r0, r4, #0 + ldrb r1, [r5, #6] + add r0, #0x26 + strb r1, [r0] + ldrb r0, [r5, #7] + lsl r0, r0, #0x1b + lsr r1, r0, #0x1b + add r0, r4, #0 + add r0, #0x4a + strb r1, [r0] + ldrb r0, [r5, #7] + lsl r0, r0, #0x18 + lsr r1, r0, #0x1f + add r0, r4, #0 + add r0, #0x4b + strb r1, [r0] + add r0, r4, #0 + ldr r1, [r5, #0x10] + add r0, #0x27 + strb r1, [r0] + ldr r1, [r4, #0x28] + add r0, r4, #0 + bl ov16_02267084 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x24 + add r4, #0x4c + ldrb r1, [r1] + ldrb r2, [r4] + bl ov16_02266ABC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225E0B8: .word 0x00000195 + thumb_func_end ov16_0225E008 + + thumb_func_start ov16_0225E0BC +ov16_0225E0BC: ; 0x0225E0BC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r4, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #0xa] + str r5, [r1, #0] + ldrb r0, [r4] + strb r0, [r1, #8] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r1, #9] + ldrh r0, [r4, #2] + strh r0, [r1, #0xc] + ldrb r0, [r4, #1] + strb r0, [r1, #0xe] + ldr r0, _0225E0F0 ; =ov16_022633A4 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225E0F0: .word ov16_022633A4 + thumb_func_end ov16_0225E0BC + + thumb_func_start ov16_0225E0F4 +ov16_0225E0F4: ; 0x0225E0F4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r4, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #0xa] + str r6, [r1, #0] + ldr r0, [r5, #0x20] + str r0, [r1, #4] + ldrb r0, [r4] + strb r0, [r1, #8] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + strb r0, [r1, #9] + ldrb r0, [r4, #1] + strb r0, [r1, #0xb] + strb r2, [r1, #0xc] + ldrb r0, [r4, #2] + strb r0, [r1, #0xd] + ldr r0, _0225E130 ; =ov16_022634DC + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_0225E130: .word ov16_022634DC + thumb_func_end ov16_0225E0F4 + + thumb_func_start ov16_0225E134 +ov16_0225E134: ; 0x0225E134 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r4, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r0, #0 + strb r0, [r1, #7] + str r6, [r1, #0] + ldrb r2, [r4] + strb r2, [r1, #4] + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r3, [r5, r2] + add r2, r2, #1 + strb r3, [r1, #5] + ldrb r2, [r5, r2] + strb r2, [r1, #6] +_0225E15E: + add r2, r4, r0 + ldrb r3, [r2, #2] + add r2, r1, r0 + add r0, r0, #1 + strb r3, [r2, #8] + cmp r0, #6 + blt _0225E15E + ldr r0, _0225E178 ; =ov16_0226354C + mov r2, #0 + strb r2, [r1, #0xe] + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225E178: .word ov16_0226354C + thumb_func_end ov16_0225E134 + + thumb_func_start ov16_0225E17C +ov16_0225E17C: ; 0x0225E17C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r6, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #7] + str r5, [r1, #0] + ldrb r0, [r6] + strb r0, [r1, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r3, [r4, r0] + add r0, r0, #1 + strb r3, [r1, #5] + ldrb r0, [r4, r0] + strb r0, [r1, #6] + ldr r0, _0225E1B0 ; =ov16_02263604 + strb r2, [r1, #0xe] + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225E1B0: .word ov16_02263604 + thumb_func_end ov16_0225E17C + + thumb_func_start ov16_0225E1B4 +ov16_0225E1B4: ; 0x0225E1B4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r4, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r0, #0 + strb r0, [r1, #7] + str r6, [r1, #0] + ldrb r2, [r4] + strb r2, [r1, #4] + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r3, [r5, r2] + add r2, r2, #1 + strb r3, [r1, #5] + ldrb r2, [r5, r2] + strb r2, [r1, #6] +_0225E1DE: + add r2, r4, r0 + ldrb r3, [r2, #2] + add r2, r1, r0 + add r0, r0, #1 + strb r3, [r2, #8] + cmp r0, #6 + blt _0225E1DE + mov r0, #1 + strb r0, [r1, #0xe] + ldr r0, _0225E1FC ; =ov16_0226354C + mov r2, #0 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_0225E1FC: .word ov16_0226354C + thumb_func_end ov16_0225E1B4 + + thumb_func_start ov16_0225E200 +ov16_0225E200: ; 0x0225E200 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x10 + add r6, r2, #0 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #7] + str r5, [r1, #0] + ldrb r0, [r6] + strb r0, [r1, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r3, [r4, r0] + add r0, r0, #1 + strb r3, [r1, #5] + ldrb r0, [r4, r0] + strb r0, [r1, #6] + mov r0, #1 + strb r0, [r1, #0xe] + ldr r0, _0225E238 ; =ov16_02263604 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_0225E238: .word ov16_02263604 + thumb_func_end ov16_0225E200 + + thumb_func_start ov16_0225E23C +ov16_0225E23C: ; 0x0225E23C + push {r4, r5, lr} + sub sp, #0x24 + add r4, r1, #0 + ldr r1, _0225E28C ; =0x00000196 + add r5, r0, #0 + ldrb r1, [r4, r1] + cmp r1, #0 + bne _0225E27A + bl ov16_0223E05C + add r1, r0, #0 + ldr r2, _0225E290 ; =0x0000039B + add r0, sp, #0 + strh r2, [r0, #2] + mov r3, #0 + strb r3, [r0, #1] + add r0, r5, #0 + add r2, sp, #0 + bl ov16_0223FB24 + add r0, r5, #0 + mov r1, #0 + bl ov16_0223DF04 + mov r1, #1 + bl sub_0200E7FC + add r1, r0, #0 + add r0, r5, #0 + bl ov16_0223F2A4 +_0225E27A: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r5, #0 + mov r2, #0x37 + bl ov16_02266ABC + add sp, #0x24 + pop {r4, r5, pc} + ; .align 2, 0 +_0225E28C: .word 0x00000196 +_0225E290: .word 0x0000039B + thumb_func_end ov16_0225E23C + + thumb_func_start ov16_0225E294 +ov16_0225E294: ; 0x0225E294 + push {r4, r5, r6, lr} + sub sp, #0x50 + mov r3, #0x65 + add r4, r1, #0 + lsl r3, r3, #2 + add r6, r2, #0 + ldrb r3, [r4, r3] + add r1, r6, #0 + add r2, sp, #0 + add r5, r0, #0 + bl ov16_02264530 + add r0, sp, #0 + mov r1, #5 + bl ov12_022382BC + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + ldrb r2, [r6] + add r0, r5, #0 + bl ov16_02266ABC + add sp, #0x50 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225E294 + + thumb_func_start ov16_0225E2C8 +ov16_0225E2C8: ; 0x0225E2C8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x10 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #0xe] + str r5, [r1, #0] + add r0, r4, #0 + str r4, [r1, #4] + add r0, #0x94 + ldrb r0, [r0] + strb r0, [r1, #0xc] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + strb r0, [r1, #0xd] + ldr r0, [r4, #0x20] + str r0, [r1, #8] + ldr r0, _0225E2FC ; =ov16_02263688 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225E2FC: .word ov16_02263688 + thumb_func_end ov16_0225E2C8 + + thumb_func_start ov16_0225E300 +ov16_0225E300: ; 0x0225E300 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #5 + mov r1, #0x10 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + strb r2, [r1, #0xe] + str r5, [r1, #0] + add r0, r4, #0 + str r4, [r1, #4] + add r0, #0x94 + ldrb r0, [r0] + strb r0, [r1, #0xc] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + strb r0, [r1, #0xd] + ldr r0, [r4, #0x20] + str r0, [r1, #8] + ldr r0, _0225E334 ; =ov16_022636D4 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225E334: .word ov16_022636D4 + thumb_func_end ov16_0225E300 + + thumb_func_start ov16_0225E338 +ov16_0225E338: ; 0x0225E338 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r2, sp, #0 + add r6, r1, #0 + bl ov16_022641B4 + add r0, r5, #0 + bl ov16_0223E05C + add r7, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + mov r0, #0x3b + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, sp, #0 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225E388 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225E388: .word ov16_02262F7C + thumb_func_end ov16_0225E338 + + thumb_func_start ov16_0225E38C +ov16_0225E38C: ; 0x0225E38C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r3, sp, #0 + add r6, r1, #0 + bl ov16_02264270 + add r0, r5, #0 + bl ov16_0223E05C + add r7, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + mov r0, #0x3c + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, sp, #0 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225E3DC ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225E3DC: .word ov16_02262F7C + thumb_func_end ov16_0225E38C + + thumb_func_start ov16_0225E3E0 +ov16_0225E3E0: ; 0x0225E3E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r2, sp, #0 + add r6, r1, #0 + bl ov16_02264360 + add r0, r5, #0 + bl ov16_0223E05C + add r7, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + mov r0, #0x3d + strb r0, [r4, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + strb r0, [r4, #5] + add r0, r5, #0 + bl ov16_0223EDF0 + add r3, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, sp, #0 + bl ov16_0223FB24 + strb r0, [r4, #6] + ldr r0, _0225E430 ; =ov16_02262F7C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225E430: .word ov16_02262F7C + thumb_func_end ov16_0225E3E0 + + thumb_func_start ov16_0225E434 +ov16_0225E434: ; 0x0225E434 + push {r4, r5, r6, lr} + sub sp, #0x50 + mov r3, #0x65 + add r4, r1, #0 + lsl r3, r3, #2 + add r6, r2, #0 + ldrb r3, [r4, r3] + add r1, r6, #0 + add r2, sp, #0 + add r5, r0, #0 + bl ov16_02264530 + add r0, sp, #0 + mov r1, #5 + bl ov12_02238390 + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + ldrb r2, [r6] + add r0, r5, #0 + bl ov16_02266ABC + add sp, #0x50 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225E434 + + thumb_func_start ov16_0225E468 +ov16_0225E468: ; 0x0225E468 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + ldr r0, _0225E4B8 ; =0x00000195 + mov r1, #1 + ldrb r0, [r5, r0] + add r4, r2, #0 + tst r0, r1 + beq _0225E47E + mov r1, #0x75 + b _0225E480 +_0225E47E: + sub r1, #0x76 +_0225E480: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225E490 + cmp r0, #1 + beq _0225E4A0 + cmp r0, #2 + beq _0225E498 + b _0225E4A6 +_0225E490: + ldr r0, _0225E4BC ; =0x000006FE + bl sub_02005728 + b _0225E4A6 +_0225E498: + ldr r0, _0225E4C0 ; =0x000006FC + bl sub_02005728 + b _0225E4A6 +_0225E4A0: + ldr r0, _0225E4C4 ; =0x000006FD + bl sub_02005728 +_0225E4A6: + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + add r0, r6, #0 + bl ov16_02266ABC + pop {r4, r5, r6, pc} + nop +_0225E4B8: .word 0x00000195 +_0225E4BC: .word 0x000006FE +_0225E4C0: .word 0x000006FC +_0225E4C4: .word 0x000006FD + thumb_func_end ov16_0225E468 + + thumb_func_start ov16_0225E4C8 +ov16_0225E4C8: ; 0x0225E4C8 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r6, r0, #0 + ldrh r0, [r4, #2] + add r5, r1, #0 + bl sub_0200549C + mov r1, #0x65 + lsl r1, r1, #2 + ldrb r1, [r5, r1] + ldrb r2, [r4] + add r0, r6, #0 + bl ov16_02266ABC + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225E4C8 + + thumb_func_start ov16_0225E4E8 +ov16_0225E4E8: ; 0x0225E4E8 + push {r3, r4, r5, r6, lr} + sub sp, #0x74 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + ldrb r1, [r4, #0x12] + add r5, r0, #0 + cmp r1, #4 + bls _0225E500 + b _0225E872 +_0225E500: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225E50C: ; jump table + .short _0225E516 - _0225E50C - 2 ; case 0 + .short _0225E520 - _0225E50C - 2 ; case 1 + .short _0225E52E - _0225E50C - 2 ; case 2 + .short _0225E802 - _0225E50C - 2 ; case 3 + .short _0225E856 - _0225E50C - 2 ; case 4 +_0225E516: + mov r0, #0x1c + str r0, [r4, #0x20] + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] +_0225E520: + ldr r0, [r4, #0x20] + sub r0, r0, #1 + str r0, [r4, #0x20] + bne _0225E5F4 + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] +_0225E52E: + ldrb r0, [r4, #0x13] + add r1, sp, #0x18 + cmp r0, #2 + ldr r0, [r4, #0xc] + beq _0225E53A + b _0225E6B4 +_0225E53A: + add r2, sp, #0x14 + ldr r0, [r0, #0] + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #0x1c] + cmp r0, #1 + beq _0225E54E + cmp r0, #3 + bne _0225E570 +_0225E54E: + add r1, sp, #0x14 + mov r0, #4 + ldrsh r0, [r1, r0] + cmp r0, #0xc0 + ldr r0, [r4, #0xc] + bge _0225E566 + ldr r0, [r0, #0] + mov r1, #8 + mov r2, #0 + bl sub_0200D5DC + b _0225E570 +_0225E566: + ldr r0, [r0, #0] + mov r1, #0xc0 + mov r2, #0x58 + bl sub_0200D4C4 +_0225E570: + ldr r0, [r4, #0xc] + add r2, sp, #0x14 + ldr r0, [r0, #0] + add r1, sp, #0x18 + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #0x1c] + cmp r0, #1 + bne _0225E594 + add r3, sp, #0x14 + mov r2, #4 + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02007DEC + b _0225E5E4 +_0225E594: + cmp r0, #3 + bne _0225E5BE + ldr r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + add r3, sp, #0x14 + mov r2, #4 + ldrsh r1, [r3, r2] + sub r0, r0, r1 + strh r0, [r3, #4] + ldrsh r0, [r3, r2] + mov r1, #0 + sub r0, #0x18 + strh r0, [r3, #4] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + neg r2, r2 + bl sub_02008274 + b _0225E5E4 +_0225E5BE: + cmp r0, #5 + bne _0225E5E4 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + add r3, sp, #0x14 + mov r2, #4 + ldrsh r1, [r3, r2] + sub r0, r1, r0 + strh r0, [r3, #4] + ldrsh r0, [r3, r2] + mov r1, #0 + sub r0, #0x10 + strh r0, [r3, #4] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_02008274 +_0225E5E4: + ldr r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + mov r1, #0x14 + ldrsh r1, [r4, r1] + cmp r0, r1 + bge _0225E5F6 +_0225E5F4: + b _0225E88E +_0225E5F6: + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #8] + mov r1, #0x2c + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #0x2d + mov r2, #0 + bl sub_02007DEC + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + ldrb r0, [r4, #0x13] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldrb r0, [r4, #0x11] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r4, #0x16] + ldr r2, [r4, #8] + bl sub_020789F4 + mov r0, #0x69 + ldr r3, [r4, #0x1c] + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x14 + lsl r3, r3, #0x10 + ldrh r2, [r4, #0x16] + add r1, #1 + lsr r3, r3, #0x10 + bl sub_02078A4C + ldrb r1, [r4, #0x11] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x75 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x14 + ldrb r1, [r1, #1] + add r3, r4, #0 + add r3, #0x2c + str r1, [sp, #0x10] + ldrh r2, [r4, #0x16] + ldrb r3, [r3] + ldr r1, [r4, #0x18] + bl sub_02077DB4 + ldr r0, [r4, #0x1c] + cmp r0, #1 + beq _0225E690 + cmp r0, #3 + bne _0225E69C +_0225E690: + ldr r0, [r4, #0xc] + mov r1, #0xc0 + ldr r0, [r0, #0] + mov r2, #0x58 + bl sub_0200D4C4 +_0225E69C: + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #8] + mov r1, #8 + add r3, r2, #0 + bl sub_020086FC + ldrb r0, [r4, #0x12] + add sp, #0x74 + add r0, r0, #1 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225E6B4: + add r2, sp, #0x14 + ldr r0, [r0, #0] + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0225E6C8 + cmp r0, #2 + bne _0225E6EA +_0225E6C8: + add r0, sp, #0x14 + mov r1, #4 + ldrsh r0, [r0, r1] + cmp r0, #0x40 + ldr r0, [r4, #0xc] + ble _0225E6E0 + ldr r0, [r0, #0] + sub r1, #0xc + mov r2, #0 + bl sub_0200D5DC + b _0225E6EA +_0225E6E0: + ldr r0, [r0, #0] + mov r1, #0x40 + mov r2, #0x88 + bl sub_0200D4C4 +_0225E6EA: + ldr r0, [r4, #0xc] + add r2, sp, #0x14 + ldr r0, [r0, #0] + add r1, sp, #0x18 + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #0x1c] + cmp r0, #0 + bne _0225E70E + add r3, sp, #0x14 + mov r2, #4 + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02007DEC + b _0225E75E +_0225E70E: + cmp r0, #2 + bne _0225E736 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + add r3, sp, #0x14 + mov r2, #4 + ldrsh r1, [r3, r2] + sub r0, r1, r0 + strh r0, [r3, #4] + ldrsh r0, [r3, r2] + mov r1, #0 + sub r0, #0x18 + strh r0, [r3, #4] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_02008274 + b _0225E75E +_0225E736: + cmp r0, #4 + bne _0225E75E + ldr r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + add r3, sp, #0x14 + mov r2, #4 + ldrsh r1, [r3, r2] + sub r0, r0, r1 + strh r0, [r3, #4] + ldrsh r0, [r3, r2] + mov r1, #0 + sub r0, #0x10 + strh r0, [r3, #4] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + neg r2, r2 + bl sub_02008274 +_0225E75E: + mov r0, #0x14 + ldrsh r5, [r4, r0] + ldr r0, [r4, #8] + mov r1, #0 + bl sub_020080C0 + cmp r0, r5 + ble _0225E770 + b _0225E88E +_0225E770: + ldr r0, [r4, #8] + mov r1, #0 + add r2, r5, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + ldrb r0, [r4, #0x13] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldrb r0, [r4, #0x11] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r4, #0x16] + ldr r2, [r4, #8] + bl sub_020789F4 + mov r0, #0x69 + ldr r3, [r4, #0x1c] + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r3, r3, #0x10 + ldrh r2, [r4, #0x16] + add r1, sp, #0x14 + lsr r3, r3, #0x10 + bl sub_02078A4C + ldrb r1, [r4, #0x11] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x74 + mvn r1, r1 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x14 + ldrb r1, [r1] + add r3, r4, #0 + add r3, #0x2c + str r1, [sp, #0x10] + ldrh r2, [r4, #0x16] + ldrb r3, [r3] + ldr r1, [r4, #0x18] + bl sub_02077DB4 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0225E7EC + cmp r0, #2 + bne _0225E7F8 +_0225E7EC: + ldr r0, [r4, #0xc] + mov r1, #0x40 + ldr r0, [r0, #0] + mov r2, #0x88 + bl sub_0200D4C4 +_0225E7F8: + ldrb r0, [r4, #0x12] + add sp, #0x74 + add r0, r0, #1 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225E802: + ldr r0, [r4, #0] + bl ov16_0223EE28 + ldrb r1, [r4, #0x11] + bl sub_020160F4 + cmp r0, #1 + bne _0225E88E + ldr r0, [r4, #8] + bl sub_02007C24 + cmp r0, #0 + bne _0225E88E + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _0225E84E + ldrb r1, [r4, #0x11] + mov r0, #0xb + add r2, sp, #0x1c + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x1c + bl ov16_02264408 + mov r0, #4 + add sp, #0x74 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225E84E: + mov r0, #0xff + add sp, #0x74 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225E856: + bl ov12_0222016C + add r0, r5, #0 + bl ov12_02220188 + cmp r0, #0 + bne _0225E88E + add r0, r5, #0 + bl ov12_02220198 + mov r0, #0xff + add sp, #0x74 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225E872: + mov r0, #0 + bl sub_02005454 + ldrb r1, [r4, #0x11] + ldrb r2, [r4, #0x10] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0225E88E: + add sp, #0x74 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0225E4E8 + + thumb_func_start ov16_0225E894 +ov16_0225E894: ; 0x0225E894 + push {r3, r4, r5, r6, lr} + sub sp, #0x74 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + ldrb r1, [r4, #0x12] + add r5, r0, #0 + cmp r1, #4 + bls _0225E8AC + b _0225EA60 +_0225E8AC: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225E8B8: ; jump table + .short _0225E8C2 - _0225E8B8 - 2 ; case 0 + .short _0225E8CC - _0225E8B8 - 2 ; case 1 + .short _0225E8DA - _0225E8B8 - 2 ; case 2 + .short _0225E9F0 - _0225E8B8 - 2 ; case 3 + .short _0225EA44 - _0225E8B8 - 2 ; case 4 +_0225E8C2: + mov r0, #0x1c + str r0, [r4, #0x20] + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] +_0225E8CC: + ldr r0, [r4, #0x20] + sub r0, r0, #1 + str r0, [r4, #0x20] + bne _0225E93C + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] +_0225E8DA: + ldr r0, [r4, #0xc] + add r2, sp, #0x14 + ldr r0, [r0, #0] + add r1, sp, #0x18 + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #0x1c] + cmp r0, #1 + beq _0225E8F2 + cmp r0, #3 + bne _0225E914 +_0225E8F2: + add r1, sp, #0x14 + mov r0, #4 + ldrsh r0, [r1, r0] + cmp r0, #0xc0 + ldr r0, [r4, #0xc] + bge _0225E90A + ldr r0, [r0, #0] + mov r1, #8 + mov r2, #0 + bl sub_0200D5DC + b _0225E914 +_0225E90A: + ldr r0, [r0, #0] + mov r1, #0xc0 + mov r2, #0x58 + bl sub_0200D4C4 +_0225E914: + ldr r0, [r4, #0xc] + add r2, sp, #0x14 + ldr r0, [r0, #0] + add r1, sp, #0x18 + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #8] + mov r1, #1 + mov r2, #4 + bl sub_02008274 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + mov r1, #0x14 + ldrsh r1, [r4, r1] + cmp r0, r1 + bge _0225E93E +_0225E93C: + b _0225EA7C +_0225E93E: + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #8] + mov r1, #0x2c + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #0x2d + mov r2, #0 + bl sub_02007DEC + mov r2, #0x14 + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02007DEC + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + ldrb r0, [r4, #0x13] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldrb r0, [r4, #0x11] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r4, #0x16] + ldr r2, [r4, #8] + bl sub_020789F4 + mov r0, #0x69 + ldr r3, [r4, #0x1c] + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r3, r3, #0x10 + ldrh r2, [r4, #0x16] + add r1, sp, #0x14 + lsr r3, r3, #0x10 + bl sub_02078A4C + ldrb r1, [r4, #0x11] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x75 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x14 + ldrb r1, [r1] + add r3, r4, #0 + add r3, #0x2c + str r1, [sp, #0x10] + ldrh r2, [r4, #0x16] + ldrb r3, [r3] + ldr r1, [r4, #0x18] + bl sub_02077DB4 + ldr r0, [r4, #0xc] + mov r1, #0xc0 + ldr r0, [r0, #0] + mov r2, #0x58 + bl sub_0200D4C4 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #8] + mov r1, #8 + add r3, r2, #0 + bl sub_020086FC + ldrb r0, [r4, #0x12] + add sp, #0x74 + add r0, r0, #1 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225E9F0: + ldr r0, [r4, #0] + bl ov16_0223EE28 + ldrb r1, [r4, #0x11] + bl sub_020160F4 + cmp r0, #1 + bne _0225EA7C + ldr r0, [r4, #8] + bl sub_02007C24 + cmp r0, #0 + bne _0225EA7C + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _0225EA3C + ldrb r1, [r4, #0x11] + mov r0, #0xb + add r2, sp, #0x1c + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x1c + bl ov16_02264408 + mov r0, #4 + add sp, #0x74 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225EA3C: + mov r0, #0xff + add sp, #0x74 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225EA44: + bl ov12_0222016C + add r0, r5, #0 + bl ov12_02220188 + cmp r0, #0 + bne _0225EA7C + add r0, r5, #0 + bl ov12_02220198 + mov r0, #0xff + add sp, #0x74 + strb r0, [r4, #0x12] + pop {r3, r4, r5, r6, pc} +_0225EA60: + mov r0, #0 + bl sub_02005454 + ldrb r1, [r4, #0x11] + ldrb r2, [r4, #0x10] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0225EA7C: + add sp, #0x74 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov16_0225E894 + + thumb_func_start ov16_0225EA80 +ov16_0225EA80: ; 0x0225EA80 + push {r4, r5, lr} + sub sp, #0xb4 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + cmp r0, #7 + bls _0225EA94 + b _0225F094 +_0225EA94: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225EAA0: ; jump table + .short _0225EAB0 - _0225EAA0 - 2 ; case 0 + .short _0225EB36 - _0225EAA0 - 2 ; case 1 + .short _0225EB7A - _0225EAA0 - 2 ; case 2 + .short _0225ECE0 - _0225EAA0 - 2 ; case 3 + .short _0225ECFC - _0225EAA0 - 2 ; case 4 + .short _0225EFD4 - _0225EAA0 - 2 ; case 5 + .short _0225EFE8 - _0225EAA0 - 2 ; case 6 + .short _0225F06E - _0225EAA0 - 2 ; case 7 +_0225EAB0: + add r0, r4, #0 + mov r1, #0 + add r0, #0x96 + strb r1, [r0] + str r1, [r4, #0x10] + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + ldr r0, [r4, #0] + beq _0225EAE8 + bl ov16_0223EBEC + mov r1, #0x20 + tst r0, r1 + bne _0225EB26 + add r0, r4, #0 + add r0, #0x82 + ldrb r0, [r0] + cmp r0, #2 + bne _0225EB26 + ldr r0, [r4, #0] + mov r1, #5 + bl ov12_02223764 + str r0, [r4, #0x10] + b _0225EB26 +_0225EAE8: + bl ov16_0223EBEC + mov r1, #0x20 + tst r0, r1 + bne _0225EB26 + ldr r0, [r4, #0] + bl ov16_0223ED60 + cmp r0, #1 + bne _0225EB12 + add r0, r4, #0 + add r0, #0x82 + ldrb r0, [r0] + cmp r0, #2 + bne _0225EB12 + ldr r0, [r4, #0] + mov r1, #5 + bl ov12_02223764 + str r0, [r4, #0x10] + b _0225EB26 +_0225EB12: + add r0, r4, #0 + add r0, #0x82 + ldrb r0, [r0] + cmp r0, #0 + bne _0225EB26 + ldr r0, [r4, #0] + mov r1, #5 + bl ov12_02223764 + str r0, [r4, #0x10] +_0225EB26: + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0xb4 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0225EB36: + add r1, sp, #0x50 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + add r0, #0x82 + ldrb r0, [r0] + add r1, r4, #0 + add r2, r4, #0 + str r0, [sp, #0x50] + add r1, #0x81 + add r2, #0x8c + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_0223DFAC + str r0, [sp, #0x58] + mov r0, #5 + add r1, sp, #0x50 + bl ov12_02236004 + str r0, [r4, #8] + bl ov12_02236320 + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0xb4 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0225EB7A: + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237890 + cmp r0, #0 + bne _0225EBC2 + ldr r0, [r4, #8] + bl ov12_02236374 + cmp r0, #1 + bne _0225EBC2 + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237810 + cmp r0, #1 + bne _0225EBC2 + add r0, r4, #0 + add r0, #0x82 + ldrb r0, [r0] + cmp r0, #4 + bne _0225EBCC + add r0, r4, #0 + add r0, #0x96 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x96 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x96 + ldrb r0, [r0] + cmp r0, #0xc + bhs _0225EBC4 +_0225EBC2: + b _0225F0B8 +_0225EBC4: + add r0, r4, #0 + mov r1, #0 + add r0, #0x96 + strb r1, [r0] +_0225EBCC: + ldr r0, [r4, #0] + bl ov16_0223E000 + add r2, r4, #0 + add r3, r4, #0 + add r5, r0, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldrh r2, [r2] + ldrb r3, [r3] + add r1, sp, #0x28 + bl sub_020789BC + add r0, r4, #0 + add r0, #0x82 + ldrb r3, [r0] + mov r0, #6 + add r2, r4, #0 + add r1, r3, #0 + mul r1, r0 + ldr r0, _0225EEE8 ; =0x0223B0BA + add r2, #0x14 + ldrsh r0, [r0, r1] + str r0, [sp] + ldr r0, _0225EEEC ; =0x0223B0BC + ldrsh r0, [r0, r1] + add r1, r5, #0 + lsl r5, r3, #2 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x85 + ldrb r0, [r0] + ldr r3, _0225EEF0 ; =0x0223B0A0 + str r0, [sp, #8] + mov r0, #0x90 + ldrsb r0, [r4, r0] + ldrsh r3, [r3, r5] + str r0, [sp, #0xc] + mov r0, #0x91 + ldrsb r0, [r4, r0] + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0x93 + ldrb r0, [r0] + str r0, [sp, #0x14] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #0x18] + add r0, sp, #0x28 + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [r4, #0] + bl ov16_02263B30 + ldr r1, [r4, #4] + mov r2, #0 + str r0, [r1, #0x20] + ldr r0, [r4, #4] + mov r1, #0xc + ldr r0, [r0, #0x20] + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #0xd + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #0x2c + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #6 + ldr r0, [r0, #0x20] + mov r2, #1 + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + mov r3, #0 + lsl r1, r0, #1 + ldr r0, _0225EEF4 ; =0x0226F1AE + ldrh r0, [r0, r1] + mov r1, #0x10 + add r2, r1, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_020086FC + ldr r0, [r4, #4] + mov r1, #6 + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + bl ov12_022363B4 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, _0225EEF8 ; =0x00000706 + bne _0225ECBA + mov r1, #0x75 + bl sub_02005728 + b _0225ECC2 +_0225ECBA: + mov r1, #0x74 + mvn r1, r1 + bl sub_02005728 +_0225ECC2: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _0225ECD0 + bl ov12_02223770 + mov r0, #0 + str r0, [r4, #0x10] +_0225ECD0: + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0xb4 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, pc} +_0225ECE0: + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_022377F8 + cmp r0, #1 + beq _0225ECFC + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x83 + strb r1, [r0] +_0225ECFC: + ldr r0, [r4, #4] + mov r1, #0xc + ldr r0, [r0, #0x20] + bl sub_020080C0 + mov r1, #1 + lsl r1, r1, #8 + cmp r0, r1 + bne _0225ED18 + ldr r0, [r4, #8] + bl ov12_022363C4 + cmp r0, #0 + beq _0225ED1A +_0225ED18: + b _0225EE44 +_0225ED1A: + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, [r4, #4] + bne _0225ED90 + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #4] + mov r1, #0x2d + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x24 + ldrh r2, [r2] + ldrb r3, [r3] + add r1, #3 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x75 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1, #3] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 + b _0225EDEE +_0225ED90: + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x24 + ldrh r2, [r2] + ldrb r3, [r3] + add r1, #2 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x74 + mvn r1, r1 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1, #2] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 +_0225EDEE: + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x86 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r3] + ldr r2, [r2, #0x20] + bl sub_020789F4 + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + mov r2, #0 + add r3, r2, #0 + lsl r1, r0, #1 + ldr r0, _0225EEF4 ; =0x0226F1AE + ldrh r0, [r0, r1] + mov r1, #0x10 + str r0, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_020086FC + mov r0, #5 + add r4, #0x83 + add sp, #0xb4 + strb r0, [r4] + pop {r4, r5, pc} +_0225EE44: + ldr r0, [r4, #4] + mov r1, #0xc + ldr r0, [r0, #0x20] + bl sub_020080C0 + mov r2, #1 + lsl r2, r2, #8 + cmp r0, r2 + ldr r0, [r4, #4] + bge _0225EE5A + b _0225EFAE +_0225EE5A: + ldr r0, [r0, #0x20] + mov r1, #0xc + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r0, #0x20] + add r2, #0xf3 + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, [r4, #4] + bne _0225EEFC + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #4] + mov r1, #0x2d + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x24 + ldrh r2, [r2] + ldrb r3, [r3] + add r1, #1 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x75 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1, #1] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 + b _0225EF58 + nop +_0225EEE8: .word 0x0223B0BA +_0225EEEC: .word 0x0223B0BC +_0225EEF0: .word 0x0223B0A0 +_0225EEF4: .word 0x0226F1AE +_0225EEF8: .word 0x00000706 +_0225EEFC: + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldrh r2, [r2] + ldrb r3, [r3] + add r1, sp, #0x24 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x74 + mvn r1, r1 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 +_0225EF58: + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x86 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r3] + ldr r2, [r2, #0x20] + bl sub_020789F4 + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + mov r2, #0 + mov r3, #1 + lsl r1, r0, #1 + ldr r0, _0225F0BC ; =0x0226F1AE + ldrh r0, [r0, r1] + mov r1, #0x10 + str r0, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_020086FC + mov r0, #5 + add r4, #0x83 + add sp, #0xb4 + strb r0, [r4] + pop {r4, r5, pc} +_0225EFAE: + ldr r0, [r0, #0x20] + mov r1, #0xc + mov r2, #0x20 + bl sub_02008274 + ldr r0, [r4, #4] + mov r1, #0xd + ldr r0, [r0, #0x20] + mov r2, #0x20 + bl sub_02008274 + ldr r0, [r4, #4] + mov r1, #0x90 + ldrsb r1, [r4, r1] + ldr r0, [r0, #0x20] + bl sub_020087C8 + add sp, #0xb4 + pop {r4, r5, pc} +_0225EFD4: + ldr r0, [r4, #8] + bl ov12_022363C4 + cmp r0, #0 + bne _0225F0B8 + mov r0, #6 + add r4, #0x83 + add sp, #0xb4 + strb r0, [r4] + pop {r4, r5, pc} +_0225EFE8: + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + bl sub_020160F4 + cmp r0, #1 + bne _0225F0B8 + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_02007C24 + cmp r0, #0 + bne _0225F0B8 + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_0223783C + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x88 + str r1, [r0, #0] + ldr r0, [r4, #8] + bl ov12_02236428 + add r0, r4, #0 + add r0, #0x92 + ldrb r0, [r0] + cmp r0, #0 + beq _0225F064 + mov r0, #5 + bl ov12_0221FCDC + str r0, [r4, #0x24] + add r0, r4, #0 + add r0, #0x81 + ldrb r1, [r0] + mov r0, #0xb + add r2, sp, #0x5c + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #0x24] + add r3, sp, #0x5c + bl ov16_02264408 + mov r0, #7 + add r4, #0x83 + add sp, #0xb4 + strb r0, [r4] + pop {r4, r5, pc} +_0225F064: + mov r0, #0xff + add r4, #0x83 + add sp, #0xb4 + strb r0, [r4] + pop {r4, r5, pc} +_0225F06E: + ldr r0, [r4, #0x24] + bl ov12_0222016C + ldr r0, [r4, #0x24] + bl ov12_02220188 + cmp r0, #0 + bne _0225F0B8 + ldr r0, [r4, #0x24] + bl ov12_02220198 + ldr r0, [r4, #0x24] + bl ov12_0221FDF4 + mov r0, #0xff + add r4, #0x83 + add sp, #0xb4 + strb r0, [r4] + pop {r4, r5, pc} +_0225F094: + mov r0, #0 + bl sub_02005454 + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x81 + add r2, #0x80 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0225F0B8: + add sp, #0xb4 + pop {r4, r5, pc} + ; .align 2, 0 +_0225F0BC: .word 0x0226F1AE + thumb_func_end ov16_0225EA80 + + thumb_func_start ov16_0225F0C0 +ov16_0225F0C0: ; 0x0225F0C0 + push {r3, r4, r5, r6, lr} + sub sp, #0x1dc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r1, r4, #0 + add r1, #0x83 + ldrb r1, [r1] + add r5, r0, #0 + cmp r1, #0xb + bls _0225F0DC + b _0225F73E +_0225F0DC: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225F0E8: ; jump table + .short _0225F100 - _0225F0E8 - 2 ; case 0 + .short _0225F21A - _0225F0E8 - 2 ; case 1 + .short _0225F266 - _0225F0E8 - 2 ; case 2 + .short _0225F2F4 - _0225F0E8 - 2 ; case 3 + .short _0225F30C - _0225F0E8 - 2 ; case 4 + .short _0225F5EA - _0225F0E8 - 2 ; case 5 + .short _0225F5FE - _0225F0E8 - 2 ; case 6 + .short _0225F672 - _0225F0E8 - 2 ; case 7 + .short _0225F696 - _0225F0E8 - 2 ; case 8 + .short _0225F672 - _0225F0E8 - 2 ; case 9 + .short _0225F6E2 - _0225F0E8 - 2 ; case 10 + .short _0225F672 - _0225F0E8 - 2 ; case 11 +_0225F100: + add r0, r4, #0 + add r0, #0x82 + ldrb r1, [r0] + ldr r0, _0225F440 ; =0x0226F174 + ldrb r0, [r0, r1] + str r0, [sp, #0x5c] + mov r0, #5 + str r0, [sp, #0x60] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #0x68] + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + str r0, [sp, #0x6c] + ldr r0, [r4, #0] + bl ov16_0223E010 + str r0, [sp, #0x78] + ldr r0, [r4, #0] + bl ov16_0223E064 + str r0, [sp, #0x7c] + mov r2, #1 + mov r1, #0 + add r0, r4, #0 + str r2, [sp, #0x70] + str r1, [sp, #0x74] + add r0, #0x94 + ldrh r0, [r0] + cmp r0, #1 + bne _0225F146 + str r2, [sp, #0x64] + b _0225F148 +_0225F146: + str r1, [sp, #0x64] +_0225F148: + add r0, sp, #0x5c + bl ov12_02237728 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_0223E000 + add r2, r4, #0 + add r3, r4, #0 + add r5, r0, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldrh r2, [r2] + ldrb r3, [r3] + add r1, sp, #0x34 + bl sub_020789BC + add r0, r4, #0 + add r0, #0x82 + ldrb r3, [r0] + mov r0, #6 + add r2, r4, #0 + add r1, r3, #0 + mul r1, r0 + ldr r0, _0225F444 ; =0x0223B0BA + add r2, #0x14 + ldrsh r0, [r0, r1] + str r0, [sp] + ldr r0, _0225F448 ; =0x0223B0BC + ldrsh r0, [r0, r1] + add r1, r5, #0 + lsl r5, r3, #2 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x85 + ldrb r0, [r0] + ldr r3, _0225F44C ; =0x0223B0A0 + str r0, [sp, #8] + mov r0, #0x90 + ldrsb r0, [r4, r0] + ldrsh r3, [r3, r5] + str r0, [sp, #0xc] + mov r0, #0x91 + ldrsb r0, [r4, r0] + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0x93 + ldrb r0, [r0] + str r0, [sp, #0x14] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #0x18] + add r0, sp, #0x34 + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [r4, #0] + bl ov16_02263B30 + ldr r1, [r4, #4] + mov r2, #0 + str r0, [r1, #0x20] + ldr r0, [r4, #4] + mov r1, #0xc + ldr r0, [r0, #0x20] + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #0xd + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #0x2c + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #6 + ldr r0, [r0, #0x20] + mov r2, #1 + bl sub_02007DEC + mov r0, #0 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + mov r1, #5 + bl ov12_02223764 + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0x1dc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F21A: + add r1, sp, #0x28 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + add r0, #0x82 + ldrb r0, [r0] + add r1, r4, #0 + add r2, r4, #0 + str r0, [sp, #0x28] + add r1, #0x81 + add r2, #0x8c + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_0223DFAC + str r0, [sp, #0x30] + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + add r1, sp, #0x28 + str r0, [sp, #0x2c] + mov r0, #5 + bl ov12_02236004 + str r0, [r4, #8] + bl ov12_02236320 + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0x1dc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F266: + ldr r0, [r4, #0xc] + bl ov12_02237890 + cmp r0, #0 + beq _0225F27A + add r0, r4, #0 + add r0, #0x94 + ldrh r0, [r0] + cmp r0, #0 + beq _0225F28E +_0225F27A: + ldr r0, [r4, #8] + bl ov12_02236374 + cmp r0, #1 + bne _0225F28E + ldr r0, [r4, #0xc] + bl ov12_02237810 + cmp r0, #1 + beq _0225F290 +_0225F28E: + b _0225F75C +_0225F290: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _0225F29A + bl ov12_02223770 +_0225F29A: + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + mov r3, #0 + lsl r1, r0, #1 + ldr r0, _0225F450 ; =0x0226F1AE + ldrh r0, [r0, r1] + mov r1, #0x10 + add r2, r1, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_020086FC + ldr r0, [r4, #4] + mov r1, #6 + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #8] + bl ov12_022363B4 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, _0225F454 ; =0x00000706 + bne _0225F2DC + mov r1, #0x75 + bl sub_02005728 + b _0225F2E4 +_0225F2DC: + mov r1, #0x74 + mvn r1, r1 + bl sub_02005728 +_0225F2E4: + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0x1dc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F2F4: + ldr r0, [r4, #0xc] + bl ov12_022377F8 + cmp r0, #1 + beq _0225F30C + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x83 + strb r1, [r0] +_0225F30C: + ldr r0, [r4, #4] + mov r1, #0xc + ldr r0, [r0, #0x20] + bl sub_020080C0 + mov r1, #1 + lsl r1, r1, #8 + cmp r0, r1 + bne _0225F328 + ldr r0, [r4, #8] + bl ov12_022363C4 + cmp r0, #0 + beq _0225F32A +_0225F328: + b _0225F470 +_0225F32A: + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, [r4, #4] + bne _0225F3A0 + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #4] + mov r1, #0x2d + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x24 + ldrh r2, [r2] + ldrb r3, [r3] + add r1, #3 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x75 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1, #3] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 + b _0225F3FE +_0225F3A0: + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x24 + ldrh r2, [r2] + ldrb r3, [r3] + add r1, #2 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x74 + mvn r1, r1 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1, #2] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 +_0225F3FE: + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x86 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r3] + ldr r2, [r2, #0x20] + bl sub_020789F4 + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + mov r2, #0 + add r3, r2, #0 + lsl r1, r0, #1 + ldr r0, _0225F450 ; =0x0226F1AE + b _0225F458 + nop +_0225F440: .word 0x0226F174 +_0225F444: .word 0x0223B0BA +_0225F448: .word 0x0223B0BC +_0225F44C: .word 0x0223B0A0 +_0225F450: .word 0x0226F1AE +_0225F454: .word 0x00000706 +_0225F458: + ldrh r0, [r0, r1] + mov r1, #0x10 + str r0, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_020086FC + mov r0, #5 + add r4, #0x83 + add sp, #0x1dc + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F470: + ldr r0, [r4, #4] + mov r1, #0xc + ldr r0, [r0, #0x20] + bl sub_020080C0 + mov r2, #1 + lsl r2, r2, #8 + cmp r0, r2 + ldr r0, [r4, #4] + bge _0225F486 + b _0225F5C4 +_0225F486: + ldr r0, [r0, #0x20] + mov r1, #0xc + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r0, #0x20] + add r2, #0xf3 + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, [r4, #4] + bne _0225F512 + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #4] + mov r1, #0x2d + ldr r0, [r0, #0x20] + mov r2, #0 + bl sub_02007DEC + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x24 + ldrh r2, [r2] + ldrb r3, [r3] + add r1, #1 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x75 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1, #1] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 + b _0225F56E +_0225F512: + ldr r0, [r0, #0x20] + mov r1, #1 + bl sub_02007B98 + add r2, r4, #0 + add r3, r4, #0 + mov r0, #0x69 + add r2, #0x86 + add r3, #0x82 + ldr r1, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldrh r2, [r2] + ldrb r3, [r3] + add r1, sp, #0x24 + bl sub_02078A4C + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + mov r1, #0x74 + mvn r1, r1 + str r1, [sp] + mov r1, #0x7f + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0x24 + ldrb r1, [r1] + add r2, r4, #0 + add r3, r4, #0 + str r1, [sp, #0x10] + add r1, r4, #0 + add r2, #0x86 + add r3, #0x97 + add r1, #0x88 + ldrh r2, [r2] + ldrb r3, [r3] + ldr r1, [r1, #0] + bl sub_02077DB4 +_0225F56E: + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x86 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x81 + ldrb r0, [r0] + str r0, [sp, #8] + mov r0, #0x69 + ldr r2, [r4, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldrh r3, [r3] + ldr r2, [r2, #0x20] + bl sub_020789F4 + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + mov r2, #0 + mov r3, #1 + lsl r1, r0, #1 + ldr r0, _0225F760 ; =0x0226F1AE + ldrh r0, [r0, r1] + mov r1, #0x10 + str r0, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_020086FC + mov r0, #5 + add r4, #0x83 + add sp, #0x1dc + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F5C4: + ldr r0, [r0, #0x20] + mov r1, #0xc + mov r2, #0x20 + bl sub_02008274 + ldr r0, [r4, #4] + mov r1, #0xd + ldr r0, [r0, #0x20] + mov r2, #0x20 + bl sub_02008274 + ldr r0, [r4, #4] + mov r1, #0x90 + ldrsb r1, [r4, r1] + ldr r0, [r0, #0x20] + bl sub_020087C8 + add sp, #0x1dc + pop {r3, r4, r5, r6, pc} +_0225F5EA: + ldr r0, [r4, #8] + bl ov12_022363C4 + cmp r0, #0 + bne _0225F61E + mov r0, #6 + add r4, #0x83 + add sp, #0x1dc + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F5FE: + ldr r0, [r4, #0] + bl ov16_0223EE28 + add r1, r4, #0 + add r1, #0x81 + ldrb r1, [r1] + bl sub_020160F4 + cmp r0, #1 + bne _0225F61E + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl sub_02007C24 + cmp r0, #0 + beq _0225F620 +_0225F61E: + b _0225F75C +_0225F620: + ldr r0, [r4, #0xc] + bl ov12_0223783C + ldr r0, [r4, #8] + bl ov12_02236428 + add r0, r4, #0 + add r0, #0x92 + ldrb r0, [r0] + cmp r0, #0 + beq _0225F668 + add r0, r4, #0 + add r0, #0x81 + ldrb r1, [r0] + mov r0, #0xb + add r2, sp, #0x184 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x184 + bl ov16_02264408 + mov r0, #7 + add r4, #0x83 + add sp, #0x1dc + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F668: + mov r0, #8 + add r4, #0x83 + add sp, #0x1dc + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F672: + bl ov12_0222016C + add r0, r5, #0 + bl ov12_02220188 + cmp r0, #0 + bne _0225F75C + add r0, r5, #0 + bl ov12_02220198 + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0x1dc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F696: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0225F6D8 + add r0, r4, #0 + add r0, #0x81 + ldrb r1, [r0] + mov r0, #0xf + add r2, sp, #0x12c + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x12c + bl ov16_02264408 + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0x1dc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F6D8: + mov r0, #0xff + add r4, #0x83 + add sp, #0x1dc + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F6E2: + add r3, r4, #0 + add r3, #0x81 + ldrb r3, [r3] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x28 + add r2, sp, #0xdc + bl ov16_02264530 + add r0, sp, #0xdc + mov r1, #5 + bl ov12_02238390 + add r0, r4, #0 + add r0, #0x81 + ldrb r1, [r0] + mov r0, #0x10 + add r2, sp, #0x84 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x84 + bl ov16_02264408 + mov r0, #0x1a + ldr r1, [r4, #4] + mov r2, #1 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + add r0, #0x83 + ldrb r0, [r0] + add r4, #0x83 + add sp, #0x1dc + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_0225F73E: + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x81 + add r2, #0x80 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0225F75C: + add sp, #0x1dc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0225F760: .word 0x0226F1AE + thumb_func_end ov16_0225F0C0 + + thumb_func_start ov16_0225F764 +ov16_0225F764: ; 0x0225F764 + push {r4, r5, r6, lr} + sub sp, #0x178 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r1, r4, #0 + add r1, #0x6b + ldrb r1, [r1] + add r5, r0, #0 + cmp r1, #8 + bhi _0225F84E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225F78A: ; jump table + .short _0225F79C - _0225F78A - 2 ; case 0 + .short _0225F840 - _0225F78A - 2 ; case 1 + .short _0225F7E4 - _0225F78A - 2 ; case 2 + .short _0225F840 - _0225F78A - 2 ; case 3 + .short _0225F866 - _0225F78A - 2 ; case 4 + .short _0225F958 - _0225F78A - 2 ; case 5 + .short _0225F972 - _0225F78A - 2 ; case 6 + .short _0225F9B2 - _0225F78A - 2 ; case 7 + .short _0225F9CC - _0225F78A - 2 ; case 8 +_0225F79C: + ldr r0, [r4, #0x70] + cmp r0, #0 + beq _0225F7DA + add r0, r4, #0 + add r0, #0x69 + ldrb r1, [r0] + mov r0, #0xf + add r2, sp, #0x120 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x120 + bl ov16_02264408 + add r0, r4, #0 + add r0, #0x6b + ldrb r0, [r0] + add r4, #0x6b + add sp, #0x178 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F7DA: + mov r0, #4 + add r4, #0x6b + add sp, #0x178 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F7E4: + add r3, r4, #0 + add r3, #0x69 + ldrb r3, [r3] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x10 + add r2, sp, #0xd0 + bl ov16_02264530 + add r0, sp, #0xd0 + mov r1, #5 + bl ov12_022382BC + add r0, r4, #0 + add r0, #0x69 + ldrb r1, [r0] + mov r0, #0x10 + add r2, sp, #0x78 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x78 + bl ov16_02264408 + mov r0, #0x1a + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + add r0, #0x6b + ldrb r0, [r0] + add r4, #0x6b + add sp, #0x178 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F840: + bl ov12_0222016C + add r0, r5, #0 + bl ov12_02220188 + cmp r0, #0 + beq _0225F850 +_0225F84E: + b _0225F9EA +_0225F850: + add r0, r5, #0 + bl ov12_02220198 + add r0, r4, #0 + add r0, #0x6b + ldrb r0, [r0] + add r4, #0x6b + add sp, #0x178 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F866: + add r0, r4, #0 + add r0, #0x6a + ldrb r5, [r0] + mov r0, #1 + tst r0, r5 + beq _0225F8AE + ldr r0, _0225F9F0 ; =0x0226F174 + ldrb r0, [r0, r5] + str r0, [sp, #0x50] + mov r0, #5 + str r0, [sp, #0x54] + str r0, [sp, #0x58] + add r0, r4, #0 + add r0, #0x69 + ldrb r0, [r0] + str r0, [sp, #0x5c] + add r0, r4, #0 + add r0, #0x6e + ldrh r0, [r0] + str r0, [sp, #0x60] + ldr r0, [r4, #0] + bl ov16_0223E010 + str r0, [sp, #0x6c] + ldr r0, [r4, #0] + bl ov16_0223E064 + str r0, [sp, #0x70] + mov r0, #1 + str r0, [sp, #0x64] + mov r0, #0 + str r0, [sp, #0x68] + add r0, sp, #0x50 + bl ov12_02237728 + b _0225F8FA +_0225F8AE: + ldr r3, _0225F9F4 ; =0x0226F17C + add r2, sp, #0x10 + add r6, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + lsl r0, r5, #2 + ldr r0, [r6, r0] + str r0, [sp, #0x28] + mov r0, #5 + str r0, [sp, #0x2c] + str r0, [sp, #0x30] + add r0, r4, #0 + add r0, #0x69 + ldrb r0, [r0] + str r0, [sp, #0x34] + add r0, r4, #0 + add r0, #0x6e + ldrh r0, [r0] + str r0, [sp, #0x38] + ldr r0, [r4, #0] + bl ov16_0223E010 + str r0, [sp, #0x44] + ldr r0, [r4, #0] + bl ov16_0223E064 + str r0, [sp, #0x48] + mov r0, #1 + str r0, [sp, #0x3c] + mov r0, #0 + str r0, [sp, #0x40] + add r0, sp, #0x28 + bl ov12_02237728 +_0225F8FA: + str r0, [r4, #0xc] + add r0, r4, #0 + mov r1, #5 + add r0, #0x6b + strb r1, [r0] + add r0, r4, #0 + add r0, #0x6e + ldrh r0, [r0] + mov r2, #0x10 + lsl r1, r0, #1 + ldr r0, _0225F9F8 ; =0x0226F1AE + ldrh r0, [r0, r1] + mov r1, #0 + add r3, r1, #0 + str r0, [sp] + ldr r0, [r4, #8] + bl sub_020086FC + add r4, #0x6a + ldrb r0, [r4] + cmp r0, #5 + bhi _0225F9EA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225F932: ; jump table + .short _0225F93E - _0225F932 - 2 ; case 0 + .short _0225F94C - _0225F932 - 2 ; case 1 + .short _0225F93E - _0225F932 - 2 ; case 2 + .short _0225F94C - _0225F932 - 2 ; case 3 + .short _0225F93E - _0225F932 - 2 ; case 4 + .short _0225F94C - _0225F932 - 2 ; case 5 +_0225F93E: + mov r1, #0x74 + ldr r0, _0225F9FC ; =0x00000706 + mvn r1, r1 + bl sub_02005728 + add sp, #0x178 + pop {r4, r5, r6, pc} +_0225F94C: + ldr r0, _0225F9FC ; =0x00000706 + mov r1, #0x75 + bl sub_02005728 + add sp, #0x178 + pop {r4, r5, r6, pc} +_0225F958: + ldr r0, [r4, #8] + bl sub_020087B4 + cmp r0, #0 + bne _0225F9EA + add r0, r4, #0 + add r0, #0x6b + ldrb r0, [r0] + add r4, #0x6b + add sp, #0x178 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F972: + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #8] + sub r2, #0x2c + bl sub_02008274 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #8] + sub r2, #0x2d + bl sub_02008274 + add r1, r4, #0 + add r1, #0x6c + ldrb r1, [r1] + ldr r0, [r4, #8] + bl sub_020087C8 + ldr r0, [r4, #8] + mov r1, #0xc + bl sub_020080C0 + cmp r0, #0 + bgt _0225F9EA + ldr r0, [r4, #8] + bl sub_02007DC8 + mov r0, #7 + add r4, #0x6b + add sp, #0x178 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F9B2: + ldr r0, [r4, #0xc] + bl ov12_022377F8 + cmp r0, #0 + bne _0225F9EA + ldr r0, [r4, #0xc] + bl ov12_0223783C + mov r0, #8 + add r4, #0x6b + add sp, #0x178 + strb r0, [r4] + pop {r4, r5, r6, pc} +_0225F9CC: + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x69 + add r2, #0x68 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0225F9EA: + add sp, #0x178 + pop {r4, r5, r6, pc} + nop +_0225F9F0: .word 0x0226F174 +_0225F9F4: .word 0x0226F17C +_0225F9F8: .word 0x0226F1AE +_0225F9FC: .word 0x00000706 + thumb_func_end ov16_0225F764 + + thumb_func_start ov16_0225FA00 +ov16_0225FA00: ; 0x0225FA00 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xb] + cmp r0, #0 + beq _0225FA12 + cmp r0, #1 + beq _0225FA58 + pop {r3, r4, r5, pc} +_0225FA12: + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, #4] + sub r2, #0x2c + bl sub_02008274 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #4] + sub r2, #0x2d + bl sub_02008274 + ldrb r0, [r4, #0xc] + cmp r0, #0 + beq _0225FA3E + sub r0, r0, #1 + strb r0, [r4, #0xc] + mov r1, #1 + ldr r0, [r4, #4] + sub r2, r1, #2 + bl sub_02008274 +_0225FA3E: + ldr r0, [r4, #4] + mov r1, #0xc + bl sub_020080C0 + cmp r0, #0 + bgt _0225FA6E + ldr r0, [r4, #4] + bl sub_02007DC8 + ldrb r0, [r4, #0xb] + add r0, r0, #1 + strb r0, [r4, #0xb] + pop {r3, r4, r5, pc} +_0225FA58: + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0225FA6E: + pop {r3, r4, r5, pc} + thumb_func_end ov16_0225FA00 + + thumb_func_start ov16_0225FA70 +ov16_0225FA70: ; 0x0225FA70 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF0C + add r5, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0x21 + bge _0225FAAC + ldrb r0, [r4, #0xe] + cmp r0, #2 + blo _0225FAAC + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0225FA96 + cmp r0, #2 + bne _0225FAAC +_0225FA96: + ldr r0, [r4, #0] + bl ov16_0223DF00 + mov r1, #3 + mov r2, #1 + mov r3, #4 + bl sub_02019184 + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] +_0225FAAC: + ldrb r0, [r4, #0xe] + cmp r0, #4 + bls _0225FAB4 + b _0225FD58 +_0225FAB4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225FAC0: ; jump table + .short _0225FACA - _0225FAC0 - 2 ; case 0 + .short _0225FAEC - _0225FAC0 - 2 ; case 1 + .short _0225FAF8 - _0225FAC0 - 2 ; case 2 + .short _0225FD28 - _0225FAC0 - 2 ; case 3 + .short _0225FD42 - _0225FAC0 - 2 ; case 4 +_0225FACA: + ldr r0, [r4, #8] + bl sub_0200D358 + cmp r0, #2 + bls _0225FAE4 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_0200D3CC + ldr r0, [r4, #8] + mov r1, #2 + bl sub_0200D364 +_0225FAE4: + mov r0, #0x1c + str r0, [r4, #0x18] + mov r0, #1 + strb r0, [r4, #0xe] +_0225FAEC: + ldr r0, [r4, #0x18] + sub r0, r0, #1 + str r0, [r4, #0x18] + bne _0225FBE2 + mov r0, #2 + strb r0, [r4, #0xe] +_0225FAF8: + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + add r1, sp, #0 + ldr r0, [r4, #8] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + ldrb r0, [r4, #0xf] + cmp r0, #2 + ldr r0, [r4, #0x14] + beq _0225FB1C + b _0225FC36 +_0225FB1C: + cmp r0, #1 + beq _0225FB24 + cmp r0, #3 + bne _0225FB46 +_0225FB24: + add r1, sp, #0 + mov r0, #6 + ldrsh r0, [r1, r0] + cmp r0, #0xc0 + ldr r0, [r4, #4] + bge _0225FB3C + ldr r0, [r0, #0] + mov r1, #8 + mov r2, #0 + bl sub_0200D5DC + b _0225FB46 +_0225FB3C: + ldr r0, [r0, #0] + mov r1, #0xc0 + mov r2, #0x58 + bl sub_0200D4C4 +_0225FB46: + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + ldr r0, [r4, #0x14] + cmp r0, #1 + beq _0225FB6A + cmp r0, #3 + bne _0225FB7C + cmp r5, #3 + beq _0225FB6A + cmp r5, #0x83 + beq _0225FB6A + cmp r5, #7 + bne _0225FB7C +_0225FB6A: + add r3, sp, #0 + mov r1, #6 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_0200D4C4 + b _0225FBC8 +_0225FB7C: + cmp r0, #3 + bne _0225FBA6 + add r2, sp, #0 + mov r0, #2 + mov r1, #6 + ldrsh r3, [r2, r0] + ldrsh r0, [r2, r1] + sub r0, r3, r0 + strh r0, [r2, #6] + ldrsh r0, [r2, r1] + sub r0, #0x18 + strh r0, [r2, #6] + ldrsh r1, [r2, r1] + ldr r0, [r4, #8] + mov r2, #0 + neg r1, r1 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + bl sub_0200D5DC + b _0225FBC8 +_0225FBA6: + cmp r0, #5 + bne _0225FBC8 + add r2, sp, #0 + mov r1, #6 + mov r0, #2 + ldrsh r3, [r2, r1] + ldrsh r0, [r2, r0] + sub r0, r3, r0 + strh r0, [r2, #6] + ldrsh r0, [r2, r1] + sub r0, #0x10 + strh r0, [r2, #6] + ldrsh r1, [r2, r1] + ldr r0, [r4, #8] + mov r2, #0 + bl sub_0200D5DC +_0225FBC8: + add r1, sp, #0 + ldr r0, [r4, #8] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + mov r0, #0x10 + ldrsh r1, [r4, r0] + add r3, sp, #0 + mov r0, #2 + ldrsh r0, [r3, r0] + cmp r0, r1 + bge _0225FBE4 +_0225FBE2: + b _0225FD58 +_0225FBE4: + mov r2, #0 + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_0200D4C4 + ldr r0, [r4, #0x14] + cmp r0, #1 + beq _0225FBF8 + cmp r0, #3 + bne _0225FC04 +_0225FBF8: + ldr r0, [r4, #4] + mov r1, #0xc0 + ldr r0, [r0, #0] + mov r2, #0x58 + bl sub_0200D4C4 +_0225FC04: + ldr r0, [r4, #8] + bl sub_0200D358 + cmp r0, #1 + bls _0225FC2E + ldr r0, [r4, #8] + mov r1, #0 + bl sub_0200D3CC + ldr r0, [r4, #8] + mov r1, #1 + bl sub_0200D364 + ldrh r1, [r4, #0x12] + mov r0, #1 + add sp, #8 + bic r1, r0 + strh r1, [r4, #0x12] + mov r0, #3 + strb r0, [r4, #0xe] + pop {r4, r5, r6, pc} +_0225FC2E: + mov r0, #4 + add sp, #8 + strb r0, [r4, #0xe] + pop {r4, r5, r6, pc} +_0225FC36: + cmp r0, #0 + beq _0225FC3E + cmp r0, #2 + bne _0225FC60 +_0225FC3E: + add r0, sp, #0 + mov r1, #6 + ldrsh r0, [r0, r1] + cmp r0, #0x40 + ldr r0, [r4, #4] + ble _0225FC56 + ldr r0, [r0, #0] + sub r1, #0xe + mov r2, #0 + bl sub_0200D5DC + b _0225FC60 +_0225FC56: + ldr r0, [r0, #0] + mov r1, #0x40 + mov r2, #0x88 + bl sub_0200D4C4 +_0225FC60: + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0225FC88 + cmp r0, #2 + bne _0225FC9A + cmp r5, #3 + beq _0225FC88 + cmp r5, #0x83 + beq _0225FC88 + cmp r5, #0x13 + beq _0225FC88 + cmp r5, #7 + bne _0225FC9A +_0225FC88: + add r3, sp, #0 + mov r1, #6 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_0200D4C4 + b _0225FCE6 +_0225FC9A: + cmp r0, #2 + bne _0225FCBE + add r2, sp, #0 + mov r1, #6 + mov r0, #2 + ldrsh r3, [r2, r1] + ldrsh r0, [r2, r0] + sub r0, r3, r0 + strh r0, [r2, #6] + ldrsh r0, [r2, r1] + sub r0, #0x18 + strh r0, [r2, #6] + ldrsh r1, [r2, r1] + ldr r0, [r4, #8] + mov r2, #0 + bl sub_0200D5DC + b _0225FCE6 +_0225FCBE: + cmp r0, #4 + bne _0225FCE6 + add r2, sp, #0 + mov r0, #2 + mov r1, #6 + ldrsh r3, [r2, r0] + ldrsh r0, [r2, r1] + sub r0, r3, r0 + strh r0, [r2, #6] + ldrsh r0, [r2, r1] + sub r0, #0x10 + strh r0, [r2, #6] + ldrsh r1, [r2, r1] + ldr r0, [r4, #8] + mov r2, #0 + neg r1, r1 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + bl sub_0200D5DC +_0225FCE6: + add r1, sp, #0 + ldr r0, [r4, #8] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + mov r0, #0x10 + ldrsh r1, [r4, r0] + add r3, sp, #0 + mov r0, #2 + ldrsh r0, [r3, r0] + cmp r0, r1 + bgt _0225FD58 + mov r2, #0 + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_0200D4C4 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0225FD14 + cmp r0, #2 + bne _0225FD20 +_0225FD14: + ldr r0, [r4, #4] + mov r1, #0x40 + ldr r0, [r0, #0] + mov r2, #0x88 + bl sub_0200D4C4 +_0225FD20: + mov r0, #4 + add sp, #8 + strb r0, [r4, #0xe] + pop {r4, r5, r6, pc} +_0225FD28: + ldr r0, [r4, #8] + bl sub_0200D3B8 + cmp r0, #1 + bne _0225FD3E + ldr r1, [r4, #8] + add r0, r4, #0 + bl ov16_02264650 + cmp r0, #0 + beq _0225FD58 +_0225FD3E: + mov r0, #4 + strb r0, [r4, #0xe] +_0225FD42: + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0225FD58: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0225FA70 + + thumb_func_start ov16_0225FD5C +ov16_0225FD5C: ; 0x0225FD5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x120 + ldr r3, _0225FFE4 ; =0x0226F22C + add r4, r1, #0 + add r5, r0, #0 + add r2, sp, #0x30 + mov r1, #0x78 +_0225FD6A: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _0225FD6A + ldr r0, [r4, #0] + bl ov16_0223DF0C + add r6, r0, #0 + ldrb r0, [r4, #0xa] + cmp r0, #6 + bls _0225FD86 + b _02260266 +_0225FD86: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225FD92: ; jump table + .short _0225FDA0 - _0225FD92 - 2 ; case 0 + .short _0225FE7A - _0225FD92 - 2 ; case 1 + .short _0225FF9E - _0225FD92 - 2 ; case 2 + .short _02260158 - _0225FD92 - 2 ; case 3 + .short _0226020A - _0225FD92 - 2 ; case 4 + .short _02260228 - _0225FD92 - 2 ; case 5 + .short _02260250 - _0225FD92 - 2 ; case 6 +_0225FDA0: + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0225FDAE + mov r0, #1 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_0225FDAE: + cmp r0, #4 + bhi _0225FDC8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225FDBE: ; jump table + .short _0225FDC8 - _0225FDBE - 2 ; case 0 + .short _0225FDC8 - _0225FDBE - 2 ; case 1 + .short _0225FDD6 - _0225FDBE - 2 ; case 2 + .short _0225FDE4 - _0225FDBE - 2 ; case 3 + .short _0225FDF2 - _0225FDBE - 2 ; case 4 +_0225FDC8: + mov r0, #0xf + str r0, [sp, #8] + mov r0, #3 + str r0, [r4, #0x18] + mov r0, #5 + str r0, [sp, #0x18] + b _0225FE00 +_0225FDD6: + mov r0, #0xc + str r0, [sp, #8] + mov r0, #0 + str r0, [r4, #0x18] + ldr r0, _0225FFE8 ; =0x00000111 + str r0, [sp, #0x18] + b _0225FE00 +_0225FDE4: + mov r0, #0xd + str r0, [sp, #8] + mov r0, #0 + str r0, [r4, #0x18] + ldr r0, _0225FFEC ; =0x00000112 + str r0, [sp, #0x18] + b _0225FE00 +_0225FDF2: + mov r0, #0xf + str r0, [sp, #8] + mov r0, #3 + str r0, [r4, #0x18] + mov r0, #0x11 + lsl r0, r0, #4 + str r0, [sp, #0x18] +_0225FE00: + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + ldrb r0, [r4, #9] + str r0, [sp, #0x14] + ldr r0, [r4, #0] + bl ov16_0223E010 + str r0, [sp, #0x24] + ldr r0, [r4, #0] + bl ov16_0223E064 + str r0, [sp, #0x28] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [r4, #0] + str r0, [sp, #0x2c] + add r0, sp, #8 + bl ov12_02237728 + ldr r1, [r4, #4] + add r1, #0x88 + str r0, [r1, #0] + ldr r0, [r4, #4] + mov r1, #0x64 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E34 + ldr r0, [r4, #4] + mov r1, #2 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E40 + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E30 + ldr r0, [r4, #4] + mov r1, #0 + ldr r0, [r0, #0x18] + bl sub_0200D3CC + ldr r0, [r4, #4] + mov r1, #1 + ldr r0, [r0, #0x18] + bl sub_0200D364 + ldr r0, [r4, #4] + mov r1, #1 + ldr r0, [r0, #0x18] + bl sub_0200D390 + mov r0, #3 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_0225FE7A: + ldrb r0, [r4, #0xb] + cmp r0, #2 + ldr r0, [r4, #4] + bne _0225FF7A + ldr r0, [r0, #0x18] + mov r1, #5 + mov r2, #0 + bl sub_0200D5DC + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0x18] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + add r1, sp, #4 + mov r0, #2 + ldrsh r0, [r1, r0] + cmp r0, #0xa0 + blt _0225FF0C + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237890 + cmp r0, #0 + beq _0225FF0C + ldr r0, [r4, #4] + mov r1, #1 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E0C + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_0223786C + mov r0, #2 + tst r0, r6 + beq _0225FF1A + mov r0, #8 + tst r0, r6 + bne _0225FF1A + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF14 + add r4, r0, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #1 + bl ov12_02237E0C + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0 + bl ov12_0223786C + add r4, #0x88 + ldr r0, [r4, #0] + mov r1, #0xc + bl ov12_02237E4C + add sp, #0x120 + pop {r3, r4, r5, r6, r7, pc} +_0225FF0C: + add r1, sp, #4 + mov r0, #2 + ldrsh r1, [r1, r0] + mov r0, #0x4a + lsl r0, r0, #2 + cmp r1, r0 + bge _0225FF1C +_0225FF1A: + b _02260266 +_0225FF1C: + ldr r0, [r4, #0] + bl ov16_0223E018 + add r5, r0, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #0x18] + bl sub_0200D0F4 + ldr r0, [r4, #4] + mov r1, #0 + str r1, [r0, #0x18] + ldr r2, [r4, #4] + ldr r1, _0225FFF0 ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _0225FFF4 ; =0x00004E2F + add r1, r2, r1 + bl sub_0200D070 + ldr r2, [r4, #4] + ldr r1, _0225FFF0 ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _0225FFF8 ; =0x00004E2A + add r1, r2, r1 + bl sub_0200D080 + ldr r2, [r4, #4] + ldr r1, _0225FFF0 ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _0225FFFC ; =0x00004E27 + add r1, r2, r1 + bl sub_0200D090 + ldr r2, [r4, #4] + ldr r1, _0225FFF0 ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _0225FFFC ; =0x00004E27 + add r1, r2, r1 + bl sub_0200D0A0 + mov r0, #6 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_0225FF7A: + ldr r0, [r0, #0x18] + mov r1, #0 + bl sub_0200D3CC + ldr r0, [r4, #4] + mov r1, #1 + ldr r0, [r0, #0x18] + bl sub_0200D364 + ldr r0, [r4, #4] + mov r1, #1 + ldr r0, [r0, #0x18] + bl sub_0200D390 + mov r0, #2 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_0225FF9E: + ldr r0, [r4, #4] + mov r1, #4 + ldr r0, [r0, #0x18] + mvn r1, r1 + mov r2, #0 + bl sub_0200D5DC + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0x18] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + ldr r1, [r4, #4] + add r0, r1, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0225FFC8 + b _022600EC +_0225FFC8: + ldr r0, [r1, #0x18] + bl sub_0200D3E0 + ldr r1, [r4, #0xc] + str r0, [sp] + lsl r5, r0, #2 + mov r0, #0x18 + add r2, r1, #0 + mul r2, r0 + add r0, sp, #0x30 + add r0, r0, r2 + ldrsh r1, [r5, r0] + ldr r0, _02260000 ; =0x00007FFF + b _02260004 + ; .align 2, 0 +_0225FFE4: .word 0x0226F22C +_0225FFE8: .word 0x00000111 +_0225FFEC: .word 0x00000112 +_0225FFF0: .word 0x00000195 +_0225FFF4: .word 0x00004E2F +_0225FFF8: .word 0x00004E2A +_0225FFFC: .word 0x00004E27 +_02260000: .word 0x00007FFF +_02260004: + cmp r1, r0 + beq _022600EC + ldr r0, [r4, #4] + mov r1, #1 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E0C + ldr r1, [r4, #0xc] + mov r0, #0x18 + add r3, r1, #0 + mul r3, r0 + add r2, sp, #0x30 + add r2, r2, r3 + add r7, sp, #4 + mov r1, #2 + ldrsh r1, [r7, r1] + ldrsh r2, [r5, r2] + ldr r0, [r4, #4] + add r1, r1, r2 + mov r2, #0 + ldrsh r7, [r7, r2] + add r2, sp, #0x30 + add r2, #2 + add r2, r2, r3 + ldrsh r2, [r5, r2] + add r0, #0x88 + lsl r1, r1, #0x10 + add r2, r7, r2 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov12_02237E18 + ldr r0, [sp] + cmp r0, #3 + bne _022600EC + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237890 + cmp r0, #0 + beq _022600EC + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_0223786C + ldr r0, [r4, #4] + mov r1, #1 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E30 + mov r0, #2 + tst r0, r6 + beq _022600EC + mov r0, #8 + tst r0, r6 + bne _022600EC + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r1, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF14 + ldr r1, [r4, #0xc] + add r6, r0, #0 + add r3, r1, #0 + mov r0, #0x18 + mul r3, r0 + add r2, sp, #0x30 + add r2, r2, r3 + add r0, r6, #0 + add r0, #0x88 + add r7, sp, #4 + mov r1, #2 + ldrsh r1, [r7, r1] + ldrsh r2, [r5, r2] + ldr r0, [r0, #0] + add r1, r1, r2 + mov r2, #0 + ldrsh r7, [r7, r2] + add r2, sp, #0x30 + add r2, #2 + add r2, r2, r3 + ldrsh r2, [r5, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r7, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl ov12_02237E18 + add r0, r6, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #1 + bl ov12_02237E0C + add r0, r6, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0 + bl ov12_0223786C + add r6, #0x88 + ldr r0, [r6, #0] + mov r1, #1 + bl ov12_02237E30 +_022600EC: + add r1, sp, #4 + mov r0, #2 + ldrsh r1, [r1, r0] + sub r0, #0x2a + cmp r1, r0 + ble _022600FA + b _02260266 +_022600FA: + ldr r0, [r4, #0] + bl ov16_0223E018 + add r5, r0, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #0x18] + bl sub_0200D0F4 + ldr r0, [r4, #4] + mov r1, #0 + str r1, [r0, #0x18] + ldr r2, [r4, #4] + ldr r1, _0226026C ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _02260270 ; =0x00004E2F + add r1, r2, r1 + bl sub_0200D070 + ldr r2, [r4, #4] + ldr r1, _0226026C ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _02260274 ; =0x00004E2A + add r1, r2, r1 + bl sub_0200D080 + ldr r2, [r4, #4] + ldr r1, _0226026C ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _02260278 ; =0x00004E27 + add r1, r2, r1 + bl sub_0200D090 + ldr r2, [r4, #4] + ldr r1, _0226026C ; =0x00000195 + add r0, r5, #0 + ldrb r2, [r2, r1] + ldr r1, _02260278 ; =0x00004E27 + add r1, r2, r1 + bl sub_0200D0A0 + mov r0, #6 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260158: + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0x18] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + ldr r0, [r4, #4] + ldr r0, [r0, #0x18] + bl sub_0200D3E0 + add r7, r0, #0 + cmp r7, #4 + bne _02260180 + mov r0, #8 + str r0, [r4, #0x14] + mov r0, #4 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260180: + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02260266 + ldr r2, [r4, #0xc] + mov r1, #0x18 + add r5, r2, #0 + mul r5, r1 + add r1, sp, #0x30 + lsl r6, r7, #2 + add r1, r1, r5 + ldrsh r1, [r6, r1] + ldr r2, _0226027C ; =0x00007FFF + cmp r1, r2 + beq _02260266 + add r3, sp, #4 + mov r2, #2 + ldrsh r2, [r3, r2] + add r1, r2, r1 + mov r2, #0 + ldrsh r3, [r3, r2] + add r2, sp, #0x30 + add r2, #2 + add r2, r2, r5 + ldrsh r2, [r6, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl ov12_02237E18 + cmp r7, #3 + bne _02260266 + ldr r0, [r4, #4] + ldr r5, [r4, #0x18] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237890 + cmp r5, r0 + beq _02260266 + ldr r0, [r4, #4] + add r1, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_0223786C + ldr r0, [r4, #4] + mov r1, #1 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E40 + ldr r0, [r4, #4] + mov r1, #1 + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_02237E30 + ldr r0, [r4, #0x18] + cmp r0, #3 + beq _02260266 + ldr r0, _02260280 ; =0x0000070A + bl sub_02005748 + add sp, #0x120 + pop {r3, r4, r5, r6, r7, pc} +_0226020A: + ldr r0, [r4, #0x14] + sub r0, r0, #1 + str r0, [r4, #0x14] + bne _02260266 + ldr r0, [r4, #0x18] + cmp r0, #3 + bne _02260220 + mov r0, #6 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260220: + mov r0, #5 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260228: + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_022377F8 + cmp r0, #1 + beq _02260266 + ldr r0, [r4, #4] + add r0, #0x88 + ldr r0, [r0, #0] + bl ov12_0223783C + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x88 + str r1, [r0, #0] + mov r0, #6 + add sp, #0x120 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260250: + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02260266: + add sp, #0x120 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226026C: .word 0x00000195 +_02260270: .word 0x00004E2F +_02260274: .word 0x00004E2A +_02260278: .word 0x00004E27 +_0226027C: .word 0x00007FFF +_02260280: .word 0x0000070A + thumb_func_end ov16_0225FD5C + + thumb_func_start ov16_02260284 +ov16_02260284: ; 0x02260284 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r6, r0, #0 + ldrb r0, [r5, #0xa] + cmp r0, #0 + beq _0226029A + cmp r0, #1 + beq _02260302 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0226029A: + ldrb r0, [r5, #0xb] + cmp r0, #2 + ldr r0, [r5, #4] + bne _022602D2 + ldr r0, [r0, #0x18] + mov r1, #5 + mov r2, #0 + bl sub_0200D5DC + ldr r0, [r5, #4] + add r1, sp, #0 + ldr r0, [r0, #0x18] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r1, [r1, r0] + mov r0, #0x4a + lsl r0, r0, #2 + cmp r1, r0 + blt _0226036E + ldrb r0, [r5, #0xa] + add sp, #4 + add r0, r0, #1 + strb r0, [r5, #0xa] + pop {r3, r4, r5, r6, pc} +_022602D2: + mov r1, #4 + ldr r0, [r0, #0x18] + mvn r1, r1 + mov r2, #0 + bl sub_0200D5DC + ldr r0, [r5, #4] + add r1, sp, #0 + ldr r0, [r0, #0x18] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r1, [r1, r0] + sub r0, #0x2a + cmp r1, r0 + bgt _0226036E + ldrb r0, [r5, #0xa] + add sp, #4 + add r0, r0, #1 + strb r0, [r5, #0xa] + pop {r3, r4, r5, r6, pc} +_02260302: + ldr r0, [r5, #0] + bl ov16_0223E018 + add r4, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0x18] + bl sub_0200D0F4 + ldr r0, [r5, #4] + mov r1, #0 + str r1, [r0, #0x18] + ldr r2, [r5, #4] + ldr r1, _02260374 ; =0x00000195 + add r0, r4, #0 + ldrb r2, [r2, r1] + ldr r1, _02260378 ; =0x00004E2F + add r1, r2, r1 + bl sub_0200D070 + ldr r2, [r5, #4] + ldr r1, _02260374 ; =0x00000195 + add r0, r4, #0 + ldrb r2, [r2, r1] + ldr r1, _0226037C ; =0x00004E2A + add r1, r2, r1 + bl sub_0200D080 + ldr r2, [r5, #4] + ldr r1, _02260374 ; =0x00000195 + add r0, r4, #0 + ldrb r2, [r2, r1] + ldr r1, _02260380 ; =0x00004E27 + add r1, r2, r1 + bl sub_0200D090 + ldr r2, [r5, #4] + ldr r1, _02260374 ; =0x00000195 + add r0, r4, #0 + ldrb r2, [r2, r1] + ldr r1, _02260380 ; =0x00004E27 + add r1, r2, r1 + bl sub_0200D0A0 + ldrb r1, [r5, #9] + ldrb r2, [r5, #8] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0226036E: + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02260374: .word 0x00000195 +_02260378: .word 0x00004E2F +_0226037C: .word 0x00004E2A +_02260380: .word 0x00004E27 + thumb_func_end ov16_02260284 + + thumb_func_start ov16_02260384 +ov16_02260384: ; 0x02260384 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xa] + cmp r0, #0 + beq _02260396 + cmp r0, #1 + beq _022603F2 + pop {r3, r4, r5, pc} +_02260396: + add r1, sp, #0 + ldr r0, [r4, #4] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + ldrb r0, [r4, #0xb] + add r2, sp, #0 + cmp r0, #0 + bne _022603C6 + mov r1, #2 + ldrsh r0, [r2, r1] + add r0, r0, #5 + strh r0, [r2, #2] + mov r0, #0xc + ldrsh r3, [r4, r0] + ldrsh r0, [r2, r1] + cmp r0, r3 + blt _022603E0 + strh r3, [r2, #2] + ldrb r0, [r4, #0xa] + add r0, r0, #1 + strb r0, [r4, #0xa] + b _022603E0 +_022603C6: + mov r1, #2 + ldrsh r0, [r2, r1] + sub r0, r0, #5 + strh r0, [r2, #2] + mov r0, #0xc + ldrsh r3, [r4, r0] + ldrsh r0, [r2, r1] + cmp r0, r3 + bgt _022603E0 + strh r3, [r2, #2] + ldrb r0, [r4, #0xa] + add r0, r0, #1 + strb r0, [r4, #0xa] +_022603E0: + add r3, sp, #0 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #4] + bl sub_0200D4C4 + pop {r3, r4, r5, pc} +_022603F2: + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02260384 + + thumb_func_start ov16_0226040C +ov16_0226040C: ; 0x0226040C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #0 + beq _0226041E + cmp r1, #1 + beq _0226044E + b _02260462 +_0226041E: + add r0, r4, #0 + add r0, #0x4d + ldrb r0, [r0] + cmp r0, #0 + beq _02260436 + add r0, r4, #0 + add r0, #0x4d + ldrb r0, [r0] + add r4, #0x4d + sub r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02260436: + add r0, r4, #0 + mov r1, #0 + bl ov16_022676A8 + add r0, r4, #0 + mov r1, #1 + bl ov16_02267620 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0226044E: + add r0, r4, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0226047E + add r0, r1, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02260462: + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x24 + add r2, #0x4c + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0xc] + bl ov16_02266ABC + mov r0, #0 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_0200DA58 +_0226047E: + pop {r3, r4, r5, pc} + thumb_func_end ov16_0226040C + + thumb_func_start ov16_02260480 +ov16_02260480: ; 0x02260480 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #0 + bne _022604A0 + add r0, r4, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _022604C4 + add r0, r1, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_022604A0: + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x24 + add r2, #0x4c + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0xc] + bl ov16_02266ABC + mov r0, #0 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + mov r1, #0 + bl ov16_02267620 +_022604C4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02260480 + + thumb_func_start ov16_022604C8 +ov16_022604C8: ; 0x022604C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r0, [r4, #0] + bl ov16_0223E02C + add r6, r0, #0 + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223DF14 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + bl ov16_0223DF0C + add r5, r0, #0 + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r1, r0, #0 + ldrb r0, [r4, #9] + cmp r1, r0 + beq _0226050A + ldr r0, [r4, #0] + bl ov16_0223F35C + str r0, [sp, #8] + b _0226050E +_0226050A: + mov r0, #0 + str r0, [sp, #8] +_0226050E: + ldrb r0, [r4, #0xa] + cmp r0, #8 + bls _02260516 + b _02260AB0 +_02260516: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02260522: ; jump table + .short _02260534 - _02260522 - 2 ; case 0 + .short _02260570 - _02260522 - 2 ; case 1 + .short _0226065E - _02260522 - 2 ; case 2 + .short _02260674 - _02260522 - 2 ; case 3 + .short _02260686 - _02260522 - 2 ; case 4 + .short _02260880 - _02260522 - 2 ; case 5 + .short _022608F0 - _02260522 - 2 ; case 6 + .short _02260A24 - _02260522 - 2 ; case 7 + .short _02260A86 - _02260522 - 2 ; case 8 +_02260534: + mov r0, #0 + add r1, r4, #0 + add r2, sp, #0x40 +_0226053A: + ldrh r3, [r1, #0x24] + add r1, r1, #2 + strh r3, [r2] + add r3, r4, r0 + add r3, #0x2c + ldrb r3, [r3] + strh r3, [r2, #8] + add r3, r4, r0 + add r3, #0x30 + ldrb r3, [r3] + add r0, r0, #1 + strh r3, [r2, #0x10] + add r2, r2, #2 + cmp r0, #4 + blt _0226053A + ldr r0, [r4, #0] + bl ov16_0223E02C + add r1, r4, #0 + add r1, #0x34 + ldrb r1, [r1] + add r2, sp, #0x40 + bl ov16_0226AC98 + ldrb r0, [r4, #0xa] + add r0, r0, #1 + strb r0, [r4, #0xa] +_02260570: + ldr r0, [r4, #0] + bl ov16_0223E05C + add r6, r0, #0 + mov r0, #1 + lsl r0, r0, #0xa + add r1, r5, #0 + tst r1, r0 + beq _022605F4 + ldr r0, [r4, #0] + bl ov16_0223F228 + cmp r0, #0 + beq _02260594 + cmp r0, #1 + beq _022605C0 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_02260594: + mov r0, #2 + add r1, sp, #0x10 + strb r0, [r1, #0xd] + add r0, r4, #0 + add r0, #0x23 + ldrb r0, [r0] + ldrb r2, [r4, #9] + mov r3, #0 + lsl r0, r0, #8 + orr r0, r2 + str r0, [sp, #0x20] + ldr r0, _022608C8 ; =0x00000399 + add r2, sp, #0x1c + strh r0, [r1, #0xe] + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov16_0223FB24 + mov r0, #3 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_022605C0: + mov r1, #0 + add r0, sp, #0x10 + strb r1, [r0, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E1B4 + ldr r1, _022608CC ; =0x000004CA + add r1, r0, r1 + add r0, sp, #0x10 + strh r1, [r0, #0xe] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + add r1, r6, #0 + add r2, sp, #0x1c + bl ov16_0223FB24 + add r1, r4, #0 + add r1, #0x35 + strb r0, [r1] + mov r0, #2 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_022605F4: + mov r1, #0x20 + add r2, r5, #0 + tst r2, r1 + beq _02260614 + mov r1, #8 + add r0, sp, #0x10 + strb r1, [r0, #0xd] + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E0D8 + str r0, [sp, #0x20] + ldr r1, _022608D0 ; =0x0000039A + add r0, sp, #0x10 + strh r1, [r0, #0xe] + b _0226064A +_02260614: + lsl r1, r1, #4 + tst r1, r5 + beq _02260632 + mov r1, #8 + add r0, sp, #0x10 + strb r1, [r0, #0xd] + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E0D8 + str r0, [sp, #0x20] + ldr r1, _022608D4 ; =0x000004C6 + add r0, sp, #0x10 + strh r1, [r0, #0xe] + b _0226064A +_02260632: + add r2, r4, #0 + mov r1, #2 + add r3, sp, #0x10 + strb r1, [r3, #0xd] + add r2, #0x23 + ldrb r2, [r2] + ldrb r1, [r4, #9] + sub r0, #0x67 + lsl r2, r2, #8 + orr r1, r2 + str r1, [sp, #0x20] + strh r0, [r3, #0xe] +_0226064A: + ldr r0, [r4, #0] + add r1, r6, #0 + add r2, sp, #0x1c + mov r3, #0 + bl ov16_0223FB24 + mov r0, #3 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_0226065E: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + bl sub_0201D724 + cmp r0, #0 + bne _02260690 + mov r0, #3 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260674: + ldr r0, [r4, #4] + bl ov16_0226757C + ldr r0, [sp, #0xc] + ldr r1, [r4, #0] + bl ov16_02264798 + mov r0, #4 + strb r0, [r4, #0xa] +_02260686: + add r0, r6, #0 + bl ov16_02269348 + cmp r0, #0 + bne _02260692 +_02260690: + b _02260AB0 +_02260692: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + ldrb r1, [r4, #9] + add r0, sp, #0x10 + add r2, r4, #0 + strb r1, [r0, #1] + add r1, r4, #0 + add r1, #0x34 + ldrb r1, [r1] + add r2, #0x3b + strb r1, [r0] + add r1, r4, #0 + add r1, #0x23 + ldrb r1, [r1] + strb r1, [r0, #2] + mov r1, #0x36 + ldrsh r1, [r4, r1] + strh r1, [r0, #4] + ldrh r1, [r4, #0x38] + strh r1, [r0, #6] + add r1, r4, #0 + add r1, #0x3a + ldrb r1, [r1] + strb r1, [r0, #3] + ldrb r1, [r4, #9] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_0223EC58 + add r1, sp, #0x10 + strb r0, [r1, #8] + ldr r1, _022608D8 ; =0x00000197 + ldr r0, [sp, #0xc] + ldrb r0, [r0, r1] + cmp r0, #0 + beq _022607A2 + add r0, r6, #0 + mov r1, #1 + bl ov16_0226BCCC + ldr r0, [r4, #0] + bl ov16_0223EBEC + mov r1, #1 + tst r0, r1 + beq _02260714 + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #6 + bl ov16_02268C04 + b _02260798 +_02260714: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + lsl r1, r1, #8 + tst r0, r1 + beq _02260738 + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0xa + bl ov16_02268C04 + b _02260798 +_02260738: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #0x20 + tst r0, r1 + beq _0226075A + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #8 + bl ov16_02268C04 + b _02260798 +_0226075A: + add r0, sp, #0x10 + ldrb r0, [r0] + cmp r0, #4 + bne _02260784 + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02260784 + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #4 + bl ov16_02268C04 + b _02260798 +_02260784: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #3 + bl ov16_02268C04 +_02260798: + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223F288 + b _02260844 +_022607A2: + ldr r0, [r4, #0] + bl ov16_0223EBEC + mov r1, #1 + tst r0, r1 + beq _022607C4 + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #5 + bl ov16_02268C04 + b _0226083C +_022607C4: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + lsl r1, r1, #8 + tst r0, r1 + beq _022607E8 + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #9 + bl ov16_02268C04 + b _0226083C +_022607E8: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #0x20 + tst r0, r1 + beq _0226080A + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #7 + bl ov16_02268C04 + b _0226083C +_0226080A: + add r0, sp, #0x10 + ldrb r0, [r0] + cmp r0, #4 + beq _02260828 + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #1 + bl ov16_02268C04 + b _0226083C +_02260828: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #2 + bl ov16_02268C04 +_0226083C: + ldr r1, _022608D8 ; =0x00000197 + ldr r0, [sp, #0xc] + mov r2, #1 + strb r2, [r0, r1] +_02260844: + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x1c + bl ov16_0226914C + add r1, r4, #0 + add r2, r4, #0 + add r0, r6, #0 + add r1, #0x10 + add r2, #0x16 + bl ov16_02269168 + add r0, r6, #0 + bl ov16_022691BC + add r0, r7, #0 + bl sub_02006CA8 + add r0, r5, #0 + bl sub_02006CA8 + ldr r0, [sp, #8] + cmp r0, #0 + beq _02260878 + bl ov16_02268468 +_02260878: + mov r0, #5 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260880: + ldr r0, _022608DC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #8 + tst r0, r1 + beq _022608B0 + ldr r0, [r4, #0] + mov r5, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _022608B0 +_02260896: + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov16_0223DF14 + add r0, #0x28 + bl ov16_0226737C + ldr r0, [r4, #0] + add r5, r5, #1 + bl ov16_0223DF1C + cmp r5, r0 + blt _02260896 +_022608B0: + add r0, r6, #0 + bl ov16_0226925C + mov r1, #0 + mvn r1, r1 + str r0, [r4, #0xc] + cmp r0, r1 + beq _02260900 + mov r0, #0xa + strb r0, [r4, #0xb] + ldr r0, _022608E0 ; =0x000005DD + b _022608E4 + ; .align 2, 0 +_022608C8: .word 0x00000399 +_022608CC: .word 0x000004CA +_022608D0: .word 0x0000039A +_022608D4: .word 0x000004C6 +_022608D8: .word 0x00000197 +_022608DC: .word 0x021BF67C +_022608E0: .word 0x000005DD +_022608E4: + bl sub_02005748 + mov r0, #6 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_022608F0: + add r0, r6, #0 + bl ov16_02269348 + cmp r0, #1 + beq _02260902 + ldr r0, [r4, #0xc] + cmp r0, #1 + beq _02260902 +_02260900: + b _02260AB0 +_02260902: + ldr r0, [r4, #0xc] + cmp r0, #4 + bls _0226090A + b _02260A12 +_0226090A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02260916: ; jump table + .short _02260A12 - _02260916 - 2 ; case 0 + .short _02260920 - _02260916 - 2 ; case 1 + .short _02260934 - _02260916 - 2 ; case 2 + .short _02260980 - _02260916 - 2 ; case 3 + .short _022609CC - _02260916 - 2 ; case 4 +_02260920: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + beq _02260A16 + mov r0, #7 + strb r0, [r4, #0xa] + b _02260A16 +_02260934: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r3, #0 + str r3, [sp] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + str r3, [sp, #4] + bl ov16_02268C04 + add r0, r6, #0 + mov r1, #0 + bl ov16_0226BCCC + ldr r0, [sp, #8] + bl ov16_0226846C + ldr r0, [r4, #4] + bl ov16_022675AC + ldr r0, [sp, #0xc] + bl ov16_022647D8 + add r0, r5, #0 + bl sub_02006CA8 + add r0, r7, #0 + bl sub_02006CA8 + b _02260A16 +_02260980: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r3, #0 + str r3, [sp] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + str r3, [sp, #4] + bl ov16_02268C04 + add r0, r6, #0 + mov r1, #0 + bl ov16_0226BCCC + ldr r0, [sp, #8] + bl ov16_0226846C + ldr r0, [r4, #4] + bl ov16_022675AC + ldr r0, [sp, #0xc] + bl ov16_022647D8 + add r0, r5, #0 + bl sub_02006CA8 + add r0, r7, #0 + bl sub_02006CA8 + b _02260A16 +_022609CC: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + add r0, r6, #0 + bl ov16_0226D088 + cmp r0, #1 + bne _022609F4 + ldr r0, [sp, #8] + bl ov16_0226846C + mov r0, #0xff + str r0, [r4, #0xc] +_022609F4: + mov r3, #0 + str r3, [sp] + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + str r3, [sp, #4] + bl ov16_02268C04 + add r0, r7, #0 + bl sub_02006CA8 + add r0, r5, #0 + bl sub_02006CA8 + b _02260A16 +_02260A12: + bl sub_02022974 +_02260A16: + add r0, r6, #0 + bl ov16_02269218 + mov r0, #8 + add sp, #0x58 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, r7, pc} +_02260A24: + add r0, r6, #0 + bl ov16_02269348 + cmp r0, #1 + bne _02260AB0 + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r5, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r3, #0 + str r3, [sp] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + str r3, [sp, #4] + bl ov16_02268C04 + add r0, r6, #0 + mov r1, #0 + bl ov16_0226BCCC + ldr r0, [sp, #8] + bl ov16_0226846C + ldr r0, [r4, #4] + bl ov16_022675AC + ldr r0, [sp, #0xc] + bl ov16_022647D8 + add r0, r6, #0 + bl ov16_02269218 + mov r0, #8 + strb r0, [r4, #0xa] + add r0, r5, #0 + bl sub_02006CA8 + add r0, r7, #0 + bl sub_02006CA8 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_02260A86: + add r0, r6, #0 + bl ov16_0226BCD0 + cmp r0, #1 + bne _02260AB0 + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + ldr r2, [r4, #0xc] + bl ov16_022656D4 + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 +_02260AB0: + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_022604C8 + + thumb_func_start ov16_02260AB4 +ov16_02260AB4: ; 0x02260AB4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #9] + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov14_022243BC + add r2, r0, #0 + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_022656D4 + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02260AB4 + + thumb_func_start ov16_02260AE4 +ov16_02260AE4: ; 0x02260AE4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #9] + add r5, r0, #0 + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02260AE4 + + thumb_func_start ov16_02260B04 +ov16_02260B04: ; 0x02260B04 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223ED6C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF10 + mov r2, #0 + ldrb r1, [r4, #9] + add r3, r2, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r1, #0x1a + bl sub_020759F0 + ldr r2, _02260B7C ; =0x0226F194 + lsl r1, r5, #1 + ldrb r2, [r2, r1] + mul r2, r0 + add r0, r2, #0 + ldr r2, _02260B80 ; =0x0226F195 + ldrb r1, [r2, r1] + bl sub_020E1F6C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F4BC + mov r1, #0xff + bl sub_020E1F6C + cmp r1, r5 + ldr r0, [r4, #0] + bgt _02260B5C + ldrb r1, [r4, #9] + mov r2, #4 + bl ov16_022656D4 + b _02260B64 +_02260B5C: + ldrb r1, [r4, #9] + mov r2, #5 + bl ov16_022656D4 +_02260B64: + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02260B7C: .word 0x0226F194 +_02260B80: .word 0x0226F195 + thumb_func_end ov16_02260B04 + + thumb_func_start ov16_02260B84 +ov16_02260B84: ; 0x02260B84 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #9] + add r5, r0, #0 + ldr r0, [r4, #0] + mov r2, #4 + bl ov16_022656D4 + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02260B84 + + thumb_func_start ov16_02260BAC +ov16_02260BAC: ; 0x02260BAC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #9] + add r5, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02260BC6 + ldr r0, [r4, #0] + bl ov16_0226474C +_02260BC6: + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #0 + beq _02260BD6 + cmp r0, #4 + bhi _02260BD6 + cmp r0, #2 + bne _02260BDC +_02260BD6: + ldr r0, [r4, #0] + bl ov16_02264730 +_02260BDC: + add r2, sp, #0 + ldrb r1, [r4, #9] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_022656D4 + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02260BAC + + thumb_func_start ov16_02260C00 +ov16_02260C00: ; 0x02260C00 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r0, [r4, #0] + bl ov16_0223E02C + add r7, r0, #0 + ldrb r1, [r4, #0x1d] + ldr r0, [r4, #0] + bl ov16_0223DF14 + str r0, [sp, #0x10] + ldrb r1, [r4, #0x1d] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r1, r0, #0 + ldrb r0, [r4, #0x1d] + cmp r1, r0 + beq _02260C3A + ldr r0, [r4, #0] + bl ov16_0223F35C + add r5, r0, #0 + b _02260C3C +_02260C3A: + mov r5, #0 +_02260C3C: + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #3 + bls _02260C48 + b _02260D7A +_02260C48: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02260C54: ; jump table + .short _02260C5C - _02260C54 - 2 ; case 0 + .short _02260D00 - _02260C54 - 2 ; case 1 + .short _02260D26 - _02260C54 - 2 ; case 2 + .short _02260D6C - _02260C54 - 2 ; case 3 +_02260C5C: + add r0, r7, #0 + bl ov16_02269348 + cmp r0, #0 + bne _02260C68 + b _02260DA2 +_02260C68: + ldr r0, [r4, #0] + bl ov16_0223E05C + add r1, r0, #0 + mov r2, #2 + add r0, sp, #0x14 + strb r2, [r0, #0x15] + ldrb r2, [r4, #0x1f] + ldrb r3, [r4, #0x1d] + lsl r2, r2, #8 + orr r2, r3 + str r2, [sp, #0x2c] + ldr r2, _02260DA8 ; =0x00000399 + mov r3, #0 + strh r2, [r0, #0x16] + ldr r0, [r4, #0] + add r2, sp, #0x28 + bl ov16_0223FB24 + add r0, r7, #0 + bl ov16_02269218 + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + str r0, [sp, #0xc] + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r5, sp, #0x14 + str r0, [sp, #8] + mov r2, #0 + add r3, r4, #0 + add r6, r5, #0 +_02260CB0: + ldrh r0, [r3, #0xc] + add r1, r4, r2 + add r2, r2, #1 + strh r0, [r5] + ldrb r0, [r1, #0x14] + add r3, r3, #2 + add r5, r5, #2 + strb r0, [r6, #8] + ldrb r0, [r1, #0x18] + strb r0, [r6, #0xc] + add r6, r6, #1 + cmp r2, #4 + blt _02260CB0 + ldrb r1, [r4, #0x1e] + add r0, sp, #0x14 + add r2, r7, #0 + strb r1, [r0, #0x10] + mov r0, #0 + str r0, [sp] + add r0, sp, #0x14 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r1, [sp, #8] + mov r3, #0xb + bl ov16_02268C04 + ldr r0, [sp, #0xc] + bl sub_02006CA8 + ldr r0, [sp, #8] + bl sub_02006CA8 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #0x4c + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, r7, pc} +_02260D00: + add r0, r7, #0 + bl ov16_0226925C + mov r1, #0 + mvn r1, r1 + str r0, [r4, #8] + cmp r0, r1 + beq _02260DA2 + ldr r0, _02260DAC ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #0x4c + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, r7, pc} +_02260D26: + ldr r0, [r4, #8] + cmp r0, #0xff + beq _02260D52 + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02260D52 + add r0, r7, #0 + mov r1, #0 + bl ov16_0226BCCC + add r0, r5, #0 + bl ov16_0226846C + ldr r0, [r4, #4] + bl ov16_022675AC + ldr r0, [sp, #0x10] + bl ov16_022647D8 +_02260D52: + ldrb r1, [r4, #0x1d] + ldr r0, [r4, #0] + ldr r2, [r4, #8] + bl ov16_02265790 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #0x4c + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, r7, pc} +_02260D6C: + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] +_02260D7A: + add r0, r7, #0 + bl ov16_0226BCD0 + cmp r0, #1 + bne _02260DA2 + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223F234 + ldrb r1, [r4, #0x1d] + ldrb r2, [r4, #0x1c] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02260DA2: + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + nop +_02260DA8: .word 0x00000399 +_02260DAC: .word 0x000005DD + thumb_func_end ov16_02260C00 + + thumb_func_start ov16_02260DB0 +ov16_02260DB0: ; 0x02260DB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r6, r1, #0 + str r0, [sp, #8] + ldr r0, [r6, #0] + bl ov16_0223DF0C + add r4, r0, #0 + ldr r0, [r6, #0] + bl ov16_0223DF10 + str r0, [sp, #0xc] + ldr r0, _02260E74 ; =0x00000101 + tst r0, r4 + bne _02260DE6 + ldr r0, [r6, #0] + bl ov16_0223EBEC + mov r1, #1 + tst r0, r1 + bne _02260DE6 + ldrb r1, [r6, #0x1d] + ldr r0, [r6, #0] + bl ov16_0223E208 + cmp r0, #0 + bne _02260DF6 +_02260DE6: + ldrb r1, [r6, #0x1d] + ldr r0, [r6, #0] + bl ov14_0221FCF4 + cmp r0, #0xff + beq _02260E6E + add r4, r0, #1 + b _02260E4E +_02260DF6: + mov r7, #0 + add r4, r7, #0 + add r5, sp, #0x10 +_02260DFC: + add r0, r4, #0 + bl sub_020787CC + ldrh r1, [r6, #0x22] + tst r0, r1 + bne _02260E0E + add r0, r4, #1 + stmia r5!, {r0} + add r7, r7, #1 +_02260E0E: + add r4, r4, #1 + cmp r4, #4 + blt _02260DFC + ldr r0, [r6, #0] + bl ov16_0223F4BC + add r1, r7, #0 + bl sub_020E1F6C + lsl r1, r1, #2 + add r0, sp, #0x10 + ldr r4, [r0, r1] + mov r0, #1 + sub r3, r4, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + lsl r3, r3, #1 + add r3, r6, r3 + ldrb r2, [r6, #0x1d] + ldrh r3, [r3, #0xc] + ldr r0, [r6, #0] + ldr r1, [sp, #0xc] + bl ov16_02253954 + str r0, [sp] + ldrb r3, [r6, #0x1d] + ldr r0, [r6, #0] + ldr r1, [sp, #0xc] + mov r2, #0xb + bl ov16_0225B540 +_02260E4E: + ldrb r1, [r6, #0x1d] + ldr r0, [r6, #0] + add r2, r4, #0 + bl ov16_02265790 + ldrb r1, [r6, #0x1d] + ldrb r2, [r6, #0x1c] + ldr r0, [r6, #0] + bl ov16_02266ABC + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [sp, #8] + bl sub_0200DA58 +_02260E6E: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02260E74: .word 0x00000101 + thumb_func_end ov16_02260DB0 + + thumb_func_start ov16_02260E78 +ov16_02260E78: ; 0x02260E78 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0x1d] + add r5, r0, #0 + ldrb r2, [r4, #0x1c] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02260E78 + + thumb_func_start ov16_02260E98 +ov16_02260E98: ; 0x02260E98 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + ldrb r1, [r5, #0x1d] + add r6, r0, #0 + ldr r0, [r5, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02260EB4 + ldr r0, [r5, #0] + bl ov16_0226474C +_02260EB4: + add r0, sp, #0 + ldrb r4, [r0] + cmp r4, #0 + beq _02260EC0 + cmp r4, #4 + bls _02260EC8 +_02260EC0: + ldr r0, [r5, #0] + bl ov16_02264730 + b _02260EEA +_02260EC8: + ldr r0, [r5, #0] + bl ov16_0223DF10 + ldrb r1, [r5, #0x1d] + add r2, r4, #5 + mov r3, #0 + bl ov16_02252060 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + beq _02260EE4 + ldr r0, _02260F10 ; =0x000001D3 + cmp r1, r0 + bls _02260EEA +_02260EE4: + ldr r0, [r5, #0] + bl ov16_02264730 +_02260EEA: + add r2, sp, #0 + ldrb r1, [r5, #0x1d] + ldrb r2, [r2] + ldr r0, [r5, #0] + bl ov16_02265790 + ldrb r1, [r5, #0x1d] + ldrb r2, [r5, #0x1c] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02260F10: .word 0x000001D3 + thumb_func_end ov16_02260E98 + + thumb_func_start ov16_02260F14 +ov16_02260F14: ; 0x02260F14 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r4, r1, #0 + str r0, [sp, #8] + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF14 + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E02C + add r5, r0, #0 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r1, r0, #0 + ldrb r0, [r4, #0xd] + cmp r1, r0 + beq _02260F4E + ldr r0, [r4, #0] + bl ov16_0223F35C + add r6, r0, #0 + b _02260F50 +_02260F4E: + mov r6, #0 +_02260F50: + ldrb r0, [r4, #0xf] + cmp r0, #3 + bhi _02261046 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02260F62: ; jump table + .short _02260F6A - _02260F62 - 2 ; case 0 + .short _02260FEE - _02260F62 - 2 ; case 1 + .short _0226100E - _02260F62 - 2 ; case 2 + .short _02261042 - _02260F62 - 2 ; case 3 +_02260F6A: + add r0, r5, #0 + bl ov16_02269348 + cmp r0, #0 + bne _02260F76 + b _022610A0 +_02260F76: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r2, sp, #0x10 + add r6, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, #2 +_02260F92: + ldrh r3, [r1, #0x10] + add r0, r0, #1 + strh r3, [r2] + ldrh r3, [r1, #0x12] + strh r3, [r2, #2] + ldrh r3, [r1, #0x14] + strh r3, [r2, #4] + ldrh r3, [r1, #0x16] + add r1, #8 + strh r3, [r2, #6] + add r2, #8 + cmp r0, #4 + blt _02260F92 + ldrb r1, [r4, #0xe] + add r0, sp, #0x30 + add r0, #2 + strb r1, [r0] + ldrh r0, [r4, #0x30] + ldrb r1, [r4, #0xe] + bl ov16_02269368 + add r1, sp, #0x30 + add r1, #2 + strb r0, [r1, #1] + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + add r0, #2 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #0xc + bl ov16_02268C04 + add r0, r7, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + ldrb r0, [r4, #0xf] + add sp, #0x34 + add r0, r0, #1 + strb r0, [r4, #0xf] + pop {r4, r5, r6, r7, pc} +_02260FEE: + add r0, r5, #0 + bl ov16_0226925C + mov r1, #0 + mvn r1, r1 + str r0, [r4, #8] + cmp r0, r1 + beq _022610A0 + ldr r0, _022610A4 ; =0x000005DD + bl sub_02005748 + ldrb r0, [r4, #0xf] + add sp, #0x34 + add r0, r0, #1 + strb r0, [r4, #0xf] + pop {r4, r5, r6, r7, pc} +_0226100E: + ldr r0, [r4, #8] + cmp r0, #0xff + beq _02261038 + ldr r0, [r4, #4] + bl ov16_022675AC + add r0, r7, #0 + bl ov16_022647D8 + add r0, r6, #0 + bl ov16_0226846C + add r0, r4, #0 + add r0, #0x32 + ldrb r0, [r0] + cmp r0, #1 + bne _02261038 + add r0, r5, #0 + mov r1, #0 + bl ov16_0226BCCC +_02261038: + ldrb r0, [r4, #0xf] + add sp, #0x34 + add r0, r0, #1 + strb r0, [r4, #0xf] + pop {r4, r5, r6, r7, pc} +_02261042: + add r0, r0, #1 + strb r0, [r4, #0xf] +_02261046: + add r0, r5, #0 + bl ov16_0226BCD0 + cmp r0, #1 + bne _022610A0 + ldr r0, [r4, #0] + ldr r5, [r4, #8] + bl ov16_0223DF0C + add r6, r0, #0 + cmp r5, #0xff + beq _02261080 + ldr r0, [r4, #0] + add r1, sp, #0xc + bl ov16_0223F858 + mov r0, #2 + tst r0, r6 + ldr r0, [r4, #8] + beq _02261078 + add r1, r0, #1 + add r0, sp, #0xc + ldrb r0, [r0, r1] + add r5, r0, #1 + b _02261080 +_02261078: + sub r1, r0, #1 + add r0, sp, #0xc + ldrb r0, [r0, r1] + add r5, r0, #1 +_02261080: + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + add r2, r5, #0 + bl ov16_022658CC + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #8] + bl sub_0200DA58 +_022610A0: + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022610A4: .word 0x000005DD + thumb_func_end ov16_02260F14 + + thumb_func_start ov16_022610A8 +ov16_022610A8: ; 0x022610A8 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223DF10 + add r1, r0, #0 + ldrb r3, [r5, #0xd] + ldr r0, [r5, #0] + mov r2, #0xb + bl ov16_0225B45C + add r4, r0, #1 + cmp r4, #5 + blt _022610CA + bl sub_02022974 +_022610CA: + ldrb r1, [r5, #0xd] + ldr r0, [r5, #0] + add r2, r4, #0 + bl ov16_022658CC + ldrb r1, [r5, #0xd] + ldrb r2, [r5, #0xc] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + pop {r4, r5, r6, pc} + thumb_func_end ov16_022610A8 + + thumb_func_start ov16_022610EC +ov16_022610EC: ; 0x022610EC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022610EC + + thumb_func_start ov16_0226110C +ov16_0226110C: ; 0x0226110C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r7, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02261126 + ldr r0, [r4, #0] + bl ov16_0226474C +_02261126: + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #0 + beq _02261132 + cmp r0, #4 + bls _0226113A +_02261132: + ldr r0, [r4, #0] + bl ov16_02264730 + b _022611B8 +_0226113A: + sub r5, r0, #1 + ldrh r0, [r4, #0x30] + cmp r0, #0x40 + bgt _02261170 + bge _022611B8 + cmp r0, #0x10 + bgt _0226116C + bge _022611B8 + cmp r0, #8 + bhi _022611B8 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226115A: ; jump table + .short _0226118E - _0226115A - 2 ; case 0 + .short _022611B8 - _0226115A - 2 ; case 1 + .short _022611B8 - _0226115A - 2 ; case 2 + .short _022611B8 - _0226115A - 2 ; case 3 + .short _022611B8 - _0226115A - 2 ; case 4 + .short _022611B8 - _0226115A - 2 ; case 5 + .short _022611B8 - _0226115A - 2 ; case 6 + .short _022611B8 - _0226115A - 2 ; case 7 + .short _022611B8 - _0226115A - 2 ; case 8 +_0226116C: + cmp r0, #0x20 + b _022611B8 +_02261170: + mov r2, #1 + lsl r2, r2, #8 + cmp r0, r2 + bgt _0226117E + bge _022611B8 + cmp r0, #0x80 + b _022611B8 +_0226117E: + lsl r1, r2, #1 + cmp r0, r1 + bgt _02261188 + beq _0226119C + b _022611B8 +_02261188: + lsl r1, r2, #2 + cmp r0, r1 + b _022611B8 +_0226118E: + ldrb r0, [r4, #0xd] + cmp r0, r5 + bne _022611B8 + ldr r0, [r4, #0] + bl ov16_02264730 + b _022611B8 +_0226119C: + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E208 + add r6, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov16_0223E208 + cmp r6, r0 + beq _022611B8 + ldr r0, [r4, #0] + bl ov16_02264730 +_022611B8: + add r2, sp, #0 + ldrb r1, [r4, #0xd] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_022658CC + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0226110C + + thumb_func_start ov16_022611DC +ov16_022611DC: ; 0x022611DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x14 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E064 + ldrb r1, [r4, #0xe] + add r5, r0, #0 + cmp r1, #0x1e + bls _022611F8 + bl _02261D22 +_022611F8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02261204: ; jump table + .short _02261242 - _02261204 - 2 ; case 0 + .short _02261298 - _02261204 - 2 ; case 1 + .short _02261324 - _02261204 - 2 ; case 2 + .short _02261338 - _02261204 - 2 ; case 3 + .short _02261396 - _02261204 - 2 ; case 4 + .short _022614DE - _02261204 - 2 ; case 5 + .short _0226151A - _02261204 - 2 ; case 6 + .short _0226156A - _02261204 - 2 ; case 7 + .short _0226170E - _02261204 - 2 ; case 8 + .short _0226178C - _02261204 - 2 ; case 9 + .short _022617C8 - _02261204 - 2 ; case 10 + .short _022617EA - _02261204 - 2 ; case 11 + .short _02261CD2 - _02261204 - 2 ; case 12 + .short _02261870 - _02261204 - 2 ; case 13 + .short _02261CD2 - _02261204 - 2 ; case 14 + .short _02261924 - _02261204 - 2 ; case 15 + .short _02261D00 - _02261204 - 2 ; case 16 + .short _0226182A - _02261204 - 2 ; case 17 + .short _02261CD2 - _02261204 - 2 ; case 18 + .short _022619D6 - _02261204 - 2 ; case 19 + .short _02261CD2 - _02261204 - 2 ; case 20 + .short _02261A1C - _02261204 - 2 ; case 21 + .short _02261AB6 - _02261204 - 2 ; case 22 + .short _02261AEC - _02261204 - 2 ; case 23 + .short _02261D00 - _02261204 - 2 ; case 24 + .short _0226182A - _02261204 - 2 ; case 25 + .short _02261CD2 - _02261204 - 2 ; case 26 + .short _022619D6 - _02261204 - 2 ; case 27 + .short _02261CD2 - _02261204 - 2 ; case 28 + .short _02261B5E - _02261204 - 2 ; case 29 + .short _02261D00 - _02261204 - 2 ; case 30 +_02261242: + ldr r0, [r4, #0] + bl ov16_0223E02C + bl ov16_0226CD08 + strb r0, [r4, #0x10] + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + mov r2, #3 + str r1, [sp] + mov r0, #7 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #5 + add r3, r1, #0 + add r0, r5, #0 + lsl r2, r2, #0xa + sub r3, #0xd + bl sub_02003178 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #0xa + add r3, r1, #0 + ldr r2, _022615C0 ; =0x0000FFFF + add r0, r5, #0 + sub r3, #0x12 + bl sub_02003178 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261298: + bl sub_0200384C + cmp r0, #0 + bne _02261360 + ldr r0, [r4, #0] + bl ov16_0223B384 + mov r0, #5 + mov r1, #0x34 + bl sub_02018144 + str r0, [r4, #4] + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + ldr r1, [r4, #0] + ldr r0, [r4, #4] + str r1, [r0, #0] + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E16C + ldr r1, [r4, #4] + str r0, [r1, #4] + ldr r0, [r4, #4] + mov r1, #5 + str r1, [r0, #0xc] + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x26 + strb r1, [r0] + ldr r0, [r4, #0] + bl ov16_0223E1AC + ldr r1, [r4, #4] + str r0, [r1, #8] + ldrb r1, [r4, #0xd] + ldr r0, [r4, #4] + str r1, [r0, #0x10] + ldr r0, [r4, #4] + ldrb r1, [r4, #0x10] + add r0, #0x25 + strb r1, [r0] + ldr r0, [r4, #4] + ldrb r1, [r4, #0x14] + add r0, #0x22 + strb r1, [r0] + ldr r0, [r4, #4] + ldrb r1, [r4, #0x15] + add r0, #0x23 + strb r1, [r0] + ldr r0, [r4, #4] + ldrb r1, [r4, #0x16] + add r0, #0x24 + strb r1, [r0] + ldrb r0, [r4, #0xd] + add r0, r4, r0 + add r0, #0x30 + ldrb r1, [r0] + ldr r0, [r4, #4] + str r1, [r0, #0x18] + ldr r0, [r4, #4] + bl ov12_022264F4 + add sp, #0x1fc + mov r0, #3 + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261324: + ldr r0, [r4, #4] + ldrb r1, [r4, #0x10] + add r0, #0x25 + strb r1, [r0] + ldr r0, [r4, #4] + bl ov12_022264F4 + ldrb r0, [r4, #0xe] + add r0, r0, #1 + strb r0, [r4, #0xe] +_02261338: + ldr r1, [r4, #4] + add r0, r1, #0 + add r0, #0x26 + ldrb r0, [r0] + cmp r0, #0 + beq _02261360 + mov r0, #0 + add r1, #0x26 + strb r0, [r1] + ldr r0, [r4, #4] + add r0, #0x25 + ldrb r0, [r0] + strb r0, [r4, #0x10] + ldr r1, [r4, #4] + ldrh r0, [r1, #0x1c] + cmp r0, #0 + beq _0226138C + ldrb r0, [r1, #0x1e] + cmp r0, #3 + bls _02261364 +_02261360: + bl _02261D22 +_02261364: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02261370: ; jump table + .short _02261378 - _02261370 - 2 ; case 0 + .short _02261378 - _02261370 - 2 ; case 1 + .short _02261382 - _02261370 - 2 ; case 2 + .short _02261382 - _02261370 - 2 ; case 3 +_02261378: + add sp, #0x1fc + mov r0, #4 + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261382: + add sp, #0x1fc + mov r0, #6 + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_0226138C: + add sp, #0x1fc + mov r0, #6 + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261396: + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF20 + str r0, [sp, #0x14] + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _022613C2 + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _022613C2 + ldrb r1, [r4, #0xd] + mov r0, #1 + add r7, r1, #0 + and r7, r0 + b _022613C4 +_022613C2: + ldrb r7, [r4, #0xd] +_022613C4: + ldr r0, [r4, #8] + mov r1, #6 + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_0207A014 + ldr r0, [sp, #0x14] + mov r6, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02261412 + mov r0, #6 + mul r0, r7 + add r5, r4, r0 +_022613E2: + ldrb r2, [r5, #0x18] + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223DFAC + add r1, r0, #0 + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_0207A048 + ldr r1, [r4, #8] + ldrb r0, [r5, #0x18] + ldr r1, [r1, #4] + add r5, r5, #1 + add r1, r1, r6 + add r1, #0x2c + strb r0, [r1] + ldr r0, [sp, #0x14] + add r6, r6, #1 + bl sub_0207A0F8 + cmp r6, r0 + blt _022613E2 +_02261412: + ldr r0, [r4, #8] + ldr r1, [r4, #0] + ldr r0, [r0, #4] + str r1, [r0, #8] + ldr r0, [r4, #8] + mov r1, #5 + ldr r0, [r0, #4] + str r1, [r0, #0xc] + ldr r1, [r4, #8] + mov r0, #0 + ldr r1, [r1, #4] + strb r0, [r1, #0x11] + ldr r1, [r4, #8] + ldr r1, [r1, #4] + add r1, #0x36 + strb r0, [r1] + ldr r1, [r4, #8] + ldr r1, [r1, #4] + strh r0, [r1, #0x24] + ldr r0, [r4, #8] + mov r1, #2 + ldr r0, [r0, #4] + add r0, #0x35 + strb r1, [r0] + ldr r0, [r4, #4] + ldrh r1, [r0, #0x1c] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + strh r1, [r0, #0x22] + ldr r0, [r4, #4] + ldrb r1, [r0, #0x1e] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + add r0, #0x33 + strb r1, [r0] + ldr r0, [r4, #4] + ldr r1, [r0, #0x10] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + str r1, [r0, #0x28] + ldr r0, [r4, #8] + ldrb r1, [r4, #0x10] + ldr r0, [r0, #4] + add r0, #0x32 + strb r1, [r0] + ldrb r0, [r4, #0xd] + ldr r2, [r4, #8] + add r0, r2, r0 + ldrb r1, [r0, #0xc] + ldr r0, [r2, #4] + strb r1, [r0, #0x14] + ldrb r1, [r4, #0xd] + ldr r5, [r4, #8] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r0, r5, r0 + ldrb r1, [r0, #0xc] + ldr r0, [r5, #4] + strb r1, [r0, #0x15] + ldrb r0, [r4, #0xf] + cmp r0, #4 + bne _022614A8 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r0, r4, r0 + add r0, #0x30 + ldrb r1, [r0] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + str r1, [r0, #0x18] + ldrb r0, [r4, #0xd] + b _022614BE +_022614A8: + ldrb r0, [r4, #0xd] + add r0, r4, r0 + add r0, #0x30 + ldrb r1, [r0] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + str r1, [r0, #0x18] + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E258 +_022614BE: + add r0, r4, r0 + add r0, #0x30 + ldrb r1, [r0] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + str r1, [r0, #0x1c] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + bl ov12_0221FC20 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_022614DE: + ldr r0, [r4, #8] + ldr r1, [r0, #4] + add r0, r1, #0 + add r0, #0x36 + ldrb r0, [r0] + cmp r0, #0 + beq _02261572 + add r1, #0x32 + ldrb r0, [r1] + mov r1, #0 + strb r0, [r4, #0x10] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + add r0, #0x36 + strb r1, [r0] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldrb r0, [r0, #0x11] + cmp r0, #6 + bne _02261510 + add sp, #0x1fc + mov r0, #2 + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261510: + add sp, #0x1fc + mov r0, #6 + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_0226151A: + ldr r0, [r4, #0] + bl ov16_0223B430 + ldr r0, [r4, #0] + bl ov16_0223E02C + ldrb r1, [r4, #0x10] + bl ov16_0226CD10 + mov r0, #7 + str r0, [sp] + mov r0, #0 + mov r1, #5 + str r0, [sp, #4] + mov r2, #3 + add r3, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + lsl r2, r2, #0xa + sub r3, #0xd + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + mov r1, #0xa + str r0, [sp, #4] + add r3, r1, #0 + str r0, [sp, #8] + ldr r2, _022615C0 ; =0x0000FFFF + add r0, r5, #0 + sub r3, #0x12 + bl sub_02003178 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_0226156A: + bl sub_0200384C + cmp r0, #0 + beq _02261574 +_02261572: + b _02261D22 +_02261574: + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #0 + bl sub_02015738 + ldr r0, [r4, #4] + ldrh r0, [r0, #0x1c] + cmp r0, #0 + bne _0226158A + b _022616F6 +_0226158A: + mov r0, #9 + strb r0, [r4, #0xe] + ldr r0, [r4, #4] + ldrb r1, [r0, #0x1e] + cmp r1, #3 + bls _02261598 + b _022616FA +_02261598: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022615A4: ; jump table + .short _0226163C - _022615A4 - 2 ; case 0 + .short _022615AC - _022615A4 - 2 ; case 1 + .short _022616F0 - _022615A4 - 2 ; case 2 + .short _0226169A - _022615A4 - 2 ; case 3 +_022615AC: + ldrh r1, [r0, #0x1c] + ldr r0, _022615C4 ; =0x0000FFE4 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _022615C8 + mov r0, #8 + strb r0, [r4, #0xe] + b _022616FA + ; .align 2, 0 +_022615C0: .word 0x0000FFFF +_022615C4: .word 0x0000FFE4 +_022615C8: + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldrb r0, [r0, #0x11] + cmp r0, #2 + bhs _022615E6 + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #3 + beq _022615F0 + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #0x13 + beq _022615F0 +_022615E6: + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldrb r0, [r0, #0x11] + cmp r0, #1 + bhs _02261636 +_022615F0: + ldr r0, [r4, #4] + ldrh r0, [r0, #0x1c] + cmp r0, #0x17 + ldr r0, [r4, #0] + bne _02261618 + bl ov16_0223EDAC + cmp r0, #1 + bne _02261608 + mov r0, #0x11 + strh r0, [r4, #0x12] + b _022616FA +_02261608: + mov r1, #0x74 + ldr r0, _02261928 ; =0x000005EC + mvn r1, r1 + bl sub_02005728 + mov r0, #0x15 + strh r0, [r4, #0x12] + b _022616FA +_02261618: + bl ov16_0223EDAC + cmp r0, #1 + bne _02261626 + mov r0, #0x19 + strh r0, [r4, #0x12] + b _022616FA +_02261626: + mov r1, #0x74 + ldr r0, _02261928 ; =0x000005EC + mvn r1, r1 + bl sub_02005728 + mov r0, #0x1d + strh r0, [r4, #0x12] + b _022616FA +_02261636: + mov r0, #8 + strb r0, [r4, #0xe] + b _022616FA +_0226163C: + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldrb r0, [r0, #0x11] + cmp r0, #2 + bhs _0226165A + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #3 + beq _02261664 + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #0x13 + beq _02261664 +_0226165A: + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldrb r0, [r0, #0x11] + cmp r0, #1 + bhs _02261694 +_02261664: + ldr r0, [r4, #4] + mov r1, #0x26 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261694 + ldr r0, [r4, #0] + bl ov16_0223EDAC + cmp r0, #1 + bne _02261684 + mov r0, #0x11 + strh r0, [r4, #0x12] + b _022616FA +_02261684: + mov r1, #0x74 + ldr r0, _02261928 ; =0x000005EC + mvn r1, r1 + bl sub_02005728 + mov r0, #0x15 + strh r0, [r4, #0x12] + b _022616FA +_02261694: + mov r0, #8 + strb r0, [r4, #0xe] + b _022616FA +_0226169A: + ldrh r1, [r0, #0x1c] + ldr r0, _0226192C ; =0x0000FFC1 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _022616AE + mov r0, #8 + strb r0, [r4, #0xe] + b _022616FA +_022616AE: + cmp r1, #0x37 + ldr r0, [r4, #0] + bne _022616D2 + bl ov16_0223EDAC + cmp r0, #1 + bne _022616C2 + mov r0, #0xd + strh r0, [r4, #0x12] + b _022616FA +_022616C2: + mov r1, #0x74 + ldr r0, _02261928 ; =0x000005EC + mvn r1, r1 + bl sub_02005728 + mov r0, #0xf + strh r0, [r4, #0x12] + b _022616FA +_022616D2: + bl ov16_0223EDAC + cmp r0, #1 + bne _022616E0 + mov r0, #0xb + strh r0, [r4, #0x12] + b _022616FA +_022616E0: + mov r1, #0x74 + ldr r0, _02261928 ; =0x000005EC + mvn r1, r1 + bl sub_02005728 + mov r0, #0xf + strh r0, [r4, #0x12] + b _022616FA +_022616F0: + mov r0, #8 + strb r0, [r4, #0xe] + b _022616FA +_022616F6: + mov r0, #8 + strb r0, [r4, #0xe] +_022616FA: + ldrb r0, [r4, #0xe] + cmp r0, #8 + beq _022617DE + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223B748 + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} +_0226170E: + ldr r2, [r4, #4] + ldrh r0, [r2, #0x1c] + cmp r0, #0 + bne _0226171E + mov r1, #0xff + add r0, sp, #0x1c + strh r1, [r0] + b _0226173A +_0226171E: + add r1, sp, #0x1c + strh r0, [r1] + ldrb r0, [r2, #0x1e] + strb r0, [r1, #2] + cmp r0, #1 + bhi _0226173A + ldr r0, [r4, #8] + ldr r2, [r0, #4] + ldrb r0, [r2, #0x11] + add r0, r2, r0 + add r0, #0x2c + ldrb r0, [r0] + add r0, r0, #1 + strb r0, [r1, #3] +_0226173A: + add r3, sp, #0x1c + ldrb r1, [r4, #0xd] + mov r2, sp + ldrh r5, [r3] + ldr r0, [r4, #0] + sub r2, r2, #4 + strh r5, [r2] + ldrh r3, [r3, #2] + strh r3, [r2, #2] + ldr r2, [r2, #0] + bl ov16_02265A70 + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [r4, #8] + ldr r0, [r0, #4] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} +_0226178C: + ldr r1, _02261930 ; =0x000004B6 + add r0, sp, #0x8c + strh r1, [r0, #2] + mov r1, #5 + strb r1, [r0, #1] + ldr r0, [r4, #4] + ldrh r0, [r0, #0x1c] + str r0, [sp, #0x90] + ldr r0, [r4, #0] + bl ov16_0223E05C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, sp, #0x8c + bl ov16_0223FB24 + strb r0, [r4, #0x11] + mov r0, #0x1e + strb r0, [r4, #0x17] + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_022617C8: + ldrb r0, [r4, #0x11] + bl sub_0201D724 + cmp r0, #0 + bne _022617DE + ldrb r0, [r4, #0x17] + sub r0, r0, #1 + strb r0, [r4, #0x17] + ldrb r0, [r4, #0x17] + cmp r0, #0 + beq _022617E0 +_022617DE: + b _02261D22 +_022617E0: + ldrh r0, [r4, #0x12] + add sp, #0x1fc + add sp, #0x14 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_022617EA: + ldrb r1, [r4, #0xd] + mov r0, #9 + add r2, sp, #0x1b8 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF14 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r3, sp, #0x1b8 + bl ov16_02264408 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_0226182A: + ldr r0, [r4, #8] + mov r1, #0 + ldr r0, [r0, #4] + add r2, sp, #0x160 + ldrb r0, [r0, #0x11] + mov r3, #1 + lsl r5, r0, #1 + mov r0, #9 + str r0, [sp] + str r5, [sp, #4] + str r5, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r4, #0] + bl ov16_02266B78 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov16_0223DF14 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r3, sp, #0x160 + bl ov16_02264408 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261870: + ldr r0, [r4, #4] + add r2, sp, #0x108 + ldrh r0, [r0, #0x1c] + cmp r0, #0x37 + bne _022618AE + ldrb r0, [r4, #0xd] + mov r1, #0 + add r3, r1, #0 + str r1, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x36 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + bl ov16_02266B78 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF14 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r3, sp, #0x108 + bl ov16_02264408 + b _02261918 +_022618AE: + cmp r0, #0x38 + bne _022618E6 + ldrb r0, [r4, #0xd] + mov r1, #0 + add r3, r1, #0 + str r1, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x74 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + bl ov16_02266B78 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF14 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r3, sp, #0x108 + bl ov16_02264408 + b _02261918 +_022618E6: + ldrb r1, [r4, #0xd] + mov r0, #0xc + mov r3, #1 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + bl ov16_02266B78 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF14 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r3, sp, #0x108 + bl ov16_02264408 +_02261918: + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261924: + ldr r2, _02261934 ; =0x000004B3 + b _02261938 + ; .align 2, 0 +_02261928: .word 0x000005EC +_0226192C: .word 0x0000FFC1 +_02261930: .word 0x000004B6 +_02261934: .word 0x000004B3 +_02261938: + add r0, sp, #0x68 + strh r2, [r0, #2] + mov r1, #0xc + strb r1, [r0, #1] + ldrb r1, [r4, #0xd] + ldr r3, [r4, #8] + add r3, r3, r1 + ldrb r3, [r3, #0xc] + lsl r3, r3, #8 + orr r1, r3 + str r1, [sp, #0x6c] + ldr r1, [r4, #4] + ldrh r1, [r1, #0x1c] + sub r1, #0x37 + cmp r1, #7 + bhi _022619AA + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02261964: ; jump table + .short _02261998 - _02261964 - 2 ; case 0 + .short _022619A2 - _02261964 - 2 ; case 1 + .short _02261974 - _02261964 - 2 ; case 2 + .short _0226197A - _02261964 - 2 ; case 3 + .short _02261980 - _02261964 - 2 ; case 4 + .short _02261986 - _02261964 - 2 ; case 5 + .short _0226198C - _02261964 - 2 ; case 6 + .short _02261992 - _02261964 - 2 ; case 7 +_02261974: + mov r0, #1 + str r0, [sp, #0x70] + b _022619AA +_0226197A: + mov r0, #2 + str r0, [sp, #0x70] + b _022619AA +_02261980: + mov r0, #3 + str r0, [sp, #0x70] + b _022619AA +_02261986: + mov r0, #6 + str r0, [sp, #0x70] + b _022619AA +_0226198C: + mov r0, #4 + str r0, [sp, #0x70] + b _022619AA +_02261992: + mov r0, #5 + str r0, [sp, #0x70] + b _022619AA +_02261998: + add r1, r2, #1 + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + b _022619AA +_022619A2: + add r1, r2, #2 + strh r1, [r0, #2] + mov r1, #2 + strb r1, [r0, #1] +_022619AA: + ldr r0, [r4, #0] + bl ov16_0223E05C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, sp, #0x68 + bl ov16_0223FB24 + strb r0, [r4, #0x11] + mov r0, #0x1e + strb r0, [r4, #0x17] + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_022619D6: + ldr r0, [r4, #8] + mov r1, #0 + ldr r0, [r0, #4] + add r2, sp, #0xb0 + ldrb r0, [r0, #0x11] + mov r3, #1 + lsl r5, r0, #1 + mov r0, #0xe + str r0, [sp] + str r5, [sp, #4] + str r5, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r4, #0] + bl ov16_02266B78 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov16_0223DF14 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r3, sp, #0xb0 + bl ov16_02264408 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261A1C: + ldr r0, [r4, #8] + ldr r1, [r0, #4] + ldrb r0, [r1, #0x11] + lsl r6, r0, #1 + add r0, r1, r0 + add r0, #0x2c + ldrb r7, [r0] + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov16_0223F35C + mov r1, #0 + mov r2, #1 + add r5, r0, #0 + bl sub_020C4CF4 + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov16_0223E1F8 + str r0, [sp, #0x18] + ldr r0, [r4, #0] + bl ov16_0223DF0C + add r1, r0, #0 + ldr r0, [sp, #0x18] + bl ov16_0226825C + add r1, r5, #0 + add r1, #0x25 + strb r0, [r1] + ldr r0, [r4, #0] + add r1, r6, #0 + add r2, r7, #0 + bl ov16_0223DFAC + mov r1, #0xa3 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + ldr r1, [r4, #8] + mov r2, #0 + ldr r1, [r1, #4] + ldrh r1, [r1, #0x20] + sub r0, r0, r1 + str r0, [r5, #0x28] + add r0, r6, #0 + mov r1, #0xa4 + bl sub_02074470 + str r0, [r5, #0x2c] + ldr r0, [r4, #8] + mov r1, #0xa0 + ldr r0, [r0, #4] + mov r2, #0 + ldrh r0, [r0, #0x20] + str r0, [r5, #0x30] + add r0, r6, #0 + bl sub_02074470 + cmp r0, #0 + bne _02261AA2 + add r0, r5, #0 + mov r1, #0 + add r0, #0x4a + strb r1, [r0] +_02261AA2: + ldr r1, [r5, #0x30] + add r0, r5, #0 + bl ov16_022674C4 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261AB6: + ldr r1, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r1, #4] + ldrb r1, [r1, #0x11] + lsl r1, r1, #1 + bl ov16_0223F35C + add r5, r0, #0 + bl ov16_022674F8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02261AD4 + b _02261D22 +_02261AD4: + mov r2, #1 + add r0, r5, #0 + mov r1, #0 + lsl r2, r2, #8 + bl ov16_02267084 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261AEC: + ldr r0, [r4, #0] + bl ov16_0223E05C + add r5, r0, #0 + ldr r0, [r4, #8] + ldr r1, [r0, #4] + ldrb r0, [r1, #0x11] + ldrh r1, [r1, #0x20] + lsl r0, r0, #1 + cmp r1, #0 + add r1, sp, #0x1c + beq _02261B24 + ldr r2, _02261D28 ; =0x000004BE + strh r2, [r1, #0x2a] + mov r2, #0x11 + add r1, sp, #0x44 + strb r2, [r1, #1] + ldr r1, [r4, #8] + add r1, r1, r0 + ldrb r1, [r1, #0xc] + lsl r1, r1, #8 + orr r0, r1 + str r0, [sp, #0x48] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldrh r0, [r0, #0x20] + str r0, [sp, #0x4c] + b _02261B3A +_02261B24: + ldr r2, _02261D2C ; =0x000004E2 + strh r2, [r1, #0x2a] + mov r2, #2 + add r1, sp, #0x44 + strb r2, [r1, #1] + ldr r1, [r4, #8] + add r1, r1, r0 + ldrb r1, [r1, #0xc] + lsl r1, r1, #8 + orr r0, r1 + str r0, [sp, #0x48] +_02261B3A: + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, sp, #0x44 + bl ov16_0223FB24 + strb r0, [r4, #0x11] + mov r0, #0x1e + strb r0, [r4, #0x17] + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261B5E: + ldr r0, [r4, #8] + mov r5, #0 + ldr r0, [r0, #4] + ldrb r0, [r0, #0x11] + lsl r7, r0, #1 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223F35C + str r0, [sp, #0x10] + ldr r0, [r4, #8] + add r1, r7, #0 + ldr r3, [r0, #4] + ldr r0, [r4, #0] + ldrb r2, [r3, #0x11] + add r2, r3, r2 + add r2, #0x2c + ldrb r2, [r2] + bl ov16_0223DFAC + mov r1, #0xa0 + add r2, r5, #0 + bl sub_02074470 + cmp r0, #0 + bne _02261B9A + ldr r0, [sp, #0x10] + add r1, r5, #0 + add r0, #0x4a + strb r1, [r0] +_02261B9A: + ldr r0, [sp, #0x10] + mov r2, #1 + add r1, r0, #0 + ldr r1, [r1, #0x28] + lsl r2, r2, #8 + bl ov16_02267084 + mov r1, #2 + add r0, sp, #0x1c + strb r1, [r0, #5] + ldr r0, [r4, #8] + mov r1, #0xf + add r0, r0, r7 + ldrb r0, [r0, #0xc] + mov r2, #5 + lsl r0, r0, #8 + orr r0, r7 + str r0, [sp, #0x24] + ldr r0, [r4, #4] + ldrh r0, [r0, #0x1c] + bl sub_0207CFF0 + cmp r0, #0 + beq _02261BCE + mov r6, #0 + add r5, r5, #1 +_02261BCE: + ldr r0, [r4, #4] + mov r1, #0x10 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261BE2 + mov r6, #1 + add r5, r5, #1 +_02261BE2: + ldr r0, [r4, #4] + mov r1, #0x11 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261BF6 + mov r6, #2 + add r5, r5, #1 +_02261BF6: + ldr r0, [r4, #4] + mov r1, #0x12 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261C0A + mov r6, #3 + add r5, r5, #1 +_02261C0A: + ldr r0, [r4, #4] + mov r1, #0x13 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261C1E + mov r6, #4 + add r5, r5, #1 +_02261C1E: + ldr r0, [r4, #4] + mov r1, #0x14 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261C32 + mov r6, #5 + add r5, r5, #1 +_02261C32: + ldr r0, [r4, #4] + mov r1, #0x15 + ldrh r0, [r0, #0x1c] + mov r2, #5 + bl sub_0207CFF0 + cmp r0, #0 + beq _02261C46 + mov r6, #6 + add r5, r5, #1 +_02261C46: + cmp r5, #1 + beq _02261C52 + ldr r1, _02261D30 ; =0x000004CD + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261C52: + cmp r6, #6 + bhi _02261CA6 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02261C62: ; jump table + .short _02261C70 - _02261C62 - 2 ; case 0 + .short _02261C78 - _02261C62 - 2 ; case 1 + .short _02261C80 - _02261C62 - 2 ; case 2 + .short _02261C88 - _02261C62 - 2 ; case 3 + .short _02261C90 - _02261C62 - 2 ; case 4 + .short _02261C98 - _02261C62 - 2 ; case 5 + .short _02261CA0 - _02261C62 - 2 ; case 6 +_02261C70: + ldr r1, _02261D34 ; =0x000004BA + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261C78: + ldr r1, _02261D38 ; =0x000004B7 + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261C80: + ldr r1, _02261D3C ; =0x000004B9 + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261C88: + ldr r1, _02261D40 ; =0x000004BB + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261C90: + ldr r1, _02261D44 ; =0x000004B8 + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261C98: + ldr r1, _02261D48 ; =0x000004BC + add r0, sp, #0x1c + strh r1, [r0, #6] + b _02261CA6 +_02261CA0: + ldr r1, _02261D4C ; =0x000004BD + add r0, sp, #0x1c + strh r1, [r0, #6] +_02261CA6: + ldr r0, [r4, #0] + bl ov16_0223E05C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, sp, #0x20 + bl ov16_0223FB24 + strb r0, [r4, #0x11] + mov r0, #0x1e + strb r0, [r4, #0x17] + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261CD2: + ldr r0, [r4, #0] + bl ov16_0223E008 + bl ov12_0222016C + ldr r0, [r4, #0] + bl ov16_0223E008 + bl ov12_02220188 + cmp r0, #0 + bne _02261D22 + ldr r0, [r4, #0] + bl ov16_0223E008 + bl ov12_02220198 + ldrb r0, [r4, #0xe] + add sp, #0x1fc + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02261D00: + ldrb r0, [r4, #0x11] + bl sub_0201D724 + cmp r0, #0 + bne _02261D22 + ldrb r0, [r4, #0x17] + sub r0, r0, #1 + strb r0, [r4, #0x17] + ldrb r0, [r4, #0x17] + cmp r0, #0 + bne _02261D22 + ldr r0, [r4, #0] + mov r1, #1 + bl ov16_0223B748 + mov r0, #8 + strb r0, [r4, #0xe] +_02261D22: + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02261D28: .word 0x000004BE +_02261D2C: .word 0x000004E2 +_02261D30: .word 0x000004CD +_02261D34: .word 0x000004BA +_02261D38: .word 0x000004B7 +_02261D3C: .word 0x000004B9 +_02261D40: .word 0x000004BB +_02261D44: .word 0x000004B8 +_02261D48: .word 0x000004BC +_02261D4C: .word 0x000004BD + thumb_func_end ov16_022611DC + + thumb_func_start ov16_02261D50 +ov16_02261D50: ; 0x02261D50 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + mov r0, #1 + add r3, sp, #0 + strh r0, [r3] + add r4, r1, #0 + mov r2, sp + ldrb r1, [r4, #0xd] + ldrh r6, [r3] + ldr r0, [r4, #0] + sub r2, r2, #4 + strh r6, [r2] + ldrh r3, [r3, #2] + strh r3, [r2, #2] + ldr r2, [r2, #0] + bl ov16_02265A70 + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [r4, #8] + ldr r0, [r0, #4] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02261D50 + + thumb_func_start ov16_02261DA8 +ov16_02261DA8: ; 0x02261DA8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [r4, #8] + ldr r0, [r0, #4] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02261DA8 + + thumb_func_start ov16_02261DE0 +ov16_02261DE0: ; 0x02261DE0 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02261DFC + ldr r0, [r4, #0] + bl ov16_0226474C +_02261DFC: + add r0, sp, #0 + ldrb r1, [r0] + add r2, sp, #0 + strh r1, [r0, #2] + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223F530 + cmp r0, #1 + bne _02261E16 + ldr r0, [r4, #0] + bl ov16_0226474C +_02261E16: + add r0, sp, #0 + ldrb r1, [r0] + ldrh r2, [r0, #2] + lsl r1, r1, #8 + orr r1, r2 + strh r1, [r0, #2] + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02261E36 + ldr r0, [r4, #0] + bl ov16_0226474C +_02261E36: + add r3, sp, #0 + ldrb r1, [r3] + mov r0, #0xf + mov r2, sp + and r0, r1 + strb r0, [r3, #4] + mov r0, #0 + strb r0, [r3, #5] + ldrb r1, [r4, #0xd] + ldrh r6, [r3, #2] + ldr r0, [r4, #0] + sub r2, r2, #4 + strh r6, [r2] + ldrh r3, [r3, #4] + strh r3, [r2, #2] + ldr r2, [r2, #0] + bl ov16_02265A70 + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + ldr r0, [r4, #8] + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [r4, #8] + ldr r0, [r0, #4] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02261DE0 + + thumb_func_start ov16_02261E8C +ov16_02261E8C: ; 0x02261E8C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E064 + ldrb r1, [r4, #0xa] + add r5, r0, #0 + cmp r1, #3 + bhi _02261F28 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02261EAE: ; jump table + .short _02261EB6 - _02261EAE - 2 ; case 0 + .short _02261F20 - _02261EAE - 2 ; case 1 + .short _02262196 - _02261EAE - 2 ; case 2 + .short _022621F2 - _02261EAE - 2 ; case 3 +_02261EB6: + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223DF04 + add r6, r0, #0 + mov r1, #0xff + bl sub_0201ADA4 + add r0, r6, #0 + bl sub_0201ACCC + ldr r0, [r4, #0] + bl ov16_0223E02C + bl ov16_0226CD08 + strb r0, [r4, #0x17] + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + mov r2, #3 + str r1, [sp] + mov r0, #7 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #5 + add r3, r1, #0 + add r0, r5, #0 + lsl r2, r2, #0xa + sub r3, #0xd + bl sub_02003178 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #0xa + add r3, r1, #0 + ldr r2, _0226221C ; =0x0000FFFF + add r0, r5, #0 + sub r3, #0x12 + bl sub_02003178 + ldrb r0, [r4, #0xa] + add sp, #0x24 + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r4, r5, r6, r7, pc} +_02261F20: + bl sub_0200384C + cmp r0, #0 + beq _02261F2A +_02261F28: + b _02262252 +_02261F2A: + ldr r0, [r4, #0] + bl ov16_0223B384 + mov r0, #5 + mov r1, #0x38 + bl sub_02018144 + str r0, [r4, #4] + mov r0, #5 + bl sub_02079FF4 + ldr r1, [r4, #4] + str r0, [r1, #0] + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #0xc + and r0, r1 + cmp r0, #0xc + beq _02261F5E + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #0xcb + beq _02261F5E + b _02262072 +_02261F5E: + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E1F8 + cmp r0, #2 + bne _02261F7A + ldrb r0, [r4, #9] + str r0, [sp, #0x18] + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + bl ov16_0223E258 + str r0, [sp, #0x14] + b _02261F88 +_02261F7A: + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E258 + str r0, [sp, #0x18] + ldrb r0, [r4, #9] + str r0, [sp, #0x14] +_02261F88: + mov r0, #5 + bl sub_02073C74 + add r6, r0, #0 + mov r5, #0 +_02261F92: + ldr r0, [r4, #4] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_0207A048 + add r5, r5, #1 + cmp r5, #6 + blt _02261F92 + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + mov r7, #0 + bl ov16_0223DF60 + cmp r0, #0 + ble _02261FFA + ldr r0, [sp, #0x18] + mov r1, #6 + mul r1, r0 + add r5, r4, r1 + add r6, r7, #0 +_02261FC0: + ldrb r2, [r5, #0x1c] + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + bl ov16_0223DFAC + str r0, [sp, #0x1c] + ldr r0, [r4, #4] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_0207A0FC + add r1, r0, #0 + ldr r0, [sp, #0x1c] + bl sub_020775EC + ldr r0, [r4, #4] + ldrb r1, [r5, #0x1c] + add r0, r0, r6 + add r0, #0x2c + strb r1, [r0] + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + add r5, r5, #1 + add r6, r6, #2 + add r7, r7, #1 + bl ov16_0223DF60 + cmp r7, r0 + blt _02261FC0 +_02261FFA: + ldr r0, [r4, #0] + ldr r1, [sp, #0x14] + mov r6, #0 + bl ov16_0223DF60 + cmp r0, #0 + ble _02262056 + ldr r0, [sp, #0x14] + mov r1, #6 + mul r1, r0 + mov r0, #1 + add r5, r4, r1 + str r0, [sp, #0xc] + add r7, r6, #0 +_02262016: + ldrb r2, [r5, #0x1c] + ldr r0, [r4, #0] + ldr r1, [sp, #0x14] + bl ov16_0223DFAC + str r0, [sp, #0x20] + ldr r0, [r4, #4] + ldr r1, [sp, #0xc] + ldr r0, [r0, #0] + bl sub_0207A0FC + add r1, r0, #0 + ldr r0, [sp, #0x20] + bl sub_020775EC + ldr r0, [r4, #4] + ldrb r1, [r5, #0x1c] + add r0, r0, r7 + add r0, #0x2d + strb r1, [r0] + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x14] + add r0, r0, #2 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + add r5, r5, #1 + add r7, r7, #2 + add r6, r6, #1 + bl ov16_0223DF60 + cmp r6, r0 + blt _02262016 +_02262056: + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E1F8 + cmp r0, #4 + bne _0226206A + ldr r0, [r4, #4] + mov r1, #1 + strb r1, [r0, #0x11] + b _022620F2 +_0226206A: + ldr r0, [r4, #4] + mov r1, #0 + strb r1, [r0, #0x11] + b _022620F2 +_02262072: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02262094 + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + bne _02262094 + ldrb r1, [r4, #9] + mov r0, #1 + add r7, r1, #0 + and r7, r0 + b _02262098 +_02262094: + ldrb r1, [r4, #9] + add r7, r1, #0 +_02262098: + ldr r0, [r4, #0] + bl ov16_0223E1F8 + cmp r0, #4 + bne _022620A6 + mov r1, #1 + b _022620A8 +_022620A6: + mov r1, #0 +_022620A8: + ldr r0, [r4, #4] + strb r1, [r0, #0x11] + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223DF20 + str r0, [sp, #0x10] + mov r6, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _022620F2 + mov r0, #6 + mul r0, r7 + add r5, r4, r0 +_022620C6: + ldrb r2, [r5, #0x1c] + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov16_0223DFAC + add r1, r0, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #0] + bl sub_0207A048 + ldr r0, [r4, #4] + ldrb r1, [r5, #0x1c] + add r0, r0, r6 + add r0, #0x2c + strb r1, [r0] + ldr r0, [sp, #0x10] + add r5, r5, #1 + add r6, r6, #1 + bl sub_0207A0F8 + cmp r6, r0 + blt _022620C6 +_022620F2: + ldr r1, [r4, #0] + ldr r0, [r4, #4] + str r1, [r0, #8] + ldr r0, [r4, #4] + mov r1, #5 + str r1, [r0, #0xc] + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x36 + strb r1, [r0] + ldr r1, [r4, #0x10] + ldr r0, [r4, #4] + strh r1, [r0, #0x24] + ldrb r1, [r4, #0x16] + ldr r0, [r4, #4] + strb r1, [r0, #0x12] + ldr r0, [r4, #4] + ldrb r1, [r4, #0xb] + add r0, #0x35 + strb r1, [r0] + ldrh r1, [r4, #0x14] + ldr r0, [r4, #4] + strh r1, [r0, #0x22] + ldrb r1, [r4, #9] + ldr r0, [r4, #4] + str r1, [r0, #0x28] + ldr r0, [r4, #4] + ldrb r1, [r4, #0x17] + add r0, #0x32 + strb r1, [r0] + ldrb r0, [r4, #9] + bl sub_020787CC + ldrb r1, [r4, #0x18] + tst r0, r1 + bne _02262142 + ldrb r0, [r4, #9] + add r0, r4, r0 + ldrb r1, [r0, #0xc] + b _02262144 +_02262142: + mov r1, #6 +_02262144: + ldr r0, [r4, #4] + strb r1, [r0, #0x14] + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + beq _0226215C + ldr r0, [r4, #4] + mov r1, #6 + strb r1, [r0, #0x15] + b _02262186 +_0226215C: + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E258 + bl sub_020787CC + ldrb r1, [r4, #0x18] + tst r0, r1 + bne _02262180 + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r0, r4, r0 + ldrb r1, [r0, #0xc] + ldr r0, [r4, #4] + strb r1, [r0, #0x15] + b _02262186 +_02262180: + ldr r0, [r4, #4] + mov r1, #6 + strb r1, [r0, #0x15] +_02262186: + ldr r0, [r4, #4] + bl ov12_0221FC20 + ldrb r0, [r4, #0xa] + add sp, #0x24 + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r4, r5, r6, r7, pc} +_02262196: + ldr r0, [r4, #4] + add r0, #0x36 + ldrb r0, [r0] + cmp r0, #0 + beq _02262252 + ldr r0, [r4, #0] + bl ov16_0223B430 + ldr r0, [r4, #0] + bl ov16_0223E02C + ldr r1, [r4, #4] + add r1, #0x32 + ldrb r1, [r1] + bl ov16_0226CD10 + mov r0, #7 + str r0, [sp] + mov r0, #0 + mov r1, #5 + str r0, [sp, #4] + mov r2, #3 + add r3, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + lsl r2, r2, #0xa + sub r3, #0xd + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + mov r1, #0xa + str r0, [sp, #4] + add r3, r1, #0 + str r0, [sp, #8] + ldr r2, _0226221C ; =0x0000FFFF + add r0, r5, #0 + sub r3, #0x12 + bl sub_02003178 + ldrb r0, [r4, #0xa] + add sp, #0x24 + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r4, r5, r6, r7, pc} +_022621F2: + bl sub_0200384C + cmp r0, #0 + bne _02262252 + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #0 + bl sub_02015738 + ldr r3, [r4, #4] + ldr r0, [r4, #0] + ldrb r2, [r3, #0x11] + cmp r2, #6 + bne _02262220 + ldrb r1, [r4, #9] + mov r2, #0xff + bl ov16_02265B10 + b _0226222E + nop +_0226221C: .word 0x0000FFFF +_02262220: + add r2, r3, r2 + add r2, #0x2c + ldrb r2, [r2] + ldrb r1, [r4, #9] + add r2, r2, #1 + bl ov16_02265B10 +_0226222E: + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + ldr r0, [r4, #4] + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02262252: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02261E8C + + thumb_func_start ov16_02262258 +ov16_02262258: ; 0x02262258 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp] + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #0x10 + ldrb r6, [r5, #9] + tst r1, r0 + bne _02262274 + mov r1, #8 + tst r0, r1 + beq _02262278 +_02262274: + str r6, [sp, #4] + b _02262282 +_02262278: + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov16_0223E258 + str r0, [sp, #4] +_02262282: + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov16_0225BE28 + add r4, r0, #0 + cmp r4, #6 + bne _022622E6 + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov16_0225BA88 + add r4, r0, #0 + cmp r4, #6 + bne _022622E6 + ldrb r1, [r5, #9] + ldr r0, [r5, #0] + bl ov16_0223DF20 + str r0, [sp, #8] + mov r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _022622E6 + ldr r0, [sp, #4] + add r7, r5, r6 + add r6, r5, r0 +_022622B8: + ldrb r1, [r5, #9] + ldr r0, [r5, #0] + add r2, r4, #0 + bl ov16_0223DFAC + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _022622DA + ldrb r0, [r7, #0xc] + cmp r4, r0 + beq _022622DA + ldrb r0, [r6, #0xc] + cmp r4, r0 + bne _022622E6 +_022622DA: + ldr r0, [sp, #8] + add r4, r4, #1 + bl sub_0207A0F8 + cmp r4, r0 + blt _022622B8 +_022622E6: + ldrb r1, [r5, #9] + ldr r0, [r5, #0] + add r2, r4, #1 + bl ov16_02265B10 + ldrb r1, [r5, #9] + ldrb r2, [r5, #8] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [sp] + bl sub_0200DA58 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02262258 + + thumb_func_start ov16_0226230C +ov16_0226230C: ; 0x0226230C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #9] + add r5, r0, #0 + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0226230C + + thumb_func_start ov16_0226232C +ov16_0226232C: ; 0x0226232C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r1, [r4, #9] + add r6, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02262348 + ldr r0, [r4, #0] + bl ov16_0226474C +_02262348: + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #0 + beq _02262354 + cmp r0, #6 + bls _0226235C +_02262354: + ldr r0, [r4, #0] + bl ov16_02264730 + b _022623C4 +_0226235C: + ldrb r1, [r4, #9] + sub r5, r0, #1 + ldr r0, [r4, #0] + bl ov16_0223DF20 + ldrb r1, [r4, #9] + add r1, r4, r1 + ldrb r1, [r1, #0xc] + cmp r5, r1 + beq _02262376 + ldrb r1, [r4, #0x16] + cmp r5, r1 + bne _0226237E +_02262376: + ldr r0, [r4, #0] + bl ov16_02264730 + b _022623C4 +_0226237E: + add r1, sp, #0 + ldrb r5, [r1] + bl sub_0207A0F8 + cmp r5, r0 + ldr r0, [r4, #0] + ble _02262392 + bl ov16_02264730 + b _022623C4 +_02262392: + ldrb r1, [r4, #9] + sub r2, r5, #1 + bl ov16_0223DFAC + mov r1, #0xa3 + mov r2, #0 + add r5, r0, #0 + bl sub_02074470 + cmp r0, #0 + bne _022623AE + ldr r0, [r4, #0] + bl ov16_02264730 +_022623AE: + add r0, r5, #0 + mov r1, #0xae + mov r2, #0 + bl sub_02074470 + ldr r1, _022623EC ; =0x000001EE + cmp r0, r1 + bne _022623C4 + ldr r0, [r4, #0] + bl ov16_02264730 +_022623C4: + add r2, sp, #0 + ldrb r1, [r4, #9] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02265B10 + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_022623EC: .word 0x000001EE + thumb_func_end ov16_0226232C + + thumb_func_start ov16_022623F0 +ov16_022623F0: ; 0x022623F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r0, [r4, #0] + bl ov16_0223E02C + add r5, r0, #0 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223DF14 + str r0, [sp, #0xc] + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + bl ov16_0223E258 + add r1, r0, #0 + ldrb r0, [r4, #0xd] + cmp r1, r0 + beq _0226242A + ldr r0, [r4, #0] + bl ov16_0223F35C + add r7, r0, #0 + b _0226242C +_0226242A: + mov r7, #0 +_0226242C: + ldrb r0, [r4, #0xe] + cmp r0, #4 + bhi _022624AC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226243E: ; jump table + .short _02262448 - _0226243E - 2 ; case 0 + .short _02262498 - _0226243E - 2 ; case 1 + .short _02262572 - _0226243E - 2 ; case 2 + .short _02262590 - _0226243E - 2 ; case 3 + .short _022625F8 - _0226243E - 2 ; case 4 +_02262448: + add r0, r5, #0 + bl ov16_02269348 + cmp r0, #0 + beq _022624AC + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02262490 + ldr r0, [r4, #0] + bl ov16_0223E05C + add r5, r0, #0 + ldrb r0, [r4, #0xf] + cmp r0, #5 + add r0, sp, #0x10 + bne _02262472 + mov r1, #0x82 + strb r1, [r0, #5] + ldr r0, [r4, #0x14] + str r0, [sp, #0x18] + b _02262476 +_02262472: + mov r1, #0 + strb r1, [r0, #5] +_02262476: + ldr r1, [r4, #0x10] + add r0, sp, #0x10 + strh r1, [r0, #6] + ldr r0, [r4, #0] + bl ov16_0223EDF0 + add r3, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, sp, #0x14 + bl ov16_0223FB24 + strh r0, [r4, #0x1a] +_02262490: + mov r0, #1 + add sp, #0x38 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02262498: + ldrh r0, [r4, #0x1a] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _022624AE + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _022624AE +_022624AC: + b _02262622 +_022624AE: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_02269218 + ldrh r1, [r4, #0x18] + add r0, sp, #0x10 + strh r1, [r0] + ldrb r0, [r4, #0xf] + cmp r0, #5 + bhi _0226255A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022624E0: ; jump table + .short _022624EC - _022624E0 - 2 ; case 0 + .short _02262502 - _022624E0 - 2 ; case 1 + .short _02262518 - _022624E0 - 2 ; case 2 + .short _0226252E - _022624E0 - 2 ; case 3 + .short _02262544 - _022624E0 - 2 ; case 4 + .short _022624EC - _022624E0 - 2 ; case 5 +_022624EC: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #0xd + bl ov16_02268C04 + b _0226255E +_02262502: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #0xe + bl ov16_02268C04 + b _0226255E +_02262518: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #0xf + bl ov16_02268C04 + b _0226255E +_0226252E: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #0x10 + bl ov16_02268C04 + b _0226255E +_02262544: + mov r0, #0 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #0x11 + bl ov16_02268C04 + b _0226255E +_0226255A: + bl sub_02022974 +_0226255E: + mov r0, #2 + strb r0, [r4, #0xe] + add r0, r7, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} +_02262572: + add r0, r5, #0 + bl ov16_0226925C + mov r1, #0 + mvn r1, r1 + str r0, [r4, #8] + cmp r0, r1 + beq _02262622 + ldr r0, _02262628 ; =0x000005DD + bl sub_02005748 + mov r0, #3 + add sp, #0x38 + strb r0, [r4, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_02262590: + add r0, r5, #0 + bl ov16_02269348 + cmp r0, #1 + bne _02262622 + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + str r0, [sp, #8] + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov16_022675AC + ldr r0, [sp, #0xc] + bl ov16_022647D8 + add r0, r7, #0 + bl ov16_0226846C + add r0, r5, #0 + bl ov16_02269218 + mov r3, #0 + str r3, [sp] + ldr r0, [sp, #8] + str r3, [sp, #4] + add r1, r6, #0 + add r2, r5, #0 + bl ov16_02268C04 + ldr r0, [r4, #8] + cmp r0, #1 + bne _022625E4 + add r0, r5, #0 + mov r1, #0 + bl ov16_0226BCCC +_022625E4: + mov r0, #4 + strb r0, [r4, #0xe] + ldr r0, [sp, #8] + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} +_022625F8: + add r0, r5, #0 + bl ov16_0226BCD0 + cmp r0, #1 + bne _02262622 + ldrb r1, [r4, #0xd] + ldr r0, [r4, #0] + ldr r2, [r4, #8] + bl ov16_022656D4 + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02262622: + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02262628: .word 0x000005DD + thumb_func_end ov16_022623F0 + + thumb_func_start ov16_0226262C +ov16_0226262C: ; 0x0226262C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0226262C + + thumb_func_start ov16_0226264C +ov16_0226264C: ; 0x0226264C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0226264C + + thumb_func_start ov16_0226266C +ov16_0226266C: ; 0x0226266C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #0 + bl ov16_0223F530 + cmp r0, #1 + bne _02262686 + ldr r0, [r4, #0] + bl ov16_0226474C +_02262686: + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #0 + beq _02262696 + cmp r0, #0xff + beq _0226269C + cmp r0, #1 + beq _0226269C +_02262696: + ldr r0, [r4, #0] + bl ov16_02264730 +_0226269C: + add r2, sp, #0 + ldrb r1, [r4, #0xd] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_022656D4 + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0226266C + + thumb_func_start ov16_022626C0 +ov16_022626C0: ; 0x022626C0 + push {r3, r4, r5, lr} + sub sp, #0x1fc + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x6a + ldrb r0, [r0] + cmp r0, #0xa + bls _022626D6 + b _02262924 +_022626D6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022626E2: ; jump table + .short _022626F8 - _022626E2 - 2 ; case 0 + .short _02262902 - _022626E2 - 2 ; case 1 + .short _02262752 - _022626E2 - 2 ; case 2 + .short _02262902 - _022626E2 - 2 ; case 3 + .short _022627AE - _022626E2 - 2 ; case 4 + .short _02262902 - _022626E2 - 2 ; case 5 + .short _022627FC - _022626E2 - 2 ; case 6 + .short _02262902 - _022626E2 - 2 ; case 7 + .short _02262884 - _022626E2 - 2 ; case 8 + .short _02262902 - _022626E2 - 2 ; case 9 + .short _022628E0 - _022626E2 - 2 ; case 10 +_022626F8: + ldrh r0, [r4, #0x1e] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _02262746 + ldr r0, [r4, #0x5c] + cmp r0, #0 + bne _02262746 + ldr r0, [r4, #8] + mov r1, #6 + bl sub_020080C0 + cmp r0, #0 + bne _02262746 + add r0, r4, #0 + add r0, #0x69 + ldrb r1, [r0] + mov r0, #0xf + add r2, sp, #0x1b8 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #0xc] + add r3, sp, #0x1b8 + bl ov16_02264408 + add sp, #0x1fc + mov r0, #1 + add r4, #0x6a + add sp, #0x14 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262746: + add sp, #0x1fc + mov r0, #4 + add r4, #0x6a + add sp, #0x14 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262752: + add r3, r4, #0 + add r3, #0x69 + ldrb r3, [r3] + ldr r0, [r4, #0] + add r1, #0x10 + add r2, sp, #0x168 + bl ov16_02264530 + add r0, sp, #0x168 + mov r1, #5 + bl ov12_022382BC + add r0, r4, #0 + add r0, #0x69 + ldrb r1, [r0] + mov r0, #0x10 + add r2, sp, #0x110 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #0xc] + add r3, sp, #0x110 + bl ov16_02264408 + mov r0, #0x1a + add sp, #0x1fc + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + add r0, #0x6a + ldrb r0, [r0] + add r4, #0x6a + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_022627AE: + ldr r0, [r4, #0] + mov r1, #2 + bl ov16_0223F460 + add r0, r4, #0 + add r0, #0x6b + ldrb r0, [r0] + cmp r0, #0 + beq _022627C6 + ldr r0, [r4, #0] + bl ov16_0223F3EC +_022627C6: + add r0, r4, #0 + add r0, #0x6c + ldrb r0, [r0] + cmp r0, #0 + beq _022627DC + ldr r0, [r4, #0] + bl ov16_0223E000 + mov r1, #1 + bl sub_02008B54 +_022627DC: + add r3, r4, #0 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #0xc] + add r3, #0x10 + bl ov16_02264408 + add r0, r4, #0 + add r0, #0x6a + ldrb r0, [r0] + add sp, #0x1fc + add r4, #0x6a + add r0, r0, #1 + add sp, #0x14 + strb r0, [r4] + pop {r3, r4, r5, pc} +_022627FC: + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223F460 + add r0, r4, #0 + add r0, #0x6b + ldrb r0, [r0] + cmp r0, #0 + beq _02262814 + ldr r0, [r4, #0] + bl ov16_0223F3BC +_02262814: + add r0, r4, #0 + add r0, #0x6c + ldrb r0, [r0] + cmp r0, #0 + beq _0226282A + ldr r0, [r4, #0] + bl ov16_0223E000 + mov r1, #1 + bl sub_02008B60 +_0226282A: + ldrh r0, [r4, #0x1e] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _02262878 + ldr r0, [r4, #0x5c] + cmp r0, #0 + bne _02262878 + ldr r0, [r4, #8] + mov r1, #6 + bl sub_020080C0 + cmp r0, #0 + bne _02262878 + add r0, r4, #0 + add r0, #0x69 + ldrb r1, [r0] + mov r0, #0xf + add r2, sp, #0xb8 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #0xc] + add r3, sp, #0xb8 + bl ov16_02264408 + add sp, #0x1fc + mov r0, #7 + add r4, #0x6a + add sp, #0x14 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262878: + add sp, #0x1fc + mov r0, #0xa + add r4, #0x6a + add sp, #0x14 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262884: + add r3, r4, #0 + add r3, #0x69 + ldrb r3, [r3] + ldr r0, [r4, #0] + add r1, #0x10 + add r2, sp, #0x68 + bl ov16_02264530 + add r0, sp, #0x68 + mov r1, #5 + bl ov12_02238390 + add r0, r4, #0 + add r0, #0x69 + ldrb r1, [r0] + mov r0, #0x10 + add r2, sp, #0x10 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #0xc] + add r3, sp, #0x10 + bl ov16_02264408 + mov r0, #0x1a + add sp, #0x1fc + ldr r1, [r4, #4] + mov r2, #1 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + add r0, #0x6a + ldrb r0, [r0] + add r4, #0x6a + add sp, #0x14 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_022628E0: + add r2, r4, #0 + add r1, #0x69 + add r2, #0x68 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, pc} +_02262902: + ldr r0, [r4, #0xc] + bl ov12_0222016C + ldr r0, [r4, #0xc] + bl ov12_02220188 + cmp r0, #0 + bne _02262924 + ldr r0, [r4, #0xc] + bl ov12_02220198 + add r0, r4, #0 + add r0, #0x6a + ldrb r0, [r0] + add r4, #0x6a + add r0, r0, #1 + strb r0, [r4] +_02262924: + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022626C0 + + thumb_func_start ov16_0226292C +ov16_0226292C: ; 0x0226292C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #9] + cmp r0, #6 + bhs _02262966 + ldrb r0, [r4, #0xa] + cmp r0, #0 + bne _02262960 + mov r0, #2 + strb r0, [r4, #0xa] + ldrb r0, [r4, #9] + mov r1, #6 + add r0, r0, #1 + strb r0, [r4, #9] + ldr r0, [r4, #4] + bl sub_020080C0 + add r3, r0, #0 + mov r2, #1 + ldr r0, [r4, #4] + mov r1, #6 + eor r2, r3 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_02262960: + sub r0, r0, #1 + strb r0, [r4, #0xa] + pop {r3, r4, r5, pc} +_02262966: + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + ldrb r1, [r4, #8] + ldr r0, [r4, #0] + mov r2, #0x17 + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0226292C + + thumb_func_start ov16_02262988 +ov16_02262988: ; 0x02262988 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _0226299A + cmp r0, #1 + beq _022629A8 + b _022629BE +_0226299A: + ldr r1, [r4, #0x30] + add r0, r4, #0 + bl ov16_022674C4 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_022629A8: + add r0, r4, #0 + bl ov16_022674F8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _022629D8 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_022629BE: + add r2, r4, #0 + add r1, #0x24 + add r2, #0x4c + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0xc] + bl ov16_02266ABC + mov r0, #0 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_0200DA58 +_022629D8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02262988 + + thumb_func_start ov16_022629DC +ov16_022629DC: ; 0x022629DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #0 + beq _022629F2 + cmp r0, #1 + beq _02262A0E + cmp r0, #2 + beq _02262A54 + b _02262A7A +_022629F2: + add r0, r4, #0 + mov r1, #0 + add r0, #0x4e + strb r1, [r0] + ldr r0, _02262A98 ; =0x0000070B + bl sub_02005748 + ldr r1, [r4, #0x40] + add r0, r4, #0 + bl ov16_0226752C + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_02262A0E: + add r0, r4, #0 + add r0, #0x4e + ldrb r0, [r0] + cmp r0, #8 + bhs _02262A26 + add r0, r4, #0 + add r0, #0x4e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x4e + strb r1, [r0] +_02262A26: + add r0, r4, #0 + bl ov16_02267560 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02262A94 + add r0, r4, #0 + add r0, #0x4e + ldrb r0, [r0] + cmp r0, #8 + blo _02262A4C + ldr r0, _02262A98 ; =0x0000070B + mov r1, #0 + bl sub_020057A4 + mov r0, #0x64 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262A4C: + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262A54: + add r0, r4, #0 + add r0, #0x4e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x4e + strb r1, [r0] + add r0, r4, #0 + add r0, #0x4e + ldrb r0, [r0] + cmp r0, #8 + blo _02262A94 + ldr r0, _02262A98 ; =0x0000070B + mov r1, #0 + bl sub_020057A4 + mov r0, #0x64 + strb r0, [r4] + pop {r3, r4, r5, pc} +_02262A7A: + add r2, r4, #0 + add r1, #0x24 + add r2, #0x4c + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0xc] + bl ov16_02266ABC + mov r0, #0 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_0200DA58 +_02262A94: + pop {r3, r4, r5, pc} + nop +_02262A98: .word 0x0000070B + thumb_func_end ov16_022629DC + + thumb_func_start ov16_02262A9C +ov16_02262A9C: ; 0x02262A9C + push {r3, r4, r5, r6, lr} + sub sp, #0x114 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r1, r4, #0 + add r1, #0x66 + ldrb r1, [r1] + add r5, r0, #0 + cmp r1, #0xa + bls _02262AB8 + b _02262D20 +_02262AB8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02262AC4: ; jump table + .short _02262ADA - _02262AC4 - 2 ; case 0 + .short _02262B82 - _02262AC4 - 2 ; case 1 + .short _02262B26 - _02262AC4 - 2 ; case 2 + .short _02262B82 - _02262AC4 - 2 ; case 3 + .short _02262BA6 - _02262AC4 - 2 ; case 4 + .short _02262BF8 - _02262AC4 - 2 ; case 5 + .short _02262C12 - _02262AC4 - 2 ; case 6 + .short _02262C4E - _02262AC4 - 2 ; case 7 + .short _02262C7A - _02262AC4 - 2 ; case 8 + .short _02262CBA - _02262AC4 - 2 ; case 9 + .short _02262D02 - _02262AC4 - 2 ; case 10 +_02262ADA: + add r0, r4, #0 + add r0, #0x70 + ldrh r0, [r0] + cmp r0, #0 + beq _02262B1C + add r0, r4, #0 + add r0, #0x65 + ldrb r1, [r0] + mov r0, #0xf + add r2, sp, #0xbc + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0xbc + bl ov16_02264408 + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r4, #0x66 + add sp, #0x114 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262B1C: + mov r0, #4 + add r4, #0x66 + add sp, #0x114 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262B26: + add r3, r4, #0 + add r3, #0x65 + ldrb r3, [r3] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0xc + add r2, sp, #0x6c + bl ov16_02264530 + add r0, sp, #0x6c + mov r1, #5 + bl ov12_022382BC + add r0, r4, #0 + add r0, #0x65 + ldrb r1, [r0] + mov r0, #0x10 + add r2, sp, #0x14 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x14 + bl ov16_02264408 + mov r0, #0x1a + ldr r1, [r4, #4] + mov r2, #0 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r4, #0x66 + add sp, #0x114 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262B82: + bl ov12_0222016C + add r0, r5, #0 + bl ov12_02220188 + cmp r0, #0 + bne _02262C00 + add r0, r5, #0 + bl ov12_02220198 + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r4, #0x66 + add sp, #0x114 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262BA6: + add r0, r4, #0 + add r0, #0x67 + ldrb r0, [r0] + cmp r0, #2 + bne _02262BB4 + mov r5, #0x75 + b _02262BB8 +_02262BB4: + mov r5, #0x74 + mvn r5, r5 +_02262BB8: + add r1, r4, #0 + add r1, #0x65 + ldrb r1, [r1] + ldr r0, [r4, #0] + bl ov16_0223EE30 + str r5, [sp] + mov r1, #0x7f + str r1, [sp, #4] + add r1, r4, #0 + add r1, #0x72 + ldrh r1, [r1] + add r3, r4, #0 + mov r2, #0 + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + str r2, [sp, #0x10] + add r2, r4, #0 + add r2, #0x68 + add r3, #0x6b + ldrh r2, [r2] + ldrb r3, [r3] + bl sub_02077DB4 + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x66 + strb r1, [r0] +_02262BF8: + bl sub_0200598C + cmp r0, #0 + beq _02262C02 +_02262C00: + b _02262D20 +_02262C02: + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r4, #0x66 + add sp, #0x114 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262C12: + add r0, r4, #0 + add r0, #0x67 + ldrb r0, [r0] + cmp r0, #2 + ldr r0, _02262D24 ; =0x00000703 + bne _02262C26 + mov r1, #0x75 + bl sub_02005728 + b _02262C2E +_02262C26: + mov r1, #0x74 + mvn r1, r1 + bl sub_02005728 +_02262C2E: + ldr r0, [r4, #8] + mov r1, #0x29 + bl sub_020080C0 + cmp r0, #0 + ble _02262C44 + mov r0, #7 + add r4, #0x66 + add sp, #0x114 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262C44: + mov r0, #8 + add r4, #0x66 + add sp, #0x114 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262C4E: + ldr r0, [r4, #8] + mov r1, #0x29 + bl sub_020080C0 + add r5, r0, #0 + sub r5, #8 + bpl _02262C5E + mov r5, #0 +_02262C5E: + ldr r0, [r4, #8] + mov r1, #0x29 + add r2, r5, #0 + bl sub_02007DEC + cmp r5, #0 + bne _02262D20 + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x66 + strb r1, [r0] +_02262C7A: + ldr r0, [r4, #0x6c] + add r1, r4, #0 + str r0, [sp] + add r0, r4, #0 + add r2, r4, #0 + add r3, r4, #0 + add r0, #0x68 + add r1, #0x6a + add r2, #0x67 + add r3, #0x6b + ldrh r0, [r0] + ldrb r1, [r1] + ldrb r2, [r2] + ldrb r3, [r3] + bl sub_02076648 + mov r3, #0x50 + sub r0, r3, r0 + str r0, [sp] + mov r1, #0 + ldr r0, [r4, #8] + add r2, r1, #0 + bl sub_020086D4 + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r4, #0x66 + add sp, #0x114 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262CBA: + ldr r0, [r4, #8] + mov r1, #1 + bl sub_020080C0 + add r2, r0, #0 + ldr r0, [r4, #8] + mov r1, #1 + add r2, #8 + bl sub_02007DEC + ldr r0, [r4, #8] + mov r1, #0x12 + bl sub_020080C0 + add r5, r0, #0 + sub r5, #8 + bpl _02262CDE + mov r5, #0 +_02262CDE: + ldr r0, [r4, #8] + mov r1, #0x12 + add r2, r5, #0 + bl sub_02007DEC + cmp r5, #0 + bne _02262D20 + ldr r0, [r4, #8] + bl sub_02007DC8 + add r0, r4, #0 + add r0, #0x66 + ldrb r0, [r0] + add r4, #0x66 + add sp, #0x114 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, pc} +_02262D02: + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x65 + add r2, #0x64 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02262D20: + add sp, #0x114 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02262D24: .word 0x00000703 + thumb_func_end ov16_02262A9C + + thumb_func_start ov16_02262D28 +ov16_02262D28: ; 0x02262D28 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E064 + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E000 + add r7, r0, #0 + ldrb r0, [r5, #6] + cmp r0, #0 + beq _02262D52 + cmp r0, #1 + beq _02262D90 + cmp r0, #2 + beq _02262DA4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_02262D52: + ldr r0, [r5, #0] + bl ov16_0223E220 + mov r1, #1 + bl sub_02015738 + mov r1, #0 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r2, _02262DC0 ; =0x0000FFFF + add r0, r4, #0 + mov r1, #0xf + mov r3, #1 + bl sub_02003178 + mov r1, #0 + add r0, r7, #0 + mov r2, #0x10 + add r3, r1, #0 + str r1, [sp] + bl sub_0200872C + mov r0, #0 + mov r1, #0x10 + bl sub_0200564C + ldrb r0, [r5, #6] + add r0, r0, #1 + strb r0, [r5, #6] +_02262D90: + add r0, r4, #0 + bl sub_0200384C + cmp r0, #0 + bne _02262DBA + ldrb r0, [r5, #6] + add sp, #0xc + add r0, r0, #1 + strb r0, [r5, #6] + pop {r4, r5, r6, r7, pc} +_02262DA4: + ldrb r1, [r5, #5] + ldrb r2, [r5, #4] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02262DBA: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02262DC0: .word 0x0000FFFF + thumb_func_end ov16_02262D28 + + thumb_func_start ov16_02262DC4 +ov16_02262DC4: ; 0x02262DC4 + push {r4, r5, r6, lr} + sub sp, #0x110 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E008 + add r1, r4, #0 + add r1, #0x62 + ldrb r1, [r1] + add r5, r0, #0 + cmp r1, #4 + bls _02262DE0 + b _02262F0C +_02262DE0: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02262DEC: ; jump table + .short _02262DF6 - _02262DEC - 2 ; case 0 + .short _02262E38 - _02262DEC - 2 ; case 1 + .short _02262EE8 - _02262DEC - 2 ; case 2 + .short _02262E8C - _02262DEC - 2 ; case 3 + .short _02262EE8 - _02262DEC - 2 ; case 4 +_02262DF6: + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + cmp r0, #0 + beq _02262E2E + add r2, r4, #0 + add r2, #0x63 + ldrb r2, [r2] + mov r1, #6 + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x63 + ldrb r0, [r0] + cmp r0, #1 + bne _02262E1E + mov r0, #0xff + add r4, #0x62 + add sp, #0x110 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262E1E: + add r0, r4, #0 + add r0, #0x62 + ldrb r0, [r0] + add r4, #0x62 + add sp, #0x110 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262E2E: + mov r0, #0xff + add r4, #0x62 + add sp, #0x110 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262E38: + ldr r0, [r4, #0x64] + cmp r0, #0 + beq _02262E82 + mov r0, #0x1a + ldr r1, [r4, #4] + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + bne _02262E82 + add r0, r4, #0 + add r0, #0x61 + ldrb r1, [r0] + mov r0, #0xf + add r2, sp, #0xb8 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0xb8 + bl ov16_02264408 + add r0, r4, #0 + add r0, #0x62 + ldrb r0, [r0] + add r4, #0x62 + add sp, #0x110 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262E82: + mov r0, #0xff + add r4, #0x62 + add sp, #0x110 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262E8C: + add r3, r4, #0 + add r3, #0x61 + ldrb r3, [r3] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #8 + add r2, sp, #0x68 + bl ov16_02264530 + add r0, sp, #0x68 + mov r1, #5 + bl ov12_02238390 + add r0, r4, #0 + add r0, #0x61 + ldrb r1, [r0] + mov r0, #0x10 + add r2, sp, #0x10 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + ldr r0, [r4, #0] + mov r3, #1 + bl ov16_02266B78 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r5, #0 + add r3, sp, #0x10 + bl ov16_02264408 + mov r0, #0x1a + ldr r1, [r4, #4] + mov r2, #1 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + add r0, #0x62 + ldrb r0, [r0] + add r4, #0x62 + add sp, #0x110 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262EE8: + bl ov12_0222016C + add r0, r5, #0 + bl ov12_02220188 + cmp r0, #0 + bne _02262F2A + add r0, r5, #0 + bl ov12_02220198 + add r0, r4, #0 + add r0, #0x62 + ldrb r0, [r0] + add r4, #0x62 + add sp, #0x110 + add r0, r0, #1 + strb r0, [r4] + pop {r4, r5, r6, pc} +_02262F0C: + add r1, r4, #0 + add r2, r4, #0 + add r1, #0x61 + add r2, #0x60 + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02262F2A: + add sp, #0x110 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02262DC4 + + thumb_func_start ov16_02262F30 +ov16_02262F30: ; 0x02262F30 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xa] + cmp r0, #0 + beq _02262F42 + cmp r0, #1 + beq _02262F58 + pop {r3, r4, r5, pc} +_02262F42: + ldr r0, [r4, #4] + add r1, #0xb + bl ov16_0226834C + ldr r0, _02262F78 ; =0x0000070C + bl sub_02005748 + ldrb r0, [r4, #0xa] + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r3, r4, r5, pc} +_02262F58: + ldrb r0, [r4, #0xb] + cmp r0, #1 + bne _02262F74 + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02262F74: + pop {r3, r4, r5, pc} + nop +_02262F78: .word 0x0000070C + thumb_func_end ov16_02262F30 + + thumb_func_start ov16_02262F7C +ov16_02262F7C: ; 0x02262F7C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F29C + cmp r0, #0 + beq _02262F9E + ldr r0, [r4, #0] + bl ov16_0223F29C + bl sub_0200EBA0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223F2A4 +_02262F9E: + ldrb r0, [r4, #6] + bl sub_0201D724 + cmp r0, #0 + bne _02262FBE + ldrb r1, [r4, #5] + ldrb r2, [r4, #4] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02262FBE: + pop {r3, r4, r5, pc} + thumb_func_end ov16_02262F7C + + thumb_func_start ov16_02262FC0 +ov16_02262FC0: ; 0x02262FC0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #7] + cmp r0, #0 + beq _02262FD2 + cmp r0, #1 + beq _02262FE8 + pop {r3, r4, r5, pc} +_02262FD2: + ldrb r0, [r4, #6] + bl sub_0201D724 + cmp r0, #0 + bne _02263012 + ldrb r0, [r4, #7] + add r0, r0, #1 + strb r0, [r4, #7] + mov r0, #0 + strb r0, [r4, #8] + pop {r3, r4, r5, pc} +_02262FE8: + ldrb r0, [r4, #8] + add r0, r0, #1 + strb r0, [r4, #8] + ldrb r0, [r4, #8] + cmp r0, #0x28 + bne _02263012 + ldrb r1, [r4, #5] + ldr r0, [r4, #0] + bl ov16_022661B0 + ldrb r1, [r4, #5] + ldrb r2, [r4, #4] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02263012: + pop {r3, r4, r5, pc} + thumb_func_end ov16_02262FC0 + + thumb_func_start ov16_02263014 +ov16_02263014: ; 0x02263014 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r0, [r4, #0] + bl ov16_0223E064 + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E22C + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E240 + lsl r1, r0, #2 + ldr r0, _02263388 ; =0x0226F1D0 + ldr r0, [r0, r1] + str r0, [sp, #0xc] + ldrb r0, [r4, #0x15] + add r0, r0, #1 + strb r0, [r4, #0x15] + ldrb r0, [r4, #0x14] + cmp r0, #5 + bls _0226304E + b _02263384 +_0226304E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226305A: ; jump table + .short _02263066 - _0226305A - 2 ; case 0 + .short _022630A6 - _0226305A - 2 ; case 1 + .short _0226325C - _0226305A - 2 ; case 2 + .short _02263278 - _0226305A - 2 ; case 3 + .short _02263294 - _0226305A - 2 ; case 4 + .short _022632A6 - _0226305A - 2 ; case 5 +_02263066: + mov r0, #5 + mov r1, #0 + bl ov12_02237EFC + str r0, [r4, #4] + ldr r0, _0226338C ; =0x0226F31C + add r1, sp, #0x10 + ldrb r5, [r0, r5] + mov r0, #1 + str r0, [sp, #0x14] + str r5, [sp, #0x10] + ldr r0, [r4, #4] + bl ov12_02237F38 + str r0, [r4, #8] + add r0, r5, #1 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [r4, #4] + add r1, sp, #0x10 + bl ov12_02237F38 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + bl ov12_02238004 + ldr r0, _02263390 ; =0x0000084F + bl sub_02005748 + mov r0, #1 + strb r0, [r4, #0x14] +_022630A6: + ldrb r0, [r4, #0x15] + cmp r0, #0xa + bne _022630E0 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _02263394 ; =0x0000F3FF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r7, #0 + mov r1, #1 + bl sub_02003178 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _02263398 ; =0x00003FFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r7, #0 + mov r1, #4 + bl sub_02003178 +_022630E0: + ldrb r0, [r4, #0x15] + cmp r0, #0xa + blo _0226312A + ldrb r0, [r4, #0x16] + cmp r0, #0x10 + bhs _0226312A + add r0, r0, #1 + strb r0, [r4, #0x16] + ldrb r0, [r4, #0x16] + cmp r0, #0x10 + bls _022630FA + mov r0, #0x10 + strb r0, [r4, #0x16] +_022630FA: + add r0, r7, #0 + mov r1, #1 + bl sub_0200316C + add r6, r0, #0 + mov r0, #1 + mov r5, #0 + lsl r0, r0, #8 +_0226310A: + ldrb r2, [r4, #0x16] + mov r1, #0x1f + mul r1, r2 + lsl r1, r1, #0xc + lsr r3, r1, #0x10 + lsl r1, r3, #5 + lsl r2, r3, #0xa + orr r1, r3 + orr r2, r1 + lsl r1, r5, #1 + strh r2, [r6, r1] + add r1, r5, #1 + lsl r1, r1, #0x10 + lsr r5, r1, #0x10 + cmp r5, r0 + blo _0226310A +_0226312A: + ldrb r0, [r4, #0x15] + cmp r0, #0x14 + bne _02263136 + ldr r0, [r4, #0xc] + bl ov12_02238004 +_02263136: + ldrb r0, [r4, #0x15] + cmp r0, #0x17 + bne _02263144 + mov r0, #0x85 + lsl r0, r0, #4 + bl sub_02005748 +_02263144: + ldrb r0, [r4, #0x15] + cmp r0, #0x1c + bne _02263236 + add r0, r7, #0 + mov r1, #0 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F204 + add r1, r5, #0 + mov r2, #0xe0 + bl sub_020C4B18 + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #0x4a + bne _02263186 + add r0, r7, #0 + mov r1, #2 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0xa0 + bl sub_020C4B18 + b _022631E8 +_02263186: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _022631AA + add r0, r7, #0 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0xe0 + bl sub_020C4B18 + b _022631E8 +_022631AA: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + beq _022631D0 + add r0, r7, #0 + mov r1, #2 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0xa0 + bl sub_020C4B18 + b _022631E8 +_022631D0: + add r0, r7, #0 + mov r1, #2 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0x80 + bl sub_020C4B18 +_022631E8: + mov r0, #0x10 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r3, #0 + lsl r0, r0, #0x10 + str r3, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r2, _02263394 ; =0x0000F3FF + add r0, r7, #0 + mov r1, #1 + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r3, #0 + lsl r0, r0, #0x10 + str r3, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r2, _02263398 ; =0x00003FFF + add r0, r7, #0 + mov r1, #4 + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r3, #0 + lsl r0, r0, #0x10 + str r3, [sp, #4] + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r2, _0226339C ; =0x0000FFFF + add r0, r7, #0 + mov r1, #0xa + bl sub_02003178 +_02263236: + ldrb r0, [r4, #0x15] + cmp r0, #0x32 + blo _02263266 + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + mov r2, #3 + str r3, [sp, #8] + add r0, r7, #0 + mov r1, #1 + lsl r2, r2, #0xa + bl sub_02003178 + ldrb r0, [r4, #0x14] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r3, r4, r5, r6, r7, pc} +_0226325C: + ldr r0, [r4, #0xc] + bl ov12_0223802C + cmp r0, #0 + beq _02263268 +_02263266: + b _02263384 +_02263268: + ldr r0, [r4, #4] + bl ov12_02237F74 + ldrb r0, [r4, #0x14] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r3, r4, r5, r6, r7, pc} +_02263278: + ldr r0, [r4, #0] + bl ov16_0223E220 + mov r1, #0 + bl sub_02015738 + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02263294: + ldr r0, [r4, #4] + bl ov12_02237F98 + ldr r0, [r4, #4] + bl ov12_02237F74 + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] +_022632A6: + add r0, r7, #0 + mov r1, #0 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F204 + add r1, r5, #0 + mov r2, #0xe0 + bl sub_020C4B18 + ldr r0, [r4, #0] + bl ov16_0223DF0C + cmp r0, #0x4a + bne _022632E2 + add r0, r7, #0 + mov r1, #2 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0xa0 + bl sub_020C4B18 + b _02263344 +_022632E2: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + beq _02263306 + add r0, r7, #0 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0xe0 + bl sub_020C4B18 + b _02263344 +_02263306: + ldr r0, [r4, #0] + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + beq _0226332C + add r0, r7, #0 + mov r1, #2 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0xa0 + bl sub_020C4B18 + b _02263344 +_0226332C: + add r0, r7, #0 + mov r1, #2 + bl sub_02003164 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223F210 + add r1, r5, #0 + mov r2, #0x80 + bl sub_020C4B18 +_02263344: + mov r3, #0 + str r3, [sp] + ldr r0, _022633A0 ; =0x00007FFF + str r3, [sp, #4] + str r0, [sp, #8] + ldr r2, _0226339C ; =0x0000FFFF + add r0, r7, #0 + mov r1, #1 + bl sub_02003178 + mov r3, #0 + str r3, [sp] + ldr r2, _0226339C ; =0x0000FFFF + str r3, [sp, #4] + str r2, [sp, #8] + add r0, r7, #0 + mov r1, #4 + lsr r2, r2, #2 + bl sub_02003178 + mov r3, #0 + str r3, [sp] + ldr r0, _022633A0 ; =0x00007FFF + str r3, [sp, #4] + str r0, [sp, #8] + ldr r2, _0226339C ; =0x0000FFFF + add r0, r7, #0 + mov r1, #0xa + bl sub_02003178 + mov r0, #3 + strb r0, [r4, #0x14] +_02263384: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02263388: .word 0x0226F1D0 +_0226338C: .word 0x0226F31C +_02263390: .word 0x0000084F +_02263394: .word 0x0000F3FF +_02263398: .word 0x00003FFF +_0226339C: .word 0x0000FFFF +_022633A0: .word 0x00007FFF + thumb_func_end ov16_02263014 + + thumb_func_start ov16_022633A4 +ov16_022633A4: ; 0x022633A4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E064 + ldrb r1, [r4, #0xa] + add r6, r0, #0 + cmp r1, #3 + bls _022633BC + b _022634D4 +_022633BC: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022633C8: ; jump table + .short _022633D0 - _022633C8 - 2 ; case 0 + .short _022633F0 - _022633C8 - 2 ; case 1 + .short _02263460 - _022633C8 - 2 ; case 2 + .short _02263492 - _022633C8 - 2 ; case 3 +_022633D0: + mov r2, #0 + str r2, [sp] + mov r1, #0x10 + str r1, [sp, #4] + mov r1, #0xa + str r2, [sp, #8] + add r3, r1, #0 + ldr r2, _022634D8 ; =0x0000FFFF + sub r3, #0x12 + bl sub_02003178 + ldrb r0, [r4, #0xa] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, pc} +_022633F0: + bl sub_0200384C + cmp r0, #0 + bne _022634D4 + ldr r0, [r4, #0] + bl ov16_0223B384 + mov r0, #5 + mov r1, #0x38 + bl sub_02018144 + str r0, [r4, #4] + ldrb r1, [r4, #9] + ldr r0, [r4, #0] + bl ov16_0223DF20 + ldr r1, [r4, #4] + mov r2, #3 + str r0, [r1, #0] + ldr r1, [r4, #0] + ldr r0, [r4, #4] + str r1, [r0, #8] + ldr r0, [r4, #4] + mov r1, #5 + str r1, [r0, #0xc] + ldrb r1, [r4, #0xe] + ldr r0, [r4, #4] + strb r1, [r0, #0x11] + ldrh r1, [r4, #0xc] + ldr r0, [r4, #4] + strh r1, [r0, #0x24] + ldr r1, [r4, #4] + mov r0, #0 + add r1, #0x36 + strb r0, [r1] + ldr r1, [r4, #4] + strb r0, [r1, #0x12] + ldr r1, [r4, #4] + add r1, #0x35 + strb r2, [r1] + ldr r1, [r4, #4] + strh r0, [r1, #0x22] + ldrb r2, [r4, #9] + ldr r1, [r4, #4] + str r2, [r1, #0x28] + ldr r1, [r4, #4] + add r1, #0x32 + strb r0, [r1] + ldr r0, [r4, #4] + bl ov12_0221FC20 + ldrb r0, [r4, #0xa] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, pc} +_02263460: + ldr r0, [r4, #4] + add r0, #0x36 + ldrb r0, [r0] + cmp r0, #0 + beq _022634D4 + ldr r0, [r4, #0] + bl ov16_0223B430 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + mov r1, #0xa + str r0, [sp, #4] + add r3, r1, #0 + str r0, [sp, #8] + ldr r2, _022634D8 ; =0x0000FFFF + add r0, r6, #0 + sub r3, #0x12 + bl sub_02003178 + ldrb r0, [r4, #0xa] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xa] + pop {r3, r4, r5, r6, pc} +_02263492: + bl sub_0200384C + cmp r0, #0 + bne _022634D4 + ldr r0, [r4, #4] + add r0, #0x34 + ldrb r2, [r0] + ldr r0, [r4, #0] + cmp r2, #4 + bne _022634B0 + ldrb r1, [r4, #9] + mov r2, #0xff + bl ov16_02265B10 + b _022634B8 +_022634B0: + ldrb r1, [r4, #9] + add r2, r2, #1 + bl ov16_02265B10 +_022634B8: + ldrb r1, [r4, #9] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + bl ov16_02266ABC + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_022634D4: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022634D8: .word 0x0000FFFF + thumb_func_end ov16_022633A4 + + thumb_func_start ov16_022634DC +ov16_022634DC: ; 0x022634DC + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5, #0xa] + cmp r0, #0 + beq _022634EE + cmp r0, #1 + beq _02263532 + pop {r3, r4, r5, pc} +_022634EE: + ldrb r1, [r5, #0xc] + ldrb r0, [r5, #0xd] + cmp r1, r0 + bne _0226352C + mov r0, #0 + strb r0, [r5, #0xc] + ldr r0, [r5, #4] + mov r1, #0x28 + bl sub_020080C0 + add r4, r0, #0 + ldrb r0, [r5, #0xb] + cmp r4, r0 + ble _0226350E + sub r4, r4, #1 + b _02263514 +_0226350E: + cmp r4, r0 + bge _02263514 + add r4, r4, #1 +_02263514: + ldr r0, [r5, #4] + mov r1, #0x28 + add r2, r4, #0 + bl sub_02007DEC + ldrb r0, [r5, #0xb] + cmp r4, r0 + bne _02263548 + ldrb r0, [r5, #0xa] + add r0, r0, #1 + strb r0, [r5, #0xa] + pop {r3, r4, r5, pc} +_0226352C: + add r0, r1, #1 + strb r0, [r5, #0xc] + pop {r3, r4, r5, pc} +_02263532: + ldrb r1, [r5, #9] + ldrb r2, [r5, #8] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_02263548: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022634DC + + thumb_func_start ov16_0226354C +ov16_0226354C: ; 0x0226354C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + ldrb r1, [r5, #5] + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E208 + cmp r0, #0 + bne _02263564 + mov r6, #0 + b _02263566 +_02263564: + mov r6, #1 +_02263566: + ldrb r0, [r5, #7] + cmp r0, #0 + beq _02263572 + cmp r0, #1 + beq _022635CE + b _022635E8 +_02263572: + ldrb r0, [r5, #0xe] + cmp r0, #0 + bne _02263580 + mov r0, #0 + str r0, [sp, #8] + mov r7, #1 + b _0226359A +_02263580: + mov r0, #1 + str r0, [sp, #8] + ldrb r0, [r5, #6] + cmp r0, #3 + beq _02263590 + cmp r0, #5 + beq _02263594 + b _02263598 +_02263590: + mov r7, #0 + b _0226359A +_02263594: + mov r7, #2 + b _0226359A +_02263598: + ldr r7, [sp, #8] +_0226359A: + ldr r0, [r5, #0] + bl ov16_0223E010 + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E018 + str r4, [sp] + str r0, [sp, #4] + add r0, r5, #0 + ldr r2, [sp, #8] + add r0, #8 + add r1, r6, #0 + add r3, r7, #0 + bl ov16_0226D194 + add r2, r0, #0 + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov16_0223E040 + ldrb r0, [r5, #7] + add sp, #0xc + add r0, r0, #1 + strb r0, [r5, #7] + pop {r4, r5, r6, r7, pc} +_022635CE: + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov16_0223E034 + bl ov16_0226D1FC + cmp r0, #1 + bne _022635FE + ldrb r0, [r5, #7] + add sp, #0xc + add r0, r0, #1 + strb r0, [r5, #7] + pop {r4, r5, r6, r7, pc} +_022635E8: + ldrb r1, [r5, #5] + ldrb r2, [r5, #4] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_022635FE: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0226354C + + thumb_func_start ov16_02263604 +ov16_02263604: ; 0x02263604 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldrb r1, [r5, #5] + add r7, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E208 + cmp r0, #0 + bne _0226361A + mov r4, #0 + b _0226361C +_0226361A: + mov r4, #1 +_0226361C: + ldr r0, [r5, #0] + add r1, r4, #0 + bl ov16_0223E034 + ldrb r1, [r5, #7] + add r6, r0, #0 + cmp r1, #0 + beq _02263632 + cmp r1, #1 + beq _0226364E + b _0226366E +_02263632: + ldrb r0, [r5, #0xe] + cmp r0, #0 + bne _0226363C + mov r1, #0 + b _0226363E +_0226363C: + mov r1, #1 +_0226363E: + add r0, r6, #0 + add r2, r1, #0 + bl ov16_0226D220 + ldrb r0, [r5, #7] + add r0, r0, #1 + strb r0, [r5, #7] + pop {r3, r4, r5, r6, r7, pc} +_0226364E: + bl ov16_0226D258 + cmp r0, #1 + bne _02263684 + add r0, r6, #0 + bl ov16_0226D27C + ldr r0, [r5, #0] + add r1, r4, #0 + mov r2, #0 + bl ov16_0223E040 + ldrb r0, [r5, #7] + add r0, r0, #1 + strb r0, [r5, #7] + pop {r3, r4, r5, r6, r7, pc} +_0226366E: + ldrb r1, [r5, #5] + ldrb r2, [r5, #4] + ldr r0, [r5, #0] + bl ov16_02266ABC + add r0, r5, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 +_02263684: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02263604 + + thumb_func_start ov16_02263688 +ov16_02263688: ; 0x02263688 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xe] + cmp r0, #0 + bne _022636BA + ldr r0, [r4, #4] + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + beq _022636A2 + bl sub_02022974 +_022636A2: + ldrb r2, [r4, #0xd] + ldr r0, [r4, #0] + mov r1, #5 + bl ov12_022234F8 + ldr r1, [r4, #4] + add r1, #0x8c + str r0, [r1, #0] + ldrb r0, [r4, #0xe] + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, pc} +_022636BA: + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02263688 + + thumb_func_start ov16_022636D4 +ov16_022636D4: ; 0x022636D4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _022636E8 + bl sub_02022974 +_022636E8: + ldr r0, [r4, #4] + add r0, #0x8c + ldr r0, [r0, #0] + bl ov12_022237D8 + cmp r0, #3 + bne _02263702 + ldrb r0, [r4, #0xe] + cmp r0, #5 + bhs _02263702 + add r0, r0, #1 + strb r0, [r4, #0xe] + pop {r3, r4, r5, pc} +_02263702: + ldr r0, [r4, #4] + ldrb r1, [r4, #0xd] + add r0, #0x8c + ldr r0, [r0, #0] + bl ov12_022237A4 + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x8c + str r1, [r0, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xc] + ldr r0, [r4, #0] + bl ov16_02266ABC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022636D4 + + thumb_func_start ov16_02263730 +ov16_02263730: ; 0x02263730 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + bl ov16_0223DF0C + add r4, r0, #0 + add r0, r6, #0 + bl ov16_0223EBEC + mov r1, #0x40 + tst r1, r4 + beq _022637B8 + mov r2, #0x65 + lsl r2, r2, #2 + ldrb r1, [r5, r2] + cmp r1, #0 + beq _02263772 + ldr r0, _02263A74 ; =ov16_02260AB4 + mov r1, #1 + str r0, [r5, #0] + ldr r0, _02263A78 ; =ov16_02260DB0 + str r0, [r5, #4] + ldr r0, _02263A7C ; =ov16_022610A8 + str r0, [r5, #8] + ldr r0, _02263A80 ; =ov16_02261D50 + str r0, [r5, #0xc] + ldr r0, _02263A84 ; =ov16_02262258 + str r0, [r5, #0x10] + ldr r0, _02263A88 ; =ov16_0226262C + str r0, [r5, #0x14] + add r0, r2, #2 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_02263772: + mov r1, #0x10 + tst r0, r1 + beq _02263798 + ldr r0, _02263A8C ; =ov16_02260BAC + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263A90 ; =ov16_02260E98 + str r0, [r5, #4] + ldr r0, _02263A94 ; =ov16_0226110C + str r0, [r5, #8] + ldr r0, _02263A98 ; =ov16_02261DE0 + str r0, [r5, #0xc] + ldr r0, _02263A9C ; =ov16_0226232C + str r0, [r5, #0x10] + ldr r0, _02263AA0 ; =ov16_0226266C + str r0, [r5, #0x14] + add r0, r2, #2 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_02263798: + ldr r0, _02263AA4 ; =ov16_022604C8 + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263AA8 ; =ov16_02260C00 + str r0, [r5, #4] + ldr r0, _02263AAC ; =ov16_02260F14 + str r0, [r5, #8] + ldr r0, _02263AB0 ; =ov16_022611DC + str r0, [r5, #0xc] + ldr r0, _02263AB4 ; =ov16_02261E8C + str r0, [r5, #0x10] + ldr r0, _02263AB8 ; =ov16_022623F0 + str r0, [r5, #0x14] + add r0, r2, #2 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_022637B8: + mov r1, #0x88 + and r1, r4 + cmp r1, #0x88 + bne _02263892 + ldr r2, _02263ABC ; =0x00000195 + mov r1, #1 + ldrb r3, [r5, r2] + tst r1, r3 + beq _02263814 + add r0, r6, #0 + bl ov16_0223ED60 + cmp r0, #0 + beq _022637F4 + ldr r0, _02263A74 ; =ov16_02260AB4 + mov r1, #1 + str r0, [r5, #0] + ldr r0, _02263A78 ; =ov16_02260DB0 + str r0, [r5, #4] + ldr r0, _02263A7C ; =ov16_022610A8 + str r0, [r5, #8] + ldr r0, _02263A80 ; =ov16_02261D50 + str r0, [r5, #0xc] + ldr r0, _02263A84 ; =ov16_02262258 + str r0, [r5, #0x10] + ldr r0, _02263A88 ; =ov16_0226262C + str r0, [r5, #0x14] + ldr r0, _02263AC0 ; =0x00000196 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_022637F4: + ldr r0, _02263AC4 ; =ov16_02260AE4 + mov r1, #2 + str r0, [r5, #0] + ldr r0, _02263AC8 ; =ov16_02260E78 + str r0, [r5, #4] + ldr r0, _02263ACC ; =ov16_022610EC + str r0, [r5, #8] + ldr r0, _02263AD0 ; =ov16_02261DA8 + str r0, [r5, #0xc] + ldr r0, _02263AD4 ; =ov16_0226230C + str r0, [r5, #0x10] + ldr r0, _02263AD8 ; =ov16_0226264C + str r0, [r5, #0x14] + ldr r0, _02263AC0 ; =0x00000196 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_02263814: + mov r1, #0x10 + tst r0, r1 + beq _0226383A + ldr r0, _02263A8C ; =ov16_02260BAC + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263A90 ; =ov16_02260E98 + str r0, [r5, #4] + ldr r0, _02263A94 ; =ov16_0226110C + str r0, [r5, #8] + ldr r0, _02263A98 ; =ov16_02261DE0 + str r0, [r5, #0xc] + ldr r0, _02263A9C ; =ov16_0226232C + str r0, [r5, #0x10] + ldr r0, _02263AA0 ; =ov16_0226266C + str r0, [r5, #0x14] + add r0, r2, #1 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_0226383A: + add r0, r6, #0 + bl ov16_0223F6E4 + add r1, r0, #0 + add r0, r6, #0 + lsl r1, r1, #1 + bl ov16_0223E1F8 + ldr r1, _02263ABC ; =0x00000195 + ldrb r2, [r5, r1] + cmp r2, r0 + beq _02263872 + ldr r0, _02263AC4 ; =ov16_02260AE4 + mov r2, #2 + str r0, [r5, #0] + ldr r0, _02263AC8 ; =ov16_02260E78 + str r0, [r5, #4] + ldr r0, _02263ACC ; =ov16_022610EC + str r0, [r5, #8] + ldr r0, _02263AD0 ; =ov16_02261DA8 + str r0, [r5, #0xc] + ldr r0, _02263AD4 ; =ov16_0226230C + str r0, [r5, #0x10] + ldr r0, _02263AD8 ; =ov16_0226264C + str r0, [r5, #0x14] + add r0, r1, #1 + strb r2, [r5, r0] + pop {r4, r5, r6, pc} +_02263872: + ldr r0, _02263AA4 ; =ov16_022604C8 + mov r2, #0 + str r0, [r5, #0] + ldr r0, _02263AA8 ; =ov16_02260C00 + str r0, [r5, #4] + ldr r0, _02263AAC ; =ov16_02260F14 + str r0, [r5, #8] + ldr r0, _02263AB0 ; =ov16_022611DC + str r0, [r5, #0xc] + ldr r0, _02263AB4 ; =ov16_02261E8C + str r0, [r5, #0x10] + ldr r0, _02263AB8 ; =ov16_022623F0 + str r0, [r5, #0x14] + add r0, r1, #1 + strb r2, [r5, r0] + pop {r4, r5, r6, pc} +_02263892: + mov r1, #8 + tst r1, r4 + beq _02263914 + mov r1, #0x10 + tst r0, r1 + beq _022638BE + ldr r0, _02263A8C ; =ov16_02260BAC + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263A90 ; =ov16_02260E98 + str r0, [r5, #4] + ldr r0, _02263A94 ; =ov16_0226110C + str r0, [r5, #8] + ldr r0, _02263A98 ; =ov16_02261DE0 + str r0, [r5, #0xc] + ldr r0, _02263A9C ; =ov16_0226232C + str r0, [r5, #0x10] + ldr r0, _02263AA0 ; =ov16_0226266C + str r0, [r5, #0x14] + ldr r0, _02263AC0 ; =0x00000196 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_022638BE: + add r0, r6, #0 + bl ov16_0223F6E4 + add r1, r0, #0 + add r0, r6, #0 + bl ov16_0223E1F8 + ldr r1, _02263ABC ; =0x00000195 + ldrb r2, [r5, r1] + cmp r2, r0 + beq _022638F4 + ldr r0, _02263AC4 ; =ov16_02260AE4 + mov r2, #2 + str r0, [r5, #0] + ldr r0, _02263AC8 ; =ov16_02260E78 + str r0, [r5, #4] + ldr r0, _02263ACC ; =ov16_022610EC + str r0, [r5, #8] + ldr r0, _02263AD0 ; =ov16_02261DA8 + str r0, [r5, #0xc] + ldr r0, _02263AD4 ; =ov16_0226230C + str r0, [r5, #0x10] + ldr r0, _02263AD8 ; =ov16_0226264C + str r0, [r5, #0x14] + add r0, r1, #1 + strb r2, [r5, r0] + pop {r4, r5, r6, pc} +_022638F4: + ldr r0, _02263AA4 ; =ov16_022604C8 + mov r2, #0 + str r0, [r5, #0] + ldr r0, _02263AA8 ; =ov16_02260C00 + str r0, [r5, #4] + ldr r0, _02263AAC ; =ov16_02260F14 + str r0, [r5, #8] + ldr r0, _02263AB0 ; =ov16_022611DC + str r0, [r5, #0xc] + ldr r0, _02263AB4 ; =ov16_02261E8C + str r0, [r5, #0x10] + ldr r0, _02263AB8 ; =ov16_022623F0 + str r0, [r5, #0x14] + add r0, r1, #1 + strb r2, [r5, r0] + pop {r4, r5, r6, pc} +_02263914: + mov r1, #4 + add r2, r4, #0 + tst r2, r1 + beq _0226398C + mov r1, #0x10 + tst r0, r1 + beq _02263942 + ldr r0, _02263A8C ; =ov16_02260BAC + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263A90 ; =ov16_02260E98 + str r0, [r5, #4] + ldr r0, _02263A94 ; =ov16_0226110C + str r0, [r5, #8] + ldr r0, _02263A98 ; =ov16_02261DE0 + str r0, [r5, #0xc] + ldr r0, _02263A9C ; =ov16_0226232C + str r0, [r5, #0x10] + ldr r0, _02263AA0 ; =ov16_0226266C + str r0, [r5, #0x14] + ldr r0, _02263AC0 ; =0x00000196 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_02263942: + ldr r0, _02263ABC ; =0x00000195 + mov r1, #1 + ldrb r2, [r5, r0] + tst r1, r2 + beq _0226396C + ldr r1, _02263AC4 ; =ov16_02260AE4 + add r0, r0, #1 + str r1, [r5, #0] + ldr r1, _02263AC8 ; =ov16_02260E78 + str r1, [r5, #4] + ldr r1, _02263ACC ; =ov16_022610EC + str r1, [r5, #8] + ldr r1, _02263AD0 ; =ov16_02261DA8 + str r1, [r5, #0xc] + ldr r1, _02263AD4 ; =ov16_0226230C + str r1, [r5, #0x10] + ldr r1, _02263AD8 ; =ov16_0226264C + str r1, [r5, #0x14] + mov r1, #2 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_0226396C: + ldr r1, _02263AA4 ; =ov16_022604C8 + add r0, r0, #1 + str r1, [r5, #0] + ldr r1, _02263AA8 ; =ov16_02260C00 + str r1, [r5, #4] + ldr r1, _02263AAC ; =ov16_02260F14 + str r1, [r5, #8] + ldr r1, _02263AB0 ; =ov16_022611DC + str r1, [r5, #0xc] + ldr r1, _02263AB4 ; =ov16_02261E8C + str r1, [r5, #0x10] + ldr r1, _02263AB8 ; =ov16_022623F0 + str r1, [r5, #0x14] + mov r1, #0 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_0226398C: + lsl r1, r1, #7 + tst r1, r4 + beq _022639C8 + ldr r0, _02263ABC ; =0x00000195 + mov r1, #1 + ldrb r2, [r5, r0] + tst r2, r1 + beq _022639B2 + ldr r2, _02263ADC ; =ov16_02260B84 + add r0, r0, #1 + str r2, [r5, #0] + mov r2, #0 + str r2, [r5, #4] + str r2, [r5, #8] + str r2, [r5, #0xc] + str r2, [r5, #0x10] + str r2, [r5, #0x14] + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_022639B2: + ldr r1, _02263AA4 ; =ov16_022604C8 + add r0, r0, #1 + str r1, [r5, #0] + mov r1, #0 + str r1, [r5, #4] + str r1, [r5, #8] + str r1, [r5, #0xc] + str r1, [r5, #0x10] + str r1, [r5, #0x14] + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_022639C8: + mov r1, #0x20 + tst r1, r4 + beq _02263A06 + ldr r0, _02263ABC ; =0x00000195 + mov r1, #1 + ldrb r2, [r5, r0] + tst r2, r1 + beq _022639EE + ldr r2, _02263AE0 ; =ov16_02260B04 + add r0, r0, #1 + str r2, [r5, #0] + mov r2, #0 + str r2, [r5, #4] + str r2, [r5, #8] + str r2, [r5, #0xc] + str r2, [r5, #0x10] + str r2, [r5, #0x14] + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_022639EE: + ldr r1, _02263AA4 ; =ov16_022604C8 + mov r2, #0 + str r1, [r5, #0] + str r2, [r5, #4] + str r2, [r5, #8] + str r2, [r5, #0xc] + ldr r1, _02263AB8 ; =ov16_022623F0 + str r2, [r5, #0x10] + str r1, [r5, #0x14] + add r0, r0, #1 + strb r2, [r5, r0] + pop {r4, r5, r6, pc} +_02263A06: + ldr r2, _02263ABC ; =0x00000195 + mov r1, #1 + ldrb r3, [r5, r2] + tst r3, r1 + beq _02263A2E + ldr r0, _02263A74 ; =ov16_02260AB4 + str r0, [r5, #0] + ldr r0, _02263A78 ; =ov16_02260DB0 + str r0, [r5, #4] + ldr r0, _02263A7C ; =ov16_022610A8 + str r0, [r5, #8] + ldr r0, _02263A80 ; =ov16_02261D50 + str r0, [r5, #0xc] + ldr r0, _02263A84 ; =ov16_02262258 + str r0, [r5, #0x10] + ldr r0, _02263A88 ; =ov16_0226262C + str r0, [r5, #0x14] + add r0, r2, #1 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_02263A2E: + mov r1, #0x10 + tst r0, r1 + beq _02263A54 + ldr r0, _02263A8C ; =ov16_02260BAC + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263A90 ; =ov16_02260E98 + str r0, [r5, #4] + ldr r0, _02263A94 ; =ov16_0226110C + str r0, [r5, #8] + ldr r0, _02263A98 ; =ov16_02261DE0 + str r0, [r5, #0xc] + ldr r0, _02263A9C ; =ov16_0226232C + str r0, [r5, #0x10] + ldr r0, _02263AA0 ; =ov16_0226266C + str r0, [r5, #0x14] + add r0, r2, #1 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_02263A54: + ldr r0, _02263AA4 ; =ov16_022604C8 + mov r1, #0 + str r0, [r5, #0] + ldr r0, _02263AA8 ; =ov16_02260C00 + str r0, [r5, #4] + ldr r0, _02263AAC ; =ov16_02260F14 + str r0, [r5, #8] + ldr r0, _02263AB0 ; =ov16_022611DC + str r0, [r5, #0xc] + ldr r0, _02263AB4 ; =ov16_02261E8C + str r0, [r5, #0x10] + ldr r0, _02263AB8 ; =ov16_022623F0 + str r0, [r5, #0x14] + add r0, r2, #1 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02263A74: .word ov16_02260AB4 +_02263A78: .word ov16_02260DB0 +_02263A7C: .word ov16_022610A8 +_02263A80: .word ov16_02261D50 +_02263A84: .word ov16_02262258 +_02263A88: .word ov16_0226262C +_02263A8C: .word ov16_02260BAC +_02263A90: .word ov16_02260E98 +_02263A94: .word ov16_0226110C +_02263A98: .word ov16_02261DE0 +_02263A9C: .word ov16_0226232C +_02263AA0: .word ov16_0226266C +_02263AA4: .word ov16_022604C8 +_02263AA8: .word ov16_02260C00 +_02263AAC: .word ov16_02260F14 +_02263AB0: .word ov16_022611DC +_02263AB4: .word ov16_02261E8C +_02263AB8: .word ov16_022623F0 +_02263ABC: .word 0x00000195 +_02263AC0: .word 0x00000196 +_02263AC4: .word ov16_02260AE4 +_02263AC8: .word ov16_02260E78 +_02263ACC: .word ov16_022610EC +_02263AD0: .word ov16_02261DA8 +_02263AD4: .word ov16_0226230C +_02263AD8: .word ov16_0226264C +_02263ADC: .word ov16_02260B84 +_02263AE0: .word ov16_02260B04 + thumb_func_end ov16_02263730 + + thumb_func_start ov16_02263AE4 +ov16_02263AE4: ; 0x02263AE4 + ldr r1, _02263AEC ; =0x00000195 + ldrb r0, [r0, r1] + bx lr + nop +_02263AEC: .word 0x00000195 + thumb_func_end ov16_02263AE4 + + thumb_func_start ov16_02263AF0 +ov16_02263AF0: ; 0x02263AF0 + ldr r1, _02263AF8 ; =0x00000196 + ldrb r0, [r0, r1] + bx lr + nop +_02263AF8: .word 0x00000196 + thumb_func_end ov16_02263AF0 + + thumb_func_start ov16_02263AFC +ov16_02263AFC: ; 0x02263AFC + ldr r1, [r0, #0x20] + cmp r1, #0 + bne _02263B04 + ldr r1, [r0, #0x1c] +_02263B04: + add r0, r1, #0 + bx lr + thumb_func_end ov16_02263AFC + + thumb_func_start ov16_02263B08 +ov16_02263B08: ; 0x02263B08 + add r0, #0x28 + bx lr + thumb_func_end ov16_02263B08 + + thumb_func_start ov16_02263B0C +ov16_02263B0C: ; 0x02263B0C + add r0, #0x80 + bx lr + thumb_func_end ov16_02263B0C + + thumb_func_start ov16_02263B10 +ov16_02263B10: ; 0x02263B10 + ldr r3, _02263B1C ; =sub_020C4CF4 + add r0, #0x80 + mov r1, #0 + mov r2, #8 + bx r3 + nop +_02263B1C: .word sub_020C4CF4 + thumb_func_end ov16_02263B10 + + thumb_func_start ov16_02263B20 +ov16_02263B20: ; 0x02263B20 + push {r3, lr} + ldr r0, [r0, #0x18] + cmp r0, #0 + beq _02263B2C + bl sub_0200D3F4 +_02263B2C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02263B20 + + thumb_func_start ov16_02263B30 +ov16_02263B30: ; 0x02263B30 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + ldr r4, [sp, #0x50] + add r7, r0, #0 + str r1, [sp, #0x14] + add r5, r2, #0 + str r3, [sp, #0x18] + bl ov16_0223E0C8 + add r1, r4, #0 + bl ov16_0223F2B8 + str r0, [sp, #0x20] + add r0, r7, #0 + add r1, r4, #0 + bl ov16_0223E1F8 + add r6, r0, #0 + mov r0, #1 + and r0, r6 + str r0, [sp, #0x1c] + beq _02263B60 + mov r1, #2 + b _02263B62 +_02263B60: + mov r1, #0 +_02263B62: + ldr r0, [r5, #0xc] + ldr r3, [sp, #0x20] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r1, [sp, #8] + ldrh r0, [r5, #6] + mov r2, #5 + str r0, [sp, #0xc] + ldrh r0, [r5] + ldrh r1, [r5, #2] + bl sub_02013750 + add r0, r7, #0 + bl ov16_0223E0C8 + ldrh r2, [r5] + add r1, r4, #0 + bl ov16_0223F2CC + add r0, r7, #0 + bl ov16_0223E0C8 + ldrh r2, [r5, #4] + add r1, r4, #0 + bl ov16_0223F2E4 + add r0, r7, #0 + bl ov16_0223E0C8 + ldr r2, [sp, #0x40] + add r1, r4, #0 + bl ov16_0223F2FC + ldr r0, [sp, #0x3c] + ldr r3, [sp, #0x40] + str r0, [sp] + str r4, [sp, #4] + str r4, [sp, #8] + ldr r0, [sp, #0x54] + ldr r4, [sp, #0x38] + str r0, [sp, #0xc] + ldr r0, [sp, #0x58] + ldr r2, [sp, #0x18] + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r1, r5, #0 + add r3, r4, r3 + bl sub_02007C7C + add r4, r0, #0 + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _02263C16 + cmp r6, #1 + ble _02263BD4 + asr r6, r6, #1 +_02263BD4: + add r0, r4, #0 + mov r1, #0x2a + add r2, r6, #0 + bl sub_02007DEC + ldr r2, [sp, #0x4c] + add r0, r4, #0 + mov r1, #0x2e + bl sub_02007DEC + ldr r2, [sp, #0x38] + add r0, r4, #0 + mov r1, #0x14 + add r2, #0x24 + bl sub_02007DEC + ldr r2, [sp, #0x48] + add r0, r4, #0 + mov r1, #0x15 + bl sub_02007DEC + ldr r3, [sp, #0x40] + mov r2, #0x24 + add r0, r4, #0 + mov r1, #0x16 + sub r2, r2, r3 + bl sub_02007DEC + ldr r2, [sp, #0x44] + add r0, r4, #0 + mov r1, #0x29 + bl sub_02007DEC +_02263C16: + add r0, r4, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_02263B30 + + thumb_func_start ov16_02263C1C +ov16_02263C1C: ; 0x02263C1C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r1, _02263CD8 ; =0x00000195 + add r6, r2, #0 + ldrb r2, [r5, r1] + mov r1, #1 + add r7, r0, #0 + add r4, r3, #0 + tst r1, r2 + beq _02263C76 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + beq _02263C56 + ldr r0, _02263CDC ; =0x000003DE + strh r0, [r4, #2] + mov r0, #0x1b + strb r0, [r4, #1] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + str r1, [r4, #4] + ldrb r1, [r5, r0] + ldrb r0, [r6, #1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_02263C56: + ldr r0, _02263CE0 ; =0x000003DD + strh r0, [r4, #2] + mov r0, #0x32 + strb r0, [r4, #1] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + str r1, [r4, #4] + ldrb r1, [r5, r0] + str r1, [r4, #8] + ldrb r1, [r5, r0] + ldrb r0, [r6, #1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02263C76: + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02263CC0 + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + bne _02263CC0 + ldrh r0, [r6, #2] + cmp r0, #0 + bne _02263C9A + mov r0, #0xf6 + lsl r0, r0, #2 + strh r0, [r4, #2] + b _02263CC4 +_02263C9A: + cmp r0, #0x19 + bhs _02263CA4 + ldr r0, _02263CE4 ; =0x000003D9 + strh r0, [r4, #2] + b _02263CC4 +_02263CA4: + cmp r0, #0x32 + bhs _02263CB0 + mov r0, #0xf7 + lsl r0, r0, #2 + strh r0, [r4, #2] + b _02263CC4 +_02263CB0: + cmp r0, #0x4b + bhs _02263CBA + ldr r0, _02263CE8 ; =0x000003DA + strh r0, [r4, #2] + b _02263CC4 +_02263CBA: + ldr r0, _02263CEC ; =0x000003DB + strh r0, [r4, #2] + b _02263CC4 +_02263CC0: + ldr r0, _02263CE4 ; =0x000003D9 + strh r0, [r4, #2] +_02263CC4: + mov r0, #2 + strb r0, [r4, #1] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + ldrb r0, [r6, #1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02263CD8: .word 0x00000195 +_02263CDC: .word 0x000003DE +_02263CE0: .word 0x000003DD +_02263CE4: .word 0x000003D9 +_02263CE8: .word 0x000003DA +_02263CEC: .word 0x000003DB + thumb_func_end ov16_02263C1C + + thumb_func_start ov16_02263CF0 +ov16_02263CF0: ; 0x02263CF0 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r1, _02263DB0 ; =0x00000195 + add r6, r2, #0 + ldrb r2, [r5, r1] + mov r1, #1 + add r7, r0, #0 + add r4, r3, #0 + tst r1, r2 + beq _02263D4C + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + bne _02263D30 + mov r0, #0xf3 + lsl r0, r0, #2 + strh r0, [r4, #2] + mov r0, #0x32 + strb r0, [r4, #1] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + str r1, [r4, #4] + ldrb r1, [r5, r0] + str r1, [r4, #8] + ldrb r1, [r5, r0] + ldrb r0, [r6, #1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02263D30: + ldr r0, _02263DB4 ; =0x000003CE + strh r0, [r4, #2] + mov r0, #0x1b + strb r0, [r4, #1] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + str r1, [r4, #4] + ldrb r1, [r5, r0] + ldrb r0, [r6, #1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_02263D4C: + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + bne _02263D98 + add r0, r7, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + bne _02263D98 + ldrh r1, [r6, #2] + cmp r1, #0x64 + bhs _02263D6E + ldr r0, _02263DB8 ; =0x000003D6 + strh r0, [r4, #2] + b _02263D9C +_02263D6E: + ldr r0, _02263DBC ; =0x00000145 + cmp r1, r0 + bhs _02263D7A + ldr r0, _02263DC0 ; =0x000003D7 + strh r0, [r4, #2] + b _02263D9C +_02263D7A: + add r0, #0xe1 + cmp r1, r0 + bhs _02263D86 + ldr r0, _02263DC4 ; =0x000003D5 + strh r0, [r4, #2] + b _02263D9C +_02263D86: + ldr r0, _02263DC8 ; =0x00000307 + cmp r1, r0 + bhs _02263D92 + add r0, #0xcd + strh r0, [r4, #2] + b _02263D9C +_02263D92: + add r0, #0xcc + strh r0, [r4, #2] + b _02263D9C +_02263D98: + ldr r0, _02263DCC ; =0x000003D3 + strh r0, [r4, #2] +_02263D9C: + mov r0, #2 + strb r0, [r4, #1] + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + ldrb r0, [r6, #1] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02263DB0: .word 0x00000195 +_02263DB4: .word 0x000003CE +_02263DB8: .word 0x000003D6 +_02263DBC: .word 0x00000145 +_02263DC0: .word 0x000003D7 +_02263DC4: .word 0x000003D5 +_02263DC8: .word 0x00000307 +_02263DCC: .word 0x000003D3 + thumb_func_end ov16_02263CF0 + + thumb_func_start ov16_02263DD0 +ov16_02263DD0: ; 0x02263DD0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r2, #0 + bl ov16_0223DF0C + add r4, r0, #0 + mov r0, #2 + tst r0, r4 + beq _02263DF6 + add r0, r7, #0 + mov r1, #3 + bl ov16_0223E1C4 + add r6, r0, #0 + add r0, r7, #0 + mov r1, #5 + bl ov16_0223E1C4 + b _02263E00 +_02263DF6: + add r0, r7, #0 + mov r1, #1 + bl ov16_0223E1C4 + add r6, r0, #0 +_02263E00: + mov r1, #4 + tst r1, r4 + beq _02263E40 + mov r1, #0x80 + tst r1, r4 + beq _02263E20 + mov r1, #0x3e + lsl r1, r1, #4 + strh r1, [r5, #2] + mov r1, #0x3b + strb r1, [r5, #1] + str r6, [r5, #4] + str r6, [r5, #8] + str r0, [r5, #0xc] + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02263E20: + mov r1, #8 + add r2, r4, #0 + tst r2, r1 + beq _02263E36 + ldr r1, _02263E70 ; =0x000003CB + strh r1, [r5, #2] + mov r1, #0x1a + strb r1, [r5, #1] + str r6, [r5, #4] + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_02263E36: + ldr r0, _02263E74 ; =0x000003CA + strh r0, [r5, #2] + strb r1, [r5, #1] + str r6, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_02263E40: + mov r1, #0x10 + tst r1, r4 + bne _02263E4C + mov r1, #8 + tst r1, r4 + beq _02263E60 +_02263E4C: + mov r1, #0x3e + lsl r1, r1, #4 + strh r1, [r5, #2] + mov r1, #0x3b + strb r1, [r5, #1] + str r6, [r5, #4] + str r6, [r5, #8] + str r0, [r5, #0xc] + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02263E60: + ldr r0, _02263E78 ; =0x000003C9 + strh r0, [r5, #2] + mov r0, #0x1e + strb r0, [r5, #1] + str r6, [r5, #4] + str r6, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} + nop +_02263E70: .word 0x000003CB +_02263E74: .word 0x000003CA +_02263E78: .word 0x000003C9 + thumb_func_end ov16_02263DD0 + + thumb_func_start ov16_02263E7C +ov16_02263E7C: ; 0x02263E7C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #4] + str r0, [sp] + add r6, r2, #0 + add r4, r3, #0 + bl ov16_0223DF0C + str r0, [sp, #0x14] + ldr r2, _02264190 ; =0x00000195 + ldr r0, [sp, #4] + ldrb r1, [r0, r2] + mov r0, #1 + tst r0, r1 + bne _02263E9C + b _02263FE4 +_02263E9C: + ldr r0, [sp, #0x14] + mov r1, #2 + and r0, r1 + str r0, [sp, #0x10] + beq _02263EB8 + ldr r0, [sp, #4] + sub r1, r2, #1 + ldrb r5, [r0, r1] + ldr r0, [sp] + add r1, r5, #0 + bl ov16_0223E258 + add r7, r0, #0 + b _02263EC0 +_02263EB8: + ldr r0, [sp, #4] + sub r1, r2, #1 + ldrb r5, [r0, r1] + add r7, r5, #0 +_02263EC0: + ldr r0, [sp, #0x14] + mov r1, #4 + tst r0, r1 + beq _02263F66 + ldr r0, [sp, #0x14] + mov r1, #0x80 + tst r0, r1 + beq _02263EF8 + ldr r0, _02264194 ; =0x000003DF + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x3c + strb r0, [r4, #1] + str r5, [r4, #4] + str r5, [r4, #8] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #0xc] + str r7, [r4, #0x10] + str r7, [r4, #0x14] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0x18] + pop {r3, r4, r5, r6, r7, pc} +_02263EF8: + ldr r0, [sp, #0x14] + mov r1, #8 + tst r0, r1 + beq _02263F26 + mov r0, #0x3d + lsl r0, r0, #4 + strh r0, [r4, #2] + mov r0, #0x38 + strb r0, [r4, #1] + str r5, [r4, #4] + add r0, r6, r5 + ldrb r0, [r0, #4] + add sp, #0x18 + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #8] + str r7, [r4, #0xc] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02263F26: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02263F4E + ldr r0, _02264198 ; =0x000003CF + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x31 + strb r0, [r4, #1] + str r5, [r4, #4] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #8] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02263F4E: + ldr r0, _0226419C ; =0x000003CE + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x1b + strb r0, [r4, #1] + str r5, [r4, #4] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_02263F66: + ldr r0, [sp, #0x14] + mov r1, #0x10 + tst r0, r1 + bne _02263F76 + ldr r0, [sp, #0x14] + mov r1, #8 + tst r0, r1 + beq _02263F9E +_02263F76: + ldr r0, _02264194 ; =0x000003DF + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x3c + strb r0, [r4, #1] + str r5, [r4, #4] + str r5, [r4, #8] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #0xc] + str r7, [r4, #0x10] + str r7, [r4, #0x14] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0x18] + pop {r3, r4, r5, r6, r7, pc} +_02263F9E: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02263FC8 + ldr r0, _022641A0 ; =0x000003CD + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x39 + strb r0, [r4, #1] + str r5, [r4, #4] + str r5, [r4, #8] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #0xc] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02263FC8: + mov r0, #0xf3 + lsl r0, r0, #2 + strh r0, [r4, #2] + mov r0, #0x32 + strb r0, [r4, #1] + str r5, [r4, #4] + str r5, [r4, #8] + add r0, r6, r5 + ldrb r0, [r0, #4] + add sp, #0x18 + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02263FE4: + ldr r0, [sp, #0x14] + mov r1, #4 + and r0, r1 + str r0, [sp, #0xc] + beq _02264078 + ldr r0, [sp] + bl ov16_0223F6E4 + lsl r0, r0, #0x18 + lsr r2, r0, #0x18 + ldr r0, [sp, #0x14] + mov r1, #8 + and r0, r1 + str r0, [sp, #8] + beq _0226404E + ldr r0, [sp] + add r1, r2, #0 + bl ov16_0223F6F0 + cmp r0, #3 + bhi _022640BE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226401A: ; jump table + .short _02264022 - _0226401A - 2 ; case 0 + .short _02264038 - _0226401A - 2 ; case 1 + .short _02264038 - _0226401A - 2 ; case 2 + .short _02264022 - _0226401A - 2 ; case 3 +_02264022: + ldr r0, [sp] + mov r1, #4 + bl ov16_0223E1C4 + add r5, r0, #0 + ldr r0, [sp] + mov r1, #2 + bl ov16_0223E1C4 + add r7, r0, #0 + b _022640BE +_02264038: + ldr r0, [sp] + mov r1, #2 + bl ov16_0223E1C4 + add r5, r0, #0 + ldr r0, [sp] + mov r1, #4 + bl ov16_0223E1C4 + add r7, r0, #0 + b _022640BE +_0226404E: + ldr r0, [sp, #0x14] + mov r1, #2 + tst r0, r1 + beq _0226406A + ldr r0, [sp] + bl ov16_0223E1C4 + add r5, r0, #0 + ldr r0, [sp] + mov r1, #4 + bl ov16_0223E1C4 + add r7, r0, #0 + b _022640BE +_0226406A: + ldr r0, [sp] + mov r1, #0 + bl ov16_0223E1C4 + add r5, r0, #0 + add r7, r5, #0 + b _022640BE +_02264078: + ldr r0, [sp, #0x14] + mov r1, #8 + and r0, r1 + str r0, [sp, #8] + beq _0226409A + ldr r1, [sp, #4] + sub r2, r2, #1 + ldrb r1, [r1, r2] + ldr r0, [sp] + bl ov16_0223E258 + add r5, r0, #0 + mov r1, #0x65 + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldrb r7, [r0, r1] + b _022640BE +_0226409A: + ldr r0, [sp, #0x14] + mov r1, #2 + tst r0, r1 + beq _022640B6 + ldr r0, [sp] + bl ov16_0223E1C4 + add r5, r0, #0 + ldr r0, [sp] + mov r1, #4 + bl ov16_0223E1C4 + add r7, r0, #0 + b _022640BE +_022640B6: + ldr r0, [sp, #4] + sub r1, r2, #1 + ldrb r5, [r0, r1] + add r7, r5, #0 +_022640BE: + ldr r0, [sp, #0xc] + cmp r0, #0 + beq _02264128 + ldr r0, [sp, #8] + cmp r0, #0 + beq _022640EC + ldr r0, _022641A4 ; =0x000003D1 + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x31 + strb r0, [r4, #1] + str r5, [r4, #4] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #8] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022640EC: + ldr r0, [sp, #0x14] + mov r1, #2 + tst r0, r1 + beq _02264114 + ldr r0, _022641A8 ; =0x000003D2 + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #9 + strb r0, [r4, #1] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #4] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_02264114: + ldr r0, _022641AC ; =0x000003D3 + add sp, #0x18 + strh r0, [r4, #2] + strb r1, [r4, #1] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_02264128: + ldr r0, [sp, #8] + cmp r0, #0 + beq _02264152 + ldr r0, _022641B0 ; =0x000003E1 + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #0x39 + strb r0, [r4, #1] + str r5, [r4, #4] + str r5, [r4, #8] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #0xc] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02264152: + ldr r0, [sp, #0x14] + mov r1, #2 + tst r0, r1 + beq _0226417A + ldr r0, _022641A8 ; =0x000003D2 + add sp, #0x18 + strh r0, [r4, #2] + mov r0, #9 + strb r0, [r4, #1] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #4] + add r0, r6, r7 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r7 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0226417A: + ldr r0, _022641AC ; =0x000003D3 + strh r0, [r4, #2] + strb r1, [r4, #1] + add r0, r6, r5 + ldrb r0, [r0, #4] + lsl r0, r0, #8 + orr r0, r5 + str r0, [r4, #4] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02264190: .word 0x00000195 +_02264194: .word 0x000003DF +_02264198: .word 0x000003CF +_0226419C: .word 0x000003CE +_022641A0: .word 0x000003CD +_022641A4: .word 0x000003D1 +_022641A8: .word 0x000003D2 +_022641AC: .word 0x000003D3 +_022641B0: .word 0x000003E1 + thumb_func_end ov16_02263E7C + + thumb_func_start ov16_022641B4 +ov16_022641B4: ; 0x022641B4 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r5, r2, #0 + bl ov16_0223DF0C + add r6, r0, #0 + ldr r0, [sp] + bl ov16_0223F438 + add r7, r0, #0 + mov r0, #2 + tst r0, r6 + beq _022641E2 + ldr r0, [sp] + mov r1, #3 + bl ov16_0223E1C4 + add r4, r0, #0 + ldr r0, [sp] + mov r1, #5 + bl ov16_0223E1C4 + b _022641EC +_022641E2: + ldr r0, [sp] + mov r1, #1 + bl ov16_0223E1C4 + add r4, r0, #0 +_022641EC: + cmp r7, #1 + beq _022641FA + cmp r7, #2 + beq _0226421A + cmp r7, #3 + beq _0226423C + pop {r3, r4, r5, r6, r7, pc} +_022641FA: + mov r1, #8 + add r2, r6, #0 + tst r2, r1 + beq _02264210 + ldr r1, _0226425C ; =0x00000312 + strh r1, [r5, #2] + mov r1, #0x1a + strb r1, [r5, #1] + str r4, [r5, #4] + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_02264210: + ldr r0, _02264260 ; =0x00000311 + strh r0, [r5, #2] + strb r1, [r5, #1] + str r4, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226421A: + mov r1, #8 + add r2, r6, #0 + tst r2, r1 + beq _02264232 + mov r1, #0xc5 + lsl r1, r1, #2 + strh r1, [r5, #2] + mov r1, #0x1a + strb r1, [r5, #1] + str r4, [r5, #4] + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_02264232: + ldr r0, _02264264 ; =0x00000313 + strh r0, [r5, #2] + strb r1, [r5, #1] + str r4, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226423C: + mov r1, #8 + add r2, r6, #0 + tst r2, r1 + beq _02264252 + ldr r1, _02264268 ; =0x00000316 + strh r1, [r5, #2] + mov r1, #0x1a + strb r1, [r5, #1] + str r4, [r5, #4] + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_02264252: + ldr r0, _0226426C ; =0x00000315 + strh r0, [r5, #2] + strb r1, [r5, #1] + str r4, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226425C: .word 0x00000312 +_02264260: .word 0x00000311 +_02264264: .word 0x00000313 +_02264268: .word 0x00000316 +_0226426C: .word 0x00000315 + thumb_func_end ov16_022641B4 + + thumb_func_start ov16_02264270 +ov16_02264270: ; 0x02264270 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r6, #0 + add r5, r0, #0 + str r2, [sp] + add r7, r3, #0 + str r6, [sp, #4] + add r4, r6, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _022642B8 +_02264288: + add r0, r4, #0 + bl sub_020787CC + ldr r1, [sp] + ldrb r1, [r1, #1] + tst r0, r1 + beq _022642AC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0223E208 + cmp r0, #0 + beq _022642AA + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + b _022642AC +_022642AA: + add r6, r6, #1 +_022642AC: + add r0, r5, #0 + add r4, r4, #1 + bl ov16_0223DF1C + cmp r4, r0 + blt _02264288 +_022642B8: + cmp r6, #0 + beq _022642D6 + ldr r0, [sp, #4] + cmp r0, #0 + beq _022642D6 + ldr r0, _02264358 ; =0x0000030D + mov r1, #0xc3 + strh r0, [r7, #2] + mov r0, #0 + strb r0, [r7, #1] + add r0, r5, #0 + bl ov16_0223F444 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022642D6: + cmp r6, #0 + beq _022642EE + ldr r0, _02264358 ; =0x0000030D + mov r1, #0xc2 + strh r0, [r7, #2] + mov r0, #0 + strb r0, [r7, #1] + add r0, r5, #0 + bl ov16_0223F444 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022642EE: + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #8 + tst r0, r1 + beq _0226431A + mov r0, #0xc6 + lsl r0, r0, #2 + strh r0, [r7, #2] + mov r0, #0x1a + strb r0, [r7, #1] + add r0, r5, #0 + mov r1, #3 + bl ov16_0223E1C4 + str r0, [r7, #4] + add r0, r5, #0 + mov r1, #5 + bl ov16_0223E1C4 + str r0, [r7, #8] + b _0226434A +_0226431A: + add r0, r5, #0 + bl ov16_0223DF0C + mov r1, #2 + tst r0, r1 + ldr r0, _0226435C ; =0x00000317 + beq _0226433A + strh r0, [r7, #2] + mov r0, #8 + strb r0, [r7, #1] + add r0, r5, #0 + mov r1, #3 + bl ov16_0223E1C4 + str r0, [r7, #4] + b _0226434A +_0226433A: + strh r0, [r7, #2] + mov r0, #8 + strb r0, [r7, #1] + add r0, r5, #0 + mov r1, #1 + bl ov16_0223E1C4 + str r0, [r7, #4] +_0226434A: + add r0, r5, #0 + mov r1, #0xc1 + bl ov16_0223F444 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02264358: .word 0x0000030D +_0226435C: .word 0x00000317 + thumb_func_end ov16_02264270 + + thumb_func_start ov16_02264360 +ov16_02264360: ; 0x02264360 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0xef + add r4, r2, #0 + lsl r1, r1, #2 + strh r1, [r4, #2] + mov r1, #8 + add r5, r0, #0 + strb r1, [r4, #1] + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + beq _022643A6 + add r0, r5, #0 + bl ov16_0223F6E4 + add r1, r0, #0 + add r0, r5, #0 + bl ov16_0223F6F0 + cmp r0, #0 + beq _0226439A + add r0, r5, #0 + mov r1, #4 + bl ov16_0223E1C4 + str r0, [r4, #4] + b _022643AE +_0226439A: + add r0, r5, #0 + mov r1, #2 + bl ov16_0223E1C4 + str r0, [r4, #4] + b _022643AE +_022643A6: + mov r0, #0x65 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + str r0, [r4, #4] +_022643AE: + add r0, r5, #0 + mov r1, #0xc2 + bl ov16_0223F444 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02264360 + + thumb_func_start ov16_022643B8 +ov16_022643B8: ; 0x022643B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov16_0223E010 + str r0, [sp, #0x18] + add r0, r5, #0 + bl ov16_0223E018 + str r0, [sp, #0x14] + add r0, r5, #0 + bl ov16_0223E064 + add r2, r0, #0 + mov r0, #1 + tst r0, r4 + beq _022643E4 + mov r1, #2 + b _022643E6 +_022643E4: + mov r1, #0 +_022643E6: + add r3, sp, #0x20 + mov r0, #0x14 + ldrsh r0, [r3, r0] + mov r4, #0x10 + str r0, [sp] + str r6, [sp, #4] + str r1, [sp, #8] + str r7, [sp, #0xc] + mov r0, #5 + str r0, [sp, #0x10] + ldrsh r3, [r3, r4] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + bl sub_02076994 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_022643B8 + + thumb_func_start ov16_02264408 +ov16_02264408: ; 0x02264408 + push {r4, r5, r6, r7, lr} + sub sp, #0xac + str r0, [sp] + ldr r0, [r3, #0x4c] + str r1, [sp, #4] + str r2, [sp, #8] + str r3, [sp, #0xc] + cmp r0, #0 + bne _02264426 + mov r0, #8 + str r0, [sp, #0x84] + add r0, r3, #0 + ldrh r0, [r0, #2] + str r0, [sp, #0x18] + b _02264430 +_02264426: + mov r0, #0x3f + str r0, [sp, #0x84] + add r0, r3, #0 + ldr r0, [r0, #0x50] + str r0, [sp, #0x18] +_02264430: + ldr r0, [sp] + bl ov16_0223DF00 + str r0, [sp, #0x20] + ldr r0, [sp] + bl ov16_0223E064 + str r0, [sp, #0x24] + ldr r0, [sp] + bl ov16_0223E010 + add r5, sp, #0x1c + str r0, [sp, #0x1c] + ldr r0, [sp, #0xc] + mov r4, #0 + str r0, [sp, #0x14] + str r5, [sp, #0x10] + add r6, r5, #0 + add r7, r0, #0 +_02264456: + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223F2AC + str r0, [r5, #0xc] + ldr r0, [sp, #0x14] + ldrh r1, [r0, #0x18] + ldr r0, [sp, #0x10] + strh r1, [r0, #0x34] + ldr r0, [sp, #0xc] + add r0, r0, r4 + add r0, #0x20 + ldrb r1, [r0] + add r0, r6, #0 + add r0, #0x3c + strb r1, [r0] + ldr r0, [sp, #0xc] + add r0, r0, r4 + add r0, #0x24 + ldrb r1, [r0] + add r0, r6, #0 + add r0, #0x40 + strb r1, [r0] + ldr r0, [sp, #0xc] + add r0, r0, r4 + add r0, #0x28 + ldrb r1, [r0] + add r0, r6, #0 + add r0, #0x44 + strb r1, [r0] + ldr r0, [r7, #0x2c] + add r4, r4, #1 + str r0, [r5, #0x48] + ldr r0, [r7, #0x3c] + add r6, r6, #1 + str r0, [r5, #0x58] + ldr r0, [sp, #0x14] + add r5, r5, #4 + add r0, r0, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + add r7, r7, #4 + add r0, r0, #2 + str r0, [sp, #0x10] + cmp r4, #4 + blt _02264456 + ldr r0, [sp] + add r1, sp, #0x38 + bl ov16_0223F87C + ldr r0, [sp] + add r1, sp, #0x3c + bl ov16_0223F8AC + ldr r0, [sp] + bl ov16_0223DF0C + mov r2, #0x65 + str r0, [sp, #0x4c] + ldr r1, [sp, #4] + lsl r2, r2, #2 + ldrb r1, [r1, r2] + ldr r0, [sp] + bl ov16_0223EE30 + str r0, [sp, #0xa0] + ldr r0, [sp] + bl ov16_0223F1E8 + str r0, [sp, #0xa4] + ldr r0, [sp] + bl ov16_0223F1F0 + str r0, [sp, #0xa8] + mov r0, #7 + str r0, [sp, #0x88] + ldr r0, [sp] + bl ov16_0223E240 + add r0, r0, #3 + str r0, [sp, #0x8c] + ldr r0, [sp] + bl ov16_0223EC04 + add r4, r0, #0 + ldr r0, [sp] + bl ov16_0223E240 + lsl r1, r0, #1 + add r0, r0, r1 + add r0, #0xac + add r0, r4, r0 + str r0, [sp, #0x90] + mov r0, #2 + str r0, [sp, #0x94] + mov r0, #0 + ldr r2, [sp, #0x18] + str r0, [sp, #0x98] + mov r0, #8 + str r0, [sp, #0x9c] + lsl r2, r2, #0x10 + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + lsr r2, r2, #0x10 + add r3, sp, #0x1c + bl ov12_0221FE30 + add sp, #0xac + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_02264408 + + thumb_func_start ov16_02264530 +ov16_02264530: ; 0x02264530 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r2, #0 + add r7, r1, #0 + str r3, [r6, #0] + str r0, [sp] + str r3, [r6, #4] + mov r4, #0 + add r5, r6, #0 + str r7, [sp, #0xc] + str r6, [sp, #8] + str r7, [sp, #4] +_02264548: + ldr r0, [sp] + add r1, r4, #0 + bl ov16_0223F2AC + str r0, [r5, #8] + ldr r0, [sp, #0xc] + ldrh r1, [r0, #0x18] + ldr r0, [sp, #8] + strh r1, [r0, #0x28] + add r0, r7, r4 + add r0, #0x20 + ldrb r1, [r0] + add r0, r6, r4 + add r0, #0x30 + strb r1, [r0] + add r0, r7, r4 + add r0, #0x24 + ldrb r1, [r0] + add r0, r6, r4 + add r0, #0x34 + strb r1, [r0] + add r0, r7, r4 + add r0, #0x28 + ldrb r1, [r0] + add r0, r6, r4 + add r0, #0x38 + strb r1, [r0] + ldr r0, [sp, #4] + add r4, r4, #1 + ldr r0, [r0, #0x2c] + str r0, [r5, #0x3c] + ldr r0, [sp, #0xc] + add r5, r5, #4 + add r0, r0, #2 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r0, r0, #2 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, r0, #4 + str r0, [sp, #4] + cmp r4, #4 + blt _02264548 + add r1, r6, #0 + ldr r0, [sp] + add r1, #0x4c + bl ov16_0223F87C + add r6, #0x18 + ldr r0, [sp] + add r1, r6, #0 + bl ov16_0223F8AC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02264530 + + thumb_func_start ov16_022645B8 +ov16_022645B8: ; 0x022645B8 + push {r4, r5, r6, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r2, #0 + bne _022645F6 + add r0, sp, #0 + ldrh r6, [r0, #0x10] + mov r1, #9 + add r0, r6, #0 + bl sub_020790C4 + mov r1, #0x40 + tst r0, r1 + bne _022645D8 + mov r0, #1 + b _022645DA +_022645D8: + mov r0, #0 +_022645DA: + strb r0, [r4] + add r0, r6, #0 + mov r1, #9 + bl sub_020790C4 + mov r1, #0x80 + tst r0, r1 + beq _022645F0 + mov r0, #1 + strb r0, [r5] + pop {r4, r5, r6, pc} +_022645F0: + mov r0, #0 + strb r0, [r5] + pop {r4, r5, r6, pc} +_022645F6: + sub r3, #0x12 + cmp r3, #0x15 + bhi _02264646 + add r0, r3, r3 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02264608: ; jump table + .short _02264634 - _02264608 - 2 ; case 0 + .short _02264634 - _02264608 - 2 ; case 1 + .short _02264634 - _02264608 - 2 ; case 2 + .short _02264634 - _02264608 - 2 ; case 3 + .short _02264634 - _02264608 - 2 ; case 4 + .short _02264646 - _02264608 - 2 ; case 5 + .short _02264646 - _02264608 - 2 ; case 6 + .short _02264646 - _02264608 - 2 ; case 7 + .short _02264646 - _02264608 - 2 ; case 8 + .short _02264646 - _02264608 - 2 ; case 9 + .short _02264646 - _02264608 - 2 ; case 10 + .short _02264646 - _02264608 - 2 ; case 11 + .short _02264646 - _02264608 - 2 ; case 12 + .short _02264634 - _02264608 - 2 ; case 13 + .short _02264634 - _02264608 - 2 ; case 14 + .short _02264646 - _02264608 - 2 ; case 15 + .short _02264634 - _02264608 - 2 ; case 16 + .short _02264634 - _02264608 - 2 ; case 17 + .short _0226463E - _02264608 - 2 ; case 18 + .short _02264634 - _02264608 - 2 ; case 19 + .short _0226463E - _02264608 - 2 ; case 20 + .short _02264634 - _02264608 - 2 ; case 21 +_02264634: + mov r0, #1 + strb r0, [r4] + mov r0, #0 + strb r0, [r5] + pop {r4, r5, r6, pc} +_0226463E: + mov r0, #1 + strb r0, [r4] + strb r0, [r5] + pop {r4, r5, r6, pc} +_02264646: + mov r0, #0 + strb r0, [r4] + strb r0, [r5] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_022645B8 + + thumb_func_start ov16_02264650 +ov16_02264650: ; 0x02264650 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + mov r4, #0 + bl sub_0200D81C + cmp r0, #1 + beq _02264668 + ldr r1, _022646C0 ; =0x00000FFF + cmp r0, r1 + beq _02264692 + b _02264696 +_02264668: + ldrh r1, [r5, #0x12] + lsl r0, r1, #0x1f + lsr r0, r0, #0x1f + bne _022646BC + mov r0, #1 + bic r1, r0 + mov r0, #1 + orr r0, r1 + strh r0, [r5, #0x12] + mov r0, #5 + mov r1, #8 + bl sub_02018144 + add r1, r0, #0 + add r2, r4, #0 + str r2, [r1, #0] + ldr r0, _022646C4 ; =ov16_022646C8 + str r2, [r1, #4] + bl sub_0200D9E8 + b _022646BC +_02264692: + mov r4, #1 + b _022646BC +_02264696: + sub r1, #0xff + add r2, r0, #0 + and r2, r1 + mov r1, #1 + lsl r1, r1, #8 + cmp r2, r1 + bne _022646BC + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + beq _022646BC + ldr r0, [r5, #8] + add r1, r4, #0 + bl sub_0200D3CC + ldr r0, [r5, #8] + sub r1, r6, #1 + bl sub_0200D364 + mov r4, #1 +_022646BC: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022646C0: .word 0x00000FFF +_022646C4: .word ov16_022646C8 + thumb_func_end ov16_02264650 + + thumb_func_start ov16_022646C8 +ov16_022646C8: ; 0x022646C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _022646DE + cmp r0, #1 + beq _022646F6 + cmp r0, #2 + beq _02264718 + pop {r3, r4, r5, pc} +_022646DE: + mov r0, #1 + str r0, [sp] + mov r0, #4 + mov r1, #0x10 + mov r2, #0 + mov r3, #0x3d + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_022646F6: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _0226472E + mov r0, #1 + str r0, [sp] + mov r0, #4 + mov r1, #0 + mov r2, #0x10 + mov r3, #0x3d + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02264718: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _0226472E + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0226472E: + pop {r3, r4, r5, pc} + thumb_func_end ov16_022646C8 + + thumb_func_start ov16_02264730 +ov16_02264730: ; 0x02264730 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl ov16_0223F720 + add r0, r4, #0 + bl ov16_0223DF10 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_0225B444 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02264730 + + thumb_func_start ov16_0226474C +ov16_0226474C: ; 0x0226474C + push {r4, lr} + add r4, r0, #0 + mov r1, #2 + bl ov16_0223F720 + add r0, r4, #0 + bl ov16_0223DF10 + add r1, r0, #0 + add r0, r4, #0 + bl ov16_0225B444 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226474C + + thumb_func_start ov16_02264768 +ov16_02264768: ; 0x02264768 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov16_0223DF0C + mov r1, #4 + tst r0, r1 + beq _02264794 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_0223E16C + bl sub_02025FCC + cmp r0, #0 + bne _02264794 + cmp r4, #1 + bhi _02264794 + add r4, #0x67 + lsl r0, r4, #0x18 + lsr r4, r0, #0x18 +_02264794: + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02264768 + + .rodata + + + .global Unk_ov16_0226F174 +Unk_ov16_0226F174: ; 0x0226F174 + .incbin "incbin/overlay16_rodata.bin", 0xF18, 0xF20 - 0xF18 + + .global Unk_ov16_0226F17C +Unk_ov16_0226F17C: ; 0x0226F17C + .incbin "incbin/overlay16_rodata.bin", 0xF20, 0xF38 - 0xF20 + + .global Unk_ov16_0226F194 +Unk_ov16_0226F194: ; 0x0226F194 + .incbin "incbin/overlay16_rodata.bin", 0xF38, 0xF52 - 0xF38 + + .global Unk_ov16_0226F1AE +Unk_ov16_0226F1AE: ; 0x0226F1AE + .incbin "incbin/overlay16_rodata.bin", 0xF52, 0xF74 - 0xF52 + + .global Unk_ov16_0226F1D0 +Unk_ov16_0226F1D0: ; 0x0226F1D0 + .incbin "incbin/overlay16_rodata.bin", 0xF74, 0xFD0 - 0xF74 + + .global Unk_ov16_0226F22C +Unk_ov16_0226F22C: ; 0x0226F22C + .incbin "incbin/overlay16_rodata.bin", 0xFD0, 0x10C0 - 0xFD0 + + .global Unk_ov16_0226F31C +Unk_ov16_0226F31C: ; 0x0226F31C + .incbin "incbin/overlay16_rodata.bin", 0x10C0, 0x18 + diff --git a/asm/ov16_02264798.s b/asm/ov16_02264798.s new file mode 100644 index 000000000..762e640ac --- /dev/null +++ b/asm/ov16_02264798.s @@ -0,0 +1,111 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_02264798 +ov16_02264798: ; 0x02264798 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _022647CC + add r0, r1, #0 + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + bne _022647CC + mov r1, #0xb4 + add r0, r1, #0 + add r0, #0xe8 + strh r1, [r4, r0] + ldr r0, _022647D0 ; =ov16_02264800 + ldr r2, _022647D4 ; =0x000003F2 + add r1, r4, #0 + bl sub_0200D9E8 + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r4, r1] +_022647CC: + pop {r4, pc} + nop +_022647D0: .word ov16_02264800 +_022647D4: .word 0x000003F2 + thumb_func_end ov16_02264798 + + thumb_func_start ov16_022647D8 +ov16_022647D8: ; 0x022647D8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022647FE + bl sub_0200DA58 + mov r0, #0x66 + mov r2, #0 + lsl r0, r0, #2 + str r2, [r4, r0] + add r0, r0, #4 + strh r2, [r4, r0] + ldr r0, [r4, #0x20] + mov r1, #4 + bl sub_02007DEC +_022647FE: + pop {r4, pc} + thumb_func_end ov16_022647D8 + + thumb_func_start ov16_02264800 +ov16_02264800: ; 0x02264800 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x67 + lsl r1, r1, #2 + ldrh r0, [r4, r1] + add r0, #0x14 + strh r0, [r4, r1] + add r0, r1, #0 + ldrh r2, [r4, r1] + sub r0, #0x34 + cmp r2, r0 + blo _02264820 + add r0, r1, #0 + sub r0, #0x34 + sub r0, r2, r0 + strh r0, [r4, r1] +_02264820: + mov r0, #0x67 + lsl r0, r0, #2 + ldrh r0, [r4, r0] + bl sub_0201D15C + mov r2, #6 + asr r1, r0, #0x1f + lsl r2, r2, #0xa + mov r3, #0 + bl sub_020E1F1C + add r2, r1, #0 + mov r1, #4 + add r5, r0, #0 + ldr r0, [r4, #0x20] + mov r4, #0 + lsl r3, r1, #9 + add r3, r5, r3 + adc r2, r4 + lsl r2, r2, #0x14 + lsr r3, r3, #0xc + orr r3, r2 + asr r2, r3, #0xb + lsr r2, r2, #0x14 + add r2, r3, r2 + asr r2, r2, #0xc + bl sub_02007DEC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02264800 \ No newline at end of file diff --git a/asm/ov16_0226485C.s b/asm/ov16_0226485C.s new file mode 100644 index 000000000..54ed915eb --- /dev/null +++ b/asm/ov16_0226485C.s @@ -0,0 +1,5118 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0226485C +ov16_0226485C: ; 0x0226485C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r6, r3, #0 + str r1, [sp] + str r2, [sp, #4] + cmp r1, #1 + bne _02264882 + bl ov16_0223E074 + add r4, r0, #0 + add r0, r7, #0 + bl ov16_0223E0B0 + add r5, r0, #0 + add r0, r7, #0 + bl ov16_0223E0BC + b _02264896 +_02264882: + bl ov16_0223E06C + add r4, r0, #0 + add r0, r7, #0 + bl ov16_0223E08C + add r5, r0, #0 + add r0, r7, #0 + bl ov16_0223E098 +_02264896: + add r7, r0, #0 + add r0, sp, #0x10 + ldrh r2, [r5] + ldrb r3, [r0, #0x10] + add r0, r2, #5 + add r1, r0, r3 + mov r0, #1 + lsl r0, r0, #0xc + cmp r1, r0 + bls _022648B0 + strh r2, [r7] + mov r0, #0 + strh r0, [r5] +_022648B0: + ldr r1, [sp] + add r0, sp, #8 + strb r1, [r0] + ldr r1, [sp, #4] + strb r1, [r0, #1] + add r1, sp, #0x10 + ldrb r1, [r1, #0x10] + strh r1, [r0, #2] + add r1, sp, #8 + mov r0, #0 +_022648C4: + ldrb r7, [r1, r0] + ldrh r2, [r5] + add r0, r0, #1 + strb r7, [r4, r2] + ldrh r2, [r5] + add r2, r2, #1 + strh r2, [r5] + cmp r0, #4 + blo _022648C4 + mov r0, #0 + cmp r3, #0 + ble _022648EE +_022648DC: + ldrb r2, [r6, r0] + ldrh r1, [r5] + add r0, r0, #1 + strb r2, [r4, r1] + ldrh r1, [r5] + add r1, r1, #1 + strh r1, [r5] + cmp r0, r3 + blt _022648DC +_022648EE: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0226485C + + thumb_func_start ov16_022648F4 +ov16_022648F4: ; 0x022648F4 + push {r3, r4, r5, r6, r7, lr} + add r3, r1, #0 + ldrb r6, [r3, #3] + ldrb r1, [r3] + ldrb r7, [r3, #2] + lsl r6, r6, #8 + add r5, r0, #0 + mov r2, #0 + orr r6, r7 + ldrb r4, [r3, #1] + cmp r1, #0 + bne _0226493A + ldr r0, [r5, #0x30] + lsl r1, r4, #8 + add r4, r0, r1 + mov r0, #0x23 + lsl r0, r0, #8 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _02264984 + cmp r6, #0 + ble _02264936 + mov r4, #0x23 + lsl r4, r4, #8 +_02264924: + add r0, r3, r2 + ldr r7, [r5, #0x30] + ldrb r0, [r0, #4] + add r7, r1, r7 + add r7, r2, r7 + add r2, r2, #1 + strb r0, [r7, r4] + cmp r2, r6 + blt _02264924 +_02264936: + mov r2, #1 + b _02264984 +_0226493A: + cmp r1, #1 + bne _02264966 + lsl r0, r4, #2 + add r0, r5, r0 + ldr r1, [r0, #0x34] + add r1, #0x94 + ldrb r1, [r1] + cmp r1, #0 + bne _02264984 + cmp r6, #0 + ble _02264962 +_02264950: + add r1, r3, r2 + ldrb r4, [r1, #4] + ldr r1, [r0, #0x34] + add r1, r1, r2 + add r1, #0x94 + add r2, r2, #1 + strb r4, [r1] + cmp r2, r6 + blt _02264950 +_02264962: + mov r2, #1 + b _02264984 +_02264966: + cmp r1, #2 + bne _02264984 + ldrb r7, [r3, #4] + ldrb r6, [r3, #5] + bl ov16_0223ED60 + cmp r0, #0 + beq _02264982 + ldr r0, [r5, #0x30] + add r1, r6, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov16_02251F80 +_02264982: + mov r2, #1 +_02264984: + add r0, r2, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_022648F4 + + thumb_func_start ov16_02264988 +ov16_02264988: ; 0x02264988 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + cmp r1, #1 + bne _022649AE + bl ov16_0223E074 + add r6, r0, #0 + add r0, r5, #0 + bl ov16_0223E0A4 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_0223E0B0 + add r7, r0, #0 + add r0, r5, #0 + bl ov16_0223E0BC + b _022649CA +_022649AE: + bl ov16_0223E06C + add r6, r0, #0 + add r0, r5, #0 + bl ov16_0223E080 + add r4, r0, #0 + add r0, r5, #0 + bl ov16_0223E08C + add r7, r0, #0 + add r0, r5, #0 + bl ov16_0223E098 +_022649CA: + ldrh r1, [r4] + ldrh r2, [r7] + cmp r1, r2 + beq _02264A00 + ldrh r2, [r0] + cmp r1, r2 + bne _022649DE + mov r1, #0 + strh r1, [r4] + strh r1, [r0] +_022649DE: + ldrh r1, [r4] + add r0, r5, #0 + add r1, r6, r1 + bl ov16_022648F4 + cmp r0, #1 + bne _02264A00 + ldrh r0, [r4] + add r1, r0, #2 + ldrb r2, [r6, r1] + add r1, r0, #3 + ldrb r1, [r6, r1] + lsl r1, r1, #8 + orr r1, r2 + add r1, r1, #4 + add r0, r0, r1 + strh r0, [r4] +_02264A00: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02264988 + + thumb_func_start ov16_02264A04 +ov16_02264A04: ; 0x02264A04 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + str r1, [sp, #4] + ldr r1, [r5, #0x2c] + mov r0, #4 + add r7, r2, #0 + add r6, r3, #0 + tst r0, r1 + beq _02264A5E + ldr r0, _02264A88 ; =0x0000240C + ldr r1, [r5, r0] + mov r0, #0x10 + tst r0, r1 + bne _02264A5E + ldr r0, [sp, #4] + cmp r0, #1 + bne _02264A48 + mov r4, #0 + bl sub_02035E18 + cmp r0, #0 + ble _02264A48 +_02264A32: + ldrb r3, [r6] + ldr r0, [r5, #0x30] + add r1, r4, #0 + add r2, r7, #0 + bl ov16_02251F44 + add r4, r4, #1 + bl sub_02035E18 + cmp r4, r0 + blt _02264A32 +_02264A48: + add r0, sp, #0x10 + ldrb r0, [r0, #0x10] + ldr r1, [sp, #4] + add r2, r7, #0 + str r0, [sp] + add r0, r5, #0 + add r3, r6, #0 + bl sub_0207A81C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02264A5E: + ldr r0, [sp, #4] + cmp r0, #1 + bne _02264A70 + ldrb r3, [r6] + ldr r0, [r5, #0x30] + mov r1, #0 + add r2, r7, #0 + bl ov16_02251F44 +_02264A70: + add r0, sp, #0x10 + ldrb r0, [r0, #0x10] + ldr r1, [sp, #4] + add r2, r7, #0 + str r0, [sp] + add r0, r5, #0 + add r3, r6, #0 + bl ov16_0226485C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02264A88: .word 0x0000240C + thumb_func_end ov16_02264A04 + + thumb_func_start ov16_02264A8C +ov16_02264A8C: ; 0x02264A8C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + mov r1, #1 + add r5, r0, #0 + str r1, [sp, #4] + bl ov16_0223F4E8 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02264A8C + + thumb_func_start ov16_02264AB4 +ov16_02264AB4: ; 0x02264AB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r7, r1, #0 + mov r3, #2 + add r2, sp, #4 + strb r3, [r2] + mov r2, #0xc0 + add r4, r7, #0 + mul r4, r2 + add r2, sp, #4 + ldrb r5, [r2, #1] + mov r2, #3 + add r6, r0, #0 + bic r5, r2 + ldr r2, [r6, #0x30] + add r3, r2, r4 + ldr r2, _02264BAC ; =0x00002DBE + mov ip, r2 + ldrb r2, [r3, r2] + lsl r2, r2, #0x1c + lsr r3, r2, #0x1c + mov r2, #3 + and r2, r3 + add r3, r5, #0 + orr r3, r2 + add r2, sp, #4 + strb r3, [r2, #1] + ldrb r5, [r2, #1] + mov r2, #4 + bic r5, r2 + ldr r2, [r6, #0x30] + add r3, r2, r4 + mov r2, ip + sub r2, #0x58 + ldrb r2, [r3, r2] + add r3, r5, #0 + lsl r2, r2, #0x1a + lsr r2, r2, #0x1f + lsl r2, r2, #0x1f + lsr r2, r2, #0x1d + orr r3, r2 + add r2, sp, #4 + strb r3, [r2, #1] + ldr r2, [r6, #0x30] + add r3, r2, r4 + mov r2, ip + sub r2, #0x7e + ldrh r3, [r3, r2] + add r2, sp, #4 + strh r3, [r2, #2] + ldr r2, [r6, #0x30] + add r3, r2, r4 + mov r2, ip + sub r2, #0x16 + ldr r2, [r3, r2] + str r2, [sp, #8] + bl ov16_0223E1F8 + add r2, r0, #0 + ldr r0, [r6, #0x30] + add r1, r7, #0 + mov r3, #1 + bl ov16_022599D0 + add r2, sp, #4 + str r0, [sp, #0xc] + ldrb r0, [r2, #1] + mov r1, #0xf8 + add r5, sp, #4 + bic r0, r1 + ldr r1, [r6, #0x30] + add r3, r1, r4 + ldr r1, _02264BB0 ; =0x00002D66 + mov r4, #0 + ldrb r1, [r3, r1] + lsl r1, r1, #0x1b + lsr r1, r1, #0x1b + lsl r1, r1, #0x1b + lsr r1, r1, #0x18 + orr r0, r1 + strb r0, [r2, #1] +_02264B56: + ldr r0, [r6, #0x30] + add r1, r7, #0 + add r2, r4, #6 + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0xc] + add r2, r4, #0 + ldr r0, [r6, #0x30] + add r1, r7, #0 + add r2, #0x1f + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x14] + add r2, r4, #0 + ldr r0, [r6, #0x30] + add r1, r7, #0 + add r2, #0x27 + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x1c] + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _02264B56 + ldr r0, [r6, #0x30] + add r1, r7, #0 + mov r2, #0x2d + add r3, sp, #0x28 + bl ov16_02252060 + mov r0, #0x3c + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + add r2, r7, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02264BAC: .word 0x00002DBE +_02264BB0: .word 0x00002D66 + thumb_func_end ov16_02264AB4 + + thumb_func_start ov16_02264BB4 +ov16_02264BB4: ; 0x02264BB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x78 + add r7, r1, #0 + add r3, sp, #4 + mov r2, #3 + strb r2, [r3] + mov r2, #0xc0 + add r4, r7, #0 + mul r4, r2 + add r2, r3, #0 + ldrb r5, [r2, #1] + mov r2, #3 + add r6, r0, #0 + bic r5, r2 + ldr r2, [r6, #0x30] + add r3, r2, r4 + ldr r2, _02264CDC ; =0x00002DBE + mov ip, r2 + ldrb r2, [r3, r2] + lsl r2, r2, #0x1c + lsr r3, r2, #0x1c + mov r2, #3 + and r2, r3 + add r3, r5, #0 + orr r3, r2 + add r2, sp, #4 + strb r3, [r2, #1] + ldrb r5, [r2, #1] + mov r2, #4 + bic r5, r2 + ldr r2, [r6, #0x30] + add r3, r2, r4 + mov r2, ip + sub r2, #0x58 + ldrb r2, [r3, r2] + add r3, r5, #0 + lsl r2, r2, #0x1a + lsr r2, r2, #0x1f + lsl r2, r2, #0x1f + lsr r2, r2, #0x1d + orr r3, r2 + add r2, sp, #4 + strb r3, [r2, #1] + ldr r2, [r6, #0x30] + add r3, r2, r4 + mov r2, ip + sub r2, #0x7e + ldrh r3, [r3, r2] + add r2, sp, #4 + strh r3, [r2, #2] + ldr r2, [r6, #0x30] + add r3, r2, r4 + mov r2, ip + sub r2, #0x16 + ldr r2, [r3, r2] + str r2, [sp, #8] + bl ov16_0223E1F8 + add r2, r0, #0 + ldr r0, [r6, #0x30] + add r1, r7, #0 + mov r3, #1 + bl ov16_022599D0 + str r0, [sp, #0xc] + ldr r0, [r6, #0x30] + add r2, sp, #4 + add r1, r0, r7 + ldr r0, _02264CE0 ; =0x0000219C + ldrb r0, [r1, r0] + mov r1, #0xf8 + str r0, [sp, #0x10] + ldrb r0, [r2, #1] + bic r0, r1 + ldr r1, [r6, #0x30] + add r3, r1, r4 + ldr r1, _02264CE4 ; =0x00002D66 + ldrb r3, [r3, r1] + add r1, #0x59 + lsl r3, r3, #0x1b + lsr r3, r3, #0x1b + lsl r3, r3, #0x1b + lsr r3, r3, #0x18 + orr r0, r3 + strb r0, [r2, #1] + ldr r0, [r6, #0x30] + add r0, r0, r4 + ldrb r0, [r0, r1] + add r1, r7, #0 + str r0, [sp, #0x14] + add r0, r6, #0 + bl ov16_0223E258 + ldr r1, [r6, #0x30] + ldr r2, [sp, #0x10] + add r1, r1, r0 + ldr r0, _02264CE0 ; =0x0000219C + ldrb r0, [r1, r0] + add r1, r7, #0 + str r0, [sp, #0x4c] + add r0, r6, #0 + bl ov16_0223EF2C + mov r4, #0 + add r5, sp, #4 +_02264C86: + ldr r0, [r6, #0x30] + add r1, r7, #0 + add r2, r4, #6 + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x18] + add r2, r4, #0 + ldr r0, [r6, #0x30] + add r1, r7, #0 + add r2, #0x1f + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x20] + add r2, r4, #0 + ldr r0, [r6, #0x30] + add r1, r7, #0 + add r2, #0x27 + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x28] + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _02264C86 + ldr r0, [r6, #0x30] + add r1, r7, #0 + mov r2, #0x2d + add r3, sp, #0x34 + bl ov16_02252060 + mov r0, #0x74 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + add r2, r7, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0x78 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02264CDC: .word 0x00002DBE +_02264CE0: .word 0x0000219C +_02264CE4: .word 0x00002D66 + thumb_func_end ov16_02264BB4 + + thumb_func_start ov16_02264CE8 +ov16_02264CE8: ; 0x02264CE8 + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + add r7, r1, #0 + add r4, r0, #0 + mov r1, #4 + add r6, sp, #0x10 + strb r1, [r6] + mov r0, #0xc0 + add r5, r7, #0 + mul r5, r0 + ldr r0, [r4, #0x30] + str r2, [sp, #4] + add r2, r0, r5 + ldr r0, _02264EDC ; =0x00002DB0 + str r3, [sp, #8] + ldr r3, [r2, r0] + lsl r1, r1, #0x13 + tst r1, r3 + ldrb r1, [r6, #1] + beq _02264D32 + mov r3, #3 + bic r1, r3 + add r3, r0, #0 + add r3, #0x4a + ldrh r2, [r2, r3] + add r0, #0x34 + lsl r2, r2, #0x18 + lsr r3, r2, #0x18 + mov r2, #3 + and r2, r3 + orr r1, r2 + strb r1, [r6, #1] + ldr r1, [r4, #0x30] + add r1, r1, r5 + ldr r0, [r1, r0] + str r0, [sp, #0x14] + b _02264D52 +_02264D32: + mov r3, #3 + bic r1, r3 + add r3, r0, #0 + add r3, #0xe + ldrb r2, [r2, r3] + sub r0, #8 + lsl r2, r2, #0x1c + lsr r3, r2, #0x1c + mov r2, #3 + and r2, r3 + orr r1, r2 + strb r1, [r6, #1] + ldr r1, [r4, #0x30] + add r1, r1, r5 + ldr r0, [r1, r0] + str r0, [sp, #0x14] +_02264D52: + mov r0, #0xc0 + add r6, r7, #0 + add r3, sp, #0x10 + mul r6, r0 + ldrb r0, [r3, #1] + mov r1, #4 + bic r0, r1 + ldr r1, [r4, #0x30] + add r2, r1, r6 + ldr r1, _02264EE0 ; =0x00002D66 + ldrb r2, [r2, r1] + sub r1, #0x26 + lsl r2, r2, #0x1a + lsr r2, r2, #0x1f + lsl r2, r2, #0x1f + lsr r2, r2, #0x1d + orr r0, r2 + strb r0, [r3, #1] + ldr r0, [r4, #0x30] + add r0, r0, r6 + ldrh r0, [r0, r1] + add r1, r7, #0 + strh r0, [r3, #2] + add r0, r4, #0 + bl ov16_0223E1F8 + add r2, r0, #0 + ldr r0, [r4, #0x30] + add r1, r7, #0 + mov r3, #0 + bl ov16_022599D0 + str r0, [sp, #0x18] + ldr r0, [r4, #0x30] + mov r2, #0xf8 + add r1, r0, r7 + ldr r0, _02264EE4 ; =0x0000219C + ldrb r0, [r1, r0] + str r0, [sp, #0x1c] + add r0, sp, #0x10 + ldrb r1, [r0, #1] + bic r1, r2 + ldr r2, [r4, #0x30] + add r3, r2, r6 + ldr r2, _02264EE0 ; =0x00002D66 + ldrb r3, [r3, r2] + lsl r3, r3, #0x1b + lsr r3, r3, #0x1b + lsl r3, r3, #0x1b + lsr r3, r3, #0x18 + orr r1, r3 + strb r1, [r0, #1] + ldr r0, [sp, #4] + cmp r0, #0 + beq _02264DC4 + str r0, [sp, #0x20] + b _02264DCE +_02264DC4: + ldr r0, [r4, #0x30] + add r2, #0x59 + add r0, r0, r5 + ldrb r0, [r0, r2] + str r0, [sp, #0x20] +_02264DCE: + ldr r0, [sp, #8] + str r0, [sp, #0x24] + ldr r0, [r4, #0x30] + add r1, r0, r5 + ldr r0, _02264EDC ; =0x00002DB0 + ldr r1, [r1, r0] + mov r0, #1 + lsl r0, r0, #0x18 + tst r0, r1 + beq _02264DE6 + mov r0, #1 + b _02264DE8 +_02264DE6: + mov r0, #0 +_02264DE8: + ldr r2, [sp, #0x1c] + str r0, [sp, #0x5c] + add r0, r4, #0 + add r1, r7, #0 + bl ov16_0223EF2C + mov r6, #0 + add r5, sp, #0x10 +_02264DF8: + ldr r0, [r4, #0x30] + add r1, r7, #0 + add r2, r6, #6 + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x18] + add r2, r6, #0 + ldr r0, [r4, #0x30] + add r1, r7, #0 + add r2, #0x1f + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x20] + add r2, r6, #0 + ldr r0, [r4, #0x30] + add r1, r7, #0 + add r2, #0x27 + mov r3, #0 + bl ov16_02252060 + strh r0, [r5, #0x28] + add r6, r6, #1 + add r5, r5, #2 + cmp r6, #4 + blt _02264DF8 + ldr r0, [r4, #0x30] + add r1, r7, #0 + mov r2, #0x2d + add r3, sp, #0x40 + bl ov16_02252060 + add r3, sp, #0x10 + mov r2, #0 + mov ip, r2 + str r3, [sp, #0xc] + add r5, r3, #0 +_02264E44: + ldr r0, [r4, #0x30] + add r1, r0, r2 + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r1, [r1, r0] + ldr r0, [sp, #0xc] + add r0, #0x50 + strh r1, [r0] + ldr r0, [r4, #0x30] + add r1, r0, r2 + ldr r0, _02264EE0 ; =0x00002D66 + ldrb r0, [r1, r0] + lsl r0, r0, #0x1a + lsr r1, r0, #0x1f + add r0, r3, #0 + add r0, #0x5c + strb r1, [r0] + ldr r0, [r4, #0x30] + add r1, r0, r2 + ldr r0, _02264EE0 ; =0x00002D66 + ldrb r0, [r1, r0] + lsl r0, r0, #0x1b + lsr r1, r0, #0x1b + add r0, r3, #0 + add r0, #0x60 + strb r1, [r0] + ldr r0, [r4, #0x30] + add r6, r0, r2 + ldr r0, _02264EDC ; =0x00002DB0 + ldr r1, [r6, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r1 + beq _02264E9A + ldr r0, _02264EE8 ; =0x00002DFA + ldrh r1, [r6, r0] + add r0, r3, #0 + add r0, #0x58 + strb r1, [r0] + ldr r0, [r4, #0x30] + add r1, r0, r2 + ldr r0, _02264EEC ; =0x00002DE4 + b _02264EAE +_02264E9A: + ldr r0, _02264EF0 ; =0x00002DBE + ldrb r0, [r6, r0] + lsl r0, r0, #0x1c + lsr r1, r0, #0x1c + add r0, r3, #0 + add r0, #0x58 + strb r1, [r0] + ldr r0, [r4, #0x30] + add r1, r0, r2 + ldr r0, _02264EF4 ; =0x00002DA8 +_02264EAE: + ldr r0, [r1, r0] + add r2, #0xc0 + str r0, [r5, #0x64] + ldr r0, [sp, #0xc] + add r3, r3, #1 + add r0, r0, #2 + str r0, [sp, #0xc] + mov r0, ip + add r0, r0, #1 + add r5, r5, #4 + mov ip, r0 + cmp r0, #4 + blt _02264E44 + mov r0, #0x74 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + add r2, r7, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02264EDC: .word 0x00002DB0 +_02264EE0: .word 0x00002D66 +_02264EE4: .word 0x0000219C +_02264EE8: .word 0x00002DFA +_02264EEC: .word 0x00002DE4 +_02264EF0: .word 0x00002DBE +_02264EF4: .word 0x00002DA8 + thumb_func_end ov16_02264CE8 + + thumb_func_start ov16_02264EF8 +ov16_02264EF8: ; 0x02264EF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r4, r1, #0 + lsl r1, r2, #2 + str r0, [sp, #4] + add r0, r0, r1 + ldr r1, [r0, #0x34] + ldr r0, _02265034 ; =0x00000195 + str r2, [sp, #8] + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _02264F16 + mov r2, #2 + b _02264F18 +_02264F16: + mov r2, #0 +_02264F18: + ldr r0, [sp, #8] + mov r1, #0xc0 + add r5, r0, #0 + ldr r0, [sp, #4] + mul r5, r1 + ldr r0, [r0, #0x30] + ldr r3, _02265038 ; =0x00002D66 + add r0, r0, r5 + ldrb r0, [r0, r3] + mov r1, #5 + lsl r0, r0, #0x1b + lsr r7, r0, #0x1b + add r0, sp, #0xc + strb r1, [r0] + ldr r0, [sp, #4] + ldr r0, [r0, #0x30] + add r1, r0, r5 + add r0, r3, #0 + add r0, #0x4a + ldr r6, [r1, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r6 + beq _02264F6C + add r0, r3, #0 + add r0, #0x7e + ldr r0, [r1, r0] + lsl r2, r2, #0x18 + str r0, [sp] + add r0, r3, #0 + sub r0, #0x26 + add r3, #0x94 + ldrh r0, [r1, r0] + ldrh r1, [r1, r3] + lsl r3, r7, #0x18 + lsr r2, r2, #0x18 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + lsr r3, r3, #0x18 + bl sub_02076648 + b _02264F8E +_02264F6C: + add r0, r3, #0 + add r0, #0x42 + ldr r0, [r1, r0] + lsl r2, r2, #0x18 + str r0, [sp] + add r0, r3, #0 + sub r0, #0x26 + add r3, #0x58 + ldrh r0, [r1, r0] + ldrb r1, [r1, r3] + lsl r3, r7, #0x18 + lsr r2, r2, #0x18 + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + lsr r3, r3, #0x18 + bl sub_02076648 +_02264F8E: + add r1, sp, #0xc + strb r0, [r1, #1] + ldr r0, [sp, #4] + ldr r1, _0226503C ; =0x00002DBF + ldr r0, [r0, #0x30] + add r0, r0, r5 + ldrb r2, [r0, r1] + add r0, sp, #0xc + sub r1, #0xf + strh r2, [r0, #2] + ldr r0, [sp, #4] + ldr r0, [r0, #0x30] + add r0, r0, r5 + ldr r1, [r0, r1] + mov r0, #1 + lsl r0, r0, #0x18 + tst r0, r1 + beq _02264FB6 + mov r0, #1 + b _02264FB8 +_02264FB6: + mov r0, #0 +_02264FB8: + str r0, [sp, #0x10] + mov r0, #0 + mov ip, r0 + add r7, sp, #0xc + ldr r0, _02265038 ; =0x00002D66 + add r3, r7, #0 + add r2, r4, r0 + add r0, #0x58 + add r5, r7, #0 + add r6, r4, r0 +_02264FCC: + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r4, r0] + strh r0, [r7, #8] + ldrb r0, [r2] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + strb r0, [r3, #0x14] + ldrb r0, [r2] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1b + strb r0, [r3, #0x18] + ldr r0, _02265040 ; =0x00002DB0 + ldr r1, [r4, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r1 + beq _02264FFA + ldr r0, _02265044 ; =0x00002DFA + ldrh r0, [r4, r0] + strb r0, [r3, #0x10] + ldr r0, _02265048 ; =0x00002DE4 + b _02265004 +_02264FFA: + ldrb r0, [r6] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + strb r0, [r3, #0x10] + ldr r0, _0226504C ; =0x00002DA8 +_02265004: + ldr r0, [r4, r0] + add r4, #0xc0 + str r0, [r5, #0x1c] + mov r0, ip + add r0, r0, #1 + add r7, r7, #2 + add r2, #0xc0 + add r3, r3, #1 + add r5, r5, #4 + add r6, #0xc0 + mov ip, r0 + cmp r0, #4 + blt _02264FCC + mov r0, #0x2c + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #8] + mov r1, #1 + add r3, sp, #0xc + bl ov16_02264A04 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02265034: .word 0x00000195 +_02265038: .word 0x00002D66 +_0226503C: .word 0x00002DBF +_02265040: .word 0x00002DB0 +_02265044: .word 0x00002DFA +_02265048: .word 0x00002DE4 +_0226504C: .word 0x00002DA8 + thumb_func_end ov16_02264EF8 + + thumb_func_start ov16_02265050 +ov16_02265050: ; 0x02265050 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r1, #0 + add r4, r0, #0 + lsl r0, r7, #2 + add r0, r4, r0 + ldr r1, [r0, #0x34] + ldr r0, _02265100 ; =0x00000195 + str r2, [sp, #4] + ldrb r1, [r1, r0] + mov r0, #1 + tst r0, r1 + beq _0226506E + mov r2, #2 + b _02265070 +_0226506E: + mov r2, #0 +_02265070: + mov r0, #0xc0 + add r6, r7, #0 + mul r6, r0 + ldr r0, [r4, #0x30] + ldr r5, _02265104 ; =0x00002D66 + add r0, r0, r6 + ldrb r0, [r0, r5] + mov r1, #6 + lsl r0, r0, #0x1b + lsr r3, r0, #0x1b + add r0, sp, #8 + strb r1, [r0] + ldr r0, [r4, #0x30] + add r1, r0, r6 + add r0, r5, #0 + add r0, #0x4a + ldr r6, [r1, r0] + mov r0, #2 + lsl r0, r0, #0x14 + tst r0, r6 + beq _022650BE + add r0, r5, #0 + add r0, #0x7e + ldr r0, [r1, r0] + lsl r2, r2, #0x18 + str r0, [sp] + add r0, r5, #0 + sub r0, #0x26 + add r5, #0x94 + ldrh r0, [r1, r0] + ldrh r1, [r1, r5] + lsl r3, r3, #0x18 + lsr r2, r2, #0x18 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + lsr r3, r3, #0x18 + bl sub_02076648 + b _022650E0 +_022650BE: + add r0, r5, #0 + add r0, #0x42 + ldr r0, [r1, r0] + lsl r2, r2, #0x18 + str r0, [sp] + add r0, r5, #0 + sub r0, #0x26 + add r5, #0x58 + ldrh r0, [r1, r0] + ldrb r1, [r1, r5] + lsl r3, r3, #0x18 + lsr r2, r2, #0x18 + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + lsr r3, r3, #0x18 + bl sub_02076648 +_022650E0: + add r1, sp, #8 + strb r0, [r1, #1] + ldr r0, [sp, #4] + add r1, sp, #8 + strh r0, [r1, #2] + mov r0, #4 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + add r2, r7, #0 + add r3, sp, #8 + bl ov16_02264A04 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02265100: .word 0x00000195 +_02265104: .word 0x00002D66 + thumb_func_end ov16_02265050 + + thumb_func_start ov16_02265108 +ov16_02265108: ; 0x02265108 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #7 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02265108 + + thumb_func_start ov16_02265124 +ov16_02265124: ; 0x02265124 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #8 + add r3, sp, #4 + strb r1, [r3] + mov r1, #0x34 + mul r1, r2 + add r1, r0, r1 + add r1, #0xad + ldrb r1, [r1] + strh r1, [r3, #2] + add r1, r0, r2 + add r1, #0xa8 + ldrb r1, [r1] + strb r1, [r3, #1] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + thumb_func_end ov16_02265124 + + thumb_func_start ov16_02265154 +ov16_02265154: ; 0x02265154 + push {r4, r5, r6, lr} + sub sp, #8 + mov r6, #9 + add r3, sp, #4 + strb r6, [r3] + add r5, r0, #0 + strb r2, [r3, #1] + add r4, r1, #0 + bl ov16_0223E258 + ldr r1, [r5, #0x30] + add r2, r4, #0 + add r1, r1, r0 + ldr r0, _02265188 ; =0x0000219C + add r3, sp, #4 + ldrb r1, [r1, r0] + add r0, sp, #4 + strh r1, [r0, #2] + mov r0, #4 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + bl ov16_02264A04 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02265188: .word 0x0000219C + thumb_func_end ov16_02265154 + + thumb_func_start ov16_0226518C +ov16_0226518C: ; 0x0226518C + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0xa + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_0226518C + + thumb_func_start ov16_022651A8 +ov16_022651A8: ; 0x022651A8 + push {r3, r4, lr} + sub sp, #0xc + add r3, r1, #0 + mov r1, #0xb + add r4, sp, #4 + strb r1, [r4] + mov r1, #0x34 + mul r1, r3 + add r1, r0, r1 + add r1, #0xad + ldrb r1, [r1] + strh r1, [r4, #2] + add r1, r0, r3 + add r1, #0xa8 + ldrb r1, [r1] + strb r1, [r4, #1] + str r2, [sp, #8] + mov r1, #8 + str r1, [sp] + add r2, r3, #0 + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov16_022651A8 + + thumb_func_start ov16_022651DC +ov16_022651DC: ; 0x022651DC + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r1, #0 + ldr r1, _02265300 ; =0x0000219C + add r4, r2, #0 + add r7, r5, r1 + ldrb r2, [r7, r4] + add r1, r4, #0 + str r0, [sp, #4] + str r3, [sp, #8] + bl ov16_0223DFAC + add r6, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x10] + add r0, r6, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + mov r0, #0xc + add r3, sp, #0x14 + strb r0, [r3] + mov r0, #0xc0 + add r6, r4, #0 + mul r6, r0 + ldr r2, _02265304 ; =0x00002D74 + add r0, r5, r6 + ldrb r1, [r0, r2] + strb r1, [r3, #1] + add r1, r2, #0 + add r1, #0x18 + ldr r1, [r0, r1] + add r2, #0x1c + strh r1, [r3, #2] + ldr r0, [r0, r2] + add r1, r4, #0 + strh r0, [r3, #4] + ldrb r0, [r7, r4] + strb r0, [r3, #6] + add r0, r5, #0 + bl ov16_02253F7C + add r1, sp, #0x14 + ldrb r2, [r1, #7] + mov r3, #0x1f + lsl r0, r0, #0x18 + bic r2, r3 + lsr r3, r0, #0x18 + mov r0, #0x1f + and r0, r3 + orr r0, r2 + strb r0, [r1, #7] + mov r0, #0xb5 + lsl r0, r0, #6 + add r7, r5, r0 + ldrh r0, [r7, r6] + cmp r0, #0x1d + beq _0226525E + cmp r0, #0x20 + bne _02265278 +_0226525E: + ldr r0, _02265308 ; =0x00002D54 + add r1, r5, r6 + ldr r0, [r1, r0] + lsr r0, r0, #0x1f + bne _02265278 + add r0, sp, #0x14 + ldrb r1, [r0, #7] + mov r2, #0x60 + bic r1, r2 + mov r2, #0x40 + orr r1, r2 + strb r1, [r0, #7] + b _02265292 +_02265278: + add r3, sp, #0x14 + ldrb r2, [r3, #7] + mov r0, #0x60 + add r1, r5, r6 + bic r2, r0 + ldr r0, _0226530C ; =0x00002DBE + ldrb r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + lsl r0, r0, #0x1e + lsr r0, r0, #0x19 + orr r0, r2 + strb r0, [r3, #7] +_02265292: + ldr r0, [sp, #0x10] + ldr r1, [sp, #0xc] + bl sub_02075AD0 + mov r1, #0xc0 + mul r1, r4 + add r2, r5, r1 + ldr r1, _02265310 ; =0x00002DA4 + ldr r1, [r2, r1] + sub r0, r1, r0 + ldr r1, [sp, #0xc] + str r0, [sp, #0x1c] + ldr r0, [sp, #0x10] + add r1, r1, #1 + bl sub_02075AD0 + add r5, r0, #0 + ldr r0, [sp, #0x10] + ldr r1, [sp, #0xc] + bl sub_02075AD0 + sub r0, r5, r0 + str r0, [sp, #0x20] + ldrh r1, [r7, r6] + ldr r0, [sp, #4] + bl ov16_0223F9E0 + add r3, sp, #0x14 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1f + ldrb r1, [r3, #7] + mov r2, #0x80 + lsr r0, r0, #0x18 + bic r1, r2 + orr r0, r1 + strb r0, [r3, #7] + ldr r0, [sp, #4] + bl ov16_0223ED8C + str r0, [sp, #0x24] + ldr r0, [sp, #8] + add r1, sp, #0x14 + strb r0, [r1, #0x14] + mov r0, #0x18 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #0x14 + bl ov16_02264A04 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_02265300: .word 0x0000219C +_02265304: .word 0x00002D74 +_02265308: .word 0x00002D54 +_0226530C: .word 0x00002DBE +_02265310: .word 0x00002DA4 + thumb_func_end ov16_022651DC + + thumb_func_start ov16_02265314 +ov16_02265314: ; 0x02265314 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0xd + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02265314 + + thumb_func_start ov16_02265330 +ov16_02265330: ; 0x02265330 + push {r4, r5, r6, r7, lr} + sub sp, #0x54 + str r0, [sp, #4] + str r1, [sp, #8] + str r2, [sp, #0xc] + mov r0, #0 + add r1, sp, #0x28 + mov r2, #0x2c + add r6, r3, #0 + bl sub_020C4BB8 + ldr r0, [sp, #4] + bl ov16_0223DF10 + ldr r1, [sp, #0xc] + bl ov16_02252040 + mov r5, #0 + ldr r0, [sp, #4] + add r4, r5, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _02265380 +_02265360: + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov16_02259A28 + cmp r0, #0 + bne _02265374 + add r0, r4, #0 + bl sub_020787CC + orr r5, r0 +_02265374: + ldr r0, [sp, #4] + add r4, r4, #1 + bl ov16_0223DF1C + cmp r4, r0 + blt _02265360 +_02265380: + mov r1, #0xe + add r0, sp, #0x28 + strb r1, [r0] + strb r6, [r0, #1] + ldr r1, _02265680 ; =0x00003108 + ldr r0, [sp, #8] + ldrb r0, [r0, r1] + add r1, r0, #0 + orr r1, r5 + add r0, sp, #0x48 + strb r1, [r0, #9] + ldr r0, [sp, #4] + bl ov16_0223DF0C + mov r1, #2 + str r0, [sp, #0x20] + tst r0, r1 + beq _022653B6 + ldr r0, [sp, #0x20] + mov r1, #8 + tst r0, r1 + bne _022653B6 + ldr r0, [sp, #0xc] + mov r1, #1 + add r4, r0, #0 + and r4, r1 + b _022653B8 +_022653B6: + ldr r4, [sp, #0xc] +_022653B8: + ldr r0, [sp, #4] + add r1, r4, #0 + bl ov16_0223DF20 + str r0, [sp, #0x24] + mov r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0226544E + mov r0, #6 + add r1, r4, #0 + mul r1, r0 + ldr r0, [sp, #8] + add r5, sp, #0x28 + add r6, r0, r1 + mov r1, #0xa9 + ldr r0, [sp, #0x20] + lsl r1, r1, #2 + and r0, r1 + str r0, [sp, #0x1c] +_022653E2: + ldr r1, _02265684 ; =0x0000312C + ldr r0, [sp, #0x24] + ldrb r1, [r6, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265440 + ldr r1, _02265688 ; =0x000001EE + cmp r0, r1 + beq _02265440 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265428 + add r0, r4, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265422 + mov r0, #3 + strb r0, [r5, #8] + b _0226542C +_02265422: + mov r0, #1 + strb r0, [r5, #8] + b _0226542C +_02265428: + mov r0, #2 + strb r0, [r5, #8] +_0226542C: + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _02265436 + mov r0, #0 + b _0226543C +_02265436: + add r0, r4, #0 + bl sub_02075A10 +_0226543C: + strb r0, [r5, #2] + add r5, r5, #1 +_02265440: + ldr r0, [sp, #0x24] + add r6, r6, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _022653E2 +_0226544E: + ldr r0, [sp, #0x20] + mov r1, #0xc + and r0, r1 + cmp r0, #0xc + beq _0226546C + ldr r0, [sp, #0x20] + mov r1, #0x10 + tst r0, r1 + bne _0226546C + ldr r0, [sp, #0x20] + cmp r0, #0x4b + beq _0226546C + cmp r0, #0xcb + beq _0226546C + b _022655A4 +_0226546C: + ldr r0, [sp, #4] + ldr r1, [sp, #0xc] + bl ov16_0223E208 + cmp r0, #0 + beq _02265482 + ldr r0, [sp, #4] + mov r1, #2 + bl ov16_0223E1C4 + b _0226548A +_02265482: + ldr r0, [sp, #4] + mov r1, #3 + bl ov16_0223E1C4 +_0226548A: + add r4, r0, #0 + ldr r0, [sp, #4] + add r1, r4, #0 + bl ov16_0223DF20 + str r0, [sp, #0x10] + mov r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02265506 + mov r0, #6 + add r1, r4, #0 + mul r1, r0 + ldr r0, [sp, #8] + add r5, sp, #0x28 + add r4, r0, r1 +_022654AC: + ldr r1, _02265684 ; =0x0000312C + ldr r0, [sp, #0x10] + ldrb r1, [r4, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _022654F8 + ldr r1, _02265688 ; =0x000001EE + cmp r0, r1 + beq _022654F8 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _022654F2 + add r0, r6, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _022654EC + mov r0, #3 + strb r0, [r5, #0xe] + b _022654F6 +_022654EC: + mov r0, #1 + strb r0, [r5, #0xe] + b _022654F6 +_022654F2: + mov r0, #2 + strb r0, [r5, #0xe] +_022654F6: + add r5, r5, #1 +_022654F8: + ldr r0, [sp, #0x10] + add r4, r4, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _022654AC +_02265506: + ldr r0, [sp, #4] + ldr r1, [sp, #0xc] + bl ov16_0223E208 + cmp r0, #0 + beq _0226551C + ldr r0, [sp, #4] + mov r1, #4 + bl ov16_0223E1C4 + b _02265524 +_0226551C: + ldr r0, [sp, #4] + mov r1, #5 + bl ov16_0223E1C4 +_02265524: + add r4, r0, #0 + ldr r0, [sp, #4] + add r1, r4, #0 + bl ov16_0223DF20 + str r0, [sp, #0x14] + mov r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0226562A + mov r0, #6 + add r1, r4, #0 + mul r1, r0 + ldr r0, [sp, #8] + add r5, sp, #0x28 + add r4, r0, r1 + add r5, #3 +_02265548: + ldr r1, _02265684 ; =0x0000312C + ldr r0, [sp, #0x14] + ldrb r1, [r4, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265594 + ldr r1, _02265688 ; =0x000001EE + cmp r0, r1 + beq _02265594 + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0226558E + add r0, r6, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265588 + mov r0, #3 + strb r0, [r5, #0xe] + b _02265592 +_02265588: + mov r0, #1 + strb r0, [r5, #0xe] + b _02265592 +_0226558E: + mov r0, #2 + strb r0, [r5, #0xe] +_02265592: + add r5, r5, #1 +_02265594: + ldr r0, [sp, #0x14] + add r4, r4, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _02265548 + b _0226562A +_022655A4: + ldr r0, [sp, #4] + ldr r1, [sp, #0xc] + mov r2, #2 + bl ov16_0223E2A4 + add r4, r0, #0 + ldr r0, [sp, #4] + add r1, r4, #0 + bl ov16_0223DF20 + str r0, [sp, #0x18] + mov r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _0226562A + mov r0, #6 + add r1, r4, #0 + mul r1, r0 + ldr r0, [sp, #8] + add r5, sp, #0x28 + add r4, r0, r1 +_022655D0: + ldr r1, _02265684 ; =0x0000312C + ldr r0, [sp, #0x18] + ldrb r1, [r4, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _0226561C + ldr r1, _02265688 ; =0x000001EE + cmp r0, r1 + beq _0226561C + add r0, r6, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265616 + add r0, r6, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02265610 + mov r0, #3 + strb r0, [r5, #0xe] + b _0226561A +_02265610: + mov r0, #1 + strb r0, [r5, #0xe] + b _0226561A +_02265616: + mov r0, #2 + strb r0, [r5, #0xe] +_0226561A: + add r5, r5, #1 +_0226561C: + ldr r0, [sp, #0x18] + add r4, r4, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _022655D0 +_0226562A: + mov r5, #0 + add r6, sp, #0x28 + add r4, r6, #0 + add r7, r5, #0 +_02265632: + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + add r2, r5, #6 + add r3, r7, #0 + bl ov16_02252060 + strh r0, [r6, #0x14] + add r2, r5, #0 + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + add r2, #0x1f + mov r3, #0 + bl ov16_02252060 + strb r0, [r4, #0x1c] + add r2, r5, #0 + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + add r2, #0x27 + mov r3, #0 + bl ov16_02252060 + add r1, r4, #0 + add r1, #0x20 + add r5, r5, #1 + strb r0, [r1] + add r6, r6, #2 + add r4, r4, #1 + cmp r5, #4 + blt _02265632 + ldr r0, [sp, #0xc] + mov r1, #0xc0 + mul r1, r0 + ldr r0, [sp, #8] + add r3, sp, #0x28 + add r0, r0, r1 + ldr r1, _0226568C ; =0x00002D8C + b _02265690 + nop +_02265680: .word 0x00003108 +_02265684: .word 0x0000312C +_02265688: .word 0x000001EE +_0226568C: .word 0x00002D8C +_02265690: + ldr r2, [r0, r1] + strh r2, [r3, #0x24] + add r2, r1, #4 + ldr r2, [r0, r2] + strh r2, [r3, #0x26] + mov r2, #0x24 + ldrsh r2, [r3, r2] + cmp r2, #0 + beq _022656B8 + add r1, #0x20 + ldr r0, [r0, r1] + cmp r0, #0 + add r0, sp, #0x48 + beq _022656B2 + mov r1, #3 + strb r1, [r0, #8] + b _022656BE +_022656B2: + mov r1, #1 + strb r1, [r0, #8] + b _022656BE +_022656B8: + mov r1, #2 + add r0, sp, #0x48 + strb r1, [r0, #8] +_022656BE: + mov r0, #0x2c + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + mov r1, #1 + add r3, sp, #0x28 + bl ov16_02264A04 + add sp, #0x54 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02265330 + + thumb_func_start ov16_022656D4 +ov16_022656D4: ; 0x022656D4 + push {r0, r1, r2, r3} + push {r3, lr} + add r2, r1, #0 + mov r1, #4 + str r1, [sp] + mov r1, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov16_022656D4 + + thumb_func_start ov16_022656F0 +ov16_022656F0: ; 0x022656F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r2, [sp, #0xc] + str r0, [sp, #4] + str r1, [sp, #8] + bl ov16_0223DF10 + ldr r1, [sp, #0xc] + bl ov16_02252040 + mov r0, #0xf + add r2, sp, #0x14 + strb r0, [r2] + add r7, sp, #0x14 + ldr r1, [sp, #8] + ldr r0, [sp, #0xc] + add r5, r7, #0 + add r1, r1, r0 + ldr r0, _02265780 ; =0x0000219C + ldrb r0, [r1, r0] + mov r1, #0xc0 + strb r0, [r2, #1] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + mul r1, r0 + ldr r0, [sp, #8] + add r6, r0, r1 + add r4, r6, #0 +_0226572A: + ldr r0, _02265784 ; =0x00002D4C + ldr r1, _02265788 ; =0x00002D70 + ldrh r0, [r6, r0] + strh r0, [r7, #4] + ldr r0, _0226578C ; =0x00002D6C + ldrb r0, [r4, r0] + strb r0, [r5, #0xc] + ldr r0, _02265784 ; =0x00002D4C + ldrb r1, [r4, r1] + ldrh r0, [r6, r0] + bl sub_020790DC + strb r0, [r5, #0x10] + ldr r0, [sp, #0x10] + add r6, r6, #2 + add r0, r0, #1 + add r7, r7, #2 + add r4, r4, #1 + add r5, r5, #1 + str r0, [sp, #0x10] + cmp r0, #4 + blt _0226572A + mov r0, #0 + mvn r0, r0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + mov r3, #0 + bl ov16_02254A6C + add r1, sp, #0x14 + strh r0, [r1, #2] + mov r0, #0x14 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + mov r1, #1 + add r3, sp, #0x14 + bl ov16_02264A04 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02265780: .word 0x0000219C +_02265784: .word 0x00002D4C +_02265788: .word 0x00002D70 +_0226578C: .word 0x00002D6C + thumb_func_end ov16_022656F0 + + thumb_func_start ov16_02265790 +ov16_02265790: ; 0x02265790 + push {r0, r1, r2, r3} + push {r3, lr} + add r2, r1, #0 + mov r1, #4 + str r1, [sp] + mov r1, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov16_02265790 + + thumb_func_start ov16_022657AC +ov16_022657AC: ; 0x022657AC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r1, #0 + add r1, r3, #0 + add r4, r2, #0 + str r3, [sp, #0xc] + bl ov16_02252040 + ldr r0, [sp, #4] + bl ov16_0223DF0C + mov r2, #0x10 + add r1, sp, #0x1c + strb r2, [r1] + strh r4, [r1, #2] + mov r1, #2 + add r2, r0, #0 + and r2, r1 + beq _022657E6 + mov r1, #8 + tst r0, r1 + bne _022657E6 + cmp r2, #0 + beq _022657EE + ldr r0, [sp, #0xc] + cmp r0, #2 + blt _022657EE +_022657E6: + mov r1, #1 + add r0, sp, #0x1c + strb r1, [r0, #1] + b _022657F4 +_022657EE: + mov r1, #0 + add r0, sp, #0x1c + strb r1, [r0, #1] +_022657F4: + ldr r2, [sp, #8] + mov r0, #0 + str r0, [sp, #0x18] + ldr r1, _022658B8 ; =0x00002D54 + add r0, r2, #0 + add r7, r0, r1 + add r1, #0x6a + add r5, r0, r1 + mov r0, #3 + add r4, sp, #0x20 + str r0, [sp, #0x14] + str r0, [sp, #0x10] + mov r0, #4 + add r3, sp, #0x1c + add r4, #1 + mov ip, r0 +_02265814: + ldr r0, _022658BC ; =0x00002D8C + ldr r0, [r2, r0] + cmp r0, #0 + beq _02265882 + strh r0, [r3, #8] + ldr r0, _022658C0 ; =0x00002D90 + ldr r0, [r2, r0] + strh r0, [r3, #0xa] + ldrb r1, [r4] + mov r0, #4 + orr r0, r1 + strb r0, [r4] + mov r0, #0xb5 + lsl r0, r0, #6 + ldrh r0, [r2, r0] + cmp r0, #0x1d + beq _0226583A + cmp r0, #0x20 + bne _0226584E +_0226583A: + ldr r0, [r7, #0] + lsr r0, r0, #0x1f + bne _0226584E + ldrb r0, [r4] + ldr r1, [sp, #0x10] + bic r0, r1 + mov r1, #2 + orr r0, r1 + strb r0, [r4] + b _02265862 +_0226584E: + ldrb r6, [r4] + ldr r0, [sp, #0x14] + bic r6, r0 + ldrb r0, [r5] + lsl r0, r0, #0x1c + lsr r1, r0, #0x1c + mov r0, #3 + and r0, r1 + orr r0, r6 + strb r0, [r4] +_02265862: + ldr r1, [sp, #8] + ldr r0, [sp, #0x18] + add r1, r1, r0 + ldr r0, _022658C4 ; =0x0000219C + ldrb r0, [r1, r0] + strb r0, [r3, #4] + ldr r0, _022658C8 ; =0x00002DAC + ldr r0, [r2, r0] + cmp r0, #0 + beq _0226587C + mov r0, #3 + strb r0, [r3, #6] + b _0226588E +_0226587C: + mov r0, #1 + strb r0, [r3, #6] + b _0226588E +_02265882: + ldrb r1, [r4] + mov r0, ip + bic r1, r0 + strb r1, [r4] + mov r0, #2 + strb r0, [r3, #6] +_0226588E: + ldr r0, [sp, #0x18] + add r2, #0xc0 + add r0, r0, #1 + add r3, #8 + add r4, #8 + add r7, #0xc0 + add r5, #0xc0 + str r0, [sp, #0x18] + cmp r0, #4 + blt _02265814 + mov r0, #0x24 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + mov r1, #1 + add r3, sp, #0x1c + bl ov16_02264A04 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_022658B8: .word 0x00002D54 +_022658BC: .word 0x00002D8C +_022658C0: .word 0x00002D90 +_022658C4: .word 0x0000219C +_022658C8: .word 0x00002DAC + thumb_func_end ov16_022657AC + + thumb_func_start ov16_022658CC +ov16_022658CC: ; 0x022658CC + push {r0, r1, r2, r3} + push {r3, lr} + add r2, r1, #0 + mov r1, #4 + str r1, [sp] + mov r1, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov16_022658CC + + thumb_func_start ov16_022658E8 +ov16_022658E8: ; 0x022658E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r1, #0 + add r1, r2, #0 + str r2, [sp, #0xc] + bl ov16_02252040 + add r6, sp, #0x10 + mov r1, #0x11 + add r0, sp, #0x10 + strb r1, [r0] + mov r0, #0 + ldr r4, [sp, #8] + mov ip, r0 + ldr r1, _02265A5C ; =0x00002DCC + add r0, r4, #0 + add r7, r0, r1 + ldr r0, _02265A60 ; =0x0000312C + add r5, r6, #0 +_02265912: + ldr r2, [sp, #8] + mov r1, ip + add r2, r2, r1 + ldr r1, _02265A64 ; =0x0000219C + mov r3, #0 + ldrb r1, [r2, r1] + strb r1, [r6, #4] +_02265920: + add r1, r4, r3 + ldrb r2, [r1, r0] + add r1, r5, r3 + add r3, r3, #1 + strb r2, [r1, #8] + cmp r3, #6 + blt _02265920 + ldr r1, [r7, #0] + add r4, r4, #6 + lsl r1, r1, #0xa + lsr r2, r1, #0x1d + add r1, r6, #0 + add r1, #0x20 + strb r2, [r1] + mov r1, ip + add r1, r1, #1 + add r6, r6, #1 + add r5, r5, #6 + add r7, #0xc0 + mov ip, r1 + cmp r1, #4 + blt _02265912 + ldr r0, [sp, #4] + bl ov16_0223DF0C + cmp r0, #0x4a + bne _022659FE + mov r0, #1 + bl sub_020787CC + ldr r2, _02265A68 ; =0x00003108 + ldr r1, [sp, #8] + ldrb r1, [r1, r2] + tst r0, r1 + bne _02265984 + mov r0, #3 + bl sub_020787CC + ldr r2, _02265A68 ; =0x00003108 + ldr r1, [sp, #8] + ldrb r1, [r1, r2] + tst r0, r1 + bne _02265984 + mov r1, #1 + add r0, sp, #0x10 + strb r1, [r0, #1] + mov r1, #0 + strb r1, [r0, #2] + strb r1, [r0, #3] + b _02265A48 +_02265984: + mov r0, #1 + bl sub_020787CC + ldr r2, _02265A68 ; =0x00003108 + ldr r1, [sp, #8] + add r3, sp, #0x10 + ldrb r1, [r1, r2] + tst r0, r1 + bne _022659CA + mov r0, #0 + mov r2, #0xba + ldr r1, [sp, #8] + strb r0, [r3, #1] + lsl r2, r2, #6 + ldr r4, [r1, r2] + ldr r1, _02265A6C ; =0x200400C0 + tst r1, r4 + beq _022659B0 + mov r1, #1 + strb r1, [r3, #2] + strb r0, [r3, #3] + b _02265A48 +_022659B0: + ldr r1, [sp, #8] + sub r2, #0x10 + ldr r2, [r1, r2] + mov r1, #1 + lsl r1, r1, #0x18 + tst r1, r2 + strb r0, [r3, #2] + beq _022659C6 + mov r0, #1 + strb r0, [r3, #3] + b _02265A48 +_022659C6: + strb r0, [r3, #3] + b _02265A48 +_022659CA: + mov r0, #0 + mov r2, #3 + ldr r1, [sp, #8] + strb r0, [r3, #1] + lsl r2, r2, #0xc + ldr r4, [r1, r2] + ldr r1, _02265A6C ; =0x200400C0 + tst r1, r4 + beq _022659E4 + mov r1, #1 + strb r1, [r3, #2] + strb r0, [r3, #3] + b _02265A48 +_022659E4: + ldr r1, [sp, #8] + sub r2, #0x10 + ldr r2, [r1, r2] + mov r1, #1 + lsl r1, r1, #0x18 + tst r1, r2 + strb r0, [r3, #2] + beq _022659FA + mov r0, #1 + strb r0, [r3, #3] + b _02265A48 +_022659FA: + strb r0, [r3, #3] + b _02265A48 +_022659FE: + ldr r0, [sp, #4] + bl ov16_0223DF0C + cmp r0, #0 + bne _02265A3E + mov r2, #0xba + mov r0, #0 + add r3, sp, #0x10 + ldr r1, [sp, #8] + strb r0, [r3, #1] + lsl r2, r2, #6 + ldr r4, [r1, r2] + ldr r1, _02265A6C ; =0x200400C0 + tst r1, r4 + beq _02265A24 + mov r1, #1 + strb r1, [r3, #2] + strb r0, [r3, #3] + b _02265A48 +_02265A24: + ldr r1, [sp, #8] + sub r2, #0x10 + ldr r2, [r1, r2] + mov r1, #1 + lsl r1, r1, #0x18 + tst r1, r2 + strb r0, [r3, #2] + beq _02265A3A + mov r0, #1 + strb r0, [r3, #3] + b _02265A48 +_02265A3A: + strb r0, [r3, #3] + b _02265A48 +_02265A3E: + mov r1, #0 + add r0, sp, #0x10 + strb r1, [r0, #1] + strb r1, [r0, #2] + strb r1, [r0, #3] +_02265A48: + mov r0, #0x24 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + mov r1, #1 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02265A5C: .word 0x00002DCC +_02265A60: .word 0x0000312C +_02265A64: .word 0x0000219C +_02265A68: .word 0x00003108 +_02265A6C: .word 0x200400C0 + thumb_func_end ov16_022658E8 + + thumb_func_start ov16_02265A70 +ov16_02265A70: ; 0x02265A70 + push {r0, r1, r2, r3} + push {r3, lr} + add r2, r1, #0 + mov r1, #4 + str r1, [sp] + mov r1, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov16_02265A70 + + thumb_func_start ov16_02265A8C +ov16_02265A8C: ; 0x02265A8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r1, #0 + add r1, r2, #0 + str r2, [sp, #0xc] + add r4, r3, #0 + bl ov16_02252040 + mov r0, #0x12 + add r1, sp, #0x10 + strb r0, [r1] + ldr r0, [sp, #0xc] + add r7, sp, #0x10 + strb r0, [r1, #1] + ldr r0, [sp, #0x50] + strb r4, [r1, #2] + str r0, [sp, #0x30] + ldr r0, [sp, #0x54] + ldr r5, [sp, #8] + strb r0, [r1, #3] + ldr r1, _02265B04 ; =0x00003108 + ldr r0, [sp, #8] + mov r3, #0 + ldrb r1, [r0, r1] + add r0, sp, #0x30 + add r6, r7, #0 + strb r1, [r0, #4] + ldr r0, _02265B08 ; =0x0000312C +_02265AC8: + ldr r1, [sp, #8] + mov r4, #0 + add r2, r1, r3 + ldr r1, _02265B0C ; =0x0000219C + ldrb r1, [r2, r1] + strb r1, [r7, #4] +_02265AD4: + add r1, r5, r4 + ldrb r2, [r1, r0] + add r1, r6, r4 + add r4, r4, #1 + strb r2, [r1, #8] + cmp r4, #6 + blt _02265AD4 + add r3, r3, #1 + add r7, r7, #1 + add r5, r5, #6 + add r6, r6, #6 + cmp r3, #4 + blt _02265AC8 + mov r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + mov r1, #1 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02265B04: .word 0x00003108 +_02265B08: .word 0x0000312C +_02265B0C: .word 0x0000219C + thumb_func_end ov16_02265A8C + + thumb_func_start ov16_02265B10 +ov16_02265B10: ; 0x02265B10 + push {r0, r1, r2, r3} + push {r3, lr} + add r2, r1, #0 + mov r1, #4 + str r1, [sp] + mov r1, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov16_02265B10 + + thumb_func_start ov16_02265B2C +ov16_02265B2C: ; 0x02265B2C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r2, #0 + add r6, r0, #0 + add r0, r1, #0 + add r1, r5, #0 + add r4, r3, #0 + bl ov16_02252040 + mov r1, #0x13 + add r0, sp, #4 + strb r1, [r0] + ldr r1, [sp, #0x20] + strh r4, [r0, #2] + strb r1, [r0, #1] + ldr r0, [sp, #0x24] + mov r1, #1 + str r0, [sp, #8] + ldr r0, [sp, #0x28] + add r2, r5, #0 + str r0, [sp, #0xc] + mov r0, #0xc + str r0, [sp] + add r0, r6, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02265B2C + + thumb_func_start ov16_02265B68 +ov16_02265B68: ; 0x02265B68 + push {r4, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x14 + add r3, sp, #4 + strb r1, [r3] + ldr r1, [r2, #0x64] + add r4, r2, r1 + ldr r1, _02265B98 ; =0x0000219C + ldrb r1, [r4, r1] + strb r1, [r3, #1] + ldr r1, _02265B9C ; =0x00003044 + ldr r1, [r2, r1] + strh r1, [r3, #2] + mov r1, #4 + str r1, [sp] + ldr r2, [r2, #0x64] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r4, pc} + nop +_02265B98: .word 0x0000219C +_02265B9C: .word 0x00003044 + thumb_func_end ov16_02265B68 + + thumb_func_start ov16_02265BA0 +ov16_02265BA0: ; 0x02265BA0 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r3, r2, #0 + mov r1, #0x15 + strb r1, [r3] + mov r1, #0x24 + str r1, [sp] + ldr r2, [r4, #0x64] + mov r1, #1 + bl ov16_02264A04 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov16_02265BA0 + + thumb_func_start ov16_02265BBC +ov16_02265BBC: ; 0x02265BBC + push {r4, r5, r6, lr} + sub sp, #0x68 + mov r3, #0 + add r4, r1, #0 + str r3, [sp] + ldr r6, [r4, #0x64] + add r5, r0, #0 + str r6, [sp, #4] + ldr r6, [r4, #0x6c] + str r6, [sp, #8] + str r2, [sp, #0xc] + add r2, sp, #0x10 + bl ov16_02266B78 + mov r0, #0x58 + str r0, [sp] + ldr r2, [r4, #0x64] + add r0, r5, #0 + mov r1, #1 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x68 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02265BBC + + thumb_func_start ov16_02265BEC +ov16_02265BEC: ; 0x02265BEC + push {r4, r5, r6, lr} + sub sp, #0x68 + add r4, r3, #0 + mov r3, #0 + str r3, [sp] + ldr r6, [sp, #0x78] + str r4, [sp, #4] + str r6, [sp, #8] + str r2, [sp, #0xc] + add r2, sp, #0x10 + add r5, r0, #0 + bl ov16_02266B78 + mov r0, #0x58 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x68 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_02265BEC + + thumb_func_start ov16_02265C1C +ov16_02265C1C: ; 0x02265C1C + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x17 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02265C1C + + thumb_func_start ov16_02265C38 +ov16_02265C38: ; 0x02265C38 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r1, #0 + str r2, [sp, #8] + add r1, r2, #0 + add r3, r5, r2 + ldr r2, _02265CFC ; =0x0000219C + str r0, [sp, #4] + ldrb r2, [r3, r2] + bl ov16_0223DFAC + add r4, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + mov r0, #0x18 + add r3, sp, #0xc + strb r0, [r3] + ldr r0, [sp, #8] + mov r1, #0xc0 + add r4, r0, #0 + mul r4, r1 + ldr r0, _02265D00 ; =0x00002D74 + add r1, r5, r4 + ldrb r2, [r1, r0] + strb r2, [r3, #1] + add r2, r0, #0 + add r2, #0x18 + ldr r2, [r1, r2] + strh r2, [r3, #2] + add r2, r0, #0 + add r2, #0x1c + ldr r2, [r1, r2] + sub r0, #0x34 + strh r2, [r3, #4] + ldr r2, _02265D04 ; =0x0000215C + ldr r2, [r5, r2] + str r2, [sp, #0x14] + ldrh r0, [r1, r0] + cmp r0, #0x1d + beq _02265C9E + cmp r0, #0x20 + bne _02265CB0 +_02265C9E: + ldr r0, _02265D08 ; =0x00002D54 + add r1, r5, r4 + ldr r0, [r1, r0] + lsr r0, r0, #0x1f + bne _02265CB0 + mov r1, #2 + add r0, sp, #0xc + strb r1, [r0, #7] + b _02265CBE +_02265CB0: + ldr r0, _02265D0C ; =0x00002DBE + add r1, r5, r4 + ldrb r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r1, r0, #0x1c + add r0, sp, #0xc + strb r1, [r0, #7] +_02265CBE: + add r0, r7, #0 + add r1, r6, #0 + bl sub_02075AD0 + ldr r1, _02265D10 ; =0x00002DA4 + add r2, r5, r4 + ldr r1, [r2, r1] + sub r0, r1, r0 + str r0, [sp, #0x18] + add r0, r7, #0 + add r1, r6, #1 + bl sub_02075AD0 + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl sub_02075AD0 + sub r0, r4, r0 + str r0, [sp, #0x1c] + mov r0, #0x14 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #8] + mov r1, #1 + add r3, sp, #0xc + bl ov16_02264A04 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02265CFC: .word 0x0000219C +_02265D00: .word 0x00002D74 +_02265D04: .word 0x0000215C +_02265D08: .word 0x00002D54 +_02265D0C: .word 0x00002DBE +_02265D10: .word 0x00002DA4 + thumb_func_end ov16_02265C38 + + thumb_func_start ov16_02265D14 +ov16_02265D14: ; 0x02265D14 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r2, #0 + add r5, r1, #0 + str r3, [sp, #8] + ldr r2, _02265D90 ; =0x0000219C + add r3, r5, r4 + ldrb r2, [r3, r2] + add r1, r4, #0 + str r0, [sp, #4] + bl ov16_0223DFAC + add r6, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + mov r1, #0x19 + add r0, sp, #0xc + strb r1, [r0] + ldr r0, [sp, #8] + add r1, r6, #0 + str r0, [sp, #0x10] + add r0, r7, #0 + bl sub_02075AD0 + mov r1, #0xc0 + mul r1, r4 + add r2, r5, r1 + ldr r1, _02265D94 ; =0x00002DA4 + ldr r1, [r2, r1] + sub r0, r1, r0 + str r0, [sp, #0x14] + add r0, r7, #0 + add r1, r6, #1 + bl sub_02075AD0 + add r5, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl sub_02075AD0 + sub r0, r5, r0 + str r0, [sp, #0x18] + mov r0, #0x10 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #0xc + bl ov16_02264A04 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02265D90: .word 0x0000219C +_02265D94: .word 0x00002DA4 + thumb_func_end ov16_02265D14 + + thumb_func_start ov16_02265D98 +ov16_02265D98: ; 0x02265D98 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r0, [sp, #4] + add r0, r1, #0 + mov ip, r2 + mov r5, #0xb5 + mov r2, #0x1a + add r1, sp, #0xc + strb r2, [r1] + mov r3, #0xc0 + mov r2, ip + mul r3, r2 + add r2, r0, r3 + lsl r5, r5, #6 + ldrh r4, [r2, r5] + strh r4, [r1, #2] + add r4, r5, #0 + add r4, #0x26 + ldrb r2, [r2, r4] + add r5, #0x70 + lsl r2, r2, #0x1b + lsr r2, r2, #0x1b + strb r2, [r1, #8] + add r2, r0, r5 + mov r1, #1 + ldr r4, [r2, r3] + lsl r1, r1, #0x18 + tst r1, r4 + beq _02265DD6 + mov r4, #1 + b _02265DD8 +_02265DD6: + mov r4, #0 +_02265DD8: + add r1, sp, #0xc + strb r4, [r1, #9] + mov r1, #2 + ldr r4, [r2, r3] + lsl r1, r1, #0x14 + tst r1, r4 + beq _02265DEA + mov r4, #1 + b _02265DEC +_02265DEA: + mov r4, #0 +_02265DEC: + add r1, sp, #0xc + strb r4, [r1, #0xa] + ldr r4, [r2, r3] + mov r2, #2 + lsl r2, r2, #0x14 + tst r2, r4 + beq _02265E0A + ldr r2, _02265E94 ; =0x00002DFA + add r4, r0, r3 + ldrh r3, [r4, r2] + sub r2, #0x16 + strb r3, [r1, #1] + ldr r1, [r4, r2] + str r1, [sp, #0x10] + b _02265E1C +_02265E0A: + ldr r2, _02265E98 ; =0x00002DBE + add r4, r0, r3 + ldrb r3, [r4, r2] + sub r2, #0x16 + lsl r3, r3, #0x1c + lsr r3, r3, #0x1c + strb r3, [r1, #1] + ldr r1, [r4, r2] + str r1, [sp, #0x10] +_02265E1C: + mov r1, #0 + str r1, [sp, #8] + ldr r1, _02265E9C ; =0x00002D66 + add r7, sp, #0xc + add r3, r0, r1 + add r1, #0x58 + add r4, r7, #0 + add r5, r7, #0 + add r6, r0, r1 +_02265E2E: + mov r1, #0xb5 + lsl r1, r1, #6 + ldrh r1, [r0, r1] + strh r1, [r7, #0xc] + ldrb r1, [r3] + lsl r1, r1, #0x1a + lsr r1, r1, #0x1f + strb r1, [r4, #0x18] + ldrb r1, [r3] + lsl r1, r1, #0x1b + lsr r1, r1, #0x1b + strb r1, [r4, #0x1c] + ldr r1, _02265EA0 ; =0x00002DB0 + ldr r2, [r0, r1] + mov r1, #2 + lsl r1, r1, #0x14 + tst r1, r2 + beq _02265E5C + ldr r1, _02265E94 ; =0x00002DFA + ldrh r1, [r0, r1] + strb r1, [r4, #0x14] + ldr r1, _02265EA4 ; =0x00002DE4 + b _02265E66 +_02265E5C: + ldrb r1, [r6] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + strb r1, [r4, #0x14] + ldr r1, _02265EA8 ; =0x00002DA8 +_02265E66: + ldr r1, [r0, r1] + add r0, #0xc0 + str r1, [r5, #0x20] + ldr r1, [sp, #8] + add r7, r7, #2 + add r1, r1, #1 + add r3, #0xc0 + add r4, r4, #1 + add r5, r5, #4 + add r6, #0xc0 + str r1, [sp, #8] + cmp r1, #4 + blt _02265E2E + mov r0, #0x30 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #1 + mov r2, ip + add r3, sp, #0xc + bl ov16_02264A04 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02265E94: .word 0x00002DFA +_02265E98: .word 0x00002DBE +_02265E9C: .word 0x00002D66 +_02265EA0: .word 0x00002DB0 +_02265EA4: .word 0x00002DE4 +_02265EA8: .word 0x00002DA8 + thumb_func_end ov16_02265D98 + + thumb_func_start ov16_02265EAC +ov16_02265EAC: ; 0x02265EAC + push {r4, lr} + sub sp, #8 + mov r4, #0x1b + add r1, sp, #4 + strb r4, [r1] + strh r2, [r1, #2] + mov r1, #4 + str r1, [sp] + add r2, r3, #0 + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02265EAC + + thumb_func_start ov16_02265ECC +ov16_02265ECC: ; 0x02265ECC + push {r3, lr} + sub sp, #8 + mov r1, #0x1c + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02265ECC + + thumb_func_start ov16_02265EE8 +ov16_02265EE8: ; 0x02265EE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + mov ip, r1 + mov r3, #0x1d + add r1, sp, #8 + strb r3, [r1] + strb r2, [r1, #1] + ldr r3, [r0, #0x30] + mov r2, #0xc0 + mov r1, ip + mul r2, r1 + ldr r1, _02265FA0 ; =0x00002DB0 + add r2, r3, r2 + ldr r2, [r2, r1] + mov r1, #1 + lsl r1, r1, #0x18 + tst r1, r2 + beq _02265F10 + mov r2, #1 + b _02265F12 +_02265F10: + mov r2, #0 +_02265F12: + add r7, sp, #8 + add r1, sp, #8 + mov r3, #0 + strb r2, [r1, #2] + str r3, [sp, #4] + add r4, r7, #0 + add r5, r7, #0 +_02265F20: + ldr r1, [r0, #0x30] + add r2, r1, r3 + mov r1, #0xb5 + lsl r1, r1, #6 + ldrh r1, [r2, r1] + strh r1, [r7, #4] + ldr r1, [r0, #0x30] + add r2, r1, r3 + ldr r1, _02265FA4 ; =0x00002D66 + ldrb r1, [r2, r1] + lsl r1, r1, #0x1a + lsr r1, r1, #0x1f + strb r1, [r4, #0x10] + ldr r1, [r0, #0x30] + add r2, r1, r3 + ldr r1, _02265FA4 ; =0x00002D66 + ldrb r1, [r2, r1] + lsl r1, r1, #0x1b + lsr r1, r1, #0x1b + strb r1, [r4, #0x14] + ldr r1, [r0, #0x30] + add r6, r1, r3 + ldr r1, _02265FA0 ; =0x00002DB0 + ldr r2, [r6, r1] + mov r1, #2 + lsl r1, r1, #0x14 + tst r1, r2 + beq _02265F66 + ldr r1, _02265FA8 ; =0x00002DFA + ldrh r1, [r6, r1] + strb r1, [r4, #0xc] + ldr r1, [r0, #0x30] + add r2, r1, r3 + ldr r1, _02265FAC ; =0x00002DE4 + b _02265F76 +_02265F66: + ldr r1, _02265FB0 ; =0x00002DBE + ldrb r1, [r6, r1] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + strb r1, [r4, #0xc] + ldr r1, [r0, #0x30] + add r2, r1, r3 + ldr r1, _02265FB4 ; =0x00002DA8 +_02265F76: + ldr r1, [r2, r1] + add r3, #0xc0 + str r1, [r5, #0x18] + ldr r1, [sp, #4] + add r7, r7, #2 + add r1, r1, #1 + add r4, r4, #1 + add r5, r5, #4 + str r1, [sp, #4] + cmp r1, #4 + blt _02265F20 + mov r1, #0x28 + str r1, [sp] + mov r1, #1 + mov r2, ip + add r3, sp, #8 + bl ov16_02264A04 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_02265FA0: .word 0x00002DB0 +_02265FA4: .word 0x00002D66 +_02265FA8: .word 0x00002DFA +_02265FAC: .word 0x00002DE4 +_02265FB0: .word 0x00002DBE +_02265FB4: .word 0x00002DA8 + thumb_func_end ov16_02265EE8 + + thumb_func_start ov16_02265FB8 +ov16_02265FB8: ; 0x02265FB8 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + mov r3, #0x1e + add r1, sp, #4 + strb r3, [r1] + strb r2, [r1, #1] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r4, pc} + thumb_func_end ov16_02265FB8 + + thumb_func_start ov16_02265FD8 +ov16_02265FD8: ; 0x02265FD8 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + mov r3, #0x1f + add r1, sp, #4 + strb r3, [r1] + strb r2, [r1, #1] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r4, pc} + thumb_func_end ov16_02265FD8 + + thumb_func_start ov16_02265FF8 +ov16_02265FF8: ; 0x02265FF8 + push {r3, r4, r5, lr} + sub sp, #0x68 + add r4, r2, #0 + str r3, [sp] + str r4, [sp, #4] + str r4, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + add r2, sp, #0x10 + mov r3, #1 + add r5, r0, #0 + bl ov16_02266B78 + mov r0, #0x58 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x68 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02265FF8 + + thumb_func_start ov16_02266028 +ov16_02266028: ; 0x02266028 + push {r3, r4, r5, lr} + sub sp, #0x68 + add r4, r2, #0 + ldr r2, [sp, #0x78] + add r5, r0, #0 + str r2, [sp] + str r4, [sp, #4] + str r3, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + add r2, sp, #0x10 + mov r3, #1 + bl ov16_02266B78 + mov r0, #0x58 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x68 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02266028 + + thumb_func_start ov16_02266058 +ov16_02266058: ; 0x02266058 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r2, #0 + mov r2, #0x20 + add r0, sp, #4 + strb r2, [r0] + strb r3, [r0, #1] + ldr r0, _02266094 ; =0x00003122 + ldrsh r2, [r1, r0] + ldr r0, _02266098 ; =0x00002E4C + ldr r0, [r1, r0] + sub r1, r2, r0 + mov r0, #0x64 + mul r0, r1 + add r1, r2, #0 + bl sub_020E1F6C + add r1, sp, #4 + strh r0, [r1, #2] + mov r0, #4 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02266094: .word 0x00003122 +_02266098: .word 0x00002E4C + thumb_func_end ov16_02266058 + + thumb_func_start ov16_0226609C +ov16_0226609C: ; 0x0226609C + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + mov r1, #0x21 + add r0, sp, #4 + strb r1, [r0] + ldr r2, _022660E4 ; =0x00002E4C + strb r3, [r0, #1] + ldr r1, [r6, r2] + cmp r1, #0 + bne _022660BE + mov r1, #0xfa + lsl r1, r1, #2 + strh r1, [r0, #2] + b _022660D0 +_022660BE: + mov r0, #0xfa + lsl r0, r0, #2 + mul r0, r1 + add r1, r2, #4 + ldr r1, [r6, r1] + bl sub_020E2178 + add r1, sp, #4 + strh r0, [r1, #2] +_022660D0: + mov r0, #4 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022660E4: .word 0x00002E4C + thumb_func_end ov16_0226609C + + thumb_func_start ov16_022660E8 +ov16_022660E8: ; 0x022660E8 + push {r3, lr} + sub sp, #8 + mov r1, #0x22 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + thumb_func_end ov16_022660E8 + + thumb_func_start ov16_02266100 +ov16_02266100: ; 0x02266100 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + str r2, [sp, #4] + mov r2, #0x23 + add r1, sp, #8 + add r6, r0, #0 + strb r2, [r1] + mov r4, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _02266132 + add r5, sp, #8 +_0226611C: + ldr r0, _02266148 ; =0x0000219C + add r1, r7, r4 + ldrb r0, [r1, r0] + add r4, r4, #1 + strb r0, [r5, #4] + add r0, r6, #0 + add r5, r5, #1 + bl ov16_0223DF1C + cmp r4, r0 + blt _0226611C +_02266132: + mov r0, #8 + str r0, [sp] + ldr r2, [sp, #4] + add r0, r6, #0 + mov r1, #1 + add r3, sp, #8 + bl ov16_02264A04 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02266148: .word 0x0000219C + thumb_func_end ov16_02266100 + + thumb_func_start ov16_0226614C +ov16_0226614C: ; 0x0226614C + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x24 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_0226614C + + thumb_func_start ov16_02266168 +ov16_02266168: ; 0x02266168 + push {r0, r1, r2, r3} + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r4, r1, #0 + add r5, r0, #0 + bl ov16_0223DF10 + add r1, r4, #0 + bl ov16_02252040 + mov r1, #0x25 + add r0, sp, #4 + strb r1, [r0] + add r6, sp, #0x48 + add r3, sp, #8 + mov r2, #4 +_02266188: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02266188 + ldr r0, [r6, #0] + mov r1, #1 + str r0, [r3, #0] + mov r0, #0x28 + str r0, [sp] + add r0, r5, #0 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0x2c + pop {r3, r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov16_02266168 + + thumb_func_start ov16_022661B0 +ov16_022661B0: ; 0x022661B0 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #1 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_022661B0 + + thumb_func_start ov16_022661CC +ov16_022661CC: ; 0x022661CC + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r1, #0 + ldr r1, _022662E8 ; =0x0000219C + add r4, r2, #0 + add r7, r5, r1 + ldrb r2, [r7, r4] + add r1, r4, #0 + str r0, [sp, #4] + bl ov16_0223DFAC + add r6, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + mov r0, #0x26 + add r3, sp, #0x10 + strb r0, [r3] + mov r0, #0xc0 + add r6, r4, #0 + mul r6, r0 + ldr r2, _022662EC ; =0x00002D74 + add r0, r5, r6 + ldrb r1, [r0, r2] + strb r1, [r3, #1] + add r1, r2, #0 + add r1, #0x18 + ldr r1, [r0, r1] + add r2, #0x1c + strh r1, [r3, #2] + ldr r0, [r0, r2] + add r1, r4, #0 + strh r0, [r3, #4] + ldrb r0, [r7, r4] + strb r0, [r3, #6] + add r0, r5, #0 + bl ov16_02253F7C + add r1, sp, #0x10 + ldrb r2, [r1, #7] + mov r3, #0x1f + lsl r0, r0, #0x18 + bic r2, r3 + lsr r3, r0, #0x18 + mov r0, #0x1f + and r0, r3 + orr r0, r2 + strb r0, [r1, #7] + mov r0, #0xb5 + lsl r0, r0, #6 + add r7, r5, r0 + ldrh r0, [r7, r6] + cmp r0, #0x1d + beq _0226624C + cmp r0, #0x20 + bne _02266266 +_0226624C: + ldr r0, _022662F0 ; =0x00002D54 + add r1, r5, r6 + ldr r0, [r1, r0] + lsr r0, r0, #0x1f + bne _02266266 + add r0, sp, #0x10 + ldrb r1, [r0, #7] + mov r2, #0x60 + bic r1, r2 + mov r2, #0x40 + orr r1, r2 + strb r1, [r0, #7] + b _02266280 +_02266266: + add r3, sp, #0x10 + ldrb r2, [r3, #7] + mov r0, #0x60 + add r1, r5, r6 + bic r2, r0 + ldr r0, _022662F4 ; =0x00002DBE + ldrb r0, [r1, r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + lsl r0, r0, #0x1e + lsr r0, r0, #0x19 + orr r0, r2 + strb r0, [r3, #7] +_02266280: + ldr r0, [sp, #0xc] + ldr r1, [sp, #8] + bl sub_02075AD0 + mov r1, #0xc0 + mul r1, r4 + add r2, r5, r1 + ldr r1, _022662F8 ; =0x00002DA4 + ldr r1, [r2, r1] + sub r0, r1, r0 + ldr r1, [sp, #8] + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + add r1, r1, #1 + bl sub_02075AD0 + add r5, r0, #0 + ldr r0, [sp, #0xc] + ldr r1, [sp, #8] + bl sub_02075AD0 + sub r0, r5, r0 + str r0, [sp, #0x1c] + ldrh r1, [r7, r6] + ldr r0, [sp, #4] + bl ov16_0223F9E0 + add r3, sp, #0x10 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1f + ldrb r1, [r3, #7] + mov r2, #0x80 + lsr r0, r0, #0x18 + bic r1, r2 + orr r0, r1 + strb r0, [r3, #7] + ldr r0, [sp, #4] + bl ov16_0223ED8C + str r0, [sp, #0x20] + mov r0, #0x14 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_022662E8: .word 0x0000219C +_022662EC: .word 0x00002D74 +_022662F0: .word 0x00002D54 +_022662F4: .word 0x00002DBE +_022662F8: .word 0x00002DA4 + thumb_func_end ov16_022661CC + + thumb_func_start ov16_022662FC +ov16_022662FC: ; 0x022662FC + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r6, r1, #0 + str r2, [sp, #8] + mov r1, #0x27 + add r2, sp, #0x10 + strb r1, [r2] + ldrb r1, [r2, #1] + mov r3, #0xf + str r0, [sp, #4] + bic r1, r3 + ldr r3, [sp, #8] + add r4, r6, r3 + ldr r3, _02266438 ; =0x0000219C + ldrb r4, [r4, r3] + mov r3, #0xf + and r3, r4 + orr r1, r3 + strb r1, [r2, #1] + ldr r1, [sp, #8] + mov r3, #0xc0 + mul r3, r1 + ldrb r4, [r2, #1] + mov r1, #0xf0 + str r3, [sp, #0xc] + bic r4, r1 + add r1, r3, #0 + add r3, r6, r1 + ldr r1, _0226643C ; =0x00002DCC + ldr r5, [r3, r1] + lsl r5, r5, #0x1a + lsr r5, r5, #0x1c + lsl r5, r5, #0x18 + lsr r5, r5, #0x18 + lsl r5, r5, #0x1c + lsr r5, r5, #0x18 + orr r4, r5 + strb r4, [r2, #1] + add r4, r1, #0 + sub r4, #0x40 + ldr r4, [r3, r4] + sub r1, #0x14 + strh r4, [r2, #2] + ldrh r1, [r3, r1] + strh r1, [r2, #0xc] + ldr r1, [sp, #8] + bl ov16_0223E208 + lsl r0, r0, #3 + add r1, r6, r0 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r7, _02266440 ; =0x00002D6C + lsl r0, r0, #3 + lsr r0, r0, #0x1a + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + add r2, r6, r0 + ldr r0, _02266444 ; =0x00002D66 + ldrb r1, [r2, r0] + add r0, r0, #1 + lsl r1, r1, #0x1b + lsr r3, r1, #0x1b + add r1, sp, #0x10 + strh r3, [r1, #0x20] + ldrb r0, [r2, r0] + ldr r1, [sp, #8] + mov r2, #0xc0 + mul r2, r1 + add r1, r6, r2 + mov ip, r2 + add r2, sp, #0x10 + str r0, [sp, #0x34] + mov r0, #0 + add r3, r1, #0 + add r4, r2, #0 +_02266396: + ldr r5, _02266448 ; =0x00002D4C + add r0, r0, #1 + ldrh r5, [r1, r5] + add r1, r1, #2 + strh r5, [r2, #0xe] + ldrb r5, [r3, r7] + add r2, r2, #2 + add r3, r3, #1 + strb r5, [r4, #0x16] + add r4, r4, #1 + cmp r0, #4 + blt _02266396 + add r1, sp, #0x10 + mov r0, #2 + ldrsh r0, [r1, r0] + cmp r0, #0 + beq _022663CE + mov r0, ip + add r3, r6, r0 + ldr r0, _0226644C ; =0x00002DAC + ldr r1, _02266450 ; =0xFFFFF0FF + ldr r2, [r3, r0] + add r0, r0, #4 + and r1, r2 + str r1, [sp, #0x14] + ldr r0, [r3, r0] + str r0, [sp, #0x2c] + b _022663DC +_022663CE: + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + add r1, r6, r0 + ldr r0, _02266454 ; =0x00002DB0 + ldr r0, [r1, r0] + str r0, [sp, #0x2c] +_022663DC: + mov r1, #0x85 + lsl r1, r1, #6 + mov r0, #1 + ldr r2, [r6, r1] + lsl r0, r0, #0x1a + tst r0, r2 + add r0, sp, #0x10 + beq _022663FA + mov r2, #1 + strh r2, [r0, #0x2a] + ldr r2, [r6, r1] + ldr r0, _02266458 ; =0xFBFFFFFF + and r0, r2 + str r0, [r6, r1] + b _022663FE +_022663FA: + mov r1, #0 + strh r1, [r0, #0x2a] +_022663FE: + mov r1, #0x85 + lsl r1, r1, #6 + mov r0, #2 + ldr r2, [r6, r1] + lsl r0, r0, #0x1a + tst r0, r2 + add r0, sp, #0x10 + beq _0226641E + mov r2, #1 + strh r2, [r0, #0x28] + strh r2, [r0, #0x2a] + ldr r2, [r6, r1] + ldr r0, _0226645C ; =0xF7FFFFFF + and r0, r2 + str r0, [r6, r1] + b _02266422 +_0226641E: + mov r1, #0 + strh r1, [r0, #0x28] +_02266422: + mov r0, #0x2c + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #8] + mov r1, #1 + add r3, sp, #0x10 + bl ov16_02264A04 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_02266438: .word 0x0000219C +_0226643C: .word 0x00002DCC +_02266440: .word 0x00002D6C +_02266444: .word 0x00002D66 +_02266448: .word 0x00002D4C +_0226644C: .word 0x00002DAC +_02266450: .word 0xFFFFF0FF +_02266454: .word 0x00002DB0 +_02266458: .word 0xFBFFFFFF +_0226645C: .word 0xF7FFFFFF + thumb_func_end ov16_022662FC + + thumb_func_start ov16_02266460 +ov16_02266460: ; 0x02266460 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x28 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02266460 + + thumb_func_start ov16_0226647C +ov16_0226647C: ; 0x0226647C + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x29 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_0226647C + + thumb_func_start ov16_02266498 +ov16_02266498: ; 0x02266498 + push {r3, r4, r5, lr} + sub sp, #8 + mov r5, #0x2a + add r4, sp, #4 + strb r5, [r4] + strh r3, [r4, #2] + mov r3, #0xc0 + mul r3, r2 + add r3, r1, r3 + ldr r1, _022664C0 ; =0x00002D67 + ldrb r1, [r3, r1] + add r3, sp, #4 + strb r1, [r4, #1] + mov r1, #4 + str r1, [sp] + mov r1, #1 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022664C0: .word 0x00002D67 + thumb_func_end ov16_02266498 + + thumb_func_start ov16_022664C4 +ov16_022664C4: ; 0x022664C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r7, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov16_0223DF10 + add r1, r5, #0 + bl ov16_02252040 + mov r1, #0x2b + add r0, sp, #4 + strb r1, [r0] + strh r4, [r0, #2] + strb r6, [r0, #1] + mov r0, #4 + str r0, [sp] + add r0, r7, #0 + mov r1, #1 + add r2, r5, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_022664C4 + + thumb_func_start ov16_022664F8 +ov16_022664F8: ; 0x022664F8 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + mov r5, #0x2c + add r1, sp, #4 + strb r5, [r1] + strb r2, [r1, #1] + strb r3, [r1, #2] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022664F8 + + thumb_func_start ov16_0226651C +ov16_0226651C: ; 0x0226651C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + mov r1, #0x2d + add r3, sp, #4 + strb r1, [r3] + mov r1, #0xc0 + add r6, r7, #0 + mul r6, r1 + ldr r1, [r0, #0x30] + add r2, r1, r6 + mov r1, #0xb5 + lsl r1, r1, #6 + ldrh r2, [r2, r1] + strh r2, [r3, #2] + ldr r2, [r0, #0x30] + add r4, r2, r6 + add r2, r1, #0 + add r2, #0x26 + ldrb r2, [r4, r2] + lsl r2, r2, #0x1a + lsr r2, r2, #0x1f + strb r2, [r3, #5] + ldr r2, [r0, #0x30] + add r5, r2, r6 + add r2, r1, #0 + add r2, #0x70 + ldr r4, [r5, r2] + mov r2, #2 + lsl r2, r2, #0x14 + tst r2, r4 + beq _02266570 + add r2, r1, #0 + add r2, #0xba + ldrh r2, [r5, r2] + add r1, #0xa4 + strb r2, [r3, #4] + ldr r2, [r0, #0x30] + add r2, r2, r6 + ldr r1, [r2, r1] + str r1, [sp, #0xc] + b _02266586 +_02266570: + add r2, r1, #0 + add r2, #0x7e + ldrb r2, [r5, r2] + add r1, #0x68 + lsl r2, r2, #0x1c + lsr r2, r2, #0x1c + strb r2, [r3, #4] + ldr r2, [r0, #0x30] + add r2, r2, r6 + ldr r1, [r2, r1] + str r1, [sp, #0xc] +_02266586: + ldr r1, [r0, #0x30] + add r3, sp, #4 + add r2, r1, r6 + ldr r1, _022665A8 ; =0x00002D66 + ldrb r1, [r2, r1] + lsl r1, r1, #0x1b + lsr r2, r1, #0x1b + add r1, sp, #4 + strb r2, [r1, #1] + mov r1, #0xc + str r1, [sp] + mov r1, #1 + add r2, r7, #0 + bl ov16_02264A04 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022665A8: .word 0x00002D66 + thumb_func_end ov16_0226651C + + thumb_func_start ov16_022665AC +ov16_022665AC: ; 0x022665AC + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x2e + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_022665AC + + thumb_func_start ov16_022665C8 +ov16_022665C8: ; 0x022665C8 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x2f + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_022665C8 + + thumb_func_start ov16_022665E4 +ov16_022665E4: ; 0x022665E4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + ldr r1, [r5, #0x30] + add r2, sp, #4 + mov r3, #0x30 + bl ov16_02266CF0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov16_022665E4 + + thumb_func_start ov16_0226660C +ov16_0226660C: ; 0x0226660C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + ldr r1, [r5, #0x30] + add r2, sp, #4 + mov r3, #0x31 + bl ov16_02266CF0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov16_0226660C + + thumb_func_start ov16_02266634 +ov16_02266634: ; 0x02266634 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + ldr r1, [r5, #0x30] + add r2, sp, #4 + mov r3, #0x32 + bl ov16_02266CF0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov16_02266634 + + thumb_func_start ov16_0226665C +ov16_0226665C: ; 0x0226665C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + ldr r1, [r5, #0x30] + add r2, sp, #4 + mov r3, #0x33 + bl ov16_02266CF0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov16_0226665C + + thumb_func_start ov16_02266684 +ov16_02266684: ; 0x02266684 + push {r3, lr} + sub sp, #8 + mov r1, #0x34 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02266684 + + thumb_func_start ov16_022666A0 +ov16_022666A0: ; 0x022666A0 + push {r3, lr} + sub sp, #8 + mov r1, #0x35 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_022666A0 + + thumb_func_start ov16_022666BC +ov16_022666BC: ; 0x022666BC + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + mov r5, #0x36 + add r1, sp, #4 + strb r5, [r1] + strb r2, [r1, #1] + strh r3, [r1, #2] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022666BC + + thumb_func_start ov16_022666E0 +ov16_022666E0: ; 0x022666E0 + push {r4, r5, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + bl ov16_0223DF0C + mov r2, #0x37 + add r1, sp, #4 + strb r2, [r1] + mov r2, #0 + strh r2, [r1, #2] + mov r1, #4 + tst r0, r1 + beq _02266734 + bl sub_0202F250 + cmp r0, #1 + bne _02266734 + ldr r0, _02266738 ; =0x0000240C + ldr r1, [r5, r0] + mov r0, #0x10 + tst r0, r1 + bne _02266734 + add r0, r5, #0 + add r1, sp, #8 + bl ov16_0223F58C + add r1, sp, #4 + strh r0, [r1, #2] + ldrh r0, [r1, #2] + cmp r0, #0x1c + blo _02266724 + bl sub_02022974 +_02266724: + mov r0, #0x20 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 +_02266734: + add sp, #0x24 + pop {r4, r5, pc} + ; .align 2, 0 +_02266738: .word 0x0000240C + thumb_func_end ov16_022666E0 + + thumb_func_start ov16_0226673C +ov16_0226673C: ; 0x0226673C + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + str r0, [sp, #4] + add r3, r1, #0 + mov r1, #0x38 + add r0, sp, #0xc + strb r1, [r0] + mov r0, #0 + add r7, sp, #0xc + str r2, [sp, #8] + ldr r4, _022667D4 ; =0x00002D66 + mov ip, r0 + add r0, r3, r4 + add r4, #0x58 + add r1, r7, #0 + add r2, r7, #0 + add r6, r3, r4 +_0226675E: + mov r4, #0xb5 + lsl r4, r4, #6 + ldrh r4, [r3, r4] + strh r4, [r7, #0x18] + ldrb r4, [r0] + lsl r4, r4, #0x1a + lsr r5, r4, #0x1f + add r4, r1, #0 + add r4, #0x24 + strb r5, [r4] + ldrb r4, [r0] + lsl r4, r4, #0x1b + lsr r5, r4, #0x1b + add r4, r1, #0 + add r4, #0x28 + strb r5, [r4] + ldr r4, _022667D8 ; =0x00002DB0 + ldr r5, [r3, r4] + mov r4, #2 + lsl r4, r4, #0x14 + tst r4, r5 + beq _02266798 + ldr r4, _022667DC ; =0x00002DFA + ldrh r5, [r3, r4] + add r4, r1, #0 + add r4, #0x20 + strb r5, [r4] + ldr r4, _022667E0 ; =0x00002DE4 + b _022667A6 +_02266798: + ldrb r4, [r6] + lsl r4, r4, #0x1c + lsr r5, r4, #0x1c + add r4, r1, #0 + add r4, #0x20 + strb r5, [r4] + ldr r4, _022667E4 ; =0x00002DA8 +_022667A6: + ldr r4, [r3, r4] + add r3, #0xc0 + str r4, [r2, #0x2c] + mov r4, ip + add r4, r4, #1 + add r7, r7, #2 + add r0, #0xc0 + add r1, r1, #1 + add r2, r2, #4 + add r6, #0xc0 + mov ip, r4 + cmp r4, #4 + blt _0226675E + mov r0, #0x58 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #8] + mov r1, #1 + add r3, sp, #0xc + bl ov16_02264A04 + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022667D4: .word 0x00002D66 +_022667D8: .word 0x00002DB0 +_022667DC: .word 0x00002DFA +_022667E0: .word 0x00002DE4 +_022667E4: .word 0x00002DA8 + thumb_func_end ov16_0226673C + + thumb_func_start ov16_022667E8 +ov16_022667E8: ; 0x022667E8 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x39 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_022667E8 + + thumb_func_start ov16_02266804 +ov16_02266804: ; 0x02266804 + push {r3, lr} + sub sp, #8 + add r2, r1, #0 + mov r1, #0x3a + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02266804 + + thumb_func_start ov16_02266820 +ov16_02266820: ; 0x02266820 + push {r3, lr} + sub sp, #8 + mov r1, #0x3b + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02266820 + + thumb_func_start ov16_0226683C +ov16_0226683C: ; 0x0226683C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r6, r0, #0 + add r5, r1, #0 + bl ov16_0223DF0C + str r0, [sp, #4] + mov r1, #0x3c + add r0, sp, #8 + strb r1, [r0] + mov r4, #0 + strb r4, [r0, #1] + strh r4, [r0, #2] + add r0, r6, #0 + bl ov16_0223DF1C + cmp r0, #0 + ble _02266884 + add r7, sp, #8 +_02266862: + ldr r0, _022668C8 ; =0x000021A8 + ldr r0, [r5, r0] + cmp r0, #0x10 + bne _02266876 + add r0, r4, #0 + bl sub_020787CC + ldrb r1, [r7, #1] + orr r0, r1 + strb r0, [r7, #1] +_02266876: + add r0, r6, #0 + add r5, #0x10 + add r4, r4, #1 + bl ov16_0223DF1C + cmp r4, r0 + blt _02266862 +_02266884: + ldr r0, [sp, #4] + mov r1, #4 + tst r0, r1 + beq _022668B4 + bl sub_0202F250 + cmp r0, #1 + bne _022668B4 + ldr r0, _022668CC ; =0x0000240C + ldr r1, [r6, r0] + mov r0, #0x10 + tst r0, r1 + bne _022668B4 + add r0, r6, #0 + add r1, sp, #0xc + bl ov16_0223F58C + add r1, sp, #8 + strh r0, [r1, #2] + ldrh r0, [r1, #2] + cmp r0, #0x1c + blo _022668B4 + bl sub_02022974 +_022668B4: + mov r0, #0x20 + str r0, [sp] + add r0, r6, #0 + mov r1, #1 + mov r2, #0 + add r3, sp, #8 + bl ov16_02264A04 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022668C8: .word 0x000021A8 +_022668CC: .word 0x0000240C + thumb_func_end ov16_0226683C + + thumb_func_start ov16_022668D0 +ov16_022668D0: ; 0x022668D0 + push {r3, r4, lr} + sub sp, #0x24 + add r4, r0, #0 + bl ov16_0223DF0C + mov r2, #0x3d + add r1, sp, #4 + strb r2, [r1] + mov r2, #0 + strh r2, [r1, #2] + mov r1, #4 + tst r0, r1 + beq _02266912 + bl sub_0202F250 + cmp r0, #1 + bne _02266912 + ldr r0, _02266928 ; =0x0000240C + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + bne _02266912 + add r0, r4, #0 + add r1, sp, #8 + bl ov16_0223F58C + add r1, sp, #4 + strh r0, [r1, #2] + ldrh r0, [r1, #2] + cmp r0, #0x1c + blo _02266912 + bl sub_02022974 +_02266912: + mov r0, #0x20 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0x24 + pop {r3, r4, pc} + nop +_02266928: .word 0x0000240C + thumb_func_end ov16_022668D0 + + thumb_func_start ov16_0226692C +ov16_0226692C: ; 0x0226692C + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + str r0, [sp, #4] + add r3, r1, #0 + mov r1, #0x3e + add r0, sp, #0xc + strb r1, [r0] + mov r0, #0 + add r7, sp, #0xc + str r2, [sp, #8] + ldr r4, _022669C4 ; =0x00002D66 + mov ip, r0 + add r0, r3, r4 + add r4, #0x58 + add r1, r7, #0 + add r2, r7, #0 + add r6, r3, r4 +_0226694E: + mov r4, #0xb5 + lsl r4, r4, #6 + ldrh r4, [r3, r4] + strh r4, [r7, #0x18] + ldrb r4, [r0] + lsl r4, r4, #0x1a + lsr r5, r4, #0x1f + add r4, r1, #0 + add r4, #0x24 + strb r5, [r4] + ldrb r4, [r0] + lsl r4, r4, #0x1b + lsr r5, r4, #0x1b + add r4, r1, #0 + add r4, #0x28 + strb r5, [r4] + ldr r4, _022669C8 ; =0x00002DB0 + ldr r5, [r3, r4] + mov r4, #2 + lsl r4, r4, #0x14 + tst r4, r5 + beq _02266988 + ldr r4, _022669CC ; =0x00002DFA + ldrh r5, [r3, r4] + add r4, r1, #0 + add r4, #0x20 + strb r5, [r4] + ldr r4, _022669D0 ; =0x00002DE4 + b _02266996 +_02266988: + ldrb r4, [r6] + lsl r4, r4, #0x1c + lsr r5, r4, #0x1c + add r4, r1, #0 + add r4, #0x20 + strb r5, [r4] + ldr r4, _022669D4 ; =0x00002DA8 +_02266996: + ldr r4, [r3, r4] + add r3, #0xc0 + str r4, [r2, #0x2c] + mov r4, ip + add r4, r4, #1 + add r7, r7, #2 + add r0, #0xc0 + add r1, r1, #1 + add r2, r2, #4 + add r6, #0xc0 + mov ip, r4 + cmp r4, #4 + blt _0226694E + mov r0, #0x58 + str r0, [sp] + ldr r0, [sp, #4] + ldr r2, [sp, #8] + mov r1, #1 + add r3, sp, #0xc + bl ov16_02264A04 + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022669C4: .word 0x00002D66 +_022669C8: .word 0x00002DB0 +_022669CC: .word 0x00002DFA +_022669D0: .word 0x00002DE4 +_022669D4: .word 0x00002DA8 + thumb_func_end ov16_0226692C + + thumb_func_start ov16_022669D8 +ov16_022669D8: ; 0x022669D8 + push {r3, r4, r5, lr} + sub sp, #8 + mov r3, #0x3f + add r4, sp, #4 + strb r3, [r4] + ldr r3, _02266A14 ; =0x0000216C + ldr r5, [r1, r3] + mov r1, #2 + add r3, r5, #0 + tst r3, r1 + beq _022669F2 + strb r1, [r4, #1] + b _02266A02 +_022669F2: + mov r1, #4 + tst r1, r5 + beq _022669FE + mov r1, #1 + strb r1, [r4, #1] + b _02266A02 +_022669FE: + mov r1, #0 + strb r1, [r4, #1] +_02266A02: + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02266A14: .word 0x0000216C + thumb_func_end ov16_022669D8 + + thumb_func_start ov16_02266A18 +ov16_02266A18: ; 0x02266A18 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + mov r3, #0x40 + add r1, sp, #4 + strb r3, [r1] + strh r2, [r1, #2] + mov r1, #4 + str r1, [sp] + mov r1, #1 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r4, pc} + thumb_func_end ov16_02266A18 + + thumb_func_start ov16_02266A38 +ov16_02266A38: ; 0x02266A38 + push {r3, r4, r5, lr} + sub sp, #0x28 + add r5, r0, #0 + bl ov16_0223DF0C + add r4, r0, #0 + mov r1, #0x41 + add r0, sp, #4 + strb r1, [r0] + add r0, r5, #0 + bl ov16_0223F438 + str r0, [sp, #8] + mov r1, #0 + add r0, sp, #4 + strh r1, [r0, #2] + mov r0, #4 + tst r0, r4 + beq _02266A86 + bl sub_0202F250 + cmp r0, #1 + bne _02266A86 + ldr r0, _02266A9C ; =0x0000240C + ldr r1, [r5, r0] + mov r0, #0x10 + tst r0, r1 + bne _02266A86 + add r0, r5, #0 + add r1, sp, #0xc + bl ov16_0223F58C + add r1, sp, #4 + strh r0, [r1, #2] + ldrh r0, [r1, #2] + cmp r0, #0x1c + bls _02266A86 + bl sub_02022974 +_02266A86: + mov r0, #0x24 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #0x28 + pop {r3, r4, r5, pc} + nop +_02266A9C: .word 0x0000240C + thumb_func_end ov16_02266A38 + + thumb_func_start ov16_02266AA0 +ov16_02266AA0: ; 0x02266AA0 + push {r3, lr} + sub sp, #8 + mov r1, #0x42 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp] + mov r1, #1 + mov r2, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02266AA0 + + thumb_func_start ov16_02266ABC +ov16_02266ABC: ; 0x02266ABC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r0, sp, #4 + add r4, r1, #0 + strb r2, [r0] + bl sub_0203608C + add r1, sp, #4 + strb r0, [r1, #1] + mov r0, #4 + str r0, [sp] + add r0, r5, #0 + mov r1, #2 + add r2, r4, #0 + add r3, sp, #4 + bl ov16_02264A04 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02266ABC + + thumb_func_start ov16_02266AE4 +ov16_02266AE4: ; 0x02266AE4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #1 + ldrb r3, [r5, #3] + str r1, [sp] + ldrb r2, [r5] + ldrb r1, [r5, #2] + lsl r3, r3, #8 + add r4, r0, #0 + orr r1, r3 + ldrb r6, [r5, #1] + cmp r2, #0 + bne _02266B1E + mov r2, #0 + cmp r1, #0 + ble _02266B72 + mov r7, #0x23 + lsl r3, r6, #8 + lsl r7, r7, #8 +_02266B0A: + add r0, r5, r2 + ldr r6, [r4, #0x30] + ldrb r0, [r0, #4] + add r6, r3, r6 + add r6, r2, r6 + add r2, r2, #1 + strb r0, [r6, r7] + cmp r2, r1 + blt _02266B0A + b _02266B72 +_02266B1E: + cmp r2, #1 + bne _02266B56 + lsl r0, r6, #2 + add r0, r4, r0 + mov r3, #0x6a + ldr r4, [r0, #0x34] + lsl r3, r3, #2 + ldrb r2, [r4, r3] + cmp r2, #0 + bne _02266B50 + ldr r2, [sp] + strb r2, [r4, r3] + mov r2, #0 + cmp r1, #0 + ble _02266B72 +_02266B3C: + add r3, r5, r2 + ldrb r4, [r3, #4] + ldr r3, [r0, #0x34] + add r3, r3, r2 + add r3, #0x94 + add r2, r2, #1 + strb r4, [r3] + cmp r2, r1 + blt _02266B3C + b _02266B72 +_02266B50: + mov r0, #0 + str r0, [sp] + b _02266B72 +_02266B56: + cmp r2, #2 + bne _02266B72 + ldrb r7, [r5, #4] + ldrb r5, [r5, #5] + bl ov16_0223ED60 + cmp r0, #0 + beq _02266B72 + ldr r0, [r4, #0x30] + add r1, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov16_02251F80 +_02266B72: + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02266AE4 + + thumb_func_start ov16_02266B78 +ov16_02266B78: ; 0x02266B78 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r2, #0 + mov r1, #0x16 + strb r1, [r5] + add r1, sp, #8 + ldrh r1, [r1, #0x1c] + add r7, r0, #0 + strh r1, [r5, #2] + ldr r1, [sp, #0x1c] + strh r1, [r5, #0x14] + ldr r1, [sp, #0x20] + strh r1, [r5, #0x16] + ldr r1, [sp, #0x18] + str r3, [r5, #0x4c] + str r1, [r5, #0x50] + bl ov16_0223E22C + str r0, [r5, #0x54] + cmp r4, #0 + bne _02266BA4 + b _02266CC8 +_02266BA4: + ldr r0, _02266CCC ; =0x00002144 + ldr r1, [r4, r0] + add r0, #0x10 + str r1, [r5, #4] + ldr r0, [r4, r0] + cmp r0, #0 + beq _02266BB4 + b _02266BC0 +_02266BB4: + add r0, sp, #8 + ldrh r0, [r0, #0x1c] + lsl r0, r0, #4 + add r1, r4, r0 + ldr r0, _02266CD0 ; =0x000003E1 + ldrb r0, [r1, r0] +_02266BC0: + ldr r1, [sp, #0x1c] + strh r0, [r5, #8] + mov r0, #0xc0 + add r6, r1, #0 + mul r6, r0 + ldr r0, _02266CD4 ; =0x00002D75 + add r1, r4, r6 + ldrb r0, [r1, r0] + add r1, r4, #0 + mov r2, #8 + strh r0, [r5, #0xc] + mov r0, #0xd + str r0, [sp] + add r0, r7, #0 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02266C04 + mov r0, #0x4c + str r0, [sp] + add r0, r7, #0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov16_022555A4 + cmp r0, #0 + bne _02266C04 + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r4, r0] + str r0, [r5, #0x10] + b _02266C08 +_02266C04: + mov r0, #0 + str r0, [r5, #0x10] +_02266C08: + ldr r0, _02266CD8 ; =0x00002164 + ldr r0, [r4, r0] + strh r0, [r5, #0xa] + ldr r0, _02266CDC ; =0x00002DB0 + add r1, r4, r0 + mov r0, #1 + ldr r2, [r1, r6] + lsl r0, r0, #0x18 + tst r0, r2 + beq _02266C20 + mov r3, #1 + b _02266C22 +_02266C20: + mov r3, #0 +_02266C22: + ldrh r0, [r5, #0xe] + mov r2, #1 + bic r0, r2 + lsl r2, r3, #0x10 + lsr r3, r2, #0x10 + mov r2, #1 + and r3, r2 + orr r0, r3 + strh r0, [r5, #0xe] + ldr r1, [r1, r6] + lsl r0, r2, #0x15 + tst r0, r1 + bne _02266C3E + mov r2, #0 +_02266C3E: + ldrh r0, [r5, #0xe] + mov r1, #2 + ldr r3, _02266CE0 ; =0x00002D66 + bic r0, r1 + lsl r1, r2, #0x10 + lsr r1, r1, #0x10 + lsl r1, r1, #0x1f + lsr r1, r1, #0x1e + orr r0, r1 + add r1, r4, r3 + add r3, #0x58 + strh r0, [r5, #0xe] + mov r0, #0 + mov ip, r5 + add r2, r5, #0 + add r7, r4, r3 +_02266C5E: + mov r3, #0xb5 + lsl r3, r3, #6 + ldrh r6, [r4, r3] + mov r3, ip + strh r6, [r3, #0x18] + ldrb r3, [r1] + lsl r3, r3, #0x1a + lsr r6, r3, #0x1f + add r3, r5, r0 + add r3, #0x24 + strb r6, [r3] + ldrb r3, [r1] + lsl r3, r3, #0x1b + lsr r6, r3, #0x1b + add r3, r5, r0 + add r3, #0x28 + strb r6, [r3] + mov r3, #0xb7 + lsl r3, r3, #6 + ldr r3, [r4, r3] + str r3, [r2, #0x3c] + ldr r3, _02266CDC ; =0x00002DB0 + ldr r6, [r4, r3] + mov r3, #2 + lsl r3, r3, #0x14 + tst r3, r6 + beq _02266CA2 + ldr r3, _02266CE4 ; =0x00002DFA + ldrh r6, [r4, r3] + add r3, r5, r0 + add r3, #0x20 + strb r6, [r3] + ldr r3, _02266CE8 ; =0x00002DE4 + b _02266CB0 +_02266CA2: + ldrb r3, [r7] + lsl r3, r3, #0x1c + lsr r6, r3, #0x1c + add r3, r5, r0 + add r3, #0x20 + strb r6, [r3] + ldr r3, _02266CEC ; =0x00002DA8 +_02266CB0: + ldr r3, [r4, r3] + add r0, r0, #1 + str r3, [r2, #0x2c] + mov r3, ip + add r3, r3, #2 + add r4, #0xc0 + mov ip, r3 + add r1, #0xc0 + add r2, r2, #4 + add r7, #0xc0 + cmp r0, #4 + blt _02266C5E +_02266CC8: + pop {r3, r4, r5, r6, r7, pc} + nop +_02266CCC: .word 0x00002144 +_02266CD0: .word 0x000003E1 +_02266CD4: .word 0x00002D75 +_02266CD8: .word 0x00002164 +_02266CDC: .word 0x00002DB0 +_02266CE0: .word 0x00002D66 +_02266CE4: .word 0x00002DFA +_02266CE8: .word 0x00002DE4 +_02266CEC: .word 0x00002DA8 + thumb_func_end ov16_02266B78 + + thumb_func_start ov16_02266CF0 +ov16_02266CF0: ; 0x02266CF0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp] + ldr r0, [sp, #0x38] + add r5, r2, #0 + str r1, [sp, #4] + str r0, [sp, #0x38] + mov r0, #0 + add r1, r5, #0 + mov r2, #8 + add r6, r3, #0 + bl sub_020C4BB8 + ldr r0, [sp] + bl ov16_0223DF0C + add r4, r0, #0 + mov r0, #0xc + and r0, r4 + strb r6, [r5] + cmp r0, #0xc + beq _02266D44 + mov r0, #0x10 + tst r0, r4 + beq _02266D2E + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223E208 + cmp r0, #0 + bne _02266D44 +_02266D2E: + cmp r4, #0x4b + bne _02266D3E + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223E208 + cmp r0, #0 + bne _02266D44 +_02266D3E: + cmp r4, #0xcb + beq _02266D44 + b _02266E7A +_02266D44: + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223E1F8 + cmp r0, #2 + beq _02266D5C + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223E1F8 + cmp r0, #3 + bne _02266D6A +_02266D5C: + ldr r6, [sp, #0x38] + ldr r0, [sp] + add r1, r6, #0 + bl ov16_0223E258 + str r0, [sp, #0x38] + b _02266D74 +_02266D6A: + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223E258 + add r6, r0, #0 +_02266D74: + ldr r0, [sp] + add r1, r6, #0 + bl ov16_0223DF20 + mov r4, #0 + str r0, [sp, #0x10] + add r7, r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02266DF4 + mov r0, #6 + add r1, r6, #0 + mul r1, r0 + ldr r0, [sp, #4] + add r6, r0, r1 +_02266D94: + ldr r1, _02266F14 ; =0x0000312C + ldr r0, [sp, #0x10] + ldrb r1, [r6, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + str r0, [sp, #0x14] + bl sub_02074470 + cmp r0, #0 + beq _02266DE6 + ldr r1, _02266F18 ; =0x000001EE + cmp r0, r1 + beq _02266DE6 + ldr r0, [sp, #0x14] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02266DDE + ldr r0, [sp, #0x14] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02266DD6 + add r1, r5, r4 + mov r0, #3 + strb r0, [r1, #2] + b _02266DE4 +_02266DD6: + add r1, r5, r4 + mov r0, #1 + strb r0, [r1, #2] + b _02266DE4 +_02266DDE: + add r1, r5, r4 + mov r0, #2 + strb r0, [r1, #2] +_02266DE4: + add r4, r4, #1 +_02266DE6: + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _02266D94 +_02266DF4: + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223DF20 + str r0, [sp, #8] + mov r4, #3 + mov r7, #0 + bl sub_0207A0F8 + cmp r0, #0 + bgt _02266E0C + b _02266F0E +_02266E0C: + ldr r0, [sp, #0x38] + mov r1, #6 + mul r1, r0 + ldr r0, [sp, #4] + add r6, r0, r1 +_02266E16: + ldr r1, _02266F14 ; =0x0000312C + ldr r0, [sp, #8] + ldrb r1, [r6, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + str r0, [sp, #0x18] + bl sub_02074470 + cmp r0, #0 + beq _02266E68 + ldr r1, _02266F18 ; =0x000001EE + cmp r0, r1 + beq _02266E68 + ldr r0, [sp, #0x18] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02266E60 + ldr r0, [sp, #0x18] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02266E58 + add r1, r5, r4 + mov r0, #3 + strb r0, [r1, #2] + b _02266E66 +_02266E58: + add r1, r5, r4 + mov r0, #1 + strb r0, [r1, #2] + b _02266E66 +_02266E60: + add r1, r5, r4 + mov r0, #2 + strb r0, [r1, #2] +_02266E66: + add r4, r4, #1 +_02266E68: + ldr r0, [sp, #8] + add r6, r6, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _02266E16 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_02266E7A: + mov r0, #2 + tst r0, r4 + beq _02266E8E + mov r0, #8 + tst r0, r4 + bne _02266E8E + ldr r0, [sp, #0x38] + mov r1, #1 + and r0, r1 + str r0, [sp, #0x38] +_02266E8E: + ldr r0, [sp] + ldr r1, [sp, #0x38] + bl ov16_0223DF20 + mov r4, #0 + str r0, [sp, #0xc] + add r7, r4, #0 + bl sub_0207A0F8 + cmp r0, #0 + ble _02266F0E + ldr r0, [sp, #0x38] + mov r1, #6 + mul r1, r0 + ldr r0, [sp, #4] + add r6, r0, r1 +_02266EAE: + ldr r1, _02266F14 ; =0x0000312C + ldr r0, [sp, #0xc] + ldrb r1, [r6, r1] + bl sub_0207A0FC + mov r1, #0xae + mov r2, #0 + str r0, [sp, #0x1c] + bl sub_02074470 + cmp r0, #0 + beq _02266F00 + ldr r1, _02266F18 ; =0x000001EE + cmp r0, r1 + beq _02266F00 + ldr r0, [sp, #0x1c] + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02266EF8 + ldr r0, [sp, #0x1c] + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _02266EF0 + add r1, r5, r4 + mov r0, #3 + strb r0, [r1, #2] + b _02266EFE +_02266EF0: + add r1, r5, r4 + mov r0, #1 + strb r0, [r1, #2] + b _02266EFE +_02266EF8: + add r1, r5, r4 + mov r0, #2 + strb r0, [r1, #2] +_02266EFE: + add r4, r4, #1 +_02266F00: + ldr r0, [sp, #0xc] + add r6, r6, #1 + add r7, r7, #1 + bl sub_0207A0F8 + cmp r7, r0 + blt _02266EAE +_02266F0E: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02266F14: .word 0x0000312C +_02266F18: .word 0x000001EE + thumb_func_end ov16_02266CF0 \ No newline at end of file diff --git a/asm/ov16_02266F1C.s b/asm/ov16_02266F1C.s new file mode 100644 index 000000000..e963a28bc --- /dev/null +++ b/asm/ov16_02266F1C.s @@ -0,0 +1,2976 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_02266F1C +ov16_02266F1C: ; 0x02266F1C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [sp, #0x30] + add r6, r1, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r4, r2, #0 + str r3, [sp, #0x18] + bl ov16_022682B0 + add r7, r0, #0 + ldr r3, [r7, #0x14] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200CC3C + str r4, [sp] + mov r0, #0x47 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02266FD8 ; =0x00004E26 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r5, #0 + add r3, r6, #0 + bl sub_0200CDC4 + ldr r3, [r7, #0x1c] + mov r0, #1 + str r0, [sp] + str r3, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200CE24 + ldr r3, [r7, #0x20] + mov r0, #1 + str r0, [sp] + str r3, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200CE54 + str r4, [sp] + mov r0, #0x47 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02266FDC ; =0x00004E27 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r5, #0 + add r3, r6, #0 + bl sub_0200CDC4 + ldr r0, [sp, #0x30] + sub r0, r0, #6 + cmp r0, #1 + bhi _02266FD4 + str r4, [sp] + mov r0, #0x51 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02266FE0 ; =0x00004E28 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r5, #0 + add r3, r6, #0 + bl sub_0200CDC4 +_02266FD4: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02266FD8: .word 0x00004E26 +_02266FDC: .word 0x00004E27 +_02266FE0: .word 0x00004E28 + thumb_func_end ov16_02266F1C + + thumb_func_start ov16_02266FE4 +ov16_02266FE4: ; 0x02266FE4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + ldr r0, [sp, #0x30] + add r7, r1, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r5, r2, #0 + str r3, [sp, #0x18] + bl ov16_02268314 + add r4, r0, #0 + beq _02267056 + ldr r3, [r4, #0x14] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_0200CC3C + str r5, [sp] + mov r0, #0x47 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _0226705C ; =0x00004E26 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r6, #0 + add r3, r7, #0 + bl sub_0200CDC4 + ldr r3, [r4, #0x1c] + mov r0, #1 + str r0, [sp] + str r3, [sp, #4] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_0200CE24 + ldr r3, [r4, #0x20] + mov r0, #1 + str r0, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + str r3, [sp, #4] + bl sub_0200CE54 +_02267056: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0226705C: .word 0x00004E26 + thumb_func_end ov16_02266FE4 + + thumb_func_start ov16_02267060 +ov16_02267060: ; 0x02267060 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r2, #0x18 + add r4, r1, #0 + lsr r0, r0, #0x18 + bl ov16_022682B0 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200CE6C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0200D324 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02267060 + + thumb_func_start ov16_02267084 +ov16_02267084: ; 0x02267084 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + add r4, r2, #0 + cmp r0, #0 + bne _02267096 + bl sub_02022974 +_02267096: + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + cmp r0, #6 + bne _022670A8 + mov r1, #3 + lsl r1, r1, #0xa + and r4, r1 + b _022670B8 +_022670A8: + cmp r0, #7 + bne _022670B4 + mov r1, #3 + lsl r1, r1, #0xc + and r4, r1 + b _022670B8 +_022670B4: + ldr r1, _02267214 ; =0xFFFFC3FF + and r4, r1 +_022670B8: + cmp r0, #7 + bhi _022670FE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022670C8: ; jump table + .short _022670FA - _022670C8 - 2 ; case 0 + .short _022670D8 - _022670C8 - 2 ; case 1 + .short _022670DE - _022670C8 - 2 ; case 2 + .short _022670D8 - _022670C8 - 2 ; case 3 + .short _022670DE - _022670C8 - 2 ; case 4 + .short _022670D8 - _022670C8 - 2 ; case 5 + .short _022670FE - _022670C8 - 2 ; case 6 + .short _022670FE - _022670C8 - 2 ; case 7 +_022670D8: + mov r0, #0x26 + bic r4, r0 + b _022670FE +_022670DE: + ldr r0, _02267218 ; =0xFFFFFDDF + and r4, r0 + add r0, r5, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + bne _022670F4 + mov r0, #6 + bic r4, r0 + b _022670FE +_022670F4: + mov r0, #1 + bic r4, r0 + b _022670FE +_022670FA: + ldr r0, _0226721C ; =0xFFFFFDFF + and r4, r0 +_022670FE: + ldr r0, [r5, #0xc] + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + beq _0226710E + ldr r0, _0226721C ; =0xFFFFFDFF + and r4, r0 +_0226710E: + mov r0, #1 + tst r0, r4 + beq _02267124 + add r0, r5, #0 + mov r1, #0 + bl ov16_022674C4 + add r0, r5, #0 + mov r1, #0 + bl ov16_02267EDC +_02267124: + mov r0, #2 + tst r0, r4 + beq _02267132 + add r0, r5, #0 + add r1, r6, #0 + bl ov16_02267B6C +_02267132: + mov r0, #4 + tst r0, r4 + beq _0226713E + add r0, r5, #0 + bl ov16_02267BF8 +_0226713E: + mov r0, #0x80 + tst r0, r4 + bne _0226714A + mov r0, #0x40 + tst r0, r4 + beq _02267150 +_0226714A: + add r0, r5, #0 + bl ov16_022679C8 +_02267150: + mov r0, #8 + tst r0, r4 + beq _0226715C + add r0, r5, #0 + bl ov16_02267A4C +_0226715C: + mov r0, #0x10 + tst r0, r4 + beq _02267168 + add r0, r5, #0 + bl ov16_02267864 +_02267168: + mov r0, #0x20 + tst r0, r4 + beq _0226717E + add r0, r5, #0 + mov r1, #0 + bl ov16_0226752C + add r0, r5, #0 + mov r1, #1 + bl ov16_02267EDC +_0226717E: + mov r0, #2 + lsl r0, r0, #8 + tst r0, r4 + beq _0226718C + add r0, r5, #0 + bl ov16_02267C58 +_0226718C: + mov r0, #1 + lsl r0, r0, #8 + tst r0, r4 + beq _022671F0 + add r0, r5, #0 + add r0, #0x4a + ldrb r0, [r0] + cmp r0, #5 + bhi _022671B6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022671AA: ; jump table + .short _022671B6 - _022671AA - 2 ; case 0 + .short _022671C0 - _022671AA - 2 ; case 1 + .short _022671CA - _022671AA - 2 ; case 2 + .short _022671D4 - _022671AA - 2 ; case 3 + .short _022671DE - _022671AA - 2 ; case 4 + .short _022671E8 - _022671AA - 2 ; case 5 +_022671B6: + add r0, r5, #0 + mov r1, #0x26 + bl ov16_02267CA8 + b _022671F0 +_022671C0: + add r0, r5, #0 + mov r1, #0x2f + bl ov16_02267CA8 + b _022671F0 +_022671CA: + add r0, r5, #0 + mov r1, #0x32 + bl ov16_02267CA8 + b _022671F0 +_022671D4: + add r0, r5, #0 + mov r1, #0x35 + bl ov16_02267CA8 + b _022671F0 +_022671DE: + add r0, r5, #0 + mov r1, #0x2c + bl ov16_02267CA8 + b _022671F0 +_022671E8: + add r0, r5, #0 + mov r1, #0x29 + bl ov16_02267CA8 +_022671F0: + mov r0, #5 + lsl r0, r0, #0xa + tst r0, r4 + beq _02267200 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02267CE8 +_02267200: + mov r0, #0xa + lsl r0, r0, #0xa + tst r0, r4 + beq _02267210 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02267DC4 +_02267210: + pop {r4, r5, r6, pc} + nop +_02267214: .word 0xFFFFC3FF +_02267218: .word 0xFFFFFDDF +_0226721C: .word 0xFFFFFDFF + thumb_func_end ov16_02267084 + + thumb_func_start ov16_02267220 +ov16_02267220: ; 0x02267220 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #0 + beq _02267232 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x50] +_02267232: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02267240 + bl sub_0200D0F4 + mov r0, #0 + str r0, [r4, #4] +_02267240: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02267220 + + thumb_func_start ov16_02267244 +ov16_02267244: ; 0x02267244 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02267256 + bl sub_0200D0F4 + mov r0, #0 + str r0, [r4, #8] +_02267256: + pop {r4, pc} + thumb_func_end ov16_02267244 + + thumb_func_start ov16_02267258 +ov16_02267258: ; 0x02267258 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x25 + ldrb r0, [r0] + bl ov16_022682B0 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl ov16_0223E010 + ldr r0, [r5, #0xc] + bl ov16_0223E018 + ldr r1, [r4, #0x14] + add r5, r0, #0 + bl sub_0200D070 + ldr r1, [r4, #0x1c] + add r0, r5, #0 + bl sub_0200D090 + ldr r1, [r4, #0x20] + add r0, r5, #0 + bl sub_0200D0A0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02267258 + + thumb_func_start ov16_0226728C +ov16_0226728C: ; 0x0226728C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x25 + ldrb r0, [r0] + bl ov16_02268314 + add r4, r0, #0 + beq _022672C0 + ldr r0, [r5, #0xc] + bl ov16_0223E010 + ldr r0, [r5, #0xc] + bl ov16_0223E018 + ldr r1, [r4, #0x14] + add r5, r0, #0 + bl sub_0200D070 + ldr r1, [r4, #0x1c] + add r0, r5, #0 + bl sub_0200D090 + ldr r1, [r4, #0x20] + add r0, r5, #0 + bl sub_0200D0A0 +_022672C0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0226728C + + thumb_func_start ov16_022672C4 +ov16_022672C4: ; 0x022672C4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl ov16_0223E010 + add r7, r0, #0 + ldr r0, [r5, #0xc] + bl ov16_0223E018 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + bl ov16_0223E064 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + bl ov16_022682B0 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + ldr r1, [sp, #4] + ldr r3, [sp, #8] + str r0, [sp] + add r0, r7, #0 + add r2, r6, #0 + bl ov16_02266F1C + add r2, r5, #0 + add r2, #0x25 + ldrb r2, [r2] + ldr r1, [sp, #4] + add r0, r7, #0 + bl ov16_02267060 + str r0, [r5, #4] + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + ldr r1, [sp, #4] + ldr r3, [sp, #8] + str r0, [sp] + add r0, r7, #0 + add r2, r6, #0 + bl ov16_02266FE4 + ldr r0, [r5, #8] + cmp r0, #0 + beq _02267352 + add r5, #0x25 + ldrb r3, [r5] + ldr r2, _0226735C ; =0x0226F334 + mov r1, #0 + ldrsh r1, [r4, r1] + ldrsb r2, [r2, r3] + ldr r0, [r0, #0] + sub r1, r1, r2 + mov r2, #2 + lsl r1, r1, #0x10 + ldrsh r2, [r4, r2] + asr r1, r1, #0x10 + bl sub_0200D494 +_02267352: + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226735C: .word 0x0226F334 + thumb_func_end ov16_022672C4 + + thumb_func_start ov16_02267360 +ov16_02267360: ; 0x02267360 + push {r4, lr} + add r4, r0, #0 + bl ov16_02267220 + add r0, r4, #0 + bl ov16_02267258 + add r0, r4, #0 + bl ov16_02267244 + add r0, r4, #0 + bl ov16_0226728C + pop {r4, pc} + thumb_func_end ov16_02267360 + + thumb_func_start ov16_0226737C +ov16_0226737C: ; 0x0226737C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x25 + ldrb r0, [r0] + cmp r0, #2 + beq _0226738E + cmp r0, #4 + beq _0226738E + b _022674A8 +_0226738E: + add r0, r5, #0 + add r0, #0x4f + ldrb r2, [r0] + mov r1, #8 + add r0, r2, #0 + bic r0, r1 + lsl r1, r2, #0x1c + lsr r2, r1, #0x1f + mov r1, #1 + eor r1, r2 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + lsl r1, r1, #0x1f + lsr r1, r1, #0x1c + orr r1, r0 + add r0, r5, #0 + add r0, #0x4f + strb r1, [r0] + ldr r0, [r5, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0226743A + mov r0, #0x46 + bl ov16_02268250 + add r2, r5, #0 + add r2, #0x25 + ldrb r2, [r2] + mov r6, #0x19 + lsl r6, r6, #0x16 + lsl r3, r2, #2 + ldr r2, _022674AC ; =0x0226F374 + ldr r1, [r4, #4] + ldrh r2, [r2, r3] + add r2, r6, r2 + add r2, #0x20 + add r1, r1, r2 + mov r2, #0x20 + bl sub_020C4B18 + mov r0, #0x47 + bl ov16_02268250 + add r2, r5, #0 + add r2, #0x25 + ldrb r2, [r2] + ldr r1, [r4, #4] + lsl r3, r2, #2 + ldr r2, _022674B0 ; =0x0226F3A4 + ldrh r2, [r2, r3] + add r2, r6, r2 + add r2, #0x20 + add r1, r1, r2 + mov r2, #0x20 + bl sub_020C4B18 + mov r0, #0x45 + bl ov16_02268250 + add r1, r5, #0 + add r1, #0x25 + ldrb r1, [r1] + ldr r3, _022674B4 ; =0x0226F3D4 + lsl r2, r1, #2 + ldrh r3, [r3, r2] + ldr r1, [r4, #4] + add r3, r6, r3 + add r1, r1, r3 + ldr r3, _022674B8 ; =0x0226F3D6 + ldrh r2, [r3, r2] + bl sub_020C4B18 + ldr r1, [r5, #0x28] + add r0, r5, #0 + mov r2, #6 + bl ov16_02267084 + pop {r4, r5, r6, pc} +_0226743A: + mov r0, #0x42 + bl ov16_02268250 + add r1, r5, #0 + add r1, #0x25 + ldrb r1, [r1] + mov r6, #0x19 + ldr r3, _022674AC ; =0x0226F374 + lsl r2, r1, #2 + ldrh r3, [r3, r2] + lsl r6, r6, #0x16 + ldr r1, [r4, #4] + add r3, r6, r3 + add r1, r1, r3 + ldr r3, _022674BC ; =0x0226F376 + ldrh r2, [r3, r2] + bl sub_020C4B18 + mov r0, #0x44 + bl ov16_02268250 + add r1, r5, #0 + add r1, #0x25 + ldrb r1, [r1] + ldr r3, _022674B0 ; =0x0226F3A4 + lsl r2, r1, #2 + ldrh r3, [r3, r2] + ldr r1, [r4, #4] + add r3, r6, r3 + add r1, r1, r3 + ldr r3, _022674C0 ; =0x0226F3A6 + ldrh r2, [r3, r2] + bl sub_020C4B18 + mov r0, #0x26 + bl ov16_02268250 + add r2, r5, #0 + add r2, #0x25 + ldrb r2, [r2] + ldr r1, [r4, #4] + lsl r3, r2, #2 + ldr r2, _022674B0 ; =0x0226F3A4 + ldrh r2, [r2, r3] + add r2, r6, r2 + add r2, #0x20 + add r1, r1, r2 + mov r2, #0x20 + bl sub_020C4B18 + ldr r1, [r5, #0x28] + add r0, r5, #0 + mov r2, #1 + bl ov16_02267084 +_022674A8: + pop {r4, r5, r6, pc} + nop +_022674AC: .word 0x0226F374 +_022674B0: .word 0x0226F3A4 +_022674B4: .word 0x0226F3D4 +_022674B8: .word 0x0226F3D6 +_022674BC: .word 0x0226F376 +_022674C0: .word 0x0226F3A6 + thumb_func_end ov16_0226737C + + thumb_func_start ov16_022674C4 +ov16_022674C4: ; 0x022674C4 + mov r2, #2 + lsl r2, r2, #0x1e + str r2, [r0, #0x34] + ldr r3, [r0, #0x28] + add r2, r3, r1 + bpl _022674D2 + sub r1, r1, r2 +_022674D2: + ldr r2, [r0, #0x2c] + add r3, r3, r1 + cmp r3, r2 + ble _022674DE + sub r2, r3, r2 + sub r1, r1, r2 +_022674DE: + neg r1, r1 + str r1, [r0, #0x30] + ldr r1, [r0, #0x28] + cmp r1, #0 + bge _022674EC + mov r1, #0 + str r1, [r0, #0x28] +_022674EC: + ldr r2, [r0, #0x2c] + ldr r1, [r0, #0x28] + cmp r1, r2 + ble _022674F6 + str r2, [r0, #0x28] +_022674F6: + bx lr + thumb_func_end ov16_022674C4 + + thumb_func_start ov16_022674F8 +ov16_022674F8: ; 0x022674F8 + push {r3, r4, r5, lr} + mov r1, #0 + add r5, r0, #0 + bl ov16_02267EDC + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _0226751E + ldr r1, [r5, #0x28] + ldr r0, [r5, #0x30] + mov r2, #2 + sub r1, r1, r0 + add r0, r5, #0 + str r1, [r5, #0x28] + bl ov16_02267084 + b _02267528 +_0226751E: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov16_02267084 +_02267528: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov16_022674F8 + + thumb_func_start ov16_0226752C +ov16_0226752C: ; 0x0226752C + mov r2, #2 + lsl r2, r2, #0x1e + str r2, [r0, #0x44] + ldr r3, [r0, #0x38] + add r2, r3, r1 + bpl _0226753A + sub r1, r1, r2 +_0226753A: + ldr r2, [r0, #0x3c] + add r3, r3, r1 + cmp r3, r2 + ble _02267546 + sub r2, r3, r2 + sub r1, r1, r2 +_02267546: + neg r1, r1 + str r1, [r0, #0x40] + ldr r1, [r0, #0x38] + cmp r1, #0 + bge _02267554 + mov r1, #0 + str r1, [r0, #0x38] +_02267554: + ldr r2, [r0, #0x3c] + ldr r1, [r0, #0x38] + cmp r1, r2 + ble _0226755E + str r2, [r0, #0x38] +_0226755E: + bx lr + thumb_func_end ov16_0226752C + + thumb_func_start ov16_02267560 +ov16_02267560: ; 0x02267560 + push {r4, lr} + mov r1, #1 + add r4, r0, #0 + bl ov16_02267EDC + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0226757A + ldr r2, [r4, #0x38] + ldr r1, [r4, #0x40] + sub r1, r2, r1 + str r1, [r4, #0x38] +_0226757A: + pop {r4, pc} + thumb_func_end ov16_02267560 + + thumb_func_start ov16_0226757C +ov16_0226757C: ; 0x0226757C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02267596 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CC8 + add r0, r4, #0 + mov r1, #1 + bl ov16_022675F8 +_02267596: + ldr r0, [r4, #0xc] + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + bne _022675AA + add r0, r4, #0 + bl ov16_02268470 +_022675AA: + pop {r4, pc} + thumb_func_end ov16_0226757C + + thumb_func_start ov16_022675AC +ov16_022675AC: ; 0x022675AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _022675D0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021CC8 + ldr r0, [r4, #8] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02021E50 + add r0, r4, #0 + mov r1, #0 + bl ov16_022675F8 +_022675D0: + add r0, r4, #0 + bl ov16_02268498 + pop {r4, pc} + thumb_func_end ov16_022675AC + + thumb_func_start ov16_022675D8 +ov16_022675D8: ; 0x022675D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + cmp r0, #0 + beq _022675F4 + bl sub_0200D460 + ldr r0, [r5, #8] + cmp r0, #0 + beq _022675F4 + add r1, r4, #0 + bl sub_0200D460 +_022675F4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022675D8 + + thumb_func_start ov16_022675F8 +ov16_022675F8: ; 0x022675F8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + add r4, r1, #0 + cmp r0, #0 + beq _0226761E + ldr r0, [r5, #0xc] + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + beq _02267616 + cmp r4, #1 + beq _0226761E +_02267616: + ldr r0, [r5, #8] + add r1, r4, #0 + bl sub_0200D3F4 +_0226761E: + pop {r3, r4, r5, pc} + thumb_func_end ov16_022675F8 + + thumb_func_start ov16_02267620 +ov16_02267620: ; 0x02267620 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + cmp r0, #0 + beq _02267638 + bl sub_0200D3F4 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_022675F8 +_02267638: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_02267620 + + thumb_func_start ov16_0226763C +ov16_0226763C: ; 0x0226763C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + add r7, r2, #0 + cmp r0, #0 + bne _0226764E + bl sub_02022974 +_0226764E: + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + bl ov16_022682B0 + add r4, r0, #0 + mov r1, #0 + mov r2, #2 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #4] + add r1, r1, r6 + add r2, r2, r7 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D494 + ldr r0, [r5, #8] + cmp r0, #0 + beq _022676A0 + add r5, #0x25 + ldrb r3, [r5] + mov r1, #0 + ldr r2, _022676A4 ; =0x0226F334 + ldrsh r1, [r4, r1] + ldrsb r2, [r2, r3] + ldr r0, [r0, #0] + add r1, r1, r6 + sub r1, r1, r2 + mov r2, #2 + ldrsh r2, [r4, r2] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add r2, r2, r7 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D494 +_022676A0: + pop {r3, r4, r5, r6, r7, pc} + nop +_022676A4: .word 0x0226F334 + thumb_func_end ov16_0226763C + + thumb_func_start ov16_022676A8 +ov16_022676A8: ; 0x022676A8 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r4, #0 + bne _022676B6 + bl sub_02022974 +_022676B6: + ldr r0, [r4, #4] + cmp r0, #0 + bne _022676C0 + bl sub_02022974 +_022676C0: + add r0, r4, #0 + add r0, #0x4f + ldrb r1, [r0] + mov r0, #2 + bic r1, r0 + add r0, r4, #0 + add r0, #0x4f + strb r1, [r0] + add r0, r4, #0 + add r0, #0x4f + ldrb r0, [r0] + mov r1, #1 + bic r0, r1 + lsl r1, r5, #0x18 + lsr r2, r1, #0x18 + mov r1, #1 + and r1, r2 + orr r1, r0 + add r0, r4, #0 + add r0, #0x4f + strb r1, [r0] + cmp r5, #0 + bne _0226772E + add r0, r4, #0 + add r0, #0x25 + ldrb r0, [r0] + cmp r0, #7 + bhi _02267720 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267704: ; jump table + .short _02267714 - _02267704 - 2 ; case 0 + .short _02267720 - _02267704 - 2 ; case 1 + .short _02267714 - _02267704 - 2 ; case 2 + .short _02267720 - _02267704 - 2 ; case 3 + .short _02267714 - _02267704 - 2 ; case 4 + .short _02267720 - _02267704 - 2 ; case 5 + .short _02267714 - _02267704 - 2 ; case 6 + .short _02267714 - _02267704 - 2 ; case 7 +_02267714: + add r0, r4, #0 + mov r1, #0xa0 + mov r2, #0 + bl ov16_0226763C + b _02267738 +_02267720: + mov r1, #0x9f + add r0, r4, #0 + mvn r1, r1 + mov r2, #0 + bl ov16_0226763C + b _02267738 +_0226772E: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov16_0226763C +_02267738: + ldr r0, _02267744 ; =ov16_0226774C + ldr r2, _02267748 ; =0x000003DE + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02267744: .word ov16_0226774C +_02267748: .word 0x000003DE + thumb_func_end ov16_022676A8 + + thumb_func_start ov16_0226774C +ov16_0226774C: ; 0x0226774C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + mov r4, #0 + bl ov16_022682B0 + add r6, r0, #0 + add r1, sp, #0 + ldr r0, [r5, #4] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + cmp r0, #7 + bhi _022677D2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267782: ; jump table + .short _02267792 - _02267782 - 2 ; case 0 + .short _022677D2 - _02267782 - 2 ; case 1 + .short _02267792 - _02267782 - 2 ; case 2 + .short _022677D2 - _02267782 - 2 ; case 3 + .short _02267792 - _02267782 - 2 ; case 4 + .short _022677D2 - _02267782 - 2 ; case 5 + .short _02267792 - _02267782 - 2 ; case 6 + .short _02267792 - _02267782 - 2 ; case 7 +_02267792: + add r0, r5, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + add r0, sp, #0 + bne _022677B8 + mov r1, #2 + ldrsh r2, [r0, r1] + sub r2, #0x18 + strh r2, [r0, #2] + add r2, r4, #0 + ldrsh r1, [r0, r1] + ldrsh r2, [r6, r2] + cmp r1, r2 + bge _02267810 + strh r2, [r0, #2] + add r4, r4, #1 + b _02267810 +_022677B8: + mov r1, #2 + ldrsh r2, [r0, r1] + add r2, #0x18 + strh r2, [r0, #2] + add r2, r4, #0 + ldrsh r2, [r6, r2] + ldrsh r1, [r0, r1] + add r2, #0xa0 + cmp r1, r2 + ble _02267810 + strh r2, [r0, #2] + add r4, r4, #1 + b _02267810 +_022677D2: + add r0, r5, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + add r0, sp, #0 + bne _022677F8 + mov r1, #2 + ldrsh r2, [r0, r1] + add r2, #0x18 + strh r2, [r0, #2] + mov r2, #0 + ldrsh r1, [r0, r1] + ldrsh r2, [r6, r2] + cmp r1, r2 + ble _02267810 + strh r2, [r0, #2] + add r4, r4, #1 + b _02267810 +_022677F8: + mov r1, #2 + ldrsh r2, [r0, r1] + sub r2, #0x18 + strh r2, [r0, #2] + mov r2, #0 + ldrsh r2, [r6, r2] + ldrsh r1, [r0, r1] + sub r2, #0x18 + cmp r1, r2 + bge _02267810 + strh r2, [r0, #2] + add r4, r4, #1 +_02267810: + add r2, sp, #0 + mov r1, #2 + mov r3, #0 + ldrsh r1, [r2, r1] + ldrsh r2, [r2, r3] + ldr r0, [r5, #4] + bl sub_0200D4C4 + ldr r0, [r5, #8] + cmp r0, #0 + beq _02267844 + add r6, sp, #0 + mov r1, #2 + ldrsh r3, [r6, r1] + add r1, r5, #0 + add r1, #0x25 + ldrb r2, [r1] + ldr r1, _02267860 ; =0x0226F334 + ldrsb r1, [r1, r2] + mov r2, #0 + ldrsh r2, [r6, r2] + sub r1, r3, r1 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + bl sub_0200D4C4 +_02267844: + cmp r4, #0 + ble _0226785C + add r0, r5, #0 + add r0, #0x4f + ldrb r1, [r0] + mov r0, #2 + add r5, #0x4f + orr r0, r1 + strb r0, [r5] + add r0, r7, #0 + bl sub_0200DA58 +_0226785C: + pop {r3, r4, r5, r6, r7, pc} + nop +_02267860: .word 0x0226F334 + thumb_func_end ov16_0226774C + + thumb_func_start ov16_02267864 +ov16_02267864: ; 0x02267864 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl ov16_0223DF00 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl ov16_0223E05C + add r7, r0, #0 + ldr r0, [r5, #0xc] + bl ov16_0223E0D0 + add r4, r0, #0 + mov r0, #0x16 + mov r1, #5 + bl sub_02023790 + mov r1, #0xf1 + str r0, [sp, #0x18] + add r0, r7, #0 + lsl r1, r1, #2 + bl sub_0200B1EC + add r1, r5, #0 + add r2, r5, #0 + add r1, #0x24 + add r2, #0x26 + str r0, [sp, #0x1c] + ldrb r1, [r1] + ldrb r2, [r2] + ldr r0, [r5, #0xc] + bl ov16_0223DFAC + bl sub_02076B10 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0 + bl sub_0200B5CC + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r0, r4, #0 + bl sub_0200C388 + mov r0, #0 + str r0, [sp] + mov r0, #0xf + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0x24 + mov r2, #8 + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022679A4 ; =0x000E020F + ldr r2, [sp, #0x18] + str r0, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + str r1, [sp, #0x14] + add r0, sp, #0x24 + add r3, r1, #0 + bl sub_0201D7E0 + ldr r0, [r5, #4] + ldr r6, [sp, #0x30] + ldr r0, [r0, #0] + bl sub_02021F98 + add r4, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + add r0, r6, r0 + str r0, [sp, #0x20] + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + ldr r1, _022679A8 ; =0x0226F64C + ldr r3, [r4, #4] + lsl r7, r0, #4 + ldrh r2, [r1, r7] + mov r1, #0x19 + lsl r1, r1, #0x16 + add r1, r1, r2 + ldr r2, _022679AC ; =0x0226F64E + add r0, r6, #0 + ldrh r2, [r2, r7] + add r1, r3, r1 + bl sub_020C4B18 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + ldr r1, _022679B0 ; =0x0226F650 + ldr r3, [r4, #4] + lsl r7, r0, #4 + ldrh r2, [r1, r7] + mov r1, #0x19 + lsl r1, r1, #0x16 + add r1, r1, r2 + ldr r2, _022679B4 ; =0x0226F652 + ldr r0, [sp, #0x20] + ldrh r2, [r2, r7] + add r1, r3, r1 + bl sub_020C4B18 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + ldr r3, _022679B8 ; =0x0226F654 + ldr r1, [r4, #4] + lsl r2, r0, #4 + ldr r0, _022679AC ; =0x0226F64E + ldrh r0, [r0, r2] + add r0, r6, r0 + ldrh r6, [r3, r2] + mov r3, #0x19 + lsl r3, r3, #0x16 + add r3, r3, r6 + add r1, r1, r3 + ldr r3, _022679BC ; =0x0226F656 + ldrh r2, [r3, r2] + bl sub_020C4B18 + add r5, #0x25 + ldrb r0, [r5] + ldr r4, [r4, #4] + lsl r2, r0, #4 + ldr r0, _022679B4 ; =0x0226F652 + ldrh r1, [r0, r2] + ldr r0, [sp, #0x20] + add r0, r0, r1 + ldr r1, _022679C0 ; =0x0226F658 + ldrh r3, [r1, r2] + mov r1, #0x19 + lsl r1, r1, #0x16 + add r1, r1, r3 + ldr r3, _022679C4 ; =0x0226F65A + add r1, r4, r1 + ldrh r2, [r3, r2] + bl sub_020C4B18 + add r0, sp, #0x24 + bl sub_0201A8FC + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022679A4: .word 0x000E020F +_022679A8: .word 0x0226F64C +_022679AC: .word 0x0226F64E +_022679B0: .word 0x0226F650 +_022679B4: .word 0x0226F652 +_022679B8: .word 0x0226F654 +_022679BC: .word 0x0226F656 +_022679C0: .word 0x0226F658 +_022679C4: .word 0x0226F65A + thumb_func_end ov16_02267864 + + thumb_func_start ov16_022679C8 +ov16_022679C8: ; 0x022679C8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0x49 + ldrb r0, [r0] + cmp r0, #0 + bne _022679DA + mov r0, #0x4a + mov r4, #0x3e + b _022679E8 +_022679DA: + cmp r0, #1 + bne _022679E4 + mov r0, #0x48 + mov r4, #0x3c + b _022679E8 +_022679E4: + mov r0, #0x4c + mov r4, #0x40 +_022679E8: + bl ov16_02268250 + str r0, [sp] + add r0, r4, #0 + bl ov16_02268250 + add r7, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + mov r6, #0x19 + ldr r3, _02267A3C ; =0x0226F47C + lsl r2, r0, #3 + ldrh r3, [r3, r2] + lsl r6, r6, #0x16 + ldr r1, [r4, #4] + add r3, r6, r3 + add r1, r1, r3 + ldr r3, _02267A40 ; =0x0226F47E + add r0, r7, #0 + ldrh r2, [r3, r2] + bl sub_020C4B18 + add r5, #0x25 + ldrb r0, [r5] + ldr r1, _02267A44 ; =0x0226F480 + ldr r3, [r4, #4] + lsl r2, r0, #3 + ldrh r1, [r1, r2] + ldr r0, [sp] + add r1, r6, r1 + add r1, r3, r1 + ldr r3, _02267A48 ; =0x0226F482 + ldrh r2, [r3, r2] + bl sub_020C4B18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02267A3C: .word 0x0226F47C +_02267A40: .word 0x0226F47E +_02267A44: .word 0x0226F480 +_02267A48: .word 0x0226F482 + thumb_func_end ov16_022679C8 + + thumb_func_start ov16_02267A4C +ov16_02267A4C: ; 0x02267A4C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #4] + mov r0, #5 + mov r1, #0x60 + bl sub_02018144 + add r4, r0, #0 + mov r0, #5 + mov r1, #0xc0 + bl sub_02018144 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #0xff + mov r2, #0x60 + bl sub_020C4CF4 + ldr r0, [sp, #4] + ldr r0, [r0, #0xc] + bl ov16_0223E054 + ldr r1, [sp, #4] + str r4, [sp] + add r1, #0x48 + ldrb r1, [r1] + mov r2, #3 + mov r3, #0 + bl sub_0200C67C + ldr r0, [sp, #4] + ldr r0, [r0, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + str r0, [sp, #8] + ldr r0, [sp, #4] + ldr r1, _02267B5C ; =0x0226F3EC + add r0, #0x25 + ldrb r0, [r0] + lsl r2, r0, #3 + ldrh r3, [r1, r2] + mov r1, #0x19 + lsl r1, r1, #0x16 + ldr r0, [sp, #8] + add r1, r1, r3 + ldr r3, _02267B60 ; =0x0226F3EE + ldr r0, [r0, #4] + ldrh r2, [r3, r2] + add r0, r0, r1 + add r1, r7, #0 + bl sub_020C4B18 + ldr r0, [sp, #4] + ldr r1, _02267B64 ; =0x0226F3F0 + add r0, #0x25 + ldrb r0, [r0] + lsl r2, r0, #3 + ldrh r3, [r1, r2] + mov r1, #0x19 + ldr r0, [sp, #8] + lsl r1, r1, #0x16 + add r1, r1, r3 + ldr r3, _02267B68 ; =0x0226F3F2 + ldr r0, [r0, #4] + ldrh r2, [r3, r2] + add r0, r0, r1 + add r1, r7, #0 + add r1, #0x60 + bl sub_020C4B18 + mov r2, #0 + add r1, r2, #0 +_02267ADE: + mov r0, #0 + add r3, r7, r1 +_02267AE2: + ldrb r5, [r4, r2] + add r6, r4, r2 + add r0, r0, #1 + strb r5, [r3, #0x10] + ldrb r6, [r6, #0x10] + add r5, r3, #0 + add r5, #0x60 + strb r6, [r5] + add r2, r2, #1 + add r3, r3, #1 + cmp r0, #0x10 + blt _02267AE2 + add r1, #0x20 + add r2, #0x10 + cmp r1, #0x60 + blt _02267ADE + ldr r0, [sp, #4] + ldr r1, [sp, #8] + add r0, #0x25 + ldrb r0, [r0] + ldr r3, _02267B5C ; =0x0226F3EC + ldr r1, [r1, #4] + lsl r2, r0, #3 + ldrh r5, [r3, r2] + mov r3, #0x19 + lsl r3, r3, #0x16 + add r3, r3, r5 + add r1, r1, r3 + ldr r3, _02267B60 ; =0x0226F3EE + add r0, r7, #0 + ldrh r2, [r3, r2] + bl sub_020C4B18 + ldr r0, [sp, #4] + ldr r3, _02267B64 ; =0x0226F3F0 + add r0, #0x25 + str r0, [sp, #4] + ldrb r0, [r0] + ldr r1, [sp, #8] + lsl r2, r0, #3 + ldrh r5, [r3, r2] + mov r3, #0x19 + lsl r3, r3, #0x16 + add r0, r7, #0 + ldr r1, [r1, #4] + add r3, r3, r5 + add r1, r1, r3 + ldr r3, _02267B68 ; =0x0226F3F2 + add r0, #0x60 + ldrh r2, [r3, r2] + bl sub_020C4B18 + add r0, r4, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02267B5C: .word 0x0226F3EC +_02267B60: .word 0x0226F3EE +_02267B64: .word 0x0226F3F0 +_02267B68: .word 0x0226F3F2 + thumb_func_end ov16_02267A4C + + thumb_func_start ov16_02267B6C +ov16_02267B6C: ; 0x02267B6C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #5 + mov r1, #0x60 + bl sub_02018144 + mov r1, #0xff + mov r2, #0x60 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [r5, #0xc] + bl ov16_0223E04C + str r4, [sp] + add r1, r6, #0 + mov r2, #3 + mov r3, #1 + bl sub_0200C67C + ldr r0, [r5, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + mov r7, #0x19 + ldr r3, _02267BE8 ; =0x0226F41C + lsl r2, r0, #3 + ldrh r3, [r3, r2] + lsl r7, r7, #0x16 + ldr r1, [r6, #4] + add r3, r7, r3 + add r1, r1, r3 + ldr r3, _02267BEC ; =0x0226F41E + add r0, r4, #0 + ldrh r2, [r3, r2] + bl sub_020C4B18 + add r5, #0x25 + ldrb r0, [r5] + ldr r3, _02267BF0 ; =0x0226F420 + ldr r1, [r6, #4] + lsl r2, r0, #3 + ldrh r3, [r3, r2] + ldr r0, _02267BEC ; =0x0226F41E + add r3, r7, r3 + add r1, r1, r3 + ldrh r0, [r0, r2] + ldr r3, _02267BF4 ; =0x0226F422 + ldrh r2, [r3, r2] + add r0, r4, r0 + bl sub_020C4B18 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_02267BE8: .word 0x0226F41C +_02267BEC: .word 0x0226F41E +_02267BF0: .word 0x0226F420 +_02267BF4: .word 0x0226F422 + thumb_func_end ov16_02267B6C + + thumb_func_start ov16_02267BF8 +ov16_02267BF8: ; 0x02267BF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #5 + mov r1, #0x60 + bl sub_02018144 + mov r1, #0xff + mov r2, #0x60 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [r5, #0xc] + bl ov16_0223E04C + str r4, [sp] + ldr r1, [r5, #0x2c] + mov r2, #3 + mov r3, #0 + bl sub_0200C67C + ldr r0, [r5, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + add r1, r0, #0 + add r5, #0x25 + ldrb r0, [r5] + ldr r3, _02267C50 ; =0x0226F3BC + ldr r1, [r1, #4] + lsl r2, r0, #2 + ldrh r5, [r3, r2] + mov r3, #0x19 + lsl r3, r3, #0x16 + add r3, r5, r3 + add r1, r1, r3 + ldr r3, _02267C54 ; =0x0226F3BE + add r0, r4, #0 + ldrh r2, [r3, r2] + bl sub_020C4B18 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02267C50: .word 0x0226F3BC +_02267C54: .word 0x0226F3BE + thumb_func_end ov16_02267BF8 + + thumb_func_start ov16_02267C58 +ov16_02267C58: ; 0x02267C58 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x4b + ldrb r0, [r0] + cmp r0, #1 + bne _02267C6C + mov r0, #0x3b + bl ov16_02268250 + b _02267C72 +_02267C6C: + mov r0, #0x26 + bl ov16_02268250 +_02267C72: + add r4, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + add r5, #0x25 + add r1, r0, #0 + ldrb r0, [r5] + lsl r2, r0, #2 + add r0, r4, #0 + ldr r4, [r1, #4] + ldr r1, _02267CA0 ; =0x0226F38C + ldrh r3, [r1, r2] + mov r1, #0x19 + lsl r1, r1, #0x16 + add r1, r3, r1 + ldr r3, _02267CA4 ; =0x0226F38E + add r1, r4, r1 + ldrh r2, [r3, r2] + bl sub_020C4B18 + pop {r3, r4, r5, pc} + nop +_02267CA0: .word 0x0226F38C +_02267CA4: .word 0x0226F38E + thumb_func_end ov16_02267C58 + + thumb_func_start ov16_02267CA8 +ov16_02267CA8: ; 0x02267CA8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + bl ov16_02268250 + add r4, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0] + bl sub_02021F98 + add r5, #0x25 + add r1, r0, #0 + ldrb r0, [r5] + lsl r2, r0, #2 + add r0, r4, #0 + ldr r4, [r1, #4] + ldr r1, _02267CE0 ; =0x0226F35C + ldrh r3, [r1, r2] + mov r1, #0x19 + lsl r1, r1, #0x16 + add r1, r3, r1 + ldr r3, _02267CE4 ; =0x0226F35E + add r1, r4, r1 + ldrh r2, [r3, r2] + bl sub_020C4B18 + pop {r3, r4, r5, pc} + nop +_02267CE0: .word 0x0226F35C +_02267CE4: .word 0x0226F35E + thumb_func_end ov16_02267CA8 + + thumb_func_start ov16_02267CE8 +ov16_02267CE8: ; 0x02267CE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r4, r0, #0 + ldr r0, [r4, #0xc] + add r5, r1, #0 + bl ov16_0223DF00 + add r6, r0, #0 + ldr r0, [r4, #0xc] + bl ov16_0223E05C + mov r1, #1 + lsl r1, r1, #0xa + add r2, r5, #0 + tst r2, r1 + beq _02267D10 + sub r1, #0x4a + bl sub_0200B1EC + b _02267D16 +_02267D10: + add r1, #0xc4 + bl sub_0200B1EC +_02267D16: + add r7, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xf + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0x18 + mov r2, #0xd + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02267DC0 ; =0x000E020F + add r2, r7, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + str r1, [sp, #0x14] + add r0, sp, #0x18 + add r3, r1, #0 + bl sub_0201D7E0 + ldr r0, [r4, #4] + ldr r5, [sp, #0x24] + ldr r0, [r0, #0] + bl sub_02021F98 + add r4, r0, #0 + mov r2, #0x1a + mov r6, #0x19 + lsl r2, r2, #4 + lsl r6, r6, #0x16 + add r2, #0xa0 + ldr r1, [r4, #4] + add r2, r6, r2 + add r1, r1, r2 + add r0, r5, #0 + mov r2, #0xc0 + bl sub_020C4B18 + mov r2, #0xd + mov r0, #0x1a + lsl r2, r2, #6 + lsl r0, r0, #4 + ldr r1, [r4, #4] + add r2, r6, r2 + add r1, r1, r2 + add r0, r5, r0 + mov r2, #0xc0 + bl sub_020C4B18 + mov r2, #0xa + lsl r2, r2, #8 + add r0, r5, #0 + ldr r1, [r4, #4] + add r2, r6, r2 + add r1, r1, r2 + add r0, #0xc0 + mov r2, #0xe0 + bl sub_020C4B18 + mov r0, #0x1a + mov r1, #0xb + lsl r0, r0, #4 + lsl r1, r1, #8 + add r0, r5, r0 + ldr r2, [r4, #4] + add r1, r6, r1 + add r1, r2, r1 + add r0, #0xc0 + mov r2, #0xe0 + bl sub_020C4B18 + add r0, sp, #0x18 + bl sub_0201A8FC + add r0, r7, #0 + bl sub_020237BC + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_02267DC0: .word 0x000E020F + thumb_func_end ov16_02267CE8 + + thumb_func_start ov16_02267DC4 +ov16_02267DC4: ; 0x02267DC4 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r4, r0, #0 + ldr r0, [r4, #0xc] + add r5, r1, #0 + bl ov16_0223DF00 + str r0, [sp, #0x1c] + ldr r0, [r4, #0xc] + bl ov16_0223E05C + str r0, [sp, #0x20] + ldr r0, [r4, #0xc] + bl ov16_0223E0D0 + add r7, r0, #0 + mov r0, #0x1e + mov r1, #5 + bl sub_02023790 + mov r1, #1 + add r6, r0, #0 + lsl r1, r1, #0xa + add r0, r5, #0 + tst r0, r1 + beq _02267E04 + ldr r0, [sp, #0x20] + sub r1, #0x49 + bl sub_0200B1EC + str r0, [sp, #0x18] + b _02267E0E +_02267E04: + ldr r0, [sp, #0x20] + add r1, #0xc5 + bl sub_0200B1EC + str r0, [sp, #0x18] +_02267E0E: + mov r0, #1 + str r0, [sp] + add r2, r4, #0 + str r0, [sp, #4] + add r2, #0x27 + ldrb r2, [r2] + add r0, r7, #0 + mov r1, #0 + mov r3, #2 + bl sub_0200B60C + ldr r2, [sp, #0x18] + add r0, r7, #0 + add r1, r6, #0 + bl sub_0200C388 + mov r0, #0 + str r0, [sp] + mov r0, #0xf + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + add r1, sp, #0x24 + mov r2, #0xd + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02267ED8 ; =0x000E020F + add r2, r6, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + str r1, [sp, #0x14] + add r0, sp, #0x24 + add r3, r1, #0 + bl sub_0201D7E0 + ldr r0, [r4, #4] + ldr r5, [sp, #0x30] + ldr r0, [r0, #0] + bl sub_02021F98 + add r4, r0, #0 + mov r7, #0x19 + mov r2, #0x11 + lsl r7, r7, #0x16 + lsl r2, r2, #6 + ldr r1, [r4, #4] + add r2, r7, r2 + add r1, r1, r2 + add r0, r5, #0 + mov r2, #0xc0 + bl sub_020C4B18 + mov r2, #0x15 + mov r0, #0x1a + lsl r2, r2, #6 + lsl r0, r0, #4 + ldr r1, [r4, #4] + add r2, r7, r2 + add r1, r1, r2 + add r0, r5, r0 + mov r2, #0xc0 + bl sub_020C4B18 + mov r2, #3 + lsl r2, r2, #0xa + add r0, r5, #0 + ldr r1, [r4, #4] + add r2, r7, r2 + add r1, r1, r2 + add r0, #0xc0 + mov r2, #0xe0 + bl sub_020C4B18 + mov r0, #0x1a + mov r1, #0xd + lsl r0, r0, #4 + lsl r1, r1, #8 + add r0, r5, r0 + ldr r2, [r4, #4] + add r1, r7, r1 + add r1, r2, r1 + add r0, #0xc0 + mov r2, #0xe0 + bl sub_020C4B18 + add r0, sp, #0x24 + bl sub_0201A8FC + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02267ED8: .word 0x000E020F + thumb_func_end ov16_02267DC4 + + thumb_func_start ov16_02267EDC +ov16_02267EDC: ; 0x02267EDC + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + bne _02267F00 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r3, r5, #0 + ldr r0, [r5, #0x2c] + ldr r1, [r5, #0x28] + ldr r2, [r5, #0x30] + add r3, #0x34 + bl ov16_022680D8 + add r6, r0, #0 + b _02267F38 +_02267F00: + ldr r0, [r5, #0x38] + ldr r1, [r5, #0x40] + ldr r2, [r5, #0x3c] + mov r3, #0xc + bl ov16_02268210 + add r1, r0, #0 + bne _02267F12 + mov r1, #1 +_02267F12: + ldr r6, [r5, #0x40] + add r0, r6, #0 + bl sub_020E1F6C + bl sub_020D4070 + mov r1, #0xc + lsl r0, r0, #0x10 + add r3, r5, #0 + str r1, [sp] + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0x3c] + ldr r1, [r5, #0x38] + add r2, r6, #0 + add r3, #0x44 + bl ov16_022680D8 + add r6, r0, #0 +_02267F38: + cmp r4, #0 + bne _02267F4A + add r0, r5, #0 + add r0, #0x4f + ldrb r0, [r0] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + cmp r0, #1 + beq _02267F54 +_02267F4A: + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov16_02267F70 +_02267F54: + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + bne _02267F6A + cmp r4, #0 + bne _02267F66 + mov r0, #0 + str r0, [r5, #0x34] + b _02267F6A +_02267F66: + mov r0, #0 + str r0, [r5, #0x44] +_02267F6A: + add r0, r6, #0 + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov16_02267EDC + + thumb_func_start ov16_02267F70 +ov16_02267F70: ; 0x02267F70 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + ldr r0, [r6, #4] + add r4, r1, #0 + ldr r0, [r0, #0] + bl sub_02021F98 + add r5, r0, #0 + cmp r4, #0 + beq _02267F8E + cmp r4, #1 + beq _02268040 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} +_02267F8E: + add r0, sp, #0x10 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + add r3, r6, #0 + ldr r0, [r6, #0x2c] + ldr r1, [r6, #0x28] + ldr r2, [r6, #0x30] + add r3, #0x34 + bl ov16_02268194 + mov r1, #0x30 + bl sub_0208C0D4 + cmp r0, #1 + beq _02267FBE + cmp r0, #2 + beq _02267FBA + cmp r0, #3 + bne _02267FBE + mov r0, #2 + b _02267FC0 +_02267FBA: + mov r0, #0xb + b _02267FC0 +_02267FBE: + mov r0, #0x14 +_02267FC0: + bl ov16_02268250 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0x25 + ldrb r0, [r0] + mov r4, #0 + lsl r1, r0, #3 + ldr r0, _022680D0 ; =0x0226F44E + ldrh r0, [r0, r1] + lsr r7, r0, #5 +_02267FD6: + cmp r4, r7 + add r0, sp, #0x10 + bge _02268006 + add r2, r6, #0 + add r2, #0x25 + ldrb r2, [r2] + ldrb r0, [r0, r4] + lsl r3, r2, #3 + ldr r2, _022680D4 ; =0x0226F44C + lsl r1, r0, #5 + ldrh r3, [r2, r3] + ldr r0, [sp, #0xc] + mov r2, #0x19 + lsl r2, r2, #0x16 + add r0, r0, r1 + add r3, r2, r3 + lsl r2, r4, #5 + ldr r1, [r5, #4] + add r2, r3, r2 + add r1, r1, r2 + mov r2, #0x20 + bl sub_020C4B18 + b _02268032 +_02268006: + ldrb r0, [r0, r4] + ldr r2, [r5, #4] + lsl r1, r0, #5 + ldr r0, [sp, #0xc] + add r0, r0, r1 + add r1, r6, #0 + add r1, #0x25 + ldrb r1, [r1] + lsl r3, r1, #3 + ldr r1, _022680D4 ; =0x0226F44C + add r1, r1, r3 + ldrh r3, [r1, #4] + mov r1, #0x19 + lsl r1, r1, #0x16 + add r1, r1, r3 + sub r3, r4, r7 + lsl r3, r3, #5 + add r1, r1, r3 + add r1, r2, r1 + mov r2, #0x20 + bl sub_020C4B18 +_02268032: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #6 + blo _02267FD6 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} +_02268040: + add r0, sp, #0x10 + str r0, [sp] + mov r0, #0xc + str r0, [sp, #4] + add r3, r6, #0 + ldr r0, [r6, #0x3c] + ldr r1, [r6, #0x38] + ldr r2, [r6, #0x40] + add r3, #0x44 + bl ov16_02268194 + add r6, #0x48 + ldrb r0, [r6] + cmp r0, #0x64 + bne _02268070 + mov r0, #0 + add r2, r0, #0 + add r1, sp, #0x10 +_02268064: + strb r2, [r1, r0] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0xc + blo _02268064 +_02268070: + mov r0, #0x1d + bl ov16_02268250 + add r6, r0, #0 + mov r1, #0x19 + mov r0, #0x66 + lsl r1, r1, #0x16 + lsl r0, r0, #4 + add r0, r1, r0 + str r0, [sp, #8] + mov r0, #0xe + lsl r0, r0, #8 + mov r4, #0 + add r7, r1, r0 +_0226808C: + cmp r4, #5 + add r0, sp, #0x10 + bhs _022680AA + ldrb r0, [r0, r4] + ldr r1, [sp, #8] + lsl r2, r4, #5 + lsl r0, r0, #5 + add r1, r1, r2 + ldr r3, [r5, #4] + add r0, r6, r0 + add r1, r3, r1 + mov r2, #0x20 + bl sub_020C4B18 + b _022680C0 +_022680AA: + ldrb r0, [r0, r4] + sub r2, r4, #5 + lsl r2, r2, #5 + lsl r0, r0, #5 + ldr r1, [r5, #4] + add r2, r7, r2 + add r1, r1, r2 + add r0, r6, r0 + mov r2, #0x20 + bl sub_020C4B18 +_022680C0: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0xc + blo _0226808C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_022680D0: .word 0x0226F44E +_022680D4: .word 0x0226F44C + thumb_func_end ov16_02267F70 + + thumb_func_start ov16_022680D8 +ov16_022680D8: ; 0x022680D8 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r2, sp, #0 + add r5, r3, #0 + ldrb r2, [r2, #0x10] + mov r3, #2 + ldr r4, [r5, #0] + lsl r2, r2, #0x1b + lsl r3, r3, #0x1e + lsr r2, r2, #0x18 + cmp r4, r3 + bne _022680FC + cmp r0, r2 + bge _022680FA + lsl r3, r1, #8 + str r3, [r5, #0] + b _022680FC +_022680FA: + str r1, [r5, #0] +_022680FC: + sub r4, r1, r6 + bpl _02268104 + mov r4, #0 + b _0226810A +_02268104: + cmp r4, r0 + ble _0226810A + add r4, r0, #0 +_0226810A: + cmp r0, r2 + bge _02268122 + ldr r3, [r5, #0] + asr r1, r3, #8 + cmp r4, r1 + bne _0226812E + lsl r1, r3, #0x18 + lsr r1, r1, #0x18 + bne _0226812E + mov r0, #0 + mvn r0, r0 + pop {r4, r5, r6, pc} +_02268122: + ldr r1, [r5, #0] + cmp r4, r1 + bne _0226812E + mov r0, #0 + mvn r0, r0 + pop {r4, r5, r6, pc} +_0226812E: + cmp r0, r2 + bge _0226816E + lsl r0, r0, #8 + add r1, r2, #0 + bl sub_020E1F6C + cmp r6, #0 + ldr r1, [r5, #0] + bge _02268152 + add r0, r1, r0 + str r0, [r5, #0] + asr r0, r0, #8 + cmp r0, r4 + blt _02268192 + lsl r0, r4, #8 + str r0, [r5, #0] + add r0, r4, #0 + pop {r4, r5, r6, pc} +_02268152: + sub r1, r1, r0 + str r1, [r5, #0] + asr r0, r1, #8 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + cmp r1, #0 + ble _02268162 + add r0, r0, #1 +_02268162: + cmp r0, r4 + bgt _02268192 + lsl r0, r4, #8 + str r0, [r5, #0] + add r0, r4, #0 + pop {r4, r5, r6, pc} +_0226816E: + cmp r6, #0 + ldr r1, [r5, #0] + add r0, sp, #0 + bge _02268184 + ldrh r0, [r0, #0x14] + add r0, r1, r0 + str r0, [r5, #0] + cmp r0, r4 + ble _02268190 + str r4, [r5, #0] + b _02268190 +_02268184: + ldrh r0, [r0, #0x14] + sub r0, r1, r0 + str r0, [r5, #0] + cmp r0, r4 + bge _02268190 + str r4, [r5, #0] +_02268190: + ldr r0, [r5, #0] +_02268192: + pop {r4, r5, r6, pc} + thumb_func_end ov16_022680D8 + + thumb_func_start ov16_02268194 +ov16_02268194: ; 0x02268194 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r5, [sp, #0x18] + sub r7, r1, r2 + bpl _022681A2 + mov r7, #0 + b _022681A8 +_022681A2: + cmp r7, r6 + ble _022681A8 + add r7, r6, #0 +_022681A8: + add r0, sp, #8 + ldrb r4, [r0, #0x14] + mov r1, #0 + lsl r2, r4, #3 + cmp r4, #0 + ble _022681BE + add r0, r1, #0 +_022681B6: + strb r0, [r5, r1] + add r1, r1, #1 + cmp r1, r4 + blt _022681B6 +_022681BE: + cmp r6, r2 + ldr r1, [r3, #0] + bhs _022681D2 + add r0, r1, #0 + mul r0, r2 + add r1, r6, #0 + bl sub_020E2178 + lsr r0, r0, #8 + b _022681DC +_022681D2: + add r0, r1, #0 + mul r0, r2 + add r1, r6, #0 + bl sub_020E2178 +_022681DC: + add r2, r0, #0 + cmp r0, #0 + bne _022681EC + cmp r7, #0 + ble _022681EC + mov r2, #1 + strb r2, [r5] + b _02268208 +_022681EC: + mov r3, #0 + cmp r4, #0 + ble _02268208 + mov r1, #8 +_022681F4: + cmp r0, #8 + blo _022681FE + strb r1, [r5, r3] + sub r0, #8 + b _02268202 +_022681FE: + strb r0, [r5, r3] + b _02268208 +_02268202: + add r3, r3, #1 + cmp r3, r4 + blt _022681F4 +_02268208: + lsl r0, r2, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02268194 + + thumb_func_start ov16_02268210 +ov16_02268210: ; 0x02268210 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + lsl r0, r3, #0x1b + add r5, r2, #0 + lsr r6, r0, #0x18 + sub r4, r7, r1 + bpl _02268222 + mov r4, #0 + b _02268228 +_02268222: + cmp r4, r5 + ble _02268228 + add r4, r5, #0 +_02268228: + add r0, r7, #0 + mul r0, r6 + add r1, r5, #0 + bl sub_020E1F6C + add r7, r0, #0 + add r0, r4, #0 + mul r0, r6 + add r1, r5, #0 + bl sub_020E1F6C + lsl r1, r7, #0x18 + lsl r0, r0, #0x18 + asr r1, r1, #0x18 + asr r0, r0, #0x18 + sub r0, r1, r0 + bl sub_020D4070 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_02268210 + + thumb_func_start ov16_02268250 +ov16_02268250: ; 0x02268250 + ldr r1, _02268258 ; =0x0226F6AC + lsl r0, r0, #5 + add r0, r1, r0 + bx lr + ; .align 2, 0 +_02268258: .word 0x0226F6AC + thumb_func_end ov16_02268250 + + thumb_func_start ov16_0226825C +ov16_0226825C: ; 0x0226825C + push {r3, lr} + cmp r0, #5 + bhi _022682A8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226826E: ; jump table + .short _0226827A - _0226826E - 2 ; case 0 + .short _02268294 - _0226826E - 2 ; case 1 + .short _02268298 - _0226826E - 2 ; case 2 + .short _0226829C - _0226826E - 2 ; case 3 + .short _022682A0 - _0226826E - 2 ; case 4 + .short _022682A4 - _0226826E - 2 ; case 5 +_0226827A: + mov r0, #2 + lsl r0, r0, #8 + tst r0, r1 + beq _02268286 + mov r0, #7 + pop {r3, pc} +_02268286: + mov r0, #0x20 + tst r0, r1 + beq _02268290 + mov r0, #6 + pop {r3, pc} +_02268290: + mov r0, #0 + pop {r3, pc} +_02268294: + mov r0, #1 + pop {r3, pc} +_02268298: + mov r0, #2 + pop {r3, pc} +_0226829C: + mov r0, #3 + pop {r3, pc} +_022682A0: + mov r0, #4 + pop {r3, pc} +_022682A4: + mov r0, #5 + pop {r3, pc} +_022682A8: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov16_0226825C + + thumb_func_start ov16_022682B0 +ov16_022682B0: ; 0x022682B0 + push {r3, lr} + cmp r0, #7 + bhi _022682EE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022682C2: ; jump table + .short _022682D2 - _022682C2 - 2 ; case 0 + .short _022682D6 - _022682C2 - 2 ; case 1 + .short _022682DA - _022682C2 - 2 ; case 2 + .short _022682DE - _022682C2 - 2 ; case 3 + .short _022682E2 - _022682C2 - 2 ; case 4 + .short _022682E6 - _022682C2 - 2 ; case 5 + .short _022682EA - _022682C2 - 2 ; case 6 + .short _022682EA - _022682C2 - 2 ; case 7 +_022682D2: + ldr r0, _022682F8 ; =0x0226F5B0 + pop {r3, pc} +_022682D6: + ldr r0, _022682FC ; =0x0226F5E4 + pop {r3, pc} +_022682DA: + ldr r0, _02268300 ; =0x0226F4AC + pop {r3, pc} +_022682DE: + ldr r0, _02268304 ; =0x0226F4E0 + pop {r3, pc} +_022682E2: + ldr r0, _02268308 ; =0x0226F548 + pop {r3, pc} +_022682E6: + ldr r0, _0226830C ; =0x0226F618 + pop {r3, pc} +_022682EA: + ldr r0, _02268310 ; =0x0226F57C + pop {r3, pc} +_022682EE: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + nop +_022682F8: .word 0x0226F5B0 +_022682FC: .word 0x0226F5E4 +_02268300: .word 0x0226F4AC +_02268304: .word 0x0226F4E0 +_02268308: .word 0x0226F548 +_0226830C: .word 0x0226F618 +_02268310: .word 0x0226F57C + thumb_func_end ov16_022682B0 + + thumb_func_start ov16_02268314 +ov16_02268314: ; 0x02268314 + push {r3, lr} + cmp r0, #7 + bhi _0226833E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02268326: ; jump table + .short _02268336 - _02268326 - 2 ; case 0 + .short _0226833A - _02268326 - 2 ; case 1 + .short _02268336 - _02268326 - 2 ; case 2 + .short _0226833A - _02268326 - 2 ; case 3 + .short _02268336 - _02268326 - 2 ; case 4 + .short _0226833A - _02268326 - 2 ; case 5 + .short _02268336 - _02268326 - 2 ; case 6 + .short _02268336 - _02268326 - 2 ; case 7 +_02268336: + ldr r0, _02268348 ; =0x0226F514 + pop {r3, pc} +_0226833A: + mov r0, #0 + pop {r3, pc} +_0226833E: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + nop +_02268348: .word 0x0226F514 + thumb_func_end ov16_02268314 + + thumb_func_start ov16_0226834C +ov16_0226834C: ; 0x0226834C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0 + strb r0, [r6] + mov r0, #5 + mov r1, #0xc + bl sub_02018144 + mov r1, #0 + mov r2, #0xc + add r4, r0, #0 + bl sub_020C4CF4 + mov r2, #0xfa + str r5, [r4, #0] + ldr r0, _0226837C ; =ov16_02268380 + add r1, r4, #0 + lsl r2, r2, #2 + str r6, [r4, #4] + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_0226837C: .word ov16_02268380 + thumb_func_end ov16_0226834C + + thumb_func_start ov16_02268380 +ov16_02268380: ; 0x02268380 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + bl ov16_0223E018 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + bl ov16_0223E064 + add r6, r0, #0 + ldrb r0, [r4, #8] + cmp r0, #0 + beq _022683AC + cmp r0, #1 + beq _022683CA + cmp r0, #2 + beq _022683FC + b _02268430 +_022683AC: + ldr r1, _0226845C ; =0x00004E27 + add r0, r5, #0 + mov r2, #1 + bl sub_0200D05C + add r5, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + ldr r0, [r0, #4] + bl sub_0200D41C + strb r5, [r4, #9] + ldrb r0, [r4, #8] + add r0, r0, #1 + strb r0, [r4, #8] +_022683CA: + mov r0, #0xa + ldrsb r1, [r4, r0] + add r1, r1, #2 + strb r1, [r4, #0xa] + ldrsb r1, [r4, r0] + cmp r1, #0xa + blt _022683E0 + strb r0, [r4, #0xa] + ldrb r0, [r4, #8] + add r0, r0, #1 + strb r0, [r4, #8] +_022683E0: + ldrb r0, [r4, #0xa] + mov r1, #2 + mov r3, #0x10 + str r0, [sp] + ldr r0, _02268460 ; =0x000073A5 + str r0, [sp, #4] + ldrb r2, [r4, #9] + add r0, r6, #0 + lsl r2, r2, #0x14 + lsr r2, r2, #0x10 + bl sub_020039B0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022683FC: + mov r0, #0xa + ldrsb r1, [r4, r0] + sub r1, r1, #2 + strb r1, [r4, #0xa] + ldrsb r0, [r4, r0] + cmp r0, #0 + bgt _02268414 + mov r0, #0 + strb r0, [r4, #0xa] + ldrb r0, [r4, #8] + add r0, r0, #1 + strb r0, [r4, #8] +_02268414: + ldrb r0, [r4, #0xa] + mov r1, #2 + mov r3, #0x10 + str r0, [sp] + ldr r0, _02268460 ; =0x000073A5 + str r0, [sp, #4] + ldrb r2, [r4, #9] + add r0, r6, #0 + lsl r2, r2, #0x14 + lsr r2, r2, #0x10 + bl sub_020039B0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02268430: + ldr r1, _02268464 ; =0x00004E26 + add r0, r5, #0 + mov r2, #1 + bl sub_0200D05C + add r1, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #4] + bl sub_0200D41C + ldr r0, [r4, #4] + mov r1, #1 + strb r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226845C: .word 0x00004E27 +_02268460: .word 0x000073A5 +_02268464: .word 0x00004E26 + thumb_func_end ov16_02268380 + + thumb_func_start ov16_02268468 +ov16_02268468: ; 0x02268468 + bx lr + ; .align 2, 0 + thumb_func_end ov16_02268468 + + thumb_func_start ov16_0226846C +ov16_0226846C: ; 0x0226846C + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226846C + + thumb_func_start ov16_02268470 +ov16_02268470: ; 0x02268470 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #0 + bne _0226848E + add r0, r4, #0 + mov r1, #0 + add r0, #0x54 + strh r1, [r0] + ldr r0, _02268490 ; =ov16_022684BC + ldr r2, _02268494 ; =0x000003F2 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x50] +_0226848E: + pop {r4, pc} + ; .align 2, 0 +_02268490: .word ov16_022684BC +_02268494: .word 0x000003F2 + thumb_func_end ov16_02268470 + + thumb_func_start ov16_02268498 +ov16_02268498: ; 0x02268498 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #0 + beq _022684AA + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x50] +_022684AA: + add r0, r4, #0 + mov r1, #0 + add r0, #0x54 + strh r1, [r0] + add r0, r4, #0 + add r2, r1, #0 + bl ov16_0226763C + pop {r4, pc} + thumb_func_end ov16_02268498 + + thumb_func_start ov16_022684BC +ov16_022684BC: ; 0x022684BC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r1, #0x54 + ldrh r2, [r1] + add r1, r4, #0 + add r1, #0x54 + add r2, #0x14 + strh r2, [r1] + add r1, r4, #0 + add r1, #0x54 + ldrh r2, [r1] + mov r1, #0x5a + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x54 + cmp r2, r1 + blo _022684E4 + ldrh r2, [r0] + sub r1, r2, r1 + strh r1, [r0] +_022684E4: + add r0, r4, #0 + add r0, #0x54 + ldrh r0, [r0] + bl sub_0201D15C + mov r2, #6 + asr r1, r0, #0x1f + lsl r2, r2, #0xa + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + add r3, r0, #0 + add r5, r1, #0 + mov r1, #0 + lsl r2, r2, #0xa + add r0, r4, #0 + add r3, r3, r2 + adc r5, r1 + lsl r2, r5, #0x14 + lsr r3, r3, #0xc + orr r3, r2 + asr r2, r3, #0xb + lsr r2, r2, #0x14 + add r2, r3, r2 + asr r2, r2, #0xc + bl ov16_0226763C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_022684BC + + .rodata + + + .global Unk_ov16_0226F334 +Unk_ov16_0226F334: ; 0x0226F334 + .incbin "incbin/overlay16_rodata.bin", 0x10D8, 0x10E0 - 0x10D8 + + .global Unk_ov16_0226F33C +Unk_ov16_0226F33C: ; 0x0226F33C + .incbin "incbin/overlay16_rodata.bin", 0x10E0, 0x10F0 - 0x10E0 + + .global Unk_ov16_0226F34C +Unk_ov16_0226F34C: ; 0x0226F34C + .incbin "incbin/overlay16_rodata.bin", 0x10F0, 0x1100 - 0x10F0 + + .global Unk_ov16_0226F35C +Unk_ov16_0226F35C: ; 0x0226F35C + .incbin "incbin/overlay16_rodata.bin", 0x1100, 0x1118 - 0x1100 + + .global Unk_ov16_0226F374 +Unk_ov16_0226F374: ; 0x0226F374 + .incbin "incbin/overlay16_rodata.bin", 0x1118, 0x1130 - 0x1118 + + .global Unk_ov16_0226F38C +Unk_ov16_0226F38C: ; 0x0226F38C + .incbin "incbin/overlay16_rodata.bin", 0x1130, 0x1148 - 0x1130 + + .global Unk_ov16_0226F3A4 +Unk_ov16_0226F3A4: ; 0x0226F3A4 + .incbin "incbin/overlay16_rodata.bin", 0x1148, 0x1160 - 0x1148 + + .global Unk_ov16_0226F3BC +Unk_ov16_0226F3BC: ; 0x0226F3BC + .incbin "incbin/overlay16_rodata.bin", 0x1160, 0x1178 - 0x1160 + + .global Unk_ov16_0226F3D4 +Unk_ov16_0226F3D4: ; 0x0226F3D4 + .incbin "incbin/overlay16_rodata.bin", 0x1178, 0x1190 - 0x1178 + + .global Unk_ov16_0226F3EC +Unk_ov16_0226F3EC: ; 0x0226F3EC + .incbin "incbin/overlay16_rodata.bin", 0x1190, 0x11C0 - 0x1190 + + .global Unk_ov16_0226F41C +Unk_ov16_0226F41C: ; 0x0226F41C + .incbin "incbin/overlay16_rodata.bin", 0x11C0, 0x11F0 - 0x11C0 + + .global Unk_ov16_0226F44C +Unk_ov16_0226F44C: ; 0x0226F44C + .incbin "incbin/overlay16_rodata.bin", 0x11F0, 0x1220 - 0x11F0 + + .global Unk_ov16_0226F47C +Unk_ov16_0226F47C: ; 0x0226F47C + .incbin "incbin/overlay16_rodata.bin", 0x1220, 0x1250 - 0x1220 + + .global Unk_ov16_0226F4AC +Unk_ov16_0226F4AC: ; 0x0226F4AC + .incbin "incbin/overlay16_rodata.bin", 0x1250, 0x1284 - 0x1250 + + .global Unk_ov16_0226F4E0 +Unk_ov16_0226F4E0: ; 0x0226F4E0 + .incbin "incbin/overlay16_rodata.bin", 0x1284, 0x12B8 - 0x1284 + + .global Unk_ov16_0226F514 +Unk_ov16_0226F514: ; 0x0226F514 + .incbin "incbin/overlay16_rodata.bin", 0x12B8, 0x12EC - 0x12B8 + + .global Unk_ov16_0226F548 +Unk_ov16_0226F548: ; 0x0226F548 + .incbin "incbin/overlay16_rodata.bin", 0x12EC, 0x1320 - 0x12EC + + .global Unk_ov16_0226F57C +Unk_ov16_0226F57C: ; 0x0226F57C + .incbin "incbin/overlay16_rodata.bin", 0x1320, 0x1354 - 0x1320 + + .global Unk_ov16_0226F5B0 +Unk_ov16_0226F5B0: ; 0x0226F5B0 + .incbin "incbin/overlay16_rodata.bin", 0x1354, 0x1388 - 0x1354 + + .global Unk_ov16_0226F5E4 +Unk_ov16_0226F5E4: ; 0x0226F5E4 + .incbin "incbin/overlay16_rodata.bin", 0x1388, 0x13BC - 0x1388 + + .global Unk_ov16_0226F618 +Unk_ov16_0226F618: ; 0x0226F618 + .incbin "incbin/overlay16_rodata.bin", 0x13BC, 0x13F0 - 0x13BC + + .global Unk_ov16_0226F64C +Unk_ov16_0226F64C: ; 0x0226F64C + .incbin "incbin/overlay16_rodata.bin", 0x13F0, 0x1450 - 0x13F0 + + .global Unk_ov16_0226F6AC +Unk_ov16_0226F6AC: ; 0x0226F6AC + .incbin "incbin/overlay16_rodata.bin", 0x1450, 0x9C0 + diff --git a/asm/ov16_02268520.s b/asm/ov16_02268520.s new file mode 100644 index 000000000..30a6a2750 --- /dev/null +++ b/asm/ov16_02268520.s @@ -0,0 +1,278 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_02268520 +ov16_02268520: ; 0x02268520 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r4, r0, #0 + ldr r0, [r5, #4] + bl ov16_0223E010 + str r0, [sp, #0x24] + ldr r0, [r5, #4] + bl ov16_0223E018 + str r0, [sp, #0x20] + ldr r0, [r5, #4] + bl ov16_0223EC04 + add r7, r0, #0 + ldrb r0, [r5, #8] + cmp r0, #0 + ldrb r0, [r5, #9] + bne _02268566 + lsl r1, r0, #1 + ldr r0, _02268614 ; =0x0227009C + ldrh r3, [r0, r1] + ldr r0, _02268618 ; =0x00004E2D + mov r1, #0x80 + str r1, [sp, #0x1c] + add r6, r0, #0 + mov r1, #0x81 + sub r6, #8 + str r1, [sp, #0x18] + b _0226857A +_02268566: + lsl r1, r0, #1 + ldr r0, _0226861C ; =0x0227006C + ldrh r3, [r0, r1] + ldr r0, _02268620 ; =0x00004E2E + mov r1, #0x83 + str r1, [sp, #0x1c] + add r6, r0, #0 + mov r1, #0x84 + sub r6, #8 + str r1, [sp, #0x18] +_0226857A: + mov r1, #1 + str r1, [sp] + str r1, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x20] + add r2, r4, #0 + bl sub_0200CC3C + ldr r0, [r5, #4] + bl ov16_0223E064 + str r4, [sp] + ldrb r1, [r5, #9] + mov r2, #6 + add r3, r1, #0 + mul r3, r2 + ldr r2, _02268624 ; =0x02270134 + lsl r1, r7, #1 + add r2, r2, r3 + ldrh r1, [r1, r2] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x20] + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #1 + str r1, [sp, #0xc] + str r1, [sp, #0x10] + ldr r1, _02268628 ; =0x00004E29 + str r1, [sp, #0x14] + mov r1, #2 + bl sub_0200CDC4 + ldr r0, [r5, #4] + bl ov16_0223E064 + mov r1, #0 + str r1, [sp] + mov r1, #0x20 + str r1, [sp, #4] + mov r1, #0x70 + str r1, [sp, #8] + ldrb r2, [r5, #9] + mov r3, #6 + lsl r5, r7, #1 + mul r3, r2 + ldr r2, _02268624 ; =0x02270134 + mov r1, #0x1b + add r2, r2, r3 + ldrh r2, [r5, r2] + mov r3, #5 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x20] + ldr r3, [sp, #0x1c] + add r2, r4, #0 + str r6, [sp, #4] + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x20] + ldr r3, [sp, #0x18] + add r2, r4, #0 + str r6, [sp, #4] + bl sub_0200CE54 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268614: .word 0x0227009C +_02268618: .word 0x00004E2D +_0226861C: .word 0x0227006C +_02268620: .word 0x00004E2E +_02268624: .word 0x02270134 +_02268628: .word 0x00004E29 + thumb_func_end ov16_02268520 + + thumb_func_start ov16_0226862C +ov16_0226862C: ; 0x0226862C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov16_0223E010 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov16_0223E018 + add r1, r0, #0 + add r0, r5, #0 + ldrb r3, [r4, #8] + mov r2, #0x34 + ldr r5, _0226865C ; =0x022700CC + mul r2, r3 + add r2, r5, r2 + bl sub_0200CE6C + str r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + pop {r3, r4, r5, pc} + nop +_0226865C: .word 0x022700CC + thumb_func_end ov16_0226862C + + thumb_func_start ov16_02268660 +ov16_02268660: ; 0x02268660 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02268672 + bl sub_0200D0F4 + mov r0, #0 + str r0, [r4, #0] +_02268672: + pop {r4, pc} + thumb_func_end ov16_02268660 + + thumb_func_start ov16_02268674 +ov16_02268674: ; 0x02268674 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + bl ov16_0223E018 + add r4, r0, #0 + ldrb r0, [r5, #8] + cmp r0, #0 + bne _0226868A + ldr r1, _022686B0 ; =0x00004E2D + b _0226868C +_0226868A: + ldr r1, _022686B4 ; =0x00004E2E +_0226868C: + add r5, r1, #0 + add r0, r4, #0 + sub r5, #8 + bl sub_0200D070 + ldr r1, _022686B8 ; =0x00004E29 + add r0, r4, #0 + bl sub_0200D080 + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200D090 + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200D0A0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022686B0: .word 0x00004E2D +_022686B4: .word 0x00004E2E +_022686B8: .word 0x00004E29 + thumb_func_end ov16_02268674 + + thumb_func_start ov16_022686BC +ov16_022686BC: ; 0x022686BC + push {r3, lr} + ldr r0, [r0, #0] + cmp r0, #0 + beq _022686C8 + bl sub_0200D3F4 +_022686C8: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_022686BC + + thumb_func_start ov16_022686CC +ov16_022686CC: ; 0x022686CC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + mov r0, #0 + add r1, r5, #0 + mov r2, #0x10 + add r7, r3, #0 + bl sub_020C4BB8 + str r4, [r5, #4] + strb r6, [r5, #8] + strb r7, [r5, #9] + cmp r7, #0x18 + blt _022686F2 + bl sub_02022974 + mov r0, #0 + strb r0, [r5, #9] +_022686F2: + add r0, r5, #0 + bl ov16_02268520 + add r0, r5, #0 + bl ov16_0226862C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_022686CC + + thumb_func_start ov16_02268700 +ov16_02268700: ; 0x02268700 + push {r4, lr} + add r4, r0, #0 + bl ov16_02268660 + add r0, r4, #0 + bl ov16_02268674 + mov r0, #0 + add r1, r4, #0 + mov r2, #0x10 + bl sub_020C4BB8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_02268700 + + .rodata + + + .global Unk_ov16_0227006C +Unk_ov16_0227006C: ; 0x0227006C + .incbin "incbin/overlay16_rodata.bin", 0x1E10, 0x1E40 - 0x1E10 + + .global Unk_ov16_0227009C +Unk_ov16_0227009C: ; 0x0227009C + .incbin "incbin/overlay16_rodata.bin", 0x1E40, 0x1E70 - 0x1E40 + + .global Unk_ov16_022700CC +Unk_ov16_022700CC: ; 0x022700CC + .incbin "incbin/overlay16_rodata.bin", 0x1E70, 0x1ED8 - 0x1E70 + + .global Unk_ov16_02270134 +Unk_ov16_02270134: ; 0x02270134 + .incbin "incbin/overlay16_rodata.bin", 0x1ED8, 0x90 + diff --git a/asm/ov16_0226871C.s b/asm/ov16_0226871C.s new file mode 100644 index 000000000..a4f2c5650 --- /dev/null +++ b/asm/ov16_0226871C.s @@ -0,0 +1,9582 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0226871C +ov16_0226871C: ; 0x0226871C + push {r4, lr} + ldr r1, _0226873C ; =0x000006EC + mov r0, #5 + bl sub_02018144 + ldr r2, _0226873C ; =0x000006EC + mov r1, #0 + add r4, r0, #0 + bl sub_020C4CF4 + mov r1, #0 + ldr r0, _02268740 ; =0x0000068B + mvn r1, r1 + strb r1, [r4, r0] + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 +_0226873C: .word 0x000006EC +_02268740: .word 0x0000068B + thumb_func_end ov16_0226871C + + thumb_func_start ov16_02268744 +ov16_02268744: ; 0x02268744 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r6, _02268798 ; =0x02270540 + add r5, r0, #0 + add r7, r4, #0 +_0226874E: + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r2, r6, #0 + add r3, r7, #0 + bl sub_020183C4 + add r1, r4, #4 + lsl r1, r1, #0x18 + ldr r2, _0226879C ; =0x000002FF + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019EE0 + add r1, r4, #4 + lsl r1, r1, #0x18 + mov r2, #0 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02019184 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r4, r4, #1 + add r6, #0x1c + cmp r4, #4 + blo _0226874E + pop {r3, r4, r5, r6, r7, pc} + nop +_02268798: .word 0x02270540 +_0226879C: .word 0x000002FF + thumb_func_end ov16_02268744 + + thumb_func_start ov16_022687A0 +ov16_022687A0: ; 0x022687A0 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_022687A8: + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r6, #0 + bl sub_02019120 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + cmp r4, #4 + blo _022687A8 + pop {r4, r5, r6, pc} + thumb_func_end ov16_022687A0 + + thumb_func_start ov16_022687C8 +ov16_022687C8: ; 0x022687C8 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r2, [sp, #0xc] + add r4, r3, #0 + bl ov16_0226871C + add r6, r0, #0 + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x38] + str r0, [r6, #0] + ldr r0, _022689F0 ; =0x0000068D + cmp r1, #0 + strb r4, [r6, r0] + str r1, [r6, #4] + beq _022687EC + ldrb r1, [r1] + add r0, #0x53 + strb r1, [r6, r0] +_022687EC: + ldr r0, [sp, #0xc] + bl ov16_0223E064 + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + bl ov16_0223E240 + str r0, [sp, #0x14] + cmp r0, #0x17 + blo _02268808 + mov r0, #0 + str r0, [sp, #0x14] + bl sub_02022974 +_02268808: + mov r0, #0xd + mov r1, #5 + bl sub_02012744 + ldr r2, _022689F4 ; =0x000004CC + add r1, r6, #0 + str r0, [r6, r2] + ldr r0, _022689F8 ; =ov16_0226BCE4 + add r2, #0x52 + bl sub_0200D9E8 + ldr r1, _022689FC ; =0x00000698 + mov r4, #0 + str r0, [r6, r1] + ldr r7, _02268A00 ; =0x02270264 + b _0226887E +_02268828: + mov r1, #2 + mov r0, #5 + lsl r1, r1, #0xa + bl sub_02018144 + lsl r1, r4, #2 + add r1, r6, r1 + str r0, [r1, #0x40] + ldr r0, [sp, #0xc] + bl ov16_0223DF0C + mov r1, #0x80 + tst r0, r1 + beq _02268850 + lsl r0, r4, #1 + ldrh r0, [r7, r0] + cmp r0, #0x31 + bne _02268850 + mov r1, #0xaa + b _02268854 +_02268850: + lsl r0, r4, #1 + ldrh r1, [r7, r0] +_02268854: + mov r0, #5 + str r0, [sp] + mov r0, #7 + mov r2, #1 + add r3, sp, #0x20 + bl sub_02006F6C + add r5, r0, #0 + lsl r0, r4, #2 + add r0, r6, r0 + ldr r1, [r0, #0x40] + ldr r0, [sp, #0x20] + mov r2, #2 + add r0, #0xc + lsl r2, r2, #0xa + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + add r4, r4, #1 +_0226887E: + cmp r4, #7 + blt _02268828 + ldr r0, [sp, #0xc] + bl ov16_0223DF0C + mov r4, #0x80 + tst r0, r4 + beq _02268892 + add r4, #0xd4 + b _02268894 +_02268892: + mov r4, #0xf2 +_02268894: + mov r1, #2 + mov r0, #5 + lsl r1, r1, #8 + bl sub_02018144 + str r0, [r6, #0x5c] + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x18] + mov r1, #7 + add r2, r4, #0 + mov r3, #5 + bl sub_02003050 + ldr r0, [sp, #0x14] + ldr r2, _02268A04 ; =0x022704E4 + lsl r3, r0, #2 + ldrh r1, [r2, r3] + ldr r0, _02268A08 ; =0x0000FFFF + cmp r1, r0 + beq _022688DC + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldrh r2, [r2, r3] + ldr r0, [sp, #0x18] + mov r1, #7 + mov r3, #5 + bl sub_02003050 +_022688DC: + ldr r0, [sp, #0x18] + mov r1, #1 + bl sub_02003164 + mov r2, #2 + ldr r1, [r6, #0x5c] + lsl r2, r2, #8 + bl sub_020C4B18 + add r5, r6, #0 + mov r7, #0x46 + mov r4, #0 + add r5, #0x6c + lsl r7, r7, #2 + b _0226890A +_022688FA: + add r0, r4, #0 + mul r0, r7 + add r0, r5, r0 + mov r1, #0xff + mov r2, #0x18 + bl sub_020C4CF4 + add r4, r4, #1 +_0226890A: + cmp r4, #4 + blt _022688FA + mov r0, #0 + str r0, [sp, #0x10] + mov r7, #6 + b _02268946 +_02268916: + mov r0, #0x46 + ldr r1, [sp, #0x10] + lsl r0, r0, #2 + mul r0, r1 + mov r5, #0 + add r4, r6, r0 + b _0226893C +_02268924: + add r0, r7, #0 + bl sub_0208C098 + add r1, r0, #0 + mov r0, #5 + bl sub_02018144 + lsl r1, r5, #2 + add r1, r4, r1 + add r1, #0x84 + str r0, [r1, #0] + add r5, r5, #1 +_0226893C: + cmp r5, #4 + blt _02268924 + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] +_02268946: + ldr r0, [sp, #0x10] + cmp r0, #4 + blt _02268916 + mov r0, #5 + mov r1, #0x40 + bl sub_02018144 + str r0, [r6, #0x60] + mov r0, #5 + mov r1, #0x40 + bl sub_02018144 + str r0, [r6, #0x64] + ldr r1, [r6, #0x60] + ldr r0, [r6, #0x5c] + mov r2, #0x20 + bl sub_020C4B18 + ldr r1, [r6, #0x60] + ldr r0, [r6, #0x5c] + add r1, #0x20 + add r0, #0xe0 + mov r2, #0x20 + bl sub_020C4B18 + ldr r0, [sp, #0xc] + bl ov16_0223DF0C + mov r2, #0x80 + tst r0, r2 + beq _0226898A + add r1, r2, #0 + add r1, #0xd5 + b _0226899E +_0226898A: + ldr r0, [sp, #0x14] + lsl r1, r0, #2 + ldr r0, _02268A04 ; =0x022704E4 + add r0, r0, r1 + ldrh r1, [r0, #2] + ldr r0, _02268A08 ; =0x0000FFFF + cmp r1, r0 + bne _0226899E + add r1, r2, #0 + add r1, #0x8b +_0226899E: + mov r0, #7 + add r2, sp, #0x1c + mov r3, #5 + bl sub_02006F88 + add r4, r0, #0 + ldr r0, [sp, #0xc] + bl ov16_0223DF0C + mov r1, #0x80 + tst r0, r1 + ldr r1, [r6, #0x64] + beq _022689C4 + ldr r0, [sp, #0x1c] + mov r2, #0x40 + ldr r0, [r0, #0xc] + bl sub_020C4B18 + b _022689CE +_022689C4: + ldr r0, [sp, #0x1c] + mov r2, #0x20 + ldr r0, [r0, #0xc] + bl sub_020C4B18 +_022689CE: + add r0, r4, #0 + bl sub_020181C4 + bl sub_02002B4C + bl sub_02002B6C + ldr r0, _02268A0C ; =ov16_0226BD74 + ldr r2, _02268A10 ; =0x0000D6D8 + add r1, r6, #0 + bl sub_0200D9E8 + str r0, [r6, #0x68] + add r0, r6, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_022689F0: .word 0x0000068D +_022689F4: .word 0x000004CC +_022689F8: .word ov16_0226BCE4 +_022689FC: .word 0x00000698 +_02268A00: .word 0x02270264 +_02268A04: .word 0x022704E4 +_02268A08: .word 0x0000FFFF +_02268A0C: .word ov16_0226BD74 +_02268A10: .word 0x0000D6D8 + thumb_func_end ov16_022687C8 + + thumb_func_start ov16_02268A14 +ov16_02268A14: ; 0x02268A14 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r1, [r6, #4] + cmp r1, #0 + beq _02268A26 + mov r0, #0x6e + lsl r0, r0, #4 + ldrb r0, [r6, r0] + strb r0, [r1] +_02268A26: + add r0, r6, #0 + bl ov16_0226B1E8 + add r0, r6, #0 + bl ov16_02268F00 + add r0, r6, #0 + bl ov16_02268B8C + ldr r0, _02268A80 ; =0x000004CC + ldr r0, [r6, r0] + bl sub_020127BC + ldr r0, _02268A84 ; =0x00000698 + ldr r0, [r6, r0] + bl sub_0200DA58 + mov r4, #0 + add r5, r6, #0 +_02268A4C: + ldr r0, [r5, #0x40] + bl sub_020181C4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + blt _02268A4C + ldr r0, [r6, #0x5c] + bl sub_020181C4 + add r0, r6, #0 + bl ov16_0226ABE8 + ldr r0, [r6, #0x60] + bl sub_020181C4 + ldr r0, [r6, #0x64] + bl sub_020181C4 + ldr r0, [r6, #0x68] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02268A80: .word 0x000004CC +_02268A84: .word 0x00000698 + thumb_func_end ov16_02268A14 + + thumb_func_start ov16_02268A88 +ov16_02268A88: ; 0x02268A88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + ldr r0, [r7, #0] + bl ov16_0223E010 + add r6, r0, #0 + ldr r0, [r7, #0] + bl ov16_0223E018 + add r4, r0, #0 + ldr r0, [r7, #0] + bl ov16_0223DF00 + add r5, r0, #0 + ldr r0, [r7, #0] + bl ov16_0223E064 + str r0, [sp, #0x14] + ldr r0, [r7, #0] + bl ov16_0223DF0C + mov r1, #0x80 + tst r0, r1 + beq _02268ABE + mov r1, #0xa9 + b _02268AC0 +_02268ABE: + mov r1, #0x1c +_02268AC0: + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #7 + add r2, r5, #0 + mov r3, #4 + bl sub_02006E3C + ldr r2, _02268B70 ; =0x00004E31 + add r0, r6, #0 + add r1, r4, #0 + add r3, r2, #0 + bl sub_0207C9EC + ldr r0, [r7, #0] + bl ov16_0223E064 + mov r1, #2 + str r1, [sp] + ldr r1, _02268B74 ; =0x00004E34 + add r2, r6, #0 + str r1, [sp, #4] + mov r1, #3 + add r3, r4, #0 + bl sub_0207C9B0 + mov r5, #0 +_02268B02: + ldr r0, _02268B78 ; =0x00004E39 + add r1, r4, #0 + add r0, r5, r0 + str r0, [sp] + add r0, r6, #0 + mov r2, #2 + mov r3, #0 + bl sub_0207C948 + add r5, r5, #1 + cmp r5, #4 + blt _02268B02 + ldr r0, [r7, #0] + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + beq _02268B6A + ldr r1, _02268B7C ; =0x00004FBC + ldr r0, _02268B80 ; =0x00004E44 + str r1, [sp] + str r0, [sp, #4] + sub r0, r1, #6 + str r0, [sp, #8] + sub r1, #0x11 + str r1, [sp, #0xc] + ldr r3, [sp, #0x14] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #5 + bl ov16_0226DE44 + ldr r0, _02268B80 ; =0x00004E44 + ldr r3, _02268B84 ; =0x00004FB6 + str r0, [sp] + add r0, r3, #0 + str r3, [sp, #4] + sub r0, #0xb + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #5 + add r3, r3, #6 + bl ov16_0226DEEC + ldr r1, _02268B88 ; =0x000006E4 + str r0, [r7, r1] +_02268B6A: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02268B70: .word 0x00004E31 +_02268B74: .word 0x00004E34 +_02268B78: .word 0x00004E39 +_02268B7C: .word 0x00004FBC +_02268B80: .word 0x00004E44 +_02268B84: .word 0x00004FB6 +_02268B88: .word 0x000006E4 + thumb_func_end ov16_02268A88 + + thumb_func_start ov16_02268B8C +ov16_02268B8C: ; 0x02268B8C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0] + bl ov16_0223E010 + ldr r0, [r7, #0] + bl ov16_0223E018 + ldr r6, _02268BEC ; =0x00004E39 + add r5, r0, #0 + mov r4, #0 +_02268BA2: + add r0, r5, #0 + add r1, r4, r6 + bl sub_0207CA34 + add r4, r4, #1 + cmp r4, #4 + blt _02268BA2 + ldr r1, _02268BF0 ; =0x00004E34 + add r0, r5, #0 + bl sub_0207CA3C + ldr r1, _02268BF4 ; =0x00004E31 + add r0, r5, #0 + add r2, r1, #0 + bl sub_0207CA44 + ldr r0, [r7, #0] + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + beq _02268BEA + ldr r0, _02268BF8 ; =0x000006E4 + ldr r0, [r7, r0] + bl ov16_0226DF68 + ldr r3, _02268BFC ; =0x00004FAB + ldr r2, _02268C00 ; =0x00004E44 + add r1, r3, #0 + str r3, [sp] + add r0, r5, #0 + add r1, #0x11 + add r3, #0xb + bl ov16_0226DEC4 +_02268BEA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268BEC: .word 0x00004E39 +_02268BF0: .word 0x00004E34 +_02268BF4: .word 0x00004E31 +_02268BF8: .word 0x000006E4 +_02268BFC: .word 0x00004FAB +_02268C00: .word 0x00004E44 + thumb_func_end ov16_02268B8C + + thumb_func_start ov16_02268C04 +ov16_02268C04: ; 0x02268C04 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r0, [sp, #0x48] + str r1, [sp, #0x18] + str r0, [sp, #0x48] + ldr r0, [sp, #0x4c] + add r7, r2, #0 + str r3, [sp, #0x1c] + cmp r0, #0 + beq _02268C22 + add r1, r7, #0 + add r1, #0x1c + mov r2, #0x22 + bl sub_020C4DB0 +_02268C22: + ldr r0, _02268D24 ; =0x0000068E + mov r1, #0 + strb r1, [r7, r0] + ldr r0, [r7, #0] + bl ov16_0223DF00 + str r0, [sp, #0x28] + ldr r0, [r7, #0] + bl ov16_0223E010 + str r0, [sp, #0x24] + ldr r0, [r7, #0] + bl ov16_0223E018 + str r0, [sp, #0x20] + ldr r0, _02268D28 ; =0x0000068B + ldrsb r2, [r7, r0] + mov r0, #0 + mvn r0, r0 + cmp r2, r0 + bne _02268C54 + mov r0, #1 + str r0, [sp, #0x48] + mov r5, #0 + b _02268C5C +_02268C54: + mov r0, #0x30 + ldr r1, _02268D2C ; =0x02270670 + mul r0, r2 + add r5, r1, r0 +_02268C5C: + ldr r0, [sp, #0x1c] + mov r1, #0x30 + ldr r2, _02268D2C ; =0x02270670 + mul r1, r0 + add r0, r2, r1 + str r0, [sp, #0x2c] + ldr r0, [r7, #0] + bl ov16_0223E064 + mov r1, #2 + lsl r1, r1, #8 + str r1, [sp] + ldr r1, [r7, #0x5c] + mov r2, #1 + mov r3, #0 + bl sub_02002FBC + ldr r6, [sp, #0x2c] + mov r4, #0 +_02268C82: + ldrh r2, [r6, #4] + ldr r0, _02268D30 ; =0x0000FFFF + cmp r2, r0 + beq _02268CB8 + ldr r0, [sp, #0x48] + cmp r0, #1 + beq _02268C96 + ldrh r0, [r5, #4] + cmp r2, r0 + beq _02268CB8 +_02268C96: + lsl r2, r2, #2 + add r1, r4, #4 + add r2, r7, r2 + lsl r1, r1, #0x18 + mov r3, #2 + ldr r0, [sp, #0x28] + ldr r2, [r2, #0x40] + lsr r1, r1, #0x18 + lsl r3, r3, #0xa + bl sub_02019574 + add r1, r4, #4 + lsl r1, r1, #0x18 + ldr r0, [sp, #0x28] + lsr r1, r1, #0x18 + bl sub_0201C3C0 +_02268CB8: + add r4, r4, #1 + add r6, r6, #2 + add r5, r5, #2 + cmp r4, #4 + blt _02268C82 + ldr r0, [r7, #0] + bl ov16_0223E064 + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x24] + str r1, [sp] + mov r1, #0x48 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #7 + str r1, [sp, #0xc] + mov r1, #2 + str r1, [sp, #0x10] + ldr r1, _02268D34 ; =0x00004E37 + ldr r3, [sp, #0x20] + str r1, [sp, #0x14] + mov r1, #3 + bl sub_0200CDC4 + ldr r1, _02268D28 ; =0x0000068B + ldr r0, [sp, #0x1c] + mov r2, #0xf + strb r0, [r7, r1] + mov r0, #0xc + str r0, [sp] + ldr r0, _02268D38 ; =0x04001050 + mov r1, #2 + mov r3, #8 + bl sub_020BF55C + add r0, r7, #0 + bl ov16_0226B1E8 + ldr r0, [sp, #0x2c] + ldr r3, [r0, #0x28] + cmp r3, #0 + beq _02268D16 + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x48] + add r0, r7, #0 + blx r3 +_02268D16: + ldr r0, _02268D3C ; =ov16_0226BC50 + add r1, r7, #0 + mov r2, #0xa + bl sub_0200DA3C + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268D24: .word 0x0000068E +_02268D28: .word 0x0000068B +_02268D2C: .word 0x02270670 +_02268D30: .word 0x0000FFFF +_02268D34: .word 0x00004E37 +_02268D38: .word 0x04001050 +_02268D3C: .word ov16_0226BC50 + thumb_func_end ov16_02268C04 + + thumb_func_start ov16_02268D40 +ov16_02268D40: ; 0x02268D40 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r1, [sp, #0x14] + add r4, r0, #0 + ldr r1, _02268ECC ; =0x000005D8 + ldr r0, [sp, #0x14] + ldr r0, [r0, r1] + cmp r0, #0 + bne _02268D5C + ldr r0, [sp, #0x14] + add r1, #0x18 + ldr r0, [r0, r1] + cmp r0, #0 + beq _02268D60 +_02268D5C: + bl sub_02022974 +_02268D60: + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + bl ov16_0223E010 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + bl ov16_0223E018 + add r7, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02268ED0 ; =0x00004E37 + add r1, r7, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + add r2, r4, #0 + mov r3, #0xd0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02268ED4 ; =0x00004E2F + add r1, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + add r2, r4, #0 + mov r3, #0xcf + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02268ED4 ; =0x00004E2F + add r1, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + add r2, r4, #0 + mov r3, #0xd1 + bl sub_0200CE54 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02268ED8 ; =0x00004E38 + add r1, r7, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + add r2, r4, #0 + mov r3, #0xcd + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02268EDC ; =0x00004E30 + add r1, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + add r2, r4, #0 + mov r3, #0xcc + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02268EDC ; =0x00004E30 + add r1, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + add r2, r4, #0 + mov r3, #0xce + bl sub_0200CE54 + mov r0, #0 + ldr r4, [sp, #0x14] + str r0, [sp, #0x1c] + mov r6, #0xc + mov r5, #0xf6 +_02268DFE: + ldr r0, [sp, #0x18] + ldr r2, _02268EE0 ; =0x02270414 + add r1, r7, #0 + bl sub_0200CE6C + ldr r1, _02268ECC ; =0x000005D8 + mov r3, #0x11 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + lsl r1, r6, #0x10 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + mov r2, #0xd + lsl r3, r3, #0x10 + bl sub_0200D4D0 + ldr r0, _02268ECC ; =0x000005D8 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0200D6A4 + ldr r0, [sp, #0x18] + ldr r2, _02268EE4 ; =0x02270448 + add r1, r7, #0 + bl sub_0200CE6C + mov r1, #0x5f + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + lsl r1, r5, #0x10 + mov r3, #0x11 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + mov r2, #9 + lsl r3, r3, #0x10 + bl sub_0200D4D0 + ldr r0, [sp, #0x1c] + add r4, r4, #4 + add r0, r0, #1 + add r6, #0x13 + sub r5, #0xc + str r0, [sp, #0x1c] + cmp r0, #6 + blt _02268DFE + ldr r0, [sp, #0x14] + bl ov16_02269218 + ldr r0, [sp, #0x14] + ldr r0, [r0, #8] + cmp r0, #0 + beq _02268E70 + bl sub_02022974 +_02268E70: + ldr r0, _02268EE8 ; =ov16_02268FCC + ldr r1, [sp, #0x14] + ldr r2, _02268EEC ; =0x00000514 + bl sub_0200D9E8 + ldr r1, [sp, #0x14] + str r0, [r1, #8] + add r0, r1, #0 + ldr r0, [r0, #0] + bl ov16_0223E064 + ldr r1, _02268EF0 ; =0x00004FBB + add r2, r0, #0 + ldr r0, _02268EF4 ; =0x00004E43 + str r1, [sp] + str r0, [sp, #4] + sub r0, r1, #6 + str r0, [sp, #8] + sub r1, #0x11 + str r1, [sp, #0xc] + ldr r0, [sp, #0x18] + add r1, r7, #0 + mov r3, #5 + bl ov16_0226DB7C + ldr r0, _02268EF4 ; =0x00004E43 + ldr r3, _02268EF8 ; =0x00004FB5 + str r0, [sp] + add r0, r3, #0 + str r3, [sp, #4] + sub r0, #0xb + str r0, [sp, #8] + mov r2, #5 + str r2, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + add r1, r7, #0 + add r3, r3, #6 + bl ov16_0226DC24 + ldr r2, _02268EFC ; =0x000006D8 + ldr r1, [sp, #0x14] + str r0, [r1, r2] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268ECC: .word 0x000005D8 +_02268ED0: .word 0x00004E37 +_02268ED4: .word 0x00004E2F +_02268ED8: .word 0x00004E38 +_02268EDC: .word 0x00004E30 +_02268EE0: .word 0x02270414 +_02268EE4: .word 0x02270448 +_02268EE8: .word ov16_02268FCC +_02268EEC: .word 0x00000514 +_02268EF0: .word 0x00004FBB +_02268EF4: .word 0x00004E43 +_02268EF8: .word 0x00004FB5 +_02268EFC: .word 0x000006D8 + thumb_func_end ov16_02268D40 + + thumb_func_start ov16_02268F00 +ov16_02268F00: ; 0x02268F00 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _02268FAC ; =0x000005D8 + ldr r1, [r6, r0] + cmp r1, #0 + beq _02268F14 + add r0, #0x18 + ldr r0, [r6, r0] + cmp r0, #0 + bne _02268F18 +_02268F14: + bl sub_02022974 +_02268F18: + ldr r0, [r6, #0] + bl ov16_0223E010 + ldr r0, [r6, #0] + bl ov16_0223E018 + ldr r1, _02268FB0 ; =0x00004E37 + add r7, r0, #0 + bl sub_0200D070 + ldr r1, _02268FB4 ; =0x00004E2F + add r0, r7, #0 + bl sub_0200D090 + ldr r1, _02268FB4 ; =0x00004E2F + add r0, r7, #0 + bl sub_0200D0A0 + ldr r1, _02268FB8 ; =0x00004E38 + add r0, r7, #0 + bl sub_0200D070 + ldr r1, _02268FBC ; =0x00004E30 + add r0, r7, #0 + bl sub_0200D090 + ldr r1, _02268FBC ; =0x00004E30 + add r0, r7, #0 + bl sub_0200D0A0 + ldr r1, _02268FB0 ; =0x00004E37 + add r0, r7, #0 + bl sub_0200D080 + mov r4, #0 + add r5, r6, #0 +_02268F60: + ldr r0, _02268FAC ; =0x000005D8 + ldr r0, [r5, r0] + bl sub_0200D0F4 + ldr r0, _02268FAC ; =0x000005D8 + mov r1, #0 + str r1, [r5, r0] + add r0, #0x18 + ldr r0, [r5, r0] + bl sub_0200D0F4 + mov r0, #0x5f + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02268F60 + ldr r0, [r6, #8] + bl sub_0200DA58 + ldr r3, _02268FC0 ; =0x00004FAA + mov r0, #0 + str r0, [r6, #8] + add r1, r3, #0 + str r3, [sp] + ldr r2, _02268FC4 ; =0x00004E43 + add r0, r7, #0 + add r1, #0x11 + add r3, #0xb + bl ov16_0226DBFC + ldr r0, _02268FC8 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DCA8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268FAC: .word 0x000005D8 +_02268FB0: .word 0x00004E37 +_02268FB4: .word 0x00004E2F +_02268FB8: .word 0x00004E38 +_02268FBC: .word 0x00004E30 +_02268FC0: .word 0x00004FAA +_02268FC4: .word 0x00004E43 +_02268FC8: .word 0x000006D8 + thumb_func_end ov16_02268F00 + + thumb_func_start ov16_02268FCC +ov16_02268FCC: ; 0x02268FCC + push {r3, r4, r5, r6, r7, lr} + ldr r0, _02269140 ; =0x00000648 + add r5, r1, #0 + mov r7, #0 + add r4, r5, r0 + mov r6, #0xc +_02268FD8: + ldrb r0, [r4, #3] + cmp r0, #4 + bhi _02268FF4 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02268FEA: ; jump table + .short _02268FF4 - _02268FEA - 2 ; case 0 + .short _02269034 - _02268FEA - 2 ; case 1 + .short _02269046 - _02268FEA - 2 ; case 2 + .short _022690DE - _02268FEA - 2 ; case 3 + .short _02269046 - _02268FEA - 2 ; case 4 +_02268FF4: + ldr r0, _02269144 ; =0x000005D8 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl sub_0200D400 + cmp r0, #0 + beq _02269008 + ldrb r0, [r4, #2] + cmp r0, #0x57 + bhs _0226900A +_02269008: + b _0226912E +_0226900A: + mov r0, #0 + strb r0, [r4, #4] + mov r0, #0xa + strb r0, [r4, #5] + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r3, r0, #0x1d + ldrb r2, [r4, #5] + sub r3, r3, r1 + mov r0, #0x1d + ror r3, r0 + add r0, r1, r3 + add r0, r2, r0 + strb r0, [r4, #5] + mov r0, #2 + strb r0, [r4, #7] + ldrb r0, [r4, #3] + add r0, r0, #1 + strb r0, [r4, #3] + b _0226912E +_02269034: + ldrb r1, [r4, #5] + cmp r1, #0 + beq _02269040 + sub r0, r1, #1 + strb r0, [r4, #5] + b _0226912E +_02269040: + add r0, r0, #1 + strb r0, [r4, #3] + b _0226912E +_02269046: + ldr r0, _02269144 ; =0x000005D8 + mov r1, #2 + ldr r0, [r5, r0] + lsl r1, r1, #0xa + bl sub_0200D7C0 + mov r0, #0 + ldrsh r1, [r4, r0] + mov r0, #6 + lsl r0, r0, #6 + add r0, r1, r0 + strh r0, [r4] + mov r1, #0 + ldrsh r1, [r4, r1] + ldr r0, _02269144 ; =0x000005D8 + mov r3, #0x11 + asr r2, r1, #7 + lsr r2, r2, #0x18 + add r2, r1, r2 + asr r1, r2, #8 + add r1, r1, r6 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + mov r2, #0xd + lsl r3, r3, #0x10 + bl sub_0200D500 + ldrb r0, [r4, #6] + add r0, r0, #1 + strb r0, [r4, #6] + ldrb r1, [r4, #6] + ldrb r0, [r4, #7] + cmp r1, r0 + blo _0226912E + mov r0, #0 + strb r0, [r4, #6] + ldrb r0, [r4, #3] + cmp r0, #2 + bne _0226909C + add r0, r0, #1 + strb r0, [r4, #3] + b _0226912E +_0226909C: + ldr r0, _02269144 ; =0x000005D8 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200D79C + ldr r0, _02269144 ; =0x000005D8 + lsl r1, r6, #0x10 + mov r3, #0x11 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + mov r2, #0xd + lsl r3, r3, #0x10 + bl sub_0200D500 + mov r0, #0 + strh r0, [r4] + ldrb r0, [r4, #8] + cmp r0, #1 + bhs _022690D6 + add r0, r0, #1 + strb r0, [r4, #8] + ldrb r0, [r4, #7] + cmp r0, #1 + bls _022690D0 + sub r0, r0, #1 + strb r0, [r4, #7] +_022690D0: + mov r0, #2 + strb r0, [r4, #3] + b _0226912E +_022690D6: + mov r0, #0 + strb r0, [r4, #8] + strb r0, [r4, #3] + b _0226912E +_022690DE: + ldr r0, _02269144 ; =0x000005D8 + ldr r1, _02269148 ; =0xFFFFF800 + ldr r0, [r5, r0] + bl sub_0200D7C0 + mov r0, #0 + ldrsh r1, [r4, r0] + mov r0, #6 + lsl r0, r0, #6 + sub r0, r1, r0 + strh r0, [r4] + mov r1, #0 + ldrsh r1, [r4, r1] + ldr r0, _02269144 ; =0x000005D8 + mov r3, #0x11 + asr r2, r1, #7 + lsr r2, r2, #0x18 + add r2, r1, r2 + asr r1, r2, #8 + add r1, r1, r6 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + mov r2, #0xd + lsl r3, r3, #0x10 + bl sub_0200D500 + ldrb r0, [r4, #6] + add r0, r0, #1 + strb r0, [r4, #6] + ldrb r1, [r4, #7] + ldrb r0, [r4, #6] + lsl r1, r1, #1 + cmp r0, r1 + blt _0226912E + mov r0, #0 + strb r0, [r4, #6] + ldrb r0, [r4, #3] + add r0, r0, #1 + strb r0, [r4, #3] +_0226912E: + add r7, r7, #1 + add r4, #0xa + add r5, r5, #4 + add r6, #0x13 + cmp r7, #6 + bge _0226913C + b _02268FD8 +_0226913C: + pop {r3, r4, r5, r6, r7, pc} + nop +_02269140: .word 0x00000648 +_02269144: .word 0x000005D8 +_02269148: .word 0xFFFFF800 + thumb_func_end ov16_02268FCC + + thumb_func_start ov16_0226914C +ov16_0226914C: ; 0x0226914C + push {r3, r4} + ldr r2, _02269164 ; =0x0000064A + mov r4, #0 +_02269152: + ldrb r3, [r1, r4] + add r4, r4, #1 + strb r3, [r0, r2] + add r0, #0xa + cmp r4, #6 + blt _02269152 + pop {r3, r4} + bx lr + nop +_02269164: .word 0x0000064A + thumb_func_end ov16_0226914C + + thumb_func_start ov16_02269168 +ov16_02269168: ; 0x02269168 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + mov r4, #0 +_02269172: + ldrb r0, [r6, r4] + bl ov16_0226A934 + add r1, r0, #0 + ldr r0, _022691B8 ; =0x000005D8 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl sub_02021D6C + ldr r0, _022691B8 ; =0x000005D8 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl sub_0200D324 + ldrb r0, [r7, r4] + bl ov16_0226A934 + add r1, r0, #0 + mov r0, #0x5f + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl sub_02021D6C + mov r0, #0x5f + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl sub_0200D324 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02269172 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022691B8: .word 0x000005D8 + thumb_func_end ov16_02269168 + + thumb_func_start ov16_022691BC +ov16_022691BC: ; 0x022691BC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02269214 ; =0x000005D8 + ldr r1, [r5, r0] + cmp r1, #0 + beq _022691D0 + add r0, #0x18 + ldr r0, [r5, r0] + cmp r0, #0 + bne _022691D4 +_022691D0: + bl sub_02022974 +_022691D4: + ldr r7, _02269214 ; =0x000005D8 + mov r6, #0 + add r4, r5, #0 +_022691DA: + ldr r0, [r4, r7] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_0200D3EC + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #6 + blt _022691DA + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #1 + tst r0, r1 + beq _02269212 + mov r6, #0x5f + mov r4, #0 + add r7, r1, #0 + lsl r6, r6, #4 +_02269200: + ldr r0, [r5, r6] + add r1, r7, #0 + ldr r0, [r0, #0] + bl sub_0200D3EC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02269200 +_02269212: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269214: .word 0x000005D8 + thumb_func_end ov16_022691BC + + thumb_func_start ov16_02269218 +ov16_02269218: ; 0x02269218 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02269258 ; =0x000005D8 + ldr r1, [r5, r0] + cmp r1, #0 + beq _0226922C + add r0, #0x18 + ldr r0, [r5, r0] + cmp r0, #0 + bne _02269230 +_0226922C: + bl sub_02022974 +_02269230: + ldr r7, _02269258 ; =0x000005D8 + mov r4, #0 + add r6, r7, #0 + add r6, #0x18 +_02269238: + ldr r0, [r5, r7] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0200D3EC + ldr r0, [r5, r6] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0200D3EC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02269238 + pop {r3, r4, r5, r6, r7, pc} + nop +_02269258: .word 0x000005D8 + thumb_func_end ov16_02269218 + + thumb_func_start ov16_0226925C +ov16_0226925C: ; 0x0226925C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02269338 ; =0x0000068B + mov r6, #0 + ldrsb r1, [r5, r0] + sub r0, r6, #1 + cmp r1, r0 + bne _02269270 + bl sub_02022974 +_02269270: + ldr r0, _02269338 ; =0x0000068B + ldr r3, _0226933C ; =0x02270670 + ldrsb r2, [r5, r0] + mov r1, #0x30 + mul r1, r2 + add r4, r3, r1 + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _0226928A + add r0, r0, #3 + ldrb r0, [r5, r0] + cmp r0, #1 + bne _02269290 +_0226928A: + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02269290: + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _0226929A + bl sub_02022974 +_0226929A: + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #1 + lsl r1, r1, #0xa + tst r0, r1 + beq _022692B2 + add r0, r5, #0 + bl ov16_0226CD18 + add r7, r0, #0 + b _022692CC +_022692B2: + ldr r0, [r4, #0x14] + bl sub_02022664 + add r7, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r7, r0 + bne _022692CC + add r0, r5, #0 + bl ov16_0226BE48 + add r7, r0, #0 + add r6, r6, #1 +_022692CC: + mov r0, #0 + mvn r0, r0 + str r0, [sp] + cmp r7, r0 + bne _022692DA + mov r2, #0xff + b _022692E6 +_022692DA: + ldr r1, [r4, #0x18] + lsl r0, r7, #2 + ldr r0, [r1, r0] + str r0, [sp] + ldr r0, [r4, #0x1c] + ldrb r2, [r0, r7] +_022692E6: + ldr r3, [r4, #0x2c] + cmp r3, #0 + beq _02269332 + ldr r1, [sp] + add r0, r5, #0 + blx r3 + mov r1, #0 + mvn r1, r1 + str r0, [sp] + cmp r0, r1 + beq _02269332 + ldr r2, [r4, #0x24] + cmp r2, #0 + beq _02269308 + add r0, r5, #0 + add r1, r7, #0 + blx r2 +_02269308: + ldr r0, _02269340 ; =0x000006DC + mov r1, #0 + add r0, r5, r0 + mov r2, #4 + bl sub_020C4CF4 + ldr r0, _02269344 ; =0x000006D8 + ldr r0, [r5, r0] + bl ov16_0226DDE8 + cmp r6, #0 + ble _0226932A + mov r0, #0x6e + mov r1, #1 + lsl r0, r0, #4 + strb r1, [r5, r0] + b _02269332 +_0226932A: + mov r0, #0x6e + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r5, r0] +_02269332: + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + nop +_02269338: .word 0x0000068B +_0226933C: .word 0x02270670 +_02269340: .word 0x000006DC +_02269344: .word 0x000006D8 + thumb_func_end ov16_0226925C + + thumb_func_start ov16_02269348 +ov16_02269348: ; 0x02269348 + push {r3, lr} + ldr r1, [r0, #0xc] + cmp r1, #0 + bne _02269362 + ldr r1, [r0, #0x10] + cmp r1, #0 + bne _02269362 + bl ov16_0226BCD0 + cmp r0, #1 + bne _02269362 + mov r0, #1 + pop {r3, pc} +_02269362: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov16_02269348 + + thumb_func_start ov16_02269368 +ov16_02269368: ; 0x02269368 + push {r3, lr} + cmp r0, #0x40 + bgt _0226939E + bge _022693F4 + cmp r0, #0x10 + bgt _02269398 + bge _022693CC + cmp r0, #8 + bhi _02269404 + add r2, r0, r0 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_02269386: ; jump table + .short _022693C0 - _02269386 - 2 ; case 0 + .short _022693CC - _02269386 - 2 ; case 1 + .short _022693CC - _02269386 - 2 ; case 2 + .short _02269404 - _02269386 - 2 ; case 3 + .short _022693D8 - _02269386 - 2 ; case 4 + .short _02269404 - _02269386 - 2 ; case 5 + .short _02269404 - _02269386 - 2 ; case 6 + .short _02269404 - _02269386 - 2 ; case 7 + .short _022693DC - _02269386 - 2 ; case 8 +_02269398: + cmp r0, #0x20 + beq _022693FC + b _02269404 +_0226939E: + mov r2, #1 + lsl r2, r2, #8 + cmp r0, r2 + bgt _022693AE + bge _022693E8 + cmp r0, #0x80 + beq _022693D8 + b _02269404 +_022693AE: + lsl r1, r2, #1 + cmp r0, r1 + bgt _022693B8 + beq _022693F8 + b _02269404 +_022693B8: + lsl r1, r2, #2 + cmp r0, r1 + beq _02269400 + b _02269404 +_022693C0: + cmp r1, #4 + bne _022693C8 + mov r0, #9 + pop {r3, pc} +_022693C8: + mov r0, #8 + pop {r3, pc} +_022693CC: + cmp r1, #4 + bne _022693D4 + mov r0, #6 + pop {r3, pc} +_022693D4: + mov r0, #4 + pop {r3, pc} +_022693D8: + mov r0, #1 + pop {r3, pc} +_022693DC: + cmp r1, #4 + bne _022693E4 + mov r0, #7 + pop {r3, pc} +_022693E4: + mov r0, #2 + pop {r3, pc} +_022693E8: + cmp r1, #4 + bne _022693F0 + mov r0, #4 + pop {r3, pc} +_022693F0: + mov r0, #6 + pop {r3, pc} +_022693F4: + mov r0, #3 + pop {r3, pc} +_022693F8: + mov r0, #0xa + pop {r3, pc} +_022693FC: + mov r0, #5 + pop {r3, pc} +_02269400: + mov r0, #0xb + pop {r3, pc} +_02269404: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov16_02269368 + + thumb_func_start ov16_0226940C +ov16_0226940C: ; 0x0226940C + push {r4, r5} + ldr r1, _0226946C ; =0x04001000 + ldr r2, _02269470 ; =0xFFFF1FFF + ldr r3, [r1, #0] + add r5, r1, #0 + and r3, r2 + lsr r2, r1, #0xd + orr r2, r3 + str r2, [r1, #0] + add r5, #0x4a + ldrh r4, [r5] + mov r3, #0x3f + mov r2, #0x1f + bic r4, r3 + orr r2, r4 + mov r4, #0x20 + orr r2, r4 + strh r2, [r5] + add r1, #0x48 + ldrh r5, [r1] + mov r2, #0x1b + bic r5, r3 + orr r2, r5 + orr r2, r4 + strh r2, [r1] + ldr r1, _02269474 ; =0x000006CC + ldr r1, [r0, r1] + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 + mov r0, #0xff + sub r0, r0, r1 + bpl _02269452 + mov r0, #0 +_02269452: + lsl r1, r0, #8 + mov r0, #0xff + lsl r0, r0, #8 + and r1, r0 + mov r0, #0xff + orr r0, r1 + ldr r1, _02269478 ; =0x04001040 + strh r0, [r1] + mov r0, #0xc0 + strh r0, [r1, #4] + pop {r4, r5} + bx lr + nop +_0226946C: .word 0x04001000 +_02269470: .word 0xFFFF1FFF +_02269474: .word 0x000006CC +_02269478: .word 0x04001040 + thumb_func_end ov16_0226940C + + thumb_func_start ov16_0226947C +ov16_0226947C: ; 0x0226947C + push {r4, lr} + lsl r4, r2, #8 + ldr r2, _022694A0 ; =0x000006CC + add r3, r0, #0 + ldr r0, [r3, r2] + cmp r0, r4 + beq _0226949E + add r0, r2, #4 + str r1, [r3, r0] + add r2, #8 + str r4, [r3, r2] + mov r2, #0x4b + ldr r0, _022694A4 ; =ov16_022694A8 + add r1, r3, #0 + lsl r2, r2, #4 + bl sub_0200D9E8 +_0226949E: + pop {r4, pc} + ; .align 2, 0 +_022694A0: .word 0x000006CC +_022694A4: .word ov16_022694A8 + thumb_func_end ov16_0226947C + + thumb_func_start ov16_022694A8 +ov16_022694A8: ; 0x022694A8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + str r0, [sp] + ldr r0, [r5, #0] + mov r4, #0 + bl ov16_0223DF00 + add r7, r0, #0 + ldr r0, _0226953C ; =0x000006CC + add r1, r0, #4 + ldr r2, [r5, r0] + ldr r1, [r5, r1] + add r1, r2, r1 + str r1, [r5, r0] + add r1, r0, #4 + ldr r1, [r5, r1] + cmp r1, #0 + bgt _022694D8 + add r2, r0, #0 + add r2, #8 + ldr r2, [r5, r2] + ldr r0, [r5, r0] + cmp r0, r2 + ble _022694E8 +_022694D8: + cmp r1, #0 + ble _022694EE + ldr r0, _02269540 ; =0x000006D4 + ldr r2, [r5, r0] + sub r0, #8 + ldr r0, [r5, r0] + cmp r0, r2 + blt _022694EE +_022694E8: + ldr r0, _0226953C ; =0x000006CC + mov r4, #1 + str r2, [r5, r0] +_022694EE: + ldr r3, _0226953C ; =0x000006CC + add r0, r7, #0 + ldr r3, [r5, r3] + mov r1, #6 + asr r6, r3, #7 + lsr r6, r6, #0x18 + add r6, r3, r6 + mov r2, #0 + asr r3, r6, #8 + bl sub_02019184 + add r0, r5, #0 + bl ov16_0226940C + cmp r4, #1 + bne _02269538 + ldr r2, _02269544 ; =0x000002FF + add r0, r7, #0 + mov r1, #7 + bl sub_02019EE0 + mov r0, #7 + mov r1, #0 + bl sub_02019120 + mov r0, #7 + mov r1, #0 + bl sub_02019060 + ldr r2, _02269548 ; =0x04001000 + ldr r0, _0226954C ; =0xFFFF1FFF + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + ldr r0, [sp] + bl sub_0200DA58 +_02269538: + pop {r3, r4, r5, r6, r7, pc} + nop +_0226953C: .word 0x000006CC +_02269540: .word 0x000006D4 +_02269544: .word 0x000002FF +_02269548: .word 0x04001000 +_0226954C: .word 0xFFFF1FFF + thumb_func_end ov16_022694A8 + + thumb_func_start ov16_02269550 +ov16_02269550: ; 0x02269550 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + ldr r0, _02269624 ; =0x0000068E + mov r1, #1 + strb r1, [r5, r0] + ldr r1, _02269628 ; =0x0400104A + mov r4, #0x3f + ldrh r2, [r1] + mov r0, #0xf + mov r7, #0xc + bic r2, r4 + orr r0, r2 + mov r2, #0x20 + orr r0, r2 + strh r0, [r1] + sub r0, r1, #2 + ldrh r3, [r0] + bic r3, r4 + orr r3, r7 + orr r3, r2 + strh r3, [r0] + ldrh r4, [r0] + ldr r3, _0226962C ; =0xFFFFC0FF + lsl r2, r2, #8 + and r4, r3 + lsl r3, r7, #8 + orr r3, r4 + orr r2, r3 + strh r2, [r0] + add r2, r1, #0 + mov r0, #0xff + sub r2, #0xa + strh r0, [r2] + mov r3, #0x90 + sub r2, r1, #6 + strh r3, [r2] + add r2, r1, #0 + sub r2, #8 + strh r0, [r2] + sub r0, r1, #4 + ldr r2, _02269630 ; =0x000090C0 + sub r1, #0x4a + strh r2, [r0] + ldr r2, [r1, #0] + ldr r0, _02269634 ; =0xFFFF1FFF + and r2, r0 + lsl r0, r7, #0xb + orr r0, r2 + str r0, [r1, #0] + mov r0, #5 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r5, [r4, #0] + ldr r0, _02269638 ; =0xFFFF9C64 + strb r6, [r4, #0x12] + strh r0, [r4, #8] + mov r0, #0xfa + lsl r0, r0, #4 + strh r0, [r4, #0xa] + mov r0, #8 + ldrsh r1, [r4, r0] + ldr r0, _0226963C ; =0x0000639C + sub r0, r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + strh r0, [r4, #0xc] + mov r0, #0xa + ldrsh r1, [r4, r0] + mov r0, #0xfa + lsl r0, r0, #4 + sub r0, r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + strh r0, [r4, #0xe] + ldr r0, _02269640 ; =0x0000070E + bl sub_02005748 + ldr r0, _02269644 ; =ov16_0226B988 + ldr r2, _02269648 ; =0x000004BA + add r1, r4, #0 + bl sub_0200D9E8 + ldr r0, _0226964C ; =ov16_0226BB94 + add r1, r4, #0 + bl sub_020177BC + cmp r0, #1 + beq _02269616 + bl sub_02022974 +_02269616: + ldr r0, _02269650 ; =ov16_0226BA88 + add r1, r4, #0 + mov r2, #0xa + bl sub_0200DA04 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269624: .word 0x0000068E +_02269628: .word 0x0400104A +_0226962C: .word 0xFFFFC0FF +_02269630: .word 0x000090C0 +_02269634: .word 0xFFFF1FFF +_02269638: .word 0xFFFF9C64 +_0226963C: .word 0x0000639C +_02269640: .word 0x0000070E +_02269644: .word ov16_0226B988 +_02269648: .word 0x000004BA +_0226964C: .word ov16_0226BB94 +_02269650: .word ov16_0226BA88 + thumb_func_end ov16_02269550 + + thumb_func_start ov16_02269654 +ov16_02269654: ; 0x02269654 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r4, [r5, #0x1c] + bl ov16_02269668 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02269550 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02269654 + + thumb_func_start ov16_02269668 +ov16_02269668: ; 0x02269668 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + add r6, r5, #0 + add r6, #0x1c + ldrb r7, [r5, #0x1c] + ldrb r1, [r6, #8] + ldr r0, _02269864 ; =0x000006E1 + strb r1, [r5, r0] + ldr r0, [r5, #0] + bl ov16_0223E05C + add r4, r0, #0 + ldr r0, _02269868 ; =0x0000068A + strb r7, [r5, r0] + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #0x20 + tst r0, r1 + beq _022696B4 + ldr r1, _0226986C ; =0x000003A3 + add r0, r4, #0 + bl sub_0200B1EC + mov r1, #0xe9 + str r0, [sp, #0x24] + add r0, r4, #0 + lsl r1, r1, #2 + bl sub_0200B1EC + str r0, [sp, #0x20] + ldr r1, _02269870 ; =0x000003A5 + add r0, r4, #0 + bl sub_0200B1EC + str r0, [sp, #0x1c] + b _02269704 +_022696B4: + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #2 + lsl r1, r1, #8 + tst r0, r1 + beq _022696E4 + ldr r1, _02269874 ; =0x000004C7 + add r0, r4, #0 + bl sub_0200B1EC + mov r1, #0xe9 + str r0, [sp, #0x24] + add r0, r4, #0 + lsl r1, r1, #2 + bl sub_0200B1EC + str r0, [sp, #0x20] + ldr r1, _02269870 ; =0x000003A5 + add r0, r4, #0 + bl sub_0200B1EC + str r0, [sp, #0x1c] + b _02269704 +_022696E4: + mov r1, #0xe7 + add r0, r4, #0 + lsl r1, r1, #2 + bl sub_0200B1EC + str r0, [sp, #0x24] + ldr r1, _02269878 ; =0x0000039D + add r0, r4, #0 + bl sub_0200B1EC + str r0, [sp, #0x20] + ldr r1, _0226987C ; =0x0000039E + add r0, r4, #0 + bl sub_0200B1EC + str r0, [sp, #0x1c] +_02269704: + ldr r0, _02269864 ; =0x000006E1 + ldrb r0, [r5, r0] + cmp r0, #1 + bne _0226971C + mov r1, #0x3a + add r0, r4, #0 + lsl r1, r1, #4 + bl sub_0200B1EC + add r4, r0, #0 + mov r1, #1 + b _02269728 +_0226971C: + ldr r1, _02269880 ; =0x0000039F + add r0, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r1, #0 +_02269728: + ldr r0, _02269884 ; =0x0000068F + mov r3, #2 + strb r1, [r5, r0] + ldr r0, _02269888 ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + ldr r0, _0226988C ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x54 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + lsl r1, r1, #4 + str r0, [sp, #0x18] + ldr r2, [sp, #0x24] + add r0, r5, #0 + add r1, r5, r1 + bl ov16_0226A98C + ldr r0, _02269890 ; =0x00040506 + ldr r1, _02269894 ; =0x000004E4 + str r0, [sp] + mov r3, #2 + ldr r0, _0226988C ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x28 + str r0, [sp, #0xc] + mov r0, #0xaa + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + ldr r2, [sp, #0x20] + add r0, r5, #0 + add r1, r5, r1 + bl ov16_0226A98C + ldr r0, _02269898 ; =0x00070809 + ldr r1, _0226989C ; =0x000004F8 + str r0, [sp] + mov r3, #2 + ldr r0, _0226988C ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0xd8 + str r0, [sp, #0xc] + mov r0, #0xaa + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r0, r5, #0 + add r1, r5, r1 + bl ov16_0226A98C + ldr r0, _022698A0 ; =0x000A0B0C + ldr r1, _022698A4 ; =0x0000050C + str r0, [sp] + mov r3, #2 + ldr r0, _0226988C ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0xb2 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r4, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x24] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #0x22 + lsl r1, r1, #4 + tst r0, r1 + bne _02269860 + ldrb r1, [r6, #1] + ldrb r2, [r6, #2] + ldr r0, [r5, #0] + bl ov16_0223DFAC + add r4, r0, #0 + add r0, r5, #0 + bl ov16_0226A698 + ldrh r0, [r6, #6] + mov r3, #4 + add r1, r4, #0 + str r0, [sp] + ldrb r0, [r6, #3] + add r2, r7, #0 + str r0, [sp, #4] + ldrsh r3, [r6, r3] + add r0, r5, #0 + bl ov16_0226A7A4 + add r4, r0, #0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + cmp r7, #4 + bne _02269840 + mov r0, #0x4e + lsl r0, r0, #4 + ldrh r0, [r5, r0] + ldr r1, [sp, #0x2c] + add r0, #0x10 + add r0, r1, r0 + str r0, [sp, #0x2c] + b _02269846 +_02269840: + ldr r0, [sp, #0x2c] + sub r0, #0x10 + str r0, [sp, #0x2c] +_02269846: + mov r3, #0x11 + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x28] + lsl r3, r3, #4 + sub r2, r2, r3 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, r4, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0xc + bl sub_0200D500 +_02269860: + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269864: .word 0x000006E1 +_02269868: .word 0x0000068A +_0226986C: .word 0x000003A3 +_02269870: .word 0x000003A5 +_02269874: .word 0x000004C7 +_02269878: .word 0x0000039D +_0226987C: .word 0x0000039E +_02269880: .word 0x0000039F +_02269884: .word 0x0000068F +_02269888: .word 0x00010203 +_0226988C: .word 0x00004E37 +_02269890: .word 0x00040506 +_02269894: .word 0x000004E4 +_02269898: .word 0x00070809 +_0226989C: .word 0x000004F8 +_022698A0: .word 0x000A0B0C +_022698A4: .word 0x0000050C + thumb_func_end ov16_02269668 + + thumb_func_start ov16_022698A8 +ov16_022698A8: ; 0x022698A8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r4, [r5, #0x1c] + bl ov16_022698BC + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02269550 + pop {r3, r4, r5, pc} + thumb_func_end ov16_022698A8 + + thumb_func_start ov16_022698BC +ov16_022698BC: ; 0x022698BC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + bl ov16_02269668 + ldr r0, [r5, #0] + bl ov16_0223DF00 + mov r1, #0x10 + str r1, [sp] + mov r1, #0x20 + str r1, [sp, #4] + mov r1, #8 + str r1, [sp, #8] + mov r1, #0x11 + str r1, [sp, #0xc] + ldr r2, _02269914 ; =0x000002FF + add r4, r0, #0 + mov r1, #4 + mov r3, #0 + bl sub_02019CB8 + add r0, r4, #0 + mov r1, #5 + bl sub_0201C3C0 + ldr r0, _02269918 ; =0x000004E4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _0226991C ; =0x000004F8 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02269920 ; =0x0000050C + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02269914: .word 0x000002FF +_02269918: .word 0x000004E4 +_0226991C: .word 0x000004F8 +_02269920: .word 0x0000050C + thumb_func_end ov16_022698BC + + thumb_func_start ov16_02269924 +ov16_02269924: ; 0x02269924 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r4, [r5, #0x1c] + bl ov16_02269938 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_02269550 + pop {r3, r4, r5, pc} + thumb_func_end ov16_02269924 + + thumb_func_start ov16_02269938 +ov16_02269938: ; 0x02269938 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + bl ov16_02269668 + ldr r0, [r5, #0] + bl ov16_0223DF00 + mov r1, #0x10 + str r1, [sp] + mov r1, #0xa + str r1, [sp, #4] + mov r1, #8 + str r1, [sp, #8] + mov r1, #0x11 + str r1, [sp, #0xc] + ldr r2, _022699A0 ; =0x000002FF + mov r1, #4 + mov r3, #0 + add r4, r0, #0 + bl sub_02019CB8 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r2, _022699A0 ; =0x000002FF + add r0, r4, #0 + mov r1, #4 + mov r3, #0x16 + bl sub_02019CB8 + add r0, r4, #0 + mov r1, #5 + bl sub_0201C3C0 + ldr r0, _022699A4 ; =0x000004E4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _022699A8 ; =0x000004F8 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022699A0: .word 0x000002FF +_022699A4: .word 0x000004E4 +_022699A8: .word 0x000004F8 + thumb_func_end ov16_02269938 + + thumb_func_start ov16_022699AC +ov16_022699AC: ; 0x022699AC + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r6, r5, #0 + add r6, #0x1c + bne _022699BC + bl sub_02022974 +_022699BC: + ldrb r1, [r6, #0x10] + ldr r0, _02269C3C ; =0x0000068A + strb r1, [r5, r0] + ldr r0, [r5, #0] + bl ov16_0223E05C + str r0, [sp, #0x1c] + ldrb r1, [r6, #0x10] + add r0, r5, #0 + bl ov16_0226ABD4 + str r0, [sp, #0x20] + add r0, r5, #0 + bl ov16_0226AF0C + ldr r0, _02269C40 ; =0x00070809 + mov r1, #0x4d + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, _02269C44 ; =0x00004E37 + lsl r1, r1, #4 + str r0, [sp, #8] + mov r0, #0x40 + str r0, [sp, #0xc] + mov r0, #0x2e + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + add r1, r5, r1 + add r0, #0x28 + str r0, [sp, #0x18] + add r0, r5, #0 + mov r2, #0 + mov r3, #2 + bl ov16_0226A98C + ldr r0, _02269C40 ; =0x00070809 + ldr r1, _02269C48 ; =0x000004E4 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, _02269C44 ; =0x00004E37 + add r1, r5, r1 + str r0, [sp, #8] + mov r0, #0xc0 + str r0, [sp, #0xc] + mov r0, #0x2e + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + mov r2, #0 + add r0, #0x3c + str r0, [sp, #0x18] + add r0, r5, #0 + mov r3, #2 + bl ov16_0226A98C + ldr r0, _02269C40 ; =0x00070809 + ldr r1, _02269C4C ; =0x000004F8 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, _02269C44 ; =0x00004E37 + add r1, r5, r1 + str r0, [sp, #8] + mov r0, #0x40 + str r0, [sp, #0xc] + mov r0, #0x6e + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + mov r2, #0 + add r0, #0x50 + str r0, [sp, #0x18] + add r0, r5, #0 + mov r3, #2 + bl ov16_0226A98C + ldr r0, _02269C40 ; =0x00070809 + ldr r1, _02269C50 ; =0x0000050C + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, _02269C44 ; =0x00004E37 + add r1, r5, r1 + str r0, [sp, #8] + mov r0, #0xc0 + str r0, [sp, #0xc] + mov r0, #0x6e + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + mov r2, #0 + add r0, #0x64 + str r0, [sp, #0x18] + add r0, r5, #0 + mov r3, #2 + bl ov16_0226A98C + ldr r0, [sp, #0x20] + mov r4, #0 + str r0, [sp, #0x28] + add r0, #0x78 + str r0, [sp, #0x28] + mov r0, #0x4d + lsl r0, r0, #4 + add r7, r5, r0 + ldr r0, [sp, #0x20] + add r0, #0xc8 + str r0, [sp, #0x20] + b _02269B2E +_02269AA4: + add r1, r6, r4 + ldrb r0, [r1, #8] + ldrb r1, [r1, #0xc] + bl ov16_0226B924 + str r0, [sp, #0x24] + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _02269C44 ; =0x00004E37 + ldr r1, _02269C54 ; =0x022702D4 + str r0, [sp, #8] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + add r2, r4, #0 + add r2, #9 + str r1, [sp, #0xc] + ldr r1, _02269C54 ; =0x022702D4 + add r0, r1, r0 + ldrh r0, [r0, #2] + add r1, r4, #0 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x14 + mul r1, r0 + ldr r0, [sp, #0x28] + add r0, r0, r1 + mov r1, #0x14 + mul r1, r2 + mov r2, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r7, r1 + add r3, r2, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x24] + ldr r1, _02269C58 ; =0x02270284 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _02269C44 ; =0x00004E37 + add r2, r4, #5 + str r0, [sp, #8] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + str r1, [sp, #0xc] + ldr r1, _02269C58 ; =0x02270284 + add r0, r1, r0 + ldrh r0, [r0, #2] + add r1, r4, #0 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x14 + mul r1, r0 + ldr r0, [sp, #0x20] + add r0, r0, r1 + mov r1, #0x14 + mul r1, r2 + mov r2, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r7, r1 + add r3, r2, #0 + bl ov16_0226A98C + add r4, r4, #1 +_02269B2E: + cmp r4, #4 + blt _02269AA4 + ldr r0, [sp, #0x1c] + ldr r1, _02269C5C ; =0x000003A1 + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, _02269C60 ; =0x000A0B0C + mov r1, #0x52 + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _02269C44 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0xb2 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r4, #0 + bl ov16_0226A98C + add r0, r4, #0 + bl sub_020237BC + mov r4, #0 + mov r7, #3 + b _02269B98 +_02269B72: + lsl r0, r4, #1 + ldrh r0, [r6, r0] + cmp r0, #0 + beq _02269B8C + add r1, r7, #0 + bl sub_020790C4 + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov16_0226B06C + b _02269B96 +_02269B8C: + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0226B088 + b _02269B9C +_02269B96: + add r4, r4, #1 +_02269B98: + cmp r4, #4 + blt _02269B72 +_02269B9C: + ldr r0, [r5, #0] + bl ov16_0223DF00 + ldrh r0, [r6] + cmp r0, #0 + bne _02269BC8 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_020129D0 + ldr r0, _02269C64 ; =0x00000534 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02269C68 ; =0x00000584 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 +_02269BC8: + ldrh r0, [r6, #2] + cmp r0, #0 + bne _02269BEC + ldr r0, _02269C48 ; =0x000004E4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02269C6C ; =0x00000548 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02269C70 ; =0x00000598 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 +_02269BEC: + ldrh r0, [r6, #4] + cmp r0, #0 + bne _02269C10 + ldr r0, _02269C4C ; =0x000004F8 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02269C74 ; =0x0000055C + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02269C78 ; =0x000005AC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 +_02269C10: + ldrh r0, [r6, #6] + cmp r0, #0 + bne _02269C38 + ldr r0, _02269C50 ; =0x0000050C + mov r1, #0 + ldr r0, [r5, r0] + bl sub_020129D0 + mov r0, #0x57 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_020129D0 + mov r0, #0x17 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_020129D0 +_02269C38: + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269C3C: .word 0x0000068A +_02269C40: .word 0x00070809 +_02269C44: .word 0x00004E37 +_02269C48: .word 0x000004E4 +_02269C4C: .word 0x000004F8 +_02269C50: .word 0x0000050C +_02269C54: .word 0x022702D4 +_02269C58: .word 0x02270284 +_02269C5C: .word 0x000003A1 +_02269C60: .word 0x000A0B0C +_02269C64: .word 0x00000534 +_02269C68: .word 0x00000584 +_02269C6C: .word 0x00000548 +_02269C70: .word 0x00000598 +_02269C74: .word 0x0000055C +_02269C78: .word 0x000005AC + thumb_func_end ov16_022699AC + + thumb_func_start ov16_02269C7C +ov16_02269C7C: ; 0x02269C7C + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E05C + mov r1, #0xeb + lsl r1, r1, #2 + add r6, r0, #0 + bl sub_0200B1EC + add r4, r0, #0 + ldr r1, _02269D00 ; =0x000003AD + add r0, r6, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, _02269D04 ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _02269D08 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x44 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r4, #0 + bl ov16_0226A98C + ldr r0, _02269D0C ; =0x000A0B0C + ldr r1, _02269D10 ; =0x000004E4 + str r0, [sp] + mov r3, #2 + ldr r0, _02269D08 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x8c + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r6, #0 + bl ov16_0226A98C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02269D00: .word 0x000003AD +_02269D04: .word 0x00010203 +_02269D08: .word 0x00004E37 +_02269D0C: .word 0x000A0B0C +_02269D10: .word 0x000004E4 + thumb_func_end ov16_02269C7C + + thumb_func_start ov16_02269D14 +ov16_02269D14: ; 0x02269D14 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E05C + ldr r1, _02269D98 ; =0x0000049D + add r6, r0, #0 + bl sub_0200B1EC + add r4, r0, #0 + ldr r1, _02269D9C ; =0x0000049E + add r0, r6, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, _02269DA0 ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _02269DA4 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x44 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r4, #0 + bl ov16_0226A98C + ldr r0, _02269DA8 ; =0x000A0B0C + ldr r1, _02269DAC ; =0x000004E4 + str r0, [sp] + mov r3, #2 + ldr r0, _02269DA4 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x8c + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r6, #0 + bl ov16_0226A98C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + nop +_02269D98: .word 0x0000049D +_02269D9C: .word 0x0000049E +_02269DA0: .word 0x00010203 +_02269DA4: .word 0x00004E37 +_02269DA8: .word 0x000A0B0C +_02269DAC: .word 0x000004E4 + thumb_func_end ov16_02269D14 + + thumb_func_start ov16_02269DB0 +ov16_02269DB0: ; 0x02269DB0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E05C + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E0D0 + add r4, r0, #0 + ldr r1, _02269E7C ; =0x000004A2 + add r0, r6, #0 + bl sub_0200B1EC + str r0, [sp, #0x1c] + ldr r1, _02269E80 ; =0x000004A3 + add r0, r6, #0 + bl sub_0200B1EC + str r0, [sp, #0x20] + mov r0, #0x64 + mov r1, #5 + bl sub_02023790 + add r6, r0, #0 + mov r0, #0x64 + mov r1, #5 + bl sub_02023790 + add r7, r0, #0 + ldrh r2, [r5, #0x1c] + add r0, r4, #0 + mov r1, #0 + bl sub_0200B630 + ldr r2, [sp, #0x1c] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + ldr r2, [sp, #0x20] + add r0, r4, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, _02269E84 ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _02269E88 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x44 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r6, #0 + bl ov16_0226A98C + ldr r0, _02269E8C ; =0x000A0B0C + ldr r1, _02269E90 ; =0x000004E4 + str r0, [sp] + mov r3, #2 + ldr r0, _02269E88 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x8c + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r7, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02269E7C: .word 0x000004A2 +_02269E80: .word 0x000004A3 +_02269E84: .word 0x00010203 +_02269E88: .word 0x00004E37 +_02269E8C: .word 0x000A0B0C +_02269E90: .word 0x000004E4 + thumb_func_end ov16_02269DB0 + + thumb_func_start ov16_02269E94 +ov16_02269E94: ; 0x02269E94 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02269F58 ; =0x04001050 + mov r1, #2 + mov r2, #0xf + mov r3, #0x1f + bl sub_020BF55C + ldr r0, [r5, #0] + bl ov16_0223E05C + ldr r1, _02269F5C ; =0x000004EC + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #5 + str r0, [sp] + mov r0, #7 + mov r1, #0x2e + mov r2, #1 + add r3, sp, #0x1c + bl sub_02006F6C + add r6, r0, #0 + ldr r0, [sp, #0x1c] + mov r2, #2 + ldr r1, [r5, #0x58] + add r0, #0xc + lsl r2, r2, #0xa + bl sub_020C4B68 + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + bl ov16_0223DF00 + mov r1, #4 + ldr r2, [r5, #0x58] + add r6, r0, #0 + lsl r3, r1, #9 + bl sub_02019574 + add r0, r6, #0 + mov r1, #4 + bl sub_0201C3C0 + ldr r0, [r5, #0] + bl ov16_0223DF00 + mov r2, #2 + add r6, r0, #0 + ldr r1, [r5, #0x50] + mov r0, #0 + lsl r2, r2, #0xa + bl sub_020C4B4C + mov r3, #2 + ldr r2, [r5, #0x50] + add r0, r6, #0 + mov r1, #5 + lsl r3, r3, #0xa + bl sub_02019574 + add r0, r6, #0 + mov r1, #5 + bl sub_0201C3C0 + ldr r0, _02269F60 ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _02269F64 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0xb2 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r4, #0 + bl ov16_0226A98C + add r0, r4, #0 + bl sub_020237BC + add sp, #0x20 + pop {r4, r5, r6, pc} + nop +_02269F58: .word 0x04001050 +_02269F5C: .word 0x000004EC +_02269F60: .word 0x00010203 +_02269F64: .word 0x00004E37 + thumb_func_end ov16_02269E94 + + thumb_func_start ov16_02269F68 +ov16_02269F68: ; 0x02269F68 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E05C + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E0D0 + add r4, r0, #0 + ldr r1, _0226A034 ; =0x000004C1 + add r0, r6, #0 + bl sub_0200B1EC + str r0, [sp, #0x1c] + ldr r1, _0226A038 ; =0x000004C2 + add r0, r6, #0 + bl sub_0200B1EC + str r0, [sp, #0x20] + mov r0, #0x64 + mov r1, #5 + bl sub_02023790 + add r6, r0, #0 + mov r0, #0x64 + mov r1, #5 + bl sub_02023790 + add r7, r0, #0 + ldrh r2, [r5, #0x1c] + add r0, r4, #0 + mov r1, #0 + bl sub_0200B630 + ldr r2, [sp, #0x1c] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + ldr r2, [sp, #0x20] + add r0, r4, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, _0226A03C ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _0226A040 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x44 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r6, #0 + bl ov16_0226A98C + ldr r0, _0226A044 ; =0x000A0B0C + ldr r1, _0226A048 ; =0x000004E4 + str r0, [sp] + mov r3, #2 + ldr r0, _0226A040 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x8c + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r7, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_0226A034: .word 0x000004C1 +_0226A038: .word 0x000004C2 +_0226A03C: .word 0x00010203 +_0226A040: .word 0x00004E37 +_0226A044: .word 0x000A0B0C +_0226A048: .word 0x000004E4 + thumb_func_end ov16_02269F68 + + thumb_func_start ov16_0226A04C +ov16_0226A04C: ; 0x0226A04C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E05C + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E0D0 + add r4, r0, #0 + ldr r1, _0226A118 ; =0x000004BF + add r0, r6, #0 + bl sub_0200B1EC + mov r1, #0x13 + str r0, [sp, #0x1c] + add r0, r6, #0 + lsl r1, r1, #6 + bl sub_0200B1EC + str r0, [sp, #0x20] + mov r0, #0x64 + mov r1, #5 + bl sub_02023790 + add r6, r0, #0 + mov r0, #0x64 + mov r1, #5 + bl sub_02023790 + add r7, r0, #0 + ldrh r2, [r5, #0x1c] + add r0, r4, #0 + mov r1, #0 + bl sub_0200B630 + ldr r2, [sp, #0x1c] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + ldr r2, [sp, #0x20] + add r0, r4, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, _0226A11C ; =0x00010203 + mov r1, #0x4d + str r0, [sp] + mov r3, #2 + lsl r1, r1, #4 + ldr r0, _0226A120 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x44 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r6, #0 + bl ov16_0226A98C + ldr r0, _0226A124 ; =0x000A0B0C + ldr r1, _0226A128 ; =0x000004E4 + str r0, [sp] + mov r3, #2 + ldr r0, _0226A120 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x8c + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + add r2, r7, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A118: .word 0x000004BF +_0226A11C: .word 0x00010203 +_0226A120: .word 0x00004E37 +_0226A124: .word 0x000A0B0C +_0226A128: .word 0x000004E4 + thumb_func_end ov16_0226A04C + + thumb_func_start ov16_0226A12C +ov16_0226A12C: ; 0x0226A12C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r0, #0 + add r7, r5, #0 + add r7, #0x1c + add r0, r7, #0 + add r0, #0x21 + ldrb r1, [r0] + ldr r0, _0226A2F0 ; =0x0000068C + strb r1, [r5, r0] + add r1, r7, #0 + add r1, #0x20 + ldrb r1, [r1] + sub r0, r0, #2 + strb r1, [r5, r0] + ldr r0, [r5, #0] + bl ov16_0223E05C + str r0, [sp, #0x2c] + ldr r0, [r5, #0] + bl ov16_0223E0D0 + str r0, [sp, #0x1c] + add r0, r5, #0 + add r1, sp, #0x40 + mov r2, #0 + bl ov16_0226B20C + add r0, r5, #0 + bl ov16_0226A698 + add r0, r5, #0 + bl ov16_0226AAF8 + add r1, sp, #0x38 + ldr r0, [r5, #0] + add r1, #2 + bl ov16_0223F87C + ldr r0, [r5, #0] + add r1, sp, #0x34 + bl ov16_0223F858 + mov r0, #0x18 + mov r1, #5 + bl sub_02023790 + str r0, [sp, #0x28] + mov r0, #0x4d + lsl r0, r0, #4 + add r0, r5, r0 + mov r4, #0 + str r0, [sp, #0x30] + b _0226A2A4 +_0226A198: + add r1, r4, #2 + add r0, sp, #0x34 + ldrb r6, [r0, r1] + lsl r0, r6, #3 + add r0, r7, r0 + ldrb r1, [r0, #1] + lsl r0, r1, #0x1d + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0226A292 + add r0, sp, #0x40 + ldrb r0, [r0, r4] + cmp r0, #1 + bne _0226A292 + lsl r0, r1, #0x1e + lsr r0, r0, #0x1e + bne _0226A1C6 + ldr r0, [sp, #0x2c] + ldr r1, _0226A2F4 ; =0x000003C2 + bl sub_0200B1EC + str r0, [sp, #0x24] + b _0226A1E2 +_0226A1C6: + cmp r0, #1 + bne _0226A1D6 + ldr r0, [sp, #0x2c] + ldr r1, _0226A2F8 ; =0x000003C3 + bl sub_0200B1EC + str r0, [sp, #0x24] + b _0226A1E2 +_0226A1D6: + mov r1, #0xf1 + ldr r0, [sp, #0x2c] + lsl r1, r1, #2 + bl sub_0200B1EC + str r0, [sp, #0x24] +_0226A1E2: + lsl r2, r6, #3 + ldrb r2, [r7, r2] + ldr r0, [r5, #0] + add r1, r6, #0 + bl ov16_0223DFAC + str r0, [sp, #0x20] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [sp, #0x1c] + mov r1, #0 + bl sub_0200B5CC + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x24] + bl sub_0200C388 + mov r0, #1 + tst r0, r4 + beq _0226A212 + ldr r0, _0226A2FC ; =0x00010203 + b _0226A214 +_0226A212: + ldr r0, _0226A300 ; =0x00040506 +_0226A214: + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + ldr r0, _0226A304 ; =0x00004E37 + ldr r1, _0226A308 ; =0x02270328 + str r0, [sp, #8] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + add r2, r4, #0 + mov r3, #2 + str r1, [sp, #0xc] + ldr r1, _0226A308 ; =0x02270328 + add r0, r1, r0 + ldrh r0, [r0, #2] + mov r1, #0x14 + mul r2, r1 + ldr r1, [sp, #0x30] + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + add r1, r1, r2 + str r0, [sp, #0x18] + ldr r2, [sp, #0x28] + add r0, r5, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x24] + bl sub_020237BC + cmp r4, #1 + beq _0226A25A + cmp r4, #3 + beq _0226A276 + b _0226A2A2 +_0226A25A: + lsl r0, r6, #3 + add r6, r7, r0 + ldrh r0, [r6, #6] + mov r3, #4 + ldr r1, [sp, #0x20] + str r0, [sp] + ldrb r0, [r6, #2] + mov r2, #3 + str r0, [sp, #4] + ldrsh r3, [r6, r3] + add r0, r5, #0 + bl ov16_0226A7A4 + b _0226A2A2 +_0226A276: + lsl r0, r6, #3 + add r6, r7, r0 + ldrh r0, [r6, #6] + mov r3, #4 + ldr r1, [sp, #0x20] + str r0, [sp] + ldrb r0, [r6, #2] + mov r2, #5 + str r0, [sp, #4] + ldrsh r3, [r6, r3] + add r0, r5, #0 + bl ov16_0226A7A4 + b _0226A2A2 +_0226A292: + add r0, sp, #0x40 + ldrb r0, [r0, r4] + cmp r0, #0 + bne _0226A2A2 + add r0, r5, #0 + add r1, r4, #0 + bl ov16_0226B0DC +_0226A2A2: + add r4, r4, #1 +_0226A2A4: + cmp r4, #4 + bge _0226A2AA + b _0226A198 +_0226A2AA: + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x2c] + ldr r1, _0226A30C ; =0x000003A2 + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, _0226A310 ; =0x000A0B0C + mov r3, #2 + str r0, [sp] + ldr r0, _0226A304 ; =0x00004E37 + str r3, [sp, #4] + str r0, [sp, #8] + ldr r0, _0226A314 ; =0x02270308 + add r2, r4, #0 + ldrh r1, [r0, #0x30] + str r1, [sp, #0xc] + ldrh r0, [r0, #0x32] + mov r1, #0x52 + lsl r1, r1, #4 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r5, r1 + bl ov16_0226A98C + add r0, r4, #0 + bl sub_020237BC + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A2F0: .word 0x0000068C +_0226A2F4: .word 0x000003C2 +_0226A2F8: .word 0x000003C3 +_0226A2FC: .word 0x00010203 +_0226A300: .word 0x00040506 +_0226A304: .word 0x00004E37 +_0226A308: .word 0x02270328 +_0226A30C: .word 0x000003A2 +_0226A310: .word 0x000A0B0C +_0226A314: .word 0x02270308 + thumb_func_end ov16_0226A12C + + thumb_func_start ov16_0226A318 +ov16_0226A318: ; 0x0226A318 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + mov r0, #0xff + add r5, r1, #0 + str r0, [sp] + add r0, r5, #1 + cmp r0, #5 + bhi _0226A340 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226A334: ; jump table + .short _0226A340 - _0226A334 - 2 ; case 0 + .short _0226A340 - _0226A334 - 2 ; case 1 + .short _0226A344 - _0226A334 - 2 ; case 2 + .short _0226A368 - _0226A334 - 2 ; case 3 + .short _0226A36E - _0226A334 - 2 ; case 4 + .short _0226A374 - _0226A334 - 2 ; case 5 +_0226A340: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226A344: + ldr r0, _0226A3E0 ; =0x0000068A + mov r7, #0 + ldrb r0, [r4, r0] + add r6, r7, #0 + cmp r0, #0 + beq _0226A35A + cmp r0, #2 + beq _0226A35E + cmp r0, #4 + beq _0226A35E + b _0226A378 +_0226A35A: + str r0, [sp] + b _0226A378 +_0226A35E: + ldr r0, _0226A3E0 ; =0x0000068A + ldrb r0, [r4, r0] + sub r0, r0, #2 + str r0, [sp] + b _0226A378 +_0226A368: + mov r7, #1 + add r6, r7, #0 + b _0226A378 +_0226A36E: + mov r7, #2 + mov r6, #1 + b _0226A378 +_0226A374: + mov r7, #3 + mov r6, #1 +_0226A378: + add r0, r4, #0 + add r1, r2, #0 + bl ov16_0226B318 + ldr r0, _0226A3E4 ; =ov16_0226B390 + add r1, r4, #0 + bl ov16_0226B2BC + ldr r0, _0226A3E8 ; =0x022703A4 + sub r2, r5, #1 + mov r1, #6 + mul r1, r2 + add r0, r0, r1 + mov r1, #0x6a + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, _0226A3EC ; =0x022702F4 + lsl r2, r2, #2 + add r3, r0, r2 + add r0, r1, #4 + str r3, [r4, r0] + add r0, r1, #0 + mov r3, #1 + add r0, #0xc + strb r3, [r4, r0] + add r0, r1, #0 + add r0, #8 + str r5, [r4, r0] + add r0, r1, #0 + add r0, #0xd + strb r7, [r4, r0] + add r0, r1, #0 + ldr r7, [sp] + add r0, #0xe + strb r7, [r4, r0] + add r0, r1, #0 + add r0, #0xf + strb r6, [r4, r0] + ldr r0, _0226A3F0 ; =0x02270294 + add r6, r0, r2 + ldrh r2, [r0, r2] + add r0, r1, #0 + add r0, #0x12 + strh r2, [r4, r0] + add r0, r1, #0 + ldrh r2, [r6, #2] + add r0, #0x14 + add r1, #0x10 + strh r2, [r4, r0] + strb r3, [r4, r1] + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A3E0: .word 0x0000068A +_0226A3E4: .word ov16_0226B390 +_0226A3E8: .word 0x022703A4 +_0226A3EC: .word 0x022702F4 +_0226A3F0: .word 0x02270294 + thumb_func_end ov16_0226A318 + + thumb_func_start ov16_0226A3F4 +ov16_0226A3F4: ; 0x0226A3F4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0 + add r4, r1, #0 + mvn r0, r0 + add r1, r2, #0 + cmp r4, r0 + bne _0226A408 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226A408: + add r2, r5, #0 + add r2, #0x1c + cmp r4, #1 + blt _0226A41E + cmp r4, #4 + bgt _0226A41E + sub r3, r4, #1 + lsl r3, r3, #1 + ldrh r2, [r2, r3] + cmp r2, #0 + beq _0226A48C +_0226A41E: + sub r0, r4, #1 + cmp r4, #4 + bgt _0226A440 + add r2, r4, #1 + bmi _0226A444 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0226A434: ; jump table + .short _0226A444 - _0226A434 - 2 ; case 0 + .short _0226A444 - _0226A434 - 2 ; case 1 + .short _0226A44A - _0226A434 - 2 ; case 2 + .short _0226A44A - _0226A434 - 2 ; case 3 + .short _0226A44A - _0226A434 - 2 ; case 4 + .short _0226A44A - _0226A434 - 2 ; case 5 +_0226A440: + cmp r4, #0xff + beq _0226A45A +_0226A444: + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0226A44A: + mov r2, #6 + mul r2, r0 + ldr r3, _0226A490 ; =0x022703F4 + lsl r0, r0, #2 + add r7, r3, r2 + ldr r2, _0226A494 ; =0x02270378 + add r6, r2, r0 + b _0226A45E +_0226A45A: + ldr r7, _0226A498 ; =0x0227040C + ldr r6, _0226A49C ; =0x02270388 +_0226A45E: + add r0, r5, #0 + bl ov16_0226B318 + ldr r0, _0226A4A0 ; =ov16_0226B4E0 + add r1, r5, #0 + bl ov16_0226B2BC + mov r1, #0x6a + lsl r1, r1, #4 + str r7, [r5, r1] + add r0, r1, #4 + str r6, [r5, r0] + add r0, r1, #0 + mov r2, #3 + add r0, #0xc + strb r2, [r5, r0] + add r0, r1, #0 + add r0, #8 + str r4, [r5, r0] + mov r0, #1 + add r1, #0x10 + strb r0, [r5, r1] + add r0, r4, #0 +_0226A48C: + pop {r3, r4, r5, r6, r7, pc} + nop +_0226A490: .word 0x022703F4 +_0226A494: .word 0x02270378 +_0226A498: .word 0x0227040C +_0226A49C: .word 0x02270388 +_0226A4A0: .word ov16_0226B4E0 + thumb_func_end ov16_0226A3F4 + + thumb_func_start ov16_0226A4A4 +ov16_0226A4A4: ; 0x0226A4A4 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0 + add r4, r1, #0 + mvn r0, r0 + cmp r4, r0 + beq _0226A4BA + cmp r4, #1 + beq _0226A4BE + cmp r4, #0xff + beq _0226A4C2 +_0226A4BA: + add r0, r4, #0 + pop {r4, r5, r6, pc} +_0226A4BE: + mov r6, #0 + b _0226A4C4 +_0226A4C2: + mov r6, #1 +_0226A4C4: + add r0, r5, #0 + add r1, r2, #0 + bl ov16_0226B318 + ldr r0, _0226A510 ; =ov16_0226B390 + add r1, r5, #0 + bl ov16_0226B2BC + cmp r4, #1 + bne _0226A4E4 + mov r0, #0x6a + ldr r1, _0226A514 ; =0x02270246 + lsl r0, r0, #4 + str r1, [r5, r0] + ldr r1, _0226A518 ; =0x02270220 + b _0226A4EE +_0226A4E4: + mov r0, #0x6a + ldr r1, _0226A51C ; =0x02270240 + lsl r0, r0, #4 + str r1, [r5, r0] + ldr r1, _0226A520 ; =0x0227021C +_0226A4EE: + add r0, r0, #4 + str r1, [r5, r0] + ldr r0, _0226A524 ; =0x000006AC + mov r1, #6 + strb r1, [r5, r0] + sub r1, r0, #4 + str r4, [r5, r1] + add r1, r0, #1 + strb r6, [r5, r1] + add r1, r0, #3 + mov r2, #3 + strb r2, [r5, r1] + mov r1, #1 + add r0, r0, #4 + strb r1, [r5, r0] + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0226A510: .word ov16_0226B390 +_0226A514: .word 0x02270246 +_0226A518: .word 0x02270220 +_0226A51C: .word 0x02270240 +_0226A520: .word 0x0227021C +_0226A524: .word 0x000006AC + thumb_func_end ov16_0226A4A4 + + thumb_func_start ov16_0226A528 +ov16_0226A528: ; 0x0226A528 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r1, sp, #0 + mov r2, #1 + add r4, r0, #0 + bl ov16_0226B20C + cmp r5, #4 + bgt _0226A558 + add r0, r5, #1 + bmi _0226A55C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226A54C: ; jump table + .short _0226A55C - _0226A54C - 2 ; case 0 + .short _0226A55C - _0226A54C - 2 ; case 1 + .short _0226A562 - _0226A54C - 2 ; case 2 + .short _0226A572 - _0226A54C - 2 ; case 3 + .short _0226A582 - _0226A54C - 2 ; case 4 + .short _0226A592 - _0226A54C - 2 ; case 5 +_0226A558: + cmp r5, #0xff + beq _0226A5A2 +_0226A55C: + add sp, #4 + add r0, r5, #0 + pop {r3, r4, r5, r6, pc} +_0226A562: + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #0 + bne _0226A5E8 + mov r0, #0 + add sp, #4 + mvn r0, r0 + pop {r3, r4, r5, r6, pc} +_0226A572: + add r0, sp, #0 + ldrb r0, [r0, #1] + cmp r0, #0 + bne _0226A5E8 + mov r0, #0 + add sp, #4 + mvn r0, r0 + pop {r3, r4, r5, r6, pc} +_0226A582: + add r0, sp, #0 + ldrb r0, [r0, #2] + cmp r0, #0 + bne _0226A5E8 + mov r0, #0 + add sp, #4 + mvn r0, r0 + pop {r3, r4, r5, r6, pc} +_0226A592: + .byte 0x00, 0xA8, 0xC0, 0x78, 0x00, 0x28, 0x26, 0xD1, 0x00, 0x20, 0x01, 0xB0, 0xC0, 0x43 + .byte 0x78, 0xBD +_0226A5A2: + add r0, r4, #0 + mov r1, #4 + bl ov16_0226B318 + ldr r0, _0226A61C ; =ov16_0226B390 + add r1, r4, #0 + bl ov16_0226B2BC + mov r1, #0x6a + ldr r0, _0226A620 ; =0x022703EC + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r2, _0226A624 ; =0x0227034C + add r0, r1, #4 + str r2, [r4, r0] + add r0, r1, #0 + mov r2, #4 + add r0, #0xc + strb r2, [r4, r0] + add r0, r1, #0 + add r0, #8 + str r5, [r4, r0] + add r0, r1, #0 + add r0, #0xd + strb r2, [r4, r0] + add r0, r1, #0 + mov r2, #3 + add r0, #0xf + strb r2, [r4, r0] + mov r0, #1 + add r1, #0x10 + strb r0, [r4, r1] + add sp, #4 + add r0, r5, #0 + pop {r3, r4, r5, r6, pc} +_0226A5E8: + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r2, _0226A628 ; =0x000002FF + add r6, r0, #0 + mov r1, #5 + bl sub_02019EE0 + add r0, r6, #0 + mov r1, #5 + bl sub_0201C3C0 + add r0, r4, #0 + add r1, r5, #0 + bl ov16_0226B314 + ldr r0, _0226A62C ; =ov16_0226B780 + add r1, r4, #0 + bl ov16_0226B2BC + ldr r0, _0226A630 ; =0x000006BC + str r5, [r4, r0] + add r0, r5, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0226A61C: .word ov16_0226B390 +_0226A620: .word 0x022703EC +_0226A624: .word 0x0227034C +_0226A628: .word 0x000002FF +_0226A62C: .word ov16_0226B780 +_0226A630: .word 0x000006BC + thumb_func_end ov16_0226A528 + + thumb_func_start ov16_0226A634 +ov16_0226A634: ; 0x0226A634 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0 + mvn r1, r1 + add r5, r0, #0 + cmp r4, r1 + beq _0226A646 + cmp r4, #1 + beq _0226A64A +_0226A646: + add r0, r4, #0 + pop {r3, r4, r5, pc} +_0226A64A: + add r1, r2, #0 + bl ov16_0226B318 + ldr r0, _0226A68C ; =ov16_0226B390 + add r1, r5, #0 + bl ov16_0226B2BC + mov r1, #0x6a + ldr r0, _0226A690 ; =0x022701F4 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r2, _0226A694 ; =0x022701D0 + add r0, r1, #4 + str r2, [r5, r0] + add r0, r1, #0 + mov r2, #6 + add r0, #0xc + strb r2, [r5, r0] + add r0, r1, #0 + add r0, #8 + str r4, [r5, r0] + add r0, r1, #0 + mov r3, #0 + add r0, #0xd + strb r3, [r5, r0] + add r0, r1, #0 + mov r2, #3 + add r0, #0xf + strb r2, [r5, r0] + add r1, #0x10 + strb r3, [r5, r1] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0226A68C: .word ov16_0226B390 +_0226A690: .word 0x022701F4 +_0226A694: .word 0x022701D0 + thumb_func_end ov16_0226A634 + + thumb_func_start ov16_0226A698 +ov16_0226A698: ; 0x0226A698 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E010 + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E018 + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E064 + add r5, r0, #0 + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0226A710 ; =0x00004E36 + add r2, r4, #0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r3, r6, #0 + bl sub_0200CD7C + bl sub_02079FD8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0226A714 ; =0x00004E35 + add r1, r6, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE4 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0226A714 ; =0x00004E35 + add r1, r6, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x13 + bl sub_0200CE3C + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_0226A710: .word 0x00004E36 +_0226A714: .word 0x00004E35 + thumb_func_end ov16_0226A698 + + thumb_func_start ov16_0226A718 +ov16_0226A718: ; 0x0226A718 + push {r4, lr} + ldr r0, [r0, #0] + bl ov16_0223E018 + ldr r1, _0226A754 ; =0x00004E44 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0226A758 ; =0x00004E45 + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0226A75C ; =0x00004E46 + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0226A760 ; =0x00004E35 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0226A760 ; =0x00004E35 + add r0, r4, #0 + bl sub_0200D0A0 + ldr r1, _0226A764 ; =0x00004E36 + add r0, r4, #0 + bl sub_0200D080 + pop {r4, pc} + nop +_0226A754: .word 0x00004E44 +_0226A758: .word 0x00004E45 +_0226A75C: .word 0x00004E46 +_0226A760: .word 0x00004E35 +_0226A764: .word 0x00004E36 + thumb_func_end ov16_0226A718 + + thumb_func_start ov16_0226A768 +ov16_0226A768: ; 0x0226A768 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 + add r7, r4, #0 +_0226A772: + ldr r0, _0226A79C ; =0x00000628 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0226A782 + bl sub_0200D0F4 + ldr r0, _0226A79C ; =0x00000628 + str r6, [r5, r0] +_0226A782: + ldr r0, _0226A7A0 ; =0x00000638 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0226A792 + bl sub_0200DA58 + ldr r0, _0226A7A0 ; =0x00000638 + str r7, [r5, r0] +_0226A792: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0226A772 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A79C: .word 0x00000628 +_0226A7A0: .word 0x00000638 + thumb_func_end ov16_0226A768 + + thumb_func_start ov16_0226A7A4 +ov16_0226A7A4: ; 0x0226A7A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + add r6, r2, #0 + add r4, r0, #0 + str r1, [sp, #0xc] + str r3, [sp, #0x10] + cmp r6, #2 + blt _0226A7B8 + sub r5, r6, #2 + b _0226A7BA +_0226A7B8: + add r5, r6, #0 +_0226A7BA: + lsl r0, r5, #2 + add r1, r4, r0 + ldr r0, _0226A904 ; =0x00000628 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226A7CA + bl sub_02022974 +_0226A7CA: + lsl r0, r5, #2 + add r1, r4, r0 + ldr r0, _0226A908 ; =0x00000638 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226A7DA + bl sub_02022974 +_0226A7DA: + cmp r6, #5 + bhi _0226A802 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226A7EA: ; jump table + .short _0226A7F6 - _0226A7EA - 2 ; case 0 + .short _0226A802 - _0226A7EA - 2 ; case 1 + .short _0226A7F6 - _0226A7EA - 2 ; case 2 + .short _0226A7FA - _0226A7EA - 2 ; case 3 + .short _0226A7F6 - _0226A7EA - 2 ; case 4 + .short _0226A7FE - _0226A7EA - 2 ; case 5 +_0226A7F6: + ldr r6, _0226A90C ; =0x00004E44 + b _0226A80C +_0226A7FA: + ldr r6, _0226A910 ; =0x00004E45 + b _0226A80C +_0226A7FE: + ldr r6, _0226A914 ; =0x00004E46 + b _0226A80C +_0226A802: + bl sub_02022974 + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226A80C: + ldr r0, [r4, #0] + bl ov16_0223E010 + str r0, [sp, #0x18] + ldr r0, [r4, #0] + bl ov16_0223E018 + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + bl sub_02079D80 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + mov r2, #0x13 + str r6, [sp, #8] + bl sub_0200CBDC + ldr r3, _0226A918 ; =0x022704B0 + add r2, sp, #0x1c + mov r7, #6 +_0226A83E: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r7, r7, #1 + bne _0226A83E + ldr r0, [r3, #0] + lsl r3, r5, #2 + str r0, [r2, #0] + ldr r2, _0226A91C ; =0x02270304 + str r6, [sp, #0x30] + ldrh r1, [r2, r3] + add r0, sp, #0x1c + strh r1, [r0] + add r1, r2, r3 + ldrh r1, [r1, #2] + add r2, sp, #0x1c + strh r1, [r0, #2] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + bl sub_0200CE6C + add r3, sp, #0x1c + mov r1, #0 + mov r2, #2 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + mov r3, #0x11 + lsl r3, r3, #0x10 + add r6, r0, #0 + bl sub_0200D500 + ldr r0, [sp, #0xc] + bl sub_02079FC4 + add r1, r0, #0 + ldr r0, [r6, #0] + bl sub_02021F24 + ldr r0, [sp, #0x10] + mov r7, #0 + cmp r0, #0 + beq _0226A8DC + ldr r0, [sp, #0x6c] + cmp r0, #2 + beq _0226A8DC + cmp r0, #3 + beq _0226A8DC + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x68] + lsl r0, r0, #0x10 + lsl r1, r1, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + mov r2, #0x30 + bl sub_0208C104 + cmp r0, #4 + bhi _0226A8D4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226A8BC: ; jump table + .short _0226A8D4 - _0226A8BC - 2 ; case 0 + .short _0226A8D2 - _0226A8BC - 2 ; case 1 + .short _0226A8CE - _0226A8BC - 2 ; case 2 + .short _0226A8CA - _0226A8BC - 2 ; case 3 + .short _0226A8C6 - _0226A8BC - 2 ; case 4 +_0226A8C6: + mov r7, #1 + b _0226A8D4 +_0226A8CA: + mov r7, #2 + b _0226A8D4 +_0226A8CE: + mov r7, #3 + b _0226A8D4 +_0226A8D2: + mov r7, #4 +_0226A8D4: + add r0, r6, #0 + add r1, r7, #0 + bl sub_0200D364 +_0226A8DC: + add r0, r6, #0 + bl sub_0200D330 + lsl r0, r5, #2 + add r1, r4, r0 + ldr r0, _0226A904 ; =0x00000628 + ldr r2, _0226A920 ; =0x00000514 + str r6, [r1, r0] + ldr r0, _0226A924 ; =ov16_0226A928 + add r1, r6, #0 + bl sub_0200D9E8 + lsl r1, r5, #2 + add r2, r4, r1 + ldr r1, _0226A908 ; =0x00000638 + str r0, [r2, r1] + add r0, r6, #0 + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226A904: .word 0x00000628 +_0226A908: .word 0x00000638 +_0226A90C: .word 0x00004E44 +_0226A910: .word 0x00004E45 +_0226A914: .word 0x00004E46 +_0226A918: .word 0x022704B0 +_0226A91C: .word 0x02270304 +_0226A920: .word 0x00000514 +_0226A924: .word ov16_0226A928 + thumb_func_end ov16_0226A7A4 + + thumb_func_start ov16_0226A928 +ov16_0226A928: ; 0x0226A928 + ldr r3, _0226A930 ; =sub_0200D330 + add r0, r1, #0 + bx r3 + nop +_0226A930: .word sub_0200D330 + thumb_func_end ov16_0226A928 + + thumb_func_start ov16_0226A934 +ov16_0226A934: ; 0x0226A934 + cmp r0, #3 + bhi _0226A94C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226A944: ; jump table + .short _0226A94C - _0226A944 - 2 ; case 0 + .short _0226A950 - _0226A944 - 2 ; case 1 + .short _0226A954 - _0226A944 - 2 ; case 2 + .short _0226A958 - _0226A944 - 2 ; case 3 +_0226A94C: + mov r0, #0 + bx lr +_0226A950: + mov r0, #1 + bx lr +_0226A954: + mov r0, #3 + bx lr +_0226A958: + mov r0, #2 + bx lr + thumb_func_end ov16_0226A934 + + thumb_func_start ov16_0226A95C +ov16_0226A95C: ; 0x0226A95C + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r6, r2, #0 + add r0, r1, #0 + add r1, r4, #0 + mov r2, #0 + add r7, r3, #0 + bl sub_02002D7C + add r4, r0, #0 + asr r1, r4, #2 + lsr r1, r1, #0x1d + add r1, r4, r1 + asr r5, r1, #3 + mov r1, #8 + bl sub_020BD140 + cmp r0, #0 + beq _0226A984 + add r5, r5, #1 +_0226A984: + str r4, [r6, #0] + str r5, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0226A95C + + thumb_func_start ov16_0226A98C +ov16_0226A98C: ; 0x0226A98C + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0] + str r2, [sp, #0x18] + str r3, [sp, #0x1c] + ldr r6, [sp, #0x9c] + ldr r4, [sp, #0xa8] + cmp r0, #0 + beq _0226A9A6 + bl sub_02022974 +_0226A9A6: + ldr r0, [r7, #0] + bl ov16_0223E018 + str r0, [sp, #0x20] + ldr r0, [r7, #0] + bl ov16_0223DF00 + str r0, [sp, #0x24] + cmp r4, #0 + bne _0226A9C8 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x1c] + add r2, sp, #0x2c + add r3, sp, #0x28 + bl ov16_0226A95C + b _0226A9D0 +_0226A9C8: + ldrh r0, [r4, #0x12] + str r0, [sp, #0x2c] + ldrh r0, [r4, #0x10] + str r0, [sp, #0x28] +_0226A9D0: + cmp r4, #0 + bne _0226AA0E + add r0, sp, #0x3c + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r2, [sp, #0x28] + ldr r0, [sp, #0x24] + lsl r2, r2, #0x18 + add r1, sp, #0x3c + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x90] + ldr r1, [sp, #0x1c] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r2, [sp, #0x18] + add r0, sp, #0x3c + str r3, [sp, #0x14] + bl sub_0201D7E0 + b _0226AA1A +_0226AA0E: + add r3, r4, #0 + add r2, sp, #0x3c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} +_0226AA1A: + add r0, sp, #0x3c + mov r1, #2 + mov r2, #5 + bl sub_02012898 + mov r1, #1 + mov r2, #2 + add r3, sp, #0x30 + bl sub_0201ED94 + ldr r0, [sp, #0xa4] + cmp r0, #1 + bne _0226AA3E + ldr r1, [sp, #0x2c] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + sub r6, r6, r0 +_0226AA3E: + ldr r0, _0226AABC ; =0x000004CC + ldr r0, [r7, r0] + str r0, [sp, #0x4c] + add r0, sp, #0x3c + str r0, [sp, #0x50] + ldr r0, [sp, #0x20] + bl sub_0200D9B0 + str r0, [sp, #0x54] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x98] + bl sub_0200D04C + str r0, [sp, #0x58] + mov r0, #0 + ldr r1, [sp, #0x34] + str r0, [sp, #0x5c] + str r0, [sp, #0x6c] + mov r0, #0x64 + str r1, [sp, #0x60] + mov r1, #0x42 + str r0, [sp, #0x70] + mov r0, #2 + str r0, [sp, #0x74] + mov r0, #5 + str r0, [sp, #0x78] + ldr r2, [sp, #0xa0] + lsl r1, r1, #2 + add r1, r2, r1 + add r0, sp, #0x4c + str r6, [sp, #0x64] + str r1, [sp, #0x68] + bl sub_020127E8 + ldr r1, [sp, #0x94] + add r7, r0, #0 + bl sub_02012AC0 + mov r2, #0x42 + ldr r3, [sp, #0xa0] + lsl r2, r2, #2 + add r0, r7, #0 + add r1, r6, #0 + add r2, r3, r2 + bl sub_020128C4 + cmp r4, #0 + bne _0226AAA4 + add r0, sp, #0x3c + bl sub_0201A8FC +_0226AAA4: + str r7, [r5, #0] + add r3, sp, #0x30 + ldmia r3!, {r0, r1} + add r2, r5, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #0x2c] + strh r0, [r5, #0x10] + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + nop +_0226AABC: .word 0x000004CC + thumb_func_end ov16_0226A98C + + thumb_func_start ov16_0226AAC0 +ov16_0226AAC0: ; 0x0226AAC0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _0226AAF4 ; =0x000004D4 + mov r6, #0 + add r4, r5, r0 + add r7, r6, #0 +_0226AACC: + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0226AAE6 + bl sub_02012870 + add r0, r4, #0 + bl sub_0201EE28 + mov r0, #0x4d + lsl r0, r0, #4 + str r7, [r5, r0] +_0226AAE6: + add r6, r6, #1 + add r5, #0x14 + add r4, #0x14 + cmp r6, #0xd + blt _0226AACC + pop {r3, r4, r5, r6, r7, pc} + nop +_0226AAF4: .word 0x000004D4 + thumb_func_end ov16_0226AAC0 + + thumb_func_start ov16_0226AAF8 +ov16_0226AAF8: ; 0x0226AAF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + ldr r0, [r7, #0] + bl ov16_0223DF00 + mov r1, #5 + bl sub_02019FE4 + add r4, r0, #0 + add r0, r7, #0 + add r1, sp, #4 + mov r2, #0 + bl ov16_0226B20C + add r0, sp, #0 + ldrb r0, [r0, #4] + cmp r0, #1 + bne _0226AB72 + add r0, r7, #0 + mov r1, #1 + add r2, sp, #0 + mov r3, #0 + bl ov16_0226B264 + add r0, sp, #0 + ldrb r0, [r0, #2] + cmp r0, #1 + bne _0226AB56 + mov r5, #0xc + mov r0, #0xa9 + lsl r6, r5, #5 + lsl r0, r0, #2 + mov r2, #0xf +_0226AB3C: + lsl r1, r6, #1 + add r1, r4, r1 + add r3, r2, #0 + add r1, #0x1e +_0226AB44: + add r3, r3, #1 + strh r0, [r1] + add r1, r1, #2 + cmp r3, #0x10 + ble _0226AB44 + add r5, r5, #1 + add r6, #0x20 + cmp r5, #0x10 + ble _0226AB3C +_0226AB56: + add r0, sp, #0 + ldrb r0, [r0, #3] + cmp r0, #1 + bne _0226AB72 + mov r0, #0xa1 + lsl r0, r0, #2 + add r1, r4, r0 + mov r2, #2 + add r0, #0x20 +_0226AB68: + add r2, r2, #1 + strh r0, [r1] + add r1, r1, #2 + cmp r2, #0xc + ble _0226AB68 +_0226AB72: + add r0, sp, #0 + ldrb r0, [r0, #5] + cmp r0, #1 + bne _0226ABCC + add r0, r7, #0 + mov r1, #2 + add r2, sp, #0 + mov r3, #0 + bl ov16_0226B264 + add r0, sp, #0 + ldrb r0, [r0, #2] + cmp r0, #1 + bne _0226ABA0 + ldr r0, _0226ABD0 ; =0x000002A6 + mov r2, #0x13 + add r1, r4, r0 + sub r0, r0, #2 +_0226AB96: + add r2, r2, #1 + strh r0, [r1] + add r1, r1, #2 + cmp r2, #0x1d + ble _0226AB96 +_0226ABA0: + add r0, sp, #0 + ldrb r0, [r0, #3] + cmp r0, #1 + bne _0226ABCC + mov r0, #0xa9 + mov r5, #3 + mov r3, #0x60 + lsl r0, r0, #2 + mov r2, #0xf +_0226ABB2: + lsl r1, r3, #1 + add r1, r4, r1 + add r6, r2, #0 + add r1, #0x1e +_0226ABBA: + add r6, r6, #1 + strh r0, [r1] + add r1, r1, #2 + cmp r6, #0x10 + ble _0226ABBA + add r5, r5, #1 + add r3, #0x20 + cmp r5, #7 + ble _0226ABB2 +_0226ABCC: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226ABD0: .word 0x000002A6 + thumb_func_end ov16_0226AAF8 + + thumb_func_start ov16_0226ABD4 +ov16_0226ABD4: ; 0x0226ABD4 + cmp r1, #2 + blt _0226ABDA + sub r1, r1, #2 +_0226ABDA: + mov r2, #0x46 + lsl r2, r2, #2 + add r0, #0x6c + mul r2, r1 + add r0, r0, r2 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226ABD4 + + thumb_func_start ov16_0226ABE8 +ov16_0226ABE8: ; 0x0226ABE8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [sp] + mov r1, #0x4d + str r0, [sp, #0x10] + add r0, #0x94 + str r0, [sp, #0x10] + ldr r0, [sp] + lsl r1, r1, #2 + str r0, [sp, #0xc] + add r0, #0xe4 + str r0, [sp, #0xc] + ldr r0, [sp] + add r0, r0, r1 + str r0, [sp, #8] +_0226AC0C: + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [sp] + ldr r7, [sp, #0x10] + ldr r6, [sp, #0xc] + ldr r5, [sp, #8] + str r0, [sp, #4] + add r4, r0, #0 +_0226AC1C: + ldr r0, [sp, #4] + add r0, #0x84 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226AC36 + add r0, r7, #0 + bl sub_0201A8FC +_0226AC36: + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226AC46 + add r0, r6, #0 + bl sub_0201A8FC +_0226AC46: + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0226AC56 + add r0, r5, #0 + bl sub_0201A8FC +_0226AC56: + ldr r0, [sp, #4] + add r4, #0x14 + add r0, r0, #4 + str r0, [sp, #4] + ldr r0, [sp, #0x18] + add r7, #0x14 + add r0, r0, #1 + add r6, #0x14 + add r5, #0x14 + str r0, [sp, #0x18] + cmp r0, #4 + blt _0226AC1C + mov r0, #0x46 + ldr r1, [sp] + lsl r0, r0, #2 + add r1, r1, r0 + str r1, [sp] + ldr r1, [sp, #0x10] + add r1, r1, r0 + str r1, [sp, #0x10] + ldr r1, [sp, #0xc] + add r1, r1, r0 + str r1, [sp, #0xc] + ldr r1, [sp, #8] + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #4 + blt _0226AC0C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov16_0226ABE8 + + thumb_func_start ov16_0226AC98 +ov16_0226AC98: ; 0x0226AC98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + add r7, r0, #0 + ldr r0, [r7, #0] + add r5, r1, #0 + str r2, [sp, #8] + bl ov16_0223E05C + add r4, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + bl ov16_0226ABD4 + str r0, [sp, #0x38] + mov r0, #6 + bl sub_0208C098 + str r0, [sp, #0xc] + ldr r1, _0226AE94 ; =0x000003AA + add r0, r4, #0 + bl sub_0200B1EC + str r0, [sp, #0x28] + ldr r0, [r7, #0] + bl ov16_0223E0D0 + str r0, [sp, #0x24] + mov r0, #0x10 + mov r1, #5 + bl sub_02023790 + str r0, [sp, #0x30] + ldr r1, _0226AE98 ; =0x000003A9 + add r0, r4, #0 + bl sub_0200B1EC + ldr r4, [sp, #0x38] + str r0, [sp, #0x2c] + mov r0, #0 + str r0, [sp, #0x34] + add r0, r4, #0 + str r0, [sp, #0x1c] + str r0, [sp, #0x18] + add r0, #0x28 + str r0, [sp, #0x18] + add r0, r4, #0 + str r0, [sp, #0x14] + add r0, #0x78 + str r0, [sp, #0x14] + add r0, r4, #0 + str r0, [sp, #0x10] + add r0, #0xc8 + ldr r5, [sp, #8] + add r6, r4, #0 + str r0, [sp, #0x10] +_0226AD06: + ldrh r0, [r5] + ldrh r1, [r4] + cmp r0, r1 + beq _0226AD4C + cmp r0, #0 + beq _0226AD4C + mov r1, #3 + bl sub_020790C4 + str r0, [sp, #0x3c] + bl sub_0207C944 + str r0, [sp, #0x40] + ldr r0, [sp, #0x3c] + bl sub_0207C908 + add r1, r0, #0 + mov r0, #5 + str r0, [sp] + ldr r0, [sp, #0x40] + mov r2, #1 + add r3, sp, #0x4c + bl sub_02006F50 + str r0, [sp, #0x44] + ldr r0, [sp, #0x4c] + ldr r1, [sp, #0x1c] + ldr r0, [r0, #0x14] + ldr r1, [r1, #0x18] + ldr r2, [sp, #0xc] + bl sub_020C4B68 + ldr r0, [sp, #0x44] + bl sub_020181C4 +_0226AD4C: + ldr r0, [r6, #0x34] + cmp r0, #0 + beq _0226AD5E + ldrh r1, [r5] + ldrh r0, [r4] + cmp r1, r0 + beq _0226AD7E + cmp r1, #0 + beq _0226AD7E +_0226AD5E: + ldrh r0, [r5] + mov r1, #5 + bl sub_0200B2EC + str r0, [sp, #0x48] + ldr r0, _0226AE9C ; =0x00070809 + ldr r1, [sp, #0x48] + str r0, [sp] + ldr r3, [sp, #0x18] + add r0, r7, #0 + mov r2, #2 + bl ov16_0226AEA0 + ldr r0, [sp, #0x48] + bl sub_020237BC +_0226AD7E: + add r0, r6, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226ADAE + add r0, r6, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226ADAE + ldrh r1, [r5] + cmp r1, #0 + bne _0226ADAE + ldrh r0, [r4] + cmp r1, r0 + bne _0226ADAE + ldrh r1, [r5, #8] + ldrh r0, [r4, #8] + cmp r1, r0 + bne _0226ADAE + ldrh r1, [r5, #0x10] + ldrh r0, [r4, #0x10] + cmp r1, r0 + beq _0226AE3E +_0226ADAE: + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldrh r2, [r5, #8] + ldr r0, [sp, #0x24] + mov r1, #0 + mov r3, #2 + bl sub_0200B60C + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldrh r2, [r5, #0x10] + ldr r0, [sp, #0x24] + mov r1, #1 + mov r3, #2 + bl sub_0200B60C + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x30] + ldr r2, [sp, #0x2c] + bl sub_0200C388 + ldrh r0, [r5, #8] + ldrh r1, [r5, #0x10] + bl ov16_0226B924 + str r0, [sp, #0x20] + add r0, r6, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226AE04 + ldrh r1, [r5] + ldrh r0, [r4] + cmp r1, r0 + bne _0226AE04 + ldrh r1, [r5, #8] + ldrh r0, [r4, #8] + cmp r1, r0 + beq _0226AE14 +_0226AE04: + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x30] + str r0, [sp] + ldr r3, [sp, #0x14] + add r0, r7, #0 + mov r2, #0 + bl ov16_0226AEA0 +_0226AE14: + add r0, r6, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226AE2E + ldrh r1, [r5] + ldrh r0, [r4] + cmp r1, r0 + bne _0226AE2E + ldrh r1, [r5, #8] + ldrh r0, [r4, #8] + cmp r1, r0 + beq _0226AE3E +_0226AE2E: + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x28] + str r0, [sp] + ldr r3, [sp, #0x10] + add r0, r7, #0 + mov r2, #0 + bl ov16_0226AEA0 +_0226AE3E: + ldr r0, [sp, #0x1c] + add r4, r4, #2 + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r5, r5, #2 + add r0, #0x14 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r6, #0x14 + add r0, #0x14 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + add r0, #0x14 + str r0, [sp, #0x10] + ldr r0, [sp, #0x34] + add r0, r0, #1 + str r0, [sp, #0x34] + cmp r0, #4 + bge _0226AE68 + b _0226AD06 +_0226AE68: + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x2c] + bl sub_020237BC + ldr r0, [sp, #0x30] + bl sub_020237BC + mov r0, #0xc +_0226AE7C: + ldr r1, [sp, #8] + ldrh r2, [r1] + add r1, r1, #2 + str r1, [sp, #8] + ldr r1, [sp, #0x38] + strh r2, [r1] + add r1, r1, #2 + str r1, [sp, #0x38] + sub r0, r0, #1 + bne _0226AE7C + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226AE94: .word 0x000003AA +_0226AE98: .word 0x000003A9 +_0226AE9C: .word 0x00070809 + thumb_func_end ov16_0226AC98 + + thumb_func_start ov16_0226AEA0 +ov16_0226AEA0: ; 0x0226AEA0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r7, r2, #0 + add r6, r1, #0 + add r5, r0, #0 + add r4, r3, #0 + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #0x1c + add r3, sp, #0x18 + bl ov16_0226A95C + ldr r0, [sp, #0x1c] + strh r0, [r4, #0x12] + ldr r0, [sp, #0x18] + strh r0, [r4, #0x10] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0226AECC + add r0, r4, #0 + bl sub_0201A8FC +_0226AECC: + add r0, r4, #0 + bl sub_0201A7A0 + ldr r0, [r5, #0] + bl ov16_0223DF00 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + ldr r2, [sp, #0x18] + add r1, r4, #0 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x38] + add r1, r7, #0 + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + add r0, r4, #0 + add r2, r6, #0 + str r3, [sp, #0x14] + bl sub_0201D7E0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0226AEA0 + + thumb_func_start ov16_0226AF0C +ov16_0226AF0C: ; 0x0226AF0C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r0, #0 + str r0, [sp, #4] + add r0, #0x1c + str r0, [sp, #4] + ldr r0, [r5, #0] + bl ov16_0223E010 + str r0, [sp, #0xc] + ldr r0, [r5, #0] + bl ov16_0223E018 + ldr r1, _0226AFE0 ; =0x0000068A + str r0, [sp, #8] + ldrb r1, [r5, r1] + add r0, r5, #0 + bl ov16_0226ABD4 + ldr r4, _0226AFE4 ; =0x0227047C + str r0, [sp] + add r3, sp, #0x10 + mov r2, #6 +_0226AF3A: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0226AF3A + ldr r0, [r4, #0] + mov r4, #0 + str r0, [r3, #0] + add r6, sp, #0x10 + b _0226AFD8 +_0226AF4C: + lsl r0, r4, #2 + add r1, r5, r0 + ldr r0, _0226AFE8 ; =0x00000608 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226AF5C + bl sub_02022974 +_0226AF5C: + ldr r0, [sp, #4] + lsl r1, r4, #1 + ldrh r0, [r0, r1] + cmp r0, #0 + beq _0226AFD6 + mov r1, #3 + bl sub_020790C4 + add r2, r0, #0 + ldr r0, _0226AFEC ; =0x00004E39 + ldr r1, _0226AFF0 ; =0x022702B4 + add r0, r4, r0 + str r0, [sp, #0x24] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + add r3, sp, #0x10 + strh r1, [r6] + ldr r1, _0226AFF0 ; =0x022702B4 + add r0, r1, r0 + ldrh r0, [r0, #2] + ldr r1, [sp, #8] + strh r0, [r6, #2] + ldr r0, [sp, #0xc] + bl sub_0207CA58 + lsl r1, r4, #2 + add r2, r5, r1 + ldr r1, _0226AFE8 ; =0x00000608 + mov r3, #0x11 + str r0, [r2, r1] + add r0, r1, #0 + ldr r0, [r2, r0] + mov r1, #0 + mov r2, #2 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + lsl r3, r3, #0x10 + bl sub_0200D500 + lsl r0, r4, #2 + add r1, r5, r0 + ldr r0, _0226AFE8 ; =0x00000608 + ldr r0, [r1, r0] + ldr r0, [r0, #0] + bl sub_02021F98 + add r7, r0, #0 + mov r0, #6 + bl sub_0208C098 + add r2, r0, #0 + ldr r0, [sp] + lsl r3, r4, #2 + add r0, r0, r3 + mov r3, #0x66 + ldr r1, [r7, #8] + lsl r3, r3, #0x14 + ldr r0, [r0, #0x18] + add r1, r3, r1 + bl sub_020C4B18 +_0226AFD6: + add r4, r4, #1 +_0226AFD8: + cmp r4, #4 + blt _0226AF4C + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226AFE0: .word 0x0000068A +_0226AFE4: .word 0x0227047C +_0226AFE8: .word 0x00000608 +_0226AFEC: .word 0x00004E39 +_0226AFF0: .word 0x022702B4 + thumb_func_end ov16_0226AF0C + + thumb_func_start ov16_0226AFF4 +ov16_0226AFF4: ; 0x0226AFF4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E010 + ldr r0, [r5, #0] + bl ov16_0223E018 + mov r4, #0 + ldr r7, _0226B024 ; =0x00000608 + add r6, r4, #0 +_0226B00A: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0226B018 + bl sub_0207CA88 + ldr r0, _0226B024 ; =0x00000608 + str r6, [r5, r0] +_0226B018: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0226B00A + pop {r3, r4, r5, r6, r7, pc} + nop +_0226B024: .word 0x00000608 + thumb_func_end ov16_0226AFF4 + + thumb_func_start ov16_0226B028 +ov16_0226B028: ; 0x0226B028 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E010 + ldr r0, [r5, #0] + bl ov16_0223E018 + mov r4, #0 + add r6, r0, #0 + add r7, r4, #0 +_0226B03E: + ldr r0, _0226B064 ; =0x00000618 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0226B058 + bl sub_0207CB00 + ldr r1, _0226B068 ; =0x00004E3D + add r0, r6, #0 + add r1, r4, r1 + bl sub_0207CAF8 + ldr r0, _0226B064 ; =0x00000618 + str r7, [r5, r0] +_0226B058: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0226B03E + pop {r3, r4, r5, r6, r7, pc} + nop +_0226B064: .word 0x00000618 +_0226B068: .word 0x00004E3D + thumb_func_end ov16_0226B028 + + thumb_func_start ov16_0226B06C +ov16_0226B06C: ; 0x0226B06C + push {r3, r4, r5, lr} + ldr r0, [r0, #0] + add r5, r1, #0 + add r4, r2, #0 + bl ov16_0223E064 + add r4, #8 + add r1, r5, #0 + mov r2, #5 + mov r3, #1 + str r4, [sp] + bl ov11_0221F81C + pop {r3, r4, r5, pc} + thumb_func_end ov16_0226B06C + + thumb_func_start ov16_0226B088 +ov16_0226B088: ; 0x0226B088 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov16_0223E064 + add r6, r0, #0 + mov r7, #0 + b _0226B0CE +_0226B09A: + ldr r1, _0226B0D4 ; =0x0227022C + lsl r2, r4, #1 + add r1, r1, r2 + ldr r2, _0226B0D8 ; =0x02270274 + lsl r3, r4, #2 + add r2, r2, r3 + add r0, r5, #0 + mov r3, #3 + str r7, [sp] + bl ov16_0226B31C + mov r0, #0x20 + str r0, [sp] + add r3, r4, #0 + mov r1, #7 + add r3, #8 + lsl r3, r3, #0x14 + ldr r2, [r5, #0x5c] + lsl r1, r1, #6 + add r1, r2, r1 + add r0, r6, #0 + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02002FBC + add r4, r4, #1 +_0226B0CE: + cmp r4, #4 + blt _0226B09A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226B0D4: .word 0x0227022C +_0226B0D8: .word 0x02270274 + thumb_func_end ov16_0226B088 + + thumb_func_start ov16_0226B0DC +ov16_0226B0DC: ; 0x0226B0DC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + ldr r1, _0226B188 ; =0x022701C8 + add r5, r0, #0 + ldrb r2, [r1, #0xc] + add r0, sp, #0x10 + strb r2, [r0] + ldrb r2, [r1, #0xd] + strb r2, [r0, #1] + ldrb r2, [r1, #0xe] + ldrb r1, [r1, #0xf] + strb r2, [r0, #2] + strb r1, [r0, #3] + ldr r0, [r5, #0] + bl ov16_0223DF00 + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223E064 + add r7, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r2, _0226B18C ; =0x022701FC + lsl r1, r4, #1 + add r1, r2, r1 + ldr r3, _0226B190 ; =0x022702C4 + lsl r2, r4, #2 + add r2, r3, r2 + add r0, r5, #0 + mov r3, #4 + bl ov16_0226B31C + mov r0, #0x20 + str r0, [sp] + add r3, sp, #0x10 + ldrb r3, [r3, r4] + mov r1, #7 + ldr r2, [r5, #0x5c] + lsl r1, r1, #6 + lsl r3, r3, #0x14 + add r1, r2, r1 + add r0, r7, #0 + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02002FBC + add r0, r6, #0 + mov r1, #4 + bl sub_0201C3C0 + ldr r0, _0226B190 ; =0x022702C4 + lsl r1, r4, #2 + ldrb r2, [r0, r1] + add r3, r0, r1 + str r2, [sp] + ldrb r4, [r3, #3] + ldrb r2, [r3, #2] + sub r2, r4, r2 + add r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + str r2, [sp, #4] + ldrb r0, [r0, r1] + ldrb r2, [r3, #1] + mov r1, #5 + sub r0, r2, r0 + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldrb r3, [r3, #2] + ldr r2, _0226B194 ; =0x000002FF + add r0, r6, #0 + bl sub_02019CB8 + add r0, r6, #0 + mov r1, #5 + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0226B188: .word 0x022701C8 +_0226B18C: .word 0x022701FC +_0226B190: .word 0x022702C4 +_0226B194: .word 0x000002FF + thumb_func_end ov16_0226B0DC + + thumb_func_start ov16_0226B198 +ov16_0226B198: ; 0x0226B198 + push {r4, r5, r6, lr} + mov r5, #0 + mov r6, #1 + add r4, r5, #0 +_0226B1A0: + add r0, r5, #4 + cmp r0, #6 + beq _0226B1B2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r4, #0 + bl sub_02019120 + b _0226B1BC +_0226B1B2: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r6, #0 + bl sub_02019120 +_0226B1BC: + add r5, r5, #1 + cmp r5, #4 + blt _0226B1A0 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0226B198 + + thumb_func_start ov16_0226B1C4 +ov16_0226B1C4: ; 0x0226B1C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #1 + bne _0226B1D2 + bl ov16_0226B1E8 +_0226B1D2: + cmp r4, #1 + bne _0226B1E0 + ldr r0, _0226B1E4 ; =ov16_0226BCBC + add r1, r5, #0 + mov r2, #0xa + bl sub_0200DA3C +_0226B1E0: + pop {r3, r4, r5, pc} + nop +_0226B1E4: .word ov16_0226BCBC + thumb_func_end ov16_0226B1C4 + + thumb_func_start ov16_0226B1E8 +ov16_0226B1E8: ; 0x0226B1E8 + push {r4, lr} + add r4, r0, #0 + bl ov16_0226AFF4 + add r0, r4, #0 + bl ov16_0226B028 + add r0, r4, #0 + bl ov16_0226AAC0 + add r0, r4, #0 + bl ov16_0226A718 + add r0, r4, #0 + bl ov16_0226A768 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226B1E8 + + thumb_func_start ov16_0226B20C +ov16_0226B20C: ; 0x0226B20C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r6, r5, #0 + add r1, sp, #0 + add r7, r2, #0 + add r6, #0x1c + bl ov16_0223F858 + mov r0, #0 + b _0226B254 +_0226B226: + add r2, r0, #2 + add r1, sp, #0 + ldrb r1, [r1, r2] + cmp r7, #1 + bne _0226B242 + lsl r1, r1, #3 + add r1, r6, r1 + ldrb r1, [r1, #1] + lsl r1, r1, #0x1d + lsr r1, r1, #0x1f + bne _0226B242 + mov r1, #0 + strb r1, [r4, r0] + b _0226B252 +_0226B242: + ldr r1, _0226B25C ; =0x0000068C + lsl r2, r0, #2 + ldrb r1, [r5, r1] + lsl r3, r1, #4 + ldr r1, _0226B260 ; =0x022705B0 + add r1, r1, r3 + ldr r1, [r2, r1] + strb r1, [r4, r0] +_0226B252: + add r0, r0, #1 +_0226B254: + cmp r0, #4 + blt _0226B226 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226B25C: .word 0x0000068C +_0226B260: .word 0x022705B0 + thumb_func_end ov16_0226B20C + + thumb_func_start ov16_0226B264 +ov16_0226B264: ; 0x0226B264 + push {r4, lr} + ldr r4, _0226B2B8 ; =0x0000068C + ldrb r4, [r0, r4] + cmp r4, #0xb + bhi _0226B2AC + add r4, r4, r4 + add r4, pc + ldrh r4, [r4, #6] + lsl r4, r4, #0x10 + asr r4, r4, #0x10 + add pc, r4 +_0226B27A: ; jump table + .short _0226B292 - _0226B27A - 2 ; case 0 + .short _0226B2AC - _0226B27A - 2 ; case 1 + .short _0226B2AC - _0226B27A - 2 ; case 2 + .short _0226B2AC - _0226B27A - 2 ; case 3 + .short _0226B2AC - _0226B27A - 2 ; case 4 + .short _0226B2AC - _0226B27A - 2 ; case 5 + .short _0226B2AC - _0226B27A - 2 ; case 6 + .short _0226B2AC - _0226B27A - 2 ; case 7 + .short _0226B292 - _0226B27A - 2 ; case 8 + .short _0226B292 - _0226B27A - 2 ; case 9 + .short _0226B292 - _0226B27A - 2 ; case 10 + .short _0226B292 - _0226B27A - 2 ; case 11 +_0226B292: + mov r4, #0 + add r0, r4, #0 + mov r3, #1 + sub r1, r1, #1 +_0226B29A: + cmp r4, r1 + bne _0226B2A2 + strb r3, [r2, r4] + b _0226B2A4 +_0226B2A2: + strb r0, [r2, r4] +_0226B2A4: + add r4, r4, #1 + cmp r4, #4 + blt _0226B29A + pop {r4, pc} +_0226B2AC: + add r1, r2, #0 + add r2, r3, #0 + bl ov16_0226B20C + pop {r4, pc} + nop +_0226B2B8: .word 0x0000068C + thumb_func_end ov16_0226B264 + + thumb_func_start ov16_0226B2BC +ov16_0226B2BC: ; 0x0226B2BC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0226B2CC + bl sub_02022974 +_0226B2CC: + ldr r0, _0226B2E8 ; =0x0000069C + mov r1, #0 + add r0, r4, r0 + mov r2, #0x24 + bl sub_020C4CF4 + ldr r2, _0226B2EC ; =0x00000514 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} + nop +_0226B2E8: .word 0x0000069C +_0226B2EC: .word 0x00000514 + thumb_func_end ov16_0226B2BC + + thumb_func_start ov16_0226B2F0 +ov16_0226B2F0: ; 0x0226B2F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0226B30C + bl sub_0200DA58 + ldr r0, _0226B310 ; =0x0000069C + mov r1, #0 + add r0, r4, r0 + mov r2, #0x24 + str r1, [r4, #0xc] + bl sub_020C4CF4 +_0226B30C: + pop {r4, pc} + nop +_0226B310: .word 0x0000069C + thumb_func_end ov16_0226B2F0 + + thumb_func_start ov16_0226B314 +ov16_0226B314: ; 0x0226B314 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226B314 + + thumb_func_start ov16_0226B318 +ov16_0226B318: ; 0x0226B318 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226B318 + + thumb_func_start ov16_0226B31C +ov16_0226B31C: ; 0x0226B31C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + bl ov16_0223DF00 + mov r1, #4 + str r0, [sp, #4] + bl sub_02019FE4 + mov ip, r0 + lsl r0, r7, #2 + add r0, r5, r0 + ldr r0, [r0, #0x40] + ldrb r7, [r4] + str r0, [sp] + ldr r0, [sp, #0x20] + lsl r0, r0, #1 + ldrsh r1, [r6, r0] + ldrb r0, [r4, #1] + cmp r7, r0 + bgt _0226B384 + lsl r6, r7, #5 +_0226B350: + lsl r2, r6, #1 + mov r0, ip + add r5, r0, r2 + ldr r0, [sp] + ldrb r3, [r4, #3] + add r2, r0, r2 + ldrb r0, [r4, #2] + cmp r0, r3 + bgt _0226B37A + lsl r3, r0, #1 + add r2, r2, r3 + add r3, r5, r3 +_0226B368: + ldrh r5, [r2] + add r0, r0, #1 + add r2, r2, #2 + add r5, r1, r5 + strh r5, [r3] + ldrb r5, [r4, #3] + add r3, r3, #2 + cmp r0, r5 + ble _0226B368 +_0226B37A: + ldrb r0, [r4, #1] + add r7, r7, #1 + add r6, #0x20 + cmp r7, r0 + ble _0226B350 +_0226B384: + ldr r0, [sp, #4] + mov r1, #4 + bl sub_0201C3C0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0226B31C + + thumb_func_start ov16_0226B390 +ov16_0226B390: ; 0x0226B390 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r3, _0226B4D4 ; =0x0000069C + ldrsh r0, [r4, r3] + cmp r0, #0 + beq _0226B3AE + cmp r0, #1 + beq _0226B420 + cmp r0, #2 + beq _0226B43C + b _0226B4AE +_0226B3AE: + mov r0, #2 + str r0, [sp] + add r1, r3, #4 + add r2, r3, #0 + add r3, #0x10 + add r2, #8 + ldrb r3, [r4, r3] + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov16_0226B31C + ldr r0, _0226B4D8 ; =0x000006AD + add r2, sp, #4 + ldrb r1, [r4, r0] + mov r0, #0x14 + mul r0, r1 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_020129A4 + ldr r0, _0226B4D8 ; =0x000006AD + ldr r2, [sp, #4] + ldrb r1, [r4, r0] + mov r0, #0x14 + sub r2, r2, #2 + mul r0, r1 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r1, r0] + ldr r1, [sp, #8] + bl sub_020128C4 + ldr r0, _0226B4DC ; =0x000006AE + ldrb r1, [r4, r0] + cmp r1, #0xff + beq _0226B414 + lsl r1, r1, #2 + add r1, r4, r1 + sub r0, #0x86 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B414 + mov r1, #0 + sub r2, r1, #2 + bl sub_0200D5DC +_0226B414: + ldr r0, _0226B4D4 ; =0x0000069C + add sp, #0xc + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + pop {r3, r4, pc} +_0226B420: + add r0, r3, #2 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226B4D0 + mov r1, #0 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r3] + add r0, r0, #1 + strh r0, [r4, r3] +_0226B43C: + mov r0, #1 + mov r3, #0x6a + str r0, [sp] + lsl r3, r3, #4 + add r2, r3, #4 + ldr r1, [r4, r3] + add r3, #0xc + ldrb r3, [r4, r3] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov16_0226B31C + ldr r0, _0226B4D8 ; =0x000006AD + add r2, sp, #4 + ldrb r1, [r4, r0] + mov r0, #0x14 + mul r0, r1 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_020129A4 + ldr r0, _0226B4D8 ; =0x000006AD + ldr r2, [sp, #4] + ldrb r1, [r4, r0] + mov r0, #0x14 + add r2, r2, #1 + mul r0, r1 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r1, r0] + ldr r1, [sp, #8] + bl sub_020128C4 + ldr r0, _0226B4DC ; =0x000006AE + ldrb r1, [r4, r0] + cmp r1, #0xff + beq _0226B4A2 + lsl r1, r1, #2 + add r1, r4, r1 + sub r0, #0x86 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B4A2 + mov r1, #0 + mov r2, #1 + bl sub_0200D5DC +_0226B4A2: + ldr r0, _0226B4D4 ; =0x0000069C + add sp, #0xc + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + pop {r3, r4, pc} +_0226B4AE: + add r0, r3, #2 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226B4D0 + add r3, #0x14 + ldrb r1, [r4, r3] + add r0, r4, #0 + mov r2, #0 + bl ov16_0226B1C4 + add r0, r4, #0 + bl ov16_0226B2F0 +_0226B4D0: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0226B4D4: .word 0x0000069C +_0226B4D8: .word 0x000006AD +_0226B4DC: .word 0x000006AE + thumb_func_end ov16_0226B390 + + thumb_func_start ov16_0226B4E0 +ov16_0226B4E0: ; 0x0226B4E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r1, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r0, _0226B770 ; =0x000006A8 + add r1, r4, #0 + ldr r0, [r4, r0] + add r1, #0x1c + cmp r0, #4 + bgt _0226B512 + cmp r0, #0 + blt _0226B54E + add r2, r0, r0 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0226B508: ; jump table + .short _0226B54E - _0226B508 - 2 ; case 0 + .short _0226B516 - _0226B508 - 2 ; case 1 + .short _0226B524 - _0226B508 - 2 ; case 2 + .short _0226B532 - _0226B508 - 2 ; case 3 + .short _0226B540 - _0226B508 - 2 ; case 4 +_0226B512: + cmp r0, #0xff + b _0226B54E +_0226B516: + mov r0, #5 + str r0, [sp, #8] + ldrh r0, [r1] + mov r5, #0 + mov r6, #9 + str r0, [sp, #4] + b _0226B556 +_0226B524: + mov r0, #6 + str r0, [sp, #8] + ldrh r0, [r1, #2] + mov r5, #1 + mov r6, #0xa + str r0, [sp, #4] + b _0226B556 +_0226B532: + mov r0, #7 + str r0, [sp, #8] + ldrh r0, [r1, #4] + mov r5, #2 + mov r6, #0xb + str r0, [sp, #4] + b _0226B556 +_0226B540: + mov r0, #8 + str r0, [sp, #8] + ldrh r0, [r1, #6] + mov r5, #3 + mov r6, #0xc + str r0, [sp, #4] + b _0226B556 +_0226B54E: + mov r5, #0 + add r6, r5, #0 + str r5, [sp, #8] + str r5, [sp, #4] +_0226B556: + ldr r3, _0226B774 ; =0x0000069C + ldrsh r0, [r4, r3] + cmp r0, #0 + beq _0226B56A + cmp r0, #1 + beq _0226B64C + cmp r0, #2 + bne _0226B568 + b _0226B66A +_0226B568: + b _0226B74C +_0226B56A: + mov r0, #2 + str r0, [sp] + add r1, r3, #4 + add r2, r3, #0 + add r3, #0x10 + add r2, #8 + ldrb r3, [r4, r3] + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov16_0226B31C + ldr r0, _0226B770 ; =0x000006A8 + add r1, sp, #0x20 + ldr r0, [r4, r0] + cmp r0, #0xff + beq _0226B624 + mov r0, #0x4d + lsl r0, r0, #4 + add r7, r4, r0 + mov r0, #0x14 + mul r0, r5 + str r0, [sp, #0xc] + ldr r0, [r7, r0] + add r2, sp, #0x1c + bl sub_020129A4 + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x1c] + ldr r0, [r7, r0] + ldr r1, [sp, #0x20] + sub r2, r2, #2 + bl sub_020128C4 + mov r0, #0x4d + lsl r0, r0, #4 + add r7, r4, r0 + mov r0, #0x14 + mul r0, r6 + str r0, [sp, #0x10] + ldr r0, [r7, r0] + add r1, sp, #0x20 + add r2, sp, #0x1c + bl sub_020129A4 + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x1c] + ldr r0, [r7, r0] + ldr r1, [sp, #0x20] + sub r2, r2, #2 + bl sub_020128C4 + mov r0, #0x4d + lsl r0, r0, #4 + add r6, r4, r0 + ldr r0, [sp, #8] + mov r1, #0x14 + add r7, r0, #0 + mul r7, r1 + ldr r0, [r6, r7] + add r1, sp, #0x20 + add r2, sp, #0x1c + bl sub_020129A4 + ldr r2, [sp, #0x1c] + ldr r0, [r6, r7] + ldr r1, [sp, #0x20] + sub r2, r2, #2 + bl sub_020128C4 + ldr r0, [sp, #4] + cmp r0, #0 + beq _0226B640 + lsl r5, r5, #2 + ldr r0, _0226B778 ; =0x00000608 + add r1, r4, r5 + ldr r0, [r1, r0] + mov r1, #0 + ldr r0, [r0, #0] + sub r2, r1, #2 + bl sub_0200D5AC + ldr r0, _0226B77C ; =0x00000618 + add r1, r4, r5 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B640 + mov r1, #0 + ldr r0, [r0, #0] + sub r2, r1, #2 + bl sub_0200D5AC + b _0226B640 +_0226B624: + mov r0, #0x52 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r2, sp, #0x1c + bl sub_020129A4 + mov r0, #0x52 + lsl r0, r0, #4 + ldr r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r1, [sp, #0x20] + sub r2, r2, #2 + bl sub_020128C4 +_0226B640: + ldr r0, _0226B774 ; =0x0000069C + add sp, #0x24 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + pop {r4, r5, r6, r7, pc} +_0226B64C: + add r0, r3, #2 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + bgt _0226B65E + b _0226B76C +_0226B65E: + mov r1, #0 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r3] + add r0, r0, #1 + strh r0, [r4, r3] +_0226B66A: + mov r0, #1 + mov r3, #0x6a + str r0, [sp] + lsl r3, r3, #4 + add r2, r3, #4 + ldr r1, [r4, r3] + add r3, #0xc + ldrb r3, [r4, r3] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov16_0226B31C + ldr r0, _0226B770 ; =0x000006A8 + add r1, sp, #0x20 + ldr r0, [r4, r0] + cmp r0, #0xff + beq _0226B724 + mov r0, #0x4d + lsl r0, r0, #4 + add r7, r4, r0 + mov r0, #0x14 + mul r0, r5 + str r0, [sp, #0x14] + ldr r0, [r7, r0] + add r2, sp, #0x1c + bl sub_020129A4 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x1c] + ldr r0, [r7, r0] + ldr r1, [sp, #0x20] + add r2, r2, #1 + bl sub_020128C4 + mov r0, #0x4d + lsl r0, r0, #4 + add r7, r4, r0 + mov r0, #0x14 + mul r0, r6 + str r0, [sp, #0x18] + ldr r0, [r7, r0] + add r1, sp, #0x20 + add r2, sp, #0x1c + bl sub_020129A4 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r0, [r7, r0] + ldr r1, [sp, #0x20] + add r2, r2, #1 + bl sub_020128C4 + mov r0, #0x4d + lsl r0, r0, #4 + add r6, r4, r0 + ldr r0, [sp, #8] + mov r1, #0x14 + add r7, r0, #0 + mul r7, r1 + ldr r0, [r6, r7] + add r1, sp, #0x20 + add r2, sp, #0x1c + bl sub_020129A4 + ldr r2, [sp, #0x1c] + ldr r0, [r6, r7] + ldr r1, [sp, #0x20] + add r2, r2, #1 + bl sub_020128C4 + ldr r0, [sp, #4] + cmp r0, #0 + beq _0226B740 + lsl r5, r5, #2 + ldr r0, _0226B778 ; =0x00000608 + add r1, r4, r5 + ldr r0, [r1, r0] + mov r1, #0 + ldr r0, [r0, #0] + mov r2, #1 + bl sub_0200D5AC + ldr r0, _0226B77C ; =0x00000618 + add r1, r4, r5 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B740 + ldr r0, [r0, #0] + mov r1, #0 + mov r2, #1 + bl sub_0200D5AC + b _0226B740 +_0226B724: + mov r0, #0x52 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r2, sp, #0x1c + bl sub_020129A4 + mov r0, #0x52 + lsl r0, r0, #4 + ldr r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r1, [sp, #0x20] + add r2, r2, #1 + bl sub_020128C4 +_0226B740: + ldr r0, _0226B774 ; =0x0000069C + add sp, #0x24 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + pop {r4, r5, r6, r7, pc} +_0226B74C: + add r0, r3, #2 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226B76C + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov16_0226B1C4 + add r0, r4, #0 + bl ov16_0226B2F0 +_0226B76C: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226B770: .word 0x000006A8 +_0226B774: .word 0x0000069C +_0226B778: .word 0x00000608 +_0226B77C: .word 0x00000618 + thumb_func_end ov16_0226B4E0 + + thumb_func_start ov16_0226B780 +ov16_0226B780: ; 0x0226B780 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r0, [r4, #0] + bl ov16_0223DF00 + ldr r1, _0226B910 ; =0x0000069C + ldrsh r0, [r4, r1] + cmp r0, #3 + bls _0226B796 + b _0226B8FA +_0226B796: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226B7A2: ; jump table + .short _0226B7AA - _0226B7A2 - 2 ; case 0 + .short _0226B834 - _0226B7A2 - 2 ; case 1 + .short _0226B850 - _0226B7A2 - 2 ; case 2 + .short _0226B8DA - _0226B7A2 - 2 ; case 3 +_0226B7AA: + add r1, #0x20 + ldr r1, [r4, r1] + add r0, r4, #0 + add r2, sp, #4 + mov r3, #1 + bl ov16_0226B264 + mov r5, #0 + mov r7, #2 + add r6, sp, #4 + b _0226B824 +_0226B7C0: + ldrb r0, [r6, r5] + cmp r0, #1 + bne _0226B822 + mov r1, #6 + add r2, r5, #0 + mul r2, r1 + ldr r1, _0226B914 ; =0x022703D4 + lsl r3, r5, #2 + add r1, r1, r2 + ldr r2, _0226B918 ; =0x0227033C + add r0, r4, #0 + add r2, r2, r3 + mov r3, #4 + str r7, [sp] + bl ov16_0226B31C + mov r0, #0x14 + mul r0, r5 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B80E + add r1, sp, #0xc + add r2, sp, #8 + bl sub_020129A4 + mov r0, #0x14 + mul r0, r5 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r2, [sp, #8] + ldr r0, [r1, r0] + ldr r1, [sp, #0xc] + sub r2, r2, #2 + bl sub_020128C4 +_0226B80E: + lsl r0, r5, #2 + add r1, r4, r0 + ldr r0, _0226B91C ; =0x00000628 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B822 + mov r1, #0 + sub r2, r1, #2 + bl sub_0200D5DC +_0226B822: + add r5, r5, #1 +_0226B824: + cmp r5, #4 + blt _0226B7C0 + ldr r0, _0226B910 ; =0x0000069C + add sp, #0x10 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_0226B834: + add r0, r1, #2 + ldrsh r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226B90A + mov r2, #0 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r1] + add r0, r0, #1 + strh r0, [r4, r1] +_0226B850: + ldr r1, _0226B920 ; =0x000006BC + add r0, r4, #0 + ldr r1, [r4, r1] + add r2, sp, #4 + mov r3, #1 + bl ov16_0226B264 + mov r5, #0 + mov r7, #1 + add r6, sp, #4 + b _0226B8CA +_0226B866: + ldrb r0, [r6, r5] + cmp r0, #1 + bne _0226B8C8 + mov r1, #6 + add r2, r5, #0 + mul r2, r1 + ldr r1, _0226B914 ; =0x022703D4 + lsl r3, r5, #2 + add r1, r1, r2 + ldr r2, _0226B918 ; =0x0227033C + add r0, r4, #0 + add r2, r2, r3 + mov r3, #4 + str r7, [sp] + bl ov16_0226B31C + mov r0, #0x14 + mul r0, r5 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B8B4 + add r1, sp, #0xc + add r2, sp, #8 + bl sub_020129A4 + mov r0, #0x14 + mul r0, r5 + add r1, r4, r0 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r2, [sp, #8] + ldr r0, [r1, r0] + ldr r1, [sp, #0xc] + add r2, r2, #1 + bl sub_020128C4 +_0226B8B4: + lsl r0, r5, #2 + add r1, r4, r0 + ldr r0, _0226B91C ; =0x00000628 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226B8C8 + mov r1, #0 + mov r2, #1 + bl sub_0200D5DC +_0226B8C8: + add r5, r5, #1 +_0226B8CA: + cmp r5, #4 + blt _0226B866 + ldr r0, _0226B910 ; =0x0000069C + add sp, #0x10 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_0226B8DA: + add r0, r1, #2 + ldrsh r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226B90A + mov r2, #0 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r1] + add sp, #0x10 + add r0, r0, #1 + strh r0, [r4, r1] + pop {r3, r4, r5, r6, r7, pc} +_0226B8FA: + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov16_0226B1C4 + add r0, r4, #0 + bl ov16_0226B2F0 +_0226B90A: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226B910: .word 0x0000069C +_0226B914: .word 0x022703D4 +_0226B918: .word 0x0227033C +_0226B91C: .word 0x00000628 +_0226B920: .word 0x000006BC + thumb_func_end ov16_0226B780 + + thumb_func_start ov16_0226B924 +ov16_0226B924: ; 0x0226B924 + cmp r0, #0 + bne _0226B92C + ldr r0, _0226B97C ; =0x00070800 + bx lr +_0226B92C: + cmp r1, r0 + bne _0226B934 + ldr r0, _0226B980 ; =0x00010200 + bx lr +_0226B934: + cmp r1, #2 + bgt _0226B940 + cmp r0, #1 + bne _0226B978 + ldr r0, _0226B984 ; =0x00050600 + bx lr +_0226B940: + cmp r1, #7 + bgt _0226B958 + cmp r0, #1 + beq _0226B94E + cmp r0, #2 + beq _0226B952 + b _0226B978 +_0226B94E: + ldr r0, _0226B984 ; =0x00050600 + bx lr +_0226B952: + mov r0, #0xc1 + lsl r0, r0, #0xa + bx lr +_0226B958: + asr r2, r1, #1 + lsr r2, r2, #0x1e + add r2, r1, r2 + asr r2, r2, #2 + cmp r0, r2 + bgt _0226B968 + ldr r0, _0226B984 ; =0x00050600 + bx lr +_0226B968: + lsr r2, r1, #0x1f + add r2, r1, r2 + asr r1, r2, #1 + cmp r0, r1 + bgt _0226B978 + mov r0, #0xc1 + lsl r0, r0, #0xa + bx lr +_0226B978: + ldr r0, _0226B980 ; =0x00010200 + bx lr + ; .align 2, 0 +_0226B97C: .word 0x00070800 +_0226B980: .word 0x00010200 +_0226B984: .word 0x00050600 + thumb_func_end ov16_0226B924 + + thumb_func_start ov16_0226B988 +ov16_0226B988: ; 0x0226B988 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl ov16_0223DF00 + add r4, r0, #0 + ldrb r0, [r5, #0x13] + cmp r0, #0 + beq _0226B9A4 + cmp r0, #1 + beq _0226B9FA + b _0226BA26 +_0226B9A4: + mov r2, #8 + ldrsh r1, [r5, r2] + ldr r0, _0226BA78 ; =0x000018E7 + add r1, r1, r0 + strh r1, [r5, #8] + mov r1, #0xa + ldrsh r3, [r5, r1] + mov r1, #0xfa + lsl r1, r1, #2 + sub r1, r3, r1 + strh r1, [r5, #0xa] + ldrsh r1, [r5, r2] + lsl r0, r0, #2 + sub r0, r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + strh r0, [r5, #0xc] + mov r0, #0xa + ldrsh r0, [r5, r0] + mov r1, #0x64 + neg r0, r0 + bl sub_020E1F6C + strh r0, [r5, #0xe] + mov r0, #8 + ldrsh r0, [r5, r0] + cmp r0, #0 + bge _0226B9E6 + mov r0, #0xa + ldrsh r0, [r5, r0] + cmp r0, #0 + bgt _0226BA76 +_0226B9E6: + mov r1, #0 + strh r1, [r5, #8] + mov r0, #0x90 + strh r0, [r5, #0xa] + strh r1, [r5, #0xc] + strh r1, [r5, #0xe] + ldrb r0, [r5, #0x13] + add r0, r0, #1 + strb r0, [r5, #0x13] + pop {r4, r5, r6, pc} +_0226B9FA: + ldr r1, [r5, #0] + ldr r0, _0226BA7C ; =0x0000068E + mov r2, #0 + strb r2, [r1, r0] + ldr r0, [r5, #4] + bl sub_0200DA58 + bl sub_020177A4 + ldr r2, _0226BA80 ; =0x04001000 + ldr r0, _0226BA84 ; =0xFFFF1FFF + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + ldr r0, [r5, #0] + mov r1, #1 + bl ov16_0226BCCC + ldrb r0, [r5, #0x13] + add r0, r0, #1 + strb r0, [r5, #0x13] + pop {r4, r5, r6, pc} +_0226BA26: + ldr r0, [r5, #0] + bl ov16_0226BCD0 + cmp r0, #0 + beq _0226BA76 + mov r2, #0 + add r0, r4, #0 + mov r1, #4 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #4 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r2, #0 + add r0, r4, #0 + mov r1, #5 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #5 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl ov16_0223F288 + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0226BA76: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0226BA78: .word 0x000018E7 +_0226BA7C: .word 0x0000068E +_0226BA80: .word 0x04001000 +_0226BA84: .word 0xFFFF1FFF + thumb_func_end ov16_0226B988 + + thumb_func_start ov16_0226BA88 +ov16_0226BA88: ; 0x0226BA88 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl ov16_0223DF00 + add r6, r0, #0 + ldrb r0, [r5, #0x12] + cmp r0, #4 + bne _0226BAD6 + mov r0, #0xc + ldrsh r1, [r5, r0] + mov r0, #0xff + sub r3, r0, r1 + cmp r3, #0 + ble _0226BAAA + mov r3, #0 +_0226BAAA: + add r0, r6, #0 + mov r1, #4 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r4, [r5, r3] + mov r3, #0xff + add r0, r6, #0 + mov r1, #5 + mov r2, #0 + sub r3, r3, r4 + bl sub_02019184 + mov r0, #8 + ldrsh r0, [r5, r0] + mov r1, #0x64 + neg r0, r0 + bl sub_020E1F6C + add r4, r0, #0 + b _0226BB06 +_0226BAD6: + mov r0, #0xc + ldrsh r3, [r5, r0] + cmp r3, #0 + bge _0226BAE0 + mov r3, #0 +_0226BAE0: + add r0, r6, #0 + mov r1, #4 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r3, [r5, r3] + add r0, r6, #0 + mov r1, #5 + mov r2, #0 + bl sub_02019184 + mov r0, #8 + ldrsh r0, [r5, r0] + mov r1, #0x64 + bl sub_020E1F6C + add r4, r0, #0 + add r4, #0xff +_0226BB06: + add r0, r6, #0 + mov r1, #4 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r6, #0 + mov r1, #5 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r0, #0xa + ldrsh r0, [r5, r0] + mov r1, #0x64 + bl sub_020E1F6C + add r0, #0x90 + cmp r4, #0 + bge _0226BB32 + mov r4, #0 + b _0226BB38 +_0226BB32: + cmp r4, #0xff + ble _0226BB38 + mov r4, #0xff +_0226BB38: + cmp r0, #0xc0 + ble _0226BB40 + mov r0, #0xc0 + b _0226BB46 +_0226BB40: + cmp r0, #0 + bge _0226BB46 + mov r0, #0 +_0226BB46: + ldrb r1, [r5, #0x12] + cmp r1, #4 + bne _0226BB5A + lsl r1, r4, #0x18 + ldr r2, _0226BB8C ; =0x04001040 + lsr r1, r1, #0x18 + strh r1, [r2] + mov r1, #0x90 + strh r1, [r2, #4] + b _0226BB70 +_0226BB5A: + cmp r4, #0 + bne _0226BB60 + mov r4, #1 +_0226BB60: + mov r1, #0xff + lsl r2, r4, #8 + lsl r1, r1, #8 + and r1, r2 + ldr r2, _0226BB8C ; =0x04001040 + strh r1, [r2] + mov r1, #0x90 + strh r1, [r2, #4] +_0226BB70: + ldr r2, _0226BB90 ; =0x04001042 + mov r1, #0xff + lsl r0, r0, #0x18 + strh r1, [r2] + lsr r1, r0, #0x18 + mov r0, #9 + lsl r0, r0, #0xc + orr r0, r1 + strh r0, [r2, #4] + mov r0, #0xe + ldrsh r0, [r5, r0] + strh r0, [r5, #0x10] + pop {r4, r5, r6, pc} + nop +_0226BB8C: .word 0x04001040 +_0226BB90: .word 0x04001042 + thumb_func_end ov16_0226BA88 + + thumb_func_start ov16_0226BB94 +ov16_0226BB94: ; 0x0226BB94 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, _0226BC4C ; =0x04000006 + ldrh r0, [r0] + cmp r0, #0x90 + bne _0226BBDE + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl ov16_0223DF00 + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl sub_02019184 + mov r3, #0x10 + ldrsh r3, [r4, r3] + add r0, r5, #0 + mov r1, #4 + mov r2, #3 + bl sub_02019184 + mov r2, #0 + add r0, r5, #0 + mov r1, #5 + add r3, r2, #0 + bl sub_02019184 + mov r3, #0x10 + ldrsh r3, [r4, r3] + add r0, r5, #0 + mov r1, #5 + mov r2, #3 + bl sub_02019184 + pop {r4, r5, r6, pc} +_0226BBDE: + cmp r0, #0xc0 + ble _0226BC48 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl ov16_0223DF00 + ldrb r1, [r4, #0x12] + add r5, r0, #0 + cmp r1, #4 + bne _0226BC16 + mov r3, #0xc + ldrsh r6, [r4, r3] + mov r3, #0xff + mov r1, #4 + mov r2, #0 + sub r3, r3, r6 + bl sub_02019184 + mov r3, #0xc + ldrsh r4, [r4, r3] + mov r3, #0xff + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + sub r3, r3, r4 + bl sub_02019184 + b _0226BC30 +_0226BC16: + mov r3, #0xc + ldrsh r3, [r4, r3] + mov r1, #4 + mov r2, #0 + bl sub_02019184 + mov r3, #0xc + ldrsh r3, [r4, r3] + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02019184 +_0226BC30: + add r0, r5, #0 + mov r1, #4 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r5, #0 + mov r1, #5 + mov r2, #3 + mov r3, #0 + bl sub_02019184 +_0226BC48: + pop {r4, r5, r6, pc} + nop +_0226BC4C: .word 0x04000006 + thumb_func_end ov16_0226BB94 + + thumb_func_start ov16_0226BC50 +ov16_0226BC50: ; 0x0226BC50 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + ldr r0, _0226BCB0 ; =0x0000068B + ldr r2, _0226BCB4 ; =0x02270670 + ldrsb r1, [r1, r0] + mov r0, #0x30 + ldr r7, _0226BCB8 ; =0x0000FFFF + mul r0, r1 + add r6, r2, r0 + mov r4, #0 + add r5, r6, #0 +_0226BC66: + ldrh r0, [r5, #4] + cmp r0, r7 + bne _0226BC7A + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r1, #0 + bl sub_02019120 + b _0226BC86 +_0226BC7A: + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r1, #1 + bl sub_02019120 +_0226BC86: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _0226BC66 + mov r4, #0 +_0226BC90: + ldrh r1, [r6, #0xc] + add r0, r4, #4 + lsl r0, r0, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + add r4, r4, #1 + add r6, r6, #2 + cmp r4, #4 + blt _0226BC90 + ldr r0, [sp] + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BCB0: .word 0x0000068B +_0226BCB4: .word 0x02270670 +_0226BCB8: .word 0x0000FFFF + thumb_func_end ov16_0226BC50 + + thumb_func_start ov16_0226BCBC +ov16_0226BCBC: ; 0x0226BCBC + push {r4, lr} + add r4, r0, #0 + bl ov16_0226B198 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov16_0226BCBC + + thumb_func_start ov16_0226BCCC +ov16_0226BCCC: ; 0x0226BCCC + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226BCCC + + thumb_func_start ov16_0226BCD0 +ov16_0226BCD0: ; 0x0226BCD0 + ldr r1, _0226BCE0 ; =0x00000684 + ldr r0, [r0, r1] + cmp r0, #0 + bne _0226BCDC + mov r0, #1 + bx lr +_0226BCDC: + mov r0, #0 + bx lr + ; .align 2, 0 +_0226BCE0: .word 0x00000684 + thumb_func_end ov16_0226BCD0 + + thumb_func_start ov16_0226BCE4 +ov16_0226BCE4: ; 0x0226BCE4 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + ldr r0, [r5, #0] + bl ov16_0223E064 + add r4, r0, #0 + bl sub_0200384C + cmp r0, #0 + bne _0226BD64 + ldr r0, _0226BD68 ; =0x00000696 + mov r1, #1 + ldrsh r0, [r5, r0] + add r2, r1, #0 + add r3, r1, #0 + asr r0, r0, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, _0226BD6C ; =0x00007E37 + str r0, [sp, #4] + add r0, r4, #0 + bl sub_020039B0 + ldr r1, _0226BD70 ; =0x00000694 + ldrb r0, [r5, r1] + cmp r0, #0 + bne _0226BD2A + add r0, r1, #2 + ldrsh r2, [r5, r0] + mov r0, #2 + lsl r0, r0, #8 + add r2, r2, r0 + b _0226BD34 +_0226BD2A: + add r0, r1, #2 + ldrsh r2, [r5, r0] + mov r0, #2 + lsl r0, r0, #8 + sub r2, r2, r0 +_0226BD34: + add r0, r1, #2 + strh r2, [r5, r0] + ldr r0, _0226BD68 ; =0x00000696 + mov r1, #0x11 + ldrsh r2, [r5, r0] + lsl r1, r1, #8 + cmp r2, r1 + blt _0226BD54 + mov r1, #0xf + lsl r1, r1, #8 + strh r1, [r5, r0] + mov r1, #1 + sub r0, r0, #2 + add sp, #8 + strb r1, [r5, r0] + pop {r3, r4, r5, pc} +_0226BD54: + cmp r2, #0 + bgt _0226BD64 + mov r1, #1 + lsl r1, r1, #8 + strh r1, [r5, r0] + mov r1, #0 + sub r0, r0, #2 + strb r1, [r5, r0] +_0226BD64: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0226BD68: .word 0x00000696 +_0226BD6C: .word 0x00007E37 +_0226BD70: .word 0x00000694 + thumb_func_end ov16_0226BCE4 + + thumb_func_start ov16_0226BD74 +ov16_0226BD74: ; 0x0226BD74 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + bl sub_02002B3C + add r6, r0, #0 + bl sub_02002B5C + add r7, r0, #0 + bl sub_02002B4C + bl sub_02002B6C + ldr r0, [r5, #0] + bl ov16_0223E064 + add r4, r0, #0 + bl sub_0200384C + cmp r0, #0 + bne _0226BE40 + add r0, r4, #0 + mov r1, #1 + bl sub_0200316C + add r4, r0, #0 + ldr r0, _0226BE44 ; =0x021BF6BC + ldrh r0, [r0, #0x22] + cmp r0, #0 + beq _0226BDFC + cmp r6, #1 + beq _0226BDB6 + cmp r7, #1 + bne _0226BDFC +_0226BDB6: + ldr r1, [r5, #0x60] + add r0, r4, #0 + add r0, #0x10 + add r1, #0x10 + mov r2, #0x10 + bl sub_020D5190 + cmp r0, #0 + bne _0226BE40 + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #0x80 + tst r0, r1 + ldr r0, [r5, #0x64] + beq _0226BDEE + add r1, r4, #0 + mov r2, #0x20 + bl sub_020C4B18 + ldr r0, [r5, #0x64] + add r4, #0xe0 + add r0, #0x20 + add r1, r4, #0 + mov r2, #0x20 + bl sub_020C4B18 + pop {r3, r4, r5, r6, r7, pc} +_0226BDEE: + add r4, #0x10 + add r0, #0x10 + add r1, r4, #0 + mov r2, #0x10 + bl sub_020C4B18 + pop {r3, r4, r5, r6, r7, pc} +_0226BDFC: + ldr r1, [r5, #0x64] + add r0, r4, #0 + add r0, #0x10 + add r1, #0x10 + mov r2, #0x10 + bl sub_020D5190 + cmp r0, #0 + bne _0226BE40 + ldr r0, [r5, #0] + bl ov16_0223DF0C + mov r1, #0x80 + tst r0, r1 + ldr r0, [r5, #0x60] + beq _0226BE34 + add r1, r4, #0 + mov r2, #0x20 + bl sub_020C4B18 + ldr r0, [r5, #0x60] + add r4, #0xe0 + add r0, #0x20 + add r1, r4, #0 + mov r2, #0x20 + bl sub_020C4B18 + pop {r3, r4, r5, r6, r7, pc} +_0226BE34: + add r4, #0x10 + add r0, #0x10 + add r1, r4, #0 + mov r2, #0x10 + bl sub_020C4B18 +_0226BE40: + pop {r3, r4, r5, r6, r7, pc} + nop +_0226BE44: .word 0x021BF6BC + thumb_func_end ov16_0226BD74 + + thumb_func_start ov16_0226BE48 +ov16_0226BE48: ; 0x0226BE48 + push {r4, r5, r6, lr} + ldr r6, _0226BEAC ; =0x000006DC + add r5, r0, #0 + add r2, r6, #0 + sub r2, #0x51 + ldrsb r2, [r5, r2] + ldr r1, _0226BEB0 ; =0x02270670 + mov r3, #0x30 + add r4, r2, #0 + mul r4, r3 + add r4, r1, r4 + ldr r2, [r4, #0x20] + cmp r2, #0 + bne _0226BE6A + sub r3, #0x31 + add r0, r3, #0 + pop {r4, r5, r6, pc} +_0226BE6A: + ldrb r1, [r5, r6] + cmp r1, #0 + bne _0226BEA4 + add r0, r6, #4 + ldrb r0, [r5, r0] + cmp r0, #1 + beq _0226BE82 + ldr r1, _0226BEB4 ; =0x021BF67C + ldr r2, [r1, #0x48] + ldr r1, _0226BEB8 ; =0x00000CF3 + tst r1, r2 + beq _0226BE9E +_0226BE82: + cmp r0, #0 + bne _0226BE8C + ldr r0, _0226BEBC ; =0x000005DC + bl sub_02005748 +_0226BE8C: + mov r1, #1 + mov r0, #0x6e + strb r1, [r5, r6] + mov r2, #0 + lsl r0, r0, #4 + strb r2, [r5, r0] + ldr r2, [r4, #0x20] + add r0, r5, #0 + blx r2 +_0226BE9E: + mov r0, #0 + mvn r0, r0 + pop {r4, r5, r6, pc} +_0226BEA4: + mov r1, #0 + blx r2 + pop {r4, r5, r6, pc} + nop +_0226BEAC: .word 0x000006DC +_0226BEB0: .word 0x02270670 +_0226BEB4: .word 0x021BF67C +_0226BEB8: .word 0x00000CF3 +_0226BEBC: .word 0x000005DC + thumb_func_end ov16_0226BE48 + + thumb_func_start ov16_0226BEC0 +ov16_0226BEC0: ; 0x0226BEC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp, #8] + ldr r1, _0226C080 ; =0x000006DC + add r6, r0, #0 + add r2, r1, #0 + sub r2, #0x51 + ldrsb r3, [r6, r2] + add r4, r6, r1 + mov r2, #0x30 + sub r1, #0x52 + ldr r0, _0226C084 ; =0x02270670 + mul r2, r3 + add r7, r0, r2 + ldrb r1, [r6, r1] + ldr r0, [r6, #0] + bl ov16_0223E1C4 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov16_0223DF14 + bl ov16_02263B0C + ldr r1, [sp, #8] + cmp r1, #1 + bne _0226BF44 + mov r1, #0 + ldrsb r1, [r0, r1] + ldr r2, _0226C088 ; =0x022701EC + strb r1, [r4, #2] + mov r1, #1 + ldrsb r0, [r0, r1] + strb r0, [r4, #1] + ldrsb r1, [r4, r1] + lsl r0, r1, #1 + add r3, r1, r0 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r7, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r7, #0x14] + ldr r0, _0226C08C ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0226BF44: + ldr r0, _0226C090 ; =0x0000068B + ldrsb r0, [r6, r0] + cmp r0, #5 + beq _0226BF50 + cmp r0, #6 + bne _0226BF60 +_0226BF50: + mov r1, #1 + ldr r3, _0226C088 ; =0x022701EC + add r0, r4, #0 + add r2, r1, #0 + bl ov16_0226CB10 + add r5, r0, #0 + b _0226BFCA +_0226BF60: + mov r0, #1 + ldrsb r1, [r4, r0] + lsl r0, r1, #1 + add r2, r1, r0 + mov r0, #2 + ldr r1, _0226C088 ; =0x022701EC + ldrsb r0, [r4, r0] + add r1, r1, r2 + ldrb r0, [r0, r1] + str r0, [sp, #0xc] + cmp r0, #3 + bne _0226BF82 + ldr r0, _0226C094 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x40 + tst r0, r1 + bne _0226BFCA +_0226BF82: + ldr r3, _0226C088 ; =0x022701EC + add r0, r4, #0 + mov r1, #3 + mov r2, #2 + bl ov16_0226CB10 + add r5, r0, #0 + bne _0226BFCA + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _0226BFCA + ldr r0, _0226C094 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x20 + tst r0, r1 + beq _0226BFB4 + mov r0, #0 + strb r0, [r4, #2] + mov r0, #1 + strb r0, [r4, #1] + ldr r0, _0226C098 ; =0x000005DC + bl sub_02005748 + mov r5, #0x20 + b _0226BFCA +_0226BFB4: + mov r0, #0x10 + tst r0, r1 + beq _0226BFCA + mov r0, #2 + strb r0, [r4, #2] + mov r0, #1 + strb r0, [r4, #1] + ldr r0, _0226C098 ; =0x000005DC + bl sub_02005748 + mov r5, #0x10 +_0226BFCA: + cmp r5, #0x20 + bhi _0226BFE6 + bhs _0226BFF2 + cmp r5, #2 + bhi _0226BFE0 + cmp r5, #1 + blo _0226C076 + beq _0226C030 + cmp r5, #2 + beq _0226C046 + b _0226C076 +_0226BFE0: + cmp r5, #0x10 + beq _0226BFF2 + b _0226C076 +_0226BFE6: + cmp r5, #0x40 + bhi _0226BFEE + beq _0226BFF2 + b _0226C076 +_0226BFEE: + cmp r5, #0x80 + bne _0226C076 +_0226BFF2: + mov r0, #1 + ldrsb r1, [r4, r0] + ldr r2, _0226C088 ; =0x022701EC + lsl r0, r1, #1 + add r3, r1, r0 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r7, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r7, #0x14] + ldr r0, _0226C08C ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + b _0226C076 +_0226C030: + mov r0, #1 + ldrsb r1, [r4, r0] + ldr r2, _0226C088 ; =0x022701EC + add sp, #0x10 + lsl r0, r1, #1 + add r3, r1, r0 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r0, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_0226C046: + ldr r0, _0226C09C ; =0x0000068F + ldrb r0, [r6, r0] + cmp r0, #1 + bne _0226C076 + mov r0, #0 + add r2, r0, #0 + mov r3, #1 + ldr r1, [r7, #0x18] + ldr r5, [r7, #0x14] + b _0226C064 +_0226C05A: + lsl r4, r0, #2 + ldr r4, [r1, r4] + cmp r4, #4 + beq _0226C07A + add r0, r0, #1 +_0226C064: + lsl r4, r0, #2 + ldrb r4, [r5, r4] + cmp r0, r4 + bge _0226C070 + add r4, r3, #0 + b _0226C072 +_0226C070: + add r4, r2, #0 +_0226C072: + cmp r4, #0xff + bne _0226C05A +_0226C076: + mov r0, #0 + mvn r0, r0 +_0226C07A: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226C080: .word 0x000006DC +_0226C084: .word 0x02270670 +_0226C088: .word 0x022701EC +_0226C08C: .word 0x000006D8 +_0226C090: .word 0x0000068B +_0226C094: .word 0x021BF67C +_0226C098: .word 0x000005DC +_0226C09C: .word 0x0000068F + thumb_func_end ov16_0226BEC0 + + thumb_func_start ov16_0226C0A0 +ov16_0226C0A0: ; 0x0226C0A0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, _0226C0F4 ; =0x0000068A + ldr r0, [r5, #0] + ldrb r1, [r5, r1] + bl ov16_0223E1C4 + add r1, r0, #0 + cmp r4, #3 + bne _0226C0BE + ldr r0, _0226C0F8 ; =0x000006E1 + ldrb r0, [r5, r0] + cmp r0, #0 + bne _0226C0F2 +_0226C0BE: + ldr r0, [r5, #0] + bl ov16_0223DF14 + bl ov16_02263B0C + mov r5, #0 + ldr r1, _0226C0FC ; =0x022701EC + add r2, r5, #0 + b _0226C0EE +_0226C0D0: + lsl r6, r5, #1 + add r6, r5, r6 + add r3, r2, #0 + add r7, r1, r6 + b _0226C0E8 +_0226C0DA: + ldrb r6, [r3, r7] + cmp r4, r6 + bne _0226C0E6 + strb r3, [r0] + strb r5, [r0, #1] + pop {r3, r4, r5, r6, r7, pc} +_0226C0E6: + add r3, r3, #1 +_0226C0E8: + cmp r3, #3 + blt _0226C0DA + add r5, r5, #1 +_0226C0EE: + cmp r5, #2 + blt _0226C0D0 +_0226C0F2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C0F4: .word 0x0000068A +_0226C0F8: .word 0x000006E1 +_0226C0FC: .word 0x022701EC + thumb_func_end ov16_0226C0A0 + + thumb_func_start ov16_0226C100 +ov16_0226C100: ; 0x0226C100 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + ldr r0, _0226C1E8 ; =0x000006DC + ldr r2, _0226C1EC ; =0x02270670 + add r3, r0, #0 + sub r3, #0x51 + ldrsb r5, [r6, r3] + mov r3, #0x30 + add r4, r6, r0 + mul r3, r5 + add r5, r2, r3 + cmp r1, #1 + bne _0226C162 + mov r1, #0 + strb r1, [r4, #2] + strb r1, [r4, #1] + mov r1, #1 + ldrsb r2, [r4, r1] + mov r3, #2 + ldr r1, _0226C1F0 ; =0x022701CC + ldrsb r3, [r4, r3] + add r1, r1, r2 + sub r0, r0, #4 + ldrb r2, [r3, r1] + ldr r1, [r5, #0x14] + lsl r3, r2, #2 + add r1, r1, r3 + ldrb r1, [r1, #1] + sub r1, #8 + str r1, [sp] + mov r1, #0x11 + lsl r1, r1, #0x10 + str r1, [sp, #4] + ldr r4, [r5, #0x14] + ldr r0, [r6, r0] + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + mov r0, #0 + add sp, #8 + mvn r0, r0 + pop {r4, r5, r6, pc} +_0226C162: + ldr r3, _0226C1F0 ; =0x022701CC + add r0, r4, #0 + mov r1, #1 + mov r2, #2 + bl ov16_0226CB10 + cmp r0, #0x20 + bhi _0226C188 + bhs _0226C194 + cmp r0, #2 + bhi _0226C182 + cmp r0, #1 + blo _0226C1E0 + beq _0226C1CE + cmp r0, #2 + b _0226C1E0 +_0226C182: + cmp r0, #0x10 + beq _0226C194 + b _0226C1E0 +_0226C188: + cmp r0, #0x40 + bhi _0226C190 + beq _0226C194 + b _0226C1E0 +_0226C190: + cmp r0, #0x80 + bne _0226C1E0 +_0226C194: + mov r0, #1 + ldrsb r3, [r4, r0] + mov r0, #2 + ldr r2, _0226C1F0 ; =0x022701CC + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r5, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r5, #0x14] + ldr r0, _0226C1F4 ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + b _0226C1E0 +_0226C1CE: + mov r0, #1 + ldrsb r3, [r4, r0] + mov r0, #2 + ldr r2, _0226C1F0 ; =0x022701CC + ldrsb r1, [r4, r0] + add r0, r2, r3 + add sp, #8 + ldrb r0, [r1, r0] + pop {r4, r5, r6, pc} +_0226C1E0: + mov r0, #0 + mvn r0, r0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0226C1E8: .word 0x000006DC +_0226C1EC: .word 0x02270670 +_0226C1F0: .word 0x022701CC +_0226C1F4: .word 0x000006D8 + thumb_func_end ov16_0226C100 + + thumb_func_start ov16_0226C1F8 +ov16_0226C1F8: ; 0x0226C1F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + add r5, r0, #0 + ldr r1, _0226C364 ; =0x0000068A + ldr r0, [r5, #0] + ldrb r1, [r5, r1] + bl ov16_0223E1C4 + add r1, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223DF14 + bl ov16_02263B0C + ldr r1, _0226C368 ; =0x000006DC + add r3, r0, #0 + add r4, r5, r1 + sub r1, #0x51 + ldrsb r2, [r5, r1] + mov r1, #0x30 + ldr r0, _0226C36C ; =0x02270670 + mul r1, r2 + add r2, r5, #0 + add r6, r0, r1 + add r2, #0x1c + cmp r7, #1 + bne _0226C2A6 + mov r0, #2 + ldrsb r0, [r3, r0] + strb r0, [r4, #2] + mov r0, #3 + ldrsb r0, [r3, r0] + strb r0, [r4, #1] + mov r0, #1 + ldrsb r0, [r4, r0] + lsl r1, r0, #1 + mov r0, #2 + ldrsb r7, [r4, r0] + ldr r0, _0226C370 ; =0x022701E4 + add r0, r0, r1 + ldrb r0, [r7, r0] + cmp r0, #0 + beq _0226C274 + sub r1, r0, #1 + lsl r1, r1, #1 + ldrh r1, [r2, r1] + cmp r1, #0 + bne _0226C274 + mov r0, #0 + strb r0, [r3, #2] + strb r0, [r3, #3] + strb r0, [r4, #2] + strb r0, [r4, #1] + mov r0, #1 + ldrsb r0, [r4, r0] + lsl r2, r0, #1 + mov r0, #2 + ldrsb r1, [r4, r0] + ldr r0, _0226C370 ; =0x022701E4 + add r0, r0, r2 + ldrb r0, [r1, r0] +_0226C274: + ldr r1, [r6, #0x14] + lsl r3, r0, #2 + add r0, r1, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r6, #0x14] + ldr r0, _0226C374 ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r5, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0226C2A6: + ldr r0, _0226C370 ; =0x022701E4 + add r1, sp, #8 + mov r2, #6 + bl sub_020C4DB0 + add r0, r4, #0 + mov r1, #2 + mov r2, #3 + add r3, sp, #8 + bl ov16_0226CB10 + cmp r0, #0x20 + bhi _0226C2D8 + bhs _0226C2E4 + cmp r0, #2 + bhi _0226C2D2 + cmp r0, #1 + blo _0226C35C + beq _0226C320 + cmp r0, #2 + beq _0226C334 + b _0226C35C +_0226C2D2: + cmp r0, #0x10 + beq _0226C2E4 + b _0226C35C +_0226C2D8: + cmp r0, #0x40 + bhi _0226C2E0 + beq _0226C2E4 + b _0226C35C +_0226C2E0: + cmp r0, #0x80 + bne _0226C35C +_0226C2E4: + mov r0, #1 + ldrsb r0, [r4, r0] + ldr r2, _0226C370 ; =0x022701E4 + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r6, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r6, #0x14] + ldr r0, _0226C374 ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r5, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + b _0226C35C +_0226C320: + mov r0, #1 + ldrsb r0, [r4, r0] + ldr r2, _0226C370 ; =0x022701E4 + add sp, #0x10 + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r0, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_0226C334: + mov r0, #0 + add r2, r0, #0 + mov r3, #1 + ldr r1, [r6, #0x18] + ldr r5, [r6, #0x14] + b _0226C34A +_0226C340: + lsl r4, r0, #2 + ldr r4, [r1, r4] + cmp r4, #0xff + beq _0226C360 + add r0, r0, #1 +_0226C34A: + lsl r4, r0, #2 + ldrb r4, [r5, r4] + cmp r0, r4 + bge _0226C356 + add r4, r3, #0 + b _0226C358 +_0226C356: + add r4, r2, #0 +_0226C358: + cmp r4, #0xff + bne _0226C340 +_0226C35C: + mov r0, #0 + mvn r0, r0 +_0226C360: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C364: .word 0x0000068A +_0226C368: .word 0x000006DC +_0226C36C: .word 0x02270670 +_0226C370: .word 0x022701E4 +_0226C374: .word 0x000006D8 + thumb_func_end ov16_0226C1F8 + + thumb_func_start ov16_0226C378 +ov16_0226C378: ; 0x0226C378 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + beq _0226C3BE + ldr r1, _0226C3C0 ; =0x0000068A + ldr r0, [r5, #0] + ldrb r1, [r5, r1] + bl ov16_0223E1C4 + add r1, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223DF14 + bl ov16_02263B0C + mov r3, #0 + ldr r7, _0226C3C4 ; =0x022701E4 + add r1, r3, #0 + b _0226C3BA +_0226C39E: + lsl r5, r3, #1 + add r2, r1, #0 + add r6, r7, r5 + b _0226C3B4 +_0226C3A6: + ldrb r5, [r2, r6] + cmp r4, r5 + bne _0226C3B2 + strb r2, [r0, #2] + strb r3, [r0, #3] + pop {r3, r4, r5, r6, r7, pc} +_0226C3B2: + add r2, r2, #1 +_0226C3B4: + cmp r2, #2 + blt _0226C3A6 + add r3, r3, #1 +_0226C3BA: + cmp r3, #3 + blt _0226C39E +_0226C3BE: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C3C0: .word 0x0000068A +_0226C3C4: .word 0x022701E4 + thumb_func_end ov16_0226C378 + + thumb_func_start ov16_0226C3C8 +ov16_0226C3C8: ; 0x0226C3C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + str r1, [sp, #0x18] + add r6, r0, #0 + ldr r1, _0226C6A8 ; =0x0000068A + mov r0, #0 + str r0, [sp, #0x44] + ldrb r1, [r6, r1] + ldr r0, [r6, #0] + bl ov16_0223E1C4 + add r1, r0, #0 + ldr r0, [r6, #0] + bl ov16_0223DF14 + bl ov16_02263B0C + ldr r1, _0226C6AC ; =0x000006DC + str r0, [sp, #0x1c] + add r7, r6, r1 + sub r1, #0x51 + ldrsb r2, [r6, r1] + mov r1, #0x30 + ldr r0, _0226C6B0 ; =0x02270670 + mul r1, r2 + add r0, r0, r1 + str r0, [sp, #0x48] + ldr r0, _0226C6B4 ; =0x022701DC + add r1, sp, #0x50 + mov r2, #6 + bl sub_020C4DB0 + add r1, sp, #0x58 + add r0, r6, #0 + add r1, #2 + mov r2, #1 + bl ov16_0226B20C + add r1, sp, #0x54 + add r0, r6, #0 + add r1, #2 + mov r2, #0 + bl ov16_0226B20C + add r0, sp, #0x54 + mov r2, #0 + mov r4, #0xff + add r0, #2 + b _0226C446 +_0226C42A: + lsl r5, r2, #1 + add r1, sp, #0x50 + mov r3, #0 + add r1, r1, r5 + b _0226C440 +_0226C434: + ldrb r5, [r3, r1] + ldrb r5, [r0, r5] + cmp r5, #0 + bne _0226C43E + strb r4, [r3, r1] +_0226C43E: + add r3, r3, #1 +_0226C440: + cmp r3, #2 + blt _0226C434 + add r2, r2, #1 +_0226C446: + cmp r2, #2 + blt _0226C42A + ldr r0, _0226C6B8 ; =0x0000068C + ldrb r0, [r6, r0] + cmp r0, #0xb + bhi _0226C476 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226C45E: ; jump table + .short _0226C476 - _0226C45E - 2 ; case 0 + .short _0226C480 - _0226C45E - 2 ; case 1 + .short _0226C480 - _0226C45E - 2 ; case 2 + .short _0226C480 - _0226C45E - 2 ; case 3 + .short _0226C476 - _0226C45E - 2 ; case 4 + .short _0226C480 - _0226C45E - 2 ; case 5 + .short _0226C476 - _0226C45E - 2 ; case 6 + .short _0226C480 - _0226C45E - 2 ; case 7 + .short _0226C476 - _0226C45E - 2 ; case 8 + .short _0226C476 - _0226C45E - 2 ; case 9 + .short _0226C476 - _0226C45E - 2 ; case 10 + .short _0226C476 - _0226C45E - 2 ; case 11 +_0226C476: + mov r0, #2 + mov ip, r0 + mov r0, #3 + str r0, [sp, #0x4c] + b _0226C65A +_0226C480: + mov r0, #1 + str r0, [sp, #0x44] + mov ip, r0 + mov r0, #2 + str r0, [sp, #0x4c] + add r0, sp, #0x50 + ldrb r1, [r0, #9] + cmp r1, #1 + bne _0226C4BA + ldrb r0, [r0, #7] + cmp r0, #1 + bne _0226C4BA + ldr r0, [sp, #0x48] + ldr r1, [r0, #0x14] + ldrb r0, [r1, #0xe] + ldrb r2, [r1, #0xd] + str r0, [sp, #0x34] + add r0, #8 + str r0, [sp, #0x34] + ldrb r0, [r1, #7] + sub r2, #8 + str r0, [sp, #0x30] + sub r0, #8 + str r0, [sp, #0x30] + ldrb r0, [r1, #0xc] + str r0, [sp, #0x38] + add r0, #8 + str r0, [sp, #0x38] + b _0226C526 +_0226C4BA: + add r0, sp, #0x50 + ldrb r1, [r0, #9] + cmp r1, #1 + bne _0226C4EA + ldrb r0, [r0, #7] + cmp r0, #0 + bne _0226C4EA + ldr r0, [sp, #0x48] + ldr r1, [r0, #0x14] + ldrb r0, [r1, #0xe] + ldrb r2, [r1, #0xd] + str r0, [sp, #0x34] + add r0, #8 + str r0, [sp, #0x34] + ldrb r0, [r1, #0xf] + sub r2, #8 + str r0, [sp, #0x30] + sub r0, #8 + str r0, [sp, #0x30] + ldrb r0, [r1, #0xc] + str r0, [sp, #0x38] + add r0, #8 + str r0, [sp, #0x38] + b _0226C526 +_0226C4EA: + add r0, sp, #0x50 + ldrb r1, [r0, #9] + cmp r1, #0 + bne _0226C51A + ldrb r0, [r0, #7] + cmp r0, #1 + bne _0226C51A + ldr r0, [sp, #0x48] + ldr r1, [r0, #0x14] + ldrb r0, [r1, #6] + ldrb r2, [r1, #5] + str r0, [sp, #0x34] + add r0, #8 + str r0, [sp, #0x34] + ldrb r0, [r1, #7] + sub r2, #8 + str r0, [sp, #0x30] + sub r0, #8 + str r0, [sp, #0x30] + ldrb r0, [r1, #4] + str r0, [sp, #0x38] + add r0, #8 + str r0, [sp, #0x38] + b _0226C526 +_0226C51A: + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x34] + str r0, [sp, #0x30] + str r0, [sp, #0x38] + add r2, r0, #0 +_0226C526: + add r0, sp, #0x50 + ldrb r1, [r0, #6] + cmp r1, #1 + bne _0226C54E + ldrb r0, [r0, #8] + cmp r0, #1 + bne _0226C54E + ldr r0, [sp, #0x48] + ldr r0, [r0, #0x14] + ldrb r3, [r0, #2] + ldrb r4, [r0, #0xb] + ldrb r5, [r0] + ldrb r0, [r0, #1] + add r3, #8 + sub r4, #8 + str r0, [sp, #0x2c] + sub r0, #8 + add r5, #8 + str r0, [sp, #0x2c] + b _0226C5A8 +_0226C54E: + add r0, sp, #0x50 + ldrb r1, [r0, #6] + cmp r1, #1 + bne _0226C576 + ldrb r0, [r0, #8] + cmp r0, #0 + bne _0226C576 + ldr r0, [sp, #0x48] + ldr r0, [r0, #0x14] + ldrb r3, [r0, #2] + ldrb r4, [r0, #3] + ldrb r5, [r0] + ldrb r0, [r0, #1] + add r3, #8 + sub r4, #8 + str r0, [sp, #0x2c] + sub r0, #8 + add r5, #8 + str r0, [sp, #0x2c] + b _0226C5A8 +_0226C576: + add r0, sp, #0x50 + ldrb r1, [r0, #6] + cmp r1, #0 + bne _0226C59E + ldrb r0, [r0, #8] + cmp r0, #1 + bne _0226C59E + ldr r0, [sp, #0x48] + ldr r0, [r0, #0x14] + ldrb r3, [r0, #0xa] + ldrb r4, [r0, #0xb] + ldrb r5, [r0, #8] + ldrb r0, [r0, #9] + add r3, #8 + sub r4, #8 + str r0, [sp, #0x2c] + sub r0, #8 + add r5, #8 + str r0, [sp, #0x2c] + b _0226C5A8 +_0226C59E: + mov r3, #0 + mvn r3, r3 + add r4, r3, #0 + add r5, r3, #0 + str r3, [sp, #0x2c] +_0226C5A8: + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x40] + str r0, [sp, #0x3c] + str r0, [sp, #0x28] + str r0, [sp, #0x24] + ldr r0, [sp, #0x34] + cmp r0, r3 + beq _0226C5DE + add r1, r0, #0 + ldr r0, [sp, #0x40] + cmp r1, r0 + beq _0226C5C6 + cmp r3, r0 + beq _0226C5DE +_0226C5C6: + mov r1, #0 + ldr r0, [sp, #0x34] + mvn r1, r1 + cmp r0, r1 + bne _0226C5D8 + cmp r3, r1 + beq _0226C5D8 + str r3, [sp, #0x34] + b _0226C5DE +_0226C5D8: + mov r0, #2 + str r3, [sp, #0x40] + str r0, [sp, #0x20] +_0226C5DE: + ldr r0, [sp, #0x30] + cmp r0, r4 + beq _0226C608 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0226C5F0 + cmp r4, r1 + beq _0226C608 +_0226C5F0: + mov r1, #0 + ldr r0, [sp, #0x30] + mvn r1, r1 + cmp r0, r1 + bne _0226C602 + cmp r4, r1 + beq _0226C602 + str r4, [sp, #0x30] + b _0226C608 +_0226C602: + mov r0, #3 + str r4, [sp, #0x40] + str r0, [sp, #0x20] +_0226C608: + mov r1, #0 + ldr r0, [sp, #0x38] + mvn r1, r1 + cmp r0, r1 + beq _0226C616 + cmp r5, r1 + beq _0226C62A +_0226C616: + mov r1, #0 + ldr r0, [sp, #0x38] + mvn r1, r1 + cmp r0, r1 + bne _0226C628 + cmp r5, r1 + beq _0226C628 + str r5, [sp, #0x38] + b _0226C62A +_0226C628: + str r2, [sp, #0x3c] +_0226C62A: + mov r1, #0 + mvn r1, r1 + cmp r2, r1 + beq _0226C63C + ldr r0, [sp, #0x2c] + cmp r0, r1 + bne _0226C63C + str r2, [sp, #0x2c] + b _0226C65A +_0226C63C: + mov r1, #0 + mvn r1, r1 + cmp r2, r1 + bne _0226C64A + ldr r0, [sp, #0x2c] + cmp r0, r1 + bne _0226C65A +_0226C64A: + ldr r0, [sp, #0x2c] + str r0, [sp, #0x3c] + ldr r0, [sp, #0x20] + cmp r0, #2 + bne _0226C658 + str r2, [sp, #0x24] + b _0226C65A +_0226C658: + str r2, [sp, #0x28] +_0226C65A: + ldr r0, [sp, #0x18] + cmp r0, #1 + beq _0226C662 + b _0226C7CE +_0226C662: + ldr r0, [sp, #0x44] + cmp r0, #0 + bne _0226C712 + ldr r0, [sp, #0x1c] + mov r1, #6 + ldrsb r1, [r0, r1] + ldr r0, _0226C6B8 ; =0x0000068C + ldrb r0, [r6, r0] + cmp r1, r0 + bne _0226C688 + ldr r0, [sp, #0x1c] + mov r1, #4 + ldrsb r0, [r0, r1] + mov r1, #5 + strb r0, [r7, #2] + ldr r0, [sp, #0x1c] + ldrsb r0, [r0, r1] + strb r0, [r7, #1] + b _0226C6D2 +_0226C688: + add r0, sp, #0x50 + ldrb r1, [r0, #0xd] + cmp r1, #1 + bne _0226C698 + mov r0, #0 + strb r0, [r7, #2] + strb r0, [r7, #1] + b _0226C6D2 +_0226C698: + ldrb r1, [r0, #0xb] + cmp r1, #1 + bne _0226C6BC + mov r0, #1 + strb r0, [r7, #2] + mov r0, #0 + strb r0, [r7, #1] + b _0226C6D2 + ; .align 2, 0 +_0226C6A8: .word 0x0000068A +_0226C6AC: .word 0x000006DC +_0226C6B0: .word 0x02270670 +_0226C6B4: .word 0x022701DC +_0226C6B8: .word 0x0000068C +_0226C6BC: + ldrb r0, [r0, #0xa] + cmp r0, #1 + bne _0226C6CC + mov r0, #0 + strb r0, [r7, #2] + mov r0, #1 + strb r0, [r7, #1] + b _0226C6D2 +_0226C6CC: + mov r0, #1 + strb r0, [r7, #2] + strb r0, [r7, #1] +_0226C6D2: + mov r0, #1 + ldrsb r0, [r7, r0] + ldr r2, _0226C9B0 ; =0x022701DC + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r7, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [sp, #0x48] + lsl r3, r1, #2 + ldr r0, [r0, #0x14] + ldr r1, [sp, #0x48] + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r1, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + b _0226C7C6 +_0226C712: + mov r2, #0 + strb r2, [r7, #2] + ldr r0, [sp, #0x24] + sub r1, r2, #1 + strb r2, [r7, #1] + cmp r0, r1 + bne _0226C726 + ldr r0, [sp, #0x28] + cmp r0, r1 + beq _0226C730 +_0226C726: + mov r1, #0 + ldr r0, [sp, #0x40] + mvn r1, r1 + cmp r0, r1 + bne _0226C74A +_0226C730: + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x34] + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r2, [sp, #0x30] + ldr r0, [r6, r0] + ldr r3, [sp, #0x38] + bl ov16_0226DD9C + b _0226C7A8 +_0226C74A: + ldr r0, [sp, #0x24] + cmp r0, r1 + beq _0226C780 + ldr r0, [sp, #0x28] + cmp r0, r1 + bne _0226C780 + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x34] + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r2, [sp, #0x38] + str r0, [sp, #4] + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x30] + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x10] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DCCC + b _0226C7A8 +_0226C780: + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x34] + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r2, [sp, #0x38] + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + ldr r3, [sp, #0x30] + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + str r0, [sp, #0x10] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DCCC +_0226C7A8: + mov r1, #0 + ldr r0, [sp, #0x40] + mvn r1, r1 + cmp r0, r1 + beq _0226C7C6 + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r1, [sp, #0x40] + ldr r0, [r6, r0] + ldr r2, [sp, #0x3c] + ldr r3, [sp, #0x20] + bl ov16_0226DDC0 +_0226C7C6: + mov r0, #0 + add sp, #0x60 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0226C7CE: + ldr r0, [sp, #0x44] + cmp r0, #0 + bne _0226C7E2 + ldr r2, [sp, #0x4c] + add r0, r7, #0 + mov r1, ip + add r3, sp, #0x50 + bl ov16_0226CB10 + b _0226C7EE +_0226C7E2: + ldr r2, [sp, #0x4c] + add r0, r7, #0 + mov r1, ip + mov r3, #0 + bl ov16_0226CB10 +_0226C7EE: + cmp r0, #0x20 + bhi _0226C80E + bhs _0226C81C + cmp r0, #2 + bhi _0226C808 + cmp r0, #1 + blo _0226C806 + bne _0226C800 + b _0226C956 +_0226C800: + cmp r0, #2 + bne _0226C806 + b _0226C9A2 +_0226C806: + b _0226C9A8 +_0226C808: + cmp r0, #0x10 + beq _0226C81C + b _0226C9A8 +_0226C80E: + cmp r0, #0x40 + bhi _0226C816 + beq _0226C81C + b _0226C9A8 +_0226C816: + cmp r0, #0x80 + beq _0226C81C + b _0226C9A8 +_0226C81C: + ldr r0, [sp, #0x44] + cmp r0, #0 + bne _0226C862 + mov r0, #1 + ldrsb r0, [r7, r0] + ldr r2, _0226C9B0 ; =0x022701DC + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r7, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [sp, #0x48] + lsl r3, r1, #2 + ldr r0, [r0, #0x14] + ldr r1, [sp, #0x48] + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r1, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + b _0226C9A8 +_0226C862: + mov r2, #1 + ldrsb r0, [r7, r2] + cmp r0, #0 + bne _0226C924 + ldr r0, [sp, #0x28] + sub r1, r2, #2 + cmp r0, r1 + bne _0226C878 + ldr r0, [sp, #0x24] + cmp r0, r1 + beq _0226C882 +_0226C878: + mov r1, #0 + ldr r0, [sp, #0x40] + mvn r1, r1 + cmp r0, r1 + bne _0226C89C +_0226C882: + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x34] + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r2, [sp, #0x30] + ldr r0, [r6, r0] + ldr r3, [sp, #0x38] + bl ov16_0226DD9C + b _0226C8FA +_0226C89C: + ldr r0, [sp, #0x24] + cmp r0, r1 + beq _0226C8D2 + ldr r0, [sp, #0x28] + cmp r0, r1 + bne _0226C8D2 + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x34] + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r2, [sp, #0x38] + str r0, [sp, #4] + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x30] + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x10] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DCCC + b _0226C8FA +_0226C8D2: + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x34] + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r2, [sp, #0x38] + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + ldr r3, [sp, #0x30] + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + str r0, [sp, #0x10] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DCCC +_0226C8FA: + mov r1, #0 + ldr r0, [sp, #0x40] + mvn r1, r1 + cmp r0, r1 + beq _0226C91A + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r1, [sp, #0x40] + ldr r0, [r6, r0] + ldr r2, [sp, #0x3c] + ldr r3, [sp, #0x20] + bl ov16_0226DDC0 + b _0226C9A8 +_0226C91A: + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DE04 + b _0226C9A8 +_0226C924: + ldr r0, [sp, #0x48] + ldr r1, [sp, #0x48] + ldr r0, [r0, #0x14] + ldrb r0, [r0, #0x11] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r3, [r1, #0x14] + ldr r0, _0226C9B4 ; =0x000006D8 + ldrb r1, [r3, #0x12] + ldrb r2, [r3, #0x13] + ldrb r3, [r3, #0x10] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + ldr r0, _0226C9B4 ; =0x000006D8 + ldr r0, [r6, r0] + bl ov16_0226DE04 + b _0226C9A8 +_0226C956: + ldr r0, [sp, #0x44] + cmp r0, #1 + bne _0226C980 + mov r0, #1 + ldrsb r0, [r7, r0] + cmp r0, #0 + ble _0226C96A + add sp, #0x60 + mov r0, #4 + pop {r3, r4, r5, r6, r7, pc} +_0226C96A: + add r2, sp, #0x58 + mov r0, #0 + add r2, #2 + b _0226C97A +_0226C972: + ldrb r1, [r2, r0] + cmp r1, #1 + beq _0226C9AC + add r0, r0, #1 +_0226C97A: + cmp r0, #4 + blt _0226C972 + b _0226C9A8 +_0226C980: + mov r0, #1 + ldrsb r0, [r7, r0] + ldr r2, _0226C9B0 ; =0x022701DC + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r7, r0] + add r0, r2, r3 + ldrb r0, [r1, r0] + cmp r0, #4 + beq _0226C9AC + add r1, sp, #0x58 + add r1, #2 + ldrb r1, [r1, r0] + cmp r1, #1 + bne _0226C9A8 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} +_0226C9A2: + add sp, #0x60 + mov r0, #4 + pop {r3, r4, r5, r6, r7, pc} +_0226C9A8: + mov r0, #0 + mvn r0, r0 +_0226C9AC: + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C9B0: .word 0x022701DC +_0226C9B4: .word 0x000006D8 + thumb_func_end ov16_0226C3C8 + + thumb_func_start ov16_0226C9B8 +ov16_0226C9B8: ; 0x0226C9B8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #4 + beq _0226CA06 + ldr r1, _0226CA08 ; =0x0000068A + ldr r0, [r5, #0] + ldrb r1, [r5, r1] + bl ov16_0223E1C4 + add r1, r0, #0 + ldr r0, [r5, #0] + bl ov16_0223DF14 + bl ov16_02263B0C + ldr r1, _0226CA0C ; =0x0000068C + mov r3, #0 + ldrb r1, [r5, r1] + ldr r7, _0226CA10 ; =0x022701DC + strb r1, [r0, #6] + add r1, r3, #0 + b _0226CA02 +_0226C9E6: + lsl r5, r3, #1 + add r2, r1, #0 + add r6, r7, r5 + b _0226C9FC +_0226C9EE: + ldrb r5, [r2, r6] + cmp r4, r5 + bne _0226C9FA + strb r2, [r0, #4] + strb r3, [r0, #5] + pop {r3, r4, r5, r6, r7, pc} +_0226C9FA: + add r2, r2, #1 +_0226C9FC: + cmp r2, #2 + blt _0226C9EE + add r3, r3, #1 +_0226CA02: + cmp r3, #3 + blt _0226C9E6 +_0226CA06: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226CA08: .word 0x0000068A +_0226CA0C: .word 0x0000068C +_0226CA10: .word 0x022701DC + thumb_func_end ov16_0226C9B8 + + thumb_func_start ov16_0226CA14 +ov16_0226CA14: ; 0x0226CA14 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + ldr r0, _0226CB00 ; =0x000006DC + ldr r2, _0226CB04 ; =0x02270670 + add r3, r0, #0 + sub r3, #0x51 + ldrsb r5, [r6, r3] + mov r3, #0x30 + add r4, r6, r0 + mul r3, r5 + add r5, r2, r3 + cmp r1, #1 + bne _0226CA70 + mov r1, #1 + ldrsb r2, [r4, r1] + mov r3, #2 + ldr r1, _0226CB08 ; =0x022701C8 + ldrsb r3, [r4, r3] + add r1, r1, r2 + sub r0, r0, #4 + ldrb r2, [r3, r1] + ldr r1, [r5, #0x14] + lsl r3, r2, #2 + add r1, r1, r3 + ldrb r1, [r1, #1] + sub r1, #8 + str r1, [sp] + mov r1, #0x11 + lsl r1, r1, #0x10 + str r1, [sp, #4] + ldr r4, [r5, #0x14] + ldr r0, [r6, r0] + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + mov r0, #0 + add sp, #8 + mvn r0, r0 + pop {r4, r5, r6, pc} +_0226CA70: + ldr r3, _0226CB08 ; =0x022701C8 + add r0, r4, #0 + mov r1, #1 + mov r2, #2 + bl ov16_0226CB10 + cmp r0, #0x20 + bhi _0226CA98 + bhs _0226CAA4 + cmp r0, #2 + bhi _0226CA92 + cmp r0, #1 + blo _0226CAF6 + beq _0226CADE + cmp r0, #2 + beq _0226CAF0 + b _0226CAF6 +_0226CA92: + cmp r0, #0x10 + beq _0226CAA4 + b _0226CAF6 +_0226CA98: + cmp r0, #0x40 + bhi _0226CAA0 + beq _0226CAA4 + b _0226CAF6 +_0226CAA0: + cmp r0, #0x80 + bne _0226CAF6 +_0226CAA4: + mov r0, #1 + ldrsb r3, [r4, r0] + mov r0, #2 + ldr r2, _0226CB08 ; =0x022701C8 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r5, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r5, #0x14] + ldr r0, _0226CB0C ; =0x000006D8 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov16_0226DD9C + b _0226CAF6 +_0226CADE: + mov r0, #1 + ldrsb r3, [r4, r0] + mov r0, #2 + ldr r2, _0226CB08 ; =0x022701C8 + ldrsb r1, [r4, r0] + add r0, r2, r3 + add sp, #8 + ldrb r0, [r1, r0] + pop {r4, r5, r6, pc} +_0226CAF0: + add sp, #8 + mov r0, #1 + pop {r4, r5, r6, pc} +_0226CAF6: + mov r0, #0 + mvn r0, r0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0226CB00: .word 0x000006DC +_0226CB04: .word 0x02270670 +_0226CB08: .word 0x022701C8 +_0226CB0C: .word 0x000006D8 + thumb_func_end ov16_0226CA14 + + thumb_func_start ov16_0226CB10 +ov16_0226CB10: ; 0x0226CB10 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #2 + ldrsb r1, [r0, r1] + add r6, r2, #0 + add r2, r3, #0 + cmp r1, r4 + blt _0226CB24 + sub r1, r4, #1 + strb r1, [r0, #2] +_0226CB24: + mov r1, #1 + ldrsb r1, [r0, r1] + cmp r1, r6 + blt _0226CB30 + sub r1, r6, #1 + strb r1, [r0, #1] +_0226CB30: + mov r7, #2 + ldrsb r1, [r0, r7] + mov r5, #1 + mov r3, #0x40 + str r1, [sp] + ldrsb r1, [r0, r5] + mov ip, r1 + ldr r1, _0226CD00 ; =0x021BF67C + ldr r1, [r1, #0x48] + tst r3, r1 + beq _0226CB96 + mov r1, ip + sub r1, r1, #1 + strb r1, [r0, #1] + ldrsb r1, [r0, r5] + cmp r1, #0 + bge _0226CB56 + mov r1, #0 + strb r1, [r0, #1] +_0226CB56: + cmp r2, #0 + beq _0226CB92 + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _0226CB92 + add r1, r0, #1 + mov r7, #0 + mov r6, #1 +_0226CB72: + ldrsb r3, [r1, r7] + sub r3, r3, #1 + strb r3, [r1] + ldrsb r3, [r0, r6] + cmp r3, #0 + bge _0226CB84 + mov r1, ip + strb r1, [r0, #1] + b _0226CB92 +_0226CB84: + mov r5, #2 + ldrsb r5, [r0, r5] + mul r3, r4 + add r5, r2, r5 + ldrb r3, [r3, r5] + cmp r3, #0xff + beq _0226CB72 +_0226CB92: + mov r5, #0x40 + b _0226CCAA +_0226CB96: + mov r3, #0x80 + tst r3, r1 + beq _0226CBEC + mov r1, ip + add r1, r1, #1 + strb r1, [r0, #1] + ldrsb r1, [r0, r5] + cmp r1, r6 + blt _0226CBAC + sub r1, r6, #1 + strb r1, [r0, #1] +_0226CBAC: + cmp r2, #0 + beq _0226CBE8 + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _0226CBE8 + add r1, r0, #1 + mov r7, #1 +_0226CBC6: + mov r3, #0 + ldrsb r3, [r1, r3] + add r3, r3, #1 + strb r3, [r1] + ldrsb r3, [r0, r7] + cmp r3, r6 + blt _0226CBDA + mov r1, ip + strb r1, [r0, #1] + b _0226CBE8 +_0226CBDA: + mov r5, #2 + ldrsb r5, [r0, r5] + mul r3, r4 + add r5, r2, r5 + ldrb r3, [r3, r5] + cmp r3, #0xff + beq _0226CBC6 +_0226CBE8: + mov r5, #0x80 + b _0226CCAA +_0226CBEC: + mov r3, #0x20 + tst r3, r1 + beq _0226CC42 + ldr r1, [sp] + sub r1, r1, #1 + strb r1, [r0, #2] + ldrsb r1, [r0, r7] + cmp r1, #0 + bge _0226CC02 + mov r1, #0 + strb r1, [r0, #2] +_0226CC02: + cmp r2, #0 + beq _0226CC3E + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _0226CC3E + add r5, r0, #2 + mov r7, #0 + mov r6, #2 +_0226CC1E: + ldrsb r1, [r5, r7] + sub r1, r1, #1 + strb r1, [r5] + ldrsb r3, [r0, r6] + cmp r3, #0 + bge _0226CC30 + ldr r1, [sp] + strb r1, [r0, #2] + b _0226CC3E +_0226CC30: + mov r1, #1 + ldrsb r1, [r0, r1] + add r3, r2, r3 + mul r1, r4 + ldrb r1, [r1, r3] + cmp r1, #0xff + beq _0226CC1E +_0226CC3E: + mov r5, #0x20 + b _0226CCAA +_0226CC42: + mov r3, #0x10 + tst r3, r1 + beq _0226CC98 + ldr r1, [sp] + add r1, r1, #1 + strb r1, [r0, #2] + ldrsb r1, [r0, r7] + cmp r1, r4 + blt _0226CC58 + sub r1, r4, #1 + strb r1, [r0, #2] +_0226CC58: + cmp r2, #0 + beq _0226CC94 + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _0226CC94 + add r5, r0, #2 + mov r7, #0 + mov r6, #2 +_0226CC74: + ldrsb r1, [r5, r7] + add r1, r1, #1 + strb r1, [r5] + ldrsb r3, [r0, r6] + cmp r3, r4 + blt _0226CC86 + ldr r1, [sp] + strb r1, [r0, #2] + b _0226CC94 +_0226CC86: + mov r1, #1 + ldrsb r1, [r0, r1] + add r3, r2, r3 + mul r1, r4 + ldrb r1, [r1, r3] + cmp r1, #0xff + beq _0226CC74 +_0226CC94: + mov r5, #0x10 + b _0226CCAA +_0226CC98: + add r3, r1, #0 + tst r3, r5 + bne _0226CCAA + tst r1, r7 + beq _0226CCA6 + add r5, r7, #0 + b _0226CCAA +_0226CCA6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226CCAA: + cmp r2, #0 + beq _0226CCD4 + mov r1, ip + add r3, r4, #0 + mul r3, r1 + ldr r1, [sp] + add r1, r1, r3 + mov r3, #2 + ldrsb r6, [r0, r3] + mov r3, #1 + ldrsb r3, [r0, r3] + ldrb r1, [r2, r1] + mul r3, r4 + add r3, r6, r3 + ldrb r2, [r2, r3] + cmp r1, r2 + bne _0226CCD4 + ldr r1, [sp] + strb r1, [r0, #2] + mov r1, ip + strb r1, [r0, #1] +_0226CCD4: + mov r1, #2 + ldrsb r2, [r0, r1] + ldr r1, [sp] + cmp r2, r1 + bne _0226CCE8 + mov r1, #1 + ldrsb r1, [r0, r1] + mov r0, ip + cmp r1, r0 + beq _0226CCF0 +_0226CCE8: + ldr r0, _0226CD04 ; =0x000005DC + bl sub_02005748 + b _0226CCFA +_0226CCF0: + mov r0, #0xf0 + tst r0, r5 + beq _0226CCFA + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226CCFA: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226CD00: .word 0x021BF67C +_0226CD04: .word 0x000005DC + thumb_func_end ov16_0226CB10 + + thumb_func_start ov16_0226CD08 +ov16_0226CD08: ; 0x0226CD08 + mov r1, #0x6e + lsl r1, r1, #4 + ldrb r0, [r0, r1] + bx lr + thumb_func_end ov16_0226CD08 + + thumb_func_start ov16_0226CD10 +ov16_0226CD10: ; 0x0226CD10 + mov r2, #0x6e + lsl r2, r2, #4 + strb r1, [r0, r2] + bx lr + thumb_func_end ov16_0226CD10 + + thumb_func_start ov16_0226CD18 +ov16_0226CD18: ; 0x0226CD18 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov16_0223E010 + ldr r0, [r4, #0] + bl ov16_0223E018 + ldr r0, [r4, #0] + bl ov16_0223E064 + ldr r0, [r4, #0] + bl ov16_0223F228 + cmp r0, #0 + bne _0226CD54 + ldr r0, _0226CD78 ; =0x000006E8 + ldrb r0, [r4, r0] + cmp r0, #2 + blo _0226CD44 + bl sub_02022974 +_0226CD44: + ldr r1, _0226CD78 ; =0x000006E8 + add r0, r4, #0 + ldrb r1, [r4, r1] + lsl r2, r1, #2 + ldr r1, _0226CD7C ; =0x0227020C + ldr r1, [r1, r2] + blx r1 + b _0226CD5A +_0226CD54: + add r0, r4, #0 + bl ov16_0226CE34 +_0226CD5A: + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0226CD76 + ldr r1, _0226CD80 ; =0x000006E9 + mov r3, #0 + strb r3, [r4, r1] + add r2, r1, #1 + strb r3, [r4, r2] + sub r2, r1, #1 + ldrb r2, [r4, r2] + sub r1, r1, #1 + add r2, r2, #1 + strb r2, [r4, r1] +_0226CD76: + pop {r4, pc} + ; .align 2, 0 +_0226CD78: .word 0x000006E8 +_0226CD7C: .word 0x0227020C +_0226CD80: .word 0x000006E9 + thumb_func_end ov16_0226CD18 + + thumb_func_start ov16_0226CD84 +ov16_0226CD84: ; 0x0226CD84 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0226CDD4 ; =0x000006E9 + ldrb r1, [r4, r0] + cmp r1, #0 + bne _0226CDB4 + sub r0, r0, #5 + mov r3, #0x11 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0x3c + lsl r3, r3, #0x10 + bl ov16_0226DF80 + ldr r0, _0226CDD8 ; =0x000006E4 + mov r1, #0x3c + ldr r0, [r4, r0] + bl ov16_0226DFD0 + ldr r0, _0226CDD4 ; =0x000006E9 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0226CDCC +_0226CDB4: + sub r0, r0, #5 + ldr r0, [r4, r0] + bl ov16_0226DFD4 + cmp r0, #1 + bne _0226CDCC + ldr r0, _0226CDD4 ; =0x000006E9 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + mov r0, #0 + pop {r4, pc} +_0226CDCC: + mov r0, #0 + mvn r0, r0 + pop {r4, pc} + nop +_0226CDD4: .word 0x000006E9 +_0226CDD8: .word 0x000006E4 + thumb_func_end ov16_0226CD84 + + thumb_func_start ov16_0226CDDC +ov16_0226CDDC: ; 0x0226CDDC + push {r4, lr} + add r4, r0, #0 + ldr r0, _0226CE2C ; =0x000006E9 + ldrb r1, [r4, r0] + cmp r1, #0 + bne _0226CE0C + sub r0, r0, #5 + mov r3, #0x11 + ldr r0, [r4, r0] + mov r1, #0x40 + mov r2, #0x16 + lsl r3, r3, #0x10 + bl ov16_0226DF80 + ldr r0, _0226CE30 ; =0x000006E4 + mov r1, #0x3c + ldr r0, [r4, r0] + bl ov16_0226DFD0 + ldr r0, _0226CE2C ; =0x000006E9 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0226CE24 +_0226CE0C: + sub r0, r0, #5 + ldr r0, [r4, r0] + bl ov16_0226DFD4 + cmp r0, #1 + bne _0226CE24 + ldr r0, _0226CE2C ; =0x000006E9 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + mov r0, #1 + pop {r4, pc} +_0226CE24: + mov r0, #0 + mvn r0, r0 + pop {r4, pc} + nop +_0226CE2C: .word 0x000006E9 +_0226CE30: .word 0x000006E4 + thumb_func_end ov16_0226CDDC + + thumb_func_start ov16_0226CE34 +ov16_0226CE34: ; 0x0226CE34 + push {r4, lr} + ldr r1, _0226CEA8 ; =0x000006E9 + add r4, r0, #0 + ldrb r0, [r4, r1] + cmp r0, #0 + beq _0226CE46 + cmp r0, #1 + beq _0226CE64 + b _0226CE88 +_0226CE46: + add r0, r1, #1 + ldrb r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #1 + strb r2, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #0x3c + bls _0226CEA0 + mov r2, #0 + add r0, r1, #1 + strb r2, [r4, r0] + ldrb r0, [r4, r1] + add r0, r0, #1 + strb r0, [r4, r1] + b _0226CEA0 +_0226CE64: + sub r0, r1, #5 + mov r3, #0x11 + ldr r0, [r4, r0] + mov r1, #0x28 + mov r2, #0x92 + lsl r3, r3, #0x10 + bl ov16_0226DF80 + ldr r0, _0226CEAC ; =0x000006E4 + mov r1, #0x3c + ldr r0, [r4, r0] + bl ov16_0226DFD0 + ldr r0, _0226CEA8 ; =0x000006E9 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + b _0226CEA0 +_0226CE88: + sub r0, r1, #5 + ldr r0, [r4, r0] + bl ov16_0226DFD4 + cmp r0, #1 + bne _0226CEA0 + ldr r0, _0226CEA8 ; =0x000006E9 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + mov r0, #1 + pop {r4, pc} +_0226CEA0: + mov r0, #0 + mvn r0, r0 + pop {r4, pc} + nop +_0226CEA8: .word 0x000006E9 +_0226CEAC: .word 0x000006E4 + thumb_func_end ov16_0226CE34 + + thumb_func_start ov16_0226CEB0 +ov16_0226CEB0: ; 0x0226CEB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + str r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r4, r1, #0 + bl ov16_0223DF00 + add r5, r0, #0 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + bl ov16_0223E064 + add r6, r0, #0 + ldr r1, _0226D074 ; =0x0000068B + ldr r0, [sp, #0x1c] + ldrsb r0, [r0, r1] + cmp r0, #0x12 + beq _0226CED8 + bl sub_02022974 +_0226CED8: + mov r0, #0 + str r0, [sp] + mov r1, #5 + add r0, r5, #0 + mov r2, #0x20 + mov r3, #1 + str r1, [sp, #4] + bl sub_0200DAA4 + add r0, r6, #0 + mov r1, #1 + mov r2, #0x10 + mov r3, #0x20 + bl sub_02003070 + mov r0, #6 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + str r3, [sp, #8] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x20 + str r3, [sp, #0xc] + bl sub_02019CB8 + mov r0, #6 + str r0, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x21 + mov r3, #2 + bl sub_02019CB8 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x22 + mov r3, #0x1e + bl sub_02019CB8 + mov r0, #7 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x23 + str r3, [sp, #0xc] + bl sub_02019CB8 + mov r0, #7 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x25 + mov r3, #0x1e + bl sub_02019CB8 + mov r0, #0xb + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + str r3, [sp, #8] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x26 + str r3, [sp, #0xc] + bl sub_02019CB8 + mov r0, #0xb + str r0, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x27 + mov r3, #2 + bl sub_02019CB8 + mov r0, #0xb + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x28 + mov r3, #0x1e + bl sub_02019CB8 + mov r0, #7 + str r0, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #5 + mov r2, #0x24 + mov r3, #2 + bl sub_02019CB8 + add r0, r5, #0 + mov r1, #5 + bl sub_0201C3C0 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + bl ov16_0223E05C + ldr r2, _0226D078 ; =0x02270208 + str r0, [sp, #0x20] + ldrh r3, [r2, #0x2c] + add r1, sp, #0x2c + add r0, sp, #0x2c + strh r3, [r1] + ldrh r3, [r2, #0x2e] + ldr r6, [sp, #0x1c] + mov r7, #0 + strh r3, [r1, #2] + ldrh r3, [r2, #0x30] + mov r5, #0x40 + strh r3, [r1, #4] + ldrh r3, [r2, #0x32] + strh r3, [r1, #6] + ldrh r3, [r2, #0x34] + ldrh r2, [r2, #0x36] + strh r3, [r1, #8] + strh r2, [r1, #0xa] + lsl r1, r4, #2 + add r4, r0, r1 + mov r1, #0x4d + lsl r1, r1, #4 + add r0, r6, #0 + add r0, r0, r1 + str r0, [sp, #0x28] +_0226D018: + ldr r0, _0226D07C ; =0x000004E4 + ldr r0, [r6, r0] + cmp r0, #0 + beq _0226D028 + bl sub_02022974 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} +_0226D028: + ldrh r1, [r4] + ldr r0, [sp, #0x20] + bl sub_0200B1EC + str r0, [sp, #0x24] + ldr r0, _0226D080 ; =0x00010200 + add r1, r7, #1 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _0226D084 ; =0x00004E37 + mov r2, #0x14 + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + mul r2, r1 + ldr r1, [sp, #0x28] + str r5, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + str r0, [sp, #0x18] + add r1, r1, r2 + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x24] + mov r3, #0 + bl ov16_0226A98C + ldr r0, [sp, #0x24] + bl sub_020237BC + add r7, r7, #1 + add r6, #0x14 + add r4, r4, #2 + add r5, #0x10 + cmp r7, #2 + blt _0226D018 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226D074: .word 0x0000068B +_0226D078: .word 0x02270208 +_0226D07C: .word 0x000004E4 +_0226D080: .word 0x00010200 +_0226D084: .word 0x00004E37 + thumb_func_end ov16_0226CEB0 + + thumb_func_start ov16_0226D088 +ov16_0226D088: ; 0x0226D088 + ldr r1, _0226D090 ; =0x000006E1 + ldrb r0, [r0, r1] + bx lr + nop +_0226D090: .word 0x000006E1 + thumb_func_end ov16_0226D088 + + .rodata + + + .global Unk_ov16_022701C4 +Unk_ov16_022701C4: ; 0x022701C4 + .incbin "incbin/overlay16_rodata.bin", 0x1F68, 0x1F6C - 0x1F68 + + .global Unk_ov16_022701C8 +Unk_ov16_022701C8: ; 0x022701C8 + .incbin "incbin/overlay16_rodata.bin", 0x1F6C, 0x1F70 - 0x1F6C + + .global Unk_ov16_022701CC +Unk_ov16_022701CC: ; 0x022701CC + .incbin "incbin/overlay16_rodata.bin", 0x1F70, 0x1F74 - 0x1F70 + + .global Unk_ov16_022701D0 +Unk_ov16_022701D0: ; 0x022701D0 + .incbin "incbin/overlay16_rodata.bin", 0x1F74, 0x1F78 - 0x1F74 + + .global Unk_ov16_022701D4 +Unk_ov16_022701D4: ; 0x022701D4 + .incbin "incbin/overlay16_rodata.bin", 0x1F78, 0x1F7C - 0x1F78 + + .global Unk_ov16_022701D8 +Unk_ov16_022701D8: ; 0x022701D8 + .incbin "incbin/overlay16_rodata.bin", 0x1F7C, 0x1F80 - 0x1F7C + + .global Unk_ov16_022701DC +Unk_ov16_022701DC: ; 0x022701DC + .incbin "incbin/overlay16_rodata.bin", 0x1F80, 0x1F88 - 0x1F80 + + .global Unk_ov16_022701E4 +Unk_ov16_022701E4: ; 0x022701E4 + .incbin "incbin/overlay16_rodata.bin", 0x1F88, 0x1F90 - 0x1F88 + + .global Unk_ov16_022701EC +Unk_ov16_022701EC: ; 0x022701EC + .incbin "incbin/overlay16_rodata.bin", 0x1F90, 0x1F98 - 0x1F90 + + .global Unk_ov16_022701F4 +Unk_ov16_022701F4: ; 0x022701F4 + .incbin "incbin/overlay16_rodata.bin", 0x1F98, 0x1FA0 - 0x1F98 + + .global Unk_ov16_022701FC +Unk_ov16_022701FC: ; 0x022701FC + .incbin "incbin/overlay16_rodata.bin", 0x1FA0, 0x1FA8 - 0x1FA0 + + .global Unk_ov16_02270204 +Unk_ov16_02270204: ; 0x02270204 + .incbin "incbin/overlay16_rodata.bin", 0x1FA8, 0x1FB0 - 0x1FA8 + + .global Unk_ov16_0227020C +Unk_ov16_0227020C: ; 0x0227020C + .incbin "incbin/overlay16_rodata.bin", 0x1FB0, 0x1FB8 - 0x1FB0 + + .global Unk_ov16_02270214 +Unk_ov16_02270214: ; 0x02270214 + .incbin "incbin/overlay16_rodata.bin", 0x1FB8, 0x1FC0 - 0x1FB8 + + .global Unk_ov16_0227021C +Unk_ov16_0227021C: ; 0x0227021C + .incbin "incbin/overlay16_rodata.bin", 0x1FC0, 0x1FC8 - 0x1FC0 + + .global Unk_ov16_02270224 +Unk_ov16_02270224: ; 0x02270224 + .incbin "incbin/overlay16_rodata.bin", 0x1FC8, 0x1FD0 - 0x1FC8 + + .global Unk_ov16_0227022C +Unk_ov16_0227022C: ; 0x0227022C + .incbin "incbin/overlay16_rodata.bin", 0x1FD0, 0x1FD8 - 0x1FD0 + + .global Unk_ov16_02270234 +Unk_ov16_02270234: ; 0x02270234 + .incbin "incbin/overlay16_rodata.bin", 0x1FD8, 0x1FE4 - 0x1FD8 + + .global Unk_ov16_02270240 +Unk_ov16_02270240: ; 0x02270240 + .incbin "incbin/overlay16_rodata.bin", 0x1FE4, 0x1FF0 - 0x1FE4 + + .global Unk_ov16_0227024C +Unk_ov16_0227024C: ; 0x0227024C + .incbin "incbin/overlay16_rodata.bin", 0x1FF0, 0x1FFC - 0x1FF0 + + .global Unk_ov16_02270258 +Unk_ov16_02270258: ; 0x02270258 + .incbin "incbin/overlay16_rodata.bin", 0x1FFC, 0x2008 - 0x1FFC + + .global Unk_ov16_02270264 +Unk_ov16_02270264: ; 0x02270264 + .incbin "incbin/overlay16_rodata.bin", 0x2008, 0x2018 - 0x2008 + + .global Unk_ov16_02270274 +Unk_ov16_02270274: ; 0x02270274 + .incbin "incbin/overlay16_rodata.bin", 0x2018, 0x2028 - 0x2018 + + .global Unk_ov16_02270284 +Unk_ov16_02270284: ; 0x02270284 + .incbin "incbin/overlay16_rodata.bin", 0x2028, 0x2038 - 0x2028 + + .global Unk_ov16_02270294 +Unk_ov16_02270294: ; 0x02270294 + .incbin "incbin/overlay16_rodata.bin", 0x2038, 0x2048 - 0x2038 + + .global Unk_ov16_022702A4 +Unk_ov16_022702A4: ; 0x022702A4 + .incbin "incbin/overlay16_rodata.bin", 0x2048, 0x2058 - 0x2048 + + .global Unk_ov16_022702B4 +Unk_ov16_022702B4: ; 0x022702B4 + .incbin "incbin/overlay16_rodata.bin", 0x2058, 0x2068 - 0x2058 + + .global Unk_ov16_022702C4 +Unk_ov16_022702C4: ; 0x022702C4 + .incbin "incbin/overlay16_rodata.bin", 0x2068, 0x2078 - 0x2068 + + .global Unk_ov16_022702D4 +Unk_ov16_022702D4: ; 0x022702D4 + .incbin "incbin/overlay16_rodata.bin", 0x2078, 0x2088 - 0x2078 + + .global Unk_ov16_022702E4 +Unk_ov16_022702E4: ; 0x022702E4 + .incbin "incbin/overlay16_rodata.bin", 0x2088, 0x2098 - 0x2088 + + .global Unk_ov16_022702F4 +Unk_ov16_022702F4: ; 0x022702F4 + .incbin "incbin/overlay16_rodata.bin", 0x2098, 0x20A8 - 0x2098 + + .global Unk_ov16_02270304 +Unk_ov16_02270304: ; 0x02270304 + .incbin "incbin/overlay16_rodata.bin", 0x20A8, 0x20B8 - 0x20A8 + + .global Unk_ov16_02270314 +Unk_ov16_02270314: ; 0x02270314 + .incbin "incbin/overlay16_rodata.bin", 0x20B8, 0x20CC - 0x20B8 + + .global Unk_ov16_02270328 +Unk_ov16_02270328: ; 0x02270328 + .incbin "incbin/overlay16_rodata.bin", 0x20CC, 0x20E0 - 0x20CC + + .global Unk_ov16_0227033C +Unk_ov16_0227033C: ; 0x0227033C + .incbin "incbin/overlay16_rodata.bin", 0x20E0, 0x20F4 - 0x20E0 + + .global Unk_ov16_02270350 +Unk_ov16_02270350: ; 0x02270350 + .incbin "incbin/overlay16_rodata.bin", 0x20F4, 0x2108 - 0x20F4 + + .global Unk_ov16_02270364 +Unk_ov16_02270364: ; 0x02270364 + .incbin "incbin/overlay16_rodata.bin", 0x2108, 0x211C - 0x2108 + + .global Unk_ov16_02270378 +Unk_ov16_02270378: ; 0x02270378 + .incbin "incbin/overlay16_rodata.bin", 0x211C, 0x2130 - 0x211C + + .global Unk_ov16_0227038C +Unk_ov16_0227038C: ; 0x0227038C + .incbin "incbin/overlay16_rodata.bin", 0x2130, 0x2148 - 0x2130 + + .global Unk_ov16_022703A4 +Unk_ov16_022703A4: ; 0x022703A4 + .incbin "incbin/overlay16_rodata.bin", 0x2148, 0x2160 - 0x2148 + + .global Unk_ov16_022703BC +Unk_ov16_022703BC: ; 0x022703BC + .incbin "incbin/overlay16_rodata.bin", 0x2160, 0x2178 - 0x2160 + + .global Unk_ov16_022703D4 +Unk_ov16_022703D4: ; 0x022703D4 + .incbin "incbin/overlay16_rodata.bin", 0x2178, 0x2198 - 0x2178 + + .global Unk_ov16_022703F4 +Unk_ov16_022703F4: ; 0x022703F4 + .incbin "incbin/overlay16_rodata.bin", 0x2198, 0x21B8 - 0x2198 + + .global Unk_ov16_02270414 +Unk_ov16_02270414: ; 0x02270414 + .incbin "incbin/overlay16_rodata.bin", 0x21B8, 0x21EC - 0x21B8 + + .global Unk_ov16_02270448 +Unk_ov16_02270448: ; 0x02270448 + .incbin "incbin/overlay16_rodata.bin", 0x21EC, 0x2220 - 0x21EC + + .global Unk_ov16_0227047C +Unk_ov16_0227047C: ; 0x0227047C + .incbin "incbin/overlay16_rodata.bin", 0x2220, 0x2254 - 0x2220 + + .global Unk_ov16_022704B0 +Unk_ov16_022704B0: ; 0x022704B0 + .incbin "incbin/overlay16_rodata.bin", 0x2254, 0x2288 - 0x2254 + + .global Unk_ov16_022704E4 +Unk_ov16_022704E4: ; 0x022704E4 + .incbin "incbin/overlay16_rodata.bin", 0x2288, 0x22E4 - 0x2288 + + .global Unk_ov16_02270540 +Unk_ov16_02270540: ; 0x02270540 + .incbin "incbin/overlay16_rodata.bin", 0x22E4, 0x2354 - 0x22E4 + + .global Unk_ov16_022705B0 +Unk_ov16_022705B0: ; 0x022705B0 + .incbin "incbin/overlay16_rodata.bin", 0x2354, 0x2414 - 0x2354 + + .global Unk_ov16_02270670 +Unk_ov16_02270670: ; 0x02270670 + .incbin "incbin/overlay16_rodata.bin", 0x2414, 0x27A4 - 0x2414 + + .global Unk_ov16_02270A00 +Unk_ov16_02270A00: ; 0x02270A00 + .incbin "incbin/overlay16_rodata.bin", 0x27A4, 0x27A8 - 0x27A4 + + .global Unk_ov16_02270A04 +Unk_ov16_02270A04: ; 0x02270A04 + .incbin "incbin/overlay16_rodata.bin", 0x27A8, 0x27AC - 0x27A8 + + .global Unk_ov16_02270A08 +Unk_ov16_02270A08: ; 0x02270A08 + .incbin "incbin/overlay16_rodata.bin", 0x27AC, 0x27B0 - 0x27AC + + .global Unk_ov16_02270A0C +Unk_ov16_02270A0C: ; 0x02270A0C + .incbin "incbin/overlay16_rodata.bin", 0x27B0, 0x27B8 - 0x27B0 + + .global Unk_ov16_02270A14 +Unk_ov16_02270A14: ; 0x02270A14 + .incbin "incbin/overlay16_rodata.bin", 0x27B8, 0x5 + diff --git a/asm/ov16_0226D094.s b/asm/ov16_0226D094.s new file mode 100644 index 000000000..80ab99cca --- /dev/null +++ b/asm/ov16_0226D094.s @@ -0,0 +1,1496 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0226D094 +ov16_0226D094: ; 0x0226D094 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x1b + mov r1, #5 + add r7, r2, #0 + bl sub_02006C24 + add r6, r0, #0 + str r6, [sp] + mov r0, #0x6e + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _0226D114 ; =0x00004E45 + mov r1, #2 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0226D118 ; =0x00004FBD + mov r3, #0x55 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + lsl r3, r3, #2 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0226D11C ; =0x00004FB7 + ldr r3, _0226D120 ; =0x00000155 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0226D124 ; =0x00004FAC + ldr r3, _0226D128 ; =0x00000156 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200CE54 + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226D114: .word 0x00004E45 +_0226D118: .word 0x00004FBD +_0226D11C: .word 0x00004FB7 +_0226D120: .word 0x00000155 +_0226D124: .word 0x00004FAC +_0226D128: .word 0x00000156 + thumb_func_end ov16_0226D094 + + thumb_func_start ov16_0226D12C +ov16_0226D12C: ; 0x0226D12C + push {r4, lr} + ldr r1, _0226D150 ; =0x00004FBD + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0226D154 ; =0x00004E45 + add r0, r4, #0 + bl sub_0200D080 + ldr r1, _0226D158 ; =0x00004FB7 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0226D15C ; =0x00004FAC + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0226D150: .word 0x00004FBD +_0226D154: .word 0x00004E45 +_0226D158: .word 0x00004FB7 +_0226D15C: .word 0x00004FAC + thumb_func_end ov16_0226D12C + + thumb_func_start ov16_0226D160 +ov16_0226D160: ; 0x0226D160 + push {r4, lr} + mov r0, #5 + lsl r1, r0, #6 + bl sub_02018144 + mov r2, #5 + mov r1, #0 + lsl r2, r2, #6 + add r4, r0, #0 + bl sub_020C4CF4 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226D160 + + thumb_func_start ov16_0226D17C +ov16_0226D17C: ; 0x0226D17C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _0226D18A + bl sub_02022974 +_0226D18A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226D17C + + thumb_func_start ov16_0226D194 +ov16_0226D194: ; 0x0226D194 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #0x14] + ldr r0, [sp, #0x38] + add r6, r1, #0 + str r0, [sp, #0x38] + ldr r0, [sp, #0x3c] + str r2, [sp, #0x18] + str r0, [sp, #0x3c] + str r3, [sp, #0x1c] + bl ov16_0226D160 + ldr r1, [sp, #0x3c] + ldr r2, [sp, #0x1c] + str r1, [sp] + ldr r3, [sp, #0x38] + add r1, r6, #0 + add r7, r0, #0 + bl ov16_0226D2A0 + add r5, r7, #0 + mov r4, #0 + add r5, #0x1c +_0226D1C2: + ldr r0, [sp, #0x14] + add r1, r6, #0 + ldrb r0, [r0, r4] + bl ov16_0226DB04 + ldr r1, [sp, #0x1c] + ldr r3, [sp, #0x18] + str r1, [sp] + str r4, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x38] + mov r1, #0x4f + str r0, [sp, #0xc] + ldr r0, [sp, #0x3c] + lsl r1, r1, #2 + str r0, [sp, #0x10] + add r0, r5, #0 + add r1, r7, r1 + add r2, r6, #0 + bl ov16_0226D540 + add r4, r4, #1 + add r5, #0x30 + cmp r4, #6 + blt _0226D1C2 + add r0, r7, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0226D194 + + thumb_func_start ov16_0226D1FC +ov16_0226D1FC: ; 0x0226D1FC + ldr r1, [r0, #4] + cmp r1, #0 + bne _0226D21A + mov r2, #0 +_0226D204: + ldr r1, [r0, #0x20] + cmp r1, #0 + bne _0226D212 + add r2, r2, #1 + add r0, #0x30 + cmp r2, #6 + blt _0226D204 +_0226D212: + cmp r2, #6 + bne _0226D21A + mov r0, #1 + bx lr +_0226D21A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226D1FC + + thumb_func_start ov16_0226D220 +ov16_0226D220: ; 0x0226D220 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + cmp r6, #0 + bne _0226D230 + bl sub_02022974 +_0226D230: + add r0, r6, #0 + add r1, r4, #0 + bl ov16_0226D3F8 + add r5, r6, #0 + mov r4, #0 + add r5, #0x1c + add r6, #0x18 +_0226D240: + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov16_0226D938 + add r4, r4, #1 + add r5, #0x30 + cmp r4, #6 + blt _0226D240 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0226D220 + + thumb_func_start ov16_0226D258 +ov16_0226D258: ; 0x0226D258 + ldr r1, [r0, #4] + cmp r1, #0 + bne _0226D276 + mov r2, #0 +_0226D260: + ldr r1, [r0, #0x20] + cmp r1, #0 + bne _0226D26E + add r2, r2, #1 + add r0, #0x30 + cmp r2, #6 + blt _0226D260 +_0226D26E: + cmp r2, #6 + bne _0226D276 + mov r0, #1 + bx lr +_0226D276: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov16_0226D258 + + thumb_func_start ov16_0226D27C +ov16_0226D27C: ; 0x0226D27C + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + bl sub_0200D0F4 + mov r4, #0 + add r5, r6, #0 +_0226D28A: + ldr r0, [r5, #0x1c] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, #0x30 + cmp r4, #6 + blt _0226D28A + add r0, r6, #0 + bl ov16_0226D17C + pop {r4, r5, r6, pc} + thumb_func_end ov16_0226D27C + + thumb_func_start ov16_0226D2A0 +ov16_0226D2A0: ; 0x0226D2A0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + mov r1, #0 + cmp r0, #0 + bne _0226D2BA + ldr r0, [r5, #4] + cmp r0, #0 + bne _0226D2BA + mov r1, #1 +_0226D2BA: + cmp r1, #0 + bne _0226D2C2 + bl sub_02022974 +_0226D2C2: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + ldr r1, [sp, #0x18] + ldr r2, _0226D338 ; =0x02270A3C + add r0, r7, #0 + bl sub_0200CE6C + str r0, [r5, #0] + cmp r6, #0 + ldr r0, [r5, #0] + bne _0226D2F8 + ldr r2, _0226D33C ; =0x02270A2C + lsl r3, r4, #1 + ldrsh r2, [r2, r3] + mov r1, #0x16 + lsl r1, r1, #4 + bl sub_0200D4C4 + ldr r0, [r5, #0] + mov r1, #8 + ldr r0, [r0, #0] + bl sub_02021D6C + b _0226D310 +_0226D2F8: + ldr r2, _0226D340 ; =0x02270A24 + lsl r3, r4, #1 + ldrsh r2, [r2, r3] + mov r1, #0x5f + mvn r1, r1 + bl sub_0200D4C4 + ldr r0, [r5, #0] + mov r1, #7 + ldr r0, [r0, #0] + bl sub_02021D6C +_0226D310: + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + str r6, [r5, #0xc] + mov r2, #0x7d + str r4, [r5, #0x10] + mov r0, #0 + strb r0, [r5, #0x1a] + ldr r0, _0226D344 ; =ov16_0226D34C + add r1, r5, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r5, #4] + ldr r0, _0226D348 ; =0x00000711 + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226D338: .word 0x02270A3C +_0226D33C: .word 0x02270A2C +_0226D340: .word 0x02270A24 +_0226D344: .word ov16_0226D34C +_0226D348: .word 0x00000711 + thumb_func_end ov16_0226D2A0 + + thumb_func_start ov16_0226D34C +ov16_0226D34C: ; 0x0226D34C + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r1, [r4, #0x1a] + cmp r1, #0 + beq _0226D35E + cmp r1, #1 + beq _0226D37A + b _0226D3E2 +_0226D35E: + add r1, sp, #0 + ldr r0, [r4, #0] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r0, [r1, r0] + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldrb r0, [r4, #0x1a] + add r0, r0, #1 + strb r0, [r4, #0x1a] +_0226D37A: + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x14] + cmp r0, #0 + bne _0226D3B2 + mov r0, #0x12 + lsl r0, r0, #8 + sub r1, r1, r0 + mov r0, #0xe + lsl r0, r0, #0xc + str r1, [r4, #0x14] + cmp r1, r0 + bgt _0226D39A + str r0, [r4, #0x14] + ldrb r0, [r4, #0x1a] + add r0, r0, #1 + strb r0, [r4, #0x1a] +_0226D39A: + ldr r2, [r4, #0x10] + ldr r1, [r4, #0x14] + lsl r3, r2, #1 + ldr r2, _0226D3F0 ; =0x02270A2C + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 + add sp, #4 + pop {r3, r4, pc} +_0226D3B2: + mov r0, #0x12 + lsl r0, r0, #8 + add r1, r1, r0 + mov r0, #2 + lsl r0, r0, #0xc + str r1, [r4, #0x14] + cmp r1, r0 + blt _0226D3CA + str r0, [r4, #0x14] + ldrb r0, [r4, #0x1a] + add r0, r0, #1 + strb r0, [r4, #0x1a] +_0226D3CA: + ldr r2, [r4, #0x10] + ldr r1, [r4, #0x14] + lsl r3, r2, #1 + ldr r2, _0226D3F4 ; =0x02270A24 + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 + add sp, #4 + pop {r3, r4, pc} +_0226D3E2: + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] + add sp, #4 + pop {r3, r4, pc} + nop +_0226D3F0: .word 0x02270A2C +_0226D3F4: .word 0x02270A24 + thumb_func_end ov16_0226D34C + + thumb_func_start ov16_0226D3F8 +ov16_0226D3F8: ; 0x0226D3F8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #0 + beq _0226D40A + ldr r0, [r5, #4] + cmp r0, #0 + beq _0226D40E +_0226D40A: + bl sub_02022974 +_0226D40E: + mov r0, #0 + strb r0, [r5, #0x1a] + str r4, [r5, #8] + cmp r4, #0 + bne _0226D41C + mov r0, #4 + b _0226D41C +_0226D41C: + strb r0, [r5, #0x1b] + mov r2, #0x7d + ldr r0, _0226D430 ; =ov16_0226D434 + add r1, r5, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + str r0, [r5, #4] + pop {r3, r4, r5, pc} + nop +_0226D430: .word ov16_0226D434 + thumb_func_end ov16_0226D3F8 + + thumb_func_start ov16_0226D434 +ov16_0226D434: ; 0x0226D434 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x1a] + cmp r0, #0 + beq _0226D44C + cmp r0, #1 + beq _0226D48C + cmp r0, #2 + beq _0226D4A0 + b _0226D51E +_0226D44C: + add r1, sp, #4 + ldr r0, [r4, #0] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + add r1, sp, #4 + mov r0, #2 + ldrsh r0, [r1, r0] + mov r1, #1 + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldr r0, [r4, #0] + bl sub_0200D810 + mov r0, #1 + lsl r0, r0, #0xc + strh r0, [r4, #0x18] + mov r0, #0x18 + ldrsh r0, [r4, r0] + mov r1, #0 + mov r2, #0x3f + asr r3, r0, #8 + mov r0, #0x10 + sub r0, r0, r3 + str r0, [sp] + ldr r0, _0226D530 ; =0x04000050 + bl sub_020BF55C + ldrb r0, [r4, #0x1a] + add r0, r0, #1 + strb r0, [r4, #0x1a] +_0226D48C: + ldrb r0, [r4, #0x1b] + cmp r0, #0 + beq _0226D49A + sub r0, r0, #1 + add sp, #8 + strb r0, [r4, #0x1b] + pop {r3, r4, r5, pc} +_0226D49A: + ldrb r0, [r4, #0x1a] + add r0, r0, #1 + strb r0, [r4, #0x1a] +_0226D4A0: + ldr r0, [r4, #8] + cmp r0, #0 + bne _0226D4E4 + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x14] + cmp r0, #0 + bne _0226D4CA + mov r0, #1 + lsl r0, r0, #0xa + sub r1, r1, r0 + str r1, [r4, #0x14] + ldr r2, [r4, #0x10] + lsl r1, r1, #8 + lsl r3, r2, #1 + ldr r2, _0226D534 ; =0x02270A2C + ldr r0, [r4, #0] + ldrsh r2, [r2, r3] + asr r1, r1, #0x10 + bl sub_0200D4C4 + b _0226D4E4 +_0226D4CA: + mov r0, #1 + lsl r0, r0, #0xa + add r1, r1, r0 + str r1, [r4, #0x14] + ldr r2, [r4, #0x10] + lsl r1, r1, #8 + lsl r3, r2, #1 + ldr r2, _0226D538 ; =0x02270A24 + ldr r0, [r4, #0] + ldrsh r2, [r2, r3] + asr r1, r1, #0x10 + bl sub_0200D4C4 +_0226D4E4: + mov r1, #0x18 + ldrsh r2, [r4, r1] + add r0, r1, #0 + add r0, #0xe8 + sub r0, r2, r0 + strh r0, [r4, #0x18] + ldrsh r0, [r4, r1] + cmp r0, #0 + bgt _0226D508 + mov r1, #0 + strh r1, [r4, #0x18] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D3EC + ldrb r0, [r4, #0x1a] + add r0, r0, #1 + strb r0, [r4, #0x1a] +_0226D508: + mov r0, #0x18 + ldrsh r0, [r4, r0] + add sp, #8 + asr r1, r0, #8 + mov r0, #0x10 + sub r0, r0, r1 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _0226D53C ; =0x04000052 + strh r1, [r0] + pop {r3, r4, r5, pc} +_0226D51E: + bl ov16_0223F9F0 + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0226D530: .word 0x04000050 +_0226D534: .word 0x02270A2C +_0226D538: .word 0x02270A24 +_0226D53C: .word 0x04000052 + thumb_func_end ov16_0226D434 + + thumb_func_start ov16_0226D540 +ov16_0226D540: ; 0x0226D540 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r7, r1, #0 + add r6, r2, #0 + mov r1, #0 + str r3, [sp] + ldr r4, [sp, #0x1c] + cmp r0, #0 + bne _0226D55C + ldr r0, [r5, #4] + cmp r0, #0 + bne _0226D55C + mov r1, #1 +_0226D55C: + cmp r1, #0 + bne _0226D564 + bl sub_02022974 +_0226D564: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x30 + bl sub_020C4CF4 + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x28] + ldr r2, _0226D634 ; =0x02270A70 + bl sub_0200CE6C + str r0, [r5, #0] + cmp r6, #0 + ldr r0, [r5, #0] + bne _0226D592 + ldr r2, [sp, #0x18] + mov r1, #0x45 + lsl r3, r2, #1 + ldr r2, _0226D638 ; =0x02270A34 + lsl r1, r1, #2 + ldrsh r2, [r2, r3] + bl sub_0200D4C4 + b _0226D5A2 +_0226D592: + ldr r2, [sp, #0x18] + mov r1, #0x13 + lsl r3, r2, #1 + ldr r2, _0226D63C ; =0x02270A1C + mvn r1, r1 + ldrsh r2, [r2, r3] + bl sub_0200D4C4 +_0226D5A2: + ldr r0, [r5, #0] + ldr r1, [sp, #0x20] + ldr r0, [r0, #0] + bl sub_02021D6C + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + add r0, r5, #0 + str r6, [r5, #8] + add r0, #0x2d + strb r4, [r0] + ldr r0, [sp, #0x18] + str r0, [r5, #0xc] + ldr r0, [sp, #0x20] + bl ov16_0226DB44 + add r1, r5, #0 + add r1, #0x2e + strb r0, [r1] + ldr r0, [sp, #0x20] + str r7, [r5, #0x14] + cmp r0, #6 + bne _0226D5D8 + ldr r0, _0226D640 ; =0x00000713 + b _0226D5DA +_0226D5D8: + ldr r0, _0226D644 ; =0x00000712 +_0226D5DA: + strh r0, [r5, #0x2a] + cmp r6, #0 + bne _0226D5EE + lsl r0, r4, #4 + add r0, #0xa2 + str r0, [r5, #0x20] + mov r0, #0xf + mul r0, r4 + add r0, #0x9c + b _0226D600 +_0226D5EE: + lsl r1, r4, #4 + mov r0, #0x5e + sub r0, r0, r1 + str r0, [r5, #0x20] + mov r0, #0xf + add r1, r4, #0 + mul r1, r0 + mov r0, #0x64 + sub r0, r0, r1 +_0226D600: + str r0, [r5, #0x24] + add r0, r5, #0 + mov r1, #0 + add r0, #0x2c + strb r1, [r0] + ldr r0, [sp] + ldr r2, _0226D648 ; =0x000001F5 + cmp r0, #0 + bne _0226D626 + lsl r0, r4, #1 + add r0, r4, r0 + add r0, r0, #5 + strh r0, [r5, #0x28] + ldr r0, _0226D64C ; =ov16_0226D654 + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226D626: + ldr r0, _0226D650 ; =ov16_0226D854 + strh r1, [r5, #0x28] + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226D634: .word 0x02270A70 +_0226D638: .word 0x02270A34 +_0226D63C: .word 0x02270A1C +_0226D640: .word 0x00000713 +_0226D644: .word 0x00000712 +_0226D648: .word 0x000001F5 +_0226D64C: .word ov16_0226D654 +_0226D650: .word ov16_0226D854 + thumb_func_end ov16_0226D540 + + thumb_func_start ov16_0226D654 +ov16_0226D654: ; 0x0226D654 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + cmp r0, #6 + bls _0226D666 + b _0226D836 +_0226D666: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226D672: ; jump table + .short _0226D680 - _0226D672 - 2 ; case 0 + .short _0226D6A4 - _0226D672 - 2 ; case 1 + .short _0226D6B2 - _0226D672 - 2 ; case 2 + .short _0226D734 - _0226D672 - 2 ; case 3 + .short _0226D74C - _0226D672 - 2 ; case 4 + .short _0226D78C - _0226D672 - 2 ; case 5 + .short _0226D7BA - _0226D672 - 2 ; case 6 +_0226D680: + add r1, sp, #0 + ldr r0, [r4, #0] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r0, [r1, r0] + lsl r0, r0, #8 + str r0, [r4, #0x1c] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D6A4: + mov r0, #0x28 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226D6B2 + sub r0, r0, #1 + strh r0, [r4, #0x28] + pop {r3, r4, r5, pc} +_0226D6B2: + ldr r0, [r4, #8] + ldr r1, [r4, #0x1c] + cmp r0, #0 + bne _0226D6F6 + mov r0, #0x12 + lsl r0, r0, #8 + sub r1, r1, r0 + str r1, [r4, #0x1c] + ldr r0, [r4, #0x24] + lsl r0, r0, #8 + cmp r1, r0 + bgt _0226D6E0 + str r0, [r4, #0x1c] + ldrh r0, [r4, #0x2a] + bl sub_02005748 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D6E0: + ldr r2, [r4, #0xc] + ldr r1, [r4, #0x1c] + lsl r3, r2, #1 + ldr r2, _0226D84C ; =0x02270A34 + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 + b _0226D72A +_0226D6F6: + mov r0, #0x12 + lsl r0, r0, #8 + add r1, r1, r0 + str r1, [r4, #0x1c] + ldr r0, [r4, #0x24] + lsl r0, r0, #8 + cmp r1, r0 + blt _0226D716 + str r0, [r4, #0x1c] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D716: + ldr r2, [r4, #0xc] + ldr r1, [r4, #0x1c] + lsl r3, r2, #1 + ldr r2, _0226D850 ; =0x02270A1C + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 +_0226D72A: + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + pop {r3, r4, r5, pc} +_0226D734: + ldr r1, [r4, #0x14] + mov r0, #0 + ldrsb r0, [r1, r0] + add r0, r0, #1 + strb r0, [r1] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D74C: + ldr r1, [r4, #0x14] + mov r0, #0 + ldrsb r0, [r1, r0] + cmp r0, #6 + beq _0226D760 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + pop {r3, r4, r5, pc} +_0226D760: + ldr r0, [r4, #8] + cmp r0, #0 + ldr r0, [r4, #0] + bne _0226D772 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021E50 + b _0226D77A +_0226D772: + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021E50 +_0226D77A: + mov r0, #0 + strh r0, [r4, #0x28] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D78C: + mov r0, #0x28 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x28] + ldrsh r0, [r4, r0] + cmp r0, #0 + blt _0226D84A + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x2e + ldrb r1, [r1] + ldr r0, [r0, #0] + bl sub_02021D6C + mov r0, #0 + strh r0, [r4, #0x28] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D7BA: + ldr r0, [r4, #8] + ldr r1, [r4, #0x1c] + cmp r0, #0 + bne _0226D7F8 + mov r0, #6 + lsl r0, r0, #8 + add r1, r1, r0 + str r1, [r4, #0x1c] + ldr r0, [r4, #0x20] + lsl r0, r0, #8 + cmp r1, r0 + blt _0226D7E2 + str r0, [r4, #0x1c] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D7E2: + ldr r2, [r4, #0xc] + ldr r1, [r4, #0x1c] + lsl r3, r2, #1 + ldr r2, _0226D84C ; =0x02270A34 + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 + b _0226D82C +_0226D7F8: + mov r0, #6 + lsl r0, r0, #8 + sub r1, r1, r0 + str r1, [r4, #0x1c] + ldr r0, [r4, #0x20] + lsl r0, r0, #8 + cmp r1, r0 + bgt _0226D818 + str r0, [r4, #0x1c] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D818: + ldr r2, [r4, #0xc] + ldr r1, [r4, #0x1c] + lsl r3, r2, #1 + ldr r2, _0226D850 ; =0x02270A1C + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 +_0226D82C: + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + pop {r3, r4, r5, pc} +_0226D836: + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02021E50 + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] +_0226D84A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0226D84C: .word 0x02270A34 +_0226D850: .word 0x02270A1C + thumb_func_end ov16_0226D654 + + thumb_func_start ov16_0226D854 +ov16_0226D854: ; 0x0226D854 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r1, #0x2c + ldrb r1, [r1] + cmp r1, #0 + beq _0226D86C + cmp r1, #1 + beq _0226D89A + cmp r1, #2 + beq _0226D8AA + b _0226D922 +_0226D86C: + add r1, sp, #0 + ldr r0, [r4, #0] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r0, [r1, r0] + mov r1, #0 + lsl r0, r0, #8 + str r0, [r4, #0x1c] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_02021E50 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D89A: + mov r0, #0x28 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226D8AA + sub r0, r0, #1 + add sp, #4 + strh r0, [r4, #0x28] + pop {r3, r4, pc} +_0226D8AA: + ldr r0, [r4, #8] + ldr r1, [r4, #0x1c] + cmp r0, #0 + bne _0226D8EA + mov r0, #0x12 + lsl r0, r0, #8 + sub r1, r1, r0 + str r1, [r4, #0x1c] + ldr r0, [r4, #0x20] + lsl r0, r0, #8 + cmp r1, r0 + bgt _0226D8D2 + str r0, [r4, #0x1c] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D8D2: + ldr r2, [r4, #0xc] + ldr r1, [r4, #0x1c] + lsl r3, r2, #1 + ldr r2, _0226D930 ; =0x02270A34 + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 + add sp, #4 + pop {r3, r4, pc} +_0226D8EA: + mov r0, #0x12 + lsl r0, r0, #8 + add r1, r1, r0 + str r1, [r4, #0x1c] + ldr r0, [r4, #0x20] + lsl r0, r0, #8 + cmp r1, r0 + blt _0226D90A + str r0, [r4, #0x1c] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D90A: + ldr r2, [r4, #0xc] + ldr r1, [r4, #0x1c] + lsl r3, r2, #1 + ldr r2, _0226D934 ; =0x02270A1C + lsl r1, r1, #8 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl sub_0200D4C4 + add sp, #4 + pop {r3, r4, pc} +_0226D922: + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] + add sp, #4 + pop {r3, r4, pc} + nop +_0226D930: .word 0x02270A34 +_0226D934: .word 0x02270A1C + thumb_func_end ov16_0226D854 + + thumb_func_start ov16_0226D938 +ov16_0226D938: ; 0x0226D938 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + cmp r0, #0 + beq _0226D94E + ldr r0, [r5, #4] + cmp r0, #0 + beq _0226D952 +_0226D94E: + bl sub_02022974 +_0226D952: + add r0, r5, #0 + mov r1, #0 + add r0, #0x2c + strb r1, [r0] + cmp r7, #0 + str r4, [r5, #0x18] + ldr r2, _0226D990 ; =0x000001F5 + bne _0226D97C + lsl r0, r6, #1 + add r0, r6, r0 + strh r0, [r5, #0x28] + add r0, r5, #0 + mov r1, #4 + add r0, #0x2f + strb r1, [r0] + ldr r0, _0226D994 ; =ov16_0226D99C + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226D97C: + add r0, r5, #0 + strh r1, [r5, #0x28] + add r0, #0x2f + strb r1, [r0] + ldr r0, _0226D998 ; =ov16_0226DAAC + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226D990: .word 0x000001F5 +_0226D994: .word ov16_0226D99C +_0226D998: .word ov16_0226DAAC + thumb_func_end ov16_0226D938 + + thumb_func_start ov16_0226D99C +ov16_0226D99C: ; 0x0226D99C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0x18] + add r5, r0, #0 + mov r0, #0 + ldrsh r0, [r1, r0] + cmp r0, #0 + bne _0226D9B4 + add r0, r4, #0 + mov r1, #0x64 + add r0, #0x2c + strb r1, [r0] +_0226D9B4: + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + cmp r0, #2 + bgt _0226D9CE + cmp r0, #0 + blt _0226DA8A + beq _0226D9D2 + cmp r0, #1 + beq _0226D9FE + cmp r0, #2 + beq _0226DA24 + b _0226DA8A +_0226D9CE: + cmp r0, #0x64 + b _0226DA8A +_0226D9D2: + add r1, sp, #0 + ldr r0, [r4, #0] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #2 + ldrsh r0, [r1, r0] + mov r1, #1 + lsl r0, r0, #8 + str r0, [r4, #0x1c] + ldr r0, [r4, #0] + bl sub_0200D810 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226D9FE: + add r0, r4, #0 + add r0, #0x2f + ldrb r0, [r0] + cmp r0, #0 + beq _0226DA16 + add r0, r4, #0 + add r0, #0x2f + ldrb r0, [r0] + add r4, #0x2f + sub r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0226DA16: + mov r0, #0x28 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226DA24 + sub r0, r0, #1 + strh r0, [r4, #0x28] + pop {r3, r4, r5, pc} +_0226DA24: + ldr r0, [r4, #8] + ldr r1, [r4, #0x1c] + cmp r0, #0 + bne _0226DA48 + mov r0, #3 + lsl r0, r0, #0xa + sub r1, r1, r0 + str r1, [r4, #0x1c] + ldr r2, [r4, #0xc] + lsl r1, r1, #8 + lsl r3, r2, #1 + ldr r2, _0226DAA0 ; =0x02270A34 + ldr r0, [r4, #0] + ldrsh r2, [r2, r3] + asr r1, r1, #0x10 + bl sub_0200D4C4 + b _0226DA62 +_0226DA48: + mov r0, #3 + lsl r0, r0, #0xa + add r1, r1, r0 + str r1, [r4, #0x1c] + ldr r2, [r4, #0xc] + lsl r1, r1, #8 + lsl r3, r2, #1 + ldr r2, _0226DAA4 ; =0x02270A1C + ldr r0, [r4, #0] + ldrsh r2, [r2, r3] + asr r1, r1, #0x10 + bl sub_0200D4C4 +_0226DA62: + ldr r1, [r4, #0x1c] + ldr r0, _0226DAA8 ; =0xFFFFF000 + cmp r1, r0 + blt _0226DA72 + mov r0, #0x11 + lsl r0, r0, #0xc + cmp r1, r0 + ble _0226DA80 +_0226DA72: + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] +_0226DA80: + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + pop {r3, r4, r5, pc} +_0226DA8A: + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0200D3EC + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0226DAA0: .word 0x02270A34 +_0226DAA4: .word 0x02270A1C +_0226DAA8: .word 0xFFFFF000 + thumb_func_end ov16_0226D99C + + thumb_func_start ov16_0226DAAC +ov16_0226DAAC: ; 0x0226DAAC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0x18] + add r5, r0, #0 + mov r0, #0 + ldrsh r0, [r1, r0] + cmp r0, #0 + bne _0226DAC4 + add r0, r4, #0 + mov r1, #0x64 + add r0, #0x2c + strb r1, [r0] +_0226DAC4: + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + cmp r0, #0 + beq _0226DAD6 + cmp r0, #1 + beq _0226DB00 + cmp r0, #0x64 + b _0226DAEC +_0226DAD6: + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200D810 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r4, #0x2c + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0226DAEC: + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0200D3EC + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] +_0226DB00: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DAAC + + thumb_func_start ov16_0226DB04 +ov16_0226DB04: ; 0x0226DB04 + cmp r0, #3 + bhi _0226DB1C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226DB14: ; jump table + .short _0226DB1C - _0226DB14 - 2 ; case 0 + .short _0226DB20 - _0226DB14 - 2 ; case 1 + .short _0226DB2C - _0226DB14 - 2 ; case 2 + .short _0226DB38 - _0226DB14 - 2 ; case 3 +_0226DB1C: + mov r0, #6 + bx lr +_0226DB20: + cmp r1, #0 + bne _0226DB28 + mov r0, #3 + bx lr +_0226DB28: + mov r0, #0 + bx lr +_0226DB2C: + cmp r1, #0 + bne _0226DB34 + mov r0, #5 + bx lr +_0226DB34: + mov r0, #2 + bx lr +_0226DB38: + cmp r1, #0 + bne _0226DB40 + mov r0, #4 + bx lr +_0226DB40: + mov r0, #1 + bx lr + thumb_func_end ov16_0226DB04 + + thumb_func_start ov16_0226DB44 +ov16_0226DB44: ; 0x0226DB44 + cmp r0, #6 + bhi _0226DB7A + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226DB54: ; jump table + .short _0226DB68 - _0226DB54 - 2 ; case 0 + .short _0226DB78 - _0226DB54 - 2 ; case 1 + .short _0226DB70 - _0226DB54 - 2 ; case 2 + .short _0226DB64 - _0226DB54 - 2 ; case 3 + .short _0226DB74 - _0226DB54 - 2 ; case 4 + .short _0226DB6C - _0226DB54 - 2 ; case 5 + .short _0226DB62 - _0226DB54 - 2 ; case 6 +_0226DB62: + bx lr +_0226DB64: + mov r0, #0 + bx lr +_0226DB68: + mov r0, #3 + bx lr +_0226DB6C: + mov r0, #2 + bx lr +_0226DB70: + mov r0, #5 + bx lr +_0226DB74: + mov r0, #1 + bx lr +_0226DB78: + mov r0, #4 +_0226DB7A: + bx lr + thumb_func_end ov16_0226DB44 + + .rodata + + + .global Unk_ov16_02270A1C +Unk_ov16_02270A1C: ; 0x02270A1C + .incbin "incbin/overlay16_rodata.bin", 0x27C0, 0x27C8 - 0x27C0 + + .global Unk_ov16_02270A24 +Unk_ov16_02270A24: ; 0x02270A24 + .incbin "incbin/overlay16_rodata.bin", 0x27C8, 0x27D0 - 0x27C8 + + .global Unk_ov16_02270A2C +Unk_ov16_02270A2C: ; 0x02270A2C + .incbin "incbin/overlay16_rodata.bin", 0x27D0, 0x27D8 - 0x27D0 + + .global Unk_ov16_02270A34 +Unk_ov16_02270A34: ; 0x02270A34 + .incbin "incbin/overlay16_rodata.bin", 0x27D8, 0x27E0 - 0x27D8 + + .global Unk_ov16_02270A3C +Unk_ov16_02270A3C: ; 0x02270A3C + .incbin "incbin/overlay16_rodata.bin", 0x27E0, 0x2814 - 0x27E0 + + .global Unk_ov16_02270A70 +Unk_ov16_02270A70: ; 0x02270A70 + .incbin "incbin/overlay16_rodata.bin", 0x2814, 0x34 + diff --git a/asm/ov16_0226DB7C.s b/asm/ov16_0226DB7C.s new file mode 100644 index 000000000..9912093d0 --- /dev/null +++ b/asm/ov16_0226DB7C.s @@ -0,0 +1,385 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0226DB7C +ov16_0226DB7C: ; 0x0226DB7C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x1b + add r1, r3, #0 + add r7, r2, #0 + bl sub_02006C24 + add r6, r0, #0 + str r6, [sp] + mov r0, #0x50 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, [sp, #0x34] + mov r1, #3 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xfa + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x38] + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xfb + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x3c] + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xfc + bl sub_0200CE54 + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0226DB7C + + thumb_func_start ov16_0226DBFC +ov16_0226DBFC: ; 0x0226DBFC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0200D070 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D080 + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200D090 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl sub_0200D0A0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DBFC + + thumb_func_start ov16_0226DC24 +ov16_0226DC24: ; 0x0226DC24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r3, #0 + mov ip, r2 + ldr r3, _0226DC9C ; =0x02270AA4 + add r6, r0, #0 + add r7, r1, #0 + add r2, sp, #4 + mov r4, #6 +_0226DC36: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r4, r4, #1 + bne _0226DC36 + ldr r0, [r3, #0] + mov r1, #0x18 + str r0, [r2, #0] + ldr r0, [sp, #0x50] + str r5, [sp, #0x18] + str r0, [sp, #0x1c] + ldr r0, [sp, #0x54] + str r0, [sp, #0x20] + ldr r0, [sp, #0x58] + str r0, [sp, #0x24] + ldr r0, [sp, #0x5c] + str r0, [sp, #0xc] + ldr r0, [sp, #0x60] + str r0, [sp, #0x30] + mov r0, ip + bl sub_02018144 + mov r1, #0 + mov r2, #0x18 + str r0, [sp] + bl sub_020C4CF4 + ldr r5, [sp] + mov r4, #0 +_0226DC6E: + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #4 + bl sub_0200CE6C + mov r1, #0 + stmia r5!, {r0} + bl sub_0200D3F4 + add r4, r4, #1 + cmp r4, #5 + blt _0226DC6E + ldr r0, _0226DCA0 ; =ov16_0226DE10 + ldr r1, [sp] + ldr r2, _0226DCA4 ; =0x00009C40 + bl sub_0200D9E8 + ldr r1, [sp] + str r0, [r1, #0x14] + add r0, r1, #0 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226DC9C: .word 0x02270AA4 +_0226DCA0: .word ov16_0226DE10 +_0226DCA4: .word 0x00009C40 + thumb_func_end ov16_0226DC24 + + thumb_func_start ov16_0226DCA8 +ov16_0226DCA8: ; 0x0226DCA8 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_0226DCB0: + ldr r0, [r5, #0] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _0226DCB0 + ldr r0, [r6, #0x14] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0226DCA8 + + thumb_func_start ov16_0226DCCC +ov16_0226DCCC: ; 0x0226DCCC + push {r4, r5, r6, lr} + add r5, r0, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r4, [sp, #0x24] + add r6, r3, #0 + ldr r0, [r5, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r2, [sp, #0x10] + lsl r1, r6, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x18] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #8] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #0xc] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r0, [r5, #0] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r5, #8] + mov r1, #2 + bl sub_0200D364 + ldr r0, [r5, #0xc] + mov r1, #3 + bl sub_0200D364 + mov r4, #0 + mov r6, #1 +_0226DD42: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0226DD42 + pop {r4, r5, r6, pc} + thumb_func_end ov16_0226DCCC + + thumb_func_start ov16_0226DD54 +ov16_0226DD54: ; 0x0226DD54 + push {r4, lr} + sub sp, #0x18 + ldr r4, [sp, #0x20] + str r4, [sp] + ldr r4, [sp, #0x24] + str r4, [sp, #4] + ldr r4, [sp, #0x28] + str r4, [sp, #8] + ldr r4, [sp, #0x2c] + str r4, [sp, #0xc] + ldr r4, [sp, #0x30] + str r4, [sp, #0x10] + mov r4, #3 + lsl r4, r4, #0x12 + str r4, [sp, #0x14] + bl ov16_0226DCCC + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DD54 + + thumb_func_start ov16_0226DD7C +ov16_0226DD7C: ; 0x0226DD7C + push {r3, r4, lr} + sub sp, #0x14 + add r4, r2, #0 + str r3, [sp] + ldr r2, [sp, #0x20] + str r1, [sp, #4] + str r2, [sp, #8] + str r4, [sp, #0xc] + str r2, [sp, #0x10] + add r2, r3, #0 + add r3, r4, #0 + bl ov16_0226DD54 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DD7C + + thumb_func_start ov16_0226DD9C +ov16_0226DD9C: ; 0x0226DD9C + push {r4, lr} + sub sp, #0x18 + add r4, r2, #0 + str r3, [sp] + ldr r2, [sp, #0x20] + str r1, [sp, #4] + str r2, [sp, #8] + str r4, [sp, #0xc] + str r2, [sp, #0x10] + ldr r2, [sp, #0x24] + str r2, [sp, #0x14] + add r2, r3, #0 + add r3, r4, #0 + bl ov16_0226DCCC + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DD9C + + thumb_func_start ov16_0226DDC0 +ov16_0226DDC0: ; 0x0226DDC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r3, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #0x10] + ldr r3, [sp, #0x10] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D500 + ldr r0, [r5, #0x10] + add r1, r4, #0 + bl sub_0200D364 + ldr r0, [r5, #0x10] + mov r1, #1 + bl sub_0200D3F4 + pop {r3, r4, r5, pc} + thumb_func_end ov16_0226DDC0 + + thumb_func_start ov16_0226DDE8 +ov16_0226DDE8: ; 0x0226DDE8 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_0226DDF0: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _0226DDF0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DDE8 + + thumb_func_start ov16_0226DE04 +ov16_0226DE04: ; 0x0226DE04 + ldr r3, _0226DE0C ; =sub_0200D3F4 + ldr r0, [r0, #0x10] + mov r1, #0 + bx r3 + ; .align 2, 0 +_0226DE0C: .word sub_0200D3F4 + thumb_func_end ov16_0226DE04 + + thumb_func_start ov16_0226DE10 +ov16_0226DE10: ; 0x0226DE10 + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r0, [r6, #0] + bl sub_0200D408 + cmp r0, #0 + beq _0226DE40 + mov r4, #0 + add r5, r6, #0 +_0226DE22: + ldr r0, [r5, #0] + bl sub_0200D330 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0226DE22 + ldr r0, [r6, #0x10] + bl sub_0200D408 + cmp r0, #1 + bne _0226DE40 + ldr r0, [r6, #0x10] + bl sub_0200D330 +_0226DE40: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DE10 + + .rodata + + + .global Unk_ov16_02270AA4 +Unk_ov16_02270AA4: ; 0x02270AA4 + .incbin "incbin/overlay16_rodata.bin", 0x2848, 0x34 + diff --git a/asm/ov16_0226DE44.s b/asm/ov16_0226DE44.s new file mode 100644 index 000000000..28c5b31d2 --- /dev/null +++ b/asm/ov16_0226DE44.s @@ -0,0 +1,421 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0226DE44 +ov16_0226DE44: ; 0x0226DE44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x52 + add r1, r2, #0 + add r7, r3, #0 + bl sub_02006C24 + add r6, r0, #0 + str r6, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, [sp, #0x34] + mov r1, #3 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xa + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #0x38] + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xc + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #0x3c] + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xd + bl sub_0200CE54 + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov16_0226DE44 + + thumb_func_start ov16_0226DEC4 +ov16_0226DEC4: ; 0x0226DEC4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0200D070 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D080 + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200D090 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl sub_0200D0A0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DEC4 + + thumb_func_start ov16_0226DEEC +ov16_0226DEEC: ; 0x0226DEEC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + ldr r5, _0226DF5C ; =0x02270AD8 + add r6, r3, #0 + add r7, r0, #0 + str r1, [sp] + add r4, sp, #4 + mov r3, #6 +_0226DEFC: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _0226DEFC + ldr r0, [r5, #0] + mov r1, #0x20 + str r0, [r4, #0] + ldr r0, [sp, #0x50] + str r6, [sp, #0x18] + str r0, [sp, #0x1c] + ldr r0, [sp, #0x54] + str r0, [sp, #0x20] + ldr r0, [sp, #0x58] + str r0, [sp, #0x24] + ldr r0, [sp, #0x5c] + str r0, [sp, #0xc] + ldr r0, [sp, #0x60] + str r0, [sp, #0x30] + add r0, r2, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r1, [sp] + add r0, r7, #0 + add r2, sp, #4 + bl sub_0200CE6C + mov r1, #0 + str r0, [r4, #0] + bl sub_0200D3F4 + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [r4, #0x14] + ldr r0, _0226DF60 ; =ov16_0226DFD8 + ldr r2, _0226DF64 ; =0x000003E7 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add r0, r4, #0 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226DF5C: .word 0x02270AD8 +_0226DF60: .word ov16_0226DFD8 +_0226DF64: .word 0x000003E7 + thumb_func_end ov16_0226DEEC + + thumb_func_start ov16_0226DF68 +ov16_0226DF68: ; 0x0226DF68 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0200D0F4 + ldr r0, [r4, #4] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov16_0226DF68 + + thumb_func_start ov16_0226DF80 +ov16_0226DF80: ; 0x0226DF80 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov16_0226E13C + str r7, [r5, #8] + str r4, [r5, #0xc] + str r6, [r5, #0x14] + lsl r1, r7, #0x10 + lsl r2, r4, #0x10 + ldr r0, [r5, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r6, #0 + bl sub_0200D500 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_0200D3F4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov16_0226DF80 + + thumb_func_start ov16_0226DFB0 +ov16_0226DFB0: ; 0x0226DFB0 + push {r3, lr} + mov r3, #3 + lsl r3, r3, #0x12 + bl ov16_0226DF80 + pop {r3, pc} + thumb_func_end ov16_0226DFB0 + + thumb_func_start ov16_0226DFBC +ov16_0226DFBC: ; 0x0226DFBC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r4, #0 + bl ov16_0226E13C + pop {r4, pc} + thumb_func_end ov16_0226DFBC + + thumb_func_start ov16_0226DFD0 +ov16_0226DFD0: ; 0x0226DFD0 + strh r1, [r0, #0x18] + bx lr + thumb_func_end ov16_0226DFD0 + + thumb_func_start ov16_0226DFD4 +ov16_0226DFD4: ; 0x0226DFD4 + ldrb r0, [r0, #0x1b] + bx lr + thumb_func_end ov16_0226DFD4 + + thumb_func_start ov16_0226DFD8 +ov16_0226DFD8: ; 0x0226DFD8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldrb r0, [r4, #0x1b] + cmp r0, #1 + bne _0226DFE6 + mov r0, #0 + strb r0, [r4, #0x1b] +_0226DFE6: + mov r0, #0x18 + ldrsh r1, [r4, r0] + cmp r1, #0 + ble _0226DFFC + sub r1, r1, #1 + strh r1, [r4, #0x18] + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _0226DFFC + mov r0, #1 + strb r0, [r4, #0x1a] +_0226DFFC: + ldr r0, [r4, #0] + bl sub_0200D408 + cmp r0, #0 + bne _0226E008 + b _0226E134 +_0226E008: + ldrb r0, [r4, #0x1c] + cmp r0, #0 + bne _0226E08A + mov r1, #0xfa + ldr r2, [r4, #0x10] + lsl r1, r1, #2 + add r2, r2, r1 + add r0, r4, #0 + ldr r1, _0226E138 ; =0x00004650 + add r0, #0x10 + str r2, [r4, #0x10] + cmp r2, r1 + blt _0226E036 + ldr r2, [r0, #0] + sub r1, r2, r1 + str r1, [r0, #0] + ldrb r0, [r4, #0x1a] + cmp r0, #1 + bne _0226E036 + mov r0, #1 + strb r0, [r4, #0x1c] + mov r0, #0 + strb r0, [r4, #0x1a] +_0226E036: + ldrb r0, [r4, #0x1c] + cmp r0, #0 + bne _0226E08A + ldr r0, [r4, #0x10] + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + mov r2, #0xe + asr r1, r0, #0x1f + lsl r2, r2, #0xc + mov r3, #0 + bl sub_020E1F1C + add r5, r1, #0 + ldr r1, [r4, #8] + mov r2, #2 + add r6, r0, #0 + lsl r1, r1, #0x10 + mov r7, #0 + lsl r2, r2, #0xa + asr r1, r1, #0x10 + add r2, r6, r2 + adc r5, r7 + lsl r5, r5, #0x14 + lsr r2, r2, #0xc + orr r2, r5 + asr r5, r2, #0xb + lsr r5, r5, #0x14 + add r5, r2, r5 + ldr r3, [r4, #0xc] + asr r2, r5, #0xc + sub r2, r3, r2 + lsl r2, r2, #0x10 + ldr r0, [r4, #0] + ldr r3, [r4, #0x14] + asr r2, r2, #0x10 + bl sub_0200D500 +_0226E08A: + ldrb r0, [r4, #0x1c] + cmp r0, #1 + bne _0226E12E + ldrb r0, [r4, #0x1d] + cmp r0, #3 + bhi _0226E12E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226E0A2: ; jump table + .short _0226E0AA - _0226E0A2 - 2 ; case 0 + .short _0226E0C2 - _0226E0A2 - 2 ; case 1 + .short _0226E0E4 - _0226E0A2 - 2 ; case 2 + .short _0226E112 - _0226E0A2 - 2 ; case 3 +_0226E0AA: + ldrb r0, [r4, #0x1e] + add r0, r0, #1 + strb r0, [r4, #0x1e] + ldrb r0, [r4, #0x1e] + cmp r0, #3 + bls _0226E12E + mov r0, #0 + strb r0, [r4, #0x1e] + ldrb r0, [r4, #0x1d] + add r0, r0, #1 + strb r0, [r4, #0x1d] + b _0226E12E +_0226E0C2: + ldr r2, [r4, #0xc] + ldr r1, [r4, #8] + add r2, #8 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, #0] + ldr r3, [r4, #0x14] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D500 + mov r0, #1 + strb r0, [r4, #0x1b] + ldrb r0, [r4, #0x1d] + add r0, r0, #1 + strb r0, [r4, #0x1d] + b _0226E12E +_0226E0E4: + ldrb r0, [r4, #0x1e] + add r0, r0, #1 + strb r0, [r4, #0x1e] + ldrb r0, [r4, #0x1e] + cmp r0, #2 + bls _0226E12E + ldr r2, [r4, #0xc] + ldr r1, [r4, #8] + add r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, #0] + ldr r3, [r4, #0x14] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D500 + mov r0, #0 + strb r0, [r4, #0x1e] + ldrb r0, [r4, #0x1d] + add r0, r0, #1 + strb r0, [r4, #0x1d] + b _0226E12E +_0226E112: + ldrb r0, [r4, #0x1e] + add r0, r0, #1 + strb r0, [r4, #0x1e] + ldrb r0, [r4, #0x1e] + cmp r0, #2 + bls _0226E12E + add r0, r4, #0 + bl ov16_0226DFBC + mov r0, #0 + strb r0, [r4, #0x1e] + ldrb r0, [r4, #0x1d] + add r0, r0, #1 + strb r0, [r4, #0x1d] +_0226E12E: + ldr r0, [r4, #0] + bl sub_0200D330 +_0226E134: + pop {r3, r4, r5, r6, r7, pc} + nop +_0226E138: .word 0x00004650 + thumb_func_end ov16_0226DFD8 + + thumb_func_start ov16_0226E13C +ov16_0226E13C: ; 0x0226E13C + mov r1, #0 + str r1, [r0, #0x10] + strb r1, [r0, #0x1c] + strb r1, [r0, #0x1d] + strb r1, [r0, #0x1e] + bx lr + thumb_func_end ov16_0226E13C + + .rodata + + + .global Unk_ov16_02270AD8 +Unk_ov16_02270AD8: ; 0x02270AD8 + .incbin "incbin/overlay16_rodata.bin", 0x287C, 0x34 + diff --git a/asm/ov16_0226E148.s b/asm/ov16_0226E148.s new file mode 100644 index 000000000..5944202a4 --- /dev/null +++ b/asm/ov16_0226E148.s @@ -0,0 +1,144 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov16_0226E148 +ov16_0226E148: ; 0x0226E148 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #5 + mov r1, #8 + bl sub_02018144 + mov r1, #0 + mov r2, #8 + add r4, r0, #0 + bl sub_020C4CF4 + mov r2, #0xfa + ldr r0, _0226E170 ; =ov16_0226E188 + add r1, r4, #0 + lsl r2, r2, #2 + str r5, [r4, #0] + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_0226E170: .word ov16_0226E188 + thumb_func_end ov16_0226E148 + + thumb_func_start ov16_0226E174 +ov16_0226E174: ; 0x0226E174 + push {r4, lr} + add r4, r0, #0 + bl sub_0201CED0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov16_0226E174 + + thumb_func_start ov16_0226E188 +ov16_0226E188: ; 0x0226E188 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + ldr r0, [r4, #0] + bl ov16_0223E02C + mov r1, #4 + ldrsh r1, [r4, r1] + add r5, r0, #0 + cmp r1, #4 + bhi _0226E252 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226E1AA: ; jump table + .short _0226E1B4 - _0226E1AA - 2 ; case 0 + .short _0226E1FA - _0226E1AA - 2 ; case 1 + .short _0226E20E - _0226E1AA - 2 ; case 2 + .short _0226E234 - _0226E1AA - 2 ; case 3 + .short _0226E252 - _0226E1AA - 2 ; case 4 +_0226E1B4: + cmp r5, #0 + bne _0226E1BC + bl sub_02022974 +_0226E1BC: + mov r0, #7 + mov r1, #5 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #0x1b + mov r1, #5 + bl sub_02006C24 + add r7, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #0x12 + bl ov16_02268C04 + add r0, r6, #0 + bl sub_02006CA8 + add r0, r7, #0 + bl sub_02006CA8 + mov r0, #4 + ldrsh r0, [r4, r0] + add sp, #8 + add r0, r0, #1 + strh r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226E1FA: + bl ov16_02269348 + cmp r0, #1 + bne _0226E252 + mov r0, #4 + ldrsh r0, [r4, r0] + add sp, #8 + add r0, r0, #1 + strh r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226E20E: + ldr r0, [r4, #0] + bl ov16_0223F7A4 + cmp r0, #1 + bne _0226E252 + add r0, r5, #0 + bl ov16_0226925C + cmp r0, #1 + bne _0226E252 + ldr r0, _0226E258 ; =0x000005DD + bl sub_02005748 + mov r0, #4 + ldrsh r0, [r4, r0] + add sp, #8 + add r0, r0, #1 + strh r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_0226E234: + mov r0, #6 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #6] + ldrsh r0, [r4, r0] + cmp r0, #8 + ble _0226E252 + ldr r0, [r4, #0] + mov r1, #0 + bl ov16_0223F720 + mov r0, #4 + ldrsh r0, [r4, r0] + add r0, r0, #1 + strh r0, [r4, #4] +_0226E252: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226E258: .word 0x000005DD + thumb_func_end ov16_0226E188 \ No newline at end of file diff --git a/asm/ov17_0223B140.s b/asm/ov17_0223B140.s new file mode 100644 index 000000000..3f5c2a4ec --- /dev/null +++ b/asm/ov17_0223B140.s @@ -0,0 +1,3273 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0223B140 +ov17_0223B140: ; 0x0223B140 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r1, #1 + lsl r1, r1, #0x1a + ldr r0, [r1, #0] + ldr r2, _0223B404 ; =0xFFFFE0FF + and r0, r2 + str r0, [r1, #0] + ldr r0, _0223B408 ; =0x04001000 + ldr r3, [r0, #0] + and r2, r3 + str r2, [r0, #0] + ldr r3, [r1, #0] + ldr r2, _0223B40C ; =0xFFFF1FFF + and r3, r2 + str r3, [r1, #0] + ldr r3, [r0, #0] + add r1, #0x50 + and r2, r3 + str r2, [r0, #0] + mov r2, #0 + strh r2, [r1] + add r0, #0x50 + strh r2, [r0] + mov r2, #7 + mov r0, #3 + mov r1, #0x15 + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, _0223B410 ; =0x00001658 + add r0, r5, #0 + mov r2, #0x15 + bl sub_0200681C + ldr r2, _0223B410 ; =0x00001658 + mov r1, #0 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x15 + bl ov17_0223F140 + str r0, [r4, #8] + add r0, r5, #0 + bl sub_02006840 + mov r1, #0x5b + str r0, [r4, #0] + lsl r1, r1, #2 + str r4, [r0, r1] + ldr r2, [r4, #0] + mov r3, #2 + add r0, r1, #4 + strb r3, [r2, r0] + ldr r0, [r4, #0] + str r0, [r4, #0xc] + add r0, r4, #0 + bl ov17_0223B8C4 + mov r0, #0x15 + bl sub_02002F38 + str r0, [r4, #0x5c] + mov r1, #1 + bl sub_02003858 + mov r2, #2 + ldr r0, [r4, #0x5c] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #0x15 + bl sub_02002F70 + mov r1, #1 + ldr r0, [r4, #0x5c] + lsl r2, r1, #9 + mov r3, #0x15 + bl sub_02002F70 + mov r2, #7 + ldr r0, [r4, #0x5c] + mov r1, #2 + lsl r2, r2, #6 + mov r3, #0x15 + bl sub_02002F70 + mov r2, #2 + ldr r0, [r4, #0x5c] + mov r1, #3 + lsl r2, r2, #8 + mov r3, #0x15 + bl sub_02002F70 + mov r0, #0x15 + bl sub_02018340 + str r0, [r4, #0x30] + mov r0, #0x40 + mov r1, #0x15 + bl sub_0201DBEC + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + mov r2, #0x23 + add r1, r4, #0 + lsl r2, r2, #4 + ldr r0, [r4, #0] + add r1, #0xc + add r2, r4, r2 + bl ov17_0223F88C + ldr r1, _0223B414 ; =0x0000081C + str r0, [r4, r1] + ldr r0, [r4, #0x30] + bl ov17_0223B728 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r0, #2 + mov r1, #0x15 + bl sub_02002BB8 + mov r0, #0x15 + bl sub_0200C6E4 + ldr r1, _0223B418 ; =0x02252DC8 + ldr r2, _0223B41C ; =0x02252D9C + mov r3, #0x20 + str r0, [r4, #0x24] + bl sub_0200C73C + ldr r1, _0223B420 ; =0x00100010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + ldr r0, [r4, #0x24] + bl sub_0200C704 + str r0, [r4, #0x28] + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x28] + mov r2, #0x80 + bl sub_0200C7C0 + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x28] + ldr r2, _0223B424 ; =0x02252DB0 + bl sub_0200CB30 + ldr r0, [r4, #0x24] + bl sub_0200C738 + mov r2, #0x11 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C + mov r0, #0x15 + bl sub_0200762C + str r0, [r4, #0x10] + bl ov17_0223B884 + mov r0, #0x15 + bl ov12_0221FCDC + mov r1, #1 + str r0, [r4, #0x2c] + bl ov12_0221FDC0 + mov r0, #0 + mov r1, #0x1a + mov r2, #0xcc + mov r3, #0x15 + bl sub_0200B144 + str r0, [r4, #0x44] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xcd + mov r3, #0x15 + bl sub_0200B144 + str r0, [r4, #0x48] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xd2 + mov r3, #0x15 + bl sub_0200B144 + str r0, [r4, #0x4c] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xd3 + mov r3, #0x15 + bl sub_0200B144 + str r0, [r4, #0x50] + mov r0, #8 + mov r1, #0x15 + bl sub_02012744 + str r0, [r4, #0x60] + mov r0, #0x15 + bl sub_0200B358 + str r0, [r4, #0x54] + mov r0, #0x1e + lsl r0, r0, #4 + mov r1, #0x15 + bl sub_02023790 + str r0, [r4, #0x58] + mov r0, #0x2d + mov r1, #0x15 + bl sub_02006C24 + add r5, r0, #0 + mov r0, #0x2e + mov r1, #0x15 + bl sub_02006C24 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov17_0223BBA8 + add r0, r4, #0 + add r1, r5, #0 + bl ov17_0223BCE0 + add r0, r4, #0 + bl ov17_0223B858 + add r0, r4, #0 + bl ov17_02241428 + add r0, r4, #0 + add r1, r6, #0 + bl ov17_0223B8F8 + add r0, r4, #0 + add r1, r6, #0 + bl ov17_0223BA10 + add r0, r5, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + ldr r7, _0223B428 ; =0x00000123 + mov r6, #0 + add r5, sp, #0xc +_0223B364: + ldr r1, [r4, #0] + mov r2, #0 + ldrb r0, [r1, r7] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + add r1, #0x36 + bl sub_02074470 + strh r0, [r5] + add r6, r6, #1 + add r5, r5, #2 + cmp r6, #4 + blt _0223B364 + ldr r0, _0223B414 ; =0x0000081C + add r1, sp, #0xc + ldr r0, [r4, r0] + bl ov17_02240A80 + ldr r0, _0223B414 ; =0x0000081C + mov r1, #0 + ldr r0, [r4, r0] + mov r2, #1 + add r3, r1, #0 + bl ov17_0223F9C4 + add r0, r4, #0 + add r0, #0xc + bl ov17_022415E4 + bl sub_02039734 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0x15 + str r1, [sp, #8] + mov r1, #0x1f + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, _0223B42C ; =ov17_0223B6F0 + ldr r2, _0223B430 ; =0x0000EA60 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r0, _0223B434 ; =0x00000824 + mov r1, #1 + strb r1, [r4, r0] + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r1, _0223B438 ; =0x0000046F + mov r0, #6 + mov r2, #1 + bl sub_02004550 + ldr r1, [r4, #0] + ldr r0, _0223B43C ; =0x00000171 + ldrb r0, [r1, r0] + bl sub_020959F4 + ldr r0, _0223B440 ; =ov17_0223B6BC + add r1, r4, #0 + bl sub_02017798 + mov r0, #1 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223B404: .word 0xFFFFE0FF +_0223B408: .word 0x04001000 +_0223B40C: .word 0xFFFF1FFF +_0223B410: .word 0x00001658 +_0223B414: .word 0x0000081C +_0223B418: .word 0x02252DC8 +_0223B41C: .word 0x02252D9C +_0223B420: .word 0x00100010 +_0223B424: .word 0x02252DB0 +_0223B428: .word 0x00000123 +_0223B42C: .word ov17_0223B6F0 +_0223B430: .word 0x0000EA60 +_0223B434: .word 0x00000824 +_0223B438: .word 0x0000046F +_0223B43C: .word 0x00000171 +_0223B440: .word ov17_0223B6BC + thumb_func_end ov17_0223B140 + + thumb_func_start ov17_0223B444 +ov17_0223B444: ; 0x0223B444 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02094E98 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223B466 + cmp r0, #1 + beq _0223B474 + cmp r0, #2 + beq _0223B54E + b _0223B564 +_0223B466: + bl sub_0200F2AC + cmp r0, #1 + bne _0223B564 + mov r0, #1 + str r0, [r5, #0] + b _0223B564 +_0223B474: + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #1 + bne _0223B4EE + ldr r2, _0223B56C ; =0x00000822 + ldr r1, _0223B570 ; =0x00001648 + ldrh r2, [r4, r2] + add r0, r4, #0 + add r1, r4, r1 + lsl r3, r2, #2 + ldr r2, _0223B574 ; =0x02252E10 + ldr r2, [r2, r3] + blx r2 + sub r1, r0, #1 + cmp r1, #1 + bhi _0223B4B8 + cmp r0, #1 + bne _0223B4A2 + ldr r0, _0223B56C ; =0x00000822 + ldrh r1, [r4, r0] + add r1, r1, #1 + b _0223B4A8 +_0223B4A2: + ldr r0, _0223B578 ; =0x0000164A + ldrh r1, [r4, r0] + ldr r0, _0223B56C ; =0x00000822 +_0223B4A8: + strh r1, [r4, r0] + ldr r0, _0223B570 ; =0x00001648 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + b _0223B4EE +_0223B4B8: + cmp r0, #3 + bne _0223B4EE + ldr r0, _0223B57C ; =0x00001650 + ldrb r1, [r4, r0] + cmp r1, #1 + bne _0223B4EE + mov r1, #2 + sub r0, #8 + str r1, [r5, #0] + add r0, r4, r0 + mov r1, #0 + mov r2, #8 + bl sub_020C4CF4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x15 + mov r1, #0x20 + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + b _0223B564 +_0223B4EE: + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov17_0224F35C + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r4, #0 + bl ov17_0224F3D8 + ldr r0, _0223B57C ; =0x00001650 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223B564 + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov17_0224F3D0 + cmp r0, #0 + bne _0223B564 + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #0 + bne _0223B564 + mov r0, #2 + str r0, [r5, #0] + ldr r0, _0223B570 ; =0x00001648 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x15 + mov r1, #0x20 + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + b _0223B564 +_0223B54E: + ldr r0, _0223B57C ; =0x00001650 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223B564 + bl sub_0200F2AC + cmp r0, #1 + bne _0223B564 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0223B564: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223B56C: .word 0x00000822 +_0223B570: .word 0x00001648 +_0223B574: .word 0x02252E10 +_0223B578: .word 0x0000164A +_0223B57C: .word 0x00001650 + thumb_func_end ov17_0223B444 + + thumb_func_start ov17_0223B580 +ov17_0223B580: ; 0x0223B580 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + bl sub_020141E4 + ldr r0, [r4, #0x2c] + bl ov12_0221FDF4 + add r0, r4, #0 + bl ov17_0223B9A4 + add r0, r4, #0 + bl ov17_0223BAD0 + add r0, r4, #0 + bl ov17_0223BCDC + add r0, r4, #0 + bl ov17_0223BCE4 + add r0, r4, #0 + add r0, #0x34 + bl sub_0201A8FC + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0x30] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0x30] + bl ov17_0223F864 + ldr r0, _0223B6AC ; =0x0000081C + ldr r0, [r4, r0] + bl ov17_0223F960 + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x28] + bl sub_0200D0B0 + ldr r0, [r4, #0x24] + bl sub_0200C8D4 + bl sub_0201DC3C + add r0, r4, #0 + add r0, #0xc + bl ov17_022416E4 + ldr r0, [r4, #0x10] + bl sub_02007B6C + mov r0, #2 + bl sub_02002C60 + ldr r0, [r4, #0x60] + bl sub_020127BC + ldr r0, [r4, #0x5c] + mov r1, #0 + bl sub_02002FA0 + ldr r0, [r4, #0x5c] + mov r1, #1 + bl sub_02002FA0 + ldr r0, [r4, #0x5c] + mov r1, #2 + bl sub_02002FA0 + ldr r0, [r4, #0x5c] + mov r1, #3 + bl sub_02002FA0 + ldr r0, [r4, #0x5c] + bl sub_02002F54 + ldr r0, [r4, #0x58] + bl sub_020237BC + ldr r0, [r4, #0x54] + bl sub_0200B3F0 + ldr r0, [r4, #0x44] + bl sub_0200B190 + ldr r0, [r4, #0x48] + bl sub_0200B190 + ldr r0, [r4, #0x4c] + bl sub_0200B190 + ldr r0, [r4, #0x50] + bl sub_0200B190 + ldr r0, [r4, #0x30] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, [r4, #8] + bl ov17_0223F1E0 + bl sub_0201E530 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + mov r0, #0x15 + bl sub_0201807C + bl sub_02095A24 + bl sub_02039794 + ldr r0, _0223B6B0 ; =0x0000000B + bl sub_02006514 + ldr r0, _0223B6B4 ; =0x0000000C + bl sub_02006514 + ldr r0, _0223B6B8 ; =0x00000016 + bl sub_02006514 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223B6AC: .word 0x0000081C +_0223B6B0: .word 0x0000000B +_0223B6B4: .word 0x0000000C +_0223B6B8: .word 0x00000016 + thumb_func_end ov17_0223B580 + + thumb_func_start ov17_0223B6BC +ov17_0223B6BC: ; 0x0223B6BC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl sub_02008A94 + bl sub_0201DCAC + bl sub_0200C800 + ldr r0, [r4, #0x5c] + bl sub_02003694 + ldr r0, [r4, #0x30] + bl sub_0201C2B8 + ldr r3, _0223B6E8 ; =0x027E0000 + ldr r1, _0223B6EC ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + ; .align 2, 0 +_0223B6E8: .word 0x027E0000 +_0223B6EC: .word 0x00003FF8 + thumb_func_end ov17_0223B6BC + + thumb_func_start ov17_0223B6F0 +ov17_0223B6F0: ; 0x0223B6F0 + push {r4, lr} + ldr r0, _0223B720 ; =0x00000824 + add r4, r1, #0 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223B716 + ldr r0, [r4, #0x10] + bl sub_02007768 + bl ov11_0221F8F0 + ldr r0, [r4, #0x28] + bl sub_0200C7EC + bl sub_0200C808 + ldr r0, _0223B724 ; =0x04000540 + mov r1, #1 + str r1, [r0, #0] +_0223B716: + ldr r1, [r4, #0x30] + mov r0, #0x15 + bl sub_02038A1C + pop {r4, pc} + ; .align 2, 0 +_0223B720: .word 0x00000824 +_0223B724: .word 0x04000540 + thumb_func_end ov17_0223B6F0 + + thumb_func_start ov17_0223B728 +ov17_0223B728: ; 0x0223B728 + push {r4, r5, lr} + sub sp, #0x8c + add r4, r0, #0 + bl sub_0201FF00 + ldr r5, _0223B848 ; =0x02252DE8 + add r3, sp, #0x10 + mov r2, #5 +_0223B738: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223B738 + add r0, sp, #0x10 + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + ldr r5, _0223B84C ; =0x02252D8C + add r3, sp, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223B850 ; =0x02252E50 + add r3, sp, #0x38 + mov r2, #0xa +_0223B798: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223B798 + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + add r2, sp, #0x38 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #1 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + add r2, sp, #0x54 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #3 + add r2, sp, #0x70 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r1, _0223B854 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #2 + orr r0, r2 + strh r0, [r1] + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + add r0, r4, #0 + bl ov17_0223F80C + add sp, #0x8c + pop {r4, r5, pc} + ; .align 2, 0 +_0223B848: .word 0x02252DE8 +_0223B84C: .word 0x02252D8C +_0223B850: .word 0x02252E50 +_0223B854: .word 0x04000008 + thumb_func_end ov17_0223B728 + + thumb_func_start ov17_0223B858 +ov17_0223B858: ; 0x0223B858 + push {lr} + sub sp, #0x14 + add r1, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x14 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #3 + lsl r0, r0, #8 + str r0, [sp, #0x10] + ldr r0, [r1, #0x30] + add r1, #0x34 + mov r2, #1 + mov r3, #0xb + bl sub_0201A7E8 + add sp, #0x14 + pop {pc} + thumb_func_end ov17_0223B858 + + thumb_func_start ov17_0223B884 +ov17_0223B884: ; 0x0223B884 + push {r3, r4, r5, lr} + ldr r3, _0223B8BC ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _0223B8C0 ; =0x02100DF4 + mov r1, #0 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + add r2, r1, #0 + blx r3 + add r5, r0, #0 + cmp r4, #0 + bne _0223B8AC + bl sub_02022974 +_0223B8AC: + cmp r5, #0 + bne _0223B8B4 + bl sub_02022974 +_0223B8B4: + bl sub_02014000 + pop {r3, r4, r5, pc} + nop +_0223B8BC: .word 0x02100DEC +_0223B8C0: .word 0x02100DF4 + thumb_func_end ov17_0223B884 + + thumb_func_start ov17_0223B8C4 +ov17_0223B8C4: ; 0x0223B8C4 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0223B8D2 + bl sub_02022974 +_0223B8D2: + ldr r1, _0223B8F4 ; =0x00000172 + mov r0, #0 + add r2, r1, #0 + add r2, #0xbf +_0223B8DA: + ldr r3, [r4, #0] + add r3, r3, r0 + ldrb r5, [r3, r1] + add r3, r4, r0 + add r0, r0, #1 + strb r5, [r3, r2] + cmp r0, #4 + blt _0223B8DA + add r0, r4, #0 + bl ov17_02243C28 + pop {r3, r4, r5, pc} + nop +_0223B8F4: .word 0x00000172 + thumb_func_end ov17_0223B8C4 + + thumb_func_start ov17_0223B8F8 +ov17_0223B8F8: ; 0x0223B8F8 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #6 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0223B998 ; =0x000080E9 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [r5, #0x5c] + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + bl sub_0200CDC4 + str r4, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _0223B99C ; =0x000080ED + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [r5, #0x5c] + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + bl sub_0200CDC4 + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + add r2, r4, #0 + bl ov17_02243040 + add r0, r5, #0 + bl ov17_02242FA4 + add r0, r5, #0 + ldr r1, [r5, #0] + add r0, #0xc + add r2, r4, #0 + bl ov17_02241928 + add r0, r5, #0 + ldr r2, [r5, #0] + ldr r1, _0223B9A0 ; =0x0000011E + add r0, #0xc + ldrb r1, [r2, r1] + add r2, r4, #0 + bl ov17_02241D94 + ldr r0, [r5, #0x5c] + ldr r1, [r5, #0x24] + ldr r2, [r5, #0x28] + add r3, r4, #0 + bl ov17_022419AC + add r0, r5, #0 + add r0, #0xc + bl ov17_02241A24 + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + add r2, r4, #0 + bl ov17_02241E58 + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + add r2, r4, #0 + bl ov17_02242154 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223B998: .word 0x000080E9 +_0223B99C: .word 0x000080ED +_0223B9A0: .word 0x0000011E + thumb_func_end ov17_0223B8F8 + + thumb_func_start ov17_0223B9A4 +ov17_0223B9A4: ; 0x0223B9A4 + push {r4, lr} + add r4, r0, #0 + add r0, #0xc + bl ov17_02241E24 + add r0, r4, #0 + add r0, #0xc + bl ov17_0224197C + add r0, r4, #0 + bl ov17_02242FC0 + add r0, r4, #0 + add r0, #0xc + bl ov17_022430F8 + ldr r0, [r4, #0x28] + bl ov17_0224308C + ldr r0, [r4, #0x28] + ldr r1, _0223BA08 ; =0x000080E9 + bl sub_0200D080 + ldr r0, [r4, #0x28] + ldr r1, _0223BA0C ; =0x000080ED + bl sub_0200D080 + add r0, r4, #0 + add r0, #0xc + bl ov17_02241A64 + ldr r0, [r4, #0x28] + bl ov17_02241A00 + ldr r0, [r4, #0x28] + bl ov17_02241EA4 + add r0, r4, #0 + add r0, #0xc + bl ov17_02241EF0 + ldr r0, [r4, #0x28] + bl ov17_022421E0 + add r4, #0xc + add r0, r4, #0 + bl ov17_02242248 + pop {r4, pc} + nop +_0223BA08: .word 0x000080E9 +_0223BA0C: .word 0x000080ED + thumb_func_end ov17_0223B9A4 + + thumb_func_start ov17_0223BA10 +ov17_0223BA10: ; 0x0223BA10 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0223BABC ; =0x000080EF + str r0, [sp, #0x14] + ldr r0, [r5, #0x5c] + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + bl sub_0200CDC4 + str r4, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0223BAC0 ; =0x000080F0 + mov r1, #3 + str r0, [sp, #0x14] + ldr r0, [r5, #0x5c] + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + bl sub_0200CDC4 + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + add r2, r4, #0 + bl ov17_0224131C + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + add r2, r4, #0 + bl ov17_02241270 + ldr r2, _0223BAC4 ; =0x000080F4 + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + add r3, r2, #0 + bl ov17_0224F0F0 + ldr r7, _0223BAC8 ; =0x000080F6 + ldr r6, _0223BACC ; =0x00000123 + mov r4, #0 +_0223BA80: + ldr r1, [r5, #0] + mov r2, #0 + ldrb r0, [r1, r6] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + add r1, #0x36 + bl sub_02074470 + cmp r0, #0 + beq _0223BAA0 + mov r1, #0xb + bl sub_020790C4 + add r3, r0, #0 + b _0223BAA2 +_0223BAA0: + mov r3, #0 +_0223BAA2: + add r0, r4, r7 + str r0, [sp] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0x28] + mov r2, #2 + bl ov17_0224F0BC + add r4, r4, #1 + cmp r4, #4 + blt _0223BA80 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BABC: .word 0x000080EF +_0223BAC0: .word 0x000080F0 +_0223BAC4: .word 0x000080F4 +_0223BAC8: .word 0x000080F6 +_0223BACC: .word 0x00000123 + thumb_func_end ov17_0223BA10 + + thumb_func_start ov17_0223BAD0 +ov17_0223BAD0: ; 0x0223BAD0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x28] + ldr r1, _0223BB08 ; =0x000080EF + bl sub_0200D080 + ldr r0, [r5, #0x28] + bl ov17_022413B4 + ldr r0, [r5, #0x28] + bl ov17_022412F0 + ldr r1, _0223BB0C ; =0x000080F4 + ldr r0, [r5, #0x28] + add r2, r1, #0 + bl ov17_0224F140 + ldr r6, _0223BB10 ; =0x000080F6 + mov r4, #0 +_0223BAF6: + ldr r0, [r5, #0x28] + add r1, r4, r6 + bl ov17_0224F138 + add r4, r4, #1 + cmp r4, #4 + blt _0223BAF6 + pop {r4, r5, r6, pc} + nop +_0223BB08: .word 0x000080EF +_0223BB0C: .word 0x000080F4 +_0223BB10: .word 0x000080F6 + thumb_func_end ov17_0223BAD0 + + thumb_func_start ov17_0223BB14 +ov17_0223BB14: ; 0x0223BB14 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #0 + bne _0223BB7E + mov r0, #0 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xe + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + mov r0, #0x2d + mov r1, #3 + mov r3, #2 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + mov r0, #0x2d + mov r1, #5 + mov r3, #2 + bl sub_02006E60 + mov r0, #1 + add r1, r0, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + add r0, r5, #0 + bl ov17_02241428 + cmp r4, #1 + bne _0223BBA2 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x10 + pop {r3, r4, r5, pc} +_0223BB7E: + mov r0, #2 + lsl r1, r0, #0xd + mov r2, #0 + mov r3, #0x15 + bl sub_02019690 + ldr r0, [r5, #0x30] + mov r1, #2 + bl sub_02019EBC + mov r0, #1 + mov r1, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 +_0223BBA2: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0223BB14 + + thumb_func_start ov17_0223BBA8 +ov17_0223BBA8: ; 0x0223BBA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + add r4, r1, #0 + str r0, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #2 + mov r3, #3 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #4 + bl sub_0200710C + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov17_0223BB14 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #0x5c] + mov r1, #0x2d + mov r2, #0x1e + mov r3, #0x15 + bl sub_02003050 + mov r0, #0x15 + mov r1, #0x20 + bl sub_02018144 + add r7, r0, #0 + mov r0, #0x15 + mov r1, #0x20 + bl sub_02018144 + str r0, [sp, #0x10] + ldr r0, [r5, #0x5c] + mov r1, #0 + bl sub_02003164 + add r4, r0, #0 + ldr r0, [r5, #0x5c] + mov r1, #0 + bl sub_0200316C + str r0, [sp, #0x14] + ldr r0, _0223BCD4 ; =0x022536B4 + add r1, r7, #0 + ldrb r0, [r0] + mov r2, #0x20 + lsl r6, r0, #5 + add r0, r4, r6 + bl sub_020C4B18 + ldr r1, [r5, #0] + ldr r0, _0223BCD8 ; =0x00000123 + mov r2, #0x20 + ldrb r1, [r1, r0] + ldr r0, _0223BCD4 ; =0x022536B4 + ldrb r0, [r0, r1] + ldr r1, [sp, #0x10] + lsl r0, r0, #5 + add r0, r4, r0 + bl sub_020C4B18 + ldr r2, [r5, #0] + ldr r1, _0223BCD8 ; =0x00000123 + add r0, r7, #0 + ldrb r2, [r2, r1] + ldr r1, _0223BCD4 ; =0x022536B4 + ldrb r1, [r1, r2] + mov r2, #0x20 + lsl r1, r1, #5 + add r1, r4, r1 + bl sub_020C4B18 + ldr r0, [sp, #0x10] + add r1, r4, r6 + mov r2, #0x20 + bl sub_020C4B18 + ldr r2, [r5, #0] + ldr r1, _0223BCD8 ; =0x00000123 + add r0, r7, #0 + ldrb r2, [r2, r1] + ldr r1, _0223BCD4 ; =0x022536B4 + ldrb r1, [r1, r2] + lsl r2, r1, #5 + ldr r1, [sp, #0x14] + add r1, r1, r2 + mov r2, #0x20 + bl sub_020C4B18 + ldr r1, [sp, #0x14] + ldr r0, [sp, #0x10] + add r1, r1, r6 + mov r2, #0x20 + bl sub_020C4B18 + add r0, r7, #0 + bl sub_020181C4 + ldr r0, [sp, #0x10] + bl sub_020181C4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BCD4: .word 0x022536B4 +_0223BCD8: .word 0x00000123 + thumb_func_end ov17_0223BBA8 + + thumb_func_start ov17_0223BCDC +ov17_0223BCDC: ; 0x0223BCDC + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223BCDC + + thumb_func_start ov17_0223BCE0 +ov17_0223BCE0: ; 0x0223BCE0 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223BCE0 + + thumb_func_start ov17_0223BCE4 +ov17_0223BCE4: ; 0x0223BCE4 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223BCE4 + + thumb_func_start ov17_0223BCE8 +ov17_0223BCE8: ; 0x0223BCE8 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223BD2A + ldr r1, [r2, #0] + ldr r0, _0223BD50 ; =0x00000177 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0223BD0A + ldr r0, [r4, #4] + cmp r0, #0x78 + bge _0223BD0A + add r0, r0, #1 + str r0, [r4, #4] + b _0223BD4A +_0223BD0A: + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r2, r0 + add r1, r2, #0 + mov r2, #2 + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223BD4A + mov r0, #0 + str r0, [r4, #4] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223BD4A +_0223BD2A: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r2, #0] + ldr r4, _0223BD54 ; =0x00000127 + add r0, r2, r0 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223BD4A + mov r0, #1 + pop {r4, pc} +_0223BD4A: + mov r0, #0 + pop {r4, pc} + nop +_0223BD50: .word 0x00000177 +_0223BD54: .word 0x00000127 + thumb_func_end ov17_0223BCE8 + + thumb_func_start ov17_0223BD58 +ov17_0223BD58: ; 0x0223BD58 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl sub_0209590C + cmp r0, #0 + bne _0223BD6C + mov r0, #1 + pop {r3, r4, r5, pc} +_0223BD6C: + ldrh r0, [r4] + cmp r0, #0 + bne _0223BD9E + ldr r3, _0223BDC4 ; =0x0000040C + mov r1, #0 + strb r1, [r5, r3] + add r0, r3, #2 + strb r1, [r5, r0] + add r0, r3, #3 + strb r1, [r5, r0] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r3, #0xe4 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0x14 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223BDBE + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223BDBE +_0223BD9E: + ldr r4, _0223BDC8 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223BDBE + mov r0, #1 + pop {r3, r4, r5, pc} +_0223BDBE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223BDC4: .word 0x0000040C +_0223BDC8: .word 0x00000127 + thumb_func_end ov17_0223BD58 + + thumb_func_start ov17_0223BDCC +ov17_0223BDCC: ; 0x0223BDCC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223BE20 + ldr r0, [r5, #0] + bl sub_0209590C + cmp r0, #1 + bne _0223BDEA + ldr r0, _0223BE44 ; =0x0000040C + mov r1, #0x2d + strb r1, [r5, r0] + b _0223BDF8 +_0223BDEA: + ldr r1, [r5, #0] + ldr r0, _0223BE48 ; =0x0000011F + ldrb r0, [r1, r0] + bl ov17_02243944 + ldr r1, _0223BE44 ; =0x0000040C + strb r0, [r5, r1] +_0223BDF8: + ldr r3, _0223BE4C ; =0x0000040E + mov r1, #0 + strb r1, [r5, r3] + add r0, r3, #1 + strb r1, [r5, r0] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r3, #0xe6 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0x14 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223BE40 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223BE40 +_0223BE20: + ldr r4, _0223BE50 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223BE40 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223BE40: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223BE44: .word 0x0000040C +_0223BE48: .word 0x0000011F +_0223BE4C: .word 0x0000040E +_0223BE50: .word 0x00000127 + thumb_func_end ov17_0223BDCC + + thumb_func_start ov17_0223BE54 +ov17_0223BE54: ; 0x0223BE54 + mov r0, #1 + bx lr + thumb_func_end ov17_0223BE54 + + thumb_func_start ov17_0223BE58 +ov17_0223BE58: ; 0x0223BE58 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp] + ldrh r1, [r1] + add r4, r0, #0 + cmp r1, #0 + beq _0223BE70 + cmp r1, #1 + beq _0223BE90 + cmp r1, #2 + beq _0223BEB8 + b _0223BEF8 +_0223BE70: + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223BF08 + ldr r0, [sp] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp] + strh r1, [r0] + b _0223BF08 +_0223BE90: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223BF10 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223BF08 + ldr r0, [sp] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp] + strh r1, [r0] + b _0223BF08 +_0223BEB8: + add r1, sp, #4 + bl ov17_02246ECC + ldr r1, [r4, #0] + ldr r0, _0223BF10 ; =0x00000127 + ldrb r0, [r1, r0] + cmp r0, #4 + bge _0223BEEC + lsl r2, r0, #1 + add r3, sp, #4 + add r1, r3, r2 + ldr r7, _0223BF14 ; =0x0000023E + add r2, r4, r2 + add r3, r3, r0 +_0223BED4: + ldrh r6, [r1] + ldr r5, _0223BF18 ; =0x00000236 + add r1, r1, #2 + strh r6, [r2, r5] + ldrb r6, [r3, #8] + add r5, r4, r0 + add r0, r0, #1 + strb r6, [r5, r7] + add r2, r2, #2 + add r3, r3, #1 + cmp r0, #4 + blt _0223BED4 +_0223BEEC: + ldr r0, [sp] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp] + strh r1, [r0] + b _0223BF08 +_0223BEF8: + mov r1, #0xce + lsl r1, r1, #2 + add r1, r4, r1 + bl ov17_02245F44 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223BF08: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BF10: .word 0x00000127 +_0223BF14: .word 0x0000023E +_0223BF18: .word 0x00000236 + thumb_func_end ov17_0223BE58 + + thumb_func_start ov17_0223BF1C +ov17_0223BF1C: ; 0x0223BF1C + push {r3, r4, r5, r6, r7, lr} + ldr r2, _0223BF9C ; =0x00000235 + add r4, r0, #0 + ldrb r0, [r4, r2] + add r1, r4, r0 + sub r0, r2, #4 + ldrb r0, [r1, r0] + add r1, r2, #0 + add r1, #0xf3 + strb r0, [r4, r1] + str r0, [sp] + add r0, r2, #0 + ldrb r1, [r4, r2] + add r0, #0xf4 + strb r1, [r4, r0] + ldr r0, [sp] + add r1, r4, r0 + add r0, r2, #0 + add r0, #9 + ldrb r3, [r1, r0] + add r0, r2, #0 + add r0, #0xf5 + strb r3, [r4, r0] + add r3, r2, #0 + mov r0, #0 + add r3, #0xf6 + strb r0, [r4, r3] + ldrb r2, [r4, r2] + cmp r2, #0 + ble _0223BF7C + ldr r7, _0223BFA0 ; =0x0000023E + mov r5, #1 + add r3, r7, #0 +_0223BF5E: + ldr r2, _0223BFA4 ; =0x00000231 + add r6, r4, r0 + ldrb r2, [r6, r2] + add r2, r4, r2 + ldrb r6, [r2, r7] + ldrb r2, [r1, r3] + cmp r6, r2 + bne _0223BF72 + ldr r2, _0223BFA8 ; =0x0000032B + strb r5, [r4, r2] +_0223BF72: + ldr r2, _0223BF9C ; =0x00000235 + add r0, r0, #1 + ldrb r2, [r4, r2] + cmp r0, r2 + blt _0223BF5E +_0223BF7C: + mov r1, #1 + lsl r1, r1, #0xa + ldr r2, [sp] + add r0, r4, #0 + add r1, r4, r1 + bl ov17_02243120 + ldr r1, _0223BFAC ; =0x00000406 + ldr r2, [sp] + add r0, r4, #0 + add r1, r4, r1 + bl ov17_02243120 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BF9C: .word 0x00000235 +_0223BFA0: .word 0x0000023E +_0223BFA4: .word 0x00000231 +_0223BFA8: .word 0x0000032B +_0223BFAC: .word 0x00000406 + thumb_func_end ov17_0223BF1C + + thumb_func_start ov17_0223BFB0 +ov17_0223BFB0: ; 0x0223BFB0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223BFDC + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #4 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223BFFC + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223BFFC +_0223BFDC: + ldr r4, _0223C000 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223BFFC + mov r0, #1 + pop {r3, r4, r5, pc} +_0223BFFC: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C000: .word 0x00000127 + thumb_func_end ov17_0223BFB0 + + thumb_func_start ov17_0223C004 +ov17_0223C004: ; 0x0223C004 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrh r0, [r5] + cmp r0, #0 + bne _0223C034 + ldr r3, _0223C060 ; =0x0000040C + mov r0, #0 + strb r0, [r4, r3] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r3, #0xe4 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #6 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C05A + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223C05A +_0223C034: + ldr r5, _0223C064 ; =0x00000127 + ldr r3, [r4, #0] + sub r2, r5, #4 + ldrb r1, [r3, r5] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + add r0, r4, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C05A + ldr r0, _0223C060 ; =0x0000040C + mov r1, #0 + strb r1, [r4, r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_0223C05A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223C060: .word 0x0000040C +_0223C064: .word 0x00000127 + thumb_func_end ov17_0223C004 + + thumb_func_start ov17_0223C068 +ov17_0223C068: ; 0x0223C068 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrh r0, [r5] + cmp r0, #0 + beq _0223C07A + cmp r0, #1 + beq _0223C0AA + b _0223C0CA +_0223C07A: + ldr r0, _0223C0F8 ; =0x0000040C + mov r1, #4 + strb r1, [r4, r0] + add r1, r0, #0 + sub r1, #0xe1 + ldrb r1, [r4, r1] + cmp r1, #1 + bne _0223C08E + mov r1, #5 + b _0223C090 +_0223C08E: + mov r1, #0 +_0223C090: + mov r2, #0xce + add r0, r0, #1 + strb r1, [r4, r0] + lsl r2, r2, #2 + add r1, r4, r2 + sub r2, #0x10 + ldrb r2, [r4, r2] + add r0, r4, #0 + bl ov17_022460DC + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] +_0223C0AA: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #7 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C0F4 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223C0F4 +_0223C0CA: + ldr r5, _0223C0FC ; =0x00000127 + ldr r3, [r4, #0] + sub r2, r5, #4 + ldrb r1, [r3, r5] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + add r0, r4, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C0F4 + ldr r0, _0223C0F8 ; =0x0000040C + mov r1, #0 + strb r1, [r4, r0] + add r0, r0, #1 + strb r1, [r4, r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_0223C0F4: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C0F8: .word 0x0000040C +_0223C0FC: .word 0x00000127 + thumb_func_end ov17_0223C068 + + thumb_func_start ov17_0223C100 +ov17_0223C100: ; 0x0223C100 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r1, [r4] + add r5, r0, #0 + cmp r1, #0xc + bls _0223C10E + b _0223C2BE +_0223C10E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223C11A: ; jump table + .short _0223C134 - _0223C11A - 2 ; case 0 + .short _0223C14A - _0223C11A - 2 ; case 1 + .short _0223C15E - _0223C11A - 2 ; case 2 + .short _0223C17E - _0223C11A - 2 ; case 3 + .short _0223C1A4 - _0223C11A - 2 ; case 4 + .short _0223C1BE - _0223C11A - 2 ; case 5 + .short _0223C1DE - _0223C11A - 2 ; case 6 + .short _0223C202 - _0223C11A - 2 ; case 7 + .short _0223C21C - _0223C11A - 2 ; case 8 + .short _0223C23C - _0223C11A - 2 ; case 9 + .short _0223C260 - _0223C11A - 2 ; case 10 + .short _0223C27A - _0223C11A - 2 ; case 11 + .short _0223C29A - _0223C11A - 2 ; case 12 +_0223C134: + mov r2, #0xce + lsl r2, r2, #2 + add r1, r5, r2 + sub r2, #0x10 + ldrb r2, [r5, r2] + bl ov17_02245FB4 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C14A: + mov r2, #0xce + lsl r2, r2, #2 + add r1, r5, r2 + sub r2, #0x10 + ldrb r2, [r5, r2] + bl ov17_02246138 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223C15E: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0xa + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C19A + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C17E: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223C2D8 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + beq _0223C19C +_0223C19A: + b _0223C2D2 +_0223C19C: + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C1A4: + mov r3, #0xce + lsl r3, r3, #2 + add r2, r3, #0 + add r1, r5, r3 + sub r2, #0x10 + sub r3, #0xf + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_02246160 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223C1BE: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0xb + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C2D2 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C1DE: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223C2D8 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C2D2 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C202: + mov r3, #0xce + lsl r3, r3, #2 + add r2, r3, #0 + add r1, r5, r3 + sub r2, #0x10 + sub r3, #0xf + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_02246228 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223C21C: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0xc + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C2D2 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C23C: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223C2D8 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C2D2 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C260: + mov r3, #0xce + lsl r3, r3, #2 + add r2, r3, #0 + sub r2, #0x10 + ldrb r2, [r5, r2] + add r1, r5, r3 + add r3, #0xc8 + add r3, r5, r3 + bl ov17_022463C4 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223C27A: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0xd + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C2D2 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C29A: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223C2D8 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C2D2 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C2D2 +_0223C2BE: + mov r2, #0xce + lsl r2, r2, #2 + add r1, r5, r2 + sub r2, #0x10 + ldrb r2, [r5, r2] + add r0, r5, #0 + bl ov17_02246018 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223C2D2: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223C2D8: .word 0x00000127 + thumb_func_end ov17_0223C100 + + thumb_func_start ov17_0223C2DC +ov17_0223C2DC: ; 0x0223C2DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223C308 + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #5 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C328 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C328 +_0223C308: + ldr r4, _0223C32C ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C328 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223C328: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C32C: .word 0x00000127 + thumb_func_end ov17_0223C2DC + + thumb_func_start ov17_0223C330 +ov17_0223C330: ; 0x0223C330 + ldr r2, _0223C34C ; =0x00000235 + ldrb r3, [r0, r2] + add r3, r3, #1 + strb r3, [r0, r2] + ldrb r0, [r0, r2] + cmp r0, #4 + blo _0223C342 + mov r0, #1 + bx lr +_0223C342: + mov r0, #5 + strh r0, [r1, #2] + mov r0, #2 + bx lr + nop +_0223C34C: .word 0x00000235 + thumb_func_end ov17_0223C330 + + thumb_func_start ov17_0223C350 +ov17_0223C350: ; 0x0223C350 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r7, r1, #0 + ldrh r1, [r7] + str r0, [sp] + cmp r1, #0x18 + bls _0223C360 + b _0223C804 +_0223C360: + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223C36C: ; jump table + .short _0223C39E - _0223C36C - 2 ; case 0 + .short _0223C3A4 - _0223C36C - 2 ; case 1 + .short _0223C3C2 - _0223C36C - 2 ; case 2 + .short _0223C3F0 - _0223C36C - 2 ; case 3 + .short _0223C414 - _0223C36C - 2 ; case 4 + .short _0223C43C - _0223C36C - 2 ; case 5 + .short _0223C458 - _0223C36C - 2 ; case 6 + .short _0223C480 - _0223C36C - 2 ; case 7 + .short _0223C5D6 - _0223C36C - 2 ; case 8 + .short _0223C5DE - _0223C36C - 2 ; case 9 + .short _0223C604 - _0223C36C - 2 ; case 10 + .short _0223C636 - _0223C36C - 2 ; case 11 + .short _0223C64E - _0223C36C - 2 ; case 12 + .short _0223C65A - _0223C36C - 2 ; case 13 + .short _0223C678 - _0223C36C - 2 ; case 14 + .short _0223C6A6 - _0223C36C - 2 ; case 15 + .short _0223C6E8 - _0223C36C - 2 ; case 16 + .short _0223C71C - _0223C36C - 2 ; case 17 + .short _0223C734 - _0223C36C - 2 ; case 18 + .short _0223C740 - _0223C36C - 2 ; case 19 + .short _0223C752 - _0223C36C - 2 ; case 20 + .short _0223C770 - _0223C36C - 2 ; case 21 + .short _0223C79E - _0223C36C - 2 ; case 22 + .short _0223C7C2 - _0223C36C - 2 ; case 23 + .short _0223C7E8 - _0223C36C - 2 ; case 24 +_0223C39E: + add r0, r1, #1 + strh r0, [r7] + b _0223C80A +_0223C3A4: + ldr r1, [r7, #4] + ldr r0, [sp] + ldr r2, _0223C6CC ; =0x00000231 + add r0, r0, r1 + ldrb r3, [r0, r2] + add r1, r2, #0 + ldr r0, [sp] + add r1, #0xf7 + strb r3, [r0, r1] + ldr r1, [r7, #4] + add r2, #0xf8 + strb r1, [r0, r2] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] +_0223C3C2: + mov r3, #0xce + ldr r0, [sp] + lsl r3, r3, #2 + add r4, r3, #0 + add r1, r0, #0 + add r1, r1, r3 + sub r4, #0x10 + add r2, r0, #0 + ldrb r2, [r2, r4] + sub r3, #0xf + add r4, r0, #0 + ldrb r3, [r4, r3] + bl ov17_022462A4 + cmp r0, #1 + bne _0223C3EA + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C3EA: + mov r0, #5 + strh r0, [r7] + b _0223C80A +_0223C3F0: + mov r1, #0xc3 + ldr r0, [sp] + lsl r1, r1, #4 + add r0, r0, r1 + ldr r1, [sp] + mov r4, #0xca + lsl r4, r4, #2 + add r3, r1, #0 + mov r2, #0xe + add r3, r3, r4 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C432 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C414: + ldr r0, [sp] + mov r1, #0xc3 + ldr r4, _0223C6D0 ; =0x00000127 + ldr r3, [r0, #0] + lsl r1, r1, #4 + add r0, r0, r1 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + beq _0223C434 +_0223C432: + b _0223C80A +_0223C434: + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C43C: + ldr r0, [r7, #4] + add r0, r0, #1 + str r0, [r7, #4] + cmp r0, #4 + blt _0223C452 + mov r0, #0 + str r0, [r7, #4] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C452: + mov r0, #1 + strh r0, [r7] + b _0223C80A +_0223C458: + mov r6, #0xce + lsl r6, r6, #2 + add r5, r6, #0 + mov r4, #0 + add r5, #0xc8 +_0223C462: + ldr r0, [sp] + add r2, r4, #0 + add r1, r0, #0 + add r3, r0, #0 + add r1, r1, r6 + add r3, r3, r5 + bl ov17_02246518 + add r4, r4, #1 + cmp r4, #4 + blt _0223C462 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C480: + mov r5, #0 + add r2, sp, #0x40 + add r3, sp, #0x34 + add r6, sp, #4 + mov r0, #4 +_0223C48A: + mov r1, #0 + str r1, [r2, #0] + str r5, [r3, #0] + add r4, r6, #0 +_0223C492: + add r1, r1, #1 + stmia r4!, {r0} + cmp r1, #4 + blt _0223C492 + add r5, r5, #1 + add r2, r2, #4 + add r3, r3, #4 + add r6, #0x10 + cmp r5, #3 + blt _0223C48A + mov r3, #0 + add r6, sp, #0x40 +_0223C4AA: + ldr r0, [sp] + add r1, r0, r3 + ldr r0, _0223C6CC ; =0x00000231 + ldrb r1, [r1, r0] + ldr r0, [sp] + add r2, r0, r1 + ldr r0, _0223C6D4 ; =0x0000023E + ldrb r0, [r2, r0] + lsl r0, r0, #2 + ldr r4, [r6, r0] + add r4, r4, #1 + str r4, [r6, r0] + ldr r0, _0223C6D4 ; =0x0000023E + mov r4, #0 + ldrb r0, [r2, r0] + lsl r2, r0, #4 + add r0, sp, #4 + add r5, r0, r2 + add r2, r5, #0 +_0223C4D0: + ldr r0, [r2, #0] + cmp r0, #4 + bne _0223C4DC + lsl r0, r4, #2 + str r1, [r5, r0] + b _0223C4E4 +_0223C4DC: + add r4, r4, #1 + add r2, r2, #4 + cmp r4, #4 + blt _0223C4D0 +_0223C4E4: + add r3, r3, #1 + cmp r3, #4 + blt _0223C4AA + mov r6, #0 +_0223C4EC: + mov r2, #2 + cmp r6, #2 + bge _0223C518 + add r0, sp, #0x48 + add r1, sp, #0x3c +_0223C4F6: + sub r3, r0, #4 + ldr r5, [r0, #0] + ldr r4, [r3, #0] + cmp r4, r5 + bge _0223C50E + str r4, [r0, #0] + str r5, [r3, #0] + sub r3, r1, #4 + ldr r5, [r1, #0] + ldr r4, [r3, #0] + str r4, [r1, #0] + str r5, [r3, #0] +_0223C50E: + sub r2, r2, #1 + sub r0, r0, #4 + sub r1, r1, #4 + cmp r2, r6 + bgt _0223C4F6 +_0223C518: + add r6, r6, #1 + cmp r6, #2 + blt _0223C4EC + ldr r0, [r7, #4] + mov r2, #0x41 + lsl r0, r0, #2 + add r1, sp, #0x34 + ldr r3, [r1, r0] + ldr r0, [sp] + lsl r2, r2, #4 + strb r3, [r0, r2] + mov r3, #0 + ldr r6, _0223C6D8 ; =0x00000411 + add r2, r3, #0 + add r5, sp, #4 +_0223C536: + ldr r0, [r7, #4] + ldr r4, [sp] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r4, r4, r3 + lsl r0, r0, #4 + add r0, r5, r0 + ldr r0, [r2, r0] + add r3, r3, #1 + add r2, r2, #4 + strb r0, [r4, r6] + cmp r3, #4 + blt _0223C536 + ldr r0, [r7, #4] + lsl r1, r0, #2 + add r0, sp, #0x40 + ldr r0, [r0, r1] + cmp r0, #4 + bhi _0223C59A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223C568: ; jump table + .short _0223C59A - _0223C568 - 2 ; case 0 + .short _0223C572 - _0223C568 - 2 ; case 1 + .short _0223C57C - _0223C568 - 2 ; case 2 + .short _0223C586 - _0223C568 - 2 ; case 3 + .short _0223C590 - _0223C568 - 2 ; case 4 +_0223C572: + ldr r1, _0223C6DC ; =0x0000040C + ldr r0, [sp] + mov r2, #0xa + strb r2, [r0, r1] + b _0223C5A4 +_0223C57C: + ldr r1, _0223C6DC ; =0x0000040C + ldr r0, [sp] + mov r2, #7 + strb r2, [r0, r1] + b _0223C5A4 +_0223C586: + ldr r1, _0223C6DC ; =0x0000040C + ldr r0, [sp] + mov r2, #8 + strb r2, [r0, r1] + b _0223C5A4 +_0223C590: + ldr r1, _0223C6DC ; =0x0000040C + ldr r0, [sp] + mov r2, #9 + strb r2, [r0, r1] + b _0223C5A4 +_0223C59A: + mov r0, #0xc + strh r0, [r7] + add sp, #0x4c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223C5A4: + ldr r2, _0223C6E0 ; =0x0000040D + ldr r0, [sp] + mov r1, #0 + add r3, r2, #0 + strb r1, [r0, r2] + sub r3, #0xd + add r1, r0, #0 + add r1, r1, r3 + sub r2, #0xe5 + add r3, r0, #0 + ldrb r2, [r3, r2] + bl ov17_02243120 + ldr r0, [sp] + ldr r3, _0223C6E4 ; =0x00000406 + add r1, r0, #0 + add r1, r1, r3 + sub r3, #0xde + add r2, r0, #0 + ldrb r2, [r2, r3] + bl ov17_02243120 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] +_0223C5D6: + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C5DE: + mov r1, #0xc3 + ldr r0, [sp] + lsl r1, r1, #4 + add r0, r0, r1 + ldr r1, [sp] + mov r4, #0xca + lsl r4, r4, #2 + add r3, r1, #0 + mov r2, #0x10 + add r3, r3, r4 + bl ov17_0224F30C + cmp r0, #1 + beq _0223C5FC + b _0223C80A +_0223C5FC: + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C604: + ldr r0, [sp] + mov r1, #0xc3 + ldr r4, _0223C6D0 ; =0x00000127 + ldr r3, [r0, #0] + lsl r1, r1, #4 + add r0, r0, r1 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C706 + ldr r1, _0223C6DC ; =0x0000040C + ldr r0, [sp] + mov r2, #0 + strb r2, [r0, r1] + add r1, r1, #1 + strb r2, [r0, r1] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C636: + ldr r0, [r7, #4] + add r0, r0, #1 + str r0, [r7, #4] + cmp r0, #3 + bge _0223C646 + mov r0, #7 + strh r0, [r7] + b _0223C80A +_0223C646: + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C64E: + mov r0, #0 + str r0, [r7, #4] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C65A: + ldr r1, [r7, #4] + ldr r0, [sp] + ldr r2, _0223C6CC ; =0x00000231 + add r0, r0, r1 + ldrb r3, [r0, r2] + add r1, r2, #0 + ldr r0, [sp] + add r1, #0xf7 + strb r3, [r0, r1] + ldr r1, [r7, #4] + add r2, #0xf8 + strb r1, [r0, r2] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] +_0223C678: + mov r3, #0xce + ldr r0, [sp] + lsl r3, r3, #2 + add r4, r3, #0 + add r1, r0, #0 + add r1, r1, r3 + sub r4, #0x10 + add r2, r0, #0 + ldrb r2, [r2, r4] + sub r3, #0xf + add r4, r0, #0 + ldrb r3, [r4, r3] + bl ov17_02246304 + cmp r0, #0 + bne _0223C69E + mov r0, #0x11 + strh r0, [r7] + b _0223C80A +_0223C69E: + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C6A6: + mov r1, #0xc3 + ldr r0, [sp] + lsl r1, r1, #4 + add r0, r0, r1 + ldr r1, [sp] + mov r4, #0xca + lsl r4, r4, #2 + add r3, r1, #0 + mov r2, #0x11 + add r3, r3, r4 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C706 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A + nop +_0223C6CC: .word 0x00000231 +_0223C6D0: .word 0x00000127 +_0223C6D4: .word 0x0000023E +_0223C6D8: .word 0x00000411 +_0223C6DC: .word 0x0000040C +_0223C6E0: .word 0x0000040D +_0223C6E4: .word 0x00000406 +_0223C6E8: + ldr r0, [sp] + mov r1, #0xc3 + ldr r4, _0223C810 ; =0x00000127 + ldr r3, [r0, #0] + lsl r1, r1, #4 + add r0, r0, r1 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + beq _0223C708 +_0223C706: + b _0223C80A +_0223C708: + ldr r1, _0223C814 ; =0x0000040C + ldr r0, [sp] + mov r2, #0 + strb r2, [r0, r1] + add r1, r1, #1 + strb r2, [r0, r1] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C71C: + ldr r0, [r7, #4] + add r0, r0, #1 + str r0, [r7, #4] + cmp r0, #4 + bge _0223C72C + mov r0, #0xd + strh r0, [r7] + b _0223C80A +_0223C72C: + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C734: + mov r0, #0 + str r0, [r7, #4] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C740: + mov r1, #0xce + ldr r0, [sp] + lsl r1, r1, #2 + add r0, r0, r1 + bl ov17_022460C8 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] +_0223C752: + ldr r1, [r7, #4] + ldr r0, [sp] + ldr r2, _0223C818 ; =0x00000231 + add r0, r0, r1 + ldrb r3, [r0, r2] + add r1, r2, #0 + ldr r0, [sp] + add r1, #0xf7 + strb r3, [r0, r1] + ldr r1, [r7, #4] + add r2, #0xf8 + strb r1, [r0, r2] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] +_0223C770: + mov r3, #0xce + ldr r0, [sp] + lsl r3, r3, #2 + add r4, r3, #0 + add r1, r0, #0 + add r1, r1, r3 + sub r4, #0x10 + add r2, r0, #0 + ldrb r2, [r2, r4] + sub r3, #0xf + add r4, r0, #0 + ldrb r3, [r4, r3] + bl ov17_02246364 + cmp r0, #1 + bne _0223C798 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C798: + mov r0, #0x18 + strh r0, [r7] + b _0223C80A +_0223C79E: + mov r1, #0xc3 + ldr r0, [sp] + lsl r1, r1, #4 + add r0, r0, r1 + ldr r1, [sp] + mov r4, #0xca + lsl r4, r4, #2 + add r3, r1, #0 + mov r2, #0xf + add r3, r3, r4 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C80A + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C7C2: + ldr r0, [sp] + mov r1, #0xc3 + ldr r4, _0223C810 ; =0x00000127 + ldr r3, [r0, #0] + lsl r1, r1, #4 + add r0, r0, r1 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C80A + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C7E8: + ldr r0, [r7, #4] + add r0, r0, #1 + str r0, [r7, #4] + cmp r0, #4 + blt _0223C7FE + mov r0, #0 + str r0, [r7, #4] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0223C80A +_0223C7FE: + mov r0, #0x14 + strh r0, [r7] + b _0223C80A +_0223C804: + add sp, #0x4c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223C80A: + mov r0, #0 + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223C810: .word 0x00000127 +_0223C814: .word 0x0000040C +_0223C818: .word 0x00000231 + thumb_func_end ov17_0223C350 + + thumb_func_start ov17_0223C81C +ov17_0223C81C: ; 0x0223C81C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223C832 + cmp r0, #1 + beq _0223C838 + cmp r0, #2 + beq _0223C858 + b _0223C87C +_0223C832: + add r0, r0, #1 + strh r0, [r4] + b _0223C880 +_0223C838: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0x12 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C880 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C880 +_0223C858: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223C884 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223C880 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223C880 +_0223C87C: + mov r0, #1 + pop {r3, r4, r5, pc} +_0223C880: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C884: .word 0x00000127 + thumb_func_end ov17_0223C81C + + thumb_func_start ov17_0223C888 +ov17_0223C888: ; 0x0223C888 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldrh r1, [r5] + add r4, r0, #0 + cmp r1, #6 + bls _0223C896 + b _0223C9FA +_0223C896: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223C8A2: ; jump table + .short _0223C8B0 - _0223C8A2 - 2 ; case 0 + .short _0223C8D0 - _0223C8A2 - 2 ; case 1 + .short _0223C8F6 - _0223C8A2 - 2 ; case 2 + .short _0223C956 - _0223C8A2 - 2 ; case 3 + .short _0223C97A - _0223C8A2 - 2 ; case 4 + .short _0223C9B6 - _0223C8A2 - 2 ; case 5 + .short _0223C9D6 - _0223C8A2 - 2 ; case 6 +_0223C8B0: + mov r0, #0xc3 + mov r3, #0xca + lsl r0, r0, #4 + lsl r3, r3, #2 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #0x15 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223C8EC + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C8D0: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223CA20 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + beq _0223C8EE +_0223C8EC: + b _0223CA1A +_0223C8EE: + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C8F6: + mov r2, #0x36 + mov r1, #0 + lsl r2, r2, #4 + add r0, r1, #0 + add r2, r4, r2 +_0223C900: + ldr r3, [r2, #0] + lsl r3, r3, #0x1a + lsr r3, r3, #0x1e + beq _0223C90A + add r1, r1, #1 +_0223C90A: + add r0, r0, #1 + add r2, #0x2c + cmp r0, #4 + blt _0223C900 + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r0, [r4, r0] + cmp r0, #3 + bhs _0223C928 + cmp r1, #4 + bge _0223C928 + ldr r0, _0223CA24 ; =0x0000040C + mov r1, #0x2a + strb r1, [r4, r0] + b _0223C92E +_0223C928: + ldr r0, _0223CA24 ; =0x0000040C + mov r1, #0 + strb r1, [r4, r0] +_0223C92E: + ldr r3, _0223CA28 ; =0x0000040E + mov r1, #0 + strb r1, [r4, r3] + add r0, r3, #1 + strb r1, [r4, r0] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r3, #0xe6 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #0x14 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223CA1A + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C956: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223CA20 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223CA1A + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C97A: + mov r1, #0xce + lsl r1, r1, #2 + add r1, r4, r1 + bl ov17_02246044 + mov r0, #0x23 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov17_02243B0C + ldr r0, _0223CA2C ; =0x00000236 + mov r6, #0 + add r1, r0, #0 + add r3, r4, #0 + add r1, #0x20 +_0223C998: + ldrh r2, [r3, r0] + add r6, r6, #1 + strh r2, [r3, r1] + add r3, r3, #2 + cmp r6, #4 + blt _0223C998 + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C9B6: + mov r0, #0xc3 + mov r3, #0x23 + lsl r0, r0, #4 + lsl r3, r3, #4 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #0x13 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223CA1A + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C9D6: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223CA20 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223CA1A + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223CA1A +_0223C9FA: + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r1, [r4, r0] + cmp r1, #4 + blo _0223CA0C + mov r0, #0xf + strh r0, [r5, #2] + mov r0, #2 + pop {r4, r5, r6, pc} +_0223CA0C: + mov r1, #0 + add r0, r0, #5 + strb r1, [r4, r0] + mov r0, #3 + strh r0, [r5, #2] + mov r0, #2 + pop {r4, r5, r6, pc} +_0223CA1A: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_0223CA20: .word 0x00000127 +_0223CA24: .word 0x0000040C +_0223CA28: .word 0x0000040E +_0223CA2C: .word 0x00000236 + thumb_func_end ov17_0223C888 + + thumb_func_start ov17_0223CA30 +ov17_0223CA30: ; 0x0223CA30 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #3 + bhi _0223CADC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223CA48: ; jump table + .short _0223CA50 - _0223CA48 - 2 ; case 0 + .short _0223CA72 - _0223CA48 - 2 ; case 1 + .short _0223CA9C - _0223CA48 - 2 ; case 2 + .short _0223CAC0 - _0223CA48 - 2 ; case 3 +_0223CA50: + mov r1, #0 + ldr r7, _0223CB0C ; =0x0000012E + add r2, r3, #0 + add r5, r1, #0 +_0223CA58: + ldr r0, _0223CB10 ; =0x00000242 + ldr r6, [r3, #0] + ldrsh r0, [r2, r0] + add r6, r6, r5 + add r1, r1, #1 + strh r0, [r6, r7] + add r2, r2, #2 + add r5, #0xc + cmp r1, #4 + blt _0223CA58 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223CA72: + ldr r5, _0223CB14 ; =0x0000040C + mov r0, #0x2b + strb r0, [r3, r5] + add r0, r5, #1 + mov r1, #0 + strb r1, [r3, r0] + mov r0, #0xc3 + lsl r0, r0, #4 + sub r5, #0xe4 + add r0, r3, r0 + add r1, r3, #0 + mov r2, #3 + add r3, r3, r5 + bl ov17_0224F30C + cmp r0, #1 + bne _0223CB06 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223CB06 +_0223CA9C: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r5, [r3, #0] + add r0, r3, r0 + ldr r3, _0223CB18 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r5, r3] + sub r3, #0xb + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223CB06 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223CB06 +_0223CAC0: + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r3, r0 + add r1, r3, #0 + mov r2, #1 + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223CB06 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223CB06 +_0223CADC: + mov r0, #0xc3 + lsl r0, r0, #4 + ldr r4, [r3, #0] + add r0, r3, r0 + ldr r3, _0223CB18 ; =0x00000127 + add r1, r3, #0 + add r1, #0x50 + ldrb r2, [r4, r3] + ldrb r1, [r4, r1] + sub r1, r2, r1 + sub r2, r3, #4 + sub r3, #0xb + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + sub r1, r1, #1 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223CB06 + mov r0, #3 + pop {r3, r4, r5, r6, r7, pc} +_0223CB06: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CB0C: .word 0x0000012E +_0223CB10: .word 0x00000242 +_0223CB14: .word 0x0000040C +_0223CB18: .word 0x00000127 + thumb_func_end ov17_0223CA30 + + .rodata + + + .global Unk_ov17_02252D8C +Unk_ov17_02252D8C: ; 0x02252D8C + .incbin "incbin/overlay17_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov17_02252D9C +Unk_ov17_02252D9C: ; 0x02252D9C + .incbin "incbin/overlay17_rodata.bin", 0x10, 0x24 - 0x10 + + .global Unk_ov17_02252DB0 +Unk_ov17_02252DB0: ; 0x02252DB0 + .incbin "incbin/overlay17_rodata.bin", 0x24, 0x3C - 0x24 + + .global Unk_ov17_02252DC8 +Unk_ov17_02252DC8: ; 0x02252DC8 + .incbin "incbin/overlay17_rodata.bin", 0x3C, 0x5C - 0x3C + + .global Unk_ov17_02252DE8 +Unk_ov17_02252DE8: ; 0x02252DE8 + .incbin "incbin/overlay17_rodata.bin", 0x5C, 0x84 - 0x5C + + .global Unk_ov17_02252E10 +Unk_ov17_02252E10: ; 0x02252E10 + .incbin "incbin/overlay17_rodata.bin", 0x84, 0xC4 - 0x84 + + .global Unk_ov17_02252E50 +Unk_ov17_02252E50: ; 0x02252E50 + .incbin "incbin/overlay17_rodata.bin", 0xC4, 0x54 + diff --git a/asm/ov17_0223CB1C.s b/asm/ov17_0223CB1C.s new file mode 100644 index 000000000..1a0f3c66a --- /dev/null +++ b/asm/ov17_0223CB1C.s @@ -0,0 +1,1956 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0223CB1C +ov17_0223CB1C: ; 0x0223CB1C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r1, #1 + lsl r1, r1, #0x1a + ldr r0, [r1, #0] + ldr r2, _0223CD9C ; =0xFFFFE0FF + and r0, r2 + str r0, [r1, #0] + ldr r0, _0223CDA0 ; =0x04001000 + ldr r3, [r0, #0] + and r2, r3 + str r2, [r0, #0] + ldr r3, [r1, #0] + ldr r2, _0223CDA4 ; =0xFFFF1FFF + and r3, r2 + str r3, [r1, #0] + ldr r3, [r0, #0] + add r1, #0x50 + and r2, r3 + str r2, [r0, #0] + mov r2, #0 + strh r2, [r1] + add r0, #0x50 + strh r2, [r0] + mov r2, #7 + mov r0, #3 + mov r1, #0x16 + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, _0223CDA8 ; =0x00000F68 + add r0, r4, #0 + mov r2, #0x16 + bl sub_0200681C + ldr r2, _0223CDA8 ; =0x00000F68 + mov r1, #0 + add r5, r0, #0 + bl sub_020C4CF4 + mov r0, #0x16 + bl ov17_0223F140 + str r0, [r5, #8] + add r0, r4, #0 + bl sub_02006840 + mov r1, #0x5b + str r0, [r5, #0] + lsl r1, r1, #2 + str r5, [r0, r1] + ldr r2, [r5, #0] + mov r3, #0 + add r0, r1, #4 + strb r3, [r2, r0] + ldr r0, [r5, #0] + str r0, [r5, #0xc] + add r0, r5, #0 + bl ov17_0223D390 + mov r0, #0x16 + bl sub_02002F38 + str r0, [r5, #0x50] + mov r1, #1 + bl sub_02003858 + mov r2, #2 + ldr r0, [r5, #0x50] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #0x16 + bl sub_02002F70 + mov r1, #1 + ldr r0, [r5, #0x50] + lsl r2, r1, #9 + mov r3, #0x16 + bl sub_02002F70 + mov r2, #7 + ldr r0, [r5, #0x50] + mov r1, #2 + lsl r2, r2, #6 + mov r3, #0x16 + bl sub_02002F70 + mov r2, #2 + ldr r0, [r5, #0x50] + mov r1, #3 + lsl r2, r2, #8 + mov r3, #0x16 + bl sub_02002F70 + mov r0, #0x16 + bl sub_02018340 + str r0, [r5, #0x30] + mov r0, #0x40 + mov r1, #0x16 + bl sub_0201DBEC + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + ldr r0, [r5, #0x30] + bl ov17_0223D1B8 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r0, #2 + mov r1, #0x16 + bl sub_02002BB8 + mov r0, #0x16 + bl sub_0200C6E4 + ldr r1, _0223CDAC ; =0x02252EFC + ldr r2, _0223CDB0 ; =0x02252EB4 + mov r3, #0x20 + str r0, [r5, #0x28] + bl sub_0200C73C + ldr r1, _0223CDB4 ; =0x00100010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + ldr r0, [r5, #0x28] + bl sub_0200C704 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r2, #0x80 + bl sub_0200C7C0 + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + ldr r2, _0223CDB8 ; =0x02252EC8 + bl sub_0200CB30 + ldr r0, [r5, #0x28] + bl sub_0200C738 + mov r2, #1 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + mov r0, #0x16 + bl sub_0200762C + str r0, [r5, #0x10] + bl ov17_0223D350 + mov r0, #0 + mov r1, #0x1a + mov r2, #0xd1 + mov r3, #0x16 + bl sub_0200B144 + str r0, [r5, #0x44] + mov r0, #0x16 + bl sub_0200B358 + str r0, [r5, #0x48] + mov r0, #5 + lsl r0, r0, #6 + mov r1, #0x16 + bl sub_02023790 + str r0, [r5, #0x4c] + mov r0, #0x2d + mov r1, #0x16 + bl sub_02006C24 + add r4, r0, #0 + mov r0, #0x2e + mov r1, #0x16 + bl sub_02006C24 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0223D4A8 + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0223D5B0 + add r0, r5, #0 + bl ov17_0223D324 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_0223D3B8 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_0223D468 + add r0, r4, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + mov r0, #1 + str r0, [sp] + add r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r0, [r5, #0x50] + ldr r3, _0223CDBC ; =0x00007FFF + add r2, r1, #0 + bl sub_020038B0 + mov r1, #1 + add r0, r1, #0 + str r1, [sp] + add r0, #0xff + str r0, [sp, #4] + ldr r0, [r5, #0x50] + ldr r3, _0223CDBC ; =0x00007FFF + mov r2, #0 + bl sub_020038B0 + mov r2, #0 + str r2, [sp] + mov r0, #0xe0 + str r0, [sp, #4] + ldr r0, [r5, #0x50] + ldr r3, _0223CDBC ; =0x00007FFF + mov r1, #2 + bl sub_020038B0 + mov r2, #0 + mov r0, #1 + str r2, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + ldr r0, [r5, #0x50] + ldr r3, _0223CDBC ; =0x00007FFF + mov r1, #3 + bl sub_020038B0 + bl sub_02039734 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0x16 + str r1, [sp, #8] + mov r1, #0x1b + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, _0223CDC0 ; =ov17_0223D164 + ldr r2, _0223CDC4 ; =0x0000EA60 + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + ldr r0, _0223CDC8 ; =0x000004F8 + mov r1, #1 + strb r1, [r5, r0] + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0 + bl sub_02004234 + ldr r1, _0223CDCC ; =0x0000046F + mov r0, #6 + mov r2, #1 + bl sub_02004550 + ldr r1, [r5, #0] + ldr r0, _0223CDD0 ; =0x00000171 + ldrb r0, [r1, r0] + bl sub_020959F4 + ldr r0, _0223CDD4 ; =ov17_0223D0C8 + add r1, r5, #0 + bl sub_02017798 + ldr r0, _0223CDD8 ; =0x00000605 + bl sub_02005748 + mov r0, #1 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0223CD9C: .word 0xFFFFE0FF +_0223CDA0: .word 0x04001000 +_0223CDA4: .word 0xFFFF1FFF +_0223CDA8: .word 0x00000F68 +_0223CDAC: .word 0x02252EFC +_0223CDB0: .word 0x02252EB4 +_0223CDB4: .word 0x00100010 +_0223CDB8: .word 0x02252EC8 +_0223CDBC: .word 0x00007FFF +_0223CDC0: .word ov17_0223D164 +_0223CDC4: .word 0x0000EA60 +_0223CDC8: .word 0x000004F8 +_0223CDCC: .word 0x0000046F +_0223CDD0: .word 0x00000171 +_0223CDD4: .word ov17_0223D0C8 +_0223CDD8: .word 0x00000605 + thumb_func_end ov17_0223CB1C + + thumb_func_start ov17_0223CDDC +ov17_0223CDDC: ; 0x0223CDDC + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02094E98 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223CE00 + cmp r0, #1 + beq _0223CE76 + cmp r0, #2 + bne _0223CDFE + b _0223CF4A +_0223CDFE: + b _0223CF60 +_0223CE00: + bl sub_0200F2AC + cmp r0, #1 + beq _0223CE0A + b _0223CF60 +_0223CE0A: + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223CF68 ; =0x00007FFF + ldr r2, _0223CF6C ; =0x0000FFFF + str r0, [sp, #8] + ldr r0, [r4, #0x50] + mov r1, #1 + mov r3, #6 + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223CF68 ; =0x00007FFF + ldr r2, _0223CF6C ; =0x0000FFFF + str r0, [sp, #8] + ldr r0, [r4, #0x50] + mov r1, #2 + mov r3, #6 + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + ldr r2, _0223CF68 ; =0x00007FFF + str r0, [sp, #4] + str r2, [sp, #8] + ldr r0, [r4, #0x50] + mov r1, #4 + lsr r2, r2, #1 + mov r3, #6 + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223CF68 ; =0x00007FFF + ldr r2, _0223CF6C ; =0x0000FFFF + str r0, [sp, #8] + ldr r0, [r4, #0x50] + mov r1, #8 + mov r3, #6 + bl sub_02003178 + ldr r0, _0223CF70 ; =0x000006E5 + bl sub_02005748 + mov r0, #1 + str r0, [r5, #0] + b _0223CF60 +_0223CE76: + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #1 + bne _0223CEF0 + ldr r2, _0223CF74 ; =0x000004F6 + ldr r1, _0223CF78 ; =0x00000F14 + ldrh r2, [r4, r2] + add r0, r4, #0 + add r1, r4, r1 + lsl r3, r2, #2 + ldr r2, _0223CF7C ; =0x02252F44 + ldr r2, [r2, r3] + blx r2 + sub r1, r0, #1 + cmp r1, #1 + bhi _0223CEBA + cmp r0, #1 + bne _0223CEA4 + ldr r0, _0223CF74 ; =0x000004F6 + ldrh r1, [r4, r0] + add r1, r1, #1 + b _0223CEAA +_0223CEA4: + ldr r0, _0223CF80 ; =0x00000F16 + ldrh r1, [r4, r0] + ldr r0, _0223CF74 ; =0x000004F6 +_0223CEAA: + strh r1, [r4, r0] + ldr r0, _0223CF78 ; =0x00000F14 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + b _0223CEF0 +_0223CEBA: + cmp r0, #3 + bne _0223CEF0 + ldr r0, _0223CF84 ; =0x00000F1C + ldrb r1, [r4, r0] + cmp r1, #1 + bne _0223CEF0 + mov r1, #2 + sub r0, #8 + str r1, [r5, #0] + add r0, r4, r0 + mov r1, #0 + mov r2, #8 + bl sub_020C4CF4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x16 + str r0, [sp, #8] + mov r0, #2 + mov r1, #0x10 + mov r2, #0x24 + mov r3, #0 + bl sub_0200F174 + b _0223CF60 +_0223CEF0: + ldr r0, _0223CF88 ; =0x000004FC + add r0, r4, r0 + bl ov17_0224F35C + ldr r0, _0223CF88 ; =0x000004FC + add r1, r4, #0 + add r0, r4, r0 + bl ov17_0224F3D8 + ldr r0, _0223CF84 ; =0x00000F1C + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223CF60 + ldr r0, _0223CF88 ; =0x000004FC + add r0, r4, r0 + bl ov17_0224F3D0 + cmp r0, #0 + bne _0223CF60 + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #0 + bne _0223CF60 + mov r0, #2 + str r0, [r5, #0] + ldr r0, _0223CF78 ; =0x00000F14 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x16 + str r0, [sp, #8] + mov r0, #2 + mov r1, #0x10 + mov r2, #0x24 + mov r3, #0 + bl sub_0200F174 + b _0223CF60 +_0223CF4A: + ldr r0, _0223CF84 ; =0x00000F1C + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223CF60 + bl sub_0200F2AC + cmp r0, #1 + bne _0223CF60 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0223CF60: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223CF68: .word 0x00007FFF +_0223CF6C: .word 0x0000FFFF +_0223CF70: .word 0x000006E5 +_0223CF74: .word 0x000004F6 +_0223CF78: .word 0x00000F14 +_0223CF7C: .word 0x02252F44 +_0223CF80: .word 0x00000F16 +_0223CF84: .word 0x00000F1C +_0223CF88: .word 0x000004FC + thumb_func_end ov17_0223CDDC + + thumb_func_start ov17_0223CF8C +ov17_0223CF8C: ; 0x0223CF8C + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + bl sub_0200682C + add r4, r0, #0 + bl sub_020141E4 + add r0, r4, #0 + bl ov17_0223D434 + add r0, r4, #0 + bl ov17_0223D498 + add r0, r4, #0 + bl ov17_0223D5AC + add r0, r4, #0 + bl ov17_0223D608 + add r0, r4, #0 + add r0, #0x34 + bl sub_0201A8FC + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0x30] + mov r1, #3 + bl sub_02019044 + mov r0, #4 + mov r1, #0 + bl sub_02019120 + ldr r0, [r4, #0x30] + mov r1, #4 + bl sub_02019044 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x2c] + bl sub_0200D0B0 + ldr r0, [r4, #0x28] + bl sub_0200C8D4 + bl sub_0201DC3C + mov r7, #0xf2 + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #4 +_0223D00C: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0223D016 + bl ov22_0225B020 +_0223D016: + add r6, r6, #1 + add r5, #0x10 + cmp r6, #4 + blt _0223D00C + add r0, r4, #0 + add r0, #0xc + bl ov17_02247734 + add r0, r4, #0 + bl ov17_02247918 + ldr r0, [r4, #0x10] + bl sub_02007B6C + mov r0, #2 + bl sub_02002C60 + ldr r0, [r4, #0x50] + mov r1, #0 + bl sub_02002FA0 + ldr r0, [r4, #0x50] + mov r1, #1 + bl sub_02002FA0 + ldr r0, [r4, #0x50] + mov r1, #2 + bl sub_02002FA0 + ldr r0, [r4, #0x50] + mov r1, #3 + bl sub_02002FA0 + ldr r0, [r4, #0x50] + bl sub_02002F54 + ldr r0, [r4, #0x48] + bl sub_0200B3F0 + ldr r0, [r4, #0x4c] + bl sub_020237BC + ldr r0, [r4, #0x44] + bl sub_0200B190 + ldr r0, [r4, #0x30] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, [r4, #8] + bl ov17_0223F1E0 + bl sub_0201E530 + ldr r0, [sp] + bl sub_02006830 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + mov r0, #0x16 + bl sub_0201807C + bl sub_02095A24 + bl sub_02039794 + ldr r0, _0223D0BC ; =0x0000000B + bl sub_02006514 + ldr r0, _0223D0C0 ; =0x0000000C + bl sub_02006514 + ldr r0, _0223D0C4 ; =0x00000016 + bl sub_02006514 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D0BC: .word 0x0000000B +_0223D0C0: .word 0x0000000C +_0223D0C4: .word 0x00000016 + thumb_func_end ov17_0223CF8C + + thumb_func_start ov17_0223D0C8 +ov17_0223D0C8: ; 0x0223D0C8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _0223D154 ; =0x00000F63 + sub r1, r0, #2 + ldrb r3, [r6, r1] + sub r1, r0, #3 + ldrb r1, [r6, r1] + sub r5, r0, #1 + ldrb r5, [r6, r5] + lsl r2, r1, #8 + mov r1, #0xff + lsl r1, r1, #8 + and r2, r1 + orr r2, r5 + ldrb r4, [r6, r0] + ldr r5, _0223D158 ; =0x04000040 + strh r2, [r5] + lsl r2, r3, #8 + and r2, r1 + orr r2, r4 + strh r2, [r5, #4] + add r2, r0, #4 + ldrb r4, [r6, r2] + add r2, r0, #2 + ldrb r3, [r6, r2] + add r2, r0, #1 + ldrb r2, [r6, r2] + add r0, r0, #3 + ldrb r0, [r6, r0] + lsl r2, r2, #8 + and r2, r1 + orr r0, r2 + strh r0, [r5, #2] + lsl r0, r3, #8 + and r0, r1 + orr r0, r4 + strh r0, [r5, #6] + ldr r0, [r6, #0x10] + bl sub_02008A94 + mov r7, #0xf2 + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #4 +_0223D120: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0223D12A + bl ov22_0225B06C +_0223D12A: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0223D120 + bl sub_0201DCAC + bl sub_0200C800 + ldr r0, [r6, #0x50] + bl sub_02003694 + ldr r0, [r6, #0x30] + bl sub_0201C2B8 + ldr r3, _0223D15C ; =0x027E0000 + ldr r1, _0223D160 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D154: .word 0x00000F63 +_0223D158: .word 0x04000040 +_0223D15C: .word 0x027E0000 +_0223D160: .word 0x00003FF8 + thumb_func_end ov17_0223D0C8 + + thumb_func_start ov17_0223D164 +ov17_0223D164: ; 0x0223D164 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _0223D1B0 ; =0x000004F8 + add r6, r1, #0 + ldrb r0, [r6, r0] + cmp r0, #1 + bne _0223D1A4 + ldr r0, [r6, #0x10] + bl sub_02007768 + mov r7, #0xf2 + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #4 +_0223D17E: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0223D188 + bl ov22_0225AFF8 +_0223D188: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0223D17E + bl ov11_0221F8F0 + ldr r0, [r6, #0x2c] + bl sub_0200C7EC + bl sub_0200C808 + ldr r0, _0223D1B4 ; =0x04000540 + mov r1, #1 + str r1, [r0, #0] +_0223D1A4: + ldr r1, [r6, #0x30] + mov r0, #0x16 + bl sub_02038A1C + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D1B0: .word 0x000004F8 +_0223D1B4: .word 0x04000540 + thumb_func_end ov17_0223D164 + + thumb_func_start ov17_0223D1B8 +ov17_0223D1B8: ; 0x0223D1B8 + push {r3, r4, r5, lr} + sub sp, #0xa8 + add r4, r0, #0 + bl sub_0201FF00 + ldr r5, _0223D310 ; =0x02252F1C + add r3, sp, #0x2c + mov r2, #5 +_0223D1C8: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223D1C8 + add r0, sp, #0x2c + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + ldr r5, _0223D314 ; =0x02252EA4 + add r3, sp, #0x1c + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223D318 ; =0x02252F70 + add r3, sp, #0x54 + mov r2, #0xa +_0223D228: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223D228 + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + add r2, sp, #0x54 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #1 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + add r2, sp, #0x70 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #3 + add r2, sp, #0x8c + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r1, _0223D31C ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r2, r0 + strh r2, [r1] + add r1, r0, #0 + bl sub_0201FF0C + ldr r5, _0223D320 ; =0x02252EE0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #4 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #4 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add sp, #0xa8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D310: .word 0x02252F1C +_0223D314: .word 0x02252EA4 +_0223D318: .word 0x02252F70 +_0223D31C: .word 0x04000008 +_0223D320: .word 0x02252EE0 + thumb_func_end ov17_0223D1B8 + + thumb_func_start ov17_0223D324 +ov17_0223D324: ; 0x0223D324 + push {lr} + sub sp, #0x14 + add r1, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r1, #0x30] + add r1, #0x34 + mov r2, #1 + mov r3, #2 + bl sub_0201A7E8 + add sp, #0x14 + pop {pc} + ; .align 2, 0 + thumb_func_end ov17_0223D324 + + thumb_func_start ov17_0223D350 +ov17_0223D350: ; 0x0223D350 + push {r3, r4, r5, lr} + ldr r3, _0223D388 ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _0223D38C ; =0x02100DF4 + mov r1, #0 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + add r2, r1, #0 + blx r3 + add r5, r0, #0 + cmp r4, #0 + bne _0223D378 + bl sub_02022974 +_0223D378: + cmp r5, #0 + bne _0223D380 + bl sub_02022974 +_0223D380: + bl sub_02014000 + pop {r3, r4, r5, pc} + nop +_0223D388: .word 0x02100DEC +_0223D38C: .word 0x02100DF4 + thumb_func_end ov17_0223D350 + + thumb_func_start ov17_0223D390 +ov17_0223D390: ; 0x0223D390 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0223D39E + bl sub_02022974 +_0223D39E: + mov r3, #0 + mov r0, #3 +_0223D3A2: + add r1, r4, r3 + sub r2, r0, r3 + add r1, #0xd4 + add r3, r3, #1 + strb r2, [r1] + cmp r3, #4 + blt _0223D3A2 + add r0, r4, #0 + bl ov17_02247A48 + pop {r4, pc} + thumb_func_end ov17_0223D390 + + thumb_func_start ov17_0223D3B8 +ov17_0223D3B8: ; 0x0223D3B8 + push {r4, r5, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + mov r0, #7 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0223D42C ; =0x000080E9 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [r5, #0x50] + ldr r2, [r5, #0x28] + ldr r3, [r5, #0x2c] + bl sub_0200CDC4 + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + add r2, r4, #0 + bl ov17_0224774C + mov r0, #0 + mvn r0, r0 + ldr r3, _0223D42C ; =0x000080E9 + str r0, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + ldr r2, [r5, #0x50] + bl ov17_0223F560 + ldr r3, _0223D42C ; =0x000080E9 + mov r0, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0xc8 + str r0, [sp, #0x10] + mov r0, #3 + str r0, [sp, #0x14] + ldr r0, _0223D430 ; =0x0000C350 + str r0, [sp, #0x18] + add r0, r5, #0 + ldr r1, [r5, #0x28] + ldr r2, [r5, #0x2c] + add r0, #0xb4 + bl ov17_0223F630 + add sp, #0x1c + pop {r4, r5, pc} + nop +_0223D42C: .word 0x000080E9 +_0223D430: .word 0x0000C350 + thumb_func_end ov17_0223D3B8 + + thumb_func_start ov17_0223D434 +ov17_0223D434: ; 0x0223D434 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x2c] + bl ov17_02247798 + add r0, r4, #0 + add r0, #0xb4 + bl ov17_0223F6C4 + ldr r1, _0223D464 ; =0x000080E9 + mov r2, #0 + str r1, [sp] + ldr r0, [r4, #0x2c] + mvn r2, r2 + add r3, r1, #0 + bl ov17_0223F5E8 + ldr r0, [r4, #0x2c] + ldr r1, _0223D464 ; =0x000080E9 + bl sub_0200D080 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223D464: .word 0x000080E9 + thumb_func_end ov17_0223D434 + + thumb_func_start ov17_0223D468 +ov17_0223D468: ; 0x0223D468 + push {r3, lr} + sub sp, #0x18 + add r3, r0, #0 + mov r0, #0x2e + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _0223D494 ; =0x000080EA + mov r1, #3 + str r0, [sp, #0x14] + ldr r0, [r3, #0x50] + ldr r2, [r3, #0x28] + ldr r3, [r3, #0x2c] + bl sub_0200CD7C + add sp, #0x18 + pop {r3, pc} + ; .align 2, 0 +_0223D494: .word 0x000080EA + thumb_func_end ov17_0223D468 + + thumb_func_start ov17_0223D498 +ov17_0223D498: ; 0x0223D498 + ldr r3, _0223D4A0 ; =sub_0200D080 + ldr r0, [r0, #0x2c] + ldr r1, _0223D4A4 ; =0x000080EA + bx r3 + ; .align 2, 0 +_0223D4A0: .word sub_0200D080 +_0223D4A4: .word 0x000080EA + thumb_func_end ov17_0223D498 + + thumb_func_start ov17_0223D4A8 +ov17_0223D4A8: ; 0x0223D4A8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + add r4, r1, #0 + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #0x17 + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r1, #0x16 + str r1, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r3, #3 + bl sub_0200710C + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_02019EBC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #0x50] + mov r1, #0x2d + mov r2, #0x23 + mov r3, #0x16 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + ldr r0, [r5, #0x50] + mov r1, #0x2d + mov r2, #0x24 + mov r3, #0x16 + bl sub_02003050 + ldr r1, [r5, #0] + ldr r0, _0223D5A8 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027B50 + add r6, r0, #0 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x16 + str r0, [sp, #4] + mov r1, #1 + ldr r0, [r5, #0x30] + add r2, r1, #0 + mov r3, #0xf + bl sub_0200DD0C + add r0, r6, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + ldr r0, [r5, #0x50] + mov r1, #0x26 + mov r3, #0x16 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #0x18 + mov r3, #2 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #0x15 + mov r3, #2 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xc0 + str r0, [sp, #8] + ldr r0, [r5, #0x50] + mov r1, #0x2d + mov r2, #0x25 + mov r3, #0x16 + bl sub_02003050 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223D5A8: .word 0x00001988 + thumb_func_end ov17_0223D4A8 + + thumb_func_start ov17_0223D5AC +ov17_0223D5AC: ; 0x0223D5AC + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223D5AC + + thumb_func_start ov17_0223D5B0 +ov17_0223D5B0: ; 0x0223D5B0 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + add r4, r1, #0 + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #0x13 + mov r3, #4 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #0x14 + mov r3, #4 + bl sub_0200710C + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #0x50] + mov r1, #0x2d + mov r2, #0x22 + mov r3, #0x16 + bl sub_02003050 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0223D5B0 + + thumb_func_start ov17_0223D608 +ov17_0223D608: ; 0x0223D608 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223D608 + + thumb_func_start ov17_0223D60C +ov17_0223D60C: ; 0x0223D60C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223D638 + ldr r0, [r5, #0x50] + bl sub_0200384C + cmp r0, #0 + bne _0223D63C + ldr r0, [r5, #0] + mov r1, #0x16 + bl ov17_0223F334 + ldr r0, [r5, #0] + bl ov17_0223F374 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D63C +_0223D638: + mov r0, #1 + pop {r3, r4, r5, pc} +_0223D63C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0223D60C + + thumb_func_start ov17_0223D640 +ov17_0223D640: ; 0x0223D640 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrh r0, [r5] + cmp r0, #0 + bne _0223D68C + ldr r0, [r4, #0] + bl sub_0209590C + cmp r0, #1 + bne _0223D65A + mov r1, #2 + b _0223D65C +_0223D65A: + mov r1, #1 +_0223D65C: + add r0, r4, #0 + add r0, #0xe9 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xea + strb r1, [r0] + add r0, r4, #0 + add r0, #0xeb + strb r1, [r0] + ldr r0, _0223D6B0 ; =0x000004FC + add r1, r4, #0 + add r0, r4, r0 + add r4, #0xe2 + mov r2, #0xd + add r3, r4, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D6AA + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223D6AA +_0223D68C: + ldr r0, _0223D6B0 ; =0x000004FC + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223D6B4 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D6AA + mov r0, #1 + pop {r3, r4, r5, pc} +_0223D6AA: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223D6B0: .word 0x000004FC +_0223D6B4: .word 0x00000127 + thumb_func_end ov17_0223D640 + + thumb_func_start ov17_0223D6B8 +ov17_0223D6B8: ; 0x0223D6B8 + push {r4, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223D6F0 + add r0, r3, #0 + add r0, #0xd8 + ldrb r0, [r0] + mov r2, #0 + add r0, r3, r0 + add r0, #0xd4 + ldrb r1, [r0] + add r0, r3, #0 + add r0, #0xe2 + strb r1, [r0] + ldr r0, _0223D714 ; =0x000004FC + add r1, r3, #0 + add r0, r3, r0 + add r3, #0xe2 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D70E + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D70E +_0223D6F0: + ldr r0, _0223D714 ; =0x000004FC + ldr r4, [r3, #0] + add r0, r3, r0 + ldr r3, _0223D718 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r4, r3] + sub r3, #0xb + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D70E + mov r0, #1 + pop {r4, pc} +_0223D70E: + mov r0, #0 + pop {r4, pc} + nop +_0223D714: .word 0x000004FC +_0223D718: .word 0x00000127 + thumb_func_end ov17_0223D6B8 + + thumb_func_start ov17_0223D71C +ov17_0223D71C: ; 0x0223D71C + push {r4, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223D762 + add r1, r3, #0 + mov r0, #0 + add r1, #0xec + strb r0, [r1] + add r2, r0, #0 + add r1, r3, #0 + sub r2, #0x10 + add r1, #0xed + strb r2, [r1] + add r1, r3, #0 + mov r2, #0x10 + add r1, #0xee + strb r2, [r1] + add r1, r3, #0 + add r1, #0xf0 + strh r0, [r1] + ldr r0, _0223D784 ; =0x000004FC + add r1, r3, #0 + add r0, r3, r0 + mov r2, #0xe + add r3, #0xe2 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D780 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D780 +_0223D762: + ldr r0, _0223D784 ; =0x000004FC + ldr r4, [r3, #0] + add r0, r3, r0 + ldr r3, _0223D788 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r4, r3] + sub r3, #0xb + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D780 + mov r0, #1 + pop {r4, pc} +_0223D780: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0223D784: .word 0x000004FC +_0223D788: .word 0x00000127 + thumb_func_end ov17_0223D71C + + thumb_func_start ov17_0223D78C +ov17_0223D78C: ; 0x0223D78C + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223D7D4 ; =0x000004FC + bne _0223D7B2 + add r0, r2, r0 + add r1, r2, #0 + mov r2, #0xf + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D7CE + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D7CE +_0223D7B2: + ldr r3, [r2, #0] + ldr r4, _0223D7D8 ; =0x00000127 + add r0, r2, r0 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D7CE + mov r0, #1 + pop {r4, pc} +_0223D7CE: + mov r0, #0 + pop {r4, pc} + nop +_0223D7D4: .word 0x000004FC +_0223D7D8: .word 0x00000127 + thumb_func_end ov17_0223D78C + + thumb_func_start ov17_0223D7DC +ov17_0223D7DC: ; 0x0223D7DC + push {r4, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223D824 ; =0x000004FC + bne _0223D802 + add r0, r3, r0 + add r1, r3, #0 + mov r2, #2 + add r3, #0xe2 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D81E + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D81E +_0223D802: + ldr r4, [r3, #0] + add r0, r3, r0 + ldr r3, _0223D828 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r4, r3] + sub r3, #0xb + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D81E + mov r0, #1 + pop {r4, pc} +_0223D81E: + mov r0, #0 + pop {r4, pc} + nop +_0223D824: .word 0x000004FC +_0223D828: .word 0x00000127 + thumb_func_end ov17_0223D7DC + + thumb_func_start ov17_0223D82C +ov17_0223D82C: ; 0x0223D82C + push {r4, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223D83E + cmp r0, #1 + beq _0223D898 + b _0223D8B2 +_0223D83E: + add r0, r3, #0 + add r0, #0xd8 + ldrb r0, [r0] + cmp r0, #0 + beq _0223D852 + cmp r0, #1 + beq _0223D85C + cmp r0, #2 + beq _0223D866 + b _0223D870 +_0223D852: + add r0, r3, #0 + mov r1, #3 + add r0, #0xe9 + strb r1, [r0] + b _0223D878 +_0223D85C: + add r0, r3, #0 + mov r1, #4 + add r0, #0xe9 + strb r1, [r0] + b _0223D878 +_0223D866: + add r0, r3, #0 + mov r1, #5 + add r0, #0xe9 + strb r1, [r0] + b _0223D878 +_0223D870: + add r0, r3, #0 + mov r1, #6 + add r0, #0xe9 + strb r1, [r0] +_0223D878: + add r0, r3, #0 + mov r1, #0 + add r0, #0xea + strb r1, [r0] + add r0, r3, #0 + add r0, #0xeb + strb r1, [r0] + add r0, r3, #0 + add r0, #0xe2 + ldrb r1, [r0] + add r0, r3, #0 + add r0, #0xe5 + strb r1, [r0] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223D898: + ldr r0, _0223D8D4 ; =0x000004FC + add r1, r3, #0 + add r0, r3, r0 + mov r2, #0xd + add r3, #0xe2 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D8D0 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D8D0 +_0223D8B2: + ldr r0, _0223D8D4 ; =0x000004FC + ldr r4, [r3, #0] + add r0, r3, r0 + ldr r3, _0223D8D8 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r4, r3] + sub r3, #0xb + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D8D0 + mov r0, #1 + pop {r4, pc} +_0223D8D0: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0223D8D4: .word 0x000004FC +_0223D8D8: .word 0x00000127 + thumb_func_end ov17_0223D82C + + thumb_func_start ov17_0223D8DC +ov17_0223D8DC: ; 0x0223D8DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223D8F2 + cmp r0, #1 + beq _0223D91C + cmp r0, #2 + beq _0223D938 + b _0223D95A +_0223D8F2: + add r1, r5, #0 + add r1, #0xe2 + ldrb r1, [r1] + ldr r0, [r5, #0] + bl sub_02095928 + add r1, r5, #0 + add r1, #0xe3 + strb r0, [r1] + add r1, r5, #0 + add r1, #0xe2 + ldrb r1, [r1] + ldr r0, [r5, #0] + bl sub_0209598C + add r1, r5, #0 + add r1, #0xe4 + strb r0, [r1] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223D91C: + ldr r0, _0223D964 ; =0x000004FC + add r1, r5, #0 + add r0, r5, r0 + add r5, #0xe2 + mov r2, #6 + add r3, r5, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223D95E + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D95E +_0223D938: + ldr r0, _0223D964 ; =0x000004FC + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223D968 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223D95E + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223D95E +_0223D95A: + mov r0, #1 + pop {r3, r4, r5, pc} +_0223D95E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223D964: .word 0x000004FC +_0223D968: .word 0x00000127 + thumb_func_end ov17_0223D8DC + + thumb_func_start ov17_0223D96C +ov17_0223D96C: ; 0x0223D96C + ldrh r2, [r1] + cmp r2, #0 + bne _0223D986 + add r2, r0, #0 + add r2, #0xd8 + ldrb r2, [r2] + add r0, #0xd8 + add r2, r2, #1 + strb r2, [r0] + ldrh r0, [r1] + add r0, r0, #1 + strh r0, [r1] + b _0223D998 +_0223D986: + add r0, #0xd8 + ldrb r0, [r0] + cmp r0, #4 + blo _0223D992 + mov r0, #1 + bx lr +_0223D992: + mov r0, #2 + strh r0, [r1, #2] + bx lr +_0223D998: + mov r0, #0 + bx lr + thumb_func_end ov17_0223D96C + + thumb_func_start ov17_0223D99C +ov17_0223D99C: ; 0x0223D99C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #3 + bhi _0223DA44 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223D9B4: ; jump table + .short _0223D9BC - _0223D9B4 - 2 ; case 0 + .short _0223D9DE - _0223D9B4 - 2 ; case 1 + .short _0223DA00 - _0223D9B4 - 2 ; case 2 + .short _0223DA2A - _0223D9B4 - 2 ; case 3 +_0223D9BC: + add r0, r3, #0 + ldr r1, _0223DA68 ; =0x000006E5 + add r0, #0xf2 + strh r1, [r0] + ldr r0, _0223DA6C ; =0x000004FC + add r1, r3, #0 + add r0, r3, r0 + mov r2, #0x10 + add r3, #0xe2 + bl ov17_0224F30C + cmp r0, #1 + bne _0223DA62 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223DA62 +_0223D9DE: + ldr r0, _0223DA6C ; =0x000004FC + ldr r5, [r3, #0] + add r0, r3, r0 + ldr r3, _0223DA70 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r5, r3] + sub r3, #0xb + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223DA62 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223DA62 +_0223DA00: + ldr r1, [r3, #0] + ldr r0, _0223DA74 ; =0x00000121 + ldrb r0, [r1, r0] + cmp r0, #2 + bne _0223DA0E + mov r1, #7 + b _0223DA10 +_0223DA0E: + mov r1, #0 +_0223DA10: + add r0, r3, #0 + add r0, #0xe9 + strb r1, [r0] + add r0, r3, #0 + mov r1, #0 + add r0, #0xea + strb r1, [r0] + add r0, r3, #0 + add r0, #0xeb + strb r1, [r0] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223DA2A: + ldr r0, _0223DA6C ; =0x000004FC + add r1, r3, #0 + add r0, r3, r0 + mov r2, #0xd + add r3, #0xe2 + bl ov17_0224F30C + cmp r0, #1 + bne _0223DA62 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223DA62 +_0223DA44: + ldr r0, _0223DA6C ; =0x000004FC + ldr r4, [r3, #0] + add r0, r3, r0 + ldr r3, _0223DA70 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r4, r3] + sub r3, #0xb + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223DA62 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223DA62: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223DA68: .word 0x000006E5 +_0223DA6C: .word 0x000004FC +_0223DA70: .word 0x00000127 +_0223DA74: .word 0x00000121 + thumb_func_end ov17_0223D99C + + thumb_func_start ov17_0223DA78 +ov17_0223DA78: ; 0x0223DA78 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223DAC8 ; =0x000004FC + bne _0223DA9E + add r0, r2, r0 + add r1, r2, #0 + mov r2, #1 + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223DAC4 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223DAC4 +_0223DA9E: + ldr r4, _0223DACC ; =0x00000127 + ldr r3, [r2, #0] + add r1, r4, #0 + add r1, #0x50 + add r0, r2, r0 + ldrb r2, [r3, r4] + ldrb r1, [r3, r1] + sub r1, r2, r1 + sub r2, r4, #4 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + sub r1, r1, #1 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223DAC4 + mov r0, #3 + pop {r4, pc} +_0223DAC4: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0223DAC8: .word 0x000004FC +_0223DACC: .word 0x00000127 + thumb_func_end ov17_0223DA78 + + .rodata + + + .global Unk_ov17_02252EA4 +Unk_ov17_02252EA4: ; 0x02252EA4 + .incbin "incbin/overlay17_rodata.bin", 0x118, 0x128 - 0x118 + + .global Unk_ov17_02252EB4 +Unk_ov17_02252EB4: ; 0x02252EB4 + .incbin "incbin/overlay17_rodata.bin", 0x128, 0x13C - 0x128 + + .global Unk_ov17_02252EC8 +Unk_ov17_02252EC8: ; 0x02252EC8 + .incbin "incbin/overlay17_rodata.bin", 0x13C, 0x154 - 0x13C + + .global Unk_ov17_02252EE0 +Unk_ov17_02252EE0: ; 0x02252EE0 + .incbin "incbin/overlay17_rodata.bin", 0x154, 0x170 - 0x154 + + .global Unk_ov17_02252EFC +Unk_ov17_02252EFC: ; 0x02252EFC + .incbin "incbin/overlay17_rodata.bin", 0x170, 0x190 - 0x170 + + .global Unk_ov17_02252F1C +Unk_ov17_02252F1C: ; 0x02252F1C + .incbin "incbin/overlay17_rodata.bin", 0x190, 0x1B8 - 0x190 + + .global Unk_ov17_02252F44 +Unk_ov17_02252F44: ; 0x02252F44 + .incbin "incbin/overlay17_rodata.bin", 0x1B8, 0x1E4 - 0x1B8 + + .global Unk_ov17_02252F70 +Unk_ov17_02252F70: ; 0x02252F70 + .incbin "incbin/overlay17_rodata.bin", 0x1E4, 0x54 + diff --git a/asm/ov17_0223DAD0.s b/asm/ov17_0223DAD0.s new file mode 100644 index 000000000..f50b5d79b --- /dev/null +++ b/asm/ov17_0223DAD0.s @@ -0,0 +1,2779 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0223DAD0 +ov17_0223DAD0: ; 0x0223DAD0 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r1, #1 + lsl r1, r1, #0x1a + ldr r0, [r1, #0] + ldr r2, _0223DD8C ; =0xFFFFE0FF + and r0, r2 + str r0, [r1, #0] + ldr r0, _0223DD90 ; =0x04001000 + ldr r3, [r0, #0] + and r2, r3 + str r2, [r0, #0] + ldr r3, [r1, #0] + ldr r2, _0223DD94 ; =0xFFFF1FFF + and r3, r2 + str r3, [r1, #0] + ldr r3, [r0, #0] + add r1, #0x50 + and r2, r3 + str r2, [r0, #0] + mov r2, #0 + strh r2, [r1] + add r0, #0x50 + strh r2, [r0] + mov r2, #0xa + mov r0, #3 + mov r1, #0x17 + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, _0223DD98 ; =0x00001C10 + add r0, r4, #0 + mov r2, #0x17 + bl sub_0200681C + ldr r2, _0223DD98 ; =0x00001C10 + mov r1, #0 + add r5, r0, #0 + bl sub_020C4CF4 + mov r0, #0x17 + bl ov17_0223F140 + str r0, [r5, #0x10] + add r0, r4, #0 + bl sub_02006840 + mov r1, #0x5b + str r0, [r5, #0] + lsl r1, r1, #2 + str r5, [r0, r1] + ldr r2, [r5, #0] + mov r3, #1 + add r0, r1, #4 + strb r3, [r2, r0] + ldr r0, [r5, #0] + str r0, [r5, #0x14] + add r0, r5, #0 + bl ov17_0223E458 + mov r0, #0x17 + bl sub_02002F38 + add r1, r5, #0 + add r1, #0xa4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02003858 + add r0, r5, #0 + add r0, #0xa4 + mov r2, #2 + ldr r0, [r0, #0] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #0x17 + bl sub_02002F70 + add r0, r5, #0 + add r0, #0xa4 + mov r1, #1 + ldr r0, [r0, #0] + lsl r2, r1, #9 + mov r3, #0x17 + bl sub_02002F70 + add r0, r5, #0 + add r0, #0xa4 + mov r2, #7 + ldr r0, [r0, #0] + mov r1, #2 + lsl r2, r2, #6 + mov r3, #0x17 + bl sub_02002F70 + add r0, r5, #0 + add r0, #0xa4 + mov r2, #2 + ldr r0, [r0, #0] + mov r1, #3 + lsl r2, r2, #8 + mov r3, #0x17 + bl sub_02002F70 + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #8 + bl sub_02018144 + ldr r1, _0223DD9C ; =0x00001128 + str r0, [r5, r1] + add r0, r5, #0 + mov r1, #1 + bl ov17_0224CDB4 + mov r0, #0x17 + bl sub_02018340 + str r0, [r5, #0x74] + mov r0, #0x40 + mov r1, #0x17 + bl sub_0201DBEC + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + add r1, r5, #0 + ldr r0, [r5, #0] + add r1, #0x14 + bl ov17_02249380 + ldr r1, _0223DDA0 ; =0x0000114C + str r0, [r5, r1] + ldr r0, [r5, #0x74] + bl ov17_0223E250 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r0, #2 + mov r1, #0x17 + bl sub_02002BB8 + mov r0, #0x17 + bl sub_0200C6E4 + ldr r1, _0223DDA4 ; =0x02253008 + ldr r2, _0223DDA8 ; =0x02252FDC + mov r3, #0x20 + str r0, [r5, #0x6c] + bl sub_0200C73C + ldr r1, _0223DDAC ; =0x00100010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + ldr r0, [r5, #0x6c] + bl sub_0200C704 + str r0, [r5, #0x70] + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + mov r2, #0x80 + bl sub_0200C7C0 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + ldr r2, _0223DDB0 ; =0x02252FF0 + bl sub_0200CB30 + ldr r0, [r5, #0x6c] + bl sub_0200C738 + mov r2, #1 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + mov r0, #0x17 + bl sub_0200762C + str r0, [r5, #0x58] + bl ov17_0223E450 + mov r0, #0 + mov r1, #0x1a + mov r2, #0xce + mov r3, #0x17 + bl sub_0200B144 + add r1, r5, #0 + add r1, #0x98 + str r0, [r1, #0] + mov r0, #0x17 + bl sub_0200B358 + add r1, r5, #0 + add r1, #0x9c + str r0, [r1, #0] + mov r0, #5 + lsl r0, r0, #6 + mov r1, #0x17 + bl sub_02023790 + add r1, r5, #0 + add r1, #0xa0 + str r0, [r1, #0] + mov r0, #9 + mov r1, #0x17 + bl sub_02012744 + add r1, r5, #0 + add r1, #0xa8 + str r0, [r1, #0] + mov r0, #0x2d + mov r1, #0x17 + bl sub_02006C24 + add r4, r0, #0 + mov r0, #0x2e + mov r1, #0x17 + bl sub_02006C24 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0223E67C + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0223E770 + add r0, r5, #0 + bl ov17_0223E380 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_0223E4B0 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_0223E60C + ldr r0, _0223DDA0 ; =0x0000114C + mov r1, #0 + ldr r0, [r5, r0] + mov r2, #1 + add r3, r1, #0 + bl ov17_02249640 + add r0, r4, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl sub_02006CA8 + add r0, r5, #0 + bl ov17_0224A134 + add r0, r5, #0 + add r0, #0x14 + bl ov17_0224B0CC + add r0, r5, #0 + bl ov17_0223E778 + add r0, r5, #0 + bl ov17_0224AA38 + add r0, r5, #0 + bl ov17_0224B59C + bl sub_02039734 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0x17 + str r1, [sp, #8] + mov r1, #0x11 + mov r2, #0x25 + mov r3, #0 + bl sub_0200F174 + ldr r0, _0223DDB4 ; =ov17_0223E1FC + ldr r2, _0223DDB8 ; =0x00013880 + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + ldr r0, _0223DDBC ; =0x00001170 + mov r1, #1 + strb r1, [r5, r0] + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r1, _0223DDC0 ; =0x0000046F + mov r0, #6 + mov r2, #1 + bl sub_02004550 + ldr r1, [r5, #0] + ldr r0, _0223DDC4 ; =0x00000171 + ldrb r0, [r1, r0] + bl sub_020959F4 + mov r1, #0x39 + add r2, r1, #0 + ldr r0, _0223DDC8 ; =0x04000050 + sub r2, #0x3f + bl sub_020BF578 + ldr r0, _0223DDCC ; =0x000006E5 + bl sub_02005748 + ldr r0, _0223DDD0 ; =ov17_0223E09C + add r1, r5, #0 + bl sub_02017798 + mov r0, #1 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223DD8C: .word 0xFFFFE0FF +_0223DD90: .word 0x04001000 +_0223DD94: .word 0xFFFF1FFF +_0223DD98: .word 0x00001C10 +_0223DD9C: .word 0x00001128 +_0223DDA0: .word 0x0000114C +_0223DDA4: .word 0x02253008 +_0223DDA8: .word 0x02252FDC +_0223DDAC: .word 0x00100010 +_0223DDB0: .word 0x02252FF0 +_0223DDB4: .word ov17_0223E1FC +_0223DDB8: .word 0x00013880 +_0223DDBC: .word 0x00001170 +_0223DDC0: .word 0x0000046F +_0223DDC4: .word 0x00000171 +_0223DDC8: .word 0x04000050 +_0223DDCC: .word 0x000006E5 +_0223DDD0: .word ov17_0223E09C + thumb_func_end ov17_0223DAD0 + + thumb_func_start ov17_0223DDD4 +ov17_0223DDD4: ; 0x0223DDD4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02094E98 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223DDF6 + cmp r0, #1 + beq _0223DE04 + cmp r0, #2 + beq _0223DED8 + b _0223DEEE +_0223DDF6: + bl sub_0200F2AC + cmp r0, #1 + bne _0223DEEE + mov r0, #1 + str r0, [r5, #0] + b _0223DEEE +_0223DE04: + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #1 + bne _0223DE7E + ldr r2, _0223DEF4 ; =0x0000116E + ldr r1, _0223DEF8 ; =0x00001C04 + ldrh r2, [r4, r2] + add r0, r4, #0 + add r1, r4, r1 + lsl r3, r2, #2 + ldr r2, _0223DEFC ; =0x02253050 + ldr r2, [r2, r3] + blx r2 + sub r1, r0, #1 + cmp r1, #1 + bhi _0223DE48 + cmp r0, #1 + bne _0223DE32 + ldr r0, _0223DEF4 ; =0x0000116E + ldrh r1, [r4, r0] + add r1, r1, #1 + b _0223DE38 +_0223DE32: + ldr r0, _0223DF00 ; =0x00001C06 + ldrh r1, [r4, r0] + ldr r0, _0223DEF4 ; =0x0000116E +_0223DE38: + strh r1, [r4, r0] + ldr r0, _0223DEF8 ; =0x00001C04 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + b _0223DE7E +_0223DE48: + cmp r0, #3 + bne _0223DE7E + ldr r0, _0223DF04 ; =0x00001C0C + ldrb r1, [r4, r0] + cmp r1, #1 + bne _0223DE7E + mov r1, #2 + sub r0, #8 + str r1, [r5, #0] + add r0, r4, r0 + mov r1, #0 + mov r2, #8 + bl sub_020C4CF4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x17 + mov r1, #0x1e + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + b _0223DEEE +_0223DE7E: + ldr r0, _0223DF08 ; =0x00001174 + add r0, r4, r0 + bl ov17_0224F35C + ldr r0, _0223DF08 ; =0x00001174 + add r1, r4, #0 + add r0, r4, r0 + bl ov17_0224F3D8 + ldr r0, _0223DF04 ; =0x00001C0C + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223DEEE + ldr r0, _0223DF08 ; =0x00001174 + add r0, r4, r0 + bl ov17_0224F3D0 + cmp r0, #0 + bne _0223DEEE + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #0 + bne _0223DEEE + mov r0, #2 + str r0, [r5, #0] + ldr r0, _0223DEF8 ; =0x00001C04 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x17 + mov r1, #0x1e + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + b _0223DEEE +_0223DED8: + ldr r0, _0223DF04 ; =0x00001C0C + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223DEEE + bl sub_0200F2AC + cmp r0, #1 + bne _0223DEEE + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0223DEEE: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223DEF4: .word 0x0000116E +_0223DEF8: .word 0x00001C04 +_0223DEFC: .word 0x02253050 +_0223DF00: .word 0x00001C06 +_0223DF04: .word 0x00001C0C +_0223DF08: .word 0x00001174 + thumb_func_end ov17_0223DDD4 + + thumb_func_start ov17_0223DF0C +ov17_0223DF0C: ; 0x0223DF0C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02014710 + cmp r0, #0 + beq _0223DF24 + bl sub_02022974 +_0223DF24: + add r0, r4, #0 + bl ov17_0223E7E0 + bl sub_020141E4 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224A95C + add r0, r4, #0 + bl ov17_0224AA58 + add r0, r4, #0 + bl ov17_0224B5B8 + add r0, r4, #0 + bl ov17_0224BD00 + add r0, r4, #0 + bl ov17_0223E588 + add r0, r4, #0 + bl ov17_0223E678 + add r0, r4, #0 + bl ov17_0223E76C + add r0, r4, #0 + bl ov17_0223E774 + add r5, r4, #0 + mov r6, #0 + add r5, #0x78 +_0223DF66: + add r0, r5, #0 + bl sub_0201A8FC + add r6, r6, #1 + add r5, #0x10 + cmp r6, #2 + blt _0223DF66 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x74] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0x74] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0x74] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0x74] + bl ov17_02249358 + ldr r0, _0223E088 ; =0x0000114C + ldr r0, [r4, r0] + bl ov17_022493A4 + ldr r0, [r4, #0x6c] + ldr r1, [r4, #0x70] + bl sub_0200D0B0 + ldr r0, [r4, #0x6c] + bl sub_0200C8D4 + bl sub_0201DC3C + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224A1EC + ldr r0, [r4, #0x58] + bl sub_02007B6C + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl sub_020127BC + mov r0, #2 + bl sub_02002C60 + ldr r0, _0223E08C ; =0x00001128 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_02002F54 + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + bl sub_020237BC + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl sub_0200B3F0 + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + bl sub_0200B190 + ldr r0, [r4, #0x74] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, [r4, #0x10] + bl ov17_0223F1E0 + bl sub_0201E530 + add r0, r7, #0 + bl sub_02006830 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + mov r0, #0x17 + bl sub_0201807C + bl sub_02095A24 + bl sub_02039794 + ldr r0, _0223E090 ; =0x0000000B + bl sub_02006514 + ldr r0, _0223E094 ; =0x0000000C + bl sub_02006514 + ldr r0, _0223E098 ; =0x00000016 + bl sub_02006514 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223E088: .word 0x0000114C +_0223E08C: .word 0x00001128 +_0223E090: .word 0x0000000B +_0223E094: .word 0x0000000C +_0223E098: .word 0x00000016 + thumb_func_end ov17_0223DF0C + + thumb_func_start ov17_0223E09C +ov17_0223E09C: ; 0x0223E09C + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, _0223E170 ; =0x00001150 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _0223E12C + add r1, r0, #4 + add r3, r4, r1 + ldr r2, [r4, r1] + mov r5, #0 + ldr r1, [r3, #4] + add r2, r2, #1 + adc r1, r5 + add r0, r0, #4 + str r2, [r4, r0] + mov r0, #7 + str r1, [r3, #4] + bl sub_020051C4 + ldr r1, _0223E174 ; =0x00000B14 + ldr r1, [r4, r1] + mul r0, r1 + ldr r1, _0223E178 ; =0x00001388 + add r0, r0, r1 + lsl r1, r1, #1 + bl sub_020E2178 + ldr r7, _0223E17C ; =0x00001168 + add r5, r0, #1 + add r1, r7, #0 + str r0, [r4, r7] + sub r1, #0x14 + ldr r2, [r4, r1] + add r1, r7, #0 + sub r1, #0x10 + add r0, r5, #0 + ldr r6, [r4, r1] + mov r3, #0 + add r1, r3, #0 + eor r1, r6 + eor r0, r2 + orr r0, r1 + beq _0223E128 + sub r0, r7, #4 + ldr r0, [r4, r0] + cmp r0, #0x12 + bhi _0223E10C + mov ip, r3 + mov r0, ip + sub r1, r5, r2 + sbc r0, r6 + mov r6, #0 + mov r2, #1 + sub r1, r2, r1 + sbc r6, r0 + bhs _0223E11C +_0223E10C: + ldr r1, _0223E180 ; =0x00001154 + str r5, [r4, r1] + add r0, r1, #4 + str r3, [r4, r0] + mov r0, #0 + add r1, #0x10 + str r0, [r4, r1] + b _0223E12C +_0223E11C: + sub r0, r7, #4 + ldr r0, [r4, r0] + add r1, r0, #1 + sub r0, r7, #4 + str r1, [r4, r0] + b _0223E12C +_0223E128: + sub r0, r7, #4 + str r3, [r4, r0] +_0223E12C: + ldr r0, [r4, #0x58] + bl sub_02008A94 + mov r6, #0 + add r5, r4, #0 +_0223E136: + ldr r0, [r5, #0x18] + cmp r0, #0 + beq _0223E140 + bl ov22_0225B06C +_0223E140: + add r6, r6, #1 + add r5, #0x10 + cmp r6, #4 + blt _0223E136 + bl sub_0201DCAC + bl sub_0200C800 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_02003694 + ldr r0, [r4, #0x74] + bl sub_0201C2B8 + ldr r3, _0223E184 ; =0x027E0000 + ldr r1, _0223E188 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r3, r4, r5, r6, r7, pc} + nop +_0223E170: .word 0x00001150 +_0223E174: .word 0x00000B14 +_0223E178: .word 0x00001388 +_0223E17C: .word 0x00001168 +_0223E180: .word 0x00001154 +_0223E184: .word 0x027E0000 +_0223E188: .word 0x00003FF8 + thumb_func_end ov17_0223E09C + + thumb_func_start ov17_0223E18C +ov17_0223E18C: ; 0x0223E18C + push {r3, r4, r5, lr} + ldr r1, _0223E1F8 ; =0x00001128 + add r5, r0, r1 + ldrb r1, [r5, #0x11] + cmp r1, #0 + beq _0223E1F4 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200316C + add r4, r0, #0 + mov r2, #2 + ldr r0, [r5, #0] + add r1, r4, #0 + lsl r2, r2, #8 + bl sub_020C4B18 + ldrb r0, [r5, #0x10] + cmp r0, #1 + bne _0223E1F4 + ldrh r0, [r5, #0xe] + add r1, r4, #0 + str r0, [sp] + ldrh r3, [r5, #8] + ldrh r2, [r5, #6] + ldr r0, [r5, #0] + asr r3, r3, #8 + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_020039F8 + ldrh r3, [r5, #0xa] + ldrh r1, [r5, #8] + cmp r1, r3 + bne _0223E1DA + mov r0, #0 + strb r0, [r5, #0x10] + pop {r3, r4, r5, pc} +_0223E1DA: + mov r0, #0xc + ldrsh r2, [r5, r0] + add r0, r1, r2 + cmp r2, #0 + ble _0223E1E8 + cmp r0, r3 + bge _0223E1F0 +_0223E1E8: + cmp r2, #0 + bge _0223E1F2 + cmp r0, r3 + bgt _0223E1F2 +_0223E1F0: + add r0, r3, #0 +_0223E1F2: + strh r0, [r5, #8] +_0223E1F4: + pop {r3, r4, r5, pc} + nop +_0223E1F8: .word 0x00001128 + thumb_func_end ov17_0223E18C + + thumb_func_start ov17_0223E1FC +ov17_0223E1FC: ; 0x0223E1FC + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov17_0223E18C + ldr r0, _0223E248 ; =0x00001170 + ldrb r0, [r6, r0] + cmp r0, #1 + bne _0223E23E + ldr r0, [r6, #0x58] + bl sub_02007768 + mov r4, #0 + add r5, r6, #0 +_0223E218: + ldr r0, [r5, #0x18] + cmp r0, #0 + beq _0223E222 + bl ov22_0225AFF8 +_0223E222: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0223E218 + bl ov11_0221F8F0 + ldr r0, [r6, #0x70] + bl sub_0200C7EC + bl sub_0200C808 + ldr r0, _0223E24C ; =0x04000540 + mov r1, #1 + str r1, [r0, #0] +_0223E23E: + ldr r1, [r6, #0x74] + mov r0, #0x17 + bl sub_02038A1C + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223E248: .word 0x00001170 +_0223E24C: .word 0x04000540 + thumb_func_end ov17_0223E1FC + + thumb_func_start ov17_0223E250 +ov17_0223E250: ; 0x0223E250 + push {r4, r5, lr} + sub sp, #0x8c + add r4, r0, #0 + bl sub_0201FF00 + ldr r5, _0223E370 ; =0x02253028 + add r3, sp, #0x10 + mov r2, #5 +_0223E260: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223E260 + add r0, sp, #0x10 + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + ldr r5, _0223E374 ; =0x02252FCC + add r3, sp, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223E378 ; =0x022530D8 + add r3, sp, #0x38 + mov r2, #0xa +_0223E2C0: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223E2C0 + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + add r2, sp, #0x38 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #1 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + add r2, sp, #0x54 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #3 + add r2, sp, #0x70 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r1, _0223E37C ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #2 + orr r0, r2 + strh r0, [r1] + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + add r0, r4, #0 + bl ov17_02249300 + add sp, #0x8c + pop {r4, r5, pc} + ; .align 2, 0 +_0223E370: .word 0x02253028 +_0223E374: .word 0x02252FCC +_0223E378: .word 0x022530D8 +_0223E37C: .word 0x04000008 + thumb_func_end ov17_0223E250 + + thumb_func_start ov17_0223E380 +ov17_0223E380: ; 0x0223E380 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0x74] + add r1, #0x78 + mov r2, #1 + mov r3, #2 + bl sub_0201A7E8 + mov r0, #0xb + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r4, #0x74] + add r4, #0x88 + add r1, r4, #0 + mov r2, #1 + bl sub_0201A7E8 + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov17_0223E380 + + thumb_func_start ov17_0223E3CC +ov17_0223E3CC: ; 0x0223E3CC + push {r4, r5, r6, r7} + ldr r5, [r0, #0] + ldr r3, _0223E440 ; =0x00000171 + ldrb r4, [r5, r3] + cmp r4, #1 + bne _0223E3E8 + add r3, r3, #6 + ldrb r3, [r5, r3] + cmp r3, #0 + beq _0223E3E8 + ldr r3, _0223E444 ; =0x00001C0E + mov r4, #1 + strb r4, [r0, r3] + b _0223E3EE +_0223E3E8: + ldr r3, _0223E444 ; =0x00001C0E + mov r4, #0 + strb r4, [r0, r3] +_0223E3EE: + ldr r3, _0223E444 ; =0x00001C0E + ldrb r3, [r0, r3] + cmp r3, #1 + bne _0223E402 + mov r0, #1 + str r0, [r1, #0] + mov r1, #0 + str r1, [r2, #0] + pop {r4, r5, r6, r7} + bx lr +_0223E402: + mov r3, #0x12 + ldr r6, [r0, #0] + lsl r3, r3, #4 + ldrb r4, [r6, r3] + mov r3, #0x28 + add r7, r3, #0 + add r5, r4, #0 + add r7, #0xf7 + ldrb r6, [r6, r7] + ldr r4, _0223E448 ; =0x0225312C + mul r5, r3 + lsl r6, r6, #3 + add r4, r4, r5 + ldr r4, [r6, r4] + str r4, [r1, #0] + ldr r1, [r0, #0] + add r0, r3, #0 + add r0, #0xf8 + ldrb r0, [r1, r0] + ldr r4, _0223E44C ; =0x02253130 + add r5, r0, #0 + mul r5, r3 + add r3, #0xf7 + ldrb r0, [r1, r3] + lsl r1, r0, #3 + add r0, r4, r5 + ldr r0, [r1, r0] + str r0, [r2, #0] + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_0223E440: .word 0x00000171 +_0223E444: .word 0x00001C0E +_0223E448: .word 0x0225312C +_0223E44C: .word 0x02253130 + thumb_func_end ov17_0223E3CC + + thumb_func_start ov17_0223E450 +ov17_0223E450: ; 0x0223E450 + ldr r3, _0223E454 ; =sub_02014000 + bx r3 + ; .align 2, 0 +_0223E454: .word sub_02014000 + thumb_func_end ov17_0223E450 + + thumb_func_start ov17_0223E458 +ov17_0223E458: ; 0x0223E458 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + bne _0223E466 + bl sub_02022974 +_0223E466: + ldr r4, _0223E4AC ; =0x00000AEC + mov r1, #0 + mov r2, #3 + add r6, r4, #5 +_0223E46E: + sub r3, r2, r1 + lsl r3, r3, #0x18 + add r0, r5, r1 + lsr r3, r3, #0x18 + strb r3, [r0, r4] + add r1, r1, #1 + strb r3, [r0, r6] + cmp r1, #4 + blt _0223E46E + add r0, r5, #0 + bl ov17_0224CFB8 + mov r4, #0 + mov r7, #0xad + add r6, r4, #0 + lsl r7, r7, #4 +_0223E48E: + ldr r0, [r5, #0] + mov r1, #5 + ldr r0, [r0, r6] + mov r2, #0 + bl sub_02074470 + bl ov17_0224CFA8 + add r1, r5, r4 + add r4, r4, #1 + add r6, r6, #4 + strb r0, [r1, r7] + cmp r4, #4 + blt _0223E48E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E4AC: .word 0x00000AEC + thumb_func_end ov17_0223E458 + + thumb_func_start ov17_0223E4B0 +ov17_0223E4B0: ; 0x0223E4B0 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0223E584 ; =0x000080E9 + mov r1, #2 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r2, [r5, #0x6c] + ldr r3, [r5, #0x70] + bl sub_0200CDC4 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + bl ov17_0224A20C + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224A390 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224A5A8 + add r0, r5, #0 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224A61C + add r0, r5, #0 + add r0, #0x14 + bl ov17_0224A674 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224A984 + add r0, r5, #0 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224A9F8 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224C310 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, r5, #0 + bl ov17_0224C384 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224AA94 + add r0, r5, #0 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224AB08 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224AC80 + add r0, r5, #0 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224ACF4 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224ACFC + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + add r2, r4, #0 + bl ov17_0224AFA8 + add r0, r5, #0 + bl ov17_0224B01C + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_0223E584: .word 0x000080E9 + thumb_func_end ov17_0223E4B0 + + thumb_func_start ov17_0223E588 +ov17_0223E588: ; 0x0223E588 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x70] + bl ov17_0224A210 + ldr r0, [r4, #0x70] + bl ov17_0224A428 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224A580 + ldr r0, [r4, #0x70] + bl ov17_0224A5F8 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224A650 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224A7B8 + ldr r0, [r4, #0x70] + bl ov17_0224A9D4 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224AA1C + add r0, r4, #0 + bl ov17_0224C3E4 + ldr r0, [r4, #0x70] + bl ov17_0224C360 + ldr r0, [r4, #0x70] + bl ov17_0224AAE4 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224ABB0 + ldr r0, [r4, #0x70] + bl ov17_0224ACD0 + add r0, r4, #0 + add r0, #0x14 + bl ov17_0224ACF8 + ldr r0, [r4, #0x70] + bl ov17_0224AD4C + ldr r0, [r4, #0x70] + bl ov17_0224AFF8 + add r0, r4, #0 + bl ov17_0224B058 + ldr r0, [r4, #0x70] + ldr r1, _0223E608 ; =0x000080E9 + bl sub_0200D080 + pop {r4, pc} + ; .align 2, 0 +_0223E608: .word 0x000080E9 + thumb_func_end ov17_0223E588 + + thumb_func_start ov17_0223E60C +ov17_0223E60C: ; 0x0223E60C + push {r4, lr} + sub sp, #0x18 + add r4, r0, #0 + mov r0, #0x2e + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _0223E66C ; =0x000080EA + mov r1, #3 + str r0, [sp, #0x14] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r2, [r4, #0x6c] + ldr r3, [r4, #0x70] + bl sub_0200CD7C + mov r0, #0x2e + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0223E670 ; =0x000080EB + mov r1, #3 + str r0, [sp, #0x14] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r2, [r4, #0x6c] + ldr r3, [r4, #0x70] + bl sub_0200CD7C + ldr r0, _0223E674 ; =0x0000114C + ldr r0, [r4, r0] + bl ov17_022493C4 + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 +_0223E66C: .word 0x000080EA +_0223E670: .word 0x000080EB +_0223E674: .word 0x0000114C + thumb_func_end ov17_0223E60C + + thumb_func_start ov17_0223E678 +ov17_0223E678: ; 0x0223E678 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223E678 + + thumb_func_start ov17_0223E67C +ov17_0223E67C: ; 0x0223E67C + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x17 + str r0, [sp, #0xc] + add r5, r1, #0 + ldr r2, [r4, #0x74] + add r0, r5, #0 + mov r1, #0xd + mov r3, #3 + bl sub_020070E8 + add r0, r4, #0 + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov17_0223E3CC + ldr r0, [sp, #0x10] + mov r1, #0 + bl ov17_0223F0BC + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x17 + str r0, [sp, #0xc] + ldr r2, [r4, #0x74] + add r0, r5, #0 + mov r3, #3 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #0x2d + mov r2, #0x20 + mov r3, #0x17 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #0x2d + mov r2, #0x24 + mov r3, #0x17 + bl sub_02003050 + ldr r1, [r4, #0] + ldr r0, _0223E764 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027B50 + add r5, r0, #0 + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x17 + str r0, [sp, #4] + mov r1, #1 + ldr r0, [r4, #0x74] + add r2, r1, #0 + mov r3, #0xf + bl sub_0200DD0C + add r0, r5, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #0x26 + mov r3, #0x17 + bl sub_02003050 + add r0, r4, #0 + bl ov17_0224C848 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02003164 + ldr r1, _0223E768 ; =0x00001128 + mov r2, #2 + ldr r1, [r4, r1] + lsl r2, r2, #8 + bl sub_020C4B18 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223E764: .word 0x00001988 +_0223E768: .word 0x00001128 + thumb_func_end ov17_0223E67C + + thumb_func_start ov17_0223E76C +ov17_0223E76C: ; 0x0223E76C + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223E76C + + thumb_func_start ov17_0223E770 +ov17_0223E770: ; 0x0223E770 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223E770 + + thumb_func_start ov17_0223E774 +ov17_0223E774: ; 0x0223E774 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0223E774 + + thumb_func_start ov17_0223E778 +ov17_0223E778: ; 0x0223E778 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0223E788 + bl sub_02022974 +_0223E788: + mov r1, #0x12 + mov r0, #0x17 + lsl r1, r1, #0xa + bl sub_02018144 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x17 + str r0, [sp, #4] + mov r3, #0x12 + ldr r0, _0223E7D8 ; =ov17_0223E800 + ldr r1, _0223E7DC ; =ov17_0223E81C + lsl r3, r3, #0xa + bl sub_02014014 + str r0, [r4, #0xc] + bl sub_02014784 + add r2, r0, #0 + mov r0, #1 + mov r1, #0xe1 + lsl r0, r0, #0xc + lsl r1, r1, #0xe + bl sub_020206BC + mov r0, #0x3d + mov r1, #3 + mov r2, #0x17 + bl sub_020144C4 + add r1, r0, #0 + ldr r0, [r4, #0xc] + mov r2, #0xa + mov r3, #1 + bl sub_020144CC + add sp, #8 + pop {r4, pc} + nop +_0223E7D8: .word ov17_0223E800 +_0223E7DC: .word ov17_0223E81C + thumb_func_end ov17_0223E778 + + thumb_func_start ov17_0223E7E0 +ov17_0223E7E0: ; 0x0223E7E0 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02014730 + add r5, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0201411C + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0223E7E0 + + thumb_func_start ov17_0223E800 +ov17_0223E800: ; 0x0223E800 + push {r4, lr} + ldr r3, _0223E818 ; =0x02100DEC + mov r2, #0 + ldr r3, [r3, #0] + blx r3 + add r4, r0, #0 + bl sub_020145B4 + lsl r0, r4, #0x10 + lsr r0, r0, #0xd + pop {r4, pc} + nop +_0223E818: .word 0x02100DEC + thumb_func_end ov17_0223E800 + + thumb_func_start ov17_0223E81C +ov17_0223E81C: ; 0x0223E81C + push {r4, lr} + ldr r3, _0223E834 ; =0x02100DF4 + mov r2, #0 + ldr r3, [r3, #0] + blx r3 + add r4, r0, #0 + bl sub_020145F4 + lsl r0, r4, #0x10 + lsr r0, r0, #0xd + pop {r4, pc} + nop +_0223E834: .word 0x02100DF4 + thumb_func_end ov17_0223E81C + + thumb_func_start ov17_0223E838 +ov17_0223E838: ; 0x0223E838 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223E87A + ldr r1, [r5, #0] + ldr r0, _0223E89C ; =0x00000177 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0223E85A + ldr r0, [r4, #4] + cmp r0, #0x78 + bge _0223E85A + add r0, r0, #1 + str r0, [r4, #4] + b _0223E898 +_0223E85A: + ldr r0, _0223E8A0 ; =0x00001174 + ldr r3, _0223E8A4 ; =0x00000AEC + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0xa + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223E898 + mov r0, #0 + str r0, [r4, #4] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223E898 +_0223E87A: + ldr r4, _0223E8A8 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + ldr r0, _0223E8A0 ; =0x00001174 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223E898 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223E898: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223E89C: .word 0x00000177 +_0223E8A0: .word 0x00001174 +_0223E8A4: .word 0x00000AEC +_0223E8A8: .word 0x00000127 + thumb_func_end ov17_0223E838 + + thumb_func_start ov17_0223E8AC +ov17_0223E8AC: ; 0x0223E8AC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223E8BE + cmp r0, #1 + beq _0223E912 + b _0223E934 +_0223E8BE: + ldr r0, _0223E93C ; =0x00000B53 + mov r2, #0 + strb r2, [r5, r0] + add r1, r0, #1 + strb r2, [r5, r1] + ldr r2, [r5, #0] + ldr r1, _0223E940 ; =0x00000123 + sub r0, r0, #7 + ldrb r2, [r2, r1] + strb r2, [r5, r0] + ldr r2, [r5, #0] + sub r0, r1, #3 + ldrb r0, [r2, r0] + bl ov17_0224C57C + mov r1, #0xb5 + lsl r1, r1, #4 + strb r0, [r5, r1] + ldr r0, [r5, #0] + bl sub_0209590C + cmp r0, #1 + bne _0223E8F0 + mov r1, #2 + b _0223E8F2 +_0223E8F0: + mov r1, #1 +_0223E8F2: + ldr r0, _0223E944 ; =0x00000B52 + ldr r3, _0223E948 ; =0x00000B1C + strb r1, [r5, r0] + ldr r0, _0223E94C ; =0x00001174 + add r1, r5, #0 + add r0, r5, r0 + mov r2, #9 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223E938 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223E938 +_0223E912: + ldr r0, _0223E94C ; =0x00001174 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223E950 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223E938 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223E938 +_0223E934: + mov r0, #1 + pop {r3, r4, r5, pc} +_0223E938: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223E93C: .word 0x00000B53 +_0223E940: .word 0x00000123 +_0223E944: .word 0x00000B52 +_0223E948: .word 0x00000B1C +_0223E94C: .word 0x00001174 +_0223E950: .word 0x00000127 + thumb_func_end ov17_0223E8AC + + thumb_func_start ov17_0223E954 +ov17_0223E954: ; 0x0223E954 + push {r4, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223E99C ; =0x00001174 + bne _0223E97A + add r0, r2, r0 + add r1, r2, #0 + mov r2, #3 + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223E996 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223E996 +_0223E97A: + ldr r3, [r2, #0] + ldr r4, _0223E9A0 ; =0x00000127 + add r0, r2, r0 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223E996 + mov r0, #1 + pop {r4, pc} +_0223E996: + mov r0, #0 + pop {r4, pc} + nop +_0223E99C: .word 0x00001174 +_0223E9A0: .word 0x00000127 + thumb_func_end ov17_0223E954 + + thumb_func_start ov17_0223E9A4 +ov17_0223E9A4: ; 0x0223E9A4 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + ldrh r1, [r5] + add r4, r0, #0 + cmp r1, #4 + bls _0223E9B4 + b _0223EB66 +_0223E9B4: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E9C0: ; jump table + .short _0223E9CA - _0223E9C0 - 2 ; case 0 + .short _0223EAEA - _0223E9C0 - 2 ; case 1 + .short _0223EB06 - _0223E9C0 - 2 ; case 2 + .short _0223EB28 - _0223E9C0 - 2 ; case 3 + .short _0223EB44 - _0223E9C0 - 2 ; case 4 +_0223E9CA: + add r1, sp, #4 + add r2, sp, #0 + bl ov17_0223E3CC + ldr r0, [sp, #4] + ldr r3, _0223EB74 ; =0x02253084 + add r2, r0, #0 + mov r1, #0xc + mul r2, r1 + ldr r0, _0223EB78 ; =0x00000ACC + add r2, r3, r2 + str r2, [r4, r0] + ldr r2, [sp, #4] + ldr r0, _0223EB7C ; =0x0112A880 + add r3, r2, #0 + mul r3, r1 + ldr r1, _0223EB80 ; =0x02253086 + ldrh r1, [r1, r3] + bl sub_020E1F6C + ldr r1, _0223EB84 ; =0x00000B04 + str r0, [r4, r1] + ldr r0, [sp] + mov r1, #1 + bl ov17_0223F0BC + ldr r1, _0223EB84 ; =0x00000B04 + mov r3, #0 + ldr r1, [r4, r1] + ldr r2, _0223EB88 ; =0x00001388 + mul r0, r1 + mov ip, r3 + mov r1, ip + add r0, r0, r2 + adc r1, r3 + lsl r2, r2, #1 + bl sub_020E1ED4 + ldr r1, _0223EB8C ; =0x00000B08 + str r0, [r4, r1] + ldr r2, [sp, #4] + mov r0, #0xc + add r3, r2, #0 + ldr r2, _0223EB80 ; =0x02253086 + mul r3, r0 + ldrh r3, [r2, r3] + add r2, r1, #0 + add r2, #0x10 + strh r3, [r4, r2] + sub r2, r1, #4 + ldr r6, [sp, #4] + ldr r3, [r4, r2] + add r2, r6, #0 + ldr r6, _0223EB90 ; =0x0225308A + mul r2, r0 + ldrb r2, [r6, r2] + add r6, r3, #0 + mul r6, r2 + add r2, r1, #4 + str r6, [r4, r2] + ldr r3, [sp, #4] + sub r2, r1, #4 + add r6, r3, #0 + mul r6, r0 + ldr r0, _0223EB94 ; =0x0225308B + ldr r2, [r4, r2] + ldrb r0, [r0, r6] + add r3, r2, #0 + mul r3, r0 + add r0, r1, #0 + add r0, #8 + str r3, [r4, r0] + sub r0, r1, #4 + ldr r0, [r4, r0] + mov r1, #0x30 + bl sub_020E2178 + ldr r1, _0223EB98 ; =0x00000B14 + mov r2, #0xc + str r0, [r4, r1] + ldr r0, [sp, #4] + add r3, r0, #0 + ldr r0, _0223EB9C ; =0x02253089 + mul r3, r2 + ldrb r3, [r0, r3] + add r0, r1, #6 + strb r3, [r4, r0] + ldr r0, [sp, #4] + mul r2, r0 + ldr r0, _0223EB74 ; =0x02253084 + ldrh r2, [r0, r2] + add r0, r1, #0 + sub r0, #0x14 + str r2, [r4, r0] + ldr r2, [sp] + add r0, r1, #7 + strb r2, [r4, r0] + add r0, r1, #0 + sub r0, #0x48 + ldr r0, [r4, r0] + add r2, r1, #0 + ldrh r3, [r0] + add r2, #0x2c + strh r3, [r4, r2] + add r2, r1, #0 + ldrh r3, [r0, #2] + add r2, #0x2e + strh r3, [r4, r2] + add r2, r1, #0 + ldrh r3, [r0, #4] + add r2, #0x30 + strh r3, [r4, r2] + add r2, r1, #0 + ldrh r3, [r0, #6] + add r2, #0x32 + strh r3, [r4, r2] + add r2, r1, #0 + ldrh r3, [r0, #8] + add r2, #0x34 + strh r3, [r4, r2] + ldrh r2, [r0, #0xa] + add r0, r1, #0 + add r0, #0x36 + strh r2, [r4, r0] + add r0, r1, #0 + sub r0, #0x10 + ldr r2, [r4, r0] + add r0, r1, #0 + add r0, #0x10 + str r2, [r4, r0] + add r0, r1, #0 + sub r0, #0xc + ldr r2, [r4, r0] + add r0, r1, #0 + add r0, #0x14 + str r2, [r4, r0] + add r0, r1, #4 + ldrh r0, [r4, r0] + add r1, #0x18 + strh r0, [r4, r1] + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223EB6C +_0223EAEA: + ldr r0, _0223EBA0 ; =0x00001174 + ldr r3, _0223EBA4 ; =0x00000AEC + add r0, r4, r0 + add r1, r4, #0 + mov r2, #0xa + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223EB6C + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223EB6C +_0223EB06: + ldr r0, _0223EBA0 ; =0x00001174 + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223EBA8 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223EB6C + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223EB6C +_0223EB28: + ldr r0, _0223EBA0 ; =0x00001174 + ldr r3, _0223EBAC ; =0x00000B1C + add r0, r4, r0 + add r1, r4, #0 + mov r2, #0xb + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223EB6C + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223EB6C +_0223EB44: + ldr r0, _0223EBA0 ; =0x00001174 + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0223EBA8 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223EB6C + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _0223EB6C +_0223EB66: + add sp, #8 + mov r0, #1 + pop {r4, r5, r6, pc} +_0223EB6C: + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0223EB74: .word 0x02253084 +_0223EB78: .word 0x00000ACC +_0223EB7C: .word 0x0112A880 +_0223EB80: .word 0x02253086 +_0223EB84: .word 0x00000B04 +_0223EB88: .word 0x00001388 +_0223EB8C: .word 0x00000B08 +_0223EB90: .word 0x0225308A +_0223EB94: .word 0x0225308B +_0223EB98: .word 0x00000B14 +_0223EB9C: .word 0x02253089 +_0223EBA0: .word 0x00001174 +_0223EBA4: .word 0x00000AEC +_0223EBA8: .word 0x00000127 +_0223EBAC: .word 0x00000B1C + thumb_func_end ov17_0223E9A4 + + thumb_func_start ov17_0223EBB0 +ov17_0223EBB0: ; 0x0223EBB0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrh r0, [r1] + str r1, [sp] + cmp r0, #0 + bne _0223EC0E + mov r1, #0xaf + lsl r1, r1, #4 + ldrb r0, [r5, r1] + mov r4, #0 + add r2, r5, r0 + sub r0, r1, #4 + ldrb r0, [r2, r0] + add r1, #0x2c + strb r0, [r5, r1] + ldr r0, _0223EC18 ; =0x00000AF1 + add r1, r0, #0 + add r1, #0x2d +_0223EBD4: + add r3, r5, r4 + ldrb r2, [r3, r0] + add r4, r4, #1 + cmp r4, #4 + strb r2, [r3, r1] + blt _0223EBD4 + ldr r1, [r5, #0] + ldr r0, _0223EC1C ; =0x00000127 + ldrb r6, [r1, r0] + cmp r6, #4 + bge _0223EC02 + lsl r0, r6, #2 + mov r7, #0xb3 + add r4, r5, r0 + lsl r7, r7, #4 +_0223EBF2: + ldr r0, [r5, #0] + bl sub_02094E98 + str r0, [r4, r7] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0223EBF2 +_0223EC02: + ldr r0, [sp] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp] + strh r1, [r0] + b _0223EC12 +_0223EC0E: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223EC12: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223EC18: .word 0x00000AF1 +_0223EC1C: .word 0x00000127 + thumb_func_end ov17_0223EBB0 + + thumb_func_start ov17_0223EC20 +ov17_0223EC20: ; 0x0223EC20 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223EC68 ; =0x00001174 + bne _0223EC48 + ldr r3, _0223EC6C ; =0x00000B1C + add r0, r5, r0 + add r1, r5, #0 + mov r2, #7 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223EC64 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223EC64 +_0223EC48: + ldr r4, _0223EC70 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223EC64 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223EC64: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223EC68: .word 0x00001174 +_0223EC6C: .word 0x00000B1C +_0223EC70: .word 0x00000127 + thumb_func_end ov17_0223EC20 + + thumb_func_start ov17_0223EC74 +ov17_0223EC74: ; 0x0223EC74 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223ECBC ; =0x00001174 + bne _0223EC9C + ldr r3, _0223ECC0 ; =0x00000B1C + add r0, r5, r0 + add r1, r5, #0 + mov r2, #5 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223ECB8 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223ECB8 +_0223EC9C: + ldr r4, _0223ECC4 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223ECB8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223ECB8: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223ECBC: .word 0x00001174 +_0223ECC0: .word 0x00000B1C +_0223ECC4: .word 0x00000127 + thumb_func_end ov17_0223EC74 + + thumb_func_start ov17_0223ECC8 +ov17_0223ECC8: ; 0x0223ECC8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + ldr r0, _0223ED10 ; =0x00001174 + bne _0223ECF0 + ldr r3, _0223ED14 ; =0x00000B1C + add r0, r5, r0 + add r1, r5, #0 + mov r2, #8 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223ED0C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223ED0C +_0223ECF0: + ldr r4, _0223ED18 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223ED0C + mov r0, #1 + pop {r3, r4, r5, pc} +_0223ED0C: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223ED10: .word 0x00001174 +_0223ED14: .word 0x00000B1C +_0223ED18: .word 0x00000127 + thumb_func_end ov17_0223ECC8 + + thumb_func_start ov17_0223ED1C +ov17_0223ED1C: ; 0x0223ED1C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + bne _0223ED72 + mov r1, #0xaf + lsl r1, r1, #4 + ldrb r0, [r5, r1] + cmp r0, #3 + blo _0223ED36 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223ED36: + add r0, r1, #2 + ldrb r0, [r5, r0] + add r1, #0x5c + strb r0, [r5, r1] + mov r0, #0x12 + ldr r1, [r5, #0] + lsl r0, r0, #4 + ldrb r0, [r1, r0] + bl ov17_0224C57C + mov r3, #0xb5 + lsl r3, r3, #4 + strb r0, [r5, r3] + add r0, r3, #2 + mov r1, #0 + strb r1, [r5, r0] + ldr r0, _0223ED94 ; =0x00001174 + sub r3, #0x34 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #6 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223ED90 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223ED90 +_0223ED72: + ldr r4, _0223ED98 ; =0x00000127 + ldr r3, [r5, #0] + sub r2, r4, #4 + ldrb r1, [r3, r4] + ldr r0, _0223ED94 ; =0x00001174 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + add r0, r5, r0 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223ED90 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223ED90: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223ED94: .word 0x00001174 +_0223ED98: .word 0x00000127 + thumb_func_end ov17_0223ED1C + + thumb_func_start ov17_0223ED9C +ov17_0223ED9C: ; 0x0223ED9C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223EDB2 + cmp r0, #1 + beq _0223EDDC + cmp r0, #2 + beq _0223EDF8 + b _0223EE1A +_0223EDB2: + ldr r0, _0223EE40 ; =0x00000AF1 + ldr r1, _0223EE40 ; =0x00000AF1 + ldrb r7, [r3, r0] + mov r6, #0 + add r0, r0, #1 +_0223EDBC: + add r5, r3, r6 + ldrb r2, [r5, r0] + add r6, r6, #1 + cmp r6, #3 + strb r2, [r5, r1] + blt _0223EDBC + ldr r0, _0223EE44 ; =0x00000AF4 + strb r7, [r3, r0] + sub r1, r0, #4 + ldrb r1, [r3, r1] + sub r0, r0, #4 + add r1, r1, #1 + strb r1, [r3, r0] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_0223EDDC: + ldr r0, _0223EE48 ; =0x00001174 + ldr r5, _0223EE4C ; =0x00000AEC + add r0, r3, r0 + add r1, r3, #0 + mov r2, #0xa + add r3, r3, r5 + bl ov17_0224F30C + cmp r0, #1 + bne _0223EE3C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223EE3C +_0223EDF8: + ldr r0, _0223EE48 ; =0x00001174 + ldr r5, [r3, #0] + add r0, r3, r0 + ldr r3, _0223EE50 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r5, r3] + sub r3, #0xb + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223EE3C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223EE3C +_0223EE1A: + mov r1, #0xaf + lsl r1, r1, #4 + ldrb r0, [r3, r1] + cmp r0, #4 + bhs _0223EE38 + add r0, r1, #0 + add r0, #0x2d + ldrb r0, [r3, r0] + add r1, #0x2d + add r0, r0, #1 + strb r0, [r3, r1] + mov r0, #4 + strh r0, [r4, #2] + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_0223EE38: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223EE3C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223EE40: .word 0x00000AF1 +_0223EE44: .word 0x00000AF4 +_0223EE48: .word 0x00001174 +_0223EE4C: .word 0x00000AEC +_0223EE50: .word 0x00000127 + thumb_func_end ov17_0223ED9C + + thumb_func_start ov17_0223EE54 +ov17_0223EE54: ; 0x0223EE54 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223EE66 + cmp r0, #1 + beq _0223EE82 + b _0223EEA4 +_0223EE66: + ldr r0, _0223EEAC ; =0x00001174 + ldr r3, _0223EEB0 ; =0x00000B1C + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0xc + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0223EEA8 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223EEA8 +_0223EE82: + ldr r0, _0223EEAC ; =0x00001174 + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _0223EEB4 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223EEA8 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223EEA8 +_0223EEA4: + mov r0, #1 + pop {r3, r4, r5, pc} +_0223EEA8: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223EEAC: .word 0x00001174 +_0223EEB0: .word 0x00000B1C +_0223EEB4: .word 0x00000127 + thumb_func_end ov17_0223EE54 + + thumb_func_start ov17_0223EEB8 +ov17_0223EEB8: ; 0x0223EEB8 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp] + ldrh r0, [r1] + str r1, [sp, #4] + cmp r0, #0 + beq _0223EED2 + cmp r0, #1 + beq _0223EFC8 + cmp r0, #2 + bne _0223EED0 + b _0223EFEC +_0223EED0: + b _0223F014 +_0223EED2: + mov r1, #0 + mov r6, #0x4b + ldr r2, [sp] + ldr r5, _0223F020 ; =0x00000AF6 + add r3, r1, #0 + lsl r6, r6, #2 +_0223EEDE: + ldr r4, [sp] + ldrsh r0, [r2, r5] + ldr r4, [r4, #0] + add r1, r1, #1 + add r4, r4, r3 + strh r0, [r4, r6] + add r2, r2, #2 + add r3, #0xc + cmp r1, #4 + blt _0223EEDE + ldr r0, [sp] + mov r1, #0 + ldr r0, [r0, #0] + add r2, sp, #0x1c + bl ov17_02251930 + ldr r0, [sp] + mov r1, #1 + ldr r0, [r0, #0] + add r2, sp, #0x14 + bl ov17_02251930 + mov r6, #0 + add r2, sp, #0x14 + add r3, sp, #0x1c + add r4, sp, #0xc + add r5, sp, #8 + add r7, r6, #0 +_0223EF16: + mov r0, #0 + ldrsh r1, [r3, r0] + ldrsh r0, [r2, r7] + strb r6, [r5] + add r6, r6, #1 + add r0, r1, r0 + strh r0, [r4] + add r2, r2, #2 + add r3, r3, #2 + add r4, r4, #2 + add r5, r5, #1 + cmp r6, #4 + blt _0223EF16 + mov r6, #0 + sub r7, r6, #2 +_0223EF34: + mov r3, #3 + cmp r6, #3 + bge _0223EF66 + add r4, sp, #0x10 + add r5, sp, #8 + add r4, #2 + add r5, #3 +_0223EF42: + mov r0, #0 + ldrsh r0, [r4, r0] + ldrsh r1, [r4, r7] + cmp r1, r0 + bge _0223EF5C + strh r1, [r4] + sub r1, r4, #2 + strh r0, [r1] + sub r0, r5, #1 + ldrb r2, [r5] + ldrb r1, [r0] + strb r1, [r5] + strb r2, [r0] +_0223EF5C: + sub r3, r3, #1 + sub r4, r4, #2 + sub r5, r5, #1 + cmp r3, r6 + bgt _0223EF42 +_0223EF66: + add r6, r6, #1 + cmp r6, #3 + blt _0223EF34 + ldr r1, _0223F024 ; =0x00000172 + mov r4, #0 + add r3, sp, #8 +_0223EF72: + ldr r0, [sp] + ldrb r2, [r3] + ldr r0, [r0, #0] + add r3, r3, #1 + add r0, r0, r4 + add r4, r4, #1 + strb r2, [r0, r1] + cmp r4, #4 + blt _0223EF72 + ldr r2, _0223F028 ; =0x00000B53 + ldr r1, [sp] + mov r0, #0 + strb r0, [r1, r2] + add r3, r2, #1 + strb r0, [r1, r3] + ldr r1, [r1, #0] + ldr r4, _0223F024 ; =0x00000172 + sub r3, r2, #7 + ldrb r5, [r1, r4] + ldr r1, [sp] + sub r4, #0x51 + strb r5, [r1, r3] + ldr r1, [r1, #0] + ldrb r1, [r1, r4] + cmp r1, #0 + beq _0223EFAE + cmp r1, #1 + beq _0223EFAE + cmp r1, #2 + bne _0223EFB8 +_0223EFAE: + ldr r1, _0223F02C ; =0x00000B52 + ldr r0, [sp] + mov r2, #6 + strb r2, [r0, r1] + b _0223EFBE +_0223EFB8: + ldr r1, [sp] + sub r2, r2, #1 + strb r0, [r1, r2] +_0223EFBE: + ldr r0, [sp, #4] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp, #4] + strh r1, [r0] +_0223EFC8: + ldr r1, _0223F030 ; =0x00001174 + ldr r0, [sp] + ldr r4, _0223F034 ; =0x00000B1C + add r0, r0, r1 + ldr r1, [sp] + mov r2, #9 + add r3, r1, #0 + add r3, r3, r4 + bl ov17_0224F30C + cmp r0, #1 + bne _0223F01A + ldr r0, [sp, #4] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp, #4] + strh r1, [r0] + b _0223F01A +_0223EFEC: + ldr r0, [sp] + ldr r4, _0223F038 ; =0x00000127 + ldr r3, [r0, #0] + ldr r1, _0223F030 ; =0x00001174 + sub r2, r4, #4 + add r0, r0, r1 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223F01A + ldr r0, [sp, #4] + ldrh r0, [r0] + add r1, r0, #1 + ldr r0, [sp, #4] + strh r1, [r0] + b _0223F01A +_0223F014: + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223F01A: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F020: .word 0x00000AF6 +_0223F024: .word 0x00000172 +_0223F028: .word 0x00000B53 +_0223F02C: .word 0x00000B52 +_0223F030: .word 0x00001174 +_0223F034: .word 0x00000B1C +_0223F038: .word 0x00000127 + thumb_func_end ov17_0223EEB8 + + thumb_func_start ov17_0223F03C +ov17_0223F03C: ; 0x0223F03C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0223F04E + cmp r0, #1 + beq _0223F052 + b _0223F082 +_0223F04E: + add r0, r0, #1 + strh r0, [r4] +_0223F052: + ldr r3, _0223F0B0 ; =0x00000172 + mov r0, #0 + add r1, sp, #0 +_0223F058: + ldr r5, [r2, #0] + add r5, r5, r0 + ldrb r5, [r5, r3] + add r0, r0, #1 + strb r5, [r1] + add r1, r1, #1 + cmp r0, #4 + blt _0223F058 + ldr r0, _0223F0B4 ; =0x00001174 + add r1, r2, #0 + add r0, r2, r0 + mov r2, #4 + add r3, sp, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _0223F0AA + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0223F0AA +_0223F082: + ldr r4, _0223F0B8 ; =0x00000127 + ldr r0, _0223F0B4 ; =0x00001174 + add r1, r4, #0 + ldr r3, [r2, #0] + add r1, #0x50 + add r0, r2, r0 + ldrb r2, [r3, r4] + ldrb r1, [r3, r1] + sub r1, r2, r1 + sub r2, r4, #4 + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + sub r1, r1, #1 + bl ov17_0224F4B8 + cmp r0, #1 + bne _0223F0AA + mov r0, #3 + pop {r3, r4, r5, pc} +_0223F0AA: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223F0B0: .word 0x00000172 +_0223F0B4: .word 0x00001174 +_0223F0B8: .word 0x00000127 + thumb_func_end ov17_0223F03C + + thumb_func_start ov17_0223F0BC +ov17_0223F0BC: ; 0x0223F0BC + push {r3, lr} + cmp r1, #4 + bhi _0223F104 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223F0CE: ; jump table + .short _0223F0FC - _0223F0CE - 2 ; case 0 + .short _0223F0EA - _0223F0CE - 2 ; case 1 + .short _0223F0E2 - _0223F0CE - 2 ; case 2 + .short _0223F0D8 - _0223F0CE - 2 ; case 3 + .short _0223F0F2 - _0223F0CE - 2 ; case 4 +_0223F0D8: + lsl r1, r0, #2 + ldr r0, _0223F10C ; =0x02252FC7 + ldrb r0, [r0, r1] + lsl r0, r0, #3 + pop {r3, pc} +_0223F0E2: + lsl r1, r0, #2 + ldr r0, _0223F10C ; =0x02252FC7 + ldrb r0, [r0, r1] + pop {r3, pc} +_0223F0EA: + lsl r1, r0, #2 + ldr r0, _0223F110 ; =0x02252FC6 + ldrb r0, [r0, r1] + pop {r3, pc} +_0223F0F2: + lsl r1, r0, #2 + ldr r0, _0223F110 ; =0x02252FC6 + ldrb r0, [r0, r1] + lsl r0, r0, #1 + pop {r3, pc} +_0223F0FC: + lsl r1, r0, #2 + ldr r0, _0223F114 ; =0x02252FC4 + ldrh r0, [r0, r1] + pop {r3, pc} +_0223F104: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_0223F10C: .word 0x02252FC7 +_0223F110: .word 0x02252FC6 +_0223F114: .word 0x02252FC4 + thumb_func_end ov17_0223F0BC + + .rodata + + + .global Unk_ov17_02252FC4 +Unk_ov17_02252FC4: ; 0x02252FC4 + .incbin "incbin/overlay17_rodata.bin", 0x238, 0x240 - 0x238 + + .global Unk_ov17_02252FCC +Unk_ov17_02252FCC: ; 0x02252FCC + .incbin "incbin/overlay17_rodata.bin", 0x240, 0x250 - 0x240 + + .global Unk_ov17_02252FDC +Unk_ov17_02252FDC: ; 0x02252FDC + .incbin "incbin/overlay17_rodata.bin", 0x250, 0x264 - 0x250 + + .global Unk_ov17_02252FF0 +Unk_ov17_02252FF0: ; 0x02252FF0 + .incbin "incbin/overlay17_rodata.bin", 0x264, 0x27C - 0x264 + + .global Unk_ov17_02253008 +Unk_ov17_02253008: ; 0x02253008 + .incbin "incbin/overlay17_rodata.bin", 0x27C, 0x29C - 0x27C + + .global Unk_ov17_02253028 +Unk_ov17_02253028: ; 0x02253028 + .incbin "incbin/overlay17_rodata.bin", 0x29C, 0x2C4 - 0x29C + + .global Unk_ov17_02253050 +Unk_ov17_02253050: ; 0x02253050 + .incbin "incbin/overlay17_rodata.bin", 0x2C4, 0x2F8 - 0x2C4 + + .global Unk_ov17_02253084 +Unk_ov17_02253084: ; 0x02253084 + .incbin "incbin/overlay17_rodata.bin", 0x2F8, 0x34C - 0x2F8 + + .global Unk_ov17_022530D8 +Unk_ov17_022530D8: ; 0x022530D8 + .incbin "incbin/overlay17_rodata.bin", 0x34C, 0x3A0 - 0x34C + + .global Unk_ov17_0225312C +Unk_ov17_0225312C: ; 0x0225312C + .incbin "incbin/overlay17_rodata.bin", 0x3A0, 0xA0 + diff --git a/asm/ov17_0223F118.s b/asm/ov17_0223F118.s new file mode 100644 index 000000000..f0958add3 --- /dev/null +++ b/asm/ov17_0223F118.s @@ -0,0 +1,919 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0223F118 +ov17_0223F118: ; 0x0223F118 + push {r3, lr} + ldr r0, _0223F134 ; =0x0000000B + mov r1, #2 + bl sub_02006590 + ldr r0, _0223F138 ; =0x0000000C + mov r1, #2 + bl sub_02006590 + ldr r0, _0223F13C ; =0x00000016 + mov r1, #2 + bl sub_02006590 + pop {r3, pc} + ; .align 2, 0 +_0223F134: .word 0x0000000B +_0223F138: .word 0x0000000C +_0223F13C: .word 0x00000016 + thumb_func_end ov17_0223F118 + + thumb_func_start ov17_0223F140 +ov17_0223F140: ; 0x0223F140 + push {r3, lr} + sub sp, #8 + mov r2, #2 + ldr r1, _0223F158 ; =ov17_0223F15C + str r2, [sp] + str r1, [sp, #4] + mov r1, #0 + add r3, r1, #0 + bl sub_02024220 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 +_0223F158: .word ov17_0223F15C + thumb_func_end ov17_0223F140 + + thumb_func_start ov17_0223F15C +ov17_0223F15C: ; 0x0223F15C + push {r3, lr} + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _0223F1C8 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r2, [r0] + ldr r1, _0223F1CC ; =0xFFFFCFFD + and r2, r1 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0223F1D0 ; =0x0000CFFB + and r3, r2 + strh r3, [r0] + ldrh r3, [r0] + sub r2, #0x1c + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r0, #0 + ldr r2, _0223F1D4 ; =0x00007FFF + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _0223F1D8 ; =0xBFFF0000 + ldr r0, _0223F1DC ; =0x04000580 + str r1, [r0, #0] + pop {r3, pc} + ; .align 2, 0 +_0223F1C8: .word 0x04000008 +_0223F1CC: .word 0xFFFFCFFD +_0223F1D0: .word 0x0000CFFB +_0223F1D4: .word 0x00007FFF +_0223F1D8: .word 0xBFFF0000 +_0223F1DC: .word 0x04000580 + thumb_func_end ov17_0223F15C + + thumb_func_start ov17_0223F1E0 +ov17_0223F1E0: ; 0x0223F1E0 + ldr r3, _0223F1E4 ; =sub_020242C4 + bx r3 + ; .align 2, 0 +_0223F1E4: .word sub_020242C4 + thumb_func_end ov17_0223F1E0 + + thumb_func_start ov17_0223F1E8 +ov17_0223F1E8: ; 0x0223F1E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + str r0, [sp, #0x18] + str r1, [sp, #0x1c] + str r2, [sp, #0x20] + ldr r0, [sp, #0x90] + ldr r1, [sp, #0x8c] + mov r2, #0 + str r3, [sp, #0x24] + ldr r5, [sp, #0x88] + ldr r4, [sp, #0xa0] + bl sub_02002D7C + add r7, r0, #0 + asr r1, r7, #2 + lsr r1, r1, #0x1d + add r1, r7, r1 + asr r6, r1, #3 + mov r1, #8 + bl sub_020BD140 + cmp r0, #0 + beq _0223F218 + add r6, r6, #1 +_0223F218: + add r0, sp, #0x34 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + lsl r2, r6, #0x18 + ldr r0, [sp, #0x1c] + add r1, sp, #0x34 + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x94] + ldr r1, [sp, #0x90] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r2, [sp, #0x8c] + add r0, sp, #0x34 + str r3, [sp, #0x14] + bl sub_0201D7E0 + ldr r2, [sp, #0x18] + add r0, sp, #0x34 + mov r1, #1 + bl sub_02012898 + mov r1, #1 + add r2, r1, #0 + add r3, sp, #0x28 + bl sub_0201ED94 + ldr r0, [sp, #0xa8] + cmp r0, #1 + bne _0223F270 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r0, r0, #1 + sub r4, r4, r0 +_0223F270: + ldr r0, [sp, #0x24] + str r0, [sp, #0x44] + add r0, sp, #0x34 + str r0, [sp, #0x48] + ldr r0, [sp, #0x20] + bl sub_0200D9B0 + str r0, [sp, #0x4c] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x9c] + bl sub_0200D04C + str r0, [sp, #0x50] + mov r0, #0 + str r0, [sp, #0x54] + ldr r0, [sp, #0x2c] + str r4, [sp, #0x5c] + str r0, [sp, #0x58] + ldr r0, [sp, #0xa4] + sub r0, #8 + str r0, [sp, #0x60] + ldr r0, [sp, #0xac] + str r0, [sp, #0x64] + ldr r0, [sp, #0xb0] + str r0, [sp, #0x68] + mov r0, #1 + str r0, [sp, #0x6c] + ldr r0, [sp, #0x18] + str r0, [sp, #0x70] + add r0, sp, #0x44 + bl sub_020127E8 + ldr r1, [sp, #0x98] + add r6, r0, #0 + cmp r1, #0 + beq _0223F2BC + bl sub_02012A90 +_0223F2BC: + ldr r2, [sp, #0xa4] + add r0, r6, #0 + add r1, r4, #0 + sub r2, #8 + bl sub_020128C4 + add r0, sp, #0x34 + bl sub_0201A8FC + str r6, [r5, #0] + add r3, sp, #0x28 + ldmia r3!, {r0, r1} + add r2, r5, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + strh r7, [r5, #0x10] + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0223F1E8 + + thumb_func_start ov17_0223F2E4 +ov17_0223F2E4: ; 0x0223F2E4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02012870 + add r0, r4, #4 + bl sub_0201EE28 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0223F2E4 + + thumb_func_start ov17_0223F2F8 +ov17_0223F2F8: ; 0x0223F2F8 + cmp r3, #1 + bne _0223F302 + ldrh r3, [r0, #0x10] + lsr r3, r3, #1 + sub r1, r1, r3 +_0223F302: + ldr r3, _0223F30C ; =sub_020128C4 + ldr r0, [r0, #0] + sub r2, #8 + bx r3 + nop +_0223F30C: .word sub_020128C4 + thumb_func_end ov17_0223F2F8 + + thumb_func_start ov17_0223F310 +ov17_0223F310: ; 0x0223F310 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r3, r1, #0 + mov r0, #1 + mov r1, #0x1a + mov r2, #0xcf + bl sub_0200B144 + add r5, r0, #0 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + bl sub_0200B190 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0223F310 + + thumb_func_start ov17_0223F334 +ov17_0223F334: ; 0x0223F334 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, r1, #0 + ldr r1, _0223F36C ; =0x00000122 + ldrb r1, [r5, r1] + bl ov17_02252A9C + add r7, r0, #0 + mov r6, #0 + add r4, r5, #0 +_0223F348: + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r1, r7, #0 + bl ov17_02252A70 + ldr r1, _0223F370 ; =0x0000012A + add r6, r6, #1 + strh r0, [r4, r1] + add r5, r5, #4 + add r4, #0xc + cmp r6, #4 + blt _0223F348 + add r0, r7, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F36C: .word 0x00000122 +_0223F370: .word 0x0000012A + thumb_func_end ov17_0223F334 + + thumb_func_start ov17_0223F374 +ov17_0223F374: ; 0x0223F374 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + ldr r4, [sp] + mov r0, #0 + str r0, [sp, #0x10] + add r0, r4, #0 + str r0, [sp, #4] +_0223F384: + ldr r0, [r4, #0] + mov r1, #6 + mov r2, #0 + bl sub_02074470 + mov r6, #0x64 + add r5, r0, #0 + add r0, r6, #0 + ldr r1, [sp] + add r0, #0xbb + ldrb r0, [r1, r0] + cmp r0, #4 + bls _0223F3A0 + b _0223F512 +_0223F3A0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223F3AC: ; jump table + .short _0223F3B6 - _0223F3AC - 2 ; case 0 + .short _0223F3FC - _0223F3AC - 2 ; case 1 + .short _0223F442 - _0223F3AC - 2 ; case 2 + .short _0223F488 - _0223F3AC - 2 ; case 3 + .short _0223F4CE - _0223F3AC - 2 ; case 4 +_0223F3B6: + ldr r0, [r4, #0] + mov r1, #0x13 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0x17 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0x14 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r6, #0 + add r0, #0xa0 + cmp r5, r0 + beq _0223F3F4 + add r0, r6, #0 + add r0, #0xa1 + cmp r5, r0 + beq _0223F3F8 + add r0, r6, #0 + add r0, #0xa4 + cmp r5, r0 + beq _0223F3F8 + b _0223F51A +_0223F3F4: + mov r6, #0x6e + b _0223F51A +_0223F3F8: + mov r6, #0x69 + b _0223F51A +_0223F3FC: + ldr r0, [r4, #0] + mov r1, #0x14 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0x13 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0x15 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r6, #0 + add r0, #0xa0 + cmp r5, r0 + beq _0223F43E + add r0, r6, #0 + add r0, #0xa1 + cmp r5, r0 + beq _0223F43A + add r0, r6, #0 + add r0, #0xa2 + cmp r5, r0 + beq _0223F43E + b _0223F51A +_0223F43A: + mov r6, #0x6e + b _0223F51A +_0223F43E: + mov r6, #0x69 + b _0223F51A +_0223F442: + ldr r0, [r4, #0] + mov r1, #0x15 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0x14 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0x16 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r6, #0 + add r0, #0xa1 + cmp r5, r0 + beq _0223F484 + add r0, r6, #0 + add r0, #0xa2 + cmp r5, r0 + beq _0223F480 + add r0, r6, #0 + add r0, #0xa3 + cmp r5, r0 + beq _0223F484 + b _0223F51A +_0223F480: + mov r6, #0x6e + b _0223F51A +_0223F484: + mov r6, #0x69 + b _0223F51A +_0223F488: + ldr r0, [r4, #0] + mov r1, #0x16 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0x15 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0x17 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r6, #0 + add r0, #0xa2 + cmp r5, r0 + beq _0223F4CA + add r0, r6, #0 + add r0, #0xa3 + cmp r5, r0 + beq _0223F4C6 + add r0, r6, #0 + add r0, #0xa4 + cmp r5, r0 + beq _0223F4CA + b _0223F51A +_0223F4C6: + mov r6, #0x6e + b _0223F51A +_0223F4CA: + mov r6, #0x69 + b _0223F51A +_0223F4CE: + ldr r0, [r4, #0] + mov r1, #0x17 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0x16 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0x13 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r6, #0 + add r0, #0xa0 + cmp r5, r0 + beq _0223F50E + add r0, r6, #0 + add r0, #0xa3 + cmp r5, r0 + beq _0223F50E + add r0, r6, #0 + add r0, #0xa4 + cmp r5, r0 + bne _0223F51A + mov r6, #0x6e + b _0223F51A +_0223F50E: + mov r6, #0x69 + b _0223F51A +_0223F512: + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_0223F51A: + ldr r0, [r4, #0] + mov r1, #0x18 + mov r2, #0 + bl sub_02074470 + ldr r1, [sp, #8] + add r1, r1, r7 + add r1, r0, r1 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + ldr r0, [sp, #0xc] + add r1, r0, r1 + add r0, r1, #0 + mul r0, r6 + mov r1, #0x64 + bl sub_020E1F6C + mov r1, #0x4a + ldr r2, [sp, #4] + lsl r1, r1, #2 + strh r0, [r2, r1] + add r0, r2, #0 + add r0, #0xc + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #4 + bge _0223F55A + b _0223F384 +_0223F55A: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0223F374 + + thumb_func_start ov17_0223F560 +ov17_0223F560: ; 0x0223F560 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r6, r2, #0 + mov r2, #0 + mvn r2, r2 + add r5, r0, #0 + add r4, r1, #0 + cmp r3, r2 + beq _0223F582 + mov r2, #1 + str r2, [sp] + str r2, [sp, #4] + str r3, [sp, #8] + mov r2, #0x2e + mov r3, #0x49 + bl sub_0200CBDC +_0223F582: + mov r1, #0 + ldr r0, [sp, #0x28] + mvn r1, r1 + cmp r0, r1 + beq _0223F5AC + mov r1, #0x2e + str r1, [sp] + mov r1, #7 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #1 + str r1, [sp, #0xc] + str r1, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r6, #0 + mov r1, #2 + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200CD7C +_0223F5AC: + mov r0, #0 + ldr r1, [sp, #0x2c] + mvn r0, r0 + cmp r1, r0 + beq _0223F5C8 + mov r0, #1 + str r0, [sp] + str r1, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x2e + mov r3, #0x4a + bl sub_0200CE0C +_0223F5C8: + mov r0, #0 + ldr r1, [sp, #0x30] + mvn r0, r0 + cmp r1, r0 + beq _0223F5E4 + mov r0, #1 + str r0, [sp] + str r1, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x2e + mov r3, #0x4b + bl sub_0200CE3C +_0223F5E4: + add sp, #0x18 + pop {r4, r5, r6, pc} + thumb_func_end ov17_0223F560 + + thumb_func_start ov17_0223F5E8 +ov17_0223F5E8: ; 0x0223F5E8 + push {r4, r5, r6, lr} + add r4, r2, #0 + mov r2, #0 + mvn r2, r2 + add r5, r0, #0 + add r6, r3, #0 + cmp r1, r2 + beq _0223F5FC + bl sub_0200D070 +_0223F5FC: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _0223F60C + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D080 +_0223F60C: + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _0223F61C + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200D090 +_0223F61C: + mov r0, #0 + ldr r1, [sp, #0x10] + mvn r0, r0 + cmp r1, r0 + beq _0223F62C + add r0, r5, #0 + bl sub_0200D0A0 +_0223F62C: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_0223F5E8 + + thumb_func_start ov17_0223F630 +ov17_0223F630: ; 0x0223F630 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + ldr r5, _0223F6B8 ; =0x022531FC + str r2, [sp, #4] + str r0, [sp] + add r7, r1, #0 + add r4, sp, #8 + mov r2, #6 +_0223F640: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r2, r2, #1 + bne _0223F640 + ldr r0, [r5, #0] + ldr r5, _0223F6BC ; =0x022531CC + str r0, [r4, #0] + ldr r0, [sp, #0x50] + ldr r4, [sp] + str r0, [sp, #0x20] + ldr r0, [sp, #0x54] + str r3, [sp, #0x1c] + str r0, [sp, #0x24] + ldr r0, [sp, #0x58] + mov r6, #0 + str r0, [sp, #0x28] + ldr r0, [sp, #0x5c] + str r0, [sp, #0x14] + ldr r0, [sp, #0x60] + str r0, [sp, #0x10] + ldr r0, [sp, #0x64] + str r0, [sp, #0x34] +_0223F66C: + ldr r1, [sp, #4] + add r0, r7, #0 + add r2, sp, #8 + bl sub_0200CE6C + str r0, [r4, #0] + mov r1, #0 + mov r2, #2 + ldrsh r1, [r5, r1] + ldrsh r2, [r5, r2] + bl sub_0200D4C4 + ldrb r1, [r5, #6] + ldr r0, [r4, #0] + bl sub_0200D364 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200D6A4 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + add r6, r6, #1 + add r4, r4, #4 + add r5, #8 + cmp r6, #6 + blt _0223F66C + ldr r0, _0223F6C0 ; =ov17_0223F6E8 + ldr r1, [sp] + ldr r2, [sp, #0x68] + bl sub_0200D9E8 + ldr r1, [sp] + str r0, [r1, #0x18] + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F6B8: .word 0x022531FC +_0223F6BC: .word 0x022531CC +_0223F6C0: .word ov17_0223F6E8 + thumb_func_end ov17_0223F630 + + thumb_func_start ov17_0223F6C4 +ov17_0223F6C4: ; 0x0223F6C4 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_0223F6CC: + ldr r0, [r5, #0] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _0223F6CC + ldr r0, [r6, #0x18] + bl sub_0200DA58 + mov r0, #0 + str r0, [r6, #0x18] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_0223F6C4 + + thumb_func_start ov17_0223F6E8 +ov17_0223F6E8: ; 0x0223F6E8 + push {r3, r4, r5, r6, r7, lr} + ldr r4, _0223F708 ; =0x022531CC + add r5, r1, #0 + mov r6, #0 + mov r7, #4 +_0223F6F2: + ldrsh r1, [r4, r7] + ldr r0, [r5, #0] + bl sub_0200D7C0 + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #6 + blt _0223F6F2 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F708: .word 0x022531CC + thumb_func_end ov17_0223F6E8 + + thumb_func_start ov17_0223F70C +ov17_0223F70C: ; 0x0223F70C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #0x14 + add r6, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r5, [r4, #4] + str r6, [r4, #0xc] + ldr r0, [sp, #0x18] + strb r7, [r4, #0x10] + strb r0, [r4, #0x12] + ldr r0, _0223F740 ; =ov17_0223F774 + ldr r2, [sp, #0x1c] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F740: .word ov17_0223F774 + thumb_func_end ov17_0223F70C + + thumb_func_start ov17_0223F744 +ov17_0223F744: ; 0x0223F744 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0223F752 + bl sub_02022974 +_0223F752: + ldr r0, [r4, #0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov17_0223F744 + + thumb_func_start ov17_0223F760 +ov17_0223F760: ; 0x0223F760 + push {r3, lr} + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _0223F770 + mov r0, #1 + pop {r3, pc} +_0223F770: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov17_0223F760 + + thumb_func_start ov17_0223F774 +ov17_0223F774: ; 0x0223F774 + push {r3, r4, lr} + sub sp, #4 + mov r0, #1 + add r4, r1, #0 + bl sub_0200AC1C + cmp r0, #0 + beq _0223F7DA + ldr r0, [r4, #8] + add r2, r0, #1 + str r2, [r4, #8] + ldrb r0, [r4, #0x11] + ldr r1, [r4, #0xc] + lsl r0, r0, #1 + ldrh r0, [r1, r0] + cmp r2, r0 + ble _0223F7DA + mov r0, #1 + str r0, [sp] + mov r0, #6 + mov r1, #0 + mov r2, #4 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, _0223F7E0 ; =0x000005F8 + bl sub_02005748 + mov r0, #0 + str r0, [r4, #8] + ldrb r0, [r4, #0x11] + add r0, r0, #1 + strb r0, [r4, #0x11] + ldrb r1, [r4, #0x11] + ldrb r0, [r4, #0x10] + cmp r1, r0 + blo _0223F7DA + ldrb r0, [r4, #0x12] + cmp r0, #0 + bne _0223F7CE + add r0, r4, #0 + bl ov17_0223F744 + add sp, #4 + pop {r3, r4, pc} +_0223F7CE: + cmp r0, #0xff + beq _0223F7D6 + sub r0, r0, #1 + strb r0, [r4, #0x12] +_0223F7D6: + mov r0, #0 + strb r0, [r4, #0x11] +_0223F7DA: + add sp, #4 + pop {r3, r4, pc} + nop +_0223F7E0: .word 0x000005F8 + thumb_func_end ov17_0223F774 + + .rodata + + + .global Unk_ov17_022531CC +Unk_ov17_022531CC: ; 0x022531CC + .incbin "incbin/overlay17_rodata.bin", 0x440, 0x470 - 0x440 + + .global Unk_ov17_022531FC +Unk_ov17_022531FC: ; 0x022531FC + .incbin "incbin/overlay17_rodata.bin", 0x470, 0x34 + + .section .sinit, 4 + .word ov17_0223F118 diff --git a/asm/ov17_0223F7E4.s b/asm/ov17_0223F7E4.s new file mode 100644 index 000000000..371ee4ac6 --- /dev/null +++ b/asm/ov17_0223F7E4.s @@ -0,0 +1,3639 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0223F7E4 +ov17_0223F7E4: ; 0x0223F7E4 + push {r4, lr} + mov r1, #0x32 + mov r0, #0x15 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x32 + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r1, #0 + mov r0, #0x2e + mvn r1, r1 + lsl r0, r0, #4 + strb r1, [r4, r0] + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0223F7E4 + + thumb_func_start ov17_0223F80C +ov17_0223F80C: ; 0x0223F80C + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r6, _0223F860 ; =0x02253448 + add r5, r0, #0 + add r7, r4, #0 +_0223F816: + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r2, r6, #0 + add r3, r7, #0 + bl sub_020183C4 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl sub_02019EE0 + add r1, r4, #4 + lsl r1, r1, #0x18 + mov r2, #0 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02019184 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r4, r4, #1 + add r6, #0x1c + cmp r4, #4 + blo _0223F816 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F860: .word 0x02253448 + thumb_func_end ov17_0223F80C + + thumb_func_start ov17_0223F864 +ov17_0223F864: ; 0x0223F864 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_0223F86C: + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r6, #0 + bl sub_02019120 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + cmp r4, #4 + blo _0223F86C + pop {r4, r5, r6, pc} + thumb_func_end ov17_0223F864 + + thumb_func_start ov17_0223F88C +ov17_0223F88C: ; 0x0223F88C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + bl ov17_0223F7E4 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + mov r0, #0xc + mov r1, #0x15 + bl sub_02012744 + str r0, [r4, #0x3c] + mov r0, #0x2d + mov r1, #0x15 + bl sub_02006C24 + mov r7, #2 + str r0, [sp, #0xc] + mov r5, #0 + lsl r7, r7, #0xa + b _0223F8FA +_0223F8BE: + mov r0, #0x15 + add r1, r7, #0 + bl sub_02018144 + lsl r1, r5, #2 + add r1, r4, r1 + str r0, [r1, #0x20] + mov r0, #0x15 + str r0, [sp] + ldr r1, _0223F958 ; =0x02253250 + lsl r2, r5, #1 + ldrh r1, [r1, r2] + ldr r0, [sp, #0xc] + mov r2, #1 + add r3, sp, #0x10 + bl sub_020071D0 + add r6, r0, #0 + lsl r0, r5, #2 + add r0, r4, r0 + ldr r1, [r0, #0x20] + ldr r0, [sp, #0x10] + add r2, r7, #0 + add r0, #0xc + bl sub_020C4B68 + add r0, r6, #0 + bl sub_020181C4 + add r5, r5, #1 +_0223F8FA: + cmp r5, #5 + blt _0223F8BE + ldr r0, [r4, #4] + mov r7, #2 + ldr r6, [r0, #0x50] + mov r5, #0 + lsl r7, r7, #8 + b _0223F948 +_0223F90A: + mov r0, #0x15 + add r1, r7, #0 + bl sub_02018144 + lsl r1, r5, #2 + add r1, r4, r1 + str r0, [r1, #0x34] + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r2, _0223F95C ; =0x02253238 + lsl r3, r5, #1 + ldrh r2, [r2, r3] + add r0, r6, #0 + mov r1, #0x2d + mov r3, #0x15 + bl sub_02003050 + add r0, r6, #0 + mov r1, #1 + bl sub_02003164 + lsl r1, r5, #2 + add r1, r4, r1 + ldr r1, [r1, #0x34] + add r2, r7, #0 + bl sub_020C4B18 + add r5, r5, #1 +_0223F948: + cmp r5, #2 + blt _0223F90A + ldr r0, [sp, #0xc] + bl sub_02006CA8 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F958: .word 0x02253250 +_0223F95C: .word 0x02253238 + thumb_func_end ov17_0223F88C + + thumb_func_start ov17_0223F960 +ov17_0223F960: ; 0x0223F960 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + bl ov17_022404B0 + ldr r0, [r6, #0x3c] + bl sub_020127BC + ldr r3, _0223F9C0 ; =0x000080F8 + str r3, [sp] + ldr r0, [r6, #4] + add r1, r3, #5 + ldr r0, [r0, #0x1c] + sub r2, r3, #7 + bl ov17_02252B20 + mov r0, #0xc5 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl ov17_02252BCC + mov r4, #0 + add r5, r6, #0 +_0223F98E: + ldr r0, [r5, #0x20] + bl sub_020181C4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _0223F98E + mov r5, #0 + add r4, r6, #0 +_0223F9A0: + ldr r0, [r4, #0x34] + bl sub_020181C4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #2 + blt _0223F9A0 + add r0, r6, #0 + bl ov17_022409F4 + add r0, r6, #0 + bl sub_020181C4 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0223F9C0: .word 0x000080F8 + thumb_func_end ov17_0223F960 + + thumb_func_start ov17_0223F9C4 +ov17_0223F9C4: ; 0x0223F9C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + str r3, [r7, #0xc] + ldr r0, [r7, #4] + str r2, [sp, #8] + ldr r0, [r0, #0x24] + str r1, [sp, #4] + str r0, [sp, #0xc] + mov r0, #0x2e + lsl r0, r0, #4 + ldrsb r2, [r7, r0] + mov r0, #0 + mvn r0, r0 + cmp r2, r0 + bne _0223F9EE + mov r0, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0x10] + b _0223F9F8 +_0223F9EE: + mov r0, #0x30 + ldr r1, _0223FAE8 ; =0x02253558 + mul r0, r2 + add r0, r1, r0 + str r0, [sp, #0x10] +_0223F9F8: + ldr r0, [sp, #4] + mov r1, #0x30 + ldr r2, _0223FAE8 ; =0x02253558 + mul r1, r0 + add r0, r2, r1 + str r0, [sp, #0x14] + mov r4, #0 + add r5, r0, #0 +_0223FA08: + ldrh r1, [r5, #0xc] + add r0, r4, #4 + lsl r0, r0, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _0223FA08 + mov r0, #2 + lsl r0, r0, #8 + str r0, [sp] + ldr r1, [sp, #0x14] + ldr r0, [r7, #4] + ldrh r1, [r1, #2] + ldr r0, [r0, #0x50] + mov r2, #1 + lsl r1, r1, #2 + add r1, r7, r1 + ldr r1, [r1, #0x34] + mov r3, #0 + bl sub_02002FBC + ldr r6, [sp, #0x14] + ldr r4, [sp, #0x10] + mov r5, #0 +_0223FA42: + ldrh r2, [r6, #4] + ldr r0, _0223FAEC ; =0x0000FFFF + cmp r2, r0 + beq _0223FA78 + ldr r0, [sp, #8] + cmp r0, #1 + beq _0223FA56 + ldrh r0, [r4, #4] + cmp r2, r0 + beq _0223FA78 +_0223FA56: + lsl r2, r2, #2 + add r1, r5, #4 + add r2, r7, r2 + lsl r1, r1, #0x18 + mov r3, #2 + ldr r0, [sp, #0xc] + ldr r2, [r2, #0x20] + lsr r1, r1, #0x18 + lsl r3, r3, #0xa + bl sub_02019574 + add r1, r5, #4 + lsl r1, r1, #0x18 + ldr r0, [sp, #0xc] + lsr r1, r1, #0x18 + bl sub_0201C3C0 +_0223FA78: + add r5, r5, #1 + add r6, r6, #2 + add r4, r4, #2 + cmp r5, #4 + blt _0223FA42 + mov r1, #0x2e + ldr r0, [sp, #4] + lsl r1, r1, #4 + strb r0, [r7, r1] + add r0, r7, #0 + bl ov17_022404B0 + ldr r0, [sp, #0x14] + ldr r3, [r0, #0x28] + cmp r3, #0 + beq _0223FAA0 + ldr r1, [sp, #4] + ldr r2, [sp, #8] + add r0, r7, #0 + blx r3 +_0223FAA0: + ldr r0, [sp, #0x14] + ldrh r1, [r0] + ldr r0, _0223FAEC ; =0x0000FFFF + cmp r1, r0 + beq _0223FADA + ldr r0, [sp, #8] + cmp r0, #1 + beq _0223FAB8 + ldr r0, [sp, #0x10] + ldrh r0, [r0] + cmp r1, r0 + beq _0223FADA +_0223FAB8: + mov r3, #0xb7 + mov r0, #0x15 + lsl r3, r3, #2 + str r0, [sp] + mov r0, #0x2d + mov r2, #1 + add r3, r7, r3 + bl sub_02006F50 + mov r1, #0xb6 + lsl r1, r1, #2 + str r0, [r7, r1] + ldr r0, _0223FAF0 ; =ov17_022411E4 + add r1, r7, #0 + mov r2, #0xa + bl sub_0200DA3C +_0223FADA: + ldr r0, _0223FAF4 ; =ov17_02241220 + add r1, r7, #0 + mov r2, #0xa + bl sub_0200DA3C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FAE8: .word 0x02253558 +_0223FAEC: .word 0x0000FFFF +_0223FAF0: .word ov17_022411E4 +_0223FAF4: .word ov17_02241220 + thumb_func_end ov17_0223F9C4 + + thumb_func_start ov17_0223FAF8 +ov17_0223FAF8: ; 0x0223FAF8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x2e + lsl r0, r0, #4 + ldrsb r1, [r5, r0] + mov r6, #0 + sub r0, r6, #1 + cmp r1, r0 + bne _0223FB0E + bl sub_02022974 +_0223FB0E: + mov r0, #0x2e + lsl r0, r0, #4 + ldrsb r1, [r5, r0] + ldr r3, _0223FBBC ; =0x02253558 + mov r0, #0x30 + add r2, r1, #0 + mul r2, r0 + add r4, r3, r2 + ldr r1, [r4, #0x14] + cmp r1, #0 + bne _0223FB28 + sub r0, #0x31 + pop {r3, r4, r5, r6, r7, pc} +_0223FB28: + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _0223FB32 + bl sub_02022974 +_0223FB32: + ldr r0, [r4, #0x14] + bl sub_02022664 + add r7, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r7, r0 + bne _0223FB4C + add r0, r5, #0 + bl ov17_02240C90 + add r7, r0, #0 + add r6, r6, #1 +_0223FB4C: + mov r0, #0 + mvn r0, r0 + str r0, [sp] + cmp r7, r0 + bne _0223FB5A + mov r2, #0xff + b _0223FB66 +_0223FB5A: + ldr r1, [r4, #0x18] + lsl r0, r7, #2 + ldr r0, [r1, r0] + str r0, [sp] + ldr r0, [r4, #0x1c] + ldrb r2, [r0, r7] +_0223FB66: + ldr r3, [r4, #0x2c] + cmp r3, #0 + beq _0223FBB6 + ldr r1, [sp] + add r0, r5, #0 + blx r3 + mov r1, #0 + mvn r1, r1 + str r0, [sp] + cmp r0, r1 + beq _0223FBB6 + ldr r2, [r4, #0x24] + cmp r2, #0 + beq _0223FB88 + add r0, r5, #0 + add r1, r7, #0 + blx r2 +_0223FB88: + mov r0, #0xc6 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + mov r2, #4 + bl sub_020C4CF4 + mov r0, #0xc5 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov17_02252C9C + cmp r6, #0 + ble _0223FBAE + mov r0, #0xc7 + mov r1, #1 + lsl r0, r0, #2 + strb r1, [r5, r0] + b _0223FBB6 +_0223FBAE: + mov r0, #0xc7 + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r5, r0] +_0223FBB6: + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FBBC: .word 0x02253558 + thumb_func_end ov17_0223FAF8 + + thumb_func_start ov17_0223FBC0 +ov17_0223FBC0: ; 0x0223FBC0 + ldr r1, [r0, #0x10] + cmp r1, #0 + bne _0223FBD0 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _0223FBD0 + mov r0, #1 + bx lr +_0223FBD0: + mov r0, #0 + bx lr + thumb_func_end ov17_0223FBC0 + + thumb_func_start ov17_0223FBD4 +ov17_0223FBD4: ; 0x0223FBD4 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #4] + mov r2, #0x12 + lsl r2, r2, #4 + ldr r3, [r0, #0] + add r1, r2, #1 + ldrb r0, [r3, r2] + ldrb r1, [r3, r1] + ldr r3, [r5, #0] + add r2, #0x51 + ldrb r2, [r3, r2] + bl sub_02095848 + add r4, r0, #0 + ldr r0, [r5, #4] + ldr r1, _0223FCA0 ; =0x0000011F + ldr r2, [r0, #0] + ldrb r0, [r2, r1] + add r1, r1, #2 + ldrb r1, [r2, r1] + bl sub_020958C4 + add r6, r0, #0 + ldr r0, [r5, #4] + add r1, r4, #0 + ldr r0, [r0, #0x38] + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [r5, #4] + add r1, r6, #0 + ldr r0, [r0, #0x38] + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, _0223FCA4 ; =0x00010200 + add r1, r5, #0 + str r0, [sp] + mov r3, #0 + ldr r0, _0223FCA8 ; =0x000080F0 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x7f + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, #0x40 + add r2, r4, #0 + str r3, [sp, #0x18] + bl ov17_02240138 + ldr r0, _0223FCA4 ; =0x00010200 + add r1, r5, #0 + str r0, [sp] + mov r3, #0 + ldr r0, _0223FCA8 ; =0x000080F0 + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x9f + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, #0x54 + add r2, r6, #0 + str r3, [sp, #0x18] + bl ov17_02240138 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + ldr r2, [r5, #4] + mov r0, #1 + str r0, [sp] + mov r1, #0x20 + str r1, [sp, #4] + str r1, [sp, #8] + ldr r0, [r2, #0] + add r1, #0xff + ldrb r0, [r0, r1] + mov r1, #0x2d + mov r3, #0x15 + lsl r0, r0, #0x14 + lsr r0, r0, #0x10 + str r0, [sp, #0xc] + ldr r0, [r2, #0x50] + mov r2, #0x26 + bl sub_02002FEC + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + nop +_0223FCA0: .word 0x0000011F +_0223FCA4: .word 0x00010200 +_0223FCA8: .word 0x000080F0 + thumb_func_end ov17_0223FBD4 + + thumb_func_start ov17_0223FCAC +ov17_0223FCAC: ; 0x0223FCAC + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r6, r0, #0 + mov r0, #0x69 + lsl r0, r0, #2 + add r5, r6, r0 + ldr r0, _0223FF18 ; =0x000002E1 + mov r1, #0xff + strb r1, [r6, r0] + add r0, r5, #0 + str r0, [sp, #0x24] + add r0, #0x50 + str r0, [sp, #0x24] + add r0, r5, #0 + add r7, r6, #0 + str r0, [sp, #0x28] + add r0, #0xa0 + mov r4, #0 + add r7, #0x40 + str r0, [sp, #0x28] + b _0223FDF8 +_0223FCD6: + ldr r0, [r6, #4] + ldr r1, _0223FF1C ; =0x00000123 + ldr r0, [r0, #0] + mov r2, #0 + ldrb r1, [r0, r1] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r4, #0 + add r1, #0x36 + bl sub_02074470 + lsl r1, r4, #1 + add r2, sp, #0x3c + strh r0, [r2, r1] + add r0, r2, #0 + ldrh r0, [r0, r1] + cmp r0, #0 + beq _0223FD04 + mov r0, #0x4b + add r2, r5, r4 + lsl r0, r0, #2 + ldrb r2, [r2, r0] + b _0223FD06 +_0223FD04: + mov r2, #0 +_0223FD06: + add r0, sp, #0x34 + strh r2, [r0, r1] + ldr r0, _0223FF20 ; =0x00010708 + ldr r1, _0223FF24 ; =0x02253278 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223FF28 ; =0x000080F0 + mov r2, #0 + str r0, [sp, #8] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + mov r3, #2 + str r1, [sp, #0xc] + ldr r1, _0223FF24 ; =0x02253278 + add r0, r1, r0 + ldrh r0, [r0, #2] + add r1, r4, #0 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x14 + mul r1, r0 + add r0, r5, r1 + str r0, [sp, #0x18] + add r0, r6, #0 + add r1, r7, r1 + bl ov17_02240138 + ldr r0, _0223FF2C ; =0x00010200 + ldr r1, _0223FF30 ; =0x02253314 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223FF28 ; =0x000080F0 + add r2, r4, #4 + str r0, [sp, #8] + lsl r0, r4, #3 + ldrh r1, [r1, r0] + str r1, [sp, #0xc] + ldr r1, _0223FF30 ; =0x02253314 + add r0, r1, r0 + ldrh r0, [r0, #2] + add r1, r4, #0 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x14 + mul r1, r0 + ldr r0, [sp, #0x24] + add r0, r0, r1 + mov r1, #0x14 + mul r1, r2 + mov r2, #0 + str r0, [sp, #0x18] + add r0, r6, #0 + add r1, r7, r1 + add r3, r2, #0 + bl ov17_02240138 + ldr r0, _0223FF2C ; =0x00010200 + add r2, r4, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223FF28 ; =0x000080F0 + lsl r1, r4, #3 + str r0, [sp, #8] + ldr r0, _0223FF30 ; =0x02253314 + add r2, #8 + add r1, r0, r1 + ldrh r0, [r1, #4] + str r0, [sp, #0xc] + ldrh r0, [r1, #6] + add r1, r4, #0 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x14 + mul r1, r0 + ldr r0, [sp, #0x28] + add r0, r0, r1 + mov r1, #0x14 + mul r1, r2 + mov r2, #0 + str r0, [sp, #0x18] + add r0, r6, #0 + add r1, r7, r1 + add r3, r2, #0 + bl ov17_02240138 + lsl r1, r4, #1 + add r0, sp, #0x3c + ldrh r0, [r0, r1] + cmp r0, #0 + bne _0223FDF6 + mov r0, #0x14 + mul r0, r4 + add r0, r6, r0 + ldr r0, [r0, #0x40] + mov r1, #0 + bl sub_020129D0 + add r1, r4, #4 + mov r0, #0x14 + mul r0, r1 + add r0, r6, r0 + ldr r0, [r0, #0x40] + mov r1, #0 + bl sub_020129D0 + add r1, r4, #0 + add r1, #8 + mov r0, #0x14 + mul r0, r1 + add r0, r6, r0 + ldr r0, [r0, #0x40] + mov r1, #0 + bl sub_020129D0 +_0223FDF6: + add r4, r4, #1 +_0223FDF8: + cmp r4, #4 + bge _0223FDFE + b _0223FCD6 +_0223FDFE: + mov r4, #0 + add r7, sp, #0x3c + b _0223FE2C +_0223FE04: + lsl r0, r4, #1 + ldrh r0, [r7, r0] + cmp r0, #0 + beq _0223FE1E + mov r0, #0x13 + add r1, r5, r4 + lsl r0, r0, #4 + ldrb r1, [r1, r0] + add r0, r6, #0 + add r2, r4, #0 + bl ov17_02240424 + b _0223FE2A +_0223FE1E: + mov r1, #0 + add r0, r6, #0 + mvn r1, r1 + add r2, r4, #0 + bl ov17_02240424 +_0223FE2A: + add r4, r4, #1 +_0223FE2C: + cmp r4, #4 + blt _0223FE04 + mov r4, #0 + mov r7, #0x20 + add r5, sp, #0x3c + b _0223FE7E +_0223FE38: + lsl r0, r4, #1 + ldrh r2, [r5, r0] + cmp r2, #0 + beq _0223FE7C + ldr r1, [r6, #4] + ldr r0, [r6, #8] + ldr r3, [r1, #0] + ldr r1, _0223FF1C ; =0x00000123 + ldrb r1, [r3, r1] + bl ov17_02243A98 + cmp r0, #0 + bne _0223FE7C + str r7, [sp] + ldr r0, [r6, #4] + mov r1, #1 + add r3, r4, #4 + lsl r3, r3, #0x14 + ldr r2, [r6, #0x38] + lsl r1, r1, #8 + add r1, r2, r1 + ldr r0, [r0, #0x50] + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02002FBC + ldr r0, _0223FF18 ; =0x000002E1 + ldrb r0, [r6, r0] + cmp r0, #0xff + beq _0223FE78 + bl sub_02022974 +_0223FE78: + ldr r0, _0223FF18 ; =0x000002E1 + strb r4, [r6, r0] +_0223FE7C: + add r4, r4, #1 +_0223FE7E: + cmp r4, #4 + blt _0223FE38 + add r0, r6, #0 + add r1, sp, #0x3c + bl ov17_022402E8 + mov r4, #0 + b _0223FF0E +_0223FE8E: + lsl r1, r4, #1 + add r0, sp, #0x3c + ldrh r0, [r0, r1] + cmp r0, #0 + beq _0223FF0C + add r0, sp, #0x34 + ldrh r0, [r0, r1] + bl sub_02095734 + str r0, [sp, #0x20] + cmp r0, #0 + bge _0223FEA8 + neg r0, r0 +_0223FEA8: + mov r1, #0xa + bl sub_020E1F6C + str r0, [sp, #0x1c] + cmp r0, #6 + ble _0223FEB8 + bl sub_02022974 +_0223FEB8: + mov r0, #0x18 + mul r0, r4 + add r7, r6, r0 + lsl r0, r4, #3 + ldr r1, _0223FF34 ; =0x02253334 + str r0, [sp, #0x2c] + add r0, r1, r0 + mov r5, #0 + str r0, [sp, #0x30] + b _0223FF06 +_0223FECC: + lsl r0, r5, #2 + add r1, r7, r0 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223FEDE + bl sub_02022974 +_0223FEDE: + ldr r0, [sp, #0x20] + ldr r3, _0223FF34 ; =0x02253334 + str r0, [sp] + ldr r2, [sp, #0x2c] + ldr r1, [r6, #4] + ldr r3, [r3, r2] + lsl r2, r5, #3 + add r2, r3, r2 + ldr r3, [sp, #0x30] + ldr r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + ldr r3, [r3, #4] + bl ov17_0224136C + lsl r1, r5, #2 + add r2, r7, r1 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r2, r1] + add r5, r5, #1 +_0223FF06: + ldr r0, [sp, #0x1c] + cmp r5, r0 + blt _0223FECC +_0223FF0C: + add r4, r4, #1 +_0223FF0E: + cmp r4, #4 + blt _0223FE8E + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_0223FF18: .word 0x000002E1 +_0223FF1C: .word 0x00000123 +_0223FF20: .word 0x00010708 +_0223FF24: .word 0x02253278 +_0223FF28: .word 0x000080F0 +_0223FF2C: .word 0x00010200 +_0223FF30: .word 0x02253314 +_0223FF34: .word 0x02253334 + thumb_func_end ov17_0223FCAC + + thumb_func_start ov17_0223FF38 +ov17_0223FF38: ; 0x0223FF38 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0x69 + lsl r0, r0, #2 + add r6, r5, r0 + add r7, r5, #0 + mov r4, #0 + add r6, #0xf0 + add r7, #0x40 + b _0223FF86 +_0223FF4E: + ldr r0, _0223FFE4 ; =0x0001090A + ldr r1, _0223FFE8 ; =0x0225325C + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223FFEC ; =0x000080F0 + mov r2, #0 + str r0, [sp, #8] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + mov r3, #2 + str r1, [sp, #0xc] + ldr r1, _0223FFE8 ; =0x0225325C + add r0, r1, r0 + ldrh r0, [r0, #2] + add r1, r4, #0 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0x14 + mul r1, r0 + add r0, r6, r1 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r7, r1 + bl ov17_02240138 + add r4, r4, #1 +_0223FF86: + cmp r4, #3 + blt _0223FF4E + ldr r0, [r5, #4] + mov r1, #0x35 + ldr r0, [r0, #0x38] + bl sub_0200B1EC + add r6, r0, #0 + ldr r0, _0223FFE4 ; =0x0001090A + ldr r1, _0223FFEC ; =0x000080F0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #0x80 + str r1, [sp, #0xc] + mov r1, #0xa4 + str r1, [sp, #0x10] + mov r1, #1 + str r1, [sp, #0x14] + add r2, r5, #0 + mov r1, #0x14 + str r0, [sp, #0x18] + add r2, #0x40 + mul r1, r4 + add r1, r2, r1 + add r0, r5, #0 + add r2, r6, #0 + mov r3, #2 + bl ov17_02240138 + add r0, r6, #0 + bl sub_020237BC + ldr r2, [r5, #4] + ldr r0, [r2, #0x18] + ldr r1, [r2, #0x1c] + ldr r3, [r2, #0] + ldr r2, _0223FFF0 ; =0x0000011E + ldrb r2, [r3, r2] + bl ov17_022412C0 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FFE4: .word 0x0001090A +_0223FFE8: .word 0x0225325C +_0223FFEC: .word 0x000080F0 +_0223FFF0: .word 0x0000011E + thumb_func_end ov17_0223FF38 + + thumb_func_start ov17_0223FFF4 +ov17_0223FFF4: ; 0x0223FFF4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #1 + str r2, [sp] + cmp r0, #4 + bhi _02240018 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224000E: ; jump table + .short _02240018 - _0224000E - 2 ; case 0 + .short _0224001E - _0224000E - 2 ; case 1 + .short _0224001E - _0224000E - 2 ; case 2 + .short _0224001E - _0224000E - 2 ; case 3 + .short _0224001E - _0224000E - 2 ; case 4 +_02240018: + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0224001E: + ldr r0, [r4, #4] + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _02240080 ; =0x00000123 + ldrb r0, [r1, r0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r5, #0 + add r1, #0x36 + bl sub_02074470 + cmp r0, #0 + beq _02240040 + ldr r0, _02240084 ; =0x000002E1 + ldrb r0, [r4, r0] + cmp r0, r5 + bne _02240046 +_02240040: + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02240046: + mov r0, #6 + ldr r1, _02240088 ; =0x022532E4 + mul r0, r5 + add r7, r1, r0 + ldr r1, _0224008C ; =0x02253388 + lsl r0, r5, #4 + add r6, r1, r0 + ldr r1, [sp] + add r0, r4, #0 + bl ov17_02240930 + ldr r0, _02240090 ; =ov17_02240658 + add r1, r4, #0 + bl ov17_022404CC + mov r1, #0xbd + lsl r1, r1, #2 + str r7, [r4, r1] + add r0, r1, #4 + str r6, [r4, r0] + add r0, r1, #0 + mov r2, #2 + add r0, #0xc + strb r2, [r4, r0] + add r1, #8 + str r5, [r4, r1] + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240080: .word 0x00000123 +_02240084: .word 0x000002E1 +_02240088: .word 0x022532E4 +_0224008C: .word 0x02253388 +_02240090: .word ov17_02240658 + thumb_func_end ov17_0223FFF4 + + thumb_func_start ov17_02240094 +ov17_02240094: ; 0x02240094 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #1 + cmp r0, #4 + bhi _022400B6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022400AC: ; jump table + .short _022400B6 - _022400AC - 2 ; case 0 + .short _022400BA - _022400AC - 2 ; case 1 + .short _022400BE - _022400AC - 2 ; case 2 + .short _022400C2 - _022400AC - 2 ; case 3 + .short _022400C6 - _022400AC - 2 ; case 4 +_022400B6: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_022400BA: + mov r6, #0 + b _022400C8 +_022400BE: + mov r6, #1 + b _022400C8 +_022400C2: + mov r6, #2 + b _022400C8 +_022400C6: + mov r6, #3 +_022400C8: + ldr r0, [r4, #4] + ldr r1, [r0, #0] + ldr r0, _02240128 ; =0x0000011E + ldrb r0, [r1, r0] + cmp r5, r0 + bne _022400D8 + mov r7, #1 + b _022400DA +_022400D8: + mov r7, #0 +_022400DA: + add r0, r4, #0 + add r1, r2, #0 + bl ov17_02240930 + ldr r0, _0224012C ; =ov17_0224051C + add r1, r4, #0 + bl ov17_022404CC + mov r0, #6 + ldr r1, _02240130 ; =0x022532FC + mul r0, r5 + add r0, r1, r0 + mov r1, #0xbd + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r2, _02240134 ; =0x022533C8 + lsl r0, r5, #4 + add r2, r2, r0 + add r0, r1, #4 + str r2, [r4, r0] + mov r2, #3 + lsl r0, r2, #8 + strb r2, [r4, r0] + add r0, r1, #0 + add r0, #8 + str r5, [r4, r0] + add r0, r1, #0 + add r0, #0xd + strb r6, [r4, r0] + cmp r7, #1 + bne _02240122 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + sub r1, #0xc + str r0, [r4, r1] +_02240122: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240128: .word 0x0000011E +_0224012C: .word ov17_0224051C +_02240130: .word 0x022532FC +_02240134: .word 0x022533C8 + thumb_func_end ov17_02240094 + + thumb_func_start ov17_02240138 +ov17_02240138: ; 0x02240138 + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0] + str r2, [sp, #0x18] + str r3, [sp, #0x1c] + ldr r6, [sp, #0x9c] + ldr r4, [sp, #0xa8] + cmp r0, #0 + beq _02240152 + bl sub_02022974 +_02240152: + ldr r1, [r7, #4] + cmp r4, #0 + ldr r0, [r1, #0x24] + str r0, [sp, #0x24] + ldr r0, [r1, #0x1c] + str r0, [sp, #0x20] + bne _0224016E + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x1c] + add r2, sp, #0x2c + add r3, sp, #0x28 + bl ov17_02240C60 + b _02240176 +_0224016E: + ldrh r0, [r4, #0x12] + str r0, [sp, #0x2c] + ldrh r0, [r4, #0x10] + str r0, [sp, #0x28] +_02240176: + cmp r4, #0 + bne _022401B4 + add r0, sp, #0x3c + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r2, [sp, #0x28] + ldr r0, [sp, #0x24] + lsl r2, r2, #0x18 + add r1, sp, #0x3c + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x90] + ldr r1, [sp, #0x1c] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r2, [sp, #0x18] + add r0, sp, #0x3c + str r3, [sp, #0x14] + bl sub_0201D7E0 + b _022401C0 +_022401B4: + add r3, r4, #0 + add r2, sp, #0x3c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} +_022401C0: + add r0, sp, #0x3c + mov r1, #2 + mov r2, #0x15 + bl sub_02012898 + mov r1, #1 + mov r2, #2 + add r3, sp, #0x30 + bl sub_0201ED94 + ldr r0, [sp, #0xa4] + cmp r0, #1 + bne _022401E4 + ldr r1, [sp, #0x2c] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + sub r6, r6, r0 +_022401E4: + ldr r0, [r7, #0x3c] + str r0, [sp, #0x4c] + add r0, sp, #0x3c + str r0, [sp, #0x50] + ldr r0, [sp, #0x20] + bl sub_0200D9B0 + str r0, [sp, #0x54] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x98] + bl sub_0200D04C + str r0, [sp, #0x58] + mov r0, #0 + ldr r1, [sp, #0x34] + str r0, [sp, #0x5c] + str r0, [sp, #0x6c] + mov r0, #0x64 + str r1, [sp, #0x60] + mov r1, #0x42 + str r0, [sp, #0x70] + mov r0, #2 + str r0, [sp, #0x74] + mov r0, #0x15 + str r0, [sp, #0x78] + ldr r2, [sp, #0xa0] + lsl r1, r1, #2 + add r1, r2, r1 + add r0, sp, #0x4c + str r6, [sp, #0x64] + str r1, [sp, #0x68] + bl sub_020127E8 + ldr r1, [sp, #0x94] + add r7, r0, #0 + bl sub_02012AC0 + mov r2, #0x42 + ldr r3, [sp, #0xa0] + lsl r2, r2, #2 + add r0, r7, #0 + add r1, r6, #0 + add r2, r3, r2 + bl sub_020128C4 + cmp r4, #0 + bne _02240248 + add r0, sp, #0x3c + bl sub_0201A8FC +_02240248: + str r7, [r5, #0] + add r3, sp, #0x30 + ldmia r3!, {r0, r1} + add r2, r5, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #0x2c] + strh r0, [r5, #0x10] + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02240138 + + thumb_func_start ov17_02240260 +ov17_02240260: ; 0x02240260 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + add r4, #0x44 + add r7, r6, #0 +_0224026C: + ldr r0, [r5, #0x40] + cmp r0, #0 + beq _0224027E + bl sub_02012870 + add r0, r4, #0 + bl sub_0201EE28 + str r7, [r5, #0x40] +_0224027E: + add r6, r6, #1 + add r5, #0x14 + add r4, #0x14 + cmp r6, #0xc + blt _0224026C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02240260 + + thumb_func_start ov17_0224028C +ov17_0224028C: ; 0x0224028C + push {r4, lr} + add r4, r0, #0 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022402A6 + bl ov17_02241314 + mov r0, #5 + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] +_022402A6: + pop {r4, pc} + thumb_func_end ov17_0224028C + + thumb_func_start ov17_022402A8 +ov17_022402A8: ; 0x022402A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + mov r0, #0 + mov r7, #0x51 + str r0, [sp, #4] + add r6, r0, #0 + lsl r7, r7, #2 +_022402B8: + ldr r5, [sp] + mov r4, #0 +_022402BC: + ldr r0, [r5, r7] + cmp r0, #0 + beq _022402CC + bl ov17_022413AC + mov r0, #0x51 + lsl r0, r0, #2 + str r6, [r5, r0] +_022402CC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _022402BC + ldr r0, [sp] + add r0, #0x18 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #4 + blt _022402B8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_022402A8 + + thumb_func_start ov17_022402E8 +ov17_022402E8: ; 0x022402E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r5, r0, #0 + add r7, r1, #0 + ldr r1, [r5, #4] + ldr r4, _0224037C ; =0x02253354 + ldr r0, [r1, #0x18] + add r3, sp, #8 + str r0, [sp, #4] + ldr r0, [r1, #0x1c] + mov r2, #6 + str r0, [sp] +_02240300: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02240300 + ldr r0, [r4, #0] + mov r4, #0 + str r0, [r3, #0] + add r6, sp, #8 + b _02240374 +_02240312: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02240324 + bl sub_02022974 +_02240324: + lsl r0, r4, #1 + ldrh r0, [r7, r0] + cmp r0, #0 + beq _02240372 + mov r0, #0xb5 + add r1, r5, r4 + lsl r0, r0, #2 + ldrb r2, [r1, r0] + ldr r0, _02240380 ; =0x000080F6 + ldr r1, _02240384 ; =0x02253298 + add r0, r4, r0 + str r0, [sp, #0x1c] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + add r3, sp, #8 + strh r1, [r6] + ldr r1, _02240384 ; =0x02253298 + add r0, r1, r0 + ldrh r0, [r0, #2] + ldr r1, [sp] + strh r0, [r6, #2] + ldr r0, [sp, #4] + bl ov17_0224F154 + lsl r1, r4, #2 + mov r2, #0x13 + mov r3, #0x11 + add r1, r5, r1 + lsl r2, r2, #4 + str r0, [r1, r2] + add r0, r2, #0 + ldr r0, [r1, r0] + mov r1, #0 + mov r2, #2 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + lsl r3, r3, #0x10 + bl sub_0200D500 +_02240372: + add r4, r4, #1 +_02240374: + cmp r4, #4 + blt _02240312 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224037C: .word 0x02253354 +_02240380: .word 0x000080F6 +_02240384: .word 0x02253298 + thumb_func_end ov17_022402E8 + + thumb_func_start ov17_02240388 +ov17_02240388: ; 0x02240388 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + mov r7, #0x13 + add r5, r0, #0 + add r6, r4, #0 + lsl r7, r7, #4 +_02240394: + ldr r0, [r5, r7] + cmp r0, #0 + beq _022403A4 + bl ov17_0224F184 + mov r0, #0x13 + lsl r0, r0, #4 + str r6, [r5, r0] +_022403A4: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02240394 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02240388 + + thumb_func_start ov17_022403B0 +ov17_022403B0: ; 0x022403B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + ldr r0, [r0, #0x24] + add r7, r3, #0 + mov r1, #4 + add r4, r2, #0 + str r0, [sp, #4] + bl sub_02019FE4 + mov ip, r0 + lsl r0, r7, #2 + add r0, r5, r0 + ldr r0, [r0, #0x20] + ldr r7, [r4, #0] + str r0, [sp] + ldr r0, [sp, #0x20] + lsl r0, r0, #1 + ldrsh r1, [r6, r0] + ldr r0, [r4, #4] + cmp r7, r0 + bgt _02240416 + lsl r6, r7, #5 +_022403E2: + lsl r2, r6, #1 + mov r0, ip + add r5, r0, r2 + ldr r0, [sp] + ldr r3, [r4, #0xc] + add r2, r0, r2 + ldr r0, [r4, #8] + cmp r0, r3 + bgt _0224040C + lsl r3, r0, #1 + add r2, r2, r3 + add r3, r5, r3 +_022403FA: + ldrh r5, [r2] + add r0, r0, #1 + add r2, r2, #2 + add r5, r1, r5 + strh r5, [r3] + ldr r5, [r4, #0xc] + add r3, r3, #2 + cmp r0, r5 + ble _022403FA +_0224040C: + ldr r0, [r4, #4] + add r7, r7, #1 + add r6, #0x20 + cmp r7, r0 + ble _022403E2 +_02240416: + ldr r0, [sp, #4] + mov r1, #4 + bl sub_0201C3C0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_022403B0 + + thumb_func_start ov17_02240424 +ov17_02240424: ; 0x02240424 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + ldr r6, _0224049C ; =0x022532BC + add r5, r2, #0 + add r4, r0, #0 + add r3, r1, #0 + add r2, sp, #4 + ldmia r6!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r2, #0] + mov r0, #0 + mvn r0, r0 + cmp r3, r0 + beq _02240464 + mov r0, #0x20 + str r0, [sp] + lsl r1, r3, #2 + ldr r0, [r4, #4] + add r3, r5, #4 + lsl r3, r3, #0x14 + ldr r0, [r0, #0x50] + ldr r1, [r7, r1] + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02002FBC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02240464: + ldr r2, _022404A0 ; =0x02253248 + lsl r1, r5, #1 + mov r0, #0 + add r1, r2, r1 + str r0, [sp] + ldr r3, _022404A4 ; =0x02253408 + lsl r2, r5, #4 + add r2, r3, r2 + add r0, r4, #0 + mov r3, #2 + bl ov17_022403B0 + mov r2, #0x20 + str r2, [sp] + ldr r0, [r4, #4] + add r3, r5, #4 + lsl r3, r3, #0x14 + ldr r1, [r4, #0x38] + add r2, #0xe0 + add r1, r1, r2 + ldr r0, [r0, #0x50] + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02002FBC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224049C: .word 0x022532BC +_022404A0: .word 0x02253248 +_022404A4: .word 0x02253408 + thumb_func_end ov17_02240424 + + thumb_func_start ov17_022404A8 +ov17_022404A8: ; 0x022404A8 + ldr r3, _022404AC ; =ov17_022404B0 + bx r3 + ; .align 2, 0 +_022404AC: .word ov17_022404B0 + thumb_func_end ov17_022404A8 + + thumb_func_start ov17_022404B0 +ov17_022404B0: ; 0x022404B0 + push {r4, lr} + add r4, r0, #0 + bl ov17_0224028C + add r0, r4, #0 + bl ov17_022402A8 + add r0, r4, #0 + bl ov17_02240388 + add r0, r4, #0 + bl ov17_02240260 + pop {r4, pc} + thumb_func_end ov17_022404B0 + + thumb_func_start ov17_022404CC +ov17_022404CC: ; 0x022404CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _022404DC + bl sub_02022974 +_022404DC: + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + mov r2, #0x20 + bl sub_020C4CF4 + ldr r2, _022404F8 ; =0x00000514 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x10] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022404F8: .word 0x00000514 + thumb_func_end ov17_022404CC + + thumb_func_start ov17_022404FC +ov17_022404FC: ; 0x022404FC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _0224051A + bl sub_0200DA58 + mov r0, #0xb9 + lsl r0, r0, #2 + mov r1, #0 + add r0, r4, r0 + mov r2, #0x20 + str r1, [r4, #0x10] + bl sub_020C4CF4 +_0224051A: + pop {r4, pc} + thumb_func_end ov17_022404FC + + thumb_func_start ov17_0224051C +ov17_0224051C: ; 0x0224051C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r3, #0xb9 + add r5, r1, #0 + lsl r3, r3, #2 + ldrsh r0, [r5, r3] + cmp r0, #0 + beq _02240536 + cmp r0, #1 + beq _022405A8 + cmp r0, #2 + beq _022405C4 + b _02240634 +_02240536: + mov r0, #2 + str r0, [sp] + add r1, r3, #0 + add r2, r3, #0 + add r3, #0x1c + add r1, #0x10 + add r2, #0x14 + ldrb r3, [r5, r3] + ldr r1, [r5, r1] + ldr r2, [r5, r2] + add r0, r5, #0 + bl ov17_022403B0 + ldr r0, _02240654 ; =0x00000301 + add r2, sp, #4 + ldrb r1, [r5, r0] + mov r0, #0x14 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x40] + add r1, sp, #8 + bl sub_020129A4 + ldr r0, _02240654 ; =0x00000301 + ldr r2, [sp, #4] + ldrb r1, [r5, r0] + mov r0, #0x14 + sub r2, r2, #2 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x40] + ldr r1, [sp, #8] + bl sub_020128C4 + mov r7, #0xba + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #2 +_02240582: + ldr r0, [r4, r7] + cmp r0, #0 + beq _02240592 + mov r1, #0 + ldr r0, [r0, #0] + sub r2, r1, #2 + bl sub_0200D5AC +_02240592: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #3 + blt _02240582 + mov r0, #0xb9 + lsl r0, r0, #2 + ldrsh r1, [r5, r0] + add sp, #0xc + add r1, r1, #1 + strh r1, [r5, r0] + pop {r4, r5, r6, r7, pc} +_022405A8: + add r0, r3, #2 + ldrsh r0, [r5, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r5, r0] + ldrsh r0, [r5, r0] + cmp r0, #0 + ble _02240650 + mov r1, #0 + add r0, r3, #2 + strh r1, [r5, r0] + ldrsh r0, [r5, r3] + add r0, r0, #1 + strh r0, [r5, r3] +_022405C4: + mov r0, #1 + mov r3, #0xbd + str r0, [sp] + lsl r3, r3, #2 + add r2, r3, #4 + ldr r1, [r5, r3] + add r3, #0xc + ldrb r3, [r5, r3] + ldr r2, [r5, r2] + add r0, r5, #0 + bl ov17_022403B0 + ldr r0, _02240654 ; =0x00000301 + add r2, sp, #4 + ldrb r1, [r5, r0] + mov r0, #0x14 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x40] + add r1, sp, #8 + bl sub_020129A4 + ldr r0, _02240654 ; =0x00000301 + ldr r2, [sp, #4] + ldrb r1, [r5, r0] + mov r0, #0x14 + add r2, r2, #1 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x40] + ldr r1, [sp, #8] + bl sub_020128C4 + mov r7, #0xba + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #2 +_0224060E: + ldr r0, [r4, r7] + cmp r0, #0 + beq _0224061E + ldr r0, [r0, #0] + mov r1, #0 + mov r2, #1 + bl sub_0200D5AC +_0224061E: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #3 + blt _0224060E + mov r0, #0xb9 + lsl r0, r0, #2 + ldrsh r1, [r5, r0] + add sp, #0xc + add r1, r1, #1 + strh r1, [r5, r0] + pop {r4, r5, r6, r7, pc} +_02240634: + add r0, r3, #2 + ldrsh r0, [r5, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r5, r0] + ldrsh r0, [r5, r0] + cmp r0, #0 + ble _02240650 + add r0, r5, #0 + bl ov17_022404A8 + add r0, r5, #0 + bl ov17_022404FC +_02240650: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240654: .word 0x00000301 + thumb_func_end ov17_0224051C + + thumb_func_start ov17_02240658 +ov17_02240658: ; 0x02240658 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r7, _022408DC ; =0x00000123 + add r4, r1, #0 + mov r6, #0 + add r5, sp, #0x20 +_02240664: + ldr r0, [r4, #4] + mov r2, #0 + ldr r0, [r0, #0] + ldrb r1, [r0, r7] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r6, #0 + add r1, #0x36 + bl sub_02074470 + strh r0, [r5] + add r6, r6, #1 + add r5, r5, #2 + cmp r6, #4 + blt _02240664 + mov r0, #0xbf + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #3 + bhi _022406E8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02240698: ; jump table + .short _022406A0 - _02240698 - 2 ; case 0 + .short _022406B2 - _02240698 - 2 ; case 1 + .short _022406C4 - _02240698 - 2 ; case 2 + .short _022406D6 - _02240698 - 2 ; case 3 +_022406A0: + mov r0, #8 + str r0, [sp, #0xc] + add r0, sp, #0x20 + ldrh r0, [r0] + mov r5, #0 + mov r6, #4 + str r0, [sp, #8] + str r5, [sp, #4] + b _022406F0 +_022406B2: + mov r0, #9 + str r0, [sp, #0xc] + add r0, sp, #0x20 + ldrh r0, [r0, #2] + mov r5, #1 + mov r6, #5 + str r0, [sp, #8] + str r5, [sp, #4] + b _022406F0 +_022406C4: + mov r0, #0xa + str r0, [sp, #0xc] + add r0, sp, #0x20 + ldrh r0, [r0, #4] + mov r5, #2 + mov r6, #6 + str r0, [sp, #8] + str r5, [sp, #4] + b _022406F0 +_022406D6: + mov r0, #0xb + str r0, [sp, #0xc] + add r0, sp, #0x20 + ldrh r0, [r0, #6] + mov r5, #3 + mov r6, #7 + str r0, [sp, #8] + str r5, [sp, #4] + b _022406F0 +_022406E8: + mov r5, #0 + add r6, r5, #0 + str r5, [sp, #0xc] + str r5, [sp, #8] +_022406F0: + mov r3, #0xb9 + lsl r3, r3, #2 + ldrsh r0, [r4, r3] + cmp r0, #0 + beq _02240704 + cmp r0, #1 + beq _022407D2 + cmp r0, #2 + beq _022407EE + b _022408BA +_02240704: + mov r0, #2 + str r0, [sp] + add r1, r3, #0 + add r2, r3, #0 + add r3, #0x1c + add r1, #0x10 + add r2, #0x14 + ldrb r3, [r4, r3] + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov17_022403B0 + add r7, r4, #0 + mov r0, #0x14 + mul r0, r5 + add r7, #0x40 + str r0, [sp, #0x10] + ldr r0, [r7, r0] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x28] + ldr r0, [r7, r0] + ldr r1, [sp, #0x2c] + sub r2, r2, #2 + bl sub_020128C4 + add r7, r4, #0 + mov r0, #0x14 + mul r0, r6 + add r7, #0x40 + str r0, [sp, #0x14] + ldr r0, [r7, r0] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x28] + ldr r0, [r7, r0] + ldr r1, [sp, #0x2c] + sub r2, r2, #2 + bl sub_020128C4 + ldr r0, [sp, #0xc] + add r6, r4, #0 + mov r1, #0x14 + add r7, r0, #0 + mul r7, r1 + add r6, #0x40 + ldr r0, [r6, r7] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + ldr r2, [sp, #0x28] + ldr r0, [r6, r7] + ldr r1, [sp, #0x2c] + sub r2, r2, #2 + bl sub_020128C4 + ldr r0, [sp, #8] + cmp r0, #0 + beq _022407C4 + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0 + ldr r0, [r0, #0] + sub r2, r1, #2 + bl sub_0200D5AC + mov r7, #0x51 + ldr r0, [sp, #4] + mov r1, #0x18 + mul r1, r0 + mov r6, #0 + add r5, r4, r1 + lsl r7, r7, #2 +_022407AC: + ldr r0, [r5, r7] + cmp r0, #0 + beq _022407BC + mov r1, #0 + ldr r0, [r0, #0] + sub r2, r1, #2 + bl sub_0200D5AC +_022407BC: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #6 + blt _022407AC +_022407C4: + mov r0, #0xb9 + lsl r0, r0, #2 + ldrsh r1, [r4, r0] + add sp, #0x30 + add r1, r1, #1 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_022407D2: + add r0, r3, #2 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _022408D6 + mov r1, #0 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r3] + add r0, r0, #1 + strh r0, [r4, r3] +_022407EE: + mov r0, #1 + mov r3, #0xbd + str r0, [sp] + lsl r3, r3, #2 + add r2, r3, #4 + ldr r1, [r4, r3] + add r3, #0xc + ldrb r3, [r4, r3] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov17_022403B0 + add r7, r4, #0 + mov r0, #0x14 + mul r0, r5 + add r7, #0x40 + str r0, [sp, #0x18] + ldr r0, [r7, r0] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x28] + ldr r0, [r7, r0] + ldr r1, [sp, #0x2c] + add r2, r2, #1 + bl sub_020128C4 + add r7, r4, #0 + mov r0, #0x14 + mul r0, r6 + add r7, #0x40 + str r0, [sp, #0x1c] + ldr r0, [r7, r0] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x28] + ldr r0, [r7, r0] + ldr r1, [sp, #0x2c] + add r2, r2, #1 + bl sub_020128C4 + ldr r0, [sp, #0xc] + add r6, r4, #0 + mov r1, #0x14 + add r7, r0, #0 + mul r7, r1 + add r6, #0x40 + ldr r0, [r6, r7] + add r1, sp, #0x2c + add r2, sp, #0x28 + bl sub_020129A4 + ldr r2, [sp, #0x28] + ldr r0, [r6, r7] + ldr r1, [sp, #0x2c] + add r2, r2, #1 + bl sub_020128C4 + ldr r0, [sp, #8] + cmp r0, #0 + beq _022408AC + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0 + ldr r0, [r0, #0] + mov r2, #1 + bl sub_0200D5AC + mov r7, #0x51 + ldr r0, [sp, #4] + mov r1, #0x18 + mul r1, r0 + mov r6, #0 + add r5, r4, r1 + lsl r7, r7, #2 +_02240894: + ldr r0, [r5, r7] + cmp r0, #0 + beq _022408A4 + ldr r0, [r0, #0] + mov r1, #0 + mov r2, #1 + bl sub_0200D5AC +_022408A4: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #6 + blt _02240894 +_022408AC: + mov r0, #0xb9 + lsl r0, r0, #2 + ldrsh r1, [r4, r0] + add sp, #0x30 + add r1, r1, #1 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_022408BA: + add r0, r3, #2 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r3, #2 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _022408D6 + add r0, r4, #0 + bl ov17_022404A8 + add r0, r4, #0 + bl ov17_022404FC +_022408D6: + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_022408DC: .word 0x00000123 + thumb_func_end ov17_02240658 + + thumb_func_start ov17_022408E0 +ov17_022408E0: ; 0x022408E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _022408F0 + bl sub_02022974 +_022408F0: + mov r0, #0xc1 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + mov r2, #0xc + bl sub_020C4CF4 + ldr r2, _0224090C ; =0x00000528 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x14] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224090C: .word 0x00000528 + thumb_func_end ov17_022408E0 + + thumb_func_start ov17_02240910 +ov17_02240910: ; 0x02240910 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0224092E + bl sub_0200DA58 + mov r0, #0xc1 + lsl r0, r0, #2 + mov r1, #0 + add r0, r4, r0 + mov r2, #0xc + str r1, [r4, #0x14] + bl sub_020C4CF4 +_0224092E: + pop {r4, pc} + thumb_func_end ov17_02240910 + + thumb_func_start ov17_02240930 +ov17_02240930: ; 0x02240930 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0xff + beq _02240946 + ldr r0, _02240948 ; =ov17_02240950 + add r1, r5, #0 + bl ov17_022408E0 + ldr r0, _0224094C ; =0x0000030D + strb r4, [r5, r0] +_02240946: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02240948: .word ov17_02240950 +_0224094C: .word 0x0000030D + thumb_func_end ov17_02240930 + + thumb_func_start ov17_02240950 +ov17_02240950: ; 0x02240950 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r0, #0xc1 + add r5, r1, #0 + lsl r0, r0, #2 + add r2, r5, r0 + ldr r0, [r5, #4] + mov r4, #0 + ldr r3, [r0, #0x50] + ldrb r0, [r2, #8] + cmp r0, #0 + beq _02240970 + cmp r0, #1 + beq _0224098C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02240970: + mov r0, #0xa + lsl r0, r0, #8 + strh r0, [r2, #4] + ldr r0, _022409EC ; =0xFFFFFB00 + strh r0, [r2, #6] + mov r0, #4 + ldrsh r1, [r2, r0] + mov r0, #6 + ldrsh r0, [r2, r0] + sub r0, r1, r0 + strh r0, [r2, #4] + ldrb r0, [r2, #8] + add r0, r0, #1 + strb r0, [r2, #8] +_0224098C: + mov r7, #4 + mov r6, #6 + ldrsh r1, [r2, r7] + ldrsh r0, [r2, r6] + add r0, r1, r0 + strh r0, [r2, #4] + ldrsh r6, [r2, r6] + cmp r6, #0 + blt _022409AC + ldrsh r1, [r2, r7] + lsl r0, r7, #0xa + cmp r1, r0 + blt _022409AC + strh r0, [r2, #4] + mov r4, #1 + b _022409BE +_022409AC: + cmp r6, #0 + bge _022409BE + mov r0, #4 + ldrsh r0, [r2, r0] + cmp r0, #0 + bgt _022409BE + mov r0, #0 + strh r0, [r2, #4] + mov r4, #1 +_022409BE: + mov r0, #4 + ldrsh r0, [r2, r0] + mov r1, #1 + asr r0, r0, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, _022409F0 ; =0x00007FFF + str r0, [sp, #4] + ldrb r2, [r2, #9] + add r0, r3, #0 + mov r3, #0x10 + lsl r2, r2, #0x14 + lsr r2, r2, #0x10 + bl sub_020039B0 + cmp r4, #1 + bne _022409E8 + add r0, r5, #0 + bl ov17_02240910 +_022409E8: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022409EC: .word 0xFFFFFB00 +_022409F0: .word 0x00007FFF + thumb_func_end ov17_02240950 + + thumb_func_start ov17_022409F4 +ov17_022409F4: ; 0x022409F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x69 + add r5, r0, #0 + mov r0, #0 + lsl r1, r1, #2 + str r0, [sp, #4] + add r0, r5, r1 + str r0, [sp] + add r0, r1, #0 + add r0, #0x50 + add r1, #0xa0 + add r4, r5, #0 + add r7, r5, r0 + add r6, r5, r1 +_02240A12: + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02240A22 + ldr r0, [sp] + bl sub_0201A8FC +_02240A22: + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02240A32 + add r0, r7, #0 + bl sub_0201A8FC +_02240A32: + mov r0, #0x25 + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02240A42 + add r0, r6, #0 + bl sub_0201A8FC +_02240A42: + ldr r0, [sp] + add r4, #0x14 + add r0, #0x14 + str r0, [sp] + ldr r0, [sp, #4] + add r7, #0x14 + add r0, r0, #1 + add r6, #0x14 + str r0, [sp, #4] + cmp r0, #4 + blt _02240A12 + mov r0, #0xa5 + lsl r0, r0, #2 + add r7, r0, #0 + mov r6, #0 + add r4, r5, r0 + add r7, #0xc +_02240A64: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02240A70 + add r0, r4, #0 + bl sub_0201A8FC +_02240A70: + add r6, r6, #1 + add r5, #0x14 + add r4, #0x14 + cmp r6, #3 + blt _02240A64 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_022409F4 + + thumb_func_start ov17_02240A80 +ov17_02240A80: ; 0x02240A80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + mov r0, #0x69 + lsl r0, r0, #2 + add r6, r5, r0 + mov r0, #0 + str r0, [sp, #0x20] + add r0, r6, #0 + str r0, [sp, #0x18] + add r0, #0x50 + str r0, [sp, #0x18] + add r0, r6, #0 + str r0, [sp, #0x14] + add r0, #0xa0 + add r7, r1, #0 + str r6, [sp, #0x1c] + str r0, [sp, #0x14] +_02240AA4: + ldrh r0, [r7] + cmp r0, #0 + beq _02240ACA + ldr r1, [sp, #0x20] + add r4, r6, r1 + mov r1, #0xa + bl sub_020790C4 + mov r1, #0x4b + lsl r1, r1, #2 + strb r0, [r4, r1] + ldrh r0, [r7] + mov r1, #0xb + bl sub_020790C4 + mov r1, #0x13 + lsl r1, r1, #4 + strb r0, [r4, r1] + b _02240ADA +_02240ACA: + ldr r0, [sp, #0x20] + mov r1, #0 + add r4, r6, r0 + mov r0, #0x4b + lsl r0, r0, #2 + strb r1, [r4, r0] + add r0, r0, #4 + strb r1, [r4, r0] +_02240ADA: + ldrh r0, [r7] + mov r1, #0x15 + bl sub_0200B2EC + str r0, [sp, #0x24] + ldr r0, _02240BE4 ; =0x00010708 + ldr r1, [sp, #0x24] + str r0, [sp] + ldr r3, [sp, #0x1c] + add r0, r5, #0 + mov r2, #2 + bl ov17_02240BF4 + ldr r0, [sp, #0x24] + bl sub_020237BC + mov r0, #0x4b + lsl r0, r0, #2 + ldrb r0, [r4, r0] + add r1, sp, #0x34 + add r2, sp, #0x30 + bl sub_02095750 + ldr r0, [r5, #4] + ldr r1, [sp, #0x34] + ldr r0, [r0, #0x40] + bl sub_0200B1EC + str r0, [sp, #0x28] + ldr r0, [r5, #4] + ldr r1, [sp, #0x30] + ldr r0, [r0, #0x40] + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, _02240BE8 ; =0x00010200 + ldr r1, [sp, #0x28] + str r0, [sp] + ldr r3, [sp, #0x18] + add r0, r5, #0 + mov r2, #0 + bl ov17_02240BF4 + ldr r0, _02240BE8 ; =0x00010200 + ldr r3, [sp, #0x14] + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov17_02240BF4 + ldr r0, [sp, #0x28] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x1c] + add r7, r7, #2 + add r0, #0x14 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, #0x14 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r0, #0x14 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #4 + blt _02240AA4 + mov r7, #0 + add r4, r7, #0 + add r6, #0xf0 +_02240B70: + ldr r0, [r5, #4] + mov r1, #0x15 + ldr r0, [r0, #0] + add r0, r0, r4 + add r0, #0xd0 + ldrh r0, [r0] + bl ov17_0223F310 + str r0, [sp, #0x2c] + ldr r0, _02240BEC ; =0x0001090A + ldr r1, [sp, #0x2c] + str r0, [sp] + add r0, r5, #0 + mov r2, #2 + add r3, r6, #0 + bl ov17_02240BF4 + ldr r0, [sp, #0x2c] + bl sub_020237BC + add r7, r7, #1 + add r4, #8 + add r6, #0x14 + cmp r7, #3 + blt _02240B70 + ldr r3, _02240BF0 ; =0x000080F1 + ldr r2, [r5, #4] + add r0, r3, #7 + str r3, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r2, #0x18] + ldr r1, [r2, #0x1c] + ldr r2, [r2, #0x50] + add r3, #0xc + bl ov17_02252AB0 + ldr r3, _02240BF0 ; =0x000080F1 + ldr r1, [r5, #4] + add r0, r3, #7 + str r3, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + mov r2, #0x15 + add r3, #0xc + bl ov17_02252B48 + mov r1, #0xc5 + lsl r1, r1, #2 + str r0, [r5, r1] + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240BE4: .word 0x00010708 +_02240BE8: .word 0x00010200 +_02240BEC: .word 0x0001090A +_02240BF0: .word 0x000080F1 + thumb_func_end ov17_02240A80 + + thumb_func_start ov17_02240BF4 +ov17_02240BF4: ; 0x02240BF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r7, r2, #0 + add r6, r1, #0 + add r5, r0, #0 + add r4, r3, #0 + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #0x1c + add r3, sp, #0x18 + bl ov17_02240C60 + ldr r0, [sp, #0x1c] + strh r0, [r4, #0x12] + ldr r0, [sp, #0x18] + strh r0, [r4, #0x10] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02240C20 + add r0, r4, #0 + bl sub_0201A8FC +_02240C20: + add r0, r4, #0 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r5, #4] + ldr r2, [sp, #0x18] + ldr r0, [r0, #0x24] + lsl r2, r2, #0x18 + add r1, r4, #0 + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x38] + add r1, r7, #0 + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + add r0, r4, #0 + add r2, r6, #0 + str r3, [sp, #0x14] + bl sub_0201D7E0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02240BF4 + + thumb_func_start ov17_02240C60 +ov17_02240C60: ; 0x02240C60 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r6, r2, #0 + add r0, r1, #0 + add r1, r4, #0 + mov r2, #0 + add r7, r3, #0 + bl sub_02002D7C + add r4, r0, #0 + asr r1, r4, #2 + lsr r1, r1, #0x1d + add r1, r4, r1 + asr r5, r1, #3 + mov r1, #8 + bl sub_020BD140 + cmp r0, #0 + beq _02240C88 + add r5, r5, #1 +_02240C88: + str r4, [r6, #0] + str r5, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02240C60 + + thumb_func_start ov17_02240C90 +ov17_02240C90: ; 0x02240C90 + push {r4, r5, r6, lr} + mov r6, #0xc6 + lsl r6, r6, #2 + add r2, r6, #0 + add r5, r0, #0 + sub r2, #0x38 + ldrsb r2, [r5, r2] + ldr r1, _02240CF4 ; =0x02253558 + mov r3, #0x30 + add r4, r2, #0 + mul r4, r3 + add r4, r1, r4 + ldr r2, [r4, #0x20] + cmp r2, #0 + bne _02240CB4 + sub r3, #0x31 + add r0, r3, #0 + pop {r4, r5, r6, pc} +_02240CB4: + ldrb r1, [r5, r6] + cmp r1, #0 + bne _02240CEE + add r0, r6, #4 + ldrb r0, [r5, r0] + cmp r0, #1 + beq _02240CCC + ldr r1, _02240CF8 ; =0x021BF67C + ldr r2, [r1, #0x48] + ldr r1, _02240CFC ; =0x00000CF3 + tst r1, r2 + beq _02240CE8 +_02240CCC: + cmp r0, #0 + bne _02240CD6 + ldr r0, _02240D00 ; =0x000005DC + bl sub_02005748 +_02240CD6: + mov r1, #1 + mov r0, #0xc7 + strb r1, [r5, r6] + mov r2, #0 + lsl r0, r0, #2 + strb r2, [r5, r0] + ldr r2, [r4, #0x20] + add r0, r5, #0 + blx r2 +_02240CE8: + mov r0, #0 + mvn r0, r0 + pop {r4, r5, r6, pc} +_02240CEE: + mov r1, #0 + blx r2 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02240CF4: .word 0x02253558 +_02240CF8: .word 0x021BF67C +_02240CFC: .word 0x00000CF3 +_02240D00: .word 0x000005DC + thumb_func_end ov17_02240C90 + + thumb_func_start ov17_02240D04 +ov17_02240D04: ; 0x02240D04 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r1, [sp, #8] + mov r1, #0x31 + add r5, r0, #0 + lsl r1, r1, #4 + add r0, r5, r1 + str r0, [sp, #0xc] + add r0, r1, #0 + sub r1, #0x30 + add r0, #8 + add r6, r5, r0 + ldrsb r1, [r5, r1] + mov r0, #0x30 + ldr r2, _02240E5C ; =0x02253558 + mul r0, r1 + add r7, r2, r0 + mov r4, #0 + b _02240D48 +_02240D2A: + ldr r0, [r5, #4] + ldr r1, _02240E60 ; =0x00000123 + ldr r0, [r0, #0] + mov r2, #0 + ldrb r1, [r0, r1] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r4, #0 + add r1, #0x36 + bl sub_02074470 + lsl r2, r4, #1 + add r1, sp, #0x10 + strh r0, [r1, r2] + add r4, r4, #1 +_02240D48: + cmp r4, #4 + blt _02240D2A + ldr r0, [sp, #8] + cmp r0, #1 + bne _02240DC6 + ldr r0, [sp, #0xc] + mov r1, #0 + ldrsb r0, [r0, r1] + mov r4, #1 + strb r0, [r6, #2] + ldr r0, [sp, #0xc] + ldrsb r0, [r0, r4] + strb r0, [r6, #1] + ldrsb r0, [r6, r4] + lsl r3, r0, #1 + mov r0, #2 + ldrsb r2, [r6, r0] + ldr r0, _02240E64 ; =0x0225323C + add r0, r0, r3 + ldrb r3, [r2, r0] + add r0, sp, #0x10 + lsl r2, r3, #1 + ldrh r0, [r0, r2] + cmp r0, #0 + bne _02240D92 + ldr r0, [sp, #0xc] + strb r1, [r0] + strb r1, [r0, #1] + strb r1, [r6, #2] + strb r1, [r6, #1] + ldrsb r0, [r6, r4] + lsl r2, r0, #1 + mov r0, #2 + ldrsb r1, [r6, r0] + ldr r0, _02240E64 ; =0x0225323C + add r0, r0, r2 + ldrb r3, [r1, r0] +_02240D92: + ldr r0, [r7, #0x14] + lsl r3, r3, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r7, #0x14] + mov r0, #0xc5 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov17_02252C78 + mov r0, #0 + add sp, #0x1c + mvn r0, r0 + pop {r4, r5, r6, r7, pc} +_02240DC6: + ldr r0, _02240E64 ; =0x0225323C + add r1, sp, #0x18 + mov r2, #4 + bl sub_020C4DB0 + mov r1, #2 + add r0, r6, #0 + add r2, r1, #0 + add r3, sp, #0x18 + bl ov17_02241004 + cmp r0, #0x20 + bhi _02240DF6 + bhs _02240E02 + cmp r0, #2 + bhi _02240DF0 + cmp r0, #1 + blo _02240E54 + beq _02240E40 + cmp r0, #2 + b _02240E54 +_02240DF0: + cmp r0, #0x10 + beq _02240E02 + b _02240E54 +_02240DF6: + cmp r0, #0x40 + bhi _02240DFE + beq _02240E02 + b _02240E54 +_02240DFE: + cmp r0, #0x80 + bne _02240E54 +_02240E02: + mov r0, #1 + ldrsb r0, [r6, r0] + ldr r2, _02240E64 ; =0x0225323C + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r6, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r7, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r7, #0x14] + mov r0, #0xc5 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov17_02252C78 + b _02240E54 +_02240E40: + mov r0, #1 + ldrsb r0, [r6, r0] + ldr r2, _02240E64 ; =0x0225323C + add sp, #0x1c + lsl r3, r0, #1 + mov r0, #2 + ldrsb r1, [r6, r0] + add r0, r2, r3 + ldrb r0, [r1, r0] + pop {r4, r5, r6, r7, pc} +_02240E54: + mov r0, #0 + mvn r0, r0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240E5C: .word 0x02253558 +_02240E60: .word 0x00000123 +_02240E64: .word 0x0225323C + thumb_func_end ov17_02240D04 + + thumb_func_start ov17_02240E68 +ov17_02240E68: ; 0x02240E68 + push {r4, r5, r6, r7} + mov r2, #0x31 + lsl r2, r2, #4 + mov r4, #0 + add r2, r0, r2 + ldr r7, _02240EA0 ; =0x0225323C + add r0, r4, #0 + b _02240E96 +_02240E78: + lsl r5, r4, #1 + add r3, r0, #0 + add r6, r7, r5 + b _02240E90 +_02240E80: + ldrb r5, [r3, r6] + cmp r1, r5 + bne _02240E8E + strb r3, [r2] + strb r4, [r2, #1] + pop {r4, r5, r6, r7} + bx lr +_02240E8E: + add r3, r3, #1 +_02240E90: + cmp r3, #2 + blt _02240E80 + add r4, r4, #1 +_02240E96: + cmp r4, #2 + blt _02240E78 + pop {r4, r5, r6, r7} + bx lr + nop +_02240EA0: .word 0x0225323C + thumb_func_end ov17_02240E68 + + thumb_func_start ov17_02240EA4 +ov17_02240EA4: ; 0x02240EA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r7, #0x31 + lsl r7, r7, #4 + add r3, r7, #0 + add r6, r0, #0 + sub r3, #0x30 + add r0, r7, #0 + ldrsb r5, [r6, r3] + add r0, #8 + add r4, r6, r0 + mov r3, #0x30 + add r2, r1, #0 + ldr r0, _02240FBC ; =0x02253558 + mul r3, r5 + add r1, r6, r7 + add r5, r0, r3 + cmp r2, #1 + bne _02240F18 + mov r0, #2 + ldrsb r2, [r1, r0] + strb r2, [r4, #2] + mov r2, #3 + ldrsb r1, [r1, r2] + strb r1, [r4, #1] + mov r1, #1 + ldrsb r2, [r4, r1] + ldrsb r3, [r4, r0] + lsl r1, r2, #1 + add r2, r2, r1 + ldr r1, _02240FC0 ; =0x02253240 + add r0, r1, r2 + ldrb r1, [r3, r0] + ldr r0, [r5, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r5, #0x14] + add r0, r7, #4 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov17_02252C78 + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02240F18: + ldr r0, _02240FC0 ; =0x02253240 + add r1, sp, #8 + mov r2, #6 + bl sub_020C4DB0 + add r0, r4, #0 + mov r1, #3 + mov r2, #2 + add r3, sp, #8 + bl ov17_02241004 + cmp r0, #0x20 + bhi _02240F4A + bhs _02240F56 + cmp r0, #2 + bhi _02240F44 + cmp r0, #1 + blo _02240FB2 + beq _02240F96 + cmp r0, #2 + beq _02240FAC + b _02240FB2 +_02240F44: + cmp r0, #0x10 + beq _02240F56 + b _02240FB2 +_02240F4A: + cmp r0, #0x40 + bhi _02240F52 + beq _02240F56 + b _02240FB2 +_02240F52: + cmp r0, #0x80 + bne _02240FB2 +_02240F56: + mov r0, #1 + ldrsb r1, [r4, r0] + ldr r2, _02240FC0 ; =0x02253240 + lsl r0, r1, #1 + add r3, r1, r0 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r1, [r1, r0] + ldr r0, [r5, #0x14] + lsl r3, r1, #2 + add r0, r0, r3 + ldrb r0, [r0, #1] + sub r0, #8 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r4, [r5, #0x14] + mov r0, #0xc5 + add r2, r4, r3 + ldrb r1, [r2, #2] + ldrb r2, [r2, #3] + ldrb r3, [r4, r3] + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r1, #8 + sub r2, #8 + add r3, #8 + bl ov17_02252C78 + b _02240FB2 +_02240F96: + mov r0, #1 + ldrsb r1, [r4, r0] + ldr r2, _02240FC0 ; =0x02253240 + add sp, #0x10 + lsl r0, r1, #1 + add r3, r1, r0 + mov r0, #2 + ldrsb r1, [r4, r0] + add r0, r2, r3 + ldrb r0, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_02240FAC: + add sp, #0x10 + mov r0, #3 + pop {r3, r4, r5, r6, r7, pc} +_02240FB2: + mov r0, #0 + mvn r0, r0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240FBC: .word 0x02253558 +_02240FC0: .word 0x02253240 + thumb_func_end ov17_02240EA4 + + thumb_func_start ov17_02240FC4 +ov17_02240FC4: ; 0x02240FC4 + push {r4, r5, r6, r7} + cmp r1, #3 + beq _02240FFC + mov r2, #0x31 + lsl r2, r2, #4 + add r3, r0, r2 + mov r5, #0 + ldr r0, _02241000 ; =0x02253240 + add r2, r5, #0 + b _02240FF8 +_02240FD8: + lsl r6, r5, #1 + add r6, r5, r6 + add r4, r2, #0 + add r7, r0, r6 + b _02240FF2 +_02240FE2: + ldrb r6, [r4, r7] + cmp r1, r6 + bne _02240FF0 + strb r4, [r3, #2] + strb r5, [r3, #3] + pop {r4, r5, r6, r7} + bx lr +_02240FF0: + add r4, r4, #1 +_02240FF2: + cmp r4, #3 + blt _02240FE2 + add r5, r5, #1 +_02240FF8: + cmp r5, #2 + blt _02240FD8 +_02240FFC: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_02241000: .word 0x02253240 + thumb_func_end ov17_02240FC4 + + thumb_func_start ov17_02241004 +ov17_02241004: ; 0x02241004 + push {r3, r4, r5, r6, r7, lr} + mov r7, #2 + add r4, r1, #0 + ldrsb r1, [r0, r7] + mov r5, #1 + add r6, r2, #0 + str r1, [sp] + ldrsb r1, [r0, r5] + add r2, r3, #0 + mov r3, #0x40 + mov ip, r1 + ldr r1, _022411DC ; =0x021BF67C + ldr r1, [r1, #0x48] + tst r3, r1 + beq _02241072 + mov r1, ip + sub r1, r1, #1 + strb r1, [r0, #1] + ldrsb r1, [r0, r5] + cmp r1, #0 + bge _02241032 + mov r1, #0 + strb r1, [r0, #1] +_02241032: + cmp r2, #0 + beq _0224106E + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _0224106E + add r1, r0, #1 + mov r7, #0 + mov r6, #1 +_0224104E: + ldrsb r3, [r1, r7] + sub r3, r3, #1 + strb r3, [r1] + ldrsb r3, [r0, r6] + cmp r3, #0 + bge _02241060 + mov r1, ip + strb r1, [r0, #1] + b _0224106E +_02241060: + mov r5, #2 + ldrsb r5, [r0, r5] + mul r3, r4 + add r5, r2, r5 + ldrb r3, [r3, r5] + cmp r3, #0xff + beq _0224104E +_0224106E: + mov r5, #0x40 + b _02241186 +_02241072: + mov r3, #0x80 + tst r3, r1 + beq _022410C8 + mov r1, ip + add r1, r1, #1 + strb r1, [r0, #1] + ldrsb r1, [r0, r5] + cmp r1, r6 + blt _02241088 + sub r1, r6, #1 + strb r1, [r0, #1] +_02241088: + cmp r2, #0 + beq _022410C4 + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _022410C4 + add r1, r0, #1 + mov r7, #1 +_022410A2: + mov r3, #0 + ldrsb r3, [r1, r3] + add r3, r3, #1 + strb r3, [r1] + ldrsb r3, [r0, r7] + cmp r3, r6 + blt _022410B6 + mov r1, ip + strb r1, [r0, #1] + b _022410C4 +_022410B6: + mov r5, #2 + ldrsb r5, [r0, r5] + mul r3, r4 + add r5, r2, r5 + ldrb r3, [r3, r5] + cmp r3, #0xff + beq _022410A2 +_022410C4: + mov r5, #0x80 + b _02241186 +_022410C8: + mov r3, #0x20 + tst r3, r1 + beq _0224111E + ldr r1, [sp] + sub r1, r1, #1 + strb r1, [r0, #2] + ldrsb r1, [r0, r7] + cmp r1, #0 + bge _022410DE + mov r1, #0 + strb r1, [r0, #2] +_022410DE: + cmp r2, #0 + beq _0224111A + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _0224111A + add r5, r0, #2 + mov r7, #0 + mov r6, #2 +_022410FA: + ldrsb r1, [r5, r7] + sub r1, r1, #1 + strb r1, [r5] + ldrsb r3, [r0, r6] + cmp r3, #0 + bge _0224110C + ldr r1, [sp] + strb r1, [r0, #2] + b _0224111A +_0224110C: + mov r1, #1 + ldrsb r1, [r0, r1] + add r3, r2, r3 + mul r1, r4 + ldrb r1, [r1, r3] + cmp r1, #0xff + beq _022410FA +_0224111A: + mov r5, #0x20 + b _02241186 +_0224111E: + mov r3, #0x10 + tst r3, r1 + beq _02241174 + ldr r1, [sp] + add r1, r1, #1 + strb r1, [r0, #2] + ldrsb r1, [r0, r7] + cmp r1, r4 + blt _02241134 + sub r1, r4, #1 + strb r1, [r0, #2] +_02241134: + cmp r2, #0 + beq _02241170 + mov r3, #1 + mov r1, #2 + ldrsb r3, [r0, r3] + ldrsb r1, [r0, r1] + mul r3, r4 + add r1, r1, r3 + ldrb r1, [r2, r1] + cmp r1, #0xff + bne _02241170 + add r5, r0, #2 + mov r7, #0 + mov r6, #2 +_02241150: + ldrsb r1, [r5, r7] + add r1, r1, #1 + strb r1, [r5] + ldrsb r3, [r0, r6] + cmp r3, r4 + blt _02241162 + ldr r1, [sp] + strb r1, [r0, #2] + b _02241170 +_02241162: + mov r1, #1 + ldrsb r1, [r0, r1] + add r3, r2, r3 + mul r1, r4 + ldrb r1, [r1, r3] + cmp r1, #0xff + beq _02241150 +_02241170: + mov r5, #0x10 + b _02241186 +_02241174: + add r3, r1, #0 + tst r3, r5 + bne _02241186 + tst r1, r7 + beq _02241182 + add r5, r7, #0 + b _02241186 +_02241182: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02241186: + cmp r2, #0 + beq _022411B0 + mov r1, ip + add r3, r4, #0 + mul r3, r1 + ldr r1, [sp] + add r1, r1, r3 + mov r3, #2 + ldrsb r6, [r0, r3] + mov r3, #1 + ldrsb r3, [r0, r3] + ldrb r1, [r2, r1] + mul r3, r4 + add r3, r6, r3 + ldrb r2, [r2, r3] + cmp r1, r2 + bne _022411B0 + ldr r1, [sp] + strb r1, [r0, #2] + mov r1, ip + strb r1, [r0, #1] +_022411B0: + mov r1, #2 + ldrsb r2, [r0, r1] + ldr r1, [sp] + cmp r2, r1 + bne _022411C4 + mov r1, #1 + ldrsb r1, [r0, r1] + mov r0, ip + cmp r1, r0 + beq _022411CC +_022411C4: + ldr r0, _022411E0 ; =0x000005DC + bl sub_02005748 + b _022411D6 +_022411CC: + mov r0, #0xf0 + tst r0, r5 + beq _022411D6 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022411D6: + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022411DC: .word 0x021BF67C +_022411E0: .word 0x000005DC + thumb_func_end ov17_02241004 + + thumb_func_start ov17_022411E4 +ov17_022411E4: ; 0x022411E4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0 + mov r2, #0xb7 + add r4, r1, #0 + str r0, [sp] + lsl r2, r2, #2 + ldr r0, [r4, #4] + ldr r2, [r4, r2] + mov r3, #6 + ldr r0, [r0, #0x24] + ldr r2, [r2, #0x14] + mov r1, #4 + lsl r3, r3, #0xc + bl sub_0201958C + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0xb6 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_022411E4 + + thumb_func_start ov17_02241220 +ov17_02241220: ; 0x02241220 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + mov r0, #0x2e + lsl r0, r0, #4 + ldrsb r1, [r1, r0] + mov r0, #0x30 + mov r4, #0 + ldr r2, _02241268 ; =0x02253558 + mul r0, r1 + ldr r6, _0224126C ; =0x0000FFFF + add r5, r2, r0 + add r7, r4, #0 +_02241238: + ldrh r0, [r5, #4] + cmp r0, r6 + bne _0224124C + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r7, #0 + bl sub_02019120 + b _02241258 +_0224124C: + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r1, #1 + bl sub_02019120 +_02241258: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _02241238 + ldr r0, [sp] + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241268: .word 0x02253558 +_0224126C: .word 0x0000FFFF + thumb_func_end ov17_02241220 + + .rodata + + + .global Unk_ov17_02253230 +Unk_ov17_02253230: ; 0x02253230 + .incbin "incbin/overlay17_rodata.bin", 0x4A4, 0x4A8 - 0x4A4 + + .global Unk_ov17_02253234 +Unk_ov17_02253234: ; 0x02253234 + .incbin "incbin/overlay17_rodata.bin", 0x4A8, 0x4AC - 0x4A8 + + .global Unk_ov17_02253238 +Unk_ov17_02253238: ; 0x02253238 + .incbin "incbin/overlay17_rodata.bin", 0x4AC, 0x4B0 - 0x4AC + + .global Unk_ov17_0225323C +Unk_ov17_0225323C: ; 0x0225323C + .incbin "incbin/overlay17_rodata.bin", 0x4B0, 0x4B4 - 0x4B0 + + .global Unk_ov17_02253240 +Unk_ov17_02253240: ; 0x02253240 + .incbin "incbin/overlay17_rodata.bin", 0x4B4, 0x4BC - 0x4B4 + + .global Unk_ov17_02253248 +Unk_ov17_02253248: ; 0x02253248 + .incbin "incbin/overlay17_rodata.bin", 0x4BC, 0x4C4 - 0x4BC + + .global Unk_ov17_02253250 +Unk_ov17_02253250: ; 0x02253250 + .incbin "incbin/overlay17_rodata.bin", 0x4C4, 0x4D0 - 0x4C4 + + .global Unk_ov17_0225325C +Unk_ov17_0225325C: ; 0x0225325C + .incbin "incbin/overlay17_rodata.bin", 0x4D0, 0x4DC - 0x4D0 + + .global Unk_ov17_02253268 +Unk_ov17_02253268: ; 0x02253268 + .incbin "incbin/overlay17_rodata.bin", 0x4DC, 0x4EC - 0x4DC + + .global Unk_ov17_02253278 +Unk_ov17_02253278: ; 0x02253278 + .incbin "incbin/overlay17_rodata.bin", 0x4EC, 0x4FC - 0x4EC + + .global Unk_ov17_02253288 +Unk_ov17_02253288: ; 0x02253288 + .incbin "incbin/overlay17_rodata.bin", 0x4FC, 0x50C - 0x4FC + + .global Unk_ov17_02253298 +Unk_ov17_02253298: ; 0x02253298 + .incbin "incbin/overlay17_rodata.bin", 0x50C, 0x51C - 0x50C + + .global Unk_ov17_022532A8 +Unk_ov17_022532A8: ; 0x022532A8 + .incbin "incbin/overlay17_rodata.bin", 0x51C, 0x530 - 0x51C + + .global Unk_ov17_022532BC +Unk_ov17_022532BC: ; 0x022532BC + .incbin "incbin/overlay17_rodata.bin", 0x530, 0x544 - 0x530 + + .global Unk_ov17_022532D0 +Unk_ov17_022532D0: ; 0x022532D0 + .incbin "incbin/overlay17_rodata.bin", 0x544, 0x558 - 0x544 + + .global Unk_ov17_022532E4 +Unk_ov17_022532E4: ; 0x022532E4 + .incbin "incbin/overlay17_rodata.bin", 0x558, 0x570 - 0x558 + + .global Unk_ov17_022532FC +Unk_ov17_022532FC: ; 0x022532FC + .incbin "incbin/overlay17_rodata.bin", 0x570, 0x588 - 0x570 + + .global Unk_ov17_02253314 +Unk_ov17_02253314: ; 0x02253314 + .incbin "incbin/overlay17_rodata.bin", 0x588, 0x5A8 - 0x588 + + .global Unk_ov17_02253334 +Unk_ov17_02253334: ; 0x02253334 + .incbin "incbin/overlay17_rodata.bin", 0x5A8, 0x5C8 - 0x5A8 + + .global Unk_ov17_02253354 +Unk_ov17_02253354: ; 0x02253354 + .incbin "incbin/overlay17_rodata.bin", 0x5C8, 0x5FC - 0x5C8 + + .global Unk_ov17_02253388 +Unk_ov17_02253388: ; 0x02253388 + .incbin "incbin/overlay17_rodata.bin", 0x5FC, 0x63C - 0x5FC + + .global Unk_ov17_022533C8 +Unk_ov17_022533C8: ; 0x022533C8 + .incbin "incbin/overlay17_rodata.bin", 0x63C, 0x67C - 0x63C + + .global Unk_ov17_02253408 +Unk_ov17_02253408: ; 0x02253408 + .incbin "incbin/overlay17_rodata.bin", 0x67C, 0x6BC - 0x67C + + .global Unk_ov17_02253448 +Unk_ov17_02253448: ; 0x02253448 + .incbin "incbin/overlay17_rodata.bin", 0x6BC, 0x72C - 0x6BC + + .global Unk_ov17_022534B8 +Unk_ov17_022534B8: ; 0x022534B8 + .incbin "incbin/overlay17_rodata.bin", 0x72C, 0x7CC - 0x72C + + .global Unk_ov17_02253558 +Unk_ov17_02253558: ; 0x02253558 + .incbin "incbin/overlay17_rodata.bin", 0x7CC, 0xC0 + diff --git a/asm/ov17_02241270.s b/asm/ov17_02241270.s new file mode 100644 index 000000000..f65867e02 --- /dev/null +++ b/asm/ov17_02241270.s @@ -0,0 +1,212 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02241270 +ov17_02241270: ; 0x02241270 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + mov r3, #2 + str r3, [sp, #4] + ldr r3, _022412B8 ; =0x000080FB + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x2a + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022412BC ; =0x000080F6 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x2b + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022412BC ; =0x000080F6 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x2c + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022412B8: .word 0x000080FB +_022412BC: .word 0x000080F6 + thumb_func_end ov17_02241270 + + thumb_func_start ov17_022412C0 +ov17_022412C0: ; 0x022412C0 + push {r3, r4, r5, lr} + add r5, r2, #0 + ldr r2, _022412EC ; =0x0225364C + bl sub_0200CE6C + mov r1, #0x58 + mul r1, r5 + add r1, #0x28 + lsl r1, r1, #0x10 + mov r3, #0x11 + add r4, r0, #0 + asr r1, r1, #0x10 + mov r2, #0x60 + lsl r3, r3, #0x10 + bl sub_0200D500 + ldr r0, [r4, #0] + bl sub_0200D324 + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_022412EC: .word 0x0225364C + thumb_func_end ov17_022412C0 + + thumb_func_start ov17_022412F0 +ov17_022412F0: ; 0x022412F0 + push {r4, lr} + ldr r1, _0224130C ; =0x000080FB + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _02241310 ; =0x000080F6 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _02241310 ; =0x000080F6 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224130C: .word 0x000080FB +_02241310: .word 0x000080F6 + thumb_func_end ov17_022412F0 + + thumb_func_start ov17_02241314 +ov17_02241314: ; 0x02241314 + ldr r3, _02241318 ; =sub_0200D0F4 + bx r3 + ; .align 2, 0 +_02241318: .word sub_0200D0F4 + thumb_func_end ov17_02241314 + + thumb_func_start ov17_0224131C +ov17_0224131C: ; 0x0224131C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + mov r3, #2 + str r3, [sp, #4] + ldr r3, _02241364 ; =0x000080FA + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x2d + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02241368 ; =0x000080F5 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x2e + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02241368 ; =0x000080F5 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x2f + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02241364: .word 0x000080FA +_02241368: .word 0x000080F5 + thumb_func_end ov17_0224131C + + thumb_func_start ov17_0224136C +ov17_0224136C: ; 0x0224136C + push {r4, r5, r6, lr} + add r5, r2, #0 + ldr r2, [sp, #0x10] + add r6, r3, #0 + cmp r2, #0 + blt _02241380 + ldr r2, _022413A4 ; =0x02253618 + bl sub_0200CE6C + b _02241386 +_02241380: + ldr r2, _022413A8 ; =0x02253680 + bl sub_0200CE6C +_02241386: + add r4, r0, #0 + lsl r1, r5, #0x10 + lsl r2, r6, #0x10 + mov r3, #0x11 + add r0, r4, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x10 + bl sub_0200D500 + ldr r0, [r4, #0] + bl sub_0200D324 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022413A4: .word 0x02253618 +_022413A8: .word 0x02253680 + thumb_func_end ov17_0224136C + + thumb_func_start ov17_022413AC +ov17_022413AC: ; 0x022413AC + ldr r3, _022413B0 ; =sub_0200D0F4 + bx r3 + ; .align 2, 0 +_022413B0: .word sub_0200D0F4 + thumb_func_end ov17_022413AC + + thumb_func_start ov17_022413B4 +ov17_022413B4: ; 0x022413B4 + push {r4, lr} + ldr r1, _022413D0 ; =0x000080FA + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _022413D4 ; =0x000080F5 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _022413D4 ; =0x000080F5 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_022413D0: .word 0x000080FA +_022413D4: .word 0x000080F5 + thumb_func_end ov17_022413B4 + + .rodata + + + .global Unk_ov17_02253618 +Unk_ov17_02253618: ; 0x02253618 + .incbin "incbin/overlay17_rodata.bin", 0x88C, 0x8C0 - 0x88C + + .global Unk_ov17_0225364C +Unk_ov17_0225364C: ; 0x0225364C + .incbin "incbin/overlay17_rodata.bin", 0x8C0, 0x8F4 - 0x8C0 + + .global Unk_ov17_02253680 +Unk_ov17_02253680: ; 0x02253680 + .incbin "incbin/overlay17_rodata.bin", 0x8F4, 0x34 + diff --git a/asm/ov17_022413D8.s b/asm/ov17_022413D8.s new file mode 100644 index 000000000..e93c7ff0b --- /dev/null +++ b/asm/ov17_022413D8.s @@ -0,0 +1,5148 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_022413D8 +ov17_022413D8: ; 0x022413D8 + ldr r0, _022413E0 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + bx lr + ; .align 2, 0 +_022413E0: .word 0x04000050 + thumb_func_end ov17_022413D8 + + thumb_func_start ov17_022413E4 +ov17_022413E4: ; 0x022413E4 + push {r3, r4, r5, r6, r7, lr} + ldr r0, [r0, #0x30] + add r5, r1, #0 + mov r1, #2 + add r4, r2, #0 + bl sub_02019FE4 + mov r1, #0xc0 + mul r1, r5 + lsl r1, r1, #1 + mov r2, #0 + ldr r6, _02241424 ; =0x00000FFF + add r0, r0, r1 + add r3, r2, #0 + lsl r4, r4, #0xc +_02241402: + lsl r5, r3, #1 + mov r1, #0 + add r5, r0, r5 +_02241408: + ldrh r7, [r5] + add r1, r1, #1 + and r7, r6 + orr r7, r4 + strh r7, [r5] + add r5, r5, #2 + cmp r1, #0xa + blt _02241408 + add r2, r2, #1 + add r3, #0x20 + cmp r2, #6 + blt _02241402 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241424: .word 0x00000FFF + thumb_func_end ov17_022413E4 + + thumb_func_start ov17_02241428 +ov17_02241428: ; 0x02241428 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r4, #0 + ldr r6, _02241454 ; =0x022536B4 + ldr r7, _02241458 ; =0x00000231 + b _02241444 +_02241434: + add r2, r5, r4 + ldrb r2, [r2, r7] + add r0, r5, #0 + add r1, r4, #0 + ldrb r2, [r6, r2] + bl ov17_022413E4 + add r4, r4, #1 +_02241444: + cmp r4, #4 + blt _02241434 + ldr r0, [r5, #0x30] + mov r1, #2 + bl sub_0201C3C0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241454: .word 0x022536B4 +_02241458: .word 0x00000231 + thumb_func_end ov17_02241428 + + thumb_func_start ov17_0224145C +ov17_0224145C: ; 0x0224145C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x15 + mov r1, #0xc + bl sub_02018144 + mov r1, #0 + mov r2, #0xc + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [r5, #0x5c] + ldr r2, _0224148C ; =0x00009CA4 + str r0, [r4, #0] + ldr r0, _02241490 ; =ov17_022414C0 + add r1, r4, #0 + strb r6, [r4, #0xa] + bl sub_0200D9E8 + str r0, [r4, #4] + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_0224148C: .word 0x00009CA4 +_02241490: .word ov17_022414C0 + thumb_func_end ov17_0224145C + + thumb_func_start ov17_02241494 +ov17_02241494: ; 0x02241494 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #0xb] + cmp r0, #0 + beq _022414A2 + bl sub_02022974 +_022414A2: + ldr r0, [r4, #4] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov17_02241494 + + thumb_func_start ov17_022414B0 +ov17_022414B0: ; 0x022414B0 + mov r1, #1 + strb r1, [r0, #0xb] + mov r1, #0xa + lsl r1, r1, #8 + strh r1, [r0, #8] + bx lr + thumb_func_end ov17_022414B0 + + thumb_func_start ov17_022414BC +ov17_022414BC: ; 0x022414BC + ldrb r0, [r0, #0xb] + bx lr + thumb_func_end ov17_022414BC + + thumb_func_start ov17_022414C0 +ov17_022414C0: ; 0x022414C0 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + ldrb r0, [r4, #0xb] + cmp r0, #0 + beq _02241516 + mov r0, #8 + ldrsh r0, [r4, r0] + ldr r2, _0224151C ; =0x022536B4 + mov r1, #0 + asr r0, r0, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, _02241520 ; =0x00007FFF + str r0, [sp, #4] + ldrb r3, [r4, #0xa] + ldr r0, [r4, #0] + ldrb r2, [r2, r3] + mov r3, #4 + lsl r2, r2, #4 + add r2, r2, #1 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + bl sub_020039B0 + mov r1, #8 + ldrsh r2, [r4, r1] + cmp r2, #0 + bne _02241504 + mov r0, #0 + add sp, #8 + strb r0, [r4, #0xb] + pop {r4, pc} +_02241504: + mov r0, #0xa + lsl r0, r0, #6 + sub r0, r2, r0 + strh r0, [r4, #8] + ldrsh r0, [r4, r1] + cmp r0, #0 + bge _02241516 + mov r0, #0 + strh r0, [r4, #8] +_02241516: + add sp, #8 + pop {r4, pc} + nop +_0224151C: .word 0x022536B4 +_02241520: .word 0x00007FFF + thumb_func_end ov17_022414C0 + + thumb_func_start ov17_02241524 +ov17_02241524: ; 0x02241524 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + str r0, [sp, #0x18] + add r0, #8 + str r0, [sp, #0x18] + add r6, r1, #0 + lsl r0, r6, #2 + ldr r1, [sp, #0x18] + str r0, [sp, #0x1c] + ldr r0, [r1, r0] + bl sub_02007DC8 + lsl r0, r6, #4 + add r0, r5, r0 + ldr r0, [r0, #0x58] + cmp r0, #0 + bne _0224154C + bl sub_02022974 +_0224154C: + add r2, r5, #0 + add r2, #0x58 + lsl r1, r6, #4 + add r0, r2, r1 + str r0, [sp, #0x14] + ldr r0, [r2, r1] + mov r2, #0x32 + mov r1, #0 + lsl r2, r2, #6 + bl sub_020C4CF4 + ldr r1, [sp, #0x14] + lsl r0, r6, #5 + str r1, [sp] + mov r1, #0x15 + str r1, [sp, #4] + mov r1, #0xd8 + sub r1, r1, r0 + str r1, [sp, #8] + mov r1, #0x70 + sub r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, _022415E0 ; =0xFFFFFE00 + add r7, r5, #0 + str r0, [sp, #0x10] + ldr r2, [r5, #0] + lsl r4, r6, #2 + ldr r0, [r5, #4] + ldr r2, [r2, r4] + add r7, #8 + add r1, r6, #0 + mov r3, #0 + bl sub_02095484 + str r0, [r7, r4] + ldr r0, [r7, r4] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + ldr r0, [r7, r4] + mov r1, #0x25 + mov r2, #1 + bl sub_02007DEC + ldr r0, [r5, #0] + mov r1, #5 + ldr r0, [r0, r4] + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x70 + ldr r0, [r0, r4] + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + add r0, r6, #0 + bl ov12_022384F0 + cmp r0, #1 + bne _022415DA + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x1c] + mov r2, #1 + ldr r0, [r1, r0] + mov r1, #0x23 + bl sub_02007DEC +_022415DA: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_022415E0: .word 0xFFFFFE00 + thumb_func_end ov17_02241524 + + thumb_func_start ov17_022415E4 +ov17_022415E4: ; 0x022415E4 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r6, r0, #0 + mov r0, #0 + str r0, [sp, #0x1c] + add r7, r0, #0 + add r0, r6, #0 + str r0, [sp, #0x14] + add r0, #0x58 + ldr r4, [sp, #0x1c] + str r6, [sp, #0x18] + str r0, [sp, #0x14] + add r5, r6, #0 +_022415FE: + ldr r0, [sp, #0x18] + ldr r0, [r0, #0x58] + cmp r0, #0 + beq _0224160A + bl sub_02022974 +_0224160A: + mov r1, #0x32 + mov r0, #0x15 + lsl r1, r1, #6 + bl sub_02018144 + ldr r1, [sp, #0x18] + mov r3, #0 + str r0, [r1, #0x58] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + str r0, [sp] + mov r0, #0x15 + str r0, [sp, #4] + mov r0, #0xd8 + sub r0, r0, r7 + str r0, [sp, #8] + mov r0, #0x70 + sub r0, r0, r7 + str r0, [sp, #0xc] + ldr r0, _022416E0 ; =0xFFFFFE00 + str r0, [sp, #0x10] + ldr r2, [r6, #0] + ldr r0, [r6, #4] + ldr r2, [r2, r4] + bl sub_02095484 + str r0, [r5, #8] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + ldr r0, [r5, #8] + mov r1, #0x25 + mov r2, #1 + bl sub_02007DEC + ldr r0, [r6, #0] + mov r1, #5 + ldr r0, [r0, r4] + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x20] + ldr r0, [r6, #0] + mov r1, #0x70 + ldr r0, [r0, r4] + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + ldr r0, [sp, #0x20] + bl ov12_022384F0 + cmp r0, #1 + bne _02241682 + ldr r0, [r5, #8] + mov r1, #0x23 + mov r2, #1 + bl sub_02007DEC +_02241682: + ldr r0, [sp, #0x18] + add r7, #0x20 + add r0, #0x10 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r4, r4, #4 + add r0, #0x10 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #4 + blt _022415FE + add r0, r6, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022416AC + bl sub_02022974 +_022416AC: + mov r1, #0x32 + mov r0, #0x15 + lsl r1, r1, #6 + bl sub_02018144 + add r1, r6, #0 + add r1, #0x98 + str r0, [r1, #0] + add r0, r6, #0 + mov r2, #0x32 + ldr r1, [r6, #0x60] + add r0, #0xa0 + str r1, [r0, #0] + add r0, r6, #0 + ldr r1, [r6, #0x5c] + add r0, #0x9c + str r1, [r0, #0] + add r6, #0x98 + ldr r1, [r6, #0] + mov r0, #0 + lsl r2, r2, #6 + bl sub_020C4B4C + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_022416E0: .word 0xFFFFFE00 + thumb_func_end ov17_022415E4 + + thumb_func_start ov17_022416E4 +ov17_022416E4: ; 0x022416E4 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + str r0, [sp] + add r4, r0, #0 + add r5, r0, #0 + add r7, r6, #0 +_022416F0: + ldr r0, [r4, #8] + bl sub_02007DC8 + ldr r0, [r5, #0x58] + bl sub_020181C4 + str r7, [r5, #0x58] + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x10 + cmp r6, #4 + blt _022416F0 + ldr r0, [sp] + add r0, #0x98 + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [sp] + mov r1, #0 + add r0, #0x98 + str r0, [sp] + str r1, [r0, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_022416E4 + + thumb_func_start ov17_02241720 +ov17_02241720: ; 0x02241720 + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + ldr r5, [sp, #0x70] + add r6, r1, #0 + str r0, [sp, #0x18] + str r2, [sp, #0x1c] + ldr r4, [sp, #0x74] + cmp r5, #0 + beq _02241738 + cmp r5, #1 + beq _02241746 + b _02241754 +_02241738: + mov r0, #0x20 + str r0, [sp, #0x24] + mov r0, #0x1e + mov r3, #0x1f + mov r7, #1 + str r0, [sp, #0x20] + b _02241760 +_02241746: + mov r0, #0x26 + str r0, [sp, #0x24] + mov r0, #0x24 + mov r3, #0x25 + mov r7, #3 + str r0, [sp, #0x20] + b _02241760 +_02241754: + mov r0, #0x23 + str r0, [sp, #0x24] + mov r0, #0x21 + mov r3, #0x22 + mov r7, #2 + str r0, [sp, #0x20] +_02241760: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02241808 ; =0x000080E9 + ldr r1, [sp, #0x1c] + add r0, r5, r0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0200CC3C + str r4, [sp] + str r7, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _0224180C ; =0x000080EA + ldr r3, [sp, #0x1c] + add r0, r5, r0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + mov r1, #2 + add r2, r6, #0 + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + ldr r0, _02241808 ; =0x000080E9 + ldr r1, [sp, #0x1c] + add r0, r5, r0 + str r0, [sp, #4] + ldr r3, [sp, #0x24] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02241808 ; =0x000080E9 + ldr r1, [sp, #0x1c] + add r0, r5, r0 + str r0, [sp, #4] + ldr r3, [sp, #0x20] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0200CE54 + ldr r4, _02241810 ; =0x022538BC + add r3, sp, #0x28 + mov r2, #6 +_022417C8: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _022417C8 + ldr r0, [r4, #0] + add r2, sp, #0x28 + str r0, [r3, #0] + ldr r0, _02241808 ; =0x000080E9 + add r1, r5, r0 + add r0, r0, #1 + add r0, r5, r0 + str r0, [sp, #0x40] + str r1, [sp, #0x3c] + str r1, [sp, #0x44] + str r1, [sp, #0x48] + lsl r1, r5, #5 + add r1, #0x60 + add r0, sp, #0x28 + strh r1, [r0] + mov r1, #0x28 + strh r1, [r0, #2] + ldr r1, [sp, #0x1c] + add r0, r6, #0 + bl sub_0200CE6C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0200D324 + add r0, r4, #0 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241808: .word 0x000080E9 +_0224180C: .word 0x000080EA +_02241810: .word 0x022538BC + thumb_func_end ov17_02241720 + + thumb_func_start ov17_02241814 +ov17_02241814: ; 0x02241814 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + bl sub_0200D0F4 + ldr r1, _0224184C ; =0x000080E9 + add r0, r5, #0 + add r1, r4, r1 + bl sub_0200D070 + ldr r1, _02241850 ; =0x000080EA + add r0, r5, #0 + add r1, r4, r1 + bl sub_0200D080 + ldr r1, _0224184C ; =0x000080E9 + add r0, r5, #0 + add r1, r4, r1 + bl sub_0200D090 + ldr r1, _0224184C ; =0x000080E9 + add r0, r5, #0 + add r1, r4, r1 + bl sub_0200D0A0 + pop {r3, r4, r5, pc} + nop +_0224184C: .word 0x000080E9 +_02241850: .word 0x000080EA + thumb_func_end ov17_02241814 + + thumb_func_start ov17_02241854 +ov17_02241854: ; 0x02241854 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022418A0 ; =0x000080EC + add r6, r3, #0 + add r4, r2, #0 + add r5, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #0x27 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022418A0 ; =0x000080EC + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x28 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022418A0 ; =0x000080EC + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x29 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022418A0: .word 0x000080EC + thumb_func_end ov17_02241854 + + thumb_func_start ov17_022418A4 +ov17_022418A4: ; 0x022418A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + ldr r4, _022418F8 ; =0x022536F0 + add r6, r2, #0 + add r3, r0, #0 + add r7, r1, #0 + ldmia r4!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + ldr r5, _022418FC ; =0x02253820 + str r0, [r2, #0] + add r4, sp, #0xc + mov r2, #6 +_022418C0: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r2, r2, #1 + bne _022418C0 + ldr r0, [r5, #0] + lsl r1, r6, #5 + str r0, [r4, #0] + add r1, #0x60 + add r0, sp, #0 + strh r1, [r0, #0xc] + mov r1, #0x20 + strh r1, [r0, #0xe] + lsl r1, r6, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + add r1, r7, #0 + str r0, [sp, #0x18] + add r0, r3, #0 + add r2, sp, #0xc + bl sub_0200CE6C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0200D324 + add r0, r4, #0 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022418F8: .word 0x022536F0 +_022418FC: .word 0x02253820 + thumb_func_end ov17_022418A4 + + thumb_func_start ov17_02241900 +ov17_02241900: ; 0x02241900 + ldr r3, _02241904 ; =sub_0200D0F4 + bx r3 + ; .align 2, 0 +_02241904: .word sub_0200D0F4 + thumb_func_end ov17_02241900 + + thumb_func_start ov17_02241908 +ov17_02241908: ; 0x02241908 + push {r4, lr} + ldr r1, _02241924 ; =0x000080EC + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _02241924 ; =0x000080EC + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _02241924 ; =0x000080EC + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_02241924: .word 0x000080EC + thumb_func_end ov17_02241908 + + thumb_func_start ov17_02241928 +ov17_02241928: ; 0x02241928 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + str r2, [sp, #8] + add r6, r1, #0 + ldr r0, [r7, #0x50] + ldr r1, [r7, #0x18] + ldr r2, [r7, #0x1c] + ldr r3, [sp, #8] + bl ov17_02241854 + mov r4, #0 + add r5, r7, #0 + add r6, #0xd0 +_02241944: + ldr r0, [r7, #0x18] + ldr r1, [r7, #0x1c] + add r2, r4, #0 + bl ov17_022418A4 + add r1, r5, #0 + add r1, #0xb4 + str r0, [r1, #0] + ldr r0, [sp, #8] + str r4, [sp] + str r0, [sp, #4] + ldr r0, [r7, #0x50] + ldr r1, [r7, #0x18] + ldr r2, [r7, #0x1c] + add r3, r6, #0 + bl ov17_02241720 + add r1, r5, #0 + add r1, #0xa8 + add r4, r4, #1 + str r0, [r1, #0] + add r5, r5, #4 + add r6, #8 + cmp r4, #3 + blt _02241944 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02241928 + + thumb_func_start ov17_0224197C +ov17_0224197C: ; 0x0224197C + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02241984: + add r1, r5, #0 + add r1, #0xa8 + ldr r0, [r6, #0x1c] + ldr r1, [r1, #0] + add r2, r4, #0 + bl ov17_02241814 + add r0, r5, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + bl ov17_02241900 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _02241984 + ldr r0, [r6, #0x1c] + bl ov17_02241908 + pop {r4, r5, r6, pc} + thumb_func_end ov17_0224197C + + thumb_func_start ov17_022419AC +ov17_022419AC: ; 0x022419AC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022419F8 ; =0x000080F5 + add r6, r3, #0 + add r4, r2, #0 + add r5, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #0xe + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022419FC ; =0x000080F3 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xd + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022419FC ; =0x000080F3 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xc + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022419F8: .word 0x000080F5 +_022419FC: .word 0x000080F3 + thumb_func_end ov17_022419AC + + thumb_func_start ov17_02241A00 +ov17_02241A00: ; 0x02241A00 + push {r4, lr} + ldr r1, _02241A1C ; =0x000080F5 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _02241A20 ; =0x000080F3 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _02241A20 ; =0x000080F3 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_02241A1C: .word 0x000080F5 +_02241A20: .word 0x000080F3 + thumb_func_end ov17_02241A00 + + thumb_func_start ov17_02241A24 +ov17_02241A24: ; 0x02241A24 + push {r4, r5, lr} + sub sp, #0x34 + ldr r4, _02241A60 ; =0x022537B8 + add r5, r0, #0 + add r3, sp, #0 + mov r2, #6 +_02241A30: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02241A30 + ldr r0, [r4, #0] + add r2, sp, #0 + str r0, [r3, #0] + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + bl sub_0200CE6C + add r4, r0, #0 + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0] + bl sub_0200D324 + mov r0, #0x5f + lsl r0, r0, #2 + str r4, [r5, r0] + add sp, #0x34 + pop {r4, r5, pc} + nop +_02241A60: .word 0x022537B8 + thumb_func_end ov17_02241A24 + + thumb_func_start ov17_02241A64 +ov17_02241A64: ; 0x02241A64 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02241A76 + bl sub_02022974 +_02241A76: + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + mov r0, #0x5f + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02241A64 + + thumb_func_start ov17_02241A8C +ov17_02241A8C: ; 0x02241A8C + push {r4, r5, r6, lr} + add r4, r0, #0 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r6, r1, #0 + add r5, r2, #0 + cmp r0, #0 + bne _02241AA2 + bl sub_02022974 +_02241AA2: + ldr r1, _02241B08 ; =0x022536E4 + lsl r2, r6, #2 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r3, _02241B0C ; =0x022536E6 + ldrsh r1, [r1, r2] + ldrsh r2, [r3, r2] + ldr r0, [r4, r0] + bl sub_0200D4C4 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + bl sub_0200D364 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D3F4 + cmp r5, #3 + bhi _02241B04 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02241ADE: ; jump table + .short _02241AE6 - _02241ADE - 2 ; case 0 + .short _02241AEE - _02241ADE - 2 ; case 1 + .short _02241AF6 - _02241ADE - 2 ; case 2 + .short _02241AFE - _02241ADE - 2 ; case 3 +_02241AE6: + ldr r0, _02241B10 ; =0x000006E1 + bl sub_02005748 + pop {r4, r5, r6, pc} +_02241AEE: + ldr r0, _02241B14 ; =0x000006DF + bl sub_02005748 + pop {r4, r5, r6, pc} +_02241AF6: + ldr r0, _02241B18 ; =0x000005DD + bl sub_02005748 + pop {r4, r5, r6, pc} +_02241AFE: + ldr r0, _02241B18 ; =0x000005DD + bl sub_02005748 +_02241B04: + pop {r4, r5, r6, pc} + nop +_02241B08: .word 0x022536E4 +_02241B0C: .word 0x022536E6 +_02241B10: .word 0x000006E1 +_02241B14: .word 0x000006DF +_02241B18: .word 0x000005DD + thumb_func_end ov17_02241A8C + + thumb_func_start ov17_02241B1C +ov17_02241B1C: ; 0x02241B1C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02241B2E + bl sub_02022974 +_02241B2E: + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3F4 + pop {r4, pc} + thumb_func_end ov17_02241B1C + + thumb_func_start ov17_02241B3C +ov17_02241B3C: ; 0x02241B3C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r0, #0x15 + mov r1, #0x28 + add r6, r2, #0 + add r7, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x28 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + strb r0, [r7] + str r7, [r4, #4] + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [sp] + str r5, [r4, #0] + strb r0, [r4, #8] + lsl r0, r0, #2 + add r0, r5, r0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r1, #0xc + add r2, #0xe + bl sub_0200D550 + cmp r6, #6 + bhi _02241B96 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02241B88: ; jump table + .short _02241B96 - _02241B88 - 2 ; case 0 + .short _02241BAC - _02241B88 - 2 ; case 1 + .short _02241BB8 - _02241B88 - 2 ; case 2 + .short _02241BC8 - _02241B88 - 2 ; case 3 + .short _02241BD8 - _02241B88 - 2 ; case 4 + .short _02241BE8 - _02241B88 - 2 ; case 5 + .short _02241BF8 - _02241B88 - 2 ; case 6 +_02241B96: + mov r0, #1 + strb r0, [r4, #0x18] + ldr r0, _02241C0C ; =0xFFFFFE00 + ldr r2, _02241C10 ; =0x00009C40 + strh r0, [r4, #0x24] + strh r0, [r4, #0x26] + ldr r0, _02241C14 ; =ov17_02241CF0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02241BAC: + ldr r0, _02241C18 ; =ov17_02241C2C + ldr r2, _02241C10 ; =0x00009C40 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02241BB8: + ldr r0, _02241C1C ; =0xFFFFFD00 + ldr r2, _02241C10 ; =0x00009C40 + strh r0, [r4, #0x24] + ldr r0, _02241C14 ; =ov17_02241CF0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02241BC8: + ldr r0, _02241C20 ; =0xFFFFFC00 + ldr r2, _02241C10 ; =0x00009C40 + strh r0, [r4, #0x24] + ldr r0, _02241C14 ; =ov17_02241CF0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02241BD8: + ldr r0, _02241C24 ; =0xFFFFFB80 + ldr r2, _02241C10 ; =0x00009C40 + strh r0, [r4, #0x24] + ldr r0, _02241C14 ; =ov17_02241CF0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02241BE8: + ldr r0, _02241C28 ; =0xFFFFFD80 + ldr r2, _02241C10 ; =0x00009C40 + strh r0, [r4, #0x24] + ldr r0, _02241C14 ; =ov17_02241CF0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02241BF8: + mov r0, #0xff + mvn r0, r0 + strh r0, [r4, #0x24] + ldr r0, _02241C14 ; =ov17_02241CF0 + ldr r2, _02241C10 ; =0x00009C40 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241C0C: .word 0xFFFFFE00 +_02241C10: .word 0x00009C40 +_02241C14: .word ov17_02241CF0 +_02241C18: .word ov17_02241C2C +_02241C1C: .word 0xFFFFFD00 +_02241C20: .word 0xFFFFFC00 +_02241C24: .word 0xFFFFFB80 +_02241C28: .word 0xFFFFFD80 + thumb_func_end ov17_02241B3C + + thumb_func_start ov17_02241C2C +ov17_02241C2C: ; 0x02241C2C + push {r4, lr} + add r2, r1, #0 + add r4, r0, #0 + ldrb r0, [r2, #0xa] + cmp r0, #0 + beq _02241C42 + cmp r0, #1 + beq _02241C58 + cmp r0, #2 + beq _02241C98 + b _02241CB2 +_02241C42: + mov r0, #0xc + ldrsh r0, [r2, r0] + lsl r0, r0, #8 + str r0, [r2, #0x10] + mov r0, #0xe + ldrsh r0, [r2, r0] + lsl r0, r0, #8 + str r0, [r2, #0x14] + ldrb r0, [r2, #0xa] + add r0, r0, #1 + strb r0, [r2, #0xa] +_02241C58: + ldrb r0, [r2, #0x18] + mov r1, #1 + tst r0, r1 + beq _02241C6C + mov r0, #0xc + ldrsh r0, [r2, r0] + lsl r3, r0, #8 + lsl r0, r1, #9 + add r0, r3, r0 + b _02241C76 +_02241C6C: + mov r0, #0xc + ldrsh r0, [r2, r0] + lsl r3, r0, #8 + lsl r0, r1, #9 + sub r0, r3, r0 +_02241C76: + str r0, [r2, #0x10] + ldrb r0, [r2, #0x18] + add r0, r0, #1 + strb r0, [r2, #0x18] + ldrb r0, [r2, #0x18] + cmp r0, #4 + bls _02241CC6 + mov r0, #0xc + ldrsh r0, [r2, r0] + lsl r0, r0, #8 + str r0, [r2, #0x10] + mov r0, #0 + strb r0, [r2, #0x18] + ldrb r0, [r2, #0xa] + add r0, r0, #1 + strb r0, [r2, #0xa] + b _02241CC6 +_02241C98: + mov r0, #9 + ldrsb r1, [r2, r0] + add r1, r1, #1 + strb r1, [r2, #9] + ldrsb r0, [r2, r0] + cmp r0, #0xf + ble _02241CC6 + mov r0, #0 + strb r0, [r2, #9] + ldrb r0, [r2, #0xa] + add r0, r0, #1 + strb r0, [r2, #0xa] + b _02241CC6 +_02241CB2: + ldr r0, [r2, #4] + mov r1, #1 + strb r1, [r0] + add r0, r2, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} +_02241CC6: + ldrb r0, [r2, #8] + ldr r1, [r2, #0] + ldr r3, [r2, #0x10] + lsl r0, r0, #2 + add r0, r1, r0 + asr r1, r3, #7 + lsr r1, r1, #0x18 + add r1, r3, r1 + ldr r3, [r2, #0x14] + add r0, #0xb4 + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + lsl r1, r1, #8 + lsl r2, r2, #8 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, pc} + thumb_func_end ov17_02241C2C + + thumb_func_start ov17_02241CF0 +ov17_02241CF0: ; 0x02241CF0 + push {r4, lr} + add r2, r1, #0 + add r4, r0, #0 + ldrb r0, [r2, #0xa] + cmp r0, #0 + beq _02241D02 + cmp r0, #1 + beq _02241D18 + b _02241D80 +_02241D02: + mov r0, #0xc + ldrsh r0, [r2, r0] + lsl r0, r0, #8 + str r0, [r2, #0x10] + mov r0, #0xe + ldrsh r0, [r2, r0] + lsl r0, r0, #8 + str r0, [r2, #0x14] + ldrb r0, [r2, #0xa] + add r0, r0, #1 + strb r0, [r2, #0xa] +_02241D18: + mov r0, #0x24 + ldrsh r1, [r2, r0] + ldr r3, [r2, #0x14] + add r1, r3, r1 + str r1, [r2, #0x14] + ldrsh r0, [r2, r0] + add r0, #0x80 + strh r0, [r2, #0x24] + mov r0, #0xe + ldrsh r0, [r2, r0] + lsl r1, r0, #8 + ldr r0, [r2, #0x14] + cmp r0, r1 + blt _02241D56 + str r1, [r2, #0x14] + ldrb r0, [r2, #0x18] + cmp r0, #0 + beq _02241D50 + mov r0, #0x26 + ldrsh r0, [r2, r0] + strh r0, [r2, #0x24] + ldrb r0, [r2, #0x18] + sub r0, r0, #1 + strb r0, [r2, #0x18] + ldrb r0, [r2, #0xa] + sub r0, r0, #1 + strb r0, [r2, #0xa] + b _02241D56 +_02241D50: + ldrb r0, [r2, #0xa] + add r0, r0, #1 + strb r0, [r2, #0xa] +_02241D56: + ldrb r0, [r2, #8] + ldr r1, [r2, #0] + ldr r3, [r2, #0x10] + lsl r0, r0, #2 + add r0, r1, r0 + asr r1, r3, #7 + lsr r1, r1, #0x18 + add r1, r3, r1 + ldr r3, [r2, #0x14] + add r0, #0xb4 + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + lsl r1, r1, #8 + lsl r2, r2, #8 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, pc} +_02241D80: + ldr r0, [r2, #4] + mov r1, #1 + strb r1, [r0] + add r0, r2, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov17_02241CF0 + + thumb_func_start ov17_02241D94 +ov17_02241D94: ; 0x02241D94 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r6, r1, #0 + add r4, r2, #0 + cmp r0, #0 + beq _02241DAA + bl sub_02022974 +_02241DAA: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02241E1C ; =0x000080ED + add r2, r4, #0 + str r0, [sp, #8] + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + mov r3, #0x14 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02241E1C ; =0x000080ED + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + mov r3, #0x13 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02241E1C ; =0x000080ED + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + mov r3, #0x12 + bl sub_0200CE54 + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + ldr r2, _02241E20 ; =0x02253854 + bl sub_0200CE6C + add r1, r5, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + lsl r1, r6, #5 + add r5, #0xc0 + add r1, #0x60 + lsl r1, r1, #0x10 + ldr r0, [r5, #0] + asr r1, r1, #0x10 + mov r2, #0x38 + bl sub_0200D4C4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_02241E1C: .word 0x000080ED +_02241E20: .word 0x02253854 + thumb_func_end ov17_02241D94 + + thumb_func_start ov17_02241E24 +ov17_02241E24: ; 0x02241E24 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r1, _02241E54 ; =0x000080ED + bl sub_0200D070 + ldr r0, [r4, #0x1c] + ldr r1, _02241E54 ; =0x000080ED + bl sub_0200D090 + ldr r0, [r4, #0x1c] + ldr r1, _02241E54 ; =0x000080ED + bl sub_0200D0A0 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + bl sub_0200D0F4 + mov r0, #0 + add r4, #0xc0 + str r0, [r4, #0] + pop {r4, pc} + nop +_02241E54: .word 0x000080ED + thumb_func_end ov17_02241E24 + + thumb_func_start ov17_02241E58 +ov17_02241E58: ; 0x02241E58 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _02241EA0 ; =0x000080EE + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x11 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02241EA0 ; =0x000080EE + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x10 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02241EA0 ; =0x000080EE + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0xf + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_02241EA0: .word 0x000080EE + thumb_func_end ov17_02241E58 + + thumb_func_start ov17_02241EA4 +ov17_02241EA4: ; 0x02241EA4 + push {r4, lr} + ldr r1, _02241EC0 ; =0x000080EE + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _02241EC0 ; =0x000080EE + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _02241EC0 ; =0x000080EE + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_02241EC0: .word 0x000080EE + thumb_func_end ov17_02241EA4 + + thumb_func_start ov17_02241EC4 +ov17_02241EC4: ; 0x02241EC4 + push {r4, r5, r6, lr} + mov r2, #0x18 + mov r4, #0 + mul r2, r1 + add r5, r0, r2 + add r6, r4, #0 +_02241ED0: + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02241EE4 + bl sub_0200D0F4 + add r0, r5, #0 + add r0, #0xc4 + str r6, [r0, #0] +_02241EE4: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _02241ED0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02241EC4 + + thumb_func_start ov17_02241EF0 +ov17_02241EF0: ; 0x02241EF0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_02241EF6: + add r0, r5, #0 + add r1, r4, #0 + bl ov17_02241EC4 + add r4, r4, #1 + cmp r4, #4 + blt _02241EF6 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02241EF0 + + thumb_func_start ov17_02241F08 +ov17_02241F08: ; 0x02241F08 + push {r4, r5, r6, lr} + add r5, r2, #0 + ldr r2, _02241F30 ; =0x02253888 + add r4, r3, #0 + bl sub_0200CE6C + add r6, r0, #0 + ldr r0, [r6, #0] + bl sub_0200D324 + lsl r1, r5, #0x10 + lsl r2, r4, #0x10 + add r0, r6, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add r0, r6, #0 + pop {r4, r5, r6, pc} + nop +_02241F30: .word 0x02253888 + thumb_func_end ov17_02241F08 + + thumb_func_start ov17_02241F34 +ov17_02241F34: ; 0x02241F34 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + add r7, r1, #0 + add r0, r3, #0 + mov r1, #0xa + str r2, [sp, #4] + bl sub_020E1F6C + str r0, [sp, #8] + cmp r0, #0x18 + ble _02241F50 + mov r0, #0x18 + str r0, [sp, #8] +_02241F50: + mov r0, #0x18 + add r1, r7, #0 + mul r1, r0 + ldr r0, [sp] + ldr r4, [sp, #8] + mov r6, #0 + add r5, r0, r1 + b _02241F7A +_02241F60: + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02241F78 + bl sub_0200D0F4 + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0xc4 + str r6, [r0, #0] +_02241F78: + add r4, r4, #1 +_02241F7A: + cmp r4, #6 + blt _02241F60 + ldr r0, [sp, #8] + add r1, r7, #0 + sub r4, r0, #1 + mov r0, #0x18 + mul r1, r0 + ldr r0, [sp] + add r7, r0, r1 + ldr r0, [sp, #4] + ldr r1, _0224203C ; =0x0225370C + lsl r0, r0, #2 + str r0, [sp, #0xc] + add r0, r1, r0 + str r0, [sp, #0x10] + b _0224201C +_02241F9A: + add r0, r4, #0 + mov r1, #6 + bl sub_020E1F6C + add r5, r1, #0 + add r0, r4, #0 + mov r1, #6 + bl sub_020E1F6C + str r0, [sp, #0x14] + lsl r0, r5, #2 + add r0, r7, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02241FF8 + ldr r3, _0224203C ; =0x0225370C + ldr r2, [sp, #0xc] + ldr r0, [sp] + ldrsh r3, [r3, r2] + lsl r2, r5, #3 + ldr r1, [sp] + add r2, r3, r2 + ldr r6, [sp, #0x10] + mov r3, #2 + ldrsh r3, [r6, r3] + ldr r0, [r0, #0x18] + ldr r1, [r1, #0x1c] + bl ov17_02241F08 + lsl r2, r5, #2 + add r1, r7, r2 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r7, r2 + add r0, #0xc4 + ldr r0, [r0, #0] + ldr r1, [sp, #0x14] + bl sub_0200D364 + lsl r0, r5, #2 + add r0, r7, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl ov17_02242048 + b _0224201A +_02241FF8: + bl sub_0200D37C + ldr r1, [sp, #0x14] + cmp r0, r1 + bhs _0224201A + lsl r0, r5, #2 + add r0, r7, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl sub_0200D364 + lsl r0, r5, #2 + add r0, r7, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl ov17_02242048 +_0224201A: + sub r4, r4, #1 +_0224201C: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bgt _02241F9A + ldr r0, _02242040 ; =0x000006E1 + bl sub_02005748 + ldr r2, [sp, #8] + ldr r0, _02242040 ; =0x000006E1 + sub r2, r2, #1 + ldr r1, _02242044 ; =0x0000FFFF + lsl r2, r2, #6 + bl sub_02004F7C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224203C: .word 0x0225370C +_02242040: .word 0x000006E1 +_02242044: .word 0x0000FFFF + thumb_func_end ov17_02241F34 + + thumb_func_start ov17_02242048 +ov17_02242048: ; 0x02242048 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x15 + mov r1, #0x10 + bl sub_02018144 + mov r1, #0 + mov r2, #0x10 + add r4, r0, #0 + bl sub_020C4CF4 + add r0, r5, #0 + mov r1, #0 + str r5, [r4, #0] + bl sub_0200D3F4 + ldr r0, _02242074 ; =ov17_0224207C + ldr r2, _02242078 ; =0x00009C40 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242074: .word ov17_0224207C +_02242078: .word 0x00009C40 + thumb_func_end ov17_02242048 + + thumb_func_start ov17_0224207C +ov17_0224207C: ; 0x0224207C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #0 + beq _02242092 + cmp r0, #1 + beq _022420AE + cmp r0, #2 + beq _022420E8 + b _02242136 +_02242092: + ldr r0, [r4, #0] + mov r1, #2 + bl sub_0200D6A4 + ldr r0, _0224214C ; =0x3DCCCCCD + mov r1, #1 + str r0, [r4, #4] + str r0, [r4, #8] + ldr r0, [r4, #0] + bl sub_0200D3F4 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_022420AE: + ldr r0, [r4, #4] + ldr r1, _02242150 ; =0x3E99999A + bl sub_020E0B00 + str r0, [r4, #4] + ldr r0, [r4, #8] + ldr r1, _02242150 ; =0x3E99999A + bl sub_020E0B00 + str r0, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl sub_0200D6E8 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D7C0 + mov r1, #0xff + ldr r0, [r4, #4] + lsl r1, r1, #0x16 + bl sub_020E10AC + blo _0224214A + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022420E8: + ldr r0, [r4, #4] + ldr r1, _02242150 ; =0x3E99999A + bl sub_020E1A9C + str r0, [r4, #4] + ldr r0, [r4, #8] + ldr r1, _02242150 ; =0x3E99999A + bl sub_020E1A9C + str r0, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl sub_0200D6E8 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D7C0 + mov r1, #0xfe + ldr r0, [r4, #4] + lsl r1, r1, #0x16 + bl sub_020E1164 + bhi _0224214A + mov r1, #0xfe + lsl r1, r1, #0x16 + ldr r0, [r4, #0] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D79C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02242136: + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D6A4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0224214A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224214C: .word 0x3DCCCCCD +_02242150: .word 0x3E99999A + thumb_func_end ov17_0224207C + + thumb_func_start ov17_02242154 +ov17_02242154: ; 0x02242154 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _022421D8 ; =0x000080F0 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x1a + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022421D8 ; =0x000080F0 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x19 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022421D8 ; =0x000080F0 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x18 + bl sub_0200CE54 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022421DC ; =0x000080EF + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x1d + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022421DC ; =0x000080EF + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x1c + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022421DC ; =0x000080EF + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x1b + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022421D8: .word 0x000080F0 +_022421DC: .word 0x000080EF + thumb_func_end ov17_02242154 + + thumb_func_start ov17_022421E0 +ov17_022421E0: ; 0x022421E0 + push {r4, lr} + ldr r1, _02242214 ; =0x000080F0 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _02242214 ; =0x000080F0 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _02242214 ; =0x000080F0 + add r0, r4, #0 + bl sub_0200D0A0 + ldr r1, _02242218 ; =0x000080EF + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _02242218 ; =0x000080EF + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _02242218 ; =0x000080EF + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_02242214: .word 0x000080F0 +_02242218: .word 0x000080EF + thumb_func_end ov17_022421E0 + + thumb_func_start ov17_0224221C +ov17_0224221C: ; 0x0224221C + push {r3, r4, r5, r6, r7, lr} + mov r2, #0x14 + mov r4, #0 + mul r2, r1 + mov r7, #0x49 + add r5, r0, r2 + add r6, r4, #0 + lsl r7, r7, #2 +_0224222C: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0224223C + bl sub_0200D0F4 + mov r0, #0x49 + lsl r0, r0, #2 + str r6, [r5, r0] +_0224223C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _0224222C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224221C + + thumb_func_start ov17_02242248 +ov17_02242248: ; 0x02242248 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0224224E: + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0224221C + add r4, r4, #1 + cmp r4, #3 + blt _0224224E + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02242248 + + thumb_func_start ov17_02242260 +ov17_02242260: ; 0x02242260 + push {r4, r5, r6, lr} + add r5, r2, #0 + ldr r2, _02242288 ; =0x022537EC + add r4, r3, #0 + bl sub_0200CE6C + add r6, r0, #0 + ldr r0, [r6, #0] + bl sub_0200D324 + lsl r1, r5, #0x10 + lsl r2, r4, #0x10 + add r0, r6, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add r0, r6, #0 + pop {r4, r5, r6, pc} + nop +_02242288: .word 0x022537EC + thumb_func_end ov17_02242260 + + thumb_func_start ov17_0224228C +ov17_0224228C: ; 0x0224228C + push {r4, r5, r6, lr} + add r5, r2, #0 + ldr r2, _022422B4 ; =0x0225371C + add r4, r3, #0 + bl sub_0200CE6C + add r6, r0, #0 + ldr r0, [r6, #0] + bl sub_0200D324 + lsl r1, r5, #0x10 + lsl r2, r4, #0x10 + add r0, r6, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add r0, r6, #0 + pop {r4, r5, r6, pc} + nop +_022422B4: .word 0x0225371C + thumb_func_end ov17_0224228C + + thumb_func_start ov17_022422B8 +ov17_022422B8: ; 0x022422B8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + cmp r0, #5 + bls _022422CA + b _02242458 +_022422CA: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022422D6: ; jump table + .short _022422E2 - _022422D6 - 2 ; case 0 + .short _02242328 - _022422D6 - 2 ; case 1 + .short _02242368 - _022422D6 - 2 ; case 2 + .short _02242398 - _022422D6 - 2 ; case 3 + .short _022423D6 - _022422D6 - 2 ; case 4 + .short _02242428 - _022422D6 - 2 ; case 5 +_022422E2: + ldr r0, [r4, #4] + mov r1, #1 + bl sub_0200D6A4 + mov r0, #2 + ldr r1, [r4, #0x10] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r4, #0x20] + mov r0, #0x12 + ldr r1, [r4, #0x14] + lsl r0, r0, #0xa + add r0, r1, r0 + str r0, [r4, #0x24] + ldr r1, [r4, #0x20] + ldr r0, [r4, #0x10] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + strh r0, [r4, #0x28] + ldr r1, [r4, #0x24] + ldr r0, [r4, #0x14] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + strh r0, [r4, #0x2a] + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2e + strb r1, [r0] +_02242328: + mov r1, #0x28 + ldrsh r0, [r4, r1] + ldr r2, [r4, #0x10] + add r0, r2, r0 + str r0, [r4, #0x10] + mov r0, #0x2a + ldrsh r0, [r4, r0] + ldr r2, [r4, #0x14] + add r0, r2, r0 + str r0, [r4, #0x14] + ldrsh r2, [r4, r1] + cmp r2, #0 + ble _0224234A + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x20] + cmp r1, r0 + bge _02242358 +_0224234A: + cmp r2, #0 + bge _02242356 + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x20] + cmp r1, r0 + ble _02242358 +_02242356: + b _0224247C +_02242358: + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2e + strb r1, [r0] + b _0224247C +_02242368: + add r0, r4, #0 + add r0, #0x2f + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2f + strb r1, [r0] + add r0, r4, #0 + add r0, #0x2f + ldrb r0, [r0] + cmp r0, #3 + bls _0224247C + add r0, r4, #0 + mov r1, #0 + add r0, #0x2f + strb r1, [r0] + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2e + strb r1, [r0] + b _0224247C +_02242398: + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + lsl r0, r0, #8 + str r0, [r4, #0x20] + add r0, r4, #0 + add r0, #0x2d + ldrb r0, [r0] + lsl r0, r0, #8 + str r0, [r4, #0x24] + ldr r1, [r4, #0x20] + ldr r0, [r4, #0x10] + sub r0, r1, r0 + mov r1, #6 + bl sub_020E1F6C + strh r0, [r4, #0x28] + ldr r1, [r4, #0x24] + ldr r0, [r4, #0x14] + sub r0, r1, r0 + mov r1, #6 + bl sub_020E1F6C + strh r0, [r4, #0x2a] + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2e + strb r1, [r0] +_022423D6: + mov r1, #0x28 + ldrsh r0, [r4, r1] + ldr r2, [r4, #0x10] + add r0, r2, r0 + str r0, [r4, #0x10] + mov r0, #0x2a + ldrsh r0, [r4, r0] + ldr r2, [r4, #0x14] + add r0, r2, r0 + str r0, [r4, #0x14] + ldrsh r2, [r4, r1] + cmp r2, #0 + ble _022423F8 + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x20] + cmp r1, r0 + bge _02242404 +_022423F8: + cmp r2, #0 + bge _0224247C + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x20] + cmp r1, r0 + bgt _0224247C +_02242404: + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + lsl r0, r0, #8 + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x2d + ldrb r0, [r0] + lsl r0, r0, #8 + str r0, [r4, #0x14] + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2e + strb r1, [r0] + b _0224247C +_02242428: + add r0, r4, #0 + add r0, #0x2f + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2f + strb r1, [r0] + add r0, r4, #0 + add r0, #0x2f + ldrb r0, [r0] + cmp r0, #2 + bls _0224247C + add r0, r4, #0 + mov r1, #0 + add r0, #0x2f + strb r1, [r0] + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x2e + strb r1, [r0] + b _0224247C +_02242458: + ldr r0, [r4, #4] + bl sub_0200D0F4 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #0x6e + lsl r0, r0, #4 + bl sub_02005748 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} +_0224247C: + mov r1, #2 + ldr r0, [r4, #4] + lsl r1, r1, #0xc + bl sub_0200D7C0 + ldr r2, [r4, #0x10] + ldr r3, [r4, #0x14] + asr r1, r2, #7 + lsr r1, r1, #0x18 + add r1, r2, r1 + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + lsl r1, r1, #8 + lsl r2, r2, #8 + ldr r0, [r4, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_022422B8 + + thumb_func_start ov17_022424A8 +ov17_022424A8: ; 0x022424A8 + push {r4, r5, r6, lr} + mov r2, #0x14 + mul r2, r1 + mov r6, #0x49 + mov r4, #0 + add r5, r0, r2 + lsl r6, r6, #2 +_022424B6: + ldr r0, [r5, r6] + cmp r0, #0 + beq _022424C8 + bl sub_0200D408 + cmp r0, #0 + bne _022424C8 + mov r0, #0 + pop {r4, r5, r6, pc} +_022424C8: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _022424B6 + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov17_022424A8 + + thumb_func_start ov17_022424D4 +ov17_022424D4: ; 0x022424D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r4, r2, #0 + str r0, [sp, #0x1c] + str r1, [sp] + add r0, r4, #0 + mov r1, #0xa + bl sub_020E1F6C + str r0, [sp, #4] + cmp r0, #5 + ble _022424F0 + bl sub_02022974 +_022424F0: + ldr r0, [sp] + mov r1, #0x14 + lsl r7, r0, #2 + ldr r0, _0224261C ; =0x022536D8 + mov r5, #0 + add r0, r0, r7 + str r0, [sp, #0xc] + ldr r0, [sp] + mul r1, r0 + ldr r0, [sp, #0x1c] + add r0, r0, r1 + str r0, [sp, #8] + ldr r0, _02242620 ; =0x022536E4 + add r0, r0, r7 + str r0, [sp, #0x10] + ldr r0, [sp] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x14] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] + b _022425E4 +_0224251E: + ldr r0, [sp, #8] + lsl r2, r5, #2 + add r1, r0, r2 + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + bne _022425E2 + ldr r3, _0224261C ; =0x022536D8 + ldr r0, [sp, #0x1c] + ldrsh r3, [r3, r7] + add r2, r5, r2 + ldr r4, [sp, #0xc] + ldr r1, [sp, #0x1c] + add r2, r3, r2 + mov r3, #2 + ldrsh r3, [r4, r3] + ldr r0, [r0, #0x18] + ldr r1, [r1, #0x1c] + bl ov17_02242260 + ldr r1, [sp, #8] + lsl r2, r5, #2 + add r2, r1, r2 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r2, r1] + add r0, r1, #0 + ldr r0, [r2, r0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0x15 + mov r1, #0x34 + bl sub_02018144 + mov r1, #0 + mov r2, #0x34 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp, #0x1c] + lsl r1, r5, #2 + str r0, [r4, #0] + ldr r0, [sp, #8] + ldr r2, _02242620 ; =0x022536E4 + add r1, r0, r1 + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r6, [sp, #0x10] + str r0, [r4, #8] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x1c] + mov r3, #2 + ldrsh r2, [r2, r7] + ldrsh r3, [r6, r3] + ldr r0, [r0, #0x18] + ldr r1, [r1, #0x1c] + bl ov17_0224228C + str r0, [r4, #4] + ldr r0, _02242620 ; =0x022536E4 + ldr r1, [sp, #0x10] + ldrsh r0, [r0, r7] + ldr r2, _02242624 ; =0x00009C40 + lsl r0, r0, #8 + str r0, [r4, #0x10] + mov r0, #2 + ldrsh r0, [r1, r0] + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldr r0, _0224261C ; =0x022536D8 + ldrsh r1, [r0, r7] + lsl r0, r5, #2 + add r0, r5, r0 + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x2c + strb r1, [r0] + ldr r1, [sp, #0xc] + mov r0, #2 + ldrsh r1, [r1, r0] + add r0, r4, #0 + add r0, #0x2d + strb r1, [r0] + add r1, r4, #0 + ldr r0, [sp, #0x14] + add r1, #0x30 + strb r0, [r1] + add r1, r4, #0 + ldr r0, [sp, #0x18] + add r1, #0x31 + strb r0, [r1] + ldr r0, _02242628 ; =ov17_022422B8 + add r1, r4, #0 + bl sub_0200D9E8 +_022425E2: + add r5, r5, #1 +_022425E4: + ldr r0, [sp, #4] + cmp r5, r0 + blt _0224251E + ldr r0, [sp] + mov r1, #0x14 + mul r1, r0 + ldr r0, [sp, #0x1c] + mov r7, #0x49 + lsl r7, r7, #2 + add r4, r0, r1 + add r6, r7, #0 + b _02242614 +_022425FC: + lsl r0, r5, #2 + add r0, r4, r0 + ldr r0, [r0, r6] + cmp r0, #0 + beq _02242612 + bl sub_0200D0F4 + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0 + str r0, [r1, r7] +_02242612: + add r5, r5, #1 +_02242614: + cmp r5, #5 + blt _022425FC + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224261C: .word 0x022536D8 +_02242620: .word 0x022536E4 +_02242624: .word 0x00009C40 +_02242628: .word ov17_022422B8 + thumb_func_end ov17_022424D4 + + thumb_func_start ov17_0224262C +ov17_0224262C: ; 0x0224262C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + str r0, [sp] + cmp r2, #1 + bne _0224263C + mov r6, #1 + b _0224263E +_0224263C: + mov r6, #0 +_0224263E: + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + str r0, [sp, #8] + str r0, [sp, #4] +_02242648: + ldr r5, [sp] + mov r4, #0 +_0224264C: + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242668 + add r1, r7, #0 + bl sub_0200D810 + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_0200D3F4 +_02242668: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _0224264C + mov r1, #0x5b + ldr r0, [sp, #8] + lsl r1, r1, #2 + ldr r0, [r0, r1] + cmp r0, #0 + beq _02242690 + add r1, r7, #0 + bl sub_0200D810 + mov r1, #0x5b + ldr r0, [sp, #8] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r6, #0 + bl sub_0200D3F4 +_02242690: + mov r1, #0x63 + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r7, #0 + bl sub_02012AF0 + mov r1, #0x77 + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r7, #0 + bl sub_02012AF0 + mov r1, #0x63 + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r6, #0 + bl sub_020129D0 + mov r1, #0x77 + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r6, #0 + bl sub_020129D0 + ldr r0, [sp] + add r0, #0x18 + str r0, [sp] + ldr r0, [sp, #8] + add r0, r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, #0x14 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #4 + blt _02242648 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_0224262C + + thumb_func_start ov17_022426E8 +ov17_022426E8: ; 0x022426E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + mov r0, #0 + strb r0, [r7] + mov r0, #0x15 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + str r5, [r4, #0] + mov r2, #0xfa + strb r6, [r4, #0xd] + ldr r0, _0224271C ; =ov17_02242720 + add r1, r4, #0 + lsl r2, r2, #2 + str r7, [r4, #4] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224271C: .word ov17_02242720 + thumb_func_end ov17_022426E8 + + thumb_func_start ov17_02242720 +ov17_02242720: ; 0x02242720 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #3 + bls _0224272E + b _02242864 +_0224272E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224273A: ; jump table + .short _02242742 - _0224273A - 2 ; case 0 + .short _0224279E - _0224273A - 2 ; case 1 + .short _022427D2 - _0224273A - 2 ; case 2 + .short _02242826 - _0224273A - 2 ; case 3 +_02242742: + ldrb r0, [r4, #0xd] + cmp r0, #0 + bne _0224276A + mov r0, #1 + lsl r0, r0, #0xc + strh r0, [r4, #8] + mov r1, #0 + strh r1, [r4, #0xa] + ldr r0, _0224287C ; =0x04000050 + str r1, [sp] + mov r2, #0xe + mov r3, #0x10 + bl sub_020BF55C + mov r1, #1 + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov17_0224262C + b _0224278C +_0224276A: + mov r3, #0 + mov r0, #1 + strh r3, [r4, #8] + lsl r0, r0, #0xc + strh r0, [r4, #0xa] + mov r0, #0x10 + str r0, [sp] + ldr r0, _0224287C ; =0x04000050 + mov r1, #4 + mov r2, #0xe + bl sub_020BF55C + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #1 + bl ov17_0223BB14 +_0224278C: + ldr r0, _02242880 ; =ov17_02242884 + add r1, r4, #0 + mov r2, #0xa + bl sub_0200DA3C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224279E: + ldrb r1, [r4, #0xd] + cmp r1, #0 + bne _022427BE + mov r0, #8 + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _022427BE + mov r1, #0 + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov17_0224262C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022427BE: + cmp r1, #1 + bne _0224287A + mov r0, #0xa + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _0224287A + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022427D2: + ldrb r0, [r4, #0xd] + cmp r0, #0 + bne _022427F2 + mov r0, #1 + lsl r0, r0, #0xc + strh r0, [r4, #8] + mov r0, #0 + strh r0, [r4, #0xa] + str r0, [sp] + ldr r0, _0224287C ; =0x04000050 + mov r1, #4 + mov r2, #0xe + mov r3, #0x10 + bl sub_020BF55C + b _02242814 +_022427F2: + mov r1, #0 + mov r0, #1 + strh r1, [r4, #8] + lsl r0, r0, #0xc + strh r0, [r4, #0xa] + mov r0, #0x10 + str r0, [sp] + ldr r0, _0224287C ; =0x04000050 + mov r2, #0xe + add r3, r1, #0 + bl sub_020BF55C + mov r1, #1 + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov17_0224262C +_02242814: + ldr r0, _02242880 ; =ov17_02242884 + add r1, r4, #0 + mov r2, #0xa + bl sub_0200DA3C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02242826: + ldrb r1, [r4, #0xd] + cmp r1, #0 + bne _02242846 + mov r0, #8 + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _02242846 + mov r1, #1 + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov17_0223BB14 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02242846: + cmp r1, #1 + bne _0224287A + mov r0, #0xa + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _0224287A + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #1 + bl ov17_0224262C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02242864: + bl ov17_022413D8 + ldr r0, [r4, #4] + mov r1, #1 + strb r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0224287A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224287C: .word 0x04000050 +_02242880: .word ov17_02242884 + thumb_func_end ov17_02242720 + + thumb_func_start ov17_02242884 +ov17_02242884: ; 0x02242884 + push {r3, r4, r5, lr} + ldrb r3, [r1, #0xd] + mov r2, #0 + cmp r3, #0 + bne _022428BC + mov r4, #8 + ldrsh r5, [r1, r4] + lsl r3, r4, #8 + sub r3, r5, r3 + strh r3, [r1, #8] + mov r3, #0xa + ldrsh r5, [r1, r3] + lsl r3, r4, #8 + add r3, r5, r3 + strh r3, [r1, #0xa] + ldrsh r3, [r1, r4] + cmp r3, #0 + bgt _022428AC + strh r2, [r1, #8] + add r2, r2, #1 +_022428AC: + mov r3, #0xa + ldrsh r4, [r1, r3] + mov r3, #1 + lsl r3, r3, #0xc + cmp r4, r3 + blt _022428E8 + strh r3, [r1, #0xa] + b _022428E8 +_022428BC: + mov r4, #8 + ldrsh r5, [r1, r4] + lsl r3, r4, #8 + add r3, r5, r3 + strh r3, [r1, #8] + mov r3, #0xa + ldrsh r5, [r1, r3] + lsl r3, r4, #8 + sub r3, r5, r3 + strh r3, [r1, #0xa] + ldrsh r5, [r1, r4] + lsl r3, r4, #9 + cmp r5, r3 + blt _022428DC + strh r3, [r1, #8] + add r2, r2, #1 +_022428DC: + mov r3, #0xa + ldrsh r3, [r1, r3] + cmp r3, #0 + bgt _022428E8 + mov r3, #0 + strh r3, [r1, #0xa] +_022428E8: + mov r3, #8 + ldrsh r3, [r1, r3] + asr r4, r3, #8 + mov r3, #0xa + ldrsh r3, [r1, r3] + mov r1, #0xff + bic r3, r1 + orr r3, r4 + ldr r1, _02242908 ; =0x04000052 + cmp r2, #0 + strh r3, [r1] + ble _02242904 + bl sub_0200DA58 +_02242904: + pop {r3, r4, r5, pc} + nop +_02242908: .word 0x04000052 + thumb_func_end ov17_02242884 + + thumb_func_start ov17_0224290C +ov17_0224290C: ; 0x0224290C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r1, #0 + add r4, r0, #0 + add r5, r2, #0 + add r6, r3, #0 + cmp r7, #2 + blt _02242924 + cmp r5, #0 + bne _02242924 + bl sub_02022974 +_02242924: + cmp r7, #0x1c + bls _0224292A + b _02242D9E +_0224292A: + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02242936: ; jump table + .short _02242DA2 - _02242936 - 2 ; case 0 + .short _02242970 - _02242936 - 2 ; case 1 + .short _0224298E - _02242936 - 2 ; case 2 + .short _022429A8 - _02242936 - 2 ; case 3 + .short _022429C2 - _02242936 - 2 ; case 4 + .short _022429D0 - _02242936 - 2 ; case 5 + .short _022429E4 - _02242936 - 2 ; case 6 + .short _022429FC - _02242936 - 2 ; case 7 + .short _02242A2C - _02242936 - 2 ; case 8 + .short _02242A50 - _02242936 - 2 ; case 9 + .short _02242A7C - _02242936 - 2 ; case 10 + .short _02242AAA - _02242936 - 2 ; case 11 + .short _02242ADA - _02242936 - 2 ; case 12 + .short _02242AFE - _02242936 - 2 ; case 13 + .short _02242B2A - _02242936 - 2 ; case 14 + .short _02242B5A - _02242936 - 2 ; case 15 + .short _02242B7E - _02242936 - 2 ; case 16 + .short _02242BA2 - _02242936 - 2 ; case 17 + .short _02242BC2 - _02242936 - 2 ; case 18 + .short _02242BE6 - _02242936 - 2 ; case 19 + .short _02242C10 - _02242936 - 2 ; case 20 + .short _02242C3A - _02242936 - 2 ; case 21 + .short _02242C58 - _02242936 - 2 ; case 22 + .short _02242C82 - _02242936 - 2 ; case 23 + .short _02242CB0 - _02242936 - 2 ; case 24 + .short _02242CDE - _02242936 - 2 ; case 25 + .short _02242D00 - _02242936 - 2 ; case 26 + .short _02242D2A - _02242936 - 2 ; case 27 + .short _02242D62 - _02242936 - 2 ; case 28 +_02242970: + mov r0, #0xca + lsl r0, r0, #2 + ldrb r0, [r4, r0] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0224298E: + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022429A8: + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022429C2: + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B630 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022429D0: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022429E4: + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #0 + bl sub_0200BB74 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022429FC: + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242A2C: + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B630 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242A50: + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + mov r0, #0 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + add r3, r1, #0 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242A7C: + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #1 + bl sub_0200BB74 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242AAA: + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242ADA: + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B630 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242AFE: + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + mov r0, #0 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + add r3, r1, #0 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242B2A: + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242B5A: + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B630 + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242B7E: + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B630 + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242BA2: + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B630 + mov r0, #0 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + add r3, r1, #0 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242BC2: + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B630 + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242BE6: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + bl sub_0200B60C + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242C10: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + bl sub_0200B60C + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242C3A: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + bl sub_0200B60C + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B630 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242C58: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + bl sub_0200B60C + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242C82: + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #0 + bl sub_0200BB74 + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242CB0: + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #0 + bl sub_0200BB74 + ldrb r0, [r5, #1] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242CDE: + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #0 + bl sub_0200BB74 + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_0200B630 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242D00: + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #0 + bl sub_0200BB74 + mov r0, #0 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldrb r2, [r5, #4] + ldr r0, [r4, #0x54] + add r3, r1, #0 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242D2A: + ldrb r0, [r5] + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200B5CC + ldrb r2, [r5, #5] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #1 + bl sub_0200BB74 + ldrh r2, [r5, #2] + ldr r0, [r4, #0x54] + mov r1, #2 + bl sub_0200B630 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242D62: + ldrb r2, [r6] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x54] + lsl r2, r2, #3 + add r2, r3, r2 + add r2, #0xd0 + ldrh r2, [r2] + mov r1, #0 + bl sub_0200BB74 + mov r5, #0 +_02242D78: + add r0, r6, r5 + ldrb r0, [r0, #1] + cmp r0, #4 + beq _02242DA2 + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r4, #0x54] + add r1, r5, #1 + bl sub_0200B5CC + add r5, r5, #1 + cmp r5, #4 + blt _02242D78 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02242D9E: + bl sub_02022974 +_02242DA2: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224290C + + thumb_func_start ov17_02242DA8 +ov17_02242DA8: ; 0x02242DA8 + push {r4, lr} + add r4, r0, #0 + add r0, #0x34 + mov r1, #0xff + bl sub_0201ADA4 + add r4, #0x34 + add r0, r4, #0 + bl sub_0201A954 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02242DA8 + + thumb_func_start ov17_02242DC0 +ov17_02242DC0: ; 0x02242DC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [sp, #0x30] + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp, #0xc] + cmp r0, #1 + bne _02242DD6 + mov r4, #0 + b _02242DEE +_02242DD6: + ldr r1, [r5, #0] + ldr r0, _02242E54 ; =0x00000171 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02242DEC + ldr r0, _02242E58 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027AC0 + add r4, r0, #0 + b _02242DEE +_02242DEC: + mov r4, #1 +_02242DEE: + add r0, r6, #0 + add r1, r7, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x2c] + add r0, r5, #0 + bl ov17_0224290C + ldr r0, [r5, #0x54] + ldr r1, [r5, #0x58] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x34 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + str r3, [sp, #8] + add r0, r5, #0 + ldr r2, [r5, #0x58] + add r0, #0x34 + mov r1, #1 + bl sub_0201D738 + mov r1, #0x8b + lsl r1, r1, #2 + strb r0, [r5, r1] + cmp r4, #0 + bne _02242E42 + mov r0, #0xff + strb r0, [r5, r1] + add r0, r5, #0 + add r0, #0x34 + bl sub_0201A954 +_02242E42: + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_020192EC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242E54: .word 0x00000171 +_02242E58: .word 0x00001988 + thumb_func_end ov17_02242DC0 + + thumb_func_start ov17_02242E5C +ov17_02242E5C: ; 0x02242E5C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r7, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r5, #0x2f + blo _02242E70 + bl sub_02022974 +_02242E70: + ldr r0, _02242E90 ; =0x022538F3 + lsl r3, r5, #2 + ldrb r0, [r0, r3] + str r4, [sp] + ldr r2, _02242E94 ; =0x022538F0 + str r6, [sp, #4] + str r0, [sp, #8] + ldr r4, _02242E98 ; =0x022538F2 + ldrh r2, [r2, r3] + ldrb r3, [r4, r3] + ldr r1, [r7, #0x44] + add r0, r7, #0 + bl ov17_02242DC0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242E90: .word 0x022538F3 +_02242E94: .word 0x022538F0 +_02242E98: .word 0x022538F2 + thumb_func_end ov17_02242E5C + + thumb_func_start ov17_02242E9C +ov17_02242E9C: ; 0x02242E9C + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + add r5, r3, #0 + add r0, r1, #0 + add r1, r2, #0 + add r2, sp, #0x10 + add r3, sp, #0xc + bl sub_02095790 + ldr r0, [sp, #0x20] + str r5, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r1, [r4, #0x50] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0xc] + add r0, r4, #0 + bl ov17_02242DC0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02242E9C + + thumb_func_start ov17_02242ECC +ov17_02242ECC: ; 0x02242ECC + push {r3, lr} + mov r1, #0x8b + lsl r1, r1, #2 + ldrb r0, [r0, r1] + cmp r0, #0xff + bne _02242EDC + mov r0, #0 + pop {r3, pc} +_02242EDC: + bl sub_0201D724 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02242ECC + + thumb_func_start ov17_02242EE4 +ov17_02242EE4: ; 0x02242EE4 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0xc + mov r1, #0x15 + bl sub_02023790 + str r0, [sp, #0x30] + lsl r0, r4, #2 + ldr r1, [r5, #0xc] + str r0, [sp, #0x2c] + ldr r0, [r1, r0] + ldr r2, [sp, #0x30] + mov r1, #0x77 + bl sub_02074470 + ldr r1, [r5, #0] + ldr r0, _02242F94 ; =0x00000123 + ldrb r0, [r1, r0] + cmp r4, r0 + bne _02242F14 + ldr r6, _02242F98 ; =0x00010200 + b _02242F16 +_02242F14: + ldr r6, _02242F9C ; =0x00050600 +_02242F16: + mov r0, #0x14 + add r7, r4, #0 + mul r7, r0 + mov r0, #0x77 + lsl r0, r0, #2 + add r0, r5, r0 + add r0, r0, r7 + str r0, [sp] + ldr r0, [sp, #0x30] + mov r1, #0 + str r0, [sp, #4] + str r1, [sp, #8] + str r6, [sp, #0xc] + ldr r0, _02242FA0 ; =0x000080ED + str r1, [sp, #0x10] + str r0, [sp, #0x14] + str r1, [sp, #0x18] + str r1, [sp, #0x1c] + str r1, [sp, #0x20] + str r1, [sp, #0x24] + mov r0, #0xf + str r0, [sp, #0x28] + ldr r1, [r5, #0x30] + ldr r2, [r5, #0x28] + ldr r3, [r5, #0x60] + mov r0, #0x15 + bl ov17_0223F1E8 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + add r0, r0, r7 + str r0, [sp] + ldr r1, [r5, #0] + ldr r0, [sp, #0x2c] + add r0, r1, r0 + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #0 + str r0, [sp, #4] + str r1, [sp, #8] + str r6, [sp, #0xc] + ldr r0, _02242FA0 ; =0x000080ED + str r1, [sp, #0x10] + str r0, [sp, #0x14] + str r1, [sp, #0x18] + str r1, [sp, #0x1c] + str r1, [sp, #0x20] + str r1, [sp, #0x24] + mov r0, #0xf + str r0, [sp, #0x28] + ldr r1, [r5, #0x30] + ldr r2, [r5, #0x28] + ldr r3, [r5, #0x60] + mov r0, #0x15 + bl ov17_0223F1E8 + ldr r0, [sp, #0x30] + bl sub_020237BC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_02242F94: .word 0x00000123 +_02242F98: .word 0x00010200 +_02242F9C: .word 0x00050600 +_02242FA0: .word 0x000080ED + thumb_func_end ov17_02242EE4 + + thumb_func_start ov17_02242FA4 +ov17_02242FA4: ; 0x02242FA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_02242FAA: + add r0, r5, #0 + add r1, r4, #0 + bl ov17_02242EE4 + add r4, r4, #1 + cmp r4, #4 + blt _02242FAA + add r0, r5, #0 + bl ov17_02242FE8 + pop {r3, r4, r5, pc} + thumb_func_end ov17_02242FA4 + + thumb_func_start ov17_02242FC0 +ov17_02242FC0: ; 0x02242FC0 + push {r4, r5, r6, lr} + mov r1, #0x77 + lsl r1, r1, #2 + add r4, r0, r1 + sub r1, #0x50 + mov r6, #0 + add r5, r0, r1 +_02242FCE: + add r0, r4, #0 + bl ov17_0223F2E4 + add r0, r5, #0 + bl ov17_0223F2E4 + add r6, r6, #1 + add r4, #0x14 + add r5, #0x14 + cmp r6, #4 + blt _02242FCE + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02242FC0 + + thumb_func_start ov17_02242FE8 +ov17_02242FE8: ; 0x02242FE8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r1, #0x77 + lsl r1, r1, #2 + str r0, [sp] + add r0, r0, r1 + str r0, [sp, #4] + ldr r0, [sp] + sub r1, #0x50 + add r0, r0, r1 + mov r4, #0 + mov r6, #0xc + mov r5, #0x1c + str r0, [sp, #8] +_02243004: + ldr r0, [sp] + add r2, r6, #0 + add r1, r0, r4 + ldr r0, _0224303C ; =0x00000231 + mov r3, #0 + ldrb r1, [r1, r0] + mov r0, #0x14 + add r7, r1, #0 + mul r7, r0 + ldr r0, [sp, #4] + mov r1, #1 + add r0, r0, r7 + bl ov17_0223F2F8 + ldr r0, [sp, #8] + mov r1, #1 + add r0, r0, r7 + add r2, r5, #0 + mov r3, #0 + bl ov17_0223F2F8 + add r4, r4, #1 + add r6, #0x30 + add r5, #0x30 + cmp r4, #4 + blt _02243004 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224303C: .word 0x00000231 + thumb_func_end ov17_02242FE8 + + thumb_func_start ov17_02243040 +ov17_02243040: ; 0x02243040 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _02243088 ; =0x000080F1 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x17 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02243088 ; =0x000080F1 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x16 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02243088 ; =0x000080F1 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x15 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_02243088: .word 0x000080F1 + thumb_func_end ov17_02243040 + + thumb_func_start ov17_0224308C +ov17_0224308C: ; 0x0224308C + push {r4, lr} + ldr r1, _022430A8 ; =0x000080F1 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _022430A8 ; =0x000080F1 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _022430A8 ; =0x000080F1 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_022430A8: .word 0x000080F1 + thumb_func_end ov17_0224308C + + thumb_func_start ov17_022430AC +ov17_022430AC: ; 0x022430AC + push {r3, r4, r5, r6, r7, lr} + add r3, r0, #0 + mov r0, #0x16 + add r6, r1, #0 + lsl r0, r0, #4 + lsl r5, r6, #2 + add r4, r3, r0 + ldr r0, [r4, r5] + add r7, r2, #0 + cmp r0, #0 + bne _022430CE + ldr r0, [r3, #0x18] + ldr r1, [r3, #0x1c] + ldr r2, _022430F4 ; =0x02253750 + bl sub_0200CE6C + str r0, [r4, r5] +_022430CE: + ldr r0, [r4, r5] + add r1, r7, #0 + bl sub_0200D364 + mov r2, #0x30 + mul r2, r6 + add r2, #0x2a + lsl r2, r2, #0x10 + ldr r0, [r4, r5] + mov r1, #0x40 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, r5] + ldr r0, [r0, #0] + bl sub_0200D324 + pop {r3, r4, r5, r6, r7, pc} + nop +_022430F4: .word 0x02253750 + thumb_func_end ov17_022430AC + + thumb_func_start ov17_022430F8 +ov17_022430F8: ; 0x022430F8 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + mov r7, #0x16 + add r5, r0, #0 + add r6, r4, #0 + lsl r7, r7, #4 +_02243104: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02243114 + bl sub_0200D0F4 + mov r0, #0x16 + lsl r0, r0, #4 + str r6, [r5, r0] +_02243114: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02243104 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_022430F8 + + thumb_func_start ov17_02243120 +ov17_02243120: ; 0x02243120 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + add r0, r4, #0 + mov r1, #0 + mov r2, #6 + bl sub_020C4CF4 + lsl r0, r6, #1 + add r1, r5, r0 + ldr r0, _02243148 ; =0x00000236 + strb r6, [r4] + ldrh r1, [r1, r0] + add r0, #8 + strh r1, [r4, #2] + add r1, r5, r6 + ldrb r0, [r1, r0] + strb r0, [r4, #5] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02243148: .word 0x00000236 + thumb_func_end ov17_02243120 + + thumb_func_start ov17_0224314C +ov17_0224314C: ; 0x0224314C + strb r0, [r2] + cmp r1, #0 + bgt _02243156 + mov r0, #0x1f + bx lr +_02243156: + cmp r1, #0x14 + bgt _0224315E + mov r0, #0x20 + bx lr +_0224315E: + cmp r1, #0x32 + bgt _02243166 + mov r0, #0x21 + bx lr +_02243166: + cmp r1, #0x5a + bgt _0224316E + mov r0, #0x22 + bx lr +_0224316E: + mov r0, #0x23 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224314C + + thumb_func_start ov17_02243174 +ov17_02243174: ; 0x02243174 + push {r4, lr} + mov r1, #0x32 + bl sub_020E1F6C + cmp r0, #4 + blo _02243182 + mov r0, #3 +_02243182: + lsl r1, r0, #2 + ldr r0, _0224319C ; =0x022536FC + ldr r4, [r0, r1] + cmp r4, #0 + bge _02243190 + bl sub_02022974 +_02243190: + cmp r4, #0x7f + ble _02243198 + bl sub_02022974 +_02243198: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 +_0224319C: .word 0x022536FC + thumb_func_end ov17_02243174 + + thumb_func_start ov17_022431A0 +ov17_022431A0: ; 0x022431A0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + ldr r0, [sp, #0x1c] + mov r1, #0 + strb r1, [r0] + mov r0, #0x15 + mov r1, #0x14 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp, #0x1c] + str r5, [r4, #0] + str r0, [r4, #0x10] + strb r7, [r4, #0xd] + ldr r0, [sp] + strb r6, [r4, #0xb] + str r0, [r4, #4] + ldr r0, [sp, #0x18] + ldr r2, _022431E0 ; =0x00000BB8 + strb r0, [r4, #0xe] + ldr r0, _022431E4 ; =ov17_022431E8 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022431E0: .word 0x00000BB8 +_022431E4: .word ov17_022431E8 + thumb_func_end ov17_022431A0 + + thumb_func_start ov17_022431E8 +ov17_022431E8: ; 0x022431E8 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #8] + cmp r0, #0 + beq _02243200 + cmp r0, #1 + beq _02243222 + cmp r0, #2 + beq _02243252 + b _022432C8 +_02243200: + ldrb r0, [r4, #0xd] + cmp r0, #0 + beq _0224320E + sub r0, r0, #1 + add sp, #0x10 + strb r0, [r4, #0xd] + pop {r3, r4, r5, pc} +_0224320E: + ldr r0, _02243314 ; =0x000006E5 + bl sub_02005748 + ldr r0, _02243314 ; =0x000006E5 + ldr r1, [r4, #4] + bl sub_02004AD4 + ldrb r0, [r4, #8] + add r0, r0, #1 + strb r0, [r4, #8] +_02243222: + ldrb r0, [r4, #9] + cmp r0, #0 + bne _0224322C + mov r1, #0 + b _0224322E +_0224322C: + mov r1, #2 +_0224322E: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x15 + str r0, [sp, #0xc] + ldr r2, [r4, #0] + mov r0, #0x2d + ldr r2, [r2, #0x30] + mov r3, #3 + bl sub_02006E60 + ldrb r0, [r4, #8] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #8] + pop {r3, r4, r5, pc} +_02243252: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + ldrb r0, [r4, #0xc] + cmp r0, #2 + bls _0224328A + mov r0, #0 + strb r0, [r4, #0xc] + ldrb r1, [r4, #9] + mov r0, #1 + eor r0, r1 + strb r0, [r4, #9] + ldrb r0, [r4, #8] + sub r0, r0, #1 + strb r0, [r4, #8] + ldrb r0, [r4, #9] + cmp r0, #0 + bne _0224328A + ldrb r0, [r4, #0xa] + add r0, r0, #1 + strb r0, [r4, #0xa] + ldrb r0, [r4, #0xa] + cmp r0, #2 + bls _0224328A + mov r0, #0xff + add sp, #0x10 + strb r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224328A: + ldrb r0, [r4, #0xe] + cmp r0, #1 + bne _02243310 + ldrb r0, [r4, #0xb] + mov r1, #0x32 + lsl r0, r0, #4 + bl sub_020E1F6C + mov r1, #0xf + ldrsb r2, [r4, r1] + cmp r2, r0 + bge _02243310 + add r2, r2, #2 + strb r2, [r4, #0xf] + ldrsb r1, [r4, r1] + cmp r1, r0 + ble _022432AE + strb r0, [r4, #0xf] +_022432AE: + ldrb r0, [r4, #0xf] + mov r1, #0 + mov r2, #1 + str r0, [sp] + ldr r0, _02243318 ; =0x0000237E + mov r3, #2 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r0, [r0, #0x5c] + bl sub_020039B0 + add sp, #0x10 + pop {r3, r4, r5, pc} +_022432C8: + ldrb r0, [r4, #0xe] + cmp r0, #1 + bne _022432FE + mov r0, #0xf + ldrsb r1, [r4, r0] + cmp r1, #0 + beq _022432FE + sub r1, r1, #2 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #0 + bge _022432E4 + mov r0, #0 + strb r0, [r4, #0xf] +_022432E4: + ldrb r0, [r4, #0xf] + mov r1, #0 + mov r2, #1 + str r0, [sp] + ldr r0, _02243318 ; =0x0000237E + mov r3, #2 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r0, [r0, #0x5c] + bl sub_020039B0 + add sp, #0x10 + pop {r3, r4, r5, pc} +_022432FE: + ldr r0, [r4, #0x10] + mov r1, #1 + strb r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02243310: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02243314: .word 0x000006E5 +_02243318: .word 0x0000237E + thumb_func_end ov17_022431E8 + + thumb_func_start ov17_0224331C +ov17_0224331C: ; 0x0224331C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r3, #0 + ldr r3, [sp, #0x38] + add r6, sp, #0x1c + str r3, [sp, #0x38] + mov r3, #0 + str r3, [sp, #8] + strb r3, [r5] + mov r3, #0x30 + mul r3, r2 + ldr r2, [sp, #8] + str r3, [sp, #0x10] + add r3, #0x18 + str r2, [sp, #4] + str r2, [sp, #0xc] + mov r2, #0x18 + mul r2, r1 + add r7, r0, r2 + add r0, r3, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r3, [sp, #0x10] + str r0, [sp, #0x18] +_0224334C: + add r0, r7, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02243358 + b _022434B8 +_02243358: + ldrb r1, [r5] + cmp r1, #0 + bne _02243422 + add r1, sp, #0x20 + add r1, #2 + add r2, sp, #0x20 + bl sub_0200D550 + mov r0, #4 + ldrsh r1, [r6, r0] + ldr r0, [sp, #0x10] + sub r1, r1, r0 + bpl _02243374 + neg r1, r1 +_02243374: + mov r0, #6 + ldrsh r0, [r6, r0] + sub r0, #0x28 + bpl _0224337E + neg r0, r0 +_0224337E: + bl sub_0208C0A4 + lsl r0, r0, #8 + str r0, [sp, #8] + mov r0, #6 + ldrsh r0, [r6, r0] + sub r0, #0x28 + bl sub_020E17B4 + str r0, [sp, #0x14] + mov r0, #4 + ldrsh r1, [r6, r0] + ldr r0, [sp, #0x10] + sub r0, r1, r0 + bl sub_020E17B4 + add r4, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0 + bl sub_020E1108 + ldr r0, _022434CC ; =0x45800000 + bls _022433C0 + ldr r1, [sp, #0x14] + bl sub_020E18B0 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + str r0, [sp] + b _022433D0 +_022433C0: + ldr r1, [sp, #0x14] + bl sub_020E18B0 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C + str r0, [sp] +_022433D0: + add r0, r4, #0 + mov r1, #0 + bl sub_020E1108 + ldr r0, _022434CC ; =0x45800000 + bls _022433EE + add r1, r4, #0 + bl sub_020E18B0 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _022433FC +_022433EE: + add r1, r4, #0 + bl sub_020E18B0 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_022433FC: + bl sub_020E1740 + add r4, r0, #0 + ldr r0, [sp] + bl sub_020E1740 + add r1, r0, #0 + add r0, r4, #0 + bl sub_020BDA20 + ldr r1, _022434D0 ; =0x00008CA0 + mul r1, r0 + add r0, r1, #0 + ldr r1, _022434D4 ; =0x0000FFFF + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] +_02243422: + mov r0, #0x15 + mov r1, #0x28 + bl sub_02018144 + mov r1, #0 + mov r2, #0x28 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp, #0x38] + add r1, r4, #0 + str r0, [r4, #4] + add r0, r7, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, #0x21 + str r0, [r4, #8] + ldr r0, [sp, #8] + add r2, sp, #0x1c + str r0, [r4, #0x10] + ldr r0, [sp, #4] + strh r0, [r4, #0x1e] + mov r0, #2 + lsl r0, r0, #0xa + str r0, [r4, #0x14] + mov r0, #0x28 + strb r0, [r1] + add r1, r4, #0 + ldr r0, [sp, #0x18] + add r1, #0x22 + strb r0, [r1] + str r5, [r4, #0xc] + mov r0, #6 + ldrsh r1, [r6, r0] + add r0, r4, #0 + add r0, #0x23 + strb r1, [r0] + mov r0, #4 + ldrsh r1, [r6, r0] + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r0, r7, #0 + add r0, #0xd0 + add r1, sp, #0x1c + ldr r0, [r0, #0] + add r1, #2 + bl sub_0200D550 + mov r0, #6 + ldrsh r1, [r6, r0] + mov r0, #2 + ldrsh r0, [r6, r0] + sub r0, r1, r0 + bpl _02243492 + neg r0, r0 +_02243492: + ldrb r2, [r5] + lsl r0, r0, #8 + lsl r1, r2, #1 + add r1, r2, r1 + bl sub_020E1F6C + strh r0, [r4, #0x1c] + mov r0, #2 + ldrsh r0, [r6, r0] + ldr r2, _022434D8 ; =0x00009C40 + add r1, r4, #0 + lsl r0, r0, #8 + str r0, [r4, #0x18] + ldr r0, _022434DC ; =ov17_022434E0 + bl sub_0200D9E8 + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] +_022434B8: + ldr r0, [sp, #0xc] + add r7, r7, #4 + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #6 + bge _022434C6 + b _0224334C +_022434C6: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_022434CC: .word 0x45800000 +_022434D0: .word 0x00008CA0 +_022434D4: .word 0x0000FFFF +_022434D8: .word 0x00009C40 +_022434DC: .word ov17_022434E0 + thumb_func_end ov17_0224331C + + thumb_func_start ov17_022434E0 +ov17_022434E0: ; 0x022434E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _022434F8 + cmp r0, #1 + beq _02243542 + b _02243624 +_022434F8: + ldrh r0, [r5, #0x1c] + ldr r1, [r5, #0x18] + sub r1, r1, r0 + add r0, r5, #0 + str r1, [r5, #0x18] + add r0, #0x23 + ldrb r0, [r0] + lsl r0, r0, #8 + cmp r1, r0 + bgt _0224351C + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x20 + strb r1, [r0] +_0224351C: + add r1, sp, #0xc + ldr r0, [r5, #8] + add r1, #2 + add r2, sp, #0xc + bl sub_0200D550 + ldr r0, [r5, #0x18] + add r3, sp, #0xc + asr r0, r0, #8 + strh r0, [r3, #2] + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r5, #8] + bl sub_0200D4C4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_02243542: + ldrh r2, [r5, #0x1e] + ldr r1, [r5, #0x14] + add r0, r5, #0 + add r1, r2, r1 + strh r1, [r5, #0x1e] + ldrh r2, [r5, #0x1e] + ldr r1, _02243650 ; =0x00008CA0 + add r0, #0x1e + cmp r2, r1 + blo _0224355C + ldrh r2, [r0] + sub r1, r2, r1 + strh r1, [r0] +_0224355C: + mov r0, #3 + ldr r1, [r5, #0x10] + lsl r0, r0, #8 + cmp r1, r0 + bls _0224356A + sub r0, r1, r0 + b _0224356C +_0224356A: + mov r0, #0 +_0224356C: + str r0, [r5, #0x10] + mov r0, #2 + ldr r1, [r5, #0x10] + lsl r0, r0, #8 + cmp r1, r0 + bhi _02243586 + add r0, r5, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x20 + strb r1, [r0] +_02243586: + ldr r0, [r5, #0x10] + mov r1, #0x64 + lsr r4, r0, #8 + ldrh r0, [r5, #0x1e] + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D1D4 + str r0, [sp] + lsl r6, r4, #0xc + ldrh r0, [r5, #0x1e] + mov r1, #0x64 + asr r7, r6, #0x1f + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + str r0, [sp, #4] + ldr r0, [sp] + add r2, r6, #0 + asr r1, r0, #0x1f + add r3, r7, #0 + bl sub_020E1F1C + str r0, [sp, #8] + ldr r0, [sp, #4] + add r4, r1, #0 + asr r1, r0, #0x1f + add r2, r6, #0 + add r3, r7, #0 + bl sub_020E1F1C + mov r3, #2 + add r2, r1, #0 + add r1, r5, #0 + add r7, r0, #0 + add r1, #0x21 + ldr r6, [sp, #8] + lsl r3, r3, #0xa + add r6, r6, r3 + ldr r3, _02243654 ; =0x00000000 + ldrb r1, [r1] + adc r4, r3 + lsl r3, r4, #0x14 + lsr r4, r6, #0xc + orr r4, r3 + asr r3, r4, #0xb + lsr r3, r3, #0x14 + add r3, r4, r3 + asr r3, r3, #0xc + add r1, r1, r3 + mov r4, #2 + ldr r0, [r5, #8] + lsl r1, r1, #0x10 + add r5, #0x22 + lsl r4, r4, #0xa + asr r1, r1, #0x10 + ldrb r3, [r5] + add r5, r7, r4 + ldr r4, _02243654 ; =0x00000000 + adc r2, r4 + lsl r2, r2, #0x14 + lsr r4, r5, #0xc + orr r4, r2 + asr r2, r4, #0xb + lsr r2, r2, #0x14 + add r2, r4, r2 + asr r2, r2, #0xc + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_02243624: + ldr r0, [r5, #8] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, _02243658 ; =0x000005E1 + bl sub_02005748 + ldr r0, [r5, #4] + bl ov17_022414B0 + ldr r1, [r5, #0xc] + ldrb r0, [r1] + sub r0, r0, #1 + strb r0, [r1] + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243650: .word 0x00008CA0 +_02243654: .word 0x00000000 +_02243658: .word 0x000005E1 + thumb_func_end ov17_022434E0 + + thumb_func_start ov17_0224365C +ov17_0224365C: ; 0x0224365C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x15 + mov r1, #0xc + bl sub_02018144 + mov r1, #0 + mov r2, #0xc + add r4, r0, #0 + bl sub_020C4CF4 + str r5, [r4, #0] + ldr r0, _02243688 ; =ov17_022436A4 + ldr r2, _0224368C ; =0x00009C40 + add r1, r4, #0 + strb r6, [r4, #8] + bl sub_0200D9E8 + str r0, [r4, #4] + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02243688: .word ov17_022436A4 +_0224368C: .word 0x00009C40 + thumb_func_end ov17_0224365C + + thumb_func_start ov17_02243690 +ov17_02243690: ; 0x02243690 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02243690 + + thumb_func_start ov17_022436A4 +ov17_022436A4: ; 0x022436A4 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + mov r7, #0x13 + add r6, r1, #0 + add r5, r4, #0 + lsl r7, r7, #4 +_022436B0: + ldrb r2, [r6, #8] + mov r1, #0x14 + ldr r0, [r6, #0] + mul r1, r2 + add r0, r0, r1 + add r0, r5, r0 + ldr r0, [r0, r7] + cmp r0, #0 + beq _022436C6 + bl sub_0200D330 +_022436C6: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _022436B0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_022436A4 + + thumb_func_start ov17_022436D0 +ov17_022436D0: ; 0x022436D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + mov r0, #0x30 + mul r0, r2 + add r0, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r1, #0x14 + add r2, r3, #0 + mul r2, r1 + ldr r1, [sp] + ldr r5, [sp, #0x20] + mov r7, #0 + strb r7, [r5] + add r6, r1, r2 + str r0, [sp, #4] +_022436F2: + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r6, r0] + cmp r0, #0 + beq _0224373C + mov r0, #0x15 + mov r1, #0x28 + bl sub_02018144 + mov r1, #0 + mov r2, #0x28 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _02243748 ; =0x00009C40 + str r0, [r4, #0] + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r6, r0] + str r0, [r4, #4] + str r5, [r4, #8] + mov r0, #0x28 + strb r0, [r4, #0xf] + ldr r0, [sp, #4] + strb r0, [r4, #0x10] + ldrb r1, [r5] + mov r0, #0xc + mul r0, r1 + strh r0, [r4, #0x24] + ldr r0, _0224374C ; =ov17_02243750 + add r1, r4, #0 + bl sub_0200D9E8 + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] +_0224373C: + add r7, r7, #1 + add r6, r6, #4 + cmp r7, #5 + blt _022436F2 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243748: .word 0x00009C40 +_0224374C: .word ov17_02243750 + thumb_func_end ov17_022436D0 + + thumb_func_start ov17_02243750 +ov17_02243750: ; 0x02243750 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5, #0xe] + cmp r0, #0 + beq _0224376A + cmp r0, #1 + beq _022437AA + cmp r0, #2 + bne _02243768 + b _022438D2 +_02243768: + b _0224390A +_0224376A: + mov r0, #0x24 + ldrsh r0, [r5, r0] + cmp r0, #0 + ble _0224377A + sub r0, r0, #1 + add sp, #8 + strh r0, [r5, #0x24] + pop {r3, r4, r5, r6, r7, pc} +_0224377A: + add r1, sp, #4 + ldr r0, [r5, #4] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + add r2, sp, #4 + mov r1, #0 + ldrsh r0, [r2, r1] + add r0, r0, #6 + strh r0, [r2] + mov r0, #2 + ldrsh r0, [r2, r0] + lsl r0, r0, #8 + str r0, [r5, #0x1c] + ldrsh r0, [r2, r1] + lsl r0, r0, #8 + str r0, [r5, #0x20] + ldr r0, _02243930 ; =0x000007F9 + bl sub_02005748 + ldrb r0, [r5, #0xe] + add r0, r0, #1 + strb r0, [r5, #0xe] +_022437AA: + ldrh r2, [r5, #0xc] + mov r1, #2 + lsl r1, r1, #0xa + add r1, r2, r1 + strh r1, [r5, #0xc] + ldrh r2, [r5, #0xc] + ldr r1, _02243934 ; =0x00008CA0 + add r0, r5, #0 + add r0, #0xc + cmp r2, r1 + blo _022437C6 + ldrh r2, [r0] + sub r1, r2, r1 + strh r1, [r0] +_022437C6: + ldrh r0, [r5, #0xc] + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + add r4, r0, #0 + ldrh r0, [r5, #0xc] + mov r1, #0x64 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D1D4 + add r6, r0, #0 + ldr r0, [r5, #0x20] + mov r2, #3 + add r0, #0x80 + str r0, [r5, #0x20] + asr r1, r4, #0x1f + add r0, r4, #0 + lsl r2, r2, #0xe + mov r3, #0 + bl sub_020E1F1C + mov r2, #6 + str r0, [sp] + add r4, r1, #0 + asr r1, r6, #0x1f + add r0, r6, #0 + lsl r2, r2, #0xc + mov r3, #0 + bl sub_020E1F1C + add r2, r1, #0 + ldr r1, [r5, #0x1c] + mov r6, #2 + add r7, r0, #0 + ldr r3, [sp] + lsl r6, r6, #0xa + asr r1, r1, #8 + add r6, r3, r6 + ldr r3, _02243938 ; =0x00000000 + ldr r0, [r5, #4] + adc r4, r3 + lsl r3, r4, #0x14 + lsr r4, r6, #0xc + orr r4, r3 + asr r3, r4, #0xb + lsr r3, r3, #0x14 + add r3, r4, r3 + asr r3, r3, #0xc + add r1, r1, r3 + ldr r3, [r5, #0x20] + mov r4, #2 + lsl r1, r1, #0x10 + ldr r6, _02243938 ; =0x00000000 + lsl r4, r4, #0xa + asr r1, r1, #0x10 + asr r3, r3, #8 + add r4, r7, r4 + adc r2, r6 + lsl r6, r2, #0x14 + lsr r2, r4, #0xc + orr r2, r6 + asr r4, r2, #0xb + lsr r4, r4, #0x14 + add r4, r2, r4 + asr r2, r4, #0xc + add r2, r3, r2 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r0, #0x24 + ldrsh r1, [r5, r0] + add r1, r1, #1 + strh r1, [r5, #0x24] + ldrsh r0, [r5, r0] + cmp r0, #0x50 + ble _0224392C + mov r0, #0 + strh r0, [r5, #0x24] + add r1, sp, #4 + ldr r0, [r5, #4] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + add r2, sp, #4 + mov r0, #2 + ldrsh r0, [r2, r0] + lsl r1, r0, #8 + str r1, [r5, #0x1c] + mov r1, #0 + ldrsh r6, [r2, r1] + lsl r1, r6, #8 + str r1, [r5, #0x20] + ldrb r1, [r5, #0xf] + sub r0, r0, r1 + bpl _02243898 + neg r0, r0 +_02243898: + ldrb r1, [r5, #0x10] + lsl r0, r0, #8 + sub r4, r6, r1 + bpl _022438A2 + neg r4, r4 +_022438A2: + mov r1, #3 + lsl r1, r1, #8 + str r1, [r5, #0x14] + bl sub_020E1F6C + add r1, r0, #0 + lsl r0, r4, #8 + bl sub_020E1F6C + str r0, [r5, #0x18] + ldrb r0, [r5, #0x10] + cmp r0, r6 + bge _022438C2 + ldr r0, [r5, #0x18] + neg r0, r0 + str r0, [r5, #0x18] +_022438C2: + ldr r0, _0224393C ; =0x000006EA + bl sub_02005748 + ldrb r0, [r5, #0xe] + add sp, #8 + add r0, r0, #1 + strb r0, [r5, #0xe] + pop {r3, r4, r5, r6, r7, pc} +_022438D2: + ldr r1, [r5, #0x1c] + ldr r0, [r5, #0x14] + sub r0, r1, r0 + str r0, [r5, #0x1c] + ldr r1, [r5, #0x20] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [r5, #0x20] + ldrb r0, [r5, #0xf] + lsl r1, r0, #8 + ldr r0, [r5, #0x1c] + cmp r0, r1 + bgt _022438F4 + str r1, [r5, #0x1c] + ldrb r0, [r5, #0xe] + add r0, r0, #1 + strb r0, [r5, #0xe] +_022438F4: + ldr r1, [r5, #0x1c] + ldr r2, [r5, #0x20] + lsl r1, r1, #8 + lsl r2, r2, #8 + ldr r0, [r5, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0224390A: + ldr r0, [r5, #4] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, _02243940 ; =0x000005E1 + bl sub_02005748 + ldr r1, [r5, #8] + ldrb r0, [r1] + sub r0, r0, #1 + strb r0, [r1] + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224392C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243930: .word 0x000007F9 +_02243934: .word 0x00008CA0 +_02243938: .word 0x00000000 +_0224393C: .word 0x000006EA +_02243940: .word 0x000005E1 + thumb_func_end ov17_02243750 + + thumb_func_start ov17_02243944 +ov17_02243944: ; 0x02243944 + push {r4} + sub sp, #0xc + ldr r3, _0224396C ; =0x022536B8 + add r2, sp, #0 + ldrh r4, [r3, #0x14] + add r1, sp, #0 + lsl r0, r0, #1 + strh r4, [r2] + ldrh r4, [r3, #0x16] + strh r4, [r2, #2] + ldrh r4, [r3, #0x18] + strh r4, [r2, #4] + ldrh r4, [r3, #0x1a] + ldrh r3, [r3, #0x1c] + strh r4, [r2, #6] + strh r3, [r2, #8] + ldrh r0, [r1, r0] + add sp, #0xc + pop {r4} + bx lr + ; .align 2, 0 +_0224396C: .word 0x022536B8 + thumb_func_end ov17_02243944 + + thumb_func_start ov17_02243970 +ov17_02243970: ; 0x02243970 + push {r4} + sub sp, #0xc + ldr r3, _02243998 ; =0x022536B8 + add r2, sp, #0 + ldrh r4, [r3, #0xa] + add r1, sp, #0 + lsl r0, r0, #1 + strh r4, [r2] + ldrh r4, [r3, #0xc] + strh r4, [r2, #2] + ldrh r4, [r3, #0xe] + strh r4, [r2, #4] + ldrh r4, [r3, #0x10] + ldrh r3, [r3, #0x12] + strh r4, [r2, #6] + strh r3, [r2, #8] + ldrh r0, [r1, r0] + add sp, #0xc + pop {r4} + bx lr + ; .align 2, 0 +_02243998: .word 0x022536B8 + thumb_func_end ov17_02243970 + + thumb_func_start ov17_0224399C +ov17_0224399C: ; 0x0224399C + push {r4} + sub sp, #0xc + ldr r3, _022439C4 ; =0x022536B8 + add r2, sp, #0 + ldrh r4, [r3] + add r1, sp, #0 + lsl r0, r0, #1 + strh r4, [r2] + ldrh r4, [r3, #2] + strh r4, [r2, #2] + ldrh r4, [r3, #4] + strh r4, [r2, #4] + ldrh r4, [r3, #6] + ldrh r3, [r3, #8] + strh r4, [r2, #6] + strh r3, [r2, #8] + ldrh r0, [r1, r0] + add sp, #0xc + pop {r4} + bx lr + ; .align 2, 0 +_022439C4: .word 0x022536B8 + thumb_func_end ov17_0224399C + + thumb_func_start ov17_022439C8 +ov17_022439C8: ; 0x022439C8 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0xc + bl sub_020C4CF4 + strh r5, [r4, #4] + cmp r5, #0x8f + bgt _022439FE + bge _02243A36 + cmp r5, #0x4c + bgt _022439F0 + bge _02243A36 + cmp r5, #0xd + beq _02243A36 + pop {r3, r4, r5, r6, r7, pc} +_022439F0: + cmp r5, #0x77 + bgt _022439F8 + beq _02243A74 + pop {r3, r4, r5, r6, r7, pc} +_022439F8: + cmp r5, #0x82 + beq _02243A36 + pop {r3, r4, r5, r6, r7, pc} +_022439FE: + ldr r1, _02243A90 ; =0x0000010B + cmp r5, r1 + bgt _02243A1E + bge _02243A7A + cmp r5, #0xae + bgt _02243A0E + beq _02243A48 + pop {r3, r4, r5, r6, r7, pc} +_02243A0E: + cmp r5, #0xda + bgt _02243A8E + cmp r5, #0xd8 + blt _02243A8E + beq _02243A3C + cmp r5, #0xda + beq _02243A42 + pop {r3, r4, r5, r6, r7, pc} +_02243A1E: + add r0, r1, #0 + add r0, #0xd + cmp r5, r0 + bgt _02243A2E + add r1, #0xd + cmp r5, r1 + beq _02243A80 + pop {r3, r4, r5, r6, r7, pc} +_02243A2E: + add r1, #0xc8 + cmp r5, r1 + beq _02243A86 + pop {r3, r4, r5, r6, r7, pc} +_02243A36: + mov r0, #1 + strb r0, [r4, #6] + pop {r3, r4, r5, r6, r7, pc} +_02243A3C: + mov r0, #0xff + strb r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_02243A42: + mov r0, #0 + strb r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_02243A48: + lsl r5, r7, #2 + ldr r0, [r6, r5] + mov r1, #0xb1 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + ldr r0, [r6, r5] + mov r1, #0xb2 + mov r2, #0 + bl sub_02074470 + cmp r7, #7 + beq _02243A68 + cmp r0, #7 + bne _02243A6E +_02243A68: + mov r0, #1 + strb r0, [r4, #7] + pop {r3, r4, r5, r6, r7, pc} +_02243A6E: + mov r0, #0 + strb r0, [r4, #7] + pop {r3, r4, r5, r6, r7, pc} +_02243A74: + mov r0, #1 + strh r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_02243A7A: + mov r0, #0xa1 + strh r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_02243A80: + mov r0, #1 + strb r0, [r4, #7] + pop {r3, r4, r5, r6, r7, pc} +_02243A86: + mov r0, #1 + strb r0, [r4, #6] + ldr r0, _02243A94 ; =0x200400C0 + str r0, [r4, #0] +_02243A8E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243A90: .word 0x0000010B +_02243A94: .word 0x200400C0 + thumb_func_end ov17_022439C8 + + thumb_func_start ov17_02243A98 +ov17_02243A98: ; 0x02243A98 + cmp r2, #0 + bne _02243AA0 + mov r0, #0 + bx lr +_02243AA0: + lsl r3, r1, #1 + add r3, r0, r3 + ldrh r3, [r3, #0x26] + cmp r2, r3 + bne _02243ABE + lsl r1, r1, #2 + add r0, r0, r1 + add r0, #0xe0 + ldr r0, [r0, #0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r2, r0 + beq _02243ABE + mov r0, #0 + bx lr +_02243ABE: + mov r0, #1 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02243A98 + + .rodata + + + .global Unk_ov17_022536B4 +Unk_ov17_022536B4: ; 0x022536B4 + .incbin "incbin/overlay17_rodata.bin", 0x928, 0x92C - 0x928 + + .global Unk_ov17_022536B8 +Unk_ov17_022536B8: ; 0x022536B8 + .incbin "incbin/overlay17_rodata.bin", 0x92C, 0x936 - 0x92C + + .global Unk_ov17_022536C2 +Unk_ov17_022536C2: ; 0x022536C2 + .incbin "incbin/overlay17_rodata.bin", 0x936, 0x940 - 0x936 + + .global Unk_ov17_022536CC +Unk_ov17_022536CC: ; 0x022536CC + .incbin "incbin/overlay17_rodata.bin", 0x940, 0x94C - 0x940 + + .global Unk_ov17_022536D8 +Unk_ov17_022536D8: ; 0x022536D8 + .incbin "incbin/overlay17_rodata.bin", 0x94C, 0x958 - 0x94C + + .global Unk_ov17_022536E4 +Unk_ov17_022536E4: ; 0x022536E4 + .incbin "incbin/overlay17_rodata.bin", 0x958, 0x964 - 0x958 + + .global Unk_ov17_022536F0 +Unk_ov17_022536F0: ; 0x022536F0 + .incbin "incbin/overlay17_rodata.bin", 0x964, 0x970 - 0x964 + + .global Unk_ov17_022536FC +Unk_ov17_022536FC: ; 0x022536FC + .incbin "incbin/overlay17_rodata.bin", 0x970, 0x980 - 0x970 + + .global Unk_ov17_0225370C +Unk_ov17_0225370C: ; 0x0225370C + .incbin "incbin/overlay17_rodata.bin", 0x980, 0x990 - 0x980 + + .global Unk_ov17_0225371C +Unk_ov17_0225371C: ; 0x0225371C + .incbin "incbin/overlay17_rodata.bin", 0x990, 0x9C4 - 0x990 + + .global Unk_ov17_02253750 +Unk_ov17_02253750: ; 0x02253750 + .incbin "incbin/overlay17_rodata.bin", 0x9C4, 0x9F8 - 0x9C4 + + .global Unk_ov17_02253784 +Unk_ov17_02253784: ; 0x02253784 + .incbin "incbin/overlay17_rodata.bin", 0x9F8, 0xA2C - 0x9F8 + + .global Unk_ov17_022537B8 +Unk_ov17_022537B8: ; 0x022537B8 + .incbin "incbin/overlay17_rodata.bin", 0xA2C, 0xA60 - 0xA2C + + .global Unk_ov17_022537EC +Unk_ov17_022537EC: ; 0x022537EC + .incbin "incbin/overlay17_rodata.bin", 0xA60, 0xA94 - 0xA60 + + .global Unk_ov17_02253820 +Unk_ov17_02253820: ; 0x02253820 + .incbin "incbin/overlay17_rodata.bin", 0xA94, 0xAC8 - 0xA94 + + .global Unk_ov17_02253854 +Unk_ov17_02253854: ; 0x02253854 + .incbin "incbin/overlay17_rodata.bin", 0xAC8, 0xAFC - 0xAC8 + + .global Unk_ov17_02253888 +Unk_ov17_02253888: ; 0x02253888 + .incbin "incbin/overlay17_rodata.bin", 0xAFC, 0xB30 - 0xAFC + + .global Unk_ov17_022538BC +Unk_ov17_022538BC: ; 0x022538BC + .incbin "incbin/overlay17_rodata.bin", 0xB30, 0xB64 - 0xB30 + + .global Unk_ov17_022538F0 +Unk_ov17_022538F0: ; 0x022538F0 + .incbin "incbin/overlay17_rodata.bin", 0xB64, 0xBC + diff --git a/asm/ov17_02243AC4.s b/asm/ov17_02243AC4.s new file mode 100644 index 000000000..1aed22d3a --- /dev/null +++ b/asm/ov17_02243AC4.s @@ -0,0 +1,243 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02243AC4 +ov17_02243AC4: ; 0x02243AC4 + push {r3, r4} + add r1, r0, r1 + ldrb r4, [r1, #0xe] + mov r3, #0 + add r2, r3, #0 +_02243ACE: + add r1, r0, r2 + ldrb r1, [r1, #0xe] + cmp r1, r4 + bne _02243AD8 + add r3, r3, #1 +_02243AD8: + add r2, r2, #1 + cmp r2, #4 + blt _02243ACE + sub r0, r3, #1 + pop {r3, r4} + bx lr + thumb_func_end ov17_02243AC4 + + thumb_func_start ov17_02243AE4 +ov17_02243AE4: ; 0x02243AE4 + ldr r1, _02243AEC ; =0x022539AC + ldrb r0, [r1, r0] + bx lr + nop +_02243AEC: .word 0x022539AC + thumb_func_end ov17_02243AE4 + + thumb_func_start ov17_02243AF0 +ov17_02243AF0: ; 0x02243AF0 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #0xb + bl sub_020790C4 + lsl r1, r4, #2 + add r2, r4, r1 + ldr r1, _02243B08 ; =0x022539C8 + add r1, r1, r2 + ldrsb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_02243B08: .word 0x022539C8 + thumb_func_end ov17_02243AF0 + + thumb_func_start ov17_02243B0C +ov17_02243B0C: ; 0x02243B0C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r3, #0 + mov lr, r0 + add r2, sp, #8 + add r1, sp, #4 + add r7, r3, #0 + add r0, sp, #0 + mov r6, #0x1a + b _02243B46 +_02243B20: + lsl r4, r3, #1 + mov r5, lr + add r5, r5, r4 + ldrsh r5, [r5, r6] + strb r3, [r1, r3] + strh r5, [r2, r4] + add r4, r7, #0 + b _02243B40 +_02243B30: + mov r5, lr + add r5, r5, r4 + ldrb r5, [r5, #1] + cmp r3, r5 + bne _02243B3E + strb r4, [r0, r3] + b _02243B44 +_02243B3E: + add r4, r4, #1 +_02243B40: + cmp r4, #4 + blt _02243B30 +_02243B44: + add r3, r3, #1 +_02243B46: + cmp r3, #4 + blt _02243B20 + mov r3, #0 + ldr r6, _02243C1C ; =0x022539B8 + add r1, sp, #8 + ldr r0, _02243C20 ; =0x022539B0 + ldr r2, _02243C24 ; =0x022539C0 + mov r7, #0x2c + b _02243BA8 +_02243B58: + add r5, r3, #0 + mul r5, r7 + mov r4, lr + add r4, r4, r5 + ldr r4, [r4, #0x58] + lsl r5, r4, #0x1a + lsr r5, r5, #0x1e + cmp r5, #3 + bhi _02243BA6 + add r5, r5, r5 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_02243B76: ; jump table + .short _02243BA6 - _02243B76 - 2 ; case 0 + .short _02243B7E - _02243B76 - 2 ; case 1 + .short _02243B8C - _02243B76 - 2 ; case 2 + .short _02243B9A - _02243B76 - 2 ; case 3 +_02243B7E: + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + lsl r4, r4, #1 + ldrsh r5, [r2, r4] + lsl r4, r3, #1 + strh r5, [r1, r4] + b _02243BA6 +_02243B8C: + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + lsl r4, r4, #1 + ldrsh r5, [r0, r4] + lsl r4, r3, #1 + strh r5, [r1, r4] + b _02243BA6 +_02243B9A: + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + lsl r4, r4, #1 + ldrsh r5, [r6, r4] + lsl r4, r3, #1 + strh r5, [r1, r4] +_02243BA6: + add r3, r3, #1 +_02243BA8: + cmp r3, #4 + blt _02243B58 + mov r3, #0 + b _02243BFE +_02243BB0: + mov r4, #3 + add r2, sp, #8 + add r7, sp, #0 + b _02243BF8 +_02243BB8: + sub r1, r4, #1 + lsl r0, r1, #1 + lsl r5, r4, #1 + ldrsh r0, [r2, r0] + ldrsh r5, [r2, r5] + cmp r0, r5 + bgt _02243BD2 + cmp r0, r5 + bne _02243BF6 + ldrb r1, [r7, r1] + ldrb r0, [r7, r4] + cmp r1, r0 + bhs _02243BF6 +_02243BD2: + sub r0, r4, #1 + lsl r1, r4, #1 + lsl r5, r0, #1 + mov ip, r5 + ldrsh r6, [r2, r1] + ldrsh r5, [r2, r5] + strh r5, [r2, r1] + mov r1, ip + strh r6, [r2, r1] + add r1, sp, #4 + ldrb r6, [r1, r4] + ldrb r5, [r1, r0] + strb r5, [r1, r4] + strb r6, [r1, r0] + ldrb r5, [r7, r4] + ldrb r1, [r7, r0] + strb r1, [r7, r4] + strb r5, [r7, r0] +_02243BF6: + sub r4, r4, #1 +_02243BF8: + cmp r4, r3 + bgt _02243BB8 + add r3, r3, #1 +_02243BFE: + cmp r3, #3 + blt _02243BB0 + mov r3, #0 + add r2, sp, #4 + b _02243C12 +_02243C08: + ldrb r1, [r2, r3] + mov r0, lr + add r0, r0, r3 + strb r1, [r0, #1] + add r3, r3, #1 +_02243C12: + cmp r3, #4 + blt _02243C08 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243C1C: .word 0x022539B8 +_02243C20: .word 0x022539B0 +_02243C24: .word 0x022539C0 + thumb_func_end ov17_02243B0C + + .rodata + + + .global Unk_ov17_022539AC +Unk_ov17_022539AC: ; 0x022539AC + .incbin "incbin/overlay17_rodata.bin", 0xC20, 0xC24 - 0xC20 + + .global Unk_ov17_022539B0 +Unk_ov17_022539B0: ; 0x022539B0 + .incbin "incbin/overlay17_rodata.bin", 0xC24, 0xC2C - 0xC24 + + .global Unk_ov17_022539B8 +Unk_ov17_022539B8: ; 0x022539B8 + .incbin "incbin/overlay17_rodata.bin", 0xC2C, 0xC34 - 0xC2C + + .global Unk_ov17_022539C0 +Unk_ov17_022539C0: ; 0x022539C0 + .incbin "incbin/overlay17_rodata.bin", 0xC34, 0xC3C - 0xC34 + + .global Unk_ov17_022539C8 +Unk_ov17_022539C8: ; 0x022539C8 + .incbin "incbin/overlay17_rodata.bin", 0xC3C, 0x19 + diff --git a/asm/ov17_02243C28.s b/asm/ov17_02243C28.s new file mode 100644 index 000000000..f3225db5f --- /dev/null +++ b/asm/ov17_02243C28.s @@ -0,0 +1,4716 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02243C28 +ov17_02243C28: ; 0x02243C28 + push {r3, r4, lr} + sub sp, #0xc + ldr r1, _02243C60 ; =0x022539E4 + add r3, sp, #0 + str r1, [sp] + mov r1, #0x16 + strh r1, [r3, #4] + ldr r1, [r0, #0] + ldr r2, _02243C64 ; =0x00000123 + ldrb r1, [r1, r2] + strb r1, [r3, #6] + sub r1, r2, #7 + ldr r4, [r0, #0] + add r2, #0x4e + ldrb r1, [r4, r1] + strb r1, [r3, #8] + ldr r1, [r0, #0] + ldrb r1, [r1, r2] + strb r1, [r3, #7] + mov r1, #0xc3 + lsl r1, r1, #4 + add r0, r0, r1 + add r1, sp, #0 + bl ov17_0224F18C + add sp, #0xc + pop {r3, r4, pc} + nop +_02243C60: .word 0x022539E4 +_02243C64: .word 0x00000123 + thumb_func_end ov17_02243C28 + + thumb_func_start ov17_02243C68 +ov17_02243C68: ; 0x02243C68 + push {r3, lr} + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + mov r3, #0 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02243C68 + + thumb_func_start ov17_02243C80 +ov17_02243C80: ; 0x02243C80 + push {r3, lr} + mov r0, #0xc3 + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r2, #0 + mov r2, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r3, pc} + thumb_func_end ov17_02243C80 + + thumb_func_start ov17_02243C94 +ov17_02243C94: ; 0x02243C94 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02243C94 + + thumb_func_start ov17_02243C98 +ov17_02243C98: ; 0x02243C98 + push {r3, lr} + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + mov r3, #0 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02243C98 + + thumb_func_start ov17_02243CB0 +ov17_02243CB0: ; 0x02243CB0 + push {r3, r4, r5, lr} + ldr r0, _02243CD8 ; =0x00001650 + add r5, r1, #0 + mov r1, #1 + strb r1, [r5, r0] + ldr r0, [r5, #0] + add r4, r2, #0 + bl sub_02094EDC + cmp r0, #0 + bne _02243CD6 + mov r0, #0xc3 + lsl r0, r0, #4 + mov r2, #0 + add r0, r5, r0 + add r1, r4, #0 + add r3, r2, #0 + bl ov17_0224F26C +_02243CD6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02243CD8: .word 0x00001650 + thumb_func_end ov17_02243CB0 + + thumb_func_start ov17_02243CDC +ov17_02243CDC: ; 0x02243CDC + push {r3, lr} + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + mov r3, #0 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02243CDC + + thumb_func_start ov17_02243CF4 +ov17_02243CF4: ; 0x02243CF4 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r0, #0x15 + mov r1, #0x10 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + ldr r2, _02243D2C ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _02243D30 ; =ov17_02243D34 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_02243D2C: .word 0x00007530 +_02243D30: .word ov17_02243D34 + thumb_func_end ov17_02243CF4 + + thumb_func_start ov17_02243D34 +ov17_02243D34: ; 0x02243D34 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldrb r1, [r4, #0xf] + add r5, r0, #0 + cmp r1, #0 + beq _02243D4C + cmp r1, #1 + beq _02243D6A + cmp r1, #2 + beq _02243D84 + b _02243D92 +_02243D4C: + mov r1, #0 + add r0, r4, #0 + str r1, [sp] + add r0, #0xe + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #0x46 + bl ov17_022431A0 + ldrb r0, [r4, #0xf] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xf] + pop {r3, r4, r5, pc} +_02243D6A: + ldrh r0, [r4, #0xc] + add r0, r0, #1 + strh r0, [r4, #0xc] + ldrh r0, [r4, #0xc] + cmp r0, #0x1e + bls _02243DB0 + mov r0, #0 + strh r0, [r4, #0xc] + ldrb r0, [r4, #0xf] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xf] + pop {r3, r4, r5, pc} +_02243D84: + ldrb r0, [r4, #0xe] + cmp r0, #1 + bne _02243DB0 + add r0, r1, #1 + add sp, #8 + strb r0, [r4, #0xf] + pop {r3, r4, r5, pc} +_02243D92: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02243DB0: + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov17_02243D34 + + thumb_func_start ov17_02243DB4 +ov17_02243DB4: ; 0x02243DB4 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02243DB4 + + thumb_func_start ov17_02243DCC +ov17_02243DCC: ; 0x02243DCC + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r0, #0x15 + mov r1, #0x1c + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02243E24 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + add r0, r6, #0 + add r0, #0xe4 + ldrb r0, [r0] + strb r0, [r4, #0x18] + add r0, r6, #0 + add r0, #0xd8 + ldrh r0, [r0] + strh r0, [r4, #0x12] + add r0, r6, #0 + add r0, #0xda + ldrh r0, [r0] + add r6, #0xdc + strh r0, [r4, #0x14] + ldrh r0, [r6] + strh r0, [r4, #0x16] + ldr r0, _02243E28 ; =ov17_02243E2C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243E24: .word 0x00007530 +_02243E28: .word ov17_02243E2C + thumb_func_end ov17_02243DCC + + thumb_func_start ov17_02243E2C +ov17_02243E2C: ; 0x02243E2C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #4 + bhi _02243ED2 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02243E46: ; jump table + .short _02243E50 - _02243E46 - 2 ; case 0 + .short _02243E72 - _02243E46 - 2 ; case 1 + .short _02243E8C - _02243E46 - 2 ; case 2 + .short _02243EA6 - _02243E46 - 2 ; case 3 + .short _02243EC4 - _02243E46 - 2 ; case 4 +_02243E50: + ldrb r1, [r4, #0x18] + cmp r1, #0 + beq _02243E62 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0x12 + mov r3, #0 + bl ov17_02242E5C +_02243E62: + ldr r0, _02243EF4 ; =0x000006F9 + bl sub_02005748 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02243E72: + ldrb r0, [r4, #0x18] + cmp r0, #0 + beq _02243E82 + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02243EF0 +_02243E82: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02243E8C: + ldrh r0, [r4, #0xe] + add r0, r0, #1 + strh r0, [r4, #0xe] + ldrh r0, [r4, #0xe] + cmp r0, #0x1e + bls _02243EF0 + mov r0, #0 + strh r0, [r4, #0xe] + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02243EA6: + mov r1, #0 + add r0, r4, #0 + str r1, [sp] + add r0, #0x10 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #0x46 + bl ov17_022431A0 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02243EC4: + ldrb r1, [r4, #0x10] + cmp r1, #1 + bne _02243EF0 + add r0, r0, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02243ED2: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02243EF0: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02243EF4: .word 0x000006F9 + thumb_func_end ov17_02243E2C + + thumb_func_start ov17_02243EF8 +ov17_02243EF8: ; 0x02243EF8 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02243EF8 + + thumb_func_start ov17_02243F10 +ov17_02243F10: ; 0x02243F10 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r0, #0x15 + mov r1, #0x1c + add r5, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + add r2, r4, #0 + mov r1, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + add r2, #0x16 + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldrb r0, [r7] + strb r0, [r4, #0x15] + add r0, r6, #0 + bl ov17_022426E8 + ldr r0, _02243F60 ; =ov17_02243F68 + ldr r2, _02243F64 ; =0x00007530 + add r1, r4, #0 + bl sub_0200D9E8 + add r0, r6, #0 + bl ov17_02242DA8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243F60: .word ov17_02243F68 +_02243F64: .word 0x00007530 + thumb_func_end ov17_02243F10 + + thumb_func_start ov17_02243F68 +ov17_02243F68: ; 0x02243F68 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0x15] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_020765AC + add r5, r0, #0 + ldrb r0, [r4, #0x14] + cmp r0, #3 + bls _02243F88 + b _02244092 +_02243F88: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02243F94: ; jump table + .short _02243F9C - _02243F94 - 2 ; case 0 + .short _02243FB8 - _02243F94 - 2 ; case 1 + .short _0224401A - _02243F94 - 2 ; case 2 + .short _02244034 - _02243F94 - 2 ; case 3 +_02243F9C: + mov r0, #0x18 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x18] + ldrsh r0, [r4, r0] + cmp r0, #0xa + bgt _02243FAC + b _022440B6 +_02243FAC: + mov r0, #0 + strh r0, [r4, #0x18] + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_02243FB8: + ldrb r0, [r4, #0x15] + mov r1, #0 + lsl r5, r0, #2 + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + ldr r0, [r0, r5] + bl sub_020765AC + add r6, r0, #0 + ldr r0, [r4, #0] + mov r1, #0x25 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + mov r1, #6 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r2, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + mov r2, #1 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r1, #0 + lsl r2, r2, #8 + bl sub_02007DEC + ldr r0, [r4, #0] + add r6, #0xac + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r1, #1 + add r2, r6, #0 + bl sub_02007DEC + mov r0, #1 + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + mov r0, #0x2b + lsl r0, r0, #0xa + str r0, [r4, #0x10] + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_0224401A: + ldr r0, [r4, #0] + ldrb r2, [r4, #0x15] + ldr r1, [r0, #0] + ldr r0, _022440B8 ; =0x00000123 + ldrb r0, [r1, r0] + cmp r2, r0 + bne _0224402E + ldr r0, _022440BC ; =0x000006F8 + bl sub_02005748 +_0224402E: + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] +_02244034: + ldr r1, [r4, #0xc] + ldr r0, _022440C0 ; =0x000005B6 + sub r0, r1, r0 + str r0, [r4, #0xc] + ldr r1, [r4, #0x10] + ldr r0, _022440C4 ; =0x00000892 + sub r0, r1, r0 + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + asr r0, r0, #8 + cmp r0, #0xd8 + ble _02244054 + ldr r0, [r4, #0x10] + asr r0, r0, #8 + cmp r0, #0x70 + bgt _02244066 +_02244054: + mov r0, #0x36 + lsl r0, r0, #0xa + str r0, [r4, #0xc] + mov r0, #7 + lsl r0, r0, #0xc + str r0, [r4, #0x10] + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] +_02244066: + ldrb r0, [r4, #0x15] + ldr r2, [r4, #0xc] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldrb r0, [r4, #0x15] + ldr r2, [r4, #0x10] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + asr r2, r2, #8 + ldr r0, [r0, #0x14] + mov r1, #1 + add r2, r2, r5 + bl sub_02007DEC + pop {r4, r5, r6, pc} +_02244092: + ldrb r0, [r4, #0x16] + cmp r0, #1 + bne _022440B6 + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_022440B6: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022440B8: .word 0x00000123 +_022440BC: .word 0x000006F8 +_022440C0: .word 0x000005B6 +_022440C4: .word 0x00000892 + thumb_func_end ov17_02243F68 + + thumb_func_start ov17_022440C8 +ov17_022440C8: ; 0x022440C8 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_022440C8 + + thumb_func_start ov17_022440E0 +ov17_022440E0: ; 0x022440E0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r0, #0x15 + mov r1, #0x1c + add r5, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldrb r0, [r7] + strb r0, [r4, #0x15] + ldr r1, [r6, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_020765AC + mov r0, #0x36 + lsl r0, r0, #0xa + str r0, [r4, #0xc] + mov r0, #7 + lsl r0, r0, #0xc + str r0, [r4, #0x10] + ldr r0, _02244134 ; =ov17_0224413C + ldr r2, _02244138 ; =0x00007530 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244134: .word ov17_0224413C +_02244138: .word 0x00007530 + thumb_func_end ov17_022440E0 + + thumb_func_start ov17_0224413C +ov17_0224413C: ; 0x0224413C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + ldrb r0, [r5, #0x15] + mov r1, #0 + lsl r4, r0, #2 + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + ldr r0, [r0, r4] + bl sub_020765AC + add r6, r0, #0 + ldrb r0, [r5, #0x14] + cmp r0, #0 + beq _02244160 + cmp r0, #1 + beq _022441D2 + b _022441FA +_02244160: + ldr r1, [r5, #0xc] + ldr r0, _0224421C ; =0x000005B6 + add r0, r1, r0 + str r0, [r5, #0xc] + ldr r1, [r5, #0x10] + ldr r0, _02244220 ; =0x00000892 + add r0, r1, r0 + str r0, [r5, #0x10] + ldr r0, [r5, #0xc] + asr r1, r0, #8 + mov r0, #1 + lsl r0, r0, #8 + cmp r1, r0 + bge _02244184 + ldr r0, [r5, #0x10] + asr r0, r0, #8 + cmp r0, #0xac + blt _022441A6 +_02244184: + ldr r0, [r5, #0] + mov r1, #0x25 + add r0, r0, r4 + ldr r0, [r0, #0x14] + mov r2, #1 + bl sub_02007DEC + ldr r0, [r5, #0] + mov r1, #6 + add r0, r0, r4 + ldr r0, [r0, #0x14] + mov r2, #1 + bl sub_02007DEC + ldrb r0, [r5, #0x14] + add r0, r0, #1 + strb r0, [r5, #0x14] +_022441A6: + ldrb r0, [r5, #0x15] + ldr r2, [r5, #0xc] + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldrb r0, [r5, #0x15] + ldr r2, [r5, #0x10] + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + asr r2, r2, #8 + ldr r0, [r0, #0x14] + mov r1, #1 + add r2, r2, r6 + bl sub_02007DEC + pop {r3, r4, r5, r6, r7, pc} +_022441D2: + ldrb r1, [r5, #0x15] + ldr r0, [r5, #0] + ldr r2, _02244224 ; =0x00001652 + add r3, r0, r1 + ldrb r2, [r3, r2] + cmp r2, #1 + bne _022441F2 + add r0, #0xc + bl ov17_02241524 + ldrb r0, [r5, #0x15] + ldr r1, [r5, #0] + mov r2, #0 + add r1, r1, r0 + ldr r0, _02244224 ; =0x00001652 + strb r2, [r1, r0] +_022441F2: + ldrb r0, [r5, #0x14] + add r0, r0, #1 + strb r0, [r5, #0x14] + pop {r3, r4, r5, r6, r7, pc} +_022441FA: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r5, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r5, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224421C: .word 0x000005B6 +_02244220: .word 0x00000892 +_02244224: .word 0x00001652 + thumb_func_end ov17_0224413C + + thumb_func_start ov17_02244228 +ov17_02244228: ; 0x02244228 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02244228 + + thumb_func_start ov17_02244240 +ov17_02244240: ; 0x02244240 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r0, #0x15 + mov r1, #0x1c + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + ldr r2, _022442A4 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #2] + strb r0, [r4, #0xe] + add r0, r5, #0 + add r0, #0xe4 + ldrb r0, [r0] + strb r0, [r4, #0x1a] + add r0, r5, #0 + add r0, #0xd8 + ldrh r0, [r0] + strh r0, [r4, #0x14] + add r0, r5, #0 + add r0, #0xda + ldrh r0, [r0] + strh r0, [r4, #0x16] + add r0, r5, #0 + add r0, #0xdc + ldrh r0, [r0] + strh r0, [r4, #0x18] + ldrb r0, [r5, #3] + strb r0, [r4, #0x10] + ldr r0, _022442A8 ; =ov17_022442AC + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022442A4: .word 0x00007530 +_022442A8: .word ov17_022442AC + thumb_func_end ov17_02244240 + + thumb_func_start ov17_022442AC +ov17_022442AC: ; 0x022442AC + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #8 + bhi _022443BA + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022442C6: ; jump table + .short _022442D8 - _022442C6 - 2 ; case 0 + .short _02244314 - _022442C6 - 2 ; case 1 + .short _02244322 - _022442C6 - 2 ; case 2 + .short _0224432A - _022442C6 - 2 ; case 3 + .short _0224434E - _022442C6 - 2 ; case 4 + .short _02244362 - _022442C6 - 2 ; case 5 + .short _0224436A - _022442C6 - 2 ; case 6 + .short _0224438E - _022442C6 - 2 ; case 7 + .short _0224439C - _022442C6 - 2 ; case 8 +_022442D8: + ldrb r0, [r4, #0xd] + ldr r1, [r4, #0] + lsl r0, r0, #1 + add r1, r1, r0 + ldr r0, _022443DC ; =0x00000242 + ldrsh r0, [r1, r0] + bl ov17_02243174 + add r3, r0, #0 + cmp r3, #0 + ble _02244302 + mov r1, #0 + add r0, r4, #0 + str r1, [sp] + add r0, #0x12 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov17_022431A0 + b _0224430A +_02244302: + mov r0, #2 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224430A: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244314: + ldrb r1, [r4, #0x12] + cmp r1, #1 + bne _022443D8 + add r0, r0, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244322: + add r0, r0, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224432A: + ldrb r1, [r4, #0x1a] + cmp r1, #0 + beq _02244346 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0x14 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244346: + mov r0, #5 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224434E: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _022443D8 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244362: + add r0, r0, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224436A: + ldr r0, [r4, #0] + ldrb r1, [r4, #0xe] + ldrb r2, [r4, #0x10] + add r0, #0xc + bl ov17_02241A8C + add r3, r4, #0 + ldrb r1, [r4, #0xe] + ldrb r2, [r4, #0x10] + ldr r0, [r4, #0] + add r3, #0xf + bl ov17_02241B3C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224438E: + ldrb r1, [r4, #0xf] + cmp r1, #1 + bne _022443D8 + add r0, r0, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224439C: + ldrb r0, [r4, #0x11] + add r0, r0, #1 + strb r0, [r4, #0x11] + ldrb r0, [r4, #0x11] + cmp r0, #5 + bls _022443D8 + ldr r0, [r4, #0] + add r0, #0xc + bl ov17_02241B1C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022443BA: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_022443D8: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022443DC: .word 0x00000242 + thumb_func_end ov17_022442AC + + thumb_func_start ov17_022443E0 +ov17_022443E0: ; 0x022443E0 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_022443E0 + + thumb_func_start ov17_022443F8 +ov17_022443F8: ; 0x022443F8 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x49 + mov r0, #0x15 + lsl r1, r1, #2 + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x49 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r1, [r5] + mov r0, #0x2c + add r2, r1, #0 + mul r2, r0 + add r1, r5, r2 + ldrh r1, [r1, #0x10] + strh r1, [r4, #0xe] + add r1, r5, #0 + add r1, #0xe4 + ldrb r2, [r1] + add r1, r0, #0 + add r1, #0xe2 + strb r2, [r4, r1] + add r1, r5, #0 + add r1, #0xd8 + ldrh r2, [r1] + add r1, r0, #0 + add r1, #0xdc + strh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xda + ldrh r2, [r1] + add r1, r0, #0 + add r1, #0xde + strh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xdc + ldrh r2, [r1] + add r1, r0, #0 + add r1, #0xe0 + strh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xe5 + ldrb r2, [r1] + add r1, r0, #0 + add r1, #0xea + strb r2, [r4, r1] + add r1, r5, #0 + add r1, #0xde + ldrh r2, [r1] + add r1, r0, #0 + add r1, #0xe4 + strh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xe0 + ldrh r2, [r1] + add r1, r0, #0 + add r1, #0xe6 + strh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xe2 + ldrh r1, [r1] + add r0, #0xe8 + mov r2, #0x1e + strh r1, [r4, r0] +_0224449E: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224449E + ldr r0, [r5, #0] + add r1, r4, #0 + str r0, [r3, #0] + ldr r0, _022444B8 ; =ov17_022444BC + mov r2, #5 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022444B8: .word ov17_022444BC + thumb_func_end ov17_022443F8 + + thumb_func_start ov17_022444BC +ov17_022444BC: ; 0x022444BC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x118 + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r6, r0, #0 + add r2, r4, #0 + mov r5, #0x2c + add r0, r1, #0 + add r2, #0x24 + mul r0, r5 + add r3, r2, r0 + ldrb r0, [r4, #0xc] + cmp r0, #0xe + bls _022444DA + b _0224492A +_022444DA: + add r2, r0, r0 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022444E6: ; jump table + .short _02244504 - _022444E6 - 2 ; case 0 + .short _0224452C - _022444E6 - 2 ; case 1 + .short _02244540 - _022444E6 - 2 ; case 2 + .short _02244548 - _022444E6 - 2 ; case 3 + .short _0224456E - _022444E6 - 2 ; case 4 + .short _02244582 - _022444E6 - 2 ; case 5 + .short _0224458A - _022444E6 - 2 ; case 6 + .short _022445B2 - _022444E6 - 2 ; case 7 + .short _022445C8 - _022444E6 - 2 ; case 8 + .short _022445D0 - _022444E6 - 2 ; case 9 + .short _022445E4 - _022444E6 - 2 ; case 10 + .short _02244890 - _022444E6 - 2 ; case 11 + .short _022448E6 - _022444E6 - 2 ; case 12 + .short _02244906 - _022444E6 - 2 ; case 13 + .short _0224491C - _022444E6 - 2 ; case 14 +_02244504: + add r0, r5, #0 + add r0, #0xe2 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _02244524 + add r5, #0xdc + ldr r0, [r4, #0] + add r2, r4, r5 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244524: + mov r0, #2 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224452C: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _022445BC + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244540: + add r0, r0, #1 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244548: + ldrb r1, [r3, #0x12] + cmp r1, #0 + beq _02244566 + mov r0, #0 + str r0, [sp] + ldrb r2, [r3, #0x13] + ldr r0, [r4, #0] + add r3, #0xc + bl ov17_02242E9C + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244566: + mov r0, #5 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224456E: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _022445BC + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244582: + add r0, r0, #1 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224458A: + add r0, r5, #0 + add r0, #0xea + ldrb r1, [r4, r0] + cmp r1, #0 + beq _022445AA + add r5, #0xdc + ldr r0, [r4, #0] + add r2, r4, r5 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022445AA: + mov r0, #8 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022445B2: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + beq _022445BE +_022445BC: + b _02244948 +_022445BE: + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022445C8: + add r0, r0, #1 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022445D0: + ldr r0, [r4, #0] + ldrh r2, [r4, #0xe] + add r5, #0xec + ldr r0, [r0, #0] + add r3, r4, r5 + bl ov17_022439C8 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_022445E4: + ldrb r0, [r4, #0xd] + add r5, r0, #1 + cmp r5, #4 + blt _022445EE + mov r5, #0 +_022445EE: + add r0, sp, #0xc0 + mov r1, #0 + mov r2, #0x58 + bl sub_020C4CF4 + add r0, sp, #0x30 + mov r1, #0 + mov r2, #0x90 + bl sub_020C4CF4 + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #5 + bl sub_02074470 + add r7, r0, #0 + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x6f + bl sub_02074470 + str r0, [sp, #0x28] + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02075E0C + str r0, [sp, #0x20] + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x70 + bl sub_02074470 + str r0, [sp, #0x1c] + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + add r2, r1, #0 + bl sub_02074470 + str r0, [sp, #8] + ldr r0, [r4, #0] + lsl r5, r5, #2 + ldr r0, [r0, #0xc] + mov r1, #5 + ldr r0, [r0, r5] + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x18] + ldr r0, [r4, #0] + mov r1, #0x6f + ldr r0, [r0, #0xc] + mov r2, #0 + ldr r0, [r0, r5] + bl sub_02074470 + str r0, [sp, #0x14] + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + ldr r0, [r0, r5] + bl sub_02075E0C + str r0, [sp, #0x10] + ldr r0, [r4, #0] + mov r1, #0x70 + ldr r0, [r0, #0xc] + mov r2, #0 + ldr r0, [r0, r5] + bl sub_02074470 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0xc] + add r2, r1, #0 + ldr r0, [r0, r5] + bl sub_02074470 + mov r3, #0x47 + mov r1, #0 + add r2, sp, #0xc0 + strb r1, [r2] + strb r1, [r2, #1] + lsl r3, r3, #2 + str r0, [sp, #4] + ldrh r0, [r4, r3] + mov r5, #0xa + strh r0, [r2, #2] + mov r0, #1 + str r0, [sp, #0xc4] + strh r5, [r2, #8] + add r5, r3, #3 + ldrb r5, [r4, r5] + add r3, r3, #4 + strh r5, [r2, #0xa] + ldrb r3, [r4, r3] + strh r3, [r2, #0xc] + str r1, [sp, #0xd0] + strh r1, [r2, #0x14] + strh r0, [r2, #0x16] + mov r0, #9 + str r0, [sp, #0x114] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 +_022446E2: + add r1, r1, #1 + strh r0, [r2, #0x18] + add r2, r2, #2 + cmp r1, #4 + blt _022446E2 + ldr r0, [sp, #0x18] + add r1, sp, #0xc0 + strh r0, [r1, #0x1a] + ldr r0, [r4, #0] + lsl r3, r7, #0x10 + ldr r0, [r0, #0x30] + lsr r3, r3, #0x10 + str r0, [sp, #0x34] + ldr r0, [r4, #0] + str r3, [sp, #0x2c] + ldr r0, [r0, #0x5c] + ldr r3, [sp, #0x28] + str r0, [sp, #0x38] + ldrb r0, [r4, #0xd] + lsl r3, r3, #0x18 + ldr r1, [r4, #0] + lsr r3, r3, #0x18 + str r3, [sp, #0x24] + ldr r3, [sp, #0x20] + add r1, #0x64 + lsl r0, r0, #4 + add r0, r1, r0 + lsl r3, r3, #0x18 + str r0, [sp, #0x3c] + ldr r0, [r4, #0] + lsr r3, r3, #0x18 + mov ip, r3 + ldr r3, [sp, #0x1c] + add r0, #0xa4 + str r0, [sp, #0x40] + add r0, sp, #0x30 + lsl r3, r3, #0x18 + mov r6, #0 + add r1, r0, #0 + add r2, r0, #0 + lsr r7, r3, #0x18 +_02244734: + mov r3, #0xff + strb r3, [r0, #0x1c] + ldr r3, [sp, #0x2c] + add r5, r0, #0 + strh r3, [r1, #0x34] + ldr r3, [sp, #0x24] + add r5, #0x3c + strb r3, [r5] + add r5, r0, #0 + add r5, #0x40 + mov r3, ip + strb r3, [r5] + add r3, r0, #0 + add r3, #0x44 + strb r7, [r3] + ldr r3, [sp, #8] + add r6, r6, #1 + str r3, [r2, #0x48] + mov r3, #0 + str r3, [r2, #0x58] + add r0, r0, #1 + add r1, r1, #2 + add r2, r2, #4 + cmp r6, #4 + blt _02244734 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r2, sp, #0x30 + str r0, [sp, #0x88] + add r0, r3, #0 + strb r0, [r2, #0x1c] + mov r0, #1 + ldr r1, [sp, #0x18] + strb r0, [r2, #0x1d] + strh r1, [r2, #0x36] + ldr r1, [sp, #0x14] + add r2, sp, #0x50 + strb r1, [r2, #0x1d] + ldr r1, [sp, #0x10] + add r2, sp, #0x70 + strb r1, [r2, #1] + ldr r1, [sp, #0xc] + strb r1, [r2, #5] + ldr r1, [sp, #4] + str r1, [sp, #0x7c] + ldrb r1, [r4, #0xd] + ldr r2, [r4, #0] + lsl r1, r1, #2 + add r1, r2, r1 + ldr r1, [r1, #0x14] + str r1, [sp, #0x50] + ldrb r1, [r4, #0xd] + cmp r1, #0 + beq _022447A4 + add r0, r3, #0 +_022447A4: + lsl r5, r0, #2 + ldr r0, [r4, #0] + mov r2, #0x57 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r1, #8 + str r1, [sp, #0x98] + mov r1, #0x2d + str r1, [sp, #0x9c] + mov r1, #1 + str r1, [sp, #0xa0] + mov r1, #0x1e + str r0, [sp, #0x54] + mov r0, #0 + str r1, [sp, #0xa4] + mov r1, #2 + str r0, [sp, #0x60] + str r0, [sp, #0xac] + mov r0, #3 + str r1, [sp, #0xa8] + str r0, [sp, #0xb0] + ldr r0, [r4, #0] + lsl r2, r2, #2 + ldr r0, [r0, #0x24] + add r3, sp, #0x30 + str r0, [sp, #0x30] + ldr r0, [r4, #0] + ldr r1, [r0, #0] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, r2] + sub r2, #0x40 + str r0, [sp, #0xb4] + ldr r0, [r4, #0] + ldrh r2, [r4, r2] + ldr r0, [r0, #0x2c] + add r1, sp, #0xc0 + bl ov12_0221FE30 + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_020765AC + add r6, r0, #0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r4, r0] + ldr r0, _0224494C ; =0xDFFBFF3F + cmp r1, r0 + beq _02244824 + ldrb r0, [r4, #0xd] + ldr r1, [r4, #0] + mov r2, #0 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #6 + bl sub_02007DEC +_02244824: + ldrb r0, [r4, #0xd] + ldr r1, [r4, #0] + mov r2, #0 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #0x25 + bl sub_02007DEC + ldrb r0, [r4, #0xd] + ldr r1, [r4, #0] + mov r2, #0xd8 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #0 + bl sub_02007DEC + ldrb r0, [r4, #0xd] + add r6, #0x70 + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #1 + add r2, r6, #0 + bl sub_02007DEC + ldr r0, [r4, #0] + mov r1, #0x25 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r2, #1 + bl sub_02007DEC + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r2, #0x50 + bl sub_02007DEC + ldr r0, [r4, #0] + mov r1, #1 + add r0, r0, r5 + ldr r0, [r0, #0x14] + mov r2, #0x2a + bl sub_02007DEC + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244890: + ldr r0, [r4, #0] + ldr r0, [r0, #0x2c] + bl ov12_0222016C + ldr r0, [r4, #0] + ldr r0, [r0, #0x2c] + bl ov12_02220188 + cmp r0, #0 + bne _02244948 + ldr r0, [r4, #0] + ldr r0, [r0, #0x2c] + bl ov12_02220198 + add r1, r5, #0 + add r1, #0xf2 + ldrb r0, [r4, r1] + cmp r0, #0 + beq _022448DC + sub r0, r0, #1 + strb r0, [r4, r1] + add r0, r1, #1 + ldrb r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #1 + strb r2, [r4, r0] + sub r0, r1, #6 + ldr r2, [r4, r0] + ldr r0, _02244950 ; =0x200400C0 + cmp r2, r0 + bne _022448D4 + ldr r2, _0224494C ; =0xDFFBFF3F + sub r0, r1, #6 + str r2, [r4, r0] +_022448D4: + mov r0, #0xa + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022448DC: + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022448E6: + add r5, #0xf0 + ldrh r0, [r4, r5] + cmp r0, #0x90 + beq _022448F2 + cmp r0, #0xa4 + bne _022448FC +_022448F2: + ldr r0, [r4, #0] + mov r2, #1 + add r1, r0, r1 + ldr r0, _02244954 ; =0x00001652 + strb r2, [r1, r0] +_022448FC: + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244906: + add r2, r4, #0 + ldr r0, [r4, #0] + mov r1, #1 + add r2, #0x10 + bl ov17_022426E8 + ldrb r0, [r4, #0xc] + add sp, #0x118 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224491C: + ldrb r1, [r4, #0x10] + cmp r1, #1 + bne _02244948 + add r0, r0, #1 + add sp, #0x118 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0224492A: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02244948: + add sp, #0x118 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224494C: .word 0xDFFBFF3F +_02244950: .word 0x200400C0 +_02244954: .word 0x00001652 + thumb_func_end ov17_022444BC + + thumb_func_start ov17_02244958 +ov17_02244958: ; 0x02244958 + push {r3, lr} + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + mov r3, #0 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02244958 + + thumb_func_start ov17_02244970 +ov17_02244970: ; 0x02244970 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r0, #0x15 + mov r1, #0x14 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + mov r2, #0x64 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r1, [r6, #0xc] + ldr r0, _022449B0 ; =0x00000123 + ldrb r0, [r1, r0] + add r1, r4, #0 + strb r0, [r4, #0xd] + ldr r0, _022449B4 ; =ov17_022449B8 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_022449B0: .word 0x00000123 +_022449B4: .word ov17_022449B8 + thumb_func_end ov17_02244970 + + thumb_func_start ov17_022449B8 +ov17_022449B8: ; 0x022449B8 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #0xa + bls _022449C8 + b _02244B56 +_022449C8: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022449D4: ; jump table + .short _022449EA - _022449D4 - 2 ; case 0 + .short _02244A04 - _022449D4 - 2 ; case 1 + .short _02244A62 - _022449D4 - 2 ; case 2 + .short _02244A72 - _022449D4 - 2 ; case 3 + .short _02244AAC - _022449D4 - 2 ; case 4 + .short _02244AC0 - _022449D4 - 2 ; case 5 + .short _02244AC6 - _022449D4 - 2 ; case 6 + .short _02244AFA - _022449D4 - 2 ; case 7 + .short _02244B0A - _022449D4 - 2 ; case 8 + .short _02244B2E - _022449D4 - 2 ; case 9 + .short _02244B50 - _022449D4 - 2 ; case 10 +_022449EA: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + mov r2, #0 + ldr r0, [r1, r0] + mov r1, #1 + add r3, r2, #0 + bl ov17_0223F9C4 + ldrb r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, pc} +_02244A04: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + mov r2, #0 + ldr r0, [r1, r0] + mov r1, #2 + add r3, r2, #0 + bl ov17_0223F9C4 + mov r0, #0x23 + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldrb r0, [r1, r0] + add r2, r0, #1 + cmp r2, #4 + bne _02244A26 + mov r1, #3 + b _02244A28 +_02244A26: + mov r1, #2 +_02244A28: + add r0, sp, #0 + strb r2, [r0, #0xa] + add r2, sp, #4 + ldr r0, [r4, #0] + add r2, #2 + mov r3, #0 + bl ov17_02242E5C + mov r0, #0x23 + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldrb r0, [r1, r0] + add r0, r0, #1 + cmp r0, #4 + bne _02244A58 + ldrb r0, [r4, #0xe] + cmp r0, #0 + bne _02244A58 + ldr r0, _02244BA4 ; =0x000006F6 + bl sub_02005748 + ldrb r0, [r4, #0xe] + add r0, r0, #1 + strb r0, [r4, #0xe] +_02244A58: + ldrb r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, pc} +_02244A62: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02244A86 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244A72: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + ldr r0, [r1, r0] + bl ov17_0223FAF8 + add r1, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + bne _02244A88 +_02244A86: + b _02244B9C +_02244A88: + ldr r0, [r4, #0] + add r1, #0x36 + ldr r2, [r0, #0xc] + ldrb r0, [r4, #0xd] + lsl r0, r0, #2 + ldr r0, [r2, r0] + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x10] + ldr r0, _02244BA8 ; =0x000005DD + bl sub_02005748 + ldrb r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, pc} +_02244AAC: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + ldr r0, [r1, r0] + bl ov17_0223FBC0 + cmp r0, #0 + beq _02244B9C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244AC0: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244AC6: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + mov r2, #0 + ldr r0, [r1, r0] + mov r1, #3 + add r3, r2, #0 + bl ov17_0223F9C4 + mov r0, #0x23 + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldrb r0, [r1, r0] + add r2, sp, #0 + mov r3, #0 + add r1, r0, #1 + add r0, sp, #0 + strb r1, [r0, #4] + ldr r0, [r4, #0] + mov r1, #1 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, pc} +_02244AFA: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02244B9C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244B0A: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + ldr r0, [r1, r0] + bl ov17_0223FAF8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02244B9C + strh r0, [r4, #0x12] + ldr r0, _02244BA8 ; =0x000005DD + bl sub_02005748 + ldrb r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, pc} +_02244B2E: + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + ldr r0, [r1, r0] + bl ov17_0223FBC0 + cmp r0, #0 + beq _02244B9C + ldrh r0, [r4, #0x12] + cmp r0, #3 + bne _02244B4A + mov r0, #1 + add sp, #0xc + strb r0, [r4, #0xc] + pop {r4, r5, pc} +_02244B4A: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244B50: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244B56: + ldr r0, [r4, #0] + ldr r1, _02244BAC ; =0x00000171 + ldr r2, [r0, #0] + ldrb r1, [r2, r1] + cmp r1, #1 + bne _02244B6C + mov r2, #0 + mov r1, #0x2e + add r3, r2, #0 + bl ov17_02242E5C +_02244B6C: + mov r0, #0xc3 + add r2, r4, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r2, #0x10 + mov r3, #4 + bl ov17_0224F26C + ldr r1, [r4, #0] + ldr r0, _02244BA0 ; =0x0000081C + ldr r0, [r1, r0] + mov r1, #0 + add r2, r1, #0 + add r3, r1, #0 + bl ov17_0223F9C4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02244B9C: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02244BA0: .word 0x0000081C +_02244BA4: .word 0x000006F6 +_02244BA8: .word 0x000005DD +_02244BAC: .word 0x00000171 + thumb_func_end ov17_022449B8 + + thumb_func_start ov17_02244BB0 +ov17_02244BB0: ; 0x02244BB0 + push {r4, r5} + ldr r0, [sp, #8] + lsl r2, r0, #2 + ldr r5, [r3, r2] + lsl r2, r0, #1 + ldrh r4, [r5] + add r3, r1, r2 + ldr r2, _02244BD0 ; =0x00000236 + add r0, r1, r0 + strh r4, [r3, r2] + ldrh r3, [r5, #2] + add r2, #8 + strb r3, [r0, r2] + pop {r4, r5} + bx lr + nop +_02244BD0: .word 0x00000236 + thumb_func_end ov17_02244BB0 + + thumb_func_start ov17_02244BD4 +ov17_02244BD4: ; 0x02244BD4 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02244BD4 + + thumb_func_start ov17_02244BEC +ov17_02244BEC: ; 0x02244BEC + bx lr + ; .align 2, 0 + thumb_func_end ov17_02244BEC + + thumb_func_start ov17_02244BF0 +ov17_02244BF0: ; 0x02244BF0 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02244BF0 + + thumb_func_start ov17_02244C08 +ov17_02244C08: ; 0x02244C08 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #1] + strb r0, [r4, #0xe] +_02244C46: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02244C46 + ldr r0, [r5, #0] + ldr r2, _02244C60 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _02244C64 ; =ov17_02244C68 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244C60: .word 0x00007530 +_02244C64: .word ov17_02244C68 + thumb_func_end ov17_02244C08 + + thumb_func_start ov17_02244C68 +ov17_02244C68: ; 0x02244C68 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + add r3, r4, #0 + add r2, r1, #0 + mov r0, #0x2c + ldrb r1, [r4, #0xc] + add r3, #0x24 + mul r2, r0 + add r2, r3, r2 + cmp r1, #4 + bhi _02244D00 + add r3, r1, r1 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_02244C8E: ; jump table + .short _02244C98 - _02244C8E - 2 ; case 0 + .short _02244CA8 - _02244C8E - 2 ; case 1 + .short _02244CAE - _02244C8E - 2 ; case 2 + .short _02244CE6 - _02244C8E - 2 ; case 3 + .short _02244D00 - _02244C8E - 2 ; case 4 +_02244C98: + mov r0, #0x1a + ldrsh r1, [r2, r0] + add r0, #0xee + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244CA8: + add r0, r1, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244CAE: + add r0, #0xdc + mov r3, #0x18 + ldrsh r1, [r4, r0] + ldrsh r0, [r2, r3] + cmp r1, r0 + bge _02244CE0 + add r0, r3, #0 + add r0, #0xf0 + ldrsh r1, [r4, r0] + add r0, r3, #0 + add r0, #0xf0 + add r1, #0xa + strh r1, [r4, r0] + add r3, #0xf0 + ldr r0, [r4, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrsh r3, [r4, r3] + add r0, #0xc + bl ov17_02241F34 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244CE0: + mov r0, #4 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244CE6: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02244D1E + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02244D00: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02244D1E: + pop {r3, r4, r5, pc} + thumb_func_end ov17_02244C68 + + thumb_func_start ov17_02244D20 +ov17_02244D20: ; 0x02244D20 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02244D20 + + thumb_func_start ov17_02244D38 +ov17_02244D38: ; 0x02244D38 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #1] + strb r0, [r4, #0xe] +_02244D76: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02244D76 + ldr r0, [r5, #0] + ldr r2, _02244D90 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _02244D94 ; =ov17_02244D98 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244D90: .word 0x00007530 +_02244D94: .word ov17_02244D98 + thumb_func_end ov17_02244D38 + + thumb_func_start ov17_02244D98 +ov17_02244D98: ; 0x02244D98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + ldrb r1, [r4, #0xd] + str r0, [sp, #4] + add r2, r4, #0 + mov r0, #0x2c + add r2, #0x24 + mul r0, r1 + add r3, r2, r0 + ldrb r0, [r4, #0xc] + cmp r0, #0x10 + bls _02244DB4 + b _02244F8C +_02244DB4: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02244DC0: ; jump table + .short _02244DE2 - _02244DC0 - 2 ; case 0 + .short _02244DF4 - _02244DC0 - 2 ; case 1 + .short _02244E1A - _02244DC0 - 2 ; case 2 + .short _02244E2E - _02244DC0 - 2 ; case 3 + .short _02244E32 - _02244DC0 - 2 ; case 4 + .short _02244E38 - _02244DC0 - 2 ; case 5 + .short _02244E6A - _02244DC0 - 2 ; case 6 + .short _02244E88 - _02244DC0 - 2 ; case 7 + .short _02244E8C - _02244DC0 - 2 ; case 8 + .short _02244EB8 - _02244DC0 - 2 ; case 9 + .short _02244F0A - _02244DC0 - 2 ; case 10 + .short _02244F26 - _02244DC0 - 2 ; case 11 + .short _02244F2A - _02244DC0 - 2 ; case 12 + .short _02244F30 - _02244DC0 - 2 ; case 13 + .short _02244F80 - _02244DC0 - 2 ; case 14 + .short _02244F86 - _02244DC0 - 2 ; case 15 + .short _02244F8C - _02244DC0 - 2 ; case 16 +_02244DE2: + mov r0, #0x1a + ldrsh r1, [r3, r0] + add r0, #0xee + add sp, #8 + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244DF4: + ldrb r1, [r3, #0x12] + cmp r1, #0 + beq _02244E12 + mov r0, #0 + str r0, [sp] + ldrb r2, [r3, #0x13] + ldr r0, [r4, #0] + add r3, #0xc + bl ov17_02242E9C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244E12: + mov r0, #3 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244E1A: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02244E78 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244E2E: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244E32: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244E38: + mov r5, #0x42 + lsl r5, r5, #2 + mov r0, #0x18 + ldrsh r1, [r4, r5] + ldrsh r0, [r3, r0] + cmp r1, r0 + bge _02244E62 + add r1, #0xa + strh r1, [r4, r5] + ldr r0, [r4, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrsh r3, [r4, r5] + add r0, #0xc + bl ov17_02241F34 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244E62: + mov r0, #7 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244E6A: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + bgt _02244E7A +_02244E78: + b _02244FAA +_02244E7A: + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + add sp, #8 + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244E88: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244E8C: + ldr r0, [r3, #0x28] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + cmp r0, #1 + bne _02244EB0 + ldrb r0, [r3, #3] + add sp, #8 + add r1, r4, r0 + mov r0, #0xe4 + ldrsb r1, [r1, r0] + add r0, #0x26 + strh r1, [r4, r0] + mov r0, #0 + strb r0, [r4, #0x10] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244EB0: + mov r0, #0xb + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244EB8: + mov r0, #0x10 + ldrsb r0, [r4, r0] + mov r6, #0 + add r5, r6, #0 + add r0, r0, #1 + strb r0, [r4, #0x10] + mov r7, #0xe7 +_02244EC6: + mov r2, #0x10 + ldrsb r3, [r4, r2] + add r1, r4, r5 + mov r0, #0xe4 + mov r2, #0xa + ldrsb r0, [r1, r0] + mul r2, r3 + sub r2, r0, r2 + ldrsb r0, [r1, r7] + cmp r0, r2 + bgt _02244EEE + ldr r0, [r4, #0] + add r1, r5, #0 + add r0, #0xc + add r6, r6, #1 + bl ov17_022424D4 + ldr r0, _02244FB0 ; =0x000006DF + bl sub_02005748 +_02244EEE: + add r5, r5, #1 + cmp r5, #3 + blt _02244EC6 + cmp r6, #0 + ble _02244F02 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244F02: + mov r0, #0xb + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244F0A: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02244FAA + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + add sp, #8 + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02244F26: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244F2A: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244F30: + add r6, r4, #0 + mov r5, #0 + add r6, #0x4c +_02244F36: + ldr r2, [r4, #0] + ldr r0, _02244FB4 ; =0x00000231 + add r1, r2, r5 + ldrb r1, [r1, r0] + mov r0, #0x2c + add r7, r1, #0 + mul r7, r0 + ldr r0, [r6, r7] + lsl r1, r0, #0x1a + lsl r3, r0, #0x16 + lsr r1, r1, #0x1e + lsr r3, r3, #0x1e + cmp r1, r3 + bne _02244F5E + lsl r1, r0, #0x18 + lsl r0, r0, #0x14 + lsr r1, r1, #0x1e + lsr r0, r0, #0x1e + cmp r1, r0 + beq _02244F74 +_02244F5E: + add r2, #0xc + add r0, r2, #0 + ldr r2, [r6, r7] + add r1, r5, #0 + lsl r2, r2, #0x18 + lsr r2, r2, #0x1e + bl ov17_022430AC + ldr r0, _02244FB8 ; =0x000006E2 + bl sub_02005748 +_02244F74: + add r5, r5, #1 + cmp r5, #4 + blt _02244F36 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244F80: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244F86: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02244F8C: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #4] + bl sub_0200DA58 +_02244FAA: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244FB0: .word 0x000006DF +_02244FB4: .word 0x00000231 +_02244FB8: .word 0x000006E2 + thumb_func_end ov17_02244D98 + + thumb_func_start ov17_02244FBC +ov17_02244FBC: ; 0x02244FBC + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02244FBC + + thumb_func_start ov17_02244FD4 +ov17_02244FD4: ; 0x02244FD4 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #1] + strb r0, [r4, #0xe] +_02245012: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02245012 + ldr r0, [r5, #0] + ldr r2, _0224502C ; =0x00007530 + str r0, [r3, #0] + ldr r0, _02245030 ; =ov17_02245034 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224502C: .word 0x00007530 +_02245030: .word ov17_02245034 + thumb_func_end ov17_02244FD4 + + thumb_func_start ov17_02245034 +ov17_02245034: ; 0x02245034 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + add r2, r4, #0 + mov r0, #0x2c + add r2, #0x24 + mul r0, r1 + add r3, r2, r0 + ldrb r0, [r4, #0xc] + cmp r0, #8 + bhi _02245104 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02245058: ; jump table + .short _0224506A - _02245058 - 2 ; case 0 + .short _0224507A - _02245058 - 2 ; case 1 + .short _0224509C - _02245058 - 2 ; case 2 + .short _022450AE - _02245058 - 2 ; case 3 + .short _022450B2 - _02245058 - 2 ; case 4 + .short _022450B8 - _02245058 - 2 ; case 5 + .short _022450E6 - _02245058 - 2 ; case 6 + .short _02245100 - _02245058 - 2 ; case 7 + .short _02245104 - _02245058 - 2 ; case 8 +_0224506A: + mov r0, #0x1a + ldrsh r1, [r3, r0] + add r0, #0xee + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224507A: + ldrb r1, [r3, #0x12] + cmp r1, #0 + beq _02245096 + mov r0, #0 + str r0, [sp] + ldrb r2, [r3, #0x13] + ldr r0, [r4, #0] + add r3, #0xc + bl ov17_02242E9C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245096: + mov r0, #3 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224509C: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245122 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022450AE: + add r0, r0, #1 + strb r0, [r4, #0xc] +_022450B2: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_022450B8: + mov r5, #0x42 + lsl r5, r5, #2 + mov r0, #0x18 + ldrsh r1, [r4, r5] + ldrsh r0, [r3, r0] + cmp r1, r0 + bge _022450E0 + add r1, #0xa + strh r1, [r4, r5] + ldr r0, [r4, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrsh r3, [r4, r5] + add r0, #0xc + bl ov17_02241F34 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022450E0: + mov r0, #7 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022450E6: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02245122 + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245100: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245104: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02245122: + pop {r3, r4, r5, pc} + thumb_func_end ov17_02245034 + + thumb_func_start ov17_02245124 +ov17_02245124: ; 0x02245124 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02245124 + + thumb_func_start ov17_0224513C +ov17_0224513C: ; 0x0224513C + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #1] + strb r0, [r4, #0xe] +_0224517A: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224517A + ldr r0, [r5, #0] + ldr r2, _02245194 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _02245198 ; =ov17_0224519C + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245194: .word 0x00007530 +_02245198: .word ov17_0224519C + thumb_func_end ov17_0224513C + + thumb_func_start ov17_0224519C +ov17_0224519C: ; 0x0224519C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r6, r0, #0 + add r3, r4, #0 + add r2, r1, #0 + mov r0, #0x2c + ldrb r1, [r4, #0xc] + add r3, #0x24 + mul r2, r0 + add r5, r3, r2 + cmp r1, #0x19 + bls _022451BA + b _022454DC +_022451BA: + add r2, r1, r1 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022451C6: ; jump table + .short _022451FA - _022451C6 - 2 ; case 0 + .short _02245210 - _022451C6 - 2 ; case 1 + .short _02245254 - _022451C6 - 2 ; case 2 + .short _02245264 - _022451C6 - 2 ; case 3 + .short _02245268 - _022451C6 - 2 ; case 4 + .short _02245290 - _022451C6 - 2 ; case 5 + .short _022452A4 - _022451C6 - 2 ; case 6 + .short _022452A8 - _022451C6 - 2 ; case 7 + .short _022452DC - _022451C6 - 2 ; case 8 + .short _022452FA - _022451C6 - 2 ; case 9 + .short _022452FE - _022451C6 - 2 ; case 10 + .short _02245304 - _022451C6 - 2 ; case 11 + .short _02245370 - _022451C6 - 2 ; case 12 + .short _02245388 - _022451C6 - 2 ; case 13 + .short _022453A2 - _022451C6 - 2 ; case 14 + .short _022453C2 - _022451C6 - 2 ; case 15 + .short _022453EA - _022451C6 - 2 ; case 16 + .short _02245400 - _022451C6 - 2 ; case 17 + .short _02245404 - _022451C6 - 2 ; case 18 + .short _02245430 - _022451C6 - 2 ; case 19 + .short _0224543E - _022451C6 - 2 ; case 20 + .short _02245442 - _022451C6 - 2 ; case 21 + .short _02245454 - _022451C6 - 2 ; case 22 + .short _02245498 - _022451C6 - 2 ; case 23 + .short _022454B4 - _022451C6 - 2 ; case 24 + .short _022454DC - _022451C6 - 2 ; case 25 +_022451FA: + ldrb r0, [r5, #3] + add sp, #8 + add r1, r4, r0 + mov r0, #0xe4 + ldrsb r1, [r1, r0] + add r0, #0x26 + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245210: + ldrb r1, [r5, #3] + mov r0, #0xe7 + add r3, r4, r1 + ldrsb r2, [r3, r0] + mov r0, #0xe4 + ldrsb r0, [r3, r0] + cmp r2, r0 + ble _0224524C + cmp r2, #0x32 + blt _02245228 + mov r6, #3 + b _0224522A +_02245228: + mov r6, #2 +_0224522A: + ldr r0, [r4, #0] + add r2, r6, #0 + add r0, #0xc + bl ov17_02241A8C + ldr r3, _02245504 ; =0x0000010E + ldrb r1, [r5, #3] + ldr r0, [r4, #0] + add r2, r6, #0 + add r3, r4, r3 + bl ov17_02241B3C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_0224524C: + mov r0, #3 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245254: + add r0, #0xe2 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _022452EA + add r0, r1, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245264: + add r0, r1, #1 + strb r0, [r4, #0xc] +_02245268: + add r0, r4, #0 + add r0, #0xf8 + ldrb r1, [r0] + cmp r1, #0 + beq _02245288 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0xec + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245288: + mov r0, #6 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245290: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _022452EA + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022452A4: + add r0, r1, #1 + strb r0, [r4, #0xc] +_022452A8: + ldrb r0, [r5, #3] + add r2, r4, r0 + mov r0, #0xe7 + ldrsb r1, [r2, r0] + mov r0, #0xe4 + ldrsb r0, [r2, r0] + cmp r1, r0 + ble _022452CE + mov r0, #1 + str r0, [sp] + add r0, r4, #0 + add r0, #0x11 + str r0, [sp, #4] + ldr r0, [r4, #0] + mov r2, #0 + mov r3, #0x46 + bl ov17_022431A0 + b _022452D2 +_022452CE: + mov r0, #1 + strb r0, [r4, #0x11] +_022452D2: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022452DC: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #8 + bgt _022452EC +_022452EA: + b _02245500 +_022452EC: + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022452FA: + add r0, r1, #1 + strb r0, [r4, #0xc] +_022452FE: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245304: + ldrb r0, [r5, #3] + add r3, r4, r0 + mov r0, #0xe7 + ldrsb r1, [r3, r0] + add r0, #0x23 + ldrsh r0, [r4, r0] + cmp r0, r1 + beq _02245368 + mov r2, #0xe4 + ldrsb r0, [r3, r2] + sub r0, r1, r0 + cmp r0, #0 + ble _0224533C + add r0, r2, #0 + add r0, #0x26 + ldrsh r1, [r4, r0] + add r0, r2, #0 + add r0, #0x26 + add r1, #0xa + strh r1, [r4, r0] + add r2, #0x26 + ldr r0, [r4, #0] + ldrb r1, [r5, #3] + ldrsh r2, [r4, r2] + add r0, #0xc + bl ov17_022424D4 + b _0224535E +_0224533C: + add r0, r2, #0 + add r0, #0x26 + ldrsh r1, [r4, r0] + add r0, r2, #0 + add r0, #0x26 + sub r1, #0xa + strh r1, [r4, r0] + add r2, #0x26 + ldr r0, [r4, #0] + ldrb r1, [r5, #3] + ldrsh r2, [r4, r2] + add r0, #0xc + bl ov17_022424D4 + ldr r0, _02245508 ; =0x000006DF + bl sub_02005748 +_0224535E: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245368: + mov r0, #0xe + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245370: + ldr r0, [r4, #0] + ldrb r1, [r5, #3] + add r0, #0xc + bl ov17_022424A8 + cmp r0, #1 + bne _022453F4 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245388: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _022453F4 + mov r0, #0 + strb r0, [r4, #0xf] + mov r0, #0xb + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022453A2: + add r0, #0xde + ldrsh r0, [r4, r0] + cmp r0, #0x32 + blt _022453B8 + ldrb r1, [r5, #3] + ldr r0, [r4, #0] + bl ov17_0224365C + mov r1, #0x11 + lsl r1, r1, #4 + str r0, [r4, r1] +_022453B8: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022453C2: + add r0, r4, #0 + add r0, #0xf9 + ldrb r1, [r0] + cmp r1, #0 + beq _022453E2 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0xf2 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022453E2: + mov r0, #0x11 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022453EA: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + beq _022453F6 +_022453F4: + b _02245500 +_022453F6: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245400: + add r0, r1, #1 + strb r0, [r4, #0xc] +_02245404: + ldr r0, _0224550C ; =0x0000010A + ldrsh r0, [r4, r0] + cmp r0, #0x32 + blt _02245428 + add r0, r4, #0 + add r0, #0x12 + str r0, [sp] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrb r3, [r5, #3] + ldr r0, [r4, #0] + bl ov17_022436D0 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245428: + mov r0, #0x14 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245430: + ldrb r0, [r4, #0x12] + cmp r0, #0 + bne _02245500 + add r0, r1, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_0224543E: + add r0, r1, #1 + strb r0, [r4, #0xc] +_02245442: + mov r0, #0x1a + ldrsh r1, [r5, r0] + add r0, #0xee + add sp, #8 + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245454: + add r0, #0xdc + mov r3, #0x18 + ldrsh r1, [r4, r0] + ldrsh r0, [r5, r3] + cmp r1, r0 + bge _02245488 + add r0, r3, #0 + add r0, #0xf0 + ldrsh r1, [r4, r0] + add r0, r3, #0 + add r0, #0xf0 + add r1, #0xa + strh r1, [r4, r0] + add r3, #0xf0 + ldr r0, [r4, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrsh r3, [r4, r3] + add r0, #0xc + bl ov17_02241F34 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245488: + ldr r0, [r4, #0] + add r0, #0xc + bl ov17_02241B1C + mov r0, #0x18 + add sp, #8 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02245498: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02245500 + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + add sp, #8 + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022454B4: + add r1, r0, #0 + add r1, #0xde + ldrsh r1, [r4, r1] + cmp r1, #0x32 + blt _022454D2 + add r0, #0xe4 + ldr r0, [r4, r0] + bl ov17_02243690 + ldr r0, [r4, #0] + ldrb r1, [r5, #3] + add r0, #0xc + mov r2, #0 + bl ov17_022424D4 +_022454D2: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_022454DC: + ldrb r0, [r4, #0x11] + cmp r0, #1 + bne _02245500 + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_02245500: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02245504: .word 0x0000010E +_02245508: .word 0x000006DF +_0224550C: .word 0x0000010A + thumb_func_end ov17_0224519C + + thumb_func_start ov17_02245510 +ov17_02245510: ; 0x02245510 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02245510 + + thumb_func_start ov17_02245528 +ov17_02245528: ; 0x02245528 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #1] + strb r0, [r4, #0xe] +_02245566: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02245566 + ldr r0, [r5, #0] + ldr r2, _02245580 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _02245584 ; =ov17_02245588 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245580: .word 0x00007530 +_02245584: .word ov17_02245588 + thumb_func_end ov17_02245528 + + thumb_func_start ov17_02245588 +ov17_02245588: ; 0x02245588 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + add r2, r4, #0 + mov r0, #0x2c + add r2, #0x24 + mul r0, r1 + add r3, r2, r0 + ldrb r0, [r4, #0xc] + cmp r0, #8 + bhi _02245658 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022455AC: ; jump table + .short _022455BE - _022455AC - 2 ; case 0 + .short _022455CE - _022455AC - 2 ; case 1 + .short _022455F0 - _022455AC - 2 ; case 2 + .short _02245602 - _022455AC - 2 ; case 3 + .short _02245606 - _022455AC - 2 ; case 4 + .short _0224560C - _022455AC - 2 ; case 5 + .short _0224563A - _022455AC - 2 ; case 6 + .short _02245654 - _022455AC - 2 ; case 7 + .short _02245658 - _022455AC - 2 ; case 8 +_022455BE: + mov r0, #0x1a + ldrsh r1, [r3, r0] + add r0, #0xee + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022455CE: + ldrb r1, [r3, #0x12] + cmp r1, #0 + beq _022455EA + mov r0, #0 + str r0, [sp] + ldrb r2, [r3, #0x13] + ldr r0, [r4, #0] + add r3, #0xc + bl ov17_02242E9C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022455EA: + mov r0, #3 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_022455F0: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245676 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245602: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245606: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_0224560C: + mov r5, #0x42 + lsl r5, r5, #2 + mov r0, #0x18 + ldrsh r1, [r4, r5] + ldrsh r0, [r3, r0] + cmp r1, r0 + bge _0224562E + add r1, #0xa + strh r1, [r4, r5] + ldr r0, [r4, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrsh r3, [r4, r5] + add r0, #0xc + bl ov17_02241F34 + b _02245632 +_0224562E: + mov r0, #7 + strb r0, [r4, #0xc] +_02245632: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_0224563A: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02245676 + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245654: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245658: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02245676: + pop {r3, r4, r5, pc} + thumb_func_end ov17_02245588 + + thumb_func_start ov17_02245678 +ov17_02245678: ; 0x02245678 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02245678 + + thumb_func_start ov17_02245690 +ov17_02245690: ; 0x02245690 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xf7 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r2, #0x43 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + add r3, r4, #0 + add r3, #0x10 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] +_022456C6: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _022456C6 + ldr r0, [r6, #0] + ldr r2, _022456E0 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _022456E4 ; =ov17_022456E8 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022456E0: .word 0x00007530 +_022456E4: .word ov17_022456E8 + thumb_func_end ov17_02245690 + + thumb_func_start ov17_022456E8 +ov17_022456E8: ; 0x022456E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp, #4] + ldr r0, _02245944 ; =0x00000106 + add r4, r1, #0 + ldrb r0, [r4, r0] + mov r7, #0 + add r0, r4, r0 + add r0, #0xf9 + ldrb r1, [r0] + cmp r1, #4 + beq _02245724 + add r2, r4, #0 + mov r0, #0x2c + add r2, #0x20 + mul r0, r1 + add r5, r2, r0 + ldr r3, [r4, #0] + ldr r6, _02245948 ; =0x00000231 + add r2, r7, #0 +_02245710: + ldrb r0, [r3, r6] + cmp r1, r0 + bne _0224571A + add r7, r2, #0 + b _02245726 +_0224571A: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #4 + blt _02245710 + b _02245726 +_02245724: + add r5, r7, #0 +_02245726: + ldrb r0, [r4, #0xc] + cmp r0, #0x11 + bls _0224572E + b _02245922 +_0224572E: + add r2, r0, r0 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224573A: ; jump table + .short _0224575E - _0224573A - 2 ; case 0 + .short _0224576C - _0224573A - 2 ; case 1 + .short _022457C0 - _0224573A - 2 ; case 2 + .short _022457D0 - _0224573A - 2 ; case 3 + .short _022457D4 - _0224573A - 2 ; case 4 + .short _022457FC - _0224573A - 2 ; case 5 + .short _02245812 - _0224573A - 2 ; case 6 + .short _02245816 - _0224573A - 2 ; case 7 + .short _02245840 - _0224573A - 2 ; case 8 + .short _02245854 - _0224573A - 2 ; case 9 + .short _02245858 - _0224573A - 2 ; case 10 + .short _02245880 - _0224573A - 2 ; case 11 + .short _02245894 - _0224573A - 2 ; case 12 + .short _02245898 - _0224573A - 2 ; case 13 + .short _022458AA - _0224573A - 2 ; case 14 + .short _022458DC - _0224573A - 2 ; case 15 + .short _022458F8 - _0224573A - 2 ; case 16 + .short _02245922 - _0224573A - 2 ; case 17 +_0224575E: + mov r0, #0x1a + ldrsh r1, [r5, r0] + add r0, #0xea + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_0224576C: + ldrb r0, [r5, #9] + cmp r0, #0 + bne _0224577E + mov r0, #0x6f + lsl r0, r0, #4 + mov r6, #4 + bl sub_02005748 + b _022457A8 +_0224577E: + cmp r0, #1 + bne _0224578C + ldr r0, _0224594C ; =0x000006EF + mov r6, #5 + bl sub_02005748 + b _022457A8 +_0224578C: + cmp r0, #2 + bne _0224579A + ldr r0, _02245950 ; =0x000006EE + mov r6, #6 + bl sub_02005748 + b _022457A8 +_0224579A: + mov r0, #3 + strb r0, [r4, #0xc] + ldr r0, _02245954 ; =0x000006DF + bl sub_02005748 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_022457A8: + ldr r3, _02245958 ; =0x00000107 + ldrb r1, [r5, #3] + ldr r0, [r4, #0] + add r2, r6, #0 + add r3, r4, r3 + bl ov17_02241B3C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022457C0: + ldr r1, _02245958 ; =0x00000107 + ldrb r1, [r4, r1] + cmp r1, #1 + bne _02245806 + add r0, r0, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022457D0: + add r0, r0, #1 + strb r0, [r4, #0xc] +_022457D4: + ldrb r1, [r5, #0x12] + cmp r1, #0 + beq _022457F4 + mov r0, #0 + str r0, [sp] + ldrb r2, [r5, #0x13] + add r5, #0xc + ldr r0, [r4, #0] + add r3, r5, #0 + bl ov17_02242E9C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022457F4: + mov r0, #6 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022457FC: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + beq _02245808 +_02245806: + b _02245940 +_02245808: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245812: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245816: + add r0, r4, #0 + add r0, #0xf4 + ldrb r1, [r0] + cmp r1, #0 + beq _02245838 + add r2, r4, #0 + add r3, r4, #0 + ldr r0, [r4, #0] + add r2, #0xe8 + add r3, #0xf8 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245838: + mov r0, #9 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245840: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245940 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245854: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245858: + add r0, r4, #0 + add r0, #0xf5 + ldrb r1, [r0] + cmp r1, #0 + beq _02245878 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0xee + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245878: + mov r0, #0xc + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245880: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245940 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245894: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245898: + mov r0, #0x1a + ldrsh r1, [r5, r0] + add r0, #0xea + add sp, #8 + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022458AA: + mov r3, #0x41 + lsl r3, r3, #2 + mov r2, #0x18 + ldrsh r0, [r4, r3] + ldrsh r2, [r5, r2] + cmp r0, r2 + bge _022458CA + add r0, #0xa + strh r0, [r4, r3] + ldr r0, [r4, #0] + ldrsh r3, [r4, r3] + add r0, #0xc + add r2, r7, #0 + bl ov17_02241F34 + b _022458D2 +_022458CA: + mov r0, #0x10 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022458D2: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022458DC: + mov r0, #0xd + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xd] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02245940 + mov r0, #0 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xc] + add sp, #8 + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022458F8: + ldr r0, _02245944 ; =0x00000106 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #4 + bhs _02245918 + add r0, r4, r0 + add r0, #0xf9 + ldrb r0, [r0] + cmp r0, #4 + beq _02245918 + mov r0, #0xd + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245918: + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_02245922: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #4] + bl sub_0200DA58 +_02245940: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245944: .word 0x00000106 +_02245948: .word 0x00000231 +_0224594C: .word 0x000006EF +_02245950: .word 0x000006EE +_02245954: .word 0x000006DF +_02245958: .word 0x00000107 + thumb_func_end ov17_022456E8 + + thumb_func_start ov17_0224595C +ov17_0224595C: ; 0x0224595C + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_0224595C + + thumb_func_start ov17_02245974 +ov17_02245974: ; 0x02245974 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r6] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldrb r0, [r5] + strb r0, [r4, #0xd] + ldrb r0, [r5, #1] + strb r0, [r4, #0xe] +_022459B2: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _022459B2 + ldr r0, [r5, #0] + ldr r2, _022459CC ; =0x00007530 + str r0, [r3, #0] + ldr r0, _022459D0 ; =ov17_022459D4 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022459CC: .word 0x00007530 +_022459D0: .word ov17_022459D4 + thumb_func_end ov17_02245974 + + thumb_func_start ov17_022459D4 +ov17_022459D4: ; 0x022459D4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #0xd] + add r5, r0, #0 + add r2, r4, #0 + mov r0, #0x2c + add r2, #0x24 + mul r0, r1 + add r3, r2, r0 + ldrb r0, [r4, #0xc] + cmp r0, #0xe + bls _022459EE + b _02245B26 +_022459EE: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022459FA: ; jump table + .short _02245A18 - _022459FA - 2 ; case 0 + .short _02245A28 - _022459FA - 2 ; case 1 + .short _02245A4A - _022459FA - 2 ; case 2 + .short _02245A5C - _022459FA - 2 ; case 3 + .short _02245A60 - _022459FA - 2 ; case 4 + .short _02245A84 - _022459FA - 2 ; case 5 + .short _02245A96 - _022459FA - 2 ; case 6 + .short _02245A9A - _022459FA - 2 ; case 7 + .short _02245ABE - _022459FA - 2 ; case 8 + .short _02245AD0 - _022459FA - 2 ; case 9 + .short _02245AD4 - _022459FA - 2 ; case 10 + .short _02245ADA - _022459FA - 2 ; case 11 + .short _02245B08 - _022459FA - 2 ; case 12 + .short _02245B22 - _022459FA - 2 ; case 13 + .short _02245B26 - _022459FA - 2 ; case 14 +_02245A18: + mov r0, #0x1a + ldrsh r1, [r3, r0] + add r0, #0xee + strh r1, [r4, r0] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A28: + ldrb r1, [r3, #0x12] + cmp r1, #0 + beq _02245A44 + mov r0, #0 + str r0, [sp] + ldrb r2, [r3, #0x13] + ldr r0, [r4, #0] + add r3, #0xc + bl ov17_02242E9C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A44: + mov r0, #3 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A4A: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245B44 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A5C: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245A60: + add r0, r4, #0 + add r0, #0xf8 + ldrb r1, [r0] + cmp r1, #0 + beq _02245A7E + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0xec + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A7E: + mov r0, #6 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A84: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245B44 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245A96: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245A9A: + add r0, r4, #0 + add r0, #0xf9 + ldrb r1, [r0] + cmp r1, #0 + beq _02245AB8 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0xf2 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245AB8: + mov r0, #9 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245ABE: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245B44 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245AD0: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245AD4: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245ADA: + mov r5, #0x42 + lsl r5, r5, #2 + mov r0, #0x18 + ldrsh r1, [r4, r5] + ldrsh r0, [r3, r0] + cmp r1, r0 + bge _02245AFC + add r1, #0xa + strh r1, [r4, r5] + ldr r0, [r4, #0] + ldrb r1, [r4, #0xd] + ldrb r2, [r4, #0xe] + ldrsh r3, [r4, r5] + add r0, #0xc + bl ov17_02241F34 + b _02245B00 +_02245AFC: + mov r0, #0xd + strb r0, [r4, #0xc] +_02245B00: + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245B08: + mov r0, #0xf + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #0xf] + ldrsb r0, [r4, r0] + cmp r0, #2 + ble _02245B44 + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + sub r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245B22: + add r0, r0, #1 + strb r0, [r4, #0xc] +_02245B26: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02245B44: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_022459D4 + + thumb_func_start ov17_02245B48 +ov17_02245B48: ; 0x02245B48 + push {r3, lr} + mov r0, #0xf4 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02245B48 + + thumb_func_start ov17_02245B60 +ov17_02245B60: ; 0x02245B60 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x15 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xff + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r2, #0x45 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + add r3, r4, #0 + add r3, #0x14 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + mov r2, #0x1e + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r1, [r7, #0xc] + ldr r0, _02245BBC ; =0x00000123 + ldrb r0, [r1, r0] + strb r0, [r4, #0xd] + ldrb r0, [r6, #1] + strb r0, [r4, #0xe] +_02245BA2: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02245BA2 + ldr r0, [r6, #0] + ldr r2, _02245BC0 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _02245BC4 ; =ov17_02245BC8 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245BBC: .word 0x00000123 +_02245BC0: .word 0x00007530 +_02245BC4: .word ov17_02245BC8 + thumb_func_end ov17_02245B60 + + thumb_func_start ov17_02245BC8 +ov17_02245BC8: ; 0x02245BC8 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xd] + add r2, r4, #0 + mov r1, #0x2c + add r2, #0x24 + mul r1, r0 + add r2, r2, r1 + ldrb r1, [r4, #0xc] + cmp r1, #0 + beq _02245BEC + cmp r1, #1 + beq _02245C0C + cmp r1, #2 + beq _02245C20 + b _02245C28 +_02245BEC: + mov r1, #0x18 + ldrsh r1, [r2, r1] + add r2, sp, #0 + bl ov17_0224314C + add r1, r0, #0 + ldr r0, [r4, #0] + add r2, sp, #0 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245C0C: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245C46 + ldrb r0, [r4, #0xc] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245C20: + add r0, r1, #1 + add sp, #8 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02245C28: + mov r0, #0xc3 + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02245C46: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02245BC8 + + thumb_func_start ov17_02245C4C +ov17_02245C4C: ; 0x02245C4C + push {r3, lr} + mov r1, #0xf4 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02245C4C + + thumb_func_start ov17_02245C60 +ov17_02245C60: ; 0x02245C60 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x15 + mov r1, #0x28 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x28 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02245C9C ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _02245CA0 ; =ov17_02245CA4 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245C9C: .word 0x00007530 +_02245CA0: .word ov17_02245CA4 + thumb_func_end ov17_02245C60 + + thumb_func_start ov17_02245CA4 +ov17_02245CA4: ; 0x02245CA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #3 + bhi _02245D7A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02245CC2: ; jump table + .short _02245CCA - _02245CC2 - 2 ; case 0 + .short _02245CEE - _02245CC2 - 2 ; case 1 + .short _02245D30 - _02245CC2 - 2 ; case 2 + .short _02245D7A - _02245CC2 - 2 ; case 3 +_02245CCA: + mov r1, #0 + add r0, r4, #0 + str r1, [sp] + add r0, #0x27 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #0x46 + bl ov17_022431A0 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #8 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_02245CEE: + add r7, r4, #0 + mov r5, #0 + add r6, r4, #0 + add r7, #0x23 +_02245CF6: + ldr r0, [r4, #0] + ldr r1, _02245DA0 ; =0x00000231 + add r2, r0, r5 + ldrb r1, [r2, r1] + bl ov17_0224145C + str r0, [r6, #0x10] + ldr r1, [r4, #0] + add r3, r7, r5 + str r0, [sp] + add r0, r1, #0 + add r2, r1, r5 + ldr r1, _02245DA0 ; =0x00000231 + ldrb r1, [r2, r1] + add r2, r5, #0 + bl ov17_0224331C + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #4 + blt _02245CF6 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #8 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_02245D30: + mov r7, #0 + add r6, r7, #0 + add r5, r4, #0 +_02245D36: + add r0, r4, r6 + add r0, #0x23 + ldrb r0, [r0] + cmp r0, #0 + bne _02245D4C + ldr r0, [r5, #0x10] + bl ov17_022414BC + cmp r0, #0 + bne _02245D4C + add r7, r7, #1 +_02245D4C: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _02245D36 + cmp r7, #4 + bne _02245D9C + mov r6, #0 + add r5, r4, #0 +_02245D5C: + ldr r0, [r5, #0x10] + bl ov17_02241494 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _02245D5C + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r4, #0x20 + add sp, #8 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_02245D7A: + add r0, r4, #0 + add r0, #0x27 + ldrb r0, [r0] + cmp r0, #1 + bne _02245D9C + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02245D9C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245DA0: .word 0x00000231 + thumb_func_end ov17_02245CA4 + + thumb_func_start ov17_02245DA4 +ov17_02245DA4: ; 0x02245DA4 + push {r3, lr} + mov r0, #0xf8 + str r0, [sp] + mov r0, #0xc3 + lsl r0, r0, #4 + lsl r2, r2, #0x10 + add r0, r1, r0 + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + thumb_func_end ov17_02245DA4 + + thumb_func_start ov17_02245DBC +ov17_02245DBC: ; 0x02245DBC + push {r4, r5, r6, lr} + mov r0, #0x23 + add r5, r1, #0 + lsl r0, r0, #4 + add r4, r2, #0 + add r6, r5, r0 + mov r2, #0x1f +_02245DCA: + ldmia r3!, {r0, r1} + stmia r6!, {r0, r1} + sub r2, r2, #1 + bne _02245DCA + add r0, r5, #0 + add r0, #0xc + bl ov17_02241EF0 + add r0, r5, #0 + add r0, #0xc + bl ov17_022430F8 + add r0, r5, #0 + bl ov17_02242FE8 + add r0, r5, #0 + bl ov17_02241428 + mov r0, #0xc3 + lsl r0, r0, #4 + mov r2, #0 + add r0, r5, r0 + add r1, r4, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r4, r5, r6, pc} + thumb_func_end ov17_02245DBC + + thumb_func_start ov17_02245E00 +ov17_02245E00: ; 0x02245E00 + push {r3, lr} + mov r1, #0xf4 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02245E00 + + thumb_func_start ov17_02245E14 +ov17_02245E14: ; 0x02245E14 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x15 + mov r1, #0x20 + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _02245E84 ; =0x00007530 + str r0, [r4, #0] + ldrh r0, [r6] + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] + ldrb r0, [r5] + strb r0, [r4, #0x11] + add r0, r5, #0 + add r0, #0xd8 + ldrh r0, [r0] + strh r0, [r4, #0x14] + add r0, r5, #0 + add r0, #0xda + ldrh r0, [r0] + strh r0, [r4, #0x16] + add r0, r5, #0 + add r0, #0xdc + ldrh r0, [r0] + strh r0, [r4, #0x18] + add r0, r5, #0 + add r0, #0xe4 + ldrb r0, [r0] + strb r0, [r4, #0x1a] + add r0, r5, #0 + add r0, #0xe7 + ldrb r0, [r0] + add r5, #0xe6 + strb r0, [r4, #0x1c] + ldrb r0, [r5] + strb r0, [r4, #0x1b] + ldr r0, _02245E88 ; =ov17_02245E8C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245E84: .word 0x00007530 +_02245E88: .word ov17_02245E8C + thumb_func_end ov17_02245E14 + + thumb_func_start ov17_02245E8C +ov17_02245E8C: ; 0x02245E8C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02245EA2 + cmp r0, #1 + beq _02245EC2 + cmp r0, #2 + beq _02245ED4 + b _02245EF8 +_02245EA2: + ldrb r1, [r4, #0x1a] + cmp r1, #0 + beq _02245EBC + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0x14 + mov r3, #0 + bl ov17_02242E5C + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02245EBC: + mov r0, #0x64 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02245EC2: + ldr r0, [r4, #0] + bl ov17_02242ECC + cmp r0, #0 + bne _02245F10 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02245ED4: + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] + ldrb r0, [r4, #0x1c] + cmp r0, #1 + bne _02245EE8 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02245EE8: + ldrb r1, [r4, #0x12] + ldrb r0, [r4, #0x1b] + cmp r1, r0 + blo _02245F10 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02245EF8: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02245F10: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02245E8C + + .rodata + + + .global Unk_ov17_022539E4 +Unk_ov17_022539E4: ; 0x022539E4 + .incbin "incbin/overlay17_rodata.bin", 0xC58, 0x108 + diff --git a/asm/ov17_02245F14.s b/asm/ov17_02245F14.s new file mode 100644 index 000000000..17879d6e1 --- /dev/null +++ b/asm/ov17_02245F14.s @@ -0,0 +1,2202 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02245F14 +ov17_02245F14: ; 0x02245F14 + strb r1, [r0, #0x12] + ldr r1, _02245F40 ; =0x00007530 + strb r2, [r0, #0x13] + cmp r3, r1 + beq _02245F20 + strb r3, [r0, #0xc] +_02245F20: + ldr r2, [sp] + ldr r1, _02245F40 ; =0x00007530 + cmp r2, r1 + beq _02245F2A + strb r2, [r0, #0xd] +_02245F2A: + ldr r2, [sp, #4] + ldr r1, _02245F40 ; =0x00007530 + cmp r2, r1 + beq _02245F34 + strh r2, [r0, #0xe] +_02245F34: + ldr r2, [sp, #8] + ldr r1, _02245F40 ; =0x00007530 + cmp r2, r1 + beq _02245F3E + strb r2, [r0, #0x10] +_02245F3E: + bx lr + ; .align 2, 0 +_02245F40: .word 0x00007530 + thumb_func_end ov17_02245F14 + + thumb_func_start ov17_02245F44 +ov17_02245F44: ; 0x02245F44 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x26 + add r5, r1, #0 + lsl r0, r0, #4 + add r4, r6, r0 + add r3, r5, #0 + mov r2, #0x19 +_02245F54: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02245F54 + add r0, r5, #0 + bl ov17_02246540 + add r0, r5, #0 + mov r1, #0 + mov r2, #0xb0 + bl sub_020C4CF4 + mov r4, #0 + add r7, r6, #0 +_02245F70: + add r1, r5, #0 + add r0, r6, #0 + add r1, #0xc + add r2, r4, #0 + bl ov17_02243120 + ldr r0, _02245FAC ; =0x0000023E + add r1, r6, r4 + ldrb r0, [r1, r0] + mov r1, #0xa + strb r0, [r5, #3] + ldr r0, _02245FB0 ; =0x00000236 + ldrh r0, [r7, r0] + strh r0, [r5] + bl sub_020790C4 + strb r0, [r5, #2] + mov r0, #0x23 + lsl r0, r0, #4 + add r0, r6, r0 + add r1, r4, #0 + bl ov17_02243AC4 + strb r0, [r5, #9] + add r4, r4, #1 + add r5, #0x2c + add r7, r7, #2 + cmp r4, #4 + blt _02245F70 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245FAC: .word 0x0000023E +_02245FB0: .word 0x00000236 + thumb_func_end ov17_02245F44 + + thumb_func_start ov17_02245FB4 +ov17_02245FB4: ; 0x02245FB4 + push {r4, r5, r6, r7} + add r3, r1, #0 + ldr r5, _0224600C ; =0xFFFFFCFF + ldr r6, _02246010 ; =0xFFFFF3FF + add r4, r0, #0 + mov r1, #0 + add r2, r3, #0 +_02245FC2: + ldr r7, [r2, #0x28] + add r1, r1, #1 + add r0, r7, #0 + lsl r7, r7, #0x1a + lsr r7, r7, #0x1e + lsl r7, r7, #0x1e + and r0, r5 + lsr r7, r7, #0x16 + orr r7, r0 + add r0, r7, #0 + lsl r7, r7, #0x18 + lsr r7, r7, #0x1e + lsl r7, r7, #0x1e + and r0, r6 + lsr r7, r7, #0x14 + orr r0, r7 + str r0, [r2, #0x28] + add r2, #0x2c + cmp r1, #4 + blt _02245FC2 + ldr r1, _02246014 ; =0x00000252 + mov r0, #0 + add r5, r1, #0 +_02245FF0: + add r7, r4, r0 + ldrsb r6, [r7, r1] + add r2, r3, r0 + add r2, #0xc0 + strb r6, [r2] + add r2, r3, r0 + ldrsb r6, [r7, r5] + add r2, #0xc3 + add r0, r0, #1 + strb r6, [r2] + cmp r0, #3 + blt _02245FF0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_0224600C: .word 0xFFFFFCFF +_02246010: .word 0xFFFFF3FF +_02246014: .word 0x00000252 + thumb_func_end ov17_02245FB4 + + thumb_func_start ov17_02246018 +ov17_02246018: ; 0x02246018 + push {r4, r5, r6, r7} + mov r5, #0 + ldr r2, _02246040 ; =0x00000252 + add r3, r5, #0 +_02246020: + add r7, r1, r5 + mov r6, #0xc3 + ldrsb r7, [r7, r6] + ldr r6, _02246040 ; =0x00000252 + add r4, r0, r5 + strb r7, [r4, r6] + ldrsb r6, [r4, r2] + cmp r6, #0x32 + blt _02246036 + ldr r6, _02246040 ; =0x00000252 + strb r3, [r4, r6] +_02246036: + add r5, r5, #1 + cmp r5, #3 + blt _02246020 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_02246040: .word 0x00000252 + thumb_func_end ov17_02246018 + + thumb_func_start ov17_02246044 +ov17_02246044: ; 0x02246044 + push {r3, r4, r5, r6, r7, lr} + ldr r7, _0224608C ; =0x00000242 + mov ip, r1 + add r5, r7, #0 + mov lr, r0 + mov r1, #0 + mov r2, ip + add r3, r0, #0 + mov r6, #0x18 + add r5, #8 +_02246058: + ldr r0, _0224608C ; =0x00000242 + mov r4, #0x18 + ldrsh r0, [r3, r0] + ldrsh r4, [r2, r4] + add r1, r1, #1 + add r0, r0, r4 + strh r0, [r3, r7] + ldrsh r0, [r2, r6] + add r2, #0x2c + strh r0, [r3, r5] + add r3, r3, #2 + cmp r1, #4 + blt _02246058 + mov r1, #0x26 + lsl r1, r1, #4 + mov r0, lr + add r4, r0, r1 + mov r3, #0x19 +_0224607C: + mov r2, ip + ldmia r2!, {r0, r1} + mov ip, r2 + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _0224607C + pop {r3, r4, r5, r6, r7, pc} + nop +_0224608C: .word 0x00000242 + thumb_func_end ov17_02246044 + + thumb_func_start ov17_02246090 +ov17_02246090: ; 0x02246090 + push {r3, r4} + mov r2, #0x2c + mul r2, r1 + add r2, r0, r2 + mov r1, #0x18 + ldrsh r1, [r2, r1] + mov r4, #0 + strh r1, [r2, #0x1a] + strh r4, [r2, #0x1e] + strh r4, [r2, #0x20] + mov r1, #0xc3 +_022460A6: + add r3, r0, r4 + ldrsb r2, [r3, r1] + add r3, #0xc0 + add r4, r4, #1 + strb r2, [r3] + cmp r4, #3 + blt _022460A6 + mov r2, #0 + add r1, r2, #0 +_022460B8: + strb r1, [r0, #0x14] + strb r1, [r0, #0x12] + add r2, r2, #1 + add r0, #0x2c + cmp r2, #4 + blt _022460B8 + pop {r3, r4} + bx lr + thumb_func_end ov17_02246090 + + thumb_func_start ov17_022460C8 +ov17_022460C8: ; 0x022460C8 + mov r3, #0 + mov r1, #0x18 +_022460CC: + ldrsh r2, [r0, r1] + add r3, r3, #1 + strh r2, [r0, #0x1c] + add r0, #0x2c + cmp r3, #4 + blt _022460CC + bx lr + ; .align 2, 0 + thumb_func_end ov17_022460C8 + + thumb_func_start ov17_022460DC +ov17_022460DC: ; 0x022460DC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r2, #0 + add r0, r5, #0 + add r1, r7, #0 + bl ov17_02246090 + mov r0, #0x2c + add r4, r7, #0 + mul r4, r0 + add r6, r5, #2 + ldrb r0, [r6, r4] + ldr r1, _0224612C ; =0x02253AFD + lsl r2, r0, #3 + ldrb r1, [r1, r2] + cmp r1, #0 + bne _02246126 + mov r1, #4 + add r2, sp, #0x10 + add r3, sp, #0xc + bl sub_02095790 + ldr r1, [sp, #0x10] + ldr r0, _02246130 ; =0x0000FFFF + cmp r1, r0 + beq _02246126 + ldr r0, _02246134 ; =0x00007530 + mov r2, #4 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldrb r1, [r6, r4] + add r0, r5, r4 + add r3, r7, #0 + bl ov17_02245F14 +_02246126: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0224612C: .word 0x02253AFD +_02246130: .word 0x0000FFFF +_02246134: .word 0x00007530 + thumb_func_end ov17_022460DC + + thumb_func_start ov17_02246138 +ov17_02246138: ; 0x02246138 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_02246090 + add r4, r6, #0 + mov r0, #0x2c + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #2] + add r6, r5, #4 + bl sub_02095734 + strb r0, [r6, r4] + ldrb r1, [r6, r4] + add r0, r5, r4 + strh r1, [r0, #0x18] + pop {r4, r5, r6, pc} + thumb_func_end ov17_02246138 + + thumb_func_start ov17_02246160 +ov17_02246160: ; 0x02246160 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + str r0, [sp, #4] + str r2, [sp, #8] + add r0, r7, #0 + add r1, r2, #0 + str r3, [sp, #0xc] + bl ov17_02246090 + ldr r0, [sp, #8] + mov r1, #0x2c + add r4, r0, #0 + mul r4, r1 + add r0, r7, r4 + ldrb r0, [r0, #2] + lsl r6, r0, #3 + ldr r0, _0224621C ; =0x02253AFC + ldrb r0, [r0, r6] + cmp r0, #3 + bne _022461B6 + ldr r0, [sp, #0xc] + ldr r5, _02246220 ; =0x02253AF8 + str r0, [sp] + ldr r2, [sp, #8] + ldr r0, [sp, #4] + ldr r5, [r5, r6] + add r1, r7, #0 + add r3, r2, #0 + blx r5 + add r2, r7, #0 + mov r0, #1 + add r3, r7, r4 + strb r0, [r3, #0x14] + mov r0, #0x1e + add r2, #0x18 + mov r5, #0x20 + ldrsh r0, [r3, r0] + ldrsh r3, [r3, r5] + ldrsh r1, [r2, r4] + add r0, r0, r3 + add r0, r1, r0 + strh r0, [r2, r4] +_022461B6: + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + cmp r0, #0 + blt _02246218 +_022461C0: + ldr r1, [sp, #4] + ldr r0, [sp, #0x10] + add r1, r1, r0 + ldr r0, _02246224 ; =0x00000231 + ldrb r5, [r1, r0] + mov r0, #0x2c + mul r0, r5 + add r4, r7, r0 + ldrb r0, [r4, #2] + lsl r1, r0, #3 + ldr r0, _02246220 ; =0x02253AF8 + add r0, r0, r1 + ldrb r0, [r0, #4] + cmp r0, #2 + bne _0224620C + add r0, r7, #0 + add r1, r5, #0 + bl ov17_02246090 + ldr r0, [sp, #0xc] + add r3, r5, #0 + str r0, [sp] + ldrb r5, [r4, #2] + ldr r0, [sp, #4] + ldr r2, [sp, #8] + lsl r6, r5, #3 + ldr r5, _02246220 ; =0x02253AF8 + add r1, r7, #0 + ldr r5, [r5, r6] + blx r5 + mov r0, #1 + strb r0, [r4, #0x14] + mov r0, #0x18 + ldrsh r1, [r4, r0] + mov r0, #0x1e + ldrsh r0, [r4, r0] + add r0, r1, r0 + strh r0, [r4, #0x18] +_0224620C: + ldr r0, [sp, #0x10] + ldr r1, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, r1 + ble _022461C0 +_02246218: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224621C: .word 0x02253AFC +_02246220: .word 0x02253AF8 +_02246224: .word 0x00000231 + thumb_func_end ov17_02246160 + + thumb_func_start ov17_02246228 +ov17_02246228: ; 0x02246228 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r6, r2, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_02246090 + add r7, r5, #0 + lsl r0, r6, #2 + add r7, #0xb0 + str r0, [sp, #0xc] + ldr r0, [r7, r0] + lsl r0, r0, #8 + lsr r0, r0, #0x18 + beq _0224627E + mov r0, #0x2c + add r4, r6, #0 + mul r4, r0 + add r1, r5, r4 + mov r0, #0x18 + ldrsh r0, [r1, r0] + add r1, r5, #0 + add r1, #0x1e + ldrsh r2, [r1, r4] + add r2, r2, r0 + strh r2, [r1, r4] + mov r1, #0xa + bl sub_020E1F6C + ldr r1, _022462A0 ; =0x00007530 + mov r2, #0 + str r1, [sp] + str r1, [sp, #4] + str r0, [sp, #8] + ldr r1, [sp, #0xc] + add r0, r5, r4 + ldr r1, [r7, r1] + add r3, r6, #0 + lsl r1, r1, #8 + lsr r1, r1, #0x18 + bl ov17_02245F14 +_0224627E: + mov r0, #0x2c + add r2, r6, #0 + add r1, r5, #0 + mul r2, r0 + add r1, #0x18 + add r5, r5, r2 + mov r3, #0x1e + ldrsh r4, [r5, r3] + mov r3, #0x20 + ldrsh r3, [r5, r3] + ldrsh r0, [r1, r2] + add r3, r4, r3 + add r0, r0, r3 + strh r0, [r1, r2] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022462A0: .word 0x00007530 + thumb_func_end ov17_02246228 + + thumb_func_start ov17_022462A4 +ov17_022462A4: ; 0x022462A4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r2, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + str r3, [sp, #8] + bl ov17_02246090 + mov r0, #0x2c + add r4, r6, #0 + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #2] + lsl r7, r0, #3 + ldr r0, _022462FC ; =0x02253AFC + ldrb r0, [r0, r7] + cmp r0, #4 + bne _022462F4 + ldr r0, [sp, #8] + add r2, r6, #0 + add r3, r6, #0 + ldr r6, _02246300 ; =0x02253AF8 + str r0, [sp] + ldr r0, [sp, #4] + ldr r6, [r6, r7] + add r1, r5, #0 + blx r6 + add r3, r5, r4 + mov r0, #1 + strb r0, [r3, #0x14] + add r5, #0x18 + mov r1, #0x1e + ldrsh r2, [r5, r4] + ldrsh r1, [r3, r1] + add sp, #0xc + add r1, r2, r1 + strh r1, [r5, r4] + pop {r4, r5, r6, r7, pc} +_022462F4: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022462FC: .word 0x02253AFC +_02246300: .word 0x02253AF8 + thumb_func_end ov17_022462A4 + + thumb_func_start ov17_02246304 +ov17_02246304: ; 0x02246304 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r2, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + str r3, [sp, #8] + bl ov17_02246090 + mov r0, #0x2c + add r4, r6, #0 + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #2] + lsl r7, r0, #3 + ldr r0, _0224635C ; =0x02253AFC + ldrb r0, [r0, r7] + cmp r0, #5 + bne _02246354 + ldr r0, [sp, #8] + add r2, r6, #0 + add r3, r6, #0 + ldr r6, _02246360 ; =0x02253AF8 + str r0, [sp] + ldr r0, [sp, #4] + ldr r6, [r6, r7] + add r1, r5, #0 + blx r6 + add r3, r5, r4 + mov r0, #1 + strb r0, [r3, #0x14] + add r5, #0x18 + mov r1, #0x1e + ldrsh r2, [r5, r4] + ldrsh r1, [r3, r1] + add sp, #0xc + add r1, r2, r1 + strh r1, [r5, r4] + pop {r4, r5, r6, r7, pc} +_02246354: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224635C: .word 0x02253AFC +_02246360: .word 0x02253AF8 + thumb_func_end ov17_02246304 + + thumb_func_start ov17_02246364 +ov17_02246364: ; 0x02246364 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r2, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + str r3, [sp, #8] + bl ov17_02246090 + mov r0, #0x2c + add r4, r6, #0 + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #2] + lsl r7, r0, #3 + ldr r0, _022463BC ; =0x02253AFC + ldrb r0, [r0, r7] + cmp r0, #6 + bne _022463B4 + ldr r0, [sp, #8] + add r2, r6, #0 + add r3, r6, #0 + ldr r6, _022463C0 ; =0x02253AF8 + str r0, [sp] + ldr r0, [sp, #4] + ldr r6, [r6, r7] + add r1, r5, #0 + blx r6 + add r3, r5, r4 + mov r0, #1 + strb r0, [r3, #0x14] + add r5, #0x18 + mov r1, #0x1e + ldrsh r2, [r5, r4] + ldrsh r1, [r3, r1] + add sp, #0xc + add r1, r2, r1 + strh r1, [r5, r4] + pop {r4, r5, r6, r7, pc} +_022463B4: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022463BC: .word 0x02253AFC +_022463C0: .word 0x02253AF8 + thumb_func_end ov17_02246364 + + thumb_func_start ov17_022463C4 +ov17_022463C4: ; 0x022463C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + str r0, [sp] + add r0, r4, #0 + add r1, r2, #0 + str r2, [sp, #4] + add r7, r3, #0 + bl ov17_02246090 + mov r0, #0 + strb r0, [r7, #0xc] + strb r0, [r7, #0xd] + ldr r1, [sp] + ldr r0, [sp, #4] + mov r6, #0x2c + add r1, r1, r0 + ldr r0, _02246510 ; =0x0000023E + ldrb r5, [r1, r0] + ldr r0, [sp] + ldr r3, [r0, #0] + ldr r0, [sp, #4] + add r2, r5, #0 + add r1, r0, #0 + mul r1, r6 + add r0, r4, r1 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0xf3 + str r1, [sp, #0x10] + add r6, #0xf2 + ldrb r0, [r3, r0] + ldrh r1, [r4, r1] + ldrb r3, [r3, r6] + bl ov17_02243AF0 + add r6, r0, #0 + cmp r6, #0 + ble _02246432 + ldr r0, [sp, #0xc] + ldr r0, [r0, #0x28] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + bne _02246432 + add r0, r4, #0 + add r0, #0xc3 + ldrsb r1, [r0, r5] + add r1, r1, r6 + strb r1, [r0, r5] + ldrsb r1, [r0, r5] + cmp r1, #0x32 + blt _0224645E + mov r1, #0x32 + strb r1, [r0, r5] + b _0224645E +_02246432: + cmp r6, #0 + bge _0224645C + ldr r0, [sp, #0xc] + ldr r0, [r0, #0x28] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + bne _0224645C + add r0, r4, #0 + add r0, #0xc3 + add r1, r0, r5 + ldrsb r0, [r0, r5] + cmp r0, #0 + ble _0224645C + add r0, r0, r6 + mov r2, #0 + strb r0, [r1] + ldrsb r0, [r1, r2] + cmp r0, #0 + bgt _0224645E + strb r2, [r1] + b _0224645E +_0224645C: + mov r6, #0 +_0224645E: + add r1, r4, #0 + add r1, #0xc3 + add r0, r1, r5 + str r0, [sp, #8] + ldrsb r0, [r1, r5] + cmp r0, #0x32 + blt _0224648A + ldr r0, [sp] + ldr r1, [r0, #0] + ldr r0, _02246514 ; =0x0000011E + ldrb r0, [r1, r0] + cmp r5, r0 + bne _02246482 + ldr r0, [sp, #0x10] + mov r1, #0x50 + add r0, r4, r0 + strb r1, [r0, #8] + b _0224648A +_02246482: + ldr r0, [sp, #0x10] + mov r1, #0x32 + add r0, r4, r0 + strb r1, [r0, #8] +_0224648A: + add r0, r4, #0 + ldr r1, [sp, #0x10] + add r0, #8 + add r5, r0, r1 + ldrsb r0, [r0, r1] + mov r1, #0xa + bl sub_020E1F6C + strb r0, [r7, #0xa] + cmp r6, #0 + ble _022464E4 + ldr r0, [sp, #0xc] + mov r1, #0xb + ldrh r0, [r0] + bl sub_020790C4 + bl ov17_02243970 + strb r0, [r7, #0xc] + ldr r0, [sp, #8] + mov r1, #0 + ldrsb r0, [r0, r1] + mov r1, #0xa + bl sub_020E1F6C + cmp r0, #5 + bhi _022464F6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022464CC: ; jump table + .short _022464F6 - _022464CC - 2 ; case 0 + .short _022464F6 - _022464CC - 2 ; case 1 + .short _022464F6 - _022464CC - 2 ; case 2 + .short _022464F6 - _022464CC - 2 ; case 3 + .short _022464D8 - _022464CC - 2 ; case 4 + .short _022464DE - _022464CC - 2 ; case 5 +_022464D8: + mov r0, #0x19 + strb r0, [r7, #0xd] + b _022464F6 +_022464DE: + mov r0, #0x1a + strb r0, [r7, #0xd] + b _022464F6 +_022464E4: + bge _022464F6 + ldr r0, [sp, #0xc] + mov r1, #0xb + ldrh r0, [r0] + bl sub_020790C4 + bl ov17_0224399C + strb r0, [r7, #0xc] +_022464F6: + ldr r0, [sp, #4] + mov r1, #0x2c + add r2, r0, #0 + mov r0, #0 + add r4, #0x18 + mul r2, r1 + ldrsh r1, [r4, r2] + ldrsb r0, [r5, r0] + add r0, r1, r0 + strh r0, [r4, r2] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02246510: .word 0x0000023E +_02246514: .word 0x0000011E + thumb_func_end ov17_022463C4 + + thumb_func_start ov17_02246518 +ov17_02246518: ; 0x02246518 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov17_02246090 + mov r0, #0x2c + add r4, r6, #0 + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #9] + bl ov17_02243AE4 + add r5, #0x18 + ldrsh r1, [r5, r4] + add r0, r1, r0 + strh r0, [r5, r4] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02246518 + + thumb_func_start ov17_02246540 +ov17_02246540: ; 0x02246540 + push {r3, r4, r5, r6} + add r3, r0, #0 + ldr r4, _02246570 ; =0xFFFF0000 + ldr r5, _02246574 ; =0xFF00FFFF + mov r2, #0 + add r3, #0xb0 +_0224654C: + ldr r1, [r3, #0] + add r2, r2, #1 + and r1, r4 + str r1, [r3, #0] + ldr r6, [r0, #0x28] + and r1, r5 + lsl r6, r6, #0xc + lsr r6, r6, #0x18 + lsl r6, r6, #0x18 + lsr r6, r6, #8 + orr r1, r6 + add r0, #0x2c + stmia r3!, {r1} + cmp r2, #4 + blt _0224654C + pop {r3, r4, r5, r6} + bx lr + nop +_02246570: .word 0xFFFF0000 +_02246574: .word 0xFF00FFFF + thumb_func_end ov17_02246540 + + thumb_func_start ov17_02246578 +ov17_02246578: ; 0x02246578 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r0, #4 + str r3, [sp, #0xc] + mov ip, r0 + add r7, r1, #0 + mov r0, #0 + add r2, sp, #0x10 + mov r3, #0xff +_0224658A: + ldr r4, [r1, #0x28] + lsl r5, r4, #0x1a + lsr r5, r5, #0x1e + bne _02246596 + strb r3, [r2] + b _022465AA +_02246596: + cmp r5, #1 + bne _022465A2 + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + bne _022465A2 + mov ip, r0 +_022465A2: + ldr r4, [r1, #0x28] + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + strb r4, [r2] +_022465AA: + add r0, r0, #1 + add r1, #0x2c + add r2, r2, #1 + cmp r0, #4 + blt _0224658A + ldr r0, [sp, #0xc] + mov r1, #0xff + add r6, sp, #0x10 + strb r1, [r6, r0] + mov r4, #0 +_022465BE: + mov r1, #0 + add r2, r6, #0 + add r3, r7, #0 +_022465C4: + ldrb r0, [r2] + cmp r0, #0xff + beq _022465E0 + cmp r4, r0 + bne _022465E0 + ldr r5, [r3, #0x28] + lsl r5, r5, #0x18 + lsr r5, r5, #0x1e + cmp r0, r5 + bne _022465E0 + ldrb r0, [r6, r1] + add r0, r0, #1 + strb r0, [r6, r1] + b _022465EA +_022465E0: + add r1, r1, #1 + add r2, r2, #1 + add r3, #0x2c + cmp r1, #4 + blt _022465C4 +_022465EA: + cmp r1, #4 + beq _022465F4 + add r4, r4, #1 + cmp r4, #4 + blt _022465BE +_022465F4: + mov r3, #0 + add r1, sp, #0x10 + add r2, r7, #0 + mov r4, #0xc0 +_022465FC: + ldrb r5, [r1] + cmp r5, #0xff + beq _0224660E + ldr r0, [r2, #0x28] + lsl r5, r5, #0x1e + bic r0, r4 + lsr r5, r5, #0x18 + orr r0, r5 + str r0, [r2, #0x28] +_0224660E: + add r3, r3, #1 + add r1, r1, #1 + add r2, #0x2c + cmp r3, #4 + blt _022465FC + ldr r0, [sp, #0xc] + mov r1, #0x2c + mul r1, r0 + add r0, r7, r1 + ldr r2, [r0, #0x28] + mov r1, #0x30 + bic r2, r1 + mov r1, #0x10 + orr r2, r1 + mov r1, #0xc0 + bic r2, r1 + mov r1, ip + str r2, [r0, #0x28] + cmp r1, #4 + beq _0224664C + mov r1, ip + str r1, [sp] + ldr r1, _02246664 ; =0x00007530 + ldr r3, [sp, #0xc] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #1 + bl ov17_02245F14 + b _0224665E +_0224664C: + ldr r1, _02246664 ; =0x00007530 + ldr r3, [sp, #0xc] + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 +_0224665E: + mov r0, #1 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246664: .word 0x00007530 + thumb_func_end ov17_02246578 + + thumb_func_start ov17_02246668 +ov17_02246668: ; 0x02246668 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r0, #4 + str r3, [sp, #0xc] + mov ip, r0 + add r7, r1, #0 + mov r0, #0 + add r2, sp, #0x10 + mov r3, #0xff +_0224667A: + ldr r4, [r1, #0x28] + lsl r5, r4, #0x1a + lsr r5, r5, #0x1e + bne _02246686 + strb r3, [r2] + b _0224669C +_02246686: + cmp r5, #2 + bne _02246694 + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + cmp r4, #3 + bne _02246694 + mov ip, r0 +_02246694: + ldr r4, [r1, #0x28] + lsl r4, r4, #0x18 + lsr r4, r4, #0x1e + strb r4, [r2] +_0224669C: + add r0, r0, #1 + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + add r1, #0x2c + add r2, r2, #1 + cmp r0, #4 + blt _0224667A + ldr r0, [sp, #0xc] + mov r1, #0xff + add r6, sp, #0x10 + strb r1, [r6, r0] + mov r4, #3 +_022466B4: + mov r1, #0 + add r2, r6, #0 + add r3, r7, #0 +_022466BA: + ldrb r0, [r2] + cmp r0, #0xff + beq _022466D6 + cmp r4, r0 + bne _022466D6 + ldr r5, [r3, #0x28] + lsl r5, r5, #0x18 + lsr r5, r5, #0x1e + cmp r0, r5 + bne _022466D6 + ldrb r0, [r6, r1] + sub r0, r0, #1 + strb r0, [r6, r1] + b _022466E4 +_022466D6: + add r0, r1, #1 + lsl r0, r0, #0x18 + asr r1, r0, #0x18 + add r2, r2, #1 + add r3, #0x2c + cmp r1, #4 + blt _022466BA +_022466E4: + cmp r1, #4 + beq _022466F6 + sub r0, r4, #1 + lsl r0, r0, #0x18 + asr r4, r0, #0x18 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bgt _022466B4 +_022466F6: + mov r3, #0 + add r1, sp, #0x10 + add r2, r7, #0 + mov r4, #0xc0 +_022466FE: + ldrb r5, [r1] + cmp r5, #0xff + beq _02246710 + ldr r0, [r2, #0x28] + lsl r5, r5, #0x1e + bic r0, r4 + lsr r5, r5, #0x18 + orr r0, r5 + str r0, [r2, #0x28] +_02246710: + add r0, r3, #1 + lsl r0, r0, #0x18 + asr r3, r0, #0x18 + add r1, r1, #1 + add r2, #0x2c + cmp r3, #4 + blt _022466FE + ldr r0, [sp, #0xc] + mov r1, #0x2c + mul r1, r0 + add r0, r7, r1 + ldr r2, [r0, #0x28] + mov r1, #0x30 + bic r2, r1 + mov r1, #0x20 + orr r2, r1 + mov r1, #0xc0 + bic r2, r1 + mov r1, #0xc0 + orr r1, r2 + str r1, [r0, #0x28] + mov r1, ip + cmp r1, #4 + bne _02246754 + ldr r1, _02246770 ; =0x00007530 + ldr r3, [sp, #0xc] + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + b _02246768 +_02246754: + mov r1, ip + str r1, [sp] + ldr r1, _02246770 ; =0x00007530 + ldr r3, [sp, #0xc] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #1 + bl ov17_02245F14 +_02246768: + mov r0, #1 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02246770: .word 0x00007530 + thumb_func_end ov17_02246668 + + thumb_func_start ov17_02246774 +ov17_02246774: ; 0x02246774 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, r4, #0 + mov r0, #0x2c + add r7, r3, #0 + mul r3, r0 + add r2, #9 + add r1, #0x1e + ldrb r6, [r2, r3] + mov r5, #0x14 + ldrsh r0, [r1, r3] + mul r5, r6 + add r0, r0, r5 + strh r0, [r1, r3] + ldrb r0, [r2, r3] + cmp r0, #0 + beq _022467A2 + cmp r0, #1 + beq _022467A6 + cmp r0, #2 + beq _022467AA + b _022467AE +_022467A2: + mov r2, #0 + b _022467B0 +_022467A6: + mov r2, #1 + b _022467B0 +_022467AA: + mov r2, #2 + b _022467B0 +_022467AE: + mov r2, #3 +_022467B0: + ldr r0, _022467C8 ; =0x00007530 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r4, r3 + ldrb r1, [r0, #2] + add r3, r7, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022467C8: .word 0x00007530 + thumb_func_end ov17_02246774 + + thumb_func_start ov17_022467CC +ov17_022467CC: ; 0x022467CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r3, [sp, #0xc] + ldr r3, [r0, #0] + ldr r0, [sp, #0xc] + mov r6, #0x2c + add r4, r0, #0 + add r0, r6, #0 + mul r4, r6 + add r5, r1, #0 + add r7, r5, r4 + add r0, #0xf3 + add r6, #0xf2 + ldrb r0, [r3, r0] + ldrh r1, [r5, r4] + ldrb r2, [r7, #3] + ldrb r3, [r3, r6] + bl ov17_02243AF0 + cmp r0, #0 + ble _02246824 + ldr r0, [r7, #0x28] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + bne _02246824 + add r1, r5, #0 + add r1, #0x1e + ldrsh r0, [r1, r4] + ldr r2, _0224682C ; =0x00007530 + ldr r3, [sp, #0xc] + add r0, #0x14 + strh r0, [r1, r4] + str r2, [sp] + ldrh r1, [r5, r4] + add r0, r7, #0 + str r1, [sp, #4] + str r2, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02246824: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224682C: .word 0x00007530 + thumb_func_end ov17_022467CC + + thumb_func_start ov17_02246830 +ov17_02246830: ; 0x02246830 + mov r0, #1 + bx lr + thumb_func_end ov17_02246830 + + thumb_func_start ov17_02246834 +ov17_02246834: ; 0x02246834 + push {r3, r4, lr} + sub sp, #0xc + mov r0, #0x2c + add r4, r3, #0 + mul r4, r0 + add r0, r1, r4 + ldrb r2, [r0, #9] + cmp r2, #0 + bne _02246860 + add r1, #0x1e + ldrsh r2, [r1, r4] + add r2, #0x1e + strh r2, [r1, r4] + ldr r1, _02246878 ; =0x00007530 + mov r2, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + bl ov17_02245F14 + b _02246870 +_02246860: + ldr r1, _02246878 ; =0x00007530 + mov r2, #1 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + bl ov17_02245F14 +_02246870: + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + nop +_02246878: .word 0x00007530 + thumb_func_end ov17_02246834 + + thumb_func_start ov17_0224687C +ov17_0224687C: ; 0x0224687C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + lsl r4, r3, #1 + add r2, r1, #0 + add r4, r0, r4 + ldr r0, _022468C8 ; =0x00000256 + mov r1, #0x2c + add r7, r3, #0 + mul r7, r1 + ldrh r1, [r2, r7] + ldrh r0, [r4, r0] + cmp r1, r0 + beq _022468C2 + add r6, r2, #0 + add r6, #0xb0 + lsl r5, r3, #2 + lsl r1, r1, #0x10 + ldr r4, [r6, r5] + ldr r0, _022468CC ; =0xFFFF0000 + lsr r1, r1, #0x10 + and r0, r4 + orr r0, r1 + str r0, [r6, r5] + ldr r0, _022468D0 ; =0x00007530 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r2, r7 + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022468C2: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022468C8: .word 0x00000256 +_022468CC: .word 0xFFFF0000 +_022468D0: .word 0x00007530 + thumb_func_end ov17_0224687C + + thumb_func_start ov17_022468D4 +ov17_022468D4: ; 0x022468D4 + push {r4, r5, lr} + sub sp, #0xc + mov r0, #0x2c + add r4, r3, #0 + add r5, r1, #0 + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #3] + add r2, r5, #0 + add r2, #0x1e + add r1, r5, r0 + mov r0, #0xc0 + ldrsb r0, [r1, r0] + ldrsh r1, [r2, r4] + add r1, r1, r0 + strh r1, [r2, r4] + mov r1, #0xa + bl sub_020E1F6C + ldr r3, _02246914 ; =0x00007530 + mov r2, #0 + str r3, [sp] + str r3, [sp, #4] + str r0, [sp, #8] + add r0, r5, r4 + ldrb r1, [r0, #2] + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + nop +_02246914: .word 0x00007530 + thumb_func_end ov17_022468D4 + + thumb_func_start ov17_02246918 +ov17_02246918: ; 0x02246918 + push {r3, r4, lr} + sub sp, #0xc + mov r0, #0x2c + add r4, r3, #0 + mul r4, r0 + add r0, r1, r4 + ldrb r2, [r0, #9] + cmp r2, #3 + bne _02246944 + add r1, #0x1e + ldrsh r2, [r1, r4] + add r2, #0x96 + strh r2, [r1, r4] + ldr r1, _0224695C ; =0x00007530 + mov r2, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + bl ov17_02245F14 + b _02246954 +_02246944: + ldr r1, _0224695C ; =0x00007530 + mov r2, #1 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + ldrb r1, [r0, #2] + bl ov17_02245F14 +_02246954: + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + nop +_0224695C: .word 0x00007530 + thumb_func_end ov17_02246918 + + thumb_func_start ov17_02246960 +ov17_02246960: ; 0x02246960 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r0, #0x2c + add r7, r3, #0 + add r4, r1, #0 + mul r7, r0 + add r1, r4, r7 + ldr r0, [r1, #0x28] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224697E + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224697E: + mov r3, #0 + mov r0, #0xc3 +_02246982: + add r2, r4, r3 + ldrsb r2, [r2, r0] + cmp r2, #0 + bne _02246990 + add r3, r3, #1 + cmp r3, #3 + blt _02246982 +_02246990: + cmp r3, #3 + bne _0224699A + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224699A: + ldr r2, [r1, #0x28] + mov r0, #8 + orr r0, r2 + mov r3, #0xc3 + str r0, [r1, #0x28] + mov r2, #0 + add r5, r3, #0 +_022469A8: + add r0, r4, r2 + ldrsb r6, [r0, r5] + cmp r6, #0 + ble _022469B8 + ldrsb r6, [r0, r3] + add r0, #0xc3 + sub r6, #0xa + strb r6, [r0] +_022469B8: + add r2, r2, #1 + cmp r2, #3 + blt _022469A8 + ldr r3, _022469D8 ; =0x00007530 + add r0, r1, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + add r1, r4, r7 + ldrb r1, [r1, #2] + mov r2, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022469D8: .word 0x00007530 + thumb_func_end ov17_02246960 + + thumb_func_start ov17_022469DC +ov17_022469DC: ; 0x022469DC + mov r0, #0x2c + mul r0, r3 + add r2, r1, r0 + ldr r1, [r2, #0x28] + ldr r0, _022469F8 ; =0xFFF00FFF + and r1, r0 + ldrb r0, [r2, #2] + lsl r0, r0, #0x18 + lsr r0, r0, #0xc + orr r0, r1 + str r0, [r2, #0x28] + mov r0, #1 + bx lr + nop +_022469F8: .word 0xFFF00FFF + thumb_func_end ov17_022469DC + + thumb_func_start ov17_022469FC +ov17_022469FC: ; 0x022469FC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r2, r1, #0 + ldr r1, [sp, #0x20] + add r4, r0, #0 + mov ip, r3 + cmp r1, #4 + bge _02246A28 + ldr r7, _02246A48 ; =0x00000231 + mov r6, #0x2c + mov r3, #2 +_02246A12: + add r0, r4, r1 + ldrb r0, [r0, r7] + add r1, r1, #1 + add r5, r0, #0 + mul r5, r6 + add r0, r2, r5 + ldr r5, [r0, #0x28] + orr r5, r3 + str r5, [r0, #0x28] + cmp r1, #4 + blt _02246A12 +_02246A28: + ldr r3, _02246A4C ; =0x00007530 + mov r1, #0x2c + mov r0, ip + str r3, [sp] + mul r1, r0 + str r3, [sp, #4] + add r0, r2, r1 + str r3, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02246A48: .word 0x00000231 +_02246A4C: .word 0x00007530 + thumb_func_end ov17_022469FC + + thumb_func_start ov17_02246A50 +ov17_02246A50: ; 0x02246A50 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [sp, #0x20] + cmp r1, #0 + bne _02246A62 + add sp, #0xc + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_02246A62: + sub r1, r1, #1 + add r1, r0, r1 + ldr r0, _02246AA8 ; =0x00000231 + ldrb r4, [r1, r0] + mov r0, #0x2c + add r1, r4, #0 + mul r1, r0 + add r2, r5, r1 + mov r1, #8 + ldrsb r2, [r2, r1] + cmp r2, #0 + bne _02246A80 + add sp, #0xc + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_02246A80: + add r1, r3, #0 + mul r1, r0 + add r0, r5, #0 + add r0, #0x1e + ldrsh r6, [r0, r1] + add r2, r6, r2 + strh r2, [r0, r1] + ldr r0, _02246AAC ; =0x00007530 + str r4, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r5, r1 + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_02246AA8: .word 0x00000231 +_02246AAC: .word 0x00007530 + thumb_func_end ov17_02246A50 + + thumb_func_start ov17_02246AB0 +ov17_02246AB0: ; 0x02246AB0 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + str r1, [sp, #0xc] + str r3, [sp, #0x10] + mov r3, #0 + add r0, sp, #0x18 + add r1, sp, #0x14 +_02246AC0: + lsl r2, r3, #0x18 + lsr r2, r2, #0x18 + strb r2, [r0] + strb r2, [r1] + add r2, r3, #1 + lsl r2, r2, #0x18 + asr r3, r2, #0x18 + add r0, r0, #1 + add r1, r1, #1 + cmp r3, #4 + blt _02246AC0 + mov r4, #0 + add r7, sp, #0x18 + add r6, sp, #0x14 +_02246ADC: + ldr r0, [r5, #0] + bl sub_02094E98 + mov r1, #4 + sub r1, r1, r4 + bl sub_020E1F6C + lsl r0, r1, #0x18 + lsr r2, r0, #0x18 + mov r1, #0 + add r3, r6, #0 +_02246AF2: + ldrb r0, [r3] + cmp r0, #0xff + beq _02246B0A + cmp r2, #0 + bne _02246B04 + mov r0, #0xff + strb r4, [r7, r1] + strb r0, [r6, r1] + b _02246B16 +_02246B04: + sub r0, r2, #1 + lsl r0, r0, #0x18 + lsr r2, r0, #0x18 +_02246B0A: + add r0, r1, #1 + lsl r0, r0, #0x18 + asr r1, r0, #0x18 + add r3, r3, #1 + cmp r1, #4 + blt _02246AF2 +_02246B16: + add r0, r4, #1 + lsl r0, r0, #0x18 + asr r4, r0, #0x18 + cmp r4, #4 + blt _02246ADC + ldr r1, [sp, #0xc] + mov r3, #0 + add r2, sp, #0x18 + mov r4, #0x30 + mov r7, #0x30 + mov r5, #0xc0 +_02246B2C: + ldr r0, [r1, #0x28] + bic r0, r4 + orr r0, r7 + str r0, [r1, #0x28] + ldrb r6, [r2] + bic r0, r5 + add r2, r2, #1 + lsl r6, r6, #0x1e + lsr r6, r6, #0x18 + orr r0, r6 + str r0, [r1, #0x28] + add r0, r3, #1 + lsl r0, r0, #0x18 + asr r3, r0, #0x18 + add r1, #0x2c + cmp r3, #4 + blt _02246B2C + ldr r3, _02246B70 ; =0x00007530 + ldr r0, [sp, #0x10] + mov r1, #0x2c + mul r1, r0 + str r3, [sp] + ldr r0, [sp, #0xc] + str r3, [sp, #4] + str r3, [sp, #8] + add r0, r0, r1 + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02246B70: .word 0x00007530 + thumb_func_end ov17_02246AB0 + + thumb_func_start ov17_02246B74 +ov17_02246B74: ; 0x02246B74 + push {r4, r5, lr} + sub sp, #0xc + ldr r0, [sp, #0x18] + add r5, r1, #0 + cmp r0, #3 + bne _02246BB6 + add r4, r3, #0 + mov r0, #0x2c + add r3, r5, #0 + add r2, r5, #0 + mul r4, r0 + add r3, #0x18 + add r2, #0x1e + ldrsh r1, [r2, r4] + ldrsh r0, [r3, r4] + add r0, r1, r0 + strh r0, [r2, r4] + ldrsh r0, [r3, r4] + mov r1, #0xa + bl sub_020E1F6C + ldr r3, _02246BBC ; =0x00007530 + mov r2, #0 + str r3, [sp] + str r3, [sp, #4] + str r0, [sp, #8] + add r0, r5, r4 + ldrb r1, [r0, #2] + bl ov17_02245F14 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_02246BB6: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02246BBC: .word 0x00007530 + thumb_func_end ov17_02246B74 + + thumb_func_start ov17_02246BC0 +ov17_02246BC0: ; 0x02246BC0 + push {r4, r5, lr} + sub sp, #0xc + mov r0, #0x2c + add r4, r3, #0 + add r5, r1, #0 + mul r4, r0 + add r0, r5, r4 + ldrb r0, [r0, #3] + add r1, r5, r0 + mov r0, #0xc0 + ldrsb r0, [r1, r0] + mov r1, #0xa + bl sub_020E1F6C + ldr r1, _02246C08 ; =0x02253AF0 + add r2, r5, #0 + add r2, #0x1e + ldrb r0, [r1, r0] + ldrsh r1, [r2, r4] + add r1, r1, r0 + strh r1, [r2, r4] + mov r1, #0xa + bl sub_020E1F6C + ldr r3, _02246C0C ; =0x00007530 + mov r2, #0 + str r3, [sp] + str r3, [sp, #4] + str r0, [sp, #8] + add r0, r5, r4 + ldrb r1, [r0, #2] + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02246C08: .word 0x02253AF0 +_02246C0C: .word 0x00007530 + thumb_func_end ov17_02246BC0 + + thumb_func_start ov17_02246C10 +ov17_02246C10: ; 0x02246C10 + push {r3, r4, lr} + sub sp, #0xc + ldr r0, [sp, #0x18] + cmp r0, #0 + bne _02246C42 + add r4, r3, #0 + mov r0, #0x2c + add r2, r1, #0 + mul r4, r0 + add r2, #0x1e + ldrsh r0, [r2, r4] + ldr r3, _02246C48 ; =0x00007530 + add r0, #0x14 + strh r0, [r2, r4] + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + add r0, r1, r4 + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + add sp, #0xc + mov r0, #1 + pop {r3, r4, pc} +_02246C42: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02246C48: .word 0x00007530 + thumb_func_end ov17_02246C10 + + thumb_func_start ov17_02246C4C +ov17_02246C4C: ; 0x02246C4C + push {r3, r4, lr} + sub sp, #0xc + ldr r0, [sp, #0x18] + cmp r0, #3 + bne _02246C7E + add r4, r3, #0 + mov r0, #0x2c + add r2, r1, #0 + mul r4, r0 + add r2, #0x1e + ldrsh r0, [r2, r4] + ldr r3, _02246C84 ; =0x00007530 + add r0, #0x14 + strh r0, [r2, r4] + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + add r0, r1, r4 + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + add sp, #0xc + mov r0, #1 + pop {r3, r4, pc} +_02246C7E: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02246C84: .word 0x00007530 + thumb_func_end ov17_02246C4C + + thumb_func_start ov17_02246C88 +ov17_02246C88: ; 0x02246C88 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r2, r1, #0 + ldr r1, [sp, #0x20] + add r4, r0, #0 + mov ip, r3 + cmp r1, #4 + bge _02246CB4 + ldr r7, _02246CD4 ; =0x00000231 + mov r6, #0x2c + mov r3, #4 +_02246C9E: + add r0, r4, r1 + ldrb r0, [r0, r7] + add r1, r1, #1 + add r5, r0, #0 + mul r5, r6 + add r0, r2, r5 + ldr r5, [r0, #0x28] + orr r5, r3 + str r5, [r0, #0x28] + cmp r1, #4 + blt _02246C9E +_02246CB4: + ldr r3, _02246CD8 ; =0x00007530 + mov r1, #0x2c + mov r0, ip + str r3, [sp] + mul r1, r0 + str r3, [sp, #4] + add r0, r2, r1 + str r3, [sp, #8] + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02246CD4: .word 0x00000231 +_02246CD8: .word 0x00007530 + thumb_func_end ov17_02246C88 + + thumb_func_start ov17_02246CDC +ov17_02246CDC: ; 0x02246CDC + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, [sp, #0x38] + add r4, r1, #0 + str r3, [sp, #0xc] + cmp r0, #0 + bne _02246CF2 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02246CF2: + sub r0, r0, #1 + add r1, r5, r0 + ldr r0, _02246D98 ; =0x00000231 + mov r3, #0x2c + ldrb r0, [r1, r0] + ldr r1, [sp, #0xc] + str r0, [sp, #0x18] + add r0, r1, #0 + mul r0, r3 + add r7, r4, r0 + str r0, [sp, #0x20] + ldr r0, [r7, #0x28] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + bne _02246D24 + ldr r0, [sp, #0x18] + add r1, r0, #0 + mul r1, r3 + add r0, r4, r1 + str r0, [sp, #0x14] + ldr r0, [r0, #0x28] + str r1, [sp, #0x10] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + beq _02246D2A +_02246D24: + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02246D2A: + ldr r0, [r5, #0] + add r1, r3, #0 + mov ip, r0 + add r1, #0xf3 + ldrb r0, [r0, r1] + add r3, #0xf2 + mov r6, ip + ldrh r1, [r7] + ldrb r2, [r7, #3] + ldrb r3, [r6, r3] + bl ov17_02243AF0 + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x14] + add r2, r4, r2 + ldr r5, [r5, #0] + ldr r3, _02246D9C ; =0x0000011F + str r0, [sp, #0x1c] + ldrb r0, [r5, r3] + sub r3, r3, #1 + ldrh r1, [r1] + ldrb r2, [r2, #3] + ldrb r3, [r5, r3] + bl ov17_02243AF0 + cmp r0, #0 + ble _02246D92 + ldr r0, [sp, #0x1c] + cmp r0, #0 + ble _02246D92 + add r2, r4, #0 + ldr r0, [sp, #0x20] + add r2, #0x1e + ldrsh r1, [r2, r0] + ldr r3, [sp, #0xc] + add r1, #0x1e + strh r1, [r2, r0] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x20] + str r0, [sp] + ldr r0, _02246DA0 ; =0x00007530 + add r1, r4, r1 + str r0, [sp, #4] + str r0, [sp, #8] + ldrb r1, [r1, #2] + add r0, r7, #0 + mov r2, #0 + bl ov17_02245F14 + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02246D92: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246D98: .word 0x00000231 +_02246D9C: .word 0x0000011F +_02246DA0: .word 0x00007530 + thumb_func_end ov17_02246CDC + + thumb_func_start ov17_02246DA4 +ov17_02246DA4: ; 0x02246DA4 + push {r4, r5, lr} + sub sp, #0xc + add r0, r1, #0 + mov r1, #0x2c + mul r1, r3 + add r4, r0, r1 + mov r1, #0x1e + ldrsh r2, [r4, r1] + ldr r1, [sp, #0x18] + ldr r5, _02246E00 ; =0x02253AEC + ldrb r5, [r5, r1] + add r2, r2, r5 + strh r2, [r4, #0x1e] + cmp r1, #3 + bhi _02246DE2 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246DCE: ; jump table + .short _02246DD6 - _02246DCE - 2 ; case 0 + .short _02246DDA - _02246DCE - 2 ; case 1 + .short _02246DDE - _02246DCE - 2 ; case 2 + .short _02246DE2 - _02246DCE - 2 ; case 3 +_02246DD6: + mov r2, #0 + b _02246DE4 +_02246DDA: + mov r2, #1 + b _02246DE4 +_02246DDE: + mov r2, #2 + b _02246DE4 +_02246DE2: + mov r2, #3 +_02246DE4: + ldr r1, _02246E04 ; =0x00007530 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0x2c + mul r1, r3 + add r0, r0, r1 + ldrb r1, [r0, #2] + bl ov17_02245F14 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + nop +_02246E00: .word 0x02253AEC +_02246E04: .word 0x00007530 + thumb_func_end ov17_02246DA4 + + thumb_func_start ov17_02246E08 +ov17_02246E08: ; 0x02246E08 + push {r3, r4, lr} + sub sp, #0xc + ldr r2, [sp, #0x18] + cmp r2, #0 + bne _02246E18 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_02246E18: + sub r2, r2, #1 + add r2, r0, r2 + ldr r0, _02246E60 ; =0x00000231 + ldrb r2, [r2, r0] + mov r0, #0x2c + mul r0, r2 + add r2, r1, r0 + mov r0, #8 + ldrsb r0, [r2, r0] + cmp r0, #0x32 + bge _02246E32 + cmp r0, #0x50 + blt _02246E5A +_02246E32: + add r2, r1, #0 + mov r0, #0x2c + add r4, r3, #0 + mul r4, r0 + add r2, #0x1e + ldrsh r0, [r2, r4] + add r0, #0x1e + strh r0, [r2, r4] + ldr r0, _02246E64 ; =0x00007530 + mov r2, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r1, r4 + ldrb r1, [r0, #2] + bl ov17_02245F14 + add sp, #0xc + mov r0, #1 + pop {r3, r4, pc} +_02246E5A: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02246E60: .word 0x00000231 +_02246E64: .word 0x00007530 + thumb_func_end ov17_02246E08 + + thumb_func_start ov17_02246E68 +ov17_02246E68: ; 0x02246E68 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r0, #0x2c + mul r0, r3 + str r1, [sp, #0xc] + mov r2, #0 + add r4, r1, #0 + mov ip, r0 + add r5, r1, r0 + mov r7, #0x1a + mov r6, #0x1c +_02246E7E: + cmp r2, r3 + beq _02246E8A + ldrsh r1, [r4, r7] + ldrsh r0, [r5, r6] + cmp r1, r0 + blt _02246E92 +_02246E8A: + add r2, r2, #1 + add r4, #0x2c + cmp r2, #4 + blt _02246E7E +_02246E92: + cmp r2, #4 + beq _02246E9C + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02246E9C: + ldr r2, [sp, #0xc] + mov r0, ip + add r2, #0x1e + ldrsh r1, [r2, r0] + mov r0, ip + add r1, #0x1e + strh r1, [r2, r0] + ldr r0, _02246EC8 ; =0x00007530 + ldr r1, [sp, #0xc] + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, ip + add r0, r1, r0 + ldrb r1, [r0, #2] + mov r2, #0 + bl ov17_02245F14 + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02246EC8: .word 0x00007530 + thumb_func_end ov17_02246E68 + + .rodata + + + .global Unk_ov17_02253AEC +Unk_ov17_02253AEC: ; 0x02253AEC + .incbin "incbin/overlay17_rodata.bin", 0xD60, 0xD64 - 0xD60 + + .global Unk_ov17_02253AF0 +Unk_ov17_02253AF0: ; 0x02253AF0 + .incbin "incbin/overlay17_rodata.bin", 0xD64, 0xD6C - 0xD64 + + .global Unk_ov17_02253AF8 +Unk_ov17_02253AF8: ; 0x02253AF8 + .incbin "incbin/overlay17_rodata.bin", 0xD6C, 0xC0 + diff --git a/asm/ov17_02246ECC.s b/asm/ov17_02246ECC.s new file mode 100644 index 000000000..c4f43b93d --- /dev/null +++ b/asm/ov17_02246ECC.s @@ -0,0 +1,1299 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02246ECC +ov17_02246ECC: ; 0x02246ECC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + str r1, [sp, #4] + mov r0, #0x15 + mov r1, #0x32 + bl sub_02018144 + add r7, r0, #0 + ldr r1, [r6, #0] + ldr r0, _02246F20 ; =0x00000127 + ldrb r4, [r1, r0] + cmp r4, #4 + bge _02246F16 + ldr r0, [sp, #4] + lsl r1, r4, #1 + add r5, r0, r1 + add r0, #8 + str r0, [sp, #4] +_02246EF2: + add r0, r6, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov17_02246F24 + ldr r0, [sp, #4] + add r1, r7, #0 + add r0, r0, r4 + str r0, [sp] + add r0, r6, #0 + add r2, r4, #0 + add r3, r5, #0 + bl ov17_02246F9C + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _02246EF2 +_02246F16: + add r0, r7, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246F20: .word 0x00000127 + thumb_func_end ov17_02246ECC + + thumb_func_start ov17_02246F24 +ov17_02246F24: ; 0x02246F24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r7, r2, #0 + str r1, [sp] + add r0, r1, #0 + mov r1, #0 + mov r2, #0x32 + bl sub_020C4CF4 + lsl r0, r7, #2 + ldr r5, [sp] + mov r4, #0 + str r0, [sp, #4] +_02246F40: + ldr r1, [r6, #0] + ldr r0, [sp, #4] + mov r2, #0 + ldr r0, [r0, r1] + add r1, r4, #0 + add r1, #0x36 + bl sub_02074470 + strh r0, [r5] + mov r0, #0x23 + lsl r0, r0, #4 + ldrh r2, [r5] + add r0, r6, r0 + add r1, r7, #0 + bl ov17_02243A98 + cmp r0, #1 + bne _02246F7A + ldrh r0, [r5] + mov r1, #0xa + bl sub_020790C4 + strb r0, [r5, #0xa] + ldrh r0, [r5] + mov r1, #0xb + bl sub_020790C4 + strb r0, [r5, #0xb] + b _02246F7E +_02246F7A: + mov r0, #0 + strh r0, [r5] +_02246F7E: + add r4, r4, #1 + add r5, #0xc + cmp r4, #4 + blt _02246F40 + ldr r0, [r6, #0] + add r1, r0, r7 + mov r0, #0x43 + lsl r0, r0, #2 + ldrb r1, [r1, r0] + ldr r0, [sp] + add r0, #0x30 + str r0, [sp] + strb r1, [r0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_02246F24 + + thumb_func_start ov17_02246F9C +ov17_02246F9C: ; 0x02246F9C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp, #4] + ldr r0, [sp, #0x58] + str r1, [sp, #8] + str r0, [sp, #0x58] + mov r1, #0x23 + ldr r0, [sp, #4] + lsl r1, r1, #4 + add r0, r0, r1 + str r0, [sp, #0x1c] + mov r0, #0 + str r2, [sp, #0xc] + str r3, [sp, #0x10] + str r0, [sp, #0x20] +_02246FBA: + ldr r1, [sp, #0x1c] + ldr r0, [sp, #0x20] + add r0, r1, r0 + ldrb r1, [r0, #1] + ldr r0, [sp, #0xc] + cmp r0, r1 + beq _02246FD2 + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #4 + blt _02246FBA +_02246FD2: + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, _02247264 ; =0x02253C30 + str r0, [sp, #0x18] +_02246FDA: + ldr r0, [sp, #0x20] + add r1, r0, #1 + ldr r0, [sp, #0x18] + ldrb r0, [r0] + cmp r1, r0 + bne _022470CC + mov r1, #0 + add r2, sp, #0x3c + add r2, #2 + add r0, r1, #0 +_02246FEE: + add r1, r1, #1 + strb r0, [r2] + add r2, r2, #1 + cmp r1, #3 + blt _02246FEE + ldr r0, [sp, #4] + add r3, sp, #0x3c + ldr r1, [r0, #0] + ldr r0, _02247268 ; =0x0000011F + ldr r4, [sp, #0x18] + ldrb r0, [r1, r0] + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + str r0, [sp] + ldrb r4, [r4, #1] + ldr r0, [sp, #0x1c] + add r3, #2 + lsl r5, r4, #2 + ldr r4, _0224726C ; =0x02253BBC + ldr r4, [r4, r5] + blx r4 + cmp r0, #1 + bne _022470CC + ldr r0, [sp, #0x18] + mov r1, #3 + ldrsb r0, [r0, r1] + cmp r0, #0 + beq _02247030 + cmp r0, #2 + beq _02247044 + cmp r0, #3 + beq _02247044 + b _0224705A +_02247030: + mov r2, #0 + add r1, sp, #0x3c + add r1, #2 + add r0, r2, #0 +_02247038: + add r2, r2, #1 + strb r0, [r1] + add r1, r1, #1 + cmp r2, #3 + blt _02247038 + b _0224705A +_02247044: + add r2, sp, #0x3c + mov r3, #0 + add r2, #2 + mov r0, #1 +_0224704C: + ldrb r1, [r2] + add r3, r3, #1 + eor r1, r0 + strb r1, [r2] + add r2, r2, #1 + cmp r3, #3 + blt _0224704C +_0224705A: + ldr r0, [sp, #4] + ldr r1, [r0, #0] + ldr r0, [sp, #0xc] + add r1, r0, r1 + mov r0, #0x43 + lsl r0, r0, #2 + ldrb r2, [r1, r0] + ldr r0, [sp, #0x18] + lsl r1, r2, #1 + add r0, r0, r1 + mov r1, #4 + ldrsh r4, [r0, r1] + cmp r2, #0 + beq _0224707C + ldr r0, [sp, #0x18] + ldrsh r0, [r0, r1] + add r4, r4, r0 +_0224707C: + ldr r0, [sp, #0x18] + ldrb r0, [r0, #2] + cmp r0, #0xf0 + beq _0224708A + cmp r0, #0xf1 + beq _022470CE + b _0224710E +_0224708A: + ldr r0, [sp, #8] + mov r7, #0 + mov r5, #4 +_02247090: + ldr r1, [sp, #4] + ldr r2, [r1, #0] + ldr r1, _02247268 ; =0x0000011F + ldrb r2, [r2, r1] + ldrb r1, [r0, #0xb] + cmp r2, r1 + bne _022470C4 + mov r1, #2 + ldrsh r1, [r0, r1] + mov r3, #0 + add r2, r0, #0 + add r1, r1, r4 + strh r1, [r0, #2] + add r1, sp, #0x3c + add r1, #2 +_022470AE: + ldrb r6, [r1] + cmp r6, #1 + bne _022470BA + ldrsh r6, [r2, r5] + add r6, r6, r4 + strh r6, [r2, #4] +_022470BA: + add r3, r3, #1 + add r1, r1, #1 + add r2, r2, #2 + cmp r3, #3 + blt _022470AE +_022470C4: + add r7, r7, #1 + add r0, #0xc + cmp r7, #4 + blt _02247090 +_022470CC: + b _0224714C +_022470CE: + ldr r5, [sp, #8] + mov r7, #0 + mov r6, #4 +_022470D4: + ldrb r0, [r5, #0xa] + bl sub_02095734 + cmp r0, #0x14 + blt _02247104 + mov r0, #2 + ldrsh r0, [r5, r0] + mov r2, #0 + add r1, r5, #0 + add r0, r0, r4 + strh r0, [r5, #2] + add r0, sp, #0x3c + add r0, #2 +_022470EE: + ldrb r3, [r0] + cmp r3, #1 + bne _022470FA + ldrsh r3, [r1, r6] + add r3, r3, r4 + strh r3, [r1, #4] +_022470FA: + add r2, r2, #1 + add r0, r0, #1 + add r1, r1, #2 + cmp r2, #3 + blt _022470EE +_02247104: + add r7, r7, #1 + add r5, #0xc + cmp r7, #4 + blt _022470D4 + b _0224714C +_0224710E: + ldr r0, [sp, #8] + mov r7, #0 + mov r5, #4 +_02247114: + ldr r1, [sp, #0x18] + ldrb r2, [r1, #2] + ldrb r1, [r0, #0xa] + cmp r2, r1 + bne _02247144 + mov r1, #2 + ldrsh r1, [r0, r1] + mov r3, #0 + add r2, r0, #0 + add r1, r1, r4 + strh r1, [r0, #2] + add r1, sp, #0x3c + add r1, #2 +_0224712E: + ldrb r6, [r1] + cmp r6, #1 + bne _0224713A + ldrsh r6, [r2, r5] + add r6, r6, r4 + strh r6, [r2, #4] +_0224713A: + add r3, r3, #1 + add r1, r1, #1 + add r2, r2, #2 + cmp r3, #3 + blt _0224712E +_02247144: + add r7, r7, #1 + add r0, #0xc + cmp r7, #4 + blt _02247114 +_0224714C: + ldr r0, [sp, #0x18] + add r0, #0xc + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #0xa5 + bge _0224715E + b _02246FDA +_0224715E: + add r4, sp, #0x34 + mov r5, #0 + add r4, #2 +_02247164: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl sub_02094E98 + strh r0, [r4] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02247164 + mov r5, #0 + add r4, sp, #0x30 +_0224717A: + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl sub_02094E98 + strh r0, [r4] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #3 + blt _0224717A + ldr r0, [sp, #8] + mov r7, #0 + ldrh r0, [r0] + cmp r0, #0 + bne _022471A2 + ldr r1, [sp, #8] +_02247198: + add r1, #0xc + ldrh r0, [r1] + add r7, r7, #1 + cmp r0, #0 + beq _02247198 +_022471A2: + mov r2, #0xc + add r1, r7, #0 + ldr r0, [sp, #8] + mul r1, r2 + add r1, r0, r1 + mov r0, #2 + add r4, r7, #1 + ldrsh r1, [r1, r0] + cmp r4, #4 + bge _022471F6 + ldr r0, [sp, #8] + mul r2, r4 + add r2, r0, r2 + add r0, sp, #0x34 + lsl r3, r4, #1 + add r0, #2 + add r3, r0, r3 +_022471C4: + ldrh r0, [r2] + cmp r0, #0 + beq _022471EC + mov r0, #2 + ldrsh r0, [r2, r0] + cmp r0, r1 + bgt _022471E8 + cmp r0, r1 + bne _022471EC + ldrh r5, [r3] + lsl r6, r7, #1 + str r5, [sp, #0x28] + add r5, sp, #0x34 + add r5, #2 + ldrh r6, [r5, r6] + ldr r5, [sp, #0x28] + cmp r5, r6 + bls _022471EC +_022471E8: + add r7, r4, #0 + add r1, r0, #0 +_022471EC: + add r4, r4, #1 + add r2, #0xc + add r3, r3, #2 + cmp r4, #4 + blt _022471C4 +_022471F6: + ldr r0, [sp, #4] + ldr r5, [r0, #0] + ldr r0, _02247270 ; =0x00000171 + ldrb r0, [r5, r0] + cmp r0, #0 + bne _0224728A + mov r0, #0xc + add r6, r7, #0 + mul r6, r0 + ldr r0, [sp, #8] + mov r2, #0 + add r4, r0, r6 + add r3, r2, #0 + mov r0, #4 +_02247212: + ldrsh r1, [r4, r0] + cmp r1, #0 + bne _0224721A + add r2, r2, #1 +_0224721A: + add r3, r3, #1 + add r4, r4, #2 + cmp r3, #3 + blt _02247212 + cmp r2, #3 + bne _0224728A + ldr r1, _02247274 ; =0x02253BB8 + add r0, sp, #0x2c + ldrb r2, [r1] + strb r2, [r0] + ldrb r2, [r1, #1] + strb r2, [r0, #1] + ldrb r2, [r1, #2] + ldrb r1, [r1, #3] + strb r2, [r0, #2] + strb r1, [r0, #3] + add r0, r5, #0 + bl sub_02094E98 + ldr r1, [sp, #4] + mov r2, #0x12 + lsl r0, r0, #0x18 + ldr r1, [r1, #0] + lsl r2, r2, #4 + ldrb r4, [r1, r2] + add r3, sp, #0x2c + lsr r0, r0, #0x18 + ldrb r3, [r3, r4] + cmp r0, r3 + bge _0224728A + add r2, r2, #3 + ldrb r2, [r1, r2] + ldr r1, [sp, #4] + ldr r0, [sp, #8] + add r2, r1, r2 + ldr r1, _02247278 ; =0x0000023E + b _0224727C + ; .align 2, 0 +_02247264: .word 0x02253C30 +_02247268: .word 0x0000011F +_0224726C: .word 0x02253BBC +_02247270: .word 0x00000171 +_02247274: .word 0x02253BB8 +_02247278: .word 0x0000023E +_0224727C: + add r0, r0, #4 + ldrb r1, [r2, r1] + add r0, r0, r6 + lsl r2, r1, #1 + ldrsh r1, [r0, r2] + sub r1, #0x64 + strh r1, [r0, r2] +_0224728A: + mov r0, #0 + str r0, [sp, #0x24] + mov r0, #0xc + add r1, r7, #0 + mul r1, r0 + ldr r0, [sp, #8] + add r3, sp, #0x30 + add r0, r0, r1 + mov r1, #4 + ldrsh r5, [r0, r1] + mov ip, r0 + mov r4, #1 + add r2, r0, #2 + add r3, #2 +_022472A6: + mov r0, #4 + ldrsh r6, [r2, r0] + cmp r6, r5 + bgt _022472C0 + cmp r6, r5 + bne _022472C4 + ldr r0, [sp, #0x24] + ldrh r7, [r3] + lsl r1, r0, #1 + add r0, sp, #0x30 + ldrh r0, [r0, r1] + cmp r7, r0 + bls _022472C4 +_022472C0: + str r4, [sp, #0x24] + add r5, r6, #0 +_022472C4: + add r4, r4, #1 + add r2, r2, #2 + add r3, r3, #2 + cmp r4, #3 + blt _022472A6 + mov r0, ip + ldrh r1, [r0] + ldr r0, [sp, #0x10] + strh r1, [r0] + ldr r1, [sp, #0x58] + ldr r0, [sp, #0x24] + strb r0, [r1] + ldr r0, [sp, #0x10] + ldrh r0, [r0] + cmp r0, #0 + bne _022472E8 + bl sub_02022974 +_022472E8: + ldr r0, [sp, #0x58] + ldrb r0, [r0] + cmp r0, #3 + blo _022472F4 + bl sub_02022974 +_022472F4: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov17_02246F9C + + thumb_func_start ov17_022472F8 +ov17_022472F8: ; 0x022472F8 + ldrb r0, [r0] + cmp r0, #4 + bne _02247302 + mov r0, #1 + bx lr +_02247302: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov17_022472F8 + + thumb_func_start ov17_02247308 +ov17_02247308: ; 0x02247308 + lsl r1, r1, #2 + add r0, r0, r1 + add r0, #0xe0 + ldr r0, [r0, #0] + lsl r0, r0, #8 + lsr r0, r0, #0x18 + beq _0224731A + mov r0, #1 + bx lr +_0224731A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02247308 + + thumb_func_start ov17_02247320 +ov17_02247320: ; 0x02247320 + mov r1, #0 +_02247322: + ldrb r0, [r2, #0xa] + cmp r0, #5 + bne _0224732C + mov r0, #1 + bx lr +_0224732C: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _02247322 + mov r0, #0 + bx lr + thumb_func_end ov17_02247320 + + thumb_func_start ov17_02247338 +ov17_02247338: ; 0x02247338 + mov r1, #0 +_0224733A: + ldrb r0, [r2, #0xa] + cmp r0, #9 + bne _02247344 + mov r0, #1 + bx lr +_02247344: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _0224733A + mov r0, #0 + bx lr + thumb_func_end ov17_02247338 + + thumb_func_start ov17_02247350 +ov17_02247350: ; 0x02247350 + mov r1, #0 +_02247352: + ldrb r0, [r2, #0xa] + cmp r0, #0xc + bne _0224735C + mov r0, #1 + bx lr +_0224735C: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _02247352 + mov r0, #0 + bx lr + thumb_func_end ov17_02247350 + + thumb_func_start ov17_02247368 +ov17_02247368: ; 0x02247368 + mov r1, #0 +_0224736A: + ldrb r0, [r2, #0xa] + cmp r0, #0xf + bne _02247374 + mov r0, #1 + bx lr +_02247374: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _0224736A + mov r0, #0 + bx lr + thumb_func_end ov17_02247368 + + thumb_func_start ov17_02247380 +ov17_02247380: ; 0x02247380 + mov r1, #0 +_02247382: + ldrb r0, [r2, #0xa] + cmp r0, #0x11 + bne _0224738C + mov r0, #1 + bx lr +_0224738C: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _02247382 + mov r0, #0 + bx lr + thumb_func_end ov17_02247380 + + thumb_func_start ov17_02247398 +ov17_02247398: ; 0x02247398 + mov r1, #0 +_0224739A: + ldrb r0, [r2, #0xa] + cmp r0, #0x12 + bne _022473A4 + mov r0, #1 + bx lr +_022473A4: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _0224739A + mov r0, #0 + bx lr + thumb_func_end ov17_02247398 + + thumb_func_start ov17_022473B0 +ov17_022473B0: ; 0x022473B0 + mov r1, #0 +_022473B2: + ldrb r0, [r2, #0xa] + cmp r0, #0x13 + bne _022473BC + mov r0, #1 + bx lr +_022473BC: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _022473B2 + mov r0, #0 + bx lr + thumb_func_end ov17_022473B0 + + thumb_func_start ov17_022473C8 +ov17_022473C8: ; 0x022473C8 + mov r1, #0 +_022473CA: + ldrb r0, [r2, #0xa] + cmp r0, #0x14 + bne _022473D4 + mov r0, #1 + bx lr +_022473D4: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _022473CA + mov r0, #0 + bx lr + thumb_func_end ov17_022473C8 + + thumb_func_start ov17_022473E0 +ov17_022473E0: ; 0x022473E0 + mov r1, #0 +_022473E2: + ldrb r0, [r2, #0xa] + cmp r0, #0x15 + bne _022473EC + mov r0, #1 + bx lr +_022473EC: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _022473E2 + mov r0, #0 + bx lr + thumb_func_end ov17_022473E0 + + thumb_func_start ov17_022473F8 +ov17_022473F8: ; 0x022473F8 + push {r3, r4} + lsl r1, r1, #1 + add r2, r0, r1 + mov r1, #0x12 + ldrsh r3, [r2, r1] + mov r4, #0 +_02247404: + ldrsh r2, [r0, r1] + cmp r3, r2 + bgt _02247412 + add r4, r4, #1 + add r0, r0, #2 + cmp r4, #4 + blt _02247404 +_02247412: + cmp r4, #4 + bne _0224741C + mov r0, #1 + pop {r3, r4} + bx lr +_0224741C: + mov r0, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov17_022473F8 + + thumb_func_start ov17_02247424 +ov17_02247424: ; 0x02247424 + push {r3, r4} + ldrb r2, [r0] + cmp r2, #4 + bne _0224744E + lsl r1, r1, #1 + add r2, r0, r1 + mov r1, #0x12 + ldrsh r3, [r2, r1] + mov r4, #0 +_02247436: + ldrsh r2, [r0, r1] + cmp r3, r2 + bgt _02247444 + add r4, r4, #1 + add r0, r0, #2 + cmp r4, #4 + blt _02247436 +_02247444: + cmp r4, #4 + bne _0224744E + mov r0, #1 + pop {r3, r4} + bx lr +_0224744E: + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov17_02247424 + + thumb_func_start ov17_02247454 +ov17_02247454: ; 0x02247454 + ldr r3, [sp] + mov r1, #0 +_02247458: + ldrb r0, [r2, #0xa] + cmp r0, #4 + bne _02247468 + ldrb r0, [r2, #0xb] + cmp r3, r0 + bne _02247468 + mov r0, #1 + bx lr +_02247468: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _02247458 + mov r0, #0 + bx lr + thumb_func_end ov17_02247454 + + thumb_func_start ov17_02247474 +ov17_02247474: ; 0x02247474 + ldr r3, [sp] + mov r1, #0 +_02247478: + ldrb r0, [r2, #0xb] + cmp r3, r0 + bne _02247482 + mov r0, #1 + bx lr +_02247482: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _02247478 + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02247474 + + thumb_func_start ov17_02247490 +ov17_02247490: ; 0x02247490 + push {r3, r4, r5, r6} + ldr r5, [sp, #0x10] + mov r4, #0 +_02247496: + ldrb r1, [r2, #0xb] + cmp r5, r1 + beq _022474A4 + add r4, r4, #1 + add r2, #0xc + cmp r4, #4 + blt _02247496 +_022474A4: + cmp r4, #4 + bne _022474AE + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_022474AE: + mov r5, #0 + add r6, r5, #0 + mov r2, #1 + mov r1, #0x22 +_022474B6: + add r4, r0, r6 + ldrsb r4, [r4, r1] + cmp r4, #0x28 + bne _022474C2 + strb r2, [r3, r6] + add r5, r5, #1 +_022474C2: + add r6, r6, #1 + cmp r6, #3 + blt _022474B6 + cmp r5, #0 + ble _022474D2 + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_022474D2: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_02247490 + + thumb_func_start ov17_022474D8 +ov17_022474D8: ; 0x022474D8 + push {r3, r4, r5, r6} + ldr r5, [sp, #0x10] + mov r4, #0 +_022474DE: + ldrb r1, [r2, #0xb] + cmp r5, r1 + beq _022474EC + add r4, r4, #1 + add r2, #0xc + cmp r4, #4 + blt _022474DE +_022474EC: + cmp r4, #4 + bne _022474F6 + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_022474F6: + mov r5, #0 + add r6, r5, #0 + mov r2, #1 + mov r1, #0x22 +_022474FE: + add r4, r0, r6 + ldrsb r4, [r4, r1] + cmp r4, #0x1e + bne _0224750A + add r5, r5, #1 + strb r2, [r3, r6] +_0224750A: + add r6, r6, #1 + cmp r6, #3 + blt _022474FE + cmp r5, #0 + ble _0224751A + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_0224751A: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_022474D8 + + thumb_func_start ov17_02247520 +ov17_02247520: ; 0x02247520 + mov r1, #0 +_02247522: + ldrb r0, [r2, #0xa] + cmp r0, #8 + bne _0224752C + mov r0, #1 + bx lr +_0224752C: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _02247522 + mov r0, #0 + bx lr + thumb_func_end ov17_02247520 + + thumb_func_start ov17_02247538 +ov17_02247538: ; 0x02247538 + mov r1, #0 +_0224753A: + ldrb r0, [r2, #0xa] + cmp r0, #0xd + bne _02247544 + mov r0, #1 + bx lr +_02247544: + add r1, r1, #1 + add r2, #0xc + cmp r1, #4 + blt _0224753A + mov r0, #0 + bx lr + thumb_func_end ov17_02247538 + + thumb_func_start ov17_02247550 +ov17_02247550: ; 0x02247550 + push {r3, r4, r5, r6} + mov r6, #0 + add r5, r6, #0 + mov r2, #1 + mov r1, #0x22 +_0224755A: + add r4, r0, r5 + ldrsb r4, [r4, r1] + cmp r4, #0x28 + bne _02247566 + add r6, r6, #1 + strb r2, [r3, r5] +_02247566: + add r5, r5, #1 + cmp r5, #3 + blt _0224755A + cmp r6, #0 + ble _02247576 + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_02247576: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_02247550 + + thumb_func_start ov17_0224757C +ov17_0224757C: ; 0x0224757C + push {r3, r4, r5, r6} + mov r6, #0 + add r5, r6, #0 + mov r2, #1 + mov r1, #0x22 +_02247586: + add r4, r0, r5 + ldrsb r4, [r4, r1] + cmp r4, #0x1e + bne _02247592 + add r6, r6, #1 + strb r2, [r3, r5] +_02247592: + add r5, r5, #1 + cmp r5, #3 + blt _02247586 + cmp r6, #0 + ble _022475A2 + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_022475A2: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_0224757C + + thumb_func_start ov17_022475A8 +ov17_022475A8: ; 0x022475A8 + push {r3, r4, r5, r6} + mov r6, #0 + add r5, r6, #0 + mov r2, #1 + mov r1, #0x22 +_022475B2: + add r4, r0, r5 + ldrsb r4, [r4, r1] + cmp r4, #0xa + bgt _022475BE + add r6, r6, #1 + strb r2, [r3, r5] +_022475BE: + add r5, r5, #1 + cmp r5, #3 + blt _022475B2 + cmp r6, #0 + ble _022475CE + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_022475CE: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_022475A8 + + thumb_func_start ov17_022475D4 +ov17_022475D4: ; 0x022475D4 + push {r3, r4} + mov r4, #0 + mov r1, #0x22 +_022475DA: + add r2, r0, r4 + ldrsb r2, [r2, r1] + cmp r2, #0x14 + bge _022475E8 + mov r0, #0 + pop {r3, r4} + bx lr +_022475E8: + add r4, r4, #1 + cmp r4, #3 + blt _022475DA + mov r1, #0 + mov r0, #1 +_022475F2: + strb r0, [r3, r1] + add r1, r1, #1 + cmp r1, #3 + blt _022475F2 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov17_022475D4 + + thumb_func_start ov17_02247600 +ov17_02247600: ; 0x02247600 + push {r3, r4} + mov r4, #0 + mov r1, #0x22 +_02247606: + add r2, r0, r4 + ldrsb r2, [r2, r1] + cmp r2, #0x14 + ble _02247614 + mov r0, #0 + pop {r3, r4} + bx lr +_02247614: + add r4, r4, #1 + cmp r4, #3 + blt _02247606 + mov r1, #0 + mov r0, #1 +_0224761E: + strb r0, [r3, r1] + add r1, r1, #1 + cmp r1, #3 + blt _0224761E + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov17_02247600 + + thumb_func_start ov17_0224762C +ov17_0224762C: ; 0x0224762C + push {r3, r4, r5, r6} + mov r6, #0 + add r5, r6, #0 + mov r2, #1 + mov r1, #0x22 +_02247636: + add r4, r0, r5 + ldrsb r4, [r4, r1] + cmp r4, #0x14 + bgt _02247642 + strb r2, [r3, r5] + add r6, r6, #1 +_02247642: + add r5, r5, #1 + cmp r5, #3 + blt _02247636 + cmp r6, #1 + bne _02247652 + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_02247652: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_0224762C + + thumb_func_start ov17_02247658 +ov17_02247658: ; 0x02247658 + push {r3, r4, r5, r6} + mov r6, #0 + add r5, r6, #0 + mov r2, #1 + mov r1, #0x22 +_02247662: + add r4, r0, r5 + ldrsb r4, [r4, r1] + cmp r4, #0x28 + bne _0224766E + strb r2, [r3, r5] + add r6, r6, #1 +_0224766E: + add r5, r5, #1 + cmp r5, #3 + blt _02247662 + cmp r6, #2 + bne _0224767E + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_0224767E: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_02247658 + + thumb_func_start ov17_02247684 +ov17_02247684: ; 0x02247684 + push {r3, r4, r5, r6} + mov r6, #0 + add r5, r6, #0 + mov r2, #1 + mov r1, #0x22 +_0224768E: + add r4, r0, r5 + ldrsb r4, [r4, r1] + cmp r4, #0 + bne _0224769A + strb r2, [r3, r5] + add r6, r6, #1 +_0224769A: + add r5, r5, #1 + cmp r5, #3 + blt _0224768E + cmp r6, #1 + bne _022476AA + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_022476AA: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_02247684 + + thumb_func_start ov17_022476B0 +ov17_022476B0: ; 0x022476B0 + push {r3, r4, r5, r6} + ldr r5, [sp, #0x10] + mov r4, #0 +_022476B6: + ldrb r1, [r2, #0xb] + cmp r5, r1 + beq _022476C4 + add r4, r4, #1 + add r2, #0xc + cmp r4, #4 + blt _022476B6 +_022476C4: + cmp r4, #4 + bne _022476CE + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_022476CE: + mov r5, #0 + add r6, r5, #0 + mov r2, #1 + mov r1, #0x22 +_022476D6: + add r4, r0, r6 + ldrsb r4, [r4, r1] + cmp r4, #0x28 + bne _022476E2 + strb r2, [r3, r6] + add r5, r5, #1 +_022476E2: + add r6, r6, #1 + cmp r6, #3 + blt _022476D6 + cmp r5, #0 + ble _022476F2 + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_022476F2: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov17_022476B0 + + .rodata + + + .global Unk_ov17_02253BB8 +Unk_ov17_02253BB8: ; 0x02253BB8 + .incbin "incbin/overlay17_rodata.bin", 0xE2C, 0xE30 - 0xE2C + + .global Unk_ov17_02253BBC +Unk_ov17_02253BBC: ; 0x02253BBC + .incbin "incbin/overlay17_rodata.bin", 0xE30, 0xEA4 - 0xE30 + + .global Unk_ov17_02253C30 +Unk_ov17_02253C30: ; 0x02253C30 + .incbin "incbin/overlay17_rodata.bin", 0xEA4, 0x7BC + diff --git a/asm/ov17_022476F8.s b/asm/ov17_022476F8.s new file mode 100644 index 000000000..e701c26f2 --- /dev/null +++ b/asm/ov17_022476F8.s @@ -0,0 +1,459 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_022476F8 +ov17_022476F8: ; 0x022476F8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #8] + cmp r0, #0 + bne _02247718 + lsl r0, r4, #4 + add r0, r5, r0 + ldr r0, [r0, #0x48] + cmp r0, #0 + beq _02247732 + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} +_02247718: + bl sub_02007DC8 + add r6, r5, #0 + add r6, #0x48 + lsl r7, r4, #4 + ldr r0, [r6, r7] + bl sub_020181C4 + lsl r0, r4, #2 + mov r1, #0 + add r0, r5, r0 + str r1, [r0, #8] + str r1, [r6, r7] +_02247732: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_022476F8 + + thumb_func_start ov17_02247734 +ov17_02247734: ; 0x02247734 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0224773A: + add r0, r5, #0 + add r1, r4, #0 + bl ov17_022476F8 + add r4, r4, #1 + cmp r4, #4 + blt _0224773A + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02247734 + + thumb_func_start ov17_0224774C +ov17_0224774C: ; 0x0224774C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + mov r3, #2 + str r3, [sp, #4] + ldr r3, _02247794 ; =0x000080EA + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x43 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02247794 ; =0x000080EA + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x44 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02247794 ; =0x000080EA + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x45 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02247794: .word 0x000080EA + thumb_func_end ov17_0224774C + + thumb_func_start ov17_02247798 +ov17_02247798: ; 0x02247798 + push {r4, lr} + ldr r1, _022477B4 ; =0x000080EA + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _022477B4 ; =0x000080EA + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _022477B4 ; =0x000080EA + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_022477B4: .word 0x000080EA + thumb_func_end ov17_02247798 + + thumb_func_start ov17_022477B8 +ov17_022477B8: ; 0x022477B8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x16 + mov r1, #0x18 + add r7, r2, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x18 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + ldr r2, _0224782C ; =0x022543F8 + bl sub_0200CE6C + lsl r1, r6, #0x10 + lsl r2, r7, #0x10 + mov r3, #1 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + str r0, [r4, #4] + bl sub_0200D500 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _022477FC + ldr r0, [r4, #4] + mov r1, #1 + bl sub_0200D364 +_022477FC: + ldr r0, [r4, #4] + ldr r0, [r0, #0] + bl sub_0200D324 + lsl r0, r6, #8 + str r0, [r4, #8] + lsl r0, r7, #8 + str r0, [r4, #0xc] + ldr r0, _02247830 ; =0x000004F9 + ldr r2, _02247834 ; =0x0000C350 + add r1, r5, r0 + str r1, [r4, #0] + ldrb r0, [r1] + add r0, r0, #1 + strb r0, [r1] + ldr r0, _02247838 ; =ov17_02247840 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r0, _0224783C ; =0x000006E1 + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224782C: .word 0x022543F8 +_02247830: .word 0x000004F9 +_02247834: .word 0x0000C350 +_02247838: .word ov17_02247840 +_0224783C: .word 0x000006E1 + thumb_func_end ov17_022477B8 + + thumb_func_start ov17_02247840 +ov17_02247840: ; 0x02247840 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x14] + cmp r0, #0 + bne _022478AE + ldr r0, [r4, #0x10] + bl sub_0201D2B8 + lsl r1, r0, #3 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r5, r0, #0xc + mov r0, #6 + mov r3, #1 + ldr r1, [r4, #0x10] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + lsl r3, r3, #8 + sub r2, r0, r3 + str r2, [r4, #0xc] + ldr r1, [r4, #8] + ldr r0, [r4, #4] + asr r6, r1, #7 + lsr r6, r6, #0x18 + add r6, r1, r6 + asr r1, r6, #8 + add r1, r1, r5 + asr r5, r2, #7 + lsr r5, r5, #0x18 + add r5, r2, r5 + lsl r1, r1, #0x10 + lsl r2, r5, #8 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0xc + bl sub_0200D500 + ldrh r0, [r4, #0x16] + add r0, r0, #1 + strh r0, [r4, #0x16] + ldrh r0, [r4, #0x16] + cmp r0, #0x3c + bhs _022478A6 + ldr r1, [r4, #0xc] + ldr r0, _022478CC ; =0xFFFFE000 + cmp r1, r0 + bgt _022478C8 +_022478A6: + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_022478AE: + ldr r0, [r4, #4] + bl sub_0200D0F4 + ldr r1, [r4, #0] + ldrb r0, [r1] + sub r0, r0, #1 + strb r0, [r1] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_022478C8: + pop {r4, r5, r6, pc} + nop +_022478CC: .word 0xFFFFE000 + thumb_func_end ov17_02247840 + + thumb_func_start ov17_022478D0 +ov17_022478D0: ; 0x022478D0 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0x24] + add r4, r1, #0 + cmp r0, #0 + beq _022478E2 + bl sub_02022974 +_022478E2: + mov r1, #0x30 + ldr r2, [r5, #0] + mul r1, r4 + add r1, r2, r1 + ldrh r1, [r1, #0x1a] + add r0, sp, #0x10 + bl sub_0207697C + ldr r0, _02247914 ; =0xFFFFFDC0 + mov r2, #5 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r5, #0x10] + add r1, sp, #0x10 + lsl r2, r2, #6 + mov r3, #0x20 + bl sub_02007C34 + str r0, [r5, #0x24] + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02247914: .word 0xFFFFFDC0 + thumb_func_end ov17_022478D0 + + thumb_func_start ov17_02247918 +ov17_02247918: ; 0x02247918 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _0224792A + bl sub_02007DC8 + mov r0, #0 + str r0, [r4, #0x24] +_0224792A: + pop {r4, pc} + thumb_func_end ov17_02247918 + + thumb_func_start ov17_0224792C +ov17_0224792C: ; 0x0224792C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0 + beq _02247942 + cmp r6, #0 + bne _02247942 + bl sub_02022974 +_02247942: + cmp r4, #0 + beq _0224798C + cmp r4, #1 + bne _02247988 + ldrb r4, [r6] + ldr r3, [r5, #0] + mov r0, #1 + lsl r2, r4, #2 + str r0, [sp] + mov r0, #2 + add r2, r3, r2 + add r4, r3, r4 + mov r3, #0x42 + str r0, [sp, #4] + lsl r3, r3, #2 + add r2, #0xe8 + ldrb r3, [r4, r3] + ldr r0, [r5, #0x48] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200B48C + ldrb r0, [r6] + ldr r1, [r5, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r4, r5, r6, pc} +_02247988: + bl sub_02022974 +_0224798C: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov17_0224792C + + thumb_func_start ov17_02247990 +ov17_02247990: ; 0x02247990 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0] + ldr r0, _02247A00 ; =0x00000171 + add r7, r2, #0 + ldrb r0, [r1, r0] + str r3, [sp, #0xc] + cmp r0, #0 + bne _022479B2 + ldr r0, _02247A04 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027AC0 + add r4, r0, #0 + b _022479B4 +_022479B2: + mov r4, #1 +_022479B4: + add r0, r6, #0 + add r1, r7, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x28] + add r0, r5, #0 + bl ov17_0224792C + ldr r0, [r5, #0x48] + ldr r1, [r5, #0x4c] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x34 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + str r3, [sp, #8] + add r0, r5, #0 + ldr r2, [r5, #0x4c] + add r0, #0x34 + mov r1, #1 + bl sub_0201D738 + add r5, #0xd0 + strb r0, [r5] + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247A00: .word 0x00000171 +_02247A04: .word 0x00001988 + thumb_func_end ov17_02247990 + + thumb_func_start ov17_02247A08 +ov17_02247A08: ; 0x02247A08 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + cmp r5, #0xf + blo _02247A1A + bl sub_02022974 +_02247A1A: + str r4, [sp] + ldr r2, _02247A34 ; =0x0225442C + lsl r3, r5, #2 + ldr r4, _02247A38 ; =0x0225442E + ldrh r2, [r2, r3] + ldrb r3, [r4, r3] + ldr r1, [r6, #0x44] + add r0, r6, #0 + bl ov17_02247990 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02247A34: .word 0x0225442C +_02247A38: .word 0x0225442E + thumb_func_end ov17_02247A08 + + thumb_func_start ov17_02247A3C +ov17_02247A3C: ; 0x02247A3C + ldr r3, _02247A44 ; =sub_0201D724 + add r0, #0xd0 + ldrb r0, [r0] + bx r3 + ; .align 2, 0 +_02247A44: .word sub_0201D724 + thumb_func_end ov17_02247A3C + + .rodata + + + .global Unk_ov17_022543EC +Unk_ov17_022543EC: ; 0x022543EC + .incbin "incbin/overlay17_rodata.bin", 0x1660, 0x166C - 0x1660 + + .global Unk_ov17_022543F8 +Unk_ov17_022543F8: ; 0x022543F8 + .incbin "incbin/overlay17_rodata.bin", 0x166C, 0x16A0 - 0x166C + + .global Unk_ov17_0225442C +Unk_ov17_0225442C: ; 0x0225442C + .incbin "incbin/overlay17_rodata.bin", 0x16A0, 0x3C + diff --git a/asm/ov17_02247A48.s b/asm/ov17_02247A48.s new file mode 100644 index 000000000..5fb7b3ed0 --- /dev/null +++ b/asm/ov17_02247A48.s @@ -0,0 +1,3264 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02247A48 +ov17_02247A48: ; 0x02247A48 + push {r3, r4, lr} + sub sp, #0xc + ldr r1, _02247A7C ; =0x02254488 + add r3, sp, #0 + str r1, [sp] + mov r1, #0x11 + strh r1, [r3, #4] + ldr r1, [r0, #0] + ldr r2, _02247A80 ; =0x00000123 + ldrb r1, [r1, r2] + strb r1, [r3, #6] + sub r1, r2, #7 + ldr r4, [r0, #0] + add r2, #0x4e + ldrb r1, [r4, r1] + strb r1, [r3, #8] + ldr r1, [r0, #0] + ldrb r1, [r1, r2] + strb r1, [r3, #7] + ldr r1, _02247A84 ; =0x000004FC + add r0, r0, r1 + add r1, sp, #0 + bl ov17_0224F18C + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02247A7C: .word 0x02254488 +_02247A80: .word 0x00000123 +_02247A84: .word 0x000004FC + thumb_func_end ov17_02247A48 + + thumb_func_start ov17_02247A88 +ov17_02247A88: ; 0x02247A88 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02247A88 + + thumb_func_start ov17_02247A9C +ov17_02247A9C: ; 0x02247A9C + push {r3, lr} + add r1, r2, #0 + mov r2, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02247A9C + + thumb_func_start ov17_02247AAC +ov17_02247AAC: ; 0x02247AAC + bx lr + ; .align 2, 0 + thumb_func_end ov17_02247AAC + + thumb_func_start ov17_02247AB0 +ov17_02247AB0: ; 0x02247AB0 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02247AB0 + + thumb_func_start ov17_02247AC4 +ov17_02247AC4: ; 0x02247AC4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + ldr r0, _02247AE8 ; =0x00000F1C + mov r2, #1 + strb r2, [r1, r0] + ldr r0, [r1, #0] + bl sub_02094EDC + cmp r0, #0 + bne _02247AE6 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov17_0224F26C +_02247AE6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02247AE8: .word 0x00000F1C + thumb_func_end ov17_02247AC4 + + thumb_func_start ov17_02247AEC +ov17_02247AEC: ; 0x02247AEC + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02247AEC + + thumb_func_start ov17_02247B00 +ov17_02247B00: ; 0x02247B00 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x10] + add r6, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + mov r5, #0 + strh r0, [r4, #0xa] + ldr r0, [sp, #0x10] + str r0, [r4, #0xc] + ldrb r0, [r7] + strb r0, [r4, #0x11] + b _02247B60 +_02247B3C: + ldr r1, [r4, #0] + lsl r0, r5, #4 + add r1, r1, r0 + mov r0, #0xf2 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02247B5E + bl ov22_0225B020 + ldr r1, [r4, #0] + lsl r0, r5, #4 + add r2, r1, r0 + mov r0, #0xf2 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r2, r0] +_02247B5E: + add r5, r5, #1 +_02247B60: + cmp r5, #4 + blt _02247B3C + ldrb r0, [r7] + ldr r1, [r6, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + add r0, sp, #0x14 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + mov r0, #0x16 + str r0, [sp, #0x20] + mov r1, #0x80 + mov r0, #0x68 + str r1, [sp, #0x18] + str r0, [sp, #0x1c] + ldrb r2, [r7] + lsl r2, r2, #4 + add r3, r6, r2 + ldr r2, _02247C44 ; =0x00000F24 + str r1, [r3, r2] + ldrb r1, [r7] + lsl r1, r1, #4 + add r3, r6, r1 + add r1, r2, #4 + str r0, [r3, r1] + ldrb r1, [r7] + ldr r2, [r6, #0] + add r0, sp, #0x14 + lsl r1, r1, #2 + add r1, r2, r1 + add r1, #0xf8 + ldr r1, [r1, #0] + bl ov22_0225AFD4 + ldrb r1, [r7] + lsl r1, r1, #4 + add r2, r6, r1 + mov r1, #0xf2 + lsl r1, r1, #4 + str r0, [r2, r1] + ldrb r0, [r7] + lsl r0, r0, #4 + add r0, r6, r0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov22_0225B074 + ldr r0, _02247C48 ; =0x04000048 + mov r2, #0x3f + ldrh r1, [r0] + mov r3, #0x1f + bic r1, r2 + add r5, r1, #0 + orr r5, r3 + mov r1, #0x20 + orr r1, r5 + strh r1, [r0] + ldrh r1, [r0, #2] + bic r1, r2 + orr r1, r3 + strh r1, [r0, #2] + mov r1, #1 + add r2, r1, #0 + add r0, #8 + sub r2, #0x11 + bl sub_020BF578 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02247C4C ; =0xFFFF1FFF + mov r3, #0xff + and r1, r0 + lsr r0, r2, #0xd + orr r0, r1 + mov r1, #0xf6 + str r0, [r2, #0] + lsl r1, r1, #4 + mov r0, #0 + strb r0, [r6, r1] + add r2, r1, #1 + strb r0, [r6, r2] + add r2, r1, #2 + strb r3, [r6, r2] + ldr r2, _02247C50 ; =0x02254468 + add r1, r1, #3 + ldrsb r2, [r2, r0] + mov r3, #2 + add r2, r2, #4 + lsl r2, r2, #3 + strb r2, [r6, r1] + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + ldr r2, [r6, #0x30] + mov r0, #0x2d + mov r1, #0x15 + bl sub_02006E60 + ldr r0, _02247C54 ; =ov17_02247C5C + ldr r2, _02247C58 ; =0x00007530 + add r1, r4, #0 + bl sub_0200D9E8 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247C44: .word 0x00000F24 +_02247C48: .word 0x04000048 +_02247C4C: .word 0xFFFF1FFF +_02247C50: .word 0x02254468 +_02247C54: .word ov17_02247C5C +_02247C58: .word 0x00007530 + thumb_func_end ov17_02247B00 + + thumb_func_start ov17_02247C5C +ov17_02247C5C: ; 0x02247C5C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #4 + bhi _02247D3E + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02247C74: ; jump table + .short _02247C7E - _02247C74 - 2 ; case 0 + .short _02247C84 - _02247C74 - 2 ; case 1 + .short _02247CDE - _02247C74 - 2 ; case 2 + .short _02247CE4 - _02247C74 - 2 ; case 3 + .short _02247D24 - _02247C74 - 2 ; case 4 +_02247C7E: + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02247C84: + ldr r1, _02247D58 ; =0x04000048 + mov r0, #0x3f + ldrh r2, [r1] + bic r2, r0 + mov r0, #0x1e + orr r2, r0 + mov r0, #0x20 + orr r0, r2 + strh r0, [r1] + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0x11] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + add r3, r0, #0 + ldrb r0, [r4, #0x11] + mov r2, #0xf2 + lsl r2, r2, #4 + lsl r1, r0, #4 + ldr r0, [r4, #0] + add r5, r0, r1 + add r1, r2, #4 + ldr r0, [r5, r2] + add r2, #8 + ldr r1, [r5, r1] + ldr r2, [r5, r2] + bl ov22_0225B158 + ldrb r0, [r4, #0x11] + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r1, r1, r0 + mov r0, #0xf2 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl ov22_0225B074 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02247CDE: + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02247CE4: + ldr r1, _02247D58 ; =0x04000048 + mov r0, #0x3f + ldrh r2, [r1] + bic r2, r0 + mov r0, #0x1f + orr r2, r0 + mov r0, #0x20 + orr r0, r2 + strh r0, [r1] + mov r1, #0 + str r1, [sp] + ldr r0, [r4, #0] + ldr r2, _02247D5C ; =0x00001FFF + ldr r0, [r0, #0x50] + add r3, r1, #0 + bl sub_02003A2C + mov r3, #0 + str r3, [sp] + ldr r0, [r4, #0] + ldr r2, _02247D60 ; =0x00003FFF + ldr r0, [r0, #0x50] + mov r1, #2 + bl sub_02003A2C + ldr r0, _02247D64 ; =0x000006EC + bl sub_02005748 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02247D24: + mov r0, #0x12 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x12] + ldrsh r0, [r4, r0] + cmp r0, #0xa + ble _02247D56 + mov r0, #0 + strh r0, [r4, #0x12] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02247D3E: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02247D56: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02247D58: .word 0x04000048 +_02247D5C: .word 0x00001FFF +_02247D60: .word 0x00003FFF +_02247D64: .word 0x000006EC + thumb_func_end ov17_02247C5C + + thumb_func_start ov17_02247D68 +ov17_02247D68: ; 0x02247D68 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02247D68 + + thumb_func_start ov17_02247D7C +ov17_02247D7C: ; 0x02247D7C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02247DC0 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0] + strb r0, [r4, #0x11] + ldr r0, _02247DC4 ; =ov17_02247DC8 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247DC0: .word 0x00007530 +_02247DC4: .word ov17_02247DC8 + thumb_func_end ov17_02247D7C + + thumb_func_start ov17_02247DC8 +ov17_02247DC8: ; 0x02247DC8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02247DDA + cmp r0, #1 + beq _02247E0A + b _02247E5E +_02247DDA: + ldrb r0, [r4, #0x11] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #0 + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldrb r0, [r4, #0x11] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #1 + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #0x18] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02247E0A: + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0x11] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + mov r0, #1 + ldr r1, [r4, #0x18] + lsl r0, r0, #8 + add r2, r1, r0 + lsl r1, r0, #6 + str r2, [r4, #0x18] + cmp r2, r1 + blt _02247E34 + lsl r0, r0, #6 + str r0, [r4, #0x18] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_02247E34: + ldrb r0, [r4, #0x11] + ldr r2, [r4, #0x14] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldrb r0, [r4, #0x11] + ldr r2, [r4, #0x18] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_02247E5E: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov17_02247DC8 + + thumb_func_start ov17_02247E78 +ov17_02247E78: ; 0x02247E78 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02247E78 + + thumb_func_start ov17_02247E8C +ov17_02247E8C: ; 0x02247E8C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02247ED4 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0, #1] + strb r0, [r4, #0x12] + mov r0, #0 + strb r0, [r4, #0x1a] + ldr r0, _02247ED8 ; =ov17_02247F8C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247ED4: .word 0x00007530 +_02247ED8: .word ov17_02247F8C + thumb_func_end ov17_02247E8C + + thumb_func_start ov17_02247EDC +ov17_02247EDC: ; 0x02247EDC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02247F24 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0, #2] + strb r0, [r4, #0x12] + mov r0, #1 + strb r0, [r4, #0x1a] + ldr r0, _02247F28 ; =ov17_02247F8C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247F24: .word 0x00007530 +_02247F28: .word ov17_02247F8C + thumb_func_end ov17_02247EDC + + thumb_func_start ov17_02247F2C +ov17_02247F2C: ; 0x02247F2C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x1c + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _02247F84 ; =0x00007530 + str r0, [r4, #0] + ldrh r0, [r5] + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] + ldrb r1, [r6, #1] + ldrb r0, [r6, #2] + add r0, r1, r0 + strb r0, [r4, #0x12] + ldrb r0, [r6, #1] + add r1, r4, #0 + strb r0, [r4, #0x14] + ldrb r0, [r6, #2] + strb r0, [r4, #0x15] + mov r0, #0 + strb r0, [r4, #0x1a] + mov r0, #1 + strb r0, [r4, #0x1b] + ldr r0, _02247F88 ; =ov17_02247F8C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247F84: .word 0x00007530 +_02247F88: .word ov17_02247F8C + thumb_func_end ov17_02247F2C + + thumb_func_start ov17_02247F8C +ov17_02247F8C: ; 0x02247F8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5, #0x10] + cmp r0, #0 + beq _02247FA6 + cmp r0, #1 + beq _02247FB6 + cmp r0, #2 + bne _02247FA4 + b _022480FE +_02247FA4: + b _02248118 +_02247FA6: + ldr r0, _02248134 ; =0x000006E5 + bl sub_02005748 + mov r0, #0xf + strb r0, [r5, #0x11] + ldrb r0, [r5, #0x10] + add r0, r0, #1 + strb r0, [r5, #0x10] +_02247FB6: + ldrb r1, [r5, #0x13] + ldrb r0, [r5, #0x12] + cmp r1, r0 + blo _02247FD2 + mov r0, #0 + strb r0, [r5, #0x11] + ldr r0, _02248134 ; =0x000006E5 + bl sub_02005748 + ldrb r0, [r5, #0x10] + add sp, #8 + add r0, r0, #1 + strb r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02247FD2: + ldrb r0, [r5, #0x1b] + cmp r0, #1 + bne _02247FE2 + ldrb r0, [r5, #0x14] + cmp r1, r0 + blo _02247FE2 + mov r0, #1 + strb r0, [r5, #0x1a] +_02247FE2: + ldrb r0, [r5, #0x11] + cmp r0, #0 + beq _02247FF0 + sub r0, r0, #1 + add sp, #8 + strb r0, [r5, #0x11] + pop {r3, r4, r5, r6, r7, pc} +_02247FF0: + mov r0, #3 + strb r0, [r5, #0x11] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_02094E98 + mov r1, #0x60 + bl sub_020E1F6C + lsl r0, r1, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_02094E98 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1a + sub r1, r1, r2 + mov r0, #0x1a + ror r1, r0 + add r0, r2, r1 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_02094E98 + mov r1, #1 + tst r0, r1 + beq _02248034 + ldr r0, [sp, #4] + add r0, #0x80 + b _0224803A +_02248034: + ldr r0, [sp, #4] + mov r1, #0x80 + sub r0, r1, r0 +_0224803A: + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_02094E98 + mov r1, #1 + tst r0, r1 + beq _02248052 + add r0, r7, #0 + add r0, #0x60 + b _02248056 +_02248052: + mov r0, #0x60 + sub r0, r0, r7 +_02248056: + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + ldrb r0, [r5, #0x13] + cmp r0, #0 + beq _022480C6 + mov r0, #0x16 + ldrsh r0, [r5, r0] + cmp r0, #0x80 + bge _0224806C + cmp r6, #0x80 + blt _02248074 +_0224806C: + cmp r0, #0x80 + ble _022480C6 + cmp r6, #0x80 + ble _022480C6 +_02248074: + mov r0, #0x18 + ldrsh r0, [r5, r0] + cmp r0, #0x60 + bge _02248080 + cmp r4, #0x60 + blt _02248088 +_02248080: + cmp r0, #0x60 + ble _022480C6 + cmp r4, #0x60 + ble _022480C6 +_02248088: + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_02094E98 + mov r1, #1 + tst r0, r1 + beq _022480B2 + cmp r6, #0x80 + bge _022480A6 + ldr r0, [sp, #4] + add r0, #0x80 + str r0, [sp, #4] + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + b _022480C6 +_022480A6: + ldr r0, [sp, #4] + mov r1, #0x80 + sub r0, r1, r0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + b _022480C6 +_022480B2: + cmp r4, #0x60 + bge _022480BE + add r7, #0x60 + lsl r0, r7, #0x10 + asr r4, r0, #0x10 + b _022480C6 +_022480BE: + mov r0, #0x60 + sub r0, r0, r7 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_022480C6: + ldrb r1, [r5, #0x13] + mov r0, #1 + tst r0, r1 + ldrb r0, [r5, #0x1a] + beq _022480E2 + str r0, [sp] + mov r3, #0x2d + ldr r0, [r5, #0] + add r1, r6, #0 + add r2, r4, #0 + lsl r3, r3, #0xe + bl ov17_022477B8 + b _022480F0 +_022480E2: + str r0, [sp] + ldr r0, [r5, #0] + add r1, r6, #0 + add r2, r4, #0 + mov r3, #0 + bl ov17_022477B8 +_022480F0: + strh r6, [r5, #0x16] + strh r4, [r5, #0x18] + ldrb r0, [r5, #0x13] + add sp, #8 + add r0, r0, #1 + strb r0, [r5, #0x13] + pop {r3, r4, r5, r6, r7, pc} +_022480FE: + ldrb r0, [r5, #0x11] + add r0, r0, #1 + strb r0, [r5, #0x11] + ldrb r0, [r5, #0x11] + cmp r0, #0x1e + bls _02248130 + mov r0, #0 + strb r0, [r5, #0x11] + ldrb r0, [r5, #0x10] + add sp, #8 + add r0, r0, #1 + strb r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02248118: + mov r2, #0 + ldr r0, [r5, #0xc] + add r1, r5, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_02248130: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248134: .word 0x000006E5 + thumb_func_end ov17_02247F8C + + thumb_func_start ov17_02248138 +ov17_02248138: ; 0x02248138 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02248138 + + thumb_func_start ov17_0224814C +ov17_0224814C: ; 0x0224814C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02248190 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0] + strb r0, [r4, #0x11] + ldr r0, _02248194 ; =ov17_02248198 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248190: .word 0x00007530 +_02248194: .word ov17_02248198 + thumb_func_end ov17_0224814C + + thumb_func_start ov17_02248198 +ov17_02248198: ; 0x02248198 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0x11] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + add r3, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _022481BC + cmp r0, #1 + beq _022481E4 + b _02248218 +_022481BC: + ldrb r0, [r4, #0x11] + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r1, r1, r0 + ldr r0, _02248254 ; =0x00000F24 + ldr r1, [r1, r0] + add r0, r0, #4 + lsl r1, r1, #8 + str r1, [r4, #0x14] + ldrb r1, [r4, #0x11] + ldr r2, [r4, #0] + lsl r1, r1, #4 + add r1, r2, r1 + ldr r0, [r1, r0] + lsl r0, r0, #8 + str r0, [r4, #0x18] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022481E4: + mov r0, #3 + ldr r1, [r4, #0x14] + lsl r0, r0, #8 + add r1, r1, r0 + mov r0, #0x4b + lsl r0, r0, #0xa + str r1, [r4, #0x14] + cmp r1, r0 + blt _022481FC + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_022481FC: + ldrb r0, [r4, #0x11] + ldr r2, [r4, #0x18] + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r1, r1, r0 + mov r0, #0xf2 + lsl r0, r0, #4 + ldr r0, [r1, r0] + ldr r1, [r4, #0x14] + asr r2, r2, #8 + asr r1, r1, #8 + bl ov22_0225B158 + pop {r3, r4, r5, pc} +_02248218: + ldrb r0, [r4, #0x11] + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r1, r1, r0 + mov r0, #0xf2 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov22_0225B020 + ldrb r0, [r4, #0x11] + mov r2, #0 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r1, r1, r0 + mov r0, #0xf2 + lsl r0, r0, #4 + str r2, [r1, r0] + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_02248254: .word 0x00000F24 + thumb_func_end ov17_02248198 + + thumb_func_start ov17_02248258 +ov17_02248258: ; 0x02248258 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02248258 + + thumb_func_start ov17_0224826C +ov17_0224826C: ; 0x0224826C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x18 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _022482A8 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _022482AC ; =ov17_022482B0 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022482A8: .word 0x00007530 +_022482AC: .word ov17_022482B0 + thumb_func_end ov17_0224826C + + thumb_func_start ov17_022482B0 +ov17_022482B0: ; 0x022482B0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r1, #0x10] + str r1, [sp] + cmp r0, #0 + beq _022482C0 + b _022483E6 +_022482C0: + ldr r0, [sp] + mov r1, #0x14 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _022482D4 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x14] + pop {r4, r5, r6, r7, pc} +_022482D4: + ldr r0, [sp] + mov r1, #0x13 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _022482E8 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x13] + pop {r4, r5, r6, r7, pc} +_022482E8: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + ldr r0, [r0, #0] + mov r1, #2 + ldr r0, [r0, #0x30] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _02248360 +_02248300: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + ldr r0, _02248404 ; =0x02254468 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _0224835A + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r0, [r0, #0x12] + mov r7, #0x3f + str r5, [sp, #4] + lsl r1, r0, #1 + ldr r0, _02248408 ; =0x02254470 + lsl r7, r7, #0xa + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r0, r0, #5 + add r6, r1, r0 + b _02248354 +_02248330: + mov r4, #0 + b _02248348 +_02248334: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_02248348: + cmp r4, #8 + blt _02248334 + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_02248354: + ldr r0, [sp, #4] + cmp r0, #4 + blt _02248330 +_0224835A: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_02248360: + ldr r0, [sp, #8] + cmp r0, #4 + blt _02248300 + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _022483A2 + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _022483A2 + ldr r0, _02248404 ; =0x02254468 + sub r1, r1, #1 + ldrsb r0, [r0, r1] + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #0x3f + str r0, [sp, #4] + lsl r1, r1, #0xa + b _0224839C +_0224838C: + ldr r0, [sp, #4] + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r1 + strh r0, [r3, r2] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_0224839C: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _0224838C +_022483A2: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _02248400 + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _02248400 + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_022483E6: + add r0, r1, #0 + mov r2, #0 + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_02248400: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248404: .word 0x02254468 +_02248408: .word 0x02254470 + thumb_func_end ov17_022482B0 + + thumb_func_start ov17_0224840C +ov17_0224840C: ; 0x0224840C + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224840C + + thumb_func_start ov17_02248420 +ov17_02248420: ; 0x02248420 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x18 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _0224845C ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _02248460 ; =ov17_02248464 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224845C: .word 0x00007530 +_02248460: .word ov17_02248464 + thumb_func_end ov17_02248420 + + thumb_func_start ov17_02248464 +ov17_02248464: ; 0x02248464 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r1, #0x10] + str r1, [sp] + cmp r0, #0 + beq _02248474 + b _022485C2 +_02248474: + ldr r0, [sp] + mov r1, #0x14 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _02248488 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x14] + pop {r4, r5, r6, r7, pc} +_02248488: + ldr r0, [sp] + mov r1, #0x13 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _0224849C + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x13] + pop {r4, r5, r6, r7, pc} +_0224849C: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + ldr r0, [r0, #0] + mov r1, #2 + ldr r0, [r0, #0x30] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _0224851C +_022484B4: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + mov r0, #4 + sub r1, r0, r1 + ldr r0, _022485E0 ; =0x02254468 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _02248516 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r1, [r0, #0x12] + mov r0, #0xb + mov r7, #0x3f + sub r0, r0, r1 + lsl r1, r0, #1 + ldr r0, _022485E4 ; =0x02254470 + str r5, [sp, #4] + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r7, r7, #0xa + lsl r0, r0, #5 + add r6, r1, r0 + b _02248510 +_022484EC: + mov r4, #0 + b _02248504 +_022484F0: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_02248504: + cmp r4, #8 + blt _022484F0 + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_02248510: + ldr r0, [sp, #4] + cmp r0, #4 + blt _022484EC +_02248516: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_0224851C: + ldr r0, [sp, #8] + cmp r0, #4 + blt _022484B4 + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _0224857E + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _0224857E + mov r0, #5 + sub r1, r0, r1 + ldr r0, _022485E0 ; =0x02254468 + mov r7, #0x3f + ldrsb r0, [r0, r1] + lsl r7, r7, #0xa + mov r6, #0x1d + add r0, r0, #3 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #2 + str r0, [sp, #4] + lsl r1, r1, #8 + b _02248578 +_02248552: + ldr r0, [sp, #4] + ldr r5, [sp, #4] + lsl r4, r0, #1 + ldrh r0, [r3, r4] + lsl r5, r5, #0x1d + and r0, r7 + strh r0, [r3, r4] + ldr r0, [sp, #4] + ldrh r2, [r3, r4] + lsr r0, r0, #0x1f + sub r5, r5, r0 + ror r5, r6 + add r0, r0, r5 + add r0, r0, r1 + orr r0, r2 + strh r0, [r3, r4] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_02248578: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _02248552 +_0224857E: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _022485DC + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _022485DC + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_022485C2: + add r0, r1, #0 + mov r2, #0 + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_022485DC: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022485E0: .word 0x02254468 +_022485E4: .word 0x02254470 + thumb_func_end ov17_02248464 + + thumb_func_start ov17_022485E8 +ov17_022485E8: ; 0x022485E8 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_022485E8 + + thumb_func_start ov17_022485FC +ov17_022485FC: ; 0x022485FC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02248640 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0] + strb r0, [r4, #0x11] + ldr r0, _02248644 ; =ov17_02248648 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248640: .word 0x00007530 +_02248644: .word ov17_02248648 + thumb_func_end ov17_022485FC + + thumb_func_start ov17_02248648 +ov17_02248648: ; 0x02248648 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _0224865A + cmp r0, #1 + beq _02248684 + b _022486C8 +_0224865A: + ldrb r1, [r4, #0x11] + ldr r0, [r4, #0] + bl ov17_022478D0 + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0x24] + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x24] + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #0x18] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_02248684: + mov r0, #1 + ldr r1, [r4, #0x14] + lsl r0, r0, #0xa + sub r1, r1, r0 + mov r0, #0xe6 + lsl r0, r0, #8 + str r1, [r4, #0x14] + cmp r1, r0 + bgt _0224869E + str r0, [r4, #0x14] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_0224869E: + ldr r3, [r4, #0x14] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r3, [r4, #0x18] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_022486C8: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02248648 + + thumb_func_start ov17_022486E4 +ov17_022486E4: ; 0x022486E4 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_022486E4 + + thumb_func_start ov17_022486F8 +ov17_022486F8: ; 0x022486F8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _0224873C ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0] + strb r0, [r4, #0x11] + ldr r0, _02248740 ; =ov17_02248744 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224873C: .word 0x00007530 +_02248740: .word ov17_02248744 + thumb_func_end ov17_022486F8 + + thumb_func_start ov17_02248744 +ov17_02248744: ; 0x02248744 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02248756 + cmp r0, #1 + beq _02248784 + b _022487C8 +_02248756: + ldr r0, [r4, #0] + ldr r0, [r0, #0x24] + cmp r0, #0 + bne _02248762 + bl sub_02022974 +_02248762: + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0x24] + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x24] + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #0x18] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_02248784: + mov r0, #1 + ldr r1, [r4, #0x14] + lsl r0, r0, #0xa + add r1, r1, r0 + mov r0, #5 + lsl r0, r0, #0xe + str r1, [r4, #0x14] + cmp r1, r0 + blt _0224879E + str r0, [r4, #0x14] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_0224879E: + ldr r3, [r4, #0x14] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r3, [r4, #0x18] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_022487C8: + ldr r0, [r4, #0] + bl ov17_02247918 + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov17_02248744 + + thumb_func_start ov17_022487E8 +ov17_022487E8: ; 0x022487E8 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_022487E8 + + thumb_func_start ov17_022487FC +ov17_022487FC: ; 0x022487FC + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r6, r1, #0 + mov r0, #0x16 + mov r1, #0x58 + add r5, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x58 + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + ldr r2, _02248858 ; =0x00007530 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r0, [r4, #0xc] + ldrb r0, [r7] + strb r0, [r4, #0x11] + str r6, [r4, #0x2c] + str r6, [r4, #0x38] + add r0, r4, #0 + ldrb r1, [r7] + add r0, #0x46 + strb r1, [r0] + str r6, [r4, #0x48] + ldrb r0, [r7] + ldr r1, [r6, #0xc] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + str r0, [r4, #0x24] + ldr r0, _0224885C ; =ov17_02248860 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248858: .word 0x00007530 +_0224885C: .word ov17_02248860 + thumb_func_end ov17_022487FC + + thumb_func_start ov17_02248860 +ov17_02248860: ; 0x02248860 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5, #0x10] + cmp r0, #0 + beq _02248878 + cmp r0, #1 + beq _02248902 + cmp r0, #2 + beq _0224892C + b _0224895A +_02248878: + ldr r0, _02248978 ; =ov17_02248A24 + ldr r2, _0224897C ; =0x0000753A + add r1, #0x2c + bl sub_0200D9E8 + add r1, r5, #0 + ldr r0, _02248980 ; =ov17_02248BE0 + ldr r2, _0224897C ; =0x0000753A + add r1, #0x48 + bl sub_0200D9E8 + ldr r0, [r5, #0x38] + ldr r1, [r0, #0xc] + add r0, r5, #0 + add r0, #0x46 + ldrb r0, [r0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + add r4, r0, #0 + add r0, sp, #0 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + mov r0, #0x16 + str r0, [sp, #0xc] + mov r0, #0x80 + add r4, #0x40 + str r0, [sp, #4] + str r4, [sp, #8] + ldr r1, [r5, #0x38] + add r0, sp, #0 + ldr r2, [r1, #0] + add r1, r5, #0 + add r1, #0x46 + ldrb r1, [r1] + lsl r1, r1, #2 + add r1, r2, r1 + add r1, #0xf8 + ldr r1, [r1, #0] + bl ov22_0225AFD4 + add r1, r5, #0 + add r1, #0x46 + ldrb r1, [r1] + ldr r2, [r5, #0x38] + lsl r1, r1, #4 + add r2, r2, r1 + mov r1, #0xf2 + lsl r1, r1, #4 + str r0, [r2, r1] + add r0, r5, #0 + add r0, #0x46 + ldrb r0, [r0] + ldr r2, [r5, #0x38] + lsl r0, r0, #4 + add r0, r2, r0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov22_0225B074 + ldrb r0, [r5, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r5, #0x10] + pop {r3, r4, r5, pc} +_02248902: + add r0, r5, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #1 + bne _02248972 + ldr r0, _02248984 ; =ov17_022489C8 + ldr r2, _0224897C ; =0x0000753A + add r1, #0x14 + bl sub_0200D9E8 + add r1, r5, #0 + ldr r0, _02248988 ; =ov17_02248AA4 + ldr r2, _0224897C ; =0x0000753A + add r1, #0x38 + bl sub_0200D9E8 + ldrb r0, [r5, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r5, #0x10] + pop {r3, r4, r5, pc} +_0224892C: + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + cmp r0, #1 + bne _02248972 + add r0, r5, #0 + add r0, #0x45 + ldrb r0, [r0] + cmp r0, #1 + bne _02248972 + add r0, r5, #0 + add r0, #0x55 + ldrb r0, [r0] + cmp r0, #1 + bne _02248972 + ldr r0, _0224898C ; =0x000006E5 + bl sub_02005748 + ldrb r0, [r5, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r5, #0x10] + pop {r3, r4, r5, pc} +_0224895A: + mov r2, #0 + ldr r0, [r5, #0xc] + add r1, r5, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_02248972: + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02248978: .word ov17_02248A24 +_0224897C: .word 0x0000753A +_02248980: .word ov17_02248BE0 +_02248984: .word ov17_022489C8 +_02248988: .word ov17_02248AA4 +_0224898C: .word 0x000006E5 + thumb_func_end ov17_02248860 + + thumb_func_start ov17_02248990 +ov17_02248990: ; 0x02248990 + push {r3} + sub sp, #0xc + add r2, sp, #0 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + str r1, [r2, #8] + ldr r1, [r0, #0x20] + ldr r2, [sp] + ldr r1, [r1, #0] + ldr r1, [r1, #4] + add r1, r2, r1 + str r1, [r0, #0x28] + ldr r1, [r0, #0x20] + ldr r2, [sp, #4] + ldr r1, [r1, #0] + ldr r1, [r1, #8] + add r1, r2, r1 + str r1, [r0, #0x2c] + ldr r1, [r0, #0x20] + ldr r2, [sp, #8] + ldr r1, [r1, #0] + ldr r1, [r1, #0xc] + add r1, r2, r1 + str r1, [r0, #0x30] + add sp, #0xc + pop {r3} + bx lr + thumb_func_end ov17_02248990 + + thumb_func_start ov17_022489C8 +ov17_022489C8: ; 0x022489C8 + push {r4, lr} + add r4, r1, #0 + ldrb r2, [r4, #0x14] + cmp r2, #0 + beq _022489D8 + cmp r2, #1 + beq _022489FC + b _02248A14 +_022489D8: + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #0x10] + str r0, [r4, #8] + mov r0, #0x16 + bl ov12_02236004 + str r0, [r4, #0xc] + bl ov12_02236320 + ldr r0, [r4, #0xc] + ldr r1, _02248A20 ; =ov17_02248990 + bl ov12_02236384 + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r4, pc} +_022489FC: + ldr r0, [r4, #0xc] + bl ov12_022363C4 + cmp r0, #0 + bne _02248A1C + ldr r0, [r4, #0xc] + bl ov12_02236428 + ldrb r0, [r4, #0x14] + add r0, r0, #1 + strb r0, [r4, #0x14] + pop {r4, pc} +_02248A14: + mov r1, #1 + strb r1, [r4, #0x15] + bl sub_0200DA58 +_02248A1C: + pop {r4, pc} + nop +_02248A20: .word ov17_02248990 + thumb_func_end ov17_022489C8 + + thumb_func_start ov17_02248A24 +ov17_02248A24: ; 0x02248A24 + push {r3, r4, r5, lr} + sub sp, #0x28 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #8] + cmp r0, #0 + beq _02248A3C + cmp r0, #1 + beq _02248A56 + cmp r0, #2 + beq _02248A86 + b _02248A90 +_02248A3C: + ldrb r0, [r4, #0xa] + add r0, r0, #1 + strb r0, [r4, #0xa] + ldrb r0, [r4, #0xa] + cmp r0, #1 + blo _02248AA0 + mov r0, #0 + strb r0, [r4, #0xa] + ldrb r0, [r4, #8] + add sp, #0x28 + add r0, r0, #1 + strb r0, [r4, #8] + pop {r3, r4, r5, pc} +_02248A56: + mov r0, #0xe + str r0, [sp] + mov r0, #0x16 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r4, #0] + ldr r0, [r0, #0x28] + str r0, [sp, #0x1c] + ldr r0, [r4, #0] + ldr r0, [r0, #0x50] + str r0, [sp, #0x20] + mov r0, #1 + str r0, [sp, #0x14] + add r0, sp, #0 + bl ov12_02237728 + str r0, [r4, #4] + ldrb r0, [r4, #8] + add sp, #0x28 + add r0, r0, #1 + strb r0, [r4, #8] + pop {r3, r4, r5, pc} +_02248A86: + ldr r0, [r4, #4] + bl ov12_022377F8 + cmp r0, #1 + beq _02248AA0 +_02248A90: + ldr r0, [r4, #4] + bl ov12_0223783C + mov r0, #1 + strb r0, [r4, #9] + add r0, r5, #0 + bl sub_0200DA58 +_02248AA0: + add sp, #0x28 + pop {r3, r4, r5, pc} + thumb_func_end ov17_02248A24 + + thumb_func_start ov17_02248AA4 +ov17_02248AA4: ; 0x02248AA4 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xe] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + add r6, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #0 + beq _02248ACA + cmp r0, #1 + beq _02248B1A + b _02248BCC +_02248ACA: + mov r1, #0 + str r1, [r4, #4] + str r1, [r4, #8] + ldrb r0, [r4, #0xe] + mov r3, #0xf2 + ldr r2, [r4, #0] + lsl r0, r0, #4 + add r0, r2, r0 + lsl r3, r3, #4 + ldr r0, [r0, r3] + add r2, r1, #0 + add r3, #0xe0 + bl ov22_0225B0EC + ldrb r1, [r4, #0xe] + ldr r2, [r4, #0] + mov r0, #0x80 + lsl r1, r1, #4 + add r2, r2, r1 + ldr r1, _02248BDC ; =0x00000F24 + str r0, [r2, r1] + ldrb r2, [r4, #0xe] + ldr r3, [r4, #0] + mov r0, #0x68 + lsl r2, r2, #4 + add r3, r3, r2 + add r2, r1, #4 + str r0, [r3, r2] + ldrb r0, [r4, #0xe] + ldr r2, [r4, #0] + lsl r0, r0, #4 + add r2, r2, r0 + sub r0, r1, #4 + ldr r0, [r2, r0] + mov r1, #1 + bl ov22_0225B074 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02248B1A: + mov r0, #2 + ldr r1, [r4, #4] + lsl r0, r0, #8 + add r1, r1, r0 + str r1, [r4, #4] + ldr r1, [r4, #8] + add r1, r1, r0 + str r1, [r4, #8] + ldr r2, [r4, #4] + lsl r1, r0, #3 + cmp r2, r1 + blt _02248B38 + lsl r0, r0, #3 + str r0, [r4, #4] + str r0, [r4, #8] +_02248B38: + ldrb r0, [r4, #0xe] + mov r3, #0xf2 + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + lsl r3, r3, #4 + ldr r0, [r0, r3] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + add r3, #0xe0 + bl ov22_0225B0EC + ldrb r0, [r4, #0xe] + mov r2, #0xf2 + lsl r2, r2, #4 + lsl r1, r0, #4 + ldr r0, [r4, #0] + add r3, r0, r1 + add r1, r2, #4 + ldr r0, [r3, r2] + add r2, #8 + ldr r1, [r3, r1] + ldr r2, [r3, r2] + add r3, r6, #0 + bl ov22_0225B158 + mov r0, #1 + ldr r1, [r4, #4] + lsl r0, r0, #0xc + cmp r1, r0 + blt _02248BD6 + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xe] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #5 + bl sub_02074470 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0xc] + ldrb r0, [r4, #0xe] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x70 + bl sub_02074470 + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r2, #0x7f + str r2, [sp, #4] + str r1, [sp, #8] + mov r0, #0x16 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + ldrb r6, [r4, #0xe] + ldr r0, [r0, #0] + add r2, #0xdd + lsl r6, r6, #2 + add r0, r0, r6 + ldr r0, [r0, r2] + lsl r2, r5, #0x10 + lsr r2, r2, #0x10 + bl sub_02077D3C + ldrb r0, [r4, #0xc] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r4, r5, r6, pc} +_02248BCC: + mov r0, #1 + strb r0, [r4, #0xd] + add r0, r5, #0 + bl sub_0200DA58 +_02248BD6: + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02248BDC: .word 0x00000F24 + thumb_func_end ov17_02248AA4 + + thumb_func_start ov17_02248BE0 +ov17_02248BE0: ; 0x02248BE0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0xc] + cmp r0, #4 + bls _02248BEE + b _02248D16 +_02248BEE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02248BFA: ; jump table + .short _02248C04 - _02248BFA - 2 ; case 0 + .short _02248C2A - _02248BFA - 2 ; case 1 + .short _02248C4C - _02248BFA - 2 ; case 2 + .short _02248CBA - _02248BFA - 2 ; case 3 + .short _02248CD2 - _02248BFA - 2 ; case 4 +_02248C04: + ldr r0, [r4, #0] + ldr r0, [r0, #0x24] + cmp r0, #0 + bne _02248C10 + bl sub_02022974 +_02248C10: + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xf] + cmp r0, #1 + bhi _02248C1E + b _02248D26 +_02248C1E: + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02248C2A: + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0x24] + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #4] + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x24] + bl sub_020080C0 + lsl r0, r0, #8 + str r0, [r4, #8] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02248C4C: + ldrb r1, [r4, #0xe] + mov r0, #1 + tst r0, r1 + ldr r0, [r4, #0] + beq _02248C7E + ldr r3, [r4, #4] + ldr r0, [r0, #0x24] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r3, [r4, #8] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + b _02248CA6 +_02248C7E: + ldr r3, [r4, #4] + ldr r0, [r0, #0x24] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r3, [r4, #8] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + asr r2, r2, #8 + ldr r0, [r0, #0x24] + mov r1, #1 + sub r2, r2, #3 + bl sub_02007DEC +_02248CA6: + ldrb r0, [r4, #0xe] + add r0, r0, #1 + strb r0, [r4, #0xe] + ldrb r0, [r4, #0xe] + cmp r0, #3 + blo _02248D26 + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02248CBA: + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xf] + cmp r0, #7 + blo _02248D26 + mov r0, #0 + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_02248CD2: + mov r0, #1 + ldr r1, [r4, #4] + lsl r0, r0, #0xa + add r1, r1, r0 + mov r0, #5 + lsl r0, r0, #0xe + str r1, [r4, #4] + cmp r1, r0 + blt _02248CEC + str r0, [r4, #4] + ldrb r0, [r4, #0xc] + add r0, r0, #1 + strb r0, [r4, #0xc] +_02248CEC: + ldr r3, [r4, #4] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r3, [r4, #8] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + ldr r0, [r0, #0x24] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_02248D16: + ldr r0, [r4, #0] + bl ov17_02247918 + mov r0, #1 + strb r0, [r4, #0xd] + add r0, r5, #0 + bl sub_0200DA58 +_02248D26: + pop {r3, r4, r5, pc} + thumb_func_end ov17_02248BE0 + + thumb_func_start ov17_02248D28 +ov17_02248D28: ; 0x02248D28 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02248D28 + + thumb_func_start ov17_02248D3C +ov17_02248D3C: ; 0x02248D3C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x16 + mov r1, #0x1c + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x1c + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _02248D9C ; =0x00007530 + str r0, [r4, #0] + ldrh r0, [r6] + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] + ldrb r0, [r5] + strb r0, [r4, #0x11] + ldrb r0, [r5, #3] + strb r0, [r4, #0x13] + ldrb r0, [r5, #4] + strb r0, [r4, #0x14] + ldrb r0, [r5, #5] + strb r0, [r4, #0x15] + ldrb r0, [r5, #6] + strb r0, [r4, #0x16] + ldrb r0, [r5, #7] + strb r0, [r4, #0x17] + ldrb r0, [r5, #9] + strb r0, [r4, #0x19] + ldrb r0, [r5, #8] + strb r0, [r4, #0x18] + ldr r0, _02248DA0 ; =ov17_02248DA4 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248D9C: .word 0x00007530 +_02248DA0: .word ov17_02248DA4 + thumb_func_end ov17_02248D3C + + thumb_func_start ov17_02248DA4 +ov17_02248DA4: ; 0x02248DA4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02248DBA + cmp r0, #1 + beq _02248DF2 + cmp r0, #2 + beq _02248E04 + b _02248E3C +_02248DBA: + ldrb r0, [r4, #0x17] + cmp r0, #0 + beq _02248DEC + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x34 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + add r2, r4, #0 + ldrb r1, [r4, #0x17] + ldr r0, [r4, #0] + add r2, #0x13 + bl ov17_02247A08 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248DEC: + mov r0, #0x64 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248DF2: + ldr r0, [r4, #0] + bl ov17_02247A3C + cmp r0, #0 + bne _02248E54 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248E04: + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] + ldrb r0, [r4, #0x19] + cmp r0, #1 + bne _02248E18 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248E18: + ldrb r1, [r4, #0x12] + ldrb r0, [r4, #0x18] + cmp r1, r0 + blo _02248E54 + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x34 + bl sub_0200E084 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248E3C: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02248E54: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02248DA4 + + thumb_func_start ov17_02248E58 +ov17_02248E58: ; 0x02248E58 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02248E58 + + thumb_func_start ov17_02248E6C +ov17_02248E6C: ; 0x02248E6C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x16 + mov r1, #0x18 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x18 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _02248EBC ; =0x00007530 + str r0, [r4, #0] + ldrh r0, [r5] + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] + mov r0, #0xa + ldrsb r0, [r6, r0] + strb r0, [r4, #0x11] + mov r0, #0xb + ldrsb r0, [r6, r0] + strb r0, [r4, #0x12] + mov r0, #0xc + ldrsb r0, [r6, r0] + strb r0, [r4, #0x13] + ldr r0, _02248EC0 ; =ov17_02248EC4 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248EBC: .word 0x00007530 +_02248EC0: .word ov17_02248EC4 + thumb_func_end ov17_02248E6C + + thumb_func_start ov17_02248EC4 +ov17_02248EC4: ; 0x02248EC4 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02248ED8 + cmp r0, #1 + beq _02248F50 + b _02248F8C +_02248ED8: + ldr r0, [r4, #0] + ldr r1, [r0, #0] + ldr r0, _02248FA8 ; =0x00000171 + ldrb r0, [r1, r0] + cmp r0, #1 + bne _02248F32 + ldr r0, _02248FAC ; =0x04000048 + ldr r1, _02248FB0 ; =0xFFFFC0FF + ldrh r2, [r0] + and r2, r1 + mov r1, #0x1f + lsl r1, r1, #8 + orr r1, r2 + strh r1, [r0] + ldrh r2, [r0, #2] + mov r1, #0x3f + bic r2, r1 + mov r1, #0x1f + orr r2, r1 + mov r1, #0x20 + orr r2, r1 + strh r2, [r0, #2] + lsl r3, r1, #0x15 + ldr r2, [r3, #0] + ldr r0, _02248FB4 ; =0xFFFF1FFF + and r2, r0 + lsl r0, r1, #9 + orr r0, r2 + str r0, [r3, #0] + ldr r1, [r4, #0] + ldr r0, _02248FB8 ; =0x00000F64 + mov r2, #0xf0 + strb r2, [r1, r0] + ldr r2, [r4, #0] + mov r3, #0 + add r1, r0, #1 + strb r3, [r2, r1] + add r1, r0, #2 + ldr r2, [r4, #0] + mov r3, #0xff + strb r3, [r2, r1] + ldr r1, [r4, #0] + mov r2, #0x10 + add r0, r0, #3 + strb r2, [r1, r0] +_02248F32: + mov r0, #1 + str r0, [sp] + mov r1, #0x12 + mov r2, #0x11 + ldrb r0, [r4, #0x13] + ldrsb r1, [r4, r1] + ldrsb r2, [r4, r2] + mov r3, #0x3d + bl sub_0200AAE0 + ldrb r0, [r4, #0x10] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248F50: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _02248FA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xd0 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + ldr r0, [r0, #0x50] + add r3, r1, #0 + bl sub_020038B0 + mov r2, #0 + str r2, [sp] + mov r0, #0xe0 + str r0, [sp, #4] + ldr r0, [r4, #0] + mov r1, #2 + ldr r0, [r0, #0x50] + add r3, r2, #0 + bl sub_020038B0 + ldrb r0, [r4, #0x10] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02248F8C: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02248FA4: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02248FA8: .word 0x00000171 +_02248FAC: .word 0x04000048 +_02248FB0: .word 0xFFFFC0FF +_02248FB4: .word 0xFFFF1FFF +_02248FB8: .word 0x00000F64 + thumb_func_end ov17_02248EC4 + + thumb_func_start ov17_02248FBC +ov17_02248FBC: ; 0x02248FBC + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02248FBC + + thumb_func_start ov17_02248FD0 +ov17_02248FD0: ; 0x02248FD0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x1c + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x1c + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _0224900C ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _02249010 ; =ov17_02249014 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224900C: .word 0x00007530 +_02249010: .word ov17_02249014 + thumb_func_end ov17_02248FD0 + + thumb_func_start ov17_02249014 +ov17_02249014: ; 0x02249014 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r1, #0x18] + str r1, [sp] + add r1, r0, #1 + ldr r0, [sp] + cmp r1, #0x1e + str r1, [r0, #0x18] + bne _02249030 + mov r1, #0x1e + strb r1, [r0, #0x13] + mov r1, #1 + strb r1, [r0, #0x15] +_02249030: + ldr r0, [sp] + ldr r0, [r0, #0] + ldr r1, [r0, #0] + ldr r0, _02249228 ; =0x00000171 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224906A + ldr r0, [sp] + ldr r0, [r0, #0x18] + cmp r0, #0x1e + bge _0224906A + ldr r0, _0224922C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _02249058 + ldr r0, _02249230 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + beq _0224906A +_02249058: + ldr r0, [sp] + mov r1, #0x1e + str r1, [r0, #0x18] + ldr r1, [sp] + mov r0, #0 + strb r0, [r1, #0x13] + mov r2, #1 + strb r2, [r1, #0x15] + b _02249078 +_0224906A: + ldr r0, [sp] + ldr r0, [r0, #0x18] + cmp r0, #0x1e + ble _02249076 + mov r0, #0 + b _02249078 +_02249076: + mov r0, #1 +_02249078: + ldr r1, [sp] + ldrb r1, [r1, #0x10] + cmp r1, #0 + beq _02249082 + b _022491FA +_02249082: + ldr r1, [sp] + mov r2, #0x14 + ldrsb r1, [r1, r2] + cmp r1, #0 + ble _02249096 + ldr r0, [sp] + sub r1, r1, #1 + strb r1, [r0, #0x14] + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_02249096: + ldr r1, [sp] + mov r2, #0x13 + ldrsb r1, [r1, r2] + cmp r1, #0 + ble _022490AA + ldr r0, [sp] + sub r1, r1, #1 + strb r1, [r0, #0x13] + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_022490AA: + ldr r1, [sp] + strb r0, [r1, #0x13] + add r0, r1, #0 + ldrb r0, [r0, #0x15] + cmp r0, #1 + bne _022490C2 + ldr r0, _02249234 ; =0x000006ED + bl sub_02005748 + ldr r0, [sp] + mov r1, #0 + strb r1, [r0, #0x15] +_022490C2: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _02249136 +_022490D6: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + ldr r0, _02249238 ; =0x02254468 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _02249130 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r0, [r0, #0x12] + mov r7, #0x3f + str r5, [sp, #4] + lsl r1, r0, #1 + ldr r0, _0224923C ; =0x02254470 + lsl r7, r7, #0xa + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r0, r0, #5 + add r6, r1, r0 + b _0224912A +_02249106: + mov r4, #0 + b _0224911E +_0224910A: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_0224911E: + cmp r4, #8 + blt _0224910A + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_0224912A: + ldr r0, [sp, #4] + cmp r0, #4 + blt _02249106 +_02249130: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_02249136: + ldr r0, [sp, #8] + cmp r0, #4 + blt _022490D6 + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _02249178 + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _02249178 + ldr r0, _02249238 ; =0x02254468 + sub r1, r1, #1 + ldrsb r0, [r0, r1] + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #0x3f + str r0, [sp, #4] + lsl r1, r1, #0xa + b _02249172 +_02249162: + ldr r0, [sp, #4] + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r1 + strh r0, [r3, r2] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_02249172: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _02249162 +_02249178: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldr r0, [sp] + mov r1, #0xc + ldrb r0, [r0, #0x12] + lsl r0, r0, #5 + bl sub_020E2178 + ldr r1, [sp] + mov r2, #0x11 + ldrsb r2, [r1, r2] + ldr r1, _02249238 ; =0x02254468 + ldrsb r1, [r1, r2] + add r1, r1, #4 + lsl r1, r1, #3 + sub r2, r1, r0 + ldr r0, [sp] + ldr r1, _02249240 ; =0x00000F63 + ldr r0, [r0, #0] + strb r2, [r0, r1] + ldr r0, [sp] + ldr r0, [r0, #0] + ldrb r0, [r0, r1] + cmp r0, #0 + bne _022491C2 + ldr r2, _02249244 ; =0x04000050 + mov r0, #0 + strh r0, [r2] + sub r2, #0x50 + ldr r1, [r2, #0] + ldr r0, _02249248 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] +_022491C2: + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _02249224 + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _02249224 + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_022491FA: + ldr r3, _02249244 ; =0x04000050 + mov r2, #0 + strh r2, [r3] + sub r3, #0x50 + ldr r1, [r3, #0] + ldr r0, _02249248 ; =0xFFFF1FFF + and r0, r1 + str r0, [r3, #0] + ldr r0, [sp] + ldr r1, [sp] + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_02249224: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249228: .word 0x00000171 +_0224922C: .word 0x021BF67C +_02249230: .word 0x021BF6BC +_02249234: .word 0x000006ED +_02249238: .word 0x02254468 +_0224923C: .word 0x02254470 +_02249240: .word 0x00000F63 +_02249244: .word 0x04000050 +_02249248: .word 0xFFFF1FFF + thumb_func_end ov17_02249014 + + thumb_func_start ov17_0224924C +ov17_0224924C: ; 0x0224924C + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224924C + + thumb_func_start ov17_02249260 +ov17_02249260: ; 0x02249260 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x16 + mov r1, #0x14 + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrh r0, [r0, #0x10] + bl sub_02005748 + ldr r0, _022492A4 ; =ov17_022492AC + ldr r2, _022492A8 ; =0x00007530 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022492A4: .word ov17_022492AC +_022492A8: .word 0x00007530 + thumb_func_end ov17_02249260 + + thumb_func_start ov17_022492AC +ov17_022492AC: ; 0x022492AC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, [r4, #0] + ldr r0, _022492D8 ; =0x000004F9 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _022492D4 + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_022492D4: + pop {r3, r4, r5, pc} + nop +_022492D8: .word 0x000004F9 + thumb_func_end ov17_022492AC + + .rodata + + + .global Unk_ov17_02254468 +Unk_ov17_02254468: ; 0x02254468 + .incbin "incbin/overlay17_rodata.bin", 0x16DC, 0x16E4 - 0x16DC + + .global Unk_ov17_02254470 +Unk_ov17_02254470: ; 0x02254470 + .incbin "incbin/overlay17_rodata.bin", 0x16E4, 0x16FC - 0x16E4 + + .global Unk_ov17_02254488 +Unk_ov17_02254488: ; 0x02254488 + .incbin "incbin/overlay17_rodata.bin", 0x16FC, 0xCC + diff --git a/asm/ov17_022492DC.s b/asm/ov17_022492DC.s new file mode 100644 index 000000000..af44569eb --- /dev/null +++ b/asm/ov17_022492DC.s @@ -0,0 +1,1876 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_022492DC +ov17_022492DC: ; 0x022492DC + push {r4, lr} + mov r0, #0x17 + mov r1, #0xf4 + bl sub_02018144 + mov r1, #0 + mov r2, #0xf4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r1, #0 + add r0, r4, #0 + mvn r1, r1 + add r0, #0x96 + strb r1, [r0] + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_022492DC + + thumb_func_start ov17_02249300 +ov17_02249300: ; 0x02249300 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r6, _02249354 ; =0x022545C0 + add r5, r0, #0 + add r7, r4, #0 +_0224930A: + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r2, r6, #0 + add r3, r7, #0 + bl sub_020183C4 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl sub_02019EE0 + add r1, r4, #4 + lsl r1, r1, #0x18 + mov r2, #0 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02019184 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r4, r4, #1 + add r6, #0x1c + cmp r4, #4 + blo _0224930A + pop {r3, r4, r5, r6, r7, pc} + nop +_02249354: .word 0x022545C0 + thumb_func_end ov17_02249300 + + thumb_func_start ov17_02249358 +ov17_02249358: ; 0x02249358 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_02249360: + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r6, #0 + bl sub_02019120 + add r1, r4, #4 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + cmp r4, #4 + blo _02249360 + pop {r4, r5, r6, pc} + thumb_func_end ov17_02249358 + + thumb_func_start ov17_02249380 +ov17_02249380: ; 0x02249380 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov17_022492DC + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + mov r0, #6 + mov r1, #0x17 + bl sub_02012744 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov17_022493DC + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov17_02249380 + + thumb_func_start ov17_022493A4 +ov17_022493A4: ; 0x022493A4 + push {r4, lr} + add r4, r0, #0 + bl ov17_022495F8 + add r0, r4, #0 + mov r1, #1 + bl ov17_02249D3C + ldr r0, [r4, #0x18] + bl sub_020127BC + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_022493A4 + + thumb_func_start ov17_022493C4 +ov17_022493C4: ; 0x022493C4 + push {r4, lr} + add r4, r0, #0 + bl ov17_02249828 + add r0, r4, #0 + bl ov17_022498F4 + add r0, r4, #0 + mov r1, #0 + bl ov17_02249CFC + pop {r4, pc} + thumb_func_end ov17_022493C4 + + thumb_func_start ov17_022493DC +ov17_022493DC: ; 0x022493DC + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #6 + add r4, r0, #0 + mov r0, #0x17 + lsl r1, r1, #0xc + bl sub_02018144 + add r1, r4, #0 + add r1, #0xd0 + str r0, [r1, #0] + mov r1, #6 + mov r0, #0x17 + lsl r1, r1, #0xc + bl sub_02018144 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] + mov r1, #0x1b + mov r0, #0x17 + lsl r1, r1, #8 + bl sub_02018144 + add r1, r4, #0 + add r1, #0xd8 + str r0, [r1, #0] + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #0xa + bl sub_02018144 + add r1, r4, #0 + add r1, #0xdc + str r0, [r1, #0] + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #0xa + bl sub_02018144 + add r1, r4, #0 + add r1, #0xe0 + str r0, [r1, #0] + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #0xa + bl sub_02018144 + add r1, r4, #0 + add r1, #0xe4 + str r0, [r1, #0] + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #0xa + bl sub_02018144 + add r1, r4, #0 + add r1, #0xe8 + str r0, [r1, #0] + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #8 + bl sub_02018144 + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + mov r1, #2 + mov r0, #0x17 + lsl r1, r1, #8 + bl sub_02018144 + add r1, r4, #0 + add r1, #0xf0 + str r0, [r1, #0] + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #9 + mov r2, #1 + add r3, sp, #0xc + bl sub_02006F50 + add r5, r0, #0 + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r1, #0xd0 + mov r2, #6 + ldr r0, [r0, #0x14] + ldr r1, [r1, #0] + lsl r2, r2, #0xc + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #0x12 + mov r2, #1 + add r3, sp, #0xc + bl sub_02006F50 + add r5, r0, #0 + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r1, #0xd4 + mov r2, #6 + ldr r0, [r0, #0x14] + ldr r1, [r1, #0] + lsl r2, r2, #0xc + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #0x10 + mov r2, #1 + add r3, sp, #0xc + bl sub_02006F50 + add r5, r0, #0 + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r1, #0xd8 + mov r2, #0x1b + ldr r0, [r0, #0x14] + ldr r1, [r1, #0] + lsl r2, r2, #8 + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #7 + mov r2, #1 + add r3, sp, #8 + bl sub_02006F6C + add r1, r4, #0 + add r5, r0, #0 + ldr r0, [sp, #8] + add r1, #0xdc + mov r2, #2 + ldr r1, [r1, #0] + add r0, #0xc + lsl r2, r2, #0xa + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #8 + mov r2, #1 + add r3, sp, #8 + bl sub_02006F6C + add r1, r4, #0 + add r5, r0, #0 + ldr r0, [sp, #8] + add r1, #0xe0 + mov r2, #2 + ldr r1, [r1, #0] + add r0, #0xc + lsl r2, r2, #0xa + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #0x11 + mov r2, #1 + add r3, sp, #8 + bl sub_02006F6C + add r1, r4, #0 + add r5, r0, #0 + ldr r0, [sp, #8] + add r1, #0xe4 + mov r2, #2 + ldr r1, [r1, #0] + add r0, #0xc + lsl r2, r2, #0xa + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0x17 + str r0, [sp] + mov r0, #0x2d + mov r1, #0x1c + mov r2, #1 + add r3, sp, #8 + bl sub_02006F6C + add r1, r4, #0 + add r5, r0, #0 + ldr r0, [sp, #8] + add r1, #0xe8 + mov r2, #2 + ldr r1, [r1, #0] + add r0, #0xc + lsl r2, r2, #0xa + bl sub_020C4B68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + mov r3, #2 + str r0, [sp, #4] + mov r0, #0x2d + mov r1, #0x1f + mov r2, #0x17 + lsl r3, r3, #8 + bl sub_020030E4 + ldr r0, [r4, #4] + mov r2, #0x17 + ldr r1, [r0, #0] + ldr r0, _022495F4 ; =0x0000011F + mov r3, #0x20 + ldrb r0, [r1, r0] + mov r1, #0x26 + lsl r0, r0, #0x14 + lsr r0, r0, #0x10 + str r0, [sp] + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + add r0, #0x40 + str r0, [sp, #4] + mov r0, #0x2d + bl sub_020030E4 + mov r0, #0 + mov r3, #2 + add r4, #0xf0 + str r0, [sp] + ldr r0, [r4, #0] + mov r1, #0x21 + str r0, [sp, #4] + mov r0, #0x2d + mov r2, #0x17 + lsl r3, r3, #8 + bl sub_020030E4 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_022495F4: .word 0x0000011F + thumb_func_end ov17_022493DC + + thumb_func_start ov17_022495F8 +ov17_022495F8: ; 0x022495F8 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 +_02249600: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_020181C4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #3 + blt _02249600 + mov r6, #0 + add r4, r5, #0 +_02249616: + add r0, r4, #0 + add r0, #0xdc + ldr r0, [r0, #0] + bl sub_020181C4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _02249616 + mov r4, #0 +_0224962A: + add r0, r5, #0 + add r0, #0xec + ldr r0, [r0, #0] + bl sub_020181C4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0224962A + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_022495F8 + + thumb_func_start ov17_02249640 +ov17_02249640: ; 0x02249640 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + str r3, [r7, #8] + ldr r0, [r7, #4] + str r2, [sp, #8] + ldr r0, [r0, #0x60] + str r1, [sp, #4] + str r0, [sp, #0xc] + mov r0, #0x96 + ldrsb r2, [r7, r0] + sub r0, #0x97 + cmp r2, r0 + bne _02249664 + mov r0, #1 + str r0, [sp, #8] + mov r6, #0 + b _0224966C +_02249664: + mov r0, #0x24 + ldr r1, _02249750 ; =0x02254578 + mul r0, r2 + add r6, r1, r0 +_0224966C: + ldr r0, [sp, #4] + mov r1, #0x24 + ldr r2, _02249750 ; =0x02254578 + mul r1, r0 + add r0, r2, r1 + str r0, [sp, #0x10] + mov r4, #0 + add r5, r0, #0 +_0224967C: + ldrh r1, [r5, #0xc] + add r0, r4, #4 + lsl r0, r0, #0x18 + lsl r1, r1, #0x18 + lsr r0, r0, #0x18 + lsr r1, r1, #0x18 + bl sub_02019060 + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _0224967C + ldr r0, [sp, #0x10] + mov r2, #8 + ldrh r1, [r0] + add r0, r7, #0 + add r0, #0x94 + strh r1, [r0] + ldr r0, _02249754 ; =ov17_0224A088 + add r1, r7, #0 + bl sub_0200DA3C + ldr r0, [sp, #0x10] + ldrh r1, [r0, #2] + ldr r0, _02249758 ; =0x0000FFFF + cmp r1, r0 + beq _022496DA + ldr r0, [sp, #8] + cmp r0, #1 + beq _022496BE + ldrh r0, [r6, #2] + cmp r1, r0 + beq _022496DA +_022496BE: + mov r0, #2 + lsl r0, r0, #8 + str r0, [sp] + ldr r0, [r7, #4] + lsl r1, r1, #2 + add r1, r7, r1 + add r0, #0x90 + add r1, #0xec + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #1 + mov r3, #0 + bl sub_02002FBC +_022496DA: + ldr r4, [sp, #0x10] + mov r5, #0 +_022496DE: + ldrh r2, [r4, #4] + ldr r0, _02249758 ; =0x0000FFFF + cmp r2, r0 + beq _02249716 + ldr r0, [sp, #8] + cmp r0, #1 + beq _022496F2 + ldrh r0, [r6, #4] + cmp r2, r0 + beq _02249716 +_022496F2: + lsl r2, r2, #2 + add r2, r7, r2 + add r1, r5, #4 + add r2, #0xdc + lsl r1, r1, #0x18 + mov r3, #2 + ldr r0, [sp, #0xc] + ldr r2, [r2, #0] + lsr r1, r1, #0x18 + lsl r3, r3, #0xa + bl sub_02019574 + add r1, r5, #4 + lsl r1, r1, #0x18 + ldr r0, [sp, #0xc] + lsr r1, r1, #0x18 + bl sub_0201C3C0 +_02249716: + add r5, r5, #1 + add r4, r4, #2 + add r6, r6, #2 + cmp r5, #4 + blt _022496DE + add r1, r7, #0 + ldr r0, [sp, #4] + add r1, #0x96 + strb r0, [r1] + add r0, r7, #0 + mov r1, #0 + bl ov17_02249D3C + ldr r0, [sp, #0x10] + ldr r3, [r0, #0x1c] + cmp r3, #0 + beq _02249740 + ldr r1, [sp, #4] + ldr r2, [sp, #8] + add r0, r7, #0 + blx r3 +_02249740: + ldr r0, _0224975C ; =ov17_0224A038 + add r1, r7, #0 + mov r2, #0xa + bl sub_0200DA3C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02249750: .word 0x02254578 +_02249754: .word ov17_0224A088 +_02249758: .word 0x0000FFFF +_0224975C: .word ov17_0224A038 + thumb_func_end ov17_02249640 + + thumb_func_start ov17_02249760 +ov17_02249760: ; 0x02249760 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x96 + ldrsb r1, [r5, r0] + sub r0, #0x97 + cmp r1, r0 + bne _02249772 + bl sub_02022974 +_02249772: + mov r0, #0x96 + ldrsb r1, [r5, r0] + ldr r3, _022497F8 ; =0x02254578 + mov r0, #0x24 + add r2, r1, #0 + mul r2, r0 + add r4, r3, r2 + ldr r1, [r4, #0x14] + cmp r1, #0 + bne _0224978A + sub r0, #0x25 + pop {r4, r5, r6, pc} +_0224978A: + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _02249794 + bl sub_02022974 +_02249794: + ldr r0, [r4, #0x14] + bl sub_02022664 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _022497D8 + ldr r2, [r4, #0x18] + ldr r1, _022497FC ; =0x02254554 + cmp r2, r1 + bne _022497D8 + ldr r1, _02249800 ; =0x021BF67C + mov r2, #0x11 + ldr r1, [r1, #0x48] + add r3, r1, #0 + tst r3, r2 + beq _022497BA + mov r0, #3 + b _022497D8 +_022497BA: + mov r3, #0x82 + add r6, r1, #0 + tst r6, r3 + beq _022497C6 + mov r0, #1 + b _022497D8 +_022497C6: + lsl r2, r2, #6 + tst r2, r1 + beq _022497D0 + mov r0, #0 + b _022497D8 +_022497D0: + lsl r2, r3, #4 + tst r1, r2 + beq _022497D8 + mov r0, #2 +_022497D8: + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _022497E6 + ldr r1, [r4, #0x18] + lsl r0, r0, #2 + ldr r1, [r1, r0] +_022497E6: + ldr r2, [r4, #0x20] + cmp r2, #0 + beq _022497F2 + add r0, r5, #0 + blx r2 + add r1, r0, #0 +_022497F2: + add r0, r1, #0 + pop {r4, r5, r6, pc} + nop +_022497F8: .word 0x02254578 +_022497FC: .word 0x02254554 +_02249800: .word 0x021BF67C + thumb_func_end ov17_02249760 + + thumb_func_start ov17_02249804 +ov17_02249804: ; 0x02249804 + ldr r0, [r0, #0xc] + cmp r0, #0 + bne _0224980E + mov r0, #1 + bx lr +_0224980E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02249804 + + thumb_func_start ov17_02249814 +ov17_02249814: ; 0x02249814 + mov r1, #0x96 + ldrsb r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov17_02249814 + + thumb_func_start ov17_0224981C +ov17_0224981C: ; 0x0224981C + ldr r3, _02249824 ; =ov17_02249CFC + mov r1, #1 + bx r3 + nop +_02249824: .word ov17_02249CFC + thumb_func_end ov17_0224981C + + thumb_func_start ov17_02249828 +ov17_02249828: ; 0x02249828 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #1 + mov r1, #0x1a + mov r2, #0xcc + mov r3, #0x17 + bl sub_0200B144 + add r4, r0, #0 + ldr r0, [r5, #4] + mov r2, #0x12 + lsl r2, r2, #4 + ldr r3, [r0, #0] + add r1, r2, #1 + ldrb r0, [r3, r2] + ldrb r1, [r3, r1] + ldr r3, [r5, #0] + add r2, #0x51 + ldrb r2, [r3, r2] + bl sub_02095848 + add r6, r0, #0 + ldr r0, [r5, #4] + ldr r1, _022498DC ; =0x0000011F + ldr r2, [r0, #0] + ldrb r0, [r2, r1] + add r1, r1, #2 + ldrb r1, [r2, r1] + bl sub_020958C4 + add r7, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, _022498E0 ; =0x00010200 + add r1, r5, #0 + str r0, [sp] + mov r3, #0 + ldr r0, _022498E4 ; =0x000080EB + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x7f + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, #0x1c + add r2, r6, #0 + bl ov17_02249BC4 + ldr r0, _022498E0 ; =0x00010200 + mov r3, #0 + str r0, [sp] + ldr r0, _022498E4 ; =0x000080EB + str r3, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x9f + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + add r0, r5, #0 + add r5, #0x30 + add r1, r5, #0 + add r2, r7, #0 + bl ov17_02249BC4 + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B190 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_022498DC: .word 0x0000011F +_022498E0: .word 0x00010200 +_022498E4: .word 0x000080EB + thumb_func_end ov17_02249828 + + thumb_func_start ov17_022498E8 +ov17_022498E8: ; 0x022498E8 + ldr r3, _022498F0 ; =ov17_02249CFC + mov r1, #1 + bx r3 + nop +_022498F0: .word ov17_02249CFC + thumb_func_end ov17_022498E8 + + thumb_func_start ov17_022498F4 +ov17_022498F4: ; 0x022498F4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + ldr r2, [r0, #4] + str r0, [sp, #0x18] + add r0, r2, #0 + add r0, #0x84 + ldr r5, [r0, #0] + ldr r1, [r2, #0] + ldr r0, _022499FC ; =0x00000123 + ldrb r0, [r1, r0] + add r1, r2, r0 + ldr r0, _02249A00 ; =0x00000ABC + ldrb r0, [r1, r0] + cmp r0, #1 + bne _0224991C + add r0, r5, #0 + mov r1, #0 + bl sub_0200B1EC + b _02249924 +_0224991C: + add r0, r5, #0 + mov r1, #1 + bl sub_0200B1EC +_02249924: + add r4, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #3 + bl sub_0200B1EC + add r7, r0, #0 + add r0, r5, #0 + mov r1, #4 + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, _02249A04 ; =0x0001010B + add r2, r4, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02249A08 ; =0x000080EB + mov r3, #2 + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x18 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r1, r0, #0 + add r1, #0x44 + bl ov17_02249BC4 + ldr r0, _02249A04 ; =0x0001010B + add r2, r6, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02249A08 ; =0x000080EB + mov r3, #2 + str r0, [sp, #8] + mov r0, #0x80 + str r0, [sp, #0xc] + mov r0, #0x78 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r1, r0, #0 + add r1, #0x58 + bl ov17_02249BC4 + ldr r0, _02249A04 ; =0x0001010B + add r2, r7, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02249A08 ; =0x000080EB + mov r3, #2 + str r0, [sp, #8] + mov r0, #0x30 + str r0, [sp, #0xc] + mov r0, #0x40 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r1, r0, #0 + add r1, #0x6c + bl ov17_02249BC4 + ldr r0, _02249A04 ; =0x0001010B + add r2, r5, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02249A08 ; =0x000080EB + mov r3, #2 + str r0, [sp, #8] + mov r0, #0xd0 + str r0, [sp, #0xc] + mov r0, #0x40 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r1, r0, #0 + add r1, #0x80 + str r1, [sp, #0x18] + bl ov17_02249BC4 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_020237BC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_022499FC: .word 0x00000123 +_02249A00: .word 0x00000ABC +_02249A04: .word 0x0001010B +_02249A08: .word 0x000080EB + thumb_func_end ov17_022498F4 + + thumb_func_start ov17_02249A0C +ov17_02249A0C: ; 0x02249A0C + push {r4, r5, r6, lr} + add r6, r1, #0 + add r4, r0, #0 + add r0, r6, #1 + cmp r0, #4 + bhi _02249A2E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02249A24: ; jump table + .short _02249A2E - _02249A24 - 2 ; case 0 + .short _02249A32 - _02249A24 - 2 ; case 1 + .short _02249A36 - _02249A24 - 2 ; case 2 + .short _02249A3A - _02249A24 - 2 ; case 3 + .short _02249A3E - _02249A24 - 2 ; case 4 +_02249A2E: + add r0, r6, #0 + pop {r4, r5, r6, pc} +_02249A32: + mov r5, #2 + b _02249A40 +_02249A36: + mov r5, #3 + b _02249A40 +_02249A3A: + mov r5, #4 + b _02249A40 +_02249A3E: + mov r5, #5 +_02249A40: + ldr r0, _02249A9C ; =ov17_02249DA0 + add r1, r4, #0 + bl ov17_02249D50 + add r0, r4, #0 + mov r1, #2 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0x12 + add r0, #0xca + strh r1, [r0] + add r0, r4, #0 + mov r1, #0x2d + add r0, #0xc8 + strh r1, [r0] + mov r0, #0xc + ldr r1, _02249AA0 ; =0x02254630 + mul r0, r6 + add r2, r1, r0 + add r1, r4, #0 + add r1, #0xa0 + str r2, [r1, #0] + ldr r1, _02249AA4 ; =0x02254660 + add r2, r1, r0 + add r1, r4, #0 + add r1, #0xa4 + str r2, [r1, #0] + ldr r1, _02249AA8 ; =0x02254690 + add r1, r1, r0 + add r0, r4, #0 + add r0, #0xa8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + str r6, [r0, #0] + add r4, #0xcc + strb r5, [r4] + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02249A9C: .word ov17_02249DA0 +_02249AA0: .word 0x02254630 +_02249AA4: .word 0x02254660 +_02249AA8: .word 0x02254690 + thumb_func_end ov17_02249A0C + + thumb_func_start ov17_02249AAC +ov17_02249AAC: ; 0x02249AAC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x17 + mov r1, #0x20 + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + beq _02249AD8 + lsl r0, r5, #2 + add r0, r6, r0 + add r0, #0xd0 + ldr r0, [r0, #0] + str r0, [r4, #0xc] +_02249AD8: + ldr r0, [sp, #0x1c] + lsl r0, r0, #5 + strh r0, [r4, #0x1c] + ldr r0, [sp, #0x18] + ldrh r1, [r0] + strh r1, [r4, #0x10] + ldrh r1, [r0, #2] + strh r1, [r4, #0x12] + ldrh r1, [r0, #4] + strh r1, [r4, #0x14] + ldrh r1, [r0, #6] + strh r1, [r4, #0x16] + ldrh r1, [r0, #8] + strh r1, [r4, #0x18] + ldrh r0, [r0, #0xa] + strh r0, [r4, #0x1a] + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + bl sub_02019F28 + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02249AAC + + thumb_func_start ov17_02249B08 +ov17_02249B08: ; 0x02249B08 + push {r4, lr} + sub sp, #8 + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r4, [sp, #0x14] + str r4, [sp, #4] + bl ov17_02249AAC + add r4, r0, #0 + ldr r0, _02249B2C ; =ov17_0224A0C8 + add r1, r4, #0 + mov r2, #0x14 + bl sub_0200DA3C + str r0, [r4, #0] + add r0, r4, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_02249B2C: .word ov17_0224A0C8 + thumb_func_end ov17_02249B08 + + thumb_func_start ov17_02249B30 +ov17_02249B30: ; 0x02249B30 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _02249B4E + ldr r0, [r4, #8] + cmp r0, #0 + beq _02249B44 + bl sub_020181C4 +_02249B44: + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} +_02249B4E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02249B30 + + thumb_func_start ov17_02249B54 +ov17_02249B54: ; 0x02249B54 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrh r1, [r5, #0x16] + ldrh r0, [r5, #0x1c] + mov r6, #0 + mul r0, r1 + str r0, [sp] + ldrh r0, [r5, #0x12] + lsl r7, r0, #0xa + ldrh r0, [r5, #0x1a] + cmp r0, #0 + ble _02249BC0 + add r4, r6, #0 +_02249B6E: + ldr r2, [r5, #0xc] + cmp r2, #0 + beq _02249B9C + ldrh r0, [r5, #0x14] + ldrh r3, [r5, #0x1c] + lsl r1, r0, #5 + add r0, r3, #0 + ldr r3, [sp] + mul r0, r6 + add r0, r3, r0 + add r0, r1, r0 + ldrh r1, [r5, #0x10] + add r0, r2, r0 + ldr r3, [r5, #4] + lsl r2, r1, #5 + add r1, r7, r4 + add r1, r2, r1 + ldrh r2, [r5, #0x18] + add r1, r3, r1 + lsl r2, r2, #5 + bl sub_020C4B18 + b _02249BB2 +_02249B9C: + ldrh r1, [r5, #0x10] + ldr r3, [r5, #4] + mov r0, #0 + lsl r2, r1, #5 + add r1, r7, r4 + add r1, r2, r1 + ldrh r2, [r5, #0x18] + add r1, r3, r1 + lsl r2, r2, #5 + bl sub_020C4AF0 +_02249BB2: + mov r0, #1 + lsl r0, r0, #0xa + add r4, r4, r0 + ldrh r0, [r5, #0x1a] + add r6, r6, #1 + cmp r6, r0 + blt _02249B6E +_02249BC0: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02249B54 + + thumb_func_start ov17_02249BC4 +ov17_02249BC4: ; 0x02249BC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x78 + add r5, r1, #0 + str r0, [sp, #0x18] + ldr r0, [r5, #0] + str r2, [sp, #0x1c] + str r3, [sp, #0x20] + ldr r4, [sp, #0x9c] + cmp r0, #0 + beq _02249BDC + bl sub_02022974 +_02249BDC: + ldr r0, [sp, #0x18] + mov r2, #0 + ldr r1, [r0, #4] + ldr r0, [r1, #0x60] + str r0, [sp, #0x28] + ldr r0, [r1, #0x5c] + ldr r1, [sp, #0x1c] + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + bl sub_02002D7C + add r7, r0, #0 + asr r1, r7, #2 + lsr r1, r1, #0x1d + add r1, r7, r1 + asr r6, r1, #3 + mov r1, #8 + bl sub_020BD140 + cmp r0, #0 + beq _02249C08 + add r6, r6, #1 +_02249C08: + add r0, sp, #0x38 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + lsl r2, r6, #0x18 + ldr r0, [sp, #0x28] + add r1, sp, #0x38 + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x90] + ldr r1, [sp, #0x20] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r2, [sp, #0x1c] + add r0, sp, #0x38 + str r3, [sp, #0x14] + bl sub_0201D7E0 + add r0, sp, #0x38 + mov r1, #2 + mov r2, #0x17 + bl sub_02012898 + mov r1, #1 + mov r2, #2 + add r3, sp, #0x2c + bl sub_0201ED94 + ldr r0, [sp, #0xa4] + cmp r0, #1 + bne _02249C60 + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r0, r0, #1 + sub r4, r4, r0 +_02249C60: + ldr r0, [sp, #0x18] + ldr r0, [r0, #0x18] + str r0, [sp, #0x48] + add r0, sp, #0x38 + str r0, [sp, #0x4c] + ldr r0, [sp, #0x24] + bl sub_0200D9B0 + str r0, [sp, #0x50] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x98] + bl sub_0200D04C + mov r1, #0 + str r0, [sp, #0x54] + ldr r0, [sp, #0x30] + str r1, [sp, #0x58] + str r0, [sp, #0x5c] + ldr r0, [sp, #0xa0] + str r4, [sp, #0x60] + add r0, #0xf8 + str r0, [sp, #0x64] + mov r0, #0x64 + str r0, [sp, #0x6c] + mov r0, #2 + str r0, [sp, #0x70] + mov r0, #0x17 + str r0, [sp, #0x74] + add r0, sp, #0x48 + str r1, [sp, #0x68] + bl sub_020127E8 + ldr r1, [sp, #0x94] + add r6, r0, #0 + bl sub_02012AC0 + ldr r2, [sp, #0xa0] + add r0, r6, #0 + add r1, r4, #0 + add r2, #0xf8 + bl sub_020128C4 + add r0, sp, #0x38 + bl sub_0201A8FC + str r6, [r5, #0] + add r3, sp, #0x2c + ldmia r3!, {r0, r1} + add r2, r5, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + strh r7, [r5, #0x10] + add sp, #0x78 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02249BC4 + + thumb_func_start ov17_02249CD0 +ov17_02249CD0: ; 0x02249CD0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + add r4, #0x20 + add r7, r6, #0 +_02249CDC: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _02249CEE + bl sub_02012870 + add r0, r4, #0 + bl sub_0201EE28 + str r7, [r5, #0x1c] +_02249CEE: + add r6, r6, #1 + add r5, #0x14 + add r4, #0x14 + cmp r6, #6 + blt _02249CDC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02249CD0 + + thumb_func_start ov17_02249CFC +ov17_02249CFC: ; 0x02249CFC + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + cmp r7, #1 + bne _02249D18 + mov r1, #0x96 + ldrsb r1, [r0, r1] + cmp r1, #0 + bne _02249D12 + mov r4, #0 + mov r6, #1 + b _02249D1C +_02249D12: + mov r4, #2 + mov r6, #5 + b _02249D1C +_02249D18: + mov r4, #0 + mov r6, #5 +_02249D1C: + cmp r4, r6 + bgt _02249D3A + mov r1, #0x14 + mul r1, r4 + add r5, r0, r1 +_02249D26: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _02249D32 + add r1, r7, #0 + bl sub_020129D0 +_02249D32: + add r4, r4, #1 + add r5, #0x14 + cmp r4, r6 + ble _02249D26 +_02249D3A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_02249CFC + + thumb_func_start ov17_02249D3C +ov17_02249D3C: ; 0x02249D3C + push {r3, lr} + cmp r1, #1 + bne _02249D48 + bl ov17_02249CD0 + pop {r3, pc} +_02249D48: + mov r1, #0 + bl ov17_02249CFC + pop {r3, pc} + thumb_func_end ov17_02249D3C + + thumb_func_start ov17_02249D50 +ov17_02249D50: ; 0x02249D50 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02249D60 + bl sub_02022974 +_02249D60: + add r0, r4, #0 + add r0, #0x98 + mov r1, #0 + mov r2, #0x38 + bl sub_020C4CF4 + ldr r2, _02249D7C ; =0x00000514 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} + nop +_02249D7C: .word 0x00000514 + thumb_func_end ov17_02249D50 + + thumb_func_start ov17_02249D80 +ov17_02249D80: ; 0x02249D80 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02249D9C + bl sub_0200DA58 + mov r1, #0 + str r1, [r4, #0xc] + add r4, #0x98 + add r0, r4, #0 + mov r2, #0x38 + bl sub_020C4CF4 +_02249D9C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02249D80 + + thumb_func_start ov17_02249DA0 +ov17_02249DA0: ; 0x02249DA0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + mov r0, #0x98 + ldrsh r0, [r4, r0] + cmp r0, #8 + bls _02249DB0 + b _0224A02C +_02249DB0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02249DBC: ; jump table + .short _02249DCE - _02249DBC - 2 ; case 0 + .short _02249E56 - _02249DBC - 2 ; case 1 + .short _02249E70 - _02249DBC - 2 ; case 2 + .short _02249E96 - _02249DBC - 2 ; case 3 + .short _02249F20 - _02249DBC - 2 ; case 4 + .short _02249F3C - _02249DBC - 2 ; case 5 + .short _02249F62 - _02249DBC - 2 ; case 6 + .short _02249FEC - _02249DBC - 2 ; case 7 + .short _0224A006 - _02249DBC - 2 ; case 8 +_02249DCE: + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + add r2, r4, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0xca + ldrh r0, [r0] + add r3, r4, #0 + add r2, #0xc8 + str r0, [sp, #4] + add r3, #0xb8 + ldrh r2, [r2] + ldr r3, [r3, #0] + add r0, r4, #0 + mov r1, #4 + bl ov17_02249B08 + add r1, r4, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xcc + ldrb r1, [r0] + mov r0, #0x14 + add r2, sp, #8 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + add r1, sp, #0xc + bl sub_020129A4 + add r0, r4, #0 + add r0, #0xcc + ldrb r1, [r0] + mov r0, #0x14 + ldr r2, [sp, #8] + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + ldr r1, [sp, #0xc] + add r2, #0x10 + bl sub_020128C4 + mov r6, #0 + add r5, r4, #0 + add r7, r6, #0 +_02249E2C: + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r0, #0 + beq _02249E40 + ldr r0, [r0, #0] + add r1, r7, #0 + mov r2, #0x10 + bl sub_0200D5AC +_02249E40: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _02249E2C + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r4, #0x98 + add sp, #0x10 + add r0, r0, #1 + strh r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_02249E56: + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl ov17_02249B30 + cmp r0, #0 + beq _02249F2E + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x98 + strh r1, [r0] +_02249E70: + mov r1, #0x9a + ldrsh r0, [r4, r1] + add r2, r0, #1 + add r0, r4, #0 + add r0, #0x9a + strh r2, [r0] + ldrsh r0, [r4, r1] + cmp r0, #2 + ble _02249F2E + add r0, r4, #0 + mov r1, #0 + add r0, #0x9a + strh r1, [r0] + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x98 + strh r1, [r0] +_02249E96: + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + add r2, r4, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0xca + ldrh r0, [r0] + add r3, r4, #0 + add r2, #0xc8 + str r0, [sp, #4] + add r3, #0xbc + ldrh r2, [r2] + ldr r3, [r3, #0] + add r0, r4, #0 + mov r1, #4 + bl ov17_02249B08 + add r1, r4, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xcc + ldrb r1, [r0] + mov r0, #0x14 + add r2, sp, #8 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + add r1, sp, #0xc + bl sub_020129A4 + add r0, r4, #0 + add r0, #0xcc + ldrb r1, [r0] + mov r0, #0x14 + ldr r2, [sp, #8] + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + ldr r1, [sp, #0xc] + sub r2, r2, #4 + bl sub_020128C4 + mov r6, #0 + add r5, r4, #0 + add r7, r6, #0 +_02249EF4: + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r0, #0 + beq _02249F0A + mov r2, #3 + ldr r0, [r0, #0] + add r1, r7, #0 + mvn r2, r2 + bl sub_0200D5AC +_02249F0A: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _02249EF4 + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r4, #0x98 + add sp, #0x10 + add r0, r0, #1 + strh r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_02249F20: + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl ov17_02249B30 + cmp r0, #0 + bne _02249F30 +_02249F2E: + b _0224A032 +_02249F30: + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x98 + strh r1, [r0] +_02249F3C: + mov r1, #0x9a + ldrsh r0, [r4, r1] + add r2, r0, #1 + add r0, r4, #0 + add r0, #0x9a + strh r2, [r0] + ldrsh r0, [r4, r1] + cmp r0, #2 + ble _0224A032 + add r0, r4, #0 + mov r1, #0 + add r0, #0x9a + strh r1, [r0] + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x98 + strh r1, [r0] +_02249F62: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + add r2, r4, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0xca + ldrh r0, [r0] + add r3, r4, #0 + add r2, #0xc8 + str r0, [sp, #4] + add r3, #0xc0 + ldrh r2, [r2] + ldr r3, [r3, #0] + add r0, r4, #0 + mov r1, #4 + bl ov17_02249B08 + add r1, r4, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xcc + ldrb r1, [r0] + mov r0, #0x14 + add r2, sp, #8 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + add r1, sp, #0xc + bl sub_020129A4 + add r0, r4, #0 + add r0, #0xcc + ldrb r1, [r0] + mov r0, #0x14 + ldr r2, [sp, #8] + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + ldr r1, [sp, #0xc] + sub r2, #0xc + bl sub_020128C4 + mov r6, #0 + add r5, r4, #0 + add r7, r6, #0 +_02249FC0: + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r0, #0 + beq _02249FD6 + mov r2, #0xb + ldr r0, [r0, #0] + add r1, r7, #0 + mvn r2, r2 + bl sub_0200D5AC +_02249FD6: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _02249FC0 + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r4, #0x98 + add sp, #0x10 + add r0, r0, #1 + strh r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_02249FEC: + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl ov17_02249B30 + cmp r0, #0 + beq _0224A032 + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x98 + strh r1, [r0] +_0224A006: + mov r1, #0x9a + ldrsh r0, [r4, r1] + add r2, r0, #1 + add r0, r4, #0 + add r0, #0x9a + strh r2, [r0] + ldrsh r0, [r4, r1] + cmp r0, #2 + ble _0224A032 + add r0, r4, #0 + mov r1, #0 + add r0, #0x9a + strh r1, [r0] + mov r0, #0x98 + ldrsh r0, [r4, r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x98 + strh r1, [r0] +_0224A02C: + add r0, r4, #0 + bl ov17_02249D80 +_0224A032: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_02249DA0 + + thumb_func_start ov17_0224A038 +ov17_0224A038: ; 0x0224A038 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + mov r0, #0x96 + ldrsb r1, [r1, r0] + mov r0, #0x24 + mov r4, #0 + ldr r2, _0224A080 ; =0x02254578 + mul r0, r1 + ldr r6, _0224A084 ; =0x0000FFFF + add r5, r2, r0 + add r7, r4, #0 +_0224A04E: + ldrh r0, [r5, #4] + cmp r0, r6 + bne _0224A062 + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r7, #0 + bl sub_02019120 + b _0224A06E +_0224A062: + add r0, r4, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r1, #1 + bl sub_02019120 +_0224A06E: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _0224A04E + ldr r0, [sp] + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224A080: .word 0x02254578 +_0224A084: .word 0x0000FFFF + thumb_func_end ov17_0224A038 + + thumb_func_start ov17_0224A088 +ov17_0224A088: ; 0x0224A088 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x94 + ldrh r2, [r0] + ldr r0, _0224A0C4 ; =0x0000FFFF + cmp r2, r0 + beq _0224A0BA + mov r0, #0 + lsl r2, r2, #2 + str r0, [sp] + ldr r0, [r4, #4] + add r2, r4, r2 + add r2, #0xd0 + mov r3, #6 + ldr r0, [r0, #0x60] + ldr r2, [r2, #0] + mov r1, #4 + lsl r3, r3, #0xc + bl sub_0201958C + ldr r0, _0224A0C4 ; =0x0000FFFF + add r4, #0x94 + strh r0, [r4] +_0224A0BA: + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_0224A0C4: .word 0x0000FFFF + thumb_func_end ov17_0224A088 + + thumb_func_start ov17_0224A0C8 +ov17_0224A0C8: ; 0x0224A0C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov17_02249B54 + mov r0, #0 + str r0, [r4, #0] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0224A0C8 + + thumb_func_start ov17_0224A0E0 +ov17_0224A0E0: ; 0x0224A0E0 + push {r3, lr} + sub sp, #8 + str r2, [sp] + str r1, [sp, #4] + ldr r0, [r0, #4] + mov r1, #1 + add r0, #0x90 + ldr r0, [r0, #0] + mov r2, #0 + mov r3, #0x40 + bl sub_020039B0 + add sp, #8 + pop {r3, pc} + thumb_func_end ov17_0224A0E0 + + .rodata + + + .global Unk_ov17_02254554 +Unk_ov17_02254554: ; 0x02254554 + .incbin "incbin/overlay17_rodata.bin", 0x17C8, 0x17D8 - 0x17C8 + + .global Unk_ov17_02254564 +Unk_ov17_02254564: ; 0x02254564 + .incbin "incbin/overlay17_rodata.bin", 0x17D8, 0x17EC - 0x17D8 + + .global Unk_ov17_02254578 +Unk_ov17_02254578: ; 0x02254578 + .incbin "incbin/overlay17_rodata.bin", 0x17EC, 0x1834 - 0x17EC + + .global Unk_ov17_022545C0 +Unk_ov17_022545C0: ; 0x022545C0 + .incbin "incbin/overlay17_rodata.bin", 0x1834, 0x18A4 - 0x1834 + + .global Unk_ov17_02254630 +Unk_ov17_02254630: ; 0x02254630 + .incbin "incbin/overlay17_rodata.bin", 0x18A4, 0x90 + diff --git a/asm/ov17_0224A0FC.s b/asm/ov17_0224A0FC.s new file mode 100644 index 000000000..9c0ebce2a --- /dev/null +++ b/asm/ov17_0224A0FC.s @@ -0,0 +1,6276 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0224A0FC +ov17_0224A0FC: ; 0x0224A0FC + mov r1, #6 + mul r1, r0 + ldr r0, _0224A108 ; =0x022546F4 + ldrsh r0, [r0, r1] + bx lr + nop +_0224A108: .word 0x022546F4 + thumb_func_end ov17_0224A0FC + + thumb_func_start ov17_0224A10C +ov17_0224A10C: ; 0x0224A10C + mov r1, #6 + mul r1, r0 + ldr r0, _0224A11C ; =0x022546F4 + add r1, r0, r1 + mov r0, #2 + ldrsh r0, [r1, r0] + bx lr + nop +_0224A11C: .word 0x022546F4 + thumb_func_end ov17_0224A10C + + thumb_func_start ov17_0224A120 +ov17_0224A120: ; 0x0224A120 + mov r1, #6 + mul r1, r0 + ldr r0, _0224A130 ; =0x022546F4 + add r1, r0, r1 + mov r0, #4 + ldrsh r0, [r1, r0] + bx lr + nop +_0224A130: .word 0x022546F4 + thumb_func_end ov17_0224A120 + + thumb_func_start ov17_0224A134 +ov17_0224A134: ; 0x0224A134 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r4, #0 + b _0224A150 +_0224A13E: + lsl r0, r4, #4 + add r0, r5, r0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224A14E + bl sub_02022974 +_0224A14E: + add r4, r4, #1 +_0224A150: + cmp r4, #4 + blt _0224A13E + add r0, sp, #0 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + mov r0, #0x17 + str r0, [sp, #0xc] + mov r4, #0 + ldr r7, _0224A1E4 ; =0x022546F4 + b _0224A1DC +_0224A168: + ldr r0, _0224A1E8 ; =0x00000AF1 + add r1, r5, r4 + ldrb r6, [r1, r0] + ldr r1, [r5, #0] + lsl r0, r6, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_020765B8 + add r2, r0, #0 + mov r0, #6 + mul r0, r4 + ldrsh r1, [r7, r0] + add r0, r7, r0 + mov r3, #2 + ldrsh r3, [r0, r3] + str r1, [sp, #4] + add r2, r2, r3 + str r2, [sp, #8] + lsl r2, r6, #4 + add r2, r5, r2 + str r1, [r2, #0x1c] + ldr r1, [sp, #8] + str r1, [r2, #0x20] + mov r1, #4 + ldrsh r0, [r0, r1] + lsl r1, r6, #2 + str r0, [r2, #0x24] + ldr r2, [r5, #0] + add r0, sp, #0 + add r1, r2, r1 + add r1, #0xf8 + ldr r1, [r1, #0] + bl ov22_0225AFD4 + lsl r1, r6, #4 + add r2, r5, r1 + str r0, [r2, #0x18] + ldr r1, [r2, #0x1c] + ldr r2, [r2, #0x20] + bl ov22_0225B100 + cmp r4, #0 + ble _0224A1DA + lsl r0, r6, #4 + add r0, r5, r0 + ldr r0, [r0, #0x18] + mov r1, #0 + bl ov22_0225B07C + lsl r0, r6, #4 + add r0, r5, r0 + mov r1, #0x63 + ldr r0, [r0, #0x18] + mvn r1, r1 + bl ov22_0225B1AC +_0224A1DA: + add r4, r4, #1 +_0224A1DC: + cmp r4, #4 + blt _0224A168 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A1E4: .word 0x022546F4 +_0224A1E8: .word 0x00000AF1 + thumb_func_end ov17_0224A134 + + thumb_func_start ov17_0224A1EC +ov17_0224A1EC: ; 0x0224A1EC + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_0224A1F4: + ldr r0, [r5, #4] + bl ov22_0225B020 + add r0, r5, #0 + add r0, #0x98 + add r4, r4, #1 + add r5, #0x10 + str r6, [r0, #0] + cmp r4, #4 + blt _0224A1F4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_0224A1EC + + thumb_func_start ov17_0224A20C +ov17_0224A20C: ; 0x0224A20C + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224A20C + + thumb_func_start ov17_0224A210 +ov17_0224A210: ; 0x0224A210 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224A210 + + thumb_func_start ov17_0224A214 +ov17_0224A214: ; 0x0224A214 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + add r6, r1, #0 + str r2, [sp, #4] + add r0, r2, #0 + mov r1, #2 + bl ov17_0223F0BC + add r5, r0, #0 + ldr r0, [sp, #4] + mov r1, #3 + bl ov17_0223F0BC + mov r1, #0x20 + sub r2, r1, r5 + lsr r1, r2, #0x1f + add r1, r2, r1 + asr r7, r1, #1 + cmp r6, r0 + ble _0224A240 + add r6, r0, #0 +_0224A240: + asr r0, r6, #2 + lsr r0, r0, #0x1d + add r0, r6, r0 + asr r4, r0, #3 + lsr r2, r6, #0x1f + lsl r1, r6, #0x1d + sub r1, r1, r2 + mov r0, #0x1d + ror r1, r0 + add r0, r2, r1 + str r0, [sp, #8] + ldr r0, [sp] + mov r1, #3 + ldr r0, [r0, #0x60] + bl sub_02019FE4 + mov r1, #0x26 + lsl r1, r1, #4 + add r1, r7, r1 + lsl r1, r1, #1 + add r2, r0, r1 + ldr r0, [sp, #4] + cmp r0, #0 + bne _0224A306 + mov r1, #0 + ldr r0, _0224A34C ; =0x00002014 + mov r7, #0x1d + b _0224A29C +_0224A278: + lsr r6, r1, #0x1f + lsl r3, r1, #0x1d + sub r3, r3, r6 + ror r3, r7 + add r3, r6, r3 + bne _0224A28A + lsl r3, r1, #1 + strh r0, [r2, r3] + b _0224A29A +_0224A28A: + mov r3, #1 + tst r3, r1 + beq _0224A294 + ldr r6, _0224A350 ; =0x00002034 + b _0224A296 +_0224A294: + ldr r6, _0224A354 ; =0x00002054 +_0224A296: + lsl r3, r1, #1 + strh r6, [r2, r3] +_0224A29A: + add r1, r1, #1 +_0224A29C: + cmp r1, r4 + blt _0224A278 + cmp r1, r5 + bge _0224A2D4 + lsr r4, r1, #0x1f + lsl r3, r1, #0x1d + sub r3, r3, r4 + mov r0, #0x1d + ror r3, r0 + add r0, r4, r3 + bne _0224A2BE + ldr r3, _0224A358 ; =0x0000200C + ldr r0, [sp, #8] + add r3, r0, r3 + lsl r0, r1, #1 + strh r3, [r2, r0] + b _0224A2D2 +_0224A2BE: + mov r0, #1 + tst r0, r1 + beq _0224A2C8 + ldr r3, _0224A35C ; =0x0000202C + b _0224A2CA +_0224A2C8: + ldr r3, _0224A360 ; =0x0000204C +_0224A2CA: + ldr r0, [sp, #8] + add r3, r0, r3 + lsl r0, r1, #1 + strh r3, [r2, r0] +_0224A2D2: + add r1, r1, #1 +_0224A2D4: + ldr r0, _0224A358 ; =0x0000200C + mov r3, #0x1d + mov r7, #1 + b _0224A300 +_0224A2DC: + lsr r6, r1, #0x1f + lsl r4, r1, #0x1d + sub r4, r4, r6 + ror r4, r3 + add r4, r6, r4 + bne _0224A2EE + lsl r4, r1, #1 + strh r0, [r2, r4] + b _0224A2FE +_0224A2EE: + add r4, r1, #0 + tst r4, r7 + beq _0224A2F8 + ldr r6, _0224A35C ; =0x0000202C + b _0224A2FA +_0224A2F8: + ldr r6, _0224A360 ; =0x0000204C +_0224A2FA: + lsl r4, r1, #1 + strh r6, [r2, r4] +_0224A2FE: + add r1, r1, #1 +_0224A300: + cmp r1, r5 + blt _0224A2DC + b _0224A33C +_0224A306: + mov r1, #0 + ldr r0, _0224A364 ; =0x02254898 + b _0224A316 +_0224A30C: + lsl r3, r1, #1 + ldrh r6, [r0, r3] + add r1, r1, #1 + add r6, #8 + strh r6, [r2, r3] +_0224A316: + cmp r1, r4 + blt _0224A30C + cmp r1, r5 + bge _0224A32C + ldr r0, _0224A364 ; =0x02254898 + lsl r4, r1, #1 + ldrh r3, [r0, r4] + ldr r0, [sp, #8] + add r1, r1, #1 + add r0, r0, r3 + strh r0, [r2, r4] +_0224A32C: + ldr r3, _0224A364 ; =0x02254898 + b _0224A338 +_0224A330: + lsl r4, r1, #1 + ldrh r0, [r3, r4] + add r1, r1, #1 + strh r0, [r2, r4] +_0224A338: + cmp r1, r5 + blt _0224A330 +_0224A33C: + ldr r0, [sp] + mov r1, #3 + ldr r0, [r0, #0x60] + bl sub_0201C3C0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224A34C: .word 0x00002014 +_0224A350: .word 0x00002034 +_0224A354: .word 0x00002054 +_0224A358: .word 0x0000200C +_0224A35C: .word 0x0000202C +_0224A360: .word 0x0000204C +_0224A364: .word 0x02254898 + thumb_func_end ov17_0224A214 + + thumb_func_start ov17_0224A368 +ov17_0224A368: ; 0x0224A368 + push {r3, r4, r5, r6, r7, lr} + add r7, r3, #0 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r0, r7, #0 + mov r1, #3 + bl ov17_0223F0BC + mul r0, r4 + add r1, r6, #0 + bl sub_020E1F6C + add r1, r0, #0 + add r0, r5, #0 + add r2, r7, #0 + bl ov17_0224A214 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224A368 + + thumb_func_start ov17_0224A390 +ov17_0224A390: ; 0x0224A390 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224A418 ; =0x000080EB + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x3a + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0224A41C ; =0x000080EC + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x3b + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0224A420 ; =0x000080ED + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x3c + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0224A424 ; =0x000080EE + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x3d + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224A418 ; =0x000080EB + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x3e + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224A418 ; =0x000080EB + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x3f + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224A418: .word 0x000080EB +_0224A41C: .word 0x000080EC +_0224A420: .word 0x000080ED +_0224A424: .word 0x000080EE + thumb_func_end ov17_0224A390 + + thumb_func_start ov17_0224A428 +ov17_0224A428: ; 0x0224A428 + push {r4, lr} + ldr r1, _0224A45C ; =0x000080EB + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224A460 ; =0x000080EC + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0224A464 ; =0x000080ED + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0224A468 ; =0x000080EE + add r0, r4, #0 + bl sub_0200D070 + ldr r1, _0224A45C ; =0x000080EB + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224A45C ; =0x000080EB + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224A45C: .word 0x000080EB +_0224A460: .word 0x000080EC +_0224A464: .word 0x000080ED +_0224A468: .word 0x000080EE + thumb_func_end ov17_0224A428 + + thumb_func_start ov17_0224A46C +ov17_0224A46C: ; 0x0224A46C + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + ldr r4, _0224A56C ; =0x02254760 + add r7, r2, #0 + add r6, r3, #0 + add r5, r0, #0 + mov ip, r1 + add r3, sp, #0 + mov r2, #6 +_0224A47E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224A47E + ldr r0, [r4, #0] + cmp r6, #2 + str r0, [r3, #0] + bne _0224A496 + ldr r0, [sp, #8] + add r0, #0xa + str r0, [sp, #8] + b _0224A4C6 +_0224A496: + ldr r0, [sp, #0x54] + cmp r0, #3 + bhi _0224A4C6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224A4A8: ; jump table + .short _0224A4C6 - _0224A4A8 - 2 ; case 0 + .short _0224A4B0 - _0224A4A8 - 2 ; case 1 + .short _0224A4B8 - _0224A4A8 - 2 ; case 2 + .short _0224A4C0 - _0224A4A8 - 2 ; case 3 +_0224A4B0: + ldr r0, [sp, #8] + add r0, r0, #3 + str r0, [sp, #8] + b _0224A4C6 +_0224A4B8: + ldr r0, [sp, #8] + add r0, r0, #2 + str r0, [sp, #8] + b _0224A4C6 +_0224A4C0: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_0224A4C6: + ldr r0, [sp, #0x48] + cmp r0, #4 + bhi _0224A500 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224A4D8: ; jump table + .short _0224A500 - _0224A4D8 - 2 ; case 0 + .short _0224A4F6 - _0224A4D8 - 2 ; case 1 + .short _0224A500 - _0224A4D8 - 2 ; case 2 + .short _0224A4E2 - _0224A4D8 - 2 ; case 3 + .short _0224A4EC - _0224A4D8 - 2 ; case 4 +_0224A4E2: + ldr r0, _0224A570 ; =0x000080EC + str r0, [sp, #0x14] + mov r0, #2 + str r0, [sp, #0xc] + b _0224A508 +_0224A4EC: + ldr r0, _0224A574 ; =0x000080EE + str r0, [sp, #0x14] + mov r0, #6 + str r0, [sp, #0xc] + b _0224A508 +_0224A4F6: + ldr r0, _0224A578 ; =0x000080ED + str r0, [sp, #0x14] + mov r0, #7 + str r0, [sp, #0xc] + b _0224A508 +_0224A500: + ldr r0, _0224A57C ; =0x000080EB + str r0, [sp, #0x14] + mov r0, #2 + str r0, [sp, #0xc] +_0224A508: + mov r0, ip + add r1, r7, #0 + add r2, sp, #0 + bl sub_0200CE6C + add r4, r0, #0 + add r1, r6, #0 + bl sub_0200D364 + ldr r0, [r4, #0] + bl sub_0200D324 + ldr r1, [sp, #0x4c] + ldr r2, [sp, #0x50] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + mov r3, #1 + add r0, r4, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + add r0, r4, #0 + mov r1, #1 + bl sub_0200D390 + mov r0, #0 + add r2, r5, #0 +_0224A542: + add r1, r2, #0 + add r1, #0xd8 + ldr r1, [r1, #0] + cmp r1, #0 + bne _0224A558 + lsl r1, r0, #2 + add r1, r5, r1 + add r1, #0xd8 + add sp, #0x34 + str r4, [r1, #0] + pop {r4, r5, r6, r7, pc} +_0224A558: + add r0, r0, #1 + add r2, r2, #4 + cmp r0, #0x44 + blt _0224A542 + bl sub_02022974 + mov r0, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0224A56C: .word 0x02254760 +_0224A570: .word 0x000080EC +_0224A574: .word 0x000080EE +_0224A578: .word 0x000080ED +_0224A57C: .word 0x000080EB + thumb_func_end ov17_0224A46C + + thumb_func_start ov17_0224A580 +ov17_0224A580: ; 0x0224A580 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_0224A588: + add r0, r5, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224A59C + bl sub_0200D0F4 + add r0, r5, #0 + add r0, #0xd8 + str r6, [r0, #0] +_0224A59C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x44 + blt _0224A588 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_0224A580 + + thumb_func_start ov17_0224A5A8 +ov17_0224A5A8: ; 0x0224A5A8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224A5F0 ; =0x000080EF + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x37 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224A5F4 ; =0x000080EC + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x38 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224A5F4 ; =0x000080EC + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x39 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224A5F0: .word 0x000080EF +_0224A5F4: .word 0x000080EC + thumb_func_end ov17_0224A5A8 + + thumb_func_start ov17_0224A5F8 +ov17_0224A5F8: ; 0x0224A5F8 + push {r4, lr} + ldr r1, _0224A614 ; =0x000080EF + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224A618 ; =0x000080EC + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224A618 ; =0x000080EC + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224A614: .word 0x000080EF +_0224A618: .word 0x000080EC + thumb_func_end ov17_0224A5F8 + + thumb_func_start ov17_0224A61C +ov17_0224A61C: ; 0x0224A61C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + mov r4, #0 +_0224A626: + ldr r2, _0224A648 ; =0x02254794 + add r0, r6, #0 + add r1, r7, #0 + bl sub_0200CE6C + ldr r1, _0224A64C ; =0x000009F8 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _0224A626 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A648: .word 0x02254794 +_0224A64C: .word 0x000009F8 + thumb_func_end ov17_0224A61C + + thumb_func_start ov17_0224A650 +ov17_0224A650: ; 0x0224A650 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r7, _0224A670 ; =0x000009F8 + add r5, r0, #0 + add r6, r4, #0 +_0224A65A: + ldr r0, _0224A670 ; =0x000009F8 + ldr r0, [r5, r0] + bl sub_0200D0F4 + str r6, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _0224A65A + pop {r3, r4, r5, r6, r7, pc} + nop +_0224A670: .word 0x000009F8 + thumb_func_end ov17_0224A650 + + thumb_func_start ov17_0224A674 +ov17_0224A674: ; 0x0224A674 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r5, r0, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #5 + bl sub_0200B1EC + str r0, [sp, #0x38] + add r0, r5, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #6 + bl sub_0200B1EC + str r0, [sp, #0x34] + add r0, r5, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #7 + bl sub_0200B1EC + str r0, [sp, #0x30] + mov r0, #0 + ldr r1, _0224A7A8 ; =0x00000A04 + str r0, [sp, #0x3c] + add r0, r5, r1 + str r0, [sp, #0x2c] + add r0, r1, #0 + add r0, #0x3c + add r1, #0x78 + add r4, r5, #0 + add r7, r5, r0 + add r6, r5, r1 +_0224A6B8: + ldr r0, [sp, #0x2c] + add r3, r5, #0 + str r0, [sp] + ldr r0, [sp, #0x38] + add r3, #0x94 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, _0224A7AC ; =0x000B0C00 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _0224A7B0 ; =0x000080E9 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x20] + str r0, [sp, #0x24] + mov r0, #0xc + str r0, [sp, #0x28] + ldr r1, [r5, #0x60] + ldr r2, [r5, #0x5c] + ldr r3, [r3, #0] + mov r0, #0x17 + bl ov17_0223F1E8 + ldr r0, _0224A7A8 ; =0x00000A04 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_020129D0 + add r3, r5, #0 + ldr r0, [sp, #0x34] + str r7, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, _0224A7AC ; =0x000B0C00 + add r3, #0x94 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _0224A7B0 ; =0x000080E9 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x20] + str r0, [sp, #0x24] + mov r0, #0xc + str r0, [sp, #0x28] + ldr r1, [r5, #0x60] + ldr r2, [r5, #0x5c] + ldr r3, [r3, #0] + mov r0, #0x17 + bl ov17_0223F1E8 + mov r0, #0x29 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_020129D0 + add r3, r5, #0 + ldr r0, [sp, #0x30] + str r6, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, _0224A7AC ; =0x000B0C00 + add r3, #0x94 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _0224A7B0 ; =0x000080E9 + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x20] + str r0, [sp, #0x24] + mov r0, #0xc + str r0, [sp, #0x28] + ldr r1, [r5, #0x60] + ldr r2, [r5, #0x5c] + ldr r3, [r3, #0] + mov r0, #0x17 + bl ov17_0223F1E8 + ldr r0, _0224A7B4 ; =0x00000A7C + mov r1, #0 + ldr r0, [r4, r0] + bl sub_020129D0 + ldr r0, [sp, #0x2c] + add r4, #0x14 + add r0, #0x14 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x3c] + add r7, #0x14 + add r0, r0, #1 + add r6, #0x14 + str r0, [sp, #0x3c] + cmp r0, #3 + blt _0224A6B8 + ldr r0, [sp, #0x38] + bl sub_020237BC + ldr r0, [sp, #0x34] + bl sub_020237BC + ldr r0, [sp, #0x30] + bl sub_020237BC + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A7A8: .word 0x00000A04 +_0224A7AC: .word 0x000B0C00 +_0224A7B0: .word 0x000080E9 +_0224A7B4: .word 0x00000A7C + thumb_func_end ov17_0224A674 + + thumb_func_start ov17_0224A7B8 +ov17_0224A7B8: ; 0x0224A7B8 + push {r3, r4, r5, r6, r7, lr} + ldr r1, _0224A7DC ; =0x00000A04 + mov r7, #0 + add r6, r0, r1 +_0224A7C0: + mov r4, #0 + add r5, r6, #0 +_0224A7C4: + add r0, r5, #0 + bl ov17_0223F2E4 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _0224A7C4 + add r7, r7, #1 + add r6, #0x3c + cmp r7, #3 + blt _0224A7C0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A7DC: .word 0x00000A04 + thumb_func_end ov17_0224A7B8 + + thumb_func_start ov17_0224A7E0 +ov17_0224A7E0: ; 0x0224A7E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + str r3, [sp] + cmp r4, #0 + bne _0224A7F2 + str r4, [sp, #4] + b _0224A7F6 +_0224A7F2: + sub r0, r4, #1 + str r0, [sp, #4] +_0224A7F6: + ldr r0, _0224A8BC ; =0x000009BC + mov r1, #0x14 + add r2, r5, r0 + ldr r0, [sp, #4] + mul r1, r0 + add r6, r2, r1 + ldr r0, [r6, #8] + cmp r0, #0 + beq _0224A80C + bl sub_0200DA58 +_0224A80C: + add r0, r6, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + ldr r1, _0224A8C0 ; =0x022546CC + lsl r2, r4, #2 + ldrsh r0, [r1, r2] + add r1, r1, r2 + str r0, [sp, #0xc] + mov r0, #2 + ldrsh r0, [r1, r0] + str r0, [sp, #8] + ldr r0, [sp, #4] + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0224A8C4 ; =0x000009F8 + ldr r0, [r1, r0] + ldr r1, [sp] + str r0, [r6, #0] + bl sub_0200D364 + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + mov r3, #1 + ldr r0, [r6, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + ldr r0, [r6, #0] + ldr r0, [r0, #0] + bl sub_0200D324 + ldr r0, [r6, #0] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [sp, #4] + mov r1, #0x14 + add r7, r0, #0 + mov r4, #0 + mul r7, r1 + b _0224A87E +_0224A86A: + mov r0, #0x3c + mul r0, r4 + add r0, r5, r0 + add r1, r0, r7 + ldr r0, _0224A8C8 ; =0x00000A04 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_020129D0 + add r4, r4, #1 +_0224A87E: + cmp r4, #3 + blt _0224A86A + ldr r0, _0224A8C8 ; =0x00000A04 + mov r1, #0x3c + add r2, r5, r0 + ldr r0, [sp] + mov r3, #1 + mul r1, r0 + add r2, r2, r1 + ldr r0, [sp, #4] + mov r1, #0x14 + mul r1, r0 + add r0, r2, r1 + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + str r0, [r6, #4] + bl ov17_0223F2F8 + ldr r0, [r6, #4] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_020129D0 + ldr r0, _0224A8CC ; =ov17_0224A8D4 + ldr r2, _0224A8D0 ; =0x00009D08 + add r1, r6, #0 + bl sub_0200D9E8 + str r0, [r6, #8] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A8BC: .word 0x000009BC +_0224A8C0: .word 0x022546CC +_0224A8C4: .word 0x000009F8 +_0224A8C8: .word 0x00000A04 +_0224A8CC: .word ov17_0224A8D4 +_0224A8D0: .word 0x00009D08 + thumb_func_end ov17_0224A7E0 + + thumb_func_start ov17_0224A8D4 +ov17_0224A8D4: ; 0x0224A8D4 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _0224A8E8 + cmp r0, #1 + beq _0224A926 + b _0224A93A +_0224A8E8: + ldr r0, [r4, #4] + add r1, sp, #4 + ldr r0, [r0, #0] + add r2, sp, #0 + bl sub_020129A4 + ldr r0, [sp] + ldr r1, [sp, #4] + sub r2, r0, #4 + str r2, [sp] + ldr r0, [r4, #4] + ldr r0, [r0, #0] + bl sub_020128C4 + mov r1, #0 + ldr r0, [r4, #0] + sub r2, r1, #4 + bl sub_0200D5DC + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #4 + ble _0224A956 + mov r0, #0 + str r0, [r4, #0xc] + ldrb r0, [r4, #0x10] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224A926: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0xe + ble _0224A956 + ldrb r0, [r4, #0x10] + add sp, #8 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224A93A: + ldr r0, [r4, #4] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0 + str r0, [r4, #8] + add r0, r5, #0 + bl sub_0200DA58 +_0224A956: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0224A8D4 + + thumb_func_start ov17_0224A95C +ov17_0224A95C: ; 0x0224A95C + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r7, _0224A980 ; =0x000009C4 + add r5, r0, #0 + add r6, r4, #0 +_0224A966: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0224A974 + bl sub_0200DA58 + ldr r0, _0224A980 ; =0x000009C4 + str r6, [r5, r0] +_0224A974: + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _0224A966 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224A980: .word 0x000009C4 + thumb_func_end ov17_0224A95C + + thumb_func_start ov17_0224A984 +ov17_0224A984: ; 0x0224A984 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224A9CC ; =0x000080F0 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x40 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224A9D0 ; =0x000080ED + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x41 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224A9D0 ; =0x000080ED + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x42 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224A9CC: .word 0x000080F0 +_0224A9D0: .word 0x000080ED + thumb_func_end ov17_0224A984 + + thumb_func_start ov17_0224A9D4 +ov17_0224A9D4: ; 0x0224A9D4 + push {r4, lr} + ldr r1, _0224A9F0 ; =0x000080F0 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224A9F4 ; =0x000080ED + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224A9F4 ; =0x000080ED + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224A9F0: .word 0x000080F0 +_0224A9F4: .word 0x000080ED + thumb_func_end ov17_0224A9D4 + + thumb_func_start ov17_0224A9F8 +ov17_0224A9F8: ; 0x0224A9F8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + ldr r2, _0224AA18 ; =0x022547C8 + bl sub_0200CE6C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0200D324 + mov r0, #0x7a + lsl r0, r0, #2 + str r4, [r5, r0] + pop {r3, r4, r5, pc} + nop +_0224AA18: .word 0x022547C8 + thumb_func_end ov17_0224A9F8 + + thumb_func_start ov17_0224AA1C +ov17_0224AA1C: ; 0x0224AA1C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224AA36 + bl sub_0200D0F4 + mov r0, #0x7a + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_0224AA36: + pop {r4, pc} + thumb_func_end ov17_0224AA1C + + thumb_func_start ov17_0224AA38 +ov17_0224AA38: ; 0x0224AA38 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224AA50 ; =ov17_0224AA68 + ldr r2, _0224AA54 ; =0x00009CAE + add r1, r4, #0 + bl sub_0200D9E8 + mov r1, #2 + lsl r1, r1, #8 + str r0, [r4, r1] + pop {r4, pc} + nop +_0224AA50: .word ov17_0224AA68 +_0224AA54: .word 0x00009CAE + thumb_func_end ov17_0224AA38 + + thumb_func_start ov17_0224AA58 +ov17_0224AA58: ; 0x0224AA58 + mov r1, #2 + lsl r1, r1, #8 + ldr r3, _0224AA64 ; =sub_0200DA58 + ldr r0, [r0, r1] + bx r3 + nop +_0224AA64: .word sub_0200DA58 + thumb_func_end ov17_0224AA58 + + thumb_func_start ov17_0224AA68 +ov17_0224AA68: ; 0x0224AA68 + push {r3, lr} + ldr r2, [r1, #0] + ldr r0, _0224AA90 ; =0x00000123 + mov r3, #1 + ldrb r2, [r2, r0] + add r0, #0xd9 + ldr r0, [r1, r0] + lsl r2, r2, #4 + add r2, r1, r2 + ldr r1, [r2, #0x1c] + ldr r2, [r2, #0x20] + lsl r1, r1, #0x10 + sub r2, #0x28 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + pop {r3, pc} + ; .align 2, 0 +_0224AA90: .word 0x00000123 + thumb_func_end ov17_0224AA68 + + thumb_func_start ov17_0224AA94 +ov17_0224AA94: ; 0x0224AA94 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224AADC ; =0x000080F2 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x5a + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224AAE0 ; =0x000080EF + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x59 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224AAE0 ; =0x000080EF + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x58 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224AADC: .word 0x000080F2 +_0224AAE0: .word 0x000080EF + thumb_func_end ov17_0224AA94 + + thumb_func_start ov17_0224AAE4 +ov17_0224AAE4: ; 0x0224AAE4 + push {r4, lr} + ldr r1, _0224AB00 ; =0x000080F2 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224AB04 ; =0x000080EF + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224AB04 ; =0x000080EF + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224AB00: .word 0x000080F2 +_0224AB04: .word 0x000080EF + thumb_func_end ov17_0224AAE4 + + thumb_func_start ov17_0224AB08 +ov17_0224AB08: ; 0x0224AB08 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + mov r0, #0 + str r1, [sp, #4] + str r0, [sp, #0xc] + ldr r4, [sp] + mov r1, #2 + add r0, r4, #0 + lsl r1, r1, #8 + ldr r6, [sp, #0xc] + str r2, [sp, #8] + add r7, r0, #4 + add r5, r0, r1 +_0224AB24: + ldr r0, [sp, #4] + ldr r1, [sp, #8] + ldr r2, _0224ABA0 ; =0x02254830 + bl sub_0200CE6C + mov r1, #0x81 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl sub_0200D324 + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D6A4 + ldr r1, [sp, #0xc] + ldr r0, _0224ABA4 ; =0x00000213 + strb r1, [r4, r0] + sub r0, r0, #7 + str r7, [r4, r0] + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, r6] + bl sub_020765B8 + mov r1, #0x85 + lsl r1, r1, #2 + strb r0, [r4, r1] + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + bl ov17_0224AC78 + ldr r0, _0224ABA8 ; =ov17_0224ABFC + ldr r2, _0224ABAC ; =0x0000A08C + add r1, r5, #0 + bl sub_0200D9E8 + mov r1, #2 + lsl r1, r1, #8 + str r0, [r4, r1] + ldr r0, [sp, #0xc] + add r4, #0x18 + add r0, r0, #1 + add r7, #0x10 + add r6, r6, #4 + add r5, #0x18 + str r0, [sp, #0xc] + cmp r0, #4 + blt _0224AB24 + ldr r0, [sp] + mov r1, #0 + bl ov17_0224ABDC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224ABA0: .word 0x02254830 +_0224ABA4: .word 0x00000213 +_0224ABA8: .word ov17_0224ABFC +_0224ABAC: .word 0x0000A08C + thumb_func_end ov17_0224AB08 + + thumb_func_start ov17_0224ABB0 +ov17_0224ABB0: ; 0x0224ABB0 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + mov r7, #0x81 + add r5, r0, #0 + add r6, r4, #0 + lsl r7, r7, #2 +_0224ABBC: + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D0F4 + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r5, r0] + bl sub_0200DA58 + str r6, [r5, r7] + add r4, r4, #1 + add r5, #0x18 + cmp r4, #4 + blt _0224ABBC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_0224ABB0 + + thumb_func_start ov17_0224ABDC +ov17_0224ABDC: ; 0x0224ABDC + push {r3, r4, r5, r6, r7, lr} + mov r7, #0x81 + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + lsl r7, r7, #2 +_0224ABE8: + ldr r0, [r5, r7] + add r1, r6, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, #0x18 + cmp r4, #4 + blt _0224ABE8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224ABDC + + thumb_func_start ov17_0224ABFC +ov17_0224ABFC: ; 0x0224ABFC + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r0, [r5, #0xc] + ldr r6, [r0, #4] + ldr r4, [r0, #8] + ldr r0, [r0, #0xc] + bl ov17_0224B06C + mov r1, #0x14 + ldrsb r2, [r5, r1] + mov r1, #0x28 + sub r2, r1, r2 + add r1, r2, #0 + mul r1, r0 + asr r2, r1, #7 + lsr r2, r2, #0x18 + add r2, r1, r2 + asr r1, r2, #8 + add r4, r4, r1 + mov r1, #0x64 + mul r1, r0 + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r0, r0, #8 + bl sub_020E17B4 + ldr r1, _0224AC74 ; =0x42C80000 + bl sub_020E1304 + add r7, r0, #0 + ldrb r0, [r5, #0x12] + cmp r0, #0 + bne _0224AC56 + add r1, sp, #0 + mov r3, #1 + ldr r0, [r5, #4] + add r1, #2 + add r2, sp, #0 + lsl r3, r3, #0x14 + bl sub_0200D5A0 + add r1, sp, #0 + mov r0, #0 + ldrsh r4, [r1, r0] +_0224AC56: + lsl r1, r6, #0x10 + lsl r2, r4, #0x10 + mov r3, #1 + ldr r0, [r5, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + ldr r0, [r5, #4] + add r1, r7, #0 + add r2, r7, #0 + bl sub_0200D6E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224AC74: .word 0x42C80000 + thumb_func_end ov17_0224ABFC + + thumb_func_start ov17_0224AC78 +ov17_0224AC78: ; 0x0224AC78 + strb r1, [r0, #0x11] + strb r2, [r0, #0x12] + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224AC78 + + thumb_func_start ov17_0224AC80 +ov17_0224AC80: ; 0x0224AC80 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224ACC8 ; =0x000080F3 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x5d + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224ACCC ; =0x000080F0 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x5c + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224ACCC ; =0x000080F0 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x5b + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224ACC8: .word 0x000080F3 +_0224ACCC: .word 0x000080F0 + thumb_func_end ov17_0224AC80 + + thumb_func_start ov17_0224ACD0 +ov17_0224ACD0: ; 0x0224ACD0 + push {r4, lr} + ldr r1, _0224ACEC ; =0x000080F3 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224ACF0 ; =0x000080F0 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224ACF0 ; =0x000080F0 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224ACEC: .word 0x000080F3 +_0224ACF0: .word 0x000080F0 + thumb_func_end ov17_0224ACD0 + + thumb_func_start ov17_0224ACF4 +ov17_0224ACF4: ; 0x0224ACF4 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224ACF4 + + thumb_func_start ov17_0224ACF8 +ov17_0224ACF8: ; 0x0224ACF8 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224ACF8 + + thumb_func_start ov17_0224ACFC +ov17_0224ACFC: ; 0x0224ACFC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224AD44 ; =0x000080F4 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x60 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224AD48 ; =0x000080F1 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x5f + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224AD48 ; =0x000080F1 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x5e + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224AD44: .word 0x000080F4 +_0224AD48: .word 0x000080F1 + thumb_func_end ov17_0224ACFC + + thumb_func_start ov17_0224AD4C +ov17_0224AD4C: ; 0x0224AD4C + push {r4, lr} + ldr r1, _0224AD68 ; =0x000080F4 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224AD6C ; =0x000080F1 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224AD6C ; =0x000080F1 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224AD68: .word 0x000080F4 +_0224AD6C: .word 0x000080F1 + thumb_func_end ov17_0224AD4C + + thumb_func_start ov17_0224AD70 +ov17_0224AD70: ; 0x0224AD70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0xad + lsl r0, r0, #2 + add r7, r1, #0 + add r1, r5, r0 + sub r0, #0xf4 + mul r0, r7 + add r4, r1, r0 + str r2, [sp] + mov r1, #0 +_0224AD88: + ldr r0, [r4, #0] + cmp r0, #0 + beq _0224AD96 + add r1, r1, #1 + add r4, #0x1c + cmp r1, #0x10 + blt _0224AD88 +_0224AD96: + cmp r1, #0x10 + bne _0224ADA0 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224ADA0: + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + ldr r2, _0224AE6C ; =0x02254864 + bl sub_0200CE6C + add r6, r0, #0 + bne _0224ADB4 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224ADB4: + lsl r1, r7, #4 + add r2, r5, r1 + ldr r1, [r2, #0x1c] + ldr r7, [r2, #0x20] + str r1, [sp, #4] + ldr r1, [sp] + bl sub_0200D364 + ldr r1, [sp, #4] + lsl r2, r7, #0x10 + lsl r1, r1, #0x10 + mov r3, #1 + add r0, r6, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + ldr r0, [r6, #0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r6, #0] + bl sub_0200D324 + ldr r0, [r5, #0] + bl sub_02094E98 + ldr r2, _0224AE70 ; =0x04000280 + mov r1, #0 + strh r1, [r2] + str r0, [r2, #0x10] + mov r0, #5 + lsl r0, r0, #8 + add r2, #0x18 + str r0, [r2, #0] + str r1, [r2, #4] + add r0, r4, #0 + mov r2, #0x1c + bl sub_020C4CF4 + ldr r0, [sp, #4] + str r6, [r4, #4] + lsl r0, r0, #8 + str r0, [r4, #8] + lsl r0, r7, #8 + ldr r2, _0224AE70 ; =0x04000280 + str r0, [r4, #0xc] + lsr r0, r2, #0xb +_0224AE16: + ldrh r1, [r2] + tst r1, r0 + bne _0224AE16 + ldr r0, _0224AE74 ; =0x040002A8 + ldr r1, [r0, #0] + mov r0, #1 + str r1, [r4, #0x10] + tst r0, r1 + beq _0224AE2C + neg r0, r1 + str r0, [r4, #0x10] +_0224AE2C: + ldr r0, [r5, #0] + bl sub_02094E98 + ldr r2, _0224AE78 ; =0x04000290 + mov r1, #0xf + str r0, [r2, #0] + lsl r1, r1, #8 + add r2, #8 + mov r0, #0 + str r1, [r2, #0] + str r0, [r2, #4] + ldr r2, _0224AE70 ; =0x04000280 + lsr r0, r2, #0xb +_0224AE46: + ldrh r1, [r2] + tst r1, r0 + bne _0224AE46 + ldr r0, _0224AE74 ; =0x040002A8 + ldr r2, _0224AE7C ; =0x00009C40 + ldr r1, [r0, #0] + lsr r0, r0, #0x10 + add r0, r1, r0 + neg r0, r0 + str r0, [r4, #0x14] + ldr r0, _0224AE80 ; =ov17_0224AE84 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0] + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224AE6C: .word 0x02254864 +_0224AE70: .word 0x04000280 +_0224AE74: .word 0x040002A8 +_0224AE78: .word 0x04000290 +_0224AE7C: .word 0x00009C40 +_0224AE80: .word ov17_0224AE84 + thumb_func_end ov17_0224AD70 + + thumb_func_start ov17_0224AE84 +ov17_0224AE84: ; 0x0224AE84 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + add r0, r1, r0 + str r0, [r4, #8] + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0xc] + mov r0, #2 + ldr r1, [r4, #0x14] + lsl r0, r0, #8 + add r0, r1, r0 + str r0, [r4, #0x14] + ldrh r0, [r4, #0x18] + add r0, r0, #1 + strh r0, [r4, #0x18] + ldrh r0, [r4, #0x18] + cmp r0, #0xa + bhi _0224AECA + mov r0, #0x11 + ldr r1, [r4, #8] + lsl r0, r0, #0xc + cmp r1, r0 + bgt _0224AECA + ldr r0, _0224AF30 ; =0xFFFEF000 + cmp r1, r0 + blt _0224AECA + mov r0, #0xd + ldr r2, [r4, #0xc] + lsl r0, r0, #0xc + cmp r2, r0 + ble _0224AEDE +_0224AECA: + ldr r0, [r4, #4] + bl sub_0200D0F4 + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_0224AEDE: + ldr r0, _0224AF34 ; =0x04000280 + mov r3, #0 + strh r3, [r0] + str r1, [r0, #0x10] + add r1, r0, #0 + lsr r2, r0, #0x12 + add r1, #0x18 + str r2, [r1, #0] + str r3, [r1, #4] + lsr r1, r0, #0xb +_0224AEF2: + ldrh r2, [r0] + tst r2, r1 + bne _0224AEF2 + ldr r3, _0224AF38 ; =0x040002A0 + ldr r2, [r4, #0xc] + add r0, r3, #0 + ldr r1, [r3, #0] + sub r0, #0x10 + str r2, [r0, #0] + lsr r2, r3, #0x12 + sub r3, #8 + mov r0, #0 + str r2, [r3, #0] + str r0, [r3, #4] + ldr r3, _0224AF34 ; =0x04000280 + lsr r0, r3, #0xb +_0224AF12: + ldrh r2, [r3] + tst r2, r0 + bne _0224AF12 + ldr r2, _0224AF38 ; =0x040002A0 + lsl r1, r1, #0x10 + ldr r2, [r2, #0] + mov r3, #1 + lsl r2, r2, #0x10 + ldr r0, [r4, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224AF30: .word 0xFFFEF000 +_0224AF34: .word 0x04000280 +_0224AF38: .word 0x040002A0 + thumb_func_end ov17_0224AE84 + + thumb_func_start ov17_0224AF3C +ov17_0224AF3C: ; 0x0224AF3C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + cmp r2, #2 + beq _0224AF98 + add r0, r1, #0 + lsl r0, r0, #1 + add r1, r7, r0 + ldr r0, _0224AF9C ; =0x00000AF6 + ldrsh r0, [r1, r0] + cmp r0, #0 + beq _0224AF98 + ldr r1, _0224AFA0 ; =0x04000280 + mov r6, #0 + strh r6, [r1] + str r0, [r1, #0x10] + mov r0, #2 + add r1, #0x18 + str r0, [r1, #0] + str r6, [r1, #4] + cmp r3, #0 + beq _0224AF6A + mov r6, #1 +_0224AF6A: + ldr r2, _0224AFA0 ; =0x04000280 + lsr r0, r2, #0xb +_0224AF6E: + ldrh r1, [r2] + tst r1, r0 + bne _0224AF6E + ldr r0, _0224AFA4 ; =0x040002A0 + ldr r5, [r0, #0] + cmp r5, #0x10 + ble _0224AF7E + mov r5, #0x10 +_0224AF7E: + mov r4, #0 + cmp r5, #0 + ble _0224AF98 +_0224AF84: + ldr r1, [sp] + add r0, r7, #0 + add r2, r6, #0 + bl ov17_0224AD70 + cmp r0, #0 + beq _0224AF98 + add r4, r4, #1 + cmp r4, r5 + blt _0224AF84 +_0224AF98: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224AF9C: .word 0x00000AF6 +_0224AFA0: .word 0x04000280 +_0224AFA4: .word 0x040002A0 + thumb_func_end ov17_0224AF3C + + thumb_func_start ov17_0224AFA8 +ov17_0224AFA8: ; 0x0224AFA8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224AFF0 ; =0x000080F5 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x63 + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224AFF4 ; =0x000080F2 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x62 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224AFF4 ; =0x000080F2 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x61 + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224AFF0: .word 0x000080F5 +_0224AFF4: .word 0x000080F2 + thumb_func_end ov17_0224AFA8 + + thumb_func_start ov17_0224AFF8 +ov17_0224AFF8: ; 0x0224AFF8 + push {r4, lr} + ldr r1, _0224B014 ; =0x000080F5 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224B018 ; =0x000080F2 + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224B018 ; =0x000080F2 + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224B014: .word 0x000080F5 +_0224B018: .word 0x000080F2 + thumb_func_end ov17_0224AFF8 + + thumb_func_start ov17_0224B01C +ov17_0224B01C: ; 0x0224B01C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + ldr r2, _0224B050 ; =0x0225472C + bl sub_0200CE6C + mov r1, #0 + mov r3, #1 + add r4, r0, #0 + mvn r1, r1 + mov r2, #0xb0 + lsl r3, r3, #0x14 + bl sub_0200D500 + ldr r0, [r4, #0] + bl sub_0200D324 + add r0, r4, #0 + mov r1, #0 + bl sub_0200D3F4 + ldr r0, _0224B054 ; =0x000009B8 + str r4, [r5, r0] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B050: .word 0x0225472C +_0224B054: .word 0x000009B8 + thumb_func_end ov17_0224B01C + + thumb_func_start ov17_0224B058 +ov17_0224B058: ; 0x0224B058 + ldr r1, _0224B060 ; =0x000009B8 + ldr r3, _0224B064 ; =sub_0200D0F4 + ldr r0, [r0, r1] + bx r3 + ; .align 2, 0 +_0224B060: .word 0x000009B8 +_0224B064: .word sub_0200D0F4 + thumb_func_end ov17_0224B058 + + thumb_func_start ov17_0224B068 +ov17_0224B068: ; 0x0224B068 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224B068 + + thumb_func_start ov17_0224B06C +ov17_0224B06C: ; 0x0224B06C + ldr r1, _0224B098 ; =0xFFFFFD80 + cmp r0, r1 + bne _0224B076 + mov r0, #0xc0 + bx lr +_0224B076: + add r1, #0x80 + cmp r0, r1 + bne _0224B082 + mov r0, #1 + lsl r0, r0, #8 + bx lr +_0224B082: + mov r1, #0xa + lsl r1, r1, #6 + add r0, r0, r1 + lsl r1, r0, #6 + asr r0, r1, #6 + lsr r0, r0, #0x19 + add r0, r1, r0 + asr r0, r0, #7 + add r0, #0xc0 + bx lr + nop +_0224B098: .word 0xFFFFFD80 + thumb_func_end ov17_0224B06C + + thumb_func_start ov17_0224B09C +ov17_0224B09C: ; 0x0224B09C + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0xc] + bl ov17_0224B06C + mov r1, #1 + lsl r1, r1, #8 + cmp r0, r1 + bne _0224B0B2 + lsl r1, r1, #4 + b _0224B0BC +_0224B0B2: + lsl r1, r0, #0xc + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 +_0224B0BC: + mov r3, #1 + ldr r0, [r4, #0] + add r2, r1, #0 + lsl r3, r3, #0xc + bl ov22_0225B0EC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0224B09C + + thumb_func_start ov17_0224B0CC +ov17_0224B0CC: ; 0x0224B0CC + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #4 +_0224B0D4: + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl ov17_0224B09C + add r6, r6, #1 + add r4, #0x10 + add r5, r5, #4 + cmp r6, #4 + blt _0224B0D4 + pop {r4, r5, r6, pc} + thumb_func_end ov17_0224B0CC + + thumb_func_start ov17_0224B0E8 +ov17_0224B0E8: ; 0x0224B0E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, _0224B200 ; =0x00000B1B + add r4, r1, #0 + ldrb r0, [r5, r0] + str r2, [sp, #0x10] + mov r1, #3 + bl ov17_0223F0BC + add r6, r0, #0 + ldr r0, [sp, #0x10] + ldrb r0, [r0, #2] + cmp r0, r4 + bne _0224B10C + mov r0, #0 + str r0, [sp, #0x14] + b _0224B110 +_0224B10C: + mov r0, #1 + str r0, [sp, #0x14] +_0224B110: + ldr r0, _0224B200 ; =0x00000B1B + mov r1, #4 + ldrb r0, [r5, r0] + bl ov17_0223F0BC + add r1, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + bl sub_020E1F6C + ldr r1, [sp, #0x10] + mov r4, #0 + ldrb r1, [r1, #6] + mul r0, r1 + mov r1, #1 + lsl r1, r1, #8 + sub r2, r1, r6 + lsr r1, r2, #0x1f + add r1, r2, r1 + asr r1, r1, #1 + add r6, r0, r1 + ldr r0, [sp, #0x10] + str r1, [sp, #0x18] + ldrb r1, [r0, #7] + ldr r0, _0224B204 ; =0x022549BC + ldrb r7, [r0, r1] + b _0224B18A +_0224B146: + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224B188 + add r1, sp, #0x1c + mov r3, #1 + add r1, #2 + add r2, sp, #0x1c + lsl r3, r3, #0x14 + bl sub_0200D5A0 + add r1, sp, #0x1c + mov r0, #2 + ldrsh r0, [r1, r0] + cmp r0, r6 + bne _0224B188 + mov r0, #0 + ldrsh r0, [r1, r0] + cmp r0, r7 + bne _0224B188 + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0xec + ldr r0, [r0, #0] + bl sub_0200D37C + cmp r0, #2 + beq _0224B188 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224B188: + add r4, r4, #1 +_0224B18A: + cmp r4, #0x44 + blt _0224B146 + ldr r0, [sp, #0x10] + ldr r3, [sp, #0x14] + ldrb r0, [r0, #3] + str r0, [sp] + str r6, [sp, #4] + ldr r0, [sp, #0x10] + str r7, [sp, #8] + ldrb r0, [r0, #7] + str r0, [sp, #0xc] + add r0, r5, #0 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224A46C + ldr r0, [sp, #0x10] + ldrb r0, [r0, #7] + cmp r0, #0 + bne _0224B1F8 + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _0224B1F8 + mov r2, #0x80 + add r1, r2, #0 + ldr r3, [r5, #0] + add r1, #0xa3 + ldrb r1, [r3, r1] + ldr r3, _0224B208 ; =0x00000AF1 + ldr r0, [sp, #0x18] + add r1, r5, r1 + ldrb r4, [r1, r3] + ldr r1, _0224B204 ; =0x022549BC + sub r0, r2, r0 + ldrb r4, [r1, r4] + ldr r1, [sp, #0x10] + add r0, r6, r0 + ldrb r1, [r1, #3] + add r2, #0xa3 + str r1, [sp] + str r0, [sp, #4] + str r4, [sp, #8] + ldr r0, [r5, #0] + ldrb r0, [r0, r2] + add r0, r5, r0 + ldrb r0, [r0, r3] + mov r3, #2 + str r0, [sp, #0xc] + add r0, r5, #0 + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224A46C +_0224B1F8: + mov r0, #1 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B200: .word 0x00000B1B +_0224B204: .word 0x022549BC +_0224B208: .word 0x00000AF1 + thumb_func_end ov17_0224B0E8 + + thumb_func_start ov17_0224B20C +ov17_0224B20C: ; 0x0224B20C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + ldrb r1, [r4, #5] + add r5, r0, #0 + ldrb r0, [r4, #2] + cmp r1, #3 + bhi _0224B240 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224B228: ; jump table + .short _0224B230 - _0224B228 - 2 ; case 0 + .short _0224B234 - _0224B228 - 2 ; case 1 + .short _0224B238 - _0224B228 - 2 ; case 2 + .short _0224B23C - _0224B228 - 2 ; case 3 +_0224B230: + mov r2, #2 + b _0224B242 +_0224B234: + mov r2, #2 + b _0224B242 +_0224B238: + mov r2, #1 + b _0224B242 +_0224B23C: + mov r2, #1 + b _0224B242 +_0224B240: + mov r2, #0 +_0224B242: + ldr r1, _0224B4D8 ; =0x00000AF6 + lsl r0, r0, #1 + add r1, r5, r1 + add r3, r1, r0 + str r3, [sp, #8] + ldrsh r3, [r1, r0] + add r2, r3, r2 + strh r2, [r1, r0] + ldrb r0, [r4, #7] + cmp r0, #0 + bne _0224B2A2 + ldr r0, _0224B4DC ; =0x00001BBC + mov r2, #0 + add r3, r5, r0 + add r6, r5, #0 + sub r7, r0, #2 +_0224B262: + ldrb r0, [r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + bne _0224B290 + mov r0, #0xa + mul r0, r2 + ldrh r1, [r4] + ldr r2, _0224B4E0 ; =0x00001BB4 + add r0, r5, r0 + strh r1, [r0, r2] + ldrh r3, [r4, #2] + add r1, r2, #2 + strh r3, [r0, r1] + ldrh r3, [r4, #4] + add r1, r2, #4 + strh r3, [r0, r1] + add r1, r2, #6 + ldrh r3, [r4, #6] + add r2, #8 + strh r3, [r0, r1] + ldrh r1, [r4, #8] + strh r1, [r0, r2] + b _0224B2A2 +_0224B290: + ldrb r1, [r4, #6] + ldrb r0, [r6, r7] + cmp r1, r0 + beq _0224B2A2 + add r2, r2, #1 + add r3, #0xa + add r6, #0xa + cmp r2, #8 + blt _0224B262 +_0224B2A2: + ldrb r0, [r4, #4] + cmp r0, #0 + bne _0224B2C0 + ldr r0, _0224B4E4 ; =0x00000AD5 + ldrb r2, [r4, #2] + add r3, r5, r0 + add r0, r0, #4 + ldrb r1, [r3, r2] + add r1, r1, #1 + strb r1, [r3, r2] + ldrb r1, [r4, #2] + add r2, r5, r0 + ldrb r0, [r2, r1] + add r0, r0, #1 + b _0224B2D0 +_0224B2C0: + ldrb r1, [r4, #2] + mov r0, #0 + add r2, r5, r1 + ldr r1, _0224B4E4 ; =0x00000AD5 + strb r0, [r2, r1] + ldrb r2, [r4, #2] + add r1, r1, #4 + add r2, r5, r2 +_0224B2D0: + strb r0, [r2, r1] + ldrb r0, [r4, #4] + cmp r0, #2 + beq _0224B2E6 + ldr r0, _0224B4E8 ; =0x00000AE4 + ldrb r1, [r4, #2] + add r2, r5, r0 + ldrb r0, [r2, r1] + add r0, r0, #1 + strb r0, [r2, r1] + b _0224B2FC +_0224B2E6: + ldr r0, _0224B4EC ; =0x00000ADD + ldrb r2, [r4, #2] + add r3, r5, r0 + add r0, r0, #7 + ldrb r1, [r3, r2] + add r1, r1, #1 + strb r1, [r3, r2] + ldrb r1, [r4, #2] + mov r2, #0 + add r1, r5, r1 + strb r2, [r1, r0] +_0224B2FC: + ldrb r0, [r4, #7] + cmp r0, #0 + beq _0224B32E + ldrb r0, [r4, #4] + cmp r0, #0 + beq _0224B312 + cmp r0, #1 + beq _0224B31C + cmp r0, #2 + beq _0224B326 + b _0224B32E +_0224B312: + ldr r0, _0224B4F0 ; =0x00000AE1 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + b _0224B32E +_0224B31C: + ldr r0, _0224B4F4 ; =0x00000AE2 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + b _0224B32E +_0224B326: + ldr r0, _0224B4F8 ; =0x00000AE3 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] +_0224B32E: + ldrb r0, [r4, #2] + str r0, [sp] + ldrb r0, [r4, #7] + str r0, [sp, #4] + add r0, r5, #0 + ldrb r3, [r4, #4] + ldr r1, [r5, #0x6c] + ldr r2, [r5, #0x70] + add r0, #0x14 + bl ov17_0224A7E0 + ldr r2, [r5, #0] + ldr r1, _0224B4FC ; =0x00000123 + add r0, r5, #0 + ldrb r1, [r2, r1] + add r2, r4, #0 + bl ov17_0224B0E8 + ldrb r0, [r4, #8] + mov r1, #0 + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + str r0, [sp] + ldr r0, [sp, #8] + ldrsh r0, [r0, r1] + str r0, [sp, #4] + ldrb r1, [r4, #2] + ldrb r2, [r4, #7] + ldrb r3, [r4, #3] + add r0, r5, #0 + bl ov17_0224B528 + ldrb r1, [r4, #2] + ldrb r2, [r4, #4] + ldrb r3, [r4, #7] + add r0, r5, #0 + bl ov17_0224AF3C + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0224C89C + ldr r1, [r5, #0] + ldr r0, _0224B4FC ; =0x00000123 + ldrb r2, [r4, #2] + ldrb r0, [r1, r0] + cmp r2, r0 + bne _0224B3AE + ldrb r0, [r4, #4] + cmp r0, #0 + bne _0224B3A0 + ldrb r1, [r4, #6] + add r0, r5, #0 + mov r2, #1 + bl ov17_0224CB00 + b _0224B3AE +_0224B3A0: + cmp r0, #1 + bne _0224B3AE + ldrb r1, [r4, #6] + add r0, r5, #0 + mov r2, #0 + bl ov17_0224CB00 +_0224B3AE: + ldrb r1, [r4, #7] + cmp r1, #0 + bne _0224B3EC + ldrb r0, [r4, #8] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224B3EC + ldrb r1, [r4, #2] + ldr r0, _0224B500 ; =0x00000B1A + add r2, r5, r1 + add r1, r0, #0 + sub r1, #0x41 + ldrb r3, [r5, r0] + ldrb r1, [r2, r1] + cmp r3, r1 + bne _0224B3DA + add r0, r5, #0 + mov r1, #1 + bl ov17_0224CB80 + b _0224B432 +_0224B3DA: + sub r0, #0x3d + ldrb r0, [r2, r0] + cmp r0, #0 + bne _0224B432 + add r0, r5, #0 + mov r1, #0 + bl ov17_0224CB80 + b _0224B432 +_0224B3EC: + cmp r1, #0 + beq _0224B432 + ldrb r0, [r4, #8] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224B432 + ldr r3, _0224B4F0 ; =0x00000AE1 + add r0, r3, #2 + ldrb r1, [r5, r0] + add r0, r3, #0 + ldrb r2, [r5, r3] + add r0, #0x39 + add r3, r3, #1 + ldrb r6, [r5, r0] + ldrb r3, [r5, r3] + lsl r0, r6, #1 + add r3, r2, r3 + add r0, r6, r0 + add r3, r1, r3 + cmp r0, r3 + bne _0224B432 + cmp r2, r0 + bne _0224B426 + add r0, r5, #0 + mov r1, #1 + bl ov17_0224CB80 + b _0224B432 +_0224B426: + cmp r1, #0 + bne _0224B432 + add r0, r5, #0 + mov r1, #0 + bl ov17_0224CB80 +_0224B432: + ldrb r0, [r4, #8] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224B444 + ldr r0, _0224B504 ; =0x000006F5 + bl sub_02005748 + b _0224B44A +_0224B444: + ldr r0, _0224B508 ; =0x000006F4 + bl sub_02005748 +_0224B44A: + ldr r0, _0224B50C ; =0x00000AE8 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _0224B466 + beq _0224B4D2 + ldrb r0, [r4, #7] + cmp r0, #0 + beq _0224B466 + ldr r1, [r5, #0] + ldr r0, _0224B4FC ; =0x00000123 + ldrb r2, [r4, #2] + ldrb r0, [r1, r0] + cmp r2, r0 + bne _0224B4D2 +_0224B466: + ldrb r0, [r4, #4] + cmp r0, #0 + beq _0224B478 + cmp r0, #1 + beq _0224B4AE + cmp r0, #2 + beq _0224B4B8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224B478: + ldrb r0, [r4, #2] + add r1, r5, r0 + ldr r0, _0224B510 ; =0x00000AD9 + ldrb r1, [r1, r0] + add r0, #0x41 + ldrb r0, [r5, r0] + cmp r0, r1 + bne _0224B494 + mov r0, #0x6f + lsl r0, r0, #4 + bl sub_02005748 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224B494: + sub r0, r0, #1 + cmp r0, r1 + bne _0224B4A4 + ldr r0, _0224B514 ; =0x000006EF + bl sub_02005748 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224B4A4: + ldr r0, _0224B518 ; =0x000006EE + bl sub_02005748 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224B4AE: + ldr r0, _0224B51C ; =0x000006F1 + bl sub_02005748 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224B4B8: + ldrb r0, [r4, #8] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224B4CC + ldr r0, _0224B520 ; =0x000006F2 + bl sub_02005748 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224B4CC: + ldr r0, _0224B524 ; =0x000005F6 + bl sub_02005748 +_0224B4D2: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224B4D8: .word 0x00000AF6 +_0224B4DC: .word 0x00001BBC +_0224B4E0: .word 0x00001BB4 +_0224B4E4: .word 0x00000AD5 +_0224B4E8: .word 0x00000AE4 +_0224B4EC: .word 0x00000ADD +_0224B4F0: .word 0x00000AE1 +_0224B4F4: .word 0x00000AE2 +_0224B4F8: .word 0x00000AE3 +_0224B4FC: .word 0x00000123 +_0224B500: .word 0x00000B1A +_0224B504: .word 0x000006F5 +_0224B508: .word 0x000006F4 +_0224B50C: .word 0x00000AE8 +_0224B510: .word 0x00000AD9 +_0224B514: .word 0x000006EF +_0224B518: .word 0x000006EE +_0224B51C: .word 0x000006F1 +_0224B520: .word 0x000006F2 +_0224B524: .word 0x000005F6 + thumb_func_end ov17_0224B20C + + thumb_func_start ov17_0224B528 +ov17_0224B528: ; 0x0224B528 + push {r4, r5, r6, lr} + ldr r4, _0224B598 ; =0x00000F58 + add r5, r0, r4 + mov r0, #0x4c + add r4, r1, #0 + mul r4, r0 + add r1, r5, r4 + add r4, r1, #0 + add r4, #0x20 + ldrb r4, [r4] + sub r0, #0x4d + add r6, r4, #0 + cmp r4, #0x20 + bge _0224B554 +_0224B544: + ldrb r5, [r1, r6] + cmp r5, #0 + bne _0224B54E + add r0, r6, #0 + b _0224B554 +_0224B54E: + add r6, r6, #1 + cmp r6, #0x20 + blt _0224B544 +_0224B554: + mov r5, #0 + mvn r5, r5 + cmp r0, r5 + bne _0224B572 + mov r6, #0 + cmp r4, #0 + ble _0224B572 +_0224B562: + ldrb r5, [r1, r6] + cmp r5, #0 + bne _0224B56C + add r0, r6, #0 + b _0224B572 +_0224B56C: + add r6, r6, #1 + cmp r6, r4 + blt _0224B562 +_0224B572: + mov r4, #0 + mvn r4, r4 + cmp r0, r4 + bne _0224B580 + bl sub_02022974 + pop {r4, r5, r6, pc} +_0224B580: + strb r3, [r1, r0] + add r0, r1, #0 + add r0, #0x21 + strb r2, [r0] + add r0, r1, #0 + ldr r2, [sp, #0x10] + add r0, #0x22 + strb r2, [r0] + ldr r0, [sp, #0x14] + add r1, #0x23 + strb r0, [r1] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224B598: .word 0x00000F58 + thumb_func_end ov17_0224B528 + + thumb_func_start ov17_0224B59C +ov17_0224B59C: ; 0x0224B59C + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224B5B0 ; =ov17_0224B5F0 + ldr r2, _0224B5B4 ; =0x00009862 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #8] + pop {r4, pc} + nop +_0224B5B0: .word ov17_0224B5F0 +_0224B5B4: .word 0x00009862 + thumb_func_end ov17_0224B59C + + thumb_func_start ov17_0224B5B8 +ov17_0224B5B8: ; 0x0224B5B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} + thumb_func_end ov17_0224B5B8 + + thumb_func_start ov17_0224B5C8 +ov17_0224B5C8: ; 0x0224B5C8 + ldr r1, _0224B5EC ; =0x00000F58 + mov r2, #0 + add r1, r0, r1 +_0224B5CE: + add r0, r1, #0 + add r0, #0x20 + ldrb r0, [r0] + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0224B5DE + mov r0, #0 + bx lr +_0224B5DE: + add r2, r2, #1 + add r1, #0x4c + cmp r2, #4 + blt _0224B5CE + mov r0, #1 + bx lr + nop +_0224B5EC: .word 0x00000F58 + thumb_func_end ov17_0224B5C8 + + thumb_func_start ov17_0224B5F0 +ov17_0224B5F0: ; 0x0224B5F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r1, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x18] + ldr r1, _0224B7B0 ; =0x00000F58 + ldr r0, [sp, #0x10] + ldr r7, [sp, #0x10] + add r4, r0, r1 + mov r1, #0x85 + lsl r1, r1, #2 + add r0, r0, r1 + ldr r5, [sp, #0x10] + str r0, [sp, #0x14] + add r7, #0x18 +_0224B60E: + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + mov r6, #0 + ldrb r0, [r4, r0] + str r0, [sp, #0x1c] + cmp r0, #0 + bne _0224B620 + b _0224B792 +_0224B620: + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x18] + mov r2, #4 + bl ov17_0224BD28 + ldr r1, [sp, #0x10] + ldr r0, _0224B7B4 ; =0x00000B04 + ldr r0, [r1, r0] + ldr r1, _0224B7B8 ; =0x00002710 + bl sub_020E2178 + ldr r1, [sp, #0x1c] + cmp r1, #4 + bls _0224B63E + b _0224B74A +_0224B63E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224B64A: ; jump table + .short _0224B74A - _0224B64A - 2 ; case 0 + .short _0224B654 - _0224B64A - 2 ; case 1 + .short _0224B6C0 - _0224B64A - 2 ; case 2 + .short _0224B6EE - _0224B64A - 2 ; case 3 + .short _0224B71C - _0224B64A - 2 ; case 4 +_0224B654: + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x18] + add r2, r2, r1 + mov r1, #0xad + lsl r1, r1, #4 + ldrb r1, [r2, r1] + cmp r1, #1 + bne _0224B692 + add r1, r4, #0 + add r1, #0x22 + ldrb r1, [r1] + add r3, r4, #0 + sub r0, r0, #1 + str r1, [sp] + add r1, r4, #0 + add r1, #0x23 + ldrb r1, [r1] + add r3, #0x21 + add r2, r7, #0 + str r1, [sp, #4] + ldr r1, [sp, #0x14] + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + ldrb r3, [r3] + ldr r1, [r5, #0x5c] + add r0, #0x24 + bl ov17_0224B7BC + add r6, r0, #0 + b _0224B74E +_0224B692: + add r1, r4, #0 + add r1, #0x22 + ldrb r1, [r1] + add r3, r4, #0 + sub r0, r0, #1 + str r1, [sp] + add r1, r4, #0 + add r1, #0x23 + ldrb r1, [r1] + add r3, #0x21 + add r2, r7, #0 + str r1, [sp, #4] + add r1, r6, #0 + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + ldrb r3, [r3] + ldr r1, [r5, #0x5c] + add r0, #0x24 + bl ov17_0224B8D0 + add r6, r0, #0 + b _0224B74E +_0224B6C0: + add r1, r4, #0 + add r1, #0x22 + ldrb r1, [r1] + add r3, r4, #0 + sub r0, r0, #1 + str r1, [sp] + add r1, r4, #0 + add r1, #0x23 + ldrb r1, [r1] + add r3, #0x21 + add r2, r7, #0 + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + ldrb r3, [r3] + ldr r1, [r5, #0x5c] + add r0, #0x24 + bl ov17_0224B8D0 + add r6, r0, #0 + b _0224B74E +_0224B6EE: + add r1, r4, #0 + add r1, #0x22 + ldrb r1, [r1] + add r3, r4, #0 + sub r0, r0, #1 + str r1, [sp] + add r1, r4, #0 + add r1, #0x23 + ldrb r1, [r1] + add r3, #0x21 + add r2, r7, #0 + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + ldrb r3, [r3] + ldr r1, [r5, #0x5c] + add r0, #0x24 + bl ov17_0224BA50 + add r6, r0, #0 + b _0224B74E +_0224B71C: + add r1, r4, #0 + add r1, #0x22 + ldrb r1, [r1] + add r3, r4, #0 + sub r0, r0, #1 + str r1, [sp] + add r1, r4, #0 + add r1, #0x23 + ldrb r1, [r1] + add r3, #0x21 + add r2, r7, #0 + str r1, [sp, #4] + add r1, r6, #0 + str r1, [sp, #8] + str r0, [sp, #0xc] + add r0, r4, #0 + ldrb r3, [r3] + ldr r1, [r5, #0x5c] + add r0, #0x24 + bl ov17_0224BA50 + add r6, r0, #0 + b _0224B74E +_0224B74A: + bl sub_02022974 +_0224B74E: + cmp r6, #1 + bne _0224B792 + add r0, r4, #0 + add r0, #0x20 + ldrb r1, [r0] + mov r0, #0 + strb r0, [r4, r1] + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x20 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0x20 + blo _0224B77C + add r1, r4, #0 + add r1, #0x20 + mov r0, #0 + strb r0, [r1] +_0224B77C: + add r0, r4, #0 + add r0, #0x24 + mov r1, #0 + mov r2, #0x28 + bl sub_020C4CF4 + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x18] + mov r2, #3 + bl ov17_0224BD28 +_0224B792: + ldr r0, [sp, #0x14] + add r4, #0x4c + add r0, #0x18 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r7, #0x10 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0x18] + cmp r0, #4 + bge _0224B7AA + b _0224B60E +_0224B7AA: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B7B0: .word 0x00000F58 +_0224B7B4: .word 0x00000B04 +_0224B7B8: .word 0x00002710 + thumb_func_end ov17_0224B5F0 + + thumb_func_start ov17_0224B7BC +ov17_0224B7BC: ; 0x0224B7BC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #4] + ldrb r0, [r5, #0x10] + add r4, r2, #0 + add r6, r3, #0 + cmp r0, #0 + beq _0224B7D6 + cmp r0, #1 + beq _0224B824 + b _0224B858 +_0224B7D6: + ldr r0, [r4, #4] + ldr r1, [sp, #0x2c] + lsl r0, r0, #8 + str r0, [r5, #0] + ldr r0, [r4, #8] + lsr r1, r1, #1 + lsl r0, r0, #8 + str r0, [r5, #4] + ldr r0, [r5, #0] + str r0, [r5, #8] + ldr r0, [r5, #4] + str r0, [r5, #0xc] + mov r0, #5 + lsl r0, r0, #8 + bl sub_020E2178 + ldr r1, [sp, #0x20] + cmp r1, #1 + bne _0224B80E + ldr r1, _0224B8C8 ; =0xFFFFF600 + strh r1, [r5, #0x14] + mov r1, #0xc8 + mul r1, r0 + add r0, r1, #0 + mov r1, #0x64 + bl sub_020E1F6C + b _0224B812 +_0224B80E: + ldr r1, _0224B8CC ; =0xFFFFFB00 + strh r1, [r5, #0x14] +_0224B812: + strh r0, [r5, #0x16] + ldr r0, [sp, #0x28] + mov r1, #1 + mov r2, #0 + bl ov17_0224AC78 + ldrb r0, [r5, #0x10] + add r0, r0, #1 + strb r0, [r5, #0x10] +_0224B824: + mov r0, #0x14 + ldrsh r1, [r5, r0] + ldr r2, [r5, #0xc] + add r1, r2, r1 + str r1, [r5, #0xc] + ldrsh r1, [r5, r0] + mov r0, #0x16 + ldrsh r0, [r5, r0] + add r0, r1, r0 + strh r0, [r5, #0x14] + ldr r1, [r5, #4] + ldr r0, [r5, #0xc] + cmp r0, r1 + blt _0224B85E + str r1, [r5, #0xc] + mov r1, #1 + ldr r0, [sp, #0x28] + add r2, r1, #0 + bl ov17_0224AC78 + mov r0, #1 + str r0, [sp, #4] + ldrb r0, [r5, #0x10] + add r0, r0, #1 + strb r0, [r5, #0x10] + b _0224B85E +_0224B858: + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224B85E: + cmp r6, #0 + bne _0224B866 + mov r6, #0x64 + b _0224B868 +_0224B866: + mov r6, #0x28 +_0224B868: + ldr r0, [sp, #0x24] + lsl r1, r0, #9 + mov r0, #0x19 + lsl r0, r0, #0xa + cmp r1, r0 + ble _0224B876 + add r1, r0, #0 +_0224B876: + asr r0, r1, #8 + add r6, r6, r0 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + str r0, [sp] + sub r1, r1, r0 + ldr r7, [r5, #4] + ldr r0, [r5, #0xc] + sub r5, r0, r7 + add r0, r1, #0 + mul r0, r6 + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp, #8] + add r0, r5, #0 + mul r0, r6 + mov r1, #0x64 + bl sub_020E1F6C + ldr r2, [sp] + ldr r1, [sp, #8] + add r2, r2, r1 + asr r1, r2, #7 + lsr r1, r1, #0x18 + add r1, r2, r1 + asr r1, r1, #8 + str r1, [r4, #4] + add r1, r7, r0 + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r2, r0, #8 + str r2, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov22_0225B100 + ldr r0, [sp, #4] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B8C8: .word 0xFFFFF600 +_0224B8CC: .word 0xFFFFFB00 + thumb_func_end ov17_0224B7BC + + thumb_func_start ov17_0224B8D0 +ov17_0224B8D0: ; 0x0224B8D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0 + str r0, [sp, #0xc] + ldrb r0, [r4, #0x10] + add r6, r2, #0 + str r3, [sp] + ldr r5, [sp, #0x30] + cmp r0, #0 + beq _0224B8F0 + cmp r0, #1 + beq _0224B948 + cmp r0, #2 + beq _0224B99A + b _0224B9DE +_0224B8F0: + ldr r0, [r6, #4] + ldr r1, [sp, #0x34] + lsl r0, r0, #8 + str r0, [r4, #0] + ldr r0, [r6, #8] + lsl r0, r0, #8 + str r0, [r4, #4] + ldr r0, [r4, #0] + str r0, [r4, #8] + ldr r0, [r4, #4] + str r0, [r4, #0xc] + mov r0, #0x1e + mul r0, r1 + mov r1, #0x64 + bl sub_020E2178 + add r7, r0, #0 + mov r0, #1 + lsl r0, r0, #0xc + add r1, r7, #0 + bl sub_020E1F6C + ldr r1, [sp, #0x34] + str r0, [r4, #0x14] + mov r0, #1 + lsl r0, r0, #0xc + sub r1, r1, r7 + bl sub_020E1F6C + str r0, [r4, #0x18] + cmp r5, #0 + bne _0224B942 + ldr r1, [r4, #0x14] + mov r0, #0 + mvn r0, r0 + add r2, r1, #0 + mul r2, r0 + str r2, [r4, #0x14] + ldr r1, [r4, #0x18] + mul r0, r1 + str r0, [r4, #0x18] +_0224B942: + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_0224B948: + ldr r0, [sp, #0x28] + cmp r0, #1 + bne _0224B964 + ldr r1, [r4, #0x14] + mov r0, #0xc8 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [r4, #0xc] + add r0, r1, r0 + str r0, [r4, #0xc] + mov r0, #0x20 + b _0224B96E +_0224B964: + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0xc] + mov r0, #0x10 +_0224B96E: + lsl r0, r0, #8 + str r0, [sp, #8] + ldr r7, [r4, #4] + ldr r0, [r4, #0xc] + sub r0, r0, r7 + bl sub_020D4070 + ldr r1, [sp, #8] + cmp r0, r1 + blt _0224B9E4 + cmp r5, #1 + bne _0224B98C + add r0, r1, #0 + add r0, r7, r0 + b _0224B990 +_0224B98C: + add r0, r1, #0 + sub r0, r7, r0 +_0224B990: + str r0, [r4, #0xc] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + b _0224B9E4 +_0224B99A: + ldr r0, [sp, #0x28] + cmp r0, #1 + bne _0224B9B0 + ldr r1, [r4, #0x18] + mov r0, #0xc8 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [r4, #0xc] + b _0224B9B4 +_0224B9B0: + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x18] +_0224B9B4: + sub r0, r1, r0 + str r0, [r4, #0xc] + cmp r5, #1 + bne _0224B9C4 + ldr r1, [r4, #4] + ldr r0, [r4, #0xc] + cmp r0, r1 + ble _0224B9D0 +_0224B9C4: + cmp r5, #0 + bne _0224B9E4 + ldr r1, [r4, #4] + ldr r0, [r4, #0xc] + cmp r0, r1 + blt _0224B9E4 +_0224B9D0: + str r1, [r4, #0xc] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + mov r0, #1 + str r0, [sp, #0xc] + b _0224B9E4 +_0224B9DE: + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224B9E4: + ldr r0, [sp] + cmp r0, #0 + bne _0224B9EE + mov r5, #0x64 + b _0224B9F0 +_0224B9EE: + mov r5, #0x28 +_0224B9F0: + ldr r0, [sp, #0x2c] + lsl r1, r0, #9 + mov r0, #0x19 + lsl r0, r0, #0xa + cmp r1, r0 + ble _0224B9FE + add r1, r0, #0 +_0224B9FE: + asr r0, r1, #8 + add r5, r5, r0 + ldr r0, [r4, #0] + ldr r1, [r4, #8] + str r0, [sp, #4] + sub r1, r1, r0 + ldr r7, [r4, #4] + ldr r0, [r4, #0xc] + sub r4, r0, r7 + add r0, r1, #0 + mul r0, r5 + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp, #0x10] + add r0, r4, #0 + mul r0, r5 + mov r1, #0x64 + bl sub_020E1F6C + ldr r2, [sp, #4] + ldr r1, [sp, #0x10] + add r2, r2, r1 + asr r1, r2, #7 + lsr r1, r1, #0x18 + add r1, r2, r1 + asr r1, r1, #8 + str r1, [r6, #4] + add r1, r7, r0 + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r2, r0, #8 + str r2, [r6, #8] + ldr r0, [r6, #0] + ldr r1, [r6, #4] + bl ov22_0225B100 + ldr r0, [sp, #0xc] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov17_0224B8D0 + + thumb_func_start ov17_0224BA50 +ov17_0224BA50: ; 0x0224BA50 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #0x10] + ldrb r0, [r5, #0x10] + add r4, r2, #0 + str r3, [sp] + ldr r6, [sp, #0x38] + cmp r0, #0 + beq _0224BA70 + cmp r0, #1 + beq _0224BAF0 + cmp r0, #2 + beq _0224BB62 + b _0224BBC4 +_0224BA70: + ldr r0, [r4, #4] + ldr r1, [sp, #0x3c] + lsl r0, r0, #8 + str r0, [r5, #0] + ldr r0, [r4, #8] + lsl r0, r0, #8 + str r0, [r5, #4] + ldr r0, [r5, #0] + str r0, [r5, #8] + ldr r0, [r5, #4] + str r0, [r5, #0xc] + mov r0, #0x1e + mul r0, r1 + mov r1, #0x64 + bl sub_020E2178 + ldr r1, [sp, #0x3c] + str r0, [sp, #0x14] + sub r7, r1, r0 + ldr r0, _0224BC44 ; =0x00038E00 + ldr r1, [sp, #0x14] + bl sub_020E1F6C + str r0, [r5, #0x18] + ldr r0, _0224BC48 ; =0xFFFC7200 + add r1, r7, #0 + bl sub_020E1F6C + str r0, [r5, #0x1c] + mov r0, #1 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xc + bl sub_020E1F6C + str r0, [r5, #0x20] + mov r0, #1 + lsl r0, r0, #0xc + add r1, r7, #0 + bl sub_020E1F6C + neg r0, r0 + str r0, [r5, #0x24] + cmp r6, #1 + bne _0224BAEA + ldr r1, [r5, #0x18] + mov r0, #0 + mvn r0, r0 + add r2, r1, #0 + mul r2, r0 + str r2, [r5, #0x18] + ldr r1, [r5, #0x1c] + add r2, r1, #0 + mul r2, r0 + str r2, [r5, #0x1c] + ldr r1, [r5, #0x20] + add r2, r1, #0 + mul r2, r0 + str r2, [r5, #0x20] + ldr r1, [r5, #0x24] + mul r0, r1 + str r0, [r5, #0x24] +_0224BAEA: + ldrb r0, [r5, #0x10] + add r0, r0, #1 + strb r0, [r5, #0x10] +_0224BAF0: + ldr r0, [sp, #0x30] + cmp r0, #1 + bne _0224BB1C + ldr r1, [r5, #0x20] + mov r0, #0xc8 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [r5, #8] + add r0, r1, r0 + str r0, [r5, #8] + mov r0, #0x20 + str r0, [sp, #0xc] + ldr r1, [r5, #0x18] + mov r0, #0xc8 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [r5, #0x14] + b _0224BB2C +_0224BB1C: + ldr r1, [r5, #8] + ldr r0, [r5, #0x20] + add r0, r1, r0 + str r0, [r5, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + ldr r1, [r5, #0x14] + ldr r0, [r5, #0x18] +_0224BB2C: + add r0, r1, r0 + str r0, [r5, #0x14] + ldr r0, [sp, #0xc] + ldr r7, [r5, #0] + lsl r0, r0, #8 + str r0, [sp, #8] + ldr r0, [r5, #8] + sub r0, r0, r7 + bl sub_020D4070 + ldr r1, [sp, #8] + cmp r0, r1 + blt _0224BBCA + cmp r6, #1 + bne _0224BB50 + add r0, r1, #0 + sub r0, r7, r0 + b _0224BB54 +_0224BB50: + add r0, r1, #0 + add r0, r7, r0 +_0224BB54: + str r0, [r5, #8] + ldr r0, [r5, #4] + str r0, [r5, #0xc] + ldrb r0, [r5, #0x10] + add r0, r0, #1 + strb r0, [r5, #0x10] + b _0224BBCA +_0224BB62: + ldr r0, [sp, #0x30] + cmp r0, #1 + bne _0224BB8A + ldr r1, [r5, #0x24] + mov r0, #0xc8 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [r5, #8] + add r0, r1, r0 + str r0, [r5, #8] + ldr r1, [r5, #0x1c] + mov r0, #0xc8 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [r5, #0x14] + b _0224BB96 +_0224BB8A: + ldr r1, [r5, #8] + ldr r0, [r5, #0x24] + add r0, r1, r0 + str r0, [r5, #8] + ldr r1, [r5, #0x14] + ldr r0, [r5, #0x1c] +_0224BB96: + add r0, r1, r0 + str r0, [r5, #0x14] + cmp r6, #1 + bne _0224BBA6 + ldr r1, [r5, #0] + ldr r0, [r5, #8] + cmp r0, r1 + bge _0224BBB2 +_0224BBA6: + cmp r6, #0 + bne _0224BBCA + ldr r1, [r5, #0] + ldr r0, [r5, #8] + cmp r0, r1 + bgt _0224BBCA +_0224BBB2: + str r1, [r5, #8] + mov r0, #0 + str r0, [r5, #0x14] + ldrb r0, [r5, #0x10] + add r0, r0, #1 + strb r0, [r5, #0x10] + mov r0, #1 + str r0, [sp, #0x10] + b _0224BBCA +_0224BBC4: + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224BBCA: + ldr r1, [r5, #0x14] + ldr r0, [r4, #0] + lsl r1, r1, #8 + lsr r1, r1, #0x10 + bl ov22_0225B0E4 + ldr r0, [sp] + cmp r0, #0 + bne _0224BBE0 + mov r6, #0x64 + b _0224BBE2 +_0224BBE0: + mov r6, #0x28 +_0224BBE2: + ldr r0, [sp, #0x34] + lsl r1, r0, #9 + mov r0, #0x19 + lsl r0, r0, #0xa + cmp r1, r0 + ble _0224BBF0 + add r1, r0, #0 +_0224BBF0: + asr r0, r1, #8 + add r6, r6, r0 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + str r0, [sp, #4] + sub r1, r1, r0 + ldr r7, [r5, #4] + ldr r0, [r5, #0xc] + sub r5, r0, r7 + add r0, r1, #0 + mul r0, r6 + mov r1, #0x64 + bl sub_020E1F6C + str r0, [sp, #0x18] + add r0, r5, #0 + mul r0, r6 + mov r1, #0x64 + bl sub_020E1F6C + ldr r2, [sp, #4] + ldr r1, [sp, #0x18] + add r2, r2, r1 + asr r1, r2, #7 + lsr r1, r1, #0x18 + add r1, r2, r1 + asr r1, r1, #8 + str r1, [r4, #4] + add r1, r7, r0 + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r2, r0, #8 + str r2, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov22_0225B100 + ldr r0, [sp, #0x10] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0224BC44: .word 0x00038E00 +_0224BC48: .word 0xFFFC7200 + thumb_func_end ov17_0224BA50 + + thumb_func_start ov17_0224BC4C +ov17_0224BC4C: ; 0x0224BC4C + ldr r1, _0224BC64 ; =0x00001BBC + mov r2, #0 + add r3, r0, r1 + mov r0, #4 +_0224BC54: + ldrb r1, [r3] + add r2, r2, #1 + bic r1, r0 + strb r1, [r3] + add r3, #0xa + cmp r2, #8 + blt _0224BC54 + bx lr + ; .align 2, 0 +_0224BC64: .word 0x00001BBC + thumb_func_end ov17_0224BC4C + + thumb_func_start ov17_0224BC68 +ov17_0224BC68: ; 0x0224BC68 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0224BCEC ; =0x0000108C + add r6, r1, #0 + add r7, r5, r0 + mov r0, #0x28 + mul r0, r6 + str r0, [sp, #4] + ldr r0, [r7, r0] + str r2, [sp] + cmp r0, #0 + beq _0224BC86 + bl sub_02022974 +_0224BC86: + ldr r0, _0224BCF0 ; =0x00001088 + mov r2, #0x28 + add r4, r6, #0 + add r0, r5, r0 + mul r4, r2 + str r0, [sp, #8] + add r0, r0, r4 + mov r1, #0 + bl sub_020C4CF4 + ldr r0, [sp, #8] + add r1, r5, r4 + str r5, [r0, r4] + ldr r0, _0224BCF4 ; =0x000010A2 + ldr r2, [sp] + strb r6, [r1, r0] + sub r3, r0, #1 + strb r2, [r1, r3] + lsl r2, r6, #2 + add r2, r5, r2 + ldr r3, [r2, #0x5c] + add r2, r0, #0 + sub r2, #0x12 + str r3, [r1, r2] + add r2, r5, #0 + add r2, #0x18 + lsl r3, r6, #4 + add r3, r2, r3 + add r2, r0, #0 + add r0, #0xa + sub r2, #0xe + str r3, [r1, r2] + add r0, r5, r0 + ldrb r2, [r0, r4] + mov r1, #4 + orr r1, r2 + strb r1, [r0, r4] + ldrb r2, [r0, r4] + mov r1, #8 + orr r1, r2 + strb r1, [r0, r4] + ldr r1, [sp, #8] + ldr r0, _0224BCF8 ; =ov17_0224BE50 + ldr r2, _0224BCFC ; =0x00009858 + add r1, r1, r4 + bl sub_0200D9E8 + ldr r1, [sp, #4] + str r0, [r7, r1] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BCEC: .word 0x0000108C +_0224BCF0: .word 0x00001088 +_0224BCF4: .word 0x000010A2 +_0224BCF8: .word ov17_0224BE50 +_0224BCFC: .word 0x00009858 + thumb_func_end ov17_0224BC68 + + thumb_func_start ov17_0224BD00 +ov17_0224BD00: ; 0x0224BD00 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r7, _0224BD24 ; =0x0000108C + add r5, r0, #0 + add r6, r4, #0 +_0224BD0A: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0224BD18 + bl sub_0200DA58 + ldr r0, _0224BD24 ; =0x0000108C + str r6, [r5, r0] +_0224BD18: + add r4, r4, #1 + add r5, #0x28 + cmp r4, #4 + blt _0224BD0A + pop {r3, r4, r5, r6, r7, pc} + nop +_0224BD24: .word 0x0000108C + thumb_func_end ov17_0224BD00 + + thumb_func_start ov17_0224BD28 +ov17_0224BD28: ; 0x0224BD28 + push {r3, r4, r5, lr} + mov r3, #0x28 + mul r3, r1 + ldr r1, _0224BDEC ; =0x0000108C + add r4, r0, r3 + ldr r5, [r4, r1] + cmp r5, #0 + beq _0224BDE8 + cmp r2, #5 + bhi _0224BDE4 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224BD48: ; jump table + .short _0224BD54 - _0224BD48 - 2 ; case 0 + .short _0224BD6A - _0224BD48 - 2 ; case 1 + .short _0224BD78 - _0224BD48 - 2 ; case 2 + .short _0224BD86 - _0224BD48 - 2 ; case 3 + .short _0224BDA4 - _0224BD48 - 2 ; case 4 + .short _0224BDD2 - _0224BD48 - 2 ; case 5 +_0224BD54: + add r1, #0x20 + add r2, r0, r1 + ldrb r1, [r2, r3] + mov r0, #0x20 + bic r1, r0 + strb r1, [r2, r3] + ldrb r1, [r2, r3] + mov r0, #0x10 + bic r1, r0 + strb r1, [r2, r3] + pop {r3, r4, r5, pc} +_0224BD6A: + add r1, #0x20 + add r2, r0, r1 + ldrb r1, [r2, r3] + mov r0, #0x20 + orr r0, r1 + strb r0, [r2, r3] + pop {r3, r4, r5, pc} +_0224BD78: + add r1, #0x20 + add r2, r0, r1 + ldrb r1, [r2, r3] + mov r0, #0x10 + orr r0, r1 + strb r0, [r2, r3] + pop {r3, r4, r5, pc} +_0224BD86: + add r1, #0x20 + add r0, r0, r1 + ldrb r2, [r0, r3] + mov r1, #2 + bic r2, r1 + strb r2, [r0, r3] + ldrb r2, [r0, r3] + mov r1, #1 + bic r2, r1 + strb r2, [r0, r3] + ldrb r2, [r0, r3] + mov r1, #4 + orr r1, r2 + strb r1, [r0, r3] + pop {r3, r4, r5, pc} +_0224BDA4: + add r2, r1, #0 + add r2, #0x20 + ldrb r2, [r4, r2] + lsl r2, r2, #0x1e + lsr r2, r2, #0x1f + bne _0224BDE8 + add r2, r1, #0 + add r2, #0x20 + add r5, r0, r2 + ldrb r2, [r5, r3] + mov r0, #2 + orr r0, r2 + strb r0, [r5, r3] + ldrb r0, [r5, r3] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + bne _0224BDE8 + add r0, r1, #0 + add r0, #0x10 + ldr r0, [r4, r0] + add r1, #0x1c + str r0, [r4, r1] + pop {r3, r4, r5, pc} +_0224BDD2: + add r1, #0x20 + add r2, r0, r1 + ldrb r1, [r2, r3] + mov r0, #1 + bic r1, r0 + mov r0, #1 + orr r0, r1 + strb r0, [r2, r3] + pop {r3, r4, r5, pc} +_0224BDE4: + bl sub_02022974 +_0224BDE8: + pop {r3, r4, r5, pc} + nop +_0224BDEC: .word 0x0000108C + thumb_func_end ov17_0224BD28 + + thumb_func_start ov17_0224BDF0 +ov17_0224BDF0: ; 0x0224BDF0 + mov r2, #0x28 + mul r2, r1 + ldr r1, _0224BE20 ; =0x0000108C + add r2, r0, r2 + ldr r0, [r2, r1] + cmp r0, #0 + bne _0224BE02 + mov r0, #1 + bx lr +_0224BE02: + add r0, r1, #0 + add r0, #0x20 + ldrb r0, [r2, r0] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + cmp r0, #1 + beq _0224BE18 + add r1, #0x15 + ldrb r0, [r2, r1] + cmp r0, #0 + bne _0224BE1C +_0224BE18: + mov r0, #1 + bx lr +_0224BE1C: + mov r0, #0 + bx lr + ; .align 2, 0 +_0224BE20: .word 0x0000108C + thumb_func_end ov17_0224BDF0 + + thumb_func_start ov17_0224BE24 +ov17_0224BE24: ; 0x0224BE24 + mov r2, #0x28 + mul r2, r1 + add r2, r0, r2 + ldr r0, _0224BE4C ; =0x0000108C + ldr r1, [r2, r0] + cmp r1, #0 + bne _0224BE36 + mov r0, #1 + bx lr +_0224BE36: + add r0, #0x20 + ldrb r0, [r2, r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224BE46 + mov r0, #1 + bx lr +_0224BE46: + mov r0, #0 + bx lr + nop +_0224BE4C: .word 0x0000108C + thumb_func_end ov17_0224BE24 + + thumb_func_start ov17_0224BE50 +ov17_0224BE50: ; 0x0224BE50 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov17_0224BE64 + add r0, r4, #0 + bl ov17_0224BF58 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0224BE50 + + thumb_func_start ov17_0224BE64 +ov17_0224BE64: ; 0x0224BE64 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r0, #0x24 + ldrb r0, [r0] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + cmp r0, #1 + beq _0224BF40 + ldrb r0, [r4, #0x19] + cmp r0, #0 + beq _0224BF40 + ldr r5, [r4, #0] + ldr r1, _0224BF44 ; =0x00001154 + ldr r2, _0224BF48 ; =0x00002710 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + mov r3, #0 + bl sub_020E1F1C + ldr r2, _0224BF4C ; =0x00000B04 + mov r3, #0 + ldr r7, [r5, r2] + add r2, r7, #0 + bl sub_020E1EE0 + add r5, r0, #0 + add r6, r1, #0 + lsr r7, r7, #1 + lsr r0, r5, #0x13 + lsl r1, r6, #0xd + orr r1, r0 + lsl r0, r5, #0xd + add r2, r7, #0 + mov r3, #0 + bl sub_020E1ED4 + add r2, r1, #0 + mov r1, #1 + sub r3, r5, r7 + ldr r3, _0224BF50 ; =0x00000000 + sbc r6, r3 + blo _0224BEC0 + lsl r3, r1, #0xe + mov r1, #0 + sub r0, r3, r0 +_0224BEC0: + add r2, r4, #0 + add r2, #0x24 + ldrb r2, [r2] + ldr r3, _0224BF54 ; =0xFFFD8000 + mov r5, #0x40 + add r0, r0, r3 + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + lsl r2, r2, #0x19 + lsr r2, r2, #0x1f + bic r0, r5 + lsl r5, r1, #0x18 + lsr r5, r5, #0x18 + lsl r5, r5, #0x1f + lsr r5, r5, #0x19 + orr r5, r0 + add r0, r4, #0 + add r0, #0x24 + strb r5, [r0] + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224BF2A + ldr r0, [r4, #0x10] + cmp r0, r3 + beq _0224BF06 + cmp r2, #0 + bne _0224BF2A + cmp r1, #1 + bne _0224BF2A +_0224BF06: + ldr r0, _0224BF54 ; =0xFFFD8000 + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x24 + ldrb r1, [r0] + mov r0, #0x10 + bic r1, r0 + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x24 + ldrb r1, [r0] + mov r0, #0x20 + orr r1, r0 + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] +_0224BF2A: + ldr r1, [r4, #0x10] + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 + ldr r0, [r4, #0xc] + str r1, [r0, #0xc] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + bl ov17_0224B09C +_0224BF40: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224BF44: .word 0x00001154 +_0224BF48: .word 0x00002710 +_0224BF4C: .word 0x00000B04 +_0224BF50: .word 0x00000000 +_0224BF54: .word 0xFFFD8000 + thumb_func_end ov17_0224BE64 + + thumb_func_start ov17_0224BF58 +ov17_0224BF58: ; 0x0224BF58 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r2, [r4, #0] + ldr r1, _0224C0B0 ; =0x00001154 + mov r3, #0 + ldr r0, [r2, r1] + add r1, r1, #4 + ldr r1, [r2, r1] + ldr r2, _0224C0B4 ; =0x00002710 + ldr r6, [r4, #0x14] + bl sub_020E1F1C + ldr r3, [r4, #0] + ldr r2, _0224C0B8 ; =0x00000B04 + ldr r2, [r3, r2] + mov r3, #0 + lsl r2, r2, #1 + bl sub_020E1EE0 + mov r2, #0x5a + lsl r2, r2, #2 + mov r3, #0 + bl sub_020E1F1C + ldr r3, [r4, #0] + ldr r2, _0224C0B8 ; =0x00000B04 + ldr r2, [r3, r2] + mov r3, #0 + lsl r2, r2, #1 + bl sub_020E1ED4 + lsl r5, r0, #8 + lsr r2, r0, #0x18 + add r0, r4, #0 + lsl r1, r1, #8 + str r5, [r4, #0x14] + add r0, #0x24 + ldrb r0, [r0] + orr r1, r2 + lsl r2, r0, #0x1e + lsr r2, r2, #0x1f + bne _0224C0AC + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224BFC6 + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + mov r2, #8 + add r6, r5, #0 + bic r0, r2 + add r2, r4, #0 + add r2, #0x24 + strb r0, [r2] +_0224BFC6: + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224C026 + mov r0, #0 + sub r2, r5, r6 + mov ip, r1 + mov r2, ip + sbc r2, r0 + bhs _0224BFE4 + add r7, r6, r5 + b _0224BFE6 +_0224BFE4: + add r7, r5, #0 +_0224BFE6: + ldr r3, [r4, #0x20] + mov r0, #0 + add r2, r0, #0 + add r0, r3, #0 + eor r2, r1 + eor r0, r5 + orr r0, r2 + beq _0224C016 + cmp r6, r3 + bhi _0224BFFE + cmp r3, r7 + bls _0224C016 +_0224BFFE: + ldr r2, [r4, #0x20] + mov r0, #0 + sub r2, r5, r2 + mov ip, r1 + mov r2, ip + sbc r2, r0 + blo _0224C0AC + sub r2, r5, r6 + mov ip, r1 + mov r2, ip + sbc r2, r0 + bhs _0224C0AC +_0224C016: + add r0, r4, #0 + add r0, #0x24 + ldrb r2, [r0] + mov r0, #4 + bic r2, r0 + add r0, r4, #0 + add r0, #0x24 + strb r2, [r0] +_0224C026: + add r0, r4, #0 + add r0, #0x24 + ldrb r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224C06C + mov r2, #0 + mov r0, #0 + eor r2, r1 + eor r0, r5 + orr r0, r2 + beq _0224C048 + mov r2, #0 + sub r0, r5, r6 + sbc r1, r2 + bhs _0224C06C +_0224C048: + add r1, r4, #0 + add r1, #0x24 + ldrb r2, [r1] + mov r1, #1 + mov r0, #0 + bic r2, r1 + add r1, r4, #0 + add r1, #0x24 + strb r2, [r1] + add r1, r4, #0 + add r1, #0x24 + ldrb r2, [r1] + mov r1, #2 + orr r2, r1 + add r1, r4, #0 + add r1, #0x24 + strb r2, [r1] + str r0, [r4, #0x20] +_0224C06C: + ldrb r0, [r4, #0x19] + cmp r0, #0 + bne _0224C074 + b _0224C074 +_0224C074: + ldr r0, [r4, #0x14] + mov r5, #3 + lsl r0, r0, #8 + lsr r0, r0, #0x10 + bl sub_0201D1D4 + add r1, r5, #0 + mul r1, r0 + ldrb r2, [r4, #0x19] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + mov r1, #6 + add r3, r2, #0 + mul r3, r1 + ldr r1, _0224C0BC ; =0x022546F4 + asr r0, r0, #0xc + ldrsh r1, [r1, r3] + add r0, r0, r1 + sub r1, r0, r5 + ldr r0, [r4, #0xc] + str r1, [r0, #4] + ldr r2, [r4, #0xc] + ldr r0, [r2, #0] + ldr r1, [r2, #4] + ldr r2, [r2, #8] + bl ov22_0225B100 +_0224C0AC: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C0B0: .word 0x00001154 +_0224C0B4: .word 0x00002710 +_0224C0B8: .word 0x00000B04 +_0224C0BC: .word 0x022546F4 + thumb_func_end ov17_0224BF58 + + thumb_func_start ov17_0224C0C0 +ov17_0224C0C0: ; 0x0224C0C0 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r1, #0 + add r4, r0, #0 + add r5, r2, #0 + cmp r6, #0 + beq _0224C0D6 + cmp r5, #0 + bne _0224C0D6 + bl sub_02022974 +_0224C0D6: + cmp r6, #6 + bls _0224C0DC + b _0224C23C +_0224C0DC: + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224C0E8: ; jump table + .short _0224C240 - _0224C0E8 - 2 ; case 0 + .short _0224C0F6 - _0224C0E8 - 2 ; case 1 + .short _0224C112 - _0224C0E8 - 2 ; case 2 + .short _0224C136 - _0224C0E8 - 2 ; case 3 + .short _0224C14C - _0224C0E8 - 2 ; case 4 + .short _0224C190 - _0224C0E8 - 2 ; case 5 + .short _0224C1C2 - _0224C0E8 - 2 ; case 6 +_0224C0F6: + ldrb r0, [r5] + ldr r1, [r4, #0x14] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r4, #0x9c + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200B5CC + add sp, #8 + pop {r4, r5, r6, pc} +_0224C112: + mov r2, #0x12 + lsl r2, r2, #4 + ldr r3, [r4, #0] + add r1, r2, #1 + ldrb r0, [r3, r2] + add r2, #0x51 + ldrb r1, [r3, r1] + ldrb r2, [r3, r2] + bl sub_02095848 + add r4, #0x9c + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200BBA8 + add sp, #8 + pop {r4, r5, r6, pc} +_0224C136: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + add r4, #0x9c + ldrb r2, [r5, #4] + ldr r0, [r4, #0] + bl sub_0200B60C + add sp, #8 + pop {r4, r5, r6, pc} +_0224C14C: + ldrb r6, [r5] + ldr r3, [r4, #0] + mov r0, #1 + lsl r2, r6, #2 + str r0, [sp] + mov r0, #2 + add r2, r3, r2 + add r6, r3, r6 + mov r3, #0x42 + str r0, [sp, #4] + add r0, r4, #0 + lsl r3, r3, #2 + add r0, #0x9c + add r2, #0xe8 + ldrb r3, [r6, r3] + ldr r0, [r0, #0] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200B48C + ldrb r0, [r5] + ldr r1, [r4, #0x14] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r4, #0x9c + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r4, r5, r6, pc} +_0224C190: + ldrb r0, [r5] + ldr r1, [r4, #0x14] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200B5CC + mov r0, #0 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + add r4, #0x9c + ldrb r2, [r5, #4] + ldr r0, [r4, #0] + add r3, r1, #0 + bl sub_0200B60C + add sp, #8 + pop {r4, r5, r6, pc} +_0224C1C2: + mov r2, #0x12 + lsl r2, r2, #4 + ldr r3, [r4, #0] + add r1, r2, #1 + ldrb r0, [r3, r2] + add r2, #0x51 + ldrb r1, [r3, r1] + ldrb r2, [r3, r2] + bl sub_02095848 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200BBA8 + mov r0, #0 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + add r0, r4, #0 + add r0, #0x9c + ldrb r2, [r5, #4] + ldr r0, [r0, #0] + add r3, r1, #0 + bl sub_0200B60C + ldrb r6, [r5] + ldr r3, [r4, #0] + mov r0, #1 + lsl r2, r6, #2 + str r0, [sp] + mov r1, #2 + add r2, r3, r2 + add r6, r3, r6 + mov r3, #0x42 + add r0, r4, #0 + str r1, [sp, #4] + lsl r3, r3, #2 + add r0, #0x9c + add r2, #0xe8 + ldrb r3, [r6, r3] + ldr r0, [r0, #0] + ldr r2, [r2, #0] + bl sub_0200B48C + ldrb r0, [r5] + ldr r1, [r4, #0x14] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r4, #0x9c + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #3 + bl sub_0200B5CC + add sp, #8 + pop {r4, r5, r6, pc} +_0224C23C: + bl sub_02022974 +_0224C240: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov17_0224C0C0 + + thumb_func_start ov17_0224C244 +ov17_0224C244: ; 0x0224C244 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0] + ldr r0, _0224C2C0 ; =0x00000171 + add r7, r2, #0 + ldrb r0, [r1, r0] + str r3, [sp, #0xc] + cmp r0, #0 + bne _0224C266 + ldr r0, _0224C2C4 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027AC0 + add r4, r0, #0 + b _0224C268 +_0224C266: + mov r4, #1 +_0224C268: + add r0, r6, #0 + add r1, r7, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x28] + add r0, r5, #0 + bl ov17_0224C0C0 + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x9c + add r1, #0xa0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x78 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + add r2, r5, #0 + add r0, r5, #0 + str r3, [sp, #8] + add r2, #0xa0 + ldr r2, [r2, #0] + add r0, #0x78 + mov r1, #1 + bl sub_0201D738 + ldr r1, _0224C2C8 ; =0x00000AD4 + strb r0, [r5, r1] + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C2C0: .word 0x00000171 +_0224C2C4: .word 0x00001988 +_0224C2C8: .word 0x00000AD4 + thumb_func_end ov17_0224C244 + + thumb_func_start ov17_0224C2CC +ov17_0224C2CC: ; 0x0224C2CC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #8 + blo _0224C2DE + bl sub_02022974 +_0224C2DE: + lsl r3, r4, #2 + ldr r2, _0224C2F8 ; =0x0225470C + add r0, r5, #0 + ldr r4, _0224C2FC ; =0x0225470E + ldrh r2, [r2, r3] + str r6, [sp] + add r5, #0x98 + ldrb r3, [r4, r3] + ldr r1, [r5, #0] + bl ov17_0224C244 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224C2F8: .word 0x0225470C +_0224C2FC: .word 0x0225470E + thumb_func_end ov17_0224C2CC + + thumb_func_start ov17_0224C300 +ov17_0224C300: ; 0x0224C300 + ldr r1, _0224C308 ; =0x00000AD4 + ldr r3, _0224C30C ; =sub_0201D724 + ldrb r0, [r0, r1] + bx r3 + ; .align 2, 0 +_0224C308: .word 0x00000AD4 +_0224C30C: .word sub_0201D724 + thumb_func_end ov17_0224C300 + + thumb_func_start ov17_0224C310 +ov17_0224C310: ; 0x0224C310 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r3, #1 + str r3, [sp] + str r3, [sp, #4] + ldr r3, _0224C358 ; =0x000080F1 + add r5, r0, #0 + str r3, [sp, #8] + mov r3, #0x4c + add r4, r1, #0 + add r6, r2, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0224C35C ; =0x000080EE + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x4d + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0224C35C ; =0x000080EE + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0x4e + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224C358: .word 0x000080F1 +_0224C35C: .word 0x000080EE + thumb_func_end ov17_0224C310 + + thumb_func_start ov17_0224C360 +ov17_0224C360: ; 0x0224C360 + push {r4, lr} + ldr r1, _0224C37C ; =0x000080F1 + add r4, r0, #0 + bl sub_0200D070 + ldr r1, _0224C380 ; =0x000080EE + add r0, r4, #0 + bl sub_0200D090 + ldr r1, _0224C380 ; =0x000080EE + add r0, r4, #0 + bl sub_0200D0A0 + pop {r4, pc} + ; .align 2, 0 +_0224C37C: .word 0x000080F1 +_0224C380: .word 0x000080EE + thumb_func_end ov17_0224C360 + + thumb_func_start ov17_0224C384 +ov17_0224C384: ; 0x0224C384 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0224C396 + bl sub_02022974 +_0224C396: + mov r0, #0x17 + mov r1, #0x10 + bl sub_02018144 + mov r1, #0 + mov r2, #0x10 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x21 + lsl r0, r0, #4 + str r4, [r5, r0] + str r5, [r4, #8] + ldr r0, [r5, #0x6c] + ldr r1, [r5, #0x70] + ldr r2, _0224C3D8 ; =0x022547FC + bl sub_0200CE6C + str r0, [r4, #4] + ldr r0, [r0, #0] + bl sub_0200D324 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, _0224C3DC ; =ov17_0224C414 + ldr r2, _0224C3E0 ; =0x00009C4F + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224C3D8: .word 0x022547FC +_0224C3DC: .word ov17_0224C414 +_0224C3E0: .word 0x00009C4F + thumb_func_end ov17_0224C384 + + thumb_func_start ov17_0224C3E4 +ov17_0224C3E4: ; 0x0224C3E4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl sub_0200DA58 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r0, [r0, #4] + bl sub_0200D0F4 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x21 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + pop {r4, pc} + thumb_func_end ov17_0224C3E4 + + thumb_func_start ov17_0224C414 +ov17_0224C414: ; 0x0224C414 + ldrb r0, [r1, #0xc] + cmp r0, #0 + beq _0224C422 + cmp r0, #1 + beq _0224C426 + cmp r0, #2 + b _0224C426 +_0224C422: + add r0, r0, #1 + strb r0, [r1, #0xc] +_0224C426: + ldr r0, [r1, #4] + ldr r3, _0224C430 ; =sub_0200D324 + ldr r0, [r0, #0] + bx r3 + nop +_0224C430: .word sub_0200D324 + thumb_func_end ov17_0224C414 + + thumb_func_start ov17_0224C434 +ov17_0224C434: ; 0x0224C434 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, r3, #0 + mov r1, #3 + add r7, r2, #0 + bl ov17_0223F0BC + add r6, r0, #0 + add r0, r4, #0 + mul r0, r6 + add r1, r7, #0 + bl sub_020E2178 + add r1, r0, #0 + mov r3, #1 + lsl r3, r3, #8 + sub r4, r3, r6 + lsr r2, r4, #0x1f + add r2, r4, r2 + sub r1, r1, #1 + asr r2, r2, #1 + add r1, r1, r2 + lsl r1, r1, #0x10 + ldr r0, [r5, #4] + asr r1, r1, #0x10 + mov r2, #0xb0 + lsl r3, r3, #0xc + bl sub_0200D500 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0200D3F4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224C434 + + thumb_func_start ov17_0224C47C +ov17_0224C47C: ; 0x0224C47C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + mov r3, #1 + ldr r0, [r5, #4] + mvn r1, r1 + mov r2, #0xb0 + lsl r3, r3, #0x14 + bl sub_0200D500 + ldr r0, [r5, #4] + add r1, r4, #0 + bl sub_0200D3F4 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0224C47C + + thumb_func_start ov17_0224C49C +ov17_0224C49C: ; 0x0224C49C + push {r3, r4, r5, r6, r7, lr} + add r7, r3, #0 + add r5, r0, #0 + add r6, r1, #0 + str r2, [sp] + add r0, r7, #0 + mov r1, #3 + bl ov17_0223F0BC + add r4, r0, #0 + add r0, r6, #0 + ldr r1, [sp] + mul r0, r4 + bl sub_020E2178 + add r6, r0, #0 + cmp r7, #0 + bne _0224C4D6 + add r0, r7, #0 + mov r1, #1 + bl ov17_0223F0BC + add r1, r0, #0 + ldr r0, _0224C53C ; =0x00002710 + mul r0, r4 + bl sub_020E1F6C + add r7, r0, #0 + b _0224C4E4 +_0224C4D6: + ldr r0, _0224C53C ; =0x00002710 + add r1, r4, #0 + mul r1, r0 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r7, r0, #3 +_0224C4E4: + ldr r0, _0224C53C ; =0x00002710 + add r1, r7, #0 + mul r0, r6 + bl sub_020E2178 + mov r0, #0xb4 + mul r0, r1 + add r1, r7, #0 + bl sub_020E2178 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + mov r1, #0xa + add r2, r0, #0 + mul r2, r1 + add r1, #0xf6 + asr r0, r2, #0xb + sub r3, r1, r4 + lsr r0, r0, #0x14 + lsr r1, r3, #0x1f + add r1, r3, r1 + add r0, r2, r0 + asr r2, r0, #0xc + mov r0, #0x90 + sub r2, r0, r2 + asr r1, r1, #1 + add r1, r6, r1 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + mov r3, #1 + ldr r0, [r5, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + lsl r3, r3, #0x14 + bl sub_0200D500 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0200D3F4 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C53C: .word 0x00002710 + thumb_func_end ov17_0224C49C + + thumb_func_start ov17_0224C540 +ov17_0224C540: ; 0x0224C540 + ldr r3, _0224C548 ; =sub_0200D3F4 + ldr r0, [r0, #4] + mov r1, #0 + bx r3 + ; .align 2, 0 +_0224C548: .word sub_0200D3F4 + thumb_func_end ov17_0224C540 + + thumb_func_start ov17_0224C54C +ov17_0224C54C: ; 0x0224C54C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + mov r1, #3 + bl ov17_0223F0BC + add r4, r0, #0 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0200D3F4 + mov r3, #1 + lsl r3, r3, #8 + sub r2, r3, r4 + lsr r1, r2, #0x1f + add r1, r2, r1 + lsl r1, r1, #0xf + ldr r0, [r5, #4] + asr r1, r1, #0x10 + mov r2, #0x90 + lsl r3, r3, #0xc + bl sub_0200D500 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0224C54C + + thumb_func_start ov17_0224C57C +ov17_0224C57C: ; 0x0224C57C + push {r3, r4} + ldr r2, _0224C59C ; =0x022546C0 + add r1, sp, #0 + ldrb r3, [r2] + add r4, sp, #0 + strb r3, [r1] + ldrb r3, [r2, #1] + strb r3, [r1, #1] + ldrb r3, [r2, #2] + ldrb r2, [r2, #3] + strb r3, [r1, #2] + strb r2, [r1, #3] + ldrb r0, [r4, r0] + pop {r3, r4} + bx lr + nop +_0224C59C: .word 0x022546C0 + thumb_func_end ov17_0224C57C + + thumb_func_start ov17_0224C5A0 +ov17_0224C5A0: ; 0x0224C5A0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + add r7, r2, #0 + cmp r4, #8 + blo _0224C5B2 + bl sub_02022974 +_0224C5B2: + ldr r0, _0224C634 ; =0x00001C0D + ldrb r0, [r5, r0] + cmp r0, #1 + beq _0224C62E + add r0, r5, #0 + mov r1, #1 + add r0, #0x88 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + ldr r0, [r5, #0x74] + mov r1, #1 + bl sub_0201C3C0 + add r0, r5, #0 + add r0, #0x98 + ldr r1, _0224C638 ; =0x0225470C + lsl r4, r4, #2 + ldrh r1, [r1, r4] + ldr r0, [r0, #0] + bl sub_0200B1EC + ldr r1, _0224C63C ; =0x0225470E + add r6, r0, #0 + ldrb r1, [r1, r4] + add r0, r5, #0 + add r2, r7, #0 + bl ov17_0224C0C0 + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x9c + add r1, #0xa0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x88 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + add r2, r5, #0 + add r0, r5, #0 + str r3, [sp, #8] + add r2, #0xa0 + ldr r2, [r2, #0] + add r0, #0x88 + mov r1, #1 + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0224C634 ; =0x00001C0D + mov r1, #1 + strb r1, [r5, r0] +_0224C62E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224C634: .word 0x00001C0D +_0224C638: .word 0x0225470C +_0224C63C: .word 0x0225470E + thumb_func_end ov17_0224C5A0 + + thumb_func_start ov17_0224C640 +ov17_0224C640: ; 0x0224C640 + push {r4, lr} + add r4, r0, #0 + add r0, #0x88 + mov r1, #1 + bl sub_0200E084 + ldr r0, [r4, #0x74] + mov r1, #1 + bl sub_0201C3C0 + ldr r0, _0224C65C ; =0x00001C0D + mov r1, #0 + strb r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_0224C65C: .word 0x00001C0D + thumb_func_end ov17_0224C640 + + thumb_func_start ov17_0224C660 +ov17_0224C660: ; 0x0224C660 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _0224C69C ; =0x00000B08 + ldrb r1, [r1, #4] + ldr r3, [r5, r0] + add r6, r2, #0 + mul r1, r3 + mul r6, r1 + add r1, r0, #4 + add r0, #8 + ldr r1, [r5, r1] + ldr r0, [r5, r0] + mov r4, #0 + add r0, r1, r0 + mul r0, r2 + add r0, r1, r0 + ldr r1, _0224C6A0 ; =0x00002710 + bl sub_020E2178 + add r1, r4, #0 + add r3, r6, r0 + ldr r0, _0224C6A4 ; =0x00001154 + adc r4, r1 + ldr r2, [r5, r0] + add r0, r0, #4 + ldr r1, [r5, r0] + sub r0, r3, r2 + sbc r4, r1 + add r1, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224C69C: .word 0x00000B08 +_0224C6A0: .word 0x00002710 +_0224C6A4: .word 0x00001154 + thumb_func_end ov17_0224C660 + + thumb_func_start ov17_0224C6A8 +ov17_0224C6A8: ; 0x0224C6A8 + ldr r3, _0224C6AC ; =ov17_0224C660 + bx r3 + ; .align 2, 0 +_0224C6AC: .word ov17_0224C660 + thumb_func_end ov17_0224C6A8 + + thumb_func_start ov17_0224C6B0 +ov17_0224C6B0: ; 0x0224C6B0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + mov r0, #0 + strb r0, [r7] + mov r0, #0x17 + mov r1, #0x2c + bl sub_02018144 + mov r1, #0 + mov r2, #0x2c + add r4, r0, #0 + bl sub_020C4CF4 + add r1, r6, #0 + add r1, #0x18 + lsl r0, r5, #4 + str r6, [r4, #0] + add r0, r1, r0 + str r0, [r4, #4] + mov r0, #0x85 + lsl r0, r0, #2 + add r1, r6, r0 + mov r0, #0x18 + mul r0, r5 + add r0, r1, r0 + str r0, [r4, #8] + mov r0, #0xad + str r7, [r4, #0xc] + add r1, r6, r5 + lsl r0, r0, #4 + ldrb r0, [r1, r0] + ldr r2, _0224C70C ; =0x00009C40 + cmp r0, #1 + bne _0224C702 + ldr r0, _0224C710 ; =ov17_0224C718 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_0224C702: + ldr r0, _0224C714 ; =ov17_0224C7B8 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C70C: .word 0x00009C40 +_0224C710: .word ov17_0224C718 +_0224C714: .word ov17_0224C7B8 + thumb_func_end ov17_0224C6B0 + + thumb_func_start ov17_0224C718 +ov17_0224C718: ; 0x0224C718 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _0224C72A + cmp r0, #1 + beq _0224C74A + b _0224C79A +_0224C72A: + ldr r0, [r4, #8] + mov r1, #1 + mov r2, #0 + bl ov17_0224AC78 + ldr r0, [r4, #4] + ldr r0, [r0, #8] + lsl r0, r0, #8 + str r0, [r4, #0x1c] + str r0, [r4, #0x18] + mov r0, #5 + lsl r0, r0, #8 + str r0, [r4, #0x14] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_0224C74A: + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x14] + sub r0, r1, r0 + str r0, [r4, #0x18] + mov r0, #2 + ldr r1, [r4, #0x14] + lsl r0, r0, #8 + sub r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [r4, #0x1c] + ldr r0, [r4, #0x18] + cmp r0, r1 + blt _0224C77E + str r1, [r4, #0x18] + ldrb r0, [r4, #0x11] + add r0, r0, #1 + strb r0, [r4, #0x11] + ldrb r0, [r4, #0x11] + cmp r0, #1 + bls _0224C77A + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + b _0224C77E +_0224C77A: + mov r0, #0 + strb r0, [r4, #0x10] +_0224C77E: + ldr r1, [r4, #0x18] + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 + ldr r0, [r4, #4] + str r1, [r0, #8] + ldr r2, [r4, #4] + ldr r0, [r2, #0] + ldr r1, [r2, #4] + ldr r2, [r2, #8] + bl ov22_0225B100 + pop {r3, r4, r5, pc} +_0224C79A: + ldr r0, [r4, #0xc] + mov r1, #1 + strb r1, [r0] + ldr r0, [r4, #8] + add r2, r1, #0 + bl ov17_0224AC78 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0224C718 + + thumb_func_start ov17_0224C7B8 +ov17_0224C7B8: ; 0x0224C7B8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _0224C7CA + cmp r0, #1 + beq _0224C7DA + b _0224C834 +_0224C7CA: + ldr r0, [r4, #4] + ldr r0, [r0, #4] + lsl r0, r0, #8 + str r0, [r4, #0x28] + str r0, [r4, #0x24] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_0224C7DA: + ldr r0, [r4, #0x20] + bl sub_0201D2B8 + lsl r1, r0, #2 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + mov r1, #0x32 + ldr r2, [r4, #0x20] + lsl r1, r1, #0xc + add r1, r2, r1 + str r1, [r4, #0x20] + asr r2, r1, #0xc + mov r1, #0x5a + lsl r1, r1, #2 + asr r0, r0, #0xc + cmp r2, r1 + blt _0224C816 + ldrb r1, [r4, #0x11] + add r1, r1, #1 + strb r1, [r4, #0x11] + ldrb r1, [r4, #0x11] + cmp r1, #5 + bls _0224C816 + ldr r0, [r4, #0x28] + str r0, [r4, #0x24] + ldrb r1, [r4, #0x10] + mov r0, #0 + add r1, r1, #1 + strb r1, [r4, #0x10] +_0224C816: + ldr r2, [r4, #0x24] + asr r1, r2, #7 + lsr r1, r1, #0x18 + add r1, r2, r1 + asr r1, r1, #8 + add r1, r1, r0 + ldr r0, [r4, #4] + str r1, [r0, #4] + ldr r2, [r4, #4] + ldr r0, [r2, #0] + ldr r1, [r2, #4] + ldr r2, [r2, #8] + bl ov22_0225B100 + pop {r3, r4, r5, pc} +_0224C834: + ldr r0, [r4, #0xc] + mov r1, #1 + strb r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0224C7B8 + + thumb_func_start ov17_0224C848 +ov17_0224C848: ; 0x0224C848 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224C848 + + thumb_func_start ov17_0224C84C +ov17_0224C84C: ; 0x0224C84C + push {r3, lr} + ldr r0, _0224C860 ; =0x04000050 + mov r3, #0 + mov r1, #1 + mov r2, #0x3e + str r3, [sp] + bl sub_020BF55C + pop {r3, pc} + nop +_0224C860: .word 0x04000050 + thumb_func_end ov17_0224C84C + + thumb_func_start ov17_0224C864 +ov17_0224C864: ; 0x0224C864 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0xa4 + add r5, r1, #0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02003164 + ldr r3, _0224C890 ; =0x022546DC + lsl r5, r5, #2 + ldrh r1, [r3, r5] + add r3, r3, r5 + ldr r2, _0224C894 ; =0x00001FE3 + str r1, [sp] + ldrh r3, [r3, #2] + ldr r1, _0224C898 ; =0x00001128 + lsl r3, r3, #0x18 + ldr r1, [r4, r1] + lsr r3, r3, #0x18 + bl sub_020039F8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224C890: .word 0x022546DC +_0224C894: .word 0x00001FE3 +_0224C898: .word 0x00001128 + thumb_func_end ov17_0224C864 + + thumb_func_start ov17_0224C89C +ov17_0224C89C: ; 0x0224C89C + push {r3, lr} + ldrb r2, [r1, #7] + cmp r2, #0 + bne _0224C8E4 + ldrb r2, [r1, #4] + cmp r2, #0 + beq _0224C8B2 + cmp r2, #1 + beq _0224C8B2 + cmp r2, #2 + b _0224C8DE +_0224C8B2: + ldrb r2, [r1, #3] + cmp r2, #4 + bhi _0224C8E0 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224C8C4: ; jump table + .short _0224C8E0 - _0224C8C4 - 2 ; case 0 + .short _0224C8CE - _0224C8C4 - 2 ; case 1 + .short _0224C8D2 - _0224C8C4 - 2 ; case 2 + .short _0224C8D6 - _0224C8C4 - 2 ; case 3 + .short _0224C8DA - _0224C8C4 - 2 ; case 4 +_0224C8CE: + mov r1, #1 + b _0224C8E0 +_0224C8D2: + mov r1, #2 + b _0224C8E0 +_0224C8D6: + mov r1, #3 + b _0224C8E0 +_0224C8DA: + mov r1, #4 + b _0224C8E0 +_0224C8DE: + mov r1, #5 +_0224C8E0: + bl ov17_0224C864 +_0224C8E4: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224C89C + + thumb_func_start ov17_0224C8E8 +ov17_0224C8E8: ; 0x0224C8E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp, #4] + ldr r1, _0224C97C ; =0x00000B04 + str r0, [sp] + ldr r0, [r0, r1] + ldr r5, _0224C980 ; =0x04000280 + lsr r0, r0, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + ldr r1, _0224C984 ; =0x00001BBC + add r6, r0, #0 + add r7, r0, r1 + lsr r4, r5, #0xb +_0224C908: + ldrb r0, [r7] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224C968 + ldr r1, [sp] + ldr r0, _0224C988 ; =0x00000B1B + ldrb r0, [r1, r0] + mov r1, #4 + bl ov17_0223F0BC + ldr r1, _0224C98C ; =0x00001BBA + lsr r2, r0, #0x1f + add r2, r0, r2 + ldrb r1, [r6, r1] + asr r0, r2, #1 + add r0, r1, r0 + ldr r1, [sp, #8] + mul r0, r1 + mov r1, #0 + strh r1, [r5] + ldr r1, _0224C990 ; =0x04000290 + str r0, [r1, #0] + ldr r1, _0224C994 ; =0x00002710 + ldr r0, _0224C998 ; =0x04000298 + str r1, [r0, #0] + mov r1, #0 + str r1, [r0, #4] +_0224C940: + ldrh r0, [r5] + tst r0, r4 + bne _0224C940 + ldr r0, _0224C99C ; =0x040002A0 + ldr r1, [r0, #0] + ldr r0, [sp, #4] + cmp r1, r0 + bne _0224C968 + ldr r0, [sp] + ldr r2, _0224C9A0 ; =0x00001BB4 + add r1, r0, #0 + add r3, r1, r2 + ldr r1, [sp, #0xc] + mov r2, #0xa + mul r2, r1 + add r1, r3, r2 + bl ov17_0224C89C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_0224C968: + ldr r0, [sp, #0xc] + add r7, #0xa + add r0, r0, #1 + add r6, #0xa + str r0, [sp, #0xc] + cmp r0, #8 + blt _0224C908 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C97C: .word 0x00000B04 +_0224C980: .word 0x04000280 +_0224C984: .word 0x00001BBC +_0224C988: .word 0x00000B1B +_0224C98C: .word 0x00001BBA +_0224C990: .word 0x04000290 +_0224C994: .word 0x00002710 +_0224C998: .word 0x04000298 +_0224C99C: .word 0x040002A0 +_0224C9A0: .word 0x00001BB4 + thumb_func_end ov17_0224C8E8 + + thumb_func_start ov17_0224C9A4 +ov17_0224C9A4: ; 0x0224C9A4 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224C9B6 + bl sub_02022974 +_0224C9B6: + mov r0, #0x81 + lsl r0, r0, #2 + add r5, r4, r0 + ldr r0, _0224C9CC ; =ov17_0224CA28 + ldr r2, _0224C9D0 ; =0x00009C40 + add r1, r5, #0 + str r4, [r5, #0] + bl sub_0200D9E8 + str r0, [r5, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224C9CC: .word ov17_0224CA28 +_0224C9D0: .word 0x00009C40 + thumb_func_end ov17_0224C9A4 + + thumb_func_start ov17_0224C9D4 +ov17_0224C9D4: ; 0x0224C9D4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224C9EE + bl sub_0200DA58 + mov r0, #0x82 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_0224C9EE: + pop {r4, pc} + thumb_func_end ov17_0224C9D4 + + thumb_func_start ov17_0224C9F0 +ov17_0224C9F0: ; 0x0224C9F0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x81 + lsl r1, r1, #2 + add r4, r0, r1 + ldr r0, [r4, #4] + cmp r0, #0 + bne _0224CA04 + bl sub_02022974 +_0224CA04: + cmp r5, #0 + bne _0224CA0C + mov r0, #0x40 + b _0224CA0E +_0224CA0C: + mov r0, #0x30 +_0224CA0E: + strb r0, [r4, #0xa] + mov r0, #1 + strb r0, [r4, #0xb] + mov r0, #0xa + lsl r0, r0, #8 + strh r0, [r4, #8] + ldr r0, _0224CA24 ; =0x000006F8 + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_0224CA24: .word 0x000006F8 + thumb_func_end ov17_0224C9F0 + + thumb_func_start ov17_0224CA28 +ov17_0224CA28: ; 0x0224CA28 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r0, [r4, #0xb] + cmp r0, #0 + beq _0224CA82 + ldr r0, [r4, #0] + mov r1, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_02003164 + ldrb r1, [r4, #0xa] + lsl r3, r1, #1 + ldr r1, _0224CA88 ; =0x00007FFF + add r0, r0, r3 + str r1, [sp] + ldr r2, [r4, #0] + ldr r1, _0224CA8C ; =0x00001128 + ldr r1, [r2, r1] + mov r2, #0x10 + add r1, r1, r3 + ldrh r3, [r4, #8] + asr r3, r3, #8 + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0200393C + ldrh r1, [r4, #8] + cmp r1, #0 + bne _0224CA6E + mov r0, #0 + add sp, #4 + strb r0, [r4, #0xb] + pop {r3, r4, pc} +_0224CA6E: + mov r0, #1 + lsl r0, r0, #8 + cmp r1, r0 + bls _0224CA7E + sub r0, r1, r0 + add sp, #4 + strh r0, [r4, #8] + pop {r3, r4, pc} +_0224CA7E: + mov r0, #0 + strh r0, [r4, #8] +_0224CA82: + add sp, #4 + pop {r3, r4, pc} + nop +_0224CA88: .word 0x00007FFF +_0224CA8C: .word 0x00001128 + thumb_func_end ov17_0224CA28 + + thumb_func_start ov17_0224CA90 +ov17_0224CA90: ; 0x0224CA90 + push {r3, r4, r5, lr} + ldr r5, _0224CAB8 ; =0x0000113C + add r4, r0, #0 + str r2, [r4, r5] + add r0, r5, #4 + str r3, [r4, r0] + add r0, r5, #0 + ldr r2, [sp, #0x10] + add r0, #8 + str r2, [r4, r0] + ldr r0, [sp, #0x14] + add r5, #0xc + str r0, [r4, r5] + ldr r0, [r4, #0xc] + ldr r2, _0224CABC ; =ov17_0224CAC0 + add r3, r4, #0 + bl sub_020146F4 + pop {r3, r4, r5, pc} + nop +_0224CAB8: .word 0x0000113C +_0224CABC: .word ov17_0224CAC0 + thumb_func_end ov17_0224CA90 + + thumb_func_start ov17_0224CAC0 +ov17_0224CAC0: ; 0x0224CAC0 + push {r4, lr} + add r4, r0, #0 + bl sub_02014764 + ldr r1, _0224CAFC ; =0x0000113C + add r1, r0, r1 + ldr r0, [r4, #0x20] + ldr r2, [r1, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r2, r0 + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r2, [r1, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r2, r0 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x20] + ldr r2, [r1, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r2, r0 + str r0, [r4, #0x30] + ldr r1, [r1, #0xc] + add r0, r4, #0 + bl sub_020147B0 + pop {r4, pc} + nop +_0224CAFC: .word 0x0000113C + thumb_func_end ov17_0224CAC0 + + thumb_func_start ov17_0224CB00 +ov17_0224CB00: ; 0x0224CB00 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r3, _0224CB70 ; =0x00000B1B + add r5, r0, #0 + ldrb r3, [r5, r3] + lsl r1, r1, #2 + lsl r4, r3, #2 + ldr r3, _0224CB74 ; =0x022546C4 + cmp r2, #0 + ldr r3, [r3, r4] + ldr r4, [r3, r1] + ldr r1, _0224CB78 ; =0xFFFFEB80 + ldr r3, _0224CB7C ; =0xFFFFBADC + bne _0224CB46 + str r1, [sp] + mov r1, #1 + lsl r1, r1, #0xc + str r1, [sp, #4] + mov r1, #0 + add r2, r4, #0 + bl ov17_0224CA90 + ldr r0, _0224CB78 ; =0xFFFFEB80 + ldr r3, _0224CB7C ; =0xFFFFBADC + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + bl ov17_0224CA90 + add sp, #8 + pop {r3, r4, r5, pc} +_0224CB46: + str r1, [sp] + mov r1, #1 + lsl r1, r1, #0xc + str r1, [sp, #4] + mov r1, #2 + add r2, r4, #0 + bl ov17_0224CA90 + ldr r0, _0224CB78 ; =0xFFFFEB80 + ldr r3, _0224CB7C ; =0xFFFFBADC + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #3 + add r2, r4, #0 + bl ov17_0224CA90 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224CB70: .word 0x00000B1B +_0224CB74: .word 0x022546C4 +_0224CB78: .word 0xFFFFEB80 +_0224CB7C: .word 0xFFFFBADC + thumb_func_end ov17_0224CB00 + + thumb_func_start ov17_0224CB80 +ov17_0224CB80: ; 0x0224CB80 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + cmp r1, #0 + ldr r1, _0224CD34 ; =0xFFFFEB80 + ldr r3, _0224CD38 ; =0xFFFFE764 + bne _0224CC0E + str r1, [sp] + mov r1, #1 + lsl r1, r1, #0xc + str r1, [sp, #4] + ldr r2, _0224CD3C ; =0xFFFFCD38 + mov r1, #5 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD3C ; =0xFFFFCD38 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #6 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD3C ; =0xFFFFCD38 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #7 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD40 ; =0x00005014 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #5 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD40 ; =0x00005014 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #6 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD40 ; =0x00005014 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #7 + bl ov17_0224CA90 + b _0224CCE4 +_0224CC0E: + str r1, [sp] + mov r1, #1 + lsl r1, r1, #0xc + str r1, [sp, #4] + ldr r2, _0224CD44 ; =0xFFFFBD98 + mov r1, #8 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD44 ; =0xFFFFBD98 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #9 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD44 ; =0xFFFFBD98 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #0xa + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD44 ; =0xFFFFBD98 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #0xb + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD44 ; =0xFFFFBD98 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #0xc + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD48 ; =0x00004074 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #8 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD48 ; =0x00004074 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #9 + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD48 ; =0x00004074 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #0xa + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD48 ; =0x00004074 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #0xb + bl ov17_0224CA90 + ldr r0, _0224CD34 ; =0xFFFFEB80 + ldr r2, _0224CD48 ; =0x00004074 + str r0, [sp] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r3, _0224CD38 ; =0xFFFFE764 + add r0, r4, #0 + mov r1, #0xc + bl ov17_0224CA90 +_0224CCE4: + mov r0, #0 + str r0, [sp] + ldr r0, _0224CD4C ; =0x00007FFF + ldr r1, _0224CD50 ; =0x00001FE3 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #8 + mov r3, #0x10 + bl ov17_0224CD84 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r2, _0224CD4C ; =0x00007FFF + add r0, r4, #0 + str r2, [sp, #8] + add r0, #0xa4 + mov r1, #4 + ldr r0, [r0, #0] + lsr r2, r2, #1 + sub r3, r1, #5 + bl sub_02003178 + ldr r0, _0224CD54 ; =0x04000050 + mov r1, #0x3f + mov r2, #0x10 + bl sub_020BF578 + mov r2, #0xfa + ldr r0, _0224CD58 ; =ov17_0224CD60 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + ldr r0, _0224CD5C ; =0x000006E5 + bl sub_02005748 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0224CD34: .word 0xFFFFEB80 +_0224CD38: .word 0xFFFFE764 +_0224CD3C: .word 0xFFFFCD38 +_0224CD40: .word 0x00005014 +_0224CD44: .word 0xFFFFBD98 +_0224CD48: .word 0x00004074 +_0224CD4C: .word 0x00007FFF +_0224CD50: .word 0x00001FE3 +_0224CD54: .word 0x04000050 +_0224CD58: .word ov17_0224CD60 +_0224CD5C: .word 0x000006E5 + thumb_func_end ov17_0224CB80 + + thumb_func_start ov17_0224CD60 +ov17_0224CD60: ; 0x0224CD60 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r3, #0 + ldr r0, _0224CD80 ; =0x04000050 + mov r1, #1 + mov r2, #0x3e + str r3, [sp] + bl sub_020BF55C + add r0, r4, #0 + bl sub_0200DA58 + add sp, #4 + pop {r3, r4, pc} + nop +_0224CD80: .word 0x04000050 + thumb_func_end ov17_0224CD60 + + thumb_func_start ov17_0224CD84 +ov17_0224CD84: ; 0x0224CD84 + push {r3, r4, r5, lr} + ldr r4, _0224CDB0 ; =0x00001128 + ldr r5, [sp, #0x10] + add r4, r0, r4 + lsl r0, r3, #8 + strh r0, [r4, #8] + lsl r0, r5, #8 + strh r0, [r4, #0xa] + add r0, sp, #0 + ldrh r0, [r0, #0x14] + strh r0, [r4, #0xe] + sub r0, r5, r3 + strh r1, [r4, #6] + lsl r0, r0, #8 + add r1, r2, #0 + bl sub_020E2178 + strh r0, [r4, #0xc] + mov r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} + nop +_0224CDB0: .word 0x00001128 + thumb_func_end ov17_0224CD84 + + thumb_func_start ov17_0224CDB4 +ov17_0224CDB4: ; 0x0224CDB4 + ldr r2, _0224CDBC ; =0x00001139 + strb r1, [r0, r2] + bx lr + nop +_0224CDBC: .word 0x00001139 + thumb_func_end ov17_0224CDB4 + + thumb_func_start ov17_0224CDC0 +ov17_0224CDC0: ; 0x0224CDC0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + cmp r2, #0 + bne _0224CDD0 + ldr r7, _0224CDFC ; =0x00007FFF + ldr r6, _0224CE00 ; =0x0000254A + b _0224CDD4 +_0224CDD0: + ldr r7, _0224CE00 ; =0x0000254A + ldr r6, _0224CDFC ; =0x00007FFF +_0224CDD4: + mov r4, #0 +_0224CDD6: + ldr r0, [sp] + cmp r4, r0 + ldr r0, [r5, #0x18] + bne _0224CDE6 + add r1, r7, #0 + bl ov22_0225B198 + b _0224CDEC +_0224CDE6: + add r1, r6, #0 + bl ov22_0225B198 +_0224CDEC: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0224CDD6 + ldr r0, _0224CE04 ; =0x000006EC + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224CDFC: .word 0x00007FFF +_0224CE00: .word 0x0000254A +_0224CE04: .word 0x000006EC + thumb_func_end ov17_0224CDC0 + + thumb_func_start ov17_0224CE08 +ov17_0224CE08: ; 0x0224CE08 + push {r4, r5, r6, lr} + ldr r6, _0224CE24 ; =0x00007FFF + add r5, r0, #0 + mov r4, #0 +_0224CE10: + ldr r0, [r5, #0x18] + add r1, r6, #0 + bl ov22_0225B198 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0224CE10 + pop {r4, r5, r6, pc} + nop +_0224CE24: .word 0x00007FFF + thumb_func_end ov17_0224CE08 + + thumb_func_start ov17_0224CE28 +ov17_0224CE28: ; 0x0224CE28 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #0xc] + mov r4, #0 + add r5, sp, #0x18 + add r3, sp, #0x14 + ldr r2, _0224CED4 ; =0x00000AF6 + b _0224CE46 +_0224CE38: + ldr r1, [sp, #0xc] + lsl r0, r4, #1 + add r1, r1, r0 + ldrsh r1, [r1, r2] + strb r4, [r3, r4] + add r4, r4, #1 + strh r1, [r5, r0] +_0224CE46: + cmp r4, #4 + blt _0224CE38 + mov r4, #0 + add r7, sp, #0x18 + b _0224CE7A +_0224CE50: + mov r6, #3 + b _0224CE74 +_0224CE54: + sub r3, r6, #1 + lsl r5, r3, #1 + lsl r1, r6, #1 + ldrsh r2, [r7, r5] + ldrsh r0, [r7, r1] + cmp r2, r0 + bge _0224CE72 + strh r2, [r7, r1] + strh r0, [r7, r5] + add r0, sp, #0x14 + add r1, sp, #0x14 + ldrb r0, [r0, r6] + ldrb r2, [r1, r3] + strb r2, [r1, r6] + strb r0, [r1, r3] +_0224CE72: + sub r6, r6, #1 +_0224CE74: + cmp r6, r4 + bgt _0224CE54 + add r4, r4, #1 +_0224CE7A: + cmp r4, #3 + blt _0224CE50 + ldr r3, _0224CED8 ; =0x022549C0 + add r0, sp, #0x10 + ldrb r1, [r3] + mov r4, #1 + add r2, sp, #0x10 + strb r1, [r0] + add r1, sp, #0x18 + b _0224CEA6 +_0224CE8E: + ldrb r0, [r3, r4] + sub r6, r4, #1 + lsl r5, r6, #1 + strb r0, [r2, r4] + lsl r0, r4, #1 + ldrsh r0, [r1, r0] + ldrsh r5, [r1, r5] + cmp r0, r5 + bne _0224CEA4 + ldrb r0, [r2, r6] + strb r0, [r2, r4] +_0224CEA4: + add r4, r4, #1 +_0224CEA6: + cmp r4, #4 + blt _0224CE8E + mov r4, #0 + add r5, sp, #0x10 + mov r6, #0x1e + add r7, r4, #0 + b _0224CECC +_0224CEB4: + ldrb r0, [r5, r4] + add r1, sp, #0x14 + ldrb r1, [r1, r4] + str r0, [sp] + str r6, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _0224CEDC ; =0x00007FFF + ldr r3, _0224CEE0 ; =0x0000254A + str r7, [sp, #8] + bl ov17_0224CEE4 + add r4, r4, #1 +_0224CECC: + cmp r4, #4 + blt _0224CEB4 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224CED4: .word 0x00000AF6 +_0224CED8: .word 0x022549C0 +_0224CEDC: .word 0x00007FFF +_0224CEE0: .word 0x0000254A + thumb_func_end ov17_0224CE28 + + thumb_func_start ov17_0224CEE4 +ov17_0224CEE4: ; 0x0224CEE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + str r1, [sp] + mov r0, #0x17 + mov r1, #0x14 + add r6, r2, #0 + str r3, [sp, #4] + ldr r5, [sp, #0x28] + bl sub_02018144 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r1, [sp, #0x24] + lsl r0, r0, #4 + add r0, r7, r0 + ldr r0, [r0, #0x18] + str r0, [r4, #0] + strh r6, [r4, #8] + ldr r0, [sp, #4] + strh r0, [r4, #0xa] + ldr r0, [sp, #0x20] + strb r0, [r4, #0x10] + lsl r0, r0, #8 + bl sub_020E1F6C + strh r0, [r4, #0xc] + str r5, [r4, #4] + cmp r5, #0 + beq _0224CF2C + mov r0, #0 + strb r0, [r5] +_0224CF2C: + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov22_0225B198 + ldr r0, _0224CF44 ; =ov17_0224CF4C + ldr r2, _0224CF48 ; =0x00009C40 + add r1, r4, #0 + bl sub_0200D9E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224CF44: .word ov17_0224CF4C +_0224CF48: .word 0x00009C40 + thumb_func_end ov17_0224CEE4 + + thumb_func_start ov17_0224CF4C +ov17_0224CF4C: ; 0x0224CF4C + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + ldrh r1, [r5, #0xe] + ldrh r0, [r5, #0xc] + add r0, r1, r0 + strh r0, [r5, #0xe] + ldrh r0, [r5, #0xe] + asr r4, r0, #8 + ldrb r0, [r5, #0x10] + cmp r4, r0 + ble _0224CF68 + add r4, r0, #0 +_0224CF68: + ldrh r0, [r5, #0xa] + lsl r3, r4, #0x18 + add r1, sp, #4 + str r0, [sp] + add r0, r5, #0 + add r0, #8 + mov r2, #1 + lsr r3, r3, #0x18 + bl sub_0200393C + add r1, sp, #4 + ldrh r1, [r1] + ldr r0, [r5, #0] + bl ov22_0225B198 + ldrb r0, [r5, #0x10] + cmp r4, r0 + blt _0224CFA2 + ldr r1, [r5, #4] + cmp r1, #0 + beq _0224CF96 + mov r0, #1 + strb r0, [r1] +_0224CF96: + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0224CFA2: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_0224CF4C + + thumb_func_start ov17_0224CFA8 +ov17_0224CFA8: ; 0x0224CFA8 + cmp r0, #0x32 + beq _0224CFB0 + cmp r0, #0x33 + bne _0224CFB4 +_0224CFB0: + mov r0, #0 + bx lr +_0224CFB4: + mov r0, #1 + bx lr + thumb_func_end ov17_0224CFA8 + + .rodata + + + .global Unk_ov17_022546C0 +Unk_ov17_022546C0: ; 0x022546C0 + .incbin "incbin/overlay17_rodata.bin", 0x1934, 0x1938 - 0x1934 + + .global Unk_ov17_022546C4 +Unk_ov17_022546C4: ; 0x022546C4 + .incbin "incbin/overlay17_rodata.bin", 0x1938, 0x1940 - 0x1938 + + .global Unk_ov17_022546CC +Unk_ov17_022546CC: ; 0x022546CC + .incbin "incbin/overlay17_rodata.bin", 0x1940, 0x1950 - 0x1940 + + .global Unk_ov17_022546DC +Unk_ov17_022546DC: ; 0x022546DC + .incbin "incbin/overlay17_rodata.bin", 0x1950, 0x1968 - 0x1950 + + .global Unk_ov17_022546F4 +Unk_ov17_022546F4: ; 0x022546F4 + .incbin "incbin/overlay17_rodata.bin", 0x1968, 0x1980 - 0x1968 + + .global Unk_ov17_0225470C +Unk_ov17_0225470C: ; 0x0225470C + .incbin "incbin/overlay17_rodata.bin", 0x1980, 0x19A0 - 0x1980 + + .global Unk_ov17_0225472C +Unk_ov17_0225472C: ; 0x0225472C + .incbin "incbin/overlay17_rodata.bin", 0x19A0, 0x19D4 - 0x19A0 + + .global Unk_ov17_02254760 +Unk_ov17_02254760: ; 0x02254760 + .incbin "incbin/overlay17_rodata.bin", 0x19D4, 0x1A08 - 0x19D4 + + .global Unk_ov17_02254794 +Unk_ov17_02254794: ; 0x02254794 + .incbin "incbin/overlay17_rodata.bin", 0x1A08, 0x1A3C - 0x1A08 + + .global Unk_ov17_022547C8 +Unk_ov17_022547C8: ; 0x022547C8 + .incbin "incbin/overlay17_rodata.bin", 0x1A3C, 0x1A70 - 0x1A3C + + .global Unk_ov17_022547FC +Unk_ov17_022547FC: ; 0x022547FC + .incbin "incbin/overlay17_rodata.bin", 0x1A70, 0x1AA4 - 0x1A70 + + .global Unk_ov17_02254830 +Unk_ov17_02254830: ; 0x02254830 + .incbin "incbin/overlay17_rodata.bin", 0x1AA4, 0x1AD8 - 0x1AA4 + + .global Unk_ov17_02254864 +Unk_ov17_02254864: ; 0x02254864 + .incbin "incbin/overlay17_rodata.bin", 0x1AD8, 0x1B0C - 0x1AD8 + + .global Unk_ov17_02254898 +Unk_ov17_02254898: ; 0x02254898 + .incbin "incbin/overlay17_rodata.bin", 0x1B0C, 0x1B48 - 0x1B0C + + .global Unk_ov17_022548D4 +Unk_ov17_022548D4: ; 0x022548D4 + .incbin "incbin/overlay17_rodata.bin", 0x1B48, 0x1BAC - 0x1B48 + + .global Unk_ov17_02254938 +Unk_ov17_02254938: ; 0x02254938 + .incbin "incbin/overlay17_rodata.bin", 0x1BAC, 0x1C30 - 0x1BAC + + .global Unk_ov17_022549BC +Unk_ov17_022549BC: ; 0x022549BC + .incbin "incbin/overlay17_rodata.bin", 0x1C30, 0x1C34 - 0x1C30 + + .global Unk_ov17_022549C0 +Unk_ov17_022549C0: ; 0x022549C0 + .incbin "incbin/overlay17_rodata.bin", 0x1C34, 0x4 + diff --git a/asm/ov17_0224CFB8.s b/asm/ov17_0224CFB8.s new file mode 100644 index 000000000..feff5197b --- /dev/null +++ b/asm/ov17_0224CFB8.s @@ -0,0 +1,3390 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0224CFB8 +ov17_0224CFB8: ; 0x0224CFB8 + push {r3, r4, lr} + sub sp, #0xc + ldr r1, _0224CFEC ; =0x022549E4 + add r3, sp, #0 + str r1, [sp] + mov r1, #0xd + strh r1, [r3, #4] + ldr r1, [r0, #0] + ldr r2, _0224CFF0 ; =0x00000123 + ldrb r1, [r1, r2] + strb r1, [r3, #6] + sub r1, r2, #7 + ldr r4, [r0, #0] + add r2, #0x4e + ldrb r1, [r4, r1] + strb r1, [r3, #8] + ldr r1, [r0, #0] + ldrb r1, [r1, r2] + strb r1, [r3, #7] + ldr r1, _0224CFF4 ; =0x00001174 + add r0, r0, r1 + add r1, sp, #0 + bl ov17_0224F18C + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0224CFEC: .word 0x022549E4 +_0224CFF0: .word 0x00000123 +_0224CFF4: .word 0x00001174 + thumb_func_end ov17_0224CFB8 + + thumb_func_start ov17_0224CFF8 +ov17_0224CFF8: ; 0x0224CFF8 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224CFF8 + + thumb_func_start ov17_0224D00C +ov17_0224D00C: ; 0x0224D00C + push {r3, lr} + add r1, r2, #0 + mov r2, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D00C + + thumb_func_start ov17_0224D01C +ov17_0224D01C: ; 0x0224D01C + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224D01C + + thumb_func_start ov17_0224D020 +ov17_0224D020: ; 0x0224D020 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D020 + + thumb_func_start ov17_0224D034 +ov17_0224D034: ; 0x0224D034 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x17 + mov r1, #0x18 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _0224D070 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _0224D074 ; =ov17_0224D078 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D070: .word 0x00007530 +_0224D074: .word ov17_0224D078 + thumb_func_end ov17_0224D034 + + thumb_func_start ov17_0224D078 +ov17_0224D078: ; 0x0224D078 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r1, #0x10] + str r1, [sp] + cmp r0, #0 + beq _0224D088 + b _0224D1AE +_0224D088: + ldr r0, [sp] + mov r1, #0x14 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _0224D09C + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x14] + pop {r4, r5, r6, r7, pc} +_0224D09C: + ldr r0, [sp] + mov r1, #0x13 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _0224D0B0 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x13] + pop {r4, r5, r6, r7, pc} +_0224D0B0: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + ldr r0, [r0, #0] + mov r1, #2 + ldr r0, [r0, #0x74] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _0224D128 +_0224D0C8: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + ldr r0, _0224D1CC ; =0x022549C4 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _0224D122 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r0, [r0, #0x12] + mov r7, #0x3f + str r5, [sp, #4] + lsl r1, r0, #1 + ldr r0, _0224D1D0 ; =0x022549CC + lsl r7, r7, #0xa + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r0, r0, #5 + add r6, r1, r0 + b _0224D11C +_0224D0F8: + mov r4, #0 + b _0224D110 +_0224D0FC: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_0224D110: + cmp r4, #8 + blt _0224D0FC + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_0224D11C: + ldr r0, [sp, #4] + cmp r0, #4 + blt _0224D0F8 +_0224D122: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_0224D128: + ldr r0, [sp, #8] + cmp r0, #4 + blt _0224D0C8 + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _0224D16A + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _0224D16A + ldr r0, _0224D1CC ; =0x022549C4 + sub r1, r1, #1 + ldrsb r0, [r0, r1] + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #0x3f + str r0, [sp, #4] + lsl r1, r1, #0xa + b _0224D164 +_0224D154: + ldr r0, [sp, #4] + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r1 + strh r0, [r3, r2] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_0224D164: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _0224D154 +_0224D16A: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x74] + bl sub_0201C3C0 + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _0224D1C8 + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _0224D1C8 + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_0224D1AE: + add r0, r1, #0 + mov r2, #0 + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224D1C8: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D1CC: .word 0x022549C4 +_0224D1D0: .word 0x022549CC + thumb_func_end ov17_0224D078 + + thumb_func_start ov17_0224D1D4 +ov17_0224D1D4: ; 0x0224D1D4 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D1D4 + + thumb_func_start ov17_0224D1E8 +ov17_0224D1E8: ; 0x0224D1E8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + mov r0, #0x17 + mov r1, #0x18 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + ldr r2, _0224D230 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _0224D234 ; =ov17_0224D240 + str r7, [r4, #0xc] + bl sub_0200D9E8 + ldr r0, _0224D238 ; =0x00001150 + mov r1, #0 + strb r1, [r6, r0] + ldr r0, _0224D23C ; =0x0000046F + bl sub_0200549C + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D230: .word 0x00007530 +_0224D234: .word ov17_0224D240 +_0224D238: .word 0x00001150 +_0224D23C: .word 0x0000046F + thumb_func_end ov17_0224D1E8 + + thumb_func_start ov17_0224D240 +ov17_0224D240: ; 0x0224D240 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r1, #0x10] + str r1, [sp] + cmp r0, #0 + beq _0224D250 + b _0224D39E +_0224D250: + ldr r0, [sp] + mov r1, #0x14 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _0224D264 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x14] + pop {r4, r5, r6, r7, pc} +_0224D264: + ldr r0, [sp] + mov r1, #0x13 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _0224D278 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x13] + pop {r4, r5, r6, r7, pc} +_0224D278: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + ldr r0, [r0, #0] + mov r1, #2 + ldr r0, [r0, #0x74] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _0224D2F8 +_0224D290: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + mov r0, #4 + sub r1, r0, r1 + ldr r0, _0224D3BC ; =0x022549C4 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _0224D2F2 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r1, [r0, #0x12] + mov r0, #0xb + mov r7, #0x3f + sub r0, r0, r1 + lsl r1, r0, #1 + ldr r0, _0224D3C0 ; =0x022549CC + str r5, [sp, #4] + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r7, r7, #0xa + lsl r0, r0, #5 + add r6, r1, r0 + b _0224D2EC +_0224D2C8: + mov r4, #0 + b _0224D2E0 +_0224D2CC: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_0224D2E0: + cmp r4, #8 + blt _0224D2CC + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_0224D2EC: + ldr r0, [sp, #4] + cmp r0, #4 + blt _0224D2C8 +_0224D2F2: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_0224D2F8: + ldr r0, [sp, #8] + cmp r0, #4 + blt _0224D290 + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _0224D35A + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _0224D35A + mov r0, #5 + sub r1, r0, r1 + ldr r0, _0224D3BC ; =0x022549C4 + mov r7, #0x3f + ldrsb r0, [r0, r1] + lsl r7, r7, #0xa + mov r6, #0x1d + add r0, r0, #3 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #2 + str r0, [sp, #4] + lsl r1, r1, #8 + b _0224D354 +_0224D32E: + ldr r0, [sp, #4] + ldr r5, [sp, #4] + lsl r4, r0, #1 + ldrh r0, [r3, r4] + lsl r5, r5, #0x1d + and r0, r7 + strh r0, [r3, r4] + ldr r0, [sp, #4] + ldrh r2, [r3, r4] + lsr r0, r0, #0x1f + sub r5, r5, r0 + ror r5, r6 + add r0, r0, r5 + add r0, r0, r1 + orr r0, r2 + strh r0, [r3, r4] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_0224D354: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _0224D32E +_0224D35A: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x74] + bl sub_0201C3C0 + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _0224D3B8 + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _0224D3B8 + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_0224D39E: + add r0, r1, #0 + mov r2, #0 + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224D3B8: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D3BC: .word 0x022549C4 +_0224D3C0: .word 0x022549CC + thumb_func_end ov17_0224D240 + + thumb_func_start ov17_0224D3C4 +ov17_0224D3C4: ; 0x0224D3C4 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D3C4 + + thumb_func_start ov17_0224D3D8 +ov17_0224D3D8: ; 0x0224D3D8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x17 + mov r1, #0x14 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _0224D414 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _0224D418 ; =ov17_0224D41C + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D414: .word 0x00007530 +_0224D418: .word ov17_0224D41C + thumb_func_end ov17_0224D3D8 + + thumb_func_start ov17_0224D41C +ov17_0224D41C: ; 0x0224D41C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #5 + bhi _0224D4C0 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224D434: ; jump table + .short _0224D440 - _0224D434 - 2 ; case 0 + .short _0224D450 - _0224D434 - 2 ; case 1 + .short _0224D460 - _0224D434 - 2 ; case 2 + .short _0224D482 - _0224D434 - 2 ; case 3 + .short _0224D49C - _0224D434 - 2 ; case 4 + .short _0224D4B4 - _0224D434 - 2 ; case 5 +_0224D440: + ldr r0, _0224D4DC ; =0x0000046F + mov r1, #0x1e + bl sub_020055D0 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224D450: + bl sub_02005684 + cmp r0, #0 + bne _0224D4D8 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224D460: + ldr r0, _0224D4E0 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + bl ov17_0224C84C + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x14 + bl ov17_0224ABDC + ldr r0, _0224D4E4 ; =0x000006EC + bl sub_02005748 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224D482: + mov r0, #0x12 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x12] + ldrsh r0, [r4, r0] + cmp r0, #0x1e + ble _0224D4D8 + mov r0, #0 + strh r0, [r4, #0x12] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224D49C: + ldr r0, [r4, #0] + ldr r1, _0224D4E8 ; =0x00000123 + ldr r2, [r0, #0] + ldrb r1, [r2, r1] + add r2, r4, #0 + add r2, #0x11 + bl ov17_0224C6B0 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224D4B4: + ldrb r1, [r4, #0x11] + cmp r1, #1 + bne _0224D4D8 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224D4C0: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0224D4D8: + pop {r3, r4, r5, pc} + nop +_0224D4DC: .word 0x0000046F +_0224D4E0: .word 0x04000050 +_0224D4E4: .word 0x000006EC +_0224D4E8: .word 0x00000123 + thumb_func_end ov17_0224D41C + + thumb_func_start ov17_0224D4EC +ov17_0224D4EC: ; 0x0224D4EC + push {r3, lr} + mov r1, #4 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D4EC + + thumb_func_start ov17_0224D500 +ov17_0224D500: ; 0x0224D500 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + add r2, r3, #0 + ldr r0, _0224D53C ; =0x00001C0C + mov r1, #1 + strb r1, [r5, r0] + ldr r3, _0224D540 ; =0x00000172 + mov r1, #0 +_0224D514: + ldr r6, [r5, #0] + ldrb r0, [r2, r1] + add r6, r6, r1 + add r1, r1, #1 + strb r0, [r6, r3] + cmp r1, #4 + blt _0224D514 + ldr r0, [r5, #0] + bl sub_02094EDC + cmp r0, #0 + bne _0224D538 + mov r2, #0 + add r0, r4, #0 + add r1, r7, #0 + add r3, r2, #0 + bl ov17_0224F26C +_0224D538: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D53C: .word 0x00001C0C +_0224D540: .word 0x00000172 + thumb_func_end ov17_0224D500 + + thumb_func_start ov17_0224D544 +ov17_0224D544: ; 0x0224D544 + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D544 + + thumb_func_start ov17_0224D558 +ov17_0224D558: ; 0x0224D558 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + mov r1, #0x57 + add r7, r0, #0 + mov r0, #0x17 + lsl r1, r1, #2 + add r5, r2, #0 + str r3, [sp, #4] + bl sub_02018144 + mov r2, #0x57 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + add r3, r4, #0 + add r3, #0x18 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + mov r2, #7 + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + ldr r5, [sp, #4] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] +_0224D596: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224D596 + ldr r0, [r5, #0] + ldr r2, _0224D654 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _0224D658 ; =ov17_0224D710 + add r1, r4, #0 + str r6, [r4, #0x54] + bl sub_0200D9E8 + mov r7, #0 + add r5, r4, #0 +_0224D5B2: + ldr r1, [r6, #0] + ldr r0, _0224D65C ; =0x00000127 + ldrb r0, [r1, r0] + cmp r7, r0 + bge _0224D5C6 + add r0, r6, #0 + mov r1, #0 + bl ov17_0224D668 + b _0224D5CE +_0224D5C6: + add r0, r6, #0 + mov r1, #1 + bl ov17_0224D668 +_0224D5CE: + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #4 + blt _0224D5B2 + ldr r1, [r4, #0] + ldr r2, _0224D660 ; =0x00000123 + ldr r3, [r1, #0] + mov r0, #0 + ldrb r3, [r3, r2] +_0224D5E6: + add r2, r4, r0 + ldrb r2, [r2, #0x1a] + cmp r3, r2 + bne _0224D5F4 + ldr r2, _0224D664 ; =0x00000AE8 + strb r0, [r1, r2] + b _0224D5FA +_0224D5F4: + add r0, r0, #1 + cmp r0, #4 + blt _0224D5E6 +_0224D5FA: + add r0, r6, #0 + bl ov17_0224DF54 + ldr r1, [r6, #0] + ldr r0, _0224D65C ; =0x00000127 + ldrb r5, [r1, r0] + cmp r5, #4 + bge _0224D650 + ldr r0, [sp, #4] + lsl r1, r5, #2 + add r7, r0, r1 + add r1, r4, #0 + mov r0, #0x3c + add r1, #0x5c + mul r0, r5 + add r0, r1, r0 + str r0, [sp, #8] +_0224D61C: + mov r2, #0 +_0224D61E: + add r0, r4, r2 + ldrb r0, [r0, #0x1a] + cmp r5, r0 + beq _0224D62C + add r2, r2, #1 + cmp r2, #4 + blt _0224D61E +_0224D62C: + ldr r0, [r6, #0] + add r1, r0, r5 + mov r0, #0x43 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + add r1, r5, #0 + str r0, [sp] + ldr r0, [sp, #8] + ldr r3, [r7, #0x14] + bl ov17_0224E930 + ldr r0, [sp, #8] + add r5, r5, #1 + add r0, #0x3c + add r7, r7, #4 + str r0, [sp, #8] + cmp r5, #4 + blt _0224D61C +_0224D650: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D654: .word 0x00007530 +_0224D658: .word ov17_0224D710 +_0224D65C: .word 0x00000127 +_0224D660: .word 0x00000123 +_0224D664: .word 0x00000AE8 + thumb_func_end ov17_0224D558 + + thumb_func_start ov17_0224D668 +ov17_0224D668: ; 0x0224D668 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x17 + mov r1, #0x14 + bl sub_02018144 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + str r5, [r4, #4] + ldr r0, _0224D694 ; =ov17_0224D6CC + ldr r2, _0224D698 ; =0x00007594 + add r1, r4, #0 + strb r6, [r4, #0x12] + bl sub_0200D9E8 + str r0, [r4, #0] + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224D694: .word ov17_0224D6CC +_0224D698: .word 0x00007594 + thumb_func_end ov17_0224D668 + + thumb_func_start ov17_0224D69C +ov17_0224D69C: ; 0x0224D69C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0224D69C + + thumb_func_start ov17_0224D6B0 +ov17_0224D6B0: ; 0x0224D6B0 + ldrh r2, [r1] + strh r2, [r0, #8] + ldrh r2, [r1, #2] + strh r2, [r0, #0xa] + ldrh r2, [r1, #4] + strh r2, [r0, #0xc] + ldrh r2, [r1, #6] + strh r2, [r0, #0xe] + ldrh r1, [r1, #8] + strh r1, [r0, #0x10] + mov r1, #1 + strb r1, [r0, #0x13] + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224D6B0 + + thumb_func_start ov17_0224D6CC +ov17_0224D6CC: ; 0x0224D6CC + push {r4, lr} + add r4, r1, #0 + ldrb r0, [r4, #0x13] + cmp r0, #0 + beq _0224D708 + ldr r0, [r4, #4] + ldr r1, _0224D70C ; =0x00000171 + ldr r2, [r0, #0] + ldrb r1, [r2, r1] + cmp r1, #0 + beq _0224D6E8 + ldrb r1, [r4, #0x12] + cmp r1, #1 + bne _0224D6F6 +_0224D6E8: + add r1, r4, #0 + add r1, #8 + bl ov17_0224B20C + mov r0, #0 + strb r0, [r4, #0x13] + pop {r4, pc} +_0224D6F6: + add r1, r4, #0 + mov r0, #0x19 + add r1, #8 + bl sub_020360D0 + cmp r0, #1 + bne _0224D708 + mov r0, #0 + strb r0, [r4, #0x13] +_0224D708: + pop {r4, pc} + nop +_0224D70C: .word 0x00000171 + thumb_func_end ov17_0224D6CC + + thumb_func_start ov17_0224D710 +ov17_0224D710: ; 0x0224D710 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + add r4, r1, #0 + ldr r3, [r4, #0] + str r0, [sp, #0x1c] + ldr r1, [r3, #0] + ldr r0, _0224DA50 ; =0x00000123 + ldrb r1, [r1, r0] + ldrb r0, [r4, #0x18] + cmp r1, r0 + beq _0224D72A + mov r7, #1 + b _0224D72C +_0224D72A: + mov r7, #0 +_0224D72C: + ldr r0, _0224DA54 ; =0x00001154 + ldr r2, [r4, #0x24] + ldr r1, [r3, r0] + add r0, #8 + ldr r0, [r3, r0] + sub r0, r1, r0 + lsr r1, r2, #1 + str r0, [sp, #0x24] + cmp r0, r1 + blo _0224D746 + mov r0, #1 + str r0, [sp, #0x20] + b _0224D74A +_0224D746: + mov r0, #0 + str r0, [sp, #0x20] +_0224D74A: + ldrb r0, [r4, #0x10] + cmp r0, #3 + bls _0224D752 + b _0224DBD0 +_0224D752: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224D75E: ; jump table + .short _0224D766 - _0224D75E - 2 ; case 0 + .short _0224D7E0 - _0224D75E - 2 ; case 1 + .short _0224D84C - _0224D75E - 2 ; case 2 + .short _0224DB4E - _0224D75E - 2 ; case 3 +_0224D766: + add r3, #0x14 + add r0, r3, #0 + mov r1, #0 + bl ov17_0224B068 + ldr r0, [r4, #0] + bl ov17_0224BC4C + add r3, r4, #0 + ldrb r2, [r4, #0x18] + mov r1, #0x3c + add r3, #0x5c + mul r1, r2 + add r1, r3, r1 + ldr r0, [r4, #0] + ldr r2, [r4, #0x24] + ldr r3, [r4, #0x20] + bl ov17_0224E990 + mov r0, #0x21 + ldr r2, [r4, #0] + ldr r1, _0224DA58 ; =0x00000B1B + lsl r0, r0, #4 + ldrb r1, [r2, r1] + ldr r0, [r2, r0] + bl ov17_0224C54C + ldr r1, [r4, #0] + ldr r0, _0224DA5C ; =0x000009B4 + add r0, r1, r0 + mov r1, #1 + bl ov17_0224C47C + ldr r0, [r4, #0] + mov r1, #0 + bl ov17_0224C864 + ldr r0, [r4, #0] + bl ov17_0224C9A4 + add r0, r4, #0 + add r0, #0x41 + ldrb r1, [r0] + add r0, sp, #0x30 + cmp r7, #0 + strb r1, [r0, #4] + ldr r0, [r4, #0] + add r2, sp, #0x30 + bne _0224D7D0 + mov r1, #4 + bl ov17_0224C5A0 + b _0224D7D6 +_0224D7D0: + mov r1, #5 + bl ov17_0224C5A0 +_0224D7D6: + ldrb r0, [r4, #0x10] + add sp, #0x48 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224D7E0: + ldrb r2, [r4, #0x19] + add r1, r4, #0 + add r0, r3, #0 + add r1, #0x3c + bl ov17_0224C6A8 + mov r3, #0 + mov r2, #0 + sub r0, r2, r0 + sbc r3, r1 + bge _0224D7F8 + b _0224DBFE +_0224D7F8: + ldr r0, [r4, #0] + bl ov17_0224C640 + ldr r5, [r4, #0] + add r1, r4, #0 + ldrb r2, [r4, #0x19] + add r0, r5, #0 + add r1, #0x3c + bl ov17_0224C6A8 + ldr r2, _0224DA54 ; =0x00001154 + add r6, r0, #0 + add r0, r1, #0 + add r1, r2, #4 + ldr r3, [r5, r2] + ldr r1, [r5, r1] + add r3, r3, r6 + adc r1, r0 + add r0, r2, #0 + add r0, #8 + add r2, #0xc + str r3, [r5, r0] + str r1, [r5, r2] + cmp r7, #0 + bne _0224D838 + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov17_0224C9F0 + ldrb r0, [r4, #0x11] + add r0, r0, #1 + strb r0, [r4, #0x11] +_0224D838: + ldrb r1, [r4, #0x18] + ldr r0, [r4, #0] + mov r2, #0 + bl ov17_0224CDC0 + ldrb r0, [r4, #0x10] + add sp, #0x48 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224D84C: + ldr r5, _0224DA58 ; =0x00000B1B + add r0, r3, #0 + ldrb r3, [r3, r5] + ldr r1, [sp, #0x24] + add r0, #0x14 + bl ov17_0224A368 + mov r0, #0x21 + ldr r3, [r4, #0] + ldr r1, _0224DA54 ; =0x00001154 + lsl r0, r0, #4 + ldr r2, [r3, r1] + add r1, #8 + ldr r1, [r3, r1] + ldr r0, [r3, r0] + sub r1, r2, r1 + ldrb r3, [r3, r5] + ldr r2, [r4, #0x24] + bl ov17_0224C49C + ldr r3, [r4, #0] + ldr r1, _0224DA54 ; =0x00001154 + ldr r0, _0224DA5C ; =0x000009B4 + ldr r2, [r3, r1] + add r1, #8 + ldr r1, [r3, r1] + add r0, r3, r0 + sub r1, r2, r1 + ldrb r3, [r3, r5] + ldr r2, [r4, #0x24] + bl ov17_0224C434 + ldr r5, [r4, #0x24] + ldr r0, [sp, #0x24] + cmp r0, r5 + blo _0224D954 + ldrb r0, [r4, #0x16] + ldr r1, _0224DA54 ; =0x00001154 + add r0, r0, #1 + strb r0, [r4, #0x16] + ldr r5, [r4, #0] + add r0, r5, r1 + ldmia r0!, {r2, r3} + add r1, #8 + add r0, r5, r1 + stmia r0!, {r2, r3} + mov r0, #0 + strb r0, [r4, #0x11] + strb r0, [r4, #0x12] + ldr r0, [r4, #0] + bl ov17_0224DF54 + mov r0, #0 + strb r0, [r4, #0x17] + ldr r0, [r4, #0] + ldr r1, [r0, #0] + ldr r0, _0224DA60 ; =0x00000127 + ldrb r6, [r1, r0] + cmp r6, #4 + bge _0224D8DC + add r1, r4, #0 + mov r0, #0x3c + add r1, #0x5c + mul r0, r6 + add r5, r1, r0 +_0224D8CE: + add r0, r5, #0 + bl ov17_0224E958 + add r6, r6, #1 + add r5, #0x3c + cmp r6, #4 + blt _0224D8CE +_0224D8DC: + ldr r0, [r4, #0] + add r0, #0x14 + bl ov17_0224A580 + ldr r0, [r4, #0] + bl ov17_0224BC4C + add r3, r4, #0 + ldrb r2, [r4, #0x18] + mov r1, #0x3c + add r3, #0x5c + mul r1, r2 + add r1, r3, r1 + ldr r0, [r4, #0] + ldr r2, [r4, #0x24] + ldr r3, [r4, #0x20] + bl ov17_0224E990 + ldr r0, [r4, #0] + mov r1, #0 + bl ov17_0224C864 + add r0, r4, #0 + add r0, #0x40 + ldrb r1, [r4, #0x16] + ldrb r0, [r0] + cmp r1, r0 + ldr r0, [r4, #0] + blo _0224D92E + bl ov17_0224CE08 + ldr r0, [r4, #0] + mov r1, #2 + add r0, #0x14 + bl ov17_0224B068 + ldrb r0, [r4, #0x10] + add sp, #0x48 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224D92E: + ldrb r1, [r4, #0x18] + mov r2, #0 + bl ov17_0224CDC0 + cmp r7, #0 + bne _0224D940 + ldrb r0, [r4, #0x11] + cmp r0, #0 + beq _0224D942 +_0224D940: + b _0224DBFE +_0224D942: + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov17_0224C9F0 + ldrb r0, [r4, #0x11] + add sp, #0x48 + add r0, r0, #1 + strb r0, [r4, #0x11] + pop {r3, r4, r5, r6, r7, pc} +_0224D954: + ldr r1, [r4, #0] + ldr r0, _0224DA64 ; =0x00000AE8 + ldrb r6, [r1, r0] + ldr r0, [sp, #0x24] + lsr r1, r5, #1 + cmp r0, r1 + blo _0224D966 + mov r0, #1 + b _0224D968 +_0224D966: + mov r0, #0 +_0224D968: + cmp r7, #0 + bne _0224DA0A + cmp r0, #0 + bne _0224D9A0 + add r0, r4, #0 + add r0, #0x41 + ldrb r1, [r4, #0x17] + ldrb r0, [r0] + cmp r1, r0 + bhs _0224D9A0 + ldr r0, [r4, #0x20] + ldr r1, _0224DA68 ; =0x00002710 + lsr r0, r0, #2 + bl sub_020E2178 + lsr r1, r5, #1 + sub r1, r1, r0 + ldr r0, [sp, #0x24] + cmp r0, r1 + bhs _0224D9A0 + add r0, r4, #0 + mov r2, #0 + add r0, #0x54 + add r1, sp, #0x38 + add r3, r2, #0 + bl ov17_0224DC1C + b _0224D9AE +_0224D9A0: + add r0, r4, #0 + mov r2, #1 + add r0, #0x54 + add r1, sp, #0x38 + add r3, r2, #0 + bl ov17_0224DC1C +_0224D9AE: + mov r0, #0 + ldr r1, [sp, #0x38] + mvn r0, r0 + cmp r1, r0 + bne _0224D9BA + b _0224DAD4 +_0224D9BA: + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0x44 + str r2, [sp] + add r2, sp, #0x3c + str r2, [sp, #4] + mov r2, #0 + str r2, [sp, #8] + str r6, [sp, #0xc] + ldrb r2, [r4, #0x17] + str r2, [sp, #0x10] + add r2, r4, #0 + add r2, #0x41 + ldrb r2, [r2] + str r2, [sp, #0x14] + ldr r2, _0224DA58 ; =0x00000B1B + ldrb r2, [r0, r2] + str r2, [sp, #0x18] + ldr r2, [r0, #0] + ldr r0, _0224DA50 ; =0x00000123 + ldr r3, [r4, #0x20] + ldrb r0, [r2, r0] + ldr r2, [sp, #0x24] + bl ov17_0224DE54 + ldr r0, [r4, #0] + ldr r1, [r0, #0] + ldr r0, _0224DA50 ; =0x00000123 + ldrb r1, [r1, r0] + add r0, #0x29 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, sp, #0x3c + bl ov17_0224D6B0 + ldrb r0, [r4, #0x17] + add r0, r0, #1 + strb r0, [r4, #0x17] + b _0224DAD4 +_0224DA0A: + cmp r0, #1 + bne _0224DA6C + add r0, r4, #0 + add r0, #0x41 + ldrb r1, [r4, #0x17] + ldrb r0, [r0] + cmp r1, r0 + bhs _0224DA6C + ldr r0, [r4, #0x20] + ldr r1, _0224DA68 ; =0x00002710 + lsr r0, r0, #2 + bl sub_020E2178 + sub r1, r5, r0 + ldr r0, [sp, #0x24] + cmp r0, r1 + bhs _0224DA6C + add r0, r4, #0 + mov r2, #0 + add r0, #0x54 + add r1, sp, #0x38 + add r3, r2, #0 + bl ov17_0224DC1C + ldrb r0, [r4, #0x11] + cmp r0, #0 + bne _0224DA7A + ldr r0, [r4, #0] + add r1, r7, #0 + bl ov17_0224C9F0 + ldrb r0, [r4, #0x11] + add r0, r0, #1 + strb r0, [r4, #0x11] + b _0224DA7A + ; .align 2, 0 +_0224DA50: .word 0x00000123 +_0224DA54: .word 0x00001154 +_0224DA58: .word 0x00000B1B +_0224DA5C: .word 0x000009B4 +_0224DA60: .word 0x00000127 +_0224DA64: .word 0x00000AE8 +_0224DA68: .word 0x00002710 +_0224DA6C: + add r0, r4, #0 + mov r2, #1 + add r0, #0x54 + add r1, sp, #0x38 + add r3, r2, #0 + bl ov17_0224DC1C +_0224DA7A: + mov r0, #0 + ldr r1, [sp, #0x38] + mvn r0, r0 + cmp r1, r0 + beq _0224DAD4 + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0x44 + str r2, [sp] + add r2, sp, #0x3c + str r2, [sp, #4] + ldr r2, _0224DC04 ; =0x00001BB4 + add r2, r0, r2 + str r2, [sp, #8] + str r6, [sp, #0xc] + ldrb r2, [r4, #0x17] + str r2, [sp, #0x10] + add r2, r4, #0 + add r2, #0x41 + ldrb r2, [r2] + str r2, [sp, #0x14] + ldr r2, _0224DC08 ; =0x00000B1B + ldrb r2, [r0, r2] + str r2, [sp, #0x18] + ldr r2, [r0, #0] + ldr r0, _0224DC0C ; =0x00000123 + ldr r3, [r4, #0x20] + ldrb r0, [r2, r0] + ldr r2, [sp, #0x24] + bl ov17_0224DE54 + ldr r0, [r4, #0] + ldr r1, [r0, #0] + ldr r0, _0224DC0C ; =0x00000123 + ldrb r1, [r1, r0] + add r0, #0x29 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r0, [r1, r0] + add r1, sp, #0x3c + bl ov17_0224D6B0 + ldrb r0, [r4, #0x17] + add r0, r0, #1 + strb r0, [r4, #0x17] +_0224DAD4: + ldr r0, [r4, #0] + ldr r1, [r0, #0] + ldr r0, _0224DC10 ; =0x00000127 + ldrb r7, [r1, r0] + cmp r7, #4 + bge _0224DB20 + lsl r0, r7, #2 + add r5, r4, r0 + add r1, r4, #0 + mov r0, #0x3c + add r1, #0x5c + mul r0, r7 + add r6, r1, r0 + add r0, r4, #0 + str r0, [sp, #0x2c] + add r0, #0x3c + str r0, [sp, #0x2c] +_0224DAF6: + ldr r0, [r4, #0x24] + ldr r3, [sp, #0x24] + str r0, [sp] + ldr r0, [r4, #0x20] + add r2, r6, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + str r0, [sp, #8] + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + ldr r1, [r4, #0] + bl ov17_0224ED8C + add r7, r7, #1 + add r5, r5, #4 + add r6, #0x3c + cmp r7, #4 + blt _0224DAF6 +_0224DB20: + ldr r0, [sp, #0x20] + cmp r0, #1 + bne _0224DB3C + ldrb r0, [r4, #0x12] + cmp r0, #0 + bne _0224DB3C + ldrb r1, [r4, #0x18] + ldr r0, [r4, #0] + mov r2, #1 + bl ov17_0224CDC0 + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] +_0224DB3C: + ldr r0, [sp, #0x20] + cmp r0, #1 + bne _0224DBFE + ldr r0, [r4, #0] + ldr r1, [sp, #0x24] + bl ov17_0224C8E8 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} +_0224DB4E: + add r0, r4, #0 + add r0, #0x54 + add r1, sp, #0x38 + mov r2, #1 + mov r3, #0 + bl ov17_0224DC1C + cmp r0, #1 + bne _0224DBFE + ldr r0, [r4, #0] + add r0, #0x14 + bl ov17_0224A580 + ldr r5, [r4, #0] + ldr r3, _0224DC08 ; =0x00000B1B + add r0, r5, #0 + ldrb r3, [r5, r3] + ldr r2, [r4, #0x24] + add r0, #0x14 + mov r1, #0 + bl ov17_0224A368 + mov r0, #0x21 + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov17_0224C540 + ldr r1, [r4, #0] + ldr r0, _0224DC14 ; =0x000009B4 + add r0, r1, r0 + mov r1, #0 + bl ov17_0224C47C + ldr r0, [r4, #0] + mov r1, #2 + add r0, #0x14 + bl ov17_0224B068 + ldr r0, [r4, #0] + mov r1, #0 + bl ov17_0224C864 + ldr r0, [r4, #0] + bl ov17_0224C9D4 + ldr r1, [r4, #0] + ldr r0, _0224DC18 ; =0x0000114C + ldr r0, [r1, r0] + bl ov17_02249814 + cmp r0, #0 + beq _0224DBC6 + ldr r1, [r4, #0] + ldr r0, _0224DC18 ; =0x0000114C + mov r2, #6 + ldr r0, [r1, r0] + mov r1, #0 + bl ov17_0224A0E0 +_0224DBC6: + ldrb r0, [r4, #0x10] + add sp, #0x48 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224DBD0: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + mov r7, #0x53 + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_0224DBE4: + ldr r0, [r5, r7] + bl ov17_0224D69C + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0224DBE4 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x1c] + bl sub_0200DA58 +_0224DBFE: + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224DC04: .word 0x00001BB4 +_0224DC08: .word 0x00000B1B +_0224DC0C: .word 0x00000123 +_0224DC10: .word 0x00000127 +_0224DC14: .word 0x000009B4 +_0224DC18: .word 0x0000114C + thumb_func_end ov17_0224D710 + + thumb_func_start ov17_0224DC1C +ov17_0224DC1C: ; 0x0224DC1C + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r7, r1, #0 + sub r0, r4, #1 + add r6, r2, #0 + str r3, [sp] + str r0, [r7, #0] + cmp r6, #0 + bne _0224DC4E + ldrb r0, [r5, #5] + cmp r0, #0 + beq _0224DC4E + sub r0, r0, #1 + strb r0, [r5, #5] + ldrb r0, [r5, #5] + cmp r0, #0 + bne _0224DC4E + ldr r1, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + add r2, r4, #0 + ldr r0, [r1, r0] + add r1, r4, #0 + bl ov17_0224A0E0 +_0224DC4E: + ldrb r0, [r5, #4] + cmp r0, #0 + beq _0224DC5E + cmp r0, #1 + beq _0224DC84 + cmp r0, #2 + beq _0224DCC6 + b _0224DCEC +_0224DC5E: + cmp r6, #0 + bne _0224DC80 + ldr r0, [sp] + cmp r0, #0 + bne _0224DC80 + mov r1, #0 + strb r1, [r5, #5] + ldr r2, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + ldr r0, [r2, r0] + add r2, r1, #0 + bl ov17_0224A0E0 + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + b _0224DCEC +_0224DC80: + mov r4, #1 + b _0224DCEC +_0224DC84: + cmp r6, #1 + beq _0224DC8E + ldrb r0, [r5, #5] + cmp r0, #0 + beq _0224DC92 +_0224DC8E: + mov r4, #1 + b _0224DCEC +_0224DC92: + ldr r1, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + ldr r0, [r1, r0] + bl ov17_02249760 + mov r1, #0 + mvn r1, r1 + str r0, [r7, #0] + cmp r0, r1 + beq _0224DCC2 + ldr r1, [r5, #0] + ldr r0, _0224DD20 ; =0x00000B04 + ldr r0, [r1, r0] + ldr r1, _0224DD24 ; =0x00002710 + bl sub_020E2178 + strb r0, [r5, #5] + ldrb r0, [r5, #5] + sub r0, r0, #2 + strb r0, [r5, #5] + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] + b _0224DCEC +_0224DCC2: + mov r4, #1 + b _0224DCEC +_0224DCC6: + ldr r1, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + ldr r0, [r1, r0] + bl ov17_02249804 + cmp r0, #1 + bne _0224DCEC + ldrb r0, [r5, #5] + cmp r0, #0 + beq _0224DCE8 + ldr r1, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + mov r2, #6 + ldr r0, [r1, r0] + mov r1, #0 + bl ov17_0224A0E0 +_0224DCE8: + mov r0, #1 + strb r0, [r5, #4] +_0224DCEC: + ldr r0, [sp] + cmp r0, #1 + bne _0224DD16 + cmp r4, #1 + bne _0224DD16 + ldr r1, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + ldr r0, [r1, r0] + bl ov17_02249814 + cmp r0, #0 + beq _0224DD16 + ldr r1, [r5, #0] + ldr r0, _0224DD1C ; =0x0000114C + mov r2, #6 + ldr r0, [r1, r0] + mov r1, #0 + bl ov17_0224A0E0 + mov r0, #0 + strb r0, [r5, #4] +_0224DD16: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224DD1C: .word 0x0000114C +_0224DD20: .word 0x00000B04 +_0224DD24: .word 0x00002710 + thumb_func_end ov17_0224DC1C + + thumb_func_start ov17_0224DD28 +ov17_0224DD28: ; 0x0224DD28 + push {r3, lr} + cmp r0, #3 + bhi _0224DD52 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224DD3A: ; jump table + .short _0224DD42 - _0224DD3A - 2 ; case 0 + .short _0224DD46 - _0224DD3A - 2 ; case 1 + .short _0224DD4A - _0224DD3A - 2 ; case 2 + .short _0224DD4E - _0224DD3A - 2 ; case 3 +_0224DD42: + mov r0, #1 + pop {r3, pc} +_0224DD46: + mov r0, #2 + pop {r3, pc} +_0224DD4A: + mov r0, #3 + pop {r3, pc} +_0224DD4E: + mov r0, #4 + pop {r3, pc} +_0224DD52: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224DD28 + + thumb_func_start ov17_0224DD5C +ov17_0224DD5C: ; 0x0224DD5C + push {r3, lr} + cmp r0, #4 + bhi _0224DD88 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224DD6E: ; jump table + .short _0224DD88 - _0224DD6E - 2 ; case 0 + .short _0224DD78 - _0224DD6E - 2 ; case 1 + .short _0224DD7C - _0224DD6E - 2 ; case 2 + .short _0224DD80 - _0224DD6E - 2 ; case 3 + .short _0224DD84 - _0224DD6E - 2 ; case 4 +_0224DD78: + mov r0, #0 + pop {r3, pc} +_0224DD7C: + mov r0, #1 + pop {r3, pc} +_0224DD80: + mov r0, #2 + pop {r3, pc} +_0224DD84: + mov r0, #3 + pop {r3, pc} +_0224DD88: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov17_0224DD5C + + thumb_func_start ov17_0224DD90 +ov17_0224DD90: ; 0x0224DD90 + push {r3, r4} + ldrb r4, [r1] + cmp r0, r4 + bgt _0224DDA2 + mov r0, #0 + strb r0, [r2] + strb r0, [r3] + pop {r3, r4} + bx lr +_0224DDA2: + ldrb r4, [r1, #1] + cmp r0, r4 + bgt _0224DDB4 + mov r0, #0 + strb r0, [r2] + mov r0, #1 + strb r0, [r3] + pop {r3, r4} + bx lr +_0224DDB4: + ldrb r4, [r1, #2] + cmp r0, r4 + bgt _0224DDC6 + mov r0, #1 + strb r0, [r2] + mov r0, #2 + strb r0, [r3] + pop {r3, r4} + bx lr +_0224DDC6: + ldrb r1, [r1, #3] + cmp r0, r1 + bgt _0224DDD8 + mov r0, #1 + strb r0, [r2] + mov r0, #3 + strb r0, [r3] + pop {r3, r4} + bx lr +_0224DDD8: + mov r0, #2 + strb r0, [r2] + mov r0, #4 + strb r0, [r3] + pop {r3, r4} + bx lr + thumb_func_end ov17_0224DD90 + + thumb_func_start ov17_0224DDE4 +ov17_0224DDE4: ; 0x0224DDE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r2, #0 + add r6, r0, #0 + mov r0, #0 + ldr r2, _0224DE4C ; =0x00002710 + str r3, [sp] + mul r6, r2 + lsr r1, r1, #1 + add r5, r0, #0 + add r4, r0, #0 + cmp r6, #0 + bls _0224DE0A + bls _0224DE08 +_0224DE00: + add r4, r4, r1 + add r5, r5, #1 + cmp r4, r6 + blo _0224DE00 +_0224DE08: + sub r0, r4, r1 +_0224DE0A: + ldr r1, _0224DE50 ; =0x00001388 + add r0, r0, r1 + lsl r1, r1, #1 + bl sub_020E2178 + ldr r1, _0224DE50 ; =0x00001388 + str r0, [sp, #4] + add r0, r4, r1 + lsl r1, r1, #1 + bl sub_020E2178 + add r4, r0, #0 + ldr r1, _0224DE4C ; =0x00002710 + add r0, r6, #0 + bl sub_020E2178 + ldr r1, [sp, #4] + sub r1, r0, r1 + bpl _0224DE32 + neg r1, r1 +_0224DE32: + sub r0, r0, r4 + bpl _0224DE38 + neg r0, r0 +_0224DE38: + cmp r1, r0 + bhi _0224DE40 + sub r5, r5, #1 + b _0224DE42 +_0224DE40: + add r1, r0, #0 +_0224DE42: + ldr r0, [sp] + str r1, [r7, #0] + str r5, [r0, #0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DE4C: .word 0x00002710 +_0224DE50: .word 0x00001388 + thumb_func_end ov17_0224DDE4 + + thumb_func_start ov17_0224DE54 +ov17_0224DE54: ; 0x0224DE54 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp] + str r2, [sp, #4] + str r3, [sp, #8] + add r0, r1, #0 + ldr r5, [sp, #0x34] + ldr r6, [sp, #0x38] + mov r7, #0 + bl ov17_0224DD28 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + ldr r1, [sp, #8] + add r2, sp, #0x18 + add r3, sp, #0x14 + bl ov17_0224DDE4 + cmp r6, #0 + beq _0224DEB6 + ldr r0, [sp, #0x48] + mov r1, #4 + bl ov17_0223F0BC + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + ldr r2, [sp, #0x14] + add r4, r7, #0 + sub r0, r2, r0 + add r1, r6, #0 + add r2, r6, #0 +_0224DE94: + ldrb r3, [r1, #8] + lsl r3, r3, #0x1d + lsr r3, r3, #0x1f + cmp r3, #1 + bne _0224DEA4 + ldrb r3, [r2, #6] + cmp r0, r3 + beq _0224DEAE +_0224DEA4: + add r4, r4, #1 + add r1, #0xa + add r2, #0xa + cmp r4, #8 + blo _0224DE94 +_0224DEAE: + cmp r4, #8 + bne _0224DEB6 + mov r0, #0xff + str r0, [sp, #0x18] +_0224DEB6: + add r2, sp, #0x10 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x30] + add r2, #1 + add r3, sp, #0x10 + bl ov17_0224DD90 + cmp r6, #0 + beq _0224DEF6 + cmp r4, #8 + beq _0224DEF6 + add r0, sp, #0x10 + ldrb r0, [r0, #1] + cmp r0, #0 + beq _0224DED8 + cmp r0, #1 + bne _0224DEF6 +_0224DED8: + mov r0, #0xa + mul r0, r4 + add r0, r6, r0 + ldrb r1, [r0, #3] + ldr r0, [sp, #0xc] + cmp r0, r1 + beq _0224DEF6 + mov r0, #0xff + str r0, [sp, #0x18] + mov r1, #4 + add r0, sp, #0x10 + strb r1, [r0] + mov r1, #2 + strb r1, [r0, #1] + mov r7, #1 +_0224DEF6: + ldr r0, [sp] + strb r0, [r5, #2] + ldr r0, [sp, #4] + strh r0, [r5] + ldr r0, [sp, #0xc] + strb r0, [r5, #3] + add r0, sp, #0x10 + ldrb r1, [r0, #1] + strb r1, [r5, #4] + ldrb r0, [r0] + ldr r1, [sp, #0x40] + strb r0, [r5, #5] + ldr r0, [sp, #0x14] + strb r0, [r5, #6] + ldr r0, [sp, #0x3c] + strb r0, [r5, #7] + ldr r0, [sp, #0x44] + sub r0, r0, #1 + cmp r1, r0 + blt _0224DF22 + mov r1, #1 + b _0224DF24 +_0224DF22: + mov r1, #0 +_0224DF24: + ldrb r2, [r5, #8] + mov r0, #1 + bic r2, r0 + lsl r0, r1, #0x18 + lsr r1, r0, #0x18 + mov r0, #1 + and r0, r1 + orr r0, r2 + strb r0, [r5, #8] + ldrb r1, [r5, #8] + mov r0, #2 + bic r1, r0 + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + lsl r0, r0, #0x1f + lsr r0, r0, #0x1e + orr r0, r1 + strb r0, [r5, #8] + ldrb r1, [r5, #8] + mov r0, #4 + orr r0, r1 + strb r0, [r5, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov17_0224DE54 + + thumb_func_start ov17_0224DF54 +ov17_0224DF54: ; 0x0224DF54 + push {r4, r5} + ldr r1, _0224DF7C ; =0x00000AD9 + mov r5, #0 + add r3, r5, #0 + add r2, r1, #4 +_0224DF5E: + add r4, r0, r5 + strb r3, [r4, r1] + add r5, r5, #1 + strb r3, [r4, r2] + cmp r5, #4 + blt _0224DF5E + ldr r1, _0224DF80 ; =0x00000AE1 + strb r3, [r0, r1] + add r2, r1, #1 + strb r3, [r0, r2] + add r1, r1, #2 + strb r3, [r0, r1] + pop {r4, r5} + bx lr + nop +_0224DF7C: .word 0x00000AD9 +_0224DF80: .word 0x00000AE1 + thumb_func_end ov17_0224DF54 + + thumb_func_start ov17_0224DF84 +ov17_0224DF84: ; 0x0224DF84 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224DF84 + + thumb_func_start ov17_0224DF88 +ov17_0224DF88: ; 0x0224DF88 + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224DF88 + + thumb_func_start ov17_0224DF9C +ov17_0224DF9C: ; 0x0224DF9C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x17 + str r1, [sp] + add r1, r0, #0 + add r1, #0xed + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r2, #0x41 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + add r3, r4, #0 + str r0, [r4, #0] + ldrh r0, [r5] + add r3, #0xc8 + mov r2, #7 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] +_0224DFD8: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224DFD8 + ldr r0, [r6, #0] + ldr r2, _0224DFF0 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _0224DFF4 ; =ov17_0224DFF8 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DFF0: .word 0x00007530 +_0224DFF4: .word ov17_0224DFF8 + thumb_func_end ov17_0224DF9C + + thumb_func_start ov17_0224DFF8 +ov17_0224DFF8: ; 0x0224DFF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #5 + bls _0224E008 + b _0224E1B8 +_0224E008: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224E014: ; jump table + .short _0224E020 - _0224E014 - 2 ; case 0 + .short _0224E070 - _0224E014 - 2 ; case 1 + .short _0224E09E - _0224E014 - 2 ; case 2 + .short _0224E152 - _0224E014 - 2 ; case 3 + .short _0224E174 - _0224E014 - 2 ; case 4 + .short _0224E198 - _0224E014 - 2 ; case 5 +_0224E020: + ldr r0, [r4, #0] + mov r1, #0 + bl ov17_0224CDB4 + mov r1, #0 + str r1, [sp] + mov r0, #6 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r2, _0224E1D4 ; =0x00001FE3 + sub r3, r1, #3 + bl sub_02003178 + add r6, r4, #0 + mov r5, #0 + mov r7, #0x10 + add r6, #0x11 +_0224E04A: + str r7, [sp] + mov r0, #4 + str r0, [sp, #4] + add r0, r6, r5 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r2, _0224E1D8 ; =0x00007FFF + ldr r3, _0224E1DC ; =0x0000254A + add r1, r5, #0 + bl ov17_0224CEE4 + add r5, r5, #1 + cmp r5, #4 + blt _0224E04A + ldrb r0, [r4, #0x10] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224E070: + ldr r0, [r4, #0] + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0224E092 + mov r1, #0 +_0224E080: + add r0, r4, r1 + ldrb r0, [r0, #0x11] + cmp r0, #0 + beq _0224E08E + add r1, r1, #1 + cmp r1, #4 + blt _0224E080 +_0224E08E: + cmp r1, #4 + beq _0224E094 +_0224E092: + b _0224E1D0 +_0224E094: + ldrb r0, [r4, #0x10] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224E09E: + add r0, r4, #0 + str r0, [sp, #0xc] + add r0, #0x18 + mov r6, #0 + str r0, [sp, #0xc] +_0224E0A8: + add r0, r4, r6 + add r0, #0xca + ldrb r1, [r0] + mov r2, #0x2c + add r7, r1, #0 + mul r7, r2 + ldr r2, [r4, #0] + lsl r0, r1, #2 + ldr r2, [r2, #0x14] + add r5, r4, r7 + ldr r2, [r2, r0] + str r2, [r5, #0x18] + ldr r2, [r4, #0] + add r0, r2, r0 + ldr r0, [r0, #0x5c] + str r0, [r5, #0x1c] + ldr r2, [r4, #0] + lsl r0, r1, #4 + add r2, #0x18 + add r0, r2, r0 + str r0, [r5, #0x20] + mov r0, #0xb1 + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + ldr r1, _0224E1E0 ; =0x00002710 + bl sub_020E2178 + mov r1, #0x28 + mul r1, r0 + add r0, r1, #0 + mov r1, #0x64 + bl sub_020E2178 + strh r0, [r5, #0x26] + add r0, r5, #0 + add r0, #0x24 + strb r6, [r0] + cmp r6, #0 + bne _0224E0FE + add r5, #0x25 + mov r0, #3 + b _0224E102 +_0224E0FE: + sub r0, r6, #1 + add r5, #0x25 +_0224E102: + ldr r1, [sp, #0xc] + strb r0, [r5] + ldr r0, _0224E1E4 ; =ov17_0224E1F4 + ldr r2, _0224E1E8 ; =0x00009CA4 + add r1, r1, r7 + bl sub_0200D9E8 + add r6, r6, #1 + cmp r6, #4 + blt _0224E0A8 + add r0, r4, #0 + add r0, #0xf1 + ldrb r1, [r0] + add r0, sp, #0x10 + strb r1, [r0, #4] + ldr r0, [r4, #0] + add r1, r4, #0 + add r1, #0xcb + ldrb r3, [r1] + ldr r2, [r0, #0] + ldr r1, _0224E1EC ; =0x00000123 + ldrb r1, [r2, r1] + cmp r3, r1 + add r2, sp, #0x10 + bne _0224E13C + mov r1, #4 + bl ov17_0224C5A0 + b _0224E142 +_0224E13C: + mov r1, #5 + bl ov17_0224C5A0 +_0224E142: + ldr r0, _0224E1F0 ; =0x000006F7 + bl sub_02005748 + ldrb r0, [r4, #0x10] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224E152: + mov r2, #0 +_0224E154: + add r0, r1, #0 + add r0, #0x43 + ldrb r0, [r0] + cmp r0, #0 + beq _0224E166 + add r2, r2, #1 + add r1, #0x2c + cmp r2, #4 + blt _0224E154 +_0224E166: + cmp r2, #4 + bne _0224E1D0 + ldrb r0, [r4, #0x10] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224E174: + mov r0, #6 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r2, _0224E1D4 ; =0x00001FE3 + sub r3, r1, #3 + bl sub_02003178 + ldrb r0, [r4, #0x10] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224E198: + ldr r0, [r4, #0] + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0224E1D0 + ldr r0, [r4, #0] + mov r1, #1 + bl ov17_0224CDB4 + ldrb r0, [r4, #0x10] + add sp, #0x18 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0224E1B8: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0224E1D0: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E1D4: .word 0x00001FE3 +_0224E1D8: .word 0x00007FFF +_0224E1DC: .word 0x0000254A +_0224E1E0: .word 0x00002710 +_0224E1E4: .word ov17_0224E1F4 +_0224E1E8: .word 0x00009CA4 +_0224E1EC: .word 0x00000123 +_0224E1F0: .word 0x000006F7 + thumb_func_end ov17_0224DFF8 + + thumb_func_start ov17_0224E1F4 +ov17_0224E1F4: ; 0x0224E1F4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r1, #0x2a + ldrb r1, [r1] + cmp r1, #0 + beq _0224E208 + cmp r1, #1 + beq _0224E2C4 + b _0224E426 +_0224E208: + ldr r0, [r5, #8] + ldr r0, [r0, #4] + lsl r0, r0, #8 + str r0, [r5, #0x10] + ldr r0, [r5, #8] + ldr r0, [r0, #8] + lsl r0, r0, #8 + str r0, [r5, #0x14] + ldr r0, [r5, #8] + ldr r0, [r0, #0xc] + lsl r0, r0, #8 + str r0, [r5, #0x18] + ldrb r0, [r5, #0xc] + bl ov17_0224A0FC + lsl r4, r0, #8 + ldrb r0, [r5, #0xc] + bl ov17_0224A10C + lsl r0, r0, #8 + str r0, [sp, #8] + ldrb r0, [r5, #0xc] + bl ov17_0224A120 + lsl r0, r0, #8 + str r0, [sp, #4] + ldrb r0, [r5, #0xd] + cmp r0, #0 + beq _0224E246 + cmp r0, #3 + bne _0224E278 +_0224E246: + cmp r0, #0 + bne _0224E24E + ldr r0, _0224E434 ; =0xFFFFB000 + b _0224E252 +_0224E24E: + mov r0, #0x59 + lsl r0, r0, #0xa +_0224E252: + ldrh r1, [r5, #0xe] + sub r0, r0, r4 + lsr r1, r1, #1 + bl sub_020E1F6C + str r0, [r5, #0x1c] + ldrh r1, [r5, #0xe] + mov r0, #0 + lsr r1, r1, #1 + bl sub_020E1F6C + str r0, [r5, #0x20] + ldrh r1, [r5, #0xe] + mov r0, #0 + lsr r1, r1, #1 + bl sub_020E1F6C + str r0, [r5, #0x24] + b _0224E2B4 +_0224E278: + bl ov17_0224A0FC + lsl r6, r0, #8 + ldrb r0, [r5, #0xd] + bl ov17_0224A10C + lsl r0, r0, #8 + str r0, [sp] + ldrb r0, [r5, #0xd] + bl ov17_0224A120 + lsl r7, r0, #8 + ldrh r1, [r5, #0xe] + sub r0, r6, r4 + bl sub_020E1F6C + str r0, [r5, #0x1c] + ldr r1, [sp] + ldr r0, [sp, #8] + sub r0, r1, r0 + ldrh r1, [r5, #0xe] + bl sub_020E1F6C + str r0, [r5, #0x20] + ldr r0, [sp, #4] + ldrh r1, [r5, #0xe] + sub r0, r7, r0 + bl sub_020E1F6C + str r0, [r5, #0x24] +_0224E2B4: + add r0, r5, #0 + add r0, #0x2a + ldrb r0, [r0] + add r5, #0x2a + add sp, #0xc + add r0, r0, #1 + strb r0, [r5] + pop {r4, r5, r6, r7, pc} +_0224E2C4: + ldr r1, [r5, #0x10] + ldr r0, [r5, #0x1c] + add r0, r1, r0 + str r0, [r5, #0x10] + ldr r1, [r5, #0x14] + ldr r0, [r5, #0x20] + add r0, r1, r0 + str r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r0, [r5, #0x24] + add r0, r1, r0 + str r0, [r5, #0x18] + ldrh r0, [r5, #0x28] + add r0, r0, #1 + strh r0, [r5, #0x28] + ldrb r0, [r5, #0xd] + cmp r0, #0 + beq _0224E2EC + cmp r0, #3 + bne _0224E38E +_0224E2EC: + ldrh r1, [r5, #0xe] + ldrh r2, [r5, #0x28] + lsr r1, r1, #1 + cmp r2, r1 + bne _0224E3A4 + cmp r0, #0 + bne _0224E314 + ldr r0, _0224E438 ; =0xFFFF9C00 + mov r1, #1 + str r0, [r5, #0x10] + ldr r0, [r5, #8] + ldr r0, [r0, #0] + bl ov22_0225B07C + ldr r0, [r5, #8] + mov r1, #0x64 + ldr r0, [r0, #0] + bl ov22_0225B1AC + b _0224E334 +_0224E314: + bl ov17_0224A0FC + add r0, #0x50 + lsl r0, r0, #8 + str r0, [r5, #0x10] + ldr r0, [r5, #8] + mov r1, #0 + ldr r0, [r0, #0] + bl ov22_0225B07C + ldr r0, [r5, #8] + mov r1, #0x63 + ldr r0, [r0, #0] + mvn r1, r1 + bl ov22_0225B1AC +_0224E334: + ldr r0, [r5, #0] + mov r1, #2 + bl sub_020765B8 + add r4, r0, #0 + ldrb r0, [r5, #0xd] + bl ov17_0224A10C + add r0, r4, r0 + lsl r0, r0, #8 + str r0, [r5, #0x14] + ldrb r0, [r5, #0xd] + bl ov17_0224A120 + lsl r0, r0, #8 + str r0, [r5, #0x18] + ldrb r0, [r5, #0xd] + bl ov17_0224A0FC + ldrh r2, [r5, #0xe] + ldrh r1, [r5, #0x28] + lsl r0, r0, #8 + ldr r7, [r5, #0x14] + sub r1, r2, r1 + sub r4, r1, #1 + ldr r1, [r5, #0x10] + ldr r6, [r5, #0x18] + sub r0, r0, r1 + add r1, r4, #0 + bl sub_020E1F6C + str r0, [r5, #0x1c] + ldr r0, [r5, #0x14] + add r1, r4, #0 + sub r0, r7, r0 + bl sub_020E1F6C + str r0, [r5, #0x20] + ldr r0, [r5, #0x18] + add r1, r4, #0 + sub r0, r6, r0 + bl sub_020E1F6C + str r0, [r5, #0x24] + b _0224E3A4 +_0224E38E: + bl ov17_0224A0FC + ldr r1, [r5, #0x10] + lsl r0, r0, #8 + cmp r1, r0 + bge _0224E3A4 + ldrb r0, [r5, #0xd] + bl ov17_0224A0FC + lsl r0, r0, #8 + str r0, [r5, #0x10] +_0224E3A4: + ldrh r1, [r5, #0x28] + ldrh r0, [r5, #0xe] + cmp r1, r0 + blo _0224E3E4 + ldr r0, [r5, #0] + mov r1, #2 + bl sub_020765B8 + add r4, r0, #0 + ldrb r0, [r5, #0xd] + bl ov17_0224A0FC + lsl r0, r0, #8 + str r0, [r5, #0x10] + ldrb r0, [r5, #0xd] + bl ov17_0224A10C + add r0, r4, r0 + lsl r0, r0, #8 + str r0, [r5, #0x14] + ldrb r0, [r5, #0xd] + bl ov17_0224A120 + lsl r0, r0, #8 + str r0, [r5, #0x18] + add r0, r5, #0 + add r0, #0x2a + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x2a + strb r1, [r0] +_0224E3E4: + ldr r1, [r5, #0x10] + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 + ldr r0, [r5, #8] + str r1, [r0, #4] + ldr r1, [r5, #0x14] + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 + ldr r0, [r5, #8] + str r1, [r0, #8] + ldr r1, [r5, #0x18] + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r1, r0, #8 + ldr r0, [r5, #8] + str r1, [r0, #0xc] + ldr r2, [r5, #8] + ldr r0, [r2, #0] + ldr r1, [r2, #4] + ldr r2, [r2, #8] + bl ov22_0225B100 + ldr r0, [r5, #4] + ldr r1, [r5, #8] + bl ov17_0224B09C + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224E426: + mov r1, #1 + add r5, #0x2b + strb r1, [r5] + bl sub_0200DA58 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E434: .word 0xFFFFB000 +_0224E438: .word 0xFFFF9C00 + thumb_func_end ov17_0224E1F4 + + thumb_func_start ov17_0224E43C +ov17_0224E43C: ; 0x0224E43C + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E43C + + thumb_func_start ov17_0224E450 +ov17_0224E450: ; 0x0224E450 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x17 + mov r1, #0x50 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x50 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + add r3, r4, #0 + str r0, [r4, #0] + ldrh r0, [r5] + add r3, #0x10 + mov r2, #7 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] +_0224E488: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224E488 + ldr r0, [r6, #0] + ldr r2, _0224E4A0 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _0224E4A4 ; =ov17_0224E4A8 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E4A0: .word 0x00007530 +_0224E4A4: .word ov17_0224E4A8 + thumb_func_end ov17_0224E450 + + thumb_func_start ov17_0224E4A8 +ov17_0224E4A8: ; 0x0224E4A8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x4c + ldrb r0, [r0] + cmp r0, #0 + bne _0224E4F8 + mov r4, #0 +_0224E4BA: + add r1, r5, r4 + ldrb r1, [r1, #0x12] + ldr r0, [r5, #0] + add r2, r4, #0 + bl ov17_0224BC68 + add r4, r4, #1 + cmp r4, #4 + blt _0224E4BA + ldr r1, [r5, #0] + ldr r0, _0224E514 ; =0x0000114C + mov r3, #0 + ldr r0, [r1, r0] + mov r1, #1 + add r2, r1, #0 + bl ov17_02249640 + ldr r1, [r5, #0] + ldr r0, _0224E514 ; =0x0000114C + mov r2, #6 + ldr r0, [r1, r0] + mov r1, #0 + bl ov17_0224A0E0 + add r0, r5, #0 + add r0, #0x4c + ldrb r0, [r0] + add r5, #0x4c + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, pc} +_0224E4F8: + mov r2, #0 + ldr r0, [r5, #0xc] + add r1, r5, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_0224E514: .word 0x0000114C + thumb_func_end ov17_0224E4A8 + + thumb_func_start ov17_0224E518 +ov17_0224E518: ; 0x0224E518 + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E518 + + thumb_func_start ov17_0224E52C +ov17_0224E52C: ; 0x0224E52C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x17 + mov r1, #0x50 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x50 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + add r3, r4, #0 + str r0, [r4, #0] + ldrh r0, [r5] + add r3, #0x10 + mov r2, #7 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] +_0224E564: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224E564 + ldr r0, [r6, #0] + ldr r2, _0224E57C ; =0x00007530 + str r0, [r3, #0] + ldr r0, _0224E580 ; =ov17_0224E584 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E57C: .word 0x00007530 +_0224E580: .word ov17_0224E584 + thumb_func_end ov17_0224E52C + + thumb_func_start ov17_0224E584 +ov17_0224E584: ; 0x0224E584 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x4c + ldrb r0, [r0] + cmp r0, #0 + beq _0224E59A + cmp r0, #1 + beq _0224E5D2 + b _0224E60A +_0224E59A: + ldr r0, [r5, #0] + bl ov17_0224B5C8 + cmp r0, #0 + beq _0224E640 + mov r4, #0 + mov r6, #2 + mov r7, #5 +_0224E5AA: + ldr r0, [r5, #0] + add r1, r4, #0 + add r2, r6, #0 + bl ov17_0224BD28 + ldr r0, [r5, #0] + add r1, r4, #0 + add r2, r7, #0 + bl ov17_0224BD28 + add r4, r4, #1 + cmp r4, #4 + blt _0224E5AA + add r0, r5, #0 + add r0, #0x4c + ldrb r0, [r0] + add r5, #0x4c + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_0224E5D2: + mov r6, #0 + add r4, r6, #0 +_0224E5D6: + ldr r0, [r5, #0] + add r1, r4, #0 + bl ov17_0224BDF0 + cmp r0, #1 + bne _0224E5E4 + add r6, r6, #1 +_0224E5E4: + ldr r0, [r5, #0] + add r1, r4, #0 + bl ov17_0224BE24 + add r4, r4, #1 + cmp r4, #4 + blt _0224E5D6 + cmp r6, #4 + blt _0224E640 + ldr r0, [r5, #0] + bl ov17_0224BD00 + add r0, r5, #0 + add r0, #0x4c + ldrb r0, [r0] + add r5, #0x4c + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_0224E60A: + ldr r1, [r5, #0] + ldr r0, _0224E644 ; =0x0000114C + mov r2, #1 + ldr r0, [r1, r0] + mov r1, #0 + add r3, r1, #0 + bl ov17_02249640 + ldr r1, [r5, #0] + ldr r0, _0224E644 ; =0x0000114C + ldr r0, [r1, r0] + mov r1, #0 + add r2, r1, #0 + bl ov17_0224A0E0 + mov r2, #0 + ldr r0, [r5, #0xc] + add r1, r5, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224E640: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224E644: .word 0x0000114C + thumb_func_end ov17_0224E584 + + thumb_func_start ov17_0224E648 +ov17_0224E648: ; 0x0224E648 + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E648 + + thumb_func_start ov17_0224E65C +ov17_0224E65C: ; 0x0224E65C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x17 + mov r1, #0x20 + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _0224E6C0 ; =0x00007530 + str r0, [r4, #0] + ldrh r0, [r6] + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] + ldrb r0, [r5] + strb r0, [r4, #0x11] + ldrh r0, [r5, #0x30] + strh r0, [r4, #0x14] + ldrh r0, [r5, #0x32] + strh r0, [r4, #0x16] + ldrh r0, [r5, #0x34] + strh r0, [r4, #0x18] + add r0, r5, #0 + add r0, #0x36 + ldrb r0, [r0] + strb r0, [r4, #0x1a] + add r0, r5, #0 + add r0, #0x38 + ldrb r0, [r0] + add r5, #0x37 + strb r0, [r4, #0x1c] + ldrb r0, [r5] + strb r0, [r4, #0x1b] + ldr r0, _0224E6C4 ; =ov17_0224E6C8 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E6C0: .word 0x00007530 +_0224E6C4: .word ov17_0224E6C8 + thumb_func_end ov17_0224E65C + + thumb_func_start ov17_0224E6C8 +ov17_0224E6C8: ; 0x0224E6C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _0224E6DE + cmp r0, #1 + beq _0224E716 + cmp r0, #2 + beq _0224E728 + b _0224E760 +_0224E6DE: + ldrb r0, [r4, #0x1a] + cmp r0, #0 + beq _0224E710 + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x78 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x74] + bl sub_0201C3C0 + add r2, r4, #0 + ldrb r1, [r4, #0x1a] + ldr r0, [r4, #0] + add r2, #0x14 + bl ov17_0224C2CC + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224E710: + mov r0, #0x64 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224E716: + ldr r0, [r4, #0] + bl ov17_0224C300 + cmp r0, #0 + bne _0224E778 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224E728: + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] + ldrb r0, [r4, #0x1c] + cmp r0, #1 + bne _0224E73C + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224E73C: + ldrb r1, [r4, #0x12] + ldrb r0, [r4, #0x1b] + cmp r1, r0 + blo _0224E778 + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x78 + bl sub_0200E084 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x74] + bl sub_0201C3C0 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0224E760: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0224E778: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E6C8 + + thumb_func_start ov17_0224E77C +ov17_0224E77C: ; 0x0224E77C + push {r3, lr} + mov r1, #0x30 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E77C + + thumb_func_start ov17_0224E790 +ov17_0224E790: ; 0x0224E790 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, _0224E7B0 ; =0x00000AEC + mov r5, #6 + add r6, r1, r0 +_0224E79A: + ldmia r3!, {r0, r1} + stmia r6!, {r0, r1} + sub r5, r5, #1 + bne _0224E79A + add r1, r2, #0 + mov r2, #0 + add r0, r4, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224E7B0: .word 0x00000AEC + thumb_func_end ov17_0224E790 + + thumb_func_start ov17_0224E7B4 +ov17_0224E7B4: ; 0x0224E7B4 + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E7B4 + + thumb_func_start ov17_0224E7C8 +ov17_0224E7C8: ; 0x0224E7C8 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + bl sub_0200569C + ldrh r0, [r4, #0x24] + bl sub_0200549C + ldr r0, _0224E7FC ; =0x00001150 + mov r1, #1 + strb r1, [r5, r0] + add r1, r0, #4 + add r0, #0xc + add r1, r5, r1 + ldmia r1!, {r2, r3} + add r0, r5, r0 + stmia r0!, {r2, r3} + mov r2, #0 + add r0, r6, #0 + add r1, r7, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E7FC: .word 0x00001150 + thumb_func_end ov17_0224E7C8 + + thumb_func_start ov17_0224E800 +ov17_0224E800: ; 0x0224E800 + push {r3, lr} + mov r1, #0x3c + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0224E800 + + thumb_func_start ov17_0224E814 +ov17_0224E814: ; 0x0224E814 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x17 + mov r1, #0x54 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x54 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + add r3, r4, #0 + str r0, [r4, #0] + ldrh r0, [r5] + add r3, #0x10 + mov r2, #7 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] +_0224E84C: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224E84C + ldr r0, [r6, #0] + ldr r2, _0224E864 ; =0x00007530 + str r0, [r3, #0] + ldr r0, _0224E868 ; =ov17_0224E86C + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E864: .word 0x00007530 +_0224E868: .word ov17_0224E86C + thumb_func_end ov17_0224E814 + + thumb_func_start ov17_0224E86C +ov17_0224E86C: ; 0x0224E86C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + cmp r0, #4 + bhi _0224E90A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224E888: ; jump table + .short _0224E892 - _0224E888 - 2 ; case 0 + .short _0224E8A8 - _0224E888 - 2 ; case 1 + .short _0224E8C0 - _0224E888 - 2 ; case 2 + .short _0224E8D4 - _0224E888 - 2 ; case 3 + .short _0224E8F0 - _0224E888 - 2 ; case 4 +_0224E892: + ldr r1, [r4, #0] + ldr r0, _0224E924 ; =0x00001150 + mov r2, #0 + strb r2, [r1, r0] + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + add r4, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0224E8A8: + ldrh r0, [r4, #0x34] + bl sub_02005690 + cmp r0, #0 + bne _0224E922 + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + add r4, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0224E8C0: + ldr r0, [r4, #0] + bl ov17_0224CE28 + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + add r4, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0224E8D4: + ldr r0, [r4, #0x4c] + add r0, r0, #1 + str r0, [r4, #0x4c] + cmp r0, #0x3c + bls _0224E922 + mov r0, #0 + str r0, [r4, #0x4c] + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + add r4, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0224E8F0: + ldr r0, _0224E928 ; =0x0000046F + bl sub_0200549C + ldr r0, _0224E92C ; =0x000006E5 + bl sub_02005748 + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + add r4, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0224E90A: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0224E922: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224E924: .word 0x00001150 +_0224E928: .word 0x0000046F +_0224E92C: .word 0x000006E5 + thumb_func_end ov17_0224E86C + + .rodata + + + .global Unk_ov17_022549C4 +Unk_ov17_022549C4: ; 0x022549C4 + .incbin "incbin/overlay17_rodata.bin", 0x1C38, 0x1C40 - 0x1C38 + + .global Unk_ov17_022549CC +Unk_ov17_022549CC: ; 0x022549CC + .incbin "incbin/overlay17_rodata.bin", 0x1C40, 0x1C58 - 0x1C40 + + .global Unk_ov17_022549E4 +Unk_ov17_022549E4: ; 0x022549E4 + .incbin "incbin/overlay17_rodata.bin", 0x1C58, 0x9C + diff --git a/asm/ov17_0224E930.s b/asm/ov17_0224E930.s new file mode 100644 index 000000000..b2f98cd76 --- /dev/null +++ b/asm/ov17_0224E930.s @@ -0,0 +1,1012 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0224E930 +ov17_0224E930: ; 0x0224E930 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + mov r1, #0 + mov r2, #0x3c + add r7, r3, #0 + bl sub_020C4CF4 + add r0, r5, #0 + add r0, #0x37 + strb r4, [r0] + add r0, r5, #0 + add r0, #0x38 + strb r6, [r0] + str r7, [r5, #0x30] + ldr r0, [sp, #0x18] + add r5, #0x39 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_0224E930 + + thumb_func_start ov17_0224E958 +ov17_0224E958: ; 0x0224E958 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r1, [r5, #0x30] + mov r2, #0x3c + str r1, [sp] + add r1, r5, #0 + add r1, #0x37 + ldrb r7, [r1] + add r1, r5, #0 + add r1, #0x38 + ldrb r6, [r1] + add r1, r5, #0 + add r1, #0x39 + ldrb r4, [r1] + mov r1, #0 + bl sub_020C4CF4 + ldr r0, [sp] + str r0, [r5, #0x30] + add r0, r5, #0 + add r0, #0x37 + strb r7, [r0] + add r0, r5, #0 + add r0, #0x38 + strb r6, [r0] + add r5, #0x39 + strb r4, [r5] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_0224E958 + + thumb_func_start ov17_0224E990 +ov17_0224E990: ; 0x0224E990 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r7, r0, #0 + ldr r0, _0224EBCC ; =0x00000B1B + add r4, r1, #0 + ldrb r0, [r7, r0] + mov r1, #4 + str r3, [sp] + bl ov17_0223F0BC + str r0, [sp, #8] + ldr r0, _0224EBCC ; =0x00000B1B + ldrb r0, [r7, r0] + cmp r0, #0 + bne _0224E9C0 + ldr r0, [sp] + ldr r1, _0224EBD0 ; =0x00001388 + lsr r0, r0, #2 + add r0, r0, r1 + lsl r1, r1, #1 + bl sub_020E2178 + str r0, [sp, #0xc] + b _0224E9D4 +_0224E9C0: + ldr r0, [sp] + mov r1, #6 + bl sub_020E2178 + ldr r1, _0224EBD0 ; =0x00001388 + add r0, r0, r1 + lsl r1, r1, #1 + bl sub_020E2178 + str r0, [sp, #0xc] +_0224E9D4: + mov r0, #0x12 + ldr r1, [r7, #0] + lsl r0, r0, #4 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0224E9E4 + cmp r0, #1 + bne _0224E9FA +_0224E9E4: + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r1, r1, #1 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp, #0x14] + b _0224EA0E +_0224E9FA: + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x14] + ldr r0, [sp] + lsr r0, r0, #1 + str r0, [sp] +_0224EA0E: + ldr r2, [sp, #8] + mov r5, #0 + lsr r3, r2, #0x1f + add r3, r2, r3 + add r1, r5, #0 + add r0, sp, #0x2c + asr r2, r3, #1 + b _0224EA22 +_0224EA1E: + strb r1, [r0, r5] + add r5, r5, #1 +_0224EA22: + cmp r5, r2 + blt _0224EA1E + ldr r0, [sp, #0x14] + mov r6, #0 + sub r0, r0, #1 + str r0, [sp, #0x1c] + add r0, r4, #0 + str r0, [sp, #0x18] + add r0, #0x30 + str r0, [sp, #0x18] +_0224EA36: + ldr r0, [r4, #0x30] + ldr r1, [sp, #0x18] + bl sub_02094EA0 + ldr r1, [sp, #0x14] + bl sub_020E1F6C + add r5, r1, #0 + beq _0224EA36 + add r0, sp, #0x2c + ldrb r0, [r0, r5] + cmp r0, #0 + bne _0224EA36 + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _0224EA90 + ldr r0, [sp, #0x1c] + cmp r5, r0 + bne _0224EA66 + sub r1, r5, #1 + add r0, sp, #0x2c + ldrb r0, [r0, r1] + cmp r0, #1 + beq _0224EA36 +_0224EA66: + sub r1, r5, #1 + add r0, sp, #0x2c + ldrb r0, [r0, r1] + cmp r0, #1 + beq _0224EA36 + add r1, r5, #1 + add r0, sp, #0x2c + ldrb r0, [r0, r1] + cmp r0, #1 + beq _0224EA36 + mov r0, #1 + tst r0, r5 + beq _0224EA90 + ldr r0, [r4, #0x30] + ldr r1, [sp, #0x18] + bl sub_02094EA0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x80 + blt _0224EA36 +_0224EA90: + mov r1, #1 + add r0, sp, #0x2c + strb r1, [r0, r5] + ldr r0, _0224EBD4 ; =0x00000B1A + add r6, r6, #1 + ldrb r0, [r7, r0] + cmp r6, r0 + blt _0224EA36 + ldr r0, [sp, #8] + mov r6, #0 + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + add r5, r6, #0 + str r0, [sp, #0x20] + b _0224EAD0 +_0224EAB0: + add r0, sp, #0x2c + ldrb r0, [r0, r5] + cmp r0, #1 + bne _0224EACE + ldr r0, [sp] + add r1, r5, #0 + mul r1, r0 + ldr r0, _0224EBD0 ; =0x00001388 + add r0, r1, r0 + ldr r1, _0224EBD8 ; =0x00002710 + bl sub_020E2178 + lsl r1, r6, #2 + str r0, [r4, r1] + add r6, r6, #1 +_0224EACE: + add r5, r5, #1 +_0224EAD0: + ldr r0, [sp, #0x20] + cmp r5, r0 + blt _0224EAB0 + mov r0, #0x12 + ldr r1, [r7, #0] + lsl r0, r0, #4 + ldrb r0, [r1, r0] + add r1, r4, #0 + add r1, #0x39 + ldrb r1, [r1] + bl ov17_0224EBE0 + add r6, r0, #0 + add r0, r4, #0 + str r0, [sp, #0x24] + add r0, #0x30 + str r0, [sp, #0x24] + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r0, r0, #1 + add r0, r0, #1 + mov r5, #0 + str r0, [sp, #0x28] + b _0224EB3A +_0224EB00: + ldr r0, [r4, #0x30] + ldr r1, [sp, #0x24] + bl sub_02094EA0 + add r1, r6, #2 + bl sub_020E1F6C + lsl r0, r5, #2 + ldr r0, [r4, r0] + add r1, r0, r1 + ldr r0, [sp, #0x28] + sub r3, r1, r0 + bpl _0224EB1C + mov r3, #0 +_0224EB1C: + lsl r0, r5, #2 + ldr r1, [r4, r0] + ldr r0, [sp, #0xc] + sub r2, r3, r1 + cmp r2, r0 + blo _0224EB2C + add r0, r0, r1 + sub r3, r0, #1 +_0224EB2C: + lsl r0, r5, #2 + add r1, r4, r5 + str r3, [r4, r0] + add r1, #0x28 + mov r0, #1 + strb r0, [r1] + add r5, r5, #1 +_0224EB3A: + ldr r0, _0224EBD4 ; =0x00000B1A + ldrb r0, [r7, r0] + cmp r5, r0 + blt _0224EB00 + mov r0, #0x12 + ldr r1, [r7, #0] + lsl r0, r0, #4 + ldrb r1, [r1, r0] + ldr r0, _0224EBDC ; =0x02254A84 + ldrb r0, [r0, r1] + add r1, r4, #0 + add r1, #0x30 + str r0, [sp, #4] + ldr r0, [r4, #0x30] + bl sub_02094EA0 + add r6, r4, #0 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1e + sub r1, r1, r2 + mov r0, #0x1e + ror r1, r0 + add r0, r4, #0 + add r1, r2, r1 + add r0, #0x20 + strb r1, [r0] + mov r5, #1 + add r6, #0x30 + b _0224EBBE +_0224EB74: + ldr r0, _0224EBD4 ; =0x00000B1A + ldrb r0, [r7, r0] + sub r0, r0, #1 + cmp r5, r0 + bge _0224EBA2 + ldr r0, [r4, #0x30] + add r1, r6, #0 + bl sub_02094EA0 + mov r1, #0x64 + bl sub_020E1F6C + ldr r0, [sp, #4] + cmp r0, r1 + ble _0224EBA2 + sub r0, r5, #1 + add r0, r4, r0 + add r0, #0x20 + ldrb r1, [r0] + add r0, r4, r5 + add r0, #0x20 + strb r1, [r0] + b _0224EBBC +_0224EBA2: + ldr r0, [r4, #0x30] + add r1, r6, #0 + bl sub_02094EA0 + lsr r1, r0, #0x1f + lsl r2, r0, #0x1e + sub r2, r2, r1 + mov r0, #0x1e + ror r2, r0 + add r0, r4, r5 + add r1, r1, r2 + add r0, #0x20 + strb r1, [r0] +_0224EBBC: + add r5, r5, #1 +_0224EBBE: + ldr r0, _0224EBD4 ; =0x00000B1A + ldrb r0, [r7, r0] + cmp r5, r0 + blt _0224EB74 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_0224EBCC: .word 0x00000B1B +_0224EBD0: .word 0x00001388 +_0224EBD4: .word 0x00000B1A +_0224EBD8: .word 0x00002710 +_0224EBDC: .word 0x02254A84 + thumb_func_end ov17_0224E990 + + thumb_func_start ov17_0224EBE0 +ov17_0224EBE0: ; 0x0224EBE0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #4 + blo _0224EBEE + bl sub_02022974 +_0224EBEE: + ldr r0, _0224EC20 ; =0x02254A80 + cmp r4, #3 + ldrsb r0, [r0, r5] + bhi _0224EC16 + add r1, r4, r4 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224EC02: ; jump table + .short _0224EC0A - _0224EC02 - 2 ; case 0 + .short _0224EC1C - _0224EC02 - 2 ; case 1 + .short _0224EC0E - _0224EC02 - 2 ; case 2 + .short _0224EC16 - _0224EC02 - 2 ; case 3 +_0224EC0A: + lsl r0, r0, #1 + pop {r3, r4, r5, pc} +_0224EC0E: + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + pop {r3, r4, r5, pc} +_0224EC16: + mov r1, #3 + bl sub_020E1F6C +_0224EC1C: + pop {r3, r4, r5, pc} + nop +_0224EC20: .word 0x02254A80 + thumb_func_end ov17_0224EBE0 + + thumb_func_start ov17_0224EC24 +ov17_0224EC24: ; 0x0224EC24 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + str r2, [sp] + ldr r4, [sp, #0x18] + cmp r0, #4 + blo _0224EC3A + bl sub_02022974 +_0224EC3A: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _0224EC5A + ldr r0, [sp, #0x1c] + cmp r0, #0 + bne _0224EC52 + mov r1, #1 + add r0, r6, #0 + and r0, r1 + and r1, r4 + cmp r0, r1 +_0224EC52: + sub r0, r6, r4 + cmp r0, #4 + sub r0, r6, r4 + cmp r0, #8 +_0224EC5A: + ldr r1, _0224ECC0 ; =0x02254A80 + ldr r0, [sp] + cmp r7, #3 + ldrsb r0, [r1, r0] + bhi _0224EC9E + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224EC70: ; jump table + .short _0224EC78 - _0224EC70 - 2 ; case 0 + .short _0224EC7C - _0224EC70 - 2 ; case 1 + .short _0224EC80 - _0224EC70 - 2 ; case 2 + .short _0224EC9E - _0224EC70 - 2 ; case 3 +_0224EC78: + lsl r0, r0, #1 + b _0224ECB6 +_0224EC7C: + lsl r0, r0, #1 + b _0224ECB6 +_0224EC80: + ldr r1, [sp, #0x20] + cmp r1, #1 + bne _0224EC94 + cmp r5, #2 + beq _0224EC8E + cmp r5, #3 + bne _0224EC94 +_0224EC8E: + lsl r1, r0, #1 + add r0, r0, r1 + b _0224ECB6 +_0224EC94: + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r1, r1, #1 + add r0, r0, r1 + b _0224ECB6 +_0224EC9E: + ldr r1, [sp, #0x20] + cmp r1, #1 + bne _0224ECB6 + cmp r5, #2 + beq _0224ECAC + cmp r5, #3 + bne _0224ECB6 +_0224ECAC: + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r1, r1, #1 + lsl r0, r0, #1 + add r0, r1, r0 +_0224ECB6: + cmp r0, #0 + bge _0224ECBC + mov r0, #0 +_0224ECBC: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224ECC0: .word 0x02254A80 + thumb_func_end ov17_0224EC24 + + thumb_func_start ov17_0224ECC4 +ov17_0224ECC4: ; 0x0224ECC4 + push {r3, r4, r5, r6} + add r6, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + add r5, r3, #0 + mov r4, #0 + ldr r2, [sp, #0x14] + cmp r1, #3 + bhi _0224ED08 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224ECE2: ; jump table + .short _0224ECEA - _0224ECE2 - 2 ; case 0 + .short _0224ECF2 - _0224ECE2 - 2 ; case 1 + .short _0224ECFA - _0224ECE2 - 2 ; case 2 + .short _0224ED02 - _0224ECE2 - 2 ; case 3 +_0224ECEA: + cmp r2, #1 + bne _0224ED08 + add r4, r4, #3 + b _0224ED08 +_0224ECF2: + cmp r2, #2 + bne _0224ED08 + add r4, r4, #3 + b _0224ED08 +_0224ECFA: + cmp r2, #4 + bne _0224ED08 + add r4, r4, #3 + b _0224ED08 +_0224ED02: + cmp r2, #3 + bne _0224ED08 + add r4, r4, #3 +_0224ED08: + ldr r1, [sp, #0x18] + cmp r1, #0 + beq _0224ED14 + cmp r2, r1 + beq _0224ED14 + add r4, #8 +_0224ED14: + mov r1, #0 + ldr r3, [sp, #0x10] + mvn r1, r1 + cmp r3, r1 + beq _0224ED36 + mov r1, #1 + add r2, r5, #0 + and r2, r1 + and r1, r3 + cmp r2, r1 + beq _0224ED2C + add r4, r4, #2 +_0224ED2C: + ldr r1, [sp, #0x10] + sub r1, r5, r1 + cmp r1, #8 + blt _0224ED36 + add r4, r4, #5 +_0224ED36: + cmp r6, #3 + bhi _0224ED70 + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224ED46: ; jump table + .short _0224ED4E - _0224ED46 - 2 ; case 0 + .short _0224ED52 - _0224ED46 - 2 ; case 1 + .short _0224ED56 - _0224ED46 - 2 ; case 2 + .short _0224ED70 - _0224ED46 - 2 ; case 3 +_0224ED4E: + lsl r4, r4, #1 + b _0224ED84 +_0224ED52: + lsl r4, r4, #1 + b _0224ED84 +_0224ED56: + ldr r1, [sp, #0x1c] + cmp r1, #1 + bne _0224ED66 + sub r0, r0, #2 + cmp r0, #1 + bhi _0224ED66 + lsl r4, r4, #1 + b _0224ED84 +_0224ED66: + lsr r0, r4, #0x1f + add r0, r4, r0 + asr r0, r0, #1 + add r4, r4, r0 + b _0224ED84 +_0224ED70: + ldr r1, [sp, #0x1c] + cmp r1, #1 + bne _0224ED84 + sub r0, r0, #2 + cmp r0, #1 + bhi _0224ED84 + lsr r0, r4, #0x1f + add r0, r4, r0 + asr r0, r0, #1 + add r4, r4, r0 +_0224ED84: + add r0, r4, #0 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224ECC4 + + thumb_func_start ov17_0224ED8C +ov17_0224ED8C: ; 0x0224ED8C + push {r3, r4, lr} + sub sp, #0xc + add r4, r2, #0 + add r4, #0x38 + ldrb r4, [r4] + cmp r4, #0 + bne _0224EDBA + cmp r0, #0 + bne _0224EDBA + ldr r0, [sp, #0x1c] + str r0, [sp] + ldr r0, [sp, #0x20] + str r0, [sp, #4] + ldr r0, [sp, #0x24] + str r0, [sp, #8] + add r0, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, [sp, #0x18] + bl ov17_0224EDE0 + add sp, #0xc + pop {r3, r4, pc} +_0224EDBA: + cmp r4, #0 + beq _0224EDDA + cmp r0, #1 + bne _0224EDDA + ldr r0, [sp, #0x1c] + str r0, [sp] + ldr r0, [sp, #0x20] + str r0, [sp, #4] + ldr r0, [sp, #0x24] + str r0, [sp, #8] + add r0, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, [sp, #0x18] + bl ov17_0224EE90 +_0224EDDA: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0224ED8C + + thumb_func_start ov17_0224EDE0 +ov17_0224EDE0: ; 0x0224EDE0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r4, r1, #0 + add r7, r0, #0 + add r0, r4, #0 + add r0, #0x38 + ldrb r3, [r0] + cmp r3, #0 + bne _0224EE82 + ldr r0, [sp, #0x44] + add r1, #0x36 + ldrb r0, [r0, #5] + ldrb r1, [r1] + cmp r1, r0 + bhs _0224EE82 + mov r5, #0x34 + ldrsh r5, [r4, r5] + cmp r5, #0 + ble _0224EE0E + sub r0, r5, #1 + add sp, #0x28 + strh r0, [r4, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_0224EE0E: + mov r5, #0 +_0224EE10: + add r6, r4, r5 + add r6, #0x28 + ldrb r6, [r6] + cmp r6, #1 + beq _0224EE20 + add r5, r5, #1 + cmp r5, #8 + blt _0224EE10 +_0224EE20: + cmp r5, #8 + bge _0224EE82 + lsl r6, r5, #2 + ldr r6, [r4, r6] + cmp r6, r2 + bhi _0224EE82 + ldr r6, [sp, #0x44] + add r6, #8 + str r6, [sp] + add r6, sp, #0x1c + str r6, [sp, #4] + mov r6, #0 + str r6, [sp, #8] + str r3, [sp, #0xc] + str r1, [sp, #0x10] + str r0, [sp, #0x14] + ldr r0, _0224EE88 ; =0x00000B1B + add r1, r4, r5 + ldrb r0, [r7, r0] + add r1, #0x20 + ldr r3, [sp, #0x40] + str r0, [sp, #0x18] + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + ldrb r1, [r1] + bl ov17_0224DE54 + ldr r0, [sp, #0x48] + add r1, sp, #0x1c + bl ov17_0224D6B0 + add r0, r4, r5 + add r1, r6, #0 + add r0, #0x28 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x36 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x36 + strb r1, [r0] + ldr r0, [sp, #0x40] + ldr r1, _0224EE8C ; =0x00002710 + bl sub_020E2178 + sub r0, r0, #2 + strh r0, [r4, #0x34] +_0224EE82: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224EE88: .word 0x00000B1B +_0224EE8C: .word 0x00002710 + thumb_func_end ov17_0224EDE0 + + thumb_func_start ov17_0224EE90 +ov17_0224EE90: ; 0x0224EE90 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + add r6, r0, #0 + ldr r0, [sp, #0x64] + add r5, r1, #0 + str r0, [sp, #0x64] + ldr r0, [sp, #0x60] + str r2, [sp, #0x1c] + lsr r0, r0, #1 + str r0, [sp, #0x38] + add r0, r5, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0 + beq _0224EECC + add r0, r5, #0 + add r0, #0x36 + ldrb r1, [r0] + ldr r0, [sp, #0x64] + ldrb r0, [r0, #5] + cmp r1, r0 + bhs _0224EECC + mov r0, #0xa + mul r0, r1 + ldr r2, _0224F068 ; =0x00001BBC + add r4, r6, r0 + ldrb r2, [r4, r2] + lsl r2, r2, #0x1d + lsr r2, r2, #0x1f + bne _0224EECE +_0224EECC: + b _0224F062 +_0224EECE: + mov r7, #0x34 + ldrsh r2, [r5, r7] + cmp r2, #0 + ble _0224EEDE + sub r0, r2, #1 + add sp, #0x48 + strh r0, [r5, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_0224EEDE: + ldr r2, _0224F068 ; =0x00001BBC + sub r2, #8 + add r2, r6, r2 + add r4, r2, r0 + ldr r0, [sp, #0x1c] + lsr r2, r3, #1 + sub r0, r0, r2 + str r0, [sp, #0x34] + ldrb r0, [r5, #5] + cmp r0, #0 + beq _0224EEF6 + b _0224EFF8 +_0224EEF6: + cmp r1, #0 + bne _0224EF02 + mov r0, #0 + sub r7, #0x35 + str r0, [sp, #0x20] + b _0224EF18 +_0224EF02: + sub r1, r1, #1 + mov r0, #0xa + mul r0, r1 + ldr r1, _0224F068 ; =0x00001BBC + add r0, r6, r0 + sub r1, r1, #2 + ldrb r7, [r0, r1] + ldr r1, _0224F068 ; =0x00001BBC + sub r1, r1, #5 + ldrb r0, [r0, r1] + str r0, [sp, #0x20] +_0224EF18: + ldr r1, [r6, #0] + ldr r0, _0224F06C ; =0x00000B1B + str r7, [sp] + ldrb r0, [r6, r0] + mov r2, #0x12 + lsl r2, r2, #4 + str r0, [sp, #4] + ldr r0, _0224F070 ; =0x00001C0E + ldrb r0, [r6, r0] + str r0, [sp, #8] + ldrb r0, [r1, r2] + sub r2, r2, #1 + ldrb r1, [r1, r2] + add r2, r5, #0 + add r2, #0x39 + ldrb r2, [r2] + ldrb r3, [r4, #6] + bl ov17_0224EC24 + ldr r1, [r6, #0] + str r0, [sp, #0x2c] + str r7, [sp] + ldrb r0, [r4, #3] + mov r2, #0x12 + lsl r2, r2, #4 + str r0, [sp, #4] + ldr r0, [sp, #0x20] + str r0, [sp, #8] + ldr r0, _0224F070 ; =0x00001C0E + ldrb r0, [r6, r0] + str r0, [sp, #0xc] + ldrb r0, [r1, r2] + sub r2, r2, #1 + ldrb r1, [r1, r2] + add r2, r5, #0 + add r2, #0x39 + ldrb r2, [r2] + ldrb r3, [r4, #6] + bl ov17_0224ECC4 + str r0, [sp, #0x28] + ldrb r1, [r4, #6] + ldr r0, [sp, #0x38] + mul r0, r1 + ldr r1, _0224F074 ; =0x00001388 + add r0, r0, r1 + lsl r1, r1, #1 + bl sub_020E2178 + add r7, r0, #0 + add r1, r5, #0 + ldr r0, [r5, #0x30] + add r1, #0x30 + bl sub_02094EA0 + ldr r1, [sp, #0x2c] + add r1, r1, #2 + bl sub_020E1F6C + ldr r0, [sp, #0x2c] + lsr r2, r0, #0x1f + add r2, r0, r2 + asr r0, r2, #1 + add r0, r0, #1 + sub r0, r1, r0 + add r0, r0, r7 + str r0, [sp, #0x30] + bpl _0224EFA4 + mov r0, #0 + str r0, [sp, #0x30] +_0224EFA4: + add r1, r5, #0 + ldr r0, [r5, #0x30] + add r1, #0x30 + bl sub_02094EA0 + mov r1, #0x64 + bl sub_020E1F6C + ldr r2, [sp, #0x2c] + ldr r0, [sp, #0x28] + add r0, r2, r0 + cmp r1, r0 + bge _0224EFE4 + add r7, r5, #0 + add r7, #0x30 +_0224EFC2: + ldr r0, [r5, #0x30] + add r1, r7, #0 + bl sub_02094EA0 + lsr r1, r0, #0x1f + lsl r2, r0, #0x1e + sub r2, r2, r1 + mov r0, #0x1e + ror r2, r0 + add r0, r1, r2 + str r0, [sp, #0x24] + bl ov17_0224DD28 + ldrb r1, [r4, #3] + cmp r1, r0 + beq _0224EFC2 + b _0224EFEC +_0224EFE4: + ldrb r0, [r4, #3] + bl ov17_0224DD5C + str r0, [sp, #0x24] +_0224EFEC: + ldr r0, [sp, #0x30] + str r0, [r5, #0] + ldr r0, [sp, #0x24] + strb r0, [r5, #4] + mov r0, #1 + strb r0, [r5, #5] +_0224EFF8: + ldr r1, [r5, #0] + ldr r0, [sp, #0x34] + cmp r1, r0 + bhi _0224F062 + ldr r0, [sp, #0x64] + ldr r2, [sp, #0x1c] + add r0, #8 + str r0, [sp] + add r0, sp, #0x3c + str r0, [sp, #4] + ldr r0, _0224F078 ; =0x00001BB4 + ldr r3, [sp, #0x60] + add r0, r6, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x38 + ldrb r0, [r0] + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0x36 + ldrb r0, [r0] + str r0, [sp, #0x10] + ldr r0, [sp, #0x64] + ldrb r0, [r0, #5] + str r0, [sp, #0x14] + ldr r0, _0224F06C ; =0x00000B1B + ldrb r0, [r6, r0] + str r0, [sp, #0x18] + add r0, r5, #0 + add r0, #0x37 + ldrb r0, [r0] + ldrb r1, [r5, #4] + bl ov17_0224DE54 + ldr r0, [sp, #0x68] + add r1, sp, #0x3c + bl ov17_0224D6B0 + mov r0, #0 + strb r0, [r5, #5] + add r0, r5, #0 + add r0, #0x36 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x36 + strb r1, [r0] + ldr r0, [sp, #0x60] + ldr r1, _0224F07C ; =0x00002710 + bl sub_020E2178 + sub r0, r0, #2 + strh r0, [r5, #0x34] +_0224F062: + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224F068: .word 0x00001BBC +_0224F06C: .word 0x00000B1B +_0224F070: .word 0x00001C0E +_0224F074: .word 0x00001388 +_0224F078: .word 0x00001BB4 +_0224F07C: .word 0x00002710 + thumb_func_end ov17_0224EE90 + + .rodata + + + .global Unk_ov17_02254A80 +Unk_ov17_02254A80: ; 0x02254A80 + .incbin "incbin/overlay17_rodata.bin", 0x1CF4, 0x1CF8 - 0x1CF4 + + .global Unk_ov17_02254A84 +Unk_ov17_02254A84: ; 0x02254A84 + .incbin "incbin/overlay17_rodata.bin", 0x1CF8, 0x4 + diff --git a/asm/ov17_0224F080.s b/asm/ov17_0224F080.s new file mode 100644 index 000000000..8180da30a --- /dev/null +++ b/asm/ov17_0224F080.s @@ -0,0 +1,184 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0224F080 +ov17_0224F080: ; 0x0224F080 + push {r4, lr} + add r4, r0, #0 + cmp r4, #5 + blo _0224F08C + bl sub_02022974 +_0224F08C: + ldr r0, _0224F094 ; =0x02254A90 + lsl r1, r4, #2 + ldr r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_0224F094: .word 0x02254A90 + thumb_func_end ov17_0224F080 + + thumb_func_start ov17_0224F098 +ov17_0224F098: ; 0x0224F098 + mov r0, #0x31 + bx lr + thumb_func_end ov17_0224F098 + + thumb_func_start ov17_0224F09C +ov17_0224F09C: ; 0x0224F09C + mov r0, #0x32 + bx lr + thumb_func_end ov17_0224F09C + + thumb_func_start ov17_0224F0A0 +ov17_0224F0A0: ; 0x0224F0A0 + push {r4, lr} + add r4, r0, #0 + cmp r4, #5 + blo _0224F0AC + bl sub_02022974 +_0224F0AC: + ldr r0, _0224F0B4 ; =0x02254A88 + ldrb r0, [r0, r4] + pop {r4, pc} + nop +_0224F0B4: .word 0x02254A88 + thumb_func_end ov17_0224F0A0 + + thumb_func_start ov17_0224F0B8 +ov17_0224F0B8: ; 0x0224F0B8 + mov r0, #0x2e + bx lr + thumb_func_end ov17_0224F0B8 + + thumb_func_start ov17_0224F0BC +ov17_0224F0BC: ; 0x0224F0BC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r3, #0 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov17_0224F0B8 + str r0, [sp, #0xc] + add r0, r7, #0 + bl ov17_0224F080 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x28] + str r4, [sp, #4] + str r0, [sp, #8] + ldr r2, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200CBDC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224F0BC + + thumb_func_start ov17_0224F0F0 +ov17_0224F0F0: ; 0x0224F0F0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov17_0224F0B8 + str r0, [sp, #8] + bl ov17_0224F098 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + str r6, [sp, #4] + bl sub_0200CE0C + bl ov17_0224F0B8 + add r6, r0, #0 + bl ov17_0224F09C + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + str r7, [sp, #4] + bl sub_0200CE3C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov17_0224F0F0 + + thumb_func_start ov17_0224F138 +ov17_0224F138: ; 0x0224F138 + ldr r3, _0224F13C ; =sub_0200D070 + bx r3 + ; .align 2, 0 +_0224F13C: .word sub_0200D070 + thumb_func_end ov17_0224F138 + + thumb_func_start ov17_0224F140 +ov17_0224F140: ; 0x0224F140 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + bl sub_0200D090 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D0A0 + pop {r3, r4, r5, pc} + thumb_func_end ov17_0224F140 + + thumb_func_start ov17_0224F154 +ov17_0224F154: ; 0x0224F154 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r6, r3, #0 + add r4, r0, #0 + add r7, r1, #0 + add r5, sp, #0 + mov r3, #6 +_0224F162: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _0224F162 + ldr r0, [r6, #0] + str r0, [r5, #0] + add r0, r2, #0 + bl ov17_0224F0A0 + str r0, [sp, #0xc] + add r0, r4, #0 + add r1, r7, #0 + add r2, sp, #0 + bl sub_0200CE6C + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov17_0224F154 + + thumb_func_start ov17_0224F184 +ov17_0224F184: ; 0x0224F184 + ldr r3, _0224F188 ; =sub_0200D0F4 + bx r3 + ; .align 2, 0 +_0224F188: .word sub_0200D0F4 + thumb_func_end ov17_0224F184 + + .rodata + + + .global Unk_ov17_02254A88 +Unk_ov17_02254A88: ; 0x02254A88 + .incbin "incbin/overlay17_rodata.bin", 0x1CFC, 0x1D04 - 0x1CFC + + .global Unk_ov17_02254A90 +Unk_ov17_02254A90: ; 0x02254A90 + .incbin "incbin/overlay17_rodata.bin", 0x1D04, 0x14 + diff --git a/asm/ov17_0224F18C.s b/asm/ov17_0224F18C.s new file mode 100644 index 000000000..71a29d112 --- /dev/null +++ b/asm/ov17_0224F18C.s @@ -0,0 +1,475 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0224F18C +ov17_0224F18C: ; 0x0224F18C + push {r3, r4, r5, lr} + ldr r2, _0224F1B0 ; =0x00000A18 + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + bl sub_020C4CF4 + ldr r0, [r4, #0] + str r0, [r5, #0] + ldrh r0, [r4, #4] + strh r0, [r5, #4] + ldrb r0, [r4, #6] + strb r0, [r5, #6] + ldrb r0, [r4, #7] + strb r0, [r5, #7] + ldrb r0, [r4, #8] + strb r0, [r5, #8] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224F1B0: .word 0x00000A18 + thumb_func_end ov17_0224F18C + + thumb_func_start ov17_0224F1B4 +ov17_0224F1B4: ; 0x0224F1B4 + push {r3, r4, r5, lr} + ldr r5, [r0, #0xc] + mov r4, #0 + mov r2, #1 +_0224F1BC: + add r3, r2, #0 + lsl r3, r4 + add r1, r5, #0 + tst r1, r3 + bne _0224F1D0 + ldr r1, [r0, #0xc] + orr r1, r3 + str r1, [r0, #0xc] + add r0, r4, #0 + pop {r3, r4, r5, pc} +_0224F1D0: + add r4, r4, #1 + cmp r4, #0x20 + blt _0224F1BC + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0224F1B4 + + thumb_func_start ov17_0224F1E0 +ov17_0224F1E0: ; 0x0224F1E0 + push {r3, r4} + mov r2, #1 + add r3, r2, #0 + lsl r3, r1 + sub r1, r2, #2 + ldr r4, [r0, #0xc] + eor r1, r3 + and r1, r4 + str r1, [r0, #0xc] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224F1E0 + + thumb_func_start ov17_0224F1F8 +ov17_0224F1F8: ; 0x0224F1F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r4, [sp, #0x28] + add r5, r0, #0 + mov r0, #2 + str r4, [sp, #4] + add r4, #8 + lsl r0, r0, #8 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + cmp r4, r0 + bls _0224F216 + bl sub_02022974 +_0224F216: + add r0, r5, #0 + mov r2, #2 + add r0, #0x10 + mov r1, #0 + lsl r2, r2, #8 + bl sub_020C4CF4 + add r0, sp, #8 + strb r6, [r0, #4] + strh r7, [r0, #2] + add r0, r5, #0 + bl ov17_0224F1B4 + add r1, sp, #8 + strb r0, [r1, #5] + mov r0, #0 + strb r0, [r1, #6] + strh r4, [r1] + add r1, r5, #0 + add r0, sp, #8 + add r1, #0x10 + mov r2, #8 + bl sub_020C4B68 + add r1, r5, #0 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, #0x18 + bl sub_020C4DB0 + ldr r0, _0224F268 ; =0x00000A15 + mov r1, #0 + strb r1, [r5, r0] + mov r1, #1 + sub r0, r0, #5 + strb r1, [r5, r0] + add r0, sp, #8 + ldrb r0, [r0, #5] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224F268: .word 0x00000A15 + thumb_func_end ov17_0224F1F8 + + thumb_func_start ov17_0224F26C +ov17_0224F26C: ; 0x0224F26C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r7, r3, #0 + mov r0, #2 + add r7, #8 + lsl r0, r0, #8 + add r4, r1, #0 + add r6, r2, #0 + str r3, [sp] + cmp r7, r0 + bls _0224F288 + bl sub_02022974 +_0224F288: + add r0, r5, #0 + mov r2, #2 + add r0, #0x10 + mov r1, #0 + lsl r2, r2, #8 + bl sub_020C4CF4 + ldrh r2, [r4] + add r1, sp, #4 + add r0, sp, #4 + strh r2, [r1] + ldrh r2, [r4, #2] + strh r2, [r1, #2] + ldrh r2, [r4, #4] + strh r2, [r1, #4] + ldrh r2, [r4, #6] + strh r2, [r1, #6] + mov r2, #0xfe + strb r2, [r1, #4] + mov r2, #1 + strb r2, [r1, #6] + strh r7, [r1] + add r1, r5, #0 + add r1, #0x10 + mov r2, #8 + bl sub_020C4B68 + cmp r6, #0 + beq _0224F2CE + add r1, r5, #0 + ldr r2, [sp] + add r0, r6, #0 + add r1, #0x18 + bl sub_020C4DB0 +_0224F2CE: + mov r0, #0xa1 + mov r1, #1 + lsl r0, r0, #4 + strb r1, [r5, r0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224F26C + + thumb_func_start ov17_0224F2DC +ov17_0224F2DC: ; 0x0224F2DC + push {r4, r5} + lsl r5, r1, #9 + mov r1, #0x21 + lsl r1, r1, #4 + add r4, r0, r1 + add r1, #8 + add r4, r4, r5 + add r0, r0, r1 + str r4, [r2, #0] + add r0, r0, r5 + str r0, [r3, #0] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224F2DC + + thumb_func_start ov17_0224F2F8 +ov17_0224F2F8: ; 0x0224F2F8 + mov r1, #0xa1 + lsl r1, r1, #4 + ldrb r0, [r0, r1] + cmp r0, #1 + bne _0224F306 + mov r0, #0 + bx lr +_0224F306: + mov r0, #1 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224F2F8 + + thumb_func_start ov17_0224F30C +ov17_0224F30C: ; 0x0224F30C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + bl ov17_0224F2F8 + cmp r0, #0 + bne _0224F322 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224F322: + ldrh r0, [r5, #4] + cmp r4, r0 + blt _0224F32C + bl sub_02022974 +_0224F32C: + add r0, r5, #0 + add r1, r6, #0 + mov r6, #0xc + ldr r5, [r5, #0] + mul r6, r4 + add r2, r4, #0 + ldr r4, [r5, r6] + add r3, r7, #0 + blx r4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov17_0224F30C + + thumb_func_start ov17_0224F344 +ov17_0224F344: ; 0x0224F344 + cmp r0, r2 + beq _0224F354 + cmp r2, #0xff + beq _0224F354 + cmp r2, #0xfe + bne _0224F358 + cmp r1, r0 + bne _0224F358 +_0224F354: + mov r0, #1 + bx lr +_0224F358: + mov r0, #0 + bx lr + thumb_func_end ov17_0224F344 + + thumb_func_start ov17_0224F35C +ov17_0224F35C: ; 0x0224F35C + push {r4, lr} + add r4, r0, #0 + mov r0, #0xa1 + lsl r0, r0, #4 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0224F36E + mov r0, #0 + pop {r4, pc} +_0224F36E: + ldrb r0, [r4, #7] + cmp r0, #0 + bne _0224F3AC + ldrb r1, [r4, #6] + mov r2, #0x21 + lsl r2, r2, #4 + add r0, r4, #0 + add r3, r4, r2 + lsl r1, r1, #9 + add r0, #0x10 + add r1, r3, r1 + sub r2, #0x10 + bl sub_020C4DB0 + ldrb r0, [r4, #6] + mov r2, #1 + add r1, r4, r0 + ldr r0, _0224F3CC ; =0x00000A11 + strb r2, [r1, r0] + add r0, r4, #0 + add r0, #0x10 + mov r1, #0 + lsl r2, r2, #9 + bl sub_020C4CF4 + mov r0, #0xa1 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #1 + pop {r4, pc} +_0224F3AC: + ldrh r2, [r4, #0x10] + add r1, r4, #0 + mov r0, #0x18 + add r1, #0x10 + bl sub_0203597C + cmp r0, #1 + bne _0224F3C8 + mov r0, #0xa1 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #1 + pop {r4, pc} +_0224F3C8: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0224F3CC: .word 0x00000A11 + thumb_func_end ov17_0224F35C + + thumb_func_start ov17_0224F3D0 +ov17_0224F3D0: ; 0x0224F3D0 + mov r1, #0xa1 + lsl r1, r1, #4 + ldrb r0, [r0, r1] + bx lr + thumb_func_end ov17_0224F3D0 + + thumb_func_start ov17_0224F3D8 +ov17_0224F3D8: ; 0x0224F3D8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r0, #0 + add r4, r1, #0 + add r0, sp, #0x18 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + ldr r0, _0224F4B0 ; =0x00000A11 + mov r6, #0 +_0224F3EE: + add r1, r7, r6 + ldrb r1, [r1, r0] + cmp r1, #1 + bne _0224F4A2 + add r0, r7, #0 + add r1, r6, #0 + add r2, sp, #0x14 + add r3, sp, #0x10 + bl ov17_0224F2DC + ldr r2, [sp, #0x14] + ldrb r0, [r7, #6] + ldrb r1, [r7, #8] + ldrb r2, [r2, #4] + bl ov17_0224F344 + cmp r0, #1 + bne _0224F484 + ldr r2, [sp, #0x14] + ldrh r1, [r7, #4] + ldrh r0, [r2, #2] + str r0, [sp, #8] + cmp r0, r1 + bhs _0224F484 + ldrb r0, [r2, #6] + cmp r0, #0 + bne _0224F43E + add r1, r4, #0 + ldr r4, [r7, #0] + ldr r5, [sp, #8] + str r4, [sp, #4] + mov r4, #0xc + mul r4, r5 + ldr r5, [sp, #4] + ldr r3, [sp, #0x10] + add r4, r5, r4 + ldr r4, [r4, #4] + add r0, r7, #0 + blx r4 + b _0224F484 +_0224F43E: + ldr r1, [sp, #8] + mov r3, #0xc + ldr r0, [r7, #0] + mul r3, r1 + add r0, r0, r3 + ldr r0, [r0, #8] + cmp r0, #0 + beq _0224F472 + ldr r1, [sp, #0x10] + lsl r0, r6, #2 + add r3, sp, #0x18 + str r1, [r3, r0] + str r6, [sp] + add r1, r4, #0 + ldr r4, [r7, #0] + mov r5, #0xc + mov ip, r4 + ldrh r4, [r2, #2] + add r0, r7, #0 + mul r5, r4 + str r5, [sp, #0xc] + ldr r4, [sp, #0xc] + mov r5, ip + add r4, r5, r4 + ldr r4, [r4, #8] + blx r4 +_0224F472: + ldr r1, [sp, #0x14] + add r0, r7, #0 + ldrb r1, [r1, #5] + bl ov17_0224F1E0 + ldr r0, _0224F4B4 ; =0x00000A15 + ldrb r1, [r7, r0] + add r1, r1, #1 + strb r1, [r7, r0] +_0224F484: + ldr r0, _0224F4B0 ; =0x00000A11 + mov r1, #0 + add r2, r7, r6 + strb r1, [r2, r0] + mov r2, #0x21 + lsl r2, r2, #4 + add r3, r7, r2 + lsl r0, r6, #9 + add r0, r3, r0 + sub r2, #0x10 + bl sub_020C4CF4 + add sp, #0x28 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224F4A2: + add r6, r6, #1 + cmp r6, #4 + blt _0224F3EE + mov r0, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224F4B0: .word 0x00000A11 +_0224F4B4: .word 0x00000A15 + thumb_func_end ov17_0224F3D8 + + thumb_func_start ov17_0224F4B8 +ov17_0224F4B8: ; 0x0224F4B8 + cmp r2, r3 + beq _0224F4C0 + mov r0, #1 + bx lr +_0224F4C0: + ldr r2, _0224F4D0 ; =0x00000A15 + ldrb r0, [r0, r2] + cmp r0, r1 + blt _0224F4CC + mov r0, #1 + bx lr +_0224F4CC: + mov r0, #0 + bx lr + ; .align 2, 0 +_0224F4D0: .word 0x00000A15 + thumb_func_end ov17_0224F4B8 \ No newline at end of file diff --git a/asm/ov17_0224F4D4.s b/asm/ov17_0224F4D4.s new file mode 100644 index 000000000..8cbc6ea0f --- /dev/null +++ b/asm/ov17_0224F4D4.s @@ -0,0 +1,2333 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_0224F4D4 +ov17_0224F4D4: ; 0x0224F4D4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r1, #1 + lsl r1, r1, #0x1a + ldr r0, [r1, #0] + ldr r2, _0224F718 ; =0xFFFFE0FF + and r0, r2 + str r0, [r1, #0] + ldr r0, _0224F71C ; =0x04001000 + ldr r3, [r0, #0] + and r2, r3 + str r2, [r0, #0] + ldr r3, [r1, #0] + ldr r2, _0224F720 ; =0xFFFF1FFF + and r3, r2 + str r3, [r1, #0] + ldr r3, [r0, #0] + add r1, #0x50 + and r2, r3 + str r2, [r0, #0] + mov r2, #0 + strh r2, [r1] + add r0, #0x50 + strh r2, [r0] + mov r2, #7 + mov r0, #3 + mov r1, #0x18 + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r1, #0x4a + add r0, r4, #0 + lsl r1, r1, #6 + mov r2, #0x18 + bl sub_0200681C + mov r2, #0x4a + mov r1, #0 + lsl r2, r2, #6 + add r5, r0, #0 + bl sub_020C4CF4 + mov r0, #0x18 + bl ov17_0223F140 + str r0, [r5, #0xc] + add r0, r4, #0 + bl sub_02006840 + mov r1, #0x5b + str r0, [r5, #0] + lsl r1, r1, #2 + str r5, [r0, r1] + ldr r2, [r5, #0] + mov r3, #3 + add r0, r1, #4 + strb r3, [r2, r0] + ldr r0, [r5, #0] + str r0, [r5, #0x10] + add r0, r5, #0 + bl ov17_0224FE1C + ldr r0, _0224F724 ; =0x0000127F + mov r1, #0 + strb r1, [r5, r0] + mov r0, #0x18 + bl sub_02002F38 + add r1, r5, #0 + add r1, #0xd0 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02003858 + add r0, r5, #0 + add r0, #0xd0 + mov r2, #2 + ldr r0, [r0, #0] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #0x18 + bl sub_02002F70 + add r0, r5, #0 + add r0, #0xd0 + mov r1, #1 + ldr r0, [r0, #0] + lsl r2, r1, #9 + mov r3, #0x18 + bl sub_02002F70 + add r0, r5, #0 + add r0, #0xd0 + mov r2, #7 + ldr r0, [r0, #0] + mov r1, #2 + lsl r2, r2, #6 + mov r3, #0x18 + bl sub_02002F70 + add r0, r5, #0 + add r0, #0xd0 + mov r2, #2 + ldr r0, [r0, #0] + mov r1, #3 + lsl r2, r2, #8 + mov r3, #0x18 + bl sub_02002F70 + mov r0, #0x18 + bl sub_02018340 + str r0, [r5, #0x30] + mov r0, #0x40 + mov r1, #0x18 + bl sub_0201DBEC + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + ldr r0, [r5, #0x30] + bl ov17_0224FB34 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r0, #2 + mov r1, #0x18 + bl sub_02002BB8 + mov r0, #0x18 + bl sub_0200C6E4 + ldr r1, _0224F728 ; =0x02254B0C + ldr r2, _0224F72C ; =0x02254AC4 + mov r3, #0x20 + str r0, [r5, #0x28] + bl sub_0200C73C + ldr r1, _0224F730 ; =0x00100010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + ldr r0, [r5, #0x28] + bl sub_0200C704 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r2, #0x80 + bl sub_0200C7C0 + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + ldr r2, _0224F734 ; =0x02254AD8 + bl sub_0200CB30 + mov r0, #0x18 + bl sub_0200762C + str r0, [r5, #0x14] + bl ov17_0224FDDC + mov r0, #0 + mov r1, #0x1a + mov r2, #0xda + mov r3, #0x18 + bl sub_0200B144 + add r1, r5, #0 + add r1, #0xc4 + str r0, [r1, #0] + mov r0, #0x18 + bl sub_0200B358 + add r1, r5, #0 + add r1, #0xc8 + str r0, [r1, #0] + mov r0, #5 + lsl r0, r0, #6 + mov r1, #0x18 + bl sub_02023790 + add r1, r5, #0 + add r1, #0xcc + str r0, [r1, #0] + mov r0, #0xa + mov r1, #0x18 + bl sub_02012744 + add r1, r5, #0 + add r1, #0xd4 + str r0, [r1, #0] + add r0, r5, #0 + bl ov17_0224FE60 + add r0, r5, #0 + bl ov17_0224FE70 + add r0, r5, #0 + bl ov17_0224FCA0 + add r0, r5, #0 + bl ov17_0224FE48 + add r0, r5, #0 + bl ov17_0224FE58 + add r0, r5, #0 + bl ov17_02250744 + bl sub_02039734 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0x18 + str r1, [sp, #8] + mov r1, #0x21 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, _0224F738 ; =ov17_0224FAFC + ldr r2, _0224F73C ; =0x00013880 + add r1, r5, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + mov r0, #0x85 + mov r1, #1 + lsl r0, r0, #4 + strb r1, [r5, r0] + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r1, _0224F740 ; =0x0000046F + mov r0, #6 + mov r2, #1 + bl sub_02004550 + ldr r1, [r5, #0] + ldr r0, _0224F744 ; =0x00000171 + ldrb r0, [r1, r0] + bl sub_020959F4 + ldr r0, _0224F748 ; =ov17_0224FA24 + add r1, r5, #0 + bl sub_02017798 + ldr r0, _0224F74C ; =ov17_0224FAE4 + add r1, r5, #0 + mov r2, #0xa + bl sub_0200DA04 + str r0, [r5, #8] + ldr r0, _0224F750 ; =0x000006E5 + bl sub_02005748 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224F718: .word 0xFFFFE0FF +_0224F71C: .word 0x04001000 +_0224F720: .word 0xFFFF1FFF +_0224F724: .word 0x0000127F +_0224F728: .word 0x02254B0C +_0224F72C: .word 0x02254AC4 +_0224F730: .word 0x00100010 +_0224F734: .word 0x02254AD8 +_0224F738: .word ov17_0224FAFC +_0224F73C: .word 0x00013880 +_0224F740: .word 0x0000046F +_0224F744: .word 0x00000171 +_0224F748: .word ov17_0224FA24 +_0224F74C: .word ov17_0224FAE4 +_0224F750: .word 0x000006E5 + thumb_func_end ov17_0224F4D4 + + thumb_func_start ov17_0224F754 +ov17_0224F754: ; 0x0224F754 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02094E98 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0224F776 + cmp r0, #1 + beq _0224F7A8 + cmp r0, #2 + beq _0224F830 + b _0224F83E +_0224F776: + bl sub_0200F2AC + cmp r0, #1 + bne _0224F83E + ldr r0, _0224F844 ; =ov17_0224FAAC + add r1, r4, #0 + bl sub_020177BC + mov r0, #0xff + str r0, [sp] + ldr r0, _0224F848 ; =0x0000D6D8 + add r1, r4, #0 + str r0, [sp, #4] + add r1, #0xd0 + ldr r1, [r1, #0] + ldr r2, _0224F84C ; =0x02254AB4 + mov r0, #0x18 + mov r3, #8 + bl ov17_0223F70C + ldr r1, _0224F850 ; =0x00000848 + str r0, [r4, r1] + mov r0, #1 + str r0, [r5, #0] + b _0224F83E +_0224F7A8: + ldr r0, [r4, #0] + bl sub_02094EDC + cmp r0, #1 + bne _0224F804 + ldr r2, _0224F854 ; =0x0000084E + ldr r1, _0224F858 ; =0x00001274 + ldrh r2, [r4, r2] + add r0, r4, #0 + add r1, r4, r1 + lsl r3, r2, #2 + ldr r2, _0224F85C ; =0x02254B54 + ldr r2, [r2, r3] + blx r2 + cmp r0, #1 + beq _0224F7CC + cmp r0, #2 + bne _0224F7EE +_0224F7CC: + cmp r0, #1 + bne _0224F7D8 + ldr r0, _0224F854 ; =0x0000084E + ldrh r1, [r4, r0] + add r1, r1, #1 + b _0224F7DE +_0224F7D8: + ldr r0, _0224F860 ; =0x00001276 + ldrh r1, [r4, r0] + ldr r0, _0224F854 ; =0x0000084E +_0224F7DE: + strh r1, [r4, r0] + ldr r0, _0224F858 ; =0x00001274 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + b _0224F804 +_0224F7EE: + cmp r0, #3 + bne _0224F804 + mov r0, #2 + str r0, [r5, #0] + ldr r0, _0224F858 ; =0x00001274 + mov r1, #0 + add r0, r4, r0 + mov r2, #8 + bl sub_020C4CF4 + b _0224F83E +_0224F804: + ldr r0, _0224F864 ; =0x0000085C + add r0, r4, r0 + bl ov17_0224F35C + ldr r0, _0224F864 ; =0x0000085C + add r1, r4, #0 + add r0, r4, r0 + bl ov17_0224F3D8 + ldr r0, _0224F868 ; =0x0000127C + ldrb r1, [r4, r0] + cmp r1, #1 + bne _0224F83E + mov r1, #2 + sub r0, #8 + str r1, [r5, #0] + add r0, r4, r0 + mov r1, #0 + mov r2, #8 + bl sub_020C4CF4 + b _0224F83E +_0224F830: + bl sub_0200F2AC + cmp r0, #1 + bne _0224F83E + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0224F83E: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224F844: .word ov17_0224FAAC +_0224F848: .word 0x0000D6D8 +_0224F84C: .word 0x02254AB4 +_0224F850: .word 0x00000848 +_0224F854: .word 0x0000084E +_0224F858: .word 0x00001274 +_0224F85C: .word 0x02254B54 +_0224F860: .word 0x00001276 +_0224F864: .word 0x0000085C +_0224F868: .word 0x0000127C + thumb_func_end ov17_0224F754 + + thumb_func_start ov17_0224F86C +ov17_0224F86C: ; 0x0224F86C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_0200682C + add r4, r0, #0 + bl sub_020141E4 + add r0, r4, #0 + bl ov17_0224FE50 + add r0, r4, #0 + bl ov17_0224FE5C + add r0, r4, #0 + bl ov17_0224FE68 + add r0, r4, #0 + bl ov17_0224FEC8 + add r5, r4, #0 + mov r6, #0 + add r5, #0x34 +_0224F898: + add r0, r5, #0 + bl sub_0201A8FC + add r6, r6, #1 + add r5, #0x10 + cmp r6, #9 + blt _0224F898 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0x30] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0x30] + mov r1, #3 + bl sub_02019044 + mov r0, #4 + mov r1, #0 + bl sub_02019120 + ldr r0, [r4, #0x30] + mov r1, #4 + bl sub_02019044 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x2c] + bl sub_0200D0B0 + ldr r0, [r4, #0x28] + bl sub_0200C8D4 + bl sub_0201DC3C + add r0, r4, #0 + add r0, #0x10 + bl ov17_022507C4 + ldr r0, [r4, #0x14] + bl sub_02007B6C + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl sub_020127BC + mov r0, #2 + bl sub_02002C60 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_02002FA0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_02002F54 + add r0, r4, #0 + add r0, #0xcc + ldr r0, [r0, #0] + bl sub_020237BC + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200B3F0 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl sub_0200B190 + ldr r0, [r4, #0x30] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, [r4, #8] + bl sub_0200DA58 + ldr r0, [r4, #0xc] + bl ov17_0223F1E0 + bl sub_0201E530 + add r0, r7, #0 + bl sub_02006830 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _0224FA00 ; =0xFFFF1FFF + and r1, r0 + str r1, [r2, #0] + ldr r2, _0224FA04 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + mov r0, #0x18 + bl sub_0201807C + bl sub_02095A24 + mov r1, #5 + mov r2, #2 + ldr r0, _0224FA08 ; =0x00007FFF + lsl r1, r1, #0x18 + lsl r2, r2, #8 + bl sub_020C4AF0 + mov r2, #2 + ldr r0, _0224FA08 ; =0x00007FFF + ldr r1, _0224FA0C ; =0x05000200 + lsl r2, r2, #8 + bl sub_020C4AF0 + mov r2, #2 + ldr r0, _0224FA08 ; =0x00007FFF + ldr r1, _0224FA10 ; =0x05000400 + lsl r2, r2, #8 + bl sub_020C4AF0 + mov r2, #2 + ldr r0, _0224FA08 ; =0x00007FFF + ldr r1, _0224FA14 ; =0x05000600 + lsl r2, r2, #8 + bl sub_020C4AF0 + bl sub_02039794 + ldr r0, _0224FA18 ; =0x0000000B + bl sub_02006514 + ldr r0, _0224FA1C ; =0x0000000C + bl sub_02006514 + ldr r0, _0224FA20 ; =0x00000016 + bl sub_02006514 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224FA00: .word 0xFFFF1FFF +_0224FA04: .word 0x04001000 +_0224FA08: .word 0x00007FFF +_0224FA0C: .word 0x05000200 +_0224FA10: .word 0x05000400 +_0224FA14: .word 0x05000600 +_0224FA18: .word 0x0000000B +_0224FA1C: .word 0x0000000C +_0224FA20: .word 0x00000016 + thumb_func_end ov17_0224F86C + + thumb_func_start ov17_0224FA24 +ov17_0224FA24: ; 0x0224FA24 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, _0224FA9C ; =0x00000854 + sub r1, r0, #2 + ldrb r3, [r4, r1] + sub r1, r0, #3 + ldrb r1, [r4, r1] + sub r6, r0, #1 + ldrb r6, [r4, r6] + lsl r2, r1, #8 + mov r1, #0xff + lsl r1, r1, #8 + and r2, r1 + orr r2, r6 + ldrb r5, [r4, r0] + ldr r6, _0224FAA0 ; =0x04000040 + strh r2, [r6] + lsl r2, r3, #8 + and r2, r1 + orr r2, r5 + strh r2, [r6, #4] + add r2, r0, #4 + ldrb r5, [r4, r2] + add r2, r0, #2 + ldrb r3, [r4, r2] + add r2, r0, #1 + ldrb r2, [r4, r2] + add r0, r0, #3 + ldrb r0, [r4, r0] + lsl r2, r2, #8 + and r2, r1 + orr r0, r2 + strh r0, [r6, #2] + lsl r0, r3, #8 + and r0, r1 + orr r0, r5 + strh r0, [r6, #6] + ldr r0, [r4, #0x14] + bl sub_02008A94 + bl sub_0201DCAC + bl sub_0200C800 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_02003694 + ldr r0, [r4, #0x30] + bl sub_0201C2B8 + ldr r3, _0224FAA4 ; =0x027E0000 + ldr r1, _0224FAA8 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, r5, r6, pc} + nop +_0224FA9C: .word 0x00000854 +_0224FAA0: .word 0x04000040 +_0224FAA4: .word 0x027E0000 +_0224FAA8: .word 0x00003FF8 + thumb_func_end ov17_0224FA24 + + thumb_func_start ov17_0224FAAC +ov17_0224FAAC: ; 0x0224FAAC + push {r3, lr} + ldr r1, _0224FADC ; =0x0000127F + ldrb r0, [r0, r1] + cmp r0, #1 + bne _0224FAD8 + ldr r0, _0224FAE0 ; =0x04000006 + ldrh r0, [r0] + cmp r0, #0x90 + blt _0224FACC + cmp r0, #0x98 + bgt _0224FACC + mov r0, #1 + mov r1, #0 + bl sub_02019060 + pop {r3, pc} +_0224FACC: + cmp r0, #0x90 + bge _0224FAD8 + mov r0, #1 + mov r1, #2 + bl sub_02019060 +_0224FAD8: + pop {r3, pc} + nop +_0224FADC: .word 0x0000127F +_0224FAE0: .word 0x04000006 + thumb_func_end ov17_0224FAAC + + thumb_func_start ov17_0224FAE4 +ov17_0224FAE4: ; 0x0224FAE4 + push {r3, lr} + ldr r0, _0224FAF8 ; =0x0000127F + ldrb r0, [r1, r0] + cmp r0, #1 + bne _0224FAF6 + mov r0, #1 + mov r1, #2 + bl sub_02019060 +_0224FAF6: + pop {r3, pc} + ; .align 2, 0 +_0224FAF8: .word 0x0000127F + thumb_func_end ov17_0224FAE4 + + thumb_func_start ov17_0224FAFC +ov17_0224FAFC: ; 0x0224FAFC + push {r4, lr} + mov r0, #0x85 + add r4, r1, #0 + lsl r0, r0, #4 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0224FB24 + ldr r0, [r4, #0x14] + bl sub_02007768 + bl ov11_0221F8F0 + ldr r0, [r4, #0x2c] + bl sub_0200C7EC + bl sub_0200C808 + ldr r0, _0224FB30 ; =0x04000540 + mov r1, #1 + str r1, [r0, #0] +_0224FB24: + ldr r1, [r4, #0x30] + mov r0, #0x18 + bl sub_02038A1C + pop {r4, pc} + nop +_0224FB30: .word 0x04000540 + thumb_func_end ov17_0224FAFC + + thumb_func_start ov17_0224FB34 +ov17_0224FB34: ; 0x0224FB34 + push {r3, r4, r5, lr} + sub sp, #0xa8 + add r4, r0, #0 + bl sub_0201FF00 + ldr r5, _0224FC8C ; =0x02254B2C + add r3, sp, #0x2c + mov r2, #5 +_0224FB44: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224FB44 + add r0, sp, #0x2c + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + ldr r5, _0224FC90 ; =0x02254AA4 + add r3, sp, #0x1c + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0224FC94 ; =0x02254B80 + add r3, sp, #0x54 + mov r2, #0xa +_0224FBA4: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224FBA4 + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + add r2, sp, #0x54 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #1 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + add r2, sp, #0x70 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #3 + add r2, sp, #0x8c + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r1, _0224FC98 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r2, r0 + strh r2, [r1] + add r1, r0, #0 + bl sub_0201FF0C + ldr r5, _0224FC9C ; =0x02254AF0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + mov r2, #0 + add r0, r4, #0 + mov r1, #4 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #4 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add sp, #0xa8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224FC8C: .word 0x02254B2C +_0224FC90: .word 0x02254AA4 +_0224FC94: .word 0x02254B80 +_0224FC98: .word 0x04000008 +_0224FC9C: .word 0x02254AF0 + thumb_func_end ov17_0224FB34 + + thumb_func_start ov17_0224FCA0 +ov17_0224FCA0: ; 0x0224FCA0 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0x34 + mov r2, #1 + mov r3, #2 + bl sub_0201A7E8 + mov r2, #1 + add r1, r4, #0 + str r2, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x8b + str r0, [sp, #0x10] + ldr r0, [r4, #0x30] + add r1, #0x44 + mov r3, #6 + bl sub_0201A7E8 + mov r0, #5 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xa3 + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0x54 + mov r2, #1 + mov r3, #6 + bl sub_0201A7E8 + mov r0, #9 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xbb + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0x64 + mov r2, #1 + mov r3, #6 + bl sub_0201A7E8 + mov r1, #0xd + str r1, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #0xd3 + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0x74 + mov r2, #1 + mov r3, #6 + bl sub_0201A7E8 + mov r2, #1 + add r1, r4, #0 + str r2, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xeb + str r0, [sp, #0x10] + ldr r0, [r4, #0x30] + add r1, #0x84 + mov r3, #0x10 + bl sub_0201A7E8 + mov r0, #5 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + add r0, #0xf6 + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0x30] + add r1, #0x94 + mov r2, #1 + mov r3, #0x10 + bl sub_0201A7E8 + mov r0, #9 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224FDD4 ; =0x0000011B + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0x30] + add r1, #0xa4 + mov r2, #1 + mov r3, #0x10 + bl sub_0201A7E8 + mov r1, #0xd + str r1, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + ldr r0, _0224FDD8 ; =0x00000133 + str r1, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r4, #0x30] + add r4, #0xb4 + add r1, r4, #0 + mov r2, #1 + mov r3, #0x10 + bl sub_0201A7E8 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_0224FDD4: .word 0x0000011B +_0224FDD8: .word 0x00000133 + thumb_func_end ov17_0224FCA0 + + thumb_func_start ov17_0224FDDC +ov17_0224FDDC: ; 0x0224FDDC + push {r3, r4, r5, lr} + ldr r3, _0224FE14 ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _0224FE18 ; =0x02100DF4 + mov r1, #0 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + add r2, r1, #0 + blx r3 + add r5, r0, #0 + cmp r4, #0 + bne _0224FE04 + bl sub_02022974 +_0224FE04: + cmp r5, #0 + bne _0224FE0C + bl sub_02022974 +_0224FE0C: + bl sub_02014000 + pop {r3, r4, r5, pc} + nop +_0224FE14: .word 0x02100DEC +_0224FE18: .word 0x02100DF4 + thumb_func_end ov17_0224FDDC + + thumb_func_start ov17_0224FE1C +ov17_0224FE1C: ; 0x0224FE1C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0224FE2A + bl sub_02022974 +_0224FE2A: + mov r1, #0xf3 + mov r5, #0 + mov r0, #3 + lsl r1, r1, #2 +_0224FE32: + sub r3, r0, r5 + add r2, r4, r5 + add r5, r5, #1 + strb r3, [r2, r1] + cmp r5, #4 + blt _0224FE32 + add r0, r4, #0 + bl ov17_02251D6C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_0224FE1C + + thumb_func_start ov17_0224FE48 +ov17_0224FE48: ; 0x0224FE48 + ldr r3, _0224FE4C ; =ov17_02250A88 + bx r3 + ; .align 2, 0 +_0224FE4C: .word ov17_02250A88 + thumb_func_end ov17_0224FE48 + + thumb_func_start ov17_0224FE50 +ov17_0224FE50: ; 0x0224FE50 + ldr r3, _0224FE54 ; =ov17_02250D8C + bx r3 + ; .align 2, 0 +_0224FE54: .word ov17_02250D8C + thumb_func_end ov17_0224FE50 + + thumb_func_start ov17_0224FE58 +ov17_0224FE58: ; 0x0224FE58 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224FE58 + + thumb_func_start ov17_0224FE5C +ov17_0224FE5C: ; 0x0224FE5C + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224FE5C + + thumb_func_start ov17_0224FE60 +ov17_0224FE60: ; 0x0224FE60 + ldr r3, _0224FE64 ; =ov17_022509AC + bx r3 + ; .align 2, 0 +_0224FE64: .word ov17_022509AC + thumb_func_end ov17_0224FE60 + + thumb_func_start ov17_0224FE68 +ov17_0224FE68: ; 0x0224FE68 + ldr r3, _0224FE6C ; =ov17_02250D24 + bx r3 + ; .align 2, 0 +_0224FE6C: .word ov17_02250D24 + thumb_func_end ov17_0224FE68 + + thumb_func_start ov17_0224FE70 +ov17_0224FE70: ; 0x0224FE70 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x18 + str r0, [sp, #0xc] + ldr r2, [r4, #0x30] + mov r0, #0x2d + mov r1, #0x13 + mov r3, #4 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x18 + str r0, [sp, #0xc] + ldr r2, [r4, #0x30] + mov r0, #0x2d + mov r1, #0x14 + mov r3, #4 + bl sub_02006E60 + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r4, #0xd0 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0x2d + mov r2, #0x22 + mov r3, #0x18 + bl sub_02003050 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_0224FE70 + + thumb_func_start ov17_0224FEC8 +ov17_0224FEC8: ; 0x0224FEC8 + bx lr + ; .align 2, 0 + thumb_func_end ov17_0224FEC8 + + thumb_func_start ov17_0224FECC +ov17_0224FECC: ; 0x0224FECC + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + ldrh r1, [r7] + add r4, r0, #0 + cmp r1, #0 + beq _0224FEE2 + cmp r1, #1 + beq _0224FF70 + cmp r1, #2 + beq _0224FFA8 + b _0224FFCA +_0224FEE2: + bl ov17_02251A1C + mov r0, #0x13 + ldr r2, [r4, #0] + mov r5, #0 + lsl r0, r0, #4 +_0224FEEE: + ldrb r1, [r2, r0] + cmp r1, #0 + beq _0224FEFC + add r5, r5, #1 + add r2, #0xc + cmp r5, #4 + blt _0224FEEE +_0224FEFC: + cmp r5, #4 + bne _0224FF04 + bl sub_02022974 +_0224FF04: + ldr r0, _0224FFD4 ; =0x00000438 + ldr r1, _0224FFD8 ; =0x00000439 + strb r5, [r4, r0] + mov r5, #0 + sub r0, #0x67 +_0224FF0E: + add r3, r4, r5 + ldrb r2, [r3, r0] + add r5, r5, #1 + cmp r5, #4 + strb r2, [r3, r1] + blt _0224FF0E + mov r3, #0 + add r1, r3, #0 + add r2, r4, #0 +_0224FF20: + ldr r0, [r4, #0] + mov r5, #0x4a + add r0, r0, r1 + lsl r5, r5, #2 + ldrh r6, [r0, r5] + mov r5, #0xe7 + lsl r5, r5, #2 + strh r6, [r2, r5] + ldr r5, _0224FFDC ; =0x0000012A + add r3, r3, #1 + ldrh r6, [r0, r5] + ldr r5, _0224FFE0 ; =0x0000039E + add r1, #0xc + strh r6, [r2, r5] + mov r5, #0x4b + lsl r5, r5, #2 + ldrh r6, [r0, r5] + mov r5, #0x3a + lsl r5, r5, #4 + strh r6, [r2, r5] + ldr r5, _0224FFE4 ; =0x0000012E + ldrh r6, [r0, r5] + ldr r5, _0224FFE8 ; =0x000003A2 + strh r6, [r2, r5] + mov r5, #0x13 + lsl r5, r5, #4 + ldrh r6, [r0, r5] + mov r5, #0xe9 + lsl r5, r5, #2 + strh r6, [r2, r5] + ldr r5, _0224FFEC ; =0x00000132 + ldrh r5, [r0, r5] + ldr r0, _0224FFF0 ; =0x000003A6 + strh r5, [r2, r0] + add r2, #0xc + cmp r3, #4 + blt _0224FF20 + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] +_0224FF70: + ldr r1, [r4, #0] + ldr r0, _0224FFF4 ; =0x00000177 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0224FF86 + ldr r0, [r7, #4] + cmp r0, #0x78 + bge _0224FF86 + add r0, r0, #1 + str r0, [r7, #4] + b _0224FFCE +_0224FF86: + ldr r0, _0224FFF8 ; =0x0000085C + mov r3, #0xe7 + lsl r3, r3, #2 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #1 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _0224FFCE + mov r0, #0 + str r0, [r7, #4] + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0224FFCE +_0224FFA8: + ldr r0, _0224FFF8 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _0224FFFC ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0224FFCE + ldrh r0, [r7] + add r0, r0, #1 + strh r0, [r7] + b _0224FFCE +_0224FFCA: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224FFCE: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224FFD4: .word 0x00000438 +_0224FFD8: .word 0x00000439 +_0224FFDC: .word 0x0000012A +_0224FFE0: .word 0x0000039E +_0224FFE4: .word 0x0000012E +_0224FFE8: .word 0x000003A2 +_0224FFEC: .word 0x00000132 +_0224FFF0: .word 0x000003A6 +_0224FFF4: .word 0x00000177 +_0224FFF8: .word 0x0000085C +_0224FFFC: .word 0x00000127 + thumb_func_end ov17_0224FECC + + thumb_func_start ov17_02250000 +ov17_02250000: ; 0x02250000 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _02250012 + cmp r0, #1 + beq _0225004C + b _0225006E +_02250012: + ldr r3, _02250078 ; =0x00000445 + mov r1, #0 + strb r1, [r5, r3] + add r0, r3, #2 + strb r1, [r5, r0] + add r0, r3, #1 + strb r1, [r5, r0] + add r0, r3, #0 + sub r0, #0x79 + ldrb r1, [r5, r0] + sub r0, r3, #7 + mov r2, #5 + strb r1, [r5, r0] + sub r0, r3, #1 + mov r1, #1 + strb r1, [r5, r0] + ldr r0, _0225007C ; =0x0000085C + sub r3, #0xf + add r0, r5, r0 + add r1, r5, #0 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250072 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250072 +_0225004C: + ldr r0, _0225007C ; =0x0000085C + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _02250080 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250072 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250072 +_0225006E: + mov r0, #1 + pop {r3, r4, r5, pc} +_02250072: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02250078: .word 0x00000445 +_0225007C: .word 0x0000085C +_02250080: .word 0x00000127 + thumb_func_end ov17_02250000 + + thumb_func_start ov17_02250084 +ov17_02250084: ; 0x02250084 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _02250096 + cmp r0, #1 + beq _022500B4 + b _022500D6 +_02250096: + ldr r0, _022500E0 ; =0x0000085C + mov r3, #0xe7 + lsl r3, r3, #2 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #6 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _022500DA + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _022500DA +_022500B4: + ldr r0, _022500E0 ; =0x0000085C + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _022500E4 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _022500DA + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _022500DA +_022500D6: + mov r0, #1 + pop {r3, r4, r5, pc} +_022500DA: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022500E0: .word 0x0000085C +_022500E4: .word 0x00000127 + thumb_func_end ov17_02250084 + + thumb_func_start ov17_022500E8 +ov17_022500E8: ; 0x022500E8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _022500FE + cmp r0, #1 + beq _02250130 + cmp r0, #2 + beq _02250152 + b _02250164 +_022500FE: + ldr r3, _0225016C ; =0x00000445 + mov r0, #0 + strb r0, [r5, r3] + mov r1, #1 + add r0, r3, #2 + strb r1, [r5, r0] + add r0, r3, #1 + strb r1, [r5, r0] + sub r0, r3, #1 + mov r1, #6 + strb r1, [r5, r0] + ldr r0, _02250170 ; =0x0000085C + sub r3, #0xf + add r0, r5, r0 + add r1, r5, #0 + mov r2, #5 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250168 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250168 +_02250130: + ldr r0, _02250170 ; =0x0000085C + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _02250174 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250168 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250168 +_02250152: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x3c + ble _02250168 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250168 +_02250164: + mov r0, #1 + pop {r3, r4, r5, pc} +_02250168: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225016C: .word 0x00000445 +_02250170: .word 0x0000085C +_02250174: .word 0x00000127 + thumb_func_end ov17_022500E8 + + thumb_func_start ov17_02250178 +ov17_02250178: ; 0x02250178 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #4 + bhi _02250268 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02250190: ; jump table + .short _0225019A - _02250190 - 2 ; case 0 + .short _022501F0 - _02250190 - 2 ; case 1 + .short _02250212 - _02250190 - 2 ; case 2 + .short _02250234 - _02250190 - 2 ; case 3 + .short _02250256 - _02250190 - 2 ; case 4 +_0225019A: + ldr r1, [r3, #0] + ldr r0, _02250270 ; =0x00000121 + ldrb r0, [r1, r0] + cmp r0, #4 + bhi _022501BA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022501B0: ; jump table + .short _022501BE - _022501B0 - 2 ; case 0 + .short _022501BE - _022501B0 - 2 ; case 1 + .short _022501BE - _022501B0 - 2 ; case 2 + .short _022501BE - _022501B0 - 2 ; case 3 + .short _022501BE - _022501B0 - 2 ; case 4 +_022501BA: + mov r0, #1 + pop {r3, r4, r5, pc} +_022501BE: + ldr r5, _02250274 ; =0x00000445 + mov r0, #0 + strb r0, [r3, r5] + mov r1, #1 + add r0, r5, #2 + strb r1, [r3, r0] + add r0, r5, #1 + strb r1, [r3, r0] + sub r0, r5, #1 + mov r1, #2 + strb r1, [r3, r0] + ldr r0, _02250278 ; =0x0000085C + sub r5, #0xf + add r0, r3, r0 + add r1, r3, #0 + mov r2, #5 + add r3, r3, r5 + bl ov17_0224F30C + cmp r0, #1 + bne _0225026C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225026C +_022501F0: + ldr r0, _02250278 ; =0x0000085C + ldr r5, [r3, #0] + add r0, r3, r0 + ldr r3, _0225027C ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r5, r3] + sub r3, #0xb + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0225026C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225026C +_02250212: + ldr r5, _02250280 ; =0x0000043D + mov r0, #0 + strb r0, [r3, r5] + ldr r0, _02250278 ; =0x0000085C + sub r5, r5, #7 + add r0, r3, r0 + add r1, r3, #0 + mov r2, #9 + add r3, r3, r5 + bl ov17_0224F30C + cmp r0, #1 + bne _0225026C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225026C +_02250234: + ldr r0, _02250278 ; =0x0000085C + ldr r5, [r3, #0] + add r0, r3, r0 + ldr r3, _0225027C ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r5, r3] + sub r3, #0xb + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0225026C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225026C +_02250256: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x3c + ble _0225026C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225026C +_02250268: + mov r0, #1 + pop {r3, r4, r5, pc} +_0225026C: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250270: .word 0x00000121 +_02250274: .word 0x00000445 +_02250278: .word 0x0000085C +_0225027C: .word 0x00000127 +_02250280: .word 0x0000043D + thumb_func_end ov17_02250178 + + thumb_func_start ov17_02250284 +ov17_02250284: ; 0x02250284 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrh r0, [r5] + cmp r0, #4 + bhi _02250390 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225029C: ; jump table + .short _022502A6 - _0225029C - 2 ; case 0 + .short _02250318 - _0225029C - 2 ; case 1 + .short _0225033A - _0225029C - 2 ; case 2 + .short _0225035C - _0225029C - 2 ; case 3 + .short _0225037E - _0225029C - 2 ; case 4 +_022502A6: + ldr r1, [r4, #0] + ldr r0, _02250398 ; =0x00000121 + ldrb r0, [r1, r0] + cmp r0, #6 + bhi _022502CA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022502BC: ; jump table + .short _022502CA - _022502BC - 2 ; case 0 + .short _022502CE - _022502BC - 2 ; case 1 + .short _022502CE - _022502BC - 2 ; case 2 + .short _022502CA - _022502BC - 2 ; case 3 + .short _022502CA - _022502BC - 2 ; case 4 + .short _022502CE - _022502BC - 2 ; case 5 + .short _022502CE - _022502BC - 2 ; case 6 +_022502CA: + mov r0, #1 + pop {r3, r4, r5, pc} +_022502CE: + ldr r1, _0225039C ; =0x00000445 + mov r0, #0 + strb r0, [r4, r1] + mov r2, #1 + add r0, r1, #2 + strb r2, [r4, r0] + add r0, r1, #1 + strb r2, [r4, r0] + add r0, r1, #0 + sub r0, #0x79 + ldrb r2, [r4, r0] + sub r0, r1, #7 + sub r1, #0x79 + strb r2, [r4, r0] + ldrb r0, [r4, r1] + bl sub_020958FC + ldr r3, _022503A0 ; =0x00000442 + add r0, r0, #1 + strb r0, [r4, r3] + add r0, r3, #2 + mov r1, #3 + strb r1, [r4, r0] + ldr r0, _022503A4 ; =0x0000085C + sub r3, #0xc + add r0, r4, r0 + add r1, r4, #0 + mov r2, #5 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250394 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250394 +_02250318: + ldr r0, _022503A4 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _022503A8 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250394 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250394 +_0225033A: + ldr r3, _022503AC ; =0x0000043D + mov r0, #1 + strb r0, [r4, r3] + ldr r0, _022503A4 ; =0x0000085C + sub r3, r3, #7 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #9 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250394 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250394 +_0225035C: + ldr r0, _022503A4 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _022503A8 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250394 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250394 +_0225037E: + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] + cmp r0, #0x5a + ble _02250394 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250394 +_02250390: + mov r0, #1 + pop {r3, r4, r5, pc} +_02250394: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250398: .word 0x00000121 +_0225039C: .word 0x00000445 +_022503A0: .word 0x00000442 +_022503A4: .word 0x0000085C +_022503A8: .word 0x00000127 +_022503AC: .word 0x0000043D + thumb_func_end ov17_02250284 + + thumb_func_start ov17_022503B0 +ov17_022503B0: ; 0x022503B0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrh r0, [r5] + cmp r0, #4 + bls _022503BE + b _022504C2 +_022503BE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022503CA: ; jump table + .short _022503D4 - _022503CA - 2 ; case 0 + .short _0225044A - _022503CA - 2 ; case 1 + .short _0225046C - _022503CA - 2 ; case 2 + .short _0225048E - _022503CA - 2 ; case 3 + .short _022504B0 - _022503CA - 2 ; case 4 +_022503D4: + ldr r1, [r4, #0] + ldr r0, _022504CC ; =0x00000121 + ldrb r0, [r1, r0] + cmp r0, #8 + bhi _022503FC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022503EA: ; jump table + .short _02250400 - _022503EA - 2 ; case 0 + .short _022503FC - _022503EA - 2 ; case 1 + .short _02250400 - _022503EA - 2 ; case 2 + .short _022503FC - _022503EA - 2 ; case 3 + .short _022503FC - _022503EA - 2 ; case 4 + .short _022503FC - _022503EA - 2 ; case 5 + .short _022503FC - _022503EA - 2 ; case 6 + .short _02250400 - _022503EA - 2 ; case 7 + .short _02250400 - _022503EA - 2 ; case 8 +_022503FC: + mov r0, #1 + pop {r3, r4, r5, pc} +_02250400: + ldr r1, _022504D0 ; =0x00000445 + mov r0, #0 + strb r0, [r4, r1] + mov r2, #1 + add r0, r1, #2 + strb r2, [r4, r0] + add r0, r1, #1 + strb r2, [r4, r0] + add r0, r1, #0 + sub r0, #0x79 + ldrb r2, [r4, r0] + sub r0, r1, #7 + sub r1, #0x79 + strb r2, [r4, r0] + ldrb r0, [r4, r1] + bl sub_020958FC + ldr r3, _022504D4 ; =0x00000442 + add r0, r0, #1 + strb r0, [r4, r3] + add r0, r3, #2 + mov r1, #4 + strb r1, [r4, r0] + ldr r0, _022504D8 ; =0x0000085C + sub r3, #0xc + add r0, r4, r0 + add r1, r4, #0 + mov r2, #5 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _022504C6 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _022504C6 +_0225044A: + ldr r0, _022504D8 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _022504DC ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _022504C6 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _022504C6 +_0225046C: + ldr r3, _022504E0 ; =0x0000043D + mov r0, #2 + strb r0, [r4, r3] + ldr r0, _022504D8 ; =0x0000085C + sub r3, r3, #7 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #9 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _022504C6 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _022504C6 +_0225048E: + ldr r0, _022504D8 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _022504DC ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _022504C6 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _022504C6 +_022504B0: + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] + cmp r0, #0xf + ble _022504C6 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _022504C6 +_022504C2: + mov r0, #1 + pop {r3, r4, r5, pc} +_022504C6: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022504CC: .word 0x00000121 +_022504D0: .word 0x00000445 +_022504D4: .word 0x00000442 +_022504D8: .word 0x0000085C +_022504DC: .word 0x00000127 +_022504E0: .word 0x0000043D + thumb_func_end ov17_022503B0 + + thumb_func_start ov17_022504E4 +ov17_022504E4: ; 0x022504E4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _022504F6 + cmp r0, #1 + beq _02250512 + b _02250534 +_022504F6: + ldr r0, _0225053C ; =0x0000085C + ldr r3, _02250540 ; =0x00000436 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #7 + add r3, r5, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250538 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250538 +_02250512: + ldr r0, _0225053C ; =0x0000085C + ldr r3, [r5, #0] + add r0, r5, r0 + ldr r5, _02250544 ; =0x00000127 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250538 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250538 +_02250534: + mov r0, #1 + pop {r3, r4, r5, pc} +_02250538: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225053C: .word 0x0000085C +_02250540: .word 0x00000436 +_02250544: .word 0x00000127 + thumb_func_end ov17_022504E4 + + thumb_func_start ov17_02250548 +ov17_02250548: ; 0x02250548 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldrh r0, [r5] + cmp r0, #3 + bhi _02250610 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02250560: ; jump table + .short _02250568 - _02250560 - 2 ; case 0 + .short _022505B0 - _02250560 - 2 ; case 1 + .short _022505D2 - _02250560 - 2 ; case 2 + .short _022505EE - _02250560 - 2 ; case 3 +_02250568: + ldr r1, _02250618 ; =0x00000445 + mov r0, #0 + strb r0, [r4, r1] + mov r2, #1 + add r0, r1, #2 + strb r2, [r4, r0] + add r0, r1, #1 + strb r2, [r4, r0] + add r0, r1, #0 + sub r0, #0xd + ldrb r2, [r4, r0] + sub r0, r1, #7 + sub r1, #0xd + strb r2, [r4, r0] + ldrb r0, [r4, r1] + bl sub_020958FC + ldr r3, _0225061C ; =0x00000442 + add r0, r0, #1 + strb r0, [r4, r3] + add r0, r3, #2 + mov r2, #5 + strb r2, [r4, r0] + ldr r0, _02250620 ; =0x0000085C + sub r3, #0xc + add r0, r4, r0 + add r1, r4, #0 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250614 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250614 +_022505B0: + ldr r0, _02250620 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _02250624 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250614 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250614 +_022505D2: + ldr r0, _02250620 ; =0x0000085C + ldr r3, _02250628 ; =0x00000436 + add r0, r4, r0 + add r1, r4, #0 + mov r2, #8 + add r3, r4, r3 + bl ov17_0224F30C + cmp r0, #1 + bne _02250614 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250614 +_022505EE: + ldr r0, _02250620 ; =0x0000085C + ldr r3, [r4, #0] + add r0, r4, r0 + ldr r4, _02250624 ; =0x00000127 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250614 + ldrh r0, [r5] + add r0, r0, #1 + strh r0, [r5] + b _02250614 +_02250610: + mov r0, #1 + pop {r3, r4, r5, pc} +_02250614: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250618: .word 0x00000445 +_0225061C: .word 0x00000442 +_02250620: .word 0x0000085C +_02250624: .word 0x00000127 +_02250628: .word 0x00000436 + thumb_func_end ov17_02250548 + + thumb_func_start ov17_0225062C +ov17_0225062C: ; 0x0225062C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r3, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _0225063E + cmp r0, #1 + beq _02250676 + b _02250698 +_0225063E: + ldr r5, _022506A0 ; =0x00000445 + mov r0, #0 + strb r0, [r3, r5] + add r1, r5, #2 + strb r0, [r3, r1] + add r1, r5, #1 + strb r0, [r3, r1] + add r1, r5, #0 + sub r1, #0x79 + ldrb r2, [r3, r1] + sub r1, r5, #7 + strb r2, [r3, r1] + sub r1, r5, #1 + strb r0, [r3, r1] + ldr r0, _022506A4 ; =0x0000085C + sub r5, #0xf + add r0, r3, r0 + add r1, r3, #0 + mov r2, #5 + add r3, r3, r5 + bl ov17_0224F30C + cmp r0, #1 + bne _0225069C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225069C +_02250676: + ldr r0, _022506A4 ; =0x0000085C + ldr r5, [r3, #0] + add r0, r3, r0 + ldr r3, _022506A8 ; =0x00000127 + sub r2, r3, #4 + ldrb r1, [r5, r3] + sub r3, #0xb + ldrb r2, [r5, r2] + ldrb r3, [r5, r3] + bl ov17_0224F4B8 + cmp r0, #1 + bne _0225069C + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0225069C +_02250698: + mov r0, #1 + pop {r3, r4, r5, pc} +_0225069C: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022506A0: .word 0x00000445 +_022506A4: .word 0x0000085C +_022506A8: .word 0x00000127 + thumb_func_end ov17_0225062C + + thumb_func_start ov17_022506AC +ov17_022506AC: ; 0x022506AC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r2, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _022506C2 + cmp r0, #1 + beq _022506DC + cmp r0, #2 + beq _022506FE + b _02250718 +_022506C2: + ldr r0, _0225073C ; =0x0000085C + add r1, r2, #0 + add r0, r2, r0 + mov r2, #0xa + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _02250736 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250736 +_022506DC: + ldr r0, _0225073C ; =0x0000085C + ldr r3, [r2, #0] + ldr r5, _02250740 ; =0x00000127 + add r0, r2, r0 + sub r2, r5, #4 + ldrb r1, [r3, r5] + sub r5, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r5] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250736 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250736 +_022506FE: + ldr r0, _0225073C ; =0x0000085C + add r1, r2, #0 + add r0, r2, r0 + mov r2, #4 + mov r3, #0 + bl ov17_0224F30C + cmp r0, #1 + bne _02250736 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02250736 +_02250718: + ldr r0, _0225073C ; =0x0000085C + ldr r3, [r2, #0] + ldr r4, _02250740 ; =0x00000127 + add r0, r2, r0 + sub r2, r4, #4 + ldrb r1, [r3, r4] + sub r4, #0xb + ldrb r2, [r3, r2] + ldrb r3, [r3, r4] + bl ov17_0224F4B8 + cmp r0, #1 + bne _02250736 + mov r0, #3 + pop {r3, r4, r5, pc} +_02250736: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0225073C: .word 0x0000085C +_02250740: .word 0x00000127 + thumb_func_end ov17_022506AC + + .rodata + + + .global Unk_ov17_02254AA4 +Unk_ov17_02254AA4: ; 0x02254AA4 + .incbin "incbin/overlay17_rodata.bin", 0x1D18, 0x1D28 - 0x1D18 + + .global Unk_ov17_02254AB4 +Unk_ov17_02254AB4: ; 0x02254AB4 + .incbin "incbin/overlay17_rodata.bin", 0x1D28, 0x1D38 - 0x1D28 + + .global Unk_ov17_02254AC4 +Unk_ov17_02254AC4: ; 0x02254AC4 + .incbin "incbin/overlay17_rodata.bin", 0x1D38, 0x1D4C - 0x1D38 + + .global Unk_ov17_02254AD8 +Unk_ov17_02254AD8: ; 0x02254AD8 + .incbin "incbin/overlay17_rodata.bin", 0x1D4C, 0x1D64 - 0x1D4C + + .global Unk_ov17_02254AF0 +Unk_ov17_02254AF0: ; 0x02254AF0 + .incbin "incbin/overlay17_rodata.bin", 0x1D64, 0x1D80 - 0x1D64 + + .global Unk_ov17_02254B0C +Unk_ov17_02254B0C: ; 0x02254B0C + .incbin "incbin/overlay17_rodata.bin", 0x1D80, 0x1DA0 - 0x1D80 + + .global Unk_ov17_02254B2C +Unk_ov17_02254B2C: ; 0x02254B2C + .incbin "incbin/overlay17_rodata.bin", 0x1DA0, 0x1DC8 - 0x1DA0 + + .global Unk_ov17_02254B54 +Unk_ov17_02254B54: ; 0x02254B54 + .incbin "incbin/overlay17_rodata.bin", 0x1DC8, 0x1DF4 - 0x1DC8 + + .global Unk_ov17_02254B80 +Unk_ov17_02254B80: ; 0x02254B80 + .incbin "incbin/overlay17_rodata.bin", 0x1DF4, 0x54 + diff --git a/asm/ov17_02250744.s b/asm/ov17_02250744.s new file mode 100644 index 000000000..1a16d9b22 --- /dev/null +++ b/asm/ov17_02250744.s @@ -0,0 +1,2889 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02250744 +ov17_02250744: ; 0x02250744 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r5, #0 + mov r4, #0 + add r7, #0xd8 + b _022507B6 +_02250752: + mov r0, #0xf3 + add r1, r5, r4 + lsl r0, r0, #2 + ldrb r6, [r1, r0] + lsl r0, r6, #4 + add r0, r5, r0 + add r0, #0xd8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0225076A + bl sub_02022974 +_0225076A: + mov r1, #0x32 + mov r0, #0x18 + lsl r1, r1, #6 + bl sub_02018144 + lsl r2, r6, #4 + add r1, r5, r2 + add r1, #0xd8 + str r0, [r1, #0] + add r0, r7, r2 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #6 + ldr r1, _022507C0 ; =0x02254BF4 + mul r0, r4 + ldrsh r1, [r1, r0] + lsl r2, r6, #2 + str r1, [sp, #8] + ldr r1, _022507C0 ; =0x02254BF4 + add r0, r1, r0 + mov r1, #2 + ldrsh r1, [r0, r1] + str r1, [sp, #0xc] + mov r1, #4 + ldrsh r0, [r0, r1] + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r3, [r5, #0x10] + ldr r0, [r5, #0x14] + ldr r2, [r3, r2] + mov r3, #2 + bl sub_02095484 + lsl r1, r6, #2 + add r1, r5, r1 + str r0, [r1, #0x18] + add r4, r4, #1 +_022507B6: + cmp r4, #4 + blt _02250752 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_022507C0: .word 0x02254BF4 + thumb_func_end ov17_02250744 + + thumb_func_start ov17_022507C4 +ov17_022507C4: ; 0x022507C4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_022507CE: + ldr r0, [r5, #8] + bl sub_02007DC8 + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xc8 + add r6, r6, #1 + str r7, [r0, #0] + add r5, r5, #4 + add r4, #0x10 + cmp r6, #4 + blt _022507CE + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_022507C4 + + thumb_func_start ov17_022507F0 +ov17_022507F0: ; 0x022507F0 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r1, #0 + add r4, r0, #0 + add r5, r2, #0 + cmp r6, #0 + beq _02250806 + cmp r5, #0 + bne _02250806 + bl sub_02022974 +_02250806: + cmp r6, #3 + bhi _022508DC + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02250816: ; jump table + .short _022508E0 - _02250816 - 2 ; case 0 + .short _0225081E - _02250816 - 2 ; case 1 + .short _02250842 - _02250816 - 2 ; case 2 + .short _02250886 - _02250816 - 2 ; case 3 +_0225081E: + mov r2, #0x12 + lsl r2, r2, #4 + ldr r3, [r4, #0] + add r1, r2, #1 + ldrb r0, [r3, r2] + add r2, #0x51 + ldrb r1, [r3, r1] + ldrb r2, [r3, r2] + bl sub_02095848 + add r4, #0xc8 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200BBA8 + add sp, #8 + pop {r4, r5, r6, pc} +_02250842: + ldrb r6, [r5] + ldr r3, [r4, #0] + mov r0, #1 + lsl r2, r6, #2 + str r0, [sp] + mov r0, #2 + add r2, r3, r2 + add r6, r3, r6 + mov r3, #0x42 + str r0, [sp, #4] + add r0, r4, #0 + lsl r3, r3, #2 + add r0, #0xc8 + add r2, #0xe8 + ldrb r3, [r6, r3] + ldr r0, [r0, #0] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200B48C + ldrb r0, [r5] + ldr r1, [r4, #0x10] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r4, #0xc8 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200B5CC + add sp, #8 + pop {r4, r5, r6, pc} +_02250886: + mov r1, #0 + str r1, [sp] + mov r3, #1 + str r3, [sp, #4] + add r0, r4, #0 + add r0, #0xc8 + ldrb r2, [r5, #4] + ldr r0, [r0, #0] + bl sub_0200B60C + ldrb r6, [r5] + ldr r3, [r4, #0] + mov r1, #1 + lsl r2, r6, #2 + add r2, r3, r2 + add r6, r3, r6 + mov r3, #0x42 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, r4, #0 + lsl r3, r3, #2 + add r0, #0xc8 + add r2, #0xe8 + ldrb r3, [r6, r3] + ldr r0, [r0, #0] + ldr r2, [r2, #0] + bl sub_0200B48C + ldrb r0, [r5] + ldr r1, [r4, #0x10] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02076B10 + add r4, #0xc8 + add r2, r0, #0 + ldr r0, [r4, #0] + mov r1, #2 + bl sub_0200B5CC + add sp, #8 + pop {r4, r5, r6, pc} +_022508DC: + bl sub_02022974 +_022508E0: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov17_022507F0 + + thumb_func_start ov17_022508E4 +ov17_022508E4: ; 0x022508E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0] + ldr r0, _02250960 ; =0x00000171 + add r7, r2, #0 + ldrb r0, [r1, r0] + str r3, [sp, #0xc] + cmp r0, #0 + bne _02250906 + ldr r0, _02250964 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027AC0 + add r4, r0, #0 + b _02250908 +_02250906: + mov r4, #1 +_02250908: + add r0, r6, #0 + add r1, r7, #0 + bl sub_0200B1EC + add r6, r0, #0 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x28] + add r0, r5, #0 + bl ov17_022507F0 + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xc8 + add r1, #0xcc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x34 + mov r1, #0xff + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + add r2, r5, #0 + add r0, r5, #0 + str r3, [sp, #8] + add r2, #0xcc + ldr r2, [r2, #0] + add r0, #0x34 + mov r1, #1 + bl sub_0201D738 + mov r1, #0xe6 + lsl r1, r1, #2 + strb r0, [r5, r1] + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02250960: .word 0x00000171 +_02250964: .word 0x00001988 + thumb_func_end ov17_022508E4 + + thumb_func_start ov17_02250968 +ov17_02250968: ; 0x02250968 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #7 + blo _0225097A + bl sub_02022974 +_0225097A: + lsl r3, r4, #2 + ldr r2, _02250994 ; =0x02254C0C + add r0, r5, #0 + ldr r4, _02250998 ; =0x02254C0E + ldrh r2, [r2, r3] + str r6, [sp] + add r5, #0xc4 + ldrb r3, [r4, r3] + ldr r1, [r5, #0] + bl ov17_022508E4 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02250994: .word 0x02254C0C +_02250998: .word 0x02254C0E + thumb_func_end ov17_02250968 + + thumb_func_start ov17_0225099C +ov17_0225099C: ; 0x0225099C + mov r1, #0xe6 + lsl r1, r1, #2 + ldr r3, _022509A8 ; =sub_0201D724 + ldrb r0, [r0, r1] + bx r3 + nop +_022509A8: .word sub_0201D724 + thumb_func_end ov17_0225099C + + thumb_func_start ov17_022509AC +ov17_022509AC: ; 0x022509AC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x2d + mov r1, #0x18 + bl sub_02006C24 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + mov r1, #0x18 + str r1, [sp, #0xc] + ldr r2, [r5, #0x30] + mov r1, #0x17 + mov r3, #3 + add r4, r0, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x18 + str r0, [sp, #0xc] + ldr r2, [r5, #0x30] + add r0, r4, #0 + mov r1, #0x16 + mov r3, #3 + bl sub_0200710C + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_02019EBC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0x2d + mov r2, #0x23 + mov r3, #0x18 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0x2d + mov r2, #0x24 + mov r3, #0x18 + bl sub_02003050 + ldr r1, [r5, #0] + ldr r0, _02250A80 ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027B50 + add r6, r0, #0 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r1, #1 + ldr r0, [r5, #0x30] + add r2, r1, #0 + mov r3, #0xf + bl sub_0200DD0C + add r0, r6, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0x26 + mov r3, #0x18 + bl sub_02003050 + ldr r0, [r5, #0x30] + mov r1, #2 + bl sub_02019EBC + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02250A80: .word 0x00001988 + thumb_func_end ov17_022509AC + + thumb_func_start ov17_02250A84 +ov17_02250A84: ; 0x02250A84 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02250A84 + + thumb_func_start ov17_02250A88 +ov17_02250A88: ; 0x02250A88 + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, _02250AD0 ; =0x000080EA + add r2, r4, #0 + str r0, [sp] + sub r3, r0, #1 + str r3, [sp, #4] + str r3, [sp, #8] + add r2, #0xd0 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x2c] + ldr r2, [r2, #0] + bl ov17_0223F560 + ldr r0, _02250AD0 ; =0x000080EA + mov r1, #0xc8 + str r0, [sp] + sub r3, r0, #1 + str r3, [sp, #4] + str r3, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + mov r0, #3 + str r0, [sp, #0x14] + ldr r0, _02250AD4 ; =0x0000C350 + add r1, #0x50 + str r0, [sp, #0x18] + add r0, r4, r1 + ldr r1, [r4, #0x28] + ldr r2, [r4, #0x2c] + bl ov17_0223F630 + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_02250AD0: .word 0x000080EA +_02250AD4: .word 0x0000C350 + thumb_func_end ov17_02250A88 + + thumb_func_start ov17_02250AD8 +ov17_02250AD8: ; 0x02250AD8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x46 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov17_0223F6C4 + ldr r1, _02250AFC ; =0x000080E9 + str r1, [sp] + ldr r0, [r4, #0x2c] + add r2, r1, #1 + add r3, r1, #0 + bl ov17_0223F5E8 + add sp, #4 + pop {r3, r4, pc} + nop +_02250AFC: .word 0x000080E9 + thumb_func_end ov17_02250AD8 + + thumb_func_start ov17_02250B00 +ov17_02250B00: ; 0x02250B00 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r6, r0, #0 + mov r0, #0x2d + mov r1, #0x18 + bl sub_02006C24 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + mov r1, #0x18 + str r1, [sp, #0xc] + ldr r2, [r6, #0x30] + mov r1, #0x1b + mov r3, #3 + str r0, [sp, #0x14] + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + ldr r2, [r6, #0x30] + mov r1, #0x19 + mov r3, #3 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + ldr r2, [r6, #0x30] + mov r1, #0x1a + mov r3, #2 + bl sub_0200710C + ldr r0, [r6, #0x30] + mov r1, #1 + bl sub_02019EBC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0x2d + mov r2, #0x27 + mov r3, #0x18 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0x2d + mov r2, #0x24 + mov r3, #0x18 + bl sub_02003050 + ldr r1, [r6, #0] + ldr r0, _02250CDC ; =0x00001988 + ldr r0, [r1, r0] + bl sub_02027B50 + add r4, r0, #0 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r1, #1 + ldr r0, [r6, #0x30] + add r2, r1, #0 + mov r3, #0xf + bl sub_0200DD0C + add r0, r4, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #0x26 + mov r3, #0x18 + bl sub_02003050 + mov r0, #0xc + mov r1, #0x18 + bl sub_02023790 + add r4, r6, #0 + add r7, r0, #0 + mov r5, #0 + add r4, #0x34 +_02250BEC: + mov r0, #0xf3 + add r1, r6, r5 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + ldr r1, [r6, #0x10] + add r2, r7, #0 + lsl r0, r0, #2 + str r0, [sp, #0x10] + ldr r0, [r1, r0] + mov r1, #0x77 + bl sub_02074470 + add r0, r5, #1 + lsl r0, r0, #4 + str r0, [sp, #0x18] + add r0, r4, r0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #5 + lsl r0, r0, #4 + str r0, [sp, #0x1c] + add r0, r4, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #3 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02250CE0 ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + add r2, r7, #0 + add r0, r4, r0 + add r3, r1, #0 + bl sub_0201D78C + mov r0, #3 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _02250CE0 ; =0x00010200 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r3, [r6, #0] + ldr r0, [sp, #0x1c] + add r2, r3, r2 + add r2, #0xe8 + mov r1, #0 + ldr r2, [r2, #0] + add r0, r4, r0 + add r3, r1, #0 + bl sub_0201D78C + add r5, r5, #1 + cmp r5, #4 + blt _02250BEC + add r0, r7, #0 + bl sub_020237BC + mov r3, #1 + lsl r3, r3, #0x1a + add r2, r3, #0 + ldr r1, [r3, #0] + ldr r0, _02250CE4 ; =0xFFFF1FFF + add r2, #0x48 + and r1, r0 + mov r0, #6 + lsl r0, r0, #0xc + orr r0, r1 + str r0, [r3, #0] + ldrh r1, [r2] + mov r0, #0x3f + mov r4, #0x1f + bic r1, r0 + add r5, r1, #0 + orr r5, r4 + mov r1, #0x20 + orr r5, r1 + strh r5, [r2] + ldrh r6, [r2] + ldr r5, _02250CE8 ; =0xFFFFC0FF + lsl r4, r4, #8 + and r5, r6 + orr r5, r4 + lsl r4, r1, #8 + orr r4, r5 + strh r4, [r2] + add r2, r3, #0 + add r2, #0x4a + ldrh r4, [r2] + bic r4, r0 + mov r0, #0x1b + orr r0, r4 + orr r0, r1 + strh r0, [r2] + add r0, r3, #0 + mov r2, #0xff + add r0, #0x40 + strh r2, [r0] + add r0, r3, #0 + mov r1, #0 + add r0, #0x44 + strh r1, [r0] + add r0, r3, #0 + add r0, #0x42 + strh r2, [r0] + add r3, #0x46 + ldr r0, [sp, #0x14] + strh r1, [r3] + bl sub_02006CA8 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02250CDC: .word 0x00001988 +_02250CE0: .word 0x00010200 +_02250CE4: .word 0xFFFF1FFF +_02250CE8: .word 0xFFFFC0FF + thumb_func_end ov17_02250B00 + + thumb_func_start ov17_02250CEC +ov17_02250CEC: ; 0x02250CEC + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r3, #0 + mov r0, #1 + str r3, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + mov r1, #1 + mov r2, #2 + bl sub_020038B0 + mov r3, #0 + mov r0, #1 + str r3, [sp] + lsl r0, r0, #8 + add r4, #0xd0 + str r0, [sp, #4] + ldr r0, [r4, #0] + mov r1, #3 + mov r2, #2 + bl sub_020038B0 + add sp, #8 + pop {r4, pc} + thumb_func_end ov17_02250CEC + + thumb_func_start ov17_02250D24 +ov17_02250D24: ; 0x02250D24 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02250D24 + + thumb_func_start ov17_02250D28 +ov17_02250D28: ; 0x02250D28 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0x2e + mov r1, #0x18 + bl sub_02006C24 + add r4, r0, #0 + str r4, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _02250D88 ; =0x000080E9 + mov r1, #2 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + ldr r2, [r5, #0x28] + ldr r3, [r5, #0x2c] + bl sub_0200CDC4 + add r0, r5, #0 + add r1, r4, #0 + bl ov17_02250F68 + add r0, r5, #0 + bl ov17_02250DB0 + add r0, r5, #0 + add r1, r4, #0 + bl ov17_0225122C + add r0, r5, #0 + add r1, r4, #0 + bl ov17_02251344 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_02250D88: .word 0x000080E9 + thumb_func_end ov17_02250D28 + + thumb_func_start ov17_02250D8C +ov17_02250D8C: ; 0x02250D8C + push {r4, lr} + add r4, r0, #0 + bl ov17_02250EFC + add r0, r4, #0 + bl ov17_022512E0 + add r0, r4, #0 + bl ov17_02251544 + add r0, r4, #0 + bl ov17_02250FBC + add r0, r4, #0 + bl ov17_022513C0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02250D8C + + thumb_func_start ov17_02250DB0 +ov17_02250DB0: ; 0x02250DB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + add r5, r0, #0 + mov r0, #0x13 + mov r1, #0x18 + bl sub_02006C24 + str r0, [sp, #0x18] + bl sub_02079FD0 + ldr r1, [sp, #0x18] + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _02250EE4 ; =0x000080EB + mov r1, #2 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + ldr r2, [r5, #0x28] + ldr r3, [r5, #0x2c] + bl sub_0200CDC4 + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02250EE8 ; =0x000080EA + ldr r2, [sp, #0x18] + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + bl sub_0200CE24 + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02250EE8 ; =0x000080EA + ldr r2, [sp, #0x18] + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + bl sub_0200CE54 + ldr r4, _02250EEC ; =0x02254C5C + add r3, sp, #0x1c + mov r2, #6 +_02250E20: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02250E20 + ldr r0, [r4, #0] + mov r7, #0 + str r0, [r3, #0] + add r6, r7, #0 + add r4, r5, #0 +_02250E32: + ldr r0, [r5, #0] + ldr r0, [r0, r6] + bl sub_02079D80 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02250EE8 ; =0x000080EA + mov r2, #0x13 + add r0, r7, r0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + bl sub_0200D888 + ldr r0, _02250EE8 ; =0x000080EA + add r2, sp, #0x1c + add r0, r7, r0 + str r0, [sp, #0x30] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + bl sub_0200CE6C + mov r1, #0x4e + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r5, #0] + ldr r0, [r0, r6] + bl sub_02079FC4 + add r1, r0, #0 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl sub_02021F24 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D330 + add r7, r7, #1 + add r6, r6, #4 + add r4, r4, #4 + cmp r7, #4 + blt _02250E32 + ldr r4, _02250EF0 ; =0x02254BD4 + mov r6, #0 + mov r7, #2 +_02250EA4: + mov r0, #0xf3 + add r1, r5, r6 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + ldrsh r2, [r4, r7] + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + ldrsh r1, [r4, r1] + bl sub_0200D4C4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _02250EA4 + ldr r0, _02250EF4 ; =ov17_02250F4C + ldr r2, _02250EF8 ; =0x0000C738 + add r1, r5, #0 + bl sub_0200D9E8 + mov r1, #0x4d + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [sp, #0x18] + bl sub_02006CA8 + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + nop +_02250EE4: .word 0x000080EB +_02250EE8: .word 0x000080EA +_02250EEC: .word 0x02254C5C +_02250EF0: .word 0x02254BD4 +_02250EF4: .word ov17_02250F4C +_02250EF8: .word 0x0000C738 + thumb_func_end ov17_02250DB0 + + thumb_func_start ov17_02250EFC +ov17_02250EFC: ; 0x02250EFC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x2c] + ldr r1, _02250F44 ; =0x000080EA + bl sub_0200D090 + ldr r0, [r6, #0x2c] + ldr r1, _02250F44 ; =0x000080EA + bl sub_0200D0A0 + ldr r0, [r6, #0x2c] + ldr r1, _02250F48 ; =0x000080EB + bl sub_0200D080 + mov r7, #0x4e + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_02250F20: + ldr r1, _02250F44 ; =0x000080EA + ldr r0, [r6, #0x2c] + add r1, r4, r1 + bl sub_0200D070 + ldr r0, [r5, r7] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02250F20 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02250F44: .word 0x000080EA +_02250F48: .word 0x000080EB + thumb_func_end ov17_02250EFC + + thumb_func_start ov17_02250F4C +ov17_02250F4C: ; 0x02250F4C + push {r4, r5, r6, lr} + mov r6, #0x4e + add r5, r1, #0 + mov r4, #0 + lsl r6, r6, #2 +_02250F56: + ldr r0, [r5, r6] + bl sub_0200D330 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02250F56 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02250F4C + + thumb_func_start ov17_02250F68 +ov17_02250F68: ; 0x02250F68 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _02250FB4 ; =0x000080EF + add r4, r1, #0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + add r2, r4, #0 + mov r3, #0x66 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _02250FB8 ; =0x000080EC + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x65 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _02250FB8 ; =0x000080EC + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x64 + bl sub_0200CE54 + add sp, #0xc + pop {r4, r5, pc} + nop +_02250FB4: .word 0x000080EF +_02250FB8: .word 0x000080EC + thumb_func_end ov17_02250F68 + + thumb_func_start ov17_02250FBC +ov17_02250FBC: ; 0x02250FBC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + ldr r1, _02250FDC ; =0x000080EF + bl sub_0200D070 + ldr r0, [r4, #0x2c] + ldr r1, _02250FE0 ; =0x000080EC + bl sub_0200D090 + ldr r0, [r4, #0x2c] + ldr r1, _02250FE0 ; =0x000080EC + bl sub_0200D0A0 + pop {r4, pc} + nop +_02250FDC: .word 0x000080EF +_02250FE0: .word 0x000080EC + thumb_func_end ov17_02250FBC + + thumb_func_start ov17_02250FE4 +ov17_02250FE4: ; 0x02250FE4 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x18 + mov r1, #8 + bl sub_02018144 + mov r1, #0 + mov r2, #8 + add r6, r0, #0 + bl sub_020C4CF4 + str r5, [r6, #0] + mov r4, #0 +_02250FFE: + add r0, r5, #0 + bl ov17_02251070 + add r4, r4, #1 + cmp r4, #8 + blt _02250FFE + ldr r0, _02251018 ; =ov17_0225102C + ldr r2, _0225101C ; =0x0000C35A + add r1, r6, #0 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + nop +_02251018: .word ov17_0225102C +_0225101C: .word 0x0000C35A + thumb_func_end ov17_02250FE4 + + thumb_func_start ov17_02251020 +ov17_02251020: ; 0x02251020 + ldr r1, _02251028 ; =0x0000127D + mov r2, #1 + strb r2, [r0, r1] + bx lr + ; .align 2, 0 +_02251028: .word 0x0000127D + thumb_func_end ov17_02251020 + + thumb_func_start ov17_0225102C +ov17_0225102C: ; 0x0225102C + push {r4, lr} + add r4, r0, #0 + ldr r3, [r1, #0] + ldr r0, _0225106C ; =0x0000127D + ldrb r2, [r3, r0] + cmp r2, #1 + bne _02251048 + add r0, r1, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} +_02251048: + add r0, r0, #1 + ldrb r0, [r3, r0] + cmp r0, #0x30 + bhs _02251068 + mov r0, #4 + ldrsh r2, [r1, r0] + add r2, r2, #1 + strh r2, [r1, #4] + ldrsh r0, [r1, r0] + cmp r0, #4 + ble _02251068 + mov r0, #0 + strh r0, [r1, #4] + ldr r0, [r1, #0] + bl ov17_02251070 +_02251068: + pop {r4, pc} + nop +_0225106C: .word 0x0000127D + thumb_func_end ov17_0225102C + + thumb_func_start ov17_02251070 +ov17_02251070: ; 0x02251070 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x18 + mov r1, #0x20 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020C4CF4 + str r5, [r4, #0] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + ldr r2, _02251130 ; =0x02254C28 + bl sub_0200CE6C + str r0, [r4, #4] + ldr r0, [r5, #0] + bl sub_02094E98 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + ldr r0, [r5, #0] + add r6, #0x14 + bl sub_02094E98 + mov r1, #0x30 + bl sub_020E1F6C + add r2, r1, #0 + lsl r0, r6, #8 + lsl r1, r6, #0x10 + sub r2, #0x10 + str r0, [r4, #8] + lsl r0, r2, #8 + str r0, [r4, #0xc] + lsl r2, r2, #0x10 + ldr r0, [r4, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r5, #0] + bl sub_02094E98 + lsr r2, r0, #0x1f + lsl r1, r0, #0x17 + sub r1, r1, r2 + mov r0, #0x17 + ror r1, r0 + add r0, r2, r1 + add r0, #0x60 + str r0, [r4, #0x14] + ldr r0, [r5, #0] + bl sub_02094E98 + mov r1, #3 + lsl r1, r1, #8 + bl sub_020E1F6C + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + str r0, [r4, #0x18] + ldr r0, [r5, #0] + bl sub_02094E98 + mov r1, #0x18 + bl sub_020E1F6C + add r1, #0x10 + strh r1, [r4, #0x12] + ldr r0, [r5, #0] + bl sub_02094E98 + mov r1, #9 + bl sub_020E1F6C + ldr r0, [r4, #4] + bl sub_0200D364 + ldr r0, [r4, #4] + bl sub_0200D330 + ldr r0, _02251134 ; =ov17_02251140 + ldr r2, _02251138 ; =0x0000C35B + add r1, r4, #0 + bl sub_0200D9E8 + ldr r0, _0225113C ; =0x0000127E + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} + nop +_02251130: .word 0x02254C28 +_02251134: .word ov17_02251140 +_02251138: .word 0x0000C35B +_0225113C: .word 0x0000127E + thumb_func_end ov17_02251070 + + thumb_func_start ov17_02251140 +ov17_02251140: ; 0x02251140 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, _02251224 ; =0x0000127D + ldrb r1, [r0, r1] + cmp r1, #1 + beq _02251174 + ldr r2, [r4, #0xc] + asr r1, r2, #7 + lsr r1, r1, #0x18 + add r1, r2, r1 + asr r1, r1, #8 + cmp r1, #0xd0 + bgt _02251174 + mov r2, #0x10 + ldrsh r1, [r4, r2] + ldr r3, [r4, #8] + sub r2, #0x20 + add r3, r3, r1 + asr r1, r3, #7 + lsr r1, r1, #0x18 + add r1, r3, r1 + asr r1, r1, #8 + cmp r1, r2 + bge _02251190 +_02251174: + ldr r1, _02251228 ; =0x0000127E + ldrb r2, [r0, r1] + sub r2, r2, #1 + strb r2, [r0, r1] + ldr r0, [r4, #4] + bl sub_0200D0F4 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} +_02251190: + ldr r2, [r4, #0x1c] + ldr r1, [r4, #0x18] + add r0, r4, #0 + add r2, r2, r1 + mov r1, #0x5a + lsl r1, r1, #0xa + add r0, #0x1c + str r2, [r4, #0x1c] + cmp r2, r1 + blt _022511AA + ldr r2, [r0, #0] + sub r1, r2, r1 + str r1, [r0, #0] +_022511AA: + mov r0, #0x12 + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x1c] + lsl r5, r0, #0xc + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + lsl r0, r0, #8 + lsr r0, r0, #0x10 + bl sub_0201D15C + asr r1, r0, #0x1f + asr r3, r5, #0x1f + add r2, r5, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + strh r0, [r4, #0x10] + ldr r1, [r4, #8] + ldr r0, [r4, #0x14] + sub r0, r1, r0 + str r0, [r4, #8] + mov r0, #0xa + ldr r1, [r4, #0xc] + lsl r0, r0, #6 + add r2, r1, r0 + str r2, [r4, #0xc] + ldr r3, [r4, #8] + ldr r0, [r4, #4] + asr r1, r3, #7 + lsr r1, r1, #0x18 + add r1, r3, r1 + asr r3, r1, #8 + mov r1, #0x10 + ldrsh r1, [r4, r1] + add r1, r3, r1 + asr r3, r2, #7 + lsr r3, r3, #0x18 + add r3, r2, r3 + lsl r1, r1, #0x10 + lsl r2, r3, #8 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #4] + bl sub_0200D330 + pop {r3, r4, r5, pc} + nop +_02251224: .word 0x0000127D +_02251228: .word 0x0000127E + thumb_func_end ov17_02251140 + + thumb_func_start ov17_0225122C +ov17_0225122C: ; 0x0225122C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022512D0 ; =0x000080EE + add r4, r1, #0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + add r2, r4, #0 + mov r3, #0x54 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022512D4 ; =0x000080EB + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x53 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022512D4 ; =0x000080EB + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x52 + bl sub_0200CE54 + mov r7, #0x52 + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #2 +_0225127A: + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + ldr r2, _022512D8 ; =0x02254C90 + bl sub_0200CE6C + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + bl sub_0200D330 + ldr r0, [r4, r7] + mov r1, #0 + bl sub_0200D3F4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0225127A + ldr r4, _022512DC ; =0x02254BE4 + mov r6, #0 + mov r7, #2 +_022512A8: + mov r0, #0xf3 + add r1, r5, r6 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + ldrsh r2, [r4, r7] + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + ldrsh r1, [r4, r1] + bl sub_0200D4C4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _022512A8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022512D0: .word 0x000080EE +_022512D4: .word 0x000080EB +_022512D8: .word 0x02254C90 +_022512DC: .word 0x02254BE4 + thumb_func_end ov17_0225122C + + thumb_func_start ov17_022512E0 +ov17_022512E0: ; 0x022512E0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x2c] + ldr r1, _02251314 ; =0x000080EE + bl sub_0200D070 + ldr r0, [r5, #0x2c] + ldr r1, _02251318 ; =0x000080EB + bl sub_0200D090 + ldr r0, [r5, #0x2c] + ldr r1, _02251318 ; =0x000080EB + bl sub_0200D0A0 + mov r6, #0x52 + mov r4, #0 + lsl r6, r6, #2 +_02251302: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02251302 + pop {r4, r5, r6, pc} + nop +_02251314: .word 0x000080EE +_02251318: .word 0x000080EB + thumb_func_end ov17_022512E0 + + thumb_func_start ov17_0225131C +ov17_0225131C: ; 0x0225131C + push {r3, r4, r5, lr} + mov r3, #0x52 + lsl r3, r3, #2 + lsl r4, r1, #2 + add r5, r0, r3 + ldr r0, [r5, r4] + add r1, r2, #0 + bl sub_0200D364 + ldr r0, [r5, r4] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, _02251340 ; =0x000005DD + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_02251340: .word 0x000005DD + thumb_func_end ov17_0225131C + + thumb_func_start ov17_02251344 +ov17_02251344: ; 0x02251344 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + str r4, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _022513B4 ; =0x000080EC + mov r1, #2 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + ldr r2, [r5, #0x28] + ldr r3, [r5, #0x2c] + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _022513B8 ; =0x000080F0 + add r2, r4, #0 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x57 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _022513BC ; =0x000080ED + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x56 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _022513BC ; =0x000080ED + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x28] + ldr r1, [r5, #0x2c] + mov r3, #0x55 + bl sub_0200CE54 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_022513B4: .word 0x000080EC +_022513B8: .word 0x000080F0 +_022513BC: .word 0x000080ED + thumb_func_end ov17_02251344 + + thumb_func_start ov17_022513C0 +ov17_022513C0: ; 0x022513C0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + ldr r1, _022513E8 ; =0x000080EC + bl sub_0200D080 + ldr r0, [r4, #0x2c] + ldr r1, _022513EC ; =0x000080F0 + bl sub_0200D070 + ldr r0, [r4, #0x2c] + ldr r1, _022513F0 ; =0x000080ED + bl sub_0200D090 + ldr r0, [r4, #0x2c] + ldr r1, _022513F0 ; =0x000080ED + bl sub_0200D0A0 + pop {r4, pc} + nop +_022513E8: .word 0x000080EC +_022513EC: .word 0x000080F0 +_022513F0: .word 0x000080ED + thumb_func_end ov17_022513C0 + + thumb_func_start ov17_022513F4 +ov17_022513F4: ; 0x022513F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + str r3, [sp] + cmp r2, #0 + beq _0225140A + cmp r2, #1 + beq _0225141E + cmp r2, #2 + beq _02251438 + b _02251458 +_0225140A: + mov r0, #1 + str r0, [sp, #0x14] + mov r0, #0x56 + lsl r0, r0, #2 + add r2, r7, r0 + mov r0, #0x30 + mul r0, r1 + mov r6, #0 + add r4, r2, r0 + b _02251460 +_0225141E: + lsl r0, r1, #1 + add r2, r7, r0 + ldr r0, _0225153C ; =0x0000041E + ldrsh r6, [r2, r0] + mov r0, #0x11 + str r0, [sp, #0x14] + mov r0, #0x86 + lsl r0, r0, #2 + add r2, r7, r0 + mov r0, #0x30 + mul r0, r1 + add r4, r2, r0 + b _02251460 +_02251438: + lsl r0, r1, #1 + add r3, r7, r0 + ldr r0, _0225153C ; =0x0000041E + ldrsh r2, [r3, r0] + add r0, #8 + ldrsh r0, [r3, r0] + add r6, r2, r0 + mov r0, #0x21 + str r0, [sp, #0x14] + mov r0, #0xb6 + lsl r0, r0, #2 + add r2, r7, r0 + mov r0, #0x30 + mul r0, r1 + add r4, r2, r0 + b _02251460 +_02251458: + bl sub_02022974 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02251460: + ldr r0, [sp, #0x30] + add r6, #0x30 + lsl r0, r0, #5 + str r0, [sp, #0x10] + add r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp] + asr r0, r0, #3 + lsr r1, r0, #0x1c + ldr r0, [sp] + add r1, r0, r1 + asr r0, r1, #4 + str r0, [sp, #0xc] + ldr r0, [sp] + lsr r2, r0, #0x1f + lsl r1, r0, #0x1c + sub r1, r1, r2 + mov r0, #0x1c + ror r1, r0 + add r0, r2, r1 + beq _02251490 + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] +_02251490: + ldr r0, [sp, #0xc] + cmp r0, #0xc + ble _0225149A + bl sub_02022974 +_0225149A: + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + cmp r0, #0 + ble _022514C6 + add r5, r4, #0 +_022514A6: + ldr r0, [r5, #0] + cmp r0, #0 + bne _022514B8 + ldr r0, [r7, #0x28] + ldr r1, [r7, #0x2c] + ldr r2, _02251540 ; =0x02254CC4 + bl sub_0200CE6C + str r0, [r5, #0] +_022514B8: + ldr r0, [sp, #8] + add r5, r5, #4 + add r1, r0, #1 + ldr r0, [sp, #0xc] + str r1, [sp, #8] + cmp r1, r0 + blt _022514A6 +_022514C6: + ldr r0, [sp] + mov r7, #0 + cmp r0, #0x10 + blt _022514EE + ldr r0, [sp, #0x14] + add r5, r4, #0 + str r0, [sp, #4] + add r0, #0xf + str r0, [sp, #4] +_022514D8: + ldr r0, [r5, #0] + ldr r1, [sp, #4] + bl sub_0200D364 + ldr r0, [sp] + add r5, r5, #4 + sub r0, #0x10 + add r7, r7, #1 + str r0, [sp] + cmp r0, #0x10 + bge _022514D8 +_022514EE: + ldr r0, [sp] + cmp r0, #0 + ble _0225150A + ldr r0, [sp, #0xc] + cmp r7, r0 + bge _0225150A + ldr r2, [sp, #0x14] + ldr r1, [sp] + lsl r0, r7, #2 + add r1, r2, r1 + ldr r0, [r4, r0] + sub r1, r1, #1 + bl sub_0200D364 +_0225150A: + ldr r0, [sp, #0xc] + mov r5, #0 + cmp r0, #0 + ble _02251536 + ldr r0, [sp, #0x10] + lsl r0, r0, #0x10 + asr r7, r0, #0x10 +_02251518: + lsl r1, r6, #0x10 + ldr r0, [r4, #0] + asr r1, r1, #0x10 + add r2, r7, #0 + bl sub_0200D4C4 + ldr r0, [r4, #0] + bl sub_0200D330 + ldr r0, [sp, #0xc] + add r5, r5, #1 + add r6, #0x10 + add r4, r4, #4 + cmp r5, r0 + blt _02251518 +_02251536: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225153C: .word 0x0000041E +_02251540: .word 0x02254CC4 + thumb_func_end ov17_022513F4 + + thumb_func_start ov17_02251544 +ov17_02251544: ; 0x02251544 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r7, #0x86 + lsl r7, r7, #2 + str r0, [sp] + mov r0, #0 + add r6, r7, #0 + str r0, [sp, #4] + sub r6, #0xc0 +_02251556: + ldr r5, [sp] + mov r4, #0 +_0225155A: + ldr r0, [r5, r6] + cmp r0, #0 + beq _02251564 + bl sub_0200D0F4 +_02251564: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0225156E + bl sub_0200D0F4 +_0225156E: + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0225157C + bl sub_0200D0F4 +_0225157C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xc + blt _0225155A + ldr r0, [sp] + add r0, #0x30 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #4 + blt _02251556 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_02251544 + + thumb_func_start ov17_02251598 +ov17_02251598: ; 0x02251598 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + mov r0, #0 + strb r0, [r7] + mov r0, #0x18 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r5, [r4, #0] + str r7, [r4, #4] + cmp r6, #0 + ldr r2, _022515E8 ; =0x0000A028 + bne _022515D2 + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #8] + str r0, [r4, #0xc] + ldr r0, _022515EC ; =ov17_022515F4 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_022515D2: + mov r0, #3 + lsl r0, r0, #0xc + str r0, [r4, #8] + mov r0, #9 + lsl r0, r0, #0xc + str r0, [r4, #0xc] + ldr r0, _022515F0 ; =ov17_02251688 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022515E8: .word 0x0000A028 +_022515EC: .word ov17_022515F4 +_022515F0: .word ov17_02251688 + thumb_func_end ov17_02251598 + + thumb_func_start ov17_022515F4 +ov17_022515F4: ; 0x022515F4 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r0, [r1, #0x10] + cmp r0, #0 + bne _0225166E + mov r0, #1 + ldr r2, [r1, #8] + lsl r0, r0, #0xa + sub r2, r2, r0 + str r2, [r1, #8] + ldr r2, [r1, #0xc] + add r0, r2, r0 + str r0, [r1, #0xc] + mov r0, #3 + ldr r2, [r1, #8] + lsl r0, r0, #0xc + cmp r2, r0 + bgt _02251626 + str r0, [r1, #8] + mov r0, #9 + lsl r0, r0, #0xc + str r0, [r1, #0xc] + ldrb r0, [r1, #0x10] + add r0, r0, #1 + strb r0, [r1, #0x10] +_02251626: + ldr r3, [r1, #0] + ldr r2, _02251684 ; =0x00000851 + mov r0, #0 + strb r0, [r3, r2] + ldr r3, [r1, #8] + ldr r4, [r1, #0] + asr r5, r3, #8 + add r3, r2, #1 + strb r5, [r4, r3] + ldr r4, [r1, #0] + mov r5, #0xff + add r3, r2, #2 + strb r5, [r4, r3] + ldr r3, [r1, #0xc] + ldr r4, [r1, #0] + asr r5, r3, #8 + add r3, r2, #3 + strb r5, [r4, r3] + ldr r4, [r1, #0] + mov r5, #1 + add r3, r2, #4 + strb r5, [r4, r3] + ldr r3, [r1, #8] + ldr r4, [r1, #0] + asr r5, r3, #8 + add r3, r2, #5 + strb r5, [r4, r3] + ldr r4, [r1, #0] + add r3, r2, #6 + strb r0, [r4, r3] + ldr r0, [r1, #0xc] + ldr r1, [r1, #0] + asr r3, r0, #8 + add r0, r2, #7 + strb r3, [r1, r0] + pop {r3, r4, r5, pc} +_0225166E: + ldr r0, [r1, #4] + mov r2, #1 + strb r2, [r0] + add r0, r1, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_02251684: .word 0x00000851 + thumb_func_end ov17_022515F4 + + thumb_func_start ov17_02251688 +ov17_02251688: ; 0x02251688 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r0, [r1, #0x10] + cmp r0, #0 + bne _022516FE + mov r0, #1 + ldr r2, [r1, #8] + lsl r0, r0, #0xa + add r2, r2, r0 + str r2, [r1, #8] + ldr r2, [r1, #0xc] + sub r0, r2, r0 + str r0, [r1, #0xc] + mov r0, #6 + ldr r2, [r1, #8] + lsl r0, r0, #0xc + cmp r2, r0 + blt _022516B6 + str r0, [r1, #8] + str r0, [r1, #0xc] + ldrb r0, [r1, #0x10] + add r0, r0, #1 + strb r0, [r1, #0x10] +_022516B6: + ldr r3, [r1, #0] + ldr r2, _02251714 ; =0x00000851 + mov r0, #0 + strb r0, [r3, r2] + ldr r3, [r1, #8] + ldr r4, [r1, #0] + asr r5, r3, #8 + add r3, r2, #1 + strb r5, [r4, r3] + ldr r4, [r1, #0] + mov r5, #0xff + add r3, r2, #2 + strb r5, [r4, r3] + ldr r3, [r1, #0xc] + ldr r4, [r1, #0] + asr r5, r3, #8 + add r3, r2, #3 + strb r5, [r4, r3] + ldr r4, [r1, #0] + mov r5, #1 + add r3, r2, #4 + strb r5, [r4, r3] + ldr r3, [r1, #8] + ldr r4, [r1, #0] + asr r5, r3, #8 + add r3, r2, #5 + strb r5, [r4, r3] + ldr r4, [r1, #0] + add r3, r2, #6 + strb r0, [r4, r3] + ldr r0, [r1, #0xc] + ldr r1, [r1, #0] + asr r3, r0, #8 + add r0, r2, #7 + strb r3, [r1, r0] + pop {r3, r4, r5, pc} +_022516FE: + ldr r0, [r1, #4] + mov r2, #1 + strb r2, [r0] + add r0, r1, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_02251714: .word 0x00000851 + thumb_func_end ov17_02251688 + + thumb_func_start ov17_02251718 +ov17_02251718: ; 0x02251718 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r1, #0 + add r0, r3, #0 + strb r1, [r0] + mov r0, #0x18 + mov r1, #0x14 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + lsl r0, r6, #2 + add r0, r5, r0 + ldr r0, [r0, #0x18] + cmp r7, #0 + str r0, [r4, #0] + ldr r0, [sp] + ldr r2, _02251778 ; =0x0000C350 + str r0, [r4, #4] + bne _02251762 + mov r0, #0x4a + lsl r0, r0, #0xa + str r0, [r4, #8] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0xc] + ldr r0, _0225177C ; =ov17_02251784 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_02251762: + mov r0, #2 + lsl r0, r0, #0xe + str r0, [r4, #8] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0xc] + ldr r0, _02251780 ; =ov17_022517F0 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251778: .word 0x0000C350 +_0225177C: .word ov17_02251784 +_02251780: .word ov17_022517F0 + thumb_func_end ov17_02251718 + + thumb_func_start ov17_02251784 +ov17_02251784: ; 0x02251784 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02251796 + cmp r0, #1 + beq _022517A6 + b _022517DA +_02251796: + ldr r0, [r4, #0] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_022517A6: + mov r0, #2 + ldr r1, [r4, #8] + lsl r0, r0, #0xa + sub r2, r1, r0 + lsl r1, r0, #4 + str r2, [r4, #8] + cmp r2, r1 + bgt _022517C0 + lsl r0, r0, #4 + str r0, [r4, #8] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_022517C0: + ldr r2, [r4, #8] + ldr r0, [r4, #0] + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r2, [r4, #0xc] + ldr r0, [r4, #0] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_022517DA: + ldr r0, [r4, #4] + mov r1, #1 + strb r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov17_02251784 + + thumb_func_start ov17_022517F0 +ov17_022517F0: ; 0x022517F0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _02251802 + cmp r0, #1 + beq _02251806 + b _0225183C +_02251802: + add r0, r0, #1 + strb r0, [r4, #0x10] +_02251806: + mov r0, #2 + ldr r1, [r4, #8] + lsl r0, r0, #0xa + sub r1, r1, r0 + ldr r0, _0225185C ; =0xFFFFD800 + str r1, [r4, #8] + cmp r1, r0 + bgt _0225181C + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_0225181C: + ldr r3, [r4, #8] + ldr r0, [r4, #0] + asr r2, r3, #7 + lsr r2, r2, #0x18 + add r2, r3, r2 + mov r1, #0 + asr r2, r2, #8 + bl sub_02007DEC + ldr r2, [r4, #0xc] + ldr r0, [r4, #0] + mov r1, #1 + asr r2, r2, #8 + bl sub_02007DEC + pop {r3, r4, r5, pc} +_0225183C: + ldr r0, [r4, #0] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + ldr r0, [r4, #4] + mov r1, #1 + strb r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_0225185C: .word 0xFFFFD800 + thumb_func_end ov17_022517F0 + + thumb_func_start ov17_02251860 +ov17_02251860: ; 0x02251860 + ldr r2, _022518FC ; =0x00000121 + ldrb r0, [r0, r2] + cmp r0, #8 + bhi _022518F6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02251874: ; jump table + .short _02251886 - _02251874 - 2 ; case 0 + .short _0225189E - _02251874 - 2 ; case 1 + .short _022518B4 - _02251874 - 2 ; case 2 + .short _022518D2 - _02251874 - 2 ; case 3 + .short _022518D2 - _02251874 - 2 ; case 4 + .short _022518DE - _02251874 - 2 ; case 5 + .short _022518DE - _02251874 - 2 ; case 6 + .short _022518EA - _02251874 - 2 ; case 7 + .short _022518EA - _02251874 - 2 ; case 8 +_02251886: + cmp r1, #0 + beq _02251890 + cmp r1, #2 + beq _02251894 + b _0225189A +_02251890: + ldr r0, _02251900 ; =0x00001770 + bx lr +_02251894: + mov r0, #0xfa + lsl r0, r0, #4 + bx lr +_0225189A: + mov r0, #0 + bx lr +_0225189E: + cmp r1, #0 + beq _022518A8 + cmp r1, #1 + beq _022518AC + b _022518B0 +_022518A8: + ldr r0, _02251904 ; =0x00001B58 + bx lr +_022518AC: + ldr r0, _02251908 ; =0x00000BB8 + bx lr +_022518B0: + mov r0, #0 + bx lr +_022518B4: + cmp r1, #0 + beq _022518C2 + cmp r1, #1 + beq _022518C6 + cmp r1, #2 + beq _022518CA + b _022518CE +_022518C2: + ldr r0, _0225190C ; =0x00000D05 + bx lr +_022518C6: + ldr r0, _0225190C ; =0x00000D05 + bx lr +_022518CA: + ldr r0, _0225190C ; =0x00000D05 + bx lr +_022518CE: + mov r0, #0 + bx lr +_022518D2: + cmp r1, #0 + bne _022518DA + ldr r0, _02251910 ; =0x00002710 + bx lr +_022518DA: + mov r0, #0 + bx lr +_022518DE: + cmp r1, #1 + bne _022518E6 + ldr r0, _02251910 ; =0x00002710 + bx lr +_022518E6: + mov r0, #0 + bx lr +_022518EA: + cmp r1, #2 + bne _022518F2 + ldr r0, _02251910 ; =0x00002710 + bx lr +_022518F2: + mov r0, #0 + bx lr +_022518F6: + mov r0, #0 + bx lr + nop +_022518FC: .word 0x00000121 +_02251900: .word 0x00001770 +_02251904: .word 0x00001B58 +_02251908: .word 0x00000BB8 +_0225190C: .word 0x00000D05 +_02251910: .word 0x00002710 + thumb_func_end ov17_02251860 + + thumb_func_start ov17_02251914 +ov17_02251914: ; 0x02251914 + push {r3, lr} + bl ov17_02251860 + mov r1, #0xc0 + add r2, r0, #0 + mul r2, r1 + ldr r1, _0225192C ; =0x00001388 + add r0, r2, r1 + lsl r1, r1, #1 + bl sub_020E1F6C + pop {r3, pc} + ; .align 2, 0 +_0225192C: .word 0x00001388 + thumb_func_end ov17_02251914 + + thumb_func_start ov17_02251930 +ov17_02251930: ; 0x02251930 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r0, [sp] + mov r0, #0 + ldr r7, [sp] + add r5, r1, #0 + add r6, r2, #0 + str r0, [sp, #8] + add r4, sp, #0x24 +_02251942: + cmp r5, #0 + beq _02251950 + cmp r5, #1 + beq _0225196A + cmp r5, #2 + beq _02251974 + b _0225197C +_02251950: + ldr r0, [sp] + ldr r1, [sp, #8] + bl sub_02095928 + str r0, [sp, #0x10] + ldr r0, [sp] + ldr r1, [sp, #8] + bl sub_0209598C + ldr r1, [sp, #0x10] + add r0, r1, r0 + str r0, [r4, #0] + b _02251984 +_0225196A: + mov r0, #0x4b + lsl r0, r0, #2 + ldrsh r0, [r7, r0] + str r0, [r4, #0] + b _02251984 +_02251974: + ldr r0, _02251A18 ; =0x0000012E + ldrsh r0, [r7, r0] + str r0, [r4, #0] + b _02251984 +_0225197C: + bl sub_02022974 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} +_02251984: + ldr r0, [sp, #8] + add r4, r4, #4 + add r0, r0, #1 + add r7, #0xc + str r0, [sp, #8] + cmp r0, #4 + blt _02251942 + mov r4, #0 + mov r3, #1 + add r2, sp, #0x28 + add r7, sp, #0x24 +_0225199A: + lsl r0, r4, #2 + ldr r1, [r7, r0] + ldr r0, [r2, #0] + cmp r1, r0 + bge _022519A6 + add r4, r3, #0 +_022519A6: + add r3, r3, #1 + add r2, r2, #4 + cmp r3, #4 + blt _0225199A + ldr r0, [sp] + add r1, r5, #0 + bl ov17_02251860 + lsl r2, r4, #2 + add r1, sp, #0x24 + ldr r1, [r1, r2] + bl sub_020E1F6C + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #4] + add r7, sp, #0x24 + add r4, sp, #0x14 +_022519CA: + ldr r0, [r7, #0] + ldr r1, [sp, #0xc] + mul r0, r1 + str r0, [r4, #0] + add r0, #0x32 + mov r1, #0x64 + bl sub_020E1F6C + stmia r4!, {r0} + ldr r0, [sp, #4] + add r7, r7, #4 + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #4 + blt _022519CA + mov r2, #0 + add r1, sp, #0x14 +_022519EC: + cmp r5, #0 + beq _022519FA + cmp r5, #1 + beq _02251A00 + cmp r5, #2 + beq _02251A06 + b _02251A0A +_022519FA: + ldr r0, [r1, #0] + strh r0, [r6] + b _02251A0A +_02251A00: + ldr r0, [r1, #0] + strh r0, [r6] + b _02251A0A +_02251A06: + ldr r0, [r1, #0] + strh r0, [r6] +_02251A0A: + add r2, r2, #1 + add r1, r1, #4 + add r6, r6, #2 + cmp r2, #4 + blt _022519EC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251A18: .word 0x0000012E + thumb_func_end ov17_02251930 + + thumb_func_start ov17_02251A1C +ov17_02251A1C: ; 0x02251A1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + str r0, [sp] + ldr r0, [r0, #0] + ldr r1, _02251D3C ; =0x00000121 + ldrb r1, [r0, r1] + cmp r1, #8 + bhi _02251ADC + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02251A38: ; jump table + .short _02251A4A - _02251A38 - 2 ; case 0 + .short _02251A68 - _02251A38 - 2 ; case 1 + .short _02251A86 - _02251A38 - 2 ; case 2 + .short _02251AB4 - _02251A38 - 2 ; case 3 + .short _02251AB4 - _02251A38 - 2 ; case 4 + .short _02251AC2 - _02251A38 - 2 ; case 5 + .short _02251AC2 - _02251A38 - 2 ; case 6 + .short _02251AD0 - _02251A38 - 2 ; case 7 + .short _02251AD0 - _02251A38 - 2 ; case 8 +_02251A4A: + ldr r3, _02251D40 ; =0x000003D6 + ldr r2, [sp] + mov r1, #0 + add r2, r2, r3 + bl ov17_02251930 + ldr r0, [sp] + ldr r3, _02251D44 ; =0x000003E6 + ldr r2, [sp] + ldr r0, [r0, #0] + mov r1, #2 + add r2, r2, r3 + bl ov17_02251930 + b _02251ADC +_02251A68: + ldr r3, _02251D40 ; =0x000003D6 + ldr r2, [sp] + mov r1, #0 + add r2, r2, r3 + bl ov17_02251930 + ldr r0, [sp] + ldr r3, _02251D48 ; =0x000003DE + ldr r2, [sp] + ldr r0, [r0, #0] + mov r1, #1 + add r2, r2, r3 + bl ov17_02251930 + b _02251ADC +_02251A86: + ldr r3, _02251D40 ; =0x000003D6 + ldr r2, [sp] + mov r1, #0 + add r2, r2, r3 + bl ov17_02251930 + ldr r0, [sp] + ldr r3, _02251D48 ; =0x000003DE + ldr r2, [sp] + ldr r0, [r0, #0] + mov r1, #1 + add r2, r2, r3 + bl ov17_02251930 + ldr r0, [sp] + ldr r3, _02251D44 ; =0x000003E6 + ldr r2, [sp] + ldr r0, [r0, #0] + mov r1, #2 + add r2, r2, r3 + bl ov17_02251930 + b _02251ADC +_02251AB4: + ldr r3, _02251D40 ; =0x000003D6 + ldr r2, [sp] + mov r1, #0 + add r2, r2, r3 + bl ov17_02251930 + b _02251ADC +_02251AC2: + ldr r3, _02251D48 ; =0x000003DE + ldr r2, [sp] + mov r1, #1 + add r2, r2, r3 + bl ov17_02251930 + b _02251ADC +_02251AD0: + ldr r3, _02251D44 ; =0x000003E6 + ldr r2, [sp] + mov r1, #2 + add r2, r2, r3 + bl ov17_02251930 +_02251ADC: + ldr r7, _02251D40 ; =0x000003D6 + ldr r6, [sp] + add r0, r7, #0 + add r1, r7, #0 + mov r5, #0 + add r0, #8 + add r1, #0x18 +_02251AEA: + ldr r2, _02251D44 ; =0x000003E6 + ldrsh r3, [r6, r7] + ldrsh r4, [r6, r2] + ldrsh r2, [r6, r0] + add r5, r5, #1 + add r2, r3, r2 + add r2, r4, r2 + strh r2, [r6, r1] + add r6, r6, #2 + cmp r5, #4 + blt _02251AEA + ldr r1, [sp] + ldr r4, _02251D40 ; =0x000003D6 + mov r0, #0 + mov r2, #1 + add r1, r1, #2 + add r5, r4, #0 +_02251B0C: + ldr r3, [sp] + lsl r6, r0, #1 + add r3, r3, r6 + ldrsh r6, [r3, r4] + ldrsh r3, [r1, r5] + cmp r6, r3 + bge _02251B1C + add r0, r2, #0 +_02251B1C: + add r2, r2, #1 + add r1, r1, #2 + cmp r2, #4 + blt _02251B0C + lsl r1, r0, #1 + ldr r0, [sp] + ldr r4, [sp] + add r1, r0, r1 + ldr r0, _02251D40 ; =0x000003D6 + mov r5, #0 + add r7, r0, #0 + ldrsh r6, [r1, r0] + add r7, #0x20 +_02251B36: + ldr r0, _02251D40 ; =0x000003D6 + ldrsh r1, [r4, r0] + mov r0, #0x64 + mul r0, r1 + add r1, r6, #0 + bl sub_020E1F6C + strh r0, [r4, r7] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02251B36 + ldr r0, [sp] + ldr r4, _02251D48 ; =0x000003DE + mov r2, #0 + mov r1, #1 + add r0, r0, #2 + add r5, r4, #0 +_02251B5A: + ldr r3, [sp] + lsl r6, r2, #1 + add r3, r3, r6 + ldrsh r6, [r3, r4] + ldrsh r3, [r0, r5] + cmp r6, r3 + bge _02251B6A + add r2, r1, #0 +_02251B6A: + add r1, r1, #1 + add r0, r0, #2 + cmp r1, #4 + blt _02251B5A + ldr r0, [sp] + lsl r1, r2, #1 + add r1, r0, r1 + ldr r0, _02251D48 ; =0x000003DE + ldr r4, [sp] + add r7, r0, #0 + ldrsh r6, [r1, r0] + mov r5, #0 + add r7, #0x20 +_02251B84: + ldr r0, _02251D48 ; =0x000003DE + ldrsh r1, [r4, r0] + mov r0, #0x64 + mul r0, r1 + add r1, r6, #0 + bl sub_020E1F6C + strh r0, [r4, r7] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02251B84 + ldr r0, [sp] + ldr r4, _02251D44 ; =0x000003E6 + mov r2, #0 + mov r1, #1 + add r0, r0, #2 + add r5, r4, #0 +_02251BA8: + ldr r3, [sp] + lsl r6, r2, #1 + add r3, r3, r6 + ldrsh r6, [r3, r4] + ldrsh r3, [r0, r5] + cmp r6, r3 + bge _02251BB8 + add r2, r1, #0 +_02251BB8: + add r1, r1, #1 + add r0, r0, #2 + cmp r1, #4 + blt _02251BA8 + ldr r0, [sp] + lsl r1, r2, #1 + add r1, r0, r1 + ldr r0, _02251D44 ; =0x000003E6 + ldr r4, [sp] + add r7, r0, #0 + ldrsh r6, [r1, r0] + mov r5, #0 + add r7, #0x20 +_02251BD2: + ldr r0, _02251D44 ; =0x000003E6 + ldrsh r1, [r4, r0] + mov r0, #0x64 + mul r0, r1 + add r1, r6, #0 + bl sub_020E1F6C + strh r0, [r4, r7] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02251BD2 + ldr r0, [sp] + mov r1, #0 + ldr r0, [r0, #0] + bl ov17_02251914 + ldr r4, [sp] + ldr r7, _02251D4C ; =0x0000041E + add r6, r0, #0 + mov r5, #0 +_02251BFC: + ldr r0, _02251D50 ; =0x000003F6 + mov r1, #0x64 + ldrsh r0, [r4, r0] + mul r0, r6 + bl sub_020E1F6C + strh r0, [r4, r7] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02251BFC + ldr r0, [sp] + mov r1, #1 + ldr r0, [r0, #0] + bl ov17_02251914 + ldr r4, [sp] + ldr r7, _02251D54 ; =0x00000426 + add r6, r0, #0 + mov r5, #0 +_02251C24: + ldr r0, _02251D58 ; =0x000003FE + mov r1, #0x64 + ldrsh r0, [r4, r0] + mul r0, r6 + bl sub_020E1F6C + strh r0, [r4, r7] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02251C24 + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + bl ov17_02251914 + ldr r4, [sp] + ldr r7, _02251D5C ; =0x0000042E + add r6, r0, #0 + mov r5, #0 +_02251C4C: + ldr r0, _02251D60 ; =0x00000406 + mov r1, #0x64 + ldrsh r0, [r4, r0] + mul r0, r6 + bl sub_020E1F6C + strh r0, [r4, r7] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _02251C4C + ldr r7, _02251D4C ; =0x0000041E + ldr r5, [sp] + add r0, r7, #0 + add r1, r7, #0 + mov r6, #0 + add r0, #8 + sub r1, #8 +_02251C70: + ldr r2, _02251D5C ; =0x0000042E + ldrsh r3, [r5, r7] + ldrsh r4, [r5, r2] + ldrsh r2, [r5, r0] + add r6, r6, #1 + add r2, r3, r2 + add r2, r4, r2 + strh r2, [r5, r1] + add r5, r5, #2 + cmp r6, #4 + blt _02251C70 + ldr r0, [sp] + mov r7, #0 + add r6, sp, #0x18 + str r0, [sp, #4] + add r4, sp, #8 + add r5, sp, #0x28 +_02251C92: + stmia r6!, {r7} + ldr r1, [sp, #4] + ldr r0, _02251D64 ; =0x00000416 + ldrsh r0, [r1, r0] + stmia r4!, {r0} + ldr r0, [sp] + ldr r0, [r0, #0] + bl sub_02094E98 + stmia r5!, {r0} + ldr r0, [sp, #4] + add r7, r7, #1 + add r0, r0, #2 + str r0, [sp, #4] + cmp r7, #4 + blt _02251C92 + mov r0, #0 + mov ip, r0 +_02251CB6: + mov r0, ip + mov r7, #3 + cmp r0, #3 + bge _02251D04 + add r2, sp, #0x14 + add r3, sp, #0x34 + add r4, sp, #0x24 +_02251CC4: + sub r0, r2, #4 + ldr r5, [r2, #0] + ldr r6, [r0, #0] + cmp r6, r5 + blt _02251CDC + cmp r6, r5 + bne _02251CF6 + sub r0, r3, #4 + ldr r1, [r0, #0] + ldr r0, [r3, #0] + cmp r1, r0 + bge _02251CF6 +_02251CDC: + str r6, [r2, #0] + sub r0, r2, #4 + str r5, [r0, #0] + sub r0, r4, #4 + ldr r5, [r4, #0] + ldr r1, [r0, #0] + str r1, [r4, #0] + str r5, [r0, #0] + sub r0, r3, #4 + ldr r5, [r3, #0] + ldr r1, [r0, #0] + str r1, [r3, #0] + str r5, [r0, #0] +_02251CF6: + sub r7, r7, #1 + mov r0, ip + sub r2, r2, #4 + sub r3, r3, #4 + sub r4, r4, #4 + cmp r7, r0 + bgt _02251CC4 +_02251D04: + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #3 + blt _02251CB6 + mov r1, #0x13 + ldr r7, _02251D68 ; =0x000003D1 + mov r6, #0 + add r5, sp, #0x18 + mov r0, #0xc + lsl r1, r1, #4 +_02251D1A: + ldr r3, [sp] + ldr r2, [r5, #0] + add r3, r3, r6 + strb r2, [r3, r7] + ldr r2, [sp] + ldr r4, [r2, #0] + ldr r2, [r5, #0] + add r5, r5, #4 + add r3, r2, #0 + mul r3, r0 + add r2, r4, r3 + strb r6, [r2, r1] + add r6, r6, #1 + cmp r6, #4 + blt _02251D1A + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251D3C: .word 0x00000121 +_02251D40: .word 0x000003D6 +_02251D44: .word 0x000003E6 +_02251D48: .word 0x000003DE +_02251D4C: .word 0x0000041E +_02251D50: .word 0x000003F6 +_02251D54: .word 0x00000426 +_02251D58: .word 0x000003FE +_02251D5C: .word 0x0000042E +_02251D60: .word 0x00000406 +_02251D64: .word 0x00000416 +_02251D68: .word 0x000003D1 + thumb_func_end ov17_02251A1C + + .rodata + + + .global Unk_ov17_02254BD4 +Unk_ov17_02254BD4: ; 0x02254BD4 + .incbin "incbin/overlay17_rodata.bin", 0x1E48, 0x1E58 - 0x1E48 + + .global Unk_ov17_02254BE4 +Unk_ov17_02254BE4: ; 0x02254BE4 + .incbin "incbin/overlay17_rodata.bin", 0x1E58, 0x1E68 - 0x1E58 + + .global Unk_ov17_02254BF4 +Unk_ov17_02254BF4: ; 0x02254BF4 + .incbin "incbin/overlay17_rodata.bin", 0x1E68, 0x1E80 - 0x1E68 + + .global Unk_ov17_02254C0C +Unk_ov17_02254C0C: ; 0x02254C0C + .incbin "incbin/overlay17_rodata.bin", 0x1E80, 0x1E9C - 0x1E80 + + .global Unk_ov17_02254C28 +Unk_ov17_02254C28: ; 0x02254C28 + .incbin "incbin/overlay17_rodata.bin", 0x1E9C, 0x1ED0 - 0x1E9C + + .global Unk_ov17_02254C5C +Unk_ov17_02254C5C: ; 0x02254C5C + .incbin "incbin/overlay17_rodata.bin", 0x1ED0, 0x1F04 - 0x1ED0 + + .global Unk_ov17_02254C90 +Unk_ov17_02254C90: ; 0x02254C90 + .incbin "incbin/overlay17_rodata.bin", 0x1F04, 0x1F38 - 0x1F04 + + .global Unk_ov17_02254CC4 +Unk_ov17_02254CC4: ; 0x02254CC4 + .incbin "incbin/overlay17_rodata.bin", 0x1F38, 0x34 + diff --git a/asm/ov17_02251D6C.s b/asm/ov17_02251D6C.s new file mode 100644 index 000000000..ab1ff4f35 --- /dev/null +++ b/asm/ov17_02251D6C.s @@ -0,0 +1,1775 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02251D6C +ov17_02251D6C: ; 0x02251D6C + push {r3, r4, lr} + sub sp, #0xc + ldr r1, _02251DA0 ; =0x02254D18 + add r3, sp, #0 + str r1, [sp] + mov r1, #0xb + strh r1, [r3, #4] + ldr r1, [r0, #0] + ldr r2, _02251DA4 ; =0x00000123 + ldrb r1, [r1, r2] + strb r1, [r3, #6] + sub r1, r2, #7 + ldr r4, [r0, #0] + add r2, #0x4e + ldrb r1, [r4, r1] + strb r1, [r3, #8] + ldr r1, [r0, #0] + ldrb r1, [r1, r2] + strb r1, [r3, #7] + ldr r1, _02251DA8 ; =0x0000085C + add r0, r0, r1 + add r1, sp, #0 + bl ov17_0224F18C + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02251DA0: .word 0x02254D18 +_02251DA4: .word 0x00000123 +_02251DA8: .word 0x0000085C + thumb_func_end ov17_02251D6C + + thumb_func_start ov17_02251DAC +ov17_02251DAC: ; 0x02251DAC + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02251DAC + + thumb_func_start ov17_02251DC0 +ov17_02251DC0: ; 0x02251DC0 + push {r3, lr} + add r1, r2, #0 + mov r2, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02251DC0 + + thumb_func_start ov17_02251DD0 +ov17_02251DD0: ; 0x02251DD0 + bx lr + ; .align 2, 0 + thumb_func_end ov17_02251DD0 + + thumb_func_start ov17_02251DD4 +ov17_02251DD4: ; 0x02251DD4 + push {r3, lr} + mov r1, #0x9a + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02251DD4 + + thumb_func_start ov17_02251DE8 +ov17_02251DE8: ; 0x02251DE8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0xe7 + lsl r1, r1, #2 + str r0, [sp] + mov ip, r2 + add r0, r3, #0 + add r4, r6, r1 + mov r2, #0x4d +_02251DFA: + ldrh r1, [r0] + add r0, r0, #2 + strh r1, [r4] + add r4, r4, #2 + sub r2, r2, #1 + bne _02251DFA + mov r1, #0 + ldr r7, _02251E50 ; =0x00000132 + add r2, r1, #0 +_02251E0C: + ldr r0, [r6, #0] + mov r4, #0x4a + add r0, r0, r2 + ldrh r5, [r3] + lsl r4, r4, #2 + add r1, r1, #1 + strh r5, [r0, r4] + ldrh r5, [r3, #2] + add r4, r4, #2 + add r2, #0xc + strh r5, [r0, r4] + mov r4, #0x4b + ldrh r5, [r3, #4] + lsl r4, r4, #2 + strh r5, [r0, r4] + ldrh r5, [r3, #6] + add r4, r4, #2 + strh r5, [r0, r4] + mov r4, #0x13 + ldrh r5, [r3, #8] + lsl r4, r4, #4 + strh r5, [r0, r4] + ldrh r4, [r3, #0xa] + add r3, #0xc + cmp r1, #4 + strh r4, [r0, r7] + blt _02251E0C + mov r2, #0 + ldr r0, [sp] + mov r1, ip + add r3, r2, #0 + bl ov17_0224F26C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02251E50: .word 0x00000132 + thumb_func_end ov17_02251DE8 + + thumb_func_start ov17_02251E54 +ov17_02251E54: ; 0x02251E54 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02251E54 + + thumb_func_start ov17_02251E68 +ov17_02251E68: ; 0x02251E68 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x18 + add r7, r1, #0 + add r1, r0, #0 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02251EA4 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _02251EA8 ; =ov17_02251EAC + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02251EA4: .word 0x00007530 +_02251EA8: .word ov17_02251EAC + thumb_func_end ov17_02251E68 + + thumb_func_start ov17_02251EAC +ov17_02251EAC: ; 0x02251EAC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r1, #0x10] + str r1, [sp] + cmp r0, #0 + beq _02251EBC + b _02251FE2 +_02251EBC: + ldr r0, [sp] + mov r1, #0x14 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _02251ED0 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x14] + pop {r4, r5, r6, r7, pc} +_02251ED0: + ldr r0, [sp] + mov r1, #0x13 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _02251EE4 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x13] + pop {r4, r5, r6, r7, pc} +_02251EE4: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + ldr r0, [r0, #0] + mov r1, #2 + ldr r0, [r0, #0x30] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _02251F5C +_02251EFC: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + ldr r0, _02252000 ; =0x02254CF8 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _02251F56 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r0, [r0, #0x12] + mov r7, #0x3f + str r5, [sp, #4] + lsl r1, r0, #1 + ldr r0, _02252004 ; =0x02254D00 + lsl r7, r7, #0xa + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r0, r0, #5 + add r6, r1, r0 + b _02251F50 +_02251F2C: + mov r4, #0 + b _02251F44 +_02251F30: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_02251F44: + cmp r4, #8 + blt _02251F30 + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_02251F50: + ldr r0, [sp, #4] + cmp r0, #4 + blt _02251F2C +_02251F56: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_02251F5C: + ldr r0, [sp, #8] + cmp r0, #4 + blt _02251EFC + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _02251F9E + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _02251F9E + ldr r0, _02252000 ; =0x02254CF8 + sub r1, r1, #1 + ldrsb r0, [r0, r1] + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #0x3f + str r0, [sp, #4] + lsl r1, r1, #0xa + b _02251F98 +_02251F88: + ldr r0, [sp, #4] + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r1 + strh r0, [r3, r2] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_02251F98: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _02251F88 +_02251F9E: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _02251FFC + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _02251FFC + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_02251FE2: + add r0, r1, #0 + mov r2, #0 + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_02251FFC: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02252000: .word 0x02254CF8 +_02252004: .word 0x02254D00 + thumb_func_end ov17_02251EAC + + thumb_func_start ov17_02252008 +ov17_02252008: ; 0x02252008 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252008 + + thumb_func_start ov17_0225201C +ov17_0225201C: ; 0x0225201C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x18 + add r7, r1, #0 + add r1, r0, #0 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02252058 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _0225205C ; =ov17_02252060 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02252058: .word 0x00007530 +_0225205C: .word ov17_02252060 + thumb_func_end ov17_0225201C + + thumb_func_start ov17_02252060 +ov17_02252060: ; 0x02252060 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r1, #0x10] + str r1, [sp] + cmp r0, #0 + beq _02252070 + b _022521BE +_02252070: + ldr r0, [sp] + mov r1, #0x14 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _02252084 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x14] + pop {r4, r5, r6, r7, pc} +_02252084: + ldr r0, [sp] + mov r1, #0x13 + ldrsb r0, [r0, r1] + cmp r0, #0 + ble _02252098 + sub r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x13] + pop {r4, r5, r6, r7, pc} +_02252098: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + ldr r0, [r0, #0] + mov r1, #2 + ldr r0, [r0, #0x30] + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + str r0, [sp, #8] + b _02252118 +_022520B0: + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + mov r0, #4 + sub r1, r0, r1 + ldr r0, _022521DC ; =0x02254CF8 + ldrsb r1, [r0, r1] + ldr r0, [sp, #8] + add r0, r1, r0 + bmi _02252112 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + ldr r0, [sp] + mov r5, #0 + ldrb r1, [r0, #0x12] + mov r0, #0xb + mov r7, #0x3f + sub r0, r0, r1 + lsl r1, r0, #1 + ldr r0, _022521E0 ; =0x02254D00 + str r5, [sp, #4] + ldrh r1, [r0, r1] + ldr r0, [sp, #8] + lsl r7, r7, #0xa + lsl r0, r0, #5 + add r6, r1, r0 + b _0225210C +_022520E8: + mov r4, #0 + b _02252100 +_022520EC: + add r0, r5, r4 + lsl r2, r0, #1 + ldrh r0, [r3, r2] + and r0, r7 + strh r0, [r3, r2] + ldrh r1, [r3, r2] + add r0, r6, r4 + add r4, r4, #1 + orr r0, r1 + strh r0, [r3, r2] +_02252100: + cmp r4, #8 + blt _022520EC + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #4] +_0225210C: + ldr r0, [sp, #4] + cmp r0, #4 + blt _022520E8 +_02252112: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_02252118: + ldr r0, [sp, #8] + cmp r0, #4 + blt _022520B0 + ldr r0, [sp] + mov r1, #0x11 + ldrsb r1, [r0, r1] + cmp r1, #0 + ble _0225217A + ldrb r0, [r0, #0x12] + cmp r0, #0 + bne _0225217A + mov r0, #5 + sub r1, r0, r1 + ldr r0, _022521DC ; =0x02254CF8 + mov r7, #0x3f + ldrsb r0, [r0, r1] + lsl r7, r7, #0xa + mov r6, #0x1d + add r0, r0, #3 + lsl r1, r0, #6 + mov r0, ip + add r3, r0, r1 + mov r0, #0 + mov r1, #2 + str r0, [sp, #4] + lsl r1, r1, #8 + b _02252174 +_0225214E: + ldr r0, [sp, #4] + ldr r5, [sp, #4] + lsl r4, r0, #1 + ldrh r0, [r3, r4] + lsl r5, r5, #0x1d + and r0, r7 + strh r0, [r3, r4] + ldr r0, [sp, #4] + ldrh r2, [r3, r4] + lsr r0, r0, #0x1f + sub r5, r5, r0 + ror r5, r6 + add r0, r0, r5 + add r0, r0, r1 + orr r0, r2 + strh r0, [r3, r4] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_02252174: + ldr r0, [sp, #4] + cmp r0, #0x20 + blt _0225214E +_0225217A: + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldr r0, [sp] + ldrb r0, [r0, #0x12] + add r1, r0, #1 + ldr r0, [sp] + strb r1, [r0, #0x12] + ldrb r0, [r0, #0x12] + cmp r0, #0xc + blo _022521D8 + ldr r1, [sp] + mov r0, #0 + mov r2, #0x11 + strb r0, [r1, #0x12] + ldrsb r1, [r1, r2] + add r3, r1, #1 + ldr r1, [sp] + strb r3, [r1, #0x11] + strb r0, [r1, #0x14] + add r0, r1, #0 + ldrsb r0, [r0, r2] + cmp r0, #5 + blo _022521D8 + add r0, r1, #0 + ldrb r0, [r0, #0x10] + add r1, r0, #1 + ldr r0, [sp] + add sp, #0xc + strb r1, [r0, #0x10] + pop {r4, r5, r6, r7, pc} +_022521BE: + add r0, r1, #0 + mov r2, #0 + ldr r0, [r0, #0xc] + add r1, r1, #4 + add r3, r2, #0 + bl ov17_0224F26C + ldr r0, [sp] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_022521D8: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022521DC: .word 0x02254CF8 +_022521E0: .word 0x02254D00 + thumb_func_end ov17_02252060 + + thumb_func_start ov17_022521E4 +ov17_022521E4: ; 0x022521E4 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_022521E4 + + thumb_func_start ov17_022521F8 +ov17_022521F8: ; 0x022521F8 + push {r4, lr} + ldr r3, _0225220C ; =0x0000127C + mov r4, #1 + strb r4, [r1, r3] + add r1, r2, #0 + mov r2, #0 + add r3, r2, #0 + bl ov17_0224F26C + pop {r4, pc} + ; .align 2, 0 +_0225220C: .word 0x0000127C + thumb_func_end ov17_022521F8 + + thumb_func_start ov17_02252210 +ov17_02252210: ; 0x02252210 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252210 + + thumb_func_start ov17_02252224 +ov17_02252224: ; 0x02252224 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + mov r0, #0x18 + mov r1, #0x20 + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + ldr r2, _02252284 ; =0x00007530 + str r0, [r4, #0] + ldrh r0, [r6] + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] + ldrb r0, [r5] + strb r0, [r4, #0x11] + ldrh r0, [r5, #8] + strh r0, [r4, #0x14] + ldrh r0, [r5, #0xa] + strh r0, [r4, #0x16] + ldrh r0, [r5, #0xc] + strh r0, [r4, #0x18] + ldrb r0, [r5, #0xe] + strb r0, [r4, #0x1a] + ldrb r0, [r5, #0x11] + strb r0, [r4, #0x1d] + ldrb r0, [r5, #0x10] + strb r0, [r4, #0x1c] + ldrb r0, [r5, #0xf] + strb r0, [r4, #0x1b] + ldr r0, _02252288 ; =ov17_0225228C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02252284: .word 0x00007530 +_02252288: .word ov17_0225228C + thumb_func_end ov17_02252224 + + thumb_func_start ov17_0225228C +ov17_0225228C: ; 0x0225228C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _022522A2 + cmp r0, #1 + beq _022522E0 + cmp r0, #2 + beq _022522F2 + b _0225232A +_022522A2: + ldrb r0, [r4, #0x1a] + cmp r0, #0 + beq _022522DA + ldrb r0, [r4, #0x1d] + cmp r0, #0 + bne _022522C6 + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x34 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x30] + bl sub_0201C3C0 +_022522C6: + ldrb r1, [r4, #0x1a] + add r2, r4, #0 + ldr r0, [r4, #0] + add r2, #0x14 + bl ov17_02250968 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022522DA: + mov r0, #0x64 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022522E0: + ldr r0, [r4, #0] + bl ov17_0225099C + cmp r0, #0 + bne _02252342 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022522F2: + ldrb r0, [r4, #0x12] + add r0, r0, #1 + strb r0, [r4, #0x12] + ldrb r0, [r4, #0x1c] + cmp r0, #1 + bne _02252306 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02252306: + ldrb r1, [r4, #0x12] + ldrb r0, [r4, #0x1b] + cmp r1, r0 + blo _02252342 + ldr r0, [r4, #0] + mov r1, #1 + add r0, #0x34 + bl sub_0200E084 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x30] + bl sub_0201C3C0 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_0225232A: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02252342: + pop {r3, r4, r5, pc} + thumb_func_end ov17_0225228C + + thumb_func_start ov17_02252344 +ov17_02252344: ; 0x02252344 + push {r3, lr} + mov r1, #0x9a + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252344 + + thumb_func_start ov17_02252358 +ov17_02252358: ; 0x02252358 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0xe7 + add r6, r1, #0 + lsl r0, r0, #2 + add r5, r2, #0 + add r2, r6, r0 + mov r1, #0x4d +_02252368: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _02252368 + mov r0, #0x18 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r6, [r4, #0] + ldrh r0, [r5] + mov r2, #0xfa + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + lsl r2, r2, #2 + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _022523A8 ; =ov17_022523AC + str r7, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022523A8: .word ov17_022523AC + thumb_func_end ov17_02252358 + + thumb_func_start ov17_022523AC +ov17_022523AC: ; 0x022523AC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #6 + bls _022523BC + b _022524E6 +_022523BC: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022523C8: ; jump table + .short _022523D6 - _022523C8 - 2 ; case 0 + .short _022523EA - _022523C8 - 2 ; case 1 + .short _022523FE - _022523C8 - 2 ; case 2 + .short _02252428 - _022523C8 - 2 ; case 3 + .short _0225243A - _022523C8 - 2 ; case 4 + .short _022524A6 - _022523C8 - 2 ; case 5 + .short _022524CE - _022523C8 - 2 ; case 6 +_022523D6: + ldr r1, [r4, #0] + ldr r0, _02252504 ; =0x00000848 + ldr r0, [r1, r0] + bl ov17_0223F744 + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_022523EA: + bl ov17_0223F760 + cmp r0, #1 + beq _022523F4 + b _022524FE +_022523F4: + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_022523FE: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, _02252508 ; =0x0000046F + mov r1, #0x1e + bl sub_020055D0 + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_02252428: + bl sub_0200F2AC + cmp r0, #1 + bne _022524FE + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_0225243A: + ldr r0, [r4, #0] + bl ov17_02250A84 + ldr r0, [r4, #0] + bl ov17_02250AD8 + ldr r0, [r4, #0] + bl ov17_02250B00 + ldr r0, [r4, #0] + bl ov17_02250D28 + ldr r0, [r4, #0] + bl ov17_02250CEC + ldr r0, [r4, #0] + mov r1, #0 + add r0, #0x34 + mov r2, #1 + mov r3, #0xe + bl sub_0200E060 + ldr r0, [r4, #0] + mov r1, #0xff + add r0, #0x34 + bl sub_0201ADA4 + ldr r0, [r4, #0] + add r0, #0x34 + bl sub_0201A954 + mov r6, #0 + add r5, r6, #0 + mov r7, #6 +_0225247E: + ldr r0, [r4, #0] + add r1, r7, #0 + add r0, r0, r5 + ldr r0, [r0, #0x18] + mov r2, #1 + bl sub_02007DEC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0225247E + ldr r1, [r4, #0] + ldr r0, _0225250C ; =0x0000127F + mov r2, #1 + strb r2, [r1, r0] + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_022524A6: + bl sub_02005684 + cmp r0, #0 + bne _022524FE + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_022524CE: + bl sub_0200F2AC + cmp r0, #1 + bne _022524FE + ldr r0, _02252510 ; =0x0000049D + bl sub_0200549C + ldrb r0, [r4, #0x10] + add sp, #0xc + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, r7, pc} +_022524E6: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_022524FE: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02252504: .word 0x00000848 +_02252508: .word 0x0000046F +_0225250C: .word 0x0000127F +_02252510: .word 0x0000049D + thumb_func_end ov17_022523AC + + thumb_func_start ov17_02252514 +ov17_02252514: ; 0x02252514 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252514 + + thumb_func_start ov17_02252528 +ov17_02252528: ; 0x02252528 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x18 + str r1, [sp] + add r1, r0, #0 + add r6, r2, #0 + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x18 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp] + mov r2, #0 + str r0, [r4, #0] + ldrh r0, [r6] + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + str r7, [r4, #0xc] +_0225255C: + add r0, r5, r2 + ldrb r1, [r0, #3] + add r0, r4, r2 + add r2, r2, #1 + strb r1, [r0, #0x11] + cmp r2, #4 + blt _0225255C + ldr r0, _02252578 ; =ov17_02252580 + ldr r2, _0225257C ; =0x00007530 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02252578: .word ov17_02252580 +_0225257C: .word 0x00007530 + thumb_func_end ov17_02252528 + + thumb_func_start ov17_02252580 +ov17_02252580: ; 0x02252580 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #4 + bhi _022525F2 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02252598: ; jump table + .short _022525A2 - _02252598 - 2 ; case 0 + .short _022525A8 - _02252598 - 2 ; case 1 + .short _022525C6 - _02252598 - 2 ; case 2 + .short _022525E0 - _02252598 - 2 ; case 3 + .short _022525F2 - _02252598 - 2 ; case 4 +_022525A2: + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022525A8: + ldrb r1, [r4, #0x15] + mov r0, #3 + sub r2, r0, r1 + add r1, r4, r2 + ldrb r1, [r1, #0x11] + ldr r0, [r4, #0] + bl ov17_0225131C + ldrb r0, [r4, #0x15] + add r0, r0, #1 + strb r0, [r4, #0x15] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022525C6: + mov r0, #0x16 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x16] + ldrsh r0, [r4, r0] + cmp r0, #0x1e + ble _0225260A + mov r0, #0 + strh r0, [r4, #0x16] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022525E0: + ldrb r1, [r4, #0x15] + cmp r1, #4 + bhs _022525EC + mov r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022525EC: + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022525F2: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0225260A: + pop {r3, r4, r5, pc} + thumb_func_end ov17_02252580 + + thumb_func_start ov17_0225260C +ov17_0225260C: ; 0x0225260C + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_0225260C + + thumb_func_start ov17_02252620 +ov17_02252620: ; 0x02252620 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x18 + add r7, r1, #0 + add r1, r0, #0 + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x18 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _02252664 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r6, [r4, #0xc] + ldrb r0, [r0, #2] + strb r0, [r4, #0x11] + ldr r0, _02252668 ; =ov17_0225266C + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02252664: .word 0x00007530 +_02252668: .word ov17_0225266C + thumb_func_end ov17_02252620 + + thumb_func_start ov17_0225266C +ov17_0225266C: ; 0x0225266C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #6 + bhi _02252774 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02252686: ; jump table + .short _02252694 - _02252686 - 2 ; case 0 + .short _022526BC - _02252686 - 2 ; case 1 + .short _022526CA - _02252686 - 2 ; case 2 + .short _022526E2 - _02252686 - 2 ; case 3 + .short _022526F0 - _02252686 - 2 ; case 4 + .short _02252746 - _02252686 - 2 ; case 5 + .short _02252758 - _02252686 - 2 ; case 6 +_02252694: + ldr r0, [r4, #0] + bl ov17_02250FE4 + add r2, r4, #0 + ldr r0, [r4, #0] + mov r1, #0 + add r2, #0x12 + bl ov17_02251598 + ldr r0, _02252790 ; =0x0000049E + bl sub_0200549C + ldr r0, _02252794 ; =0x000006E5 + bl sub_02005748 + ldrb r0, [r4, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_022526BC: + ldrb r1, [r4, #0x12] + cmp r1, #1 + bne _0225278C + add r0, r0, #1 + add sp, #0x10 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_022526CA: + ldrb r1, [r4, #0x11] + add r3, r4, #0 + ldr r0, [r4, #0] + mov r2, #0 + add r3, #0x13 + bl ov17_02251718 + ldrb r0, [r4, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_022526E2: + ldrb r1, [r4, #0x13] + cmp r1, #1 + bne _0225278C + add r0, r0, #1 + add sp, #0x10 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_022526F0: + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0x10] + ldrb r0, [r4, #0x11] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #5 + bl sub_02074470 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r2, #0 + ldr r1, [r0, #0x10] + ldrb r0, [r4, #0x11] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x70 + bl sub_02074470 + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r2, #0x7f + str r2, [sp, #4] + str r1, [sp, #8] + mov r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + ldrb r6, [r4, #0x11] + ldr r0, [r0, #0] + add r2, #0xdd + lsl r6, r6, #2 + add r0, r0, r6 + ldr r0, [r0, r2] + lsl r2, r5, #0x10 + lsr r2, r2, #0x10 + bl sub_02077D3C + ldrb r0, [r4, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_02252746: + bl sub_0200598C + cmp r0, #0 + bne _0225278C + ldrb r0, [r4, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_02252758: + mov r0, #0x14 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x14] + ldrsh r0, [r4, r0] + cmp r0, #0x3c + ble _0225278C + mov r0, #0 + strh r0, [r4, #0x14] + ldrb r0, [r4, #0x10] + add sp, #0x10 + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_02252774: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_0225278C: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02252790: .word 0x0000049E +_02252794: .word 0x000006E5 + thumb_func_end ov17_0225266C + + thumb_func_start ov17_02252798 +ov17_02252798: ; 0x02252798 + push {r3, lr} + mov r1, #0x12 + lsl r2, r2, #0x10 + str r1, [sp] + mov r1, #0xff + lsr r2, r2, #0x10 + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252798 + + thumb_func_start ov17_022527AC +ov17_022527AC: ; 0x022527AC + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r5, r1, #0 + mov r0, #0x18 + mov r1, #0x24 + add r6, r2, #0 + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x24 + bl sub_020C4CF4 + str r5, [r4, #0] + ldrh r0, [r6] + strh r0, [r4, #4] + ldrh r0, [r6, #2] + strh r0, [r4, #6] + ldrh r0, [r6, #4] + strh r0, [r4, #8] + ldrh r0, [r6, #6] + strh r0, [r4, #0xa] + ldr r0, [sp] + str r0, [r4, #0xc] + ldrb r0, [r7, #7] + strb r0, [r4, #0x11] + ldrb r0, [r7, #7] + cmp r0, #0 + beq _022527F2 + cmp r0, #1 + beq _02252808 + cmp r0, #2 + beq _0225281E + b _02252834 +_022527F2: + ldr r0, _02252844 ; =0x0000041E + mov r2, #0 + add r3, r4, #0 +_022527F8: + ldrsh r1, [r5, r0] + add r2, r2, #1 + add r5, r5, #2 + strh r1, [r3, #0x14] + add r3, r3, #2 + cmp r2, #4 + blt _022527F8 + b _02252838 +_02252808: + ldr r0, _02252848 ; =0x00000426 + mov r3, #0 + add r2, r4, #0 +_0225280E: + ldrsh r1, [r5, r0] + add r3, r3, #1 + add r5, r5, #2 + strh r1, [r2, #0x14] + add r2, r2, #2 + cmp r3, #4 + blt _0225280E + b _02252838 +_0225281E: + ldr r0, _0225284C ; =0x0000042E + mov r3, #0 + add r2, r4, #0 +_02252824: + ldrsh r1, [r5, r0] + add r3, r3, #1 + add r5, r5, #2 + strh r1, [r2, #0x14] + add r2, r2, #2 + cmp r3, #4 + blt _02252824 + b _02252838 +_02252834: + bl sub_02022974 +_02252838: + ldr r0, _02252850 ; =ov17_02252858 + ldr r2, _02252854 ; =0x00007530 + add r1, r4, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02252844: .word 0x0000041E +_02252848: .word 0x00000426 +_0225284C: .word 0x0000042E +_02252850: .word ov17_02252858 +_02252854: .word 0x00007530 + thumb_func_end ov17_022527AC + + thumb_func_start ov17_02252858 +ov17_02252858: ; 0x02252858 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #5 + bhi _02252948 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02252870: ; jump table + .short _0225287C - _02252870 - 2 ; case 0 + .short _0225288A - _02252870 - 2 ; case 1 + .short _022528A4 - _02252870 - 2 ; case 2 + .short _022528C6 - _02252870 - 2 ; case 3 + .short _0225291C - _02252870 - 2 ; case 4 + .short _02252948 - _02252870 - 2 ; case 5 +_0225287C: + ldr r0, _02252964 ; =0x000006FA + bl sub_02005748 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0225288A: + mov r0, #0x12 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x12] + ldrsh r0, [r4, r0] + cmp r0, #0x2d + ble _02252960 + mov r0, #0 + strh r0, [r4, #0x12] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_022528A4: + mov r2, #0 + add r3, r4, #0 + mov r0, #0x14 +_022528AA: + ldrsh r1, [r3, r0] + cmp r1, #0 + ble _022528B8 + ldr r0, _02252968 ; =0x000006FB + bl sub_02005748 + b _022528C0 +_022528B8: + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #4 + blt _022528AA +_022528C0: + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] +_022528C6: + mov r0, #0x12 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x12] + ldrsh r0, [r4, r0] + cmp r0, #1 + blt _02252960 + mov r6, #0 + strh r6, [r4, #0x12] + add r5, r6, #0 + mov r7, #0x14 +_022528DC: + ldr r0, [r4, #0] + mov r2, #0x1c + add r1, r0, r5 + mov r0, #0xf3 + lsl r0, r0, #2 + ldrb r1, [r1, r0] + lsl r0, r1, #1 + add r0, r4, r0 + ldrsh r2, [r0, r2] + add r2, r2, #1 + strh r2, [r0, #0x1c] + mov r2, #0x1c + ldrsh r3, [r0, r2] + ldrsh r0, [r0, r7] + cmp r3, r0 + bgt _02252908 + str r5, [sp] + ldrb r2, [r4, #0x11] + ldr r0, [r4, #0] + bl ov17_022513F4 + b _0225290A +_02252908: + add r6, r6, #1 +_0225290A: + add r5, r5, #1 + cmp r5, #4 + blt _022528DC + cmp r6, #4 + blt _02252960 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_0225291C: + mov r3, #0 + add r2, r4, #0 + mov r0, #0x14 +_02252922: + ldrsh r1, [r2, r0] + cmp r1, #0 + ble _02252930 + ldr r0, _0225296C ; =0x000006F9 + bl sub_02005748 + b _02252938 +_02252930: + add r3, r3, #1 + add r2, r2, #2 + cmp r3, #4 + blt _02252922 +_02252938: + ldr r0, _02252964 ; =0x000006FA + mov r1, #0 + bl sub_020057A4 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_02252948: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02252960: + pop {r3, r4, r5, r6, r7, pc} + nop +_02252964: .word 0x000006FA +_02252968: .word 0x000006FB +_0225296C: .word 0x000006F9 + thumb_func_end ov17_02252858 + + thumb_func_start ov17_02252970 +ov17_02252970: ; 0x02252970 + push {r3, lr} + lsl r2, r2, #0x10 + mov r3, #0 + mov r1, #0xff + lsr r2, r2, #0x10 + str r3, [sp] + bl ov17_0224F1F8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252970 + + thumb_func_start ov17_02252984 +ov17_02252984: ; 0x02252984 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #0x18 + mov r1, #0x14 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r7, [r4, #0] + ldrh r0, [r5] + ldr r2, _022529C0 ; =0x00007530 + add r1, r4, #0 + strh r0, [r4, #4] + ldrh r0, [r5, #2] + strh r0, [r4, #6] + ldrh r0, [r5, #4] + strh r0, [r4, #8] + ldrh r0, [r5, #6] + strh r0, [r4, #0xa] + ldr r0, _022529C4 ; =ov17_022529C8 + str r6, [r4, #0xc] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022529C0: .word 0x00007530 +_022529C4: .word ov17_022529C8 + thumb_func_end ov17_02252984 + + thumb_func_start ov17_022529C8 +ov17_022529C8: ; 0x022529C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x10] + cmp r0, #0 + beq _022529DE + cmp r0, #1 + beq _022529FE + cmp r0, #2 + beq _02252A2E + b _02252A48 +_022529DE: + mov r0, #3 + str r0, [sp] + mov r0, #0x5a + mov r1, #0x10 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, _02252A64 ; =0x0000049E + mov r1, #0x5a + bl sub_020055D0 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_022529FE: + mov r0, #3 + bl sub_0200AC1C + cmp r0, #1 + bne _02252A60 + bl sub_02005684 + cmp r0, #0 + bne _02252A60 + ldr r0, [r4, #0] + bl ov17_02251020 + ldr r0, _02252A68 ; =0x0400006C + mov r1, #0x10 + bl sub_020BDEC4 + ldr r0, _02252A6C ; =0x0400106C + mov r1, #0x10 + bl sub_020BDEC4 + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02252A2E: + mov r0, #0x12 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, #0x12] + ldrsh r0, [r4, r0] + cmp r0, #0x3c + ble _02252A60 + mov r0, #0 + strh r0, [r4, #0x12] + ldrb r0, [r4, #0x10] + add r0, r0, #1 + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_02252A48: + mov r2, #0 + ldr r0, [r4, #0xc] + add r1, r4, #4 + add r3, r2, #0 + bl ov17_0224F26C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02252A60: + pop {r3, r4, r5, pc} + nop +_02252A64: .word 0x0000049E +_02252A68: .word 0x0400006C +_02252A6C: .word 0x0400106C + thumb_func_end ov17_022529C8 + + .rodata + + + .global Unk_ov17_02254CF8 +Unk_ov17_02254CF8: ; 0x02254CF8 + .incbin "incbin/overlay17_rodata.bin", 0x1F6C, 0x1F74 - 0x1F6C + + .global Unk_ov17_02254D00 +Unk_ov17_02254D00: ; 0x02254D00 + .incbin "incbin/overlay17_rodata.bin", 0x1F74, 0x1F8C - 0x1F74 + + .global Unk_ov17_02254D18 +Unk_ov17_02254D18: ; 0x02254D18 + .incbin "incbin/overlay17_rodata.bin", 0x1F8C, 0x84 + diff --git a/asm/ov17_02252A70.s b/asm/ov17_02252A70.s new file mode 100644 index 000000000..108f001e9 --- /dev/null +++ b/asm/ov17_02252A70.s @@ -0,0 +1,46 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02252A70 +ov17_02252A70: ; 0x02252A70 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r5, r0, #0 + add r7, r1, #0 + add r4, r6, #0 +_02252A7A: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202A488 + cmp r0, #1 + bne _02252A92 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202A580 + ldrb r0, [r7, r0] + add r6, r6, r0 +_02252A92: + add r4, r4, #1 + cmp r4, #0x14 + blt _02252A7A + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov17_02252A70 + + thumb_func_start ov17_02252A9C +ov17_02252A9C: ; 0x02252A9C + push {r3, lr} + add r3, r0, #0 + mov r2, #0 + mov r0, #0x5a + add r1, r1, #3 + str r2, [sp] + bl sub_02006FE8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov17_02252A9C \ No newline at end of file diff --git a/asm/ov17_02252AB0.s b/asm/ov17_02252AB0.s new file mode 100644 index 000000000..f85a51756 --- /dev/null +++ b/asm/ov17_02252AB0.s @@ -0,0 +1,306 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02252AB0 +ov17_02252AB0: ; 0x02252AB0 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0x1b + str r0, [sp] + mov r0, #0x50 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, [sp, #0x28] + add r4, r1, #0 + add r6, r3, #0 + str r0, [sp, #0x14] + add r0, r2, #0 + mov r1, #3 + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200CD7C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x1b + mov r3, #0xfa + str r6, [sp, #8] + bl sub_0200CBDC + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x2c] + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0xfb + bl sub_0200CE0C + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x30] + add r1, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1b + mov r3, #0xfc + bl sub_0200CE3C + add sp, #0x18 + pop {r4, r5, r6, pc} + thumb_func_end ov17_02252AB0 + + thumb_func_start ov17_02252B20 +ov17_02252B20: ; 0x02252B20 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0200D070 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D080 + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200D090 + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl sub_0200D0A0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02252B20 + + thumb_func_start ov17_02252B48 +ov17_02252B48: ; 0x02252B48 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r3, #0 + mov ip, r2 + ldr r3, _02252BC0 ; =0x02254D9C + add r6, r0, #0 + add r7, r1, #0 + add r2, sp, #4 + mov r4, #6 +_02252B5A: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r4, r4, #1 + bne _02252B5A + ldr r0, [r3, #0] + mov r1, #0x18 + str r0, [r2, #0] + ldr r0, [sp, #0x50] + str r5, [sp, #0x18] + str r0, [sp, #0x1c] + ldr r0, [sp, #0x54] + str r0, [sp, #0x20] + ldr r0, [sp, #0x58] + str r0, [sp, #0x24] + ldr r0, [sp, #0x5c] + str r0, [sp, #0xc] + ldr r0, [sp, #0x60] + str r0, [sp, #0x30] + mov r0, ip + bl sub_02018144 + mov r1, #0 + mov r2, #0x18 + str r0, [sp] + bl sub_020C4CF4 + ldr r5, [sp] + mov r4, #0 +_02252B92: + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #4 + bl sub_0200CE6C + mov r1, #0 + stmia r5!, {r0} + bl sub_0200D3F4 + add r4, r4, #1 + cmp r4, #5 + blt _02252B92 + ldr r0, _02252BC4 ; =ov17_02252CB8 + ldr r1, [sp] + ldr r2, _02252BC8 ; =0x00009C40 + bl sub_0200D9E8 + ldr r1, [sp] + str r0, [r1, #0x14] + add r0, r1, #0 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02252BC0: .word 0x02254D9C +_02252BC4: .word ov17_02252CB8 +_02252BC8: .word 0x00009C40 + thumb_func_end ov17_02252B48 + + thumb_func_start ov17_02252BCC +ov17_02252BCC: ; 0x02252BCC + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02252BD4: + ldr r0, [r5, #0] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _02252BD4 + ldr r0, [r6, #0x14] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov17_02252BCC + + thumb_func_start ov17_02252BF0 +ov17_02252BF0: ; 0x02252BF0 + push {r4, r5, r6, lr} + add r5, r0, #0 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r4, [sp, #0x24] + add r6, r3, #0 + ldr r0, [r5, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r2, [sp, #0x10] + lsl r1, r6, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #4] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x18] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #8] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, #0xc] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + add r3, r4, #0 + bl sub_0200D500 + ldr r0, [r5, #0] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r5, #8] + mov r1, #2 + bl sub_0200D364 + ldr r0, [r5, #0xc] + mov r1, #3 + bl sub_0200D364 + mov r4, #0 + mov r6, #1 +_02252C66: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02252C66 + pop {r4, r5, r6, pc} + thumb_func_end ov17_02252BF0 + + thumb_func_start ov17_02252C78 +ov17_02252C78: ; 0x02252C78 + push {r4, lr} + sub sp, #0x18 + add r4, r2, #0 + str r3, [sp] + ldr r2, [sp, #0x20] + str r1, [sp, #4] + str r2, [sp, #8] + str r4, [sp, #0xc] + str r2, [sp, #0x10] + ldr r2, [sp, #0x24] + str r2, [sp, #0x14] + add r2, r3, #0 + add r3, r4, #0 + bl ov17_02252BF0 + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov17_02252C78 + + thumb_func_start ov17_02252C9C +ov17_02252C9C: ; 0x02252C9C + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_02252CA4: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _02252CA4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02252C9C + + thumb_func_start ov17_02252CB8 +ov17_02252CB8: ; 0x02252CB8 + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r0, [r6, #0] + bl sub_0200D408 + cmp r0, #0 + beq _02252CE8 + mov r4, #0 + add r5, r6, #0 +_02252CCA: + ldr r0, [r5, #0] + bl sub_0200D330 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02252CCA + ldr r0, [r6, #0x10] + bl sub_0200D408 + cmp r0, #1 + bne _02252CE8 + ldr r0, [r6, #0x10] + bl sub_0200D330 +_02252CE8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov17_02252CB8 + + .rodata + + + .global Unk_ov17_02254D9C +Unk_ov17_02254D9C: ; 0x02254D9C + .incbin "incbin/overlay17_rodata.bin", 0x2010, 0x34 + diff --git a/asm/ov17_02252CEC.s b/asm/ov17_02252CEC.s new file mode 100644 index 000000000..d5324d0b7 --- /dev/null +++ b/asm/ov17_02252CEC.s @@ -0,0 +1,95 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov17_02252CEC +ov17_02252CEC: ; 0x02252CEC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x17 + lsl r0, r0, #4 + add r6, r1, #0 + ldrb r1, [r3, r0] + str r2, [sp] + cmp r1, #0 + bne _02252D08 + sub r0, r0, #4 + ldr r1, [r3, r0] + ldr r0, _02252D6C ; =0x000004FC + add r4, r1, r0 + b _02252D3A +_02252D08: + cmp r1, #1 + bne _02252D16 + sub r0, r0, #4 + ldr r1, [r3, r0] + ldr r0, _02252D70 ; =0x00001174 + add r4, r1, r0 + b _02252D3A +_02252D16: + cmp r1, #2 + bne _02252D26 + sub r0, r0, #4 + ldr r1, [r3, r0] + mov r0, #0xc3 + lsl r0, r0, #4 + add r4, r1, r0 + b _02252D3A +_02252D26: + cmp r1, #3 + bne _02252D34 + sub r0, r0, #4 + ldr r1, [r3, r0] + ldr r0, _02252D74 ; =0x0000085C + add r4, r1, r0 + b _02252D3A +_02252D34: + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} +_02252D3A: + mov r0, #2 + lsl r0, r0, #8 + cmp r6, r0 + ble _02252D46 + bl sub_02022974 +_02252D46: + ldr r0, _02252D78 ; =0x00000A11 + add r7, r4, r0 + ldrb r0, [r7, r5] + cmp r0, #0 + beq _02252D54 + bl sub_02022974 +_02252D54: + mov r1, #0x21 + lsl r1, r1, #4 + add r2, r4, r1 + lsl r1, r5, #9 + add r1, r2, r1 + ldr r0, [sp] + add r2, r6, #0 + bl sub_020C4DB0 + mov r0, #1 + strb r0, [r7, r5] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02252D6C: .word 0x000004FC +_02252D70: .word 0x00001174 +_02252D74: .word 0x0000085C +_02252D78: .word 0x00000A11 + thumb_func_end ov17_02252CEC + + thumb_func_start ov17_02252D7C +ov17_02252D7C: ; 0x02252D7C + mov r0, #0x5b + lsl r0, r0, #2 + ldr r0, [r3, r0] + ldr r3, _02252D88 ; =ov17_0224B20C + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_02252D88: .word ov17_0224B20C + thumb_func_end ov17_02252D7C \ No newline at end of file diff --git a/asm/ov19_021D0D80.s b/asm/ov19_021D0D80.s new file mode 100644 index 000000000..01e14c80a --- /dev/null +++ b/asm/ov19_021D0D80.s @@ -0,0 +1,10648 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021D0D80 +ov19_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + mov r2, #1 + add r5, r0, #0 + mov r0, #3 + mov r1, #9 + lsl r2, r2, #0xe + bl sub_02017FC8 + mov r2, #0xf + mov r0, #3 + mov r1, #0xa + lsl r2, r2, #0xe + bl sub_02017FC8 + mov r1, #0x87 + add r0, r5, #0 + lsl r1, r1, #2 + mov r2, #9 + bl sub_0200681C + add r4, r0, #0 + beq _021D0DE4 + add r0, r5, #0 + bl sub_02006840 + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D4BE0 + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, #0 + add r2, r4, #0 + bl ov19_021D61B0 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + bl ov19_021D0ECC + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, _021D0DE8 ; =ov19_021D0F20 + add r0, r4, #0 + bl ov19_021D0EB0 +_021D0DE4: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D0DE8: .word ov19_021D0F20 + thumb_func_end ov19_021D0D80 + + thumb_func_start ov19_021D0DEC +ov19_021D0DEC: ; 0x021D0DEC + push {r4, lr} + bl sub_0200682C + mov r1, #0x6b + add r4, r0, #0 + lsl r1, r1, #2 + ldr r2, [r4, r1] + cmp r2, #0 + beq _021D0E08 + add r1, #8 + add r1, r4, r1 + blx r2 + mov r0, #0 + pop {r4, pc} +_021D0E08: + sub r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D0E4A + ldr r0, _021D0E54 ; =0x021BF67C + ldr r2, [r0, #0x48] + mov r0, #2 + lsl r0, r0, #0xa + tst r0, r2 + beq _021D0E3E + sub r1, #0x98 + ldr r0, [r4, r1] + bl ov19_021D6628 + cmp r0, #1 + bne _021D0E3E + add r0, r4, #0 + bl ov19_021D5DD8 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x2b + bl ov19_021D6594 + mov r0, #0 + pop {r4, pc} +_021D0E3E: + mov r1, #0x6a + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r4, #0 + blx r1 + pop {r4, pc} +_021D0E4A: + bl sub_02022974 + mov r0, #1 + pop {r4, pc} + nop +_021D0E54: .word 0x021BF67C + thumb_func_end ov19_021D0DEC + + thumb_func_start ov19_021D0E58 +ov19_021D0E58: ; 0x021D0E58 + push {r4, lr} + bl sub_0200682C + mov r1, #0x49 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0x95 + bl sub_0207A230 + cmp r0, #0 + bne _021D0E7E + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0202CC98 + bl sub_0202CCA8 +_021D0E7E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D64A0 + add r0, r4, #0 + bl ov19_021D4D58 + mov r0, #9 + bl sub_0201807C + mov r0, #0xa + bl sub_0201807C + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D0E58 + + thumb_func_start ov19_021D0EA0 +ov19_021D0EA0: ; 0x021D0EA0 + mov r2, #0x6a + lsl r2, r2, #2 + str r1, [r0, r2] + mov r1, #0 + add r2, #8 + str r1, [r0, r2] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D0EA0 + + thumb_func_start ov19_021D0EB0 +ov19_021D0EB0: ; 0x021D0EB0 + mov r2, #0x6b + lsl r2, r2, #2 + str r1, [r0, r2] + mov r1, #0 + add r2, #8 + str r1, [r0, r2] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D0EB0 + + thumb_func_start ov19_021D0EC0 +ov19_021D0EC0: ; 0x021D0EC0 + mov r1, #0x6b + mov r2, #0 + lsl r1, r1, #2 + str r2, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D0EC0 + + thumb_func_start ov19_021D0ECC +ov19_021D0ECC: ; 0x021D0ECC + push {r3, lr} + bl ov19_021D5E10 + cmp r0, #4 + bhi _021D0EEC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D0EE2: ; jump table + .short _021D0EEC - _021D0EE2 - 2 ; case 0 + .short _021D0EF0 - _021D0EE2 - 2 ; case 1 + .short _021D0EF4 - _021D0EE2 - 2 ; case 2 + .short _021D0EFC - _021D0EE2 - 2 ; case 3 + .short _021D0EF8 - _021D0EE2 - 2 ; case 4 +_021D0EEC: + ldr r0, _021D0F00 ; =ov19_021D0FF0 + pop {r3, pc} +_021D0EF0: + ldr r0, _021D0F04 ; =ov19_021D1270 + pop {r3, pc} +_021D0EF4: + ldr r0, _021D0F08 ; =ov19_021D15C0 + pop {r3, pc} +_021D0EF8: + ldr r0, _021D0F0C ; =ov19_021D17AC + pop {r3, pc} +_021D0EFC: + ldr r0, _021D0F10 ; =ov19_021D19B8 + pop {r3, pc} + ; .align 2, 0 +_021D0F00: .word ov19_021D0FF0 +_021D0F04: .word ov19_021D1270 +_021D0F08: .word ov19_021D15C0 +_021D0F0C: .word ov19_021D17AC +_021D0F10: .word ov19_021D19B8 + thumb_func_end ov19_021D0ECC + + thumb_func_start ov19_021D0F14 +ov19_021D0F14: ; 0x021D0F14 + mov r1, #0x46 + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r2, #1 + str r2, [r0, #8] + bx lr + thumb_func_end ov19_021D0F14 + + thumb_func_start ov19_021D0F20 +ov19_021D0F20: ; 0x021D0F20 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D0F36 + cmp r0, #1 + beq _021D0F4A + cmp r0, #2 + beq _021D0F6E + pop {r3, r4, r5, pc} +_021D0F36: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D0F4A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl ov19_021D6600 + cmp r0, #0 + beq _021D0F84 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D0F6E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl ov19_021D6600 + cmp r0, #0 + beq _021D0F84 + add r0, r5, #0 + bl ov19_021D0EC0 +_021D0F84: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D0F20 + + thumb_func_start ov19_021D0F88 +ov19_021D0F88: ; 0x021D0F88 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D0F9E + cmp r0, #1 + beq _021D0FB2 + cmp r0, #2 + beq _021D0FD6 + pop {r3, r4, r5, pc} +_021D0F9E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D0FB2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl ov19_021D6600 + cmp r0, #0 + beq _021D0FEC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D0FD6: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + bl ov19_021D6600 + cmp r0, #0 + beq _021D0FEC + add r0, r5, #0 + bl ov19_021D0EC0 +_021D0FEC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D0F88 + + thumb_func_start ov19_021D0FF0 +ov19_021D0FF0: ; 0x021D0FF0 + push {r4, lr} + mov r1, #0x1b + add r4, r0, #0 + lsl r1, r1, #4 + ldr r2, [r4, r1] + cmp r2, #0 + beq _021D100C + cmp r2, #1 + bne _021D1004 + b _021D11DE +_021D1004: + cmp r2, #2 + bne _021D100A + b _021D11FC +_021D100A: + b _021D1210 +_021D100C: + ldr r1, _021D1214 ; =0x021BF67C + ldr r2, [r1, #0x48] + mov r1, #1 + tst r1, r2 + beq _021D103C + bl ov19_021D5E4C + cmp r0, #0 + beq _021D103C + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D1032 + ldr r1, _021D1218 ; =ov19_021D20A4 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1210 +_021D1032: + ldr r1, _021D121C ; =ov19_021D2308 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1210 +_021D103C: + ldr r0, _021D1214 ; =0x021BF67C + mov r2, #2 + ldr r1, [r0, #0x48] + tst r1, r2 + beq _021D1050 + ldr r1, _021D1220 ; =ov19_021D1F5C + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1210 +_021D1050: + ldr r0, [r0, #0x44] + lsl r1, r2, #8 + tst r1, r0 + beq _021D1068 + add r0, r4, #0 + bl ov19_021D5CE8 + ldr r1, _021D1224 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1210 +_021D1068: + add r2, #0xfe + add r1, r0, #0 + tst r1, r2 + beq _021D1080 + add r0, r4, #0 + bl ov19_021D5CBC + ldr r1, _021D1224 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1210 +_021D1080: + add r1, r4, #0 + bl ov19_021D4F74 + cmp r0, #0 + beq _021D10B8 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D10AC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D10AC: + mov r0, #0x1b + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _021D1210 +_021D10B8: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D10DA + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D1102 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D10DC + cmp r0, #1 + beq _021D10E6 +_021D10DA: + b _021D11CE +_021D10DC: + ldr r1, _021D1228 ; =ov19_021D4640 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D11CE +_021D10E6: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D10FA + ldr r1, _021D122C ; =ov19_021D4938 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D11CE +_021D10FA: + ldr r0, _021D1230 ; =0x000005F3 + bl sub_02005748 + b _021D11CE +_021D1102: + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D1116 + cmp r0, #1 + beq _021D1164 + cmp r0, #2 + beq _021D11B2 + b _021D11CE +_021D1116: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #0 + bne _021D115C + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D115C + ldr r0, _021D1234 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #1 + b _021D11D0 +_021D115C: + ldr r0, _021D1230 ; =0x000005F3 + bl sub_02005748 + b _021D11CE +_021D1164: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #1 + bne _021D11AA + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D11AA + ldr r0, _021D1234 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #1 + b _021D11D0 +_021D11AA: + ldr r0, _021D1230 ; =0x000005F3 + bl sub_02005748 + b _021D11CE +_021D11B2: + ldr r0, _021D1234 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B80 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x32 + bl ov19_021D6594 + mov r0, #1 + b _021D11D0 +_021D11CE: + mov r0, #0 +_021D11D0: + cmp r0, #0 + beq _021D1210 + mov r0, #0x1b + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1210 +_021D11DE: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1210 + add r0, r4, #0 + bl ov19_021D0ECC + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D0EA0 + b _021D1210 +_021D11FC: + sub r1, #0x9c + ldr r0, [r4, r1] + bl ov19_021D6628 + cmp r0, #0 + beq _021D1210 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] +_021D1210: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D1214: .word 0x021BF67C +_021D1218: .word ov19_021D20A4 +_021D121C: .word ov19_021D2308 +_021D1220: .word ov19_021D1F5C +_021D1224: .word ov19_021D45A8 +_021D1228: .word ov19_021D4640 +_021D122C: .word ov19_021D4938 +_021D1230: .word 0x000005F3 +_021D1234: .word 0x000005DD + thumb_func_end ov19_021D0FF0 + + thumb_func_start ov19_021D1238 +ov19_021D1238: ; 0x021D1238 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov19_021D5E74 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _021D1256 + mov r0, #0x1e + str r0, [r4, #0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D1256: + add r0, r5, #0 + mov r1, #0xa2 + mov r2, #0 + bl ov19_021D5FD0 + cmp r0, #0 + beq _021D126C + mov r0, #0x1d + str r0, [r4, #0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D126C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D1238 + + thumb_func_start ov19_021D1270 +ov19_021D1270: ; 0x021D1270 + push {r3, r4, lr} + sub sp, #4 + mov r1, #0x1b + add r4, r0, #0 + lsl r1, r1, #4 + ldr r2, [r4, r1] + cmp r2, #6 + bhi _021D12C0 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D128C: ; jump table + .short _021D129A - _021D128C - 2 ; case 0 + .short _021D1474 - _021D128C - 2 ; case 1 + .short _021D148E - _021D128C - 2 ; case 2 + .short _021D14F8 - _021D128C - 2 ; case 3 + .short _021D1538 - _021D128C - 2 ; case 4 + .short _021D1556 - _021D128C - 2 ; case 5 + .short _021D15A4 - _021D128C - 2 ; case 6 +_021D129A: + ldr r1, _021D1584 ; =0x021BF67C + mov r2, #1 + ldr r1, [r1, #0x48] + tst r2, r1 + beq _021D12E0 + bl ov19_021D5E2C + cmp r0, #6 + bne _021D12B6 + mov r0, #0x1b + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D12B6: + add r0, r4, #0 + bl ov19_021D5E4C + cmp r0, #0 + bne _021D12C2 +_021D12C0: + b _021D15B8 +_021D12C2: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D12D6 + ldr r1, _021D1588 ; =ov19_021D20A4 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D15B8 +_021D12D6: + ldr r1, _021D158C ; =ov19_021D2308 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D15B8 +_021D12E0: + mov r2, #2 + tst r2, r1 + bne _021D130A + mov r2, #0x10 + tst r1, r2 + beq _021D12F6 + bl ov19_021D5E2C + mov r1, #1 + tst r0, r1 + bne _021D130A +_021D12F6: + ldr r0, _021D1584 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x10 + tst r0, r1 + beq _021D1314 + add r0, r4, #0 + bl ov19_021D5E2C + cmp r0, #6 + bne _021D1314 +_021D130A: + mov r0, #0x1b + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D1314: + ldr r0, _021D1584 ; =0x021BF67C + add r1, r4, #0 + ldr r0, [r0, #0x44] + bl ov19_021D4F74 + cmp r0, #0 + beq _021D134E + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D1344 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D1344: + mov r0, #0x1b + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D134E: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D1370 + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D1398 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D1372 + cmp r0, #1 + beq _021D137C +_021D1370: + b _021D1464 +_021D1372: + ldr r1, _021D1590 ; =ov19_021D4640 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1464 +_021D137C: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D1390 + ldr r1, _021D1594 ; =ov19_021D4938 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1464 +_021D1390: + ldr r0, _021D1598 ; =0x000005F3 + bl sub_02005748 + b _021D1464 +_021D1398: + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D13AC + cmp r0, #1 + beq _021D13FA + cmp r0, #2 + beq _021D1448 + b _021D1464 +_021D13AC: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #0 + bne _021D13F2 + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D13F2 + ldr r0, _021D159C ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #1 + b _021D1466 +_021D13F2: + ldr r0, _021D1598 ; =0x000005F3 + bl sub_02005748 + b _021D1464 +_021D13FA: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #1 + bne _021D1440 + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D1440 + ldr r0, _021D159C ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #1 + b _021D1466 +_021D1440: + ldr r0, _021D1598 ; =0x000005F3 + bl sub_02005748 + b _021D1464 +_021D1448: + ldr r0, _021D159C ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B80 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x32 + bl ov19_021D6594 + mov r0, #1 + b _021D1466 +_021D1464: + mov r0, #0 +_021D1466: + cmp r0, #0 + beq _021D1482 + mov r0, #0x1b + mov r1, #6 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D1474: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + bne _021D1484 +_021D1482: + b _021D15B8 +_021D1484: + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D148E: + bl ov19_021D5E08 + cmp r0, #0 + bne _021D14A8 + ldr r1, _021D15A0 ; =ov19_021D1F5C + add r0, r4, #0 + bl ov19_021D0EB0 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D14A8: + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + beq _021D14E2 + add r0, r4, #0 + add r1, sp, #0 + bl ov19_021D1238 + cmp r0, #0 + beq _021D14E2 + ldr r0, _021D1598 ; =0x000005F3 + bl sub_02005748 + ldr r1, [sp] + add r0, r4, #0 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #5 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D14E2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x24 + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #3 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D14F8: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #0x24 + bl ov19_021D6600 + cmp r0, #0 + beq _021D15B8 + add r0, r4, #0 + bl ov19_021D52D0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D152E + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D152E: + mov r0, #0x1b + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 +_021D1538: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + beq _021D15B8 + add r0, r4, #0 + bl ov19_021D0ECC + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D0EA0 + b _021D15B8 +_021D1556: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D15B8 + ldr r0, _021D1584 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D15B8 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D15B8 + ; .align 2, 0 +_021D1584: .word 0x021BF67C +_021D1588: .word ov19_021D20A4 +_021D158C: .word ov19_021D2308 +_021D1590: .word ov19_021D4640 +_021D1594: .word ov19_021D4938 +_021D1598: .word 0x000005F3 +_021D159C: .word 0x000005DD +_021D15A0: .word ov19_021D1F5C +_021D15A4: + sub r1, #0x9c + ldr r0, [r4, r1] + bl ov19_021D6628 + cmp r0, #0 + beq _021D15B8 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] +_021D15B8: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D1270 + + thumb_func_start ov19_021D15C0 +ov19_021D15C0: ; 0x021D15C0 + push {r3, r4, r5, lr} + mov r3, #0x1b + add r4, r0, #0 + lsl r3, r3, #4 + ldr r1, [r4, r3] + cmp r1, #0 + beq _021D15D6 + cmp r1, #1 + bne _021D15D4 + b _021D176C +_021D15D4: + b _021D1788 +_021D15D6: + ldr r5, _021D178C ; =0x021BF67C + add r2, r3, #0 + ldr r1, [r5, #0x44] + add r2, #0x70 + tst r2, r1 + beq _021D15F0 + bl ov19_021D5CE8 + ldr r1, _021D1790 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1788 +_021D15F0: + sub r3, #0xa0 + add r2, r1, #0 + tst r2, r3 + beq _021D1606 + bl ov19_021D5CBC + ldr r1, _021D1790 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1788 +_021D1606: + ldr r3, [r5, #0x48] + mov r2, #1 + tst r2, r3 + beq _021D1616 + ldr r1, _021D1794 ; =ov19_021D2694 + bl ov19_021D0EB0 + b _021D1788 +_021D1616: + mov r2, #2 + tst r2, r3 + beq _021D1624 + ldr r1, _021D1798 ; =ov19_021D1F5C + bl ov19_021D0EB0 + b _021D1788 +_021D1624: + add r0, r1, #0 + add r1, r4, #0 + bl ov19_021D4F74 + cmp r0, #0 + beq _021D165C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D1652 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D1652: + mov r0, #0x1b + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1788 +_021D165C: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D167E + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D16A6 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D1680 + cmp r0, #1 + beq _021D168A +_021D167E: + b _021D1788 +_021D1680: + ldr r1, _021D179C ; =ov19_021D4640 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1788 +_021D168A: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D169E + ldr r1, _021D17A0 ; =ov19_021D4938 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1788 +_021D169E: + ldr r0, _021D17A4 ; =0x000005F3 + bl sub_02005748 + b _021D1788 +_021D16A6: + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D16BA + cmp r0, #1 + beq _021D1706 + cmp r0, #2 + beq _021D1752 + b _021D1788 +_021D16BA: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #0 + bne _021D16FE + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D16FE + ldr r0, _021D17A8 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + b _021D1788 +_021D16FE: + ldr r0, _021D17A4 ; =0x000005F3 + bl sub_02005748 + b _021D1788 +_021D1706: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #1 + bne _021D174A + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D174A + ldr r0, _021D17A8 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + b _021D1788 +_021D174A: + ldr r0, _021D17A4 ; =0x000005F3 + bl sub_02005748 + b _021D1788 +_021D1752: + ldr r0, _021D17A8 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B80 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x32 + bl ov19_021D6594 + b _021D1788 +_021D176C: + sub r3, #0x9c + ldr r0, [r4, r3] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1788 + add r0, r4, #0 + bl ov19_021D0ECC + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D0EA0 +_021D1788: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D178C: .word 0x021BF67C +_021D1790: .word ov19_021D45A8 +_021D1794: .word ov19_021D2694 +_021D1798: .word ov19_021D1F5C +_021D179C: .word ov19_021D4640 +_021D17A0: .word ov19_021D4938 +_021D17A4: .word 0x000005F3 +_021D17A8: .word 0x000005DD + thumb_func_end ov19_021D15C0 + + thumb_func_start ov19_021D17AC +ov19_021D17AC: ; 0x021D17AC + push {r3, r4, r5, lr} + mov r1, #0x1b + add r4, r0, #0 + lsl r1, r1, #4 + ldr r2, [r4, r1] + cmp r2, #0 + beq _021D17C8 + cmp r2, #1 + bne _021D17C0 + b _021D195E +_021D17C0: + cmp r2, #2 + bne _021D17C6 + b _021D1976 +_021D17C6: + b _021D1992 +_021D17C8: + ldr r3, _021D1998 ; =0x021BF67C + mov r1, #1 + ldr r5, [r3, #0x48] + tst r1, r5 + beq _021D17DA + ldr r1, _021D199C ; =ov19_021D1DEC + bl ov19_021D0EB0 + b _021D1992 +_021D17DA: + mov r2, #2 + add r1, r5, #0 + tst r1, r2 + beq _021D17EA + ldr r1, _021D19A0 ; =ov19_021D1F5C + bl ov19_021D0EB0 + b _021D1992 +_021D17EA: + ldr r3, [r3, #0x44] + lsl r1, r2, #8 + tst r1, r3 + beq _021D1800 + bl ov19_021D5CE8 + ldr r1, _021D19A4 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1992 +_021D1800: + add r2, #0xfe + add r1, r3, #0 + tst r1, r2 + beq _021D1816 + bl ov19_021D5CBC + ldr r1, _021D19A4 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1992 +_021D1816: + add r0, r3, #0 + add r1, r4, #0 + bl ov19_021D4F74 + cmp r0, #0 + beq _021D184E + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D1844 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D1844: + mov r0, #0x1b + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1992 +_021D184E: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D1870 + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D1898 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D1872 + cmp r0, #1 + beq _021D187C +_021D1870: + b _021D1992 +_021D1872: + ldr r1, _021D19A8 ; =ov19_021D4640 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1992 +_021D187C: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D1890 + ldr r1, _021D19AC ; =ov19_021D4938 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1992 +_021D1890: + ldr r0, _021D19B0 ; =0x000005F3 + bl sub_02005748 + b _021D1992 +_021D1898: + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D18AC + cmp r0, #1 + beq _021D18F8 + cmp r0, #2 + beq _021D1944 + b _021D1992 +_021D18AC: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #0 + bne _021D18F0 + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D18F0 + ldr r0, _021D19B4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + b _021D1992 +_021D18F0: + ldr r0, _021D19B0 ; =0x000005F3 + bl sub_02005748 + b _021D1992 +_021D18F8: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #1 + bne _021D193C + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D193C + ldr r0, _021D19B4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + b _021D1992 +_021D193C: + ldr r0, _021D19B0 ; =0x000005F3 + bl sub_02005748 + b _021D1992 +_021D1944: + ldr r0, _021D19B4 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B80 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x32 + bl ov19_021D6594 + b _021D1992 +_021D195E: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #4 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1992 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1992 +_021D1976: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1992 + add r0, r4, #0 + bl ov19_021D0ECC + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D0EA0 +_021D1992: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D1998: .word 0x021BF67C +_021D199C: .word ov19_021D1DEC +_021D19A0: .word ov19_021D1F5C +_021D19A4: .word ov19_021D45A8 +_021D19A8: .word ov19_021D4640 +_021D19AC: .word ov19_021D4938 +_021D19B0: .word 0x000005F3 +_021D19B4: .word 0x000005DD + thumb_func_end ov19_021D17AC + + thumb_func_start ov19_021D19B8 +ov19_021D19B8: ; 0x021D19B8 + push {r3, r4, r5, lr} + mov r1, #0x1b + add r4, r0, #0 + lsl r1, r1, #4 + ldr r2, [r4, r1] + cmp r2, #5 + bhi _021D1AC0 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D19D2: ; jump table + .short _021D19DE - _021D19D2 - 2 ; case 0 + .short _021D1BAE - _021D19D2 - 2 ; case 1 + .short _021D1BD2 - _021D19D2 - 2 ; case 2 + .short _021D1C12 - _021D19D2 - 2 ; case 3 + .short _021D1C2A - _021D19D2 - 2 ; case 4 + .short _021D1C48 - _021D19D2 - 2 ; case 5 +_021D19DE: + ldr r3, _021D1C68 ; =0x021BF67C + mov r1, #1 + ldr r5, [r3, #0x48] + tst r1, r5 + beq _021D1A2A + bl ov19_021D5E08 + cmp r0, #1 + beq _021D1A06 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x22 + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1C64 +_021D1A06: + ldr r0, _021D1C6C ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x12 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #5 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1C64 +_021D1A2A: + mov r2, #2 + add r1, r5, #0 + tst r1, r2 + beq _021D1A3A + ldr r1, _021D1C70 ; =ov19_021D1F5C + bl ov19_021D0EB0 + b _021D1C64 +_021D1A3A: + ldr r3, [r3, #0x44] + lsl r1, r2, #8 + tst r1, r3 + beq _021D1A50 + bl ov19_021D5CE8 + ldr r1, _021D1C74 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1C64 +_021D1A50: + add r2, #0xfe + add r1, r3, #0 + tst r1, r2 + beq _021D1A66 + bl ov19_021D5CBC + ldr r1, _021D1C74 ; =ov19_021D45A8 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1C64 +_021D1A66: + add r0, r3, #0 + add r1, r4, #0 + bl ov19_021D4F74 + cmp r0, #0 + beq _021D1A9E + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D1A94 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D1A94: + mov r0, #0x1b + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1C64 +_021D1A9E: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D1AC0 + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D1AE8 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D1AC2 + cmp r0, #1 + beq _021D1ACC +_021D1AC0: + b _021D1C64 +_021D1AC2: + ldr r1, _021D1C78 ; =ov19_021D4640 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1C64 +_021D1ACC: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D1AE0 + ldr r1, _021D1C7C ; =ov19_021D4938 + add r0, r4, #0 + bl ov19_021D0EB0 + b _021D1C64 +_021D1AE0: + ldr r0, _021D1C6C ; =0x000005F3 + bl sub_02005748 + b _021D1C64 +_021D1AE8: + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D1AFC + cmp r0, #1 + beq _021D1B48 + cmp r0, #2 + beq _021D1B94 + b _021D1C64 +_021D1AFC: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #0 + bne _021D1B40 + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D1B40 + ldr r0, _021D1C80 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + b _021D1C64 +_021D1B40: + ldr r0, _021D1C6C ; =0x000005F3 + bl sub_02005748 + b _021D1C64 +_021D1B48: + add r0, r4, #0 + bl ov19_021D5F9C + cmp r0, #1 + bne _021D1B8C + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #1 + bne _021D1B8C + ldr r0, _021D1C80 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x31 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + b _021D1C64 +_021D1B8C: + ldr r0, _021D1C6C ; =0x000005F3 + bl sub_02005748 + b _021D1C64 +_021D1B94: + ldr r0, _021D1C80 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + bl ov19_021D5B80 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x32 + bl ov19_021D6594 + b _021D1C64 +_021D1BAE: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #0x22 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1C64 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x23 + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1C64 +_021D1BD2: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #0x23 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1C64 + add r0, r4, #0 + bl ov19_021D5290 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D1C08 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D1C08: + mov r0, #0x1b + mov r1, #4 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1C64 +_021D1C12: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #4 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1C64 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + b _021D1C64 +_021D1C2A: + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1C64 + add r0, r4, #0 + bl ov19_021D0ECC + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D0EA0 + b _021D1C64 +_021D1C48: + ldr r0, _021D1C68 ; =0x021BF67C + ldr r2, [r0, #0x48] + mov r0, #3 + tst r0, r2 + beq _021D1C64 + sub r1, #0x9c + ldr r0, [r4, r1] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x1b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] +_021D1C64: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1C68: .word 0x021BF67C +_021D1C6C: .word 0x000005F3 +_021D1C70: .word ov19_021D1F5C +_021D1C74: .word ov19_021D45A8 +_021D1C78: .word ov19_021D4640 +_021D1C7C: .word ov19_021D4938 +_021D1C80: .word 0x000005DD + thumb_func_end ov19_021D19B8 + + thumb_func_start ov19_021D1C84 +ov19_021D1C84: ; 0x021D1C84 + push {r4, lr} + add r4, r0, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D1CC8 + mov r0, #0x4b + ldr r1, [r4, #0x14] + lsl r0, r0, #2 + str r1, [r4, r0] + ldrb r0, [r4, #0x1f] + cmp r0, #0 + beq _021D1CA2 + mov r0, #0 + b _021D1CA4 +_021D1CA2: + mov r0, #2 +_021D1CA4: + ldr r1, _021D1DA0 ; =0x0000013D + mov r2, #1 + strb r0, [r4, r1] + add r0, r1, #2 + strb r2, [r4, r0] + mov r2, #0 + add r0, r1, #3 + strb r2, [r4, r0] + add r0, r1, #1 + strb r2, [r4, r0] + add r0, r1, #7 + strh r2, [r4, r0] + add r0, r1, #0 + add r0, #0x67 + ldr r0, [r4, r0] + sub r1, #0xd + str r0, [r4, r1] + b _021D1D4A +_021D1CC8: + add r0, r4, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D1D16 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0207999C + add r1, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r2, #0 + bl sub_02079C9C + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + mov r2, #2 + add r0, #0x11 + strb r2, [r4, r0] + mov r0, #0x1e + add r1, #0x13 + strb r0, [r4, r1] + add r0, r4, #0 + bl ov19_021D5E24 + mov r1, #5 + lsl r1, r1, #6 + strb r0, [r4, r1] + mov r2, #0 + sub r0, r1, #2 + strb r2, [r4, r0] + add r0, r1, #4 + strh r2, [r4, r0] + b _021D1D4A +_021D1D16: + mov r1, #0x49 + lsl r1, r1, #2 + add r0, r1, #0 + ldr r2, [r4, r1] + add r0, #8 + str r2, [r4, r0] + add r0, r1, #0 + mov r2, #1 + add r0, #0x19 + strb r2, [r4, r0] + ldr r0, [r4, r1] + bl sub_0207A0F8 + ldr r1, _021D1DA4 ; =0x0000013F + strb r0, [r4, r1] + add r0, r4, #0 + bl ov19_021D5E2C + mov r1, #5 + lsl r1, r1, #6 + strb r0, [r4, r1] + mov r2, #0 + sub r0, r1, #2 + strb r2, [r4, r0] + add r0, r1, #4 + strh r2, [r4, r0] +_021D1D4A: + mov r0, #0x55 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #0x38 + ldr r0, [r4, r0] + bl sub_0207A274 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x2c + ldr r0, [r4, r1] + bl sub_0208C324 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x3c + ldr r0, [r4, r1] + bl sub_0202D79C + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x20 + add r0, r4, r1 + ldr r1, _021D1DA8 ; =0x021DFE38 + bl sub_0208D720 + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02025E38 + add r1, r0, #0 + mov r0, #0x4b + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0208E9C0 + pop {r4, pc} + nop +_021D1DA0: .word 0x0000013D +_021D1DA4: .word 0x0000013F +_021D1DA8: .word 0x021DFE38 + thumb_func_end ov19_021D1C84 + + thumb_func_start ov19_021D1DAC +ov19_021D1DAC: ; 0x021D1DAC + push {r4, lr} + add r4, r0, #0 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0 + beq _021D1DC0 + cmp r1, #1 + beq _021D1DD6 + b _021D1DE6 +_021D1DC0: + sub r0, #0x9c + ldr r0, [r4, r0] + mov r1, #0x33 + bl ov19_021D6594 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _021D1DE6 +_021D1DD6: + sub r0, #0x9c + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D1DE6 + mov r0, #1 + pop {r4, pc} +_021D1DE6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D1DAC + + thumb_func_start ov19_021D1DEC +ov19_021D1DEC: ; 0x021D1DEC + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #6 + bls _021D1DFA + b _021D1F46 +_021D1DFA: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D1E06: ; jump table + .short _021D1E14 - _021D1E06 - 2 ; case 0 + .short _021D1E6C - _021D1E06 - 2 ; case 1 + .short _021D1EA4 - _021D1E06 - 2 ; case 2 + .short _021D1F46 - _021D1E06 - 2 ; case 3 + .short _021D1F00 - _021D1E06 - 2 ; case 4 + .short _021D1F14 - _021D1E06 - 2 ; case 5 + .short _021D1F30 - _021D1E06 - 2 ; case 6 +_021D1E14: + bl ov19_021D5E08 + cmp r0, #3 + bne _021D1E30 + add r0, r4, #0 + bl ov19_021D5F7C + cmp r0, #0 + beq _021D1E30 + ldr r1, _021D1F48 ; =ov19_021D4184 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D1E30: + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + beq _021D1E5A + ldr r0, _021D1F4C ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x11 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1E5A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x22 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1E6C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x22 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1F46 + ldr r0, _021D1F50 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xb + bl ov19_021D5408 + add r0, r4, #0 + mov r1, #1 + bl ov19_021DF964 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1EA4: + bl ov19_021DFD2C + cmp r0, #0x36 + bgt _021D1EC4 + bge _021D1EF0 + mov r2, #0 + mvn r2, r2 + cmp r0, r2 + bgt _021D1F46 + sub r1, r2, #1 + cmp r0, r1 + blt _021D1F46 + beq _021D1ECA + cmp r0, r2 + beq _021D1ED8 + pop {r3, r4, r5, pc} +_021D1EC4: + cmp r0, #0x37 + beq _021D1ED8 + pop {r3, r4, r5, pc} +_021D1ECA: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D1ED8: + ldr r0, _021D1F50 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1EF0: + ldr r1, _021D1F54 ; =ov19_021D1DAC + add r0, r4, #0 + bl ov19_021D0EA0 + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D1F00: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + beq _021D1F46 + mov r0, #5 + str r0, [r5, #0] +_021D1F14: + ldr r0, _021D1F58 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D1F46 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1F30: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D1F46 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D1F46: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1F48: .word ov19_021D4184 +_021D1F4C: .word 0x000005F3 +_021D1F50: .word 0x000005DD +_021D1F54: .word ov19_021D1DAC +_021D1F58: .word 0x021BF67C + thumb_func_end ov19_021D1DEC + + thumb_func_start ov19_021D1F5C +ov19_021D1F5C: ; 0x021D1F5C + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #5 + bls _021D1F6A + b _021D208C +_021D1F6A: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D1F76: ; jump table + .short _021D1F82 - _021D1F76 - 2 ; case 0 + .short _021D208C - _021D1F76 - 2 ; case 1 + .short _021D2046 - _021D1F76 - 2 ; case 2 + .short _021D205A - _021D1F76 - 2 ; case 3 + .short _021D2076 - _021D1F76 - 2 ; case 4 + .short _021D1FF0 - _021D1F76 - 2 ; case 5 +_021D1F82: + bl ov19_021D5E38 + cmp r0, #1 + beq _021D1FAA + ldr r0, _021D2090 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x11 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1FAA: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + bne _021D1FC8 + add r0, r4, #0 + bl ov19_021D5F7C + cmp r0, #0 + beq _021D1FC8 + ldr r1, _021D2094 ; =ov19_021D4184 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D1FC8: + ldr r0, _021D2098 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xc + bl ov19_021D5408 + add r0, r4, #0 + mov r1, #0 + bl ov19_021DF964 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1FF0: + bl ov19_021DFD2C + cmp r0, #0x36 + bgt _021D2010 + bge _021D2034 + mov r2, #0 + mvn r2, r2 + cmp r0, r2 + bgt _021D208C + sub r1, r2, #1 + cmp r0, r1 + blt _021D208C + beq _021D2016 + cmp r0, r2 + beq _021D2024 + pop {r3, r4, r5, pc} +_021D2010: + cmp r0, #0x37 + beq _021D2024 + pop {r3, r4, r5, pc} +_021D2016: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D2024: + ldr r1, _021D209C ; =ov19_021D1DAC + add r0, r4, #0 + bl ov19_021D0EA0 + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D2034: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2046: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + beq _021D208C + mov r0, #3 + str r0, [r5, #0] +_021D205A: + ldr r0, _021D20A0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D208C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2076: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D208C + add r0, r4, #0 + bl ov19_021D0EC0 +_021D208C: + pop {r3, r4, r5, pc} + nop +_021D2090: .word 0x000005F3 +_021D2094: .word ov19_021D4184 +_021D2098: .word 0x000005DD +_021D209C: .word ov19_021D1DAC +_021D20A0: .word 0x021BF67C + thumb_func_end ov19_021D1F5C + + thumb_func_start ov19_021D20A4 +ov19_021D20A4: ; 0x021D20A4 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #5 + bhi _021D2196 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D20BC: ; jump table + .short _021D20C8 - _021D20BC - 2 ; case 0 + .short _021D211C - _021D20BC - 2 ; case 1 + .short _021D2130 - _021D20BC - 2 ; case 2 + .short _021D218A - _021D20BC - 2 ; case 3 + .short _021D22A8 - _021D20BC - 2 ; case 4 + .short _021D22C0 - _021D20BC - 2 ; case 5 +_021D20C8: + bl ov19_021D5E9C + add r2, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B5CC + add r0, r4, #0 + mov r1, #0 + bl ov19_021D5408 + add r0, r4, #0 + bl ov19_021DF990 + add r0, r4, #0 + bl ov19_021D5EE0 + cmp r0, #0 + beq _021D2104 + add r0, r4, #0 + bl ov19_021DFDEC + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2104: + ldr r0, _021D22D8 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D211C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + beq _021D2196 + mov r0, #2 + str r0, [r5, #0] +_021D2130: + add r0, r4, #0 + bl ov19_021DFD2C + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0 + ldr r2, [r4, r1] + mvn r0, r0 + cmp r2, r0 + bgt _021D215A + sub r3, r0, #2 + cmp r2, r3 + blt _021D2184 + beq _021D2196 + sub r3, r0, #1 + cmp r2, r3 + beq _021D2160 + cmp r2, r0 + beq _021D216C + b _021D2184 +_021D215A: + cmp r2, #0x2b + beq _021D216C + b _021D2184 +_021D2160: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D216C: + ldr r0, _021D22D8 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2184: + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D218A: + mov r1, #0x6e + lsl r1, r1, #2 + ldr r2, [r4, r1] + sub r2, #0x22 + cmp r2, #0x13 + bls _021D2198 +_021D2196: + b _021D22D4 +_021D2198: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D21A4: ; jump table + .short _021D21CC - _021D21A4 - 2 ; case 0 + .short _021D21FE - _021D21A4 - 2 ; case 1 + .short _021D2212 - _021D21A4 - 2 ; case 2 + .short _021D2246 - _021D21A4 - 2 ; case 3 + .short _021D2226 - _021D21A4 - 2 ; case 4 + .short _021D222E - _021D21A4 - 2 ; case 5 + .short _021D224E - _021D21A4 - 2 ; case 6 + .short _021D2236 - _021D21A4 - 2 ; case 7 + .short _021D223E - _021D21A4 - 2 ; case 8 + .short _021D22D4 - _021D21A4 - 2 ; case 9 + .short _021D22D4 - _021D21A4 - 2 ; case 10 + .short _021D22D4 - _021D21A4 - 2 ; case 11 + .short _021D22D4 - _021D21A4 - 2 ; case 12 + .short _021D22D4 - _021D21A4 - 2 ; case 13 + .short _021D22D4 - _021D21A4 - 2 ; case 14 + .short _021D22D4 - _021D21A4 - 2 ; case 15 + .short _021D22D4 - _021D21A4 - 2 ; case 16 + .short _021D22D4 - _021D21A4 - 2 ; case 17 + .short _021D226A - _021D21A4 - 2 ; case 18 + .short _021D226A - _021D21A4 - 2 ; case 19 +_021D21CC: + bl ov19_021D5E10 + cmp r0, #0 + bne _021D21E8 + add r0, r4, #0 + bl ov19_021D5EE0 + cmp r0, #1 + bne _021D21E8 + ldr r1, _021D22DC ; =ov19_021D2B54 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D21E8: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + ldr r1, _021D22E0 ; =ov19_021D2E1C + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D21FE: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1a + bl ov19_021D6594 + ldr r1, _021D22E4 ; =ov19_021D2F14 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2212: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1a + bl ov19_021D6594 + ldr r1, _021D22E8 ; =ov19_021D3010 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2226: + ldr r1, _021D22EC ; =ov19_021D30D0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D222E: + ldr r1, _021D22F0 ; =ov19_021D3294 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2236: + ldr r1, _021D22F4 ; =ov19_021D2A5C + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D223E: + ldr r1, _021D22F8 ; =ov19_021D35F8 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2246: + ldr r1, _021D22FC ; =ov19_021D3C28 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D224E: + bl ov19_021D5E74 + cmp r0, #0 + bne _021D2260 + ldr r1, _021D2300 ; =ov19_021D3D44 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2260: + ldr r1, _021D2304 ; =ov19_021D3FB0 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D226A: + bl ov19_021D5B70 + ldr r1, [r4, #8] + add r0, r4, #0 + add r2, r4, #0 + bl ov19_021D5888 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x30 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + ldr r0, _021D22D8 ; =0x000005DD + bl sub_02005748 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D22A8: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D22D4 + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D22C0: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D22D4 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D22D4: + pop {r3, r4, r5, pc} + nop +_021D22D8: .word 0x000005DD +_021D22DC: .word ov19_021D2B54 +_021D22E0: .word ov19_021D2E1C +_021D22E4: .word ov19_021D2F14 +_021D22E8: .word ov19_021D3010 +_021D22EC: .word ov19_021D30D0 +_021D22F0: .word ov19_021D3294 +_021D22F4: .word ov19_021D2A5C +_021D22F8: .word ov19_021D35F8 +_021D22FC: .word ov19_021D3C28 +_021D2300: .word ov19_021D3D44 +_021D2304: .word ov19_021D3FB0 + thumb_func_end ov19_021D20A4 + + thumb_func_start ov19_021D2308 +ov19_021D2308: ; 0x021D2308 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #7 + bls _021D2316 + b _021D2672 +_021D2316: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D2322: ; jump table + .short _021D2332 - _021D2322 - 2 ; case 0 + .short _021D23DC - _021D2322 - 2 ; case 1 + .short _021D23F0 - _021D2322 - 2 ; case 2 + .short _021D2450 - _021D2322 - 2 ; case 3 + .short _021D25FE - _021D2322 - 2 ; case 4 + .short _021D2616 - _021D2322 - 2 ; case 5 + .short _021D2642 - _021D2322 - 2 ; case 6 + .short _021D2658 - _021D2322 - 2 ; case 7 +_021D2332: + bl ov19_021D5F7C + add r2, r0, #0 + beq _021D2350 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x19 + bl ov19_021D5408 + b _021D2378 +_021D2350: + add r0, r4, #0 + bl ov19_021D5E74 + add r2, r0, #0 + beq _021D2370 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x19 + bl ov19_021D5408 + b _021D2378 +_021D2370: + add r0, r4, #0 + mov r1, #0x1c + bl ov19_021D5408 +_021D2378: + add r0, r4, #0 + bl ov19_021DFAD0 + add r0, r4, #0 + bl ov19_021D5FC8 + cmp r0, #0 + beq _021D23A8 + ldr r0, _021D2674 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x22 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D23A8: + add r0, r4, #0 + bl ov19_021D5EE0 + cmp r0, #0 + beq _021D23C4 + add r0, r4, #0 + bl ov19_021DFDEC + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D23C4: + ldr r0, _021D2678 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D23DC: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + beq _021D245C + mov r0, #2 + str r0, [r5, #0] +_021D23F0: + add r0, r4, #0 + bl ov19_021DFD2C + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0 + ldr r2, [r4, r1] + mvn r0, r0 + cmp r2, r0 + bgt _021D241A + sub r3, r0, #2 + cmp r2, r3 + blt _021D2444 + beq _021D245C + sub r3, r0, #1 + cmp r2, r3 + beq _021D2420 + cmp r2, r0 + beq _021D242C + b _021D2444 +_021D241A: + cmp r2, #0x33 + beq _021D242C + b _021D2444 +_021D2420: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D242C: + ldr r0, _021D2678 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2444: + ldr r0, _021D2678 ; =0x000005DD + bl sub_02005748 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2450: + mov r1, #0x6e + lsl r1, r1, #2 + ldr r1, [r4, r1] + sub r1, #0x2e + cmp r1, #4 + bls _021D245E +_021D245C: + b _021D2672 +_021D245E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D246A: ; jump table + .short _021D2474 - _021D246A - 2 ; case 0 + .short _021D24F2 - _021D246A - 2 ; case 1 + .short _021D2554 - _021D246A - 2 ; case 2 + .short _021D255C - _021D246A - 2 ; case 3 + .short _021D25F6 - _021D246A - 2 ; case 4 +_021D2474: + bl ov19_021D5F7C + cmp r0, #0x70 + bne _021D24B2 + ldr r0, [r4, #0x4c] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + ldr r1, _021D267C ; =0x000001E7 + cmp r0, r1 + beq _021D24B2 + sub r1, #0x4b + ldr r0, [r4, r1] + mov r1, #0 + mov r2, #0x70 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x2d + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D24B2: + add r0, r4, #0 + bl ov19_021D5F7C + cmp r0, #0 + beq _021D24E8 + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D5D60 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x14 + bl ov19_021D6594 + ldr r0, _021D2678 ; =0x000005DD + bl sub_02005748 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D24E8: + ldr r1, _021D2680 ; =ov19_021D3D44 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D24F2: + bl ov19_021D5E74 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _021D2522 + ldr r0, _021D2674 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x18 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2522: + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D5D28 + add r0, r4, #0 + bl ov19_021D0F14 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x13 + bl ov19_021D6594 + ldr r0, _021D2678 ; =0x000005DD + bl sub_02005748 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2554: + ldr r1, _021D2684 ; =ov19_021D4390 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D255C: + bl ov19_021D5E74 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _021D258C + ldr r0, _021D2674 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x18 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D258C: + ldr r0, _021D2688 ; =0x00000112 + ldrh r0, [r4, r0] + cmp r0, #0x70 + bne _021D25CA + ldr r0, [r4, #0x4c] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + ldr r1, _021D267C ; =0x000001E7 + cmp r0, r1 + beq _021D25CA + sub r1, #0x4b + ldr r0, [r4, r1] + mov r1, #0 + mov r2, #0x70 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x2d + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D25CA: + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D5D78 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x15 + bl ov19_021D6594 + ldr r0, _021D2678 ; =0x000005DD + bl sub_02005748 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D25F6: + ldr r1, _021D268C ; =ov19_021D4184 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D25FE: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D2672 + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D2616: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2672 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x16 + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2642: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2672 + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D2658: + ldr r0, _021D2690 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D2672 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] +_021D2672: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D2674: .word 0x000005F3 +_021D2678: .word 0x000005DD +_021D267C: .word 0x000001E7 +_021D2680: .word ov19_021D3D44 +_021D2684: .word ov19_021D4390 +_021D2688: .word 0x00000112 +_021D268C: .word ov19_021D4184 +_021D2690: .word 0x021BF67C + thumb_func_end ov19_021D2308 + + thumb_func_start ov19_021D2694 +ov19_021D2694: ; 0x021D2694 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #7 + bls _021D26A2 + b _021D27D4 +_021D26A2: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D26AE: ; jump table + .short _021D26BE - _021D26AE - 2 ; case 0 + .short _021D2702 - _021D26AE - 2 ; case 1 + .short _021D2716 - _021D26AE - 2 ; case 2 + .short _021D2766 - _021D26AE - 2 ; case 3 + .short _021D27A6 - _021D26AE - 2 ; case 4 + .short _021D27D4 - _021D26AE - 2 ; case 5 + .short _021D27D4 - _021D26AE - 2 ; case 6 + .short _021D27BE - _021D26AE - 2 ; case 7 +_021D26BE: + mov r1, #7 + bl ov19_021D5408 + add r0, r4, #0 + bl ov19_021DFB50 + add r0, r4, #0 + bl ov19_021D5EE0 + cmp r0, #0 + ldr r0, _021D27D8 ; =0x000005DD + beq _021D26EC + bl sub_02005748 + add r0, r4, #0 + bl ov19_021DFDEC + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D26EC: + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2702: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + beq _021D27D4 + mov r0, #2 + str r0, [r5, #0] +_021D2716: + add r0, r4, #0 + bl ov19_021DFD2C + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + add r0, r0, #3 + cmp r0, #6 + bhi _021D2760 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2736: ; jump table + .short _021D27D4 - _021D2736 - 2 ; case 0 + .short _021D2744 - _021D2736 - 2 ; case 1 + .short _021D2750 - _021D2736 - 2 ; case 2 + .short _021D2760 - _021D2736 - 2 ; case 3 + .short _021D2760 - _021D2736 - 2 ; case 4 + .short _021D2760 - _021D2736 - 2 ; case 5 + .short _021D2750 - _021D2736 - 2 ; case 6 +_021D2744: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D2750: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2760: + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2766: + mov r1, #0x6e + lsl r1, r1, #2 + ldr r2, [r4, r1] + cmp r2, #0 + beq _021D277A + cmp r2, #1 + beq _021D278E + cmp r2, #2 + beq _021D279E + pop {r3, r4, r5, pc} +_021D277A: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1a + bl ov19_021D6594 + ldr r1, _021D27DC ; =ov19_021D27E8 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D278E: + sub r1, #0xa4 + ldr r0, [r4, r1] + mov r1, #0x1b + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D279E: + ldr r1, _021D27E0 ; =ov19_021D3B34 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D27A6: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D27D4 + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D27BE: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D27D4 + ldr r1, _021D27E4 ; =ov19_021D2890 + add r0, r4, #0 + bl ov19_021D0EB0 +_021D27D4: + pop {r3, r4, r5, pc} + nop +_021D27D8: .word 0x000005DD +_021D27DC: .word ov19_021D27E8 +_021D27E0: .word ov19_021D3B34 +_021D27E4: .word ov19_021D2890 + thumb_func_end ov19_021D2694 + + thumb_func_start ov19_021D27E8 +ov19_021D27E8: ; 0x021D27E8 + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0 + beq _021D27FE + cmp r1, #1 + beq _021D2812 + cmp r1, #2 + beq _021D2876 + pop {r4, r5, r6, pc} +_021D27FE: + bl ov19_021D5E68 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #8 + bl ov19_021D443C + mov r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_021D2812: + bl ov19_021D4468 + cmp r0, #0 + beq _021D288A + ldr r0, _021D288C ; =0x000001C1 + ldrsb r6, [r5, r0] + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _021D2830 + add r0, r5, #0 + bl ov19_021D5E68 + cmp r6, r0 + bne _021D2836 +_021D2830: + mov r0, #2 + str r0, [r4, #0] + b _021D285C +_021D2836: + add r0, r5, #0 + add r1, r6, #0 + bl ov19_021D5D08 + mov r1, #0x12 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, #0xa1 + ldrsb r1, [r5, r1] + bl sub_02079A94 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #4 + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] +_021D285C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x20 + bl ov19_021D6594 + pop {r4, r5, r6, pc} +_021D2876: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D288A + add r0, r5, #0 + bl ov19_021D0EC0 +_021D288A: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D288C: .word 0x000001C1 + thumb_func_end ov19_021D27E8 + + thumb_func_start ov19_021D2890 +ov19_021D2890: ; 0x021D2890 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #8 + bhi _021D28FC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D28A8: ; jump table + .short _021D28BA - _021D28A8 - 2 ; case 0 + .short _021D28C6 - _021D28A8 - 2 ; case 1 + .short _021D28EC - _021D28A8 - 2 ; case 2 + .short _021D2902 - _021D28A8 - 2 ; case 3 + .short _021D2986 - _021D28A8 - 2 ; case 4 + .short _021D299A - _021D28A8 - 2 ; case 5 + .short _021D2A20 - _021D28A8 - 2 ; case 6 + .short _021D2A32 - _021D28A8 - 2 ; case 7 + .short _021D2A46 - _021D28A8 - 2 ; case 8 +_021D28BA: + mov r0, #0x6e + mov r1, #4 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #1 + str r0, [r5, #0] +_021D28C6: + add r0, r4, #0 + mov r1, #9 + bl ov19_021D5408 + mov r1, #0x6e + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r4, #0 + bl ov19_021DFB94 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D28EC: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + bne _021D28FE +_021D28FC: + b _021D2A5A +_021D28FE: + mov r0, #3 + str r0, [r5, #0] +_021D2902: + add r0, r4, #0 + bl ov19_021DFD2C + add r0, r0, #3 + cmp r0, #0xc + bhi _021D2942 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D291A: ; jump table + .short _021D2A5A - _021D291A - 2 ; case 0 + .short _021D2934 - _021D291A - 2 ; case 1 + .short _021D2942 - _021D291A - 2 ; case 2 + .short _021D2942 - _021D291A - 2 ; case 3 + .short _021D2942 - _021D291A - 2 ; case 4 + .short _021D2942 - _021D291A - 2 ; case 5 + .short _021D2942 - _021D291A - 2 ; case 6 + .short _021D2954 - _021D291A - 2 ; case 7 + .short _021D2954 - _021D291A - 2 ; case 8 + .short _021D2954 - _021D291A - 2 ; case 9 + .short _021D2954 - _021D291A - 2 ; case 10 + .short _021D2954 - _021D291A - 2 ; case 11 + .short _021D2954 - _021D291A - 2 ; case 12 +_021D2934: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D2942: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2954: + add r0, r4, #0 + bl ov19_021DFDDC + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #0xa + bl ov19_021D5408 + mov r1, #0x6e + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r4, #0 + bl ov19_021DFC04 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2986: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6600 + cmp r0, #0 + beq _021D2A5A + mov r0, #5 + str r0, [r5, #0] +_021D299A: + add r0, r4, #0 + bl ov19_021DFD2C + add r0, r0, #3 + cmp r0, #6 + bhi _021D29D4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D29B2: ; jump table + .short _021D2A5A - _021D29B2 - 2 ; case 0 + .short _021D29C0 - _021D29B2 - 2 ; case 1 + .short _021D29CE - _021D29B2 - 2 ; case 2 + .short _021D29D4 - _021D29B2 - 2 ; case 3 + .short _021D29D4 - _021D29B2 - 2 ; case 4 + .short _021D29D4 - _021D29B2 - 2 ; case 5 + .short _021D29CE - _021D29B2 - 2 ; case 6 +_021D29C0: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D29CE: + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D29D4: + add r0, r4, #0 + bl ov19_021DFDDC + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r2, [r4, r1] + cmp r2, #0xa + blt _021D2A16 + cmp r2, #0x21 + bgt _021D2A16 + sub r1, #0x98 + ldr r0, [r4, r1] + mov r1, #0 + mvn r1, r1 + sub r2, #0xa + bl sub_02079AC4 + mov r1, #0x12 + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + bl ov19_021D4F5C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2A16: + bl sub_02022974 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2A20: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x21 + bl ov19_021D6594 + mov r0, #8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2A32: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2A5A + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2A46: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2A5A + add r0, r4, #0 + bl ov19_021D0EC0 +_021D2A5A: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D2890 + + thumb_func_start ov19_021D2A5C +ov19_021D2A5C: ; 0x021D2A5C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0 + beq _021D2A72 + cmp r1, #1 + beq _021D2A90 + cmp r1, #2 + beq _021D2B3E + pop {r3, r4, r5, pc} +_021D2A72: + bl ov19_021DFC80 + add r0, r5, #0 + mov r1, #1 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D2A90: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2B52 + add r0, r5, #0 + bl ov19_021DFD2C + mov r2, #2 + add r1, r0, #0 + mvn r2, r2 + cmp r1, r2 + bhi _021D2AC0 + bhs _021D2B52 + cmp r1, #0x2d + bhi _021D2B20 + cmp r1, #0x2c + blo _021D2B20 + beq _021D2AF0 + cmp r1, #0x2d + beq _021D2ADE + b _021D2B20 +_021D2AC0: + add r0, r2, #1 + cmp r1, r0 + blo _021D2B20 + beq _021D2AD0 + add r0, r2, #2 + cmp r1, r0 + beq _021D2ADE + b _021D2B20 +_021D2AD0: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D2ADE: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D2AF0: + add r0, r5, #0 + bl ov19_021D5BAC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #7 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x27 + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D2B20: + cmp r1, #0x38 + blo _021D2B52 + cmp r1, #0x3d + bhi _021D2B52 + add r0, r5, #0 + sub r1, #0x38 + bl ov19_021DFCE4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1d + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D2B3E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2B52 + add r0, r5, #0 + bl ov19_021D0EC0 +_021D2B52: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D2A5C + + thumb_func_start ov19_021D2B54 +ov19_021D2B54: ; 0x021D2B54 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #5 + bls _021D2B62 + b _021D2DB6 +_021D2B62: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D2B6E: ; jump table + .short _021D2B7A - _021D2B6E - 2 ; case 0 + .short _021D2BAA - _021D2B6E - 2 ; case 1 + .short _021D2C4C - _021D2B6E - 2 ; case 2 + .short _021D2D8E - _021D2B6E - 2 ; case 3 + .short _021D2DA2 - _021D2B6E - 2 ; case 4 + .short _021D2D5A - _021D2B6E - 2 ; case 5 +_021D2B7A: + ldr r1, _021D2DB8 ; =0x021BF67C + ldr r2, [r1, #0x44] + mov r1, #1 + tst r1, r2 + beq _021D2BA2 + add r1, r4, #0 + bl ov19_021D5594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x2c + bl ov19_021D6594 + ldr r0, _021D2DBC ; =0x000005DC + bl sub_02005748 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2BA2: + ldr r1, _021D2DC0 ; =ov19_021D2E1C + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2BAA: + ldr r1, _021D2DB8 ; =0x021BF67C + ldr r2, [r1, #0x44] + mov r1, #1 + tst r1, r2 + beq _021D2C0E + add r0, r2, #0 + add r1, r4, #0 + bl ov19_021D5150 + cmp r0, #1 + beq _021D2BDC + cmp r0, #2 + bne _021D2CAE + ldr r1, _021D2DB8 ; =0x021BF67C + mov r0, #0xf0 + ldr r2, [r1, #0x44] + ldr r1, [r1, #0x48] + and r2, r0 + and r0, r1 + cmp r2, r0 + bne _021D2CAE + ldr r0, _021D2DC4 ; =0x000005F3 + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D2BDC: + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D55B0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x2e + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2C0E: + bl ov19_021D5F20 + cmp r0, #0 + beq _021D2C2C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x2d + bl ov19_021D6594 + ldr r1, _021D2DC0 ; =ov19_021D2E1C + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, pc} +_021D2C2C: + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D54A4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x2f + bl ov19_021D6594 + ldr r0, _021D2DC8 ; =0x000005EB + bl sub_02005748 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2C4C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2CAE + ldr r0, _021D2DB8 ; =0x021BF67C + add r1, r4, #0 + ldr r0, [r0, #0x44] + bl ov19_021D5150 + cmp r0, #4 + bhi _021D2CAE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2C74: ; jump table + .short _021D2D10 - _021D2C74 - 2 ; case 0 + .short _021D2C96 - _021D2C74 - 2 ; case 1 + .short _021D2C7E - _021D2C74 - 2 ; case 2 + .short _021D2CBC - _021D2C74 - 2 ; case 3 + .short _021D2CE6 - _021D2C74 - 2 ; case 4 +_021D2C7E: + ldr r1, _021D2DB8 ; =0x021BF67C + mov r0, #0xf0 + ldr r2, [r1, #0x44] + ldr r1, [r1, #0x48] + and r2, r0 + and r0, r1 + cmp r2, r0 + bne _021D2CAE + ldr r0, _021D2DC4 ; =0x000005F3 + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D2C96: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + mov r1, #6 + tst r0, r1 + beq _021D2CB0 +_021D2CAE: + b _021D2DB6 +_021D2CB0: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D2CBC: + add r0, r4, #0 + bl ov19_021D5CE8 + add r0, r4, #0 + bl ov19_021D5E68 + add r1, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02079A94 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2CE6: + add r0, r4, #0 + bl ov19_021D5CBC + add r0, r4, #0 + bl ov19_021D5E68 + add r1, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02079A94 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2D10: + ldr r0, _021D2DB8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _021D2D4C + add r0, r4, #0 + bl ov19_021D2DD0 + cmp r0, #0 + beq _021D2D44 + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D56AC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa + bl ov19_021D6594 + ldr r0, _021D2DCC ; =0x000005EA + bl sub_02005748 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2D44: + ldr r0, _021D2DC4 ; =0x000005F3 + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D2D4C: + mov r0, #2 + tst r0, r1 + beq _021D2DB6 + ldr r0, _021D2DC4 ; =0x000005F3 + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D2D5A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl ov19_021D6600 + cmp r0, #0 + beq _021D2DB6 + add r0, r4, #0 + bl ov19_021D5E38 + mov r1, #6 + tst r0, r1 + bne _021D2D88 + add r0, r4, #0 + bl ov19_021D52F4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 +_021D2D88: + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2D8E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2DB6 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2DA2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2DB6 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D2DB6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D2DB8: .word 0x021BF67C +_021D2DBC: .word 0x000005DC +_021D2DC0: .word ov19_021D2E1C +_021D2DC4: .word 0x000005F3 +_021D2DC8: .word 0x000005EB +_021D2DCC: .word 0x000005EA + thumb_func_end ov19_021D2B54 + + thumb_func_start ov19_021D2DD0 +ov19_021D2DD0: ; 0x021D2DD0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r5, #0x14 + str r0, [sp] + bl ov19_021D5F3C + add r7, r0, #0 + ldrb r0, [r5, #8] + mov r4, #0 + ldrb r6, [r5, #9] + cmp r0, #0 + ble _021D2E16 +_021D2DE8: + add r3, r5, r4 + mov r2, #0xc + ldrsb r2, [r3, r2] + ldr r0, [sp] + mov r1, #0 + sub r2, r2, r6 + ldr r0, [r0, #0] + mvn r1, r1 + add r2, r7, r2 + bl sub_02079C9C + mov r1, #0xac + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021D2E0E + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D2E0E: + ldrb r0, [r5, #8] + add r4, r4, #1 + cmp r4, r0 + blt _021D2DE8 +_021D2E16: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D2DD0 + + thumb_func_start ov19_021D2E1C +ov19_021D2E1C: ; 0x021D2E1C + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #3 + bhi _021D2F04 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D2E34: ; jump table + .short _021D2E3C - _021D2E34 - 2 ; case 0 + .short _021D2EAE - _021D2E34 - 2 ; case 1 + .short _021D2ED4 - _021D2E34 - 2 ; case 2 + .short _021D2EF0 - _021D2E34 - 2 ; case 3 +_021D2E3C: + bl ov19_021D5E10 + cmp r0, #1 + bne _021D2E8E + add r0, r4, #0 + bl ov19_021D34E4 + cmp r0, #0 + bne _021D2E6E + ldr r0, _021D2F08 ; =0x000005EB + bl sub_02005748 + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D5420 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #9 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2E6E: + ldr r0, _021D2F0C ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2E8E: + ldr r0, _021D2F08 ; =0x000005EB + bl sub_02005748 + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D5420 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #9 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2EAE: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2F04 + add r0, r4, #0 + bl ov19_021D52F4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x25 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2ED4: + ldr r0, _021D2F10 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D2F04 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D2EF0: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2F04 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D2F04: + pop {r3, r4, r5, pc} + nop +_021D2F08: .word 0x000005EB +_021D2F0C: .word 0x000005F3 +_021D2F10: .word 0x021BF67C + thumb_func_end ov19_021D2E1C + + thumb_func_start ov19_021D2F14 +ov19_021D2F14: ; 0x021D2F14 + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0 + beq _021D2F2A + cmp r1, #1 + beq _021D2F76 + cmp r1, #2 + beq _021D2FA8 + pop {r4, r5, r6, pc} +_021D2F2A: + add r1, r5, #0 + bl ov19_021D55C4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0xa + bl ov19_021D6594 + ldr r0, _021D2FC4 ; =0x000005EA + bl sub_02005748 + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #1 + bne _021D2F70 + add r0, r5, #0 + bl ov19_021D5E2C + add r6, r0, #0 + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0207A0F8 + sub r0, r0, #1 + cmp r6, r0 + beq _021D2F70 + mov r0, #1 + str r0, [r4, #0] + add r0, r5, #0 + bl ov19_021D52F4 + pop {r4, r5, r6, pc} +_021D2F70: + mov r0, #2 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_021D2F76: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2FC2 + add r0, r5, #0 + bl ov19_021D52F4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x26 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_021D2FA8: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D2FC2 + add r0, r5, #0 + bl ov19_021D0F14 + add r0, r5, #0 + bl ov19_021D0EC0 +_021D2FC2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D2FC4: .word 0x000005EA + thumb_func_end ov19_021D2F14 + + thumb_func_start ov19_021D2FC8 +ov19_021D2FC8: ; 0x021D2FC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov19_021D34E4 + cmp r0, #0 + beq _021D300C + add r0, r5, #0 + mov r1, #0xad + mov r2, #0 + bl ov19_021D5FD0 + cmp r0, #0 + beq _021D2FEC + mov r0, #6 + str r0, [r4, #0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2FEC: + add r0, r5, #0 + bl ov19_021D5E3C + cmp r0, #0 + beq _021D300C + add r0, r5, #0 + mov r1, #0xa3 + mov r2, #0 + bl ov19_021D5FD0 + cmp r0, #0 + bne _021D300C + mov r0, #6 + str r0, [r4, #0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D300C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D2FC8 + + thumb_func_start ov19_021D3010 +ov19_021D3010: ; 0x021D3010 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0 + beq _021D3026 + cmp r1, #1 + beq _021D307C + cmp r1, #2 + beq _021D30A8 + pop {r3, r4, r5, pc} +_021D3026: + add r1, sp, #0 + bl ov19_021D2FC8 + cmp r0, #0 + beq _021D3050 + ldr r0, _021D30C4 ; =0x000005F3 + bl sub_02005748 + ldr r1, [sp] + add r0, r5, #0 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D3050: + add r0, r5, #0 + add r1, r5, #0 + bl ov19_021D5734 + ldr r0, _021D30C8 ; =0x000005DC + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0xb + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D307C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D30C2 + ldr r0, _021D30CC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D30C2 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D30A8: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D30C2 + add r0, r5, #0 + bl ov19_021D0F14 + add r0, r5, #0 + bl ov19_021D0EC0 +_021D30C2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D30C4: .word 0x000005F3 +_021D30C8: .word 0x000005DC +_021D30CC: .word 0x021BF67C + thumb_func_end ov19_021D3010 + + thumb_func_start ov19_021D30D0 +ov19_021D30D0: ; 0x021D30D0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #8 + bls _021D30DE + b _021D3288 +_021D30DE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D30EA: ; jump table + .short _021D30FC - _021D30EA - 2 ; case 0 + .short _021D3178 - _021D30EA - 2 ; case 1 + .short _021D319A - _021D30EA - 2 ; case 2 + .short _021D31C2 - _021D30EA - 2 ; case 3 + .short _021D31F2 - _021D30EA - 2 ; case 4 + .short _021D3214 - _021D30EA - 2 ; case 5 + .short _021D3288 - _021D30EA - 2 ; case 6 + .short _021D3248 - _021D30EA - 2 ; case 7 + .short _021D3274 - _021D30EA - 2 ; case 8 +_021D30FC: + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207A0F8 + cmp r0, #6 + beq _021D3152 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D3132 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x23 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3132: + ldr r0, _021D328C ; =0x000005EB + bl sub_02005748 + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D5420 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #9 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3152: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1b + bl ov19_021D6594 + add r0, r4, #0 + mov r1, #5 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3178: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #9 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3288 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x23 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D319A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x23 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3288 + add r0, r4, #0 + bl ov19_021D5290 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D31C2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3288 + add r0, r4, #0 + add r1, r4, #0 + bl ov19_021D55C4 + add r0, r4, #0 + bl ov19_021D0F14 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D31F2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa + bl ov19_021D6600 + cmp r0, #0 + beq _021D3288 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x24 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3214: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x24 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3288 + add r0, r4, #0 + bl ov19_021D52D0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3248: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3288 + ldr r0, _021D3290 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D3288 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3274: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D3288 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D3288: + pop {r3, r4, r5, pc} + nop +_021D328C: .word 0x000005EB +_021D3290: .word 0x021BF67C + thumb_func_end ov19_021D30D0 + + thumb_func_start ov19_021D3294 +ov19_021D3294: ; 0x021D3294 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #6 + bhi _021D3358 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D32AC: ; jump table + .short _021D32BA - _021D32AC - 2 ; case 0 + .short _021D3350 - _021D32AC - 2 ; case 1 + .short _021D3412 - _021D32AC - 2 ; case 2 + .short _021D3438 - _021D32AC - 2 ; case 3 + .short _021D3464 - _021D32AC - 2 ; case 4 + .short _021D3492 - _021D32AC - 2 ; case 5 + .short _021D34C0 - _021D32AC - 2 ; case 6 +_021D32BA: + bl ov19_021D5E38 + cmp r0, #1 + bne _021D32F8 + add r0, r4, #0 + bl ov19_021D34E4 + cmp r0, #1 + bne _021D32F8 + ldr r0, _021D34D8 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #6 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1b + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D32F8: + add r0, r4, #0 + add r1, sp, #0 + bl ov19_021D1238 + cmp r0, #0 + beq _021D3330 + ldr r0, _021D34D8 ; =0x000005F3 + bl sub_02005748 + ldr r1, [sp] + add r0, r4, #0 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1b + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3330: + mov r1, #0x11 + lsl r1, r1, #4 + ldrh r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x13 + bl ov19_021D443C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3350: + bl ov19_021D4468 + cmp r0, #0 + bne _021D335A +_021D3358: + b _021D34D4 +_021D335A: + ldr r0, _021D34DC ; =0x000001C1 + mov r1, #0 + ldrsb r2, [r4, r0] + mvn r1, r1 + cmp r2, r1 + bne _021D3382 + sub r0, #0xad + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3382: + sub r0, #0xb1 + strh r2, [r4, r0] + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #2 + ldr r1, _021D34DC ; =0x000001C1 + bne _021D33C2 + ldrsb r1, [r4, r1] + add r0, r4, #0 + bl ov19_021D57D8 + cmp r0, #0 + beq _021D33F2 + add r0, r4, #0 + bl ov19_021D0F14 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D33C2: + ldrsb r1, [r4, r1] + add r0, r4, #0 + bl ov19_021D5800 + cmp r0, #0 + beq _021D33F2 + add r0, r4, #0 + bl ov19_021D0F14 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D33F2: + ldr r0, _021D34D8 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xd + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3412: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D34D4 + ldr r0, _021D34E0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D34D4 + add r0, r4, #0 + bl ov19_021D4458 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3438: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D34D4 + ldr r0, _021D34E0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D34D4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3464: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + bl ov19_021D6600 + cmp r0, #0 + beq _021D34D4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xc + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3492: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + bl ov19_021D6600 + cmp r0, #0 + beq _021D34D4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xd + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D34C0: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D34D4 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D34D4: + pop {r3, r4, r5, pc} + nop +_021D34D8: .word 0x000005F3 +_021D34DC: .word 0x000001C1 +_021D34E0: .word 0x021BF67C + thumb_func_end ov19_021D3294 + + thumb_func_start ov19_021D34E4 +ov19_021D34E4: ; 0x021D34E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [sp] + ldr r0, [r0, r1] + bl sub_0207A0F8 + mov r6, #0 + add r5, r6, #0 + str r0, [sp, #4] + cmp r0, #0 + ble _021D354C +_021D34FE: + mov r0, #0x49 + ldr r1, [sp] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_0207A0FC + add r4, r0, #0 + bl sub_02073C88 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #0xad + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _021D3532 + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _021D3532 + add r5, r5, #1 +_021D3532: + add r0, r4, #0 + add r1, r7, #0 + bl sub_02073CD4 + cmp r5, #2 + blt _021D3544 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D3544: + ldr r0, [sp, #4] + add r6, r6, #1 + cmp r6, r0 + blt _021D34FE +_021D354C: + ldr r0, [sp] + mov r1, #0xad + mov r2, #0 + bl ov19_021D6014 + cmp r0, #0 + beq _021D3560 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D3560: + ldr r0, [sp] + mov r1, #0xa3 + mov r2, #0 + bl ov19_021D6014 + cmp r0, #0 + beq _021D3574 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D3574: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D34E4 + + thumb_func_start ov19_021D357C +ov19_021D357C: ; 0x021D357C + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0xad + mov r2, #0 + add r5, r0, #0 + bl ov19_021D5FD0 + cmp r0, #0 + beq _021D3596 + mov r0, #0x1f + str r0, [r4, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D3596: + add r0, r5, #0 + bl ov19_021D5E74 + add r0, r5, #0 + bl ov19_021D5E74 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _021D35B6 + mov r0, #0x1e + str r0, [r4, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D35B6: + add r0, r5, #0 + mov r1, #0xa2 + mov r2, #0 + bl ov19_021D5FD0 + cmp r0, #0 + beq _021D35CC + mov r0, #0x1d + str r0, [r4, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D35CC: + add r0, r5, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D35F2 + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #1 + bne _021D35F2 + add r0, r5, #0 + bl ov19_021D34E4 + cmp r0, #0 + beq _021D35F2 + mov r0, #6 + str r0, [r4, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D35F2: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D357C + + thumb_func_start ov19_021D35F8 +ov19_021D35F8: ; 0x021D35F8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #9 + bhi _021D36A4 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D3610: ; jump table + .short _021D3624 - _021D3610 - 2 ; case 0 + .short _021D367C - _021D3610 - 2 ; case 1 + .short _021D36E6 - _021D3610 - 2 ; case 2 + .short _021D376A - _021D3610 - 2 ; case 3 + .short _021D37F6 - _021D3610 - 2 ; case 4 + .short _021D37C2 - _021D3610 - 2 ; case 5 + .short _021D3828 - _021D3610 - 2 ; case 6 + .short _021D3852 - _021D3610 - 2 ; case 7 + .short _021D3896 - _021D3610 - 2 ; case 8 + .short _021D38C2 - _021D3610 - 2 ; case 9 +_021D3624: + add r1, sp, #0 + bl ov19_021D357C + cmp r0, #0 + beq _021D3650 + add r0, r4, #0 + mov r1, #2 + bl ov19_021D5408 + add r0, r4, #0 + mov r1, #1 + bl ov19_021DF964 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3650: + ldr r0, _021D38D8 ; =0x000005F3 + bl sub_02005748 + ldr r1, [sp] + add r0, r4, #0 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1b + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D367C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D36A4 + add r0, r4, #0 + bl ov19_021DFD2C + cmp r0, #0x36 + bgt _021D36AE + bge _021D36D4 + mov r2, #0 + mvn r2, r2 + cmp r0, r2 + bgt _021D36A4 + sub r1, r2, #1 + cmp r0, r1 + bge _021D36A6 +_021D36A4: + b _021D38D6 +_021D36A6: + beq _021D36B4 + cmp r0, r2 + beq _021D36C2 + pop {r3, r4, r5, pc} +_021D36AE: + cmp r0, #0x37 + beq _021D36C2 + pop {r3, r4, r5, pc} +_021D36B4: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D36C2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #9 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D36D4: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D36E6: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D37D0 + add r0, r4, #0 + bl ov19_021D5E9C + add r2, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B5CC + add r0, r4, #0 + bl ov19_021D38E0 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D3730 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xe + bl ov19_021D6594 + mov r0, #0x6e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _021D3764 +_021D3730: + add r0, r4, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D3750 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xf + bl ov19_021D6594 + mov r0, #0x6e + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + b _021D3764 +_021D3750: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x10 + bl ov19_021D6594 + mov r0, #0x6e + mov r1, #2 + lsl r0, r0, #2 + str r1, [r4, r0] +_021D3764: + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D376A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D37D0 + add r0, r4, #0 + bl ov19_021D3B20 + cmp r0, #0 + beq _021D37A8 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D3794 + add r0, r4, #0 + bl ov19_021D5834 + b _021D379A +_021D3794: + add r0, r4, #0 + bl ov19_021D584C +_021D379A: + add r0, r4, #0 + mov r1, #3 + bl ov19_021D5408 + mov r0, #5 + str r0, [r5, #0] + b _021D37B4 +_021D37A8: + add r0, r4, #0 + mov r1, #0x20 + bl ov19_021D5408 + mov r0, #4 + str r0, [r5, #0] +_021D37B4: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D37C2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + bne _021D37D2 +_021D37D0: + b _021D38D6 +_021D37D2: + ldr r0, _021D38DC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D38D6 + add r0, r4, #0 + mov r1, #4 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D37F6: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D38D6 + ldr r0, _021D38DC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D38D6 + add r0, r4, #0 + mov r1, #0x21 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3828: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D38D6 + ldr r0, _021D38DC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D38D6 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #7 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3852: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D38D6 + add r0, r4, #0 + bl ov19_021D3B20 + cmp r0, #0 + beq _021D3884 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #2 + bne _021D387E + sub r0, #0xa4 + ldr r0, [r4, r0] + mov r1, #0x25 + bl ov19_021D6594 +_021D387E: + add r0, r4, #0 + bl ov19_021D0F14 +_021D3884: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #9 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3896: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D38D6 + ldr r0, _021D38DC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D38D6 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #9 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D38C2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D38D6 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D38D6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D38D8: .word 0x000005F3 +_021D38DC: .word 0x021BF67C + thumb_func_end ov19_021D35F8 + + thumb_func_start ov19_021D38E0 +ov19_021D38E0: ; 0x021D38E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [sp] + add r7, r0, r1 + ldr r0, [r0, #0x4c] + mov r4, #0 + ldr r5, _021D3970 ; =0x021DFDF0 + str r0, [r7, #0x10] + str r4, [sp, #4] +_021D38F6: + ldrh r1, [r5] + ldr r0, [r7, #0x10] + add r6, r7, r4 + bl ov19_021D3AC8 + strb r0, [r6, #4] + ldrb r0, [r6, #4] + cmp r0, #0 + beq _021D390E + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] +_021D390E: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #3 + blo _021D38F6 + ldr r0, [sp, #4] + cmp r0, #0 + bne _021D3926 + mov r0, #1 + strb r0, [r7] + add sp, #8 + strb r0, [r7, #1] + pop {r3, r4, r5, r6, r7, pc} +_021D3926: + mov r0, #0 + strb r0, [r7] + strb r0, [r7, #1] + strb r0, [r7, #2] + strb r0, [r7, #3] + mov r1, #0x12 + ldr r0, [sp] + lsl r1, r1, #4 + ldr r0, [r0, r1] + add r1, r1, #4 + str r0, [r7, #0x14] + ldr r0, [sp] + ldr r0, [r0, r1] + str r0, [r7, #0x18] + ldr r0, [sp] + bl ov19_021D5E38 + cmp r0, #1 + beq _021D3950 + mov r0, #1 + b _021D3952 +_021D3950: + mov r0, #0 +_021D3952: + mov r1, #0 + str r0, [r7, #0x1c] + add r0, r7, #0 + add r2, r1, #0 +_021D395A: + add r1, r1, #1 + strh r2, [r0, #8] + add r0, r0, #2 + cmp r1, #3 + blo _021D395A + ldr r0, _021D3974 ; =ov19_021D3978 + add r1, r7, #0 + bl sub_0200D9E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3970: .word 0x021DFDF0 +_021D3974: .word ov19_021D3978 + thumb_func_end ov19_021D38E0 + + thumb_func_start ov19_021D3978 +ov19_021D3978: ; 0x021D3978 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + ldrb r0, [r1, #2] + str r1, [sp, #4] + cmp r0, #0x12 + bhs _021D3A0E + add r0, r1, #0 + ldrb r0, [r0, #3] + str r0, [sp, #0xc] + str r0, [sp, #0x14] + add r0, #0xf + str r0, [sp, #0x14] + cmp r0, #0x1e + ble _021D399A + mov r0, #0x1e + str r0, [sp, #0x14] +_021D399A: + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x14] + cmp r1, r0 + bge _021D39EC +_021D39A2: + ldr r1, [sp, #4] + ldr r0, [sp, #4] + ldrb r1, [r1, #2] + ldr r0, [r0, #0x14] + ldr r2, [sp, #0xc] + bl sub_02079C9C + mov r1, #0xac + mov r2, #0 + add r7, r0, #0 + bl sub_02074570 + cmp r0, #0 + beq _021D39E0 + ldr r4, _021D3AC4 ; =0x021DFDF0 + ldr r5, [sp, #4] + mov r6, #0 +_021D39C4: + ldrh r1, [r4] + add r0, r7, #0 + bl ov19_021D3AC8 + cmp r0, #0 + beq _021D39D6 + ldrh r0, [r5, #8] + add r0, r0, #1 + strh r0, [r5, #8] +_021D39D6: + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, #2 + cmp r6, #3 + blo _021D39C4 +_021D39E0: + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp, #0x14] + str r1, [sp, #0xc] + cmp r1, r0 + blt _021D39A2 +_021D39EC: + ldr r0, [sp, #0x14] + cmp r0, #0x1e + bne _021D3A04 + ldr r0, [sp, #4] + mov r1, #0 + strb r1, [r0, #3] + ldrb r0, [r0, #2] + add r1, r0, #1 + ldr r0, [sp, #4] + add sp, #0x18 + strb r1, [r0, #2] + pop {r3, r4, r5, r6, r7, pc} +_021D3A04: + add r1, r0, #0 + ldr r0, [sp, #4] + add sp, #0x18 + strb r1, [r0, #3] + pop {r3, r4, r5, r6, r7, pc} +_021D3A0E: + add r0, r1, #0 + ldr r0, [r0, #0x18] + bl sub_0207A0F8 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + cmp r0, #0 + ble _021D3A5C +_021D3A22: + ldr r0, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [r0, #0x18] + bl sub_0207A0FC + ldr r4, _021D3AC4 ; =0x021DFDF0 + ldr r5, [sp, #4] + add r7, r0, #0 + mov r6, #0 +_021D3A34: + ldrh r1, [r4] + add r0, r7, #0 + bl ov19_021D3AC8 + cmp r0, #0 + beq _021D3A46 + ldrh r0, [r5, #8] + add r0, r0, #1 + strh r0, [r5, #8] +_021D3A46: + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, #2 + cmp r6, #3 + blo _021D3A34 + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #0x10] + str r1, [sp, #8] + cmp r1, r0 + blt _021D3A22 +_021D3A5C: + ldr r0, [sp, #4] + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _021D3A88 + ldr r4, _021D3AC4 ; =0x021DFDF0 + ldr r5, [sp, #4] + mov r6, #0 +_021D3A6A: + ldr r0, [sp, #4] + ldrh r1, [r4] + ldr r0, [r0, #0x10] + bl ov19_021D3AC8 + cmp r0, #0 + beq _021D3A7E + ldrh r0, [r5, #8] + add r0, r0, #1 + strh r0, [r5, #8] +_021D3A7E: + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, #2 + cmp r6, #3 + blo _021D3A6A +_021D3A88: + ldr r0, [sp, #4] + mov r1, #1 + strb r1, [r0, #1] + mov r2, #0 + add r1, r0, #0 +_021D3A92: + ldrh r0, [r1, #8] + cmp r0, #1 + bne _021D3AAA + ldr r0, [sp, #4] + add r0, r0, r2 + ldrb r0, [r0, #4] + cmp r0, #1 + bne _021D3AAA + ldr r0, [sp, #4] + mov r1, #0 + strb r1, [r0, #1] + b _021D3AB2 +_021D3AAA: + add r2, r2, #1 + add r1, r1, #2 + cmp r2, #3 + blo _021D3A92 +_021D3AB2: + ldr r0, [sp, #4] + mov r1, #1 + strb r1, [r0] + ldr r0, [sp] + bl sub_0200DA58 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D3AC4: .word 0x021DFDF0 + thumb_func_end ov19_021D3978 + + thumb_func_start ov19_021D3AC8 +ov19_021D3AC8: ; 0x021D3AC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0 + add r5, r0, #0 + str r1, [sp, #4] + bl sub_02073D20 + str r0, [sp] + add r0, r5, #0 + mov r1, #0xad + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _021D3B08 + mov r4, #0 + add r7, r4, #0 +_021D3AEC: + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x36 + add r2, r7, #0 + bl sub_02074570 + cmp r6, r0 + bne _021D3B02 + mov r0, #1 + str r0, [sp, #4] + b _021D3B08 +_021D3B02: + add r4, r4, #1 + cmp r4, #4 + blt _021D3AEC +_021D3B08: + ldr r1, [sp] + add r0, r5, #0 + bl sub_02073D48 + ldr r0, [sp, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D3AC8 + + thumb_func_start ov19_021D3B18 +ov19_021D3B18: ; 0x021D3B18 + mov r1, #0x57 + lsl r1, r1, #2 + ldrb r0, [r0, r1] + bx lr + thumb_func_end ov19_021D3B18 + + thumb_func_start ov19_021D3B20 +ov19_021D3B20: ; 0x021D3B20 + mov r1, #0x57 + lsl r1, r1, #2 + add r1, r0, r1 + ldrb r0, [r1] + cmp r0, #0 + beq _021D3B30 + ldrb r0, [r1, #1] + bx lr +_021D3B30: + mov r0, #0 + bx lr + thumb_func_end ov19_021D3B20 + + thumb_func_start ov19_021D3B34 +ov19_021D3B34: ; 0x021D3B34 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D3B4A + cmp r0, #1 + beq _021D3B5E + cmp r0, #2 + beq _021D3BB6 + pop {r3, r4, r5, pc} +_021D3B4A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3B5E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3C1C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D64A0 + mov r0, #0xa + bl sub_0201807C + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0207999C + mov r2, #0x12 + lsl r2, r2, #4 + add r1, r0, #0 + ldr r0, [r4, r2] + add r2, #8 + ldr r2, [r4, r2] + ldr r2, [r2, #0x18] + bl sub_02079AF4 + mov r1, #0x4a + lsl r1, r1, #2 + ldr r0, _021D3C20 ; =0x020F2DAC + ldr r1, [r4, r1] + mov r2, #9 + bl sub_020067E8 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D3BB6: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02006844 + cmp r0, #0 + beq _021D3C1C + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0207999C + add r5, r0, #0 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02006814 + mov r2, #0xf + mov r0, #3 + mov r1, #0xa + lsl r2, r2, #0xe + bl sub_02017FC8 + mov r2, #0x12 + lsl r2, r2, #4 + ldr r0, [r4, r2] + add r2, #8 + ldr r2, [r4, r2] + add r1, r5, #0 + ldr r2, [r2, #0x18] + bl sub_02079B24 + mov r0, #0x12 + lsl r0, r0, #4 + add r1, r4, #0 + ldr r0, [r4, r0] + add r1, #0x40 + bl ov19_021D4F40 + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, #0 + add r2, r4, #0 + bl ov19_021D61B0 + ldr r1, _021D3C24 ; =ov19_021D0F88 + add r0, r4, #0 + bl ov19_021D0EB0 +_021D3C1C: + pop {r3, r4, r5, pc} + nop +_021D3C20: .word 0x020F2DAC +_021D3C24: .word ov19_021D0F88 + thumb_func_end ov19_021D3B34 + + thumb_func_start ov19_021D3C28 +ov19_021D3C28: ; 0x021D3C28 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D3C3E + cmp r0, #1 + beq _021D3C52 + cmp r0, #2 + beq _021D3C94 + pop {r3, r4, r5, pc} +_021D3C3E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D3C52: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3CF0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov19_021D64A0 + mov r0, #0xa + bl sub_0201807C + add r0, r5, #0 + bl ov19_021D1C84 + mov r1, #0x4b + lsl r1, r1, #2 + ldr r0, _021D3CF4 ; =0x020F410C + add r1, r5, r1 + mov r2, #9 + bl sub_020067E8 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D3C94: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02006844 + cmp r0, #0 + beq _021D3CF0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0207999C + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02006814 + mov r2, #0xf + mov r0, #3 + mov r1, #0xa + lsl r2, r2, #0xe + bl sub_02017FC8 + add r0, r5, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D3CD4 + add r0, r5, #0 + add r1, r5, #0 + bl ov19_021D3CFC +_021D3CD4: + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r5, #0 + add r2, r5, #0 + bl ov19_021D61B0 + ldr r1, _021D3CF8 ; =ov19_021D0F88 + add r0, r5, #0 + bl ov19_021D0EB0 + add r0, r5, #0 + bl ov19_021D0F14 +_021D3CF0: + pop {r3, r4, r5, pc} + nop +_021D3CF4: .word 0x020F410C +_021D3CF8: .word ov19_021D0F88 + thumb_func_end ov19_021D3C28 + + thumb_func_start ov19_021D3CFC +ov19_021D3CFC: ; 0x021D3CFC + push {r3, r4, r5, lr} + add r4, r0, #0 + add r4, #8 + ldrb r0, [r4, #4] + add r5, r1, #0 + cmp r0, #0 + beq _021D3D10 + cmp r0, #1 + beq _021D3D32 + pop {r3, r4, r5, pc} +_021D3D10: + mov r0, #5 + lsl r0, r0, #6 + ldrb r0, [r5, r0] + mov r1, #6 + strb r0, [r4, #7] + mov r0, #7 + ldrsb r0, [r4, r0] + bl sub_020E1F6C + strb r1, [r4, #5] + mov r0, #7 + ldrsb r0, [r4, r0] + mov r1, #6 + bl sub_020E1F6C + strb r0, [r4, #6] + b _021D3D3A +_021D3D32: + mov r0, #5 + lsl r0, r0, #6 + ldrb r0, [r5, r0] + strb r0, [r4, #8] +_021D3D3A: + add r0, r5, #0 + bl ov19_021D52F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D3CFC + + thumb_func_start ov19_021D3D44 +ov19_021D3D44: ; 0x021D3D44 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #6 + bhi _021D3DF6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D3D5C: ; jump table + .short _021D3D6A - _021D3D5C - 2 ; case 0 + .short _021D3D7E - _021D3D5C - 2 ; case 1 + .short _021D3DE8 - _021D3D5C - 2 ; case 2 + .short _021D3E9A - _021D3D5C - 2 ; case 3 + .short _021D3EBE - _021D3D5C - 2 ; case 4 + .short _021D3F48 - _021D3D5C - 2 ; case 5 + .short _021D3F7C - _021D3D5C - 2 ; case 6 +_021D3D6A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3D7E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3DF6 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D64A0 + mov r0, #0xa + bl sub_0201807C + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207D990 + ldr r1, _021D3F94 ; =0x021DFE30 + mov r2, #9 + bl sub_0207D824 + mov r1, #0x85 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + sub r1, #0xf8 + ldr r1, [r4, r1] + mov r2, #1 + mov r3, #0 + bl sub_0207CB2C + ldr r0, _021D3F98 ; =0x00000054 + mov r1, #2 + bl sub_02006590 + mov r1, #0x85 + lsl r1, r1, #2 + ldr r0, _021D3F9C ; =0x02241130 + ldr r1, [r4, r1] + mov r2, #9 + bl sub_020067E8 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3DE8: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02006844 + cmp r0, #0 + bne _021D3DF8 +_021D3DF6: + b _021D3F90 +_021D3DF8: + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207CB94 + ldr r1, _021D3FA0 ; =0x021E05E0 + str r0, [r1, #8] + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02006814 + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r0, _021D3F98 ; =0x00000054 + bl sub_02006514 + ldr r0, _021D3FA0 ; =0x021E05E0 + ldr r0, [r0, #8] + cmp r0, #0x70 + bne _021D3E38 + ldr r0, [r4, #0x4c] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + ldr r1, _021D3FA4 ; =0x000001E7 + cmp r0, r1 + bne _021D3E6C +_021D3E38: + ldr r0, _021D3FA0 ; =0x021E05E0 + ldr r6, [r0, #8] + cmp r6, #0 + beq _021D3E6C + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207D990 + lsl r1, r6, #0x10 + lsr r1, r1, #0x10 + mov r2, #1 + mov r3, #9 + bl sub_0207D60C + ldr r1, _021D3FA0 ; =0x021E05E0 + add r0, r4, #0 + ldr r1, [r1, #8] + add r2, r4, #0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl ov19_021D5BE8 + add r0, r4, #0 + bl ov19_021D0F14 +_021D3E6C: + mov r2, #0xf + mov r0, #3 + mov r1, #0xa + lsl r2, r2, #0xe + bl sub_02017FC8 + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, #0 + add r2, r4, #0 + bl ov19_021D61B0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3E9A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3F90 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3EBE: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3F90 + ldr r0, _021D3FA0 ; =0x021E05E0 + ldr r0, [r0, #8] + cmp r0, #0 + bne _021D3EDE + add r0, r4, #0 + bl ov19_021D0EC0 + pop {r4, r5, r6, pc} +_021D3EDE: + cmp r0, #0x70 + bne _021D3F1C + ldr r0, [r4, #0x4c] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + ldr r1, _021D3FA4 ; =0x000001E7 + cmp r0, r1 + beq _021D3F1C + ldr r2, _021D3FA0 ; =0x021E05E0 + sub r1, #0x4b + ldr r0, [r4, r1] + ldr r2, [r2, #8] + mov r1, #0 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x2d + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3F1C: + mov r0, #0x67 + ldr r2, _021D3FA0 ; =0x021E05E0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [r2, #8] + mov r1, #0 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x10 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3F48: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D3F90 + ldr r0, _021D3FA8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D3F90 + ldr r0, _021D3FAC ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D3F7C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D3F90 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D3F90: + pop {r4, r5, r6, pc} + nop +_021D3F94: .word 0x021DFE30 +_021D3F98: .word 0x00000054 +_021D3F9C: .word 0x02241130 +_021D3FA0: .word 0x021E05E0 +_021D3FA4: .word 0x000001E7 +_021D3FA8: .word 0x021BF67C +_021D3FAC: .word 0x000005DD + thumb_func_end ov19_021D3D44 + + thumb_func_start ov19_021D3FB0 +ov19_021D3FB0: ; 0x021D3FB0 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #5 + bhi _021D4062 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D3FC8: ; jump table + .short _021D3FD4 - _021D3FC8 - 2 ; case 0 + .short _021D403A - _021D3FC8 - 2 ; case 1 + .short _021D40A4 - _021D3FC8 - 2 ; case 2 + .short _021D4104 - _021D3FC8 - 2 ; case 3 + .short _021D412C - _021D3FC8 - 2 ; case 4 + .short _021D415E - _021D3FC8 - 2 ; case 5 +_021D3FD4: + bl ov19_021D5E74 + ldr r1, _021D4174 ; =0x021E05E0 + str r0, [r1, #4] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _021D4008 + ldr r0, _021D4178 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x18 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4008: + mov r0, #0x67 + ldr r2, _021D4174 ; =0x021E05E0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [r2, #4] + mov r1, #0 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0 + bl ov19_021DF964 + add r0, r4, #0 + mov r1, #0x17 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D403A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D4062 + add r0, r4, #0 + bl ov19_021DFD2C + cmp r0, #0x36 + bgt _021D406C + bge _021D4092 + mov r2, #0 + mvn r2, r2 + cmp r0, r2 + bgt _021D4062 + sub r1, r2, #1 + cmp r0, r1 + bge _021D4064 +_021D4062: + b _021D4172 +_021D4064: + beq _021D4072 + cmp r0, r2 + beq _021D4080 + pop {r3, r4, r5, pc} +_021D406C: + cmp r0, #0x37 + beq _021D4080 + pop {r3, r4, r5, pc} +_021D4072: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D4080: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4092: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1b + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D40A4: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207D990 + ldr r1, _021D4174 ; =0x021E05E0 + mov r2, #1 + ldr r1, [r1, #4] + mov r3, #9 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0207D570 + cmp r0, #0 + beq _021D40EA + add r0, r4, #0 + mov r1, #0 + add r2, r4, #0 + bl ov19_021D5BE8 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x16 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D40EA: + add r0, r4, #0 + mov r1, #0xe + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4104: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D4172 + add r0, r4, #0 + mov r1, #0xf + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D412C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D4172 + ldr r0, _021D417C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D4172 + ldr r0, _021D4180 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D415E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D4172 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D4172: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D4174: .word 0x021E05E0 +_021D4178: .word 0x000005F3 +_021D417C: .word 0x021BF67C +_021D4180: .word 0x000005DD + thumb_func_end ov19_021D3FB0 + + thumb_func_start ov19_021D4184 +ov19_021D4184: ; 0x021D4184 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #6 + bhi _021D4238 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D419C: ; jump table + .short _021D41AA - _021D419C - 2 ; case 0 + .short _021D4210 - _021D419C - 2 ; case 1 + .short _021D427A - _021D419C - 2 ; case 2 + .short _021D42E2 - _021D419C - 2 ; case 3 + .short _021D4310 - _021D419C - 2 ; case 4 + .short _021D4338 - _021D419C - 2 ; case 5 + .short _021D436A - _021D419C - 2 ; case 6 +_021D41AA: + bl ov19_021D5F88 + ldr r1, _021D4380 ; =0x021E05E0 + str r0, [r1, #0] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _021D41DE + ldr r0, _021D4384 ; =0x000005F3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x18 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D41DE: + mov r0, #0x67 + ldr r2, _021D4380 ; =0x021E05E0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200B70C + add r0, r4, #0 + mov r1, #0x1a + bl ov19_021D5408 + add r0, r4, #0 + mov r1, #0 + bl ov19_021DF964 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl ov19_021D6594 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4210: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D4238 + add r0, r4, #0 + bl ov19_021DFD2C + cmp r0, #0x36 + bgt _021D4242 + bge _021D4268 + mov r2, #0 + mvn r2, r2 + cmp r0, r2 + bgt _021D4238 + sub r1, r2, #1 + cmp r0, r1 + bge _021D423A +_021D4238: + b _021D437E +_021D423A: + beq _021D4248 + cmp r0, r2 + beq _021D4256 + pop {r3, r4, r5, pc} +_021D4242: + cmp r0, #0x37 + beq _021D4256 + pop {r3, r4, r5, pc} +_021D4248: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1c + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D4256: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4268: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D427A: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207D990 + ldr r1, _021D4380 ; =0x021E05E0 + mov r2, #1 + ldr r1, [r1, #0] + mov r3, #9 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0207D570 + cmp r0, #0 + beq _021D42C8 + add r0, r4, #0 + bl ov19_021D5F7C + cmp r0, #0 + beq _021D42AC + add r0, r4, #0 + bl ov19_021D5D54 + mov r0, #4 + b _021D42B8 +_021D42AC: + add r0, r4, #0 + mov r1, #0 + add r2, r4, #0 + bl ov19_021D5BE8 + mov r0, #3 +_021D42B8: + str r0, [r5, #0] + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x17 + bl ov19_021D6594 + pop {r3, r4, r5, pc} +_021D42C8: + add r0, r4, #0 + mov r1, #0xe + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D42E2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x17 + bl ov19_021D6600 + cmp r0, #0 + beq _021D437E + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x16 + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4310: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D437E + add r0, r4, #0 + mov r1, #0x1b + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #5 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D4338: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D437E + ldr r0, _021D4388 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021D437E + ldr r0, _021D438C ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1a + bl ov19_021D6594 + mov r0, #6 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D436A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D437E + add r0, r4, #0 + bl ov19_021D0EC0 +_021D437E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D4380: .word 0x021E05E0 +_021D4384: .word 0x000005F3 +_021D4388: .word 0x021BF67C +_021D438C: .word 0x000005DD + thumb_func_end ov19_021D4184 + + thumb_func_start ov19_021D4390 +ov19_021D4390: ; 0x021D4390 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #4 + bhi _021D4434 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D43A8: ; jump table + .short _021D43B2 - _021D43A8 - 2 ; case 0 + .short _021D43C6 - _021D43A8 - 2 ; case 1 + .short _021D43EA - _021D43A8 - 2 ; case 2 + .short _021D4402 - _021D43A8 - 2 ; case 3 + .short _021D441E - _021D43A8 - 2 ; case 4 +_021D43B2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1a + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D43C6: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1a + bl ov19_021D6600 + cmp r0, #0 + beq _021D4434 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x11 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D43EA: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x11 + bl ov19_021D6600 + cmp r0, #0 + beq _021D4434 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D4402: + ldr r0, _021D4438 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0xf3 + tst r1, r0 + beq _021D4434 + add r0, #0x21 + ldr r0, [r5, r0] + mov r1, #0x12 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D441E: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x12 + bl ov19_021D6600 + cmp r0, #0 + beq _021D4434 + add r0, r5, #0 + bl ov19_021D0EC0 +_021D4434: + pop {r3, r4, r5, pc} + nop +_021D4438: .word 0x021BF67C + thumb_func_end ov19_021D4390 + + thumb_func_start ov19_021D443C +ov19_021D443C: ; 0x021D443C + push {r4, r5} + mov r3, #0x6f + lsl r3, r3, #2 + mov r5, #0 + str r5, [r0, r3] + add r4, r3, #5 + strb r1, [r0, r4] + add r1, r3, #6 + strh r2, [r0, r1] + add r1, r3, #4 + strb r5, [r0, r1] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D443C + + thumb_func_start ov19_021D4458 +ov19_021D4458: ; 0x021D4458 + mov r1, #0x6f + mov r2, #0 + lsl r1, r1, #2 + str r2, [r0, r1] + mov r2, #1 + add r1, r1, #4 + strb r2, [r0, r1] + bx lr + thumb_func_end ov19_021D4458 + + thumb_func_start ov19_021D4468 +ov19_021D4468: ; 0x021D4468 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x6f + lsl r0, r0, #2 + add r4, r5, r0 + ldr r1, [r4, #0] + cmp r1, #3 + bls _021D447A + b _021D459C +_021D447A: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D4486: ; jump table + .short _021D448E - _021D4486 - 2 ; case 0 + .short _021D44C4 - _021D4486 - 2 ; case 1 + .short _021D44EC - _021D4486 - 2 ; case 2 + .short _021D44FE - _021D4486 - 2 ; case 3 +_021D448E: + ldrb r0, [r4, #4] + cmp r0, #1 + bne _021D449A + mov r0, #1 + str r0, [r4, #0] + b _021D459C +_021D449A: + mov r0, #5 + ldrsb r1, [r4, r0] + sub r0, r0, #6 + cmp r1, r0 + bne _021D44A8 + mov r0, #0 + strb r0, [r4, #5] +_021D44A8: + mov r1, #5 + ldrsb r1, [r4, r1] + add r0, r5, #0 + bl ov19_021D5D20 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1e + bl ov19_021D6594 + mov r0, #1 + str r0, [r4, #0] + b _021D459C +_021D44C4: + sub r0, #0xa8 + ldr r0, [r5, r0] + mov r1, #0x1e + bl ov19_021D6600 + cmp r0, #0 + beq _021D459C + ldrh r1, [r4, #6] + add r0, r5, #0 + bl ov19_021D5408 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x18 + bl ov19_021D6594 + mov r0, #2 + str r0, [r4, #0] + b _021D459C +_021D44EC: + sub r0, #0xa8 + ldr r0, [r5, r0] + mov r1, #0x18 + bl ov19_021D6600 + cmp r0, #0 + beq _021D459C + mov r0, #3 + str r0, [r4, #0] +_021D44FE: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1f + bl ov19_021D6600 + cmp r0, #0 + beq _021D459C + ldr r0, _021D45A0 ; =0x021BF67C + mov r1, #0x22 + ldr r0, [r0, #0x48] + lsl r1, r1, #4 + add r2, r0, #0 + tst r2, r1 + beq _021D4546 + mov r0, #5 + ldrsb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, #5] + ldrsb r0, [r4, r0] + cmp r0, #0 + bge _021D452E + mov r0, #0x11 + strb r0, [r4, #5] +_021D452E: + mov r1, #5 + ldrsb r1, [r4, r1] + add r0, r5, #0 + bl ov19_021D5D20 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1f + bl ov19_021D6594 + b _021D459C +_021D4546: + lsr r1, r1, #1 + tst r1, r0 + beq _021D4576 + mov r0, #5 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #5] + ldrsb r0, [r4, r0] + cmp r0, #0x12 + blt _021D455E + mov r0, #0 + strb r0, [r4, #5] +_021D455E: + mov r1, #5 + ldrsb r1, [r4, r1] + add r0, r5, #0 + bl ov19_021D5D20 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x1f + bl ov19_021D6594 + b _021D459C +_021D4576: + mov r1, #1 + tst r1, r0 + beq _021D4586 + ldr r0, _021D45A4 ; =0x000005DD + bl sub_02005748 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D4586: + mov r1, #2 + tst r0, r1 + beq _021D459C + ldr r0, _021D45A4 ; =0x000005DD + bl sub_02005748 + mov r0, #0 + mvn r0, r0 + strb r0, [r4, #5] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D459C: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D45A0: .word 0x021BF67C +_021D45A4: .word 0x000005DD + thumb_func_end ov19_021D4468 + + thumb_func_start ov19_021D45A8 +ov19_021D45A8: ; 0x021D45A8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0 + beq _021D45BE + cmp r1, #1 + beq _021D45E8 + cmp r1, #2 + beq _021D4628 + pop {r3, r4, r5, pc} +_021D45BE: + bl ov19_021D5E68 + add r1, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02079A94 + add r0, r5, #0 + bl ov19_021D52F4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #4 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D45E8: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #4 + bl ov19_021D6600 + cmp r0, #0 + beq _021D463E + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D4620 + add r0, r5, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D4620 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl ov19_021D6594 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D4620: + add r0, r5, #0 + bl ov19_021D0EC0 + pop {r3, r4, r5, pc} +_021D4628: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl ov19_021D6600 + cmp r0, #0 + beq _021D463E + add r0, r5, #0 + bl ov19_021D0EC0 +_021D463E: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D45A8 + + thumb_func_start ov19_021D4640 +ov19_021D4640: ; 0x021D4640 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r0, #0 + ldr r0, [r6, #0] + cmp r0, #5 + bhi _021D46C2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4658: ; jump table + .short _021D4664 - _021D4658 - 2 ; case 0 + .short _021D46B2 - _021D4658 - 2 ; case 1 + .short _021D4862 - _021D4658 - 2 ; case 2 + .short _021D48B8 - _021D4658 - 2 ; case 3 + .short _021D48F4 - _021D4658 - 2 ; case 4 + .short _021D490A - _021D4658 - 2 ; case 5 +_021D4664: + ldr r0, _021D4920 ; =0x000005E4 + bl sub_02005748 + add r0, r4, #0 + mov r1, #1 + bl ov19_021D5D94 + add r0, r4, #0 + bl ov19_021D5E68 + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D5D9C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x28 + bl ov19_021D6594 + mov r0, #0x58 + str r0, [sp] + mov r0, #0x72 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + mov r2, #0xc0 + mov r3, #0x38 + bl ov19_021D603C + mov r0, #0x81 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r1, #1 + add r0, r0, #4 + str r1, [r4, r0] + str r1, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D46B2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x28 + bl ov19_021D6600 + cmp r0, #0 + bne _021D46C4 +_021D46C2: + b _021D491E +_021D46C4: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D46F4 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #1 + bne _021D46F4 + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D46EC + ldr r1, _021D4924 ; =ov19_021D4938 + add r0, r4, #0 + bl ov19_021D0EB0 + pop {r3, r4, r5, r6, r7, pc} +_021D46EC: + ldr r0, _021D4928 ; =0x000005F3 + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021D46F4: + ldr r0, _021D492C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0xf3 + tst r0, r1 + beq _021D472C + ldr r0, _021D4930 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + bl ov19_021D5D94 + add r0, r4, #0 + bl ov19_021D5E68 + add r1, r0, #0 + add r0, r4, #0 + bl ov19_021D5D9C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x28 + bl ov19_021D6594 + mov r0, #5 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D472C: + mov r1, #0x81 + lsl r1, r1, #2 + ldr r0, [r4, r1] + cmp r0, #0 + beq _021D47A4 + add r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D47A4 + sub r0, r1, #4 + ldr r0, [r4, r0] + add r2, r0, #1 + sub r0, r1, #4 + str r2, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0x14 + bls _021D47A4 + add r0, r4, #0 + bl ov19_021D5EB8 + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov19_021D5D08 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, r5, #0 + bl sub_02079A94 + add r0, r4, #0 + bl ov19_021D52F4 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D4786 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #8 + bl ov19_021D6594 +_021D4786: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl ov19_021D6594 + mov r0, #0x81 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, r0, #4 + str r1, [r4, r0] + mov r0, #3 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D47A4: + mov r0, #0x72 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov19_021D60A8 + cmp r0, #1 + beq _021D47BC + cmp r0, #2 + beq _021D47DC + cmp r0, #3 + beq _021D4836 + pop {r3, r4, r5, r6, r7, pc} +_021D47BC: + add r0, r4, #0 + bl ov19_021D5EB8 + mov r1, #0x7f + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + mov r2, #0 + add r0, #8 + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0x10 + str r2, [r4, r0] + add r1, #0xc + str r2, [r4, r1] + pop {r3, r4, r5, r6, r7, pc} +_021D47DC: + mov r0, #0x72 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov19_021D614C + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r5, r0 + bne _021D47F4 + b _021D491E +_021D47F4: + sub r7, r5, r0 + add r0, r4, #0 + bl ov19_021D5EB8 + add r1, r7, r0 + bpl _021D4804 + add r1, #0x12 + b _021D480A +_021D4804: + cmp r1, #0x12 + blt _021D480A + sub r1, #0x12 +_021D480A: + mov r0, #0x83 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + bl ov19_021D5D9C + add r0, r4, #0 + add r1, r7, #0 + bl ov19_021D5DAC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x29 + bl ov19_021D6594 + ldr r0, _021D4934 ; =0x000005DC + bl sub_02005748 + mov r0, #2 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D4836: + add r0, r4, #0 + bl ov19_021D5E68 + add r5, r0, #0 + add r0, r4, #0 + bl ov19_021D5EB8 + cmp r5, r0 + beq _021D484C + mov r1, #1 + b _021D484E +_021D484C: + mov r1, #0 +_021D484E: + mov r0, #0x81 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r1, r0, #4 + mov r2, #0 + str r2, [r4, r1] + mov r1, #1 + add r0, r0, #4 + str r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D4862: + mov r0, #0x82 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _021D48A2 + sub r0, #0x40 + add r0, r4, r0 + bl ov19_021D60A8 + cmp r0, #3 + bne _021D48A2 + add r0, r4, #0 + bl ov19_021D5E68 + add r5, r0, #0 + add r0, r4, #0 + bl ov19_021D5EB8 + cmp r5, r0 + beq _021D488E + mov r1, #1 + b _021D4890 +_021D488E: + mov r1, #0 +_021D4890: + mov r0, #0x81 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r1, r0, #4 + mov r2, #0 + str r2, [r4, r1] + mov r1, #1 + add r0, r0, #4 + str r1, [r4, r0] +_021D48A2: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x29 + bl ov19_021D6600 + cmp r0, #0 + beq _021D491E + mov r0, #1 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D48B8: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl ov19_021D6600 + cmp r0, #0 + beq _021D491E + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D48EE + add r0, r4, #0 + bl ov19_021D5E34 + cmp r0, #0 + beq _021D48EE + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6594 + mov r0, #4 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D48EE: + mov r0, #1 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D48F4: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl ov19_021D6600 + cmp r0, #0 + beq _021D491E + mov r0, #1 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D490A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D491E + add r0, r4, #0 + bl ov19_021D0EC0 +_021D491E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4920: .word 0x000005E4 +_021D4924: .word ov19_021D4938 +_021D4928: .word 0x000005F3 +_021D492C: .word 0x021BF67C +_021D4930: .word 0x000005DD +_021D4934: .word 0x000005DC + thumb_func_end ov19_021D4640 + + thumb_func_start ov19_021D4938 +ov19_021D4938: ; 0x021D4938 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + add r4, r0, #0 + ldr r0, [r6, #0] + cmp r0, #3 + bhi _021D49BC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4952: ; jump table + .short _021D495A - _021D4952 - 2 ; case 0 + .short _021D49AC - _021D4952 - 2 ; case 1 + .short _021D4B04 - _021D4952 - 2 ; case 2 + .short _021D4B5C - _021D4952 - 2 ; case 3 +_021D495A: + ldr r0, _021D4B74 ; =0x000005E4 + bl sub_02005748 + add r0, r4, #0 + mov r1, #2 + bl ov19_021D5D94 + add r0, r4, #0 + mov r1, #0 + bl ov19_021D5DA4 + add r0, r4, #0 + mov r1, #0 + bl ov19_021D5D9C + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x28 + bl ov19_021D6594 + mov r0, #0x58 + str r0, [sp] + mov r0, #0x72 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0xff + mov r2, #0xc0 + mov r3, #0x38 + bl ov19_021D603C + mov r0, #0x81 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r1, #1 + add r0, r0, #4 + str r1, [r4, r0] + add sp, #8 + str r1, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D49AC: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x28 + bl ov19_021D6600 + cmp r0, #0 + bne _021D49BE +_021D49BC: + b _021D4B70 +_021D49BE: + add r0, r4, #0 + bl ov19_021D538C + cmp r0, #0 + beq _021D49DE + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021D49DE + ldr r1, _021D4B78 ; =ov19_021D4640 + add r0, r4, #0 + bl ov19_021D0EB0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_021D49DE: + ldr r0, _021D4B7C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0xf3 + tst r0, r1 + beq _021D4A06 + ldr r0, _021D4B80 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + bl ov19_021D5D94 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x28 + bl ov19_021D6594 + mov r0, #3 + str r0, [r6, #0] +_021D4A06: + add r0, r4, #0 + bl ov19_021D4B88 + cmp r0, #0 + beq _021D4A32 + ldr r0, _021D4B80 ; =0x000005DD + bl sub_02005748 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x2a + bl ov19_021D6594 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x27 + bl ov19_021D6594 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_021D4A32: + mov r0, #0x72 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov19_021D60A8 + cmp r0, #1 + beq _021D4A4C + cmp r0, #2 + beq _021D4A6E + cmp r0, #3 + beq _021D4AD6 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_021D4A4C: + add r0, r4, #0 + bl ov19_021D5EB8 + mov r1, #0x7f + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + mov r2, #0 + add r0, #8 + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0x10 + str r2, [r4, r0] + add r1, #0xc + add sp, #8 + str r2, [r4, r1] + pop {r3, r4, r5, r6, r7, pc} +_021D4A6E: + mov r0, #0x72 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov19_021D614C + add r7, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r7, r0 + beq _021D4B70 + sub r0, r7, r0 + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D5EB8 + ldr r1, [sp, #4] + add r5, r1, r0 + bpl _021D4A98 + add r5, #8 + b _021D4A9E +_021D4A98: + cmp r5, #8 + blt _021D4A9E + sub r5, #8 +_021D4A9E: + mov r0, #0x83 + lsl r0, r0, #2 + str r7, [r4, r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov19_021D5D9C + add r0, r4, #0 + add r1, r5, #0 + bl ov19_021D5DA4 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov19_021D5DAC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x29 + bl ov19_021D6594 + ldr r0, _021D4B84 ; =0x000005DC + bl sub_02005748 + mov r0, #2 + add sp, #8 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D4AD6: + add r0, r4, #0 + bl ov19_021D5E68 + add r5, r0, #0 + add r0, r4, #0 + bl ov19_021D5EB8 + cmp r5, r0 + beq _021D4AEC + mov r1, #1 + b _021D4AEE +_021D4AEC: + mov r1, #0 +_021D4AEE: + mov r0, #0x81 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r1, r0, #4 + mov r2, #0 + str r2, [r4, r1] + mov r1, #1 + add r0, r0, #4 + add sp, #8 + str r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D4B04: + mov r0, #0x82 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _021D4B44 + sub r0, #0x40 + add r0, r4, r0 + bl ov19_021D60A8 + cmp r0, #3 + bne _021D4B44 + add r0, r4, #0 + bl ov19_021D5E68 + add r5, r0, #0 + add r0, r4, #0 + bl ov19_021D5EB8 + cmp r5, r0 + beq _021D4B30 + mov r1, #1 + b _021D4B32 +_021D4B30: + mov r1, #0 +_021D4B32: + mov r0, #0x81 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r1, r0, #4 + mov r2, #0 + str r2, [r4, r1] + mov r1, #1 + add r0, r0, #4 + str r1, [r4, r0] +_021D4B44: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x29 + bl ov19_021D6600 + cmp r0, #0 + beq _021D4B70 + mov r0, #1 + add sp, #8 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D4B5C: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov19_021D6628 + cmp r0, #0 + beq _021D4B70 + add r0, r4, #0 + bl ov19_021D0EC0 +_021D4B70: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4B74: .word 0x000005E4 +_021D4B78: .word ov19_021D4640 +_021D4B7C: .word 0x021BF67C +_021D4B80: .word 0x000005DD +_021D4B84: .word 0x000005DC + thumb_func_end ov19_021D4938 + + thumb_func_start ov19_021D4B88 +ov19_021D4B88: ; 0x021D4B88 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x62 + mov r1, #8 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #8 + ldr r0, [r4, r0] + bl sub_0202404C + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #8 + beq _021D4BAA + mov r0, #1 + pop {r4, pc} +_021D4BAA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4B88 + + thumb_func_start ov19_021D4BB0 +ov19_021D4BB0: ; 0x021D4BB0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x62 + add r4, r2, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #8 + bne _021D4BDE + cmp r1, #0 + bne _021D4BDE + add r0, r4, #0 + bl ov19_021D5EC0 + add r1, r0, r5 + cmp r1, #8 + blo _021D4BD2 + sub r1, #8 +_021D4BD2: + add r0, r4, #0 + bl ov19_021D5DB4 + mov r0, #0x62 + lsl r0, r0, #2 + str r5, [r4, r0] +_021D4BDE: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D4BB0 + + thumb_func_start ov19_021D4BE0 +ov19_021D4BE0: ; 0x021D4BE0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl sub_02024420 + mov r1, #0x12 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r2, [r4, #0] + sub r0, r1, #4 + str r2, [r5, r0] + ldr r0, [r4, #0] + bl sub_0207A268 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #0] + bl sub_02025E44 + mov r1, #0x69 + lsl r1, r1, #2 + str r0, [r5, r1] + sub r1, #0x8c + str r4, [r5, r1] + mov r0, #0 + mov r1, #0x1a + mov r2, #0x13 + mov r3, #9 + str r0, [r4, #8] + bl sub_0200B144 + mov r2, #0x63 + lsl r2, r2, #2 + str r0, [r5, r2] + mov r0, #1 + mov r1, #0x1a + add r2, #0x10 + mov r3, #9 + bl sub_0200B144 + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xca + mov r3, #9 + bl sub_0200B144 + mov r2, #0x65 + lsl r2, r2, #2 + str r0, [r5, r2] + mov r0, #0 + mov r1, #0x1a + add r2, #0xce + mov r3, #9 + bl sub_0200B144 + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #9 + bl sub_0200B358 + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r5, r1] + bl sub_02073C70 + add r1, r0, #0 + mov r0, #9 + bl sub_02018144 + mov r1, #0x1a + lsl r1, r1, #4 + str r0, [r5, r1] + sub r0, r1, #4 + ldr r0, [r5, r0] + cmp r0, #0 + bne _021D4C88 + bl sub_02022974 +_021D4C88: + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + str r0, [sp] + mov r0, #9 + mov r2, #0 + mov r3, #8 + bl sub_0208712C + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #4] + cmp r0, #4 + beq _021D4CBA + mov r0, #9 + str r0, [sp] + ldr r0, _021D4D44 ; =0x021DFDF6 + ldr r2, _021D4D48 ; =ov19_021D53B8 + mov r1, #3 + add r3, r5, #0 + bl sub_02023FCC + b _021D4CCA +_021D4CBA: + mov r0, #9 + str r0, [sp] + ldr r0, _021D4D4C ; =0x021DFE02 + ldr r2, _021D4D48 ; =ov19_021D53B8 + mov r1, #4 + add r3, r5, #0 + bl sub_02023FCC +_021D4CCA: + mov r1, #0x5f + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #9 + str r0, [sp] + ldr r0, _021D4D50 ; =0x021DFE12 + ldr r2, _021D4D54 ; =ov19_021D4BB0 + mov r1, #7 + add r3, r5, #0 + bl sub_02023FCC + mov r1, #6 + lsl r1, r1, #6 + str r0, [r5, r1] + add r0, r1, #0 + sub r0, #0x60 + ldr r0, [r5, r0] + mov r2, #0 + str r0, [r5, #0] + add r0, r1, #0 + sub r0, #0x5c + ldr r0, [r5, r0] + str r0, [r5, #4] + add r0, r1, #0 + sub r0, #0x70 + strh r2, [r5, r0] + sub r1, #0x6e + strh r2, [r5, r1] + add r0, r5, #0 + ldr r1, [r4, #4] + add r0, #0x48 + bl ov19_021D4DE4 + add r0, r5, #0 + add r0, #0x4c + bl ov19_021D4E88 + mov r0, #0x12 + lsl r0, r0, #4 + add r1, r5, #0 + ldr r0, [r5, r0] + add r1, #0x40 + bl ov19_021D4E5C + add r0, r5, #0 + add r0, #0xa4 + bl ov19_021D4EE4 + add r0, r5, #0 + bl ov19_021D4DF0 + add r0, r5, #0 + add r0, #0x14 + bl ov19_021D4E30 + add r5, #0x9c + add r0, r5, #0 + bl ov19_021D4F34 + pop {r3, r4, r5, pc} + nop +_021D4D44: .word 0x021DFDF6 +_021D4D48: .word ov19_021D53B8 +_021D4D4C: .word 0x021DFE02 +_021D4D50: .word 0x021DFE12 +_021D4D54: .word ov19_021D4BB0 + thumb_func_end ov19_021D4BE0 + + thumb_func_start ov19_021D4D58 +ov19_021D4D58: ; 0x021D4D58 + push {r4, lr} + add r4, r0, #0 + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D4D7E + bl sub_020181C4 +_021D4D7E: + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200B3F0 + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0208716C + add r0, r4, #0 + add r0, #0x4c + bl ov19_021D4EC0 + add r0, r4, #0 + add r0, #0x14 + bl ov19_021D4E50 + add r0, r4, #0 + add r0, #0x40 + bl ov19_021D4E7C + add r0, r4, #0 + add r0, #0xa4 + bl ov19_021D4F18 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4D58 + + thumb_func_start ov19_021D4DE4 +ov19_021D4DE4: ; 0x021D4DE4 + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + strh r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D4DE4 + + thumb_func_start ov19_021D4DF0 +ov19_021D4DF0: ; 0x021D4DF0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0 + add r4, r5, #0 + add r2, r1, #0 + add r4, #8 + bl ov19_021D5410 + mov r2, #0 + add r0, r5, #0 + strb r2, [r4, #8] + mov r1, #1 + strb r1, [r4, #9] + add r0, #0x48 + ldrb r0, [r0] + cmp r0, #0 + beq _021D4E18 + cmp r0, #4 + beq _021D4E1C + b _021D4E22 +_021D4E18: + strb r1, [r4, #4] + b _021D4E24 +_021D4E1C: + mov r0, #2 + strb r0, [r4, #4] + b _021D4E24 +_021D4E22: + strb r2, [r4, #4] +_021D4E24: + mov r0, #1 + strb r0, [r4, #0xb] + add r0, r5, #0 + bl ov19_021D52F4 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D4DF0 + + thumb_func_start ov19_021D4E30 +ov19_021D4E30: ; 0x021D4E30 + push {r4, lr} + add r4, r0, #0 + bl sub_02076AF4 + add r2, r0, #0 + mov r1, #0x1e + mov r0, #9 + mul r1, r2 + bl sub_02018144 + str r0, [r4, #0] + mov r0, #0 + strb r0, [r4, #8] + strb r0, [r4, #0xb] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4E30 + + thumb_func_start ov19_021D4E50 +ov19_021D4E50: ; 0x021D4E50 + ldr r3, _021D4E58 ; =sub_020181C4 + ldr r0, [r0, #0] + bx r3 + nop +_021D4E58: .word sub_020181C4 + thumb_func_end ov19_021D4E50 + + thumb_func_start ov19_021D4E5C +ov19_021D4E5C: ; 0x021D4E5C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl sub_0207999C + strb r0, [r4] + mov r0, #0x14 + mov r1, #9 + bl sub_02023790 + str r0, [r4, #4] + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021D4F40 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D4E5C + + thumb_func_start ov19_021D4E7C +ov19_021D4E7C: ; 0x021D4E7C + ldr r3, _021D4E84 ; =sub_020237BC + ldr r0, [r0, #4] + bx r3 + nop +_021D4E84: .word sub_020237BC + thumb_func_end ov19_021D4E7C + + thumb_func_start ov19_021D4E88 +ov19_021D4E88: ; 0x021D4E88 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xc + mov r1, #9 + bl sub_02023790 + str r0, [r4, #0x14] + mov r0, #0xc + mov r1, #9 + bl sub_02023790 + str r0, [r4, #0x18] + mov r0, #0x12 + mov r1, #9 + bl sub_02023790 + str r0, [r4, #0x1c] + mov r0, #0xc + mov r1, #9 + bl sub_02023790 + str r0, [r4, #0x20] + mov r0, #0x10 + mov r1, #9 + bl sub_02023790 + str r0, [r4, #0x24] + pop {r4, pc} + thumb_func_end ov19_021D4E88 + + thumb_func_start ov19_021D4EC0 +ov19_021D4EC0: ; 0x021D4EC0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_020237BC + ldr r0, [r4, #0x18] + bl sub_020237BC + ldr r0, [r4, #0x1c] + bl sub_020237BC + ldr r0, [r4, #0x20] + bl sub_020237BC + ldr r0, [r4, #0x24] + bl sub_020237BC + pop {r4, pc} + thumb_func_end ov19_021D4EC0 + + thumb_func_start ov19_021D4EE4 +ov19_021D4EE4: ; 0x021D4EE4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r4, #0 + strb r4, [r6] + strb r4, [r6, #1] + str r4, [r6, #4] + add r5, r6, #0 + add r7, r4, #0 +_021D4EF4: + add r0, r6, r4 + strb r7, [r0, #2] + mov r0, #0xc + mov r1, #9 + bl sub_02023790 + str r0, [r5, #0x30] + mov r0, #0xc + mov r1, #9 + bl sub_02023790 + str r0, [r5, #0x34] + add r4, r4, #1 + add r5, #0x30 + cmp r4, #2 + blt _021D4EF4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4EE4 + + thumb_func_start ov19_021D4F18 +ov19_021D4F18: ; 0x021D4F18 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021D4F1E: + ldr r0, [r5, #0x30] + bl sub_020237BC + ldr r0, [r5, #0x34] + bl sub_020237BC + add r4, r4, #1 + add r5, #0x30 + cmp r4, #2 + blt _021D4F1E + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D4F18 + + thumb_func_start ov19_021D4F34 +ov19_021D4F34: ; 0x021D4F34 + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #2] + strb r1, [r0, #1] + strh r1, [r0, #4] + bx lr + thumb_func_end ov19_021D4F34 + + thumb_func_start ov19_021D4F40 +ov19_021D4F40: ; 0x021D4F40 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + bl sub_02079AA8 + strb r0, [r4, #1] + ldrb r1, [r4] + ldr r2, [r4, #4] + add r0, r5, #0 + bl sub_02079AF4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4F40 + + thumb_func_start ov19_021D4F5C +ov19_021D4F5C: ; 0x021D4F5C + push {r4, lr} + add r2, r0, #0 + add r4, r2, #0 + add r2, #0x40 + add r0, r1, #0 + ldrb r1, [r2] + add r4, #0x40 + bl sub_02079AA8 + strb r0, [r4, #1] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4F5C + + thumb_func_start ov19_021D4F74 +ov19_021D4F74: ; 0x021D4F74 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r4, #0 + tst r2, r1 + beq _021D4F90 + add r0, r5, #0 + sub r1, #0x21 + add r2, r4, #0 + bl ov19_021D4FDC + add r4, r0, #0 + b _021D4FCC +_021D4F90: + mov r1, #0x10 + tst r1, r0 + beq _021D4FA4 + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + bl ov19_021D4FDC + add r4, r0, #0 + b _021D4FCC +_021D4FA4: + mov r2, #0x40 + add r1, r0, #0 + tst r1, r2 + beq _021D4FBA + add r0, r5, #0 + add r1, r4, #0 + sub r2, #0x41 + bl ov19_021D4FDC + add r4, r0, #0 + b _021D4FCC +_021D4FBA: + mov r1, #0x80 + tst r0, r1 + beq _021D4FCC + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov19_021D4FDC + add r4, r0, #0 +_021D4FCC: + cmp r4, #1 + bne _021D4FD6 + add r0, r5, #0 + bl ov19_021D52F4 +_021D4FD6: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4F74 + + thumb_func_start ov19_021D4FDC +ov19_021D4FDC: ; 0x021D4FDC + push {r4, lr} + add r3, r0, #0 + add r3, #8 + ldrb r4, [r3, #4] + cmp r4, #4 + bhi _021D502A + add r4, r4, r4 + add r4, pc + ldrh r4, [r4, #6] + lsl r4, r4, #0x10 + asr r4, r4, #0x10 + add pc, r4 +_021D4FF4: ; jump table + .short _021D4FFE - _021D4FF4 - 2 ; case 0 + .short _021D50E0 - _021D4FF4 - 2 ; case 1 + .short _021D505E - _021D4FF4 - 2 ; case 2 + .short _021D50B4 - _021D4FF4 - 2 ; case 3 + .short _021D5088 - _021D4FF4 - 2 ; case 4 +_021D4FFE: + cmp r1, #0 + beq _021D5026 + mov r2, #5 + ldrsb r4, [r3, r2] + add r1, r4, r1 + strb r1, [r3, #5] + ldrsb r1, [r3, r2] + cmp r1, #0 + bge _021D5014 + add r1, r2, #0 + b _021D501A +_021D5014: + cmp r1, #6 + blt _021D501A + mov r1, #0 +_021D501A: + mov r2, #6 + ldrsb r2, [r3, r2] + bl ov19_021D5410 + mov r0, #1 + pop {r4, pc} +_021D5026: + cmp r2, #0 + bne _021D502C +_021D502A: + b _021D514A +_021D502C: + mov r1, #6 + ldrsb r1, [r3, r1] + add r2, r1, r2 + bpl _021D503C + mov r1, #2 + mov r2, #0 + strb r1, [r3, #4] + b _021D5052 +_021D503C: + cmp r2, #4 + ble _021D5052 + mov r1, #5 + ldrsb r1, [r3, r1] + mov r2, #4 + cmp r1, #5 + bne _021D504E + add r1, r2, #0 + b _021D5050 +_021D504E: + mov r1, #3 +_021D5050: + strb r1, [r3, #4] +_021D5052: + mov r1, #5 + ldrsb r1, [r3, r1] + bl ov19_021D5410 + mov r0, #1 + pop {r4, pc} +_021D505E: + cmp r2, #0 + ble _021D5072 + mov r2, #0 + strb r2, [r3, #4] + mov r1, #5 + ldrsb r1, [r3, r1] + bl ov19_021D5410 + mov r0, #1 + pop {r4, pc} +_021D5072: + bge _021D514A + mov r0, #5 + ldrsb r0, [r3, r0] + cmp r0, #5 + bne _021D5080 + mov r0, #4 + b _021D5082 +_021D5080: + mov r0, #3 +_021D5082: + strb r0, [r3, #4] + mov r0, #1 + pop {r4, pc} +_021D5088: + cmp r2, #0 + bge _021D509E + mov r1, #0 + strb r1, [r3, #4] + mov r1, #5 + ldrsb r1, [r3, r1] + mov r2, #4 + bl ov19_021D5410 + mov r0, #1 + pop {r4, pc} +_021D509E: + ble _021D50A8 + mov r0, #2 + strb r0, [r3, #4] + mov r0, #1 + pop {r4, pc} +_021D50A8: + cmp r1, #0 + beq _021D514A + mov r0, #3 + strb r0, [r3, #4] + mov r0, #1 + pop {r4, pc} +_021D50B4: + cmp r2, #0 + bge _021D50CA + mov r1, #0 + strb r1, [r3, #4] + mov r1, #5 + ldrsb r1, [r3, r1] + mov r2, #4 + bl ov19_021D5410 + mov r0, #1 + pop {r4, pc} +_021D50CA: + ble _021D50D4 + mov r0, #2 + strb r0, [r3, #4] + mov r0, #1 + pop {r4, pc} +_021D50D4: + cmp r1, #0 + beq _021D514A + mov r0, #4 + strb r0, [r3, #4] + mov r0, #1 + pop {r4, pc} +_021D50E0: + mov r4, #8 + ldrsb r0, [r3, r4] + cmp r2, #0 + bge _021D5102 + cmp r0, #6 + bne _021D50F2 + mov r1, #5 + strb r1, [r3, #8] + b _021D513E +_021D50F2: + sub r1, r0, #2 + strb r1, [r3, #8] + ldrsb r1, [r3, r4] + cmp r1, #0 + bge _021D513E + mov r1, #6 + strb r1, [r3, #8] + b _021D513E +_021D5102: + ble _021D511E + cmp r0, #6 + bne _021D510E + mov r1, #0 + strb r1, [r3, #8] + b _021D513E +_021D510E: + add r1, r0, #2 + strb r1, [r3, #8] + ldrsb r1, [r3, r4] + cmp r1, #6 + blt _021D513E + mov r1, #6 + strb r1, [r3, #8] + b _021D513E +_021D511E: + cmp r1, #0 + bge _021D512E + mov r1, #1 + tst r1, r0 + beq _021D513E + sub r1, r0, #1 + strb r1, [r3, #8] + b _021D513E +_021D512E: + ble _021D513E + cmp r0, #6 + beq _021D513E + mov r1, #1 + tst r1, r0 + bne _021D513E + add r1, r0, #1 + strb r1, [r3, #8] +_021D513E: + mov r1, #8 + ldrsb r1, [r3, r1] + cmp r0, r1 + beq _021D514A + mov r0, #1 + pop {r4, pc} +_021D514A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D4FDC + + thumb_func_start ov19_021D5150 +ov19_021D5150: ; 0x021D5150 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r4, #0 + tst r2, r1 + beq _021D516C + add r0, r5, #0 + sub r1, #0x21 + add r2, r4, #0 + bl ov19_021D51CC + add r4, r0, #0 + b _021D51BE +_021D516C: + mov r1, #0x10 + tst r1, r0 + beq _021D5180 + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + bl ov19_021D51CC + add r4, r0, #0 + b _021D51BE +_021D5180: + mov r2, #0x40 + add r1, r0, #0 + tst r1, r2 + beq _021D5196 + add r0, r5, #0 + add r1, r4, #0 + sub r2, #0x41 + bl ov19_021D51CC + add r4, r0, #0 + b _021D51BE +_021D5196: + mov r2, #0x80 + add r1, r0, #0 + tst r1, r2 + beq _021D51AC + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov19_021D51CC + add r4, r0, #0 + b _021D51BE +_021D51AC: + lsl r1, r2, #2 + tst r1, r0 + beq _021D51B6 + mov r4, #3 + b _021D51BE +_021D51B6: + add r2, #0x80 + tst r0, r2 + beq _021D51BE + mov r4, #4 +_021D51BE: + cmp r4, #1 + bne _021D51C8 + add r0, r5, #0 + bl ov19_021D52F4 +_021D51C8: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D5150 + + thumb_func_start ov19_021D51CC +ov19_021D51CC: ; 0x021D51CC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r4, r7, #0 + add r4, #8 + ldrb r3, [r4, #4] + add r6, r7, #0 + add r6, #0x14 + cmp r3, #0 + bne _021D5286 + cmp r1, #0 + beq _021D5234 + mov r2, #5 + ldrsb r2, [r4, r2] + add r5, r2, r1 + bl ov19_021D5E38 + mov r1, #0xc + tst r0, r1 + beq _021D5218 + ldrb r0, [r6, #4] + ldrb r3, [r6, #6] + add r2, r5, #0 + add r1, r5, #0 + cmp r3, r0 + bls _021D5204 + sub r0, r3, r0 + sub r1, r5, r0 + b _021D5208 +_021D5204: + sub r0, r0, r3 + add r2, r5, r0 +_021D5208: + cmp r1, #0 + bge _021D5210 + mov r0, #3 + pop {r3, r4, r5, r6, r7, pc} +_021D5210: + cmp r2, #6 + blt _021D5224 + mov r0, #4 + pop {r3, r4, r5, r6, r7, pc} +_021D5218: + cmp r5, #0 + blt _021D5220 + cmp r5, #6 + blt _021D5224 +_021D5220: + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_021D5224: + mov r2, #6 + ldrsb r2, [r4, r2] + add r0, r7, #0 + add r1, r5, #0 + bl ov19_021D5410 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D5234: + cmp r2, #0 + beq _021D5286 + mov r1, #6 + ldrsb r1, [r4, r1] + add r5, r1, r2 + bl ov19_021D5E38 + mov r1, #0xc + tst r0, r1 + beq _021D526A + ldrb r0, [r6, #5] + ldrb r3, [r6, #7] + add r2, r5, #0 + add r1, r5, #0 + cmp r3, r0 + bls _021D525A + sub r0, r3, r0 + sub r1, r5, r0 + b _021D525E +_021D525A: + sub r0, r0, r3 + add r2, r5, r0 +_021D525E: + cmp r1, #0 + blt _021D5266 + cmp r2, #5 + blt _021D5276 +_021D5266: + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_021D526A: + cmp r5, #0 + blt _021D5272 + cmp r5, #5 + blt _021D5276 +_021D5272: + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_021D5276: + mov r1, #5 + ldrsb r1, [r4, r1] + add r0, r7, #0 + add r2, r5, #0 + bl ov19_021D5410 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D5286: + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D51CC + + thumb_func_start ov19_021D5290 +ov19_021D5290: ; 0x021D5290 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #8 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D52BA + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0207A0F8 + strb r0, [r4, #8] + mov r0, #8 + ldrsb r0, [r4, r0] + cmp r0, #6 + blt _021D52BE + mov r0, #5 + strb r0, [r4, #8] + b _021D52BE +_021D52BA: + mov r0, #0 + strb r0, [r4, #8] +_021D52BE: + ldrb r0, [r4, #4] + strb r0, [r4, #9] + mov r0, #1 + strb r0, [r4, #4] + add r0, r5, #0 + bl ov19_021D52F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5290 + + thumb_func_start ov19_021D52D0 +ov19_021D52D0: ; 0x021D52D0 + push {r4, lr} + add r4, r0, #0 + add r3, r4, #0 + add r3, #8 + mov r1, #0 + strb r1, [r3, #4] + mov r2, #9 + ldrsb r2, [r3, r2] + cmp r2, #0 + beq _021D52EA + add r2, r1, #0 + bl ov19_021D5410 +_021D52EA: + add r0, r4, #0 + bl ov19_021D52F4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D52D0 + + thumb_func_start ov19_021D52F4 +ov19_021D52F4: ; 0x021D52F4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #8 + mov r1, #0 + strb r1, [r4, #0xa] + ldrb r0, [r4, #4] + cmp r0, #4 + bhi _021D5354 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5312: ; jump table + .short _021D531C - _021D5312 - 2 ; case 0 + .short _021D532C - _021D5312 - 2 ; case 1 + .short _021D5354 - _021D5312 - 2 ; case 2 + .short _021D5354 - _021D5312 - 2 ; case 3 + .short _021D5354 - _021D5312 - 2 ; case 4 +_021D531C: + mov r2, #7 + ldrsb r2, [r4, r2] + ldr r0, [r5, #0] + sub r1, r1, #1 + bl sub_02079C9C + str r0, [r4, #0] + b _021D5358 +_021D532C: + mov r0, #8 + ldrsb r6, [r4, r0] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0207A0F8 + cmp r6, r0 + bge _021D534E + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_0207A0FC + str r0, [r4, #0] + b _021D5358 +_021D534E: + mov r0, #0 + str r0, [r4, #0] + b _021D5358 +_021D5354: + mov r0, #0 + str r0, [r4, #0] +_021D5358: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D5388 + mov r1, #0xac + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021D5388 + mov r0, #1 + strb r0, [r4, #0xa] + add r0, r5, #0 + bl ov19_021D5E38 + mov r1, #6 + tst r0, r1 + bne _021D5388 + ldr r1, [r4, #0] + add r0, r5, #0 + add r2, r5, #0 + bl ov19_021D5888 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D5388: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021D52F4 + + thumb_func_start ov19_021D538C +ov19_021D538C: ; 0x021D538C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x61 + ldr r1, _021D53B4 ; =0x0000FFFF + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #8 + ldr r0, [r4, r0] + bl sub_0202404C + mov r0, #0x61 + lsl r0, r0, #2 + ldr r1, [r4, r0] + ldr r0, _021D53B4 ; =0x0000FFFF + cmp r1, r0 + beq _021D53B0 + mov r0, #1 + pop {r4, pc} +_021D53B0: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D53B4: .word 0x0000FFFF + thumb_func_end ov19_021D538C + + thumb_func_start ov19_021D53B8 +ov19_021D53B8: ; 0x021D53B8 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _021D53D2 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r2, [r4, r0] + ldr r1, _021D5404 ; =0x0000FFFF + cmp r2, r1 + bne _021D53D2 + str r6, [r4, r0] +_021D53D2: + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + bne _021D5400 + cmp r6, #2 + bne _021D5400 + cmp r5, #0 + beq _021D53EE + cmp r5, #1 + beq _021D53F8 + cmp r5, #3 + beq _021D53F8 + pop {r4, r5, r6, pc} +_021D53EE: + add r0, r4, #0 + mov r1, #1 + bl ov19_021D5BA0 + pop {r4, r5, r6, pc} +_021D53F8: + add r0, r4, #0 + mov r1, #0 + bl ov19_021D5BA0 +_021D5400: + pop {r4, r5, r6, pc} + nop +_021D5404: .word 0x0000FFFF + thumb_func_end ov19_021D53B8 + + thumb_func_start ov19_021D5408 +ov19_021D5408: ; 0x021D5408 + mov r2, #0x43 + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov19_021D5408 + + thumb_func_start ov19_021D5410 +ov19_021D5410: ; 0x021D5410 + add r0, #8 + mov r3, #6 + strb r1, [r0, #5] + mul r3, r2 + strb r2, [r0, #6] + add r1, r1, r3 + strb r1, [r0, #7] + bx lr + thumb_func_end ov19_021D5410 + + thumb_func_start ov19_021D5420 +ov19_021D5420: ; 0x021D5420 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r6, r0, #0 + add r4, r7, #0 + add r5, r7, #0 + add r0, r7, #0 + add r4, #0x14 + add r5, #8 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D545C + bl sub_02076AF4 + add r2, r0, #0 + ldr r0, [r5, #0] + ldr r1, [r4, #0] + bl sub_020C4B68 + mov r0, #0x12 + mov r2, #7 + lsl r0, r0, #4 + mov r1, #0 + ldrsb r2, [r5, r2] + ldr r0, [r6, r0] + mvn r1, r1 + bl sub_02079968 + mov r0, #0 + b _021D547A +_021D545C: + bl sub_02076AF0 + add r2, r0, #0 + ldr r0, [r5, #0] + ldr r1, [r4, #0] + bl sub_020C4B68 + mov r0, #0x49 + mov r1, #8 + lsl r0, r0, #2 + ldrsb r1, [r5, r1] + ldr r0, [r6, r0] + bl sub_0207A080 + mov r0, #1 +_021D547A: + strb r0, [r4, #0xb] + ldr r1, [r4, #0] + add r0, r7, #0 + bl ov19_021D5BA8 + mov r0, #5 + ldrsb r0, [r5, r0] + strb r0, [r4, #6] + ldrb r0, [r4, #6] + strb r0, [r4, #4] + mov r0, #6 + ldrsb r0, [r5, r0] + strb r0, [r4, #7] + ldrb r0, [r4, #7] + strb r0, [r4, #5] + mov r0, #2 + strb r0, [r7, #0x13] + mov r0, #0 + strb r0, [r7, #0x12] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5420 + + thumb_func_start ov19_021D54A4 +ov19_021D54A4: ; 0x021D54A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r6, r1, #0 + add r7, r0, #0 + add r6, #0x14 + mov r0, #1 + strb r0, [r6, #0xa] + add r0, r1, #0 + str r1, [sp, #4] + bl ov19_021D5E24 + str r0, [sp, #0x14] + bl sub_02076AF4 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + add r1, sp, #0x30 + ldr r5, [r0, #0x14] + add r0, sp, #0x24 + str r0, [sp] + ldr r0, [sp, #4] + add r2, sp, #0x2c + add r3, sp, #0x28 + bl ov19_021D5EE8 + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x24] + str r0, [sp, #0x18] + cmp r0, r1 + bhi _021D556A + mov r1, #6 + mul r1, r0 + str r1, [sp, #8] +_021D54EA: + ldr r1, [sp, #0x30] + ldr r0, [sp, #8] + str r1, [sp, #0x1c] + add r4, r1, r0 + ldr r1, [sp, #0x2c] + ldr r0, [sp, #0x1c] + cmp r0, r1 + bhi _021D5558 +_021D54FA: + mov r0, #0x12 + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r7, r0] + mvn r1, r1 + add r2, r4, #0 + bl sub_02079C9C + mov r1, #0xac + mov r2, #0 + str r0, [sp, #0x20] + bl sub_02074570 + cmp r0, #0 + beq _021D554A + ldr r0, [sp, #0x20] + ldr r2, [sp, #0x10] + add r1, r5, #0 + bl sub_020C4B68 + mov r0, #0x12 + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r7, r0] + mvn r1, r1 + add r2, r4, #0 + bl sub_02079968 + ldr r0, [sp, #0x10] + add r5, r5, r0 + ldr r0, [sp, #0xc] + add r1, r6, r0 + add r0, r0, #1 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + strb r4, [r1, #0xc] + cmp r4, r0 + bne _021D554A + mov r0, #0 + strb r0, [r6, #0xa] +_021D554A: + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x2c] + add r0, r0, #1 + add r4, r4, #1 + str r0, [sp, #0x1c] + cmp r0, r1 + bls _021D54FA +_021D5558: + ldr r0, [sp, #8] + ldr r1, [sp, #0x24] + add r0, r0, #6 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, r1 + bls _021D54EA +_021D556A: + ldr r0, [sp, #0xc] + strb r0, [r6, #8] + ldr r1, [sp, #0x28] + mov r0, #6 + ldr r2, [sp, #0x30] + mul r0, r1 + add r0, r2, r0 + strb r0, [r6, #9] + ldr r0, [sp, #4] + ldrb r0, [r0, #0x12] + cmp r0, #0 + beq _021D5586 + mov r1, #4 + b _021D5588 +_021D5586: + mov r1, #8 +_021D5588: + ldr r0, [sp, #4] + strb r1, [r0, #0x13] + mov r1, #0 + strb r1, [r0, #0x12] + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov19_021D54A4 + + thumb_func_start ov19_021D5594 +ov19_021D5594: ; 0x021D5594 + add r2, r1, #0 + add r1, #8 + mov r0, #5 + ldrsb r0, [r1, r0] + add r2, #0x14 + strb r0, [r2, #6] + ldrb r0, [r2, #6] + strb r0, [r2, #4] + mov r0, #6 + ldrsb r0, [r1, r0] + strb r0, [r2, #7] + ldrb r0, [r2, #7] + strb r0, [r2, #5] + bx lr + thumb_func_end ov19_021D5594 + + thumb_func_start ov19_021D55B0 +ov19_021D55B0: ; 0x021D55B0 + add r2, r1, #0 + add r1, #8 + mov r0, #5 + ldrsb r0, [r1, r0] + add r2, #0x14 + strb r0, [r2, #6] + mov r0, #6 + ldrsb r0, [r1, r0] + strb r0, [r2, #7] + bx lr + thumb_func_end ov19_021D55B0 + + thumb_func_start ov19_021D55C4 +ov19_021D55C4: ; 0x021D55C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r1, #0 + add r0, r1, #0 + str r1, [sp] + add r4, #0x14 + add r6, #8 + mov r7, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D562A + ldr r0, [r4, #0] + mov r1, #0x70 + add r2, r7, #0 + bl sub_02074570 + str r0, [sp, #4] + mov r0, #0x12 + mov r2, #7 + lsl r0, r0, #4 + ldrsb r2, [r6, r2] + ldr r0, [r5, r0] + ldr r3, [r4, #0] + sub r1, r7, #1 + bl sub_02079914 + mov r0, #0x12 + mov r2, #7 + lsl r0, r0, #4 + ldrsb r2, [r6, r2] + ldr r0, [r5, r0] + sub r1, r7, #1 + bl sub_02079C9C + mov r1, #5 + add r2, r7, #0 + add r4, r0, #0 + bl sub_02074570 + mov r1, #0x7b + lsl r1, r1, #2 + cmp r0, r1 + bne _021D5672 + ldr r0, [sp, #4] + cmp r0, #1 + bne _021D5672 + mov r7, #1 + b _021D5672 +_021D562A: + ldrb r0, [r4, #0xb] + cmp r0, #0 + beq _021D563E + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0] + bl sub_0207A048 + b _021D5658 +_021D563E: + mov r1, #0x1a + lsl r1, r1, #4 + ldr r0, [r4, #0] + ldr r1, [r5, r1] + bl sub_020774C8 + mov r1, #0x49 + lsl r1, r1, #2 + ldr r0, [r5, r1] + add r1, #0x7c + ldr r1, [r5, r1] + bl sub_0207A048 +_021D5658: + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0207A0F8 + add r1, r0, #0 + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + sub r1, r1, #1 + bl sub_0207A0FC + add r4, r0, #0 +_021D5672: + ldr r0, [sp] + add r1, r4, #0 + bl ov19_021D5BA8 + add r0, r5, #0 + bl ov19_021D52F4 + cmp r0, #0 + bne _021D569E + cmp r7, #1 + bne _021D569E + ldr r0, [sp] + add r1, r4, #0 + add r2, r5, #0 + bl ov19_021D58AC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #6 + bl ov19_021D6594 +_021D569E: + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + strb r1, [r0, #0x12] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D55C4 + + thumb_func_start ov19_021D56AC +ov19_021D56AC: ; 0x021D56AC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + add r7, r0, #0 + add r6, #0x14 + add r0, r1, #0 + str r1, [sp] + bl ov19_021D5F3C + str r0, [sp, #8] + ldrb r0, [r6, #9] + str r0, [sp, #0xc] + bl sub_02076AF4 + str r0, [sp, #4] + ldr r0, [sp] + mov r5, #0 + ldr r4, [r0, #0x14] + ldrb r0, [r6, #8] + cmp r0, #0 + ble _021D5700 +_021D56D6: + add r3, r6, r5 + mov r2, #0xc + ldrsb r3, [r3, r2] + ldr r2, [sp, #0xc] + mov r0, #0x12 + lsl r0, r0, #4 + sub r3, r3, r2 + ldr r2, [sp, #8] + mov r1, #0 + add r2, r2, r3 + ldr r0, [r7, r0] + mvn r1, r1 + add r3, r4, #0 + bl sub_02079914 + ldr r0, [sp, #4] + add r5, r5, #1 + add r4, r4, r0 + ldrb r0, [r6, #8] + cmp r5, r0 + blt _021D56D6 +_021D5700: + ldr r0, [sp] + bl ov19_021D5E24 + add r2, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r7, r0] + mvn r1, r1 + bl sub_02079C9C + add r1, r0, #0 + ldr r0, [sp] + bl ov19_021D5BA8 + add r0, r7, #0 + bl ov19_021D52F4 + mov r0, #0 + strb r0, [r6, #8] + ldr r0, [sp] + mov r1, #1 + strb r1, [r0, #0x13] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D56AC + + thumb_func_start ov19_021D5734 +ov19_021D5734: ; 0x021D5734 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + str r1, [sp] + add r5, r0, #0 + add r4, #0x14 + bl sub_02076AF0 + add r6, r0, #0 + ldr r0, [sp] + add r2, r6, #0 + ldr r7, [r0, #0x14] + str r0, [sp, #4] + add r0, #8 + str r0, [sp, #4] + add r0, r7, #0 + add r1, r7, r6 + bl sub_020C4B68 + ldr r0, [sp] + ldr r1, [sp] + ldr r0, [r0, #8] + ldr r1, [r1, #0x14] + add r2, r6, #0 + bl sub_020C4B68 + ldr r0, [sp] + bl ov19_021D5E10 + cmp r0, #0 + bne _021D578E + ldr r2, [sp, #4] + mov r0, #0x12 + mov r3, #7 + lsl r0, r0, #4 + ldrsb r2, [r2, r3] + mov r1, #0 + ldr r0, [r5, r0] + mvn r1, r1 + add r3, r7, r6 + bl sub_02079914 + mov r0, #0 + strb r0, [r4, #0xb] + b _021D57C8 +_021D578E: + ldrb r0, [r4, #0xb] + cmp r0, #0 + bne _021D57A2 + mov r1, #0x1a + lsl r1, r1, #4 + ldr r1, [r5, r1] + add r0, r7, r6 + bl sub_020774C8 + b _021D57B0 +_021D57A2: + mov r1, #0x1a + lsl r1, r1, #4 + ldr r1, [r5, r1] + add r0, r7, r6 + add r2, r6, #0 + bl sub_020C4B68 +_021D57B0: + mov r3, #0x49 + lsl r3, r3, #2 + ldr r0, [r5, r3] + ldr r1, [sp, #4] + mov r2, #8 + ldrsb r1, [r1, r2] + add r3, #0x7c + ldr r2, [r5, r3] + bl sub_0207A128 + mov r0, #1 + strb r0, [r4, #0xb] +_021D57C8: + ldr r0, [sp] + ldr r1, [r4, #0] + add r2, r5, #0 + bl ov19_021D5888 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5734 + + thumb_func_start ov19_021D57D8 +ov19_021D57D8: ; 0x021D57D8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, [r4, #0x14] + bl sub_020798A0 + cmp r0, #0 + beq _021D57FA + mov r0, #1 + strb r0, [r4, #0x13] + add r0, r4, #0 + bl ov19_021D52F4 + mov r0, #1 + pop {r4, pc} +_021D57FA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D57D8 + + thumb_func_start ov19_021D5800 +ov19_021D5800: ; 0x021D5800 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + add r4, r5, #0 + ldr r0, [r5, r0] + ldr r2, [r5, #8] + add r4, #8 + bl sub_020798A0 + cmp r0, #0 + beq _021D5830 + mov r0, #0x49 + mov r1, #8 + lsl r0, r0, #2 + ldrsb r1, [r4, r1] + ldr r0, [r5, r0] + bl sub_0207A080 + add r0, r5, #0 + bl ov19_021D52F4 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D5830: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D5800 + + thumb_func_start ov19_021D5834 +ov19_021D5834: ; 0x021D5834 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_02073C54 + mov r0, #1 + strb r0, [r4, #0x13] + add r0, r4, #0 + bl ov19_021D52F4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5834 + + thumb_func_start ov19_021D584C +ov19_021D584C: ; 0x021D584C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #8 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D5870 + mov r0, #0x12 + mov r2, #7 + lsl r0, r0, #4 + mov r1, #0 + ldrsb r2, [r4, r2] + ldr r0, [r5, r0] + mvn r1, r1 + bl sub_02079968 + b _021D587E +_021D5870: + mov r0, #0x49 + mov r1, #8 + lsl r0, r0, #2 + ldrsb r1, [r4, r1] + ldr r0, [r5, r0] + bl sub_0207A080 +_021D587E: + add r0, r5, #0 + bl ov19_021D52F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D584C + + thumb_func_start ov19_021D5888 +ov19_021D5888: ; 0x021D5888 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov19_021D58AC + add r0, r5, #0 + bl ov19_021D5E08 + cmp r0, #4 + bne _021D58A8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov19_021D59F4 +_021D58A8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5888 + + thumb_func_start ov19_021D58AC +ov19_021D58AC: ; 0x021D58AC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + add r4, r7, #0 + add r0, r5, #0 + add r6, r2, #0 + add r4, #0x4c + bl sub_02073D20 + str r0, [sp] + str r5, [r7, #0x4c] + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + strh r0, [r4, #4] + add r0, r5, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074570 + strh r0, [r4, #6] + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0207A274 + ldrh r1, [r4, #4] + bl sub_0207A294 + strh r0, [r4, #8] + add r0, r5, #0 + mov r1, #0xad + mov r2, #0 + bl sub_02074570 + strb r0, [r4, #0xf] + ldrh r0, [r4, #4] + mov r1, #9 + bl sub_02075894 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl sub_02074570 + add r2, r0, #0 + ldrh r1, [r4, #4] + add r0, r7, #0 + bl sub_02075B9C + strb r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #0xb + mov r2, #0 + bl sub_02074570 + strb r0, [r4, #0xb] + add r0, r5, #0 + mov r1, #0xb1 + mov r2, #0 + bl sub_02074570 + strb r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #0xb2 + mov r2, #0 + bl sub_02074570 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xf] + cmp r0, #0 + bne _021D5968 + add r0, r5, #0 + mov r1, #0xb0 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021D5968 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl sub_02074570 + add r2, r0, #0 + ldrh r1, [r4, #4] + add r0, r7, #0 + bl sub_02075DD0 + strb r0, [r4, #0xe] + b _021D596C +_021D5968: + mov r0, #0xff + strb r0, [r4, #0xe] +_021D596C: + ldr r2, [r4, #0x14] + add r0, r5, #0 + mov r1, #0x77 + bl sub_02074570 + ldrb r0, [r4, #0xf] + cmp r0, #0 + bne _021D598C + mov r0, #0x19 + lsl r0, r0, #4 + ldrh r1, [r4, #4] + ldr r0, [r6, r0] + ldr r2, [r4, #0x18] + bl sub_0200B1B8 + b _021D599A +_021D598C: + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x14] + bl sub_02023810 + ldr r0, [r4, #0x14] + bl sub_020237E8 +_021D599A: + ldrh r1, [r4, #6] + cmp r1, #0 + beq _021D59AA + ldr r0, [r4, #0x1c] + mov r2, #9 + bl sub_0207CFA0 + b _021D59B8 +_021D59AA: + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200B1B8 +_021D59B8: + add r0, r5, #0 + bl sub_02075BD4 + add r1, r0, #0 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [r4, #0x20] + bl sub_0200B1B8 + add r0, r5, #0 + mov r1, #0xa + mov r2, #0 + bl sub_02074570 + add r1, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [r4, #0x24] + bl sub_0200B1B8 + add r0, r7, #0 + bl sub_020759B8 + ldr r1, [sp] + add r0, r5, #0 + bl sub_02073D48 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021D58AC + + thumb_func_start ov19_021D59F4 +ov19_021D59F4: ; 0x021D59F4 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r7, r1, #0 + ldr r1, [sp] + add r6, r0, #0 + add r1, #0xa4 + add r5, r2, #0 + ldrb r2, [r1] + mov r1, #0x30 + add r6, #0x4c + add r0, #0xac + mul r1, r2 + add r4, r0, r1 + str r7, [r0, r1] + ldrh r0, [r6, #4] + strh r0, [r4, #4] + ldrb r0, [r6, #0xf] + strb r0, [r4, #6] + ldrb r0, [r6, #0xa] + strh r0, [r4, #8] + ldrb r0, [r4, #6] + cmp r0, #0 + ldr r0, [r4, #0x28] + beq _021D5A2C + ldr r1, [r6, #0x18] + bl sub_02023810 + b _021D5A32 +_021D5A2C: + ldr r1, [r6, #0x14] + bl sub_02023810 +_021D5A32: + ldr r0, [r4, #0x2c] + ldr r1, [r6, #0x20] + bl sub_02023810 + mov r1, #0x1a + lsl r1, r1, #4 + ldr r1, [r5, r1] + add r0, r7, #0 + bl sub_020774C8 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02073C88 + add r6, r0, #0 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xa] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0xa5 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xc] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0xa6 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xe] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0xa8 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x10] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0xa9 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x12] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0xa7 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x14] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x13 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x16] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x14 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x18] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x15 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x1a] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x16 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x1c] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x17 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x1e] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x36 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x20] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x37 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x22] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x38 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x24] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x39 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x26] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + strb r0, [r4, #7] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_02073CD4 + ldr r0, [sp] + mov r2, #1 + add r0, #0xa4 + ldrb r1, [r0] + ldr r0, [sp] + add r0, r0, r1 + add r0, #0xa6 + strb r2, [r0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021D59F4 + + thumb_func_start ov19_021D5B70 +ov19_021D5B70: ; 0x021D5B70 + add r1, r0, #0 + add r1, #0xa4 + ldrb r2, [r1] + mov r1, #1 + add r0, #0xa4 + eor r1, r2 + strb r1, [r0] + bx lr + thumb_func_end ov19_021D5B70 + + thumb_func_start ov19_021D5B80 +ov19_021D5B80: ; 0x021D5B80 + add r1, r0, #0 + add r1, #0xa5 + ldrb r1, [r1] + add r2, r1, #1 + add r1, r0, #0 + add r1, #0xa5 + strb r2, [r1] + add r1, r0, #0 + add r1, #0xa5 + ldrb r1, [r1] + cmp r1, #3 + blo _021D5B9E + mov r1, #0 + add r0, #0xa5 + strb r1, [r0] +_021D5B9E: + bx lr + thumb_func_end ov19_021D5B80 + + thumb_func_start ov19_021D5BA0 +ov19_021D5BA0: ; 0x021D5BA0 + add r0, #0xa8 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5BA0 + + thumb_func_start ov19_021D5BA8 +ov19_021D5BA8: ; 0x021D5BA8 + str r1, [r0, #0x4c] + bx lr + thumb_func_end ov19_021D5BA8 + + thumb_func_start ov19_021D5BAC +ov19_021D5BAC: ; 0x021D5BAC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + add r0, #0x96 + ldrb r1, [r0] + add r2, r4, #0 + add r0, sp, #0 + add r2, #0x4c + strb r1, [r0] + strb r1, [r2, #0xb] + ldr r0, [r4, #0x4c] + mov r1, #0xb + add r2, sp, #0 + bl sub_02074C60 + add r0, r4, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D5BE2 + add r0, r4, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D5BE2 + bl sub_02024804 +_021D5BE2: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5BAC + + thumb_func_start ov19_021D5BE8 +ov19_021D5BE8: ; 0x021D5BE8 + push {r0, r1, r2, r3} + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + add r0, sp, #0x18 + add r4, r6, #0 + ldrh r1, [r0, #4] + add r4, #0x4c + add r5, r2, #0 + strh r1, [r4, #6] + cmp r1, #0 + beq _021D5C0A + ldr r0, [r4, #0x1c] + mov r2, #9 + bl sub_0207CFA0 + b _021D5C18 +_021D5C0A: + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [r4, #0x1c] + mov r1, #0x14 + bl sub_0200B1B8 +_021D5C18: + add r0, r6, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D5C48 + add r0, r6, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D5C48 + add r0, r6, #0 + bl ov19_021D5E24 + add r2, r0, #0 + add r0, sp, #0x1c + str r0, [sp] + mov r0, #0x12 + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r5, r0] + mvn r1, r1 + mov r3, #6 + bl sub_02079C50 +_021D5C48: + ldr r0, [r4, #0] + mov r1, #6 + add r2, sp, #0x1c + bl sub_02074C60 + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + ldr r1, _021D5CB8 ; =0x000001ED + cmp r0, r1 + bne _021D5C8A + ldr r0, [r4, #0] + bl sub_02077930 + ldr r0, [r4, #0] + mov r1, #0xb1 + mov r2, #0 + bl sub_02074570 + strb r0, [r4, #0xc] + ldr r0, [r4, #0] + mov r1, #0xb2 + mov r2, #0 + bl sub_02074570 + add sp, #4 + strb r0, [r4, #0xd] + pop {r3, r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 +_021D5C8A: + sub r1, r1, #6 + cmp r0, r1 + bne _021D5CAE + ldr r0, [r4, #0] + bl sub_02077A1C + ldr r0, [r4, #0] + mov r1, #0xa + mov r2, #0 + bl sub_02074570 + add r1, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [r4, #0x24] + bl sub_0200B1B8 +_021D5CAE: + add sp, #4 + pop {r3, r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 +_021D5CB8: .word 0x000001ED + thumb_func_end ov19_021D5BE8 + + thumb_func_start ov19_021D5CBC +ov19_021D5CBC: ; 0x021D5CBC + add r2, r0, #0 + add r2, #0x40 + ldrb r2, [r2] + add r1, r0, #0 + add r1, #0x40 + add r3, r2, #1 + add r2, r0, #0 + add r2, #0x40 + strb r3, [r2] + add r2, r0, #0 + add r2, #0x40 + ldrb r2, [r2] + cmp r2, #0x12 + blo _021D5CDC + mov r2, #0 + strb r2, [r1] +_021D5CDC: + ldr r3, _021D5CE4 ; =ov19_021D4F40 + ldr r0, [r0, #0] + bx r3 + nop +_021D5CE4: .word ov19_021D4F40 + thumb_func_end ov19_021D5CBC + + thumb_func_start ov19_021D5CE8 +ov19_021D5CE8: ; 0x021D5CE8 + add r2, r0, #0 + add r2, #0x40 + ldrb r2, [r2] + add r1, r0, #0 + add r1, #0x40 + cmp r2, #0 + beq _021D5CFA + sub r2, r2, #1 + b _021D5CFC +_021D5CFA: + mov r2, #0x11 +_021D5CFC: + ldr r3, _021D5D04 ; =ov19_021D4F40 + strb r2, [r1] + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_021D5D04: .word ov19_021D4F40 + thumb_func_end ov19_021D5CE8 + + thumb_func_start ov19_021D5D08 +ov19_021D5D08: ; 0x021D5D08 + add r3, r0, #0 + add r2, r0, #0 + add r2, #0x40 + strb r1, [r2] + add r3, #0x40 + add r1, r3, #0 + ldr r3, _021D5D1C ; =ov19_021D4F40 + ldr r0, [r0, #0] + bx r3 + nop +_021D5D1C: .word ov19_021D4F40 + thumb_func_end ov19_021D5D08 + + thumb_func_start ov19_021D5D20 +ov19_021D5D20: ; 0x021D5D20 + add r0, #0x98 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5D20 + + thumb_func_start ov19_021D5D28 +ov19_021D5D28: ; 0x021D5D28 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r2, r5, #0 + add r2, #0x4c + add r4, r1, #0 + ldrh r1, [r2, #6] + ldr r0, _021D5D50 ; =0x00000112 + strh r1, [r5, r0] + add r0, #0x7a + ldr r0, [r4, r0] + ldr r2, [r2, #0x1c] + mov r1, #0x14 + bl sub_0200B1B8 + add r0, r5, #0 + mov r1, #0 + add r2, r4, #0 + bl ov19_021D5BE8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D5D50: .word 0x00000112 + thumb_func_end ov19_021D5D28 + + thumb_func_start ov19_021D5D54 +ov19_021D5D54: ; 0x021D5D54 + ldr r1, _021D5D5C ; =0x00000112 + mov r2, #0 + strh r2, [r0, r1] + bx lr + ; .align 2, 0 +_021D5D5C: .word 0x00000112 + thumb_func_end ov19_021D5D54 + + thumb_func_start ov19_021D5D60 +ov19_021D5D60: ; 0x021D5D60 + push {r4, lr} + ldr r3, _021D5D74 ; =0x00000112 + add r2, r1, #0 + ldrh r1, [r0, r3] + mov r4, #0 + strh r4, [r0, r3] + bl ov19_021D5BE8 + pop {r4, pc} + nop +_021D5D74: .word 0x00000112 + thumb_func_end ov19_021D5D60 + + thumb_func_start ov19_021D5D78 +ov19_021D5D78: ; 0x021D5D78 + push {r4, lr} + add r3, r0, #0 + add r3, #0x52 + ldr r4, _021D5D90 ; =0x00000112 + add r2, r1, #0 + ldrh r1, [r0, r4] + ldrh r3, [r3] + strh r3, [r0, r4] + bl ov19_021D5BE8 + pop {r4, pc} + nop +_021D5D90: .word 0x00000112 + thumb_func_end ov19_021D5D78 + + thumb_func_start ov19_021D5D94 +ov19_021D5D94: ; 0x021D5D94 + add r0, #0x9c + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5D94 + + thumb_func_start ov19_021D5D9C +ov19_021D5D9C: ; 0x021D5D9C + add r0, #0x9e + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5D9C + + thumb_func_start ov19_021D5DA4 +ov19_021D5DA4: ; 0x021D5DA4 + add r0, #0x9d + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5DA4 + + thumb_func_start ov19_021D5DAC +ov19_021D5DAC: ; 0x021D5DAC + add r0, #0xa0 + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5DAC + + thumb_func_start ov19_021D5DB4 +ov19_021D5DB4: ; 0x021D5DB4 + cmp r1, #0 + bne _021D5DC0 + mov r1, #0 + add r0, #0x4a + strh r1, [r0] + bx lr +_021D5DC0: + add r2, r0, #0 + add r2, #0x4a + ldrh r3, [r2] + mov r2, #1 + sub r1, r1, #1 + lsl r2, r1 + add r1, r3, #0 + eor r1, r2 + add r0, #0x4a + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5DB4 + + thumb_func_start ov19_021D5DD8 +ov19_021D5DD8: ; 0x021D5DD8 + add r1, r0, #0 + add r1, #0x49 + ldrb r2, [r1] + mov r1, #1 + add r0, #0x49 + eor r1, r2 + strb r1, [r0] + bx lr + thumb_func_end ov19_021D5DD8 + + thumb_func_start ov19_021D5DE8 +ov19_021D5DE8: ; 0x021D5DE8 + mov r1, #0x63 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov19_021D5DE8 + + thumb_func_start ov19_021D5DF0 +ov19_021D5DF0: ; 0x021D5DF0 + mov r1, #0x67 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov19_021D5DF0 + + thumb_func_start ov19_021D5DF8 +ov19_021D5DF8: ; 0x021D5DF8 + mov r1, #0x69 + lsl r1, r1, #2 + ldr r3, _021D5E04 ; =sub_02027B50 + ldr r0, [r0, r1] + bx r3 + nop +_021D5E04: .word sub_02027B50 + thumb_func_end ov19_021D5DF8 + + thumb_func_start ov19_021D5E08 +ov19_021D5E08: ; 0x021D5E08 + add r0, #0x48 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E08 + + thumb_func_start ov19_021D5E10 +ov19_021D5E10: ; 0x021D5E10 + ldrb r0, [r0, #0xc] + bx lr + thumb_func_end ov19_021D5E10 + + thumb_func_start ov19_021D5E14 +ov19_021D5E14: ; 0x021D5E14 + mov r1, #0xd + ldrsb r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E14 + + thumb_func_start ov19_021D5E1C +ov19_021D5E1C: ; 0x021D5E1C + mov r1, #0xe + ldrsb r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E1C + + thumb_func_start ov19_021D5E24 +ov19_021D5E24: ; 0x021D5E24 + mov r1, #0xf + ldrsb r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E24 + + thumb_func_start ov19_021D5E2C +ov19_021D5E2C: ; 0x021D5E2C + mov r1, #0x10 + ldrsb r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E2C + + thumb_func_start ov19_021D5E34 +ov19_021D5E34: ; 0x021D5E34 + ldrb r0, [r0, #0x12] + bx lr + thumb_func_end ov19_021D5E34 + + thumb_func_start ov19_021D5E38 +ov19_021D5E38: ; 0x021D5E38 + ldrb r0, [r0, #0x13] + bx lr + thumb_func_end ov19_021D5E38 + + thumb_func_start ov19_021D5E3C +ov19_021D5E3C: ; 0x021D5E3C + ldrb r1, [r0, #0x13] + cmp r1, #0 + beq _021D5E46 + ldrb r0, [r0, #0x1f] + bx lr +_021D5E46: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E3C + + thumb_func_start ov19_021D5E4C +ov19_021D5E4C: ; 0x021D5E4C + ldrb r1, [r0, #0x13] + cmp r1, #2 + beq _021D5E56 + cmp r1, #4 + bne _021D5E5A +_021D5E56: + mov r0, #1 + bx lr +_021D5E5A: + ldrb r0, [r0, #0x12] + cmp r0, #0 + beq _021D5E64 + mov r0, #1 + bx lr +_021D5E64: + mov r0, #0 + bx lr + thumb_func_end ov19_021D5E4C + + thumb_func_start ov19_021D5E68 +ov19_021D5E68: ; 0x021D5E68 + add r0, #0x40 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5E68 + + thumb_func_start ov19_021D5E70 +ov19_021D5E70: ; 0x021D5E70 + add r0, #0x4c + bx lr + thumb_func_end ov19_021D5E70 + + thumb_func_start ov19_021D5E74 +ov19_021D5E74: ; 0x021D5E74 + push {r4, lr} + add r4, r0, #0 + bl ov19_021D5E4C + cmp r0, #0 + beq _021D5E86 + add r4, #0x52 + ldrh r0, [r4] + pop {r4, pc} +_021D5E86: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5E74 + + thumb_func_start ov19_021D5E8C +ov19_021D5E8C: ; 0x021D5E8C + add r0, #0x40 + bx lr + thumb_func_end ov19_021D5E8C + + thumb_func_start ov19_021D5E90 +ov19_021D5E90: ; 0x021D5E90 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov19_021D5E90 + + thumb_func_start ov19_021D5E94 +ov19_021D5E94: ; 0x021D5E94 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov19_021D5E94 + + thumb_func_start ov19_021D5E9C +ov19_021D5E9C: ; 0x021D5E9C + ldr r0, [r0, #0x4c] + bx lr + thumb_func_end ov19_021D5E9C + + thumb_func_start ov19_021D5EA0 +ov19_021D5EA0: ; 0x021D5EA0 + add r0, #0x57 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EA0 + + thumb_func_start ov19_021D5EA8 +ov19_021D5EA8: ; 0x021D5EA8 + add r0, #0x98 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EA8 + + thumb_func_start ov19_021D5EB0 +ov19_021D5EB0: ; 0x021D5EB0 + mov r1, #0xa0 + ldrsh r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EB0 + + thumb_func_start ov19_021D5EB8 +ov19_021D5EB8: ; 0x021D5EB8 + add r0, #0x9e + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EB8 + + thumb_func_start ov19_021D5EC0 +ov19_021D5EC0: ; 0x021D5EC0 + add r0, #0x9d + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EC0 + + thumb_func_start ov19_021D5EC8 +ov19_021D5EC8: ; 0x021D5EC8 + push {r4, lr} + add r4, r0, #0 + bl ov19_021D5E08 + cmp r0, #3 + beq _021D5EDA + add r4, #0x4a + ldrh r0, [r4] + pop {r4, pc} +_021D5EDA: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D5EC8 + + thumb_func_start ov19_021D5EE0 +ov19_021D5EE0: ; 0x021D5EE0 + add r0, #0x49 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EE0 + + thumb_func_start ov19_021D5EE8 +ov19_021D5EE8: ; 0x021D5EE8 + push {r3, r4, r5, r6} + add r0, #0x14 + ldrb r6, [r0, #6] + ldrb r5, [r0, #4] + ldr r4, [sp, #0x10] + cmp r5, r6 + bhi _021D5EFC + str r5, [r1, #0] + ldrb r1, [r0, #6] + b _021D5F00 +_021D5EFC: + str r6, [r1, #0] + ldrb r1, [r0, #4] +_021D5F00: + str r1, [r2, #0] + ldrb r2, [r0, #7] + ldrb r1, [r0, #5] + cmp r1, r2 + bhi _021D5F14 + str r1, [r3, #0] + ldrb r0, [r0, #7] + str r0, [r4, #0] + pop {r3, r4, r5, r6} + bx lr +_021D5F14: + str r2, [r3, #0] + ldrb r0, [r0, #5] + str r0, [r4, #0] + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5EE8 + + thumb_func_start ov19_021D5F20 +ov19_021D5F20: ; 0x021D5F20 + add r0, #0x14 + ldrb r2, [r0, #4] + ldrb r1, [r0, #6] + cmp r2, r1 + bne _021D5F36 + ldrb r1, [r0, #5] + ldrb r0, [r0, #7] + cmp r1, r0 + bne _021D5F36 + mov r0, #1 + bx lr +_021D5F36: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5F20 + + thumb_func_start ov19_021D5F3C +ov19_021D5F3C: ; 0x021D5F3C + push {r3, r4} + add r1, r0, #0 + add r1, #0x14 + mov r2, #0xd + mov r3, #0xe + ldrsb r2, [r0, r2] + ldrsb r0, [r0, r3] + ldrb r4, [r1, #4] + ldrb r3, [r1, #6] + cmp r3, r4 + bls _021D5F56 + sub r3, r3, r4 + sub r2, r2, r3 +_021D5F56: + ldrb r3, [r1, #5] + ldrb r1, [r1, #7] + cmp r1, r3 + bls _021D5F62 + sub r1, r1, r3 + sub r0, r0, r1 +_021D5F62: + mov r1, #6 + mul r1, r0 + add r0, r2, r1 + pop {r3, r4} + bx lr + thumb_func_end ov19_021D5F3C + + thumb_func_start ov19_021D5F6C +ov19_021D5F6C: ; 0x021D5F6C + add r0, #0x14 + add r2, r0, r1 + mov r1, #0xc + ldrsb r1, [r2, r1] + ldrb r0, [r0, #9] + sub r0, r1, r0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5F6C + + thumb_func_start ov19_021D5F7C +ov19_021D5F7C: ; 0x021D5F7C + ldr r1, _021D5F84 ; =0x00000112 + ldrh r0, [r0, r1] + bx lr + nop +_021D5F84: .word 0x00000112 + thumb_func_end ov19_021D5F7C + + thumb_func_start ov19_021D5F88 +ov19_021D5F88: ; 0x021D5F88 + push {r4, lr} + add r4, r0, #0 + bl ov19_021D5F7C + cmp r0, #0 + bne _021D5F9A + add r0, r4, #0 + bl ov19_021D5E74 +_021D5F9A: + pop {r4, pc} + thumb_func_end ov19_021D5F88 + + thumb_func_start ov19_021D5F9C +ov19_021D5F9C: ; 0x021D5F9C + add r0, #0xa4 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5F9C + + thumb_func_start ov19_021D5FA4 +ov19_021D5FA4: ; 0x021D5FA4 + add r0, #0xa5 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5FA4 + + thumb_func_start ov19_021D5FAC +ov19_021D5FAC: ; 0x021D5FAC + mov r2, #0x30 + add r0, #0xac + mul r2, r1 + add r0, r0, r2 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5FAC + + thumb_func_start ov19_021D5FB8 +ov19_021D5FB8: ; 0x021D5FB8 + add r0, r0, r1 + add r0, #0xa6 + ldrb r0, [r0] + bx lr + thumb_func_end ov19_021D5FB8 + + thumb_func_start ov19_021D5FC0 +ov19_021D5FC0: ; 0x021D5FC0 + add r0, #0xa8 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5FC0 + + thumb_func_start ov19_021D5FC8 +ov19_021D5FC8: ; 0x021D5FC8 + add r0, #0x5b + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D5FC8 + + thumb_func_start ov19_021D5FD0 +ov19_021D5FD0: ; 0x021D5FD0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov19_021D5E38 + cmp r0, #1 + bne _021D5FF6 + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D6008 + ldr r0, [r5, #0x4c] + add r1, r4, #0 + add r2, r6, #0 + bl sub_02074570 + pop {r4, r5, r6, pc} +_021D5FF6: + ldrb r0, [r5, #0x1f] + cmp r0, #0 + bne _021D6008 + ldr r0, [r5, #0x4c] + add r1, r4, #0 + add r2, r6, #0 + bl sub_02074570 + pop {r4, r5, r6, pc} +_021D6008: + ldr r0, [r5, #0x4c] + add r1, r4, #0 + add r2, r6, #0 + bl sub_02074470 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021D5FD0 + + thumb_func_start ov19_021D6014 +ov19_021D6014: ; 0x021D6014 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021D6030 + ldr r0, [r5, #0x4c] + add r1, r4, #0 + add r2, r6, #0 + bl sub_02074570 + pop {r4, r5, r6, pc} +_021D6030: + ldr r0, [r5, #8] + add r1, r4, #0 + add r2, r6, #0 + bl sub_02074470 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021D6014 + + .rodata + + + .global Unk_ov19_021DFDF0 +Unk_ov19_021DFDF0: ; 0x021DFDF0 + .incbin "incbin/overlay19_rodata.bin", 0x0, 0x6 - 0x0 + + .global Unk_ov19_021DFDF6 +Unk_ov19_021DFDF6: ; 0x021DFDF6 + .incbin "incbin/overlay19_rodata.bin", 0x6, 0x12 - 0x6 + + .global Unk_ov19_021DFE02 +Unk_ov19_021DFE02: ; 0x021DFE02 + .incbin "incbin/overlay19_rodata.bin", 0x12, 0x22 - 0x12 + + .global Unk_ov19_021DFE12 +Unk_ov19_021DFE12: ; 0x021DFE12 + .incbin "incbin/overlay19_rodata.bin", 0x22, 0x40 - 0x22 + + .global Unk_ov19_021DFE30 +Unk_ov19_021DFE30: ; 0x021DFE30 + .incbin "incbin/overlay19_rodata.bin", 0x40, 0x48 - 0x40 + + .global Unk_ov19_021DFE38 +Unk_ov19_021DFE38: ; 0x021DFE38 + .incbin "incbin/overlay19_rodata.bin", 0x48, 0x9 + + + .bss + + + .global Unk_ov19_021E05E0 +Unk_ov19_021E05E0: ; 0x021E05E0 + .space 0x4 + + .global Unk_ov19_021E05E4 +Unk_ov19_021E05E4: ; 0x021E05E4 + .space 0x4 + + .global Unk_ov19_021E05E8 +Unk_ov19_021E05E8: ; 0x021E05E8 + .space 0x4 + diff --git a/asm/ov19_021D603C.s b/asm/ov19_021D603C.s new file mode 100644 index 000000000..721c9b97c --- /dev/null +++ b/asm/ov19_021D603C.s @@ -0,0 +1,233 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021D603C +ov19_021D603C: ; 0x021D603C + push {r3, r4, r5, r6} + ldr r4, _021D60A4 ; =ov19_021D6104 + add r6, r0, #0 + str r4, [r0, #0x30] + mov r4, #0 + str r4, [r0, #0x1c] + str r1, [r0, #0xc] + str r2, [r0, #0x10] + str r1, [r0, #0x14] + str r2, [r0, #0x18] + str r1, [r0, #4] + add r4, r0, #0 + str r2, [r0, #8] + lsl r2, r2, #0x18 + mov r5, #0xfe + add r4, #0x28 + strb r5, [r4] + lsl r4, r1, #0x18 + lsr r4, r4, #0x18 + add r6, #0x29 + strb r4, [r6] + add r6, r0, #0 + lsr r2, r2, #0x18 + add r6, #0x2a + strb r2, [r6] + add r6, r0, #0 + add r6, #0x2b + strb r3, [r6] + add r3, r0, #0 + add r3, #0x2c + strb r5, [r3] + add r3, r0, #0 + add r3, #0x2d + strb r4, [r3] + add r3, r0, #0 + add r3, #0x2e + strb r2, [r3] + add r2, r0, #0 + add r2, #0x2f + ldr r3, [sp, #0x10] + cmp r1, #0x80 + strb r3, [r2] + bge _021D609A + mov r1, #1 + str r1, [r0, #0x24] + pop {r3, r4, r5, r6} + bx lr +_021D609A: + sub r5, #0xff + str r5, [r0, #0x24] + pop {r3, r4, r5, r6} + bx lr + nop +_021D60A4: .word ov19_021D6104 + thumb_func_end ov19_021D603C + + thumb_func_start ov19_021D60A8 +ov19_021D60A8: ; 0x021D60A8 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r0, #0x2c + bl sub_02022734 + cmp r0, #1 + bne _021D60E8 + add r0, r5, #0 + add r0, #0x28 + bl sub_02022734 + cmp r0, #0 + bne _021D60E8 + ldr r0, [r5, #0x1c] + mov r4, #1 + cmp r0, #0 + bne _021D60D0 + add r6, r4, #0 + b _021D60D2 +_021D60D0: + mov r6, #0 +_021D60D2: + add r0, sp, #4 + add r1, sp, #0 + bl sub_020227A4 + cmp r0, #0 + beq _021D60EC + ldr r0, [sp, #4] + str r0, [r5, #0x14] + ldr r0, [sp] + str r0, [r5, #0x18] + b _021D60EC +_021D60E8: + mov r4, #0 + add r6, r4, #0 +_021D60EC: + str r4, [r5, #0x1c] + ldr r3, [r5, #0x30] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + blx r3 + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021D60A8 + + thumb_func_start ov19_021D60FC +ov19_021D60FC: ; 0x021D60FC + mov r2, #0 + str r2, [r0, #0] + str r1, [r0, #0x30] + bx lr + thumb_func_end ov19_021D60FC + + thumb_func_start ov19_021D6104 +ov19_021D6104: ; 0x021D6104 + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + beq _021D612C + cmp r2, #0 + beq _021D612C + ldr r1, [r4, #0x14] + str r1, [r4, #4] + ldr r2, [r4, #0x18] + str r2, [r4, #8] + ldr r1, [r4, #4] + bl ov19_021D6164 + strh r0, [r4, #0x20] + ldr r1, _021D6130 ; =ov19_021D6134 + add r0, r4, #0 + bl ov19_021D60FC + mov r0, #1 + pop {r4, pc} +_021D612C: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D6130: .word ov19_021D6134 + thumb_func_end ov19_021D6104 + + thumb_func_start ov19_021D6134 +ov19_021D6134: ; 0x021D6134 + push {r3, lr} + cmp r1, #0 + bne _021D6144 + ldr r1, _021D6148 ; =ov19_021D6104 + bl ov19_021D60FC + mov r0, #3 + pop {r3, pc} +_021D6144: + mov r0, #2 + pop {r3, pc} + ; .align 2, 0 +_021D6148: .word ov19_021D6104 + thumb_func_end ov19_021D6134 + + thumb_func_start ov19_021D614C +ov19_021D614C: ; 0x021D614C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x14] + ldr r2, [r4, #0x18] + bl ov19_021D6164 + add r2, r0, #0 + ldrh r1, [r4, #0x20] + add r0, r4, #0 + bl ov19_021D617C + pop {r4, pc} + thumb_func_end ov19_021D614C + + thumb_func_start ov19_021D6164 +ov19_021D6164: ; 0x021D6164 + add r3, r0, #0 + ldr r0, [r3, #0x10] + sub r0, r2, r0 + ldr r2, [r3, #0xc] + ldr r3, _021D6178 ; =sub_020BDA20 + sub r1, r1, r2 + lsl r0, r0, #0xc + lsl r1, r1, #0xc + bx r3 + nop +_021D6178: .word sub_020BDA20 + thumb_func_end ov19_021D6164 + + thumb_func_start ov19_021D617C +ov19_021D617C: ; 0x021D617C + push {r4, r5} + sub r2, r2, r1 + bpl _021D618A + mov r4, #0 + mvn r4, r4 + mul r2, r4 + b _021D618C +_021D618A: + mov r4, #1 +_021D618C: + ldr r5, _021D61AC ; =0x021DFE44 + mov r3, #0 +_021D6190: + ldrh r1, [r5] + cmp r2, r1 + blt _021D619E + add r3, r3, #1 + add r5, r5, #2 + cmp r3, #2 + blo _021D6190 +_021D619E: + ldr r1, [r0, #0x24] + add r0, r3, #0 + mul r0, r4 + mul r0, r1 + pop {r4, r5} + bx lr + nop +_021D61AC: .word 0x021DFE44 + thumb_func_end ov19_021D617C + + .rodata + + + .global Unk_ov19_021DFE44 +Unk_ov19_021DFE44: ; 0x021DFE44 + .incbin "incbin/overlay19_rodata.bin", 0x54, 0x4 + diff --git a/asm/ov19_021D61B0.s b/asm/ov19_021D61B0.s new file mode 100644 index 000000000..e9f8f82de --- /dev/null +++ b/asm/ov19_021D61B0.s @@ -0,0 +1,3220 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021D61B0 +ov19_021D61B0: ; 0x021D61B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r1, #0 + str r0, [sp, #0x14] + ldr r1, _021D6430 ; =0x0000B3B4 + mov r0, #0xa + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + beq _021D61DE + mov r0, #0x16 + lsl r0, r0, #4 + str r5, [r4, r0] + mov r0, #0xa + bl sub_02018340 + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + cmp r0, #0 + bne _021D61E0 +_021D61DE: + b _021D642A +_021D61E0: + mov r0, #0x12 + mov r1, #0xa + mov r5, #1 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r1, #1 + lsl r1, r1, #0x1a + ldr r0, [r1, #0] + ldr r3, _021D6434 ; =0xFFFFE0FF + and r0, r3 + str r0, [r1, #0] + ldr r0, _021D6438 ; =0x04001000 + ldr r2, [r0, #0] + and r2, r3 + str r2, [r0, #0] + ldr r3, [r1, #0] + ldr r2, _021D643C ; =0xFFCFFFEF + and r3, r2 + ldr r2, _021D6440 ; =0x00100010 + orr r2, r3 + str r2, [r1, #0] + ldr r2, [r0, #0] + ldr r1, _021D643C ; =0xFFCFFFEF + and r2, r1 + mov r1, #0x10 + orr r1, r2 + str r1, [r0, #0] + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r2, #0x80 + str r2, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r1, #0xa + str r1, [sp, #0x10] + add r1, r2, #0 + add r2, r0, #0 + bl sub_0200A784 + add r1, r4, #0 + mov r0, #0x80 + add r1, #0x1c + mov r2, #0xa + bl sub_020095C4 + str r0, [r4, #0x18] + add r0, r4, #0 + mov r2, #6 + add r0, #0x1c + mov r1, #0 + lsl r2, r2, #0x12 + bl sub_0200964C + mov r0, #0x51 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_020A81D0 + mov r0, #0xa + str r0, [sp] + mov r0, #0x51 + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #0x1a + add r2, r5, #0 + mov r3, #0 + bl sub_0200716C + mov r0, #0 + mov r1, #0xa + bl sub_02002BEC + mov r0, #0xa + bl sub_0200762C + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r1, #0 + add r2, r4, #0 + add r0, r1, #0 +_021D62A2: + add r1, r1, #1 + str r0, [r2, #8] + add r2, r2, #4 + cmp r1, #4 + blo _021D62A2 + bl ov19_021D7970 + ldr r0, [sp, #0x14] + mov r2, #0x59 + str r4, [r0, #0] + lsl r2, r2, #2 + str r6, [sp] + add r0, r4, r2 + sub r2, r2, #4 + ldr r2, [r4, r2] + ldr r3, [r4, #0x18] + add r1, r4, #0 + bl ov19_021DA270 + and r5, r0 + ldr r0, [r4, #0x18] + mov r3, #0x16 + str r0, [sp] + lsl r3, r3, #4 + mov r0, #0x43 + ldr r2, [r4, r3] + sub r3, r3, #4 + lsl r0, r0, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021D79F8 + mov r2, #0x16 + and r5, r0 + str r6, [sp] + ldr r0, _021D6444 ; =0x00005DC0 + lsl r2, r2, #4 + ldr r2, [r4, r2] + ldr r3, [r4, #0x18] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021D8B54 + mov r2, #0x16 + and r5, r0 + str r6, [sp] + ldr r0, _021D6448 ; =0x00006558 + lsl r2, r2, #4 + ldr r2, [r4, r2] + ldr r3, [r4, #0x18] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DA814 + and r5, r0 + add r0, r7, #0 + bl ov19_021D5DE8 + ldr r1, [r4, #0x18] + mov r3, #0x16 + str r1, [sp] + str r0, [sp, #4] + ldr r0, _021D644C ; =0x000065A0 + str r6, [sp, #8] + lsl r3, r3, #4 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DA92C + and r5, r0 + add r0, r7, #0 + bl ov19_021D5DE8 + str r0, [sp, #0x18] + add r0, r7, #0 + bl ov19_021D5DF0 + str r0, [sp, #0x1c] + add r0, r7, #0 + bl ov19_021D5DF8 + ldr r1, [r4, #0x18] + mov r3, #0x16 + str r1, [sp] + ldr r1, [sp, #0x18] + lsl r3, r3, #4 + str r1, [sp, #4] + ldr r1, [sp, #0x1c] + str r1, [sp, #8] + str r0, [sp, #0xc] + str r6, [sp, #0x10] + ldr r0, _021D6450 ; =0x000065F4 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DB2FC + and r5, r0 + ldr r0, [r4, #0x18] + mov r3, #0x16 + str r0, [sp] + ldr r0, _021D6454 ; =0x0000662C + str r6, [sp, #4] + lsl r3, r3, #4 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DB8E4 + and r5, r0 + ldr r0, [r4, #0x18] + mov r3, #0x16 + str r0, [sp] + ldr r0, _021D6458 ; =0x0000B22C + str r6, [sp, #4] + lsl r3, r3, #4 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DC5F0 + and r5, r0 + ldr r0, [r4, #0x18] + mov r3, #0x16 + str r0, [sp] + lsl r3, r3, #4 + ldr r0, _021D645C ; =0x0000B3A4 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DCF88 + and r5, r0 + ldr r0, [r4, #0x18] + mov r3, #0x16 + str r0, [sp] + lsl r3, r3, #4 + ldr r0, _021D6460 ; =0x0000B3A8 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DE3E8 + and r5, r0 + add r0, r7, #0 + bl ov19_021D5DE8 + ldr r1, [r4, #0x18] + mov r3, #0x16 + str r1, [sp] + str r0, [sp, #4] + ldr r0, _021D6464 ; =0x0000B3AC + str r6, [sp, #8] + lsl r3, r3, #4 + ldr r2, [r4, r3] + sub r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, #0 + bl ov19_021DEC04 + and r5, r0 + ldr r0, _021D6468 ; =0x0000B3B0 + add r1, r4, #0 + str r7, [r4, r0] + ldr r0, _021D646C ; =ov19_021D6474 + mov r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0] + ldr r0, _021D6470 ; =ov19_021D6664 + add r1, r4, #0 + mov r2, #1 + bl ov19_021D77C8 + str r0, [r4, #4] + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x20 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D642A: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6430: .word 0x0000B3B4 +_021D6434: .word 0xFFFFE0FF +_021D6438: .word 0x04001000 +_021D643C: .word 0xFFCFFFEF +_021D6440: .word 0x00100010 +_021D6444: .word 0x00005DC0 +_021D6448: .word 0x00006558 +_021D644C: .word 0x000065A0 +_021D6450: .word 0x000065F4 +_021D6454: .word 0x0000662C +_021D6458: .word 0x0000B22C +_021D645C: .word 0x0000B3A4 +_021D6460: .word 0x0000B3A8 +_021D6464: .word 0x0000B3AC +_021D6468: .word 0x0000B3B0 +_021D646C: .word ov19_021D6474 +_021D6470: .word ov19_021D6664 + thumb_func_end ov19_021D61B0 + + thumb_func_start ov19_021D6474 +ov19_021D6474: ; 0x021D6474 + push {r4, lr} + add r4, r1, #0 + bl ov19_021D797C + bl sub_020BFAB8 + bl sub_020BFBE4 + bl sub_020A73C0 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02007768 + ldr r0, _021D649C ; =0x04000540 + mov r1, #0 + str r1, [r0, #0] + pop {r4, pc} + nop +_021D649C: .word 0x04000540 + thumb_func_end ov19_021D6474 + + thumb_func_start ov19_021D64A0 +ov19_021D64A0: ; 0x021D64A0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + ldr r0, [r4, #0] + bl sub_0200DA58 + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, _021D6570 ; =0x0000B3AC + ldr r0, [r4, r0] + bl ov19_021DECAC + ldr r0, _021D6574 ; =0x0000B3A8 + ldr r0, [r4, r0] + bl ov19_021DE440 + ldr r0, _021D6578 ; =0x0000B3A4 + ldr r0, [r4, r0] + bl ov19_021DD078 + ldr r0, _021D657C ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DC680 + ldr r0, _021D6580 ; =0x0000662C + add r0, r4, r0 + bl ov19_021DBAD0 + ldr r0, _021D6584 ; =0x000065F4 + add r0, r4, r0 + bl ov19_021DB370 + ldr r0, _021D6588 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DA9E0 + ldr r0, _021D658C ; =0x00006558 + add r0, r4, r0 + bl ov19_021DA8D8 + ldr r0, _021D6590 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D8E84 + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov19_021D7A74 + mov r0, #0x59 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov19_021DA384 + ldr r0, [r4, #0x18] + bl sub_02021964 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl sub_02019044 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02019044 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02019044 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_02019044 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02007B6C + mov r0, #0 + bl sub_02002C28 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + bl sub_0200A878 + pop {r4, pc} + ; .align 2, 0 +_021D6570: .word 0x0000B3AC +_021D6574: .word 0x0000B3A8 +_021D6578: .word 0x0000B3A4 +_021D657C: .word 0x0000B22C +_021D6580: .word 0x0000662C +_021D6584: .word 0x000065F4 +_021D6588: .word 0x000065A0 +_021D658C: .word 0x00006558 +_021D6590: .word 0x00005DC0 + thumb_func_end ov19_021D64A0 + + thumb_func_start ov19_021D6594 +ov19_021D6594: ; 0x021D6594 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + cmp r6, #0x34 + bhs _021D65F0 + mov r4, #0 + add r1, r5, #0 +_021D65A2: + ldr r0, [r1, #8] + cmp r0, #0 + bne _021D65E6 + ldr r0, _021D65F8 ; =0x021DFF9C + lsl r7, r6, #3 + ldr r0, [r0, r7] + str r0, [sp] + ldr r1, [sp] + mov r0, #0xa + add r1, #0x14 + bl sub_02018144 + add r1, r0, #0 + beq _021D65E0 + str r6, [r1, #0] + strh r4, [r1, #4] + mov r0, #0 + strh r0, [r1, #6] + ldr r0, [sp] + str r5, [r1, #0xc] + add r0, r1, r0 + str r0, [r1, #0x10] + ldr r0, _021D65FC ; =0x021DFF98 + mov r2, #1 + ldr r0, [r0, r7] + bl sub_0200D9E8 + lsl r1, r4, #2 + add r1, r5, r1 + str r0, [r1, #8] + pop {r3, r4, r5, r6, r7, pc} +_021D65E0: + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} +_021D65E6: + add r4, r4, #1 + add r1, r1, #4 + cmp r4, #4 + blo _021D65A2 + pop {r3, r4, r5, r6, r7, pc} +_021D65F0: + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D65F8: .word 0x021DFF9C +_021D65FC: .word 0x021DFF98 + thumb_func_end ov19_021D6594 + + thumb_func_start ov19_021D6600 +ov19_021D6600: ; 0x021D6600 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_021D6608: + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D661C + bl sub_0201CED0 + ldr r0, [r0, #0] + cmp r0, r6 + bne _021D661C + mov r0, #0 + pop {r4, r5, r6, pc} +_021D661C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D6608 + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021D6600 + + thumb_func_start ov19_021D6628 +ov19_021D6628: ; 0x021D6628 + mov r2, #0 +_021D662A: + ldr r1, [r0, #8] + cmp r1, #0 + beq _021D6634 + mov r0, #0 + bx lr +_021D6634: + add r2, r2, #1 + add r0, r0, #4 + cmp r2, #4 + blt _021D662A + mov r0, #1 + bx lr + thumb_func_end ov19_021D6628 + + thumb_func_start ov19_021D6640 +ov19_021D6640: ; 0x021D6640 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrh r0, [r5, #4] + ldr r4, [r5, #0xc] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl sub_0200DA58 + ldrh r0, [r5, #4] + mov r1, #0 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #8] + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D6640 + + thumb_func_start ov19_021D6664 +ov19_021D6664: ; 0x021D6664 + push {r4, lr} + ldr r0, _021D6688 ; =0x000065A0 + add r4, r1, #0 + add r0, r4, r0 + bl ov19_021DAA80 + ldr r0, [r4, #0x18] + bl sub_020219F8 + bl sub_0200A858 + ldr r3, _021D668C ; =0x027E0000 + ldr r1, _021D6690 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + ; .align 2, 0 +_021D6688: .word 0x000065A0 +_021D668C: .word 0x027E0000 +_021D6690: .word 0x00003FF8 + thumb_func_end ov19_021D6664 + + thumb_func_start ov19_021D6694 +ov19_021D6694: ; 0x021D6694 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r0, #0x16 + ldr r4, [r5, #0xc] + lsl r0, r0, #4 + ldr r6, [r4, r0] + ldrh r0, [r5, #6] + cmp r0, #0 + beq _021D66AC + cmp r0, #1 + beq _021D66FA + pop {r3, r4, r5, r6, r7, pc} +_021D66AC: + mov r0, #0x12 + mov r1, #0xa + bl sub_02006C24 + add r7, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov19_021D74B4 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov19_021D75CC + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov19_021D7774 + add r0, r7, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D66F2 + ldr r0, _021D6718 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DAA90 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, r6, r7, pc} +_021D66F2: + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, r6, r7, pc} +_021D66FA: + ldr r0, _021D6718 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DAAC4 + cmp r0, #0 + beq _021D6714 + ldr r0, _021D6718 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DAF98 + add r0, r5, #0 + bl ov19_021D6640 +_021D6714: + pop {r3, r4, r5, r6, r7, pc} + nop +_021D6718: .word 0x000065A0 + thumb_func_end ov19_021D6694 + + thumb_func_start ov19_021D671C +ov19_021D671C: ; 0x021D671C + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldrh r0, [r4, #6] + cmp r0, #0 + beq _021D6730 + cmp r0, #1 + beq _021D6766 + add sp, #0xc + pop {r3, r4, pc} +_021D6730: + ldr r0, _021D6778 ; =0x0000060D + bl sub_02005748 + mov r0, #0xa + str r0, [sp] + ldr r0, _021D677C ; =0x04000050 + mov r1, #0 + mov r2, #0x3f + mov r3, #6 + bl sub_020BF55C + mov r0, #8 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrh r0, [r4, #6] + add sp, #0xc + add r0, r0, #1 + strh r0, [r4, #6] + pop {r3, r4, pc} +_021D6766: + bl sub_0200F2AC + cmp r0, #0 + beq _021D6774 + add r0, r4, #0 + bl ov19_021D6640 +_021D6774: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021D6778: .word 0x0000060D +_021D677C: .word 0x04000050 + thumb_func_end ov19_021D671C + + thumb_func_start ov19_021D6780 +ov19_021D6780: ; 0x021D6780 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldrh r0, [r4, #6] + cmp r0, #0 + beq _021D6794 + cmp r0, #1 + beq _021D67C4 + add sp, #0xc + pop {r3, r4, pc} +_021D6794: + mov r0, #0xa + str r0, [sp] + ldr r0, _021D67D8 ; =0x04000050 + mov r1, #0 + mov r2, #0x3f + mov r3, #6 + bl sub_020BF55C + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrh r0, [r4, #6] + add sp, #0xc + add r0, r0, #1 + strh r0, [r4, #6] + pop {r3, r4, pc} +_021D67C4: + bl sub_0200F2AC + cmp r0, #0 + beq _021D67D2 + add r0, r4, #0 + bl ov19_021D6640 +_021D67D2: + add sp, #0xc + pop {r3, r4, pc} + nop +_021D67D8: .word 0x04000050 + thumb_func_end ov19_021D6780 + + thumb_func_start ov19_021D67DC +ov19_021D67DC: ; 0x021D67DC + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldrh r0, [r4, #6] + cmp r0, #0 + beq _021D67F0 + cmp r0, #1 + beq _021D6812 + add sp, #0xc + pop {r3, r4, pc} +_021D67F0: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrh r0, [r4, #6] + add sp, #0xc + add r0, r0, #1 + strh r0, [r4, #6] + pop {r3, r4, pc} +_021D6812: + bl sub_0200F2AC + cmp r0, #0 + beq _021D6820 + add r0, r4, #0 + bl ov19_021D6640 +_021D6820: + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov19_021D67DC + + thumb_func_start ov19_021D6824 +ov19_021D6824: ; 0x021D6824 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r0, #0x16 + ldr r5, [r4, #0xc] + lsl r0, r0, #4 + ldr r6, [r5, r0] + ldrh r0, [r4, #6] + cmp r0, #4 + bhi _021D68DA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D6842: ; jump table + .short _021D684C - _021D6842 - 2 ; case 0 + .short _021D685A - _021D6842 - 2 ; case 1 + .short _021D686C - _021D6842 - 2 ; case 2 + .short _021D68AC - _021D6842 - 2 ; case 3 + .short _021D68C8 - _021D6842 - 2 ; case 4 +_021D684C: + ldr r0, _021D68DC ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE9B8 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] +_021D685A: + ldr r0, _021D68DC ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE9E4 + cmp r0, #0 + beq _021D68DA + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] +_021D686C: + mov r0, #0x43 + add r1, r6, #0 + lsl r0, r0, #4 + add r1, #0x40 + ldrb r0, [r5, r0] + ldrb r1, [r1] + bl ov19_021D77A4 + add r7, r0, #0 + mov r0, #0x43 + lsl r0, r0, #4 + add r1, r6, #0 + add r0, r5, r0 + add r1, #0x40 + add r2, r7, #0 + mov r3, #1 + bl ov19_021D7B4C + mov r0, #0x43 + lsl r0, r0, #4 + add r6, #0x40 + add r0, r5, r0 + add r1, r6, #0 + add r2, r7, #0 + bl ov19_021D7D70 + ldr r0, _021D68E0 ; =0x000005DC + bl sub_02005748 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] +_021D68AC: + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov19_021D7E1C + cmp r0, #0 + beq _021D68DA + ldr r0, _021D68DC ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE7A0 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] +_021D68C8: + ldr r0, _021D68DC ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE800 + cmp r0, #0 + beq _021D68DA + add r0, r4, #0 + bl ov19_021D6640 +_021D68DA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D68DC: .word 0x0000B3A8 +_021D68E0: .word 0x000005DC + thumb_func_end ov19_021D6824 + + thumb_func_start ov19_021D68E4 +ov19_021D68E4: ; 0x021D68E4 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D68F6 + cmp r0, #1 + beq _021D6914 + pop {r3, r4, r5, pc} +_021D68F6: + ldr r0, _021D6934 ; =0x000005DC + bl sub_02005748 + ldr r0, _021D6938 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D8F60 + ldr r0, _021D693C ; =0x0000B3A8 + ldr r0, [r4, r0] + bl ov19_021DE7A0 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6914: + ldr r0, _021D6938 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9074 + cmp r0, #0 + beq _021D6932 + ldr r0, _021D693C ; =0x0000B3A8 + ldr r0, [r4, r0] + bl ov19_021DE800 + cmp r0, #0 + beq _021D6932 + add r0, r5, #0 + bl ov19_021D6640 +_021D6932: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6934: .word 0x000005DC +_021D6938: .word 0x00005DC0 +_021D693C: .word 0x0000B3A8 + thumb_func_end ov19_021D68E4 + + thumb_func_start ov19_021D6940 +ov19_021D6940: ; 0x021D6940 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x16 + ldr r4, [r5, #0xc] + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E08 + cmp r0, #4 + ldrh r0, [r5, #6] + beq _021D6984 + cmp r0, #0 + beq _021D6960 + cmp r0, #1 + beq _021D6970 + pop {r3, r4, r5, pc} +_021D6960: + ldr r0, _021D69B4 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DAFF8 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6970: + ldr r0, _021D69B4 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DB220 + cmp r0, #0 + beq _021D69B0 + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, pc} +_021D6984: + cmp r0, #0 + beq _021D698E + cmp r0, #1 + beq _021D699E + pop {r3, r4, r5, pc} +_021D698E: + ldr r0, _021D69B8 ; =0x0000B3AC + ldr r0, [r4, r0] + bl ov19_021DEE34 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D699E: + ldr r0, _021D69B8 ; =0x0000B3AC + ldr r0, [r4, r0] + bl ov19_021DEE84 + cmp r0, #0 + beq _021D69B0 + add r0, r5, #0 + bl ov19_021D6640 +_021D69B0: + pop {r3, r4, r5, pc} + nop +_021D69B4: .word 0x000065A0 +_021D69B8: .word 0x0000B3AC + thumb_func_end ov19_021D6940 + + thumb_func_start ov19_021D69BC +ov19_021D69BC: ; 0x021D69BC + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r0, #0x16 + ldr r4, [r5, #0xc] + lsl r0, r0, #4 + ldr r6, [r4, r0] + add r0, r6, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D69DC + ldr r0, _021D6A10 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9A64 + b _021D6A00 +_021D69DC: + add r0, r6, #0 + bl ov19_021D5E10 + cmp r0, #0 + beq _021D69EC + cmp r0, #1 + beq _021D69F8 + b _021D6A00 +_021D69EC: + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov19_021D8A24 + b _021D6A00 +_021D69F8: + ldr r0, _021D6A14 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DCC14 +_021D6A00: + ldr r0, _021D6A18 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DB224 + add r0, r5, #0 + bl ov19_021D6640 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D6A10: .word 0x00005DC0 +_021D6A14: .word 0x0000B22C +_021D6A18: .word 0x000065A0 + thumb_func_end ov19_021D69BC + + thumb_func_start ov19_021D6A1C +ov19_021D6A1C: ; 0x021D6A1C + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D6A34 ; =0x000065A0 + add r0, r1, r0 + bl ov19_021DB078 + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + nop +_021D6A34: .word 0x000065A0 + thumb_func_end ov19_021D6A1C + + thumb_func_start ov19_021D6A38 +ov19_021D6A38: ; 0x021D6A38 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6A4A + cmp r0, #1 + beq _021D6A5A + pop {r4, pc} +_021D6A4A: + ldr r0, _021D6A70 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9230 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6A5A: + ldr r0, _021D6A70 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9278 + cmp r0, #0 + beq _021D6A6C + add r0, r4, #0 + bl ov19_021D6640 +_021D6A6C: + pop {r4, pc} + nop +_021D6A70: .word 0x00005DC0 + thumb_func_end ov19_021D6A38 + + thumb_func_start ov19_021D6A74 +ov19_021D6A74: ; 0x021D6A74 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6A86 + cmp r0, #1 + beq _021D6A96 + pop {r4, pc} +_021D6A86: + ldr r0, _021D6AAC ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9368 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6A96: + ldr r0, _021D6AAC ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D939C + cmp r0, #0 + beq _021D6AA8 + add r0, r4, #0 + bl ov19_021D6640 +_021D6AA8: + pop {r4, pc} + nop +_021D6AAC: .word 0x00005DC0 + thumb_func_end ov19_021D6A74 + + thumb_func_start ov19_021D6AB0 +ov19_021D6AB0: ; 0x021D6AB0 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6AC2 + cmp r0, #1 + beq _021D6AD2 + pop {r4, pc} +_021D6AC2: + ldr r0, _021D6AE8 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D94B4 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6AD2: + ldr r0, _021D6AE8 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9530 + cmp r0, #0 + beq _021D6AE4 + add r0, r4, #0 + bl ov19_021D6640 +_021D6AE4: + pop {r4, pc} + nop +_021D6AE8: .word 0x00005DC0 + thumb_func_end ov19_021D6AB0 + + thumb_func_start ov19_021D6AEC +ov19_021D6AEC: ; 0x021D6AEC + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6AFE + cmp r0, #1 + beq _021D6B0E + pop {r4, pc} +_021D6AFE: + ldr r0, _021D6B18 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9900 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6B0E: + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + nop +_021D6B18: .word 0x00005DC0 + thumb_func_end ov19_021D6AEC + + thumb_func_start ov19_021D6B1C +ov19_021D6B1C: ; 0x021D6B1C + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6B32 + cmp r0, #1 + beq _021D6B42 + cmp r0, #2 + beq _021D6B52 + pop {r4, pc} +_021D6B32: + ldr r0, _021D6B68 ; =0x0000B22C + add r0, r1, r0 + bl ov19_021DCAC0 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6B42: + ldr r0, _021D6B68 ; =0x0000B22C + add r0, r1, r0 + bl ov19_021DC834 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6B52: + ldr r0, _021D6B68 ; =0x0000B22C + add r0, r1, r0 + bl ov19_021DC95C + cmp r0, #0 + beq _021D6B64 + add r0, r4, #0 + bl ov19_021D6640 +_021D6B64: + pop {r4, pc} + nop +_021D6B68: .word 0x0000B22C + thumb_func_end ov19_021D6B1C + + thumb_func_start ov19_021D6B6C +ov19_021D6B6C: ; 0x021D6B6C + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6B7E + cmp r0, #1 + beq _021D6B8E + pop {r4, pc} +_021D6B7E: + ldr r0, _021D6BA4 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9938 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6B8E: + ldr r0, _021D6BA4 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D995C + cmp r0, #0 + beq _021D6BA0 + add r0, r4, #0 + bl ov19_021D6640 +_021D6BA0: + pop {r4, pc} + nop +_021D6BA4: .word 0x00005DC0 + thumb_func_end ov19_021D6B6C + + thumb_func_start ov19_021D6BA8 +ov19_021D6BA8: ; 0x021D6BA8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r1, [r5, #6] + mov r0, #0x16 + lsl r0, r0, #4 + ldr r4, [r5, #0xc] + cmp r1, #0 + ldr r0, [r4, r0] + beq _021D6BC0 + cmp r1, #1 + beq _021D6BD8 + pop {r3, r4, r5, pc} +_021D6BC0: + bl ov19_021D5E24 + add r1, r0, #0 + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov19_021D8860 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6BD8: + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov19_021D8898 + cmp r0, #0 + beq _021D6BEC + add r0, r5, #0 + bl ov19_021D6640 +_021D6BEC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021D6BA8 + + thumb_func_start ov19_021D6BF0 +ov19_021D6BF0: ; 0x021D6BF0 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r1, [r5, #6] + mov r0, #0x16 + lsl r0, r0, #4 + ldr r4, [r5, #0xc] + cmp r1, #0 + ldr r0, [r4, r0] + beq _021D6C08 + cmp r1, #1 + beq _021D6C1E + pop {r3, r4, r5, pc} +_021D6C08: + bl ov19_021D5E2C + add r1, r0, #0 + ldr r0, _021D6C34 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DCAFC + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6C1E: + ldr r0, _021D6C34 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DCB20 + cmp r0, #0 + beq _021D6C30 + add r0, r5, #0 + bl ov19_021D6640 +_021D6C30: + pop {r3, r4, r5, pc} + nop +_021D6C34: .word 0x0000B22C + thumb_func_end ov19_021D6BF0 + + thumb_func_start ov19_021D6C38 +ov19_021D6C38: ; 0x021D6C38 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6C4A + cmp r0, #1 + beq _021D6C5A + pop {r4, pc} +_021D6C4A: + ldr r0, _021D6C70 ; =0x0000662C + add r0, r1, r0 + bl ov19_021DC29C + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6C5A: + ldr r0, _021D6C70 ; =0x0000662C + add r0, r1, r0 + bl ov19_021DC364 + cmp r0, #0 + beq _021D6C6C + add r0, r4, #0 + bl ov19_021D6640 +_021D6C6C: + pop {r4, pc} + nop +_021D6C70: .word 0x0000662C + thumb_func_end ov19_021D6C38 + + thumb_func_start ov19_021D6C74 +ov19_021D6C74: ; 0x021D6C74 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6C86 + cmp r0, #1 + beq _021D6C96 + pop {r4, pc} +_021D6C86: + ldr r0, _021D6CAC ; =0x0000662C + add r0, r1, r0 + bl ov19_021DC3F4 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6C96: + ldr r0, _021D6CAC ; =0x0000662C + add r0, r1, r0 + bl ov19_021DC43C + cmp r0, #0 + beq _021D6CA8 + add r0, r4, #0 + bl ov19_021D6640 +_021D6CA8: + pop {r4, pc} + nop +_021D6CAC: .word 0x0000662C + thumb_func_end ov19_021D6C74 + + thumb_func_start ov19_021D6CB0 +ov19_021D6CB0: ; 0x021D6CB0 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D6CC2 + cmp r0, #1 + beq _021D6CD2 + pop {r3, r4, r5, pc} +_021D6CC2: + ldr r0, _021D6CF0 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9B34 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6CD2: + ldr r0, _021D6CF0 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9B64 + cmp r0, #0 + beq _021D6CEC + ldr r0, _021D6CF4 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DB2B0 + add r0, r5, #0 + bl ov19_021D6640 +_021D6CEC: + pop {r3, r4, r5, pc} + nop +_021D6CF0: .word 0x00005DC0 +_021D6CF4: .word 0x000065A0 + thumb_func_end ov19_021D6CB0 + + thumb_func_start ov19_021D6CF8 +ov19_021D6CF8: ; 0x021D6CF8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D6D0A + cmp r0, #1 + beq _021D6D1A + pop {r3, r4, r5, pc} +_021D6D0A: + ldr r0, _021D6D38 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9BD4 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6D1A: + ldr r0, _021D6D38 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9C04 + cmp r0, #0 + beq _021D6D34 + ldr r0, _021D6D3C ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DB2B0 + add r0, r5, #0 + bl ov19_021D6640 +_021D6D34: + pop {r3, r4, r5, pc} + nop +_021D6D38: .word 0x00005DC0 +_021D6D3C: .word 0x000065A0 + thumb_func_end ov19_021D6CF8 + + thumb_func_start ov19_021D6D40 +ov19_021D6D40: ; 0x021D6D40 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D6D52 + cmp r0, #1 + beq _021D6D62 + pop {r3, r4, r5, pc} +_021D6D52: + ldr r0, _021D6D80 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9C74 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6D62: + ldr r0, _021D6D80 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9CA0 + cmp r0, #0 + beq _021D6D7C + ldr r0, _021D6D84 ; =0x000065A0 + add r0, r4, r0 + bl ov19_021DB2B0 + add r0, r5, #0 + bl ov19_021D6640 +_021D6D7C: + pop {r3, r4, r5, pc} + nop +_021D6D80: .word 0x00005DC0 +_021D6D84: .word 0x000065A0 + thumb_func_end ov19_021D6D40 + + thumb_func_start ov19_021D6D88 +ov19_021D6D88: ; 0x021D6D88 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r0, #0x16 + ldr r4, [r7, #0xc] + lsl r0, r0, #4 + ldr r5, [r4, r0] + add r0, r5, #0 + bl ov19_021D5E74 + add r6, r0, #0 + add r0, r5, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021D6DB2 + ldr r0, _021D6DF0 ; =0x00005DC0 + add r1, r6, #0 + add r0, r4, r0 + bl ov19_021D9AB0 + b _021D6DE8 +_021D6DB2: + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #0 + beq _021D6DD4 + cmp r0, #1 + bne _021D6DE8 + add r0, r5, #0 + bl ov19_021D5E2C + add r1, r0, #0 + ldr r0, _021D6DF4 ; =0x0000B22C + add r2, r6, #0 + add r0, r4, r0 + bl ov19_021DCBDC + b _021D6DE8 +_021D6DD4: + add r0, r5, #0 + bl ov19_021D5E24 + add r1, r0, #0 + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r4, r0 + add r2, r6, #0 + bl ov19_021D8988 +_021D6DE8: + add r0, r7, #0 + bl ov19_021D6640 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6DF0: .word 0x00005DC0 +_021D6DF4: .word 0x0000B22C + thumb_func_end ov19_021D6D88 + + thumb_func_start ov19_021D6DF8 +ov19_021D6DF8: ; 0x021D6DF8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D6E0A + cmp r0, #1 + beq _021D6E22 + pop {r3, r4, r5, pc} +_021D6E0A: + ldr r0, _021D6E40 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9D10 + ldr r0, _021D6E44 ; =0x0000B3A8 + ldr r0, [r4, r0] + bl ov19_021DEB18 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6E22: + ldr r0, _021D6E44 ; =0x0000B3A8 + ldr r0, [r4, r0] + bl ov19_021DEB60 + cmp r0, #0 + beq _021D6E3C + ldr r0, _021D6E40 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9D28 + add r0, r5, #0 + bl ov19_021D6640 +_021D6E3C: + pop {r3, r4, r5, pc} + nop +_021D6E40: .word 0x00005DC0 +_021D6E44: .word 0x0000B3A8 + thumb_func_end ov19_021D6DF8 + + thumb_func_start ov19_021D6E48 +ov19_021D6E48: ; 0x021D6E48 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x16 + ldr r4, [r5, #0xc] + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E94 + add r1, r0, #0 + ldr r0, _021D6E6C ; =0x000065F4 + add r0, r4, r0 + bl ov19_021DB448 + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, pc} + nop +_021D6E6C: .word 0x000065F4 + thumb_func_end ov19_021D6E48 + + thumb_func_start ov19_021D6E70 +ov19_021D6E70: ; 0x021D6E70 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r0, #0x16 + ldr r4, [r6, #0xc] + lsl r0, r0, #4 + ldr r5, [r4, r0] + add r0, r5, #0 + bl ov19_021D5E94 + add r1, r0, #0 + ldr r0, _021D6EA0 ; =0x000065F4 + add r0, r4, r0 + bl ov19_021DB448 + ldr r0, _021D6EA0 ; =0x000065F4 + add r5, #0x74 + add r0, r4, r0 + add r1, r5, #0 + bl ov19_021DB57C + add r0, r6, #0 + bl ov19_021D6640 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D6EA0: .word 0x000065F4 + thumb_func_end ov19_021D6E70 + + thumb_func_start ov19_021D6EA4 +ov19_021D6EA4: ; 0x021D6EA4 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D6EBC ; =0x000065F4 + add r0, r1, r0 + bl ov19_021DB6F0 + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + nop +_021D6EBC: .word 0x000065F4 + thumb_func_end ov19_021D6EA4 + + thumb_func_start ov19_021D6EC0 +ov19_021D6EC0: ; 0x021D6EC0 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D6ED8 ; =0x000065F4 + add r0, r1, r0 + bl ov19_021DB724 + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + nop +_021D6ED8: .word 0x000065F4 + thumb_func_end ov19_021D6EC0 + + thumb_func_start ov19_021D6EDC +ov19_021D6EDC: ; 0x021D6EDC + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r0, #0x16 + ldr r4, [r6, #0xc] + lsl r0, r0, #4 + ldr r5, [r4, r0] + ldr r0, _021D6F04 ; =0x000005DC + bl sub_02005748 + ldr r0, _021D6F08 ; =0x000065F4 + add r5, #0x74 + add r0, r4, r0 + add r1, r5, #0 + bl ov19_021DB748 + add r0, r6, #0 + bl ov19_021D6640 + pop {r4, r5, r6, pc} + nop +_021D6F04: .word 0x000005DC +_021D6F08: .word 0x000065F4 + thumb_func_end ov19_021D6EDC + + thumb_func_start ov19_021D6F0C +ov19_021D6F0C: ; 0x021D6F0C + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r0, #0x16 + ldr r4, [r6, #0xc] + lsl r0, r0, #4 + ldr r5, [r4, r0] + ldr r0, _021D6F34 ; =0x000005DD + bl sub_02005748 + ldr r0, _021D6F38 ; =0x000065F4 + add r5, #0x74 + add r0, r4, r0 + add r1, r5, #0 + bl ov19_021DB790 + add r0, r6, #0 + bl ov19_021D6640 + pop {r4, r5, r6, pc} + nop +_021D6F34: .word 0x000005DD +_021D6F38: .word 0x000065F4 + thumb_func_end ov19_021D6F0C + + thumb_func_start ov19_021D6F3C +ov19_021D6F3C: ; 0x021D6F3C + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6F4E + cmp r0, #1 + beq _021D6F5E + pop {r4, pc} +_021D6F4E: + ldr r0, _021D6F74 ; =0x0000662C + add r0, r1, r0 + bl ov19_021DBB48 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6F5E: + ldr r0, _021D6F74 ; =0x0000662C + add r0, r1, r0 + bl ov19_021DBB68 + cmp r0, #0 + beq _021D6F70 + add r0, r4, #0 + bl ov19_021D6640 +_021D6F70: + pop {r4, pc} + nop +_021D6F74: .word 0x0000662C + thumb_func_end ov19_021D6F3C + + thumb_func_start ov19_021D6F78 +ov19_021D6F78: ; 0x021D6F78 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D6F8A + cmp r0, #1 + beq _021D6FA0 + pop {r3, r4, r5, pc} +_021D6F8A: + ldr r0, _021D6FA8 ; =0x000005DD + bl sub_02005748 + ldr r0, _021D6FAC ; =0x0000662C + add r0, r4, r0 + bl ov19_021DBB70 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D6FA0: + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6FA8: .word 0x000005DD +_021D6FAC: .word 0x0000662C + thumb_func_end ov19_021D6F78 + + thumb_func_start ov19_021D6FB0 +ov19_021D6FB0: ; 0x021D6FB0 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6FC2 + cmp r0, #1 + beq _021D6FD2 + pop {r4, pc} +_021D6FC2: + ldr r0, _021D6FE8 ; =0x0000662C + add r0, r1, r0 + bl ov19_021DBB94 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D6FD2: + ldr r0, _021D6FE8 ; =0x0000662C + add r0, r1, r0 + bl ov19_021DBBA0 + cmp r0, #0 + beq _021D6FE4 + add r0, r4, #0 + bl ov19_021D6640 +_021D6FE4: + pop {r4, pc} + nop +_021D6FE8: .word 0x0000662C + thumb_func_end ov19_021D6FB0 + + thumb_func_start ov19_021D6FEC +ov19_021D6FEC: ; 0x021D6FEC + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D6FFE + cmp r0, #1 + beq _021D7010 + pop {r4, pc} +_021D6FFE: + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r1, r0 + bl ov19_021D8350 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D7010: + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r1, r0 + bl ov19_021D8370 + cmp r0, #0 + beq _021D7024 + add r0, r4, #0 + bl ov19_021D6640 +_021D7024: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D6FEC + + thumb_func_start ov19_021D7028 +ov19_021D7028: ; 0x021D7028 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r0, #0x16 + ldr r5, [r4, #0xc] + lsl r0, r0, #4 + ldr r6, [r5, r0] + ldrh r0, [r4, #6] + cmp r0, #3 + bhi _021D70DA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D7046: ; jump table + .short _021D704E - _021D7046 - 2 ; case 0 + .short _021D7064 - _021D7046 - 2 ; case 1 + .short _021D70A2 - _021D7046 - 2 ; case 2 + .short _021D70C8 - _021D7046 - 2 ; case 3 +_021D704E: + ldr r0, _021D70DC ; =0x000005DD + bl sub_02005748 + ldr r0, _021D70E0 ; =0x00005DC0 + add r0, r5, r0 + bl ov19_021D9690 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, r5, r6, pc} +_021D7064: + ldr r0, _021D70E0 ; =0x00005DC0 + add r0, r5, r0 + bl ov19_021D9704 + cmp r0, #0 + beq _021D70DA + add r0, r6, #0 + bl ov19_021D5E10 + cmp r0, #3 + beq _021D7080 + cmp r0, #4 + beq _021D708C + b _021D7096 +_021D7080: + ldr r0, _021D70E4 ; =0x00006558 + mov r1, #1 + add r0, r5, r0 + bl ov19_021DA8FC + b _021D7096 +_021D708C: + ldr r0, _021D70E4 ; =0x00006558 + mov r1, #2 + add r0, r5, r0 + bl ov19_021DA8FC +_021D7096: + mov r0, #0 + strh r0, [r4, #8] + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, r5, r6, pc} +_021D70A2: + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldrh r0, [r4, #8] + cmp r0, #6 + blo _021D70DA + ldr r0, _021D70E0 ; =0x00005DC0 + add r0, r5, r0 + bl ov19_021D97FC + ldr r0, _021D70E4 ; =0x00006558 + mov r1, #0 + add r0, r5, r0 + bl ov19_021DA8FC + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, r5, r6, pc} +_021D70C8: + ldr r0, _021D70E0 ; =0x00005DC0 + add r0, r5, r0 + bl ov19_021D9858 + cmp r0, #0 + beq _021D70DA + add r0, r4, #0 + bl ov19_021D6640 +_021D70DA: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D70DC: .word 0x000005DD +_021D70E0: .word 0x00005DC0 +_021D70E4: .word 0x00006558 + thumb_func_end ov19_021D7028 + + thumb_func_start ov19_021D70E8 +ov19_021D70E8: ; 0x021D70E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r0, [r5, #6] + ldr r4, [r5, #0xc] + cmp r0, #0 + beq _021D70FA + cmp r0, #1 + beq _021D7118 + pop {r3, r4, r5, pc} +_021D70FA: + ldr r0, _021D712C ; =0x00000633 + bl sub_02005748 + ldr r0, _021D7130 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D99F4 + ldr r0, _021D7134 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DC6C8 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D7118: + ldr r0, _021D7134 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DC6F8 + cmp r0, #0 + beq _021D712A + add r0, r5, #0 + bl ov19_021D6640 +_021D712A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D712C: .word 0x00000633 +_021D7130: .word 0x00005DC0 +_021D7134: .word 0x0000B22C + thumb_func_end ov19_021D70E8 + + thumb_func_start ov19_021D7138 +ov19_021D7138: ; 0x021D7138 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r5, [r4, #0xc] + cmp r0, #3 + bhi _021D71A8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D7150: ; jump table + .short _021D7158 - _021D7150 - 2 ; case 0 + .short _021D7166 - _021D7150 - 2 ; case 1 + .short _021D7178 - _021D7150 - 2 ; case 2 + .short _021D718E - _021D7150 - 2 ; case 3 +_021D7158: + ldr r0, _021D71AC ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE9B8 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] +_021D7166: + ldr r0, _021D71AC ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE9E4 + cmp r0, #0 + beq _021D71A8 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] +_021D7178: + ldr r0, _021D71B0 ; =0x00000634 + bl sub_02005748 + ldr r0, _021D71B4 ; =0x0000B22C + add r0, r5, r0 + bl ov19_021DC768 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r3, r4, r5, pc} +_021D718E: + ldr r0, _021D71B4 ; =0x0000B22C + add r0, r5, r0 + bl ov19_021DC788 + cmp r0, #0 + beq _021D71A8 + ldr r0, _021D71B8 ; =0x00005DC0 + add r0, r5, r0 + bl ov19_021D9A2C + add r0, r4, #0 + bl ov19_021D6640 +_021D71A8: + pop {r3, r4, r5, pc} + nop +_021D71AC: .word 0x0000B3A8 +_021D71B0: .word 0x00000634 +_021D71B4: .word 0x0000B22C +_021D71B8: .word 0x00005DC0 + thumb_func_end ov19_021D7138 + + thumb_func_start ov19_021D71BC +ov19_021D71BC: ; 0x021D71BC + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D71CE + cmp r0, #1 + beq _021D71DE + pop {r4, pc} +_021D71CE: + ldr r0, _021D71F4 ; =0x0000B22C + add r0, r1, r0 + bl ov19_021DC834 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D71DE: + ldr r0, _021D71F4 ; =0x0000B22C + add r0, r1, r0 + bl ov19_021DC95C + cmp r0, #0 + beq _021D71F0 + add r0, r4, #0 + bl ov19_021D6640 +_021D71F0: + pop {r4, pc} + nop +_021D71F4: .word 0x0000B22C + thumb_func_end ov19_021D71BC + + thumb_func_start ov19_021D71F8 +ov19_021D71F8: ; 0x021D71F8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrh r1, [r5, #6] + mov r0, #0x16 + lsl r0, r0, #4 + ldr r4, [r5, #0xc] + cmp r1, #0 + ldr r0, [r4, r0] + beq _021D7210 + cmp r1, #1 + beq _021D7230 + pop {r3, r4, r5, pc} +_021D7210: + bl ov19_021D5E10 + cmp r0, #1 + bne _021D7228 + ldr r0, _021D7244 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DC96C + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r3, r4, r5, pc} +_021D7228: + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, pc} +_021D7230: + ldr r0, _021D7244 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DCA08 + cmp r0, #0 + beq _021D7242 + add r0, r5, #0 + bl ov19_021D6640 +_021D7242: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D7244: .word 0x0000B22C + thumb_func_end ov19_021D71F8 + + thumb_func_start ov19_021D7248 +ov19_021D7248: ; 0x021D7248 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x43 + ldr r4, [r5, #0xc] + lsl r0, r0, #4 + add r0, r4, r0 + bl ov19_021D8938 + ldr r0, _021D7270 ; =0x0000B22C + add r0, r4, r0 + bl ov19_021DCBA0 + ldr r0, _021D7274 ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9A8C + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D7270: .word 0x0000B22C +_021D7274: .word 0x00005DC0 + thumb_func_end ov19_021D7248 + + thumb_func_start ov19_021D7278 +ov19_021D7278: ; 0x021D7278 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r0, #0x16 + ldr r4, [r5, #0xc] + lsl r0, r0, #4 + ldr r6, [r4, r0] + ldrh r0, [r5, #6] + cmp r0, #0 + beq _021D7294 + cmp r0, #1 + beq _021D72A4 + cmp r0, #2 + beq _021D72D0 + pop {r4, r5, r6, pc} +_021D7294: + ldr r0, _021D72E4 ; =0x0000B3A4 + ldr r0, [r4, r0] + bl ov19_021DD378 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r4, r5, r6, pc} +_021D72A4: + ldr r0, _021D72E4 ; =0x0000B3A4 + ldr r0, [r4, r0] + bl ov19_021DD45C + cmp r0, #0 + beq _021D72E2 + add r6, #0x9c + ldrb r0, [r6] + cmp r0, #0 + bne _021D72C0 + add r0, r5, #0 + bl ov19_021D6640 + pop {r4, r5, r6, pc} +_021D72C0: + ldr r0, _021D72E4 ; =0x0000B3A4 + ldr r0, [r4, r0] + bl ov19_021DD714 + ldrh r0, [r5, #6] + add r0, r0, #1 + strh r0, [r5, #6] + pop {r4, r5, r6, pc} +_021D72D0: + ldr r0, _021D72E4 ; =0x0000B3A4 + ldr r0, [r4, r0] + bl ov19_021DD740 + cmp r0, #0 + beq _021D72E2 + add r0, r5, #0 + bl ov19_021D6640 +_021D72E2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D72E4: .word 0x0000B3A4 + thumb_func_end ov19_021D7278 + + thumb_func_start ov19_021D72E8 +ov19_021D72E8: ; 0x021D72E8 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D72FA + cmp r0, #1 + beq _021D730A + pop {r4, pc} +_021D72FA: + ldr r0, _021D7320 ; =0x0000B3A4 + ldr r0, [r1, r0] + bl ov19_021DD768 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D730A: + ldr r0, _021D7320 ; =0x0000B3A4 + ldr r0, [r1, r0] + bl ov19_021DD820 + cmp r0, #0 + beq _021D731C + add r0, r4, #0 + bl ov19_021D6640 +_021D731C: + pop {r4, pc} + nop +_021D7320: .word 0x0000B3A4 + thumb_func_end ov19_021D72E8 + + thumb_func_start ov19_021D7324 +ov19_021D7324: ; 0x021D7324 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D733C ; =0x0000B3A4 + ldr r0, [r1, r0] + bl ov19_021DE2F4 + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + nop +_021D733C: .word 0x0000B3A4 + thumb_func_end ov19_021D7324 + + thumb_func_start ov19_021D7340 +ov19_021D7340: ; 0x021D7340 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D7358 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9AEC + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + nop +_021D7358: .word 0x00005DC0 + thumb_func_end ov19_021D7340 + + thumb_func_start ov19_021D735C +ov19_021D735C: ; 0x021D735C + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r5, #0xc] + ldr r0, _021D737C ; =0x00005DC0 + add r0, r4, r0 + bl ov19_021D9B10 + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov19_021D8A6C + add r0, r5, #0 + bl ov19_021D6640 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D737C: .word 0x00005DC0 + thumb_func_end ov19_021D735C + + thumb_func_start ov19_021D7380 +ov19_021D7380: ; 0x021D7380 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x43 + ldr r1, [r4, #0xc] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov19_021D8B14 + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + thumb_func_end ov19_021D7380 + + thumb_func_start ov19_021D7398 +ov19_021D7398: ; 0x021D7398 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x43 + ldr r1, [r4, #0xc] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov19_021D8A6C + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + thumb_func_end ov19_021D7398 + + thumb_func_start ov19_021D73B0 +ov19_021D73B0: ; 0x021D73B0 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D73C2 + cmp r0, #1 + beq _021D73D2 + pop {r4, pc} +_021D73C2: + ldr r0, _021D73E8 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9230 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D73D2: + ldr r0, _021D73E8 ; =0x00005DC0 + add r0, r1, r0 + bl ov19_021D9278 + cmp r0, #0 + beq _021D73E4 + add r0, r4, #0 + bl ov19_021D6640 +_021D73E4: + pop {r4, pc} + nop +_021D73E8: .word 0x00005DC0 + thumb_func_end ov19_021D73B0 + + thumb_func_start ov19_021D73EC +ov19_021D73EC: ; 0x021D73EC + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D7404 ; =0x0000B3AC + ldr r0, [r1, r0] + mov r1, #0 + bl ov19_021DEDDC + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + ; .align 2, 0 +_021D7404: .word 0x0000B3AC + thumb_func_end ov19_021D73EC + + thumb_func_start ov19_021D7408 +ov19_021D7408: ; 0x021D7408 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + ldr r0, _021D7420 ; =0x0000B3AC + ldr r0, [r1, r0] + mov r1, #1 + bl ov19_021DEDDC + add r0, r4, #0 + bl ov19_021D6640 + pop {r4, pc} + ; .align 2, 0 +_021D7420: .word 0x0000B3AC + thumb_func_end ov19_021D7408 + + thumb_func_start ov19_021D7424 +ov19_021D7424: ; 0x021D7424 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #6] + ldr r1, [r4, #0xc] + cmp r0, #0 + beq _021D7436 + cmp r0, #1 + beq _021D7446 + pop {r4, pc} +_021D7436: + ldr r0, _021D745C ; =0x0000B3AC + ldr r0, [r1, r0] + bl ov19_021DEE88 + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + pop {r4, pc} +_021D7446: + ldr r0, _021D745C ; =0x0000B3AC + ldr r0, [r1, r0] + bl ov19_021DEEA8 + cmp r0, #0 + beq _021D7458 + add r0, r4, #0 + bl ov19_021D6640 +_021D7458: + pop {r4, pc} + nop +_021D745C: .word 0x0000B3AC + thumb_func_end ov19_021D7424 + + thumb_func_start ov19_021D7460 +ov19_021D7460: ; 0x021D7460 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldrh r0, [r4, #6] + cmp r0, #0 + beq _021D7474 + cmp r0, #1 + beq _021D749C + add sp, #0xc + pop {r3, r4, pc} +_021D7474: + ldr r0, _021D74B0 ; =0x0000060E + bl sub_02005748 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrh r0, [r4, #6] + add sp, #0xc + add r0, r0, #1 + strh r0, [r4, #6] + pop {r3, r4, pc} +_021D749C: + bl sub_0200F2AC + cmp r0, #0 + beq _021D74AA + add r0, r4, #0 + bl ov19_021D6640 +_021D74AA: + add sp, #0xc + pop {r3, r4, pc} + nop +_021D74B0: .word 0x0000060E + thumb_func_end ov19_021D7460 + + thumb_func_start ov19_021D74B4 +ov19_021D74B4: ; 0x021D74B4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D759C ; =0x021DFF70 + add r4, r1, #0 + bl sub_0201FE94 + ldr r2, _021D75A0 ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + mov r0, #1 + mov r1, #0 + add r2, r0, #0 + bl sub_020BDE40 + ldr r0, _021D75A4 ; =0x021DFE48 + bl sub_02018368 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75A8 ; =0x021DFF1C + mov r1, #1 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75AC ; =0x021DFF00 + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75B0 ; =0x021DFEC8 + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D7556 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75B4 ; =0x021DFEE4 + mov r1, #4 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75B8 ; =0x021DFEAC + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75BC ; =0x021DFE90 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75C0 ; =0x021DFE74 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + b _021D7596 +_021D7556: + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75B4 ; =0x021DFEE4 + mov r1, #4 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75C4 ; =0x021DFF54 + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75C8 ; =0x021DFE58 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, _021D75C0 ; =0x021DFE74 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 +_021D7596: + bl ov19_021D76FC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D759C: .word 0x021DFF70 +_021D75A0: .word 0x04000304 +_021D75A4: .word 0x021DFE48 +_021D75A8: .word 0x021DFF1C +_021D75AC: .word 0x021DFF00 +_021D75B0: .word 0x021DFEC8 +_021D75B4: .word 0x021DFEE4 +_021D75B8: .word 0x021DFEAC +_021D75BC: .word 0x021DFE90 +_021D75C0: .word 0x021DFE74 +_021D75C4: .word 0x021DFF54 +_021D75C8: .word 0x021DFE58 + thumb_func_end ov19_021D74B4 + + thumb_func_start ov19_021D75CC +ov19_021D75CC: ; 0x021D75CC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r3, #1 + add r4, r2, #0 + mov r2, #0x57 + add r6, r1, #0 + str r3, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r1, #4 + bl sub_020070E8 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + add r3, r2, #0 + bl sub_02019CB8 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02019448 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r1, #1 + mov r2, #0x57 + str r1, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r3, #2 + bl sub_020070E8 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0xa + mov r2, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #5 + add r3, r2, #0 + bl sub_02007130 + add r0, r6, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021D7670 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + mov r2, #0x57 + str r0, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r3, #2 + bl sub_0200710C +_021D7670: + mov r0, #0x43 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov19_021D7A9C + mov r0, #0x43 + lsl r0, r0, #4 + add r1, r6, #0 + add r0, r5, r0 + add r1, #0x40 + mov r2, #0 + mov r3, #1 + bl ov19_021D7B4C + ldr r0, _021D76E4 ; =0x000065A0 + add r0, r5, r0 + bl ov19_021DAADC + ldr r0, _021D76E8 ; =0x000065F4 + add r0, r5, r0 + bl ov19_021DB3C4 + ldr r0, _021D76EC ; =0x0000662C + add r0, r5, r0 + bl ov19_021DBA9C + ldr r0, _021D76F0 ; =0x0000B3A4 + add r1, r4, #0 + ldr r0, [r5, r0] + bl ov19_021DD114 + ldr r0, _021D76F4 ; =0x0000B3AC + add r1, r4, #0 + ldr r0, [r5, r0] + bl ov19_021DECE8 + add r0, r6, #0 + bl ov19_021D5E10 + cmp r0, #1 + bne _021D76CA + ldr r0, _021D76F8 ; =0x0000B22C + add r0, r5, r0 + bl ov19_021DC6A0 +_021D76CA: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + bl sub_020BDDF8 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D76E4: .word 0x000065A0 +_021D76E8: .word 0x000065F4 +_021D76EC: .word 0x0000662C +_021D76F0: .word 0x0000B3A4 +_021D76F4: .word 0x0000B3AC +_021D76F8: .word 0x0000B22C + thumb_func_end ov19_021D75CC + + thumb_func_start ov19_021D76FC +ov19_021D76FC: ; 0x021D76FC + push {r3, lr} + bl sub_020B28CC + bl sub_020BFB4C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _021D7760 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r1, [r0] + ldr r2, _021D7764 ; =0xFFFFCFFD + and r1, r2 + strh r1, [r0] + ldrh r3, [r0] + add r1, r2, #2 + and r3, r1 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0] + ldr r1, _021D7768 ; =0x0000CFFB + and r1, r3 + strh r1, [r0] + add r1, r2, #2 + ldrh r3, [r0] + lsr r2, r2, #0x11 + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _021D776C ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _021D7770 ; =0xBFFF0000 + str r0, [r1, #0x40] + pop {r3, pc} + ; .align 2, 0 +_021D7760: .word 0x04000008 +_021D7764: .word 0xFFFFCFFD +_021D7768: .word 0x0000CFFB +_021D776C: .word 0x04000540 +_021D7770: .word 0xBFFF0000 + thumb_func_end ov19_021D76FC + + thumb_func_start ov19_021D7774 +ov19_021D7774: ; 0x021D7774 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D7798 ; =0x00005DC0 + add r4, r2, #0 + add r0, r5, r0 + add r1, r4, #0 + bl ov19_021D8C1C + ldr r0, _021D779C ; =0x00006558 + add r1, r4, #0 + add r0, r5, r0 + bl ov19_021DA864 + ldr r0, _021D77A0 ; =0x0000B3A8 + ldr r0, [r5, r0] + bl ov19_021DE584 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D7798: .word 0x00005DC0 +_021D779C: .word 0x00006558 +_021D77A0: .word 0x0000B3A8 + thumb_func_end ov19_021D7774 + + thumb_func_start ov19_021D77A4 +ov19_021D77A4: ; 0x021D77A4 + cmp r1, r0 + bls _021D77B2 + mov r2, #0x12 + sub r3, r1, r0 + sub r1, r2, r1 + add r0, r0, r1 + b _021D77BA +_021D77B2: + mov r2, #0x12 + sub r2, r2, r0 + add r3, r1, r2 + sub r0, r0, r1 +_021D77BA: + cmp r3, r0 + blt _021D77C4 + mov r0, #0 + mvn r0, r0 + bx lr +_021D77C4: + mov r0, #1 + bx lr + thumb_func_end ov19_021D77A4 + + thumb_func_start ov19_021D77C8 +ov19_021D77C8: ; 0x021D77C8 + ldr r3, _021D77CC ; =sub_0200DA04 + bx r3 + ; .align 2, 0 +_021D77CC: .word sub_0200DA04 + thumb_func_end ov19_021D77C8 + + thumb_func_start ov19_021D77D0 +ov19_021D77D0: ; 0x021D77D0 + mov r1, #0x51 + lsl r1, r1, #2 + add r0, r0, r1 + bx lr + thumb_func_end ov19_021D77D0 + + thumb_func_start ov19_021D77D8 +ov19_021D77D8: ; 0x021D77D8 + mov r1, #0x59 + lsl r1, r1, #2 + add r0, r0, r1 + bx lr + thumb_func_end ov19_021D77D8 + + thumb_func_start ov19_021D77E0 +ov19_021D77E0: ; 0x021D77E0 + mov r1, #0x43 + lsl r1, r1, #4 + add r0, r0, r1 + bx lr + thumb_func_end ov19_021D77E0 + + thumb_func_start ov19_021D77E8 +ov19_021D77E8: ; 0x021D77E8 + ldr r1, _021D77F0 ; =0x0000B22C + add r0, r0, r1 + bx lr + nop +_021D77F0: .word 0x0000B22C + thumb_func_end ov19_021D77E8 + + thumb_func_start ov19_021D77F4 +ov19_021D77F4: ; 0x021D77F4 + ldr r1, _021D77FC ; =0x00005DC0 + add r0, r0, r1 + bx lr + nop +_021D77FC: .word 0x00005DC0 + thumb_func_end ov19_021D77F4 + + thumb_func_start ov19_021D7800 +ov19_021D7800: ; 0x021D7800 + ldr r1, _021D7808 ; =0x0000B3A8 + ldr r0, [r0, r1] + bx lr + nop +_021D7808: .word 0x0000B3A8 + thumb_func_end ov19_021D7800 + + thumb_func_start ov19_021D780C +ov19_021D780C: ; 0x021D780C + ldr r1, _021D7814 ; =0x0000662C + add r0, r0, r1 + bx lr + nop +_021D7814: .word 0x0000662C + thumb_func_end ov19_021D780C + + thumb_func_start ov19_021D7818 +ov19_021D7818: ; 0x021D7818 + mov r1, #0x56 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov19_021D7818 + + thumb_func_start ov19_021D7820 +ov19_021D7820: ; 0x021D7820 + push {r3, lr} + mov r1, #0x16 + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl ov19_021D5E08 + cmp r0, #4 + beq _021D7834 + mov r0, #0 + pop {r3, pc} +_021D7834: + mov r0, #0x2b + mvn r0, r0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov19_021D7820 + + thumb_func_start ov19_021D783C +ov19_021D783C: ; 0x021D783C + str r1, [r0, #0] + str r2, [r0, #8] + ldr r1, [sp] + str r3, [r0, #0xc] + str r1, [r0, #0x10] + add r1, r0, #0 + ldr r2, [sp, #4] + add r1, #0x20 + strb r2, [r1] + mov r1, #0 + str r1, [r0, #4] + str r1, [r0, #0x14] + str r1, [r0, #0x18] + str r1, [r0, #0x1c] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D783C + + thumb_func_start ov19_021D785C +ov19_021D785C: ; 0x021D785C + push {r3, r4, r5, lr} + sub sp, #0x20 + str r0, [sp] + lsl r0, r2, #0xc + str r0, [sp, #8] + lsl r0, r3, #0xc + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x30] + str r1, [sp, #4] + str r0, [sp, #0x14] + ldr r0, [sp, #0x34] + str r0, [sp, #0x18] + mov r0, #0xa + str r0, [sp, #0x1c] + bl sub_020C3D98 + add r4, r0, #0 + add r0, sp, #0 + bl sub_02021B90 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020C3DAC + cmp r5, #0 + beq _021D78A6 + add r0, r5, #0 + mov r1, #1 + bl sub_02021CC8 + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 +_021D78A6: + add r0, r5, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021D785C + + thumb_func_start ov19_021D78AC +ov19_021D78AC: ; 0x021D78AC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020C3D98 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021F58 + add r0, r6, #0 + bl sub_020C3DAC + pop {r4, r5, r6, pc} + thumb_func_end ov19_021D78AC + + thumb_func_start ov19_021D78C8 +ov19_021D78C8: ; 0x021D78C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + lsl r1, r3, #0x1b + lsr r1, r1, #0x13 + mov ip, r1 + asr r1, r3, #5 + lsl r1, r1, #0x1b + lsr r1, r1, #0x13 + mov lr, r1 + asr r1, r3, #0xa + lsl r1, r1, #0x1b + lsr r1, r1, #0x13 + str r1, [sp, #4] + add r7, r0, #0 + str r2, [sp] + add r1, r2, #0 + sub r2, r2, #1 + ldr r0, [sp, #0x20] + str r2, [sp] + cmp r1, #0 + beq _021D795E +_021D78F4: + ldrh r1, [r7] + add r7, r7, #2 + lsl r2, r1, #0x1b + lsr r4, r2, #0x13 + asr r2, r1, #5 + asr r1, r1, #0xa + lsl r2, r2, #0x1b + lsl r1, r1, #0x1b + lsr r3, r2, #0x13 + lsr r2, r1, #0x13 + mov r1, ip + sub r5, r1, r4 + asr r1, r5, #3 + lsr r1, r1, #0x1c + add r1, r5, r1 + asr r1, r1, #4 + mul r1, r0 + add r5, r4, r1 + mov r1, lr + sub r1, r1, r3 + asr r4, r1, #3 + lsr r4, r4, #0x1c + add r4, r1, r4 + asr r1, r4, #4 + mul r1, r0 + add r3, r3, r1 + ldr r1, [sp, #4] + sub r1, r1, r2 + asr r4, r1, #3 + lsr r4, r4, #0x1c + add r4, r1, r4 + asr r1, r4, #4 + mul r1, r0 + add r4, r2, r1 + asr r2, r5, #8 + mov r1, #0x1f + and r1, r2 + asr r2, r3, #8 + asr r3, r4, #8 + lsl r3, r3, #0x1b + lsl r2, r2, #0x1b + lsr r3, r3, #0x11 + lsr r2, r2, #0x16 + orr r2, r3 + orr r1, r2 + strh r1, [r6] + ldr r1, [sp] + add r6, r6, #2 + add r2, r1, #0 + sub r2, r2, #1 + str r2, [sp] + cmp r1, #0 + bne _021D78F4 +_021D795E: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D78C8 + + thumb_func_start ov19_021D7964 +ov19_021D7964: ; 0x021D7964 + ldr r1, _021D796C ; =0x0000B3B0 + ldr r0, [r0, r1] + bx lr + nop +_021D796C: .word 0x0000B3B0 + thumb_func_end ov19_021D7964 + + thumb_func_start ov19_021D7970 +ov19_021D7970: ; 0x021D7970 + ldr r0, _021D7978 ; =0x021E05EC + mov r1, #0 + str r1, [r0, #0] + bx lr + ; .align 2, 0 +_021D7978: .word 0x021E05EC + thumb_func_end ov19_021D7970 + + thumb_func_start ov19_021D797C +ov19_021D797C: ; 0x021D797C + push {r4, r5, r6, lr} + ldr r6, _021D79B0 ; =0x021E05EC + ldr r0, [r6, #0] + cmp r0, #0 + beq _021D79AE + mov r4, #0 + cmp r0, #0 + bls _021D79A8 + ldr r5, _021D79B4 ; =0x021E05F0 +_021D798E: + ldr r0, [r5, #8] + bl sub_020181C4 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021D799E + ldr r0, [r5, #4] + blx r1 +_021D799E: + ldr r0, [r6, #0] + add r4, r4, #1 + add r5, #0xc + cmp r4, r0 + blo _021D798E +_021D79A8: + ldr r0, _021D79B0 ; =0x021E05EC + mov r1, #0 + str r1, [r0, #0] +_021D79AE: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D79B0: .word 0x021E05EC +_021D79B4: .word 0x021E05F0 + thumb_func_end ov19_021D797C + + thumb_func_start ov19_021D79B8 +ov19_021D79B8: ; 0x021D79B8 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _021D79E8 ; =0x021E05EC + add r4, r1, #0 + ldr r0, [r0, #0] + add r6, r2, #0 + cmp r0, #0x20 + blo _021D79CC + bl sub_02022974 +_021D79CC: + ldr r2, _021D79E8 ; =0x021E05EC + mov r1, #0xc + ldr r0, [r2, #0] + ldr r3, _021D79EC ; =0x021E05F8 + mul r1, r0 + str r5, [r3, r1] + ldr r3, _021D79F0 ; =0x021E05F0 + add r0, r0, #1 + str r4, [r3, r1] + ldr r3, _021D79F4 ; =0x021E05F4 + str r0, [r2, #0] + str r6, [r3, r1] + pop {r4, r5, r6, pc} + nop +_021D79E8: .word 0x021E05EC +_021D79EC: .word 0x021E05F8 +_021D79F0: .word 0x021E05F0 +_021D79F4: .word 0x021E05F4 + thumb_func_end ov19_021D79B8 + + .rodata + + + .global Unk_ov19_021DFE48 +Unk_ov19_021DFE48: ; 0x021DFE48 + .incbin "incbin/overlay19_rodata.bin", 0x58, 0x68 - 0x58 + + .global Unk_ov19_021DFE58 +Unk_ov19_021DFE58: ; 0x021DFE58 + .incbin "incbin/overlay19_rodata.bin", 0x68, 0x84 - 0x68 + + .global Unk_ov19_021DFE74 +Unk_ov19_021DFE74: ; 0x021DFE74 + .incbin "incbin/overlay19_rodata.bin", 0x84, 0xA0 - 0x84 + + .global Unk_ov19_021DFE90 +Unk_ov19_021DFE90: ; 0x021DFE90 + .incbin "incbin/overlay19_rodata.bin", 0xA0, 0xBC - 0xA0 + + .global Unk_ov19_021DFEAC +Unk_ov19_021DFEAC: ; 0x021DFEAC + .incbin "incbin/overlay19_rodata.bin", 0xBC, 0xD8 - 0xBC + + .global Unk_ov19_021DFEC8 +Unk_ov19_021DFEC8: ; 0x021DFEC8 + .incbin "incbin/overlay19_rodata.bin", 0xD8, 0xF4 - 0xD8 + + .global Unk_ov19_021DFEE4 +Unk_ov19_021DFEE4: ; 0x021DFEE4 + .incbin "incbin/overlay19_rodata.bin", 0xF4, 0x110 - 0xF4 + + .global Unk_ov19_021DFF00 +Unk_ov19_021DFF00: ; 0x021DFF00 + .incbin "incbin/overlay19_rodata.bin", 0x110, 0x12C - 0x110 + + .global Unk_ov19_021DFF1C +Unk_ov19_021DFF1C: ; 0x021DFF1C + .incbin "incbin/overlay19_rodata.bin", 0x12C, 0x148 - 0x12C + + .global Unk_ov19_021DFF38 +Unk_ov19_021DFF38: ; 0x021DFF38 + .incbin "incbin/overlay19_rodata.bin", 0x148, 0x164 - 0x148 + + .global Unk_ov19_021DFF54 +Unk_ov19_021DFF54: ; 0x021DFF54 + .incbin "incbin/overlay19_rodata.bin", 0x164, 0x180 - 0x164 + + .global Unk_ov19_021DFF70 +Unk_ov19_021DFF70: ; 0x021DFF70 + .incbin "incbin/overlay19_rodata.bin", 0x180, 0x1A8 - 0x180 + + .global Unk_ov19_021DFF98 +Unk_ov19_021DFF98: ; 0x021DFF98 + .incbin "incbin/overlay19_rodata.bin", 0x1A8, 0x1A0 + + + .bss + + + .global Unk_ov19_021E05EC +Unk_ov19_021E05EC: ; 0x021E05EC + .space 0x4 + + .global Unk_ov19_021E05F0 +Unk_ov19_021E05F0: ; 0x021E05F0 + .space 0x180 + diff --git a/asm/ov19_021D79F8.s b/asm/ov19_021D79F8.s new file mode 100644 index 000000000..e87d75970 --- /dev/null +++ b/asm/ov19_021D79F8.s @@ -0,0 +1,2333 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021D79F8 +ov19_021D79F8: ; 0x021D79F8 + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r0, #0x40 + ldrb r0, [r0] + add r4, r1, #0 + add r7, r3, #0 + strb r0, [r5] + mov r0, #0xb + strb r0, [r5, #1] + mov r0, #0 + strb r0, [r5, #2] + add r0, r4, #0 + bl ov19_021D7820 + ldr r1, _021D7A68 ; =0x0000585C + str r0, [r5, r1] + ldr r2, [r5, r1] + add r0, r1, #0 + add r2, #0x48 + sub r0, #8 + str r2, [r5, r0] + mov r0, #0x11 + ldr r2, [r5, r1] + lsl r0, r0, #4 + add r2, r2, r0 + sub r0, r1, #4 + str r2, [r5, r0] + add r0, r4, #0 + bl ov19_021D77D8 + ldr r1, _021D7A6C ; =0x00005980 + mov r2, #0x1e + str r0, [r5, r1] + ldr r0, [r5, r1] + add r1, r5, #0 + add r1, #0xa8 + bl ov19_021DA3CC + ldr r0, _021D7A6C ; =0x00005980 + mov r1, #0x1b + lsl r1, r1, #6 + ldr r0, [r5, r0] + add r1, r5, r1 + mov r2, #0x1e + bl ov19_021DA3CC + ldr r1, _021D7A70 ; =0x00005984 + str r7, [r5, r1] + add r0, r1, #4 + str r6, [r5, r0] + add r1, #8 + str r4, [r5, r1] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7A68: .word 0x0000585C +_021D7A6C: .word 0x00005980 +_021D7A70: .word 0x00005984 + thumb_func_end ov19_021D79F8 + + thumb_func_start ov19_021D7A74 +ov19_021D7A74: ; 0x021D7A74 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D7A98 ; =0x00005980 + add r1, r4, #0 + ldr r0, [r4, r0] + add r1, #0xa8 + mov r2, #0x1e + bl ov19_021DA3F0 + ldr r0, _021D7A98 ; =0x00005980 + mov r1, #0x1b + lsl r1, r1, #6 + ldr r0, [r4, r0] + add r1, r4, r1 + mov r2, #0x1e + bl ov19_021DA3F0 + pop {r4, pc} + ; .align 2, 0 +_021D7A98: .word 0x00005980 + thumb_func_end ov19_021D7A74 + + thumb_func_start ov19_021D7A9C +ov19_021D7A9C: ; 0x021D7A9C + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _021D7AE8 ; =0x00005984 + mov r1, #3 + ldr r0, [r4, r0] + bl sub_020192EC + ldr r1, _021D7AEC ; =0x0000585C + str r0, [r4, #0xc] + ldr r1, [r4, r1] + mov r2, #0 + sub r1, r0, r1 + add r3, r1, #0 + ldr r0, _021D7AF0 ; =0x000001FF + mov r1, #3 + and r3, r0 + ldr r0, _021D7AE8 ; =0x00005984 + str r3, [r4, #0xc] + ldr r0, [r4, r0] + bl sub_02019184 + mov r3, #0 + str r3, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x20 + str r0, [sp, #8] + mov r0, #9 + str r0, [sp, #0xc] + ldr r0, _021D7AE8 ; =0x00005984 + mov r1, #3 + ldr r0, [r4, r0] + mov r2, #0x18 + bl sub_02019CB8 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_021D7AE8: .word 0x00005984 +_021D7AEC: .word 0x0000585C +_021D7AF0: .word 0x000001FF + thumb_func_end ov19_021D7A9C + + thumb_func_start ov19_021D7AF4 +ov19_021D7AF4: ; 0x021D7AF4 + push {r4, r5, r6, r7} + ldr r5, [sp, #0x10] + cmp r1, #0 + beq _021D7B2A + ldrb r6, [r0, #2] + mov r4, #1 + add r7, r6, #0 + mov r6, #0x69 + eor r7, r4 + lsl r6, r6, #2 + mul r6, r7 + str r6, [r2, #0] + mov r2, #0x17 + mul r2, r1 + ldrb r6, [r0, #1] + mov r1, #0x3f + add r2, r6, r2 + and r1, r2 + str r1, [r3, #0] + ldrb r0, [r0, #2] + eor r0, r4 + lsl r1, r0, #1 + ldr r0, _021D7B48 ; =0x021E0138 + ldrh r0, [r0, r1] + str r0, [r5, #0] + pop {r4, r5, r6, r7} + bx lr +_021D7B2A: + ldrb r4, [r0, #2] + mov r1, #0x69 + lsl r1, r1, #2 + mul r1, r4 + str r1, [r2, #0] + ldrb r1, [r0, #1] + str r1, [r3, #0] + ldrb r0, [r0, #2] + lsl r1, r0, #1 + ldr r0, _021D7B48 ; =0x021E0138 + ldrh r0, [r0, r1] + str r0, [r5, #0] + pop {r4, r5, r6, r7} + bx lr + nop +_021D7B48: .word 0x021E0138 + thumb_func_end ov19_021D7AF4 + + thumb_func_start ov19_021D7B4C +ov19_021D7B4C: ; 0x021D7B4C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + add r6, r2, #0 + add r1, sp, #8 + add r7, r3, #0 + str r1, [sp] + add r1, r6, #0 + add r2, sp, #0x10 + add r3, sp, #0xc + add r5, r0, #0 + bl ov19_021D7AF4 + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r3, r7, #0 + bl ov19_021D7BC0 + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021D7C58 + ldr r0, [sp, #8] + add r1, r4, #0 + str r0, [sp] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + add r0, r5, #0 + bl ov19_021D7D00 + cmp r7, #0 + beq _021D7BB4 + cmp r6, #0 + bne _021D7BB4 + ldrb r3, [r5, #2] + mov r0, #0xb8 + mul r0, r6 + str r0, [sp] + ldr r0, _021D7BB8 ; =0x00000618 + add r1, r5, #0 + add r1, #0xa8 + mul r0, r3 + add r0, r1, r0 + str r0, [sp, #4] + ldr r1, _021D7BBC ; =0x00005980 + ldrb r2, [r4] + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov19_021D85C4 +_021D7BB4: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7BB8: .word 0x00000618 +_021D7BBC: .word 0x00005980 + thumb_func_end ov19_021D7B4C + + thumb_func_start ov19_021D7BC0 +ov19_021D7BC0: ; 0x021D7BC0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + ldrb r2, [r1, #1] + add r7, r0, #0 + add r5, r3, #0 + lsl r1, r2, #1 + add r2, r2, r1 + ldr r1, _021D7C4C ; =0x021E017A + mov r0, #0x12 + ldrb r1, [r1, r2] + add r2, sp, #8 + mov r3, #0xa + bl sub_02006F88 + str r0, [sp, #4] + cmp r0, #0 + beq _021D7C48 + cmp r5, #0 + beq _021D7BFE + ldr r0, [sp, #8] + mov r1, #0x20 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [sp, #8] + lsl r1, r4, #5 + ldr r0, [r0, #0xc] + mov r2, #0x20 + bl sub_020C00B4 +_021D7BFE: + ldr r0, _021D7C50 ; =0x00005860 + mov r6, #0 + add r4, r6, #0 + add r5, r7, r0 +_021D7C06: + str r4, [sp] + ldr r0, [sp, #8] + ldr r3, _021D7C54 ; =0x00007FFF + ldr r0, [r0, #0xc] + add r1, r5, #0 + mov r2, #0x10 + bl ov19_021D78C8 + add r6, r6, #1 + add r4, r4, #2 + add r5, #0x20 + cmp r6, #8 + blt _021D7C06 + mov r2, #0x10 + str r2, [sp] + ldr r1, _021D7C50 ; =0x00005860 + ldr r0, [sp, #8] + add r3, r7, r1 + lsl r1, r6, #5 + add r1, r3, r1 + ldr r0, [r0, #0xc] + ldr r3, _021D7C54 ; =0x00007FFF + bl ov19_021D78C8 + ldr r0, _021D7C50 ; =0x00005860 + mov r1, #0x12 + add r0, r7, r0 + lsl r1, r1, #4 + bl sub_020C2C54 + ldr r0, [sp, #4] + bl sub_020181C4 +_021D7C48: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7C4C: .word 0x021E017A +_021D7C50: .word 0x00005860 +_021D7C54: .word 0x00007FFF + thumb_func_end ov19_021D7BC0 + + thumb_func_start ov19_021D7C58 +ov19_021D7C58: ; 0x021D7C58 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r2, #0 + mov r2, #1 + add r5, r1, #0 + str r2, [sp] + ldrb r3, [r5, #1] + add r6, r0, #0 + mov r0, #0x12 + lsl r1, r3, #1 + add r3, r3, r1 + ldr r1, _021D7CF4 ; =0x021E0179 + ldrb r1, [r1, r3] + mov r3, #0xa + bl sub_02006FE8 + str r0, [sp, #0x10] + cmp r0, #0 + beq _021D7CF0 + add r1, sp, #0x14 + bl sub_020A7164 + cmp r0, #0 + beq _021D7CEA + mov r0, #0xa + mov r1, #1 + bl sub_0201A778 + add r4, r0, #0 + beq _021D7CD8 + ldr r0, _021D7CF8 ; =0x00005984 + ldr r0, [r6, r0] + str r0, [r4, #0] + mov r0, #0x15 + strb r0, [r4, #7] + mov r0, #4 + strb r0, [r4, #8] + ldr r0, [sp, #0x14] + ldr r0, [r0, #0x14] + str r0, [r4, #0xc] + mov r0, #0 + ldr r1, [r5, #4] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #0xd + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D7CFC ; =0x00020100 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r5, #4] + lsr r5, r3, #1 + mov r3, #0x54 + add r0, r4, #0 + sub r3, r3, r5 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020181C4 +_021D7CD8: + ldr r3, [sp, #0x14] + ldr r0, _021D7CF8 ; =0x00005984 + str r7, [sp] + ldr r2, [r3, #0x14] + ldr r0, [r6, r0] + ldr r3, [r3, #0x10] + mov r1, #3 + bl sub_0201958C +_021D7CEA: + ldr r0, [sp, #0x10] + bl sub_020181C4 +_021D7CF0: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7CF4: .word 0x021E0179 +_021D7CF8: .word 0x00005984 +_021D7CFC: .word 0x00020100 + thumb_func_end ov19_021D7C58 + + thumb_func_start ov19_021D7D00 +ov19_021D7D00: ; 0x021D7D00 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + mov r2, #1 + str r2, [sp] + add r6, r3, #0 + ldrb r3, [r1, #1] + add r5, r0, #0 + mov r0, #0x12 + lsl r1, r3, #1 + add r3, r3, r1 + ldr r1, _021D7D68 ; =0x021E0178 + ldrb r1, [r1, r3] + mov r3, #0xa + bl sub_02006FE8 + str r0, [sp, #4] + cmp r0, #0 + beq _021D7D64 + add r1, sp, #8 + bl sub_020A7248 + ldr r0, _021D7D6C ; =0x00005984 + mov r1, #3 + ldr r0, [r5, r0] + bl sub_02019FE4 + add r7, r0, #0 + beq _021D7D4A + ldr r1, [sp, #0x20] + add r2, r4, #0 + str r1, [sp] + ldr r1, [sp, #8] + add r3, r6, #0 + add r1, #0xc + bl ov19_021D8764 +_021D7D4A: + ldr r0, [sp, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [sp] + ldr r0, _021D7D6C ; =0x00005984 + mov r3, #1 + ldr r0, [r5, r0] + mov r1, #3 + add r2, r7, #0 + lsl r3, r3, #0xc + bl sub_02019460 +_021D7D64: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7D68: .word 0x021E0178 +_021D7D6C: .word 0x00005984 + thumb_func_end ov19_021D7D00 + + thumb_func_start ov19_021D7D70 +ov19_021D7D70: ; 0x021D7D70 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021D7E0C ; =0x00005984 + add r4, r1, #0 + ldr r0, [r5, r0] + mov r1, #3 + add r6, r2, #0 + bl sub_020192EC + lsl r0, r0, #0x17 + lsr r1, r0, #0xb + mov r0, #0xb8 + add r7, r6, #0 + mul r7, r0 + lsl r0, r7, #0xc + str r1, [r5, #8] + add r1, r1, r0 + str r1, [r5, #0x14] + ldr r0, [r5, #8] + sub r0, r1, r0 + mov r1, #0x1e + bl sub_020E1F6C + str r0, [r5, #0x10] + ldr r0, [r5, #0x14] + asr r1, r0, #0xc + ldr r0, _021D7E10 ; =0x000001FF + and r0, r1 + str r0, [r5, #0x14] + mov r0, #0x1e + str r0, [r5, #4] + ldrb r0, [r5, #2] + strb r0, [r5, #3] + mov r0, #0x17 + ldrb r1, [r5, #1] + mul r0, r6 + add r0, r1, r0 + strb r0, [r5, #1] + ldrb r1, [r5, #1] + mov r0, #0x3f + and r0, r1 + strb r0, [r5, #1] + ldrb r1, [r5, #2] + mov r0, #1 + eor r0, r1 + strb r0, [r5, #2] + ldrb r1, [r4] + add r0, r5, #0 + bl ov19_021D813C + ldr r1, [r5, #0x10] + add r0, r5, #0 + add r2, r7, #0 + bl ov19_021D7F14 + ldrb r0, [r4] + mov r1, #1 + mov r2, #0 + str r0, [r5, #0x30] + ldrb r0, [r5, #2] + str r0, [r5, #0x34] + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x9c + str r2, [r0, #0] + ldr r0, _021D7E14 ; =ov19_021D7E24 + add r1, r5, #0 + bl sub_0200D9E8 + ldr r0, _021D7E18 ; =ov19_021D7E6C + add r1, r5, #0 + mov r2, #1 + bl ov19_021D77C8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D7E0C: .word 0x00005984 +_021D7E10: .word 0x000001FF +_021D7E14: .word ov19_021D7E24 +_021D7E18: .word ov19_021D7E6C + thumb_func_end ov19_021D7D70 + + thumb_func_start ov19_021D7E1C +ov19_021D7E1C: ; 0x021D7E1C + add r0, #0x9c + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021D7E1C + + thumb_func_start ov19_021D7E24 +ov19_021D7E24: ; 0x021D7E24 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021D7E4A + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #2 + bne _021D7E64 + ldr r1, [r4, #0x10] + add r0, r4, #0 + bl ov19_021D7F9C + mov r0, #0 + add r4, #0x98 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D7E4A: + ldr r0, [r4, #0x14] + str r0, [r4, #0xc] + ldr r0, _021D7E68 ; =0x00005988 + ldr r0, [r4, r0] + bl ov19_021D5E68 + strb r0, [r4] + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #1 + add r4, #0x9c + str r0, [r4, #0] +_021D7E64: + pop {r3, r4, r5, pc} + nop +_021D7E68: .word 0x00005988 + thumb_func_end ov19_021D7E24 + + thumb_func_start ov19_021D7E6C +ov19_021D7E6C: ; 0x021D7E6C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldrb r3, [r5, #3] + add r6, r0, #0 + mov r0, #1 + add r4, r3, #0 + eor r4, r0 + ldr r0, [r5, #4] + cmp r0, #0 + beq _021D7EE4 + add r0, r5, #0 + add r0, #0x98 + ldr r2, [r0, #0] + cmp r2, #2 + bhs _021D7F06 + ldr r6, _021D7F08 ; =0x00000618 + add r1, #0xa8 + mul r6, r3 + add r0, r5, #0 + add r1, r1, r6 + bl ov19_021D865C + ldr r1, _021D7F08 ; =0x00000618 + add r2, r5, #0 + add r2, #0xa8 + mul r1, r4 + add r1, r2, r1 + add r2, r5, #0 + add r2, #0x98 + ldr r2, [r2, #0] + add r0, r5, #0 + bl ov19_021D86B4 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r2, #0 + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + ldr r0, [r5, #8] + asr r1, r0, #0xc + ldr r0, _021D7F0C ; =0x000001FF + and r0, r1 + str r0, [r5, #0xc] + ldr r1, [r5, #8] + ldr r0, [r5, #0x10] + add r0, r1, r0 + str r0, [r5, #8] + ldr r0, _021D7F10 ; =0x00005984 + ldr r3, [r5, #0xc] + ldr r0, [r5, r0] + mov r1, #3 + bl sub_02019184 + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] + pop {r4, r5, r6, pc} +_021D7EE4: + ldr r0, _021D7F10 ; =0x00005984 + ldr r3, [r5, #0x14] + ldr r0, [r5, r0] + mov r1, #3 + mov r2, #0 + bl sub_02019184 + ldr r1, _021D7F08 ; =0x00000618 + add r0, r5, #0 + add r5, #0xa8 + mul r1, r4 + add r1, r5, r1 + bl ov19_021D870C + add r0, r6, #0 + bl sub_0200DA58 +_021D7F06: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D7F08: .word 0x00000618 +_021D7F0C: .word 0x000001FF +_021D7F10: .word 0x00005984 + thumb_func_end ov19_021D7E6C + + thumb_func_start ov19_021D7F14 +ov19_021D7F14: ; 0x021D7F14 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r7, #0 + str r0, [sp, #8] + add r0, #0xa8 + str r1, [sp] + str r2, [sp, #4] + add r6, r7, #0 + add r4, r5, #0 + str r0, [sp, #8] +_021D7F2A: + ldr r0, _021D7F8C ; =0x0000585C + ldr r0, [r5, r0] + add r0, #0x70 + add r0, r0, r6 + lsl r1, r0, #0xc + ldr r0, [sp] + str r1, [r4, #0x68] + sub r1, r1, r0 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + ldr r0, _021D7F8C ; =0x0000585C + ldr r0, [r5, r0] + add r0, #0x70 + add r1, r0, r6 + ldr r0, [sp, #4] + add r0, r0, r1 + lsl r1, r0, #0xc + ldr r0, [sp] + str r1, [r4, #0x38] + sub r0, r1, r0 + str r0, [r4, #0x50] + asr r2, r0, #0xc + ldr r0, _021D7F90 ; =0x00005854 + ldr r0, [r5, r0] + cmp r2, r0 + ble _021D7F7E + ldr r0, _021D7F94 ; =0x00005858 + ldr r0, [r5, r0] + cmp r2, r0 + bge _021D7F7E + ldrb r3, [r5, #3] + mov r1, #1 + add r0, r5, #0 + eor r1, r3 + ldr r3, _021D7F98 ; =0x00000618 + mul r3, r1 + ldr r1, [sp, #8] + add r1, r1, r3 + add r3, r7, #0 + bl ov19_021D803C +_021D7F7E: + add r7, r7, #1 + add r6, #0x18 + add r4, r4, #4 + cmp r7, #6 + blt _021D7F2A + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7F8C: .word 0x0000585C +_021D7F90: .word 0x00005854 +_021D7F94: .word 0x00005858 +_021D7F98: .word 0x00000618 + thumb_func_end ov19_021D7F14 + + thumb_func_start ov19_021D7F9C +ov19_021D7F9C: ; 0x021D7F9C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r6, r1, #0 + ldrb r1, [r5, #3] + str r0, [sp] + add r0, #0xa8 + str r0, [sp] + ldr r0, _021D8030 ; =0x00000618 + add r2, r1, #0 + mul r2, r0 + str r2, [sp, #4] + mov r2, #1 + eor r1, r2 + mul r0, r1 + mov r7, #0 + add r4, r5, #0 + str r0, [sp, #8] +_021D7FC0: + add r0, r4, #0 + add r0, #0x80 + ldr r1, _021D8034 ; =0x00005854 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + asr r0, r0, #0xc + cmp r0, r1 + ble _021D7FD8 + ldr r1, _021D8038 ; =0x00005858 + ldr r1, [r5, r1] + cmp r0, r1 + blt _021D7FE6 +_021D7FD8: + ldr r2, [sp] + ldr r1, [sp, #4] + add r0, r5, #0 + add r1, r2, r1 + add r2, r7, #0 + bl ov19_021D8114 +_021D7FE6: + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + sub r0, r0, r6 + str r0, [r4, #0x68] + sub r1, r0, r6 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + ldr r0, [r4, #0x50] + sub r0, r0, r6 + str r0, [r4, #0x38] + sub r0, r0, r6 + str r0, [r4, #0x50] + asr r2, r0, #0xc + ldr r0, _021D8034 ; =0x00005854 + ldr r0, [r5, r0] + cmp r2, r0 + ble _021D8022 + ldr r0, _021D8038 ; =0x00005858 + ldr r0, [r5, r0] + cmp r2, r0 + bge _021D8022 + ldr r3, [sp] + ldr r1, [sp, #8] + add r0, r5, #0 + add r1, r3, r1 + add r3, r7, #0 + bl ov19_021D803C +_021D8022: + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #6 + blt _021D7FC0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021D8030: .word 0x00000618 +_021D8034: .word 0x00005854 +_021D8038: .word 0x00005858 + thumb_func_end ov19_021D7F9C + + thumb_func_start ov19_021D803C +ov19_021D803C: ; 0x021D803C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r1, #0 + ldr r1, _021D8100 ; =0x00005988 + str r0, [sp, #0x1c] + ldr r0, [r0, r1] + str r2, [sp, #0x20] + add r4, r3, #0 + bl ov19_021D5E90 + str r0, [sp, #0x30] + ldr r0, [sp, #0x1c] + mov r7, #0x28 + ldr r1, [r0, #0x34] + mov r0, #0x1e + add r2, r1, #0 + lsl r0, r0, #4 + mul r2, r0 + add r2, #0x58 + lsl r0, r4, #4 + add r0, r2, r0 + str r0, [sp, #0x28] + mov r0, #0x34 + mul r0, r4 + add r5, r5, r0 + mov r0, #0 + str r0, [sp, #0x2c] + ldr r1, _021D8104 ; =0x00000CD8 + ldr r0, [sp, #0x1c] + add r1, r0, r1 + lsl r0, r7, #4 + mul r0, r4 + add r0, r1, r0 + str r0, [sp, #0x24] + ldr r0, [sp, #0x1c] + lsl r1, r4, #1 + add r6, r0, r1 +_021D8086: + ldr r0, [r5, #0] + cmp r0, #0 + bne _021D80D6 + ldr r1, [sp, #0x1c] + ldr r0, [sp, #0x30] + ldr r1, [r1, #0x30] + add r2, r4, #0 + bl sub_02079C9C + mov r1, #0xac + mov r2, #0 + str r0, [sp, #0x34] + bl sub_02074570 + cmp r0, #0 + beq _021D80D6 + add r0, r4, #0 + bl ov19_021D85B4 + ldr r1, [sp, #0x24] + ldr r2, _021D8108 ; =0x00005814 + str r1, [sp] + ldr r1, [sp, #0x20] + ldr r3, _021D810C ; =0x000057D8 + str r1, [sp, #4] + str r7, [sp, #8] + mov r1, #2 + str r1, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x1c] + str r0, [sp, #0x14] + str r5, [sp, #0x18] + ldr r0, _021D8110 ; =0x00005980 + ldrh r2, [r6, r2] + ldr r0, [r1, r0] + ldrh r3, [r6, r3] + ldr r1, [sp, #0x34] + bl ov19_021DA548 +_021D80D6: + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x24] + add r0, #0x60 + str r0, [sp, #0x28] + mov r0, #0x4e + lsl r0, r0, #2 + add r5, r5, r0 + mov r0, #0xf + lsl r0, r0, #8 + add r0, r1, r0 + str r0, [sp, #0x24] + ldr r0, [sp, #0x2c] + add r6, #0xc + add r0, r0, #1 + add r4, r4, #6 + add r7, #0x18 + str r0, [sp, #0x2c] + cmp r0, #5 + blt _021D8086 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D8100: .word 0x00005988 +_021D8104: .word 0x00000CD8 +_021D8108: .word 0x00005814 +_021D810C: .word 0x000057D8 +_021D8110: .word 0x00005980 + thumb_func_end ov19_021D803C + + thumb_func_start ov19_021D8114 +ov19_021D8114: ; 0x021D8114 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x34 + mov r4, #0 + mov r7, #0x4e + add r5, r1, #0 + mul r0, r2 + add r5, r5, r0 + add r6, r4, #0 + lsl r7, r7, #2 +_021D8126: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D8132 + bl sub_02021BD4 + str r6, [r5, #0] +_021D8132: + add r4, r4, #1 + add r5, r5, r7 + cmp r4, #5 + blt _021D8126 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021D8114 + + thumb_func_start ov19_021D813C +ov19_021D813C: ; 0x021D813C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r1, [sp, #4] + ldr r1, _021D81A4 ; =0x00005988 + str r0, [sp] + ldr r0, [r0, r1] + bl ov19_021D5E90 + ldr r4, [sp] + str r0, [sp, #8] + ldr r1, _021D81A8 ; =0x00000CD8 + add r0, r4, #0 + mov r6, #0 + add r5, r0, r1 +_021D8158: + ldr r0, [sp, #8] + ldr r1, [sp, #4] + add r2, r6, #0 + bl sub_02079C9C + mov r1, #5 + mov r2, #0 + add r7, r0, #0 + bl sub_02074570 + cmp r0, #0 + beq _021D8192 + ldr r1, _021D81AC ; =0x00005814 + strh r0, [r4, r1] + add r0, r7, #0 + bl sub_02079D40 + ldr r1, _021D81B0 ; =0x000057D8 + mov r3, #0xa + strh r0, [r4, r1] + ldr r2, _021D81B0 ; =0x000057D8 + ldr r1, [sp] + ldr r0, _021D81B4 ; =0x00005980 + ldrh r2, [r4, r2] + ldr r0, [r1, r0] + add r1, r5, #0 + lsl r3, r3, #6 + bl ov19_021DA744 +_021D8192: + mov r0, #0xa + lsl r0, r0, #6 + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, r0 + cmp r6, #0x1e + blo _021D8158 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D81A4: .word 0x00005988 +_021D81A8: .word 0x00000CD8 +_021D81AC: .word 0x00005814 +_021D81B0: .word 0x000057D8 +_021D81B4: .word 0x00005980 + thumb_func_end ov19_021D813C + + thumb_func_start ov19_021D81B8 +ov19_021D81B8: ; 0x021D81B8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r1, #0 + add r0, #0xa3 + strb r1, [r0] + mov r0, #0xa + mov r1, #0x10 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _021D820A + str r5, [r4, #0] + strh r6, [r4, #4] + ldr r0, [sp] + strh r7, [r4, #6] + str r0, [r4, #0xc] + mov r0, #2 + strh r0, [r4, #0xa] + cmp r7, r6 + ble _021D81EA + mov r0, #1 + b _021D81EC +_021D81EA: + sub r0, r0, #3 +_021D81EC: + strh r0, [r4, #8] + ldr r0, _021D820C ; =ov19_021D8210 + add r1, r4, #0 + mov r2, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021D8204 + mov r0, #1 + add r5, #0xa3 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} +_021D8204: + add r0, r4, #0 + bl sub_020181C4 +_021D820A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D820C: .word ov19_021D8210 + thumb_func_end ov19_021D81B8 + + thumb_func_start ov19_021D8210 +ov19_021D8210: ; 0x021D8210 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0xa + ldrsh r0, [r4, r0] + cmp r0, #0 + beq _021D8224 + sub r0, r0, #1 + strh r0, [r4, #0xa] + pop {r3, r4, r5, pc} +_021D8224: + mov r2, #4 + mov r1, #6 + ldrsh r0, [r4, r2] + ldrsh r1, [r4, r1] + cmp r0, r1 + beq _021D8252 + mov r1, #8 + ldrsh r1, [r4, r1] + add r0, r0, r1 + strh r0, [r4, #4] + ldr r1, [r4, #0] + ldr r0, _021D8264 ; =0x00005860 + add r1, r1, r0 + ldrsh r0, [r4, r2] + mov r2, #0x20 + lsl r0, r0, #5 + add r0, r1, r0 + ldr r1, [r4, #0xc] + bl sub_020C00B4 + mov r0, #2 + strh r0, [r4, #0xa] + pop {r3, r4, r5, pc} +_021D8252: + ldr r1, _021D8268 ; =ov19_021D826C + ldr r2, [r4, #0] + add r0, r4, #0 + bl ov19_021D79B8 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D8264: .word 0x00005860 +_021D8268: .word ov19_021D826C + thumb_func_end ov19_021D8210 + + thumb_func_start ov19_021D826C +ov19_021D826C: ; 0x021D826C + mov r1, #0 + add r0, #0xa3 + strb r1, [r0] + bx lr + thumb_func_end ov19_021D826C + + thumb_func_start ov19_021D8274 +ov19_021D8274: ; 0x021D8274 + push {r3, r4, lr} + sub sp, #4 + ldr r3, _021D8300 ; =0x021E0770 + add r4, r1, #0 + ldr r1, [r3, #0xc] + cmp r1, #0 + beq _021D828E + cmp r1, #1 + beq _021D82C4 + cmp r1, #2 + beq _021D82F0 + add sp, #4 + pop {r3, r4, pc} +_021D828E: + ldr r0, _021D8304 ; =0x021E0774 + ldr r2, _021D8308 ; =0x021E0778 + str r0, [sp] + ldr r3, _021D830C ; =0x021E0770 + add r0, r4, #0 + mov r1, #0 + bl ov19_021D7AF4 + ldr r0, _021D8310 ; =0x00005988 + ldr r0, [r4, r0] + bl ov19_021D5E8C + ldr r2, _021D8300 ; =0x021E0770 + add r1, r0, #0 + ldr r0, _021D8314 ; =0x021E05C0 + ldr r2, [r2, #4] + str r1, [r0, #0] + add r0, r4, #0 + mov r3, #0 + bl ov19_021D7BC0 + ldr r0, _021D8300 ; =0x021E0770 + add sp, #4 + ldr r1, [r0, #0xc] + add r1, r1, #1 + str r1, [r0, #0xc] + pop {r3, r4, pc} +_021D82C4: + ldr r0, [r3, #4] + ldr r1, _021D8314 ; =0x021E05C0 + str r0, [sp] + ldr r2, [r3, #0] + ldr r1, [r1, #0] + ldr r3, [r3, #8] + add r0, r4, #0 + bl ov19_021D7D00 + ldr r1, _021D8314 ; =0x021E05C0 + ldr r2, _021D8300 ; =0x021E0770 + ldr r1, [r1, #0] + ldr r2, [r2, #8] + add r0, r4, #0 + bl ov19_021D7C58 + ldr r0, _021D8300 ; =0x021E0770 + add sp, #4 + ldr r1, [r0, #0xc] + add r1, r1, #1 + str r1, [r0, #0xc] + pop {r3, r4, pc} +_021D82F0: + mov r1, #0 + add r4, #0xa3 + strb r1, [r4] + str r1, [r3, #0xc] + bl sub_0200DA58 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_021D8300: .word 0x021E0770 +_021D8304: .word 0x021E0774 +_021D8308: .word 0x021E0778 +_021D830C: .word 0x021E0770 +_021D8310: .word 0x00005988 +_021D8314: .word 0x021E05C0 + thumb_func_end ov19_021D8274 + + thumb_func_start ov19_021D8318 +ov19_021D8318: ; 0x021D8318 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D8348 ; =ov19_021D8274 + add r1, r4, #0 + mov r2, #0 + bl sub_0200DA3C + cmp r0, #0 + beq _021D832E + mov r1, #1 + b _021D8330 +_021D832E: + mov r1, #0 +_021D8330: + add r0, r4, #0 + add r0, #0xa3 + add r4, #0xa3 + strb r1, [r0] + ldrb r0, [r4] + cmp r0, #0 + beq _021D8344 + ldr r0, _021D834C ; =0x021E0770 + mov r1, #0 + str r1, [r0, #0xc] +_021D8344: + pop {r4, pc} + nop +_021D8348: .word ov19_021D8274 +_021D834C: .word 0x021E0770 + thumb_func_end ov19_021D8318 + + thumb_func_start ov19_021D8350 +ov19_021D8350: ; 0x021D8350 + push {r4, lr} + add r2, r0, #0 + mov r1, #0 + add r2, #0xa2 + strb r1, [r2] + ldrb r3, [r0, #2] + mov r2, #8 + lsl r4, r3, #1 + ldr r3, _021D836C ; =0x021E0138 + ldrh r3, [r3, r4] + lsl r3, r3, #5 + bl ov19_021D81B8 + pop {r4, pc} + ; .align 2, 0 +_021D836C: .word 0x021E0138 + thumb_func_end ov19_021D8350 + + thumb_func_start ov19_021D8370 +ov19_021D8370: ; 0x021D8370 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0xa2 + ldrb r1, [r1] + cmp r1, #4 + bhi _021D83FE + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D838A: ; jump table + .short _021D8394 - _021D838A - 2 ; case 0 + .short _021D83AA - _021D838A - 2 ; case 1 + .short _021D83BC - _021D838A - 2 ; case 2 + .short _021D83D2 - _021D838A - 2 ; case 3 + .short _021D83F2 - _021D838A - 2 ; case 4 +_021D8394: + add r0, #0xa3 + ldrb r0, [r0] + cmp r0, #0 + bne _021D83FE + add r0, r4, #0 + add r0, #0xa2 + ldrb r0, [r0] + add r4, #0xa2 + add r0, r0, #1 + strb r0, [r4] + b _021D83FE +_021D83AA: + bl ov19_021D8318 + add r0, r4, #0 + add r0, #0xa2 + ldrb r0, [r0] + add r4, #0xa2 + add r0, r0, #1 + strb r0, [r4] + b _021D83FE +_021D83BC: + add r0, #0xa3 + ldrb r0, [r0] + cmp r0, #0 + bne _021D83FE + add r0, r4, #0 + add r0, #0xa2 + ldrb r0, [r0] + add r4, #0xa2 + add r0, r0, #1 + strb r0, [r4] + b _021D83FE +_021D83D2: + ldrb r3, [r4, #2] + mov r1, #8 + mov r2, #0 + lsl r5, r3, #1 + ldr r3, _021D8404 ; =0x021E0138 + ldrh r3, [r3, r5] + lsl r3, r3, #5 + bl ov19_021D81B8 + add r0, r4, #0 + add r0, #0xa2 + ldrb r0, [r0] + add r4, #0xa2 + add r0, r0, #1 + strb r0, [r4] + b _021D83FE +_021D83F2: + add r4, #0xa3 + ldrb r0, [r4] + cmp r0, #0 + bne _021D83FE + mov r0, #1 + pop {r3, r4, r5, pc} +_021D83FE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D8404: .word 0x021E0138 + thumb_func_end ov19_021D8370 + + thumb_func_start ov19_021D8408 +ov19_021D8408: ; 0x021D8408 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r2, #0 + add r4, r1, #0 + mov r0, #0x34 + mul r4, r0 + add r0, r5, #0 + ldrb r2, [r5, #2] + ldr r1, _021D8454 ; =0x00000618 + add r0, #0xa8 + mul r1, r2 + add r0, r0, r1 + add r6, r3, #0 + add r0, r0, r4 + add r1, r6, #0 + mov r2, #1 + bl ov19_021DA418 + ldr r0, _021D8458 ; =0x00005980 + add r1, r6, #0 + ldr r0, [r5, r0] + add r2, r7, #0 + bl ov19_021DA754 + ldr r0, _021D8458 ; =0x00005980 + add r3, r5, #0 + ldrb r2, [r5, #2] + ldr r1, _021D8454 ; =0x00000618 + add r3, #0xa8 + mul r1, r2 + add r1, r3, r1 + ldr r0, [r5, r0] + add r1, r1, r4 + mov r2, #1 + bl ov19_021DA3CC + pop {r3, r4, r5, r6, r7, pc} + nop +_021D8454: .word 0x00000618 +_021D8458: .word 0x00005980 + thumb_func_end ov19_021D8408 + + thumb_func_start ov19_021D845C +ov19_021D845C: ; 0x021D845C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldrb r0, [r6, #2] + add r7, r1, #0 + add r3, r6, #0 + str r0, [sp] + ldr r1, _021D84C0 ; =0x00000618 + ldr r0, [sp] + add r3, #0xa8 + mul r1, r0 + mov r0, #0x34 + add r4, r7, #0 + mul r4, r0 + add r5, r3, r1 + add r0, r2, #0 + add r1, r5, r4 + mov r2, #1 + bl ov19_021DA418 + ldr r0, _021D84C4 ; =0x00005980 + add r1, r5, r4 + ldr r0, [r6, r0] + mov r2, #0 + bl ov19_021DA7F4 + mov r2, #0x1e + ldr r0, _021D84C4 ; =0x00005980 + ldr r3, [sp] + lsl r2, r2, #4 + mul r2, r3 + ldr r0, [r6, r0] + add r2, #0x58 + lsl r3, r7, #4 + add r1, r5, r4 + add r2, r2, r3 + bl ov19_021DA754 + add r0, r7, #0 + bl ov19_021D85B4 + add r1, r0, #0 + ldr r0, [r5, r4] + bl ov19_021D78AC + add r0, r6, #0 + add r1, r7, #0 + bl ov19_021D89F4 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D84C0: .word 0x00000618 +_021D84C4: .word 0x00005980 + thumb_func_end ov19_021D845C + + thumb_func_start ov19_021D84C8 +ov19_021D84C8: ; 0x021D84C8 + ldrb r2, [r0, #2] + add r3, r0, #0 + ldr r0, _021D84DC ; =0x00000618 + add r3, #0xa8 + mul r0, r2 + add r2, r3, r0 + mov r0, #0x34 + mul r0, r1 + add r0, r2, r0 + bx lr + ; .align 2, 0 +_021D84DC: .word 0x00000618 + thumb_func_end ov19_021D84C8 + + thumb_func_start ov19_021D84E0 +ov19_021D84E0: ; 0x021D84E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, _021D85A4 ; =0x00005988 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl sub_0207999C + mov r4, #0 + str r0, [sp, #0x1c] + add r0, r5, #0 + str r0, [sp, #0x28] + add r0, #0xa8 + add r7, r4, #0 + str r4, [sp, #0x2c] + str r0, [sp, #0x28] +_021D8500: + ldr r0, _021D85A4 ; =0x00005988 + ldr r1, [sp, #0x1c] + ldr r0, [r5, r0] + add r2, r4, #0 + ldr r0, [r0, #0] + bl sub_02079C9C + mov r1, #0xac + mov r2, #0 + str r0, [sp, #0x20] + bl sub_02074570 + cmp r0, #0 + beq _021D8592 + ldrb r1, [r5, #2] + ldr r0, _021D85A8 ; =0x00000618 + mul r0, r1 + str r0, [sp, #0x18] + add r0, r5, r0 + add r0, r7, r0 + str r1, [sp, #0x14] + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021D8592 + add r0, r4, #0 + bl ov19_021D85B4 + str r0, [sp, #0x24] + add r0, r4, #0 + mov r1, #6 + bl sub_020E1F6C + str r1, [sp, #0x10] + add r0, r4, #0 + mov r1, #6 + bl sub_020E1F6C + mov ip, r0 + mov r0, #2 + str r0, [sp] + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x10] + str r0, [sp, #4] + ldr r1, [sp, #0x14] + mov r0, #0x1e + add r2, r1, #0 + lsl r0, r0, #4 + mul r2, r0 + ldr r0, [sp, #0x2c] + add r2, #0x58 + add r0, r2, r0 + str r0, [sp, #8] + ldr r1, [sp, #0x28] + ldr r0, [sp, #0x18] + ldr r2, _021D85AC ; =0x0000585C + add r0, r1, r0 + add r0, r0, r7 + str r0, [sp, #0xc] + ldr r6, [r5, r2] + mov r2, #0x18 + ldr r0, _021D85B0 ; =0x00005980 + mul r2, r3 + add r6, #0x70 + add r2, r6, r2 + mov r6, ip + mov r3, #0x18 + mul r3, r6 + ldr r0, [r5, r0] + ldr r1, [sp, #0x20] + add r3, #0x28 + bl ov19_021DA428 +_021D8592: + ldr r0, [sp, #0x2c] + add r4, r4, #1 + add r0, #0x10 + add r7, #0x34 + str r0, [sp, #0x2c] + cmp r4, #0x1e + blt _021D8500 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D85A4: .word 0x00005988 +_021D85A8: .word 0x00000618 +_021D85AC: .word 0x0000585C +_021D85B0: .word 0x00005980 + thumb_func_end ov19_021D84E0 + + thumb_func_start ov19_021D85B4 +ov19_021D85B4: ; 0x021D85B4 + lsl r1, r0, #1 + ldr r0, _021D85C0 ; =0x021E013C + ldrh r0, [r0, r1] + add r0, #0xb + bx lr + nop +_021D85C0: .word 0x021E013C + thumb_func_end ov19_021D85B4 + + thumb_func_start ov19_021D85C4 +ov19_021D85C4: ; 0x021D85C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + str r0, [sp, #0x10] + mov r0, #0x1e + lsl r0, r0, #4 + add r6, r3, #0 + mul r6, r0 + mov r0, #0x28 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x48] + mov r4, #0 + ldr r7, [sp, #0x4c] + str r1, [sp, #0x14] + str r2, [sp, #0x18] + add r6, #0x58 + str r4, [sp, #0x24] + str r0, [sp, #0x20] +_021D85E6: + mov r0, #0 + str r0, [sp, #0x28] + add r5, r0, #0 +_021D85EC: + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [r0, #0x40] + add r2, r4, #0 + ldr r0, [r0, #0] + bl sub_02079C9C + mov r1, #5 + mov r2, #0 + str r0, [sp, #0x2c] + bl sub_02074570 + cmp r0, #0 + beq _021D8630 + add r0, r4, #0 + bl ov19_021D85B4 + mov r1, #2 + str r1, [sp] + str r0, [sp, #4] + str r6, [sp, #8] + ldr r3, [sp, #0x10] + ldr r2, _021D8658 ; =0x0000585C + str r7, [sp, #0xc] + ldr r2, [r3, r2] + ldr r0, [sp, #0x14] + add r2, #0x70 + add r3, r2, r5 + ldr r2, [sp, #0x20] + ldr r1, [sp, #0x2c] + add r2, r2, r3 + ldr r3, [sp, #0x1c] + bl ov19_021DA428 +_021D8630: + ldr r0, [sp, #0x28] + add r7, #0x34 + add r0, r0, #1 + add r4, r4, #1 + add r6, #0x10 + add r5, #0x18 + str r0, [sp, #0x28] + cmp r0, #6 + blo _021D85EC + ldr r0, [sp, #0x1c] + add r0, #0x18 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x24] + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, #5 + blo _021D85E6 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D8658: .word 0x0000585C + thumb_func_end ov19_021D85C4 + + thumb_func_start ov19_021D865C +ov19_021D865C: ; 0x021D865C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #0x18 + mul r0, r2 + add r5, r1, #0 + str r0, [sp, #8] +_021D866E: + ldr r1, [sp] + ldr r0, [sp, #8] + mov r7, #0 + add r4, r1, r0 +_021D8676: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D869A + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0xc + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + ldr r0, [r4, #0x68] + str r0, [sp, #0xc] + ldr r0, [r5, #0] + bl sub_02021C50 +_021D869A: + add r7, r7, #1 + add r5, #0x34 + add r4, r4, #4 + cmp r7, #6 + blt _021D8676 + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _021D866E + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D865C + + thumb_func_start ov19_021D86B4 +ov19_021D86B4: ; 0x021D86B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #0x18 + mul r0, r2 + add r5, r1, #0 + str r0, [sp, #8] +_021D86C6: + ldr r1, [sp] + ldr r0, [sp, #8] + mov r7, #0 + add r4, r1, r0 +_021D86CE: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D86F2 + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0xc + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + ldr r0, [r4, #0x38] + str r0, [sp, #0xc] + ldr r0, [r5, #0] + bl sub_02021C50 +_021D86F2: + add r7, r7, #1 + add r5, #0x34 + add r4, r4, #4 + cmp r7, #6 + blt _021D86CE + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _021D86C6 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021D86B4 + + thumb_func_start ov19_021D870C +ov19_021D870C: ; 0x021D870C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #0x10] + mov r0, #0x28 + add r5, r1, #0 + str r0, [sp] +_021D871E: + ldr r0, [sp] + mov r6, #0 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r4, r6, #0 +_021D8728: + ldr r0, _021D8760 ; =0x0000585C + ldr r0, [r7, r0] + add r0, #0x70 + add r0, r0, r4 + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D8740 + add r1, sp, #8 + bl sub_02021C50 +_021D8740: + add r6, r6, #1 + add r5, #0x34 + add r4, #0x18 + cmp r6, #6 + blt _021D8728 + ldr r0, [sp] + add r0, #0x18 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _021D871E + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021D8760: .word 0x0000585C + thumb_func_end ov19_021D870C + + thumb_func_start ov19_021D8764 +ov19_021D8764: ; 0x021D8764 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + add r0, r2, #0 + add r7, r3, #0 + str r1, [sp, #4] + str r2, [sp, #8] + cmp r0, #0x20 + blo _021D8780 + mov r1, #2 + ldr r0, [sp] + lsl r1, r1, #0xa + add r0, r0, r1 + str r0, [sp] +_021D8780: + mov r0, #0 + mov ip, r0 + ldr r0, [sp, #0x28] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + orr r0, r7 + mov lr, r0 +_021D878E: + ldr r0, [sp, #8] + mov r2, #0 + lsl r0, r0, #0x1b + lsr r1, r0, #0x1a + ldr r0, [sp] + add r4, r2, #0 + add r3, r0, r1 + mov r0, ip + lsl r1, r0, #1 + ldr r0, [sp, #4] + add r6, r0, r1 +_021D87A4: + lsl r0, r4, #1 + ldrh r1, [r6, r0] + mov r0, #3 + lsl r0, r0, #0xa + add r5, r1, #0 + and r5, r0 + ldr r0, _021D885C ; =0x000003FF + add r2, r2, #1 + and r0, r1 + add r0, r0, r7 + add r1, r5, #0 + orr r1, r0 + ldr r0, [sp, #0xc] + add r4, #0x15 + orr r0, r1 + strh r0, [r3] + add r3, #0x40 + cmp r2, #0x14 + blo _021D87A4 + mov r1, lr + lsl r1, r1, #0x10 + mov r0, #0 + lsr r1, r1, #0x10 +_021D87D2: + add r0, r0, #1 + strh r1, [r3] + add r3, #0x40 + cmp r0, #4 + blo _021D87D2 + ldr r0, [sp, #8] + add r1, r0, #1 + mov r0, #0x3f + and r0, r1 + str r0, [sp, #8] + bne _021D87F2 + mov r1, #2 + ldr r0, [sp] + lsl r1, r1, #0xa + sub r0, r0, r1 + str r0, [sp] +_021D87F2: + ldr r0, [sp, #8] + cmp r0, #0x20 + bne _021D8802 + mov r1, #2 + ldr r0, [sp] + lsl r1, r1, #0xa + add r0, r0, r1 + str r0, [sp] +_021D8802: + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #0x15 + blo _021D878E + mov r1, lr + mov r3, #2 + mov r0, #0 + lsl r1, r1, #0x10 + lsl r3, r3, #0xa + lsr r5, r1, #0x10 + add r7, r0, #0 + mov r4, #0x3f + add r2, r3, #0 +_021D881E: + ldr r1, [sp, #8] + lsl r1, r1, #0x1b + lsr r6, r1, #0x1a + ldr r1, [sp] + add r1, r1, r6 + add r6, r7, #0 +_021D882A: + add r6, r6, #1 + strh r5, [r1] + add r1, #0x40 + cmp r6, #0x18 + blo _021D882A + ldr r1, [sp, #8] + add r1, r1, #1 + and r1, r4 + str r1, [sp, #8] + bne _021D8844 + ldr r1, [sp] + sub r1, r1, r3 + str r1, [sp] +_021D8844: + ldr r1, [sp, #8] + cmp r1, #0x20 + bne _021D8850 + ldr r1, [sp] + add r1, r1, r2 + str r1, [sp] +_021D8850: + add r0, r0, #1 + cmp r0, #2 + blo _021D881E + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D885C: .word 0x000003FF + thumb_func_end ov19_021D8764 + + thumb_func_start ov19_021D8860 +ov19_021D8860: ; 0x021D8860 + push {r4, lr} + add r2, r0, #0 + add r0, #0xa0 + strh r1, [r0] + add r0, r2, #0 + mov r3, #0 + add r0, #0xa4 + strb r3, [r0] + ldr r0, _021D8890 ; =0x00005980 + add r4, r2, #0 + ldrb r3, [r2, #2] + ldr r0, [r2, r0] + ldr r2, _021D8894 ; =0x00000618 + add r4, #0xa8 + mul r2, r3 + add r3, r4, r2 + mov r2, #0x34 + mul r2, r1 + add r1, r3, r2 + mov r2, #1 + bl ov19_021DA7B8 + pop {r4, pc} + nop +_021D8890: .word 0x00005980 +_021D8894: .word 0x00000618 + thumb_func_end ov19_021D8860 + + thumb_func_start ov19_021D8898 +ov19_021D8898: ; 0x021D8898 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrb r1, [r5, #2] + ldr r0, _021D892C ; =0x00000618 + add r2, r5, #0 + add r2, #0xa8 + mul r0, r1 + add r4, r2, r0 + add r0, r5, #0 + add r0, #0xa0 + ldrh r1, [r0] + mov r0, #0x34 + add r6, r1, #0 + mul r6, r0 + add r0, r5, #0 + add r0, #0xa4 + ldrb r0, [r0] + cmp r0, #0 + beq _021D88C4 + cmp r0, #1 + beq _021D8916 + b _021D8928 +_021D88C4: + ldr r0, _021D8930 ; =0x00005980 + add r1, r4, r6 + ldr r0, [r5, r0] + bl ov19_021DA7E0 + cmp r0, #0 + beq _021D8928 + ldr r0, _021D8934 ; =0x0000598C + ldr r0, [r5, r0] + bl ov19_021D7964 + add r7, r0, #0 + bl ov19_021D3B18 + cmp r0, #0 + beq _021D8928 + add r0, r7, #0 + bl ov19_021D3B20 + cmp r0, #0 + ldr r0, _021D8930 ; =0x00005980 + beq _021D88FE + ldr r0, [r5, r0] + add r1, r4, r6 + mov r2, #1 + bl ov19_021DA3F0 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D88FE: + ldr r0, [r5, r0] + add r1, r4, r6 + mov r2, #2 + bl ov19_021DA7B8 + add r0, r5, #0 + add r0, #0xa4 + ldrb r0, [r0] + add r5, #0xa4 + add r0, r0, #1 + strb r0, [r5] + b _021D8928 +_021D8916: + ldr r0, _021D8930 ; =0x00005980 + add r1, r4, r6 + ldr r0, [r5, r0] + bl ov19_021DA7E0 + cmp r0, #0 + beq _021D8928 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D8928: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D892C: .word 0x00000618 +_021D8930: .word 0x00005980 +_021D8934: .word 0x0000598C + thumb_func_end ov19_021D8898 + + thumb_func_start ov19_021D8938 +ov19_021D8938: ; 0x021D8938 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021D897C ; =0x00005988 + ldr r0, [r5, r0] + bl ov19_021D5EC8 + mov r6, #0 + add r7, r5, #0 + str r0, [sp] + add r4, r6, #0 + add r7, #0xa8 +_021D894E: + ldrb r2, [r5, #2] + ldr r0, _021D8980 ; =0x00000618 + add r1, r2, #0 + mul r1, r0 + add r0, r5, r1 + add r0, r4, r0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D8970 + ldr r0, _021D8984 ; =0x00005980 + add r1, r7, r1 + ldr r0, [r5, r0] + ldr r2, [sp] + add r1, r1, r4 + bl ov19_021DA63C +_021D8970: + add r6, r6, #1 + add r4, #0x34 + cmp r6, #0x1e + blt _021D894E + pop {r3, r4, r5, r6, r7, pc} + nop +_021D897C: .word 0x00005988 +_021D8980: .word 0x00000618 +_021D8984: .word 0x00005980 + thumb_func_end ov19_021D8938 + + thumb_func_start ov19_021D8988 +ov19_021D8988: ; 0x021D8988 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x34 + mul r4, r0 + add r3, r5, #0 + ldrb r1, [r5, #2] + ldr r0, _021D89E8 ; =0x00000618 + add r3, #0xa8 + mul r0, r1 + add r1, r3, r0 + ldr r0, [r1, r4] + cmp r0, #0 + beq _021D89E6 + ldr r0, _021D89EC ; =0x00005980 + add r1, r1, r4 + ldr r0, [r5, r0] + bl ov19_021DA690 + ldr r0, _021D89F0 ; =0x00005988 + ldr r0, [r5, r0] + bl ov19_021D5EC8 + add r2, r0, #0 + ldr r0, _021D89EC ; =0x00005980 + add r1, r5, #0 + ldrb r6, [r5, #2] + ldr r3, _021D89E8 ; =0x00000618 + add r1, #0xa8 + mul r3, r6 + add r1, r1, r3 + ldr r0, [r5, r0] + add r1, r1, r4 + bl ov19_021DA63C + ldr r0, _021D89EC ; =0x00005980 + add r3, r5, #0 + ldrb r2, [r5, #2] + ldr r1, _021D89E8 ; =0x00000618 + add r3, #0xa8 + mul r1, r2 + add r1, r3, r1 + ldr r0, [r5, r0] + add r1, r1, r4 + mov r2, #1 + bl ov19_021DA694 +_021D89E6: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D89E8: .word 0x00000618 +_021D89EC: .word 0x00005980 +_021D89F0: .word 0x00005988 + thumb_func_end ov19_021D8988 + + thumb_func_start ov19_021D89F4 +ov19_021D89F4: ; 0x021D89F4 + push {r4, lr} + ldrb r3, [r0, #2] + ldr r2, _021D8A1C ; =0x00000618 + add r4, r0, #0 + add r4, #0xa8 + mul r2, r3 + add r3, r4, r2 + mov r2, #0x34 + mul r2, r1 + ldr r1, [r3, r2] + cmp r1, #0 + beq _021D8A18 + ldr r1, _021D8A20 ; =0x00005980 + ldr r0, [r0, r1] + add r1, r3, r2 + mov r2, #1 + bl ov19_021DA694 +_021D8A18: + pop {r4, pc} + nop +_021D8A1C: .word 0x00000618 +_021D8A20: .word 0x00005980 + thumb_func_end ov19_021D89F4 + + thumb_func_start ov19_021D8A24 +ov19_021D8A24: ; 0x021D8A24 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D8A60 ; =0x00005988 + ldr r0, [r5, r0] + bl ov19_021D5E24 + add r4, r0, #0 + ldr r0, _021D8A60 ; =0x00005988 + ldr r0, [r5, r0] + bl ov19_021D5EA0 + add r2, r0, #0 + add r3, r5, #0 + ldrb r1, [r5, #2] + ldr r0, _021D8A64 ; =0x00000618 + add r3, #0xa8 + mul r0, r1 + add r3, r3, r0 + mov r0, #0x34 + add r1, r4, #0 + mul r1, r0 + ldr r0, [r3, r1] + cmp r0, #0 + beq _021D8A5E + ldr r0, _021D8A68 ; =0x00005980 + add r1, r3, r1 + ldr r0, [r5, r0] + bl ov19_021DA68C +_021D8A5E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D8A60: .word 0x00005988 +_021D8A64: .word 0x00000618 +_021D8A68: .word 0x00005980 + thumb_func_end ov19_021D8A24 + + thumb_func_start ov19_021D8A6C +ov19_021D8A6C: ; 0x021D8A6C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r0, #0 + add r0, sp, #0xc + str r0, [sp] + ldr r0, _021D8B08 ; =0x00005988 + add r1, sp, #0x18 + ldr r0, [r4, r0] + add r2, sp, #0x14 + add r3, sp, #0x10 + bl ov19_021D5EE8 + mov r5, #0 + str r5, [sp, #4] +_021D8A88: + add r0, r4, #0 + str r0, [sp, #8] + add r0, #0xa8 + mov r7, #0 + str r0, [sp, #8] +_021D8A92: + ldrb r2, [r4, #2] + ldr r0, _021D8B0C ; =0x00000618 + add r1, r2, #0 + mul r1, r0 + add r0, r4, r1 + add r0, r5, r0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D8AF0 + ldr r6, [sp, #0x18] + ldr r2, [sp, #0x14] + sub r3, r7, r6 + sub r2, r2, r6 + ldr r0, [sp, #0x10] + cmp r3, r2 + bhi _021D8AB8 + mov r6, #1 + b _021D8ABA +_021D8AB8: + mov r6, #0 +_021D8ABA: + ldr r2, [sp, #4] + sub r3, r2, r0 + ldr r2, [sp, #0xc] + sub r0, r2, r0 + cmp r3, r0 + bhi _021D8ACA + mov r0, #1 + b _021D8ACC +_021D8ACA: + mov r0, #0 +_021D8ACC: + tst r0, r6 + ldr r0, _021D8B10 ; =0x00005980 + beq _021D8AE2 + ldr r2, [sp, #8] + ldr r0, [r4, r0] + add r1, r2, r1 + add r1, r1, r5 + mov r2, #1 + bl ov19_021DA7F4 + b _021D8AF0 +_021D8AE2: + ldr r2, [sp, #8] + ldr r0, [r4, r0] + add r1, r2, r1 + add r1, r1, r5 + mov r2, #0 + bl ov19_021DA7F4 +_021D8AF0: + add r7, r7, #1 + add r5, #0x34 + cmp r7, #6 + blo _021D8A92 + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blo _021D8A88 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D8B08: .word 0x00005988 +_021D8B0C: .word 0x00000618 +_021D8B10: .word 0x00005980 + thumb_func_end ov19_021D8A6C + + thumb_func_start ov19_021D8B14 +ov19_021D8B14: ; 0x021D8B14 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r7, r5, #0 + add r4, r6, #0 + add r7, #0xa8 +_021D8B20: + ldrb r2, [r5, #2] + ldr r0, _021D8B4C ; =0x00000618 + add r1, r2, #0 + mul r1, r0 + add r0, r5, r1 + add r0, r4, r0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D8B42 + ldr r0, _021D8B50 ; =0x00005980 + add r1, r7, r1 + ldr r0, [r5, r0] + add r1, r1, r4 + mov r2, #0 + bl ov19_021DA7F4 +_021D8B42: + add r6, r6, #1 + add r4, #0x34 + cmp r6, #0x1e + blt _021D8B20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D8B4C: .word 0x00000618 +_021D8B50: .word 0x00005980 + thumb_func_end ov19_021D8B14 + + .rodata + + + .global Unk_ov19_021E0138 +Unk_ov19_021E0138: ; 0x021E0138 + .incbin "incbin/overlay19_rodata.bin", 0x348, 0x34C - 0x348 + + .global Unk_ov19_021E013C +Unk_ov19_021E013C: ; 0x021E013C + .incbin "incbin/overlay19_rodata.bin", 0x34C, 0x388 - 0x34C + + .global Unk_ov19_021E0178 +Unk_ov19_021E0178: ; 0x021E0178 + .incbin "incbin/overlay19_rodata.bin", 0x388, 0x60 + + + .data + + + .global Unk_ov19_021E05C0 +Unk_ov19_021E05C0: ; 0x021E05C0 + .incbin "incbin/overlay19_data.bin", 0x0, 0x4 + + + .bss + + + .global Unk_ov19_021E0770 +Unk_ov19_021E0770: ; 0x021E0770 + .space 0x4 + + .global Unk_ov19_021E0774 +Unk_ov19_021E0774: ; 0x021E0774 + .space 0x4 + + .global Unk_ov19_021E0778 +Unk_ov19_021E0778: ; 0x021E0778 + .space 0x4 + + .global Unk_ov19_021E077C +Unk_ov19_021E077C: ; 0x021E077C + .space 0x4 + diff --git a/asm/ov19_021D8B54.s b/asm/ov19_021D8B54.s new file mode 100644 index 000000000..b1fe0ff69 --- /dev/null +++ b/asm/ov19_021D8B54.s @@ -0,0 +1,2998 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021D8B54 +ov19_021D8B54: ; 0x021D8B54 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _021D8C00 ; =0x00000794 + add r6, r1, #0 + str r6, [r5, r0] + add r4, r2, #0 + sub r0, r0, #4 + str r4, [r5, r0] + add r0, r6, #0 + str r3, [r5, #0] + bl ov19_021D77E0 + ldr r1, _021D8C04 ; =0x00000758 + str r0, [r5, r1] + add r0, r6, #0 + bl ov19_021D77E8 + ldr r1, _021D8C08 ; =0x0000075C + str r0, [r5, r1] + add r0, r6, #0 + bl ov19_021D77D8 + str r0, [r5, #0x48] + add r0, r4, #0 + bl ov19_021D5E10 + ldr r1, _021D8C0C ; =0x00000785 + strb r0, [r5, r1] + add r0, r4, #0 + bl ov19_021D5E14 + ldr r1, _021D8C10 ; =0x00000789 + strb r0, [r5, r1] + add r0, r4, #0 + bl ov19_021D5E1C + ldr r1, _021D8C14 ; =0x0000078A + strb r0, [r5, r1] + add r0, r4, #0 + bl ov19_021D5E2C + ldr r1, _021D8C18 ; =0x0000078B + add r3, r5, #0 + strb r0, [r5, r1] + mov r2, #0 + str r2, [r5, #4] + str r2, [r5, #8] + str r2, [r5, #0xc] + add r0, r1, #0 + str r2, [r5, #0x10] + sub r0, #0x37 + str r2, [r5, r0] + add r0, r1, #3 + mov r2, #1 + strb r2, [r5, r0] + mov r0, #0xa + str r0, [sp] + ldr r0, [sp, #0x18] + mov r1, #0xd + add r3, #0x1c + bl sub_02007204 + str r0, [r5, #0x14] + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x18] + mov r1, #0xe + mov r2, #1 + add r3, #0x20 + bl sub_02007220 + str r0, [r5, #0x18] + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021D8BF4 + ldr r0, [r5, #0x18] + cmp r0, #0 + bne _021D8BFA +_021D8BF4: + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D8BFA: + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D8C00: .word 0x00000794 +_021D8C04: .word 0x00000758 +_021D8C08: .word 0x0000075C +_021D8C0C: .word 0x00000785 +_021D8C10: .word 0x00000789 +_021D8C14: .word 0x0000078A +_021D8C18: .word 0x0000078B + thumb_func_end ov19_021D8B54 + + thumb_func_start ov19_021D8C1C +ov19_021D8C1C: ; 0x021D8C1C + push {r4, r5, r6, lr} + sub sp, #0x38 + add r4, r0, #0 + add r0, #0x24 + add r5, r1, #0 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, r4, #0 + add r0, #0x24 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r1, #0xc + bl sub_0200718C + ldr r0, _021D8DEC ; =0x00000785 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _021D8C52 + mov r5, #1 + b _021D8C54 +_021D8C52: + mov r5, #2 +_021D8C54: + ldr r0, _021D8DF0 ; =0x00000794 + ldr r0, [r4, r0] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r4, #0x20] + add r1, r4, #0 + str r0, [sp] + str r5, [sp, #4] + ldr r3, [r4, #0x1c] + add r0, sp, #0x14 + add r1, #0x24 + bl ov19_021D783C + ldr r2, _021D8DF4 ; =0x00000764 + add r3, r4, #0 + add r1, r2, #4 + add r0, r4, r2 + add r2, #0x21 + add r1, r4, r1 + add r2, r4, r2 + bl ov19_021D9D48 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r3, _021D8DF4 ; =0x00000764 + ldr r0, [r4, #0] + ldr r2, [r4, r3] + add r3, r3, #4 + ldr r3, [r4, r3] + add r1, sp, #0x14 + bl ov19_021D785C + str r0, [r4, #4] + mov r0, #0x2a + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r3, _021D8DF4 ; =0x00000764 + ldr r0, [r4, #0] + ldr r2, [r4, r3] + add r3, r3, #4 + ldr r3, [r4, r3] + add r1, sp, #0x14 + add r3, #0x18 + bl ov19_021D785C + str r0, [r4, #8] + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E10 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E08 + add r6, r0, #0 + cmp r6, #4 + beq _021D8CD6 + mov r2, #0x6c + mov r5, #0xec + b _021D8CDA +_021D8CD6: + mov r2, #0x40 + mov r5, #0xc0 +_021D8CDA: + mov r1, #2 + add r0, sp, #0x34 + strb r1, [r0] + mov r0, #0x2b + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r3, #0x14 + bl ov19_021D785C + str r0, [r4, #0xc] + mov r0, #0x2b + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + add r2, r5, #0 + mov r3, #0x14 + bl ov19_021D785C + str r0, [r4, #0x10] + ldr r0, [r4, #8] + mov r1, #5 + bl sub_02021D6C + ldr r0, [r4, #8] + mov r1, #2 + bl sub_02021E80 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E10 + add r5, r0, #0 + cmp r5, #2 + ldr r0, [r4, #0xc] + beq _021D8D3C + mov r1, #6 + bl sub_02021D6C + ldr r0, [r4, #0x10] + mov r1, #7 + bl sub_02021D6C + b _021D8D4A +_021D8D3C: + mov r1, #8 + bl sub_02021D6C + ldr r0, [r4, #0x10] + mov r1, #9 + bl sub_02021D6C +_021D8D4A: + cmp r5, #0 + beq _021D8D56 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02021CAC +_021D8D56: + cmp r6, #3 + beq _021D8D9A + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E38 + cmp r0, #1 + ldr r0, [r4, #4] + bne _021D8D80 + mov r1, #0 + bl sub_02021D6C + add r1, r4, #0 + ldr r0, [r4, #0x48] + add r1, #0x4c + mov r2, #0x1e + bl ov19_021DA3CC + mov r1, #0 + b _021D8D8E +_021D8D80: + mov r1, #2 + bl sub_02021D6C + add r0, r4, #0 + bl ov19_021D8E00 + mov r1, #1 +_021D8D8E: + ldr r0, _021D8DF8 ; =0x0000078C + strb r1, [r4, r0] + ldr r0, _021D8DFC ; =0x0000078D + mov r1, #0 + strb r1, [r4, r0] + b _021D8DD2 +_021D8D9A: + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5F7C + cmp r0, #0 + ldr r0, [r4, #4] + bne _021D8DB4 + mov r1, #0 + bl sub_02021D6C + mov r1, #0 + b _021D8DBC +_021D8DB4: + mov r1, #2 + bl sub_02021D6C + mov r1, #1 +_021D8DBC: + ldr r0, _021D8DFC ; =0x0000078D + mov r2, #0x1e + strb r1, [r4, r0] + add r1, r4, #0 + ldr r0, [r4, #0x48] + add r1, #0x4c + bl ov19_021DA3CC + ldr r0, _021D8DF8 ; =0x0000078C + mov r1, #0 + strb r1, [r4, r0] +_021D8DD2: + ldr r0, _021D8DF0 ; =0x00000794 + ldr r0, [r4, r0] + bl ov19_021D7800 + mov r1, #0x76 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + bl ov19_021D9AEC + add sp, #0x38 + pop {r4, r5, r6, pc} + nop +_021D8DEC: .word 0x00000785 +_021D8DF0: .word 0x00000794 +_021D8DF4: .word 0x00000764 +_021D8DF8: .word 0x0000078C +_021D8DFC: .word 0x0000078D + thumb_func_end ov19_021D8C1C + + thumb_func_start ov19_021D8E00 +ov19_021D8E00: ; 0x021D8E00 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #4] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r5, #0 + str r0, [r2, #0] + ldr r0, [r5, #0x48] + add r1, #0x4c + mov r2, #1 + bl ov19_021DA3CC + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E9C + add r4, r0, #0 + ldr r0, [r5, #4] + bl sub_02021E88 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _021D8E74 ; =0x000004D8 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x4c + str r0, [sp, #0xc] + ldr r3, [sp, #0x14] + ldr r2, [sp, #0x10] + asr r3, r3, #0xc + ldr r0, [r5, #0x48] + asr r2, r2, #0xc + add r3, r3, #4 + bl ov19_021DA428 + ldr r1, _021D8E78 ; =0x00000664 + mov r0, #0 + str r0, [r5, r1] + add r0, r1, #4 + ldr r2, _021D8E7C ; =0xFFFFC000 + add r1, #0xf0 + str r2, [r5, r0] + mov r2, #1 + ldr r0, _021D8E80 ; =0x0000078C + str r2, [r5, r1] + strb r2, [r5, r0] + add sp, #0x1c + pop {r4, r5, pc} + nop +_021D8E74: .word 0x000004D8 +_021D8E78: .word 0x00000664 +_021D8E7C: .word 0xFFFFC000 +_021D8E80: .word 0x0000078C + thumb_func_end ov19_021D8E00 + + thumb_func_start ov19_021D8E84 +ov19_021D8E84: ; 0x021D8E84 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D8E96 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x14] +_021D8E96: + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _021D8EA4 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x18] +_021D8EA4: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021D8EB2 + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #4] +_021D8EB2: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D8EC0 + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #8] +_021D8EC0: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D8ECE + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0xc] +_021D8ECE: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _021D8EDC + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0x10] +_021D8EDC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D8E84 + + thumb_func_start ov19_021D8EE0 +ov19_021D8EE0: ; 0x021D8EE0 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0 + add r5, r1, #0 + str r0, [r2, #0] + str r0, [r5, #0] + ldr r0, _021D8F58 ; =0x00000785 + ldrb r1, [r4, r0] + cmp r1, #4 + bhi _021D8F54 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D8F00: ; jump table + .short _021D8F0A - _021D8F00 - 2 ; case 0 + .short _021D8F54 - _021D8F00 - 2 ; case 1 + .short _021D8F34 - _021D8F00 - 2 ; case 2 + .short _021D8F48 - _021D8F00 - 2 ; case 3 + .short _021D8F48 - _021D8F00 - 2 ; case 4 +_021D8F0A: + add r1, r0, #1 + ldrb r1, [r4, r1] + cmp r1, #0 + bne _021D8F54 + add r0, #0xb + ldr r0, [r4, r0] + bl ov19_021D5E14 + ldr r1, _021D8F5C ; =0x00000789 + ldrsb r1, [r4, r1] + cmp r1, #0 + bne _021D8F26 + cmp r0, #5 + beq _021D8F2E +_021D8F26: + cmp r1, #5 + bne _021D8F54 + cmp r0, #0 + bne _021D8F54 +_021D8F2E: + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D8F34: + add r0, r0, #1 + ldrb r0, [r4, r0] + add r0, #0xfd + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bhi _021D8F54 + mov r0, #1 + str r0, [r2, #0] + pop {r3, r4, r5, pc} +_021D8F48: + add r0, r0, #1 + ldrb r0, [r4, r0] + cmp r0, #2 + bne _021D8F54 + mov r0, #1 + str r0, [r2, #0] +_021D8F54: + pop {r3, r4, r5, pc} + nop +_021D8F58: .word 0x00000785 +_021D8F5C: .word 0x00000789 + thumb_func_end ov19_021D8EE0 + + thumb_func_start ov19_021D8F60 +ov19_021D8F60: ; 0x021D8F60 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r2, _021D905C ; =0x0000076C + add r5, r0, #0 + add r1, r2, #4 + add r0, r5, r2 + add r2, #0x1a + add r1, r5, r1 + add r2, r5, r2 + add r3, r5, #0 + bl ov19_021D9D48 + add r0, r5, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov19_021D8EE0 + ldr r0, _021D9060 ; =0x00000786 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _021D8F92 + ldr r0, [r5, #8] + mov r1, #0 + bl sub_02021CAC +_021D8F92: + ldr r6, _021D9064 ; =0x00000764 + ldr r0, [r5, r6] + add r2, r6, #0 + lsl r1, r0, #0xc + add r0, r6, #0 + add r0, #0x10 + str r1, [r5, r0] + add r0, r6, #4 + ldr r0, [r5, r0] + add r2, #0xc + lsl r1, r0, #0xc + add r0, r6, #0 + add r0, #0x14 + str r1, [r5, r0] + add r0, r6, #0 + add r0, #8 + ldr r1, [r5, r0] + ldr r3, [r5, r2] + ldr r7, [sp, #4] + lsl r0, r1, #0xc + lsl r2, r3, #0xc + cmp r7, #0 + bne _021D8FC8 + add r6, #0x10 + ldr r1, [r5, r6] + sub r0, r0, r1 + b _021D8FF0 +_021D8FC8: + add r4, r6, #0 + add r4, #0x10 + ldr r4, [r5, r4] + cmp r0, r4 + ble _021D8FE2 + mov r0, #0x11 + lsl r0, r0, #4 + sub r1, r0, r1 + ldr r0, [r5, r6] + sub r0, #0x46 + add r0, r1, r0 + neg r0, r0 + b _021D8FEE +_021D8FE2: + mov r0, #0x11 + ldr r4, [r5, r6] + lsl r0, r0, #4 + sub r0, r0, r4 + sub r1, #0x46 + add r0, r0, r1 +_021D8FEE: + lsl r0, r0, #0xc +_021D8FF0: + ldr r1, [sp] + cmp r1, #0 + bne _021D8FFE + ldr r3, _021D9068 ; =0x00000778 + ldr r3, [r5, r3] + sub r4, r2, r3 + b _021D9024 +_021D8FFE: + ldr r4, _021D9068 ; =0x00000778 + ldr r6, [r5, r4] + cmp r2, r6 + ble _021D9016 + mov r2, #0xd0 + sub r4, #0x10 + sub r3, r2, r3 + ldr r2, [r5, r4] + add r2, #0x18 + add r2, r3, r2 + neg r4, r2 + b _021D9022 +_021D9016: + sub r4, #0x10 + ldr r4, [r5, r4] + mov r2, #0xd0 + sub r2, r2, r4 + add r3, #0x18 + add r4, r2, r3 +_021D9022: + lsl r4, r4, #0xc +_021D9024: + cmp r7, #0 + bne _021D902C + cmp r1, #0 + beq _021D9030 +_021D902C: + mov r6, #0xc + b _021D9032 +_021D9030: + mov r6, #6 +_021D9032: + add r1, r6, #0 + bl sub_020E1F6C + ldr r1, _021D906C ; =0x0000077C + str r0, [r5, r1] + add r0, r4, #0 + add r1, r6, #0 + bl sub_020E1F6C + mov r1, #0x1e + lsl r1, r1, #6 + str r0, [r5, r1] + add r0, r1, #7 + strb r6, [r5, r0] + ldr r0, _021D9070 ; =ov19_021D9088 + add r1, r5, #0 + mov r2, #0 + bl ov19_021D77C8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D905C: .word 0x0000076C +_021D9060: .word 0x00000786 +_021D9064: .word 0x00000764 +_021D9068: .word 0x00000778 +_021D906C: .word 0x0000077C +_021D9070: .word ov19_021D9088 + thumb_func_end ov19_021D8F60 + + thumb_func_start ov19_021D9074 +ov19_021D9074: ; 0x021D9074 + ldr r1, _021D9084 ; =0x00000787 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021D9080 + mov r0, #1 + bx lr +_021D9080: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D9084: .word 0x00000787 + thumb_func_end ov19_021D9074 + + thumb_func_start ov19_021D9088 +ov19_021D9088: ; 0x021D9088 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + ldr r0, _021D9204 ; =0x00000787 + str r1, [sp, #8] + ldrb r2, [r4, r0] + cmp r2, #0 + beq _021D9162 + add r1, r0, #0 + sub r1, #0x13 + ldr r2, [r4, r1] + add r1, r0, #0 + sub r1, #0xb + ldr r1, [r4, r1] + add r2, r2, r1 + add r1, r0, #0 + sub r1, #0x13 + str r2, [r4, r1] + add r1, r0, #0 + sub r1, #0xb + ldr r1, [r4, r1] + cmp r1, #0 + ble _021D90D0 + add r1, r0, #0 + sub r1, #0x13 + ldr r2, [r4, r1] + mov r1, #0x11 + lsl r1, r1, #0x10 + cmp r2, r1 + ble _021D90D0 + ldr r1, _021D9208 ; =0x00156000 + sub r0, #0x13 + sub r1, r1, r2 + str r1, [r4, r0] +_021D90D0: + ldr r1, _021D920C ; =0x0000077C + ldr r0, [r4, r1] + cmp r0, #0 + bge _021D90F2 + add r0, r1, #0 + sub r0, #8 + ldr r2, [r4, r0] + mov r0, #0x46 + lsl r0, r0, #0xc + cmp r2, r0 + bge _021D90F2 + sub r2, r0, r2 + mov r0, #0x11 + lsl r0, r0, #0x10 + sub r0, r0, r2 + sub r1, #8 + str r0, [r4, r1] +_021D90F2: + ldr r1, _021D9210 ; =0x00000778 + add r0, r1, #0 + add r0, #8 + ldr r2, [r4, r1] + ldr r0, [r4, r0] + add r0, r2, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #8 + ldr r0, [r4, r0] + cmp r0, #0 + ble _021D911C + mov r0, #0xd + ldr r2, [r4, r1] + lsl r0, r0, #0x10 + cmp r2, r0 + ble _021D911C + mov r0, #0x2e + lsl r0, r0, #0xe + sub r0, r0, r2 + str r0, [r4, r1] +_021D911C: + mov r1, #0x1e + lsl r1, r1, #6 + ldr r0, [r4, r1] + cmp r0, #0 + bge _021D913E + add r0, r1, #0 + sub r0, #8 + ldr r2, [r4, r0] + ldr r0, _021D9214 ; =0xFFFE8000 + cmp r2, r0 + bge _021D913E + sub r2, r0, r2 + mov r0, #0xd + lsl r0, r0, #0x10 + sub r0, r0, r2 + sub r1, #8 + str r0, [r4, r1] +_021D913E: + ldr r0, _021D9218 ; =0x00000774 + ldr r1, [r4, r0] + add r0, r0, #4 + str r1, [sp] + ldr r0, [r4, r0] + add r1, sp, #0 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, _021D9204 ; =0x00000787 + add sp, #0xc + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r4, r5, pc} +_021D9162: + add r2, r0, #0 + sub r2, #0x1b + ldr r2, [r4, r2] + sub r0, #0x17 + lsl r2, r2, #0xc + str r2, [sp] + ldr r0, [r4, r0] + lsl r0, r0, #0xc + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl ov19_021D9E04 + ldr r0, _021D921C ; =0x0000076C + add r1, r0, #0 + ldr r2, [r4, r0] + sub r1, #8 + str r2, [r4, r1] + add r1, r0, #4 + ldr r2, [r4, r1] + sub r1, r0, #4 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0x1a + ldrb r2, [r4, r1] + add r1, r0, #0 + add r1, #0x19 + strb r2, [r4, r1] + add r0, #0x24 + ldr r0, [r4, r0] + bl ov19_021D5E14 + ldr r1, _021D9220 ; =0x00000789 + strb r0, [r4, r1] + add r0, r1, #7 + ldr r0, [r4, r0] + bl ov19_021D5E1C + ldr r1, _021D9224 ; =0x0000078A + strb r0, [r4, r1] + add r0, r1, #6 + ldr r0, [r4, r0] + bl ov19_021D5E2C + ldr r1, _021D9228 ; =0x0000078B + strb r0, [r4, r1] + sub r0, r1, #5 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _021D91D0 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02021CAC +_021D91D0: + ldr r0, _021D922C ; =0x00000786 + ldrb r0, [r4, r0] + cmp r0, #2 + ldr r0, [r4, #0xc] + beq _021D91EA + mov r1, #6 + bl sub_02021D6C + ldr r0, [r4, #0x10] + mov r1, #7 + bl sub_02021D6C + b _021D91F8 +_021D91EA: + mov r1, #8 + bl sub_02021D6C + ldr r0, [r4, #0x10] + mov r1, #9 + bl sub_02021D6C +_021D91F8: + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0xc + pop {r4, r5, pc} + nop +_021D9204: .word 0x00000787 +_021D9208: .word 0x00156000 +_021D920C: .word 0x0000077C +_021D9210: .word 0x00000778 +_021D9214: .word 0xFFFE8000 +_021D9218: .word 0x00000774 +_021D921C: .word 0x0000076C +_021D9220: .word 0x00000789 +_021D9224: .word 0x0000078A +_021D9228: .word 0x0000078B +_021D922C: .word 0x00000786 + thumb_func_end ov19_021D9088 + + thumb_func_start ov19_021D9230 +ov19_021D9230: ; 0x021D9230 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021D6C + mov r1, #2 + mov r0, #0x1e + lsl r1, r1, #0xc + lsl r0, r0, #6 + str r1, [r4, r0] + add r1, r0, #0 + sub r1, #0x18 + ldr r2, [r4, r1] + add r1, r0, #0 + add r2, #0xc + sub r1, #0x10 + str r2, [r4, r1] + add r1, r0, #7 + mov r2, #6 + strb r2, [r4, r1] + mov r1, #0 + add r0, r0, #4 + strb r1, [r4, r0] + add r0, r4, #0 + bl ov19_021D9EB0 + ldr r0, _021D9274 ; =ov19_021D928C + add r1, r4, #0 + mov r2, #0 + bl ov19_021D77C8 + pop {r4, pc} + nop +_021D9274: .word ov19_021D928C + thumb_func_end ov19_021D9230 + + thumb_func_start ov19_021D9278 +ov19_021D9278: ; 0x021D9278 + ldr r1, _021D9288 ; =0x00000784 + ldrb r0, [r0, r1] + cmp r0, #0xff + bne _021D9284 + mov r0, #1 + bx lr +_021D9284: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D9288: .word 0x00000784 + thumb_func_end ov19_021D9278 + + thumb_func_start ov19_021D928C +ov19_021D928C: ; 0x021D928C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + ldr r1, _021D9360 ; =0x00000784 + str r0, [r3, #0] + ldrb r0, [r4, r1] + cmp r0, #0 + beq _021D92B8 + cmp r0, #1 + beq _021D9314 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021D92B8: + add r0, r1, #0 + mov r3, #0 + add r0, #0xa + strb r3, [r4, r0] + add r0, r1, #3 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _021D92E6 + sub r0, r1, #4 + ldr r3, [sp, #4] + ldr r0, [r4, r0] + add r1, r2, #0 + add r0, r3, r0 + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, _021D9364 ; =0x00000787 + add sp, #0xc + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_021D92E6: + sub r1, #0x14 + ldr r0, [r4, r1] + add r1, r2, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02021D6C + add r0, r4, #0 + bl ov19_021DA038 + ldr r0, _021D9364 ; =0x00000787 + mov r1, #6 + strb r1, [r4, r0] + sub r1, r0, #3 + ldrb r1, [r4, r1] + sub r0, r0, #3 + add r1, r1, #1 + strb r1, [r4, r0] +_021D9314: + ldr r0, _021D9364 ; =0x00000787 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D933A + sub r0, r0, #7 + ldr r1, [sp, #4] + ldr r0, [r4, r0] + sub r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + bl ov19_021D9E04 + ldr r0, _021D9364 ; =0x00000787 + add sp, #0xc + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_021D933A: + sub r0, #0x1f + ldr r0, [r4, r0] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, _021D9360 ; =0x00000784 + mov r1, #0xff + strb r1, [r4, r0] + mov r1, #1 + add r0, #0xa + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D9360: .word 0x00000784 +_021D9364: .word 0x00000787 + thumb_func_end ov19_021D928C + + thumb_func_start ov19_021D9368 +ov19_021D9368: ; 0x021D9368 + add r1, r0, #0 + mov r2, #2 + mov r0, #0x1e + lsl r2, r2, #0xc + lsl r0, r0, #6 + str r2, [r1, r0] + add r2, r0, #0 + sub r2, #0x18 + ldr r3, [r1, r2] + add r2, r0, #0 + add r3, #0xc + sub r2, #0x10 + str r3, [r1, r2] + add r2, r0, #7 + mov r3, #6 + strb r3, [r1, r2] + ldr r3, _021D9394 ; =ov19_021D77C8 + mov r2, #0 + add r0, r0, #4 + strb r2, [r1, r0] + ldr r0, _021D9398 ; =ov19_021D93D0 + bx r3 + ; .align 2, 0 +_021D9394: .word ov19_021D77C8 +_021D9398: .word ov19_021D93D0 + thumb_func_end ov19_021D9368 + + thumb_func_start ov19_021D939C +ov19_021D939C: ; 0x021D939C + push {r4, lr} + ldr r1, _021D93C8 ; =0x00000784 + add r4, r0, #0 + ldrb r1, [r4, r1] + cmp r1, #0xff + bne _021D93C4 + bl ov19_021DA06C + ldr r2, _021D93CC ; =0x00000754 + add r1, r4, #0 + ldr r0, [r4, #0x48] + ldr r2, [r4, r2] + add r1, #0x4c + bl ov19_021DA3CC + ldr r0, _021D93CC ; =0x00000754 + mov r1, #0 + str r1, [r4, r0] + mov r0, #1 + pop {r4, pc} +_021D93C4: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D93C8: .word 0x00000784 +_021D93CC: .word 0x00000754 + thumb_func_end ov19_021D939C + + thumb_func_start ov19_021D93D0 +ov19_021D93D0: ; 0x021D93D0 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + ldr r1, _021D94AC ; =0x00000784 + str r0, [r3, #0] + ldrb r0, [r4, r1] + cmp r0, #0 + beq _021D93FC + cmp r0, #1 + beq _021D9458 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021D93FC: + add r0, r1, #0 + mov r3, #0 + add r0, #0xa + strb r3, [r4, r0] + add r0, r1, #3 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _021D942A + sub r0, r1, #4 + ldr r3, [sp, #4] + ldr r0, [r4, r0] + add r1, r2, #0 + add r0, r3, r0 + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, _021D94B0 ; =0x00000787 + add sp, #0xc + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_021D942A: + sub r1, #0x14 + ldr r0, [r4, r1] + add r1, r2, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021D6C + add r0, r4, #0 + bl ov19_021DA1F8 + ldr r0, _021D94B0 ; =0x00000787 + mov r1, #6 + strb r1, [r4, r0] + sub r1, r0, #3 + ldrb r1, [r4, r1] + sub r0, r0, #3 + add r1, r1, #1 + strb r1, [r4, r0] +_021D9458: + ldr r0, _021D94B0 ; =0x00000787 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D947E + sub r0, r0, #7 + ldr r1, [sp, #4] + ldr r0, [r4, r0] + sub r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + bl ov19_021D9E04 + ldr r0, _021D94B0 ; =0x00000787 + add sp, #0xc + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_021D947E: + sub r0, #0x1f + ldr r0, [r4, r0] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021D6C + ldr r0, _021D94AC ; =0x00000784 + mov r1, #0xff + strb r1, [r4, r0] + mov r1, #1 + add r0, #0xa + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D94AC: .word 0x00000784 +_021D94B0: .word 0x00000787 + thumb_func_end ov19_021D93D0 + + thumb_func_start ov19_021D94B4 +ov19_021D94B4: ; 0x021D94B4 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021D6C + ldr r0, _021D9528 ; =0x00000788 + mov r1, #0 + strb r1, [r5, r0] + add r0, r5, #0 + bl ov19_021DA224 + add r4, r0, #0 + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r4, #0 + bl sub_02021F74 + str r0, [sp] + ldr r1, [r5, #0x4c] + ldr r2, [sp, #0x14] + add r0, r5, #0 + mov r3, #1 + bl ov19_021D9554 + ldr r0, [r5, #0x4c] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r5, #0x4c] + bl sub_02021F74 + str r0, [sp] + mov r3, #0 + ldr r2, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + mvn r3, r3 + bl ov19_021D9554 + ldr r0, _021D952C ; =0x00000784 + mov r1, #0 + strb r1, [r5, r0] + add sp, #0x1c + pop {r4, r5, pc} + nop +_021D9528: .word 0x00000788 +_021D952C: .word 0x00000784 + thumb_func_end ov19_021D94B4 + + thumb_func_start ov19_021D9530 +ov19_021D9530: ; 0x021D9530 + push {r4, lr} + add r4, r0, #0 + bl ov19_021D95E0 + cmp r0, #0 + beq _021D954E + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02021D6C + add r0, r4, #0 + bl ov19_021DA110 + mov r0, #1 + pop {r4, pc} +_021D954E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D9530 + + thumb_func_start ov19_021D9554 +ov19_021D9554: ; 0x021D9554 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0xa + mov r1, #0x2c + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _021D95D4 + add r0, r6, #0 + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #0xc + str r0, [r2, #0] + str r6, [r4, #0] + strh r1, [r4, #4] + mov r0, #6 + strh r0, [r4, #6] + ldr r0, [sp, #0x28] + str r0, [r4, #8] + ldr r0, [sp, #8] + str r0, [r4, #0xc] + ldr r0, [sp, #4] + str r0, [r4, #0x14] + str r7, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x18] + ldr r0, [sp] + add r2, r0, #0 + mul r2, r1 + str r2, [r4, #0x24] + ldr r2, [r4, #0x10] + ldr r0, [r4, #0xc] + sub r0, r2, r0 + bl sub_020E1F6C + str r0, [r4, #0x1c] + mov r0, #0xf + lsl r0, r0, #0xc + str r0, [r4, #0x20] + ldr r0, _021D95D8 ; =ov19_021D9600 + add r1, r4, #0 + mov r2, #0 + str r5, [r4, #0x28] + bl ov19_021D77C8 + cmp r0, #0 + beq _021D95CE + ldr r0, _021D95DC ; =0x00000788 + mov r1, #1 + add sp, #0x10 + strb r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D95CE: + add r0, r4, #0 + bl sub_020181C4 +_021D95D4: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D95D8: .word ov19_021D9600 +_021D95DC: .word 0x00000788 + thumb_func_end ov19_021D9554 + + thumb_func_start ov19_021D95E0 +ov19_021D95E0: ; 0x021D95E0 + ldr r1, _021D95F0 ; =0x00000788 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021D95EC + mov r0, #1 + bx lr +_021D95EC: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D95F0: .word 0x00000788 + thumb_func_end ov19_021D95E0 + + thumb_func_start ov19_021D95F4 +ov19_021D95F4: ; 0x021D95F4 + ldr r1, _021D95FC ; =0x00000788 + mov r2, #0 + strb r2, [r0, r1] + bx lr + ; .align 2, 0 +_021D95FC: .word 0x00000788 + thumb_func_end ov19_021D95F4 + + thumb_func_start ov19_021D9600 +ov19_021D9600: ; 0x021D9600 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldrh r0, [r4, #4] + cmp r0, #0 + beq _021D9668 + sub r0, r0, #1 + strh r0, [r4, #4] + ldrh r1, [r4, #4] + ldrh r0, [r4, #6] + cmp r1, r0 + bne _021D9636 + ldr r0, [r4, #0] + ldr r1, [r4, #8] + bl ov19_021D78AC +_021D9636: + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x1c] + add r0, r1, r0 + str r0, [r4, #0xc] + str r0, [sp, #4] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x20] + add r0, r1, r0 + str r0, [r4, #0x18] + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D15C + ldr r1, [r4, #0x24] + add r2, r1, #0 + mul r2, r0 + ldr r0, [r4, #0x14] + add r1, sp, #0 + add r0, r0, r2 + str r0, [sp] + ldr r0, [r4, #0] + bl sub_02021C50 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021D9668: + ldr r0, [r4, #0x14] + add r1, r2, #0 + str r0, [sp] + ldr r0, [r4, #0x10] + str r0, [sp, #4] + ldr r0, [r4, #0] + bl sub_02021C50 + ldr r1, _021D968C ; =ov19_021D95F4 + ldr r2, [r4, #0x28] + add r0, r4, #0 + bl ov19_021D79B8 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D968C: .word ov19_021D95F4 + thumb_func_end ov19_021D9600 + + thumb_func_start ov19_021D9690 +ov19_021D9690: ; 0x021D9690 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, _021D96F4 ; =0x0000078C + ldrb r1, [r4, r0] + cmp r1, #0 + bne _021D96AE + add r0, r0, #1 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _021D96AE + ldr r0, [r4, #4] + mov r1, #3 + bl sub_02021D6C +_021D96AE: + ldr r0, [r4, #4] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #2 + ldr r1, [sp, #4] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + bl ov19_021D9E04 + ldr r0, _021D96F8 ; =0x00000784 + mov r2, #0 + strb r2, [r4, r0] + add r0, r0, #3 + strb r2, [r4, r0] + ldr r0, _021D96FC ; =ov19_021D9718 + add r1, r4, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021D96F0 + ldr r0, _021D9700 ; =0x00000788 + mov r1, #1 + strb r1, [r4, r0] +_021D96F0: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D96F4: .word 0x0000078C +_021D96F8: .word 0x00000784 +_021D96FC: .word ov19_021D9718 +_021D9700: .word 0x00000788 + thumb_func_end ov19_021D9690 + + thumb_func_start ov19_021D9704 +ov19_021D9704: ; 0x021D9704 + ldr r1, _021D9714 ; =0x00000788 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021D9710 + mov r0, #1 + bx lr +_021D9710: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D9714: .word 0x00000788 + thumb_func_end ov19_021D9704 + + thumb_func_start ov19_021D9718 +ov19_021D9718: ; 0x021D9718 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r4, r1, #0 + ldr r1, _021D97F0 ; =0x00000784 + add r5, r0, #0 + ldrb r0, [r4, r1] + cmp r0, #0 + beq _021D9730 + cmp r0, #1 + beq _021D9796 + add sp, #0x18 + pop {r4, r5, r6, pc} +_021D9730: + add r0, r1, #3 + ldrb r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #3 + strb r2, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #4 + blo _021D97EC + ldr r0, [r4, #4] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #0x10] + mov r2, #3 + asr r0, r0, #0xc + add r1, r0, #6 + mov r0, #0x77 + lsl r0, r0, #4 + str r1, [r4, r0] + add r1, r0, #0 + lsl r2, r2, #0xc + add r1, #0x10 + str r2, [r4, r1] + add r1, r0, #0 + mov r2, #2 + add r1, #0x17 + strb r2, [r4, r1] + add r1, r0, #0 + add r1, #0x1c + ldrb r1, [r4, r1] + cmp r1, #0 + bne _021D978A + add r0, #0x1d + ldrb r0, [r4, r0] + cmp r0, #0 + bne _021D978A + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02021D6C +_021D978A: + ldr r0, _021D97F0 ; =0x00000784 + add sp, #0x18 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9796: + ldr r0, [r4, #4] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r0, _021D97F4 ; =0x00000787 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D97D0 + sub r0, r0, #7 + ldr r1, [sp, #4] + ldr r0, [r4, r0] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + bl ov19_021D9E04 + ldr r0, _021D97F4 ; =0x00000787 + add sp, #0x18 + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D97D0: + sub r0, #0x17 + ldr r0, [r4, r0] + add r1, r2, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, _021D97F8 ; =0x00000788 + mov r1, #0 + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 +_021D97EC: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D97F0: .word 0x00000784 +_021D97F4: .word 0x00000787 +_021D97F8: .word 0x00000788 + thumb_func_end ov19_021D9718 + + thumb_func_start ov19_021D97FC +ov19_021D97FC: ; 0x021D97FC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #0x77 + str r0, [r2, #0] + ldr r0, [sp, #4] + lsl r1, r1, #4 + asr r0, r0, #0xc + sub r0, r0, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r2, _021D984C ; =0xFFFFF000 + add r0, #0x10 + str r2, [r4, r0] + add r0, r1, #0 + mov r2, #4 + add r0, #0x17 + strb r2, [r4, r0] + mov r2, #0 + add r1, #0x14 + strb r2, [r4, r1] + ldr r0, _021D9850 ; =ov19_021D9894 + add r1, r4, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021D9848 + ldr r0, _021D9854 ; =0x00000788 + mov r1, #1 + strb r1, [r4, r0] +_021D9848: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021D984C: .word 0xFFFFF000 +_021D9850: .word ov19_021D9894 +_021D9854: .word 0x00000788 + thumb_func_end ov19_021D97FC + + thumb_func_start ov19_021D9858 +ov19_021D9858: ; 0x021D9858 + push {r4, lr} + ldr r1, _021D9890 ; =0x00000788 + add r4, r0, #0 + ldrb r0, [r4, r1] + cmp r0, #0 + bne _021D988A + add r0, r1, #4 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _021D9886 + add r0, r1, #5 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _021D9886 + ldr r0, [r4, #4] + bl sub_02021E24 + cmp r0, #0 + beq _021D9886 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021D6C +_021D9886: + mov r0, #1 + pop {r4, pc} +_021D988A: + mov r0, #0 + pop {r4, pc} + nop +_021D9890: .word 0x00000788 + thumb_func_end ov19_021D9858 + + thumb_func_start ov19_021D9894 +ov19_021D9894: ; 0x021D9894 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r0, _021D98F8 ; =0x00000787 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D98D6 + sub r0, r0, #7 + ldr r1, [sp, #4] + ldr r0, [r4, r0] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r2, #0 + bl ov19_021D9E04 + ldr r0, _021D98F8 ; =0x00000787 + add sp, #0xc + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_021D98D6: + sub r0, #0x17 + ldr r0, [r4, r0] + add r1, r2, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r4, #0 + bl ov19_021D9E04 + ldr r0, _021D98FC ; =0x00000788 + mov r1, #0 + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021D98F8: .word 0x00000787 +_021D98FC: .word 0x00000788 + thumb_func_end ov19_021D9894 + + thumb_func_start ov19_021D9900 +ov19_021D9900: ; 0x021D9900 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E68 + mov r1, #0x79 + lsl r1, r1, #4 + mov r2, #0x11 + ldr r3, [r4, r1] + lsl r2, r2, #4 + ldrh r2, [r3, r2] + cmp r2, r0 + bne _021D9926 + sub r1, #0x38 + ldr r0, [r4, r1] + bl ov19_021D84E0 +_021D9926: + add r0, r4, #0 + bl ov19_021DA204 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021D6C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D9900 + + thumb_func_start ov19_021D9938 +ov19_021D9938: ; 0x021D9938 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021D6C + add r1, r4, #0 + ldr r0, [r4, #0x48] + add r1, #0x4c + mov r2, #1 + bl ov19_021DA7B8 + ldr r0, _021D9958 ; =0x00000784 + mov r1, #0 + strb r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D9958: .word 0x00000784 + thumb_func_end ov19_021D9938 + + thumb_func_start ov19_021D995C +ov19_021D995C: ; 0x021D995C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D99EC ; =0x00000794 + ldr r0, [r5, r0] + bl ov19_021D7964 + ldr r1, _021D99F0 ; =0x00000784 + add r4, r0, #0 + ldrb r1, [r5, r1] + cmp r1, #0 + beq _021D997C + cmp r1, #1 + beq _021D9994 + cmp r1, #2 + beq _021D99CE + b _021D99E8 +_021D997C: + add r1, r5, #0 + ldr r0, [r5, #0x48] + add r1, #0x4c + bl ov19_021DA7E0 + cmp r0, #0 + beq _021D99E8 + ldr r0, _021D99F0 ; =0x00000784 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + b _021D99E8 +_021D9994: + bl ov19_021D3B18 + cmp r0, #0 + beq _021D99E8 + add r0, r4, #0 + bl ov19_021D3B20 + cmp r0, #0 + beq _021D99B8 + ldr r0, [r5, #4] + mov r1, #0 + bl sub_02021D6C + add r0, r5, #0 + bl ov19_021DA204 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D99B8: + add r1, r5, #0 + ldr r0, [r5, #0x48] + add r1, #0x4c + mov r2, #2 + bl ov19_021DA7B8 + ldr r0, _021D99F0 ; =0x00000784 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + b _021D99E8 +_021D99CE: + add r1, r5, #0 + ldr r0, [r5, #0x48] + add r1, #0x4c + bl ov19_021DA7E0 + cmp r0, #0 + beq _021D99E8 + ldr r0, [r5, #4] + mov r1, #2 + bl sub_02021D6C + mov r0, #1 + pop {r3, r4, r5, pc} +_021D99E8: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D99EC: .word 0x00000794 +_021D99F0: .word 0x00000784 + thumb_func_end ov19_021D995C + + thumb_func_start ov19_021D99F4 +ov19_021D99F4: ; 0x021D99F4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021E80 + ldr r0, _021D9A24 ; =0x0000078C + ldrb r0, [r4, r0] + cmp r0, #0 + beq _021D9A10 + ldr r0, [r4, #0x4c] + mov r1, #1 + bl sub_02021E80 +_021D9A10: + ldr r0, _021D9A28 ; =0x0000078D + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D9A22 + sub r0, #0x2d + ldr r0, [r4, r0] + mov r1, #1 + bl ov19_021DEBDC +_021D9A22: + pop {r4, pc} + ; .align 2, 0 +_021D9A24: .word 0x0000078C +_021D9A28: .word 0x0000078D + thumb_func_end ov19_021D99F4 + + thumb_func_start ov19_021D9A2C +ov19_021D9A2C: ; 0x021D9A2C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02021E80 + ldr r0, _021D9A5C ; =0x0000078C + ldrb r0, [r4, r0] + cmp r0, #0 + beq _021D9A48 + ldr r0, [r4, #0x4c] + mov r1, #2 + bl sub_02021E80 +_021D9A48: + ldr r0, _021D9A60 ; =0x0000078D + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D9A5A + sub r0, #0x2d + ldr r0, [r4, r0] + mov r1, #2 + bl ov19_021DEBDC +_021D9A5A: + pop {r4, pc} + ; .align 2, 0 +_021D9A5C: .word 0x0000078C +_021D9A60: .word 0x0000078D + thumb_func_end ov19_021D9A2C + + thumb_func_start ov19_021D9A64 +ov19_021D9A64: ; 0x021D9A64 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D9A88 ; =0x0000078C + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D9A84 + add r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5EA0 + add r2, r0, #0 + ldr r0, [r4, #0x48] + add r4, #0x4c + add r1, r4, #0 + bl ov19_021DA68C +_021D9A84: + pop {r4, pc} + nop +_021D9A88: .word 0x0000078C + thumb_func_end ov19_021D9A64 + + thumb_func_start ov19_021D9A8C +ov19_021D9A8C: ; 0x021D9A8C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5EC8 + add r2, r0, #0 + ldr r0, [r4, #0x4c] + cmp r0, #0 + beq _021D9AAC + ldr r0, [r4, #0x48] + add r4, #0x4c + add r1, r4, #0 + bl ov19_021DA63C +_021D9AAC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D9A8C + + thumb_func_start ov19_021D9AB0 +ov19_021D9AB0: ; 0x021D9AB0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x4c] + add r2, r1, #0 + cmp r0, #0 + beq _021D9AE8 + add r1, r4, #0 + ldr r0, [r4, #0x48] + add r1, #0x4c + bl ov19_021DA690 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5EC8 + add r2, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #0x48] + add r1, #0x4c + bl ov19_021DA63C + ldr r0, [r4, #0x48] + add r4, #0x4c + add r1, r4, #0 + mov r2, #0 + bl ov19_021DA694 +_021D9AE8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D9AB0 + + thumb_func_start ov19_021D9AEC +ov19_021D9AEC: ; 0x021D9AEC + push {r4, lr} + add r4, r0, #0 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5EE0 + cmp r0, #0 + ldr r0, [r4, #4] + beq _021D9B08 + mov r1, #1 + bl sub_02021E90 + pop {r4, pc} +_021D9B08: + mov r1, #0 + bl sub_02021E90 + pop {r4, pc} + thumb_func_end ov19_021D9AEC + + thumb_func_start ov19_021D9B10 +ov19_021D9B10: ; 0x021D9B10 + ldr r3, _021D9B18 ; =sub_02021D6C + ldr r0, [r0, #4] + mov r1, #1 + bx r3 + ; .align 2, 0 +_021D9B18: .word sub_02021D6C + thumb_func_end ov19_021D9B10 + + thumb_func_start ov19_021D9B1C +ov19_021D9B1C: ; 0x021D9B1C + push {r4, lr} + ldr r0, [r0, #4] + add r4, r1, #0 + bl sub_02021D28 + add r2, r0, #0 + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021D9B1C + + thumb_func_start ov19_021D9B34 +ov19_021D9B34: ; 0x021D9B34 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D9B58 ; =0x00000784 + mov r2, #0 + strb r2, [r4, r0] + ldr r0, _021D9B5C ; =ov19_021D9B78 + add r1, r4, #0 + bl sub_0200D9E8 + cmp r0, #0 + beq _021D9B54 + ldr r0, _021D9B60 ; =0x0000078D + mov r1, #1 + strb r1, [r4, r0] + sub r0, r0, #5 + strb r1, [r4, r0] +_021D9B54: + pop {r4, pc} + nop +_021D9B58: .word 0x00000784 +_021D9B5C: .word ov19_021D9B78 +_021D9B60: .word 0x0000078D + thumb_func_end ov19_021D9B34 + + thumb_func_start ov19_021D9B64 +ov19_021D9B64: ; 0x021D9B64 + ldr r1, _021D9B74 ; =0x00000788 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021D9B70 + mov r0, #1 + bx lr +_021D9B70: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D9B74: .word 0x00000788 + thumb_func_end ov19_021D9B64 + + thumb_func_start ov19_021D9B78 +ov19_021D9B78: ; 0x021D9B78 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D9BCC ; =0x00000784 + add r4, r1, #0 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D9B8C + cmp r1, #1 + beq _021D9BA8 + pop {r3, r4, r5, pc} +_021D9B8C: + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021D6C + mov r0, #0x76 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021DE954 + ldr r0, _021D9BCC ; =0x00000784 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D9BA8: + sub r0, #0x24 + ldr r0, [r4, r0] + bl ov19_021DE9A8 + cmp r0, #0 + beq _021D9BC8 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02021D6C + ldr r0, _021D9BD0 ; =0x00000788 + mov r1, #0 + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 +_021D9BC8: + pop {r3, r4, r5, pc} + nop +_021D9BCC: .word 0x00000784 +_021D9BD0: .word 0x00000788 + thumb_func_end ov19_021D9B78 + + thumb_func_start ov19_021D9BD4 +ov19_021D9BD4: ; 0x021D9BD4 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D9BF8 ; =0x00000784 + mov r2, #0 + strb r2, [r4, r0] + ldr r0, _021D9BFC ; =ov19_021D9C18 + add r1, r4, #0 + bl sub_0200D9E8 + cmp r0, #0 + beq _021D9BF6 + ldr r0, _021D9C00 ; =0x0000078D + mov r1, #0 + strb r1, [r4, r0] + mov r1, #1 + sub r0, r0, #5 + strb r1, [r4, r0] +_021D9BF6: + pop {r4, pc} + ; .align 2, 0 +_021D9BF8: .word 0x00000784 +_021D9BFC: .word ov19_021D9C18 +_021D9C00: .word 0x0000078D + thumb_func_end ov19_021D9BD4 + + thumb_func_start ov19_021D9C04 +ov19_021D9C04: ; 0x021D9C04 + ldr r1, _021D9C14 ; =0x00000788 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021D9C10 + mov r0, #1 + bx lr +_021D9C10: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D9C14: .word 0x00000788 + thumb_func_end ov19_021D9C04 + + thumb_func_start ov19_021D9C18 +ov19_021D9C18: ; 0x021D9C18 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D9C6C ; =0x00000784 + add r4, r1, #0 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D9C2C + cmp r1, #1 + beq _021D9C48 + pop {r3, r4, r5, pc} +_021D9C2C: + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021D6C + mov r0, #0x76 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021DEA18 + ldr r0, _021D9C6C ; =0x00000784 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D9C48: + sub r0, #0x24 + ldr r0, [r4, r0] + bl ov19_021DEA64 + cmp r0, #0 + beq _021D9C68 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021D6C + ldr r0, _021D9C70 ; =0x00000788 + mov r1, #0 + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 +_021D9C68: + pop {r3, r4, r5, pc} + nop +_021D9C6C: .word 0x00000784 +_021D9C70: .word 0x00000788 + thumb_func_end ov19_021D9C18 + + thumb_func_start ov19_021D9C74 +ov19_021D9C74: ; 0x021D9C74 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D9C94 ; =0x00000784 + mov r2, #0 + strb r2, [r4, r0] + ldr r0, _021D9C98 ; =ov19_021D9CB4 + add r1, r4, #0 + bl sub_0200D9E8 + cmp r0, #0 + beq _021D9C90 + ldr r0, _021D9C9C ; =0x00000788 + mov r1, #1 + strb r1, [r4, r0] +_021D9C90: + pop {r4, pc} + nop +_021D9C94: .word 0x00000784 +_021D9C98: .word ov19_021D9CB4 +_021D9C9C: .word 0x00000788 + thumb_func_end ov19_021D9C74 + + thumb_func_start ov19_021D9CA0 +ov19_021D9CA0: ; 0x021D9CA0 + ldr r1, _021D9CB0 ; =0x00000788 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021D9CAC + mov r0, #1 + bx lr +_021D9CAC: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D9CB0: .word 0x00000788 + thumb_func_end ov19_021D9CA0 + + thumb_func_start ov19_021D9CB4 +ov19_021D9CB4: ; 0x021D9CB4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D9D08 ; =0x00000784 + add r4, r1, #0 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D9CC8 + cmp r1, #1 + beq _021D9CE4 + pop {r3, r4, r5, pc} +_021D9CC8: + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021D6C + mov r0, #0x76 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021DEA74 + ldr r0, _021D9D08 ; =0x00000784 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D9CE4: + sub r0, #0x24 + ldr r0, [r4, r0] + bl ov19_021DEB08 + cmp r0, #0 + beq _021D9D04 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02021D6C + ldr r0, _021D9D0C ; =0x00000788 + mov r1, #0 + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 +_021D9D04: + pop {r3, r4, r5, pc} + nop +_021D9D08: .word 0x00000784 +_021D9D0C: .word 0x00000788 + thumb_func_end ov19_021D9CB4 + + thumb_func_start ov19_021D9D10 +ov19_021D9D10: ; 0x021D9D10 + push {r3, lr} + ldr r1, _021D9D24 ; =0x0000078D + ldrb r1, [r0, r1] + cmp r1, #0 + beq _021D9D22 + ldr r0, [r0, #4] + mov r1, #1 + bl sub_02021D6C +_021D9D22: + pop {r3, pc} + ; .align 2, 0 +_021D9D24: .word 0x0000078D + thumb_func_end ov19_021D9D10 + + thumb_func_start ov19_021D9D28 +ov19_021D9D28: ; 0x021D9D28 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D9D44 ; =0x0000078D + ldrb r0, [r4, r0] + cmp r0, #0 + beq _021D9D42 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021D6C + ldr r0, _021D9D44 ; =0x0000078D + mov r1, #0 + strb r1, [r4, r0] +_021D9D42: + pop {r4, pc} + ; .align 2, 0 +_021D9D44: .word 0x0000078D + thumb_func_end ov19_021D9D28 + + thumb_func_start ov19_021D9D48 +ov19_021D9D48: ; 0x021D9D48 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x79 + add r5, r3, #0 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r7, r2, #0 + add r4, r1, #0 + str r0, [sp] + bl ov19_021D5E10 + strb r0, [r7] + ldrb r0, [r7] + cmp r0, #4 + bhi _021D9DFC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9D72: ; jump table + .short _021D9D7C - _021D9D72 - 2 ; case 0 + .short _021D9DA6 - _021D9D72 - 2 ; case 1 + .short _021D9DC8 - _021D9D72 - 2 ; case 2 + .short _021D9DDA - _021D9D72 - 2 ; case 3 + .short _021D9DEC - _021D9D72 - 2 ; case 4 +_021D9D7C: + ldr r0, _021D9E00 ; =0x00000794 + ldr r0, [r5, r0] + bl ov19_021D7820 + add r5, r0, #0 + ldr r0, [sp] + bl ov19_021D5E14 + mov r1, #0x18 + add r5, #0x70 + mul r1, r0 + add r0, r5, r1 + str r0, [r6, #0] + ldr r0, [sp] + bl ov19_021D5E1C + mov r1, #0x18 + mul r1, r0 + add r1, #0x18 + str r1, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D9DA6: + ldr r0, [sp] + bl ov19_021D5E2C + add r7, r0, #0 + ldr r0, _021D9E00 ; =0x00000794 + ldr r0, [r5, r0] + bl ov19_021D77E8 + add r1, r7, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov19_021DCD30 + ldr r0, [r4, #0] + sub r0, #0x10 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D9DC8: + ldr r0, _021D9E00 ; =0x00000794 + ldr r0, [r5, r0] + bl ov19_021D7820 + add r0, #0xa8 + str r0, [r6, #0] + mov r0, #8 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D9DDA: + ldr r0, _021D9E00 ; =0x00000794 + ldr r0, [r5, r0] + bl ov19_021D7820 + add r0, #0x9f + str r0, [r6, #0] + mov r0, #0xa0 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D9DEC: + ldr r0, _021D9E00 ; =0x00000794 + ldr r0, [r5, r0] + bl ov19_021D7820 + add r0, #0xeb + str r0, [r6, #0] + mov r0, #0xa0 + str r0, [r4, #0] +_021D9DFC: + pop {r3, r4, r5, r6, r7, pc} + nop +_021D9E00: .word 0x00000794 + thumb_func_end ov19_021D9D48 + + thumb_func_start ov19_021D9E04 +ov19_021D9E04: ; 0x021D9E04 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + ldr r0, [r7, #4] + add r6, r1, #0 + bl sub_02021C50 + ldr r1, _021D9E98 ; =0x0000078C + ldrb r0, [r7, r1] + cmp r0, #0 + beq _021D9E5C + mov r0, #0 + sub r1, #0x38 + str r0, [sp] + str r0, [sp, #0x18] + ldr r0, [r7, r1] + cmp r0, #0 + bls _021D9E5C + add r4, r7, #0 + add r5, r7, #0 +_021D9E2C: + ldr r0, _021D9E9C ; =0x00000664 + ldr r1, [r6, #0] + ldr r0, [r4, r0] + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r0, _021D9EA0 ; =0x00000668 + ldr r1, [r6, #4] + ldr r0, [r4, r0] + sub r0, r1, r0 + str r0, [sp, #0x14] + ldr r0, [r5, #0x4c] + add r1, sp, #0x10 + bl sub_02021C50 + ldr r0, [sp] + add r4, #8 + add r0, r0, #1 + str r0, [sp] + ldr r0, _021D9EA4 ; =0x00000754 + add r5, #0x34 + ldr r1, [r7, r0] + ldr r0, [sp] + cmp r0, r1 + blo _021D9E2C +_021D9E5C: + ldr r0, _021D9EA8 ; =0x0000078D + ldrb r1, [r7, r0] + cmp r1, #0 + beq _021D9E6E + sub r0, #0x2d + ldr r0, [r7, r0] + add r1, r6, #0 + bl ov19_021DEB9C +_021D9E6E: + ldr r0, _021D9EAC ; =0x0000078E + ldrb r0, [r7, r0] + cmp r0, #0 + beq _021D9E94 + ldmia r6!, {r0, r1} + add r3, sp, #4 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + mov r0, #6 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [r7, #8] + add r1, r2, #0 + bl sub_02021C50 +_021D9E94: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D9E98: .word 0x0000078C +_021D9E9C: .word 0x00000664 +_021D9EA0: .word 0x00000668 +_021D9EA4: .word 0x00000754 +_021D9EA8: .word 0x0000078D +_021D9EAC: .word 0x0000078E + thumb_func_end ov19_021D9E04 + + thumb_func_start ov19_021D9EB0 +ov19_021D9EB0: ; 0x021D9EB0 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + mov r1, #0x79 + lsl r1, r1, #4 + str r0, [sp, #4] + ldr r0, [r0, r1] + bl ov19_021D5E10 + cmp r0, #0 + beq _021D9EC6 + b _021D9FE8 +_021D9EC6: + mov r1, #0x79 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl ov19_021D5F20 + cmp r0, #0 + beq _021D9F0E + mov r1, #0x79 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl ov19_021D5E24 + add r1, r0, #0 + ldr r3, [sp, #4] + ldr r2, _021DA020 ; =0x00000758 + ldr r0, [sp, #4] + add r3, #0x4c + ldr r0, [r0, r2] + ldr r2, _021DA024 ; =0x000004D8 + bl ov19_021D8408 + ldr r0, [sp, #4] + ldr r2, _021DA028 ; =0x00000754 + mov r1, #1 + str r1, [r0, r2] + add r1, r2, #0 + mov r3, #0 + sub r1, #0xf0 + str r3, [r0, r1] + ldr r1, _021DA02C ; =0xFFFFC000 + sub r2, #0xec + str r1, [r0, r2] + add sp, #0x34 + pop {r4, r5, r6, r7, pc} +_021D9F0E: + add r0, sp, #0x24 + str r0, [sp] + mov r1, #0x79 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + add r1, sp, #0x30 + add r2, sp, #0x2c + add r3, sp, #0x28 + bl ov19_021D5EE8 + mov r1, #0x79 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl ov19_021D5E14 + str r0, [sp, #0x18] + mov r1, #0x79 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl ov19_021D5E1C + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x24] + str r0, [sp, #0x1c] + cmp r0, r1 + bhi _021D9FDC + ldr r0, [sp, #4] + ldr r6, [sp, #4] + str r0, [sp, #0x10] + add r0, #0x4c + str r0, [sp, #0x10] + mov r7, #0x5f + ldr r0, [sp, #0x1c] + mov r1, #6 + mul r1, r0 + lsl r7, r7, #4 + str r1, [sp, #0xc] + add r5, r6, #0 +_021D9F66: + ldr r4, [sp, #0x30] + ldr r0, [sp, #0x2c] + cmp r4, r0 + bhi _021D9FCA + ldr r1, [sp, #0x1c] + ldr r0, [sp, #0x14] + sub r1, r1, r0 + mov r0, #0x18 + add r2, r1, #0 + mul r2, r0 + sub r0, #0x1c + sub r0, r0, r2 + lsl r0, r0, #0xc + str r0, [sp, #8] +_021D9F82: + ldr r1, [sp, #4] + ldr r0, _021DA020 ; =0x00000758 + ldr r3, [sp, #0x10] + ldr r0, [r1, r0] + ldr r1, [sp, #0xc] + add r2, r7, #0 + add r1, r4, r1 + bl ov19_021D8408 + ldr r0, [r6, #0x4c] + cmp r0, #0 + beq _021D9FC2 + ldr r0, [sp, #0x18] + add r7, #0x10 + sub r1, r4, r0 + mov r0, #6 + add r2, r1, #0 + lsl r0, r0, #0xe + mul r2, r0 + ldr r0, _021DA030 ; =0x00000664 + ldr r1, [sp, #8] + str r2, [r5, r0] + add r0, r0, #4 + str r1, [r5, r0] + ldr r0, [sp, #0x10] + add r6, #0x34 + add r0, #0x34 + str r0, [sp, #0x10] + ldr r0, [sp, #0x20] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #0x20] +_021D9FC2: + ldr r0, [sp, #0x2c] + add r4, r4, #1 + cmp r4, r0 + bls _021D9F82 +_021D9FCA: + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x24] + add r0, r0, #6 + str r0, [sp, #0xc] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, r1 + bls _021D9F66 +_021D9FDC: + ldr r2, _021DA028 ; =0x00000754 + ldr r1, [sp, #0x20] + ldr r0, [sp, #4] + add sp, #0x34 + str r1, [r0, r2] + pop {r4, r5, r6, r7, pc} +_021D9FE8: + mov r1, #0x79 + ldr r0, [sp, #4] + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl ov19_021D5E2C + add r1, r0, #0 + ldr r3, [sp, #4] + ldr r2, _021DA034 ; =0x0000075C + ldr r0, [sp, #4] + add r3, #0x4c + ldr r0, [r0, r2] + ldr r2, _021DA024 ; =0x000004D8 + bl ov19_021DCC44 + ldr r2, _021DA028 ; =0x00000754 + ldr r0, [sp, #4] + mov r1, #1 + str r1, [r0, r2] + add r1, r2, #0 + mov r3, #0 + sub r1, #0xf0 + str r3, [r0, r1] + ldr r1, _021DA02C ; =0xFFFFC000 + sub r2, #0xec + str r1, [r0, r2] + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DA020: .word 0x00000758 +_021DA024: .word 0x000004D8 +_021DA028: .word 0x00000754 +_021DA02C: .word 0xFFFFC000 +_021DA030: .word 0x00000664 +_021DA034: .word 0x0000075C + thumb_func_end ov19_021D9EB0 + + thumb_func_start ov19_021DA038 +ov19_021DA038: ; 0x021DA038 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _021DA064 ; =0x00000754 + mov r4, #0 + ldr r0, [r6, r0] + cmp r0, #0 + bls _021DA05C + ldr r7, _021DA064 ; =0x00000754 + add r5, r6, #0 +_021DA04A: + ldr r0, [r5, #0x4c] + mov r1, #2 + bl ov19_021D78AC + ldr r0, [r6, r7] + add r4, r4, #1 + add r5, #0x34 + cmp r4, r0 + blo _021DA04A +_021DA05C: + ldr r0, _021DA068 ; =0x0000078C + mov r1, #1 + strb r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DA064: .word 0x00000754 +_021DA068: .word 0x0000078C + thumb_func_end ov19_021DA038 + + thumb_func_start ov19_021DA06C +ov19_021DA06C: ; 0x021DA06C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E10 + cmp r0, #0 + bne _021DA0E8 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5F20 + cmp r0, #0 + beq _021DA0A6 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E24 + add r1, r0, #0 + ldr r0, _021DA104 ; =0x00000758 + ldr r0, [r5, r0] + add r5, #0x4c + add r2, r5, #0 + bl ov19_021D845C + pop {r3, r4, r5, r6, r7, pc} +_021DA0A6: + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5F3C + add r7, r0, #0 + ldr r0, _021DA108 ; =0x00000754 + mov r4, #0 + ldr r0, [r5, r0] + cmp r0, #0 + bls _021DA100 + add r6, r5, #0 + add r6, #0x4c +_021DA0C0: + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov19_021D5F6C + add r1, r0, #0 + ldr r0, _021DA104 ; =0x00000758 + add r1, r7, r1 + ldr r0, [r5, r0] + add r2, r6, #0 + bl ov19_021D845C + ldr r0, _021DA108 ; =0x00000754 + add r4, r4, #1 + ldr r0, [r5, r0] + add r6, #0x34 + cmp r4, r0 + blo _021DA0C0 + pop {r3, r4, r5, r6, r7, pc} +_021DA0E8: + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E2C + add r1, r0, #0 + ldr r0, _021DA10C ; =0x0000075C + ldr r0, [r5, r0] + add r5, #0x4c + add r2, r5, #0 + bl ov19_021DCC80 +_021DA100: + pop {r3, r4, r5, r6, r7, pc} + nop +_021DA104: .word 0x00000758 +_021DA108: .word 0x00000754 +_021DA10C: .word 0x0000075C + thumb_func_end ov19_021DA06C + + thumb_func_start ov19_021DA110 +ov19_021DA110: ; 0x021DA110 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E10 + cmp r0, #0 + bne _021DA186 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E24 + add r4, r0, #0 + ldr r0, _021DA1EC ; =0x00000758 + add r1, r4, #0 + ldr r0, [r5, r0] + bl ov19_021D84C8 + add r6, r0, #0 + add r1, r5, #0 + mov r2, #0x5f + ldr r0, [r5, #0x48] + add r1, #0x4c + lsl r2, r2, #4 + bl ov19_021DA754 + mov r2, #6 + ldr r0, [r5, #0x48] + add r1, r6, #0 + lsl r2, r2, #8 + bl ov19_021DA754 + bl sub_020C3E14 + ldr r0, _021DA1EC ; =0x00000758 + add r3, r5, #0 + ldr r0, [r5, r0] + ldr r2, _021DA1F0 ; =0x000004D8 + add r1, r4, #0 + add r3, #0x80 + bl ov19_021D8408 + ldr r0, _021DA1EC ; =0x00000758 + add r2, r5, #0 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, #0x4c + bl ov19_021D845C + add r0, r5, #0 + add r5, #0x4c + add r0, #0x80 + add r1, r5, #0 + mov r2, #1 + bl ov19_021DA418 + pop {r4, r5, r6, pc} +_021DA186: + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl ov19_021D5E2C + add r4, r0, #0 + ldr r0, _021DA1F4 ; =0x0000075C + add r1, r4, #0 + ldr r0, [r5, r0] + bl ov19_021DCD18 + add r6, r0, #0 + add r1, r5, #0 + mov r2, #0x5f + ldr r0, [r5, #0x48] + add r1, #0x4c + lsl r2, r2, #4 + bl ov19_021DA754 + mov r2, #6 + ldr r0, [r5, #0x48] + add r1, r6, #0 + lsl r2, r2, #8 + bl ov19_021DA754 + bl sub_020C3E14 + ldr r0, _021DA1F4 ; =0x0000075C + add r3, r5, #0 + ldr r0, [r5, r0] + ldr r2, _021DA1F0 ; =0x000004D8 + add r1, r4, #0 + add r3, #0x80 + bl ov19_021DCC44 + ldr r0, _021DA1F4 ; =0x0000075C + add r2, r5, #0 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, #0x4c + bl ov19_021DCCD4 + add r0, r5, #0 + add r5, #0x4c + add r0, #0x80 + add r1, r5, #0 + mov r2, #1 + bl ov19_021DA418 + pop {r4, r5, r6, pc} + nop +_021DA1EC: .word 0x00000758 +_021DA1F0: .word 0x000004D8 +_021DA1F4: .word 0x0000075C + thumb_func_end ov19_021DA110 + + thumb_func_start ov19_021DA1F8 +ov19_021DA1F8: ; 0x021DA1F8 + ldr r1, _021DA200 ; =0x0000078C + mov r2, #0 + strb r2, [r0, r1] + bx lr + ; .align 2, 0 +_021DA200: .word 0x0000078C + thumb_func_end ov19_021DA1F8 + + thumb_func_start ov19_021DA204 +ov19_021DA204: ; 0x021DA204 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #0x48] + add r1, #0x4c + mov r2, #1 + bl ov19_021DA3F0 + ldr r0, _021DA220 ; =0x0000078C + mov r1, #0 + strb r1, [r4, r0] + sub r0, #0x38 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021DA220: .word 0x0000078C + thumb_func_end ov19_021DA204 + + thumb_func_start ov19_021DA224 +ov19_021DA224: ; 0x021DA224 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E10 + cmp r0, #0 + bne _021DA24E + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E24 + add r1, r0, #0 + ldr r0, _021DA268 ; =0x00000758 + ldr r0, [r4, r0] + bl ov19_021D84C8 + ldr r0, [r0, #0] + pop {r4, pc} +_021DA24E: + mov r0, #0x79 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov19_021D5E2C + add r1, r0, #0 + ldr r0, _021DA26C ; =0x0000075C + ldr r0, [r4, r0] + bl ov19_021DCD18 + ldr r0, [r0, #0] + pop {r4, pc} + nop +_021DA268: .word 0x00000758 +_021DA26C: .word 0x0000075C + thumb_func_end ov19_021DA224 \ No newline at end of file diff --git a/asm/ov19_021DA270.s b/asm/ov19_021DA270.s new file mode 100644 index 000000000..b94ba6f0f --- /dev/null +++ b/asm/ov19_021DA270.s @@ -0,0 +1,747 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DA270 +ov19_021DA270: ; 0x021DA270 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x13 + mov r1, #0xa + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r4, [sp, #0x48] + bl sub_02006C24 + str r0, [r5, #0x48] + add r0, sp, #0x1c + bl sub_020A81D0 + bl sub_02079FD0 + add r1, r0, #0 + mov r0, #0xa + str r0, [sp] + add r0, sp, #0x1c + str r0, [sp, #4] + ldr r0, [r5, #0x48] + mov r2, #1 + mov r3, #0x40 + bl sub_0200716C + bl sub_02079FD0 + add r1, r0, #0 + ldr r0, [r5, #0x48] + add r2, sp, #0x18 + mov r3, #0xa + bl sub_020071EC + str r0, [sp, #0x10] + cmp r0, #0 + beq _021DA308 + add r0, sp, #0x1c + bl sub_020A81D0 + ldr r0, [sp, #0x10] + add r1, sp, #0x14 + bl sub_020A71EC + ldr r2, [sp, #0x18] + add r7, r0, #0 + ldr r0, [r2, #0xc] + mov r1, #8 + str r1, [sp] + ldr r2, [r2, #8] + ldr r3, _021DA380 ; =0x0000057F + add r1, r0, #0 + lsr r2, r2, #1 + bl ov19_021D78C8 + cmp r7, #0 + beq _021DA2F6 + add r0, sp, #0x1c + str r0, [sp] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + mov r2, #0xc0 + mov r3, #1 + bl sub_020A8948 + b _021DA302 +_021DA2F6: + ldr r0, [sp, #0x18] + mov r1, #0xc0 + mov r2, #1 + add r3, sp, #0x1c + bl sub_020A8850 +_021DA302: + ldr r0, [sp, #0x10] + bl sub_020181C4 +_021DA308: + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x15 + mov r2, #1 + add r3, #0x10 + bl sub_02007204 + str r0, [r5, #8] + mov r0, #0xa + str r0, [sp] + add r0, r4, #0 + mov r1, #0x16 + mov r2, #1 + add r3, r5, #4 + bl sub_02007220 + str r0, [r5, #0] + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + add r3, #0x1c + bl sub_02007204 + str r0, [r5, #0x14] + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x18 + mov r2, #1 + add r3, #0x20 + bl sub_02007220 + str r0, [r5, #0x18] + ldr r0, [r5, #8] + cmp r0, #0 + beq _021DA368 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DA368 + ldr r0, [r5, #0x48] + cmp r0, #0 + bne _021DA36E +_021DA368: + add sp, #0x30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DA36E: + ldr r0, [sp, #0xc] + str r0, [r5, #0x24] + ldr r0, [sp, #8] + str r0, [r5, #0x40] + str r6, [r5, #0x44] + mov r0, #1 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DA380: .word 0x0000057F + thumb_func_end ov19_021DA270 + + thumb_func_start ov19_021DA384 +ov19_021DA384: ; 0x021DA384 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021DA396 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] +_021DA396: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021DA3A4 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] +_021DA3A4: + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021DA3B2 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x14] +_021DA3B2: + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _021DA3C0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x18] +_021DA3C0: + ldr r0, [r4, #0x48] + cmp r0, #0 + beq _021DA3CA + bl sub_02006CA8 +_021DA3CA: + pop {r4, pc} + thumb_func_end ov19_021DA384 + + thumb_func_start ov19_021DA3CC +ov19_021DA3CC: ; 0x021DA3CC + push {r4, r5, r6, lr} + add r4, r2, #0 + add r0, r4, #0 + add r5, r1, #0 + sub r4, r4, #1 + cmp r0, #0 + beq _021DA3EE + mov r6, #0 +_021DA3DC: + add r0, r5, #4 + str r6, [r5, #0] + bl sub_020A818C + add r0, r4, #0 + add r5, #0x34 + sub r4, r4, #1 + cmp r0, #0 + bne _021DA3DC +_021DA3EE: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DA3CC + + thumb_func_start ov19_021DA3F0 +ov19_021DA3F0: ; 0x021DA3F0 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r0, r4, #0 + add r5, r1, #0 + sub r4, r4, #1 + cmp r0, #0 + beq _021DA416 + mov r6, #0 +_021DA400: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DA40C + bl sub_02021BD4 + str r6, [r5, #0] +_021DA40C: + add r0, r4, #0 + add r5, #0x34 + sub r4, r4, #1 + cmp r0, #0 + bne _021DA400 +_021DA416: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DA3F0 + + thumb_func_start ov19_021DA418 +ov19_021DA418: ; 0x021DA418 + mov r3, #0x34 + mul r3, r2 + add r2, r3, #0 + ldr r3, _021DA424 ; =sub_020C4B68 + bx r3 + nop +_021DA424: .word sub_020C4B68 + thumb_func_end ov19_021DA418 + + thumb_func_start ov19_021DA428 +ov19_021DA428: ; 0x021DA428 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r4, [sp, #0x64] + bl sub_02073D20 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + ldr r0, [r5, #0x44] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r5, #4] + mov r1, #0 + str r0, [sp] + ldr r0, [sp, #0x58] + str r0, [sp, #4] + ldr r3, [r5, #0x10] + add r0, sp, #0x20 + bl ov19_021D783C + add r0, r6, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x18] + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r6, #0 + bl sub_02079D40 + str r0, [r4, #0x28] + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x14] + add r1, r7, #0 + bl sub_02079EDC + strh r0, [r4, #0x2c] + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074570 + strh r0, [r4, #0x30] + add r0, r6, #0 + mov r1, #0xb + mov r2, #0 + bl sub_02074570 + strh r0, [r4, #0x2e] + add r0, r4, #4 + bl sub_020A818C + add r0, r5, #0 + add r0, #0x4c + str r0, [sp] + mov r3, #0xa + ldr r0, [r5, #0x48] + ldr r1, [r4, #0x28] + mov r2, #0 + lsl r3, r3, #6 + bl sub_02006DC8 + add r0, r5, #0 + add r0, #0x4c + add r1, sp, #0x1c + bl sub_020A7118 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021DA544 ; =0x00300010 + add r3, r4, #4 + and r1, r0 + ldr r0, [sp, #0x1c] + str r1, [r0, #8] + lsr r1, r2, #0x11 + ldr r0, [sp, #0x1c] + mov r2, #1 + str r1, [r0, #0x10] + ldr r1, [sp, #0x60] + ldr r0, [sp, #0x1c] + lsl r1, r1, #5 + bl sub_020A8224 + add r0, r4, #4 + str r0, [sp, #0x20] + ldr r0, [sp, #0x5c] + ldr r2, [sp, #8] + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x24] + ldr r3, [sp, #0xc] + add r1, sp, #0x20 + bl ov19_021D785C + str r0, [r4, #0] + cmp r0, #0 + bne _021DA51E + bl sub_02022974 +_021DA51E: + ldrh r1, [r4, #0x2c] + ldr r0, [r4, #0] + add r1, r1, #2 + bl sub_02021E90 + ldr r0, [r5, #0x40] + bl ov19_021D5EC8 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DA63C + ldr r1, [sp, #0x10] + add r0, r6, #0 + bl sub_02073D48 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DA544: .word 0x00300010 + thumb_func_end ov19_021DA428 + + thumb_func_start ov19_021DA548 +ov19_021DA548: ; 0x021DA548 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + str r2, [sp, #8] + add r7, r3, #0 + ldr r4, [sp, #0x70] + bl sub_02073D20 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + add r0, r6, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [r5, #0x44] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r5, #4] + mov r1, #0 + str r0, [sp] + ldr r0, [sp, #0x64] + str r0, [sp, #4] + ldr r3, [r5, #0x10] + add r0, sp, #0x1c + bl ov19_021D783C + str r7, [r4, #0x28] + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + bl sub_02079EDC + strh r0, [r4, #0x2c] + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074570 + strh r0, [r4, #0x30] + add r0, r6, #0 + mov r1, #0xb + mov r2, #0 + bl sub_02074570 + strh r0, [r4, #0x2e] + add r0, r4, #4 + bl sub_020A818C + ldr r0, [sp, #0x58] + add r1, sp, #0x18 + bl sub_020A7118 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021DA638 ; =0x00300010 + add r3, r4, #4 + and r1, r0 + ldr r0, [sp, #0x18] + str r1, [r0, #8] + lsr r1, r2, #0x11 + ldr r0, [sp, #0x18] + mov r2, #1 + str r1, [r0, #0x10] + ldr r1, [sp, #0x6c] + ldr r0, [sp, #0x18] + lsl r1, r1, #5 + bl sub_020A8224 + add r0, r4, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x68] + ldr r2, [sp, #0x5c] + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x24] + ldr r3, [sp, #0x60] + add r1, sp, #0x1c + bl ov19_021D785C + str r0, [r4, #0] + cmp r0, #0 + bne _021DA610 + bl sub_02022974 +_021DA610: + ldrh r1, [r4, #0x2c] + ldr r0, [r4, #0] + add r1, r1, #2 + bl sub_02021E90 + ldr r0, [r5, #0x40] + bl ov19_021D5EC8 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DA63C + ldr r1, [sp, #0x14] + add r0, r6, #0 + bl sub_02073D48 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DA638: .word 0x00300010 + thumb_func_end ov19_021DA548 + + thumb_func_start ov19_021DA63C +ov19_021DA63C: ; 0x021DA63C + push {r4, r5, r6, lr} + cmp r2, #0 + beq _021DA682 + mov r3, #1 + add r0, r2, #0 + tst r0, r3 + beq _021DA65A + ldrh r0, [r1, #0x30] + cmp r0, #0 + bne _021DA65A + ldr r0, [r1, #0] + add r1, r3, #0 + bl sub_02021FE0 + pop {r4, r5, r6, pc} +_021DA65A: + mov r3, #0 + mov r4, #1 + mov r0, #2 +_021DA660: + add r5, r0, #0 + lsl r5, r3 + tst r5, r2 + beq _021DA67C + add r5, r4, #0 + ldrh r6, [r1, #0x2e] + lsl r5, r3 + tst r5, r6 + bne _021DA67C + ldr r0, [r1, #0] + add r1, r4, #0 + bl sub_02021FE0 + pop {r4, r5, r6, pc} +_021DA67C: + add r3, r3, #1 + cmp r3, #6 + blt _021DA660 +_021DA682: + ldr r0, [r1, #0] + mov r1, #0 + bl sub_02021FE0 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DA63C + + thumb_func_start ov19_021DA68C +ov19_021DA68C: ; 0x021DA68C + strh r2, [r1, #0x2e] + bx lr + thumb_func_end ov19_021DA68C + + thumb_func_start ov19_021DA690 +ov19_021DA690: ; 0x021DA690 + strh r2, [r1, #0x30] + bx lr + thumb_func_end ov19_021DA690 + + thumb_func_start ov19_021DA694 +ov19_021DA694: ; 0x021DA694 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #0x30] + add r6, r2, #0 + cmp r0, #0x70 + bne _021DA6C2 + mov r1, #0 + ldr r0, _021DA740 ; =0x000001E7 + add r2, r1, #0 + bl sub_02079D8C + ldr r1, [r4, #0x28] + cmp r1, r0 + bne _021DA6C2 + ldr r0, _021DA740 ; =0x000001E7 + mov r1, #0 + mov r2, #1 + bl sub_02079D8C + str r0, [r4, #0x28] + b _021DA70A +_021DA6C2: + ldrh r0, [r4, #0x30] + cmp r0, #0x70 + beq _021DA6E6 + ldr r0, _021DA740 ; =0x000001E7 + mov r1, #0 + mov r2, #1 + bl sub_02079D8C + ldr r1, [r4, #0x28] + cmp r1, r0 + bne _021DA6E6 + mov r1, #0 + ldr r0, _021DA740 ; =0x000001E7 + add r2, r1, #0 + bl sub_02079D8C + str r0, [r4, #0x28] + b _021DA70A +_021DA6E6: + cmp r6, #1 + bne _021DA73C + mov r0, #0x7b + lsl r0, r0, #2 + mov r1, #0 + mov r2, #1 + bl sub_02079D8C + ldr r1, [r4, #0x28] + cmp r1, r0 + bne _021DA73C + mov r0, #0x7b + mov r1, #0 + lsl r0, r0, #2 + add r2, r1, #0 + bl sub_02079D8C + str r0, [r4, #0x28] +_021DA70A: + add r0, r5, #0 + ldr r6, [r4, #8] + add r0, #0x4c + str r0, [sp] + mov r3, #0xa + mov r7, #0x19 + ldr r0, [r5, #0x48] + ldr r1, [r4, #0x28] + mov r2, #0 + lsl r3, r3, #6 + lsl r7, r7, #0x16 + bl sub_02006DC8 + add r5, #0x4c + add r0, r5, #0 + add r1, sp, #4 + bl sub_020A7118 + ldr r0, [sp, #4] + mov r2, #2 + ldr r0, [r0, #0x14] + add r1, r6, r7 + lsl r2, r2, #8 + bl sub_020C4B68 +_021DA73C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DA740: .word 0x000001E7 + thumb_func_end ov19_021DA694 + + thumb_func_start ov19_021DA744 +ov19_021DA744: ; 0x021DA744 + push {r3, lr} + str r1, [sp] + ldr r0, [r0, #0x48] + add r1, r2, #0 + mov r2, #0 + bl sub_02006DC8 + pop {r3, pc} + thumb_func_end ov19_021DA744 + + thumb_func_start ov19_021DA754 +ov19_021DA754: ; 0x021DA754 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r6, r2, #0 + cmp r0, #0 + beq _021DA7B0 + add r0, r4, #4 + bl sub_020A818C + add r0, r5, #0 + add r0, #0x4c + str r0, [sp] + mov r3, #0xa + ldr r0, [r5, #0x48] + ldr r1, [r4, #0x28] + mov r2, #0 + lsl r3, r3, #6 + bl sub_02006DC8 + add r5, #0x4c + add r0, r5, #0 + add r1, sp, #4 + bl sub_020A7118 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021DA7B4 ; =0x00300010 + add r3, r4, #4 + and r1, r0 + ldr r0, [sp, #4] + str r1, [r0, #8] + lsr r1, r2, #0x11 + ldr r0, [sp, #4] + mov r2, #1 + str r1, [r0, #0x10] + ldr r0, [sp, #4] + lsl r1, r6, #5 + bl sub_020A8224 + ldr r0, [r4, #0] + add r1, r4, #4 + bl sub_02021F7C +_021DA7B0: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DA7B4: .word 0x00300010 + thumb_func_end ov19_021DA754 + + thumb_func_start ov19_021DA7B8 +ov19_021DA7B8: ; 0x021DA7B8 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + sub r0, r4, #1 + cmp r0, #1 + ldr r0, [r5, #0] + bhi _021DA7CE + mov r1, #1 + bl sub_02021CF8 + b _021DA7D4 +_021DA7CE: + mov r1, #0 + bl sub_02021CF8 +_021DA7D4: + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_02021D6C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DA7B8 + + thumb_func_start ov19_021DA7E0 +ov19_021DA7E0: ; 0x021DA7E0 + push {r3, lr} + ldr r0, [r1, #0] + bl sub_02021FD0 + cmp r0, #0 + bne _021DA7F0 + mov r0, #1 + pop {r3, pc} +_021DA7F0: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov19_021DA7E0 + + thumb_func_start ov19_021DA7F4 +ov19_021DA7F4: ; 0x021DA7F4 + cmp r2, #0 + beq _021DA7FC + mov r2, #6 + b _021DA7FE +_021DA7FC: + mov r2, #2 +_021DA7FE: + ldr r0, [r1, #0] + ldrh r1, [r1, #0x2c] + ldr r3, _021DA808 ; =sub_02021E90 + add r1, r1, r2 + bx r3 + ; .align 2, 0 +_021DA808: .word sub_02021E90 + thumb_func_end ov19_021DA7F4 + + thumb_func_start ov19_021DA80C +ov19_021DA80C: ; 0x021DA80C + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov19_021DA80C + + thumb_func_start ov19_021DA810 +ov19_021DA810: ; 0x021DA810 + ldr r0, [r0, #4] + bx lr + thumb_func_end ov19_021DA810 \ No newline at end of file diff --git a/asm/ov19_021DA814.s b/asm/ov19_021DA814.s new file mode 100644 index 000000000..a280219d6 --- /dev/null +++ b/asm/ov19_021DA814.s @@ -0,0 +1,156 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DA814 +ov19_021DA814: ; 0x021DA814 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + str r1, [r4, #0x44] + str r3, [r4, #0x3c] + str r2, [r4, #0x40] + str r3, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + mov r1, #0xa + add r3, r4, #0 + ldr r0, [sp, #0x10] + str r1, [sp] + mov r2, #1 + add r3, #0x10 + bl sub_02007204 + str r0, [r4, #8] + mov r0, #0xa + str r0, [sp] + add r3, r4, #0 + ldr r0, [sp, #0x10] + mov r1, #0xb + mov r2, #1 + add r3, #0x14 + bl sub_02007220 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + cmp r0, #0 + beq _021DA858 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _021DA85E +_021DA858: + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_021DA85E: + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov19_021DA814 + + thumb_func_start ov19_021DA864 +ov19_021DA864: ; 0x021DA864 + push {r3, r4, r5, lr} + sub sp, #0x38 + add r5, r0, #0 + add r0, #0x18 + add r4, r1, #0 + bl sub_020A818C + mov r3, #0 + mov r0, #0x9d + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + lsl r0, r0, #8 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0x18 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #9 + bl sub_0200718C + ldr r0, [r5, #0x44] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r5, #0x14] + add r1, r5, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r3, [r5, #0x10] + add r0, sp, #0x14 + add r1, #0x18 + bl ov19_021D783C + ldr r0, [r5, #0x44] + bl ov19_021D7820 + add r2, r0, #0 + mov r0, #0x2c + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r1, sp, #0x14 + add r2, #0xb7 + mov r3, #0xb0 + bl ov19_021D785C + mov r1, #1 + str r0, [r5, #4] + bl sub_02021E90 + add sp, #0x38 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DA864 + + thumb_func_start ov19_021DA8D8 +ov19_021DA8D8: ; 0x021DA8D8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021DA8EA + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] +_021DA8EA: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021DA8F8 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0xc] +_021DA8F8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DA8D8 + + thumb_func_start ov19_021DA8FC +ov19_021DA8FC: ; 0x021DA8FC + push {r3, lr} + cmp r1, #0 + beq _021DA90C + cmp r1, #1 + beq _021DA916 + cmp r1, #2 + beq _021DA920 + pop {r3, pc} +_021DA90C: + ldr r0, [r0, #4] + mov r1, #0 + bl sub_02021D6C + pop {r3, pc} +_021DA916: + ldr r0, [r0, #4] + mov r1, #1 + bl sub_02021D6C + pop {r3, pc} +_021DA920: + ldr r0, [r0, #4] + mov r1, #2 + bl sub_02021D6C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov19_021DA8FC \ No newline at end of file diff --git a/asm/ov19_021DA92C.s b/asm/ov19_021DA92C.s new file mode 100644 index 000000000..6d9bc7282 --- /dev/null +++ b/asm/ov19_021DA92C.s @@ -0,0 +1,1282 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DA92C +ov19_021DA92C: ; 0x021DA92C + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r1, #0 + add r7, r3, #0 + bl ov19_021D5E08 + cmp r0, #4 + bne _021DA948 + mov r0, #0 + str r0, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DA948: + str r4, [r5, #0x14] + str r7, [r5, #8] + ldr r0, [sp, #0x18] + str r6, [r5, #0x10] + str r0, [r5, #0xc] + mov r0, #0 + str r0, [r5, #4] + str r0, [r5, #0x4c] + str r0, [r5, #0x24] + add r0, r4, #0 + bl ov19_021D7818 + str r0, [r5, #0x20] + mov r0, #9 + mov r1, #6 + mov r2, #0xf + mov r3, #0xa + bl sub_0200C440 + str r0, [r5, #0x18] + mov r0, #1 + mov r1, #2 + mov r2, #0xf + mov r3, #0xa + bl sub_0200C440 + str r0, [r5, #0x1c] + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x20] + mov r1, #0x10 + mov r2, #1 + add r3, #0x2c + bl sub_02007204 + str r0, [r5, #0x28] + mov r0, #0 + str r0, [r5, #0x30] + ldr r0, [sp, #0x1c] + mov r1, #0x15 + bl sub_0200B1EC + str r0, [r5, #0x44] + ldr r0, [sp, #0x1c] + mov r1, #0x16 + bl sub_0200B1EC + str r0, [r5, #0x48] + bl sub_0207C944 + add r4, r0, #0 + bl sub_0207C924 + add r1, r0, #0 + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r2, #1 + add r3, #0x38 + bl sub_02006FA0 + mov r1, #0 + str r0, [r5, #0x34] + add r2, r5, #0 + add r0, r1, #0 +_021DA9CE: + add r1, r1, #1 + str r0, [r2, #0x3c] + add r2, r2, #4 + cmp r1, #2 + blt _021DA9CE + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DA92C + + thumb_func_start ov19_021DA9E0 +ov19_021DA9E0: ; 0x021DA9E0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DAA7E + ldr r0, [r5, #4] + cmp r0, #0 + beq _021DAA0E + mov r6, #0 + add r4, r6, #0 +_021DA9F4: + ldr r0, [r5, #4] + add r0, r0, r4 + bl sub_0201A8FC + add r6, r6, #1 + add r4, #0x10 + cmp r6, #4 + blt _021DA9F4 + ldr r0, [r5, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r5, #4] +_021DAA0E: + ldr r0, [r5, #0x18] + cmp r0, #0 + beq _021DAA18 + bl sub_0200C560 +_021DAA18: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _021DAA22 + bl sub_0200C560 +_021DAA22: + ldr r0, [r5, #0x44] + cmp r0, #0 + beq _021DAA2C + bl sub_020237BC +_021DAA2C: + ldr r0, [r5, #0x48] + cmp r0, #0 + beq _021DAA36 + bl sub_020237BC +_021DAA36: + ldr r0, [r5, #0x24] + cmp r0, #0 + beq _021DAA44 + bl sub_02007DC8 + mov r0, #0 + str r0, [r5, #0x24] +_021DAA44: + ldr r0, [r5, #0x28] + cmp r0, #0 + beq _021DAA4E + bl sub_020181C4 +_021DAA4E: + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021DAA58 + bl sub_02021BD4 +_021DAA58: + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DAA62 + bl sub_020181C4 +_021DAA62: + mov r6, #0 + add r4, r5, #0 +_021DAA66: + ldr r0, [r4, #0x3c] + cmp r0, #0 + beq _021DAA70 + bl sub_02021BD4 +_021DAA70: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #2 + blt _021DAA66 + add r0, r5, #0 + bl ov19_021DAC90 +_021DAA7E: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DA9E0 + + thumb_func_start ov19_021DAA80 +ov19_021DAA80: ; 0x021DAA80 + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #0 + beq _021DAA8E + ldr r0, [r0, #0x20] + bl sub_02008A94 +_021DAA8E: + pop {r3, pc} + thumb_func_end ov19_021DAA80 + + thumb_func_start ov19_021DAA90 +ov19_021DAA90: ; 0x021DAA90 + push {r4, lr} + sub sp, #0x20 + mov r2, #0 + str r2, [sp] + add r4, r0, #0 + str r2, [sp, #4] + add r0, sp, #0x10 + mov r1, #1 + add r3, r2, #0 + str r2, [sp, #8] + bl sub_02075FB4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r4, #0x20] + add r1, sp, #0x10 + mov r2, #0x2c + mov r3, #0x54 + bl sub_02007C34 + str r0, [r4, #0x24] + add sp, #0x20 + pop {r4, pc} + thumb_func_end ov19_021DAA90 + + thumb_func_start ov19_021DAAC4 +ov19_021DAAC4: ; 0x021DAAC4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021DAAD8 + bl sub_02007DC8 + mov r0, #0 + str r0, [r4, #0x24] + pop {r4, pc} +_021DAAD8: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov19_021DAAC4 + + thumb_func_start ov19_021DAADC +ov19_021DAADC: ; 0x021DAADC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DAB3C + mov r0, #0xa + mov r1, #4 + bl sub_0201A778 + str r0, [r5, #4] + cmp r0, #0 + beq _021DAB30 + mov r7, #0 + ldr r6, _021DAB40 ; =0x021E01D8 + add r4, r7, #0 +_021DAAFA: + ldr r1, [r5, #4] + ldr r0, [r5, #8] + add r1, r1, r4 + add r2, r6, #0 + bl sub_0201A8D4 + cmp r7, #3 + ldr r0, [r5, #4] + beq _021DAB14 + add r0, r0, r4 + bl sub_0201A9F4 + b _021DAB1E +_021DAB14: + add r0, r0, r4 + mov r1, #0xc + mov r2, #2 + bl sub_0201AA10 +_021DAB1E: + add r7, r7, #1 + add r6, #8 + add r4, #0x10 + cmp r7, #4 + blt _021DAAFA + ldr r0, [r5, #8] + mov r1, #2 + bl sub_02019448 +_021DAB30: + add r0, r5, #0 + bl ov19_021DAB44 + add r0, r5, #0 + bl ov19_021DAC4C +_021DAB3C: + pop {r3, r4, r5, r6, r7, pc} + nop +_021DAB40: .word 0x021E01D8 + thumb_func_end ov19_021DAADC + + thumb_func_start ov19_021DAB44 +ov19_021DAB44: ; 0x021DAB44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x68 + add r5, r0, #0 + bl sub_0207C944 + str r0, [sp, #0x1c] + mov r0, #2 + bl sub_0207C908 + str r0, [sp, #0x18] + bl sub_0207C920 + add r1, r0, #0 + mov r0, #0x60 + str r0, [sp] + mov r3, #0xa + str r3, [sp, #4] + ldr r0, [sp, #0x1c] + mov r2, #1 + lsl r3, r3, #5 + bl sub_02006E84 + mov r0, #0 + mov r6, #0x5e + str r0, [sp, #0x14] + lsl r6, r6, #4 + mov r7, #0x18 + add r4, r5, #0 +_021DAB7C: + add r0, sp, #0x44 + bl sub_020A818C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + lsl r0, r6, #5 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, sp, #0x44 + str r0, [sp, #0x10] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + mov r2, #1 + mov r3, #0 + bl sub_02006F28 + ldr r0, [r5, #0x14] + bl ov19_021D77D0 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r3, [r5, #0x38] + add r0, sp, #0x20 + add r1, sp, #0x44 + bl ov19_021D783C + mov r0, #0x2e + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + add r1, sp, #0x20 + add r2, r7, #0 + mov r3, #0xb0 + bl ov19_021D785C + str r0, [r4, #0x3c] + cmp r0, #0 + bne _021DABDA + bl sub_02022974 +_021DABDA: + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_02021CAC + ldr r0, [sp, #0x14] + add r6, #8 + add r0, r0, #1 + add r7, #0x24 + add r4, r4, #4 + str r0, [sp, #0x14] + cmp r0, #2 + blo _021DAB7C + add r0, sp, #0x44 + bl sub_020A818C + mov r3, #0 + mov r0, #0xb9 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + lsl r0, r0, #8 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, sp, #0x44 + str r0, [sp, #0x10] + mov r0, #0x12 + mov r1, #0xf + bl sub_02006F00 + ldr r0, [r5, #0x14] + bl ov19_021D77D0 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r3, [r5, #0x2c] + add r0, sp, #0x20 + add r1, sp, #0x44 + bl ov19_021D783C + mov r0, #0x2f + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + add r1, sp, #0x20 + mov r2, #0x38 + mov r3, #0xb0 + bl ov19_021D785C + str r0, [r5, #0x30] + add sp, #0x68 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DAB44 + + thumb_func_start ov19_021DAC4C +ov19_021DAC4C: ; 0x021DAC4C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x4c] + cmp r0, #0 + bne _021DAC8A + mov r0, #0xa + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + beq _021DAC86 + ldr r0, [r5, #0x10] + bl ov19_021D5E70 + ldrb r0, [r0, #0xf] + cmp r0, #0 + beq _021DAC72 + mov r0, #4 + b _021DAC74 +_021DAC72: + mov r0, #0 +_021DAC74: + strh r0, [r4] + ldr r0, _021DAC8C ; =ov19_021DACF8 + str r5, [r4, #8] + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + str r0, [r5, #0x4c] + pop {r3, r4, r5, pc} +_021DAC86: + bl sub_02022974 +_021DAC8A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DAC8C: .word ov19_021DACF8 + thumb_func_end ov19_021DAC4C + + thumb_func_start ov19_021DAC90 +ov19_021DAC90: ; 0x021DAC90 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x4c] + cmp r0, #0 + beq _021DACAC + bl sub_0201CED0 + bl sub_020181C4 + ldr r0, [r4, #0x4c] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x4c] +_021DACAC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DAC90 + + thumb_func_start ov19_021DACB0 +ov19_021DACB0: ; 0x021DACB0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x4c] + bl sub_0201CED0 + add r4, r0, #0 + beq _021DACD8 + ldr r0, [r5, #0x10] + bl ov19_021D5E70 + ldrb r0, [r0, #0xf] + cmp r0, #0 + beq _021DACCE + mov r0, #4 + b _021DACD0 +_021DACCE: + mov r0, #0 +_021DACD0: + strh r0, [r4] + add r0, r5, #0 + bl ov19_021DAE10 +_021DACD8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DACB0 + + thumb_func_start ov19_021DACDC +ov19_021DACDC: ; 0x021DACDC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x4c] + bl sub_0201CED0 + cmp r0, #0 + beq _021DACF4 + mov r1, #4 + strh r1, [r0] + add r0, r4, #0 + bl ov19_021DAE10 +_021DACF4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DACDC + + thumb_func_start ov19_021DACF8 +ov19_021DACF8: ; 0x021DACF8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r0, [r4] + ldr r5, [r4, #8] + cmp r0, #4 + bhi _021DADC8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DAD10: ; jump table + .short _021DAD1A - _021DAD10 - 2 ; case 0 + .short _021DAD2C - _021DAD10 - 2 ; case 1 + .short _021DAD4C - _021DAD10 - 2 ; case 2 + .short _021DAD76 - _021DAD10 - 2 ; case 3 + .short _021DADC8 - _021DAD10 - 2 ; case 4 +_021DAD1A: + ldr r0, [r5, #0x10] + bl ov19_021D5E4C + cmp r0, #0 + beq _021DADC8 + mov r0, #0 + strh r0, [r4, #2] + mov r0, #1 + strh r0, [r4] +_021DAD2C: + ldr r0, [r5, #4] + ldrh r2, [r4, #2] + add r0, #0x30 + add r1, r5, #0 + mov r3, #0 + bl ov19_021DAE60 + ldr r0, [r5, #4] + add r0, #0x30 + bl sub_0201ACCC + mov r0, #0 + strh r0, [r4, #4] + mov r0, #2 + strh r0, [r4] + pop {r3, r4, r5, pc} +_021DAD4C: + ldr r0, [r5, #0x10] + bl ov19_021D5E70 + ldrb r0, [r0, #0xf] + cmp r0, #0 + bne _021DADC8 + ldrh r0, [r4, #4] + add r0, r0, #1 + strh r0, [r4, #4] + ldrh r0, [r4, #4] + cmp r0, #0x50 + bls _021DADC8 + add r0, r4, #0 + bl ov19_021DAE2C + mov r0, #0 + strh r0, [r4, #4] + strh r0, [r4, #6] + mov r0, #3 + strh r0, [r4] + pop {r3, r4, r5, pc} +_021DAD76: + ldrh r0, [r4, #6] + mov r1, #1 + lsl r1, r1, #0xe + add r0, r0, #4 + strh r0, [r4, #6] + add r0, r5, #0 + bl ov19_021DADCC + ldr r0, [r5, #4] + mov r1, #0 + add r0, #0x30 + mov r2, #4 + add r3, r1, #0 + bl sub_0201C04C + ldr r0, [r5, #4] + add r0, #0x30 + bl sub_0201ACCC + ldrh r0, [r4, #6] + cmp r0, #0x10 + blo _021DADC8 + ldrh r0, [r4, #2] + cmp r0, #1 + bne _021DADAE + add r0, r5, #0 + bl ov19_021DAE10 +_021DADAE: + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + ldrh r0, [r4, #2] + cmp r0, #4 + blo _021DADBE + mov r0, #0 + strh r0, [r4, #2] +_021DADBE: + mov r0, #0 + strh r0, [r4, #6] + strh r0, [r4, #4] + mov r0, #2 + strh r0, [r4] +_021DADC8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DACF8 + + thumb_func_start ov19_021DADCC +ov19_021DADCC: ; 0x021DADCC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r7, r1, #0 + mov r4, #0 +_021DADD6: + ldr r0, [r5, #0x3c] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + ldr r0, [sp, #4] + sub r0, r0, r7 + str r0, [sp, #4] + ldr r0, [r5, #0x3c] + bl sub_02021C50 + cmp r4, #0 + bne _021DAE02 + ldr r0, [r5, #0x3c] + bl sub_02021D34 +_021DAE02: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021DADD6 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DADCC + + thumb_func_start ov19_021DAE10 +ov19_021DAE10: ; 0x021DAE10 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DAE18: + ldr r0, [r5, #0x3c] + add r1, r6, #0 + bl sub_02021CAC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021DAE18 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DAE10 + + thumb_func_start ov19_021DAE2C +ov19_021DAE2C: ; 0x021DAE2C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + mov r1, #0 + ldr r4, [r0, #4] + add r4, #0x30 + add r0, r4, #0 + bl sub_0201ADA4 + ldrh r2, [r5, #2] + ldr r1, [r5, #8] + add r0, r4, #0 + mov r3, #0 + bl ov19_021DAE60 + ldrh r0, [r5, #2] + add r2, r0, #1 + cmp r2, #4 + blo _021DAE54 + mov r2, #0 +_021DAE54: + ldr r1, [r5, #8] + add r0, r4, #0 + mov r3, #1 + bl ov19_021DAE60 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DAE2C + + thumb_func_start ov19_021DAE60 +ov19_021DAE60: ; 0x021DAE60 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r4, r1, #0 + lsl r5, r3, #4 + cmp r2, #3 + bls _021DAE6E + b _021DAF8E +_021DAE6E: + add r1, r2, r2 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DAE7A: ; jump table + .short _021DAE82 - _021DAE7A - 2 ; case 0 + .short _021DAE94 - _021DAE7A - 2 ; case 1 + .short _021DAE88 - _021DAE7A - 2 ; case 2 + .short _021DAE8E - _021DAE7A - 2 ; case 3 +_021DAE82: + ldr r1, [r4, #0x10] + ldr r2, [r1, #0x68] + b _021DAF7A +_021DAE88: + ldr r1, [r4, #0x10] + ldr r2, [r1, #0x6c] + b _021DAF7A +_021DAE8E: + ldr r1, [r4, #0x10] + ldr r2, [r1, #0x70] + b _021DAF7A +_021DAE94: + bl sub_0207C944 + ldr r0, [r4, #0x10] + add r0, #0x58 + ldrb r0, [r0] + bl sub_0207C908 + bl sub_0207C944 + add r6, r0, #0 + ldr r0, [r4, #0x10] + add r0, #0x58 + ldrb r0, [r0] + bl sub_0207C908 + mov r2, #0 + add r1, r0, #0 + mov r3, #0x2f + str r2, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + add r0, r6, #0 + lsl r3, r3, #0xa + bl sub_02006EC0 + ldr r0, [r4, #0x3c] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0x10 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r5, #0xb0 + str r0, [r3, #0] + lsl r0, r5, #0xc + str r0, [sp, #0x14] + ldr r0, [r4, #0x3c] + add r1, r2, #0 + bl sub_02021C50 + ldr r0, [r4, #0x10] + add r0, #0x58 + ldrb r0, [r0] + bl sub_0207C92C + add r1, r0, #0 + ldr r0, [r4, #0x3c] + add r1, #0xa + bl sub_02021E90 + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_02021CAC + ldr r1, [r4, #0x10] + add r0, r1, #0 + add r0, #0x59 + add r1, #0x58 + ldrb r5, [r0] + ldrb r0, [r1] + cmp r0, r5 + beq _021DAF6E + bl sub_0207C944 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0207C908 + mov r2, #0 + add r1, r0, #0 + mov r3, #0xbd + str r2, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + add r0, r6, #0 + lsl r3, r3, #8 + bl sub_02006EC0 + mov r0, #9 + ldr r1, [sp, #0x10] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r0, [r4, #0x40] + add r1, sp, #0x10 + bl sub_02021C50 + ldr r0, [r4, #0x10] + add r0, #0x59 + ldrb r0, [r0] + bl sub_0207C92C + add r1, r0, #0 + ldr r0, [r4, #0x40] + add r1, #0xa + bl sub_02021E90 + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02021CAC + add sp, #0x1c + pop {r3, r4, r5, r6, pc} +_021DAF6E: + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_02021CAC + add sp, #0x1c + pop {r3, r4, r5, r6, pc} +_021DAF7A: + str r5, [sp] + mov r1, #0xff + str r1, [sp, #4] + ldr r1, _021DAF94 ; =0x00090600 + str r1, [sp, #8] + mov r1, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C +_021DAF8E: + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + nop +_021DAF94: .word 0x00090600 + thumb_func_end ov19_021DAE60 + + thumb_func_start ov19_021DAF98 +ov19_021DAF98: ; 0x021DAF98 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021DAFF6 + ldr r0, [r4, #4] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0xf + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0xf + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, [r4, #0x10] + bl ov19_021D5E4C + cmp r0, #0 + beq _021DAFD8 + add r0, r4, #0 + bl ov19_021DB0E4 +_021DAFD8: + ldr r0, [r4, #4] + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x10 + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x20 + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x30 + bl sub_0201ACCC +_021DAFF6: + pop {r4, pc} + thumb_func_end ov19_021DAF98 + + thumb_func_start ov19_021DAFF8 +ov19_021DAFF8: ; 0x021DAFF8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021DB074 + ldr r0, [r4, #4] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0xf + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0xf + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021DB036 + bl sub_02007DC8 + mov r0, #0 + str r0, [r4, #0x24] +_021DB036: + ldr r0, [r4, #0x10] + bl ov19_021D5E4C + cmp r0, #0 + beq _021DB048 + add r0, r4, #0 + bl ov19_021DB0E4 + b _021DB050 +_021DB048: + add r0, r4, #0 + mov r1, #0 + bl ov19_021DB24C +_021DB050: + ldr r0, [r4, #4] + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x10 + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x20 + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x30 + bl sub_0201ACCC + add r0, r4, #0 + bl ov19_021DACB0 +_021DB074: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DAFF8 + + thumb_func_start ov19_021DB078 +ov19_021DB078: ; 0x021DB078 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021DB0E2 + ldr r0, [r4, #4] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0xf + add r0, #0x10 + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0xf + add r0, #0x20 + bl sub_0201ADA4 + ldr r0, [r4, #4] + mov r1, #0 + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021DB0B6 + bl sub_02007DC8 + mov r0, #0 + str r0, [r4, #0x24] +_021DB0B6: + add r0, r4, #0 + mov r1, #0 + bl ov19_021DB24C + ldr r0, [r4, #4] + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x10 + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x20 + bl sub_0201ACCC + ldr r0, [r4, #4] + add r0, #0x30 + bl sub_0201ACCC + add r0, r4, #0 + bl ov19_021DACDC +_021DB0E2: + pop {r4, pc} + thumb_func_end ov19_021DB078 + + thumb_func_start ov19_021DB0E4 +ov19_021DB0E4: ; 0x021DB0E4 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0x10] + bl ov19_021D5E70 + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB20C ; =0x0009060F + mov r3, #2 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r4, #0x18] + bl sub_0201D78C + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB210 ; =0x0001020F + mov r3, #2 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r4, #0x14] + add r0, #0x20 + bl sub_0201D78C + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB210 ; =0x0001020F + mov r3, #2 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r4, #0x14] + add r0, #0x20 + bl sub_0201D78C + ldrb r0, [r4, #0xe] + cmp r0, #0 + beq _021DB14A + cmp r0, #1 + beq _021DB166 + b _021DB180 +_021DB14A: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB214 ; =0x0007080F + mov r3, #0x46 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r5, #0x44] + add r0, #0x20 + bl sub_0201D78C + b _021DB180 +_021DB166: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB218 ; =0x0003040F + mov r3, #0x46 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r5, #0x48] + add r0, #0x20 + bl sub_0201D78C +_021DB180: + ldrb r0, [r4, #0xf] + cmp r0, #0 + bne _021DB1DA + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB21C ; =0x00090600 + add r3, r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r4, #0x1c] + add r0, #0x30 + bl sub_0201D78C + ldrh r2, [r4, #8] + cmp r2, #0 + beq _021DB1BE + mov r1, #2 + str r1, [sp] + ldr r0, [r5, #4] + mov r3, #3 + add r0, #0x10 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + bl sub_0200C648 +_021DB1BE: + mov r1, #1 + str r1, [sp] + ldr r0, [r5, #4] + mov r3, #3 + add r0, #0x20 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + ldrb r2, [r4, #0xa] + ldr r0, [r5, #0x1c] + bl sub_0200C648 +_021DB1DA: + ldr r1, [r4, #0] + add r0, sp, #0x10 + mov r2, #2 + mov r3, #0 + bl sub_02075F0C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r5, #0x20] + add r1, sp, #0x10 + mov r2, #0x2c + mov r3, #0x54 + bl sub_02007C34 + str r0, [r5, #0x24] + ldrb r1, [r4, #0xb] + add r0, r5, #0 + bl ov19_021DB24C + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_021DB20C: .word 0x0009060F +_021DB210: .word 0x0001020F +_021DB214: .word 0x0007080F +_021DB218: .word 0x0003040F +_021DB21C: .word 0x00090600 + thumb_func_end ov19_021DB0E4 + + thumb_func_start ov19_021DB220 +ov19_021DB220: ; 0x021DB220 + mov r0, #1 + bx lr + thumb_func_end ov19_021DB220 + + thumb_func_start ov19_021DB224 +ov19_021DB224: ; 0x021DB224 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021DB248 + ldr r0, [r4, #0x10] + bl ov19_021D5E4C + cmp r0, #0 + beq _021DB248 + ldr r0, [r4, #0x10] + bl ov19_021D5E70 + add r1, r0, #0 + ldrb r1, [r1, #0xb] + add r0, r4, #0 + bl ov19_021DB24C +_021DB248: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB224 + + thumb_func_start ov19_021DB24C +ov19_021DB24C: ; 0x021DB24C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp, #4] + add r4, r1, #0 + ldr r0, [r0, #8] + mov r1, #2 + bl sub_02019FE4 + mov ip, r0 + add r2, r0, #0 + mov r0, #1 + ldr r6, _021DB2AC ; =0x000004C8 + mov r1, #0 + lsl r7, r0, #0xd +_021DB268: + add r3, r0, #0 + lsl r3, r1 + tst r3, r4 + beq _021DB27A + add r3, r1, #0 + add r3, #0x98 + orr r3, r7 + strh r3, [r2, r6] + b _021DB288 +_021DB27A: + add r5, r1, #0 + mov r3, #2 + add r5, #0x84 + lsl r3, r3, #0xc + orr r5, r3 + ldr r3, _021DB2AC ; =0x000004C8 + strh r5, [r2, r3] +_021DB288: + add r1, r1, #1 + add r2, r2, #2 + cmp r1, #6 + blt _021DB268 + mov r2, #0x99 + lsl r2, r2, #2 + ldr r0, [sp, #4] + str r2, [sp] + lsl r3, r2, #1 + mov r2, ip + add r2, r2, r3 + ldr r0, [r0, #8] + mov r1, #2 + mov r3, #0xc + bl sub_02019460 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB2AC: .word 0x000004C8 + thumb_func_end ov19_021DB24C + + thumb_func_start ov19_021DB2B0 +ov19_021DB2B0: ; 0x021DB2B0 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DB2F4 + ldr r0, [r5, #0x10] + bl ov19_021D5E70 + add r4, r0, #0 + ldr r0, [r5, #4] + mov r1, #0 + add r0, #0x30 + bl sub_0201ADA4 + ldrb r0, [r4, #0xf] + cmp r0, #0 + bne _021DB2EE + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB2F8 ; =0x00090600 + add r3, r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r4, #0x1c] + add r0, #0x30 + bl sub_0201D78C +_021DB2EE: + add r0, r5, #0 + bl ov19_021DACB0 +_021DB2F4: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DB2F8: .word 0x00090600 + thumb_func_end ov19_021DB2B0 + + .rodata + + + .global Unk_ov19_021E01D8 +Unk_ov19_021E01D8: ; 0x021E01D8 + .incbin "incbin/overlay19_rodata.bin", 0x3E8, 0x20 + diff --git a/asm/ov19_021DB2FC.s b/asm/ov19_021DB2FC.s new file mode 100644 index 000000000..44786b0ca --- /dev/null +++ b/asm/ov19_021DB2FC.s @@ -0,0 +1,812 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DB2FC +ov19_021DB2FC: ; 0x021DB2FC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + str r1, [r4, #0xc] + str r3, [r4, #0] + str r2, [r4, #8] + ldr r0, [sp, #0x18] + mov r1, #0x1a + str r0, [r4, #0x2c] + ldr r0, [sp, #0x1c] + mov r2, #0x12 + str r0, [r4, #0x20] + ldr r0, [sp, #0x14] + mov r3, #0xa + str r0, [r4, #0x10] + mov r0, #0 + bl sub_0200B144 + str r0, [r4, #0x14] + mov r0, #0x40 + mov r1, #0xa + bl sub_02023790 + str r0, [r4, #0x30] + mov r0, #0x40 + mov r1, #0xa + bl sub_02023790 + str r0, [r4, #0x34] + mov r0, #0 + strh r0, [r4, #0x1c] + strh r0, [r4, #0x1e] + str r0, [r4, #0x18] + mov r0, #0xa + str r0, [sp] + add r3, r4, #0 + ldr r0, [sp, #0x20] + mov r1, #0x19 + mov r2, #1 + add r3, #0x28 + bl sub_020071B4 + str r0, [r4, #0x24] + cmp r0, #0 + beq _021DB362 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _021DB362 + ldr r0, [r4, #0x34] + cmp r0, #0 + bne _021DB368 +_021DB362: + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_021DB368: + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB2FC + + thumb_func_start ov19_021DB370 +ov19_021DB370: ; 0x021DB370 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + cmp r0, #0 + beq _021DB3C0 + mov r6, #0 + add r4, r6, #0 +_021DB37E: + ldr r0, [r5, #0x18] + add r0, r0, r4 + bl sub_0201A8FC + add r6, r6, #1 + add r4, #0x10 + cmp r6, #2 + blt _021DB37E + ldr r0, [r5, #0x24] + cmp r0, #0 + beq _021DB398 + bl sub_020181C4 +_021DB398: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021DB3A2 + bl sub_0200B190 +_021DB3A2: + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021DB3AC + bl sub_020237BC +_021DB3AC: + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DB3B6 + bl sub_020237BC +_021DB3B6: + ldr r0, [r5, #0x18] + bl sub_020181C4 + mov r0, #0 + str r0, [r5, #0x18] +_021DB3C0: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB370 + + thumb_func_start ov19_021DB3C4 +ov19_021DB3C4: ; 0x021DB3C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r0, #0 + mov r0, #0xa + mov r1, #2 + bl sub_0201A778 + str r0, [r6, #0x18] + cmp r0, #0 + beq _021DB3F4 + mov r7, #0 + ldr r4, _021DB440 ; =0x021E01F8 + add r5, r7, #0 +_021DB3DE: + ldr r1, [r6, #0x18] + ldr r0, [r6, #0] + add r1, r1, r5 + add r2, r4, #0 + bl sub_0201A8D4 + add r7, r7, #1 + add r4, #8 + add r5, #0x10 + cmp r7, #2 + blt _021DB3DE +_021DB3F4: + mov r0, #2 + lsl r0, r0, #8 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + str r1, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r6, #0] + mov r0, #0x26 + mov r3, #1 + bl sub_02006E3C + mov r0, #0x20 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0x26 + mov r1, #0x18 + mov r2, #0 + mov r3, #0xe0 + bl sub_02006E84 + ldr r0, [r6, #0x20] + ldr r2, _021DB444 ; =0x00000209 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + ldr r0, [r6, #0] + mov r1, #1 + mov r3, #8 + bl sub_0200DD0C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DB440: .word 0x021E01F8 +_021DB444: .word 0x00000209 + thumb_func_end ov19_021DB3C4 + + thumb_func_start ov19_021DB448 +ov19_021DB448: ; 0x021DB448 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r4, r1, #0 + bl sub_0201A9F4 + ldr r3, [r5, #0x18] + ldrb r0, [r3, #7] + str r0, [sp] + ldrb r0, [r3, #8] + str r0, [sp, #4] + ldrb r1, [r3, #4] + ldrb r2, [r3, #5] + ldrb r3, [r3, #6] + ldr r0, [r5, #0] + bl ov19_021DB4B4 + ldr r0, [r5, #0x18] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x30] + add r1, r4, #0 + bl sub_0200B1B8 + ldr r0, [r5, #0x2c] + ldr r1, [r5, #0x34] + ldr r2, [r5, #0x30] + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r3, [sp, #8] + ldr r0, [r5, #0x18] + ldr r2, [r5, #0x34] + mov r1, #1 + bl sub_0201D738 + ldr r0, [r5, #0x18] + bl sub_0201ACCC + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02019448 + mov r0, #1 + strh r0, [r5, #0x1c] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB448 + + thumb_func_start ov19_021DB4B4 +ov19_021DB4B4: ; 0x021DB4B4 + push {r3, r4, r5, r6, r7, lr} + lsl r1, r1, #0x18 + add r7, r3, #0 + lsr r1, r1, #0x18 + add r6, r2, #0 + ldr r4, [sp, #0x18] + ldr r5, [sp, #0x1c] + bl sub_02019FE4 + sub r1, r7, #1 + sub r2, r6, #2 + lsl r1, r1, #5 + add r1, r2, r1 + lsl r3, r1, #1 + ldr r2, _021DB558 ; =0x00008209 + add r1, r0, r3 + strh r2, [r0, r3] + add r0, r2, #1 + mov r2, #0 + strh r0, [r1, #2] + cmp r4, #0 + bls _021DB4EE + ldr r0, _021DB55C ; =0x0000820B + add r3, r1, #0 +_021DB4E4: + add r2, r2, #1 + strh r0, [r3, #4] + add r3, r3, #2 + cmp r2, r4 + blo _021DB4E4 +_021DB4EE: + lsl r0, r4, #1 + add r2, r1, r0 + ldr r3, _021DB560 ; =0x0000820C + mov ip, r0 + strh r3, [r2, #4] + add r0, r3, #1 + strh r0, [r2, #6] + add r0, r3, #2 + strh r0, [r2, #8] + add r1, #0x40 + mov r3, #0 + cmp r5, #0 + bls _021DB52A + mov r0, ip + add r2, r0, r1 + ldr r0, _021DB564 ; =0x0000820F + add r7, r0, #1 +_021DB510: + strh r0, [r1] + strh r7, [r1, #2] + ldr r6, _021DB568 ; =0x00008212 + add r3, r3, #1 + strh r6, [r2, #4] + add r6, r6, #1 + strh r6, [r2, #6] + ldr r6, _021DB56C ; =0x00008214 + add r1, #0x40 + strh r6, [r2, #8] + add r2, #0x40 + cmp r3, r5 + blo _021DB510 +_021DB52A: + ldr r0, _021DB570 ; =0x00008215 + mov r3, #0 + strh r0, [r1] + add r0, r0, #1 + strh r0, [r1, #2] + cmp r4, #0 + bls _021DB546 + ldr r0, _021DB574 ; =0x00008217 + add r2, r1, #0 +_021DB53C: + add r3, r3, #1 + strh r0, [r2, #4] + add r2, r2, #2 + cmp r3, r4 + blo _021DB53C +_021DB546: + mov r0, ip + ldr r2, _021DB578 ; =0x00008218 + add r1, r1, r0 + strh r2, [r1, #4] + add r0, r2, #1 + strh r0, [r1, #6] + add r0, r2, #2 + strh r0, [r1, #8] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB558: .word 0x00008209 +_021DB55C: .word 0x0000820B +_021DB560: .word 0x0000820C +_021DB564: .word 0x0000820F +_021DB568: .word 0x00008212 +_021DB56C: .word 0x00008214 +_021DB570: .word 0x00008215 +_021DB574: .word 0x00008217 +_021DB578: .word 0x00008218 + thumb_func_end ov19_021DB4B4 + + thumb_func_start ov19_021DB57C +ov19_021DB57C: ; 0x021DB57C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldrh r0, [r5, #0x1e] + str r1, [sp, #0x10] + cmp r0, #0 + beq _021DB594 + ldr r1, [r5, #0x18] + ldr r0, [r5, #0] + add r1, #0x10 + bl ov19_021DB84C +_021DB594: + ldr r0, [r5, #0x18] + mov r1, #0xf + str r0, [sp, #0x14] + add r0, #0x10 + str r0, [sp, #0x14] + bl sub_0201ADA4 + ldr r0, [sp, #0x10] + mov r6, #0 + add r0, #0x21 + ldrb r1, [r0] + mov r0, #8 + sub r0, r0, r1 + lsl r7, r0, #4 + cmp r1, #0 + bls _021DB608 + ldr r4, [sp, #0x10] +_021DB5B6: + ldr r3, [r4, #0] + cmp r3, #0x38 + blt _021DB5D2 + cmp r3, #0x3d + bgt _021DB5D2 + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x14] + add r2, #0x22 + ldrb r2, [r2] + add r0, r5, #0 + sub r3, #0x38 + bl ov19_021DB638 + b _021DB5F8 +_021DB5D2: + add r3, #0x18 + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x30] + add r1, r3, #0 + bl sub_0200B1B8 + str r7, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DB634 ; =0x000B0C0F + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + ldr r2, [r5, #0x30] + mov r3, #0xa + bl sub_0201D78C +_021DB5F8: + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r0, #0x21 + ldrb r0, [r0] + add r7, #0x10 + add r4, r4, #4 + cmp r6, r0 + blo _021DB5B6 +_021DB608: + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl ov19_021DB748 + ldr r1, [sp, #0x10] + add r0, r5, #0 + add r1, #0x21 + str r1, [sp, #0x10] + ldrb r1, [r1] + bl ov19_021DB684 + ldr r0, [sp, #0x14] + bl sub_0201ACCC + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02019448 + mov r0, #1 + strh r0, [r5, #0x1e] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB634: .word 0x000B0C0F + thumb_func_end ov19_021DB57C + + thumb_func_start ov19_021DB638 +ov19_021DB638: ; 0x021DB638 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #1 + lsl r0, r3 + tst r0, r2 + beq _021DB64A + mov r4, #0 + b _021DB64C +_021DB64A: + mov r4, #8 +_021DB64C: + mov r0, #0x30 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + lsl r0, r3, #4 + add r0, r0, #4 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0xc] + mov r0, #8 + str r0, [sp, #0x10] + lsl r2, r3, #0x13 + str r0, [sp, #0x14] + mov r0, #0xff + str r0, [sp, #0x18] + add r0, r1, #0 + ldr r1, [r5, #0x28] + lsl r3, r4, #0x10 + ldr r1, [r1, #0x14] + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE08 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB638 + + thumb_func_start ov19_021DB684 +ov19_021DB684: ; 0x021DB684 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #8] + add r5, r1, #0 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02019FE4 + mov r2, #8 + sub r2, r2, r5 + mov ip, r2 + add r0, #0xe6 + lsl r2, r2, #7 + add r2, r0, r2 + ldr r1, _021DB6EC ; =0x00000251 + mov r3, #0x18 + mov r0, ip + mul r3, r0 + add r4, r1, r3 + mov r6, #0 + lsl r7, r5, #1 + beq _021DB6D0 + mov r0, #1 + lsl r0, r0, #0xe +_021DB6B4: + mov r3, #0 + add r5, r2, #0 +_021DB6B8: + add r1, r4, #0 + orr r1, r0 + strh r1, [r5] + add r3, r3, #1 + add r4, r4, #1 + add r5, r5, #2 + cmp r3, #0xc + blo _021DB6B8 + add r6, r6, #1 + add r2, #0x40 + cmp r6, r7 + blo _021DB6B4 +_021DB6D0: + mov r0, #0xc + str r0, [sp] + mov r3, ip + lsl r3, r3, #1 + ldr r0, [sp, #8] + str r7, [sp, #4] + ldr r0, [r0, #0] + mov r1, #1 + mov r2, #0x13 + add r3, r3, #3 + bl ov19_021DB7BC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB6EC: .word 0x00000251 + thumb_func_end ov19_021DB684 + + thumb_func_start ov19_021DB6F0 +ov19_021DB6F0: ; 0x021DB6F0 + push {r4, lr} + add r4, r0, #0 + ldrh r0, [r4, #0x1c] + cmp r0, #0 + beq _021DB706 + ldr r0, [r4, #0] + ldr r1, [r4, #0x18] + bl ov19_021DB898 + mov r0, #0 + strh r0, [r4, #0x1c] +_021DB706: + ldrh r0, [r4, #0x1e] + cmp r0, #0 + beq _021DB71A + ldr r1, [r4, #0x18] + ldr r0, [r4, #0] + add r1, #0x10 + bl ov19_021DB84C + mov r0, #0 + strh r0, [r4, #0x1e] +_021DB71A: + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02019448 + pop {r4, pc} + thumb_func_end ov19_021DB6F0 + + thumb_func_start ov19_021DB724 +ov19_021DB724: ; 0x021DB724 + push {r4, lr} + add r4, r0, #0 + ldrh r0, [r4, #0x1e] + cmp r0, #0 + beq _021DB73C + ldr r1, [r4, #0x18] + ldr r0, [r4, #0] + add r1, #0x10 + bl ov19_021DB84C + mov r0, #0 + strh r0, [r4, #0x1e] +_021DB73C: + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02019448 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB724 + + thumb_func_start ov19_021DB748 +ov19_021DB748: ; 0x021DB748 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r1, #0 + ldr r4, [r0, #0x18] + add r0, r6, #0 + add r0, #0x21 + ldrb r1, [r0] + mov r0, #8 + add r4, #0x10 + sub r0, r0, r1 + lsl r5, r0, #4 + mov r0, #0xa + str r0, [sp] + lsl r0, r1, #0x14 + lsr r0, r0, #0x10 + lsl r3, r5, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0xf + mov r2, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + add r6, #0x20 + ldrb r2, [r6] + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #4 + add r2, r5, r2 + bl sub_02002180 + add r0, r4, #0 + bl sub_0201ACCC + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DB748 + + thumb_func_start ov19_021DB790 +ov19_021DB790: ; 0x021DB790 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r4, [r6, #0x18] + add r7, r1, #0 + add r4, #0x10 + mov r5, #0 +_021DB79C: + add r2, r7, #0 + add r2, #0x22 + ldrb r2, [r2] + add r0, r6, #0 + add r1, r4, #0 + add r3, r5, #0 + bl ov19_021DB638 + add r5, r5, #1 + cmp r5, #6 + blt _021DB79C + add r0, r4, #0 + bl sub_0201ACCC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DB790 + + thumb_func_start ov19_021DB7BC +ov19_021DB7BC: ; 0x021DB7BC + push {r3, r4, r5, r6, r7, lr} + lsl r1, r1, #0x18 + add r7, r3, #0 + lsr r1, r1, #0x18 + add r6, r2, #0 + ldr r5, [sp, #0x18] + ldr r4, [sp, #0x1c] + bl sub_02019FE4 + sub r1, r7, #1 + sub r2, r6, #1 + lsl r1, r1, #5 + add r1, r2, r1 + mov r2, #0x72 + lsl r3, r1, #1 + lsl r2, r2, #8 + strh r2, [r0, r3] + add r1, r0, r3 + mov r2, #0 + cmp r5, #0 + bls _021DB7F4 + ldr r0, _021DB838 ; =0x00007201 + add r3, r1, #0 +_021DB7EA: + add r2, r2, #1 + strh r0, [r3, #2] + add r3, r3, #2 + cmp r2, r5 + blo _021DB7EA +_021DB7F4: + lsl r0, r5, #1 + add r2, r1, r0 + ldr r3, _021DB83C ; =0x00007202 + add r1, #0x40 + mov r7, #0 + strh r3, [r2, #2] + cmp r4, #0 + bls _021DB818 + ldr r2, _021DB840 ; =0x00007205 + add r6, r0, r1 + add r3, r3, #1 +_021DB80A: + strh r3, [r1] + strh r2, [r6, #2] + add r7, r7, #1 + add r6, #0x40 + add r1, #0x40 + cmp r7, r4 + blo _021DB80A +_021DB818: + ldr r2, _021DB844 ; =0x00007206 + mov r4, #0 + strh r2, [r1] + cmp r5, #0 + bls _021DB830 + add r3, r1, #0 + add r2, r2, #1 +_021DB826: + add r4, r4, #1 + strh r2, [r3, #2] + add r3, r3, #2 + cmp r4, r5 + blo _021DB826 +_021DB830: + ldr r2, _021DB848 ; =0x00007208 + add r0, r1, r0 + strh r2, [r0, #2] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB838: .word 0x00007201 +_021DB83C: .word 0x00007202 +_021DB840: .word 0x00007205 +_021DB844: .word 0x00007206 +_021DB848: .word 0x00007208 + thumb_func_end ov19_021DB7BC + + thumb_func_start ov19_021DB84C +ov19_021DB84C: ; 0x021DB84C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldrb r1, [r4, #4] + bl sub_02019FE4 + ldrb r1, [r4, #5] + mov r5, #0 + sub r2, r1, #1 + ldrb r1, [r4, #6] + sub r1, r1, #1 + lsl r1, r1, #5 + add r1, r2, r1 + lsl r1, r1, #1 + add r2, r0, r1 + ldrb r0, [r4, #8] + add r0, r0, #2 + beq _021DB896 + add r0, r5, #0 + add r1, r5, #0 +_021DB872: + ldrb r6, [r4, #7] + add r3, r1, #0 + add r6, r6, #2 + beq _021DB88A + add r6, r2, #0 +_021DB87C: + strh r0, [r6] + ldrb r7, [r4, #7] + add r3, r3, #1 + add r6, r6, #2 + add r7, r7, #2 + cmp r3, r7 + blo _021DB87C +_021DB88A: + ldrb r3, [r4, #8] + add r5, r5, #1 + add r2, #0x40 + add r3, r3, #2 + cmp r5, r3 + blo _021DB872 +_021DB896: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DB84C + + thumb_func_start ov19_021DB898 +ov19_021DB898: ; 0x021DB898 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldrb r1, [r4, #4] + bl sub_02019FE4 + ldrb r1, [r4, #5] + mov r5, #0 + sub r2, r1, #2 + ldrb r1, [r4, #6] + sub r1, r1, #1 + lsl r1, r1, #5 + add r1, r2, r1 + lsl r1, r1, #1 + add r2, r0, r1 + ldrb r0, [r4, #8] + add r0, r0, #2 + beq _021DB8E2 + add r0, r5, #0 + add r1, r5, #0 +_021DB8BE: + ldrb r6, [r4, #7] + add r3, r1, #0 + add r6, r6, #5 + beq _021DB8D6 + add r6, r2, #0 +_021DB8C8: + strh r0, [r6] + ldrb r7, [r4, #7] + add r3, r3, #1 + add r6, r6, #2 + add r7, r7, #5 + cmp r3, r7 + blo _021DB8C8 +_021DB8D6: + ldrb r3, [r4, #8] + add r5, r5, #1 + add r2, #0x40 + add r3, r3, #2 + cmp r5, r3 + blo _021DB8BE +_021DB8E2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DB898 + + .rodata + + + .global Unk_ov19_021E01F8 +Unk_ov19_021E01F8: ; 0x021E01F8 + .incbin "incbin/overlay19_rodata.bin", 0x408, 0x10 + diff --git a/asm/ov19_021DB8E4.s b/asm/ov19_021DB8E4.s new file mode 100644 index 000000000..0f32ddf3e --- /dev/null +++ b/asm/ov19_021DB8E4.s @@ -0,0 +1,1731 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DB8E4 +ov19_021DB8E4: ; 0x021DB8E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + str r1, [r5, #0] + ldr r0, [sp, #0x34] + str r3, [r5, #4] + str r0, [sp, #0x34] + str r2, [r5, #0xc] + ldr r0, [sp, #0x30] + mov r4, #1 + str r0, [r5, #8] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r2, r3, #0 + str r4, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r0, [sp, #0x34] + mov r1, #4 + add r3, r4, #0 + bl sub_020070E8 + ldr r0, [sp, #0x34] + mov r1, #0x1b + add r2, sp, #0x14 + mov r3, #0xa + bl sub_020071EC + add r4, r0, #0 + ldr r0, [sp, #0x14] + add r1, r5, #0 + ldr r0, [r0, #0xc] + add r1, #0xe4 + mov r2, #0x40 + bl sub_020C4B18 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x34] + mov r1, #0x14 + add r2, sp, #0x14 + mov r3, #0xa + bl sub_020071EC + add r4, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0x49 + lsl r1, r1, #2 + ldr r0, [r0, #0xc] + add r1, r5, r1 + mov r2, #0x20 + bl sub_020C4B18 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + mov r1, #0x2a + mov r4, #1 + str r0, [sp, #0x10] + add r0, #0xe4 + lsl r1, r1, #4 + lsl r4, r4, #0x10 + mov r7, #7 + str r0, [sp, #0x10] + add r6, r0, r1 +_021DB96C: + asr r0, r4, #0xc + str r0, [sp] + ldr r0, [sp, #0x10] + ldr r3, _021DBA88 ; =0x00007FFF + add r1, r6, #0 + mov r2, #0x30 + bl ov19_021D78C8 + ldr r0, _021DBA8C ; =0x00002492 + sub r7, r7, #1 + sub r4, r4, r0 + sub r6, #0x60 + cmp r7, #1 + bge _021DB96C + add r0, r5, #0 + mov r1, #3 + add r0, #0xe4 + lsl r1, r1, #8 + bl sub_020C2C54 + mov r0, #0xe1 + lsl r0, r0, #2 + mov r1, #0x1a + add r0, r5, r0 + lsl r1, r1, #4 + mov r2, #0x60 + bl sub_020C0160 + add r0, r5, #0 + mov r1, #0x1a + add r0, #0xe4 + lsl r1, r1, #4 + mov r2, #0x60 + bl sub_020C01B8 + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x34] + mov r1, #0x11 + mov r2, #1 + add r3, #0x18 + bl sub_020071B4 + str r0, [r5, #0x14] + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x34] + mov r1, #0x12 + mov r2, #1 + add r3, #0x20 + bl sub_02007204 + str r0, [r5, #0x1c] + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x34] + mov r1, #2 + mov r2, #1 + add r3, #0x38 + bl sub_020071D0 + str r0, [r5, #0x34] + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x34] + mov r1, #3 + mov r2, #1 + add r3, #0x30 + bl sub_020071D0 + str r0, [r5, #0x2c] + mov r0, #2 + mov r1, #0xd + mov r2, #4 + mov r3, #0xa + bl sub_0200C440 + str r0, [r5, #0x44] + mov r0, #0x7d + lsl r0, r0, #2 + mov r1, #0xa + bl sub_02023790 + ldr r1, _021DBA90 ; =0x00004BFC + ldr r2, _021DBA94 ; =0x00000187 + str r0, [r5, r1] + mov r0, #0 + str r0, [r5, #0x10] + ldr r0, [r5, #0x18] + mov r1, #0x20 + ldr r0, [r0, #0x14] + mov r3, #0xa + str r0, [r5, #0x3c] + add r0, r5, #0 + add r0, #0x40 + strh r1, [r0] + add r0, r5, #0 + add r0, #0x42 + strh r1, [r0] + mov r0, #1 + mov r1, #0x1a + bl sub_0200B144 + ldr r1, _021DBA98 ; =0x00004BF8 + add r2, r5, #0 + str r0, [r5, r1] + mov r1, #0 + add r0, r1, #0 +_021DBA4C: + add r1, r1, #1 + str r0, [r2, #0x48] + add r2, r2, #4 + cmp r1, #0x12 + blt _021DBA4C + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021DBA7C + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _021DBA7C + ldr r0, [r5, #0x2c] + cmp r0, #0 + beq _021DBA7C + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DBA7C + ldr r0, [r5, #0x44] + cmp r0, #0 + beq _021DBA7C + ldr r0, _021DBA90 ; =0x00004BFC + ldr r0, [r5, r0] + cmp r0, #0 + bne _021DBA82 +_021DBA7C: + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DBA82: + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DBA88: .word 0x00007FFF +_021DBA8C: .word 0x00002492 +_021DBA90: .word 0x00004BFC +_021DBA94: .word 0x00000187 +_021DBA98: .word 0x00004BF8 + thumb_func_end ov19_021DB8E4 + + thumb_func_start ov19_021DBA9C +ov19_021DBA9C: ; 0x021DBA9C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0xa + mov r1, #3 + bl sub_0201A778 + str r0, [r7, #0x10] + cmp r0, #0 + beq _021DBACA + mov r6, #0 + ldr r4, _021DBACC ; =0x021E0210 + add r5, r6, #0 +_021DBAB4: + ldr r1, [r7, #0x10] + ldr r0, [r7, #4] + add r1, r1, r5 + add r2, r4, #0 + bl sub_0201A8D4 + add r6, r6, #1 + add r4, #8 + add r5, #0x10 + cmp r6, #3 + blo _021DBAB4 +_021DBACA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DBACC: .word 0x021E0210 + thumb_func_end ov19_021DBA9C + + thumb_func_start ov19_021DBAD0 +ov19_021DBAD0: ; 0x021DBAD0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _021DBB40 ; =0x00004BF8 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021DBAE0 + bl sub_0200B190 +_021DBAE0: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021DBAEA + bl sub_020181C4 +_021DBAEA: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _021DBAF4 + bl sub_020181C4 +_021DBAF4: + ldr r0, [r5, #0x2c] + cmp r0, #0 + beq _021DBAFE + bl sub_020181C4 +_021DBAFE: + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DBB08 + bl sub_020181C4 +_021DBB08: + ldr r0, [r5, #0x44] + cmp r0, #0 + beq _021DBB12 + bl sub_0200C560 +_021DBB12: + ldr r0, _021DBB44 ; =0x00004BFC + ldr r0, [r5, r0] + cmp r0, #0 + beq _021DBB1E + bl sub_020237BC +_021DBB1E: + ldr r0, [r5, #0x10] + cmp r0, #0 + beq _021DBB3E + mov r6, #0 + add r4, r6, #0 +_021DBB28: + ldr r0, [r5, #0x10] + add r0, r0, r4 + bl sub_0201A8FC + add r6, r6, #1 + add r4, #0x10 + cmp r6, #3 + blt _021DBB28 + ldr r0, [r5, #0x10] + bl sub_020181C4 +_021DBB3E: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DBB40: .word 0x00004BF8 +_021DBB44: .word 0x00004BFC + thumb_func_end ov19_021DBAD0 + + thumb_func_start ov19_021DBB48 +ov19_021DBB48: ; 0x021DBB48 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl ov19_021D5EA8 + add r1, r4, #0 + add r1, #0xe0 + str r0, [r1, #0] + add r0, r4, #0 + bl ov19_021DBDF4 + add r0, r4, #0 + mov r1, #0 + bl ov19_021DC034 + pop {r4, pc} + thumb_func_end ov19_021DBB48 + + thumb_func_start ov19_021DBB68 +ov19_021DBB68: ; 0x021DBB68 + ldr r3, _021DBB6C ; =ov19_021DC090 + bx r3 + ; .align 2, 0 +_021DBB6C: .word ov19_021DC090 + thumb_func_end ov19_021DBB68 + + thumb_func_start ov19_021DBB70 +ov19_021DBB70: ; 0x021DBB70 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl ov19_021D5EA8 + add r1, r4, #0 + add r1, #0xe0 + str r0, [r1, #0] + add r0, r4, #0 + bl ov19_021DBF18 + add r0, r4, #0 + bl ov19_021DBF4C + add r0, r4, #0 + bl ov19_021DBFC4 + pop {r4, pc} + thumb_func_end ov19_021DBB70 + + thumb_func_start ov19_021DBB94 +ov19_021DBB94: ; 0x021DBB94 + ldr r3, _021DBB9C ; =ov19_021DC034 + mov r1, #1 + bx r3 + nop +_021DBB9C: .word ov19_021DC034 + thumb_func_end ov19_021DBB94 + + thumb_func_start ov19_021DBBA0 +ov19_021DBBA0: ; 0x021DBBA0 + ldr r3, _021DBBA4 ; =ov19_021DC090 + bx r3 + ; .align 2, 0 +_021DBBA4: .word ov19_021DC090 + thumb_func_end ov19_021DBBA0 + + thumb_func_start ov19_021DBBA8 +ov19_021DBBA8: ; 0x021DBBA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r0, [sp, #8] + ldr r0, [r0, #0xc] + str r1, [sp, #0xc] + str r2, [sp, #0x10] + str r3, [sp, #0x14] + bl ov19_021D5E90 + ldr r1, [sp, #0xc] + str r0, [sp, #0x28] + bl sub_02079AA8 + cmp r0, #0x18 + blt _021DBBC8 + sub r0, #8 +_021DBBC8: + add r0, #0xd0 + mov r1, #0xc + lsl r0, r0, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #8] + mov r1, #9 + add r0, #0x3c + mov r2, #0xa + mov r3, #0xe + bl sub_0201A6D0 + mov r4, #0 + mov r0, #0xb + str r4, [sp, #0x20] + str r0, [sp, #0x18] +_021DBBEA: + mov r0, #0 + str r0, [sp, #0x24] + ldr r0, [sp, #8] + mov r6, #0xa + str r0, [sp, #0x2c] + add r0, #0x3c + str r0, [sp, #0x2c] + ldr r0, [sp, #0x18] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x30] +_021DBC00: + ldr r0, [sp, #0x28] + ldr r1, [sp, #0xc] + add r2, r4, #0 + bl sub_02079C9C + add r4, r4, #1 + add r5, r0, #0 + bl sub_02073D20 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + add r7, r0, #0 + beq _021DBC7E + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _021DBC50 + add r0, r5, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + add r0, r7, #0 + mov r2, #0x1b + bl sub_020759CC + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + b _021DBC60 +_021DBC50: + ldr r0, _021DBD2C ; =0x000001EA + cmp r7, r0 + beq _021DBC5A + mov r0, #8 + b _021DBC5C +_021DBC5A: + mov r0, #1 +_021DBC5C: + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 +_021DBC60: + ldr r0, _021DBD30 ; =0x021E0228 + ldr r2, [sp, #0x30] + ldrb r0, [r0, r1] + mov r3, #2 + add r0, #0xe0 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + mov r0, #2 + str r0, [sp] + str r1, [sp, #4] + lsl r1, r6, #0x10 + ldr r0, [sp, #0x2c] + lsr r1, r1, #0x10 + bl sub_0201A6D0 +_021DBC7E: + ldr r1, [sp, #0x1c] + add r0, r5, #0 + bl sub_02073D48 + ldr r0, [sp, #0x24] + add r6, r6, #2 + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, #6 + blo _021DBC00 + ldr r0, [sp, #0x18] + add r0, r0, #2 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #5 + blo _021DBBEA + ldr r0, [sp, #0x48] + cmp r0, #0 + beq _021DBCE8 + ldr r0, [sp, #0x14] + cmp r0, #1 + beq _021DBCB4 + cmp r0, #2 + beq _021DBCC6 + b _021DBCD4 +_021DBCB4: + mov r0, #1 + lsl r0, r0, #0x1a + ldr r1, [r0, #0] + ldr r0, _021DBD34 ; =0x00300010 + and r1, r0 + ldr r0, [sp, #8] + ldr r0, [r0, #0x18] + str r1, [r0, #8] + b _021DBCD4 +_021DBCC6: + ldr r0, _021DBD38 ; =0x04001000 + ldr r1, [r0, #0] + ldr r0, _021DBD34 ; =0x00300010 + and r1, r0 + ldr r0, [sp, #8] + ldr r0, [r0, #0x18] + str r1, [r0, #8] +_021DBCD4: + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + ldr r0, [r0, #0x18] + ldr r2, [sp, #0x14] + ldr r3, [sp, #0x48] + lsl r1, r1, #5 + bl sub_020A8224 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} +_021DBCE8: + ldr r0, [sp, #8] + ldr r1, [r0, #0x18] + ldr r0, [r1, #0x14] + ldr r1, [r1, #0x10] + bl sub_020C2C54 + ldr r0, [sp, #0x14] + cmp r0, #1 + beq _021DBD02 + cmp r0, #2 + beq _021DBD16 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} +_021DBD02: + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + ldr r2, [r0, #0x18] + lsl r1, r1, #5 + ldr r0, [r2, #0x14] + ldr r2, [r2, #0x10] + bl sub_020C02BC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} +_021DBD16: + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + ldr r2, [r0, #0x18] + lsl r1, r1, #5 + ldr r0, [r2, #0x14] + ldr r2, [r2, #0x10] + bl sub_020C0314 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_021DBD2C: .word 0x000001EA +_021DBD30: .word 0x021E0228 +_021DBD34: .word 0x00300010 +_021DBD38: .word 0x04001000 + thumb_func_end ov19_021DBBA8 + + thumb_func_start ov19_021DBD3C +ov19_021DBD3C: ; 0x021DBD3C + ldr r0, [r0, #0x20] + bx lr + thumb_func_end ov19_021DBD3C + + thumb_func_start ov19_021DBD40 +ov19_021DBD40: ; 0x021DBD40 + add r0, #0xe0 + ldr r0, [r0, #0] + sub r0, r0, #3 + bpl _021DBD4A + add r0, #0x12 +_021DBD4A: + bx lr + thumb_func_end ov19_021DBD40 + + thumb_func_start ov19_021DBD4C +ov19_021DBD4C: ; 0x021DBD4C + push {r3, r4} + mov r4, #0 + ldr r1, _021DBD64 ; =0x00004BE4 + add r3, r4, #0 +_021DBD54: + add r2, r0, r4 + add r4, r4, #1 + strb r3, [r2, r1] + cmp r4, #0x12 + blt _021DBD54 + pop {r3, r4} + bx lr + nop +_021DBD64: .word 0x00004BE4 + thumb_func_end ov19_021DBD4C + + thumb_func_start ov19_021DBD68 +ov19_021DBD68: ; 0x021DBD68 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + mov r2, #0xf9 + add r4, r1, #0 + lsl r2, r2, #2 + add r3, r5, r2 + lsl r1, r4, #0xa + ldr r0, [r0, #0x14] + add r1, r3, r1 + add r2, #0x1c + bl sub_020C4B68 + mov r1, #0xf9 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, #0x1c + bl sub_020C2C54 + ldr r0, _021DBD98 ; =0x00004BE4 + mov r2, #1 + add r1, r5, r4 + strb r2, [r1, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DBD98: .word 0x00004BE4 + thumb_func_end ov19_021DBD68 + + thumb_func_start ov19_021DBD9C +ov19_021DBD9C: ; 0x021DBD9C + push {r4, r5, r6, lr} + sub sp, #0x28 + add r5, r0, #0 + mov r0, #0x63 + lsl r1, r1, #5 + lsl r0, r0, #4 + add r6, r1, r0 + add r4, r2, #0 + ldr r0, _021DBDF0 ; =0x00004BE4 + add r1, r5, r4 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _021DBDCC + mov r2, #0xf9 + lsl r2, r2, #2 + add r1, r5, r2 + lsl r0, r4, #0xa + add r0, r1, r0 + lsl r1, r6, #5 + add r2, #0x1c + bl sub_020C02BC + add sp, #0x28 + pop {r4, r5, r6, pc} +_021DBDCC: + add r0, sp, #4 + bl sub_020A818C + add r0, sp, #4 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #1 + bl ov19_021DBBA8 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DBD68 + add sp, #0x28 + pop {r4, r5, r6, pc} + nop +_021DBDF0: .word 0x00004BE4 + thumb_func_end ov19_021DBD9C + + thumb_func_start ov19_021DBDF4 +ov19_021DBDF4: ; 0x021DBDF4 + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + add r6, r0, #0 + bl ov19_021DBD4C + ldr r0, [r6, #0] + bl ov19_021D77D8 + add r4, r0, #0 + ldr r0, [r6, #0] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r4, #4] + mov r1, #0 + str r0, [sp] + str r1, [sp, #4] + ldr r3, [r6, #0x20] + add r0, sp, #0x40 + bl ov19_021D783C + add r0, r6, #0 + bl ov19_021DBD40 + add r7, r0, #0 + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0x63 + lsl r0, r0, #4 + str r0, [sp, #8] + add r4, r6, #0 + mov r5, #0x20 +_021DBE34: + add r0, sp, #0x1c + bl sub_020A818C + add r0, sp, #0x1c + str r0, [sp] + ldr r2, [sp, #8] + add r0, r6, #0 + add r1, r7, #0 + mov r3, #1 + bl ov19_021DBBA8 + add r0, sp, #0x1c + str r0, [sp, #0x40] + mov r0, #0xb + str r0, [sp] + mov r0, #1 + mov r2, #2 + str r0, [sp, #4] + lsl r2, r2, #8 + ldr r0, [r6, #8] + add r1, sp, #0x40 + lsr r3, r2, #1 + bl ov19_021D785C + str r0, [r4, #0x48] + cmp r0, #0 + bne _021DBE6E + bl sub_02022974 +_021DBE6E: + ldr r0, [r4, #0x48] + mov r1, #0 + bl sub_02021CAC + cmp r5, #0 + ble _021DBE8C + lsl r0, r5, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021DBE9A +_021DBE8C: + lsl r0, r5, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021DBE9A: + bl sub_020E1740 + str r0, [sp, #0x10] + mov r0, #0x16 + lsl r0, r0, #0xe + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #0x48] + add r1, sp, #0x10 + bl sub_02021C50 + add r0, r6, #0 + add r1, r7, #0 + bl ov19_021DBD68 + add r7, r7, #1 + cmp r7, #0x12 + blt _021DBEC2 + mov r7, #0 +_021DBEC2: + ldr r0, [sp, #8] + add r4, r4, #4 + add r0, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r5, #0x20 + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #7 + blt _021DBE34 + mov r4, #0 + add r5, r6, #0 +_021DBEDA: + ldr r0, [r6, #0xc] + bl ov19_021D5E90 + add r1, r4, #0 + bl sub_02079B54 + add r1, r5, #0 + add r1, #0x94 + add r4, r4, #1 + add r5, r5, #4 + str r0, [r1, #0] + cmp r4, #0x12 + blt _021DBEDA + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov19_021DBDF4 + + thumb_func_start ov19_021DBEF8 +ov19_021DBEF8: ; 0x021DBEF8 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DBF00: + ldr r0, [r5, #0x48] + cmp r0, #0 + beq _021DBF0C + bl sub_02021BD4 + str r6, [r5, #0x48] +_021DBF0C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + blt _021DBF00 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DBEF8 + + thumb_func_start ov19_021DBF18 +ov19_021DBF18: ; 0x021DBF18 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl ov19_021DBD40 + add r4, r0, #0 + mov r6, #0 + add r5, r7, #0 +_021DBF26: + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov19_021DBD9C + ldr r0, [r5, #0x48] + mov r1, #1 + bl sub_02021CAC + add r4, r4, #1 + cmp r4, #0x12 + blt _021DBF40 + mov r4, #0 +_021DBF40: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #7 + blt _021DBF26 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DBF18 + + thumb_func_start ov19_021DBF4C +ov19_021DBF4C: ; 0x021DBF4C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl ov19_021D5E90 + add r1, r5, #0 + ldr r2, _021DBFA8 ; =0x00004BFC + add r1, #0xe0 + ldr r1, [r1, #0] + ldr r2, [r5, r2] + ldr r4, [r5, #0x10] + bl sub_02079AF4 + ldr r1, _021DBFA8 ; =0x00004BFC + mov r0, #0 + ldr r1, [r5, r1] + add r2, r0, #0 + bl sub_02002D7C + add r6, r0, #0 + add r0, r4, #0 + mov r1, #7 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DBFAC ; =0x00020807 + ldr r2, _021DBFA8 ; =0x00004BFC + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r5, r2] + lsr r5, r6, #1 + mov r3, #0x30 + add r0, r4, #0 + sub r3, r3, r5 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201ACCC + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021DBFA8: .word 0x00004BFC +_021DBFAC: .word 0x00020807 + thumb_func_end ov19_021DBF4C + + thumb_func_start ov19_021DBFB0 +ov19_021DBFB0: ; 0x021DBFB0 + push {r4, lr} + ldr r4, [r0, #0x10] + mov r1, #7 + add r0, r4, #0 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201ACCC + pop {r4, pc} + thumb_func_end ov19_021DBFB0 + + thumb_func_start ov19_021DBFC4 +ov19_021DBFC4: ; 0x021DBFC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + ldr r0, [r7, #0x10] + mov r1, #4 + str r0, [sp, #0xc] + add r0, #0x10 + str r0, [sp, #0xc] + bl sub_0201ADA4 + add r0, r7, #0 + bl ov19_021DBD40 + mov r6, #0 + add r4, r0, #0 + add r5, r6, #0 +_021DBFE4: + ldr r0, [sp, #0xc] + lsl r1, r4, #2 + str r0, [sp] + add r1, r7, r1 + str r5, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r1, #0x94 + mov r2, #2 + ldr r0, [r7, #0x44] + ldr r1, [r1, #0] + add r3, r2, #0 + bl sub_0200C5BC + add r4, r4, #1 + cmp r4, #0x12 + blt _021DC008 + mov r4, #0 +_021DC008: + add r6, r6, #1 + add r5, #0x20 + cmp r6, #7 + blt _021DBFE4 + ldr r0, [sp, #0xc] + bl sub_0201ACCC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DBFC4 + + thumb_func_start ov19_021DC01C +ov19_021DC01C: ; 0x021DC01C + push {r4, lr} + ldr r4, [r0, #0x10] + mov r1, #4 + add r4, #0x10 + add r0, r4, #0 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201ACCC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DC01C + + thumb_func_start ov19_021DC034 +ov19_021DC034: ; 0x021DC034 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0xa + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + beq _021DC06E + ldr r0, _021DC070 ; =0x021E0208 + lsl r1, r6, #2 + ldr r0, [r0, r1] + str r5, [r4, #0] + mov r2, #0 + strb r2, [r4, #4] + add r1, r4, #0 + strb r2, [r4, #5] + bl sub_0200D9E8 + add r1, r5, #0 + add r1, #0xdc + add r5, #0xdc + str r0, [r1, #0] + ldr r0, [r5, #0] + cmp r0, #0 + bne _021DC06E + add r0, r4, #0 + bl sub_020181C4 +_021DC06E: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DC070: .word 0x021E0208 + thumb_func_end ov19_021DC034 + + thumb_func_start ov19_021DC074 +ov19_021DC074: ; 0x021DC074 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0] + mov r2, #0 + add r0, #0xdc + str r2, [r0, #0] + add r0, r1, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DC074 + + thumb_func_start ov19_021DC090 +ov19_021DC090: ; 0x021DC090 + add r0, #0xdc + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DC09C + mov r0, #1 + bx lr +_021DC09C: + mov r0, #0 + bx lr + thumb_func_end ov19_021DC090 + + thumb_func_start ov19_021DC0A0 +ov19_021DC0A0: ; 0x021DC0A0 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r4, r1, #0 + ldrb r2, [r4, #4] + ldr r5, [r4, #0] + cmp r2, #3 + bls _021DC0B0 + b _021DC1C6 +_021DC0B0: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DC0BC: ; jump table + .short _021DC0C4 - _021DC0BC - 2 ; case 0 + .short _021DC14A - _021DC0BC - 2 ; case 1 + .short _021DC170 - _021DC0BC - 2 ; case 2 + .short _021DC1C2 - _021DC0BC - 2 ; case 3 +_021DC0C4: + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + ldrb r0, [r4, #5] + lsl r1, r0, #1 + cmp r1, #0xa + bge _021DC11A + mov r1, #0xa + sub r1, r1, r0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #0x20 + str r1, [sp, #4] + str r0, [sp, #8] + ldr r2, [r5, #0x30] + ldr r0, [r5, #4] + mov r1, #1 + add r2, #0xc + mov r3, #0 + bl sub_020198C0 + ldrb r6, [r4, #5] + mov r0, #0x20 + mov r3, #0xa + str r0, [sp] + str r6, [sp, #4] + ldr r1, [r5, #0x30] + mov r2, #0 + add r1, #0xc + str r1, [sp, #8] + sub r1, r3, r6 + lsl r1, r1, #0x18 + str r2, [sp, #0xc] + lsr r1, r1, #0x18 + str r1, [sp, #0x10] + str r0, [sp, #0x14] + str r3, [sp, #0x18] + ldr r0, [r5, #4] + mov r1, #1 + bl sub_020198E8 + b _021DC13A +_021DC11A: + mov r0, #5 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + ldr r2, [r5, #0x30] + ldr r0, [r5, #4] + mov r1, #1 + add r2, #0xc + mov r3, #0 + bl sub_020198C0 + ldrb r0, [r4, #4] + add r0, r0, #1 + strb r0, [r4, #4] +_021DC13A: + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02019448 + mov r0, #7 + add sp, #0x1c + strb r0, [r4, #5] + pop {r3, r4, r5, r6, pc} +_021DC14A: + ldrb r0, [r4, #5] + add r3, r5, #0 + mov r2, #0x60 + add r1, r0, #0 + add r3, #0xe4 + mul r1, r2 + add r0, r3, r1 + mov r1, #0x1a + lsl r1, r1, #4 + bl sub_020C0160 + add r0, r5, #0 + bl ov19_021DBF18 + ldrb r0, [r4, #4] + add sp, #0x1c + add r0, r0, #1 + strb r0, [r4, #4] + pop {r3, r4, r5, r6, pc} +_021DC170: + ldrb r0, [r4, #5] + cmp r0, #0 + beq _021DC17A + sub r0, r0, #1 + strb r0, [r4, #5] +_021DC17A: + ldrb r0, [r4, #5] + add r3, r5, #0 + mov r2, #0x60 + add r1, r0, #0 + add r3, #0xe4 + mul r1, r2 + add r0, r3, r1 + mov r1, #0x1a + lsl r1, r1, #4 + bl sub_020C0160 + ldrb r0, [r4, #5] + cmp r0, #0 + bne _021DC1C6 + ldr r0, [r5, #0x10] + bl sub_0201A9F4 + ldr r0, [r5, #0x10] + add r0, #0x10 + bl sub_0201A9F4 + add r0, r5, #0 + bl ov19_021DBF4C + add r0, r5, #0 + bl ov19_021DBFC4 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02019448 + ldrb r0, [r4, #4] + add sp, #0x1c + add r0, r0, #1 + strb r0, [r4, #4] + pop {r3, r4, r5, r6, pc} +_021DC1C2: + bl ov19_021DC074 +_021DC1C6: + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DC0A0 + + thumb_func_start ov19_021DC1CC +ov19_021DC1CC: ; 0x021DC1CC + push {r4, r5, lr} + sub sp, #0x1c + add r5, r1, #0 + ldrb r2, [r5, #4] + ldr r4, [r5, #0] + cmp r2, #0 + beq _021DC1E6 + cmp r2, #1 + beq _021DC202 + cmp r2, #2 + beq _021DC294 + add sp, #0x1c + pop {r4, r5, pc} +_021DC1E6: + add r0, r4, #0 + bl ov19_021DBEF8 + add r0, r4, #0 + bl ov19_021DBFB0 + add r0, r4, #0 + bl ov19_021DC01C + ldrb r0, [r5, #4] + add sp, #0x1c + add r0, r0, #1 + strb r0, [r5, #4] + pop {r4, r5, pc} +_021DC202: + mov r0, #5 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + mov r2, #0 + ldr r0, [r4, #4] + mov r1, #1 + add r3, r2, #0 + bl sub_02019CB8 + ldrb r0, [r5, #5] + add r0, r0, #1 + strb r0, [r5, #5] + ldrb r0, [r5, #5] + lsl r1, r0, #1 + cmp r1, #0xa + bge _021DC282 + add r1, r0, #5 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #0x20 + str r1, [sp, #4] + mov r1, #5 + sub r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r2, [r4, #0x30] + ldr r0, [r4, #4] + mov r1, #1 + add r2, #0xc + mov r3, #0 + bl sub_020198C0 + ldrb r1, [r5, #5] + mov r2, #5 + mov r0, #0x20 + sub r2, r2, r1 + lsl r2, r2, #0x18 + mov r3, #0xa + sub r1, r3, r1 + lsl r1, r1, #0x18 + str r0, [sp] + lsr r2, r2, #0x18 + str r2, [sp, #4] + ldr r2, [r4, #0x30] + lsr r1, r1, #0x18 + add r2, #0xc + str r2, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + str r1, [sp, #0x10] + str r0, [sp, #0x14] + str r3, [sp, #0x18] + ldr r0, [r4, #4] + mov r1, #1 + bl sub_020198E8 + b _021DC288 +_021DC282: + ldrb r0, [r5, #4] + add r0, r0, #1 + strb r0, [r5, #4] +_021DC288: + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02019448 + add sp, #0x1c + pop {r4, r5, pc} +_021DC294: + bl ov19_021DC074 + add sp, #0x1c + pop {r4, r5, pc} + thumb_func_end ov19_021DC1CC + + thumb_func_start ov19_021DC29C +ov19_021DC29C: ; 0x021DC29C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0xa + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + beq _021DC350 + ldr r0, [r5, #0xc] + bl ov19_021D5F88 + add r6, r0, #0 + ldr r0, [r5, #4] + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r0, #0x18 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + ldr r2, [r5, #0x38] + ldr r0, [r5, #4] + mov r1, #1 + add r2, #0xc + mov r3, #0 + bl sub_020198C0 + ldr r0, [r5, #0x10] + mov r1, #4 + add r0, #0x20 + bl sub_0201ADA4 + ldr r2, _021DC354 ; =0x00004BF8 + add r1, r6, #0 + ldr r0, [r5, r2] + add r2, r2, #4 + ldr r2, [r5, r2] + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DC358 ; =0x00020104 + ldr r2, _021DC35C ; =0x00004BFC + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0x10] + ldr r2, [r5, r2] + add r0, #0x20 + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [r5, #0x10] + add r0, #0x20 + bl sub_0201A954 + add r0, r5, #0 + add r1, r6, #0 + bl ov19_021DC4F8 + mov r1, #0 + strh r1, [r4, #0x16] + str r5, [r4, #0] + ldr r0, [r5, #4] + str r0, [r4, #4] + str r1, [r4, #8] + mov r1, #0xe + lsl r1, r1, #0xe + str r1, [r4, #0xc] + ldr r0, [r4, #8] + sub r0, r1, r0 + mov r1, #6 + bl sub_020E1F6C + str r0, [r4, #0x10] + mov r0, #6 + strh r0, [r4, #0x14] + ldr r0, _021DC360 ; =ov19_021DC37C + add r1, r4, #0 + mov r2, #0 + bl ov19_021D77C8 + add r5, #0xdc + str r0, [r5, #0] +_021DC350: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DC354: .word 0x00004BF8 +_021DC358: .word 0x00020104 +_021DC35C: .word 0x00004BFC +_021DC360: .word ov19_021DC37C + thumb_func_end ov19_021DC29C + + thumb_func_start ov19_021DC364 +ov19_021DC364: ; 0x021DC364 + add r0, #0xdc + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DC370 + mov r0, #1 + bx lr +_021DC370: + mov r0, #0 + bx lr + thumb_func_end ov19_021DC364 + + thumb_func_start ov19_021DC374 +ov19_021DC374: ; 0x021DC374 + mov r1, #0 + add r0, #0xdc + str r1, [r0, #0] + bx lr + thumb_func_end ov19_021DC374 + + thumb_func_start ov19_021DC37C +ov19_021DC37C: ; 0x021DC37C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #0x16] + cmp r0, #0 + beq _021DC38E + cmp r0, #1 + beq _021DC394 + pop {r3, r4, r5, pc} +_021DC38E: + add r0, r0, #1 + strh r0, [r4, #0x16] + pop {r3, r4, r5, pc} +_021DC394: + ldrh r0, [r4, #0x14] + cmp r0, #0 + beq _021DC3C2 + sub r0, r0, #1 + strh r0, [r4, #0x14] + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + mov r2, #3 + add r3, r1, r0 + str r3, [r4, #8] + ldr r0, [r4, #4] + mov r1, #1 + asr r3, r3, #0xc + bl sub_02019184 + mov r1, #0xe + ldr r2, [r4, #8] + lsl r1, r1, #0x10 + ldr r0, [r4, #0] + sub r1, r1, r2 + bl ov19_021DC5B8 + pop {r3, r4, r5, pc} +_021DC3C2: + ldr r3, [r4, #0xc] + ldr r0, [r4, #4] + mov r1, #1 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + mov r1, #0xe + ldr r2, [r4, #0xc] + lsl r1, r1, #0x10 + ldr r0, [r4, #0] + sub r1, r1, r2 + bl ov19_021DC5B8 + ldr r1, _021DC3F0 ; =ov19_021DC374 + ldr r2, [r4, #0] + add r0, r4, #0 + bl ov19_021D79B8 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DC3F0: .word ov19_021DC374 + thumb_func_end ov19_021DC37C + + thumb_func_start ov19_021DC3F4 +ov19_021DC3F4: ; 0x021DC3F4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xa + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + beq _021DC434 + mov r1, #0 + strh r1, [r4, #0x16] + str r5, [r4, #0] + ldr r0, [r5, #4] + str r0, [r4, #4] + mov r0, #0xe + lsl r0, r0, #0xe + str r0, [r4, #8] + str r1, [r4, #0xc] + ldr r0, [r4, #8] + sub r0, r1, r0 + mov r1, #6 + bl sub_020E1F6C + str r0, [r4, #0x10] + mov r0, #6 + strh r0, [r4, #0x14] + ldr r0, _021DC438 ; =ov19_021DC46C + add r1, r4, #0 + mov r2, #0 + bl ov19_021D77C8 + add r5, #0xdc + str r0, [r5, #0] +_021DC434: + pop {r3, r4, r5, pc} + nop +_021DC438: .word ov19_021DC46C + thumb_func_end ov19_021DC3F4 + + thumb_func_start ov19_021DC43C +ov19_021DC43C: ; 0x021DC43C + push {r4, lr} + add r4, r0, #0 + add r0, #0xdc + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DC45E + ldr r0, [r4, #4] + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + bl ov19_021DC5E0 + mov r0, #1 + pop {r4, pc} +_021DC45E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DC43C + + thumb_func_start ov19_021DC464 +ov19_021DC464: ; 0x021DC464 + mov r1, #0 + add r0, #0xdc + str r1, [r0, #0] + bx lr + thumb_func_end ov19_021DC464 + + thumb_func_start ov19_021DC46C +ov19_021DC46C: ; 0x021DC46C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #0x14] + cmp r0, #0 + beq _021DC4A4 + sub r0, r0, #1 + strh r0, [r4, #0x14] + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + mov r2, #3 + add r3, r1, r0 + str r3, [r4, #8] + ldr r0, [r4, #4] + mov r1, #1 + asr r3, r3, #0xc + bl sub_02019184 + mov r1, #0xe + ldr r2, [r4, #8] + lsl r1, r1, #0x10 + ldr r0, [r4, #0] + sub r1, r1, r2 + bl ov19_021DC5B8 + add sp, #0x10 + pop {r3, r4, r5, pc} +_021DC4A4: + ldr r3, [r4, #0xc] + ldr r0, [r4, #4] + mov r1, #1 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + mov r1, #0xe + ldr r2, [r4, #0xc] + lsl r1, r1, #0x10 + ldr r0, [r4, #0] + sub r1, r1, r2 + bl ov19_021DC5B8 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r0, [r4, #4] + mov r1, #1 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02019448 + ldr r1, _021DC4F4 ; =ov19_021DC464 + ldr r2, [r4, #0] + add r0, r4, #0 + bl ov19_021D79B8 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DC4F4: .word ov19_021DC464 + thumb_func_end ov19_021DC46C + + thumb_func_start ov19_021DC4F8 +ov19_021DC4F8: ; 0x021DC4F8 + push {r3, r4, r5, r6, lr} + sub sp, #0x54 + add r5, r0, #0 + add r4, r1, #0 + beq _021DC5AE + ldr r0, [r5, #0] + bl ov19_021D77D8 + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r6, #0x20] + add r1, sp, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r3, [r6, #0x1c] + add r0, sp, #0x30 + bl ov19_021D783C + add r0, sp, #0xc + bl sub_020A818C + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + mov r1, #1 + bl sub_0207CE78 + add r1, r0, #0 + mov r0, #0xa + str r0, [sp] + mov r0, #0x10 + mov r2, #0 + add r3, sp, #8 + bl sub_02006F50 + add r6, r0, #0 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r1, [r0, #0] + ldr r0, _021DC5B4 ; =0x00300010 + mov r2, #1 + and r1, r0 + ldr r0, [sp, #8] + add r3, sp, #0xc + str r1, [r0, #8] + mov r1, #0xbe + ldr r0, [sp, #8] + lsl r1, r1, #8 + bl sub_020A8224 + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + mov r1, #2 + bl sub_0207CE78 + add r1, r0, #0 + mov r0, #0x20 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0x10 + mov r2, #1 + mov r3, #0xc0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #8] + add r1, sp, #0x30 + mov r2, #0x12 + mov r3, #0xe0 + bl ov19_021D785C + add r1, r5, #0 + add r1, #0x90 + add r5, #0x90 + str r0, [r1, #0] + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DC5A8 + mov r1, #6 + bl sub_02021E90 +_021DC5A8: + add r0, r6, #0 + bl sub_020181C4 +_021DC5AE: + add sp, #0x54 + pop {r3, r4, r5, r6, pc} + nop +_021DC5B4: .word 0x00300010 + thumb_func_end ov19_021DC4F8 + + thumb_func_start ov19_021DC5B8 +ov19_021DC5B8: ; 0x021DC5B8 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r2, #0x90 + ldr r2, [r2, #0] + cmp r2, #0 + beq _021DC5DC + mov r2, #0x12 + lsl r2, r2, #0xc + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + str r2, [sp] + add r0, #0x90 + ldr r0, [r0, #0] + add r1, sp, #0 + bl sub_02021C50 +_021DC5DC: + add sp, #0xc + pop {pc} + thumb_func_end ov19_021DC5B8 + + thumb_func_start ov19_021DC5E0 +ov19_021DC5E0: ; 0x021DC5E0 + push {r3, lr} + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DC5EE + bl sub_02021BD4 +_021DC5EE: + pop {r3, pc} + thumb_func_end ov19_021DC5E0 + + .rodata + + + .global Unk_ov19_021E0208 +Unk_ov19_021E0208: ; 0x021E0208 + .incbin "incbin/overlay19_rodata.bin", 0x418, 0x420 - 0x418 + + .global Unk_ov19_021E0210 +Unk_ov19_021E0210: ; 0x021E0210 + .incbin "incbin/overlay19_rodata.bin", 0x420, 0x438 - 0x420 + + .global Unk_ov19_021E0228 +Unk_ov19_021E0228: ; 0x021E0228 + .incbin "incbin/overlay19_rodata.bin", 0x438, 0xA + diff --git a/asm/ov19_021DC5F0.s b/asm/ov19_021DC5F0.s new file mode 100644 index 000000000..673edb8b9 --- /dev/null +++ b/asm/ov19_021DC5F0.s @@ -0,0 +1,1335 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DC5F0 +ov19_021DC5F0: ; 0x021DC5F0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + str r4, [r5, #0] + ldr r0, [sp, #0x18] + str r6, [r5, #0xc] + str r0, [r5, #8] + str r3, [r5, #4] + add r0, r4, #0 + bl ov19_021D77D8 + str r0, [r5, #0x38] + add r0, r4, #0 + bl ov19_021D77E0 + str r0, [r5, #0x10] + add r0, r6, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021DC626 + mov r0, #0xe + str r0, [r5, #0x30] + mov r0, #0 + b _021DC62C +_021DC626: + mov r0, #9 + str r0, [r5, #0x30] + sub r0, #0x31 +_021DC62C: + str r0, [r5, #0x34] + add r0, r5, #0 + mov r1, #0 + add r0, #0x2b + strb r1, [r0] + str r1, [r5, #0x2c] + add r1, r5, #0 + ldr r0, [r5, #0x38] + add r1, #0x3c + mov r2, #6 + bl ov19_021DA3CC + mov r1, #9 + mov r0, #0xa + lsl r1, r1, #6 + bl sub_02018144 + str r0, [r5, #0x1c] + mov r0, #0xa + str r0, [sp] + add r3, r5, #0 + ldr r0, [sp, #0x1c] + mov r1, #6 + mov r2, #1 + add r3, #0x18 + bl sub_020071D0 + str r0, [r5, #0x14] + cmp r0, #0 + beq _021DC66E + ldr r1, [r5, #0x1c] + cmp r1, #0 + bne _021DC674 +_021DC66E: + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021DC674: + add r0, r5, #0 + bl ov19_021DCDB4 + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov19_021DC5F0 + + thumb_func_start ov19_021DC680 +ov19_021DC680: ; 0x021DC680 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021DC68E + bl sub_020181C4 +_021DC68E: + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _021DC698 + bl sub_020181C4 +_021DC698: + add r0, r4, #0 + bl ov19_021DCF50 + pop {r4, pc} + thumb_func_end ov19_021DC680 + + thumb_func_start ov19_021DC6A0 +ov19_021DC6A0: ; 0x021DC6A0 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + mov r2, #0 + add r1, #0x2b + strb r2, [r1] + add r1, r4, #0 + add r1, #0x2b + ldrb r1, [r1] + bl ov19_021DCD64 + add r0, r4, #0 + mov r1, #1 + bl ov19_021DCEB8 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019448 + pop {r4, pc} + thumb_func_end ov19_021DC6A0 + + thumb_func_start ov19_021DC6C8 +ov19_021DC6C8: ; 0x021DC6C8 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl ov19_021DCEB8 + add r0, r4, #0 + mov r1, #0x1a + add r0, #0x2b + strb r1, [r0] + ldr r0, _021DC6F4 ; =ov19_021DC708 + add r1, r4, #0 + mov r2, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021DC6EC + mov r0, #1 + b _021DC6EE +_021DC6EC: + mov r0, #0 +_021DC6EE: + str r0, [r4, #0x2c] + pop {r4, pc} + nop +_021DC6F4: .word ov19_021DC708 + thumb_func_end ov19_021DC6C8 + + thumb_func_start ov19_021DC6F8 +ov19_021DC6F8: ; 0x021DC6F8 + ldr r0, [r0, #0x2c] + cmp r0, #0 + bne _021DC702 + mov r0, #1 + bx lr +_021DC702: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DC6F8 + + thumb_func_start ov19_021DC708 +ov19_021DC708: ; 0x021DC708 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #2 + bls _021DC724 + add r0, r5, #0 + add r0, #0x2b + ldrb r0, [r0] + ldr r4, _021DC764 ; =0xFFFF0000 + sub r1, r0, #2 + b _021DC72A +_021DC724: + lsl r0, r0, #0xf + neg r4, r0 + mov r1, #0 +_021DC72A: + add r0, r5, #0 + add r0, #0x2b + strb r1, [r0] + add r1, r5, #0 + add r1, #0x2b + ldrb r1, [r1] + add r0, r5, #0 + bl ov19_021DCD64 + ldr r0, [r5, #4] + mov r1, #2 + bl sub_02019448 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DCE50 + add r0, r5, #0 + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #0 + bne _021DC760 + mov r0, #0 + str r0, [r5, #0x2c] + add r0, r6, #0 + bl sub_0200DA58 +_021DC760: + pop {r4, r5, r6, pc} + nop +_021DC764: .word 0xFFFF0000 + thumb_func_end ov19_021DC708 + + thumb_func_start ov19_021DC768 +ov19_021DC768: ; 0x021DC768 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DC784 ; =ov19_021DC79C + add r1, r4, #0 + mov r2, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021DC77E + mov r0, #1 + b _021DC780 +_021DC77E: + mov r0, #0 +_021DC780: + str r0, [r4, #0x2c] + pop {r4, pc} + ; .align 2, 0 +_021DC784: .word ov19_021DC79C + thumb_func_end ov19_021DC768 + + thumb_func_start ov19_021DC788 +ov19_021DC788: ; 0x021DC788 + push {r3, lr} + ldr r1, [r0, #0x2c] + cmp r1, #0 + bne _021DC798 + bl ov19_021DCF50 + mov r0, #1 + pop {r3, pc} +_021DC798: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov19_021DC788 + + thumb_func_start ov19_021DC79C +ov19_021DC79C: ; 0x021DC79C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #0x18 + bhs _021DC7BC + add r0, r5, #0 + add r0, #0x2b + ldrb r0, [r0] + mov r4, #1 + lsl r4, r4, #0x10 + add r1, r0, #2 + b _021DC7C2 +_021DC7BC: + mov r1, #0x1a + sub r0, r1, r0 + lsl r4, r0, #0xf +_021DC7C2: + add r0, r5, #0 + add r0, #0x2b + strb r1, [r0] + add r0, r5, #0 + add r0, #0x2b + ldrb r1, [r0] + cmp r1, #2 + bls _021DC7FE + asr r0, r4, #0xc + lsr r0, r0, #3 + sub r1, r1, #2 + sub r1, r1, r0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #0xf + lsl r0, r0, #0x18 + str r1, [sp, #4] + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r3, [r5, #0x30] + ldr r0, [r5, #4] + lsl r3, r3, #0x18 + mov r1, #2 + mov r2, #0 + lsr r3, r3, #0x18 + bl sub_02019CB8 +_021DC7FE: + add r1, r5, #0 + add r1, #0x2b + ldrb r1, [r1] + add r0, r5, #0 + bl ov19_021DCD64 + ldr r0, [r5, #4] + mov r1, #2 + bl sub_02019448 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DCE50 + add r0, r5, #0 + add r0, #0x2b + ldrb r0, [r0] + cmp r0, #0x1a + bne _021DC82E + mov r0, #0 + str r0, [r5, #0x2c] + add r0, r6, #0 + bl sub_0200DA58 +_021DC82E: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DC79C + + thumb_func_start ov19_021DC834 +ov19_021DC834: ; 0x021DC834 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r0, #0 + ldr r0, [r6, #0xc] + ldr r0, [r0, #4] + bl sub_0207A0F8 + add r1, r6, #0 + add r1, #0x28 + ldrb r4, [r1] + cmp r4, r0 + bge _021DC8D8 + sub r0, r0, r4 + str r0, [sp, #8] + cmp r4, #5 + bge _021DC8B0 + mov r0, #0x34 + add r1, r4, #0 + mul r1, r0 + add r0, r6, #0 + str r0, [sp, #0xc] + add r0, #0x3c + str r0, [sp, #0xc] + add r5, r0, r1 + add r7, r6, r1 + ldr r0, _021DC8E0 ; =0x00000418 + lsl r1, r4, #5 + add r0, r1, r0 + str r0, [sp, #4] +_021DC86E: + add r1, r4, #1 + mov r0, #0x34 + mul r0, r1 + ldr r1, [sp, #0xc] + str r0, [sp] + add r0, r1, r0 + add r1, r5, #0 + mov r2, #1 + bl ov19_021DA418 + ldr r2, [sp, #0xc] + ldr r1, [sp] + ldr r0, [r6, #0x38] + add r1, r2, r1 + mov r2, #1 + bl ov19_021DA3CC + ldr r0, [r7, #0x3c] + cmp r0, #0 + beq _021DC8A0 + ldr r0, [r6, #0x38] + ldr r2, [sp, #4] + add r1, r5, #0 + bl ov19_021DA754 +_021DC8A0: + ldr r0, [sp, #4] + add r4, r4, #1 + add r0, #0x20 + add r5, #0x34 + add r7, #0x34 + str r0, [sp, #4] + cmp r4, #5 + blt _021DC86E +_021DC8B0: + add r1, r6, #0 + ldr r0, [sp, #8] + add r1, #0x29 + strb r0, [r1] + add r0, r6, #0 + mov r2, #0 + add r0, #0x2a + strb r2, [r0] + ldr r0, _021DC8E4 ; =ov19_021DC8E8 + add r1, r6, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021DC8D0 + mov r0, #1 + b _021DC8D2 +_021DC8D0: + mov r0, #0 +_021DC8D2: + add sp, #0x10 + str r0, [r6, #0x2c] + pop {r3, r4, r5, r6, r7, pc} +_021DC8D8: + mov r0, #0 + str r0, [r6, #0x2c] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DC8E0: .word 0x00000418 +_021DC8E4: .word ov19_021DC8E8 + thumb_func_end ov19_021DC834 + + thumb_func_start ov19_021DC8E8 +ov19_021DC8E8: ; 0x021DC8E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r1, [sp, #4] + ldr r2, [sp, #4] + str r0, [sp] + add r1, #0x28 + ldr r0, [sp, #4] + add r2, #0x2a + add r0, #0x29 + ldrb r7, [r0] + ldr r0, [sp, #4] + ldrb r1, [r1] + ldrb r3, [r2] + ldr r0, [r0, #0x1c] + lsl r2, r1, #3 + add r3, r3, r2 + mov r2, #0xc + mul r2, r3 + add r4, r0, r2 + mov r6, #0 + cmp r7, #0 + ble _021DC934 + mov r0, #0x34 + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #4] + add r5, r0, r2 +_021DC91E: + ldr r0, [r5, #0x3c] + cmp r0, #0 + beq _021DC92A + add r1, r4, #0 + bl sub_02021C50 +_021DC92A: + add r6, r6, #1 + add r5, #0x34 + add r4, #0x60 + cmp r6, r7 + blt _021DC91E +_021DC934: + ldr r0, [sp, #4] + add r0, #0x2a + ldrb r0, [r0] + add r1, r0, #1 + ldr r0, [sp, #4] + add r0, #0x2a + strb r1, [r0] + ldr r0, [sp, #4] + add r0, #0x2a + ldrb r0, [r0] + cmp r0, #8 + blo _021DC958 + ldr r0, [sp, #4] + mov r1, #0 + str r1, [r0, #0x2c] + ldr r0, [sp] + bl sub_0200DA58 +_021DC958: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DC8E8 + + thumb_func_start ov19_021DC95C +ov19_021DC95C: ; 0x021DC95C + ldr r0, [r0, #0x2c] + cmp r0, #0 + bne _021DC966 + mov r0, #1 + bx lr +_021DC966: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DC95C + + thumb_func_start ov19_021DC96C +ov19_021DC96C: ; 0x021DC96C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0xc] + ldr r0, [r0, #4] + bl sub_0207A0F8 + sub r4, r0, #1 + add r0, r5, #0 + add r0, #0x28 + ldrb r0, [r0] + cmp r0, r4 + bls _021DC9F2 + mov r0, #0x34 + mul r0, r4 + add r0, r5, r0 + ldr r0, [r0, #0x3c] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r1, _021DC9FC ; =0x021E0234 + str r0, [r2, #0] + lsl r0, r4, #2 + ldrh r1, [r1, r0] + ldr r2, [r5, #0x34] + add r1, r2, r1 + lsl r2, r1, #0xc + ldr r1, [sp] + sub r2, r2, r1 + asr r1, r2, #2 + lsr r1, r1, #0x1d + add r1, r2, r1 + asr r1, r1, #3 + str r1, [r5, #0x20] + ldr r1, _021DCA00 ; =0x021E0236 + mov r2, #0 + ldrh r0, [r1, r0] + lsl r1, r0, #0xc + ldr r0, [sp, #4] + sub r1, r1, r0 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r0, r0, #3 + str r0, [r5, #0x24] + add r0, r5, #0 + add r0, #0x2a + strb r2, [r0] + add r0, r5, #0 + add r0, #0x28 + strb r4, [r0] + ldr r0, _021DCA04 ; =ov19_021DCA18 + add r1, r5, #0 + bl ov19_021D77C8 + cmp r0, #0 + beq _021DC9EA + mov r0, #1 + b _021DC9EC +_021DC9EA: + mov r0, #0 +_021DC9EC: + add sp, #0xc + str r0, [r5, #0x2c] + pop {r4, r5, pc} +_021DC9F2: + mov r0, #0 + str r0, [r5, #0x2c] + add sp, #0xc + pop {r4, r5, pc} + nop +_021DC9FC: .word 0x021E0234 +_021DCA00: .word 0x021E0236 +_021DCA04: .word ov19_021DCA18 + thumb_func_end ov19_021DC96C + + thumb_func_start ov19_021DCA08 +ov19_021DCA08: ; 0x021DCA08 + ldr r0, [r0, #0x2c] + cmp r0, #0 + bne _021DCA12 + mov r0, #1 + bx lr +_021DCA12: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DCA08 + + thumb_func_start ov19_021DCA18 +ov19_021DCA18: ; 0x021DCA18 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x28 + ldrb r1, [r0] + mov r0, #0x34 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x3c] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r5, #0 + add r0, #0x2a + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x2a + strb r1, [r0] + add r0, r5, #0 + add r0, #0x2a + ldrb r0, [r0] + cmp r0, #8 + blo _021DCA7E + add r1, r5, #0 + add r1, #0x28 + ldrb r1, [r1] + ldr r0, [r5, #0x34] + mov r4, #1 + lsl r2, r1, #2 + ldr r1, _021DCAB8 ; =0x021E0234 + ldrh r1, [r1, r2] + add r0, r0, r1 + lsl r0, r0, #0xc + str r0, [sp] + add r0, r5, #0 + add r0, #0x28 + ldrb r0, [r0] + lsl r1, r0, #2 + ldr r0, _021DCABC ; =0x021E0236 + ldrh r0, [r0, r1] + lsl r0, r0, #0xc + str r0, [sp, #4] + b _021DCA90 +_021DCA7E: + ldr r1, [sp] + ldr r0, [r5, #0x20] + mov r4, #0 + add r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r5, #0x24] + add r0, r1, r0 + str r0, [sp, #4] +_021DCA90: + add r0, r5, #0 + add r0, #0x28 + ldrb r1, [r0] + mov r0, #0x34 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x3c] + add r1, sp, #0 + bl sub_02021C50 + cmp r4, #0 + beq _021DCAB2 + mov r0, #0 + str r0, [r5, #0x2c] + add r0, r6, #0 + bl sub_0200DA58 +_021DCAB2: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021DCAB8: .word 0x021E0234 +_021DCABC: .word 0x021E0236 + thumb_func_end ov19_021DCA18 + + thumb_func_start ov19_021DCAC0 +ov19_021DCAC0: ; 0x021DCAC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl ov19_021D5E68 + mov r1, #0x11 + ldr r2, [r5, #0xc] + lsl r1, r1, #4 + ldrh r1, [r2, r1] + cmp r1, r0 + bne _021DCADC + ldr r0, [r5, #0x10] + bl ov19_021D84E0 +_021DCADC: + ldr r0, [r5, #0xc] + bl ov19_021D5E2C + add r4, r0, #0 + add r2, r5, #0 + mov r1, #0x34 + ldr r0, [r5, #0x38] + add r2, #0x3c + mul r1, r4 + add r1, r2, r1 + mov r2, #1 + bl ov19_021DA3F0 + add r5, #0x28 + strb r4, [r5] + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DCAC0 + + thumb_func_start ov19_021DCAFC +ov19_021DCAFC: ; 0x021DCAFC + add r2, r0, #0 + mov r0, #0x5d + mov r3, #0 + lsl r0, r0, #2 + strb r3, [r2, r0] + add r0, r2, #0 + add r0, #0x28 + mov r3, #0x34 + strb r1, [r0] + ldr r0, [r2, #0x38] + add r2, #0x3c + mul r3, r1 + add r1, r2, r3 + ldr r3, _021DCB1C ; =ov19_021DA7B8 + mov r2, #1 + bx r3 + ; .align 2, 0 +_021DCB1C: .word ov19_021DA7B8 + thumb_func_end ov19_021DCAFC + + thumb_func_start ov19_021DCB20 +ov19_021DCB20: ; 0x021DCB20 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0x28 + ldrb r1, [r0] + add r4, r5, #0 + mov r0, #0x34 + add r6, r1, #0 + mul r6, r0 + mov r0, #0x5d + lsl r0, r0, #2 + ldrb r0, [r5, r0] + add r4, #0x3c + cmp r0, #0 + beq _021DCB42 + cmp r0, #1 + beq _021DCB8A + b _021DCB9A +_021DCB42: + ldr r0, [r5, #0x38] + add r1, r4, r6 + bl ov19_021DA7E0 + cmp r0, #0 + beq _021DCB9A + ldr r0, [r5, #0] + bl ov19_021D7964 + add r7, r0, #0 + bl ov19_021D3B18 + cmp r0, #0 + beq _021DCB9A + add r0, r7, #0 + bl ov19_021D3B20 + cmp r0, #0 + ldr r0, [r5, #0x38] + beq _021DCB76 + add r1, r4, r6 + mov r2, #1 + bl ov19_021DA3F0 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DCB76: + add r1, r4, r6 + mov r2, #2 + bl ov19_021DA7B8 + mov r0, #0x5d + lsl r0, r0, #2 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + b _021DCB9A +_021DCB8A: + ldr r0, [r5, #0x38] + add r1, r4, r6 + bl ov19_021DA7E0 + cmp r0, #0 + beq _021DCB9A + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DCB9A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DCB20 + + thumb_func_start ov19_021DCBA0 +ov19_021DCBA0: ; 0x021DCBA0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0xc] + bl ov19_021D5E10 + cmp r0, #1 + bne _021DCBD8 + ldr r0, [r7, #0xc] + bl ov19_021D5EC8 + add r5, r7, #0 + str r0, [sp] + mov r6, #0 + add r4, r7, #0 + add r5, #0x3c +_021DCBBE: + ldr r0, [r4, #0x3c] + cmp r0, #0 + beq _021DCBCE + ldr r0, [r7, #0x38] + ldr r2, [sp] + add r1, r5, #0 + bl ov19_021DA63C +_021DCBCE: + add r6, r6, #1 + add r4, #0x34 + add r5, #0x34 + cmp r6, #6 + blt _021DCBBE +_021DCBD8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DCBA0 + + thumb_func_start ov19_021DCBDC +ov19_021DCBDC: ; 0x021DCBDC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r5, #0 + mov r0, #0x34 + add r4, r1, #0 + mul r4, r0 + add r6, #0x3c + ldr r0, [r6, r4] + cmp r0, #0 + beq _021DCC12 + ldr r0, [r5, #0x38] + add r1, r6, r4 + bl ov19_021DA690 + ldr r0, [r5, #0xc] + bl ov19_021D5EC8 + add r2, r0, #0 + ldr r0, [r5, #0x38] + add r1, r6, r4 + bl ov19_021DA63C + ldr r0, [r5, #0x38] + add r1, r6, r4 + mov r2, #0 + bl ov19_021DA694 +_021DCC12: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DCBDC + + thumb_func_start ov19_021DCC14 +ov19_021DCC14: ; 0x021DCC14 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl ov19_021D5E2C + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl ov19_021D5EA0 + add r2, r0, #0 + add r1, r5, #0 + mov r0, #0x34 + add r3, r4, #0 + add r1, #0x3c + mul r3, r0 + ldr r0, [r1, r3] + cmp r0, #0 + beq _021DCC40 + ldr r0, [r5, #0x38] + add r1, r1, r3 + bl ov19_021DA68C +_021DCC40: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DCC14 + + thumb_func_start ov19_021DCC44 +ov19_021DCC44: ; 0x021DCC44 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r0, #0x34 + add r6, r4, #0 + mul r6, r0 + add r0, r5, #0 + add r7, r3, #0 + add r0, #0x3c + str r2, [sp] + add r0, r0, r6 + add r1, r7, #0 + mov r2, #1 + bl ov19_021DA418 + ldr r0, [r5, #0x38] + ldr r2, [sp] + add r1, r7, #0 + bl ov19_021DA754 + add r1, r5, #0 + add r1, #0x3c + ldr r0, [r5, #0x38] + add r1, r1, r6 + mov r2, #1 + bl ov19_021DA3CC + add r5, #0x28 + strb r4, [r5] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DCC44 + + thumb_func_start ov19_021DCC80 +ov19_021DCC80: ; 0x021DCC80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0xc] + str r1, [sp] + ldr r0, [r0, #4] + str r2, [sp, #4] + bl sub_0207A0F8 + sub r7, r0, #1 + add r4, r5, #0 + mov r0, #0x34 + add r6, r7, #0 + mul r6, r0 + add r4, #0x3c + ldr r0, [sp, #4] + add r1, r4, r6 + mov r2, #1 + bl ov19_021DA418 + ldr r2, _021DCCD0 ; =0x00000418 + lsl r3, r7, #5 + ldr r0, [r5, #0x38] + add r1, r4, r6 + add r2, r3, r2 + bl ov19_021DA754 + ldr r0, [r4, r6] + mov r1, #1 + bl sub_02021E80 + ldr r0, [r4, r6] + add r1, r7, #4 + bl ov19_021D78AC + ldr r0, [sp] + add r5, #0x28 + strb r0, [r5] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DCCD0: .word 0x00000418 + thumb_func_end ov19_021DCC80 + + thumb_func_start ov19_021DCCD4 +ov19_021DCCD4: ; 0x021DCCD4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + add r5, r6, #0 + mov r0, #0x34 + add r4, r7, #0 + mul r4, r0 + add r5, #0x3c + add r0, r2, #0 + add r1, r5, r4 + mov r2, #1 + bl ov19_021DA418 + ldr r2, _021DCD14 ; =0x00000418 + lsl r3, r7, #5 + ldr r0, [r6, #0x38] + add r1, r5, r4 + add r2, r3, r2 + bl ov19_021DA754 + ldr r0, [r5, r4] + mov r1, #1 + bl sub_02021E80 + ldr r0, [r5, r4] + add r1, r7, #4 + bl ov19_021D78AC + add r6, #0x28 + strb r7, [r6] + pop {r3, r4, r5, r6, r7, pc} + nop +_021DCD14: .word 0x00000418 + thumb_func_end ov19_021DCCD4 + + thumb_func_start ov19_021DCD18 +ov19_021DCD18: ; 0x021DCD18 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #6 + blo _021DCD26 + bl sub_02022974 +_021DCD26: + mov r0, #0x34 + add r5, #0x3c + mul r0, r4 + add r0, r5, r0 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DCD18 + + thumb_func_start ov19_021DCD30 +ov19_021DCD30: ; 0x021DCD30 + push {r3, r4} + cmp r1, #6 + bne _021DCD44 + ldr r0, [r0, #0x34] + add r0, #0xc0 + str r0, [r2, #0] + mov r0, #0xb8 + str r0, [r3, #0] + pop {r3, r4} + bx lr +_021DCD44: + ldr r4, [r0, #0x34] + ldr r0, _021DCD5C ; =0x021E0234 + lsl r1, r1, #2 + ldrh r0, [r0, r1] + add r0, r4, r0 + str r0, [r2, #0] + ldr r0, _021DCD60 ; =0x021E0236 + ldrh r0, [r0, r1] + str r0, [r3, #0] + pop {r3, r4} + bx lr + nop +_021DCD5C: .word 0x021E0234 +_021DCD60: .word 0x021E0236 + thumb_func_end ov19_021DCD30 + + thumb_func_start ov19_021DCD64 +ov19_021DCD64: ; 0x021DCD64 + push {r3, r4, lr} + sub sp, #0xc + add r3, r0, #0 + cmp r1, #2 + bhi _021DCD7E + mov r0, #2 + sub r1, r0, r1 + add r2, r1, #0 + mov r0, #0x1e + mul r2, r0 + mov r1, #0x18 + mov r0, #0 + b _021DCD8C +_021DCD7E: + cmp r1, #0x1a + bhs _021DCDB0 + mov r0, #0x1a + sub r1, r0, r1 + mov r0, #0x18 + mov r2, #0 + sub r0, r0, r1 +_021DCD8C: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xf + str r0, [sp, #4] + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r4, [r3, #0x18] + ldr r0, [r3, #4] + ldr r3, [r3, #0x30] + add r4, #0xc + lsl r3, r3, #0x18 + mov r1, #2 + add r2, r4, r2 + lsr r3, r3, #0x18 + bl sub_020198C0 +_021DCDB0: + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov19_021DCD64 + + thumb_func_start ov19_021DCDB4 +ov19_021DCDB4: ; 0x021DCDB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + str r1, [sp, #4] + mov r0, #0 + ldr r1, _021DCE4C ; =0x021E0234 + mov ip, r0 +_021DCDC2: + ldrh r3, [r1] + ldrh r2, [r1, #4] + mov r0, #0 + ldrh r4, [r1, #2] + sub r2, r3, r2 + lsl r3, r2, #0xc + asr r2, r3, #2 + lsr r2, r2, #0x1d + add r2, r3, r2 + ldrh r3, [r1, #6] + asr r2, r2, #3 + mov lr, r2 + sub r3, r4, r3 + lsl r4, r3, #0xc + asr r3, r4, #2 + lsr r3, r3, #0x1d + add r3, r4, r3 + ldr r2, [sp, #4] + add r6, r0, #0 + asr r7, r3, #3 + add r5, r0, #0 +_021DCDEC: + ldr r3, [sp] + add r5, r5, r7 + ldr r4, [r3, #0x34] + ldrh r3, [r1, #4] + add r0, r0, #1 + add r3, r4, r3 + lsl r4, r3, #0xc + mov r3, lr + add r6, r6, r3 + add r3, r4, r6 + str r3, [r2, #0] + ldrh r3, [r1, #6] + lsl r3, r3, #0xc + add r3, r3, r5 + str r3, [r2, #4] + mov r3, #0 + str r3, [r2, #8] + add r2, #0xc + cmp r0, #7 + blo _021DCDEC + ldr r3, [sp] + mov r2, #0xc + ldr r4, [r3, #0x34] + ldrh r3, [r1] + mul r2, r0 + ldr r0, [sp, #4] + add r3, r4, r3 + lsl r4, r3, #0xc + ldr r3, [sp, #4] + add r0, r0, r2 + str r4, [r3, r2] + ldrh r2, [r1, #2] + add r1, r1, #4 + lsl r2, r2, #0xc + str r2, [r0, #4] + mov r2, #0 + str r2, [r0, #8] + add r0, r3, #0 + add r0, #0x60 + str r0, [sp, #4] + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #5 + blo _021DCDC2 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DCE4C: .word 0x021E0234 + thumb_func_end ov19_021DCDB4 + + thumb_func_start ov19_021DCE50 +ov19_021DCE50: ; 0x021DCE50 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + mov r7, #0 +_021DCE5A: + ldr r0, [r5, #0x3c] + cmp r0, #0 + beq _021DCEB2 + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + ldr r0, [sp, #4] + add r0, r0, r4 + str r0, [sp, #4] + ldr r0, [r5, #0x3c] + bl sub_02021C50 + cmp r4, #0 + bge _021DCE98 + mov r0, #0xd + ldr r1, [sp, #4] + lsl r0, r0, #0x10 + cmp r1, r0 + bge _021DCEAA + ldr r0, [r5, #0x3c] + mov r1, #1 + bl sub_02021CAC + b _021DCEAA +_021DCE98: + mov r0, #0xd + ldr r1, [sp, #4] + lsl r0, r0, #0x10 + cmp r1, r0 + blt _021DCEAA + ldr r0, [r5, #0x3c] + mov r1, #0 + bl sub_02021CAC +_021DCEAA: + add r7, r7, #1 + add r5, #0x34 + cmp r7, #6 + blt _021DCE5A +_021DCEB2: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DCE50 + + thumb_func_start ov19_021DCEB8 +ov19_021DCEB8: ; 0x021DCEB8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #0x24] + str r1, [sp, #0x10] + cmp r1, #0 + beq _021DCECA + mov r0, #0 + str r0, [sp, #0x14] + b _021DCECE +_021DCECA: + mov r0, #0xd0 + str r0, [sp, #0x14] +_021DCECE: + ldr r0, [sp, #0x24] + ldr r0, [r0, #0xc] + ldr r0, [r0, #4] + bl sub_0207A0F8 + mov r4, #0 + str r0, [sp, #0x20] + cmp r0, #0 + ble _021DCF44 + ldr r0, [sp, #0x24] + ldr r7, _021DCF48 ; =0x00000418 + str r0, [sp, #0x1c] + add r0, #0x3c + str r0, [sp, #0x1c] + ldr r0, [sp, #0x24] + ldr r5, _021DCF4C ; =0x021E0234 + str r0, [sp, #0x18] +_021DCEF0: + ldr r0, [sp, #0x24] + add r1, r4, #0 + ldr r0, [r0, #0xc] + ldr r0, [r0, #4] + bl sub_0207A0FC + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + add r0, r4, #4 + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + str r7, [sp, #8] + str r0, [sp, #0xc] + ldr r2, [sp, #0x24] + ldr r0, [sp, #0x24] + ldr r3, [r2, #0x34] + ldrh r2, [r5] + ldrh r6, [r5, #2] + ldr r0, [r0, #0x38] + add r2, r3, r2 + ldr r3, [sp, #0x14] + add r3, r3, r6 + bl ov19_021DA428 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + ldr r0, [r0, #0x3c] + bl sub_02021CAC + ldr r0, [sp, #0x1c] + add r4, r4, #1 + add r0, #0x34 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r7, #0x20 + add r0, #0x34 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r5, r5, #4 + cmp r4, r0 + blt _021DCEF0 +_021DCF44: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DCF48: .word 0x00000418 +_021DCF4C: .word 0x021E0234 + thumb_func_end ov19_021DCEB8 + + thumb_func_start ov19_021DCF50 +ov19_021DCF50: ; 0x021DCF50 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0xc] + ldr r0, [r0, #4] + bl sub_0207A0F8 + mov r6, #0 + str r0, [sp] + cmp r0, #0 + ble _021DCF86 + add r5, r7, #0 + add r4, r7, #0 + add r5, #0x3c +_021DCF6A: + ldr r0, [r4, #0x3c] + cmp r0, #0 + beq _021DCF7A + ldr r0, [r7, #0x38] + add r1, r5, #0 + mov r2, #1 + bl ov19_021DA3F0 +_021DCF7A: + ldr r0, [sp] + add r6, r6, #1 + add r4, #0x34 + add r5, #0x34 + cmp r6, r0 + blt _021DCF6A +_021DCF86: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DCF50 + + .rodata + + + .global Unk_ov19_021E0234 +Unk_ov19_021E0234: ; 0x021E0234 + .incbin "incbin/overlay19_rodata.bin", 0x444, 0x18 + diff --git a/asm/ov19_021DCF88.s b/asm/ov19_021DCF88.s new file mode 100644 index 000000000..22c2316b2 --- /dev/null +++ b/asm/ov19_021DCF88.s @@ -0,0 +1,2800 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DCF88 +ov19_021DCF88: ; 0x021DCF88 + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + add r6, r0, #0 + add r0, r5, #0 + add r7, r1, #0 + str r3, [sp] + bl ov19_021D5E08 + cmp r0, #4 + bne _021DCFA4 + mov r0, #0 + str r0, [r6, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DCFA4: + mov r0, #0xa + mov r1, #0xf4 + bl sub_02018144 + add r4, r0, #0 + beq _021DD020 + ldr r0, [sp] + mov r1, #0xa + str r0, [r4, #8] + str r7, [r4, #0] + ldr r0, [sp, #0x18] + str r5, [r4, #4] + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x14] + mov r0, #0x20 + bl sub_02023790 + add r1, r4, #0 + add r1, #0x84 + str r0, [r1, #0] + add r5, #0x9c + ldrb r0, [r5] + mov r1, #0 + add r2, r1, #0 + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xb0 + str r1, [r0, #0] + str r1, [r4, #0x2c] + str r1, [r4, #0x30] + add r0, r4, #0 +_021DCFF6: + add r1, r1, #1 + str r2, [r0, #0x34] + add r0, r0, #4 + cmp r1, #8 + blt _021DCFF6 + add r0, r4, #0 + mov r1, #0 +_021DD004: + add r2, r2, #1 + str r1, [r0, #0x54] + add r0, r0, #4 + cmp r2, #0xa + blt _021DD004 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + bl ov19_021DD024 + str r4, [r6, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DD020: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DCF88 + + thumb_func_start ov19_021DD024 +ov19_021DD024: ; 0x021DD024 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r0, #0xd4 + strb r6, [r0] + add r0, r5, #0 + mov r1, #0x10 + add r0, #0xe4 + strb r1, [r0] + mov r4, #1 + add r7, r1, #0 +_021DD03A: + mov r0, #0x5a + lsl r0, r0, #8 + add r6, r6, r0 + lsl r0, r6, #4 + lsr r0, r0, #0x10 + bl sub_0201D15C + lsl r0, r0, #4 + asr r1, r0, #0xc + add r0, r5, r4 + add r0, #0xd4 + strb r1, [r0] + add r0, r5, r4 + add r0, #0xd4 + ldrb r0, [r0] + sub r1, r7, r0 + add r0, r5, r4 + add r0, #0xe4 + add r4, r4, #1 + strb r1, [r0] + cmp r4, #0xf + blt _021DD03A + add r0, r5, r4 + mov r1, #0x10 + add r0, #0xd4 + strb r1, [r0] + add r0, r5, r4 + mov r1, #0 + add r0, #0xe4 + strb r1, [r0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DD024 + + thumb_func_start ov19_021DD078 +ov19_021DD078: ; 0x021DD078 + push {r4, r5, r6, lr} + add r6, r0, #0 + beq _021DD110 + add r0, #0x88 + bl sub_0201A8FC + add r0, r6, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DD092 + bl sub_020181C4 +_021DD092: + add r0, r6, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DD0A0 + bl sub_020181C4 +_021DD0A0: + add r0, r6, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DD0AE + bl sub_020181C4 +_021DD0AE: + add r0, r6, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DD0BC + bl sub_020181C4 +_021DD0BC: + ldr r0, [r6, #0x2c] + cmp r0, #0 + beq _021DD0C6 + bl sub_02021BD4 +_021DD0C6: + ldr r0, [r6, #0x30] + cmp r0, #0 + beq _021DD0D0 + bl sub_02021BD4 +_021DD0D0: + add r0, r6, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DD0DE + bl sub_020237BC +_021DD0DE: + mov r4, #0 + add r5, r6, #0 +_021DD0E2: + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DD0EC + bl sub_02021BD4 +_021DD0EC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021DD0E2 + mov r5, #0 + add r4, r6, #0 +_021DD0F8: + ldr r0, [r4, #0x54] + cmp r0, #0 + beq _021DD102 + bl sub_02021BD4 +_021DD102: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #0xa + blt _021DD0F8 + add r0, r6, #0 + bl sub_020181C4 +_021DD110: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD078 + + thumb_func_start ov19_021DD114 +ov19_021DD114: ; 0x021DD114 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + beq _021DD21A + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #8] + add r0, r4, #0 + mov r1, #0x7f + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #8] + add r0, r4, #0 + mov r1, #0x7c + mov r3, #7 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #8] + add r0, r4, #0 + mov r1, #0x7d + mov r3, #6 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #8] + add r0, r4, #0 + mov r1, #0x7e + mov r3, #5 + bl sub_0200710C + mov r2, #0 + str r2, [sp] + ldr r0, [r5, #8] + mov r1, #4 + mov r3, #1 + bl sub_020196C0 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r0, [r5, #8] + mov r1, #4 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r5, #8] + mov r1, #4 + bl sub_02019448 + ldr r3, [r5, #0x10] + ldr r0, [r5, #8] + lsl r6, r3, #2 + ldr r3, _021DD220 ; =0x021E0258 + mov r1, #5 + ldr r3, [r3, r6] + mov r2, #0 + bl sub_02019184 + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + str r3, [sp, #0x10] + add r1, r5, #0 + ldr r0, [r5, #8] + add r1, #0x88 + mov r2, #4 + bl sub_0201A7E8 + add r0, r5, #0 + add r0, #0x88 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x88 + bl sub_0201A954 + add r0, r5, #0 + bl ov19_021DE324 + mov r0, #0x60 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #4 + mov r3, #0 + bl sub_02007130 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DD224 +_021DD21A: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_021DD220: .word 0x021E0258 + thumb_func_end ov19_021DD114 + + thumb_func_start ov19_021DD224 +ov19_021DD224: ; 0x021DD224 + push {r4, r5, lr} + sub sp, #0x5c + add r5, r0, #0 + add r4, r1, #0 + bl ov19_021DD2BC + add r0, sp, #0x14 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + str r3, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, sp, #0x14 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #0x8a + mov r2, #1 + bl sub_0200718C + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + add r3, r5, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + add r3, #0x9c + add r2, r5, #0 + ldr r3, [r3, #0] + add r0, sp, #0x38 + add r1, sp, #0x14 + add r2, #0x18 + bl ov19_021D783C + mov r0, #0x31 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r3, #0x8e + ldr r0, [r5, #0xc] + add r1, sp, #0x38 + mov r2, #0 + lsl r3, r3, #2 + bl ov19_021D785C + str r0, [r5, #0x2c] + mov r0, #0x31 + mov r3, #0x8e + str r0, [sp] + mov r2, #2 + str r2, [sp, #4] + ldr r0, [r5, #0xc] + add r1, sp, #0x38 + add r2, #0xfe + lsl r3, r3, #2 + bl ov19_021D785C + str r0, [r5, #0x30] + mov r1, #1 + bl sub_02021D0C + ldr r0, [r5, #4] + bl ov19_021D5E08 + cmp r0, #3 + bne _021DD2B8 + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_02021D6C +_021DD2B8: + add sp, #0x5c + pop {r4, r5, pc} + thumb_func_end ov19_021DD224 + + thumb_func_start ov19_021DD2BC +ov19_021DD2BC: ; 0x021DD2BC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x8b + mov r2, #1 + add r3, #0x9c + bl sub_02007204 + add r1, r5, #0 + add r1, #0x98 + str r0, [r1, #0] + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x8c + mov r2, #1 + add r3, #0xa4 + bl sub_02007220 + add r1, r5, #0 + add r1, #0xa0 + str r0, [r1, #0] + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x8e + mov r2, #1 + add r3, #0xac + bl sub_02007204 + add r1, r5, #0 + add r1, #0xa8 + str r0, [r1, #0] + mov r0, #0xa + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x8f + mov r2, #1 + add r3, #0xb4 + bl sub_02007220 + add r1, r5, #0 + add r1, #0xb0 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0x18 + bl sub_020A81D0 + mov r0, #0xa + str r0, [sp] + add r5, #0x18 + add r0, r4, #0 + mov r1, #0x90 + mov r2, #2 + mov r3, #0 + str r5, [sp, #4] + bl sub_0200716C + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DD2BC + + thumb_func_start ov19_021DD344 +ov19_021DD344: ; 0x021DD344 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + mov r2, #0 + bl ov19_021D77C8 + str r0, [r4, #0x14] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD344 + + thumb_func_start ov19_021DD358 +ov19_021DD358: ; 0x021DD358 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x14] + pop {r4, pc} + thumb_func_end ov19_021DD358 + + thumb_func_start ov19_021DD368 +ov19_021DD368: ; 0x021DD368 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _021DD372 + mov r0, #1 + bx lr +_021DD372: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DD368 + + thumb_func_start ov19_021DD378 +ov19_021DD378: ; 0x021DD378 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + beq _021DD44A + ldr r1, [r5, #4] + add r1, #0x9c + ldrb r6, [r1] + ldr r1, [r5, #0x10] + cmp r1, r6 + beq _021DD44A + add r1, r5, #0 + add r4, r5, #0 + add r1, #0xb8 + str r5, [r1, #0] + add r4, #0xb8 + mov r1, #0 + str r1, [r4, #8] + str r1, [r4, #4] + cmp r6, #0 + beq _021DD3A8 + cmp r6, #1 + beq _021DD3C0 + cmp r6, #2 + beq _021DD3E2 + b _021DD40A +_021DD3A8: + mov r1, #8 + strh r1, [r4, #0xc] + ldr r7, _021DD44C ; =ov19_021DD670 + bl ov19_021DD998 + add r0, r5, #0 + bl ov19_021DDA7C + add r0, r5, #0 + bl ov19_021DE324 + b _021DD412 +_021DD3C0: + mov r0, #8 + strh r0, [r4, #0xc] + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _021DD3CE + ldr r7, _021DD450 ; =ov19_021DD46C + b _021DD3D6 +_021DD3CE: + ldrh r0, [r4, #0xc] + ldr r7, _021DD454 ; =ov19_021DD544 + add r0, #8 + strh r0, [r4, #0xc] +_021DD3D6: + add r0, r5, #0 + bl ov19_021DDA7C + ldr r0, [r5, #0x2c] + str r0, [r4, #8] + b _021DD412 +_021DD3E2: + mov r0, #8 + strh r0, [r4, #0xc] + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _021DD3F0 + ldr r7, _021DD450 ; =ov19_021DD46C + b _021DD3F8 +_021DD3F0: + ldrh r0, [r4, #0xc] + ldr r7, _021DD454 ; =ov19_021DD544 + add r0, #8 + strh r0, [r4, #0xc] +_021DD3F8: + ldr r0, [r5, #0x30] + str r0, [r4, #8] + add r0, r5, #0 + bl ov19_021DD998 + add r0, r5, #0 + bl ov19_021DE324 + b _021DD412 +_021DD40A: + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} +_021DD412: + str r6, [r5, #0x10] + ldr r0, [r5, #8] + mov r1, #5 + bl sub_020192EC + lsl r0, r0, #0xc + ldr r1, _021DD458 ; =0x021E0258 + lsl r2, r6, #2 + str r0, [r4, #0x10] + ldr r6, [r1, r2] + ldrh r1, [r4, #0xc] + sub r0, r6, r0 + bl sub_020E1F6C + str r0, [r4, #0x14] + asr r0, r6, #0xc + str r0, [r4, #0x18] + ldr r0, [r4, #8] + cmp r0, #0 + beq _021DD440 + mov r1, #1 + bl sub_02021D6C +_021DD440: + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov19_021DD344 +_021DD44A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD44C: .word ov19_021DD670 +_021DD450: .word ov19_021DD46C +_021DD454: .word ov19_021DD544 +_021DD458: .word 0x021E0258 + thumb_func_end ov19_021DD378 + + thumb_func_start ov19_021DD45C +ov19_021DD45C: ; 0x021DD45C + push {r3, lr} + cmp r0, #0 + beq _021DD468 + bl ov19_021DD368 + pop {r3, pc} +_021DD468: + mov r0, #1 + pop {r3, pc} + thumb_func_end ov19_021DD45C + + thumb_func_start ov19_021DD46C +ov19_021DD46C: ; 0x021DD46C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + ldr r5, [r4, #0] + cmp r0, #3 + bhi _021DD534 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DD484: ; jump table + .short _021DD48C - _021DD484 - 2 ; case 0 + .short _021DD49E - _021DD484 - 2 ; case 1 + .short _021DD4E4 - _021DD484 - 2 ; case 2 + .short _021DD502 - _021DD484 - 2 ; case 3 +_021DD48C: + ldr r0, [r4, #8] + bl sub_02021FD0 + cmp r0, #0 + bne _021DD534 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD49E: + ldrh r0, [r4, #0xc] + cmp r0, #0 + beq _021DD4C0 + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x14] + mov r2, #0 + add r3, r1, r0 + str r3, [r4, #0x10] + ldr r0, [r5, #8] + mov r1, #5 + asr r3, r3, #0xc + bl sub_02019184 + ldrh r0, [r4, #0xc] + sub r0, r0, #1 + strh r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_021DD4C0: + ldr r0, [r5, #8] + ldr r3, [r4, #0x18] + mov r1, #5 + mov r2, #0 + bl sub_02019184 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021DD538 ; =0x04001050 + mov r1, #4 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD4E4: + ldr r3, [r5, #0x10] + ldr r0, [r5, #8] + lsl r5, r3, #2 + ldr r3, _021DD53C ; =0x021E024C + mov r1, #6 + ldr r3, [r3, r5] + mov r2, #0 + bl sub_02019184 + mov r0, #0 + strh r0, [r4, #0xe] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD502: + mov r1, #0xe + ldrsh r3, [r4, r1] + add r0, r5, r3 + add r0, #0xd4 + ldrb r2, [r0] + add r0, r5, r3 + add r0, #0xe4 + ldrb r0, [r0] + lsl r0, r0, #8 + orr r2, r0 + ldr r0, _021DD540 ; =0x04001052 + strh r2, [r0] + ldrsh r0, [r4, r1] + add r0, r0, #1 + strh r0, [r4, #0xe] + ldrsh r0, [r4, r1] + cmp r0, #0x10 + blt _021DD534 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02021D6C + add r0, r5, #0 + bl ov19_021DD358 +_021DD534: + pop {r3, r4, r5, pc} + nop +_021DD538: .word 0x04001050 +_021DD53C: .word 0x021E024C +_021DD540: .word 0x04001052 + thumb_func_end ov19_021DD46C + + thumb_func_start ov19_021DD544 +ov19_021DD544: ; 0x021DD544 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + ldr r5, [r4, #0] + cmp r0, #4 + bls _021DD552 + b _021DD662 +_021DD552: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DD55E: ; jump table + .short _021DD568 - _021DD55E - 2 ; case 0 + .short _021DD58E - _021DD55E - 2 ; case 1 + .short _021DD5CC - _021DD55E - 2 ; case 2 + .short _021DD612 - _021DD55E - 2 ; case 3 + .short _021DD630 - _021DD55E - 2 ; case 4 +_021DD568: + ldr r0, [r4, #8] + bl sub_02021FD0 + cmp r0, #0 + bne _021DD662 + mov r0, #0 + str r0, [sp] + ldr r0, _021DD664 ; =0x04001050 + mov r1, #4 + mov r2, #8 + mov r3, #0x10 + bl sub_020BF55C + mov r0, #0xf + strh r0, [r4, #0xe] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD58E: + mov r1, #0xe + ldrsh r0, [r4, r1] + sub r0, r0, #1 + strh r0, [r4, #0xe] + ldrsh r3, [r4, r1] + add r0, r5, r3 + add r0, #0xd4 + ldrb r2, [r0] + add r0, r5, r3 + add r0, #0xe4 + ldrb r0, [r0] + lsl r0, r0, #8 + orr r2, r0 + ldr r0, _021DD668 ; =0x04001052 + strh r2, [r0] + ldrsh r0, [r4, r1] + cmp r0, #0 + bne _021DD662 + ldr r3, [r5, #0x10] + ldr r0, [r5, #8] + lsl r5, r3, #2 + ldr r3, _021DD66C ; =0x021E024C + mov r1, #6 + ldr r3, [r3, r5] + mov r2, #0 + bl sub_02019184 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD5CC: + ldrh r0, [r4, #0xc] + cmp r0, #0 + beq _021DD5EE + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x14] + mov r2, #0 + add r3, r1, r0 + str r3, [r4, #0x10] + ldr r0, [r5, #8] + mov r1, #5 + asr r3, r3, #0xc + bl sub_02019184 + ldrh r0, [r4, #0xc] + sub r0, r0, #1 + strh r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_021DD5EE: + ldr r0, [r5, #8] + ldr r3, [r4, #0x18] + mov r1, #5 + mov r2, #0 + bl sub_02019184 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021DD664 ; =0x04001050 + mov r1, #4 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD612: + ldr r3, [r5, #0x10] + ldr r0, [r5, #8] + lsl r5, r3, #2 + ldr r3, _021DD66C ; =0x021E024C + mov r1, #6 + ldr r3, [r3, r5] + mov r2, #0 + bl sub_02019184 + mov r0, #0 + strh r0, [r4, #0xe] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD630: + mov r1, #0xe + ldrsh r3, [r4, r1] + add r0, r5, r3 + add r0, #0xd4 + ldrb r2, [r0] + add r0, r5, r3 + add r0, #0xe4 + ldrb r0, [r0] + lsl r0, r0, #8 + orr r2, r0 + ldr r0, _021DD668 ; =0x04001052 + strh r2, [r0] + ldrsh r0, [r4, r1] + add r0, r0, #1 + strh r0, [r4, #0xe] + ldrsh r0, [r4, r1] + cmp r0, #0x10 + blt _021DD662 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02021D6C + add r0, r5, #0 + bl ov19_021DD358 +_021DD662: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DD664: .word 0x04001050 +_021DD668: .word 0x04001052 +_021DD66C: .word 0x021E024C + thumb_func_end ov19_021DD544 + + thumb_func_start ov19_021DD670 +ov19_021DD670: ; 0x021DD670 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #4] + ldr r0, [r4, #0] + cmp r1, #3 + bhi _021DD70C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DD688: ; jump table + .short _021DD690 - _021DD688 - 2 ; case 0 + .short _021DD69A - _021DD688 - 2 ; case 1 + .short _021DD6D2 - _021DD688 - 2 ; case 2 + .short _021DD708 - _021DD688 - 2 ; case 3 +_021DD690: + mov r1, #0xf + strh r1, [r4, #0xe] + ldr r1, [r4, #4] + add r1, r1, #1 + str r1, [r4, #4] +_021DD69A: + mov r2, #0xe + ldrsh r1, [r4, r2] + sub r1, r1, #1 + strh r1, [r4, #0xe] + ldrsh r5, [r4, r2] + add r1, r0, r5 + add r1, #0xd4 + ldrb r3, [r1] + add r1, r0, r5 + add r1, #0xe4 + ldrb r1, [r1] + lsl r1, r1, #8 + orr r3, r1 + ldr r1, _021DD710 ; =0x04001052 + strh r3, [r1] + ldrsh r1, [r4, r2] + cmp r1, #0 + bne _021DD70C + mov r2, #0 + ldr r0, [r0, #8] + mov r1, #6 + add r3, r2, #0 + bl sub_02019184 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD6D2: + ldrh r1, [r4, #0xc] + cmp r1, #0 + beq _021DD6F4 + ldr r2, [r4, #0x10] + ldr r1, [r4, #0x14] + add r3, r2, r1 + str r3, [r4, #0x10] + ldr r0, [r0, #8] + mov r1, #5 + mov r2, #0 + asr r3, r3, #0xc + bl sub_02019184 + ldrh r0, [r4, #0xc] + sub r0, r0, #1 + strh r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_021DD6F4: + ldr r0, [r0, #8] + ldr r3, [r4, #0x18] + mov r1, #5 + mov r2, #0 + bl sub_02019184 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_021DD708: + bl ov19_021DD358 +_021DD70C: + pop {r3, r4, r5, pc} + nop +_021DD710: .word 0x04001052 + thumb_func_end ov19_021DD670 + + thumb_func_start ov19_021DD714 +ov19_021DD714: ; 0x021DD714 + push {r4, lr} + add r4, r0, #0 + beq _021DD73C + ldr r1, [r4, #0x10] + cmp r1, #1 + beq _021DD726 + cmp r1, #2 + beq _021DD732 + pop {r4, pc} +_021DD726: + bl ov19_021DD854 + add r0, r4, #0 + bl ov19_021DDD80 + pop {r4, pc} +_021DD732: + bl ov19_021DD9DC + add r0, r4, #0 + bl ov19_021DE0A0 +_021DD73C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD714 + + thumb_func_start ov19_021DD740 +ov19_021DD740: ; 0x021DD740 + push {r4, lr} + add r4, r0, #0 + beq _021DD762 + bl ov19_021DD368 + cmp r0, #0 + beq _021DD75E + ldr r0, [r4, #0x10] + cmp r0, #1 + bne _021DD75A + add r0, r4, #0 + bl ov19_021DE350 +_021DD75A: + mov r0, #1 + pop {r4, pc} +_021DD75E: + mov r0, #0 + pop {r4, pc} +_021DD762: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD740 + + thumb_func_start ov19_021DD768 +ov19_021DD768: ; 0x021DD768 + push {r4, lr} + add r4, r0, #0 + beq _021DD790 + ldr r1, [r4, #0x10] + cmp r1, #1 + beq _021DD77A + cmp r1, #2 + beq _021DD78C + pop {r4, pc} +_021DD77A: + bl ov19_021DE324 + add r0, r4, #0 + bl ov19_021DD8F8 + add r0, r4, #0 + bl ov19_021DDFA8 + pop {r4, pc} +_021DD78C: + bl ov19_021DE2A4 +_021DD790: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD768 + + thumb_func_start ov19_021DD794 +ov19_021DD794: ; 0x021DD794 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov19_021D5EB0 + cmp r0, #0 + ble _021DD7C4 + add r2, r4, #0 + add r2, #0x80 + ldr r2, [r2, #0] + add r1, r4, #0 + sub r2, r2, r0 + add r0, r4, #0 + add r0, #0x80 + add r4, #0x80 + str r2, [r0, #0] + ldr r0, [r4, #0] + add r1, #0x80 + cmp r0, #0 + bge _021DD7E4 + ldr r0, [r1, #0] + add r0, #0xa + str r0, [r1, #0] + pop {r4, pc} +_021DD7C4: + add r2, r4, #0 + add r2, #0x80 + ldr r2, [r2, #0] + add r1, r4, #0 + sub r2, r2, r0 + add r0, r4, #0 + add r0, #0x80 + add r4, #0x80 + str r2, [r0, #0] + ldr r0, [r4, #0] + add r1, #0x80 + cmp r0, #0xa + blt _021DD7E4 + ldr r0, [r1, #0] + sub r0, #0xa + str r0, [r1, #0] +_021DD7E4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD794 + + thumb_func_start ov19_021DD7E8 +ov19_021DD7E8: ; 0x021DD7E8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov19_021D5EB0 + add r2, r4, #0 + add r2, #0x80 + ldr r2, [r2, #0] + add r1, r4, #0 + add r2, r2, r0 + add r0, r4, #0 + add r0, #0x80 + add r4, #0x80 + str r2, [r0, #0] + ldr r0, [r4, #0] + add r1, #0x80 + cmp r0, #0 + bge _021DD814 + ldr r0, [r1, #0] + add r0, #8 + str r0, [r1, #0] + pop {r4, pc} +_021DD814: + cmp r0, #8 + blt _021DD81E + ldr r0, [r1, #0] + sub r0, #8 + str r0, [r1, #0] +_021DD81E: + pop {r4, pc} + thumb_func_end ov19_021DD7E8 + + thumb_func_start ov19_021DD820 +ov19_021DD820: ; 0x021DD820 + push {r4, lr} + add r4, r0, #0 + beq _021DD850 + bl ov19_021DD368 + cmp r0, #0 + beq _021DD84C + ldr r0, [r4, #0x10] + cmp r0, #1 + bne _021DD842 + add r0, r4, #0 + bl ov19_021DE350 + add r0, r4, #0 + bl ov19_021DD794 + b _021DD848 +_021DD842: + add r0, r4, #0 + bl ov19_021DD7E8 +_021DD848: + mov r0, #1 + pop {r4, pc} +_021DD84C: + mov r0, #0 + pop {r4, pc} +_021DD850: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov19_021DD820 + + thumb_func_start ov19_021DD854 +ov19_021DD854: ; 0x021DD854 + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + str r0, [sp, #8] + ldr r0, [r0, #0] + bl ov19_021D780C + add r7, r0, #0 + ldr r0, [sp, #8] + ldr r0, [r0, #4] + bl ov19_021D5EB8 + add r4, r0, #3 + cmp r4, #0x12 + blt _021DD872 + sub r4, #0x12 +_021DD872: + ldr r5, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + str r0, [sp, #0x10] + add r0, #0x18 + mov r6, #0xc0 + str r0, [sp, #0x10] +_021DD882: + add r0, sp, #0x14 + bl sub_020A818C + add r0, sp, #0x14 + str r0, [sp] + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #2 + bl ov19_021DBBA8 + add r0, r7, #0 + bl ov19_021DBD3C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + add r0, sp, #0x38 + add r1, sp, #0x14 + bl ov19_021D783C + mov r0, #0x30 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #8] + mov r3, #0x17 + ldr r0, [r0, #0xc] + add r1, sp, #0x38 + mov r2, #0x10 + lsl r3, r3, #4 + bl ov19_021D785C + str r0, [r5, #0x54] + cmp r0, #0 + bne _021DD8D4 + bl sub_02022974 +_021DD8D4: + sub r4, r4, #1 + bpl _021DD8DA + mov r4, #0x11 +_021DD8DA: + ldr r0, [sp, #0xc] + add r6, #0x20 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r0, #0xa + blt _021DD882 + ldr r0, [sp, #8] + mov r1, #0 + add r0, #0x80 + str r0, [sp, #8] + str r1, [r0, #0] + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD854 + + thumb_func_start ov19_021DD8F8 +ov19_021DD8F8: ; 0x021DD8F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp, #4] + ldr r0, [r0, #0] + bl ov19_021D780C + str r0, [sp, #0xc] + ldr r0, [sp, #4] + ldr r0, [r0, #4] + bl ov19_021D5EB8 + ldr r1, [sp, #4] + ldr r2, [r1, #4] + mov r1, #0xa0 + ldrsh r7, [r2, r1] + cmp r7, #0 + ble _021DD934 + sub r0, r0, r7 + add r5, r0, #4 + cmp r5, #0x12 + blt _021DD924 + sub r5, #0x12 +_021DD924: + ldr r0, [sp, #4] + mov r6, #1 + add r0, #0x80 + ldr r0, [r0, #0] + sub r4, r0, #1 + bpl _021DD950 + add r4, #0xa + b _021DD950 +_021DD934: + sub r0, r0, r7 + sub r5, r0, #3 + bpl _021DD93C + add r5, #0x12 +_021DD93C: + ldr r0, [sp, #4] + mov r6, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mvn r6, r6 + add r4, r0, #6 + cmp r4, #0xa + blt _021DD94E + sub r4, #0xa +_021DD94E: + neg r7, r7 +_021DD950: + ldr r0, [sp, #4] + str r7, [r0, #0x7c] + mov r0, #0 + str r0, [sp, #8] + cmp r7, #0 + ble _021DD994 +_021DD95C: + mov r0, #0 + str r0, [sp] + lsl r2, r4, #5 + ldr r0, [sp, #0xc] + add r1, r5, #0 + add r2, #0xc0 + mov r3, #2 + bl ov19_021DBBA8 + add r5, r5, r6 + bpl _021DD976 + mov r5, #0x11 + b _021DD97C +_021DD976: + cmp r5, #0x12 + blt _021DD97C + mov r5, #0 +_021DD97C: + sub r4, r4, r6 + bpl _021DD984 + mov r4, #9 + b _021DD98A +_021DD984: + cmp r4, #0xa + blt _021DD98A + mov r4, #0 +_021DD98A: + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, r7 + blt _021DD95C +_021DD994: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DD8F8 + + thumb_func_start ov19_021DD998 +ov19_021DD998: ; 0x021DD998 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DD9A0: + ldr r0, [r5, #0x54] + cmp r0, #0 + beq _021DD9AC + bl sub_02021BD4 + str r6, [r5, #0x54] +_021DD9AC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xa + blt _021DD9A0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD998 + + thumb_func_start ov19_021DD9B8 +ov19_021DD9B8: ; 0x021DD9B8 + cmp r0, #0 + bne _021DD9C8 + cmp r1, #0 + bne _021DD9C4 + mov r0, #1 + bx lr +_021DD9C4: + mov r0, #0 + bx lr +_021DD9C8: + mov r3, #1 + sub r2, r0, #1 + lsl r3, r2 + tst r1, r3 + beq _021DD9D8 + lsl r0, r0, #1 + add r0, r0, #1 + bx lr +_021DD9D8: + lsl r0, r0, #1 + bx lr + thumb_func_end ov19_021DD9B8 + + thumb_func_start ov19_021DD9DC +ov19_021DD9DC: ; 0x021DD9DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r5, r0, #0 + ldr r0, [r5, #4] + bl ov19_021D5EC8 + str r0, [sp, #0x14] + add r0, sp, #0x18 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #6 + lsl r0, r0, #0xa + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, sp, #0x18 + str r0, [sp, #0x10] + mov r0, #0x12 + mov r1, #0x8d + mov r2, #1 + bl sub_02006F00 + add r7, r5, #0 + mov r6, #0 + add r4, r5, #0 + add r7, #0x18 +_021DDA18: + add r0, r5, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r3, r5, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + add r3, #0xac + ldr r3, [r3, #0] + add r0, sp, #0x3c + add r1, sp, #0x18 + add r2, r7, #0 + bl ov19_021D783C + mov r0, #0x30 + str r0, [sp] + mov r0, #2 + mov r2, #0xf0 + str r0, [sp, #4] + add r3, r2, #0 + ldr r0, [r5, #0xc] + add r1, sp, #0x3c + add r3, #0x80 + bl ov19_021D785C + str r0, [r4, #0x34] + cmp r0, #0 + bne _021DDA54 + bl sub_02022974 +_021DDA54: + ldr r1, [sp, #0x14] + add r0, r6, #0 + bl ov19_021DD9B8 + add r1, r0, #0 + ldr r0, [r4, #0x34] + bl sub_02021D6C + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #8 + blt _021DDA18 + ldr r0, [r5, #4] + bl ov19_021D5EC0 + add r5, #0x80 + str r0, [r5, #0] + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DD9DC + + thumb_func_start ov19_021DDA7C +ov19_021DDA7C: ; 0x021DDA7C + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DDA84: + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DDA90 + bl sub_02021BD4 + str r6, [r5, #0x34] +_021DDA90: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021DDA84 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DDA7C + + thumb_func_start ov19_021DDA9C +ov19_021DDA9C: ; 0x021DDA9C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #0x16] + cmp r0, #0 + beq _021DDAB2 + sub r0, r0, #1 + add sp, #0xc + strh r0, [r4, #0x16] + pop {r4, r5, pc} +_021DDAB2: + ldrh r0, [r4, #0x14] + cmp r0, #0 + beq _021DDAE8 + sub r0, r0, #1 + strh r0, [r4, #0x14] + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + add r0, r1, r0 + str r0, [r4, #8] + asr r0, r0, #0xc + lsl r1, r0, #2 + ldr r0, _021DDB18 ; =0x021E028C + ldrsh r0, [r0, r1] + lsl r0, r0, #0xc + str r0, [sp] + ldr r0, _021DDB1C ; =0x021E028E + ldrsh r0, [r0, r1] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, pc} +_021DDAE8: + ldr r0, [r4, #0xc] + asr r0, r0, #0xc + lsl r1, r0, #2 + ldr r0, _021DDB18 ; =0x021E028C + ldrsh r0, [r0, r1] + lsl r0, r0, #0xc + str r0, [sp] + ldr r0, _021DDB1C ; =0x021E028E + ldrsh r0, [r0, r1] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_02021C50 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DDBD0 + add sp, #0xc + pop {r4, r5, pc} + nop +_021DDB18: .word 0x021E028C +_021DDB1C: .word 0x021E028E + thumb_func_end ov19_021DDA9C + + thumb_func_start ov19_021DDB20 +ov19_021DDB20: ; 0x021DDB20 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #0x16] + cmp r0, #0 + beq _021DDB36 + sub r0, r0, #1 + add sp, #0xc + strh r0, [r4, #0x16] + pop {r4, r5, pc} +_021DDB36: + ldrh r0, [r4, #0x14] + cmp r0, #0 + beq _021DDB72 + sub r0, r0, #1 + strh r0, [r4, #0x14] + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + add r0, r1, r0 + str r0, [r4, #8] + asr r0, r0, #0xc + ldr r1, _021DDBC8 ; =0x021E028C + lsl r0, r0, #2 + ldrsh r2, [r1, r0] + mov r1, #1 + lsl r1, r1, #8 + sub r1, r1, r2 + lsl r1, r1, #0xc + str r1, [sp] + ldr r1, _021DDBCC ; =0x021E028E + ldrsh r0, [r1, r0] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, pc} +_021DDB72: + ldr r0, [r4, #0xc] + ldr r1, _021DDBC8 ; =0x021E028C + asr r0, r0, #0xc + lsl r0, r0, #2 + ldrsh r2, [r1, r0] + mov r1, #1 + lsl r1, r1, #8 + sub r1, r1, r2 + lsl r1, r1, #0xc + str r1, [sp] + ldr r1, _021DDBCC ; =0x021E028E + ldrsh r0, [r1, r0] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_02021C50 + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _021DDBBC + ldrh r0, [r4, #0x28] + add sp, #0xc + strh r0, [r4, #0x14] + ldr r0, [r4, #0x1c] + str r0, [r4, #8] + ldr r0, [r4, #0x24] + str r0, [r4, #0x10] + ldr r0, [r4, #0x20] + str r0, [r4, #0xc] + ldrh r0, [r4, #0x2a] + strh r0, [r4, #0x16] + mov r0, #0 + str r0, [r4, #0x18] + pop {r4, r5, pc} +_021DDBBC: + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DDBD0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021DDBC8: .word 0x021E028C +_021DDBCC: .word 0x021E028E + thumb_func_end ov19_021DDB20 + + thumb_func_start ov19_021DDBD0 +ov19_021DDBD0: ; 0x021DDBD0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r1, #0] + ldr r0, _021DDBF4 ; =0x000001CB + ldrb r0, [r4, r0] + cmp r0, #0 + bne _021DDBE2 + bl sub_02022974 +_021DDBE2: + ldr r0, _021DDBF4 ; =0x000001CB + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_021DDBF4: .word 0x000001CB + thumb_func_end ov19_021DDBD0 + + thumb_func_start ov19_021DDBF8 +ov19_021DDBF8: ; 0x021DDBF8 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r6, r0, #0 + add r5, r2, #0 + str r3, [sp] + ldr r4, [sp, #0x20] + cmp r7, #0 + bne _021DDC0C + bl sub_02022974 +_021DDC0C: + cmp r4, #0 + beq _021DDC12 + sub r4, r4, #1 +_021DDC12: + str r6, [r5, #0] + ldr r0, [sp, #0x1c] + str r7, [r5, #4] + strh r0, [r5, #0x14] + ldr r0, [sp, #0x24] + strh r4, [r5, #0x16] + cmp r0, #0 + beq _021DDC26 + ldr r4, _021DDC64 ; =ov19_021DDB20 + b _021DDC28 +_021DDC26: + ldr r4, _021DDC68 ; =ov19_021DDA9C +_021DDC28: + ldr r0, [sp] + ldr r1, _021DDC6C ; =0x021E0264 + lsl r0, r0, #1 + ldrh r0, [r1, r0] + lsl r0, r0, #0xc + str r0, [r5, #8] + ldr r0, [sp, #0x18] + lsl r0, r0, #1 + ldrh r0, [r1, r0] + lsl r1, r0, #0xc + str r1, [r5, #0xc] + ldr r0, [r5, #8] + sub r0, r1, r0 + ldr r1, [sp, #0x1c] + bl sub_020E1F6C + str r0, [r5, #0x10] + mov r2, #0 + add r0, r4, #0 + add r1, r5, #0 + str r2, [r5, #0x18] + bl ov19_021D77C8 + cmp r0, #0 + beq _021DDC62 + ldr r0, _021DDC70 ; =0x000001CB + ldrb r1, [r6, r0] + add r1, r1, #1 + strb r1, [r6, r0] +_021DDC62: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DDC64: .word ov19_021DDB20 +_021DDC68: .word ov19_021DDA9C +_021DDC6C: .word 0x021E0264 +_021DDC70: .word 0x000001CB + thumb_func_end ov19_021DDBF8 + + thumb_func_start ov19_021DDC74 +ov19_021DDC74: ; 0x021DDC74 + push {r4, lr} + add r4, r1, #0 + mov r0, #1 + str r0, [r4, #0x18] + strh r2, [r4, #0x2a] + cmp r2, #0 + beq _021DDC88 + ldrh r0, [r4, #0x2a] + sub r0, r0, #1 + strh r0, [r4, #0x2a] +_021DDC88: + ldr r0, [sp, #8] + sub r2, r0, r3 + bpl _021DDC94 + mov r0, #0 + mvn r0, r0 + mul r2, r0 +_021DDC94: + add r1, r2, #0 + mov r0, #6 + mul r1, r0 + ldr r2, _021DDCBC ; =0x021E0264 + lsl r0, r3, #1 + ldrh r0, [r2, r0] + strh r1, [r4, #0x28] + lsl r0, r0, #0xc + str r0, [r4, #0x1c] + ldr r0, [sp, #8] + lsl r0, r0, #1 + ldrh r0, [r2, r0] + lsl r2, r0, #0xc + str r2, [r4, #0x20] + ldr r0, [r4, #0x1c] + sub r0, r2, r0 + bl sub_020E1F6C + str r0, [r4, #0x24] + pop {r4, pc} + ; .align 2, 0 +_021DDCBC: .word 0x021E0264 + thumb_func_end ov19_021DDC74 + + thumb_func_start ov19_021DDCC0 +ov19_021DDCC0: ; 0x021DDCC0 + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r0, #0x73 + add r4, r1, #0 + lsl r0, r0, #2 + ldrb r3, [r4, r0] + ldr r2, [r4, #0] + cmp r3, #0 + beq _021DDCDE + cmp r3, #1 + beq _021DDD40 + cmp r3, #2 + beq _021DDD58 + add sp, #0x10 + pop {r4, r5, r6, pc} +_021DDCDE: + sub r1, r0, #2 + ldrb r1, [r4, r1] + mov r6, #0x2c + add r3, r1, #1 + sub r1, r0, #2 + strb r3, [r4, r1] + sub r0, r0, #2 + ldrb r3, [r4, r0] + mov r1, #6 + mov r0, #7 + sub r5, r1, r3 + sub r0, r0, r3 + str r0, [sp] + add r0, r5, #1 + mul r1, r0 + str r1, [sp, #4] + mov r3, #0 + str r3, [sp, #8] + lsl r1, r5, #2 + add r1, r2, r1 + str r3, [sp, #0xc] + add r2, r4, #0 + ldr r1, [r1, #0x54] + add r2, #8 + mul r6, r5 + add r0, r4, #0 + add r2, r2, r6 + bl ov19_021DDBF8 + ldr r0, _021DDD70 ; =0x000001CD + mov r1, #4 + strb r1, [r4, r0] + sub r1, r0, #3 + ldrb r1, [r4, r1] + cmp r1, #6 + blo _021DDD30 + mov r1, #2 + sub r0, r0, #1 + add sp, #0x10 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DDD30: + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021DDD6C + mov r1, #1 + sub r0, r0, #1 + add sp, #0x10 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DDD40: + add r1, r0, #1 + ldrb r1, [r4, r1] + sub r2, r1, #2 + add r1, r0, #1 + strb r2, [r4, r1] + ldrb r1, [r4, r1] + cmp r1, #0 + bne _021DDD6C + mov r1, #0 + add sp, #0x10 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DDD58: + sub r1, r0, #1 + ldrb r1, [r4, r1] + cmp r1, #0 + bne _021DDD6C + add r1, r3, #1 + strb r1, [r4, r0] + ldr r1, _021DDD74 ; =ov19_021DDD78 + add r0, r4, #0 + bl ov19_021D79B8 +_021DDD6C: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DDD70: .word 0x000001CD +_021DDD74: .word ov19_021DDD78 + thumb_func_end ov19_021DDCC0 + + thumb_func_start ov19_021DDD78 +ov19_021DDD78: ; 0x021DDD78 + ldr r3, _021DDD7C ; =ov19_021DD358 + bx r3 + ; .align 2, 0 +_021DDD7C: .word ov19_021DD358 + thumb_func_end ov19_021DDD78 + + thumb_func_start ov19_021DDD80 +ov19_021DDD80: ; 0x021DDD80 + push {r3, r4, r5, lr} + mov r1, #0x1d + add r4, r0, #0 + mov r0, #0xa + lsl r1, r1, #4 + bl sub_02018144 + add r5, r0, #0 + beq _021DDDC8 + mov r1, #0x73 + mov r0, #0 + lsl r1, r1, #2 + str r4, [r5, #0] + strb r0, [r5, r1] + sub r2, r1, #2 + strb r0, [r5, r2] + sub r1, r1, #1 + strb r0, [r5, r1] + mov r1, #7 + add r3, r0, #0 + lsl r1, r1, #6 +_021DDDAA: + add r2, r5, r0 + add r0, r0, #1 + strb r3, [r2, r1] + cmp r0, #8 + blt _021DDDAA + ldr r1, _021DDDCC ; =ov19_021DDCC0 + add r0, r4, #0 + add r2, r5, #0 + bl ov19_021DD344 + cmp r0, #0 + bne _021DDDC8 + add r0, r5, #0 + bl sub_020181C4 +_021DDDC8: + pop {r3, r4, r5, pc} + nop +_021DDDCC: .word ov19_021DDCC0 + thumb_func_end ov19_021DDD80 + + thumb_func_start ov19_021DDDD0 +ov19_021DDDD0: ; 0x021DDDD0 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + mov r2, #0x73 + lsl r2, r2, #2 + add r0, r1, #0 + ldrb r3, [r0, r2] + str r1, [sp, #0x10] + ldr r7, [r1, #0] + cmp r3, #0 + beq _021DDDEE + cmp r3, #1 + bne _021DDDEA + b _021DDF86 +_021DDDEA: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} +_021DDDEE: + ldr r1, [r7, #4] + mov r0, #0xa0 + ldrsh r0, [r1, r0] + cmp r0, #0 + ble _021DDE12 + add r0, r7, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r4, r0, #5 + cmp r4, #0xa + blt _021DDE06 + sub r4, #0xa +_021DDE06: + mov r5, #0 + mov r0, #7 + mvn r5, r5 + mov r6, #6 + str r0, [sp, #0x24] + b _021DDE20 +_021DDE12: + add r0, r7, #0 + add r0, #0x80 + ldr r4, [r0, #0] + mov r5, #1 + mov r0, #0 + add r6, r5, #0 + str r0, [sp, #0x24] +_021DDE20: + ldr r1, [r7, #0x7c] + mov r0, #0 + str r0, [sp, #0x34] + cmp r1, #0 + ble _021DDE82 + str r0, [sp, #0x28] + ldr r0, [sp, #0x10] + str r0, [sp, #0x38] + add r0, #8 + str r0, [sp, #0x38] +_021DDE34: + ldr r0, [sp, #0x24] + add r3, r4, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + add r0, r0, #6 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r1, r0, #0 + ldr r2, [r1, #4] + lsl r1, r4, #2 + ldr r1, [r2, r1] + mov r2, #0x2c + mul r3, r2 + ldr r2, [sp, #0x38] + add r2, r2, r3 + add r3, r6, #0 + bl ov19_021DDBF8 + add r4, r4, r5 + add r6, r6, r5 + cmp r4, #0xa + blt _021DDE6A + mov r4, #0 + b _021DDE70 +_021DDE6A: + cmp r4, #0 + bge _021DDE70 + mov r4, #9 +_021DDE70: + ldr r0, [sp, #0x28] + ldr r1, [r7, #0x7c] + add r0, r0, #6 + str r0, [sp, #0x28] + ldr r0, [sp, #0x34] + add r0, r0, #1 + str r0, [sp, #0x34] + cmp r0, r1 + blt _021DDE34 +_021DDE82: + mov r0, #6 + sub r0, r0, r1 + str r0, [sp, #0x30] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x30] + cmp r0, #0 + ble _021DDEE8 + ldr r0, [sp, #0x10] + str r0, [sp, #0x3c] + add r0, #8 + str r0, [sp, #0x3c] +_021DDE9A: + ldr r0, [r7, #0x7c] + add r1, r5, #0 + mul r1, r0 + sub r1, r6, r1 + str r1, [sp] + mov r1, #6 + mul r1, r0 + str r1, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r3, r4, #0 + add r1, r0, #0 + ldr r2, [r1, #4] + lsl r1, r4, #2 + ldr r1, [r2, r1] + mov r2, #0x2c + mul r3, r2 + ldr r2, [sp, #0x3c] + add r2, r2, r3 + add r3, r6, #0 + bl ov19_021DDBF8 + add r4, r4, r5 + add r6, r6, r5 + cmp r4, #0xa + blt _021DDED6 + mov r4, #0 + b _021DDEDC +_021DDED6: + cmp r4, #0 + bge _021DDEDC + mov r4, #9 +_021DDEDC: + ldr r0, [sp, #0x14] + add r1, r0, #1 + ldr r0, [sp, #0x30] + str r1, [sp, #0x14] + cmp r1, r0 + blt _021DDE9A +_021DDEE8: + ldr r1, [r7, #4] + mov r0, #0xa0 + ldrsh r0, [r1, r0] + cmp r0, #0 + ble _021DDEFE + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [r7, #0x7c] + str r0, [sp, #0x20] + str r0, [sp, #0x18] + b _021DDF0C +_021DDEFE: + mov r0, #7 + str r0, [sp, #0x1c] + ldr r0, [r7, #0x7c] + ldr r1, [sp, #0x1c] + str r0, [sp, #0x20] + sub r0, r1, r0 + str r0, [sp, #0x18] +_021DDF0C: + ldr r0, [sp, #0x20] + mov r6, #0 + cmp r0, #0 + ble _021DDF74 + ldr r0, [sp, #0x10] + str r6, [sp, #0x2c] + str r0, [sp, #0x40] + add r0, #8 + str r0, [sp, #0x40] +_021DDF1E: + ldr r0, [sp, #0x18] + add r3, r4, #0 + str r0, [sp] + ldr r0, [r7, #0x7c] + sub r1, r0, r6 + mov r0, #6 + mul r0, r1 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + add r0, r0, #6 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r1, r0, #0 + ldr r2, [r1, #4] + lsl r1, r4, #2 + ldr r1, [r2, r1] + mov r2, #0x2c + mul r3, r2 + ldr r2, [sp, #0x40] + add r2, r2, r3 + ldr r3, [sp, #0x1c] + bl ov19_021DDBF8 + ldr r0, [sp, #0x18] + add r4, r4, r5 + add r0, r0, r5 + str r0, [sp, #0x18] + cmp r4, #0xa + blt _021DDF60 + sub r4, #0xa + b _021DDF66 +_021DDF60: + cmp r4, #0 + bge _021DDF66 + add r4, #0xa +_021DDF66: + ldr r0, [sp, #0x2c] + add r6, r6, #1 + add r0, r0, #6 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x20] + cmp r6, r0 + blt _021DDF1E +_021DDF74: + mov r1, #0x73 + ldr r0, [sp, #0x10] + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r2, r0, #1 + ldr r0, [sp, #0x10] + add sp, #0x44 + strb r2, [r0, r1] + pop {r4, r5, r6, r7, pc} +_021DDF86: + ldr r0, [sp, #0x10] + sub r1, r2, #1 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021DDF9E + ldr r0, [sp, #0x10] + add r1, r3, #1 + strb r1, [r0, r2] + ldr r1, _021DDFA4 ; =ov19_021DDD78 + add r2, r7, #0 + bl ov19_021D79B8 +_021DDF9E: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_021DDFA4: .word ov19_021DDD78 + thumb_func_end ov19_021DDDD0 + + thumb_func_start ov19_021DDFA8 +ov19_021DDFA8: ; 0x021DDFA8 + push {r3, r4, r5, lr} + mov r1, #0x1d + add r4, r0, #0 + mov r0, #0xa + lsl r1, r1, #4 + bl sub_02018144 + add r5, r0, #0 + beq _021DDFF6 + add r0, r4, #0 + mov r1, #0x73 + lsl r1, r1, #2 + str r4, [r5, #0] + add r0, #0x54 + str r0, [r5, #4] + mov r0, #0 + strb r0, [r5, r1] + sub r2, r1, #2 + strb r0, [r5, r2] + sub r1, r1, #1 + strb r0, [r5, r1] + mov r1, #7 + add r3, r0, #0 + lsl r1, r1, #6 +_021DDFD8: + add r2, r5, r0 + add r0, r0, #1 + strb r3, [r2, r1] + cmp r0, #0xa + blt _021DDFD8 + ldr r1, _021DDFF8 ; =ov19_021DDDD0 + add r0, r4, #0 + add r2, r5, #0 + bl ov19_021DD344 + cmp r0, #0 + bne _021DDFF6 + add r0, r5, #0 + bl sub_020181C4 +_021DDFF6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DDFF8: .word ov19_021DDDD0 + thumb_func_end ov19_021DDFA8 + + thumb_func_start ov19_021DDFFC +ov19_021DDFFC: ; 0x021DDFFC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + ldr r0, [r1, #0] + mov r2, #0x73 + str r0, [sp, #0x18] + lsl r2, r2, #2 + add r0, r1, #0 + ldrb r3, [r0, r2] + str r1, [sp, #0x10] + cmp r3, #0 + beq _021DE01A + cmp r3, #1 + beq _021DE07E + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_021DE01A: + ldr r0, [sp, #0x18] + mov r5, #0 + add r0, #0x80 + ldr r4, [r0, #0] + add r0, r1, #0 + str r0, [sp, #0x1c] + add r0, #8 + mov r7, #6 + str r5, [sp, #0x14] + mov r6, #0x24 + str r0, [sp, #0x1c] +_021DE030: + str r7, [sp] + str r6, [sp, #4] + ldr r1, [sp, #0x18] + lsl r2, r4, #2 + add r1, r1, r2 + str r5, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r2, #0x2c + add r3, r4, #0 + mul r3, r2 + ldr r2, [sp, #0x1c] + ldr r0, [sp, #0x10] + add r2, r2, r3 + ldr r1, [r1, #0x34] + mov r3, #0 + bl ov19_021DDBF8 + add r4, r4, #1 + sub r6, r6, #6 + sub r7, r7, #1 + cmp r4, #8 + blt _021DE060 + mov r4, #0 +_021DE060: + ldr r0, [sp, #0x14] + add r5, r5, #6 + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #6 + blt _021DE030 + mov r1, #0x73 + ldr r0, [sp, #0x10] + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r2, r0, #1 + ldr r0, [sp, #0x10] + add sp, #0x20 + strb r2, [r0, r1] + pop {r3, r4, r5, r6, r7, pc} +_021DE07E: + ldr r0, [sp, #0x10] + sub r1, r2, #1 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021DE096 + ldr r0, [sp, #0x10] + add r1, r3, #1 + strb r1, [r0, r2] + ldr r1, _021DE09C ; =ov19_021DDD78 + ldr r2, [sp, #0x18] + bl ov19_021D79B8 +_021DE096: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DE09C: .word ov19_021DDD78 + thumb_func_end ov19_021DDFFC + + thumb_func_start ov19_021DE0A0 +ov19_021DE0A0: ; 0x021DE0A0 + push {r3, r4, r5, lr} + mov r1, #0x1d + add r4, r0, #0 + mov r0, #0xa + lsl r1, r1, #4 + bl sub_02018144 + add r5, r0, #0 + beq _021DE0E8 + mov r1, #0x73 + mov r0, #0 + lsl r1, r1, #2 + str r4, [r5, #0] + strb r0, [r5, r1] + sub r2, r1, #2 + strb r0, [r5, r2] + sub r1, r1, #1 + strb r0, [r5, r1] + mov r1, #7 + add r3, r0, #0 + lsl r1, r1, #6 +_021DE0CA: + add r2, r5, r0 + add r0, r0, #1 + strb r3, [r2, r1] + cmp r0, #8 + blt _021DE0CA + ldr r1, _021DE0EC ; =ov19_021DDFFC + add r0, r4, #0 + add r2, r5, #0 + bl ov19_021DD344 + cmp r0, #0 + bne _021DE0E8 + add r0, r5, #0 + bl sub_020181C4 +_021DE0E8: + pop {r3, r4, r5, pc} + nop +_021DE0EC: .word ov19_021DDFFC + thumb_func_end ov19_021DE0A0 + + thumb_func_start ov19_021DE0F0 +ov19_021DE0F0: ; 0x021DE0F0 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + ldr r0, [r1, #0] + mov r2, #0x73 + str r0, [sp, #0x34] + lsl r2, r2, #2 + add r0, r1, #0 + ldrb r3, [r0, r2] + str r1, [sp, #0x10] + cmp r3, #0 + beq _021DE110 + cmp r3, #1 + bne _021DE10C + b _021DE282 +_021DE10C: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} +_021DE110: + ldr r0, [sp, #0x34] + ldr r0, [r0, #4] + bl ov19_021D5EB0 + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + add r0, #0x80 + ldr r4, [r0, #0] + ldr r0, [sp, #0x30] + cmp r0, #0 + bge _021DE140 + add r4, r4, #5 + cmp r4, #8 + blt _021DE12E + sub r4, #8 +_021DE12E: + ldr r0, [sp, #0x30] + mov r5, #0 + neg r0, r0 + str r0, [sp, #0x28] + mov r0, #0 + mvn r5, r5 + mov r6, #1 + str r0, [sp, #0x18] + b _021DE14A +_021DE140: + str r0, [sp, #0x28] + mov r0, #7 + mov r5, #1 + mov r6, #6 + str r0, [sp, #0x18] +_021DE14A: + ldr r0, [sp, #0x28] + mov r7, #0 + add r0, r0, #6 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + cmp r0, #0 + ble _021DE1AC + ldr r0, [sp, #0x10] + str r7, [sp, #0x1c] + str r0, [sp, #0x38] + add r0, #8 + str r0, [sp, #0x38] +_021DE162: + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x34] + str r0, [sp] + ldr r0, [sp, #0x1c] + lsl r2, r4, #2 + add r0, r0, #6 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + add r1, r1, r2 + str r0, [sp, #0xc] + mov r2, #0x2c + add r3, r4, #0 + mul r3, r2 + ldr r2, [sp, #0x38] + ldr r0, [sp, #0x10] + add r2, r2, r3 + ldr r1, [r1, #0x34] + add r3, r6, #0 + bl ov19_021DDBF8 + sub r6, r6, r5 + add r4, r4, r5 + bpl _021DE198 + add r4, #8 + b _021DE19E +_021DE198: + cmp r4, #8 + blt _021DE19E + sub r4, #8 +_021DE19E: + ldr r0, [sp, #0x1c] + add r7, r7, #1 + add r0, r0, #6 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x28] + cmp r7, r0 + blt _021DE162 +_021DE1AC: + mov r0, #0 + str r0, [sp, #0x24] + cmp r7, #8 + bge _021DE218 + ldr r0, [sp, #0x28] + mov r1, #6 + mul r1, r0 + ldr r0, [sp, #0x10] + str r1, [sp, #0x20] + str r0, [sp, #0x3c] + add r0, #8 + str r0, [sp, #0x3c] +_021DE1C4: + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x34] + sub r0, r0, r5 + str r0, [sp, #0x18] + str r0, [sp] + ldr r0, [sp, #0x20] + lsl r2, r4, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x24] + add r1, r1, r2 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r2, #0x2c + add r3, r4, #0 + mul r3, r2 + ldr r2, [sp, #0x3c] + ldr r0, [sp, #0x10] + add r2, r2, r3 + ldr r1, [r1, #0x34] + add r3, r6, #0 + bl ov19_021DDBF8 + cmp r6, #0 + beq _021DE1FE + cmp r6, #7 + beq _021DE1FE + sub r6, r6, r5 + b _021DE204 +_021DE1FE: + ldr r0, [sp, #0x24] + add r0, r0, #6 + str r0, [sp, #0x24] +_021DE204: + add r4, r4, r5 + bpl _021DE20C + add r4, #8 + b _021DE212 +_021DE20C: + cmp r4, #8 + blt _021DE212 + sub r4, #8 +_021DE212: + add r7, r7, #1 + cmp r7, #8 + blt _021DE1C4 +_021DE218: + ldr r0, [sp, #0x30] + cmp r0, #0 + bge _021DE22C + mov r0, #7 + str r0, [sp, #0x14] + ldr r0, [sp, #0x28] + sub r1, r0, #2 + ldr r0, [sp, #0x14] + sub r6, r0, r1 + b _021DE234 +_021DE22C: + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x28] + sub r6, r0, #2 +_021DE234: + ldr r0, [sp, #0x2c] + cmp r7, r0 + bge _021DE270 + ldr r0, [sp, #0x10] + str r0, [sp, #0x40] + add r0, #8 + str r0, [sp, #0x40] +_021DE242: + mov r1, #0x2c + add r2, r4, #0 + mul r2, r1 + ldr r1, [sp, #0x40] + ldr r0, [sp, #0x10] + add r1, r1, r2 + ldr r3, [sp, #0x14] + mov r2, #6 + str r6, [sp] + bl ov19_021DDC74 + sub r6, r6, r5 + add r4, r4, r5 + bpl _021DE262 + add r4, #8 + b _021DE268 +_021DE262: + cmp r4, #8 + blt _021DE268 + sub r4, #8 +_021DE268: + ldr r0, [sp, #0x2c] + add r7, r7, #1 + cmp r7, r0 + blt _021DE242 +_021DE270: + mov r1, #0x73 + ldr r0, [sp, #0x10] + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r2, r0, #1 + ldr r0, [sp, #0x10] + add sp, #0x44 + strb r2, [r0, r1] + pop {r4, r5, r6, r7, pc} +_021DE282: + ldr r0, [sp, #0x10] + sub r1, r2, #1 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _021DE29A + ldr r0, [sp, #0x10] + add r1, r3, #1 + strb r1, [r0, r2] + ldr r1, _021DE2A0 ; =ov19_021DDD78 + ldr r2, [sp, #0x34] + bl ov19_021D79B8 +_021DE29A: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_021DE2A0: .word ov19_021DDD78 + thumb_func_end ov19_021DE0F0 + + thumb_func_start ov19_021DE2A4 +ov19_021DE2A4: ; 0x021DE2A4 + push {r3, r4, r5, lr} + mov r1, #0x1d + add r4, r0, #0 + mov r0, #0xa + lsl r1, r1, #4 + bl sub_02018144 + add r5, r0, #0 + beq _021DE2EC + mov r1, #0x73 + mov r0, #0 + lsl r1, r1, #2 + str r4, [r5, #0] + strb r0, [r5, r1] + sub r2, r1, #2 + strb r0, [r5, r2] + sub r1, r1, #1 + strb r0, [r5, r1] + mov r1, #7 + add r3, r0, #0 + lsl r1, r1, #6 +_021DE2CE: + add r2, r5, r0 + add r0, r0, #1 + strb r3, [r2, r1] + cmp r0, #8 + blt _021DE2CE + ldr r1, _021DE2F0 ; =ov19_021DE0F0 + add r0, r4, #0 + add r2, r5, #0 + bl ov19_021DD344 + cmp r0, #0 + bne _021DE2EC + add r0, r5, #0 + bl sub_020181C4 +_021DE2EC: + pop {r3, r4, r5, pc} + nop +_021DE2F0: .word ov19_021DE0F0 + thumb_func_end ov19_021DE2A4 + + thumb_func_start ov19_021DE2F4 +ov19_021DE2F4: ; 0x021DE2F4 + push {r4, r5, r6, lr} + add r5, r0, #0 + beq _021DE322 + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021DE322 + ldr r0, [r5, #4] + bl ov19_021D5EC8 + add r6, r0, #0 + mov r4, #0 +_021DE30A: + add r0, r4, #0 + add r1, r6, #0 + bl ov19_021DD9B8 + add r1, r0, #0 + ldr r0, [r5, #0x34] + bl sub_02021D6C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021DE30A +_021DE322: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DE2F4 + + thumb_func_start ov19_021DE324 +ov19_021DE324: ; 0x021DE324 + ldr r3, _021DE32C ; =sub_02019120 + mov r0, #4 + mov r1, #0 + bx r3 + ; .align 2, 0 +_021DE32C: .word sub_02019120 + thumb_func_end ov19_021DE324 + + thumb_func_start ov19_021DE330 +ov19_021DE330: ; 0x021DE330 + push {r3, lr} + mov r0, #2 + str r0, [sp] + ldr r0, _021DE34C ; =0x04001050 + mov r1, #1 + mov r2, #0x3f + mov r3, #0xe + bl sub_020BF55C + mov r0, #4 + mov r1, #1 + bl sub_02019120 + pop {r3, pc} + ; .align 2, 0 +_021DE34C: .word 0x04001050 + thumb_func_end ov19_021DE330 + + thumb_func_start ov19_021DE350 +ov19_021DE350: ; 0x021DE350 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldr r0, [r6, #4] + bl ov19_021D5EB8 + add r4, r0, #3 + cmp r4, #0x12 + blt _021DE364 + sub r4, #0x12 +_021DE364: + mov r0, #0 + add r7, r6, #0 + ldr r5, _021DE3E0 ; =0x021E0274 + str r0, [sp, #0x10] + add r7, #0x88 +_021DE36E: + ldr r0, [r6, #4] + add r2, r6, #0 + add r2, #0x84 + ldr r0, [r0, #0] + ldr r2, [r2, #0] + add r1, r4, #0 + bl sub_02079AF4 + mov r0, #0x68 + str r0, [sp] + mov r0, #0x11 + str r0, [sp, #4] + ldrh r2, [r5] + ldrh r3, [r5, #2] + add r0, r7, #0 + mov r1, #0 + bl sub_0201AE78 + mov r0, #2 + ldrsh r0, [r5, r0] + mov r1, #0 + add r2, r6, #0 + add r0, r0, #2 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DE3E4 ; =0x00010200 + add r3, r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldrsh r3, [r5, r3] + add r2, #0x84 + ldr r2, [r2, #0] + add r0, r7, #0 + add r3, r3, #4 + bl sub_0201D78C + sub r4, r4, #1 + bpl _021DE3C0 + mov r4, #0x11 +_021DE3C0: + ldr r0, [sp, #0x10] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #6 + blo _021DE36E + add r0, r6, #0 + add r0, #0x88 + bl sub_0201ACCC + add r0, r6, #0 + bl ov19_021DE330 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DE3E0: .word 0x021E0274 +_021DE3E4: .word 0x00010200 + thumb_func_end ov19_021DE350 + + .rodata + + + .global Unk_ov19_021E024C +Unk_ov19_021E024C: ; 0x021E024C + .incbin "incbin/overlay19_rodata.bin", 0x45C, 0x468 - 0x45C + + .global Unk_ov19_021E0258 +Unk_ov19_021E0258: ; 0x021E0258 + .incbin "incbin/overlay19_rodata.bin", 0x468, 0x474 - 0x468 + + .global Unk_ov19_021E0264 +Unk_ov19_021E0264: ; 0x021E0264 + .incbin "incbin/overlay19_rodata.bin", 0x474, 0x484 - 0x474 + + .global Unk_ov19_021E0274 +Unk_ov19_021E0274: ; 0x021E0274 + .incbin "incbin/overlay19_rodata.bin", 0x484, 0x49C - 0x484 + + .global Unk_ov19_021E028C +Unk_ov19_021E028C: ; 0x021E028C + .incbin "incbin/overlay19_rodata.bin", 0x49C, 0x240 + diff --git a/asm/ov19_021DE3E8.s b/asm/ov19_021DE3E8.s new file mode 100644 index 000000000..a44a474d1 --- /dev/null +++ b/asm/ov19_021DE3E8.s @@ -0,0 +1,1094 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DE3E8 +ov19_021DE3E8: ; 0x021DE3E8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0xa + mov r1, #0x3c + add r6, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _021DE43C + str r5, [r4, #4] + ldr r0, [sp] + str r6, [r4, #8] + str r0, [r4, #0xc] + ldr r0, [sp, #0x18] + str r0, [r4, #0x10] + add r0, r5, #0 + bl ov19_021D77D8 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov19_021D77F4 + str r0, [r4, #0x18] + mov r0, #0 + str r0, [r4, #0x34] + add r0, r6, #0 + bl ov19_021D5E08 + cmp r0, #3 + bne _021DE42C + mov r0, #1 + b _021DE42E +_021DE42C: + mov r0, #0 +_021DE42E: + str r0, [r4, #0] + add r0, r4, #0 + bl ov19_021DE450 + str r4, [r7, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DE43C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DE3E8 + + thumb_func_start ov19_021DE440 +ov19_021DE440: ; 0x021DE440 + push {r4, lr} + add r4, r0, #0 + bl ov19_021DE51C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov19_021DE440 + + thumb_func_start ov19_021DE450 +ov19_021DE450: ; 0x021DE450 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + add r6, r0, #0 + ldr r0, [r6, #0] + cmp r0, #0 + beq _021DE500 + ldr r4, [r6, #0x14] + ldr r0, [r6, #4] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r4, #0x20] + add r1, sp, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r3, [r4, #0x1c] + add r0, sp, #0x34 + bl ov19_021D783C + mov r0, #1 + add r1, r0, #0 + bl sub_0207CE78 + add r1, r0, #0 + mov r0, #0xa + str r0, [sp] + mov r0, #0x10 + mov r2, #0 + add r3, sp, #0xc + bl sub_02006F50 + str r0, [sp, #8] + cmp r0, #0 + beq _021DE510 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r1, [r0, #0] + ldr r0, _021DE514 ; =0x00300010 + ldr r4, _021DE518 ; =0x021E04CC + and r1, r0 + ldr r0, [sp, #0xc] + mov r7, #0 + str r1, [r0, #8] + add r5, r6, #0 +_021DE4AA: + add r0, sp, #0x10 + bl sub_020A818C + ldr r0, [sp, #0xc] + ldr r1, [r4, #0] + mov r2, #1 + add r3, sp, #0x10 + bl sub_020A8224 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r2, #0 + ldr r0, [r6, #0x10] + add r1, sp, #0x34 + add r3, r2, #0 + bl ov19_021D785C + str r0, [r5, #0x1c] + ldr r1, [r4, #4] + bl sub_02021E90 + ldr r0, [r5, #0x1c] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #0x1c] + mov r1, #1 + bl sub_02021CF8 + mov r0, #0 + str r0, [r5, #0x28] + add r7, r7, #1 + add r4, #8 + add r5, r5, #4 + cmp r7, #3 + blt _021DE4AA + ldr r0, [sp, #8] + bl sub_020181C4 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_021DE500: + mov r1, #0 + add r0, r1, #0 +_021DE504: + str r0, [r6, #0x1c] + str r0, [r6, #0x28] + add r1, r1, #1 + add r6, r6, #4 + cmp r1, #3 + blt _021DE504 +_021DE510: + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE514: .word 0x00300010 +_021DE518: .word 0x021E04CC + thumb_func_end ov19_021DE450 + + thumb_func_start ov19_021DE51C +ov19_021DE51C: ; 0x021DE51C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021DE522: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _021DE52C + bl sub_02021BD4 +_021DE52C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DE522 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DE51C + + thumb_func_start ov19_021DE538 +ov19_021DE538: ; 0x021DE538 + push {r3, r4} + mov r3, #0 + add r4, r0, #0 +_021DE53E: + ldr r2, [r4, #0x28] + cmp r2, #0 + bne _021DE550 + lsl r2, r3, #2 + add r0, r0, r2 + str r1, [r0, #0x28] + add r0, r3, #0 + pop {r3, r4} + bx lr +_021DE550: + add r3, r3, #1 + add r4, r4, #4 + cmp r3, #3 + blt _021DE53E + mov r0, #0 + mvn r0, r0 + pop {r3, r4} + bx lr + thumb_func_end ov19_021DE538 + + thumb_func_start ov19_021DE560 +ov19_021DE560: ; 0x021DE560 + mov r3, #0 +_021DE562: + ldr r2, [r0, #0x28] + cmp r1, r2 + bne _021DE56C + add r0, r3, #0 + bx lr +_021DE56C: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, #3 + blt _021DE562 + mov r0, #0 + mvn r0, r0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DE560 + + thumb_func_start ov19_021DE57C +ov19_021DE57C: ; 0x021DE57C + lsl r1, r1, #2 + add r0, r0, r1 + str r2, [r0, #0x28] + bx lr + thumb_func_end ov19_021DE57C + + thumb_func_start ov19_021DE584 +ov19_021DE584: ; 0x021DE584 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021DE598 + bl ov19_021DE59C + add r0, r4, #0 + bl ov19_021DE5D4 +_021DE598: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DE584 + + thumb_func_start ov19_021DE59C +ov19_021DE59C: ; 0x021DE59C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5E74 + add r4, r0, #0 + beq _021DE5D2 + add r0, r5, #0 + mov r1, #1 + bl ov19_021DE538 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov19_021DE718 + add r5, #0x1c + lsl r4, r6, #2 + ldr r0, [r5, r4] + mov r1, #6 + bl sub_02021D6C + ldr r0, [r5, r4] + mov r1, #1 + bl sub_02021CAC +_021DE5D2: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DE59C + + thumb_func_start ov19_021DE5D4 +ov19_021DE5D4: ; 0x021DE5D4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5F7C + add r7, r0, #0 + beq _021DE688 + add r0, r5, #0 + mov r1, #3 + bl ov19_021DE538 + add r6, r0, #0 + ldr r0, [r5, #0x18] + add r1, sp, #0x10 + bl ov19_021D9B1C + mov r0, #2 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x14] + ldr r0, [r5, #8] + bl ov19_021D5E10 + cmp r0, #1 + bne _021DE610 + mov r0, #1 + str r0, [sp, #0xc] + b _021DE614 +_021DE610: + mov r0, #2 + str r0, [sp, #0xc] +_021DE614: + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + mov r1, #1 + lsl r4, r6, #3 + bl sub_0207CE78 + mov r2, #0 + ldr r3, _021DE68C ; =0x021E04CC + str r2, [sp] + add r1, r0, #0 + str r2, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + ldr r3, [r3, r4] + mov r0, #0x10 + bl sub_02006EC0 + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + mov r1, #2 + bl sub_0207CE78 + ldr r3, _021DE690 ; =0x021E04D0 + add r1, r0, #0 + mov r0, #0x20 + ldr r3, [r3, r4] + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0x10 + mov r2, #1 + lsl r3, r3, #5 + bl sub_02006E84 + ldr r1, [sp, #0xc] + add r5, #0x1c + lsl r4, r6, #2 + lsl r1, r1, #0x18 + ldr r0, [r5, r4] + lsr r1, r1, #0x18 + bl sub_02021E80 + ldr r0, [r5, r4] + mov r1, #2 + bl ov19_021D78AC + ldr r0, [r5, r4] + add r1, sp, #0x10 + bl sub_02021C50 + ldr r0, [r5, r4] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r5, r4] + mov r1, #1 + bl sub_02021CAC +_021DE688: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE68C: .word 0x021E04CC +_021DE690: .word 0x021E04D0 + thumb_func_end ov19_021DE5D4 + + thumb_func_start ov19_021DE694 +ov19_021DE694: ; 0x021DE694 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #8] + add r6, r2, #0 + bl ov19_021D5E10 + cmp r0, #1 + ldr r0, [r5, #4] + bne _021DE6DE + bl ov19_021D77E8 + add r7, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5E2C + add r1, r0, #0 + add r0, r7, #0 + add r2, sp, #4 + add r3, sp, #0 + bl ov19_021DCD30 + ldr r0, [sp, #4] + add r0, #0xa + lsl r0, r0, #0xc + str r0, [r4, #0] + ldr r0, [sp] + add sp, #8 + add r0, #8 + lsl r0, r0, #0xc + str r0, [r4, #4] + mov r0, #1 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_021DE6DE: + bl ov19_021D7820 + add r7, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5E14 + mov r1, #0x18 + add r7, #0x70 + mul r1, r0 + add r0, r7, r1 + add r0, #0xa + str r0, [r4, #0] + ldr r0, [r5, #8] + bl ov19_021D5E1C + mov r1, #0x18 + mul r1, r0 + add r1, #0x30 + str r1, [r4, #4] + ldr r0, [r4, #0] + lsl r0, r0, #0xc + str r0, [r4, #0] + ldr r0, [r4, #4] + lsl r0, r0, #0xc + str r0, [r4, #4] + mov r0, #2 + str r0, [r6, #0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DE694 + + thumb_func_start ov19_021DE718 +ov19_021DE718: ; 0x021DE718 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + add r7, r2, #0 + cmp r4, #0 + blt _021DE792 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov19_021DE694 + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + mov r1, #1 + lsl r6, r4, #3 + bl sub_0207CE78 + mov r2, #0 + ldr r3, _021DE798 ; =0x021E04CC + str r2, [sp] + add r1, r0, #0 + str r2, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + ldr r3, [r3, r6] + mov r0, #0x10 + bl sub_02006EC0 + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + mov r1, #2 + bl sub_0207CE78 + ldr r3, _021DE79C ; =0x021E04D0 + add r1, r0, #0 + mov r0, #0x20 + ldr r3, [r3, r6] + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0x10 + mov r2, #1 + lsl r3, r3, #5 + bl sub_02006E84 + ldr r1, [sp, #0xc] + add r5, #0x1c + lsl r4, r4, #2 + lsl r1, r1, #0x18 + ldr r0, [r5, r4] + lsr r1, r1, #0x18 + bl sub_02021E80 + ldr r0, [r5, r4] + mov r1, #3 + bl ov19_021D78AC + ldr r0, [r5, r4] + add r1, sp, #0x10 + bl sub_02021C50 +_021DE792: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021DE798: .word 0x021E04CC +_021DE79C: .word 0x021E04D0 + thumb_func_end ov19_021DE718 + + thumb_func_start ov19_021DE7A0 +ov19_021DE7A0: ; 0x021DE7A0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DE7FE + mov r1, #1 + bl ov19_021DE560 + add r4, r0, #0 + bmi _021DE7CA + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov19_021DE57C + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + mov r1, #2 + bl sub_02021D6C +_021DE7CA: + ldr r0, [r5, #8] + bl ov19_021D5E74 + add r6, r0, #0 + beq _021DE7FE + add r0, r5, #0 + mov r1, #1 + bl ov19_021DE538 + add r4, r0, #0 + bmi _021DE7FE + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov19_021DE718 + add r5, #0x1c + lsl r4, r4, #2 + ldr r0, [r5, r4] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r5, r4] + mov r1, #1 + bl sub_02021CAC +_021DE7FE: + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DE7A0 + + thumb_func_start ov19_021DE800 +ov19_021DE800: ; 0x021DE800 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + cmp r1, #0 + bne _021DE80E + mov r0, #1 + pop {r3, r4, r5, pc} +_021DE80E: + mov r1, #1 + bl ov19_021DE560 + cmp r0, #0 + blt _021DE82A + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + bl sub_02021FD0 + cmp r0, #0 + beq _021DE82A + mov r0, #0 + pop {r3, r4, r5, pc} +_021DE82A: + add r0, r5, #0 + mov r1, #2 + bl ov19_021DE560 + add r4, r0, #0 + bmi _021DE852 + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + bl sub_02021FD0 + cmp r0, #0 + beq _021DE848 + mov r0, #0 + pop {r3, r4, r5, pc} +_021DE848: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov19_021DE57C +_021DE852: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DE800 + + thumb_func_start ov19_021DE858 +ov19_021DE858: ; 0x021DE858 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + mov r0, #0xa + mov r1, #0x34 + add r6, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _021DE8DA + lsl r0, r7, #2 + str r5, [r4, #0] + add r0, r5, r0 + ldr r0, [r0, #0x1c] + str r0, [r4, #4] + bl sub_02021D28 + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #8 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r2, r4, #0 + ldmia r6!, {r0, r1} + add r2, #0x14 + stmia r2!, {r0, r1} + ldr r0, [r6, #0] + ldr r6, [sp, #0x18] + str r0, [r2, #0] + ldr r1, [r4, #0x14] + ldr r0, [r4, #8] + sub r0, r1, r0 + add r1, r6, #0 + bl sub_020E1F6C + str r0, [r4, #0x20] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0xc] + sub r0, r1, r0 + add r1, r6, #0 + bl sub_020E1F6C + str r0, [r4, #0x24] + ldr r0, [sp, #0x18] + mov r2, #0 + str r0, [r4, #0x2c] + ldr r0, [sp] + add r1, r4, #0 + str r0, [r4, #0x28] + ldr r0, _021DE8DC ; =ov19_021DE8E0 + str r2, [r4, #0x30] + bl ov19_021D77C8 + cmp r0, #0 + beq _021DE8D4 + ldr r0, [r5, #0x34] + add r0, r0, #1 + str r0, [r5, #0x34] + pop {r3, r4, r5, r6, r7, pc} +_021DE8D4: + add r0, r4, #0 + bl sub_020181C4 +_021DE8DA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE8DC: .word ov19_021DE8E0 + thumb_func_end ov19_021DE858 + + thumb_func_start ov19_021DE8E0 +ov19_021DE8E0: ; 0x021DE8E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _021DE8F2 + cmp r0, #1 + beq _021DE928 + pop {r3, r4, r5, pc} +_021DE8F2: + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021DE918 + ldr r2, [r4, #8] + ldr r0, [r4, #0x20] + add r1, #8 + add r0, r2, r0 + str r0, [r4, #8] + ldr r2, [r4, #0xc] + ldr r0, [r4, #0x24] + add r0, r2, r0 + str r0, [r4, #0xc] + ldr r0, [r4, #4] + bl sub_02021C50 + ldr r0, [r4, #0x2c] + sub r0, r0, #1 + str r0, [r4, #0x2c] + pop {r3, r4, r5, pc} +_021DE918: + ldr r0, [r4, #4] + add r1, #0x14 + bl sub_02021C50 + ldr r0, [r4, #0x30] + add r0, r0, #1 + str r0, [r4, #0x30] + pop {r3, r4, r5, pc} +_021DE928: + ldr r0, [r4, #4] + bl sub_02021FD0 + cmp r0, #0 + bne _021DE952 + ldr r0, [r4, #4] + ldr r1, [r4, #0x28] + bl ov19_021D78AC + ldr r1, [r4, #0] + ldr r0, [r1, #0x34] + sub r0, r0, #1 + str r0, [r1, #0x34] + add r0, r5, #0 + bl sub_0200DA58 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov19_021D79B8 +_021DE952: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DE8E0 + + thumb_func_start ov19_021DE954 +ov19_021DE954: ; 0x021DE954 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DE9A2 + mov r1, #1 + bl ov19_021DE560 + add r4, r0, #0 + bmi _021DE9A2 + ldr r0, [r5, #0x18] + add r1, sp, #4 + bl ov19_021D9B1C + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #3 + bl ov19_021DE57C + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + mov r1, #3 + bl sub_02021D6C + mov r0, #0xc + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #4 + mov r3, #2 + bl ov19_021DE858 +_021DE9A2: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DE954 + + thumb_func_start ov19_021DE9A8 +ov19_021DE9A8: ; 0x021DE9A8 + ldr r0, [r0, #0x34] + cmp r0, #0 + bne _021DE9B2 + mov r0, #1 + bx lr +_021DE9B2: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DE9A8 + + thumb_func_start ov19_021DE9B8 +ov19_021DE9B8: ; 0x021DE9B8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021DE9E2 + mov r1, #1 + bl ov19_021DE560 + add r5, r0, #0 + bmi _021DE9E2 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #2 + bl ov19_021DE57C + lsl r0, r5, #2 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + mov r1, #2 + bl sub_02021D6C +_021DE9E2: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DE9B8 + + thumb_func_start ov19_021DE9E4 +ov19_021DE9E4: ; 0x021DE9E4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DEA14 + mov r1, #2 + bl ov19_021DE560 + add r4, r0, #0 + bmi _021DEA14 + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + bl sub_02021FD0 + cmp r0, #0 + beq _021DEA0A + mov r0, #0 + pop {r3, r4, r5, pc} +_021DEA0A: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov19_021DE57C +_021DEA14: + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DE9E4 + + thumb_func_start ov19_021DEA18 +ov19_021DEA18: ; 0x021DEA18 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DEA5E + mov r1, #3 + bl ov19_021DE560 + add r4, r0, #0 + bmi _021DEA5E + add r0, r5, #0 + add r1, sp, #8 + add r2, sp, #4 + bl ov19_021DE694 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov19_021DE57C + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + mov r1, #4 + bl sub_02021D6C + mov r0, #0xc + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #8 + mov r3, #3 + bl ov19_021DE858 +_021DEA5E: + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEA18 + + thumb_func_start ov19_021DEA64 +ov19_021DEA64: ; 0x021DEA64 + ldr r0, [r0, #0x34] + cmp r0, #0 + bne _021DEA6E + mov r0, #1 + bx lr +_021DEA6E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DEA64 + + thumb_func_start ov19_021DEA74 +ov19_021DEA74: ; 0x021DEA74 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DEB02 + mov r1, #3 + bl ov19_021DE560 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl ov19_021DE560 + add r6, r0, #0 + cmp r4, #0 + blt _021DEB02 + cmp r6, #0 + blt _021DEB02 + add r0, r5, #0 + add r1, sp, #8 + add r2, sp, #4 + bl ov19_021DE694 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov19_021DE57C + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + mov r1, #4 + bl sub_02021D6C + mov r0, #0xc + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #8 + mov r3, #3 + bl ov19_021DE858 + ldr r0, [r5, #0x18] + add r1, sp, #8 + bl ov19_021D9B1C + mov r0, #2 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #3 + bl ov19_021DE57C + lsl r0, r6, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + mov r1, #3 + bl sub_02021D6C + mov r0, #0xc + str r0, [sp] + add r0, r5, #0 + add r1, r6, #0 + add r2, sp, #8 + mov r3, #2 + bl ov19_021DE858 +_021DEB02: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEA74 + + thumb_func_start ov19_021DEB08 +ov19_021DEB08: ; 0x021DEB08 + ldr r0, [r0, #0x34] + cmp r0, #0 + bne _021DEB12 + mov r0, #1 + bx lr +_021DEB12: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DEB08 + + thumb_func_start ov19_021DEB18 +ov19_021DEB18: ; 0x021DEB18 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021DEB5E + mov r1, #3 + bl ov19_021DE560 + add r5, r0, #0 + bmi _021DEB3C + lsl r0, r5, #2 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + mov r1, #5 + bl sub_02021D6C + str r5, [r4, #0x38] + pop {r3, r4, r5, pc} +_021DEB3C: + add r0, r4, #0 + mov r1, #1 + bl ov19_021DE560 + add r5, r0, #0 + bmi _021DEB58 + lsl r0, r5, #2 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + mov r1, #2 + bl sub_02021D6C + str r5, [r4, #0x38] + pop {r3, r4, r5, pc} +_021DEB58: + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x38] +_021DEB5E: + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DEB18 + + thumb_func_start ov19_021DEB60 +ov19_021DEB60: ; 0x021DEB60 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021DEB96 + mov r0, #0 + ldr r1, [r4, #0x38] + mvn r0, r0 + cmp r1, r0 + beq _021DEB96 + lsl r0, r1, #2 + add r0, r4, r0 + ldr r0, [r0, #0x1c] + bl sub_02021FD0 + cmp r0, #0 + beq _021DEB86 + mov r0, #0 + pop {r4, pc} +_021DEB86: + ldr r1, [r4, #0x38] + add r0, r4, #0 + mov r2, #0 + bl ov19_021DE57C + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x38] +_021DEB96: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEB60 + + thumb_func_start ov19_021DEB9C +ov19_021DEB9C: ; 0x021DEB9C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DEBD6 + mov r1, #3 + bl ov19_021DE560 + add r6, r0, #0 + bmi _021DEBD6 + ldmia r4!, {r0, r1} + add r3, sp, #0 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + mov r0, #2 + ldr r1, [sp, #4] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #4] + lsl r0, r6, #2 + add r0, r5, r0 + ldr r0, [r0, #0x1c] + add r1, r2, #0 + bl sub_02021C50 +_021DEBD6: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEB9C + + thumb_func_start ov19_021DEBDC +ov19_021DEBDC: ; 0x021DEBDC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0] + cmp r1, #0 + beq _021DEC00 + mov r1, #3 + bl ov19_021DE560 + cmp r0, #0 + blt _021DEC00 + lsl r0, r0, #2 + add r0, r5, r0 + lsl r1, r4, #0x18 + ldr r0, [r0, #0x1c] + lsr r1, r1, #0x18 + bl sub_02021E80 +_021DEC00: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEBDC + + .rodata + + + .global Unk_ov19_021E04CC +Unk_ov19_021E04CC: ; 0x021E04CC + .incbin "incbin/overlay19_rodata.bin", 0x6DC, 0x18 + diff --git a/asm/ov19_021DEC04.s b/asm/ov19_021DEC04.s new file mode 100644 index 000000000..085c542ec --- /dev/null +++ b/asm/ov19_021DEC04.s @@ -0,0 +1,1739 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DEC04 +ov19_021DEC04: ; 0x021DEC04 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r2, #0 + add r5, r0, #0 + add r0, r7, #0 + add r6, r1, #0 + str r3, [sp, #4] + bl ov19_021D5E08 + cmp r0, #4 + beq _021DEC24 + mov r0, #0 + str r0, [r5, #0] + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DEC24: + mov r1, #0xe1 + mov r0, #0xa + lsl r1, r1, #2 + bl sub_02018144 + add r4, r0, #0 + beq _021DECA4 + str r6, [r4, #4] + ldr r0, [sp, #4] + str r7, [r4, #8] + str r0, [r4, #0xc] + ldr r0, [sp, #0x20] + str r0, [r4, #0x10] + add r0, r6, #0 + bl ov19_021D77D8 + str r0, [r4, #0x14] + mov r0, #0xa + mov r3, #0xda + str r0, [sp] + lsl r3, r3, #2 + ldr r0, [sp, #0x28] + mov r1, #7 + mov r2, #1 + add r3, r4, r3 + bl sub_020071D0 + mov r3, #0x37 + lsl r3, r3, #4 + str r0, [r4, r3] + mov r0, #0xa + str r0, [sp] + sub r3, r3, #4 + ldr r0, [sp, #0x28] + mov r1, #8 + mov r2, #1 + add r3, r4, r3 + bl sub_020071D0 + mov r2, #0xdd + lsl r2, r2, #2 + str r0, [r4, r2] + ldr r0, [sp, #0x24] + mov r1, #0x1a + str r0, [r4, #0x6c] + mov r0, #1 + sub r2, #0xed + mov r3, #0xa + bl sub_0200B144 + str r0, [r4, #0x70] + mov r0, #0x20 + mov r1, #0xa + bl sub_02023790 + str r0, [r4, #0x74] + mov r0, #0xe + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] + add sp, #8 + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DECA4: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEC04 + + thumb_func_start ov19_021DECAC +ov19_021DECAC: ; 0x021DECAC + push {r4, lr} + add r4, r0, #0 + beq _021DECE4 + mov r0, #0x37 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0xdd + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r0, [r4, #0x70] + bl sub_0200B190 + add r0, r4, #0 + bl ov19_021DF7D0 + add r0, r4, #0 + bl ov19_021DF03C + ldr r0, [r4, #0x74] + bl sub_020237BC + add r0, r4, #0 + bl sub_020181C4 +_021DECE4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DECAC + + thumb_func_start ov19_021DECE8 +ov19_021DECE8: ; 0x021DECE8 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + beq _021DEDD6 + bl ov19_021DEEFC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #0xc] + add r0, r4, #0 + mov r1, #0x84 + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #0xc] + add r0, r4, #0 + mov r1, #0x81 + mov r3, #5 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #0xc] + add r0, r4, #0 + mov r1, #0x82 + mov r3, #6 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r2, [r5, #0xc] + add r0, r4, #0 + mov r1, #0x83 + mov r3, #7 + bl sub_0200710C + mov r0, #0x80 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x85 + mov r2, #4 + mov r3, #0 + bl sub_02007130 + bl sub_02079FD0 + mov r3, #0x80 + add r1, r0, #0 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0x13 + mov r2, #5 + bl sub_02006E84 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0xa + bl sub_02019690 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r0, [r5, #0xc] + mov r1, #4 + add r3, r2, #0 + bl sub_02019CB8 + add r0, r5, #0 + bl ov19_021DEF64 + add r0, r5, #0 + bl ov19_021DEFC8 + ldr r0, [r5, #8] + bl ov19_021D5FA4 + mov r1, #0xde + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, #0xc] + mov r1, #4 + bl sub_02019448 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DF5D0 +_021DEDD6: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DECE8 + + thumb_func_start ov19_021DEDDC +ov19_021DEDDC: ; 0x021DEDDC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + cmp r5, #0 + beq _021DEE30 + ldr r0, [r5, #8] + bl ov19_021D5F9C + add r4, r0, #0 + cmp r6, #0 + beq _021DEE10 + mov r0, #1 + eor r0, r4 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x28] + mov r1, #2 + bl sub_02021D6C + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x28] + mov r1, #0 + bl sub_02021D6C + b _021DEE2A +_021DEE10: + mov r1, #1 + eor r0, r1 + lsl r0, r0, #2 + add r0, r5, r0 + ldr r0, [r0, #0x28] + bl sub_02021D6C + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x28] + mov r1, #0 + bl sub_02021D6C +_021DEE2A: + add r0, r5, #0 + bl ov19_021DEEFC +_021DEE30: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEDDC + + thumb_func_start ov19_021DEE34 +ov19_021DEE34: ; 0x021DEE34 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov19_021DF834 + cmp r5, #0 + beq _021DEE80 + ldr r0, [r5, #8] + bl ov19_021D5F9C + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DF8C8 + ldr r0, [r5, #8] + bl ov19_021D5FA4 + cmp r0, #0 + beq _021DEE64 + cmp r0, #1 + beq _021DEE6E + cmp r0, #2 + beq _021DEE78 + pop {r3, r4, r5, pc} +_021DEE64: + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DF3AC + pop {r3, r4, r5, pc} +_021DEE6E: + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DF178 + pop {r3, r4, r5, pc} +_021DEE78: + add r0, r5, #0 + add r1, r4, #0 + bl ov19_021DF4D0 +_021DEE80: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DEE34 + + thumb_func_start ov19_021DEE84 +ov19_021DEE84: ; 0x021DEE84 + mov r0, #1 + bx lr + thumb_func_end ov19_021DEE84 + + thumb_func_start ov19_021DEE88 +ov19_021DEE88: ; 0x021DEE88 + push {r4, lr} + add r4, r0, #0 + beq _021DEEA6 + mov r1, #0xdf + mov r2, #0 + lsl r1, r1, #2 + str r2, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl ov19_021DF0CC + ldr r0, [r4, #0xc] + mov r1, #4 + bl sub_02019448 +_021DEEA6: + pop {r4, pc} + thumb_func_end ov19_021DEE88 + + thumb_func_start ov19_021DEEA8 +ov19_021DEEA8: ; 0x021DEEA8 + push {r4, lr} + add r4, r0, #0 + beq _021DEEF8 + mov r1, #0xdf + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + beq _021DEEC2 + cmp r1, #1 + beq _021DEED2 + cmp r1, #2 + beq _021DEEF0 + b _021DEEF4 +_021DEEC2: + bl ov19_021DEF64 + mov r0, #0xdf + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _021DEEF4 +_021DEED2: + bl ov19_021DF2E0 + add r0, r4, #0 + bl ov19_021DF064 + ldr r0, [r4, #0xc] + mov r1, #4 + bl sub_02019448 + mov r0, #0xdf + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _021DEEF4 +_021DEEF0: + mov r0, #1 + pop {r4, pc} +_021DEEF4: + mov r0, #0 + pop {r4, pc} +_021DEEF8: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov19_021DEEA8 + + thumb_func_start ov19_021DEEFC +ov19_021DEEFC: ; 0x021DEEFC + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5F9C + cmp r0, #0 + bne _021DEF10 + mov r0, #0xda + b _021DEF12 +_021DEF10: + mov r0, #0xdb +_021DEF12: + lsl r0, r0, #2 + ldr r4, [r5, r0] + mov r0, #6 + str r0, [sp] + mov r1, #0x20 + add r0, r4, #0 + mov r2, #0 + str r1, [sp, #4] + add r0, #0xc + str r0, [sp, #8] + str r2, [sp, #0xc] + str r2, [sp, #0x10] + str r1, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r5, #0xc] + mov r1, #2 + add r3, r2, #0 + bl sub_020198E8 + mov r0, #6 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + add r4, #0xc + str r4, [sp, #8] + mov r2, #0x1a + str r2, [sp, #0xc] + mov r3, #0 + str r3, [sp, #0x10] + str r0, [sp, #0x14] + str r0, [sp, #0x18] + ldr r0, [r5, #0xc] + mov r1, #2 + bl sub_020198E8 + ldr r0, [r5, #0xc] + mov r1, #2 + bl sub_02019448 + add sp, #0x1c + pop {r4, r5, pc} + thumb_func_end ov19_021DEEFC + + thumb_func_start ov19_021DEF64 +ov19_021DEF64: ; 0x021DEF64 + push {r3, lr} + ldr r0, [r0, #8] + bl ov19_021D5FA4 + cmp r0, #0 + beq _021DEF7A + cmp r0, #1 + beq _021DEF94 + cmp r0, #2 + beq _021DEFAE + pop {r3, pc} +_021DEF7A: + mov r0, #5 + mov r1, #1 + bl sub_02019120 + mov r0, #6 + mov r1, #0 + bl sub_02019120 + mov r0, #7 + mov r1, #0 + bl sub_02019120 + pop {r3, pc} +_021DEF94: + mov r0, #6 + mov r1, #1 + bl sub_02019120 + mov r0, #5 + mov r1, #0 + bl sub_02019120 + mov r0, #7 + mov r1, #0 + bl sub_02019120 + pop {r3, pc} +_021DEFAE: + mov r0, #7 + mov r1, #1 + bl sub_02019120 + mov r0, #5 + mov r1, #0 + bl sub_02019120 + mov r0, #6 + mov r1, #0 + bl sub_02019120 + pop {r3, pc} + thumb_func_end ov19_021DEF64 + + thumb_func_start ov19_021DEFC8 +ov19_021DEFC8: ; 0x021DEFC8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r1, #0 + add r2, r7, #0 + add r5, r1, #0 +_021DEFD2: + add r0, r2, #0 + add r0, #0x84 + add r1, r1, #1 + add r2, #0x10 + str r5, [r0, #0] + cmp r1, #7 + blt _021DEFD2 + add r4, r7, #0 + ldr r6, _021DF038 ; =0x021E0524 + add r4, #0x78 +_021DEFE6: + ldr r0, [r7, #0xc] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0201A8D4 + add r0, r4, #0 + bl sub_0201A9F4 + add r5, r5, #1 + add r6, #8 + add r4, #0x10 + cmp r5, #3 + blo _021DEFE6 + add r0, r7, #0 + bl ov19_021DF2E0 + add r0, r7, #0 + add r0, #0x78 + mov r1, #0 + bl sub_0201ADA4 + add r0, r7, #0 + add r0, #0x88 + mov r1, #0 + bl sub_0201ADA4 + add r4, r7, #0 + mov r5, #0 + add r4, #0x78 +_021DF020: + add r0, r4, #0 + bl sub_0201ACCC + add r5, r5, #1 + add r4, #0x10 + cmp r5, #3 + blo _021DF020 + add r0, r7, #0 + bl ov19_021DF064 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DF038: .word 0x021E0524 + thumb_func_end ov19_021DEFC8 + + thumb_func_start ov19_021DF03C +ov19_021DF03C: ; 0x021DF03C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r5, #0 + mov r6, #0 + add r4, #0x78 +_021DF046: + add r0, r5, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DF056 + add r0, r4, #0 + bl sub_0201A8FC +_021DF056: + add r6, r6, #1 + add r5, #0x10 + add r4, #0x10 + cmp r6, #7 + blt _021DF046 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DF03C + + thumb_func_start ov19_021DF064 +ov19_021DF064: ; 0x021DF064 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5FA4 + add r4, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5FA4 + cmp r0, #0 + beq _021DF084 + cmp r0, #1 + beq _021DF09C + cmp r0, #2 + beq _021DF0AE + b _021DF0C4 +_021DF084: + add r0, r5, #0 + bl ov19_021DF108 + add r0, r5, #0 + mov r1, #0 + bl ov19_021DF3AC + add r0, r5, #0 + mov r1, #1 + bl ov19_021DF3AC + b _021DF0C4 +_021DF09C: + add r0, r5, #0 + mov r1, #0 + bl ov19_021DF178 + add r0, r5, #0 + mov r1, #1 + bl ov19_021DF178 + b _021DF0C4 +_021DF0AE: + add r0, r5, #0 + bl ov19_021DF270 + add r0, r5, #0 + mov r1, #0 + bl ov19_021DF4D0 + add r0, r5, #0 + mov r1, #1 + bl ov19_021DF4D0 +_021DF0C4: + mov r0, #0xde + lsl r0, r0, #2 + str r4, [r5, r0] + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DF064 + + thumb_func_start ov19_021DF0CC +ov19_021DF0CC: ; 0x021DF0CC + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + beq _021DF0DE + cmp r1, #1 + beq _021DF0EA + cmp r1, #2 + beq _021DF0FA + pop {r4, pc} +_021DF0DE: + bl ov19_021DF140 + add r0, r4, #0 + bl ov19_021DF394 + pop {r4, pc} +_021DF0EA: + mov r1, #0 + bl ov19_021DF250 + add r0, r4, #0 + mov r1, #1 + bl ov19_021DF250 + pop {r4, pc} +_021DF0FA: + bl ov19_021DF2A8 + add r0, r4, #0 + bl ov19_021DF394 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DF0CC + + thumb_func_start ov19_021DF108 +ov19_021DF108: ; 0x021DF108 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r7, _021DF13C ; =0x021E0514 + str r0, [sp] + mov r6, #0 + add r5, #0x78 +_021DF114: + add r0, r6, #3 + lsl r4, r0, #4 + ldr r0, [sp] + add r1, r5, r4 + ldr r0, [r0, #0xc] + add r2, r7, #0 + bl sub_0201A8D4 + add r0, r5, r4 + bl sub_0201A9F4 + add r0, r5, r4 + mov r1, #0 + bl sub_0201ADA4 + add r6, r6, #1 + add r7, #8 + cmp r6, #2 + blo _021DF114 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF13C: .word 0x021E0514 + thumb_func_end ov19_021DF108 + + thumb_func_start ov19_021DF140 +ov19_021DF140: ; 0x021DF140 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r0, #0x78 + add r5, r0, #0 + mov r6, #3 + add r4, #0x30 + add r5, #0x30 + mov r7, #0 +_021DF150: + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DF16C + add r0, r5, #0 + bl sub_0201AA3C + add r0, r5, #0 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x84 + str r7, [r0, #0] +_021DF16C: + add r6, r6, #1 + add r4, #0x10 + add r5, #0x10 + cmp r6, #4 + ble _021DF150 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DF140 + + thumb_func_start ov19_021DF178 +ov19_021DF178: ; 0x021DF178 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + ldr r0, [r7, #8] + str r1, [sp] + bl ov19_021D5FAC + add r4, r0, #0 + ldr r0, [r7, #8] + bl ov19_021D5E34 + add r6, r0, #0 + ldr r0, [r7, #8] + bl ov19_021D5F9C + ldr r1, [sp] + cmp r1, r0 + bne _021DF1A0 + mov r5, #1 + b _021DF1A2 +_021DF1A0: + mov r5, #0 +_021DF1A2: + ldr r0, [r7, #8] + ldr r1, [sp] + bl ov19_021D5FB8 + cmp r6, #1 + bne _021DF1B2 + cmp r5, #1 + beq _021DF1BA +_021DF1B2: + cmp r5, #0 + bne _021DF23E + cmp r0, #1 + bne _021DF23E +_021DF1BA: + ldrb r0, [r4, #6] + cmp r0, #0 + bne _021DF23E + ldr r1, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #0x10] + mov r0, #0x14 + add r2, r1, #0 + mul r2, r0 + add r5, r7, r2 + mov r2, #1 + eor r1, r2 + mul r0, r1 + ldr r6, _021DF24C ; =0x021E053C + add r4, #0x16 + add r7, r7, r0 +_021DF1DC: + ldr r3, [r6, #0] + ldr r0, [r6, #8] + ldrh r2, [r4] + sub r1, r0, r3 + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r0, r0, #8 + mul r0, r2 + add r0, r3, r0 + str r0, [sp, #8] + ldr r3, [r6, #4] + ldr r0, [r6, #0xc] + ldrh r2, [r4] + sub r1, r0, r3 + asr r0, r1, #7 + lsr r0, r0, #0x18 + add r0, r1, r0 + asr r0, r0, #8 + mul r0, r2 + add r0, r3, r0 + str r0, [sp, #0xc] + ldr r0, [r5, #0x34] + add r1, sp, #8 + bl sub_02021C50 + ldr r0, [r5, #0x34] + mov r1, #0 + bl ov19_021D78AC + ldr r0, [r7, #0x34] + mov r1, #1 + bl ov19_021D78AC + ldr r0, [r5, #0x34] + mov r1, #1 + bl sub_02021CAC + ldr r0, [sp, #4] + add r4, r4, #2 + add r0, r0, #1 + add r6, #0x10 + add r5, r5, #4 + add r7, r7, #4 + str r0, [sp, #4] + cmp r0, #5 + blt _021DF1DC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021DF23E: + ldr r1, [sp] + add r0, r7, #0 + bl ov19_021DF250 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DF24C: .word 0x021E053C + thumb_func_end ov19_021DF178 + + thumb_func_start ov19_021DF250 +ov19_021DF250: ; 0x021DF250 + push {r4, r5, r6, lr} + mov r2, #0x14 + mov r4, #0 + mul r2, r1 + add r5, r0, r2 + add r6, r4, #0 +_021DF25C: + ldr r0, [r5, #0x34] + add r1, r6, #0 + bl sub_02021CAC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _021DF25C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov19_021DF250 + + thumb_func_start ov19_021DF270 +ov19_021DF270: ; 0x021DF270 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r7, _021DF2A4 ; =0x021E0504 + str r0, [sp] + mov r6, #0 + add r5, #0x78 +_021DF27C: + add r0, r6, #5 + lsl r4, r0, #4 + ldr r0, [sp] + add r1, r5, r4 + ldr r0, [r0, #0xc] + add r2, r7, #0 + bl sub_0201A8D4 + add r0, r5, r4 + bl sub_0201A9F4 + add r0, r5, r4 + mov r1, #0 + bl sub_0201ADA4 + add r6, r6, #1 + add r7, #8 + cmp r6, #2 + blo _021DF27C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF2A4: .word 0x021E0504 + thumb_func_end ov19_021DF270 + + thumb_func_start ov19_021DF2A8 +ov19_021DF2A8: ; 0x021DF2A8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r0, #0x78 + add r5, r0, #0 + mov r6, #5 + add r4, #0x50 + add r5, #0x50 + mov r7, #0 +_021DF2B8: + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DF2D4 + add r0, r5, #0 + bl sub_0201AA3C + add r0, r5, #0 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x84 + str r7, [r0, #0] +_021DF2D4: + add r6, r6, #1 + add r4, #0x10 + add r5, #0x10 + cmp r6, #6 + ble _021DF2B8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DF2A8 + + thumb_func_start ov19_021DF2E0 +ov19_021DF2E0: ; 0x021DF2E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r5, #0 + add r7, #0x98 + add r0, r7, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #8] + bl ov19_021D5FA4 + cmp r0, #0 + beq _021DF302 + cmp r0, #2 + beq _021DF34E + b _021DF380 +_021DF302: + mov r0, #0 + ldr r6, _021DF38C ; =0x021E04F4 + str r0, [sp, #0x10] + add r4, r0, #0 +_021DF30A: + ldrh r1, [r6] + ldr r0, [r5, #0x6c] + ldr r2, [r5, #0x74] + bl sub_0200B1B8 + mov r0, #0 + ldr r1, [r5, #0x74] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r7, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + lsr r3, r0, #1 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF390 ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r5, #0x74] + add r0, r7, #0 + bl sub_0201D78C + ldr r0, [sp, #0x10] + add r6, r6, #2 + add r0, r0, #1 + add r4, #0x10 + str r0, [sp, #0x10] + cmp r0, #8 + blo _021DF30A + b _021DF380 +_021DF34E: + ldr r0, [r5, #0x6c] + ldr r2, [r5, #0x74] + mov r1, #0x2b + bl sub_0200B1B8 + mov r0, #0 + ldr r1, [r5, #0x74] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r7, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF390 ; =0x000F0E00 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r5, #0x74] + add r0, r7, #0 + bl sub_0201D78C +_021DF380: + add r0, r7, #0 + bl sub_0201ACCC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DF38C: .word 0x021E04F4 +_021DF390: .word 0x000F0E00 + thumb_func_end ov19_021DF2E0 + + thumb_func_start ov19_021DF394 +ov19_021DF394: ; 0x021DF394 + push {r4, lr} + add r4, r0, #0 + add r4, #0x98 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201ACCC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov19_021DF394 + + thumb_func_start ov19_021DF3AC +ov19_021DF3AC: ; 0x021DF3AC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r0, r1, #0 + add r2, r5, #0 + add r0, r0, #3 + add r2, #0x78 + lsl r0, r0, #4 + add r4, r2, r0 + ldr r0, [r5, #8] + str r1, [sp, #0x10] + bl ov19_021D5FAC + add r6, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5E34 + str r0, [sp, #0x18] + ldr r0, [r5, #8] + bl ov19_021D5F9C + ldr r1, [sp, #0x10] + cmp r1, r0 + bne _021DF3E0 + mov r7, #1 + b _021DF3E2 +_021DF3E0: + mov r7, #0 +_021DF3E2: + ldr r0, [r5, #8] + ldr r1, [sp, #0x10] + bl ov19_021D5FB8 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _021DF3FE + cmp r7, #1 + beq _021DF408 +_021DF3FE: + cmp r7, #0 + bne _021DF4C2 + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _021DF4C2 +_021DF408: + ldrb r0, [r6, #6] + cmp r0, #0 + bne _021DF482 + mov r0, #0 + ldr r1, [r6, #0x2c] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF4CC ; =0x000F0E00 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r6, #0x2c] + add r0, r4, #0 + bl sub_0201D78C + mov r7, #0 + add r6, #8 +_021DF43A: + mov r0, #1 + str r0, [sp] + ldrh r1, [r6] + ldr r0, [r5, #0x74] + mov r2, #3 + mov r3, #0 + bl sub_020238A0 + mov r0, #0 + ldr r1, [r5, #0x74] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + lsr r3, r0, #1 + add r0, r7, #1 + lsl r0, r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF4CC ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r5, #0x74] + add r0, r4, #0 + bl sub_0201D78C + add r7, r7, #1 + add r6, r6, #2 + cmp r7, #7 + blt _021DF43A + b _021DF4C2 +_021DF482: + ldr r0, [r5, #0x6c] + ldr r2, [r5, #0x74] + mov r1, #0x2c + bl sub_0200B1B8 + mov r7, #0 + add r6, r7, #0 +_021DF490: + mov r0, #0 + ldr r1, [r5, #0x74] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + lsr r3, r0, #1 + str r6, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF4CC ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r5, #0x74] + add r0, r4, #0 + bl sub_0201D78C + add r7, r7, #1 + add r6, #0x10 + cmp r7, #8 + blt _021DF490 +_021DF4C2: + add r0, r4, #0 + bl sub_0201ACCC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF4CC: .word 0x000F0E00 + thumb_func_end ov19_021DF3AC + + thumb_func_start ov19_021DF4D0 +ov19_021DF4D0: ; 0x021DF4D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + add r0, r1, #0 + add r2, r5, #0 + add r0, r0, #5 + add r2, #0x78 + lsl r0, r0, #4 + add r4, r2, r0 + ldr r0, [r5, #8] + str r1, [sp, #0x10] + bl ov19_021D5FAC + add r6, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5E34 + str r0, [sp, #0x1c] + ldr r0, [r5, #8] + bl ov19_021D5F9C + ldr r1, [sp, #0x10] + cmp r1, r0 + bne _021DF504 + mov r7, #1 + b _021DF506 +_021DF504: + mov r7, #0 +_021DF506: + ldr r0, [r5, #8] + ldr r1, [sp, #0x10] + bl ov19_021D5FB8 + str r0, [sp, #0x18] + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x1c] + cmp r0, #1 + bne _021DF522 + cmp r7, #1 + beq _021DF52C +_021DF522: + cmp r7, #0 + bne _021DF5C0 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _021DF5C0 +_021DF52C: + ldrb r0, [r6, #6] + cmp r0, #0 + bne _021DF580 + mov r0, #0 + str r0, [sp, #0x14] + mov r7, #4 +_021DF538: + ldrh r1, [r6, #0x20] + cmp r1, #0 + beq _021DF570 + ldr r0, [r5, #0x70] + ldr r2, [r5, #0x74] + bl sub_0200B1B8 + mov r0, #0 + ldr r1, [r5, #0x74] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + lsr r3, r0, #1 + str r7, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF5CC ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r5, #0x74] + add r0, r4, #0 + bl sub_0201D78C +_021DF570: + ldr r0, [sp, #0x14] + add r6, r6, #2 + add r0, r0, #1 + add r7, #0x18 + str r0, [sp, #0x14] + cmp r0, #4 + blt _021DF538 + b _021DF5C0 +_021DF580: + ldr r0, [r5, #0x6c] + ldr r2, [r5, #0x74] + mov r1, #0x2c + bl sub_0200B1B8 + mov r7, #0 + mov r6, #4 +_021DF58E: + mov r0, #0 + ldr r1, [r5, #0x74] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + lsr r3, r0, #1 + str r6, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF5CC ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r5, #0x74] + add r0, r4, #0 + bl sub_0201D78C + add r7, r7, #1 + add r6, #0x18 + cmp r7, #4 + blt _021DF58E +_021DF5C0: + add r0, r4, #0 + bl sub_0201ACCC + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DF5CC: .word 0x000F0E00 + thumb_func_end ov19_021DF4D0 + + thumb_func_start ov19_021DF5D0 +ov19_021DF5D0: ; 0x021DF5D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x6c + add r7, r0, #0 + add r4, r1, #0 + mov r0, #0xa + add r3, r7, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x87 + mov r2, #1 + add r3, #0x60 + bl sub_02007204 + str r0, [r7, #0x5c] + mov r0, #0xa + add r3, r7, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x88 + mov r2, #1 + add r3, #0x68 + bl sub_02007220 + str r0, [r7, #0x64] + mov r0, #0x60 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x89 + mov r2, #5 + mov r3, #0 + bl sub_02007130 + add r0, sp, #0x48 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + str r3, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + add r0, sp, #0x48 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #0x86 + mov r2, #1 + bl sub_0200718C + str r0, [sp, #0x20] + ldr r0, [r7, #4] + bl ov19_021D77D0 + add r2, r0, #0 + ldr r0, [r7, #0x68] + add r1, sp, #0x48 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r3, [r7, #0x60] + add r0, sp, #0x24 + bl ov19_021D783C + ldr r0, _021DF728 ; =0x021E04E4 + mov r4, #0 + str r0, [sp, #0x1c] + str r7, [sp, #0x18] + str r7, [sp, #0x14] +_021DF65C: + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + mov r3, #0 + ldrsh r2, [r2, r3] + ldr r3, [sp, #0x1c] + mov r5, #2 + ldrsh r3, [r3, r5] + ldr r0, [r7, #0x10] + add r1, sp, #0x24 + bl ov19_021D785C + ldr r1, [sp, #0x18] + str r0, [r1, #0x28] + add r1, r4, #0 + bl sub_02021E90 + ldr r0, [sp, #0x18] + mov r1, #0 + ldr r0, [r0, #0x28] + bl sub_02021D6C + ldr r5, [sp, #0x14] + mov r6, #0 +_021DF690: + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r2, #0 + ldr r0, [r7, #0x10] + add r1, sp, #0x24 + add r3, r2, #0 + bl ov19_021D785C + str r0, [r5, #0x34] + add r1, r4, #5 + bl sub_02021D6C + ldr r0, [r5, #0x34] + add r1, r4, #0 + bl sub_02021E90 + ldr r0, [r5, #0x34] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #5 + blo _021DF690 + ldr r0, [sp, #0x1c] + add r4, r4, #1 + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, r0, #4 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r0, #0x14 + str r0, [sp, #0x14] + cmp r4, #2 + blo _021DF65C + ldr r0, [r7, #0x2c] + mov r1, #1 + bl sub_02021D0C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r3, #0x23 + ldr r0, [r7, #0x10] + add r1, sp, #0x24 + mov r2, #0x80 + lsl r3, r3, #4 + bl ov19_021D785C + str r0, [r7, #0x30] + mov r1, #3 + bl sub_02021D6C + ldr r0, [r7, #0x30] + mov r1, #2 + bl sub_02021E90 + ldr r0, _021DF72C ; =ov19_021DF930 + add r1, r7, #0 + mov r2, #1 + bl sub_0200D9E8 + mov r1, #0xe + lsl r1, r1, #6 + str r0, [r7, r1] + ldr r1, [sp, #0x20] + add r0, r7, #0 + bl ov19_021DF730 + add sp, #0x6c + pop {r4, r5, r6, r7, pc} + nop +_021DF728: .word 0x021E04E4 +_021DF72C: .word ov19_021DF930 + thumb_func_end ov19_021DF5D0 + + thumb_func_start ov19_021DF730 +ov19_021DF730: ; 0x021DF730 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + str r0, [sp, #8] + ldr r0, [r0, #4] + str r1, [sp, #0xc] + bl ov19_021D77D0 + add r5, r0, #0 + ldr r0, [sp, #8] + ldr r0, [r0, #0x14] + bl ov19_021DA80C + add r4, r0, #0 + ldr r0, [sp, #8] + ldr r0, [r0, #0x14] + bl ov19_021DA810 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, sp, #0x10 + add r1, sp, #0x34 + add r2, r5, #0 + add r3, r4, #0 + bl ov19_021D783C + mov r7, #0 + ldr r4, [sp, #8] + ldr r5, _021DF7C4 ; =0x021E04EC + add r6, r7, #0 +_021DF76C: + ldr r0, [sp, #0xc] + add r0, r0, r6 + str r0, [r4, #0x18] + add r0, sp, #0x34 + bl sub_020A818C + ldr r2, [r4, #0x18] + add r0, sp, #0x34 + mov r1, #2 + bl sub_020A81A8 + ldr r0, _021DF7C8 ; =0x04001000 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _021DF7CC ; =0x00300010 + mov r3, #2 + and r0, r1 + str r0, [sp, #0x54] + mov r0, #1 + sub r0, r0, r7 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #8] + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + ldr r0, [r0, #0x10] + add r1, sp, #0x10 + bl ov19_021D785C + mov r1, #0 + str r0, [r4, #0x20] + bl sub_02021CAC + mov r0, #2 + lsl r0, r0, #8 + add r7, r7, #1 + add r6, r6, r0 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #2 + blt _021DF76C + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF7C4: .word 0x021E04EC +_021DF7C8: .word 0x04001000 +_021DF7CC: .word 0x00300010 + thumb_func_end ov19_021DF730 + + thumb_func_start ov19_021DF7D0 +ov19_021DF7D0: ; 0x021DF7D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0xe + lsl r1, r1, #6 + str r0, [sp] + ldr r0, [r0, r1] + cmp r0, #0 + beq _021DF7E4 + bl sub_0200DA58 +_021DF7E4: + ldr r6, [sp] + mov r0, #0 + str r0, [sp, #4] + add r7, r6, #0 +_021DF7EC: + ldr r0, [r6, #0x20] + bl sub_02021BD4 + ldr r0, [r6, #0x28] + bl sub_02021BD4 + mov r4, #0 + add r5, r7, #0 +_021DF7FC: + ldr r0, [r5, #0x34] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _021DF7FC + ldr r0, [sp, #4] + add r6, r6, #4 + add r0, r0, #1 + add r7, #0x14 + str r0, [sp, #4] + cmp r0, #2 + blt _021DF7EC + ldr r0, [sp] + ldr r0, [r0, #0x30] + bl sub_02021BD4 + ldr r0, [sp] + ldr r0, [r0, #0x5c] + bl sub_020181C4 + ldr r0, [sp] + ldr r0, [r0, #0x64] + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DF7D0 + + thumb_func_start ov19_021DF834 +ov19_021DF834: ; 0x021DF834 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5F9C + add r4, r0, #0 + ldr r0, [r5, #8] + add r1, r4, #0 + bl ov19_021D5FAC + lsl r7, r4, #2 + add r6, r0, #0 + add r0, r5, r7 + ldr r4, [r0, #0x20] + ldr r0, [r6, #0] + str r0, [sp] + ldr r0, [r5, #8] + bl ov19_021D5E34 + cmp r0, #0 + beq _021DF8BC + ldrh r0, [r6, #4] + ldrb r1, [r6, #7] + ldrb r2, [r6, #6] + bl sub_02079EDC + add r6, r0, #0 + ldr r0, [sp] + bl sub_02079D40 + add r2, r0, #0 + add r1, r5, #0 + mov r3, #0xa + ldr r0, [r5, #0x14] + add r1, #0xe8 + lsl r3, r3, #6 + bl ov19_021DA744 + add r0, r5, #0 + add r0, #0xe8 + add r1, sp, #4 + bl sub_020A7118 + ldr r0, [sp, #4] + mov r1, #2 + ldr r0, [r0, #0x14] + lsl r1, r1, #8 + bl sub_020C2C54 + ldr r0, [sp, #4] + add r1, r5, r7 + mov r2, #2 + ldr r0, [r0, #0x14] + ldr r1, [r1, #0x18] + lsl r2, r2, #8 + bl sub_020C0314 + add r0, r4, #0 + add r1, r6, #4 + bl sub_02021E90 + add r0, r4, #0 + mov r1, #1 + bl sub_02021CAC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_021DF8BC: + add r0, r4, #0 + mov r1, #0 + bl sub_02021CAC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov19_021DF834 + + thumb_func_start ov19_021DF8C8 +ov19_021DF8C8: ; 0x021DF8C8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #8] + bl ov19_021D5F9C + add r6, r0, #0 + add r1, r5, #0 + add r1, #0x78 + lsl r0, r6, #4 + add r4, r1, r0 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #8] + bl ov19_021D5E34 + cmp r0, #0 + beq _021DF922 + ldr r0, [r5, #8] + add r1, r6, #0 + bl ov19_021D5FAC + add r5, r0, #0 + mov r0, #0 + ldr r1, [r5, #0x28] + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021DF92C ; =0x000F0E00 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r5, #0x28] + add r0, r4, #0 + bl sub_0201D78C +_021DF922: + add r0, r4, #0 + bl sub_0201ACCC + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DF92C: .word 0x000F0E00 + thumb_func_end ov19_021DF8C8 + + thumb_func_start ov19_021DF930 +ov19_021DF930: ; 0x021DF930 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #8] + bl ov19_021D5FC0 + add r4, r0, #0 + ldr r0, [r5, #0x30] + bl sub_02021E24 + cmp r0, #3 + bne _021DF954 + cmp r4, #0 + beq _021DF960 + ldr r0, [r5, #0x30] + mov r1, #4 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021DF954: + cmp r4, #0 + bne _021DF960 + ldr r0, [r5, #0x30] + mov r1, #3 + bl sub_02021D6C +_021DF960: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DF930 + + .rodata + + + .global Unk_ov19_021E04E4 +Unk_ov19_021E04E4: ; 0x021E04E4 + .incbin "incbin/overlay19_rodata.bin", 0x6F4, 0x6FC - 0x6F4 + + .global Unk_ov19_021E04EC +Unk_ov19_021E04EC: ; 0x021E04EC + .incbin "incbin/overlay19_rodata.bin", 0x6FC, 0x704 - 0x6FC + + .global Unk_ov19_021E04F4 +Unk_ov19_021E04F4: ; 0x021E04F4 + .incbin "incbin/overlay19_rodata.bin", 0x704, 0x714 - 0x704 + + .global Unk_ov19_021E0504 +Unk_ov19_021E0504: ; 0x021E0504 + .incbin "incbin/overlay19_rodata.bin", 0x714, 0x724 - 0x714 + + .global Unk_ov19_021E0514 +Unk_ov19_021E0514: ; 0x021E0514 + .incbin "incbin/overlay19_rodata.bin", 0x724, 0x734 - 0x724 + + .global Unk_ov19_021E0524 +Unk_ov19_021E0524: ; 0x021E0524 + .incbin "incbin/overlay19_rodata.bin", 0x734, 0x74C - 0x734 + + .global Unk_ov19_021E053C +Unk_ov19_021E053C: ; 0x021E053C + .incbin "incbin/overlay19_rodata.bin", 0x74C, 0x50 + diff --git a/asm/ov19_021DF964.s b/asm/ov19_021DF964.s new file mode 100644 index 000000000..67946f20c --- /dev/null +++ b/asm/ov19_021DF964.s @@ -0,0 +1,607 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov19_021DF964 +ov19_021DF964: ; 0x021DF964 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r4, #0x74 + add r0, r4, #0 + add r5, r1, #0 + bl ov19_021DFCF8 + add r0, r4, #0 + mov r1, #0x36 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x37 + bl ov19_021DFD08 + add r0, r4, #0 + add r0, #0x20 + strb r5, [r0] + mov r0, #0 + add r4, #0x23 + strb r0, [r4] + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DF964 + + thumb_func_start ov19_021DF990 +ov19_021DF990: ; 0x021DF990 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #0x74 + add r0, r4, #0 + bl ov19_021DFCF8 + add r0, r4, #0 + mov r1, #1 + add r0, #0x23 + strb r1, [r0] + add r0, r5, #0 + bl ov19_021D5E08 + cmp r0, #4 + bhi _021DF9C6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DF9BC: ; jump table + .short _021DFA3C - _021DF9BC - 2 ; case 0 + .short _021DFA66 - _021DF9BC - 2 ; case 1 + .short _021DF9C6 - _021DF9BC - 2 ; case 2 + .short _021DF9C6 - _021DF9BC - 2 ; case 3 + .short _021DFA90 - _021DF9BC - 2 ; case 4 +_021DF9C6: + add r0, r5, #0 + bl ov19_021D5E38 + cmp r0, #2 + bne _021DF9E8 + add r0, r5, #0 + bl ov19_021D5E34 + cmp r0, #0 + beq _021DF9DE + mov r1, #0x24 + b _021DF9E0 +_021DF9DE: + mov r1, #0x23 +_021DF9E0: + add r0, r4, #0 + bl ov19_021DFD08 + b _021DF9F0 +_021DF9E8: + add r0, r4, #0 + mov r1, #0x22 + bl ov19_021DFD08 +_021DF9F0: + add r0, r4, #0 + mov r1, #0x25 + bl ov19_021DFD08 + add r0, r5, #0 + bl ov19_021D5E70 + ldrb r0, [r0, #0xf] + cmp r0, #0 + bne _021DFA0C + add r0, r4, #0 + mov r1, #0x28 + bl ov19_021DFD08 +_021DFA0C: + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021DFA1A + mov r1, #0x26 + b _021DFA1C +_021DFA1A: + mov r1, #0x27 +_021DFA1C: + add r0, r4, #0 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x29 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2a + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2b + bl ov19_021DFD08 + pop {r3, r4, r5, pc} +_021DFA3C: + add r0, r4, #0 + mov r1, #0x27 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x25 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x29 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2a + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2b + bl ov19_021DFD08 + pop {r3, r4, r5, pc} +_021DFA66: + add r0, r4, #0 + mov r1, #0x26 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x25 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x29 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2a + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2b + bl ov19_021DFD08 + pop {r3, r4, r5, pc} +_021DFA90: + add r0, r5, #0 + bl ov19_021D5F9C + cmp r0, #0 + bne _021DFA9E + mov r1, #0x34 + b _021DFAA0 +_021DFA9E: + mov r1, #0x35 +_021DFAA0: + add r0, r4, #0 + bl ov19_021DFD08 + add r0, r5, #0 + bl ov19_021D5E10 + cmp r0, #0 + bne _021DFAB4 + mov r1, #0x26 + b _021DFAB6 +_021DFAB4: + mov r1, #0x27 +_021DFAB6: + add r0, r4, #0 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x29 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2b + bl ov19_021DFD08 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DF990 + + thumb_func_start ov19_021DFAD0 +ov19_021DFAD0: ; 0x021DFAD0 + push {r4, r5, r6, lr} + add r4, r0, #0 + add r5, r4, #0 + add r5, #0x74 + bl ov19_021D5F7C + add r6, r0, #0 + add r0, r4, #0 + bl ov19_021D5E74 + add r4, r0, #0 + add r0, r5, #0 + bl ov19_021DFCF8 + add r0, r5, #0 + mov r1, #1 + add r0, #0x23 + strb r1, [r0] + cmp r6, #0 + beq _021DFB20 + cmp r4, #0 + beq _021DFB06 + add r0, r5, #0 + mov r1, #0x31 + bl ov19_021DFD08 + b _021DFB0E +_021DFB06: + add r0, r5, #0 + mov r1, #0x2e + bl ov19_021DFD08 +_021DFB0E: + add r0, r5, #0 + mov r1, #0x32 + bl ov19_021DFD08 + add r0, r5, #0 + mov r1, #0x30 + bl ov19_021DFD08 + b _021DFB46 +_021DFB20: + cmp r4, #0 + beq _021DFB3E + add r0, r5, #0 + mov r1, #0x2f + bl ov19_021DFD08 + add r0, r5, #0 + mov r1, #0x32 + bl ov19_021DFD08 + add r0, r5, #0 + mov r1, #0x30 + bl ov19_021DFD08 + b _021DFB46 +_021DFB3E: + add r0, r5, #0 + mov r1, #0x2e + bl ov19_021DFD08 +_021DFB46: + add r0, r5, #0 + mov r1, #0x33 + bl ov19_021DFD08 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DFAD0 + + thumb_func_start ov19_021DFB50 +ov19_021DFB50: ; 0x021DFB50 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #0x74 + bl ov19_021D5E90 + add r0, r4, #0 + bl ov19_021DFCF8 + add r0, r4, #0 + mov r1, #0 + bl ov19_021DFD08 + add r0, r5, #0 + bl ov19_021D5E08 + cmp r0, #4 + beq _021DFB84 + add r0, r4, #0 + mov r1, #1 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #2 + bl ov19_021DFD08 +_021DFB84: + add r0, r4, #0 + mov r1, #3 + bl ov19_021DFD08 + mov r0, #2 + add r4, #0x23 + strb r0, [r4] + pop {r3, r4, r5, pc} + thumb_func_end ov19_021DFB50 + + thumb_func_start ov19_021DFB94 +ov19_021DFB94: ; 0x021DFB94 + push {r4, r5, r6, lr} + add r4, r0, #0 + add r4, #0x74 + add r5, r1, #0 + bl ov19_021D5E90 + add r6, r0, #0 + add r0, r4, #0 + bl ov19_021DFCF8 + add r0, r4, #0 + mov r1, #4 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #5 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #6 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #7 + bl ov19_021DFD08 + add r0, r6, #0 + bl sub_02079D20 + add r6, r0, #0 + beq _021DFBDA + add r0, r4, #0 + mov r1, #8 + bl ov19_021DFD08 +_021DFBDA: + cmp r6, #4 + bls _021DFBE6 + add r0, r4, #0 + mov r1, #9 + bl ov19_021DFD08 +_021DFBE6: + add r0, r4, #0 + mov r1, #3 + add r0, #0x23 + strb r1, [r0] + cmp r5, #4 + blt _021DFBFE + cmp r5, #9 + bgt _021DFBFE + sub r0, r5, #4 + add r4, #0x20 + strb r0, [r4] + pop {r4, r5, r6, pc} +_021DFBFE: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov19_021DFB94 + + thumb_func_start ov19_021DFC04 +ov19_021DFC04: ; 0x021DFC04 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r6, #0x74 + add r5, r1, #0 + bl ov19_021D5E90 + str r0, [sp] + add r0, r6, #0 + bl ov19_021DFCF8 + cmp r5, #4 + blt _021DFC3C + cmp r5, #7 + bgt _021DFC3C + sub r0, r5, #4 + ldr r1, _021DFC7C ; =0x021E058C + lsl r0, r0, #3 + mov r5, #0 + add r4, r1, r0 +_021DFC2A: + ldrh r1, [r4] + add r0, r6, #0 + bl ov19_021DFD08 + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _021DFC2A + b _021DFC72 +_021DFC3C: + mov r4, #0 + add r7, r4, #0 + cmp r5, #9 + bne _021DFC46 + mov r4, #4 +_021DFC46: + mov r5, #0 +_021DFC48: + ldr r0, [sp] + add r1, r5, #0 + bl sub_02079CFC + cmp r0, #0 + beq _021DFC6C + cmp r4, #0 + beq _021DFC5C + sub r4, r4, #1 + b _021DFC6C +_021DFC5C: + add r1, r5, #0 + add r0, r6, #0 + add r1, #0x1a + bl ov19_021DFD08 + add r7, r7, #1 + cmp r7, #4 + bge _021DFC72 +_021DFC6C: + add r5, r5, #1 + cmp r5, #8 + blt _021DFC48 +_021DFC72: + mov r0, #3 + add r6, #0x23 + strb r0, [r6] + pop {r3, r4, r5, r6, r7, pc} + nop +_021DFC7C: .word 0x021E058C + thumb_func_end ov19_021DFC04 + + thumb_func_start ov19_021DFC80 +ov19_021DFC80: ; 0x021DFC80 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #0x74 + add r0, r4, #0 + bl ov19_021DFCF8 + add r0, r4, #0 + mov r1, #4 + add r0, #0x23 + strb r1, [r0] + add r5, #0x57 + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x22 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0x38 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x39 + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x3a + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x3b + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x3c + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x3d + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2c + bl ov19_021DFD08 + add r0, r4, #0 + mov r1, #0x2d + bl ov19_021DFD08 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov19_021DFC80 + + thumb_func_start ov19_021DFCE4 +ov19_021DFCE4: ; 0x021DFCE4 + add r2, r0, #0 + add r2, #0x96 + ldrb r3, [r2] + mov r2, #1 + lsl r2, r1 + add r1, r3, #0 + eor r1, r2 + add r0, #0x96 + strb r1, [r0] + bx lr + thumb_func_end ov19_021DFCE4 + + thumb_func_start ov19_021DFCF8 +ov19_021DFCF8: ; 0x021DFCF8 + add r1, r0, #0 + mov r2, #0 + add r1, #0x21 + strb r2, [r1] + add r0, #0x20 + strb r2, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DFCF8 + + thumb_func_start ov19_021DFD08 +ov19_021DFD08: ; 0x021DFD08 + push {r3, r4} + add r2, r0, #0 + add r2, #0x21 + ldrb r4, [r2] + cmp r4, #8 + bhs _021DFD26 + add r2, r0, #0 + add r2, #0x21 + ldrb r2, [r2] + add r3, r2, #1 + add r2, r0, #0 + add r2, #0x21 + strb r3, [r2] + lsl r2, r4, #2 + str r1, [r0, r2] +_021DFD26: + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DFD08 + + thumb_func_start ov19_021DFD2C +ov19_021DFD2C: ; 0x021DFD2C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, _021DFDD4 ; =0x021BF67C + add r4, #0x74 + ldr r1, [r0, #0x48] + mov r0, #0x40 + add r2, r1, #0 + tst r2, r0 + beq _021DFD6C + add r2, r4, #0 + add r2, #0x20 + ldrb r2, [r2] + cmp r2, #0 + beq _021DFD58 + add r1, r4, #0 + add r1, #0x20 + ldrb r1, [r1] + add r4, #0x20 + sub r0, #0x42 + sub r1, r1, #1 + strb r1, [r4] + pop {r3, r4, r5, pc} +_021DFD58: + add r2, r4, #0 + add r2, #0x21 + ldrb r2, [r2] + cmp r2, #3 + blo _021DFD6C + sub r1, r2, #1 + add r4, #0x20 + strb r1, [r4] + sub r0, #0x42 + pop {r3, r4, r5, pc} +_021DFD6C: + mov r0, #0x80 + add r2, r1, #0 + tst r2, r0 + beq _021DFDA4 + add r2, r4, #0 + add r2, #0x21 + ldrb r5, [r2] + add r2, r4, #0 + add r2, #0x20 + ldrb r3, [r2] + sub r2, r5, #1 + cmp r3, r2 + bge _021DFD96 + add r1, r4, #0 + add r1, #0x20 + ldrb r1, [r1] + add r4, #0x20 + sub r0, #0x82 + add r1, r1, #1 + strb r1, [r4] + pop {r3, r4, r5, pc} +_021DFD96: + cmp r5, #3 + blo _021DFDA4 + mov r0, #0 + add r4, #0x20 + strb r0, [r4] + sub r0, r0, #2 + pop {r3, r4, r5, pc} +_021DFDA4: + mov r0, #2 + tst r0, r1 + beq _021DFDB6 + ldr r0, _021DFDD8 ; =0x000005DD + bl sub_02005748 + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, pc} +_021DFDB6: + mov r0, #1 + tst r1, r0 + beq _021DFDCE + ldr r0, _021DFDD8 ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + lsl r0, r0, #2 + ldr r0, [r4, r0] + pop {r3, r4, r5, pc} +_021DFDCE: + sub r0, r0, #4 + pop {r3, r4, r5, pc} + nop +_021DFDD4: .word 0x021BF67C +_021DFDD8: .word 0x000005DD + thumb_func_end ov19_021DFD2C + + thumb_func_start ov19_021DFDDC +ov19_021DFDDC: ; 0x021DFDDC + add r0, #0x74 + add r1, r0, #0 + add r1, #0x20 + ldrb r1, [r1] + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov19_021DFDDC + + thumb_func_start ov19_021DFDEC +ov19_021DFDEC: ; 0x021DFDEC + ldr r0, [r0, #0x74] + bx lr + thumb_func_end ov19_021DFDEC + + .rodata + + + .global Unk_ov19_021E058C +Unk_ov19_021E058C: ; 0x021E058C + .incbin "incbin/overlay19_rodata.bin", 0x79C, 0x20 + diff --git a/asm/overlay1.s b/asm/ov1_021D0D80.s similarity index 69% rename from asm/overlay1.s rename to asm/ov1_021D0D80.s index 8dbcd2399..bfeaa4325 100644 --- a/asm/overlay1.s +++ b/asm/ov1_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov1_021D0D80 ov1_021D0D80: ; 0x021D0D80 ldr r0, _021D0D8C ; =0x021D0DA0 @@ -14,11 +17,17 @@ ov1_021D0D80: ; 0x021D0D80 _021D0D8C: .word 0x021D0DA0 thumb_func_end ov1_021D0D80 - .section .sinit, 4 .word ov1_021D0D80 - .bss - .space 0x20 + + .global Unk_ov1_021D0DA0 +Unk_ov1_021D0DA0: ; 0x021D0DA0 + .space 0x4 + + .global Unk_ov1_021D0DA4 +Unk_ov1_021D0DA4: ; 0x021D0DA4 + .space 0x4 + diff --git a/asm/ov20_021D0D80.s b/asm/ov20_021D0D80.s new file mode 100644 index 000000000..2ae190eab --- /dev/null +++ b/asm/ov20_021D0D80.s @@ -0,0 +1,2658 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D0D80 +ov20_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0 + beq _021D0D92 + cmp r1, #1 + beq _021D0DCA + b _021D0DF2 +_021D0D92: + mov r1, #0 + mov r0, #0x3e + add r2, r1, #0 + bl sub_02004550 + mov r2, #2 + mov r0, #3 + mov r1, #0x22 + lsl r2, r2, #0xe + bl sub_02017FC8 + mov r2, #0xa + mov r0, #3 + mov r1, #0x23 + lsl r2, r2, #0xe + bl sub_02017FC8 + add r0, r5, #0 + bl ov20_021D0EC8 + ldr r0, [r0, #0x14] + mov r1, #0 + bl ov20_021D21A0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D0DF2 +_021D0DCA: + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D0DF2 + ldr r0, [r4, #4] + cmp r0, #2 + bne _021D0DE8 + ldr r0, [r4, #0x14] + bl ov20_021D2DF4 + b _021D0DEA +_021D0DE8: + mov r0, #0 +_021D0DEA: + add r4, #0x64 + strb r0, [r4] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D0DF2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D0D80 + + thumb_func_start ov20_021D0DF8 +ov20_021D0DF8: ; 0x021D0DF8 + push {r4, lr} + bl sub_0200682C + add r4, r0, #0 + ldr r0, _021D0E34 ; =0x021BF67C + ldr r1, [r0, #0x48] + strh r1, [r4, #0x30] + ldr r1, [r0, #0x44] + strh r1, [r4, #0x32] + ldr r0, [r0, #0x4c] + strh r0, [r4, #0x34] + ldr r0, [r4, #0x40] + bl sub_0202404C + ldr r2, [r4, #0x2c] + cmp r2, #0 + beq _021D0E26 + add r0, r4, #0 + add r4, #0x28 + add r1, r4, #0 + blx r2 + mov r0, #0 + pop {r4, pc} +_021D0E26: + add r1, r4, #0 + ldr r2, [r4, #0x20] + add r0, r4, #0 + add r1, #0x1c + blx r2 + pop {r4, pc} + nop +_021D0E34: .word 0x021BF67C + thumb_func_end ov20_021D0DF8 + + thumb_func_start ov20_021D0E38 +ov20_021D0E38: ; 0x021D0E38 + push {r4, lr} + add r4, r2, #0 + cmp r1, #3 + bhi _021D0EA0 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D0E4C: ; jump table + .short _021D0E54 - _021D0E4C - 2 ; case 0 + .short _021D0E74 - _021D0E4C - 2 ; case 1 + .short _021D0E96 - _021D0E4C - 2 ; case 2 + .short _021D0E74 - _021D0E4C - 2 ; case 3 +_021D0E54: + str r0, [r4, #0x38] + cmp r0, #2 + beq _021D0E60 + cmp r0, #3 + beq _021D0E6A + pop {r4, pc} +_021D0E60: + ldr r0, [r4, #0x14] + mov r1, #0x19 + bl ov20_021D21A0 + pop {r4, pc} +_021D0E6A: + ldr r0, [r4, #0x14] + mov r1, #0x1a + bl ov20_021D21A0 + pop {r4, pc} +_021D0E74: + cmp r0, #2 + beq _021D0E7E + cmp r0, #3 + beq _021D0E88 + b _021D0E90 +_021D0E7E: + ldr r0, [r4, #0x14] + mov r1, #0x1b + bl ov20_021D21A0 + b _021D0E90 +_021D0E88: + ldr r0, [r4, #0x14] + mov r1, #0x1c + bl ov20_021D21A0 +_021D0E90: + mov r0, #4 + str r0, [r4, #0x38] + pop {r4, pc} +_021D0E96: + sub r1, r0, #2 + cmp r1, #1 + bhi _021D0EA4 + str r0, [r4, #0x38] + pop {r4, pc} +_021D0EA0: + mov r0, #4 + str r0, [r4, #0x38] +_021D0EA4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D0E38 + + thumb_func_start ov20_021D0EA8 +ov20_021D0EA8: ; 0x021D0EA8 + push {r4, lr} + add r4, r0, #0 + bl sub_0200682C + add r1, r4, #0 + bl ov20_021D1014 + mov r0, #0x22 + bl sub_0201807C + mov r0, #0x23 + bl sub_0201807C + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D0EA8 + + thumb_func_start ov20_021D0EC8 +ov20_021D0EC8: ; 0x021D0EC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x68 + mov r2, #0x22 + bl sub_0200681C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + str r0, [r4, #0] + bl sub_02097550 + str r0, [r4, #4] + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0] + add r1, #0x10 + add r2, #8 + bl sub_0209756C + ldr r0, [r4, #4] + cmp r0, #2 + bne _021D0F04 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x60 + add r1, #8 + bl ov20_021D0F64 +_021D0F04: + ldr r1, [r4, #0] + mov r0, #0x22 + bl sub_020998EC + str r0, [r4, #0x18] + ldr r1, [r4, #0x18] + add r0, r4, #0 + bl ov20_021D2098 + str r0, [r4, #0x14] + mov r0, #0x22 + str r0, [sp] + ldr r0, _021D0F54 ; =0x021D5154 + ldr r2, _021D0F58 ; =ov20_021D0E38 + mov r1, #5 + add r3, r4, #0 + bl sub_02023FCC + str r0, [r4, #0x40] + mov r1, #0 + str r1, [r4, #0x44] + add r0, r4, #0 + str r1, [r4, #0x48] + add r0, #0x65 + strb r1, [r0] + str r1, [r4, #0x2c] + ldr r0, _021D0F5C ; =ov20_021D103C + str r1, [r4, #0x28] + str r0, [r4, #0x20] + add r0, r4, #0 + str r1, [r4, #0x1c] + add r0, #0x4e + strh r1, [r0] + ldr r1, _021D0F60 ; =ov20_021D1C5C + add r0, r4, #0 + bl ov20_021D1C4C + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_021D0F54: .word 0x021D5154 +_021D0F58: .word ov20_021D0E38 +_021D0F5C: .word ov20_021D103C +_021D0F60: .word ov20_021D1C5C + thumb_func_end ov20_021D0EC8 + + thumb_func_start ov20_021D0F64 +ov20_021D0F64: ; 0x021D0F64 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02014C80 + strh r0, [r5] + mov r0, #0 + ldrsh r0, [r5, r0] + bl sub_02014CD4 + strb r0, [r5, #3] + add r0, r4, #0 + bl sub_02014C84 + strb r0, [r5, #2] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D0F64 + + thumb_func_start ov20_021D0F88 +ov20_021D0F88: ; 0x021D0F88 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + add r4, r1, #0 + ldrsb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, #2] + ldrsb r1, [r5, r0] + mov r0, #3 + ldrsb r0, [r5, r0] + cmp r1, r0 + blt _021D0FBC + mov r1, #0 + strb r1, [r5, #2] + ldrsh r0, [r5, r1] + add r0, r0, #1 + strh r0, [r5] + ldrsh r0, [r5, r1] + cmp r0, #5 + blt _021D0FB2 + strh r1, [r5] +_021D0FB2: + mov r0, #0 + ldrsh r0, [r5, r0] + bl sub_02014CD4 + strb r0, [r5, #3] +_021D0FBC: + mov r1, #0 + mov r2, #2 + ldrsh r1, [r5, r1] + ldrsb r2, [r5, r2] + add r0, r4, #0 + bl sub_02014CE0 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D0F88 + + thumb_func_start ov20_021D0FCC +ov20_021D0FCC: ; 0x021D0FCC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + add r4, r1, #0 + ldrsb r1, [r5, r0] + sub r1, r1, #1 + strb r1, [r5, #2] + ldrsb r0, [r5, r0] + cmp r0, #0 + bge _021D1004 + mov r0, #0 + ldrsh r1, [r5, r0] + sub r1, r1, #1 + strh r1, [r5] + ldrsh r0, [r5, r0] + cmp r0, #0 + bge _021D0FF2 + mov r0, #4 + strh r0, [r5] +_021D0FF2: + mov r0, #0 + ldrsh r0, [r5, r0] + bl sub_02014CD4 + strb r0, [r5, #3] + mov r0, #3 + ldrsb r0, [r5, r0] + sub r0, r0, #1 + strb r0, [r5, #2] +_021D1004: + mov r1, #0 + mov r2, #2 + ldrsh r1, [r5, r1] + ldrsb r2, [r5, r2] + add r0, r4, #0 + bl sub_02014CE0 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D0FCC + + thumb_func_start ov20_021D1014 +ov20_021D1014: ; 0x021D1014 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x40] + add r4, r1, #0 + bl sub_02024034 + ldr r0, [r5, #0x14] + bl ov20_021D2128 + ldr r0, [r5, #0x18] + bl sub_0209992C + add r0, r4, #0 + bl sub_02006830 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D1014 + + thumb_func_start ov20_021D1034 +ov20_021D1034: ; 0x021D1034 + str r1, [r0, #0x20] + mov r1, #0 + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov20_021D1034 + + thumb_func_start ov20_021D103C +ov20_021D103C: ; 0x021D103C + push {r3, lr} + ldr r2, [r0, #4] + lsl r3, r2, #2 + ldr r2, _021D104C ; =0x021D5148 + ldr r2, [r2, r3] + blx r2 + pop {r3, pc} + nop +_021D104C: .word 0x021D5148 + thumb_func_end ov20_021D103C + + thumb_func_start ov20_021D1050 +ov20_021D1050: ; 0x021D1050 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D1066 + cmp r0, #1 + beq _021D10F0 + cmp r0, #2 + beq _021D1104 + b _021D1116 +_021D1066: + ldr r1, [r5, #0x38] + cmp r1, #0 + bne _021D1076 + add r0, r5, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + bne _021D108C +_021D1076: + cmp r1, #1 + bne _021D1084 + add r0, r5, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #1 + bne _021D108C +_021D1084: + ldrh r0, [r5, #0x30] + mov r1, #4 + tst r1, r0 + beq _021D1096 +_021D108C: + ldr r1, _021D111C ; =ov20_021D1F38 + add r0, r5, #0 + bl ov20_021D1C4C + b _021D1116 +_021D1096: + mov r1, #0x88 + tst r1, r0 + beq _021D10B8 + ldr r0, _021D1120 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + add r0, #0x4c + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #4 + bl ov20_021D21A0 + mov r0, #1 + str r0, [r4, #0] + b _021D1116 +_021D10B8: + mov r1, #2 + tst r1, r0 + beq _021D10CE + ldr r0, _021D1120 ; =0x000005DC + bl sub_02005748 + ldr r1, _021D1124 ; =ov20_021D1DBC + add r0, r5, #0 + bl ov20_021D1C4C + b _021D1116 +_021D10CE: + mov r1, #1 + tst r0, r1 + beq _021D1116 + ldr r0, _021D1120 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #6 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r4, #0] + b _021D1116 +_021D10F0: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1116 + ldr r1, _021D1128 ; =ov20_021D1468 + add r0, r5, #0 + bl ov20_021D1034 + b _021D1116 +_021D1104: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1116 + ldr r1, _021D112C ; =ov20_021D15A0 + add r0, r5, #0 + bl ov20_021D1034 +_021D1116: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D111C: .word ov20_021D1F38 +_021D1120: .word 0x000005DC +_021D1124: .word ov20_021D1DBC +_021D1128: .word ov20_021D1468 +_021D112C: .word ov20_021D15A0 + thumb_func_end ov20_021D1050 + + thumb_func_start ov20_021D1130 +ov20_021D1130: ; 0x021D1130 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D1146 + cmp r0, #1 + beq _021D1220 + cmp r0, #2 + beq _021D1234 + b _021D1246 +_021D1146: + ldr r1, [r5, #0x38] + cmp r1, #0 + bne _021D1156 + add r0, r5, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + bne _021D116C +_021D1156: + cmp r1, #1 + bne _021D1164 + add r0, r5, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #1 + bne _021D116C +_021D1164: + ldrh r0, [r5, #0x30] + mov r1, #4 + tst r1, r0 + beq _021D1176 +_021D116C: + ldr r1, _021D124C ; =ov20_021D1F38 + add r0, r5, #0 + bl ov20_021D1C4C + b _021D1246 +_021D1176: + mov r1, #0x88 + tst r1, r0 + beq _021D1198 + ldr r0, _021D1250 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + add r0, #0x4c + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #4 + bl ov20_021D21A0 + mov r0, #1 + str r0, [r4, #0] + b _021D1246 +_021D1198: + mov r1, #0x20 + tst r1, r0 + beq _021D11C0 + add r0, r5, #0 + add r0, #0x4e + ldrh r0, [r0] + cmp r0, #0 + beq _021D1246 + ldr r0, _021D1250 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + add r0, #0x4e + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #0xc + bl ov20_021D21A0 + b _021D1246 +_021D11C0: + mov r1, #0x10 + tst r1, r0 + beq _021D11E8 + add r0, r5, #0 + add r0, #0x4e + ldrh r0, [r0] + cmp r0, #0 + bne _021D1246 + ldr r0, _021D1250 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #1 + add r0, #0x4e + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #0xc + bl ov20_021D21A0 + b _021D1246 +_021D11E8: + mov r1, #2 + tst r1, r0 + beq _021D11FE + ldr r0, _021D1250 ; =0x000005DC + bl sub_02005748 + ldr r1, _021D1254 ; =ov20_021D1DBC + add r0, r5, #0 + bl ov20_021D1C4C + b _021D1246 +_021D11FE: + mov r1, #1 + tst r0, r1 + beq _021D1246 + ldr r0, _021D1250 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #6 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r4, #0] + b _021D1246 +_021D1220: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1246 + ldr r1, _021D1258 ; =ov20_021D1468 + add r0, r5, #0 + bl ov20_021D1034 + b _021D1246 +_021D1234: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1246 + ldr r1, _021D125C ; =ov20_021D15A0 + add r0, r5, #0 + bl ov20_021D1034 +_021D1246: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D124C: .word ov20_021D1F38 +_021D1250: .word 0x000005DC +_021D1254: .word ov20_021D1DBC +_021D1258: .word ov20_021D1468 +_021D125C: .word ov20_021D15A0 + thumb_func_end ov20_021D1130 + + thumb_func_start ov20_021D1260 +ov20_021D1260: ; 0x021D1260 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #4 + bhi _021D12DC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D1278: ; jump table + .short _021D1282 - _021D1278 - 2 ; case 0 + .short _021D1292 - _021D1278 - 2 ; case 1 + .short _021D1416 - _021D1278 - 2 ; case 2 + .short _021D1428 - _021D1278 - 2 ; case 3 + .short _021D143C - _021D1278 - 2 ; case 4 +_021D1282: + ldr r0, [r4, #0x14] + bl ov20_021D2DF4 + add r1, r4, #0 + add r1, #0x64 + strb r0, [r1] + mov r0, #1 + str r0, [r5, #0] +_021D1292: + ldr r1, [r4, #0x38] + cmp r1, #0 + bne _021D12A2 + add r0, r4, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + bne _021D12B8 +_021D12A2: + cmp r1, #1 + bne _021D12B0 + add r0, r4, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #1 + bne _021D12B8 +_021D12B0: + ldrh r0, [r4, #0x30] + mov r1, #4 + tst r1, r0 + beq _021D12C2 +_021D12B8: + ldr r1, _021D1454 ; =ov20_021D1F38 + add r0, r4, #0 + bl ov20_021D1C4C + b _021D144E +_021D12C2: + mov r1, #0x40 + tst r1, r0 + beq _021D12FC + add r0, r4, #0 + add r0, #0x64 + ldrb r0, [r0] + cmp r0, #0 + beq _021D12DC + add r0, r4, #0 + add r0, #0x4e + ldrh r0, [r0] + cmp r0, #0 + bne _021D12DE +_021D12DC: + b _021D144E +_021D12DE: + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + add r0, #0x4e + ldrh r0, [r0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x4e + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #0xc + bl ov20_021D21A0 + b _021D144E +_021D12FC: + mov r1, #0x80 + tst r0, r1 + beq _021D134C + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + add r0, #0x64 + ldrb r2, [r0] + cmp r2, #0 + beq _021D1336 + add r0, r4, #0 + add r0, #0x4e + ldrh r1, [r0] + sub r0, r2, #1 + cmp r1, r0 + bge _021D1336 + add r0, r4, #0 + add r0, #0x4e + ldrh r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x4e + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #0xc + bl ov20_021D21A0 + b _021D134C +_021D1336: + add r0, r4, #0 + mov r1, #0 + add r0, #0x4c + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #4 + bl ov20_021D21A0 + mov r0, #3 + str r0, [r5, #0] + b _021D144E +_021D134C: + ldrh r1, [r4, #0x30] + mov r0, #8 + tst r0, r1 + bne _021D1366 + mov r0, #1 + add r2, r1, #0 + and r2, r0 + beq _021D1382 + add r0, r4, #0 + add r0, #0x64 + ldrb r0, [r0] + cmp r0, #0 + bne _021D1382 +_021D1366: + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + add r0, #0x4c + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #4 + bl ov20_021D21A0 + mov r0, #3 + str r0, [r5, #0] + b _021D144E +_021D1382: + ldrh r0, [r4, #0x34] + mov r3, #0x20 + tst r3, r0 + beq _021D13B2 + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + add r0, #0x4e + strh r1, [r0] + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x60 + add r1, #8 + bl ov20_021D0FCC + ldr r0, [r4, #0x14] + mov r1, #3 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r5, #0] + b _021D144E +_021D13B2: + mov r3, #0x10 + tst r0, r3 + beq _021D13E0 + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + add r0, #0x4e + strh r1, [r0] + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x60 + add r1, #8 + bl ov20_021D0F88 + ldr r0, [r4, #0x14] + mov r1, #3 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r5, #0] + b _021D144E +_021D13E0: + mov r0, #2 + tst r0, r1 + beq _021D13F6 + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + ldr r1, _021D145C ; =ov20_021D1DBC + add r0, r4, #0 + bl ov20_021D1C4C + b _021D144E +_021D13F6: + cmp r2, #0 + beq _021D144E + ldr r0, _021D1458 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #6 + bl ov20_021D21A0 + mov r0, #4 + str r0, [r5, #0] + b _021D144E +_021D1416: + ldr r0, [r4, #0x14] + mov r1, #3 + bl ov20_021D2210 + cmp r0, #0 + beq _021D144E + mov r0, #0 + str r0, [r5, #0] + b _021D144E +_021D1428: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D144E + ldr r1, _021D1460 ; =ov20_021D1468 + add r0, r4, #0 + bl ov20_021D1034 + b _021D144E +_021D143C: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D144E + ldr r1, _021D1464 ; =ov20_021D15A0 + add r0, r4, #0 + bl ov20_021D1034 +_021D144E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D1454: .word ov20_021D1F38 +_021D1458: .word 0x000005DC +_021D145C: .word ov20_021D1DBC +_021D1460: .word ov20_021D1468 +_021D1464: .word ov20_021D15A0 + thumb_func_end ov20_021D1260 + + thumb_func_start ov20_021D1468 +ov20_021D1468: ; 0x021D1468 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #5 + bls _021D1476 + b _021D1588 +_021D1476: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D1482: ; jump table + .short _021D148E - _021D1482 - 2 ; case 0 + .short _021D1558 - _021D1482 - 2 ; case 1 + .short _021D1564 - _021D1482 - 2 ; case 2 + .short _021D1570 - _021D1482 - 2 ; case 3 + .short _021D1570 - _021D1482 - 2 ; case 4 + .short _021D1576 - _021D1482 - 2 ; case 5 +_021D148E: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1588 + ldr r1, [r4, #0x38] + cmp r1, #0 + bne _021D14A8 + add r0, r4, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + bne _021D14BE +_021D14A8: + cmp r1, #1 + bne _021D14B6 + add r0, r4, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #1 + bne _021D14BE +_021D14B6: + ldrh r0, [r4, #0x30] + mov r1, #4 + tst r1, r0 + beq _021D14C8 +_021D14BE: + ldr r1, _021D158C ; =ov20_021D1F38 + add r0, r4, #0 + bl ov20_021D1C4C + b _021D1588 +_021D14C8: + mov r1, #0x30 + tst r1, r0 + beq _021D14EE + ldr r0, _021D1590 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + add r0, #0x4c + ldrh r1, [r0] + mov r0, #1 + eor r1, r0 + add r0, r4, #0 + add r0, #0x4c + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #0xd + bl ov20_021D21A0 + b _021D1588 +_021D14EE: + mov r1, #8 + tst r1, r0 + beq _021D150C + ldr r0, _021D1590 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + add r0, #0x4c + strh r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #0xd + bl ov20_021D21A0 + b _021D1588 +_021D150C: + mov r1, #0x40 + tst r1, r0 + beq _021D1526 + ldr r0, _021D1590 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #5 + bl ov20_021D21A0 + mov r0, #5 + str r0, [r5, #0] + b _021D1588 +_021D1526: + mov r1, #1 + tst r1, r0 + beq _021D1546 + ldr r0, _021D1590 ; =0x000005DC + bl sub_02005748 + add r4, #0x4c + ldrh r0, [r4] + cmp r0, #0 + bne _021D1540 + mov r0, #1 + str r0, [r5, #0] + b _021D1588 +_021D1540: + mov r0, #2 + str r0, [r5, #0] + b _021D1588 +_021D1546: + mov r1, #2 + tst r0, r1 + beq _021D1588 + ldr r0, _021D1590 ; =0x000005DC + bl sub_02005748 + mov r0, #2 + str r0, [r5, #0] + b _021D1588 +_021D1558: + mov r1, #3 + str r1, [r5, #0] + ldr r1, _021D1594 ; =ov20_021D1C90 + bl ov20_021D1C4C + b _021D1588 +_021D1564: + mov r1, #4 + str r1, [r5, #0] + ldr r1, _021D1598 ; =ov20_021D1DBC + bl ov20_021D1C4C + b _021D1588 +_021D1570: + mov r0, #0 + str r0, [r5, #0] + b _021D1588 +_021D1576: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1588 + ldr r1, _021D159C ; =ov20_021D103C + add r0, r4, #0 + bl ov20_021D1034 +_021D1588: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D158C: .word ov20_021D1F38 +_021D1590: .word 0x000005DC +_021D1594: .word ov20_021D1C90 +_021D1598: .word ov20_021D1DBC +_021D159C: .word ov20_021D103C + thumb_func_end ov20_021D1468 + + thumb_func_start ov20_021D15A0 +ov20_021D15A0: ; 0x021D15A0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D15B8 + cmp r0, #1 + beq _021D16AC + cmp r0, #2 + bne _021D15B6 + b _021D16C0 +_021D15B6: + b _021D16D0 +_021D15B8: + ldr r0, [r5, #0x14] + mov r1, #0xf + bl ov20_021D2210 + cmp r0, #0 + bne _021D15C6 + b _021D16D0 +_021D15C6: + ldr r1, [r5, #0x38] + cmp r1, #0 + bne _021D15D6 + add r0, r5, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + bne _021D15EC +_021D15D6: + cmp r1, #1 + bne _021D15E4 + add r0, r5, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #1 + bne _021D15EC +_021D15E4: + ldrh r0, [r5, #0x30] + mov r1, #4 + tst r1, r0 + beq _021D1618 +_021D15EC: + ldr r0, _021D16D4 ; =0x000005E4 + bl sub_02005748 + add r0, r5, #0 + add r0, #0x65 + ldrb r1, [r0] + mov r0, #1 + eor r1, r0 + add r0, r5, #0 + add r0, #0x65 + strb r1, [r0] + add r0, r5, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #0x18 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r4, #0] + b _021D16D0 +_021D1618: + mov r1, #2 + tst r1, r0 + beq _021D1636 + ldr r0, _021D16D8 ; =0x000005DC + bl sub_02005748 + ldr r0, [r5, #0x14] + mov r1, #7 + bl ov20_021D21A0 + ldr r0, _021D16DC ; =ov20_021D103C + str r0, [r5, #0x24] + mov r0, #1 + str r0, [r4, #0] + b _021D16D0 +_021D1636: + mov r1, #1 + tst r0, r1 + beq _021D1692 + add r0, r5, #0 + add r0, #0x50 + ldrh r0, [r0] + cmp r0, #0xfe + bne _021D165E + ldr r0, _021D16D8 ; =0x000005DC + bl sub_02005748 + ldr r0, [r5, #0x14] + mov r1, #7 + bl ov20_021D21A0 + ldr r0, _021D16DC ; =ov20_021D103C + str r0, [r5, #0x24] + mov r0, #1 + str r0, [r4, #0] + b _021D16D0 +_021D165E: + add r0, r5, #0 + bl ov20_021D16E8 + cmp r0, #0 + beq _021D168A + ldr r0, _021D16D8 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0x54 + add r1, r5, #0 + bl ov20_021D1884 + ldr r0, _021D16E0 ; =ov20_021D18E4 + mov r1, #8 + str r0, [r5, #0x24] + ldr r0, [r5, #0x14] + bl ov20_021D21A0 + mov r0, #1 + str r0, [r4, #0] + b _021D16D0 +_021D168A: + ldr r0, _021D16E4 ; =0x000005F2 + bl sub_02005748 + b _021D16D0 +_021D1692: + add r0, r5, #0 + bl ov20_021D1720 + cmp r0, #0 + beq _021D16D0 + ldr r0, _021D16D8 ; =0x000005DC + bl sub_02005748 + ldr r0, [r5, #0x14] + mov r1, #0xe + bl ov20_021D21A0 + b _021D16D0 +_021D16AC: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D16D0 + ldr r1, [r5, #0x24] + add r0, r5, #0 + bl ov20_021D1034 + b _021D16D0 +_021D16C0: + ldr r0, [r5, #0x14] + mov r1, #0x18 + bl ov20_021D2210 + cmp r0, #0 + beq _021D16D0 + mov r0, #0 + str r0, [r4, #0] +_021D16D0: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D16D4: .word 0x000005E4 +_021D16D8: .word 0x000005DC +_021D16DC: .word ov20_021D103C +_021D16E0: .word ov20_021D18E4 +_021D16E4: .word 0x000005F2 + thumb_func_end ov20_021D15A0 + + thumb_func_start ov20_021D16E8 +ov20_021D16E8: ; 0x021D16E8 + push {r3, lr} + add r1, r0, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + ldr r0, [r1, #0x18] + bne _021D170A + add r1, #0x50 + ldrh r1, [r1] + bl sub_02099CA0 + cmp r0, #0 + beq _021D1706 + mov r0, #1 + pop {r3, pc} +_021D1706: + mov r0, #0 + pop {r3, pc} +_021D170A: + add r1, #0x50 + ldrh r1, [r1] + bl sub_02099CDC + cmp r0, #0 + beq _021D171A + mov r0, #1 + pop {r3, pc} +_021D171A: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov20_021D16E8 + + thumb_func_start ov20_021D1720 +ov20_021D1720: ; 0x021D1720 + push {r3, lr} + add r1, r0, #0 + add r1, #0x65 + ldrb r1, [r1] + lsl r2, r1, #2 + ldr r1, _021D1734 ; =0x021D5140 + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + nop +_021D1734: .word 0x021D5140 + thumb_func_end ov20_021D1720 + + thumb_func_start ov20_021D1738 +ov20_021D1738: ; 0x021D1738 + push {r4, lr} + add r4, r0, #0 + add r0, #0x50 + ldrh r2, [r0] + add r1, r2, #0 + cmp r2, #0xfe + bne _021D1748 + mov r1, #0xc +_021D1748: + cmp r2, #0xfe + beq _021D17A4 + add r0, r4, #0 + add r0, #0x52 + strh r2, [r0] + ldrh r0, [r4, #0x34] + mov r2, #0x40 + tst r2, r0 + beq _021D1768 + ldr r0, _021D17E0 ; =0x021D5168 + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r4, #0x50 + strh r0, [r4] + mov r0, #1 + pop {r4, pc} +_021D1768: + mov r2, #0x80 + tst r2, r0 + beq _021D177C + ldr r0, _021D17E4 ; =0x021D5169 + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r4, #0x50 + strh r0, [r4] + mov r0, #1 + pop {r4, pc} +_021D177C: + mov r2, #0x20 + tst r2, r0 + beq _021D1790 + ldr r0, _021D17E8 ; =0x021D516A + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r4, #0x50 + strh r0, [r4] + mov r0, #1 + pop {r4, pc} +_021D1790: + mov r2, #0x10 + tst r0, r2 + beq _021D17DC + ldr r0, _021D17EC ; =0x021D516B + lsl r1, r1, #2 + ldrb r0, [r0, r1] + add r4, #0x50 + strh r0, [r4] + mov r0, #1 + pop {r4, pc} +_021D17A4: + ldrh r1, [r4, #0x34] + mov r0, #0x40 + tst r0, r1 + beq _021D17C2 + add r0, r4, #0 + add r0, #0x52 + ldrh r0, [r0] + mov r1, #3 + bl sub_020E1F6C + add r1, #9 + add r4, #0x50 + strh r1, [r4] + mov r0, #1 + pop {r4, pc} +_021D17C2: + mov r0, #0x80 + tst r0, r1 + beq _021D17DC + add r0, r4, #0 + add r0, #0x52 + ldrh r0, [r0] + mov r1, #3 + bl sub_020E1F6C + add r4, #0x50 + strh r1, [r4] + mov r0, #1 + pop {r4, pc} +_021D17DC: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D17E0: .word 0x021D5168 +_021D17E4: .word 0x021D5169 +_021D17E8: .word 0x021D516A +_021D17EC: .word 0x021D516B + thumb_func_end ov20_021D1738 + + thumb_func_start ov20_021D17F0 +ov20_021D17F0: ; 0x021D17F0 + push {r4, lr} + add r4, r0, #0 + add r0, #0x50 + ldrh r0, [r0] + cmp r0, #0xfe + beq _021D184E + ldrh r1, [r4, #0x34] + mov r3, #0x40 + mov r2, #0xff + tst r3, r1 + beq _021D180E + bl ov20_021D5098 + add r2, r0, #0 + b _021D1836 +_021D180E: + mov r3, #0x80 + tst r3, r1 + beq _021D181C + bl ov20_021D50B4 + add r2, r0, #0 + b _021D1836 +_021D181C: + mov r3, #0x10 + tst r3, r1 + beq _021D182A + bl ov20_021D50EC + add r2, r0, #0 + b _021D1836 +_021D182A: + mov r3, #0x20 + tst r1, r3 + beq _021D1836 + bl ov20_021D50D0 + add r2, r0, #0 +_021D1836: + cmp r2, #0xff + beq _021D1880 + add r0, r4, #0 + add r0, #0x50 + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x52 + strh r1, [r0] + add r4, #0x50 + strh r2, [r4] + mov r0, #1 + pop {r4, pc} +_021D184E: + ldrh r1, [r4, #0x34] + mov r0, #0x40 + tst r0, r1 + beq _021D1868 + add r0, r4, #0 + add r0, #0x52 + ldrh r0, [r0] + bl ov20_021D5124 + add r4, #0x50 + strh r0, [r4] + mov r0, #1 + pop {r4, pc} +_021D1868: + mov r0, #0x80 + tst r0, r1 + beq _021D1880 + add r0, r4, #0 + add r0, #0x52 + ldrh r0, [r0] + bl ov20_021D5108 + add r4, #0x50 + strh r0, [r4] + mov r0, #1 + pop {r4, pc} +_021D1880: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov20_021D17F0 + + thumb_func_start ov20_021D1884 +ov20_021D1884: ; 0x021D1884 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + strh r0, [r4] + strb r0, [r4, #6] + strb r0, [r4, #7] + add r0, r1, #0 + bl ov20_021D1FE4 + strh r0, [r4, #4] + mov r0, #0 + str r0, [r4, #8] + ldrh r2, [r4, #4] + cmp r2, #0xa + bls _021D18B6 + add r1, r2, #0 + sub r1, #0xa + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + mov r0, #1 + and r0, r2 + add r0, r1, r0 + strh r0, [r4, #2] + pop {r4, pc} +_021D18B6: + strh r0, [r4, #2] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D1884 + + thumb_func_start ov20_021D18BC +ov20_021D18BC: ; 0x021D18BC + ldrb r1, [r0, #6] + ldrb r0, [r0, #7] + lsl r0, r0, #1 + add r0, r1, r0 + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D18BC + + thumb_func_start ov20_021D18C8 +ov20_021D18C8: ; 0x021D18C8 + push {r4, lr} + add r4, r0, #0 + bl ov20_021D18BC + ldrh r1, [r4] + lsl r1, r1, #1 + add r0, r1, r0 + pop {r4, pc} + thumb_func_end ov20_021D18C8 + + thumb_func_start ov20_021D18D8 +ov20_021D18D8: ; 0x021D18D8 + ldr r0, [r0, #8] + bx lr + thumb_func_end ov20_021D18D8 + + thumb_func_start ov20_021D18DC +ov20_021D18DC: ; 0x021D18DC + ldrh r0, [r0] + bx lr + thumb_func_end ov20_021D18DC + + thumb_func_start ov20_021D18E0 +ov20_021D18E0: ; 0x021D18E0 + ldrh r0, [r0, #2] + bx lr + thumb_func_end ov20_021D18E0 + + thumb_func_start ov20_021D18E4 +ov20_021D18E4: ; 0x021D18E4 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #3 + bls _021D18F2 + b _021D1A54 +_021D18F2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D18FE: ; jump table + .short _021D1906 - _021D18FE - 2 ; case 0 + .short _021D1A12 - _021D18FE - 2 ; case 1 + .short _021D1A24 - _021D18FE - 2 ; case 2 + .short _021D1A3E - _021D18FE - 2 ; case 3 +_021D1906: + ldr r0, [r4, #0x38] + cmp r0, #0 + bne _021D1916 + add r1, r4, #0 + add r1, #0x65 + ldrb r1, [r1] + cmp r1, #0 + bne _021D192C +_021D1916: + cmp r0, #1 + bne _021D1924 + add r1, r4, #0 + add r1, #0x65 + ldrb r1, [r1] + cmp r1, #1 + bne _021D192C +_021D1924: + ldrh r2, [r4, #0x30] + mov r1, #4 + tst r1, r2 + beq _021D195C +_021D192C: + ldr r0, _021D1A58 ; =0x000005E4 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x65 + ldrb r1, [r0] + mov r0, #1 + eor r1, r0 + add r0, r4, #0 + add r0, #0x65 + strb r1, [r0] + ldr r0, [r4, #0x14] + mov r1, #9 + bl ov20_021D21A0 + ldr r0, _021D1A5C ; =ov20_021D15A0 + str r0, [r4, #0x24] + mov r0, #3 + str r0, [r5, #0] + b _021D1A54 +_021D195C: + cmp r0, #2 + bne _021D196A + add r0, r4, #0 + add r0, #0x54 + bl ov20_021D1B48 + b _021D1982 +_021D196A: + cmp r0, #3 + bne _021D1978 + add r0, r4, #0 + add r0, #0x54 + bl ov20_021D1B70 + b _021D1982 +_021D1978: + ldrh r1, [r4, #0x34] + add r0, r4, #0 + add r0, #0x54 + bl ov20_021D1A68 +_021D1982: + cmp r0, #1 + beq _021D1990 + cmp r0, #2 + beq _021D19A2 + cmp r0, #3 + beq _021D19B8 + b _021D19CE +_021D1990: + ldr r0, _021D1A60 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0xf + bl ov20_021D21A0 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D19A2: + ldr r0, _021D1A60 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0x10 + bl ov20_021D21A0 + mov r0, #1 + str r0, [r5, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D19B8: + ldr r0, _021D1A60 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0x10 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r5, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D19CE: + ldrh r1, [r4, #0x30] + mov r0, #2 + tst r0, r1 + beq _021D19EE + ldr r0, _021D1A60 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #9 + bl ov20_021D21A0 + ldr r0, _021D1A5C ; =ov20_021D15A0 + str r0, [r4, #0x24] + mov r0, #3 + str r0, [r5, #0] + b _021D1A54 +_021D19EE: + mov r0, #1 + tst r0, r1 + beq _021D1A54 + ldr r0, _021D1A60 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + bl ov20_021D1BB0 + ldr r0, _021D1A64 ; =ov20_021D103C + mov r1, #0xa + str r0, [r4, #0x24] + ldr r0, [r4, #0x14] + bl ov20_021D21A0 + mov r0, #3 + str r0, [r5, #0] + b _021D1A54 +_021D1A12: + ldr r0, [r4, #0x14] + mov r1, #0x10 + bl ov20_021D2210 + cmp r0, #0 + beq _021D1A54 + mov r0, #0 + str r0, [r5, #0] + b _021D1A54 +_021D1A24: + ldr r0, [r4, #0x14] + mov r1, #0x10 + bl ov20_021D2210 + cmp r0, #0 + beq _021D1A54 + ldr r0, [r4, #0x14] + mov r1, #0xf + bl ov20_021D21A0 + mov r0, #0 + str r0, [r5, #0] + b _021D1A54 +_021D1A3E: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1A54 + ldr r1, [r4, #0x24] + add r0, r4, #0 + bl ov20_021D1034 + mov r0, #0 + str r0, [r5, #0] +_021D1A54: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1A58: .word 0x000005E4 +_021D1A5C: .word ov20_021D15A0 +_021D1A60: .word 0x000005DC +_021D1A64: .word ov20_021D103C + thumb_func_end ov20_021D18E4 + + thumb_func_start ov20_021D1A68 +ov20_021D1A68: ; 0x021D1A68 + push {r3, r4, r5, lr} + mov r2, #0x80 + add r4, r0, #0 + tst r2, r1 + beq _021D1AD2 + ldrb r1, [r4, #7] + cmp r1, #4 + bhs _021D1AA6 + add r1, r1, #1 + strb r1, [r4, #7] + bl ov20_021D18C8 + ldrh r1, [r4, #4] + cmp r0, r1 + bhs _021D1A8A + mov r0, #1 + pop {r3, r4, r5, pc} +_021D1A8A: + cmp r0, r1 + bne _021D1A9C + mov r1, #1 + tst r0, r1 + beq _021D1A9C + mov r0, #0 + strb r0, [r4, #6] + add r0, r1, #0 + pop {r3, r4, r5, pc} +_021D1A9C: + ldrb r0, [r4, #7] + sub r0, r0, #1 + strb r0, [r4, #7] + mov r0, #4 + pop {r3, r4, r5, pc} +_021D1AA6: + ldrh r2, [r4] + ldrh r1, [r4, #2] + cmp r2, r1 + bhs _021D1ACE + mov r1, #1 + str r1, [r4, #8] + ldrh r1, [r4] + add r1, r1, #1 + strh r1, [r4] + bl ov20_021D18C8 + ldrh r1, [r4, #4] + cmp r0, r1 + bhs _021D1AC6 + mov r0, #2 + pop {r3, r4, r5, pc} +_021D1AC6: + mov r0, #0 + strb r0, [r4, #6] + mov r0, #3 + pop {r3, r4, r5, pc} +_021D1ACE: + mov r0, #4 + pop {r3, r4, r5, pc} +_021D1AD2: + mov r5, #0x40 + add r2, r1, #0 + tst r2, r5 + beq _021D1B00 + ldrb r0, [r4, #7] + cmp r0, #0 + beq _021D1AE8 + sub r0, r0, #1 + strb r0, [r4, #7] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D1AE8: + ldrh r0, [r4] + cmp r0, #0 + beq _021D1AFC + sub r5, #0x41 + str r5, [r4, #8] + ldrh r0, [r4] + sub r0, r0, #1 + strh r0, [r4] + mov r0, #2 + pop {r3, r4, r5, pc} +_021D1AFC: + mov r0, #4 + pop {r3, r4, r5, pc} +_021D1B00: + mov r3, #0x30 + add r2, r1, #0 + tst r2, r3 + beq _021D1B2A + ldrb r2, [r4, #6] + mov r1, #1 + eor r1, r2 + strb r1, [r4, #6] + bl ov20_021D18C8 + ldrh r1, [r4, #4] + cmp r0, r1 + bhs _021D1B1E + mov r0, #1 + pop {r3, r4, r5, pc} +_021D1B1E: + ldrb r1, [r4, #6] + mov r0, #1 + eor r0, r1 + strb r0, [r4, #6] + mov r0, #4 + pop {r3, r4, r5, pc} +_021D1B2A: + lsl r2, r5, #3 + tst r2, r1 + beq _021D1B36 + bl ov20_021D1B48 + pop {r3, r4, r5, pc} +_021D1B36: + add r3, #0xd0 + tst r1, r3 + beq _021D1B42 + bl ov20_021D1B70 + pop {r3, r4, r5, pc} +_021D1B42: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D1A68 + + thumb_func_start ov20_021D1B48 +ov20_021D1B48: ; 0x021D1B48 + ldrh r1, [r0] + cmp r1, #0 + beq _021D1B6A + cmp r1, #5 + blo _021D1B5E + sub r1, r1, #5 + strh r1, [r0] + mov r1, #4 + mvn r1, r1 + str r1, [r0, #8] + b _021D1B66 +_021D1B5E: + neg r1, r1 + str r1, [r0, #8] + mov r1, #0 + strh r1, [r0] +_021D1B66: + mov r0, #2 + bx lr +_021D1B6A: + mov r0, #4 + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1B48 + + thumb_func_start ov20_021D1B70 +ov20_021D1B70: ; 0x021D1B70 + push {r4, lr} + add r4, r0, #0 + ldrh r2, [r4, #2] + ldrh r1, [r4] + cmp r1, r2 + bhs _021D1BAC + add r0, r1, #5 + cmp r0, r2 + bgt _021D1B8C + mov r0, #5 + str r0, [r4, #8] + ldrh r0, [r4] + add r0, r0, #5 + b _021D1B92 +_021D1B8C: + sub r0, r2, r1 + str r0, [r4, #8] + ldrh r0, [r4, #2] +_021D1B92: + strh r0, [r4] + add r0, r4, #0 + bl ov20_021D18C8 + ldrh r1, [r4, #4] + cmp r0, r1 + bhs _021D1BA4 + mov r0, #2 + pop {r4, pc} +_021D1BA4: + mov r0, #0 + strb r0, [r4, #6] + mov r0, #3 + pop {r4, pc} +_021D1BAC: + mov r0, #4 + pop {r4, pc} + thumb_func_end ov20_021D1B70 + + thumb_func_start ov20_021D1BB0 +ov20_021D1BB0: ; 0x021D1BB0 + push {r4, lr} + add r4, r0, #0 + add r0, #0x54 + bl ov20_021D18C8 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + ldr r0, [r4, #0x18] + bne _021D1BD4 + add r1, r4, #0 + add r1, #0x50 + ldrh r1, [r1] + bl sub_02099CC8 + b _021D1BDE +_021D1BD4: + add r1, r4, #0 + add r1, #0x50 + ldrh r1, [r1] + bl sub_02099D14 +_021D1BDE: + add r2, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021D1BF0 + cmp r0, #1 + beq _021D1BF4 + cmp r0, #2 + beq _021D1C02 + b _021D1C10 +_021D1BF0: + strh r2, [r4, #0x10] + b _021D1C10 +_021D1BF4: + add r0, r4, #0 + add r0, #0x4e + ldrh r0, [r0] + lsl r0, r0, #1 + add r0, r4, r0 + strh r2, [r0, #0x10] + b _021D1C10 +_021D1C02: + add r1, r4, #0 + add r1, #0x4e + ldrh r1, [r1] + add r0, r4, #0 + add r0, #8 + bl sub_02014CF8 +_021D1C10: + add r0, r4, #0 + bl ov20_021D1E8C + pop {r4, pc} + thumb_func_end ov20_021D1BB0 + + thumb_func_start ov20_021D1C18 +ov20_021D1C18: ; 0x021D1C18 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D1C28 + cmp r1, #1 + beq _021D1C38 + b _021D1C46 +_021D1C28: + ldr r0, [r0, #0x14] + mov r1, #1 + bl ov20_021D21A0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D1C46 +_021D1C38: + ldr r0, [r0, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1C46 + mov r0, #1 + pop {r4, pc} +_021D1C46: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D1C18 + + thumb_func_start ov20_021D1C4C +ov20_021D1C4C: ; 0x021D1C4C + str r1, [r0, #0x2c] + mov r1, #0 + str r1, [r0, #0x28] + bx lr + thumb_func_end ov20_021D1C4C + + thumb_func_start ov20_021D1C54 +ov20_021D1C54: ; 0x021D1C54 + mov r1, #0 + str r1, [r0, #0x2c] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1C54 + + thumb_func_start ov20_021D1C5C +ov20_021D1C5C: ; 0x021D1C5C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D1C6E + cmp r0, #1 + beq _021D1C7E + pop {r3, r4, r5, pc} +_021D1C6E: + ldr r0, [r5, #0x14] + mov r1, #2 + bl ov20_021D21A0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D1C7E: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1C8E + add r0, r5, #0 + bl ov20_021D1C54 +_021D1C8E: + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D1C5C + + thumb_func_start ov20_021D1C90 +ov20_021D1C90: ; 0x021D1C90 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #3 + bls _021D1C9E + b _021D1DAC +_021D1C9E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D1CAA: ; jump table + .short _021D1CB2 - _021D1CAA - 2 ; case 0 + .short _021D1D00 - _021D1CAA - 2 ; case 1 + .short _021D1D86 - _021D1CAA - 2 ; case 2 + .short _021D1D9C - _021D1CAA - 2 ; case 3 +_021D1CB2: + bl ov20_021D1E70 + cmp r0, #0 + bne _021D1CC4 + ldr r0, [r4, #0] + bl sub_02097568 + cmp r0, #0 + beq _021D1CF6 +_021D1CC4: + add r0, r4, #0 + bl ov20_021D1E8C + cmp r0, #0 + beq _021D1CE8 + add r0, r4, #0 + add r0, #0x66 + mov r1, #1 + mov r2, #0 + bl ov20_021D1ED4 + ldr r0, [r4, #0x14] + mov r1, #0x12 + bl ov20_021D21A0 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1CE8: + ldr r0, [r4, #0x14] + mov r1, #0x14 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1CF6: + ldr r1, _021D1DB0 ; =ov20_021D1DBC + add r0, r4, #0 + bl ov20_021D1C4C + pop {r3, r4, r5, pc} +_021D1D00: + ldr r0, [r4, #0x14] + mov r1, #0x15 + bl ov20_021D2210 + cmp r0, #0 + beq _021D1DAC + ldrh r1, [r4, #0x30] + add r0, r4, #0 + add r0, #0x66 + bl ov20_021D1EDC + add r0, r0, #3 + cmp r0, #4 + bhi _021D1DAC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D1D28: ; jump table + .short _021D1D32 - _021D1D28 - 2 ; case 0 + .short _021D1D42 - _021D1D28 - 2 ; case 1 + .short _021D1DAC - _021D1D28 - 2 ; case 2 + .short _021D1D56 - _021D1D28 - 2 ; case 3 + .short _021D1D42 - _021D1D28 - 2 ; case 4 +_021D1D32: + ldr r0, _021D1DB4 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0x15 + bl ov20_021D21A0 + pop {r3, r4, r5, pc} +_021D1D42: + ldr r0, _021D1DB4 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0x16 + bl ov20_021D21A0 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1D56: + ldr r0, _021D1DB4 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #4] + cmp r0, #2 + bne _021D1D6A + add r0, r4, #0 + add r0, #8 + bl sub_02014D10 +_021D1D6A: + add r1, r4, #0 + add r2, r4, #0 + ldr r0, [r4, #0] + add r1, #0x10 + add r2, #8 + bl sub_020975E4 + ldr r1, _021D1DB8 ; =ov20_021D1C18 + add r0, r4, #0 + bl ov20_021D1034 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1D86: + ldrh r1, [r4, #0x30] + mov r0, #0xf3 + tst r0, r1 + beq _021D1DAC + ldr r0, [r4, #0x14] + mov r1, #0x11 + bl ov20_021D21A0 + mov r0, #3 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1D9C: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1DAC + add r0, r4, #0 + bl ov20_021D1C54 +_021D1DAC: + pop {r3, r4, r5, pc} + nop +_021D1DB0: .word ov20_021D1DBC +_021D1DB4: .word 0x000005DC +_021D1DB8: .word ov20_021D1C18 + thumb_func_end ov20_021D1C90 + + thumb_func_start ov20_021D1DBC +ov20_021D1DBC: ; 0x021D1DBC + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D1DD2 + cmp r0, #1 + beq _021D1DEC + cmp r0, #2 + beq _021D1E56 + pop {r3, r4, r5, pc} +_021D1DD2: + add r0, r4, #0 + mov r1, #1 + add r0, #0x66 + add r2, r1, #0 + bl ov20_021D1ED4 + ldr r0, [r4, #0x14] + mov r1, #0x13 + bl ov20_021D21A0 + mov r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1DEC: + ldr r0, [r4, #0x14] + mov r1, #0x15 + bl ov20_021D2210 + cmp r0, #0 + beq _021D1E66 + ldrh r1, [r4, #0x30] + add r0, r4, #0 + add r0, #0x66 + bl ov20_021D1EDC + add r0, r0, #3 + cmp r0, #4 + bhi _021D1E66 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D1E14: ; jump table + .short _021D1E1E - _021D1E14 - 2 ; case 0 + .short _021D1E2E - _021D1E14 - 2 ; case 1 + .short _021D1E66 - _021D1E14 - 2 ; case 2 + .short _021D1E42 - _021D1E14 - 2 ; case 3 + .short _021D1E2E - _021D1E14 - 2 ; case 4 +_021D1E1E: + ldr r0, _021D1E68 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0x15 + bl ov20_021D21A0 + pop {r3, r4, r5, pc} +_021D1E2E: + ldr r0, _021D1E68 ; =0x000005DC + bl sub_02005748 + ldr r0, [r4, #0x14] + mov r1, #0x16 + bl ov20_021D21A0 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1E42: + ldr r0, _021D1E68 ; =0x000005DC + bl sub_02005748 + ldr r1, _021D1E6C ; =ov20_021D1C18 + add r0, r4, #0 + bl ov20_021D1034 + mov r0, #2 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D1E56: + ldr r0, [r4, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1E66 + add r0, r4, #0 + bl ov20_021D1C54 +_021D1E66: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1E68: .word 0x000005DC +_021D1E6C: .word ov20_021D1C18 + thumb_func_end ov20_021D1DBC + + thumb_func_start ov20_021D1E70 +ov20_021D1E70: ; 0x021D1E70 + push {r3, lr} + add r2, r0, #0 + add r1, r2, #0 + ldr r0, [r2, #0] + add r1, #0x10 + add r2, #8 + bl sub_020975A0 + cmp r0, #0 + bne _021D1E88 + mov r0, #1 + pop {r3, pc} +_021D1E88: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov20_021D1E70 + + thumb_func_start ov20_021D1E8C +ov20_021D1E8C: ; 0x021D1E8C + push {r3, lr} + ldr r1, [r0, #4] + cmp r1, #0 + beq _021D1E9E + cmp r1, #1 + beq _021D1EAE + cmp r1, #2 + beq _021D1EC4 + b _021D1ECC +_021D1E9E: + ldrh r1, [r0, #0x10] + ldr r0, _021D1ED0 ; =0x0000FFFF + cmp r1, r0 + beq _021D1EAA + mov r0, #1 + pop {r3, pc} +_021D1EAA: + mov r0, #0 + pop {r3, pc} +_021D1EAE: + ldrh r2, [r0, #0x10] + ldr r1, _021D1ED0 ; =0x0000FFFF + cmp r2, r1 + beq _021D1EC0 + ldrh r0, [r0, #0x12] + cmp r0, r1 + beq _021D1EC0 + mov r0, #1 + pop {r3, pc} +_021D1EC0: + mov r0, #0 + pop {r3, pc} +_021D1EC4: + add r0, #8 + bl sub_02014BD0 + pop {r3, pc} +_021D1ECC: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021D1ED0: .word 0x0000FFFF + thumb_func_end ov20_021D1E8C + + thumb_func_start ov20_021D1ED4 +ov20_021D1ED4: ; 0x021D1ED4 + strb r2, [r0] + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1ED4 + + thumb_func_start ov20_021D1EDC +ov20_021D1EDC: ; 0x021D1EDC + mov r2, #0x40 + add r3, r1, #0 + tst r3, r2 + beq _021D1EFA + ldrb r1, [r0] + cmp r1, #0 + bne _021D1EF0 + sub r2, #0x44 + add r0, r2, #0 + bx lr +_021D1EF0: + sub r1, r1, #1 + sub r2, #0x43 + strb r1, [r0] + add r0, r2, #0 + bx lr +_021D1EFA: + mov r2, #0x80 + add r3, r1, #0 + tst r3, r2 + beq _021D1F1A + ldrb r3, [r0] + ldrb r1, [r0, #1] + cmp r3, r1 + bne _021D1F10 + sub r2, #0x84 + add r0, r2, #0 + bx lr +_021D1F10: + add r1, r3, #1 + sub r2, #0x83 + strb r1, [r0] + add r0, r2, #0 + bx lr +_021D1F1A: + mov r2, #1 + tst r2, r1 + beq _021D1F24 + ldrb r0, [r0] + bx lr +_021D1F24: + mov r0, #2 + tst r1, r0 + beq _021D1F2E + sub r0, r0, #4 + bx lr +_021D1F2E: + sub r0, r0, #3 + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1EDC + + thumb_func_start ov20_021D1F34 +ov20_021D1F34: ; 0x021D1F34 + ldrb r0, [r0] + bx lr + thumb_func_end ov20_021D1F34 + + thumb_func_start ov20_021D1F38 +ov20_021D1F38: ; 0x021D1F38 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D1F4A + cmp r0, #1 + beq _021D1F6E + pop {r3, r4, r5, pc} +_021D1F4A: + ldr r0, _021D1F80 ; =0x000005E4 + bl sub_02005748 + add r0, r5, #0 + add r0, #0x65 + ldrb r1, [r0] + mov r0, #1 + eor r1, r0 + add r0, r5, #0 + add r0, #0x65 + strb r1, [r0] + ldr r0, [r5, #0x14] + mov r1, #0x17 + bl ov20_021D21A0 + mov r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D1F6E: + ldr r0, [r5, #0x14] + bl ov20_021D21F8 + cmp r0, #0 + beq _021D1F7E + add r0, r5, #0 + bl ov20_021D1C54 +_021D1F7E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1F80: .word 0x000005E4 + thumb_func_end ov20_021D1F38 + + thumb_func_start ov20_021D1F84 +ov20_021D1F84: ; 0x021D1F84 + ldr r0, [r0, #4] + bx lr + thumb_func_end ov20_021D1F84 + + thumb_func_start ov20_021D1F88 +ov20_021D1F88: ; 0x021D1F88 + ldr r3, _021D1F90 ; =sub_02097554 + ldr r0, [r0, #0] + bx r3 + nop +_021D1F90: .word sub_02097554 + thumb_func_end ov20_021D1F88 + + thumb_func_start ov20_021D1F94 +ov20_021D1F94: ; 0x021D1F94 + add r0, #0x65 + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1F94 + + thumb_func_start ov20_021D1F9C +ov20_021D1F9C: ; 0x021D1F9C + ldr r3, _021D1FA4 ; =sub_02014C80 + add r0, #8 + bx r3 + nop +_021D1FA4: .word sub_02014C80 + thumb_func_end ov20_021D1F9C + + thumb_func_start ov20_021D1FA8 +ov20_021D1FA8: ; 0x021D1FA8 + push {r3, lr} + ldr r2, [r0, #4] + cmp r2, #2 + bne _021D1FB8 + add r0, #8 + bl sub_02014C78 + pop {r3, pc} +_021D1FB8: + lsl r1, r1, #1 + add r0, r0, r1 + ldrh r0, [r0, #0x10] + pop {r3, pc} + thumb_func_end ov20_021D1FA8 + + thumb_func_start ov20_021D1FC0 +ov20_021D1FC0: ; 0x021D1FC0 + ldr r3, _021D1FC8 ; =sub_02014BA0 + add r0, #8 + bx r3 + nop +_021D1FC8: .word sub_02014BA0 + thumb_func_end ov20_021D1FC0 + + thumb_func_start ov20_021D1FCC +ov20_021D1FCC: ; 0x021D1FCC + add r0, #0x4e + ldrh r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1FCC + + thumb_func_start ov20_021D1FD4 +ov20_021D1FD4: ; 0x021D1FD4 + add r0, #0x4c + ldrh r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1FD4 + + thumb_func_start ov20_021D1FDC +ov20_021D1FDC: ; 0x021D1FDC + add r0, #0x50 + ldrh r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D1FDC + + thumb_func_start ov20_021D1FE4 +ov20_021D1FE4: ; 0x021D1FE4 + push {r3, lr} + add r1, r0, #0 + add r0, #0x65 + ldrb r0, [r0] + cmp r0, #0 + ldr r0, [r1, #0x18] + bne _021D1FFC + add r1, #0x50 + ldrh r1, [r1] + bl sub_02099CA0 + pop {r3, pc} +_021D1FFC: + add r1, #0x50 + ldrh r1, [r1] + bl sub_02099CDC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov20_021D1FE4 + + thumb_func_start ov20_021D2008 +ov20_021D2008: ; 0x021D2008 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x65 + ldrb r0, [r0] + add r4, r1, #0 + add r3, r2, #0 + cmp r0, #0 + ldr r0, [r5, #0x18] + bne _021D2026 + add r5, #0x50 + ldrh r1, [r5] + add r2, r4, #0 + bl sub_02099CA8 + pop {r3, r4, r5, pc} +_021D2026: + add r5, #0x50 + ldrh r1, [r5] + add r2, r4, #0 + bl sub_02099CEC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2008 + + thumb_func_start ov20_021D2034 +ov20_021D2034: ; 0x021D2034 + ldr r3, _021D203C ; =ov20_021D18BC + add r0, #0x54 + bx r3 + nop +_021D203C: .word ov20_021D18BC + thumb_func_end ov20_021D2034 + + thumb_func_start ov20_021D2040 +ov20_021D2040: ; 0x021D2040 + ldr r3, _021D2048 ; =ov20_021D18D8 + add r0, #0x54 + bx r3 + nop +_021D2048: .word ov20_021D18D8 + thumb_func_end ov20_021D2040 + + thumb_func_start ov20_021D204C +ov20_021D204C: ; 0x021D204C + push {r3, lr} + add r0, #0x54 + bl ov20_021D18DC + cmp r0, #0 + beq _021D205C + mov r0, #1 + pop {r3, pc} +_021D205C: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov20_021D204C + + thumb_func_start ov20_021D2060 +ov20_021D2060: ; 0x021D2060 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x54 + bl ov20_021D18DC + add r5, #0x54 + add r4, r0, #0 + add r0, r5, #0 + bl ov20_021D18E0 + cmp r4, r0 + bge _021D207C + mov r0, #1 + pop {r3, r4, r5, pc} +_021D207C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2060 + + thumb_func_start ov20_021D2080 +ov20_021D2080: ; 0x021D2080 + ldr r3, _021D2088 ; =sub_02097558 + ldr r0, [r0, #0] + bx r3 + nop +_021D2088: .word sub_02097558 + thumb_func_end ov20_021D2080 + + thumb_func_start ov20_021D208C +ov20_021D208C: ; 0x021D208C + ldr r3, _021D2094 ; =ov20_021D1F34 + add r0, #0x66 + bx r3 + nop +_021D2094: .word ov20_021D1F34 + thumb_func_end ov20_021D208C + + .rodata + + + .global Unk_ov20_021D5140 +Unk_ov20_021D5140: ; 0x021D5140 + .incbin "incbin/overlay20_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov20_021D5148 +Unk_ov20_021D5148: ; 0x021D5148 + .incbin "incbin/overlay20_rodata.bin", 0x8, 0x14 - 0x8 + + .global Unk_ov20_021D5154 +Unk_ov20_021D5154: ; 0x021D5154 + .incbin "incbin/overlay20_rodata.bin", 0x14, 0x28 - 0x14 + + .global Unk_ov20_021D5168 +Unk_ov20_021D5168: ; 0x021D5168 + .incbin "incbin/overlay20_rodata.bin", 0x28, 0x34 + diff --git a/asm/ov20_021D2098.s b/asm/ov20_021D2098.s new file mode 100644 index 000000000..4bd388244 --- /dev/null +++ b/asm/ov20_021D2098.s @@ -0,0 +1,1841 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D2098 +ov20_021D2098: ; 0x021D2098 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r6, r1, #0 + mov r1, #0x7d + add r5, r0, #0 + mov r0, #0x23 + lsl r1, r1, #2 + bl sub_02018144 + add r4, r0, #0 + beq _021D2118 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + str r5, [r4, #0x18] + str r6, [r4, #0x1c] + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x80 + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r2, #0x23 + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + add r1, r4, #0 + mov r0, #0x80 + add r1, #0x28 + mov r2, #0x23 + bl sub_020095C4 + str r0, [r4, #0x24] + mov r0, #0x23 + bl sub_02018340 + str r0, [r4, #0x20] + ldr r0, _021D2120 ; =ov20_021D2178 + add r1, r4, #0 + mov r2, #2 + bl sub_0200D9E8 + str r0, [r4, #0] + ldr r0, _021D2124 ; =ov20_021D217C + add r1, r4, #0 + mov r2, #1 + bl ov20_021D2170 + mov r1, #0 + str r0, [r4, #4] + add r2, r4, #0 + add r0, r1, #0 +_021D210E: + add r1, r1, #1 + str r0, [r2, #8] + add r2, r2, #4 + cmp r1, #4 + blt _021D210E +_021D2118: + add r0, r4, #0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_021D2120: .word ov20_021D2178 +_021D2124: .word ov20_021D217C + thumb_func_end ov20_021D2098 + + thumb_func_start ov20_021D2128 +ov20_021D2128: ; 0x021D2128 + push {r4, r5, r6, lr} + add r6, r0, #0 + beq _021D216E + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + mov r4, #0 + add r5, r6, #0 +_021D213A: + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D2144 + bl sub_0200DA58 +_021D2144: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D213A + ldr r0, [r6, #0] + bl sub_0200DA58 + ldr r0, [r6, #4] + bl sub_0200DA58 + bl sub_0200A878 + ldr r0, [r6, #0x24] + bl sub_02021964 + ldr r0, [r6, #0x20] + bl sub_020181C4 + add r0, r6, #0 + bl sub_020181C4 +_021D216E: + pop {r4, r5, r6, pc} + thumb_func_end ov20_021D2128 + + thumb_func_start ov20_021D2170 +ov20_021D2170: ; 0x021D2170 + ldr r3, _021D2174 ; =sub_0200DA04 + bx r3 + ; .align 2, 0 +_021D2174: .word sub_0200DA04 + thumb_func_end ov20_021D2170 + + thumb_func_start ov20_021D2178 +ov20_021D2178: ; 0x021D2178 + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D2178 + + thumb_func_start ov20_021D217C +ov20_021D217C: ; 0x021D217C + push {r3, lr} + ldr r0, [r1, #0x24] + bl sub_020219F8 + bl sub_0200A858 + ldr r3, _021D2198 ; =0x027E0000 + ldr r1, _021D219C ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r3, pc} + nop +_021D2198: .word 0x027E0000 +_021D219C: .word 0x00003FF8 + thumb_func_end ov20_021D217C + + thumb_func_start ov20_021D21A0 +ov20_021D21A0: ; 0x021D21A0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + cmp r6, #0x1d + bhs _021D21EE + mov r0, #0x23 + mov r1, #0x18 + bl sub_02018144 + add r1, r0, #0 + beq _021D21F2 + mov r4, #0 + str r4, [r1, #0x14] + str r6, [r1, #0xc] + str r5, [r1, #0] + ldr r0, [r5, #0x18] + add r2, r5, #0 + str r0, [r1, #4] + ldr r0, [r5, #0x1c] + str r0, [r1, #8] +_021D21C8: + ldr r0, [r2, #8] + cmp r0, #0 + bne _021D21E4 + ldr r0, _021D21F4 ; =0x021D5260 + lsl r2, r6, #2 + ldr r0, [r0, r2] + mov r2, #1 + str r4, [r1, #0x10] + bl sub_0200D9E8 + lsl r1, r4, #2 + add r1, r5, r1 + str r0, [r1, #8] + pop {r4, r5, r6, pc} +_021D21E4: + add r4, r4, #1 + add r2, r2, #4 + cmp r4, #4 + blt _021D21C8 + pop {r4, r5, r6, pc} +_021D21EE: + bl sub_02022974 +_021D21F2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D21F4: .word 0x021D5260 + thumb_func_end ov20_021D21A0 + + thumb_func_start ov20_021D21F8 +ov20_021D21F8: ; 0x021D21F8 + mov r2, #0 +_021D21FA: + ldr r1, [r0, #8] + cmp r1, #0 + beq _021D2204 + mov r0, #0 + bx lr +_021D2204: + add r2, r2, #1 + add r0, r0, #4 + cmp r2, #4 + blt _021D21FA + mov r0, #1 + bx lr + thumb_func_end ov20_021D21F8 + + thumb_func_start ov20_021D2210 +ov20_021D2210: ; 0x021D2210 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_021D2218: + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D222C + bl sub_0201CED0 + ldr r0, [r0, #0xc] + cmp r0, r6 + bne _021D222C + mov r0, #0 + pop {r4, r5, r6, pc} +_021D222C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D2218 + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov20_021D2210 + + thumb_func_start ov20_021D2238 +ov20_021D2238: ; 0x021D2238 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #8] + bl sub_0200DA58 + ldr r0, [r4, #0x10] + ldr r1, [r4, #0] + lsl r0, r0, #2 + mov r2, #0 + add r0, r1, r0 + str r2, [r0, #8] + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2238 + + thumb_func_start ov20_021D2260 +ov20_021D2260: ; 0x021D2260 + push {r3, r4, r5, lr} + add r4, r1, #0 + bl sub_0201FF00 + bl sub_0201FF68 + mov r1, #1 + lsl r1, r1, #0x1a + ldr r0, [r1, #0] + ldr r2, _021D2360 ; =0xFFFFE0FF + and r0, r2 + str r0, [r1, #0] + ldr r0, _021D2364 ; =0x04001000 + ldr r3, [r0, #0] + and r2, r3 + str r2, [r0, #0] + ldr r2, [r1, #0] + ldr r3, _021D2368 ; =0xFFCFFFEF + add r5, r2, #0 + ldr r2, _021D236C ; =0x00100010 + and r5, r3 + orr r2, r5 + str r2, [r1, #0] + ldr r1, [r0, #0] + add r2, r1, #0 + and r2, r3 + mov r1, #0x10 + orr r1, r2 + str r1, [r0, #0] + mov r0, #0x4c + mov r1, #0x23 + bl sub_02006C24 + add r5, r0, #0 + add r0, r4, #0 + bl ov20_021D24EC + add r0, r4, #0 + add r1, r5, #0 + bl ov20_021D2370 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl ov20_021D2EA4 + mov r1, #0x1e + ldr r2, [r4, #0] + lsl r1, r1, #4 + str r0, [r2, r1] + ldr r0, [r4, #0] + ldr r0, [r0, r1] + add r1, r5, #0 + bl ov20_021D2F50 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl ov20_021D3864 + mov r1, #0x79 + ldr r2, [r4, #0] + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + ldr r0, [r0, r1] + add r1, r5, #0 + bl ov20_021D3898 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl ov20_021D3A54 + mov r1, #0x7a + ldr r2, [r4, #0] + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + ldr r0, [r0, r1] + add r1, r5, #0 + bl ov20_021D3A98 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl ov20_021D40E8 + mov r1, #0x7b + ldr r2, [r4, #0] + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + ldr r0, [r0, r1] + bl ov20_021D41A8 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + bl ov20_021D4728 + mov r1, #0x1f + ldr r2, [r4, #0] + lsl r1, r1, #4 + str r0, [r2, r1] + ldr r0, [r4, #0] + ldr r0, [r0, r1] + add r1, r5, #0 + bl ov20_021D4774 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + bl sub_020BDDF8 + add r0, r5, #0 + bl sub_02006CA8 + add r0, r4, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + nop +_021D2360: .word 0xFFFFE0FF +_021D2364: .word 0x04001000 +_021D2368: .word 0xFFCFFFEF +_021D236C: .word 0x00100010 + thumb_func_end ov20_021D2260 + + thumb_func_start ov20_021D2370 +ov20_021D2370: ; 0x021D2370 + push {r4, r5, lr} + sub sp, #0x14 + ldr r4, [r0, #0] + mov r0, #0x66 + lsl r0, r0, #2 + add r0, r4, r0 + add r5, r1, #0 + bl sub_020A81D0 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_020A81D0 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_020A818C + mov r0, #0x5d + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r1, #9 + bl sub_0200718C + mov r0, #0x23 + str r0, [sp] + mov r0, #0x66 + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl sub_0200716C + mov r1, #7 + mov r0, #0x23 + lsl r3, r1, #6 + str r0, [sp] + add r0, r5, #0 + mov r2, #1 + add r3, r4, r3 + bl sub_02007204 + mov r3, #0x1d + lsl r3, r3, #4 + str r0, [r4, r3] + mov r0, #0x23 + sub r3, #8 + str r0, [sp] + add r0, r5, #0 + mov r1, #8 + mov r2, #1 + add r3, r4, r3 + bl sub_02007220 + mov r1, #0x76 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r2, #0 + sub r0, r1, #4 + str r2, [r4, r0] + add r0, r1, #4 + str r2, [r4, r0] + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov20_021D2370 + + thumb_func_start ov20_021D2414 +ov20_021D2414: ; 0x021D2414 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + ldr r0, [r6, #0x14] + ldr r7, [r6, #0] + cmp r0, #0 + beq _021D242A + cmp r0, #1 + beq _021D244C + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021D242A: + mov r0, #5 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x23 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r6, #0x14] + add sp, #0xc + add r0, r0, #1 + str r0, [r6, #0x14] + pop {r4, r5, r6, r7, pc} +_021D244C: + bl sub_0200F2AC + cmp r0, #0 + beq _021D24E6 + mov r0, #0x1e + ldr r1, [r6, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov20_021D2EF0 + mov r0, #0x79 + ldr r1, [r6, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov20_021D3880 + mov r0, #0x7a + ldr r1, [r6, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov20_021D3A80 + mov r0, #0x7b + ldr r1, [r6, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov20_021D4164 + mov r0, #0x1f + ldr r1, [r6, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov20_021D4764 + mov r4, #0 + add r5, r7, #0 +_021D2494: + mov r0, #0x1d + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021D24A2 + bl sub_020181C4 +_021D24A2: + mov r0, #0x76 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021D24B0 + bl sub_020181C4 +_021D24B0: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021D2494 + ldr r0, [r7, #0x20] + mov r1, #0 + bl sub_02019044 + ldr r0, [r7, #0x20] + mov r1, #1 + bl sub_02019044 + ldr r0, [r7, #0x20] + mov r1, #2 + bl sub_02019044 + ldr r0, [r7, #0x20] + mov r1, #3 + bl sub_02019044 + ldr r0, [r7, #0x20] + mov r1, #4 + bl sub_02019044 + add r0, r6, #0 + bl ov20_021D2238 +_021D24E6: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2414 + + thumb_func_start ov20_021D24EC +ov20_021D24EC: ; 0x021D24EC + push {r4, lr} + ldr r2, _021D2550 ; =0x04000304 + ldr r4, [r0, #0] + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + mov r0, #1 + mov r1, #0 + add r2, r0, #0 + bl sub_020BDE40 + ldr r0, _021D2554 ; =0x021D5238 + bl sub_0201FE94 + ldr r0, _021D2558 ; =0x021D519C + bl sub_02018368 + mov r1, #0 + ldr r0, [r4, #0x20] + ldr r2, _021D255C ; =0x021D51E4 + add r3, r1, #0 + bl sub_020183C4 + ldr r0, [r4, #0x20] + ldr r2, _021D2560 ; =0x021D51AC + mov r1, #1 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x20] + ldr r2, _021D2564 ; =0x021D521C + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x20] + ldr r2, _021D2568 ; =0x021D51C8 + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x20] + ldr r2, _021D256C ; =0x021D5200 + mov r1, #4 + mov r3, #0 + bl sub_020183C4 + pop {r4, pc} + nop +_021D2550: .word 0x04000304 +_021D2554: .word 0x021D5238 +_021D2558: .word 0x021D519C +_021D255C: .word 0x021D51E4 +_021D2560: .word 0x021D51AC +_021D2564: .word 0x021D521C +_021D2568: .word 0x021D51C8 +_021D256C: .word 0x021D5200 + thumb_func_end ov20_021D24EC + + thumb_func_start ov20_021D2570 +ov20_021D2570: ; 0x021D2570 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D2582 + cmp r0, #1 + beq _021D25A2 + b _021D25B4 +_021D2582: + mov r0, #5 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x23 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0x14] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0x14] + pop {r3, r4, pc} +_021D25A2: + bl sub_0200F2AC + cmp r0, #0 + beq _021D25BA + ldr r0, [r4, #0x14] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0x14] + pop {r3, r4, pc} +_021D25B4: + add r0, r4, #0 + bl ov20_021D2238 +_021D25BA: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2570 + + thumb_func_start ov20_021D25C0 +ov20_021D25C0: ; 0x021D25C0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x1e + ldr r4, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3228 + ldr r0, [r5, #4] + bl ov20_021D1FCC + add r1, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3700 + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D25C0 + + thumb_func_start ov20_021D25EC +ov20_021D25EC: ; 0x021D25EC + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x1e + ldr r4, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D369C + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D36B0 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D39D4 + ldr r0, [r4, #0x18] + bl ov20_021D1FD4 + add r1, r0, #0 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39EC + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D25EC + + thumb_func_start ov20_021D2630 +ov20_021D2630: ; 0x021D2630 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x79 + ldr r4, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D39D4 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D36D0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D369C + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2630 + + thumb_func_start ov20_021D2660 +ov20_021D2660: ; 0x021D2660 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #0 + beq _021D2672 + cmp r0, #1 + beq _021D2698 + pop {r3, r4, r5, pc} +_021D2672: + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3684 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D36B0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3EF8 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2698: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3F10 + cmp r0, #0 + beq _021D26D4 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3A2C + ldr r0, [r4, #0x18] + bl ov20_021D1FDC + add r1, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3E74 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D3E48 + add r0, r5, #0 + bl ov20_021D2238 +_021D26D4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2660 + + thumb_func_start ov20_021D26D8 +ov20_021D26D8: ; 0x021D26D8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #0 + beq _021D26EE + cmp r0, #1 + beq _021D2700 + cmp r0, #2 + beq _021D2712 + pop {r3, r4, r5, pc} +_021D26EE: + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D4BA4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2700: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D40A8 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2712: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D40DC + cmp r0, #0 + beq _021D273E + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D4C2C + cmp r0, #0 + beq _021D273E + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4084 + add r0, r5, #0 + bl ov20_021D2238 +_021D273E: + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D26D8 + + thumb_func_start ov20_021D2740 +ov20_021D2740: ; 0x021D2740 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #3 + bhi _021D27E2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2758: ; jump table + .short _021D2760 - _021D2758 - 2 ; case 0 + .short _021D2772 - _021D2758 - 2 ; case 1 + .short _021D2790 - _021D2758 - 2 ; case 2 + .short _021D27B0 - _021D2758 - 2 ; case 3 +_021D2760: + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D4BA4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2772: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D3E48 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D40A8 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2790: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D40DC + cmp r0, #0 + beq _021D27E2 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4084 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D27B0: + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D4C2C + cmp r0, #0 + beq _021D27E2 + ldr r0, [r4, #0x18] + bl ov20_021D1FDC + add r1, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3E74 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D3E48 + add r0, r5, #0 + bl ov20_021D2238 +_021D27E2: + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2740 + + thumb_func_start ov20_021D27E4 +ov20_021D27E4: ; 0x021D27E4 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #0 + beq _021D27F6 + cmp r0, #1 + beq _021D281E + pop {r3, r4, r5, pc} +_021D27F6: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3A40 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D3E48 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3F60 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D281E: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3F84 + cmp r0, #0 + beq _021D2846 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D36D0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3690 + add r0, r5, #0 + bl ov20_021D2238 +_021D2846: + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D27E4 + + thumb_func_start ov20_021D2848 +ov20_021D2848: ; 0x021D2848 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #0 + beq _021D285E + cmp r0, #1 + beq _021D2886 + cmp r0, #2 + beq _021D28A6 + pop {r3, r4, r5, pc} +_021D285E: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4294 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D3E48 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4004 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2886: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4020 + cmp r0, #0 + beq _021D28E4 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D42E4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D28A6: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4390 + cmp r0, #0 + beq _021D28E4 + ldr r0, [r4, #0x18] + bl ov20_021D2034 + add r1, r0, #0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4480 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D4440 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D4DBC + add r0, r5, #0 + bl ov20_021D2238 +_021D28E4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2848 + + thumb_func_start ov20_021D28E8 +ov20_021D28E8: ; 0x021D28E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #4 + bhi _021D29B8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2900: ; jump table + .short _021D290A - _021D2900 - 2 ; case 0 + .short _021D291C - _021D2900 - 2 ; case 1 + .short _021D2946 - _021D2900 - 2 ; case 2 + .short _021D2966 - _021D2900 - 2 ; case 3 + .short _021D2978 - _021D2900 - 2 ; case 4 +_021D290A: + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D4BA4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D291C: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D4440 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D4DBC + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D43B4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2946: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D43D8 + cmp r0, #0 + beq _021D29B8 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4084 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2966: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D403C + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2978: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4078 + cmp r0, #0 + beq _021D29B8 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D4C2C + cmp r0, #0 + beq _021D29B8 + ldr r0, [r4, #0x18] + bl ov20_021D1FDC + add r1, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3E74 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D3E48 + add r0, r5, #0 + bl ov20_021D2238 +_021D29B8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D28E8 + + thumb_func_start ov20_021D29BC +ov20_021D29BC: ; 0x021D29BC + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #3 + bhi _021D2A98 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D29D4: ; jump table + .short _021D29DC - _021D29D4 - 2 ; case 0 + .short _021D2A10 - _021D29D4 - 2 ; case 1 + .short _021D2A3A - _021D29D4 - 2 ; case 2 + .short _021D2A5A - _021D29D4 - 2 ; case 3 +_021D29DC: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3A40 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D4440 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D4DBC + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D43B4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2A10: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D43D8 + cmp r0, #0 + beq _021D2A98 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3FD0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D403C + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2A3A: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4078 + cmp r0, #0 + beq _021D2A98 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3FE0 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2A5A: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3FF8 + cmp r0, #0 + beq _021D2A98 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3228 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D369C + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D36D0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3690 + add r0, r5, #0 + bl ov20_021D2238 +_021D2A98: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D29BC + + thumb_func_start ov20_021D2A9C +ov20_021D2A9C: ; 0x021D2A9C + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #3 + bhi _021D2B70 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2AB4: ; jump table + .short _021D2ABC - _021D2AB4 - 2 ; case 0 + .short _021D2AF0 - _021D2AB4 - 2 ; case 1 + .short _021D2B1A - _021D2AB4 - 2 ; case 2 + .short _021D2B3A - _021D2AB4 - 2 ; case 3 +_021D2ABC: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3A40 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D4440 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D4DBC + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D43B4 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2AF0: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D43D8 + cmp r0, #0 + beq _021D2B70 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3FD0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D403C + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2B1A: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4078 + cmp r0, #0 + beq _021D2B70 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3FE0 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2B3A: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3FF8 + cmp r0, #0 + beq _021D2B70 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3228 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D369C + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D39D4 + add r0, r5, #0 + bl ov20_021D2238 +_021D2B70: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2A9C + + thumb_func_start ov20_021D2B74 +ov20_021D2B74: ; 0x021D2B74 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #0x18] + bl ov20_021D1FCC + add r1, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3700 + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2B74 + + thumb_func_start ov20_021D2B94 +ov20_021D2B94: ; 0x021D2B94 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #0x18] + bl ov20_021D1FD4 + add r1, r0, #0 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39EC + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2B94 + + thumb_func_start ov20_021D2BB4 +ov20_021D2BB4: ; 0x021D2BB4 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #0x18] + bl ov20_021D1FDC + add r1, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D3E74 + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2BB4 + + thumb_func_start ov20_021D2BD4 +ov20_021D2BD4: ; 0x021D2BD4 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #0x18] + bl ov20_021D2034 + add r1, r0, #0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4480 + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2BD4 + + thumb_func_start ov20_021D2BF4 +ov20_021D2BF4: ; 0x021D2BF4 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x14] + ldr r4, [r5, #0] + cmp r0, #0 + beq _021D2C06 + cmp r0, #1 + beq _021D2C20 + pop {r3, r4, r5, pc} +_021D2C06: + ldr r0, [r4, #0x18] + bl ov20_021D2040 + add r1, r0, #0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D44BC + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + pop {r3, r4, r5, pc} +_021D2C20: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D4578 + cmp r0, #0 + beq _021D2C40 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl ov20_021D4DBC + add r0, r5, #0 + bl ov20_021D2238 +_021D2C40: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2BF4 + + thumb_func_start ov20_021D2C44 +ov20_021D2C44: ; 0x021D2C44 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x1e + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0 + bl ov20_021D3578 + add r0, r4, #0 + bl ov20_021D2238 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2C44 + + thumb_func_start ov20_021D2C60 +ov20_021D2C60: ; 0x021D2C60 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x1e + ldr r4, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #2 + bl ov20_021D3578 + ldr r0, [r5, #4] + bl ov20_021D208C + add r1, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3790 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39E0 + cmp r0, #0 + beq _021D2C9E + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39BC + b _021D2CA8 +_021D2C9E: + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3684 +_021D2CA8: + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2C60 + + thumb_func_start ov20_021D2CB0 +ov20_021D2CB0: ; 0x021D2CB0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x1e + ldr r4, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #3 + bl ov20_021D3578 + ldr r0, [r5, #4] + bl ov20_021D208C + add r1, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3790 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39E0 + cmp r0, #0 + beq _021D2CEE + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39BC + b _021D2CF8 +_021D2CEE: + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3684 +_021D2CF8: + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2CB0 + + thumb_func_start ov20_021D2D00 +ov20_021D2D00: ; 0x021D2D00 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x1e + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl ov20_021D3578 + add r0, r4, #0 + bl ov20_021D2238 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2D00 + + thumb_func_start ov20_021D2D1C +ov20_021D2D1C: ; 0x021D2D1C + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #4] + ldr r4, [r5, #0] + bl ov20_021D208C + add r1, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D381C + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2D1C + + thumb_func_start ov20_021D2D3C +ov20_021D2D3C: ; 0x021D2D3C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #0x1e + ldr r4, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl ov20_021D3578 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D384C + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39E0 + cmp r0, #0 + beq _021D2D72 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov20_021D39C8 + b _021D2D7C +_021D2D72: + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov20_021D3690 +_021D2D7C: + add r0, r5, #0 + bl ov20_021D2238 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D2D3C + + thumb_func_start ov20_021D2D84 +ov20_021D2D84: ; 0x021D2D84 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x1f + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0 + mov r2, #1 + bl ov20_021D4DF4 + add r0, r4, #0 + bl ov20_021D2238 + pop {r4, pc} + thumb_func_end ov20_021D2D84 + + thumb_func_start ov20_021D2DA0 +ov20_021D2DA0: ; 0x021D2DA0 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x1f + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + add r2, r1, #0 + bl ov20_021D4DF4 + add r0, r4, #0 + bl ov20_021D2238 + pop {r4, pc} + thumb_func_end ov20_021D2DA0 + + thumb_func_start ov20_021D2DBC +ov20_021D2DBC: ; 0x021D2DBC + push {r4, lr} + add r4, r1, #0 + mov r0, #0x1f + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0 + add r2, r1, #0 + bl ov20_021D4DF4 + add r0, r4, #0 + bl ov20_021D2238 + pop {r4, pc} + thumb_func_end ov20_021D2DBC + + thumb_func_start ov20_021D2DD8 +ov20_021D2DD8: ; 0x021D2DD8 + push {r4, lr} + add r4, r1, #0 + mov r0, #0x1f + ldr r1, [r4, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + mov r2, #0 + bl ov20_021D4DF4 + add r0, r4, #0 + bl ov20_021D2238 + pop {r4, pc} + thumb_func_end ov20_021D2DD8 + + thumb_func_start ov20_021D2DF4 +ov20_021D2DF4: ; 0x021D2DF4 + mov r1, #0x1e + lsl r1, r1, #4 + ldr r3, _021D2E00 ; =ov20_021D3574 + ldr r0, [r0, r1] + bx r3 + nop +_021D2E00: .word ov20_021D3574 + thumb_func_end ov20_021D2DF4 + + thumb_func_start ov20_021D2E04 +ov20_021D2E04: ; 0x021D2E04 + ldr r0, [r0, #0x20] + bx lr + thumb_func_end ov20_021D2E04 + + thumb_func_start ov20_021D2E08 +ov20_021D2E08: ; 0x021D2E08 + ldr r0, [r0, #0x24] + bx lr + thumb_func_end ov20_021D2E08 + + thumb_func_start ov20_021D2E0C +ov20_021D2E0C: ; 0x021D2E0C + push {r3, r4, r5, r6} + mov r4, #0x15 + lsl r4, r4, #4 + mov r5, #0x24 + add r6, r0, r4 + mul r5, r2 + add r5, r6, r5 + str r5, [r1, #0] + add r5, r4, #0 + add r5, #0x48 + add r6, r0, r5 + mov r5, #0x14 + mul r5, r2 + lsl r2, r2, #2 + add r5, r6, r5 + add r2, r0, r2 + add r0, r4, #0 + str r5, [r1, #8] + add r0, #0x70 + ldr r0, [r2, r0] + add r4, #0x78 + str r0, [r1, #0xc] + ldr r0, [r2, r4] + str r0, [r1, #0x10] + add r0, r1, #0 + add r0, #0x20 + strb r3, [r0] + mov r0, #0 + str r0, [r1, #4] + str r0, [r1, #0x14] + str r0, [r1, #0x18] + str r0, [r1, #0x1c] + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov20_021D2E0C + + thumb_func_start ov20_021D2E50 +ov20_021D2E50: ; 0x021D2E50 + push {r3, r4, r5, lr} + sub sp, #0x20 + ldr r0, [r0, #0x24] + str r0, [sp] + lsl r0, r2, #0xc + str r0, [sp, #8] + lsl r0, r3, #0xc + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x30] + str r1, [sp, #4] + str r0, [sp, #0x14] + ldr r0, [sp, #0x34] + str r0, [sp, #0x18] + mov r0, #0x23 + str r0, [sp, #0x1c] + bl sub_020C3D98 + add r4, r0, #0 + add r0, sp, #0 + bl sub_02021B90 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020C3DAC + cmp r5, #0 + beq _021D2E9C + add r0, r5, #0 + mov r1, #1 + bl sub_02021CC8 + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 +_021D2E9C: + add r0, r5, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D2E50 + + .rodata + + + .global Unk_ov20_021D519C +Unk_ov20_021D519C: ; 0x021D519C + .incbin "incbin/overlay20_rodata.bin", 0x5C, 0x6C - 0x5C + + .global Unk_ov20_021D51AC +Unk_ov20_021D51AC: ; 0x021D51AC + .incbin "incbin/overlay20_rodata.bin", 0x6C, 0x88 - 0x6C + + .global Unk_ov20_021D51C8 +Unk_ov20_021D51C8: ; 0x021D51C8 + .incbin "incbin/overlay20_rodata.bin", 0x88, 0xA4 - 0x88 + + .global Unk_ov20_021D51E4 +Unk_ov20_021D51E4: ; 0x021D51E4 + .incbin "incbin/overlay20_rodata.bin", 0xA4, 0xC0 - 0xA4 + + .global Unk_ov20_021D5200 +Unk_ov20_021D5200: ; 0x021D5200 + .incbin "incbin/overlay20_rodata.bin", 0xC0, 0xDC - 0xC0 + + .global Unk_ov20_021D521C +Unk_ov20_021D521C: ; 0x021D521C + .incbin "incbin/overlay20_rodata.bin", 0xDC, 0xF8 - 0xDC + + .global Unk_ov20_021D5238 +Unk_ov20_021D5238: ; 0x021D5238 + .incbin "incbin/overlay20_rodata.bin", 0xF8, 0x120 - 0xF8 + + .global Unk_ov20_021D5260 +Unk_ov20_021D5260: ; 0x021D5260 + .incbin "incbin/overlay20_rodata.bin", 0x120, 0x74 + diff --git a/asm/ov20_021D2EA4.s b/asm/ov20_021D2EA4.s new file mode 100644 index 000000000..de516a3e1 --- /dev/null +++ b/asm/ov20_021D2EA4.s @@ -0,0 +1,1279 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D2EA4 +ov20_021D2EA4: ; 0x021D2EA4 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x1b + add r5, r0, #0 + mov r0, #0x23 + lsl r1, r1, #4 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + mov r0, #0 + str r0, [r4, #0x3c] + str r0, [r4, #0x40] + str r0, [r4, #0x44] + mov r0, #0x80 + mov r1, #0x23 + bl sub_02023790 + str r0, [r4, #0x4c] + ldr r2, _021D2EEC ; =0x000001B5 + mov r0, #0 + mov r1, #0x1a + mov r3, #0x23 + bl sub_0200B144 + str r0, [r4, #0x48] + mov r0, #0x23 + bl sub_020149F0 + str r0, [r4, #0x50] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D2EEC: .word 0x000001B5 + thumb_func_end ov20_021D2EA4 + + thumb_func_start ov20_021D2EF0 +ov20_021D2EF0: ; 0x021D2EF0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #0 + beq _021D2EFE + bl sub_02014A20 +_021D2EFE: + ldr r0, [r4, #0x3c] + cmp r0, #0 + beq _021D2F08 + bl sub_02021BD4 +_021D2F08: + ldr r0, [r4, #0x40] + cmp r0, #0 + beq _021D2F12 + bl sub_02021BD4 +_021D2F12: + ldr r0, [r4, #0x44] + cmp r0, #0 + beq _021D2F1C + bl sub_02021BD4 +_021D2F1C: + ldr r0, [r4, #0x48] + cmp r0, #0 + beq _021D2F26 + bl sub_0200B190 +_021D2F26: + ldr r0, [r4, #0x4c] + cmp r0, #0 + beq _021D2F30 + bl sub_020237BC +_021D2F30: + add r0, r4, #0 + add r0, #0xc + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x1c + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x2c + bl sub_0201A8FC + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov20_021D2EF0 + + thumb_func_start ov20_021D2F50 +ov20_021D2F50: ; 0x021D2F50 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov20_021D2E04 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D30A4 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + bl sub_0200710C + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r6, #0 + bl sub_020070E8 + lsr r4, r0, #5 + mov r0, #1 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r2, #0 + lsl r0, r4, #0x10 + add r1, r5, #0 + str r2, [sp, #0xc] + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, #0xc + mov r3, #3 + bl sub_0201A7E8 + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + add r1, r5, #0 + str r3, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + add r0, r4, #0 + add r0, #0x6c + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, #0x1c + mov r2, #0 + bl sub_0201A7E8 + mov r0, #0xf + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + add r0, r4, #0 + add r0, #0xa2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r1, r5, #0 + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, #0x2c + mov r2, #0 + mov r3, #0x17 + bl sub_0201A7E8 + add r0, r4, #0 + add r0, #0xc2 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + str r1, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + mov r0, #0x26 + add r2, r6, #0 + add r3, r1, #0 + bl sub_02006E3C + add r0, r4, #0 + add r0, #0xc2 + str r0, [r5, #0x60] + mov r0, #0x20 + str r0, [sp] + mov r0, #0x23 + mov r3, #7 + str r0, [sp, #4] + mov r0, #0x26 + mov r1, #0x18 + mov r2, #0 + lsl r3, r3, #6 + bl sub_02006E84 + ldr r0, [r5, #4] + bl ov20_021D2080 + lsl r0, r0, #0x18 + add r2, r4, #0 + lsr r0, r0, #0x18 + add r2, #0xcb + str r0, [sp] + mov r0, #0x23 + lsl r2, r2, #0x10 + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #0 + lsr r2, r2, #0x10 + mov r3, #0xf + bl sub_0200DD0C + add r0, r5, #0 + add r4, #0xcb + add r0, #0x1c + add r1, r4, #0 + mov r2, #0xf + bl sub_0200E010 + add r0, r5, #0 + add r0, #0xc + bl sub_0201A9F4 + add r0, r5, #0 + add r0, #0x1c + bl sub_0201A9F4 + add r0, r5, #0 + bl ov20_021D312C + add r0, r5, #0 + bl ov20_021D3228 + add r0, r5, #0 + mov r1, #0 + bl ov20_021D3578 + add r0, r5, #0 + bl ov20_021D3184 + add r0, r6, #0 + mov r1, #0 + bl sub_02019448 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov20_021D2F50 + + thumb_func_start ov20_021D30A4 +ov20_021D30A4: ; 0x021D30A4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #7 + lsl r0, r0, #6 + add r5, r1, #0 + str r0, [sp] + mov r0, #0x23 + mov r2, #0 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #6 + add r3, r2, #0 + bl sub_02007130 + add r0, r5, #0 + mov r1, #6 + add r2, sp, #8 + mov r3, #0x23 + bl sub_020071EC + add r5, r0, #0 + ldr r0, [sp, #8] + add r1, r4, #0 + mov r2, #5 + ldr r0, [r0, #0xc] + add r1, #0x70 + lsl r2, r2, #6 + bl sub_020C4B18 + add r4, #0x70 + mov r1, #5 + add r0, r4, #0 + lsl r1, r1, #6 + bl sub_020C2C54 + add r0, r5, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D30A4 + + thumb_func_start ov20_021D30F8 +ov20_021D30F8: ; 0x021D30F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov20_021D1F84 + cmp r0, #2 + bne _021D311E + ldr r0, [r4, #4] + bl ov20_021D1F9C + add r0, r0, #1 + add r4, #0x70 + lsl r0, r0, #5 + add r0, r4, r0 + mov r1, #0 + mov r2, #0x20 + bl sub_020C00B4 + pop {r4, pc} +_021D311E: + add r4, #0x70 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020C00B4 + pop {r4, pc} + thumb_func_end ov20_021D30F8 + + thumb_func_start ov20_021D312C +ov20_021D312C: ; 0x021D312C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov20_021D1F84 + cmp r0, #0 + beq _021D3144 + cmp r0, #1 + beq _021D315A + cmp r0, #2 + beq _021D317E + pop {r4, pc} +_021D3144: + add r0, r4, #0 + mov r1, #0x68 + add r0, #0x54 + strh r1, [r0] + add r0, r4, #0 + mov r1, #0x10 + add r0, #0x56 + strh r1, [r0] + mov r0, #1 + str r0, [r4, #0x5c] + pop {r4, pc} +_021D315A: + add r0, r4, #0 + mov r1, #0x30 + add r0, #0x54 + strh r1, [r0] + add r0, r4, #0 + mov r2, #0x10 + add r0, #0x56 + strh r2, [r0] + add r0, r4, #0 + mov r1, #0xa0 + add r0, #0x58 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x5a + strh r2, [r0] + mov r0, #2 + str r0, [r4, #0x5c] + pop {r4, pc} +_021D317E: + mov r0, #0 + str r0, [r4, #0x5c] + pop {r4, pc} + thumb_func_end ov20_021D312C + + thumb_func_start ov20_021D3184 +ov20_021D3184: ; 0x021D3184 + push {r3, r4, r5, lr} + sub sp, #0x30 + add r4, r0, #0 + ldr r0, [r4, #0x5c] + cmp r0, #0 + beq _021D319C + add r0, r4, #0 + add r0, #0x54 + add r1, sp, #8 + bl ov20_021D34E0 + b _021D31A6 +_021D319C: + mov r1, #0x80 + add r0, sp, #8 + strh r1, [r0] + mov r1, #0x18 + strh r1, [r0, #2] +_021D31A6: + mov r2, #0 + ldr r0, [r4, #0] + add r1, sp, #0xc + add r3, r2, #0 + bl ov20_021D2E0C + mov r2, #0 + str r2, [sp] + mov r0, #1 + str r0, [sp, #4] + add r5, sp, #8 + mov r3, #2 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + ldr r0, [r4, #0] + add r1, sp, #0xc + bl ov20_021D2E50 + str r0, [r4, #0x3c] + add r0, r4, #0 + mov r1, #1 + bl ov20_021D375C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0xc + mov r2, #6 + mov r3, #0x18 + bl ov20_021D2E50 + mov r1, #0xd + str r0, [r4, #0x40] + bl sub_02021D6C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0xc + mov r2, #0xfa + mov r3, #0x18 + bl ov20_021D2E50 + str r0, [r4, #0x44] + mov r1, #0xc + bl sub_02021D6C + ldr r0, [r4, #4] + bl ov20_021D1F84 + cmp r0, #2 + beq _021D3222 + ldr r0, [r4, #0x44] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_02021CAC +_021D3222: + add sp, #0x30 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3184 + + thumb_func_start ov20_021D3228 +ov20_021D3228: ; 0x021D3228 + push {r4, lr} + add r4, r0, #0 + bl ov20_021D30F8 + add r0, r4, #0 + add r0, #0xc + mov r1, #0xd + bl sub_0201ADA4 + ldr r0, [r4, #4] + bl ov20_021D1F84 + cmp r0, #0 + beq _021D324E + cmp r0, #1 + beq _021D3274 + cmp r0, #2 + beq _021D32BE + b _021D32C6 +_021D324E: + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xc + add r1, #0x54 + bl ov20_021D34F4 + ldr r0, [r4, #4] + mov r1, #0 + bl ov20_021D1FA8 + add r1, r4, #0 + add r2, r4, #0 + add r3, r0, #0 + add r0, r4, #0 + add r1, #0xc + add r2, #0x54 + bl ov20_021D351C + b _021D32C6 +_021D3274: + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xc + add r1, #0x54 + bl ov20_021D34F4 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xc + add r1, #0x58 + bl ov20_021D34F4 + ldr r0, [r4, #4] + mov r1, #0 + bl ov20_021D1FA8 + add r1, r4, #0 + add r2, r4, #0 + add r3, r0, #0 + add r0, r4, #0 + add r1, #0xc + add r2, #0x54 + bl ov20_021D351C + ldr r0, [r4, #4] + mov r1, #1 + bl ov20_021D1FA8 + add r1, r4, #0 + add r2, r4, #0 + add r3, r0, #0 + add r0, r4, #0 + add r1, #0xc + add r2, #0x58 + bl ov20_021D351C + b _021D32C6 +_021D32BE: + add r0, r4, #0 + bl ov20_021D32D0 + str r0, [r4, #0x5c] +_021D32C6: + add r4, #0xc + add r0, r4, #0 + bl sub_0201ACCC + pop {r4, pc} + thumb_func_end ov20_021D3228 + + thumb_func_start ov20_021D32D0 +ov20_021D32D0: ; 0x021D32D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #0x10] + ldr r0, [r0, #4] + mov r1, #0x23 + bl ov20_021D1FC0 + mov r4, #0 + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x10] + add r0, #0x64 + str r4, [sp, #0x18] + add r5, r4, #0 + bl ov20_021D33C8 + ldr r7, [sp, #0x10] + add r0, r7, #0 + str r0, [sp, #0x24] + add r0, #0xc + str r0, [sp, #0x24] + add r0, r7, #0 + add r6, r7, #0 + str r0, [sp, #0x20] + add r0, #0x64 + add r6, #0x54 + str r0, [sp, #0x20] +_021D330A: + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x1c] + bl ov20_021D3400 + cmp r0, #3 + bhi _021D33A2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D3322: ; jump table + .short _021D332A - _021D3322 - 2 ; case 0 + .short _021D3352 - _021D3322 - 2 ; case 1 + .short _021D3398 - _021D3322 - 2 ; case 2 + .short _021D339E - _021D3322 - 2 ; case 3 +_021D332A: + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D33C0 ; =0x0003040D + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x24] + mov r1, #1 + add r3, r5, #0 + bl sub_0201D78C + ldr r1, [sp, #0x1c] + mov r0, #1 + mov r2, #0 + bl sub_02002D7C + add r5, r5, r0 + b _021D33A2 +_021D3352: + add r1, r5, #0 + add r0, r7, #0 + add r1, #0x32 + add r0, #0x54 + strh r1, [r0] + add r1, r4, #0 + add r0, r7, #0 + add r1, #8 + add r0, #0x56 + strh r1, [r0] + ldr r0, [sp, #0x24] + add r1, r6, #0 + bl ov20_021D34F4 + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x18] + ldr r0, [r0, #4] + bl ov20_021D1FA8 + add r3, r0, #0 + ldr r0, _021D33C4 ; =0x0000FFFF + cmp r3, r0 + beq _021D338A + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x24] + add r2, r6, #0 + bl ov20_021D351C +_021D338A: + ldr r0, [sp, #0x18] + add r7, r7, #4 + add r0, r0, #1 + add r6, r6, #4 + str r0, [sp, #0x18] + add r5, #0x64 + b _021D33A2 +_021D3398: + add r4, #0x10 + mov r5, #0 + b _021D33A2 +_021D339E: + mov r0, #0 + str r0, [sp, #0x14] +_021D33A2: + ldr r0, [sp, #0x14] + cmp r0, #0 + bne _021D330A + ldr r0, [sp, #0x10] + add r0, #0x64 + str r0, [sp, #0x10] + bl ov20_021D33F4 + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x18] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D33C0: .word 0x0003040D +_021D33C4: .word 0x0000FFFF + thumb_func_end ov20_021D32D0 + + thumb_func_start ov20_021D33C8 +ov20_021D33C8: ; 0x021D33C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #4] + mov r1, #0x23 + bl ov20_021D1FC0 + str r0, [r4, #0] + bl sub_02023E2C + str r0, [r4, #4] + ldrh r1, [r0] + ldr r0, _021D33F0 ; =0x0000FFFE + cmp r1, r0 + bne _021D33EA + mov r0, #1 + str r0, [r4, #8] + pop {r4, pc} +_021D33EA: + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_021D33F0: .word 0x0000FFFE + thumb_func_end ov20_021D33C8 + + thumb_func_start ov20_021D33F4 +ov20_021D33F4: ; 0x021D33F4 + ldr r3, _021D33FC ; =sub_020237BC + ldr r0, [r0, #0] + bx r3 + nop +_021D33FC: .word sub_020237BC + thumb_func_end ov20_021D33F4 + + thumb_func_start ov20_021D3400 +ov20_021D3400: ; 0x021D3400 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + str r1, [sp] + mov ip, r0 + ldr r0, [r4, #8] + cmp r0, #3 + bhi _021D3490 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D341C: ; jump table + .short _021D3424 - _021D341C - 2 ; case 0 + .short _021D347A - _021D341C - 2 ; case 1 + .short _021D3486 - _021D341C - 2 ; case 2 + .short _021D3490 - _021D341C - 2 ; case 3 +_021D3424: + cmp r0, #0 + bne _021D3460 + ldr r6, _021D34C8 ; =0x0000FFFE + mov r3, #0xe + mov r0, #1 + mov r1, #3 + mov r2, #2 + add r7, r6, #1 + lsl r3, r3, #0xc +_021D3436: + ldr r5, [r4, #4] + ldrh r5, [r5] + cmp r5, r3 + beq _021D3448 + cmp r5, r6 + beq _021D3450 + cmp r5, r7 + beq _021D344C + b _021D3454 +_021D3448: + str r2, [r4, #8] + b _021D345A +_021D344C: + str r1, [r4, #8] + b _021D345A +_021D3450: + str r0, [r4, #8] + b _021D345A +_021D3454: + ldr r5, [r4, #4] + add r5, r5, #2 + str r5, [r4, #4] +_021D345A: + ldr r5, [r4, #8] + cmp r5, #0 + beq _021D3436 +_021D3460: + ldr r3, [r4, #4] + mov r2, ip + sub r3, r3, r2 + lsr r2, r3, #0x1f + add r2, r3, r2 + asr r2, r2, #1 + ldr r0, [sp] + mov r1, ip + add r2, r2, #1 + bl sub_02023D8C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D347A: + mov r0, ip + bl sub_0201D0C8 + str r0, [r4, #4] + mov r0, #1 + b _021D3494 +_021D3486: + mov r0, ip + add r0, r0, #2 + str r0, [r4, #4] + mov r0, #2 + b _021D3494 +_021D3490: + mov r0, #3 + pop {r3, r4, r5, r6, r7, pc} +_021D3494: + ldr r1, [r4, #4] + ldrh r2, [r1] + mov r1, #0xe + lsl r1, r1, #0xc + cmp r2, r1 + beq _021D34AE + ldr r1, _021D34C8 ; =0x0000FFFE + cmp r2, r1 + beq _021D34BA + add r1, r1, #1 + cmp r2, r1 + beq _021D34B4 + b _021D34C0 +_021D34AE: + mov r1, #2 + str r1, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_021D34B4: + mov r1, #3 + str r1, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_021D34BA: + mov r1, #1 + str r1, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_021D34C0: + mov r1, #0 + str r1, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} + nop +_021D34C8: .word 0x0000FFFE + thumb_func_end ov20_021D3400 + + thumb_func_start ov20_021D34CC +ov20_021D34CC: ; 0x021D34CC + mov r2, #0 + ldrsh r2, [r0, r2] + sub r2, #0x30 + strh r2, [r1] + mov r2, #2 + ldrsh r0, [r0, r2] + sub r0, #8 + strh r0, [r1, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D34CC + + thumb_func_start ov20_021D34E0 +ov20_021D34E0: ; 0x021D34E0 + mov r2, #0 + ldrsh r2, [r0, r2] + add r2, #0x18 + strh r2, [r1] + mov r2, #2 + ldrsh r0, [r0, r2] + add r0, #8 + strh r0, [r1, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov20_021D34E0 + + thumb_func_start ov20_021D34F4 +ov20_021D34F4: ; 0x021D34F4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, r1, #0 + add r1, sp, #8 + bl ov20_021D34CC + mov r0, #0x60 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r3, sp, #8 + ldrh r2, [r3] + ldrh r3, [r3, #2] + add r0, r4, #0 + mov r1, #0xe + bl sub_0201AE78 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov20_021D34F4 + + thumb_func_start ov20_021D351C +ov20_021D351C: ; 0x021D351C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, _021D356C ; =0x0000FFFF + add r6, r3, #0 + add r4, r1, #0 + cmp r6, r0 + beq _021D3566 + add r0, r2, #0 + add r1, sp, #0x10 + bl ov20_021D34CC + ldr r1, [r5, #0x4c] + add r0, r6, #0 + bl sub_02014DB8 + ldr r1, [r5, #0x4c] + mov r0, #1 + mov r2, #0 + bl sub_02002D7C + add r3, sp, #0x10 + mov r0, #2 + ldrsh r0, [r3, r0] + mov r6, #0 + mov r1, #1 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3570 ; =0x0005060E + str r0, [sp, #8] + str r6, [sp, #0xc] + ldrsh r3, [r3, r6] + ldr r2, [r5, #0x4c] + add r0, r4, #0 + bl sub_0201D78C +_021D3566: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_021D356C: .word 0x0000FFFF +_021D3570: .word 0x0005060E + thumb_func_end ov20_021D351C + + thumb_func_start ov20_021D3574 +ov20_021D3574: ; 0x021D3574 + ldr r0, [r0, #0x5c] + bx lr + thumb_func_end ov20_021D3574 + + thumb_func_start ov20_021D3578 +ov20_021D3578: ; 0x021D3578 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + add r5, r1, #0 + add r0, #0x1c + mov r1, #9 + bl sub_0201ADA4 + cmp r5, #3 + bhi _021D3674 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D3598: ; jump table + .short _021D35A0 - _021D3598 - 2 ; case 0 + .short _021D362A - _021D3598 - 2 ; case 1 + .short _021D3604 - _021D3598 - 2 ; case 2 + .short _021D3650 - _021D3598 - 2 ; case 3 +_021D35A0: + mov r0, #2 + mov r1, #0x3c + mov r2, #0 + bl sub_0200B368 + add r5, r0, #0 + mov r0, #0x4b + lsl r0, r0, #2 + mov r1, #0 + bl sub_02023790 + mov r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r2, r1, #0 + bl sub_0200B7B4 + ldr r0, [r4, #4] + bl ov20_021D1F88 + add r1, r0, #0 + ldr r0, [r4, #0x48] + ldr r2, [r4, #0x4c] + bl sub_0200B1B8 + ldr r2, [r4, #0x4c] + add r0, r5, #0 + add r1, r6, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3680 ; =0x00010209 + mov r1, #1 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x1c + add r2, r6, #0 + str r3, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_0200B3F0 + b _021D3674 +_021D3604: + ldr r0, [r4, #0x48] + ldr r2, [r4, #0x4c] + mov r1, #6 + bl sub_0200B1B8 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3680 ; =0x00010209 + mov r1, #1 + str r0, [sp, #8] + str r3, [sp, #0xc] + add r0, r4, #0 + ldr r2, [r4, #0x4c] + add r0, #0x1c + bl sub_0201D78C + b _021D3674 +_021D362A: + ldr r0, [r4, #0x48] + ldr r2, [r4, #0x4c] + mov r1, #7 + bl sub_0200B1B8 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3680 ; =0x00010209 + mov r1, #1 + str r0, [sp, #8] + str r3, [sp, #0xc] + add r0, r4, #0 + ldr r2, [r4, #0x4c] + add r0, #0x1c + bl sub_0201D78C + b _021D3674 +_021D3650: + ldr r0, [r4, #0x48] + ldr r2, [r4, #0x4c] + mov r1, #8 + bl sub_0200B1B8 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3680 ; =0x00010209 + mov r1, #1 + str r0, [sp, #8] + str r3, [sp, #0xc] + add r0, r4, #0 + ldr r2, [r4, #0x4c] + add r0, #0x1c + bl sub_0201D78C +_021D3674: + add r4, #0x1c + add r0, r4, #0 + bl sub_0201ACCC + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D3680: .word 0x00010209 + thumb_func_end ov20_021D3578 + + thumb_func_start ov20_021D3684 +ov20_021D3684: ; 0x021D3684 + ldr r3, _021D368C ; =ov20_021D375C + mov r1, #0 + bx r3 + nop +_021D368C: .word ov20_021D375C + thumb_func_end ov20_021D3684 + + thumb_func_start ov20_021D3690 +ov20_021D3690: ; 0x021D3690 + ldr r3, _021D3698 ; =ov20_021D375C + mov r1, #1 + bx r3 + nop +_021D3698: .word ov20_021D375C + thumb_func_end ov20_021D3690 + + thumb_func_start ov20_021D369C +ov20_021D369C: ; 0x021D369C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_02021CAC + add r0, r4, #0 + mov r1, #1 + bl ov20_021D375C + pop {r4, pc} + thumb_func_end ov20_021D369C + + thumb_func_start ov20_021D36B0 +ov20_021D36B0: ; 0x021D36B0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov20_021D1F84 + cmp r0, #2 + bne _021D36CE + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x44] + mov r1, #0 + bl sub_02021CAC +_021D36CE: + pop {r4, pc} + thumb_func_end ov20_021D36B0 + + thumb_func_start ov20_021D36D0 +ov20_021D36D0: ; 0x021D36D0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov20_021D1F84 + cmp r0, #2 + bne _021D36FE + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0x44] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0x40] + mov r1, #0xd + bl sub_02021D6C + ldr r0, [r4, #0x44] + mov r1, #0xc + bl sub_02021D6C +_021D36FE: + pop {r4, pc} + thumb_func_end ov20_021D36D0 + + thumb_func_start ov20_021D3700 +ov20_021D3700: ; 0x021D3700 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #0x5c] + cmp r0, #0 + beq _021D3730 + add r2, r4, #0 + lsl r0, r1, #2 + add r2, #0x54 + add r0, r2, r0 + add r1, sp, #0 + bl ov20_021D34E0 + add r1, sp, #0 + mov r2, #0 + ldrsh r0, [r1, r2] + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #2 + ldrsh r0, [r1, r0] + lsl r0, r0, #0xc + str r0, [sp, #8] + str r2, [sp, #0xc] + b _021D3748 +_021D3730: + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #4] + mov r0, #6 + lsl r0, r0, #0xe + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [r4, #0x3c] + add r1, sp, #4 + bl sub_02021C50 +_021D3748: + ldr r0, [r4, #0x3c] + add r1, sp, #4 + bl sub_02021C50 + add r0, r4, #0 + mov r1, #1 + bl ov20_021D375C + add sp, #0x10 + pop {r4, pc} + thumb_func_end ov20_021D3700 + + thumb_func_start ov20_021D375C +ov20_021D375C: ; 0x021D375C + push {r3, lr} + ldr r2, [r0, #0x5c] + cmp r2, #0 + beq _021D377A + cmp r1, #0 + ldr r0, [r0, #0x3c] + beq _021D3772 + mov r1, #0 + bl sub_02021D6C + pop {r3, pc} +_021D3772: + mov r1, #1 + bl sub_02021D6C + pop {r3, pc} +_021D377A: + cmp r1, #0 + ldr r0, [r0, #0x3c] + beq _021D3788 + mov r1, #0xe + bl sub_02021D6C + pop {r3, pc} +_021D3788: + mov r1, #0xf + bl sub_02021D6C + pop {r3, pc} + thumb_func_end ov20_021D375C + + thumb_func_start ov20_021D3790 +ov20_021D3790: ; 0x021D3790 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x2c + mov r1, #9 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + ldr r2, [r5, #0x4c] + mov r1, #9 + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3818 ; =0x00010209 + mov r3, #0xe + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + ldr r2, [r5, #0x4c] + add r0, #0x2c + bl sub_0201D78C + ldr r0, [r5, #0x48] + ldr r2, [r5, #0x4c] + mov r1, #0xa + bl sub_0200B1B8 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3818 ; =0x00010209 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + ldr r2, [r5, #0x4c] + add r0, #0x2c + mov r3, #0xe + bl sub_0201D78C + ldr r2, [r5, #0x60] + add r0, r5, #0 + lsl r2, r2, #0x10 + add r0, #0x2c + mov r1, #0 + lsr r2, r2, #0x10 + mov r3, #0xe + bl sub_0200DC48 + add r1, r5, #0 + ldr r0, [r5, #0x50] + add r1, #0x2c + mov r2, #0 + lsl r3, r4, #4 + bl sub_02014A58 + add r5, #0x2c + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_021D3818: .word 0x00010209 + thumb_func_end ov20_021D3790 + + thumb_func_start ov20_021D381C +ov20_021D381C: ; 0x021D381C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0xe + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0 + add r4, r1, #0 + add r0, #0x2c + mov r1, #9 + add r3, r2, #0 + bl sub_0201AE78 + ldr r0, [r5, #0x50] + add r5, #0x2c + add r1, r5, #0 + mov r2, #0 + lsl r3, r4, #4 + bl sub_02014A58 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D381C + + thumb_func_start ov20_021D384C +ov20_021D384C: ; 0x021D384C + push {r4, lr} + add r4, r0, #0 + add r0, #0x2c + mov r1, #0 + bl sub_0200DC9C + add r4, #0x2c + add r0, r4, #0 + bl sub_0201ACF4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D384C \ No newline at end of file diff --git a/asm/ov20_021D3864.s b/asm/ov20_021D3864.s new file mode 100644 index 000000000..84b99132e --- /dev/null +++ b/asm/ov20_021D3864.s @@ -0,0 +1,284 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D3864 +ov20_021D3864: ; 0x021D3864 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x23 + mov r1, #0x10 + add r6, r2, #0 + bl sub_02018144 + str r5, [r0, #0] + str r4, [r0, #4] + str r6, [r0, #8] + mov r1, #0 + str r1, [r0, #0xc] + pop {r4, r5, r6, pc} + thumb_func_end ov20_021D3864 + + thumb_func_start ov20_021D3880 +ov20_021D3880: ; 0x021D3880 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D388E + bl sub_02021BD4 +_021D388E: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3880 + + thumb_func_start ov20_021D3898 +ov20_021D3898: ; 0x021D3898 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + bl ov20_021D2E04 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #4 + add r2, r4, #0 + mov r3, #3 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #5 + add r2, r4, #0 + mov r3, #3 + bl sub_020070E8 + ldr r1, _021D3904 ; =0x021D52D4 + add r0, r4, #0 + mov r2, #0 + bl ov20_021D390C + ldr r1, _021D3908 ; =0x021D52DC + add r0, r4, #0 + mov r2, #1 + bl ov20_021D390C + add r0, r5, #0 + bl ov20_021D3980 + add r0, r4, #0 + mov r1, #3 + bl sub_02019448 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D3904: .word 0x021D52D4 +_021D3908: .word 0x021D52DC + thumb_func_end ov20_021D3898 + + thumb_func_start ov20_021D390C +ov20_021D390C: ; 0x021D390C + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r1, #0 + add r4, r2, #0 + add r1, sp, #0x10 + add r2, r5, #0 + bl sub_0201A8D4 + add r0, sp, #0x10 + bl sub_0201A9F4 + add r0, sp, #0x10 + mov r1, #0xe + bl sub_0201ADA4 + ldr r1, _021D3978 ; =0x000001B6 + mov r0, #0x1a + add r2, r4, #0 + mov r3, #0x23 + bl sub_0200B010 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r5, #3] + add r2, r4, #0 + lsl r1, r1, #3 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D397C ; =0x0001020E + str r0, [sp, #8] + add r0, sp, #0x10 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, sp, #0x10 + bl sub_0201ACCC + add r0, r4, #0 + bl sub_020237BC + add r0, sp, #0x10 + bl sub_0201A8FC + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_021D3978: .word 0x000001B6 +_021D397C: .word 0x0001020E + thumb_func_end ov20_021D390C + + thumb_func_start ov20_021D3980 +ov20_021D3980: ; 0x021D3980 + push {r3, r4, lr} + sub sp, #0x2c + add r4, r0, #0 + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0 + mov r3, #3 + bl ov20_021D2E0C + mov r0, #5 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0x40 + mov r3, #0x38 + bl ov20_021D2E50 + str r0, [r4, #0xc] + mov r1, #2 + bl sub_02021D6C + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02021CAC + add sp, #0x2c + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3980 + + thumb_func_start ov20_021D39BC +ov20_021D39BC: ; 0x021D39BC + ldr r3, _021D39C4 ; =sub_02021D6C + ldr r0, [r0, #0xc] + mov r1, #3 + bx r3 + ; .align 2, 0 +_021D39C4: .word sub_02021D6C + thumb_func_end ov20_021D39BC + + thumb_func_start ov20_021D39C8 +ov20_021D39C8: ; 0x021D39C8 + ldr r3, _021D39D0 ; =sub_02021D6C + ldr r0, [r0, #0xc] + mov r1, #2 + bx r3 + ; .align 2, 0 +_021D39D0: .word sub_02021D6C + thumb_func_end ov20_021D39C8 + + thumb_func_start ov20_021D39D4 +ov20_021D39D4: ; 0x021D39D4 + ldr r3, _021D39DC ; =sub_02021CAC + ldr r0, [r0, #0xc] + bx r3 + nop +_021D39DC: .word sub_02021CAC + thumb_func_end ov20_021D39D4 + + thumb_func_start ov20_021D39E0 +ov20_021D39E0: ; 0x021D39E0 + ldr r3, _021D39E8 ; =sub_02021D34 + ldr r0, [r0, #0xc] + bx r3 + nop +_021D39E8: .word sub_02021D34 + thumb_func_end ov20_021D39E0 + + thumb_func_start ov20_021D39EC +ov20_021D39EC: ; 0x021D39EC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0 + str r0, [sp, #8] + cmp r1, #0 + beq _021D39FE + cmp r1, #1 + beq _021D3A0C +_021D39FE: + mov r0, #1 + lsl r0, r0, #0x12 + str r0, [sp] + mov r0, #0xe + lsl r0, r0, #0xe + str r0, [sp, #4] + b _021D3A18 +_021D3A0C: + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [sp] + mov r0, #0xe + lsl r0, r0, #0xe + str r0, [sp, #4] +_021D3A18: + ldr r0, [r4, #0xc] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0xc] + mov r1, #2 + bl sub_02021D6C + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov20_021D39EC + + thumb_func_start ov20_021D3A2C +ov20_021D3A2C: ; 0x021D3A2C + push {r3, lr} + ldr r0, [r0, #0] + bl ov20_021D2E04 + mov r1, #3 + add r2, r1, #0 + mov r3, #0x40 + bl sub_02019184 + pop {r3, pc} + thumb_func_end ov20_021D3A2C + + thumb_func_start ov20_021D3A40 +ov20_021D3A40: ; 0x021D3A40 + push {r3, lr} + ldr r0, [r0, #0] + bl ov20_021D2E04 + mov r1, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + pop {r3, pc} + thumb_func_end ov20_021D3A40 + + .rodata + + + .global Unk_ov20_021D52D4 +Unk_ov20_021D52D4: ; 0x021D52D4 + .incbin "incbin/overlay20_rodata.bin", 0x194, 0x19C - 0x194 + + .global Unk_ov20_021D52DC +Unk_ov20_021D52DC: ; 0x021D52DC + .incbin "incbin/overlay20_rodata.bin", 0x19C, 0x8 + diff --git a/asm/ov20_021D3A54.s b/asm/ov20_021D3A54.s new file mode 100644 index 000000000..9a9a20c04 --- /dev/null +++ b/asm/ov20_021D3A54.s @@ -0,0 +1,879 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D3A54 +ov20_021D3A54: ; 0x021D3A54 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x23 + mov r1, #0x60 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + add r0, r5, #0 + bl ov20_021D2E04 + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x10] + str r0, [r4, #0x18] + str r0, [r4, #0x5c] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov20_021D3A54 + + thumb_func_start ov20_021D3A80 +ov20_021D3A80: ; 0x021D3A80 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x5c] + cmp r0, #0 + beq _021D3A8E + bl sub_02021BD4 +_021D3A8E: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3A80 + + thumb_func_start ov20_021D3A98 +ov20_021D3A98: ; 0x021D3A98 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + bl ov20_021D2E04 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #2 + add r2, r4, #0 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #3 + add r2, r4, #0 + bl sub_020070E8 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + lsr r2, r2, #5 + bl ov20_021D3B74 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D3C78 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D3D44 + mov r2, #0 + add r0, r4, #0 + mov r1, #1 + sub r3, r2, #4 + bl sub_02019184 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + mov r3, #2 + bl sub_02019184 + add r0, r5, #0 + bl ov20_021D3E0C + mov r1, #2 + add r2, r1, #0 + ldr r0, _021D3B68 ; =0x04000050 + sub r2, #0xc + bl sub_020BF578 + ldr r0, _021D3B6C ; =0x04000048 + mov r2, #0x3f + ldrh r3, [r0] + mov r1, #0x1f + bic r3, r2 + orr r1, r3 + mov r3, #0x20 + orr r1, r3 + strh r1, [r0] + ldrh r5, [r0, #2] + mov r1, #0x1d + bic r5, r2 + orr r1, r5 + orr r1, r3 + strh r1, [r0, #2] + add r1, r0, #0 + mov r2, #0xff + sub r1, #8 + strh r2, [r1] + mov r1, #0xa0 + sub r0, r0, #4 + strh r1, [r0] + lsl r2, r3, #0x15 + ldr r1, [r2, #0] + ldr r0, _021D3B70 ; =0xFFFF1FFF + and r1, r0 + lsl r0, r3, #8 + orr r0, r1 + str r0, [r2, #0] + add r0, r4, #0 + mov r1, #1 + bl sub_02019448 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D3B68: .word 0x04000050 +_021D3B6C: .word 0x04000048 +_021D3B70: .word 0xFFFF1FFF + thumb_func_end ov20_021D3A98 + + thumb_func_start ov20_021D3B74 +ov20_021D3B74: ; 0x021D3B74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r6, r2, #0 + mov r2, #0x6d + str r0, [sp, #0x14] + str r1, [sp, #0x18] + mov r0, #1 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x23 + bl sub_0200B144 + str r0, [sp, #0x20] + mov r0, #9 + mov r7, #1 + str r0, [sp, #0x24] + mov r4, #0 +_021D3B96: + cmp r4, #0 + beq _021D3BAE + add r0, r4, #0 + mov r1, #3 + bl sub_020E1F6C + cmp r1, #0 + bne _021D3BAE + ldr r0, [sp, #0x24] + mov r7, #1 + add r0, r0, #3 + str r0, [sp, #0x24] +_021D3BAE: + ldr r0, [sp, #0x14] + add r1, r4, #0 + ldr r0, [r0, #8] + bl sub_02099CA0 + cmp r0, #0 + beq _021D3BCC + ldr r0, [sp, #0x20] + add r1, r4, #0 + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, _021D3C6C ; =0x0001020F + str r0, [sp, #0x1c] + b _021D3BDA +_021D3BCC: + ldr r0, [sp, #0x20] + mov r1, #0xc + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, _021D3C70 ; =0x0003040F + str r0, [sp, #0x1c] +_021D3BDA: + ldr r0, _021D3C74 ; =0x000003EE + cmp r6, r0 + blo _021D3BE4 + bl sub_02022974 +_021D3BE4: + ldr r0, [sp, #0x24] + lsl r3, r7, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + add r1, sp, #0x28 + mov r2, #1 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, sp, #0x28 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x48 + sub r0, r1, r0 + lsr r3, r0, #1 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, sp, #0x28 + add r2, r5, #0 + bl sub_0201D78C + add r0, sp, #0x28 + bl sub_0201A9F4 + add r0, sp, #0x28 + bl sub_0201ACCC + add r0, r5, #0 + bl sub_020237BC + add r0, sp, #0x28 + bl sub_0201A8FC + add r4, r4, #1 + add r6, #0x12 + add r7, #0xa + cmp r4, #0xc + blt _021D3B96 + ldr r0, [sp, #0x20] + bl sub_0200B190 + add r0, r6, #0 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3C6C: .word 0x0001020F +_021D3C70: .word 0x0003040F +_021D3C74: .word 0x000003EE + thumb_func_end ov20_021D3B74 + + thumb_func_start ov20_021D3C78 +ov20_021D3C78: ; 0x021D3C78 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r4, r1, #0 + mov r1, #0xce + add r6, r0, #0 + lsl r1, r1, #2 + add r0, r2, #0 + str r2, [sp, #0x14] + cmp r0, r1 + blo _021D3C90 + bl sub_02022974 +_021D3C90: + mov r0, #0xa + str r0, [sp] + mov r0, #0x19 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + add r1, sp, #0x20 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r2, #1 + mov r3, #0x22 + bl sub_0201A7E8 + mov r0, #4 + mov r1, #0x23 + bl sub_02023790 + add r4, r0, #0 + add r0, sp, #0x20 + mov r1, #0xf + bl sub_0201ADA4 + bl ov20_021D5044 + add r7, r0, #0 + ldr r5, _021D3D38 ; =0x00000000 + beq _021D3D16 +_021D3CD0: + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D5048 + add r0, r5, #0 + add r1, sp, #0x1c + add r2, sp, #0x18 + bl ov20_021D506C + ldr r0, [r6, #8] + add r1, r5, #0 + bl sub_02099CDC + cmp r0, #0 + beq _021D3CF2 + ldr r1, _021D3D3C ; =0x0001020F + b _021D3CF4 +_021D3CF2: + ldr r1, _021D3D40 ; =0x0003040F +_021D3CF4: + ldr r0, [sp, #0x18] + add r2, r4, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r3, [sp, #0x1c] + add r0, sp, #0x20 + mov r1, #0 + add r3, r3, #3 + bl sub_0201D78C + add r5, r5, #1 + cmp r5, r7 + blo _021D3CD0 +_021D3D16: + add r0, sp, #0x20 + bl sub_0201ACCC + add r0, sp, #0x20 + bl sub_0201A9F4 + add r0, r4, #0 + bl sub_020237BC + add r0, sp, #0x20 + bl sub_0201A8FC + ldr r0, [sp, #0x14] + add r0, #0xc8 + str r0, [sp, #0x14] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3D38: .word 0x00000000 +_021D3D3C: .word 0x0001020F +_021D3D40: .word 0x0003040F + thumb_func_end ov20_021D3C78 + + thumb_func_start ov20_021D3D44 +ov20_021D3D44: ; 0x021D3D44 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r2, #0 + mov r2, #0x6d + str r1, [sp, #0x14] + mov r0, #1 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x23 + bl sub_0200B144 + mov r1, #0xd + str r0, [sp, #0x20] + bl sub_0200B1EC + str r0, [sp, #0x1c] + mov r0, #0 + ldr r1, [sp, #0x1c] + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x40 + sub r0, r1, r0 + lsr r0, r0, #1 + ldr r4, _021D3E04 ; =0x021D52E4 + str r0, [sp, #0x18] + mov r7, #0 + add r6, sp, #0x24 +_021D3D7C: + mov r0, #0x3f + lsl r0, r0, #4 + cmp r5, r0 + blo _021D3D88 + bl sub_02022974 +_021D3D88: + ldrh r0, [r4, #2] + add r1, r6, #0 + mov r2, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [sp, #0x14] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r6, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D3E08 ; =0x0001020F + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r3, [sp, #0x18] + add r0, r6, #0 + mov r1, #0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_0201A9F4 + add r0, r6, #0 + bl sub_0201ACCC + add r0, r6, #0 + bl sub_0201A8FC + add r7, r7, #1 + add r5, #0x10 + add r4, r4, #4 + cmp r7, #2 + blo _021D3D7C + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_0200B190 + add r0, r5, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3E04: .word 0x021D52E4 +_021D3E08: .word 0x0001020F + thumb_func_end ov20_021D3D44 + + thumb_func_start ov20_021D3E0C +ov20_021D3E0C: ; 0x021D3E0C + push {r3, r4, lr} + sub sp, #0x2c + add r4, r0, #0 + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0 + mov r3, #1 + bl ov20_021D2E0C + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0x30 + mov r3, #0x36 + bl ov20_021D2E50 + str r0, [r4, #0x5c] + mov r1, #4 + bl sub_02021D6C + ldr r0, [r4, #0x5c] + mov r1, #0 + bl sub_02021CAC + add sp, #0x2c + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3E0C + + thumb_func_start ov20_021D3E48 +ov20_021D3E48: ; 0x021D3E48 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x5c] + add r4, r1, #0 + bl sub_02021CAC + cmp r4, #0 + beq _021D3E72 + ldr r0, [r5, #4] + bl ov20_021D1F94 + cmp r0, #0 + ldr r0, [r5, #0x5c] + bne _021D3E6C + mov r1, #4 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D3E6C: + mov r1, #6 + bl sub_02021D6C +_021D3E72: + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D3E48 + + thumb_func_start ov20_021D3E74 +ov20_021D3E74: ; 0x021D3E74 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #4] + add r5, r1, #0 + bl ov20_021D1F94 + mov r1, #0 + str r1, [sp, #0x10] + cmp r5, #0xfe + bne _021D3E96 + mov r0, #0x84 + str r0, [sp, #8] + mov r0, #0x96 + str r0, [sp, #0xc] + mov r5, #0x10 + b _021D3ED6 +_021D3E96: + cmp r0, #0 + bne _021D3EBE + add r0, r5, #0 + mov r1, #3 + bl sub_020E2178 + mov r0, #0x50 + mul r0, r1 + add r0, #0x30 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #3 + bl sub_020E2178 + mov r1, #0x18 + mul r1, r0 + add r1, #0x36 + str r1, [sp, #0xc] + mov r5, #4 + b _021D3ED6 +_021D3EBE: + add r0, r5, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov20_021D506C + ldr r0, [sp, #4] + mov r5, #6 + add r0, #0x1a + str r0, [sp, #8] + ldr r0, [sp] + add r0, #0x3e + str r0, [sp, #0xc] +_021D3ED6: + ldr r0, [sp, #8] + add r1, sp, #8 + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [sp, #0xc] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, [r4, #0x5c] + bl sub_02021C50 + ldr r0, [r4, #0x5c] + add r1, r5, #0 + bl sub_02021D6C + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3E74 + + thumb_func_start ov20_021D3EF8 +ov20_021D3EF8: ; 0x021D3EF8 + push {r3, lr} + mov r3, #0 + str r3, [r0, #0x14] + mov r1, #0x10 + str r1, [sp] + mov r1, #2 + add r2, r1, #0 + add r0, #0x1c + sub r2, #0xc + bl ov20_021D4FB0 + pop {r3, pc} + thumb_func_end ov20_021D3EF8 + + thumb_func_start ov20_021D3F10 +ov20_021D3F10: ; 0x021D3F10 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D3F22 + cmp r0, #1 + beq _021D3F4C + b _021D3F58 +_021D3F22: + add r0, r4, #0 + add r0, #0x1c + bl ov20_021D4FF0 + cmp r0, #0 + beq _021D3F58 + mov r0, #0x18 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #1 + ldr r1, [r4, #0xc] + add r0, #0x3c + add r3, r2, #0 + bl ov20_021D4E38 + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + b _021D3F58 +_021D3F4C: + add r4, #0x3c + add r0, r4, #0 + bl ov20_021D4E8C + add sp, #8 + pop {r4, pc} +_021D3F58: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3F10 + + thumb_func_start ov20_021D3F60 +ov20_021D3F60: ; 0x021D3F60 + push {r3, lr} + sub sp, #8 + add r1, r0, #0 + mov r0, #0 + str r0, [r1, #0x14] + sub r0, #0x18 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + add r0, r1, #0 + mov r2, #1 + ldr r1, [r1, #0xc] + add r0, #0x3c + add r3, r2, #0 + bl ov20_021D4E38 + add sp, #8 + pop {r3, pc} + thumb_func_end ov20_021D3F60 + + thumb_func_start ov20_021D3F84 +ov20_021D3F84: ; 0x021D3F84 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D3F96 + cmp r0, #1 + beq _021D3FBE + b _021D3FCA +_021D3F96: + add r0, r4, #0 + add r0, #0x3c + bl ov20_021D4E8C + cmp r0, #0 + beq _021D3FCA + mov r0, #0x10 + mov r2, #0 + str r0, [sp] + add r0, r4, #0 + add r3, r2, #0 + add r0, #0x1c + mov r1, #2 + sub r3, #0xa + bl ov20_021D4FB0 + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + b _021D3FCA +_021D3FBE: + add r4, #0x1c + add r0, r4, #0 + bl ov20_021D4FF0 + add sp, #4 + pop {r3, r4, pc} +_021D3FCA: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov20_021D3F84 + + thumb_func_start ov20_021D3FD0 +ov20_021D3FD0: ; 0x021D3FD0 + push {r3, lr} + ldr r0, [r0, #0xc] + mov r1, #1 + mov r2, #3 + mov r3, #2 + bl sub_02019184 + pop {r3, pc} + thumb_func_end ov20_021D3FD0 + + thumb_func_start ov20_021D3FE0 +ov20_021D3FE0: ; 0x021D3FE0 + push {r3, lr} + mov r2, #0 + mov r1, #0x10 + add r3, r2, #0 + str r1, [sp] + add r0, #0x1c + mov r1, #2 + sub r3, #0xa + bl ov20_021D4FB0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov20_021D3FE0 + + thumb_func_start ov20_021D3FF8 +ov20_021D3FF8: ; 0x021D3FF8 + ldr r3, _021D4000 ; =ov20_021D4FF0 + add r0, #0x1c + bx r3 + nop +_021D4000: .word ov20_021D4FF0 + thumb_func_end ov20_021D3FF8 + + thumb_func_start ov20_021D4004 +ov20_021D4004: ; 0x021D4004 + push {r3, lr} + sub sp, #8 + mov r1, #0 + str r1, [sp] + mov r1, #0xc + str r1, [sp, #4] + add r0, #0x1c + mov r1, #2 + mov r2, #0x3f + mov r3, #0x7c + bl ov20_021D4F1C + add sp, #8 + pop {r3, pc} + thumb_func_end ov20_021D4004 + + thumb_func_start ov20_021D4020 +ov20_021D4020: ; 0x021D4020 + push {r3, lr} + add r0, #0x1c + bl ov20_021D4F4C + cmp r0, #0 + beq _021D4038 + mov r0, #1 + mov r1, #0 + bl sub_02019120 + mov r0, #1 + pop {r3, pc} +_021D4038: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov20_021D4020 + + thumb_func_start ov20_021D403C +ov20_021D403C: ; 0x021D403C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D4074 ; =0x04000050 + mov r1, #2 + mov r2, #0x3f + mov r3, #0 + bl sub_020BF55C + mov r0, #1 + add r1, r0, #0 + bl sub_02019120 + mov r0, #0x7c + str r0, [sp] + mov r0, #0xc + add r4, #0x1c + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #2 + mov r2, #0x3f + mov r3, #0 + bl ov20_021D4F1C + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_021D4074: .word 0x04000050 + thumb_func_end ov20_021D403C + + thumb_func_start ov20_021D4078 +ov20_021D4078: ; 0x021D4078 + ldr r3, _021D4080 ; =ov20_021D4F4C + add r0, #0x1c + bx r3 + nop +_021D4080: .word ov20_021D4F4C + thumb_func_end ov20_021D4078 + + thumb_func_start ov20_021D4084 +ov20_021D4084: ; 0x021D4084 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov20_021D1F94 + cmp r0, #0 + bne _021D4098 + mov r3, #3 + mvn r3, r3 + b _021D409A +_021D4098: + mov r3, #0xfc +_021D409A: + ldr r0, [r4, #0xc] + mov r1, #1 + mov r2, #0 + bl sub_02019184 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4084 + + thumb_func_start ov20_021D40A8 +ov20_021D40A8: ; 0x021D40A8 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov20_021D1F94 + cmp r0, #0 + bne _021D40BE + mov r0, #0xff + mvn r0, r0 + b _021D40C2 +_021D40BE: + mov r0, #1 + lsl r0, r0, #8 +_021D40C2: + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x3c + mov r2, #1 + mov r3, #0 + bl ov20_021D4E38 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D40A8 + + thumb_func_start ov20_021D40DC +ov20_021D40DC: ; 0x021D40DC + ldr r3, _021D40E4 ; =ov20_021D4E8C + add r0, #0x3c + bx r3 + nop +_021D40E4: .word ov20_021D4E8C + thumb_func_end ov20_021D40DC + + .rodata + + + .global Unk_ov20_021D52E4 +Unk_ov20_021D52E4: ; 0x021D52E4 + .incbin "incbin/overlay20_rodata.bin", 0x1A4, 0x8 + diff --git a/asm/ov20_021D40E8.s b/asm/ov20_021D40E8.s new file mode 100644 index 000000000..ec730c885 --- /dev/null +++ b/asm/ov20_021D40E8.s @@ -0,0 +1,817 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D40E8 +ov20_021D40E8: ; 0x021D40E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x23 + mov r1, #0x94 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + add r0, r5, #0 + bl ov20_021D2E04 + str r0, [r4, #0xc] + mov r0, #0x20 + mov r1, #0x23 + bl sub_02023790 + str r0, [r4, #0x3c] + mov r0, #0 + str r0, [sp] + mov r0, #0x1a + str r0, [sp, #4] + mov r0, #0x20 + str r0, [sp, #8] + mov r0, #0xc + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x10 + mov r2, #2 + mov r3, #4 + bl sub_0201A7E8 + mov r3, #0 + str r3, [sp] + mov r1, #0xc + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x20 + mov r2, #2 + bl sub_0201A7E8 + mov r0, #0 + str r0, [r4, #0x30] + str r0, [r4, #0x34] + str r0, [r4, #0x38] + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov20_021D40E8 + + thumb_func_start ov20_021D4164 +ov20_021D4164: ; 0x021D4164 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _021D4172 + bl sub_02021BD4 +_021D4172: + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _021D417C + bl sub_02021BD4 +_021D417C: + ldr r0, [r4, #0x38] + cmp r0, #0 + beq _021D4186 + bl sub_02021BD4 +_021D4186: + ldr r0, [r4, #0x3c] + cmp r0, #0 + beq _021D4190 + bl sub_020237BC +_021D4190: + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A8FC + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov20_021D4164 + + thumb_func_start ov20_021D41A8 +ov20_021D41A8: ; 0x021D41A8 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov20_021D2E04 + add r4, r0, #0 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x23 + bl sub_02019690 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xc + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #2 + add r3, r2, #0 + bl sub_02019CB8 + add r0, r5, #0 + add r0, #0x10 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x10 + bl sub_0201A9F4 + add r0, r5, #0 + add r0, #0x10 + bl sub_0201ACCC + add r0, r4, #0 + mov r1, #2 + bl sub_02019448 + add r0, r5, #0 + bl ov20_021D4210 + mov r0, #2 + mov r1, #0 + bl sub_02019120 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D41A8 + + thumb_func_start ov20_021D4210 +ov20_021D4210: ; 0x021D4210 + push {r3, r4, lr} + sub sp, #0x2c + add r4, r0, #0 + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0 + mov r3, #2 + bl ov20_021D2E0C + mov r0, #3 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0x48 + mov r3, #0x38 + bl ov20_021D2E50 + str r0, [r4, #0x30] + mov r1, #8 + bl sub_02021D6C + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_02021CAC + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0xf0 + mov r3, #0x40 + bl ov20_021D2E50 + str r0, [r4, #0x34] + mov r1, #0xb + bl sub_02021D6C + ldr r0, [r4, #0x34] + mov r1, #0 + bl sub_02021CAC + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #8 + mov r2, #0xf0 + mov r3, #0x90 + bl ov20_021D2E50 + str r0, [r4, #0x38] + mov r1, #0xa + bl sub_02021D6C + ldr r0, [r4, #0x38] + mov r1, #0 + bl sub_02021CAC + add sp, #0x2c + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4210 + + thumb_func_start ov20_021D4294 +ov20_021D4294: ; 0x021D4294 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r0, #0x10 + mov r1, #0 + bl sub_0201ADA4 + add r0, r6, #0 + bl ov20_021D4638 + ldr r0, [r6, #4] + bl ov20_021D1FE4 + add r7, r0, #0 + cmp r7, #0xa + bls _021D42B4 + mov r7, #0xa +_021D42B4: + add r0, r6, #0 + add r0, #0x8c + mov r5, #0 + ldr r4, [r0, #0] + cmp r7, #0 + bls _021D42D8 +_021D42C0: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov20_021D4658 + mov r0, #1 + tst r0, r5 + beq _021D42D2 + add r4, #0x18 +_021D42D2: + add r5, r5, #1 + cmp r5, r7 + blo _021D42C0 +_021D42D8: + add r6, #0x10 + add r0, r6, #0 + bl sub_0201ACCC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4294 + + thumb_func_start ov20_021D42E4 +ov20_021D42E4: ; 0x021D42E4 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D437C ; =0x04000050 + mov r1, #4 + mov r2, #0x3f + mov r3, #0 + bl sub_020BF55C + mov r0, #2 + mov r1, #1 + bl sub_02019120 + ldr r1, _021D4380 ; =0x04000048 + ldr r0, _021D4384 ; =0xFFFFC0FF + ldrh r2, [r1] + mov r5, #0xff + and r2, r0 + mov r0, #0x1f + lsl r0, r0, #8 + orr r2, r0 + lsr r0, r1, #0xd + orr r0, r2 + strh r0, [r1] + add r0, r4, #0 + ldrb r2, [r1, #2] + add r0, #0x84 + strb r2, [r0] + add r0, r1, #0 + sub r0, #0x48 + mov r2, #0xe + ldr r3, [r0, #0] + lsl r2, r2, #0xc + and r2, r3 + lsr r3, r2, #0xd + add r2, r4, #0 + add r2, #0x88 + str r3, [r2, #0] + ldrh r3, [r1, #2] + mov r2, #0x3f + bic r3, r2 + mov r2, #0x1b + orr r3, r2 + mov r2, #0x20 + orr r3, r2 + strh r3, [r1, #2] + sub r3, r1, #6 + strh r5, [r3] + ldr r3, _021D4388 ; =0x00002EB0 + sub r1, r1, #2 + strh r3, [r1] + ldr r3, [r0, #0] + ldr r1, _021D438C ; =0xFFFF1FFF + and r3, r1 + lsl r1, r2, #9 + orr r1, r3 + str r1, [r0, #0] + add r0, r4, #0 + mov r3, #0 + add r0, #0x80 + str r3, [r0, #0] + mov r0, #0x7c + str r0, [sp] + mov r0, #0xc + add r4, #0x40 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #4 + mov r2, #0x3f + bl ov20_021D4F1C + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021D437C: .word 0x04000050 +_021D4380: .word 0x04000048 +_021D4384: .word 0xFFFFC0FF +_021D4388: .word 0x00002EB0 +_021D438C: .word 0xFFFF1FFF + thumb_func_end ov20_021D42E4 + + thumb_func_start ov20_021D4390 +ov20_021D4390: ; 0x021D4390 + push {r3, lr} + add r1, r0, #0 + add r1, #0x80 + ldr r1, [r1, #0] + cmp r1, #0 + bne _021D43AE + add r0, #0x40 + bl ov20_021D4F4C + cmp r0, #0 + beq _021D43AA + mov r0, #1 + pop {r3, pc} +_021D43AA: + mov r0, #0 + pop {r3, pc} +_021D43AE: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4390 + + thumb_func_start ov20_021D43B4 +ov20_021D43B4: ; 0x021D43B4 + push {r3, lr} + sub sp, #8 + add r1, r0, #0 + mov r2, #0 + add r1, #0x80 + str r2, [r1, #0] + str r2, [sp] + mov r1, #0xc + str r1, [sp, #4] + add r0, #0x40 + mov r1, #4 + mov r2, #0x3f + mov r3, #0x7c + bl ov20_021D4F1C + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov20_021D43B4 + + thumb_func_start ov20_021D43D8 +ov20_021D43D8: ; 0x021D43D8 + push {r4, lr} + add r4, r0, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021D4430 + add r0, r4, #0 + add r0, #0x40 + bl ov20_021D4F4C + cmp r0, #0 + beq _021D4434 + mov r0, #2 + mov r1, #0 + bl sub_02019120 + ldr r0, _021D4438 ; =0x0400004A + ldrh r2, [r0] + mov r0, #0x3f + bic r2, r0 + add r0, r4, #0 + add r0, #0x84 + ldrb r0, [r0] + lsl r1, r0, #0x1b + lsr r1, r1, #0x1b + lsl r0, r0, #0x1a + orr r1, r2 + lsr r0, r0, #0x1f + beq _021D4416 + mov r0, #0x20 + orr r1, r0 +_021D4416: + ldr r2, _021D4438 ; =0x0400004A + ldr r0, _021D443C ; =0xFFFF1FFF + strh r1, [r2] + sub r2, #0x4a + ldr r1, [r2, #0] + add r4, #0x88 + and r1, r0 + ldr r0, [r4, #0] + lsl r0, r0, #0xd + orr r0, r1 + str r0, [r2, #0] + mov r0, #1 + pop {r4, pc} +_021D4430: + mov r0, #1 + pop {r4, pc} +_021D4434: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D4438: .word 0x0400004A +_021D443C: .word 0xFFFF1FFF + thumb_func_end ov20_021D43D8 + + thumb_func_start ov20_021D4440 +ov20_021D4440: ; 0x021D4440 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x30] + add r4, r1, #0 + bl sub_02021CAC + cmp r4, #0 + beq _021D446E + ldr r0, [r5, #4] + bl ov20_021D204C + add r1, r0, #0 + ldr r0, [r5, #0x34] + bl sub_02021CAC + ldr r0, [r5, #4] + bl ov20_021D2060 + add r1, r0, #0 + ldr r0, [r5, #0x38] + bl sub_02021CAC + pop {r3, r4, r5, pc} +_021D446E: + ldr r0, [r5, #0x34] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #0x38] + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D4440 + + thumb_func_start ov20_021D4480 +ov20_021D4480: ; 0x021D4480 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r2, r1, #0 + mov r0, #1 + and r2, r0 + mov r0, #0x70 + mul r0, r2 + add r0, #0x48 + lsl r0, r0, #0xc + str r0, [sp] + lsr r1, r1, #1 + mov r0, #0x18 + mul r0, r1 + add r0, #0x38 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #0x30] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0x30] + mov r1, #8 + bl sub_02021D6C + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4480 + + thumb_func_start ov20_021D44BC +ov20_021D44BC: ; 0x021D44BC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + add r4, r1, #0 + bl ov20_021D45AC + add r0, r7, #0 + add r0, #0x90 + ldr r0, [r0, #0] + lsl r6, r4, #1 + str r0, [sp, #0x10] + add r0, r0, r6 + str r0, [sp, #0x14] + mov r0, #0x18 + mul r0, r4 + str r0, [sp, #8] + add r0, r7, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [sp, #8] + add r1, r0, r1 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp, #0x18] + cmp r4, #0 + bge _021D4500 + ldr r0, [sp, #0x14] + add r5, r1, #0 + str r0, [sp, #0x10] + lsl r0, r4, #2 + neg r0, r0 + neg r6, r6 + str r0, [sp, #0xc] + b _021D4520 +_021D4500: + add r0, #0x78 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldr r0, [sp, #0x10] + add r0, #0xa + str r0, [sp, #0x10] + ldr r0, [r7, #4] + bl ov20_021D1FE4 + ldr r1, [sp, #0x10] + add r1, r6, r1 + cmp r1, r0 + bls _021D451C + sub r6, r6, #1 +_021D451C: + lsl r0, r4, #2 + str r0, [sp, #0xc] +_021D4520: + mov r4, #0 + cmp r6, #0 + ble _021D4544 +_021D4526: + ldr r1, [sp, #0x10] + add r0, r7, #0 + add r1, r1, r4 + add r2, r5, #0 + bl ov20_021D4658 + mov r0, #1 + tst r0, r4 + beq _021D453E + add r5, #0x18 + lsl r0, r5, #0x18 + lsr r5, r0, #0x18 +_021D453E: + add r4, r4, #1 + cmp r4, r6 + blt _021D4526 +_021D4544: + add r1, r7, #0 + ldr r0, [sp, #0x18] + add r1, #0x8c + str r0, [r1, #0] + add r1, r7, #0 + ldr r0, [sp, #0x14] + add r1, #0x90 + str r0, [r1, #0] + add r0, r7, #0 + add r0, #0x10 + bl sub_0201ACCC + ldr r0, [sp, #8] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r3, #1 + str r0, [sp, #4] + add r0, r7, #0 + ldr r1, [r7, #0xc] + add r0, #0x60 + bl ov20_021D4E38 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov20_021D44BC + + thumb_func_start ov20_021D4578 +ov20_021D4578: ; 0x021D4578 + push {r4, lr} + add r4, r0, #0 + add r0, #0x60 + bl ov20_021D4E8C + cmp r0, #0 + beq _021D45A6 + ldr r0, [r4, #4] + bl ov20_021D204C + add r1, r0, #0 + ldr r0, [r4, #0x34] + bl sub_02021CAC + ldr r0, [r4, #4] + bl ov20_021D2060 + add r1, r0, #0 + ldr r0, [r4, #0x38] + bl sub_02021CAC + mov r0, #1 + pop {r4, pc} +_021D45A6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4578 + + thumb_func_start ov20_021D45AC +ov20_021D45AC: ; 0x021D45AC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + cmp r1, #0 + ble _021D45CC + add r0, #0x8c + ldr r0, [r0, #0] + add r0, #0x78 + lsl r0, r0, #0x18 + lsr r3, r0, #0x18 + mov r0, #0x18 + mul r0, r1 + add r0, r3, r0 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + b _021D45DA +_021D45CC: + add r0, #0x8c + ldr r4, [r0, #0] + mov r0, #0x18 + mul r0, r1 + add r0, r4, r0 + lsl r0, r0, #0x18 + lsr r3, r0, #0x18 +_021D45DA: + cmp r3, r4 + bge _021D45FE + mov r0, #0xd0 + str r0, [sp] + sub r0, r4, r3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + mov r1, #0 + lsl r3, r3, #0x10 + add r5, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r1, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + add sp, #8 + pop {r3, r4, r5, pc} +_021D45FE: + mov r0, #0xd0 + str r0, [sp] + add r0, #0x30 + sub r0, r0, r3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + lsl r3, r3, #0x10 + add r0, #0x10 + add r2, r1, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0xd0 + str r0, [sp] + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + add r5, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov20_021D45AC + + thumb_func_start ov20_021D4638 +ov20_021D4638: ; 0x021D4638 + push {r3, lr} + add r1, r0, #0 + mov r2, #0x30 + add r1, #0x8c + str r2, [r1, #0] + add r1, r0, #0 + mov r3, #0 + add r1, #0x90 + str r3, [r1, #0] + ldr r0, [r0, #0xc] + mov r1, #2 + mov r2, #3 + bl sub_02019184 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4638 + + thumb_func_start ov20_021D4658 +ov20_021D4658: ; 0x021D4658 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r2, #0 + ldr r0, [r5, #4] + ldr r2, [r5, #0x3c] + add r7, r1, #0 + bl ov20_021D2008 + cmp r4, #0xf0 + bhi _021D4694 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D4724 ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + mov r3, #1 + add r4, r7, #0 + and r4, r3 + mov r3, #0x70 + ldr r2, [r5, #0x3c] + add r0, #0x10 + mul r3, r4 + bl sub_0201D78C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D4694: + mov r0, #1 + lsl r0, r0, #8 + sub r6, r0, r4 + add r0, r5, #0 + add r0, #0x20 + mov r1, #0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D4724 ; =0x00010200 + add r3, r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + ldr r2, [r5, #0x3c] + add r0, #0x20 + bl sub_0201D78C + mov r2, #0 + mov r0, #1 + add r1, r7, #0 + and r1, r0 + add r7, r1, #0 + mov r0, #0x70 + mul r7, r0 + mov r0, #0x60 + str r0, [sp] + mov r1, #0x10 + str r1, [sp, #4] + lsl r1, r7, #0x10 + lsr r1, r1, #0x10 + str r1, [sp, #8] + lsl r1, r4, #0x10 + lsr r1, r1, #0x10 + str r1, [sp, #0xc] + str r0, [sp, #0x10] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x14] + add r0, r5, #0 + ldr r1, [r5, #0x2c] + add r0, #0x10 + add r3, r2, #0 + bl sub_0201ADDC + mov r1, #0x60 + lsl r2, r7, #0x10 + lsl r3, r6, #0x10 + str r1, [sp] + mov r0, #0x10 + str r0, [sp, #4] + lsr r2, r2, #0x10 + str r2, [sp, #8] + mov r2, #0 + sub r0, r0, r6 + str r2, [sp, #0xc] + lsl r0, r0, #0x10 + str r1, [sp, #0x10] + lsr r0, r0, #0x10 + str r0, [sp, #0x14] + add r0, r5, #0 + ldr r1, [r5, #0x2c] + add r0, #0x10 + lsr r3, r3, #0x10 + bl sub_0201ADDC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D4724: .word 0x00010200 + thumb_func_end ov20_021D4658 \ No newline at end of file diff --git a/asm/ov20_021D4728.s b/asm/ov20_021D4728.s new file mode 100644 index 000000000..c9fa1556f --- /dev/null +++ b/asm/ov20_021D4728.s @@ -0,0 +1,921 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D4728 +ov20_021D4728: ; 0x021D4728 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #5 + add r5, r0, #0 + mov r0, #0x23 + lsl r1, r1, #8 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + str r7, [r4, #8] + add r0, r5, #0 + bl ov20_021D2E04 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov20_021D2E08 + str r0, [r4, #0x10] + mov r1, #0 + str r1, [r4, #0x14] + ldr r0, _021D4760 ; =0x000004FC + str r1, [r4, #0x18] + str r1, [r4, r0] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4760: .word 0x000004FC + thumb_func_end ov20_021D4728 + + thumb_func_start ov20_021D4764 +ov20_021D4764: ; 0x021D4764 + push {r4, lr} + add r4, r0, #0 + bl ov20_021D4AD4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov20_021D4764 + + thumb_func_start ov20_021D4774 +ov20_021D4774: ; 0x021D4774 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0x40 + add r4, r1, #0 + str r0, [sp] + mov r0, #0x23 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x15 + mov r2, #4 + mov r3, #0 + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + ldr r2, [r5, #0xc] + add r0, r4, #0 + mov r1, #0xb + mov r3, #4 + bl sub_0200710C + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D4874 + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D48C4 + ldr r0, [r5, #4] + bl ov20_021D1F94 + cmp r0, #0 + bne _021D4810 + mov r2, #0xb + ldr r0, _021D486C ; =0x000001FA + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + add r0, r5, r0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + mov r2, #3 + ldr r0, [r5, #0xc] + mov r1, #4 + add r3, r2, #0 + bl sub_020198E8 + mov r2, #0xb + mov r0, #0xa5 + lsl r0, r0, #2 + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + add r0, r5, r0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r5, #0xc] + mov r1, #4 + mov r2, #3 + mov r3, #0xe + bl sub_020198E8 + b _021D4858 +_021D4810: + mov r2, #0xb + add r0, r5, #0 + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + add r0, #0x2c + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + mov r2, #3 + ldr r0, [r5, #0xc] + mov r1, #4 + add r3, r2, #0 + bl sub_020198E8 + mov r2, #0xb + ldr r0, _021D4870 ; =0x00000462 + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + add r0, r5, r0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r5, #0xc] + mov r1, #4 + mov r2, #3 + mov r3, #0xe + bl sub_020198E8 +_021D4858: + add r0, r5, #0 + add r1, r4, #0 + bl ov20_021D4A24 + ldr r0, [r5, #0xc] + mov r1, #4 + bl sub_02019448 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 +_021D486C: .word 0x000001FA +_021D4870: .word 0x00000462 + thumb_func_end ov20_021D4774 + + thumb_func_start ov20_021D4874 +ov20_021D4874: ; 0x021D4874 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r4, _021D48C0 ; =0x021D52F4 + str r1, [sp, #4] + mov r6, #0 + add r5, #0x2c +_021D4882: + mov r0, #0x23 + str r0, [sp] + ldrh r1, [r4] + ldr r0, [sp, #4] + mov r2, #1 + add r3, sp, #8 + bl sub_020071D0 + add r7, r0, #0 + beq _021D48B0 + ldr r0, [sp, #8] + add r1, r5, #0 + add r0, #0xc + mov r2, #0x9a + bl sub_020C4B18 + add r0, r5, #0 + mov r1, #0x9a + bl sub_020C2C54 + add r0, r7, #0 + bl sub_020181C4 +_021D48B0: + add r6, r6, #1 + add r4, r4, #2 + add r5, #0x9a + cmp r6, #8 + blo _021D4882 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021D48C0: .word 0x021D52F4 + thumb_func_end ov20_021D4874 + + thumb_func_start ov20_021D48C4 +ov20_021D48C4: ; 0x021D48C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r7, r1, #0 + mov r0, #2 + mov r1, #0 + bl sub_02002BB8 + ldr r1, _021D4984 ; =0x000001B5 + mov r0, #0x1a + mov r2, #0xb + mov r3, #0x23 + bl sub_0200B010 + add r6, r0, #0 + ldr r1, _021D4984 ; =0x000001B5 + mov r0, #0x1a + mov r2, #0xc + mov r3, #0x23 + bl sub_0200B010 + add r4, r0, #0 + mov r0, #0x23 + str r0, [sp] + add r0, r7, #0 + mov r1, #0x14 + mov r2, #1 + add r3, sp, #4 + bl sub_020071B4 + add r7, r0, #0 + beq _021D496C + add r0, sp, #8 + bl sub_0201A7A0 + ldr r0, [r5, #0xc] + add r1, sp, #4 + str r0, [sp, #8] + mov r0, #0xb + strb r0, [r1, #0xb] + mov r0, #0x39 + strb r0, [r1, #0xc] + ldrh r2, [r1, #0xe] + ldr r0, _021D4988 ; =0xFFFF7FFF + mov r3, #0 + and r0, r2 + strh r0, [r1, #0xe] + ldr r0, [sp, #4] + add r2, r6, #0 + ldr r0, [r0, #0x14] + str r0, [sp, #0x14] + ldr r1, [r5, #0xc] + add r0, sp, #8 + bl ov20_021D498C + ldr r0, [sp, #4] + add r2, r4, #0 + ldr r1, [r0, #0x14] + mov r0, #0x9a + lsl r0, r0, #6 + add r0, r1, r0 + str r0, [sp, #0x14] + ldr r1, [r5, #0xc] + add r0, sp, #8 + mov r3, #0 + bl ov20_021D498C + ldr r1, [sp, #4] + ldr r0, [r1, #0x14] + ldr r1, [r1, #0x10] + bl sub_020C2C54 + ldr r3, [sp, #4] + mov r0, #0 + str r0, [sp] + ldr r2, [r3, #0x14] + ldr r0, [r5, #0xc] + ldr r3, [r3, #0x10] + mov r1, #4 + bl sub_0201958C + add r0, r7, #0 + bl sub_020181C4 +_021D496C: + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + mov r0, #2 + bl sub_02002C60 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D4984: .word 0x000001B5 +_021D4988: .word 0xFFFF7FFF + thumb_func_end ov20_021D48C4 + + thumb_func_start ov20_021D498C +ov20_021D498C: ; 0x021D498C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x10] + add r0, r2, #0 + str r2, [sp, #0x14] + add r7, r3, #0 + bl sub_02023C5C + str r0, [sp, #0x1c] + mov r0, #0x20 + mov r1, #0x23 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x1c] + mov r1, #2 + sub r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #1 + add r7, r7, r0 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + cmp r0, #0 + bls _021D4A10 +_021D49BE: + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x20] + add r0, r6, #0 + bl sub_02023C9C + mov r0, #2 + add r1, r6, #0 + mov r2, #0 + mov r3, #0x58 + bl sub_02002EEC + ldr r5, _021D4A1C ; =0x021D52EC + str r0, [sp, #0x18] + mov r4, #0 +_021D49DA: + mov r0, #0 + ldrsh r0, [r5, r0] + ldr r3, [sp, #0x18] + mov r1, #2 + add r0, r7, r0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D4A20 ; =0x00010203 + add r2, r6, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + bl sub_0201D78C + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blo _021D49DA + ldr r0, [sp, #0x20] + add r7, #0x10 + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [sp, #0x20] + cmp r1, r0 + blo _021D49BE +_021D4A10: + add r0, r6, #0 + bl sub_020237BC + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021D4A1C: .word 0x021D52EC +_021D4A20: .word 0x00010203 + thumb_func_end ov20_021D498C + + thumb_func_start ov20_021D4A24 +ov20_021D4A24: ; 0x021D4A24 + push {r4, r5, lr} + sub sp, #0x4c + add r5, r0, #0 + add r0, sp, #0x38 + add r4, r1, #0 + bl sub_020A81D0 + add r0, sp, #0x14 + bl sub_020A818C + mov r0, #0x23 + str r0, [sp] + add r0, sp, #0x38 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x19 + mov r2, #2 + mov r3, #0 + bl sub_0200716C + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + str r3, [sp, #8] + mov r0, #0x23 + str r0, [sp, #0xc] + add r0, sp, #0x14 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #0x18 + mov r2, #1 + bl sub_0200718C + add r0, r5, #0 + add r0, #0x1c + add r1, r4, #0 + mov r2, #0x16 + mov r3, #0x17 + bl ov20_021D4AF8 + mov r0, #0xc0 + str r0, [sp] + mov r0, #0x38 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r3, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, sp, #0x14 + add r2, sp, #0x38 + add r3, #0x1c + bl ov20_021D4B40 + str r0, [r5, #0x14] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_02021CAC + mov r0, #0xc0 + str r0, [sp] + mov r0, #0x88 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r3, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, sp, #0x14 + add r2, sp, #0x38 + add r3, #0x1c + bl ov20_021D4B40 + str r0, [r5, #0x18] + mov r1, #2 + bl sub_02021D6C + ldr r0, [r5, #0x18] + mov r1, #0 + bl sub_02021CAC + add sp, #0x4c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4A24 + + thumb_func_start ov20_021D4AD4 +ov20_021D4AD4: ; 0x021D4AD4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D4AE2 + bl sub_02021BD4 +_021D4AE2: + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _021D4AEC + bl sub_02021BD4 +_021D4AEC: + add r4, #0x1c + add r0, r4, #0 + bl ov20_021D4B2C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4AD4 + + thumb_func_start ov20_021D4AF8 +ov20_021D4AF8: ; 0x021D4AF8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x23 + add r6, r3, #0 + str r0, [sp] + add r1, r2, #0 + add r0, r4, #0 + mov r2, #1 + add r3, r5, #4 + bl sub_02007204 + str r0, [r5, #0] + mov r0, #0x23 + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + add r1, r6, #0 + mov r2, #1 + add r3, #0xc + bl sub_02007220 + str r0, [r5, #8] + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov20_021D4AF8 + + thumb_func_start ov20_021D4B2C +ov20_021D4B2C: ; 0x021D4B2C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov20_021D4B2C + + thumb_func_start ov20_021D4B40 +ov20_021D4B40: ; 0x021D4B40 + push {r3, r4, lr} + sub sp, #0x44 + str r2, [sp, #0x28] + str r1, [sp, #0x20] + ldr r1, [r3, #4] + ldr r2, [sp, #0x58] + str r1, [sp, #0x2c] + ldr r1, [r3, #0xc] + str r1, [sp, #0x30] + add r1, sp, #0x40 + strb r2, [r1] + mov r1, #0 + str r1, [sp, #0x24] + str r1, [sp, #0x34] + str r1, [sp, #0x38] + str r1, [sp, #0x3c] + ldr r0, [r0, #0x10] + str r0, [sp] + add r0, sp, #0x20 + str r0, [sp, #4] + ldr r0, [sp, #0x50] + str r1, [sp, #0x10] + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [sp, #0x54] + add r0, #0xc0 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, [sp, #0x5c] + str r0, [sp, #0x14] + mov r0, #2 + str r0, [sp, #0x18] + mov r0, #0x23 + str r0, [sp, #0x1c] + add r0, sp, #0 + bl sub_02021B90 + add r4, r0, #0 + beq _021D4B9E + mov r1, #1 + bl sub_02021CC8 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 +_021D4B9E: + add r0, r4, #0 + add sp, #0x44 + pop {r3, r4, pc} + thumb_func_end ov20_021D4B40 + + thumb_func_start ov20_021D4BA4 +ov20_021D4BA4: ; 0x021D4BA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x23 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + beq _021D4C00 + ldr r0, [r5, #4] + bl ov20_021D1F94 + str r5, [r4, #0] + mov r1, #0 + str r1, [r4, #4] + strh r1, [r4, #8] + mov r1, #0xe + mul r1, r0 + ldr r0, _021D4C08 ; =0x021D5304 + mov r2, #1 + ldrh r0, [r0, r1] + strh r0, [r4, #0xa] + ldr r0, _021D4C0C ; =0x021D5306 + ldrh r0, [r0, r1] + strh r0, [r4, #0xc] + ldr r0, _021D4C10 ; =0x021D5308 + ldrh r0, [r0, r1] + strh r0, [r4, #0xe] + ldr r0, _021D4C14 ; =0x021D530A + ldrh r0, [r0, r1] + strh r0, [r4, #0x10] + ldr r0, _021D4C18 ; =0x021D530C + ldrh r0, [r0, r1] + strh r0, [r4, #0x12] + ldr r0, _021D4C1C ; =0x021D530E + ldrh r0, [r0, r1] + strh r0, [r4, #0x14] + ldr r0, _021D4C20 ; =0x021D5310 + ldrh r0, [r0, r1] + add r1, r4, #0 + strh r0, [r4, #0x16] + ldr r0, _021D4C24 ; =ov20_021D4C40 + bl sub_0200D9E8 + ldr r1, _021D4C28 ; =0x000004FC + str r0, [r5, r1] + pop {r3, r4, r5, pc} +_021D4C00: + ldr r0, _021D4C28 ; =0x000004FC + mov r1, #0 + str r1, [r5, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D4C08: .word 0x021D5304 +_021D4C0C: .word 0x021D5306 +_021D4C10: .word 0x021D5308 +_021D4C14: .word 0x021D530A +_021D4C18: .word 0x021D530C +_021D4C1C: .word 0x021D530E +_021D4C20: .word 0x021D5310 +_021D4C24: .word ov20_021D4C40 +_021D4C28: .word 0x000004FC + thumb_func_end ov20_021D4BA4 + + thumb_func_start ov20_021D4C2C +ov20_021D4C2C: ; 0x021D4C2C + ldr r1, _021D4C3C ; =0x000004FC + ldr r0, [r0, r1] + cmp r0, #0 + bne _021D4C38 + mov r0, #1 + bx lr +_021D4C38: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D4C3C: .word 0x000004FC + thumb_func_end ov20_021D4C2C + + thumb_func_start ov20_021D4C40 +ov20_021D4C40: ; 0x021D4C40 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #3 + bls _021D4C50 + b _021D4DB4 +_021D4C50: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4C5C: ; jump table + .short _021D4C64 - _021D4C5C - 2 ; case 0 + .short _021D4CEA - _021D4C5C - 2 ; case 1 + .short _021D4D4A - _021D4C5C - 2 ; case 2 + .short _021D4DA0 - _021D4C5C - 2 ; case 3 +_021D4C64: + ldr r3, [r4, #0] + mov r2, #0xb + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + ldrh r6, [r4, #0xa] + add r0, r3, #0 + mov r5, #0x9a + add r0, #0x2c + mul r5, r6 + add r0, r0, r5 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r3, #0xc] + ldrh r2, [r4, #0xe] + ldrh r3, [r4, #0x10] + mov r1, #4 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + ldr r3, [r4, #0] + mov r2, #0xb + add r0, r3, #0 + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + ldrh r6, [r4, #0x12] + mov r5, #0x9a + add r0, #0x2c + mul r5, r6 + add r0, r0, r5 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r3, #0xc] + ldrh r2, [r4, #0x14] + ldrh r3, [r4, #0x16] + mov r1, #4 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + ldr r0, [r4, #0] + mov r1, #4 + ldr r0, [r0, #0xc] + bl sub_02019448 + ldrh r0, [r4, #0xa] + add sp, #0x1c + add r0, r0, #1 + strh r0, [r4, #0xa] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, r6, pc} +_021D4CEA: + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldrh r0, [r4, #8] + cmp r0, #2 + blo _021D4DB4 + ldr r3, [r4, #0] + mov r2, #0xb + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + ldrh r6, [r4, #0xa] + add r0, r3, #0 + mov r5, #0x9a + add r0, #0x2c + mul r5, r6 + add r0, r0, r5 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r3, #0xc] + ldrh r2, [r4, #0xe] + ldrh r3, [r4, #0x10] + mov r1, #4 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + ldr r0, [r4, #0] + mov r1, #4 + ldr r0, [r0, #0xc] + bl sub_02019448 + mov r0, #0 + strh r0, [r4, #8] + ldrh r0, [r4, #0xa] + add sp, #0x1c + add r0, r0, #1 + strh r0, [r4, #0xa] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, r6, pc} +_021D4D4A: + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldrh r0, [r4, #8] + cmp r0, #4 + blo _021D4DB4 + ldr r3, [r4, #0] + mov r2, #0xb + str r2, [sp] + mov r1, #7 + str r1, [sp, #4] + ldrh r6, [r4, #0xa] + add r0, r3, #0 + mov r5, #0x9a + add r0, #0x2c + mul r5, r6 + add r0, r0, r5 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x18] + ldr r0, [r3, #0xc] + ldrh r2, [r4, #0xe] + ldrh r3, [r4, #0x10] + mov r1, #4 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + ldr r0, [r4, #0] + mov r1, #4 + ldr r0, [r0, #0xc] + bl sub_02019448 + ldr r0, [r4, #4] + add sp, #0x1c + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, r6, pc} +_021D4DA0: + ldr r1, [r4, #0] + ldr r0, _021D4DB8 ; =0x000004FC + mov r2, #0 + str r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_021D4DB4: + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D4DB8: .word 0x000004FC + thumb_func_end ov20_021D4C40 + + thumb_func_start ov20_021D4DBC +ov20_021D4DBC: ; 0x021D4DBC + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + beq _021D4DE2 + ldr r0, [r4, #4] + bl ov20_021D204C + add r1, r0, #0 + ldr r0, [r4, #0x14] + bl sub_02021CAC + ldr r0, [r4, #4] + bl ov20_021D2060 + add r1, r0, #0 + ldr r0, [r4, #0x18] + bl sub_02021CAC + pop {r4, pc} +_021D4DE2: + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_02021CAC + pop {r4, pc} + thumb_func_end ov20_021D4DBC + + thumb_func_start ov20_021D4DF4 +ov20_021D4DF4: ; 0x021D4DF4 + push {r3, lr} + cmp r1, #0 + beq _021D4E00 + cmp r1, #1 + beq _021D4E1C + pop {r3, pc} +_021D4E00: + cmp r2, #0 + beq _021D4E12 + cmp r2, #1 + bne _021D4E36 + ldr r0, [r0, #0x14] + mov r1, #1 + bl sub_02021D6C + pop {r3, pc} +_021D4E12: + ldr r0, [r0, #0x14] + mov r1, #0 + bl sub_02021D6C + pop {r3, pc} +_021D4E1C: + cmp r2, #0 + beq _021D4E2E + cmp r2, #1 + bne _021D4E36 + ldr r0, [r0, #0x18] + mov r1, #3 + bl sub_02021D6C + pop {r3, pc} +_021D4E2E: + ldr r0, [r0, #0x18] + mov r1, #2 + bl sub_02021D6C +_021D4E36: + pop {r3, pc} + thumb_func_end ov20_021D4DF4 + + .rodata + + + .global Unk_ov20_021D52EC +Unk_ov20_021D52EC: ; 0x021D52EC + .incbin "incbin/overlay20_rodata.bin", 0x1AC, 0x1B4 - 0x1AC + + .global Unk_ov20_021D52F4 +Unk_ov20_021D52F4: ; 0x021D52F4 + .incbin "incbin/overlay20_rodata.bin", 0x1B4, 0x1C4 - 0x1B4 + + .global Unk_ov20_021D5304 +Unk_ov20_021D5304: ; 0x021D5304 + .incbin "incbin/overlay20_rodata.bin", 0x1C4, 0x1C + diff --git a/asm/ov20_021D4E38.s b/asm/ov20_021D4E38.s new file mode 100644 index 000000000..10f76b0d5 --- /dev/null +++ b/asm/ov20_021D4E38.s @@ -0,0 +1,301 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D4E38 +ov20_021D4E38: ; 0x021D4E38 + push {r4, lr} + add r4, r0, #0 + str r1, [r4, #0] + str r2, [r4, #4] + cmp r3, #0 + bne _021D4E52 + add r0, r1, #0 + add r1, r2, #0 + bl sub_020192EC + str r0, [r4, #0xc] + mov r0, #0 + b _021D4E5E +_021D4E52: + add r0, r1, #0 + add r1, r2, #0 + bl sub_020192F8 + str r0, [r4, #0xc] + mov r0, #3 +_021D4E5E: + str r0, [r4, #8] + ldr r0, [sp, #8] + ldr r1, [r4, #0xc] + add r2, r1, r0 + ldr r1, _021D4E88 ; =0x000001FF + lsl r0, r0, #0xc + and r1, r2 + str r1, [r4, #0x10] + ldr r1, [r4, #0xc] + lsl r1, r1, #0xc + str r1, [r4, #0xc] + ldr r1, [sp, #0xc] + bl sub_020E1F6C + str r0, [r4, #0x14] + ldr r0, [sp, #0xc] + strh r0, [r4, #0x18] + mov r0, #0 + strh r0, [r4, #0x1a] + pop {r4, pc} + nop +_021D4E88: .word 0x000001FF + thumb_func_end ov20_021D4E38 + + thumb_func_start ov20_021D4E8C +ov20_021D4E8C: ; 0x021D4E8C + push {r4, lr} + add r4, r0, #0 + ldrh r0, [r4, #0x1a] + cmp r0, #0 + beq _021D4EA0 + cmp r0, #1 + beq _021D4EB4 + cmp r0, #2 + beq _021D4ECA + b _021D4ECE +_021D4EA0: + ldr r0, _021D4ED4 ; =ov20_021D4ED8 + add r1, r4, #0 + mov r2, #0 + bl ov20_021D2170 + str r0, [r4, #0x1c] + ldrh r0, [r4, #0x1a] + add r0, r0, #1 + strh r0, [r4, #0x1a] + b _021D4ECE +_021D4EB4: + ldrh r0, [r4, #0x18] + cmp r0, #0 + bne _021D4ECE + ldr r0, [r4, #0x1c] + bl sub_0200DA58 + ldrh r0, [r4, #0x1a] + add r0, r0, #1 + strh r0, [r4, #0x1a] + mov r0, #1 + pop {r4, pc} +_021D4ECA: + mov r0, #1 + pop {r4, pc} +_021D4ECE: + mov r0, #0 + pop {r4, pc} + nop +_021D4ED4: .word ov20_021D4ED8 + thumb_func_end ov20_021D4E8C + + thumb_func_start ov20_021D4ED8 +ov20_021D4ED8: ; 0x021D4ED8 + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #0x18] + cmp r0, #0 + beq _021D4F06 + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x14] + add r3, r1, r0 + str r3, [r4, #0xc] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + ldr r0, [r4, #0] + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + asr r3, r3, #0xc + bl sub_02019184 + ldrh r0, [r4, #0x18] + sub r0, r0, #1 + strh r0, [r4, #0x18] + pop {r4, pc} +_021D4F06: + ldr r1, [r4, #4] + ldr r2, [r4, #8] + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + ldr r0, [r4, #0] + ldr r3, [r4, #0x10] + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl sub_02019184 + pop {r4, pc} + thumb_func_end ov20_021D4ED8 + + thumb_func_start ov20_021D4F1C +ov20_021D4F1C: ; 0x021D4F1C + push {r4, lr} + add r4, r0, #0 + str r1, [r4, #0] + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + str r2, [r4, #4] + str r1, [r4, #0x14] + str r3, [r4, #8] + sub r0, r0, r3 + bl sub_020E1F6C + str r0, [r4, #0x10] + ldr r0, [sp, #8] + mov r2, #0 + str r0, [r4, #0xc] + ldr r0, _021D4F48 ; =ov20_021D4F74 + add r1, r4, #0 + str r2, [r4, #0x18] + bl ov20_021D2170 + str r0, [r4, #0x1c] + pop {r4, pc} + ; .align 2, 0 +_021D4F48: .word ov20_021D4F74 + thumb_func_end ov20_021D4F1C + + thumb_func_start ov20_021D4F4C +ov20_021D4F4C: ; 0x021D4F4C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _021D4F6C + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021D4F70 + ldr r0, [r4, #0x1c] + bl sub_0200DA58 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + mov r0, #1 + pop {r4, pc} +_021D4F6C: + mov r0, #1 + pop {r4, pc} +_021D4F70: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov20_021D4F4C + + thumb_func_start ov20_021D4F74 +ov20_021D4F74: ; 0x021D4F74 + push {r3, lr} + add r2, r1, #0 + ldr r0, [r2, #0x14] + cmp r0, #0 + beq _021D4F90 + ldr r1, [r2, #8] + ldr r0, [r2, #0x10] + add r0, r1, r0 + str r0, [r2, #8] + asr r3, r0, #3 + ldr r0, [r2, #0x14] + sub r0, r0, #1 + str r0, [r2, #0x14] + b _021D4F94 +_021D4F90: + ldr r0, [r2, #0xc] + asr r3, r0, #3 +_021D4F94: + cmp r3, #0x10 + ble _021D4F9A + mov r3, #0x10 +_021D4F9A: + mov r0, #0x10 + sub r0, r0, r3 + str r0, [sp] + ldr r0, _021D4FAC ; =0x04000050 + ldmia r2!, {r1, r2} + bl sub_020BF55C + pop {r3, pc} + nop +_021D4FAC: .word 0x04000050 + thumb_func_end ov20_021D4F74 + + thumb_func_start ov20_021D4FB0 +ov20_021D4FB0: ; 0x021D4FB0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021D4FE8 ; =0x04000050 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_020BF578 + ldr r1, [sp, #0x18] + str r4, [r5, #0] + str r1, [r5, #0x14] + lsl r0, r6, #0xc + str r0, [r5, #8] + lsl r2, r7, #0xc + str r2, [r5, #0xc] + ldr r0, [r5, #8] + sub r0, r2, r0 + bl sub_020E1F6C + str r0, [r5, #0x10] + mov r2, #0 + ldr r0, _021D4FEC ; =ov20_021D5018 + add r1, r5, #0 + str r2, [r5, #0x18] + bl ov20_021D2170 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4FE8: .word 0x04000050 +_021D4FEC: .word ov20_021D5018 + thumb_func_end ov20_021D4FB0 + + thumb_func_start ov20_021D4FF0 +ov20_021D4FF0: ; 0x021D4FF0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _021D5010 + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021D5014 + ldr r0, [r4, #0x1c] + bl sub_0200DA58 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + mov r0, #1 + pop {r4, pc} +_021D5010: + mov r0, #1 + pop {r4, pc} +_021D5014: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov20_021D4FF0 + + thumb_func_start ov20_021D5018 +ov20_021D5018: ; 0x021D5018 + ldr r0, [r1, #0x14] + cmp r0, #0 + beq _021D5030 + ldr r2, [r1, #8] + ldr r0, [r1, #0x10] + add r0, r2, r0 + str r0, [r1, #8] + asr r2, r0, #0xc + ldr r0, [r1, #0x14] + sub r0, r0, #1 + str r0, [r1, #0x14] + b _021D5034 +_021D5030: + ldr r0, [r1, #0xc] + asr r2, r0, #0xc +_021D5034: + ldr r3, _021D503C ; =sub_020BF578 + ldr r0, _021D5040 ; =0x04000050 + ldr r1, [r1, #0] + bx r3 + ; .align 2, 0 +_021D503C: .word sub_020BF578 +_021D5040: .word 0x04000050 + thumb_func_end ov20_021D5018 \ No newline at end of file diff --git a/asm/ov20_021D5044.s b/asm/ov20_021D5044.s new file mode 100644 index 000000000..fb171d24f --- /dev/null +++ b/asm/ov20_021D5044.s @@ -0,0 +1,175 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov20_021D5044 +ov20_021D5044: ; 0x021D5044 + mov r0, #0x1b + bx lr + thumb_func_end ov20_021D5044 + + thumb_func_start ov20_021D5048 +ov20_021D5048: ; 0x021D5048 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r4, #0x1b + blo _021D5056 + bl sub_02022974 +_021D5056: + mov r1, #0xa + ldr r2, _021D5068 ; =0x021D5320 + mul r1, r4 + add r1, r2, r1 + add r0, r5, #0 + mov r2, #2 + bl sub_02023D8C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D5068: .word 0x021D5320 + thumb_func_end ov20_021D5048 + + thumb_func_start ov20_021D506C +ov20_021D506C: ; 0x021D506C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0x1b + blo _021D507C + bl sub_02022974 +_021D507C: + mov r0, #0xa + add r1, r5, #0 + mul r1, r0 + ldr r0, _021D5090 ; =0x021D5322 + ldrb r0, [r0, r1] + str r0, [r4, #0] + ldr r0, _021D5094 ; =0x021D5323 + ldrb r0, [r0, r1] + str r0, [r6, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D5090: .word 0x021D5322 +_021D5094: .word 0x021D5323 + thumb_func_end ov20_021D506C + + thumb_func_start ov20_021D5098 +ov20_021D5098: ; 0x021D5098 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x1b + blo _021D50A4 + bl sub_02022974 +_021D50A4: + mov r0, #0xa + add r1, r4, #0 + mul r1, r0 + ldr r0, _021D50B0 ; =0x021D5324 + ldrb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_021D50B0: .word 0x021D5324 + thumb_func_end ov20_021D5098 + + thumb_func_start ov20_021D50B4 +ov20_021D50B4: ; 0x021D50B4 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x1b + blo _021D50C0 + bl sub_02022974 +_021D50C0: + mov r0, #0xa + add r1, r4, #0 + mul r1, r0 + ldr r0, _021D50CC ; =0x021D5325 + ldrb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_021D50CC: .word 0x021D5325 + thumb_func_end ov20_021D50B4 + + thumb_func_start ov20_021D50D0 +ov20_021D50D0: ; 0x021D50D0 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x1b + blo _021D50DC + bl sub_02022974 +_021D50DC: + mov r0, #0xa + add r1, r4, #0 + mul r1, r0 + ldr r0, _021D50E8 ; =0x021D5326 + ldrb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_021D50E8: .word 0x021D5326 + thumb_func_end ov20_021D50D0 + + thumb_func_start ov20_021D50EC +ov20_021D50EC: ; 0x021D50EC + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x1b + blo _021D50F8 + bl sub_02022974 +_021D50F8: + mov r0, #0xa + add r1, r4, #0 + mul r1, r0 + ldr r0, _021D5104 ; =0x021D5327 + ldrb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_021D5104: .word 0x021D5327 + thumb_func_end ov20_021D50EC + + thumb_func_start ov20_021D5108 +ov20_021D5108: ; 0x021D5108 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x1b + blo _021D5114 + bl sub_02022974 +_021D5114: + mov r0, #0xa + add r1, r4, #0 + mul r1, r0 + ldr r0, _021D5120 ; =0x021D5328 + ldrb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_021D5120: .word 0x021D5328 + thumb_func_end ov20_021D5108 + + thumb_func_start ov20_021D5124 +ov20_021D5124: ; 0x021D5124 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x1b + blo _021D5130 + bl sub_02022974 +_021D5130: + mov r0, #0xa + add r1, r4, #0 + mul r1, r0 + ldr r0, _021D513C ; =0x021D5329 + ldrb r0, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_021D513C: .word 0x021D5329 + thumb_func_end ov20_021D5124 + + .rodata + + + .global Unk_ov20_021D5320 +Unk_ov20_021D5320: ; 0x021D5320 + .incbin "incbin/overlay20_rodata.bin", 0x1E0, 0x10E + diff --git a/asm/ov21_021D0D80.s b/asm/ov21_021D0D80.s new file mode 100644 index 000000000..1f4221df9 --- /dev/null +++ b/asm/ov21_021D0D80.s @@ -0,0 +1,2382 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D0D80 +ov21_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + sub sp, #0x20 + mov r1, #0 + add r5, r0, #0 + mov r0, #0x36 + add r2, r1, #0 + bl sub_02004550 + mov r2, #1 + mov r0, #3 + mov r1, #0x25 + lsl r2, r2, #0x12 + bl sub_02017FC8 + add r0, r5, #0 + mov r1, #4 + mov r2, #0x25 + bl sub_0200681C + add r4, r0, #0 + bne _021D0DAE + bl sub_02022974 +_021D0DAE: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + mov r0, #8 + mov r1, #0x25 + bl sub_0201DBEC + add r0, r5, #0 + bl sub_02006840 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r1, _021D0E34 ; =0x000001E7 + mov r2, #0 + bl sub_0202756C + bl sub_02098988 + ldr r0, _021D0E38 ; =ov21_021D0F04 + add r1, r4, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + cmp r0, #1 + beq _021D0DF4 + bl sub_02022974 +_021D0DF4: + mov r0, #0x25 + bl ov21_021D12B0 + ldr r0, [r5, #0] + add r1, sp, #0 + str r0, [sp] + ldr r0, [r5, #4] + str r0, [sp, #4] + ldr r0, [r5, #8] + str r0, [sp, #8] + ldr r0, [r5, #0xc] + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + str r0, [sp, #0x18] + ldr r0, [r5, #0x10] + str r0, [sp, #0x10] + ldr r0, [r5, #0x14] + str r0, [sp, #0x14] + ldr r0, [r5, #0x1c] + str r0, [sp, #0x1c] + mov r0, #0x25 + bl ov21_021D0F60 + str r0, [r4, #0] + mov r0, #1 + mov r1, #0x2a + bl sub_0200544C + mov r0, #1 + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_021D0E34: .word 0x000001E7 +_021D0E38: .word ov21_021D0F04 + thumb_func_end ov21_021D0D80 + + thumb_func_start ov21_021D0E3C +ov21_021D0E3C: ; 0x021D0E3C + push {r3, r4, r5, lr} + add r4, r1, #0 + bl sub_0200682C + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #3 + bhi _021D0EBC + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D0E58: ; jump table + .short _021D0E60 - _021D0E58 - 2 ; case 0 + .short _021D0E78 - _021D0E58 - 2 ; case 1 + .short _021D0E8E - _021D0E58 - 2 ; case 2 + .short _021D0E9A - _021D0E58 - 2 ; case 3 +_021D0E60: + bl ov21_021D0F18 + mov r0, #0xf + mvn r0, r0 + mov r1, #0x3f + mov r2, #3 + bl sub_0200AB4C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D0EBC +_021D0E78: + ldr r0, [r5, #0] + bl ov21_021D10B8 + cmp r0, #1 + bne _021D0EBC + mov r0, #0 + str r0, [r5, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D0EBC +_021D0E8E: + bl ov21_021D0F38 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D0EBC +_021D0E9A: + bl ov21_021D0F58 + cmp r0, #0 + beq _021D0EBC + mov r0, #0 + bl sub_0200F32C + mov r0, #1 + bl sub_0200F32C + ldr r0, _021D0EC0 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, _021D0EC4 ; =0x04001050 + strh r1, [r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D0EBC: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D0EC0: .word 0x04000050 +_021D0EC4: .word 0x04001050 + thumb_func_end ov21_021D0E3C + + thumb_func_start ov21_021D0EC8 +ov21_021D0EC8: ; 0x021D0EC8 + push {r4, lr} + add r4, r0, #0 + bl sub_0200682C + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_0201E530 + cmp r0, #1 + beq _021D0EE4 + bl sub_02022974 +_021D0EE4: + bl ov21_021D12C4 + bl sub_0201DC3C + add r0, r4, #0 + bl sub_02006830 + mov r0, #0x25 + bl sub_0201807C + mov r0, #1 + mov r1, #0x7f + bl sub_0200544C + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021D0EC8 + + thumb_func_start ov21_021D0F04 +ov21_021D0F04: ; 0x021D0F04 + push {r3, lr} + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D0F10 + bl ov21_021D12D8 +_021D0F10: + bl sub_0201DCAC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D0F04 + + thumb_func_start ov21_021D0F18 +ov21_021D0F18: ; 0x021D0F18 + push {lr} + sub sp, #0xc + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x25 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov21_021D0F18 + + thumb_func_start ov21_021D0F38 +ov21_021D0F38: ; 0x021D0F38 + push {lr} + sub sp, #0xc + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x25 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} + thumb_func_end ov21_021D0F38 + + thumb_func_start ov21_021D0F58 +ov21_021D0F58: ; 0x021D0F58 + ldr r3, _021D0F5C ; =sub_0200F2AC + bx r3 + ; .align 2, 0 +_021D0F5C: .word sub_0200F2AC + thumb_func_end ov21_021D0F58 + + thumb_func_start ov21_021D0F60 +ov21_021D0F60: ; 0x021D0F60 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r1, #0 + ldr r1, _021D1084 ; =0x00001D10 + add r7, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D0F76 + bl sub_02022974 +_021D0F76: + ldr r2, _021D1084 ; =0x00001D10 + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + str r7, [r4, #4] + ldr r0, [r5, #0x1c] + str r0, [r4, #8] + add r0, r7, #0 + bl ov21_021D423C + ldr r1, _021D1088 ; =0x00001A0C + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D423C + ldr r1, _021D108C ; =0x00001A10 + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D423C + ldr r1, _021D1090 ; =0x00001A14 + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D423C + ldr r1, _021D1094 ; =0x00001A18 + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D3FE0 + mov r1, #0x1d + lsl r1, r1, #8 + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D3FE0 + ldr r1, _021D1098 ; =0x00001D04 + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D3FE0 + ldr r1, _021D109C ; =0x00001D08 + str r0, [r4, r1] + add r0, r7, #0 + bl ov21_021D3FE0 + ldr r1, _021D10A0 ; =0x00001D0C + str r0, [r4, r1] + ldr r0, [r5, #0] + str r0, [sp, #8] + ldr r0, [r5, #4] + str r0, [sp, #0xc] + ldr r0, [r5, #8] + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + str r0, [sp, #0x14] + ldr r0, [r5, #0x10] + str r0, [sp, #0x18] + ldr r0, [r5, #0x14] + str r0, [sp, #0x1c] + ldr r0, [r5, #0x18] + str r0, [sp, #0x20] + ldr r0, [r5, #0x1c] + bl sub_0209ACE4 + str r0, [sp, #0x24] + ldr r0, [r5, #0x1c] + bl sub_0209ACEC + str r0, [sp, #0x28] + add r0, r4, #0 + add r0, #0xc + add r1, sp, #8 + add r2, r7, #0 + bl ov21_021D3208 + ldr r0, _021D10A4 ; =0x0000177C + add r1, r7, #0 + add r0, r4, r0 + bl ov21_021D1FA4 + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021D10A8 ; =0x00001A30 + ldr r5, _021D10AC ; =0x021E9B74 + add r6, r4, r0 +_021D1024: + ldr r3, [r5, #0] + cmp r3, #0 + beq _021D1032 + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + blx r3 +_021D1032: + ldr r0, [sp, #4] + add r5, r5, #4 + add r0, r0, #1 + add r6, #0x28 + str r0, [sp, #4] + cmp r0, #0xa + blt _021D1024 + mov r0, #0 + str r0, [sp] + mov r0, #0x6f + lsl r0, r0, #6 + ldr r5, _021D10B0 ; =0x021E9B34 + add r6, r4, r0 +_021D104C: + ldr r3, [r5, #0] + cmp r3, #0 + beq _021D105A + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + blx r3 +_021D105A: + ldr r0, [sp] + add r5, r5, #4 + add r0, r0, #1 + add r6, #0x28 + str r0, [sp] + cmp r0, #8 + blt _021D104C + ldr r1, _021D10B4 ; =0x00001A1C + add r0, r7, #0 + add r1, r4, r1 + add r2, r4, #0 + mov r3, #1 + bl ov21_021D47F0 + add r0, r4, #0 + bl ov21_021D1EEC + add r0, r4, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021D1084: .word 0x00001D10 +_021D1088: .word 0x00001A0C +_021D108C: .word 0x00001A10 +_021D1090: .word 0x00001A14 +_021D1094: .word 0x00001A18 +_021D1098: .word 0x00001D04 +_021D109C: .word 0x00001D08 +_021D10A0: .word 0x00001D0C +_021D10A4: .word 0x0000177C +_021D10A8: .word 0x00001A30 +_021D10AC: .word 0x021E9B74 +_021D10B0: .word 0x021E9B34 +_021D10B4: .word 0x00001A1C + thumb_func_end ov21_021D0F60 + + thumb_func_start ov21_021D10B8 +ov21_021D10B8: ; 0x021D10B8 + push {r4, lr} + add r4, r0, #0 + bne _021D10C2 + bl sub_02022974 +_021D10C2: + add r0, r4, #0 + add r0, #0xc + bl ov21_021D3960 + ldr r0, _021D128C ; =0x00001A14 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1126 + ldr r0, _021D1290 ; =0x00001A0C + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1126 + ldr r0, _021D1294 ; =0x00001A18 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1126 + ldr r0, _021D1298 ; =0x00001A10 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1126 + ldr r0, _021D129C ; =0x00001D08 + mov r1, #0 + ldr r0, [r4, r0] + bl ov21_021D4194 + ldr r0, _021D12A0 ; =0x00001D0C + mov r1, #0 + ldr r0, [r4, r0] + bl ov21_021D4194 + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r4, r0] + mov r1, #0 + bl ov21_021D4194 + ldr r0, _021D12A4 ; =0x00001D04 + mov r1, #0 + ldr r0, [r4, r0] + bl ov21_021D4194 + b _021D1150 +_021D1126: + ldr r0, _021D129C ; =0x00001D08 + mov r1, #1 + ldr r0, [r4, r0] + bl ov21_021D4194 + ldr r0, _021D12A0 ; =0x00001D0C + mov r1, #1 + ldr r0, [r4, r0] + bl ov21_021D4194 + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r4, r0] + mov r1, #1 + bl ov21_021D4194 + ldr r0, _021D12A4 ; =0x00001D04 + mov r1, #1 + ldr r0, [r4, r0] + bl ov21_021D4194 +_021D1150: + ldr r0, _021D129C ; =0x00001D08 + ldr r0, [r4, r0] + bl ov21_021D4078 + ldr r0, _021D12A0 ; =0x00001D0C + ldr r0, [r4, r0] + bl ov21_021D4078 + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r4, r0] + bl ov21_021D4078 + ldr r0, _021D12A4 ; =0x00001D04 + ldr r0, [r4, r0] + bl ov21_021D4078 + ldr r0, _021D129C ; =0x00001D08 + ldr r0, [r4, r0] + bl ov21_021D4100 + ldr r0, _021D12A0 ; =0x00001D0C + ldr r0, [r4, r0] + bl ov21_021D4100 + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r4, r0] + bl ov21_021D4100 + ldr r0, _021D12A4 ; =0x00001D04 + ldr r0, [r4, r0] + bl ov21_021D4100 + ldr r0, _021D1290 ; =0x00001A0C + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D11C4 + ldr r0, _021D1294 ; =0x00001A18 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D11C4 + ldr r0, _021D1298 ; =0x00001A10 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D11C4 + ldr r1, _021D128C ; =0x00001A14 + ldr r0, [r4, r1] + sub r1, #0x10 + ldr r1, [r4, r1] + bl ov21_021D4284 +_021D11C4: + ldr r0, _021D128C ; =0x00001A14 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D11F4 + ldr r0, _021D1294 ; =0x00001A18 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D11F4 + ldr r0, _021D1298 ; =0x00001A10 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D11F4 + ldr r1, _021D1290 ; =0x00001A0C + ldr r0, [r4, r1] + sub r1, #0x10 + ldr r1, [r4, r1] + bl ov21_021D4284 +_021D11F4: + ldr r0, _021D128C ; =0x00001A14 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1224 + ldr r0, _021D1290 ; =0x00001A0C + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1224 + ldr r0, _021D1298 ; =0x00001A10 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1224 + ldr r1, _021D1294 ; =0x00001A18 + ldr r0, [r4, r1] + sub r1, #0x10 + ldr r1, [r4, r1] + bl ov21_021D4284 +_021D1224: + ldr r0, _021D128C ; =0x00001A14 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1254 + ldr r0, _021D1290 ; =0x00001A0C + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1254 + ldr r0, _021D1294 ; =0x00001A18 + ldr r0, [r4, r0] + bl ov21_021D42D4 + cmp r0, #0 + bne _021D1254 + ldr r1, _021D1298 ; =0x00001A10 + ldr r0, [r4, r1] + sub r1, #0x10 + ldr r1, [r4, r1] + bl ov21_021D4284 +_021D1254: + bl sub_020241B4 + ldr r0, _021D12A8 ; =0x0000177C + add r0, r4, r0 + bl ov21_021D2124 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + ldr r1, _021D12AC ; =0x00001A04 + mov r0, #0 + str r0, [r4, r1] + add r2, r1, #4 + str r0, [r4, r2] + add r2, r1, #0 + sub r2, #8 + str r0, [r4, r2] + sub r1, r1, #4 + str r0, [r4, r1] + ldr r1, [r4, #0] + cmp r1, #1 + bne _021D128A + add r0, r4, #0 + bl ov21_021D1D08 + mov r0, #1 +_021D128A: + pop {r4, pc} + ; .align 2, 0 +_021D128C: .word 0x00001A14 +_021D1290: .word 0x00001A0C +_021D1294: .word 0x00001A18 +_021D1298: .word 0x00001A10 +_021D129C: .word 0x00001D08 +_021D12A0: .word 0x00001D0C +_021D12A4: .word 0x00001D04 +_021D12A8: .word 0x0000177C +_021D12AC: .word 0x00001A04 + thumb_func_end ov21_021D10B8 + + thumb_func_start ov21_021D12B0 +ov21_021D12B0: ; 0x021D12B0 + push {r4, lr} + add r4, r0, #0 + bl ov21_021D1E74 + add r0, r4, #0 + bl ov21_021D1E94 + bl ov21_021D1F10 + pop {r4, pc} + thumb_func_end ov21_021D12B0 + + thumb_func_start ov21_021D12C4 +ov21_021D12C4: ; 0x021D12C4 + push {r3, lr} + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + bl ov21_021D1F84 + pop {r3, pc} + thumb_func_end ov21_021D12C4 + + thumb_func_start ov21_021D12D8 +ov21_021D12D8: ; 0x021D12D8 + push {r3, lr} + ldr r1, _021D12E8 ; =0x0000177C + add r0, r0, r1 + bl ov21_021D214C + bl sub_0200A858 + pop {r3, pc} + ; .align 2, 0 +_021D12E8: .word 0x0000177C + thumb_func_end ov21_021D12D8 + + thumb_func_start ov21_021D12EC +ov21_021D12EC: ; 0x021D12EC + push {r4, lr} + add r4, r0, #0 + bne _021D12F6 + bl sub_02022974 +_021D12F6: + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D12EC + + thumb_func_start ov21_021D1300 +ov21_021D1300: ; 0x021D1300 + push {r4, lr} + add r4, r0, #0 + bne _021D130A + bl sub_02022974 +_021D130A: + ldr r0, _021D1310 ; =0x00001D04 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D1310: .word 0x00001D04 + thumb_func_end ov21_021D1300 + + thumb_func_start ov21_021D1314 +ov21_021D1314: ; 0x021D1314 + push {r4, lr} + add r4, r0, #0 + bne _021D131E + bl sub_02022974 +_021D131E: + ldr r0, _021D1324 ; =0x00001D08 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D1324: .word 0x00001D08 + thumb_func_end ov21_021D1314 + + thumb_func_start ov21_021D1328 +ov21_021D1328: ; 0x021D1328 + push {r4, lr} + add r4, r0, #0 + bne _021D1332 + bl sub_02022974 +_021D1332: + ldr r0, _021D1338 ; =0x00001D0C + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D1338: .word 0x00001D0C + thumb_func_end ov21_021D1328 + + thumb_func_start ov21_021D133C +ov21_021D133C: ; 0x021D133C + push {r4, lr} + add r4, r0, #0 + bne _021D1346 + bl sub_02022974 +_021D1346: + ldr r0, _021D134C ; =0x00001A0C + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D134C: .word 0x00001A0C + thumb_func_end ov21_021D133C + + thumb_func_start ov21_021D1350 +ov21_021D1350: ; 0x021D1350 + push {r4, lr} + add r4, r0, #0 + bne _021D135A + bl sub_02022974 +_021D135A: + ldr r0, _021D1360 ; =0x00001A10 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D1360: .word 0x00001A10 + thumb_func_end ov21_021D1350 + + thumb_func_start ov21_021D1364 +ov21_021D1364: ; 0x021D1364 + push {r4, lr} + add r4, r0, #0 + bne _021D136E + bl sub_02022974 +_021D136E: + ldr r0, _021D1374 ; =0x00001A14 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D1374: .word 0x00001A14 + thumb_func_end ov21_021D1364 + + thumb_func_start ov21_021D1378 +ov21_021D1378: ; 0x021D1378 + push {r4, lr} + add r4, r0, #0 + bne _021D1382 + bl sub_02022974 +_021D1382: + ldr r0, _021D1388 ; =0x00001A18 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D1388: .word 0x00001A18 + thumb_func_end ov21_021D1378 + + thumb_func_start ov21_021D138C +ov21_021D138C: ; 0x021D138C + push {r4, lr} + add r4, r0, #0 + bne _021D1396 + bl sub_02022974 +_021D1396: + ldr r0, _021D139C ; =0x000019FC + add r0, r4, r0 + pop {r4, pc} + ; .align 2, 0 +_021D139C: .word 0x000019FC + thumb_func_end ov21_021D138C + + thumb_func_start ov21_021D13A0 +ov21_021D13A0: ; 0x021D13A0 + push {r4, lr} + add r4, r0, #0 + bne _021D13AA + bl sub_02022974 +_021D13AA: + mov r0, #0x1a + lsl r0, r0, #8 + add r0, r4, r0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D13A0 + + thumb_func_start ov21_021D13B4 +ov21_021D13B4: ; 0x021D13B4 + push {r4, lr} + add r4, r0, #0 + bne _021D13BE + bl sub_02022974 +_021D13BE: + ldr r0, _021D13C4 ; =0x00001A04 + add r0, r4, r0 + pop {r4, pc} + ; .align 2, 0 +_021D13C4: .word 0x00001A04 + thumb_func_end ov21_021D13B4 + + thumb_func_start ov21_021D13C8 +ov21_021D13C8: ; 0x021D13C8 + push {r4, lr} + add r4, r0, #0 + bne _021D13D2 + bl sub_02022974 +_021D13D2: + ldr r0, _021D13D8 ; =0x00001A08 + add r0, r4, r0 + pop {r4, pc} + ; .align 2, 0 +_021D13D8: .word 0x00001A08 + thumb_func_end ov21_021D13C8 + + thumb_func_start ov21_021D13DC +ov21_021D13DC: ; 0x021D13DC + push {r4, lr} + add r4, r0, #0 + bne _021D13E6 + bl sub_02022974 +_021D13E6: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D13DC + + thumb_func_start ov21_021D13EC +ov21_021D13EC: ; 0x021D13EC + push {r4, lr} + add r4, r0, #0 + bne _021D13F6 + bl sub_02022974 +_021D13F6: + add r4, #0xc + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov21_021D13EC + + thumb_func_start ov21_021D13FC +ov21_021D13FC: ; 0x021D13FC + push {r4, lr} + add r4, r0, #0 + bne _021D1406 + bl sub_02022974 +_021D1406: + ldr r0, _021D140C ; =0x0000177C + add r0, r4, r0 + pop {r4, pc} + ; .align 2, 0 +_021D140C: .word 0x0000177C + thumb_func_end ov21_021D13FC + + thumb_func_start ov21_021D1410 +ov21_021D1410: ; 0x021D1410 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0xa + blt _021D141E + bl sub_02022974 +_021D141E: + ldr r0, _021D142C ; =0x00001A30 + add r1, r5, r0 + mov r0, #0x28 + mul r0, r4 + add r0, r1, r0 + pop {r3, r4, r5, pc} + nop +_021D142C: .word 0x00001A30 + thumb_func_end ov21_021D1410 + + thumb_func_start ov21_021D1430 +ov21_021D1430: ; 0x021D1430 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #8 + blt _021D143E + bl sub_02022974 +_021D143E: + mov r0, #0x6f + lsl r0, r0, #6 + add r1, r5, r0 + mov r0, #0x28 + mul r0, r4 + add r0, r1, r0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D1430 + + thumb_func_start ov21_021D144C +ov21_021D144C: ; 0x021D144C + push {r4, lr} + add r4, r0, #0 + cmp r1, #4 + bhi _021D1492 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D1460: ; jump table + .short _021D146A - _021D1460 - 2 ; case 0 + .short _021D147A - _021D1460 - 2 ; case 1 + .short _021D1472 - _021D1460 - 2 ; case 2 + .short _021D1482 - _021D1460 - 2 ; case 3 + .short _021D1482 - _021D1460 - 2 ; case 4 +_021D146A: + mov r1, #1 + bl sub_02021E50 + pop {r4, pc} +_021D1472: + mov r1, #2 + bl sub_02021E50 + pop {r4, pc} +_021D147A: + mov r1, #3 + bl sub_02021E50 + pop {r4, pc} +_021D1482: + bl sub_02021E74 + cmp r0, #0 + beq _021D1492 + ldr r1, _021D1494 ; =0xFFFFE000 + add r0, r4, #0 + bl sub_02021E2C +_021D1492: + pop {r4, pc} + ; .align 2, 0 +_021D1494: .word 0xFFFFE000 + thumb_func_end ov21_021D144C + + thumb_func_start ov21_021D1498 +ov21_021D1498: ; 0x021D1498 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r2, #0 + bl sub_02021E74 + cmp r0, #3 + bhi _021D1520 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D14B4: ; jump table + .short _021D14BC - _021D14B4 - 2 ; case 0 + .short _021D14D6 - _021D14B4 - 2 ; case 1 + .short _021D14F0 - _021D14B4 - 2 ; case 2 + .short _021D150A - _021D14B4 - 2 ; case 3 +_021D14BC: + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, sp, #0 + bl sub_020129A4 + str r5, [sp] + ldr r0, [r4, #0] + ldr r1, [sp, #4] + add r2, r5, #0 + bl sub_020128C4 + add sp, #8 + pop {r3, r4, r5, pc} +_021D14D6: + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, sp, #0 + bl sub_020129A4 + sub r2, r5, #2 + str r2, [sp] + ldr r0, [r4, #0] + ldr r1, [sp, #4] + bl sub_020128C4 + add sp, #8 + pop {r3, r4, r5, pc} +_021D14F0: + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, sp, #0 + bl sub_020129A4 + sub r2, r5, #4 + str r2, [sp] + ldr r0, [r4, #0] + ldr r1, [sp, #4] + bl sub_020128C4 + add sp, #8 + pop {r3, r4, r5, pc} +_021D150A: + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, sp, #0 + bl sub_020129A4 + sub r2, r5, #2 + str r2, [sp] + ldr r0, [r4, #0] + ldr r1, [sp, #4] + bl sub_020128C4 +_021D1520: + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D1498 + + thumb_func_start ov21_021D1524 +ov21_021D1524: ; 0x021D1524 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + bl ov21_021D1498 + add r0, r5, #0 + bl sub_02021E74 + cmp r0, #2 + ldr r0, [r4, #0] + bge _021D1544 + add r1, r6, #0 + bl sub_02012AC0 + pop {r4, r5, r6, pc} +_021D1544: + ldr r1, [sp, #0x10] + bl sub_02012AC0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D1524 + + thumb_func_start ov21_021D154C +ov21_021D154C: ; 0x021D154C + strb r1, [r0] + strb r2, [r0, #1] + ldr r1, [sp] + strb r3, [r0, #2] + strb r1, [r0, #3] + bx lr + thumb_func_end ov21_021D154C + + thumb_func_start ov21_021D1558 +ov21_021D1558: ; 0x021D1558 + str r1, [r0, #0] + str r2, [r0, #8] + ldr r2, [sp] + ldr r1, [sp, #4] + str r3, [r0, #4] + str r2, [r0, #0xc] + sub r1, r1, r2 + str r1, [r0, #0x14] + ldr r2, [sp, #8] + ldr r1, [sp, #0xc] + str r2, [r0, #0x10] + sub r1, r1, r2 + str r1, [r0, #0x18] + ldr r1, [sp, #0x10] + str r1, [r0, #0x20] + mov r1, #0 + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov21_021D1558 + + thumb_func_start ov21_021D157C +ov21_021D157C: ; 0x021D157C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r1, [r5, #0x1c] + ldr r0, [r5, #0x20] + cmp r1, r0 + bgt _021D1648 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + ldr r1, [r5, #8] + ldr r0, [r5, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02019CB8 + ldr r1, [r5, #0x14] + ldr r6, [r5, #0x1c] + add r0, r1, #0 + ldr r4, [r5, #0x20] + mul r0, r6 + add r1, r4, #0 + bl sub_020E1F6C + ldr r1, [r5, #0x18] + add r7, r0, #0 + add r0, r1, #0 + mul r0, r6 + add r1, r4, #0 + bl sub_020E1F6C + ldr r1, [r5, #0xc] + ldr r2, [r5, #0x10] + add r1, r7, r1 + add r4, r0, r2 + cmp r1, #0 + ble _021D1600 + mov r0, #0x20 + lsl r2, r1, #0x18 + str r0, [sp] + lsr r2, r2, #0x18 + str r2, [sp, #4] + ldr r2, [r5, #4] + sub r1, r0, r1 + add r2, #0xc + str r2, [sp, #8] + mov r2, #0 + lsl r1, r1, #0x18 + str r2, [sp, #0xc] + lsr r1, r1, #0x18 + str r1, [sp, #0x10] + str r0, [sp, #0x14] + str r0, [sp, #0x18] + ldr r1, [r5, #8] + ldr r0, [r5, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_020198E8 +_021D1600: + mov r0, #0x20 + sub r3, r0, r4 + cmp r3, #0 + ble _021D1630 + lsl r1, r4, #0x18 + str r0, [sp] + lsr r1, r1, #0x18 + str r1, [sp, #4] + ldr r1, [r5, #4] + mov r2, #0 + add r1, #0xc + str r1, [sp, #8] + str r2, [sp, #0xc] + str r2, [sp, #0x10] + str r0, [sp, #0x14] + str r0, [sp, #0x18] + ldr r1, [r5, #8] + lsl r3, r3, #0x18 + lsl r1, r1, #0x18 + ldr r0, [r5, #0] + lsr r1, r1, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 +_021D1630: + ldr r1, [r5, #8] + ldr r0, [r5, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201C3C0 + ldr r0, [r5, #0x1c] + add sp, #0x1c + add r0, r0, #1 + str r0, [r5, #0x1c] + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D1648: + mov r0, #1 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D157C + + thumb_func_start ov21_021D1650 +ov21_021D1650: ; 0x021D1650 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r6, r0, #0 + add r4, r3, #0 + str r2, [sp, #0x10] + cmp r5, #0 + ble _021D167A + mov r0, #4 + add r1, r4, #0 + bl sub_02023790 + mov r1, #1 + str r1, [sp] + add r1, r5, #0 + mov r2, #3 + mov r3, #2 + add r7, r0, #0 + bl sub_020238A0 + b _021D1684 +_021D167A: + mov r0, #0x64 + add r1, r4, #0 + bl ov21_021D1CE0 + add r7, r0, #0 +_021D1684: + ldr r0, [sp, #0x10] + mov r1, #2 + add r2, r4, #0 + bl ov21_021D561C + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D16D4 ; =0x00030201 + add r2, r7, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r6, #0 + mov r1, #2 + mov r3, #0x16 + bl sub_0201D78C + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D16D4 ; =0x00030201 + add r2, r4, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r6, #0 + mov r1, #2 + mov r3, #0x31 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl ov21_021D5600 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D16D4: .word 0x00030201 + thumb_func_end ov21_021D1650 + + thumb_func_start ov21_021D16D8 +ov21_021D16D8: ; 0x021D16D8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021D36D8 + cmp r0, #0 + bne _021D16FA + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021D172C + pop {r4, r5, r6, pc} +_021D16FA: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021D170C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D16D8 + + thumb_func_start ov21_021D170C +ov21_021D170C: ; 0x021D170C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + mov r1, #0xf + mov r2, #2 + bl ov21_021D4D6C + add r1, r6, #0 + add r2, r6, #0 + add r3, r5, #0 + add r4, r0, #0 + bl ov21_021D1650 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D170C + + thumb_func_start ov21_021D172C +ov21_021D172C: ; 0x021D172C + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + add r6, r0, #0 + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + add r7, r1, #0 + bl sub_020775A4 + ldr r1, _021D1774 ; =0x00000179 + add r4, r0, #0 + cmp r5, r1 + beq _021D1758 + add r0, r1, #1 + cmp r5, r0 + beq _021D1758 + add r0, r1, #2 + cmp r5, r0 + beq _021D1758 + cmp r4, #0 + bgt _021D1758 + bl sub_02022974 +_021D1758: + add r0, r6, #0 + mov r1, #0xf + mov r2, #2 + bl ov21_021D4D6C + add r1, r4, #0 + add r2, r5, #0 + add r3, r7, #0 + add r6, r0, #0 + bl ov21_021D1650 + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1774: .word 0x00000179 + thumb_func_end ov21_021D172C + + thumb_func_start ov21_021D1778 +ov21_021D1778: ; 0x021D1778 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r7, r1, #0 + add r5, r0, #0 + add r4, r3, #0 + add r0, r7, #0 + str r2, [sp, #4] + bl ov21_021D36D8 + str r0, [sp, #8] + add r0, r7, #0 + add r1, r4, #0 + bl ov21_021D37DC + add r4, r0, #0 + add r0, r5, #0 + bl ov21_021D22A8 + add r6, r0, #0 + add r0, r5, #0 + bl ov21_021D22C4 + str r0, [sp, #0xc] + ldr r0, [sp, #0x58] + add r1, sp, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x5c] + str r0, [sp, #0x14] + add r0, r6, #0 + bl sub_02021C50 + add r0, r6, #0 + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #4] + cmp r0, #2 + bne _021D17E4 + mov r0, #0x36 + ldr r1, [sp, #0x58] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x5c] + add r1, sp, #0x10 + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + bl sub_02021C50 + ldr r0, [sp, #0xc] + mov r1, #1 + bl sub_02021CAC + b _021D17EC +_021D17E4: + ldr r0, [sp, #0xc] + mov r1, #0 + bl sub_02021CAC +_021D17EC: + add r0, r5, #0 + mov r1, #1 + bl ov21_021D2344 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r5, r1] + str r1, [sp, #0x1c] + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #0x24] + mov r0, #0x3f + mvn r0, r0 + str r0, [sp, #0x2c] + add r0, #0x38 + str r0, [sp, #0x30] + mov r0, #0 + str r0, [sp, #0x34] + str r0, [sp, #0x38] + mov r0, #1 + str r0, [sp, #0x3c] + ldr r0, [sp, #4] + str r6, [sp, #0x28] + str r0, [sp, #0x40] + ldr r2, [sp, #4] + ldr r3, [r4, #0] + add r0, r5, #0 + add r1, r7, #0 + bl ov21_021D16D8 + add r6, r0, #0 + ldr r0, [sp, #8] + str r6, [sp, #0x20] + str r0, [sp] + ldr r3, [r4, #0] + add r0, r5, #0 + add r1, sp, #0x1c + mov r2, #0 + bl ov21_021D22E0 + add r0, r6, #0 + bl ov21_021D4DA0 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021D1778 + + thumb_func_start ov21_021D1848 +ov21_021D1848: ; 0x021D1848 + mov r3, #0x6d + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _021D1854 ; =ov21_021D1858 + bx r3 + nop +_021D1854: .word ov21_021D1858 + thumb_func_end ov21_021D1848 + + thumb_func_start ov21_021D1858 +ov21_021D1858: ; 0x021D1858 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + lsl r0, r1, #0xc + str r0, [sp] + lsl r0, r2, #0xc + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0 + bl sub_02021C50 + mov r0, #0x36 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #4] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #8] + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D188C + bl sub_02012938 +_021D188C: + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov21_021D1858 + + thumb_func_start ov21_021D1890 +ov21_021D1890: ; 0x021D1890 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r2, #0 + ldr r2, _021D19D4 ; =0x000001A6 + add r7, r3, #0 + ldr r4, [sp, #0x28] + ldr r3, [sp, #0x2c] + cmp r5, r2 + bgt _021D18D8 + bge _021D1944 + add r6, r2, #0 + sub r6, #0x24 + cmp r5, r6 + bgt _021D18B8 + sub r2, #0x24 + cmp r5, r2 + bge _021D196C + cmp r5, #0xc9 + beq _021D1908 + b _021D19BC +_021D18B8: + add r6, r2, #0 + sub r6, #9 + cmp r5, r6 + bgt _021D19BC + add r6, r2, #0 + sub r6, #0xa + cmp r5, r6 + blt _021D19BC + add r6, r2, #0 + sub r6, #0xa + cmp r5, r6 + beq _021D191C + sub r2, #9 + cmp r5, r2 + beq _021D1930 + b _021D19BC +_021D18D8: + add r6, r2, #0 + add r6, #0x39 + cmp r5, r6 + bgt _021D18F0 + add r6, r2, #0 + add r6, #0x39 + cmp r5, r6 + bge _021D19A8 + add r2, r2, #1 + cmp r5, r2 + beq _021D1958 + b _021D19BC +_021D18F0: + add r6, r2, #0 + add r6, #0x41 + cmp r5, r6 + bgt _021D1900 + add r2, #0x41 + cmp r5, r2 + beq _021D1994 + b _021D19BC +_021D1900: + add r2, #0x46 + cmp r5, r2 + beq _021D1980 + b _021D19BC +_021D1908: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1A34 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D191C: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1B08 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D1930: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1B4C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D1944: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1A78 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D1958: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1AC0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D196C: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1B94 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D1980: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1BD8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D1994: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1C30 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D19A8: + str r3, [sp] + mov r2, #0 + str r2, [sp, #4] + str r2, [sp, #8] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D1C88 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D19BC: + str r4, [sp] + str r3, [sp, #4] + mov r2, #0 + str r2, [sp, #8] + str r2, [sp, #0xc] + add r2, r5, #0 + add r3, r7, #0 + bl ov21_021D19D8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D19D4: .word 0x000001A6 + thumb_func_end ov21_021D1890 + + thumb_func_start ov21_021D19D8 +ov21_021D19D8: ; 0x021D19D8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + ldr r0, _021D1A30 ; =0x00000147 + add r5, r2, #0 + add r6, r1, #0 + mov r4, #0 + str r3, [sp, #0x18] + cmp r5, r0 + bne _021D19F4 + add r0, r6, #0 + bl ov21_021D33F8 + add r4, r0, #0 +_021D19F4: + ldr r2, [sp, #0x38] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021D334C + add r6, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _021D1A28 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x30] + str r4, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x34] + ldr r3, [sp, #0x18] + str r0, [sp, #0x10] + ldr r0, [sp, #0x3c] + add r1, r5, #0 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r6, #0 + bl ov21_021D2188 +_021D1A28: + add r0, r6, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D1A30: .word 0x00000147 + thumb_func_end ov21_021D19D8 + + thumb_func_start ov21_021D1A34 +ov21_021D1A34: ; 0x021D1A34 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, r1, #0 + ldr r1, [sp, #0x34] + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D335C + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D1A72 + mov r1, #0 + lsl r0, r4, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + mov r1, #0xc9 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r2, #2 + add r3, r7, #0 + bl ov21_021D2188 +_021D1A72: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D1A34 + + thumb_func_start ov21_021D1A78 +ov21_021D1A78: ; 0x021D1A78 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, r1, #0 + ldr r1, [sp, #0x34] + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D3374 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D1AB4 + mov r2, #0 + lsl r0, r4, #0x18 + str r2, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r2, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, _021D1ABC ; =0x000001A6 + str r0, [sp, #0x14] + add r0, r6, #0 + add r3, r7, #0 + bl ov21_021D2188 +_021D1AB4: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1ABC: .word 0x000001A6 + thumb_func_end ov21_021D1A78 + + thumb_func_start ov21_021D1AC0 +ov21_021D1AC0: ; 0x021D1AC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, r1, #0 + ldr r1, [sp, #0x34] + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D338C + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D1AFC + mov r2, #0 + lsl r0, r4, #0x18 + str r2, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r2, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, _021D1B04 ; =0x000001A7 + str r0, [sp, #0x14] + add r0, r6, #0 + add r3, r7, #0 + bl ov21_021D2188 +_021D1AFC: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1B04: .word 0x000001A7 + thumb_func_end ov21_021D1AC0 + + thumb_func_start ov21_021D1B08 +ov21_021D1B08: ; 0x021D1B08 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, r1, #0 + ldr r1, [sp, #0x34] + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D33A4 + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D1B46 + mov r2, #0 + lsl r0, r4, #0x18 + str r2, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r2, [sp, #8] + mov r1, #0x67 + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + lsl r1, r1, #2 + str r0, [sp, #0x14] + add r0, r6, #0 + add r3, r7, #0 + bl ov21_021D2188 +_021D1B46: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D1B08 + + thumb_func_start ov21_021D1B4C +ov21_021D1B4C: ; 0x021D1B4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, r1, #0 + ldr r1, [sp, #0x34] + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D33BC + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D1B8A + mov r1, #0 + lsl r0, r4, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, _021D1B90 ; =0x0000019D + str r0, [sp, #0x14] + add r0, r6, #0 + mov r2, #1 + add r3, r7, #0 + bl ov21_021D2188 +_021D1B8A: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1B90: .word 0x0000019D + thumb_func_end ov21_021D1B4C + + thumb_func_start ov21_021D1B94 +ov21_021D1B94: ; 0x021D1B94 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, r1, #0 + ldr r1, [sp, #0x34] + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D3404 + add r4, r0, #0 + cmp r4, #0xf + beq _021D1BCE + mov r1, #0 + lsl r0, r4, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, _021D1BD4 ; =0x00000182 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r2, #1 + add r3, r7, #0 + bl ov21_021D2188 +_021D1BCE: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1BD4: .word 0x00000182 + thumb_func_end ov21_021D1B94 + + thumb_func_start ov21_021D1BD8 +ov21_021D1BD8: ; 0x021D1BD8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + mov r1, #0x7b + add r6, r0, #0 + add r0, r4, #0 + lsl r1, r1, #2 + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D341C + ldr r2, [sp, #0x34] + cmp r0, r2 + ble _021D1C26 + mov r1, #0x7b + add r0, r4, #0 + lsl r1, r1, #2 + bl ov21_021D3410 + add r4, r0, #0 + mov r1, #0 + lsl r0, r4, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #0x7b + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + lsl r1, r1, #2 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r2, #1 + add r3, r7, #0 + bl ov21_021D2188 + b _021D1C2A +_021D1C26: + mov r4, #0 + mvn r4, r4 +_021D1C2A: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D1BD8 + + thumb_func_start ov21_021D1C30 +ov21_021D1C30: ; 0x021D1C30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r6, r0, #0 + ldr r1, _021D1C84 ; =0x000001E7 + add r0, r4, #0 + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D341C + ldr r2, [sp, #0x34] + cmp r0, r2 + ble _021D1C78 + ldr r1, _021D1C84 ; =0x000001E7 + add r0, r4, #0 + bl ov21_021D3410 + add r4, r0, #0 + mov r1, #0 + lsl r0, r4, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, _021D1C84 ; =0x000001E7 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r2, #1 + add r3, r7, #0 + bl ov21_021D2188 + b _021D1C7C +_021D1C78: + mov r4, #0 + mvn r4, r4 +_021D1C7C: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1C84: .word 0x000001E7 + thumb_func_end ov21_021D1C30 + + thumb_func_start ov21_021D1C88 +ov21_021D1C88: ; 0x021D1C88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r6, r0, #0 + ldr r1, _021D1CDC ; =0x000001DF + add r0, r4, #0 + add r7, r2, #0 + add r5, r3, #0 + bl ov21_021D341C + ldr r2, [sp, #0x34] + cmp r0, r2 + ble _021D1CD0 + ldr r1, _021D1CDC ; =0x000001DF + add r0, r4, #0 + bl ov21_021D3410 + add r4, r0, #0 + mov r1, #0 + lsl r0, r4, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [sp, #0x30] + str r5, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, _021D1CDC ; =0x000001DF + str r0, [sp, #0x14] + add r0, r6, #0 + mov r2, #1 + add r3, r7, #0 + bl ov21_021D2188 + b _021D1CD4 +_021D1CD0: + mov r4, #0 + mvn r4, r4 +_021D1CD4: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1CDC: .word 0x000001DF + thumb_func_end ov21_021D1C88 + + thumb_func_start ov21_021D1CE0 +ov21_021D1CE0: ; 0x021D1CE0 + push {r3, r4, r5, lr} + ldr r2, _021D1D04 ; =0x000002B9 + add r4, r0, #0 + add r3, r1, #0 + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + add r5, r0, #0 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + bl sub_0200B190 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1D04: .word 0x000002B9 + thumb_func_end ov21_021D1CE0 + + thumb_func_start ov21_021D1D08 +ov21_021D1D08: ; 0x021D1D08 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _021D1E44 ; =0x00001A1C + add r0, r6, r0 + bl ov21_021D4660 + ldr r0, _021D1E48 ; =0x00001A0C + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D20 + bl sub_02022974 +_021D1D20: + ldr r0, _021D1E48 ; =0x00001A0C + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E4C ; =0x00001A10 + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D34 + bl sub_02022974 +_021D1D34: + ldr r0, _021D1E4C ; =0x00001A10 + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E50 ; =0x00001A14 + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D48 + bl sub_02022974 +_021D1D48: + ldr r0, _021D1E50 ; =0x00001A14 + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E54 ; =0x00001A18 + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D5C + bl sub_02022974 +_021D1D5C: + ldr r0, _021D1E54 ; =0x00001A18 + ldr r0, [r6, r0] + bl sub_020181C4 + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D72 + bl sub_02022974 +_021D1D72: + mov r0, #0x1d + lsl r0, r0, #8 + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E58 ; =0x00001D04 + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D88 + bl sub_02022974 +_021D1D88: + ldr r0, _021D1E58 ; =0x00001D04 + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E5C ; =0x00001D08 + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1D9C + bl sub_02022974 +_021D1D9C: + ldr r0, _021D1E5C ; =0x00001D08 + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E60 ; =0x00001D0C + ldr r0, [r6, r0] + cmp r0, #0 + bne _021D1DB0 + bl sub_02022974 +_021D1DB0: + ldr r0, _021D1E60 ; =0x00001D0C + ldr r0, [r6, r0] + bl sub_020181C4 + ldr r0, _021D1E64 ; =0x00001A30 + ldr r4, _021D1E68 ; =0x021E9B9C + mov r7, #0 + add r5, r6, r0 +_021D1DC0: + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D1DCA + add r0, r5, #0 + blx r1 +_021D1DCA: + add r7, r7, #1 + add r4, r4, #4 + add r5, #0x28 + cmp r7, #0xa + blt _021D1DC0 + mov r0, #0x6f + lsl r0, r0, #6 + ldr r4, _021D1E6C ; =0x021E9B54 + mov r7, #0 + add r5, r6, r0 +_021D1DDE: + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D1DE8 + add r0, r5, #0 + blx r1 +_021D1DE8: + add r7, r7, #1 + add r4, r4, #4 + add r5, #0x28 + cmp r7, #8 + blt _021D1DDE + add r0, r6, #0 + add r0, #0xc + bl ov21_021D3440 + add r1, r0, #0 + ldr r0, [r6, #8] + bl sub_0209ACE8 + add r0, r6, #0 + add r0, #0xc + mov r1, #1 + bl ov21_021D36A4 + cmp r0, #1 + bne _021D1E22 + add r0, r6, #0 + add r0, #0xc + bl ov21_021D3458 + add r1, r0, #0 + ldr r0, [r6, #8] + bl sub_0209ACF0 + b _021D1E2A +_021D1E22: + ldr r0, [r6, #8] + mov r1, #2 + bl sub_0209ACF0 +_021D1E2A: + add r0, r6, #0 + add r0, #0xc + bl ov21_021D3320 + ldr r0, _021D1E70 ; =0x0000177C + add r0, r6, r0 + bl ov21_021D2098 + add r0, r6, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1E44: .word 0x00001A1C +_021D1E48: .word 0x00001A0C +_021D1E4C: .word 0x00001A10 +_021D1E50: .word 0x00001A14 +_021D1E54: .word 0x00001A18 +_021D1E58: .word 0x00001D04 +_021D1E5C: .word 0x00001D08 +_021D1E60: .word 0x00001D0C +_021D1E64: .word 0x00001A30 +_021D1E68: .word 0x021E9B9C +_021D1E6C: .word 0x021E9B54 +_021D1E70: .word 0x0000177C + thumb_func_end ov21_021D1D08 + + thumb_func_start ov21_021D1E74 +ov21_021D1E74: ; 0x021D1E74 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D1E90 ; =0x021E9BC4 + add r3, sp, #0 + mov r2, #5 +_021D1E7E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D1E7E + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D1E90: .word 0x021E9BC4 + thumb_func_end ov21_021D1E74 + + thumb_func_start ov21_021D1E94 +ov21_021D1E94: ; 0x021D1E94 + push {r4, r5, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x80 + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + add r2, r0, #0 + str r4, [sp, #0x10] + bl sub_0200A784 + ldr r5, _021D1EE4 ; =0x021E9B24 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + ldr r1, _021D1EE8 ; =0x00200010 + mov r2, #0x10 + str r4, [sp, #0x20] + bl sub_0201E88C + mov r0, #0x20 + add r1, r4, #0 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x24 + pop {r4, r5, pc} + nop +_021D1EE4: .word 0x021E9B24 +_021D1EE8: .word 0x00200010 + thumb_func_end ov21_021D1E94 + + thumb_func_start ov21_021D1EEC +ov21_021D1EEC: ; 0x021D1EEC + push {r4, lr} + ldr r1, _021D1F08 ; =0x00001A0C + add r4, r0, #0 + ldr r0, [r4, r1] + add r1, #0x10 + add r1, r4, r1 + mov r2, #1 + bl ov21_021D426C + ldr r0, _021D1F0C ; =0x000019FC + mov r1, #1 + str r1, [r4, r0] + pop {r4, pc} + nop +_021D1F08: .word 0x00001A0C +_021D1F0C: .word 0x000019FC + thumb_func_end ov21_021D1EEC + + thumb_func_start ov21_021D1F10 +ov21_021D1F10: ; 0x021D1F10 + push {r3, lr} + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _021D1F70 ; =0x04000060 + ldr r2, _021D1F74 ; =0xFFFFCFFD + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + ldrh r3, [r0] + add r1, r2, #2 + and r3, r1 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0] + ldr r1, _021D1F78 ; =0x0000CFFB + and r1, r3 + strh r1, [r0] + add r1, r2, #2 + ldrh r3, [r0] + lsr r2, r2, #0x11 + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _021D1F7C ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _021D1F80 ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + pop {r3, pc} + ; .align 2, 0 +_021D1F70: .word 0x04000060 +_021D1F74: .word 0xFFFFCFFD +_021D1F78: .word 0x0000CFFB +_021D1F7C: .word 0x04000540 +_021D1F80: .word 0xBFFF0000 + thumb_func_end ov21_021D1F10 + + thumb_func_start ov21_021D1F84 +ov21_021D1F84: ; 0x021D1F84 + push {r3, lr} + bl sub_020A5B1C + bl sub_020A5F50 + pop {r3, pc} + thumb_func_end ov21_021D1F84 + + .rodata + + + .global Unk_ov21_021E9B24 +Unk_ov21_021E9B24: ; 0x021E9B24 + .incbin "incbin/overlay21_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov21_021E9B34 +Unk_ov21_021E9B34: ; 0x021E9B34 + .incbin "incbin/overlay21_rodata.bin", 0x10, 0x30 - 0x10 + + .global Unk_ov21_021E9B54 +Unk_ov21_021E9B54: ; 0x021E9B54 + .incbin "incbin/overlay21_rodata.bin", 0x30, 0x50 - 0x30 + + .global Unk_ov21_021E9B74 +Unk_ov21_021E9B74: ; 0x021E9B74 + .incbin "incbin/overlay21_rodata.bin", 0x50, 0x78 - 0x50 + + .global Unk_ov21_021E9B9C +Unk_ov21_021E9B9C: ; 0x021E9B9C + .incbin "incbin/overlay21_rodata.bin", 0x78, 0xA0 - 0x78 + + .global Unk_ov21_021E9BC4 +Unk_ov21_021E9BC4: ; 0x021E9BC4 + .incbin "incbin/overlay21_rodata.bin", 0xA0, 0x28 + diff --git a/asm/ov21_021D1F90.s b/asm/ov21_021D1F90.s new file mode 100644 index 000000000..ef86f4fa5 --- /dev/null +++ b/asm/ov21_021D1F90.s @@ -0,0 +1,37 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D1F90 +ov21_021D1F90: ; 0x021D1F90 + mov r0, #0x46 + bx lr + thumb_func_end ov21_021D1F90 + + thumb_func_start ov21_021D1F94 +ov21_021D1F94: ; 0x021D1F94 + add r0, r0, #3 + bx lr + thumb_func_end ov21_021D1F94 + + thumb_func_start ov21_021D1F98 +ov21_021D1F98: ; 0x021D1F98 + mov r0, #0 + bx lr + thumb_func_end ov21_021D1F98 + + thumb_func_start ov21_021D1F9C +ov21_021D1F9C: ; 0x021D1F9C + mov r0, #2 + bx lr + thumb_func_end ov21_021D1F9C + + thumb_func_start ov21_021D1FA0 +ov21_021D1FA0: ; 0x021D1FA0 + mov r0, #1 + bx lr + thumb_func_end ov21_021D1FA0 \ No newline at end of file diff --git a/asm/ov21_021D1FA4.s b/asm/ov21_021D1FA4.s new file mode 100644 index 000000000..30751cbeb --- /dev/null +++ b/asm/ov21_021D1FA4.s @@ -0,0 +1,2460 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D1FA4 +ov21_021D1FA4: ; 0x021D1FA4 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0x45 + add r4, r1, #0 + bl sub_02006C24 + mov r1, #0x9f + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r4, #0 + bl sub_02018340 + str r0, [r5, #0] + mov r1, #1 + mov r0, #0 + str r0, [sp, #0x14] + str r1, [sp, #0x10] + str r1, [sp, #0x18] + str r1, [sp, #0x1c] + add r0, sp, #0x10 + bl sub_02018368 + ldr r0, [r5, #0] + add r1, r4, #0 + bl ov21_021D2830 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D29D0 + add r1, r5, #0 + mov r0, #0x80 + add r1, #0x14 + add r2, r4, #0 + bl sub_020095C4 + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x20 + mov r1, #0 + add r2, r4, #0 + bl sub_02009714 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r0, #0x20 + mov r1, #1 + add r2, r4, #0 + bl sub_02009714 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x20 + mov r1, #2 + add r2, r4, #0 + bl sub_02009714 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x20 + mov r1, #3 + add r2, r4, #0 + bl sub_02009714 + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + str r0, [sp] + ldr r0, [r5, #0] + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + add r0, sp, #0 + str r4, [sp, #0xc] + bl ov21_021D4C0C + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #2 + add r1, r4, #0 + bl sub_02002BB8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D2A0C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D2AE8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D2C8C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D2E70 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D2F5C + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D1FA4 + + thumb_func_start ov21_021D2098 +ov21_021D2098: ; 0x021D2098 + push {r4, lr} + add r4, r0, #0 + bl ov21_021D2D4C + add r0, r4, #0 + bl ov21_021D2C10 + add r0, r4, #0 + bl ov21_021D300C + add r0, r4, #0 + bl ov21_021D2F14 + add r0, r4, #0 + bl ov21_021D2A00 + ldr r0, [r4, #0] + bl ov21_021D299C + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021964 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02009754 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02009754 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02009754 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02009754 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov21_021D4C6C + mov r0, #2 + bl sub_02002C60 + add r0, r4, #0 + bl ov21_021D2AB4 + mov r0, #0x9f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02006CA8 + mov r2, #0xa + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #6 + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov21_021D2098 + + thumb_func_start ov21_021D2124 +ov21_021D2124: ; 0x021D2124 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020219F8 + bl sub_020A73C0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02007768 + mov r0, #0x5a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020150EC + pop {r4, pc} + thumb_func_end ov21_021D2124 + + thumb_func_start ov21_021D214C +ov21_021D214C: ; 0x021D214C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0201C2B8 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02008A94 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D214C + + thumb_func_start ov21_021D2164 +ov21_021D2164: ; 0x021D2164 + push {r3, lr} + mov r3, #0 + bl ov21_021D222C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D2164 + + thumb_func_start ov21_021D2170 +ov21_021D2170: ; 0x021D2170 + ldr r3, _021D2178 ; =ov21_021D2274 + mov r1, #0 + bx r3 + nop +_021D2178: .word ov21_021D2274 + thumb_func_end ov21_021D2170 + + thumb_func_start ov21_021D217C +ov21_021D217C: ; 0x021D217C + ldr r3, _021D2184 ; =ov21_021D2280 + mov r2, #0 + bx r3 + nop +_021D2184: .word ov21_021D2280 + thumb_func_end ov21_021D217C + + thumb_func_start ov21_021D2188 +ov21_021D2188: ; 0x021D2188 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r1, #0 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [sp, #0x10] + add r7, r0, r1 + ldr r0, [sp, #0x54] + add r4, r2, #0 + lsl r0, r0, #2 + str r0, [sp, #0x14] + ldr r0, [r7, r0] + add r6, r3, #0 + cmp r0, #0 + beq _021D21AA + bl sub_02007DC8 +_021D21AA: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _021D21BE + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + mov r1, #0 + bl sub_02075DAC + add r4, r0, #0 +_021D21BE: + ldr r0, [sp, #0x40] + lsl r1, r5, #0x10 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + add r0, sp, #0x30 + ldrb r0, [r0, #0x14] + lsl r2, r4, #0x18 + lsl r3, r6, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x48] + lsr r1, r1, #0x10 + str r0, [sp, #8] + add r0, sp, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_02075FB4 + cmp r6, #0 + bne _021D2202 + ldr r0, [sp, #0x48] + lsl r1, r4, #0x18 + str r0, [sp] + add r3, sp, #0x30 + lsl r0, r5, #0x10 + lsl r2, r6, #0x18 + ldrb r3, [r3, #0x14] + lsr r0, r0, #0x10 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl sub_02076648 + add r3, r0, #0 + b _021D2204 +_021D2202: + mov r3, #0 +_021D2204: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r1, #0x55 + ldr r4, [sp, #0x50] + ldr r0, [sp, #0x10] + lsl r1, r1, #2 + ldr r0, [r0, r1] + ldr r2, [sp, #0x4c] + add r1, sp, #0x18 + add r3, r4, r3 + bl sub_02007C34 + ldr r1, [sp, #0x14] + str r0, [r7, r1] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D2188 + + thumb_func_start ov21_021D222C +ov21_021D222C: ; 0x021D222C + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x56 + lsl r1, r1, #2 + add r5, r0, r1 + lsl r4, r3, #2 + add r7, r2, #0 + ldr r0, [r5, r4] + mov r1, #0 + add r2, r6, #0 + bl sub_02007DEC + ldr r0, [r5, r4] + mov r1, #1 + add r2, r7, #0 + bl sub_02007DEC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D222C + + thumb_func_start ov21_021D2250 +ov21_021D2250: ; 0x021D2250 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x56 + lsl r1, r1, #2 + add r5, r0, r1 + lsl r4, r3, #2 + ldr r0, [r5, r4] + mov r1, #0 + add r7, r2, #0 + bl sub_020080C0 + str r0, [r6, #0] + ldr r0, [r5, r4] + mov r1, #1 + bl sub_020080C0 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D2250 + + thumb_func_start ov21_021D2274 +ov21_021D2274: ; 0x021D2274 + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bx lr + thumb_func_end ov21_021D2274 + + thumb_func_start ov21_021D2280 +ov21_021D2280: ; 0x021D2280 + push {r3, lr} + lsl r2, r2, #2 + add r2, r0, r2 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r2, r0] + cmp r0, #0 + beq _021D22A6 + cmp r1, #1 + bne _021D229E + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + pop {r3, pc} +_021D229E: + mov r1, #6 + mov r2, #1 + bl sub_02007DEC +_021D22A6: + pop {r3, pc} + thumb_func_end ov21_021D2280 + + thumb_func_start ov21_021D22A8 +ov21_021D22A8: ; 0x021D22A8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6d + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021D22BA + bl sub_02022974 +_021D22BA: + mov r0, #0x6d + lsl r0, r0, #2 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D22A8 + + thumb_func_start ov21_021D22C4 +ov21_021D22C4: ; 0x021D22C4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021D22D6 + bl sub_02022974 +_021D22D6: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D22C4 + + thumb_func_start ov21_021D22E0 +ov21_021D22E0: ; 0x021D22E0 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + mov r4, #0x6d + lsl r4, r4, #2 + add r0, r0, r4 + bl ov21_021D22F8 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D22E0 + + thumb_func_start ov21_021D22F8 +ov21_021D22F8: ; 0x021D22F8 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x28] + add r6, r1, #0 + add r4, r2, #0 + cmp r3, r0 + bne _021D231A + ldr r1, [sp, #0x10] + ldr r0, [r5, #0x2c] + cmp r1, r0 + bne _021D231A + ldr r0, [r5, #8] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_020129D0 + pop {r4, r5, r6, pc} +_021D231A: + ldr r0, [sp, #0x10] + str r3, [r5, #0x28] + str r0, [r5, #0x2c] + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D232A + bl ov21_021D4D1C +_021D232A: + cmp r4, #0 + beq _021D233A + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021D4CB8 + str r0, [r5, #8] + pop {r4, r5, r6, pc} +_021D233A: + add r0, r6, #0 + bl ov21_021D4CA0 + str r0, [r5, #8] + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D22F8 + + thumb_func_start ov21_021D2344 +ov21_021D2344: ; 0x021D2344 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #3 + ble _021D2352 + bl sub_02022974 +_021D2352: + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r1, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D2344 + + thumb_func_start ov21_021D2360 +ov21_021D2360: ; 0x021D2360 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x6d + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r4, r1, #0 + bl sub_02021FE0 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02021FE0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D2360 + + thumb_func_start ov21_021D238C +ov21_021D238C: ; 0x021D238C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x6d + add r4, r1, #0 + lsl r0, r0, #2 + lsl r1, r4, #0x18 + ldr r0, [r5, r0] + lsr r1, r1, #0x18 + bl sub_02021E80 + mov r0, #0x6e + lsl r0, r0, #2 + lsl r1, r4, #0x18 + ldr r0, [r5, r0] + lsr r1, r1, #0x18 + bl sub_02021E80 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r5, r0] + lsl r1, r4, #0x18 + ldr r0, [r0, #0] + lsr r1, r1, #0x18 + bl sub_02012A00 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D238C + + thumb_func_start ov21_021D23C0 +ov21_021D23C0: ; 0x021D23C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x6d + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r4, r1, #0 + cmp r0, #0 + beq _021D23D4 + bl sub_02021CAC +_021D23D4: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021D23E4 + add r1, r4, #0 + bl sub_02021CAC +_021D23E4: + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D23F6 + add r1, r4, #0 + bl sub_020129D0 +_021D23F6: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D23C0 + + thumb_func_start ov21_021D23F8 +ov21_021D23F8: ; 0x021D23F8 + push {r4, r5} + ldr r4, [sp, #0x18] + ldr r5, [sp, #0x14] + str r4, [r0, #0] + ldr r4, [sp, #0x10] + str r4, [r0, #4] + mov r4, #0x20 + orr r4, r5 + str r4, [r0, #8] + str r2, [r0, #0xc] + sub r2, r3, r2 + str r2, [r0, #0x10] + ldr r3, [sp, #8] + ldr r2, [sp, #0xc] + str r3, [r0, #0x14] + sub r2, r2, r3 + str r2, [r0, #0x18] + str r1, [r0, #0x1c] + mov r1, #0 + str r1, [r0, #0x20] + pop {r4, r5} + bx lr + thumb_func_end ov21_021D23F8 + + thumb_func_start ov21_021D2424 +ov21_021D2424: ; 0x021D2424 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + bl ov21_021D24EC + cmp r0, #0 + bne _021D2472 + add r0, r5, #0 + bl ov21_021D2484 + add r4, r0, #0 + add r0, r5, #0 + bl ov21_021D24B8 + ldr r1, [r5, #0] + cmp r1, #0 + bne _021D245A + mov r1, #0 + str r1, [sp] + str r0, [sp, #4] + ldr r0, _021D247C ; =0x04000050 + ldr r1, [r5, #4] + ldr r2, [r5, #8] + add r3, r4, #0 + bl sub_020BF5A0 + b _021D246C +_021D245A: + mov r1, #0 + str r1, [sp] + str r0, [sp, #4] + ldr r0, _021D2480 ; =0x04001050 + ldr r1, [r5, #4] + ldr r2, [r5, #8] + add r3, r4, #0 + bl sub_020BF5A0 +_021D246C: + ldr r0, [r5, #0x20] + add r0, r0, #1 + str r0, [r5, #0x20] +_021D2472: + add r0, r5, #0 + bl ov21_021D24EC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D247C: .word 0x04000050 +_021D2480: .word 0x04001050 + thumb_func_end ov21_021D2424 + + thumb_func_start ov21_021D2484 +ov21_021D2484: ; 0x021D2484 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + ldr r2, [r4, #0x20] + lsl r0, r0, #0xc + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r4, #0x1c] + lsl r1, r1, #0xc + bl sub_020BCFD0 + asr r1, r0, #0xc + ldr r0, [r4, #0x14] + add r0, r1, r0 + pop {r4, pc} + thumb_func_end ov21_021D2484 + + thumb_func_start ov21_021D24B8 +ov21_021D24B8: ; 0x021D24B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + ldr r2, [r4, #0x20] + lsl r0, r0, #0xc + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r4, #0x1c] + lsl r1, r1, #0xc + bl sub_020BCFD0 + asr r1, r0, #0xc + ldr r0, [r4, #0xc] + add r0, r1, r0 + pop {r4, pc} + thumb_func_end ov21_021D24B8 + + thumb_func_start ov21_021D24EC +ov21_021D24EC: ; 0x021D24EC + ldr r1, [r0, #0x20] + ldr r0, [r0, #0x1c] + cmp r1, r0 + ble _021D24F8 + mov r0, #1 + bx lr +_021D24F8: + mov r0, #0 + bx lr + thumb_func_end ov21_021D24EC + + thumb_func_start ov21_021D24FC +ov21_021D24FC: ; 0x021D24FC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + bl ov21_021D24B8 + neg r4, r0 + add r0, r5, #0 + bl ov21_021D2170 + mov r3, #0 + add r1, r4, #0 + add r2, r4, #0 + str r3, [sp] + bl sub_020086FC + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D24FC + + thumb_func_start ov21_021D251C +ov21_021D251C: ; 0x021D251C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r2, #0 + add r0, r1, #0 + bl ov21_021D24B8 + neg r6, r0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D2274 + mov r3, #0 + add r1, r6, #0 + add r2, r6, #0 + str r3, [sp] + bl sub_020086FC + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021D251C + + thumb_func_start ov21_021D2544 +ov21_021D2544: ; 0x021D2544 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021D4F94 + add r0, r5, #0 + add r1, sp, #8 + add r2, sp, #4 + bl ov21_021D4FBC + ldr r0, [sp, #4] + str r0, [sp] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov21_021D2574 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D2544 + + thumb_func_start ov21_021D2574 +ov21_021D2574: ; 0x021D2574 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + bl ov21_021D3124 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021D2574 + + thumb_func_start ov21_021D2584 +ov21_021D2584: ; 0x021D2584 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_021D258C: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021CAC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D258C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D2584 + + thumb_func_start ov21_021D25A0 +ov21_021D25A0: ; 0x021D25A0 + ldr r3, _021D25A8 ; =sub_02021D34 + ldr r0, [r0, #0] + bx r3 + nop +_021D25A8: .word sub_02021D34 + thumb_func_end ov21_021D25A0 + + thumb_func_start ov21_021D25AC +ov21_021D25AC: ; 0x021D25AC + str r1, [r0, #0x30] + cmp r1, #0 + bne _021D25B6 + mov r1, #0 + str r1, [r0, #0x34] +_021D25B6: + bx lr + thumb_func_end ov21_021D25AC + + thumb_func_start ov21_021D25B8 +ov21_021D25B8: ; 0x021D25B8 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021D4F94 + add r0, r5, #0 + add r1, sp, #8 + add r2, sp, #4 + bl ov21_021D4FBC + ldr r0, [sp, #4] + str r0, [sp] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov21_021D25E8 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D25B8 + + thumb_func_start ov21_021D25E8 +ov21_021D25E8: ; 0x021D25E8 + push {r3, r4, r5, r6, r7, lr} + add r7, r3, #0 + mov r3, #0x81 + add r4, r1, #0 + add r5, r0, #0 + lsl r3, r3, #2 + add r6, r2, #0 + str r4, [r5, r3] + add r0, r3, #4 + str r6, [r5, r0] + add r0, r3, #0 + add r0, #8 + str r7, [r5, r0] + add r0, r3, #0 + ldr r1, [sp, #0x18] + add r0, #0xc + str r1, [r5, r0] + add r0, r3, #0 + add r0, #0xc + ldr r0, [r5, r0] + add r2, r3, #4 + str r0, [sp] + add r0, r3, #0 + ldr r1, [r5, r3] + add r3, #8 + sub r0, #0x20 + ldr r2, [r5, r2] + ldr r3, [r5, r3] + add r0, r5, r0 + bl ov21_021D30D8 + mov r0, #0x26 + lsl r0, r0, #4 + str r4, [r5, r0] + add r1, r0, #4 + str r6, [r5, r1] + add r1, r0, #0 + add r1, #8 + str r7, [r5, r1] + add r1, r0, #0 + ldr r2, [sp, #0x18] + add r1, #0xc + str r2, [r5, r1] + mov r1, #0 + add r0, #0x10 + str r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D25E8 + + thumb_func_start ov21_021D2648 +ov21_021D2648: ; 0x021D2648 + str r1, [r0, #0] + str r3, [r0, #4] + str r1, [r0, #8] + str r3, [r0, #0xc] + sub r1, r2, r1 + str r1, [r0, #0x10] + ldr r1, [sp] + sub r1, r1, r3 + str r1, [r0, #0x14] + ldr r1, [sp, #4] + str r1, [r0, #0x1c] + mov r1, #0 + str r1, [r0, #0x18] + bx lr + thumb_func_end ov21_021D2648 + + thumb_func_start ov21_021D2664 +ov21_021D2664: ; 0x021D2664 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + ldr r2, [r5, #0x18] + lsl r0, r0, #0xc + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r5, #0x1c] + lsl r1, r1, #0xc + bl sub_020BCFD0 + add r4, r0, #0 + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x18] + lsl r0, r0, #0xc + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r5, #0x1c] + lsl r1, r1, #0xc + bl sub_020BCFD0 + ldr r1, [r5, #8] + asr r2, r4, #0xc + add r1, r2, r1 + str r1, [r5, #0] + asr r1, r0, #0xc + ldr r0, [r5, #0xc] + add r0, r1, r0 + str r0, [r5, #4] + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + add r0, r0, #1 + cmp r0, r1 + bgt _021D26DA + str r0, [r5, #0x18] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D26DA: + str r1, [r5, #0x18] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D2664 + + thumb_func_start ov21_021D26E0 +ov21_021D26E0: ; 0x021D26E0 + mov r1, #0x9f + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov21_021D26E0 + + thumb_func_start ov21_021D26E8 +ov21_021D26E8: ; 0x021D26E8 + push {r4, r5, r6, lr} + add r5, r2, #0 + mov r2, #0x9f + lsl r2, r2, #2 + add r6, r3, #0 + ldr r0, [r0, r2] + add r2, r6, #0 + bl sub_02006CB8 + add r4, r0, #0 + beq _021D2720 + cmp r5, #0 + beq _021D2720 + ldr r1, [r4, #0] + add r0, r6, #0 + lsr r1, r1, #8 + bl sub_02018144 + add r5, r0, #0 + beq _021D271E + add r0, r4, #0 + add r1, r5, #0 + bl sub_020C4F48 + add r0, r4, #0 + bl sub_020181C4 +_021D271E: + add r4, r5, #0 +_021D2720: + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D26E8 + + thumb_func_start ov21_021D2724 +ov21_021D2724: ; 0x021D2724 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r2, #0 + add r5, r3, #0 + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x2c] + ldr r4, [sp, #0x24] + bl ov21_021D26E8 + add r7, r0, #0 + beq _021D2766 + add r1, sp, #4 + bl sub_020A7164 + cmp r0, #0 + beq _021D2760 + cmp r4, #0 + bne _021D274C + ldr r0, [sp, #4] + ldr r4, [r0, #0x10] +_021D274C: + ldr r0, [sp, #0x20] + lsl r1, r5, #0x18 + str r0, [sp] + ldr r2, [sp, #4] + add r0, r6, #0 + ldr r2, [r2, #0x14] + lsr r1, r1, #0x18 + add r3, r4, #0 + bl sub_0201958C +_021D2760: + add r0, r7, #0 + bl sub_020181C4 +_021D2766: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D2724 + + thumb_func_start ov21_021D276C +ov21_021D276C: ; 0x021D276C + push {r3, r4, r5, r6, r7, lr} + add r6, r3, #0 + add r5, r2, #0 + ldr r3, [sp, #0x1c] + mov r2, #0 + ldr r4, [sp, #0x18] + bl ov21_021D26E8 + add r7, r0, #0 + beq _021D27B2 + add r1, sp, #0 + bl sub_020A71B0 + cmp r0, #0 + beq _021D27AC + cmp r4, #0 + bne _021D2792 + ldr r0, [sp] + ldr r4, [r0, #8] +_021D2792: + ldr r0, [sp] + add r1, r4, #0 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [sp] + add r2, r4, #0 + ldr r3, _021D27B4 ; =0x021E9CA4 + lsl r4, r5, #2 + ldr r0, [r0, #0xc] + ldr r3, [r3, r4] + add r1, r6, #0 + blx r3 +_021D27AC: + add r0, r7, #0 + bl sub_020181C4 +_021D27B2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D27B4: .word 0x021E9CA4 + thumb_func_end ov21_021D276C + + thumb_func_start ov21_021D27B8 +ov21_021D27B8: ; 0x021D27B8 + push {r3, r4, r5, lr} + add r5, r3, #0 + ldr r3, [sp, #0x10] + bl ov21_021D26E8 + add r4, r0, #0 + beq _021D27DA + add r1, r5, #0 + bl sub_020A7248 + cmp r0, #0 + bne _021D27DA + add r0, r4, #0 + bl sub_020181C4 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D27DA: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D27B8 + + thumb_func_start ov21_021D27E0 +ov21_021D27E0: ; 0x021D27E0 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #0 + bl ov21_021D26E8 + add r4, r0, #0 + beq _021D2802 + add r1, r5, #0 + bl sub_020A71B0 + cmp r0, #0 + bne _021D2802 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2802: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D27E0 + + thumb_func_start ov21_021D2808 +ov21_021D2808: ; 0x021D2808 + push {r3, r4, r5, lr} + add r5, r3, #0 + ldr r3, [sp, #0x10] + bl ov21_021D26E8 + add r4, r0, #0 + beq _021D282A + add r1, r5, #0 + bl sub_020A7164 + cmp r0, #0 + bne _021D282A + add r0, r4, #0 + bl sub_020181C4 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D282A: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D2808 + + thumb_func_start ov21_021D2830 +ov21_021D2830: ; 0x021D2830 + push {r4, r5, r6, lr} + sub sp, #0xa8 + ldr r6, _021D2984 ; =0x021E9C6C + add r3, sp, #0x8c + add r5, r0, #0 + add r4, r1, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #1 + bl sub_02019EBC + ldr r6, _021D2988 ; =0x021E9C50 + add r3, sp, #0x70 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #2 + bl sub_02019EBC + mov r0, #0 + mov r1, #2 + bl sub_02019060 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r6, _021D298C ; =0x021E9C34 + add r3, sp, #0x54 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #3 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #3 + bl sub_02019EBC + ldr r6, _021D2990 ; =0x021E9C18 + add r3, sp, #0x38 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #5 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #5 + bl sub_02019EBC + ldr r6, _021D2994 ; =0x021E9BFC + add r3, sp, #0x1c + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #6 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #6 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #6 + bl sub_02019EBC + ldr r6, _021D2998 ; =0x021E9C88 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #7 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #1 + bl sub_020183C4 + mov r0, #7 + mov r1, #0x40 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #7 + bl sub_02019EBC + add sp, #0xa8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D2984: .word 0x021E9C6C +_021D2988: .word 0x021E9C50 +_021D298C: .word 0x021E9C34 +_021D2990: .word 0x021E9C18 +_021D2994: .word 0x021E9BFC +_021D2998: .word 0x021E9C88 + thumb_func_end ov21_021D2830 + + thumb_func_start ov21_021D299C +ov21_021D299C: ; 0x021D299C + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #3 + bl sub_02019044 + add r0, r4, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #7 + bl sub_02019044 + add r0, r4, #0 + mov r1, #6 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov21_021D299C + + thumb_func_start ov21_021D29D0 +ov21_021D29D0: ; 0x021D29D0 + push {r3, r4, lr} + sub sp, #0x14 + mov r3, #0 + add r4, r0, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r2, #1 + bl sub_0201A7E8 + add r0, r4, #4 + mov r1, #0 + bl sub_0201ADA4 + add r0, r4, #4 + bl sub_0201A954 + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov21_021D29D0 + + thumb_func_start ov21_021D2A00 +ov21_021D2A00: ; 0x021D2A00 + ldr r3, _021D2A08 ; =sub_0201A8FC + add r0, r0, #4 + bx r3 + nop +_021D2A08: .word sub_0201A8FC + thumb_func_end ov21_021D2A00 + + thumb_func_start ov21_021D2A0C +ov21_021D2A0C: ; 0x021D2A0C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + add r5, r0, #0 + add r0, r7, #0 + bl sub_0200762C + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r3, _021D2AA0 ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _021D2AA4 ; =0x02100DF4 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + mov r1, #0 + mov r2, #1 + blx r3 + ldr r2, _021D2AA8 ; =0x7FFF0000 + add r6, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + and r2, r4 + lsl r1, r4, #0x10 + lsr r2, r2, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0xd + lsl r2, r2, #4 + bl sub_02008A78 + ldr r2, _021D2AAC ; =0xFFFF0000 + mov r0, #0x55 + lsl r0, r0, #2 + and r2, r6 + lsl r1, r6, #0x10 + lsr r2, r2, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0xd + lsl r2, r2, #3 + bl sub_02008A84 + mov r2, #0 + mov r0, #0x56 + add r3, r5, #0 + add r1, r2, #0 + lsl r0, r0, #2 +_021D2A74: + add r2, r2, #1 + str r1, [r3, r0] + add r3, r3, #4 + cmp r2, #4 + blt _021D2A74 + ldr r4, _021D2AB0 ; =0x021E9BEC + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + str r7, [sp, #0xc] + bl sub_02015064 + mov r1, #0x5a + lsl r1, r1, #2 + str r0, [r5, r1] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D2AA0: .word 0x02100DEC +_021D2AA4: .word 0x02100DF4 +_021D2AA8: .word 0x7FFF0000 +_021D2AAC: .word 0xFFFF0000 +_021D2AB0: .word 0x021E9BEC + thumb_func_end ov21_021D2A0C + + thumb_func_start ov21_021D2AB4 +ov21_021D2AB4: ; 0x021D2AB4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r6, #0x56 + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #2 +_021D2AC0: + ldr r0, [r5, r6] + cmp r0, #0 + beq _021D2ACA + bl sub_02007DC8 +_021D2ACA: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D2AC0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_02007B6C + mov r0, #0x5a + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_020150A8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D2AB4 + + thumb_func_start ov21_021D2AE8 +ov21_021D2AE8: ; 0x021D2AE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + mov r1, #0x6d + add r5, r0, #0 + lsl r1, r1, #2 + add r4, r5, r1 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021D2B84 ; =0x00000BB8 + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r6, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r5, r0] + add r1, r7, #0 + mov r2, #0x4e + bl sub_02009A4C + str r0, [r4, #0xc] + bl sub_0200A3DC + ldr r0, [r4, #0xc] + bl sub_02009D4C + ldr r0, _021D2B84 ; =0x00000BB8 + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x51 + str r6, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + str r0, [r4, #0x10] + bl sub_0200A640 + ldr r0, [r4, #0x10] + bl sub_02009D4C + ldr r0, _021D2B84 ; =0x00000BB8 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r6, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0x4c + mov r3, #1 + bl sub_02009BC4 + str r0, [r4, #0x14] + ldr r0, _021D2B84 ; =0x00000BB8 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r6, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0x4d + mov r3, #1 + bl sub_02009BC4 + str r0, [r4, #0x18] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2B84: .word 0x00000BB8 + thumb_func_end ov21_021D2AE8 + + thumb_func_start ov21_021D2B88 +ov21_021D2B88: ; 0x021D2B88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _021D2C0C ; =0x00000BB8 + add r7, r3, #0 + add r6, r2, #0 + add r4, r1, #0 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #0] + add r1, r7, #0 + mov r2, #0x4e + bl sub_02009A4C + str r0, [r5, #0xc] + bl sub_0200A3DC + ldr r0, [r5, #0xc] + bl sub_02009D4C + ldr r0, _021D2C0C ; =0x00000BB8 + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r6, [sp, #0xc] + ldr r0, [r4, #4] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x10] + bl sub_0200A640 + ldr r0, [r5, #0x10] + bl sub_02009D4C + ldr r0, _021D2C0C ; =0x00000BB8 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #8] + mov r2, #0x4c + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x14] + ldr r0, _021D2C0C ; =0x00000BB8 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #0xc] + mov r2, #0x4d + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x18] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2C0C: .word 0x00000BB8 + thumb_func_end ov21_021D2B88 + + thumb_func_start ov21_021D2C10 +ov21_021D2C10: ; 0x021D2C10 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x6d + lsl r0, r0, #2 + add r4, r5, r0 + ldr r0, [r4, #0xc] + bl sub_0200A4E4 + ldr r0, [r4, #0x10] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + ldr r1, [r4, #0xc] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0x10] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0x14] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0x18] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D2C10 + + thumb_func_start ov21_021D2C58 +ov21_021D2C58: ; 0x021D2C58 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + bl sub_0200A4E4 + ldr r0, [r5, #0x10] + bl sub_0200A6DC + ldr r0, [r4, #0] + ldr r1, [r5, #0xc] + bl sub_02009D68 + ldr r0, [r4, #4] + ldr r1, [r5, #0x10] + bl sub_02009D68 + ldr r0, [r4, #8] + ldr r1, [r5, #0x14] + bl sub_02009D68 + ldr r0, [r4, #0xc] + ldr r1, [r5, #0x18] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D2C58 + + thumb_func_start ov21_021D2C8C +ov21_021D2C8C: ; 0x021D2C8C + push {r3, r4, r5, lr} + sub sp, #0x70 + add r4, r1, #0 + ldr r1, _021D2D48 ; =0x00000BB8 + add r5, r0, #0 + mov r0, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r3, #5 + str r0, [sp, #0x10] + lsl r3, r3, #6 + ldr r2, [r5, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r5, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r5, r2] + add r3, #0xc + str r2, [sp, #0x1c] + ldr r2, [r5, r3] + add r3, r1, #0 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x4c + add r2, r1, #0 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #1 + str r0, [sp, #0x44] + add r0, sp, #0x2c + str r1, [sp, #0x40] + str r4, [sp, #0x48] + str r1, [sp, #0x34] + str r1, [sp, #0x38] + bl sub_02021B90 + mov r1, #0x6d + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x6d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021F58 + mov r0, #0 + str r0, [sp, #0x34] + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021D6C + mov r1, #0x6f + lsl r1, r1, #2 + mov r2, #0 + add r0, r1, #0 + str r2, [r5, r1] + add r0, #0x20 + str r2, [r5, r0] + add r1, #0x24 + str r2, [r5, r1] + add sp, #0x70 + pop {r3, r4, r5, pc} + nop +_021D2D48: .word 0x00000BB8 + thumb_func_end ov21_021D2C8C + + thumb_func_start ov21_021D2D4C +ov21_021D2D4C: ; 0x021D2D4C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021BD4 + mov r0, #0x6d + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02021BD4 + mov r0, #0x6e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D2D86 + bl ov21_021D4D1C + mov r0, #0x6f + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_021D2D86: + pop {r4, pc} + thumb_func_end ov21_021D2D4C + + thumb_func_start ov21_021D2D88 +ov21_021D2D88: ; 0x021D2D88 + push {r4, r5, r6, lr} + sub sp, #0x70 + add r4, r1, #0 + ldr r1, _021D2E18 ; =0x00000BB8 + add r5, r0, #0 + mov r0, #0 + add r6, r3, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + ldr r3, [sp, #0x80] + str r0, [sp, #0xc] + str r3, [sp, #0x10] + ldr r3, [r2, #0] + str r3, [sp, #0x14] + ldr r3, [r2, #4] + str r3, [sp, #0x18] + ldr r3, [r2, #8] + str r3, [sp, #0x1c] + ldr r2, [r2, #0xc] + add r3, r1, #0 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x4c + add r2, r1, #0 + bl sub_020093B4 + mov r1, #0 + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #1 + str r0, [sp, #0x44] + str r4, [sp, #0x2c] + str r1, [sp, #0x40] + str r6, [sp, #0x48] + str r1, [sp, #0x34] + str r1, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02021F58 + mov r0, #0 + str r0, [sp, #0x34] + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #4] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021D6C + mov r0, #0 + str r0, [r5, #8] + str r0, [r5, #0x28] + str r0, [r5, #0x2c] + add sp, #0x70 + pop {r4, r5, r6, pc} + nop +_021D2E18: .word 0x00000BB8 + thumb_func_end ov21_021D2D88 + + thumb_func_start ov21_021D2E1C +ov21_021D2E1C: ; 0x021D2E1C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #4] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D2E42 + bl ov21_021D4D1C + mov r0, #0 + str r0, [r4, #8] +_021D2E42: + pop {r4, pc} + thumb_func_end ov21_021D2E1C + + thumb_func_start ov21_021D2E44 +ov21_021D2E44: ; 0x021D2E44 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #0 + beq _021D2E54 + bl sub_02021CAC +_021D2E54: + ldr r0, [r5, #4] + cmp r0, #0 + beq _021D2E60 + add r1, r4, #0 + bl sub_02021CAC +_021D2E60: + ldr r0, [r5, #8] + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D2E6E + add r1, r4, #0 + bl sub_020129D0 +_021D2E6E: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D2E44 + + thumb_func_start ov21_021D2E70 +ov21_021D2E70: ; 0x021D2E70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + mov r1, #0x79 + add r5, r0, #0 + lsl r1, r1, #2 + add r4, r5, r1 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021D2F10 ; =0x00002EE0 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r6, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r2, #0x77 + mov r3, #1 + bl sub_02009A4C + str r0, [r4, #0x10] + bl sub_0200A3DC + ldr r0, [r4, #0x10] + bl sub_02009D4C + ldr r0, _021D2F10 ; =0x00002EE0 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x51 + str r6, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0x15 + mov r3, #0 + bl sub_02009B04 + str r0, [r4, #0x14] + bl sub_0200A640 + ldr r0, [r4, #0x14] + bl sub_02009D4C + ldr r0, _021D2F10 ; =0x00002EE0 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r6, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0x78 + mov r3, #1 + bl sub_02009BC4 + str r0, [r4, #0x18] + ldr r0, _021D2F10 ; =0x00002EE0 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r6, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0x76 + mov r3, #1 + bl sub_02009BC4 + str r0, [r4, #0x1c] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2F10: .word 0x00002EE0 + thumb_func_end ov21_021D2E70 + + thumb_func_start ov21_021D2F14 +ov21_021D2F14: ; 0x021D2F14 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x79 + lsl r0, r0, #2 + add r4, r5, r0 + ldr r0, [r4, #0x10] + bl sub_0200A4E4 + ldr r0, [r4, #0x14] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + ldr r1, [r4, #0x10] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0x14] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0x18] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0x1c] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D2F14 + + thumb_func_start ov21_021D2F5C +ov21_021D2F5C: ; 0x021D2F5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x70 + add r5, r1, #0 + ldr r1, _021D3008 ; =0x00002EE0 + add r6, r0, #0 + mov r0, #0 + mov r2, #0x79 + lsl r2, r2, #2 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + sub r2, #0xa4 + ldr r2, [r6, r2] + add r3, r1, #0 + str r2, [sp, #0x14] + mov r2, #0x79 + lsl r2, r2, #2 + sub r2, #0xa0 + ldr r2, [r6, r2] + str r2, [sp, #0x18] + mov r2, #0x79 + lsl r2, r2, #2 + sub r2, #0x9c + ldr r2, [r6, r2] + str r2, [sp, #0x1c] + mov r2, #0x79 + lsl r2, r2, #2 + sub r2, #0x98 + ldr r2, [r6, r2] + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x4c + add r2, r1, #0 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r4, #0 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #2 + str r0, [sp, #0x44] + mov r0, #0x49 + lsl r0, r0, #0xe + str r0, [sp, #0x38] + mov r0, #0x19 + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r0, #0x79 + lsl r0, r0, #2 + str r5, [sp, #0x48] + str r4, [sp, #0x40] + add r5, r6, r0 + add r7, sp, #0x2c +_021D2FD6: + add r0, r7, #0 + bl sub_02021B90 + add r1, r4, #0 + stmia r5!, {r0} + bl sub_02021D6C + add r4, r4, #1 + cmp r4, #4 + blt _021D2FD6 + mov r0, #0x79 + lsl r0, r0, #2 + add r0, r6, r0 + mov r1, #0 + bl ov21_021D2584 + add r0, r6, #0 + bl ov21_021D3034 + add r0, r6, #0 + bl ov21_021D31D0 + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D3008: .word 0x00002EE0 + thumb_func_end ov21_021D2F5C + + thumb_func_start ov21_021D300C +ov21_021D300C: ; 0x021D300C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov21_021D31F0 + add r0, r5, #0 + bl ov21_021D3054 + mov r0, #0x79 + lsl r0, r0, #2 + mov r4, #0 + add r5, r5, r0 +_021D3022: + ldr r0, [r5, #0] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D3022 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D300C + + thumb_func_start ov21_021D3034 +ov21_021D3034: ; 0x021D3034 + push {r4, lr} + mov r1, #0x79 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r0, _021D3050 ; =ov21_021D3064 + add r1, r4, r1 + mov r2, #1 + bl sub_0200D9E8 + mov r1, #0x9d + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r4, pc} + nop +_021D3050: .word ov21_021D3064 + thumb_func_end ov21_021D3034 + + thumb_func_start ov21_021D3054 +ov21_021D3054: ; 0x021D3054 + mov r1, #0x9d + lsl r1, r1, #2 + ldr r3, _021D3060 ; =sub_0200DA58 + ldr r0, [r0, r1] + bx r3 + nop +_021D3060: .word sub_0200DA58 + thumb_func_end ov21_021D3054 + + thumb_func_start ov21_021D3064 +ov21_021D3064: ; 0x021D3064 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _021D3080 + ldr r0, [r4, #0x2c] + str r0, [sp] + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + ldr r3, [r4, #0x28] + add r0, r4, #0 + bl ov21_021D30D8 + pop {r3, r4, r5, pc} +_021D3080: + ldr r0, [r4, #0x34] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1a + sub r1, r1, r2 + mov r0, #0x1a + ror r1, r0 + add r0, r2, r1 + str r0, [r4, #0x34] + cmp r0, #0x20 + blt _021D309C + add r1, r0, #1 + mov r0, #0x40 + sub r0, r0, r1 +_021D309C: + lsl r2, r0, #0xc + asr r1, r2, #0x1f + lsr r0, r2, #0x12 + lsl r3, r1, #0xe + mov r1, #2 + orr r3, r0 + lsl r2, r2, #0xe + mov r0, #0 + lsl r1, r1, #0xa + add r5, r2, r1 + adc r3, r0 + lsl r2, r3, #0x14 + lsr r0, r5, #0xc + orr r0, r2 + lsl r1, r1, #6 + bl sub_020BCFD0 + asr r3, r0, #0xc + ldr r0, [r4, #0x2c] + add r0, r0, r3 + str r0, [sp] + add r0, r4, #0 + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + ldr r4, [r4, #0x28] + add r3, r4, r3 + bl ov21_021D30D8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3064 + + thumb_func_start ov21_021D30D8 +ov21_021D30D8: ; 0x021D30D8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + ldr r6, [sp, #0x40] + add r5, r0, #0 + str r1, [sp, #0xc] + add r7, r2, #0 + str r3, [sp, #0x10] + mov r4, #0 +_021D30E8: + ldr r0, [sp, #0x10] + str r7, [sp] + str r0, [sp, #4] + ldr r3, [sp, #0xc] + str r6, [sp, #8] + add r0, r4, #0 + add r1, sp, #0x18 + add r2, sp, #0x14 + bl ov21_021D4FFC + ldr r0, [sp, #0x18] + lsl r0, r0, #0xc + str r0, [sp, #0x1c] + ldr r0, [sp, #0x14] + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x20] + ldr r0, [r5, #0] + add r1, sp, #0x1c + bl sub_02021C50 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D30E8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D30D8 + + thumb_func_start ov21_021D3124 +ov21_021D3124: ; 0x021D3124 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0x87 + lsl r1, r1, #2 + add r4, r0, r1 + ldr r1, [r4, #0x44] + add r5, r2, #0 + add r7, r3, #0 + cmp r1, r6 + bne _021D314E + ldr r1, [r4, #0x48] + cmp r1, r5 + bne _021D314E + ldr r1, [r4, #0x4c] + cmp r1, r7 + bne _021D314E + ldr r2, [r4, #0x50] + ldr r1, [sp, #0x20] + cmp r2, r1 + beq _021D318E +_021D314E: + mov r1, #0x79 + lsl r1, r1, #2 + add r3, r0, r1 + str r3, [r4, #0] + str r5, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r1, [r3, #0x20] + ldr r3, [r3, #0x24] + add r0, r4, #4 + add r2, r6, #0 + bl ov21_021D2648 + ldr r3, [r4, #0] + ldr r0, [sp, #0x20] + add r2, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + add r0, r4, #0 + ldr r1, [r3, #0x28] + ldr r3, [r3, #0x2c] + add r0, #0x24 + bl ov21_021D2648 + str r6, [r4, #0x44] + str r5, [r4, #0x48] + ldr r0, [sp, #0x20] + str r7, [r4, #0x4c] + str r0, [r4, #0x50] + mov r0, #1 + str r0, [r4, #0x54] +_021D318E: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3124 + + thumb_func_start ov21_021D3194 +ov21_021D3194: ; 0x021D3194 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x54] + cmp r0, #0 + beq _021D31CE + add r0, r5, #4 + bl ov21_021D2664 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x24 + bl ov21_021D2664 + ldr r1, [r5, #4] + ldr r0, [r5, #0] + cmp r4, #1 + str r1, [r0, #0x20] + ldr r1, [r5, #8] + ldr r0, [r5, #0] + str r1, [r0, #0x24] + ldr r1, [r5, #0x24] + ldr r0, [r5, #0] + str r1, [r0, #0x28] + ldr r1, [r5, #0x28] + ldr r0, [r5, #0] + str r1, [r0, #0x2c] + bne _021D31CE + mov r0, #0 + str r0, [r5, #0x54] +_021D31CE: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D3194 + + thumb_func_start ov21_021D31D0 +ov21_021D31D0: ; 0x021D31D0 + push {r4, lr} + mov r1, #0x87 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r0, _021D31EC ; =ov21_021D3194 + add r1, r4, r1 + mov r2, #0 + bl sub_0200D9E8 + mov r1, #0x9e + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r4, pc} + nop +_021D31EC: .word ov21_021D3194 + thumb_func_end ov21_021D31D0 + + thumb_func_start ov21_021D31F0 +ov21_021D31F0: ; 0x021D31F0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x9e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200DA58 + mov r0, #0x9e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} + thumb_func_end ov21_021D31F0 + + .rodata + + + .global Unk_ov21_021E9BEC +Unk_ov21_021E9BEC: ; 0x021E9BEC + .incbin "incbin/overlay21_rodata.bin", 0xC8, 0xD8 - 0xC8 + + .global Unk_ov21_021E9BFC +Unk_ov21_021E9BFC: ; 0x021E9BFC + .incbin "incbin/overlay21_rodata.bin", 0xD8, 0xF4 - 0xD8 + + .global Unk_ov21_021E9C18 +Unk_ov21_021E9C18: ; 0x021E9C18 + .incbin "incbin/overlay21_rodata.bin", 0xF4, 0x110 - 0xF4 + + .global Unk_ov21_021E9C34 +Unk_ov21_021E9C34: ; 0x021E9C34 + .incbin "incbin/overlay21_rodata.bin", 0x110, 0x12C - 0x110 + + .global Unk_ov21_021E9C50 +Unk_ov21_021E9C50: ; 0x021E9C50 + .incbin "incbin/overlay21_rodata.bin", 0x12C, 0x148 - 0x12C + + .global Unk_ov21_021E9C6C +Unk_ov21_021E9C6C: ; 0x021E9C6C + .incbin "incbin/overlay21_rodata.bin", 0x148, 0x164 - 0x148 + + .global Unk_ov21_021E9C88 +Unk_ov21_021E9C88: ; 0x021E9C88 + .incbin "incbin/overlay21_rodata.bin", 0x164, 0x180 - 0x164 + + .global Unk_ov21_021E9CA4 +Unk_ov21_021E9CA4: ; 0x021E9CA4 + .incbin "incbin/overlay21_rodata.bin", 0x180, 0x20 + diff --git a/asm/ov21_021D3208.s b/asm/ov21_021D3208.s new file mode 100644 index 000000000..09960888a --- /dev/null +++ b/asm/ov21_021D3208.s @@ -0,0 +1,1974 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D3208 +ov21_021D3208: ; 0x021D3208 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r2, #0 + add r4, r1, #0 + ldr r2, _021D32FC ; =0x00001770 + mov r1, #0 + add r5, r0, #0 + bl sub_020D5124 + ldr r0, [r4, #0] + str r0, [r5, #0] + ldr r1, [r4, #8] + ldr r0, _021D3300 ; =0x00001744 + str r1, [r5, r0] + ldr r0, [r5, #0] + bl sub_02027474 + cmp r0, #0 + beq _021D3232 + mov r1, #1 + b _021D3234 +_021D3232: + mov r1, #0 +_021D3234: + ldr r0, _021D3304 ; =0x00001734 + str r1, [r5, r0] + ldr r0, [r4, #0x20] + cmp r0, #2 + bne _021D324C + ldr r0, _021D3304 ; =0x00001734 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021D324A + mov r0, #1 + b _021D324C +_021D324A: + mov r0, #0 +_021D324C: + cmp r0, #1 + ldr r0, _021D3308 ; =0x00001730 + bne _021D325A + mov r1, #1 + str r1, [r5, r0] + mov r1, #0 + b _021D325E +_021D325A: + mov r1, #0 + str r1, [r5, r0] +_021D325E: + str r1, [sp] + ldr r0, _021D3308 ; =0x00001730 + str r1, [sp, #4] + ldr r0, [r5, r0] + add r2, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r3, r1, #0 + str r6, [sp, #0xc] + bl ov21_021D3684 + cmp r0, #0 + bne _021D327C + bl sub_02022974 +_021D327C: + ldr r1, [r4, #0x1c] + add r0, r5, #0 + bl ov21_021D3794 + ldr r1, [r4, #0x1c] + add r0, r5, #0 + bl ov21_021D3434 + ldr r1, [r4, #0x20] + add r0, r5, #0 + bl ov21_021D344C + ldr r0, [r4, #4] + bl sub_02025FCC + ldr r1, _021D330C ; =0x0000174C + str r0, [r5, r1] + ldr r0, [r4, #4] + bl sub_02025F30 + ldr r1, _021D3310 ; =0x00001750 + str r0, [r5, r1] + ldr r0, [r4, #4] + add r1, r6, #0 + bl sub_02025F04 + ldr r1, _021D3314 ; =0x00001754 + str r0, [r5, r1] + add r0, r6, #0 + bl sub_02098700 + ldr r1, _021D3318 ; =0x00001748 + str r0, [r5, r1] + add r0, r1, #0 + add r0, #8 + ldr r0, [r5, r0] + cmp r0, #0 + ldr r0, [r5, r1] + bne _021D32D4 + mov r1, #0 + add r2, r6, #0 + bl sub_0209872C + b _021D32DC +_021D32D4: + mov r1, #1 + add r2, r6, #0 + bl sub_0209872C +_021D32DC: + ldr r0, [r4, #0xc] + ldr r1, _021D331C ; =0x00001760 + str r0, [r5, r1] + ldr r2, [r4, #0x10] + add r0, r1, #4 + str r2, [r5, r0] + add r0, r1, #0 + ldr r2, [r4, #0x14] + add r0, #8 + str r2, [r5, r0] + ldr r0, [r4, #0x18] + add r1, #0xc + str r0, [r5, r1] + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D32FC: .word 0x00001770 +_021D3300: .word 0x00001744 +_021D3304: .word 0x00001734 +_021D3308: .word 0x00001730 +_021D330C: .word 0x0000174C +_021D3310: .word 0x00001750 +_021D3314: .word 0x00001754 +_021D3318: .word 0x00001748 +_021D331C: .word 0x00001760 + thumb_func_end ov21_021D3208 + + thumb_func_start ov21_021D3320 +ov21_021D3320: ; 0x021D3320 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D3344 ; =0x00001754 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _021D3348 ; =0x00001748 + ldr r0, [r4, r0] + bl sub_020987BC + ldr r0, _021D3348 ; =0x00001748 + ldr r0, [r4, r0] + bl sub_02098718 + ldr r0, _021D3348 ; =0x00001748 + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D3344: .word 0x00001754 +_021D3348: .word 0x00001748 + thumb_func_end ov21_021D3320 + + thumb_func_start ov21_021D334C +ov21_021D334C: ; 0x021D334C + ldr r3, _021D3358 ; =sub_02027058 + lsl r1, r1, #0x10 + ldr r0, [r0, #0] + lsr r1, r1, #0x10 + bx r3 + nop +_021D3358: .word sub_02027058 + thumb_func_end ov21_021D334C + + thumb_func_start ov21_021D335C +ov21_021D335C: ; 0x021D335C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0x1c + blt _021D336A + bl sub_02022974 +_021D336A: + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_020270AC + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D335C + + thumb_func_start ov21_021D3374 +ov21_021D3374: ; 0x021D3374 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #2 + blt _021D3382 + bl sub_02022974 +_021D3382: + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_020270F8 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D3374 + + thumb_func_start ov21_021D338C +ov21_021D338C: ; 0x021D338C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #2 + blt _021D339A + bl sub_02022974 +_021D339A: + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_02027154 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D338C + + thumb_func_start ov21_021D33A4 +ov21_021D33A4: ; 0x021D33A4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #3 + blt _021D33B2 + bl sub_02022974 +_021D33B2: + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_020271B0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D33A4 + + thumb_func_start ov21_021D33BC +ov21_021D33BC: ; 0x021D33BC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #3 + blt _021D33CA + bl sub_02022974 +_021D33CA: + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_02027208 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D33BC + + thumb_func_start ov21_021D33D4 +ov21_021D33D4: ; 0x021D33D4 + ldr r3, _021D33DC ; =sub_0202756C + ldr r0, [r0, #0] + mov r2, #0 + bx r3 + ; .align 2, 0 +_021D33DC: .word sub_0202756C + thumb_func_end ov21_021D33D4 + + thumb_func_start ov21_021D33E0 +ov21_021D33E0: ; 0x021D33E0 + push {r3, lr} + mov r2, #1 + bl ov21_021D334C + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021D33F4 + mov r0, #1 + pop {r3, pc} +_021D33F4: + mov r0, #2 + pop {r3, pc} + thumb_func_end ov21_021D33E0 + + thumb_func_start ov21_021D33F8 +ov21_021D33F8: ; 0x021D33F8 + ldr r3, _021D3400 ; =sub_0202702C + ldr r0, [r0, #0] + mov r1, #0 + bx r3 + ; .align 2, 0 +_021D3400: .word sub_0202702C + thumb_func_end ov21_021D33F8 + + thumb_func_start ov21_021D3404 +ov21_021D3404: ; 0x021D3404 + ldr r3, _021D340C ; =sub_02027264 + ldr r0, [r0, #0] + bx r3 + nop +_021D340C: .word sub_02027264 + thumb_func_end ov21_021D3404 + + thumb_func_start ov21_021D3410 +ov21_021D3410: ; 0x021D3410 + ldr r3, _021D3418 ; =sub_0202756C + ldr r0, [r0, #0] + bx r3 + nop +_021D3418: .word sub_0202756C + thumb_func_end ov21_021D3410 + + thumb_func_start ov21_021D341C +ov21_021D341C: ; 0x021D341C + ldr r3, _021D3424 ; =sub_020276C8 + ldr r0, [r0, #0] + bx r3 + nop +_021D3424: .word sub_020276C8 + thumb_func_end ov21_021D341C + + thumb_func_start ov21_021D3428 +ov21_021D3428: ; 0x021D3428 + ldr r3, _021D3430 ; =sub_02027474 + ldr r0, [r0, #0] + bx r3 + nop +_021D3430: .word sub_02027474 + thumb_func_end ov21_021D3428 + + thumb_func_start ov21_021D3434 +ov21_021D3434: ; 0x021D3434 + ldr r2, _021D343C ; =0x0000175C + strh r1, [r0, r2] + bx lr + nop +_021D343C: .word 0x0000175C + thumb_func_end ov21_021D3434 + + thumb_func_start ov21_021D3440 +ov21_021D3440: ; 0x021D3440 + ldr r1, _021D3448 ; =0x0000175C + ldrh r0, [r0, r1] + bx lr + nop +_021D3448: .word 0x0000175C + thumb_func_end ov21_021D3440 + + thumb_func_start ov21_021D344C +ov21_021D344C: ; 0x021D344C + ldr r2, _021D3454 ; =0x0000175E + strh r1, [r0, r2] + bx lr + nop +_021D3454: .word 0x0000175E + thumb_func_end ov21_021D344C + + thumb_func_start ov21_021D3458 +ov21_021D3458: ; 0x021D3458 + ldr r1, _021D3460 ; =0x0000175E + ldrh r0, [r0, r1] + bx lr + nop +_021D3460: .word 0x0000175E + thumb_func_end ov21_021D3458 + + thumb_func_start ov21_021D3464 +ov21_021D3464: ; 0x021D3464 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + ldr r7, [sp, #0x4c] + str r1, [sp, #0xc] + add r5, r0, #0 + ldr r1, _021D367C ; =0x000003DA + add r0, r7, #0 + str r2, [sp, #0x10] + str r3, [sp, #0x14] + bl sub_02018184 + add r6, r0, #0 + bne _021D3482 + bl sub_02022974 +_021D3482: + ldr r2, _021D367C ; =0x000003DA + add r0, r6, #0 + mov r1, #0 + bl sub_020D5124 + mov r0, #0 + str r0, [sp, #0x24] + ldr r1, _021D367C ; =0x000003DA + add r0, r7, #0 + bl sub_02018184 + add r4, r0, #0 + bne _021D34A0 + bl sub_02022974 +_021D34A0: + ldr r2, _021D367C ; =0x000003DA + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + mov r1, #0 + ldr r0, [sp, #0x48] + str r1, [sp, #0x20] + cmp r0, #0 + add r2, sp, #0x1c + bne _021D34D2 + add r0, r7, #0 + mov r1, #1 + bl ov21_021D3B64 + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x18] + str r0, [sp] + ldr r2, [r5, #0] + add r0, r6, #0 + add r1, sp, #0x24 + bl ov21_021D39A4 + b _021D34EA +_021D34D2: + add r0, r7, #0 + bl ov21_021D3B64 + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x18] + str r0, [sp] + ldr r2, [r5, #0] + add r0, r6, #0 + add r1, sp, #0x24 + bl ov21_021D39A4 +_021D34EA: + ldr r0, [sp, #0x24] + add r1, r4, #0 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [r5, #0] + add r2, sp, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r3, r6, #0 + bl ov21_021D3B98 + ldr r2, [sp, #0x20] + add r0, r6, #0 + add r1, r4, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r2, [sp, #0x20] + add r0, r4, #0 + str r2, [sp, #0x24] + mov r1, #0 + lsl r2, r2, #1 + bl sub_020D5124 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r1, r4, #0 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [r5, #0] + add r2, sp, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r3, r6, #0 + bl ov21_021D3C48 + ldr r2, [sp, #0x20] + cmp r2, #0 + bne _021D353E + mov r7, #0 + b _021D3656 +_021D353E: + add r0, r6, #0 + add r1, r4, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r2, [sp, #0x20] + add r0, r4, #0 + str r2, [sp, #0x24] + mov r1, #0 + lsl r2, r2, #1 + bl sub_020D5124 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r1, r4, #0 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [r5, #0] + add r2, sp, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #0x14] + add r3, r6, #0 + bl ov21_021D3D2C + ldr r2, [sp, #0x20] + cmp r2, #0 + bne _021D357A + mov r7, #0 + b _021D3656 +_021D357A: + add r0, r6, #0 + add r1, r4, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r2, [sp, #0x20] + add r0, r4, #0 + str r2, [sp, #0x24] + mov r1, #0 + lsl r2, r2, #1 + bl sub_020D5124 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r1, r4, #0 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [r5, #0] + add r2, sp, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #0x40] + add r3, r6, #0 + bl ov21_021D3D2C + ldr r2, [sp, #0x20] + cmp r2, #0 + bne _021D35B6 + mov r7, #0 + b _021D3656 +_021D35B6: + add r0, r6, #0 + add r1, r4, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r2, [sp, #0x20] + add r0, r4, #0 + str r2, [sp, #0x24] + mov r1, #0 + lsl r2, r2, #1 + bl sub_020D5124 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r1, r4, #0 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [r5, #0] + add r2, sp, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #0x44] + add r3, r6, #0 + bl ov21_021D3E80 + ldr r2, [sp, #0x20] + cmp r2, #0 + bne _021D35F2 + mov r7, #0 + b _021D3656 +_021D35F2: + add r0, r6, #0 + add r1, r4, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r2, [sp, #0x20] + add r0, r4, #0 + str r2, [sp, #0x24] + mov r1, #0 + lsl r2, r2, #1 + bl sub_020D5124 + mov r0, #0 + str r0, [sp, #0x20] + ldr r1, [r5, #0] + ldr r3, [sp, #0x24] + add r0, r5, #4 + add r2, r6, #0 + bl ov21_021D3A60 + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _021D3638 + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _021D3638 + ldr r0, [sp, #0x14] + cmp r0, #0 + bne _021D3638 + ldr r0, [sp, #0x40] + cmp r0, #0 + bne _021D3638 + ldr r0, [sp, #0x44] + cmp r0, #0 + beq _021D363C +_021D3638: + mov r0, #1 + str r0, [sp, #0x50] +_021D363C: + ldr r0, [sp, #0x50] + cmp r0, #0 + bne _021D364E + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r0, r5, #4 + bl ov21_021D3AB8 + b _021D3654 +_021D364E: + add r0, r5, #4 + bl ov21_021D3B28 +_021D3654: + mov r7, #1 +_021D3656: + ldr r2, _021D3680 ; =0x00001738 + add r0, r5, #4 + add r1, r5, r2 + add r2, r2, #4 + add r2, r5, r2 + bl ov21_021D3FA8 + add r0, r6, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [sp, #0x18] + bl sub_020181C4 + add r0, r7, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D367C: .word 0x000003DA +_021D3680: .word 0x00001738 + thumb_func_end ov21_021D3464 + + thumb_func_start ov21_021D3684 +ov21_021D3684: ; 0x021D3684 + push {r3, r4, lr} + sub sp, #0x14 + ldr r4, [sp, #0x20] + str r4, [sp] + ldr r4, [sp, #0x24] + str r4, [sp, #4] + ldr r4, [sp, #0x28] + str r4, [sp, #8] + ldr r4, [sp, #0x2c] + str r4, [sp, #0xc] + mov r4, #0 + str r4, [sp, #0x10] + bl ov21_021D3464 + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov21_021D3684 + + thumb_func_start ov21_021D36A4 +ov21_021D36A4: ; 0x021D36A4 + cmp r1, #0 + bne _021D36AC + mov r0, #1 + bx lr +_021D36AC: + ldr r1, _021D36BC ; =0x00001734 + ldr r0, [r0, r1] + cmp r0, #0 + beq _021D36B8 + mov r0, #1 + bx lr +_021D36B8: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D36BC: .word 0x00001734 + thumb_func_end ov21_021D36A4 + + thumb_func_start ov21_021D36C0 +ov21_021D36C0: ; 0x021D36C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D36A4 + cmp r0, #0 + beq _021D36D2 + ldr r1, _021D36D4 ; =0x00001730 + str r4, [r5, r1] +_021D36D2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D36D4: .word 0x00001730 + thumb_func_end ov21_021D36C0 + + thumb_func_start ov21_021D36D8 +ov21_021D36D8: ; 0x021D36D8 + ldr r1, _021D36E0 ; =0x00001730 + ldr r0, [r0, r1] + bx lr + nop +_021D36E0: .word 0x00001730 + thumb_func_end ov21_021D36D8 + + thumb_func_start ov21_021D36E4 +ov21_021D36E4: ; 0x021D36E4 + cmp r1, #0 + blt _021D36F6 + mov r2, #0xf7 + lsl r2, r2, #4 + ldr r0, [r0, r2] + cmp r1, r0 + bge _021D36F6 + mov r0, #1 + bx lr +_021D36F6: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D36E4 + + thumb_func_start ov21_021D36FC +ov21_021D36FC: ; 0x021D36FC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D36E4 + cmp r0, #0 + beq _021D3712 + ldr r0, _021D3718 ; =0x00000F6C + str r4, [r5, r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D3712: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D3718: .word 0x00000F6C + thumb_func_end ov21_021D36FC + + thumb_func_start ov21_021D371C +ov21_021D371C: ; 0x021D371C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, _021D3758 ; =0x00000F6C + add r5, r0, #0 + ldr r1, [r5, r1] + add r1, r1, r4 + bl ov21_021D36E4 + cmp r0, #0 + beq _021D373C + ldr r0, _021D3758 ; =0x00000F6C + ldr r1, [r5, r0] + add r1, r1, r4 + str r1, [r5, r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D373C: + cmp r4, #0 + blt _021D374C + mov r0, #0xf7 + lsl r0, r0, #4 + ldr r1, [r5, r0] + sub r0, r0, #4 + sub r1, r1, #1 + b _021D3750 +_021D374C: + ldr r0, _021D3758 ; =0x00000F6C + mov r1, #0 +_021D3750: + str r1, [r5, r0] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D3758: .word 0x00000F6C + thumb_func_end ov21_021D371C + + thumb_func_start ov21_021D375C +ov21_021D375C: ; 0x021D375C + ldr r1, _021D3764 ; =0x00000F6C + ldr r0, [r0, r1] + bx lr + nop +_021D3764: .word 0x00000F6C + thumb_func_end ov21_021D375C + + thumb_func_start ov21_021D3768 +ov21_021D3768: ; 0x021D3768 + mov r1, #0xf7 + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov21_021D3768 + + thumb_func_start ov21_021D3770 +ov21_021D3770: ; 0x021D3770 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D3768 + mov r2, #0 + cmp r0, #0 + ble _021D378E +_021D3780: + ldr r1, [r5, #4] + cmp r1, r4 + beq _021D378E + add r2, r2, #1 + add r5, #8 + cmp r2, r0 + blt _021D3780 +_021D378E: + add r0, r2, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3770 + + thumb_func_start ov21_021D3794 +ov21_021D3794: ; 0x021D3794 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021D3768 + add r4, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021D3770 + add r1, r0, #0 + cmp r4, r1 + bls _021D37B6 + add r0, r5, #0 + bl ov21_021D36FC + pop {r4, r5, r6, pc} +_021D37B6: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3794 + + thumb_func_start ov21_021D37BC +ov21_021D37BC: ; 0x021D37BC + ldr r1, _021D37C8 ; =0x00000F6C + ldr r1, [r0, r1] + lsl r1, r1, #3 + add r0, r0, r1 + ldr r0, [r0, #4] + bx lr + ; .align 2, 0 +_021D37C8: .word 0x00000F6C + thumb_func_end ov21_021D37BC + + thumb_func_start ov21_021D37CC +ov21_021D37CC: ; 0x021D37CC + ldr r1, _021D37D8 ; =0x00000F6C + ldr r1, [r0, r1] + lsl r1, r1, #3 + add r0, r0, r1 + ldr r0, [r0, #8] + bx lr + ; .align 2, 0 +_021D37D8: .word 0x00000F6C + thumb_func_end ov21_021D37CC + + thumb_func_start ov21_021D37DC +ov21_021D37DC: ; 0x021D37DC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D36E4 + cmp r0, #0 + beq _021D37F2 + add r1, r5, #4 + lsl r0, r4, #3 + add r0, r1, r0 + pop {r3, r4, r5, pc} +_021D37F2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D37DC + + thumb_func_start ov21_021D37F8 +ov21_021D37F8: ; 0x021D37F8 + ldr r2, _021D380C ; =0x0000172C + ldr r0, [r0, r2] + cmp r0, r1 + ble _021D3808 + cmp r1, #0 + blt _021D3808 + mov r0, #1 + bx lr +_021D3808: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D380C: .word 0x0000172C + thumb_func_end ov21_021D37F8 + + thumb_func_start ov21_021D3810 +ov21_021D3810: ; 0x021D3810 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D37F8 + cmp r0, #0 + beq _021D3836 + ldr r1, _021D383C ; =0x00001728 + add r0, r5, #0 + str r4, [r5, r1] + ldr r1, [r5, r1] + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _021D3840 ; =0x00000F74 + ldr r1, [r2, r1] + bl ov21_021D36FC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D3836: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D383C: .word 0x00001728 +_021D3840: .word 0x00000F74 + thumb_func_end ov21_021D3810 + + thumb_func_start ov21_021D3844 +ov21_021D3844: ; 0x021D3844 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D387C + cmp r0, #0 + beq _021D386E + ldr r1, _021D3874 ; =0x00001728 + ldr r0, [r5, r1] + add r0, r0, r4 + str r0, [r5, r1] + ldr r1, [r5, r1] + add r0, r5, #0 + lsl r1, r1, #2 + add r2, r5, r1 + ldr r1, _021D3878 ; =0x00000F74 + ldr r1, [r2, r1] + bl ov21_021D36FC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D386E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D3874: .word 0x00001728 +_021D3878: .word 0x00000F74 + thumb_func_end ov21_021D3844 + + thumb_func_start ov21_021D387C +ov21_021D387C: ; 0x021D387C + push {r3, lr} + ldr r2, _021D3894 ; =0x00001728 + ldr r2, [r0, r2] + add r1, r2, r1 + bl ov21_021D37F8 + cmp r0, #0 + beq _021D3890 + mov r0, #1 + pop {r3, pc} +_021D3890: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021D3894: .word 0x00001728 + thumb_func_end ov21_021D387C + + thumb_func_start ov21_021D3898 +ov21_021D3898: ; 0x021D3898 + ldr r1, _021D38A0 ; =0x00001728 + ldr r0, [r0, r1] + bx lr + nop +_021D38A0: .word 0x00001728 + thumb_func_end ov21_021D3898 + + thumb_func_start ov21_021D38A4 +ov21_021D38A4: ; 0x021D38A4 + ldr r1, _021D38AC ; =0x0000172C + ldr r0, [r0, r1] + bx lr + nop +_021D38AC: .word 0x0000172C + thumb_func_end ov21_021D38A4 + + thumb_func_start ov21_021D38B0 +ov21_021D38B0: ; 0x021D38B0 + lsl r1, r1, #2 + add r1, r0, r1 + ldr r0, _021D38BC ; =0x00000F74 + ldr r0, [r1, r0] + bx lr + nop +_021D38BC: .word 0x00000F74 + thumb_func_end ov21_021D38B0 + + thumb_func_start ov21_021D38C0 +ov21_021D38C0: ; 0x021D38C0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021D38F8 ; =0x0000172C + mov r6, #0 + ldr r0, [r5, r0] + cmp r0, #0 + ble _021D38F6 + ldr r7, _021D38F8 ; =0x0000172C +_021D38D0: + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021D38B0 + add r4, r0, #0 + add r0, r5, #0 + bl ov21_021D375C + cmp r4, r0 + bne _021D38EE + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021D3810 + pop {r3, r4, r5, r6, r7, pc} +_021D38EE: + ldr r0, [r5, r7] + add r6, r6, #1 + cmp r6, r0 + blt _021D38D0 +_021D38F6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D38F8: .word 0x0000172C + thumb_func_end ov21_021D38C0 + + thumb_func_start ov21_021D38FC +ov21_021D38FC: ; 0x021D38FC + ldr r1, _021D3904 ; =0x00001738 + ldr r0, [r0, r1] + bx lr + nop +_021D3904: .word 0x00001738 + thumb_func_end ov21_021D38FC + + thumb_func_start ov21_021D3908 +ov21_021D3908: ; 0x021D3908 + ldr r1, _021D3910 ; =0x0000173C + ldr r0, [r0, r1] + bx lr + nop +_021D3910: .word 0x0000173C + thumb_func_end ov21_021D3908 + + thumb_func_start ov21_021D3914 +ov21_021D3914: ; 0x021D3914 + ldr r1, _021D391C ; =0x00001754 + ldr r0, [r0, r1] + bx lr + nop +_021D391C: .word 0x00001754 + thumb_func_end ov21_021D3914 + + thumb_func_start ov21_021D3920 +ov21_021D3920: ; 0x021D3920 + ldr r1, _021D3928 ; =0x00001750 + ldr r0, [r0, r1] + bx lr + nop +_021D3928: .word 0x00001750 + thumb_func_end ov21_021D3920 + + thumb_func_start ov21_021D392C +ov21_021D392C: ; 0x021D392C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021D37BC + add r4, r0, #0 + ldr r0, [r5, #0] + bl sub_02027514 + cmp r0, #0 + bne _021D3946 + mov r0, #0 + pop {r4, r5, r6, pc} +_021D3946: + lsl r1, r4, #0x10 + ldr r0, [r5, #0] + lsr r1, r1, #0x10 + add r2, r6, #0 + bl sub_020274D0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D392C + + thumb_func_start ov21_021D3954 +ov21_021D3954: ; 0x021D3954 + ldr r3, _021D395C ; =sub_02027494 + ldr r0, [r0, #0] + bx r3 + nop +_021D395C: .word sub_02027494 + thumb_func_end ov21_021D3954 + + thumb_func_start ov21_021D3960 +ov21_021D3960: ; 0x021D3960 + ldr r1, _021D398C ; =0x021BF6BC + ldrh r1, [r1, #0x22] + cmp r1, #0 + beq _021D3970 + ldr r1, _021D3990 ; =0x00001758 + mov r2, #0 + str r2, [r0, r1] + bx lr +_021D3970: + ldr r1, _021D3994 ; =0x021BF67C + ldr r1, [r1, #0x48] + cmp r1, #0 + beq _021D398A + ldr r1, _021D3990 ; =0x00001758 + ldr r2, [r0, r1] + cmp r2, #0 + bne _021D3986 + mov r2, #1 + str r2, [r0, r1] + bx lr +_021D3986: + mov r2, #2 + str r2, [r0, r1] +_021D398A: + bx lr + ; .align 2, 0 +_021D398C: .word 0x021BF6BC +_021D3990: .word 0x00001758 +_021D3994: .word 0x021BF67C + thumb_func_end ov21_021D3960 + + thumb_func_start ov21_021D3998 +ov21_021D3998: ; 0x021D3998 + ldr r1, _021D39A0 ; =0x00001758 + ldr r0, [r0, r1] + bx lr + nop +_021D39A0: .word 0x00001758 + thumb_func_end ov21_021D3998 + + thumb_func_start ov21_021D39A4 +ov21_021D39A4: ; 0x021D39A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r7, [sp, #0x20] + add r5, r1, #0 + mov r6, #0 + add r4, r3, #0 + str r0, [sp] + str r2, [sp, #4] + str r6, [r5, #0] + cmp r7, #0 + ble _021D39DE +_021D39BA: + ldrh r1, [r4] + ldr r0, [sp, #4] + bl sub_02026FE8 + cmp r0, #0 + beq _021D39D6 + ldr r1, [r5, #0] + ldrh r0, [r4] + lsl r2, r1, #1 + ldr r1, [sp] + strh r0, [r1, r2] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] +_021D39D6: + add r6, r6, #1 + add r4, r4, #2 + cmp r6, r7 + blt _021D39BA +_021D39DE: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D39A4 + + thumb_func_start ov21_021D39E4 +ov21_021D39E4: ; 0x021D39E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + ldr r0, [sp, #0x28] + str r1, [sp, #4] + str r0, [sp, #0x28] + ldr r0, [sp, #0x30] + mov r1, #0 + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + add r6, r2, #0 + str r0, [sp, #0x34] + ldr r0, [sp, #4] + str r3, [sp, #8] + str r1, [r0, #0] + add r0, r3, #0 + ldr r7, [sp, #0x2c] + str r1, [sp, #0xc] + cmp r0, #0 + ble _021D3A5C +_021D3A0C: + mov r4, #0 + cmp r7, #0 + ble _021D3A34 + ldr r5, [sp, #0x28] +_021D3A14: + ldrh r1, [r6] + ldrh r0, [r5] + cmp r1, r0 + bne _021D3A2C + ldr r0, [sp, #0x30] + cmp r0, #1 + beq _021D3A34 + ldr r0, [sp, #0x34] + bl sub_02026F9C + cmp r0, #0 + bne _021D3A34 +_021D3A2C: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, r7 + blt _021D3A14 +_021D3A34: + cmp r4, r7 + bge _021D3A4E + ldr r0, [sp, #4] + ldrh r2, [r6] + ldr r0, [r0, #0] + lsl r1, r0, #1 + ldr r0, [sp] + strh r2, [r0, r1] + ldr r0, [sp, #4] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [r0, #0] +_021D3A4E: + ldr r0, [sp, #0xc] + add r6, r6, #2 + add r1, r0, #1 + ldr r0, [sp, #8] + str r1, [sp, #0xc] + cmp r1, r0 + blt _021D3A0C +_021D3A5C: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D39E4 + + thumb_func_start ov21_021D3A60 +ov21_021D3A60: ; 0x021D3A60 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021D3AB4 ; =0x00000F6C + mov r6, #0 + add r7, r3, #0 + add r4, r2, #0 + str r1, [sp] + str r6, [r5, r0] + cmp r7, #0 + ble _021D3AB2 +_021D3A74: + ldrh r1, [r4] + ldr r0, [sp] + bl sub_02026F9C + cmp r0, #0 + ldr r0, _021D3AB4 ; =0x00000F6C + beq _021D3A8C + ldr r0, [r5, r0] + lsl r0, r0, #3 + add r1, r5, r0 + mov r0, #2 + b _021D3A94 +_021D3A8C: + ldr r0, [r5, r0] + lsl r0, r0, #3 + add r1, r5, r0 + mov r0, #1 +_021D3A94: + str r0, [r1, #4] + ldr r1, _021D3AB4 ; =0x00000F6C + ldrh r0, [r4] + ldr r1, [r5, r1] + add r6, r6, #1 + lsl r1, r1, #3 + str r0, [r5, r1] + ldr r0, _021D3AB4 ; =0x00000F6C + add r4, r4, #2 + ldr r0, [r5, r0] + add r1, r0, #1 + ldr r0, _021D3AB4 ; =0x00000F6C + str r1, [r5, r0] + cmp r6, r7 + blt _021D3A74 +_021D3AB2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3AB4: .word 0x00000F6C + thumb_func_end ov21_021D3A60 + + thumb_func_start ov21_021D3AB8 +ov21_021D3AB8: ; 0x021D3AB8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r4, #0 + ldr r1, _021D3B1C ; =0x00001728 + mov ip, r2 + str r4, [r0, r1] + add r1, r2, #0 + mov lr, r4 + cmp r1, #0 + ble _021D3B1A + ldr r7, _021D3B1C ; =0x00001728 + add r5, r0, #0 +_021D3AD0: + ldr r1, _021D3B20 ; =0x00000F6C + ldr r1, [r0, r1] + cmp r4, r1 + bge _021D3B0C + ldrh r1, [r6] + ldr r2, [r5, #0] + cmp r2, r1 + ldr r1, _021D3B1C ; =0x00001728 + bne _021D3AFA + ldr r1, [r0, r1] + add r5, #8 + lsl r1, r1, #2 + add r2, r0, r1 + mov r1, #0xf7 + lsl r1, r1, #4 + str r4, [r2, r1] + ldr r1, [r0, r7] + add r4, r4, #1 + add r1, r1, #1 + str r1, [r0, r7] + b _021D3B0C +_021D3AFA: + ldr r1, [r0, r1] + ldr r2, _021D3B24 ; =0x000001EE + lsl r1, r1, #2 + add r3, r0, r1 + lsl r1, r2, #3 + str r2, [r3, r1] + ldr r1, [r0, r7] + add r1, r1, #1 + str r1, [r0, r7] +_021D3B0C: + mov r1, lr + add r1, r1, #1 + mov r2, ip + add r6, r6, #2 + mov lr, r1 + cmp r1, r2 + blt _021D3AD0 +_021D3B1A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3B1C: .word 0x00001728 +_021D3B20: .word 0x00000F6C +_021D3B24: .word 0x000001EE + thumb_func_end ov21_021D3AB8 + + thumb_func_start ov21_021D3B28 +ov21_021D3B28: ; 0x021D3B28 + push {r3, r4, r5, r6} + ldr r2, _021D3B5C ; =0x00001728 + mov r1, #0 + str r1, [r0, r2] + ldr r2, _021D3B60 ; =0x00000F6C + ldr r2, [r0, r2] + cmp r2, #0 + ble _021D3B58 + ldr r5, _021D3B5C ; =0x00001728 + mov r3, #0xf7 + lsl r3, r3, #4 + add r2, r5, #0 + sub r4, r3, #4 +_021D3B42: + ldr r6, [r0, r2] + lsl r6, r6, #2 + add r6, r0, r6 + str r1, [r6, r3] + ldr r6, [r0, r5] + add r1, r1, #1 + add r6, r6, #1 + str r6, [r0, r5] + ldr r6, [r0, r4] + cmp r1, r6 + blt _021D3B42 +_021D3B58: + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_021D3B5C: .word 0x00001728 +_021D3B60: .word 0x00000F6C + thumb_func_end ov21_021D3B28 + + thumb_func_start ov21_021D3B64 +ov21_021D3B64: ; 0x021D3B64 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + cmp r5, #0x2f + blt _021D3B76 + bl sub_02022974 +_021D3B76: + bl sub_020989B8 + mov r2, #0 + str r2, [sp] + add r1, sp, #8 + add r5, #0xb + str r1, [sp, #4] + add r1, r5, #0 + add r3, r6, #0 + bl sub_02007068 + ldr r1, [sp, #8] + lsr r1, r1, #1 + str r1, [r4, #0] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3B64 + + thumb_func_start ov21_021D3B98 +ov21_021D3B98: ; 0x021D3B98 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + str r1, [sp, #0x10] + add r7, r2, #0 + mov r4, #0 + str r3, [sp, #0x14] + ldr r0, [sp, #0x34] + cmp r5, #5 + bhi _021D3C06 + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D3BB8: ; jump table + .short _021D3BC4 - _021D3BB8 - 2 ; case 0 + .short _021D3BC8 - _021D3BB8 - 2 ; case 1 + .short _021D3BD6 - _021D3BB8 - 2 ; case 2 + .short _021D3BE2 - _021D3BB8 - 2 ; case 3 + .short _021D3BEE - _021D3BB8 - 2 ; case 4 + .short _021D3BFA - _021D3BB8 - 2 ; case 5 +_021D3BC4: + add r6, r4, #0 + b _021D3C0A +_021D3BC8: + mov r1, #2 + add r2, sp, #0x18 + bl ov21_021D3B64 + add r6, r0, #0 + mov r4, #1 + b _021D3C0A +_021D3BD6: + mov r1, #3 + add r2, sp, #0x18 + bl ov21_021D3B64 + add r6, r0, #0 + b _021D3C0A +_021D3BE2: + mov r1, #4 + add r2, sp, #0x18 + bl ov21_021D3B64 + add r6, r0, #0 + b _021D3C0A +_021D3BEE: + mov r1, #5 + add r2, sp, #0x18 + bl ov21_021D3B64 + add r6, r0, #0 + b _021D3C0A +_021D3BFA: + mov r1, #6 + add r2, sp, #0x18 + bl ov21_021D3B64 + add r6, r0, #0 + b _021D3C0A +_021D3C06: + bl sub_02022974 +_021D3C0A: + cmp r6, #0 + beq _021D3C32 + ldr r0, [sp, #0x14] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #0x30] + add r2, r6, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x38] + str r4, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + ldr r3, [sp, #0x18] + bl ov21_021D39E4 + add r0, r6, #0 + bl sub_020181C4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} +_021D3C32: + ldr r2, [sp, #0x30] + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x14] + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r0, [sp, #0x30] + str r0, [r7, #0] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3B98 + + thumb_func_start ov21_021D3C48 +ov21_021D3C48: ; 0x021D3C48 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + str r3, [sp, #0x10] + ldr r0, [sp, #0x34] + cmp r5, #9 + bhi _021D3CEA + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D3C66: ; jump table + .short _021D3C7A - _021D3C66 - 2 ; case 0 + .short _021D3C7E - _021D3C66 - 2 ; case 1 + .short _021D3C8A - _021D3C66 - 2 ; case 2 + .short _021D3C96 - _021D3C66 - 2 ; case 3 + .short _021D3CA2 - _021D3C66 - 2 ; case 4 + .short _021D3CAE - _021D3C66 - 2 ; case 5 + .short _021D3CBA - _021D3C66 - 2 ; case 6 + .short _021D3CC6 - _021D3C66 - 2 ; case 7 + .short _021D3CD2 - _021D3C66 - 2 ; case 8 + .short _021D3CDE - _021D3C66 - 2 ; case 9 +_021D3C7A: + mov r4, #0 + b _021D3CEE +_021D3C7E: + mov r1, #7 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3C8A: + mov r1, #8 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3C96: + mov r1, #9 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CA2: + mov r1, #0xa + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CAE: + mov r1, #0xb + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CBA: + mov r1, #0xc + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CC6: + mov r1, #0xd + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CD2: + mov r1, #0xe + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CDE: + mov r1, #0xf + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3CEE +_021D3CEA: + bl sub_02022974 +_021D3CEE: + cmp r4, #0 + beq _021D3D16 + str r4, [sp] + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [sp, #0x38] + ldr r3, [sp, #0x30] + str r0, [sp, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D39E4 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D3D16: + ldr r2, [sp, #0x30] + ldr r1, [sp, #0x10] + add r0, r7, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r0, [sp, #0x30] + str r0, [r6, #0] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3C48 + + thumb_func_start ov21_021D3D2C +ov21_021D3D2C: ; 0x021D3D2C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + str r3, [sp, #0x10] + ldr r0, [sp, #0x34] + cmp r5, #0x11 + bhi _021D3E3E + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D3D4A: ; jump table + .short _021D3D6E - _021D3D4A - 2 ; case 0 + .short _021D3D72 - _021D3D4A - 2 ; case 1 + .short _021D3D7E - _021D3D4A - 2 ; case 2 + .short _021D3D8A - _021D3D4A - 2 ; case 3 + .short _021D3D96 - _021D3D4A - 2 ; case 4 + .short _021D3DA2 - _021D3D4A - 2 ; case 5 + .short _021D3DAE - _021D3D4A - 2 ; case 6 + .short _021D3DBA - _021D3D4A - 2 ; case 7 + .short _021D3DC6 - _021D3D4A - 2 ; case 8 + .short _021D3DD2 - _021D3D4A - 2 ; case 9 + .short _021D3DDE - _021D3D4A - 2 ; case 10 + .short _021D3DEA - _021D3D4A - 2 ; case 11 + .short _021D3DF6 - _021D3D4A - 2 ; case 12 + .short _021D3E02 - _021D3D4A - 2 ; case 13 + .short _021D3E0E - _021D3D4A - 2 ; case 14 + .short _021D3E1A - _021D3D4A - 2 ; case 15 + .short _021D3E26 - _021D3D4A - 2 ; case 16 + .short _021D3E32 - _021D3D4A - 2 ; case 17 +_021D3D6E: + mov r4, #0 + b _021D3E42 +_021D3D72: + mov r1, #0x10 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3D7E: + mov r1, #0x11 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3D8A: + mov r1, #0x12 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3D96: + mov r1, #0x13 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DA2: + mov r1, #0x14 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DAE: + mov r1, #0x15 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DBA: + mov r1, #0x16 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DC6: + mov r1, #0x17 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DD2: + mov r1, #0x18 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DDE: + mov r1, #0x19 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DEA: + mov r1, #0x1a + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3DF6: + mov r1, #0x1b + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3E02: + mov r1, #0x1c + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3E0E: + mov r1, #0x1d + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3E1A: + mov r1, #0x1e + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3E26: + mov r1, #0x1f + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3E32: + mov r1, #0x20 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3E42 +_021D3E3E: + bl sub_02022974 +_021D3E42: + cmp r4, #0 + beq _021D3E6A + str r4, [sp] + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x38] + ldr r3, [sp, #0x30] + str r0, [sp, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D39E4 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D3E6A: + ldr r2, [sp, #0x30] + ldr r1, [sp, #0x10] + add r0, r7, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r0, [sp, #0x30] + str r0, [r6, #0] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3D2C + + thumb_func_start ov21_021D3E80 +ov21_021D3E80: ; 0x021D3E80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + str r3, [sp, #0x10] + ldr r0, [sp, #0x34] + cmp r5, #0xe + bhi _021D3F68 + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D3E9E: ; jump table + .short _021D3EBC - _021D3E9E - 2 ; case 0 + .short _021D3EC0 - _021D3E9E - 2 ; case 1 + .short _021D3ECC - _021D3E9E - 2 ; case 2 + .short _021D3ED8 - _021D3E9E - 2 ; case 3 + .short _021D3EE4 - _021D3E9E - 2 ; case 4 + .short _021D3EF0 - _021D3E9E - 2 ; case 5 + .short _021D3EFC - _021D3E9E - 2 ; case 6 + .short _021D3F08 - _021D3E9E - 2 ; case 7 + .short _021D3F14 - _021D3E9E - 2 ; case 8 + .short _021D3F20 - _021D3E9E - 2 ; case 9 + .short _021D3F2C - _021D3E9E - 2 ; case 10 + .short _021D3F38 - _021D3E9E - 2 ; case 11 + .short _021D3F44 - _021D3E9E - 2 ; case 12 + .short _021D3F50 - _021D3E9E - 2 ; case 13 + .short _021D3F5C - _021D3E9E - 2 ; case 14 +_021D3EBC: + mov r4, #0 + b _021D3F6C +_021D3EC0: + mov r1, #0x21 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3ECC: + mov r1, #0x22 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3ED8: + mov r1, #0x23 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3EE4: + mov r1, #0x24 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3EF0: + mov r1, #0x25 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3EFC: + mov r1, #0x26 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F08: + mov r1, #0x27 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F14: + mov r1, #0x28 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F20: + mov r1, #0x29 + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F2C: + mov r1, #0x2a + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F38: + mov r1, #0x2b + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F44: + mov r1, #0x2c + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F50: + mov r1, #0x2d + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F5C: + mov r1, #0x2e + add r2, sp, #0x14 + bl ov21_021D3B64 + add r4, r0, #0 + b _021D3F6C +_021D3F68: + bl sub_02022974 +_021D3F6C: + cmp r4, #0 + beq _021D3F94 + str r4, [sp] + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [sp, #0x38] + ldr r3, [sp, #0x30] + str r0, [sp, #0xc] + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D39E4 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D3F94: + ldr r2, [sp, #0x30] + ldr r1, [sp, #0x10] + add r0, r7, #0 + lsl r2, r2, #1 + bl sub_020D50B8 + ldr r0, [sp, #0x30] + str r0, [r6, #0] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D3E80 + + thumb_func_start ov21_021D3FA8 +ov21_021D3FA8: ; 0x021D3FA8 + push {r3, r4, r5, r6} + mov r3, #0 + str r3, [r1, #0] + ldr r4, _021D3FDC ; =0x00000F6C + str r3, [r2, #0] + ldr r4, [r0, r4] + cmp r4, #0 + ble _021D3FD8 + ldr r5, _021D3FDC ; =0x00000F6C + add r4, r0, #0 +_021D3FBC: + ldr r6, [r4, #4] + cmp r6, #2 + bne _021D3FC8 + ldr r6, [r2, #0] + add r6, r6, #1 + str r6, [r2, #0] +_021D3FC8: + ldr r6, [r1, #0] + add r3, r3, #1 + add r6, r6, #1 + str r6, [r1, #0] + ldr r6, [r0, r5] + add r4, #8 + cmp r3, r6 + blt _021D3FBC +_021D3FD8: + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_021D3FDC: .word 0x00000F6C + thumb_func_end ov21_021D3FA8 \ No newline at end of file diff --git a/asm/ov21_021D3FE0.s b/asm/ov21_021D3FE0.s new file mode 100644 index 000000000..6a5b7c00e --- /dev/null +++ b/asm/ov21_021D3FE0.s @@ -0,0 +1,360 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D3FE0 +ov21_021D3FE0: ; 0x021D3FE0 + push {r3, r4, r5, lr} + mov r1, #0x48 + add r5, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D3FF2 + bl sub_02022974 +_021D3FF2: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x48 + bl sub_020D5124 + mov r0, #5 + str r0, [r4, #8] + str r5, [r4, #0x44] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D3FE0 + + thumb_func_start ov21_021D4008 +ov21_021D4008: ; 0x021D4008 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _021D4016 + bl sub_02022974 +_021D4016: + cmp r4, #0 + bne _021D401E + bl sub_02022974 +_021D401E: + add r0, r5, #0 + bl ov21_021D41A8 + cmp r0, #0 + bne _021D402C + bl sub_02022974 +_021D402C: + ldr r0, [r4, #0] + str r0, [r5, #0] + ldr r0, [r4, #4] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #8] + add r0, r5, #0 + add r0, #0xc + bl ov21_021D41D8 + ldr r0, [r5, #0x44] + str r0, [r5, #0x10] + add r0, r5, #0 + add r0, #0x2c + bl ov21_021D41E4 + ldr r0, [r5, #0x44] + str r0, [r5, #0x30] + ldr r0, [r4, #8] + ldr r0, [r0, #0] + str r0, [r5, #0x20] + ldr r0, [r4, #8] + ldr r0, [r0, #4] + str r0, [r5, #0x24] + ldr r0, [r4, #8] + ldr r0, [r0, #8] + str r0, [r5, #0x28] + ldr r0, [r4, #0xc] + ldr r0, [r0, #0] + str r0, [r5, #0x38] + ldr r0, [r4, #0xc] + ldr r0, [r0, #4] + str r0, [r5, #0x3c] + ldr r0, [r4, #0xc] + ldr r0, [r0, #8] + str r0, [r5, #0x40] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4008 + + thumb_func_start ov21_021D4078 +ov21_021D4078: ; 0x021D4078 + push {r4, lr} + add r4, r0, #0 + bne _021D4082 + bl sub_02022974 +_021D4082: + ldr r0, [r4, #8] + cmp r0, #5 + bhi _021D40F6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4094: ; jump table + .short _021D40A0 - _021D4094 - 2 ; case 0 + .short _021D40FA - _021D4094 - 2 ; case 1 + .short _021D40BC - _021D4094 - 2 ; case 2 + .short _021D40FA - _021D4094 - 2 ; case 3 + .short _021D40DA - _021D4094 - 2 ; case 4 + .short _021D40F2 - _021D4094 - 2 ; case 5 +_021D40A0: + add r1, r4, #0 + ldr r0, [r4, #0x20] + ldr r2, [r4, #0] + add r1, #0xc + bl ov21_021D41EC + cmp r0, #1 + bne _021D40FA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0xc] + b _021D40FA +_021D40BC: + add r1, r4, #0 + ldr r0, [r4, #0x24] + ldr r2, [r4, #0] + add r1, #0xc + bl ov21_021D41EC + cmp r0, #1 + bne _021D40FA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0xc] + str r0, [r4, #0x2c] + b _021D40FA +_021D40DA: + add r1, r4, #0 + ldr r0, [r4, #0x28] + ldr r2, [r4, #0] + add r1, #0xc + bl ov21_021D41EC + cmp r0, #1 + bne _021D40FA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _021D40FA +_021D40F2: + mov r0, #1 + pop {r4, pc} +_021D40F6: + bl sub_02022974 +_021D40FA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4078 + + thumb_func_start ov21_021D4100 +ov21_021D4100: ; 0x021D4100 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bne _021D410C + bl sub_02022974 +_021D410C: + ldr r0, [r4, #8] + cmp r0, #5 + bhi _021D418A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D411E: ; jump table + .short _021D418E - _021D411E - 2 ; case 0 + .short _021D412A - _021D411E - 2 ; case 1 + .short _021D414E - _021D411E - 2 ; case 2 + .short _021D4164 - _021D411E - 2 ; case 3 + .short _021D418E - _021D411E - 2 ; case 4 + .short _021D4184 - _021D411E - 2 ; case 5 +_021D412A: + add r0, r4, #0 + add r0, #0xc + str r0, [sp] + add r2, r4, #0 + ldr r0, [r4, #0x38] + ldr r1, [r4, #4] + ldr r3, [r4, #0] + add r2, #0x2c + bl ov21_021D420C + cmp r0, #1 + bne _021D418E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0x2c] + b _021D418E +_021D414E: + add r0, r4, #0 + add r0, #0xc + str r0, [sp] + add r2, r4, #0 + ldr r0, [r4, #0x3c] + ldr r1, [r4, #4] + ldr r3, [r4, #0] + add r2, #0x2c + bl ov21_021D420C + b _021D418E +_021D4164: + add r0, r4, #0 + add r0, #0xc + str r0, [sp] + add r2, r4, #0 + ldr r0, [r4, #0x40] + ldr r1, [r4, #4] + ldr r3, [r4, #0] + add r2, #0x2c + bl ov21_021D420C + cmp r0, #1 + bne _021D418E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _021D418E +_021D4184: + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_021D418A: + bl sub_02022974 +_021D418E: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021D4100 + + thumb_func_start ov21_021D4194 +ov21_021D4194: ; 0x021D4194 + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov21_021D4194 + + thumb_func_start ov21_021D4198 +ov21_021D4198: ; 0x021D4198 + push {r4, lr} + add r4, r0, #0 + bne _021D41A2 + bl sub_02022974 +_021D41A2: + mov r0, #1 + str r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov21_021D4198 + + thumb_func_start ov21_021D41A8 +ov21_021D41A8: ; 0x021D41A8 + push {r4, lr} + add r4, r0, #0 + bne _021D41B2 + bl sub_02022974 +_021D41B2: + ldr r0, [r4, #8] + cmp r0, #5 + bne _021D41BC + mov r0, #1 + pop {r4, pc} +_021D41BC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov21_021D41A8 + + thumb_func_start ov21_021D41C0 +ov21_021D41C0: ; 0x021D41C0 + push {r4, lr} + add r4, r0, #0 + bne _021D41CA + bl sub_02022974 +_021D41CA: + ldr r0, [r4, #8] + cmp r0, #2 + bne _021D41D4 + mov r0, #1 + pop {r4, pc} +_021D41D4: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov21_021D41C0 + + thumb_func_start ov21_021D41D8 +ov21_021D41D8: ; 0x021D41D8 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #8] + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D41D8 + + thumb_func_start ov21_021D41E4 +ov21_021D41E4: ; 0x021D41E4 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #8] + bx lr + thumb_func_end ov21_021D41E4 + + thumb_func_start ov21_021D41EC +ov21_021D41EC: ; 0x021D41EC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0 + bne _021D41FC + bl sub_02022974 +_021D41FC: + cmp r4, #0 + bne _021D4204 + bl sub_02022974 +_021D4204: + add r0, r4, #0 + add r1, r6, #0 + blx r5 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D41EC + + thumb_func_start ov21_021D420C +ov21_021D420C: ; 0x021D420C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _021D421E + bl sub_02022974 +_021D421E: + cmp r4, #0 + bne _021D4226 + bl sub_02022974 +_021D4226: + ldr r0, [sp, #0x18] + cmp r0, #0 + bne _021D4230 + bl sub_02022974 +_021D4230: + ldr r3, [sp, #0x18] + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + blx r5 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D420C \ No newline at end of file diff --git a/asm/ov21_021D423C.s b/asm/ov21_021D423C.s new file mode 100644 index 000000000..c783df982 --- /dev/null +++ b/asm/ov21_021D423C.s @@ -0,0 +1,167 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D423C +ov21_021D423C: ; 0x021D423C + push {r4, lr} + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021D424C + bl sub_02022974 +_021D424C: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D423C + + thumb_func_start ov21_021D426C +ov21_021D426C: ; 0x021D426C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0 + bne _021D427C + bl sub_02022974 +_021D427C: + str r4, [r5, #0] + str r6, [r5, #4] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D426C + + thumb_func_start ov21_021D4284 +ov21_021D4284: ; 0x021D4284 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r4, #0 + bne _021D4292 + bl sub_02022974 +_021D4292: + add r0, r4, #0 + bl ov21_021D42EC + cmp r0, #0 + bne _021D42AE + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D42FC + add r1, r0, #0 + beq _021D42AE + add r0, r4, #0 + bl ov21_021D4334 +_021D42AE: + add r0, r4, #0 + bl ov21_021D42EC + cmp r0, #1 + bne _021D42CE + ldr r1, [r4, #8] + add r0, r1, #0 + ldr r1, [r1, #4] + add r0, #8 + blx r1 + cmp r0, #1 + bne _021D42CE + add r0, r4, #0 + mov r1, #0 + bl ov21_021D4334 +_021D42CE: + ldr r0, [r4, #8] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4284 + + thumb_func_start ov21_021D42D4 +ov21_021D42D4: ; 0x021D42D4 + push {r4, lr} + add r4, r0, #0 + bne _021D42DE + bl sub_02022974 +_021D42DE: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D42E8 + mov r0, #1 + pop {r4, pc} +_021D42E8: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov21_021D42D4 + + thumb_func_start ov21_021D42EC +ov21_021D42EC: ; 0x021D42EC + ldr r0, [r0, #8] + cmp r0, #0 + beq _021D42F6 + mov r0, #1 + bx lr +_021D42F6: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D42EC + + thumb_func_start ov21_021D42FC +ov21_021D42FC: ; 0x021D42FC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r7, r1, #0 + mov r6, #0 + cmp r0, #0 + ble _021D4330 + add r4, r6, #0 +_021D430C: + ldr r0, [r5, #0] + cmp r0, #0 + bne _021D4316 + bl sub_02022974 +_021D4316: + ldr r0, [r5, #0] + ldr r1, [r0, r4] + tst r1, r7 + beq _021D4326 + mov r1, #0x14 + mul r1, r6 + add r0, r0, r1 + pop {r3, r4, r5, r6, r7, pc} +_021D4326: + ldr r0, [r5, #4] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _021D430C +_021D4330: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D42FC + + thumb_func_start ov21_021D4334 +ov21_021D4334: ; 0x021D4334 + str r1, [r0, #8] + cmp r1, #0 + beq _021D433E + mov r0, #0 + str r0, [r1, #8] +_021D433E: + bx lr + thumb_func_end ov21_021D4334 \ No newline at end of file diff --git a/asm/ov21_021D4340.s b/asm/ov21_021D4340.s new file mode 100644 index 000000000..3fa1faf1e --- /dev/null +++ b/asm/ov21_021D4340.s @@ -0,0 +1,1119 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D4340 +ov21_021D4340: ; 0x021D4340 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r2, [r4, #8] + cmp r0, #3 + bhi _021D43A0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4358: ; jump table + .short _021D4360 - _021D4358 - 2 ; case 0 + .short _021D436E - _021D4358 - 2 ; case 1 + .short _021D4380 - _021D4358 - 2 ; case 2 + .short _021D4392 - _021D4358 - 2 ; case 3 +_021D4360: + ldr r0, [r2, #4] + bl ov21_021D4198 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D43A4 +_021D436E: + ldr r0, [r2, #4] + bl ov21_021D41A8 + cmp r0, #1 + bne _021D43A4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D43A4 +_021D4380: + ldr r0, [r2, #0] + ldr r1, [r2, #8] + ldr r2, [r2, #4] + bl ov21_021D4628 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D43A4 +_021D4392: + ldr r0, [r2, #4] + bl ov21_021D41C0 + cmp r0, #1 + bne _021D43A4 + mov r0, #1 + pop {r4, pc} +_021D43A0: + bl sub_02022974 +_021D43A4: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov21_021D4340 + + thumb_func_start ov21_021D43A8 +ov21_021D43A8: ; 0x021D43A8 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r4, [r5, #8] + cmp r0, #0 + beq _021D43C0 + cmp r0, #1 + beq _021D43E0 + cmp r0, #2 + beq _021D441E + b _021D4428 +_021D43C0: + ldr r0, [r4, #0] + bl ov21_021D4198 + ldr r0, [r4, #4] + bl ov21_021D4198 + ldr r0, [r4, #8] + bl ov21_021D4198 + ldr r0, [r4, #0xc] + bl ov21_021D4198 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D442C +_021D43E0: + ldr r0, [r4, #0] + bl ov21_021D41A8 + str r0, [sp] + ldr r0, [r4, #4] + bl ov21_021D41A8 + str r0, [sp, #4] + ldr r0, [r4, #8] + bl ov21_021D41A8 + str r0, [sp, #8] + ldr r0, [r4, #0xc] + bl ov21_021D41A8 + str r0, [sp, #0xc] + mov r1, #0 + add r2, sp, #0 +_021D4404: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021D4412 + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #4 + blt _021D4404 +_021D4412: + cmp r1, #4 + blt _021D442C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D442C +_021D441E: + ldr r1, [r4, #0x10] + mov r0, #1 + str r0, [r1, #0] + add sp, #0x10 + pop {r3, r4, r5, pc} +_021D4428: + bl sub_02022974 +_021D442C: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D43A8 + + thumb_func_start ov21_021D4434 +ov21_021D4434: ; 0x021D4434 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r4, [r5, #8] + cmp r0, #3 + bls _021D4444 + b _021D454C +_021D4444: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4450: ; jump table + .short _021D4458 - _021D4450 - 2 ; case 0 + .short _021D4478 - _021D4450 - 2 ; case 1 + .short _021D44B6 - _021D4450 - 2 ; case 2 + .short _021D44E6 - _021D4450 - 2 ; case 3 +_021D4458: + ldr r0, [r4, #0] + bl ov21_021D4198 + ldr r0, [r4, #4] + bl ov21_021D4198 + ldr r0, [r4, #8] + bl ov21_021D4198 + ldr r0, [r4, #0xc] + bl ov21_021D4198 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4550 +_021D4478: + ldr r0, [r4, #0] + bl ov21_021D41A8 + str r0, [sp] + ldr r0, [r4, #4] + bl ov21_021D41A8 + str r0, [sp, #4] + ldr r0, [r4, #8] + bl ov21_021D41A8 + str r0, [sp, #8] + ldr r0, [r4, #0xc] + bl ov21_021D41A8 + str r0, [sp, #0xc] + mov r1, #0 + add r2, sp, #0 +_021D449C: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021D44AA + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #4 + blt _021D449C +_021D44AA: + cmp r1, #4 + blt _021D4550 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4550 +_021D44B6: + ldr r0, [r4, #0x20] + ldr r1, [r4, #0x10] + ldr r2, [r4, #0] + bl ov21_021D4628 + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x14] + ldr r2, [r4, #4] + bl ov21_021D4628 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x18] + ldr r2, [r4, #8] + bl ov21_021D4628 + ldr r0, [r4, #0x2c] + ldr r1, [r4, #0x1c] + ldr r2, [r4, #0xc] + bl ov21_021D4628 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4550 +_021D44E6: + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _021D44F6 + ldr r0, [r4, #0] + bl ov21_021D41C0 + str r0, [sp] + b _021D44FA +_021D44F6: + mov r0, #1 + str r0, [sp] +_021D44FA: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021D4508 + ldr r0, [r4, #4] + bl ov21_021D41C0 + str r0, [sp, #4] +_021D4508: + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _021D4518 + ldr r0, [r4, #8] + bl ov21_021D41C0 + str r0, [sp, #8] + b _021D451C +_021D4518: + mov r0, #1 + str r0, [sp, #8] +_021D451C: + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021D452C + ldr r0, [r4, #0xc] + bl ov21_021D41C0 + str r0, [sp, #0xc] + b _021D4530 +_021D452C: + mov r0, #1 + str r0, [sp, #0xc] +_021D4530: + mov r2, #0 + add r1, sp, #0 +_021D4534: + ldr r0, [r1, #0] + cmp r0, #0 + beq _021D4542 + add r2, r2, #1 + add r1, r1, #4 + cmp r2, #4 + blt _021D4534 +_021D4542: + cmp r2, #4 + blt _021D4550 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D454C: + bl sub_02022974 +_021D4550: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4434 + + thumb_func_start ov21_021D4558 +ov21_021D4558: ; 0x021D4558 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r4, [r5, #8] + cmp r0, #3 + bhi _021D461C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4572: ; jump table + .short _021D457A - _021D4572 - 2 ; case 0 + .short _021D458E - _021D4572 - 2 ; case 1 + .short _021D45BC - _021D4572 - 2 ; case 2 + .short _021D45D8 - _021D4572 - 2 ; case 3 +_021D457A: + ldr r0, [r4, #0] + bl ov21_021D4198 + ldr r0, [r4, #4] + bl ov21_021D4198 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4620 +_021D458E: + ldr r0, [r4, #0] + bl ov21_021D41A8 + str r0, [sp] + ldr r0, [r4, #4] + bl ov21_021D41A8 + str r0, [sp, #4] + mov r1, #0 + add r2, sp, #0 +_021D45A2: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021D45B0 + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #2 + blt _021D45A2 +_021D45B0: + cmp r1, #2 + blt _021D4620 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4620 +_021D45BC: + ldr r0, [r4, #0x10] + ldr r1, [r4, #8] + ldr r2, [r4, #0] + bl ov21_021D4628 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0xc] + ldr r2, [r4, #4] + bl ov21_021D4628 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4620 +_021D45D8: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _021D45E8 + ldr r0, [r4, #0] + bl ov21_021D41C0 + str r0, [sp] + b _021D45EC +_021D45E8: + mov r0, #1 + str r0, [sp] +_021D45EC: + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D45FC + ldr r0, [r4, #4] + bl ov21_021D41C0 + str r0, [sp, #4] + b _021D4600 +_021D45FC: + mov r0, #1 + str r0, [sp, #4] +_021D4600: + mov r2, #0 + add r1, sp, #0 +_021D4604: + ldr r0, [r1, #0] + cmp r0, #0 + beq _021D4612 + add r2, r2, #1 + add r1, r1, #4 + cmp r2, #2 + blt _021D4604 +_021D4612: + cmp r2, #2 + blt _021D4620 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D461C: + bl sub_02022974 +_021D4620: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4558 + + thumb_func_start ov21_021D4628 +ov21_021D4628: ; 0x021D4628 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + beq _021D465A + ldr r0, [r5, #0] + add r1, sp, #0 + str r0, [sp] + ldr r0, [r5, #4] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #8 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x14 + str r0, [sp, #0xc] + add r0, r2, #0 + bl ov21_021D4008 + ldr r1, [r5, #0x20] + ldr r2, [r5, #0x24] + add r0, r4, #0 + bl ov21_021D426C +_021D465A: + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4628 + + thumb_func_start ov21_021D4660 +ov21_021D4660: ; 0x021D4660 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _021D466E + bl sub_02022974 +_021D466E: + ldr r0, [r4, #0x10] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x10] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4660 + + thumb_func_start ov21_021D467C +ov21_021D467C: ; 0x021D467C + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r1, _021D4700 ; =ov21_021D4434 + str r3, [r6, #0] + str r1, [r6, #4] + mov r1, #0x30 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4696 + bl sub_02022974 +_021D4696: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x30 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r5, #0 + bl ov21_021D1314 + str r0, [r4, #8] + add r0, r5, #0 + bl ov21_021D1328 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov21_021D133C + str r0, [r4, #0x10] + add r0, r5, #0 + bl ov21_021D1350 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov21_021D1364 + str r0, [r4, #0x18] + add r0, r5, #0 + bl ov21_021D1378 + str r0, [r4, #0x1c] + add r0, r5, #0 + mov r1, #1 + bl ov21_021D1410 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #1 + bl ov21_021D1430 + str r0, [r4, #0x24] + mov r0, #0 + str r0, [r4, #0x28] + str r0, [r4, #0x2c] + str r4, [r6, #0x10] + pop {r4, r5, r6, pc} + nop +_021D4700: .word ov21_021D4434 + thumb_func_end ov21_021D467C + + thumb_func_start ov21_021D4704 +ov21_021D4704: ; 0x021D4704 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4758 ; =ov21_021D43A8 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0x14 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D471E + bl sub_02022974 +_021D471E: + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_021D4724: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D4724 + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D1314 + str r0, [r4, #8] + add r0, r6, #0 + bl ov21_021D1328 + str r0, [r4, #0xc] + add r0, r6, #0 + bl ov21_021D13DC + str r0, [r4, #0x10] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D4758: .word ov21_021D43A8 + thumb_func_end ov21_021D4704 + + thumb_func_start ov21_021D475C +ov21_021D475C: ; 0x021D475C + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r1, _021D47EC ; =ov21_021D4434 + str r3, [r6, #0] + str r1, [r6, #4] + mov r1, #0x30 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4776 + bl sub_02022974 +_021D4776: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x30 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r5, #0 + bl ov21_021D1314 + str r0, [r4, #8] + add r0, r5, #0 + bl ov21_021D1328 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov21_021D133C + str r0, [r4, #0x10] + add r0, r5, #0 + bl ov21_021D1350 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov21_021D1364 + str r0, [r4, #0x18] + add r0, r5, #0 + bl ov21_021D1378 + str r0, [r4, #0x1c] + add r0, r5, #0 + mov r1, #2 + bl ov21_021D1410 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #2 + bl ov21_021D1430 + str r0, [r4, #0x24] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #0x28] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1430 + str r0, [r4, #0x2c] + str r4, [r6, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D47EC: .word ov21_021D4434 + thumb_func_end ov21_021D475C + + thumb_func_start ov21_021D47F0 +ov21_021D47F0: ; 0x021D47F0 + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r1, _021D4874 ; =ov21_021D4434 + str r3, [r6, #0] + str r1, [r6, #4] + mov r1, #0x30 + add r5, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D480A + bl sub_02022974 +_021D480A: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x30 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r5, #0 + bl ov21_021D1314 + str r0, [r4, #8] + add r0, r5, #0 + bl ov21_021D1328 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov21_021D133C + str r0, [r4, #0x10] + add r0, r5, #0 + bl ov21_021D1350 + str r0, [r4, #0x14] + add r0, r5, #0 + bl ov21_021D1364 + str r0, [r4, #0x18] + add r0, r5, #0 + bl ov21_021D1378 + str r0, [r4, #0x1c] + add r0, r5, #0 + mov r1, #0 + bl ov21_021D1410 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #0 + bl ov21_021D1430 + str r0, [r4, #0x24] + mov r0, #0 + str r0, [r4, #0x28] + str r0, [r4, #0x2c] + str r4, [r6, #0x10] + pop {r4, r5, r6, pc} + nop +_021D4874: .word ov21_021D4434 + thumb_func_end ov21_021D47F0 + + thumb_func_start ov21_021D4878 +ov21_021D4878: ; 0x021D4878 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _021D48B4 ; =ov21_021D4340 + str r3, [r5, #0] + add r6, r1, #0 + str r0, [r5, #4] + add r0, r2, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021D4894 + bl sub_02022974 +_021D4894: + add r0, r6, #0 + mov r1, #0 + bl ov21_021D1410 + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + nop +_021D48B4: .word ov21_021D4340 + thumb_func_end ov21_021D4878 + + thumb_func_start ov21_021D48B8 +ov21_021D48B8: ; 0x021D48B8 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4918 ; =ov21_021D4558 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0x18 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D48D2 + bl sub_02022974 +_021D48D2: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D48D8: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D48D8 + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + bl ov21_021D1350 + str r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #6 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r6, #0 + mov r1, #4 + bl ov21_021D1430 + str r0, [r4, #0x14] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D4918: .word ov21_021D4558 + thumb_func_end ov21_021D48B8 + + thumb_func_start ov21_021D491C +ov21_021D491C: ; 0x021D491C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D497C ; =ov21_021D4558 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0x18 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4936 + bl sub_02022974 +_021D4936: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D493C: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D493C + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + bl ov21_021D1350 + str r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #7 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r6, #0 + mov r1, #5 + bl ov21_021D1430 + str r0, [r4, #0x14] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D497C: .word ov21_021D4558 + thumb_func_end ov21_021D491C + + thumb_func_start ov21_021D4980 +ov21_021D4980: ; 0x021D4980 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D49E0 ; =ov21_021D4558 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0x18 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D499A + bl sub_02022974 +_021D499A: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D49A0: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D49A0 + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + bl ov21_021D1350 + str r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #8 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r6, #0 + mov r1, #6 + bl ov21_021D1430 + str r0, [r4, #0x14] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D49E0: .word ov21_021D4558 + thumb_func_end ov21_021D4980 + + thumb_func_start ov21_021D49E4 +ov21_021D49E4: ; 0x021D49E4 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4A38 ; =ov21_021D4340 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0xc + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D49FE + bl sub_02022974 +_021D49FE: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + mov r1, #8 + bl ov21_021D1410 + str r0, [r4, #0] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + nop +_021D4A38: .word ov21_021D4340 + thumb_func_end ov21_021D49E4 + + thumb_func_start ov21_021D4A3C +ov21_021D4A3C: ; 0x021D4A3C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4A90 ; =ov21_021D4340 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0xc + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4A56 + bl sub_02022974 +_021D4A56: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + mov r1, #9 + bl ov21_021D1410 + str r0, [r4, #0] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + nop +_021D4A90: .word ov21_021D4340 + thumb_func_end ov21_021D4A3C + + thumb_func_start ov21_021D4A94 +ov21_021D4A94: ; 0x021D4A94 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4AF4 ; =ov21_021D4558 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0x18 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4AAE + bl sub_02022974 +_021D4AAE: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D4AB4: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D4AB4 + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + bl ov21_021D1350 + str r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #2 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r6, #0 + mov r1, #2 + bl ov21_021D1430 + str r0, [r4, #0x14] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D4AF4: .word ov21_021D4558 + thumb_func_end ov21_021D4A94 + + thumb_func_start ov21_021D4AF8 +ov21_021D4AF8: ; 0x021D4AF8 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4B4C ; =ov21_021D4340 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0xc + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4B12 + bl sub_02022974 +_021D4B12: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + mov r1, #2 + bl ov21_021D1410 + str r0, [r4, #0] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + nop +_021D4B4C: .word ov21_021D4340 + thumb_func_end ov21_021D4AF8 + + thumb_func_start ov21_021D4B50 +ov21_021D4B50: ; 0x021D4B50 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4BB0 ; =ov21_021D4558 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0x18 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4B6A + bl sub_02022974 +_021D4B6A: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D4B70: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D4B70 + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #0] + add r0, r6, #0 + bl ov21_021D1300 + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + bl ov21_021D1350 + str r0, [r4, #0xc] + add r0, r6, #0 + mov r1, #3 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r6, #0 + mov r1, #7 + bl ov21_021D1430 + str r0, [r4, #0x14] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D4BB0: .word ov21_021D4558 + thumb_func_end ov21_021D4B50 + + thumb_func_start ov21_021D4BB4 +ov21_021D4BB4: ; 0x021D4BB4 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _021D4C08 ; =ov21_021D4340 + str r3, [r5, #0] + str r1, [r5, #4] + mov r1, #0xc + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D4BCE + bl sub_02022974 +_021D4BCE: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r6, #0 + bl ov21_021D12EC + str r0, [r4, #4] + add r0, r6, #0 + bl ov21_021D133C + str r0, [r4, #8] + add r0, r6, #0 + mov r1, #4 + bl ov21_021D1410 + str r0, [r4, #0] + str r4, [r5, #0x10] + pop {r4, r5, r6, pc} + nop +_021D4C08: .word ov21_021D4340 + thumb_func_end ov21_021D4BB4 \ No newline at end of file diff --git a/asm/ov21_021D4C0C.s b/asm/ov21_021D4C0C.s new file mode 100644 index 000000000..75feafe1c --- /dev/null +++ b/asm/ov21_021D4C0C.s @@ -0,0 +1,396 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D4C0C +ov21_021D4C0C: ; 0x021D4C0C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bne _021D4C20 + bl sub_02022974 +_021D4C20: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D4C26: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D4C26 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + bl sub_02012744 + str r0, [r4, #0] + ldr r1, [r5, #8] + ldr r0, [r5, #0xc] + lsl r1, r1, #4 + bl sub_02018144 + str r0, [r4, #0xc] + cmp r0, #0 + bne _021D4C4C + bl sub_02022974 +_021D4C4C: + ldr r2, [r5, #8] + ldr r0, [r4, #0xc] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r0, [r5, #8] + str r0, [r4, #0x10] + ldr r0, [r5, #0] + str r0, [r4, #4] + ldr r0, [r5, #4] + str r0, [r4, #8] + ldr r0, [r5, #0xc] + str r0, [r4, #0x14] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D4C0C + + thumb_func_start ov21_021D4C6C +ov21_021D4C6C: ; 0x021D4C6C + push {r4, lr} + add r4, r0, #0 + bne _021D4C76 + bl sub_02022974 +_021D4C76: + add r0, r4, #0 + bl ov21_021D4D3C + ldr r0, [r4, #0xc] + bl sub_020181C4 + ldr r0, [r4, #0] + bl sub_020127BC + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D4C8E: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D4C8E + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4C6C + + thumb_func_start ov21_021D4CA0 +ov21_021D4CA0: ; 0x021D4CA0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + bl sub_02012898 + add r1, r0, #0 + add r0, r4, #0 + bl ov21_021D4CB8 + pop {r4, pc} + thumb_func_end ov21_021D4CA0 + + thumb_func_start ov21_021D4CB8 +ov21_021D4CB8: ; 0x021D4CB8 + push {r4, r5, r6, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + bl ov21_021D4EB4 + add r4, r0, #0 + bne _021D4CCE + bl sub_02022974 +_021D4CCE: + ldr r2, [r5, #0x20] + add r0, r6, #0 + mov r1, #1 + add r3, r4, #4 + bl sub_0201ED94 + ldr r0, [r5, #0] + ldr r0, [r0, #0] + str r0, [sp] + ldr r0, [r5, #4] + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r0, [r0, #4] + str r0, [sp, #8] + ldr r0, [r5, #8] + str r0, [sp, #0xc] + ldr r0, [r5, #0xc] + str r0, [sp, #0x10] + ldr r0, [r4, #8] + str r0, [sp, #0x14] + ldr r0, [r5, #0x10] + str r0, [sp, #0x18] + ldr r0, [r5, #0x14] + str r0, [sp, #0x1c] + ldr r0, [r5, #0x18] + str r0, [sp, #0x20] + ldr r0, [r5, #0x1c] + str r0, [sp, #0x24] + ldr r0, [r5, #0x20] + str r0, [sp, #0x28] + ldr r0, [r5, #0x24] + str r0, [sp, #0x2c] + add r0, sp, #0 + bl sub_020127E8 + str r0, [r4, #0] + add r0, r4, #0 + add sp, #0x30 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D4CB8 + + thumb_func_start ov21_021D4D1C +ov21_021D4D1C: ; 0x021D4D1C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02012870 + add r0, r4, #4 + bl sub_0201EE28 + mov r1, #0x10 + mov r0, #0 +_021D4D30: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _021D4D30 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4D1C + + thumb_func_start ov21_021D4D3C +ov21_021D4D3C: ; 0x021D4D3C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + mov r6, #0 + cmp r0, #0 + ble _021D4D68 + add r4, r6, #0 +_021D4D4A: + ldr r0, [r5, #0xc] + add r0, r0, r4 + bl ov21_021D4EA4 + cmp r0, #0 + beq _021D4D5E + ldr r0, [r5, #0xc] + add r0, r0, r4 + bl ov21_021D4D1C +_021D4D5E: + ldr r0, [r5, #0x10] + add r6, r6, #1 + add r4, #0x10 + cmp r6, r0 + blt _021D4D4A +_021D4D68: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D4D3C + + thumb_func_start ov21_021D4D6C +ov21_021D4D6C: ; 0x021D4D6C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x14] + add r4, r1, #0 + mov r1, #1 + add r6, r2, #0 + bl sub_0201A778 + add r7, r0, #0 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + lsl r2, r4, #0x18 + lsl r3, r6, #0x18 + ldr r0, [r5, #8] + add r1, r7, #0 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A870 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D4D6C + + thumb_func_start ov21_021D4DA0 +ov21_021D4DA0: ; 0x021D4DA0 + ldr r3, _021D4DA8 ; =sub_0201A928 + mov r1, #1 + bx r3 + nop +_021D4DA8: .word sub_0201A928 + thumb_func_end ov21_021D4DA0 + + thumb_func_start ov21_021D4DAC +ov21_021D4DAC: ; 0x021D4DAC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r3, #0 + add r6, r1, #0 + ldr r3, [r5, #0x14] + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + add r5, r0, #0 + bne _021D4DC8 + bl sub_02022974 +_021D4DC8: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x20] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D4E0C ; =0x00030201 + mov r1, #2 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r6, #0 + add r2, r4, #0 + bl sub_0201D78C + mov r0, #2 + add r1, r4, #0 + mov r2, #0 + bl sub_02002D7C + add r6, r0, #0 + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_0200B190 + add r0, r6, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D4E0C: .word 0x00030201 + thumb_func_end ov21_021D4DAC + + thumb_func_start ov21_021D4E10 +ov21_021D4E10: ; 0x021D4E10 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r0, #0 + add r6, r3, #0 + add r5, r1, #0 + ldr r3, [r4, #0x14] + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + add r4, r0, #0 + bne _021D4E2C + bl sub_02022974 +_021D4E2C: + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #2 + add r1, r7, #0 + mov r2, #0 + bl sub_02002D7C + add r6, r0, #0 + add r0, r5, #0 + bl sub_0201C294 + lsl r0, r0, #3 + mov r1, #0 + sub r3, r0, r6 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D4E7C ; =0x00030201 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r5, #0 + lsr r5, r3, #0x1f + add r5, r3, r5 + str r1, [sp, #0xc] + mov r1, #2 + asr r3, r5, #1 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B190 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D4E7C: .word 0x00030201 + thumb_func_end ov21_021D4E10 + + thumb_func_start ov21_021D4E80 +ov21_021D4E80: ; 0x021D4E80 + push {r3, lr} + sub sp, #0x10 + ldr r0, [sp, #0x18] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D4EA0 ; =0x00030201 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r1, #0 + mov r1, #2 + bl sub_0201D78C + add sp, #0x10 + pop {r3, pc} + ; .align 2, 0 +_021D4EA0: .word 0x00030201 + thumb_func_end ov21_021D4E80 + + thumb_func_start ov21_021D4EA4 +ov21_021D4EA4: ; 0x021D4EA4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D4EAE + mov r0, #1 + bx lr +_021D4EAE: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D4EA4 + + thumb_func_start ov21_021D4EB4 +ov21_021D4EB4: ; 0x021D4EB4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + mov r6, #0 + cmp r0, #0 + ble _021D4EE0 + add r4, r6, #0 +_021D4EC2: + ldr r0, [r5, #0xc] + add r0, r0, r4 + bl ov21_021D4EA4 + cmp r0, #0 + bne _021D4ED6 + ldr r1, [r5, #0xc] + lsl r0, r6, #4 + add r0, r1, r0 + pop {r4, r5, r6, pc} +_021D4ED6: + ldr r0, [r5, #0x10] + add r6, r6, #1 + add r4, #0x10 + cmp r6, r0 + blt _021D4EC2 +_021D4EE0: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D4EB4 \ No newline at end of file diff --git a/asm/ov21_021D4EE4.s b/asm/ov21_021D4EE4.s new file mode 100644 index 000000000..e4c4bb892 --- /dev/null +++ b/asm/ov21_021D4EE4.s @@ -0,0 +1,418 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D4EE4 +ov21_021D4EE4: ; 0x021D4EE4 + push {r3, lr} + mov r1, #0x14 + bl sub_02018144 + add r3, r0, #0 + mov r2, #0x14 + mov r1, #0 +_021D4EF2: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _021D4EF2 + pop {r3, pc} + thumb_func_end ov21_021D4EE4 + + thumb_func_start ov21_021D4EFC +ov21_021D4EFC: ; 0x021D4EFC + ldr r3, _021D4F00 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021D4F00: .word sub_020181C4 + thumb_func_end ov21_021D4EFC + + thumb_func_start ov21_021D4F04 +ov21_021D4F04: ; 0x021D4F04 + push {r3, r4, r5, r6} + add r6, r0, #0 + mov r5, #0x14 + mov r4, #0 +_021D4F0C: + strb r4, [r6] + add r6, r6, #1 + sub r5, r5, #1 + bne _021D4F0C + str r1, [r0, #0] + str r2, [r0, #4] + str r3, [r0, #8] + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D4F04 + + thumb_func_start ov21_021D4F20 +ov21_021D4F20: ; 0x021D4F20 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #4 + bhi _021D4F7A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D4F36: ; jump table + .short _021D4F40 - _021D4F36 - 2 ; case 0 + .short _021D4F48 - _021D4F36 - 2 ; case 1 + .short _021D4F50 - _021D4F36 - 2 ; case 2 + .short _021D4F62 - _021D4F36 - 2 ; case 3 + .short _021D4F74 - _021D4F36 - 2 ; case 4 +_021D4F40: + add r1, r4, #0 + bl ov21_021D50E0 + pop {r3, r4, r5, pc} +_021D4F48: + add r1, r4, #0 + bl ov21_021D5110 + pop {r3, r4, r5, pc} +_021D4F50: + cmp r4, #0 + blt _021D4F5A + ldr r0, [r5, #4] + cmp r4, r0 + blt _021D4F5E +_021D4F5A: + bl sub_02022974 +_021D4F5E: + str r4, [r5, #0xc] + pop {r3, r4, r5, pc} +_021D4F62: + cmp r4, #0 + blt _021D4F6C + ldr r0, [r5, #8] + cmp r4, r0 + blt _021D4F70 +_021D4F6C: + bl sub_02022974 +_021D4F70: + str r4, [r5, #0x10] + pop {r3, r4, r5, pc} +_021D4F74: + add r1, r4, #0 + bl ov21_021D5140 +_021D4F7A: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D4F20 + + thumb_func_start ov21_021D4F7C +ov21_021D4F7C: ; 0x021D4F7C + ldr r2, [r0, #0x10] + ldr r1, [r0, #4] + add r3, r2, #0 + mul r3, r1 + ldr r1, [r0, #0xc] + add r2, r3, r1 + ldr r1, [r0, #0] + mov r0, #0x1c + mul r0, r2 + add r0, r1, r0 + ldr r0, [r0, #0x18] + bx lr + thumb_func_end ov21_021D4F7C + + thumb_func_start ov21_021D4F94 +ov21_021D4F94: ; 0x021D4F94 + push {r4, r5} + ldr r4, [r0, #0x10] + ldr r3, [r0, #4] + add r5, r4, #0 + mul r5, r3 + ldr r3, [r0, #0xc] + add r5, r5, r3 + mov r3, #0x1c + add r4, r5, #0 + mul r4, r3 + ldr r3, [r0, #0] + ldr r3, [r3, r4] + str r3, [r1, #0] + ldr r0, [r0, #0] + add r0, r0, r4 + ldr r0, [r0, #4] + str r0, [r2, #0] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D4F94 + + thumb_func_start ov21_021D4FBC +ov21_021D4FBC: ; 0x021D4FBC + push {r4, r5} + ldr r4, [r0, #0x10] + ldr r3, [r0, #4] + add r5, r4, #0 + mul r5, r3 + ldr r3, [r0, #0xc] + add r5, r5, r3 + mov r3, #0x1c + add r4, r5, #0 + mul r4, r3 + ldr r3, [r0, #0] + add r3, r3, r4 + ldr r3, [r3, #8] + str r3, [r1, #0] + ldr r0, [r0, #0] + add r0, r0, r4 + ldr r0, [r0, #0xc] + str r0, [r2, #0] + pop {r4, r5} + bx lr + thumb_func_end ov21_021D4FBC + + thumb_func_start ov21_021D4FE4 +ov21_021D4FE4: ; 0x021D4FE4 + str r1, [r0, #0] + str r2, [r0, #4] + ldr r1, [sp] + str r3, [r0, #8] + str r1, [r0, #0xc] + ldr r1, [sp, #4] + str r1, [r0, #0x10] + ldr r1, [sp, #8] + str r1, [r0, #0x14] + ldr r1, [sp, #0xc] + str r1, [r0, #0x18] + bx lr + thumb_func_end ov21_021D4FE4 + + thumb_func_start ov21_021D4FFC +ov21_021D4FFC: ; 0x021D4FFC + push {r3, r4, r5, r6} + ldr r4, [sp, #0x10] + cmp r0, #0 + beq _021D5008 + cmp r0, #2 + bne _021D5014 +_021D5008: + ldr r6, [sp, #0x14] + lsr r5, r6, #0x1f + add r5, r6, r5 + asr r5, r5, #1 + sub r3, r3, r5 + b _021D501E +_021D5014: + ldr r6, [sp, #0x14] + lsr r5, r6, #0x1f + add r5, r6, r5 + asr r5, r5, #1 + add r3, r3, r5 +_021D501E: + cmp r0, #1 + bhi _021D502E + ldr r5, [sp, #0x18] + lsr r0, r5, #0x1f + add r0, r5, r0 + asr r0, r0, #1 + sub r4, r4, r0 + b _021D5038 +_021D502E: + ldr r5, [sp, #0x18] + lsr r0, r5, #0x1f + add r0, r5, r0 + asr r0, r0, #1 + add r4, r4, r0 +_021D5038: + str r3, [r1, #0] + str r4, [r2, #0] + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov21_021D4FFC + + thumb_func_start ov21_021D5040 +ov21_021D5040: ; 0x021D5040 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0 + add r4, r1, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D5056 + cmp r4, #1 + beq _021D5056 + bl sub_02022974 +_021D5056: + ldr r0, [r5, #0xc] + mov r1, #0x1c +_021D505A: + add r0, r0, r4 + bmi _021D507A + ldr r2, [r5, #4] + cmp r0, r2 + bge _021D507A + ldr r3, [r5, #0x10] + ldr r2, [r5, #4] + mul r2, r3 + add r6, r2, r0 + add r2, r6, #0 + ldr r3, [r5, #0] + mul r2, r1 + add r6, r3, r2 + ldr r2, [r6, #0x10] + cmp r2, #2 + beq _021D505A +_021D507A: + cmp r0, #0 + blt _021D508C + ldr r1, [r5, #4] + cmp r0, r1 + bge _021D508C + ldr r1, [r6, #0x10] + cmp r1, #0 + bne _021D508C + str r0, [r5, #0xc] +_021D508C: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5040 + + thumb_func_start ov21_021D5090 +ov21_021D5090: ; 0x021D5090 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0 + add r4, r1, #0 + mvn r0, r0 + cmp r4, r0 + beq _021D50A6 + cmp r4, #1 + beq _021D50A6 + bl sub_02022974 +_021D50A6: + ldr r0, [r5, #0x10] + mov r1, #0x1c +_021D50AA: + add r0, r0, r4 + bmi _021D50CC + ldr r2, [r5, #8] + cmp r0, r2 + bge _021D50CC + ldr r2, [r5, #4] + add r3, r0, #0 + mul r3, r2 + ldr r2, [r5, #0xc] + add r6, r3, r2 + add r2, r6, #0 + ldr r3, [r5, #0] + mul r2, r1 + add r6, r3, r2 + ldr r2, [r6, #0x14] + cmp r2, #2 + beq _021D50AA +_021D50CC: + cmp r0, #0 + blt _021D50DE + ldr r1, [r5, #8] + cmp r0, r1 + bge _021D50DE + ldr r1, [r6, #0x10] + cmp r1, #0 + bne _021D50DE + str r0, [r5, #0x10] +_021D50DE: + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D5090 + + thumb_func_start ov21_021D50E0 +ov21_021D50E0: ; 0x021D50E0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + cmp r1, #0 + bge _021D50EC + neg r5, r1 + b _021D50EE +_021D50EC: + add r5, r1, #0 +_021D50EE: + add r0, r1, #0 + add r1, r5, #0 + bl sub_020E1F6C + add r7, r0, #0 + mov r4, #0 + cmp r5, #0 + ble _021D510C +_021D50FE: + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021D5040 + add r4, r4, #1 + cmp r4, r5 + blt _021D50FE +_021D510C: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D50E0 + + thumb_func_start ov21_021D5110 +ov21_021D5110: ; 0x021D5110 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + cmp r1, #0 + bge _021D511C + neg r5, r1 + b _021D511E +_021D511C: + add r5, r1, #0 +_021D511E: + add r0, r1, #0 + add r1, r5, #0 + bl sub_020E1F6C + add r7, r0, #0 + mov r4, #0 + cmp r5, #0 + ble _021D513C +_021D512E: + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021D5090 + add r4, r4, #1 + cmp r4, r5 + blt _021D512E +_021D513C: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5110 + + thumb_func_start ov21_021D5140 +ov21_021D5140: ; 0x021D5140 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r2, [r4, #4] + ldr r0, [r4, #8] + add r3, r2, #0 + mul r3, r0 + mov r5, #0 + cmp r3, #0 + ble _021D5178 + ldr r6, [r4, #0] +_021D5154: + ldr r0, [r6, #0x18] + cmp r1, r0 + bne _021D5170 + add r0, r5, #0 + add r1, r2, #0 + bl sub_020E1F6C + str r1, [r4, #0xc] + ldr r1, [r4, #4] + add r0, r5, #0 + bl sub_020E1F6C + str r0, [r4, #0x10] + pop {r4, r5, r6, pc} +_021D5170: + add r5, r5, #1 + add r6, #0x1c + cmp r5, r3 + blt _021D5154 +_021D5178: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5140 \ No newline at end of file diff --git a/asm/ov21_021D517C.s b/asm/ov21_021D517C.s new file mode 100644 index 000000000..1abb3ee8d --- /dev/null +++ b/asm/ov21_021D517C.s @@ -0,0 +1,685 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D517C +ov21_021D517C: ; 0x021D517C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + str r0, [sp, #0x10] + ldr r0, [sp, #0x5c] + str r2, [sp, #0x18] + str r1, [sp, #0x14] + str r0, [sp, #0x5c] + mov r0, #0 + str r3, [sp, #0x1c] + add r1, sp, #0x48 + str r0, [sp, #0x38] + ldrb r0, [r1, #0x1c] + str r0, [sp, #0x20] + cmp r0, #0 + ble _021D5210 + ldr r0, [sp, #0x38] + ldrb r6, [r1, #0x10] + str r0, [sp, #0x34] + str r0, [sp, #0x30] + ldrh r0, [r1, #0x24] + str r0, [sp, #0x2c] + ldrh r0, [r1, #0x20] + str r0, [sp, #0x28] + ldrb r0, [r1, #0x18] + str r0, [sp, #0x24] +_021D51AE: + ldr r0, [sp, #0x24] + mov r7, #0 + cmp r0, #0 + ble _021D51F6 + ldr r1, [sp, #0x5c] + ldr r0, [sp, #0x30] + add r4, r7, #0 + add r5, r1, r0 + ldr r1, [sp, #0x2c] + ldr r0, [sp, #0x34] + add r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x3c] +_021D51CA: + str r6, [sp] + ldrb r0, [r5] + ldr r1, [sp, #0x14] + str r0, [sp, #4] + ldr r0, [sp, #0x28] + add r0, r0, r4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [sp, #0x3c] + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x18] + ldr r3, [sp, #0x1c] + bl ov21_021D5248 + ldr r0, [sp, #0x24] + add r7, r7, #1 + add r4, r4, r6 + add r5, r5, #1 + cmp r7, r0 + blt _021D51CA +_021D51F6: + ldr r0, [sp, #0x34] + ldr r1, [sp, #0x30] + add r0, r0, r6 + str r0, [sp, #0x34] + ldr r0, [sp, #0x20] + add r0, r1, r0 + str r0, [sp, #0x30] + ldr r0, [sp, #0x38] + add r1, r0, #1 + ldr r0, [sp, #0x20] + str r1, [sp, #0x38] + cmp r1, r0 + blt _021D51AE +_021D5210: + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D517C + + thumb_func_start ov21_021D5214 +ov21_021D5214: ; 0x021D5214 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r2, #0 + str r0, [sp, #4] + add r5, r1, #0 + mov r6, #0 + cmp r7, #0 + ble _021D5244 +_021D5224: + mov r4, #0 + cmp r5, #0 + ble _021D523E +_021D522A: + ldr r0, [sp, #4] + add r1, r4, #0 + add r2, r6, #0 + add r3, r5, #0 + str r7, [sp] + bl ov21_021D52A0 + add r4, r4, #1 + cmp r4, r5 + blt _021D522A +_021D523E: + add r6, r6, #1 + cmp r6, r7 + blt _021D5224 +_021D5244: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D5214 + + thumb_func_start ov21_021D5248 +ov21_021D5248: ; 0x021D5248 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r1, [sp, #0x1c] + ldr r1, [sp, #0x3c] + str r0, [sp, #0x18] + add r5, r2, #0 + add r6, r3, #0 + cmp r1, #0 + beq _021D529C + ldr r0, [sp, #0x38] + add r4, r1, #0 + mul r4, r0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_020E1F6C + add r7, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_020E1F6C + str r5, [sp] + add r4, r1, #0 + str r6, [sp, #4] + add r0, sp, #0x28 + ldrb r1, [r0, #0x18] + lsl r2, r4, #0x10 + lsl r3, r7, #0x10 + str r1, [sp, #8] + ldrb r0, [r0, #0x1c] + ldr r1, [sp, #0x1c] + lsr r2, r2, #0x10 + str r0, [sp, #0xc] + ldr r0, [sp, #0x38] + lsr r3, r3, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + bl sub_0201ADDC +_021D529C: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D5248 + + thumb_func_start ov21_021D52A0 +ov21_021D52A0: ; 0x021D52A0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r2, #0 + add r6, r1, #0 + add r1, r7, #0 + mul r1, r3 + add r4, r0, #0 + add r5, r6, r1 + ldrb r1, [r4, r5] + cmp r1, #0 + bne _021D52CE + ldr r1, [sp, #0x20] + str r3, [sp] + str r1, [sp, #4] + add r1, sp, #8 + add r2, r6, #0 + add r3, r7, #0 + bl ov21_021D5304 + ldr r0, [sp, #8] + bl ov21_021D5424 + strb r0, [r4, r5] +_021D52CE: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D52A0 + + thumb_func_start ov21_021D52D4 +ov21_021D52D4: ; 0x021D52D4 + push {r3, r4} + cmp r1, #0 + blt _021D52DE + cmp r1, r3 + blt _021D52E6 +_021D52DE: + mov r0, #0 + mvn r0, r0 + pop {r3, r4} + bx lr +_021D52E6: + cmp r2, #0 + blt _021D52F0 + ldr r4, [sp, #8] + cmp r2, r4 + blt _021D52F8 +_021D52F0: + mov r0, #0 + mvn r0, r0 + pop {r3, r4} + bx lr +_021D52F8: + mul r3, r2 + add r1, r1, r3 + ldrb r0, [r0, r1] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D52D4 + + thumb_func_start ov21_021D5304 +ov21_021D5304: ; 0x021D5304 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, [sp, #0x20] + add r6, r2, #0 + str r1, [sp, #0x20] + add r7, r3, #0 + mov r1, #0 + str r1, [r5, #0] + ldr r4, [sp, #0x24] + ldr r3, [sp, #0x20] + add r1, r6, #0 + sub r2, r7, #1 + str r0, [sp, #4] + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D5332 + ldr r1, [r5, #0] + mov r0, #1 + orr r0, r1 + str r0, [r5, #0] +_021D5332: + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r6, #0 + add r2, r7, #1 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D534C + ldr r1, [r5, #0] + mov r0, #2 + orr r0, r1 + str r0, [r5, #0] +_021D534C: + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + sub r1, r6, #1 + add r2, r7, #0 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D5366 + ldr r1, [r5, #0] + mov r0, #4 + orr r0, r1 + str r0, [r5, #0] +_021D5366: + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r6, #1 + add r2, r7, #0 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D5380 + ldr r1, [r5, #0] + mov r0, #8 + orr r0, r1 + str r0, [r5, #0] +_021D5380: + ldr r0, [r5, #0] + mov r1, #1 + tst r1, r0 + bne _021D53A8 + mov r1, #4 + tst r0, r1 + bne _021D53A8 + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + sub r1, r6, #1 + sub r2, r7, #1 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D53A8 + ldr r1, [r5, #0] + mov r0, #0x10 + orr r0, r1 + str r0, [r5, #0] +_021D53A8: + ldr r0, [r5, #0] + mov r1, #1 + tst r1, r0 + bne _021D53D0 + mov r1, #8 + tst r0, r1 + bne _021D53D0 + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r6, #1 + sub r2, r7, #1 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D53D0 + ldr r1, [r5, #0] + mov r0, #0x20 + orr r0, r1 + str r0, [r5, #0] +_021D53D0: + ldr r0, [r5, #0] + mov r1, #2 + tst r1, r0 + bne _021D53F8 + mov r1, #4 + tst r0, r1 + bne _021D53F8 + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + sub r1, r6, #1 + add r2, r7, #1 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D53F8 + ldr r1, [r5, #0] + mov r0, #0x40 + orr r0, r1 + str r0, [r5, #0] +_021D53F8: + ldr r0, [r5, #0] + mov r1, #2 + tst r1, r0 + bne _021D5420 + mov r1, #8 + tst r0, r1 + bne _021D5420 + ldr r0, [sp, #4] + ldr r3, [sp, #0x20] + add r1, r6, #1 + add r2, r7, #1 + str r4, [sp] + bl ov21_021D52D4 + cmp r0, #1 + bne _021D5420 + ldr r1, [r5, #0] + mov r0, #0x80 + orr r0, r1 + str r0, [r5, #0] +_021D5420: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D5304 + + thumb_func_start ov21_021D5424 +ov21_021D5424: ; 0x021D5424 + push {r4, lr} + cmp r0, #0x84 + bgt _021D54FA + blt _021D542E + b _021D55EC +_021D542E: + cmp r0, #0x58 + bgt _021D54E0 + blt _021D5436 + b _021D55C4 +_021D5436: + cmp r0, #0x48 + bgt _021D54D2 + blt _021D543E + b _021D55F4 +_021D543E: + cmp r0, #0x41 + bhi _021D54D8 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D544E: ; jump table + .short _021D553C - _021D544E - 2 ; case 0 + .short _021D5540 - _021D544E - 2 ; case 1 + .short _021D5544 - _021D544E - 2 ; case 2 + .short _021D5550 - _021D544E - 2 ; case 3 + .short _021D5548 - _021D544E - 2 ; case 4 + .short _021D5554 - _021D544E - 2 ; case 5 + .short _021D555C - _021D544E - 2 ; case 6 + .short _021D5568 - _021D544E - 2 ; case 7 + .short _021D554C - _021D544E - 2 ; case 8 + .short _021D5558 - _021D544E - 2 ; case 9 + .short _021D5560 - _021D544E - 2 ; case 10 + .short _021D556C - _021D544E - 2 ; case 11 + .short _021D5564 - _021D544E - 2 ; case 12 + .short _021D5570 - _021D544E - 2 ; case 13 + .short _021D5574 - _021D544E - 2 ; case 14 + .short _021D5578 - _021D544E - 2 ; case 15 + .short _021D557C - _021D544E - 2 ; case 16 + .short _021D55F8 - _021D544E - 2 ; case 17 + .short _021D55E0 - _021D544E - 2 ; case 18 + .short _021D55F8 - _021D544E - 2 ; case 19 + .short _021D55F8 - _021D544E - 2 ; case 20 + .short _021D55F8 - _021D544E - 2 ; case 21 + .short _021D55F8 - _021D544E - 2 ; case 22 + .short _021D55F8 - _021D544E - 2 ; case 23 + .short _021D55F0 - _021D544E - 2 ; case 24 + .short _021D55F8 - _021D544E - 2 ; case 25 + .short _021D55D4 - _021D544E - 2 ; case 26 + .short _021D55F8 - _021D544E - 2 ; case 27 + .short _021D55F8 - _021D544E - 2 ; case 28 + .short _021D55F8 - _021D544E - 2 ; case 29 + .short _021D55F8 - _021D544E - 2 ; case 30 + .short _021D55F8 - _021D544E - 2 ; case 31 + .short _021D5580 - _021D544E - 2 ; case 32 + .short _021D55F8 - _021D544E - 2 ; case 33 + .short _021D55E4 - _021D544E - 2 ; case 34 + .short _021D55F8 - _021D544E - 2 ; case 35 + .short _021D55E8 - _021D544E - 2 ; case 36 + .short _021D55F8 - _021D544E - 2 ; case 37 + .short _021D55D0 - _021D544E - 2 ; case 38 + .short _021D55F8 - _021D544E - 2 ; case 39 + .short _021D55F8 - _021D544E - 2 ; case 40 + .short _021D55F8 - _021D544E - 2 ; case 41 + .short _021D55F8 - _021D544E - 2 ; case 42 + .short _021D55F8 - _021D544E - 2 ; case 43 + .short _021D55F8 - _021D544E - 2 ; case 44 + .short _021D55F8 - _021D544E - 2 ; case 45 + .short _021D55F8 - _021D544E - 2 ; case 46 + .short _021D55F8 - _021D544E - 2 ; case 47 + .short _021D558C - _021D544E - 2 ; case 48 + .short _021D55F8 - _021D544E - 2 ; case 49 + .short _021D55BC - _021D544E - 2 ; case 50 + .short _021D55F8 - _021D544E - 2 ; case 51 + .short _021D55F8 - _021D544E - 2 ; case 52 + .short _021D55F8 - _021D544E - 2 ; case 53 + .short _021D55F8 - _021D544E - 2 ; case 54 + .short _021D55F8 - _021D544E - 2 ; case 55 + .short _021D55F8 - _021D544E - 2 ; case 56 + .short _021D55F8 - _021D544E - 2 ; case 57 + .short _021D55F8 - _021D544E - 2 ; case 58 + .short _021D55F8 - _021D544E - 2 ; case 59 + .short _021D55F8 - _021D544E - 2 ; case 60 + .short _021D55F8 - _021D544E - 2 ; case 61 + .short _021D55F8 - _021D544E - 2 ; case 62 + .short _021D55F8 - _021D544E - 2 ; case 63 + .short _021D5584 - _021D544E - 2 ; case 64 + .short _021D55D8 - _021D544E - 2 ; case 65 +_021D54D2: + cmp r0, #0x49 + bgt _021D54DA + beq _021D55CC +_021D54D8: + b _021D55F8 +_021D54DA: + cmp r0, #0x50 + beq _021D5590 + b _021D55F8 +_021D54E0: + cmp r0, #0x70 + bgt _021D54EC + bge _021D55A4 + cmp r0, #0x60 + beq _021D5598 + b _021D55F8 +_021D54EC: + cmp r0, #0x80 + bgt _021D54F4 + beq _021D5588 + b _021D55F8 +_021D54F4: + cmp r0, #0x81 + beq _021D55DC + b _021D55F8 +_021D54FA: + cmp r0, #0xb0 + bgt _021D551A + bge _021D55A8 + cmp r0, #0x90 + bgt _021D550C + bge _021D5594 + cmp r0, #0x85 + beq _021D55C8 + b _021D55F8 +_021D550C: + cmp r0, #0xa0 + bgt _021D5514 + beq _021D559C + b _021D55F8 +_021D5514: + cmp r0, #0xa4 + beq _021D55C0 + b _021D55F8 +_021D551A: + cmp r0, #0xd0 + bgt _021D552E + bge _021D55AC + cmp r0, #0xc0 + bgt _021D5528 + beq _021D55A0 + b _021D55F8 +_021D5528: + cmp r0, #0xc1 + beq _021D55B8 + b _021D55F8 +_021D552E: + cmp r0, #0xe0 + bgt _021D5536 + beq _021D55B0 + b _021D55F8 +_021D5536: + cmp r0, #0xf0 + beq _021D55B4 + b _021D55F8 +_021D553C: + mov r4, #0 + b _021D55FC +_021D5540: + mov r4, #2 + b _021D55FC +_021D5544: + mov r4, #3 + b _021D55FC +_021D5548: + mov r4, #4 + b _021D55FC +_021D554C: + mov r4, #5 + b _021D55FC +_021D5550: + mov r4, #6 + b _021D55FC +_021D5554: + mov r4, #7 + b _021D55FC +_021D5558: + mov r4, #8 + b _021D55FC +_021D555C: + mov r4, #9 + b _021D55FC +_021D5560: + mov r4, #0xa + b _021D55FC +_021D5564: + mov r4, #0xb + b _021D55FC +_021D5568: + mov r4, #0xc + b _021D55FC +_021D556C: + mov r4, #0xd + b _021D55FC +_021D5570: + mov r4, #0xe + b _021D55FC +_021D5574: + mov r4, #0xf + b _021D55FC +_021D5578: + mov r4, #0x10 + b _021D55FC +_021D557C: + mov r4, #0x11 + b _021D55FC +_021D5580: + mov r4, #0x12 + b _021D55FC +_021D5584: + mov r4, #0x13 + b _021D55FC +_021D5588: + mov r4, #0x14 + b _021D55FC +_021D558C: + mov r4, #0x15 + b _021D55FC +_021D5590: + mov r4, #0x16 + b _021D55FC +_021D5594: + mov r4, #0x17 + b _021D55FC +_021D5598: + mov r4, #0x18 + b _021D55FC +_021D559C: + mov r4, #0x19 + b _021D55FC +_021D55A0: + mov r4, #0x1a + b _021D55FC +_021D55A4: + mov r4, #0x1b + b _021D55FC +_021D55A8: + mov r4, #0x1c + b _021D55FC +_021D55AC: + mov r4, #0x1d + b _021D55FC +_021D55B0: + mov r4, #0x1e + b _021D55FC +_021D55B4: + mov r4, #0x1f + b _021D55FC +_021D55B8: + mov r4, #0x20 + b _021D55FC +_021D55BC: + mov r4, #0x21 + b _021D55FC +_021D55C0: + mov r4, #0x22 + b _021D55FC +_021D55C4: + mov r4, #0x23 + b _021D55FC +_021D55C8: + mov r4, #0x24 + b _021D55FC +_021D55CC: + mov r4, #0x25 + b _021D55FC +_021D55D0: + mov r4, #0x26 + b _021D55FC +_021D55D4: + mov r4, #0x27 + b _021D55FC +_021D55D8: + mov r4, #0x28 + b _021D55FC +_021D55DC: + mov r4, #0x29 + b _021D55FC +_021D55E0: + mov r4, #0x2a + b _021D55FC +_021D55E4: + mov r4, #0x2b + b _021D55FC +_021D55E8: + mov r4, #0x2c + b _021D55FC +_021D55EC: + mov r4, #0x2d + b _021D55FC +_021D55F0: + mov r4, #0x2e + b _021D55FC +_021D55F4: + mov r4, #0x2f + b _021D55FC +_021D55F8: + bl sub_02022974 +_021D55FC: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov21_021D5424 \ No newline at end of file diff --git a/asm/ov21_021D5600.s b/asm/ov21_021D5600.s new file mode 100644 index 000000000..74a561b5c --- /dev/null +++ b/asm/ov21_021D5600.s @@ -0,0 +1,263 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D5600 +ov21_021D5600: ; 0x021D5600 + ldr r3, _021D5604 ; =sub_020237BC + bx r3 + ; .align 2, 0 +_021D5604: .word sub_020237BC + thumb_func_end ov21_021D5600 + + thumb_func_start ov21_021D5608 +ov21_021D5608: ; 0x021D5608 + add r1, r0, #1 + ldr r0, _021D5614 ; =0x021E9CC4 + ldr r3, _021D5618 ; =sub_020986E8 + ldrb r0, [r0, r1] + bx r3 + nop +_021D5614: .word 0x021E9CC4 +_021D5618: .word sub_020986E8 + thumb_func_end ov21_021D5608 + + thumb_func_start ov21_021D561C +ov21_021D561C: ; 0x021D561C + push {r4, r5, r6, lr} + sub sp, #0x28 + add r4, r2, #0 + add r2, sp, #4 + str r2, [sp] + add r2, sp, #0xc + add r3, sp, #8 + add r5, r0, #0 + bl ov21_021D5764 + ldr r2, [sp, #4] + cmp r2, #6 + bne _021D5642 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200B32C + add sp, #0x28 + pop {r4, r5, r6, pc} +_021D5642: + ldr r6, _021D5668 ; =0x021E9CCC + add r5, sp, #0x10 + add r3, r5, #0 + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + lsl r0, r2, #2 + ldr r1, [sp, #0xc] + ldr r0, [r3, r0] + add r2, r4, #0 + str r1, [sp, #4] + bl ov21_021D5724 + add sp, #0x28 + pop {r4, r5, r6, pc} + nop +_021D5668: .word 0x021E9CCC + thumb_func_end ov21_021D561C + + thumb_func_start ov21_021D566C +ov21_021D566C: ; 0x021D566C + push {r4, r5, r6, lr} + sub sp, #0x28 + add r4, r2, #0 + add r2, sp, #4 + str r2, [sp] + add r2, sp, #0xc + add r3, sp, #8 + add r5, r0, #0 + bl ov21_021D5764 + ldr r2, [sp, #4] + cmp r2, #6 + bne _021D568C + str r5, [sp, #4] + ldr r0, _021D56B4 ; =0x000002C7 + b _021D56A6 +_021D568C: + ldr r6, _021D56B8 ; =0x021E9CE4 + add r5, sp, #0x10 + add r3, r5, #0 + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + lsl r0, r2, #2 + ldr r1, [sp, #0xc] + ldr r0, [r3, r0] + str r1, [sp, #4] +_021D56A6: + ldr r1, [sp, #4] + add r2, r4, #0 + bl ov21_021D5724 + add sp, #0x28 + pop {r4, r5, r6, pc} + nop +_021D56B4: .word 0x000002C7 +_021D56B8: .word 0x021E9CE4 + thumb_func_end ov21_021D566C + + thumb_func_start ov21_021D56BC +ov21_021D56BC: ; 0x021D56BC + push {r4, r5, r6, lr} + sub sp, #0x28 + add r4, r2, #0 + add r2, sp, #4 + add r6, r3, #0 + str r2, [sp] + add r2, sp, #0xc + add r3, sp, #8 + add r5, r0, #0 + bl ov21_021D5764 + ldr r0, [sp, #4] + cmp r0, #6 + bne _021D56E8 + cmp r4, #1 + blt _021D56E0 + bl sub_02022974 +_021D56E0: + add r0, r5, r4 + str r0, [sp, #4] + ldr r0, _021D571C ; =0x000002C2 + b _021D570E +_021D56E8: + ldr r3, _021D5720 ; =0x021E9CFC + add r2, sp, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + cmp r4, #1 + blt _021D5700 + bl sub_02022974 +_021D5700: + ldr r0, [sp, #4] + lsl r1, r0, #2 + add r0, sp, #0x10 + ldr r0, [r0, r1] + ldr r1, [sp, #0xc] + add r1, r1, r4 + str r1, [sp, #4] +_021D570E: + ldr r1, [sp, #4] + add r2, r6, #0 + bl ov21_021D5724 + add sp, #0x28 + pop {r4, r5, r6, pc} + nop +_021D571C: .word 0x000002C2 +_021D5720: .word 0x021E9CFC + thumb_func_end ov21_021D56BC + + thumb_func_start ov21_021D5724 +ov21_021D5724: ; 0x021D5724 + push {r4, r5, r6, lr} + add r3, r0, #0 + add r5, r2, #0 + add r6, r1, #0 + add r2, r3, #0 + mov r0, #1 + mov r1, #0x1a + add r3, r5, #0 + bl sub_0200B144 + add r4, r0, #0 + beq _021D575E + mov r0, #1 + lsl r0, r0, #8 + add r1, r5, #0 + bl sub_02023790 + add r5, r0, #0 + beq _021D5754 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl sub_0200B1B8 +_021D5754: + add r0, r4, #0 + bl sub_0200B190 + add r0, r5, #0 + pop {r4, r5, r6, pc} +_021D575E: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5724 + + thumb_func_start ov21_021D5764 +ov21_021D5764: ; 0x021D5764 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + add r5, r3, #0 + ldr r6, [sp, #0x18] + bl sub_020986CC + str r0, [r5, #0] + cmp r0, #6 + blt _021D577E + bl sub_02022974 +_021D577E: + str r7, [r4, #0] + ldr r5, [r5, #0] + cmp r5, #6 + blt _021D578A + bl sub_02022974 +_021D578A: + cmp r5, #1 + bne _021D5790 + mov r5, #6 +_021D5790: + str r5, [r6, #0] + ldr r1, [r4, #0] + ldr r0, _021D57B0 ; =0x000001ED + cmp r1, r0 + ble _021D57A2 + cmp r5, #6 + beq _021D57A2 + mov r0, #0 + b _021D57A4 +_021D57A2: + mov r0, #1 +_021D57A4: + cmp r0, #0 + bne _021D57AC + bl sub_02022974 +_021D57AC: + pop {r3, r4, r5, r6, r7, pc} + nop +_021D57B0: .word 0x000001ED + thumb_func_end ov21_021D5764 + + .rodata + + + .global Unk_ov21_021E9CC4 +Unk_ov21_021E9CC4: ; 0x021E9CC4 + .incbin "incbin/overlay21_rodata.bin", 0x1A0, 0x1A8 - 0x1A0 + + .global Unk_ov21_021E9CCC +Unk_ov21_021E9CCC: ; 0x021E9CCC + .incbin "incbin/overlay21_rodata.bin", 0x1A8, 0x1C0 - 0x1A8 + + .global Unk_ov21_021E9CE4 +Unk_ov21_021E9CE4: ; 0x021E9CE4 + .incbin "incbin/overlay21_rodata.bin", 0x1C0, 0x1D8 - 0x1C0 + + .global Unk_ov21_021E9CFC +Unk_ov21_021E9CFC: ; 0x021E9CFC + .incbin "incbin/overlay21_rodata.bin", 0x1D8, 0x18 + diff --git a/asm/ov21_021D57B4.s b/asm/ov21_021D57B4.s new file mode 100644 index 000000000..92320ade4 --- /dev/null +++ b/asm/ov21_021D57B4.s @@ -0,0 +1,462 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D57B4 +ov21_021D57B4: ; 0x021D57B4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + cmp r2, #9 + bhi _021D5806 + add r0, r2, r2 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D57CA: ; jump table + .short _021D57DE - _021D57CA - 2 ; case 0 + .short _021D57E2 - _021D57CA - 2 ; case 1 + .short _021D57E6 - _021D57CA - 2 ; case 2 + .short _021D57EA - _021D57CA - 2 ; case 3 + .short _021D57EE - _021D57CA - 2 ; case 4 + .short _021D57F4 - _021D57CA - 2 ; case 5 + .short _021D57F8 - _021D57CA - 2 ; case 6 + .short _021D57FC - _021D57CA - 2 ; case 7 + .short _021D5800 - _021D57CA - 2 ; case 8 + .short _021D5804 - _021D57CA - 2 ; case 9 +_021D57DE: + mov r5, #4 + b _021D5806 +_021D57E2: + ldr r5, _021D5824 ; =0x000001F3 + b _021D5806 +_021D57E6: + ldr r5, _021D5828 ; =0x000003E2 + b _021D5806 +_021D57EA: + ldr r5, _021D582C ; =0x000005D1 + b _021D5806 +_021D57EE: + mov r5, #0x1f + lsl r5, r5, #6 + b _021D5806 +_021D57F4: + ldr r5, _021D5830 ; =0x000009AF + b _021D5806 +_021D57F8: + ldr r5, _021D5834 ; =0x00000B9E + b _021D5806 +_021D57FC: + ldr r5, _021D5838 ; =0x00000D8D + b _021D5806 +_021D5800: + ldr r5, _021D583C ; =0x00000F7C + b _021D5806 +_021D5804: + ldr r5, _021D5840 ; =0x0000116B +_021D5806: + mov r2, #0 + str r2, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0xbc + add r1, r5, r1 + bl sub_02007068 + str r0, [r4, #0] + ldr r0, [sp, #8] + lsr r0, r0, #2 + str r0, [r4, #4] + add sp, #0xc + pop {r4, r5, pc} + nop +_021D5824: .word 0x000001F3 +_021D5828: .word 0x000003E2 +_021D582C: .word 0x000005D1 +_021D5830: .word 0x000009AF +_021D5834: .word 0x00000B9E +_021D5838: .word 0x00000D8D +_021D583C: .word 0x00000F7C +_021D5840: .word 0x0000116B + thumb_func_end ov21_021D57B4 + + thumb_func_start ov21_021D5844 +ov21_021D5844: ; 0x021D5844 + push {r4, lr} + add r4, r0, #0 + bne _021D584E + bl sub_02022974 +_021D584E: + ldr r0, [r4, #0] + cmp r0, #0 + bne _021D5858 + bl sub_02022974 +_021D5858: + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5844 + + thumb_func_start ov21_021D5868 +ov21_021D5868: ; 0x021D5868 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0xbc + add r2, r1, #0 + bl sub_02007068 + cmp r4, #0 + beq _021D588A + ldr r1, [sp, #8] + lsr r1, r1, #2 + str r1, [r4, #0] +_021D588A: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5868 + + thumb_func_start ov21_021D5890 +ov21_021D5890: ; 0x021D5890 + push {r4, r5, lr} + sub sp, #0xc + mov r2, #0 + add r3, r0, #0 + add r4, r1, #0 + str r2, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0xbc + mov r1, #2 + bl sub_02007068 + add r5, r0, #0 + cmp r4, #0 + beq _021D58B8 + ldr r0, [sp, #8] + mov r1, #0x24 + bl sub_020E2178 + str r0, [r4, #0] +_021D58B8: + add r0, r5, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5890 + + thumb_func_start ov21_021D58C0 +ov21_021D58C0: ; 0x021D58C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r1, [sp, #4] + add r4, r3, #0 + str r0, [sp] + ldrb r1, [r4, #1] + ldrb r0, [r4, #3] + add r0, r1, r0 + cmp r0, r2 + blt _021D58D8 + bl sub_02022974 +_021D58D8: + ldrb r1, [r4] + ldrb r0, [r4, #2] + add r1, r1, r0 + ldr r0, [sp, #4] + cmp r1, r0 + blt _021D58E8 + bl sub_02022974 +_021D58E8: + ldrb r7, [r4, #1] + ldrb r0, [r4, #3] + add r0, r7, r0 + cmp r7, r0 + bge _021D5942 + ldr r0, [sp, #4] + mul r0, r7 + mov ip, r0 +_021D58F8: + ldrb r5, [r4] + ldrb r3, [r4, #2] + add r1, r5, #0 + add r0, r5, r3 + cmp r5, r0 + bge _021D592E + ldr r2, [sp] + mov r0, ip + add r0, r2, r0 + add r2, r0, r5 +_021D590C: + sub r6, r1, r5 + ldrb r5, [r4, #1] + ldrb r0, [r2] + add r1, r1, #1 + sub r5, r7, r5 + mul r5, r3 + add r3, r4, r6 + add r3, r5, r3 + ldrb r3, [r3, #4] + orr r0, r3 + strb r0, [r2] + ldrb r3, [r4, #2] + ldrb r5, [r4] + add r2, r2, #1 + add r0, r5, r3 + cmp r1, r0 + blt _021D590C +_021D592E: + ldr r0, [sp, #4] + mov r1, ip + add r0, r1, r0 + mov ip, r0 + ldrb r1, [r4, #1] + ldrb r0, [r4, #3] + add r7, r7, #1 + add r0, r1, r0 + cmp r7, r0 + blt _021D58F8 +_021D5942: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D58C0 + + thumb_func_start ov21_021D5948 +ov21_021D5948: ; 0x021D5948 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + ldr r0, [sp, #0x30] + str r3, [sp, #4] + str r0, [sp, #0x30] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x30] + ldr r5, [sp, #0x34] + ldr r0, [r0, #4] + ldr r4, [sp, #0x38] + sub r0, r0, #1 + cmp r0, #0 + ble _021D59D2 + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + lsl r0, r2, #0x18 + lsr r0, r0, #0x18 + ldr r7, [sp, #8] + str r0, [sp, #0x14] +_021D5976: + ldr r0, [sp, #0x30] + ldr r0, [r0, #0] + ldr r0, [r0, r7] + cmp r0, #0 + bne _021D5984 + bl sub_02022974 +_021D5984: + mov r1, #0 + cmp r4, #0 + bls _021D599C + ldr r0, [sp, #0x30] + ldr r0, [r0, #0] + ldr r2, [r0, r7] +_021D5990: + ldrb r0, [r5, r1] + cmp r2, r0 + beq _021D599C + add r1, r1, #1 + cmp r1, r4 + blo _021D5990 +_021D599C: + cmp r1, r4 + blo _021D59BE + ldr r3, [sp, #0x30] + mov r6, #0x24 + ldr r3, [r3, #0] + ldr r0, [sp] + ldr r3, [r3, r7] + ldr r1, [sp, #0x10] + mul r6, r3 + ldr r3, [sp, #4] + ldr r2, [sp, #0x14] + add r3, r3, r6 + bl ov21_021D58C0 + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_021D59BE: + ldr r0, [sp, #0xc] + add r7, r7, #4 + add r0, r0, #1 + str r0, [sp, #0xc] + ldr r0, [sp, #0x30] + ldr r0, [r0, #4] + sub r1, r0, #1 + ldr r0, [sp, #0xc] + cmp r0, r1 + blt _021D5976 +_021D59D2: + ldr r0, [sp, #8] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D5948 + + thumb_func_start ov21_021D59D8 +ov21_021D59D8: ; 0x021D59D8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r4, [sp, #0x24] + add r5, r0, #0 + ldrb r6, [r4] + mul r3, r6 + add r1, r1, r3 + str r1, [sp] + ldrb r6, [r4, #1] + ldr r3, [sp, #0x20] + lsl r1, r1, #0xc + mul r3, r6 + add r2, r2, r3 + str r1, [sp] + str r2, [sp, #4] + lsl r1, r2, #0xc + str r1, [sp, #4] + add r1, sp, #0 + bl sub_02021C50 + ldrb r0, [r4, #2] + cmp r0, #0 + beq _021D5A12 + ldr r1, [sp, #0x2c] + add r0, r5, #0 + bl sub_02021D6C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021D5A12: + ldr r1, [sp, #0x28] + add r0, r5, #0 + bl sub_02021D6C + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D59D8 + + thumb_func_start ov21_021D5A20 +ov21_021D5A20: ; 0x021D5A20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + mov ip, r0 + ldr r0, [sp, #0x40] + ldr r7, [sp, #0x50] + str r0, [sp, #0x40] + ldr r0, [sp, #0x44] + str r1, [sp, #0x10] + str r0, [sp, #0x44] + ldr r0, [sp, #0x48] + str r2, [sp, #0x14] + str r0, [sp, #0x48] + ldr r0, [sp, #0x4c] + str r3, [sp, #0x18] + str r0, [sp, #0x4c] + ldr r0, [sp, #0x54] + ldr r5, [sp, #0x5c] + str r0, [sp, #0x54] + ldr r0, [sp, #0x58] + ldr r4, [sp, #0x60] + str r0, [sp, #0x58] + mov r0, #0 + str r0, [sp, #0x20] + str r0, [sp, #0x24] + ldr r0, [r7, #4] + sub r0, r0, #1 + cmp r0, #0 + ble _021D5AE0 + add r0, r1, #0 + lsl r1, r0, #2 + mov r0, ip + add r0, r0, r1 + ldr r6, [sp, #0x20] + str r0, [sp, #0x1c] +_021D5A64: + ldr r0, [r7, #0] + ldr r0, [r0, r6] + cmp r0, #0 + bne _021D5A70 + bl sub_02022974 +_021D5A70: + ldr r1, [sp, #0x10] + ldr r0, [sp, #0x14] + cmp r1, r0 + blt _021D5A7C + bl sub_02022974 +_021D5A7C: + mov r1, #0 + cmp r4, #0 + bls _021D5A92 + ldr r0, [r7, #0] + ldr r2, [r0, r6] +_021D5A86: + ldrb r0, [r5, r1] + cmp r2, r0 + beq _021D5A92 + add r1, r1, #1 + cmp r1, r4 + blo _021D5A86 +_021D5A92: + cmp r1, r4 + blo _021D5ACE + ldr r0, [sp, #0x48] + ldr r2, [sp, #0x40] + str r0, [sp] + ldr r0, [r7, #0] + ldr r3, [sp, #0x44] + ldr r0, [r0, r6] + lsl r1, r0, #2 + ldr r0, [sp, #0x4c] + add r0, r0, r1 + str r0, [sp, #4] + ldr r0, [sp, #0x54] + ldr r1, [sp, #0x18] + str r0, [sp, #8] + ldr r0, [sp, #0x58] + str r0, [sp, #0xc] + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + bl ov21_021D59D8 + ldr r0, [sp, #0x1c] + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] +_021D5ACE: + ldr r0, [sp, #0x24] + add r6, r6, #4 + add r0, r0, #1 + str r0, [sp, #0x24] + ldr r0, [r7, #4] + sub r1, r0, #1 + ldr r0, [sp, #0x24] + cmp r0, r1 + blt _021D5A64 +_021D5AE0: + ldr r1, [sp, #0x64] + ldr r0, [sp, #0x20] + str r0, [r1, #0] + ldr r0, [sp, #0x10] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D5A20 \ No newline at end of file diff --git a/asm/ov21_021D5AEC.s b/asm/ov21_021D5AEC.s new file mode 100644 index 000000000..5e4e532d5 --- /dev/null +++ b/asm/ov21_021D5AEC.s @@ -0,0 +1,3622 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D5AEC +ov21_021D5AEC: ; 0x021D5AEC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021D5B90 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D5BE0 + add r7, r0, #0 + ldr r0, [sp] + add r1, r5, #0 + add r2, r4, #0 + bl ov21_021D5C1C + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021D5CB4 + str r0, [r5, #0x24] + ldr r0, _021D5B38 ; =ov21_021D5CB8 + str r0, [r5, #8] + ldr r0, _021D5B3C ; =ov21_021D5D04 + str r0, [r5, #0xc] + ldr r0, _021D5B40 ; =ov21_021D5D34 + str r0, [r5, #0x10] + ldr r0, _021D5B44 ; =ov21_021D5D48 + str r0, [r5, #0x14] + ldr r0, _021D5B48 ; =ov21_021D5E2C + str r0, [r5, #0x18] + ldr r0, _021D5B4C ; =ov21_021D5EA8 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + nop +_021D5B38: .word ov21_021D5CB8 +_021D5B3C: .word ov21_021D5D04 +_021D5B40: .word ov21_021D5D34 +_021D5B44: .word ov21_021D5D48 +_021D5B48: .word ov21_021D5E2C +_021D5B4C: .word ov21_021D5EA8 + thumb_func_end ov21_021D5AEC + + thumb_func_start ov21_021D5B50 +ov21_021D5B50: ; 0x021D5B50 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021D5BCC + ldr r0, [r4, #4] + bl ov21_021D5C08 + ldr r0, [r4, #0x20] + bl ov21_021D5C7C + pop {r4, pc} + thumb_func_end ov21_021D5B50 + + thumb_func_start ov21_021D5B68 +ov21_021D5B68: ; 0x021D5B68 + ldr r1, [r0, #0x24] + cmp r1, #1 + beq _021D5B86 + ldr r1, [r0, #0x28] + cmp r1, #1 + beq _021D5B86 + ldr r1, [r0, #0x2c] + cmp r1, #1 + beq _021D5B86 + ldr r1, [r0, #0x30] + cmp r1, #1 + beq _021D5B86 + ldr r0, [r0, #0x34] + cmp r0, #1 + bne _021D5B8A +_021D5B86: + mov r0, #0 + bx lr +_021D5B8A: + mov r0, #1 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D5B68 + + thumb_func_start ov21_021D5B90 +ov21_021D5B90: ; 0x021D5B90 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x38 + bl sub_02018144 + add r4, r0, #0 + bne _021D5BA2 + bl sub_02022974 +_021D5BA2: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x38 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0x10] + str r0, [r4, #0x14] + mov r0, #1 + str r0, [r4, #0x1c] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5B90 + + thumb_func_start ov21_021D5BCC +ov21_021D5BCC: ; 0x021D5BCC + push {r4, lr} + add r4, r0, #0 + bne _021D5BD6 + bl sub_02022974 +_021D5BD6: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5BCC + + thumb_func_start ov21_021D5BE0 +ov21_021D5BE0: ; 0x021D5BE0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021D5BF2 + bl sub_02022974 +_021D5BF2: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D5BE0 + + thumb_func_start ov21_021D5C08 +ov21_021D5C08: ; 0x021D5C08 + push {r4, lr} + add r4, r0, #0 + bne _021D5C12 + bl sub_02022974 +_021D5C12: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5C08 + + thumb_func_start ov21_021D5C1C +ov21_021D5C1C: ; 0x021D5C1C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + bl ov21_021D5CB4 + add r2, r0, #0 + mov r1, #0x14 + add r0, r5, #0 + mul r1, r2 + bl sub_02018144 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + mov r3, #1 + bl ov21_021D467C + add r1, r6, #0 + add r0, r5, #0 + add r1, #0x14 + add r2, r4, #0 + mov r3, #2 + bl ov21_021D475C + add r1, r6, #0 + add r0, r5, #0 + add r1, #0x28 + add r2, r4, #0 + mov r3, #4 + bl ov21_021D4704 + add r0, r6, #0 + add r0, #0x3c + add r1, r4, #0 + add r2, r5, #0 + mov r3, #8 + bl ov21_021D4878 + add r1, r6, #0 + add r0, r5, #0 + add r1, #0x50 + add r2, r4, #0 + mov r3, #0x10 + bl ov21_021D47F0 + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D5C1C + + thumb_func_start ov21_021D5C7C +ov21_021D5C7C: ; 0x021D5C7C + push {r4, lr} + add r4, r0, #0 + bne _021D5C86 + bl sub_02022974 +_021D5C86: + add r0, r4, #0 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x14 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x28 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x3c + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x50 + bl ov21_021D4660 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov21_021D5C7C + + thumb_func_start ov21_021D5CB4 +ov21_021D5CB4: ; 0x021D5CB4 + mov r0, #5 + bx lr + thumb_func_end ov21_021D5CB4 + + thumb_func_start ov21_021D5CB8 +ov21_021D5CB8: ; 0x021D5CB8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + mov r1, #0x24 + bl sub_02018144 + str r0, [r5, #8] + cmp r0, #0 + bne _021D5CD0 + bl sub_02022974 +_021D5CD0: + ldr r0, [r5, #8] + mov r1, #0 + mov r2, #0x24 + bl sub_020D5124 + ldr r1, [r5, #8] + add r0, r4, #0 + bl ov21_021D5F58 + ldr r0, [r4, #4] + bl ov21_021D38C0 + mov r1, #1 + str r1, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0x20] + ldr r0, [r4, #0x18] + cmp r0, #1 + bne _021D5CF8 + str r1, [r4, #0x10] +_021D5CF8: + add r0, r4, #0 + bl ov21_021D5FC4 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5CB8 + + thumb_func_start ov21_021D5D04 +ov21_021D5D04: ; 0x021D5D04 + push {r3, lr} + add r2, r0, #0 + ldr r0, [r2, #0xc] + ldr r3, [r2, #8] + cmp r0, #1 + bne _021D5D14 + mov r0, #1 + pop {r3, pc} +_021D5D14: + ldr r0, [r2, #0] + cmp r0, #0 + bne _021D5D24 + mov r0, #0 + str r0, [r1, #0x18] + mov r0, #1 + str r0, [r2, #0] + b _021D5D2E +_021D5D24: + ldr r2, [r2, #4] + add r0, r1, #0 + add r1, r3, #0 + bl ov21_021D5F7C +_021D5D2E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5D04 + + thumb_func_start ov21_021D5D34 +ov21_021D5D34: ; 0x021D5D34 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D5D34 + + thumb_func_start ov21_021D5D48 +ov21_021D5D48: ; 0x021D5D48 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r6, r2, #0 + ldr r7, [r4, #8] + cmp r0, #3 + bhi _021D5E20 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5D64: ; jump table + .short _021D5D6C - _021D5D64 - 2 ; case 0 + .short _021D5D9A - _021D5D64 - 2 ; case 1 + .short _021D5DE4 - _021D5D64 - 2 ; case 2 + .short _021D5E0C - _021D5D64 - 2 ; case 3 +_021D5D6C: + mov r1, #0x52 + ldr r0, [r4, #4] + lsl r1, r1, #2 + bl sub_02018144 + add r7, r0, #0 + bne _021D5D7E + bl sub_02022974 +_021D5D7E: + str r7, [r4, #8] + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D6C24 + ldr r1, [r5, #0] + add r0, r7, #0 + add r2, r6, #0 + bl ov21_021D68C8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5E24 +_021D5D9A: + mov r0, #0x5d + ldr r1, [r6, #4] + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #0 + bne _021D5DB2 + ldr r1, [r5, #0] + ldr r3, [r4, #4] + add r0, r7, #0 + bl ov21_021D6114 + b _021D5DBC +_021D5DB2: + ldr r1, [r5, #0] + ldr r3, [r4, #4] + add r0, r7, #0 + bl ov21_021D61F4 +_021D5DBC: + ldr r0, [r6, #0x14] + cmp r0, #0 + beq _021D5DD0 + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #1 + bl ov21_021D7248 + b _021D5DDC +_021D5DD0: + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #1 + bl ov21_021D71A8 +_021D5DDC: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5E24 +_021D5DE4: + ldr r0, [r6, #0x14] + cmp r0, #0 + beq _021D5DF6 + add r0, r7, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021D72D4 + b _021D5E00 +_021D5DF6: + add r0, r7, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021D71E4 +_021D5E00: + cmp r0, #0 + beq _021D5E24 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5E24 +_021D5E0C: + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D5E28 ; =0x04000050 + mov r1, #1 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D5E20: + bl sub_02022974 +_021D5E24: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D5E28: .word 0x04000050 + thumb_func_end ov21_021D5D48 + + thumb_func_start ov21_021D5E2C +ov21_021D5E2C: ; 0x021D5E2C + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + add r6, r0, #0 + add r7, r1, #0 + ldr r0, [r5, #0x1c] + ldr r4, [r7, #8] + cmp r0, #0 + bne _021D5E40 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D5E40: + ldr r0, [r5, #4] + bl ov21_021D3898 + mov r1, #0x51 + lsl r1, r1, #2 + ldr r2, [r4, r1] + cmp r2, r0 + beq _021D5E70 + str r0, [r4, r1] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D6A58 + ldr r1, [r6, #0] + ldr r3, [r7, #4] + add r0, r4, #0 + add r2, r5, #0 + bl ov21_021D6CC8 + ldr r1, [r6, #0] + add r0, r4, #0 + add r2, r5, #0 + bl ov21_021D68C8 +_021D5E70: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D69A0 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D6AE4 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D6BB0 + ldr r1, [r6, #0] + ldr r3, [r7, #4] + add r0, r4, #0 + add r2, r5, #0 + bl ov21_021D6C44 + ldr r1, [r6, #0] + add r0, r4, #0 + add r2, r5, #0 + bl ov21_021D6F20 + add r0, r5, #0 + bl ov21_021D6F74 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D5E2C + + thumb_func_start ov21_021D5EA8 +ov21_021D5EA8: ; 0x021D5EA8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021D5F4A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5EC4: ; jump table + .short _021D5ECC - _021D5EC4 - 2 ; case 0 + .short _021D5F08 - _021D5EC4 - 2 ; case 1 + .short _021D5F30 - _021D5EC4 - 2 ; case 2 + .short _021D5F46 - _021D5EC4 - 2 ; case 3 +_021D5ECC: + ldr r0, _021D5F54 ; =0x04000050 + mov r3, #0 + strh r3, [r0] + ldr r0, [r7, #0x14] + cmp r0, #0 + beq _021D5EF8 + ldr r1, [r5, #0] + ldr r3, [r4, #4] + add r0, r6, #0 + bl ov21_021D7160 + ldr r0, [r5, #0] + add r1, r7, #0 + bl ov21_021D6F64 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021D7248 + b _021D5F00 +_021D5EF8: + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021D71A8 +_021D5F00: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5F4E +_021D5F08: + ldr r0, [r7, #0x14] + cmp r0, #0 + beq _021D5F1A + add r0, r6, #0 + add r1, r5, #0 + mov r3, #0 + bl ov21_021D72D4 + b _021D5F24 +_021D5F1A: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #0 + bl ov21_021D71E4 +_021D5F24: + cmp r0, #0 + beq _021D5F4E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5F4E +_021D5F30: + ldr r1, [r5, #0] + add r0, r6, #0 + bl ov21_021D61D8 + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5F4E +_021D5F46: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D5F4A: + bl sub_02022974 +_021D5F4E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D5F54: .word 0x04000050 + thumb_func_end ov21_021D5EA8 + + thumb_func_start ov21_021D5F58 +ov21_021D5F58: ; 0x021D5F58 + mov r2, #0 + str r2, [r0, #8] + str r2, [r1, #0] + mov r0, #0x3c + str r0, [r1, #4] + mov r0, #4 + str r0, [r1, #8] + str r0, [r1, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D5F58 + + thumb_func_start ov21_021D5F6C +ov21_021D5F6C: ; 0x021D5F6C + mov r0, #0xa + lsl r0, r0, #6 + str r0, [r1, #4] + mov r0, #0 + str r0, [r1, #8] + str r0, [r1, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D5F6C + + thumb_func_start ov21_021D5F7C +ov21_021D5F7C: ; 0x021D5F7C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D601C + cmp r0, #1 + beq _021D5FC2 + add r0, r5, #0 + bl ov21_021D5FC4 + ldr r0, [r4, #0] + cmp r0, #0 + bne _021D5FAE + ldr r0, [r4, #0x14] + cmp r0, #1 + bne _021D5FA6 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D7590 + b _021D5FAE +_021D5FA6: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D75DC +_021D5FAE: + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _021D5FBC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D60A4 +_021D5FBC: + add r0, r5, #0 + bl ov21_021D5FD4 +_021D5FC2: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D5F7C + + thumb_func_start ov21_021D5FC4 +ov21_021D5FC4: ; 0x021D5FC4 + mov r1, #0 + str r1, [r0, #0x24] + str r1, [r0, #0x28] + str r1, [r0, #0x2c] + str r1, [r0, #0x30] + str r1, [r0, #0x34] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D5FC4 + + thumb_func_start ov21_021D5FD4 +ov21_021D5FD4: ; 0x021D5FD4 + ldr r1, _021D6018 ; =0x021BF67C + mov r2, #2 + ldr r1, [r1, #0x48] + tst r2, r1 + beq _021D5FF6 + mov r1, #0x5d + ldr r2, [r0, #4] + lsl r1, r1, #6 + ldr r1, [r2, r1] + cmp r1, #0 + bne _021D5FF0 + mov r1, #1 + str r1, [r0, #0x28] + bx lr +_021D5FF0: + mov r1, #1 + str r1, [r0, #0x24] + bx lr +_021D5FF6: + mov r3, #1 + add r2, r1, #0 + tst r2, r3 + beq _021D6002 + str r3, [r0, #0x2c] + bx lr +_021D6002: + lsl r2, r3, #0xa + tst r2, r1 + beq _021D600C + str r3, [r0, #0x34] + bx lr +_021D600C: + mov r2, #4 + tst r1, r2 + beq _021D6014 + str r3, [r0, #0x30] +_021D6014: + bx lr + nop +_021D6018: .word 0x021BF67C + thumb_func_end ov21_021D5FD4 + + thumb_func_start ov21_021D601C +ov21_021D601C: ; 0x021D601C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0x28] + add r4, r2, #0 + cmp r1, #0 + beq _021D6038 + bl ov21_021D744C + ldr r0, _021D609C ; =0x000005DD + bl sub_02005748 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D6038: + ldr r1, [r5, #0x24] + cmp r1, #0 + beq _021D604E + add r1, r4, #0 + bl ov21_021D7538 + ldr r0, _021D609C ; =0x000005DD + bl sub_02005748 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D604E: + ldr r0, [r5, #0x2c] + cmp r0, #0 + beq _021D607A + ldr r0, [r5, #4] + bl ov21_021D3898 + add r1, r0, #0 + ldr r0, [r5, #4] + bl ov21_021D38B0 + ldr r1, _021D60A0 ; =0x000001EE + cmp r0, r1 + beq _021D607A + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021D7464 + ldr r0, _021D609C ; =0x000005DD + bl sub_02005748 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D607A: + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021D6088 + add r0, r5, #0 + bl ov21_021D747C + pop {r4, r5, r6, pc} +_021D6088: + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021D6098 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D74B0 + pop {r4, r5, r6, pc} +_021D6098: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D609C: .word 0x000005DD +_021D60A0: .word 0x000001EE + thumb_func_end ov21_021D601C + + thumb_func_start ov21_021D60A4 +ov21_021D60A4: ; 0x021D60A4 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D60F4 + ldr r2, [r4, #4] + ldr r1, [r0, #0xc] + sub r1, r1, r2 + cmp r1, #0 + ble _021D60BC + str r1, [r0, #0xc] + pop {r4, pc} +_021D60BC: + mov r1, #0 + str r1, [r0, #0xc] + str r1, [r4, #0] + ldr r0, [r4, #0xc] + cmp r0, #0 + ble _021D60F4 + ldr r0, [r4, #8] + sub r0, r0, #1 + cmp r0, #0 + ble _021D60D4 + str r0, [r4, #8] + pop {r4, pc} +_021D60D4: + ldr r0, [r4, #4] + bl sub_020E17B4 + ldr r1, _021D60F8 ; =0x3FCCCCCD + bl sub_020E18B0 + bl sub_020E1740 + str r0, [r4, #4] + ldr r0, [r4, #0xc] + sub r1, r0, #1 + mov r0, #4 + sub r0, r0, r1 + str r1, [r4, #0xc] + lsl r0, r0, #2 + str r0, [r4, #8] +_021D60F4: + pop {r4, pc} + nop +_021D60F8: .word 0x3FCCCCCD + thumb_func_end ov21_021D60A4 + + thumb_func_start ov21_021D60FC +ov21_021D60FC: ; 0x021D60FC + mov r3, #0xa + lsl r3, r3, #6 + str r3, [r0, #0xc] + str r2, [r1, #0] + str r2, [r0, #8] + bx lr + thumb_func_end ov21_021D60FC + + thumb_func_start ov21_021D6108 +ov21_021D6108: ; 0x021D6108 + ldr r3, _021D6110 ; =ov21_021D3844 + ldr r0, [r0, #4] + bx r3 + nop +_021D6110: .word ov21_021D3844 + thumb_func_end ov21_021D6108 + + thumb_func_start ov21_021D6114 +ov21_021D6114: ; 0x021D6114 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + mov r1, #0 + add r5, r0, #0 + add r4, r2, #0 + add r7, r3, #0 + str r1, [sp] + add r0, r6, #0 + add r2, r1, #0 + add r3, r1, #0 + str r7, [sp, #4] + bl ov21_021D276C + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021D62E4 + ldr r0, [r4, #4] + bl ov21_021D36D8 + add r3, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021D637C + ldr r0, [r4, #4] + bl ov21_021D38FC + str r0, [sp, #8] + ldr r0, [r4, #4] + bl ov21_021D3908 + add r3, r0, #0 + ldr r2, [sp, #8] + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021D63DC + add r0, r5, #0 + add r1, r7, #0 + bl ov21_021D6538 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021D65DC + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021D6744 + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021D70C0 + str r0, [r5, #0x4c] + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov21_021D67EC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6994 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D69A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6AE4 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6B94 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6BB0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov21_021D6C44 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021D6F20 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021D6114 + + thumb_func_start ov21_021D61D8 +ov21_021D61D8: ; 0x021D61D8 + push {r4, lr} + add r4, r0, #0 + bl ov21_021D695C + add r0, r4, #0 + bl ov21_021D6580 + add r0, r4, #0 + bl ov21_021D6940 + add r0, r4, #0 + bl ov21_021D63C0 + pop {r4, pc} + thumb_func_end ov21_021D61D8 + + thumb_func_start ov21_021D61F4 +ov21_021D61F4: ; 0x021D61F4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r1, #0 + add r4, r2, #0 + mov r0, #0x20 + str r0, [sp] + add r6, r3, #0 + mov r2, #0 + add r0, r7, #0 + mov r1, #4 + add r3, r2, #0 + str r6, [sp, #4] + bl ov21_021D276C + add r0, r7, #0 + mov r1, #0 + add r2, sp, #0x10 + add r3, r6, #0 + bl ov21_021D27E0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + mov r1, #2 + ldr r0, [r0, #0xc] + lsl r1, r1, #8 + str r0, [sp, #8] + bl sub_020C2C54 + ldr r0, [sp, #8] + mov r2, #0x1e + add r0, #0x20 + mov r1, #0x20 + lsl r2, r2, #4 + str r0, [sp, #8] + bl sub_020C00B4 + ldr r0, [sp, #0xc] + bl sub_020181C4 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D62E4 + ldr r0, [r4, #4] + bl ov21_021D36D8 + add r3, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + bl ov21_021D637C + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021D6538 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + bl ov21_021D65DC + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + bl ov21_021D6744 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D70C0 + str r0, [r5, #0x4c] + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021D67EC + ldr r0, [r4, #4] + bl ov21_021D38FC + add r2, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021D64B0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6994 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D69A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6AE4 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6B94 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6BB0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021D6C44 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov21_021D6F20 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D61F4 + + thumb_func_start ov21_021D62E4 +ov21_021D62E4: ; 0x021D62E4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r5, r0, #0 + str r4, [sp, #0xc] + ldr r2, [r5, #0] + mov r1, #0x1c + mov r3, #3 + bl ov21_021D2724 + str r4, [sp] + add r0, r5, #0 + mov r1, #0x26 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + add r0, r5, #0 + mov r1, #0x27 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r4, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #4 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #1 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #3 + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021D62E4 + + thumb_func_start ov21_021D637C +ov21_021D637C: ; 0x021D637C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + add r6, r1, #0 + str r0, [sp, #8] + add r4, r2, #0 + str r4, [sp, #0xc] + add r7, r3, #0 + ldr r2, [r6, #0] + add r0, r6, #0 + mov r1, #0x1c + mov r3, #2 + bl ov21_021D2724 + cmp r7, #1 + bne _021D63A8 + mov r1, #0x2a + b _021D63AA +_021D63A8: + mov r1, #0x28 +_021D63AA: + add r3, r5, #0 + add r0, r6, #0 + mov r2, #1 + add r3, #0xdc + str r4, [sp] + bl ov21_021D27B8 + add r5, #0xd8 + str r0, [r5, #0] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D637C + + thumb_func_start ov21_021D63C0 +ov21_021D63C0: ; 0x021D63C0 + push {r4, lr} + add r4, r0, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + mov r1, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r4, #0xdc + str r1, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D63C0 + + thumb_func_start ov21_021D63DC +ov21_021D63DC: ; 0x021D63DC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x20 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp, #0x10] + bl sub_02023790 + add r4, r0, #0 + ldr r2, _021D64A8 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + mov r1, #0 + add r2, r4, #0 + add r6, r0, #0 + bl sub_0200B1B8 + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021D64AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + mov r3, #8 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + mov r1, #1 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021D64AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + mov r3, #0x80 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #1 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + mov r2, #3 + mov r3, #2 + bl sub_020238A0 + mov r0, #0xaa + str r0, [sp] + mov r1, #0 + ldr r0, _021D64AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + mov r3, #0x30 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #1 + str r0, [sp] + ldr r1, [sp, #0x10] + add r0, r4, #0 + mov r2, #3 + mov r3, #2 + bl sub_020238A0 + mov r0, #0xaa + str r0, [sp] + mov r1, #0 + ldr r0, _021D64AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + mov r3, #0xb4 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D64A8: .word 0x000002B9 +_021D64AC: .word 0x00020100 + thumb_func_end ov21_021D63DC + + thumb_func_start ov21_021D64B0 +ov21_021D64B0: ; 0x021D64B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x20 + add r6, r1, #0 + add r7, r2, #0 + bl sub_02023790 + add r4, r0, #0 + ldr r2, _021D6530 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + mov r1, #0x6d + add r2, r4, #0 + add r6, r0, #0 + bl sub_0200B1B8 + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021D6534 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + mov r3, #8 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #1 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + mov r2, #3 + mov r3, #2 + bl sub_020238A0 + mov r0, #0xaa + str r0, [sp] + mov r1, #0 + ldr r0, _021D6534 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + mov r3, #0x30 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_0201C3C0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6530: .word 0x000002B9 +_021D6534: .word 0x00020100 + thumb_func_end ov21_021D64B0 + + thumb_func_start ov21_021D6538 +ov21_021D6538: ; 0x021D6538 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r0, #2 + mov r1, #0 + add r2, r4, #0 + bl sub_02009714 + add r1, r5, #0 + add r1, #0x80 + str r0, [r1, #0] + mov r0, #2 + mov r1, #1 + add r2, r4, #0 + bl sub_02009714 + add r1, r5, #0 + add r1, #0x84 + str r0, [r1, #0] + mov r0, #2 + add r1, r0, #0 + add r2, r4, #0 + bl sub_02009714 + add r1, r5, #0 + add r1, #0x88 + str r0, [r1, #0] + mov r0, #2 + mov r1, #3 + add r2, r4, #0 + bl sub_02009714 + add r5, #0x8c + str r0, [r5, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6538 + + thumb_func_start ov21_021D6580 +ov21_021D6580: ; 0x021D6580 + push {r4, lr} + add r4, r0, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0x51 + bl sub_02009DC8 + bl sub_0200A4E4 + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_02009DC8 + bl sub_0200A6DC + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0x6f + bl sub_02009DC8 + bl sub_0200A4E4 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_02009754 + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + bl sub_02009754 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_02009754 + add r4, #0x8c + ldr r0, [r4, #0] + bl sub_02009754 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6580 + + thumb_func_start ov21_021D65DC +ov21_021D65DC: ; 0x021D65DC + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r6, r0, #0 + mov r2, #0x51 + add r0, r5, #0 + str r2, [sp] + mov r3, #1 + str r3, [sp, #4] + str r4, [sp, #8] + add r0, #0x80 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_02009A4C + add r7, r0, #0 + bl sub_0200A3DC + add r0, r7, #0 + bl sub_02009D4C + mov r2, #3 + str r2, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xc + str r0, [sp, #8] + add r0, r5, #0 + str r4, [sp, #0xc] + add r0, #0x84 + ldr r0, [r0, #0] + add r1, r6, #0 + mov r3, #0 + bl sub_02009B04 + add r7, r0, #0 + bl sub_0200A640 + add r0, r7, #0 + bl sub_02009D4C + mov r2, #0x4f + str r2, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, r5, #0 + str r4, [sp, #8] + add r0, #0x88 + ldr r0, [r0, #0] + add r1, r6, #0 + mov r3, #1 + bl sub_02009BC4 + mov r2, #0x50 + str r2, [sp] + mov r0, #3 + str r0, [sp, #4] + add r0, r5, #0 + str r4, [sp, #8] + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r6, #0 + mov r3, #1 + bl sub_02009BC4 + mov r0, #0x50 + str r0, [sp] + sub r0, #0x51 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r1, #2 + str r1, [sp, #0x10] + add r1, r5, #0 + add r1, #0x80 + ldr r1, [r1, #0] + mov r2, #3 + str r1, [sp, #0x14] + add r1, r5, #0 + add r1, #0x84 + ldr r1, [r1, #0] + mov r3, #0x4f + str r1, [sp, #0x18] + add r1, r5, #0 + add r1, #0x88 + ldr r1, [r1, #0] + str r1, [sp, #0x1c] + add r1, r5, #0 + add r1, #0x8c + ldr r1, [r1, #0] + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r5, #0 + add r0, #0x90 + mov r1, #0x51 + bl sub_020093B4 + mov r2, #0x6f + str r2, [sp] + mov r3, #1 + str r3, [sp, #4] + add r0, r5, #0 + str r4, [sp, #8] + add r0, #0x80 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_02009A4C + add r7, r0, #0 + bl sub_0200A3DC + add r0, r7, #0 + bl sub_02009D4C + mov r2, #0x6d + str r2, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, r5, #0 + str r4, [sp, #8] + add r0, #0x88 + ldr r0, [r0, #0] + add r1, r6, #0 + mov r3, #1 + bl sub_02009BC4 + mov r2, #0x6e + str r2, [sp] + mov r0, #3 + str r0, [sp, #4] + add r0, r5, #0 + str r4, [sp, #8] + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r6, #0 + mov r3, #1 + bl sub_02009BC4 + mov r0, #0x6e + str r0, [sp] + sub r0, #0x6f + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r1, #2 + str r1, [sp, #0x10] + add r1, r5, #0 + add r1, #0x80 + ldr r1, [r1, #0] + mov r2, #3 + str r1, [sp, #0x14] + add r1, r5, #0 + add r1, #0x84 + ldr r1, [r1, #0] + mov r3, #0x6d + str r1, [sp, #0x18] + add r1, r5, #0 + add r1, #0x88 + ldr r1, [r1, #0] + str r1, [sp, #0x1c] + add r1, r5, #0 + add r1, #0x8c + ldr r1, [r1, #0] + add r5, #0xb4 + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r5, #0 + mov r1, #0x6f + bl sub_020093B4 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021D65DC + + thumb_func_start ov21_021D6744 +ov21_021D6744: ; 0x021D6744 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + mov r4, #0 + add r6, r0, #0 + add r3, r1, #0 + add r5, sp, #0 + add r0, r4, #0 + add r1, r4, #0 + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r3, r0] + add r5, r6, #0 + str r0, [sp] + add r0, r6, #0 + add r0, #0x90 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #0x18] + mov r0, #0x20 + str r2, [sp, #0x1c] + str r0, [sp, #0x14] + add r7, r4, #0 +_021D6778: + add r0, sp, #0 + bl sub_02021B90 + add r1, r7, #0 + stmia r5!, {r0} + bl sub_02021D6C + add r4, r4, #1 + cmp r4, #9 + blt _021D6778 + mov r5, #0 + str r5, [sp, #0x14] + add r4, r6, #0 + add r7, sp, #0 +_021D6794: + add r0, r7, #0 + bl sub_02021B90 + mov r1, #1 + str r0, [r4, #0x50] + bl sub_02021D6C + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #9 + blt _021D6794 + mov r0, #0 + str r0, [sp, #0x14] + add r0, sp, #0 + bl sub_02021B90 + mov r1, #2 + str r0, [r6, #0x74] + bl sub_02021D6C + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0xe + lsl r0, r0, #0xe + str r0, [sp, #8] + mov r0, #5 + lsl r0, r0, #0x10 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0xb4 + str r0, [sp, #4] + add r0, sp, #0 + bl sub_02021B90 + str r0, [r6, #0x7c] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r6, #0x7c] + mov r1, #1 + bl sub_02021FE0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D6744 + + thumb_func_start ov21_021D67EC +ov21_021D67EC: ; 0x021D67EC + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r1, [sp, #8] + str r0, [sp, #4] + mov r1, #0x15 + ldr r0, [sp, #8] + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r1, #0 + str r0, [sp, #0x1c] + ldr r0, [sp, #4] + add r7, r2, #0 + add r0, #0x98 + ldr r0, [r0, #0] + str r3, [sp, #0xc] + str r0, [sp, #0x24] + mov r0, #2 + str r0, [sp, #0x34] + mov r0, #1 + str r0, [sp, #0x3c] + add r0, r3, #0 + str r1, [sp, #0x28] + str r1, [sp, #0x2c] + str r1, [sp, #0x30] + str r1, [sp, #0x38] + str r0, [sp, #0x40] + ldr r0, [r7, #4] + bl ov21_021D3898 + sub r4, r0, #4 + ldr r0, [sp, #4] + ldr r6, [r0, #0x24] + ldr r0, [r7, #4] + bl ov21_021D38A4 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] +_021D6838: + ldr r0, [sp, #4] + lsl r1, r6, #2 + add r5, r0, r1 + ldr r0, [r5, #0x28] + cmp r0, #0 + beq _021D684C + bl ov21_021D4D1C + mov r0, #0 + str r0, [r5, #0x28] +_021D684C: + cmp r4, #0 + blt _021D68A4 + ldr r0, [sp, #0x10] + cmp r4, r0 + bge _021D68A4 + ldr r0, [r7, #4] + add r1, r4, #0 + bl ov21_021D38B0 + add r1, r0, #0 + ldr r0, _021D68C4 ; =0x000001EE + cmp r1, r0 + beq _021D6892 + ldr r0, [r7, #4] + bl ov21_021D37DC + add r3, r0, #0 + ldr r0, [sp, #8] + ldr r1, [r7, #4] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + bl ov21_021D16D8 + ldr r1, [sp, #4] + str r0, [sp, #0x20] + str r0, [sp, #0x18] + ldr r1, [r1, #0x4c] + add r0, sp, #0x1c + bl ov21_021D4CB8 + str r0, [r5, #0x28] + ldr r0, [sp, #0x18] + bl ov21_021D4DA0 + b _021D68A8 +_021D6892: + add r0, r4, #1 + str r0, [sp] + ldr r0, [sp, #4] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + add r3, r6, #0 + bl ov21_021D6DF4 + b _021D68A8 +_021D68A4: + mov r0, #0 + str r0, [r5, #0x28] +_021D68A8: + add r0, r6, #1 + mov r1, #9 + bl sub_020E1F6C + ldr r0, [sp, #0x14] + add r6, r1, #0 + add r0, r0, #1 + add r4, r4, #1 + str r0, [sp, #0x14] + cmp r0, #9 + blt _021D6838 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_021D68C4: .word 0x000001EE + thumb_func_end ov21_021D67EC + + thumb_func_start ov21_021D68C8 +ov21_021D68C8: ; 0x021D68C8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + add r6, r1, #0 + bl ov21_021D3898 + str r0, [sp, #8] + ldr r0, [r4, #4] + bl ov21_021D375C + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37DC + add r7, r0, #0 + ldr r0, [r4, #4] + ldr r1, [sp, #8] + bl ov21_021D38B0 + ldr r1, _021D693C ; =0x000001EE + cmp r0, r1 + bne _021D6910 + add r0, r6, #0 + mov r1, #0 + bl ov21_021D217C + ldr r0, [r5, #0x7c] + cmp r0, #0 + beq _021D6938 + mov r1, #1 + bl sub_02021CAC + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021D6910: + mov r0, #0x38 + str r0, [sp] + mov r0, #0x50 + str r0, [sp, #4] + ldr r1, [r4, #4] + ldr r2, [r7, #0] + add r0, r6, #0 + mov r3, #2 + bl ov21_021D1890 + add r0, r6, #0 + mov r1, #1 + bl ov21_021D217C + ldr r0, [r5, #0x7c] + cmp r0, #0 + beq _021D6938 + mov r1, #0 + bl sub_02021CAC +_021D6938: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D693C: .word 0x000001EE + thumb_func_end ov21_021D68C8 + + thumb_func_start ov21_021D6940 +ov21_021D6940: ; 0x021D6940 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021D6946: + ldr r0, [r5, #0x28] + cmp r0, #0 + beq _021D6950 + bl ov21_021D4D1C +_021D6950: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #9 + blt _021D6946 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6940 + + thumb_func_start ov21_021D695C +ov21_021D695C: ; 0x021D695C + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021D6964: + ldr r0, [r5, #0] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #9 + blt _021D6964 + mov r5, #0 + add r4, r6, #0 +_021D6976: + ldr r0, [r4, #0x50] + bl sub_02021BD4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #9 + blt _021D6976 + ldr r0, [r6, #0x74] + bl sub_02021BD4 + ldr r0, [r6, #0x7c] + bl sub_02021BD4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D695C + + thumb_func_start ov21_021D6994 +ov21_021D6994: ; 0x021D6994 + ldr r3, _021D699C ; =ov21_021D6ED0 + mov r2, #0 + str r2, [r0, #0x24] + bx r3 + ; .align 2, 0 +_021D699C: .word ov21_021D6ED0 + thumb_func_end ov21_021D6994 + + thumb_func_start ov21_021D69A0 +ov21_021D69A0: ; 0x021D69A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0x24] + str r1, [sp] + str r0, [sp, #4] + mov r4, #0 +_021D69AE: + ldr r0, [sp] + ldr r0, [r0, #8] + cmp r0, #1 + bne _021D69BA + add r0, r4, #2 + b _021D69BC +_021D69BA: + add r0, r4, #0 +_021D69BC: + add r1, r4, #1 + ldr r3, [sp] + lsl r7, r1, #2 + mov r2, #0xa + lsl r0, r0, #2 + ldr r1, _021D6A50 ; =0x021E9D14 + str r0, [sp, #8] + ldr r0, [r1, r0] + lsl r2, r2, #6 + ldr r6, [r3, #0xc] + add r3, r2, #0 + ldr r1, [r1, r7] + sub r3, r3, r6 + bl ov21_021D6BF8 + str r0, [sp, #0xc] + ldr r3, [sp] + mov r2, #0xa + ldr r1, _021D6A54 ; =0x021E9D40 + ldr r0, [sp, #8] + lsl r2, r2, #6 + ldr r6, [r3, #0xc] + ldr r0, [r1, r0] + add r3, r2, #0 + ldr r1, [r1, r7] + sub r3, r3, r6 + bl ov21_021D6BF8 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + add r1, sp, #0xc + lsl r6, r0, #2 + ldr r0, [r5, r6] + bl sub_02021C50 + mov r0, #4 + sub r7, r0, r4 + bpl _021D6A0A + neg r7, r7 +_021D6A0A: + lsl r1, r7, #1 + bpl _021D6A10 + neg r1, r1 +_021D6A10: + ldr r0, [r5, r6] + add r1, #0x20 + bl sub_02021F58 + cmp r4, #4 + bne _021D6A26 + ldr r0, [r5, r6] + mov r1, #0 + bl sub_02021F24 + b _021D6A3A +_021D6A26: + add r1, r7, #6 + cmp r1, #9 + ldr r0, [r5, r6] + bge _021D6A34 + bl sub_02021F24 + b _021D6A3A +_021D6A34: + mov r1, #9 + bl sub_02021F24 +_021D6A3A: + ldr r0, [sp, #4] + mov r1, #9 + add r0, r0, #1 + bl sub_020E1F6C + add r4, r4, #1 + str r1, [sp, #4] + cmp r4, #9 + blt _021D69AE + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6A50: .word 0x021E9D14 +_021D6A54: .word 0x021E9D40 + thumb_func_end ov21_021D69A0 + + thumb_func_start ov21_021D6A58 +ov21_021D6A58: ; 0x021D6A58 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D3898 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D38A4 + add r7, r0, #0 + ldr r0, [r4, #8] + cmp r0, #1 + bne _021D6AAA + ldr r0, [r5, #0x24] + add r0, r0, #1 + cmp r0, #9 + bge _021D6A7E + b _021D6A80 +_021D6A7E: + mov r0, #0 +_021D6A80: + str r0, [r5, #0x24] + ldr r0, [r5, #0x24] + mov r1, #9 + add r0, #8 + bl sub_020E1F6C + add r0, r6, #4 + cmp r0, r7 + blt _021D6A9E + lsl r0, r1, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, r6, r7, pc} +_021D6A9E: + lsl r0, r1, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + pop {r3, r4, r5, r6, r7, pc} +_021D6AAA: + cmp r0, #2 + bne _021D6AD8 + ldr r0, [r5, #0x24] + sub r0, r0, #1 + bmi _021D6AB6 + b _021D6AB8 +_021D6AB6: + mov r0, #8 +_021D6AB8: + str r0, [r5, #0x24] + ldr r1, [r5, #0x24] + sub r0, r6, #4 + bpl _021D6ACC + lsl r0, r1, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, r6, r7, pc} +_021D6ACC: + lsl r0, r1, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + pop {r3, r4, r5, r6, r7, pc} +_021D6AD8: + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D6ED0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6A58 + + thumb_func_start ov21_021D6AE4 +ov21_021D6AE4: ; 0x021D6AE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r1, #0 + str r0, [sp] + ldr r0, [r7, #4] + bl ov21_021D3898 + add r5, r0, #0 + ldr r0, [r7, #4] + bl ov21_021D38A4 + str r0, [sp, #4] + sub r0, r5, #4 + mov r4, #0 + str r0, [sp, #8] +_021D6B02: + ldr r0, [sp] + mov r1, #9 + ldr r0, [r0, #0x24] + add r0, r0, r4 + bl sub_020E1F6C + ldr r0, [sp, #8] + add r5, r1, #0 + mov r6, #0 + add r1, r0, r4 + bmi _021D6B3A + ldr r0, [sp, #4] + cmp r1, r0 + bge _021D6B3A + ldr r0, [r7, #4] + bl ov21_021D38B0 + add r1, r0, #0 + ldr r0, _021D6B90 ; =0x000001EE + cmp r1, r0 + beq _021D6B3A + ldr r0, [r7, #4] + bl ov21_021D37DC + ldr r0, [r0, #4] + cmp r0, #2 + bne _021D6B3A + mov r6, #1 +_021D6B3A: + ldr r0, [sp] + lsl r1, r5, #2 + add r5, r0, r1 + ldr r0, [r5, #0x50] + add r1, r6, #0 + bl sub_02021CAC + cmp r6, #0 + beq _021D6B86 + ldr r0, [r5, #0] + bl sub_02021D28 + mov r1, #0x36 + ldr r2, [r0, #0] + lsl r1, r1, #0xc + sub r1, r2, r1 + str r1, [sp, #0xc] + ldr r0, [r0, #4] + add r1, sp, #0xc + str r0, [sp, #0x10] + ldr r0, [r5, #0x50] + bl sub_02021C50 + ldr r0, [r5, #0] + bl sub_02021F48 + add r1, r0, #0 + ldr r0, [r5, #0x50] + bl sub_02021EF0 + ldr r0, [r5, #0] + bl sub_02021F74 + add r1, r0, #0 + ldr r0, [r5, #0x50] + sub r1, r1, #1 + bl sub_02021F58 +_021D6B86: + add r4, r4, #1 + cmp r4, #9 + blt _021D6B02 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6B90: .word 0x000001EE + thumb_func_end ov21_021D6AE4 + + thumb_func_start ov21_021D6B94 +ov21_021D6B94: ; 0x021D6B94 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #4] + bl ov21_021D38A4 + add r1, r0, #0 + mov r0, #0x36 + lsl r0, r0, #0xc + lsl r1, r1, #0xc + bl sub_020BCFD0 + str r0, [r4, #0x78] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6B94 + + thumb_func_start ov21_021D6BB0 +ov21_021D6BB0: ; 0x021D6BB0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r1, #4] + bl ov21_021D3898 + add r2, r0, #0 + ldr r0, [r4, #0x78] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + mov r0, #0x3a + lsl r0, r0, #0xc + str r1, [sp, #4] + add r0, r1, r0 + str r0, [sp, #4] + mov r0, #0x3e + lsl r0, r0, #0xe + str r0, [sp] + ldr r0, [r4, #0x74] + add r1, sp, #0 + bl sub_02021C50 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6BB0 + + thumb_func_start ov21_021D6BF8 +ov21_021D6BF8: ; 0x021D6BF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + sub r0, r1, r5 + lsl r2, r3, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + lsl r1, r4, #0xc + bl sub_020BCFD0 + add r0, r0, r5 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D6BF8 + + thumb_func_start ov21_021D6C24 +ov21_021D6C24: ; 0x021D6C24 + push {r3, r4, r5, lr} + mov r2, #0x52 + add r5, r1, #0 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, [r5, #4] + bl ov21_021D3898 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6C24 + + thumb_func_start ov21_021D6C44 +ov21_021D6C44: ; 0x021D6C44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + ldr r5, [r7, #0x24] + mov r6, #0 +_021D6C4E: + lsl r0, r5, #2 + add r4, r7, r0 + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _021D6C90 + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, sp, #0 + bl ov21_021D6CA4 + ldr r0, [r4, #0x28] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r2, [sp] + bl sub_020128C4 + ldr r0, [r4, #0] + bl sub_02021F74 + add r1, r0, #0 + ldr r0, [r4, #0x28] + sub r1, r1, #1 + ldr r0, [r0, #0] + bl sub_02012A30 + ldr r0, [r4, #0] + bl sub_02021F48 + add r1, r0, #0 + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + bl sub_02012A90 +_021D6C90: + add r0, r5, #1 + mov r1, #9 + bl sub_020E1F6C + add r6, r6, #1 + add r5, r1, #0 + cmp r6, #9 + blt _021D6C4E + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D6C44 + + thumb_func_start ov21_021D6CA4 +ov21_021D6CA4: ; 0x021D6CA4 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_02021D28 + ldr r1, [r0, #0] + asr r1, r1, #0xc + str r1, [r5, #0] + ldr r0, [r0, #4] + asr r0, r0, #0xc + str r0, [r4, #0] + ldr r0, [r5, #0] + sub r0, #0x40 + str r0, [r5, #0] + ldr r0, [r4, #0] + sub r0, #8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D6CA4 + + thumb_func_start ov21_021D6CC8 +ov21_021D6CC8: ; 0x021D6CC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r2, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + str r1, [sp, #8] + str r3, [sp, #0xc] + bl ov21_021D3898 + str r0, [sp, #0x14] + ldr r0, [r4, #4] + bl ov21_021D38A4 + ldr r1, [r4, #8] + str r0, [sp, #0x10] + cmp r1, #1 + beq _021D6CF0 + cmp r1, #2 + beq _021D6CFA + b _021D6D00 +_021D6CF0: + ldr r6, [r5, #0x24] + ldr r0, [sp, #0x14] + add r6, #8 + add r7, r0, #4 + b _021D6D00 +_021D6CFA: + ldr r0, [sp, #0x14] + ldr r6, [r5, #0x24] + sub r7, r0, #4 +_021D6D00: + cmp r1, #0 + bne _021D6D14 + ldr r1, [sp, #8] + ldr r3, [sp, #0xc] + add r0, r5, #0 + add r2, r4, #0 + bl ov21_021D67EC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D6D14: + add r0, r6, #0 + mov r1, #9 + bl sub_020E1F6C + ldr r0, [sp, #0x10] + add r6, r1, #0 + cmp r7, r0 + bge _021D6D5E + cmp r7, #0 + blt _021D6D5E + ldr r0, [r4, #4] + add r1, r7, #0 + bl ov21_021D38B0 + ldr r1, _021D6D74 ; =0x000001EE + cmp r0, r1 + beq _021D6D4A + str r6, [sp] + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r3, [sp, #0xc] + add r0, r5, #0 + add r2, r4, #0 + bl ov21_021D6D78 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D6D4A: + add r0, r7, #1 + str r0, [sp] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + add r0, r5, #0 + add r3, r6, #0 + bl ov21_021D6DF4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021D6D5E: + lsl r4, r6, #2 + add r5, #0x28 + ldr r0, [r5, r4] + cmp r0, #0 + beq _021D6D70 + bl ov21_021D4D1C + mov r0, #0 + str r0, [r5, r4] +_021D6D70: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6D74: .word 0x000001EE + thumb_func_end ov21_021D6CC8 + + thumb_func_start ov21_021D6D78 +ov21_021D6D78: ; 0x021D6D78 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r4, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + ldr r0, [r4, #4] + ldr r1, [sp, #0x44] + add r7, r3, #0 + bl ov21_021D37DC + str r0, [sp] + cmp r0, #0 + bne _021D6D96 + bl sub_02022974 +_021D6D96: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r6, r0] + mov r1, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + ldr r3, [sp] + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x24] + str r1, [sp, #0x10] + str r1, [sp, #0x14] + str r1, [sp, #0x18] + str r1, [sp, #0x20] + str r7, [sp, #0x28] + ldr r1, [r4, #4] + ldr r3, [r3, #0] + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D16D8 + add r6, r0, #0 + ldr r0, [sp, #0x40] + add r4, r5, #0 + add r4, #0x28 + lsl r7, r0, #2 + ldr r0, [r4, r7] + cmp r0, #0 + beq _021D6DDC + bl ov21_021D4D1C +_021D6DDC: + str r6, [sp, #8] + ldr r1, [r5, #0x4c] + add r0, sp, #4 + bl ov21_021D4CB8 + str r0, [r4, r7] + add r0, r6, #0 + bl ov21_021D4DA0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D6D78 + + thumb_func_start ov21_021D6DF4 +ov21_021D6DF4: ; 0x021D6DF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r4, r2, #0 + str r0, [sp, #0x10] + add r5, r1, #0 + mov r0, #0x20 + add r1, r4, #0 + add r6, r3, #0 + bl sub_02023790 + add r7, r0, #0 + ldr r2, _021D6EC8 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r4, #0 + bl sub_0200B144 + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r0, [r5, r1] + mov r2, #2 + str r0, [sp, #0x18] + ldr r0, [sp, #0x10] + add r0, #0x98 + ldr r0, [r0, #0] + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + str r0, [sp, #0x2c] + str r0, [sp, #0x34] + mov r0, #1 + str r2, [sp, #0x30] + str r4, [sp, #0x3c] + str r0, [sp, #0x38] + ldr r0, [r5, r1] + mov r1, #0xf + bl ov21_021D4D6C + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r1, [sp, #0x58] + add r0, r7, #0 + mov r2, #3 + mov r3, #2 + bl sub_020238A0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D6ECC ; =0x00030201 + add r2, r7, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + mov r1, #2 + mov r3, #0x16 + bl sub_0201D78C + ldr r0, [sp, #0x14] + mov r1, #0x63 + add r2, r7, #0 + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _021D6ECC ; =0x00030201 + add r2, r7, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + mov r1, #2 + mov r3, #0x31 + bl sub_0201D78C + ldr r4, [sp, #0x10] + lsl r6, r6, #2 + add r4, #0x28 + ldr r0, [r4, r6] + cmp r0, #0 + beq _021D6EA4 + bl ov21_021D4D1C +_021D6EA4: + ldr r1, [sp, #0x10] + str r5, [sp, #0x1c] + ldr r1, [r1, #0x4c] + add r0, sp, #0x18 + bl ov21_021D4CB8 + str r0, [r4, r6] + add r0, r5, #0 + bl ov21_021D4DA0 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_0200B190 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6EC8: .word 0x000002B9 +_021D6ECC: .word 0x00030201 + thumb_func_end ov21_021D6DF4 + + thumb_func_start ov21_021D6ED0 +ov21_021D6ED0: ; 0x021D6ED0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D3898 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D38A4 + sub r4, r5, #4 + ldr r5, [r6, #0x24] + str r0, [sp] + mov r7, #0 +_021D6EEC: + cmp r4, #0 + blt _021D6F02 + ldr r0, [sp] + cmp r4, r0 + bge _021D6F02 + lsl r0, r5, #2 + ldr r0, [r6, r0] + mov r1, #1 + bl sub_02021CAC + b _021D6F0C +_021D6F02: + lsl r0, r5, #2 + ldr r0, [r6, r0] + mov r1, #0 + bl sub_02021CAC +_021D6F0C: + add r0, r5, #1 + mov r1, #9 + bl sub_020E1F6C + add r7, r7, #1 + add r5, r1, #0 + add r4, r4, #1 + cmp r7, #9 + blt _021D6EEC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D6ED0 + + thumb_func_start ov21_021D6F20 +ov21_021D6F20: ; 0x021D6F20 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r2, #0xc] + mov r0, #0xa + lsl r0, r0, #6 + sub r0, r0, r1 + lsl r0, r0, #0xc + mov r2, #0x1f + asr r1, r0, #0x1f + lsl r2, r2, #0xc + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #0xa + lsl r1, r1, #0x12 + bl sub_020BCFD0 + add r5, r0, #0 + add r0, r4, #0 + bl ov21_021D2170 + mov r1, #0x17 + asr r2, r5, #0xc + bl sub_02007DEC + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D6F20 + + thumb_func_start ov21_021D6F64 +ov21_021D6F64: ; 0x021D6F64 + push {r3, lr} + bl ov21_021D2170 + mov r1, #0x17 + mov r2, #0x1f + bl sub_02007DEC + pop {r3, pc} + thumb_func_end ov21_021D6F64 + + thumb_func_start ov21_021D6F74 +ov21_021D6F74: ; 0x021D6F74 + push {r4, lr} + mov r1, #0xa + ldr r0, [r0, #0xc] + lsl r1, r1, #6 + sub r0, r1, r0 + lsl r3, r0, #0xc + asr r2, r3, #0x1f + lsr r0, r3, #0x10 + lsl r4, r2, #0x10 + orr r4, r0 + mov r0, #2 + lsl r3, r3, #0x10 + mov r2, #0 + lsl r0, r0, #0xa + add r0, r3, r0 + adc r4, r2 + lsl r2, r4, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + lsl r1, r1, #0xc + bl sub_020BCFD0 + asr r1, r0, #0xc + mov r0, #0x10 + sub r0, r0, r1 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _021D6FB0 ; =0x04000052 + strh r1, [r0] + pop {r4, pc} + ; .align 2, 0 +_021D6FB0: .word 0x04000052 + thumb_func_end ov21_021D6F74 + + thumb_func_start ov21_021D6FB4 +ov21_021D6FB4: ; 0x021D6FB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #0x14] + ldr r0, _021D7040 ; =0x00000685 + add r5, r2, #0 + str r1, [sp, #0x18] + add r4, r3, #0 + bl sub_02005748 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _021D6FFA + cmp r4, #0 + beq _021D6FEC + ldr r0, [sp, #0x18] + mov r6, #3 + ldr r0, [r0, #0] + mov r4, #0 + ldr r0, [r0, #0] + mov r1, #1 + add r2, r6, #0 + mov r3, #0xc0 + str r4, [sp, #0x1c] + mov r7, #0xe + mov r5, #4 + bl sub_02019184 + b _021D7018 +_021D6FEC: + mov r0, #3 + mov r6, #0 + str r0, [sp, #0x1c] + mov r4, #0xe + add r7, r6, #0 + mov r5, #4 + b _021D7018 +_021D6FFA: + cmp r4, #0 + beq _021D700C + mov r0, #0xc + str r0, [sp, #0x1c] + mov r4, #0x14 + mov r6, #3 + mov r7, #0xe + mov r5, #4 + b _021D7018 +_021D700C: + mov r0, #3 + str r0, [sp, #0x1c] + mov r4, #0xe + mov r6, #0xc + mov r7, #0x14 + mov r5, #4 +_021D7018: + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x14] + str r0, [sp] + str r6, [sp, #4] + str r4, [sp, #8] + str r7, [sp, #0xc] + ldr r1, [sp, #0x18] + str r5, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r1, [r1, #0] + add r3, #0xdc + str r3, [sp, #0x14] + ldr r1, [r1, #0] + ldr r3, [r3, #0] + add r0, #0xe0 + mov r2, #2 + bl ov21_021D1558 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7040: .word 0x00000685 + thumb_func_end ov21_021D6FB4 + + thumb_func_start ov21_021D7044 +ov21_021D7044: ; 0x021D7044 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xe0 + add r4, r1, #0 + bl ov21_021D157C + add r6, r0, #0 + bne _021D708E + add r0, r5, #0 + add r0, #0xf8 + ldr r1, [r0, #0] + add r0, r5, #0 + add r0, #0xfc + ldr r0, [r0, #0] + sub r0, r0, #1 + mul r0, r1 + mov r1, #1 + lsl r1, r1, #8 + ldr r1, [r5, r1] + bl sub_020E1F6C + add r5, #0xf0 + ldr r1, [r5, #0] + add r0, r0, r1 + lsl r3, r0, #3 + mov r0, #0x2f + sub r3, #0x70 + mvn r0, r0 + cmp r3, r0 + bge _021D7082 + add r3, r0, #0 +_021D7082: + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + mov r2, #3 + bl sub_0201C63C +_021D708E: + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7044 + + thumb_func_start ov21_021D7094 +ov21_021D7094: ; 0x021D7094 + push {r3, lr} + ldr r1, [r1, #0x10] + cmp r1, #0 + bne _021D70AE + cmp r2, #0 + bne _021D70AE + ldr r0, [r0, #0] + mov r1, #1 + ldr r0, [r0, #0] + mov r2, #3 + mov r3, #0 + bl sub_02019184 +_021D70AE: + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D70BC ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + pop {r3, pc} + ; .align 2, 0 +_021D70BC: .word 0xFFFF1FFF + thumb_func_end ov21_021D7094 + + thumb_func_start ov21_021D70C0 +ov21_021D70C0: ; 0x021D70C0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r1, #0xf + mov r2, #2 + bl ov21_021D4D6C + add r4, r0, #0 + mov r1, #1 + add r2, r5, #0 + bl sub_02012898 + add r5, r0, #0 + add r0, r4, #0 + bl ov21_021D4DA0 + add r0, r5, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D70C0 + + thumb_func_start ov21_021D70E8 +ov21_021D70E8: ; 0x021D70E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x74] + mov r1, #1 + bl sub_02021FE0 + mov r6, #1 + mov r4, #0 + add r7, r6, #0 +_021D70FA: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021FE0 + ldr r0, [r5, #0x50] + add r1, r7, #0 + bl sub_02021FE0 + ldr r0, [r5, #0x28] + cmp r0, #0 + beq _021D7118 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02012AF0 +_021D7118: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #9 + blt _021D70FA + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D70E8 + + thumb_func_start ov21_021D7124 +ov21_021D7124: ; 0x021D7124 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x74] + mov r1, #0 + bl sub_02021FE0 + mov r4, #0 + add r6, r4, #0 + add r7, r4, #0 +_021D7136: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021FE0 + ldr r0, [r5, #0x50] + add r1, r7, #0 + bl sub_02021FE0 + ldr r0, [r5, #0x28] + cmp r0, #0 + beq _021D7154 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02012AF0 +_021D7154: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #9 + blt _021D7136 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7124 + + thumb_func_start ov21_021D7160 +ov21_021D7160: ; 0x021D7160 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x24] + add r6, r1, #0 + add r0, r0, #4 + mov r1, #9 + add r5, r2, #0 + add r7, r3, #0 + bl sub_020E1F6C + lsl r0, r1, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r4, r0, #0 + ldr r0, [r5, #4] + bl ov21_021D375C + add r3, r0, #0 + ldr r0, [r4, #0] + add r2, r7, #0 + str r0, [sp] + ldr r0, [r4, #4] + str r0, [sp, #4] + ldr r1, [r5, #4] + add r0, r6, #0 + bl ov21_021D1778 + add r0, r6, #0 + mov r1, #0 + bl ov21_021D238C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7160 + + thumb_func_start ov21_021D71A8 +ov21_021D71A8: ; 0x021D71A8 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + bl ov21_021D6FB4 + ldr r0, [r5, #0x10] + cmp r0, #1 + beq _021D71E2 + cmp r4, #0 + beq _021D71D0 + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + str r0, [sp] + mov r0, #4 + sub r2, #0x10 + mov r3, #0x39 + bl sub_0200AAE0 + pop {r3, r4, r5, pc} +_021D71D0: + mov r0, #1 + str r0, [sp] + mov r0, #4 + add r1, r0, #0 + sub r1, #0x14 + mov r2, #0 + mov r3, #0x39 + bl sub_0200AAE0 +_021D71E2: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D71A8 + + thumb_func_start ov21_021D71E4 +ov21_021D71E4: ; 0x021D71E4 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021D7044 + add r7, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #1 + beq _021D7200 + mov r0, #1 + bl sub_0200AC1C + b _021D7202 +_021D7200: + mov r0, #1 +_021D7202: + cmp r7, #1 + bne _021D7242 + cmp r0, #1 + bne _021D7242 + ldr r0, [r4, #0x10] + cmp r0, #1 + beq _021D7234 + cmp r6, #0 + bne _021D7234 + mov r0, #0xf + mvn r0, r0 + mov r1, #0x3f + mov r2, #1 + bl sub_0200AB4C + ldr r0, [r5, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC +_021D7234: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021D7094 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D7242: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D71E4 + + thumb_func_start ov21_021D7248 +ov21_021D7248: ; 0x021D7248 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + bl ov21_021D70E8 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021D6FB4 + cmp r4, #0 + bne _021D7278 + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021D7394 + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021D73F0 +_021D7278: + ldr r0, [r7, #0x10] + cmp r0, #1 + beq _021D72CE + cmp r4, #0 + beq _021D72AA + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x28 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r2, r1, #0 + sub r2, #0x14 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021D72AA: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x28 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r3, r1, #0 + sub r3, #0x14 + bl ov21_021D23F8 +_021D72CE: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7248 + + thumb_func_start ov21_021D72D4 +ov21_021D72D4: ; 0x021D72D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r2, #0 + add r7, r0, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021D7044 + str r0, [sp, #8] + ldr r0, [r4, #0x10] + cmp r0, #1 + beq _021D72FA + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #0xc] +_021D72FA: + cmp r6, #0 + bne _021D7314 + add r0, r7, #0 + add r1, r5, #0 + bl ov21_021D73C8 + str r0, [sp, #0x10] + add r0, r7, #0 + add r1, r5, #0 + bl ov21_021D7424 + str r0, [sp, #0x14] + b _021D731A +_021D7314: + mov r0, #1 + str r0, [sp, #0x10] + str r0, [sp, #0x14] +_021D731A: + mov r1, #0 + add r2, sp, #8 +_021D731E: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021D732C + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #4 + blt _021D731E +_021D732C: + cmp r1, #4 + bne _021D738A + cmp r6, #0 + bne _021D7364 + ldr r0, [r4, #0x10] + cmp r0, #1 + beq _021D737A + mov r3, #0 + add r0, r3, #0 + str r3, [sp] + sub r0, #0x10 + str r0, [sp, #4] + ldr r0, _021D7390 ; =0x04000050 + mov r1, #0x2e + mov r2, #8 + bl sub_020BF5A0 + ldr r0, [r5, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + b _021D737A +_021D7364: + add r0, r7, #0 + bl ov21_021D7124 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D23C0 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D2360 +_021D737A: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021D7094 + add sp, #0x18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D738A: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7390: .word 0x04000050 + thumb_func_end ov21_021D72D4 + + thumb_func_start ov21_021D7394 +ov21_021D7394: ; 0x021D7394 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + mov r1, #0x48 + add r5, r0, #0 + str r1, [sp] + mov r0, #4 + add r1, #0xbc + str r0, [sp, #4] + add r0, r5, r1 + mov r1, #0x38 + mov r2, #0x30 + mov r3, #0x50 + bl ov21_021D2648 + mov r2, #0x41 + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r2, r2, #4 + ldr r0, [r4, #0] + ldr r2, [r5, r2] + bl ov21_021D2164 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7394 + + thumb_func_start ov21_021D73C8 +ov21_021D73C8: ; 0x021D73C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x41 + lsl r0, r0, #2 + add r0, r5, r0 + add r4, r1, #0 + bl ov21_021D2664 + mov r2, #0x41 + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r2, r2, #4 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r2, [r5, r2] + bl ov21_021D2164 + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D73C8 + + thumb_func_start ov21_021D73F0 +ov21_021D73F0: ; 0x021D73F0 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x20 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0x49 + lsl r0, r0, #2 + add r4, r1, #0 + add r0, r5, r0 + mov r1, #0xaa + mov r2, #0xac + mov r3, #0x52 + bl ov21_021D2648 + mov r2, #0x49 + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r2, r2, #4 + ldr r0, [r4, #0] + ldr r2, [r5, r2] + bl ov21_021D1848 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D73F0 + + thumb_func_start ov21_021D7424 +ov21_021D7424: ; 0x021D7424 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x49 + lsl r0, r0, #2 + add r0, r5, r0 + add r4, r1, #0 + bl ov21_021D2664 + mov r2, #0x49 + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r2, r2, #4 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r2, [r5, r2] + bl ov21_021D1848 + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7424 + + thumb_func_start ov21_021D744C +ov21_021D744C: ; 0x021D744C + ldr r3, [r0, #0] + mov r1, #4 + ldr r2, [r3, #0] + orr r1, r2 + str r1, [r3, #0] + mov r1, #0 + str r1, [r0, #0x10] + str r1, [r0, #0x14] + mov r1, #2 + str r1, [r0, #0x20] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D744C + + thumb_func_start ov21_021D7464 +ov21_021D7464: ; 0x021D7464 + ldr r3, [r1, #0] + mov r0, #2 + ldr r2, [r3, #0] + orr r2, r0 + str r2, [r3, #0] + mov r3, #0 + str r3, [r1, #0x10] + mov r2, #1 + str r2, [r1, #0x14] + str r3, [r1, #0xc] + str r0, [r1, #0x20] + bx lr + thumb_func_end ov21_021D7464 + + thumb_func_start ov21_021D747C +ov21_021D747C: ; 0x021D747C + push {r3, lr} + mov r1, #0x5d + ldr r2, [r0, #4] + lsl r1, r1, #6 + ldr r1, [r2, r1] + cmp r1, #0 + bne _021D74A8 + ldr r3, [r0, #0] + mov r1, #1 + ldr r2, [r3, #0] + orr r1, r2 + str r1, [r3, #0] + mov r1, #0 + str r1, [r0, #0x10] + str r1, [r0, #0x14] + mov r1, #2 + str r1, [r0, #0x20] + ldr r0, _021D74AC ; =0x000005DD + bl sub_02005748 + mov r0, #1 + pop {r3, pc} +_021D74A8: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021D74AC: .word 0x000005DD + thumb_func_end ov21_021D747C + + thumb_func_start ov21_021D74B0 +ov21_021D74B0: ; 0x021D74B0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + mov r1, #0x5d + ldr r0, [r5, #4] + lsl r1, r1, #6 + ldr r1, [r0, r1] + cmp r1, #1 + bne _021D74CA + add sp, #0x10 + mov r0, #0 + pop {r4, r5, r6, pc} +_021D74CA: + bl ov21_021D36D8 + cmp r0, #0 + bne _021D74D6 + mov r4, #1 + b _021D74D8 +_021D74D6: + mov r4, #0 +_021D74D8: + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov21_021D36A4 + cmp r0, #0 + beq _021D752C + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov21_021D36C0 + ldr r0, _021D7534 ; =0x000005DD + bl sub_02005748 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r4, [sp, #8] + str r6, [sp, #0xc] + ldr r0, [r5, #4] + add r2, r1, #0 + add r3, r1, #0 + bl ov21_021D3684 + ldr r0, [r5, #4] + mov r1, #0 + bl ov21_021D36FC + mov r3, #0 + str r3, [r5, #0xc] + ldr r2, [r5, #0] + mov r0, #0x10 + ldr r1, [r2, #0] + add sp, #0x10 + orr r0, r1 + str r0, [r2, #0] + str r3, [r5, #0x10] + str r3, [r5, #0x14] + mov r0, #2 + str r0, [r5, #0x20] + str r3, [r5, #0x1c] + mov r0, #1 + pop {r4, r5, r6, pc} +_021D752C: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D7534: .word 0x000005DD + thumb_func_end ov21_021D74B0 + + thumb_func_start ov21_021D7538 +ov21_021D7538: ; 0x021D7538 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + bl ov21_021D37BC + add r6, r0, #0 + ldr r0, [r5, #4] + bl ov21_021D36D8 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldr r0, [r5, #4] + add r2, r1, #0 + add r3, r1, #0 + bl ov21_021D3684 + ldr r2, [r5, #0] + mov r0, #0x10 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] + ldr r0, [r5, #4] + add r1, r6, #0 + bl ov21_021D3794 + mov r2, #0 + str r2, [r5, #0xc] + mov r0, #0x5d + ldr r1, [r5, #4] + lsl r0, r0, #6 + str r2, [r1, r0] + str r2, [r5, #0x10] + str r2, [r5, #0x14] + str r2, [r5, #8] + mov r0, #2 + str r0, [r5, #0x20] + str r2, [r5, #0x1c] + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D7538 + + thumb_func_start ov21_021D7590 +ov21_021D7590: ; 0x021D7590 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r4, r1, #0 + sub r0, r0, #1 + str r0, [r5, #0x18] + bmi _021D75C6 + ldr r1, [r5, #0x1c] + add r0, r4, #0 + bl ov21_021D6108 + cmp r0, #0 + beq _021D75C0 + ldr r2, [r5, #0x20] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D60FC + mov r0, #1 + str r0, [r4, #0x20] + ldr r0, _021D75D8 ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D75C0: + mov r0, #0 + str r0, [r5, #0x18] + pop {r3, r4, r5, pc} +_021D75C6: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D5F58 + mov r0, #0 + str r0, [r5, #0x14] + str r0, [r4, #0x20] + pop {r3, r4, r5, pc} + nop +_021D75D8: .word 0x0000068B + thumb_func_end ov21_021D7590 + + thumb_func_start ov21_021D75DC +ov21_021D75DC: ; 0x021D75DC + push {r3, r4, r5, lr} + ldr r2, _021D76A8 ; =0x021BF67C + add r4, r1, #0 + ldr r3, [r2, #0x44] + add r5, r0, #0 + mov r1, #0x40 + add r0, r3, #0 + tst r0, r1 + beq _021D761E + add r0, r4, #0 + sub r1, #0x41 + bl ov21_021D6108 + cmp r0, #0 + beq _021D7610 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #2 + bl ov21_021D60FC + mov r0, #1 + str r0, [r4, #0x20] + ldr r0, _021D76AC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D7610: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D5F58 + mov r0, #0 + str r0, [r4, #0x20] + pop {r3, r4, r5, pc} +_021D761E: + mov r0, #0x80 + tst r0, r3 + beq _021D7654 + add r0, r4, #0 + mov r1, #1 + bl ov21_021D6108 + cmp r0, #0 + beq _021D7646 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov21_021D60FC + mov r0, #1 + str r0, [r4, #0x20] + ldr r0, _021D76AC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021D7646: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D5F58 + mov r0, #0 + str r0, [r4, #0x20] + pop {r3, r4, r5, pc} +_021D7654: + ldr r1, [r2, #0x48] + mov r0, #0x20 + tst r0, r1 + beq _021D7676 + mov r0, #1 + str r0, [r5, #0x14] + mov r0, #5 + str r0, [r5, #0x18] + sub r0, r0, #6 + str r0, [r5, #0x1c] + mov r0, #2 + str r0, [r5, #0x20] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D5F6C + pop {r3, r4, r5, pc} +_021D7676: + mov r0, #0x10 + tst r0, r1 + beq _021D7692 + mov r1, #1 + str r1, [r5, #0x14] + mov r0, #5 + str r0, [r5, #0x18] + str r1, [r5, #0x1c] + str r1, [r5, #0x20] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D5F6C + pop {r3, r4, r5, pc} +_021D7692: + ldr r0, [r4, #0x20] + cmp r0, #1 + bne _021D76A4 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D5F58 + mov r0, #0 + str r0, [r4, #0x20] +_021D76A4: + pop {r3, r4, r5, pc} + nop +_021D76A8: .word 0x021BF67C +_021D76AC: .word 0x0000068B + thumb_func_end ov21_021D75DC + + .rodata + + + .global Unk_ov21_021E9D14 +Unk_ov21_021E9D14: ; 0x021E9D14 + .incbin "incbin/overlay21_rodata.bin", 0x1F0, 0x21C - 0x1F0 + + .global Unk_ov21_021E9D40 +Unk_ov21_021E9D40: ; 0x021E9D40 + .incbin "incbin/overlay21_rodata.bin", 0x21C, 0x2C + diff --git a/asm/ov21_021D76B0.s b/asm/ov21_021D76B0.s new file mode 100644 index 000000000..e9fc6d424 --- /dev/null +++ b/asm/ov21_021D76B0.s @@ -0,0 +1,1971 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D76B0 +ov21_021D76B0: ; 0x021D76B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021D7728 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D7770 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D7798 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021D7814 + str r0, [r5, #0x24] + ldr r0, _021D76F8 ; =ov21_021D7818 + str r0, [r5, #8] + ldr r0, _021D76FC ; =ov21_021D7860 + str r0, [r5, #0xc] + ldr r0, _021D7700 ; =ov21_021D78AC + str r0, [r5, #0x10] + ldr r0, _021D7704 ; =ov21_021D78C0 + str r0, [r5, #0x14] + ldr r0, _021D7708 ; =ov21_021D7950 + str r0, [r5, #0x18] + ldr r0, _021D770C ; =ov21_021D79E4 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D76F8: .word ov21_021D7818 +_021D76FC: .word ov21_021D7860 +_021D7700: .word ov21_021D78AC +_021D7704: .word ov21_021D78C0 +_021D7708: .word ov21_021D7950 +_021D770C: .word ov21_021D79E4 + thumb_func_end ov21_021D76B0 + + thumb_func_start ov21_021D7710 +ov21_021D7710: ; 0x021D7710 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021D77D4 + ldr r0, [r4, #0] + bl ov21_021D77E8 + ldr r0, [r4, #0x20] + bl ov21_021D77FC + pop {r4, pc} + thumb_func_end ov21_021D7710 + + thumb_func_start ov21_021D7728 +ov21_021D7728: ; 0x021D7728 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x28 + add r5, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D773C + bl sub_02022974 +_021D773C: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x28 + bl sub_020D5124 + add r0, r6, #0 + mov r1, #0 + bl ov21_021D1410 + ldr r0, [r0, #0] + mov r1, #0 + str r0, [r4, #0x1c] + add r2, r4, #0 + mov r0, #4 +_021D7758: + add r1, r1, #1 + stmia r2!, {r0} + cmp r1, #7 + blt _021D7758 + add r0, r6, #0 + bl ov21_021D13A0 + str r0, [r4, #0x20] + str r5, [r4, #0x24] + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7728 + + thumb_func_start ov21_021D7770 +ov21_021D7770: ; 0x021D7770 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021D7782 + bl sub_02022974 +_021D7782: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D7770 + + thumb_func_start ov21_021D7798 +ov21_021D7798: ; 0x021D7798 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021D7814 + add r7, r0, #0 + mov r1, #0x14 + mul r7, r1 + add r0, r5, #0 + add r1, r7, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D77B8 + bl sub_02022974 +_021D77B8: + add r0, r4, #0 + mov r1, #0 + add r2, r7, #0 + bl sub_020D5124 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + mov r3, #1 + bl ov21_021D4878 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7798 + + thumb_func_start ov21_021D77D4 +ov21_021D77D4: ; 0x021D77D4 + push {r4, lr} + add r4, r0, #0 + bne _021D77DE + bl sub_02022974 +_021D77DE: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D77D4 + + thumb_func_start ov21_021D77E8 +ov21_021D77E8: ; 0x021D77E8 + push {r4, lr} + add r4, r0, #0 + bne _021D77F2 + bl sub_02022974 +_021D77F2: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D77E8 + + thumb_func_start ov21_021D77FC +ov21_021D77FC: ; 0x021D77FC + push {r4, lr} + add r4, r0, #0 + bne _021D7806 + bl sub_02022974 +_021D7806: + add r0, r4, #0 + bl ov21_021D4660 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov21_021D77FC + + thumb_func_start ov21_021D7814 +ov21_021D7814: ; 0x021D7814 + mov r0, #1 + bx lr + thumb_func_end ov21_021D7814 + + thumb_func_start ov21_021D7818 +ov21_021D7818: ; 0x021D7818 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + mov r1, #0x24 + bl sub_02018144 + str r0, [r5, #8] + cmp r0, #0 + bne _021D7830 + bl sub_02022974 +_021D7830: + ldr r0, [r5, #8] + mov r1, #0 + mov r2, #0x24 + bl sub_020D5124 + ldr r1, _021D785C ; =0x000004CD + ldr r0, [r5, #8] + add r2, r4, #0 + str r1, [r0, #0x1c] + mov r1, #0 + mov r0, #4 +_021D7846: + add r1, r1, #1 + stmia r2!, {r0} + cmp r1, #7 + blt _021D7846 + ldr r0, [r5, #8] + ldr r2, [r5, #4] + add r1, r4, #0 + bl ov21_021D7A64 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D785C: .word 0x000004CD + thumb_func_end ov21_021D7818 + + thumb_func_start ov21_021D7860 +ov21_021D7860: ; 0x021D7860 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021D7870 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D7870: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021D787A + mov r0, #0 + pop {r3, r4, r5, pc} +_021D787A: + ldr r2, [r5, #0x1c] + add r0, r4, #0 + ldr r1, [r2, #0xc] + ldr r2, [r2, #8] + bl ov21_021D8434 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D7B20 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0x20] + cmp r0, #0 + bne _021D78A0 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021D82A8 + b _021D78A6 +_021D78A0: + mov r0, #0 + str r0, [r4, #0xc] + str r0, [r4, #0x10] +_021D78A6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7860 + + thumb_func_start ov21_021D78AC +ov21_021D78AC: ; 0x021D78AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl ov21_021D7B70 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021D78AC + + thumb_func_start ov21_021D78C0 +ov21_021D78C0: ; 0x021D78C0 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r3, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021D794C + add r5, r1, r1 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_021D78DA: ; jump table + .short _021D78E4 - _021D78DA - 2 ; case 0 + .short _021D7908 - _021D78DA - 2 ; case 1 + .short _021D7918 - _021D78DA - 2 ; case 2 + .short _021D7932 - _021D78DA - 2 ; case 3 + .short _021D7944 - _021D78DA - 2 ; case 4 +_021D78E4: + ldr r0, [r4, #4] + mov r1, #0x3c + bl sub_02018144 + str r0, [r4, #8] + cmp r0, #0 + bne _021D78F6 + bl sub_02022974 +_021D78F6: + ldr r0, [r4, #8] + mov r1, #0 + mov r2, #0x3c + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D794C +_021D7908: + add r1, r3, #0 + ldr r3, [r4, #4] + bl ov21_021D7C64 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D794C +_021D7918: + mov r1, #0 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #4 + sub r2, #0x10 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D794C +_021D7932: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021D794C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D794C +_021D7944: + add r0, r1, #1 + str r0, [r4, #0] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D794C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D78C0 + + thumb_func_start ov21_021D7950 +ov21_021D7950: ; 0x021D7950 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [r1, #8] + add r5, r2, #0 + add r7, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r5, #0] + ldr r6, [r3, #8] + bl ov21_021D144C + ldr r0, [r4, #4] + ldr r1, [r5, #4] + bl ov21_021D144C + ldr r0, [r4, #8] + ldr r1, [r5, #8] + bl ov21_021D144C + ldr r0, [r4, #0x18] + ldr r1, [r5, #0xc] + bl ov21_021D144C + ldr r0, [r4, #0x1c] + ldr r1, [r5, #0x10] + bl ov21_021D144C + mov r2, #5 + str r2, [sp] + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + sub r2, #0x13 + mov r3, #3 + bl ov21_021D84A8 + mov r2, #5 + str r2, [sp] + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + sub r2, #0x13 + mov r3, #3 + bl ov21_021D84A8 + mov r2, #5 + str r2, [sp] + ldr r0, [r4, #8] + ldr r1, [r4, #0x14] + sub r2, #0x13 + mov r3, #2 + bl ov21_021D84A8 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0x20] + cmp r0, #0 + bne _021D79D2 + mov r0, #0x83 + ldr r1, [r6, #0xc] + lsl r0, r0, #2 + bl sub_0201D580 + add r2, r0, #0 + ldr r3, [r6, #0x1c] + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021D8354 + b _021D79E0 +_021D79D2: + cmp r0, #1 + bne _021D79E0 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov21_021D83C0 +_021D79E0: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D7950 + + thumb_func_start ov21_021D79E4 +ov21_021D79E4: ; 0x021D79E4 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0] + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021D7A5C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D7A00: ; jump table + .short _021D7A0A - _021D7A00 - 2 ; case 0 + .short _021D7A24 - _021D7A00 - 2 ; case 1 + .short _021D7A36 - _021D7A00 - 2 ; case 2 + .short _021D7A46 - _021D7A00 - 2 ; case 3 + .short _021D7A56 - _021D7A00 - 2 ; case 4 +_021D7A0A: + mov r0, #2 + str r0, [sp] + mov r0, #4 + add r1, r0, #0 + sub r1, #0x14 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D7A5C +_021D7A24: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021D7A5C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D7A5C +_021D7A36: + add r1, r2, #0 + ldr r2, [r4, #4] + bl ov21_021D7CAC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D7A5C +_021D7A46: + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D7A5C +_021D7A56: + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_021D7A5C: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D79E4 + + thumb_func_start ov21_021D7A64 +ov21_021D7A64: ; 0x021D7A64 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #0x1c + bl sub_02018144 + str r0, [r5, #8] + mov r0, #0x60 + str r0, [sp] + ldr r0, [r5, #8] + mov r1, #0x10 + mov r2, #0x40 + mov r3, #0 + bl ov21_021D154C + mov r0, #0x60 + str r0, [sp] + ldr r0, [r5, #8] + mov r1, #0x40 + add r0, r0, #4 + mov r2, #0x70 + mov r3, #0 + bl ov21_021D154C + mov r0, #0x60 + str r0, [sp] + ldr r0, [r5, #8] + mov r1, #0x70 + add r0, #8 + mov r2, #0xc0 + mov r3, #0 + bl ov21_021D154C + mov r0, #0x84 + str r0, [sp] + ldr r0, [r5, #8] + mov r1, #0x38 + add r0, #0xc + mov r2, #0x48 + mov r3, #0x74 + bl ov21_021D154C + mov r0, #0x84 + str r0, [sp] + ldr r0, [r5, #8] + mov r1, #0x8a + add r0, #0x10 + mov r2, #0x9a + mov r3, #0x74 + bl ov21_021D154C + ldr r0, [r5, #8] + mov r1, #0xfe + strb r1, [r0, #0x14] + ldr r0, [r5, #8] + mov r1, #0xf8 + strb r1, [r0, #0x15] + ldr r0, [r5, #8] + mov r1, #0x68 + strb r1, [r0, #0x16] + ldr r0, [r5, #8] + mov r2, #0x10 + strb r1, [r0, #0x17] + mov r0, #0xb4 + str r0, [sp] + ldr r0, [r5, #8] + mov r1, #0 + add r0, #0x18 + mov r3, #0x74 + bl ov21_021D154C + add r0, r6, #0 + mov r1, #8 + bl sub_02018144 + add r3, r0, #0 + str r5, [r3, #0] + str r4, [r3, #4] + str r3, [r5, #4] + str r6, [sp] + ldr r0, [r5, #8] + ldr r2, _021D7B1C ; =ov21_021D7B8C + mov r1, #7 + bl sub_02023FCC + str r0, [r5, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021D7B1C: .word ov21_021D7B8C + thumb_func_end ov21_021D7A64 + + thumb_func_start ov21_021D7B20 +ov21_021D7B20: ; 0x021D7B20 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + add r2, r4, #0 + mov r0, #4 +_021D7B2C: + add r1, r1, #1 + stmia r2!, {r0} + cmp r1, #7 + blt _021D7B2C + add r0, r4, #0 + bl ov21_021D84B8 + ldr r0, [r5, #0] + bl sub_0202404C + ldr r1, [r4, #0x1c] + add r0, r5, #0 + ldr r1, [r1, #4] + bl ov21_021D84E0 + cmp r0, #0 + bne _021D7B52 + mov r0, #0 + str r0, [r5, #0xc] +_021D7B52: + ldr r0, [r4, #0x14] + cmp r0, #4 + ldr r0, [r5, #0x1c] + beq _021D7B64 + ldr r1, [r5, #0xc] + bl ov21_021D8580 + str r0, [r5, #0x1c] + pop {r3, r4, r5, pc} +_021D7B64: + mov r1, #0 + bl ov21_021D8580 + str r0, [r5, #0x1c] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7B20 + + thumb_func_start ov21_021D7B70 +ov21_021D7B70: ; 0x021D7B70 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} + thumb_func_end ov21_021D7B70 + + thumb_func_start ov21_021D7B8C +ov21_021D7B8C: ; 0x021D7B8C + push {r4, r5, r6, lr} + ldr r5, [r2, #4] + add r6, r0, #0 + ldr r0, [r5, #0x1c] + ldr r4, [r2, #0] + ldr r0, [r0, #4] + lsl r2, r6, #2 + str r1, [r5, r2] + cmp r1, #0 + beq _021D7BA6 + cmp r1, #2 + beq _021D7BB2 + b _021D7C5A +_021D7BA6: + ldr r0, _021D7C60 ; =0x021BF6BC + ldrh r1, [r0, #0x1c] + str r1, [r4, #0x14] + ldrh r0, [r0, #0x1e] + str r0, [r4, #0x18] + pop {r4, r5, r6, pc} +_021D7BB2: + cmp r6, #6 + bhi _021D7C26 + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D7BC2: ; jump table + .short _021D7BD0 - _021D7BC2 - 2 ; case 0 + .short _021D7BD8 - _021D7BC2 - 2 ; case 1 + .short _021D7BE0 - _021D7BC2 - 2 ; case 2 + .short _021D7BE8 - _021D7BC2 - 2 ; case 3 + .short _021D7BF8 - _021D7BC2 - 2 ; case 4 + .short _021D7C26 - _021D7BC2 - 2 ; case 5 + .short _021D7C0E - _021D7BC2 - 2 ; case 6 +_021D7BD0: + ldr r0, [r5, #0x1c] + mov r1, #1 + str r1, [r0, #0x34] + b _021D7C26 +_021D7BD8: + ldr r0, [r5, #0x1c] + mov r1, #1 + str r1, [r0, #0x30] + b _021D7C26 +_021D7BE0: + ldr r0, [r5, #0x1c] + mov r1, #1 + str r1, [r0, #0x2c] + b _021D7C26 +_021D7BE8: + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _021D7C26 + add r0, r5, #0 + mov r1, #0 + bl ov21_021D853C + b _021D7C26 +_021D7BF8: + ldr r1, [r4, #0x20] + cmp r1, #0 + bne _021D7C26 + bl ov21_021D3768 + add r1, r0, #0 + add r0, r5, #0 + sub r1, r1, #1 + bl ov21_021D853C + b _021D7C26 +_021D7C0E: + ldr r0, [r5, #0x1c] + mov r1, #0x5d + ldr r2, [r0, #4] + lsl r1, r1, #6 + ldr r1, [r2, r1] + cmp r1, #0 + bne _021D7C22 + mov r1, #1 + str r1, [r0, #0x28] + b _021D7C26 +_021D7C22: + mov r1, #1 + str r1, [r0, #0x24] +_021D7C26: + cmp r6, #5 + bne _021D7C54 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0x20] + cmp r0, #0 + bne _021D7C4A + add r0, r4, #0 + bl ov21_021D8324 + ldr r1, [r4, #0xc] + cmp r1, #0x10 + bgt _021D7C4A + mov r0, #0xf + mvn r0, r0 + cmp r1, r0 + blt _021D7C4A + mov r0, #0 + str r0, [r4, #0xc] +_021D7C4A: + ldr r0, _021D7C60 ; =0x021BF6BC + ldrh r1, [r0, #0x1c] + str r1, [r4, #0x14] + ldrh r0, [r0, #0x1e] + str r0, [r4, #0x18] +_021D7C54: + mov r0, #1 + str r0, [r4, #0x20] + pop {r4, r5, r6, pc} +_021D7C5A: + mov r0, #0 + str r0, [r4, #0x20] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D7C60: .word 0x021BF6BC + thumb_func_end ov21_021D7B8C + + thumb_func_start ov21_021D7C64 +ov21_021D7C64: ; 0x021D7C64 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021D7CD8 + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021D820C + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov21_021D7D8C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov21_021D7E80 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov21_021D8018 + mov r0, #7 + mov r1, #3 + bl sub_02019060 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D7C64 + + thumb_func_start ov21_021D7CAC +ov21_021D7CAC: ; 0x021D7CAC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov21_021D81EC + add r0, r5, #0 + bl ov21_021D7FEC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D7E3C + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021D828C + mov r0, #7 + mov r1, #1 + bl sub_02019060 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D7CAC + + thumb_func_start ov21_021D7CD8 +ov21_021D7CD8: ; 0x021D7CD8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r7, r1, #0 + ldr r6, [r0, #0] + mov r1, #0 + add r4, r2, #0 + str r1, [sp] + str r4, [sp, #4] + mov r2, #4 + add r3, r1, #0 + bl ov21_021D276C + ldr r0, [r7, #0x1c] + mov r1, #0x5d + ldr r0, [r0, #4] + lsl r1, r1, #6 + ldr r1, [r0, r1] + cmp r1, #1 + bne _021D7D16 + mov r0, #0x20 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0] + mov r1, #1 + mov r2, #4 + mov r3, #0x60 + bl ov21_021D276C + b _021D7D30 +_021D7D16: + bl ov21_021D36D8 + cmp r0, #1 + bne _021D7D30 + mov r0, #0x20 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0] + mov r1, #0x19 + mov r2, #4 + mov r3, #0x60 + bl ov21_021D276C +_021D7D30: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r4, [sp, #0xc] + ldr r0, [r5, #0] + mov r1, #0x1d + add r2, r6, #0 + mov r3, #6 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x29 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r4, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r6, #0 + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + mov r1, #6 + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7CD8 + + thumb_func_start ov21_021D7D8C +ov21_021D7D8C: ; 0x021D7D8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021D7E2C ; =0x0000043C + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x54 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #0x2c] + bl sub_0200A3DC + ldr r0, [r5, #0x2c] + bl sub_02009D4C + ldr r0, _021D7E30 ; =0x000003EB + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0xc + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x30] + bl sub_0200A640 + ldr r0, [r5, #0x30] + bl sub_02009D4C + ldr r0, _021D7E34 ; =0x0000043A + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x52 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x34] + ldr r0, _021D7E38 ; =0x0000043B + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x53 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x38] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D7E2C: .word 0x0000043C +_021D7E30: .word 0x000003EB +_021D7E34: .word 0x0000043A +_021D7E38: .word 0x0000043B + thumb_func_end ov21_021D7D8C + + thumb_func_start ov21_021D7E3C +ov21_021D7E3C: ; 0x021D7E3C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x2c] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x30] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x2c] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x30] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x34] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x38] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D7E3C + + thumb_func_start ov21_021D7E80 +ov21_021D7E80: ; 0x021D7E80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x70 + add r7, r3, #0 + add r5, r0, #0 + mov r0, #0 + ldr r4, [r1, #0] + ldr r3, _021D7FE8 ; =0x0000043B + add r6, r2, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #5 + str r2, [sp, #0x10] + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x4c + sub r2, #0x50 + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #8 + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + mov r0, #3 + lsl r0, r0, #0x10 + str r0, [sp, #0x34] + lsl r1, r1, #0xe + lsl r0, r0, #2 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + str r7, [sp, #0x48] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0] + mov r1, #2 + bl sub_02021D6C + ldr r0, [r6, #0x1c] + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #1 + bne _021D7F18 + ldr r0, [r5, #0] + mov r1, #0 + bl sub_02021CAC +_021D7F18: + mov r0, #3 + lsl r0, r0, #0x10 + mov r1, #0x16 + str r0, [sp, #0x34] + lsl r1, r1, #0xe + lsl r0, r0, #2 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #4] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r6, #0x1c] + mov r1, #1 + ldr r0, [r0, #4] + bl ov21_021D36A4 + cmp r0, #0 + beq _021D7F54 + ldr r0, [r6, #0x1c] + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #1 + bne _021D7F5C +_021D7F54: + ldr r0, [r5, #4] + mov r1, #0 + bl sub_02021CAC +_021D7F5C: + mov r0, #3 + lsl r0, r0, #0x10 + mov r1, #0x26 + str r0, [sp, #0x34] + lsl r1, r1, #0xe + lsl r0, r0, #2 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + mov r1, #1 + str r0, [r5, #8] + bl sub_02021D6C + mov r0, #0x1f + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r1, #1 + mov r0, #3 + lsl r1, r1, #0x12 + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + mov r1, #3 + str r0, [r5, #0x18] + bl sub_02021D6C + mov r0, #0x1f + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r1, #0x92 + mov r0, #3 + lsl r1, r1, #0xc + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + mov r1, #4 + str r0, [r5, #0x1c] + bl sub_02021D6C + mov r0, #0x1f + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r1, #2 + mov r0, #3 + lsl r1, r1, #0xe + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + mov r1, #5 + str r0, [r5, #0x20] + bl sub_02021D6C + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D7FE8: .word 0x0000043B + thumb_func_end ov21_021D7E80 + + thumb_func_start ov21_021D7FEC +ov21_021D7FEC: ; 0x021D7FEC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02021BD4 + ldr r0, [r4, #4] + bl sub_02021BD4 + ldr r0, [r4, #8] + bl sub_02021BD4 + ldr r0, [r4, #0x18] + bl sub_02021BD4 + ldr r0, [r4, #0x1c] + bl sub_02021BD4 + ldr r0, [r4, #0x20] + bl sub_02021BD4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D7FEC + + thumb_func_start ov21_021D8018 +ov21_021D8018: ; 0x021D8018 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r2, #0 + add r7, r3, #0 + ldr r4, [r1, #0] + cmp r0, #0 + bne _021D802E + bl sub_02022974 +_021D802E: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021D81E4 ; =0x000003EB + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + mov r1, #0 + bl sub_0200A72C + mov r1, #0x27 + mvn r1, r1 + str r1, [sp, #0x28] + add r1, #0x1a + str r1, [sp, #0x2c] + mov r1, #0 + str r1, [sp, #0x30] + str r1, [sp, #0x34] + mov r1, #2 + str r0, [sp, #0x20] + str r1, [sp, #0x38] + str r7, [sp, #0x3c] + bl sub_0201FAB4 + add r7, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0xa + mov r2, #4 + bl ov21_021D4D6C + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, [sp, #0x10] + ldr r2, _021D81E8 ; =0x000002B9 + mov r3, #7 + bl ov21_021D4DAC + ldr r0, [sp, #0x10] + str r0, [sp, #0x1c] + ldr r0, [r5, #0] + str r0, [sp, #0x24] + add r0, sp, #0x18 + bl ov21_021D4CA0 + str r0, [r5, #0xc] + ldr r0, [r0, #0] + add r1, r7, #3 + bl sub_02012A60 + ldr r0, [r6, #0x1c] + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #1 + bne _021D80BC + ldr r0, [r5, #0xc] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 +_021D80BC: + ldr r0, [sp, #0x10] + bl ov21_021D4DA0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0xa + mov r2, #4 + bl ov21_021D4D6C + str r0, [sp, #8] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, [sp, #8] + ldr r2, _021D81E8 ; =0x000002B9 + mov r3, #5 + bl ov21_021D4DAC + ldr r0, [sp, #8] + str r0, [sp, #0x1c] + ldr r0, [r5, #4] + str r0, [sp, #0x24] + add r0, sp, #0x18 + bl ov21_021D4CA0 + str r0, [r5, #0x10] + ldr r0, [r0, #0] + add r1, r7, #3 + bl sub_02012A60 + ldr r0, [r6, #0x1c] + mov r1, #1 + ldr r0, [r0, #4] + bl ov21_021D36A4 + cmp r0, #0 + beq _021D811C + ldr r0, [r6, #0x1c] + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #1 + bne _021D8126 +_021D811C: + ldr r0, [r5, #0x10] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 +_021D8126: + ldr r0, [sp, #8] + bl ov21_021D4DA0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0xa + mov r2, #4 + bl ov21_021D4D6C + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, [sp, #0x14] + ldr r2, _021D81E8 ; =0x000002B9 + mov r3, #0x1d + bl ov21_021D4DAC + ldr r0, [sp, #0x14] + str r0, [sp, #0x1c] + ldr r0, [r5, #8] + str r0, [sp, #0x24] + add r0, sp, #0x18 + bl ov21_021D4CA0 + str r0, [r5, #0x14] + ldr r0, [r0, #0] + add r1, r7, #2 + bl sub_02012A60 + ldr r0, [sp, #0x14] + bl ov21_021D4DA0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0xe + mov r2, #2 + bl ov21_021D4D6C + str r0, [sp, #0xc] + ldr r0, [r6, #0x1c] + ldr r2, _021D81E8 ; =0x000002B9 + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #0 + bne _021D81A6 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, [sp, #0xc] + mov r3, #0x6b + bl ov21_021D4DAC + b _021D81BA +_021D81A6: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, [sp, #0xc] + mov r3, #0x6c + bl ov21_021D4DAC +_021D81BA: + ldr r0, [sp, #0xc] + str r0, [sp, #0x1c] + ldr r0, [r5, #0x20] + str r0, [sp, #0x24] + mov r0, #0xa + str r0, [sp, #0x28] + sub r0, #0x12 + str r0, [sp, #0x2c] + add r0, sp, #0x18 + bl ov21_021D4CA0 + str r0, [r5, #0x24] + ldr r0, [r0, #0] + add r1, r7, #1 + bl sub_02012A60 + ldr r0, [sp, #0xc] + bl ov21_021D4DA0 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D81E4: .word 0x000003EB +_021D81E8: .word 0x000002B9 + thumb_func_end ov21_021D8018 + + thumb_func_start ov21_021D81EC +ov21_021D81EC: ; 0x021D81EC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl ov21_021D4D1C + ldr r0, [r4, #0x10] + bl ov21_021D4D1C + ldr r0, [r4, #0x14] + bl ov21_021D4D1C + ldr r0, [r4, #0x24] + bl ov21_021D4D1C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D81EC + + thumb_func_start ov21_021D820C +ov21_021D820C: ; 0x021D820C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + ldr r4, [r0, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r6, [sp, #0xc] + mov r1, #0x1b + add r2, r4, #0 + mov r3, #7 + bl ov21_021D2724 + str r6, [sp] + ldr r0, [r5, #0] + mov r1, #0x25 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #7 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r4, #0 + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + mov r1, #7 + bl sub_0201C3C0 + mov r2, #0 + add r3, r2, #0 + add r0, r4, #0 + mov r1, #7 + sub r3, #0x78 + bl sub_02019184 + add r0, r4, #0 + mov r1, #7 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D820C + + thumb_func_start ov21_021D828C +ov21_021D828C: ; 0x021D828C + push {r4, lr} + ldr r0, [r0, #0] + add r3, r1, #0 + ldr r4, [r0, #0] + mov r0, #7 + mov r1, #0x40 + mov r2, #0 + bl sub_02019690 + add r0, r4, #0 + mov r1, #7 + bl sub_02019EBC + pop {r4, pc} + thumb_func_end ov21_021D828C + + thumb_func_start ov21_021D82A8 +ov21_021D82A8: ; 0x021D82A8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0x1c] + add r5, r0, #0 + ldr r3, [r2, #0xc] + ldr r1, [r2, #4] + cmp r3, #0 + bgt _021D82E4 + ldr r3, [r5, #0x10] + cmp r3, #0 + beq _021D82E0 + bl ov21_021D8508 + cmp r0, #0 + bne _021D82D0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D8530 + b _021D82E4 +_021D82D0: + mov r1, #0xa + ldr r0, [r4, #0x1c] + lsl r1, r1, #6 + str r1, [r0, #0xc] + ldr r0, _021D8320 ; =0x0000068B + bl sub_02005748 + b _021D82E4 +_021D82E0: + mov r0, #0 + str r0, [r2, #8] +_021D82E4: + ldr r0, [r5, #0x10] + cmp r0, #0 + bge _021D82F2 + ldr r0, [r4, #0x1c] + mov r1, #1 + str r1, [r0, #8] + b _021D82FA +_021D82F2: + ble _021D82FA + ldr r0, [r4, #0x1c] + mov r1, #2 + str r1, [r0, #8] +_021D82FA: + ldr r2, [r4, #0x1c] + ldr r0, [r2, #8] + cmp r0, #0 + beq _021D831C + ldr r1, [r5, #0x10] + cmp r1, #0 + bge _021D830A + neg r1, r1 +_021D830A: + ldr r0, [r2, #0xc] + sub r0, r0, r1 + str r0, [r2, #0xc] + ldr r1, [r4, #0x1c] + ldr r0, [r1, #0xc] + cmp r0, #0 + bge _021D831C + mov r0, #0 + str r0, [r1, #0xc] +_021D831C: + pop {r3, r4, r5, pc} + nop +_021D8320: .word 0x0000068B + thumb_func_end ov21_021D82A8 + + thumb_func_start ov21_021D8324 +ov21_021D8324: ; 0x021D8324 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + str r0, [sp] + ldr r3, _021D8350 ; =0x021BF6BC + ldr r0, [r4, #0x14] + ldrh r2, [r3, #0x1c] + ldrh r3, [r3, #0x1e] + ldr r1, [r4, #0x18] + sub r0, #0xf8 + sub r1, #0x68 + sub r2, #0xf8 + sub r3, #0x68 + bl sub_0201D4CC + mov r1, #0xa + mul r1, r0 + str r1, [r4, #0xc] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_021D8350: .word 0x021BF6BC + thumb_func_end ov21_021D8324 + + thumb_func_start ov21_021D8354 +ov21_021D8354: ; 0x021D8354 + push {r4, r5, r6, lr} + add r5, r0, #0 + lsl r0, r2, #0xc + add r4, r1, #0 + asr r6, r3, #0x1f + add r2, r3, #0 + asr r1, r0, #0x1f + add r3, r6, #0 + bl sub_020E1F1C + mov r3, #2 + mov r6, #0 + lsl r3, r3, #0xa + add r3, r0, r3 + adc r1, r6 + lsl r0, r1, #0x14 + lsr r1, r3, #0xc + orr r1, r0 + asr r0, r1, #0xc + ldrh r2, [r5, #0x28] + mov r1, #0xb6 + add r0, r2, r0 + strh r0, [r5, #0x28] + ldrh r0, [r5, #0x28] + strh r0, [r5, #0x28] + bl sub_020E1F6C + add r3, r0, #0 + ldr r0, [r4, #0] + lsl r3, r3, #0x10 + ldr r0, [r0, #0] + mov r1, #7 + add r2, r6, #0 + lsr r3, r3, #0x10 + bl sub_0201C660 + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + mov r2, #9 + mov r3, #0x80 + bl sub_0201C718 + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + mov r2, #0xc + mov r3, #0x68 + bl sub_0201C718 + ldrh r0, [r5, #0x28] + strh r0, [r5, #0x2a] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8354 + + thumb_func_start ov21_021D83C0 +ov21_021D83C0: ; 0x021D83C0 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + ldr r6, [r7, #0x1c] + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0xa + ldr r0, [r6, #0xc] + lsl r1, r1, #6 + sub r2, r1, r0 + ldr r0, _021D8430 ; =0x000011C7 + mul r0, r2 + bl sub_020E1F6C + ldr r1, [r6, #8] + cmp r1, #1 + bne _021D83E2 + neg r0, r0 +_021D83E2: + ldrh r1, [r5, #0x2a] + add r0, r1, r0 + strh r0, [r5, #0x28] + ldrh r0, [r5, #0x28] + mov r1, #0xb6 + strh r0, [r5, #0x28] + bl sub_020E1F6C + add r3, r0, #0 + ldr r0, [r4, #0] + lsl r3, r3, #0x10 + ldr r0, [r0, #0] + mov r1, #7 + mov r2, #0 + lsr r3, r3, #0x10 + bl sub_0201C660 + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + mov r2, #9 + mov r3, #0x80 + bl sub_0201C718 + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + mov r2, #0xc + mov r3, #0x68 + bl sub_0201C718 + ldr r0, [r7, #0x1c] + ldr r0, [r0, #0xc] + cmp r0, #0 + bne _021D842C + ldrh r0, [r5, #0x28] + strh r0, [r5, #0x2a] +_021D842C: + pop {r3, r4, r5, r6, r7, pc} + nop +_021D8430: .word 0x000011C7 + thumb_func_end ov21_021D83C0 + + thumb_func_start ov21_021D8434 +ov21_021D8434: ; 0x021D8434 + push {r3, r4} + ldr r3, [r0, #0xc] + cmp r3, #0 + ble _021D844C + sub r3, r3, #2 + cmp r3, #4 + blt _021D8446 + str r3, [r0, #0xc] + b _021D845C +_021D8446: + mov r3, #4 + str r3, [r0, #0xc] + b _021D845C +_021D844C: + add r4, r3, #2 + mov r3, #3 + mvn r3, r3 + cmp r4, r3 + bgt _021D845A + str r4, [r0, #0xc] + b _021D845C +_021D845A: + str r3, [r0, #0xc] +_021D845C: + ldr r3, [r0, #0xc] + str r3, [r0, #0x10] + ldr r4, [r0, #0xc] + cmp r4, #0x21 + bgt _021D849E + mov r3, #0x20 + mvn r3, r3 + cmp r4, r3 + blt _021D849E + cmp r1, #0 + bne _021D848C + mov r3, #0 + str r3, [r0, #0x10] + ldr r2, [r0, #0xc] + cmp r2, #4 + bgt _021D849E + sub r1, r3, #4 + cmp r2, r1 + blt _021D849E + ldr r1, _021D84A4 ; =0x000004CD + str r3, [r0, #0xc] + str r1, [r0, #0x1c] + pop {r3, r4} + bx lr +_021D848C: + cmp r2, #1 + bne _021D8498 + str r3, [r0, #0x10] + str r3, [r0, #0xc] + pop {r3, r4} + bx lr +_021D8498: + mov r1, #0x21 + str r1, [r0, #0x10] + str r1, [r0, #0xc] +_021D849E: + pop {r3, r4} + bx lr + nop +_021D84A4: .word 0x000004CD + thumb_func_end ov21_021D8434 + + thumb_func_start ov21_021D84A8 +ov21_021D84A8: ; 0x021D84A8 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + bl ov21_021D1524 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021D84A8 + + thumb_func_start ov21_021D84B8 +ov21_021D84B8: ; 0x021D84B8 + ldr r2, [r0, #0x1c] + ldr r1, [r2, #0x2c] + cmp r1, #0 + beq _021D84C6 + mov r1, #2 + str r1, [r0, #8] + bx lr +_021D84C6: + ldr r1, [r2, #0x34] + cmp r1, #0 + beq _021D84D2 + mov r1, #2 + str r1, [r0, #0] + bx lr +_021D84D2: + ldr r1, [r2, #0x30] + cmp r1, #0 + beq _021D84DC + mov r1, #2 + str r1, [r0, #4] +_021D84DC: + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D84B8 + + thumb_func_start ov21_021D84E0 +ov21_021D84E0: ; 0x021D84E0 + push {r3, lr} + ldr r0, [r0, #0xc] + cmp r0, #0 + beq _021D8502 + bge _021D84EE + mov r2, #1 + b _021D84F2 +_021D84EE: + mov r2, #0 + mvn r2, r2 +_021D84F2: + add r0, r1, #0 + add r1, r2, #0 + bl ov21_021D387C + cmp r0, #0 + bne _021D8502 + mov r0, #0 + pop {r3, pc} +_021D8502: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D84E0 + + thumb_func_start ov21_021D8508 +ov21_021D8508: ; 0x021D8508 + push {r3, lr} + ldr r0, [r0, #0x10] + cmp r0, #0 + beq _021D852A + bge _021D8516 + mov r2, #1 + b _021D851A +_021D8516: + mov r2, #0 + mvn r2, r2 +_021D851A: + add r0, r1, #0 + add r1, r2, #0 + bl ov21_021D3844 + cmp r0, #0 + bne _021D852A + mov r0, #0 + pop {r3, pc} +_021D852A: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8508 + + thumb_func_start ov21_021D8530 +ov21_021D8530: ; 0x021D8530 + mov r2, #0 + str r2, [r0, #0x10] + str r2, [r0, #0xc] + ldr r0, [r1, #0x1c] + str r2, [r0, #8] + bx lr + thumb_func_end ov21_021D8530 + + thumb_func_start ov21_021D853C +ov21_021D853C: ; 0x021D853C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + add r5, r1, #0 + bl ov21_021D5B68 + cmp r0, #0 + beq _021D857C + ldr r0, [r4, #0x1c] + add r1, r5, #0 + ldr r0, [r0, #4] + bl ov21_021D36FC + ldr r1, [r4, #0x20] + mov r2, #1 + ldr r0, [r1, #0] + mov r3, #2 + orr r0, r2 + str r0, [r1, #0] + ldr r1, [r4, #0x1c] + mov r0, #0 + str r0, [r1, #0xc] + ldr r1, [r4, #0x1c] + str r3, [r1, #0x20] + ldr r1, [r4, #0x1c] + str r2, [r1, #0x10] + ldr r1, [r4, #0x1c] + str r0, [r1, #0x14] + ldr r1, [r4, #0x1c] + str r0, [r1, #8] + ldr r1, [r4, #0x1c] + str r0, [r1, #0x1c] +_021D857C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D853C + + thumb_func_start ov21_021D8580 +ov21_021D8580: ; 0x021D8580 + cmp r1, #0 + bge _021D8586 + neg r1, r1 +_021D8586: + cmp r1, #0x40 + bge _021D8598 + add r2, r0, #0 + ldr r1, _021D85A8 ; =0x000004CD + sub r2, #0x29 + cmp r2, r1 + blt _021D85A6 + sub r0, #0x29 + bx lr +_021D8598: + ldr r1, _021D85AC ; =0x00000333 + add r2, r0, r1 + mov r1, #1 + lsl r1, r1, #0xc + cmp r2, r1 + bgt _021D85A6 + add r0, r2, #0 +_021D85A6: + bx lr + ; .align 2, 0 +_021D85A8: .word 0x000004CD +_021D85AC: .word 0x00000333 + thumb_func_end ov21_021D8580 \ No newline at end of file diff --git a/asm/ov21_021D85B0.s b/asm/ov21_021D85B0.s new file mode 100644 index 000000000..c6b3eb514 --- /dev/null +++ b/asm/ov21_021D85B0.s @@ -0,0 +1,2055 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D85B0 +ov21_021D85B0: ; 0x021D85B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021D86E8 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D8724 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D874C + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021D87C8 + str r0, [r5, #0x24] + ldr r0, _021D85F8 ; =ov21_021D87CC + str r0, [r5, #8] + ldr r0, _021D85FC ; =ov21_021D8804 + str r0, [r5, #0xc] + ldr r0, _021D8600 ; =ov21_021D8928 + str r0, [r5, #0x10] + ldr r0, _021D8604 ; =ov21_021D893C + str r0, [r5, #0x14] + ldr r0, _021D8608 ; =ov21_021D89B8 + str r0, [r5, #0x18] + ldr r0, _021D860C ; =ov21_021D89F4 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D85F8: .word ov21_021D87CC +_021D85FC: .word ov21_021D8804 +_021D8600: .word ov21_021D8928 +_021D8604: .word ov21_021D893C +_021D8608: .word ov21_021D89B8 +_021D860C: .word ov21_021D89F4 + thumb_func_end ov21_021D85B0 + + thumb_func_start ov21_021D8610 +ov21_021D8610: ; 0x021D8610 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021D8788 + ldr r0, [r4, #4] + bl ov21_021D879C + ldr r0, [r4, #0x20] + bl ov21_021D87B0 + pop {r4, pc} + thumb_func_end ov21_021D8610 + + thumb_func_start ov21_021D8628 +ov21_021D8628: ; 0x021D8628 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r0, #0] + cmp r5, #4 + blt _021D8636 + bl sub_02022974 +_021D8636: + str r5, [r4, #0xc] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8628 + + thumb_func_start ov21_021D863C +ov21_021D863C: ; 0x021D863C + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D863C + + thumb_func_start ov21_021D8644 +ov21_021D8644: ; 0x021D8644 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r0, #0] + cmp r5, #6 + blt _021D8652 + bl sub_02022974 +_021D8652: + str r5, [r4, #0x10] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8644 + + thumb_func_start ov21_021D8658 +ov21_021D8658: ; 0x021D8658 + ldr r0, [r0, #0] + ldr r0, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D8658 + + thumb_func_start ov21_021D8660 +ov21_021D8660: ; 0x021D8660 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r0, #0] + cmp r5, #0xa + blt _021D866E + bl sub_02022974 +_021D866E: + str r5, [r4, #0x14] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8660 + + thumb_func_start ov21_021D8674 +ov21_021D8674: ; 0x021D8674 + ldr r0, [r0, #0] + ldr r0, [r0, #0x14] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D8674 + + thumb_func_start ov21_021D867C +ov21_021D867C: ; 0x021D867C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + ldr r4, [r0, #0] + cmp r5, #0x12 + blt _021D868C + bl sub_02022974 +_021D868C: + cmp r6, #0 + bne _021D8694 + str r5, [r4, #0x18] + pop {r4, r5, r6, pc} +_021D8694: + str r5, [r4, #0x1c] + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D867C + + thumb_func_start ov21_021D8698 +ov21_021D8698: ; 0x021D8698 + ldr r0, [r0, #0] + cmp r1, #0 + bne _021D86A2 + ldr r0, [r0, #0x18] + bx lr +_021D86A2: + ldr r0, [r0, #0x1c] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D8698 + + thumb_func_start ov21_021D86A8 +ov21_021D86A8: ; 0x021D86A8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r0, #0] + cmp r5, #0xf + blt _021D86B6 + bl sub_02022974 +_021D86B6: + str r5, [r4, #0x20] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D86A8 + + thumb_func_start ov21_021D86BC +ov21_021D86BC: ; 0x021D86BC + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D86BC + + thumb_func_start ov21_021D86C4 +ov21_021D86C4: ; 0x021D86C4 + ldr r2, [r0, #0] + mov r0, #1 + str r0, [r2, #0x24] + str r1, [r2, #0x28] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D86C4 + + thumb_func_start ov21_021D86D0 +ov21_021D86D0: ; 0x021D86D0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x28] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D86D0 + + thumb_func_start ov21_021D86D8 +ov21_021D86D8: ; 0x021D86D8 + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D86D8 + + thumb_func_start ov21_021D86E0 +ov21_021D86E0: ; 0x021D86E0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x34] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D86E0 + + thumb_func_start ov21_021D86E8 +ov21_021D86E8: ; 0x021D86E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x38 + bl sub_02018144 + add r4, r0, #0 + bne _021D86FA + bl sub_02022974 +_021D86FA: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x38 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #0 + bl ov21_021D1410 + ldr r0, [r0, #0] + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D86E8 + + thumb_func_start ov21_021D8724 +ov21_021D8724: ; 0x021D8724 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021D8736 + bl sub_02022974 +_021D8736: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D8724 + + thumb_func_start ov21_021D874C +ov21_021D874C: ; 0x021D874C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021D87C8 + add r7, r0, #0 + mov r1, #0x14 + mul r7, r1 + add r0, r5, #0 + add r1, r7, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021D876C + bl sub_02022974 +_021D876C: + add r0, r4, #0 + mov r1, #0 + add r2, r7, #0 + bl sub_020D5124 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #2 + bl ov21_021D47F0 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D874C + + thumb_func_start ov21_021D8788 +ov21_021D8788: ; 0x021D8788 + push {r4, lr} + add r4, r0, #0 + bne _021D8792 + bl sub_02022974 +_021D8792: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8788 + + thumb_func_start ov21_021D879C +ov21_021D879C: ; 0x021D879C + push {r4, lr} + add r4, r0, #0 + bne _021D87A6 + bl sub_02022974 +_021D87A6: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D879C + + thumb_func_start ov21_021D87B0 +ov21_021D87B0: ; 0x021D87B0 + push {r4, lr} + add r4, r0, #0 + bne _021D87BA + bl sub_02022974 +_021D87BA: + add r0, r4, #0 + bl ov21_021D4660 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov21_021D87B0 + + thumb_func_start ov21_021D87C8 +ov21_021D87C8: ; 0x021D87C8 + mov r0, #1 + bx lr + thumb_func_end ov21_021D87C8 + + thumb_func_start ov21_021D87CC +ov21_021D87CC: ; 0x021D87CC + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + mov r1, #4 + bl sub_02018144 + add r6, r0, #0 + bne _021D87E2 + bl sub_02022974 +_021D87E2: + mov r0, #0 + strb r0, [r6] + strb r0, [r6, #1] + strb r0, [r6, #2] + strb r0, [r6, #3] + str r6, [r5, #8] + str r0, [r4, #0xc] + str r0, [r4, #0x10] + str r0, [r4, #0x14] + str r0, [r4, #0x18] + str r0, [r4, #0x1c] + str r0, [r4, #0x20] + str r0, [r4, #0x24] + str r0, [r4, #0x28] + str r0, [r4, #0x30] + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D87CC + + thumb_func_start ov21_021D8804 +ov21_021D8804: ; 0x021D8804 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + cmp r0, #1 + bne _021D8818 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, pc} +_021D8818: + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _021D8824 + add sp, #0x14 + mov r0, #0 + pop {r4, r5, pc} +_021D8824: + ldr r0, [r5, #0] + cmp r0, #4 + bhi _021D891A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D8836: ; jump table + .short _021D8840 - _021D8836 - 2 ; case 0 + .short _021D8876 - _021D8836 - 2 ; case 1 + .short _021D8894 - _021D8836 - 2 ; case 2 + .short _021D88A4 - _021D8836 - 2 ; case 3 + .short _021D8908 - _021D8836 - 2 ; case 4 +_021D8840: + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021D884A + mov r0, #0 + str r0, [r4, #0x2c] +_021D884A: + ldr r0, [r4, #0x24] + cmp r0, #1 + bne _021D891E + ldr r0, [r4, #0x28] + cmp r0, #0 + bne _021D8866 + ldr r2, [r4, #0] + mov r0, #2 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] + mov r0, #4 + str r0, [r4, #0x30] + b _021D891E +_021D8866: + mov r0, #1 + str r0, [r4, #0x30] + mov r0, #4 + str r0, [r4, #0x34] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D891E +_021D8876: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bpl _021D891E + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #2 + str r0, [r4, #0x30] + mov r0, #0x20 + str r0, [r4, #0x34] + ldr r0, _021D8924 ; =0x000005FF + bl sub_02005748 + b _021D891E +_021D8894: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bpl _021D891E + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D891E +_021D88A4: + ldr r0, [r4, #4] + bl ov21_021D36D8 + ldr r1, [r4, #0x1c] + str r1, [sp] + ldr r1, [r4, #0x20] + str r1, [sp, #4] + str r0, [sp, #8] + ldr r0, [r5, #4] + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + ldr r2, [r4, #0x14] + ldr r3, [r4, #0x18] + bl ov21_021D3464 + cmp r0, #1 + bne _021D88EE + ldr r2, [r4, #0] + mov r0, #2 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] + ldr r0, [r4, #4] + mov r1, #0 + bl ov21_021D3810 + mov r0, #0x5d + ldr r1, [r4, #4] + mov r2, #1 + lsl r0, r0, #6 + str r2, [r1, r0] + ldr r0, [r4, #8] + str r2, [r0, #0x18] + b _021D891E +_021D88EE: + mov r0, #0 + str r0, [r4, #0x28] + str r0, [r4, #0x24] + mov r0, #1 + str r0, [r4, #0x2c] + mov r0, #3 + str r0, [r4, #0x30] + mov r0, #4 + str r0, [r4, #0x34] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D891E +_021D8908: + ldr r0, [r4, #0x34] + sub r0, r0, #1 + str r0, [r4, #0x34] + bpl _021D891E + mov r0, #0 + str r0, [r4, #0x30] + str r0, [r4, #0x34] + str r0, [r5, #0] + b _021D891E +_021D891A: + bl sub_02022974 +_021D891E: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_021D8924: .word 0x000005FF + thumb_func_end ov21_021D8804 + + thumb_func_start ov21_021D8928 +ov21_021D8928: ; 0x021D8928 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8928 + + thumb_func_start ov21_021D893C +ov21_021D893C: ; 0x021D893C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + ldr r3, [r3, #8] + ldr r0, [r4, #8] + cmp r1, #3 + bhi _021D89B2 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D8958: ; jump table + .short _021D8960 - _021D8958 - 2 ; case 0 + .short _021D897A - _021D8958 - 2 ; case 1 + .short _021D899C - _021D8958 - 2 ; case 2 + .short _021D89AE - _021D8958 - 2 ; case 3 +_021D8960: + ldr r0, [r4, #4] + mov r1, #0x64 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x64 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D89B2 +_021D897A: + ldr r1, [r4, #4] + str r1, [sp] + add r1, r5, #0 + bl ov21_021D8A7C + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + str r0, [sp] + sub r2, #0x10 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D89B2 +_021D899C: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _021D89B2 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D89B2 +_021D89AE: + mov r0, #1 + pop {r3, r4, r5, pc} +_021D89B2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D893C + + thumb_func_start ov21_021D89B8 +ov21_021D89B8: ; 0x021D89B8 + push {r4, lr} + add r3, r1, #0 + ldr r1, [r2, #0x30] + add r4, r0, #0 + ldr r0, [r3, #8] + cmp r1, #0 + bne _021D89D0 + ldr r3, [r3, #4] + add r1, r4, #0 + bl ov21_021D8ED4 + b _021D89EE +_021D89D0: + cmp r1, #1 + beq _021D89D8 + cmp r1, #3 + bne _021D89E2 +_021D89D8: + ldr r3, [r3, #4] + add r1, r4, #0 + bl ov21_021D9320 + b _021D89EE +_021D89E2: + cmp r1, #4 + beq _021D89EE + ldr r3, [r3, #4] + add r1, r4, #0 + bl ov21_021D9390 +_021D89EE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D89B8 + + thumb_func_start ov21_021D89F4 +ov21_021D89F4: ; 0x021D89F4 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0] + add r3, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021D8A76 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D8A10: ; jump table + .short _021D8A1A - _021D8A10 - 2 ; case 0 + .short _021D8A40 - _021D8A10 - 2 ; case 1 + .short _021D8A52 - _021D8A10 - 2 ; case 2 + .short _021D8A60 - _021D8A10 - 2 ; case 3 + .short _021D8A70 - _021D8A10 - 2 ; case 4 +_021D8A1A: + ldr r0, [r2, #0x28] + cmp r0, #0 + bne _021D8A3A + mov r0, #1 + str r0, [sp] + mov r0, #6 + add r1, r0, #0 + sub r1, #0x16 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D8A76 +_021D8A3A: + mov r0, #2 + str r0, [r4, #0] + b _021D8A76 +_021D8A40: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _021D8A76 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D8A76 +_021D8A52: + add r1, r3, #0 + bl ov21_021D8B40 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D8A76 +_021D8A60: + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D8A76 +_021D8A70: + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_021D8A76: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021D89F4 + + thumb_func_start ov21_021D8A7C +ov21_021D8A7C: ; 0x021D8A7C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #2 + ldr r0, [r0, #0] + add r4, r2, #0 + ldr r6, [sp, #0x18] + bl sub_02019EBC + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + ldr r0, [r5, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r5, #0] + mov r1, #7 + add r0, r0, #4 + bl sub_0201C2B4 + add r0, r5, #0 + bl ov21_021D8C00 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021D8B8C + ldr r0, [r4, #4] + bl ov21_021D36D8 + str r0, [sp] + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021D8BC4 + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov21_021D8C1C + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021D8D0C + ldr r1, [r4, #0xc] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D8DD4 + ldr r1, [r4, #0xc] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D8F98 + ldr r1, [r4, #0x10] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9054 + ldr r1, [r4, #0x14] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D90B4 + ldr r1, [r4, #0x18] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9234 + ldr r1, [r4, #0x1c] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9240 + ldr r1, [r4, #0x20] + add r0, r7, #0 + bl ov21_021D924C + mov r0, #1 + add r1, r0, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8A7C + + thumb_func_start ov21_021D8B40 +ov21_021D8B40: ; 0x021D8B40 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D8DC0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D8CC8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D8BEC + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201C2B4 + mov r0, #1 + mov r1, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8B40 + + thumb_func_start ov21_021D8B8C +ov21_021D8B8C: ; 0x021D8B8C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r4, r2, #0 + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x1c + mov r3, #3 + bl ov21_021D2724 + mov r0, #0x20 + str r0, [sp] + str r4, [sp, #4] + mov r2, #0 + ldr r0, [r5, #0] + mov r1, #5 + add r3, r2, #0 + bl ov21_021D276C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8B8C + + thumb_func_start ov21_021D8BC4 +ov21_021D8BC4: ; 0x021D8BC4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [sp, #0x10] + cmp r0, #1 + bne _021D8BD4 + mov r2, #0x2a + b _021D8BD6 +_021D8BD4: + mov r2, #0x28 +_021D8BD6: + str r3, [sp] + ldr r0, [r1, #0] + add r3, r4, #0 + add r1, r2, #0 + mov r2, #1 + add r3, #0x60 + bl ov21_021D27B8 + str r0, [r4, #0x5c] + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021D8BC4 + + thumb_func_start ov21_021D8BEC +ov21_021D8BEC: ; 0x021D8BEC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x5c] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x5c] + str r0, [r4, #0x60] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8BEC + + thumb_func_start ov21_021D8C00 +ov21_021D8C00: ; 0x021D8C00 + push {r4, lr} + ldr r0, [r0, #0] + bl ov21_021D2170 + add r4, r0, #0 + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + add r0, r4, #0 + bl sub_02008780 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8C00 + + thumb_func_start ov21_021D8C1C +ov21_021D8C1C: ; 0x021D8C1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021D8CB8 ; =0x00003AE9 + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x51 + bl sub_02009A4C + str r0, [r5, #0x24] + bl sub_0200A3DC + ldr r0, [r5, #0x24] + bl sub_02009D4C + ldr r0, _021D8CBC ; =0x00003A9B + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xc + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x28] + bl sub_0200A640 + ldr r0, [r5, #0x28] + bl sub_02009D4C + ldr r0, _021D8CC0 ; =0x00003AE7 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x4f + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x2c] + ldr r0, _021D8CC4 ; =0x00003AE8 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x50 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x30] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D8CB8: .word 0x00003AE9 +_021D8CBC: .word 0x00003A9B +_021D8CC0: .word 0x00003AE7 +_021D8CC4: .word 0x00003AE8 + thumb_func_end ov21_021D8C1C + + thumb_func_start ov21_021D8CC8 +ov21_021D8CC8: ; 0x021D8CC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x24] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x28] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x24] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x28] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x2c] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x30] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D8CC8 + + thumb_func_start ov21_021D8D0C +ov21_021D8D0C: ; 0x021D8D0C + push {r4, r5, r6, lr} + sub sp, #0x70 + add r6, r3, #0 + ldr r4, [r1, #0] + ldr r3, _021D8DBC ; =0x00003AE8 + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r2, #0x4d + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x44] + lsl r0, r0, #0x13 + str r0, [sp, #0x34] + mov r0, #0x29 + lsl r0, r0, #0xe + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r6, [sp, #0x48] + bl sub_02021B90 + mov r1, #3 + str r0, [r5, #0x20] + bl sub_02021D6C + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x34] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0x58] + mov r1, #0x11 + bl sub_02021D6C + ldr r0, [r5, #0x58] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #0x58] + mov r1, #1 + bl sub_02021CF8 + ldr r0, [r5, #0x58] + mov r1, #0 + bl sub_02021E80 + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D8DBC: .word 0x00003AE8 + thumb_func_end ov21_021D8D0C + + thumb_func_start ov21_021D8DC0 +ov21_021D8DC0: ; 0x021D8DC0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + bl sub_02021BD4 + ldr r0, [r4, #0x58] + bl sub_02021BD4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D8DC0 + + thumb_func_start ov21_021D8DD4 +ov21_021D8DD4: ; 0x021D8DD4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r5, [r0, #0] + mov r0, #0xd0 + str r0, [sp] + mov r0, #0x20 + add r6, r1, #0 + add r7, r2, #0 + str r0, [sp, #4] + add r0, r5, #4 + mov r1, #0 + mov r2, #0x18 + mov r3, #8 + bl sub_0201AE78 + cmp r6, #3 + bhi _021D8E18 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D8E02: ; jump table + .short _021D8E0A - _021D8E02 - 2 ; case 0 + .short _021D8E0E - _021D8E02 - 2 ; case 1 + .short _021D8E12 - _021D8E02 - 2 ; case 2 + .short _021D8E16 - _021D8E02 - 2 ; case 3 +_021D8E0A: + mov r4, #0x5a + b _021D8E18 +_021D8E0E: + mov r4, #0x57 + b _021D8E18 +_021D8E12: + mov r4, #0x58 + b _021D8E18 +_021D8E16: + mov r4, #0x59 +_021D8E18: + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021D1CE0 + add r6, r0, #0 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #0xd0 + sub r0, r1, r0 + lsr r4, r0, #1 + add r0, r6, #0 + add r4, #0x18 + bl sub_02023C5C + lsl r1, r0, #4 + mov r0, #0x20 + sub r0, r0, r1 + lsr r0, r0, #1 + add r0, #8 + str r0, [sp] + mov r1, #0 + ldr r0, _021D8E64 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r6, #0 + add r3, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D8E64: .word 0x00020100 + thumb_func_end ov21_021D8DD4 + + thumb_func_start ov21_021D8E68 +ov21_021D8E68: ; 0x021D8E68 + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r4, [r0, #0] + mov r0, #0xd0 + str r0, [sp] + mov r0, #0x20 + add r5, r1, #0 + str r0, [sp, #4] + add r0, r4, #4 + mov r1, #0 + mov r2, #0x18 + mov r3, #8 + bl sub_0201AE78 + mov r0, #0x5d + add r1, r5, #0 + bl ov21_021D1CE0 + add r6, r0, #0 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #0xd0 + sub r0, r1, r0 + lsr r5, r0, #1 + add r0, r6, #0 + add r5, #0x18 + bl sub_02023C5C + lsl r1, r0, #4 + mov r0, #0x20 + sub r0, r0, r1 + lsr r0, r0, #1 + add r0, #8 + str r0, [sp] + mov r1, #0 + ldr r0, _021D8ED0 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r4, #4 + add r2, r6, #0 + add r3, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D8ED0: .word 0x00020100 + thumb_func_end ov21_021D8E68 + + thumb_func_start ov21_021D8ED4 +ov21_021D8ED4: ; 0x021D8ED4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r2, #0 + add r6, r1, #0 + ldr r1, [r4, #0x2c] + ldr r0, [r5, #0x18] + add r7, r3, #0 + cmp r1, r0 + beq _021D8EF8 + str r1, [r5, #0x18] + cmp r1, #1 + bne _021D8EF8 + mov r0, #0x40 + str r0, [r5, #0x1c] + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021D8E68 +_021D8EF8: + ldr r0, [r5, #0x1c] + cmp r0, #0 + ble _021D8F04 + sub r0, r0, #1 + str r0, [r5, #0x1c] + b _021D8F16 +_021D8F04: + bne _021D8F16 + ldr r1, [r4, #0xc] + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D8DD4 + ldr r0, [r5, #0x1c] + sub r0, r0, #1 + str r0, [r5, #0x1c] +_021D8F16: + ldr r1, [r4, #0xc] + ldr r0, [r5, #0] + cmp r0, r1 + beq _021D8F34 + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D8F98 + ldr r1, [r4, #0xc] + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D8DD4 + ldr r0, [r4, #0xc] + str r0, [r5, #0] +_021D8F34: + ldr r1, [r4, #0x10] + ldr r0, [r5, #4] + cmp r0, r1 + beq _021D8F48 + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D9054 + ldr r0, [r4, #0x10] + str r0, [r5, #4] +_021D8F48: + ldr r1, [r4, #0x14] + ldr r0, [r5, #8] + cmp r0, r1 + beq _021D8F5C + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D90B4 + ldr r0, [r4, #0x14] + str r0, [r5, #8] +_021D8F5C: + ldr r1, [r4, #0x18] + ldr r0, [r5, #0xc] + cmp r0, r1 + beq _021D8F70 + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D9234 + ldr r0, [r4, #0x18] + str r0, [r5, #0xc] +_021D8F70: + ldr r1, [r4, #0x1c] + ldr r0, [r5, #0x10] + cmp r0, r1 + beq _021D8F84 + add r0, r6, #0 + add r2, r7, #0 + bl ov21_021D9240 + ldr r0, [r4, #0x1c] + str r0, [r5, #0x10] +_021D8F84: + ldr r1, [r4, #0x20] + ldr r0, [r5, #0x14] + cmp r0, r1 + beq _021D8F96 + add r0, r5, #0 + bl ov21_021D924C + ldr r0, [r4, #0x20] + str r0, [r5, #0x14] +_021D8F96: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D8ED4 + + thumb_func_start ov21_021D8F98 +ov21_021D8F98: ; 0x021D8F98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r0, #0 + str r2, [sp] + add r7, r1, #0 + str r2, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #0x2b + mov r2, #1 + add r3, sp, #0x14 + bl ov21_021D27B8 + ldr r2, [sp, #0x14] + mov r3, #0 + str r3, [sp] + str r0, [sp, #0x10] + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + ldr r0, [sp, #0x10] + bl sub_020181C4 + cmp r7, #3 + bhi _021D9008 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D8FEA: ; jump table + .short _021D8FF2 - _021D8FEA - 2 ; case 0 + .short _021D8FF8 - _021D8FEA - 2 ; case 1 + .short _021D8FFE - _021D8FEA - 2 ; case 2 + .short _021D9004 - _021D8FEA - 2 ; case 3 +_021D8FF2: + mov r5, #6 + mov r6, #0x2c + b _021D9008 +_021D8FF8: + mov r5, #9 + mov r6, #0x2d + b _021D9008 +_021D8FFE: + mov r5, #0xc + mov r6, #0x2e + b _021D9008 +_021D9004: + mov r5, #0x11 + mov r6, #0x2f +_021D9008: + ldr r0, [sp, #0xc] + add r1, r6, #0 + str r0, [sp] + ldr r0, [r4, #0] + mov r2, #1 + add r3, sp, #0x14 + bl ov21_021D27B8 + add r6, r0, #0 + lsl r0, r5, #0x18 + ldr r2, [sp, #0x14] + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021D8F98 + + thumb_func_start ov21_021D9054 +ov21_021D9054: ; 0x021D9054 + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r4, [r0, #0] + mov r0, #0x50 + str r0, [sp] + mov r0, #0x10 + add r5, r1, #0 + add r6, r2, #0 + str r0, [sp, #4] + add r0, r4, #4 + mov r1, #0 + mov r2, #0x58 + mov r3, #0x34 + bl sub_0201AE78 + add r5, #0x51 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021D1CE0 + add r5, r0, #0 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + mov r3, #0x50 + bl sub_02002EEC + add r3, r0, #0 + mov r0, #0x34 + str r0, [sp] + mov r1, #0 + ldr r0, _021D90B0 ; =0x00040300 + str r1, [sp, #4] + str r0, [sp, #8] + add r3, #0x58 + add r0, r4, #4 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D90B0: .word 0x00040300 + thumb_func_end ov21_021D9054 + + thumb_func_start ov21_021D90B4 +ov21_021D90B4: ; 0x021D90B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r5, [r0, #0] + mov r0, #0x50 + str r0, [sp] + mov r0, #0x10 + add r6, r1, #0 + add r7, r2, #0 + str r0, [sp, #4] + add r0, r5, #4 + mov r1, #0 + mov r2, #0x58 + mov r3, #0x4d + bl sub_0201AE78 + cmp r6, #9 + bhi _021D911C + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D90E2: ; jump table + .short _021D90F6 - _021D90E2 - 2 ; case 0 + .short _021D90FA - _021D90E2 - 2 ; case 1 + .short _021D90FE - _021D90E2 - 2 ; case 2 + .short _021D9102 - _021D90E2 - 2 ; case 3 + .short _021D9106 - _021D90E2 - 2 ; case 4 + .short _021D910A - _021D90E2 - 2 ; case 5 + .short _021D910E - _021D90E2 - 2 ; case 6 + .short _021D9112 - _021D90E2 - 2 ; case 7 + .short _021D9116 - _021D90E2 - 2 ; case 8 + .short _021D911A - _021D90E2 - 2 ; case 9 +_021D90F6: + mov r4, #0x7e + b _021D911C +_021D90FA: + mov r4, #0x36 + b _021D911C +_021D90FE: + mov r4, #0x37 + b _021D911C +_021D9102: + mov r4, #0x38 + b _021D911C +_021D9106: + mov r4, #0x39 + b _021D911C +_021D910A: + mov r4, #0x3a + b _021D911C +_021D910E: + mov r4, #0x3b + b _021D911C +_021D9112: + mov r4, #0x3c + b _021D911C +_021D9116: + mov r4, #0x3d + b _021D911C +_021D911A: + mov r4, #0x3e +_021D911C: + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021D1CE0 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + mov r3, #0x50 + bl sub_02002EEC + add r3, r0, #0 + mov r0, #0x4d + str r0, [sp] + mov r1, #0 + ldr r0, _021D9158 ; =0x00040300 + str r1, [sp, #4] + str r0, [sp, #8] + add r3, #0x58 + add r0, r5, #4 + add r2, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D9158: .word 0x00040300 + thumb_func_end ov21_021D90B4 + + thumb_func_start ov21_021D915C +ov21_021D915C: ; 0x021D915C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r5, [r0, #0] + add r7, r3, #0 + mov r0, #0x50 + str r0, [sp] + mov r0, #0x10 + lsl r3, r7, #0x10 + add r6, r1, #0 + str r2, [sp, #0x10] + str r0, [sp, #4] + add r0, r5, #4 + mov r1, #0 + mov r2, #0x58 + lsr r3, r3, #0x10 + bl sub_0201AE78 + cmp r6, #0x11 + bhi _021D91F8 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D918E: ; jump table + .short _021D91B2 - _021D918E - 2 ; case 0 + .short _021D91B6 - _021D918E - 2 ; case 1 + .short _021D91BA - _021D918E - 2 ; case 2 + .short _021D91BE - _021D918E - 2 ; case 3 + .short _021D91C2 - _021D918E - 2 ; case 4 + .short _021D91C6 - _021D918E - 2 ; case 5 + .short _021D91CA - _021D918E - 2 ; case 6 + .short _021D91CE - _021D918E - 2 ; case 7 + .short _021D91D2 - _021D918E - 2 ; case 8 + .short _021D91D6 - _021D918E - 2 ; case 9 + .short _021D91DA - _021D918E - 2 ; case 10 + .short _021D91DE - _021D918E - 2 ; case 11 + .short _021D91E2 - _021D918E - 2 ; case 12 + .short _021D91E6 - _021D918E - 2 ; case 13 + .short _021D91EA - _021D918E - 2 ; case 14 + .short _021D91EE - _021D918E - 2 ; case 15 + .short _021D91F2 - _021D918E - 2 ; case 16 + .short _021D91F6 - _021D918E - 2 ; case 17 +_021D91B2: + mov r4, #0x35 + b _021D91F8 +_021D91B6: + mov r4, #0x40 + b _021D91F8 +_021D91BA: + mov r4, #0x46 + b _021D91F8 +_021D91BE: + mov r4, #0x49 + b _021D91F8 +_021D91C2: + mov r4, #0x47 + b _021D91F8 +_021D91C6: + mov r4, #0x48 + b _021D91F8 +_021D91CA: + mov r4, #0x4c + b _021D91F8 +_021D91CE: + mov r4, #0x4b + b _021D91F8 +_021D91D2: + mov r4, #0x4d + b _021D91F8 +_021D91D6: + mov r4, #0x50 + b _021D91F8 +_021D91DA: + mov r4, #0x41 + b _021D91F8 +_021D91DE: + mov r4, #0x42 + b _021D91F8 +_021D91E2: + mov r4, #0x44 + b _021D91F8 +_021D91E6: + mov r4, #0x43 + b _021D91F8 +_021D91EA: + mov r4, #0x4a + b _021D91F8 +_021D91EE: + mov r4, #0x45 + b _021D91F8 +_021D91F2: + mov r4, #0x4e + b _021D91F8 +_021D91F6: + mov r4, #0x4f +_021D91F8: + ldr r1, [sp, #0x10] + add r0, r4, #0 + bl ov21_021D1CE0 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + mov r3, #0x50 + bl sub_02002EEC + add r3, r0, #0 + str r7, [sp] + mov r1, #0 + ldr r0, _021D9230 ; =0x00040300 + str r1, [sp, #4] + str r0, [sp, #8] + add r3, #0x58 + add r0, r5, #4 + add r2, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D9230: .word 0x00040300 + thumb_func_end ov21_021D915C + + thumb_func_start ov21_021D9234 +ov21_021D9234: ; 0x021D9234 + push {r3, lr} + mov r3, #0x66 + bl ov21_021D915C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9234 + + thumb_func_start ov21_021D9240 +ov21_021D9240: ; 0x021D9240 + push {r3, lr} + mov r3, #0x78 + bl ov21_021D915C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9240 + + thumb_func_start ov21_021D924C +ov21_021D924C: ; 0x021D924C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + ldr r0, [r4, #0x20] + bne _021D925E + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, pc} +_021D925E: + mov r1, #1 + bl sub_02021CAC + cmp r5, #0xe + bhi _021D931C + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9274: ; jump table + .short _021D931C - _021D9274 - 2 ; case 0 + .short _021D9292 - _021D9274 - 2 ; case 1 + .short _021D929C - _021D9274 - 2 ; case 2 + .short _021D92A6 - _021D9274 - 2 ; case 3 + .short _021D92B0 - _021D9274 - 2 ; case 4 + .short _021D92BA - _021D9274 - 2 ; case 5 + .short _021D92C4 - _021D9274 - 2 ; case 6 + .short _021D92CE - _021D9274 - 2 ; case 7 + .short _021D92D8 - _021D9274 - 2 ; case 8 + .short _021D92E2 - _021D9274 - 2 ; case 9 + .short _021D92EC - _021D9274 - 2 ; case 10 + .short _021D92F6 - _021D9274 - 2 ; case 11 + .short _021D9300 - _021D9274 - 2 ; case 12 + .short _021D930A - _021D9274 - 2 ; case 13 + .short _021D9314 - _021D9274 - 2 ; case 14 +_021D9292: + ldr r0, [r4, #0x20] + mov r1, #3 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D929C: + ldr r0, [r4, #0x20] + mov r1, #4 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92A6: + ldr r0, [r4, #0x20] + mov r1, #5 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92B0: + ldr r0, [r4, #0x20] + mov r1, #6 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92BA: + ldr r0, [r4, #0x20] + mov r1, #7 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92C4: + ldr r0, [r4, #0x20] + mov r1, #8 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92CE: + ldr r0, [r4, #0x20] + mov r1, #9 + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92D8: + ldr r0, [r4, #0x20] + mov r1, #0xa + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92E2: + ldr r0, [r4, #0x20] + mov r1, #0xb + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92EC: + ldr r0, [r4, #0x20] + mov r1, #0xc + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D92F6: + ldr r0, [r4, #0x20] + mov r1, #0xd + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D9300: + ldr r0, [r4, #0x20] + mov r1, #0xe + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D930A: + ldr r0, [r4, #0x20] + mov r1, #0xf + bl sub_02021D6C + pop {r3, r4, r5, pc} +_021D9314: + ldr r0, [r4, #0x20] + mov r1, #0x10 + bl sub_02021D6C +_021D931C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D924C + + thumb_func_start ov21_021D9320 +ov21_021D9320: ; 0x021D9320 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r2, #0x34] + add r4, r1, #0 + cmp r0, #4 + bne _021D9384 + ldr r0, [r2, #0x30] + cmp r0, #1 + bne _021D9358 + mov r1, #0 + str r1, [sp] + mov r0, #0xc + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #0x14 + str r0, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + ldr r1, [r4, #0] + add r0, r5, #0 + ldr r1, [r1, #0] + ldr r3, [r5, #0x60] + add r0, #0x34 + mov r2, #2 + bl ov21_021D1558 + b _021D9384 +_021D9358: + add r0, r4, #0 + add r1, r5, #0 + add r2, r3, #0 + bl ov21_021D9454 + mov r0, #0xc + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + mov r0, #0x14 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + ldr r1, [r4, #0] + add r0, r5, #0 + ldr r1, [r1, #0] + ldr r3, [r5, #0x60] + add r0, #0x34 + mov r2, #2 + bl ov21_021D1558 +_021D9384: + add r5, #0x34 + add r0, r5, #0 + bl ov21_021D157C + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov21_021D9320 + + thumb_func_start ov21_021D9390 +ov21_021D9390: ; 0x021D9390 + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r5, r0, #0 + ldr r0, [r6, #0x34] + add r4, r1, #0 + add r7, r3, #0 + cmp r0, #0x20 + bne _021D93B2 + ldr r0, [r5, #0x58] + mov r1, #1 + bl sub_02021CAC + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021D93F4 + b _021D93D0 +_021D93B2: + cmp r0, #0 + bne _021D93D0 + ldr r0, [r5, #0x58] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r4, #0] + add r0, r0, #4 + bl sub_0201A9A4 +_021D93D0: + ldr r2, [r6, #0x34] + mov r1, #4 + sub r2, r1, r2 + ldr r1, _021D93F0 ; =0x00007FFF + add r3, r2, #0 + mul r3, r1 + asr r1, r3, #1 + lsr r1, r1, #0x1e + add r1, r3, r1 + lsl r1, r1, #0xe + ldr r0, [r5, #0x58] + lsr r1, r1, #0x10 + bl sub_02021C94 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D93F0: .word 0x00007FFF + thumb_func_end ov21_021D9390 + + thumb_func_start ov21_021D93F4 +ov21_021D93F4: ; 0x021D93F4 + push {r3, r4, r5, lr} + sub sp, #0x10 + ldr r5, [r0, #0] + add r4, r1, #0 + add r0, r5, #4 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x5e + add r1, r4, #0 + bl ov21_021D1CE0 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #1 + lsl r1, r1, #8 + sub r0, r1, r0 + lsr r3, r0, #1 + mov r0, #0x80 + str r0, [sp] + mov r1, #0 + ldr r0, _021D9450 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #4 + add r2, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + mov r0, #1 + mov r1, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D9450: .word 0x00020100 + thumb_func_end ov21_021D93F4 + + thumb_func_start ov21_021D9454 +ov21_021D9454: ; 0x021D9454 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #1 + add r4, r1, #0 + add r1, r0, #0 + add r6, r2, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + ldr r0, [r5, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r1, [r4, #0] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D8F98 + ldr r1, [r4, #0] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D8DD4 + ldr r1, [r4, #4] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9054 + ldr r1, [r4, #8] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D90B4 + ldr r1, [r4, #0xc] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9234 + ldr r1, [r4, #0x10] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9240 + ldr r1, [r4, #0x14] + add r0, r4, #0 + bl ov21_021D924C + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D9454 \ No newline at end of file diff --git a/asm/ov21_021D94BC.s b/asm/ov21_021D94BC.s new file mode 100644 index 000000000..89557be61 --- /dev/null +++ b/asm/ov21_021D94BC.s @@ -0,0 +1,7392 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021D94BC +ov21_021D94BC: ; 0x021D94BC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021D9534 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D957C + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021D95B4 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021D95E4 + str r0, [r5, #0x24] + ldr r0, _021D9504 ; =ov21_021D95E8 + str r0, [r5, #8] + ldr r0, _021D9508 ; =ov21_021D964C + str r0, [r5, #0xc] + ldr r0, _021D950C ; =ov21_021D9780 + str r0, [r5, #0x10] + ldr r0, _021D9510 ; =ov21_021D97A0 + str r0, [r5, #0x14] + ldr r0, _021D9514 ; =ov21_021D9830 + str r0, [r5, #0x18] + ldr r0, _021D9518 ; =ov21_021D9960 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D9504: .word ov21_021D95E8 +_021D9508: .word ov21_021D964C +_021D950C: .word ov21_021D9780 +_021D9510: .word ov21_021D97A0 +_021D9514: .word ov21_021D9830 +_021D9518: .word ov21_021D9960 + thumb_func_end ov21_021D94BC + + thumb_func_start ov21_021D951C +ov21_021D951C: ; 0x021D951C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021D95B8 + ldr r0, [r4, #4] + bl ov21_021D95CC + ldr r0, [r4, #0x20] + bl ov21_021D95E0 + pop {r4, pc} + thumb_func_end ov21_021D951C + + thumb_func_start ov21_021D9534 +ov21_021D9534: ; 0x021D9534 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + bne _021D9546 + bl sub_02022974 +_021D9546: + add r2, r4, #0 + mov r1, #0x10 + mov r0, #0 +_021D954C: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D954C + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #1 + bl ov21_021D1410 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl ov21_021D1430 + str r0, [r4, #0xc] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D9534 + + thumb_func_start ov21_021D957C +ov21_021D957C: ; 0x021D957C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021D958E + bl sub_02022974 +_021D958E: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D957C + + thumb_func_start ov21_021D95B4 +ov21_021D95B4: ; 0x021D95B4 + mov r0, #0 + bx lr + thumb_func_end ov21_021D95B4 + + thumb_func_start ov21_021D95B8 +ov21_021D95B8: ; 0x021D95B8 + push {r4, lr} + add r4, r0, #0 + bne _021D95C2 + bl sub_02022974 +_021D95C2: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D95B8 + + thumb_func_start ov21_021D95CC +ov21_021D95CC: ; 0x021D95CC + push {r4, lr} + add r4, r0, #0 + bne _021D95D6 + bl sub_02022974 +_021D95D6: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D95CC + + thumb_func_start ov21_021D95E0 +ov21_021D95E0: ; 0x021D95E0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021D95E0 + + thumb_func_start ov21_021D95E4 +ov21_021D95E4: ; 0x021D95E4 + mov r0, #0 + bx lr + thumb_func_end ov21_021D95E4 + + thumb_func_start ov21_021D95E8 +ov21_021D95E8: ; 0x021D95E8 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + mov r1, #0x9c + bl sub_02018144 + add r4, r0, #0 + bne _021D95FE + bl sub_02022974 +_021D95FE: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x9c + bl sub_020D5124 + add r0, r4, #0 + ldr r1, _021D9648 ; =0x0000FFFF + str r4, [r5, #8] + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DC35C + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021D9ADC + ldr r1, [r5, #4] + add r0, r4, #0 + bl ov21_021DB3E0 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DB428 + mov r1, #0 + mov r0, #4 +_021D9638: + add r1, r1, #1 + str r0, [r4, #0x2c] + add r4, r4, #4 + cmp r1, #6 + blt _021D9638 + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_021D9648: .word 0x0000FFFF + thumb_func_end ov21_021D95E8 + + thumb_func_start ov21_021D964C +ov21_021D964C: ; 0x021D964C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #0xc] + ldr r4, [r5, #8] + ldr r7, [r0, #4] + ldr r0, [r5, #0xc] + cmp r0, #1 + bne _021D9666 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D9666: + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _021D9672 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D9672: + ldr r0, [r6, #8] + bl ov21_021D86D8 + cmp r0, #0 + beq _021D9682 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D9682: + ldr r0, [r6, #8] + bl ov21_021D863C + str r0, [sp, #4] + ldr r0, [r5, #0] + cmp r0, #4 + bhi _021D9778 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D969C: ; jump table + .short _021D96A6 - _021D969C - 2 ; case 0 + .short _021D9702 - _021D969C - 2 ; case 1 + .short _021D9710 - _021D969C - 2 ; case 2 + .short _021D9766 - _021D969C - 2 ; case 3 + .short _021D9774 - _021D969C - 2 ; case 4 +_021D96A6: + ldr r1, [r4, #0x24] + ldr r0, [sp, #4] + cmp r1, r0 + bne _021D96B6 + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x20] + cmp r1, r0 + beq _021D96DE +_021D96B6: + add r0, r4, #0 + mov r1, #0 + add r0, #0x98 + str r1, [r0, #0] + mov r0, #2 + str r0, [r7, #4] + add r0, r4, #0 + add r0, #0x98 + str r0, [r7, #8] + add r0, r4, #0 + bl ov21_021D9CA8 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov21_021D9CB8 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D9778 +_021D96DE: + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021D9B98 + ldr r0, [r6, #4] + bl ov21_021D3998 + cmp r0, #2 + bne _021D96F8 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DB2FC +_021D96F8: + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DC368 + b _021D9778 +_021D9702: + add r4, #0x98 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D9778 + add r0, r0, #1 + str r0, [r5, #0] + b _021D9778 +_021D9710: + ldr r0, [r4, #0x24] + add r1, r6, #0 + str r0, [sp] + ldr r0, [sp, #4] + str r0, [r4, #0x24] + ldr r0, [r4, #0x20] + str r0, [r4, #0x28] + ldr r2, [r5, #4] + add r0, r4, #0 + bl ov21_021D9B34 + ldr r1, [r5, #4] + add r0, r4, #0 + bl ov21_021DB468 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DC35C + ldr r1, [r4, #0x24] + ldr r0, [sp] + cmp r0, r1 + beq _021D9746 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DB428 +_021D9746: + add r0, r4, #0 + mov r1, #0 + add r0, #0x98 + str r1, [r0, #0] + mov r0, #1 + str r0, [r7, #4] + add r0, r4, #0 + add r0, #0x98 + str r0, [r7, #8] + add r0, r4, #0 + bl ov21_021D9D68 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D9778 +_021D9766: + add r4, #0x98 + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D9778 + add r0, r0, #1 + str r0, [r5, #0] + b _021D9778 +_021D9774: + mov r0, #0 + str r0, [r5, #0] +_021D9778: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D964C + + thumb_func_start ov21_021D9780 +ov21_021D9780: ; 0x021D9780 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r5, [r4, #8] + add r0, r5, #0 + bl ov21_021D9B24 + add r0, r5, #0 + bl ov21_021DB3C8 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D9780 + + thumb_func_start ov21_021D97A0 +ov21_021D97A0: ; 0x021D97A0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r6, r0, #0 + add r7, r2, #0 + ldr r5, [r3, #8] + ldr r0, [r4, #8] + cmp r1, #3 + bhi _021D982A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D97BE: ; jump table + .short _021D97C6 - _021D97BE - 2 ; case 0 + .short _021D97E4 - _021D97BE - 2 ; case 1 + .short _021D9814 - _021D97BE - 2 ; case 2 + .short _021D9826 - _021D97BE - 2 ; case 3 +_021D97C6: + mov r1, #0x4e + ldr r0, [r4, #4] + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x4e + str r0, [r4, #8] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D982A +_021D97E4: + ldr r1, [r4, #4] + add r3, r5, #0 + str r1, [sp] + add r1, r6, #0 + bl ov21_021D9A08 + mov r1, #0 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x10 + mov r3, #0x3f + bl sub_0200AAE0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021DB480 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D982A +_021D9814: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021D982A + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D982A +_021D9826: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D982A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021D97A0 + + thumb_func_start ov21_021D9830 +ov21_021D9830: ; 0x021D9830 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r0, r2, #0 + add r5, r1, #0 + ldr r0, [r0, #8] + str r2, [sp, #4] + ldr r6, [r3, #8] + ldr r4, [r5, #8] + bl ov21_021D86D8 + cmp r0, #0 + beq _021D9856 + ldr r2, [sp, #4] + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DC96C + b _021D98E0 +_021D9856: + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DC7C0 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r2, [r6, #0x24] + ldr r3, [r4, r0] + cmp r3, r2 + bne _021D9874 + add r0, r0, #4 + ldr r1, [r4, r0] + ldr r0, [r6, #0x28] + cmp r1, r0 + beq _021D98D6 +_021D9874: + mov r0, #0x41 + lsl r0, r0, #2 + str r2, [r4, r0] + ldr r1, [r6, #0x28] + add r0, r0, #4 + str r1, [r4, r0] + cmp r3, #3 + bne _021D9892 + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DB6C8 + add r0, r4, #0 + bl ov21_021DBDA0 +_021D9892: + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DB79C + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DBE3C + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #3 + bne _021D98C4 + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DB634 + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DBBE4 +_021D98C4: + mov r3, #0x41 + lsl r3, r3, #2 + ldr r2, [r4, r3] + add r3, r3, #4 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #1 + bl ov21_021DC8B4 +_021D98D6: + ldr r2, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021DB49C +_021D98E0: + mov r7, #0 + str r6, [sp, #8] + add r5, r4, #0 +_021D98E6: + ldr r1, [sp, #8] + ldr r0, [r5, #0] + ldr r1, [r1, #0x2c] + bl ov21_021D144C + ldr r1, [r5, #0x18] + cmp r1, #0 + beq _021D990E + cmp r7, #5 + bne _021D98FE + mov r3, #1 + b _021D9900 +_021D98FE: + mov r3, #3 +_021D9900: + mov r0, #5 + str r0, [sp] + mov r2, #5 + ldr r0, [r5, #0] + mvn r2, r2 + bl ov21_021D1524 +_021D990E: + ldr r0, [sp, #8] + add r7, r7, #1 + add r0, r0, #4 + add r5, r5, #4 + str r0, [sp, #8] + cmp r7, #6 + blt _021D98E6 + mov r5, #0 + mov r7, #6 +_021D9920: + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _021D992C + ldr r1, [r6, #0x44] + bl ov21_021D144C +_021D992C: + ldr r1, [r4, #0x6c] + cmp r1, #0 + beq _021D9940 + str r7, [sp] + mov r2, #5 + ldr r0, [r4, #0x30] + mvn r2, r2 + mov r3, #0xb + bl ov21_021D1524 +_021D9940: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D9950 + ldr r1, [r6, #0x44] + bl ov21_021D144C +_021D9950: + add r5, r5, #1 + add r4, r4, #4 + add r6, r6, #4 + cmp r5, #0xf + blt _021D9920 + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021D9830 + + thumb_func_start ov21_021D9960 +ov21_021D9960: ; 0x021D9960 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #8] + cmp r0, #4 + bhi _021D9A02 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D997C: ; jump table + .short _021D9986 - _021D997C - 2 ; case 0 + .short _021D99B0 - _021D997C - 2 ; case 1 + .short _021D99C2 - _021D997C - 2 ; case 2 + .short _021D99EA - _021D997C - 2 ; case 3 + .short _021D99FC - _021D997C - 2 ; case 4 +_021D9986: + ldr r0, [r2, #8] + bl ov21_021D86D0 + cmp r0, #1 + bne _021D9996 + mov r0, #2 + str r0, [r4, #0] + b _021D9A02 +_021D9996: + mov r0, #2 + str r0, [sp] + mov r0, #6 + add r1, r0, #0 + sub r1, #0x16 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D9A02 +_021D99B0: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021D9A02 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D9A02 +_021D99C2: + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021D9A4C + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #3 + bne _021D99E2 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021DB6C8 + add r0, r5, #0 + bl ov21_021DBDA0 +_021D99E2: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D9A02 +_021D99EA: + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D9A02 +_021D99FC: + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D9A02: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021D9960 + + thumb_func_start ov21_021D9A08 +ov21_021D9A08: ; 0x021D9A08 + push {r4, r5, r6, lr} + ldr r4, [sp, #0x10] + add r6, r1, #0 + add r5, r0, #0 + add r1, r2, #0 + add r0, r6, #0 + add r2, r4, #0 + bl ov21_021D9A74 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DB50C + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DB708 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DBDC8 + mov r3, #0x41 + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, r3, #4 + ldr r3, [r5, r3] + add r0, r5, #0 + mov r1, #1 + bl ov21_021DC8B4 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021D9A08 + + thumb_func_start ov21_021D9A4C +ov21_021D9A4C: ; 0x021D9A4C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021DBE2C + add r0, r5, #0 + bl ov21_021DB78C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DB5DC + mov r0, #0x79 + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D2584 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D9A4C + + thumb_func_start ov21_021D9A74 +ov21_021D9A74: ; 0x021D9A74 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r5, r2, #0 + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x1d + mov r3, #6 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x4b + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9A74 + + thumb_func_start ov21_021D9ADC +ov21_021D9ADC: ; 0x021D9ADC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov21_021D9BEC + ldr r0, [r5, #0x28] + add r1, r4, #0 + str r0, [sp] + ldr r3, [r5, #0x24] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9B58 + add r0, r5, #0 + bl ov21_021D9B04 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021D9ADC + + thumb_func_start ov21_021D9B04 +ov21_021D9B04: ; 0x021D9B04 + mov r2, #0 + add r3, r0, #0 + mov r1, #3 +_021D9B0A: + add r2, r2, #1 + str r1, [r3, #0x2c] + add r3, r3, #4 + cmp r2, #6 + blt _021D9B0A + mov r2, #0 + mov r1, #3 +_021D9B18: + add r2, r2, #1 + str r1, [r0, #0x44] + add r0, r0, #4 + cmp r2, #0xf + blt _021D9B18 + bx lr + thumb_func_end ov21_021D9B04 + + thumb_func_start ov21_021D9B24 +ov21_021D9B24: ; 0x021D9B24 + push {r4, lr} + add r4, r0, #0 + bl ov21_021D9D00 + add r0, r4, #0 + bl ov21_021D9D50 + pop {r4, pc} + thumb_func_end ov21_021D9B24 + + thumb_func_start ov21_021D9B34 +ov21_021D9B34: ; 0x021D9B34 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov21_021D9D50 + ldr r0, [r5, #0x28] + add r1, r4, #0 + str r0, [sp] + ldr r3, [r5, #0x24] + add r0, r5, #0 + add r2, r6, #0 + bl ov21_021D9B58 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9B34 + + thumb_func_start ov21_021D9B58 +ov21_021D9B58: ; 0x021D9B58 + push {r3, lr} + cmp r3, #3 + bhi _021D9B94 + add r3, r3, r3 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_021D9B6A: ; jump table + .short _021D9B72 - _021D9B6A - 2 ; case 0 + .short _021D9B78 - _021D9B6A - 2 ; case 1 + .short _021D9B7E - _021D9B6A - 2 ; case 2 + .short _021D9B90 - _021D9B6A - 2 ; case 3 +_021D9B72: + bl ov21_021D9D78 + pop {r3, pc} +_021D9B78: + bl ov21_021D9EB4 + pop {r3, pc} +_021D9B7E: + ldr r3, [sp, #8] + cmp r3, #0 + bne _021D9B8A + bl ov21_021DA018 + pop {r3, pc} +_021D9B8A: + bl ov21_021DA1C8 + pop {r3, pc} +_021D9B90: + bl ov21_021DA38C +_021D9B94: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9B58 + + thumb_func_start ov21_021D9B98 +ov21_021D9B98: ; 0x021D9B98 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021D9C90 + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021D9BB0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D9B98 + + thumb_func_start ov21_021D9BB0 +ov21_021D9BB0: ; 0x021D9BB0 + push {r3, lr} + cmp r2, #3 + bhi _021D9BEA + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D9BC2: ; jump table + .short _021D9BCA - _021D9BC2 - 2 ; case 0 + .short _021D9BD0 - _021D9BC2 - 2 ; case 1 + .short _021D9BD6 - _021D9BC2 - 2 ; case 2 + .short _021D9BE6 - _021D9BC2 - 2 ; case 3 +_021D9BCA: + bl ov21_021D9E08 + pop {r3, pc} +_021D9BD0: + bl ov21_021D9F44 + pop {r3, pc} +_021D9BD6: + cmp r3, #0 + bne _021D9BE0 + bl ov21_021DA0BC + pop {r3, pc} +_021D9BE0: + bl ov21_021DA280 + pop {r3, pc} +_021D9BE6: + bl ov21_021DA41C +_021D9BEA: + pop {r3, pc} + thumb_func_end ov21_021D9BB0 + + thumb_func_start ov21_021D9BEC +ov21_021D9BEC: ; 0x021D9BEC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #0x18 + bl sub_02018144 + str r0, [r5, #4] + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x20 + add r0, r0, #4 + mov r2, #0x40 + mov r3, #0xc0 + bl ov21_021D154C + mov r0, #0xec + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0 + mov r2, #0x20 + mov r3, #0xbc + bl ov21_021D154C + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x40 + add r0, #8 + mov r2, #0x60 + mov r3, #0xc0 + bl ov21_021D154C + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x60 + add r0, #0xc + mov r2, #0x80 + mov r3, #0xc0 + bl ov21_021D154C + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x80 + add r0, #0x10 + mov r2, #0xa0 + mov r3, #0xc0 + bl ov21_021D154C + mov r0, #0xfc + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #0x14 + mov r2, #0xc0 + mov r3, #0xac + bl ov21_021D154C + str r4, [r5, #0x10] + str r5, [r5, #0x14] + str r6, [sp] + add r3, r5, #0 + ldr r0, [r5, #4] + ldr r2, _021D9C8C ; =ov21_021D9D18 + mov r1, #6 + add r3, #0x10 + bl sub_02023FCC + str r0, [r5, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D9C8C: .word ov21_021D9D18 + thumb_func_end ov21_021D9BEC + + thumb_func_start ov21_021D9C90 +ov21_021D9C90: ; 0x021D9C90 + push {r4, lr} + add r4, r0, #0 + bl ov21_021D9CA8 + ldr r0, [r4, #0] + bl sub_0202404C + ldr r1, [r4, #0x24] + add r0, r4, #0 + bl ov21_021D9CB8 + pop {r4, pc} + thumb_func_end ov21_021D9C90 + + thumb_func_start ov21_021D9CA8 +ov21_021D9CA8: ; 0x021D9CA8 + mov r2, #0 + mov r1, #3 +_021D9CAC: + add r2, r2, #1 + str r1, [r0, #0x2c] + add r0, r0, #4 + cmp r2, #6 + blt _021D9CAC + bx lr + thumb_func_end ov21_021D9CA8 + + thumb_func_start ov21_021D9CB8 +ov21_021D9CB8: ; 0x021D9CB8 + cmp r1, #3 + bhi _021D9CFE + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D9CC8: ; jump table + .short _021D9CD0 - _021D9CC8 - 2 ; case 0 + .short _021D9CDC - _021D9CC8 - 2 ; case 1 + .short _021D9CE8 - _021D9CC8 - 2 ; case 2 + .short _021D9CF4 - _021D9CC8 - 2 ; case 3 +_021D9CD0: + ldr r1, [r0, #0x30] + cmp r1, #2 + beq _021D9CFE + mov r1, #1 + str r1, [r0, #0x30] + bx lr +_021D9CDC: + ldr r1, [r0, #0x34] + cmp r1, #2 + beq _021D9CFE + mov r1, #1 + str r1, [r0, #0x34] + bx lr +_021D9CE8: + ldr r1, [r0, #0x38] + cmp r1, #2 + beq _021D9CFE + mov r1, #1 + str r1, [r0, #0x38] + bx lr +_021D9CF4: + ldr r1, [r0, #0x3c] + cmp r1, #2 + beq _021D9CFE + mov r1, #1 + str r1, [r0, #0x3c] +_021D9CFE: + bx lr + thumb_func_end ov21_021D9CB8 + + thumb_func_start ov21_021D9D00 +ov21_021D9D00: ; 0x021D9D00 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9D00 + + thumb_func_start ov21_021D9D18 +ov21_021D9D18: ; 0x021D9D18 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #4] + lsl r0, r5, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] + cmp r1, #2 + bne _021D9D46 + ldr r0, [r4, #0x18] + mov r1, #4 + add r2, r5, #0 + bl ov21_021D4F20 + add r0, r4, #0 + add r0, #0x80 + str r5, [r0, #0] + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r4, #0x94 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021D9D46: + mov r0, #0 + add r4, #0x94 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9D18 + + thumb_func_start ov21_021D9D50 +ov21_021D9D50: ; 0x021D9D50 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_02024034 + ldr r0, [r4, #0xc] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0xc] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9D50 + + thumb_func_start ov21_021D9D68 +ov21_021D9D68: ; 0x021D9D68 + mov r2, #0 + mov r1, #3 +_021D9D6C: + add r2, r2, #1 + str r1, [r0, #0x44] + add r0, r0, #4 + cmp r2, #0xf + blt _021D9D6C + bx lr + thumb_func_end ov21_021D9D68 + + thumb_func_start ov21_021D9D78 +ov21_021D9D78: ; 0x021D9D78 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + mov r1, #0x18 + str r2, [sp, #0xc] + bl sub_02018144 + ldr r1, [sp, #4] + str r0, [r1, #0xc] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x30 + ldr r6, [sp, #0x14] + str r0, [sp, #0x10] +_021D9D98: + ldr r0, [sp, #0x10] + ldr r7, [sp, #0x10] + str r0, [sp, #0x18] + add r0, #0x10 + mov r4, #0 + mov r5, #0x30 + sub r7, #0x10 + str r0, [sp, #0x18] +_021D9DA8: + add r0, r5, #0 + add r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r5, #0 + ldr r1, [r0, #0xc] + add r0, r4, r6 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r2, [sp, #0x18] + add r1, r7, #0 + sub r3, #0x28 + bl ov21_021D154C + add r4, r4, #1 + add r5, #0x50 + cmp r4, #2 + blt _021D9DA8 + ldr r0, [sp, #0x10] + add r6, r6, #2 + add r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #3 + blt _021D9D98 + ldr r1, [sp, #8] + ldr r0, [sp, #4] + ldr r3, [sp, #4] + str r1, [r0, #0x10] + str r0, [r0, #0x14] + ldr r0, [sp, #0xc] + ldr r2, _021D9E04 ; =ov21_021D9E90 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #6 + ldr r0, [r0, #0xc] + add r3, #0x10 + bl sub_02023FCC + ldr r1, [sp, #4] + str r0, [r1, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D9E04: .word ov21_021D9E90 + thumb_func_end ov21_021D9D78 + + thumb_func_start ov21_021D9E08 +ov21_021D9E08: ; 0x021D9E08 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + mov r1, #0 + add r2, r4, #0 + mov r0, #3 +_021D9E14: + add r1, r1, #1 + str r0, [r2, #0x44] + add r2, r2, #4 + cmp r1, #6 + blt _021D9E14 + ldr r0, [r4, #8] + bl sub_0202404C + ldr r0, [r5, #8] + bl ov21_021D8658 + cmp r0, #5 + bhi _021D9E8C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9E3A: ; jump table + .short _021D9E46 - _021D9E3A - 2 ; case 0 + .short _021D9E52 - _021D9E3A - 2 ; case 1 + .short _021D9E5E - _021D9E3A - 2 ; case 2 + .short _021D9E6A - _021D9E3A - 2 ; case 3 + .short _021D9E76 - _021D9E3A - 2 ; case 4 + .short _021D9E82 - _021D9E3A - 2 ; case 5 +_021D9E46: + ldr r0, [r4, #0x44] + cmp r0, #2 + beq _021D9E8C + mov r0, #1 + str r0, [r4, #0x44] + pop {r3, r4, r5, pc} +_021D9E52: + ldr r0, [r4, #0x48] + cmp r0, #2 + beq _021D9E8C + mov r0, #1 + str r0, [r4, #0x48] + pop {r3, r4, r5, pc} +_021D9E5E: + ldr r0, [r4, #0x4c] + cmp r0, #2 + beq _021D9E8C + mov r0, #1 + str r0, [r4, #0x4c] + pop {r3, r4, r5, pc} +_021D9E6A: + ldr r0, [r4, #0x50] + cmp r0, #2 + beq _021D9E8C + mov r0, #1 + str r0, [r4, #0x50] + pop {r3, r4, r5, pc} +_021D9E76: + ldr r0, [r4, #0x54] + cmp r0, #2 + beq _021D9E8C + mov r0, #1 + str r0, [r4, #0x54] + pop {r3, r4, r5, pc} +_021D9E82: + ldr r0, [r4, #0x58] + cmp r0, #2 + beq _021D9E8C + mov r0, #1 + str r0, [r4, #0x58] +_021D9E8C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9E08 + + thumb_func_start ov21_021D9E90 +ov21_021D9E90: ; 0x021D9E90 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #4] + lsl r0, r5, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + cmp r1, #2 + bne _021D9EB0 + add r2, r5, #0 + ldr r0, [r4, #0x18] + mov r1, #4 + add r2, #8 + bl ov21_021D4F20 + add r4, #0x84 + str r5, [r4, #0] +_021D9EB0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9E90 + + thumb_func_start ov21_021D9EB4 +ov21_021D9EB4: ; 0x021D9EB4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + mov r1, #0x28 + str r2, [sp, #0xc] + bl sub_02018144 + ldr r1, [sp, #4] + str r0, [r1, #0xc] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x10 + ldr r6, [sp, #0x14] + str r0, [sp, #0x10] +_021D9ED4: + ldr r0, [sp, #0x10] + ldr r7, [sp, #0x10] + str r0, [sp, #0x18] + add r0, #0x10 + mov r4, #0 + mov r5, #0x30 + sub r7, #0x10 + str r0, [sp, #0x18] +_021D9EE4: + add r0, r5, #0 + add r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r5, #0 + ldr r1, [r0, #0xc] + add r0, r4, r6 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r2, [sp, #0x18] + add r1, r7, #0 + sub r3, #0x28 + bl ov21_021D154C + add r4, r4, #1 + add r5, #0x50 + cmp r4, #2 + blt _021D9EE4 + ldr r0, [sp, #0x10] + add r6, r6, #2 + add r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #5 + blt _021D9ED4 + ldr r1, [sp, #8] + ldr r0, [sp, #4] + ldr r3, [sp, #4] + str r1, [r0, #0x10] + str r0, [r0, #0x14] + ldr r0, [sp, #0xc] + ldr r2, _021D9F40 ; =ov21_021D9FF8 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #0xa + ldr r0, [r0, #0xc] + add r3, #0x10 + bl sub_02023FCC + ldr r1, [sp, #4] + str r0, [r1, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D9F40: .word ov21_021D9FF8 + thumb_func_end ov21_021D9EB4 + + thumb_func_start ov21_021D9F44 +ov21_021D9F44: ; 0x021D9F44 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + mov r1, #0 + add r2, r4, #0 + mov r0, #3 +_021D9F50: + add r1, r1, #1 + str r0, [r2, #0x44] + add r2, r2, #4 + cmp r1, #0xa + blt _021D9F50 + ldr r0, [r4, #8] + bl sub_0202404C + ldr r0, [r5, #8] + bl ov21_021D8674 + cmp r0, #9 + bhi _021D9FF4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9F76: ; jump table + .short _021D9FF4 - _021D9F76 - 2 ; case 0 + .short _021D9F8A - _021D9F76 - 2 ; case 1 + .short _021D9F96 - _021D9F76 - 2 ; case 2 + .short _021D9FA2 - _021D9F76 - 2 ; case 3 + .short _021D9FAE - _021D9F76 - 2 ; case 4 + .short _021D9FBA - _021D9F76 - 2 ; case 5 + .short _021D9FC6 - _021D9F76 - 2 ; case 6 + .short _021D9FD2 - _021D9F76 - 2 ; case 7 + .short _021D9FDE - _021D9F76 - 2 ; case 8 + .short _021D9FEA - _021D9F76 - 2 ; case 9 +_021D9F8A: + ldr r0, [r4, #0x44] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x44] + pop {r3, r4, r5, pc} +_021D9F96: + ldr r0, [r4, #0x48] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x48] + pop {r3, r4, r5, pc} +_021D9FA2: + ldr r0, [r4, #0x4c] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x4c] + pop {r3, r4, r5, pc} +_021D9FAE: + ldr r0, [r4, #0x50] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x50] + pop {r3, r4, r5, pc} +_021D9FBA: + ldr r0, [r4, #0x54] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x54] + pop {r3, r4, r5, pc} +_021D9FC6: + ldr r0, [r4, #0x58] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x58] + pop {r3, r4, r5, pc} +_021D9FD2: + ldr r0, [r4, #0x5c] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x5c] + pop {r3, r4, r5, pc} +_021D9FDE: + ldr r0, [r4, #0x60] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x60] + pop {r3, r4, r5, pc} +_021D9FEA: + ldr r0, [r4, #0x64] + cmp r0, #2 + beq _021D9FF4 + mov r0, #1 + str r0, [r4, #0x64] +_021D9FF4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021D9F44 + + thumb_func_start ov21_021D9FF8 +ov21_021D9FF8: ; 0x021D9FF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #4] + lsl r0, r5, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + cmp r1, #2 + bne _021DA016 + ldr r0, [r4, #0x18] + mov r1, #4 + add r2, r5, #6 + bl ov21_021D4F20 + add r4, #0x84 + str r5, [r4, #0] +_021DA016: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021D9FF8 + + thumb_func_start ov21_021DA018 +ov21_021DA018: ; 0x021DA018 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + mov r1, #0x2c + str r2, [sp, #0xc] + bl sub_02018144 + ldr r1, [sp, #4] + str r0, [r1, #0xc] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x10 + ldr r6, [sp, #0x14] + str r0, [sp, #0x10] +_021DA038: + ldr r0, [sp, #0x10] + ldr r7, [sp, #0x10] + str r0, [sp, #0x18] + add r0, #0x10 + mov r4, #0 + mov r5, #0x30 + sub r7, #0x10 + str r0, [sp, #0x18] +_021DA048: + add r0, r5, #0 + add r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r5, #0 + ldr r1, [r0, #0xc] + add r0, r4, r6 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r2, [sp, #0x18] + add r1, r7, #0 + sub r3, #0x28 + bl ov21_021D154C + add r4, r4, #1 + add r5, #0x50 + cmp r4, #2 + blt _021DA048 + ldr r0, [sp, #0x10] + add r6, r6, #2 + add r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #5 + blt _021DA038 + mov r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #0xa0 + ldr r0, [r0, #0xc] + mov r2, #0xc0 + add r0, #0x28 + mov r3, #8 + bl ov21_021D154C + ldr r3, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [sp, #4] + ldr r2, _021DA0B8 ; =ov21_021DA18C + str r1, [r0, #0x10] + str r0, [r0, #0x14] + ldr r0, [sp, #0xc] + mov r1, #0xb + str r0, [sp] + ldr r0, [sp, #4] + add r3, #0x10 + ldr r0, [r0, #0xc] + bl sub_02023FCC + ldr r1, [sp, #4] + str r0, [r1, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021DA0B8: .word ov21_021DA18C + thumb_func_end ov21_021DA018 + + thumb_func_start ov21_021DA0BC +ov21_021DA0BC: ; 0x021DA0BC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + add r2, r5, #0 + mov r0, #3 +_021DA0C8: + add r1, r1, #1 + str r0, [r2, #0x44] + add r2, r2, #4 + cmp r1, #0xb + blt _021DA0C8 + ldr r0, [r5, #8] + bl sub_0202404C + ldr r0, [r4, #8] + mov r1, #0 + bl ov21_021D8698 + add r1, r0, #0 + add r0, r5, #0 + bl ov21_021DA0FC + ldr r0, [r4, #8] + mov r1, #1 + bl ov21_021D8698 + add r1, r0, #0 + add r0, r5, #0 + bl ov21_021DA0FC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DA0BC + + thumb_func_start ov21_021DA0FC +ov21_021DA0FC: ; 0x021DA0FC + cmp r1, #9 + bhi _021DA18A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DA10C: ; jump table + .short _021DA18A - _021DA10C - 2 ; case 0 + .short _021DA120 - _021DA10C - 2 ; case 1 + .short _021DA12C - _021DA10C - 2 ; case 2 + .short _021DA138 - _021DA10C - 2 ; case 3 + .short _021DA144 - _021DA10C - 2 ; case 4 + .short _021DA150 - _021DA10C - 2 ; case 5 + .short _021DA15C - _021DA10C - 2 ; case 6 + .short _021DA168 - _021DA10C - 2 ; case 7 + .short _021DA174 - _021DA10C - 2 ; case 8 + .short _021DA180 - _021DA10C - 2 ; case 9 +_021DA120: + ldr r1, [r0, #0x44] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x44] + bx lr +_021DA12C: + ldr r1, [r0, #0x48] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x48] + bx lr +_021DA138: + ldr r1, [r0, #0x4c] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x4c] + bx lr +_021DA144: + ldr r1, [r0, #0x50] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x50] + bx lr +_021DA150: + ldr r1, [r0, #0x54] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x54] + bx lr +_021DA15C: + ldr r1, [r0, #0x58] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x58] + bx lr +_021DA168: + ldr r1, [r0, #0x5c] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x5c] + bx lr +_021DA174: + ldr r1, [r0, #0x60] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x60] + bx lr +_021DA180: + ldr r1, [r0, #0x64] + cmp r1, #2 + beq _021DA18A + mov r1, #1 + str r1, [r0, #0x64] +_021DA18A: + bx lr + thumb_func_end ov21_021DA0FC + + thumb_func_start ov21_021DA18C +ov21_021DA18C: ; 0x021DA18C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #4] + lsl r0, r5, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + cmp r1, #2 + bne _021DA1BE + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DA1C4 + ldr r0, [r4, #0x18] + mov r1, #4 + add r2, r5, #6 + bl ov21_021D4F20 + add r0, r4, #0 + add r0, #0x84 + str r5, [r0, #0] + mov r0, #1 + add r4, #0x90 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021DA1BE: + mov r0, #0 + add r4, #0x90 + str r0, [r4, #0] +_021DA1C4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DA18C + + thumb_func_start ov21_021DA1C8 +ov21_021DA1C8: ; 0x021DA1C8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + mov r1, #0x28 + str r2, [sp, #0xc] + bl sub_02018144 + ldr r1, [sp, #4] + str r0, [r1, #0xc] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x10 + ldr r6, [sp, #0x14] + str r0, [sp, #0x10] +_021DA1E8: + ldr r0, [sp, #0x10] + ldr r7, [sp, #0x10] + str r0, [sp, #0x18] + add r0, #0x10 + mov r4, #0 + mov r5, #0x30 + sub r7, #0x10 + str r0, [sp, #0x18] +_021DA1F8: + add r0, r5, #0 + add r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r5, #0 + ldr r1, [r0, #0xc] + add r0, r4, r6 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r2, [sp, #0x18] + add r1, r7, #0 + sub r3, #0x28 + bl ov21_021D154C + add r4, r4, #1 + add r5, #0x50 + cmp r4, #2 + blt _021DA1F8 + ldr r0, [sp, #0x10] + add r6, r6, #2 + add r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #4 + blt _021DA1E8 + mov r0, #0xa8 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #0x80 + ldr r0, [r0, #0xc] + mov r2, #0xa0 + add r0, #0x20 + mov r3, #0x58 + bl ov21_021D154C + mov r0, #0x28 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #0xa0 + ldr r0, [r0, #0xc] + mov r2, #0xc0 + add r0, #0x24 + mov r3, #8 + bl ov21_021D154C + ldr r3, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [sp, #4] + ldr r2, _021DA27C ; =ov21_021DA2C0 + str r1, [r0, #0x10] + str r0, [r0, #0x14] + ldr r0, [sp, #0xc] + mov r1, #0xa + str r0, [sp] + ldr r0, [sp, #4] + add r3, #0x10 + ldr r0, [r0, #0xc] + bl sub_02023FCC + ldr r1, [sp, #4] + str r0, [r1, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021DA27C: .word ov21_021DA2C0 + thumb_func_end ov21_021DA1C8 + + thumb_func_start ov21_021DA280 +ov21_021DA280: ; 0x021DA280 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r1, #0 + add r2, r5, #0 + mov r0, #3 +_021DA28C: + add r1, r1, #1 + str r0, [r2, #0x44] + add r2, r2, #4 + cmp r1, #0xa + blt _021DA28C + ldr r0, [r5, #8] + bl sub_0202404C + ldr r0, [r4, #8] + mov r1, #0 + bl ov21_021D8698 + add r1, r0, #0 + add r0, r5, #0 + bl ov21_021DA308 + ldr r0, [r4, #8] + mov r1, #1 + bl ov21_021D8698 + add r1, r0, #0 + add r0, r5, #0 + bl ov21_021DA308 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DA280 + + thumb_func_start ov21_021DA2C0 +ov21_021DA2C0: ; 0x021DA2C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #4] + lsl r0, r5, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + cmp r1, #2 + bne _021DA300 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DA306 + cmp r5, #8 + ldr r0, [r4, #0x18] + bne _021DA2EA + mov r1, #4 + add r2, r5, #7 + bl ov21_021D4F20 + b _021DA2F2 +_021DA2EA: + mov r1, #4 + add r2, r5, #6 + bl ov21_021D4F20 +_021DA2F2: + add r0, r4, #0 + add r0, #0x84 + str r5, [r0, #0] + mov r0, #1 + add r4, #0x90 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_021DA300: + mov r0, #0 + add r4, #0x90 + str r0, [r4, #0] +_021DA306: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DA2C0 + + thumb_func_start ov21_021DA308 +ov21_021DA308: ; 0x021DA308 + sub r1, #0xa + cmp r1, #7 + bhi _021DA388 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DA31A: ; jump table + .short _021DA32A - _021DA31A - 2 ; case 0 + .short _021DA336 - _021DA31A - 2 ; case 1 + .short _021DA342 - _021DA31A - 2 ; case 2 + .short _021DA34E - _021DA31A - 2 ; case 3 + .short _021DA35A - _021DA31A - 2 ; case 4 + .short _021DA366 - _021DA31A - 2 ; case 5 + .short _021DA372 - _021DA31A - 2 ; case 6 + .short _021DA37E - _021DA31A - 2 ; case 7 +_021DA32A: + ldr r1, [r0, #0x44] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x44] + bx lr +_021DA336: + ldr r1, [r0, #0x48] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x48] + bx lr +_021DA342: + ldr r1, [r0, #0x4c] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x4c] + bx lr +_021DA34E: + ldr r1, [r0, #0x50] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x50] + bx lr +_021DA35A: + ldr r1, [r0, #0x54] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x54] + bx lr +_021DA366: + ldr r1, [r0, #0x58] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x58] + bx lr +_021DA372: + ldr r1, [r0, #0x5c] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x5c] + bx lr +_021DA37E: + ldr r1, [r0, #0x60] + cmp r1, #2 + beq _021DA388 + mov r1, #1 + str r1, [r0, #0x60] +_021DA388: + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DA308 + + thumb_func_start ov21_021DA38C +ov21_021DA38C: ; 0x021DA38C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + mov r1, #0x3c + str r2, [sp, #0xc] + bl sub_02018144 + ldr r1, [sp, #4] + str r0, [r1, #0xc] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x10 + ldr r6, [sp, #0x14] + str r0, [sp, #0x10] +_021DA3AC: + ldr r0, [sp, #0x10] + ldr r7, [sp, #0x10] + str r0, [sp, #0x18] + add r0, #0x10 + mov r4, #0 + mov r5, #0x1c + sub r7, #0x10 + str r0, [sp, #0x18] +_021DA3BC: + add r0, r5, #0 + add r0, #0x18 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r5, #0 + ldr r1, [r0, #0xc] + add r0, r4, r6 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r2, [sp, #0x18] + add r1, r7, #0 + sub r3, #0x18 + bl ov21_021D154C + add r4, r4, #1 + add r5, #0x38 + cmp r4, #3 + blt _021DA3BC + ldr r0, [sp, #0x10] + add r6, r6, #3 + add r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #5 + blt _021DA3AC + ldr r1, [sp, #8] + ldr r0, [sp, #4] + ldr r3, [sp, #4] + str r1, [r0, #0x10] + str r0, [r0, #0x14] + ldr r0, [sp, #0xc] + ldr r2, _021DA418 ; =ov21_021DA514 + str r0, [sp] + ldr r0, [sp, #4] + mov r1, #0xf + ldr r0, [r0, #0xc] + add r3, #0x10 + bl sub_02023FCC + ldr r1, [sp, #4] + str r0, [r1, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021DA418: .word ov21_021DA514 + thumb_func_end ov21_021DA38C + + thumb_func_start ov21_021DA41C +ov21_021DA41C: ; 0x021DA41C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + mov r1, #0 + add r2, r4, #0 + mov r0, #3 +_021DA428: + add r1, r1, #1 + str r0, [r2, #0x44] + add r2, r2, #4 + cmp r1, #0xf + blt _021DA428 + ldr r0, [r4, #8] + bl sub_0202404C + ldr r0, [r5, #8] + bl ov21_021D86BC + cmp r0, #0xe + bhi _021DA512 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA44E: ; jump table + .short _021DA512 - _021DA44E - 2 ; case 0 + .short _021DA46C - _021DA44E - 2 ; case 1 + .short _021DA478 - _021DA44E - 2 ; case 2 + .short _021DA484 - _021DA44E - 2 ; case 3 + .short _021DA490 - _021DA44E - 2 ; case 4 + .short _021DA49C - _021DA44E - 2 ; case 5 + .short _021DA4A8 - _021DA44E - 2 ; case 6 + .short _021DA4B4 - _021DA44E - 2 ; case 7 + .short _021DA4C0 - _021DA44E - 2 ; case 8 + .short _021DA4CC - _021DA44E - 2 ; case 9 + .short _021DA4D8 - _021DA44E - 2 ; case 10 + .short _021DA4E4 - _021DA44E - 2 ; case 11 + .short _021DA4F0 - _021DA44E - 2 ; case 12 + .short _021DA4FC - _021DA44E - 2 ; case 13 + .short _021DA508 - _021DA44E - 2 ; case 14 +_021DA46C: + ldr r0, [r4, #0x60] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x60] + pop {r3, r4, r5, pc} +_021DA478: + ldr r0, [r4, #0x70] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x70] + pop {r3, r4, r5, pc} +_021DA484: + ldr r0, [r4, #0x58] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x58] + pop {r3, r4, r5, pc} +_021DA490: + ldr r0, [r4, #0x48] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x48] + pop {r3, r4, r5, pc} +_021DA49C: + ldr r0, [r4, #0x74] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x74] + pop {r3, r4, r5, pc} +_021DA4A8: + ldr r0, [r4, #0x64] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x64] + pop {r3, r4, r5, pc} +_021DA4B4: + ldr r0, [r4, #0x78] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x78] + pop {r3, r4, r5, pc} +_021DA4C0: + ldr r0, [r4, #0x54] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x54] + pop {r3, r4, r5, pc} +_021DA4CC: + ldr r0, [r4, #0x50] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x50] + pop {r3, r4, r5, pc} +_021DA4D8: + ldr r0, [r4, #0x5c] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x5c] + pop {r3, r4, r5, pc} +_021DA4E4: + ldr r0, [r4, #0x68] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x68] + pop {r3, r4, r5, pc} +_021DA4F0: + ldr r0, [r4, #0x4c] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x4c] + pop {r3, r4, r5, pc} +_021DA4FC: + ldr r0, [r4, #0x44] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x44] + pop {r3, r4, r5, pc} +_021DA508: + ldr r0, [r4, #0x6c] + cmp r0, #2 + beq _021DA512 + mov r0, #1 + str r0, [r4, #0x6c] +_021DA512: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DA41C + + thumb_func_start ov21_021DA514 +ov21_021DA514: ; 0x021DA514 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #4] + lsl r0, r5, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + cmp r1, #2 + bne _021DA532 + ldr r0, [r4, #0x18] + mov r1, #4 + add r2, r5, #6 + bl ov21_021D4F20 + add r4, #0x84 + str r5, [r4, #0] +_021DA532: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DA514 + + thumb_func_start ov21_021DA534 +ov21_021DA534: ; 0x021DA534 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r1, #0 + add r6, r0, #0 + cmp r4, #5 + bhi _021DA592 + add r5, r4, r4 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_021DA54C: ; jump table + .short _021DA558 - _021DA54C - 2 ; case 0 + .short _021DA562 - _021DA54C - 2 ; case 1 + .short _021DA56C - _021DA54C - 2 ; case 2 + .short _021DA576 - _021DA54C - 2 ; case 3 + .short _021DA580 - _021DA54C - 2 ; case 4 + .short _021DA58A - _021DA54C - 2 ; case 5 +_021DA558: + mov r2, #0x10 + mov r1, #0xd4 + mov r3, #0x1c + add r0, r2, #0 + b _021DA592 +_021DA562: + mov r1, #0xe0 + mov r2, #0x30 + mov r3, #0x2c + mov r0, #0x10 + b _021DA592 +_021DA56C: + mov r1, #0xe0 + mov r2, #0x50 + mov r3, #0x2c + mov r0, #0x10 + b _021DA592 +_021DA576: + mov r1, #0xe0 + mov r2, #0x70 + mov r3, #0x2c + mov r0, #0x10 + b _021DA592 +_021DA580: + mov r1, #0xe0 + mov r2, #0x90 + mov r3, #0x2c + mov r0, #0x10 + b _021DA592 +_021DA58A: + mov r1, #0xd4 + mov r2, #0xb0 + mov r3, #0x3c + mov r0, #0x10 +_021DA592: + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + str r4, [sp, #0xc] + bl ov21_021D4FE4 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DA534 + + thumb_func_start ov21_021DA5A8 +ov21_021DA5A8: ; 0x021DA5A8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DA6AC ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #1 + tst r0, r1 + beq _021DA67E + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DA68C + ldr r0, [r4, #0x18] + bl ov21_021D4F7C + cmp r0, #5 + bhi _021DA66E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA5D6: ; jump table + .short _021DA658 - _021DA5D6 - 2 ; case 0 + .short _021DA5E2 - _021DA5D6 - 2 ; case 1 + .short _021DA5FA - _021DA5D6 - 2 ; case 2 + .short _021DA610 - _021DA5D6 - 2 ; case 3 + .short _021DA628 - _021DA5D6 - 2 ; case 4 + .short _021DA640 - _021DA5D6 - 2 ; case 5 +_021DA5E2: + add r0, r4, #0 + mov r1, #1 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] + b _021DA66E +_021DA5FA: + add r0, r4, #0 + mov r1, #2 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] + b _021DA66E +_021DA610: + add r0, r4, #0 + mov r1, #3 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] + b _021DA66E +_021DA628: + add r0, r4, #0 + mov r1, #4 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] + b _021DA66E +_021DA640: + add r0, r4, #0 + mov r1, #5 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] + b _021DA66E +_021DA658: + add r0, r4, #0 + mov r1, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] +_021DA66E: + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x94 + str r1, [r0, #0] + b _021DA68C +_021DA67E: + add r0, r4, #0 + mov r1, #0 + add r0, #0x94 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x8c + str r1, [r0, #0] +_021DA68C: + ldr r0, _021DA6AC ; =0x021BF67C + mov r1, #2 + ldr r0, [r0, #0x48] + tst r0, r1 + beq _021DA6AA + add r0, r4, #0 + mov r2, #0 + add r0, #0x80 + str r2, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x2c] +_021DA6AA: + pop {r4, pc} + ; .align 2, 0 +_021DA6AC: .word 0x021BF67C + thumb_func_end ov21_021DA5A8 + + thumb_func_start ov21_021DA6B0 +ov21_021DA6B0: ; 0x021DA6B0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r1, #0 + mov r1, #0x7e + lsl r1, r1, #2 + bl sub_02018144 + ldr r1, [sp, #0x10] + str r0, [r1, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + mov r0, #0x10 + str r0, [sp, #0x1c] + mov r0, #6 + ldr r7, [sp, #0x20] + str r0, [sp, #0x18] +_021DA6D4: + mov r4, #0 + mov r6, #0x30 +_021DA6D8: + ldr r0, [sp, #0x18] + add r1, r4, r0 + ldr r0, [sp, #0x20] + cmp r0, #5 + bhi _021DA740 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA6EE: ; jump table + .short _021DA6FA - _021DA6EE - 2 ; case 0 + .short _021DA706 - _021DA6EE - 2 ; case 1 + .short _021DA712 - _021DA6EE - 2 ; case 2 + .short _021DA71E - _021DA6EE - 2 ; case 3 + .short _021DA72A - _021DA6EE - 2 ; case 4 + .short _021DA736 - _021DA6EE - 2 ; case 5 +_021DA6FA: + cmp r4, #2 + bne _021DA702 + mov r1, #0 + b _021DA740 +_021DA702: + mov r5, #1 + b _021DA740 +_021DA706: + cmp r4, #2 + bne _021DA70E + mov r1, #1 + b _021DA740 +_021DA70E: + mov r5, #0 + b _021DA740 +_021DA712: + cmp r4, #2 + bne _021DA71A + mov r1, #2 + b _021DA740 +_021DA71A: + mov r5, #0 + b _021DA740 +_021DA71E: + cmp r4, #2 + bne _021DA726 + mov r1, #3 + b _021DA740 +_021DA726: + mov r5, #0 + b _021DA740 +_021DA72A: + cmp r4, #2 + bne _021DA732 + mov r1, #4 + b _021DA740 +_021DA732: + mov r5, #1 + b _021DA740 +_021DA736: + cmp r4, #2 + bne _021DA73E + mov r1, #5 + b _021DA740 +_021DA73E: + mov r5, #1 +_021DA740: + cmp r4, #2 + bge _021DA766 + mov r0, #0x10 + str r0, [sp] + str r5, [sp, #4] + str r5, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [sp, #0x10] + add r2, r4, r7 + mov r1, #0x1c + mul r1, r2 + ldr r0, [r0, #0x1c] + ldr r2, [sp, #0x1c] + add r0, r0, r1 + add r1, r6, #0 + mov r3, #0x3c + bl ov21_021D4FE4 + b _021DA776 +_021DA766: + ldr r0, [sp, #0x10] + add r2, r4, r7 + ldr r3, [r0, #0x1c] + mov r0, #0x1c + mul r0, r2 + add r0, r3, r0 + bl ov21_021DA534 +_021DA776: + add r4, r4, #1 + add r6, #0x50 + cmp r4, #3 + blt _021DA6D8 + ldr r0, [sp, #0x1c] + add r7, r7, #3 + add r0, #0x20 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, r0, #2 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #6 + blt _021DA6D4 + ldr r0, [sp, #0x14] + bl ov21_021D4EE4 + ldr r1, [sp, #0x10] + mov r2, #3 + str r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + mov r3, #6 + bl ov21_021D4F04 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DA6B0 + + thumb_func_start ov21_021DA7B0 +ov21_021DA7B0: ; 0x021DA7B0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DA884 ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #1 + tst r0, r1 + beq _021DA87A + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DA880 + ldr r0, [r4, #0x18] + bl ov21_021D4F7C + sub r0, #8 + cmp r0, #5 + bhi _021DA880 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA7E0: ; jump table + .short _021DA7EC - _021DA7E0 - 2 ; case 0 + .short _021DA804 - _021DA7E0 - 2 ; case 1 + .short _021DA81C - _021DA7E0 - 2 ; case 2 + .short _021DA832 - _021DA7E0 - 2 ; case 3 + .short _021DA84A - _021DA7E0 - 2 ; case 4 + .short _021DA862 - _021DA7E0 - 2 ; case 5 +_021DA7EC: + add r0, r4, #0 + mov r1, #0 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA804: + add r0, r4, #0 + mov r1, #1 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA81C: + add r0, r4, #0 + mov r1, #2 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA832: + add r0, r4, #0 + mov r1, #3 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA84A: + add r0, r4, #0 + mov r1, #4 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA862: + add r0, r4, #0 + mov r1, #5 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA87A: + mov r0, #0 + add r4, #0x8c + str r0, [r4, #0] +_021DA880: + pop {r4, pc} + nop +_021DA884: .word 0x021BF67C + thumb_func_end ov21_021DA7B0 + + thumb_func_start ov21_021DA888 +ov21_021DA888: ; 0x021DA888 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r1, #0 + mov r1, #0x7e + lsl r1, r1, #2 + bl sub_02018144 + ldr r1, [sp, #0x10] + str r0, [r1, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + mov r0, #0x10 + str r0, [sp, #0x1c] + mov r0, #6 + ldr r7, [sp, #0x20] + str r0, [sp, #0x18] +_021DA8AC: + mov r4, #0 + mov r6, #0x30 +_021DA8B0: + ldr r0, [sp, #0x18] + add r1, r4, r0 + ldr r0, [sp, #0x20] + cmp r0, #5 + bhi _021DA918 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA8C6: ; jump table + .short _021DA8D2 - _021DA8C6 - 2 ; case 0 + .short _021DA8DE - _021DA8C6 - 2 ; case 1 + .short _021DA8EA - _021DA8C6 - 2 ; case 2 + .short _021DA8F6 - _021DA8C6 - 2 ; case 3 + .short _021DA902 - _021DA8C6 - 2 ; case 4 + .short _021DA90E - _021DA8C6 - 2 ; case 5 +_021DA8D2: + cmp r4, #2 + bne _021DA8DA + mov r1, #0 + b _021DA918 +_021DA8DA: + mov r5, #0 + b _021DA918 +_021DA8DE: + cmp r4, #2 + bne _021DA8E6 + mov r1, #1 + b _021DA918 +_021DA8E6: + mov r5, #0 + b _021DA918 +_021DA8EA: + cmp r4, #2 + bne _021DA8F2 + mov r1, #2 + b _021DA918 +_021DA8F2: + mov r5, #0 + b _021DA918 +_021DA8F6: + cmp r4, #2 + bne _021DA8FE + mov r1, #3 + b _021DA918 +_021DA8FE: + mov r5, #0 + b _021DA918 +_021DA902: + cmp r4, #2 + bne _021DA90A + mov r1, #4 + b _021DA918 +_021DA90A: + mov r5, #0 + b _021DA918 +_021DA90E: + cmp r4, #2 + bne _021DA916 + mov r1, #5 + b _021DA918 +_021DA916: + mov r5, #1 +_021DA918: + cmp r4, #2 + bge _021DA93E + mov r0, #0x10 + str r0, [sp] + str r5, [sp, #4] + str r5, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [sp, #0x10] + add r2, r4, r7 + mov r1, #0x1c + mul r1, r2 + ldr r0, [r0, #0x1c] + ldr r2, [sp, #0x1c] + add r0, r0, r1 + add r1, r6, #0 + mov r3, #0x3c + bl ov21_021D4FE4 + b _021DA94E +_021DA93E: + ldr r0, [sp, #0x10] + add r2, r4, r7 + ldr r3, [r0, #0x1c] + mov r0, #0x1c + mul r0, r2 + add r0, r3, r0 + bl ov21_021DA534 +_021DA94E: + add r4, r4, #1 + add r6, #0x50 + cmp r4, #3 + blt _021DA8B0 + ldr r0, [sp, #0x1c] + add r7, r7, #3 + add r0, #0x20 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, r0, #2 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #6 + blt _021DA8AC + ldr r0, [sp, #0x14] + bl ov21_021D4EE4 + ldr r1, [sp, #0x10] + mov r2, #3 + str r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + mov r3, #6 + bl ov21_021D4F04 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DA888 + + thumb_func_start ov21_021DA988 +ov21_021DA988: ; 0x021DA988 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DAAD0 ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #1 + tst r0, r1 + bne _021DA998 + b _021DAAC8 +_021DA998: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DA9AC + ldr r0, [r4, #0x18] + bl ov21_021D4F7C + cmp r0, #0xf + bls _021DA9AE +_021DA9AC: + b _021DAACE +_021DA9AE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA9BA: ; jump table + .short _021DAACE - _021DA9BA - 2 ; case 0 + .short _021DAACE - _021DA9BA - 2 ; case 1 + .short _021DAACE - _021DA9BA - 2 ; case 2 + .short _021DAACE - _021DA9BA - 2 ; case 3 + .short _021DAACE - _021DA9BA - 2 ; case 4 + .short _021DAACE - _021DA9BA - 2 ; case 5 + .short _021DA9DA - _021DA9BA - 2 ; case 6 + .short _021DA9F2 - _021DA9BA - 2 ; case 7 + .short _021DAA0A - _021DA9BA - 2 ; case 8 + .short _021DAA20 - _021DA9BA - 2 ; case 9 + .short _021DAA38 - _021DA9BA - 2 ; case 10 + .short _021DAA50 - _021DA9BA - 2 ; case 11 + .short _021DAA68 - _021DA9BA - 2 ; case 12 + .short _021DAA80 - _021DA9BA - 2 ; case 13 + .short _021DAA98 - _021DA9BA - 2 ; case 14 + .short _021DAAB0 - _021DA9BA - 2 ; case 15 +_021DA9DA: + add r0, r4, #0 + mov r1, #0 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DA9F2: + add r0, r4, #0 + mov r1, #1 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA0A: + add r0, r4, #0 + mov r1, #2 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA20: + add r0, r4, #0 + mov r1, #3 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA38: + add r0, r4, #0 + mov r1, #4 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA50: + add r0, r4, #0 + mov r1, #5 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA68: + add r0, r4, #0 + mov r1, #6 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA80: + add r0, r4, #0 + mov r1, #7 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAA98: + add r0, r4, #0 + mov r1, #8 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAAB0: + add r0, r4, #0 + mov r1, #9 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAAC8: + mov r0, #0 + add r4, #0x8c + str r0, [r4, #0] +_021DAACE: + pop {r4, pc} + ; .align 2, 0 +_021DAAD0: .word 0x021BF67C + thumb_func_end ov21_021DA988 + + thumb_func_start ov21_021DAAD4 +ov21_021DAAD4: ; 0x021DAAD4 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r1, #0 + mov r1, #0x7e + lsl r1, r1, #2 + bl sub_02018144 + ldr r1, [sp, #0x10] + str r0, [r1, #0x1c] + mov r0, #0 + str r0, [sp, #0x28] + mov r0, #0x10 + str r0, [sp, #0x24] + mov r0, #6 + str r0, [sp, #0x20] + ldr r0, [sp, #0x28] + str r0, [sp, #0x1c] +_021DAAFA: + mov r0, #0x30 + mov r4, #0 + str r0, [sp, #0x18] +_021DAB00: + ldr r0, [sp, #0x20] + ldr r3, [sp, #0x18] + add r1, r4, r0 + ldr r0, [sp, #0x28] + cmp r0, #5 + bhi _021DAB90 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DAB18: ; jump table + .short _021DAB24 - _021DAB18 - 2 ; case 0 + .short _021DAB34 - _021DAB18 - 2 ; case 1 + .short _021DAB44 - _021DAB18 - 2 ; case 2 + .short _021DAB54 - _021DAB18 - 2 ; case 3 + .short _021DAB64 - _021DAB18 - 2 ; case 4 + .short _021DAB74 - _021DAB18 - 2 ; case 5 +_021DAB24: + cmp r4, #2 + bne _021DAB2C + mov r1, #0 + b _021DAB90 +_021DAB2C: + mov r5, #0 + mov r7, #0x3c + mov r6, #0x10 + b _021DAB90 +_021DAB34: + cmp r4, #2 + bne _021DAB3C + mov r1, #1 + b _021DAB90 +_021DAB3C: + mov r5, #0 + mov r7, #0x3c + mov r6, #0x10 + b _021DAB90 +_021DAB44: + cmp r4, #2 + bne _021DAB4C + mov r1, #2 + b _021DAB90 +_021DAB4C: + mov r5, #0 + mov r7, #0x3c + mov r6, #0x10 + b _021DAB90 +_021DAB54: + cmp r4, #2 + bne _021DAB5C + mov r1, #3 + b _021DAB90 +_021DAB5C: + mov r5, #0 + mov r7, #0x3c + mov r6, #0x10 + b _021DAB90 +_021DAB64: + cmp r4, #2 + bne _021DAB6C + mov r1, #4 + b _021DAB90 +_021DAB6C: + mov r5, #0 + mov r7, #0x3c + mov r6, #0x10 + b _021DAB90 +_021DAB74: + cmp r4, #2 + bne _021DAB7C + mov r1, #5 + b _021DAB90 +_021DAB7C: + cmp r4, #0 + bne _021DAB8A + mov r7, #0x10 + mov r5, #0 + add r6, r7, #0 + mov r3, #0x18 + b _021DAB90 +_021DAB8A: + mov r5, #1 + mov r7, #0x3c + mov r6, #0x10 +_021DAB90: + cmp r4, #2 + bge _021DABB6 + str r6, [sp] + str r5, [sp, #4] + str r5, [sp, #8] + ldr r0, [sp, #0x10] + str r1, [sp, #0xc] + ldr r2, [r0, #0x1c] + ldr r0, [sp, #0x1c] + add r1, r4, r0 + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + add r1, r3, #0 + ldr r2, [sp, #0x24] + add r3, r7, #0 + bl ov21_021D4FE4 + b _021DABC8 +_021DABB6: + ldr r0, [sp, #0x10] + ldr r3, [r0, #0x1c] + ldr r0, [sp, #0x1c] + add r2, r4, r0 + mov r0, #0x1c + mul r0, r2 + add r0, r3, r0 + bl ov21_021DA534 +_021DABC8: + ldr r0, [sp, #0x18] + add r4, r4, #1 + add r0, #0x50 + str r0, [sp, #0x18] + cmp r4, #3 + blt _021DAB00 + ldr r0, [sp, #0x24] + add r0, #0x20 + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + add r0, r0, #2 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r0, r0, #3 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x28] + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, #6 + blt _021DAAFA + ldr r0, [sp, #0x14] + bl ov21_021D4EE4 + ldr r1, [sp, #0x10] + mov r2, #3 + str r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + mov r3, #6 + bl ov21_021D4F04 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DAAD4 + + thumb_func_start ov21_021DAC08 +ov21_021DAC08: ; 0x021DAC08 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DAD70 ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #1 + tst r0, r1 + bne _021DAC18 + b _021DAD68 +_021DAC18: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DAC2C + ldr r0, [r4, #0x18] + bl ov21_021D4F7C + cmp r0, #0x10 + bls _021DAC2E +_021DAC2C: + b _021DAD6E +_021DAC2E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DAC3A: ; jump table + .short _021DAD6E - _021DAC3A - 2 ; case 0 + .short _021DAD6E - _021DAC3A - 2 ; case 1 + .short _021DAD6E - _021DAC3A - 2 ; case 2 + .short _021DAD6E - _021DAC3A - 2 ; case 3 + .short _021DAD6E - _021DAC3A - 2 ; case 4 + .short _021DAD6E - _021DAC3A - 2 ; case 5 + .short _021DAC5C - _021DAC3A - 2 ; case 6 + .short _021DAC74 - _021DAC3A - 2 ; case 7 + .short _021DAC8C - _021DAC3A - 2 ; case 8 + .short _021DACA2 - _021DAC3A - 2 ; case 9 + .short _021DACBA - _021DAC3A - 2 ; case 10 + .short _021DACD2 - _021DAC3A - 2 ; case 11 + .short _021DACEA - _021DAC3A - 2 ; case 12 + .short _021DAD02 - _021DAC3A - 2 ; case 13 + .short _021DAD1A - _021DAC3A - 2 ; case 14 + .short _021DAD32 - _021DAC3A - 2 ; case 15 + .short _021DAD50 - _021DAC3A - 2 ; case 16 +_021DAC5C: + add r0, r4, #0 + mov r1, #0 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAC74: + add r0, r4, #0 + mov r1, #1 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAC8C: + add r0, r4, #0 + mov r1, #2 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DACA2: + add r0, r4, #0 + mov r1, #3 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DACBA: + add r0, r4, #0 + mov r1, #4 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DACD2: + add r0, r4, #0 + mov r1, #5 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DACEA: + add r0, r4, #0 + mov r1, #6 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAD02: + add r0, r4, #0 + mov r1, #7 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAD1A: + add r0, r4, #0 + mov r1, #8 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAD32: + add r0, r4, #0 + mov r1, #9 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + mov r0, #1 + add r4, #0x8c + str r0, [r4, #0] + pop {r4, pc} +_021DAD50: + add r0, r4, #0 + mov r1, #0xa + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAD68: + mov r0, #0 + add r4, #0x8c + str r0, [r4, #0] +_021DAD6E: + pop {r4, pc} + ; .align 2, 0 +_021DAD70: .word 0x021BF67C + thumb_func_end ov21_021DAC08 + + thumb_func_start ov21_021DAD74 +ov21_021DAD74: ; 0x021DAD74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r1, #0 + mov r1, #0x7e + lsl r1, r1, #2 + bl sub_02018144 + ldr r1, [sp, #0x10] + str r0, [r1, #0x1c] + mov r0, #0 + str r0, [sp, #0x2c] + mov r0, #0x10 + str r0, [sp, #0x24] + mov r0, #6 + str r0, [sp, #0x20] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x1c] +_021DAD9A: + mov r0, #0x30 + mov r4, #0 + str r0, [sp, #0x18] +_021DADA0: + ldr r0, [sp, #0x20] + ldr r3, [sp, #0x18] + add r1, r4, r0 + ldr r0, [sp, #0x2c] + cmp r0, #5 + bhi _021DAE5C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DADB8: ; jump table + .short _021DADC4 - _021DADB8 - 2 ; case 0 + .short _021DADD8 - _021DADB8 - 2 ; case 1 + .short _021DADEC - _021DADB8 - 2 ; case 2 + .short _021DAE00 - _021DADB8 - 2 ; case 3 + .short _021DAE14 - _021DADB8 - 2 ; case 4 + .short _021DAE38 - _021DADB8 - 2 ; case 5 +_021DADC4: + cmp r4, #2 + bne _021DADCC + mov r1, #0 + b _021DAE5C +_021DADCC: + mov r6, #0 + mov r0, #0x3c + add r5, r6, #0 + str r0, [sp, #0x28] + mov r7, #0x10 + b _021DAE5C +_021DADD8: + cmp r4, #2 + bne _021DADE0 + mov r1, #1 + b _021DAE5C +_021DADE0: + mov r6, #0 + mov r0, #0x3c + add r5, r6, #0 + str r0, [sp, #0x28] + mov r7, #0x10 + b _021DAE5C +_021DADEC: + cmp r4, #2 + bne _021DADF4 + mov r1, #2 + b _021DAE5C +_021DADF4: + mov r6, #0 + mov r0, #0x3c + add r5, r6, #0 + str r0, [sp, #0x28] + mov r7, #0x10 + b _021DAE5C +_021DAE00: + cmp r4, #2 + bne _021DAE08 + mov r1, #3 + b _021DAE5C +_021DAE08: + mov r6, #0 + mov r0, #0x3c + add r5, r6, #0 + str r0, [sp, #0x28] + mov r7, #0x10 + b _021DAE5C +_021DAE14: + cmp r4, #2 + bne _021DAE1C + mov r1, #4 + b _021DAE5C +_021DAE1C: + cmp r4, #0 + bne _021DAE2C + mov r0, #0x3c + mov r6, #1 + mov r5, #2 + str r0, [sp, #0x28] + mov r7, #0x10 + b _021DAE5C +_021DAE2C: + mov r6, #0 + mov r0, #0x3c + add r5, r6, #0 + str r0, [sp, #0x28] + mov r7, #0x10 + b _021DAE5C +_021DAE38: + cmp r4, #2 + bne _021DAE40 + mov r1, #5 + b _021DAE5C +_021DAE40: + cmp r4, #0 + bne _021DAE52 + mov r0, #0x10 + mov r6, #0 + add r5, r6, #0 + str r0, [sp, #0x28] + add r7, r0, #0 + mov r3, #0x18 + b _021DAE5C +_021DAE52: + mov r6, #1 + mov r0, #0x3c + add r5, r6, #0 + str r0, [sp, #0x28] + mov r7, #0x10 +_021DAE5C: + cmp r4, #2 + bge _021DAE82 + str r7, [sp] + str r6, [sp, #4] + str r5, [sp, #8] + ldr r0, [sp, #0x10] + str r1, [sp, #0xc] + ldr r2, [r0, #0x1c] + ldr r0, [sp, #0x1c] + add r1, r4, r0 + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + add r1, r3, #0 + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + bl ov21_021D4FE4 + b _021DAE94 +_021DAE82: + ldr r0, [sp, #0x10] + ldr r3, [r0, #0x1c] + ldr r0, [sp, #0x1c] + add r2, r4, r0 + mov r0, #0x1c + mul r0, r2 + add r0, r3, r0 + bl ov21_021DA534 +_021DAE94: + ldr r0, [sp, #0x18] + add r4, r4, #1 + add r0, #0x50 + str r0, [sp, #0x18] + cmp r4, #3 + bge _021DAEA2 + b _021DADA0 +_021DAEA2: + ldr r0, [sp, #0x24] + add r0, #0x20 + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + add r0, r0, #2 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r0, r0, #3 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x2c] + add r0, r0, #1 + str r0, [sp, #0x2c] + cmp r0, #6 + bge _021DAEC0 + b _021DAD9A +_021DAEC0: + ldr r0, [sp, #0x14] + bl ov21_021D4EE4 + ldr r1, [sp, #0x10] + mov r2, #3 + str r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + mov r3, #6 + bl ov21_021D4F04 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DAD74 + + thumb_func_start ov21_021DAED8 +ov21_021DAED8: ; 0x021DAED8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DB028 ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #1 + tst r0, r1 + bne _021DAEE8 + b _021DB020 +_021DAEE8: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DAEFC + ldr r0, [r4, #0x18] + bl ov21_021D4F7C + cmp r0, #0x10 + bls _021DAEFE +_021DAEFC: + b _021DB026 +_021DAEFE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DAF0A: ; jump table + .short _021DB026 - _021DAF0A - 2 ; case 0 + .short _021DB026 - _021DAF0A - 2 ; case 1 + .short _021DB026 - _021DAF0A - 2 ; case 2 + .short _021DB026 - _021DAF0A - 2 ; case 3 + .short _021DB026 - _021DAF0A - 2 ; case 4 + .short _021DB026 - _021DAF0A - 2 ; case 5 + .short _021DAF2C - _021DAF0A - 2 ; case 6 + .short _021DAF44 - _021DAF0A - 2 ; case 7 + .short _021DAF5C - _021DAF0A - 2 ; case 8 + .short _021DAF72 - _021DAF0A - 2 ; case 9 + .short _021DAF8A - _021DAF0A - 2 ; case 10 + .short _021DAFA2 - _021DAF0A - 2 ; case 11 + .short _021DAFBA - _021DAF0A - 2 ; case 12 + .short _021DAFD2 - _021DAF0A - 2 ; case 13 + .short _021DB026 - _021DAF0A - 2 ; case 14 + .short _021DAFEA - _021DAF0A - 2 ; case 15 + .short _021DB008 - _021DAF0A - 2 ; case 16 +_021DAF2C: + add r0, r4, #0 + mov r1, #0 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAF44: + add r0, r4, #0 + mov r1, #1 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAF5C: + add r0, r4, #0 + mov r1, #2 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAF72: + add r0, r4, #0 + mov r1, #3 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAF8A: + add r0, r4, #0 + mov r1, #4 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAFA2: + add r0, r4, #0 + mov r1, #5 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAFBA: + add r0, r4, #0 + mov r1, #6 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAFD2: + add r0, r4, #0 + mov r1, #7 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DAFEA: + add r0, r4, #0 + mov r1, #8 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + mov r0, #1 + add r4, #0x8c + str r0, [r4, #0] + pop {r4, pc} +_021DB008: + add r0, r4, #0 + mov r1, #9 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB020: + mov r0, #0 + add r4, #0x8c + str r0, [r4, #0] +_021DB026: + pop {r4, pc} + ; .align 2, 0 +_021DB028: .word 0x021BF67C + thumb_func_end ov21_021DAED8 + + thumb_func_start ov21_021DB02C +ov21_021DB02C: ; 0x021DB02C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r1, #0 + mov r1, #0x2a + lsl r1, r1, #4 + bl sub_02018144 + ldr r1, [sp, #0x10] + str r0, [r1, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + mov r0, #0x10 + str r0, [sp, #0x1c] + mov r0, #6 + ldr r7, [sp, #0x20] + str r0, [sp, #0x18] +_021DB050: + mov r4, #0 + mov r6, #0x1c +_021DB054: + ldr r0, [sp, #0x18] + add r1, r4, r0 + ldr r0, [sp, #0x20] + cmp r0, #5 + bhi _021DB0BC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DB06A: ; jump table + .short _021DB076 - _021DB06A - 2 ; case 0 + .short _021DB082 - _021DB06A - 2 ; case 1 + .short _021DB08E - _021DB06A - 2 ; case 2 + .short _021DB09A - _021DB06A - 2 ; case 3 + .short _021DB0A6 - _021DB06A - 2 ; case 4 + .short _021DB0B2 - _021DB06A - 2 ; case 5 +_021DB076: + cmp r4, #3 + bne _021DB07E + mov r1, #0 + b _021DB0BC +_021DB07E: + mov r5, #0 + b _021DB0BC +_021DB082: + cmp r4, #3 + bne _021DB08A + mov r1, #1 + b _021DB0BC +_021DB08A: + mov r5, #0 + b _021DB0BC +_021DB08E: + cmp r4, #3 + bne _021DB096 + mov r1, #2 + b _021DB0BC +_021DB096: + mov r5, #0 + b _021DB0BC +_021DB09A: + cmp r4, #3 + bne _021DB0A2 + mov r1, #3 + b _021DB0BC +_021DB0A2: + mov r5, #0 + b _021DB0BC +_021DB0A6: + cmp r4, #3 + bne _021DB0AE + mov r1, #4 + b _021DB0BC +_021DB0AE: + mov r5, #0 + b _021DB0BC +_021DB0B2: + cmp r4, #3 + bne _021DB0BA + mov r1, #5 + b _021DB0BC +_021DB0BA: + mov r5, #1 +_021DB0BC: + cmp r4, #3 + bge _021DB0E2 + mov r0, #0x14 + str r0, [sp] + str r5, [sp, #4] + str r5, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [sp, #0x10] + add r2, r4, r7 + mov r1, #0x1c + mul r1, r2 + ldr r0, [r0, #0x1c] + ldr r2, [sp, #0x1c] + add r0, r0, r1 + add r1, r6, #0 + mov r3, #0x20 + bl ov21_021D4FE4 + b _021DB0F2 +_021DB0E2: + ldr r0, [sp, #0x10] + add r2, r4, r7 + ldr r3, [r0, #0x1c] + mov r0, #0x1c + mul r0, r2 + add r0, r3, r0 + bl ov21_021DA534 +_021DB0F2: + add r4, r4, #1 + add r6, #0x38 + cmp r4, #4 + blt _021DB054 + ldr r0, [sp, #0x1c] + add r7, r7, #4 + add r0, #0x20 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, r0, #3 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #6 + blt _021DB050 + ldr r0, [sp, #0x14] + bl ov21_021D4EE4 + ldr r1, [sp, #0x10] + mov r2, #4 + str r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + mov r3, #6 + bl ov21_021D4F04 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DB02C + + thumb_func_start ov21_021DB12C +ov21_021DB12C: ; 0x021DB12C + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DB2F8 ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #1 + tst r0, r1 + bne _021DB13C + b _021DB2EE +_021DB13C: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DB150 + ldr r0, [r4, #0x18] + bl ov21_021D4F7C + cmp r0, #0x14 + bls _021DB152 +_021DB150: + b _021DB2F4 +_021DB152: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DB15E: ; jump table + .short _021DB2F4 - _021DB15E - 2 ; case 0 + .short _021DB2F4 - _021DB15E - 2 ; case 1 + .short _021DB2F4 - _021DB15E - 2 ; case 2 + .short _021DB2F4 - _021DB15E - 2 ; case 3 + .short _021DB2F4 - _021DB15E - 2 ; case 4 + .short _021DB2F4 - _021DB15E - 2 ; case 5 + .short _021DB188 - _021DB15E - 2 ; case 6 + .short _021DB1A0 - _021DB15E - 2 ; case 7 + .short _021DB1B8 - _021DB15E - 2 ; case 8 + .short _021DB1CE - _021DB15E - 2 ; case 9 + .short _021DB1E6 - _021DB15E - 2 ; case 10 + .short _021DB1FE - _021DB15E - 2 ; case 11 + .short _021DB216 - _021DB15E - 2 ; case 12 + .short _021DB22E - _021DB15E - 2 ; case 13 + .short _021DB246 - _021DB15E - 2 ; case 14 + .short _021DB25E - _021DB15E - 2 ; case 15 + .short _021DB276 - _021DB15E - 2 ; case 16 + .short _021DB28E - _021DB15E - 2 ; case 17 + .short _021DB2A6 - _021DB15E - 2 ; case 18 + .short _021DB2BE - _021DB15E - 2 ; case 19 + .short _021DB2D6 - _021DB15E - 2 ; case 20 +_021DB188: + add r0, r4, #0 + mov r1, #0 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB1A0: + add r0, r4, #0 + mov r1, #1 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB1B8: + add r0, r4, #0 + mov r1, #2 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB1CE: + add r0, r4, #0 + mov r1, #3 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB1E6: + add r0, r4, #0 + mov r1, #4 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB1FE: + add r0, r4, #0 + mov r1, #5 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB216: + add r0, r4, #0 + mov r1, #6 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB22E: + add r0, r4, #0 + mov r1, #7 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB246: + add r0, r4, #0 + mov r1, #8 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB25E: + add r0, r4, #0 + mov r1, #9 + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB276: + add r0, r4, #0 + mov r1, #0xa + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB28E: + add r0, r4, #0 + mov r1, #0xb + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB2A6: + add r0, r4, #0 + mov r1, #0xc + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB2BE: + add r0, r4, #0 + mov r1, #0xd + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB2D6: + add r0, r4, #0 + mov r1, #0xe + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + mov r1, #2 + lsl r0, r0, #2 + add r0, r4, r0 + str r1, [r0, #0x44] + pop {r4, pc} +_021DB2EE: + mov r0, #0 + add r4, #0x8c + str r0, [r4, #0] +_021DB2F4: + pop {r4, pc} + nop +_021DB2F8: .word 0x021BF67C + thumb_func_end ov21_021DB12C + + thumb_func_start ov21_021DB2FC +ov21_021DB2FC: ; 0x021DB2FC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021DB388 ; =0x021BF67C + add r4, r1, #0 + ldr r1, [r0, #0x48] + mov r0, #0x10 + tst r0, r1 + beq _021DB31E + ldr r0, [r5, #0x18] + mov r1, #0 + mov r2, #1 + bl ov21_021D4F20 + add r0, r5, #0 + mov r1, #1 + add r0, #0x8c + str r1, [r0, #0] +_021DB31E: + ldr r0, _021DB388 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x20 + tst r0, r1 + beq _021DB33A + mov r1, #0 + ldr r0, [r5, #0x18] + sub r2, r1, #1 + bl ov21_021D4F20 + add r0, r5, #0 + mov r1, #1 + add r0, #0x8c + str r1, [r0, #0] +_021DB33A: + ldr r0, _021DB388 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x40 + tst r0, r1 + beq _021DB356 + mov r1, #1 + ldr r0, [r5, #0x18] + sub r2, r1, #2 + bl ov21_021D4F20 + add r0, r5, #0 + mov r1, #1 + add r0, #0x8c + str r1, [r0, #0] +_021DB356: + ldr r0, _021DB388 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x80 + tst r0, r1 + beq _021DB372 + mov r1, #1 + ldr r0, [r5, #0x18] + add r2, r1, #0 + bl ov21_021D4F20 + add r0, r5, #0 + mov r1, #1 + add r0, #0x8c + str r1, [r0, #0] +_021DB372: + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DA5A8 + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DB38C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DB388: .word 0x021BF67C + thumb_func_end ov21_021DB2FC + + thumb_func_start ov21_021DB38C +ov21_021DB38C: ; 0x021DB38C + push {r3, lr} + cmp r2, #3 + bhi _021DB3C6 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DB39E: ; jump table + .short _021DB3A6 - _021DB39E - 2 ; case 0 + .short _021DB3AC - _021DB39E - 2 ; case 1 + .short _021DB3B2 - _021DB39E - 2 ; case 2 + .short _021DB3C2 - _021DB39E - 2 ; case 3 +_021DB3A6: + bl ov21_021DA7B0 + pop {r3, pc} +_021DB3AC: + bl ov21_021DA988 + pop {r3, pc} +_021DB3B2: + cmp r3, #0 + bne _021DB3BC + bl ov21_021DAC08 + pop {r3, pc} +_021DB3BC: + bl ov21_021DAED8 + pop {r3, pc} +_021DB3C2: + bl ov21_021DB12C +_021DB3C6: + pop {r3, pc} + thumb_func_end ov21_021DB38C + + thumb_func_start ov21_021DB3C8 +ov21_021DB3C8: ; 0x021DB3C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_020181C4 + ldr r0, [r4, #0x18] + bl ov21_021D4EFC + mov r0, #0 + str r0, [r4, #0x18] + str r0, [r4, #0x1c] + pop {r4, pc} + thumb_func_end ov21_021DB3C8 + + thumb_func_start ov21_021DB3E0 +ov21_021DB3E0: ; 0x021DB3E0 + push {r3, lr} + ldr r2, [r0, #0x24] + ldr r3, [r0, #0x28] + bl ov21_021DB3EC + pop {r3, pc} + thumb_func_end ov21_021DB3E0 + + thumb_func_start ov21_021DB3EC +ov21_021DB3EC: ; 0x021DB3EC + push {r3, lr} + cmp r2, #3 + bhi _021DB426 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DB3FE: ; jump table + .short _021DB406 - _021DB3FE - 2 ; case 0 + .short _021DB40C - _021DB3FE - 2 ; case 1 + .short _021DB412 - _021DB3FE - 2 ; case 2 + .short _021DB422 - _021DB3FE - 2 ; case 3 +_021DB406: + bl ov21_021DA6B0 + pop {r3, pc} +_021DB40C: + bl ov21_021DA888 + pop {r3, pc} +_021DB412: + cmp r3, #0 + bne _021DB41C + bl ov21_021DAAD4 + pop {r3, pc} +_021DB41C: + bl ov21_021DAD74 + pop {r3, pc} +_021DB422: + bl ov21_021DB02C +_021DB426: + pop {r3, pc} + thumb_func_end ov21_021DB3EC + + thumb_func_start ov21_021DB428 +ov21_021DB428: ; 0x021DB428 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x24] + cmp r0, #3 + bhi _021DB456 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DB43E: ; jump table + .short _021DB446 - _021DB43E - 2 ; case 0 + .short _021DB44A - _021DB43E - 2 ; case 1 + .short _021DB44E - _021DB43E - 2 ; case 2 + .short _021DB452 - _021DB43E - 2 ; case 3 +_021DB446: + mov r4, #1 + b _021DB45A +_021DB44A: + mov r4, #2 + b _021DB45A +_021DB44E: + mov r4, #3 + b _021DB45A +_021DB452: + mov r4, #4 + b _021DB45A +_021DB456: + bl sub_02022974 +_021DB45A: + ldr r0, [r5, #0x18] + mov r1, #4 + add r2, r4, #0 + bl ov21_021D4F20 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DB428 + + thumb_func_start ov21_021DB468 +ov21_021DB468: ; 0x021DB468 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021DB3C8 + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DB3EC + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DB468 + + thumb_func_start ov21_021DB480 +ov21_021DB480: ; 0x021DB480 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, [r4, #0x18] + ldr r1, [r5, #0] + add r6, r2, #0 + bl ov21_021D25B8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DB49C + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DB480 + + thumb_func_start ov21_021DB49C +ov21_021DB49C: ; 0x021DB49C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r2, #4] + add r4, r1, #0 + bl ov21_021D3998 + cmp r0, #0 + beq _021DB4CA + add r0, r5, #0 + mov r1, #1 + bl ov21_021DB4E4 + cmp r0, #0 + beq _021DB4C0 + ldr r0, [r4, #0x18] + ldr r1, [r5, #0] + bl ov21_021D25B8 +_021DB4C0: + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DB4D4 + pop {r3, r4, r5, pc} +_021DB4CA: + add r0, r5, #0 + mov r1, #0 + bl ov21_021DB4E4 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DB49C + + thumb_func_start ov21_021DB4D4 +ov21_021DB4D4: ; 0x021DB4D4 + ldr r3, _021DB4E0 ; =ov21_021D2544 + add r2, r0, #0 + ldr r0, [r1, #0x18] + ldr r1, [r2, #0] + bx r3 + nop +_021DB4E0: .word ov21_021D2544 + thumb_func_end ov21_021DB4D4 + + thumb_func_start ov21_021DB4E4 +ov21_021DB4E4: ; 0x021DB4E4 + push {r3, r4, r5, lr} + ldr r4, [r0, #0] + mov r0, #0x79 + lsl r0, r0, #2 + add r0, r4, r0 + add r5, r1, #0 + bl ov21_021D25A0 + cmp r5, r0 + beq _021DB508 + mov r0, #0x79 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r5, #0 + bl ov21_021D2584 + mov r0, #1 + pop {r3, r4, r5, pc} +_021DB508: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DB4E4 + + thumb_func_start ov21_021DB50C +ov21_021DB50C: ; 0x021DB50C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021DB5CC ; =0x00003EFD + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x7d + mov r3, #1 + bl sub_02009A4C + add r1, r5, #0 + add r1, #0xe4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + bl sub_0200A3DC + add r0, r5, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + bl sub_02009D4C + ldr r0, _021DB5D0 ; =0x00003E83 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + add r1, r5, #0 + add r1, #0xe8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200A640 + add r0, r5, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_02009D4C + ldr r0, _021DB5D4 ; =0x00003EFE + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x7e + mov r3, #1 + bl sub_02009BC4 + add r1, r5, #0 + add r1, #0xec + str r0, [r1, #0] + ldr r0, _021DB5D8 ; =0x00003EFC + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x7c + mov r3, #1 + bl sub_02009BC4 + add r5, #0xf0 + str r0, [r5, #0] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB5CC: .word 0x00003EFD +_021DB5D0: .word 0x00003E83 +_021DB5D4: .word 0x00003EFE +_021DB5D8: .word 0x00003EFC + thumb_func_end ov21_021DB50C + + thumb_func_start ov21_021DB5DC +ov21_021DB5DC: ; 0x021DB5DC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + ldr r4, [r1, #0] + bl sub_0200A4E4 + add r0, r5, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200A6DC + mov r0, #5 + add r1, r5, #0 + lsl r0, r0, #6 + add r1, #0xe4 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x51 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xe8 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x52 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xec + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + add r5, #0xf0 + ldr r0, [r4, r0] + ldr r1, [r5, #0] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DB5DC + + thumb_func_start ov21_021DB634 +ov21_021DB634: ; 0x021DB634 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + mov r0, #0x3f + lsl r0, r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x80 + mov r3, #1 + bl sub_02009A4C + add r1, r5, #0 + add r1, #0xf4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + bl sub_0200A3DC + add r0, r5, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + bl sub_02009D4C + ldr r0, _021DB6C0 ; =0x00003F01 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x81 + mov r3, #1 + bl sub_02009BC4 + add r1, r5, #0 + add r1, #0xfc + str r0, [r1, #0] + ldr r0, _021DB6C4 ; =0x00003EFF + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x7f + mov r3, #1 + bl sub_02009BC4 + mov r1, #1 + lsl r1, r1, #8 + str r0, [r5, r1] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB6C0: .word 0x00003F01 +_021DB6C4: .word 0x00003EFF + thumb_func_end ov21_021DB634 + + thumb_func_start ov21_021DB6C8 +ov21_021DB6C8: ; 0x021DB6C8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #5 + add r1, r5, #0 + lsl r0, r0, #6 + add r1, #0xf4 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x52 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xfc + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r1, #0x53 + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, #0x4c + ldr r1, [r5, r1] + bl sub_02009D68 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DB6C8 + + thumb_func_start ov21_021DB708 +ov21_021DB708: ; 0x021DB708 + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021DB788 ; =0x00003EFC + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #5 + str r1, [sp, #0x10] + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r2, #0x79 + add r3, r3, #2 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x2c + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x20 + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + add r0, r5, #0 + str r6, [sp, #0x48] + bl ov21_021DB858 + mov r3, #0x41 + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, r3, #4 + ldr r3, [r5, r3] + add r0, r5, #0 + add r1, sp, #0x2c + bl ov21_021DB81C + add sp, #0x70 + pop {r4, r5, r6, pc} + nop +_021DB788: .word 0x00003EFC + thumb_func_end ov21_021DB708 + + thumb_func_start ov21_021DB78C +ov21_021DB78C: ; 0x021DB78C + push {r4, lr} + add r4, r0, #0 + bl ov21_021DB90C + add r0, r4, #0 + bl ov21_021DB924 + pop {r4, pc} + thumb_func_end ov21_021DB78C + + thumb_func_start ov21_021DB79C +ov21_021DB79C: ; 0x021DB79C + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021DB818 ; =0x00003EFC + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #5 + str r1, [sp, #0x10] + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r2, #0x79 + add r3, r3, #2 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x20 + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + add r0, r5, #0 + str r6, [sp, #0x48] + bl ov21_021DB924 + mov r3, #0x41 + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, r3, #4 + ldr r3, [r5, r3] + add r0, r5, #0 + add r1, sp, #0x2c + bl ov21_021DB81C + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DB818: .word 0x00003EFC + thumb_func_end ov21_021DB79C + + thumb_func_start ov21_021DB81C +ov21_021DB81C: ; 0x021DB81C + push {r3, lr} + cmp r2, #3 + bhi _021DB856 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DB82E: ; jump table + .short _021DB836 - _021DB82E - 2 ; case 0 + .short _021DB83C - _021DB82E - 2 ; case 1 + .short _021DB842 - _021DB82E - 2 ; case 2 + .short _021DB852 - _021DB82E - 2 ; case 3 +_021DB836: + bl ov21_021DB944 + pop {r3, pc} +_021DB83C: + bl ov21_021DB9B4 + pop {r3, pc} +_021DB842: + cmp r3, #0 + bne _021DB84C + bl ov21_021DBA24 + pop {r3, pc} +_021DB84C: + bl ov21_021DBAB8 + pop {r3, pc} +_021DB852: + bl ov21_021DBB74 +_021DB856: + pop {r3, pc} + thumb_func_end ov21_021DB81C + + thumb_func_start ov21_021DB858 +ov21_021DB858: ; 0x021DB858 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0xe + add r6, r0, #0 + add r4, r1, #0 + mov r5, #0 + lsl r7, r7, #0x10 +_021DB864: + cmp r5, #5 + bhi _021DB8C2 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DB874: ; jump table + .short _021DB880 - _021DB874 - 2 ; case 0 + .short _021DB88E - _021DB874 - 2 ; case 1 + .short _021DB898 - _021DB874 - 2 ; case 2 + .short _021DB8A2 - _021DB874 - 2 ; case 3 + .short _021DB8AC - _021DB874 - 2 ; case 4 + .short _021DB8B6 - _021DB874 - 2 ; case 5 +_021DB880: + mov r0, #0xd + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + mov r0, #0x35 + lsl r0, r0, #0xe + str r0, [r4, #8] + b _021DB8C2 +_021DB88E: + mov r0, #0xf + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + str r7, [r4, #8] + b _021DB8C2 +_021DB898: + mov r0, #0x11 + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + str r7, [r4, #8] + b _021DB8C2 +_021DB8A2: + mov r0, #0x13 + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + str r7, [r4, #8] + b _021DB8C2 +_021DB8AC: + mov r0, #0x15 + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + str r7, [r4, #8] + b _021DB8C2 +_021DB8B6: + mov r0, #0x17 + lsl r0, r0, #0x10 + str r0, [r4, #0xc] + mov r0, #0x35 + lsl r0, r0, #0xe + str r0, [r4, #8] +_021DB8C2: + add r0, r4, #0 + bl sub_02021B90 + str r0, [r6, #0] + cmp r5, #5 + bhi _021DB902 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DB8DA: ; jump table + .short _021DB8E6 - _021DB8DA - 2 ; case 0 + .short _021DB8F0 - _021DB8DA - 2 ; case 1 + .short _021DB8F0 - _021DB8DA - 2 ; case 2 + .short _021DB8F0 - _021DB8DA - 2 ; case 3 + .short _021DB8F0 - _021DB8DA - 2 ; case 4 + .short _021DB8FA - _021DB8DA - 2 ; case 5 +_021DB8E6: + ldr r0, [r6, #0] + mov r1, #3 + bl sub_02021D6C + b _021DB902 +_021DB8F0: + ldr r0, [r6, #0] + mov r1, #2 + bl sub_02021D6C + b _021DB902 +_021DB8FA: + ldr r0, [r6, #0] + mov r1, #1 + bl sub_02021D6C +_021DB902: + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #6 + blt _021DB864 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DB858 + + thumb_func_start ov21_021DB90C +ov21_021DB90C: ; 0x021DB90C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021DB912: + ldr r0, [r5, #0] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _021DB912 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DB90C + + thumb_func_start ov21_021DB924 +ov21_021DB924: ; 0x021DB924 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DB92C: + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021DB938 + bl sub_02021BD4 + str r6, [r5, #0x30] +_021DB938: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _021DB92C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DB924 + + thumb_func_start ov21_021DB944 +ov21_021DB944: ; 0x021DB944 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #0x30 + add r6, r1, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r7, r6, #0 + str r0, [sp, #4] + add r7, #8 +_021DB95C: + ldr r0, [sp, #8] + mov r4, #0x30 + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [r6, #0xc] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + lsl r1, r0, #2 + ldr r0, [sp] + add r5, r0, r1 +_021DB976: + str r4, [r6, #8] + ldr r0, [r7, #0] + lsl r0, r0, #0xc + str r0, [r7, #0] + add r0, r6, #0 + bl sub_02021B90 + mov r1, #0 + str r0, [r5, #0x30] + bl sub_02021D6C + ldr r0, [sp, #0xc] + add r4, #0x50 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r0, #2 + blt _021DB976 + ldr r0, [sp, #8] + add r0, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #3 + blt _021DB95C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DB944 + + thumb_func_start ov21_021DB9B4 +ov21_021DB9B4: ; 0x021DB9B4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #0x10 + add r6, r1, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r7, r6, #0 + str r0, [sp, #4] + add r7, #8 +_021DB9CC: + ldr r0, [sp, #8] + mov r4, #0x30 + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [r6, #0xc] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + lsl r1, r0, #2 + ldr r0, [sp] + add r5, r0, r1 +_021DB9E6: + str r4, [r6, #8] + ldr r0, [r7, #0] + lsl r0, r0, #0xc + str r0, [r7, #0] + add r0, r6, #0 + bl sub_02021B90 + mov r1, #0 + str r0, [r5, #0x30] + bl sub_02021D6C + ldr r0, [sp, #0xc] + add r4, #0x50 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r0, #2 + blt _021DB9E6 + ldr r0, [sp, #8] + add r0, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #5 + blt _021DB9CC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DB9B4 + + thumb_func_start ov21_021DBA24 +ov21_021DBA24: ; 0x021DBA24 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #0x10 + add r6, r1, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r7, r6, #0 + str r0, [sp, #4] + add r7, #8 +_021DBA3C: + ldr r0, [sp, #8] + mov r4, #0x30 + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [r6, #0xc] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + lsl r1, r0, #2 + ldr r0, [sp] + add r5, r0, r1 +_021DBA56: + str r4, [r6, #8] + ldr r0, [r7, #0] + lsl r0, r0, #0xc + str r0, [r7, #0] + add r0, r6, #0 + bl sub_02021B90 + mov r1, #0 + str r0, [r5, #0x30] + bl sub_02021D6C + ldr r0, [sp, #0xc] + add r4, #0x50 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r0, #2 + blt _021DBA56 + ldr r0, [sp, #8] + add r0, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #5 + blt _021DBA3C + mov r0, #0xb0 + mov r2, #0x18 + str r0, [r6, #0xc] + lsl r0, r2, #0xc + str r0, [r6, #8] + ldr r0, [r6, #0xc] + lsl r1, r0, #0xc + lsl r0, r2, #0xf + add r0, r1, r0 + str r0, [r6, #0xc] + add r0, r6, #0 + bl sub_02021B90 + ldr r1, [sp] + str r0, [r1, #0x58] + mov r1, #5 + bl sub_02021D6C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DBA24 + + thumb_func_start ov21_021DBAB8 +ov21_021DBAB8: ; 0x021DBAB8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #0x10 + add r6, r1, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r7, r6, #0 + str r0, [sp, #4] + add r7, #8 +_021DBAD0: + ldr r0, [sp, #8] + mov r4, #0x30 + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [r6, #0xc] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + lsl r1, r0, #2 + ldr r0, [sp] + add r5, r0, r1 +_021DBAEA: + str r4, [r6, #8] + ldr r0, [r7, #0] + lsl r0, r0, #0xc + str r0, [r7, #0] + add r0, r6, #0 + bl sub_02021B90 + mov r1, #0 + str r0, [r5, #0x30] + bl sub_02021D6C + ldr r0, [sp, #0xc] + add r4, #0x50 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r0, #2 + blt _021DBAEA + ldr r0, [sp, #8] + add r0, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #4 + blt _021DBAD0 + mov r0, #0x90 + str r0, [r6, #0xc] + mov r0, #0x80 + lsl r0, r0, #0xc + str r0, [r6, #8] + ldr r0, [r6, #0xc] + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [r6, #0xc] + add r0, r6, #0 + bl sub_02021B90 + ldr r1, [sp] + str r0, [r1, #0x50] + mov r1, #0 + bl sub_02021D6C + mov r0, #0xb0 + mov r2, #0x18 + str r0, [r6, #0xc] + lsl r0, r2, #0xc + str r0, [r6, #8] + ldr r0, [r6, #0xc] + lsl r1, r0, #0xc + lsl r0, r2, #0xf + add r0, r1, r0 + str r0, [r6, #0xc] + add r0, r6, #0 + bl sub_02021B90 + ldr r1, [sp] + str r0, [r1, #0x54] + mov r1, #4 + bl sub_02021D6C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DBAB8 + + thumb_func_start ov21_021DBB74 +ov21_021DBB74: ; 0x021DBB74 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #0x10 + add r6, r1, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r7, r6, #0 + str r0, [sp, #4] + add r7, #8 +_021DBB8C: + ldr r0, [sp, #8] + mov r4, #0x1c + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [r6, #0xc] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + lsl r1, r0, #2 + ldr r0, [sp] + add r5, r0, r1 +_021DBBA6: + str r4, [r6, #8] + ldr r0, [r7, #0] + lsl r0, r0, #0xc + str r0, [r7, #0] + add r0, r6, #0 + bl sub_02021B90 + mov r1, #6 + str r0, [r5, #0x30] + bl sub_02021D6C + ldr r0, [sp, #0xc] + add r4, #0x38 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0xc] + cmp r0, #3 + blt _021DBBA6 + ldr r0, [sp, #8] + add r0, #0x20 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, r0, #3 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #5 + blt _021DBB8C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DBB74 + + thumb_func_start ov21_021DBBE4 +ov21_021DBBE4: ; 0x021DBBE4 + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + ldr r4, [r1, #0] + ldr r3, _021DBD9C ; =0x00003EFF + str r0, [sp, #0x2c] + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #5 + str r1, [sp, #0x10] + lsl r0, r0, #6 + add r5, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x58 + sub r2, #0x7c + add r3, r3, #2 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x38] + add r0, sp, #0x58 + str r0, [sp, #0x3c] + mov r0, #0xf + str r0, [sp, #0x4c] + mov r0, #2 + str r0, [sp, #0x50] + mov r0, #0 + str r0, [sp, #0x34] + mov r0, #0x10 + ldr r7, [sp, #0x34] + str r5, [sp, #0x54] + str r0, [sp, #0x30] +_021DBC4E: + ldr r0, [sp, #0x30] + mov r6, #0 + str r0, [sp, #0x44] + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x44] + ldr r0, [sp, #0x2c] + lsl r1, r7, #2 + mov r5, #0x1c + add r4, r0, r1 +_021DBC66: + str r5, [sp, #0x40] + lsl r0, r5, #0xc + str r0, [sp, #0x40] + add r0, sp, #0x38 + bl sub_02021B90 + add r1, r4, #0 + add r1, #0xa8 + str r0, [r1, #0] + add r0, r6, r7 + cmp r0, #0xe + bhi _021DBD78 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DBC8A: ; jump table + .short _021DBCA8 - _021DBC8A - 2 ; case 0 + .short _021DBCB6 - _021DBC8A - 2 ; case 1 + .short _021DBCC4 - _021DBC8A - 2 ; case 2 + .short _021DBCD2 - _021DBC8A - 2 ; case 3 + .short _021DBCE0 - _021DBC8A - 2 ; case 4 + .short _021DBCEE - _021DBC8A - 2 ; case 5 + .short _021DBCFC - _021DBC8A - 2 ; case 6 + .short _021DBD0A - _021DBC8A - 2 ; case 7 + .short _021DBD18 - _021DBC8A - 2 ; case 8 + .short _021DBD26 - _021DBC8A - 2 ; case 9 + .short _021DBD34 - _021DBC8A - 2 ; case 10 + .short _021DBD42 - _021DBC8A - 2 ; case 11 + .short _021DBD50 - _021DBC8A - 2 ; case 12 + .short _021DBD5E - _021DBC8A - 2 ; case 13 + .short _021DBD6C - _021DBC8A - 2 ; case 14 +_021DBCA8: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021D6C + b _021DBD78 +_021DBCB6: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #5 + bl sub_02021D6C + b _021DBD78 +_021DBCC4: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0xa + bl sub_02021D6C + b _021DBD78 +_021DBCD2: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021D6C + b _021DBD78 +_021DBCE0: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #6 + bl sub_02021D6C + b _021DBD78 +_021DBCEE: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0xb + bl sub_02021D6C + b _021DBD78 +_021DBCFC: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_02021D6C + b _021DBD78 +_021DBD0A: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #9 + bl sub_02021D6C + b _021DBD78 +_021DBD18: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0xc + bl sub_02021D6C + b _021DBD78 +_021DBD26: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_02021D6C + b _021DBD78 +_021DBD34: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #8 + bl sub_02021D6C + b _021DBD78 +_021DBD42: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0xd + bl sub_02021D6C + b _021DBD78 +_021DBD50: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #4 + bl sub_02021D6C + b _021DBD78 +_021DBD5E: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #7 + bl sub_02021D6C + b _021DBD78 +_021DBD6C: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021CAC +_021DBD78: + add r6, r6, #1 + add r5, #0x38 + add r4, r4, #4 + cmp r6, #3 + bge _021DBD84 + b _021DBC66 +_021DBD84: + ldr r0, [sp, #0x30] + add r7, r7, #3 + add r0, #0x20 + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + add r0, r0, #1 + str r0, [sp, #0x34] + cmp r0, #5 + bge _021DBD98 + b _021DBC4E +_021DBD98: + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DBD9C: .word 0x00003EFF + thumb_func_end ov21_021DBBE4 + + thumb_func_start ov21_021DBDA0 +ov21_021DBDA0: ; 0x021DBDA0 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DBDA8: + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DBDBC + bl sub_02021BD4 + add r0, r5, #0 + add r0, #0xa8 + str r6, [r0, #0] +_021DBDBC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _021DBDA8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DBDA0 + + thumb_func_start ov21_021DBDC8 +ov21_021DBDC8: ; 0x021DBDC8 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r5, r0, #0 + ldr r4, [r1, #0] + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021DBE28 ; =0x00003E83 + add r6, r2, #0 + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #4] + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #0xc] + mov r0, #0 + mov r2, #0x15 + str r0, [sp, #0x1c] + str r0, [sp, #0x20] + mov r0, #2 + str r0, [sp, #0x24] + str r6, [sp, #0x28] + lsl r2, r2, #4 + ldr r2, [r4, r2] + add r0, r5, #0 + add r1, sp, #4 + bl ov21_021DBEC8 + mov r3, #0x42 + lsl r3, r3, #2 + ldr r0, [r5, r3] + add r2, r3, #0 + str r0, [sp] + add r2, #0x48 + sub r3, r3, #4 + ldr r2, [r4, r2] + ldr r3, [r5, r3] + add r0, r5, #0 + add r1, sp, #4 + bl ov21_021DBE98 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + nop +_021DBE28: .word 0x00003E83 + thumb_func_end ov21_021DBDC8 + + thumb_func_start ov21_021DBE2C +ov21_021DBE2C: ; 0x021DBE2C + push {r4, lr} + add r4, r0, #0 + bl ov21_021DC04C + add r0, r4, #0 + bl ov21_021DC068 + pop {r4, pc} + thumb_func_end ov21_021DBE2C + + thumb_func_start ov21_021DBE3C +ov21_021DBE3C: ; 0x021DBE3C + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r5, r0, #0 + ldr r4, [r1, #0] + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021DBE94 ; =0x00003E83 + add r6, r2, #0 + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #4] + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x1c] + str r0, [sp, #0x20] + mov r0, #2 + str r0, [sp, #0x24] + add r0, r5, #0 + str r6, [sp, #0x28] + bl ov21_021DC068 + mov r3, #0x42 + lsl r3, r3, #2 + ldr r0, [r5, r3] + add r2, r3, #0 + str r0, [sp] + add r2, #0x48 + sub r3, r3, #4 + ldr r2, [r4, r2] + ldr r3, [r5, r3] + add r0, r5, #0 + add r1, sp, #4 + bl ov21_021DBE98 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + nop +_021DBE94: .word 0x00003E83 + thumb_func_end ov21_021DBE3C + + thumb_func_start ov21_021DBE98 +ov21_021DBE98: ; 0x021DBE98 + push {r3, lr} + cmp r3, #0 + beq _021DBEA8 + cmp r3, #1 + beq _021DBEAE + cmp r3, #2 + beq _021DBEB4 + pop {r3, pc} +_021DBEA8: + bl ov21_021DC088 + pop {r3, pc} +_021DBEAE: + bl ov21_021DC12C + pop {r3, pc} +_021DBEB4: + ldr r3, [sp, #8] + cmp r3, #0 + bne _021DBEC0 + bl ov21_021DC1E8 + pop {r3, pc} +_021DBEC0: + bl ov21_021DC2A4 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021DBE98 + + thumb_func_start ov21_021DBEC8 +ov21_021DBEC8: ; 0x021DBEC8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + add r6, r2, #0 + mov r1, #2 + bl sub_0201FAB4 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + str r0, [sp, #8] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r2, _021DC048 ; =0x000002B9 + add r0, r6, #0 + mov r3, #0x32 + bl ov21_021D4DAC + ldr r1, [sp, #8] + neg r0, r0 + str r1, [r4, #4] + ldr r1, [r5, #4] + lsr r0, r0, #1 + str r1, [r4, #0xc] + str r0, [r4, #0x10] + mov r0, #5 + mvn r0, r0 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov21_021D4CA0 + str r0, [r5, #0x1c] + ldr r0, [r0, #0] + add r1, r7, #3 + bl sub_02012A60 + ldr r0, [sp, #8] + bl ov21_021D4DA0 + add r0, r6, #0 + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0xc] + ldr r2, _021DC048 ; =0x000002B9 + add r0, r6, #0 + mov r3, #0x2f + bl ov21_021D4DAC + ldr r1, [sp, #0xc] + neg r0, r0 + str r1, [r4, #4] + ldr r1, [r5, #8] + lsr r0, r0, #1 + str r1, [r4, #0xc] + str r0, [r4, #0x10] + mov r0, #5 + mvn r0, r0 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov21_021D4CA0 + str r0, [r5, #0x20] + ldr r0, [r0, #0] + add r1, r7, #3 + bl sub_02012A60 + ldr r0, [sp, #0xc] + bl ov21_021D4DA0 + add r0, r6, #0 + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x10] + ldr r2, _021DC048 ; =0x000002B9 + add r0, r6, #0 + mov r3, #0x30 + bl ov21_021D4DAC + ldr r1, [sp, #0x10] + neg r0, r0 + str r1, [r4, #4] + ldr r1, [r5, #0xc] + lsr r0, r0, #1 + str r1, [r4, #0xc] + str r0, [r4, #0x10] + mov r0, #5 + mvn r0, r0 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov21_021D4CA0 + str r0, [r5, #0x24] + ldr r0, [r0, #0] + add r1, r7, #3 + bl sub_02012A60 + ldr r0, [sp, #0x10] + bl ov21_021D4DA0 + add r0, r6, #0 + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x14] + ldr r2, _021DC048 ; =0x000002B9 + add r0, r6, #0 + mov r3, #0x31 + bl ov21_021D4DAC + ldr r1, [sp, #0x14] + neg r0, r0 + str r1, [r4, #4] + ldr r1, [r5, #0x10] + lsr r0, r0, #1 + str r1, [r4, #0xc] + str r0, [r4, #0x10] + mov r0, #5 + mvn r0, r0 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov21_021D4CA0 + str r0, [r5, #0x28] + ldr r0, [r0, #0] + add r1, r7, #3 + bl sub_02012A60 + ldr r0, [sp, #0x14] + bl ov21_021D4DA0 + add r0, r6, #0 + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x18] + ldr r2, _021DC048 ; =0x000002B9 + add r0, r6, #0 + mov r3, #0x33 + bl ov21_021D4DAC + ldr r1, [sp, #0x18] + neg r0, r0 + str r1, [r4, #4] + ldr r1, [r5, #0x14] + lsr r0, r0, #1 + str r1, [r4, #0xc] + str r0, [r4, #0x10] + mov r0, #5 + mvn r0, r0 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov21_021D4CA0 + str r0, [r5, #0x2c] + ldr r0, [r0, #0] + add r1, r7, #1 + bl sub_02012A60 + ldr r0, [sp, #0x18] + bl ov21_021D4DA0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DC048: .word 0x000002B9 + thumb_func_end ov21_021DBEC8 + + thumb_func_start ov21_021DC04C +ov21_021DC04C: ; 0x021DC04C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021DC052: + ldr r0, [r5, #0x18] + cmp r0, #0 + beq _021DC05C + bl ov21_021D4D1C +_021DC05C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _021DC052 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DC04C + + thumb_func_start ov21_021DC068 +ov21_021DC068: ; 0x021DC068 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DC070: + ldr r0, [r5, #0x6c] + cmp r0, #0 + beq _021DC07C + bl ov21_021D4D1C + str r6, [r5, #0x6c] +_021DC07C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _021DC070 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DC068 + + thumb_func_start ov21_021DC088 +ov21_021DC088: ; 0x021DC088 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r0, r1, #0 + str r1, [sp, #8] + ldr r0, [r0, #8] + mov r1, #2 + str r2, [sp, #0xc] + bl sub_0201FAB4 + str r0, [sp, #0x10] + add r0, #0xb + mov r5, #0 + str r0, [sp, #0x10] +_021DC0A4: + ldr r0, [sp, #0xc] + mov r1, #0xa + mov r2, #2 + bl ov21_021D4D6C + add r7, r0, #0 + cmp r5, #5 + bhi _021DC0E2 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC0C0: ; jump table + .short _021DC0CC - _021DC0C0 - 2 ; case 0 + .short _021DC0D0 - _021DC0C0 - 2 ; case 1 + .short _021DC0D4 - _021DC0C0 - 2 ; case 2 + .short _021DC0D8 - _021DC0C0 - 2 ; case 3 + .short _021DC0DC - _021DC0C0 - 2 ; case 4 + .short _021DC0E0 - _021DC0C0 - 2 ; case 5 +_021DC0CC: + mov r4, #0x51 + b _021DC0E2 +_021DC0D0: + mov r4, #0x52 + b _021DC0E2 +_021DC0D4: + mov r4, #0x53 + b _021DC0E2 +_021DC0D8: + mov r4, #0x54 + b _021DC0E2 +_021DC0DC: + mov r4, #0x55 + b _021DC0E2 +_021DC0E0: + mov r4, #0x56 +_021DC0E2: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _021DC128 ; =0x000002B9 + add r1, r7, #0 + add r3, r4, #0 + bl ov21_021D4DAC + neg r0, r0 + lsr r1, r0, #1 + ldr r0, [sp, #8] + str r1, [r0, #0x10] + str r7, [r0, #4] + ldr r1, [r6, #0x30] + str r1, [r0, #0xc] + mov r1, #5 + mvn r1, r1 + str r1, [r0, #0x14] + bl ov21_021D4CA0 + str r0, [r6, #0x6c] + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + bl sub_02012A60 + add r0, r7, #0 + bl ov21_021D4DA0 + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #6 + blt _021DC0A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DC128: .word 0x000002B9 + thumb_func_end ov21_021DC088 + + thumb_func_start ov21_021DC12C +ov21_021DC12C: ; 0x021DC12C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r0, r1, #0 + str r1, [sp, #8] + ldr r0, [r0, #8] + mov r1, #2 + str r2, [sp, #0xc] + bl sub_0201FAB4 + str r0, [sp, #0x10] + add r0, #0xb + mov r5, #0 + str r0, [sp, #0x10] +_021DC148: + ldr r0, [sp, #0xc] + mov r1, #0xa + mov r2, #2 + bl ov21_021D4D6C + add r7, r0, #0 + cmp r5, #9 + bhi _021DC19E + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC164: ; jump table + .short _021DC178 - _021DC164 - 2 ; case 0 + .short _021DC17C - _021DC164 - 2 ; case 1 + .short _021DC180 - _021DC164 - 2 ; case 2 + .short _021DC184 - _021DC164 - 2 ; case 3 + .short _021DC188 - _021DC164 - 2 ; case 4 + .short _021DC18C - _021DC164 - 2 ; case 5 + .short _021DC190 - _021DC164 - 2 ; case 6 + .short _021DC194 - _021DC164 - 2 ; case 7 + .short _021DC198 - _021DC164 - 2 ; case 8 + .short _021DC19C - _021DC164 - 2 ; case 9 +_021DC178: + mov r4, #0x36 + b _021DC19E +_021DC17C: + mov r4, #0x37 + b _021DC19E +_021DC180: + mov r4, #0x38 + b _021DC19E +_021DC184: + mov r4, #0x39 + b _021DC19E +_021DC188: + mov r4, #0x3a + b _021DC19E +_021DC18C: + mov r4, #0x3b + b _021DC19E +_021DC190: + mov r4, #0x3c + b _021DC19E +_021DC194: + mov r4, #0x3d + b _021DC19E +_021DC198: + mov r4, #0x3e + b _021DC19E +_021DC19C: + mov r4, #0x7e +_021DC19E: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _021DC1E4 ; =0x000002B9 + add r1, r7, #0 + add r3, r4, #0 + bl ov21_021D4DAC + neg r0, r0 + lsr r1, r0, #1 + ldr r0, [sp, #8] + str r1, [r0, #0x10] + str r7, [r0, #4] + ldr r1, [r6, #0x30] + str r1, [r0, #0xc] + mov r1, #5 + mvn r1, r1 + str r1, [r0, #0x14] + bl ov21_021D4CA0 + str r0, [r6, #0x6c] + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + bl sub_02012A60 + add r0, r7, #0 + bl ov21_021D4DA0 + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #0xa + blt _021DC148 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DC1E4: .word 0x000002B9 + thumb_func_end ov21_021DC12C + + thumb_func_start ov21_021DC1E8 +ov21_021DC1E8: ; 0x021DC1E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r0, r1, #0 + str r1, [sp, #8] + ldr r0, [r0, #8] + mov r1, #2 + str r2, [sp, #0xc] + bl sub_0201FAB4 + str r0, [sp, #0x10] + add r0, #0xb + mov r5, #0 + str r0, [sp, #0x10] +_021DC204: + ldr r0, [sp, #0xc] + mov r1, #0xa + mov r2, #2 + bl ov21_021D4D6C + add r7, r0, #0 + cmp r5, #9 + bhi _021DC25A + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC220: ; jump table + .short _021DC234 - _021DC220 - 2 ; case 0 + .short _021DC238 - _021DC220 - 2 ; case 1 + .short _021DC23C - _021DC220 - 2 ; case 2 + .short _021DC240 - _021DC220 - 2 ; case 3 + .short _021DC244 - _021DC220 - 2 ; case 4 + .short _021DC248 - _021DC220 - 2 ; case 5 + .short _021DC24C - _021DC220 - 2 ; case 6 + .short _021DC250 - _021DC220 - 2 ; case 7 + .short _021DC254 - _021DC220 - 2 ; case 8 + .short _021DC258 - _021DC220 - 2 ; case 9 +_021DC234: + mov r4, #0x40 + b _021DC25A +_021DC238: + mov r4, #0x46 + b _021DC25A +_021DC23C: + mov r4, #0x49 + b _021DC25A +_021DC240: + mov r4, #0x47 + b _021DC25A +_021DC244: + mov r4, #0x48 + b _021DC25A +_021DC248: + mov r4, #0x4c + b _021DC25A +_021DC24C: + mov r4, #0x4b + b _021DC25A +_021DC250: + mov r4, #0x4d + b _021DC25A +_021DC254: + mov r4, #0x50 + b _021DC25A +_021DC258: + mov r4, #0x7f +_021DC25A: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _021DC2A0 ; =0x000002B9 + add r1, r7, #0 + add r3, r4, #0 + bl ov21_021D4DAC + neg r0, r0 + lsr r1, r0, #1 + ldr r0, [sp, #8] + str r1, [r0, #0x10] + str r7, [r0, #4] + ldr r1, [r6, #0x30] + str r1, [r0, #0xc] + mov r1, #5 + mvn r1, r1 + str r1, [r0, #0x14] + bl ov21_021D4CA0 + str r0, [r6, #0x6c] + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + bl sub_02012A60 + add r0, r7, #0 + bl ov21_021D4DA0 + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #0xa + blt _021DC204 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DC2A0: .word 0x000002B9 + thumb_func_end ov21_021DC1E8 + + thumb_func_start ov21_021DC2A4 +ov21_021DC2A4: ; 0x021DC2A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r0, r1, #0 + str r1, [sp, #8] + ldr r0, [r0, #8] + mov r1, #2 + str r2, [sp, #0xc] + bl sub_0201FAB4 + str r0, [sp, #0x10] + add r0, #0xb + mov r5, #0 + str r0, [sp, #0x10] +_021DC2C0: + ldr r0, [sp, #0xc] + mov r1, #0xa + mov r2, #2 + bl ov21_021D4D6C + add r7, r0, #0 + cmp r5, #8 + bhi _021DC310 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC2DC: ; jump table + .short _021DC2EE - _021DC2DC - 2 ; case 0 + .short _021DC2F2 - _021DC2DC - 2 ; case 1 + .short _021DC2F6 - _021DC2DC - 2 ; case 2 + .short _021DC2FA - _021DC2DC - 2 ; case 3 + .short _021DC2FE - _021DC2DC - 2 ; case 4 + .short _021DC302 - _021DC2DC - 2 ; case 5 + .short _021DC306 - _021DC2DC - 2 ; case 6 + .short _021DC30A - _021DC2DC - 2 ; case 7 + .short _021DC30E - _021DC2DC - 2 ; case 8 +_021DC2EE: + mov r4, #0x41 + b _021DC310 +_021DC2F2: + mov r4, #0x42 + b _021DC310 +_021DC2F6: + mov r4, #0x44 + b _021DC310 +_021DC2FA: + mov r4, #0x43 + b _021DC310 +_021DC2FE: + mov r4, #0x4a + b _021DC310 +_021DC302: + mov r4, #0x45 + b _021DC310 +_021DC306: + mov r4, #0x4e + b _021DC310 +_021DC30A: + mov r4, #0x4f + b _021DC310 +_021DC30E: + mov r4, #0x7f +_021DC310: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r2, _021DC358 ; =0x000002B9 + add r1, r7, #0 + add r3, r4, #0 + bl ov21_021D4DAC + neg r0, r0 + lsr r1, r0, #1 + ldr r0, [sp, #8] + str r1, [r0, #0x10] + str r7, [r0, #4] + ldr r1, [r6, #0x30] + str r1, [r0, #0xc] + mov r1, #5 + mvn r1, r1 + str r1, [r0, #0x14] + bl ov21_021D4CA0 + str r0, [r6, #0x6c] + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + bl sub_02012A60 + add r0, r7, #0 + bl ov21_021D4DA0 + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #9 + blt _021DC2C0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DC358: .word 0x000002B9 + thumb_func_end ov21_021DC2A4 + + thumb_func_start ov21_021DC35C +ov21_021DC35C: ; 0x021DC35C + ldr r1, _021DC364 ; =0x0000FFFF + add r0, #0x84 + str r1, [r0, #0] + bx lr + ; .align 2, 0 +_021DC364: .word 0x0000FFFF + thumb_func_end ov21_021DC35C + + thumb_func_start ov21_021DC368 +ov21_021DC368: ; 0x021DC368 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021DC3BC + ldr r2, [r5, #0x24] + ldr r3, [r5, #0x28] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DC380 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DC368 + + thumb_func_start ov21_021DC380 +ov21_021DC380: ; 0x021DC380 + push {r3, lr} + cmp r2, #3 + bhi _021DC3BA + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DC392: ; jump table + .short _021DC39A - _021DC392 - 2 ; case 0 + .short _021DC3A0 - _021DC392 - 2 ; case 1 + .short _021DC3A6 - _021DC392 - 2 ; case 2 + .short _021DC3B6 - _021DC392 - 2 ; case 3 +_021DC39A: + bl ov21_021DC48C + pop {r3, pc} +_021DC3A0: + bl ov21_021DC4F8 + pop {r3, pc} +_021DC3A6: + cmp r3, #0 + bne _021DC3B0 + bl ov21_021DC57C + pop {r3, pc} +_021DC3B0: + bl ov21_021DC600 + pop {r3, pc} +_021DC3B6: + bl ov21_021DC720 +_021DC3BA: + pop {r3, pc} + thumb_func_end ov21_021DC380 + + thumb_func_start ov21_021DC3BC +ov21_021DC3BC: ; 0x021DC3BC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r4, r1, #0 + cmp r0, #5 + bhi _021DC47A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC3D6: ; jump table + .short _021DC3E2 - _021DC3D6 - 2 ; case 0 + .short _021DC3F2 - _021DC3D6 - 2 ; case 1 + .short _021DC40C - _021DC3D6 - 2 ; case 2 + .short _021DC426 - _021DC3D6 - 2 ; case 3 + .short _021DC448 - _021DC3D6 - 2 ; case 4 + .short _021DC462 - _021DC3D6 - 2 ; case 5 +_021DC3E2: + ldr r0, [r4, #8] + mov r1, #0 + bl ov21_021D86C4 + ldr r0, _021DC484 ; =0x000005DD + bl sub_02005748 + b _021DC47A +_021DC3F2: + ldr r0, [r4, #8] + bl ov21_021D863C + cmp r0, #0 + beq _021DC47A + ldr r0, [r4, #8] + mov r1, #0 + bl ov21_021D8628 + ldr r0, _021DC484 ; =0x000005DD + bl sub_02005748 + b _021DC47A +_021DC40C: + ldr r0, [r4, #8] + bl ov21_021D863C + cmp r0, #1 + beq _021DC47A + ldr r0, [r4, #8] + mov r1, #1 + bl ov21_021D8628 + ldr r0, _021DC484 ; =0x000005DD + bl sub_02005748 + b _021DC47A +_021DC426: + ldr r0, [r4, #8] + bl ov21_021D863C + cmp r0, #2 + beq _021DC47A + ldr r0, [r4, #8] + mov r1, #2 + bl ov21_021D8628 + ldr r0, _021DC484 ; =0x000005DD + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + add r0, #0x88 + str r1, [r0, #0] + b _021DC47A +_021DC448: + ldr r0, [r4, #8] + bl ov21_021D863C + cmp r0, #3 + beq _021DC47A + ldr r0, [r4, #8] + mov r1, #3 + bl ov21_021D8628 + ldr r0, _021DC484 ; =0x000005DD + bl sub_02005748 + b _021DC47A +_021DC462: + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + cmp r0, #1 + bgt _021DC47A + ldr r0, [r4, #8] + mov r1, #1 + bl ov21_021D86C4 + ldr r0, _021DC484 ; =0x000005DD + bl sub_02005748 +_021DC47A: + ldr r0, _021DC488 ; =0x0000FFFF + add r5, #0x80 + str r0, [r5, #0] + pop {r3, r4, r5, pc} + nop +_021DC484: .word 0x000005DD +_021DC488: .word 0x0000FFFF + thumb_func_end ov21_021DC3BC + + thumb_func_start ov21_021DC48C +ov21_021DC48C: ; 0x021DC48C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r6, r1, #0 + mov r4, #0x64 + cmp r0, #5 + bhi _021DC4CA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC4A8: ; jump table + .short _021DC4B4 - _021DC4A8 - 2 ; case 0 + .short _021DC4B8 - _021DC4A8 - 2 ; case 1 + .short _021DC4BC - _021DC4A8 - 2 ; case 2 + .short _021DC4C0 - _021DC4A8 - 2 ; case 3 + .short _021DC4C4 - _021DC4A8 - 2 ; case 4 + .short _021DC4C8 - _021DC4A8 - 2 ; case 5 +_021DC4B4: + mov r4, #0 + b _021DC4CA +_021DC4B8: + mov r4, #1 + b _021DC4CA +_021DC4BC: + mov r4, #2 + b _021DC4CA +_021DC4C0: + mov r4, #3 + b _021DC4CA +_021DC4C4: + mov r4, #4 + b _021DC4CA +_021DC4C8: + mov r4, #5 +_021DC4CA: + cmp r4, #0x64 + beq _021DC4E6 + ldr r0, [r6, #8] + bl ov21_021D8658 + cmp r4, r0 + beq _021DC4E6 + ldr r0, _021DC4F0 ; =0x000005DD + bl sub_02005748 + ldr r0, [r6, #8] + add r1, r4, #0 + bl ov21_021D8644 +_021DC4E6: + ldr r0, _021DC4F4 ; =0x0000FFFF + add r5, #0x84 + str r0, [r5, #0] + pop {r4, r5, r6, pc} + nop +_021DC4F0: .word 0x000005DD +_021DC4F4: .word 0x0000FFFF + thumb_func_end ov21_021DC48C + + thumb_func_start ov21_021DC4F8 +ov21_021DC4F8: ; 0x021DC4F8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r6, r1, #0 + mov r4, #0x64 + cmp r0, #9 + bhi _021DC54E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC514: ; jump table + .short _021DC528 - _021DC514 - 2 ; case 0 + .short _021DC52C - _021DC514 - 2 ; case 1 + .short _021DC530 - _021DC514 - 2 ; case 2 + .short _021DC534 - _021DC514 - 2 ; case 3 + .short _021DC538 - _021DC514 - 2 ; case 4 + .short _021DC53C - _021DC514 - 2 ; case 5 + .short _021DC540 - _021DC514 - 2 ; case 6 + .short _021DC544 - _021DC514 - 2 ; case 7 + .short _021DC548 - _021DC514 - 2 ; case 8 + .short _021DC54C - _021DC514 - 2 ; case 9 +_021DC528: + mov r4, #1 + b _021DC54E +_021DC52C: + mov r4, #2 + b _021DC54E +_021DC530: + mov r4, #3 + b _021DC54E +_021DC534: + mov r4, #4 + b _021DC54E +_021DC538: + mov r4, #5 + b _021DC54E +_021DC53C: + mov r4, #6 + b _021DC54E +_021DC540: + mov r4, #7 + b _021DC54E +_021DC544: + mov r4, #8 + b _021DC54E +_021DC548: + mov r4, #9 + b _021DC54E +_021DC54C: + mov r4, #0 +_021DC54E: + cmp r4, #0x64 + beq _021DC56A + ldr r0, [r6, #8] + bl ov21_021D8674 + cmp r4, r0 + beq _021DC56A + ldr r0, _021DC574 ; =0x000005DD + bl sub_02005748 + ldr r0, [r6, #8] + add r1, r4, #0 + bl ov21_021D8660 +_021DC56A: + ldr r0, _021DC578 ; =0x0000FFFF + add r5, #0x84 + str r0, [r5, #0] + pop {r4, r5, r6, pc} + nop +_021DC574: .word 0x000005DD +_021DC578: .word 0x0000FFFF + thumb_func_end ov21_021DC4F8 + + thumb_func_start ov21_021DC57C +ov21_021DC57C: ; 0x021DC57C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r6, r1, #0 + mov r4, #0x64 + cmp r0, #0xa + bhi _021DC5E0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC598: ; jump table + .short _021DC5AE - _021DC598 - 2 ; case 0 + .short _021DC5B2 - _021DC598 - 2 ; case 1 + .short _021DC5B6 - _021DC598 - 2 ; case 2 + .short _021DC5BA - _021DC598 - 2 ; case 3 + .short _021DC5BE - _021DC598 - 2 ; case 4 + .short _021DC5C2 - _021DC598 - 2 ; case 5 + .short _021DC5C6 - _021DC598 - 2 ; case 6 + .short _021DC5CA - _021DC598 - 2 ; case 7 + .short _021DC5CE - _021DC598 - 2 ; case 8 + .short _021DC5D2 - _021DC598 - 2 ; case 9 + .short _021DC5D6 - _021DC598 - 2 ; case 10 +_021DC5AE: + mov r4, #1 + b _021DC5E0 +_021DC5B2: + mov r4, #2 + b _021DC5E0 +_021DC5B6: + mov r4, #3 + b _021DC5E0 +_021DC5BA: + mov r4, #4 + b _021DC5E0 +_021DC5BE: + mov r4, #5 + b _021DC5E0 +_021DC5C2: + mov r4, #6 + b _021DC5E0 +_021DC5C6: + mov r4, #7 + b _021DC5E0 +_021DC5CA: + mov r4, #8 + b _021DC5E0 +_021DC5CE: + mov r4, #9 + b _021DC5E0 +_021DC5D2: + mov r4, #0 + b _021DC5E0 +_021DC5D6: + mov r0, #1 + str r0, [r5, #0x20] + ldr r0, _021DC5F8 ; =0x000005DD + bl sub_02005748 +_021DC5E0: + cmp r4, #0x64 + beq _021DC5EE + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DC67C +_021DC5EE: + ldr r0, _021DC5FC ; =0x0000FFFF + add r5, #0x84 + str r0, [r5, #0] + pop {r4, r5, r6, pc} + nop +_021DC5F8: .word 0x000005DD +_021DC5FC: .word 0x0000FFFF + thumb_func_end ov21_021DC57C + + thumb_func_start ov21_021DC600 +ov21_021DC600: ; 0x021DC600 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r6, r1, #0 + mov r4, #0x64 + cmp r0, #9 + bhi _021DC65E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC61C: ; jump table + .short _021DC630 - _021DC61C - 2 ; case 0 + .short _021DC634 - _021DC61C - 2 ; case 1 + .short _021DC638 - _021DC61C - 2 ; case 2 + .short _021DC63C - _021DC61C - 2 ; case 3 + .short _021DC640 - _021DC61C - 2 ; case 4 + .short _021DC644 - _021DC61C - 2 ; case 5 + .short _021DC648 - _021DC61C - 2 ; case 6 + .short _021DC64C - _021DC61C - 2 ; case 7 + .short _021DC650 - _021DC61C - 2 ; case 8 + .short _021DC654 - _021DC61C - 2 ; case 9 +_021DC630: + mov r4, #0xa + b _021DC65E +_021DC634: + mov r4, #0xb + b _021DC65E +_021DC638: + mov r4, #0xc + b _021DC65E +_021DC63C: + mov r4, #0xd + b _021DC65E +_021DC640: + mov r4, #0xe + b _021DC65E +_021DC644: + mov r4, #0xf + b _021DC65E +_021DC648: + mov r4, #0x10 + b _021DC65E +_021DC64C: + mov r4, #0x11 + b _021DC65E +_021DC650: + mov r4, #0 + b _021DC65E +_021DC654: + mov r0, #0 + str r0, [r5, #0x20] + ldr r0, _021DC674 ; =0x000005DD + bl sub_02005748 +_021DC65E: + cmp r4, #0x64 + beq _021DC66C + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DC67C +_021DC66C: + ldr r0, _021DC678 ; =0x0000FFFF + add r5, #0x84 + str r0, [r5, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DC674: .word 0x000005DD +_021DC678: .word 0x0000FFFF + thumb_func_end ov21_021DC600 + + thumb_func_start ov21_021DC67C +ov21_021DC67C: ; 0x021DC67C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + ldr r0, [r4, #8] + beq _021DC6DC + mov r1, #0 + bl ov21_021D8698 + cmp r6, r0 + beq _021DC718 + ldr r0, [r4, #8] + mov r1, #1 + bl ov21_021D8698 + cmp r6, r0 + beq _021DC718 + add r1, r5, #0 + add r1, #0x88 + ldr r0, [r4, #8] + ldr r1, [r1, #0] + bl ov21_021D8698 + cmp r6, r0 + beq _021DC718 + add r2, r5, #0 + add r2, #0x88 + ldr r0, [r4, #8] + ldr r2, [r2, #0] + add r1, r6, #0 + bl ov21_021D867C + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + add r5, #0x88 + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + str r0, [r5, #0] + ldr r0, _021DC71C ; =0x000005DD + bl sub_02005748 + pop {r4, r5, r6, pc} +_021DC6DC: + mov r1, #0 + bl ov21_021D8698 + cmp r0, #0 + ldr r0, [r4, #8] + beq _021DC6F8 + add r1, r6, #0 + mov r2, #0 + bl ov21_021D867C + ldr r0, _021DC71C ; =0x000005DD + bl sub_02005748 + b _021DC712 +_021DC6F8: + mov r1, #1 + bl ov21_021D8698 + cmp r0, #0 + beq _021DC712 + ldr r0, [r4, #8] + add r1, r6, #0 + mov r2, #1 + bl ov21_021D867C + ldr r0, _021DC71C ; =0x000005DD + bl sub_02005748 +_021DC712: + mov r0, #0 + add r5, #0x88 + str r0, [r5, #0] +_021DC718: + pop {r4, r5, r6, pc} + nop +_021DC71C: .word 0x000005DD + thumb_func_end ov21_021DC67C + + thumb_func_start ov21_021DC720 +ov21_021DC720: ; 0x021DC720 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r6, r1, #0 + mov r4, #0x64 + cmp r0, #0xe + bhi _021DC794 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DC73C: ; jump table + .short _021DC75A - _021DC73C - 2 ; case 0 + .short _021DC75E - _021DC73C - 2 ; case 1 + .short _021DC762 - _021DC73C - 2 ; case 2 + .short _021DC766 - _021DC73C - 2 ; case 3 + .short _021DC76A - _021DC73C - 2 ; case 4 + .short _021DC76E - _021DC73C - 2 ; case 5 + .short _021DC772 - _021DC73C - 2 ; case 6 + .short _021DC776 - _021DC73C - 2 ; case 7 + .short _021DC77A - _021DC73C - 2 ; case 8 + .short _021DC77E - _021DC73C - 2 ; case 9 + .short _021DC782 - _021DC73C - 2 ; case 10 + .short _021DC786 - _021DC73C - 2 ; case 11 + .short _021DC78A - _021DC73C - 2 ; case 12 + .short _021DC78E - _021DC73C - 2 ; case 13 + .short _021DC792 - _021DC73C - 2 ; case 14 +_021DC75A: + mov r4, #0xd + b _021DC794 +_021DC75E: + mov r4, #4 + b _021DC794 +_021DC762: + mov r4, #0xc + b _021DC794 +_021DC766: + mov r4, #9 + b _021DC794 +_021DC76A: + mov r4, #8 + b _021DC794 +_021DC76E: + mov r4, #3 + b _021DC794 +_021DC772: + mov r4, #0xa + b _021DC794 +_021DC776: + mov r4, #1 + b _021DC794 +_021DC77A: + mov r4, #6 + b _021DC794 +_021DC77E: + mov r4, #0xb + b _021DC794 +_021DC782: + mov r4, #0xe + b _021DC794 +_021DC786: + mov r4, #2 + b _021DC794 +_021DC78A: + mov r4, #5 + b _021DC794 +_021DC78E: + mov r4, #7 + b _021DC794 +_021DC792: + mov r4, #0 +_021DC794: + cmp r4, #0x64 + beq _021DC7B0 + ldr r0, [r6, #8] + bl ov21_021D86BC + cmp r4, r0 + beq _021DC7B0 + ldr r0, _021DC7B8 ; =0x000005DD + bl sub_02005748 + ldr r0, [r6, #8] + add r1, r4, #0 + bl ov21_021D86A8 +_021DC7B0: + ldr r0, _021DC7BC ; =0x0000FFFF + add r5, #0x84 + str r0, [r5, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DC7B8: .word 0x000005DD +_021DC7BC: .word 0x0000FFFF + thumb_func_end ov21_021DC720 + + thumb_func_start ov21_021DC7C0 +ov21_021DC7C0: ; 0x021DC7C0 + push {r3, r4, r5, lr} + mov r3, #0x4b + lsl r3, r3, #2 + ldr r2, [r0, r3] + cmp r2, #0 + bne _021DC7EC + ldr r2, [r1, #4] + cmp r2, #0 + ble _021DC7F0 + str r2, [r0, r3] + mov r5, #0 + add r2, r3, #4 + str r5, [r0, r2] + add r2, r3, #0 + ldr r4, [r1, #8] + add r2, #8 + add r3, #8 + str r4, [r0, r2] + ldr r0, [r0, r3] + str r5, [r0, #0] + str r5, [r1, #4] + pop {r3, r4, r5, pc} +_021DC7EC: + bl ov21_021DC7F4 +_021DC7F0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DC7C0 + + thumb_func_start ov21_021DC7F4 +ov21_021DC7F4: ; 0x021DC7F4 + push {r4, lr} + sub sp, #8 + mov r3, #0x4b + add r4, r0, #0 + lsl r3, r3, #2 + ldr r1, [r4, r3] + cmp r1, #0 + beq _021DC8A6 + add r0, r3, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021DC814 + cmp r0, #1 + beq _021DC866 + add sp, #8 + pop {r4, pc} +_021DC814: + cmp r1, #1 + bne _021DC82E + mov r1, #0 + str r1, [sp] + mov r0, #2 + sub r3, #0x20 + str r0, [sp, #4] + add r0, r4, r3 + mov r2, #0x10 + add r3, r1, #0 + bl ov21_021D2648 + b _021DC842 +_021DC82E: + mov r2, #0 + str r2, [sp] + mov r0, #2 + sub r3, #0x20 + str r0, [sp, #4] + add r0, r4, r3 + mov r1, #0x10 + add r3, r2, #0 + bl ov21_021D2648 +_021DC842: + mov r0, #0x43 + lsl r0, r0, #2 + ldr r3, [r4, r0] + mov r0, #0x10 + sub r0, r0, r3 + str r0, [sp] + ldr r0, _021DC8AC ; =0x04001050 + mov r1, #0 + mov r2, #4 + bl sub_020BF55C + mov r0, #0x13 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add sp, #8 + add r1, r1, #1 + str r1, [r4, r0] + pop {r4, pc} +_021DC866: + sub r3, #0x20 + add r0, r4, r3 + bl ov21_021D2664 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r3, [r4, r1] + mov r2, #0x10 + sub r2, r2, r3 + lsl r2, r2, #8 + orr r3, r2 + ldr r2, _021DC8B0 ; =0x04001052 + cmp r0, #1 + strh r3, [r2] + bne _021DC8A6 + add r1, #0x20 + ldr r0, [r4, r1] + cmp r0, #1 + bne _021DC892 + mov r1, #0 + sub r0, r2, #2 + strh r1, [r0] +_021DC892: + mov r1, #0x4d + lsl r1, r1, #2 + ldr r0, [r4, r1] + mov r2, #1 + str r2, [r0, #0] + sub r0, r1, #4 + mov r2, #0 + str r2, [r4, r0] + sub r1, #8 + str r2, [r4, r1] +_021DC8A6: + add sp, #8 + pop {r4, pc} + nop +_021DC8AC: .word 0x04001050 +_021DC8B0: .word 0x04001052 + thumb_func_end ov21_021DC7F4 + + thumb_func_start ov21_021DC8B4 +ov21_021DC8B4: ; 0x021DC8B4 + push {r3, lr} + cmp r2, #2 + bne _021DC8CA + cmp r3, #0 + bne _021DC8C4 + bl ov21_021DC90C + pop {r3, pc} +_021DC8C4: + bl ov21_021DC93C + pop {r3, pc} +_021DC8CA: + bl ov21_021DC8D0 + pop {r3, pc} + thumb_func_end ov21_021DC8B4 + + thumb_func_start ov21_021DC8D0 +ov21_021DC8D0: ; 0x021DC8D0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r6, #0 +_021DC8D8: + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021DC8E4 + add r1, r4, #0 + bl sub_02021FE0 +_021DC8E4: + ldr r0, [r5, #0x6c] + cmp r0, #0 + beq _021DC8F2 + ldr r0, [r0, #0] + add r1, r4, #0 + bl sub_02012AF0 +_021DC8F2: + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DC902 + add r1, r4, #0 + bl sub_02021FE0 +_021DC902: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #0xf + blt _021DC8D8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DC8D0 + + thumb_func_start ov21_021DC90C +ov21_021DC90C: ; 0x021DC90C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_021DC914: + cmp r4, #0xa + beq _021DC932 + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021DC924 + add r1, r6, #0 + bl sub_02021FE0 +_021DC924: + ldr r0, [r5, #0x6c] + cmp r0, #0 + beq _021DC932 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_02012AF0 +_021DC932: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _021DC914 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DC90C + + thumb_func_start ov21_021DC93C +ov21_021DC93C: ; 0x021DC93C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_021DC944: + cmp r4, #9 + beq _021DC962 + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _021DC954 + add r1, r6, #0 + bl sub_02021FE0 +_021DC954: + ldr r0, [r5, #0x6c] + cmp r0, #0 + beq _021DC962 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_02012AF0 +_021DC962: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xf + blt _021DC944 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DC93C + + thumb_func_start ov21_021DC96C +ov21_021DC96C: ; 0x021DC96C + push {r3, r4, lr} + sub sp, #4 + add r4, r2, #0 + ldr r0, [r4, #8] + bl ov21_021D86E0 + cmp r0, #4 + bne _021DC9B8 + ldr r0, [r4, #8] + bl ov21_021D86D8 + cmp r0, #3 + bne _021DC99C + mov r1, #0 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #4 + sub r2, #0x10 + mov r3, #0x3f + bl sub_0200AAE0 + add sp, #4 + pop {r3, r4, pc} +_021DC99C: + ldr r0, [r4, #8] + bl ov21_021D86D8 + cmp r0, #1 + bne _021DC9B8 + mov r0, #2 + str r0, [sp] + mov r0, #4 + add r1, r0, #0 + sub r1, #0x14 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 +_021DC9B8: + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021DC96C \ No newline at end of file diff --git a/asm/ov21_021DC9BC.s b/asm/ov21_021DC9BC.s new file mode 100644 index 000000000..2cba631fd --- /dev/null +++ b/asm/ov21_021DC9BC.s @@ -0,0 +1,2574 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021DC9BC +ov21_021DC9BC: ; 0x021DC9BC + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + bl ov21_021DCA5C + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021DCAA0 + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0x20] + bl ov21_021DCAF4 + str r0, [r5, #0x24] + ldr r0, _021DC9FC ; =ov21_021DCAF8 + str r0, [r5, #8] + ldr r0, _021DCA00 ; =ov21_021DCB6C + str r0, [r5, #0xc] + ldr r0, _021DCA04 ; =ov21_021DCBA8 + str r0, [r5, #0x10] + ldr r0, _021DCA08 ; =ov21_021DCBD8 + str r0, [r5, #0x14] + ldr r0, _021DCA0C ; =ov21_021DCCD8 + str r0, [r5, #0x18] + ldr r0, _021DCA10 ; =ov21_021DCD04 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DC9FC: .word ov21_021DCAF8 +_021DCA00: .word ov21_021DCB6C +_021DCA04: .word ov21_021DCBA8 +_021DCA08: .word ov21_021DCBD8 +_021DCA0C: .word ov21_021DCCD8 +_021DCA10: .word ov21_021DCD04 + thumb_func_end ov21_021DC9BC + + thumb_func_start ov21_021DCA14 +ov21_021DCA14: ; 0x021DCA14 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021DCACC + ldr r0, [r4, #4] + bl ov21_021DCAE0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCA14 + + thumb_func_start ov21_021DCA28 +ov21_021DCA28: ; 0x021DCA28 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DCA28 + + thumb_func_start ov21_021DCA30 +ov21_021DCA30: ; 0x021DCA30 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r0, #0] + cmp r5, #3 + blt _021DCA3E + bl sub_02022974 +_021DCA3E: + str r5, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCA30 + + thumb_func_start ov21_021DCA44 +ov21_021DCA44: ; 0x021DCA44 + ldr r0, [r0, #4] + str r1, [r0, #4] + str r2, [r0, #8] + bx lr + thumb_func_end ov21_021DCA44 + + thumb_func_start ov21_021DCA4C +ov21_021DCA4C: ; 0x021DCA4C + ldr r0, [r0, #4] + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DCA4C + + thumb_func_start ov21_021DCA54 +ov21_021DCA54: ; 0x021DCA54 + ldr r0, [r0, #4] + str r1, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DCA54 + + thumb_func_start ov21_021DCA5C +ov21_021DCA5C: ; 0x021DCA5C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021DCA6E + bl sub_02022974 +_021DCA6E: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCA5C + + thumb_func_start ov21_021DCAA0 +ov21_021DCAA0: ; 0x021DCAA0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + bne _021DCAB2 + bl sub_02022974 +_021DCAB2: + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_021DCAB8: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021DCAB8 + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DCAA0 + + thumb_func_start ov21_021DCACC +ov21_021DCACC: ; 0x021DCACC + push {r4, lr} + add r4, r0, #0 + bne _021DCAD6 + bl sub_02022974 +_021DCAD6: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCACC + + thumb_func_start ov21_021DCAE0 +ov21_021DCAE0: ; 0x021DCAE0 + push {r4, lr} + add r4, r0, #0 + bne _021DCAEA + bl sub_02022974 +_021DCAEA: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCAE0 + + thumb_func_start ov21_021DCAF4 +ov21_021DCAF4: ; 0x021DCAF4 + mov r0, #0 + bx lr + thumb_func_end ov21_021DCAF4 + + thumb_func_start ov21_021DCAF8 +ov21_021DCAF8: ; 0x021DCAF8 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #4] + add r5, r1, #0 + mov r1, #0x34 + bl sub_02018144 + add r4, r0, #0 + bne _021DCB0E + bl sub_02022974 +_021DCB0E: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + str r4, [r6, #8] + ldr r1, [r5, #0] + ldr r0, _021DCB68 ; =0x00001744 + ldr r0, [r1, r0] + cmp r0, #0 + bne _021DCB2A + mov r0, #0 + str r0, [r5, #4] + b _021DCB3A +_021DCB2A: + sub r0, r0, #1 + cmp r0, #1 + bhi _021DCB36 + mov r0, #1 + str r0, [r5, #4] + b _021DCB3A +_021DCB36: + mov r0, #2 + str r0, [r5, #4] +_021DCB3A: + add r2, r4, #0 + ldr r0, [r6, #4] + add r1, r5, #0 + add r2, #0xc + bl ov21_021DD900 + str r0, [r4, #4] + add r2, r4, #0 + ldr r0, [r6, #4] + add r1, r5, #0 + add r2, #0x10 + bl ov21_021DD908 + str r0, [r4, #8] + ldr r2, [r6, #4] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021DDABC + ldr r0, [r5, #4] + str r0, [r4, #0] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DCB68: .word 0x00001744 + thumb_func_end ov21_021DCAF8 + + thumb_func_start ov21_021DCB6C +ov21_021DCB6C: ; 0x021DCB6C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r6, r1, #0 + ldr r4, [r5, #8] + cmp r0, #1 + bne _021DCB7E + mov r0, #1 + pop {r4, r5, r6, pc} +_021DCB7E: + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _021DCB88 + mov r0, #0 + pop {r4, r5, r6, pc} +_021DCB88: + ldr r1, [r4, #0] + ldr r0, [r6, #4] + cmp r1, r0 + beq _021DCBA4 + add r0, r4, #0 + bl ov21_021DDB68 + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DDABC + ldr r0, [r6, #4] + str r0, [r4, #0] +_021DCBA4: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DCB6C + + thumb_func_start ov21_021DCBA8 +ov21_021DCBA8: ; 0x021DCBA8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r5, [r4, #8] + ldr r0, [r5, #4] + cmp r0, #0 + beq _021DCBB8 + bl sub_020181C4 +_021DCBB8: + ldr r0, [r5, #8] + cmp r0, #0 + beq _021DCBC2 + bl sub_020181C4 +_021DCBC2: + add r0, r5, #0 + bl ov21_021DDB68 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCBA8 + + thumb_func_start ov21_021DCBD8 +ov21_021DCBD8: ; 0x021DCBD8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r3, #8] + add r4, r1, #0 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021DCCC6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DCBFA: ; jump table + .short _021DCC02 - _021DCBFA - 2 ; case 0 + .short _021DCC3A - _021DCBFA - 2 ; case 1 + .short _021DCC92 - _021DCBFA - 2 ; case 2 + .short _021DCCBA - _021DCBFA - 2 ; case 3 +_021DCC02: + ldr r0, [r4, #4] + ldr r1, _021DCCCC ; =0x00000844 + bl sub_02018144 + ldr r2, _021DCCCC ; =0x00000844 + str r0, [r4, #8] + mov r1, #0 + bl sub_020D5124 + ldr r5, [r4, #8] + ldr r0, [r7, #4] + mov r1, #0 + str r0, [r5, #0] + ldr r0, [r4, #4] + bl ov21_021D5868 + ldr r1, _021DCCD0 ; =0x00000804 + str r0, [r5, r1] + ldr r0, [r4, #4] + mov r1, #0 + bl ov21_021D5890 + ldr r1, _021DCCD4 ; =0x00000808 + str r0, [r5, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCCC6 +_021DCC3A: + ldr r0, [r4, #4] + ldr r3, [sp, #4] + str r0, [sp] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021DCDD0 + ldr r0, [r4, #8] + ldr r2, [sp, #4] + ldr r3, [r4, #4] + add r1, r7, #0 + bl ov21_021DD710 + ldr r0, [r4, #8] + ldr r1, [sp, #4] + bl ov21_021DD9E8 + add r0, r6, #0 + bl ov21_021DDB8C + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021DD964 + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _021DCC7E + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DD490 + b _021DCC8A +_021DCC7E: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DD554 +_021DCC8A: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCCC6 +_021DCC92: + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _021DCCA4 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021DD508 + b _021DCCAE +_021DCCA4: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021DD5E4 +_021DCCAE: + cmp r0, #0 + beq _021DCCC6 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCCC6 +_021DCCBA: + add r0, r6, #0 + bl ov21_021DDBCC + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DCCC6: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DCCCC: .word 0x00000844 +_021DCCD0: .word 0x00000804 +_021DCCD4: .word 0x00000808 + thumb_func_end ov21_021DCBD8 + + thumb_func_start ov21_021DCCD8 +ov21_021DCCD8: ; 0x021DCCD8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #8] + add r7, r2, #0 + ldr r4, [r3, #8] + str r0, [sp, #4] + bl ov21_021DDC14 + ldr r0, [r5, #4] + add r1, r6, #0 + str r0, [sp] + ldr r0, [sp, #4] + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021DDA80 + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DCCD8 + + thumb_func_start ov21_021DCD04 +ov21_021DCD04: ; 0x021DCD04 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r5, [r4, #8] + cmp r0, #4 + bhi _021DCDC4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DCD20: ; jump table + .short _021DCD2A - _021DCD20 - 2 ; case 0 + .short _021DCD58 - _021DCD20 - 2 ; case 1 + .short _021DCD80 - _021DCD20 - 2 ; case 2 + .short _021DCD96 - _021DCD20 - 2 ; case 3 + .short _021DCDC0 - _021DCD20 - 2 ; case 4 +_021DCD2A: + add r0, r5, #0 + bl ov21_021DDB8C + ldr r0, [r6, #0xc] + cmp r0, #0 + bne _021DCD44 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021DD490 + b _021DCD50 +_021DCD44: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021DD554 +_021DCD50: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCDC4 +_021DCD58: + ldr r0, [r6, #0xc] + cmp r0, #0 + bne _021DCD6A + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0 + bl ov21_021DD508 + b _021DCD74 +_021DCD6A: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0 + bl ov21_021DD5E4 +_021DCD74: + cmp r0, #0 + beq _021DCDC4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCDC4 +_021DCD80: + add r0, r5, #0 + bl ov21_021DD8B4 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021DCE20 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCDC4 +_021DCD96: + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DCDC8 ; =0x00000804 + ldr r0, [r5, r0] + bl sub_020181C4 + ldr r0, _021DCDCC ; =0x00000808 + ldr r0, [r5, r0] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DCDC4 +_021DCDC0: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DCDC4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DCDC8: .word 0x00000804 +_021DCDCC: .word 0x00000808 + thumb_func_end ov21_021DCD04 + + thumb_func_start ov21_021DCDD0 +ov21_021DCDD0: ; 0x021DCDD0 + push {r3, r4, r5, r6, r7, lr} + ldr r6, [sp, #0x18] + add r7, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + add r2, r6, #0 + bl ov21_021DCE40 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DD668 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DCFC8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DD1A8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov21_021DD2E0 + ldr r1, [r7, #4] + add r0, r5, #0 + bl ov21_021DDA48 + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021DDCF4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DCDD0 + + thumb_func_start ov21_021DCE20 +ov21_021DCE20: ; 0x021DCE20 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021DD6C0 + add r0, r5, #0 + bl ov21_021DD3FC + add r0, r5, #0 + bl ov21_021DD2B8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DD114 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DCE20 + + thumb_func_start ov21_021DCE40 +ov21_021DCE40: ; 0x021DCE40 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r4, r2, #0 + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x40 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r7, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 + ldr r1, [r6, #0] + ldr r0, _021DCFB8 ; =0x00001764 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021DCEDE + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x41 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r7, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #8 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0xd + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 +_021DCEDE: + ldr r1, [r6, #0] + ldr r0, _021DCFBC ; =0x0000176C + ldr r0, [r1, r0] + cmp r0, #0 + beq _021DCF22 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x42 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r7, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #7 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0x1c + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 +_021DCF22: + ldr r1, [r6, #0] + ldr r0, _021DCFC0 ; =0x00001760 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021DCF66 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x43 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r7, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #8 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0xb + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 +_021DCF66: + ldr r1, [r6, #0] + ldr r0, _021DCFC4 ; =0x00001768 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021DCFAA + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x44 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r4, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #0x10 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0x19 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 +_021DCFAA: + ldr r0, [r5, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DCFB8: .word 0x00001764 +_021DCFBC: .word 0x0000176C +_021DCFC0: .word 0x00001760 +_021DCFC4: .word 0x00001768 + thumb_func_end ov21_021DCE40 + + thumb_func_start ov21_021DCFC8 +ov21_021DCFC8: ; 0x021DCFC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021DD0F8 ; =0x000017DC + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x6c + bl sub_02009A4C + add r1, r5, #0 + add r1, #0xb4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + bl sub_0200A3DC + add r0, r5, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + bl sub_02009D4C + ldr r0, _021DD0FC ; =0x000017DA + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x6a + mov r3, #1 + bl sub_02009BC4 + add r1, r5, #0 + add r1, #0xbc + str r0, [r1, #0] + ldr r0, _021DD100 ; =0x000017DB + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x6b + mov r3, #1 + bl sub_02009BC4 + add r1, r5, #0 + add r1, #0xc0 + str r0, [r1, #0] + ldr r0, _021DD104 ; =0x000017CD + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x5d + bl sub_02009A4C + add r1, r5, #0 + add r1, #0xd0 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_0200A3DC + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_02009D4C + ldr r0, _021DD108 ; =0x0000177E + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xe + mov r3, #0 + bl sub_02009B04 + add r1, r5, #0 + add r1, #0xd4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl sub_0200A640 + add r0, r5, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl sub_02009D4C + ldr r0, _021DD10C ; =0x000017CB + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5b + mov r3, #1 + bl sub_02009BC4 + add r1, r5, #0 + add r1, #0xd8 + str r0, [r1, #0] + ldr r0, _021DD110 ; =0x000017CC + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5c + mov r3, #1 + bl sub_02009BC4 + add r5, #0xdc + str r0, [r5, #0] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD0F8: .word 0x000017DC +_021DD0FC: .word 0x000017DA +_021DD100: .word 0x000017DB +_021DD104: .word 0x000017CD +_021DD108: .word 0x0000177E +_021DD10C: .word 0x000017CB +_021DD110: .word 0x000017CC + thumb_func_end ov21_021DCFC8 + + thumb_func_start ov21_021DD114 +ov21_021DD114: ; 0x021DD114 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #5 + add r1, r5, #0 + lsl r0, r0, #6 + add r1, #0xb4 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x52 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xbc + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x53 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xc0 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_0200A4E4 + add r0, r5, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + bl sub_0200A6DC + mov r0, #5 + add r1, r5, #0 + lsl r0, r0, #6 + add r1, #0xd0 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x51 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xd4 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x52 + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xd8 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + add r5, #0xdc + ldr r0, [r4, r0] + ldr r1, [r5, #0] + bl sub_02009D68 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DD114 + + thumb_func_start ov21_021DD1A8 +ov21_021DD1A8: ; 0x021DD1A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021DD2B0 ; =0x000017CC + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r2, #0x4e + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x44] + mov r0, #0xa + lsl r0, r0, #0x10 + str r0, [sp, #0x34] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r6, [sp, #0x48] + bl sub_02021B90 + add r1, r5, #0 + add r1, #0xc8 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_02021D6C + ldr r3, _021DD2B4 ; =0x000017DB + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #5 + str r1, [sp, #0x10] + lsl r0, r0, #6 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r2, #0x5d + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r4, #0 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x44] + str r6, [sp, #0x48] + str r4, [sp, #0x34] + str r4, [sp, #0x38] + add r6, sp, #0x2c + add r7, r4, #0 +_021DD28E: + add r0, r6, #0 + bl sub_02021B90 + str r0, [r5, #4] + add r1, r7, #0 + bl sub_02021CAC + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021FE0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x2c + blt _021DD28E + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD2B0: .word 0x000017CC +_021DD2B4: .word 0x000017DB + thumb_func_end ov21_021DD1A8 + + thumb_func_start ov21_021DD2B8 +ov21_021DD2B8: ; 0x021DD2B8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_02021BD4 + add r0, r5, #0 + mov r4, #0 + add r0, #0xc8 + str r4, [r0, #0] + add r6, r4, #0 +_021DD2CE: + ldr r0, [r5, #4] + bl sub_02021BD4 + str r6, [r5, #4] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x2c + blt _021DD2CE + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DD2B8 + + thumb_func_start ov21_021DD2E0 +ov21_021DD2E0: ; 0x021DD2E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + add r0, #0xc8 + add r4, r1, #0 + ldr r0, [r0, #0] + add r6, r3, #0 + ldr r7, [r4, #0] + cmp r0, #0 + bne _021DD2F8 + bl sub_02022974 +_021DD2F8: + mov r0, #0x51 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, _021DD3F4 ; =0x0000177E + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r7, r1] + str r1, [sp, #0xc] + mov r1, #0 + bl sub_0200A72C + mov r1, #1 + mov r2, #0x1e + str r0, [sp, #0x14] + str r1, [sp, #0x24] + str r2, [sp, #0x28] + str r1, [sp, #0x2c] + str r6, [sp, #0x30] + bl sub_0201FAB4 + str r0, [sp, #8] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r7, r0] + mov r1, #0x10 + mov r2, #2 + bl ov21_021D4D6C + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r7, r0] + ldr r2, _021DD3F8 ; =0x000002B9 + add r1, r4, #0 + mov r3, #0x23 + bl ov21_021D4DAC + add r1, r5, #0 + lsr r0, r0, #1 + str r4, [sp, #0x10] + add r1, #0xc8 + ldr r1, [r1, #0] + neg r0, r0 + str r0, [sp, #0x1c] + mov r0, #7 + mvn r0, r0 + str r0, [sp, #0x20] + add r0, sp, #0xc + str r1, [sp, #0x18] + bl ov21_021D4CA0 + add r1, r5, #0 + add r1, #0xcc + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + add r1, r1, #2 + bl sub_02012A60 + add r0, r4, #0 + bl ov21_021D4DA0 + mov r6, #0 +_021DD388: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r7, r0] + mov r1, #9 + mov r2, #2 + bl ov21_021D4D6C + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + add r3, r6, #0 + ldr r0, [r7, r0] + ldr r2, _021DD3F8 ; =0x000002B9 + add r1, r4, #0 + add r3, #0x24 + bl ov21_021D4DAC + mov r1, #0 + str r1, [sp, #0x18] + mov r1, #0x48 + sub r0, r1, r0 + lsr r0, r0, #1 + add r0, #8 + str r0, [sp, #0x1c] + mov r0, #0x20 + str r0, [sp, #0x20] + add r0, sp, #0xc + str r4, [sp, #0x10] + bl ov21_021D4CA0 + add r1, r5, #0 + add r1, #0xe0 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + add r1, r1, #2 + bl sub_02012A60 + add r0, r4, #0 + bl ov21_021D4DA0 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _021DD388 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_021DD3F4: .word 0x0000177E +_021DD3F8: .word 0x000002B9 + thumb_func_end ov21_021DD2E0 + + thumb_func_start ov21_021DD3FC +ov21_021DD3FC: ; 0x021DD3FC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xcc + ldr r0, [r0, #0] + bl ov21_021D4D1C + mov r4, #0 +_021DD40A: + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + bl ov21_021D4D1C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DD40A + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DD3FC + + thumb_func_start ov21_021DD420 +ov21_021DD420: ; 0x021DD420 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021FE0 + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02012AF0 + mov r4, #0 + mov r6, #1 +_021DD440: + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DD440 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DD420 + + thumb_func_start ov21_021DD458 +ov21_021DD458: ; 0x021DD458 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021FE0 + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + mov r4, #0 + add r6, r4, #0 +_021DD478: + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DD478 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DD458 + + thumb_func_start ov21_021DD490 +ov21_021DD490: ; 0x021DD490 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021DD420 + ldr r0, [r4, #8] + bl ov21_021E2A54 + cmp r0, #0 + beq _021DD4F6 + cmp r6, #0 + beq _021DD4D2 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + b _021DD4F6 +_021DD4D2: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021DD4F6: + mov r1, #0x5b + ldr r0, [r5, #0] + lsl r1, r1, #2 + add r1, r0, r1 + bl ov21_021D24FC + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DD490 + + thumb_func_start ov21_021DD508 +ov21_021DD508: ; 0x021DD508 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021DD528 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021DD532 +_021DD528: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021DD532: + cmp r0, #0 + beq _021DD544 + cmp r4, #0 + beq _021DD540 + add r0, r6, #0 + bl ov21_021DD458 +_021DD540: + mov r0, #1 + pop {r4, r5, r6, pc} +_021DD544: + mov r1, #0x5b + ldr r0, [r5, #0] + lsl r1, r1, #2 + add r1, r0, r1 + bl ov21_021D24FC + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DD508 + + thumb_func_start ov21_021DD554 +ov21_021DD554: ; 0x021DD554 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + bl ov21_021DD420 + cmp r4, #0 + bne _021DD57E + ldr r0, [r5, #8] + mov r1, #0x28 + str r0, [sp] + ldr r0, [r5, #0x10] + mov r3, #0x78 + str r0, [sp, #4] + ldr r0, _021DD5E0 ; =0x00000814 + ldr r2, [r5, #4] + add r0, r6, r0 + bl ov21_021D2648 +_021DD57E: + ldr r0, [r7, #8] + bl ov21_021E2A54 + cmp r0, #0 + beq _021DD5DC + cmp r4, #0 + beq _021DD5B6 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r2, #0x2f + str r2, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r1, [r5, #0x10] + sub r2, #0x3f + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021DD5B6: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r3, #0x2f + str r3, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r1, [r5, #0x10] + sub r3, #0x3f + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov21_021D23F8 +_021DD5DC: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD5E0: .word 0x00000814 + thumb_func_end ov21_021DD554 + + thumb_func_start ov21_021DD5E4 +ov21_021DD5E4: ; 0x021DD5E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bne _021DD60C + ldr r0, _021DD664 ; =0x00000814 + add r0, r5, r0 + bl ov21_021D2664 + str r0, [sp] + ldr r2, _021DD664 ; =0x00000814 + ldr r0, [r4, #0] + ldr r1, [r5, r2] + add r2, r2, #4 + ldr r2, [r5, r2] + bl ov21_021D2164 + b _021DD610 +_021DD60C: + mov r0, #1 + str r0, [sp] +_021DD610: + ldr r0, [r6, #8] + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r4, #0] + beq _021DD62A + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #4] + b _021DD636 +_021DD62A: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC + str r0, [sp, #4] +_021DD636: + mov r1, #0 + add r2, sp, #0 +_021DD63A: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021DD648 + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #2 + blt _021DD63A +_021DD648: + cmp r1, #2 + bne _021DD65C + cmp r7, #1 + bne _021DD656 + add r0, r5, #0 + bl ov21_021DD458 +_021DD656: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DD65C: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DD664: .word 0x00000814 + thumb_func_end ov21_021DD5E4 + + thumb_func_start ov21_021DD668 +ov21_021DD668: ; 0x021DD668 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r6, r2, #0 + add r0, r0, #4 + mov r1, #0 + bl sub_0201ADA4 + str r6, [sp] + ldr r3, _021DD6B4 ; =0x000007F8 + ldr r0, [r4, #0] + mov r1, #0x1e + mov r2, #1 + add r3, r5, r3 + bl ov21_021D2808 + ldr r1, _021DD6B8 ; =0x000007F4 + mov r2, #1 + str r0, [r5, r1] + str r6, [sp] + lsl r3, r2, #0xb + ldr r0, [r4, #0] + mov r1, #0x1f + add r3, r5, r3 + bl ov21_021D2808 + ldr r1, _021DD6BC ; =0x000007FC + str r0, [r5, r1] + ldr r0, [r4, #0] + mov r1, #8 + add r0, r0, #4 + bl sub_0201C2B4 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021DD6B4: .word 0x000007F8 +_021DD6B8: .word 0x000007F4 +_021DD6BC: .word 0x000007FC + thumb_func_end ov21_021DD668 + + thumb_func_start ov21_021DD6C0 +ov21_021DD6C0: ; 0x021DD6C0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + ldr r0, _021DD708 ; =0x000007F4 + ldr r0, [r5, r0] + bl sub_020181C4 + ldr r1, _021DD708 ; =0x000007F4 + mov r2, #0 + str r2, [r5, r1] + add r0, r1, #4 + add r1, #8 + str r2, [r5, r0] + ldr r0, [r5, r1] + bl sub_020181C4 + ldr r0, _021DD70C ; =0x000007FC + mov r1, #0 + str r1, [r5, r0] + add r0, r0, #4 + str r1, [r5, r0] + ldr r0, [r4, #0] + add r0, r0, #4 + bl sub_0201C2B4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DD708: .word 0x000007F4 +_021DD70C: .word 0x000007FC + thumb_func_end ov21_021DD6C0 + + thumb_func_start ov21_021DD710 +ov21_021DD710: ; 0x021DD710 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r4, r2, #0 + add r6, r0, #0 + str r1, [sp, #0x28] + str r3, [sp, #0x2c] + bl ov21_021DD8B4 + add r0, r4, #0 + add r0, #0x1c + str r0, [sp] + ldr r0, [r4, #4] + mov r1, #0x1e + str r0, [sp, #4] + ldr r0, [r4, #0xc] + ldr r3, _021DD8A4 ; =0x00000808 + str r0, [sp, #8] + add r0, r6, #0 + ldr r3, [r6, r3] + add r0, #0xec + add r2, r1, #0 + bl ov21_021D5948 + ldr r1, _021DD8A8 ; =0x00000838 + str r0, [r6, r1] + ldr r0, [r4, #0x20] + sub r1, r0, #1 + ldr r0, [r4, #0xc] + add r7, r1, r0 + ldr r0, [sp, #0x2c] + add r1, r7, #0 + bl sub_02018184 + add r5, r0, #0 + mov r1, #0 + cmp r7, #0 + ble _021DD776 +_021DD75A: + ldr r2, [r4, #0xc] + cmp r1, r2 + bhs _021DD766 + ldr r0, [r4, #4] + ldrb r0, [r0, r1] + b _021DD76E +_021DD766: + sub r2, r1, r2 + ldr r0, [r4, #0x1c] + lsl r2, r2, #2 + ldr r0, [r0, r2] +_021DD76E: + strb r0, [r5, r1] + add r1, r1, #1 + cmp r1, r7 + blt _021DD75A +_021DD776: + add r0, r4, #0 + add r0, #0x2c + str r0, [sp] + str r5, [sp, #4] + mov r0, #0x47 + lsl r0, r0, #4 + mov r1, #0x1e + ldr r3, _021DD8A4 ; =0x00000808 + str r7, [sp, #8] + ldr r3, [r6, r3] + add r0, r6, r0 + add r2, r1, #0 + bl ov21_021D5948 + mov r1, #0x21 + lsl r1, r1, #6 + str r0, [r6, r1] + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + mov r1, #0x1e + add r0, #0xec + add r2, r1, #0 + bl ov21_021D5214 + mov r0, #0x47 + lsl r0, r0, #4 + mov r1, #0x1e + add r0, r6, r0 + add r2, r1, #0 + bl ov21_021D5214 + ldr r0, [sp, #0x28] + ldr r0, [r0, #0] + bl ov21_021D37BC + ldr r1, _021DD8AC ; =0x0000015D + cmp r0, r1 + bne _021DD7D6 + mov r1, #5 + str r1, [sp, #0x38] + mov r1, #0x5c + str r1, [sp, #0x34] + mov r1, #0xe + mov r0, #4 + str r1, [sp, #0x30] + b _021DD7E4 +_021DD7D6: + mov r1, #1 + str r1, [sp, #0x38] + mov r1, #0x5c + str r1, [sp, #0x34] + mov r1, #0x20 + mov r0, #0 + str r1, [sp, #0x30] +_021DD7E4: + add r1, r6, #0 + mov r2, #0 + add r1, #0xc4 + str r2, [r1, #0] + ldr r1, [sp, #0x30] + ldr r3, [sp, #0x34] + str r1, [sp] + mov r1, #5 + str r1, [sp, #4] + str r1, [sp, #8] + ldr r1, _021DD8B0 ; =0x00000804 + ldr r2, [r6, r1] + add r1, #0x30 + str r2, [sp, #0xc] + add r2, r4, #0 + add r2, #0x14 + str r2, [sp, #0x10] + mov r2, #2 + str r2, [sp, #0x14] + str r0, [sp, #0x18] + ldr r0, [r4, #8] + mov r2, #0x2c + str r0, [sp, #0x1c] + ldr r0, [r4, #0x10] + str r0, [sp, #0x20] + add r0, r6, r1 + add r1, r6, #0 + str r0, [sp, #0x24] + add r1, #0xc4 + ldr r1, [r1, #0] + add r0, r6, #4 + bl ov21_021D5A20 + add r1, r6, #0 + add r1, #0xc4 + str r0, [r1, #0] + ldr r0, [r4, #0x18] + sub r1, r0, #1 + ldr r0, [r4, #0x10] + add r7, r1, r0 + ldr r0, [sp, #0x2c] + add r1, r7, #0 + bl sub_02018184 + add r5, r0, #0 + mov r1, #0 + cmp r7, #0 + ble _021DD860 +_021DD844: + ldr r2, [r4, #0x10] + cmp r1, r2 + bhs _021DD850 + ldr r0, [r4, #8] + ldrb r0, [r0, r1] + b _021DD858 +_021DD850: + sub r2, r1, r2 + ldr r0, [r4, #0x14] + lsl r2, r2, #2 + ldr r0, [r0, r2] +_021DD858: + strb r0, [r5, r1] + add r1, r1, #1 + cmp r1, r7 + blt _021DD844 +_021DD860: + ldr r0, [sp, #0x30] + ldr r1, _021DD8B0 ; =0x00000804 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r6, r1] + add r4, #0x24 + str r0, [sp, #0xc] + str r4, [sp, #0x10] + mov r0, #3 + str r0, [sp, #0x14] + ldr r0, [sp, #0x38] + add r1, #0x38 + str r0, [sp, #0x18] + str r5, [sp, #0x1c] + add r0, r6, r1 + str r7, [sp, #0x20] + add r1, r6, #0 + str r0, [sp, #0x24] + add r1, #0xc4 + ldr r1, [r1, #0] + ldr r3, [sp, #0x34] + add r0, r6, #4 + mov r2, #0x2c + bl ov21_021D5A20 + add r6, #0xc4 + str r0, [r6, #0] + add r0, r5, #0 + bl sub_020181C4 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD8A4: .word 0x00000808 +_021DD8A8: .word 0x00000838 +_021DD8AC: .word 0x0000015D +_021DD8B0: .word 0x00000804 + thumb_func_end ov21_021DD710 + + thumb_func_start ov21_021DD8B4 +ov21_021DD8B4: ; 0x021DD8B4 + push {r3, r4, r5, r6, r7, lr} + mov r2, #0xe1 + add r6, r0, #0 + add r0, #0xec + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + mov r2, #0x47 + lsl r2, r2, #4 + add r0, r6, r2 + mov r1, #0 + sub r2, #0xec + bl sub_020D5124 + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + ble _021DD8F8 + add r5, r6, #0 + add r7, r4, #0 +_021DD8E2: + ldr r0, [r5, #4] + add r1, r7, #0 + bl sub_02021CAC + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _021DD8E2 +_021DD8F8: + mov r0, #0 + add r6, #0xc4 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DD8B4 + + thumb_func_start ov21_021DD900 +ov21_021DD900: ; 0x021DD900 + mov r0, #0 + str r0, [r2, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DD900 + + thumb_func_start ov21_021DD908 +ov21_021DD908: ; 0x021DD908 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + ldr r2, [r5, #0] + ldr r1, _021DD958 ; =0x00001768 + mov r4, #0 + ldr r1, [r2, r1] + cmp r1, #0 + bne _021DD928 + ldr r3, _021DD95C ; =0x021E9D7A + ldr r1, _021DD960 ; =0x0000FFFF +_021DD91E: + add r3, r3, #2 + ldrh r2, [r3] + add r4, r4, #1 + cmp r2, r1 + bne _021DD91E +_021DD928: + cmp r4, #0 + beq _021DD934 + add r1, r4, #0 + bl sub_02018144 + b _021DD936 +_021DD934: + mov r0, #0 +_021DD936: + str r4, [r6, #0] + ldr r3, [r5, #0] + ldr r2, _021DD958 ; =0x00001768 + mov r1, #0 + ldr r2, [r3, r2] + cmp r2, #0 + bne _021DD956 + ldr r4, _021DD95C ; =0x021E9D7A + ldr r2, _021DD960 ; =0x0000FFFF +_021DD948: + ldrh r3, [r4] + add r4, r4, #2 + strb r3, [r0, r1] + ldrh r3, [r4] + add r1, r1, #1 + cmp r3, r2 + bne _021DD948 +_021DD956: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DD958: .word 0x00001768 +_021DD95C: .word 0x021E9D7A +_021DD960: .word 0x0000FFFF + thumb_func_end ov21_021DD908 + + thumb_func_start ov21_021DD964 +ov21_021DD964: ; 0x021DD964 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + mov r0, #2 + lsl r0, r0, #0xa + ldr r3, [r5, r0] + mov r0, #5 + str r0, [sp] + mov r0, #0x47 + lsl r0, r0, #4 + add r0, r5, r0 + str r0, [sp, #4] + mov r1, #0x1e + str r1, [sp, #8] + str r1, [sp, #0xc] + mov r0, #0x59 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + ldrh r2, [r3, #2] + ldr r1, [r3, #0x14] + ldrh r3, [r3] + ldr r0, [r4, #0] + lsl r2, r2, #0x13 + lsl r3, r3, #0x13 + add r0, r0, #4 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl ov21_021D517C + ldr r0, _021DD9E4 ; =0x000007F8 + mov r1, #0x1e + ldr r3, [r5, r0] + mov r0, #5 + str r0, [sp] + add r5, #0xec + str r5, [sp, #4] + str r1, [sp, #8] + str r1, [sp, #0xc] + mov r0, #0x59 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + ldrh r2, [r3, #2] + ldr r1, [r3, #0x14] + ldrh r3, [r3] + ldr r0, [r4, #0] + lsl r2, r2, #0x13 + lsl r3, r3, #0x13 + add r0, r0, #4 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl ov21_021D517C + ldr r0, [r4, #0] + add r0, r0, #4 + bl sub_0201A954 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DD9E4: .word 0x000007F8 + thumb_func_end ov21_021DD964 + + thumb_func_start ov21_021DD9E8 +ov21_021DD9E8: ; 0x021DD9E8 + push {r4, lr} + ldr r1, _021DDA44 ; =0x00000834 + add r4, r0, #0 + ldr r0, [r4, r1] + cmp r0, #0 + bne _021DDA28 + add r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021DDA28 + add r0, r1, #0 + add r0, #8 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021DDA28 + add r1, #0xc + ldr r0, [r4, r1] + cmp r0, #0 + bne _021DDA28 + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CAC + add r4, #0xcc + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_020129D0 + pop {r4, pc} +_021DDA28: + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021CAC + add r4, #0xcc + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 + pop {r4, pc} + nop +_021DDA44: .word 0x00000834 + thumb_func_end ov21_021DD9E8 + + thumb_func_start ov21_021DDA48 +ov21_021DDA48: ; 0x021DDA48 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + mov r7, #1 +_021DDA52: + cmp r4, r6 + bne _021DDA66 + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + add r1, r7, #0 + ldr r0, [r0, #0] + bl sub_020129D0 + b _021DDA74 +_021DDA66: + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 +_021DDA74: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DDA52 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DDA48 + + thumb_func_start ov21_021DDA80 +ov21_021DDA80: ; 0x021DDA80 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r2, #0 + add r4, r3, #0 + add r7, r1, #0 + ldr r2, [r5, #0] + ldr r1, [r4, #0] + cmp r2, r1 + beq _021DDAB8 + ldr r3, [sp, #0x18] + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DD710 + add r0, r5, #0 + add r1, r7, #0 + bl ov21_021DD964 + ldr r1, [r6, #4] + add r0, r5, #0 + bl ov21_021DDA48 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DD9E8 + ldr r0, [r4, #0] + str r0, [r5, #0] +_021DDAB8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DDA80 + + thumb_func_start ov21_021DDABC +ov21_021DDABC: ; 0x021DDABC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r6, r2, #0 + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021DDADE + cmp r0, #1 + beq _021DDAE8 + cmp r0, #2 + beq _021DDAF2 + b _021DDAFC +_021DDADE: + mov r0, #0 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp] + b _021DDB00 +_021DDAE8: + mov r0, #1 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp] + b _021DDB00 +_021DDAF2: + mov r0, #2 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp] + b _021DDB00 +_021DDAFC: + bl sub_02022974 +_021DDB00: + add r0, r5, #0 + ldr r2, [sp, #4] + add r0, #0x14 + add r1, r7, #0 + add r3, r6, #0 + bl ov21_021D57B4 + add r0, r5, #0 + ldr r2, [sp] + add r0, #0x1c + add r1, r7, #0 + add r3, r6, #0 + bl ov21_021D57B4 + ldr r0, [r4, #0] + bl ov21_021D3428 + cmp r0, #0 + bne _021DDB46 + add r0, r5, #0 + add r0, #0x24 + add r1, r7, #0 + mov r2, #3 + add r3, r6, #0 + bl ov21_021D57B4 + add r5, #0x2c + add r0, r5, #0 + add r1, r7, #0 + mov r2, #8 + add r3, r6, #0 + bl ov21_021D57B4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_021DDB46: + add r0, r5, #0 + add r0, #0x24 + add r1, r7, #0 + mov r2, #4 + add r3, r6, #0 + bl ov21_021D57B4 + add r5, #0x2c + add r0, r5, #0 + add r1, r7, #0 + mov r2, #9 + add r3, r6, #0 + bl ov21_021D57B4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DDABC + + thumb_func_start ov21_021DDB68 +ov21_021DDB68: ; 0x021DDB68 + push {r4, lr} + add r4, r0, #0 + add r0, #0x14 + bl ov21_021D5844 + add r0, r4, #0 + add r0, #0x1c + bl ov21_021D5844 + add r0, r4, #0 + add r0, #0x24 + bl ov21_021D5844 + add r4, #0x2c + add r0, r4, #0 + bl ov21_021D5844 + pop {r4, pc} + thumb_func_end ov21_021DDB68 + + thumb_func_start ov21_021DDB8C +ov21_021DDB8C: ; 0x021DDB8C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _021DDBC8 ; =0x0000080C + mov r1, #0 + str r1, [r6, r0] + add r0, r0, #4 + str r1, [r6, r0] + mov r0, #2 + bl sub_0201FF0C + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + ble _021DDBC6 + add r5, r6, #0 + add r7, r4, #0 +_021DDBB0: + ldr r0, [r5, #4] + add r1, r7, #0 + bl sub_02021CAC + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _021DDBB0 +_021DDBC6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DDBC8: .word 0x0000080C + thumb_func_end ov21_021DDB8C + + thumb_func_start ov21_021DDBCC +ov21_021DDBCC: ; 0x021DDBCC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021DDC10 ; =0x04000050 + mov r1, #0xa + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + ble _021DDC0E + add r5, r6, #0 + add r7, r4, #0 +_021DDBF8: + ldr r0, [r5, #4] + add r1, r7, #0 + bl sub_02021CAC + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _021DDBF8 +_021DDC0E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DDC10: .word 0x04000050 + thumb_func_end ov21_021DDBCC + + thumb_func_start ov21_021DDC14 +ov21_021DDC14: ; 0x021DDC14 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021DDCEC ; =0x0000080C + ldr r1, [r5, r0] + cmp r1, #0x20 + blt _021DDC6A + mov r4, #0 + str r4, [r5, r0] + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + bne _021DDC5A + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021DDC50 + add r6, r5, #0 + mov r7, #1 +_021DDC3A: + ldr r0, [r6, #4] + add r1, r7, #0 + bl sub_02021CAC + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, r0 + blt _021DDC3A +_021DDC50: + mov r0, #0x81 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r5, r0] + b _021DDC6A +_021DDC5A: + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x81 + add r1, r4, #0 + lsl r0, r0, #4 + str r1, [r5, r0] +_021DDC6A: + ldr r0, _021DDCEC ; =0x0000080C + ldr r1, [r5, r0] + cmp r1, #0x10 + blt _021DDC76 + mov r0, #0x20 + sub r1, r0, r1 +_021DDC76: + lsl r2, r1, #0xc + asr r1, r2, #0x1f + lsr r0, r2, #0x10 + lsl r3, r1, #0x10 + mov r1, #2 + orr r3, r0 + lsl r2, r2, #0x10 + mov r0, #0 + lsl r1, r1, #0xa + add r4, r2, r1 + adc r3, r0 + lsl r2, r3, #0x14 + lsr r0, r4, #0xc + orr r0, r2 + lsl r1, r1, #5 + bl sub_020BCFD0 + asr r1, r0, #0xc + mov r0, #1 + lsl r0, r0, #0xc + orr r1, r0 + ldr r0, _021DDCF0 ; =0x04000052 + strh r1, [r0] + ldr r0, _021DDCEC ; =0x0000080C + ldr r1, [r5, r0] + add r1, r1, #1 + str r1, [r5, r0] + ldr r1, [r5, r0] + cmp r1, #0x20 + blt _021DDCEA + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + bne _021DDCC4 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + pop {r3, r4, r5, r6, r7, pc} +_021DDCC4: + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + ble _021DDCEA + add r6, r5, #0 + add r7, r4, #0 +_021DDCD4: + ldr r0, [r6, #4] + add r1, r7, #0 + bl sub_02021CAC + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, r0 + blt _021DDCD4 +_021DDCEA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DDCEC: .word 0x0000080C +_021DDCF0: .word 0x04000052 + thumb_func_end ov21_021DDC14 + + thumb_func_start ov21_021DDCF4 +ov21_021DDCF4: ; 0x021DDCF4 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov21_021D2170 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov21_021D37BC + add r2, r0, #0 + mov r0, #0x28 + str r0, [sp] + mov r0, #0x78 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #0] + mov r3, #2 + bl ov21_021D1890 + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DDCF4 + + .rodata + + + .global Unk_ov21_021E9D6C +Unk_ov21_021E9D6C: ; 0x021E9D6C + .incbin "incbin/overlay21_rodata.bin", 0x248, 0x24A - 0x248 + + .global Unk_ov21_021E9D6E +Unk_ov21_021E9D6E: ; 0x021E9D6E + .incbin "incbin/overlay21_rodata.bin", 0x24A, 0x24C - 0x24A + + .global Unk_ov21_021E9D70 +Unk_ov21_021E9D70: ; 0x021E9D70 + .incbin "incbin/overlay21_rodata.bin", 0x24C, 0x24E - 0x24C + + .global Unk_ov21_021E9D72 +Unk_ov21_021E9D72: ; 0x021E9D72 + .incbin "incbin/overlay21_rodata.bin", 0x24E, 0x250 - 0x24E + + .global Unk_ov21_021E9D74 +Unk_ov21_021E9D74: ; 0x021E9D74 + .incbin "incbin/overlay21_rodata.bin", 0x250, 0x252 - 0x250 + + .global Unk_ov21_021E9D76 +Unk_ov21_021E9D76: ; 0x021E9D76 + .incbin "incbin/overlay21_rodata.bin", 0x252, 0x254 - 0x252 + + .global Unk_ov21_021E9D78 +Unk_ov21_021E9D78: ; 0x021E9D78 + .incbin "incbin/overlay21_rodata.bin", 0x254, 0x256 - 0x254 + + .global Unk_ov21_021E9D7A +Unk_ov21_021E9D7A: ; 0x021E9D7A + .incbin "incbin/overlay21_rodata.bin", 0x256, 0x4 + diff --git a/asm/ov21_021DDD2C.s b/asm/ov21_021DDD2C.s new file mode 100644 index 000000000..95136c9f8 --- /dev/null +++ b/asm/ov21_021DDD2C.s @@ -0,0 +1,1270 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021DDD2C +ov21_021DDD2C: ; 0x021DDD2C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021DDDA4 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021DDDF0 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021DDE18 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021DDE48 + str r0, [r5, #0x24] + ldr r0, _021DDD74 ; =ov21_021DDE4C + str r0, [r5, #8] + ldr r0, _021DDD78 ; =ov21_021DDE84 + str r0, [r5, #0xc] + ldr r0, _021DDD7C ; =ov21_021DDEB4 + str r0, [r5, #0x10] + ldr r0, _021DDD80 ; =ov21_021DDEC8 + str r0, [r5, #0x14] + ldr r0, _021DDD84 ; =ov21_021DDF80 + str r0, [r5, #0x18] + ldr r0, _021DDD88 ; =ov21_021DDFB4 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DDD74: .word ov21_021DDE4C +_021DDD78: .word ov21_021DDE84 +_021DDD7C: .word ov21_021DDEB4 +_021DDD80: .word ov21_021DDEC8 +_021DDD84: .word ov21_021DDF80 +_021DDD88: .word ov21_021DDFB4 + thumb_func_end ov21_021DDD2C + + thumb_func_start ov21_021DDD8C +ov21_021DDD8C: ; 0x021DDD8C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021DDE1C + ldr r0, [r4, #4] + bl ov21_021DDE30 + ldr r0, [r4, #0x20] + bl ov21_021DDE44 + pop {r4, pc} + thumb_func_end ov21_021DDD8C + + thumb_func_start ov21_021DDDA4 +ov21_021DDDA4: ; 0x021DDDA4 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021DDDB6 + bl sub_02022974 +_021DDDB6: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r5, #0 + mov r1, #6 + bl ov21_021D1410 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1430 + str r0, [r4, #8] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DDDA4 + + thumb_func_start ov21_021DDDF0 +ov21_021DDDF0: ; 0x021DDDF0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021DDE02 + bl sub_02022974 +_021DDE02: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DDDF0 + + thumb_func_start ov21_021DDE18 +ov21_021DDE18: ; 0x021DDE18 + mov r0, #0 + bx lr + thumb_func_end ov21_021DDE18 + + thumb_func_start ov21_021DDE1C +ov21_021DDE1C: ; 0x021DDE1C + push {r4, lr} + add r4, r0, #0 + bne _021DDE26 + bl sub_02022974 +_021DDE26: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DDE1C + + thumb_func_start ov21_021DDE30 +ov21_021DDE30: ; 0x021DDE30 + push {r4, lr} + add r4, r0, #0 + bne _021DDE3A + bl sub_02022974 +_021DDE3A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DDE30 + + thumb_func_start ov21_021DDE44 +ov21_021DDE44: ; 0x021DDE44 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DDE44 + + thumb_func_start ov21_021DDE48 +ov21_021DDE48: ; 0x021DDE48 + mov r0, #0 + bx lr + thumb_func_end ov21_021DDE48 + + thumb_func_start ov21_021DDE4C +ov21_021DDE4C: ; 0x021DDE4C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + mov r1, #0x28 + bl sub_02018144 + add r4, r0, #0 + bne _021DDE62 + bl sub_02022974 +_021DDE62: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x28 + bl sub_020D5124 + str r4, [r5, #8] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DE5A4 + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DE2EC + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DDE4C + + thumb_func_start ov21_021DDE84 +ov21_021DDE84: ; 0x021DDE84 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021DDE94 + mov r0, #1 + pop {r3, r4, r5, pc} +_021DDE94: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021DDE9E + mov r0, #0 + pop {r3, r4, r5, pc} +_021DDE9E: + ldr r0, [r5, #8] + bl ov21_021E33AC + cmp r0, #0 + beq _021DDEB0 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021DE334 +_021DDEB0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DDE84 + + thumb_func_start ov21_021DDEB4 +ov21_021DDEB4: ; 0x021DDEB4 + push {r4, lr} + ldr r4, [r0, #8] + add r0, r4, #0 + bl ov21_021DE484 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021DDEB4 + + thumb_func_start ov21_021DDEC8 +ov21_021DDEC8: ; 0x021DDEC8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r3, #8] + add r4, r1, #0 + str r0, [sp] + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021DDF7C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DDEE8: ; jump table + .short _021DDEF0 - _021DDEE8 - 2 ; case 0 + .short _021DDF0A - _021DDEE8 - 2 ; case 1 + .short _021DDF3E - _021DDEE8 - 2 ; case 2 + .short _021DDF60 - _021DDEE8 - 2 ; case 3 +_021DDEF0: + ldr r0, [r4, #4] + mov r1, #0x2c + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x2c + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDF7C +_021DDF0A: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021DE100 + ldr r2, [sp] + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021DE49C + ldr r3, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021DE4D4 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DE058 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDF7C +_021DDF3E: + ldr r3, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021DE4D4 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DE0C4 + cmp r0, #0 + beq _021DDF7C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDF7C +_021DDF60: + ldr r3, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021DE4D4 + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D25AC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DDF7C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DDEC8 + + thumb_func_start ov21_021DDF80 +ov21_021DDF80: ; 0x021DDF80 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r3, #8] + add r5, r1, #0 + add r4, r2, #0 + str r0, [sp] + ldr r7, [r5, #8] + ldr r2, [sp] + add r0, r7, #0 + add r1, r4, #0 + bl ov21_021DE49C + ldr r1, [sp] + add r0, r6, #0 + add r2, r4, #0 + bl ov21_021DE630 + ldr r3, [r5, #4] + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021DE4D4 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DDF80 + + thumb_func_start ov21_021DDFB4 +ov21_021DDFB4: ; 0x021DDFB4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r5, [r4, #8] + cmp r0, #4 + bhi _021DE03C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DDFD0: ; jump table + .short _021DDFDA - _021DDFD0 - 2 ; case 0 + .short _021DDFFC - _021DDFD0 - 2 ; case 1 + .short _021DE012 - _021DDFD0 - 2 ; case 2 + .short _021DE024 - _021DDFD0 - 2 ; case 3 + .short _021DE038 - _021DDFD0 - 2 ; case 4 +_021DDFDA: + mov r0, #0x79 + ldr r1, [r6, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + bl ov21_021D25AC + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021DE058 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE03C +_021DDFFC: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0 + bl ov21_021DE0C4 + cmp r0, #0 + beq _021DE03C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE03C +_021DE012: + ldr r2, [r4, #4] + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021DE128 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE03C +_021DE024: + ldr r0, [r5, #0x14] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE03C +_021DE038: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DE03C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DDFB4 + + thumb_func_start ov21_021DE040 +ov21_021DE040: ; 0x021DE040 + ldr r3, _021DE048 ; =sub_02021FE0 + ldr r0, [r0, #0] + mov r1, #1 + bx r3 + ; .align 2, 0 +_021DE048: .word sub_02021FE0 + thumb_func_end ov21_021DE040 + + thumb_func_start ov21_021DE04C +ov21_021DE04C: ; 0x021DE04C + ldr r3, _021DE054 ; =sub_02021FE0 + ldr r0, [r0, #0] + mov r1, #0 + bx r3 + ; .align 2, 0 +_021DE054: .word sub_02021FE0 + thumb_func_end ov21_021DE04C + + thumb_func_start ov21_021DE058 +ov21_021DE058: ; 0x021DE058 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021DE040 + ldr r0, [r4, #8] + bl ov21_021E33A4 + cmp r0, #0 + beq _021DE0C0 + cmp r6, #0 + beq _021DE09C + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r2, [r5, #0] + lsl r0, r0, #4 + add r0, r2, r0 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021DE09C: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r3, [r5, #0] + lsl r0, r0, #4 + add r0, r3, r0 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021DE0C0: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021DE058 + + thumb_func_start ov21_021DE0C4 +ov21_021DE0C4: ; 0x021DE0C4 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E33A4 + cmp r0, #0 + beq _021DE0E4 + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov21_021D2424 + b _021DE0EA +_021DE0E4: + mov r0, #2 + bl sub_0200AC1C +_021DE0EA: + cmp r0, #0 + beq _021DE0FC + cmp r4, #0 + beq _021DE0F8 + add r0, r6, #0 + bl ov21_021DE04C +_021DE0F8: + mov r0, #1 + pop {r4, r5, r6, pc} +_021DE0FC: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DE0C4 + + thumb_func_start ov21_021DE100 +ov21_021DE100: ; 0x021DE100 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021DE13C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DE1A4 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DE258 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE100 + + thumb_func_start ov21_021DE128 +ov21_021DE128: ; 0x021DE128 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021DE2E0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DE224 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DE128 + + thumb_func_start ov21_021DE13C +ov21_021DE13C: ; 0x021DE13C + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x22 + mov r3, #6 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x45 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE13C + + thumb_func_start ov21_021DE1A4 +ov21_021DE1A4: ; 0x021DE1A4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021DE218 ; =0x000017D9 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x69 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #4] + bl sub_0200A3DC + ldr r0, [r5, #4] + bl sub_02009D4C + ldr r0, _021DE21C ; =0x000017D7 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x67 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0xc] + ldr r0, _021DE220 ; =0x000017D8 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x68 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x10] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE218: .word 0x000017D9 +_021DE21C: .word 0x000017D7 +_021DE220: .word 0x000017D8 + thumb_func_end ov21_021DE1A4 + + thumb_func_start ov21_021DE224 +ov21_021DE224: ; 0x021DE224 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #4] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0xc] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x10] + bl sub_02009D68 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE224 + + thumb_func_start ov21_021DE258 +ov21_021DE258: ; 0x021DE258 + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021DE2D8 ; =0x000017D8 + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r2, _021DE2DC ; =0x0000083F + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + mov r0, #3 + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r6, [sp, #0x48] + str r1, [sp, #0x34] + bl sub_02021B90 + mov r1, #0 + str r0, [r5, #0] + bl sub_02021D6C + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DE2D8: .word 0x000017D8 +_021DE2DC: .word 0x0000083F + thumb_func_end ov21_021DE258 + + thumb_func_start ov21_021DE2E0 +ov21_021DE2E0: ; 0x021DE2E0 + ldr r3, _021DE2E8 ; =sub_02021BD4 + ldr r0, [r0, #0] + bx r3 + nop +_021DE2E8: .word sub_02021BD4 + thumb_func_end ov21_021DE2E0 + + thumb_func_start ov21_021DE2EC +ov21_021DE2EC: ; 0x021DE2EC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #4 + bl sub_02018144 + str r0, [r5, #0x14] + mov r1, #0xfe + strb r1, [r0] + ldr r1, [r5, #0] + ldr r0, [r5, #0x14] + add r3, r5, #0 + strb r1, [r0, #1] + ldr r1, [r5, #4] + ldr r0, [r5, #0x14] + ldr r2, _021DE330 ; =ov21_021DE44C + strb r1, [r0, #2] + ldr r0, [r5, #0x14] + mov r1, #0x20 + strb r1, [r0, #3] + str r4, [r5, #0x18] + str r5, [r5, #0x1c] + str r6, [sp] + ldr r0, [r5, #0x14] + mov r1, #1 + add r3, #0x18 + bl sub_02023FCC + str r0, [r5, #0x10] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021DE330: .word ov21_021DE44C + thumb_func_end ov21_021DE2EC + + thumb_func_start ov21_021DE334 +ov21_021DE334: ; 0x021DE334 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + add r5, r1, #0 + bl sub_0202404C + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021DE3D0 + ldr r1, [r4, #0] + ldr r0, [r4, #0x14] + strb r1, [r0, #1] + ldr r1, [r4, #4] + ldr r0, [r4, #0x14] + strb r1, [r0, #2] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE334 + + thumb_func_start ov21_021DE358 +ov21_021DE358: ; 0x021DE358 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021DE3C8 ; =0x021BF6BC + add r4, r1, #0 + ldrh r0, [r0, #0x22] + cmp r0, #0 + bne _021DE3C4 + ldr r0, [r4, #8] + bl ov21_021E33BC + cmp r0, #1 + bne _021DE3C4 + ldr r0, [r4, #4] + bl ov21_021D3998 + cmp r0, #2 + bne _021DE3C4 + ldr r0, [r4, #0] + bl ov21_021DCA28 + ldr r1, _021DE3CC ; =0x021BF67C + ldr r2, [r1, #0x48] + mov r1, #0x20 + tst r1, r2 + beq _021DE3A4 + sub r1, r0, #1 + bpl _021DE390 + mov r1, #0 +_021DE390: + ldr r0, [r4, #0] + bl ov21_021DCA30 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DE5A4 + mov r0, #1 + str r0, [r5, #0x24] + pop {r3, r4, r5, pc} +_021DE3A4: + mov r1, #0x10 + tst r1, r2 + beq _021DE3C4 + add r1, r0, #1 + cmp r1, #3 + blt _021DE3B2 + mov r1, #2 +_021DE3B2: + ldr r0, [r4, #0] + bl ov21_021DCA30 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DE5A4 + mov r0, #1 + str r0, [r5, #0x24] +_021DE3C4: + pop {r3, r4, r5, pc} + nop +_021DE3C8: .word 0x021BF6BC +_021DE3CC: .word 0x021BF67C + thumb_func_end ov21_021DE358 + + thumb_func_start ov21_021DE3D0 +ov21_021DE3D0: ; 0x021DE3D0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r2, #0 + str r2, [r5, #0x24] + ldr r3, [r5, #0x20] + add r4, r1, #0 + cmp r3, #0 + beq _021DE442 + ldr r0, _021DE448 ; =0x021BF6BC + ldrh r1, [r0, #0x22] + cmp r1, #0 + beq _021DE43E + ldrh r2, [r0, #0x1c] + ldr r1, [r5, #8] + sub r1, r2, r1 + str r1, [r5, #0] + ldrh r1, [r0, #0x1e] + ldr r0, [r5, #0xc] + sub r0, r1, r0 + str r0, [r5, #4] + ldr r0, [r5, #0] + cmp r0, #0x18 + bge _021DE402 + mov r0, #0x18 + str r0, [r5, #0] +_021DE402: + ldr r0, [r5, #0] + cmp r0, #0xf6 + ble _021DE40C + mov r0, #0xf6 + str r0, [r5, #0] +_021DE40C: + ldr r0, [r5, #4] + cmp r0, #0x40 + bge _021DE416 + mov r0, #0x40 + str r0, [r5, #4] +_021DE416: + ldr r0, [r5, #0] + bl ov21_021DE5DC + ldr r1, [r5, #4] + add r0, #0x84 + cmp r1, r0 + ble _021DE426 + str r0, [r5, #4] +_021DE426: + ldr r0, [r5, #0] + mov r1, #0x55 + bl sub_020E1F6C + add r1, r0, #0 + cmp r1, #2 + ble _021DE436 + mov r1, #2 +_021DE436: + ldr r0, [r4, #0] + bl ov21_021DCA30 + pop {r3, r4, r5, pc} +_021DE43E: + str r2, [r5, #0x20] + pop {r3, r4, r5, pc} +_021DE442: + bl ov21_021DE358 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DE448: .word 0x021BF6BC + thumb_func_end ov21_021DE3D0 + + thumb_func_start ov21_021DE44C +ov21_021DE44C: ; 0x021DE44C + push {r4, lr} + ldr r0, [r2, #0] + ldr r4, [r2, #4] + cmp r1, #0 + bne _021DE47A + ldr r0, [r0, #8] + mov r1, #1 + bl ov21_021E33B4 + ldr r0, _021DE47C ; =0x000005DD + bl sub_02005748 + mov r0, #1 + str r0, [r4, #0x20] + ldr r0, _021DE480 ; =0x021BF6BC + ldr r1, [r4, #0] + ldrh r2, [r0, #0x1c] + sub r1, r2, r1 + str r1, [r4, #8] + ldrh r1, [r0, #0x1e] + ldr r0, [r4, #4] + sub r0, r1, r0 + str r0, [r4, #0xc] +_021DE47A: + pop {r4, pc} + ; .align 2, 0 +_021DE47C: .word 0x000005DD +_021DE480: .word 0x021BF6BC + thumb_func_end ov21_021DE44C + + thumb_func_start ov21_021DE484 +ov21_021DE484: ; 0x021DE484 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl sub_02024034 + ldr r0, [r4, #0x14] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x14] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE484 + + thumb_func_start ov21_021DE49C +ov21_021DE49C: ; 0x021DE49C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r2, #0] + add r4, r1, #0 + lsl r0, r0, #0xc + str r0, [sp] + ldr r0, [r2, #4] + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + str r1, [sp, #4] + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0] + bl ov21_021DCA28 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_02021D6C + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE49C + + thumb_func_start ov21_021DE4D4 +ov21_021DE4D4: ; 0x021DE4D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r2, #0] + add r7, r1, #0 + str r3, [sp] + mov r4, #0 + bl ov21_021DCA28 + ldr r1, [r5, #0x18] + add r6, r0, #0 + cmp r1, r6 + bne _021DE4F8 + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021DE4F8 + ldr r0, [r5, #0x1c] + cmp r0, r1 + beq _021DE5A2 +_021DE4F8: + ldr r0, [r5, #0x1c] + cmp r0, r6 + beq _021DE504 + str r0, [r5, #0x18] + mov r0, #0 + str r0, [r5, #0x24] +_021DE504: + ldr r0, [r5, #0x24] + cmp r0, #0 + beq _021DE514 + cmp r0, #1 + beq _021DE54A + cmp r0, #2 + beq _021DE580 + b _021DE588 +_021DE514: + str r6, [r5, #0x1c] + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021DE520 + bl sub_020181C4 +_021DE520: + ldr r1, [r5, #0x18] + add r2, r5, #0 + ldr r0, [r7, #0] + ldr r3, [sp] + add r1, #0xf + add r2, #0x20 + bl ov21_021D27E0 + str r0, [r5, #0x14] + mov r0, #0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x18] + cmp r0, r6 + ble _021DE540 + mov r4, #1 + b _021DE542 +_021DE540: + mov r4, #2 +_021DE542: + ldr r0, [r5, #0x24] + add r0, r0, #1 + str r0, [r5, #0x24] + b _021DE588 +_021DE54A: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021DE554 + bl sub_020181C4 +_021DE554: + ldr r1, [r5, #0x1c] + add r2, r5, #0 + ldr r0, [r7, #0] + ldr r3, [sp] + add r1, #0xf + add r2, #0x20 + bl ov21_021D27E0 + str r0, [r5, #0x14] + mov r0, #0 + str r0, [r5, #0x28] + ldr r1, [r5, #0x18] + ldr r0, [r5, #0x1c] + cmp r1, r0 + bge _021DE576 + mov r4, #1 + b _021DE578 +_021DE576: + mov r4, #2 +_021DE578: + ldr r0, [r5, #0x24] + add r0, r0, #1 + str r0, [r5, #0x24] + b _021DE588 +_021DE580: + mov r4, #0 + str r4, [r5, #0x24] + ldr r0, [r5, #0x1c] + str r0, [r5, #0x18] +_021DE588: + ldr r2, [r5, #0x20] + mov r0, #0x1f + ldr r3, [r2, #0xc] + lsl r2, r4, #5 + add r2, r3, r2 + mov r1, #0x40 + mov r3, #0x20 + bl sub_0201DC68 + cmp r0, #0 + bne _021DE5A2 + bl sub_02022974 +_021DE5A2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DE4D4 + + thumb_func_start ov21_021DE5A4 +ov21_021DE5A4: ; 0x021DE5A4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0] + bl ov21_021DCA28 + cmp r0, #0 + beq _021DE5BC + cmp r0, #1 + beq _021DE5C6 + cmp r0, #2 + beq _021DE5D0 + pop {r4, pc} +_021DE5BC: + mov r0, #0x20 + str r0, [r4, #0] + mov r0, #0x80 + str r0, [r4, #4] + pop {r4, pc} +_021DE5C6: + mov r0, #0x80 + str r0, [r4, #0] + mov r0, #0x60 + str r0, [r4, #4] + pop {r4, pc} +_021DE5D0: + mov r0, #0xe0 + str r0, [r4, #0] + mov r0, #0x80 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE5A4 + + thumb_func_start ov21_021DE5DC +ov21_021DE5DC: ; 0x021DE5DC + push {r3, lr} + cmp r0, #0x28 + blt _021DE5E6 + cmp r0, #0xd8 + ble _021DE5EA +_021DE5E6: + mov r0, #0x30 + pop {r3, pc} +_021DE5EA: + ldr r1, _021DE628 ; =0x00007FFF + sub r0, #0x28 + mul r1, r0 + add r0, r1, #0 + mov r1, #0xb0 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _021DE62C ; =0x020F983C + mov r2, #3 + ldrsh r0, [r0, r1] + lsl r2, r2, #0x10 + mov r3, #0 + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + asr r1, r1, #0xc + mov r0, #0x30 + sub r0, r0, r1 + pop {r3, pc} + ; .align 2, 0 +_021DE628: .word 0x00007FFF +_021DE62C: .word 0x020F983C + thumb_func_end ov21_021DE5DC + + thumb_func_start ov21_021DE630 +ov21_021DE630: ; 0x021DE630 + push {r3, r4, r5, lr} + ldr r4, [r0, #0] + ldr r0, [r2, #8] + add r5, r1, #0 + bl ov21_021E33BC + cmp r0, #1 + bne _021DE664 + ldr r0, [r5, #0x24] + cmp r0, #0 + bne _021DE656 + mov r3, #0x20 + str r3, [sp] + ldr r1, [r5, #0] + ldr r2, [r5, #4] + add r0, r4, #0 + bl ov21_021D2574 + pop {r3, r4, r5, pc} +_021DE656: + mov r3, #0x20 + str r3, [sp] + ldr r1, [r5, #0] + ldr r2, [r5, #4] + add r0, r4, #0 + bl ov21_021D25E8 +_021DE664: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE630 \ No newline at end of file diff --git a/asm/ov21_021DE668.s b/asm/ov21_021DE668.s new file mode 100644 index 000000000..87e0e73d0 --- /dev/null +++ b/asm/ov21_021DE668.s @@ -0,0 +1,2226 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021DE668 +ov21_021DE668: ; 0x021DE668 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + bl ov21_021DE6E8 + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021DE724 + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0x20] + bl ov21_021DE774 + str r0, [r5, #0x24] + ldr r0, _021DE6A8 ; =ov21_021DE778 + str r0, [r5, #8] + ldr r0, _021DE6AC ; =ov21_021DE79C + str r0, [r5, #0xc] + ldr r0, _021DE6B0 ; =ov21_021DE7F8 + str r0, [r5, #0x10] + ldr r0, _021DE6B4 ; =ov21_021DE804 + str r0, [r5, #0x14] + ldr r0, _021DE6B8 ; =ov21_021DE8E4 + str r0, [r5, #0x18] + ldr r0, _021DE6BC ; =ov21_021DE8E8 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE6A8: .word ov21_021DE778 +_021DE6AC: .word ov21_021DE79C +_021DE6B0: .word ov21_021DE7F8 +_021DE6B4: .word ov21_021DE804 +_021DE6B8: .word ov21_021DE8E4 +_021DE6BC: .word ov21_021DE8E8 + thumb_func_end ov21_021DE668 + + thumb_func_start ov21_021DE6C0 +ov21_021DE6C0: ; 0x021DE6C0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021DE74C + ldr r0, [r4, #4] + bl ov21_021DE760 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE6C0 + + thumb_func_start ov21_021DE6D4 +ov21_021DE6D4: ; 0x021DE6D4 + mov r0, #0 + bx lr + thumb_func_end ov21_021DE6D4 + + thumb_func_start ov21_021DE6D8 +ov21_021DE6D8: ; 0x021DE6D8 + mov r2, #1 + cmp r1, #1 + bne _021DE6E2 + mov r1, #0 + add r2, r1, #0 +_021DE6E2: + str r1, [r0, #0x18] + add r0, r2, #0 + bx lr + thumb_func_end ov21_021DE6D8 + + thumb_func_start ov21_021DE6E8 +ov21_021DE6E8: ; 0x021DE6E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x20 + bl sub_02018144 + add r4, r0, #0 + bne _021DE6FA + bl sub_02022974 +_021DE6FA: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE6E8 + + thumb_func_start ov21_021DE724 +ov21_021DE724: ; 0x021DE724 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021DE736 + bl sub_02022974 +_021DE736: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DE724 + + thumb_func_start ov21_021DE74C +ov21_021DE74C: ; 0x021DE74C + push {r4, lr} + add r4, r0, #0 + bne _021DE756 + bl sub_02022974 +_021DE756: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE74C + + thumb_func_start ov21_021DE760 +ov21_021DE760: ; 0x021DE760 + push {r4, lr} + add r4, r0, #0 + bne _021DE76A + bl sub_02022974 +_021DE76A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE760 + + thumb_func_start ov21_021DE774 +ov21_021DE774: ; 0x021DE774 + mov r0, #0 + bx lr + thumb_func_end ov21_021DE774 + + thumb_func_start ov21_021DE778 +ov21_021DE778: ; 0x021DE778 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D3434 + ldr r0, [r4, #4] + bl ov21_021D36D8 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D344C + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021DE778 + + thumb_func_start ov21_021DE79C +ov21_021DE79C: ; 0x021DE79C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + cmp r0, #1 + bne _021DE7B0 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_021DE7B0: + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _021DE7BC + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_021DE7BC: + ldr r0, [r5, #0] + cmp r0, #0 + bne _021DE7EE + ldr r0, [r4, #0x1c] + cmp r0, #1 + bne _021DE7E8 + ldr r0, [r4, #4] + bl ov21_021D37BC + ldr r2, _021DE7F4 ; =0x000001FF + add r1, r0, #0 + lsl r1, r1, #0x10 + str r2, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #0xe + lsr r1, r1, #0x10 + add r3, r2, #0 + bl sub_020059D0 + mov r0, #0 + str r0, [r4, #0x1c] +_021DE7E8: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] +_021DE7EE: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DE7F4: .word 0x000001FF + thumb_func_end ov21_021DE79C + + thumb_func_start ov21_021DE7F8 +ov21_021DE7F8: ; 0x021DE7F8 + push {r3, lr} + mov r0, #0 + bl sub_0200592C + mov r0, #1 + pop {r3, pc} + thumb_func_end ov21_021DE7F8 + + thumb_func_start ov21_021DE804 +ov21_021DE804: ; 0x021DE804 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r5, [r4, #8] + cmp r0, #3 + bhi _021DE8DA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DE820: ; jump table + .short _021DE828 - _021DE820 - 2 ; case 0 + .short _021DE842 - _021DE820 - 2 ; case 1 + .short _021DE88C - _021DE820 - 2 ; case 2 + .short _021DE8D0 - _021DE820 - 2 ; case 3 +_021DE828: + ldr r0, [r4, #4] + mov r1, #0x74 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x74 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE8DA +_021DE842: + ldr r3, [r4, #4] + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021DE9A4 + ldr r0, [r7, #0x14] + cmp r0, #0 + beq _021DE85C + cmp r0, #1 + beq _021DE86A + cmp r0, #2 + beq _021DE878 + b _021DE884 +_021DE85C: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DF44C + b _021DE884 +_021DE86A: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DF374 + b _021DE884 +_021DE878: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DF548 +_021DE884: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE8DA +_021DE88C: + ldr r0, [r7, #0x14] + cmp r0, #0 + beq _021DE89C + cmp r0, #1 + beq _021DE8AA + cmp r0, #2 + beq _021DE8B8 + b _021DE8C4 +_021DE89C: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021DF4D0 + add r1, r0, #0 + b _021DE8C4 +_021DE8AA: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021DF3F0 + add r1, r0, #0 + b _021DE8C4 +_021DE8B8: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021DF5D0 + add r1, r0, #0 +_021DE8C4: + cmp r1, #0 + beq _021DE8DA + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE8DA +_021DE8D0: + ldr r0, _021DE8E0 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DE8DA: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DE8E0: .word 0x04000050 + thumb_func_end ov21_021DE804 + + thumb_func_start ov21_021DE8E4 +ov21_021DE8E4: ; 0x021DE8E4 + mov r0, #0 + bx lr + thumb_func_end ov21_021DE8E4 + + thumb_func_start ov21_021DE8E8 +ov21_021DE8E8: ; 0x021DE8E8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r5, [r4, #0] + add r3, r0, #0 + add r1, r2, #0 + ldr r0, [r4, #8] + cmp r5, #4 + bhi _021DE99E + add r5, r5, r5 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_021DE904: ; jump table + .short _021DE90E - _021DE904 - 2 ; case 0 + .short _021DE942 - _021DE904 - 2 ; case 1 + .short _021DE980 - _021DE904 - 2 ; case 2 + .short _021DE98E - _021DE904 - 2 ; case 3 + .short _021DE99A - _021DE904 - 2 ; case 4 +_021DE90E: + ldr r1, [r1, #0x14] + cmp r1, #0 + beq _021DE91E + cmp r1, #1 + beq _021DE928 + cmp r1, #2 + beq _021DE932 + b _021DE93A +_021DE91E: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DF44C + b _021DE93A +_021DE928: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DF374 + b _021DE93A +_021DE932: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DF548 +_021DE93A: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE99E +_021DE942: + ldr r1, [r1, #0x14] + cmp r1, #0 + beq _021DE952 + cmp r1, #1 + beq _021DE95E + cmp r1, #2 + beq _021DE96A + b _021DE974 +_021DE952: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DF4D0 + add r2, r0, #0 + b _021DE974 +_021DE95E: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DF3F0 + add r2, r0, #0 + b _021DE974 +_021DE96A: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DF5D0 + add r2, r0, #0 +_021DE974: + cmp r2, #0 + beq _021DE99E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE99E +_021DE980: + add r1, r3, #0 + bl ov21_021DEA0C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE99E +_021DE98E: + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DE99E +_021DE99A: + mov r0, #1 + pop {r3, r4, r5, pc} +_021DE99E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DE8E8 + + thumb_func_start ov21_021DE9A4 +ov21_021DE9A4: ; 0x021DE9A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DEF08 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DEF54 + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov21_021DEFA8 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021DF214 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021DEA44 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021DEB58 + ldr r0, [r4, #4] + bl ov21_021D37CC + cmp r0, #2 + bne _021DEA0A + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021DED24 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021DF098 +_021DEA0A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DE9A4 + + thumb_func_start ov21_021DEA0C +ov21_021DEA0C: ; 0x021DEA0C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl ov21_021DF35C + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DED68 + add r0, r5, #0 + bl ov21_021DF1F8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DF054 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DEA0C + + thumb_func_start ov21_021DEA44 +ov21_021DEA44: ; 0x021DEA44 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x32 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x33 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r1, #3 + str r1, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r3, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x34 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r6, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #8 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x36 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r4, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #0x10 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DEA44 + + thumb_func_start ov21_021DEB58 +ov21_021DEB58: ; 0x021DEB58 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + add r7, r2, #0 + bl ov21_021D37BC + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37CC + cmp r0, #2 + beq _021DEB74 + mov r6, #0 +_021DEB74: + ldr r0, _021DEB88 ; =0x00020100 + add r1, r6, #0 + str r0, [sp] + ldr r0, [r5, #0] + ldr r3, [r4, #0x18] + add r0, r0, #4 + add r2, r7, #0 + bl ov21_021DEB8C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DEB88: .word 0x00020100 + thumb_func_end ov21_021DEB58 + + thumb_func_start ov21_021DEB8C +ov21_021DEB8C: ; 0x021DEB8C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r2, #0 + add r5, r0, #0 + str r1, [sp, #0x10] + mov r0, #0x40 + add r1, r6, #0 + str r3, [sp, #0x14] + ldr r4, [sp, #0x30] + bl sub_02023790 + add r7, r0, #0 + ldr r2, _021DEC28 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + mov r1, #9 + add r2, r7, #0 + str r0, [sp, #0x18] + bl sub_0200B1B8 + mov r0, #0x58 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + str r4, [sp, #8] + add r0, r5, #0 + add r2, r7, #0 + mov r3, #0x98 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x18] + mov r1, #0xa + add r2, r7, #0 + bl sub_0200B1B8 + mov r0, #0x68 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + str r4, [sp, #8] + add r0, r5, #0 + add r2, r7, #0 + mov r3, #0x98 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_0200B190 + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + add r3, r4, #0 + bl ov21_021DEC2C + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + add r3, r4, #0 + bl ov21_021DEC80 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, r5, #0 + add r1, r6, #0 + str r4, [sp] + bl ov21_021DECD4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021DEC28: .word 0x000002B9 + thumb_func_end ov21_021DEB8C + + thumb_func_start ov21_021DEC2C +ov21_021DEC2C: ; 0x021DEC2C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r6, r1, #0 + mov r0, #0x40 + str r2, [sp, #0x10] + add r5, r3, #0 + bl sub_02023790 + add r4, r0, #0 + bl sub_020989D0 + add r2, r0, #0 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + ldr r1, [sp, #0x10] + add r2, r4, #0 + add r6, r0, #0 + bl sub_0200B1B8 + mov r0, #0x58 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + str r5, [sp, #8] + add r0, r7, #0 + add r2, r4, #0 + mov r3, #0xb8 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DEC2C + + thumb_func_start ov21_021DEC80 +ov21_021DEC80: ; 0x021DEC80 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r6, r1, #0 + mov r0, #0x40 + str r2, [sp, #0x10] + add r5, r3, #0 + bl sub_02023790 + add r4, r0, #0 + bl sub_020989C4 + add r2, r0, #0 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + ldr r1, [sp, #0x10] + add r2, r4, #0 + add r6, r0, #0 + bl sub_0200B1B8 + mov r0, #0x68 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + str r5, [sp, #8] + add r0, r7, #0 + add r2, r4, #0 + mov r3, #0xb8 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DEC80 + + thumb_func_start ov21_021DECD4 +ov21_021DECD4: ; 0x021DECD4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r2, #0 + add r2, r3, #0 + mov r1, #2 + add r3, r4, #0 + bl ov21_021D56BC + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002EB4 + cmp r0, #0xf0 + bhs _021DED00 + lsr r1, r0, #1 + mov r0, #0x80 + sub r3, r0, r1 + b _021DED02 +_021DED00: + mov r3, #8 +_021DED02: + mov r0, #0x88 + str r0, [sp] + mov r1, #0 + ldr r0, [sp, #0x20] + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r2, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl ov21_021D5600 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DECD4 + + thumb_func_start ov21_021DED24 +ov21_021DED24: ; 0x021DED24 + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + add r6, r0, #0 + ldr r0, [r5, #4] + add r7, r1, #0 + str r3, [sp] + bl ov21_021D37BC + add r4, r0, #0 + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov21_021D33D4 + ldr r1, _021DED64 ; =0x000001E7 + cmp r4, r1 + bne _021DED4A + cmp r0, #0 + ble _021DED4A + mov r4, #0xb +_021DED4A: + ldr r2, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r3, r4, #0 + bl ov21_021DED7C + ldr r2, [sp] + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021DEE80 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DED64: .word 0x000001E7 + thumb_func_end ov21_021DED24 + + thumb_func_start ov21_021DED68 +ov21_021DED68: ; 0x021DED68 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021DEEF8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DEE38 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DED68 + + thumb_func_start ov21_021DED7C +ov21_021DED7C: ; 0x021DED7C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r3, [sp, #0x10] + add r5, r0, #0 + add r6, r2, #0 + ldr r4, [r1, #0] + bl ov21_021D1F90 + add r7, r0, #0 + ldr r0, [sp, #0x10] + bl ov21_021D1F94 + str r0, [sp, #0x14] + bl ov21_021D1F98 + str r0, [sp, #0x18] + bl ov21_021D1F9C + str r0, [sp, #0x1c] + bl ov21_021D1FA0 + str r0, [sp, #0x20] + mov r0, #0xfa + lsl r0, r0, #4 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + mov r0, #5 + str r6, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r2, [sp, #0x14] + add r1, r7, #0 + bl sub_0200985C + str r0, [r5, #0x24] + bl sub_0200A3DC + ldr r0, [r5, #0x24] + bl sub_02009D4C + mov r0, #0xfa + lsl r0, r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x51 + str r6, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [sp, #0x18] + add r1, r7, #0 + mov r3, #0 + bl sub_020098B8 + str r0, [r5, #0x28] + bl sub_0200A640 + ldr r0, [r5, #0x28] + bl sub_02009D4C + mov r0, #0xfa + lsl r0, r0, #4 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r6, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [sp, #0x1c] + add r1, r7, #0 + mov r3, #1 + bl sub_02009918 + str r0, [r5, #0x2c] + mov r0, #0xfa + lsl r0, r0, #4 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r6, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [sp, #0x20] + add r1, r7, #0 + mov r3, #1 + bl sub_02009918 + str r0, [r5, #0x30] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DED7C + + thumb_func_start ov21_021DEE38 +ov21_021DEE38: ; 0x021DEE38 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x24] + ldr r4, [r1, #0] + cmp r0, #0 + beq _021DEE7E + bl sub_0200A4E4 + ldr r0, [r5, #0x28] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x24] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x28] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x2c] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x30] + bl sub_02009D68 +_021DEE7E: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DEE38 + + thumb_func_start ov21_021DEE80 +ov21_021DEE80: ; 0x021DEE80 + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + mov r1, #0xfa + add r5, r0, #0 + lsl r1, r1, #4 + mov r0, #0 + add r6, r2, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #5 + str r2, [sp, #0x10] + lsl r0, r0, #6 + ldr r3, [r4, r0] + str r3, [sp, #0x14] + add r3, r0, #4 + ldr r3, [r4, r3] + str r3, [sp, #0x18] + add r3, r0, #0 + add r3, #8 + ldr r3, [r4, r3] + add r0, #0xc + str r3, [sp, #0x1c] + ldr r0, [r4, r0] + add r3, r1, #0 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r0, sp, #0x4c + add r2, r1, #0 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x20 + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x44] + mov r0, #0x16 + lsl r0, r0, #0xe + str r0, [sp, #0x38] + mov r0, #0x1e + lsl r0, r0, #0xe + str r0, [sp, #0x34] + add r0, sp, #0x2c + str r6, [sp, #0x48] + bl sub_02021B90 + str r0, [r5, #0] + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DEE80 + + thumb_func_start ov21_021DEEF8 +ov21_021DEEF8: ; 0x021DEEF8 + push {r3, lr} + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DEF04 + bl sub_02021BD4 +_021DEF04: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021DEEF8 + + thumb_func_start ov21_021DEF08 +ov21_021DEF08: ; 0x021DEF08 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + add r6, r2, #0 + bl ov21_021D375C + add r3, r0, #0 + mov r0, #0x2b + lsl r0, r0, #0xe + str r0, [sp] + mov r0, #2 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #4] + add r2, r6, #0 + bl ov21_021D1778 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D238C + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DEF08 + + thumb_func_start ov21_021DEF3C +ov21_021DEF3C: ; 0x021DEF3C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov21_021D23C0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov21_021D2360 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DEF3C + + thumb_func_start ov21_021DEF54 +ov21_021DEF54: ; 0x021DEF54 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov21_021D2170 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r2, r0, #0 + mov r0, #0x30 + str r0, [sp] + mov r0, #0x48 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #4] + mov r3, #2 + bl ov21_021D1890 + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DEF54 + + thumb_func_start ov21_021DEF8C +ov21_021DEF8C: ; 0x021DEF8C + push {r4, lr} + ldr r0, [r0, #0] + bl ov21_021D2170 + add r4, r0, #0 + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + add r0, r4, #0 + bl sub_02008780 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DEF8C + + thumb_func_start ov21_021DEFA8 +ov21_021DEFA8: ; 0x021DEFA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021DF044 ; =0x00000FFA + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x5a + bl sub_02009A4C + str r0, [r5, #0x14] + bl sub_0200A3DC + ldr r0, [r5, #0x14] + bl sub_02009D4C + ldr r0, _021DF048 ; =0x00000FAD + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xd + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x18] + bl sub_0200A640 + ldr r0, [r5, #0x18] + bl sub_02009D4C + ldr r0, _021DF04C ; =0x00000FF8 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x58 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x1c] + ldr r0, _021DF050 ; =0x00000FF9 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x59 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x20] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF044: .word 0x00000FFA +_021DF048: .word 0x00000FAD +_021DF04C: .word 0x00000FF8 +_021DF050: .word 0x00000FF9 + thumb_func_end ov21_021DEFA8 + + thumb_func_start ov21_021DF054 +ov21_021DF054: ; 0x021DF054 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x14] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x18] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x14] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x18] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x1c] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x20] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DF054 + + thumb_func_start ov21_021DF098 +ov21_021DF098: ; 0x021DF098 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x78 + add r6, r2, #0 + add r5, r0, #0 + ldr r0, [r6, #4] + str r3, [sp, #0x2c] + ldr r4, [r1, #0] + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r6, #4] + add r1, r7, #0 + bl ov21_021D33D4 + str r0, [sp, #0x30] + ldr r1, [sp, #0x30] + add r0, r7, #0 + mov r2, #6 + bl sub_020759CC + add r6, r0, #0 + ldr r1, [sp, #0x30] + add r0, r7, #0 + mov r2, #7 + bl sub_020759CC + add r7, r0, #0 + add r0, r6, #0 + bl ov21_021DF180 + add r6, r0, #0 + add r0, r7, #0 + bl ov21_021DF180 + ldr r3, _021DF17C ; =0x00000FF9 + add r7, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #5 + str r2, [sp, #0x10] + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x54 + sub r2, #0x4c + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x34] + add r0, sp, #0x54 + str r0, [sp, #0x38] + mov r0, #0x20 + str r0, [sp, #0x48] + mov r0, #1 + str r0, [sp, #0x4c] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x50] + mov r0, #0xaa + lsl r0, r0, #0xc + str r0, [sp, #0x3c] + mov r0, #0x12 + lsl r0, r0, #0xe + str r0, [sp, #0x40] + add r0, sp, #0x34 + bl sub_02021B90 + add r1, r6, #0 + str r0, [r5, #4] + bl sub_02021D6C + cmp r6, r7 + beq _021DF172 + mov r0, #0x37 + lsl r0, r0, #0xe + str r0, [sp, #0x3c] + mov r0, #0x12 + lsl r0, r0, #0xe + str r0, [sp, #0x40] + add r0, sp, #0x34 + bl sub_02021B90 + add r1, r7, #0 + str r0, [r5, #8] + bl sub_02021D6C + add sp, #0x78 + pop {r3, r4, r5, r6, r7, pc} +_021DF172: + mov r0, #0 + str r0, [r5, #8] + add sp, #0x78 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DF17C: .word 0x00000FF9 + thumb_func_end ov21_021DF098 + + thumb_func_start ov21_021DF180 +ov21_021DF180: ; 0x021DF180 + cmp r0, #0x11 + bhi _021DF1F6 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DF190: ; jump table + .short _021DF1B4 - _021DF190 - 2 ; case 0 + .short _021DF1B8 - _021DF190 - 2 ; case 1 + .short _021DF1BC - _021DF190 - 2 ; case 2 + .short _021DF1C0 - _021DF190 - 2 ; case 3 + .short _021DF1C4 - _021DF190 - 2 ; case 4 + .short _021DF1C8 - _021DF190 - 2 ; case 5 + .short _021DF1CC - _021DF190 - 2 ; case 6 + .short _021DF1D0 - _021DF190 - 2 ; case 7 + .short _021DF1D4 - _021DF190 - 2 ; case 8 + .short _021DF1D0 - _021DF190 - 2 ; case 9 + .short _021DF1D8 - _021DF190 - 2 ; case 10 + .short _021DF1DC - _021DF190 - 2 ; case 11 + .short _021DF1E0 - _021DF190 - 2 ; case 12 + .short _021DF1E4 - _021DF190 - 2 ; case 13 + .short _021DF1E8 - _021DF190 - 2 ; case 14 + .short _021DF1EC - _021DF190 - 2 ; case 15 + .short _021DF1F0 - _021DF190 - 2 ; case 16 + .short _021DF1F4 - _021DF190 - 2 ; case 17 +_021DF1B4: + mov r0, #0 + bx lr +_021DF1B8: + mov r0, #6 + bx lr +_021DF1BC: + mov r0, #0xe + bx lr +_021DF1C0: + mov r0, #0xa + bx lr +_021DF1C4: + mov r0, #8 + bx lr +_021DF1C8: + mov r0, #5 + bx lr +_021DF1CC: + mov r0, #0xb + bx lr +_021DF1D0: + mov r0, #7 + bx lr +_021DF1D4: + mov r0, #9 + bx lr +_021DF1D8: + mov r0, #1 + bx lr +_021DF1DC: + mov r0, #3 + bx lr +_021DF1E0: + mov r0, #2 + bx lr +_021DF1E4: + mov r0, #4 + bx lr +_021DF1E8: + mov r0, #0xf + bx lr +_021DF1EC: + mov r0, #0xd + bx lr +_021DF1F0: + mov r0, #0x10 + bx lr +_021DF1F4: + mov r0, #0xc +_021DF1F6: + bx lr + thumb_func_end ov21_021DF180 + + thumb_func_start ov21_021DF1F8 +ov21_021DF1F8: ; 0x021DF1F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021DF206 + bl sub_02021BD4 +_021DF206: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021DF210 + bl sub_02021BD4 +_021DF210: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF1F8 + + thumb_func_start ov21_021DF214 +ov21_021DF214: ; 0x021DF214 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xa0 + add r6, r0, #0 + add r0, r2, #0 + add r5, r1, #0 + ldr r0, [r0, #4] + str r2, [sp, #0x2c] + add r7, r3, #0 + ldr r4, [r5, #0] + bl ov21_021D37BC + ldr r3, _021DF308 ; =0x00000FF9 + str r0, [sp, #0x30] + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #5 + str r2, [sp, #0x10] + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x7c + sub r2, #0x4c + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x5c] + add r0, sp, #0x7c + str r0, [sp, #0x60] + mov r0, #0x20 + str r0, [sp, #0x70] + mov r0, #1 + str r0, [sp, #0x74] + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [sp, #0x64] + mov r0, #0xd + lsl r0, r0, #0xe + str r0, [sp, #0x68] + add r0, sp, #0x5c + str r7, [sp, #0x78] + bl sub_02021B90 + mov r1, #0x11 + str r0, [r6, #0xc] + bl sub_02021D6C + ldr r0, [sp, #0x2c] + ldr r0, [r0, #4] + bl ov21_021D37CC + cmp r0, #2 + beq _021DF2AC + mov r0, #0 + str r0, [sp, #0x30] +_021DF2AC: + mov r0, #0x15 + ldr r1, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + ldr r1, [sp, #0x30] + add r2, r7, #0 + bl ov21_021DF30C + add r4, r0, #0 + ldr r0, [r5, #0] + mov r1, #1 + bl ov21_021D2344 + mov r1, #0x15 + ldr r2, [r5, #0] + lsl r1, r1, #4 + ldr r1, [r2, r1] + str r1, [sp, #0x34] + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #0x3c] + ldr r0, [r6, #0xc] + str r0, [sp, #0x40] + mov r0, #0x4d + mvn r0, r0 + str r0, [sp, #0x44] + add r0, #0x46 + str r0, [sp, #0x48] + mov r0, #0 + str r0, [sp, #0x4c] + mov r0, #0x1f + str r0, [sp, #0x50] + mov r0, #1 + str r0, [sp, #0x54] + str r7, [sp, #0x58] + str r4, [sp, #0x38] + add r0, sp, #0x34 + bl ov21_021D4CA0 + str r0, [r6, #0x10] + add r0, r4, #0 + bl ov21_021D4DA0 + add sp, #0xa0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF308: .word 0x00000FF9 + thumb_func_end ov21_021DF214 + + thumb_func_start ov21_021DF30C +ov21_021DF30C: ; 0x021DF30C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r2, #0 + mov r1, #0x12 + mov r2, #2 + add r7, r0, #0 + bl ov21_021D4D6C + add r4, r0, #0 + add r0, r5, #0 + mov r1, #2 + add r2, r6, #0 + bl ov21_021D566C + add r5, r0, #0 + mov r0, #2 + add r1, r5, #0 + mov r2, #0 + bl sub_02002D7C + cmp r0, #0x88 + bhs _021DF340 + mov r1, #0x88 + sub r0, r1, r0 + lsr r3, r0, #1 + b _021DF342 +_021DF340: + mov r3, #0 +_021DF342: + mov r0, #0 + str r0, [sp] + add r0, r7, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov21_021D4E80 + add r0, r5, #0 + bl ov21_021D5600 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF30C + + thumb_func_start ov21_021DF35C +ov21_021DF35C: ; 0x021DF35C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0xc] + ldr r0, [r4, #0x10] + bl ov21_021D4D1C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF35C + + thumb_func_start ov21_021DF374 +ov21_021DF374: ; 0x021DF374 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #1 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021D2360 + add r0, r7, #0 + bl ov21_021DF64C + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + beq _021DF3E6 + cmp r6, #0 + beq _021DF3C2 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + b _021DF3E6 +_021DF3C2: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021DF3E6: + add r0, r5, #0 + bl ov21_021DF6B4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DF374 + + thumb_func_start ov21_021DF3F0 +ov21_021DF3F0: ; 0x021DF3F0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r2, #0x10] + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021DF410 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021DF41A +_021DF410: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021DF41A: + add r4, r0, #0 + cmp r4, #1 + bne _021DF442 + cmp r6, #1 + bne _021DF434 + add r0, r7, #0 + bl ov21_021DF680 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D2360 + b _021DF448 +_021DF434: + add r0, r5, #0 + bl ov21_021DEF8C + add r0, r5, #0 + bl ov21_021DEF3C + b _021DF448 +_021DF442: + add r0, r5, #0 + bl ov21_021DF6B4 +_021DF448: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DF3F0 + + thumb_func_start ov21_021DF44C +ov21_021DF44C: ; 0x021DF44C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021DF64C + cmp r6, #0 + bne _021DF472 + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + add r0, r7, #0 + mov r3, #4 + bl ov21_021DF6C4 + add r0, r7, #0 + bl ov21_021DF6FC +_021DF472: + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + beq _021DF4CC + cmp r6, #0 + beq _021DF4A8 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r2, r1, #0 + sub r2, #0x14 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021DF4A8: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r3, r1, #0 + sub r3, #0x14 + bl ov21_021D23F8 +_021DF4CC: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DF44C + + thumb_func_start ov21_021DF4D0 +ov21_021DF4D0: ; 0x021DF4D0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bne _021DF4F0 + bl ov21_021DF6E0 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DF718 + str r0, [sp, #4] + b _021DF4F6 +_021DF4F0: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] +_021DF4F6: + ldr r0, [r6, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r4, #0] + beq _021DF510 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #8] + b _021DF51C +_021DF510: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC + str r0, [sp, #8] +_021DF51C: + mov r1, #0 + add r2, sp, #0 +_021DF520: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021DF52E + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #3 + blt _021DF520 +_021DF52E: + cmp r1, #3 + bne _021DF542 + cmp r7, #1 + bne _021DF53C + add r0, r5, #0 + bl ov21_021DF680 +_021DF53C: + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021DF542: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DF4D0 + + thumb_func_start ov21_021DF548 +ov21_021DF548: ; 0x021DF548 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021DF64C + ldr r0, [r5, #0] + mov r1, #1 + bl ov21_021D2360 + cmp r6, #0 + bne _021DF570 + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + add r0, r7, #0 + mov r3, #1 + bl ov21_021DF6C4 +_021DF570: + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + beq _021DF5CA + cmp r6, #0 + beq _021DF5A6 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021DF5A6: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021DF5CA: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF548 + + thumb_func_start ov21_021DF5D0 +ov21_021DF5D0: ; 0x021DF5D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bne _021DF5E6 + bl ov21_021DF6E0 + str r0, [sp] + b _021DF5EA +_021DF5E6: + mov r0, #1 + str r0, [sp] +_021DF5EA: + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021DF604 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #4] + b _021DF610 +_021DF604: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC + str r0, [sp, #4] +_021DF610: + mov r1, #0 + add r2, sp, #0 +_021DF614: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021DF622 + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #2 + blt _021DF614 +_021DF622: + cmp r1, #2 + bne _021DF646 + cmp r6, #1 + bne _021DF63A + add r0, r7, #0 + bl ov21_021DF680 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D2360 + b _021DF640 +_021DF63A: + add r0, r5, #0 + bl ov21_021DEF3C +_021DF640: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DF646: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DF5D0 + + thumb_func_start ov21_021DF64C +ov21_021DF64C: ; 0x021DF64C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r4, #0 + add r5, r7, #0 + mov r6, #1 +_021DF656: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DF662 + add r1, r6, #0 + bl sub_02021FE0 +_021DF662: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DF656 + ldr r0, [r7, #0xc] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r7, #0x10] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF64C + + thumb_func_start ov21_021DF680 +ov21_021DF680: ; 0x021DF680 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r4, #0 + add r5, r7, #0 + add r6, r4, #0 +_021DF68A: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021DF696 + add r1, r6, #0 + bl sub_02021FE0 +_021DF696: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021DF68A + ldr r0, [r7, #0xc] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r7, #0x10] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF680 + + thumb_func_start ov21_021DF6B4 +ov21_021DF6B4: ; 0x021DF6B4 + mov r1, #0x5b + ldr r0, [r0, #0] + lsl r1, r1, #2 + ldr r3, _021DF6C0 ; =ov21_021D24FC + add r1, r0, r1 + bx r3 + ; .align 2, 0 +_021DF6C0: .word ov21_021D24FC + thumb_func_end ov21_021DF6B4 + + thumb_func_start ov21_021DF6C4 +ov21_021DF6C4: ; 0x021DF6C4 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + str r2, [sp] + str r3, [sp, #4] + add r0, #0x34 + mov r1, #0x30 + add r2, r4, #0 + mov r3, #0x48 + bl ov21_021D2648 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF6C4 + + thumb_func_start ov21_021DF6E0 +ov21_021DF6E0: ; 0x021DF6E0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x34 + bl ov21_021D2664 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r5, #0x34] + ldr r2, [r5, #0x38] + bl ov21_021D2164 + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DF6E0 + + thumb_func_start ov21_021DF6FC +ov21_021DF6FC: ; 0x021DF6FC + push {r3, lr} + sub sp, #8 + mov r1, #0x52 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + add r0, #0x54 + mov r1, #0xac + mov r2, #0xaa + mov r3, #0x20 + bl ov21_021D2648 + add sp, #8 + pop {r3, pc} + thumb_func_end ov21_021DF6FC + + thumb_func_start ov21_021DF718 +ov21_021DF718: ; 0x021DF718 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x54 + bl ov21_021D2664 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r5, #0x54] + ldr r2, [r5, #0x58] + bl ov21_021D1848 + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DF718 \ No newline at end of file diff --git a/asm/ov21_021DF734.s b/asm/ov21_021DF734.s new file mode 100644 index 000000000..b9299160b --- /dev/null +++ b/asm/ov21_021DF734.s @@ -0,0 +1,2924 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021DF734 +ov21_021DF734: ; 0x021DF734 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + bl ov21_021DF7CC + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021DF80C + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0x20] + bl ov21_021DF86C + str r0, [r5, #0x24] + ldr r0, _021DF774 ; =ov21_021DF888 + str r0, [r5, #8] + ldr r0, _021DF778 ; =ov21_021DF8B0 + str r0, [r5, #0xc] + ldr r0, _021DF77C ; =ov21_021DF8C0 + str r0, [r5, #0x10] + ldr r0, _021DF780 ; =ov21_021DF8C4 + str r0, [r5, #0x14] + ldr r0, _021DF784 ; =ov21_021DF958 + str r0, [r5, #0x18] + ldr r0, _021DF788 ; =ov21_021DFA18 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DF774: .word ov21_021DF888 +_021DF778: .word ov21_021DF8B0 +_021DF77C: .word ov21_021DF8C0 +_021DF780: .word ov21_021DF8C4 +_021DF784: .word ov21_021DF958 +_021DF788: .word ov21_021DFA18 + thumb_func_end ov21_021DF734 + + thumb_func_start ov21_021DF78C +ov21_021DF78C: ; 0x021DF78C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021DF844 + ldr r0, [r4, #4] + bl ov21_021DF858 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF78C + + thumb_func_start ov21_021DF7A0 +ov21_021DF7A0: ; 0x021DF7A0 + push {r3, r4, r5, lr} + ldr r4, [r0, #0] + ldr r0, [r0, #4] + add r2, r1, #0 + ldr r0, [r0, #4] + cmp r0, #1 + bne _021DF7B2 + mov r0, #0 + pop {r3, r4, r5, pc} +_021DF7B2: + ldr r5, [r4, #0x14] + ldr r0, [r4, #0xc] + ldr r3, [r4, #0x10] + add r1, r5, #0 + bl ov21_021DF870 + str r0, [r4, #0x14] + cmp r5, r0 + beq _021DF7C8 + mov r0, #1 + pop {r3, r4, r5, pc} +_021DF7C8: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DF7A0 + + thumb_func_start ov21_021DF7CC +ov21_021DF7CC: ; 0x021DF7CC + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bne _021DF7DE + bl sub_02022974 +_021DF7DE: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021DF7E4: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021DF7E4 + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF7CC + + thumb_func_start ov21_021DF80C +ov21_021DF80C: ; 0x021DF80C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021DF81E + bl sub_02022974 +_021DF81E: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DF80C + + thumb_func_start ov21_021DF844 +ov21_021DF844: ; 0x021DF844 + push {r4, lr} + add r4, r0, #0 + bne _021DF84E + bl sub_02022974 +_021DF84E: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF844 + + thumb_func_start ov21_021DF858 +ov21_021DF858: ; 0x021DF858 + push {r4, lr} + add r4, r0, #0 + bne _021DF862 + bl sub_02022974 +_021DF862: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF858 + + thumb_func_start ov21_021DF86C +ov21_021DF86C: ; 0x021DF86C + mov r0, #0 + bx lr + thumb_func_end ov21_021DF86C + + thumb_func_start ov21_021DF870 +ov21_021DF870: ; 0x021DF870 + cmp r2, #0 + ble _021DF87E + add r2, r1, r2 + cmp r2, r3 + blt _021DF884 + mov r2, #0 + b _021DF884 +_021DF87E: + add r0, r1, r2 + bpl _021DF884 + sub r2, r3, #1 +_021DF884: + add r0, r2, #0 + bx lr + thumb_func_end ov21_021DF870 + + thumb_func_start ov21_021DF888 +ov21_021DF888: ; 0x021DF888 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r5, r0, #0 + add r1, r4, #0 + bl ov21_021E01CC + str r0, [r4, #0xc] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E0268 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DF888 + + thumb_func_start ov21_021DF8B0 +ov21_021DF8B0: ; 0x021DF8B0 + ldr r0, [r0, #0xc] + cmp r0, #1 + bne _021DF8BA + mov r0, #1 + bx lr +_021DF8BA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021DF8B0 + + thumb_func_start ov21_021DF8C0 +ov21_021DF8C0: ; 0x021DF8C0 + mov r0, #1 + bx lr + thumb_func_end ov21_021DF8C0 + + thumb_func_start ov21_021DF8C4 +ov21_021DF8C4: ; 0x021DF8C4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021DF94E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DF8E0: ; jump table + .short _021DF8E8 - _021DF8E0 - 2 ; case 0 + .short _021DF910 - _021DF8E0 - 2 ; case 1 + .short _021DF92E - _021DF8E0 - 2 ; case 2 + .short _021DF944 - _021DF8E0 - 2 ; case 3 +_021DF8E8: + ldr r0, [r4, #4] + mov r1, #0xd0 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0xd0 + bl sub_020D5124 + ldr r0, [r4, #8] + ldr r1, [r7, #0xc] + add r0, #0xc8 + str r1, [r0, #0] + mov r0, #0 + str r0, [r5, #4] + str r0, [r5, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DF94E +_021DF910: + ldr r3, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021DFA84 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021DFF38 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DF94E +_021DF92E: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021DFFA8 + cmp r0, #0 + beq _021DF94E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DF94E +_021DF944: + ldr r0, _021DF954 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DF94E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DF954: .word 0x04000050 + thumb_func_end ov21_021DF8C4 + + thumb_func_start ov21_021DF958 +ov21_021DF958: ; 0x021DF958 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #0 + beq _021DF974 + cmp r0, #1 + beq _021DF9C0 + cmp r0, #2 + beq _021DF9D8 + b _021DFA04 +_021DF974: + add r0, r6, #0 + add r0, #0xcc + ldr r1, [r7, #0x14] + ldr r0, [r0, #0] + cmp r1, r0 + beq _021DFA08 + add r0, r6, #0 + add r0, #0xcc + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r6, #0 + add r1, r2, r1 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E0094 + add r0, r6, #0 + bl ov21_021E0C10 + mov r0, #1 + str r0, [r5, #4] + ldr r0, _021DFA14 ; =0x0000068B + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DFA08 +_021DF9C0: + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E00B8 + cmp r0, #1 + bne _021DFA08 + mov r0, #1 + str r0, [r5, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DFA08 +_021DF9D8: + ldr r0, [r5, #8] + cmp r0, #1 + bne _021DFA08 + ldr r0, [r7, #0xc] + add r1, r5, #0 + str r0, [sp] + ldr r0, [r7, #0x14] + str r0, [sp, #4] + ldr r3, [r4, #4] + add r0, r6, #0 + bl ov21_021E0944 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021DFBB4 + mov r0, #0 + str r0, [r5, #8] + str r0, [r5, #4] + str r0, [r4, #0] + b _021DFA08 +_021DFA04: + bl sub_02022974 +_021DFA08: + add r0, r6, #0 + bl ov21_021E0C30 + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DFA14: .word 0x0000068B + thumb_func_end ov21_021DF958 + + thumb_func_start ov21_021DFA18 +ov21_021DFA18: ; 0x021DFA18 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r3, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021DFA7E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DFA32: ; jump table + .short _021DFA3C - _021DFA32 - 2 ; case 0 + .short _021DFA4C - _021DFA32 - 2 ; case 1 + .short _021DFA60 - _021DFA32 - 2 ; case 2 + .short _021DFA6E - _021DFA32 - 2 ; case 3 + .short _021DFA7A - _021DFA32 - 2 ; case 4 +_021DFA3C: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DFF38 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DFA7E +_021DFA4C: + add r1, r3, #0 + mov r3, #0 + bl ov21_021DFFA8 + cmp r0, #0 + beq _021DFA7E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DFA7E +_021DFA60: + add r1, r3, #0 + bl ov21_021DFACC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DFA7E +_021DFA6E: + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DFA7E +_021DFA7A: + mov r0, #1 + pop {r4, pc} +_021DFA7E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFA18 + + thumb_func_start ov21_021DFA84 +ov21_021DFA84: ; 0x021DFA84 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + add r5, r1, #0 + add r6, r3, #0 + add r4, r2, #0 + bl ov21_021DFB50 + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov21_021DFD1C + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021DFAE8 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021DFE0C + ldr r0, [r4, #0xc] + add r1, r5, #0 + str r0, [sp] + ldr r0, [r4, #0x14] + add r2, r4, #0 + str r0, [sp, #4] + add r0, r7, #0 + add r3, r6, #0 + bl ov21_021E08D0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFA84 + + thumb_func_start ov21_021DFACC +ov21_021DFACC: ; 0x021DFACC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E0BF8 + add r0, r5, #0 + bl ov21_021DFF18 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021DFDC8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFACC + + thumb_func_start ov21_021DFAE8 +ov21_021DFAE8: ; 0x021DFAE8 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x32 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFAE8 + + thumb_func_start ov21_021DFB50 +ov21_021DFB50: ; 0x021DFB50 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + add r6, r0, #0 + ldr r0, [r4, #4] + add r5, r1, #0 + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r4, #0xc] + add r1, r5, #0 + str r0, [sp] + ldr r0, [r4, #0x14] + add r2, r4, #0 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r3, r7, #0 + bl ov21_021DFBEC + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x14] + ldr r3, [r4, #0x10] + mov r2, #1 + bl ov21_021DF870 + ldr r1, [r4, #0xc] + add r2, r4, #0 + str r1, [sp] + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + add r3, r7, #0 + bl ov21_021DFBEC + mov r4, #0 + mov r6, #1 +_021DFBA0: + ldr r0, [r5, #0] + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021D2280 + add r4, r4, #1 + cmp r4, #4 + blt _021DFBA0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DFB50 + + thumb_func_start ov21_021DFBB4 +ov21_021DFBB4: ; 0x021DFBB4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + add r6, r1, #0 + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x14] + ldr r3, [r4, #0x10] + mov r2, #1 + bl ov21_021DF870 + ldr r1, [r4, #0xc] + add r2, r4, #0 + str r1, [sp] + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov21_021DFBEC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021DFBB4 + + thumb_func_start ov21_021DFBEC +ov21_021DFBEC: ; 0x021DFBEC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r5, [sp, #0x30] + add r6, r0, #0 + add r7, r1, #0 + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r4, [sp, #0x2c] + cmp r5, #2 + ble _021DFC04 + bl sub_02022974 +_021DFC04: + ldr r0, [sp, #0x28] + cmp r0, #0xc + bhi _021DFCF8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DFC16: ; jump table + .short _021DFC30 - _021DFC16 - 2 ; case 0 + .short _021DFC30 - _021DFC16 - 2 ; case 1 + .short _021DFC30 - _021DFC16 - 2 ; case 2 + .short _021DFC30 - _021DFC16 - 2 ; case 3 + .short _021DFC6C - _021DFC16 - 2 ; case 4 + .short _021DFC80 - _021DFC16 - 2 ; case 5 + .short _021DFC44 - _021DFC16 - 2 ; case 6 + .short _021DFC58 - _021DFC16 - 2 ; case 7 + .short _021DFC94 - _021DFC16 - 2 ; case 8 + .short _021DFCA8 - _021DFC16 - 2 ; case 9 + .short _021DFCBC - _021DFC16 - 2 ; case 10 + .short _021DFCD0 - _021DFC16 - 2 ; case 11 + .short _021DFCE4 - _021DFC16 - 2 ; case 12 +_021DFC30: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E0354 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFC44: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E03EC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFC58: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E0478 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFC6C: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E0504 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFC80: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E0590 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFC94: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E061C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFCA8: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E06A8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFCBC: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E072C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFCD0: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E07B8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFCE4: + ldr r2, [sp, #8] + str r4, [sp] + ldr r3, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + str r5, [sp, #4] + bl ov21_021E0844 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DFCF8: + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021DFBEC + + thumb_func_start ov21_021DFD00 +ov21_021DFD00: ; 0x021DFD00 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021DFD08: + ldr r0, [r5, #0] + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021D2280 + add r4, r4, #1 + cmp r4, #4 + blt _021DFD08 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFD00 + + thumb_func_start ov21_021DFD1C +ov21_021DFD1C: ; 0x021DFD1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021DFDB8 ; =0x0000372A + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x7a + bl sub_02009A4C + str r0, [r5, #0x10] + bl sub_0200A3DC + ldr r0, [r5, #0x10] + bl sub_02009D4C + ldr r0, _021DFDBC ; =0x000036C6 + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x16 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x14] + bl sub_0200A640 + ldr r0, [r5, #0x14] + bl sub_02009D4C + ldr r0, _021DFDC0 ; =0x0000372B + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x7b + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x18] + ldr r0, _021DFDC4 ; =0x00003729 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x79 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x1c] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DFDB8: .word 0x0000372A +_021DFDBC: .word 0x000036C6 +_021DFDC0: .word 0x0000372B +_021DFDC4: .word 0x00003729 + thumb_func_end ov21_021DFD1C + + thumb_func_start ov21_021DFDC8 +ov21_021DFDC8: ; 0x021DFDC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x14] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x10] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x14] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x18] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x1c] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021DFDC8 + + thumb_func_start ov21_021DFE0C +ov21_021DFE0C: ; 0x021DFE0C + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + add r5, r3, #0 + ldr r4, [r1, #0] + ldr r3, _021DFF14 ; =0x00003729 + add r6, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #3 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + str r2, [sp, #0x2c] + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x58 + sub r2, #0x63 + add r3, r3, #2 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r4, #0 + str r0, [sp, #0x38] + add r0, sp, #0x58 + str r0, [sp, #0x3c] + mov r0, #0x20 + str r0, [sp, #0x4c] + mov r0, #1 + str r5, [sp, #0x54] + str r0, [sp, #0x50] + str r4, [sp, #0x40] + str r4, [sp, #0x44] + add r5, r6, #0 + mov r7, #0x1f +_021DFE7A: + add r0, r4, #0 + add r1, sp, #0x34 + add r2, sp, #0x30 + bl ov21_021E0B24 + ldr r0, [sp, #0x34] + lsl r0, r0, #0xc + str r0, [sp, #0x40] + ldr r0, [sp, #0x30] + add r0, #8 + lsl r0, r0, #0xc + str r0, [sp, #0x44] + add r0, sp, #0x38 + bl sub_02021B90 + str r0, [r5, #0] + lsr r1, r4, #0x1f + lsl r0, r4, #0x1f + sub r0, r0, r1 + ror r0, r7 + add r0, r1, r0 + ldr r0, [r5, #0] + bne _021DFEB0 + mov r1, #0 + bl sub_02021D6C + b _021DFEB6 +_021DFEB0: + mov r1, #2 + bl sub_02021D6C +_021DFEB6: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021DFE7A + mov r0, #0x3e + lsl r0, r0, #0xe + str r0, [sp, #0x40] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x44] + mov r0, #0 + str r0, [sp, #0x4c] + add r0, sp, #0x38 + bl sub_02021B90 + add r1, r6, #0 + add r1, #0xbc + str r0, [r1, #0] + add r0, r6, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021D6C + add r0, r6, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CC8 + add r0, r6, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021E80 + ldr r0, [sp, #0x2c] + ldr r0, [r0, #0x10] + cmp r0, #1 + bgt _021DFF10 + add r6, #0xbc + ldr r0, [r6, #0] + mov r1, #0 + bl sub_02021CAC +_021DFF10: + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DFF14: .word 0x00003729 + thumb_func_end ov21_021DFE0C + + thumb_func_start ov21_021DFF18 +ov21_021DFF18: ; 0x021DFF18 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021DFF20: + ldr r0, [r5, #0] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021DFF20 + add r6, #0xbc + ldr r0, [r6, #0] + bl sub_02021BD4 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021DFF18 + + thumb_func_start ov21_021DFF38 +ov21_021DFF38: ; 0x021DFF38 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021DFFF8 + ldr r0, [r4, #8] + bl ov21_021E2A54 + cmp r0, #0 + beq _021DFF9E + cmp r6, #0 + beq _021DFF7A + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + b _021DFF9E +_021DFF7A: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021DFF9E: + add r0, r5, #0 + bl ov21_021E0078 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021DFF38 + + thumb_func_start ov21_021DFFA8 +ov21_021DFFA8: ; 0x021DFFA8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021DFFC8 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021DFFD2 +_021DFFC8: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021DFFD2: + add r4, r0, #0 + cmp r4, #1 + bne _021DFFEC + cmp r6, #1 + bne _021DFFE4 + add r0, r7, #0 + bl ov21_021E0038 + b _021DFFF2 +_021DFFE4: + add r0, r5, #0 + bl ov21_021DFD00 + b _021DFFF2 +_021DFFEC: + add r0, r5, #0 + bl ov21_021E0078 +_021DFFF2: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFFA8 + + thumb_func_start ov21_021DFFF8 +ov21_021DFFF8: ; 0x021DFFF8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + mov r7, #1 +_021E0002: + ldr r0, [r4, #0] + add r1, r7, #0 + bl sub_02021FE0 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _021E0002 + add r0, r5, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021FE0 + mov r4, #0 + mov r6, #1 +_021E0022: + ldr r0, [r5, #0x20] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E0022 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021DFFF8 + + thumb_func_start ov21_021E0038 +ov21_021E0038: ; 0x021E0038 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_021E0042: + ldr r0, [r4, #0] + add r1, r7, #0 + bl sub_02021FE0 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _021E0042 + add r0, r5, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021FE0 + mov r4, #0 + add r6, r4, #0 +_021E0062: + ldr r0, [r5, #0x20] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E0062 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0038 + + thumb_func_start ov21_021E0078 +ov21_021E0078: ; 0x021E0078 + push {r4, r5, r6, lr} + mov r6, #0x5b + add r5, r0, #0 + mov r4, #0 + lsl r6, r6, #2 +_021E0082: + ldr r0, [r5, #0] + add r2, r4, #0 + add r1, r0, r6 + bl ov21_021D251C + add r4, r4, #1 + cmp r4, #4 + blt _021E0082 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E0078 + + thumb_func_start ov21_021E0094 +ov21_021E0094: ; 0x021E0094 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0xff + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + mvn r7, r7 +_021E00A0: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #0 + str r4, [sp] + bl ov21_021E00F4 + add r4, r4, #1 + cmp r4, #4 + blt _021E00A0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0094 + + thumb_func_start ov21_021E00B8 +ov21_021E00B8: ; 0x021E00B8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #4] + cmp r0, #0 + bne _021E00C8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E00C8: + mov r4, #0 +_021E00CA: + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021E015C + add r4, r4, #1 + add r7, r0, #0 + cmp r4, #4 + blt _021E00CA + mov r4, #0 +_021E00DE: + ldr r0, [r5, #0x20] + ldr r0, [r0, #0] + bl sub_02012938 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E00DE + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E00B8 + + thumb_func_start ov21_021E00F4 +ov21_021E00F4: ; 0x021E00F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r6, r0, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + add r7, r1, #0 + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r5, [sp, #0x38] + cmp r0, #0 + bne _021E010E + add r4, r5, #0 + b _021E0114 +_021E010E: + sub r4, r5, #2 + bpl _021E0114 + add r4, r4, #4 +_021E0114: + add r0, r5, #0 + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov21_021E0B24 + ldr r0, [r7, #0] + add r1, sp, #0x1c + add r2, sp, #0x18 + add r3, r4, #0 + bl ov21_021D2250 + add r1, r6, #0 + ldr r3, [sp, #0x10] + ldr r2, [sp, #0x14] + mov r0, #0x10 + str r3, [sp] + str r0, [sp, #4] + ldr r4, [sp, #0xc] + add r1, #0x28 + lsl r0, r5, #5 + add r0, r1, r0 + ldr r1, [sp, #8] + add r3, r3, r4 + add r1, r2, r1 + bl ov21_021D2648 + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x10] + sub r1, r1, r0 + lsl r0, r5, #2 + add r0, r6, r0 + add r0, #0xa8 + str r1, [r0, #0] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E00F4 + + thumb_func_start ov21_021E015C +ov21_021E015C: ; 0x021E015C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + add r4, r2, #0 + str r1, [sp] + str r2, [sp, #4] + cmp r0, #0 + beq _021E0176 + sub r4, r4, #2 + bpl _021E0176 + add r4, r4, #4 +_021E0176: + ldr r0, [sp, #4] + add r7, r5, #0 + lsl r6, r0, #5 + add r7, #0x28 + add r0, r7, r6 + bl ov21_021D2664 + str r0, [sp, #8] + add r0, r5, #0 + str r0, [sp, #0xc] + add r0, #0x2c + str r0, [sp, #0xc] + ldr r2, [sp, #0xc] + ldr r0, [sp] + ldr r3, [r2, r6] + ldr r2, [sp, #4] + ldr r0, [r0, #0] + lsl r2, r2, #2 + add r2, r5, r2 + add r2, #0xa8 + ldr r2, [r2, #0] + ldr r1, [r7, r6] + add r2, r3, r2 + add r3, r4, #0 + bl ov21_021D222C + ldr r0, [r7, r6] + add r1, sp, #0x10 + lsl r0, r0, #0xc + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + ldr r0, [r0, r6] + add r0, #8 + lsl r0, r0, #0xc + str r0, [sp, #0x14] + lsl r0, r4, #2 + ldr r0, [r5, r0] + bl sub_02021C50 + ldr r0, [sp, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E015C + + thumb_func_start ov21_021E01CC +ov21_021E01CC: ; 0x021E01CC + push {r3, lr} + ldr r2, _021E0264 ; =0x000001A6 + cmp r0, r2 + bgt _021E020A + bge _021E023E + add r3, r2, #0 + sub r3, #0x24 + cmp r0, r3 + bgt _021E01EA + sub r2, #0x24 + cmp r0, r2 + bge _021E024E + cmp r0, #0xc9 + beq _021E023A + b _021E025E +_021E01EA: + add r3, r2, #0 + sub r3, #9 + cmp r0, r3 + bgt _021E025E + add r3, r2, #0 + sub r3, #0xa + cmp r0, r3 + blt _021E025E + add r3, r2, #0 + sub r3, #0xa + cmp r0, r3 + beq _021E0246 + sub r2, #9 + cmp r0, r2 + beq _021E024A + b _021E025E +_021E020A: + add r3, r2, #0 + add r3, #0x39 + cmp r0, r3 + bgt _021E0222 + add r3, r2, #0 + add r3, #0x39 + cmp r0, r3 + bge _021E025A + add r2, r2, #1 + cmp r0, r2 + beq _021E0242 + b _021E025E +_021E0222: + add r3, r2, #0 + add r3, #0x41 + cmp r0, r3 + bgt _021E0232 + add r2, #0x41 + cmp r0, r2 + beq _021E0256 + b _021E025E +_021E0232: + add r2, #0x46 + cmp r0, r2 + beq _021E0252 + b _021E025E +_021E023A: + mov r0, #8 + pop {r3, pc} +_021E023E: + mov r0, #4 + pop {r3, pc} +_021E0242: + mov r0, #5 + pop {r3, pc} +_021E0246: + mov r0, #6 + pop {r3, pc} +_021E024A: + mov r0, #7 + pop {r3, pc} +_021E024E: + mov r0, #9 + pop {r3, pc} +_021E0252: + mov r0, #0xa + pop {r3, pc} +_021E0256: + mov r0, #0xb + pop {r3, pc} +_021E025A: + mov r0, #0xc + pop {r3, pc} +_021E025E: + bl ov21_021E02F0 + pop {r3, pc} + ; .align 2, 0 +_021E0264: .word 0x000001A6 + thumb_func_end ov21_021E01CC + + thumb_func_start ov21_021E0268 +ov21_021E0268: ; 0x021E0268 + push {r3, lr} + add r2, r0, #0 + ldr r0, _021E02EC ; =0x000001A6 + cmp r2, r0 + bgt _021E02A8 + bge _021E02D6 + add r3, r0, #0 + sub r3, #0x24 + cmp r2, r3 + bgt _021E0288 + sub r0, #0x24 + cmp r2, r0 + bge _021E02D6 + cmp r2, #0xc9 + beq _021E02D6 + b _021E02E0 +_021E0288: + add r3, r0, #0 + sub r3, #9 + cmp r2, r3 + bgt _021E02E0 + add r3, r0, #0 + sub r3, #0xa + cmp r2, r3 + blt _021E02E0 + add r3, r0, #0 + sub r3, #0xa + cmp r2, r3 + beq _021E02D6 + sub r0, #9 + cmp r2, r0 + beq _021E02D6 + b _021E02E0 +_021E02A8: + add r3, r0, #0 + add r3, #0x39 + cmp r2, r3 + bgt _021E02C0 + add r3, r0, #0 + add r3, #0x39 + cmp r2, r3 + bge _021E02D6 + add r0, r0, #1 + cmp r2, r0 + beq _021E02D6 + b _021E02E0 +_021E02C0: + add r3, r0, #0 + add r3, #0x41 + cmp r2, r3 + bgt _021E02D0 + add r0, #0x41 + cmp r2, r0 + beq _021E02D6 + b _021E02E0 +_021E02D0: + add r0, #0x46 + cmp r2, r0 + bne _021E02E0 +_021E02D6: + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D341C + pop {r3, pc} +_021E02E0: + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D33E0 + pop {r3, pc} + nop +_021E02EC: .word 0x000001A6 + thumb_func_end ov21_021E0268 + + thumb_func_start ov21_021E02F0 +ov21_021E02F0: ; 0x021E02F0 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x12 + add r5, r0, #0 + bl sub_020759F0 + cmp r0, #0 + bne _021E0304 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E0304: + cmp r0, #0xfe + bne _021E030C + mov r0, #2 + pop {r3, r4, r5, pc} +_021E030C: + cmp r0, #0xff + bne _021E0314 + mov r0, #3 + pop {r3, r4, r5, pc} +_021E0314: + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov21_021D33E0 + cmp r0, #1 + bne _021E0350 + ldr r0, [r4, #4] + add r1, r5, #0 + mov r2, #0 + bl ov21_021D334C + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _021E0338 + bl sub_02022974 +_021E0338: + cmp r4, #0 + bne _021E0340 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E0340: + cmp r4, #0xfe + bne _021E0348 + mov r0, #2 + pop {r3, r4, r5, pc} +_021E0348: + cmp r4, #0xff + bne _021E0350 + mov r0, #3 + pop {r3, r4, r5, pc} +_021E0350: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E02F0 + + thumb_func_start ov21_021E0354 +ov21_021E0354: ; 0x021E0354 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + ldr r4, [sp, #0x34] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x18 + add r2, sp, #0x14 + str r3, [sp, #0x10] + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E037A + add r0, r4, #0 + b _021E0380 +_021E037A: + sub r0, r4, #2 + bpl _021E0380 + add r0, r0, #4 +_021E0380: + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x10] + str r1, [sp] + ldr r1, [sp, #0x14] + mov r3, #2 + str r1, [sp, #4] + ldr r1, [sp, #0x30] + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + bl ov21_021D19D8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E03A6 + bl sub_02022974 +_021E03A6: + add r0, r4, #1 + add r1, sp, #0x18 + add r2, sp, #0x14 + bl ov21_021E0B24 + add r5, #0xb8 + ldr r1, [r5, #0] + add r0, r4, #1 + cmp r1, #0 + beq _021E03C0 + sub r0, r0, #2 + bpl _021E03C0 + add r0, r0, #4 +_021E03C0: + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x10] + str r1, [sp] + ldr r1, [sp, #0x14] + mov r3, #0 + str r1, [sp, #4] + ldr r1, [sp, #0x30] + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + bl ov21_021D19D8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E03E6 + bl sub_02022974 +_021E03E6: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0354 + + thumb_func_start ov21_021E03EC +ov21_021E03EC: ; 0x021E03EC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E0410 + add r1, r4, #0 + b _021E0416 +_021E0410: + sub r1, r4, #2 + bpl _021E0416 + add r1, r1, #4 +_021E0416: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1B08 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0438 + bl sub_02022974 +_021E0438: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E0452 + sub r1, r1, #2 + bpl _021E0452 + add r1, r1, #4 +_021E0452: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1B08 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0474 + bl sub_02022974 +_021E0474: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E03EC + + thumb_func_start ov21_021E0478 +ov21_021E0478: ; 0x021E0478 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E049C + add r1, r4, #0 + b _021E04A2 +_021E049C: + sub r1, r4, #2 + bpl _021E04A2 + add r1, r1, #4 +_021E04A2: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1B4C + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E04C4 + bl sub_02022974 +_021E04C4: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E04DE + sub r1, r1, #2 + bpl _021E04DE + add r1, r1, #4 +_021E04DE: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1B4C + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0500 + bl sub_02022974 +_021E0500: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E0478 + + thumb_func_start ov21_021E0504 +ov21_021E0504: ; 0x021E0504 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E0528 + add r1, r4, #0 + b _021E052E +_021E0528: + sub r1, r4, #2 + bpl _021E052E + add r1, r1, #4 +_021E052E: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1A78 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0550 + bl sub_02022974 +_021E0550: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E056A + sub r1, r1, #2 + bpl _021E056A + add r1, r1, #4 +_021E056A: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1A78 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E058C + bl sub_02022974 +_021E058C: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E0504 + + thumb_func_start ov21_021E0590 +ov21_021E0590: ; 0x021E0590 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E05B4 + add r1, r4, #0 + b _021E05BA +_021E05B4: + sub r1, r4, #2 + bpl _021E05BA + add r1, r1, #4 +_021E05BA: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1AC0 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E05DC + bl sub_02022974 +_021E05DC: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E05F6 + sub r1, r1, #2 + bpl _021E05F6 + add r1, r1, #4 +_021E05F6: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1AC0 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0618 + bl sub_02022974 +_021E0618: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E0590 + + thumb_func_start ov21_021E061C +ov21_021E061C: ; 0x021E061C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E0640 + add r1, r4, #0 + b _021E0646 +_021E0640: + sub r1, r4, #2 + bpl _021E0646 + add r1, r1, #4 +_021E0646: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1A34 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0668 + bl sub_02022974 +_021E0668: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E0682 + sub r1, r1, #2 + bpl _021E0682 + add r1, r1, #4 +_021E0682: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1A34 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E06A4 + bl sub_02022974 +_021E06A4: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E061C + + thumb_func_start ov21_021E06A8 +ov21_021E06A8: ; 0x021E06A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E06CC + add r1, r4, #0 + b _021E06D2 +_021E06CC: + sub r1, r4, #2 + bpl _021E06D2 + add r1, r1, #4 +_021E06D2: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1B94 + cmp r0, #0xf + bne _021E06F0 + bl sub_02022974 +_021E06F0: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E070A + sub r1, r1, #2 + bpl _021E070A + add r1, r1, #4 +_021E070A: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1B94 + cmp r0, #0xf + bne _021E0728 + bl sub_02022974 +_021E0728: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E06A8 + + thumb_func_start ov21_021E072C +ov21_021E072C: ; 0x021E072C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E0750 + add r1, r4, #0 + b _021E0756 +_021E0750: + sub r1, r4, #2 + bpl _021E0756 + add r1, r1, #4 +_021E0756: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1BD8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0778 + bl sub_02022974 +_021E0778: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E0792 + sub r1, r1, #2 + bpl _021E0792 + add r1, r1, #4 +_021E0792: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1BD8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E07B4 + bl sub_02022974 +_021E07B4: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E072C + + thumb_func_start ov21_021E07B8 +ov21_021E07B8: ; 0x021E07B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E07DC + add r1, r4, #0 + b _021E07E2 +_021E07DC: + sub r1, r4, #2 + bpl _021E07E2 + add r1, r1, #4 +_021E07E2: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1C30 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0804 + bl sub_02022974 +_021E0804: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E081E + sub r1, r1, #2 + bpl _021E081E + add r1, r1, #4 +_021E081E: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1C30 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0840 + bl sub_02022974 +_021E0840: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E07B8 + + thumb_func_start ov21_021E0844 +ov21_021E0844: ; 0x021E0844 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x2c] + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, r4, #0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021E0868 + add r1, r4, #0 + b _021E086E +_021E0868: + sub r1, r4, #2 + bpl _021E086E + add r1, r1, #4 +_021E086E: + ldr r0, [sp, #0xc] + mov r2, #2 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1C88 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E0890 + bl sub_02022974 +_021E0890: + add r0, r4, #1 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov21_021E0B24 + add r5, #0xb8 + ldr r0, [r5, #0] + add r1, r4, #1 + cmp r0, #0 + beq _021E08AA + sub r1, r1, #2 + bpl _021E08AA + add r1, r1, #4 +_021E08AA: + ldr r0, [sp, #0xc] + mov r2, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r6, #0] + ldr r1, [r7, #4] + ldr r3, [sp, #0x10] + bl ov21_021D1C88 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021E08CC + bl sub_02022974 +_021E08CC: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E0844 + + thumb_func_start ov21_021E08D0 +ov21_021E08D0: ; 0x021E08D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + add r1, r5, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + add r4, r2, #0 + add r7, r3, #0 + mov r0, #0 + cmp r1, #0 + beq _021E08EE + sub r0, r0, #2 + bpl _021E08EE + add r0, r0, #4 +_021E08EE: + ldr r1, [sp, #0x28] + add r2, r4, #0 + str r1, [sp] + ldr r1, [sp, #0x2c] + add r3, r7, #0 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E09A4 + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x2c] + ldr r3, [r4, #0x10] + mov r2, #1 + bl ov21_021DF870 + add r2, r5, #0 + add r2, #0xb8 + ldr r2, [r2, #0] + mov r1, #2 + cmp r2, #0 + beq _021E0926 + sub r1, r1, #2 + bpl _021E0926 + add r1, r1, #4 +_021E0926: + ldr r2, [sp, #0x28] + add r3, r7, #0 + str r2, [sp] + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov21_021E09A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E08D0 + + thumb_func_start ov21_021E0944 +ov21_021E0944: ; 0x021E0944 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r2, #0 + add r5, r0, #0 + str r1, [sp, #0x10] + str r3, [sp, #0x14] + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x34] + ldr r3, [r6, #0x10] + mov r2, #1 + bl ov21_021DF870 + str r0, [sp, #0x18] + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + mov r4, #2 + cmp r0, #0 + beq _021E0970 + sub r4, r4, #2 + bpl _021E0970 + add r4, r4, #4 +_021E0970: + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r7, r2, r1 + lsl r0, r7, #2 + add r0, r5, r0 + ldr r0, [r0, #0x20] + bl ov21_021D4D1C + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x10] + str r0, [sp] + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x14] + str r0, [sp, #4] + str r4, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + str r7, [sp, #0xc] + bl ov21_021E09A4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E0944 + + thumb_func_start ov21_021E09A4 +ov21_021E09A4: ; 0x021E09A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + ldr r0, [sp, #0x58] + add r6, r1, #0 + lsl r7, r0, #2 + ldr r0, [r5, r7] + str r2, [sp] + str r3, [sp, #4] + ldr r4, [r6, #0] + cmp r0, #0 + bne _021E09C0 + bl sub_02022974 +_021E09C0: + ldr r1, [sp] + ldr r2, [sp, #0x50] + ldr r3, [sp, #0x54] + add r0, r6, #0 + bl ov21_021E0B64 + str r0, [sp, #8] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0x14] + bl sub_0200A72C + mov r1, #0xb + mvn r1, r1 + str r1, [sp, #0x20] + mov r1, #0x28 + str r1, [sp, #0x24] + mov r1, #3 + str r1, [sp, #0x28] + mov r1, #0 + ldr r2, [sp, #4] + str r1, [sp, #0x2c] + mov r1, #1 + str r0, [sp, #0x18] + str r1, [sp, #0x30] + str r2, [sp, #0x34] + bl sub_0201FAB4 + str r0, [sp, #0xc] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x10 + mov r2, #2 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E0A48 ; =0x000002B9 + ldr r3, [sp, #8] + add r1, r6, #0 + bl ov21_021D4E10 + str r6, [sp, #0x14] + ldr r0, [r5, r7] + add r5, #0x20 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x5c] + lsl r4, r0, #2 + add r0, sp, #0x10 + bl ov21_021D4CA0 + str r0, [r5, r4] + ldr r0, [r5, r4] + ldr r1, [sp, #0xc] + ldr r0, [r0, #0] + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E0A48: .word 0x000002B9 + thumb_func_end ov21_021E09A4 + + thumb_func_start ov21_021E0A4C +ov21_021E0A4C: ; 0x021E0A4C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r0, [r5, #4] + add r6, r2, #0 + bl ov21_021D37BC + add r1, r0, #0 + ldr r0, [r5, #4] + add r2, r6, #0 + bl ov21_021D334C + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _021E0A70 + bl sub_02022974 +_021E0A70: + cmp r5, #0 + beq _021E0A7A + cmp r5, #1 + beq _021E0A7E + b _021E0A82 +_021E0A7A: + mov r4, #0xd + b _021E0A86 +_021E0A7E: + mov r4, #0xe + b _021E0A86 +_021E0A82: + bl sub_02022974 +_021E0A86: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0A4C + + thumb_func_start ov21_021E0A8C +ov21_021E0A8C: ; 0x021E0A8C + mov r0, #0xd + bx lr + thumb_func_end ov21_021E0A8C + + thumb_func_start ov21_021E0A90 +ov21_021E0A90: ; 0x021E0A90 + mov r0, #0xe + bx lr + thumb_func_end ov21_021E0A90 + + thumb_func_start ov21_021E0A94 +ov21_021E0A94: ; 0x021E0A94 + mov r0, #0x15 + bx lr + thumb_func_end ov21_021E0A94 + + thumb_func_start ov21_021E0A98 +ov21_021E0A98: ; 0x021E0A98 + push {r3, lr} + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D33A4 + add r0, #0x11 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0A98 + + thumb_func_start ov21_021E0AA8 +ov21_021E0AA8: ; 0x021E0AA8 + push {r3, lr} + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D33BC + add r0, #0x11 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0AA8 + + thumb_func_start ov21_021E0AB8 +ov21_021E0AB8: ; 0x021E0AB8 + push {r3, lr} + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D3374 + add r0, #0xf + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0AB8 + + thumb_func_start ov21_021E0AC8 +ov21_021E0AC8: ; 0x021E0AC8 + push {r3, lr} + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D338C + add r0, #0xf + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0AC8 + + thumb_func_start ov21_021E0AD8 +ov21_021E0AD8: ; 0x021E0AD8 + mov r0, #0x14 + bx lr + thumb_func_end ov21_021E0AD8 + + thumb_func_start ov21_021E0ADC +ov21_021E0ADC: ; 0x021E0ADC + push {r3, lr} + ldr r0, [r1, #4] + add r1, r2, #0 + bl ov21_021D3404 + add r0, #0x6f + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0ADC + + thumb_func_start ov21_021E0AEC +ov21_021E0AEC: ; 0x021E0AEC + push {r3, lr} + ldr r0, [r1, #4] + mov r1, #0x7b + lsl r1, r1, #2 + bl ov21_021D3410 + add r0, #0x73 + pop {r3, pc} + thumb_func_end ov21_021E0AEC + + thumb_func_start ov21_021E0AFC +ov21_021E0AFC: ; 0x021E0AFC + push {r3, lr} + ldr r0, [r1, #4] + ldr r1, _021E0B0C ; =0x000001E7 + bl ov21_021D3410 + add r0, #0x75 + pop {r3, pc} + nop +_021E0B0C: .word 0x000001E7 + thumb_func_end ov21_021E0AFC + + thumb_func_start ov21_021E0B10 +ov21_021E0B10: ; 0x021E0B10 + push {r3, lr} + ldr r0, [r1, #4] + ldr r1, _021E0B20 ; =0x000001DF + bl ov21_021D3410 + add r0, #0x77 + pop {r3, pc} + nop +_021E0B20: .word 0x000001DF + thumb_func_end ov21_021E0B10 + + thumb_func_start ov21_021E0B24 +ov21_021E0B24: ; 0x021E0B24 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r6, r1, #0 + add r7, r2, #0 + add r5, r4, #0 + cmp r0, #3 + bhi _021E0B5A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E0B3E: ; jump table + .short _021E0B48 - _021E0B3E - 2 ; case 0 + .short _021E0B46 - _021E0B3E - 2 ; case 1 + .short _021E0B50 - _021E0B3E - 2 ; case 2 + .short _021E0B4E - _021E0B3E - 2 ; case 3 +_021E0B46: + mov r4, #0x68 +_021E0B48: + add r4, #0x4c + mov r5, #0x58 + b _021E0B5E +_021E0B4E: + mov r4, #0x68 +_021E0B50: + mov r0, #0x53 + lsl r0, r0, #2 + add r4, r4, r0 + mov r5, #0x58 + b _021E0B5E +_021E0B5A: + bl sub_02022974 +_021E0B5E: + str r4, [r6, #0] + str r5, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E0B24 + + thumb_func_start ov21_021E0B64 +ov21_021E0B64: ; 0x021E0B64 + push {r3, lr} + cmp r2, #0xc + bhi _021E0BF6 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021E0B76: ; jump table + .short _021E0B90 - _021E0B76 - 2 ; case 0 + .short _021E0B98 - _021E0B76 - 2 ; case 1 + .short _021E0BA0 - _021E0B76 - 2 ; case 2 + .short _021E0BA8 - _021E0B76 - 2 ; case 3 + .short _021E0BC0 - _021E0B76 - 2 ; case 4 + .short _021E0BC8 - _021E0B76 - 2 ; case 5 + .short _021E0BB0 - _021E0B76 - 2 ; case 6 + .short _021E0BB8 - _021E0B76 - 2 ; case 7 + .short _021E0BD0 - _021E0B76 - 2 ; case 8 + .short _021E0BD8 - _021E0B76 - 2 ; case 9 + .short _021E0BE0 - _021E0B76 - 2 ; case 10 + .short _021E0BE8 - _021E0B76 - 2 ; case 11 + .short _021E0BF0 - _021E0B76 - 2 ; case 12 +_021E0B90: + add r2, r3, #0 + bl ov21_021E0A4C + pop {r3, pc} +_021E0B98: + add r2, r3, #0 + bl ov21_021E0A8C + pop {r3, pc} +_021E0BA0: + add r2, r3, #0 + bl ov21_021E0A90 + pop {r3, pc} +_021E0BA8: + add r2, r3, #0 + bl ov21_021E0A94 + pop {r3, pc} +_021E0BB0: + add r2, r3, #0 + bl ov21_021E0A98 + pop {r3, pc} +_021E0BB8: + add r2, r3, #0 + bl ov21_021E0AA8 + pop {r3, pc} +_021E0BC0: + add r2, r3, #0 + bl ov21_021E0AB8 + pop {r3, pc} +_021E0BC8: + add r2, r3, #0 + bl ov21_021E0AC8 + pop {r3, pc} +_021E0BD0: + add r2, r3, #0 + bl ov21_021E0AD8 + pop {r3, pc} +_021E0BD8: + add r2, r3, #0 + bl ov21_021E0ADC + pop {r3, pc} +_021E0BE0: + add r2, r3, #0 + bl ov21_021E0AEC + pop {r3, pc} +_021E0BE8: + add r2, r3, #0 + bl ov21_021E0AFC + pop {r3, pc} +_021E0BF0: + add r2, r3, #0 + bl ov21_021E0B10 +_021E0BF6: + pop {r3, pc} + thumb_func_end ov21_021E0B64 + + thumb_func_start ov21_021E0BF8 +ov21_021E0BF8: ; 0x021E0BF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E0BFE: + ldr r0, [r5, #0x20] + bl ov21_021D4D1C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E0BFE + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0BF8 + + thumb_func_start ov21_021E0C10 +ov21_021E0C10: ; 0x021E0C10 + push {r4, lr} + add r4, r0, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02021CAC + add r0, r4, #0 + mov r1, #0x18 + add r0, #0xc0 + str r1, [r0, #0] + mov r0, #1 + add r4, #0xc4 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0C10 + + thumb_func_start ov21_021E0C30 +ov21_021E0C30: ; 0x021E0C30 + push {r4, lr} + add r4, r0, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021E0C66 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + cmp r0, #0 + bgt _021E0C66 + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0 + add r4, #0xc4 + str r0, [r4, #0] +_021E0C66: + pop {r4, pc} + thumb_func_end ov21_021E0C30 \ No newline at end of file diff --git a/asm/ov21_021E0C68.s b/asm/ov21_021E0C68.s new file mode 100644 index 000000000..e74b7a6d0 --- /dev/null +++ b/asm/ov21_021E0C68.s @@ -0,0 +1,1720 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E0C68 +ov21_021E0C68: ; 0x021E0C68 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + bl ov21_021E0D04 + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021E0D40 + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0x20] + bl ov21_021E0D90 + str r0, [r5, #0x24] + ldr r0, _021E0CA8 ; =ov21_021E0D94 + str r0, [r5, #8] + ldr r0, _021E0CAC ; =ov21_021E0D98 + str r0, [r5, #0xc] + ldr r0, _021E0CB0 ; =ov21_021E0DA8 + str r0, [r5, #0x10] + ldr r0, _021E0CB4 ; =ov21_021E0DAC + str r0, [r5, #0x14] + ldr r0, _021E0CB8 ; =ov21_021E0E8C + str r0, [r5, #0x18] + ldr r0, _021E0CBC ; =ov21_021E0E90 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E0CA8: .word ov21_021E0D94 +_021E0CAC: .word ov21_021E0D98 +_021E0CB0: .word ov21_021E0DA8 +_021E0CB4: .word ov21_021E0DAC +_021E0CB8: .word ov21_021E0E8C +_021E0CBC: .word ov21_021E0E90 + thumb_func_end ov21_021E0C68 + + thumb_func_start ov21_021E0CC0 +ov21_021E0CC0: ; 0x021E0CC0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E0D68 + ldr r0, [r4, #4] + bl ov21_021E0D7C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0CC0 + + thumb_func_start ov21_021E0CD4 +ov21_021E0CD4: ; 0x021E0CD4 + ldr r0, [r0, #0] + str r1, [r0, #8] + str r2, [r0, #0xc] + bx lr + thumb_func_end ov21_021E0CD4 + + thumb_func_start ov21_021E0CDC +ov21_021E0CDC: ; 0x021E0CDC + ldr r0, [r0, #0] + str r1, [r0, #0x14] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E0CDC + + thumb_func_start ov21_021E0CE4 +ov21_021E0CE4: ; 0x021E0CE4 + mov r0, #0 + bx lr + thumb_func_end ov21_021E0CE4 + + thumb_func_start ov21_021E0CE8 +ov21_021E0CE8: ; 0x021E0CE8 + ldr r2, [r0, #0] + mov r0, #1 + cmp r1, #1 + bne _021E0CF4 + mov r1, #0 + add r0, r1, #0 +_021E0CF4: + str r1, [r2, #0x1c] + bx lr + thumb_func_end ov21_021E0CE8 + + thumb_func_start ov21_021E0CF8 +ov21_021E0CF8: ; 0x021E0CF8 + ldr r2, [r0, #0] + mov r0, #0 + str r1, [r2, #0x18] + str r0, [r2, #0x1c] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E0CF8 + + thumb_func_start ov21_021E0D04 +ov21_021E0D04: ; 0x021E0D04 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x20 + bl sub_02018144 + add r4, r0, #0 + bne _021E0D16 + bl sub_02022974 +_021E0D16: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0D04 + + thumb_func_start ov21_021E0D40 +ov21_021E0D40: ; 0x021E0D40 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E0D52 + bl sub_02022974 +_021E0D52: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E0D40 + + thumb_func_start ov21_021E0D68 +ov21_021E0D68: ; 0x021E0D68 + push {r4, lr} + add r4, r0, #0 + bne _021E0D72 + bl sub_02022974 +_021E0D72: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0D68 + + thumb_func_start ov21_021E0D7C +ov21_021E0D7C: ; 0x021E0D7C + push {r4, lr} + add r4, r0, #0 + bne _021E0D86 + bl sub_02022974 +_021E0D86: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0D7C + + thumb_func_start ov21_021E0D90 +ov21_021E0D90: ; 0x021E0D90 + mov r0, #0 + bx lr + thumb_func_end ov21_021E0D90 + + thumb_func_start ov21_021E0D94 +ov21_021E0D94: ; 0x021E0D94 + mov r0, #1 + bx lr + thumb_func_end ov21_021E0D94 + + thumb_func_start ov21_021E0D98 +ov21_021E0D98: ; 0x021E0D98 + ldr r0, [r0, #0xc] + cmp r0, #1 + bne _021E0DA2 + mov r0, #1 + bx lr +_021E0DA2: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E0D98 + + thumb_func_start ov21_021E0DA8 +ov21_021E0DA8: ; 0x021E0DA8 + mov r0, #1 + bx lr + thumb_func_end ov21_021E0DA8 + + thumb_func_start ov21_021E0DAC +ov21_021E0DAC: ; 0x021E0DAC + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r5, [r4, #8] + cmp r0, #3 + bhi _021E0E82 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E0DC8: ; jump table + .short _021E0DD0 - _021E0DC8 - 2 ; case 0 + .short _021E0DEA - _021E0DC8 - 2 ; case 1 + .short _021E0E34 - _021E0DC8 - 2 ; case 2 + .short _021E0E78 - _021E0DC8 - 2 ; case 3 +_021E0DD0: + ldr r0, [r4, #4] + mov r1, #0x58 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x58 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0E82 +_021E0DEA: + ldr r3, [r4, #4] + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E0F4C + ldr r0, [r7, #0x14] + cmp r0, #0 + beq _021E0E04 + cmp r0, #1 + beq _021E0E12 + cmp r0, #2 + beq _021E0E20 + b _021E0E2C +_021E0E04: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E15AC + b _021E0E2C +_021E0E12: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E14D4 + b _021E0E2C +_021E0E20: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E16A8 +_021E0E2C: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0E82 +_021E0E34: + ldr r0, [r7, #0x14] + cmp r0, #0 + beq _021E0E44 + cmp r0, #1 + beq _021E0E52 + cmp r0, #2 + beq _021E0E60 + b _021E0E6C +_021E0E44: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021E1630 + add r1, r0, #0 + b _021E0E6C +_021E0E52: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021E1550 + add r1, r0, #0 + b _021E0E6C +_021E0E60: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021E1730 + add r1, r0, #0 +_021E0E6C: + cmp r1, #0 + beq _021E0E82 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0E82 +_021E0E78: + ldr r0, _021E0E88 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E0E82: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E0E88: .word 0x04000050 + thumb_func_end ov21_021E0DAC + + thumb_func_start ov21_021E0E8C +ov21_021E0E8C: ; 0x021E0E8C + mov r0, #0 + bx lr + thumb_func_end ov21_021E0E8C + + thumb_func_start ov21_021E0E90 +ov21_021E0E90: ; 0x021E0E90 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r5, [r4, #0] + add r3, r0, #0 + add r1, r2, #0 + ldr r0, [r4, #8] + cmp r5, #4 + bhi _021E0F46 + add r5, r5, r5 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_021E0EAC: ; jump table + .short _021E0EB6 - _021E0EAC - 2 ; case 0 + .short _021E0EEA - _021E0EAC - 2 ; case 1 + .short _021E0F28 - _021E0EAC - 2 ; case 2 + .short _021E0F36 - _021E0EAC - 2 ; case 3 + .short _021E0F42 - _021E0EAC - 2 ; case 4 +_021E0EB6: + ldr r1, [r1, #0x14] + cmp r1, #0 + beq _021E0EC6 + cmp r1, #1 + beq _021E0ED0 + cmp r1, #2 + beq _021E0EDA + b _021E0EE2 +_021E0EC6: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E15AC + b _021E0EE2 +_021E0ED0: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E14D4 + b _021E0EE2 +_021E0EDA: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E16A8 +_021E0EE2: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0F46 +_021E0EEA: + ldr r1, [r1, #0x14] + cmp r1, #0 + beq _021E0EFA + cmp r1, #1 + beq _021E0F06 + cmp r1, #2 + beq _021E0F12 + b _021E0F1C +_021E0EFA: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E1630 + add r2, r0, #0 + b _021E0F1C +_021E0F06: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E1550 + add r2, r0, #0 + b _021E0F1C +_021E0F12: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E1730 + add r2, r0, #0 +_021E0F1C: + cmp r2, #0 + beq _021E0F46 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0F46 +_021E0F28: + add r1, r3, #0 + bl ov21_021E0F94 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0F46 +_021E0F36: + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E0F46 +_021E0F42: + mov r0, #1 + pop {r3, r4, r5, pc} +_021E0F46: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0E90 + + thumb_func_start ov21_021E0F4C +ov21_021E0F4C: ; 0x021E0F4C + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E11DC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E1228 + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov21_021E127C + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov21_021E136C + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E0FBC + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E10D0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0F4C + + thumb_func_start ov21_021E0F94 +ov21_021E0F94: ; 0x021E0F94 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl ov21_021E14BC + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E1328 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E0F94 + + thumb_func_start ov21_021E0FBC +ov21_021E0FBC: ; 0x021E0FBC + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x32 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x33 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r1, #3 + str r1, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r3, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x37 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r6, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #0x10 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x38 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r4, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #8 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E0FBC + + thumb_func_start ov21_021E10D0 +ov21_021E10D0: ; 0x021E10D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r4, r1, #0 + str r2, [sp, #0x10] + mov r0, #0x40 + add r1, r2, #0 + bl sub_02023790 + str r0, [sp, #0x18] + ldr r2, _021E1180 ; =0x000002B9 + ldr r3, [sp, #0x10] + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + str r0, [sp, #0x14] + ldr r0, [r4, #4] + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37CC + cmp r0, #2 + beq _021E110A + mov r7, #0 + bl sub_02022974 +_021E110A: + ldr r0, [r4, #0x18] + bl ov21_021E185C + add r1, r0, #0 + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x18] + bl sub_0200B1B8 + mov r0, #0 + ldr r1, [sp, #0x18] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #0x48 + str r0, [sp] + mov r1, #0 + lsr r6, r3, #0x1f + add r6, r3, r6 + ldr r0, _021E1184 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + ldr r2, [sp, #0x18] + asr r6, r6, #1 + mov r3, #0xb0 + add r0, r0, #4 + sub r3, r3, r6 + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_0200B190 + ldr r0, [r4, #0x1c] + ldr r1, [sp, #0x10] + str r0, [sp] + ldr r3, [r4, #0x18] + add r0, r5, #0 + add r2, r7, #0 + bl ov21_021E1188 + ldr r1, [sp, #0x10] + ldr r3, [r4, #0x18] + add r0, r5, #0 + add r2, r7, #0 + bl ov21_021E18A0 + ldr r1, [sp, #0x10] + ldr r3, [r4, #0x18] + add r0, r5, #0 + add r2, r7, #0 + bl ov21_021E18DC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E1180: .word 0x000002B9 +_021E1184: .word 0x00020100 + thumb_func_end ov21_021E10D0 + + thumb_func_start ov21_021E1188 +ov21_021E1188: ; 0x021E1188 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r1, #0 + add r0, r2, #0 + add r1, r3, #0 + ldr r2, [sp, #0x20] + add r3, r4, #0 + bl ov21_021D56BC + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002EB4 + cmp r0, #0xf0 + bhs _021E11B4 + lsr r1, r0, #1 + mov r0, #0x80 + sub r3, r0, r1 + b _021E11B6 +_021E11B4: + mov r3, #8 +_021E11B6: + mov r0, #0x88 + str r0, [sp] + mov r1, #0 + ldr r0, _021E11D8 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + add r0, r4, #0 + bl ov21_021D5600 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E11D8: .word 0x00020100 + thumb_func_end ov21_021E1188 + + thumb_func_start ov21_021E11DC +ov21_021E11DC: ; 0x021E11DC + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + add r6, r2, #0 + bl ov21_021D375C + add r3, r0, #0 + mov r0, #0x2b + lsl r0, r0, #0xe + str r0, [sp] + mov r0, #2 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #4] + add r2, r6, #0 + bl ov21_021D1778 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D238C + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E11DC + + thumb_func_start ov21_021E1210 +ov21_021E1210: ; 0x021E1210 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov21_021D23C0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov21_021D2360 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1210 + + thumb_func_start ov21_021E1228 +ov21_021E1228: ; 0x021E1228 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov21_021D2170 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r2, r0, #0 + mov r0, #0x30 + str r0, [sp] + mov r0, #0x48 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #4] + mov r3, #2 + bl ov21_021D1890 + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E1228 + + thumb_func_start ov21_021E1260 +ov21_021E1260: ; 0x021E1260 + push {r4, lr} + ldr r0, [r0, #0] + bl ov21_021D2170 + add r4, r0, #0 + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + add r0, r4, #0 + bl sub_02008780 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1260 + + thumb_func_start ov21_021E127C +ov21_021E127C: ; 0x021E127C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E1318 ; =0x00000FFA + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x5a + bl sub_02009A4C + str r0, [r5, #8] + bl sub_0200A3DC + ldr r0, [r5, #8] + bl sub_02009D4C + ldr r0, _021E131C ; =0x00000FAD + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xd + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0xc] + bl sub_0200A640 + ldr r0, [r5, #0xc] + bl sub_02009D4C + ldr r0, _021E1320 ; =0x00000FF8 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x58 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x10] + ldr r0, _021E1324 ; =0x00000FF9 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x59 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x14] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E1318: .word 0x00000FFA +_021E131C: .word 0x00000FAD +_021E1320: .word 0x00000FF8 +_021E1324: .word 0x00000FF9 + thumb_func_end ov21_021E127C + + thumb_func_start ov21_021E1328 +ov21_021E1328: ; 0x021E1328 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0xc] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #8] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0xc] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x10] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x14] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E1328 + + thumb_func_start ov21_021E136C +ov21_021E136C: ; 0x021E136C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xa0 + add r6, r0, #0 + add r0, r2, #0 + add r5, r1, #0 + ldr r0, [r0, #4] + str r2, [sp, #0x2c] + add r7, r3, #0 + ldr r4, [r5, #0] + bl ov21_021D37BC + ldr r3, _021E145C ; =0x00000FF9 + str r0, [sp, #0x30] + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #5 + str r2, [sp, #0x10] + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x7c + sub r2, #0x4c + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x5c] + add r0, sp, #0x7c + str r0, [sp, #0x60] + mov r0, #0x20 + str r0, [sp, #0x70] + mov r0, #1 + str r0, [sp, #0x74] + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [sp, #0x64] + mov r0, #0xd + lsl r0, r0, #0xe + str r0, [sp, #0x68] + add r0, sp, #0x5c + str r7, [sp, #0x78] + bl sub_02021B90 + mov r1, #0x11 + str r0, [r6, #0] + bl sub_02021D6C + ldr r0, [sp, #0x2c] + ldr r0, [r0, #4] + bl ov21_021D37CC + cmp r0, #2 + beq _021E1404 + mov r0, #0 + str r0, [sp, #0x30] +_021E1404: + ldr r1, [sp, #0x30] + add r0, r5, #0 + add r2, r7, #0 + bl ov21_021E1460 + add r4, r0, #0 + ldr r0, [r5, #0] + mov r1, #1 + bl ov21_021D2344 + mov r1, #0x15 + ldr r2, [r5, #0] + lsl r1, r1, #4 + ldr r1, [r2, r1] + str r1, [sp, #0x34] + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #0x3c] + ldr r0, [r6, #0] + str r0, [sp, #0x40] + mov r0, #0x4d + mvn r0, r0 + str r0, [sp, #0x44] + add r0, #0x46 + str r0, [sp, #0x48] + mov r0, #0 + str r0, [sp, #0x4c] + mov r0, #0x1f + str r0, [sp, #0x50] + mov r0, #1 + str r0, [sp, #0x54] + str r7, [sp, #0x58] + str r4, [sp, #0x38] + add r0, sp, #0x34 + bl ov21_021D4CA0 + str r0, [r6, #4] + add r0, r4, #0 + bl ov21_021D4DA0 + add sp, #0xa0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E145C: .word 0x00000FF9 + thumb_func_end ov21_021E136C + + thumb_func_start ov21_021E1460 +ov21_021E1460: ; 0x021E1460 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x15 + ldr r1, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r7, r2, #0 + mov r1, #0x12 + mov r2, #2 + bl ov21_021D4D6C + add r4, r0, #0 + add r0, r6, #0 + mov r1, #2 + add r2, r7, #0 + bl ov21_021D566C + add r6, r0, #0 + mov r0, #2 + add r1, r6, #0 + mov r2, #0 + bl sub_02002D7C + cmp r0, #0x88 + bhs _021E149C + mov r1, #0x88 + sub r0, r1, r0 + lsr r3, r0, #1 + b _021E149E +_021E149C: + mov r3, #0 +_021E149E: + mov r0, #0 + str r0, [sp] + mov r0, #0x15 + ldr r1, [r5, #0] + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021D4E80 + add r0, r6, #0 + bl ov21_021D5600 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E1460 + + thumb_func_start ov21_021E14BC +ov21_021E14BC: ; 0x021E14BC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #4] + bl ov21_021D4D1C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E14BC + + thumb_func_start ov21_021E14D4 +ov21_021E14D4: ; 0x021E14D4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #1 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021D2360 + add r0, r7, #0 + bl ov21_021E17AC + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E1546 + cmp r6, #0 + beq _021E1522 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + b _021E1546 +_021E1522: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E1546: + add r0, r5, #0 + bl ov21_021E17DC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E14D4 + + thumb_func_start ov21_021E1550 +ov21_021E1550: ; 0x021E1550 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r2, #0x10] + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021E1570 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021E157A +_021E1570: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021E157A: + add r4, r0, #0 + cmp r4, #1 + bne _021E15A2 + cmp r6, #1 + bne _021E1594 + add r0, r7, #0 + bl ov21_021E17C4 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D2360 + b _021E15A8 +_021E1594: + add r0, r5, #0 + bl ov21_021E1260 + add r0, r5, #0 + bl ov21_021E1210 + b _021E15A8 +_021E15A2: + add r0, r5, #0 + bl ov21_021E17DC +_021E15A8: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E1550 + + thumb_func_start ov21_021E15AC +ov21_021E15AC: ; 0x021E15AC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021E17AC + cmp r6, #0 + bne _021E15D2 + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + add r0, r7, #0 + mov r3, #4 + bl ov21_021E17EC + add r0, r7, #0 + bl ov21_021E1824 +_021E15D2: + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E162C + cmp r6, #0 + beq _021E1608 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E1608: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E162C: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E15AC + + thumb_func_start ov21_021E1630 +ov21_021E1630: ; 0x021E1630 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bne _021E1650 + bl ov21_021E1808 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E1840 + str r0, [sp, #4] + b _021E1656 +_021E1650: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] +_021E1656: + ldr r0, [r6, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r4, #0] + beq _021E1670 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #8] + b _021E167C +_021E1670: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC + str r0, [sp, #8] +_021E167C: + mov r1, #0 + add r2, sp, #0 +_021E1680: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021E168E + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #3 + blt _021E1680 +_021E168E: + cmp r1, #3 + bne _021E16A2 + cmp r7, #1 + bne _021E169C + add r0, r5, #0 + bl ov21_021E17C4 +_021E169C: + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021E16A2: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E1630 + + thumb_func_start ov21_021E16A8 +ov21_021E16A8: ; 0x021E16A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov21_021E17AC + ldr r0, [r5, #0] + mov r1, #1 + bl ov21_021D2360 + cmp r6, #0 + bne _021E16D0 + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + add r0, r7, #0 + mov r3, #1 + bl ov21_021E17EC +_021E16D0: + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E172A + cmp r6, #0 + beq _021E1706 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E1706: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E172A: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E16A8 + + thumb_func_start ov21_021E1730 +ov21_021E1730: ; 0x021E1730 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bne _021E1746 + bl ov21_021E1808 + str r0, [sp] + b _021E174A +_021E1746: + mov r0, #1 + str r0, [sp] +_021E174A: + ldr r0, [r4, #0x10] + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021E1764 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #4] + b _021E1770 +_021E1764: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC + str r0, [sp, #4] +_021E1770: + mov r1, #0 + add r2, sp, #0 +_021E1774: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021E1782 + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #2 + blt _021E1774 +_021E1782: + cmp r1, #2 + bne _021E17A6 + cmp r6, #1 + bne _021E179A + add r0, r7, #0 + bl ov21_021E17C4 + ldr r0, [r5, #0] + mov r1, #0 + bl ov21_021D2360 + b _021E17A0 +_021E179A: + add r0, r5, #0 + bl ov21_021E1210 +_021E17A0: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E17A6: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E1730 + + thumb_func_start ov21_021E17AC +ov21_021E17AC: ; 0x021E17AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #4] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r4, pc} + thumb_func_end ov21_021E17AC + + thumb_func_start ov21_021E17C4 +ov21_021E17C4: ; 0x021E17C4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r4, #4] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r4, pc} + thumb_func_end ov21_021E17C4 + + thumb_func_start ov21_021E17DC +ov21_021E17DC: ; 0x021E17DC + mov r1, #0x5b + ldr r0, [r0, #0] + lsl r1, r1, #2 + ldr r3, _021E17E8 ; =ov21_021D24FC + add r1, r0, r1 + bx r3 + ; .align 2, 0 +_021E17E8: .word ov21_021D24FC + thumb_func_end ov21_021E17DC + + thumb_func_start ov21_021E17EC +ov21_021E17EC: ; 0x021E17EC + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + str r2, [sp] + str r3, [sp, #4] + add r0, #0x18 + mov r1, #0x30 + add r2, r4, #0 + mov r3, #0x48 + bl ov21_021D2648 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E17EC + + thumb_func_start ov21_021E1808 +ov21_021E1808: ; 0x021E1808 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x18 + bl ov21_021D2664 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r5, #0x18] + ldr r2, [r5, #0x1c] + bl ov21_021D2164 + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E1808 + + thumb_func_start ov21_021E1824 +ov21_021E1824: ; 0x021E1824 + push {r3, lr} + sub sp, #8 + mov r1, #0x52 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + add r0, #0x38 + mov r1, #0xac + mov r2, #0xaa + mov r3, #0x20 + bl ov21_021D2648 + add sp, #8 + pop {r3, pc} + thumb_func_end ov21_021E1824 + + thumb_func_start ov21_021E1840 +ov21_021E1840: ; 0x021E1840 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x38 + bl ov21_021D2664 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r5, #0x38] + ldr r2, [r5, #0x3c] + bl ov21_021D1848 + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E1840 + + thumb_func_start ov21_021E185C +ov21_021E185C: ; 0x021E185C + push {r4, lr} + cmp r0, #7 + bhi _021E1896 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E186E: ; jump table + .short _021E1896 - _021E186E - 2 ; case 0 + .short _021E187E - _021E186E - 2 ; case 1 + .short _021E1882 - _021E186E - 2 ; case 2 + .short _021E1886 - _021E186E - 2 ; case 3 + .short _021E188A - _021E186E - 2 ; case 4 + .short _021E188E - _021E186E - 2 ; case 5 + .short _021E1896 - _021E186E - 2 ; case 6 + .short _021E1892 - _021E186E - 2 ; case 7 +_021E187E: + mov r4, #0x7d + b _021E189A +_021E1882: + mov r4, #0x16 + b _021E189A +_021E1886: + mov r4, #0x17 + b _021E189A +_021E188A: + mov r4, #0x19 + b _021E189A +_021E188E: + mov r4, #0x18 + b _021E189A +_021E1892: + mov r4, #0x1a + b _021E189A +_021E1896: + bl sub_02022974 +_021E189A: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E185C + + thumb_func_start ov21_021E18A0 +ov21_021E18A0: ; 0x021E18A0 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r2, #0 + add r1, r3, #0 + add r2, r4, #0 + bl ov21_021D561C + add r4, r0, #0 + mov r0, #0x60 + str r0, [sp] + mov r1, #0 + ldr r0, _021E18D8 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + mov r3, #0x78 + bl sub_0201D78C + add r0, r4, #0 + bl ov21_021D5600 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E18D8: .word 0x00020100 + thumb_func_end ov21_021E18A0 + + thumb_func_start ov21_021E18DC +ov21_021E18DC: ; 0x021E18DC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r2, #0 + add r1, r3, #0 + add r2, r4, #0 + bl ov21_021D566C + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xf0 + sub r3, r1, r0 + mov r0, #0x70 + str r0, [sp] + mov r1, #0 + ldr r0, _021E1920 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + add r0, r4, #0 + bl ov21_021D5600 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E1920: .word 0x00020100 + thumb_func_end ov21_021E18DC \ No newline at end of file diff --git a/asm/ov21_021E1924.s b/asm/ov21_021E1924.s new file mode 100644 index 000000000..2c5e4b284 --- /dev/null +++ b/asm/ov21_021E1924.s @@ -0,0 +1,2212 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E1924 +ov21_021E1924: ; 0x021E1924 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E199C + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E19FC + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E1A24 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E1ACC + str r0, [r5, #0x24] + ldr r0, _021E196C ; =ov21_021E1AD0 + str r0, [r5, #8] + ldr r0, _021E1970 ; =ov21_021E1B14 + str r0, [r5, #0xc] + ldr r0, _021E1974 ; =ov21_021E1B54 + str r0, [r5, #0x10] + ldr r0, _021E1978 ; =ov21_021E1B68 + str r0, [r5, #0x14] + ldr r0, _021E197C ; =ov21_021E1BFC + str r0, [r5, #0x18] + ldr r0, _021E1980 ; =ov21_021E1CB8 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E196C: .word ov21_021E1AD0 +_021E1970: .word ov21_021E1B14 +_021E1974: .word ov21_021E1B54 +_021E1978: .word ov21_021E1B68 +_021E197C: .word ov21_021E1BFC +_021E1980: .word ov21_021E1CB8 + thumb_func_end ov21_021E1924 + + thumb_func_start ov21_021E1984 +ov21_021E1984: ; 0x021E1984 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E1A7C + ldr r0, [r4, #0] + bl ov21_021E1A90 + ldr r0, [r4, #0x20] + bl ov21_021E1AA4 + pop {r4, pc} + thumb_func_end ov21_021E1984 + + thumb_func_start ov21_021E199C +ov21_021E199C: ; 0x021E199C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bne _021E19AE + bl sub_02022974 +_021E19AE: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021E19B4: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E19B4 + add r0, r5, #0 + bl ov21_021D13A0 + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1430 + str r0, [r4, #0x14] + add r0, r5, #0 + mov r1, #2 + bl ov21_021D1410 + ldr r0, [r0, #0] + mov r1, #3 + str r0, [r4, #8] + add r0, r5, #0 + bl ov21_021D1410 + str r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #4 + bl ov21_021D1410 + str r0, [r4, #0x10] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E199C + + thumb_func_start ov21_021E19FC +ov21_021E19FC: ; 0x021E19FC + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E1A0E + bl sub_02022974 +_021E1A0E: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E19FC + + thumb_func_start ov21_021E1A24 +ov21_021E1A24: ; 0x021E1A24 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021E1ACC + add r7, r0, #0 + mov r1, #0x14 + mul r7, r1 + add r0, r5, #0 + add r1, r7, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021E1A44 + bl sub_02022974 +_021E1A44: + add r0, r4, #0 + mov r1, #0 + add r2, r7, #0 + bl sub_020D5124 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #1 + bl ov21_021D4A94 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x14 + add r2, r6, #0 + mov r3, #2 + bl ov21_021D4BB4 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x28 + add r2, r6, #0 + mov r3, #4 + bl ov21_021D4AF8 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1A24 + + thumb_func_start ov21_021E1A7C +ov21_021E1A7C: ; 0x021E1A7C + push {r4, lr} + add r4, r0, #0 + bne _021E1A86 + bl sub_02022974 +_021E1A86: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1A7C + + thumb_func_start ov21_021E1A90 +ov21_021E1A90: ; 0x021E1A90 + push {r4, lr} + add r4, r0, #0 + bne _021E1A9A + bl sub_02022974 +_021E1A9A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1A90 + + thumb_func_start ov21_021E1AA4 +ov21_021E1AA4: ; 0x021E1AA4 + push {r4, lr} + add r4, r0, #0 + bne _021E1AAE + bl sub_02022974 +_021E1AAE: + add r0, r4, #0 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x14 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x28 + bl ov21_021D4660 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov21_021E1AA4 + + thumb_func_start ov21_021E1ACC +ov21_021E1ACC: ; 0x021E1ACC + mov r0, #3 + bx lr + thumb_func_end ov21_021E1ACC + + thumb_func_start ov21_021E1AD0 +ov21_021E1AD0: ; 0x021E1AD0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + mov r1, #0x3c + bl sub_02018144 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020D5124 + mov r1, #0 + add r2, r4, #0 + mov r0, #4 +_021E1AEE: + add r1, r1, #1 + str r0, [r2, #0x14] + add r2, r2, #4 + cmp r1, #8 + blt _021E1AEE + mov r0, #0 + str r0, [r4, #0x10] + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E1D40 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E2968 + str r4, [r5, #8] + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E1AD0 + + thumb_func_start ov21_021E1B14 +ov21_021E1B14: ; 0x021E1B14 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021E1B24 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E1B24: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021E1B2E + mov r0, #0 + pop {r3, r4, r5, pc} +_021E1B2E: + ldr r0, [r5, #0x14] + bl ov21_021E33AC + cmp r0, #0 + beq _021E1B4E + add r0, r4, #0 + bl ov21_021E28A8 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E1E00 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E2864 +_021E1B4E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1B14 + + thumb_func_start ov21_021E1B54 +ov21_021E1B54: ; 0x021E1B54 + push {r4, lr} + ldr r4, [r0, #8] + add r0, r4, #0 + bl ov21_021E1E74 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021E1B54 + + thumb_func_start ov21_021E1B68 +ov21_021E1B68: ; 0x021E1B68 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + str r2, [sp] + ldr r7, [r3, #8] + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021E1BF6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E1B86: ; jump table + .short _021E1B8E - _021E1B86 - 2 ; case 0 + .short _021E1BA8 - _021E1B86 - 2 ; case 1 + .short _021E1BCE - _021E1B86 - 2 ; case 2 + .short _021E1BE4 - _021E1B86 - 2 ; case 3 +_021E1B8E: + ldr r0, [r4, #4] + mov r1, #0xc4 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0xc4 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1BF6 +_021E1BA8: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E2014 + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021E28D0 + ldr r2, [sp] + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E25F8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1BF6 +_021E1BCE: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E2664 + cmp r0, #0 + beq _021E1BF6 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1BF6 +_021E1BE4: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D25AC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E1BF6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1B68 + + thumb_func_start ov21_021E1BFC +ov21_021E1BFC: ; 0x021E1BFC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + str r0, [sp, #0x1c] + add r0, r1, #0 + ldr r0, [r0, #8] + ldr r6, [r3, #8] + str r0, [sp, #0x28] + add r0, #0xc0 + str r1, [sp, #0x20] + ldr r1, [r0, #0] + ldr r0, [r6, #0x38] + cmp r1, r0 + beq _021E1C26 + ldr r0, [sp, #0x28] + add r1, r6, #0 + bl ov21_021E28D0 + ldr r0, [sp, #0x28] + ldr r1, [r6, #0x38] + add r0, #0xc0 + str r1, [r0, #0] +_021E1C26: + mov r0, #0 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + ldr r7, [sp, #0x28] + str r0, [sp, #0x24] + add r0, #0xa0 + ldr r5, [sp, #0x28] + str r0, [sp, #0x24] + add r7, #0x80 + add r4, r6, #0 +_021E1C3A: + ldr r0, [sp, #0x2c] + cmp r0, #0 + bne _021E1C44 + mov r1, #4 + b _021E1C46 +_021E1C44: + mov r1, #5 +_021E1C46: + mov r0, #5 + mvn r0, r0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [sp, #0x20] + str r7, [sp, #8] + ldr r0, [r0, #4] + str r0, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + ldr r1, [r5, #0] + ldr r2, [r5, #0x20] + ldr r3, [r4, #0x14] + bl ov21_021E26A0 + ldr r0, [r5, #0x50] + ldr r1, [r4, #0x14] + bl ov21_021D144C + ldr r0, [sp, #0x24] + add r7, r7, #4 + add r0, r0, #4 + str r0, [sp, #0x24] + ldr r0, [sp, #0x2c] + add r4, r4, #4 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0x2c] + cmp r0, #1 + ble _021E1C3A + ldr r0, [sp, #0x28] + mov r4, #2 + add r0, #8 + add r6, #8 + str r0, [sp, #0x28] +_021E1C96: + ldr r0, [sp, #0x28] + ldr r1, [r6, #0x14] + ldr r0, [r0, #0] + add r2, r4, #0 + bl ov21_021E29A4 + ldr r0, [sp, #0x28] + add r4, r4, #1 + add r0, r0, #4 + add r6, r6, #4 + str r0, [sp, #0x28] + cmp r4, #8 + blt _021E1C96 + mov r0, #0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1BFC + + thumb_func_start ov21_021E1CB8 +ov21_021E1CB8: ; 0x021E1CB8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #4 + bhi _021E1D3A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E1CD4: ; jump table + .short _021E1CDE - _021E1CD4 - 2 ; case 0 + .short _021E1D00 - _021E1CD4 - 2 ; case 1 + .short _021E1D16 - _021E1CD4 - 2 ; case 2 + .short _021E1D28 - _021E1CD4 - 2 ; case 3 + .short _021E1D36 - _021E1CD4 - 2 ; case 4 +_021E1CDE: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + bl ov21_021D25AC + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021E25F8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1D3A +_021E1D00: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #0 + bl ov21_021E2664 + cmp r0, #0 + beq _021E1D3A + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1D3A +_021E1D16: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E2044 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1D3A +_021E1D28: + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E1D3A +_021E1D36: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E1D3A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1CB8 + + thumb_func_start ov21_021E1D40 +ov21_021E1D40: ; 0x021E1D40 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #0x20 + bl sub_02018144 + str r0, [r5, #4] + mov r0, #0xd0 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x70 + mov r2, #0x98 + mov r3, #0x30 + bl ov21_021D154C + mov r0, #0xd0 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x38 + add r0, r0, #4 + mov r2, #0x60 + mov r3, #0x30 + bl ov21_021D154C + mov r0, #0x30 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #8 + mov r2, #0xc0 + mov r3, #8 + bl ov21_021D154C + mov r0, #0x58 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #0xc + mov r2, #0xc0 + mov r3, #0x30 + bl ov21_021D154C + mov r0, #0x80 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #0x10 + mov r2, #0xc0 + mov r3, #0x58 + bl ov21_021D154C + mov r0, #0xa8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #0x14 + mov r2, #0xc0 + mov r3, #0x80 + bl ov21_021D154C + mov r0, #0xd0 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #0x18 + mov r2, #0xc0 + mov r3, #0xa8 + bl ov21_021D154C + mov r0, #0xf8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0xa0 + add r0, #0x1c + mov r2, #0xc0 + mov r3, #0xd0 + bl ov21_021D154C + str r4, [r5, #8] + str r5, [r5, #0xc] + str r6, [sp] + add r3, r5, #0 + ldr r0, [r5, #4] + ldr r2, _021E1DFC ; =ov21_021E1E8C + mov r1, #8 + add r3, #8 + bl sub_02023FCC + str r0, [r5, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E1DFC: .word ov21_021E1E8C + thumb_func_end ov21_021E1D40 + + thumb_func_start ov21_021E1E00 +ov21_021E1E00: ; 0x021E1E00 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + add r2, r4, #0 + mov r0, #3 +_021E1E0A: + add r1, r1, #1 + str r0, [r2, #0x14] + add r2, r2, #4 + cmp r1, #8 + blt _021E1E0A + ldr r0, [r4, #0] + bl sub_0202404C + ldr r0, [r4, #0x10] + cmp r0, #5 + bhi _021E1E5A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E1E2C: ; jump table + .short _021E1E38 - _021E1E2C - 2 ; case 0 + .short _021E1E3E - _021E1E2C - 2 ; case 1 + .short _021E1E44 - _021E1E2C - 2 ; case 2 + .short _021E1E4A - _021E1E2C - 2 ; case 3 + .short _021E1E50 - _021E1E2C - 2 ; case 4 + .short _021E1E56 - _021E1E2C - 2 ; case 5 +_021E1E38: + mov r0, #1 + str r0, [r4, #0x1c] + b _021E1E5A +_021E1E3E: + mov r0, #1 + str r0, [r4, #0x20] + b _021E1E5A +_021E1E44: + mov r0, #1 + str r0, [r4, #0x24] + b _021E1E5A +_021E1E4A: + mov r0, #1 + str r0, [r4, #0x28] + b _021E1E5A +_021E1E50: + mov r0, #1 + str r0, [r4, #0x2c] + b _021E1E5A +_021E1E56: + mov r0, #1 + str r0, [r4, #0x30] +_021E1E5A: + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _021E1E66 + cmp r0, #1 + beq _021E1E6C + pop {r4, pc} +_021E1E66: + mov r0, #2 + str r0, [r4, #0x14] + pop {r4, pc} +_021E1E6C: + mov r0, #2 + str r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1E00 + + thumb_func_start ov21_021E1E74 +ov21_021E1E74: ; 0x021E1E74 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E1E74 + + thumb_func_start ov21_021E1E8C +ov21_021E1E8C: ; 0x021E1E8C + push {r3, r4, r5, lr} + ldr r4, [r2, #4] + ldr r5, [r2, #0] + lsl r2, r0, #2 + add r2, r4, r2 + str r1, [r2, #0x14] + cmp r1, #2 + bne _021E1F06 + cmp r0, #7 + bhi _021E1F06 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E1EAC: ; jump table + .short _021E1EBC - _021E1EAC - 2 ; case 0 + .short _021E1EC2 - _021E1EAC - 2 ; case 1 + .short _021E1EC8 - _021E1EAC - 2 ; case 2 + .short _021E1EFE - _021E1EAC - 2 ; case 3 + .short _021E1F36 - _021E1EAC - 2 ; case 4 + .short _021E1F6C - _021E1EAC - 2 ; case 5 + .short _021E1FA2 - _021E1EAC - 2 ; case 6 + .short _021E1FD8 - _021E1EAC - 2 ; case 7 +_021E1EBC: + mov r0, #0 + str r0, [r4, #0x34] + pop {r3, r4, r5, pc} +_021E1EC2: + mov r0, #1 + str r0, [r4, #0x34] + pop {r3, r4, r5, pc} +_021E1EC8: + ldr r0, [r4, #0x38] + mov r1, #1 + tst r0, r1 + beq _021E1F06 + ldr r0, [r4, #0x10] + cmp r0, #0 + ldr r0, [r5, #8] + bne _021E1EDE + bl ov21_021DE6D4 + b _021E1EE6 +_021E1EDE: + mov r1, #0 + bl ov21_021DE6D8 + mov r0, #1 +_021E1EE6: + cmp r0, #0 + beq _021E1F06 + ldr r2, [r4, #0x10] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #0 + bl ov21_021E27C0 + ldr r0, _021E2010 ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021E1EFE: + ldr r1, [r4, #0x38] + mov r0, #2 + tst r0, r1 + bne _021E1F08 +_021E1F06: + b _021E200C +_021E1F08: + ldr r0, [r4, #0x10] + cmp r0, #1 + ldr r0, [r5, #0x10] + bne _021E1F16 + bl ov21_021E0CE4 + b _021E1F1E +_021E1F16: + mov r1, #0 + bl ov21_021E0CE8 + mov r0, #1 +_021E1F1E: + cmp r0, #0 + beq _021E200C + ldr r2, [r4, #0x10] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E27C0 + ldr r0, _021E2010 ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021E1F36: + ldr r1, [r4, #0x38] + mov r0, #4 + tst r0, r1 + beq _021E200C + ldr r0, [r4, #0x10] + cmp r0, #2 + ldr r0, [r5, #0x10] + bne _021E1F4C + bl ov21_021E0CE4 + b _021E1F54 +_021E1F4C: + mov r1, #0 + bl ov21_021E0CE8 + mov r0, #1 +_021E1F54: + cmp r0, #0 + beq _021E200C + ldr r2, [r4, #0x10] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #2 + bl ov21_021E27C0 + ldr r0, _021E2010 ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021E1F6C: + ldr r1, [r4, #0x38] + mov r0, #8 + tst r0, r1 + beq _021E200C + ldr r0, [r4, #0x10] + cmp r0, #3 + ldr r0, [r5, #0x10] + bne _021E1F82 + bl ov21_021E0CE4 + b _021E1F8A +_021E1F82: + mov r1, #0 + bl ov21_021E0CE8 + mov r0, #1 +_021E1F8A: + cmp r0, #0 + beq _021E200C + ldr r2, [r4, #0x10] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #3 + bl ov21_021E27C0 + ldr r0, _021E2010 ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021E1FA2: + ldr r1, [r4, #0x38] + mov r0, #0x10 + tst r0, r1 + beq _021E200C + ldr r0, [r4, #0x10] + cmp r0, #4 + ldr r0, [r5, #0x10] + bne _021E1FB8 + bl ov21_021E0CE4 + b _021E1FC0 +_021E1FB8: + mov r1, #0 + bl ov21_021E0CE8 + mov r0, #1 +_021E1FC0: + cmp r0, #0 + beq _021E200C + ldr r2, [r4, #0x10] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #4 + bl ov21_021E27C0 + ldr r0, _021E2010 ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, pc} +_021E1FD8: + ldr r1, [r4, #0x38] + mov r0, #0x20 + tst r0, r1 + beq _021E200C + ldr r0, [r4, #0x10] + cmp r0, #5 + ldr r0, [r5, #0x10] + bne _021E1FEE + bl ov21_021E0CE4 + b _021E1FF6 +_021E1FEE: + mov r1, #0 + bl ov21_021E0CE8 + mov r0, #1 +_021E1FF6: + cmp r0, #0 + beq _021E200C + ldr r2, [r4, #0x10] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #5 + bl ov21_021E27C0 + ldr r0, _021E2010 ; =0x0000068B + bl sub_02005748 +_021E200C: + pop {r3, r4, r5, pc} + nop +_021E2010: .word 0x0000068B + thumb_func_end ov21_021E1E8C + + thumb_func_start ov21_021E2014 +ov21_021E2014: ; 0x021E2014 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E20A4 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E2180 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E22C8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E2478 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E2014 + + thumb_func_start ov21_021E2044 +ov21_021E2044: ; 0x021E2044 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x20 + add r6, r2, #0 + str r0, [sp] + add r4, r1, #0 + str r6, [sp, #4] + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #4 + mov r3, #0x80 + bl ov21_021D276C + mov r0, #0x20 + str r0, [sp] + str r6, [sp, #4] + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #4 + mov r3, #0xa0 + bl ov21_021D276C + add r0, r5, #0 + bl ov21_021E2458 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E256C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E226C + mov r4, #0 +_021E208A: + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021E2098 + bl sub_020181C4 +_021E2098: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021E208A + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E2044 + + thumb_func_start ov21_021E20A4 +ov21_021E20A4: ; 0x021E20A4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x22 + mov r3, #6 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x3e + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x3c + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r6, r0, #0 + mov r1, #6 + ldr r2, [sp, #0x10] + mov r0, #0xe + str r0, [sp] + ldrh r0, [r2] + add r3, r1, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x3f + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + add r4, r0, #0 + mov r1, #6 + ldr r2, [sp, #0x10] + mov r0, #7 + str r0, [sp] + ldrh r0, [r2] + add r3, r1, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E20A4 + + thumb_func_start ov21_021E2180 +ov21_021E2180: ; 0x021E2180 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E2254 ; =0x000013EE + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x66 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #0x40] + bl sub_0200A3DC + ldr r0, [r5, #0x40] + bl sub_02009D4C + ldr r0, _021E2258 ; =0x000013EC + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x64 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x48] + ldr r0, _021E225C ; =0x000013ED + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x65 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x4c] + ldr r0, _021E2260 ; =0x000013EB + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x63 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #0x70] + bl sub_0200A3DC + ldr r0, [r5, #0x70] + bl sub_02009D4C + ldr r0, _021E2264 ; =0x000013E9 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x61 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x78] + ldr r0, _021E2268 ; =0x000013EA + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x62 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x7c] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021E2254: .word 0x000013EE +_021E2258: .word 0x000013EC +_021E225C: .word 0x000013ED +_021E2260: .word 0x000013EB +_021E2264: .word 0x000013E9 +_021E2268: .word 0x000013EA + thumb_func_end ov21_021E2180 + + thumb_func_start ov21_021E226C +ov21_021E226C: ; 0x021E226C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x40] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x40] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x48] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x4c] + bl sub_02009D68 + ldr r0, [r5, #0x70] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x70] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x78] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x7c] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E226C + + thumb_func_start ov21_021E22C8 +ov21_021E22C8: ; 0x021E22C8 + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + ldr r4, [r1, #0] + ldr r3, _021E2444 ; =0x000013ED + add r7, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + add r5, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r2, _021E2448 ; =0x0000083F + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x50 + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x21 + str r0, [sp, #0x30] + add r0, sp, #0x50 + str r0, [sp, #0x34] + mov r0, #0x1f + str r0, [sp, #0x44] + mov r0, #2 + str r0, [sp, #0x48] + lsl r0, r0, #0x12 + str r0, [sp, #0x38] + mov r0, #3 + lsl r1, r1, #0xe + lsl r0, r0, #0x12 + str r1, [sp, #0x3c] + add r0, r1, r0 + str r0, [sp, #0x3c] + add r0, sp, #0x30 + str r5, [sp, #0x4c] + bl sub_02021B90 + mov r1, #0 + str r0, [r7, #0] + bl sub_02021D6C + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x38] + mov r1, #0x13 + mov r0, #3 + lsl r1, r1, #0xe + lsl r0, r0, #0x12 + str r1, [sp, #0x3c] + add r0, r1, r0 + str r0, [sp, #0x3c] + add r0, sp, #0x30 + bl sub_02021B90 + mov r1, #0 + str r0, [r7, #4] + bl sub_02021D6C + ldr r3, _021E244C ; =0x000013EA + mov r0, #0 + mov r2, #5 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r1, #2 + lsl r2, r2, #6 + str r1, [sp, #0x10] + ldr r1, [r4, r2] + str r1, [sp, #0x14] + add r1, r2, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r1, [r4, r1] + add r2, #0xc + str r1, [sp, #0x1c] + ldr r1, [r4, r2] + ldr r2, _021E2448 ; =0x0000083F + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x50 + sub r3, r3, #1 + bl sub_020093B4 + add r0, sp, #0x50 + str r0, [sp, #0x34] + mov r1, #0xb + mov r0, #3 + lsl r1, r1, #0x10 + lsl r0, r0, #0x12 + str r1, [sp, #0x3c] + add r0, r1, r0 + str r0, [sp, #0x3c] + mov r0, #0 + ldr r4, _021E2450 ; =0x021E9D80 + ldr r5, _021E2454 ; =0x021E9D98 + str r0, [sp, #0x2c] + add r6, r7, #0 +_021E23C6: + ldr r0, [r4, #0] + str r0, [sp, #0x38] + add r0, sp, #0x30 + bl sub_02021B90 + str r0, [r6, #8] + ldr r1, [r5, #0] + bl sub_02021D6C + ldr r0, [sp, #0x2c] + add r4, r4, #4 + add r0, r0, #1 + add r6, r6, #4 + add r5, r5, #4 + str r0, [sp, #0x2c] + cmp r0, #6 + blt _021E23C6 + mov r0, #0x1e + str r0, [sp, #0x44] + mov r0, #0xa + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + mov r1, #0x86 + mov r0, #3 + lsl r1, r1, #0xc + lsl r0, r0, #0x12 + str r1, [sp, #0x3c] + add r0, r1, r0 + str r0, [sp, #0x3c] + add r0, sp, #0x30 + bl sub_02021B90 + mov r1, #0xd + str r0, [r7, #0x50] + bl sub_02021D6C + mov r0, #6 + lsl r0, r0, #0x10 + mov r1, #0x4e + str r0, [sp, #0x38] + lsl r1, r1, #0xc + lsl r0, r0, #1 + str r1, [sp, #0x3c] + add r0, r1, r0 + str r0, [sp, #0x3c] + add r0, sp, #0x30 + bl sub_02021B90 + mov r1, #0xc + str r0, [r7, #0x54] + bl sub_02021D6C + mov r1, #2 + add r7, #8 + mov r0, #0 +_021E2434: + add r1, r1, #1 + str r0, [r7, #0x50] + add r7, r7, #4 + cmp r1, #8 + blt _021E2434 + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + nop +_021E2444: .word 0x000013ED +_021E2448: .word 0x0000083F +_021E244C: .word 0x000013EA +_021E2450: .word 0x021E9D80 +_021E2454: .word 0x021E9D98 + thumb_func_end ov21_021E22C8 + + thumb_func_start ov21_021E2458 +ov21_021E2458: ; 0x021E2458 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E245E: + ldr r0, [r5, #0] + bl sub_02021BD4 + ldr r0, [r5, #0x50] + cmp r0, #0 + beq _021E246E + bl sub_02021BD4 +_021E246E: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021E245E + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E2458 + + thumb_func_start ov21_021E2478 +ov21_021E2478: ; 0x021E2478 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r2, #0 + ldr r4, [r1, #0] + cmp r0, #0 + bne _021E248C + bl sub_02022974 +_021E248C: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021E2564 ; =0x0000083F + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #8] + mov r1, #0 + bl sub_0200A72C + mov r1, #5 + mvn r1, r1 + str r1, [sp, #0x1c] + mov r1, #2 + mov r2, #0 + str r0, [sp, #0x10] + str r1, [sp, #0x20] + str r2, [sp, #0x24] + str r1, [sp, #0x28] + str r6, [sp, #0x2c] + bl sub_0201FAB4 + add r7, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #8 + mov r2, #4 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E2568 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x21 + bl ov21_021D4DAC + str r6, [sp, #0xc] + ldr r0, [r5, #0] + str r0, [sp, #0x14] + mov r0, #0x1f + mvn r0, r0 + str r0, [sp, #0x18] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #0x20] + ldr r0, [r0, #0] + add r1, r7, #4 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #8 + mov r2, #4 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E2568 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x22 + bl ov21_021D4DAC + mov r1, #0x20 + sub r0, r1, r0 + str r6, [sp, #0xc] + str r0, [sp, #0x18] + ldr r0, [r5, #4] + str r0, [sp, #0x14] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #0x24] + ldr r0, [r0, #0] + add r1, r7, #4 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + mov r1, #2 + add r5, #8 + mov r0, #0 +_021E2556: + add r1, r1, #1 + str r0, [r5, #0x20] + add r5, r5, #4 + cmp r1, #8 + blt _021E2556 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E2564: .word 0x0000083F +_021E2568: .word 0x000002B9 + thumb_func_end ov21_021E2478 + + thumb_func_start ov21_021E256C +ov21_021E256C: ; 0x021E256C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E2572: + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _021E257C + bl ov21_021D4D1C +_021E257C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021E2572 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E256C + + thumb_func_start ov21_021E2588 +ov21_021E2588: ; 0x021E2588 + push {r3, r4, r5, r6, r7, lr} + mov r7, #1 + add r5, r0, #0 + mov r4, #0 + add r6, r7, #0 +_021E2592: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021FE0 + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _021E25A8 + ldr r0, [r0, #0] + add r1, r7, #0 + bl sub_02012AF0 +_021E25A8: + ldr r0, [r5, #0x50] + cmp r0, #0 + beq _021E25B4 + mov r1, #1 + bl sub_02021FE0 +_021E25B4: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021E2592 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2588 + + thumb_func_start ov21_021E25C0 +ov21_021E25C0: ; 0x021E25C0 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r7, r4, #0 + add r6, r4, #0 +_021E25CA: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021FE0 + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _021E25E0 + ldr r0, [r0, #0] + add r1, r7, #0 + bl sub_02012AF0 +_021E25E0: + ldr r0, [r5, #0x50] + cmp r0, #0 + beq _021E25EC + mov r1, #0 + bl sub_02021FE0 +_021E25EC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021E25CA + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E25C0 + + thumb_func_start ov21_021E25F8 +ov21_021E25F8: ; 0x021E25F8 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E2588 + ldr r0, [r4, #0x14] + bl ov21_021E33A4 + cmp r0, #0 + beq _021E2660 + cmp r6, #0 + beq _021E263C + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r2, [r5, #0] + lsl r0, r0, #4 + add r0, r2, r0 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E263C: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r3, [r5, #0] + lsl r0, r0, #4 + add r0, r3, r0 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E2660: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E25F8 + + thumb_func_start ov21_021E2664 +ov21_021E2664: ; 0x021E2664 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #0x14] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E33A4 + cmp r0, #0 + beq _021E2684 + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov21_021D2424 + b _021E268A +_021E2684: + mov r0, #2 + bl sub_0200AC1C +_021E268A: + cmp r0, #0 + beq _021E269C + cmp r4, #0 + beq _021E2698 + add r0, r6, #0 + bl ov21_021E25C0 +_021E2698: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E269C: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E2664 + + thumb_func_start ov21_021E26A0 +ov21_021E26A0: ; 0x021E26A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r1, #0 + add r1, r3, #0 + str r2, [sp, #0xc] + ldr r4, [sp, #0x30] + ldr r6, [sp, #0x40] + mov r5, #0 + bl ov21_021D144C + ldr r0, [sp, #0x3c] + ldr r1, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #8] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x38] + bl ov21_021E274C + ldr r0, [sp, #8] + bl sub_02021E74 + cmp r0, #3 + bhi _021E2712 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E26DE: ; jump table + .short _021E26E6 - _021E26DE - 2 ; case 0 + .short _021E26E6 - _021E26DE - 2 ; case 1 + .short _021E26F6 - _021E26DE - 2 ; case 2 + .short _021E2704 - _021E26DE - 2 ; case 3 +_021E26E6: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021E2712 + mov r0, #0 + mov r5, #1 + mov r7, #9 + str r0, [r4, #0] + b _021E2712 +_021E26F6: + ldr r0, [r4, #0] + cmp r0, #1 + beq _021E2712 + mov r5, #1 + mov r7, #0xa + str r5, [r4, #0] + b _021E2712 +_021E2704: + ldr r0, [r4, #0] + cmp r0, #2 + beq _021E2712 + mov r0, #2 + mov r5, #1 + mov r7, #8 + str r0, [r4, #0] +_021E2712: + cmp r5, #0 + beq _021E2748 + ldr r0, [r6, #0] + cmp r0, #0 + beq _021E2720 + bl sub_020181C4 +_021E2720: + ldr r0, [sp, #4] + ldr r3, [sp, #0x34] + ldr r0, [r0, #0] + add r1, r7, #0 + add r2, sp, #0x10 + bl ov21_021D27E0 + str r0, [r6, #0] + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x2c] + ldr r2, [r2, #0xc] + mov r0, #0x1f + lsl r1, r1, #5 + mov r3, #0x20 + bl sub_0201DC68 + cmp r0, #0 + bne _021E2748 + bl sub_02022974 +_021E2748: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E26A0 + + thumb_func_start ov21_021E274C +ov21_021E274C: ; 0x021E274C + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + bl ov21_021D1524 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021E274C + + thumb_func_start ov21_021E275C +ov21_021E275C: ; 0x021E275C + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, [r4, #8] + mov r6, #1 + str r6, [r1, #0x1c] + ldr r3, [r4, #0] + add r5, r2, #0 + ldr r2, [r3, #0] + mov r1, #4 + orr r1, r2 + str r1, [r3, #0] + mov r1, #0 + str r1, [r0, #0x10] + mov r1, #2 + ldr r0, [r4, #8] + cmp r5, #5 + str r1, [r0, #0x14] + bhi _021E27BC + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E278C: ; jump table + .short _021E2798 - _021E278C - 2 ; case 0 + .short _021E27AA - _021E278C - 2 ; case 1 + .short _021E27AA - _021E278C - 2 ; case 2 + .short _021E27AA - _021E278C - 2 ; case 3 + .short _021E27AA - _021E278C - 2 ; case 4 + .short _021E27AA - _021E278C - 2 ; case 5 +_021E2798: + ldr r0, [r4, #8] + mov r1, #0x30 + str r1, [r0, #8] + ldr r0, [r4, #8] + mov r1, #0x48 + str r1, [r0, #0xc] + ldr r0, [r4, #8] + str r6, [r0, #0x14] + pop {r4, r5, r6, pc} +_021E27AA: + ldr r0, [r4, #0x10] + mov r1, #0x30 + mov r2, #0x48 + bl ov21_021E0CD4 + ldr r0, [r4, #0x10] + add r1, r6, #0 + bl ov21_021E0CDC +_021E27BC: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E275C + + thumb_func_start ov21_021E27C0 +ov21_021E27C0: ; 0x021E27C0 + push {r3, r4, r5, r6, r7, lr} + add r5, r3, #0 + add r4, r1, #0 + str r2, [sp] + cmp r5, #5 + bhi _021E2822 + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E27D8: ; jump table + .short _021E27E4 - _021E27D8 - 2 ; case 0 + .short _021E27FE - _021E27D8 - 2 ; case 1 + .short _021E27FE - _021E27D8 - 2 ; case 2 + .short _021E27FE - _021E27D8 - 2 ; case 3 + .short _021E27FE - _021E27D8 - 2 ; case 4 + .short _021E27FE - _021E27D8 - 2 ; case 5 +_021E27E4: + ldr r3, [r4, #0] + mov r1, #4 + ldr r2, [r3, #0] + mov r7, #0x30 + orr r1, r2 + str r1, [r3, #0] + mov r1, #0 + str r1, [r0, #0x10] + ldr r0, [r4, #8] + mov r1, #2 + mov r6, #0x48 + str r1, [r0, #0x14] + b _021E2822 +_021E27FE: + ldr r2, [r4, #0] + mov r1, #2 + ldr r3, [r2, #0] + mov r7, #0x30 + orr r3, r1 + str r3, [r2, #0] + str r5, [r0, #0x10] + ldr r0, [r4, #0x10] + mov r6, #0x48 + bl ov21_021E0CDC + sub r0, r5, #1 + bl ov21_021D5608 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl ov21_021E0CF8 +_021E2822: + ldr r0, [sp] + cmp r0, #5 + bhi _021E2862 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E2834: ; jump table + .short _021E2840 - _021E2834 - 2 ; case 0 + .short _021E2850 - _021E2834 - 2 ; case 1 + .short _021E2850 - _021E2834 - 2 ; case 2 + .short _021E2850 - _021E2834 - 2 ; case 3 + .short _021E2850 - _021E2834 - 2 ; case 4 + .short _021E2850 - _021E2834 - 2 ; case 5 +_021E2840: + ldr r0, [r4, #8] + mov r1, #2 + str r7, [r0, #8] + ldr r0, [r4, #8] + str r6, [r0, #0xc] + ldr r0, [r4, #8] + str r1, [r0, #0x14] + pop {r3, r4, r5, r6, r7, pc} +_021E2850: + ldr r0, [r4, #0x10] + add r1, r7, #0 + add r2, r6, #0 + bl ov21_021E0CD4 + ldr r0, [r4, #0x10] + mov r1, #2 + bl ov21_021E0CDC +_021E2862: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E27C0 + + thumb_func_start ov21_021E2864 +ov21_021E2864: ; 0x021E2864 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x34] + add r4, r1, #0 + cmp r0, #8 + beq _021E28A2 + cmp r0, #1 + ldr r0, [r4, #4] + bne _021E2880 + mov r1, #0 + mvn r1, r1 + bl ov21_021D371C + b _021E2886 +_021E2880: + mov r1, #1 + bl ov21_021D371C +_021E2886: + cmp r0, #1 + bne _021E28A2 + ldr r2, [r5, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E275C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E2968 + ldr r0, _021E28A4 ; =0x0000068B + bl sub_02005748 +_021E28A2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E28A4: .word 0x0000068B + thumb_func_end ov21_021E2864 + + thumb_func_start ov21_021E28A8 +ov21_021E28A8: ; 0x021E28A8 + ldr r1, _021E28CC ; =0x021BF67C + ldr r2, [r1, #0x48] + mov r1, #0x40 + tst r1, r2 + beq _021E28B8 + mov r1, #1 + str r1, [r0, #0x34] + bx lr +_021E28B8: + mov r1, #0x80 + tst r1, r2 + beq _021E28C4 + mov r1, #0 + str r1, [r0, #0x34] + bx lr +_021E28C4: + mov r1, #8 + str r1, [r0, #0x34] + bx lr + nop +_021E28CC: .word 0x021BF67C + thumb_func_end ov21_021E28A8 + + thumb_func_start ov21_021E28D0 +ov21_021E28D0: ; 0x021E28D0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x38] + mov r1, #1 + tst r0, r1 + ldr r0, [r5, #8] + bne _021E28E8 + mov r1, #0 + bl sub_02021CAC + b _021E28EC +_021E28E8: + bl sub_02021CAC +_021E28EC: + ldr r1, [r4, #0x38] + mov r0, #2 + tst r0, r1 + ldr r0, [r5, #0xc] + bne _021E28FE + mov r1, #0 + bl sub_02021CAC + b _021E2904 +_021E28FE: + mov r1, #1 + bl sub_02021CAC +_021E2904: + ldr r1, [r4, #0x38] + mov r0, #4 + tst r0, r1 + ldr r0, [r5, #0x10] + bne _021E2916 + mov r1, #0 + bl sub_02021CAC + b _021E291C +_021E2916: + mov r1, #1 + bl sub_02021CAC +_021E291C: + ldr r1, [r4, #0x38] + mov r0, #8 + tst r0, r1 + ldr r0, [r5, #0x14] + bne _021E292E + mov r1, #0 + bl sub_02021CAC + b _021E2934 +_021E292E: + mov r1, #1 + bl sub_02021CAC +_021E2934: + ldr r1, [r4, #0x38] + mov r0, #0x10 + tst r0, r1 + ldr r0, [r5, #0x18] + bne _021E2946 + mov r1, #0 + bl sub_02021CAC + b _021E294C +_021E2946: + mov r1, #1 + bl sub_02021CAC +_021E294C: + ldr r1, [r4, #0x38] + mov r0, #0x20 + tst r0, r1 + ldr r0, [r5, #0x1c] + bne _021E295E + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, pc} +_021E295E: + mov r1, #1 + bl sub_02021CAC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E28D0 + + thumb_func_start ov21_021E2968 +ov21_021E2968: ; 0x021E2968 + push {r3, r4, r5, r6, r7, lr} + mov r5, #0 + add r4, r0, #0 + add r6, r1, #0 + str r5, [r0, #0x38] + add r4, #0x38 + mov r7, #1 +_021E2976: + add r0, r5, #0 + bl ov21_021D5608 + add r1, r0, #0 + ldr r0, [r6, #4] + bl ov21_021D392C + cmp r0, #0 + beq _021E299C + ldr r1, [r4, #0] + mov r0, #1 + add r2, r1, #0 + orr r2, r0 + add r0, r5, #1 + add r1, r7, #0 + lsl r1, r0 + add r0, r2, #0 + orr r0, r1 + str r0, [r4, #0] +_021E299C: + add r5, r5, #1 + cmp r5, #5 + blt _021E2976 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E2968 + + thumb_func_start ov21_021E29A4 +ov21_021E29A4: ; 0x021E29A4 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + cmp r4, #2 + blt _021E29B4 + cmp r4, #8 + blt _021E29B8 +_021E29B4: + bl sub_02022974 +_021E29B8: + sub r0, r4, #2 + lsl r1, r0, #2 + ldr r0, _021E29D8 ; =0x021E9D98 + cmp r6, #1 + ldr r1, [r0, r1] + bne _021E29CE + add r0, r5, #0 + add r1, r1, #1 + bl sub_02021D6C + pop {r4, r5, r6, pc} +_021E29CE: + add r0, r5, #0 + bl sub_02021D6C + pop {r4, r5, r6, pc} + nop +_021E29D8: .word 0x021E9D98 + thumb_func_end ov21_021E29A4 + + .rodata + + + .global Unk_ov21_021E9D80 +Unk_ov21_021E9D80: ; 0x021E9D80 + .incbin "incbin/overlay21_rodata.bin", 0x25C, 0x274 - 0x25C + + .global Unk_ov21_021E9D98 +Unk_ov21_021E9D98: ; 0x021E9D98 + .incbin "incbin/overlay21_rodata.bin", 0x274, 0x18 + diff --git a/asm/ov21_021E29DC.s b/asm/ov21_021E29DC.s new file mode 100644 index 000000000..c060c51c8 --- /dev/null +++ b/asm/ov21_021E29DC.s @@ -0,0 +1,2985 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E29DC +ov21_021E29DC: ; 0x021E29DC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E2A5C + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E2AE0 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E2B08 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E2C20 + str r0, [r5, #0x24] + ldr r0, _021E2A24 ; =ov21_021E2C24 + str r0, [r5, #8] + ldr r0, _021E2A28 ; =ov21_021E2C2C + str r0, [r5, #0xc] + ldr r0, _021E2A2C ; =ov21_021E2C5C + str r0, [r5, #0x10] + ldr r0, _021E2A30 ; =ov21_021E2C64 + str r0, [r5, #0x14] + ldr r0, _021E2A34 ; =ov21_021E2D10 + str r0, [r5, #0x18] + ldr r0, _021E2A38 ; =ov21_021E2D38 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E2A24: .word ov21_021E2C24 +_021E2A28: .word ov21_021E2C2C +_021E2A2C: .word ov21_021E2C5C +_021E2A30: .word ov21_021E2C64 +_021E2A34: .word ov21_021E2D10 +_021E2A38: .word ov21_021E2D38 + thumb_func_end ov21_021E29DC + + thumb_func_start ov21_021E2A3C +ov21_021E2A3C: ; 0x021E2A3C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E2BA8 + ldr r0, [r4, #4] + bl ov21_021E2BBC + ldr r0, [r4, #0x20] + bl ov21_021E2BD0 + pop {r4, pc} + thumb_func_end ov21_021E2A3C + + thumb_func_start ov21_021E2A54 +ov21_021E2A54: ; 0x021E2A54 + ldr r0, [r0, #0] + ldr r0, [r0, #0x28] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E2A54 + + thumb_func_start ov21_021E2A5C +ov21_021E2A5C: ; 0x021E2A5C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x34 + bl sub_02018144 + add r4, r0, #0 + bne _021E2A6E + bl sub_02022974 +_021E2A6E: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D13B4 + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #2 + bl ov21_021D1410 + ldr r0, [r0, #0] + mov r1, #3 + str r0, [r4, #0x10] + add r0, r5, #0 + bl ov21_021D1410 + str r0, [r4, #0x14] + add r0, r5, #0 + mov r1, #4 + bl ov21_021D1410 + str r0, [r4, #0x18] + add r0, r5, #0 + mov r1, #6 + bl ov21_021D1410 + str r0, [r4, #0x1c] + add r0, r5, #0 + mov r1, #7 + bl ov21_021D1410 + str r0, [r4, #0x20] + add r0, r5, #0 + mov r1, #6 + bl ov21_021D1430 + str r0, [r4, #0x24] + add r0, r5, #0 + mov r1, #0 + bl ov21_021D1410 + ldr r0, [r0, #0] + str r0, [r4, #0xc] + mov r0, #1 + str r0, [r4, #0x2c] + str r0, [r4, #0x30] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E2A5C + + thumb_func_start ov21_021E2AE0 +ov21_021E2AE0: ; 0x021E2AE0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E2AF2 + bl sub_02022974 +_021E2AF2: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E2AE0 + + thumb_func_start ov21_021E2B08 +ov21_021E2B08: ; 0x021E2B08 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021E2C20 + add r7, r0, #0 + mov r1, #0x14 + mul r7, r1 + add r0, r5, #0 + add r1, r7, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021E2B28 + bl sub_02022974 +_021E2B28: + add r0, r4, #0 + mov r1, #0 + add r2, r7, #0 + bl sub_020D5124 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #2 + bl ov21_021D47F0 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x14 + add r2, r6, #0 + mov r3, #4 + bl ov21_021D4A94 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x28 + add r2, r6, #0 + mov r3, #8 + bl ov21_021D48B8 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x3c + add r2, r6, #0 + mov r3, #0x10 + bl ov21_021D491C + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x50 + add r2, r6, #0 + mov r3, #0x20 + bl ov21_021D4980 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x64 + add r2, r6, #0 + mov r3, #0x40 + bl ov21_021D49E4 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x78 + add r2, r6, #0 + mov r3, #0x80 + bl ov21_021D4A3C + add r1, r4, #0 + mov r3, #1 + add r0, r5, #0 + add r1, #0x8c + add r2, r6, #0 + lsl r3, r3, #8 + bl ov21_021D4B50 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2B08 + + thumb_func_start ov21_021E2BA8 +ov21_021E2BA8: ; 0x021E2BA8 + push {r4, lr} + add r4, r0, #0 + bne _021E2BB2 + bl sub_02022974 +_021E2BB2: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2BA8 + + thumb_func_start ov21_021E2BBC +ov21_021E2BBC: ; 0x021E2BBC + push {r4, lr} + add r4, r0, #0 + bne _021E2BC6 + bl sub_02022974 +_021E2BC6: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2BBC + + thumb_func_start ov21_021E2BD0 +ov21_021E2BD0: ; 0x021E2BD0 + push {r4, lr} + add r4, r0, #0 + bne _021E2BDA + bl sub_02022974 +_021E2BDA: + add r0, r4, #0 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x14 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x28 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x3c + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x50 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x64 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x78 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x8c + bl ov21_021D4660 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov21_021E2BD0 + + thumb_func_start ov21_021E2C20 +ov21_021E2C20: ; 0x021E2C20 + mov r0, #8 + bx lr + thumb_func_end ov21_021E2C20 + + thumb_func_start ov21_021E2C24 +ov21_021E2C24: ; 0x021E2C24 + ldr r1, [r1, #0x10] + mov r0, #1 + str r0, [r1, #0x1c] + bx lr + thumb_func_end ov21_021E2C24 + + thumb_func_start ov21_021E2C2C +ov21_021E2C2C: ; 0x021E2C2C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #1 + bne _021E2C3A + mov r0, #1 + pop {r4, pc} +_021E2C3A: + ldr r0, [r4, #0x10] + cmp r0, #1 + bne _021E2C44 + mov r0, #0 + pop {r4, pc} +_021E2C44: + ldr r0, [r4, #0] + cmp r0, #0 + bne _021E2C56 + add r0, r1, #0 + bl ov21_021E3320 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E2C56: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2C2C + + thumb_func_start ov21_021E2C5C +ov21_021E2C5C: ; 0x021E2C5C + mov r0, #0 + str r0, [r1, #8] + mov r0, #1 + bx lr + thumb_func_end ov21_021E2C5C + + thumb_func_start ov21_021E2C64 +ov21_021E2C64: ; 0x021E2C64 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r1, #3 + bhi _021E2D06 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E2C82: ; jump table + .short _021E2C8A - _021E2C82 - 2 ; case 0 + .short _021E2CAA - _021E2C82 - 2 ; case 1 + .short _021E2CE2 - _021E2C82 - 2 ; case 2 + .short _021E2CFA - _021E2C82 - 2 ; case 3 +_021E2C8A: + ldr r0, [r4, #4] + mov r1, #0x28 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x28 + bl sub_020D5124 + ldr r1, [r7, #8] + ldr r0, [r4, #8] + str r1, [r0, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2D0A +_021E2CAA: + ldr r3, [r4, #4] + add r1, r6, #0 + bl ov21_021E3080 + add r0, r6, #0 + bl ov21_021E3BE0 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2f + str r0, [sp, #8] + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r2, r1, #0 + sub r2, #0x14 + bl ov21_021D23F8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2D0A +_021E2CE2: + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + cmp r0, #0 + beq _021E2D0A + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2D0A +_021E2CFA: + add r0, r6, #0 + bl ov21_021E3BFC + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021E2D06: + bl sub_02022974 +_021E2D0A: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E2C64 + + thumb_func_start ov21_021E2D10 +ov21_021E2D10: ; 0x021E2D10 + push {r3, r4, r5, lr} + ldr r4, [r1, #8] + add r5, r2, #0 + ldr r1, [r5, #8] + ldr r0, [r4, #0] + cmp r0, r1 + beq _021E2D32 + add r0, r4, #0 + bl ov21_021E331C + ldr r1, [r5, #8] + ldr r2, [r4, #0] + add r0, r4, #0 + bl ov21_021E3FC0 + ldr r0, [r5, #8] + str r0, [r4, #0] +_021E2D32: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2D10 + + thumb_func_start ov21_021E2D38 +ov21_021E2D38: ; 0x021E2D38 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + ldr r3, [r4, #0] + add r5, r0, #0 + ldr r1, [r4, #8] + cmp r3, #4 + bhi _021E2DF4 + add r3, r3, r3 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_021E2D54: ; jump table + .short _021E2D5E - _021E2D54 - 2 ; case 0 + .short _021E2DB8 - _021E2D54 - 2 ; case 1 + .short _021E2DD0 - _021E2D54 - 2 ; case 2 + .short _021E2DDC - _021E2D54 - 2 ; case 3 + .short _021E2DEE - _021E2D54 - 2 ; case 4 +_021E2D5E: + ldr r0, [r2, #0x2c] + cmp r0, #0 + beq _021E2D8E + add r0, r1, #0 + bl ov21_021E3BE0 + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2f + str r0, [sp, #8] + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r3, r1, #0 + sub r3, #0x14 + bl ov21_021D23F8 + b _021E2DB0 +_021E2D8E: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x3f + str r0, [sp, #8] + str r2, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #4 + add r3, r1, #0 + sub r3, #0x14 + bl ov21_021D23F8 +_021E2DB0: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2DF8 +_021E2DB8: + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + cmp r0, #0 + beq _021E2DF8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2DF8 +_021E2DD0: + bl ov21_021E30BC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2DF8 +_021E2DDC: + add r0, r1, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E2DF8 +_021E2DEE: + add sp, #0x14 + mov r0, #1 + pop {r4, r5, pc} +_021E2DF4: + bl sub_02022974 +_021E2DF8: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2D38 + + thumb_func_start ov21_021E2E00 +ov21_021E2E00: ; 0x021E2E00 + push {r4, lr} + add r4, r0, #0 + bl ov21_021E2E10 + mov r0, #1 + str r0, [r4, #0x30] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E2E00 + + thumb_func_start ov21_021E2E10 +ov21_021E2E10: ; 0x021E2E10 + push {r4, lr} + add r4, r0, #0 + ldr r2, [r4, #0] + mov r0, #2 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] + mov r1, #0 + str r1, [r4, #0x28] + ldr r0, [r4, #0x10] + str r1, [r0, #0x14] + ldr r0, [r4, #0x18] + bl ov21_021E0CDC + ldr r0, [r4, #8] + cmp r0, #4 + bhi _021E2EBE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E2E3E: ; jump table + .short _021E2E48 - _021E2E3E - 2 ; case 0 + .short _021E2E64 - _021E2E3E - 2 ; case 1 + .short _021E2E88 - _021E2E3E - 2 ; case 2 + .short _021E2EAC - _021E2E3E - 2 ; case 3 + .short _021E2EB6 - _021E2E3E - 2 ; case 4 +_021E2E48: + ldr r0, [r4, #0x10] + mov r1, #0x38 + str r1, [r0, #8] + ldr r0, [r4, #0x10] + mov r2, #0x50 + str r2, [r0, #0xc] + ldr r0, [r4, #0x18] + bl ov21_021E0CD4 + ldr r0, [r4, #0xc] + mov r1, #1 + str r1, [r0, #0x14] + str r1, [r4, #0x2c] + pop {r4, pc} +_021E2E64: + ldr r0, [r4, #0x1c] + mov r1, #1 + bl ov21_021DCA4C + ldr r0, [r4, #0x1c] + mov r1, #4 + bl ov21_021DCA54 + ldr r0, [r4, #0x1c] + mov r1, #0x38 + mov r2, #0x50 + bl ov21_021DCA44 + ldr r0, [r4, #0xc] + mov r1, #1 + str r1, [r0, #0x14] + str r1, [r4, #0x2c] + pop {r4, pc} +_021E2E88: + ldr r0, [r4, #0x20] + mov r1, #1 + bl ov21_021E4070 + ldr r0, [r4, #0x20] + mov r1, #4 + bl ov21_021E4078 + ldr r0, [r4, #0x20] + mov r1, #0x38 + mov r2, #0x50 + bl ov21_021E4068 + ldr r0, [r4, #0xc] + mov r1, #1 + str r1, [r0, #0x14] + str r1, [r4, #0x2c] + pop {r4, pc} +_021E2EAC: + ldr r0, [r4, #0xc] + mov r1, #0 + str r1, [r0, #0x14] + str r1, [r4, #0x2c] + pop {r4, pc} +_021E2EB6: + ldr r0, [r4, #0xc] + mov r1, #0 + str r1, [r0, #0x14] + str r1, [r4, #0x2c] +_021E2EBE: + pop {r4, pc} + thumb_func_end ov21_021E2E10 + + thumb_func_start ov21_021E2EC0 +ov21_021E2EC0: ; 0x021E2EC0 + mov r0, #0 + bx lr + thumb_func_end ov21_021E2EC0 + + thumb_func_start ov21_021E2EC4 +ov21_021E2EC4: ; 0x021E2EC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #1 + add r7, r1, #0 + str r2, [sp] + str r0, [sp, #4] + cmp r7, #4 + bhi _021E2FC2 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E2EE2: ; jump table + .short _021E2EEC - _021E2EE2 - 2 ; case 0 + .short _021E2F14 - _021E2EE2 - 2 ; case 1 + .short _021E2F4A - _021E2EE2 - 2 ; case 2 + .short _021E2F80 - _021E2EE2 - 2 ; case 3 + .short _021E2FA0 - _021E2EE2 - 2 ; case 4 +_021E2EEC: + add r0, r2, #0 + bl ov21_021E2EC0 + cmp r0, #0 + beq _021E2EFA + mov r1, #2 + b _021E2EFC +_021E2EFA: + mov r1, #1 +_021E2EFC: + ldr r0, [r4, #0x10] + mov r6, #0x30 + str r1, [r0, #0x14] + ldr r2, [r4, #0] + mov r0, #4 + ldr r1, [r2, #0] + mov r5, #0x48 + orr r0, r1 + str r0, [r2, #0] + mov r0, #0 + str r0, [r4, #8] + b _021E2FC6 +_021E2F14: + add r0, r2, #0 + bl ov21_021E2EC0 + cmp r0, #0 + ldr r0, [r4, #0x1c] + beq _021E2F30 + mov r1, #1 + bl ov21_021DCA4C + ldr r0, [r4, #0x1c] + mov r1, #1 + bl ov21_021DCA54 + b _021E2F36 +_021E2F30: + mov r1, #0 + bl ov21_021DCA4C +_021E2F36: + ldr r2, [r4, #0] + mov r0, #8 + ldr r1, [r2, #0] + mov r6, #0x28 + orr r0, r1 + str r0, [r2, #0] + mov r0, #1 + str r0, [r4, #8] + mov r5, #0x78 + b _021E2FC6 +_021E2F4A: + add r0, r2, #0 + bl ov21_021E2EC0 + cmp r0, #0 + ldr r0, [r4, #0x20] + beq _021E2F66 + mov r1, #1 + bl ov21_021E4070 + ldr r0, [r4, #0x20] + mov r1, #1 + bl ov21_021E4078 + b _021E2F6C +_021E2F66: + mov r1, #0 + bl ov21_021E4070 +_021E2F6C: + ldr r2, [r4, #0] + mov r0, #0x10 + ldr r1, [r2, #0] + mov r6, #0x30 + orr r0, r1 + str r0, [r2, #0] + mov r0, #2 + str r0, [r4, #8] + mov r5, #0x40 + b _021E2FC6 +_021E2F80: + ldr r0, [r4, #4] + bl ov21_021D37CC + cmp r0, #2 + bne _021E2F9A + ldr r2, [r4, #0] + mov r0, #0x20 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] + mov r0, #3 + str r0, [r4, #8] + b _021E2FC6 +_021E2F9A: + mov r0, #0 + str r0, [sp, #4] + b _021E2FC6 +_021E2FA0: + ldr r0, [r4, #4] + bl ov21_021D3954 + cmp r0, #1 + bne _021E2FBC + ldr r2, [r4, #0] + mov r0, #1 + ldr r1, [r2, #0] + lsl r0, r0, #8 + orr r0, r1 + str r0, [r2, #0] + mov r0, #4 + str r0, [r4, #8] + b _021E2FC6 +_021E2FBC: + mov r0, #0 + str r0, [sp, #4] + b _021E2FC6 +_021E2FC2: + bl sub_02022974 +_021E2FC6: + ldr r0, [sp] + cmp r0, #4 + bhi _021E3076 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E2FD8: ; jump table + .short _021E2FE2 - _021E2FD8 - 2 ; case 0 + .short _021E301A - _021E2FD8 - 2 ; case 1 + .short _021E3048 - _021E2FD8 - 2 ; case 2 + .short _021E307A - _021E2FD8 - 2 ; case 3 + .short _021E307A - _021E2FD8 - 2 ; case 4 +_021E2FE2: + add r0, r7, #0 + bl ov21_021E2EC0 + cmp r0, #0 + beq _021E2FFA + ldr r0, [r4, #0x10] + mov r1, #2 + str r1, [r0, #0x14] + ldr r0, [r4, #0x18] + bl ov21_021E0CDC + b _021E3006 +_021E2FFA: + ldr r0, [r4, #0x10] + mov r1, #1 + str r1, [r0, #0x14] + ldr r0, [r4, #0x18] + bl ov21_021E0CDC +_021E3006: + ldr r0, [r4, #0x10] + add r1, r6, #0 + str r6, [r0, #8] + ldr r0, [r4, #0x10] + add r2, r5, #0 + str r5, [r0, #0xc] + ldr r0, [r4, #0x18] + bl ov21_021E0CD4 + b _021E307A +_021E301A: + add r0, r7, #0 + bl ov21_021E2EC0 + cmp r0, #0 + ldr r0, [r4, #0x1c] + beq _021E3036 + mov r1, #1 + bl ov21_021DCA4C + ldr r0, [r4, #0x1c] + mov r1, #1 + bl ov21_021DCA54 + b _021E303C +_021E3036: + mov r1, #0 + bl ov21_021DCA4C +_021E303C: + ldr r0, [r4, #0x1c] + add r1, r6, #0 + add r2, r5, #0 + bl ov21_021DCA44 + b _021E307A +_021E3048: + add r0, r7, #0 + bl ov21_021E2EC0 + cmp r0, #0 + ldr r0, [r4, #0x20] + beq _021E3064 + mov r1, #1 + bl ov21_021E4070 + ldr r0, [r4, #0x20] + mov r1, #1 + bl ov21_021E4078 + b _021E306A +_021E3064: + mov r1, #0 + bl ov21_021E4070 +_021E306A: + ldr r0, [r4, #0x20] + add r1, r6, #0 + add r2, r5, #0 + bl ov21_021E4068 + b _021E307A +_021E3076: + bl sub_02022974 +_021E307A: + ldr r0, [sp, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E2EC4 + + thumb_func_start ov21_021E3080 +ov21_021E3080: ; 0x021E3080 + push {r4, r5, r6, lr} + add r4, r3, #0 + add r5, r1, #0 + add r1, r2, #0 + add r6, r0, #0 + add r2, r4, #0 + bl ov21_021E30E4 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov21_021E3178 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov21_021E3268 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov21_021E3270 + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + bl ov21_021E3FC0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E3080 + + thumb_func_start ov21_021E30BC +ov21_021E30BC: ; 0x021E30BC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov21_021E326C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E3224 + add r0, r4, #0 + bl ov21_021E3304 + ldr r0, [r5, #0] + mov r1, #2 + ldr r0, [r0, #0] + bl sub_02019EBC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E30BC + + thumb_func_start ov21_021E30E4 +ov21_021E30E4: ; 0x021E30E4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + mov r2, #0 + str r2, [sp] + add r5, r0, #0 + str r4, [sp, #4] + add r6, r1, #0 + ldr r0, [r5, #0] + mov r1, #6 + add r3, r2, #0 + bl ov21_021D276C + ldr r0, [r6, #4] + bl ov21_021D36D8 + cmp r0, #1 + bne _021E311A + mov r0, #0x20 + str r0, [sp] + str r4, [sp, #4] + mov r2, #0 + ldr r0, [r5, #0] + mov r1, #0x18 + add r3, r2, #0 + bl ov21_021D276C +_021E311A: + ldr r0, [r5, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #2 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x39 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r4, r0, #0 + ldrh r0, [r2] + mov r1, #2 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #2 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E30E4 + + thumb_func_start ov21_021E3178 +ov21_021E3178: ; 0x021E3178 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r0, #0] + add r5, r1, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E3214 ; =0x00000827 + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x57 + bl sub_02009A4C + str r0, [r5, #0x18] + bl sub_0200A3DC + ldr r0, [r5, #0x18] + bl sub_02009D4C + ldr r0, _021E3218 ; =0x000007DC + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xc + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x1c] + bl sub_0200A640 + ldr r0, [r5, #0x1c] + bl sub_02009D4C + ldr r0, _021E321C ; =0x00000825 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x55 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x20] + ldr r0, _021E3220 ; =0x00000826 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x56 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x24] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E3214: .word 0x00000827 +_021E3218: .word 0x000007DC +_021E321C: .word 0x00000825 +_021E3220: .word 0x00000826 + thumb_func_end ov21_021E3178 + + thumb_func_start ov21_021E3224 +ov21_021E3224: ; 0x021E3224 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r4, [r0, #0] + ldr r0, [r5, #0x18] + bl sub_0200A4E4 + ldr r0, [r5, #0x1c] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x18] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x1c] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x20] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x24] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3224 + + thumb_func_start ov21_021E3268 +ov21_021E3268: ; 0x021E3268 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E3268 + + thumb_func_start ov21_021E326C +ov21_021E326C: ; 0x021E326C + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E326C + + thumb_func_start ov21_021E3270 +ov21_021E3270: ; 0x021E3270 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + ldr r7, [r0, #0] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r7, r0] + add r5, r1, #0 + str r0, [sp, #0xc] + ldr r0, [r5, #0x1c] + mov r1, #0 + add r4, r2, #0 + bl sub_0200A72C + mov r1, #0x10 + str r1, [sp, #0x1c] + mov r1, #0 + str r1, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + str r1, [sp, #0x18] + mov r1, #1 + str r0, [sp, #0x14] + str r1, [sp, #0x2c] + str r4, [sp, #0x30] + bl sub_0201FAB4 + str r0, [sp, #8] + mov r6, #0 +_021E32A8: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r7, r0] + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + add r3, r6, #0 + ldr r0, [r7, r0] + ldr r2, _021E3300 ; =0x000002B9 + add r1, r4, #0 + add r3, #0x66 + bl ov21_021D4DAC + str r4, [sp, #0x10] + add r0, sp, #0xc + bl ov21_021D4CA0 + str r0, [r5, #4] + ldr r0, [r0, #0] + ldr r1, [sp, #8] + bl sub_02012A60 + ldr r0, [r5, #4] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 + add r0, r4, #0 + bl ov21_021D4DA0 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #5 + blt _021E32A8 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_021E3300: .word 0x000002B9 + thumb_func_end ov21_021E3270 + + thumb_func_start ov21_021E3304 +ov21_021E3304: ; 0x021E3304 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E330A: + ldr r0, [r5, #4] + bl ov21_021D4D1C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _021E330A + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E3304 + + thumb_func_start ov21_021E331C +ov21_021E331C: ; 0x021E331C + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E331C + + thumb_func_start ov21_021E3320 +ov21_021E3320: ; 0x021E3320 + mov r1, #1 + str r1, [r0, #0x28] + ldr r0, [r0, #0x10] + str r1, [r0, #0x14] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E3320 + + thumb_func_start ov21_021E332C +ov21_021E332C: ; 0x021E332C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E33C4 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E3400 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E3428 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E3458 + str r0, [r5, #0x24] + ldr r0, _021E3374 ; =ov21_021E345C + str r0, [r5, #8] + ldr r0, _021E3378 ; =ov21_021E34AC + str r0, [r5, #0xc] + ldr r0, _021E337C ; =ov21_021E3520 + str r0, [r5, #0x10] + ldr r0, _021E3380 ; =ov21_021E3540 + str r0, [r5, #0x14] + ldr r0, _021E3384 ; =ov21_021E35D0 + str r0, [r5, #0x18] + ldr r0, _021E3388 ; =ov21_021E3604 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E3374: .word ov21_021E345C +_021E3378: .word ov21_021E34AC +_021E337C: .word ov21_021E3520 +_021E3380: .word ov21_021E3540 +_021E3384: .word ov21_021E35D0 +_021E3388: .word ov21_021E3604 + thumb_func_end ov21_021E332C + + thumb_func_start ov21_021E338C +ov21_021E338C: ; 0x021E338C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E342C + ldr r0, [r4, #4] + bl ov21_021E3440 + ldr r0, [r4, #0x20] + bl ov21_021E3454 + pop {r4, pc} + thumb_func_end ov21_021E338C + + thumb_func_start ov21_021E33A4 +ov21_021E33A4: ; 0x021E33A4 + ldr r0, [r0, #0] + ldr r0, [r0, #0x24] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E33A4 + + thumb_func_start ov21_021E33AC +ov21_021E33AC: ; 0x021E33AC + ldr r0, [r0, #0] + ldr r0, [r0, #0x28] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E33AC + + thumb_func_start ov21_021E33B4 +ov21_021E33B4: ; 0x021E33B4 + ldr r0, [r0, #0] + str r1, [r0, #0x30] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E33B4 + + thumb_func_start ov21_021E33BC +ov21_021E33BC: ; 0x021E33BC + ldr r0, [r0, #0] + ldr r0, [r0, #0x30] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E33BC + + thumb_func_start ov21_021E33C4 +ov21_021E33C4: ; 0x021E33C4 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x34 + bl sub_02018144 + add r4, r0, #0 + bne _021E33D6 + bl sub_02022974 +_021E33D6: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + add r0, r5, #0 + bl ov21_021D13C8 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + ldr r0, [r0, #0] + str r0, [r4, #4] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E33C4 + + thumb_func_start ov21_021E3400 +ov21_021E3400: ; 0x021E3400 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E3412 + bl sub_02022974 +_021E3412: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3400 + + thumb_func_start ov21_021E3428 +ov21_021E3428: ; 0x021E3428 + mov r0, #0 + bx lr + thumb_func_end ov21_021E3428 + + thumb_func_start ov21_021E342C +ov21_021E342C: ; 0x021E342C + push {r4, lr} + add r4, r0, #0 + bne _021E3436 + bl sub_02022974 +_021E3436: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E342C + + thumb_func_start ov21_021E3440 +ov21_021E3440: ; 0x021E3440 + push {r4, lr} + add r4, r0, #0 + bne _021E344A + bl sub_02022974 +_021E344A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E3440 + + thumb_func_start ov21_021E3454 +ov21_021E3454: ; 0x021E3454 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E3454 + + thumb_func_start ov21_021E3458 +ov21_021E3458: ; 0x021E3458 + mov r0, #0 + bx lr + thumb_func_end ov21_021E3458 + + thumb_func_start ov21_021E345C +ov21_021E345C: ; 0x021E345C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + mov r1, #0x1c + bl sub_02018144 + add r6, r0, #0 + add r2, r6, #0 + mov r1, #0x1c + mov r0, #0 +_021E3472: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E3472 + ldr r2, [r5, #4] + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E3688 + ldr r2, [r5, #4] + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E3C6C + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E3E8C + mov r1, #0 + mov r0, #4 +_021E349A: + add r1, r1, #1 + str r0, [r4, #0xc] + add r4, r4, #4 + cmp r1, #6 + blt _021E349A + str r6, [r5, #8] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E345C + + thumb_func_start ov21_021E34AC +ov21_021E34AC: ; 0x021E34AC + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021E34C0 + mov r0, #0 + str r0, [r5, #0x24] + mov r0, #1 + pop {r3, r4, r5, pc} +_021E34C0: + ldr r1, [r0, #0x10] + cmp r1, #1 + bne _021E34CA + mov r0, #0 + pop {r3, r4, r5, pc} +_021E34CA: + ldr r1, [r0, #0] + cmp r1, #0 + bne _021E34E4 + mov r3, #1 + str r3, [r5, #0x24] + ldr r1, [r5, #4] + mov r2, #0 + str r2, [r1, #0x30] + str r3, [r5, #0x28] + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] + b _021E351C +_021E34E4: + mov r0, #1 + str r0, [r5, #0x28] + add r0, r5, #0 + bl ov21_021E3C2C + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E3EEC + add r0, r5, #0 + bl ov21_021E3724 + ldr r0, [r5, #8] + bl ov21_021D3998 + cmp r0, #2 + bne _021E3514 + ldr r0, [r5, #0x30] + cmp r0, #0 + bne _021E3514 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E3D48 +_021E3514: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E3734 +_021E351C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E34AC + + thumb_func_start ov21_021E3520 +ov21_021E3520: ; 0x021E3520 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r5, [r4, #8] + add r0, r5, #0 + bl ov21_021E37B4 + add r0, r5, #0 + bl ov21_021E3E74 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3520 + + thumb_func_start ov21_021E3540 +ov21_021E3540: ; 0x021E3540 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + add r7, r2, #0 + ldr r6, [r3, #8] + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021E35CC + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E355E: ; jump table + .short _021E3568 - _021E355E - 2 ; case 0 + .short _021E3582 - _021E355E - 2 ; case 1 + .short _021E3592 - _021E355E - 2 ; case 2 + .short _021E35B6 - _021E355E - 2 ; case 3 + .short _021E35C8 - _021E355E - 2 ; case 4 +_021E3568: + ldr r0, [r4, #4] + mov r1, #0x28 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x28 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E35CC +_021E3582: + ldr r3, [r4, #4] + add r1, r5, #0 + bl ov21_021E3900 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E35CC +_021E3592: + mov r1, #0 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #4 + sub r2, #0x10 + mov r3, #0x3f + bl sub_0200AAE0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021E3F2C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E35CC +_021E35B6: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021E35CC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E35CC +_021E35C8: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E35CC: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E3540 + + thumb_func_start ov21_021E35D0 +ov21_021E35D0: ; 0x021E35D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + ldr r0, [r3, #8] + add r7, r2, #0 + ldr r5, [r1, #8] + str r0, [sp, #4] + mov r6, #0 + add r4, r7, #0 +_021E35E2: + ldr r0, [r5, #0] + ldr r1, [r4, #0xc] + bl ov21_021D144C + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #6 + blt _021E35E2 + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r7, #0 + bl ov21_021E3F48 + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E35D0 + + thumb_func_start ov21_021E3604 +ov21_021E3604: ; 0x021E3604 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021E3684 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E361E: ; jump table + .short _021E3628 - _021E361E - 2 ; case 0 + .short _021E3642 - _021E361E - 2 ; case 1 + .short _021E3654 - _021E361E - 2 ; case 2 + .short _021E3670 - _021E361E - 2 ; case 3 + .short _021E3680 - _021E361E - 2 ; case 4 +_021E3628: + mov r0, #2 + str r0, [sp] + mov r0, #4 + add r1, r0, #0 + sub r1, #0x14 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E3684 +_021E3642: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021E3684 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E3684 +_021E3654: + add r1, r5, #0 + bl ov21_021E393C + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D2584 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E3684 +_021E3670: + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E3684 +_021E3680: + mov r0, #1 + pop {r3, r4, r5, pc} +_021E3684: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3604 + + thumb_func_start ov21_021E3688 +ov21_021E3688: ; 0x021E3688 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #0x18 + bl sub_02018144 + str r0, [r5, #4] + mov r0, #0x30 + str r0, [sp] + mov r1, #8 + ldr r0, [r5, #4] + mov r2, #0x28 + add r3, r1, #0 + bl ov21_021D154C + mov r0, #0xf8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #8 + add r0, #0x14 + mov r2, #0x28 + mov r3, #0xd0 + bl ov21_021D154C + mov r0, #0x58 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #8 + add r0, r0, #4 + mov r2, #0x28 + mov r3, #0x30 + bl ov21_021D154C + mov r0, #0x80 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #8 + add r0, #8 + mov r2, #0x28 + mov r3, #0x58 + bl ov21_021D154C + mov r0, #0xa8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #8 + add r0, #0xc + mov r2, #0x28 + mov r3, #0x80 + bl ov21_021D154C + mov r0, #0xd0 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #8 + add r0, #0x10 + mov r2, #0x28 + mov r3, #0xa8 + bl ov21_021D154C + str r4, [r5, #8] + str r5, [r5, #0xc] + str r6, [sp] + add r3, r5, #0 + ldr r0, [r5, #4] + ldr r2, _021E3720 ; =ov21_021E37CC + mov r1, #6 + add r3, #8 + bl sub_02023FCC + str r0, [r5, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E3720: .word ov21_021E37CC + thumb_func_end ov21_021E3688 + + thumb_func_start ov21_021E3724 +ov21_021E3724: ; 0x021E3724 + mov r2, #0 + mov r1, #3 +_021E3728: + add r2, r2, #1 + str r1, [r0, #0xc] + add r0, r0, #4 + cmp r2, #6 + blt _021E3728 + bx lr + thumb_func_end ov21_021E3724 + + thumb_func_start ov21_021E3734 +ov21_021E3734: ; 0x021E3734 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0x2c] + cmp r1, #0 + bne _021E3744 + ldr r0, [r0, #0] + bl sub_0202404C +_021E3744: + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021E3754 + ldr r0, [r4, #0x20] + cmp r0, #2 + beq _021E3754 + mov r0, #1 + str r0, [r4, #0x20] +_021E3754: + ldr r0, [r4, #4] + ldr r0, [r0, #8] + cmp r0, #4 + bhi _021E37AE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E3768: ; jump table + .short _021E3772 - _021E3768 - 2 ; case 0 + .short _021E377E - _021E3768 - 2 ; case 1 + .short _021E378A - _021E3768 - 2 ; case 2 + .short _021E3796 - _021E3768 - 2 ; case 3 + .short _021E37A2 - _021E3768 - 2 ; case 4 +_021E3772: + ldr r0, [r4, #0xc] + cmp r0, #2 + beq _021E37B2 + mov r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021E377E: + ldr r0, [r4, #0x10] + cmp r0, #2 + beq _021E37B2 + mov r0, #1 + str r0, [r4, #0x10] + pop {r4, pc} +_021E378A: + ldr r0, [r4, #0x14] + cmp r0, #2 + beq _021E37B2 + mov r0, #1 + str r0, [r4, #0x14] + pop {r4, pc} +_021E3796: + ldr r0, [r4, #0x18] + cmp r0, #2 + beq _021E37B2 + mov r0, #1 + str r0, [r4, #0x18] + pop {r4, pc} +_021E37A2: + ldr r0, [r4, #0x1c] + cmp r0, #2 + beq _021E37B2 + mov r0, #1 + str r0, [r4, #0x1c] + pop {r4, pc} +_021E37AE: + bl sub_02022974 +_021E37B2: + pop {r4, pc} + thumb_func_end ov21_021E3734 + + thumb_func_start ov21_021E37B4 +ov21_021E37B4: ; 0x021E37B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E37B4 + + thumb_func_start ov21_021E37CC +ov21_021E37CC: ; 0x021E37CC + push {r3, r4, r5, r6, r7, lr} + ldr r6, [r2, #0] + add r7, r0, #0 + lsl r0, r7, #2 + add r0, r6, r0 + ldr r5, [r2, #4] + ldr r4, [r6, #4] + cmp r1, #0 + str r1, [r0, #0xc] + beq _021E37E6 + cmp r1, #2 + beq _021E37EC + pop {r3, r4, r5, r6, r7, pc} +_021E37E6: + mov r0, #0 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_021E37EC: + ldr r0, [r5, #0x14] + mov r1, #2 + add r2, r7, #0 + bl ov21_021D4F20 + cmp r7, #5 + bhi _021E38F6 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E3806: ; jump table + .short _021E3820 - _021E3806 - 2 ; case 0 + .short _021E383E - _021E3806 - 2 ; case 1 + .short _021E385C - _021E3806 - 2 ; case 2 + .short _021E387A - _021E3806 - 2 ; case 3 + .short _021E38B4 - _021E3806 - 2 ; case 4 + .short _021E3812 - _021E3806 - 2 ; case 5 +_021E3812: + add r0, r4, #0 + bl ov21_021E2E00 + ldr r0, _021E38F8 ; =0x000005DD + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021E3820: + ldr r2, [r4, #8] + cmp r2, #0 + beq _021E38F6 + add r0, r6, #0 + mov r1, #0 + bl ov21_021E3C18 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E3E8C + ldr r0, _021E38FC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021E383E: + ldr r2, [r4, #8] + cmp r2, #1 + beq _021E38F6 + add r0, r6, #0 + mov r1, #1 + bl ov21_021E3C18 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E3E8C + ldr r0, _021E38FC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021E385C: + ldr r2, [r4, #8] + cmp r2, #2 + beq _021E38F6 + add r0, r6, #0 + mov r1, #2 + bl ov21_021E3C18 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E3E8C + ldr r0, _021E38FC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021E387A: + ldr r2, [r4, #8] + cmp r2, #3 + beq _021E38F6 + add r0, r6, #0 + mov r1, #3 + bl ov21_021E3C18 + cmp r0, #0 + beq _021E389C + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E3E8C + ldr r0, _021E38FC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021E389C: + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _021E38F6 + ldr r0, [r4, #8] + cmp r0, #2 + beq _021E38AE + ldr r0, _021E38F8 ; =0x000005DD + bl sub_02005748 +_021E38AE: + mov r0, #1 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} +_021E38B4: + ldr r2, [r4, #8] + cmp r2, #4 + beq _021E38F6 + add r0, r6, #0 + mov r1, #4 + bl ov21_021E3C18 + cmp r0, #0 + beq _021E38D6 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E3E8C + ldr r0, _021E38FC ; =0x0000068B + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_021E38D6: + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _021E38F6 + ldr r0, [r4, #4] + bl ov21_021D3954 + cmp r0, #1 + bne _021E38F2 + ldr r0, [r4, #8] + cmp r0, #2 + beq _021E38F2 + ldr r0, _021E38F8 ; =0x000005DD + bl sub_02005748 +_021E38F2: + mov r0, #0 + str r0, [r5, #0x10] +_021E38F6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E38F8: .word 0x000005DD +_021E38FC: .word 0x0000068B + thumb_func_end ov21_021E37CC + + thumb_func_start ov21_021E3900 +ov21_021E3900: ; 0x021E3900 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021E3960 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov21_021E39FC + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov21_021E3AF0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov21_021E3BD8 + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E3FE4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E3900 + + thumb_func_start ov21_021E393C +ov21_021E393C: ; 0x021E393C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E3BDC + add r0, r5, #0 + bl ov21_021E3BC0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E3AAC + ldr r0, [r4, #0] + mov r1, #5 + ldr r0, [r0, #0] + bl sub_02019EBC + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E393C + + thumb_func_start ov21_021E3960 +ov21_021E3960: ; 0x021E3960 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #4] + add r4, r2, #0 + ldr r0, [r0, #0x30] + cmp r0, #0 + beq _021E399E + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0] + mov r1, #6 + mov r2, #4 + bl ov21_021D276C + ldr r0, [r6, #8] + bl ov21_021D36D8 + cmp r0, #1 + bne _021E399E + mov r0, #0x20 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0] + mov r1, #0x18 + mov r2, #4 + mov r3, #0 + bl ov21_021D276C +_021E399E: + ldr r0, [r5, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x22 + mov r3, #5 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x3b + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r4, r0, #0 + ldrh r0, [r2] + mov r1, #5 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #5 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E3960 + + thumb_func_start ov21_021E39FC +ov21_021E39FC: ; 0x021E39FC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E3A9C ; =0x00000894 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x60 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #0x18] + bl sub_0200A3DC + ldr r0, [r5, #0x18] + bl sub_02009D4C + ldr r0, _021E3AA0 ; =0x0000083F + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xb + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x1c] + bl sub_0200A640 + ldr r0, [r5, #0x1c] + bl sub_02009D4C + ldr r0, _021E3AA4 ; =0x00000892 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5e + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x20] + ldr r0, _021E3AA8 ; =0x00000893 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5f + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x24] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E3A9C: .word 0x00000894 +_021E3AA0: .word 0x0000083F +_021E3AA4: .word 0x00000892 +_021E3AA8: .word 0x00000893 + thumb_func_end ov21_021E39FC + + thumb_func_start ov21_021E3AAC +ov21_021E3AAC: ; 0x021E3AAC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x1c] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x18] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x1c] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x20] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x24] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3AAC + + thumb_func_start ov21_021E3AF0 +ov21_021E3AF0: ; 0x021E3AF0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021E3BBC ; =0x00000893 + add r5, r0, #0 + mov r0, #0 + add r6, r2, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #5 + str r2, [sp, #0x10] + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x4c + sub r2, #0x54 + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r7, #7 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x20 + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + mov r0, #0x36 + str r6, [sp, #0x48] + lsl r0, r0, #0xe + mov r6, #0x39 + str r0, [sp, #0x38] + mov r4, #0 + lsl r7, r7, #0xe + lsl r6, r6, #0xe +_021E3B60: + cmp r4, #5 + bhi _021E3BA2 + add r0, r4, r4 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E3B70: ; jump table + .short _021E3B80 - _021E3B70 - 2 ; case 0 + .short _021E3B84 - _021E3B70 - 2 ; case 1 + .short _021E3B8C - _021E3B70 - 2 ; case 2 + .short _021E3B94 - _021E3B70 - 2 ; case 3 + .short _021E3B9C - _021E3B70 - 2 ; case 4 + .short _021E3B7C - _021E3B70 - 2 ; case 5 +_021E3B7C: + str r6, [sp, #0x34] + b _021E3BA2 +_021E3B80: + str r7, [sp, #0x34] + b _021E3BA2 +_021E3B84: + mov r0, #0x11 + lsl r0, r0, #0xe + str r0, [sp, #0x34] + b _021E3BA2 +_021E3B8C: + mov r0, #0x1b + lsl r0, r0, #0xe + str r0, [sp, #0x34] + b _021E3BA2 +_021E3B94: + mov r0, #0x25 + lsl r0, r0, #0xe + str r0, [sp, #0x34] + b _021E3BA2 +_021E3B9C: + mov r0, #0x2f + lsl r0, r0, #0xe + str r0, [sp, #0x34] +_021E3BA2: + add r0, sp, #0x2c + bl sub_02021B90 + add r1, r4, #0 + stmia r5!, {r0} + bl sub_02021D6C + add r4, r4, #1 + cmp r4, #6 + blt _021E3B60 + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E3BBC: .word 0x00000893 + thumb_func_end ov21_021E3AF0 + + thumb_func_start ov21_021E3BC0 +ov21_021E3BC0: ; 0x021E3BC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E3BC6: + ldr r0, [r5, #0] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _021E3BC6 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E3BC0 + + thumb_func_start ov21_021E3BD8 +ov21_021E3BD8: ; 0x021E3BD8 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E3BD8 + + thumb_func_start ov21_021E3BDC +ov21_021E3BDC: ; 0x021E3BDC + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E3BDC + + thumb_func_start ov21_021E3BE0 +ov21_021E3BE0: ; 0x021E3BE0 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r4, #0 + mov r6, #1 +_021E3BE8: + ldr r0, [r5, #4] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _021E3BE8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E3BE0 + + thumb_func_start ov21_021E3BFC +ov21_021E3BFC: ; 0x021E3BFC + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021E3C04: + ldr r0, [r5, #4] + add r1, r6, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _021E3C04 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E3BFC + + thumb_func_start ov21_021E3C18 +ov21_021E3C18: ; 0x021E3C18 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov21_021E2EC4 + cmp r0, #1 + bne _021E3C2A + mov r1, #0 + str r1, [r4, #0x28] +_021E3C2A: + pop {r4, pc} + thumb_func_end ov21_021E3C18 + + thumb_func_start ov21_021E3C2C +ov21_021E3C2C: ; 0x021E3C2C + ldr r3, _021E3C30 ; =ov21_021E3C34 + bx r3 + ; .align 2, 0 +_021E3C30: .word ov21_021E3C34 + thumb_func_end ov21_021E3C2C + + thumb_func_start ov21_021E3C34 +ov21_021E3C34: ; 0x021E3C34 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r5, #4] + bl ov21_021E3C64 + ldr r0, _021E3C5C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _021E3C58 + add r0, r4, #0 + bl ov21_021E2E00 + mov r0, #1 + str r0, [r5, #0x2c] + ldr r0, _021E3C60 ; =0x000005DD + bl sub_02005748 +_021E3C58: + pop {r3, r4, r5, pc} + nop +_021E3C5C: .word 0x021BF67C +_021E3C60: .word 0x000005DD + thumb_func_end ov21_021E3C34 + + thumb_func_start ov21_021E3C64 +ov21_021E3C64: ; 0x021E3C64 + mov r1, #0 + str r1, [r0, #0x2c] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E3C64 + + thumb_func_start ov21_021E3C6C +ov21_021E3C6C: ; 0x021E3C6C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #0xa8 + bl sub_02018144 + str r0, [r5, #0x18] + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r2, #0x18 + ldr r0, [r5, #0x18] + mov r1, #0x1c + add r3, r2, #0 + bl ov21_021D4FE4 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + mov r2, #0x18 + add r0, #0x1c + mov r1, #0x44 + add r3, r2, #0 + bl ov21_021D4FE4 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + mov r2, #0x18 + add r0, #0x38 + mov r1, #0x6c + add r3, r2, #0 + bl ov21_021D4FE4 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + mov r2, #0x18 + add r0, #0x54 + mov r1, #0x94 + add r3, r2, #0 + bl ov21_021D4FE4 + ldr r0, [r4, #8] + bl ov21_021D3954 + cmp r0, #1 + bne _021E3CFA + mov r1, #0 + b _021E3CFC +_021E3CFA: + mov r1, #2 +_021E3CFC: + mov r0, #0x10 + str r0, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + mov r2, #0x18 + add r0, #0x70 + mov r1, #0xbc + add r3, r2, #0 + bl ov21_021D4FE4 + mov r0, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + ldr r0, [r5, #0x18] + mov r2, #0x18 + add r0, #0x8c + mov r1, #0xe4 + add r3, r2, #0 + bl ov21_021D4FE4 + add r0, r6, #0 + bl ov21_021D4EE4 + str r0, [r5, #0x14] + ldr r1, [r5, #0x18] + mov r2, #6 + mov r3, #1 + bl ov21_021D4F04 + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E3C6C + + thumb_func_start ov21_021E3D48 +ov21_021E3D48: ; 0x021E3D48 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0x2c] + ldr r5, [r4, #4] + cmp r0, #0 + beq _021E3D58 + b _021E3E66 +_021E3D58: + ldr r0, _021E3E68 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x10 + tst r0, r1 + beq _021E3D6C + ldr r0, [r6, #0x14] + mov r1, #0 + mov r2, #1 + bl ov21_021D4F20 +_021E3D6C: + ldr r0, _021E3E68 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x20 + tst r0, r1 + beq _021E3D80 + mov r1, #0 + ldr r0, [r6, #0x14] + sub r2, r1, #1 + bl ov21_021D4F20 +_021E3D80: + ldr r0, _021E3E68 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _021E3E66 + ldr r0, [r6, #0x14] + bl ov21_021D4F7C + cmp r0, #5 + bhi _021E3E66 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E3DA0: ; jump table + .short _021E3DAC - _021E3DA0 - 2 ; case 0 + .short _021E3DC6 - _021E3DA0 - 2 ; case 1 + .short _021E3DE0 - _021E3DA0 - 2 ; case 2 + .short _021E3DFA - _021E3DA0 - 2 ; case 3 + .short _021E3E26 - _021E3DA0 - 2 ; case 4 + .short _021E3E52 - _021E3DA0 - 2 ; case 5 +_021E3DAC: + ldr r2, [r5, #8] + cmp r2, #0 + beq _021E3E66 + add r0, r4, #0 + mov r1, #0 + bl ov21_021E3C18 + mov r0, #2 + str r0, [r4, #0xc] + ldr r0, _021E3E6C ; =0x0000068B + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3DC6: + ldr r2, [r5, #8] + cmp r2, #1 + beq _021E3E66 + add r0, r4, #0 + mov r1, #1 + bl ov21_021E3C18 + mov r0, #2 + str r0, [r4, #0x10] + ldr r0, _021E3E6C ; =0x0000068B + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3DE0: + ldr r2, [r5, #8] + cmp r2, #2 + beq _021E3E66 + add r0, r4, #0 + mov r1, #2 + bl ov21_021E3C18 + mov r0, #2 + str r0, [r4, #0x14] + ldr r0, _021E3E6C ; =0x0000068B + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3DFA: + ldr r2, [r5, #8] + cmp r2, #3 + beq _021E3E66 + add r0, r4, #0 + mov r1, #3 + bl ov21_021E3C18 + cmp r0, #0 + beq _021E3E18 + mov r0, #2 + str r0, [r4, #0x18] + ldr r0, _021E3E6C ; =0x0000068B + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3E18: + ldr r0, [r5, #8] + cmp r0, #2 + beq _021E3E66 + ldr r0, _021E3E70 ; =0x000005DD + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3E26: + ldr r2, [r5, #8] + cmp r2, #4 + beq _021E3E66 + add r0, r4, #0 + mov r1, #4 + bl ov21_021E3C18 + cmp r0, #0 + beq _021E3E44 + mov r0, #2 + str r0, [r4, #0x1c] + ldr r0, _021E3E6C ; =0x0000068B + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3E44: + ldr r0, [r5, #8] + cmp r0, #2 + beq _021E3E66 + ldr r0, _021E3E70 ; =0x000005DD + bl sub_02005748 + pop {r4, r5, r6, pc} +_021E3E52: + add r0, r5, #0 + bl ov21_021E2E00 + mov r0, #1 + str r0, [r4, #0x2c] + mov r0, #2 + str r0, [r4, #0x20] + ldr r0, _021E3E70 ; =0x000005DD + bl sub_02005748 +_021E3E66: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E3E68: .word 0x021BF67C +_021E3E6C: .word 0x0000068B +_021E3E70: .word 0x000005DD + thumb_func_end ov21_021E3D48 + + thumb_func_start ov21_021E3E74 +ov21_021E3E74: ; 0x021E3E74 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl sub_020181C4 + ldr r0, [r4, #0x14] + bl ov21_021D4EFC + mov r0, #0 + str r0, [r4, #0x14] + str r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov21_021E3E74 + + thumb_func_start ov21_021E3E8C +ov21_021E3E8C: ; 0x021E3E8C + push {r3, lr} + ldr r3, [r1, #4] + mov r2, #0 + str r2, [r1, #0x30] + ldr r1, [r3, #8] + cmp r1, #4 + bhi _021E3EE8 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E3EA6: ; jump table + .short _021E3EB0 - _021E3EA6 - 2 ; case 0 + .short _021E3EBA - _021E3EA6 - 2 ; case 1 + .short _021E3EC6 - _021E3EA6 - 2 ; case 2 + .short _021E3ED2 - _021E3EA6 - 2 ; case 3 + .short _021E3EDE - _021E3EA6 - 2 ; case 4 +_021E3EB0: + ldr r0, [r0, #0x14] + mov r1, #4 + bl ov21_021D4F20 + pop {r3, pc} +_021E3EBA: + ldr r0, [r0, #0x14] + mov r1, #4 + mov r2, #1 + bl ov21_021D4F20 + pop {r3, pc} +_021E3EC6: + ldr r0, [r0, #0x14] + mov r1, #4 + mov r2, #2 + bl ov21_021D4F20 + pop {r3, pc} +_021E3ED2: + ldr r0, [r0, #0x14] + mov r1, #4 + mov r2, #3 + bl ov21_021D4F20 + pop {r3, pc} +_021E3EDE: + mov r1, #4 + ldr r0, [r0, #0x14] + add r2, r1, #0 + bl ov21_021D4F20 +_021E3EE8: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E3E8C + + thumb_func_start ov21_021E3EEC +ov21_021E3EEC: ; 0x021E3EEC + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #8] + cmp r0, #0 + beq _021E3F26 + ldr r0, [r4, #8] + bl ov21_021D3998 + cmp r0, #2 + bne _021E3F26 + ldr r0, [r4, #0x30] + cmp r0, #0 + bne _021E3F18 + ldr r0, _021E3F28 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x80 + tst r0, r1 + beq _021E3F26 + mov r0, #1 + str r0, [r4, #0x30] + pop {r4, pc} +_021E3F18: + ldr r0, _021E3F28 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #0x40 + tst r0, r1 + beq _021E3F26 + mov r0, #0 + str r0, [r4, #0x30] +_021E3F26: + pop {r4, pc} + ; .align 2, 0 +_021E3F28: .word 0x021BF67C + thumb_func_end ov21_021E3EEC + + thumb_func_start ov21_021E3F2C +ov21_021E3F2C: ; 0x021E3F2C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, [r4, #0x14] + ldr r1, [r5, #0] + add r6, r2, #0 + bl ov21_021D25B8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E3F48 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E3F2C + + thumb_func_start ov21_021E3F48 +ov21_021E3F48: ; 0x021E3F48 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + ldr r0, [r6, #8] + add r4, r1, #0 + bl ov21_021D3998 + cmp r0, #0 + beq _021E3F7E + add r0, r5, #0 + mov r1, #1 + bl ov21_021E3F98 + ldr r1, [r6, #0x30] + cmp r1, #0 + bne _021E3F86 + cmp r0, #0 + beq _021E3F74 + ldr r0, [r4, #0x14] + ldr r1, [r5, #0] + bl ov21_021D25B8 +_021E3F74: + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E3F88 + pop {r4, r5, r6, pc} +_021E3F7E: + add r0, r5, #0 + mov r1, #0 + bl ov21_021E3F98 +_021E3F86: + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E3F48 + + thumb_func_start ov21_021E3F88 +ov21_021E3F88: ; 0x021E3F88 + ldr r3, _021E3F94 ; =ov21_021D2544 + add r2, r0, #0 + ldr r0, [r1, #0x14] + ldr r1, [r2, #0] + bx r3 + nop +_021E3F94: .word ov21_021D2544 + thumb_func_end ov21_021E3F88 + + thumb_func_start ov21_021E3F98 +ov21_021E3F98: ; 0x021E3F98 + push {r3, r4, r5, lr} + ldr r4, [r0, #0] + mov r0, #0x79 + lsl r0, r0, #2 + add r0, r4, r0 + add r5, r1, #0 + bl ov21_021D25A0 + cmp r5, r0 + beq _021E3FBC + mov r0, #0x79 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r5, #0 + bl ov21_021D2584 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E3FBC: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3F98 + + thumb_func_start ov21_021E3FC0 +ov21_021E3FC0: ; 0x021E3FC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r2, #2 + add r0, r5, r0 + ldr r0, [r0, #4] + add r4, r1, #0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_020129D0 + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #4] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_020129D0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E3FC0 + + thumb_func_start ov21_021E3FE4 +ov21_021E3FE4: ; 0x021E3FE4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #8] + bl ov21_021D3954 + cmp r0, #0 + bne _021E3FFA + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02021CAC +_021E3FFA: + pop {r4, pc} + thumb_func_end ov21_021E3FE4 \ No newline at end of file diff --git a/asm/ov21_021E3FFC.s b/asm/ov21_021E3FFC.s new file mode 100644 index 000000000..5f1eb82d3 --- /dev/null +++ b/asm/ov21_021E3FFC.s @@ -0,0 +1,1724 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E3FFC +ov21_021E3FFC: ; 0x021E3FFC + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + bl ov21_021E4080 + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021E40C8 + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0x20] + bl ov21_021E411C + str r0, [r5, #0x24] + ldr r0, _021E403C ; =ov21_021E4120 + str r0, [r5, #8] + ldr r0, _021E4040 ; =ov21_021E4168 + str r0, [r5, #0xc] + ldr r0, _021E4044 ; =ov21_021E4194 + str r0, [r5, #0x10] + ldr r0, _021E4048 ; =ov21_021E41A8 + str r0, [r5, #0x14] + ldr r0, _021E404C ; =ov21_021E4268 + str r0, [r5, #0x18] + ldr r0, _021E4050 ; =ov21_021E4288 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E403C: .word ov21_021E4120 +_021E4040: .word ov21_021E4168 +_021E4044: .word ov21_021E4194 +_021E4048: .word ov21_021E41A8 +_021E404C: .word ov21_021E4268 +_021E4050: .word ov21_021E4288 + thumb_func_end ov21_021E3FFC + + thumb_func_start ov21_021E4054 +ov21_021E4054: ; 0x021E4054 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E40F4 + ldr r0, [r4, #4] + bl ov21_021E4108 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4054 + + thumb_func_start ov21_021E4068 +ov21_021E4068: ; 0x021E4068 + ldr r0, [r0, #4] + str r1, [r0, #4] + str r2, [r0, #8] + bx lr + thumb_func_end ov21_021E4068 + + thumb_func_start ov21_021E4070 +ov21_021E4070: ; 0x021E4070 + ldr r0, [r0, #4] + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E4070 + + thumb_func_start ov21_021E4078 +ov21_021E4078: ; 0x021E4078 + ldr r0, [r0, #4] + str r1, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E4078 + + thumb_func_start ov21_021E4080 +ov21_021E4080: ; 0x021E4080 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + bne _021E4092 + bl sub_02022974 +_021E4092: + add r2, r4, #0 + mov r1, #0x10 + mov r0, #0 +_021E4098: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E4098 + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1430 + str r0, [r4, #0xc] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E4080 + + thumb_func_start ov21_021E40C8 +ov21_021E40C8: ; 0x021E40C8 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + bne _021E40DA + bl sub_02022974 +_021E40DA: + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_021E40E0: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E40E0 + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E40C8 + + thumb_func_start ov21_021E40F4 +ov21_021E40F4: ; 0x021E40F4 + push {r4, lr} + add r4, r0, #0 + bne _021E40FE + bl sub_02022974 +_021E40FE: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E40F4 + + thumb_func_start ov21_021E4108 +ov21_021E4108: ; 0x021E4108 + push {r4, lr} + add r4, r0, #0 + bne _021E4112 + bl sub_02022974 +_021E4112: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4108 + + thumb_func_start ov21_021E411C +ov21_021E411C: ; 0x021E411C + mov r0, #0 + bx lr + thumb_func_end ov21_021E411C + + thumb_func_start ov21_021E4120 +ov21_021E4120: ; 0x021E4120 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #4] + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r5, #4] + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bne _021E413E + bl sub_02022974 +_021E413E: + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021E4144: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E4144 + str r4, [r5, #8] + add r0, r7, #0 + bl sub_020050F8 + str r0, [r4, #0] + bl sub_020050EC + str r0, [r4, #8] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E4898 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4120 + + thumb_func_start ov21_021E4168 +ov21_021E4168: ; 0x021E4168 + push {r3, r4, r5, lr} + ldr r2, [r0, #0xc] + add r5, r1, #0 + ldr r4, [r0, #8] + cmp r2, #1 + bne _021E4178 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E4178: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021E4182 + mov r0, #0 + pop {r3, r4, r5, pc} +_021E4182: + add r0, r4, #0 + bl ov21_021E4898 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E4C68 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E4168 + + thumb_func_start ov21_021E4194 +ov21_021E4194: ; 0x021E4194 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4194 + + thumb_func_start ov21_021E41A8 +ov21_021E41A8: ; 0x021E41A8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r3, [r3, #8] + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021E4264 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E41C6: ; jump table + .short _021E41CE - _021E41C6 - 2 ; case 0 + .short _021E41EC - _021E41C6 - 2 ; case 1 + .short _021E4228 - _021E41C6 - 2 ; case 2 + .short _021E4260 - _021E41C6 - 2 ; case 3 +_021E41CE: + mov r1, #0x33 + ldr r0, [r4, #4] + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x33 + str r0, [r4, #8] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4264 +_021E41EC: + ldr r0, [r4, #4] + add r1, r5, #0 + str r0, [sp] + add r0, r6, #0 + bl ov21_021E4590 + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _021E420C + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E43C8 + b _021E4218 +_021E420C: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E448C +_021E4218: + mov r0, #0 + mov r1, #3 + bl sub_0200564C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4264 +_021E4228: + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _021E423A + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E4440 + b _021E4244 +_021E423A: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E4518 +_021E4244: + cmp r0, #1 + bne _021E4264 + bl sub_02005684 + cmp r0, #0 + bne _021E4264 + mov r0, #1 + add r1, r0, #0 + bl sub_020049F4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4264 +_021E4260: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E4264: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E41A8 + + thumb_func_start ov21_021E4268 +ov21_021E4268: ; 0x021E4268 + push {r3, r4, r5, lr} + ldr r4, [r3, #8] + ldr r5, [r1, #8] + add r2, r0, #0 + add r1, r2, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov21_021E4A28 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E4B10 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4268 + + thumb_func_start ov21_021E4288 +ov21_021E4288: ; 0x021E4288 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r3, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021E4324 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E42A2: ; jump table + .short _021E42AC - _021E42A2 - 2 ; case 0 + .short _021E42DE - _021E42A2 - 2 ; case 1 + .short _021E4302 - _021E42A2 - 2 ; case 2 + .short _021E4310 - _021E42A2 - 2 ; case 3 + .short _021E4320 - _021E42A2 - 2 ; case 4 +_021E42AC: + ldr r1, [r3, #0xc] + cmp r1, #0 + bne _021E42BC + add r1, r3, #0 + mov r3, #0 + bl ov21_021E43C8 + b _021E42C4 +_021E42BC: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E448C +_021E42C4: + mov r0, #1 + mov r1, #0 + bl sub_020049F4 + mov r0, #0x7f + mov r1, #3 + mov r2, #0 + bl sub_0200560C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4324 +_021E42DE: + ldr r1, [r3, #0xc] + cmp r1, #0 + bne _021E42EE + add r1, r3, #0 + mov r3, #0 + bl ov21_021E4440 + b _021E42F6 +_021E42EE: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E4518 +_021E42F6: + cmp r0, #0 + beq _021E4324 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4324 +_021E4302: + add r1, r3, #0 + bl ov21_021E45DC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4324 +_021E4310: + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4324 +_021E4320: + mov r0, #1 + pop {r4, pc} +_021E4324: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov21_021E4288 + + thumb_func_start ov21_021E4328 +ov21_021E4328: ; 0x021E4328 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov21_021D2170 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r2, r0, #0 + mov r0, #0x30 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #4] + mov r3, #2 + bl ov21_021D1890 + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E4328 + + thumb_func_start ov21_021E4360 +ov21_021E4360: ; 0x021E4360 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0 + str r0, [sp] + mov r6, #1 +_021E436A: + mov r4, #0 + add r5, r7, #0 +_021E436E: + ldr r0, [r5, #0x20] + add r1, r6, #0 + bl sub_02021FE0 + add r4, r4, #1 + add r5, #8 + cmp r4, #9 + blt _021E436E + ldr r0, [r7, #0x68] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [sp] + add r7, #0x54 + add r0, r0, #1 + str r0, [sp] + cmp r0, #9 + blt _021E436A + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4360 + + thumb_func_start ov21_021E4394 +ov21_021E4394: ; 0x021E4394 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0 + str r0, [sp] + add r6, r0, #0 +_021E439E: + mov r4, #0 + add r5, r7, #0 +_021E43A2: + ldr r0, [r5, #0x20] + add r1, r6, #0 + bl sub_02021FE0 + add r4, r4, #1 + add r5, #8 + cmp r4, #9 + blt _021E43A2 + ldr r0, [r7, #0x68] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [sp] + add r7, #0x54 + add r0, r0, #1 + str r0, [sp] + cmp r0, #9 + blt _021E439E + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4394 + + thumb_func_start ov21_021E43C8 +ov21_021E43C8: ; 0x021E43C8 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E4360 + ldr r0, [r4, #8] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E442E + cmp r6, #0 + beq _021E440A + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #3 + add r2, r1, #0 + sub r2, #0x13 + bl ov21_021D23F8 + b _021E442E +_021E440A: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #3 + add r3, r1, #0 + sub r3, #0x13 + bl ov21_021D23F8 +_021E442E: + mov r1, #0x5b + ldr r0, [r5, #0] + lsl r1, r1, #2 + add r1, r0, r1 + bl ov21_021D24FC + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E43C8 + + thumb_func_start ov21_021E4440 +ov21_021E4440: ; 0x021E4440 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021E4460 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021E446A +_021E4460: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021E446A: + cmp r0, #0 + beq _021E447C + cmp r4, #0 + beq _021E4478 + add r0, r6, #0 + bl ov21_021E4394 +_021E4478: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E447C: + mov r1, #0x5b + ldr r0, [r5, #0] + lsl r1, r1, #2 + add r1, r0, r1 + bl ov21_021D24FC + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E4440 + + thumb_func_start ov21_021E448C +ov21_021E448C: ; 0x021E448C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + add r4, r3, #0 + bl ov21_021E4360 + cmp r4, #0 + bne _021E44B4 + ldr r0, [r5, #8] + mov r1, #0x30 + str r0, [sp] + ldr r0, [r5, #0x10] + mov r3, #0x40 + str r0, [sp, #4] + ldr r2, [r5, #4] + add r0, r7, #0 + bl ov21_021D2648 +_021E44B4: + ldr r0, [r6, #8] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E4512 + cmp r4, #0 + beq _021E44EC + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r2, #0x2f + str r2, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r1, [r5, #0x10] + sub r2, #0x3f + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov21_021D23F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E44EC: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r3, #0x2f + str r3, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r1, [r5, #0x10] + sub r3, #0x3f + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov21_021D23F8 +_021E4512: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E448C + + thumb_func_start ov21_021E4518 +ov21_021E4518: ; 0x021E4518 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bne _021E4538 + bl ov21_021D2664 + str r0, [sp] + ldr r0, [r4, #0] + ldr r1, [r5, #0] + ldr r2, [r5, #4] + bl ov21_021D2164 + b _021E453C +_021E4538: + mov r0, #1 + str r0, [sp] +_021E453C: + ldr r0, [r6, #8] + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r4, #0] + beq _021E4556 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + str r0, [sp, #4] + b _021E4562 +_021E4556: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC + str r0, [sp, #4] +_021E4562: + mov r1, #0 + add r2, sp, #0 +_021E4566: + ldr r0, [r2, #0] + cmp r0, #0 + beq _021E4574 + add r1, r1, #1 + add r2, r2, #4 + cmp r1, #2 + blt _021E4566 +_021E4574: + cmp r1, #2 + bne _021E4588 + cmp r7, #1 + bne _021E4582 + add r0, r5, #0 + bl ov21_021E4394 +_021E4582: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E4588: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4518 + + thumb_func_start ov21_021E4590 +ov21_021E4590: ; 0x021E4590 + push {r3, r4, r5, r6, r7, lr} + ldr r6, [sp, #0x18] + add r7, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + add r2, r6, #0 + bl ov21_021E45FC + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E46A8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E47CC + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov21_021E4890 + add r0, r4, #0 + add r1, r7, #0 + bl ov21_021E4328 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E4ABC + add r0, r5, #0 + bl ov21_021E4AF4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4590 + + thumb_func_start ov21_021E45DC +ov21_021E45DC: ; 0x021E45DC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E4894 + add r0, r5, #0 + bl ov21_021E4868 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E4770 + add r0, r4, #0 + bl ov21_021E4664 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E45DC + + thumb_func_start ov21_021E45FC +ov21_021E45FC: ; 0x021E45FC + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r5, r2, #0 + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x46 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E45FC + + thumb_func_start ov21_021E4664 +ov21_021E4664: ; 0x021E4664 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0] + mov r2, #0 + ldr r0, [r0, #0] + mov r1, #1 + add r3, r2, #0 + bl sub_0201C63C + mov r1, #0 + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0xc0 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + add r0, r0, #4 + add r3, r1, #0 + bl sub_0201AE78 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201C2B4 + add sp, #8 + pop {r4, pc} + thumb_func_end ov21_021E4664 + + thumb_func_start ov21_021E46A8 +ov21_021E46A8: ; 0x021E46A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E4760 ; =0x00002B6C + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x74 + bl sub_02009A4C + mov r1, #0xc5 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + bl sub_0200A3DC + mov r0, #0xc5 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009D4C + ldr r0, _021E4764 ; =0x00002B0B + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x13 + mov r3, #0 + bl sub_02009B04 + mov r1, #0xc6 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + bl sub_0200A640 + mov r0, #0xc6 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009D4C + ldr r0, _021E4768 ; =0x00002B6D + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x75 + mov r3, #1 + bl sub_02009BC4 + mov r1, #0xc7 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, _021E476C ; =0x00002B6B + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x73 + mov r3, #1 + bl sub_02009BC4 + mov r1, #0x32 + lsl r1, r1, #4 + str r0, [r5, r1] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E4760: .word 0x00002B6C +_021E4764: .word 0x00002B0B +_021E4768: .word 0x00002B6D +_021E476C: .word 0x00002B6B + thumb_func_end ov21_021E46A8 + + thumb_func_start ov21_021E4770 +ov21_021E4770: ; 0x021E4770 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xc5 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #0xc6 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A6DC + mov r0, #5 + mov r1, #0xc5 + lsl r0, r0, #6 + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r5, r1] + bl sub_02009D68 + mov r0, #0x51 + mov r1, #0xc6 + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r5, r1] + bl sub_02009D68 + mov r0, #0x52 + mov r1, #0xc7 + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r5, r1] + bl sub_02009D68 + mov r0, #0x53 + mov r1, #0x32 + lsl r0, r0, #2 + lsl r1, r1, #4 + ldr r0, [r4, r0] + ldr r1, [r5, r1] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E4770 + + thumb_func_start ov21_021E47CC +ov21_021E47CC: ; 0x021E47CC + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + ldr r4, [r1, #0] + ldr r3, _021E4864 ; =0x00002B6B + add r7, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #5 + str r1, [sp, #0x10] + lsl r0, r0, #6 + add r5, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x50 + sub r2, #0x60 + add r3, r3, #2 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r6, sp, #0x30 + str r0, [sp, #0x30] + add r0, sp, #0x50 + str r0, [sp, #0x34] + mov r0, #0x11 + str r0, [sp, #0x44] + mov r0, #1 + str r0, [sp, #0x48] + mov r0, #0 + str r5, [sp, #0x4c] + str r0, [sp, #0x2c] + str r0, [sp, #0x38] + str r0, [sp, #0x3c] +_021E4836: + mov r4, #0 + add r5, r7, #0 +_021E483A: + add r0, r6, #0 + bl sub_02021B90 + str r0, [r5, #0x20] + add r4, r4, #1 + add r5, #8 + cmp r4, #9 + blt _021E483A + add r0, r6, #0 + bl sub_02021B90 + str r0, [r7, #0x68] + ldr r0, [sp, #0x2c] + add r7, #0x54 + add r0, r0, #1 + str r0, [sp, #0x2c] + cmp r0, #9 + blt _021E4836 + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + nop +_021E4864: .word 0x00002B6B + thumb_func_end ov21_021E47CC + + thumb_func_start ov21_021E4868 +ov21_021E4868: ; 0x021E4868 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r7, #0 +_021E486E: + mov r4, #0 + add r5, r6, #0 +_021E4872: + ldr r0, [r5, #0x20] + bl sub_02021BD4 + add r4, r4, #1 + add r5, #8 + cmp r4, #9 + blt _021E4872 + ldr r0, [r6, #0x68] + bl sub_02021BD4 + add r7, r7, #1 + add r6, #0x54 + cmp r7, #9 + blt _021E486E + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4868 + + thumb_func_start ov21_021E4890 +ov21_021E4890: ; 0x021E4890 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E4890 + + thumb_func_start ov21_021E4894 +ov21_021E4894: ; 0x021E4894 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E4894 + + thumb_func_start ov21_021E4898 +ov21_021E4898: ; 0x021E4898 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl ov21_021E4D1C + add r2, r0, #0 + ldr r1, [r4, #0] + mov r0, #1 + bl sub_02005188 + str r0, [r4, #4] + pop {r4, pc} + thumb_func_end ov21_021E4898 + + thumb_func_start ov21_021E48B0 +ov21_021E48B0: ; 0x021E48B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + ldr r0, [sp, #0x44] + ldr r7, [sp, #0x3c] + str r0, [sp, #0x44] + ldr r0, [sp, #0x48] + str r1, [sp, #8] + str r0, [sp, #0x48] + add r0, r2, #0 + str r3, [sp, #0xc] + ldr r5, [sp, #0x40] + bl sub_020050E0 + str r0, [sp, #0x1c] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r3, [sp, #0x44] + ldr r0, [r0, #0] + sub r3, #0x20 + lsl r2, r5, #0x10 + lsl r3, r3, #0x10 + add r0, r0, #4 + mov r1, #0 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 + ldr r1, [sp, #0x38] + ldr r0, [sp, #0xc] + mov r6, #0 + sub r0, r1, r0 + cmp r7, #0 + ble _021E4954 + lsl r0, r0, #0xc + str r0, [sp, #0x14] + asr r0, r0, #0x1f + str r0, [sp, #0x18] + lsl r0, r7, #0xc + add r4, r6, #0 + str r0, [sp, #0x10] +_021E4908: + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + asr r3, r4, #0x1f + add r2, r4, #0 + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _021E4958 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [sp, #0x10] + bl sub_020BCFD0 + asr r1, r0, #0xc + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x1c] + add r1, r1, r0 + ldr r0, [sp, #0x48] + ldr r3, [sp, #0x44] + str r0, [sp] + ldr r0, [sp, #8] + ldrb r1, [r2, r1] + ldr r0, [r0, #0] + add r2, r5, #0 + add r0, r0, #4 + bl ov21_021E495C + mov r0, #1 + lsl r0, r0, #0xc + add r6, r6, #1 + add r5, r5, #1 + add r4, r4, r0 + cmp r6, r7 + blt _021E4908 +_021E4954: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E4958: .word 0x00000000 + thumb_func_end ov21_021E48B0 + + thumb_func_start ov21_021E495C +ov21_021E495C: ; 0x021E495C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp, #8] + add r6, r2, #0 + add r7, r3, #0 + ldr r4, [sp, #0x20] + cmp r5, #0x7f + bls _021E4970 + sub r5, #0xff +_021E4970: + cmp r5, #0 + beq _021E499A + lsl r2, r5, #0xc + asr r0, r2, #0x1f + lsr r1, r2, #0xf + lsl r0, r0, #0x11 + orr r0, r1 + mov r1, #2 + lsl r3, r2, #0x11 + mov r2, #0 + lsl r1, r1, #0xa + add r3, r3, r1 + adc r0, r2 + lsl r1, r0, #0x14 + lsr r0, r3, #0xc + orr r0, r1 + mov r1, #0x7f + lsl r1, r1, #0xc + bl sub_020BCFD0 + asr r5, r0, #0xc +_021E499A: + ldr r1, [r4, #0] + add r0, r7, r5 + add r1, r7, r1 + cmp r0, r1 + ble _021E49AA + add r3, r1, #0 + sub r1, r0, r1 + b _021E49AE +_021E49AA: + add r3, r0, #0 + sub r1, r1, r0 +_021E49AE: + mov r0, #1 + str r0, [sp] + add r0, r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + lsl r2, r6, #0x10 + lsl r3, r3, #0x10 + ldr r0, [sp, #8] + mov r1, #6 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 + str r5, [r4, #0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E495C + + thumb_func_start ov21_021E49D0 +ov21_021E49D0: ; 0x021E49D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + ldr r0, [sp, #0x20] + add r5, r1, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r6, r2, #0 + add r4, r3, #0 + str r0, [sp, #0x24] + sub r0, r6, r5 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + ldr r3, [sp, #0x20] + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + ldr r0, [r7, #0] + sub r3, #0x20 + lsl r2, r4, #0x10 + lsl r3, r3, #0x10 + add r0, r0, #4 + mov r1, #0 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 + cmp r5, r6 + bge _021E4A24 +_021E4A0A: + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x20] + str r0, [sp] + ldr r0, [r7, #0] + mov r1, #0 + add r0, r0, #4 + add r2, r4, #0 + bl ov21_021E495C + add r5, r5, #1 + add r4, r4, #1 + cmp r5, r6 + blt _021E4A0A +_021E4A24: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E49D0 + + thumb_func_start ov21_021E4A28 +ov21_021E4A28: ; 0x021E4A28 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r3, #0xc9 + add r5, r0, #0 + lsl r3, r3, #2 + ldr r0, [r5, r3] + add r4, r1, #0 + add r0, r0, #4 + str r0, [r5, r3] + ldr r0, [r5, r3] + add r6, r2, #0 + lsr r2, r0, #0x1f + lsl r1, r0, #0x18 + sub r1, r1, r2 + mov r0, #0x18 + ror r1, r0 + add r1, r2, r1 + str r1, [r5, r3] + ldr r3, [r5, r3] + sub r3, #8 + bpl _021E4A56 + add r0, #0xe8 + add r3, r3, r0 +_021E4A56: + mov r0, #0xcb + lsl r0, r0, #2 + ldr r1, [r6, #4] + ldr r7, [r5, r0] + cmp r7, r1 + beq _021E4A82 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + str r3, [sp, #8] + mov r1, #0x97 + sub r0, r0, #4 + str r1, [sp, #0xc] + add r0, r5, r0 + str r0, [sp, #0x10] + ldr r2, [r6, #0] + add r0, r5, #0 + add r1, r4, #0 + add r3, r7, #0 + bl ov21_021E48B0 + b _021E4A96 +_021E4A82: + mov r1, #0x97 + sub r0, r0, #4 + str r1, [sp] + add r0, r5, r0 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + mov r2, #4 + bl ov21_021E49D0 +_021E4A96: + ldr r0, [r4, #0] + mov r3, #0xc9 + lsl r3, r3, #2 + ldr r0, [r0, #0] + ldr r3, [r5, r3] + mov r1, #1 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0] + add r0, r0, #4 + bl sub_0201A9A4 + mov r0, #0xcb + ldr r1, [r6, #4] + lsl r0, r0, #2 + str r1, [r5, r0] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4A28 + + thumb_func_start ov21_021E4ABC +ov21_021E4ABC: ; 0x021E4ABC + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #9 + add r0, r0, #4 + bl sub_0201C2B4 + mov r0, #0xca + mov r2, #0x97 + lsl r0, r0, #2 + str r2, [sp] + add r0, r5, r0 + mov r1, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, #0x69 + add r3, r1, #0 + bl ov21_021E49D0 + ldr r0, [r4, #0] + add r0, r0, #4 + bl sub_0201A954 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4ABC + + thumb_func_start ov21_021E4AF4 +ov21_021E4AF4: ; 0x021E4AF4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x20 +_021E4AFC: + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E4B30 + add r4, r4, #1 + add r5, #0x54 + cmp r4, #9 + blt _021E4AFC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4AF4 + + thumb_func_start ov21_021E4B10 +ov21_021E4B10: ; 0x021E4B10 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + add r5, #0x20 +_021E4B1A: + add r1, r6, r4 + ldrb r1, [r1, #0xc] + add r0, r5, #0 + bl ov21_021E4B94 + add r4, r4, #1 + add r5, #0x54 + cmp r4, #9 + blt _021E4B1A + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4B10 + + thumb_func_start ov21_021E4B30 +ov21_021E4B30: ; 0x021E4B30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + lsl r0, r1, #4 + add r0, #0x70 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #6 + lsl r0, r0, #0x10 + mov r6, #2 + ldr r5, [sp] + str r0, [sp, #8] + mov r4, #0 + add r7, sp, #4 + lsl r6, r6, #0xe +_021E4B4E: + ldr r0, [r5, #0] + add r1, r7, #0 + bl sub_02021C50 + ldr r0, [r5, #0] + mov r1, #0 + bl sub_02021CAC + ldr r0, [sp, #8] + mov r1, #1 + sub r0, r0, r6 + str r0, [sp, #8] + ldr r0, [r5, #0] + bl sub_02021D6C + add r4, r4, #1 + add r5, #8 + cmp r4, #9 + blt _021E4B4E + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp] + add r1, sp, #4 + ldr r0, [r0, #0x48] + bl sub_02021C50 + ldr r0, [sp] + mov r1, #0 + ldr r0, [r0, #0x48] + bl sub_02021CAC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4B30 + + thumb_func_start ov21_021E4B94 +ov21_021E4B94: ; 0x021E4B94 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r7, r1, #0 + add r6, r0, #0 + str r4, [sp] + cmp r7, #0 + ble _021E4BB8 + add r5, r6, #0 +_021E4BA4: + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02021CAC + add r4, r4, #1 + lsl r0, r4, #1 + str r0, [r5, #4] + add r5, #8 + cmp r4, r7 + blt _021E4BA4 +_021E4BB8: + mov r5, #0 + add r4, r6, #0 + add r7, r5, #0 +_021E4BBE: + ldr r0, [r4, #0] + bl sub_02021D34 + cmp r0, #0 + beq _021E4BE0 + ldr r0, [r4, #4] + sub r0, r0, #1 + cmp r0, #0 + ble _021E4BD8 + str r0, [r4, #4] + add r0, r5, #1 + str r0, [sp] + b _021E4BE0 +_021E4BD8: + ldr r0, [r4, #0] + add r1, r7, #0 + bl sub_02021CAC +_021E4BE0: + add r5, r5, #1 + add r4, #8 + cmp r5, #9 + blt _021E4BBE + ldr r1, [r6, #0x4c] + ldr r0, [sp] + cmp r1, r0 + bgt _021E4C10 + ldr r0, [r6, #0x48] + ldr r1, [sp] + bl ov21_021E4C38 + mov r0, #0x10 + str r0, [r6, #0x50] + ldr r1, [r6, #0x4c] + ldr r0, [sp] + cmp r1, r0 + bge _021E4C0C + ldr r0, [r6, #0x48] + mov r1, #1 + bl sub_02021CAC +_021E4C0C: + ldr r0, [sp] + str r0, [r6, #0x4c] +_021E4C10: + ldr r1, [r6, #0x4c] + cmp r1, #0 + ble _021E4C2E + ldr r0, [r6, #0x50] + cmp r0, #0 + bge _021E4C28 + sub r1, r1, #1 + str r1, [r6, #0x4c] + ldr r0, [r6, #0x48] + bl ov21_021E4C38 + pop {r3, r4, r5, r6, r7, pc} +_021E4C28: + sub r0, r0, #1 + str r0, [r6, #0x50] + pop {r3, r4, r5, r6, r7, pc} +_021E4C2E: + ldr r0, [r6, #0x48] + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4B94 + + thumb_func_start ov21_021E4C38 +ov21_021E4C38: ; 0x021E4C38 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + lsl r0, r4, #3 + neg r0, r0 + add r0, #0x60 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r5, #0 + bl sub_02021C50 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E4C38 + + thumb_func_start ov21_021E4C68 +ov21_021E4C68: ; 0x021E4C68 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r1, #0xc] + bl ov21_021E4D1C + add r4, r0, #0 + add r1, r5, #0 + mov r0, #0 + add r1, #0xc + strb r0, [r5, #0xc] + strb r0, [r1, #1] + strb r0, [r1, #2] + strb r0, [r1, #3] + strb r0, [r1, #4] + strb r0, [r1, #5] + strb r0, [r1, #6] + strb r0, [r1, #7] + strb r0, [r1, #8] + bl sub_0200598C + cmp r0, #0 + beq _021E4CA2 + ldr r0, [r5, #0] + add r5, #0xc + add r1, r5, #0 + mov r2, #9 + add r3, r4, #0 + bl sub_020051D0 +_021E4CA2: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E4C68 \ No newline at end of file diff --git a/asm/ov21_021E4CA4.s b/asm/ov21_021E4CA4.s new file mode 100644 index 000000000..2999c0b3c --- /dev/null +++ b/asm/ov21_021E4CA4.s @@ -0,0 +1,2601 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E4CA4 +ov21_021E4CA4: ; 0x021E4CA4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E4D24 + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E4D64 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E4D8C + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E4DBC + str r0, [r5, #0x24] + ldr r0, _021E4CEC ; =ov21_021E4DC0 + str r0, [r5, #8] + ldr r0, _021E4CF0 ; =ov21_021E4E00 + str r0, [r5, #0xc] + ldr r0, _021E4CF4 ; =ov21_021E4E84 + str r0, [r5, #0x10] + ldr r0, _021E4CF8 ; =ov21_021E4E98 + str r0, [r5, #0x14] + ldr r0, _021E4CFC ; =ov21_021E4F20 + str r0, [r5, #0x18] + ldr r0, _021E4D00 ; =ov21_021E4F78 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E4CEC: .word ov21_021E4DC0 +_021E4CF0: .word ov21_021E4E00 +_021E4CF4: .word ov21_021E4E84 +_021E4CF8: .word ov21_021E4E98 +_021E4CFC: .word ov21_021E4F20 +_021E4D00: .word ov21_021E4F78 + thumb_func_end ov21_021E4CA4 + + thumb_func_start ov21_021E4D04 +ov21_021E4D04: ; 0x021E4D04 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E4D90 + ldr r0, [r4, #4] + bl ov21_021E4DA4 + ldr r0, [r4, #0x20] + bl ov21_021E4DB8 + pop {r4, pc} + thumb_func_end ov21_021E4D04 + + thumb_func_start ov21_021E4D1C +ov21_021E4D1C: ; 0x021E4D1C + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E4D1C + + thumb_func_start ov21_021E4D24 +ov21_021E4D24: ; 0x021E4D24 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + bne _021E4D36 + bl sub_02022974 +_021E4D36: + add r2, r4, #0 + mov r1, #0x10 + mov r0, #0 +_021E4D3C: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E4D3C + add r0, r5, #0 + bl ov21_021D13A0 + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1430 + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4D24 + + thumb_func_start ov21_021E4D64 +ov21_021E4D64: ; 0x021E4D64 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E4D76 + bl sub_02022974 +_021E4D76: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E4D64 + + thumb_func_start ov21_021E4D8C +ov21_021E4D8C: ; 0x021E4D8C + mov r0, #0 + bx lr + thumb_func_end ov21_021E4D8C + + thumb_func_start ov21_021E4D90 +ov21_021E4D90: ; 0x021E4D90 + push {r4, lr} + add r4, r0, #0 + bne _021E4D9A + bl sub_02022974 +_021E4D9A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4D90 + + thumb_func_start ov21_021E4DA4 +ov21_021E4DA4: ; 0x021E4DA4 + push {r4, lr} + add r4, r0, #0 + bne _021E4DAE + bl sub_02022974 +_021E4DAE: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E4DA4 + + thumb_func_start ov21_021E4DB8 +ov21_021E4DB8: ; 0x021E4DB8 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E4DB8 + + thumb_func_start ov21_021E4DBC +ov21_021E4DBC: ; 0x021E4DBC + mov r0, #0 + bx lr + thumb_func_end ov21_021E4DBC + + thumb_func_start ov21_021E4DC0 +ov21_021E4DC0: ; 0x021E4DC0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #4] + bl ov21_021D37BC + add r7, r0, #0 + ldr r0, [r5, #4] + mov r1, #0x70 + bl sub_02018144 + mov r1, #0 + mov r2, #0x70 + add r4, r0, #0 + bl sub_020D5124 + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E5128 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E51DC + add r0, r7, #0 + bl sub_020050F8 + str r0, [r4, #0x6c] + str r4, [r5, #8] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4DC0 + + thumb_func_start ov21_021E4E00 +ov21_021E4E00: ; 0x021E4E00 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021E4E1C + add r0, r4, #0 + bl ov21_021E5E18 + add r0, r4, #0 + bl ov21_021E5E28 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E4E1C: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021E4E26 + mov r0, #0 + pop {r3, r4, r5, pc} +_021E4E26: + ldr r0, [r4, #0x3c] + str r0, [r5, #0xc] + ldr r0, [r5, #8] + bl ov21_021E33AC + cmp r0, #0 + beq _021E4E80 + bl sub_0200598C + cmp r0, #0 + bne _021E4E48 + ldr r0, [r4, #0x64] + cmp r0, #0 + bne _021E4E48 + add r0, r4, #0 + bl ov21_021E5E18 +_021E4E48: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E51DC + ldr r0, [r5, #8] + bl ov21_021E33BC + cmp r0, #0 + beq _021E4E6C + ldr r0, [r5, #4] + bl ov21_021D3998 + cmp r0, #2 + bne _021E4E6C + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E5F5C +_021E4E6C: + ldr r0, [r4, #0x64] + cmp r0, #0 + beq _021E4E80 + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021E4E80 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E5E48 +_021E4E80: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E4E00 + + thumb_func_start ov21_021E4E84 +ov21_021E4E84: ; 0x021E4E84 + push {r4, lr} + ldr r4, [r0, #8] + add r0, r4, #0 + bl ov21_021E5200 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021E4E84 + + thumb_func_start ov21_021E4E98 +ov21_021E4E98: ; 0x021E4E98 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021E4F1C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E4EB4: ; jump table + .short _021E4EBC - _021E4EB4 - 2 ; case 0 + .short _021E4ED6 - _021E4EB4 - 2 ; case 1 + .short _021E4EF4 - _021E4EB4 - 2 ; case 2 + .short _021E4F0A - _021E4EB4 - 2 ; case 3 +_021E4EBC: + ldr r0, [r4, #4] + mov r1, #0x74 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x74 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4F1C +_021E4ED6: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E54D4 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E507C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4F1C +_021E4EF4: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E50EC + cmp r0, #0 + beq _021E4F1C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E4F1C +_021E4F0A: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D25AC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E4F1C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4E98 + + thumb_func_start ov21_021E4F20 +ov21_021E4F20: ; 0x021E4F20 + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r7, r0, #0 + ldr r0, [r6, #8] + ldr r4, [r3, #8] + ldr r5, [r1, #8] + bl ov21_021E33AC + cmp r0, #0 + beq _021E4F74 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E59B4 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E5A04 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E5A2C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E5B50 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov21_021E5B6C + add r0, r5, #0 + bl ov21_021E5C4C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E5F38 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021E5FD0 +_021E4F74: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4F20 + + thumb_func_start ov21_021E4F78 +ov21_021E4F78: ; 0x021E4F78 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r5, [r4, #8] + cmp r0, #4 + bhi _021E5000 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E4F94: ; jump table + .short _021E4F9E - _021E4F94 - 2 ; case 0 + .short _021E4FC6 - _021E4F94 - 2 ; case 1 + .short _021E4FDC - _021E4F94 - 2 ; case 2 + .short _021E4FEE - _021E4F94 - 2 ; case 3 + .short _021E4FFC - _021E4F94 - 2 ; case 4 +_021E4F9E: + mov r0, #0x79 + ldr r1, [r6, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + bl ov21_021D25AC + add r0, r5, #0 + bl ov21_021E5EC0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021E507C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E5000 +_021E4FC6: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0 + bl ov21_021E50EC + cmp r0, #0 + beq _021E5000 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E5000 +_021E4FDC: + ldr r2, [r4, #4] + add r0, r5, #0 + add r1, r6, #0 + bl ov21_021E5510 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E5000 +_021E4FEE: + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E5000 +_021E4FFC: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E5000: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E4F78 + + thumb_func_start ov21_021E5004 +ov21_021E5004: ; 0x021E5004 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #0x20] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #0x50] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02012AF0 + ldr r0, [r4, #0x54] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5004 + + thumb_func_start ov21_021E5040 +ov21_021E5040: ; 0x021E5040 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r4, #0x20] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r4, #0x50] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + ldr r0, [r4, #0x54] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5040 + + thumb_func_start ov21_021E507C +ov21_021E507C: ; 0x021E507C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E5004 + ldr r0, [r4, #8] + bl ov21_021E33A4 + cmp r0, #0 + beq _021E50E8 + cmp r6, #0 + beq _021E50C2 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #3 + add r2, r1, #0 + sub r2, #0x13 + bl ov21_021D23F8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E50C2: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #3 + add r3, r1, #0 + sub r3, #0x13 + bl ov21_021D23F8 +_021E50E8: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E507C + + thumb_func_start ov21_021E50EC +ov21_021E50EC: ; 0x021E50EC + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E33A4 + cmp r0, #0 + beq _021E510C + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov21_021D2424 + b _021E5112 +_021E510C: + mov r0, #2 + bl sub_0200AC1C +_021E5112: + cmp r0, #0 + beq _021E5124 + cmp r4, #0 + beq _021E5120 + add r0, r6, #0 + bl ov21_021E5040 +_021E5120: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E5124: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E50EC + + thumb_func_start ov21_021E5128 +ov21_021E5128: ; 0x021E5128 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r4, #0 + mov r1, #0xc + bl sub_02018144 + str r0, [r5, #4] + add r0, r4, #0 + mov r1, #8 + bl sub_02018144 + str r0, [r5, #0x10] + mov r0, #0x6a + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x35 + mov r2, #0x51 + mov r3, #0x16 + bl ov21_021D154C + ldr r1, [r5, #4] + mov r0, #0xfe + strb r0, [r1, #4] + ldr r1, [r5, #4] + mov r2, #0x33 + strb r2, [r1, #5] + ldr r1, [r5, #4] + mov r2, #0x9d + strb r2, [r1, #6] + ldr r1, [r5, #4] + mov r2, #0x20 + strb r2, [r1, #7] + ldr r1, [r5, #4] + mov r2, #0x9b + strb r0, [r1, #8] + ldr r0, [r5, #4] + mov r1, #0xb3 + strb r1, [r0, #9] + ldr r0, [r5, #4] + mov r1, #0x7b + strb r1, [r0, #0xa] + ldr r0, [r5, #4] + mov r1, #0x48 + strb r1, [r0, #0xb] + mov r0, #0xcc + str r0, [sp] + ldr r0, [r5, #0x10] + mov r1, #0x6b + mov r3, #0x9c + bl ov21_021D154C + mov r0, #0xf6 + str r0, [sp] + ldr r0, [r5, #0x10] + mov r1, #0x96 + add r0, r0, #4 + mov r2, #0xb6 + mov r3, #0xd6 + bl ov21_021D154C + str r6, [r5, #8] + str r5, [r5, #0xc] + str r4, [sp] + add r3, r5, #0 + ldr r0, [r5, #4] + ldr r2, _021E51D4 ; =ov21_021E5228 + mov r1, #3 + add r3, #8 + bl sub_02023FCC + str r0, [r5, #0] + str r4, [sp] + add r3, r5, #0 + ldr r0, [r5, #0x10] + ldr r2, _021E51D8 ; =ov21_021E5268 + mov r1, #2 + add r3, #8 + bl sub_02023FCC + str r0, [r5, #0x14] + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021E51D4: .word ov21_021E5228 +_021E51D8: .word ov21_021E5268 + thumb_func_end ov21_021E5128 + + thumb_func_start ov21_021E51DC +ov21_021E51DC: ; 0x021E51DC + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + add r2, r4, #0 + mov r0, #0x64 +_021E51E6: + add r1, r1, #1 + str r0, [r2, #0x18] + add r2, r2, #4 + cmp r1, #2 + blt _021E51E6 + ldr r0, [r4, #0] + bl sub_0202404C + ldr r0, [r4, #0x14] + bl sub_0202404C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E51DC + + thumb_func_start ov21_021E5200 +ov21_021E5200: ; 0x021E5200 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #0x14] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #0x10] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x10] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5200 + + thumb_func_start ov21_021E5228 +ov21_021E5228: ; 0x021E5228 + push {r3, lr} + ldr r3, [r2, #0] + ldr r2, [r2, #4] + cmp r1, #3 + bhi _021E5264 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E523E: ; jump table + .short _021E5246 - _021E523E - 2 ; case 0 + .short _021E5256 - _021E523E - 2 ; case 1 + .short _021E524E - _021E523E - 2 ; case 2 + .short _021E525E - _021E523E - 2 ; case 3 +_021E5246: + add r1, r3, #0 + bl ov21_021E530C + pop {r3, pc} +_021E524E: + add r1, r3, #0 + bl ov21_021E537C + pop {r3, pc} +_021E5256: + add r1, r3, #0 + bl ov21_021E545C + pop {r3, pc} +_021E525E: + add r1, r3, #0 + bl ov21_021E5498 +_021E5264: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5228 + + thumb_func_start ov21_021E5268 +ov21_021E5268: ; 0x021E5268 + push {r3, r4, r5, r6, r7, lr} + ldr r5, [r2, #0] + add r6, r0, #0 + ldr r0, [r5, #4] + ldr r4, [r2, #4] + add r7, r1, #0 + bl ov21_021D37BC + str r0, [sp] + lsl r0, r6, #2 + add r0, r4, r0 + str r7, [r0, #0x18] + cmp r7, #3 + bhi _021E5304 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E5290: ; jump table + .short _021E5298 - _021E5290 - 2 ; case 0 + .short _021E5304 - _021E5290 - 2 ; case 1 + .short _021E52A6 - _021E5290 - 2 ; case 2 + .short _021E5304 - _021E5290 - 2 ; case 3 +_021E5298: + ldr r0, [r5, #8] + mov r1, #1 + bl ov21_021E33B4 + mov r0, #0 + str r0, [r4, #0x24] + pop {r3, r4, r5, r6, r7, pc} +_021E52A6: + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _021E5304 + mov r2, #1 + str r2, [r4, #0x24] + cmp r6, #0 + beq _021E52BA + cmp r6, #1 + beq _021E52F0 + pop {r3, r4, r5, r6, r7, pc} +_021E52BA: + ldr r0, [r4, #0x64] + cmp r0, #1 + ldr r0, [r4, #0x2c] + bne _021E52DA + cmp r0, #0 + bne _021E52D2 + ldr r2, [sp] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E5DE8 + pop {r3, r4, r5, r6, r7, pc} +_021E52D2: + add r0, r4, #0 + bl ov21_021E5E18 + pop {r3, r4, r5, r6, r7, pc} +_021E52DA: + cmp r0, #1 + bne _021E52E4 + mov r0, #0 + bl sub_0200592C +_021E52E4: + ldr r2, [sp] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E5DE8 + pop {r3, r4, r5, r6, r7, pc} +_021E52F0: + mov r0, #2 + str r0, [r4, #0x28] + ldr r1, [r4, #0x64] + add r0, r4, #0 + eor r1, r2 + bl ov21_021E5E78 + ldr r0, _021E5308 ; =0x000005DD + bl sub_02005748 +_021E5304: + pop {r3, r4, r5, r6, r7, pc} + nop +_021E5308: .word 0x000005DD + thumb_func_end ov21_021E5268 + + thumb_func_start ov21_021E530C +ov21_021E530C: ; 0x021E530C + push {r4, lr} + add r4, r2, #0 + cmp r0, #0 + beq _021E531E + cmp r0, #1 + beq _021E5336 + cmp r0, #2 + beq _021E5352 + pop {r4, pc} +_021E531E: + ldr r0, [r4, #0x2c] + cmp r0, #1 + bne _021E532A + add r0, r4, #0 + bl ov21_021E5E18 +_021E532A: + ldr r0, _021E5378 ; =0x021BF6BC + ldrh r0, [r0, #0x1c] + str r0, [r4, #0x38] + mov r0, #1 + str r0, [r4, #0x30] + pop {r4, pc} +_021E5336: + ldr r0, [r4, #0x2c] + cmp r0, #1 + bne _021E5342 + add r0, r4, #0 + bl ov21_021E5E18 +_021E5342: + mov r0, #1 + str r0, [r4, #0x4c] + ldr r0, _021E5378 ; =0x021BF6BC + ldrh r1, [r0, #0x1c] + str r1, [r4, #0x54] + ldrh r0, [r0, #0x1e] + str r0, [r4, #0x58] + pop {r4, pc} +_021E5352: + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021E5370 + ldr r0, [r4, #0x10] + bl sub_02022734 + str r0, [r4, #0x20] + ldr r0, [r4, #0x10] + add r0, r0, #4 + bl sub_02022734 + ldr r1, [r4, #0x20] + orr r0, r1 + str r0, [r4, #0x20] + pop {r4, pc} +_021E5370: + mov r0, #1 + str r0, [r4, #0x20] + pop {r4, pc} + nop +_021E5378: .word 0x021BF6BC + thumb_func_end ov21_021E530C + + thumb_func_start ov21_021E537C +ov21_021E537C: ; 0x021E537C + push {r4, lr} + add r4, r2, #0 + cmp r0, #0 + beq _021E538E + cmp r0, #1 + beq _021E53CE + cmp r0, #2 + beq _021E53F2 + pop {r4, pc} +_021E538E: + ldr r0, [r4, #0x30] + cmp r0, #1 + bne _021E544C + ldr r1, _021E5450 ; =0x021BF6BC + ldr r0, [r4, #0x38] + ldrh r2, [r1, #0x1c] + sub r2, r2, r0 + ldr r0, [r4, #0x34] + cmp r0, #0 + bne _021E53B6 + cmp r2, #0xc + blt _021E544C + mov r0, #1 + str r0, [r4, #0x34] + ldrh r0, [r1, #0x1c] + str r0, [r4, #0x38] + ldr r0, _021E5454 ; =0x000005F7 + bl sub_02005748 + pop {r4, pc} +_021E53B6: + mov r0, #0xb + mvn r0, r0 + cmp r2, r0 + bgt _021E544C + mov r0, #0 + str r0, [r4, #0x34] + ldrh r0, [r1, #0x1c] + str r0, [r4, #0x38] + ldr r0, _021E5454 ; =0x000005F7 + bl sub_02005748 + pop {r4, pc} +_021E53CE: + ldr r0, [r4, #0x4c] + cmp r0, #1 + bne _021E544C + add r0, r4, #0 + bl ov21_021E5A44 + add r0, r4, #0 + bl ov21_021E5AAC + add r0, r4, #0 + bl ov21_021E5AD8 + ldr r0, _021E5450 ; =0x021BF6BC + ldrh r1, [r0, #0x1c] + str r1, [r4, #0x54] + ldrh r0, [r0, #0x1e] + str r0, [r4, #0x58] + pop {r4, pc} +_021E53F2: + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _021E544C + ldr r0, [r4, #0x2c] + cmp r0, #0 + bne _021E540C + mov r0, #1 + str r0, [r4, #0x20] + add r0, r4, #0 + mov r1, #0 + bl ov21_021E5ED8 + b _021E5446 +_021E540C: + ldr r1, _021E5450 ; =0x021BF6BC + ldrh r0, [r1, #0x1e] + cmp r0, #0x83 + bhs _021E543A + ldr r0, [r4, #0x34] + cmp r0, #0 + bne _021E5424 + ldrh r1, [r1, #0x1c] + add r0, r4, #0 + bl ov21_021E5BE4 + b _021E542C +_021E5424: + ldrh r1, [r1, #0x1c] + add r0, r4, #0 + bl ov21_021E5C18 +_021E542C: + mov r0, #0 + str r0, [r4, #0x3c] + add r0, r4, #0 + mov r1, #1 + bl ov21_021E5ED8 + b _021E5446 +_021E543A: + add r0, r4, #0 + mov r1, #0 + bl ov21_021E5EF0 + ldr r0, _021E5458 ; =0xFFFFFA00 + str r0, [r4, #0x3c] +_021E5446: + add r0, r4, #0 + bl ov21_021E5F00 +_021E544C: + pop {r4, pc} + nop +_021E5450: .word 0x021BF6BC +_021E5454: .word 0x000005F7 +_021E5458: .word 0xFFFFFA00 + thumb_func_end ov21_021E537C + + thumb_func_start ov21_021E545C +ov21_021E545C: ; 0x021E545C + push {r4, lr} + add r4, r2, #0 + cmp r0, #0 + beq _021E546E + cmp r0, #1 + beq _021E5474 + cmp r0, #2 + beq _021E5480 + pop {r4, pc} +_021E546E: + mov r0, #0 + str r0, [r4, #0x30] + pop {r4, pc} +_021E5474: + ldr r0, [r4, #0x60] + lsl r0, r0, #2 + str r0, [r4, #0x5c] + mov r0, #0 + str r0, [r4, #0x4c] + pop {r4, pc} +_021E5480: + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _021E5494 + add r0, r4, #0 + mov r1, #0 + bl ov21_021E5ED8 + add r0, r4, #0 + bl ov21_021E5F00 +_021E5494: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E545C + + thumb_func_start ov21_021E5498 +ov21_021E5498: ; 0x021E5498 + push {r4, lr} + add r4, r2, #0 + cmp r0, #0 + beq _021E54AA + cmp r0, #1 + beq _021E54B0 + cmp r0, #2 + beq _021E54BC + pop {r4, pc} +_021E54AA: + mov r0, #0 + str r0, [r4, #0x30] + pop {r4, pc} +_021E54B0: + ldr r0, [r4, #0x60] + lsl r0, r0, #2 + str r0, [r4, #0x5c] + mov r0, #0 + str r0, [r4, #0x4c] + pop {r4, pc} +_021E54BC: + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _021E54D0 + add r0, r4, #0 + mov r1, #0 + bl ov21_021E5ED8 + add r0, r4, #0 + bl ov21_021E5F00 +_021E54D0: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5498 + + thumb_func_start ov21_021E54D4 +ov21_021E54D4: ; 0x021E54D4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E5538 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E5644 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E5734 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E58B8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E5E80 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E54D4 + + thumb_func_start ov21_021E5510 +ov21_021E5510: ; 0x021E5510 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E5898 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E599C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E56F0 + add r0, r4, #0 + bl ov21_021E5620 + add r0, r5, #0 + bl ov21_021E5E98 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E5510 + + thumb_func_start ov21_021E5538 +ov21_021E5538: ; 0x021E5538 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x22 + mov r3, #6 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x47 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_0201C3C0 + ldr r0, [r5, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x23 + mov r3, #7 + bl ov21_021D2724 + str r4, [sp] + ldr r0, [r5, #0] + mov r1, #0x48 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r4, r0, #0 + ldrh r0, [r2] + mov r1, #7 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0] + mov r1, #7 + ldr r0, [r0, #0] + bl sub_0201C3C0 + ldr r0, [r5, #0] + mov r2, #0 + add r3, r2, #0 + ldr r0, [r0, #0] + mov r1, #7 + sub r3, #0x30 + bl sub_02019184 + ldr r0, [r5, #0] + mov r2, #3 + add r3, r2, #0 + ldr r0, [r0, #0] + mov r1, #7 + sub r3, #0x13 + bl sub_02019184 + mov r0, #7 + mov r1, #3 + bl sub_02019060 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E5538 + + thumb_func_start ov21_021E5620 +ov21_021E5620: ; 0x021E5620 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + bl sub_02019EBC + mov r0, #7 + mov r1, #1 + bl sub_02019060 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5620 + + thumb_func_start ov21_021E5644 +ov21_021E5644: ; 0x021E5644 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E56E4 ; =0x00002781 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x71 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #0x58] + bl sub_0200A3DC + ldr r0, [r5, #0x58] + bl sub_02009D4C + ldr r0, _021E56E8 ; =0x00002722 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x12 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x5c] + bl sub_0200A640 + ldr r0, [r5, #0x5c] + bl sub_02009D4C + ldr r0, _021E56EC ; =0x00002782 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x72 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x60] + mov r0, #0x9e + lsl r0, r0, #6 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x70 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x64] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E56E4: .word 0x00002781 +_021E56E8: .word 0x00002722 +_021E56EC: .word 0x00002782 + thumb_func_end ov21_021E5644 + + thumb_func_start ov21_021E56F0 +ov21_021E56F0: ; 0x021E56F0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x58] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x5c] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x58] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x5c] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x60] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x64] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E56F0 + + thumb_func_start ov21_021E5734 +ov21_021E5734: ; 0x021E5734 + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + mov r3, #0x9e + add r5, r0, #0 + lsl r3, r3, #6 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + add r2, r3, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r2, #0x5e + add r3, r3, #2 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x43 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + lsl r0, r0, #0x11 + str r0, [sp, #0x34] + mov r0, #3 + lsl r1, r1, #0xc + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + str r6, [sp, #0x48] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0x3c] + mov r1, #4 + bl sub_02021D6C + ldr r0, [r5, #0x3c] + mov r1, #1 + bl sub_02021CC8 + mov r1, #2 + ldr r0, [r5, #0x3c] + lsl r1, r1, #0xc + bl sub_02021CE4 + ldr r0, [r5, #0x3c] + mov r1, #8 + bl sub_02021E50 + mov r0, #0x33 + lsl r0, r0, #0xc + str r0, [sp, #0x34] + mov r1, #0x9d + mov r0, #3 + lsl r1, r1, #0xc + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02021CF8 + mov r0, #0x2d + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r1, #0x83 + mov r0, #3 + lsl r1, r1, #0xc + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #4] + mov r1, #3 + bl sub_02021D6C + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021CC8 + mov r1, #2 + ldr r0, [r5, #4] + lsl r1, r1, #0xc + bl sub_02021CE4 + ldr r0, [r5, #4] + mov r1, #5 + bl sub_02021E50 + mov r2, #3 + str r2, [r5, #8] + mov r1, #2 + str r1, [r5, #0xc] + str r2, [r5, #0x10] + mov r0, #5 + str r0, [r5, #0x18] + mov r0, #0xe6 + str r1, [r5, #0x1c] + lsl r0, r0, #0xc + mov r1, #0xa6 + str r0, [sp, #0x34] + lsl r1, r1, #0xc + lsl r0, r2, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0x20] + mov r1, #6 + bl sub_02021D6C + ldr r0, [r5, #0x20] + mov r1, #1 + bl sub_02021CC8 + mov r1, #2 + ldr r0, [r5, #0x20] + lsl r1, r1, #0xc + bl sub_02021CE4 + ldr r0, [r5, #0x20] + mov r1, #5 + bl sub_02021E50 + mov r1, #6 + str r1, [r5, #0x24] + mov r0, #5 + str r0, [r5, #0x28] + str r1, [r5, #0x2c] + str r0, [r5, #0x34] + mov r0, #2 + str r0, [r5, #0x38] + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5734 + + thumb_func_start ov21_021E5898 +ov21_021E5898: ; 0x021E5898 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02021BD4 + ldr r0, [r4, #0x3c] + bl sub_02021BD4 + ldr r0, [r4, #4] + bl sub_02021BD4 + ldr r0, [r4, #0x20] + bl sub_02021BD4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5898 + + thumb_func_start ov21_021E58B8 +ov21_021E58B8: ; 0x021E58B8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r4, [r1, #0] + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021E5994 ; =0x00002722 + add r6, r2, #0 + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #8] + mov r1, #0 + bl sub_0200A72C + mov r2, #0 + mov r1, #0x45 + lsl r1, r1, #2 + str r1, [sp, #0x1c] + mov r1, #2 + str r0, [sp, #0x10] + str r2, [sp, #0x14] + str r1, [sp, #0x20] + str r2, [sp, #0x24] + str r1, [sp, #0x28] + str r6, [sp, #0x2c] + bl sub_0201FAB4 + add r7, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E5998 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x29 + bl ov21_021D4DAC + lsr r1, r0, #1 + mov r0, #0x40 + sub r0, r0, r1 + str r0, [sp, #0x18] + str r6, [sp, #0xc] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #0x50] + ldr r0, [r0, #0] + add r1, r7, #0 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #8 + mov r2, #2 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E5998 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x2a + bl ov21_021D4DAC + lsr r1, r0, #1 + mov r0, #0x40 + sub r0, r0, r1 + str r0, [sp, #0x18] + str r6, [sp, #0xc] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #0x54] + ldr r0, [r0, #0] + add r1, r7, #0 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + ldr r0, [r5, #0x54] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E5994: .word 0x00002722 +_021E5998: .word 0x000002B9 + thumb_func_end ov21_021E58B8 + + thumb_func_start ov21_021E599C +ov21_021E599C: ; 0x021E599C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E59A2: + ldr r0, [r5, #0x50] + bl ov21_021D4D1C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E59A2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E599C + + thumb_func_start ov21_021E59B4 +ov21_021E59B4: ; 0x021E59B4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0x40] + ldr r0, [r4, #0x34] + cmp r1, r0 + beq _021E5A00 + ldr r0, [r5, #0x3c] + bl sub_02021E74 + add r6, r0, #0 + ldr r0, [r4, #0x34] + cmp r0, #0 + ldr r0, [r5, #0x3c] + bne _021E59E8 + mov r1, #4 + bl sub_02021D6C + mov r1, #8 + sub r1, r1, r6 + lsl r1, r1, #0x10 + ldr r0, [r5, #0x3c] + lsr r1, r1, #0x10 + bl sub_02021E50 + b _021E59FC +_021E59E8: + mov r1, #0 + bl sub_02021D6C + mov r1, #8 + sub r1, r1, r6 + lsl r1, r1, #0x10 + ldr r0, [r5, #0x3c] + lsr r1, r1, #0x10 + bl sub_02021E50 +_021E59FC: + ldr r0, [r4, #0x34] + str r0, [r5, #0x40] +_021E5A00: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E59B4 + + thumb_func_start ov21_021E5A04 +ov21_021E5A04: ; 0x021E5A04 + push {r4, lr} + add r2, r1, #0 + add r4, r0, #0 + ldr r0, [r2, #0x64] + ldr r3, [r2, #0x18] + cmp r0, #0 + ldr r0, [r4, #4] + bne _021E5A20 + add r4, #8 + add r1, r4, #0 + mov r2, #0 + bl ov21_021E5CF8 + pop {r4, pc} +_021E5A20: + add r4, #8 + ldr r2, [r2, #0x2c] + add r1, r4, #0 + bl ov21_021E5C80 + pop {r4, pc} + thumb_func_end ov21_021E5A04 + + thumb_func_start ov21_021E5A2C +ov21_021E5A2C: ; 0x021E5A2C + push {r3, lr} + add r2, r0, #0 + ldr r0, [r2, #0x20] + add r3, r1, #0 + add r2, #0x24 + add r1, r2, #0 + ldr r2, [r3, #0x64] + ldr r3, [r3, #0x1c] + bl ov21_021E5C80 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5A2C + + thumb_func_start ov21_021E5A44 +ov21_021E5A44: ; 0x021E5A44 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r3, _021E5AA8 ; =0x021BF6BC + ldr r0, [r5, #0x54] + ldrh r2, [r3, #0x1c] + ldrh r3, [r3, #0x1e] + ldr r1, [r5, #0x58] + sub r0, #0x33 + sub r1, #0x9d + sub r2, #0x33 + sub r3, #0x9d + bl sub_0201D4CC + add r6, r0, #0 + bpl _021E5A6A + neg r0, r6 +_021E5A6A: + cmp r0, #1 + blt _021E5AA4 + ldr r0, [r5, #0x5c] + add r4, r5, #0 + add r4, #0x5c + add r0, r0, r6 + str r0, [r5, #0x5c] + ldr r0, [r4, #0] + bpl _021E5A82 + add r0, #0x58 + str r0, [r4, #0] + b _021E5A8A +_021E5A82: + mov r1, #0x58 + bl sub_020E1F6C + str r1, [r4, #0] +_021E5A8A: + ldr r0, [r5, #0x5c] + cmp r0, #0x20 + blt _021E5AA4 + cmp r0, #0x38 + bgt _021E5AA4 + cmp r6, #0 + ble _021E5AA0 + mov r0, #0x20 + add sp, #4 + str r0, [r5, #0x5c] + pop {r3, r4, r5, r6, pc} +_021E5AA0: + mov r0, #0x38 + str r0, [r5, #0x5c] +_021E5AA4: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E5AA8: .word 0x021BF6BC + thumb_func_end ov21_021E5A44 + + thumb_func_start ov21_021E5AAC +ov21_021E5AAC: ; 0x021E5AAC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x5c] + asr r0, r1, #1 + lsr r0, r0, #0x1e + add r0, r1, r0 + asr r1, r0, #2 + ldr r0, [r4, #0x60] + cmp r1, r0 + beq _021E5AD2 + ldr r0, _021E5AD4 ; =0x000005F7 + bl sub_02005748 + ldr r1, [r4, #0x5c] + asr r0, r1, #1 + lsr r0, r0, #0x1e + add r0, r1, r0 + asr r0, r0, #2 + str r0, [r4, #0x60] +_021E5AD2: + pop {r4, pc} + ; .align 2, 0 +_021E5AD4: .word 0x000005F7 + thumb_func_end ov21_021E5AAC + + thumb_func_start ov21_021E5AD8 +ov21_021E5AD8: ; 0x021E5AD8 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x5c] + cmp r1, #0 + bne _021E5AE8 + bl ov21_021E5E28 + pop {r4, pc} +_021E5AE8: + ble _021E5B16 + cmp r1, #0x2c + bgt _021E5B16 + ldr r0, [r4, #0x50] + cmp r0, #1 + bne _021E5AFA + mov r0, #0 + bl sub_02004EEC +_021E5AFA: + ldr r0, [r4, #0x50] + cmp r0, #2 + beq _021E5B08 + bl sub_02004EFC + mov r0, #2 + str r0, [r4, #0x50] +_021E5B08: + ldr r0, [r4, #0x60] + cmp r0, #0 + bne _021E5B10 + mov r0, #1 +_021E5B10: + bl sub_02004F4C + pop {r4, pc} +_021E5B16: + ldr r0, [r4, #0x50] + cmp r0, #2 + bne _021E5B20 + bl sub_02004F44 +_021E5B20: + ldr r0, [r4, #0x50] + cmp r0, #1 + beq _021E5B30 + mov r0, #0 + bl sub_02004EC8 + mov r0, #1 + str r0, [r4, #0x50] +_021E5B30: + ldr r0, [r4, #0x5c] + cmp r0, #0 + bne _021E5B3A + mov r0, #0x58 + str r0, [r4, #0x5c] +_021E5B3A: + ldr r1, [r4, #0x60] + mov r0, #0x16 + sub r0, r0, r1 + lsl r0, r0, #3 + cmp r0, #0 + ble _021E5B48 + sub r0, r0, #1 +_021E5B48: + mov r1, #0 + bl sub_02004EF4 + pop {r4, pc} + thumb_func_end ov21_021E5AD8 + + thumb_func_start ov21_021E5B50 +ov21_021E5B50: ; 0x021E5B50 + push {r4, lr} + ldr r1, [r1, #0x5c] + add r4, r0, #0 + mov r0, #0xe + bl sub_0201D580 + add r1, r0, #0 + lsl r1, r1, #0x10 + ldr r0, [r4, #0] + lsr r1, r1, #0x10 + bl sub_02021C94 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5B50 + + thumb_func_start ov21_021E5B6C +ov21_021E5B6C: ; 0x021E5B6C + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, [r2, #0x6c] + add r5, r0, #0 + ldr r2, [r2, #0x3c] + mov r0, #1 + bl sub_02005188 + add r6, r0, #0 + bne _021E5B84 + mov r0, #0 + str r0, [r5, #0x48] +_021E5B84: + add r0, r5, #0 + ldr r1, [r5, #0x48] + add r0, #0x4c + sub r1, r6, r1 + lsl r1, r1, #4 + ldrh r0, [r0] + neg r1, r1 + add r1, r0, r1 + add r0, r5, #0 + add r0, #0x4c + strh r1, [r0] + add r0, r5, #0 + add r0, #0x4c + ldrh r1, [r0] + add r0, r5, #0 + add r0, #0x4c + strh r1, [r0] + add r0, r5, #0 + add r0, #0x4c + ldrh r0, [r0] + mov r1, #0xb6 + bl sub_020E1F6C + add r3, r0, #0 + ldr r0, [r4, #0] + lsl r3, r3, #0x10 + ldr r0, [r0, #0] + mov r1, #7 + mov r2, #0 + lsr r3, r3, #0x10 + bl sub_0201C660 + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + mov r2, #9 + mov r3, #0x83 + bl sub_0201C718 + ldr r0, [r4, #0] + mov r1, #7 + ldr r0, [r0, #0] + mov r2, #0xc + mov r3, #0x63 + bl sub_0201C718 + str r6, [r5, #0x48] + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E5B6C + + thumb_func_start ov21_021E5BE4 +ov21_021E5BE4: ; 0x021E5BE4 + push {r4, lr} + sub r1, #0x6b + add r4, r0, #0 + lsl r0, r1, #0xc + mov r2, #0x7f + asr r1, r0, #0x1f + lsl r2, r2, #0xc + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #9 + lsl r1, r1, #0x10 + bl sub_020BCFD0 + asr r0, r0, #0xc + str r0, [r4, #0x44] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5BE4 + + thumb_func_start ov21_021E5C18 +ov21_021E5C18: ; 0x021E5C18 + push {r4, lr} + sub r1, #0xb3 + add r4, r0, #0 + lsl r0, r1, #0xc + mov r2, #0x7f + asr r1, r0, #0x1f + lsl r2, r2, #0xc + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #0x12 + lsl r1, r1, #0xe + bl sub_020BCFD0 + asr r0, r0, #0xc + str r0, [r4, #0x40] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5C18 + + thumb_func_start ov21_021E5C4C +ov21_021E5C4C: ; 0x021E5C4C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + cmp r0, #0 + ldr r0, [r4, #0x50] + bne _021E5C6C + ldr r0, [r0, #0] + mov r1, #1 + bl sub_020129D0 + ldr r0, [r4, #0x54] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_020129D0 + pop {r4, pc} +_021E5C6C: + ldr r0, [r0, #0] + mov r1, #0 + bl sub_020129D0 + ldr r0, [r4, #0x54] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_020129D0 + pop {r4, pc} + thumb_func_end ov21_021E5C4C + + thumb_func_start ov21_021E5C80 +ov21_021E5C80: ; 0x021E5C80 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + cmp r4, #3 + bne _021E5C90 + mov r4, #1 +_021E5C90: + add r0, r6, #0 + bl sub_02021E74 + str r0, [sp] + ldr r0, [r5, #0xc] + cmp r0, r7 + beq _021E5CAA + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021E5D90 + str r7, [r5, #0xc] +_021E5CAA: + cmp r4, #2 + bgt _021E5CBE + cmp r4, #0 + blt _021E5CF4 + beq _021E5CF4 + cmp r4, #1 + beq _021E5CE0 + cmp r4, #2 + beq _021E5CC4 + pop {r3, r4, r5, r6, r7, pc} +_021E5CBE: + cmp r4, #0x64 + beq _021E5CE0 + pop {r3, r4, r5, r6, r7, pc} +_021E5CC4: + ldr r1, [r5, #0x14] + ldr r0, [sp] + cmp r0, r1 + ble _021E5CF4 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + bl sub_02021E50 + add r0, r6, #0 + mov r1, #0 + bl sub_02021CE4 + pop {r3, r4, r5, r6, r7, pc} +_021E5CE0: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021E5D90 + mov r1, #2 + add r0, r6, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 +_021E5CF4: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5C80 + + thumb_func_start ov21_021E5CF8 +ov21_021E5CF8: ; 0x021E5CF8 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + cmp r4, #1 + bne _021E5D08 + mov r4, #3 +_021E5D08: + add r0, r6, #0 + bl sub_02021E74 + ldr r0, [r5, #0xc] + cmp r0, r7 + beq _021E5D20 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021E5D90 + str r7, [r5, #0xc] +_021E5D20: + cmp r4, #3 + bgt _021E5D34 + cmp r4, #0 + blt _021E5D8E + beq _021E5D3A + cmp r4, #2 + beq _021E5D64 + cmp r4, #3 + beq _021E5D7A + pop {r3, r4, r5, r6, r7, pc} +_021E5D34: + cmp r4, #0x64 + beq _021E5D7A + pop {r3, r4, r5, r6, r7, pc} +_021E5D3A: + cmp r7, #1 + bne _021E5D4A + add r0, r6, #0 + add r1, r5, #0 + mov r2, #0 + bl ov21_021E5D90 + b _021E5D54 +_021E5D4A: + add r0, r6, #0 + add r1, r5, #0 + mov r2, #1 + bl ov21_021E5D90 +_021E5D54: + ldr r1, [r5, #0x14] + add r0, r6, #0 + sub r1, r1, #1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02021E50 + pop {r3, r4, r5, r6, r7, pc} +_021E5D64: + ldr r1, [r5, #0x14] + add r0, r6, #0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02021E50 + add r0, r6, #0 + mov r1, #0 + bl sub_02021CE4 + pop {r3, r4, r5, r6, r7, pc} +_021E5D7A: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov21_021E5D90 + mov r1, #2 + add r0, r6, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 +_021E5D8E: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E5CF8 + + thumb_func_start ov21_021E5D90 +ov21_021E5D90: ; 0x021E5D90 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + bl sub_02021E74 + add r6, r0, #0 + cmp r7, #1 + ldr r1, [r4, #8] + bne _021E5DC6 + ldr r0, [r4, #0] + cmp r1, r0 + bne _021E5DE6 + ldr r1, [r4, #4] + add r0, r5, #0 + bl sub_02021D6C + ldr r0, [r4, #4] + str r0, [r4, #8] + ldr r1, [r4, #0x10] + add r0, r5, #0 + sub r1, r1, r6 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02021E50 + pop {r3, r4, r5, r6, r7, pc} +_021E5DC6: + ldr r0, [r4, #4] + cmp r1, r0 + bne _021E5DE6 + ldr r1, [r4, #0] + add r0, r5, #0 + bl sub_02021D6C + ldr r0, [r4, #0] + str r0, [r4, #8] + ldr r1, [r4, #0x10] + add r0, r5, #0 + sub r1, r1, r6 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02021E50 +_021E5DE6: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E5D90 + + thumb_func_start ov21_021E5DE8 +ov21_021E5DE8: ; 0x021E5DE8 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #1 + str r0, [r4, #0x2c] + ldr r0, _021E5E14 ; =0x000001FF + lsl r1, r2, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r2, r3, #0 + mov r0, #0xd + lsr r1, r1, #0x10 + mov r3, #0x7f + bl sub_020059D0 + add r0, r4, #0 + bl ov21_021E5F00 + add sp, #8 + pop {r4, pc} + nop +_021E5E14: .word 0x000001FF + thumb_func_end ov21_021E5DE8 + + thumb_func_start ov21_021E5E18 +ov21_021E5E18: ; 0x021E5E18 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + bl sub_0200592C + mov r0, #0 + str r0, [r4, #0x2c] + pop {r4, pc} + thumb_func_end ov21_021E5E18 + + thumb_func_start ov21_021E5E28 +ov21_021E5E28: ; 0x021E5E28 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #1 + bne _021E5E38 + mov r0, #0 + bl sub_02004EEC +_021E5E38: + ldr r0, [r4, #0x50] + cmp r0, #2 + bne _021E5E42 + bl sub_02004F44 +_021E5E42: + mov r0, #0 + str r0, [r4, #0x50] + pop {r4, pc} + thumb_func_end ov21_021E5E28 + + thumb_func_start ov21_021E5E48 +ov21_021E5E48: ; 0x021E5E48 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r6, r0, #0 + bl sub_0200598C + cmp r0, #0 + bne _021E5E74 + ldr r0, [r5, #0x68] + sub r0, r0, #1 + str r0, [r5, #0x68] + bne _021E5E74 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E5DE8 + mov r0, #0xa + str r0, [r5, #0x68] +_021E5E74: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5E48 + + thumb_func_start ov21_021E5E78 +ov21_021E5E78: ; 0x021E5E78 + str r1, [r0, #0x64] + mov r1, #0xa + str r1, [r0, #0x68] + bx lr + thumb_func_end ov21_021E5E78 + + thumb_func_start ov21_021E5E80 +ov21_021E5E80: ; 0x021E5E80 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + ldr r0, [r1, #0] + add r2, r4, #0 + mov r1, #0x14 + add r2, #0x6c + bl ov21_021D27E0 + str r0, [r4, #0x68] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5E80 + + thumb_func_start ov21_021E5E98 +ov21_021E5E98: ; 0x021E5E98 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x68] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x68] + str r0, [r4, #0x6c] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5E98 + + thumb_func_start ov21_021E5EAC +ov21_021E5EAC: ; 0x021E5EAC + push {r3, lr} + add r2, r0, #0 + ldr r2, [r2, #0x6c] + mov r0, #0x1f + ldr r2, [r2, #0xc] + mov r1, #0xe0 + mov r3, #0x20 + bl sub_0201DC68 + pop {r3, pc} + thumb_func_end ov21_021E5EAC + + thumb_func_start ov21_021E5EC0 +ov21_021E5EC0: ; 0x021E5EC0 + push {r3, lr} + add r2, r0, #0 + ldr r2, [r2, #0x6c] + mov r0, #0x1f + ldr r2, [r2, #0xc] + mov r1, #0xe0 + add r2, #0x20 + mov r3, #0x20 + bl sub_0201DC68 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5EC0 + + thumb_func_start ov21_021E5ED8 +ov21_021E5ED8: ; 0x021E5ED8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E5EF0 + cmp r4, #0 + bne _021E5EEC + add r0, r5, #0 + bl ov21_021E5EF4 +_021E5EEC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5ED8 + + thumb_func_start ov21_021E5EF0 +ov21_021E5EF0: ; 0x021E5EF0 + str r1, [r0, #0x48] + bx lr + thumb_func_end ov21_021E5EF0 + + thumb_func_start ov21_021E5EF4 +ov21_021E5EF4: ; 0x021E5EF4 + mov r1, #0 + str r1, [r0, #0x3c] + str r1, [r0, #0x40] + str r1, [r0, #0x44] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E5EF4 + + thumb_func_start ov21_021E5F00 +ov21_021E5F00: ; 0x021E5F00 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _021E5F20 + ldr r0, [r4, #0x3c] + bl ov21_021E5FF4 + ldr r1, _021E5F24 ; =0x0000FFFF + ldr r2, [r4, #0x40] + mov r0, #1 + bl sub_02004F94 + ldr r0, [r4, #0x44] + bl ov21_021E5F28 +_021E5F20: + pop {r4, pc} + nop +_021E5F24: .word 0x0000FFFF + thumb_func_end ov21_021E5F00 + + thumb_func_start ov21_021E5F28 +ov21_021E5F28: ; 0x021E5F28 + ldr r3, _021E5F34 ; =sub_02004A54 + add r1, r0, #0 + mov r0, #8 + mov r2, #0 + bx r3 + nop +_021E5F34: .word sub_02004A54 + thumb_func_end ov21_021E5F28 + + thumb_func_start ov21_021E5F38 +ov21_021E5F38: ; 0x021E5F38 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, [r4, #0x48] + ldr r1, [r5, #0x70] + cmp r2, r1 + beq _021E5F58 + cmp r2, #1 + bne _021E5F50 + bl ov21_021E5EAC + b _021E5F54 +_021E5F50: + bl ov21_021E5EC0 +_021E5F54: + ldr r0, [r4, #0x48] + str r0, [r5, #0x70] +_021E5F58: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5F38 + + thumb_func_start ov21_021E5F5C +ov21_021E5F5C: ; 0x021E5F5C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r6, r0, #0 + ldr r0, _021E5FCC ; =0x021BF67C + mov r1, #1 + ldr r0, [r0, #0x48] + tst r0, r1 + beq _021E5FB0 + str r1, [r5, #0x28] + mov r0, #0 + str r0, [r5, #0x18] + ldr r1, [r5, #0x64] + cmp r1, #0 + bne _021E5F96 + ldr r1, [r5, #0x2c] + cmp r1, #1 + bne _021E5F8A + bl sub_0200592C +_021E5F8A: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E5DE8 + pop {r4, r5, r6, pc} +_021E5F96: + ldr r0, [r5, #0x2c] + cmp r0, #0 + bne _021E5FA8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E5DE8 + pop {r4, r5, r6, pc} +_021E5FA8: + add r0, r5, #0 + bl ov21_021E5E18 + pop {r4, r5, r6, pc} +_021E5FB0: + ldr r0, [r5, #0x28] + cmp r0, #1 + bne _021E5FBE + mov r0, #2 + str r0, [r5, #0x28] + str r0, [r5, #0x18] + pop {r4, r5, r6, pc} +_021E5FBE: + cmp r0, #2 + bne _021E5FC8 + mov r0, #0 + str r0, [r5, #0x28] + str r1, [r5, #0x18] +_021E5FC8: + pop {r4, r5, r6, pc} + nop +_021E5FCC: .word 0x021BF67C + thumb_func_end ov21_021E5F5C + + thumb_func_start ov21_021E5FD0 +ov21_021E5FD0: ; 0x021E5FD0 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [r0, #0] + ldr r0, [r1, #8] + bl ov21_021E33BC + cmp r0, #1 + bne _021E5FEE + mov r3, #0x18 + add r0, r4, #0 + mov r1, #0xb4 + mov r2, #0x83 + str r3, [sp] + bl ov21_021D2574 +_021E5FEE: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E5FD0 + + thumb_func_start ov21_021E5FF4 +ov21_021E5FF4: ; 0x021E5FF4 + push {r4, lr} + add r4, r0, #0 + ldr r1, _021E6010 ; =0x0000FFFF + mov r0, #1 + add r2, r4, #0 + bl sub_02004F68 + add r4, #0x14 + ldr r1, _021E6010 ; =0x0000FFFF + mov r0, #8 + add r2, r4, #0 + bl sub_02004F68 + pop {r4, pc} + ; .align 2, 0 +_021E6010: .word 0x0000FFFF + thumb_func_end ov21_021E5FF4 \ No newline at end of file diff --git a/asm/ov21_021E6014.s b/asm/ov21_021E6014.s new file mode 100644 index 000000000..15bfdb848 --- /dev/null +++ b/asm/ov21_021E6014.s @@ -0,0 +1,1171 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E6014 +ov21_021E6014: ; 0x021E6014 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E608C + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E60D8 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E6100 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E6130 + str r0, [r5, #0x24] + ldr r0, _021E605C ; =ov21_021E6134 + str r0, [r5, #8] + ldr r0, _021E6060 ; =ov21_021E6158 + str r0, [r5, #0xc] + ldr r0, _021E6064 ; =ov21_021E6168 + str r0, [r5, #0x10] + ldr r0, _021E6068 ; =ov21_021E617C + str r0, [r5, #0x14] + ldr r0, _021E606C ; =ov21_021E6200 + str r0, [r5, #0x18] + ldr r0, _021E6070 ; =ov21_021E6204 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E605C: .word ov21_021E6134 +_021E6060: .word ov21_021E6158 +_021E6064: .word ov21_021E6168 +_021E6068: .word ov21_021E617C +_021E606C: .word ov21_021E6200 +_021E6070: .word ov21_021E6204 + thumb_func_end ov21_021E6014 + + thumb_func_start ov21_021E6074 +ov21_021E6074: ; 0x021E6074 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E6104 + ldr r0, [r4, #4] + bl ov21_021E6118 + ldr r0, [r4, #0x20] + bl ov21_021E612C + pop {r4, pc} + thumb_func_end ov21_021E6074 + + thumb_func_start ov21_021E608C +ov21_021E608C: ; 0x021E608C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021E609E + bl sub_02022974 +_021E609E: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + add r0, r5, #0 + bl ov21_021D138C + str r0, [r4, #0] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E608C + + thumb_func_start ov21_021E60D8 +ov21_021E60D8: ; 0x021E60D8 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E60EA + bl sub_02022974 +_021E60EA: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E60D8 + + thumb_func_start ov21_021E6100 +ov21_021E6100: ; 0x021E6100 + mov r0, #0 + bx lr + thumb_func_end ov21_021E6100 + + thumb_func_start ov21_021E6104 +ov21_021E6104: ; 0x021E6104 + push {r4, lr} + add r4, r0, #0 + bne _021E610E + bl sub_02022974 +_021E610E: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6104 + + thumb_func_start ov21_021E6118 +ov21_021E6118: ; 0x021E6118 + push {r4, lr} + add r4, r0, #0 + bne _021E6122 + bl sub_02022974 +_021E6122: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6118 + + thumb_func_start ov21_021E612C +ov21_021E612C: ; 0x021E612C + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E612C + + thumb_func_start ov21_021E6130 +ov21_021E6130: ; 0x021E6130 + mov r0, #0 + bx lr + thumb_func_end ov21_021E6130 + + thumb_func_start ov21_021E6134 +ov21_021E6134: ; 0x021E6134 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E6148 + bl sub_02022974 +_021E6148: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + str r4, [r5, #8] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E6134 + + thumb_func_start ov21_021E6158 +ov21_021E6158: ; 0x021E6158 + ldr r0, [r0, #0xc] + cmp r0, #1 + bne _021E6162 + mov r0, #1 + bx lr +_021E6162: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E6158 + + thumb_func_start ov21_021E6168 +ov21_021E6168: ; 0x021E6168 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6168 + + thumb_func_start ov21_021E617C +ov21_021E617C: ; 0x021E617C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r3, [r3, #8] + ldr r5, [r4, #8] + cmp r0, #3 + bhi _021E61FA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E619A: ; jump table + .short _021E61A2 - _021E619A - 2 ; case 0 + .short _021E61C0 - _021E619A - 2 ; case 1 + .short _021E61E0 - _021E619A - 2 ; case 2 + .short _021E61F6 - _021E619A - 2 ; case 3 +_021E61A2: + ldr r0, [r4, #4] + mov r1, #0x14 + bl sub_02018144 + str r0, [r4, #8] + mov r2, #0x14 + mov r1, #0 +_021E61B0: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021E61B0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E61FA +_021E61C0: + ldr r0, [r4, #4] + add r1, r6, #0 + str r0, [sp] + add r0, r5, #0 + bl ov21_021E6338 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E628C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E61FA +_021E61E0: + add r0, r5, #0 + add r1, r6, #0 + mov r3, #1 + bl ov21_021E62F8 + cmp r0, #0 + beq _021E61FA + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E61FA +_021E61F6: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E61FA: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E617C + + thumb_func_start ov21_021E6200 +ov21_021E6200: ; 0x021E6200 + mov r0, #0 + bx lr + thumb_func_end ov21_021E6200 + + thumb_func_start ov21_021E6204 +ov21_021E6204: ; 0x021E6204 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r3, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021E626E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E621E: ; jump table + .short _021E6228 - _021E621E - 2 ; case 0 + .short _021E6238 - _021E621E - 2 ; case 1 + .short _021E624C - _021E621E - 2 ; case 2 + .short _021E625A - _021E621E - 2 ; case 3 + .short _021E626A - _021E621E - 2 ; case 4 +_021E6228: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E628C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E626E +_021E6238: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E62F8 + cmp r0, #0 + beq _021E626E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E626E +_021E624C: + add r1, r3, #0 + bl ov21_021E638C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E626E +_021E625A: + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E626E +_021E626A: + mov r0, #1 + pop {r4, pc} +_021E626E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6204 + + thumb_func_start ov21_021E6274 +ov21_021E6274: ; 0x021E6274 + ldr r3, _021E627C ; =sub_02021FE0 + ldr r0, [r0, #0x10] + mov r1, #1 + bx r3 + ; .align 2, 0 +_021E627C: .word sub_02021FE0 + thumb_func_end ov21_021E6274 + + thumb_func_start ov21_021E6280 +ov21_021E6280: ; 0x021E6280 + ldr r3, _021E6288 ; =sub_02021FE0 + ldr r0, [r0, #0x10] + mov r1, #0 + bx r3 + ; .align 2, 0 +_021E6288: .word sub_02021FE0 + thumb_func_end ov21_021E6280 + + thumb_func_start ov21_021E628C +ov21_021E628C: ; 0x021E628C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E6274 + ldr r0, [r4, #8] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E62F4 + cmp r6, #0 + beq _021E62D0 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E62D0: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E62F4: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E628C + + thumb_func_start ov21_021E62F8 +ov21_021E62F8: ; 0x021E62F8 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r5, #0] + beq _021E6318 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021E6322 +_021E6318: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021E6322: + cmp r0, #0 + beq _021E6334 + cmp r4, #0 + beq _021E6330 + add r0, r6, #0 + bl ov21_021E6280 +_021E6330: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E6334: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E62F8 + + thumb_func_start ov21_021E6338 +ov21_021E6338: ; 0x021E6338 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r7, r2, #0 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov21_021E63C0 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E6600 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov21_021E66B0 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov21_021E6428 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021E6518 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021E65F8 + add r0, r5, #0 + add r1, r7, #0 + bl ov21_021E67C8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6338 + + thumb_func_start ov21_021E638C +ov21_021E638C: ; 0x021E638C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E65FC + add r0, r5, #0 + bl ov21_021E65EC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E64D4 + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + add r0, r4, #0 + bl ov21_021E6844 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E638C + + thumb_func_start ov21_021E63C0 +ov21_021E63C0: ; 0x021E63C0 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r5, r2, #0 + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x4a + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E63C0 + + thumb_func_start ov21_021E6428 +ov21_021E6428: ; 0x021E6428 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E64C4 ; =0x00001BB5 + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r7, #0 + mov r2, #0x5d + bl sub_02009A4C + str r0, [r5, #0] + bl sub_0200A3DC + ldr r0, [r5, #0] + bl sub_02009D4C + ldr r0, _021E64C8 ; =0x00001B66 + add r1, r7, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xe + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #4] + bl sub_0200A640 + ldr r0, [r5, #4] + bl sub_02009D4C + ldr r0, _021E64CC ; =0x00001BB3 + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5b + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #8] + ldr r0, _021E64D0 ; =0x00001BB4 + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5c + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0xc] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E64C4: .word 0x00001BB5 +_021E64C8: .word 0x00001B66 +_021E64CC: .word 0x00001BB3 +_021E64D0: .word 0x00001BB4 + thumb_func_end ov21_021E6428 + + thumb_func_start ov21_021E64D4 +ov21_021E64D4: ; 0x021E64D4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #4] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #4] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #8] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0xc] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E64D4 + + thumb_func_start ov21_021E6518 +ov21_021E6518: ; 0x021E6518 + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + add r6, r2, #0 + add r5, r0, #0 + ldr r0, [r6, #4] + add r7, r3, #0 + ldr r4, [r1, #0] + bl ov21_021D37BC + ldr r3, _021E65E4 ; =0x00001BB4 + str r0, [sp, #0x2c] + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x50 + sub r2, #0x4e + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x30] + add r0, sp, #0x50 + str r0, [sp, #0x34] + mov r0, #0x1f + str r0, [sp, #0x44] + mov r0, #1 + str r0, [sp, #0x48] + str r7, [sp, #0x4c] + ldr r1, [r6, #4] + ldr r0, _021E65E8 ; =0x00001748 + ldr r0, [r1, r0] + ldr r1, [sp, #0x2c] + bl sub_02098848 + add r4, r0, #0 + ldr r1, [r6, #4] + ldr r0, _021E65E8 ; =0x00001748 + ldr r0, [r1, r0] + ldr r1, [sp, #0x2c] + bl sub_02098888 + add r7, r0, #0 + mov r0, #0x2a + lsl r0, r0, #0xe + str r0, [sp, #0x38] + add r0, r4, #0 + add r0, #0x58 + lsl r0, r0, #0xc + str r0, [sp, #0x3c] + add r0, sp, #0x30 + bl sub_02021B90 + str r0, [r5, #0x10] + ldr r0, [r6, #4] + bl ov21_021D3920 + cmp r0, #0 + ldr r0, [r5, #0x10] + bne _021E65CA + mov r1, #5 + bl sub_02021D6C + b _021E65D0 +_021E65CA: + mov r1, #6 + bl sub_02021D6C +_021E65D0: + ldr r0, [r5, #0x10] + add r1, r4, #0 + bl ov21_021E6860 + ldr r0, [r5, #0x10] + add r1, r7, #0 + bl ov21_021E688C + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E65E4: .word 0x00001BB4 +_021E65E8: .word 0x00001748 + thumb_func_end ov21_021E6518 + + thumb_func_start ov21_021E65EC +ov21_021E65EC: ; 0x021E65EC + ldr r3, _021E65F4 ; =sub_02021BD4 + ldr r0, [r0, #0x10] + bx r3 + nop +_021E65F4: .word sub_02021BD4 + thumb_func_end ov21_021E65EC + + thumb_func_start ov21_021E65F8 +ov21_021E65F8: ; 0x021E65F8 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E65F8 + + thumb_func_start ov21_021E65FC +ov21_021E65FC: ; 0x021E65FC + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E65FC + + thumb_func_start ov21_021E6600 +ov21_021E6600: ; 0x021E6600 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x20 + add r6, r1, #0 + bl sub_02023790 + add r4, r0, #0 + ldr r2, _021E66A8 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + mov r1, #0x2b + add r2, r4, #0 + add r6, r0, #0 + bl sub_0200B1B8 + mov r0, #0 + mov r3, #1 + add r1, r4, #0 + add r2, r0, #0 + lsl r3, r3, #8 + bl sub_02002EEC + add r3, r0, #0 + mov r0, #0x18 + str r0, [sp] + mov r1, #0 + ldr r0, _021E66AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + add r0, r6, #0 + mov r1, #9 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E66AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + mov r3, #0x20 + bl sub_0201D78C + add r0, r6, #0 + mov r1, #9 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E66AC ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + mov r3, #0x98 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021E66A8: .word 0x000002B9 +_021E66AC: .word 0x00020100 + thumb_func_end ov21_021E6600 + + thumb_func_start ov21_021E66B0 +ov21_021E66B0: ; 0x021E66B0 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x20 + add r1, r7, #0 + bl sub_02023790 + add r4, r0, #0 + ldr r0, [r6, #4] + bl ov21_021D37BC + add r1, r7, #0 + str r0, [sp, #0x10] + bl sub_0200B32C + str r0, [sp, #0x14] + bl sub_020989D0 + add r2, r0, #0 + mov r0, #0 + mov r1, #0x1a + add r3, r7, #0 + bl sub_0200B144 + str r0, [sp, #0x18] + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021E67C0 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + ldr r2, [sp, #0x14] + add r0, r0, #4 + mov r3, #0x1a + bl sub_0201D78C + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x6e + sub r3, r1, r0 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E67C0 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_0200B190 + ldr r2, _021E67C4 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r7, #0 + bl sub_0200B144 + add r7, r0, #0 + ldr r0, [r6, #4] + bl ov21_021D3914 + add r2, r0, #0 + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021E67C0 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + mov r3, #0x92 + add r0, r0, #4 + bl sub_0201D78C + ldr r0, [r6, #4] + bl ov21_021D3920 + cmp r0, #0 + bne _021E6780 + add r0, r7, #0 + mov r1, #0x5f + add r2, r4, #0 + bl sub_0200B1B8 + b _021E678A +_021E6780: + add r0, r7, #0 + mov r1, #0x60 + add r2, r4, #0 + bl sub_0200B1B8 +_021E678A: + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe6 + sub r3, r1, r0 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E67C0 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E67C0: .word 0x00020100 +_021E67C4: .word 0x000002B9 + thumb_func_end ov21_021E66B0 + + thumb_func_start ov21_021E67C8 +ov21_021E67C8: ; 0x021E67C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl ov21_021D2170 + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov21_021D37BC + add r7, r0, #0 + ldr r1, [r4, #4] + ldr r0, _021E6840 ; =0x00001748 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_02098868 + str r0, [sp, #8] + ldr r1, [r4, #4] + ldr r0, _021E6840 ; =0x00001748 + ldr r0, [r1, r0] + add r1, r7, #0 + bl sub_020988A8 + str r0, [sp, #0xc] + mov r0, #0x58 + str r0, [sp] + ldr r0, [sp, #8] + add r2, r7, #0 + add r0, #0x58 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r4, #4] + mov r3, #2 + bl ov21_021D1890 + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + mov r1, #0xf + mov r3, #0 + add r0, r6, #0 + add r2, r1, #0 + str r3, [sp] + bl sub_020086FC + ldr r1, [sp, #8] + add r0, r6, #0 + bl ov21_021E687C + ldr r1, [sp, #0xc] + add r0, r6, #0 + bl ov21_021E68B0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E6840: .word 0x00001748 + thumb_func_end ov21_021E67C8 + + thumb_func_start ov21_021E6844 +ov21_021E6844: ; 0x021E6844 + push {r4, lr} + ldr r0, [r0, #0] + bl ov21_021D2170 + add r4, r0, #0 + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + add r0, r4, #0 + bl sub_02008780 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6844 + + thumb_func_start ov21_021E6860 +ov21_021E6860: ; 0x021E6860 + push {lr} + sub sp, #0xc + add r1, #0x58 + mov r2, #0x2a + lsl r1, r1, #0xc + lsl r2, r2, #0xe + str r1, [sp, #4] + add r1, sp, #0 + str r2, [sp] + bl sub_02021C50 + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov21_021E6860 + + thumb_func_start ov21_021E687C +ov21_021E687C: ; 0x021E687C + ldr r3, _021E6888 ; =sub_02007DEC + add r2, r1, #0 + mov r1, #1 + add r2, #0x58 + bx r3 + nop +_021E6888: .word sub_02007DEC + thumb_func_end ov21_021E687C + + thumb_func_start ov21_021E688C +ov21_021E688C: ; 0x021E688C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #1 + lsl r0, r0, #0x14 + lsl r1, r1, #0xc + bl sub_020BCFD0 + str r0, [sp] + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + mov r2, #2 + bl sub_02021C80 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E688C + + thumb_func_start ov21_021E68B0 +ov21_021E68B0: ; 0x021E68B0 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #1 + lsl r0, r0, #0x14 + lsl r1, r1, #0xc + bl sub_020BCFD0 + asr r2, r0, #0x1f + lsl r3, r2, #0x14 + lsr r1, r0, #0xc + lsl r2, r0, #0x14 + mov r0, #2 + orr r3, r1 + mov r1, #0 + lsl r0, r0, #0xa + add r2, r2, r0 + adc r3, r1 + lsl r0, r3, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + lsl r0, r1, #4 + asr r5, r0, #0x10 + add r0, r4, #0 + mov r1, #0xc + add r2, r5, #0 + bl sub_02007DEC + add r0, r4, #0 + mov r1, #0xd + add r2, r5, #0 + bl sub_02007DEC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E68B0 \ No newline at end of file diff --git a/asm/ov21_021E68F4.s b/asm/ov21_021E68F4.s new file mode 100644 index 000000000..0f85a0ce7 --- /dev/null +++ b/asm/ov21_021E68F4.s @@ -0,0 +1,1426 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E68F4 +ov21_021E68F4: ; 0x021E68F4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E696C + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E69B0 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E69D8 + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E6A68 + str r0, [r5, #0x24] + ldr r0, _021E693C ; =ov21_021E6A6C + str r0, [r5, #8] + ldr r0, _021E6940 ; =ov21_021E6AB8 + str r0, [r5, #0xc] + ldr r0, _021E6944 ; =ov21_021E6B0C + str r0, [r5, #0x10] + ldr r0, _021E6948 ; =ov21_021E6B20 + str r0, [r5, #0x14] + ldr r0, _021E694C ; =ov21_021E6BA8 + str r0, [r5, #0x18] + ldr r0, _021E6950 ; =ov21_021E6BD8 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E693C: .word ov21_021E6A6C +_021E6940: .word ov21_021E6AB8 +_021E6944: .word ov21_021E6B0C +_021E6948: .word ov21_021E6B20 +_021E694C: .word ov21_021E6BA8 +_021E6950: .word ov21_021E6BD8 + thumb_func_end ov21_021E68F4 + + thumb_func_start ov21_021E6954 +ov21_021E6954: ; 0x021E6954 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E6A20 + ldr r0, [r4, #4] + bl ov21_021E6A34 + ldr r0, [r4, #0x20] + bl ov21_021E6A48 + pop {r4, pc} + thumb_func_end ov21_021E6954 + + thumb_func_start ov21_021E696C +ov21_021E696C: ; 0x021E696C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + bne _021E697E + bl sub_02022974 +_021E697E: + add r2, r4, #0 + mov r1, #0x10 + mov r0, #0 +_021E6984: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E6984 + add r0, r5, #0 + bl ov21_021D13A0 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1430 + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E696C + + thumb_func_start ov21_021E69B0 +ov21_021E69B0: ; 0x021E69B0 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E69C2 + bl sub_02022974 +_021E69C2: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E69B0 + + thumb_func_start ov21_021E69D8 +ov21_021E69D8: ; 0x021E69D8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov21_021E6A68 + add r7, r0, #0 + mov r1, #0x14 + mul r7, r1 + add r0, r5, #0 + add r1, r7, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021E69F8 + bl sub_02022974 +_021E69F8: + add r0, r4, #0 + mov r1, #0 + add r2, r7, #0 + bl sub_020D5124 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #1 + bl ov21_021D49E4 + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x14 + add r2, r6, #0 + mov r3, #2 + bl ov21_021D4A3C + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E69D8 + + thumb_func_start ov21_021E6A20 +ov21_021E6A20: ; 0x021E6A20 + push {r4, lr} + add r4, r0, #0 + bne _021E6A2A + bl sub_02022974 +_021E6A2A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6A20 + + thumb_func_start ov21_021E6A34 +ov21_021E6A34: ; 0x021E6A34 + push {r4, lr} + add r4, r0, #0 + bne _021E6A3E + bl sub_02022974 +_021E6A3E: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6A34 + + thumb_func_start ov21_021E6A48 +ov21_021E6A48: ; 0x021E6A48 + push {r4, lr} + add r4, r0, #0 + bne _021E6A52 + bl sub_02022974 +_021E6A52: + add r0, r4, #0 + bl ov21_021D4660 + add r0, r4, #0 + add r0, #0x14 + bl ov21_021D4660 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov21_021E6A48 + + thumb_func_start ov21_021E6A68 +ov21_021E6A68: ; 0x021E6A68 + mov r0, #2 + bx lr + thumb_func_end ov21_021E6A68 + + thumb_func_start ov21_021E6A6C +ov21_021E6A6C: ; 0x021E6A6C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + mov r1, #0x18 + bl sub_02018144 + add r6, r0, #0 + add r2, r6, #0 + mov r1, #0x18 + mov r0, #0 +_021E6A82: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E6A82 + mov r1, #0 + add r2, r6, #0 + mov r0, #4 +_021E6A90: + add r1, r1, #1 + str r0, [r2, #0x10] + add r2, r2, #4 + cmp r1, #2 + blt _021E6A90 + mov r0, #0 + str r0, [r4, #4] + ldr r2, [r5, #4] + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E6D58 + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E6DBC + str r6, [r5, #8] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6A6C + + thumb_func_start ov21_021E6AB8 +ov21_021E6AB8: ; 0x021E6AB8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021E6AC8 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E6AC8: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021E6AD2 + mov r0, #0 + pop {r3, r4, r5, pc} +_021E6AD2: + ldr r0, [r5, #0xc] + bl ov21_021E33AC + cmp r0, #0 + beq _021E6B06 + add r0, r4, #0 + bl ov21_021E6DAC + ldr r0, [r5, #0xc] + bl ov21_021E33BC + cmp r0, #0 + beq _021E6AFE + ldr r0, [r5, #8] + bl ov21_021D3998 + cmp r0, #2 + bne _021E6AFE + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E72E8 +_021E6AFE: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E6DBC +_021E6B06: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6AB8 + + thumb_func_start ov21_021E6B0C +ov21_021E6B0C: ; 0x021E6B0C + push {r4, lr} + ldr r4, [r0, #8] + add r0, r4, #0 + bl ov21_021E6DEC + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021E6B0C + + thumb_func_start ov21_021E6B20 +ov21_021E6B20: ; 0x021E6B20 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021E6BA4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E6B3C: ; jump table + .short _021E6B44 - _021E6B3C - 2 ; case 0 + .short _021E6B5E - _021E6B3C - 2 ; case 1 + .short _021E6B7C - _021E6B3C - 2 ; case 2 + .short _021E6B92 - _021E6B3C - 2 ; case 3 +_021E6B44: + ldr r0, [r4, #4] + mov r1, #0x40 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x40 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6BA4 +_021E6B5E: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E6E64 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E6CB0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6BA4 +_021E6B7C: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E6D1C + cmp r0, #0 + beq _021E6BA4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6BA4 +_021E6B92: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D25AC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E6BA4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E6B20 + + thumb_func_start ov21_021E6BA8 +ov21_021E6BA8: ; 0x021E6BA8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r3, #8] + add r4, r2, #0 + str r0, [sp] + add r5, r1, #0 + ldr r0, [r4, #0xc] + ldr r7, [r5, #8] + bl ov21_021E33AC + cmp r0, #0 + beq _021E6BD4 + ldr r2, [sp] + ldr r3, [r5, #4] + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021E728C + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E732C +_021E6BD4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E6BA8 + + thumb_func_start ov21_021E6BD8 +ov21_021E6BD8: ; 0x021E6BD8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #4 + bhi _021E6C5A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E6BF4: ; jump table + .short _021E6BFE - _021E6BF4 - 2 ; case 0 + .short _021E6C20 - _021E6BF4 - 2 ; case 1 + .short _021E6C36 - _021E6BF4 - 2 ; case 2 + .short _021E6C48 - _021E6BF4 - 2 ; case 3 + .short _021E6C56 - _021E6BF4 - 2 ; case 4 +_021E6BFE: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + bl ov21_021D25AC + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021E6CB0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6C5A +_021E6C20: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #0 + bl ov21_021E6D1C + cmp r0, #0 + beq _021E6C5A + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6C5A +_021E6C36: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E6E94 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6C5A +_021E6C48: + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E6C5A +_021E6C56: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E6C5A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6BD8 + + thumb_func_start ov21_021E6C60 +ov21_021E6C60: ; 0x021E6C60 + push {r3, r4, r5, r6, r7, lr} + mov r6, #1 + add r5, r0, #0 + mov r4, #0 + add r7, r6, #0 +_021E6C6A: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021FE0 + ldr r0, [r5, #8] + add r1, r7, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E6C6A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6C60 + + thumb_func_start ov21_021E6C88 +ov21_021E6C88: ; 0x021E6C88 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 + add r7, r4, #0 +_021E6C92: + ldr r0, [r5, #0] + add r1, r6, #0 + bl sub_02021FE0 + ldr r0, [r5, #8] + add r1, r7, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E6C92 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6C88 + + thumb_func_start ov21_021E6CB0 +ov21_021E6CB0: ; 0x021E6CB0 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E6C60 + ldr r0, [r4, #0xc] + bl ov21_021E33A4 + cmp r0, #0 + beq _021E6D18 + cmp r6, #0 + beq _021E6CF4 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r2, [r5, #0] + lsl r0, r0, #4 + add r0, r2, r0 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E6CF4: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r3, [r5, #0] + lsl r0, r0, #4 + add r0, r3, r0 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E6D18: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E6CB0 + + thumb_func_start ov21_021E6D1C +ov21_021E6D1C: ; 0x021E6D1C + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #0xc] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E33A4 + cmp r0, #0 + beq _021E6D3C + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov21_021D2424 + b _021E6D42 +_021E6D3C: + mov r0, #2 + bl sub_0200AC1C +_021E6D42: + cmp r0, #0 + beq _021E6D54 + cmp r4, #0 + beq _021E6D50 + add r0, r6, #0 + bl ov21_021E6C88 +_021E6D50: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E6D54: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E6D1C + + thumb_func_start ov21_021E6D58 +ov21_021E6D58: ; 0x021E6D58 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #8 + bl sub_02018144 + str r0, [r5, #4] + mov r0, #0x80 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x40 + mov r2, #0xb0 + mov r3, #8 + bl ov21_021D154C + mov r0, #0xf8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x40 + add r0, r0, #4 + mov r2, #0xb0 + mov r3, #0x80 + bl ov21_021D154C + str r4, [r5, #8] + str r5, [r5, #0xc] + str r6, [sp] + add r3, r5, #0 + ldr r0, [r5, #4] + ldr r2, _021E6DA8 ; =ov21_021E6E04 + mov r1, #2 + add r3, #8 + bl sub_02023FCC + str r0, [r5, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E6DA8: .word ov21_021E6E04 + thumb_func_end ov21_021E6D58 + + thumb_func_start ov21_021E6DAC +ov21_021E6DAC: ; 0x021E6DAC + mov r2, #0 + mov r1, #3 +_021E6DB0: + add r2, r2, #1 + str r1, [r0, #0x10] + add r0, r0, #4 + cmp r2, #2 + blt _021E6DB0 + bx lr + thumb_func_end ov21_021E6DAC + + thumb_func_start ov21_021E6DBC +ov21_021E6DBC: ; 0x021E6DBC + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + bl sub_0202404C + ldr r0, [r5, #4] + cmp r0, #0 + beq _021E6DD4 + cmp r0, #1 + beq _021E6DE0 + pop {r3, r4, r5, pc} +_021E6DD4: + ldr r0, [r4, #0x10] + cmp r0, #2 + beq _021E6DEA + mov r0, #1 + str r0, [r4, #0x10] + pop {r3, r4, r5, pc} +_021E6DE0: + ldr r0, [r4, #0x14] + cmp r0, #2 + beq _021E6DEA + mov r0, #1 + str r0, [r4, #0x14] +_021E6DEA: + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E6DBC + + thumb_func_start ov21_021E6DEC +ov21_021E6DEC: ; 0x021E6DEC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6DEC + + thumb_func_start ov21_021E6E04 +ov21_021E6E04: ; 0x021E6E04 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r2, #0] + ldr r2, [r2, #4] + lsl r0, r5, #2 + add r0, r2, r0 + str r1, [r0, #0x10] + cmp r1, #2 + bne _021E6E5E + ldr r0, [r4, #0xc] + mov r1, #1 + bl ov21_021E33B4 + cmp r5, #0 + beq _021E6E28 + cmp r5, #1 + beq _021E6E44 + pop {r3, r4, r5, pc} +_021E6E28: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021E6E5E + ldr r0, _021E6E60 ; =0x000005DD + bl sub_02005748 + mov r0, #0 + str r0, [r4, #4] + ldr r2, [r4, #0] + mov r0, #1 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] + pop {r3, r4, r5, pc} +_021E6E44: + ldr r0, [r4, #4] + cmp r0, #1 + beq _021E6E5E + ldr r0, _021E6E60 ; =0x000005DD + bl sub_02005748 + mov r0, #1 + str r0, [r4, #4] + ldr r2, [r4, #0] + mov r0, #2 + ldr r1, [r2, #0] + orr r0, r1 + str r0, [r2, #0] +_021E6E5E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E6E60: .word 0x000005DD + thumb_func_end ov21_021E6E04 + + thumb_func_start ov21_021E6E64 +ov21_021E6E64: ; 0x021E6E64 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E6EF0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E6F58 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E700C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E70D4 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E6E64 + + thumb_func_start ov21_021E6E94 +ov21_021E6E94: ; 0x021E6E94 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x20 + add r6, r2, #0 + str r0, [sp] + add r4, r1, #0 + str r6, [sp, #4] + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #4 + mov r3, #0x80 + bl ov21_021D276C + mov r0, #0x20 + str r0, [sp] + str r6, [sp, #4] + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #4 + mov r3, #0xa0 + bl ov21_021D276C + add r0, r5, #0 + bl ov21_021E70BC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E71B8 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E6FD8 + mov r4, #0 +_021E6EDA: + ldr r0, [r5, #0x38] + cmp r0, #0 + beq _021E6EE4 + bl sub_020181C4 +_021E6EE4: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E6EDA + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E6E94 + + thumb_func_start ov21_021E6EF0 +ov21_021E6EF0: ; 0x021E6EF0 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x22 + mov r3, #6 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x3d + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6EF0 + + thumb_func_start ov21_021E6F58 +ov21_021E6F58: ; 0x021E6F58 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E6FCC ; =0x0000238E + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x66 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #0x10] + bl sub_0200A3DC + ldr r0, [r5, #0x10] + bl sub_02009D4C + ldr r0, _021E6FD0 ; =0x0000238C + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x64 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x18] + ldr r0, _021E6FD4 ; =0x0000238D + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x65 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x1c] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E6FCC: .word 0x0000238E +_021E6FD0: .word 0x0000238C +_021E6FD4: .word 0x0000238D + thumb_func_end ov21_021E6F58 + + thumb_func_start ov21_021E6FD8 +ov21_021E6FD8: ; 0x021E6FD8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x10] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x18] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x1c] + bl sub_02009D68 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E6FD8 + + thumb_func_start ov21_021E700C +ov21_021E700C: ; 0x021E700C + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021E70B4 ; =0x0000238D + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r2, _021E70B8 ; =0x0000083F + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x1e + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + mov r0, #0x11 + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r0, #3 + lsl r1, r1, #0xe + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r6, [sp, #0x48] + bl sub_02021B90 + mov r1, #1 + str r0, [r5, #0] + bl sub_02021D6C + mov r0, #0x2f + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r1, #0x1e + mov r0, #3 + lsl r1, r1, #0xe + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + mov r1, #1 + str r0, [r5, #4] + bl sub_02021D6C + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E70B4: .word 0x0000238D +_021E70B8: .word 0x0000083F + thumb_func_end ov21_021E700C + + thumb_func_start ov21_021E70BC +ov21_021E70BC: ; 0x021E70BC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E70C2: + ldr r0, [r5, #0] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E70C2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E70BC + + thumb_func_start ov21_021E70D4 +ov21_021E70D4: ; 0x021E70D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r2, #0 + ldr r4, [r1, #0] + cmp r0, #0 + bne _021E70E8 + bl sub_02022974 +_021E70E8: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021E71B0 ; =0x0000083F + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #8] + mov r1, #0 + bl sub_0200A72C + mov r1, #7 + mvn r1, r1 + str r1, [sp, #0x1c] + mov r1, #2 + mov r2, #0 + str r0, [sp, #0x10] + str r1, [sp, #0x20] + str r2, [sp, #0x24] + str r1, [sp, #0x28] + str r6, [sp, #0x2c] + bl sub_0201FAB4 + add r7, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0xc + mov r2, #2 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E71B4 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x2d + bl ov21_021D4DAC + lsr r0, r0, #1 + neg r0, r0 + str r6, [sp, #0xc] + str r0, [sp, #0x18] + ldr r0, [r5, #0] + str r0, [sp, #0x14] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #8] + ldr r0, [r0, #0] + add r1, r7, #4 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0xc + mov r2, #2 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E71B4 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x2e + bl ov21_021D4DAC + lsr r0, r0, #1 + neg r0, r0 + str r6, [sp, #0xc] + str r0, [sp, #0x18] + ldr r0, [r5, #4] + str r0, [sp, #0x14] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #0xc] + ldr r0, [r0, #0] + add r1, r7, #4 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E71B0: .word 0x0000083F +_021E71B4: .word 0x000002B9 + thumb_func_end ov21_021E70D4 + + thumb_func_start ov21_021E71B8 +ov21_021E71B8: ; 0x021E71B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E71BE: + ldr r0, [r5, #8] + bl ov21_021D4D1C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E71BE + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E71B8 + + thumb_func_start ov21_021E71D0 +ov21_021E71D0: ; 0x021E71D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r1, #0 + add r1, r3, #0 + str r2, [sp, #0xc] + ldr r4, [sp, #0x30] + ldr r6, [sp, #0x40] + mov r5, #0 + bl ov21_021D144C + ldr r0, [sp, #0x3c] + ldr r1, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #8] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x38] + bl ov21_021E727C + ldr r0, [sp, #8] + bl sub_02021E74 + cmp r0, #3 + bhi _021E7242 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E720E: ; jump table + .short _021E7216 - _021E720E - 2 ; case 0 + .short _021E7216 - _021E720E - 2 ; case 1 + .short _021E7226 - _021E720E - 2 ; case 2 + .short _021E7234 - _021E720E - 2 ; case 3 +_021E7216: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021E7242 + mov r0, #0 + mov r5, #1 + mov r7, #9 + str r0, [r4, #0] + b _021E7242 +_021E7226: + ldr r0, [r4, #0] + cmp r0, #1 + beq _021E7242 + mov r5, #1 + mov r7, #0xa + str r5, [r4, #0] + b _021E7242 +_021E7234: + ldr r0, [r4, #0] + cmp r0, #2 + beq _021E7242 + mov r0, #2 + mov r5, #1 + mov r7, #8 + str r0, [r4, #0] +_021E7242: + cmp r5, #0 + beq _021E7278 + ldr r0, [r6, #0] + cmp r0, #0 + beq _021E7250 + bl sub_020181C4 +_021E7250: + ldr r0, [sp, #4] + ldr r3, [sp, #0x34] + ldr r0, [r0, #0] + add r1, r7, #0 + add r2, sp, #0x10 + bl ov21_021D27E0 + str r0, [r6, #0] + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x2c] + ldr r2, [r2, #0xc] + mov r0, #0x1f + lsl r1, r1, #5 + mov r3, #0x20 + bl sub_0201DC68 + cmp r0, #0 + bne _021E7278 + bl sub_02022974 +_021E7278: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E71D0 + + thumb_func_start ov21_021E727C +ov21_021E727C: ; 0x021E727C + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + bl ov21_021D1524 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021E727C + + thumb_func_start ov21_021E728C +ov21_021E728C: ; 0x021E728C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r0, #0 + add r4, r7, #0 + add r5, r7, #0 + str r1, [sp, #0x1c] + str r2, [sp, #0x20] + str r3, [sp, #0x24] + mov r6, #0 + add r4, #0x38 + add r5, #0x30 +_021E72A2: + cmp r6, #0 + bne _021E72AA + mov r1, #4 + b _021E72AC +_021E72AA: + mov r1, #5 +_021E72AC: + mov r0, #7 + mvn r0, r0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [sp, #0x24] + str r5, [sp, #8] + str r0, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x14] + str r4, [sp, #0x18] + ldr r3, [sp, #0x20] + ldr r0, [sp, #0x1c] + ldr r1, [r7, #0] + ldr r2, [r7, #8] + ldr r3, [r3, #0x10] + bl ov21_021E71D0 + ldr r0, [sp, #0x20] + add r6, r6, #1 + add r0, r0, #4 + add r4, r4, #4 + add r5, r5, #4 + add r7, r7, #4 + str r0, [sp, #0x20] + cmp r6, #2 + blt _021E72A2 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E728C + + thumb_func_start ov21_021E72E8 +ov21_021E72E8: ; 0x021E72E8 + push {r3, lr} + ldr r2, _021E7324 ; =0x021BF67C + ldr r3, [r2, #0x48] + mov r2, #1 + tst r3, r2 + beq _021E7320 + ldr r3, [r1, #4] + cmp r3, #1 + bne _021E730C + mov r3, #0 + str r3, [r1, #4] + ldr r3, [r1, #0] + ldr r1, [r3, #0] + orr r1, r2 + str r1, [r3, #0] + mov r1, #2 + str r1, [r0, #0x10] + b _021E731A +_021E730C: + str r2, [r1, #4] + ldr r3, [r1, #0] + mov r1, #2 + ldr r2, [r3, #0] + orr r2, r1 + str r2, [r3, #0] + str r1, [r0, #0x14] +_021E731A: + ldr r0, _021E7328 ; =0x000005DD + bl sub_02005748 +_021E7320: + pop {r3, pc} + nop +_021E7324: .word 0x021BF67C +_021E7328: .word 0x000005DD + thumb_func_end ov21_021E72E8 + + thumb_func_start ov21_021E732C +ov21_021E732C: ; 0x021E732C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl ov21_021E33BC + cmp r0, #1 + bne _021E7364 + ldr r0, [r5, #4] + cmp r0, #0 + bne _021E7354 + mov r0, #0x60 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xbc + mov r2, #0x78 + mov r3, #0x68 + bl ov21_021E7368 + pop {r3, r4, r5, pc} +_021E7354: + mov r0, #0x60 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x44 + mov r2, #0x78 + mov r3, #0x68 + bl ov21_021E7368 +_021E7364: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E732C + + thumb_func_start ov21_021E7368 +ov21_021E7368: ; 0x021E7368 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r0, [r0, #0] + bl ov21_021D2574 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7368 \ No newline at end of file diff --git a/asm/ov21_021E737C.s b/asm/ov21_021E737C.s new file mode 100644 index 000000000..42bf2be7f --- /dev/null +++ b/asm/ov21_021E737C.s @@ -0,0 +1,2212 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E737C +ov21_021E737C: ; 0x021E737C + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + bl ov21_021E73E8 + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov21_021E7424 + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0x20] + bl ov21_021E749C + str r0, [r5, #0x24] + ldr r0, _021E73BC ; =ov21_021E74A0 + str r0, [r5, #8] + ldr r0, _021E73C0 ; =ov21_021E750C + str r0, [r5, #0xc] + ldr r0, _021E73C4 ; =ov21_021E751C + str r0, [r5, #0x10] + ldr r0, _021E73C8 ; =ov21_021E7530 + str r0, [r5, #0x14] + ldr r0, _021E73CC ; =ov21_021E75D4 + str r0, [r5, #0x18] + ldr r0, _021E73D0 ; =ov21_021E7694 + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E73BC: .word ov21_021E74A0 +_021E73C0: .word ov21_021E750C +_021E73C4: .word ov21_021E751C +_021E73C8: .word ov21_021E7530 +_021E73CC: .word ov21_021E75D4 +_021E73D0: .word ov21_021E7694 + thumb_func_end ov21_021E737C + + thumb_func_start ov21_021E73D4 +ov21_021E73D4: ; 0x021E73D4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E7468 + ldr r0, [r4, #4] + bl ov21_021E747C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E73D4 + + thumb_func_start ov21_021E73E8 +ov21_021E73E8: ; 0x021E73E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + bne _021E73FA + bl sub_02022974 +_021E73FA: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #5 + bl ov21_021D1410 + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E73E8 + + thumb_func_start ov21_021E7424 +ov21_021E7424: ; 0x021E7424 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x20 + add r5, r0, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021E7438 + bl sub_02022974 +_021E7438: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + add r0, r6, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E7EC0 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E7F40 + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02015240 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7424 + + thumb_func_start ov21_021E7468 +ov21_021E7468: ; 0x021E7468 + push {r4, lr} + add r4, r0, #0 + bne _021E7472 + bl sub_02022974 +_021E7472: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7468 + + thumb_func_start ov21_021E747C +ov21_021E747C: ; 0x021E747C + push {r4, lr} + add r4, r0, #0 + bne _021E7486 + bl sub_02022974 +_021E7486: + add r0, r4, #0 + bl ov21_021E7F20 + add r0, r4, #0 + bl ov21_021E7F7C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E747C + + thumb_func_start ov21_021E749C +ov21_021E749C: ; 0x021E749C + mov r0, #0 + bx lr + thumb_func_end ov21_021E749C + + thumb_func_start ov21_021E74A0 +ov21_021E74A0: ; 0x021E74A0 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #4] + add r5, r1, #0 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + bne _021E74B6 + bl sub_02022974 +_021E74B6: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + str r4, [r6, #8] + ldr r0, [r5, #0] + bl ov21_021D37BC + add r1, r0, #0 + ldr r2, [r5, #0] + ldr r0, _021E7508 ; =0x00001748 + ldr r0, [r2, r0] + bl sub_02098828 + add r6, r0, #0 + ldr r0, [r5, #0] + bl ov21_021D3920 + cmp r0, #0 + bne _021E74EC + mov r0, #0x5f + b _021E74EE +_021E74EC: + mov r0, #0x55 +_021E74EE: + lsl r0, r0, #2 + cmp r6, r0 + blt _021E74FC + sub r0, r6, r0 + str r0, [r4, #0] + mov r0, #1 + b _021E7502 +_021E74FC: + sub r0, r0, r6 + str r0, [r4, #0] + mov r0, #0 +_021E7502: + str r0, [r4, #4] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E7508: .word 0x00001748 + thumb_func_end ov21_021E74A0 + + thumb_func_start ov21_021E750C +ov21_021E750C: ; 0x021E750C + ldr r0, [r0, #0xc] + cmp r0, #1 + bne _021E7516 + mov r0, #1 + bx lr +_021E7516: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E750C + + thumb_func_start ov21_021E751C +ov21_021E751C: ; 0x021E751C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E751C + + thumb_func_start ov21_021E7530 +ov21_021E7530: ; 0x021E7530 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0] + str r2, [sp, #4] + ldr r6, [r3, #8] + ldr r5, [r4, #8] + cmp r0, #3 + bhi _021E75C8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E7550: ; jump table + .short _021E7558 - _021E7550 - 2 ; case 0 + .short _021E757A - _021E7550 - 2 ; case 1 + .short _021E759C - _021E7550 - 2 ; case 2 + .short _021E75B2 - _021E7550 - 2 ; case 3 +_021E7558: + ldr r0, [r4, #4] + mov r1, #0xc4 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0xc4 + bl sub_020D5124 + ldr r0, [r4, #8] + mov r1, #1 + add r0, #0xb8 + str r1, [r0, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E75C8 +_021E757A: + ldr r0, [r4, #4] + add r1, r7, #0 + str r0, [sp] + add r0, r5, #0 + add r3, r6, #0 + bl ov21_021E7800 + ldr r2, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + mov r3, #1 + bl ov21_021E771C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E75C8 +_021E759C: + add r0, r5, #0 + add r1, r7, #0 + mov r3, #1 + bl ov21_021E77A4 + cmp r0, #0 + beq _021E75C8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E75C8 +_021E75B2: + ldr r0, _021E75D0 ; =0x021E9DB0 + ldr r2, [r6, #0] + mov r1, #0x11 + bl ov21_021E83D8 + str r0, [r5, #0x34] + ldr r0, [r6, #4] + add sp, #8 + str r0, [r5, #0x38] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E75C8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E75D0: .word 0x021E9DB0 + thumb_func_end ov21_021E7530 + + thumb_func_start ov21_021E75D4 +ov21_021E75D4: ; 0x021E75D4 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0] + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r1, #7 + bhi _021E768C + add r3, r1, r1 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_021E75F0: ; jump table + .short _021E7600 - _021E75F0 - 2 ; case 0 + .short _021E761A - _021E75F0 - 2 ; case 1 + .short _021E762A - _021E75F0 - 2 ; case 2 + .short _021E7638 - _021E75F0 - 2 ; case 3 + .short _021E7650 - _021E75F0 - 2 ; case 4 + .short _021E765E - _021E75F0 - 2 ; case 5 + .short _021E7680 - _021E75F0 - 2 ; case 6 + .short _021E768C - _021E75F0 - 2 ; case 7 +_021E7600: + add r1, r0, #0 + mov r2, #1 + add r1, #0xb8 + str r2, [r1, #0] + ldr r0, [r0, #0x34] + ldr r0, [r0, #4] + cmp r0, #0 + beq _021E7614 + str r2, [r4, #0] + b _021E768C +_021E7614: + mov r0, #3 + str r0, [r4, #0] + b _021E768C +_021E761A: + add r1, r2, #0 + ldr r2, [r0, #0x38] + bl ov21_021E7F88 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E768C +_021E762A: + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021E768C + add r0, r1, #1 + str r0, [r4, #0] + b _021E768C +_021E7638: + ldr r3, [r0, #0x34] + ldr r1, [r0, #0x38] + str r1, [sp] + add r1, r2, #0 + ldrh r2, [r3, #8] + ldrh r3, [r3, #0xa] + bl ov21_021E8188 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E768C +_021E7650: + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021E768C + add r0, r1, #1 + str r0, [r4, #0] + b _021E768C +_021E765E: + ldr r2, [r0, #0x34] + ldr r1, [r2, #0xc] + cmp r1, #0 + beq _021E767A + ldr r1, [r2, #0x10] + ldr r2, [r0, #0x38] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + bl ov21_021E8258 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E768C +_021E767A: + mov r0, #7 + str r0, [r4, #0] + b _021E768C +_021E7680: + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021E768C + add r0, r1, #1 + str r0, [r4, #0] +_021E768C: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E75D4 + + thumb_func_start ov21_021E7694 +ov21_021E7694: ; 0x021E7694 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r3, r0, #0 + ldr r0, [r4, #8] + cmp r1, #4 + bhi _021E7710 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E76AE: ; jump table + .short _021E76B8 - _021E76AE - 2 ; case 0 + .short _021E76C8 - _021E76AE - 2 ; case 1 + .short _021E76DC - _021E76AE - 2 ; case 2 + .short _021E76EA - _021E76AE - 2 ; case 3 + .short _021E770C - _021E76AE - 2 ; case 4 +_021E76B8: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E771C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E7710 +_021E76C8: + add r1, r3, #0 + mov r3, #0 + bl ov21_021E77A4 + cmp r0, #0 + beq _021E7710 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E7710 +_021E76DC: + add r1, r3, #0 + bl ov21_021E785C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E7710 +_021E76EA: + add r1, r0, #0 + add r1, #0xb8 + ldr r1, [r1, #0] + cmp r1, #0 + bne _021E76FA + ldr r0, [r0, #0x3c] + bl sub_0200DA58 +_021E76FA: + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E7710 +_021E770C: + mov r0, #1 + pop {r4, pc} +_021E7710: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov21_021E7694 + + thumb_func_start ov21_021E7714 +ov21_021E7714: ; 0x021E7714 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E7714 + + thumb_func_start ov21_021E7718 +ov21_021E7718: ; 0x021E7718 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E7718 + + thumb_func_start ov21_021E771C +ov21_021E771C: ; 0x021E771C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r2, #0 + add r7, r0, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E7714 + ldr r0, [r4, #4] + bl ov21_021E2A54 + cmp r0, #0 + beq _021E779E + cmp r6, #0 + beq _021E777C + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24B8 + add r1, r0, #0 + neg r1, r1 + lsl r1, r1, #0x18 + add r0, r7, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl ov21_021E8400 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E777C: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2b + str r0, [sp, #8] + str r2, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E779E: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E771C + + thumb_func_start ov21_021E77A4 +ov21_021E77A4: ; 0x021E77A4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r2, #4] + add r4, r1, #0 + add r6, r3, #0 + bl ov21_021E2A54 + cmp r0, #0 + ldr r1, [r4, #0] + beq _021E77C4 + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D2424 + b _021E77CE +_021E77C4: + mov r0, #0x5b + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24EC +_021E77CE: + cmp r0, #0 + beq _021E77E0 + cmp r6, #0 + beq _021E77DC + add r0, r5, #0 + bl ov21_021E7718 +_021E77DC: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E77E0: + mov r0, #0x5b + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov21_021D24B8 + add r1, r0, #0 + neg r1, r1 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl ov21_021E8400 + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E77A4 + + thumb_func_start ov21_021E7800 +ov21_021E7800: ; 0x021E7800 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r7, r2, #0 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov21_021E789C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E7CF8 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov21_021E7DA8 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021E7904 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021E7B34 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov21_021E7CF0 + ldr r0, [r5, #0xc] + mov r1, #0 + bl sub_020152BC + ldr r0, [r5, #0xc] + mov r1, #1 + bl sub_02015240 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E7800 + + thumb_func_start ov21_021E785C +ov21_021E785C: ; 0x021E785C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov21_021E7CF4 + add r0, r5, #0 + bl ov21_021E7CCC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E7AA0 + ldr r0, [r4, #0] + mov r1, #0 + add r0, r0, #4 + bl sub_0201ADA4 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02019EBC + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_02015240 + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_020152BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E785C + + thumb_func_start ov21_021E789C +ov21_021E789C: ; 0x021E789C + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r5, r2, #0 + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x21 + mov r3, #3 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x49 + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #3 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E789C + + thumb_func_start ov21_021E7904 +ov21_021E7904: ; 0x021E7904 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r0, r2, #0 + add r7, r1, #0 + ldr r0, [r0, #0] + str r2, [sp, #0x10] + add r4, r3, #0 + ldr r6, [r7, #0] + bl ov21_021D37BC + str r0, [sp, #0x20] + ldr r0, [r7, #0] + bl ov21_021D26E0 + str r0, [sp, #0x14] + mov r0, #0x13 + add r1, r4, #0 + bl sub_02006C24 + add r7, r0, #0 + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x20] + ldr r0, [r0, #0] + bl ov21_021D33D4 + add r2, r0, #0 + ldr r0, [sp, #0x20] + mov r1, #0 + bl sub_02079D8C + str r0, [sp, #0x24] + bl sub_02079FD0 + str r0, [sp, #0x28] + bl sub_02079FD4 + str r0, [sp, #0x1c] + bl sub_02079FE0 + str r0, [sp, #0x18] + mov r0, #0x7d + lsl r0, r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + ldr r2, [sp, #0x24] + add r1, r7, #0 + mov r3, #0 + bl sub_02009A4C + str r0, [r5, #0x14] + bl sub_0200A450 + ldr r0, [r5, #0x14] + bl sub_02009D4C + mov r0, #0x7d + lsl r0, r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [sp, #0x28] + add r1, r7, #0 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x18] + bl sub_0200A640 + cmp r0, #0 + bne _021E79AC + bl sub_02022974 +_021E79AC: + add r0, r4, #0 + mov r1, #0x60 + bl sub_02018144 + add r1, r5, #0 + add r1, #0xbc + str r0, [r1, #0] + mov r0, #0x7d + lsl r0, r0, #6 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [sp, #0x1c] + add r1, r7, #0 + mov r3, #0 + bl sub_02009BC4 + str r0, [r5, #0x1c] + mov r0, #0x7d + lsl r0, r0, #6 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r2, [sp, #0x18] + add r1, r7, #0 + mov r3, #0 + bl sub_02009BC4 + str r0, [r5, #0x20] + ldr r0, _021E7A90 ; =0x00001BB5 + mov r3, #1 + str r0, [sp] + str r3, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + ldr r1, [sp, #0x14] + mov r2, #0x5d + bl sub_02009A4C + str r0, [r5, #0x24] + bl sub_0200A3DC + ldr r0, [r5, #0x24] + bl sub_02009D4C + ldr r0, _021E7A94 ; =0x00001B66 + ldr r1, [sp, #0x14] + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #0x51 + str r4, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0xe + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x28] + bl sub_0200A640 + add r0, r4, #0 + mov r1, #0xa0 + bl sub_02018144 + add r1, r5, #0 + add r1, #0xc0 + str r0, [r1, #0] + ldr r0, _021E7A98 ; =0x00001BB3 + ldr r1, [sp, #0x14] + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5b + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x2c] + ldr r0, _021E7A9C ; =0x00001BB4 + ldr r1, [sp, #0x14] + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x5c + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x30] + add r0, r7, #0 + bl sub_02006CA8 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021E7A90: .word 0x00001BB5 +_021E7A94: .word 0x00001B66 +_021E7A98: .word 0x00001BB3 +_021E7A9C: .word 0x00001BB4 + thumb_func_end ov21_021E7904 + + thumb_func_start ov21_021E7AA0 +ov21_021E7AA0: ; 0x021E7AA0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x14] + ldr r4, [r1, #0] + bl sub_0200A4E4 + ldr r0, [r5, #0x18] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x14] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x18] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x1c] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x20] + bl sub_02009D68 + ldr r0, [r5, #0x24] + bl sub_0200A4E4 + ldr r0, [r5, #0x28] + bl sub_0200A6DC + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #0x24] + bl sub_02009D68 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x28] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x2c] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x30] + bl sub_02009D68 + add r0, r5, #0 + add r0, #0xbc + ldr r0, [r0, #0] + bl sub_020181C4 + add r5, #0xc0 + ldr r0, [r5, #0] + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7AA0 + + thumb_func_start ov21_021E7B34 +ov21_021E7B34: ; 0x021E7B34 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x80 + add r6, r2, #0 + add r5, r0, #0 + ldr r0, [r6, #0] + add r7, r3, #0 + ldr r4, [r1, #0] + bl ov21_021D37BC + str r0, [sp, #0x2c] + ldr r0, [r6, #0] + ldr r1, [sp, #0x2c] + bl ov21_021D33D4 + ldr r3, _021E7CC8 ; =0x00001BB4 + str r0, [sp, #0x30] + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #3 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + ldr r1, [r4, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r4, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r4, r1] + add r0, #0xc + str r1, [sp, #0x1c] + ldr r0, [r4, r0] + add r1, r3, #1 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r2, r3, #0 + add r0, sp, #0x5c + sub r2, #0x4e + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + str r0, [sp, #0x3c] + add r0, sp, #0x5c + str r0, [sp, #0x40] + mov r0, #0x1f + str r0, [sp, #0x50] + mov r0, #0x2e + lsl r0, r0, #0xe + str r0, [sp, #0x44] + lsl r0, r1, #0x12 + str r0, [sp, #0x48] + str r1, [sp, #0x54] + str r7, [sp, #0x58] + add r0, sp, #0x3c + bl sub_02021B90 + str r0, [r5, #0] + ldr r0, [r6, #0] + bl ov21_021D3920 + cmp r0, #0 + ldr r0, [r5, #0] + bne _021E7BD0 + mov r1, #3 + bl sub_02021D6C + b _021E7BD6 +_021E7BD0: + mov r1, #4 + bl sub_02021D6C +_021E7BD6: + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x44] + mov r0, #0x6a + lsl r0, r0, #0xc + str r0, [sp, #0x48] + add r0, sp, #0x3c + bl sub_02021B90 + str r0, [r5, #8] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r5, #8] + mov r1, #1 + bl sub_02021E80 + mov r0, #0x2e + lsl r0, r0, #0xe + str r0, [sp, #0x44] + mov r0, #0x16 + lsl r0, r0, #0xe + str r0, [sp, #0x48] + add r0, sp, #0x3c + bl sub_02021B90 + mov r1, #0 + str r0, [r5, #0xc] + bl sub_02021D6C + mov r0, #0x12 + lsl r0, r0, #0xe + str r0, [sp, #0x44] + mov r0, #0x16 + lsl r0, r0, #0xe + str r0, [sp, #0x48] + add r0, sp, #0x3c + bl sub_02021B90 + str r0, [r5, #0x10] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r5, #0x14] + bl sub_02009E08 + add r6, r0, #0 + ldr r0, [r5, #0x18] + bl sub_02009E08 + str r0, [sp, #0x34] + ldr r0, [r5, #0x1c] + bl sub_02009E08 + str r0, [sp, #0x38] + ldr r0, [r5, #0x20] + bl sub_02009E08 + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #3 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + ldr r2, [r4, r0] + ldr r3, [sp, #0x38] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r2, [sp, #0x34] + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r0, sp, #0x5c + add r1, r6, #0 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + str r0, [sp, #0x3c] + add r0, sp, #0x5c + str r0, [sp, #0x40] + mov r0, #0x1f + str r0, [sp, #0x50] + mov r0, #0x12 + mov r1, #1 + lsl r0, r0, #0xe + str r0, [sp, #0x44] + lsl r0, r1, #0x12 + str r0, [sp, #0x48] + str r1, [sp, #0x54] + str r7, [sp, #0x58] + add r0, sp, #0x3c + bl sub_02021B90 + str r0, [r5, #4] + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x30] + mov r2, #0 + bl sub_02079EDC + add r1, r0, #0 + ldr r0, [r5, #4] + bl sub_02021EC4 + add sp, #0x80 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E7CC8: .word 0x00001BB4 + thumb_func_end ov21_021E7B34 + + thumb_func_start ov21_021E7CCC +ov21_021E7CCC: ; 0x021E7CCC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02021BD4 + ldr r0, [r4, #4] + bl sub_02021BD4 + ldr r0, [r4, #8] + bl sub_02021BD4 + ldr r0, [r4, #0xc] + bl sub_02021BD4 + ldr r0, [r4, #0x10] + bl sub_02021BD4 + pop {r4, pc} + thumb_func_end ov21_021E7CCC + + thumb_func_start ov21_021E7CF0 +ov21_021E7CF0: ; 0x021E7CF0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E7CF0 + + thumb_func_start ov21_021E7CF4 +ov21_021E7CF4: ; 0x021E7CF4 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E7CF4 + + thumb_func_start ov21_021E7CF8 +ov21_021E7CF8: ; 0x021E7CF8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x20 + add r6, r1, #0 + bl sub_02023790 + add r4, r0, #0 + ldr r2, _021E7DA0 ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + mov r1, #0x2c + add r2, r4, #0 + add r6, r0, #0 + bl sub_0200B1B8 + mov r0, #0 + mov r3, #1 + add r1, r4, #0 + add r2, r0, #0 + lsl r3, r3, #8 + bl sub_02002EEC + add r3, r0, #0 + mov r0, #0x18 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7DA4 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + add r0, r6, #0 + mov r1, #0xa + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7DA4 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + mov r3, #0x20 + bl sub_0201D78C + add r0, r6, #0 + mov r1, #0xa + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7DA4 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + mov r3, #0x98 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021E7DA0: .word 0x000002B9 +_021E7DA4: .word 0x00020100 + thumb_func_end ov21_021E7CF8 + + thumb_func_start ov21_021E7DA8 +ov21_021E7DA8: ; 0x021E7DA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x20 + add r1, r7, #0 + bl sub_02023790 + add r4, r0, #0 + ldr r0, [r6, #0] + bl ov21_021D37BC + add r1, r7, #0 + str r0, [sp, #0x10] + bl sub_0200B32C + str r0, [sp, #0x14] + bl sub_020989C4 + add r2, r0, #0 + mov r0, #0 + mov r1, #0x1a + add r3, r7, #0 + bl sub_0200B144 + str r0, [sp, #0x18] + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7EB8 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + ldr r2, [sp, #0x14] + add r0, r0, #4 + mov r3, #0x1a + bl sub_0201D78C + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x6e + sub r3, r1, r0 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7EB8 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_0200B190 + ldr r2, _021E7EBC ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r7, #0 + bl sub_0200B144 + add r7, r0, #0 + ldr r0, [r6, #0] + bl ov21_021D3914 + add r2, r0, #0 + mov r0, #0x98 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7EB8 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + mov r3, #0x92 + add r0, r0, #4 + bl sub_0201D78C + ldr r0, [r6, #0] + bl ov21_021D3920 + cmp r0, #0 + bne _021E7E78 + add r0, r7, #0 + mov r1, #0x61 + add r2, r4, #0 + bl sub_0200B1B8 + b _021E7E82 +_021E7E78: + add r0, r7, #0 + mov r1, #0x62 + add r2, r4, #0 + bl sub_0200B1B8 +_021E7E82: + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe6 + sub r3, r1, r0 + mov r0, #0xa8 + str r0, [sp] + mov r1, #0 + ldr r0, _021E7EB8 ; =0x00020100 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0] + add r2, r4, #0 + add r0, r0, #4 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7EB8: .word 0x00020100 +_021E7EBC: .word 0x000002B9 + thumb_func_end ov21_021E7DA8 + + thumb_func_start ov21_021E7EC0 +ov21_021E7EC0: ; 0x021E7EC0 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r1, #0 + add r4, r0, #0 + str r5, [sp] + add r3, r4, #0 + ldr r0, [r4, #0] + mov r1, #0x24 + mov r2, #1 + add r3, #0x18 + bl ov21_021D2808 + str r0, [r4, #0x10] + add r2, r4, #0 + ldr r0, [r4, #0] + mov r1, #6 + add r2, #0x1c + add r3, r5, #0 + bl ov21_021D27E0 + str r0, [r4, #0x14] + mov r0, #0x5a + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + str r0, [sp, #4] + ldr r0, [r4, #0x18] + str r0, [sp, #8] + add r0, sp, #4 + bl sub_02015128 + str r0, [r4, #4] + mov r0, #0x5a + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + str r0, [sp, #0xc] + ldr r0, [r4, #0x1c] + str r0, [sp, #0x10] + mov r0, #0x10 + str r0, [sp, #0x14] + add r0, sp, #0xc + bl sub_020151A4 + str r0, [r4, #8] + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7EC0 + + thumb_func_start ov21_021E7F20 +ov21_021E7F20: ; 0x021E7F20 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_02015164 + ldr r0, [r4, #8] + bl sub_020151D4 + ldr r0, [r4, #0x10] + bl sub_020181C4 + ldr r0, [r4, #0x14] + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7F20 + + thumb_func_start ov21_021E7F40 +ov21_021E7F40: ; 0x021E7F40 + push {r4, lr} + sub sp, #0x20 + add r4, r0, #0 + mov r0, #0x5a + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x40 + str r0, [sp] + ldr r0, [r4, #4] + mov r2, #0 + str r0, [sp, #4] + ldr r0, [r4, #8] + str r0, [sp, #8] + add r0, sp, #0 + strh r1, [r0, #0xc] + mov r1, #0x58 + strh r1, [r0, #0xe] + strh r2, [r0, #0x10] + mov r1, #0x1f + str r1, [sp, #0x14] + str r2, [sp, #0x18] + strh r2, [r0, #0x1c] + add r0, sp, #0 + bl sub_02015214 + str r0, [r4, #0xc] + add sp, #0x20 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E7F40 + + thumb_func_start ov21_021E7F7C +ov21_021E7F7C: ; 0x021E7F7C + ldr r3, _021E7F84 ; =sub_02015238 + ldr r0, [r0, #0xc] + bx r3 + nop +_021E7F84: .word sub_02015238 + thumb_func_end ov21_021E7F7C + + thumb_func_start ov21_021E7F88 +ov21_021E7F88: ; 0x021E7F88 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + mov r1, #0 + str r0, [r4, #0x40] + ldr r0, [r4, #0xc] + str r0, [r4, #0x44] + ldr r0, [r4, #0x10] + str r0, [r4, #0x48] + ldr r0, [r4, #0] + str r0, [r4, #0x4c] + ldr r0, [r4, #4] + str r0, [r4, #0x50] + add r0, r4, #0 + str r1, [r4, #0x6c] + add r0, #0xb8 + str r0, [r4, #0x70] + add r0, r4, #0 + add r0, #0xb8 + str r1, [r0, #0] + cmp r2, #0 + bne _021E7FB8 + sub r0, r1, #1 + b _021E7FBA +_021E7FB8: + mov r0, #1 +_021E7FBA: + str r0, [r4, #0x54] + add r1, r4, #0 + ldr r0, _021E7FCC ; =ov21_021E7FD0 + add r1, #0x40 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #0x3c] + pop {r4, pc} + ; .align 2, 0 +_021E7FCC: .word ov21_021E7FD0 + thumb_func_end ov21_021E7F88 + + thumb_func_start ov21_021E7FD0 +ov21_021E7FD0: ; 0x021E7FD0 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0x2c] + cmp r1, #5 + bhi _021E8078 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E7FE6: ; jump table + .short _021E7FF2 - _021E7FE6 - 2 ; case 0 + .short _021E7FFA - _021E7FE6 - 2 ; case 1 + .short _021E8002 - _021E7FE6 - 2 ; case 2 + .short _021E8024 - _021E7FE6 - 2 ; case 3 + .short _021E8044 - _021E7FE6 - 2 ; case 4 + .short _021E806E - _021E7FE6 - 2 ; case 5 +_021E7FF2: + mov r0, #2 + str r0, [r4, #0x18] + str r0, [r4, #0x2c] + pop {r4, pc} +_021E7FFA: + add r0, r4, #0 + bl ov21_021E8084 + pop {r4, pc} +_021E8002: + ldr r1, [r4, #0x14] + ldr r0, _021E807C ; =0xFFFFFDDE + mul r0, r1 + str r0, [r4, #0x24] + mov r0, #0xb5 + ldr r1, [r4, #0x14] + mvn r0, r0 + mul r0, r1 + str r0, [r4, #0x20] + mov r0, #3 + str r0, [r4, #0x28] + mov r0, #1 + str r0, [r4, #0x2c] + add r0, r4, #0 + bl ov21_021E8084 + pop {r4, pc} +_021E8024: + ldr r1, [r4, #0x14] + ldr r0, _021E8080 ; =0x00000222 + mul r0, r1 + str r0, [r4, #0x24] + ldr r1, [r4, #0x14] + mov r0, #0xb6 + mul r0, r1 + str r0, [r4, #0x20] + mov r0, #4 + str r0, [r4, #0x28] + mov r0, #1 + str r0, [r4, #0x2c] + add r0, r4, #0 + bl ov21_021E8084 + pop {r4, pc} +_021E8044: + mov r1, #0 + str r1, [r4, #0x24] + ldr r0, [r4, #0x14] + sub r1, #0xb6 + mul r1, r0 + str r1, [r4, #0x20] + mov r0, #1 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x18] + sub r0, r0, #1 + str r0, [r4, #0x18] + cmp r0, #0 + ble _021E8062 + mov r0, #2 + b _021E8064 +_021E8062: + mov r0, #5 +_021E8064: + str r0, [r4, #0x28] + add r0, r4, #0 + bl ov21_021E8084 + pop {r4, pc} +_021E806E: + bl sub_0200DA58 + ldr r0, [r4, #0x30] + mov r1, #1 + str r1, [r0, #0] +_021E8078: + pop {r4, pc} + nop +_021E807C: .word 0xFFFFFDDE +_021E8080: .word 0x00000222 + thumb_func_end ov21_021E7FD0 + + thumb_func_start ov21_021E8084 +ov21_021E8084: ; 0x021E8084 + push {r3, lr} + sub sp, #8 + add r3, r0, #0 + ldr r2, [r3, #0x20] + ldr r1, [r3, #0x24] + cmp r2, #0 + bge _021E80A6 + ldr r0, [r3, #0x1c] + add r0, r0, r2 + cmp r0, r1 + blt _021E809E + str r0, [r3, #0x1c] + b _021E80B8 +_021E809E: + str r1, [r3, #0x1c] + ldr r0, [r3, #0x28] + str r0, [r3, #0x2c] + b _021E80B8 +_021E80A6: + ldr r0, [r3, #0x1c] + add r0, r0, r2 + cmp r0, r1 + bgt _021E80B2 + str r0, [r3, #0x1c] + b _021E80B8 +_021E80B2: + str r1, [r3, #0x1c] + ldr r0, [r3, #0x28] + str r0, [r3, #0x2c] +_021E80B8: + ldr r0, [r3, #0x10] + str r0, [sp] + ldr r0, [r3, #0x1c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r3, #0] + ldr r1, [r3, #4] + ldr r2, [r3, #8] + ldr r3, [r3, #0xc] + bl ov21_021E80D4 + add sp, #8 + pop {r3, pc} + thumb_func_end ov21_021E8084 + + thumb_func_start ov21_021E80D4 +ov21_021E80D4: ; 0x021E80D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + add r1, sp, #0x18 + ldrh r1, [r1, #0x14] + add r7, r2, #0 + str r3, [sp] + bl sub_020152BC + add r0, sp, #0x18 + ldrh r0, [r0, #0x14] + mov r2, #0xe + lsl r2, r2, #0xe + asr r0, r0, #4 + lsl r4, r0, #1 + add r0, r4, #1 + lsl r1, r0, #1 + ldr r0, _021E8184 ; =0x020F983C + mov r3, #0 + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r5, r2, #0xc + orr r5, r0 + mov r2, #0xe + ldr r0, _021E8184 ; =0x020F983C + lsl r1, r4, #1 + ldrsh r0, [r0, r1] + lsl r2, r2, #0xe + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + mov r3, #0 + add r0, r0, r2 + adc r1, r3 + lsr r4, r0, #0xc + lsl r0, r2, #8 + lsl r1, r1, #0x14 + add r0, r5, r0 + orr r4, r1 + str r0, [sp, #4] + lsl r0, r2, #7 + add r0, r4, r0 + str r0, [sp, #8] + ldr r0, [sp] + add r1, sp, #4 + bl sub_02021C50 + mov r0, #6 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r6, #0 + add r1, sp, #4 + bl sub_02021C50 + mov r0, #2 + lsl r0, r0, #0x12 + sub r1, r0, r5 + lsr r0, r0, #1 + sub r0, r0, r4 + str r0, [sp, #8] + str r1, [sp, #4] + ldr r0, [sp, #0x28] + add r1, sp, #4 + bl sub_02021C50 + mov r0, #6 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r7, #0 + add r1, sp, #4 + bl sub_02021C50 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E8184: .word 0x020F983C + thumb_func_end ov21_021E80D4 + + thumb_func_start ov21_021E8188 +ov21_021E8188: ; 0x021E8188 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + add r5, r4, #0 + str r0, [r4, #0x74] + ldr r0, [r4, #0xc] + add r5, #0xb8 + str r0, [r4, #0x78] + ldr r0, [r4, #0x10] + str r0, [r4, #0x7c] + add r0, r4, #0 + ldr r1, [r4, #0] + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, [r4, #4] + add r0, #0x84 + str r1, [r0, #0] + add r1, r4, #0 + mov r0, #0 + add r1, #0x88 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0x94 + str r5, [r1, #0] + add r1, r4, #0 + add r1, #0xb8 + str r0, [r1, #0] + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _021E81D4 + add r0, r4, #0 + add r0, #0x8c + str r2, [r0, #0] + add r0, r4, #0 + add r0, #0x90 + str r3, [r0, #0] + b _021E81E4 +_021E81D4: + add r0, r4, #0 + neg r1, r2 + add r0, #0x8c + str r1, [r0, #0] + add r0, r4, #0 + neg r1, r3 + add r0, #0x90 + str r1, [r0, #0] +_021E81E4: + add r1, r4, #0 + ldr r0, _021E81F4 ; =ov21_021E81F8 + add r1, #0x74 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #0x3c] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E81F4: .word ov21_021E81F8 + thumb_func_end ov21_021E8188 + + thumb_func_start ov21_021E81F8 +ov21_021E81F8: ; 0x021E81F8 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x18] + mov r4, #0 + cmp r0, #0 + ldr r2, [r5, #0x1c] + bge _021E821C + ldr r1, [r5, #0x14] + add r0, r1, r0 + cmp r0, r2 + blt _021E8216 + str r0, [r5, #0x14] + b _021E822C +_021E8216: + str r2, [r5, #0x14] + mov r4, #1 + b _021E822C +_021E821C: + ldr r1, [r5, #0x14] + add r0, r1, r0 + cmp r0, r2 + bgt _021E8228 + str r0, [r5, #0x14] + b _021E822C +_021E8228: + str r2, [r5, #0x14] + mov r4, #1 +_021E822C: + ldr r0, [r5, #0x10] + str r0, [sp] + ldr r0, [r5, #0x14] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [r5, #4] + ldr r2, [r5, #8] + ldr r3, [r5, #0xc] + bl ov21_021E80D4 + cmp r4, #1 + bne _021E8254 + add r0, r6, #0 + bl sub_0200DA58 + ldr r0, [r5, #0x20] + mov r1, #1 + str r1, [r0, #0] +_021E8254: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E81F8 + + thumb_func_start ov21_021E8258 +ov21_021E8258: ; 0x021E8258 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r2, #0 + bne _021E8266 + ldr r1, [r5, #4] + b _021E8268 +_021E8266: + ldr r1, [r5, #0] +_021E8268: + add r0, #0x98 + str r1, [r0, #0] + neg r0, r4 + lsl r1, r0, #1 + add r0, r5, #0 + add r0, #0xa8 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + bl sub_02021D28 + add r1, r5, #0 + ldr r2, [r0, #0] + add r1, #0x9c + str r2, [r1, #0] + ldr r1, [r0, #4] + add r0, r5, #0 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r5, #0 + add r1, r5, #0 + mov r2, #0 + add r0, #0xac + str r2, [r0, #0] + add r0, r5, #0 + add r0, #0xa4 + strh r4, [r0] + add r0, r5, #0 + add r0, #0xb0 + str r2, [r0, #0] + add r0, r5, #0 + add r1, #0xb8 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb8 + str r2, [r0, #0] + add r1, r5, #0 + ldr r0, _021E82C4 ; =ov21_021E82C8 + add r1, #0x98 + bl sub_0200D9E8 + str r0, [r5, #0x3c] + pop {r3, r4, r5, pc} + nop +_021E82C4: .word ov21_021E82C8 + thumb_func_end ov21_021E8258 + + thumb_func_start ov21_021E82C8 +ov21_021E82C8: ; 0x021E82C8 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #3 + bhi _021E83D2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E82E2: ; jump table + .short _021E82EA - _021E82E2 - 2 ; case 0 + .short _021E833C - _021E82E2 - 2 ; case 1 + .short _021E8370 - _021E82E2 - 2 ; case 2 + .short _021E83B6 - _021E82E2 - 2 ; case 3 +_021E82EA: + ldr r0, [r4, #0x14] + add r3, r0, #1 + str r3, [r4, #0x14] + mov r0, #0xc + ldrsh r0, [r4, r0] + add r1, r3, #0 + mul r1, r3 + add r2, r0, #0 + lsr r0, r1, #0x1f + add r0, r1, r0 + mul r2, r3 + asr r0, r0, #1 + add r2, r2, r0 + ldr r0, [r4, #4] + str r0, [sp] + ldr r1, [r4, #8] + lsl r0, r2, #0xc + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0 + bl sub_02021C50 + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x10] + cmp r1, r0 + blt _021E83D2 + mov r0, #0 + str r0, [r4, #0x14] + mov r0, #0xc + ldrsh r1, [r4, r0] + add sp, #0xc + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, r0, #1 + str r0, [r4, #0x10] + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + pop {r4, r5, pc} +_021E833C: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021E8358 + mov r0, #2 + ldr r1, [r4, #4] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #8] + add r1, sp, #0 + str r0, [sp, #4] + ldr r0, [r4, #0] + bl sub_02021C50 +_021E8358: + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + cmp r0, #1 + ble _021E83D2 + mov r0, #0 + str r0, [r4, #0x14] + ldr r0, [r4, #0x18] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0x18] + pop {r4, r5, pc} +_021E8370: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021E838C + mov r0, #2 + ldr r1, [r4, #4] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #8] + add r1, sp, #0 + str r0, [sp, #4] + ldr r0, [r4, #0] + bl sub_02021C50 +_021E838C: + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + cmp r0, #1 + ble _021E83D2 + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #0 + ble _021E83AC + mov r0, #0 + str r0, [r4, #0x14] + mov r0, #1 + add sp, #0xc + str r0, [r4, #0x18] + pop {r4, r5, pc} +_021E83AC: + ldr r0, [r4, #0x18] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0x18] + pop {r4, r5, pc} +_021E83B6: + ldr r0, [r4, #4] + add r1, sp, #0 + str r0, [sp] + ldr r0, [r4, #8] + str r0, [sp, #4] + ldr r0, [r4, #0] + bl sub_02021C50 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x1c] + mov r1, #1 + str r1, [r0, #0] +_021E83D2: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E82C8 + + thumb_func_start ov21_021E83D8 +ov21_021E83D8: ; 0x021E83D8 + push {r4, r5} + mov r4, #0 + cmp r1, #0 + ble _021E83FA + add r5, r0, #0 +_021E83E2: + ldr r3, [r5, #0] + cmp r3, r2 + blt _021E83F2 + mov r1, #0x14 + mul r1, r4 + add r0, r0, r1 + pop {r4, r5} + bx lr +_021E83F2: + add r4, r4, #1 + add r5, #0x14 + cmp r4, r1 + blt _021E83E2 +_021E83FA: + mov r0, #0 + pop {r4, r5} + bx lr + thumb_func_end ov21_021E83D8 + + thumb_func_start ov21_021E8400 +ov21_021E8400: ; 0x021E8400 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0x18] + add r7, r1, #0 + add r4, r2, #0 + bl sub_02009E34 + add r6, r0, #0 + ldr r0, [r5, #0x18] + mov r1, #0 + bl sub_0200A72C + add r1, r5, #0 + str r4, [sp] + add r1, #0xbc + str r0, [sp, #4] + ldr r0, [r6, #0xc] + ldr r1, [r1, #0] + mov r2, #0x30 + add r3, r7, #0 + bl sub_0200393C + ldr r0, [sp, #4] + mov r1, #1 + bl sub_020A81FC + add r2, r5, #0 + add r2, #0xbc + add r1, r0, #0 + ldr r2, [r2, #0] + mov r0, #0xe + mov r3, #0x60 + bl sub_0201DC68 + ldr r0, [r5, #0x28] + bl sub_02009E34 + add r6, r0, #0 + ldr r0, [r5, #0x28] + mov r1, #0 + bl sub_0200A72C + add r1, r5, #0 + str r4, [sp] + add r1, #0xc0 + str r0, [sp, #8] + ldr r0, [r6, #0xc] + ldr r1, [r1, #0] + mov r2, #0x50 + add r3, r7, #0 + bl sub_0200393C + ldr r0, [sp, #8] + mov r1, #1 + bl sub_020A81FC + add r5, #0xc0 + add r1, r0, #0 + ldr r2, [r5, #0] + mov r0, #0xe + mov r3, #0xa0 + bl sub_0201DC68 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E8400 + + .rodata + + + .global Unk_ov21_021E9DB0 +Unk_ov21_021E9DB0: ; 0x021E9DB0 + .incbin "incbin/overlay21_rodata.bin", 0x28C, 0x154 + diff --git a/asm/ov21_021E8484.s b/asm/ov21_021E8484.s new file mode 100644 index 000000000..a0e3e3a12 --- /dev/null +++ b/asm/ov21_021E8484.s @@ -0,0 +1,1206 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E8484 +ov21_021E8484: ; 0x021E8484 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r2, [sp] + add r0, r2, #0 + add r4, r1, #0 + bl ov21_021E84FC + add r6, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E8544 + add r7, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + bl ov21_021E856C + str r6, [r5, #0] + str r7, [r5, #4] + str r0, [r5, #0x20] + bl ov21_021E859C + str r0, [r5, #0x24] + ldr r0, _021E84CC ; =ov21_021E85A0 + str r0, [r5, #8] + ldr r0, _021E84D0 ; =ov21_021E85DC + str r0, [r5, #0xc] + ldr r0, _021E84D4 ; =ov21_021E8640 + str r0, [r5, #0x10] + ldr r0, _021E84D8 ; =ov21_021E8654 + str r0, [r5, #0x14] + ldr r0, _021E84DC ; =ov21_021E86DC + str r0, [r5, #0x18] + ldr r0, _021E84E0 ; =ov21_021E870C + str r0, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E84CC: .word ov21_021E85A0 +_021E84D0: .word ov21_021E85DC +_021E84D4: .word ov21_021E8640 +_021E84D8: .word ov21_021E8654 +_021E84DC: .word ov21_021E86DC +_021E84E0: .word ov21_021E870C + thumb_func_end ov21_021E8484 + + thumb_func_start ov21_021E84E4 +ov21_021E84E4: ; 0x021E84E4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov21_021E8570 + ldr r0, [r4, #4] + bl ov21_021E8584 + ldr r0, [r4, #0x20] + bl ov21_021E8598 + pop {r4, pc} + thumb_func_end ov21_021E84E4 + + thumb_func_start ov21_021E84FC +ov21_021E84FC: ; 0x021E84FC + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + bne _021E850E + bl sub_02022974 +_021E850E: + add r2, r4, #0 + mov r1, #0x10 + mov r0, #0 +_021E8514: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E8514 + add r0, r5, #0 + bl ov21_021D13A0 + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1430 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #3 + bl ov21_021D1410 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov21_021D13EC + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E84FC + + thumb_func_start ov21_021E8544 +ov21_021E8544: ; 0x021E8544 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021E8556 + bl sub_02022974 +_021E8556: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + add r0, r5, #0 + bl ov21_021D13FC + str r0, [r4, #0] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E8544 + + thumb_func_start ov21_021E856C +ov21_021E856C: ; 0x021E856C + mov r0, #0 + bx lr + thumb_func_end ov21_021E856C + + thumb_func_start ov21_021E8570 +ov21_021E8570: ; 0x021E8570 + push {r4, lr} + add r4, r0, #0 + bne _021E857A + bl sub_02022974 +_021E857A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E8570 + + thumb_func_start ov21_021E8584 +ov21_021E8584: ; 0x021E8584 + push {r4, lr} + add r4, r0, #0 + bne _021E858E + bl sub_02022974 +_021E858E: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E8584 + + thumb_func_start ov21_021E8598 +ov21_021E8598: ; 0x021E8598 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E8598 + + thumb_func_start ov21_021E859C +ov21_021E859C: ; 0x021E859C + mov r0, #0 + bx lr + thumb_func_end ov21_021E859C + + thumb_func_start ov21_021E85A0 +ov21_021E85A0: ; 0x021E85A0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r6, r1, #0 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021E85B6: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021E85B6 + mov r0, #4 + str r0, [r4, #0x10] + ldr r2, [r5, #4] + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E886C + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E88B8 + str r4, [r5, #8] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E85A0 + + thumb_func_start ov21_021E85DC +ov21_021E85DC: ; 0x021E85DC + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r0, #0xc] + ldr r4, [r0, #8] + cmp r1, #1 + bne _021E85EC + mov r0, #1 + pop {r3, r4, r5, pc} +_021E85EC: + ldr r0, [r0, #0x10] + cmp r0, #1 + bne _021E85F6 + mov r0, #0 + pop {r3, r4, r5, pc} +_021E85F6: + ldr r0, [r5, #8] + bl ov21_021E33AC + cmp r0, #0 + beq _021E863A + add r0, r4, #0 + bl ov21_021E88B0 + ldr r0, [r5, #8] + bl ov21_021E33BC + cmp r0, #0 + beq _021E8622 + ldr r0, [r5, #4] + bl ov21_021D3998 + cmp r0, #2 + bne _021E8622 + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E8CF0 +_021E8622: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E88B8 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021E863A + add r0, r5, #0 + bl ov21_021E8D3C + mov r0, #0 + str r0, [r4, #0x14] +_021E863A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E85DC + + thumb_func_start ov21_021E8640 +ov21_021E8640: ; 0x021E8640 + push {r4, lr} + ldr r4, [r0, #8] + add r0, r4, #0 + bl ov21_021E88D0 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov21_021E8640 + + thumb_func_start ov21_021E8654 +ov21_021E8654: ; 0x021E8654 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #3 + bhi _021E86D8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8670: ; jump table + .short _021E8678 - _021E8670 - 2 ; case 0 + .short _021E8692 - _021E8670 - 2 ; case 1 + .short _021E86B0 - _021E8670 - 2 ; case 2 + .short _021E86C6 - _021E8670 - 2 ; case 3 +_021E8678: + ldr r0, [r4, #4] + mov r1, #0x30 + bl sub_02018144 + str r0, [r4, #8] + mov r1, #0 + mov r2, #0x30 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E86D8 +_021E8692: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E891C + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #1 + bl ov21_021E87C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E86D8 +_021E86B0: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #1 + bl ov21_021E8830 + cmp r0, #0 + beq _021E86D8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E86D8 +_021E86C6: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + bl ov21_021D25AC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E86D8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E8654 + + thumb_func_start ov21_021E86DC +ov21_021E86DC: ; 0x021E86DC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r3, #8] + add r4, r2, #0 + str r0, [sp] + add r5, r1, #0 + ldr r0, [r4, #8] + ldr r7, [r5, #8] + bl ov21_021E33AC + cmp r0, #0 + beq _021E8708 + ldr r2, [sp] + ldr r3, [r5, #4] + add r0, r6, #0 + add r1, r7, #0 + bl ov21_021E8CBC + add r0, r6, #0 + add r1, r4, #0 + bl ov21_021E8D04 +_021E8708: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E86DC + + thumb_func_start ov21_021E870C +ov21_021E870C: ; 0x021E870C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r7, r2, #0 + ldr r6, [r4, #8] + cmp r0, #4 + bhi _021E878E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8728: ; jump table + .short _021E8732 - _021E8728 - 2 ; case 0 + .short _021E8754 - _021E8728 - 2 ; case 1 + .short _021E876A - _021E8728 - 2 ; case 2 + .short _021E877C - _021E8728 - 2 ; case 3 + .short _021E878A - _021E8728 - 2 ; case 4 +_021E8732: + mov r0, #0x79 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #1 + bl ov21_021D25AC + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + mov r3, #0 + bl ov21_021E87C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E878E +_021E8754: + add r0, r6, #0 + add r1, r5, #0 + mov r3, #0 + bl ov21_021E8830 + cmp r0, #0 + beq _021E878E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E878E +_021E876A: + ldr r2, [r4, #4] + add r0, r6, #0 + add r1, r5, #0 + bl ov21_021E894C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E878E +_021E877C: + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E878E +_021E878A: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E878E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E870C + + thumb_func_start ov21_021E8794 +ov21_021E8794: ; 0x021E8794 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #4] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r4, pc} + thumb_func_end ov21_021E8794 + + thumb_func_start ov21_021E87AC +ov21_021E87AC: ; 0x021E87AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021FE0 + ldr r0, [r4, #4] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_02012AF0 + pop {r4, pc} + thumb_func_end ov21_021E87AC + + thumb_func_start ov21_021E87C4 +ov21_021E87C4: ; 0x021E87C4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r2, #0 + add r5, r1, #0 + add r6, r3, #0 + bl ov21_021E8794 + ldr r0, [r4, #8] + bl ov21_021E33A4 + cmp r0, #0 + beq _021E882C + cmp r6, #0 + beq _021E8808 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r2, [r5, #0] + lsl r0, r0, #4 + add r0, r2, r0 + add r2, r1, #0 + sub r2, #0x11 + bl ov21_021D23F8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E8808: + mov r0, #0x10 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #0x2c + str r0, [sp, #8] + mov r0, #0x2f + str r0, [sp, #0xc] + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #0x19 + ldr r3, [r5, #0] + lsl r0, r0, #4 + add r0, r3, r0 + add r3, r1, #0 + sub r3, #0x11 + bl ov21_021D23F8 +_021E882C: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E87C4 + + thumb_func_start ov21_021E8830 +ov21_021E8830: ; 0x021E8830 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r2, #8] + add r5, r1, #0 + add r4, r3, #0 + bl ov21_021E33A4 + cmp r0, #0 + beq _021E8850 + mov r0, #0x19 + ldr r1, [r5, #0] + lsl r0, r0, #4 + add r0, r1, r0 + bl ov21_021D2424 + b _021E8856 +_021E8850: + mov r0, #2 + bl sub_0200AC1C +_021E8856: + cmp r0, #0 + beq _021E8868 + cmp r4, #0 + beq _021E8864 + add r0, r6, #0 + bl ov21_021E87AC +_021E8864: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E8868: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E8830 + + thumb_func_start ov21_021E886C +ov21_021E886C: ; 0x021E886C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #4 + bl sub_02018144 + str r0, [r5, #4] + mov r0, #0xf8 + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x68 + mov r2, #0xb8 + mov r3, #8 + bl ov21_021D154C + str r4, [r5, #8] + str r5, [r5, #0xc] + str r6, [sp] + add r3, r5, #0 + ldr r0, [r5, #4] + ldr r2, _021E88AC ; =ov21_021E88E8 + mov r1, #1 + add r3, #8 + bl sub_02023FCC + str r0, [r5, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021E88AC: .word ov21_021E88E8 + thumb_func_end ov21_021E886C + + thumb_func_start ov21_021E88B0 +ov21_021E88B0: ; 0x021E88B0 + mov r1, #3 + str r1, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E88B0 + + thumb_func_start ov21_021E88B8 +ov21_021E88B8: ; 0x021E88B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0202404C + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021E88CC + mov r0, #2 + str r0, [r4, #0x10] +_021E88CC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E88B8 + + thumb_func_start ov21_021E88D0 +ov21_021E88D0: ; 0x021E88D0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E88D0 + + thumb_func_start ov21_021E88E8 +ov21_021E88E8: ; 0x021E88E8 + push {r4, lr} + ldr r4, [r2, #4] + ldr r3, [r2, #0] + lsl r2, r0, #2 + add r2, r4, r2 + str r1, [r2, #0x10] + cmp r1, #0 + beq _021E88FE + cmp r1, #2 + beq _021E8910 + pop {r4, pc} +_021E88FE: + cmp r0, #0 + bne _021E8918 + ldr r0, [r3, #8] + mov r1, #1 + bl ov21_021E33B4 + mov r0, #1 + str r0, [r4, #0x14] + pop {r4, pc} +_021E8910: + cmp r0, #0 + bne _021E8918 + mov r0, #1 + str r0, [r4, #0x14] +_021E8918: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E88E8 + + thumb_func_start ov21_021E891C +ov21_021E891C: ; 0x021E891C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov21_021E898C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E89F4 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E8AA8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov21_021E8B40 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E891C + + thumb_func_start ov21_021E894C +ov21_021E894C: ; 0x021E894C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x20 + str r0, [sp] + add r4, r1, #0 + str r2, [sp, #4] + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #4 + mov r3, #0x80 + bl ov21_021D276C + add r0, r5, #0 + bl ov21_021E8B34 + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E8BDC + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E8A74 + ldr r0, [r5, #0x2c] + cmp r0, #0 + beq _021E8986 + bl sub_020181C4 +_021E8986: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E894C + + thumb_func_start ov21_021E898C +ov21_021E898C: ; 0x021E898C + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + str r5, [sp, #0xc] + ldr r2, [r0, #0] + mov r1, #0x22 + mov r3, #6 + bl ov21_021D2724 + str r5, [sp] + ldr r0, [r4, #0] + mov r1, #0x3a + mov r2, #1 + add r3, sp, #0x10 + bl ov21_021D27B8 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r2] + mov r1, #6 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020198C0 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #6 + ldr r0, [r0, #0] + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E898C + + thumb_func_start ov21_021E89F4 +ov21_021E89F4: ; 0x021E89F4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r6, [r1, #0] + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov21_021D26E0 + add r7, r0, #0 + ldr r0, _021E8A68 ; =0x0000332E + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #5 + str r4, [sp, #8] + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r2, #0x66 + mov r3, #1 + bl sub_02009A4C + str r0, [r5, #8] + bl sub_0200A3DC + ldr r0, [r5, #8] + bl sub_02009D4C + ldr r0, _021E8A6C ; =0x0000332C + add r1, r7, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x52 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x64 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x10] + ldr r0, _021E8A70 ; =0x0000332D + add r1, r7, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x53 + str r4, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r2, #0x65 + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0x14] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E8A68: .word 0x0000332E +_021E8A6C: .word 0x0000332C +_021E8A70: .word 0x0000332D + thumb_func_end ov21_021E89F4 + + thumb_func_start ov21_021E8A74 +ov21_021E8A74: ; 0x021E8A74 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + ldr r4, [r1, #0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r4, r0] + ldr r1, [r5, #8] + bl sub_02009D68 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x10] + bl sub_02009D68 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r5, #0x14] + bl sub_02009D68 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E8A74 + + thumb_func_start ov21_021E8AA8 +ov21_021E8AA8: ; 0x021E8AA8 + push {r4, r5, r6, lr} + sub sp, #0x70 + ldr r4, [r1, #0] + ldr r3, _021E8B2C ; =0x0000332D + add r5, r0, #0 + mov r0, #0 + str r3, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #5 + lsl r0, r0, #6 + add r6, r2, #0 + ldr r2, [r4, r0] + str r2, [sp, #0x14] + add r2, r0, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r0, #0 + add r2, #8 + ldr r2, [r4, r2] + add r0, #0xc + str r2, [sp, #0x1c] + ldr r0, [r4, r0] + ldr r2, _021E8B30 ; =0x0000083F + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r1, r3, #1 + add r0, sp, #0x4c + sub r3, r3, #1 + bl sub_020093B4 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #9 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #0x1f + str r0, [sp, #0x40] + mov r0, #2 + str r0, [sp, #0x44] + lsl r0, r0, #0x12 + str r0, [sp, #0x34] + mov r0, #3 + lsl r1, r1, #0x10 + lsl r0, r0, #0x12 + str r1, [sp, #0x38] + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r6, [sp, #0x48] + bl sub_02021B90 + mov r1, #2 + str r0, [r5, #0] + bl sub_02021D6C + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E8B2C: .word 0x0000332D +_021E8B30: .word 0x0000083F + thumb_func_end ov21_021E8AA8 + + thumb_func_start ov21_021E8B34 +ov21_021E8B34: ; 0x021E8B34 + ldr r3, _021E8B3C ; =sub_02021BD4 + ldr r0, [r0, #0] + bx r3 + nop +_021E8B3C: .word sub_02021BD4 + thumb_func_end ov21_021E8B34 + + thumb_func_start ov21_021E8B40 +ov21_021E8B40: ; 0x021E8B40 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r2, #0 + ldr r4, [r1, #0] + cmp r0, #0 + bne _021E8B54 + bl sub_02022974 +_021E8B54: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021E8BD4 ; =0x0000083F + bl sub_02009DC8 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r4, r1] + str r1, [sp, #8] + mov r1, #0 + bl sub_0200A72C + mov r1, #7 + mvn r1, r1 + str r1, [sp, #0x1c] + mov r1, #2 + mov r2, #0 + str r0, [sp, #0x10] + str r1, [sp, #0x20] + str r2, [sp, #0x24] + str r1, [sp, #0x28] + str r6, [sp, #0x2c] + bl sub_0201FAB4 + add r7, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x10 + mov r2, #2 + bl ov21_021D4D6C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r2, _021E8BD8 ; =0x000002B9 + add r1, r6, #0 + mov r3, #0x65 + bl ov21_021D4DAC + lsr r0, r0, #1 + neg r0, r0 + str r6, [sp, #0xc] + str r0, [sp, #0x18] + ldr r0, [r5, #0] + str r0, [sp, #0x14] + add r0, sp, #8 + bl ov21_021D4CA0 + str r0, [r5, #4] + ldr r0, [r0, #0] + add r1, r7, #4 + bl sub_02012A60 + add r0, r6, #0 + bl ov21_021D4DA0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E8BD4: .word 0x0000083F +_021E8BD8: .word 0x000002B9 + thumb_func_end ov21_021E8B40 + + thumb_func_start ov21_021E8BDC +ov21_021E8BDC: ; 0x021E8BDC + ldr r3, _021E8BE4 ; =ov21_021D4D1C + ldr r0, [r0, #4] + bx r3 + nop +_021E8BE4: .word ov21_021D4D1C + thumb_func_end ov21_021E8BDC + + thumb_func_start ov21_021E8BE8 +ov21_021E8BE8: ; 0x021E8BE8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r1, #0 + add r1, r3, #0 + str r2, [sp, #0xc] + ldr r4, [sp, #0x30] + ldr r6, [sp, #0x40] + mov r5, #0 + bl ov21_021D144C + ldr r0, [sp, #0x3c] + ldr r1, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #8] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x38] + bl ov21_021E8C94 + ldr r0, [sp, #8] + bl sub_02021E74 + cmp r0, #3 + bhi _021E8C5A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8C26: ; jump table + .short _021E8C2E - _021E8C26 - 2 ; case 0 + .short _021E8C2E - _021E8C26 - 2 ; case 1 + .short _021E8C3E - _021E8C26 - 2 ; case 2 + .short _021E8C4C - _021E8C26 - 2 ; case 3 +_021E8C2E: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021E8C5A + mov r0, #0 + mov r5, #1 + mov r7, #9 + str r0, [r4, #0] + b _021E8C5A +_021E8C3E: + ldr r0, [r4, #0] + cmp r0, #1 + beq _021E8C5A + mov r5, #1 + mov r7, #0xa + str r5, [r4, #0] + b _021E8C5A +_021E8C4C: + ldr r0, [r4, #0] + cmp r0, #2 + beq _021E8C5A + mov r0, #2 + mov r5, #1 + mov r7, #8 + str r0, [r4, #0] +_021E8C5A: + cmp r5, #0 + beq _021E8C90 + ldr r0, [r6, #0] + cmp r0, #0 + beq _021E8C68 + bl sub_020181C4 +_021E8C68: + ldr r0, [sp, #4] + ldr r3, [sp, #0x34] + ldr r0, [r0, #0] + add r1, r7, #0 + add r2, sp, #0x10 + bl ov21_021D27E0 + str r0, [r6, #0] + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x2c] + ldr r2, [r2, #0xc] + mov r0, #0x1f + lsl r1, r1, #5 + mov r3, #0x20 + bl sub_0201DC68 + cmp r0, #0 + bne _021E8C90 + bl sub_02022974 +_021E8C90: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E8BE8 + + thumb_func_start ov21_021E8C94 +ov21_021E8C94: ; 0x021E8C94 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + bl ov21_021D1498 + add r0, r5, #0 + bl sub_02021E74 + cmp r0, #2 + ldr r0, [r4, #0] + bge _021E8CB4 + add r1, r6, #0 + bl sub_02012AC0 + pop {r4, r5, r6, pc} +_021E8CB4: + ldr r1, [sp, #0x10] + bl sub_02012AC0 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E8C94 + + thumb_func_start ov21_021E8CBC +ov21_021E8CBC: ; 0x021E8CBC + push {r4, r5, lr} + sub sp, #0x1c + add r5, r1, #0 + mov r1, #7 + mvn r1, r1 + add r4, r2, #0 + str r1, [sp] + mov r2, #4 + add r1, r5, #0 + str r2, [sp, #4] + add r1, #0x28 + str r1, [sp, #8] + str r3, [sp, #0xc] + str r2, [sp, #0x10] + mov r1, #1 + str r1, [sp, #0x14] + add r1, r5, #0 + add r1, #0x2c + str r1, [sp, #0x18] + ldr r1, [r5, #0] + ldr r2, [r5, #4] + ldr r3, [r4, #0x10] + bl ov21_021E8BE8 + add sp, #0x1c + pop {r4, r5, pc} + thumb_func_end ov21_021E8CBC + + thumb_func_start ov21_021E8CF0 +ov21_021E8CF0: ; 0x021E8CF0 + ldr r1, _021E8D00 ; =0x021BF67C + ldr r2, [r1, #0x44] + mov r1, #1 + tst r2, r1 + beq _021E8CFC + str r1, [r0, #0x14] +_021E8CFC: + bx lr + nop +_021E8D00: .word 0x021BF67C + thumb_func_end ov21_021E8CF0 + + thumb_func_start ov21_021E8D04 +ov21_021E8D04: ; 0x021E8D04 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r1, #8] + bl ov21_021E33BC + cmp r0, #1 + bne _021E8D24 + mov r0, #0x40 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x90 + mov r3, #0xe4 + bl ov21_021E8D28 +_021E8D24: + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov21_021E8D04 + + thumb_func_start ov21_021E8D28 +ov21_021E8D28: ; 0x021E8D28 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r0, [r0, #0] + bl ov21_021D2574 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E8D28 + + thumb_func_start ov21_021E8D3C +ov21_021E8D3C: ; 0x021E8D3C + ldr r3, _021E8D44 ; =ov21_021DF7A0 + ldr r0, [r0, #0xc] + mov r1, #1 + bx r3 + ; .align 2, 0 +_021E8D44: .word ov21_021DF7A0 + thumb_func_end ov21_021E8D3C \ No newline at end of file diff --git a/asm/ov21_021E8D48.s b/asm/ov21_021E8D48.s new file mode 100644 index 000000000..e79080770 --- /dev/null +++ b/asm/ov21_021E8D48.s @@ -0,0 +1,1804 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov21_021E8D48 +ov21_021E8D48: ; 0x021E8D48 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + mov r1, #0x7a + ldr r0, [r5, #0xc] + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x7a + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, [r5, #0x10] + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + ldr r0, [r5, #0x10] + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + ldr r1, _021E8DC8 ; =0x000001E7 + cmp r6, r1 + bne _021E8D86 + bl sub_02098988 + b _021E8D8C +_021E8D86: + mov r0, #1 + bl sub_02098988 +_021E8D8C: + add r0, r4, #0 + add r1, r5, #0 + bl ov21_021E8E0C + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + bl ov21_021E98D8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + mov r2, #0xa + mov r3, #0xf + bl ov21_021E98F8 + ldr r0, _021E8DCC ; =ov21_021E9828 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + mov r1, #7 + lsl r1, r1, #6 + str r0, [r4, r1] + add r0, r4, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021E8DC8: .word 0x000001E7 +_021E8DCC: .word ov21_021E9828 + thumb_func_end ov21_021E8D48 + + thumb_func_start ov21_021E8DD0 +ov21_021E8DD0: ; 0x021E8DD0 + push {r4, lr} + add r4, r0, #0 + bl ov21_021E900C + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E8DD0 + + thumb_func_start ov21_021E8DEC +ov21_021E8DEC: ; 0x021E8DEC + mov r1, #0x6e + lsl r1, r1, #2 + ldr r0, [r0, r1] + cmp r0, #4 + bne _021E8DFA + mov r0, #1 + bx lr +_021E8DFA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov21_021E8DEC + + thumb_func_start ov21_021E8E00 +ov21_021E8E00: ; 0x021E8E00 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov21_021E8E00 + + thumb_func_start ov21_021E8E04 +ov21_021E8E04: ; 0x021E8E04 + mov r2, #0x79 + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov21_021E8E04 + + thumb_func_start ov21_021E8E0C +ov21_021E8E0C: ; 0x021E8E0C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + ldr r1, [r4, #0xc] + add r5, r0, #0 + mov r0, #0x45 + bl sub_02006C24 + add r6, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + mov r2, #0 + bl sub_02074470 + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #0x10] + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + str r0, [r5, #0] + ldr r2, [r4, #0xc] + mov r0, #0x20 + add r1, #0x10 + bl sub_020095C4 + mov r1, #0x4e + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #0xc] + bl sub_02022014 + ldr r0, [r4, #0xc] + bl ov21_021E9A0C + ldr r0, [r4, #0xc] + mov r2, #0x30 + str r0, [sp] + ldr r0, [r4, #8] + ldr r1, [r4, #0x10] + mov r3, #0x48 + bl ov21_021E99E0 + str r0, [r5, #0xc] + ldr r0, [r4, #4] + str r0, [r5, #8] + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r5, r0] + str r0, [sp, #4] + ldr r0, [r5, #0] + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, [r4, #0xc] + str r0, [sp, #0x10] + add r0, sp, #4 + bl ov21_021D4C0C + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, #0] + ldr r1, [r4, #0xc] + bl ov21_021E90B0 + mov r1, #0x3f + add r2, r1, #0 + ldr r0, _021E9008 ; =0x04000050 + sub r2, #0x4f + bl sub_020BF578 + ldr r0, [r5, #0] + ldr r1, [r4, #0xc] + bl ov21_021E91B0 + str r0, [r5, #4] + mov r0, #0x4f + lsl r0, r0, #2 + ldr r1, [r4, #0xc] + add r0, r5, r0 + bl ov21_021E9208 + mov r1, #0x15 + lsl r1, r1, #4 + add r0, r5, r1 + sub r1, #0x14 + ldr r2, [r4, #0xc] + add r1, r5, r1 + add r3, r6, #0 + bl ov21_021D2B88 + mov r2, #0x15 + lsl r2, r2, #4 + mov r0, #2 + str r0, [sp] + add r1, r2, #0 + sub r1, #0x18 + add r0, r5, r2 + sub r2, #0x14 + ldr r1, [r5, r1] + ldr r3, [r4, #0xc] + add r2, r5, r2 + bl ov21_021D2D88 + ldr r0, [r4, #0x14] + mov r3, #0x15 + lsl r3, r3, #4 + str r0, [sp] + sub r1, r3, #4 + add r0, r5, r3 + add r3, #0x6c + ldr r1, [r5, r1] + ldr r2, [r4, #0xc] + ldr r3, [r5, r3] + bl ov21_021E9240 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0xac + mov r2, #0x20 + bl ov21_021D1858 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl ov21_021D2E44 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r2, [r5, r0] + add r0, #0x2b + cmp r2, r0 + bne _021E8F2C + cmp r7, #0 + ble _021E8F2C + mov r2, #0xb +_021E8F2C: + mov r1, #6 + lsl r1, r1, #6 + add r0, r5, r1 + sub r1, #0x44 + ldr r3, [r4, #0xc] + add r1, r5, r1 + bl ov21_021E9458 + mov r2, #6 + lsl r2, r2, #6 + add r1, r2, #0 + sub r1, #0x48 + add r0, r5, r2 + sub r2, #0x44 + ldr r1, [r5, r1] + ldr r3, [r4, #0xc] + add r2, r5, r2 + bl ov21_021E94B0 + mov r2, #0x67 + lsl r2, r2, #2 + str r6, [sp] + add r1, r2, #0 + add r0, r5, r2 + add r2, #0x20 + sub r1, #0x60 + ldr r2, [r5, r2] + ldr r3, [r4, #0xc] + add r1, r5, r1 + bl ov21_021E95BC + mov r2, #0x6f + lsl r2, r2, #2 + ldr r0, [r5, r2] + add r1, r2, #0 + str r0, [sp] + add r0, r2, #0 + sub r1, #0x84 + sub r0, #0x20 + sub r2, #0x80 + ldr r1, [r5, r1] + ldr r3, [r4, #0xc] + add r0, r5, r0 + add r2, r5, r2 + bl ov21_021E95F8 + mov r2, #0x69 + lsl r2, r2, #2 + add r0, r5, r2 + str r0, [sp] + add r1, r2, #0 + add r0, r2, #0 + sub r1, #0x6c + sub r0, #0x10 + sub r2, #0x68 + ldr r1, [r5, r1] + ldr r3, [r4, #0xc] + add r0, r5, r0 + add r2, r5, r2 + bl ov21_021E9504 + mov r3, #0x16 + lsl r3, r3, #4 + ldr r0, [r5, r3] + add r1, r3, #0 + str r0, [sp] + add r0, r3, #0 + sub r1, #0x14 + add r3, #0x5c + add r0, #0x34 + ldr r1, [r5, r1] + ldr r2, [r4, #0xc] + ldr r3, [r5, r3] + add r0, r5, r0 + bl ov21_021E9560 + ldr r0, [r5, #0] + ldr r1, [r4, #0xc] + add r2, r6, #0 + bl ov21_021E96A8 + ldr r0, [r5, #0] + ldr r1, [r4, #0xc] + add r2, r6, #0 + bl ov21_021E97C4 + mov r2, #0x6f + lsl r2, r2, #2 + ldr r0, [r5, #4] + ldr r1, [r4, #0xc] + ldr r2, [r5, r2] + bl ov21_021E9968 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x14] + add r0, r5, r0 + add r3, r6, #0 + bl ov21_021E9A40 + mov r0, #0x79 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E9008: .word 0x04000050 + thumb_func_end ov21_021E8E0C + + thumb_func_start ov21_021E900C +ov21_021E900C: ; 0x021E900C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x71 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov21_021E9AC8 + mov r0, #0x67 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov21_021E968C + mov r1, #0x67 + lsl r1, r1, #2 + add r0, r4, r1 + sub r1, #0x60 + add r1, r4, r1 + bl ov21_021E95EC + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov21_021E95B0 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov21_021E9554 + mov r0, #6 + lsl r0, r0, #6 + add r0, r4, r0 + bl ov21_021E94F8 + mov r1, #6 + lsl r1, r1, #6 + add r0, r4, r1 + sub r1, #0x44 + add r1, r4, r1 + bl ov21_021E94A4 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov21_021E92B0 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov21_021D2E1C + mov r1, #0x15 + lsl r1, r1, #4 + add r0, r4, r1 + sub r1, #0x14 + add r1, r4, r1 + bl ov21_021D2C58 + mov r0, #0x4f + lsl r0, r0, #2 + add r0, r4, r0 + bl ov21_021E9228 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021964 + ldr r0, [r4, #4] + bl ov21_021E91F0 + ldr r0, [r4, #0] + bl ov21_021E9194 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov21_021D4C6C + bl ov21_021E9A38 + pop {r4, pc} + thumb_func_end ov21_021E900C + + thumb_func_start ov21_021E90B0 +ov21_021E90B0: ; 0x021E90B0 + push {r4, r5, lr} + sub sp, #0x54 + ldr r3, _021E9188 ; =0x021E9F30 + add r5, r0, #0 + add r4, r1, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x38 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #1 + str r0, [r2, #0] + add r0, r5, #0 + bl sub_02019044 + add r0, r5, #0 + mov r1, #1 + add r2, sp, #0x38 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #1 + bl sub_02019EBC + ldr r3, _021E918C ; =0x021E9F14 + add r2, sp, #0x1c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #2 + str r0, [r2, #0] + add r0, r5, #0 + bl sub_02019044 + add r0, r5, #0 + mov r1, #2 + add r2, sp, #0x1c + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #2 + bl sub_02019EBC + mov r0, #0 + add r1, r0, #0 + bl sub_02019060 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + add r0, r5, #0 + mov r1, #0 + bl sub_02019044 + ldr r3, _021E9190 ; =0x021E9F4C + add r2, sp, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #3 + str r0, [r2, #0] + add r0, r5, #0 + bl sub_02019044 + add r0, r5, #0 + mov r1, #3 + add r2, sp, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + add r0, r5, #0 + mov r1, #3 + bl sub_02019EBC + add sp, #0x54 + pop {r4, r5, pc} + ; .align 2, 0 +_021E9188: .word 0x021E9F30 +_021E918C: .word 0x021E9F14 +_021E9190: .word 0x021E9F4C + thumb_func_end ov21_021E90B0 + + thumb_func_start ov21_021E9194 +ov21_021E9194: ; 0x021E9194 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #3 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov21_021E9194 + + thumb_func_start ov21_021E91B0 +ov21_021E91B0: ; 0x021E91B0 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + add r0, r1, #0 + mov r1, #1 + bl sub_0201A778 + add r4, r0, #0 + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xc + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + str r3, [sp, #0x10] + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201A954 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E91B0 + + thumb_func_start ov21_021E91F0 +ov21_021E91F0: ; 0x021E91F0 + push {r4, lr} + add r4, r0, #0 + bl sub_0201ACF4 + add r0, r4, #0 + bl sub_0201A8FC + add r0, r4, #0 + mov r1, #1 + bl sub_0201A928 + pop {r4, pc} + thumb_func_end ov21_021E91F0 + + thumb_func_start ov21_021E9208 +ov21_021E9208: ; 0x021E9208 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + mov r7, #8 +_021E9212: + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02009714 + add r4, r4, #1 + stmia r5!, {r0} + cmp r4, #4 + blt _021E9212 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E9208 + + thumb_func_start ov21_021E9228 +ov21_021E9228: ; 0x021E9228 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021E9230: + ldr r0, [r5, #0] + bl sub_02009754 + add r4, r4, #1 + stmia r5!, {r6} + cmp r4, #4 + blt _021E9230 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E9228 + + thumb_func_start ov21_021E9240 +ov21_021E9240: ; 0x021E9240 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + str r4, [sp, #4] + mov r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_0200A72C + str r0, [sp, #0xc] + ldr r0, [r5, #0] + str r0, [sp, #0x10] + mov r0, #0x3f + mvn r0, r0 + str r0, [sp, #0x14] + add r0, #0x38 + str r0, [sp, #0x18] + mov r0, #2 + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + mov r0, #1 + str r0, [sp, #0x24] + ldr r0, [sp, #0x40] + str r6, [sp, #0x28] + cmp r0, #0 + bne _021E9286 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021D172C + b _021E9290 +_021E9286: + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov21_021D170C +_021E9290: + add r4, r0, #0 + ldr r0, [sp, #0x40] + str r4, [sp, #8] + str r0, [sp] + add r0, r5, #0 + add r1, sp, #4 + mov r2, #0 + add r3, r7, #0 + bl ov21_021D22F8 + add r0, r4, #0 + bl ov21_021D4DA0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E9240 + + thumb_func_start ov21_021E92B0 +ov21_021E92B0: ; 0x021E92B0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021E92C2 + bl ov21_021D4D1C + mov r0, #0 + str r0, [r4, #8] +_021E92C2: + pop {r4, pc} + thumb_func_end ov21_021E92B0 + + thumb_func_start ov21_021E92C4 +ov21_021E92C4: ; 0x021E92C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r7, [sp, #0x3c] + str r3, [sp, #0x10] + str r7, [sp] + mov r3, #1 + add r6, r2, #0 + str r3, [sp, #4] + add r4, r1, #0 + str r6, [sp, #8] + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x28] + bl sub_0200985C + str r0, [r5, #0] + bl sub_0200A3DC + ldr r0, [r5, #0] + bl sub_02009D4C + str r7, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x10] + str r0, [sp, #8] + str r6, [sp, #0xc] + ldr r0, [r4, #4] + ldr r2, [sp, #0x2c] + mov r3, #0 + bl sub_020098B8 + str r0, [r5, #4] + bl sub_0200A640 + ldr r0, [r5, #4] + bl sub_02009D4C + str r7, [sp] + mov r0, #2 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #8] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x30] + mov r3, #1 + bl sub_02009918 + str r0, [r5, #8] + str r7, [sp] + mov r0, #3 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #0xc] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x34] + mov r3, #1 + bl sub_02009918 + str r0, [r5, #0xc] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E92C4 + + thumb_func_start ov21_021E9344 +ov21_021E9344: ; 0x021E9344 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r7, [sp, #0x3c] + str r3, [sp, #0x10] + str r7, [sp] + mov r3, #1 + add r6, r2, #0 + str r3, [sp, #4] + add r4, r1, #0 + str r6, [sp, #8] + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x28] + bl sub_02009A4C + str r0, [r5, #0] + bl sub_0200A3DC + ldr r0, [r5, #0] + bl sub_02009D4C + str r7, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x10] + str r0, [sp, #8] + str r6, [sp, #0xc] + ldr r0, [r4, #4] + ldr r2, [sp, #0x2c] + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #4] + bl sub_0200A640 + ldr r0, [r5, #4] + bl sub_02009D4C + str r7, [sp] + mov r0, #2 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #8] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x30] + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #8] + str r7, [sp] + mov r0, #3 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #0xc] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x34] + mov r3, #1 + bl sub_02009BC4 + str r0, [r5, #0xc] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E9344 + + thumb_func_start ov21_021E93C4 +ov21_021E93C4: ; 0x021E93C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl sub_0200A4E4 + ldr r0, [r5, #4] + bl sub_0200A6DC + ldr r0, [r4, #0] + ldr r1, [r5, #0] + bl sub_02009D68 + ldr r0, [r4, #4] + ldr r1, [r5, #4] + bl sub_02009D68 + ldr r0, [r4, #8] + ldr r1, [r5, #8] + bl sub_02009D68 + ldr r0, [r4, #0xc] + ldr r1, [r5, #0xc] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E93C4 + + thumb_func_start ov21_021E93F8 +ov21_021E93F8: ; 0x021E93F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r7, r2, #0 + add r6, r3, #0 + bl sub_02009E08 + str r0, [sp, #0x2c] + ldr r0, [r5, #4] + bl sub_02009E08 + str r0, [sp, #0x30] + ldr r0, [r5, #8] + bl sub_02009E08 + str r0, [sp, #0x34] + ldr r0, [r5, #0xc] + bl sub_02009E08 + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r6, [sp, #0x10] + ldr r1, [r4, #0] + ldr r2, [sp, #0x30] + str r1, [sp, #0x14] + ldr r1, [r4, #4] + ldr r3, [sp, #0x34] + str r1, [sp, #0x18] + ldr r1, [r4, #8] + str r1, [sp, #0x1c] + ldr r1, [r4, #0xc] + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r1, [sp, #0x2c] + add r0, r7, #0 + bl sub_020093B4 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E93F8 + + thumb_func_start ov21_021E9458 +ov21_021E9458: ; 0x021E9458 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r2, #0 + add r5, r0, #0 + str r1, [sp, #0x18] + str r3, [sp, #0x1c] + bl ov21_021D1F90 + str r0, [sp, #0x20] + add r0, r4, #0 + bl ov21_021D1F94 + add r4, r0, #0 + bl ov21_021D1F98 + add r6, r0, #0 + bl ov21_021D1F9C + add r7, r0, #0 + bl ov21_021D1FA0 + str r4, [sp] + str r6, [sp, #4] + str r7, [sp, #8] + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #0xfa + lsl r0, r0, #4 + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r0, r5, #4 + bl ov21_021E92C4 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E9458 + + thumb_func_start ov21_021E94A4 +ov21_021E94A4: ; 0x021E94A4 + ldr r3, _021E94AC ; =ov21_021E93C4 + add r0, r0, #4 + bx r3 + nop +_021E94AC: .word ov21_021E93C4 + thumb_func_end ov21_021E94A4 + + thumb_func_start ov21_021E94B0 +ov21_021E94B0: ; 0x021E94B0 + push {r3, r4, r5, r6, lr} + sub sp, #0x44 + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + add r1, r2, #0 + add r0, r5, #4 + add r2, sp, #0 + mov r3, #2 + bl ov21_021E93F8 + add r0, sp, #0 + str r0, [sp, #0x28] + mov r0, #1 + str r0, [sp, #0x3c] + mov r0, #0x20 + str r0, [sp, #0x38] + mov r0, #0x1e + lsl r0, r0, #0xe + str r0, [sp, #0x2c] + mov r0, #0x16 + lsl r0, r0, #0xe + str r0, [sp, #0x30] + add r0, sp, #0x24 + str r4, [sp, #0x24] + str r6, [sp, #0x40] + bl sub_02021B90 + str r0, [r5, #0] + cmp r0, #0 + bne _021E94F2 + bl sub_02022974 +_021E94F2: + add sp, #0x44 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E94B0 + + thumb_func_start ov21_021E94F8 +ov21_021E94F8: ; 0x021E94F8 + ldr r3, _021E9500 ; =sub_02021BD4 + ldr r0, [r0, #0] + bx r3 + nop +_021E9500: .word sub_02021BD4 + thumb_func_end ov21_021E94F8 + + thumb_func_start ov21_021E9504 +ov21_021E9504: ; 0x021E9504 + push {r3, r4, r5, r6, lr} + sub sp, #0x44 + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + add r1, r2, #0 + ldr r0, [sp, #0x58] + add r2, sp, #0 + mov r3, #2 + bl ov21_021E93F8 + add r0, sp, #0 + str r0, [sp, #0x28] + mov r0, #1 + str r0, [sp, #0x3c] + mov r0, #0x20 + str r0, [sp, #0x38] + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [sp, #0x2c] + mov r0, #0xd + lsl r0, r0, #0xe + str r0, [sp, #0x30] + add r0, sp, #0x24 + str r4, [sp, #0x24] + str r6, [sp, #0x40] + bl sub_02021B90 + str r0, [r5, #0] + cmp r0, #0 + bne _021E9546 + bl sub_02022974 +_021E9546: + ldr r0, [r5, #0] + mov r1, #0x11 + bl sub_02021D6C + add sp, #0x44 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E9504 + + thumb_func_start ov21_021E9554 +ov21_021E9554: ; 0x021E9554 + ldr r3, _021E955C ; =sub_02021BD4 + ldr r0, [r0, #0] + bx r3 + nop +_021E955C: .word sub_02021BD4 + thumb_func_end ov21_021E9554 + + thumb_func_start ov21_021E9560 +ov21_021E9560: ; 0x021E9560 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r1, #0 + add r5, r0, #0 + add r0, r7, #0 + add r1, r3, #0 + add r6, r2, #0 + bl ov21_021DF30C + add r4, r0, #0 + ldr r0, [sp, #0x40] + str r7, [sp] + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #8] + ldr r0, [r5, #0] + str r0, [sp, #0xc] + mov r0, #0x4d + mvn r0, r0 + str r0, [sp, #0x10] + add r0, #0x46 + str r0, [sp, #0x14] + mov r0, #2 + str r0, [sp, #0x18] + mov r0, #0x1f + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x20] + str r6, [sp, #0x24] + str r4, [sp, #4] + add r0, sp, #0 + bl ov21_021D4CA0 + str r0, [r5, #4] + add r0, r4, #0 + bl ov21_021D4DA0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov21_021E9560 + + thumb_func_start ov21_021E95B0 +ov21_021E95B0: ; 0x021E95B0 + ldr r3, _021E95B8 ; =ov21_021D4D1C + ldr r0, [r0, #4] + bx r3 + nop +_021E95B8: .word ov21_021D4D1C + thumb_func_end ov21_021E95B0 + + thumb_func_start ov21_021E95BC +ov21_021E95BC: ; 0x021E95BC + push {r3, lr} + sub sp, #0x18 + mov r2, #0x5a + str r2, [sp] + mov r2, #0xd + str r2, [sp, #4] + mov r2, #0x58 + str r2, [sp, #8] + mov r2, #0x59 + str r2, [sp, #0xc] + mov r2, #5 + str r2, [sp, #0x10] + ldr r2, _021E95E8 ; =0x00004268 + add r0, #8 + str r2, [sp, #0x14] + add r2, r3, #0 + ldr r3, [sp, #0x20] + bl ov21_021E9344 + add sp, #0x18 + pop {r3, pc} + nop +_021E95E8: .word 0x00004268 + thumb_func_end ov21_021E95BC + + thumb_func_start ov21_021E95EC +ov21_021E95EC: ; 0x021E95EC + ldr r3, _021E95F4 ; =ov21_021E93C4 + add r0, #8 + bx r3 + nop +_021E95F4: .word ov21_021E93C4 + thumb_func_end ov21_021E95EC + + thumb_func_start ov21_021E95F8 +ov21_021E95F8: ; 0x021E95F8 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r0, #0 + add r7, r1, #0 + ldr r0, [sp, #0x60] + mov r1, #6 + str r2, [sp] + str r3, [sp, #4] + bl sub_020759F0 + add r4, r0, #0 + ldr r0, [sp, #0x60] + mov r1, #7 + bl sub_020759F0 + add r6, r0, #0 + add r0, r4, #0 + bl ov21_021DF180 + add r4, r0, #0 + add r0, r6, #0 + bl ov21_021DF180 + add r6, r0, #0 + add r0, r5, #0 + ldr r1, [sp] + add r0, #8 + add r2, sp, #8 + mov r3, #2 + bl ov21_021E93F8 + add r0, sp, #8 + str r0, [sp, #0x30] + mov r0, #1 + str r0, [sp, #0x44] + mov r0, #0x20 + str r0, [sp, #0x40] + ldr r0, [sp, #4] + str r7, [sp, #0x2c] + str r0, [sp, #0x48] + mov r0, #0xaa + lsl r0, r0, #0xc + str r0, [sp, #0x34] + mov r0, #0x12 + lsl r0, r0, #0xe + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + add r1, r4, #0 + str r0, [r5, #0] + bl sub_02021D6C + cmp r4, r6 + beq _021E9684 + mov r0, #0x37 + lsl r0, r0, #0xe + str r0, [sp, #0x34] + mov r0, #0x12 + lsl r0, r0, #0xe + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + add r1, r6, #0 + str r0, [r5, #4] + bl sub_02021D6C + add sp, #0x4c + pop {r4, r5, r6, r7, pc} +_021E9684: + mov r0, #0 + str r0, [r5, #4] + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov21_021E95F8 + + thumb_func_start ov21_021E968C +ov21_021E968C: ; 0x021E968C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021E969A + bl sub_02021BD4 +_021E969A: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021E96A4 + bl sub_02021BD4 +_021E96A4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov21_021E968C + + thumb_func_start ov21_021E96A8 +ov21_021E96A8: ; 0x021E96A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r2, #0 + mov r2, #0 + add r5, r0, #0 + add r4, r1, #0 + str r2, [sp] + add r0, r6, #0 + mov r1, #6 + add r3, r2, #0 + str r4, [sp, #4] + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + str r4, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x21 + add r2, r5, #0 + mov r3, #3 + bl sub_020070E8 + str r4, [sp] + add r0, r6, #0 + mov r1, #0x32 + mov r2, #1 + add r3, sp, #0x10 + bl sub_020071D0 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r7, r0, #0 + ldrh r0, [r2] + mov r1, #3 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 + str r4, [sp] + add r0, r6, #0 + mov r1, #0x33 + mov r2, #1 + add r3, sp, #0x10 + bl sub_020071D0 + ldr r2, [sp, #0x10] + mov r1, #3 + str r1, [sp] + add r7, r0, #0 + ldrh r0, [r2] + mov r3, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 + add r0, r6, #0 + mov r1, #0x34 + mov r2, #1 + add r3, sp, #0x10 + str r4, [sp] + bl sub_020071D0 + add r7, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #8 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_020198C0 + add r0, r7, #0 + bl sub_020181C4 + str r4, [sp] + add r0, r6, #0 + mov r1, #0x36 + mov r2, #1 + add r3, sp, #0x10 + bl sub_020071D0 + add r4, r0, #0 + ldr r2, [sp, #0x10] + mov r0, #0x10 + str r0, [sp] + ldrh r0, [r2] + mov r1, #3 + mov r3, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + mov r1, #3 + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov21_021E96A8 + + thumb_func_start ov21_021E97C4 +ov21_021E97C4: ; 0x021E97C4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + add r4, r1, #0 + add r6, r2, #0 + str r0, [sp, #8] + str r4, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x21 + add r2, r5, #0 + mov r3, #2 + bl sub_020070E8 + str r4, [sp] + add r0, r6, #0 + mov r1, #0x39 + mov r2, #1 + add r3, sp, #0x10 + bl sub_020071D0 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r4, r0, #0 + ldrh r0, [r2] + mov r1, #2 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_020198C0 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + mov r1, #2 + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov21_021E97C4 + + thumb_func_start ov21_021E9828 +ov21_021E9828: ; 0x021E9828 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + mov r1, #0x6e + lsl r1, r1, #2 + ldr r0, [r4, r1] + cmp r0, #4 + bhi _021E98B4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E9844: ; jump table + .short _021E984E - _021E9844 - 2 ; case 0 + .short _021E985C - _021E9844 - 2 ; case 1 + .short _021E9874 - _021E9844 - 2 ; case 2 + .short _021E98A2 - _021E9844 - 2 ; case 3 + .short _021E98B4 - _021E9844 - 2 ; case 4 +_021E984E: + ldr r0, _021E98D4 ; =0x04000050 + mov r2, #0 + strh r2, [r0] + ldr r0, [r4, r1] + add r0, r0, #1 + str r0, [r4, r1] + b _021E98B4 +_021E985C: + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + bl ov21_021E9948 + cmp r0, #0 + beq _021E98B4 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _021E98B4 +_021E9874: + add r2, r1, #0 + add r2, #0x47 + str r2, [sp] + mov r0, #0 + str r0, [sp, #4] + add r1, r1, #4 + ldr r1, [r4, r1] + mov r0, #0xe + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + add r3, r2, #0 + bl sub_020059D0 + cmp r0, #0 + bne _021E9896 + bl sub_02022974 +_021E9896: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _021E98B4 +_021E98A2: + bl sub_0200598C + cmp r0, #0 + bne _021E98B4 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_021E98B4: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _021E98C6 + sub r0, #0x20 + add r0, r4, r0 + bl ov21_021E9A9C +_021E98C6: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020219F8 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_021E98D4: .word 0x04000050 + thumb_func_end ov21_021E9828 + + thumb_func_start ov21_021E98D8 +ov21_021E98D8: ; 0x021E98D8 + push {r4, lr} + mov r1, #0 + mov r3, #2 + add r2, r1, #0 + lsl r3, r3, #8 + add r4, r0, #0 + bl sub_02003070 + mov r3, #7 + add r0, r4, #0 + mov r1, #2 + mov r2, #0 + lsl r3, r3, #6 + bl sub_02003070 + pop {r4, pc} + thumb_func_end ov21_021E98D8 + + thumb_func_start ov21_021E98F8 +ov21_021E98F8: ; 0x021E98F8 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [sp, #0x20] + add r4, r3, #0 + str r0, [sp] + add r0, r1, #0 + add r1, r2, #0 + ldr r2, [sp, #0x18] + ldr r3, [sp, #0x1c] + bl sub_020086FC + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x1c] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x20] + lsl r3, r3, #0x18 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + ldr r2, _021E9944 ; =0x0000FFFF + add r0, r5, #0 + mov r1, #5 + asr r3, r3, #0x18 + bl sub_02003178 + add r0, r5, #0 + mov r1, #0 + bl sub_02003858 + add sp, #0xc + pop {r4, r5, pc} + nop +_021E9944: .word 0x0000FFFF + thumb_func_end ov21_021E98F8 + + thumb_func_start ov21_021E9948 +ov21_021E9948: ; 0x021E9948 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_0200384C + add r4, r0, #0 + add r0, r5, #0 + bl sub_020087B4 + cmp r4, #0 + bne _021E9964 + cmp r0, #0 + bne _021E9964 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E9964: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E9948 + + thumb_func_start ov21_021E9968 +ov21_021E9968: ; 0x021E9968 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, _021E9988 ; =0x00020100 + add r5, r0, #0 + str r1, [sp] + add r1, r2, #0 + add r2, r4, #0 + mov r3, #0 + bl ov21_021DEB8C + add r0, r5, #0 + add r1, r4, #0 + bl ov21_021E998C + pop {r3, r4, r5, pc} + nop +_021E9988: .word 0x00020100 + thumb_func_end ov21_021E9968 + + thumb_func_start ov21_021E998C +ov21_021E998C: ; 0x021E998C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + mov r0, #0x40 + add r4, r1, #0 + bl sub_02023790 + add r5, r0, #0 + ldr r2, _021E99DC ; =0x000002B9 + mov r0, #0 + mov r1, #0x1a + add r3, r4, #0 + bl sub_0200B144 + mov r1, #0x6e + add r2, r5, #0 + add r4, r0, #0 + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + mov r0, #0xc1 + str r1, [sp, #4] + lsl r0, r0, #0xa + str r0, [sp, #8] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0x20 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B190 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021E99DC: .word 0x000002B9 + thumb_func_end ov21_021E998C + + thumb_func_start ov21_021E99E0 +ov21_021E99E0: ; 0x021E99E0 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r5, r0, #0 + add r4, r2, #0 + add r0, sp, #0x10 + mov r2, #2 + add r6, r3, #0 + bl sub_02075EF4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, sp, #0x10 + add r2, r4, #0 + add r3, r6, #0 + bl sub_02007C34 + add sp, #0x20 + pop {r4, r5, r6, pc} + thumb_func_end ov21_021E99E0 + + thumb_func_start ov21_021E9A0C +ov21_021E9A0C: ; 0x021E9A0C + push {r3, r4, r5, lr} + sub sp, #0x10 + ldr r4, _021E9A30 ; =0x021E9F04 + add r3, sp, #0 + add r5, r0, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + ldr r1, _021E9A34 ; =0x00200010 + mov r2, #0x10 + str r5, [sp, #0xc] + bl sub_0201E88C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E9A30: .word 0x021E9F04 +_021E9A34: .word 0x00200010 + thumb_func_end ov21_021E9A0C + + thumb_func_start ov21_021E9A38 +ov21_021E9A38: ; 0x021E9A38 + ldr r3, _021E9A3C ; =sub_0201E958 + bx r3 + ; .align 2, 0 +_021E9A3C: .word sub_0201E958 + thumb_func_end ov21_021E9A38 + + thumb_func_start ov21_021E9A40 +ov21_021E9A40: ; 0x021E9A40 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + cmp r2, #0 + bne _021E9A5C + add r2, r5, #0 + add r0, r6, #0 + mov r1, #0x17 + add r2, #8 + add r3, r4, #0 + bl sub_020071EC + b _021E9A6A +_021E9A5C: + add r2, r5, #0 + add r0, r6, #0 + mov r1, #0x18 + add r2, #8 + add r3, r4, #0 + bl sub_020071EC +_021E9A6A: + add r2, r5, #0 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x1a + add r2, #0xc + add r3, r4, #0 + bl sub_020071EC + str r0, [r5, #4] + mov r1, #0 + str r1, [r5, #0x10] + str r1, [r5, #0x1c] + add r2, r5, #0 +_021E9A84: + add r1, r1, #1 + lsl r0, r1, #4 + str r0, [r2, #0x14] + add r2, r2, #4 + cmp r1, #2 + blt _021E9A84 + ldr r1, [r5, #0x1c] + add r0, r5, #0 + bl ov21_021E9AE8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov21_021E9A40 + + thumb_func_start ov21_021E9A9C +ov21_021E9A9C: ; 0x021E9A9C + push {r3, lr} + ldr r3, [r0, #0x1c] + lsl r1, r3, #2 + add r1, r0, r1 + ldr r2, [r1, #0x14] + ldr r1, [r0, #0x10] + cmp r2, r1 + bgt _021E9AC2 + add r1, r3, #1 + str r1, [r0, #0x1c] + cmp r1, #2 + blt _021E9ABA + mov r1, #0 + str r1, [r0, #0x1c] + str r1, [r0, #0x10] +_021E9ABA: + ldr r1, [r0, #0x1c] + bl ov21_021E9B08 + pop {r3, pc} +_021E9AC2: + add r1, r1, #1 + str r1, [r0, #0x10] + pop {r3, pc} + thumb_func_end ov21_021E9A9C + + thumb_func_start ov21_021E9AC8 +ov21_021E9AC8: ; 0x021E9AC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E9ACE: + ldr r0, [r5, #0] + bl sub_020181C4 + add r4, r4, #1 + cmp r4, #2 + blt _021E9ACE + add r0, r5, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov21_021E9AC8 + + thumb_func_start ov21_021E9AE8 +ov21_021E9AE8: ; 0x021E9AE8 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r4, r1, #2 + add r5, #8 + ldr r0, [r5, r4] + mov r1, #0x20 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [r5, r4] + mov r1, #0 + ldr r0, [r0, #0xc] + mov r2, #0x20 + bl sub_020C00B4 + pop {r3, r4, r5, pc} + thumb_func_end ov21_021E9AE8 + + thumb_func_start ov21_021E9B08 +ov21_021E9B08: ; 0x021E9B08 + push {r3, lr} + add r2, r1, #0 + add r3, r0, #0 + lsl r2, r2, #2 + add r2, r3, r2 + ldr r2, [r2, #8] + mov r0, #0xf + ldr r2, [r2, #0xc] + mov r1, #0 + mov r3, #0x20 + bl sub_0201DC68 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov21_021E9B08 + + .rodata + + + .global Unk_ov21_021E9F04 +Unk_ov21_021E9F04: ; 0x021E9F04 + .incbin "incbin/overlay21_rodata.bin", 0x3E0, 0x3F0 - 0x3E0 + + .global Unk_ov21_021E9F14 +Unk_ov21_021E9F14: ; 0x021E9F14 + .incbin "incbin/overlay21_rodata.bin", 0x3F0, 0x40C - 0x3F0 + + .global Unk_ov21_021E9F30 +Unk_ov21_021E9F30: ; 0x021E9F30 + .incbin "incbin/overlay21_rodata.bin", 0x40C, 0x428 - 0x40C + + .global Unk_ov21_021E9F4C +Unk_ov21_021E9F4C: ; 0x021E9F4C + .incbin "incbin/overlay21_rodata.bin", 0x428, 0x1C + diff --git a/asm/ov22_02254DE0.s b/asm/ov22_02254DE0.s new file mode 100644 index 000000000..6df54f043 --- /dev/null +++ b/asm/ov22_02254DE0.s @@ -0,0 +1,409 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02254DE0 +ov22_02254DE0: ; 0x02254DE0 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r5, r0, #0 + add r0, r7, #0 + mov r1, #8 + bl sub_02018144 + lsl r6, r5, #3 + add r4, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl sub_02018144 + mov r1, #0 + add r2, r6, #0 + str r0, [r4, #0] + bl sub_020D5124 + str r5, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02254DE0 + + thumb_func_start ov22_02254E0C +ov22_02254E0C: ; 0x02254E0C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02254E0C + + thumb_func_start ov22_02254E20 +ov22_02254E20: ; 0x02254E20 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov22_02254FE0 + add r4, r0, #0 + bne _02254E32 + bl sub_02022974 +_02254E32: + ldr r0, [r5, #0x18] + str r0, [r4, #0] + add r0, r5, #0 + bl ov22_0225500C + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02254E20 + + thumb_func_start ov22_02254E44 +ov22_02254E44: ; 0x02254E44 + push {r3, lr} + add r1, sp, #0 + bl ov22_02255040 + add r0, sp, #0 + bl sub_02022734 + pop {r3, pc} + thumb_func_end ov22_02254E44 + + thumb_func_start ov22_02254E54 +ov22_02254E54: ; 0x02254E54 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + add r6, r1, #0 + str r2, [sp] + add r7, r3, #0 + bl ov22_02254E44 + cmp r0, #0 + bne _02254E6E + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02254E6E: + add r0, r4, #0 + add r1, sp, #8 + add r2, sp, #4 + bl ov22_02254F00 + ldr r0, _02254ED8 ; =0x021BF6BC + ldr r1, [sp, #8] + ldrh r2, [r0, #0x1c] + sub r1, r2, r1 + str r1, [r6, #0] + ldrh r1, [r0, #0x1e] + ldr r0, [sp, #4] + sub r1, r1, r0 + ldr r0, [sp] + sub r4, r1, #4 + str r1, [r0, #0] + add r0, r1, #4 + cmp r4, r0 + bge _02254ED2 +_02254E94: + cmp r4, #0 + blt _02254EC6 + ldr r0, [r6, #0] + sub r5, r0, #4 + add r0, r0, #4 + cmp r5, r0 + bge _02254EC6 +_02254EA2: + cmp r5, #0 + blt _02254EBC + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov22_02255420 + cmp r0, #0 + bne _02254EBC + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02254EBC: + ldr r0, [r6, #0] + add r5, r5, #1 + add r0, r0, #4 + cmp r5, r0 + blt _02254EA2 +_02254EC6: + ldr r0, [sp] + add r4, r4, #1 + ldr r0, [r0, #0] + add r0, r0, #4 + cmp r4, r0 + blt _02254E94 +_02254ED2: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02254ED8: .word 0x021BF6BC + thumb_func_end ov22_02254E54 + + thumb_func_start ov22_02254EDC +ov22_02254EDC: ; 0x02254EDC + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + add r1, sp, #0 + bl ov22_02255040 + add r0, sp, #0 + add r1, r5, #0 + add r2, r4, #0 + bl sub_02022830 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02254EDC + + thumb_func_start ov22_02254EF4 +ov22_02254EF4: ; 0x02254EF4 + ldr r3, _02254EFC ; =sub_02015254 + ldr r0, [r0, #4] + bx r3 + nop +_02254EFC: .word sub_02015254 + thumb_func_end ov22_02254EF4 + + thumb_func_start ov22_02254F00 +ov22_02254F00: ; 0x02254F00 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r0, [r0, #4] + add r5, r1, #0 + add r4, r2, #0 + bl sub_0201525C + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #4 + ldrsh r0, [r1, r0] + str r0, [r5, #0] + mov r0, #6 + ldrsh r0, [r1, r0] + str r0, [r4, #0] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02254F00 + + thumb_func_start ov22_02254F30 +ov22_02254F30: ; 0x02254F30 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r0, [r0, #4] + add r5, r1, #0 + add r4, r2, #0 + bl sub_02015280 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #4 + ldrsh r0, [r1, r0] + str r0, [r5, #0] + mov r0, #6 + ldrsh r0, [r1, r0] + str r0, [r4, #0] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02254F30 + + thumb_func_start ov22_02254F60 +ov22_02254F60: ; 0x02254F60 + ldr r3, _02254F68 ; =sub_02015240 + ldr r0, [r0, #4] + bx r3 + nop +_02254F68: .word sub_02015240 + thumb_func_end ov22_02254F60 + + thumb_func_start ov22_02254F6C +ov22_02254F6C: ; 0x02254F6C + ldr r3, _02254F74 ; =sub_0201528C + ldr r0, [r0, #4] + bx r3 + nop +_02254F74: .word sub_0201528C + thumb_func_end ov22_02254F6C + + thumb_func_start ov22_02254F78 +ov22_02254F78: ; 0x02254F78 + ldr r3, _02254F80 ; =sub_02015290 + ldr r0, [r0, #4] + bx r3 + nop +_02254F80: .word sub_02015290 + thumb_func_end ov22_02254F78 + + thumb_func_start ov22_02254F84 +ov22_02254F84: ; 0x02254F84 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r2, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02254F30 + ldr r0, [sp, #4] + cmp r0, #0x10 + beq _02254FA4 + cmp r0, #0x20 + beq _02254FAA + cmp r0, #0x40 + beq _02254FB0 + b _02254FB4 +_02254FA4: + mov r0, #0 + str r0, [r5, #0] + b _02254FB4 +_02254FAA: + mov r0, #0xa + str r0, [r5, #0] + b _02254FB4 +_02254FB0: + mov r0, #0x14 + str r0, [r5, #0] +_02254FB4: + ldr r0, [sp] + cmp r0, #0x10 + beq _02254FC6 + cmp r0, #0x20 + beq _02254FCE + cmp r0, #0x40 + beq _02254FD6 + add sp, #8 + pop {r3, r4, r5, pc} +_02254FC6: + mov r0, #0 + add sp, #8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02254FCE: + mov r0, #0xa + add sp, #8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02254FD6: + mov r0, #0x14 + str r0, [r4, #0] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02254F84 + + thumb_func_start ov22_02254FE0 +ov22_02254FE0: ; 0x02254FE0 + push {r3, r4} + ldr r4, [r0, #4] + mov r1, #0 + cmp r4, #0 + ble _02255004 + ldr r3, [r0, #0] + add r2, r3, #0 +_02254FEE: + ldr r0, [r2, #4] + cmp r0, #0 + bne _02254FFC + lsl r0, r1, #3 + add r0, r3, r0 + pop {r3, r4} + bx lr +_02254FFC: + add r1, r1, #1 + add r2, #8 + cmp r1, r4 + blt _02254FEE +_02255004: + mov r0, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov22_02254FE0 + + thumb_func_start ov22_0225500C +ov22_0225500C: ; 0x0225500C + push {r3, lr} + sub sp, #0x20 + ldr r1, [r0, #4] + mov r3, #0 + str r1, [sp] + ldr r1, [r0, #8] + str r1, [sp, #4] + ldr r1, [r0, #0xc] + str r1, [sp, #8] + ldr r2, [r0, #0x10] + add r1, sp, #0 + strh r2, [r1, #0xc] + ldr r2, [r0, #0x14] + strh r2, [r1, #0xe] + strh r3, [r1, #0x10] + mov r2, #0x1f + str r2, [sp, #0x14] + str r3, [sp, #0x18] + ldr r0, [r0, #0x1c] + strh r0, [r1, #0x1c] + add r0, sp, #0 + bl sub_02015214 + add sp, #0x20 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_0225500C + + thumb_func_start ov22_02255040 +ov22_02255040: ; 0x02255040 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + bl sub_0201525C + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldr r0, [r5, #4] + bl sub_02015280 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #8] + ldrh r0, [r1, #2] + strh r0, [r1, #0xa] + mov r0, #0xe + ldrsh r2, [r1, r0] + mov r0, #0xa + strb r2, [r4] + ldrsh r0, [r1, r0] + add r0, r2, r0 + strb r0, [r4, #1] + mov r0, #0xc + ldrsh r2, [r1, r0] + mov r0, #8 + strb r2, [r4, #2] + ldrsh r0, [r1, r0] + add r0, r2, r0 + strb r0, [r4, #3] + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02255040 \ No newline at end of file diff --git a/asm/ov22_02255094.s b/asm/ov22_02255094.s new file mode 100644 index 000000000..bd37bde08 --- /dev/null +++ b/asm/ov22_02255094.s @@ -0,0 +1,1722 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02255094 +ov22_02255094: ; 0x02255094 + push {r3, lr} + bl ov22_02255634 + bl ov22_02255654 + bl ov22_022556DC + ldr r0, _022550B0 ; =0x021BF6DC + mov r1, #1 + strb r1, [r0, #5] + bl sub_0201FFE8 + pop {r3, pc} + nop +_022550B0: .word 0x021BF6DC + thumb_func_end ov22_02255094 + + thumb_func_start ov22_022550B4 +ov22_022550B4: ; 0x022550B4 + push {r3, lr} + ldr r0, _022550D0 ; =0x021BF6DC + mov r1, #0 + strb r1, [r0, #5] + bl sub_0201FFE8 + bl ov22_02255738 + bl ov22_0225572C + bl sub_020BED0C + pop {r3, pc} + nop +_022550D0: .word 0x021BF6DC + thumb_func_end ov22_022550B4 + + thumb_func_start ov22_022550D4 +ov22_022550D4: ; 0x022550D4 + push {r4, lr} + sub sp, #0x10 + ldr r3, _02255130 ; =0x0225BD98 + add r2, sp, #0 + add r4, r0, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0x19 + mov r1, #0xe + bl sub_02006C24 + mov r1, #6 + lsl r1, r1, #6 + str r0, [r4, r1] + add r0, r4, #0 + add r1, sp, #0 + bl ov22_02255748 + mov r2, #0xa + add r0, r4, #0 + mov r1, #0xe + lsl r2, r2, #0xa + mov r3, #0x20 + bl ov22_02255C24 + add r0, r4, #0 + bl ov22_022559B4 + add r0, r4, #0 + mov r1, #0xd + bl ov22_02255BF4 + add r0, r4, #0 + bl ov22_022559F8 + mov r0, #0xe + bl sub_02018340 + str r0, [r4, #0x40] + add r0, r4, #0 + bl ov22_02255860 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_02255130: .word 0x0225BD98 + thumb_func_end ov22_022550D4 + + thumb_func_start ov22_02255134 +ov22_02255134: ; 0x02255134 + push {r4, lr} + add r4, r0, #0 + bl ov22_02255C14 + add r0, r4, #0 + bl ov22_02255784 + add r0, r4, #0 + bl ov22_02255984 + ldr r0, [r4, #0x40] + bl sub_020181C4 + add r0, r4, #0 + bl ov22_02255C90 + add r0, r4, #0 + bl ov22_02255A98 + add r0, r4, #0 + bl ov22_022559E0 + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02006CA8 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #0x10] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x10] + pop {r4, pc} + thumb_func_end ov22_02255134 + + thumb_func_start ov22_02255180 +ov22_02255180: ; 0x02255180 + push {r4, lr} + add r4, r0, #0 + bl sub_020241B4 + bl sub_020A73C0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _02255198 + add r0, r4, #0 + bl ov22_02255794 +_02255198: + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _022551A4 + ldr r0, [r4, #0x20] + bl sub_02007768 +_022551A4: + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + add r0, r4, #0 + bl ov22_02255AC0 + pop {r4, pc} + thumb_func_end ov22_02255180 + + thumb_func_start ov22_022551B4 +ov22_022551B4: ; 0x022551B4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + ldr r2, [r4, #4] + add r5, r0, #0 + bl ov22_022557A0 + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + add r0, r5, #0 + bl ov22_02255800 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_022551B4 + + thumb_func_start ov22_022551D0 +ov22_022551D0: ; 0x022551D0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_0201517C + ldr r0, [r4, #0] + bl sub_020151EC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022551D0 + + thumb_func_start ov22_022551E4 +ov22_022551E4: ; 0x022551E4 + push {r4, r5, r6, lr} + sub sp, #0x70 + add r5, r0, #0 + mov r0, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + add r4, r2, #0 + ldr r2, [r5, #0x48] + add r6, r3, #0 + str r2, [sp, #0x14] + ldr r2, [r5, #0x4c] + add r3, r1, #0 + str r2, [sp, #0x18] + ldr r2, [r5, #0x50] + str r2, [sp, #0x1c] + ldr r2, [r5, #0x54] + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x4c + add r2, r1, #0 + bl sub_020093B4 + ldr r0, [r5, #0x44] + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + lsl r0, r4, #0xc + str r0, [sp, #0x34] + lsl r0, r6, #0xc + str r0, [sp, #0x38] + mov r0, #0 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x80] + str r0, [sp, #0x40] + ldr r0, [sp, #0x84] + str r0, [sp, #0x44] + mov r0, #0xe + str r0, [sp, #0x48] + add r0, sp, #0x2c + bl sub_02021B90 + add sp, #0x70 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_022551E4 + + thumb_func_start ov22_02255248 +ov22_02255248: ; 0x02255248 + push {r3, r4, lr} + sub sp, #0xc + ldr r4, [sp, #0x1c] + str r4, [sp] + ldr r4, [sp, #0x18] + str r4, [sp, #4] + mov r4, #0xe + str r4, [sp, #8] + ldr r0, [r0, #0x48] + bl sub_02009A4C + bl sub_0200A3DC + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02255248 + + thumb_func_start ov22_02255268 +ov22_02255268: ; 0x02255268 + push {r4, lr} + sub sp, #0x10 + ldr r4, [sp, #0x20] + str r4, [sp] + ldr r4, [sp, #0x18] + str r4, [sp, #4] + ldr r4, [sp, #0x1c] + str r4, [sp, #8] + mov r4, #0xe + str r4, [sp, #0xc] + ldr r0, [r0, #0x4c] + bl sub_02009B04 + bl sub_0200A640 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02255268 + + thumb_func_start ov22_0225528C +ov22_0225528C: ; 0x0225528C + push {r3, r4, lr} + sub sp, #0xc + ldr r4, [sp, #0x18] + str r4, [sp] + mov r4, #2 + str r4, [sp, #4] + mov r4, #0xe + str r4, [sp, #8] + ldr r0, [r0, #0x50] + bl sub_02009BC4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225528C + + thumb_func_start ov22_022552A8 +ov22_022552A8: ; 0x022552A8 + push {r3, r4, lr} + sub sp, #0xc + ldr r4, [sp, #0x18] + str r4, [sp] + mov r4, #3 + str r4, [sp, #4] + mov r4, #0xe + str r4, [sp, #8] + ldr r0, [r0, #0x54] + bl sub_02009BC4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022552A8 + + thumb_func_start ov22_022552C4 +ov22_022552C4: ; 0x022552C4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x48] + bl sub_02009DC8 + add r1, r0, #0 + ldr r0, [r4, #0x48] + bl sub_02009D68 + pop {r4, pc} + thumb_func_end ov22_022552C4 + + thumb_func_start ov22_022552D8 +ov22_022552D8: ; 0x022552D8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x4c] + bl sub_02009DC8 + add r1, r0, #0 + ldr r0, [r4, #0x4c] + bl sub_02009D68 + pop {r4, pc} + thumb_func_end ov22_022552D8 + + thumb_func_start ov22_022552EC +ov22_022552EC: ; 0x022552EC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + bl sub_02009DC8 + add r1, r0, #0 + ldr r0, [r4, #0x50] + bl sub_02009D68 + pop {r4, pc} + thumb_func_end ov22_022552EC + + thumb_func_start ov22_02255300 +ov22_02255300: ; 0x02255300 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x54] + bl sub_02009DC8 + add r1, r0, #0 + ldr r0, [r4, #0x54] + bl sub_02009D68 + pop {r4, pc} + thumb_func_end ov22_02255300 + + thumb_func_start ov22_02255314 +ov22_02255314: ; 0x02255314 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0x76 + mov r2, #0x13 + mov r3, #0xe + bl ov22_02255CB8 + add r0, r5, #0 + add r1, r4, #0 + bl ov22_02255ACC + add r0, r5, #0 + add r1, r4, #0 + bl ov22_02255B50 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02255314 + + thumb_func_start ov22_02255338 +ov22_02255338: ; 0x02255338 + ldr r3, _0225533C ; =ov22_02255D0C + bx r3 + ; .align 2, 0 +_0225533C: .word ov22_02255D0C + thumb_func_end ov22_02255338 + + thumb_func_start ov22_02255340 +ov22_02255340: ; 0x02255340 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, [r4, #0x34] + add r6, r1, #0 + add r5, r2, #0 + bl sub_02022A1C + ldr r1, [r4, #0x38] + lsl r5, r5, #2 + add r0, r6, #0 + add r1, r1, r5 + bl sub_020A7118 + ldr r0, [r4, #0x38] + ldr r0, [r0, r5] + pop {r4, r5, r6, pc} + thumb_func_end ov22_02255340 + + thumb_func_start ov22_02255360 +ov22_02255360: ; 0x02255360 + push {r3, r4} + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _0225538C ; =0xFFFF1FFF + add r3, r0, #0 + and r1, r2 + str r1, [r0, #0] + add r3, #8 + ldrh r4, [r3] + mov r2, #3 + mov r1, #1 + bic r4, r2 + orr r1, r4 + add r0, #0xa + strh r1, [r3] + ldrh r1, [r0] + bic r1, r2 + strh r1, [r0] + pop {r3, r4} + bx lr + nop +_0225538C: .word 0xFFFF1FFF + thumb_func_end ov22_02255360 + + thumb_func_start ov22_02255390 +ov22_02255390: ; 0x02255390 + push {r3, r4} + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _022553EC ; =0xFFFF1FFF + add r3, r0, #0 + and r2, r1 + lsr r1, r0, #0xd + orr r1, r2 + str r1, [r0, #0] + add r3, #0x48 + ldrh r4, [r3] + mov r2, #0x3f + mov r1, #0x1f + bic r4, r2 + orr r1, r4 + strh r1, [r3] + add r3, r0, #0 + add r3, #0x4a + ldrh r4, [r3] + mov r1, #0x12 + bic r4, r2 + orr r1, r4 + strh r1, [r3] + add r1, r0, #0 + ldr r2, _022553F0 ; =0x00000AF6 + add r1, #0x40 + strh r2, [r1] + add r1, r0, #0 + ldr r2, _022553F4 ; =0x0000128F + add r1, #0x44 + strh r2, [r1] + add r2, r0, #0 + add r2, #8 + ldrh r3, [r2] + mov r1, #3 + add r0, #0xa + bic r3, r1 + strh r3, [r2] + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + pop {r3, r4} + bx lr + ; .align 2, 0 +_022553EC: .word 0xFFFF1FFF +_022553F0: .word 0x00000AF6 +_022553F4: .word 0x0000128F + thumb_func_end ov22_02255390 + + thumb_func_start ov22_022553F8 +ov22_022553F8: ; 0x022553F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + bl sub_0201C2B8 + ldr r0, [r4, #0x20] + bl sub_02008A94 + bl sub_0200A858 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022553F8 + + thumb_func_start ov22_02255410 +ov22_02255410: ; 0x02255410 + push {r3, lr} + add r3, r1, #0 + mov r1, #0x76 + mov r2, #0x13 + bl ov22_02255CB8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_02255410 + + thumb_func_start ov22_02255420 +ov22_02255420: ; 0x02255420 + push {r4, r5} + ldrh r5, [r0, #2] + ldrh r4, [r0] + lsl r5, r5, #3 + cmp r1, #0 + blt _0225543A + cmp r2, #0 + blt _0225543A + cmp r1, r5 + bge _0225543A + lsl r4, r4, #3 + cmp r2, r4 + blt _02255440 +_0225543A: + mov r0, #2 + pop {r4, r5} + bx lr +_02255440: + add r4, r2, #0 + mul r4, r5 + add r4, r1, r4 + lsr r5, r4, #0x1f + lsl r2, r4, #0x1d + sub r2, r2, r5 + mov r1, #0x1d + ror r2, r1 + add r1, r5, r2 + lsl r2, r1, #2 + add r1, r3, #0 + ldr r3, [r0, #0x14] + asr r0, r4, #2 + lsr r0, r0, #0x1d + add r0, r4, r0 + asr r0, r0, #3 + lsl r0, r0, #2 + ldr r3, [r3, r0] + mov r0, #0xf + lsl r0, r2 + lsl r1, r2 + and r0, r3 + cmp r1, r0 + bne _02255476 + mov r0, #1 + pop {r4, r5} + bx lr +_02255476: + mov r0, #0 + pop {r4, r5} + bx lr + thumb_func_end ov22_02255420 + + thumb_func_start ov22_0225547C +ov22_0225547C: ; 0x0225547C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + bl ov22_02255748 + mov r2, #0xa + add r0, r5, #0 + add r1, r4, #0 + lsl r2, r2, #0xa + mov r3, #0x20 + bl ov22_02255C24 + ldr r0, [r5, #0x20] + mov r1, #1 + bl sub_02008B2C + add r0, r5, #0 + add r1, r4, #0 + bl ov22_02255BF4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_0225547C + + thumb_func_start ov22_022554A8 +ov22_022554A8: ; 0x022554A8 + push {r4, r5, lr} + sub sp, #0x1c + ldr r3, _022554F4 ; =0x0225BDFC + add r5, r0, #0 + str r1, [r5, #0x40] + add r4, r2, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #2 + str r0, [r2, #0] + ldr r0, [r5, #0x40] + bl sub_02019044 + ldr r0, [r5, #0x40] + mov r1, #2 + add r2, sp, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + ldr r0, [r5, #0x40] + mov r1, #2 + bl sub_02019EBC + add sp, #0x1c + pop {r4, r5, pc} + nop +_022554F4: .word 0x0225BDFC + thumb_func_end ov22_022554A8 + + thumb_func_start ov22_022554F8 +ov22_022554F8: ; 0x022554F8 + push {r4, lr} + add r4, r0, #0 + bl ov22_02255C14 + add r0, r4, #0 + bl ov22_02255784 + add r0, r4, #0 + bl ov22_02255C90 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #0x10] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x10] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022554F8 + + thumb_func_start ov22_02255524 +ov22_02255524: ; 0x02255524 + ldr r3, _0225552C ; =sub_02019044 + ldr r0, [r0, #0x40] + mov r1, #2 + bx r3 + ; .align 2, 0 +_0225552C: .word sub_02019044 + thumb_func_end ov22_02255524 + + thumb_func_start ov22_02255530 +ov22_02255530: ; 0x02255530 + ldr r3, _02255538 ; =sub_02008A94 + ldr r0, [r0, #0x20] + bx r3 + nop +_02255538: .word sub_02008A94 + thumb_func_end ov22_02255530 + + thumb_func_start ov22_0225553C +ov22_0225553C: ; 0x0225553C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, _022555C0 ; =0x04000454 + str r3, [sp] + mov r1, #0 + str r1, [r0, #0] + sub r0, #0x10 + add r6, r2, #0 + ldr r7, [sp, #0x18] + str r1, [r0, #0] + bl sub_020A73C0 + ldr r1, _022555C4 ; =0x04000470 + lsl r0, r4, #0xc + str r0, [r1, #0] + lsl r0, r6, #0xc + str r0, [r1, #0] + mov r0, #0 + str r0, [r1, #0] + ldr r0, [sp] + ldr r1, _022555C8 ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r0, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r0, [r1, r0] + ldrsh r1, [r1, r2] + bl sub_020C0078 + ldr r2, [r7, #8] + ldr r1, [r7, #4] + ldr r3, [r7, #0] + ldr r0, _022555CC ; =0x0400046C + str r3, [r0, #0] + str r1, [r0, #0] + neg r1, r4 + str r2, [r0, #0] + lsl r1, r1, #0xc + str r1, [r0, #4] + neg r1, r6 + lsl r1, r1, #0xc + str r1, [r0, #4] + mov r1, #0 + str r1, [r0, #4] + sub r0, #0x28 + str r1, [r0, #0] + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _022555A8 + add r0, r5, #0 + bl ov22_02255794 +_022555A8: + ldr r0, [r5, #0x2c] + cmp r0, #0 + beq _022555B4 + ldr r0, [r5, #0x20] + bl sub_02007768 +_022555B4: + ldr r0, _022555D0 ; =0x04000448 + mov r1, #1 + str r1, [r0, #0] + str r1, [r0, #0] + pop {r3, r4, r5, r6, r7, pc} + nop +_022555C0: .word 0x04000454 +_022555C4: .word 0x04000470 +_022555C8: .word 0x020F983C +_022555CC: .word 0x0400046C +_022555D0: .word 0x04000448 + thumb_func_end ov22_0225553C + + thumb_func_start ov22_022555D4 +ov22_022555D4: ; 0x022555D4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x19 + mov r1, #0xe + bl sub_02006C24 + mov r1, #6 + lsl r1, r1, #6 + str r0, [r4, r1] + add r0, r4, #0 + bl ov22_022559F8 + mov r0, #0xe + bl sub_02018340 + str r0, [r4, #0x40] + add r0, r4, #0 + bl ov22_02255860 + pop {r4, pc} + thumb_func_end ov22_022555D4 + + thumb_func_start ov22_022555FC +ov22_022555FC: ; 0x022555FC + push {r4, lr} + add r4, r0, #0 + bl ov22_02255984 + ldr r0, [r4, #0x40] + bl sub_020181C4 + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02006CA8 + add r0, r4, #0 + bl ov22_02255A98 + pop {r4, pc} + thumb_func_end ov22_022555FC + + thumb_func_start ov22_0225561C +ov22_0225561C: ; 0x0225561C + push {r3, lr} + ldr r0, [r0, #0x40] + bl sub_0201C2B8 + bl sub_0200A858 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_0225561C + + thumb_func_start ov22_0225562C +ov22_0225562C: ; 0x0225562C + ldr r3, _02255630 ; =ov22_02255AC0 + bx r3 + ; .align 2, 0 +_02255630: .word ov22_02255AC0 + thumb_func_end ov22_0225562C + + thumb_func_start ov22_02255634 +ov22_02255634: ; 0x02255634 + push {r4, lr} + sub sp, #0x28 + ldr r4, _02255650 ; =0x0225BE50 + add r3, sp, #0 + mov r2, #5 +_0225563E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0225563E + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_02255650: .word 0x0225BE50 + thumb_func_end ov22_02255634 + + thumb_func_start ov22_02255654 +ov22_02255654: ; 0x02255654 + push {r3, lr} + bl sub_020B28CC + bl sub_020BFB4C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _022556C8 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r1, [r0] + ldr r2, _022556CC ; =0xFFFFCFFD + and r1, r2 + strh r1, [r0] + ldrh r3, [r0] + add r1, r2, #2 + and r3, r1 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0] + ldr r1, _022556D0 ; =0x0000CFFB + and r1, r3 + strh r1, [r0] + add r1, r2, #2 + ldrh r3, [r0] + lsr r2, r2, #0x11 + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r2, _022556D4 ; =0x04000540 + mov r0, #2 + ldr r1, _022556D8 ; =0xBFFF0000 + str r0, [r2, #0] + str r1, [r2, #0x40] + mov r1, #1 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + pop {r3, pc} + ; .align 2, 0 +_022556C8: .word 0x04000008 +_022556CC: .word 0xFFFFCFFD +_022556D0: .word 0x0000CFFB +_022556D4: .word 0x04000540 +_022556D8: .word 0xBFFF0000 + thumb_func_end ov22_02255654 + + thumb_func_start ov22_022556DC +ov22_022556DC: ; 0x022556DC + push {r4, lr} + sub sp, #0x10 + ldr r4, _02255724 ; =0x0225BD78 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02255728 ; =0xFFCFFFEF + and r1, r0 + mov r0, #0x10 + orr r0, r1 + str r0, [r2, #0] + bl sub_020A7944 + bl sub_0201FF00 + bl sub_0201FF68 + mov r0, #0x1f + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x13 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_02255724: .word 0x0225BD78 +_02255728: .word 0xFFCFFFEF + thumb_func_end ov22_022556DC + + thumb_func_start ov22_0225572C +ov22_0225572C: ; 0x0225572C + push {r3, lr} + bl sub_020A5B1C + bl sub_020A5F50 + pop {r3, pc} + thumb_func_end ov22_0225572C + + thumb_func_start ov22_02255738 +ov22_02255738: ; 0x02255738 + push {r3, lr} + bl sub_0201FF00 + bl sub_0201FF68 + bl sub_020A7944 + pop {r3, pc} + thumb_func_end ov22_02255738 + + thumb_func_start ov22_02255748 +ov22_02255748: ; 0x02255748 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02015064 + str r0, [r5, #0] + mov r1, #0x76 + ldr r0, [r4, #0xc] + lsl r1, r1, #2 + bl sub_02018144 + str r0, [r5, #4] + mov r0, #0x76 + str r0, [r5, #8] + mov r0, #0 + str r0, [r5, #0xc] + ldr r0, [r4, #0xc] + mov r1, #0x4c + bl sub_02018144 + str r0, [r5, #0x10] + mov r0, #0x13 + str r0, [r5, #0x14] + mov r0, #0 + str r0, [r5, #0x18] + mov r0, #1 + str r0, [r5, #0x1c] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02255748 + + thumb_func_start ov22_02255784 +ov22_02255784: ; 0x02255784 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020150A8 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov22_02255784 + + thumb_func_start ov22_02255794 +ov22_02255794: ; 0x02255794 + ldr r3, _0225579C ; =sub_020150EC + ldr r0, [r0, #0] + bx r3 + nop +_0225579C: .word sub_020150EC + thumb_func_end ov22_02255794 + + thumb_func_start ov22_022557A0 +ov22_022557A0: ; 0x022557A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #4] + add r0, r2, #0 + add r4, r1, #0 + str r2, [sp] + cmp r0, #0 + ble _022557FC + add r7, r5, #0 + add r6, r4, #0 + add r7, #0xc +_022557BA: + ldr r1, [r5, #0xc] + ldr r0, [r5, #8] + cmp r1, r0 + blt _022557C6 + bl sub_02022974 +_022557C6: + ldr r0, [r4, #4] + cmp r0, #0 + beq _022557DC + add r0, r6, #0 + bl sub_02015128 + ldr r2, [r5, #0xc] + ldr r1, [r5, #4] + lsl r2, r2, #2 + str r0, [r1, r2] + b _022557E6 +_022557DC: + ldr r1, [r5, #0xc] + ldr r0, [r5, #4] + lsl r2, r1, #2 + mov r1, #0 + str r1, [r0, r2] +_022557E6: + ldr r0, [r7, #0] + add r4, #8 + add r0, r0, #1 + str r0, [r7, #0] + ldr r0, [sp, #4] + add r6, #8 + add r1, r0, #1 + ldr r0, [sp] + str r1, [sp, #4] + cmp r1, r0 + blt _022557BA +_022557FC: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_022557A0 + + thumb_func_start ov22_02255800 +ov22_02255800: ; 0x02255800 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #4] + add r0, r2, #0 + add r4, r1, #0 + str r2, [sp] + cmp r0, #0 + ble _0225585C + add r7, r5, #0 + add r6, r4, #0 + add r7, #0x18 +_0225581A: + ldr r1, [r5, #0x18] + ldr r0, [r5, #0x14] + cmp r1, r0 + blt _02255826 + bl sub_02022974 +_02255826: + ldr r0, [r4, #4] + cmp r0, #0 + beq _0225583C + add r0, r6, #0 + bl sub_020151A4 + ldr r2, [r5, #0x18] + ldr r1, [r5, #0x10] + lsl r2, r2, #2 + str r0, [r1, r2] + b _02255846 +_0225583C: + ldr r1, [r5, #0x18] + ldr r0, [r5, #0x10] + lsl r2, r1, #2 + mov r1, #0 + str r1, [r0, r2] +_02255846: + ldr r0, [r7, #0] + add r4, #0xc + add r0, r0, #1 + str r0, [r7, #0] + ldr r0, [sp, #4] + add r6, #0xc + add r1, r0, #1 + ldr r0, [sp] + str r1, [sp, #4] + cmp r1, r0 + blt _0225581A +_0225585C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02255800 + + thumb_func_start ov22_02255860 +ov22_02255860: ; 0x02255860 + push {r4, r5, lr} + sub sp, #0x8c + ldr r5, _02255970 ; =0x0225BDC4 + add r4, r0, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x70 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r4, #0x40] + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + mov r3, #0xe + bl sub_02019690 + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02019EBC + ldr r5, _02255974 ; =0x0225BDE0 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #0x40] + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + mov r3, #0xe + bl sub_02019690 + ldr r0, [r4, #0x40] + mov r1, #2 + bl sub_02019EBC + ldr r5, _02255978 ; =0x0225BE18 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + ldr r0, [r4, #0x40] + mov r3, #0 + bl sub_020183C4 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #0xe + bl sub_02019690 + ldr r0, [r4, #0x40] + mov r1, #3 + bl sub_02019EBC + ldr r5, _0225597C ; =0x0225BDA8 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + ldr r0, [r4, #0x40] + mov r3, #0 + bl sub_020183C4 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0xe + bl sub_02019690 + ldr r0, [r4, #0x40] + mov r1, #4 + bl sub_02019EBC + ldr r5, _02255980 ; =0x0225BE34 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + ldr r0, [r4, #0x40] + mov r3, #0 + bl sub_020183C4 + mov r0, #5 + mov r1, #0x20 + mov r2, #0 + mov r3, #0xe + bl sub_02019690 + ldr r0, [r4, #0x40] + mov r1, #5 + bl sub_02019EBC + add sp, #0x8c + pop {r4, r5, pc} + nop +_02255970: .word 0x0225BDC4 +_02255974: .word 0x0225BDE0 +_02255978: .word 0x0225BE18 +_0225597C: .word 0x0225BDA8 +_02255980: .word 0x0225BE34 + thumb_func_end ov22_02255860 + + thumb_func_start ov22_02255984 +ov22_02255984: ; 0x02255984 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0x40] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0x40] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0x40] + mov r1, #4 + bl sub_02019044 + ldr r0, [r4, #0x40] + mov r1, #5 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02255984 + + thumb_func_start ov22_022559B4 +ov22_022559B4: ; 0x022559B4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x77 + mov r1, #0xe + bl sub_0202298C + mov r1, #0x77 + str r0, [r4, #0x34] + mov r0, #0xe + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x77 + mov r1, #0 + lsl r2, r2, #2 + str r0, [r4, #0x38] + bl sub_020D5124 + mov r0, #0x77 + str r0, [r4, #0x3c] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022559B4 + + thumb_func_start ov22_022559E0 +ov22_022559E0: ; 0x022559E0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x38] + bl sub_020181C4 + ldr r0, [r4, #0x34] + bl sub_020229D8 + mov r0, #0 + str r0, [r4, #0x3c] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022559E0 + + thumb_func_start ov22_022559F8 +ov22_022559F8: ; 0x022559F8 + push {r4, r5, lr} + sub sp, #0x24 + ldr r5, _02255A94 ; =0x0225BD88 + add r3, sp, #0x14 + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #0x10 + add r0, r2, #0 + add r2, r1, #0 + bl sub_0201E88C + mov r0, #5 + mov r1, #0xe + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7c + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x1f + str r3, [sp, #0xc] + mov r2, #0xe + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + add r1, r4, #0 + mov r0, #0x30 + add r1, #0x58 + mov r2, #0xe + bl sub_020095C4 + str r0, [r4, #0x44] + add r0, r4, #0 + mov r2, #2 + add r0, #0x58 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + mov r0, #8 + mov r1, #0 + mov r2, #0xe + bl sub_02009714 + str r0, [r4, #0x48] + mov r0, #5 + mov r1, #1 + mov r2, #0xe + bl sub_02009714 + str r0, [r4, #0x4c] + mov r0, #0x30 + mov r1, #2 + mov r2, #0xe + bl sub_02009714 + str r0, [r4, #0x50] + mov r0, #0x30 + mov r1, #3 + mov r2, #0xe + bl sub_02009714 + str r0, [r4, #0x54] + add sp, #0x24 + pop {r4, r5, pc} + nop +_02255A94: .word 0x0225BD88 + thumb_func_end ov22_022559F8 + + thumb_func_start ov22_02255A98 +ov22_02255A98: ; 0x02255A98 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x44] + bl sub_02021964 + mov r4, #0 +_02255AA4: + ldr r0, [r5, #0x48] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02255AA4 + bl sub_0201E958 + bl sub_0201F8B4 + bl sub_0200A878 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02255A98 + + thumb_func_start ov22_02255AC0 +ov22_02255AC0: ; 0x02255AC0 + ldr r3, _02255AC8 ; =sub_020219F8 + ldr r0, [r0, #0x44] + bx r3 + nop +_02255AC8: .word sub_020219F8 + thumb_func_end ov22_02255AC0 + + thumb_func_start ov22_02255ACC +ov22_02255ACC: ; 0x02255ACC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r4, #0 + add r6, r0, #0 + add r7, r1, #0 + add r5, r4, #0 +_02255AD8: + mov r0, #1 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r6, r0] + add r1, r4, #1 + mov r2, #0 + mov r3, #0xe + bl sub_0200723C + str r0, [sp, #4] + cmp r0, #0 + bne _02255AF6 + bl sub_02022974 +_02255AF6: + ldr r1, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + bl ov22_02255340 + ldr r1, [r7, #0] + add r4, r4, #1 + add r1, r1, r5 + str r0, [r1, #4] + ldr r1, [r6, #0] + ldr r0, [r7, #0] + str r1, [r0, r5] + add r5, #8 + cmp r4, #0x64 + blt _02255AD8 + mov r0, #1 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #6 + mov r1, #0 + ldr r0, [r6, r0] + add r2, r1, #0 + mov r3, #0xe + bl sub_0200723C + add r4, r0, #0 + ldr r0, [r7, #0x14] + add r1, r4, #0 + mov r2, #0 + bl sub_02022A1C + ldr r1, [r7, #8] + add r0, r4, #0 + add r1, r1, #4 + bl sub_020A71B0 + ldr r1, [r6, #0] + ldr r0, [r7, #8] + str r1, [r0, #0] + ldr r0, [r7, #8] + mov r1, #3 + str r1, [r0, #8] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02255ACC + + thumb_func_start ov22_02255B50 +ov22_02255B50: ; 0x02255B50 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x87 + add r4, r1, #0 + mov r6, #0 + str r0, [sp, #8] +_02255B5E: + mov r0, #1 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #6 + add r1, r6, #0 + ldr r0, [r5, r0] + add r1, #0xce + mov r2, #0 + mov r3, #0xe + bl sub_0200723C + add r2, r6, #0 + add r1, r0, #0 + add r2, #0x64 + add r0, r5, #0 + lsl r7, r2, #3 + bl ov22_02255340 + ldr r1, [r4, #0] + mov r2, #0 + add r1, r1, r7 + str r0, [r1, #4] + ldr r1, [r5, #0] + ldr r0, [r4, #0] + mov r3, #0xe + str r1, [r0, r7] + add r0, r6, #1 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r5, r0] + ldr r1, [sp, #8] + bl sub_0200723C + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r1, [sp, #0xc] + ldr r2, [sp, #4] + bl sub_02022A1C + ldr r1, [sp, #4] + mov r0, #0xc + add r7, r1, #0 + mul r7, r0 + ldr r1, [r4, #8] + ldr r0, [sp, #0xc] + add r1, r1, r7 + add r1, r1, #4 + bl sub_020A71B0 + ldr r0, [r4, #8] + add r0, r0, r7 + ldr r0, [r0, #4] + cmp r0, #0 + bne _02255BD4 + bl sub_02022974 +_02255BD4: + ldr r1, [r5, #0] + ldr r0, [r4, #8] + add r6, r6, #1 + str r1, [r0, r7] + ldr r0, [r4, #8] + add r1, r0, r7 + mov r0, #1 + str r0, [r1, #8] + ldr r0, [sp, #8] + add r0, r0, #4 + str r0, [sp, #8] + cmp r6, #0x12 + blt _02255B5E + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02255B50 + + thumb_func_start ov22_02255BF4 +ov22_02255BF4: ; 0x02255BF4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r2, #0 + mov r0, #6 + add r3, r1, #0 + str r2, [sp] + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0xeb + bl sub_0200723C + str r0, [r4, #0x30] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02255BF4 + + thumb_func_start ov22_02255C14 +ov22_02255C14: ; 0x02255C14 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x30] + pop {r4, pc} + thumb_func_end ov22_02255C14 + + thumb_func_start ov22_02255C24 +ov22_02255C24: ; 0x02255C24 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0200762C + str r0, [r5, #0x20] + ldr r3, _02255C80 ; =0x02100DEC + mov r1, #0 + ldr r3, [r3, #0] + add r0, r4, #0 + add r2, r1, #0 + blx r3 + str r0, [r5, #0x24] + ldr r3, _02255C84 ; =0x02100DF4 + add r0, r6, #0 + ldr r3, [r3, #0] + mov r1, #0 + mov r2, #1 + blx r3 + str r0, [r5, #0x28] + ldr r3, [r5, #0x24] + ldr r2, _02255C88 ; =0x7FFF0000 + lsl r1, r3, #0x10 + and r2, r3 + lsr r2, r2, #0x10 + ldr r0, [r5, #0x20] + lsr r1, r1, #0xd + lsl r2, r2, #4 + bl sub_02008A78 + ldr r3, [r5, #0x28] + ldr r2, _02255C8C ; =0xFFFF0000 + lsl r1, r3, #0x10 + and r2, r3 + lsr r2, r2, #0x10 + ldr r0, [r5, #0x20] + lsr r1, r1, #0xd + lsl r2, r2, #3 + bl sub_02008A84 + mov r0, #1 + str r0, [r5, #0x2c] + pop {r4, r5, r6, pc} + nop +_02255C80: .word 0x02100DEC +_02255C84: .word 0x02100DF4 +_02255C88: .word 0x7FFF0000 +_02255C8C: .word 0xFFFF0000 + thumb_func_end ov22_02255C24 + + thumb_func_start ov22_02255C90 +ov22_02255C90: ; 0x02255C90 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + bl sub_02007B6C + ldr r1, _02255CB0 ; =0x02100DF0 + ldr r0, [r4, #0x24] + ldr r1, [r1, #0] + blx r1 + ldr r1, _02255CB4 ; =0x02100DF8 + ldr r0, [r4, #0x28] + ldr r1, [r1, #0] + blx r1 + mov r0, #0 + str r0, [r4, #0x2c] + pop {r4, pc} + ; .align 2, 0 +_02255CB0: .word 0x02100DF0 +_02255CB4: .word 0x02100DF8 + thumb_func_end ov22_02255C90 + + thumb_func_start ov22_02255CB8 +ov22_02255CB8: ; 0x02255CB8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + lsl r0, r4, #3 + str r0, [sp] + add r7, r3, #0 + ldr r1, [sp] + add r0, r7, #0 + add r6, r2, #0 + bl sub_02018144 + ldr r2, [sp] + mov r1, #0 + str r0, [r5, #0] + bl sub_020D5124 + add r0, r4, #0 + add r1, r7, #0 + bl sub_0202298C + str r0, [r5, #0x10] + str r4, [r5, #4] + mov r0, #0xc + add r4, r6, #0 + mul r4, r0 + add r0, r7, #0 + add r1, r4, #0 + bl sub_02018144 + mov r1, #0 + add r2, r4, #0 + str r0, [r5, #8] + bl sub_020D5124 + add r0, r6, #0 + add r1, r7, #0 + bl sub_0202298C + str r0, [r5, #0x14] + str r6, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02255CB8 + + thumb_func_start ov22_02255D0C +ov22_02255D0C: ; 0x02255D0C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02255D1E + bl sub_020229D8 + mov r0, #0 + str r0, [r4, #0x10] +_02255D1E: + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _02255D2C + bl sub_020229D8 + mov r0, #0 + str r0, [r4, #0x14] +_02255D2C: + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02255D0C + + .rodata + + + .global Unk_ov22_0225BD78 +Unk_ov22_0225BD78: ; 0x0225BD78 + .incbin "incbin/overlay22_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov22_0225BD88 +Unk_ov22_0225BD88: ; 0x0225BD88 + .incbin "incbin/overlay22_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov22_0225BD98 +Unk_ov22_0225BD98: ; 0x0225BD98 + .incbin "incbin/overlay22_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov22_0225BDA8 +Unk_ov22_0225BDA8: ; 0x0225BDA8 + .incbin "incbin/overlay22_rodata.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov22_0225BDC4 +Unk_ov22_0225BDC4: ; 0x0225BDC4 + .incbin "incbin/overlay22_rodata.bin", 0x4C, 0x68 - 0x4C + + .global Unk_ov22_0225BDE0 +Unk_ov22_0225BDE0: ; 0x0225BDE0 + .incbin "incbin/overlay22_rodata.bin", 0x68, 0x84 - 0x68 + + .global Unk_ov22_0225BDFC +Unk_ov22_0225BDFC: ; 0x0225BDFC + .incbin "incbin/overlay22_rodata.bin", 0x84, 0xA0 - 0x84 + + .global Unk_ov22_0225BE18 +Unk_ov22_0225BE18: ; 0x0225BE18 + .incbin "incbin/overlay22_rodata.bin", 0xA0, 0xBC - 0xA0 + + .global Unk_ov22_0225BE34 +Unk_ov22_0225BE34: ; 0x0225BE34 + .incbin "incbin/overlay22_rodata.bin", 0xBC, 0xD8 - 0xBC + + .global Unk_ov22_0225BE50 +Unk_ov22_0225BE50: ; 0x0225BE50 + .incbin "incbin/overlay22_rodata.bin", 0xD8, 0x28 + diff --git a/asm/ov22_02255D44.s b/asm/ov22_02255D44.s new file mode 100644 index 000000000..8c398ace9 --- /dev/null +++ b/asm/ov22_02255D44.s @@ -0,0 +1,3555 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02255D44 +ov22_02255D44: ; 0x02255D44 + push {r3, r4, r5, lr} + sub sp, #8 + mov r2, #2 + add r4, r0, #0 + mov r0, #3 + mov r1, #0xd + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r2, #1 + mov r0, #3 + mov r1, #0xe + lsl r2, r2, #0x12 + bl sub_02017FC8 + ldr r1, _02255E40 ; =0x000006E4 + add r0, r4, #0 + mov r2, #0xd + bl sub_0200681C + ldr r2, _02255E40 ; =0x000006E4 + mov r1, #0 + add r5, r0, #0 + bl sub_020D5124 + ldr r0, _02255E44 ; =ov22_02256940 + add r1, r5, #0 + bl sub_02017798 + bl sub_020177A4 + add r0, r4, #0 + bl sub_02006840 + add r4, r0, #0 + ldr r1, [r4, #0xc] + ldr r0, _02255E48 ; =0x000006D4 + str r1, [r5, r0] + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r0, [r4, #8] + add r1, r5, r1 + bl ov22_0225894C + add r0, r5, #0 + bl ov22_022566C0 + mov r1, #0xd7 + lsl r1, r1, #2 + add r0, r5, r1 + sub r1, #0x8d + mov r2, #0xd + bl ov22_02259484 + mov r0, #0xaf + lsl r0, r0, #2 + mov r1, #0xd + bl ov22_02254DE0 + mov r1, #0xd9 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r1, [r4, #0] + add r0, r5, #0 + mov r2, #0xa + mov r3, #0 + bl ov22_02256708 + add r0, r5, #0 + bl ov22_022567FC + add r0, r5, #0 + mov r1, #0 + bl ov22_02256948 + add r0, r5, #0 + bl ov22_0225699C + ldr r1, [r4, #0xc] + add r0, r5, #0 + bl ov22_02256BAC + mov r0, #0x56 + lsl r0, r0, #4 + add r1, r5, r0 + mov r2, #0xfd + str r1, [sp] + mov r1, #1 + sub r0, #0xc8 + lsl r2, r2, #2 + str r1, [sp, #4] + add r1, r5, r2 + sub r2, #0x8c + add r0, r5, r0 + add r2, r5, r2 + add r3, r5, #0 + bl ov22_022589E0 + mov r0, #0xd + bl sub_02015920 + mov r1, #0x6b + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #0xd + mov r1, #1 + bl sub_0201A778 + ldr r2, _02255E4C ; =0x000006B4 + mov r1, #0 + str r0, [r5, r2] + sub r2, #0xc + str r1, [r5, r2] + mov r0, #0x35 + add r2, r1, #0 + bl sub_02004550 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02255E40: .word 0x000006E4 +_02255E44: .word ov22_02256940 +_02255E48: .word 0x000006D4 +_02255E4C: .word 0x000006B4 + thumb_func_end ov22_02255D44 + + thumb_func_start ov22_02255E50 +ov22_02255E50: ; 0x02255E50 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r7, #0 + mov r6, #0 + bl sub_02006840 + ldr r1, [r5, #0] + cmp r1, #0xc + bhi _02255F1E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02255E78: ; jump table + .short _02255E92 - _02255E78 - 2 ; case 0 + .short _02255E92 - _02255E78 - 2 ; case 1 + .short _02255EAE - _02255E78 - 2 ; case 2 + .short _02255EBE - _02255E78 - 2 ; case 3 + .short _02255EEC - _02255E78 - 2 ; case 4 + .short _02255F0E - _02255E78 - 2 ; case 5 + .short _02255F3E - _02255E78 - 2 ; case 6 + .short _02255F74 - _02255E78 - 2 ; case 7 + .short _02255F9A - _02255E78 - 2 ; case 8 + .short _02255FDA - _02255E78 - 2 ; case 9 + .short _02256012 - _02255E78 - 2 ; case 10 + .short _02256030 - _02255E78 - 2 ; case 11 + .short _0225604E - _02255E78 - 2 ; case 12 +_02255E92: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0xd + str r1, [sp, #8] + mov r1, #5 + add r2, r1, #0 + add r3, r6, #0 + bl sub_0200F174 + mov r0, #2 + str r0, [r5, #0] + b _0225606A +_02255EAE: + bl sub_0200F2AC + cmp r0, #0 + beq _02255F1E + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225606A +_02255EBE: + ldr r0, [r0, #0x1c] + cmp r0, #1 + bne _02255EE6 + mov r0, #1 + bl sub_02002B20 + mov r0, #0x56 + lsl r0, r0, #4 + ldr r2, _02256078 ; =0x00000181 + add r0, r4, r0 + mov r1, #0x1a + mov r3, #0x2f + bl ov22_0225A660 + ldr r1, _0225607C ; =0x000006D8 + str r0, [r4, r1] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225606A +_02255EE6: + mov r0, #6 + str r0, [r5, #0] + b _0225606A +_02255EEC: + ldr r0, _0225607C ; =0x000006D8 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255F1E + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov22_0225A6A0 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225606A +_02255F0E: + ldr r0, _02256080 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + and r1, r0 + ldr r0, _02256084 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + orr r0, r1 + bne _02255F20 +_02255F1E: + b _0225606A +_02255F20: + mov r0, #0x56 + lsl r0, r0, #4 + ldr r2, _02256078 ; =0x00000181 + add r0, r4, r0 + mov r1, #0x1a + mov r3, #0x30 + bl ov22_0225A628 + add r0, r6, #0 + bl sub_02002B20 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225606A +_02255F3E: + ldr r1, _02256088 ; =0x000006A8 + ldr r0, [r4, r1] + cmp r0, #3 + bne _02255F54 + add r1, r1, #4 + add r0, r4, #0 + add r1, r4, r1 + bl ov22_02256C48 + mov r0, #7 + str r0, [r5, #0] +_02255F54: + ldr r0, _0225608C ; =0x00000498 + add r0, r4, r0 + bl ov22_0225890C + add r0, r4, #0 + bl ov22_02257564 + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov22_0225A610 + add r0, r4, #0 + bl ov22_02256AC4 + b _0225606A +_02255F74: + ldr r0, _02256090 ; =0x000006AC + ldr r1, [r4, r0] + cmp r1, #0 + beq _0225606A + add r1, r6, #0 + str r1, [r4, r0] + mov r1, #8 + str r1, [r5, #0] + mov r1, #4 + sub r0, r0, #4 + str r1, [r4, r0] + ldr r1, _02256094 ; =0x0000047C + mov r2, #0xe + add r0, r4, r1 + sub r1, #0x88 + add r1, r4, r1 + bl ov22_0225AF44 + b _0225606A +_02255F9A: + ldr r1, _02256088 ; =0x000006A8 + ldr r0, [r4, r1] + cmp r0, #9 + bne _02255FB2 + add r1, r1, #4 + add r0, r4, #0 + add r1, r4, r1 + bl ov22_02256DB8 + mov r0, #0xa + str r0, [r5, #0] + b _0225606A +_02255FB2: + cmp r0, #8 + bne _02255FC6 + mov r0, #9 + str r0, [r5, #0] + mov r0, #5 + str r0, [r4, r1] + add r0, r4, #0 + bl ov22_022575B4 + b _0225606A +_02255FC6: + add r0, r4, #0 + bl ov22_02257278 + ldr r1, _02256088 ; =0x000006A8 + str r0, [r4, r1] + ldr r0, _02256094 ; =0x0000047C + add r0, r4, r0 + bl ov22_0225AF68 + b _0225606A +_02255FDA: + ldr r0, _02256088 ; =0x000006A8 + ldr r1, [r4, r0] + cmp r1, #6 + bne _02255FEE + mov r1, #1 + add r0, #0x10 + str r1, [r4, r0] + mov r0, #0xb + str r0, [r5, #0] + b _0225606A +_02255FEE: + cmp r1, #7 + bne _02255FFE + add r1, r6, #0 + add r0, #0x10 + str r1, [r4, r0] + mov r0, #0xb + str r0, [r5, #0] + b _0225606A +_02255FFE: + add r0, r4, #0 + bl ov22_02257624 + ldr r1, _02256088 ; =0x000006A8 + str r0, [r4, r1] + ldr r0, _02256094 ; =0x0000047C + add r0, r4, r0 + bl ov22_0225AF68 + b _0225606A +_02256012: + ldr r0, _02256090 ; =0x000006AC + ldr r1, [r4, r0] + cmp r1, #0 + beq _0225606A + add r2, r6, #0 + str r2, [r4, r0] + mov r1, #6 + str r1, [r5, #0] + sub r0, r0, #4 + str r2, [r4, r0] + ldr r0, _02256094 ; =0x0000047C + add r0, r4, r0 + bl ov22_0225AF74 + b _0225606A +_02256030: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0xd + str r1, [sp, #8] + add r1, r6, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225606A +_0225604E: + bl sub_0200F2AC + cmp r0, #0 + beq _0225606A + add r0, r6, #0 + str r0, [r5, #0] + ldr r0, _02256088 ; =0x000006A8 + mov r1, #0xa + str r1, [r4, r0] + ldr r0, _02256094 ; =0x0000047C + mov r6, #1 + add r0, r4, r0 + bl ov22_0225AF74 +_0225606A: + add r0, r4, #0 + bl ov22_022566EC + add r0, r6, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02256078: .word 0x00000181 +_0225607C: .word 0x000006D8 +_02256080: .word 0x021BF67C +_02256084: .word 0x021BF6BC +_02256088: .word 0x000006A8 +_0225608C: .word 0x00000498 +_02256090: .word 0x000006AC +_02256094: .word 0x0000047C + thumb_func_end ov22_02255E50 + + thumb_func_start ov22_02256098 +ov22_02256098: ; 0x02256098 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r6, #0 + bl sub_02006840 + add r5, r0, #0 + ldr r0, _02256168 ; =0x000006B8 + ldr r0, [r4, r0] + cmp r0, #1 + bne _022560C8 + ldr r0, [r5, #0x10] + mov r1, #7 + bl sub_0202CFEC + mov r1, #0xfd + lsl r1, r1, #2 + ldr r0, [r5, #4] + ldr r2, [r5, #0x14] + add r1, r4, r1 + bl ov22_02256F38 +_022560C8: + ldr r1, [r5, #0x18] + cmp r1, #0 + beq _022560E0 + ldr r0, _02256168 ; =0x000006B8 + ldr r0, [r4, r0] + cmp r0, #1 + bne _022560DC + mov r0, #1 + str r0, [r1, #0] + b _022560E0 +_022560DC: + mov r0, #0 + str r0, [r1, #0] +_022560E0: + mov r0, #0x6b + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02015938 + ldr r0, _0225616C ; =0x000006B4 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0201A928 + add r0, r4, #0 + bl ov22_02256C38 + ldr r0, _02256170 ; =0x00000498 + add r0, r4, r0 + bl ov22_02258A34 + add r0, r4, #0 + bl ov22_02256AB4 + add r0, r4, #0 + bl ov22_0225698C + add r0, r4, #0 + bl ov22_022567D8 + add r0, r4, #0 + bl ov22_022568B8 + mov r0, #0xd9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_02254E0C + mov r0, #0xd9 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #8 + add r0, r4, r0 + bl ov22_022594AC + add r0, r4, #0 + bl ov22_022566F4 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201E530 + cmp r0, #1 + beq _02256152 + bl sub_02022974 +_02256152: + add r0, r6, #0 + bl sub_02006830 + mov r0, #0xd + bl sub_0201807C + mov r0, #0xe + bl sub_0201807C + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02256168: .word 0x000006B8 +_0225616C: .word 0x000006B4 +_02256170: .word 0x00000498 + thumb_func_end ov22_02256098 + + thumb_func_start ov22_02256174 +ov22_02256174: ; 0x02256174 + push {r3, r4, r5, lr} + sub sp, #8 + mov r2, #2 + add r5, r0, #0 + mov r0, #3 + mov r1, #0xd + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r2, #1 + mov r0, #3 + mov r1, #0xe + lsl r2, r2, #0x12 + bl sub_02017FC8 + ldr r1, _022562D8 ; =0x000006E4 + add r0, r5, #0 + mov r2, #0xd + bl sub_0200681C + ldr r2, _022562D8 ; =0x000006E4 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _022562DC ; =ov22_02256940 + add r1, r4, #0 + bl sub_02017798 + bl sub_020177A4 + add r0, r5, #0 + bl sub_02006840 + add r5, r0, #0 + mov r1, #0x1b + ldr r0, [r5, #0xc] + lsl r1, r1, #6 + str r0, [r4, r1] + ldr r2, [r5, #0x10] + add r0, r1, #4 + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, [r5, #0x14] + add r0, #8 + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, [r5, #8] + add r0, #0xc + str r2, [r4, r0] + ldr r0, [r5, #0x1c] + add r1, #0x10 + str r0, [r4, r1] + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r0, [r5, #0x18] + add r1, r4, r1 + bl ov22_0225894C + add r0, r4, #0 + bl ov22_022566C0 + ldr r0, [r4, #0x44] + mov r1, #0 + bl sub_020219A4 + bl sub_02039734 + mov r0, #1 + mov r1, #0x10 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + mov r1, #0xd7 + lsl r1, r1, #2 + add r0, r4, r1 + sub r1, #0x8d + mov r2, #0xd + bl ov22_02259484 + mov r0, #0xaf + lsl r0, r0, #2 + mov r1, #0xd + bl ov22_02254DE0 + mov r1, #0xd9 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [r5, #0x20] + ldr r0, _022562E0 ; =0x000006D4 + str r1, [r4, r0] + sub r1, r0, #4 + ldr r1, [r4, r1] + ldrb r1, [r1, #0x16] + cmp r1, #0 + bne _0225624E + ldr r0, [r5, #0xc] + bl ov22_02257580 + ldr r1, _022562E4 ; =0x000006BC + str r0, [r4, r1] + b _02256254 +_0225624E: + mov r1, #0x14 + sub r0, #0x18 + str r1, [r4, r0] +_02256254: + ldr r2, _022562E4 ; =0x000006BC + ldr r1, [r5, #0] + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov22_02256790 + add r0, r4, #0 + bl ov22_022567FC + add r0, r4, #0 + mov r1, #0 + bl ov22_02256948 + add r0, r4, #0 + bl ov22_02256A28 + ldr r0, [r5, #0x20] + ldr r1, _022562E4 ; =0x000006BC + str r0, [sp] + ldr r1, [r4, r1] + ldr r2, [r5, #8] + ldr r3, [r5, #0x1c] + add r0, r4, #0 + bl ov22_02256BF4 + mov r0, #0x56 + lsl r0, r0, #4 + add r1, r4, r0 + mov r2, #0xfd + str r1, [sp] + mov r1, #0 + sub r0, #0xc8 + lsl r2, r2, #2 + str r1, [sp, #4] + add r1, r4, r2 + sub r2, #0x8c + add r0, r4, r0 + add r2, r4, r2 + add r3, r4, #0 + bl ov22_022589E0 + mov r0, #0xd + bl sub_02015920 + mov r1, #0x6b + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #0xd + mov r1, #1 + bl sub_0201A778 + ldr r1, _022562E8 ; =0x000006B4 + mov r2, #0 + str r0, [r4, r1] + add r0, r1, #0 + sub r0, #0xc + add r1, #0x1c + str r2, [r4, r0] + ldr r0, [r4, r1] + ldrb r0, [r0, #0x16] + bl sub_020959F4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_022562D8: .word 0x000006E4 +_022562DC: .word ov22_02256940 +_022562E0: .word 0x000006D4 +_022562E4: .word 0x000006BC +_022562E8: .word 0x000006B4 + thumb_func_end ov22_02256174 + + thumb_func_start ov22_022562EC +ov22_022562EC: ; 0x022562EC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + bl sub_0200682C + ldr r1, [r4, #0] + add r5, r0, #0 + mov r6, #0 + cmp r1, #0x14 + bhi _0225634E + add r2, r1, r1 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0225630C: ; jump table + .short _02256336 - _0225630C - 2 ; case 0 + .short _02256346 - _0225630C - 2 ; case 1 + .short _02256358 - _0225630C - 2 ; case 2 + .short _0225638E - _0225630C - 2 ; case 3 + .short _022563AC - _0225630C - 2 ; case 4 + .short _022563C2 - _0225630C - 2 ; case 5 + .short _022563E0 - _0225630C - 2 ; case 6 + .short _02256402 - _0225630C - 2 ; case 7 + .short _02256420 - _0225630C - 2 ; case 8 + .short _0225643A - _0225630C - 2 ; case 9 + .short _0225645E - _0225630C - 2 ; case 10 + .short _02256470 - _0225630C - 2 ; case 11 + .short _0225648E - _0225630C - 2 ; case 12 + .short _022564AA - _0225630C - 2 ; case 13 + .short _02256518 - _0225630C - 2 ; case 14 + .short _0225654A - _0225630C - 2 ; case 15 + .short _022565C8 - _0225630C - 2 ; case 16 + .short _022565C8 - _0225630C - 2 ; case 17 + .short _022565C8 - _0225630C - 2 ; case 18 + .short _02256568 - _0225630C - 2 ; case 19 + .short _02256598 - _0225630C - 2 ; case 20 +_02256336: + mov r0, #0x2a + mov r1, #0x1e + bl sub_0200564C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256346: + bl sub_02005684 + cmp r0, #0 + beq _02256350 +_0225634E: + b _022565C8 +_02256350: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256358: + bl ov22_02257104 + ldr r2, _022565D4 ; =0x000006BC + add r0, r5, #0 + ldr r2, [r5, r2] + add r1, r6, #0 + bl ov22_02257524 + ldr r0, _022565D8 ; =0x000006C4 + ldr r0, [r5, r0] + cmp r0, #3 + beq _0225637A + add r0, r5, #0 + mov r1, #0x1a + bl ov22_0225751C + b _02256382 +_0225637A: + add r0, r5, #0 + mov r1, #0x1c + bl ov22_0225751C +_02256382: + ldr r1, _022565DC ; =0x000006D8 + str r0, [r5, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_0225638E: + ldr r0, _022565DC ; =0x000006D8 + ldr r0, [r5, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02256496 + add r0, r5, #0 + bl ov22_02257540 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_022563AC: + ldr r1, _022565E0 ; =0x000006CC + ldr r1, [r5, r1] + add r1, #0x1d + bl ov22_0225751C + ldr r1, _022565DC ; =0x000006D8 + str r0, [r5, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_022563C2: + ldr r0, _022565DC ; =0x000006D8 + ldr r0, [r5, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02256496 + add r0, r5, #0 + bl ov22_02257540 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_022563E0: + ldr r1, _022565D8 ; =0x000006C4 + ldr r1, [r5, r1] + cmp r1, #3 + beq _022563F0 + mov r1, #0x2a + bl ov22_0225751C + b _022563F6 +_022563F0: + mov r1, #0x29 + bl ov22_0225751C +_022563F6: + ldr r1, _022565DC ; =0x000006D8 + str r0, [r5, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256402: + ldr r0, _022565DC ; =0x000006D8 + ldr r0, [r5, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02256496 + add r0, r5, #0 + bl ov22_02257540 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256420: + mov r0, #0x6d + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldrb r0, [r0, #0x16] + cmp r0, #0 + beq _02256432 + mov r0, #2 + bl sub_020364F0 +_02256432: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_0225643A: + mov r0, #0x6d + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldrb r0, [r0, #0x16] + cmp r0, #0 + beq _02256458 + mov r0, #2 + bl sub_02036540 + cmp r0, #0 + beq _02256496 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256458: + add r0, r1, #1 + str r0, [r4, #0] + b _022565C8 +_0225645E: + bl ov22_0225718C + ldr r0, _022565E4 ; =0x00000643 + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256470: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0xd + str r1, [sp, #8] + mov r1, #0x11 + mov r2, #0x13 + add r3, r6, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_0225648E: + bl sub_0200F2AC + cmp r0, #0 + bne _02256498 +_02256496: + b _022565C8 +_02256498: + ldr r1, _022565E8 ; =0x00000491 + mov r0, #7 + add r2, r6, #0 + bl sub_02004550 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_022564AA: + ldr r0, _022565EC ; =0x000006A8 + ldr r1, [r5, r0] + cmp r1, #3 + bne _022564DE + add r0, #0x28 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02095CA8 + mov r0, #0x6d + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldrb r0, [r0, #0x16] + cmp r0, #0 + beq _022564D8 + mov r0, #0x56 + lsl r0, r0, #4 + ldr r2, _022565F0 ; =0x00000181 + add r0, r5, r0 + mov r1, #0x1a + mov r3, #0x2e + bl ov22_0225A628 +_022564D8: + mov r0, #0xe + str r0, [r4, #0] + b _022565C8 +_022564DE: + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov22_0225A6C4 + cmp r0, #0 + bne _022564F8 + mov r0, #0xf + str r0, [r4, #0] + mov r0, #0x1a + lsl r0, r0, #6 + bl sub_02005748 +_022564F8: + ldr r0, _022565F4 ; =0x00000498 + add r0, r5, r0 + bl ov22_0225890C + add r0, r5, #0 + bl ov22_02257564 + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov22_0225A610 + add r0, r5, #0 + bl ov22_02256AC4 + b _022565C8 +_02256518: + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov22_0225A6C4 + cmp r0, #0 + bne _02256532 + mov r0, #0xf + str r0, [r4, #0] + mov r0, #0x1a + lsl r0, r0, #6 + bl sub_02005748 +_02256532: + add r0, r5, #0 + bl ov22_02257564 + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov22_0225A610 + add r0, r5, #0 + bl ov22_022577A0 + b _022565C8 +_0225654A: + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov22_0225A610 + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov22_0225A6D4 + cmp r0, #0 + beq _022565C8 + mov r0, #0x13 + str r0, [r4, #0] + b _022565C8 +_02256568: + mov r0, #0x1a + lsl r0, r0, #6 + bl sub_020057D4 + cmp r0, #1 + beq _022565C8 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #0xd + str r1, [sp, #8] + mov r1, #0x1a + add r2, r1, #0 + add r3, r6, #0 + bl sub_0200F174 + ldr r0, _022565F8 ; =0x00000684 + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022565C8 +_02256598: + bl sub_0200F2AC + cmp r0, #0 + beq _022565C8 + add r0, r6, #0 + str r0, [r4, #0] + mov r2, #1 + ldr r0, _022565EC ; =0x000006A8 + mov r1, #0xa + str r1, [r5, r0] + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _022565FC ; =0xFFFF1FFF + mov r6, #1 + and r0, r1 + str r0, [r2, #0] + mov r0, #0xfd + lsl r0, r0, #2 + add r1, r6, #0 + add r0, r5, r0 + sub r1, #0x41 + mov r2, #0x28 + bl ov22_02257AB0 +_022565C8: + add r0, r5, #0 + bl ov22_022566EC + add r0, r6, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022565D4: .word 0x000006BC +_022565D8: .word 0x000006C4 +_022565DC: .word 0x000006D8 +_022565E0: .word 0x000006CC +_022565E4: .word 0x00000643 +_022565E8: .word 0x00000491 +_022565EC: .word 0x000006A8 +_022565F0: .word 0x00000181 +_022565F4: .word 0x00000498 +_022565F8: .word 0x00000684 +_022565FC: .word 0xFFFF1FFF + thumb_func_end ov22_022562EC + + thumb_func_start ov22_02256600 +ov22_02256600: ; 0x02256600 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + mov r2, #0x1b + add r3, r0, #0 + mov r1, #0xfd + lsl r2, r2, #6 + ldr r0, [r3, #4] + lsl r1, r1, #2 + ldr r2, [r4, r2] + ldr r3, [r3, #0x24] + add r1, r4, r1 + bl ov22_02256FD8 + mov r0, #0x6b + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02015938 + ldr r0, _022566B8 ; =0x000006B4 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0201A928 + add r0, r4, #0 + bl ov22_02256C38 + ldr r0, _022566BC ; =0x00000498 + add r0, r4, r0 + bl ov22_02258A34 + add r0, r4, #0 + bl ov22_02256AB4 + add r0, r4, #0 + bl ov22_0225698C + add r0, r4, #0 + bl ov22_022567D8 + add r0, r4, #0 + bl ov22_022568B8 + mov r0, #0xd9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_02254E0C + mov r0, #0xd9 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #8 + add r0, r4, r0 + bl ov22_022594AC + add r0, r4, #0 + bl ov22_022566F4 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201E530 + cmp r0, #1 + beq _02256698 + bl sub_02022974 +_02256698: + add r0, r5, #0 + bl sub_02006830 + mov r0, #0xd + bl sub_0201807C + mov r0, #0xe + bl sub_0201807C + bl sub_02095A24 + bl sub_02039794 + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_022566B8: .word 0x000006B4 +_022566BC: .word 0x00000498 + thumb_func_end ov22_02256600 + + thumb_func_start ov22_022566C0 +ov22_022566C0: ; 0x022566C0 + push {r4, lr} + sub sp, #0x18 + add r4, r0, #0 + bl ov22_02255094 + add r0, r4, #0 + bl ov22_022550D4 + add r0, r4, #0 + add r1, sp, #0 + bl ov22_02255314 + add r0, r4, #0 + add r1, sp, #0 + bl ov22_022551B4 + add r0, sp, #0 + bl ov22_02255338 + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022566C0 + + thumb_func_start ov22_022566EC +ov22_022566EC: ; 0x022566EC + ldr r3, _022566F0 ; =ov22_02255180 + bx r3 + ; .align 2, 0 +_022566F0: .word ov22_02255180 + thumb_func_end ov22_022566EC + + thumb_func_start ov22_022566F4 +ov22_022566F4: ; 0x022566F4 + push {r4, lr} + add r4, r0, #0 + bl ov22_022551D0 + add r0, r4, #0 + bl ov22_02255134 + bl ov22_022550B4 + pop {r4, pc} + thumb_func_end ov22_022566F4 + + thumb_func_start ov22_02256708 +ov22_02256708: ; 0x02256708 + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #4] + mov r1, #0xd9 + str r0, [sp, #0x14] + ldr r0, [r5, #0x10] + lsl r1, r1, #2 + str r0, [sp, #0x18] + ldr r0, [r5, #0x30] + add r6, r3, #0 + str r0, [sp, #0x1c] + ldr r0, [r5, #0x20] + str r0, [sp, #0x20] + ldr r0, [r5, #0x40] + str r2, [sp, #0x30] + str r0, [sp, #0x24] + ldr r0, [r5, r1] + str r0, [sp, #0x28] + add r0, r1, #0 + sub r0, #8 + add r0, r5, r0 + add r1, #0x90 + str r0, [sp, #0x2c] + add r0, r5, r1 + add r1, sp, #0x10 + bl ov22_022578F4 + cmp r6, #0 + add r2, sp, #0 + bne _0225675C + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0xe + bl ov22_02257998 + b _0225676A +_0225675C: + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + mov r3, #0xe + bl ov22_022579B4 +_0225676A: + add r0, r5, #0 + add r1, sp, #0 + bl ov22_02259098 + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r5, r0 + bl ov22_02257B10 + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + mov r2, #0xe + bl ov22_02257C88 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_02256708 + + thumb_func_start ov22_02256790 +ov22_02256790: ; 0x02256790 + push {r3, r4, lr} + sub sp, #0xc + mov r3, #1 + add r4, r0, #0 + bl ov22_02256708 + ldr r0, _022567D4 ; =0x0000046C + add r1, sp, #8 + add r0, r4, r0 + add r2, sp, #4 + bl ov22_02259270 + ldr r0, _022567D4 ; =0x0000046C + add r1, sp, #0 + add r0, r4, r0 + bl ov22_02259358 + ldr r3, [sp, #4] + ldr r0, _022567D4 ; =0x0000046C + lsr r2, r3, #0x1f + add r2, r3, r2 + asr r3, r2, #1 + add r2, sp, #0 + ldrb r2, [r2, #3] + add r0, r4, r0 + mov r1, #0xc0 + sub r3, r3, r2 + mov r2, #0x8d + sub r2, r2, r3 + bl ov22_022591EC + add sp, #0xc + pop {r3, r4, pc} + nop +_022567D4: .word 0x0000046C + thumb_func_end ov22_02256790 + + thumb_func_start ov22_022567D8 +ov22_022567D8: ; 0x022567D8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02257CD4 + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02257A98 + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02257948 + pop {r4, pc} + thumb_func_end ov22_022567D8 + + thumb_func_start ov22_022567FC +ov22_022567FC: ; 0x022567FC + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + ldr r0, [r5, #0] + str r0, [sp] + ldr r0, [r5, #4] + str r0, [sp, #4] + ldr r0, [r5, #0x10] + str r0, [sp, #8] + ldr r0, [r5, #0x30] + str r0, [sp, #0xc] + ldr r0, [r5, #0x40] + str r0, [sp, #0x10] + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + str r0, [sp, #0x28] + mov r0, #0xd9 + lsl r0, r0, #2 + ldr r1, [r5, r0] + str r1, [sp, #0x14] + add r1, r0, #0 + sub r1, #8 + add r1, r5, r1 + str r1, [sp, #0x18] + mov r1, #0xe + str r1, [sp, #0x1c] + mov r1, #2 + str r1, [sp, #0x20] + mov r1, #1 + add r0, r0, #4 + str r1, [sp, #0x24] + add r0, r5, r0 + add r1, sp, #0 + bl ov22_02257F50 + mov r0, #0xda + lsl r0, r0, #2 + mov r1, #0 + add r0, r5, r0 + add r2, r1, #0 + bl ov22_022582C0 + mov r6, #0 +_02256854: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r6, #0 + bl ov22_0225899C + add r7, r0, #0 + mov r4, #0 + cmp r7, #0 + ble _0225687C +_02256868: + mov r0, #0xda + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + add r2, r6, #0 + bl ov22_022580A4 + add r4, r4, #1 + cmp r4, r7 + blt _02256868 +_0225687C: + add r6, r6, #1 + cmp r6, #0x64 + blt _02256854 + mov r7, #0xda + mov r6, #0x61 + mov r4, #0 + lsl r7, r7, #2 + lsl r6, r6, #2 +_0225688C: + add r0, r5, r6 + add r1, r4, #0 + bl ov22_022589B0 + add r2, r0, #0 + cmp r2, #0x12 + bge _022568A2 + add r0, r5, r7 + mov r1, #1 + bl ov22_022580A4 +_022568A2: + add r4, r4, #1 + cmp r4, #0x12 + blt _0225688C + mov r0, #0xda + lsl r0, r0, #2 + add r0, r5, r0 + bl ov22_022581EC + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022567FC + + thumb_func_start ov22_022568B8 +ov22_022568B8: ; 0x022568B8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02258408 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_022581C0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02257F88 + pop {r4, pc} + thumb_func_end ov22_022568B8 + + thumb_func_start ov22_022568DC +ov22_022568DC: ; 0x022568DC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, _0225693C ; =0x04000008 + mov r2, #3 + ldrh r3, [r0] + mov r1, #1 + bic r3, r2 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0, #2] + bic r1, r2 + strh r1, [r0, #2] + ldrh r3, [r0, #4] + mov r1, #2 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #4] + ldrh r3, [r0, #6] + mov r1, #3 + bic r3, r2 + add r2, r3, #0 + orr r2, r1 + strh r2, [r0, #6] + add r3, r1, #0 + ldr r0, [r4, #0x40] + add r2, r1, #0 + sub r3, #0x13 + bl sub_02019184 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov22_02258354 + mov r1, #0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r2, #2 + add r3, r1, #0 + str r1, [sp] + bl ov22_022583A0 + add sp, #4 + pop {r3, r4, pc} + nop +_0225693C: .word 0x04000008 + thumb_func_end ov22_022568DC + + thumb_func_start ov22_02256940 +ov22_02256940: ; 0x02256940 + ldr r3, _02256944 ; =ov22_022553F8 + bx r3 + ; .align 2, 0 +_02256944: .word ov22_022553F8 + thumb_func_end ov22_02256940 + + thumb_func_start ov22_02256948 +ov22_02256948: ; 0x02256948 + push {r3, lr} + sub sp, #0x30 + ldr r2, [r0, #0x40] + str r2, [sp] + mov r2, #0x19 + str r2, [sp, #4] + lsl r2, r1, #1 + add r1, r2, #0 + add r1, #0x79 + str r1, [sp, #8] + mov r1, #0x85 + str r1, [sp, #0xc] + mov r1, #1 + add r2, #0x7a + str r2, [sp, #0x10] + mov r2, #0 + str r1, [sp, #0x1c] + str r1, [sp, #0x20] + mov r1, #2 + str r1, [sp, #0x24] + mov r1, #0xe + str r1, [sp, #0x2c] + ldr r1, _02256988 ; =0x000004B4 + str r2, [sp, #0x14] + add r0, r0, r1 + add r1, sp, #0 + str r2, [sp, #0x18] + str r2, [sp, #0x28] + bl ov22_022597BC + add sp, #0x30 + pop {r3, pc} + ; .align 2, 0 +_02256988: .word 0x000004B4 + thumb_func_end ov22_02256948 + + thumb_func_start ov22_0225698C +ov22_0225698C: ; 0x0225698C + ldr r1, _02256994 ; =0x000004B4 + ldr r3, _02256998 ; =ov22_02259804 + add r0, r0, r1 + bx r3 + ; .align 2, 0 +_02256994: .word 0x000004B4 +_02256998: .word ov22_02259804 + thumb_func_end ov22_0225698C + + thumb_func_start ov22_0225699C +ov22_0225699C: ; 0x0225699C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x4e + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r4, #0 + bl ov22_02259DBC + mov r0, #0x4e + lsl r0, r0, #4 + mov r1, #0 + ldr r2, _02256A14 ; =ov22_02256B04 + add r0, r4, r0 + add r3, r4, #0 + str r1, [sp] + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256A18 ; =ov22_02256B24 + add r0, r4, r0 + mov r1, #1 + add r3, r4, #0 + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256A1C ; =ov22_02256B44 + add r0, r4, r0 + mov r1, #2 + add r3, r4, #0 + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256A20 ; =ov22_02256B78 + add r0, r4, r0 + mov r1, #3 + add r3, r4, #0 + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256A24 ; =ov22_02256AE4 + add r0, r4, r0 + mov r1, #4 + add r3, r4, #0 + bl ov22_02259FF4 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02256A14: .word ov22_02256B04 +_02256A18: .word ov22_02256B24 +_02256A1C: .word ov22_02256B44 +_02256A20: .word ov22_02256B78 +_02256A24: .word ov22_02256AE4 + thumb_func_end ov22_0225699C + + thumb_func_start ov22_02256A28 +ov22_02256A28: ; 0x02256A28 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x4e + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r4, #0 + bl ov22_02259DBC + mov r0, #0x4e + lsl r0, r0, #4 + mov r1, #0 + ldr r2, _02256AA0 ; =ov22_02256B04 + add r0, r4, r0 + add r3, r4, #0 + str r1, [sp] + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256AA4 ; =ov22_02256B24 + add r0, r4, r0 + mov r1, #1 + add r3, r4, #0 + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256AA8 ; =ov22_02256B44 + add r0, r4, r0 + mov r1, #2 + add r3, r4, #0 + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256AAC ; =ov22_02256B78 + add r0, r4, r0 + mov r1, #3 + add r3, r4, #0 + bl ov22_02259FF4 + mov r0, #0 + str r0, [sp] + mov r0, #0x4e + lsl r0, r0, #4 + ldr r2, _02256AB0 ; =ov22_02256AE4 + add r0, r4, r0 + mov r1, #4 + add r3, r4, #0 + bl ov22_02259FF4 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02256AA0: .word ov22_02256B04 +_02256AA4: .word ov22_02256B24 +_02256AA8: .word ov22_02256B44 +_02256AAC: .word ov22_02256B78 +_02256AB0: .word ov22_02256AE4 + thumb_func_end ov22_02256A28 + + thumb_func_start ov22_02256AB4 +ov22_02256AB4: ; 0x02256AB4 + add r1, r0, #0 + mov r0, #0x4e + lsl r0, r0, #4 + ldr r3, _02256AC0 ; =ov22_02259F24 + add r0, r1, r0 + bx r3 + ; .align 2, 0 +_02256AC0: .word ov22_02259F24 + thumb_func_end ov22_02256AB4 + + thumb_func_start ov22_02256AC4 +ov22_02256AC4: ; 0x02256AC4 + mov r1, #0x4e + lsl r1, r1, #4 + ldr r3, _02256AD0 ; =ov22_02259F88 + add r0, r0, r1 + bx r3 + nop +_02256AD0: .word ov22_02259F88 + thumb_func_end ov22_02256AC4 + + thumb_func_start ov22_02256AD4 +ov22_02256AD4: ; 0x02256AD4 + mov r1, #0x4e + lsl r1, r1, #4 + ldr r3, _02256AE0 ; =ov22_02259FA0 + add r0, r0, r1 + bx r3 + nop +_02256AE0: .word ov22_02259FA0 + thumb_func_end ov22_02256AD4 + + thumb_func_start ov22_02256AE4 +ov22_02256AE4: ; 0x02256AE4 + push {r4, lr} + mov r0, #0xda + add r4, r1, #0 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02258460 + cmp r0, #0 + beq _02256AFC + ldr r0, _02256B00 ; =0x000006A8 + mov r1, #3 + str r1, [r4, r0] +_02256AFC: + pop {r4, pc} + nop +_02256B00: .word 0x000006A8 + thumb_func_end ov22_02256AE4 + + thumb_func_start ov22_02256B04 +ov22_02256B04: ; 0x02256B04 + push {r4, lr} + mov r0, #0xda + add r4, r1, #0 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02258414 + add r1, r0, #0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r2, #0 + bl ov22_02258258 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02256B04 + + thumb_func_start ov22_02256B24 +ov22_02256B24: ; 0x02256B24 + push {r4, lr} + mov r0, #0xda + add r4, r1, #0 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02258414 + add r1, r0, #0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r2, #1 + bl ov22_02258258 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02256B24 + + thumb_func_start ov22_02256B44 +ov22_02256B44: ; 0x02256B44 + push {r4, lr} + ldr r0, _02256B74 ; =0x000006A8 + add r4, r1, #0 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02256B70 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov22_02258424 + add r2, r0, #0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov22_022582C0 + ldr r0, _02256B74 ; =0x000006A8 + mov r1, #0 + str r1, [r4, r0] +_02256B70: + pop {r4, pc} + nop +_02256B74: .word 0x000006A8 + thumb_func_end ov22_02256B44 + + thumb_func_start ov22_02256B78 +ov22_02256B78: ; 0x02256B78 + push {r4, lr} + ldr r0, _02256BA8 ; =0x000006A8 + add r4, r1, #0 + ldr r0, [r4, r0] + cmp r0, #1 + beq _02256BA4 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov22_02258424 + add r2, r0, #0 + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov22_022582C0 + ldr r0, _02256BA8 ; =0x000006A8 + mov r1, #1 + str r1, [r4, r0] +_02256BA4: + pop {r4, pc} + nop +_02256BA8: .word 0x000006A8 + thumb_func_end ov22_02256B78 + + thumb_func_start ov22_02256BAC +ov22_02256BAC: ; 0x02256BAC + push {r3, r4, r5, lr} + sub sp, #0x28 + add r4, r0, #0 + add r2, sp, #0 + mov r0, #0 + add r3, r1, #0 + add r5, r2, #0 + add r1, r0, #0 + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r4, #0x40] + add r1, r2, #0 + str r0, [sp] + ldr r0, [r4, #0x44] + mov r2, #0xf + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x48 + str r0, [sp, #8] + mov r0, #0xa + str r0, [sp, #0x10] + mov r0, #6 + str r3, [sp, #0xc] + lsl r0, r0, #6 + ldr r0, [r4, r0] + str r0, [sp, #0x24] + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov22_0225A428 + add sp, #0x28 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02256BAC + + thumb_func_start ov22_02256BF4 +ov22_02256BF4: ; 0x02256BF4 + push {r4, lr} + sub sp, #0x28 + ldr r4, [r0, #0x40] + str r4, [sp] + ldr r4, [r0, #0x44] + str r4, [sp, #4] + add r4, r0, #0 + str r1, [sp, #0x10] + add r1, r2, #7 + add r4, #0x48 + str r1, [sp, #0x18] + mov r1, #0x3c + str r4, [sp, #8] + ldr r4, _02256C34 ; =0x00000181 + str r1, [sp, #0x1c] + ldr r1, [sp, #0x30] + str r4, [sp, #0x14] + str r1, [sp, #0xc] + str r3, [sp, #0x20] + sub r1, r4, #1 + ldr r1, [r0, r1] + mov r2, #0x3f + str r1, [sp, #0x24] + mov r1, #0x56 + lsl r1, r1, #4 + add r0, r0, r1 + add r1, sp, #0 + bl ov22_0225A428 + add sp, #0x28 + pop {r4, pc} + nop +_02256C34: .word 0x00000181 + thumb_func_end ov22_02256BF4 + + thumb_func_start ov22_02256C38 +ov22_02256C38: ; 0x02256C38 + mov r1, #0x56 + lsl r1, r1, #4 + ldr r3, _02256C44 ; =ov22_0225A560 + add r0, r0, r1 + bx r3 + nop +_02256C44: .word ov22_0225A560 + thumb_func_end ov22_02256C38 + + thumb_func_start ov22_02256C48 +ov22_02256C48: ; 0x02256C48 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, _02256C6C ; =ov22_02256C70 + mov r1, #0x10 + mov r2, #0xa + mov r3, #0xd + bl sub_0200679C + bl sub_0201CED0 + str r5, [r0, #0] + str r4, [r0, #4] + mov r1, #0 + str r1, [r0, #8] + str r1, [r0, #0xc] + pop {r3, r4, r5, pc} + nop +_02256C6C: .word ov22_02256C70 + thumb_func_end ov22_02256C48 + + thumb_func_start ov22_02256C70 +ov22_02256C70: ; 0x02256C70 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0xc] + cmp r1, #9 + bls _02256C7E + b _02256DB2 +_02256C7E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02256C8A: ; jump table + .short _02256C9E - _02256C8A - 2 ; case 0 + .short _02256CC0 - _02256C8A - 2 ; case 1 + .short _02256CDA - _02256C8A - 2 ; case 2 + .short _02256CF6 - _02256C8A - 2 ; case 3 + .short _02256D0A - _02256C8A - 2 ; case 4 + .short _02256D32 - _02256C8A - 2 ; case 5 + .short _02256D52 - _02256C8A - 2 ; case 6 + .short _02256D78 - _02256C8A - 2 ; case 7 + .short _02256D94 - _02256C8A - 2 ; case 8 + .short _02256DA8 - _02256C8A - 2 ; case 9 +_02256C9E: + mov r0, #0xda + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #3 + mov r2, #0 + bl ov22_02258218 + cmp r0, #0 + bne _02256CB6 + bl sub_02022974 +_02256CB6: + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256CC0: + mov r0, #0xda + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov22_02258460 + cmp r0, #0 + beq _02256DB2 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256CDA: + mov r0, #1 + str r0, [sp] + mov r0, #8 + add r1, r0, #0 + sub r1, #0x18 + mov r2, #0 + mov r3, #0xa + bl sub_0200AAE0 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256CF6: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _02256DB2 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256D0A: + mov r0, #0x4e + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + mov r2, #8 + bl ov22_02259FC4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #8 + blt _02256DB2 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256D32: + mov r1, #7 + add r0, r4, #0 + mvn r1, r1 + mov r2, #5 + mov r3, #8 + bl ov22_02257098 + cmp r0, #0 + beq _02256DB2 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256D52: + ldr r0, [r4, #0] + mov r1, #1 + bl ov22_02256948 + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x40] + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + ldr r0, [r4, #0] + bl ov22_022571D4 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256D78: + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + str r0, [sp] + mov r0, #8 + sub r2, #0x10 + mov r3, #0xa + bl sub_0200AAE0 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256D94: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _02256DB2 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256DA8: + ldr r1, [r4, #4] + mov r2, #1 + str r2, [r1, #0] + bl sub_020067D0 +_02256DB2: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02256C70 + + thumb_func_start ov22_02256DB8 +ov22_02256DB8: ; 0x02256DB8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, _02256DDC ; =ov22_02256DE0 + mov r1, #0x10 + mov r2, #0xa + mov r3, #0xd + bl sub_0200679C + bl sub_0201CED0 + str r5, [r0, #0] + str r4, [r0, #4] + mov r1, #0 + str r1, [r0, #8] + str r1, [r0, #0xc] + pop {r3, r4, r5, pc} + nop +_02256DDC: .word ov22_02256DE0 + thumb_func_end ov22_02256DB8 + + thumb_func_start ov22_02256DE0 +ov22_02256DE0: ; 0x02256DE0 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0xc] + cmp r1, #9 + bls _02256DEE + b _02256F32 +_02256DEE: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02256DFA: ; jump table + .short _02256E0E - _02256DFA - 2 ; case 0 + .short _02256E2A - _02256DFA - 2 ; case 1 + .short _02256E3E - _02256DFA - 2 ; case 2 + .short _02256E72 - _02256DFA - 2 ; case 3 + .short _02256E92 - _02256DFA - 2 ; case 4 + .short _02256EBC - _02256DFA - 2 ; case 5 + .short _02256ED8 - _02256DFA - 2 ; case 6 + .short _02256EEC - _02256DFA - 2 ; case 7 + .short _02256F0E - _02256DFA - 2 ; case 8 + .short _02256F28 - _02256DFA - 2 ; case 9 +_02256E0E: + mov r0, #1 + str r0, [sp] + mov r0, #8 + add r1, r0, #0 + sub r1, #0x18 + mov r2, #0 + mov r3, #0xa + bl sub_0200AAE0 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256E2A: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _02256F32 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256E3E: + ldr r0, [r4, #0] + bl ov22_02257258 + ldr r0, [r4, #0] + bl ov22_022568DC + ldr r0, [r4, #0] + bl ov22_02256AD4 + ldr r0, [r4, #0] + mov r1, #0 + bl ov22_02256948 + ldr r0, [r4, #0] + mov r2, #3 + add r3, r2, #0 + ldr r0, [r0, #0x40] + mov r1, #1 + sub r3, #0x2b + bl sub_0201C63C + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256E72: + mov r1, #8 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0xd + add r3, r1, #0 + bl ov22_02257098 + cmp r0, #0 + beq _02256F32 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256E92: + mov r0, #0x4e + ldr r1, [r4, #0] + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + add r2, r1, #0 + sub r2, #8 + bl ov22_02259FC4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #8 + blt _02256F32 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256EBC: + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + str r0, [sp] + mov r0, #8 + sub r2, #0x10 + mov r3, #0xa + bl sub_0200AAE0 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256ED8: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #0 + beq _02256F32 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256EEC: + mov r0, #0xda + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0 + add r2, r1, #0 + bl ov22_02258218 + cmp r0, #0 + bne _02256F04 + bl sub_02022974 +_02256F04: + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256F0E: + mov r0, #0xda + ldr r1, [r4, #0] + lsl r0, r0, #2 + add r0, r1, r0 + bl ov22_02258460 + cmp r0, #0 + beq _02256F32 + ldr r0, [r4, #0xc] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r3, r4, pc} +_02256F28: + ldr r1, [r4, #4] + mov r2, #1 + str r2, [r1, #0] + bl sub_020067D0 +_02256F32: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02256DE0 + + thumb_func_start ov22_02256F38 +ov22_02256F38: ; 0x02256F38 + push {r3, r4, r5, r6, r7, lr} + str r1, [sp] + add r6, r0, #0 + add r4, r2, #0 + bl sub_02029F84 + ldr r1, [sp] + ldr r2, [sp] + add r1, #0x84 + ldr r1, [r1, #0] + add r0, r6, #0 + add r2, #0x78 + bl sub_02029FAC + cmp r4, #0 + beq _02256F78 + add r0, r4, #0 + mov r1, #0xd + bl sub_02025F04 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02025F30 + add r2, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + bl sub_0202A0EC + add r0, r5, #0 + bl sub_020237BC +_02256F78: + ldr r0, [sp] + mov r5, #0 + add r7, r0, #0 + ldr r4, [r0, #0x1c] + add r7, #0x14 + cmp r4, r7 + beq _02256F9E +_02256F86: + ldr r0, [r4, #4] + cmp r0, #0 + bne _02256F98 + ldr r1, [r4, #0] + add r0, r6, #0 + add r2, r5, #0 + bl sub_02029FD0 + add r5, r5, #1 +_02256F98: + ldr r4, [r4, #8] + cmp r4, r7 + bne _02256F86 +_02256F9E: + ldr r0, [sp] + ldr r4, [r0, #0xc] + add r7, r0, #4 + cmp r4, r7 + beq _02256FC0 +_02256FA8: + ldr r0, [r4, #4] + cmp r0, #0 + bne _02256FBA + ldr r1, [r4, #0] + add r0, r6, #0 + add r2, r5, #0 + bl sub_02029FD0 + add r5, r5, #1 +_02256FBA: + ldr r4, [r4, #8] + cmp r4, r7 + bne _02256FA8 +_02256FC0: + ldr r1, [sp] + add r0, r6, #0 + ldr r1, [r1, #0x74] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0202A084 + add r0, r6, #0 + bl sub_02029F5C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02256F38 + + thumb_func_start ov22_02256FD8 +ov22_02256FD8: ; 0x02256FD8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + str r1, [sp] + mov r0, #0xd + mov r1, #0xac + str r2, [sp, #4] + add r4, r3, #0 + bl sub_02018144 + add r6, r0, #0 + bl ov22_0225764C + ldr r1, [sp] + ldr r2, [sp] + add r1, #0x84 + ldr r1, [r1, #0] + add r0, r7, #0 + add r2, #0x78 + bl sub_0202A284 + cmp r4, #0 + beq _02257026 + add r0, r4, #0 + mov r1, #0xd + bl sub_02025F04 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02025F30 + add r2, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + bl sub_0202A4B4 + add r0, r5, #0 + bl sub_020237BC +_02257026: + ldr r1, [sp] + add r0, r6, #0 + add r1, #0x14 + mov r2, #1 + bl ov22_02257778 + ldr r1, [sp] + add r0, r6, #0 + add r1, r1, #4 + mov r2, #0 + bl ov22_02257778 + add r0, r6, #0 + bl ov22_0225768C + mov r4, #0 + add r5, r4, #0 +_02257048: + add r0, r6, #0 + add r1, r5, #0 + bl ov22_022576FC + cmp r0, #1 + bne _0225706A + add r0, r6, #0 + add r1, r5, #0 + bl ov22_022576E8 + add r1, r0, #0 + ldr r1, [r1, #0] + add r0, r7, #0 + add r2, r4, #0 + bl sub_0202A2A8 + add r4, r4, #1 +_0225706A: + add r5, r5, #1 + cmp r5, #0x15 + blt _02257048 + ldr r1, [sp] + add r0, r7, #0 + ldr r1, [r1, #0x74] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0202A35C + ldr r1, [sp, #4] + add r0, r7, #0 + bl sub_0202A378 + add r0, r7, #0 + bl sub_0202A240 + add r0, r6, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02256FD8 + + thumb_func_start ov22_02257098 +ov22_02257098: ; 0x02257098 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #8 + bge _022570B4 + mov r0, #0xfd + ldr r3, [r5, #0] + lsl r0, r0, #2 + add r0, r3, r0 + bl ov22_02257AB0 +_022570B4: + ldr r0, [r5, #8] + cmp r0, #1 + blt _022570F2 + ldr r0, [r5, #0] + mov r1, #2 + ldr r0, [r0, #0x40] + add r2, r1, #0 + add r3, r4, #0 + bl sub_0201C63C + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0x40] + mov r2, #2 + add r3, r4, #0 + bl sub_0201C63C + ldr r0, [r5, #0] + mov r1, #2 + ldr r0, [r0, #0x40] + mov r2, #5 + add r3, r6, #0 + bl sub_0201C63C + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0x40] + mov r2, #5 + add r3, r6, #0 + bl sub_0201C63C +_022570F2: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + cmp r0, r7 + ble _02257100 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02257100: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02257098 + + thumb_func_start ov22_02257104 +ov22_02257104: ; 0x02257104 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + mov r1, #3 + bl sub_02019EBC + mov r2, #0 + ldr r0, [r4, #0x40] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + ldr r0, [r4, #0x40] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #0 + bl ov22_022574F4 + ldr r1, _02257188 ; =0x04000008 + mov r3, #3 + ldrh r2, [r1] + mov r0, #2 + bic r2, r3 + orr r0, r2 + strh r0, [r1] + ldrh r2, [r1, #2] + mov r0, #1 + bic r2, r3 + orr r2, r0 + strh r2, [r1, #2] + ldrh r4, [r1, #4] + mov r2, #3 + bic r4, r3 + orr r2, r4 + strh r2, [r1, #4] + ldrh r2, [r1, #6] + bic r2, r3 + strh r2, [r1, #6] + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0 + bl sub_0200F338 + pop {r4, pc} + nop +_02257188: .word 0x04000008 + thumb_func_end ov22_02257104 + + thumb_func_start ov22_0225718C +ov22_0225718C: ; 0x0225718C + push {r4, lr} + add r4, r0, #0 + bl ov22_02257548 + ldr r0, [r4, #0x40] + mov r1, #3 + bl sub_02019EBC + add r0, r4, #0 + bl ov22_022568DC + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + ldr r0, [r4, #0x44] + mov r1, #1 + bl sub_020219A4 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + pop {r4, pc} + thumb_func_end ov22_0225718C + + thumb_func_start ov22_022571D4 +ov22_022571D4: ; 0x022571D4 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0x40] + mov r1, #3 + bl sub_02019EBC + mov r2, #0 + ldr r0, [r4, #0x40] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + ldr r0, [r4, #0x40] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #0x40] + mov r1, #0x19 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + add r0, sp, #0 + strb r1, [r0, #0x10] + mov r1, #4 + strb r1, [r0, #0x11] + mov r0, #0x6b + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0 + bl sub_02015958 + add r0, r4, #0 + mov r1, #1 + bl ov22_022574CC + ldr r0, _02257254 ; =0x04000008 + mov r2, #3 + ldrh r3, [r0] + mov r1, #2 + bic r3, r2 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0, #2] + mov r1, #1 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #2] + ldrh r3, [r0, #4] + mov r1, #3 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #4] + ldrh r1, [r0, #6] + bic r1, r2 + strh r1, [r0, #6] + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_02257254: .word 0x04000008 + thumb_func_end ov22_022571D4 + + thumb_func_start ov22_02257258 +ov22_02257258: ; 0x02257258 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6b + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02015A54 + add r0, r4, #0 + bl ov22_022574EC + ldr r0, [r4, #0x40] + mov r1, #3 + bl sub_02019EBC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02257258 + + thumb_func_start ov22_02257278 +ov22_02257278: ; 0x02257278 + push {r3, lr} + mov r1, #0x6b + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl sub_020159FC + cmp r0, #0 + beq _02257292 + cmp r0, #1 + beq _02257296 + cmp r0, #2 + beq _0225729A + pop {r3, pc} +_02257292: + mov r0, #4 + pop {r3, pc} +_02257296: + mov r0, #8 + pop {r3, pc} +_0225729A: + mov r0, #9 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_02257278 + + thumb_func_start ov22_022572A0 +ov22_022572A0: ; 0x022572A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, _02257358 ; =0x000006D4 + str r1, [sp, #0x14] + ldr r0, [r5, r0] + add r7, r2, #0 + add r4, r3, #0 + bl sub_02027B50 + add r6, r0, #0 + mov r0, #0 + mov r1, #0xe0 + mov r2, #0xe + bl sub_02002E98 + str r4, [sp] + add r0, sp, #0x20 + ldrb r1, [r0, #0x10] + mov r2, #3 + add r3, r7, #0 + str r1, [sp, #4] + ldrb r0, [r0, #0x14] + ldr r1, _0225735C ; =0x000006B4 + str r0, [sp, #8] + mov r0, #7 + str r0, [sp, #0xc] + mov r0, #0x92 + str r0, [sp, #0x10] + ldr r0, [r5, #0x40] + ldr r1, [r5, r1] + bl sub_0201A7E8 + ldr r0, _0225735C ; =0x000006B4 + mov r1, #0xf + ldr r0, [r5, r0] + bl sub_0201ADA4 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + ldr r0, [r5, #0x40] + mov r1, #3 + mov r2, #0x74 + mov r3, #8 + bl sub_0200DD0C + ldr r0, _0225735C ; =0x000006B4 + mov r1, #0 + ldr r0, [r5, r0] + mov r2, #0x74 + mov r3, #8 + bl sub_0200E060 + ldr r2, _02257360 ; =0x00000181 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xd + bl sub_0200B144 + ldr r1, [sp, #0x14] + add r6, r0, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r3, #0 + str r3, [sp] + ldr r0, _02257364 ; =0x0001020F + str r3, [sp, #4] + str r0, [sp, #8] + ldr r0, _0225735C ; =0x000006B4 + str r3, [sp, #0xc] + ldr r0, [r5, r0] + mov r1, #1 + add r2, r4, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + ldr r0, _0225735C ; =0x000006B4 + ldr r0, [r5, r0] + bl sub_0201A954 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02257358: .word 0x000006D4 +_0225735C: .word 0x000006B4 +_02257360: .word 0x00000181 +_02257364: .word 0x0001020F + thumb_func_end ov22_022572A0 + + thumb_func_start ov22_02257368 +ov22_02257368: ; 0x02257368 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _022573E0 ; =0x000006B4 + add r4, r1, #0 + ldr r0, [r5, r0] + mov r1, #0xf + bl sub_0201ADA4 + ldr r2, _022573E4 ; =0x00000181 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xd + bl sub_0200B144 + add r1, r4, #0 + add r7, r0, #0 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + mov r1, #0xd + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + ldr r0, _022573E8 ; =0x0001020F + str r3, [sp, #4] + str r0, [sp, #8] + ldr r0, _022573E0 ; =0x000006B4 + str r3, [sp, #0xc] + ldr r0, [r5, r0] + mov r1, #1 + add r2, r4, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + ldr r0, _022573E0 ; =0x000006B4 + ldr r0, [r5, r0] + bl sub_0201A954 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022573E0: .word 0x000006B4 +_022573E4: .word 0x00000181 +_022573E8: .word 0x0001020F + thumb_func_end ov22_02257368 + + thumb_func_start ov22_022573EC +ov22_022573EC: ; 0x022573EC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _02257488 ; =0x000006DC + add r4, r1, #0 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02257400 + bl sub_02022974 +_02257400: + ldr r0, _0225748C ; =0x000006B4 + mov r1, #0xf + ldr r0, [r5, r0] + bl sub_0201ADA4 + ldr r2, _02257490 ; =0x00000181 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xd + bl sub_0200B144 + add r1, r4, #0 + add r7, r0, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + mov r1, #0xd + bl sub_02023790 + ldr r1, _02257488 ; =0x000006DC + add r2, r4, #0 + str r0, [r5, r1] + add r0, r1, #4 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + bl sub_0200C388 + mov r0, #0x6d + lsl r0, r0, #4 + ldr r1, [r5, r0] + ldrb r1, [r1, #0x16] + cmp r1, #0 + bne _02257450 + add r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02027AC0 + b _02257452 +_02257450: + mov r0, #1 +_02257452: + mov r3, #0 + str r3, [sp] + str r0, [sp, #4] + ldr r0, _02257494 ; =0x0001020F + ldr r2, _0225748C ; =0x000006B4 + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r5, r2] + add r2, #0x28 + ldr r2, [r5, r2] + mov r1, #1 + bl sub_0201D78C + add r6, r0, #0 + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + ldr r0, _0225748C ; =0x000006B4 + ldr r0, [r5, r0] + bl sub_0201A954 + add r0, r6, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02257488: .word 0x000006DC +_0225748C: .word 0x000006B4 +_02257490: .word 0x00000181 +_02257494: .word 0x0001020F + thumb_func_end ov22_022573EC + + thumb_func_start ov22_02257498 +ov22_02257498: ; 0x02257498 + push {r4, lr} + add r4, r0, #0 + ldr r0, _022574AC ; =0x000006DC + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _022574AC ; =0x000006DC + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_022574AC: .word 0x000006DC + thumb_func_end ov22_02257498 + + thumb_func_start ov22_022574B0 +ov22_022574B0: ; 0x022574B0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _022574C8 ; =0x000006B4 + ldr r0, [r4, r0] + bl sub_0201ACF4 + ldr r0, _022574C8 ; =0x000006B4 + ldr r0, [r4, r0] + bl sub_0201A8FC + pop {r4, pc} + nop +_022574C8: .word 0x000006B4 + thumb_func_end ov22_022574B0 + + thumb_func_start ov22_022574CC +ov22_022574CC: ; 0x022574CC + push {r3, lr} + sub sp, #8 + mov r2, #0x1b + str r2, [sp] + mov r2, #2 + mov r3, #1 + str r2, [sp, #4] + bl ov22_022572A0 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_022574CC + + thumb_func_start ov22_022574E4 +ov22_022574E4: ; 0x022574E4 + ldr r3, _022574E8 ; =ov22_02257368 + bx r3 + ; .align 2, 0 +_022574E8: .word ov22_02257368 + thumb_func_end ov22_022574E4 + + thumb_func_start ov22_022574EC +ov22_022574EC: ; 0x022574EC + ldr r3, _022574F0 ; =ov22_022574B0 + bx r3 + ; .align 2, 0 +_022574F0: .word ov22_022574B0 + thumb_func_end ov22_022574EC + + thumb_func_start ov22_022574F4 +ov22_022574F4: ; 0x022574F4 + push {r4, lr} + sub sp, #8 + mov r2, #0x1b + str r2, [sp] + mov r2, #4 + str r2, [sp, #4] + mov r2, #2 + mov r3, #0x13 + add r4, r0, #0 + bl ov22_022572A0 + mov r0, #0xd + bl sub_0200B358 + mov r1, #0x6e + lsl r1, r1, #4 + str r0, [r4, r1] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022574F4 + + thumb_func_start ov22_0225751C +ov22_0225751C: ; 0x0225751C + ldr r3, _02257520 ; =ov22_022573EC + bx r3 + ; .align 2, 0 +_02257520: .word ov22_022573EC + thumb_func_end ov22_0225751C + + thumb_func_start ov22_02257524 +ov22_02257524: ; 0x02257524 + push {r3, lr} + sub sp, #8 + mov r3, #0 + str r3, [sp] + mov r3, #1 + str r3, [sp, #4] + mov r3, #0x6e + lsl r3, r3, #4 + ldr r0, [r0, r3] + mov r3, #2 + bl sub_0200B60C + add sp, #8 + pop {r3, pc} + thumb_func_end ov22_02257524 + + thumb_func_start ov22_02257540 +ov22_02257540: ; 0x02257540 + ldr r3, _02257544 ; =ov22_02257498 + bx r3 + ; .align 2, 0 +_02257544: .word ov22_02257498 + thumb_func_end ov22_02257540 + + thumb_func_start ov22_02257548 +ov22_02257548: ; 0x02257548 + push {r4, lr} + add r4, r0, #0 + bl ov22_022574B0 + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200B3F0 + mov r0, #0x6e + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + pop {r4, pc} + thumb_func_end ov22_02257548 + + thumb_func_start ov22_02257564 +ov22_02257564: ; 0x02257564 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xfd + lsl r0, r0, #2 + add r0, r4, r0 + bl ov22_02257D00 + add r1, r0, #0 + mov r0, #0x56 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov22_0225A6B8 + pop {r4, pc} + thumb_func_end ov22_02257564 + + thumb_func_start ov22_02257580 +ov22_02257580: ; 0x02257580 + push {r4, lr} + cmp r0, #3 + bhi _022575AA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02257592: ; jump table + .short _0225759A - _02257592 - 2 ; case 0 + .short _0225759E - _02257592 - 2 ; case 1 + .short _022575A2 - _02257592 - 2 ; case 2 + .short _022575A6 - _02257592 - 2 ; case 3 +_0225759A: + mov r4, #5 + b _022575AE +_0225759E: + mov r4, #0xa + b _022575AE +_022575A2: + mov r4, #0xf + b _022575AE +_022575A6: + mov r4, #0x14 + b _022575AE +_022575AA: + bl sub_02022974 +_022575AE: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02257580 + + thumb_func_start ov22_022575B4 +ov22_022575B4: ; 0x022575B4 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0x40] + mov r1, #0x19 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + add r0, sp, #0 + strb r1, [r0, #0x10] + mov r1, #4 + strb r1, [r0, #0x11] + mov r0, #0x6b + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02015A54 + mov r0, #0x6b + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0 + bl sub_02015958 + add r0, r4, #0 + mov r1, #2 + bl ov22_022574E4 + ldr r0, _02257620 ; =0x04000008 + mov r2, #3 + ldrh r3, [r0] + mov r1, #2 + bic r3, r2 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0, #2] + mov r1, #1 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #2] + ldrh r3, [r0, #4] + mov r1, #3 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #4] + ldrh r1, [r0, #6] + bic r1, r2 + strh r1, [r0, #6] + add sp, #0x14 + pop {r3, r4, pc} + nop +_02257620: .word 0x04000008 + thumb_func_end ov22_022575B4 + + thumb_func_start ov22_02257624 +ov22_02257624: ; 0x02257624 + push {r3, lr} + mov r1, #0x6b + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl sub_020159FC + cmp r0, #0 + beq _0225763E + cmp r0, #1 + beq _02257642 + cmp r0, #2 + beq _02257646 + pop {r3, pc} +_0225763E: + mov r0, #5 + pop {r3, pc} +_02257642: + mov r0, #6 + pop {r3, pc} +_02257646: + mov r0, #7 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_02257624 + + thumb_func_start ov22_0225764C +ov22_0225764C: ; 0x0225764C + ldr r3, _02257654 ; =sub_020D5124 + mov r1, #0 + mov r2, #0xac + bx r3 + ; .align 2, 0 +_02257654: .word sub_020D5124 + thumb_func_end ov22_0225764C + + thumb_func_start ov22_02257658 +ov22_02257658: ; 0x02257658 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0 + bne _02257668 + bl sub_02022974 +_02257668: + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + lsl r0, r0, #3 + str r4, [r5, r0] + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + lsl r0, r0, #3 + add r0, r5, r0 + str r6, [r0, #4] + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + add r5, #0xa8 + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} + thumb_func_end ov22_02257658 + + thumb_func_start ov22_0225768C +ov22_0225768C: ; 0x0225768C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r0, #0xa8 + ldr r2, [r0, #0] + mov r1, #0 + cmp r2, #0 + ble _022576E4 +_0225769A: + lsl r0, r1, #3 + add r7, r6, r0 + ldr r0, [r7, #4] + cmp r0, #1 + bne _022576D8 + mov r4, #0 + cmp r2, #0 + ble _022576D0 + add r5, r6, #0 +_022576AC: + ldr r0, [r5, #4] + cmp r0, #0 + bne _022576C2 + add r0, r7, #0 + add r1, r5, #0 + bl ov22_0225771C + cmp r0, #1 + bne _022576C2 + mov r0, #1 + str r0, [r5, #4] +_022576C2: + add r0, r6, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, #8 + cmp r4, r0 + blt _022576AC +_022576D0: + mov r0, #2 + str r0, [r7, #4] + mov r1, #0 + b _022576DA +_022576D8: + add r1, r1, #1 +_022576DA: + add r0, r6, #0 + add r0, #0xa8 + ldr r2, [r0, #0] + cmp r1, r2 + blt _0225769A +_022576E4: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225768C + + thumb_func_start ov22_022576E8 +ov22_022576E8: ; 0x022576E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #0x15 + blo _022576F6 + bl sub_02022974 +_022576F6: + lsl r0, r5, #3 + ldr r0, [r4, r0] + pop {r3, r4, r5, pc} + thumb_func_end ov22_022576E8 + + thumb_func_start ov22_022576FC +ov22_022576FC: ; 0x022576FC + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #0x15 + blo _0225770A + bl sub_02022974 +_0225770A: + lsl r0, r5, #3 + add r0, r4, r0 + ldr r0, [r0, #4] + cmp r0, #0 + beq _02257718 + mov r0, #1 + pop {r3, r4, r5, pc} +_02257718: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov22_022576FC + + thumb_func_start ov22_0225771C +ov22_0225771C: ; 0x0225771C + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r4, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + add r1, sp, #0x28 + add r2, sp, #0x24 + bl ov22_02259780 + add r0, sp, #0x20 + str r0, [sp] + ldr r0, [r4, #0] + add r1, sp, #0x14 + add r2, sp, #0x18 + add r3, sp, #0x1c + bl ov22_02259724 + mov r4, #0 + add r6, sp, #0x10 + add r7, sp, #0xc +_02257744: + str r4, [sp] + str r6, [sp, #4] + str r7, [sp, #8] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + bl ov22_022577EC + ldr r0, [r5, #0] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl ov22_02259578 + cmp r0, #1 + bne _0225776A + add sp, #0x2c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0225776A: + add r4, r4, #1 + cmp r4, #0x10 + blt _02257744 + mov r0, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225771C + + thumb_func_start ov22_02257778 +ov22_02257778: ; 0x02257778 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r4, [r5, #8] + add r6, r0, #0 + add r7, r2, #0 + cmp r4, r5 + beq _0225779C +_02257786: + ldr r0, [r4, #4] + cmp r0, #0 + bne _02257796 + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov22_02257658 +_02257796: + ldr r4, [r4, #8] + cmp r4, r5 + bne _02257786 +_0225779C: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02257778 + + thumb_func_start ov22_022577A0 +ov22_022577A0: ; 0x022577A0 + push {r3, r4, r5, lr} + mov r2, #0x6d + lsl r2, r2, #4 + ldr r2, [r0, r2] + mov r1, #0 + ldrb r3, [r2, #0x16] + cmp r3, #0 + bne _022577BC + mov r2, #0x56 + lsl r2, r2, #4 + add r0, r0, r2 + bl ov22_0225A6CC + pop {r3, r4, r5, pc} +_022577BC: + ldrb r4, [r2, #0x14] + ldrb r3, [r2, #0x15] + cmp r4, r3 + bne _022577EA + add r4, r1, #0 + add r5, r2, #0 +_022577C8: + ldrb r3, [r5, #0x10] + cmp r3, #1 + bne _022577D0 + add r1, r1, #1 +_022577D0: + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #4 + blt _022577C8 + ldrb r2, [r2, #0x17] + cmp r2, r1 + bgt _022577EA + mov r1, #0x56 + lsl r1, r1, #4 + add r0, r0, r1 + mov r1, #0 + bl ov22_0225A6CC +_022577EA: + pop {r3, r4, r5, pc} + thumb_func_end ov22_022577A0 + + thumb_func_start ov22_022577EC +ov22_022577EC: ; 0x022577EC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r0, #0 + str r1, [sp] + add r7, r2, #0 + add r0, r3, #0 + sub r0, r0, r7 + mov r1, #3 + str r3, [sp, #4] + ldr r4, [sp, #0x2c] + ldr r5, [sp, #0x30] + bl sub_020E2178 + add r1, r7, r0 + lsl r0, r0, #1 + add r0, r7, r0 + str r0, [sp, #8] + ldr r0, [sp] + str r1, [sp, #0xc] + sub r0, r0, r6 + mov r1, #3 + bl sub_020E2178 + add r2, r6, r0 + lsl r0, r0, #1 + ldr r1, [sp, #0x28] + add r0, r6, r0 + cmp r1, #0xf + bhi _022578EE + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02257832: ; jump table + .short _02257852 - _02257832 - 2 ; case 0 + .short _0225785A - _02257832 - 2 ; case 1 + .short _02257862 - _02257832 - 2 ; case 2 + .short _0225786A - _02257832 - 2 ; case 3 + .short _02257874 - _02257832 - 2 ; case 4 + .short _0225787E - _02257832 - 2 ; case 5 + .short _02257888 - _02257832 - 2 ; case 6 + .short _02257892 - _02257832 - 2 ; case 7 + .short _0225789E - _02257832 - 2 ; case 8 + .short _022578A8 - _02257832 - 2 ; case 9 + .short _022578B2 - _02257832 - 2 ; case 10 + .short _022578BC - _02257832 - 2 ; case 11 + .short _022578C8 - _02257832 - 2 ; case 12 + .short _022578D2 - _02257832 - 2 ; case 13 + .short _022578DC - _02257832 - 2 ; case 14 + .short _022578E6 - _02257832 - 2 ; case 15 +_02257852: + str r7, [r4, #0] + add sp, #0x10 + str r6, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_0225785A: + str r7, [r4, #0] + add sp, #0x10 + str r2, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_02257862: + str r7, [r4, #0] + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_0225786A: + ldr r0, [sp] + str r7, [r4, #0] + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_02257874: + ldr r0, [sp, #0xc] + add sp, #0x10 + str r0, [r4, #0] + str r6, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_0225787E: + ldr r0, [sp, #0xc] + add sp, #0x10 + str r0, [r4, #0] + str r2, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_02257888: + ldr r1, [sp, #0xc] + add sp, #0x10 + str r1, [r4, #0] + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_02257892: + ldr r0, [sp, #0xc] + str r0, [r4, #0] + ldr r0, [sp] + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_0225789E: + ldr r0, [sp, #8] + add sp, #0x10 + str r0, [r4, #0] + str r6, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578A8: + ldr r0, [sp, #8] + add sp, #0x10 + str r0, [r4, #0] + str r2, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578B2: + ldr r1, [sp, #8] + add sp, #0x10 + str r1, [r4, #0] + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578BC: + ldr r0, [sp, #8] + str r0, [r4, #0] + ldr r0, [sp] + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578C8: + ldr r0, [sp, #4] + add sp, #0x10 + str r0, [r4, #0] + str r6, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578D2: + ldr r0, [sp, #4] + add sp, #0x10 + str r0, [r4, #0] + str r2, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578DC: + ldr r1, [sp, #4] + add sp, #0x10 + str r1, [r4, #0] + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022578E6: + ldr r0, [sp, #4] + str r0, [r4, #0] + ldr r0, [sp] + str r0, [r5, #0] +_022578EE: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022577EC \ No newline at end of file diff --git a/asm/ov22_022578F4.s b/asm/ov22_022578F4.s new file mode 100644 index 000000000..4d99ff622 --- /dev/null +++ b/asm/ov22_022578F4.s @@ -0,0 +1,923 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_022578F4 +ov22_022578F4: ; 0x022578F4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0] + mov r2, #0 + str r0, [r4, #0x2c] + ldr r0, [r1, #4] + str r0, [r4, #0x30] + ldr r0, [r1, #8] + str r0, [r4, #0x34] + ldr r0, [r1, #0xc] + str r0, [r4, #0x38] + ldr r0, [r1, #0x10] + str r0, [r4, #0x3c] + ldr r0, [r1, #0x14] + str r0, [r4, #0x40] + ldr r0, [r1, #0x18] + str r0, [r4, #0x44] + str r2, [r4, #0x74] + ldr r0, [r1, #0x1c] + str r0, [r4, #0] + add r0, r4, #4 + str r0, [r4, #0xc] + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x14 + str r0, [r4, #0x1c] + str r0, [r4, #0x20] + str r2, [r4, #0x24] + ldr r0, [r1, #0x20] + add r1, r4, #0 + str r0, [r4, #0x28] + ldr r0, [r4, #0] + add r1, #0x78 + mov r2, #3 + bl ov22_022594C0 + add r4, #0x14 + add r1, r4, #0 + bl ov22_02259520 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022578F4 + + thumb_func_start ov22_02257948 +ov22_02257948: ; 0x02257948 + push {r4, lr} + add r4, r0, #0 + bl ov22_022579F0 + add r0, r4, #0 + bl ov22_02257A98 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x88 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02257948 + + thumb_func_start ov22_02257964 +ov22_02257964: ; 0x02257964 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [sp, #0x20] + add r6, r1, #0 + str r0, [sp] + add r5, r2, #0 + add r0, r4, #0 + add r7, r3, #0 + ldr r1, [r4, #0x3c] + add r0, #0x78 + add r2, r6, #0 + add r3, r5, #0 + bl ov22_022590C0 + add r0, r4, #0 + ldr r1, [sp, #0x1c] + add r0, #0x78 + bl ov22_022591D0 + add r4, #0x78 + ldr r2, [sp, #0x18] + add r0, r4, #0 + add r1, r7, #0 + bl ov22_022591EC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02257964 + + thumb_func_start ov22_02257998 +ov22_02257998: ; 0x02257998 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + str r3, [sp] + add r5, r1, #0 + add r4, r2, #0 + ldr r1, [r6, #0x3c] + add r0, #0x78 + add r2, r5, #0 + add r3, r4, #0 + bl ov22_022590C0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov22_02257998 + + thumb_func_start ov22_022579B4 +ov22_022579B4: ; 0x022579B4 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + add r5, r1, #0 + add r4, r2, #0 + add r0, r6, #0 + ldr r1, [r6, #0x3c] + add r0, #0x78 + add r2, r5, #0 + add r3, r4, #0 + bl ov22_022590D4 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_022579B4 + + thumb_func_start ov22_022579D8 +ov22_022579D8: ; 0x022579D8 + ldr r3, _022579E4 ; =ov22_02259520 + add r2, r0, #0 + add r0, r1, #0 + ldr r1, [r2, #0x20] + bx r3 + nop +_022579E4: .word ov22_02259520 + thumb_func_end ov22_022579D8 + + thumb_func_start ov22_022579E8 +ov22_022579E8: ; 0x022579E8 + ldr r3, _022579EC ; =ov22_02259530 + bx r3 + ; .align 2, 0 +_022579EC: .word ov22_02259530 + thumb_func_end ov22_022579E8 + + thumb_func_start ov22_022579F0 +ov22_022579F0: ; 0x022579F0 + ldr r3, _022579F8 ; =ov22_022591B8 + add r0, #0x78 + bx r3 + nop +_022579F8: .word ov22_022591B8 + thumb_func_end ov22_022579F0 + + thumb_func_start ov22_022579FC +ov22_022579FC: ; 0x022579FC + push {r3, r4, r5, lr} + sub sp, #0x20 + add r4, r0, #0 + ldr r5, [r4, #0x24] + ldr r0, [r4, #0x28] + cmp r5, r0 + bge _02257A56 + ldr r0, [r4, #0x44] + str r0, [sp] + ldr r0, [r4, #0x2c] + str r0, [sp, #4] + ldr r5, [r4, #0x30] + lsl r0, r1, #2 + ldr r0, [r5, r0] + str r0, [sp, #8] + ldr r0, [r4, #0x34] + ldr r0, [r0, #0] + str r2, [sp, #0x10] + str r3, [sp, #0x14] + str r1, [sp, #0x18] + str r0, [sp, #0xc] + ldr r0, [r4, #0x38] + ldrb r0, [r0, r1] + str r0, [sp, #0x1c] + add r0, sp, #0 + bl ov22_02254E20 + ldr r1, [sp, #0x30] + add r5, r0, #0 + bl ov22_02254F6C + ldr r0, [r4, #0] + add r1, r5, #0 + mov r2, #0 + bl ov22_022594C0 + add r1, r4, #4 + bl ov22_02259520 + ldr r0, [r4, #0x24] + add sp, #0x20 + add r0, r0, #1 + str r0, [r4, #0x24] + mov r0, #1 + pop {r3, r4, r5, pc} +_02257A56: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov22_022579FC + + thumb_func_start ov22_02257A5C +ov22_02257A5C: ; 0x02257A5C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r3, r2, #0 + ldr r5, [r4, #0x24] + ldr r2, [r4, #0x28] + cmp r5, r2 + bge _02257A7A + mov r2, #1 + bl ov22_02257DEC + ldr r0, [r4, #0x24] + add r0, r0, #1 + str r0, [r4, #0x24] + mov r0, #1 + pop {r3, r4, r5, pc} +_02257A7A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02257A5C + + thumb_func_start ov22_02257A80 +ov22_02257A80: ; 0x02257A80 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl ov22_02259530 + ldr r0, [r4, #0x24] + sub r0, r0, #1 + str r0, [r4, #0x24] + bpl _02257A96 + bl sub_02022974 +_02257A96: + pop {r4, pc} + thumb_func_end ov22_02257A80 + + thumb_func_start ov22_02257A98 +ov22_02257A98: ; 0x02257A98 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl ov22_02259540 + add r0, r4, #0 + add r0, #0x14 + bl ov22_02259540 + mov r0, #0 + str r0, [r4, #0x24] + pop {r4, pc} + thumb_func_end ov22_02257A98 + + thumb_func_start ov22_02257AB0 +ov22_02257AB0: ; 0x02257AB0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r5, #4 + add r4, r1, #0 + add r6, r2, #0 + bl ov22_022596EC + add r5, #0x14 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov22_022596EC + pop {r4, r5, r6, pc} + thumb_func_end ov22_02257AB0 + + thumb_func_start ov22_02257ACC +ov22_02257ACC: ; 0x02257ACC + ldr r3, _02257AD4 ; =ov22_022596EC + add r0, #0x14 + bx r3 + nop +_02257AD4: .word ov22_022596EC + thumb_func_end ov22_02257ACC + + thumb_func_start ov22_02257AD8 +ov22_02257AD8: ; 0x02257AD8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + neg r4, r2 + neg r7, r1 + add r0, r5, #4 + add r1, r7, #0 + add r2, r4, #0 + add r6, r3, #0 + bl ov22_022596EC + ldr r2, [sp, #0x18] + add r0, r5, #4 + add r1, r6, #0 + bl ov22_022596EC + add r0, r5, #0 + add r0, #0x14 + add r1, r7, #0 + add r2, r4, #0 + bl ov22_022596EC + add r5, #0x14 + ldr r2, [sp, #0x18] + add r0, r5, #0 + add r1, r6, #0 + bl ov22_022596EC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02257AD8 + + thumb_func_start ov22_02257B10 +ov22_02257B10: ; 0x02257B10 + ldr r3, _02257B18 ; =ov22_02257B1C + mov r1, #0 + mvn r1, r1 + bx r3 + ; .align 2, 0 +_02257B18: .word ov22_02257B1C + thumb_func_end ov22_02257B10 + + thumb_func_start ov22_02257B1C +ov22_02257B1C: ; 0x02257B1C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r7, #0 + ldr r4, [r7, #0x1c] + add r6, #0x14 + add r5, r1, #0 + cmp r4, r6 + beq _02257B4A +_02257B2C: + ldr r0, [r4, #4] + cmp r0, #0 + ldr r0, [r4, #0] + bne _02257B3C + add r1, r5, #0 + bl ov22_02254F6C + b _02257B42 +_02257B3C: + add r1, r5, #0 + bl ov22_022591D0 +_02257B42: + ldr r4, [r4, #8] + sub r5, r5, #1 + cmp r4, r6 + bne _02257B2C +_02257B4A: + ldr r4, [r7, #0xc] + add r6, r7, #4 + sub r5, #8 + cmp r4, r6 + beq _02257B72 +_02257B54: + ldr r0, [r4, #4] + cmp r0, #0 + ldr r0, [r4, #0] + bne _02257B64 + add r1, r5, #0 + bl ov22_02254F6C + b _02257B6A +_02257B64: + add r1, r5, #0 + bl ov22_022591D0 +_02257B6A: + ldr r4, [r4, #8] + sub r5, r5, #1 + cmp r4, r6 + bne _02257B54 +_02257B72: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02257B1C + + thumb_func_start ov22_02257B74 +ov22_02257B74: ; 0x02257B74 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r7, #0 + ldr r4, [r7, #0x1c] + add r6, #0x14 + add r5, r1, #0 + cmp r4, r6 + beq _02257BB0 +_02257B84: + ldr r0, [r4, #4] + cmp r0, #0 + ldr r0, [r4, #0] + bne _02257B9C + bl ov22_02254F78 + add r1, r0, #0 + ldr r0, [r4, #0] + add r1, r1, r5 + bl ov22_02254F6C + b _02257BAA +_02257B9C: + bl ov22_022591E0 + add r1, r0, #0 + ldr r0, [r4, #0] + add r1, r1, r5 + bl ov22_022591D0 +_02257BAA: + ldr r4, [r4, #8] + cmp r4, r6 + bne _02257B84 +_02257BB0: + ldr r4, [r7, #0xc] + add r6, r7, #4 + cmp r4, r6 + beq _02257BE4 +_02257BB8: + ldr r0, [r4, #4] + cmp r0, #0 + ldr r0, [r4, #0] + bne _02257BD0 + bl ov22_02254F78 + add r1, r0, #0 + ldr r0, [r4, #0] + add r1, r1, r5 + bl ov22_02254F6C + b _02257BDE +_02257BD0: + bl ov22_022591E0 + add r1, r0, #0 + ldr r0, [r4, #0] + add r1, r1, r5 + bl ov22_022591D0 +_02257BDE: + ldr r4, [r4, #8] + cmp r4, r6 + bne _02257BB8 +_02257BE4: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02257B74 + + thumb_func_start ov22_02257BE8 +ov22_02257BE8: ; 0x02257BE8 + push {r3, lr} + mov r1, #0x12 + add r0, sp, #0 + strb r1, [r0] + mov r1, #0x8f + strb r1, [r0, #1] + mov r1, #0x8a + strb r1, [r0, #2] + mov r1, #0xf6 + strb r1, [r0, #3] + add r0, sp, #0 + bl sub_02022734 + pop {r3, pc} + thumb_func_end ov22_02257BE8 + + thumb_func_start ov22_02257C04 +ov22_02257C04: ; 0x02257C04 + push {r3, lr} + mov r3, #0x12 + add r0, sp, #0 + strb r3, [r0] + mov r3, #0x8f + strb r3, [r0, #1] + mov r3, #0x8a + strb r3, [r0, #2] + mov r3, #0xf6 + strb r3, [r0, #3] + add r0, sp, #0 + bl sub_02022830 + pop {r3, pc} + thumb_func_end ov22_02257C04 + + thumb_func_start ov22_02257C20 +ov22_02257C20: ; 0x02257C20 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, [r0, #0x1c] + str r0, [sp] + str r0, [sp, #4] + add r0, #0x14 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + str r0, [sp, #4] + cmp r5, r0 + beq _02257C56 +_02257C38: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov22_022595AC + cmp r0, #1 + bne _02257C4E + add sp, #0xc + add r0, r5, #0 + pop {r4, r5, r6, r7, pc} +_02257C4E: + ldr r5, [r5, #8] + ldr r0, [sp, #4] + cmp r5, r0 + bne _02257C38 +_02257C56: + ldr r0, [sp] + ldr r5, [r0, #0xc] + add r0, r0, #4 + str r0, [sp, #8] + cmp r5, r0 + beq _02257C80 +_02257C62: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov22_022595AC + cmp r0, #1 + bne _02257C78 + add sp, #0xc + add r0, r5, #0 + pop {r4, r5, r6, r7, pc} +_02257C78: + ldr r5, [r5, #8] + ldr r0, [sp, #8] + cmp r5, r0 + bne _02257C62 +_02257C80: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02257C20 + + thumb_func_start ov22_02257C88 +ov22_02257C88: ; 0x02257C88 + push {r3, r4, r5, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, [r5, #0x40] + add r4, r1, #0 + str r0, [sp] + mov r0, #0x19 + lsl r1, r4, #2 + str r0, [sp, #4] + add r0, r1, #0 + add r0, #0x86 + str r0, [sp, #8] + add r0, r1, #0 + add r0, #0x87 + str r0, [sp, #0xc] + mov r0, #0x88 + str r0, [sp, #0x14] + mov r0, #0x10 + str r0, [sp, #0x18] + mov r0, #2 + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x20] + mov r0, #0xd + str r0, [sp, #0x24] + mov r0, #0 + add r1, #0x88 + str r0, [sp, #0x28] + add r0, r5, #0 + str r1, [sp, #0x10] + add r0, #0x48 + add r1, sp, #0 + str r2, [sp, #0x2c] + bl ov22_022597BC + str r4, [r5, #0x74] + add sp, #0x30 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02257C88 + + thumb_func_start ov22_02257CD4 +ov22_02257CD4: ; 0x02257CD4 + ldr r3, _02257CDC ; =ov22_02259804 + add r0, #0x48 + bx r3 + nop +_02257CDC: .word ov22_02259804 + thumb_func_end ov22_02257CD4 + + thumb_func_start ov22_02257CE0 +ov22_02257CE0: ; 0x02257CE0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x78] + add r4, r1, #0 + mov r1, #0 + add r6, r2, #0 + bl sub_020080C0 + str r0, [r4, #0] + ldr r0, [r5, #0x78] + mov r1, #1 + bl sub_020080C0 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_02257CE0 + + thumb_func_start ov22_02257D00 +ov22_02257D00: ; 0x02257D00 + ldr r0, [r0, #0x24] + bx lr + thumb_func_end ov22_02257D00 + + thumb_func_start ov22_02257D04 +ov22_02257D04: ; 0x02257D04 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + ldr r6, [r7, #0x1c] + mov r4, #0 + add r7, #0x14 + str r1, [sp] + str r2, [sp, #4] + add r5, r4, #0 + cmp r6, r7 + beq _02257D62 +_02257D1A: + add r0, r6, #0 + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02257EC8 + cmp r4, #0 + bge _02257D2C + neg r1, r4 + b _02257D2E +_02257D2C: + add r1, r4, #0 +_02257D2E: + ldr r0, [sp, #0xc] + cmp r0, #0 + bge _02257D38 + neg r2, r0 + b _02257D3A +_02257D38: + add r2, r0, #0 +_02257D3A: + cmp r2, r1 + ble _02257D40 + add r4, r0, #0 +_02257D40: + cmp r5, #0 + bge _02257D48 + neg r1, r5 + b _02257D4A +_02257D48: + add r1, r5, #0 +_02257D4A: + ldr r0, [sp, #8] + cmp r0, #0 + bge _02257D54 + neg r2, r0 + b _02257D56 +_02257D54: + add r2, r0, #0 +_02257D56: + cmp r2, r1 + ble _02257D5C + add r5, r0, #0 +_02257D5C: + ldr r6, [r6, #8] + cmp r6, r7 + bne _02257D1A +_02257D62: + ldr r0, [sp] + str r4, [r0, #0] + ldr r0, [sp, #4] + str r5, [r0, #0] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02257D04 + + thumb_func_start ov22_02257D70 +ov22_02257D70: ; 0x02257D70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + ldr r4, [r0, #0x1c] + add r7, #0x14 + str r0, [sp] + add r6, r1, #0 + cmp r4, r7 + beq _02257DCE + asr r0, r6, #0xa + mov r1, #0x1f + and r0, r1 + str r0, [sp, #0xc] + asr r0, r6, #5 + and r0, r1 + str r0, [sp, #8] + add r0, r6, #0 + and r0, r1 + str r0, [sp, #4] +_02257D96: + ldr r0, [r4, #4] + cmp r0, #0 + bne _02257DA8 + ldr r0, [r4, #0] + add r1, r6, #0 + ldr r0, [r0, #4] + bl sub_0201529C + b _02257DC8 +_02257DA8: + ldr r5, [r4, #0] + ldr r2, [sp, #0xc] + ldr r0, [r5, #0] + mov r1, #0x18 + bl sub_02007DEC + ldr r0, [r5, #0] + ldr r2, [sp, #8] + mov r1, #0x19 + bl sub_02007DEC + ldr r0, [r5, #0] + ldr r2, [sp, #4] + mov r1, #0x1a + bl sub_02007DEC +_02257DC8: + ldr r4, [r4, #8] + cmp r4, r7 + bne _02257D96 +_02257DCE: + ldr r0, [sp] + ldr r4, [r0, #0xc] + add r5, r0, #4 + cmp r4, r5 + beq _02257DE8 +_02257DD8: + ldr r0, [r4, #0] + add r1, r6, #0 + ldr r0, [r0, #4] + bl sub_0201529C + ldr r4, [r4, #8] + cmp r4, r5 + bne _02257DD8 +_02257DE8: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02257D70 + + thumb_func_start ov22_02257DEC +ov22_02257DEC: ; 0x02257DEC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + str r0, [sp, #0xc] + str r2, [sp, #0x14] + str r1, [sp, #0x10] + add r0, r1, #0 + add r1, sp, #0x54 + add r2, sp, #0x50 + add r4, r3, #0 + bl ov22_02259648 + ldr r0, [sp, #0x10] + add r1, sp, #0x4c + add r2, sp, #0x48 + bl ov22_02259698 + add r0, sp, #0x30 + str r0, [sp] + ldr r0, [sp, #0x10] + add r1, sp, #0x44 + add r2, sp, #0x34 + add r3, sp, #0x40 + bl ov22_022596B0 + mov r0, #0x76 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r5, #0 + str r0, [sp, #0x20] + ldr r6, [sp, #0x54] + ldr r0, [sp, #0x4c] + ldr r7, [sp, #0x44] + add r1, r6, r0 + ldr r0, [sp, #0x34] + add r4, r5, #0 + sub r0, r1, r0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x50] + ldr r1, [sp, #0x48] + str r0, [sp, #0x24] + add r1, r0, r1 + ldr r0, [sp, #0x30] + sub r0, r1, r0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x40] + str r0, [sp, #0x28] + ldr r0, [sp, #0xc] + str r0, [sp, #0x2c] + add r0, #0x78 + str r0, [sp, #0x2c] +_02257E50: + str r4, [sp] + add r0, sp, #0x3c + str r0, [sp, #4] + add r0, sp, #0x38 + str r0, [sp, #8] + ldr r1, [sp, #0x24] + ldr r0, [sp, #0x28] + ldr r3, [sp, #0x1c] + add r0, r1, r0 + ldr r1, [sp, #0x18] + add r2, r6, r7 + bl ov22_022577EC + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x3c] + ldr r2, [sp, #0x38] + ldr r3, [sp, #0x20] + bl ov22_022592F0 + add r4, r4, #1 + orr r5, r0 + cmp r4, #0x10 + blt _02257E50 + cmp r5, #0 + beq _02257EA6 + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02257E98 + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x10] + add r1, #0x14 + str r1, [sp, #0xc] + bl ov22_02259520 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_02257E98: + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x10] + ldr r1, [r1, #0x20] + bl ov22_02259520 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_02257EA6: + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02257EBA + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x10] + add r1, r1, #4 + bl ov22_02259520 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_02257EBA: + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x10] + ldr r1, [r1, #0x10] + bl ov22_02259520 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02257DEC + + thumb_func_start ov22_02257EC8 +ov22_02257EC8: ; 0x02257EC8 + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + add r5, r1, #0 + add r4, r2, #0 + add r6, r0, #0 + add r1, sp, #0x20 + add r2, sp, #0x1c + bl ov22_02259698 + add r0, r6, #0 + add r1, sp, #0x18 + add r2, sp, #0x14 + bl ov22_02259648 + add r0, sp, #4 + str r0, [sp] + add r0, r6, #0 + add r1, sp, #0x10 + add r2, sp, #8 + add r3, sp, #0xc + bl ov22_022596B0 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + ldr r3, [sp, #0xc] + add r2, r0, r1 + mov r1, #0x8a + sub r2, r1, r2 + ldr r1, [sp, #0x20] + add r1, r0, r1 + ldr r0, [sp, #8] + sub r1, r1, r0 + ldr r0, [sp, #0x14] + sub r1, #0xf6 + add r6, r0, r3 + mov r3, #0x12 + sub r3, r3, r6 + ldr r6, [sp, #0x1c] + add r6, r0, r6 + ldr r0, [sp, #4] + sub r6, r6, r0 + sub r6, #0x8f + cmp r2, #0 + ble _02257F24 + str r2, [r5, #0] + b _02257F32 +_02257F24: + cmp r1, #0 + ble _02257F2E + neg r0, r1 + str r0, [r5, #0] + b _02257F32 +_02257F2E: + mov r0, #0 + str r0, [r5, #0] +_02257F32: + cmp r3, #0 + ble _02257F3C + add sp, #0x24 + str r3, [r4, #0] + pop {r3, r4, r5, r6, pc} +_02257F3C: + cmp r6, #0 + ble _02257F48 + neg r0, r6 + add sp, #0x24 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_02257F48: + mov r0, #0 + str r0, [r4, #0] + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov22_02257EC8 \ No newline at end of file diff --git a/asm/ov22_02257F50.s b/asm/ov22_02257F50.s new file mode 100644 index 000000000..faccd54c8 --- /dev/null +++ b/asm/ov22_02257F50.s @@ -0,0 +1,1387 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02257F50 +ov22_02257F50: ; 0x02257F50 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + str r1, [r5, #0x44] + ldr r1, [r4, #4] + str r1, [r5, #0x48] + ldr r1, [r4, #8] + str r1, [r5, #0x4c] + ldr r1, [r4, #0xc] + str r1, [r5, #0x50] + ldr r1, [r4, #0x10] + str r1, [r5, #0x54] + ldr r1, [r4, #0x14] + str r1, [r5, #0x58] + ldr r1, [r4, #0x18] + str r1, [r5, #8] + ldr r1, [r4, #0x28] + str r1, [r5, #4] + mov r1, #0 + bl ov22_02258354 + add r0, r5, #0 + add r1, r4, #0 + bl ov22_02258470 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02257F50 + + thumb_func_start ov22_02257F88 +ov22_02257F88: ; 0x02257F88 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl ov22_022581C0 + add r5, r6, #0 + mov r4, #0 + add r5, #0xc +_02257F96: + add r0, r5, #0 + bl ov22_02258534 + add r4, r4, #1 + add r5, #0xc + cmp r4, #4 + blt _02257F96 + add r0, r6, #0 + mov r1, #0 + mov r2, #0x8c + bl sub_020D5124 + pop {r4, r5, r6, pc} + thumb_func_end ov22_02257F88 + + thumb_func_start ov22_02257FB0 +ov22_02257FB0: ; 0x02257FB0 + push {r3, lr} + cmp r0, #0 + beq _02257FC0 + cmp r0, #1 + beq _02258030 + cmp r0, #2 + beq _0225803E + pop {r3, pc} +_02257FC0: + cmp r1, #5 + bgt _02257FC8 + mov r0, #0 + pop {r3, pc} +_02257FC8: + cmp r1, #0xb + bgt _02257FD0 + mov r0, #1 + pop {r3, pc} +_02257FD0: + cmp r1, #0x11 + bgt _02257FD8 + mov r0, #2 + pop {r3, pc} +_02257FD8: + cmp r1, #0x15 + bgt _02257FE0 + mov r0, #3 + pop {r3, pc} +_02257FE0: + cmp r1, #0x1c + bgt _02257FE8 + mov r0, #4 + pop {r3, pc} +_02257FE8: + cmp r1, #0x21 + bgt _02257FF0 + mov r0, #5 + pop {r3, pc} +_02257FF0: + cmp r1, #0x26 + bgt _02257FF8 + mov r0, #6 + pop {r3, pc} +_02257FF8: + cmp r1, #0x2a + bgt _02258000 + mov r0, #7 + pop {r3, pc} +_02258000: + cmp r1, #0x31 + bgt _02258008 + mov r0, #8 + pop {r3, pc} +_02258008: + cmp r1, #0x37 + bgt _02258010 + mov r0, #9 + pop {r3, pc} +_02258010: + cmp r1, #0x3c + bgt _02258018 + mov r0, #0xa + pop {r3, pc} +_02258018: + cmp r1, #0x47 + bgt _02258020 + mov r0, #0xb + pop {r3, pc} +_02258020: + cmp r1, #0x5b + bgt _02258028 + mov r0, #0xc + pop {r3, pc} +_02258028: + cmp r1, #0x63 + bgt _0225804A + mov r0, #0xd + pop {r3, pc} +_02258030: + add r0, r2, #0 + bl ov22_022589BC + mov r1, #9 + bl sub_020E1F6C + pop {r3, pc} +_0225803E: + add r0, r2, #0 + bl ov22_022589BC + mov r1, #9 + bl sub_020E1F6C +_0225804A: + pop {r3, pc} + thumb_func_end ov22_02257FB0 + + thumb_func_start ov22_0225804C +ov22_0225804C: ; 0x0225804C + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + cmp r0, #0 + beq _02258060 + cmp r0, #1 + beq _02258092 + cmp r0, #2 + beq _02258092 + pop {r3, r4, r5, pc} +_02258060: + mov r0, #0xa + str r0, [r5, #0] + mov r0, #0x12 + str r0, [r4, #0] + bl sub_0201D35C + ldr r2, [sp, #0x10] + mov r1, #0x6c + sub r1, r1, r2 + bl sub_020E2178 + ldr r0, [r5, #0] + add r0, r0, r1 + str r0, [r5, #0] + bl sub_0201D35C + ldr r2, [sp, #0x14] + mov r1, #0x7d + sub r1, r1, r2 + bl sub_020E2178 + ldr r0, [r4, #0] + add r0, r0, r1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02258092: + ldr r0, [sp, #0x18] + bl ov22_022589BC + add r1, r5, #0 + add r2, r4, #0 + bl ov22_02258610 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_0225804C + + thumb_func_start ov22_022580A4 +ov22_022580A4: ; 0x022580A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + add r5, r0, #0 + ldr r0, [r5, #0x58] + add r4, r2, #0 + str r4, [sp, #0x40] + str r0, [sp, #0x28] + ldr r0, [r5, #0x44] + add r6, r1, #0 + mov r1, #0 + str r0, [sp, #0x2c] + str r1, [sp, #0x38] + str r1, [sp, #0x3c] + cmp r6, #0 + beq _022580CC + cmp r6, #1 + beq _022580D8 + cmp r6, #2 + beq _022580E6 + b _022580F4 +_022580CC: + ldr r0, [r5, #0x50] + str r4, [sp, #0xc] + ldrb r0, [r0, r4] + add r7, r1, #0 + str r0, [sp, #0x44] + b _022580F8 +_022580D8: + add r0, r4, #0 + str r0, [sp, #0xc] + add r0, #0x64 + str r0, [sp, #0xc] + add r7, r4, #1 + str r1, [sp, #0x44] + b _022580F8 +_022580E6: + add r0, r4, #0 + str r0, [sp, #0xc] + add r0, #0x64 + str r0, [sp, #0xc] + add r7, r4, #1 + str r1, [sp, #0x44] + b _022580F8 +_022580F4: + bl sub_02022974 +_022580F8: + ldr r0, [sp, #0xc] + ldr r1, [r5, #0x48] + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r1, r7, #2 + str r0, [sp, #0x30] + ldr r2, [r5, #0x4c] + cmp r0, #0 + ldr r1, [r2, r1] + str r1, [sp, #0x34] + bne _02258112 + bl sub_02022974 +_02258112: + ldr r0, [sp, #0x34] + cmp r0, #0 + bne _0225811C + bl sub_02022974 +_0225811C: + ldr r2, [r5, #4] + add r0, r6, #0 + add r1, r4, #0 + bl ov22_02257FB0 + add r7, r0, #0 + add r0, sp, #0x28 + bl ov22_02254E20 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + ldr r1, [sp, #0x10] + add r2, r6, #0 + bl ov22_022594C0 + mov r1, #0xc + mul r1, r6 + add r1, r5, r1 + ldr r2, [r1, #0xc] + lsl r1, r7, #4 + add r1, r2, r1 + ldr r1, [r1, #0xc] + str r0, [sp, #0x14] + bl ov22_02259520 + ldr r0, [sp, #0x14] + add r1, sp, #0x1c + add r2, sp, #0x18 + bl ov22_02259698 + ldr r0, [sp, #0x1c] + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0x18] + add r2, sp, #0x24 + str r0, [sp, #4] + ldr r0, [r5, #4] + add r3, sp, #0x20 + str r0, [sp, #8] + add r0, r6, #0 + bl ov22_0225804C + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + bl ov22_022595F8 + ldr r1, [sp, #0x10] + add r0, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov22_022585E8 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022580A4 + + thumb_func_start ov22_0225818C +ov22_0225818C: ; 0x0225818C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #0xc + add r5, r0, #0 + mul r1, r4 + add r7, r3, #0 + add r1, r5, r1 + add r6, r2, #0 + ldr r2, [r1, #0xc] + lsl r1, r6, #4 + add r0, r7, #0 + add r1, r2, r1 + bl ov22_02259520 + ldr r1, [r7, #0] + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov22_022585E8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225818C + + thumb_func_start ov22_022581B8 +ov22_022581B8: ; 0x022581B8 + ldr r3, _022581BC ; =ov22_02259530 + bx r3 + ; .align 2, 0 +_022581BC: .word ov22_02259530 + thumb_func_end ov22_022581B8 + + thumb_func_start ov22_022581C0 +ov22_022581C0: ; 0x022581C0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r7, #0 +_022581C6: + ldr r0, [r5, #0x10] + mov r6, #0 + cmp r0, #0 + ble _022581E2 + add r4, r6, #0 +_022581D0: + ldr r0, [r5, #0xc] + add r0, r0, r4 + bl ov22_02259540 + ldr r0, [r5, #0x10] + add r6, r6, #1 + add r4, #0x10 + cmp r6, r0 + blt _022581D0 +_022581E2: + add r7, r7, #1 + add r5, #0xc + cmp r7, #3 + blt _022581C6 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_022581C0 + + thumb_func_start ov22_022581EC +ov22_022581EC: ; 0x022581EC + push {r4, r5, r6, lr} + mov r5, #0 + mvn r5, r5 + bl ov22_0225855C + add r6, r0, #0 + ldr r4, [r6, #8] + cmp r4, r6 + beq _02258214 +_022581FE: + ldr r0, [r4, #4] + cmp r0, #2 + bhi _0225820C + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov22_02254F6C +_0225820C: + ldr r4, [r4, #8] + sub r5, r5, #1 + cmp r4, r6 + bne _022581FE +_02258214: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_022581EC + + thumb_func_start ov22_02258218 +ov22_02258218: ; 0x02258218 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0x3c] + add r4, r2, #0 + cmp r1, #0 + bne _02258250 + ldr r1, [r5, #0] + mov r2, #0xc + mul r2, r1 + str r4, [sp] + add r2, r5, r2 + ldr r2, [r2, #0x14] + add r3, r6, #0 + bl ov22_0225864C + mov r0, #0xc + mul r0, r6 + str r6, [r5, #0] + add r0, r5, r0 + str r4, [r0, #0x14] + add r0, r5, #0 + bl ov22_022581EC + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_02258250: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_02258218 + + thumb_func_start ov22_02258258 +ov22_02258258: ; 0x02258258 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r1, [sp, #4] + str r0, [sp] + str r2, [sp, #8] + bl ov22_02258424 + add r7, r0, #0 + ldr r0, [sp, #4] + mov r1, #0xc + mul r1, r0 + ldr r0, [sp] + mov r4, #1 + add r6, r0, r1 + ldr r0, [r6, #0x10] + cmp r0, #1 + ble _022582BA +_0225827A: + ldr r0, [sp, #8] + cmp r0, #0 + bne _0225828C + ldr r1, [r6, #0x10] + add r0, r4, r7 + bl sub_020E1F6C + add r5, r1, #0 + b _02258294 +_0225828C: + sub r5, r7, r4 + bpl _02258294 + ldr r0, [r6, #0x10] + add r5, r5, r0 +_02258294: + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r5, #0 + bl ov22_02258584 + ldr r1, [r0, #8] + cmp r1, r0 + beq _022582B2 + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r5, #0 + bl ov22_02258218 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_022582B2: + ldr r0, [r6, #0x10] + add r4, r4, #1 + cmp r4, r0 + blt _0225827A +_022582BA: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_02258258 + + thumb_func_start ov22_022582C0 +ov22_022582C0: ; 0x022582C0 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + add r6, r2, #0 + bl ov22_022584E0 + mov r0, #0xc + mul r0, r4 + str r4, [r5, #0] + add r0, r5, r0 + str r6, [r0, #0x14] + add r0, r5, #0 + mov r1, #1 + bl ov22_022584E0 + add r0, r5, #0 + bl ov22_022581EC + pop {r4, r5, r6, pc} + thumb_func_end ov22_022582C0 + + thumb_func_start ov22_022582E8 +ov22_022582E8: ; 0x022582E8 + push {r3, lr} + mov r1, #0x12 + add r0, sp, #0 + strb r1, [r0] + mov r1, #0x8f + strb r1, [r0, #1] + mov r1, #0xa + strb r1, [r0, #2] + mov r1, #0x76 + strb r1, [r0, #3] + add r0, sp, #0 + bl sub_02022734 + pop {r3, pc} + thumb_func_end ov22_022582E8 + + thumb_func_start ov22_02258304 +ov22_02258304: ; 0x02258304 + push {r3, lr} + mov r3, #0x12 + add r0, sp, #0 + strb r3, [r0] + mov r3, #0x8f + strb r3, [r0, #1] + mov r3, #0xa + strb r3, [r0, #2] + mov r3, #0x76 + strb r3, [r0, #3] + add r0, sp, #0 + bl sub_02022830 + pop {r3, pc} + thumb_func_end ov22_02258304 + + thumb_func_start ov22_02258320 +ov22_02258320: ; 0x02258320 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + bl ov22_0225855C + add r5, r0, #0 + ldr r4, [r5, #8] + cmp r4, r5 + beq _0225834E +_02258334: + ldr r3, [sp] + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov22_022595AC + cmp r0, #1 + bne _02258348 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_02258348: + ldr r4, [r4, #8] + cmp r4, r5 + bne _02258334 +_0225834E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02258320 + + thumb_func_start ov22_02258354 +ov22_02258354: ; 0x02258354 + push {r3, r4, r5, lr} + sub sp, #0x30 + add r5, r0, #0 + ldr r0, [r5, #0x54] + add r4, r1, #0 + str r0, [sp] + mov r0, #0x19 + lsl r1, r4, #1 + str r0, [sp, #4] + add r0, r1, #0 + add r0, #0x81 + str r0, [sp, #8] + mov r0, #0x85 + str r0, [sp, #0xc] + mov r0, #8 + str r0, [sp, #0x14] + mov r0, #0x81 + str r0, [sp, #0x18] + mov r0, #3 + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp, #0x20] + mov r0, #2 + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp, #0x28] + mov r0, #0xe + add r1, #0x82 + str r0, [sp, #0x2c] + add r0, r5, #0 + str r1, [sp, #0x10] + add r0, #0x5c + add r1, sp, #0 + bl ov22_022597BC + str r4, [r5, #0x40] + add sp, #0x30 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02258354 + + thumb_func_start ov22_022583A0 +ov22_022583A0: ; 0x022583A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + ldr r0, [r5, #0x54] + add r4, r1, #0 + str r0, [sp, #8] + mov r0, #0x19 + lsl r1, r4, #1 + str r0, [sp, #0xc] + add r0, r1, #0 + add r0, #0x81 + str r0, [sp, #0x10] + mov r0, #0x85 + str r0, [sp, #0x14] + mov r0, #8 + add r1, #0x82 + str r0, [sp, #0x1c] + mov r0, #0x81 + str r1, [sp, #0x18] + str r0, [sp, #0x20] + mov r0, #3 + mov r1, #2 + str r0, [sp, #0x24] + mov r0, #1 + str r1, [sp, #0x2c] + mov r7, #0 + mov r1, #0xe + str r0, [sp, #0x28] + str r7, [sp, #0x30] + str r1, [sp, #0x34] + tst r0, r2 + beq _022583E2 + mov r7, #0x70 +_022583E2: + mov r0, #2 + tst r0, r2 + beq _022583EC + mov r6, #0x81 + b _022583EE +_022583EC: + mov r6, #0 +_022583EE: + ldr r0, [sp, #0x50] + str r3, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x5c + add r1, sp, #8 + add r2, r7, #0 + add r3, r6, #0 + bl ov22_022598F4 + str r4, [r5, #0x40] + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_022583A0 + + thumb_func_start ov22_02258408 +ov22_02258408: ; 0x02258408 + ldr r3, _02258410 ; =ov22_02259804 + add r0, #0x5c + bx r3 + nop +_02258410: .word ov22_02259804 + thumb_func_end ov22_02258408 + + thumb_func_start ov22_02258414 +ov22_02258414: ; 0x02258414 + push {r4, lr} + add r4, r0, #0 + bne _0225841E + bl sub_02022974 +_0225841E: + ldr r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02258414 + + thumb_func_start ov22_02258424 +ov22_02258424: ; 0x02258424 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _02258434 + bl sub_02022974 +_02258434: + mov r0, #0xc + mul r0, r4 + add r3, r5, r0 + add r3, #0xc + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #8] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov22_02258424 + + thumb_func_start ov22_0225844C +ov22_0225844C: ; 0x0225844C + push {r4, lr} + add r4, r3, #0 + bl ov22_02258584 + ldr r2, [sp, #8] + add r1, r4, #0 + bl ov22_022596EC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225844C + + thumb_func_start ov22_02258460 +ov22_02258460: ; 0x02258460 + ldr r0, [r0, #0x3c] + cmp r0, #0 + bne _0225846A + mov r0, #1 + bx lr +_0225846A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov22_02258460 + + thumb_func_start ov22_02258470 +ov22_02258470: ; 0x02258470 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0x1c] + add r5, r0, #0 + add r0, #0xc + bl ov22_022584F0 + mov r0, #0 + str r0, [r5, #0] + ldr r0, [r5, #0xc] + mov r1, #1 + bl ov22_022584AC + add r0, r5, #0 + ldr r1, [r4, #0x20] + add r0, #0x18 + bl ov22_022584F0 + add r0, r5, #0 + ldr r1, [r4, #0x24] + add r0, #0x24 + bl ov22_022584F0 + add r5, #0x30 + add r0, r5, #0 + mov r1, #1 + bl ov22_022584F0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02258470 + + thumb_func_start ov22_022584AC +ov22_022584AC: ; 0x022584AC + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r4, [r5, #8] + add r6, r1, #0 + cmp r4, r5 + beq _022584CC +_022584B8: + ldr r0, [r4, #4] + cmp r0, #2 + bhi _022584C6 + ldr r0, [r4, #0] + add r1, r6, #0 + bl ov22_02254F60 +_022584C6: + ldr r4, [r4, #8] + cmp r4, r5 + bne _022584B8 +_022584CC: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_022584AC + + thumb_func_start ov22_022584D0 +ov22_022584D0: ; 0x022584D0 + push {r4, lr} + add r4, r3, #0 + bl ov22_02258584 + add r1, r4, #0 + bl ov22_022584AC + pop {r4, pc} + thumb_func_end ov22_022584D0 + + thumb_func_start ov22_022584E0 +ov22_022584E0: ; 0x022584E0 + push {r4, lr} + add r4, r1, #0 + bl ov22_0225855C + add r1, r4, #0 + bl ov22_022584AC + pop {r4, pc} + thumb_func_end ov22_022584E0 + + thumb_func_start ov22_022584F0 +ov22_022584F0: ; 0x022584F0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r0, #0xe + lsl r1, r4, #4 + bl sub_02018144 + str r0, [r5, #0] + str r4, [r5, #4] + mov r6, #0 + str r6, [r5, #8] + ldr r0, [r5, #4] + cmp r0, #0 + ble _02258530 + add r4, r6, #0 + add r7, r6, #0 +_02258510: + ldr r0, [r5, #0] + add r1, r7, #0 + add r0, r0, r4 + str r0, [r0, #8] + ldr r0, [r5, #0] + add r0, r0, r4 + str r0, [r0, #0xc] + ldr r0, [r5, #0] + add r0, r0, r4 + bl ov22_022584AC + ldr r0, [r5, #4] + add r6, r6, #1 + add r4, #0x10 + cmp r6, r0 + blt _02258510 +_02258530: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022584F0 + + thumb_func_start ov22_02258534 +ov22_02258534: ; 0x02258534 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + pop {r4, pc} + thumb_func_end ov22_02258534 + + thumb_func_start ov22_0225855C +ov22_0225855C: ; 0x0225855C + push {r3} + sub sp, #0xc + ldr r2, [r0, #0] + mov r1, #0xc + mul r1, r2 + add r3, r0, r1 + add r3, #0xc + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #8] + ldr r1, [sp] + lsl r0, r0, #4 + add r0, r1, r0 + add sp, #0xc + pop {r3} + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225855C + + thumb_func_start ov22_02258584 +ov22_02258584: ; 0x02258584 + push {r4} + sub sp, #0xc + mov r3, #0xc + mul r3, r1 + add r4, r0, r3 + add r4, #0xc + ldmia r4!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + ldr r1, [sp] + lsl r0, r2, #4 + add r0, r1, r0 + add sp, #0xc + pop {r4} + bx lr + ; .align 2, 0 + thumb_func_end ov22_02258584 + + thumb_func_start ov22_022585A8 +ov22_022585A8: ; 0x022585A8 + push {r4, lr} + mov r4, #0 + bl ov22_02258584 + ldr r1, [r0, #8] + cmp r1, r0 + beq _022585BE +_022585B6: + ldr r1, [r1, #8] + add r4, r4, #1 + cmp r1, r0 + bne _022585B6 +_022585BE: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022585A8 + + thumb_func_start ov22_022585C4 +ov22_022585C4: ; 0x022585C4 + push {r3, r4, r5, lr} + add r5, r3, #0 + mov r4, #0 + bl ov22_02258584 + ldr r1, [r0, #8] + cmp r1, r0 + beq _022585E4 +_022585D4: + cmp r4, r5 + bne _022585DC + add r0, r1, #0 + pop {r3, r4, r5, pc} +_022585DC: + ldr r1, [r1, #8] + add r4, r4, #1 + cmp r1, r0 + bne _022585D4 +_022585E4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov22_022585C4 + + thumb_func_start ov22_022585E8 +ov22_022585E8: ; 0x022585E8 + push {r4, lr} + ldr r4, [r0, #0] + cmp r4, r2 + bne _022585FC + mov r4, #0xc + mul r4, r2 + add r0, r0, r4 + ldr r0, [r0, #0x14] + cmp r3, r0 + beq _02258606 +_022585FC: + add r0, r1, #0 + mov r1, #0 + bl ov22_02254F60 + pop {r4, pc} +_02258606: + add r0, r1, #0 + mov r1, #1 + bl ov22_02254F60 + pop {r4, pc} + thumb_func_end ov22_022585E8 + + thumb_func_start ov22_02258610 +ov22_02258610: ; 0x02258610 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #9 + add r4, r2, #0 + bl sub_020E1F6C + add r7, r1, #0 + add r0, r7, #0 + mov r1, #3 + bl sub_020E1F6C + add r6, r0, #0 + add r0, r7, #0 + mov r1, #3 + bl sub_020E1F6C + add r0, r6, #1 + lsl r2, r0, #3 + lsl r0, r6, #5 + add r0, r2, r0 + add r0, #0x10 + str r0, [r4, #0] + add r0, r1, #1 + lsl r2, r0, #3 + mov r0, #0x18 + mul r0, r1 + add r0, r2, r0 + add r0, #8 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_02258610 + + thumb_func_start ov22_0225864C +ov22_0225864C: ; 0x0225864C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + ldr r0, _022586C0 ; =ov22_022586C4 + mov r1, #0x30 + mov r2, #0 + mov r3, #0xd + bl sub_0200679C + bl sub_0201CED0 + add r4, r0, #0 + str r5, [r4, #0] + str r6, [r4, #4] + ldr r0, [sp] + str r7, [r4, #8] + str r0, [r4, #0xc] + ldr r0, [sp, #0x18] + add r1, r6, #0 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x1c] + add r0, r5, #0 + add r2, r7, #0 + bl ov22_022585A8 + str r0, [r4, #0x20] + ldr r1, [sp] + ldr r2, [sp, #0x18] + add r0, r5, #0 + bl ov22_022585A8 + str r0, [r4, #0x24] + ldr r1, [r4, #0x20] + add r2, r1, r0 + mov r1, #0xc + mov r0, #0xd + mul r1, r2 + str r2, [r4, #0x2c] + bl sub_02018144 + str r0, [r4, #0x28] + cmp r0, #0 + bne _022586AC + bl sub_02022974 +_022586AC: + ldr r3, [r4, #0x2c] + mov r2, #0xc + ldr r0, [r4, #0x28] + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + mov r0, #1 + str r0, [r5, #0x3c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022586C0: .word ov22_022586C4 + thumb_func_end ov22_0225864C + + thumb_func_start ov22_022586C4 +ov22_022586C4: ; 0x022586C4 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #4 + bls _022586D4 + b _0225881C +_022586D4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022586E0: ; jump table + .short _022586EA - _022586E0 - 2 ; case 0 + .short _0225873E - _022586E0 - 2 ; case 1 + .short _0225878A - _022586E0 - 2 ; case 2 + .short _022587D0 - _022586E0 - 2 ; case 3 + .short _022587E8 - _022586E0 - 2 ; case 4 +_022586EA: + mov r0, #0x83 + mvn r0, r0 + str r0, [sp] + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x10] + mov r3, #0 + bl ov22_0225844C + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x10] + mov r3, #1 + bl ov22_022584D0 + mov r0, #0 + str r0, [r4, #0x14] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + str r1, [sp] + ldr r1, [r0, #0x40] + add r1, r1, #1 + lsr r3, r1, #0x1f + lsl r2, r1, #0x1f + sub r2, r2, r3 + mov r1, #0x1f + ror r2, r1 + add r1, r3, r2 + mov r2, #2 + mov r3, #5 + bl ov22_022583A0 + ldr r0, [r4, #0x20] + mov r1, #1 + bl ov22_022588D8 + str r0, [r4, #0x18] + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + b _02258820 +_0225873E: + ldr r0, [r4, #0x18] + mov r6, #0 + cmp r0, #0 + ble _02258772 + add r5, r4, #0 + add r5, #0x20 +_0225874A: + ldr r0, [r4, #0x20] + sub r0, r0, #1 + bmi _0225876A + ldr r0, [r5, #0] + sub r0, r0, #1 + str r0, [r5, #0] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0x20] + bl ov22_022585C4 + ldr r1, [r4, #0x28] + ldr r2, [r4, #0x2c] + bl ov22_0225882C +_0225876A: + ldr r0, [r4, #0x18] + add r6, r6, #1 + cmp r6, r0 + blt _0225874A +_02258772: + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _02258820 + ldr r0, [r4, #0x24] + mov r1, #2 + bl ov22_022588D8 + str r0, [r4, #0x18] + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + b _02258820 +_0225878A: + ldr r0, [r4, #0x18] + mov r6, #0 + cmp r0, #0 + ble _022587BE + add r5, r4, #0 + add r5, #0x24 +_02258796: + ldr r0, [r4, #0x24] + sub r0, r0, #1 + bmi _022587B6 + ldr r0, [r5, #0] + sub r0, r0, #1 + str r0, [r5, #0] + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x10] + ldr r3, [r4, #0x24] + bl ov22_022585C4 + ldr r1, [r4, #0x28] + ldr r2, [r4, #0x2c] + bl ov22_0225882C +_022587B6: + ldr r0, [r4, #0x18] + add r6, r6, #1 + cmp r6, r0 + blt _02258796 +_022587BE: + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _02258820 + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0x18] + b _02258820 +_022587D0: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + cmp r0, #3 + ble _02258820 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _02258820 + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + b _02258820 +_022587E8: + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + mov r3, #0 + bl ov22_022584D0 + mov r0, #0x83 + mvn r0, r0 + str r0, [sp] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + mov r3, #0 + bl ov22_0225844C + ldr r0, [r4, #0] + mov r1, #0 + str r1, [r0, #0x3c] + ldr r0, [r4, #0x28] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020067D0 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0225881C: + bl sub_02022974 +_02258820: + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x2c] + bl ov22_0225886C + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov22_022586C4 + + thumb_func_start ov22_0225882C +ov22_0225882C: ; 0x0225882C + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + bl ov22_02258844 + str r4, [r0, #0] + mov r1, #3 + str r1, [r0, #4] + mov r1, #0x2c + str r1, [r0, #8] + pop {r4, pc} + thumb_func_end ov22_0225882C + + thumb_func_start ov22_02258844 +ov22_02258844: ; 0x02258844 + push {r3, r4} + mov r3, #0 + cmp r1, #0 + ble _02258866 + add r4, r0, #0 +_0225884E: + ldr r2, [r4, #0] + cmp r2, #0 + bne _0225885E + mov r1, #0xc + mul r1, r3 + add r0, r0, r1 + pop {r3, r4} + bx lr +_0225885E: + add r3, r3, #1 + add r4, #0xc + cmp r3, r1 + blt _0225884E +_02258866: + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov22_02258844 + + thumb_func_start ov22_0225886C +ov22_0225886C: ; 0x0225886C + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + mov r4, #0 + cmp r6, #0 + ble _0225888C +_02258878: + ldr r0, [r5, #0] + cmp r0, #0 + beq _02258884 + add r0, r5, #0 + bl ov22_02258890 +_02258884: + add r4, r4, #1 + add r5, #0xc + cmp r4, r6 + blt _02258878 +_0225888C: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_0225886C + + thumb_func_start ov22_02258890 +ov22_02258890: ; 0x02258890 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259648 + ldr r1, [sp] + ldr r0, [r4, #8] + add r2, r1, r0 + str r2, [sp] + ldr r0, [r4, #0] + ldr r1, [sp, #4] + bl ov22_022595F8 + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0 + bgt _022588D4 + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] +_022588D4: + add sp, #8 + pop {r4, pc} + thumb_func_end ov22_02258890 + + thumb_func_start ov22_022588D8 +ov22_022588D8: ; 0x022588D8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl sub_020E1F6C + sub r0, r4, r1 + add r0, r5, r0 + add r1, r4, #0 + bl sub_020E1F6C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_022588D8 \ No newline at end of file diff --git a/asm/ov22_022588F0.s b/asm/ov22_022588F0.s new file mode 100644 index 000000000..5e86aca56 --- /dev/null +++ b/asm/ov22_022588F0.s @@ -0,0 +1,69 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_022588F0 +ov22_022588F0: ; 0x022588F0 + add r3, r0, #0 + mov r2, #0x1c + mov r1, #0 +_022588F6: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _022588F6 + ldr r1, _02258908 ; =ov22_02258948 + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 +_02258908: .word ov22_02258948 + thumb_func_end ov22_022588F0 + + thumb_func_start ov22_0225890C +ov22_0225890C: ; 0x0225890C + push {r4, lr} + ldr r1, _02258944 ; =0x021BF6BC + add r4, r0, #0 + ldrh r2, [r1, #0x20] + cmp r2, #0 + beq _0225891E + ldr r1, [r4, #4] + blx r1 + b _02258934 +_0225891E: + ldrh r1, [r1, #0x22] + cmp r1, #0 + beq _0225892A + ldr r1, [r4, #0xc] + blx r1 + b _02258934 +_0225892A: + ldrb r1, [r4, #0x18] + cmp r1, #0 + beq _02258934 + ldr r1, [r4, #8] + blx r1 +_02258934: + ldr r0, _02258944 ; =0x021BF6BC + ldrh r1, [r0, #0x1c] + strh r1, [r4, #0x14] + ldrh r1, [r0, #0x1e] + strh r1, [r4, #0x16] + ldrh r0, [r0, #0x22] + strb r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 +_02258944: .word 0x021BF6BC + thumb_func_end ov22_0225890C + + thumb_func_start ov22_02258948 +ov22_02258948: ; 0x02258948 + bx lr + ; .align 2, 0 + thumb_func_end ov22_02258948 \ No newline at end of file diff --git a/asm/ov22_0225894C.s b/asm/ov22_0225894C.s new file mode 100644 index 000000000..33bf1f648 --- /dev/null +++ b/asm/ov22_0225894C.s @@ -0,0 +1,101 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_0225894C +ov22_0225894C: ; 0x0225894C + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r6, r0, #0 + mov r4, #0 + add r5, r7, #0 +_02258956: + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029D94 + add r4, r4, #1 + stmia r5!, {r0} + cmp r4, #0x64 + blt _02258956 + mov r0, #0x19 + mov r3, #0 + add r2, r7, #0 + mov r1, #0x12 + lsl r0, r0, #4 +_02258970: + add r3, r3, #1 + str r1, [r2, r0] + add r2, r2, #4 + cmp r3, #0x12 + blt _02258970 + mov r5, #0x19 + mov r4, #0 + lsl r5, r5, #4 +_02258980: + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029DD4 + cmp r0, #0x12 + beq _02258992 + lsl r0, r0, #2 + add r0, r7, r0 + str r4, [r0, r5] +_02258992: + add r4, r4, #1 + cmp r4, #0x12 + blt _02258980 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225894C + + thumb_func_start ov22_0225899C +ov22_0225899C: ; 0x0225899C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #0x64 + blo _022589AA + bl sub_02022974 +_022589AA: + lsl r0, r5, #2 + ldr r0, [r4, r0] + pop {r3, r4, r5, pc} + thumb_func_end ov22_0225899C + + thumb_func_start ov22_022589B0 +ov22_022589B0: ; 0x022589B0 + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bx lr + thumb_func_end ov22_022589B0 + + thumb_func_start ov22_022589BC +ov22_022589BC: ; 0x022589BC + push {r3, r4} + mov r2, #0x19 + mov r4, #0 + lsl r2, r2, #4 +_022589C4: + ldr r3, [r0, r2] + cmp r1, r3 + bne _022589D0 + add r0, r4, #0 + pop {r3, r4} + bx lr +_022589D0: + add r4, r4, #1 + add r0, r0, #4 + cmp r4, #0x12 + blt _022589C4 + add r0, r4, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov22_022589BC \ No newline at end of file diff --git a/asm/ov22_022589E0.s b/asm/ov22_022589E0.s new file mode 100644 index 000000000..6bbd61d61 --- /dev/null +++ b/asm/ov22_022589E0.s @@ -0,0 +1,872 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_022589E0 +ov22_022589E0: ; 0x022589E0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov22_022588F0 + mov r0, #0xd + mov r1, #0x34 + bl sub_02018144 + str r0, [r5, #0] + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + ldr r1, [r5, #0] + ldr r0, [sp, #0x18] + str r4, [r1, #4] + str r6, [r1, #8] + str r7, [r1, #0] + str r0, [r1, #0xc] + ldr r0, [sp, #0x1c] + str r0, [r1, #0x2c] + ldr r0, _02258A24 ; =ov22_02258A48 + str r0, [r5, #4] + ldr r0, _02258A28 ; =ov22_02258BB8 + str r0, [r5, #8] + ldr r0, _02258A2C ; =ov22_02258D4C + str r0, [r5, #0xc] + ldr r0, _02258A30 ; =ov22_02258A34 + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} + nop +_02258A24: .word ov22_02258A48 +_02258A28: .word ov22_02258BB8 +_02258A2C: .word ov22_02258D4C +_02258A30: .word ov22_02258A34 + thumb_func_end ov22_022589E0 + + thumb_func_start ov22_02258A34 +ov22_02258A34: ; 0x02258A34 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r4, #0 + bl ov22_022588F0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02258A34 + + thumb_func_start ov22_02258A48 +ov22_02258A48: ; 0x02258A48 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #4] + bl ov22_02257BE8 + cmp r0, #0 + beq _02258ACA + ldr r3, [r4, #0] + ldr r0, [r4, #4] + ldr r3, [r3, #0x38] + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02257C20 + add r6, r0, #0 + beq _02258A7A + ldr r0, [r6, #4] + cmp r0, #3 + bne _02258A7A + ldr r0, [r4, #0x2c] + cmp r0, #0 + bne _02258A7A + mov r6, #0 +_02258A7A: + cmp r6, #0 + beq _02258B06 + ldr r0, [r6, #4] + cmp r0, #0 + bne _02258A90 + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov22_02257A80 + mov r7, #0 + b _02258AAC +_02258A90: + add r0, r6, #0 + bl ov22_022579E8 + ldr r0, [r6, #0] + bl ov22_022591E0 + add r1, r4, #0 + add r2, r4, #0 + add r7, r0, #0 + add r0, r6, #0 + add r1, #0x24 + add r2, #0x28 + bl ov22_02259648 +_02258AAC: + ldr r0, [r4, #4] + bl ov22_02257B10 + ldr r0, [sp, #8] + add r1, r6, #0 + str r0, [sp] + str r7, [sp, #4] + ldr r3, [sp, #0xc] + add r0, r4, #0 + mov r2, #1 + bl ov22_02258E88 + bl ov22_02255390 + b _02258B06 +_02258ACA: + ldr r0, [r4, #8] + bl ov22_022582E8 + cmp r0, #0 + beq _02258B06 + ldr r3, [r4, #0] + ldr r0, [r4, #8] + ldr r3, [r3, #0x38] + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02258320 + add r6, r0, #0 + beq _02258B06 + bl ov22_022581B8 + ldr r0, [r4, #8] + bl ov22_022581EC + ldr r0, [sp, #8] + mov r2, #0 + str r0, [sp] + str r2, [sp, #4] + ldr r3, [sp, #0xc] + add r0, r4, #0 + add r1, r6, #0 + bl ov22_02258E88 + bl ov22_02255390 +_02258B06: + ldr r1, [r4, #0x10] + cmp r1, #0 + beq _02258B50 + ldr r1, [r1, #4] + ldr r0, _02258B54 ; =0x000005EB + cmp r1, #0 + beq _02258B1E + cmp r1, #1 + beq _02258B28 + cmp r1, #3 + beq _02258B3A + b _02258B42 +_02258B1E: + ldr r1, _02258B58 ; =ov22_02258BB8 + str r1, [r5, #8] + ldr r1, _02258B5C ; =ov22_02258D4C + str r1, [r5, #0xc] + b _02258B42 +_02258B28: + ldr r0, _02258B60 ; =ov22_02258B78 + str r0, [r5, #8] + ldr r0, _02258B64 ; =ov22_02258B74 + str r0, [r5, #0xc] + add r0, r5, #0 + bl ov22_02258E5C + ldr r0, _02258B68 ; =0x0000067E + b _02258B42 +_02258B3A: + ldr r1, _02258B6C ; =ov22_02258D7C + str r1, [r5, #8] + ldr r1, _02258B70 ; =ov22_02258DAC + str r1, [r5, #0xc] +_02258B42: + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 + add r0, r4, #0 + bl ov22_02259040 +_02258B50: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02258B54: .word 0x000005EB +_02258B58: .word ov22_02258BB8 +_02258B5C: .word ov22_02258D4C +_02258B60: .word ov22_02258B78 +_02258B64: .word ov22_02258B74 +_02258B68: .word 0x0000067E +_02258B6C: .word ov22_02258D7C +_02258B70: .word ov22_02258DAC + thumb_func_end ov22_02258A48 + + thumb_func_start ov22_02258B74 +ov22_02258B74: ; 0x02258B74 + bx lr + ; .align 2, 0 + thumb_func_end ov22_02258B74 + + thumb_func_start ov22_02258B78 +ov22_02258B78: ; 0x02258B78 + push {r4, lr} + sub sp, #8 + ldr r4, [r0, #0] + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02258BB2 + ldr r0, [r0, #4] + cmp r0, #1 + beq _02258B8E + bl sub_02022974 +_02258B8E: + ldr r0, [r4, #0x10] + mov r2, #0x1c + ldr r0, [r0, #4] + mov r3, #0x1e + str r0, [sp] + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + mov r1, #4 + str r0, [sp, #4] + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + add r0, r4, #0 + bl ov22_02258F4C + add r0, r4, #0 + bl ov22_02258EE4 +_02258BB2: + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02258B78 + + thumb_func_start ov22_02258BB8 +ov22_02258BB8: ; 0x02258BB8 + push {r4, r5, r6, lr} + sub sp, #0x28 + add r6, r0, #0 + ldr r4, [r6, #0] + ldr r1, [r4, #0x10] + cmp r1, #0 + bne _02258BC8 + b _02258D36 +_02258BC8: + add r1, sp, #0x18 + str r1, [sp] + add r1, sp, #0x24 + add r2, sp, #0x20 + add r3, sp, #0x1c + bl ov22_02258F38 + ldr r0, [r4, #4] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x24] + bl ov22_02257C04 + add r5, r0, #0 + ldr r0, [r4, #4] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x24] + bl ov22_02257C04 + add r5, r5, r0 + ldr r0, [r4, #4] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x20] + bl ov22_02257C04 + add r5, r5, r0 + ldr r0, [r4, #4] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x20] + bl ov22_02257C04 + add r0, r5, r0 + cmp r0, #4 + blt _02258C6A + ldr r2, [r4, #0] + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + ldr r2, [r2, #0x38] + bl ov22_02257A5C + cmp r0, #0 + bne _02258C54 + mov r0, #0x1c + ldrsh r0, [r4, r0] + str r0, [sp, #0xc] + mov r0, #0x1e + ldrsh r0, [r4, r0] + str r0, [sp, #8] + ldr r0, _02258D3C ; =0x00000683 + bl sub_02005748 + ldr r0, [r4, #0xc] + ldr r2, _02258D40 ; =0x00000181 + mov r1, #0x1a + mov r3, #3 + bl ov22_0225A628 + ldr r0, [r4, #0x10] + mov r1, #4 + ldr r0, [r0, #4] + str r0, [sp] + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + str r0, [sp, #4] + ldr r2, [sp, #0xc] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov22_02258F4C + b _02258D30 +_02258C54: + ldr r0, [r4, #4] + bl ov22_02257B10 + bl ov22_02255360 + mov r0, #0 + str r0, [r4, #0x30] + ldr r0, _02258D44 ; =0x000005EA + bl sub_02005748 + b _02258D30 +_02258C6A: + ldr r0, [r4, #0x10] + add r1, sp, #0x24 + ldr r5, [r0, #0] + add r0, sp, #0x18 + str r0, [sp] + add r0, r6, #0 + add r2, sp, #0x20 + add r3, sp, #0x1c + bl ov22_02258EF8 + ldr r0, [r4, #8] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x24] + bl ov22_02258304 + add r6, r0, #0 + ldr r0, [r4, #8] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x20] + bl ov22_02258304 + add r0, r6, r0 + cmp r0, #2 + bge _02258CE8 + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #1 + bne _02258CD4 + ldr r0, [r4, #0x10] + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov22_02259698 + bl sub_0201D35C + ldr r2, [sp, #0x14] + mov r1, #0x6c + sub r1, r1, r2 + bl sub_020E2178 + add r1, #0xa + str r1, [sp, #0xc] + bl sub_0201D35C + ldr r2, [sp, #0x10] + mov r1, #0x7d + sub r1, r1, r2 + bl sub_020E2178 + add r1, #0x12 + str r1, [sp, #8] + b _02258CE0 +_02258CD4: + mov r0, #0x1c + ldrsh r0, [r4, r0] + str r0, [sp, #0xc] + mov r0, #0x1e + ldrsh r0, [r4, r0] + str r0, [sp, #8] +_02258CE0: + ldr r0, _02258D3C ; =0x00000683 + bl sub_02005748 + b _02258CF8 +_02258CE8: + ldr r0, [r4, #0x10] + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02259648 + ldr r0, _02258D48 ; =0x000005EB + bl sub_02005748 +_02258CF8: + add r0, r4, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #1 + bne _02258D16 + ldr r0, [r4, #0x10] + ldr r2, [r4, #8] + ldr r0, [r0, #4] + ldr r1, [r5, #0] + ldr r2, [r2, #4] + bl ov22_02257FB0 + add r1, r4, #0 + add r1, #0x21 + strb r0, [r1] +_02258D16: + ldr r0, [r4, #0x10] + mov r1, #4 + ldr r0, [r0, #4] + str r0, [sp] + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + str r0, [sp, #4] + ldr r2, [sp, #0xc] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov22_02258F4C +_02258D30: + add r0, r4, #0 + bl ov22_02258EE4 +_02258D36: + add sp, #0x28 + pop {r4, r5, r6, pc} + nop +_02258D3C: .word 0x00000683 +_02258D40: .word 0x00000181 +_02258D44: .word 0x000005EA +_02258D48: .word 0x000005EB + thumb_func_end ov22_02258BB8 + + thumb_func_start ov22_02258D4C +ov22_02258D4C: ; 0x02258D4C + push {r4, lr} + ldr r2, [r0, #0] + ldr r0, [r2, #0x10] + cmp r0, #0 + beq _02258D70 + ldr r3, _02258D74 ; =0x021BF6BC + ldr r1, _02258D78 ; =0x0000FFFF + ldrh r4, [r3, #0x1c] + cmp r4, r1 + beq _02258D70 + beq _02258D70 + ldrh r3, [r3, #0x1e] + ldr r1, [r2, #0x14] + ldr r2, [r2, #0x18] + sub r1, r4, r1 + sub r2, r3, r2 + bl ov22_022595F8 +_02258D70: + pop {r4, pc} + nop +_02258D74: .word 0x021BF6BC +_02258D78: .word 0x0000FFFF + thumb_func_end ov22_02258D4C + + thumb_func_start ov22_02258D7C +ov22_02258D7C: ; 0x02258D7C + push {r4, lr} + ldr r4, [r0, #0] + ldr r1, [r4, #0x10] + cmp r1, #0 + beq _02258DA6 + ldr r0, [r4, #4] + bl ov22_022579D8 + ldr r0, [r4, #4] + bl ov22_02257B10 + bl ov22_02255360 + mov r0, #0 + str r0, [r4, #0x30] + ldr r0, _02258DA8 ; =0x000005EB + bl sub_02005748 + add r0, r4, #0 + bl ov22_02258EE4 +_02258DA6: + pop {r4, pc} + ; .align 2, 0 +_02258DA8: .word 0x000005EB + thumb_func_end ov22_02258D7C + + thumb_func_start ov22_02258DAC +ov22_02258DAC: ; 0x02258DAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + ldr r4, [r0, #0] + str r0, [sp, #4] + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02258E50 + ldr r1, _02258E54 ; =0x021BF6BC + ldrh r2, [r1, #0x1c] + ldr r1, _02258E58 ; =0x0000FFFF + cmp r2, r1 + beq _02258E50 + beq _02258E50 + add r1, sp, #8 + str r1, [sp] + add r1, sp, #0x14 + add r2, sp, #0xc + add r3, sp, #0x10 + bl ov22_022596B0 + ldr r0, [r4, #0x10] + add r1, sp, #0x1c + add r2, sp, #0x18 + bl ov22_02259698 + ldr r0, _02258E54 ; =0x021BF6BC + ldr r1, [r4, #0x14] + ldrh r2, [r0, #0x1c] + ldr r3, [sp, #0x18] + sub r5, r2, r1 + ldrh r1, [r0, #0x1e] + ldr r0, [r4, #0x18] + ldr r2, [sp, #0x1c] + sub r6, r1, r0 + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x10] + sub r0, r2, r0 + ldr r2, [sp, #8] + add r7, r6, r1 + sub r2, r3, r2 + ldr r3, [sp, #0x14] + str r2, [sp, #0x18] + add r2, r5, r3 + str r0, [sp, #0x1c] + cmp r2, #0x8a + bgt _02258E0E + mov r0, #0x8a + sub r5, r0, r3 + b _02258E18 +_02258E0E: + add r2, r5, r0 + cmp r2, #0xf6 + blt _02258E18 + mov r2, #0xf6 + sub r5, r2, r0 +_02258E18: + cmp r7, #0x12 + bgt _02258E22 + mov r0, #0x12 + sub r6, r0, r1 + b _02258E2E +_02258E22: + ldr r1, [sp, #0x18] + add r0, r6, r1 + cmp r0, #0x8f + blt _02258E2E + mov r0, #0x8f + sub r6, r0, r1 +_02258E2E: + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + bl ov22_02259074 + ldr r0, [r4, #4] + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov22_02257D04 + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + ldr r0, [sp, #4] + add r1, r5, r1 + add r2, r6, r2 + bl ov22_02259074 +_02258E50: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02258E54: .word 0x021BF6BC +_02258E58: .word 0x0000FFFF + thumb_func_end ov22_02258DAC + + thumb_func_start ov22_02258E5C +ov22_02258E5C: ; 0x02258E5C + push {r3, r4, r5, lr} + ldr r4, [r0, #0] + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02258E84 + ldr r0, [r0, #4] + cmp r0, #1 + beq _02258E70 + bl sub_02022974 +_02258E70: + ldr r0, [r4, #0x10] + ldr r5, [r0, #0] + ldr r0, [r4, #4] + bl ov22_02257CD4 + ldr r0, [r4, #4] + ldr r1, [r5, #0] + mov r2, #0xe + bl ov22_02257C88 +_02258E84: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02258E5C + + thumb_func_start ov22_02258E88 +ov22_02258E88: ; 0x02258E88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + add r7, r3, #0 + bl ov22_02259648 + str r4, [r5, #0x10] + ldr r0, [sp, #4] + strh r0, [r5, #0x1c] + ldr r0, [sp] + strh r0, [r5, #0x1e] + add r0, r5, #0 + add r0, #0x20 + strb r6, [r0] + ldr r0, [sp, #0x20] + str r7, [r5, #0x14] + str r0, [r5, #0x18] + cmp r6, #0 + bne _02258ECA + ldr r1, [r5, #0x10] + ldr r0, [r5, #8] + ldr r1, [r1, #4] + bl ov22_02258424 + add r1, r5, #0 + add r1, #0x21 + strb r0, [r1] + b _02258ED2 +_02258ECA: + add r0, r5, #0 + mov r1, #0 + add r0, #0x21 + strb r1, [r0] +_02258ED2: + mov r0, #1 + str r0, [r5, #0x30] + ldr r1, [sp, #0x24] + add r0, r4, #0 + bl ov22_02259560 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02258E88 + + thumb_func_start ov22_02258EE4 +ov22_02258EE4: ; 0x02258EE4 + mov r2, #0 + str r2, [r0, #0x10] + strh r2, [r0, #0x1c] + add r1, r0, #0 + strh r2, [r0, #0x1e] + add r1, #0x20 + strb r2, [r1] + add r0, #0x21 + strb r2, [r0] + bx lr + thumb_func_end ov22_02258EE4 + + thumb_func_start ov22_02258EF8 +ov22_02258EF8: ; 0x02258EF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r4, [r0, #0] + add r5, r1, #0 + ldr r0, [r4, #0x10] + add r6, r2, #0 + add r1, sp, #0xc + add r2, sp, #8 + add r7, r3, #0 + bl ov22_02259698 + ldr r0, [r4, #0x10] + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259648 + ldr r0, [sp] + str r0, [r5, #0] + ldr r1, [sp] + ldr r0, [sp, #8] + add r0, r1, r0 + str r0, [r6, #0] + ldr r0, [sp, #4] + str r0, [r7, #0] + ldr r1, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r1, r0 + ldr r0, [sp, #0x28] + str r1, [r0, #0] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02258EF8 + + thumb_func_start ov22_02258F38 +ov22_02258F38: ; 0x02258F38 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #0x10] + bl ov22_02259724 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov22_02258F38 + + thumb_func_start ov22_02258F4C +ov22_02258F4C: ; 0x02258F4C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + ldr r0, _02258FBC ; =ov22_02258FC0 + mov r1, #0x2c + mov r2, #0 + mov r3, #0xd + bl sub_0200679C + bl sub_0201CED0 + add r4, r0, #0 + ldr r0, [r5, #8] + add r1, sp, #8 + str r0, [r4, #0] + ldr r0, [r5, #0x10] + add r2, sp, #4 + str r0, [r4, #4] + str r6, [r4, #0x20] + ldr r0, [sp] + str r7, [r4, #0x10] + str r0, [r4, #0x14] + ldr r0, [sp, #0x20] + str r0, [r4, #0x18] + ldr r0, [sp, #0x24] + str r0, [r4, #0x1c] + ldr r0, [r5, #8] + add r0, #0x3c + str r0, [r4, #0x24] + add r0, r5, #0 + add r0, #0x30 + str r0, [r4, #0x28] + ldr r0, [r5, #0x10] + bl ov22_02259648 + ldr r1, [r4, #0x10] + ldr r0, [sp, #8] + sub r0, r1, r0 + add r1, r6, #0 + bl sub_020E1F6C + str r0, [r4, #8] + ldr r1, [r4, #0x14] + ldr r0, [sp, #4] + sub r0, r1, r0 + add r1, r6, #0 + bl sub_020E1F6C + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r5, #0x30] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02258FBC: .word ov22_02258FC0 + thumb_func_end ov22_02258F4C + + thumb_func_start ov22_02258FC0 +ov22_02258FC0: ; 0x02258FC0 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x24] + ldr r0, [r0, #0] + cmp r0, #1 + beq _0225903A + ldr r0, [r4, #4] + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259648 + ldr r1, [sp, #4] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [sp, #4] + ldr r1, [sp] + ldr r0, [r4, #0xc] + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #0x20] + sub r0, r0, #1 + str r0, [r4, #0x20] + bmi _02258FFE + ldr r0, [r4, #8] + cmp r0, #0 + bne _02259030 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _02259030 +_02258FFE: + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + ldr r2, [r4, #0x14] + bl ov22_022595F8 + ldr r0, [r4, #0] + ldr r1, [r4, #0x18] + ldr r2, [r4, #0x1c] + ldr r3, [r4, #4] + bl ov22_0225818C + ldr r0, [r4, #0] + bl ov22_022581EC + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + cmp r0, #0 + bne _02259026 + bl ov22_02255360 +_02259026: + add r0, r5, #0 + bl sub_020067D0 + add sp, #8 + pop {r3, r4, r5, pc} +_02259030: + ldr r0, [r4, #4] + ldr r1, [sp, #4] + ldr r2, [sp] + bl ov22_022595F8 +_0225903A: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02258FC0 + + thumb_func_start ov22_02259040 +ov22_02259040: ; 0x02259040 + push {r3, lr} + ldr r3, [r0, #0x10] + ldr r1, [r3, #4] + cmp r1, #0 + bne _0225905A + ldr r3, [r3, #0] + ldr r0, [r0, #0xc] + ldr r2, _02259070 ; =0x00000182 + ldr r3, [r3, #0] + mov r1, #0x1a + bl ov22_0225A628 + pop {r3, pc} +_0225905A: + cmp r1, #1 + bne _0225906E + ldr r3, [r3, #0] + mov r2, #0x61 + ldr r0, [r0, #0xc] + ldr r3, [r3, #0] + mov r1, #0x1a + lsl r2, r2, #2 + bl ov22_0225A628 +_0225906E: + pop {r3, pc} + ; .align 2, 0 +_02259070: .word 0x00000182 + thumb_func_end ov22_02259040 + + thumb_func_start ov22_02259074 +ov22_02259074: ; 0x02259074 + push {r4, r5, r6, lr} + ldr r4, [r0, #0] + add r5, r1, #0 + ldr r0, [r4, #0x10] + add r6, r2, #0 + bl ov22_022595F8 + ldr r1, [r4, #0x24] + ldr r2, [r4, #0x28] + ldr r0, [r4, #4] + sub r1, r5, r1 + sub r2, r6, r2 + bl ov22_02257ACC + str r5, [r4, #0x24] + str r6, [r4, #0x28] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_02259074 \ No newline at end of file diff --git a/asm/ov22_02259098.s b/asm/ov22_02259098.s new file mode 100644 index 000000000..50d9bafd1 --- /dev/null +++ b/asm/ov22_02259098.s @@ -0,0 +1,566 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02259098 +ov22_02259098: ; 0x02259098 + push {r3, r4, r5, lr} + mov r2, #0 + add r4, r1, #0 + str r2, [sp] + add r5, r0, #0 + ldrh r0, [r4] + ldrh r1, [r4, #2] + mov r3, #0xe + bl sub_02006FE8 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0x76 + bl ov22_02255340 + ldrh r1, [r4] + ldr r0, [r0, #0x14] + bl sub_020093A0 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02259098 + + thumb_func_start ov22_022590C0 +ov22_022590C0: ; 0x022590C0 + push {r4, lr} + sub sp, #8 + ldr r4, [sp, #0x10] + str r4, [sp] + mov r4, #0 + str r4, [sp, #4] + bl ov22_022590D4 + add sp, #8 + pop {r4, pc} + thumb_func_end ov22_022590C0 + + thumb_func_start ov22_022590D4 +ov22_022590D4: ; 0x022590D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r6, r2, #0 + add r5, r0, #0 + add r7, r1, #0 + add r4, r3, #0 + add r0, r6, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r0, r4, #0 + add r1, r6, #0 + mov r2, #2 + bl sub_02075F00 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r7, #0 + add r1, r4, #0 + mov r2, #0xc0 + mov r3, #0x38 + bl sub_02007C34 + str r0, [r5, #0] + add r0, r5, #0 + add r1, sp, #0x1c + add r2, sp, #0x18 + bl ov22_02259270 + ldr r1, [sp, #0x1c] + mov r2, #0x38 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + ldr r1, [sp, #0x18] + str r0, [sp, #0x1c] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp, #0x18] + sub r0, r2, r0 + strb r0, [r5, #4] + ldr r0, [sp, #0x18] + mov r1, #0xc0 + add r0, #0x38 + strb r0, [r5, #5] + ldr r0, [sp, #0x1c] + sub r0, r1, r0 + strb r0, [r5, #6] + ldr r0, [sp, #0x1c] + add r0, #0xc0 + strb r0, [r5, #7] + ldr r0, [sp, #0x18] + str r0, [sp] + ldr r3, [sp, #0x1c] + add r0, r5, #4 + bl ov22_02259448 + add r0, r6, #0 + mov r1, #2 + bl sub_020765B8 + mov r2, #0 + str r2, [sp] + add r7, r0, #0 + ldrh r0, [r4] + ldrh r1, [r4, #2] + ldr r3, [sp, #0x38] + bl sub_02006FE8 + add r1, sp, #0x14 + str r0, [sp, #0x10] + bl sub_020A7118 + ldr r0, [sp, #0x14] + ldrh r1, [r4] + ldr r0, [r0, #0x14] + bl sub_020093A0 + ldr r0, [sp, #0x3c] + cmp r0, #0 + bne _02259196 + ldr r2, [sp, #0x14] + add r3, r5, #0 + ldrh r1, [r2, #2] + ldr r0, [r2, #0x14] + ldrh r2, [r2] + lsl r1, r1, #3 + add r3, #8 + lsl r2, r2, #3 + bl ov22_022593B8 + b _022591AC +_02259196: + ldr r1, [sp, #0x14] + ldr r0, [r1, #0x14] + ldrh r1, [r1, #2] + lsl r1, r1, #3 + bl ov22_0225936C + strb r0, [r5, #8] + ldrb r0, [r5, #8] + strb r0, [r5, #9] + strb r7, [r5, #0xb] + strb r7, [r5, #0xa] +_022591AC: + ldr r0, [sp, #0x10] + bl sub_020181C4 + str r6, [r5, #0xc] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_022590D4 + + thumb_func_start ov22_022591B8 +ov22_022591B8: ; 0x022591B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02007DC8 + mov r1, #0x10 + mov r0, #0 +_022591C6: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _022591C6 + pop {r4, pc} + thumb_func_end ov22_022591B8 + + thumb_func_start ov22_022591D0 +ov22_022591D0: ; 0x022591D0 + ldr r3, _022591DC ; =sub_02007DEC + add r2, r1, #0 + ldr r0, [r0, #0] + mov r1, #2 + bx r3 + nop +_022591DC: .word sub_02007DEC + thumb_func_end ov22_022591D0 + + thumb_func_start ov22_022591E0 +ov22_022591E0: ; 0x022591E0 + ldr r3, _022591E8 ; =sub_020080C0 + ldr r0, [r0, #0] + mov r1, #2 + bx r3 + ; .align 2, 0 +_022591E8: .word sub_020080C0 + thumb_func_end ov22_022591E0 + + thumb_func_start ov22_022591EC +ov22_022591EC: ; 0x022591EC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r1, sp, #8 + add r2, sp, #4 + bl ov22_02259270 + ldr r0, [r5, #0] + mov r1, #0 + add r2, r4, #0 + bl sub_02007DEC + ldr r0, [r5, #0] + mov r1, #1 + add r2, r6, #0 + bl sub_02007DEC + ldr r1, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r2, r0, #1 + ldr r1, [sp, #8] + str r2, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp, #8] + str r2, [sp] + ldr r3, [sp, #8] + add r0, r5, #4 + add r1, r4, #0 + add r2, r6, #0 + bl ov22_02259448 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov22_022591EC + + thumb_func_start ov22_02259238 +ov22_02259238: ; 0x02259238 + ldr r3, _02259240 ; =sub_02022734 + add r0, r0, #4 + bx r3 + nop +_02259240: .word sub_02022734 + thumb_func_end ov22_02259238 + + thumb_func_start ov22_02259244 +ov22_02259244: ; 0x02259244 + ldr r3, _0225924C ; =sub_02022830 + add r0, r0, #4 + bx r3 + nop +_0225924C: .word sub_02022830 + thumb_func_end ov22_02259244 + + thumb_func_start ov22_02259250 +ov22_02259250: ; 0x02259250 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + mov r1, #0 + add r6, r2, #0 + bl sub_020080C0 + str r0, [r4, #0] + ldr r0, [r5, #0] + mov r1, #1 + bl sub_020080C0 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_02259250 + + thumb_func_start ov22_02259270 +ov22_02259270: ; 0x02259270 + mov r0, #0x50 + str r0, [r1, #0] + str r0, [r2, #0] + bx lr + thumb_func_end ov22_02259270 + + thumb_func_start ov22_02259278 +ov22_02259278: ; 0x02259278 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov22_02259238 + cmp r0, #0 + bne _02259292 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02259292: + add r0, r5, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259250 + add r0, r5, #0 + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02259270 + ldr r1, [sp, #0xc] + ldr r2, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + sub r1, r2, r0 + ldr r3, [sp, #8] + ldr r0, [sp] + lsr r2, r3, #0x1f + add r2, r3, r2 + asr r2, r2, #1 + sub r0, r0, r2 + str r0, [sp] + ldr r0, _022592EC ; =0x021BF6BC + str r1, [sp, #4] + ldrh r2, [r0, #0x1c] + mov r3, #0 + sub r1, r2, r1 + str r1, [r4, #0] + ldrh r1, [r0, #0x1e] + ldr r0, [sp] + sub r2, r1, r0 + str r2, [r6, #0] + ldr r1, [r4, #0] + add r0, r7, #0 + bl ov22_02255420 + cmp r0, #0 + bne _022592E6 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022592E6: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022592EC: .word 0x021BF6BC + thumb_func_end ov22_02259278 + + thumb_func_start ov22_022592F0 +ov22_022592F0: ; 0x022592F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov22_02259244 + cmp r0, #0 + bne _0225930A + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0225930A: + add r0, r5, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259250 + add r0, r5, #0 + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02259270 + ldr r1, [sp, #0xc] + ldr r2, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + sub r1, r2, r0 + ldr r3, [sp, #8] + str r1, [sp, #4] + lsr r2, r3, #0x1f + add r2, r3, r2 + ldr r0, [sp] + asr r2, r2, #1 + sub r0, r0, r2 + str r0, [sp] + sub r2, r6, r0 + sub r1, r4, r1 + add r0, r7, #0 + mov r3, #0 + bl ov22_02255420 + cmp r0, #0 + bne _02259350 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02259350: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022592F0 + + thumb_func_start ov22_02259358 +ov22_02259358: ; 0x02259358 + ldrb r2, [r0, #8] + strb r2, [r1] + ldrb r2, [r0, #9] + strb r2, [r1, #1] + ldrb r2, [r0, #0xa] + strb r2, [r1, #2] + ldrb r0, [r0, #0xb] + strb r0, [r1, #3] + bx lr + ; .align 2, 0 + thumb_func_end ov22_02259358 + + thumb_func_start ov22_0225936C +ov22_0225936C: ; 0x0225936C + push {r4, r5, r6, r7} + mov ip, r0 + add r7, r1, #0 + mov r2, #0 +_02259374: + mov r3, #0 + add r4, r3, #0 +_02259378: + add r1, r2, r4 + lsr r0, r1, #0x1f + lsl r6, r1, #0x1f + sub r6, r6, r0 + mov r5, #0x1f + ror r6, r5 + add r5, r0, r6 + lsl r6, r5, #2 + mov r5, #0xf + add r0, r1, r0 + lsl r5, r6 + asr r1, r0, #1 + mov r0, ip + lsl r5, r5, #0x18 + ldrsb r0, [r0, r1] + lsr r5, r5, #0x18 + tst r0, r5 + beq _022593A2 + add r0, r2, #0 + pop {r4, r5, r6, r7} + bx lr +_022593A2: + add r3, r3, #1 + add r4, r4, r7 + cmp r3, #0x50 + blt _02259378 + add r2, r2, #1 + cmp r2, #0x50 + blt _02259374 + mov r0, #0x50 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225936C + + thumb_func_start ov22_022593B8 +ov22_022593B8: ; 0x022593B8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + str r1, [sp, #4] + add r1, r3, #0 + mov r0, #0x28 + strb r0, [r1] + strb r0, [r1, #1] + strb r0, [r1, #2] + strb r0, [r1, #3] + mov r6, #0 +_022593CE: + mov r2, #0x50 + sub r2, r2, r6 + str r2, [sp, #8] + lsl r2, r6, #0x18 + lsr r2, r2, #0x18 + mov lr, r2 + ldr r2, [sp, #8] + mov r0, #0 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + add r5, r0, #0 + mov ip, r2 +_022593E6: + add r7, r6, r5 + lsr r3, r7, #0x1f + lsl r4, r7, #0x1f + sub r4, r4, r3 + mov r2, #0x1f + ror r4, r2 + add r2, r3, r4 + lsl r4, r2, #2 + mov r2, #0xf + lsl r2, r4 + lsl r2, r2, #0x18 + lsr r4, r2, #0x18 + add r3, r7, r3 + ldr r2, [sp] + asr r3, r3, #1 + ldrsb r2, [r2, r3] + tst r2, r4 + beq _02259434 + ldrb r2, [r1] + cmp r2, r6 + ble _02259414 + mov r2, lr + strb r2, [r1] +_02259414: + ldrb r3, [r1, #1] + ldr r2, [sp, #8] + cmp r3, r2 + ble _02259420 + mov r2, ip + strb r2, [r1, #1] +_02259420: + ldrb r2, [r1, #2] + cmp r2, r0 + ble _02259428 + strb r0, [r1, #2] +_02259428: + mov r2, #0x50 + sub r3, r2, r0 + ldrb r2, [r1, #3] + cmp r2, r3 + ble _02259434 + strb r3, [r1, #3] +_02259434: + ldr r2, [sp, #4] + add r0, r0, #1 + add r5, r5, r2 + cmp r0, #0x50 + blt _022593E6 + add r6, r6, #1 + cmp r6, #0x50 + blt _022593CE + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_022593B8 + + thumb_func_start ov22_02259448 +ov22_02259448: ; 0x02259448 + push {r3, r4} + ldr r4, [sp, #8] + sub r4, r2, r4 + bmi _02259452 + b _02259454 +_02259452: + mov r4, #0 +_02259454: + strb r4, [r0] + ldr r4, [sp, #8] + add r2, r2, r4 + cmp r2, #0xbf + bgt _02259460 + b _02259462 +_02259460: + mov r2, #0xbf +_02259462: + strb r2, [r0, #1] + sub r2, r1, r3 + bmi _0225946A + b _0225946C +_0225946A: + mov r2, #0 +_0225946C: + add r1, r1, r3 + strb r2, [r0, #2] + cmp r1, #0xff + bgt _0225947A + strb r1, [r0, #3] + pop {r3, r4} + bx lr +_0225947A: + mov r1, #0xff + strb r1, [r0, #3] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov22_02259448 \ No newline at end of file diff --git a/asm/ov22_02259484.s b/asm/ov22_02259484.s new file mode 100644 index 000000000..ee45dfc8a --- /dev/null +++ b/asm/ov22_02259484.s @@ -0,0 +1,145 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02259484 +ov22_02259484: ; 0x02259484 + push {r4, r5, r6, lr} + add r6, r1, #0 + lsl r4, r6, #4 + add r5, r0, #0 + add r0, r2, #0 + add r1, r4, #0 + bl sub_02018144 + str r0, [r5, #0] + cmp r0, #0 + bne _0225949E + bl sub_02022974 +_0225949E: + ldr r0, [r5, #0] + mov r1, #0 + add r2, r4, #0 + bl sub_020D5124 + str r6, [r5, #4] + pop {r4, r5, r6, pc} + thumb_func_end ov22_02259484 + + thumb_func_start ov22_022594AC +ov22_022594AC: ; 0x022594AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022594AC + + thumb_func_start ov22_022594C0 +ov22_022594C0: ; 0x022594C0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r7, r2, #0 + cmp r0, #0 + bne _022594D2 + bl sub_02022974 +_022594D2: + ldr r0, [r5, #4] + cmp r0, #0 + bne _022594DC + bl sub_02022974 +_022594DC: + ldr r2, [r5, #4] + mov r4, #0 + cmp r2, #0 + ble _022594F4 + ldr r1, [r5, #0] +_022594E6: + ldr r0, [r1, #0] + cmp r0, #0 + beq _022594F4 + add r4, r4, #1 + add r1, #0x10 + cmp r4, r2 + blt _022594E6 +_022594F4: + cmp r2, r4 + bgt _022594FC + bl sub_02022974 +_022594FC: + ldr r0, [r5, #0] + lsl r1, r4, #4 + str r6, [r0, r1] + ldr r0, [r5, #0] + add r0, r0, r1 + str r7, [r0, #4] + ldr r0, [r5, #0] + add r0, r0, r1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022594C0 + + thumb_func_start ov22_02259510 +ov22_02259510: ; 0x02259510 + mov r2, #0x10 + mov r1, #0 +_02259514: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _02259514 + bx lr + ; .align 2, 0 + thumb_func_end ov22_02259510 + + thumb_func_start ov22_02259520 +ov22_02259520: ; 0x02259520 + ldr r2, [r1, #8] + str r2, [r0, #8] + ldr r2, [r1, #8] + str r0, [r2, #0xc] + str r1, [r0, #0xc] + str r0, [r1, #8] + bx lr + ; .align 2, 0 + thumb_func_end ov22_02259520 + + thumb_func_start ov22_02259530 +ov22_02259530: ; 0x02259530 + ldr r2, [r0, #8] + ldr r1, [r0, #0xc] + str r2, [r1, #8] + ldr r1, [r0, #0xc] + ldr r0, [r0, #8] + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov22_02259530 + + thumb_func_start ov22_02259540 +ov22_02259540: ; 0x02259540 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r4, [r6, #8] + cmp r4, r6 + beq _0225955E +_0225954A: + add r0, r4, #0 + ldr r5, [r4, #8] + bl ov22_02259530 + add r0, r4, #0 + bl ov22_02259510 + add r4, r5, #0 + cmp r5, r6 + bne _0225954A +_0225955E: + pop {r4, r5, r6, pc} + thumb_func_end ov22_02259540 \ No newline at end of file diff --git a/asm/ov22_02259560.s b/asm/ov22_02259560.s new file mode 100644 index 000000000..12b96457f --- /dev/null +++ b/asm/ov22_02259560.s @@ -0,0 +1,335 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02259560 +ov22_02259560: ; 0x02259560 + push {r3, lr} + ldr r2, [r0, #4] + ldr r0, [r0, #0] + cmp r2, #3 + bge _02259570 + bl ov22_02254F6C + pop {r3, pc} +_02259570: + bl ov22_022591D0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_02259560 + + thumb_func_start ov22_02259578 +ov22_02259578: ; 0x02259578 + push {r3, lr} + ldr r3, [r0, #4] + ldr r0, [r0, #0] + cmp r3, #3 + bge _02259596 + mov r3, #0 + mvn r3, r3 + cmp r1, r3 + bne _02259590 + bl ov22_02254E44 + pop {r3, pc} +_02259590: + bl ov22_02254EDC + pop {r3, pc} +_02259596: + mov r3, #0 + mvn r3, r3 + cmp r1, r3 + bne _022595A4 + bl ov22_02259238 + pop {r3, pc} +_022595A4: + bl ov22_02259244 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_02259578 + + thumb_func_start ov22_022595AC +ov22_022595AC: ; 0x022595AC + push {r4, lr} + ldr r4, [r0, #4] + cmp r4, #0 + bne _022595C2 + ldr r0, [r0, #0] + ldr r4, [r0, #0] + lsl r4, r4, #2 + ldr r3, [r3, r4] + bl ov22_02254E54 + pop {r4, pc} +_022595C2: + cmp r4, #1 + bne _022595D6 + ldr r0, [r0, #0] + ldr r4, [r0, #0] + add r4, #0x64 + lsl r4, r4, #2 + ldr r3, [r3, r4] + bl ov22_02254E54 + pop {r4, pc} +_022595D6: + cmp r4, #2 + ldr r0, [r0, #0] + bne _022595EA + ldr r4, [r0, #0] + add r4, #0x64 + lsl r4, r4, #2 + ldr r3, [r3, r4] + bl ov22_02254E54 + pop {r4, pc} +_022595EA: + mov r4, #0x76 + lsl r4, r4, #2 + ldr r3, [r3, r4] + bl ov22_02259278 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_022595AC + + thumb_func_start ov22_022595F8 +ov22_022595F8: ; 0x022595F8 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, [r0, #4] + add r4, r2, #0 + cmp r1, #3 + bge _02259618 + lsl r1, r5, #0x10 + lsl r2, r4, #0x10 + ldr r0, [r0, #0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov22_02254EF4 + add sp, #8 + pop {r4, r5, r6, pc} +_02259618: + ldr r6, [r0, #0] + add r1, sp, #4 + add r0, r6, #0 + add r2, sp, #0 + bl ov22_02259270 + ldr r1, [sp, #4] + ldr r2, [sp] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + lsr r0, r2, #0x1f + add r0, r2, r0 + asr r2, r0, #1 + str r1, [sp, #4] + str r2, [sp] + add r0, r6, #0 + add r1, r5, r1 + add r2, r4, r2 + bl ov22_022591EC + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_022595F8 + + thumb_func_start ov22_02259648 +ov22_02259648: ; 0x02259648 + push {r4, r5, r6, lr} + sub sp, #8 + ldr r3, [r0, #4] + add r5, r1, #0 + add r4, r2, #0 + cmp r3, #3 + bge _02259660 + ldr r0, [r0, #0] + bl ov22_02254F00 + add sp, #8 + pop {r4, r5, r6, pc} +_02259660: + ldr r6, [r0, #0] + add r0, r6, #0 + bl ov22_02259250 + add r0, r6, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259270 + ldr r1, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r2, r0, #1 + ldr r1, [sp] + str r2, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp] + ldr r0, [r5, #0] + sub r0, r0, r2 + str r0, [r5, #0] + ldr r1, [r4, #0] + ldr r0, [sp] + sub r0, r1, r0 + str r0, [r4, #0] + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov22_02259648 + + thumb_func_start ov22_02259698 +ov22_02259698: ; 0x02259698 + push {r3, lr} + ldr r3, [r0, #4] + ldr r0, [r0, #0] + cmp r3, #3 + bge _022596A8 + bl ov22_02254F30 + pop {r3, pc} +_022596A8: + bl ov22_02259270 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_02259698 + + thumb_func_start ov22_022596B0 +ov22_022596B0: ; 0x022596B0 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + ldr r2, [r0, #4] + add r6, r1, #0 + add r5, r3, #0 + ldr r4, [sp, #0x18] + cmp r2, #3 + ldr r0, [r0, #0] + bge _022596D2 + add r2, r5, #0 + bl ov22_02254F84 + ldr r0, [r6, #0] + str r0, [r7, #0] + ldr r0, [r5, #0] + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_022596D2: + add r1, sp, #0 + bl ov22_02259358 + add r0, sp, #0 + ldrb r1, [r0] + str r1, [r6, #0] + ldrb r1, [r0, #1] + str r1, [r7, #0] + ldrb r1, [r0, #2] + str r1, [r5, #0] + ldrb r0, [r0, #3] + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_022596B0 + + thumb_func_start ov22_022596EC +ov22_022596EC: ; 0x022596EC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r4, [r5, #8] + add r6, r1, #0 + add r7, r2, #0 + cmp r4, r5 + beq _0225971E +_022596FC: + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259648 + ldr r0, [sp, #4] + add r1, r0, r6 + ldr r0, [sp] + str r1, [sp, #4] + add r2, r0, r7 + str r2, [sp] + add r0, r4, #0 + bl ov22_022595F8 + ldr r4, [r4, #8] + cmp r4, r5 + bne _022596FC +_0225971E: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022596EC + + thumb_func_start ov22_02259724 +ov22_02259724: ; 0x02259724 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r1, sp, #0x20 + add r2, sp, #0x1c + add r7, r3, #0 + bl ov22_02259698 + add r0, r5, #0 + add r1, sp, #0x18 + add r2, sp, #0x14 + bl ov22_02259648 + add r0, sp, #4 + str r0, [sp] + add r0, r5, #0 + add r1, sp, #0x10 + add r2, sp, #8 + add r3, sp, #0xc + bl ov22_022596B0 + ldr r1, [sp, #0x14] + ldr r0, [sp, #0xc] + add r0, r1, r0 + str r0, [r4, #0] + ldr r1, [sp, #0x14] + ldr r0, [sp, #0x1c] + add r1, r1, r0 + ldr r0, [sp, #4] + sub r0, r1, r0 + str r0, [r6, #0] + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x10] + add r0, r1, r0 + str r0, [r7, #0] + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x20] + add r1, r1, r0 + ldr r0, [sp, #8] + sub r1, r1, r0 + ldr r0, [sp, #0x38] + str r1, [r0, #0] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_02259724 + + thumb_func_start ov22_02259780 +ov22_02259780: ; 0x02259780 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r1, #0 + add r4, r2, #0 + add r6, r0, #0 + add r1, sp, #0xc + add r2, sp, #8 + bl ov22_02259698 + add r0, r6, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov22_02259648 + ldr r1, [sp, #0xc] + ldr r2, [sp, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, r2, r0 + str r0, [r5, #0] + ldr r1, [sp, #8] + ldr r2, [sp] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, r2, r0 + str r0, [r4, #0] + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov22_02259780 \ No newline at end of file diff --git a/asm/ov22_022597BC.s b/asm/ov22_022597BC.s new file mode 100644 index 000000000..35a5afa1e --- /dev/null +++ b/asm/ov22_022597BC.s @@ -0,0 +1,621 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_022597BC +ov22_022597BC: ; 0x022597BC + add r2, r0, #0 + ldr r0, [r1, #0] + str r0, [r2, #0] + ldr r3, [r1, #0x14] + asr r0, r3, #2 + lsr r0, r0, #0x1d + add r0, r3, r0 + asr r0, r0, #3 + str r0, [r2, #0xc] + ldr r3, [r1, #0x18] + asr r0, r3, #2 + lsr r0, r0, #0x1d + add r0, r3, r0 + asr r0, r0, #3 + str r0, [r2, #0x10] + ldr r0, [r1, #0x1c] + ldr r3, _02259800 ; =ov22_022599A0 + str r0, [r2, #0x1c] + ldr r0, [r1, #0x24] + str r0, [r2, #0x20] + ldr r0, [r1, #0x20] + str r0, [r2, #0x24] + ldr r0, [r1, #0x28] + str r0, [r2, #0x28] + ldr r0, [r1, #4] + str r0, [r2, #4] + ldr r0, [r1, #0x10] + str r0, [r2, #8] + add r0, r1, #0 + add r1, r2, #0 + add r1, #0x14 + add r2, #0x18 + bx r3 + nop +_02259800: .word ov22_022599A0 + thumb_func_end ov22_022597BC + + thumb_func_start ov22_02259804 +ov22_02259804: ; 0x02259804 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x1c] + ldr r0, [r4, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #0 + mov r2, #0x2c + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov22_02259804 + + thumb_func_start ov22_02259820 +ov22_02259820: ; 0x02259820 + ldr r2, [r1, #0] + str r2, [r0, #0] + ldr r2, [r1, #4] + str r2, [r0, #4] + ldr r2, [r1, #8] + str r2, [r0, #8] + mov r2, #0 + str r2, [r0, #0xc] + str r2, [r0, #0x10] + ldr r1, [r1, #0xc] + str r1, [r0, #0x14] + bx lr + thumb_func_end ov22_02259820 + + thumb_func_start ov22_02259838 +ov22_02259838: ; 0x02259838 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r1, r0, r1 + str r1, [r5, #0xc] + ldr r0, [r5, #8] + cmp r1, r0 + ble _0225989C + mov r2, #0 + str r2, [r5, #0xc] + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _0225985C + ldr r1, [r5, #4] + mov r0, #1 + str r0, [r5, #0x10] + b _02259862 +_0225985C: + ldr r0, [r5, #0] + ldr r1, [r0, #8] + str r2, [r5, #0x10] +_02259862: + ldr r0, [r5, #0x14] + mov r2, #0 + str r0, [sp] + ldr r0, [r5, #0] + add r3, sp, #0x14 + ldr r0, [r0, #4] + bl sub_02006F6C + ldr r3, [r5, #0] + add r4, r0, #0 + ldr r0, [r3, #0x18] + str r0, [sp] + ldr r0, [r3, #0xc] + str r0, [sp, #4] + ldr r0, [r3, #0x10] + str r0, [sp, #8] + ldr r0, [r3, #0x28] + str r0, [sp, #0xc] + ldr r0, [r3, #0x20] + str r0, [sp, #0x10] + ldr r0, [r3, #0] + ldr r1, [r3, #0x1c] + ldr r2, [sp, #0x14] + ldr r3, [r3, #0x14] + bl ov22_02259ABC + add r0, r4, #0 + bl sub_020181C4 +_0225989C: + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02259838 + + thumb_func_start ov22_022598A0 +ov22_022598A0: ; 0x022598A0 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r1, [r5, #0] + ldr r0, [r5, #0x14] + mov r2, #0 + str r0, [sp] + ldr r0, [r1, #4] + ldr r1, [r1, #8] + add r3, sp, #0x14 + bl sub_02006F6C + ldr r3, [r5, #0] + add r4, r0, #0 + ldr r0, [r3, #0x18] + str r0, [sp] + ldr r0, [r3, #0xc] + str r0, [sp, #4] + ldr r0, [r3, #0x10] + str r0, [sp, #8] + ldr r0, [r3, #0x28] + str r0, [sp, #0xc] + ldr r0, [r3, #0x20] + str r0, [sp, #0x10] + ldr r0, [r3, #0] + ldr r1, [r3, #0x1c] + ldr r2, [sp, #0x14] + ldr r3, [r3, #0x14] + bl ov22_02259ABC + add r0, r4, #0 + bl sub_020181C4 + mov r1, #0x18 + mov r0, #0 +_022598E6: + strb r0, [r5] + add r5, r5, #1 + sub r1, r1, #1 + bne _022598E6 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_022598A0 + + thumb_func_start ov22_022598F4 +ov22_022598F4: ; 0x022598F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r5, r1, #0 + str r2, [sp] + str r3, [sp, #4] + ldr r0, _0225997C ; =ov22_02259A4C + mov r1, #0x4c + mov r2, #0 + mov r3, #0xd + bl sub_0200679C + bl sub_0201CED0 + add r4, r0, #0 + str r6, [r4, #0] + add r7, r5, #0 + add r3, r4, #4 + mov r2, #6 +_0225991A: + ldmia r7!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0225991A + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x20] + str r0, [r4, #0x34] + ldr r0, [sp] + str r1, [r4, #0x38] + bl sub_020E1F6C + str r0, [r4, #0x3c] + ldr r0, [sp, #4] + ldr r1, [sp, #0x20] + bl sub_020E1F6C + str r0, [r4, #0x40] + ldr r0, [r6, #0] + ldr r1, [r6, #0x1c] + bl sub_020192EC + str r0, [r4, #0x44] + ldr r0, [r6, #0] + ldr r1, [r6, #0x1c] + bl sub_020192F8 + str r0, [r4, #0x48] + mov r0, #0x80 + str r0, [r5, #0x28] + mov r0, #5 + str r0, [r5, #0x24] + ldr r1, [r5, #0x14] + ldr r0, [sp] + sub r0, r1, r0 + str r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r0, [sp, #4] + sub r0, r1, r0 + str r0, [r5, #0x18] + mov r0, #0xe + mov r1, #0 + str r0, [r5, #0x2c] + add r0, r5, #0 + add r2, r1, #0 + bl ov22_022599A0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225997C: .word ov22_02259A4C + thumb_func_end ov22_022598F4 + + thumb_func_start ov22_02259980 +ov22_02259980: ; 0x02259980 + push {r3, r4} + ldr r2, [r0, #8] + add r0, #0xc + lsr r4, r2, #1 + mov r3, #0 + cmp r4, #0 + ble _0225999C +_0225998E: + ldrh r2, [r0] + add r3, r3, #1 + add r2, r2, r1 + strh r2, [r0] + add r0, r0, #2 + cmp r3, r4 + blt _0225998E +_0225999C: + pop {r3, r4} + bx lr + thumb_func_end ov22_02259980 + + thumb_func_start ov22_022599A0 +ov22_022599A0: ; 0x022599A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0x14] + add r6, r2, #0 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r0, r0, #3 + ldr r1, [r5, #0x18] + str r0, [sp, #0x18] + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r0, r0, #3 + str r0, [sp, #0x14] + ldr r0, [r5, #0x28] + str r0, [sp] + ldr r0, [r5, #0x2c] + str r0, [sp, #4] + ldr r0, [r5, #4] + ldr r1, [r5, #8] + ldr r2, [r5, #0] + ldr r3, [r5, #0x1c] + bl ov22_02259B3C + ldr r0, [r5, #0x1c] + cmp r0, #4 + bge _022599E0 + mov r2, #0 + b _022599E2 +_022599E0: + mov r2, #4 +_022599E2: + ldr r0, [r5, #0x20] + lsl r0, r0, #5 + str r0, [sp] + ldr r0, [r5, #0x2c] + str r0, [sp, #4] + ldr r3, [r5, #0x24] + ldr r0, [r5, #4] + ldr r1, [r5, #0xc] + lsl r3, r3, #5 + bl ov22_02259B8C + ldr r0, [r5, #0x2c] + mov r2, #0 + str r0, [sp] + ldr r0, [r5, #4] + ldr r1, [r5, #0x10] + add r3, sp, #0x24 + bl sub_02006F6C + ldr r2, [sp, #0x24] + str r0, [sp, #0x20] + ldrh r0, [r2] + lsr r7, r0, #3 + ldrh r0, [r2, #2] + add r3, r7, #0 + lsr r0, r0, #3 + str r0, [sp, #0x1c] + str r0, [sp] + ldr r0, [sp, #0x18] + str r0, [sp, #4] + ldr r0, [sp, #0x14] + str r0, [sp, #8] + ldr r0, [r5, #0x28] + str r0, [sp, #0xc] + ldr r0, [r5, #0x24] + str r0, [sp, #0x10] + ldr r0, [r5, #0] + ldr r1, [r5, #0x1c] + bl ov22_02259ABC + ldr r0, [sp, #0x20] + bl sub_020181C4 + cmp r4, #0 + beq _02259A3E + str r7, [r4, #0] +_02259A3E: + cmp r6, #0 + beq _02259A46 + ldr r0, [sp, #0x1c] + str r0, [r6, #0] +_02259A46: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_022599A0 + + thumb_func_start ov22_02259A4C +ov22_02259A4C: ; 0x02259A4C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x38] + sub r0, r0, #1 + str r0, [r4, #0x38] + ldr r1, [r4, #0] + bmi _02259A80 + ldr r0, [r1, #0] + ldr r1, [r1, #0x1c] + ldr r3, [r4, #0x3c] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #2 + bl sub_0201C63C + ldr r1, [r4, #0] + ldr r3, [r4, #0x40] + ldr r0, [r1, #0] + ldr r1, [r1, #0x1c] + mov r2, #5 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201C63C + pop {r3, r4, r5, pc} +_02259A80: + ldr r0, [r1, #0] + ldr r1, [r1, #0x1c] + ldr r3, [r4, #0x44] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #0 + bl sub_0201C63C + ldr r1, [r4, #0] + ldr r3, [r4, #0x48] + ldr r0, [r1, #0] + ldr r1, [r1, #0x1c] + mov r2, #3 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201C63C + ldr r0, [r4, #0] + add r1, r4, #4 + bl ov22_022597BC + ldr r1, [r4, #0x34] + cmp r1, #0 + beq _02259AB4 + mov r0, #1 + str r0, [r1, #0] +_02259AB4: + add r0, r5, #0 + bl sub_020067D0 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02259A4C + + thumb_func_start ov22_02259ABC +ov22_02259ABC: ; 0x02259ABC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r1, #0 + add r4, r2, #0 + add r7, r0, #0 + ldr r1, [sp, #0x3c] + add r0, r4, #0 + add r6, r3, #0 + bl ov22_02259980 + ldr r1, [sp, #0x30] + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + lsl r1, r1, #0x18 + lsr r2, r1, #0x18 + str r0, [sp] + ldr r3, [sp, #0x38] + str r2, [sp, #4] + add r4, #0xc + lsl r3, r3, #0x18 + str r4, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + str r1, [sp, #0x10] + str r0, [sp, #0x14] + str r2, [sp, #0x18] + ldr r2, [sp, #0x34] + lsl r1, r5, #0x18 + lsl r2, r2, #0x18 + add r0, r7, #0 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x34] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x40] + ldr r3, [sp, #0x38] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + lsl r1, r5, #0x18 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + str r0, [sp, #8] + add r0, r7, #0 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_02019E2C + lsl r1, r5, #0x18 + add r0, r7, #0 + lsr r1, r1, #0x18 + bl sub_0201C3C0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_02259ABC + + thumb_func_start ov22_02259B3C +ov22_02259B3C: ; 0x02259B3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + str r1, [sp, #4] + ldr r0, [sp, #0x24] + mov r1, #0x14 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_02259B58: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _02259B58 + ldr r0, [sp, #0x24] + ldr r1, [sp, #4] + str r0, [sp] + add r0, r7, #0 + mov r2, #0 + add r3, r4, #4 + bl sub_02006F50 + str r0, [r4, #8] + str r5, [r4, #0] + ldr r0, [sp, #0x20] + str r6, [r4, #0xc] + str r0, [r4, #0x10] + ldr r0, _02259B88 ; =ov22_02259BD4 + add r1, r4, #0 + mov r2, #0x80 + bl sub_0200DA3C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02259B88: .word ov22_02259BD4 + thumb_func_end ov22_02259B3C + + thumb_func_start ov22_02259B8C +ov22_02259B8C: ; 0x02259B8C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + ldr r0, [sp, #0x1c] + mov r1, #0x14 + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_02259BA6: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _02259BA6 + ldr r1, [sp] + ldr r3, [sp, #0x1c] + add r0, r7, #0 + add r2, r4, #0 + bl sub_02006F88 + str r0, [r4, #4] + str r5, [r4, #8] + ldr r0, [sp, #0x18] + str r6, [r4, #0xc] + str r0, [r4, #0x10] + ldr r0, _02259BD0 ; =ov22_02259C10 + add r1, r4, #0 + mov r2, #0x80 + bl sub_0200DA3C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02259BD0: .word ov22_02259C10 + thumb_func_end ov22_02259B8C + + thumb_func_start ov22_02259BD4 +ov22_02259BD4: ; 0x02259BD4 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r0, [r1, #0x14] + ldr r1, [r1, #0x10] + bl sub_020C2C54 + ldr r3, [r4, #4] + ldr r0, [r4, #0x10] + str r0, [sp] + ldr r1, [r4, #0xc] + ldr r2, [r3, #0x14] + lsl r1, r1, #0x18 + ldr r0, [r4, #0] + ldr r3, [r3, #0x10] + lsr r1, r1, #0x18 + bl sub_0201958C + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #8] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_02259BD4 + + thumb_func_start ov22_02259C10 +ov22_02259C10: ; 0x02259C10 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [r4, #8] + cmp r0, #0 + bne _02259C34 + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + ldr r0, [r0, #0xc] + ldr r2, [r4, #0x10] + bl sub_020C00B4 + b _02259C44 +_02259C34: + cmp r0, #4 + bne _02259C44 + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + ldr r0, [r0, #0xc] + ldr r2, [r4, #0x10] + bl sub_020C0108 +_02259C44: + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02259C10 \ No newline at end of file diff --git a/asm/ov22_02259C58.s b/asm/ov22_02259C58.s new file mode 100644 index 000000000..94c2636f8 --- /dev/null +++ b/asm/ov22_02259C58.s @@ -0,0 +1,1050 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_02259C58 +ov22_02259C58: ; 0x02259C58 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _02259C66 + bl sub_02022974 +_02259C66: + cmp r4, #0 + bne _02259C6E + bl sub_02022974 +_02259C6E: + ldr r0, [r4, #0] + bl sub_02021AA0 + str r0, [r5, #0] + cmp r0, #0 + bne _02259C7E + bl sub_02022974 +_02259C7E: + ldr r0, [r4, #0xc] + str r0, [r5, #4] + ldr r0, [r4, #8] + str r0, [r5, #8] + ldr r0, [r4, #4] + cmp r0, #0 + beq _02259C90 + str r0, [r5, #0xc] + pop {r3, r4, r5, pc} +_02259C90: + ldr r0, _02259C98 ; =ov22_02259D94 + str r0, [r5, #0xc] + pop {r3, r4, r5, pc} + nop +_02259C98: .word ov22_02259D94 + thumb_func_end ov22_02259C58 + + thumb_func_start ov22_02259C9C +ov22_02259C9C: ; 0x02259C9C + push {r3, r4, r5, lr} + sub sp, #0x30 + add r4, r1, #0 + add r5, r0, #0 + bl ov22_02259C58 + ldr r0, [r4, #0x14] + str r0, [sp] + ldr r0, [r4, #0x10] + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + str r0, [sp, #8] + ldr r0, [r4, #0x18] + str r0, [sp, #0xc] + ldr r0, [r5, #0] + str r0, [sp, #0x10] + ldr r0, [r4, #0x24] + str r0, [sp, #0x14] + ldr r0, [r4, #0x1c] + str r0, [sp, #0x18] + ldr r0, [r4, #0x20] + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + str r0, [sp, #0x24] + ldr r0, [r4, #0] + ldr r0, [r0, #0x28] + str r0, [sp, #0x28] + ldr r0, [r4, #0] + ldr r0, [r0, #0x2c] + str r0, [sp, #0x2c] + add r0, sp, #0 + bl sub_020127E8 + str r0, [r5, #0x10] + add sp, #0x30 + pop {r3, r4, r5, pc} + thumb_func_end ov22_02259C9C + + thumb_func_start ov22_02259CE8 +ov22_02259CE8: ; 0x02259CE8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02021BD4 + mov r1, #0x10 + mov r0, #0 +_02259CF6: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _02259CF6 + pop {r4, pc} + thumb_func_end ov22_02259CE8 + + thumb_func_start ov22_02259D00 +ov22_02259D00: ; 0x02259D00 + push {r4, lr} + add r4, r0, #0 + bl ov22_02259CE8 + ldr r0, [r4, #0x10] + bl sub_02012870 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02259D00 + + thumb_func_start ov22_02259D1C +ov22_02259D1C: ; 0x02259D1C + push {r3, lr} + ldr r2, [r0, #4] + cmp r1, r2 + bne _02259D2A + ldr r1, [r0, #8] + ldr r2, [r0, #0xc] + blx r2 +_02259D2A: + pop {r3, pc} + thumb_func_end ov22_02259D1C + + thumb_func_start ov22_02259D2C +ov22_02259D2C: ; 0x02259D2C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + mov r4, #2 + add r5, #0x20 +_02259D38: + cmp r4, r7 + beq _02259D44 + add r0, r5, #0 + bl ov22_02259DA4 + b _02259D68 +_02259D44: + cmp r6, #0 + bne _02259D56 + add r0, r5, #0 + bl ov22_02259DB0 + ldr r0, _02259D74 ; =0x0000067D + bl sub_02005748 + b _02259D68 +_02259D56: + cmp r6, #2 + bne _02259D62 + add r0, r5, #0 + bl ov22_02259D98 + b _02259D68 +_02259D62: + add r0, r5, #0 + bl ov22_02259DB0 +_02259D68: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #3 + ble _02259D38 + pop {r3, r4, r5, r6, r7, pc} + nop +_02259D74: .word 0x0000067D + thumb_func_end ov22_02259D2C + + thumb_func_start ov22_02259D78 +ov22_02259D78: ; 0x02259D78 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _02259D8A + bl sub_02022974 +_02259D8A: + str r7, [r5, #4] + str r6, [r5, #8] + str r4, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02259D78 + + thumb_func_start ov22_02259D94 +ov22_02259D94: ; 0x02259D94 + bx lr + ; .align 2, 0 + thumb_func_end ov22_02259D94 + + thumb_func_start ov22_02259D98 +ov22_02259D98: ; 0x02259D98 + ldr r3, _02259DA0 ; =sub_02021E50 + ldr r0, [r0, #0] + mov r1, #2 + bx r3 + ; .align 2, 0 +_02259DA0: .word sub_02021E50 + thumb_func_end ov22_02259D98 + + thumb_func_start ov22_02259DA4 +ov22_02259DA4: ; 0x02259DA4 + ldr r3, _02259DAC ; =sub_02021E50 + ldr r0, [r0, #0] + mov r1, #0 + bx r3 + ; .align 2, 0 +_02259DAC: .word sub_02021E50 + thumb_func_end ov22_02259DA4 + + thumb_func_start ov22_02259DB0 +ov22_02259DB0: ; 0x02259DB0 + ldr r3, _02259DB8 ; =sub_02021E50 + ldr r0, [r0, #0] + mov r1, #1 + bx r3 + ; .align 2, 0 +_02259DB8: .word sub_02021E50 + thumb_func_end ov22_02259DB0 + + thumb_func_start ov22_02259DBC +ov22_02259DBC: ; 0x02259DBC + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r1, #0 + mov r0, #1 + mov r1, #0xd + bl sub_02012744 + str r0, [r5, #0x64] + add r0, r4, #0 + bl ov22_0225A218 + mov r0, #0x90 + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0x20 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0 + add r2, r4, #0 + mov r3, #0x30 + bl ov22_0225A0E4 + mov r0, #0x28 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x6c + mov r1, #0 + mov r2, #0x30 + mov r3, #0x98 + bl ov22_0225A200 + mov r0, #0x90 + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0x20 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x10 + mov r1, #1 + add r2, r4, #0 + mov r3, #8 + bl ov22_0225A0E4 + mov r0, #0x28 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x6c + mov r1, #1 + mov r2, #8 + mov r3, #0x98 + bl ov22_0225A200 + mov r0, #0x90 + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x20 + mov r1, #2 + add r2, r4, #0 + mov r3, #0x60 + bl ov22_0225A0E4 + mov r0, #0x28 + str r0, [sp] + mov r0, #0x22 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x6c + mov r1, #2 + mov r2, #0x60 + mov r3, #0x9c + bl ov22_0225A200 + mov r0, #0x90 + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0x2a + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x30 + mov r1, #3 + add r2, r4, #0 + mov r3, #0x88 + bl ov22_0225A0E4 + mov r0, #0x28 + str r0, [sp] + mov r0, #0x22 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x6c + mov r1, #3 + mov r2, #0x88 + mov r3, #0x9c + bl ov22_0225A200 + mov r0, #2 + mov r1, #0xe + bl sub_02002BB8 + mov r0, #9 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + ldr r2, _02259F1C ; =0x00000181 + add r0, r4, #0 + mov r1, #0x1a + mov r3, #0 + bl ov22_0225A348 + add r6, r0, #0 + str r6, [sp] + mov r0, #0xb8 + str r0, [sp, #4] + mov r0, #0x90 + str r0, [sp, #8] + mov r0, #0x48 + str r0, [sp, #0xc] + mov r0, #0x2a + str r0, [sp, #0x10] + add r0, r5, #0 + ldr r3, [r5, #0x64] + add r0, #0x40 + mov r1, #4 + add r2, r4, #0 + bl ov22_0225A154 + mov r0, #0x48 + str r0, [sp] + mov r0, #0x22 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x6c + mov r1, #4 + mov r2, #0xb8 + mov r3, #0x9c + bl ov22_0225A200 + add r0, r6, #0 + bl ov22_0225A3D0 + mov r0, #2 + bl sub_02002C60 + mov r0, #1 + str r0, [r5, #0x60] + add r0, r4, #0 + bl ov22_0225A2A8 + add r0, r5, #0 + add r0, #0x20 + bl ov22_02259D98 + mov r0, #0xd + str r0, [sp] + add r0, r5, #0 + ldr r2, _02259F20 ; =ov22_0225A02C + add r0, #0x6c + mov r1, #5 + add r3, r5, #0 + bl sub_02023FCC + str r0, [r5, #0x68] + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02259F1C: .word 0x00000181 +_02259F20: .word ov22_0225A02C + thumb_func_end ov22_02259DBC + + thumb_func_start ov22_02259F24 +ov22_02259F24: ; 0x02259F24 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r4, #0 +_02259F2C: + add r0, r5, #0 + add r1, r4, #0 + bl ov22_022552EC + add r0, r5, #0 + add r1, r4, #0 + bl ov22_02255300 + add r0, r4, #0 + bl sub_0201EB50 + add r4, r4, #1 + cmp r4, #5 + blt _02259F2C + mov r0, #0 + bl sub_0201F9F0 + mov r0, #1 + bl sub_0201F9F0 + mov r5, #0 + add r4, r6, #0 +_02259F58: + add r0, r4, #0 + bl ov22_02259CE8 + add r5, r5, #1 + add r4, #0x10 + cmp r5, #4 + blt _02259F58 + add r0, r6, #0 + add r0, #0x54 + bl sub_0201EE28 + add r0, r6, #0 + add r0, #0x40 + bl ov22_02259D00 + ldr r0, [r6, #0x64] + bl sub_020127BC + ldr r0, [r6, #0x68] + bl sub_02024034 + mov r0, #0 + str r0, [r6, #0x68] + pop {r4, r5, r6, pc} + thumb_func_end ov22_02259F24 + + thumb_func_start ov22_02259F88 +ov22_02259F88: ; 0x02259F88 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x68] + cmp r0, #0 + bne _02259F96 + bl sub_02022974 +_02259F96: + ldr r0, [r4, #0x68] + bl sub_0202404C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02259F88 + + thumb_func_start ov22_02259FA0 +ov22_02259FA0: ; 0x02259FA0 + push {r4, lr} + add r4, r0, #0 + add r0, #0x40 + mov r1, #3 + bl ov22_0225A2D0 + add r0, r4, #0 + add r0, #0x40 + mov r1, #3 + bl ov22_0225A2F4 + add r0, r4, #0 + mov r1, #2 + mov r2, #3 + bl ov22_02259D2C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_02259FA0 + + thumb_func_start ov22_02259FC4 +ov22_02259FC4: ; 0x02259FC4 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r6, r1, #0 + add r7, r2, #0 + mov r4, #0 + add r5, r0, #0 +_02259FD0: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov22_0225A3DC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _02259FD0 + ldr r0, [sp] + add r1, r6, #0 + add r0, #0x40 + add r2, r7, #0 + str r0, [sp] + bl ov22_0225A418 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02259FC4 + + thumb_func_start ov22_02259FF4 +ov22_02259FF4: ; 0x02259FF4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _0225A006 + bl sub_02022974 +_0225A006: + cmp r4, #4 + bge _0225A01A + lsl r0, r4, #4 + ldr r3, [sp, #0x18] + add r0, r5, r0 + add r1, r6, #0 + add r2, r7, #0 + bl ov22_02259D78 + pop {r3, r4, r5, r6, r7, pc} +_0225A01A: + add r5, #0x40 + ldr r3, [sp, #0x18] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov22_02259D78 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_02259FF4 + + thumb_func_start ov22_0225A02C +ov22_0225A02C: ; 0x0225A02C + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + cmp r6, #4 + bhi _0225A0D4 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225A044: ; jump table + .short _0225A04E - _0225A044 - 2 ; case 0 + .short _0225A06A - _0225A044 - 2 ; case 1 + .short _0225A08C - _0225A044 - 2 ; case 2 + .short _0225A08C - _0225A044 - 2 ; case 3 + .short _0225A0A2 - _0225A044 - 2 ; case 4 +_0225A04E: + add r0, r4, #0 + bl ov22_0225A2D0 + ldr r1, _0225A0DC ; =0x00000681 + add r0, r4, #0 + mov r2, #0 + add r3, r5, #0 + bl ov22_0225A338 + add r0, r4, #0 + add r1, r5, #0 + bl ov22_02259D1C + pop {r4, r5, r6, pc} +_0225A06A: + add r0, r4, #0 + add r0, #0x10 + bl ov22_0225A2D0 + add r0, r4, #0 + ldr r1, _0225A0DC ; =0x00000681 + add r0, #0x10 + mov r2, #0 + add r3, r5, #0 + bl ov22_0225A338 + add r4, #0x10 + add r0, r4, #0 + add r1, r5, #0 + bl ov22_02259D1C + pop {r4, r5, r6, pc} +_0225A08C: + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov22_02259D2C + lsl r0, r6, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov22_02259D1C + pop {r4, r5, r6, pc} +_0225A0A2: + ldr r0, [r4, #0x60] + cmp r0, #1 + bne _0225A0D8 + add r0, r4, #0 + add r0, #0x40 + bl ov22_0225A2D0 + add r0, r4, #0 + add r0, #0x40 + add r1, r5, #0 + bl ov22_0225A2F4 + add r0, r4, #0 + ldr r1, _0225A0E0 ; =0x000005E2 + add r0, #0x40 + mov r2, #0 + add r3, r5, #0 + bl ov22_0225A338 + add r4, #0x40 + add r0, r4, #0 + add r1, r5, #0 + bl ov22_02259D1C + pop {r4, r5, r6, pc} +_0225A0D4: + bl sub_02022974 +_0225A0D8: + pop {r4, r5, r6, pc} + nop +_0225A0DC: .word 0x00000681 +_0225A0E0: .word 0x000005E2 + thumb_func_end ov22_0225A02C + + thumb_func_start ov22_0225A0E4 +ov22_0225A0E4: ; 0x0225A0E4 + push {r4, r5, r6, lr} + sub sp, #0x90 + add r6, r0, #0 + mov r0, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + add r5, r2, #0 + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + str r2, [sp, #0x10] + ldr r0, [r5, #0x48] + add r4, r3, #0 + str r0, [sp, #0x14] + ldr r0, [r5, #0x4c] + add r3, r1, #0 + str r0, [sp, #0x18] + ldr r0, [r5, #0x50] + str r0, [sp, #0x1c] + ldr r0, [r5, #0x54] + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r0, sp, #0x5c + bl sub_020093B4 + ldr r0, [r5, #0x44] + mov r2, #0 + mov r1, #1 + str r0, [sp, #0x2c] + add r0, sp, #0x5c + str r0, [sp, #0x30] + lsl r0, r4, #0xc + str r0, [sp, #0x34] + ldr r0, [sp, #0xa0] + str r1, [sp, #0x54] + lsl r0, r0, #0xc + str r0, [sp, #0x38] + mov r0, #2 + str r0, [sp, #0x50] + mov r0, #0xe + str r0, [sp, #0x58] + add r0, sp, #0x2c + str r0, [sp, #0x80] + str r1, [sp, #0x8c] + add r0, r6, #0 + add r1, sp, #0x80 + str r2, [sp, #0x3c] + str r2, [sp, #0x84] + str r2, [sp, #0x88] + bl ov22_02259C58 + add sp, #0x90 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A0E4 + + thumb_func_start ov22_0225A154 +ov22_0225A154: ; 0x0225A154 + push {r4, r5, r6, lr} + sub sp, #0xa8 + add r5, r0, #0 + mov r0, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + add r4, r2, #0 + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + str r2, [sp, #0x10] + ldr r0, [r4, #0x48] + add r6, r3, #0 + str r0, [sp, #0x14] + ldr r0, [r4, #0x4c] + add r3, r1, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #0x50] + str r0, [sp, #0x1c] + ldr r0, [r4, #0x54] + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r0, sp, #0x5c + bl sub_020093B4 + ldr r0, [r4, #0x44] + mov r2, #0xe + str r0, [sp, #0x2c] + add r0, sp, #0x5c + str r0, [sp, #0x30] + ldr r0, [sp, #0xbc] + str r2, [sp, #0x58] + lsl r0, r0, #0xc + str r0, [sp, #0x34] + ldr r0, [sp, #0xc0] + add r2, sp, #0x2c + lsl r0, r0, #0xc + mov r1, #2 + str r2, [sp, #0x80] + ldr r2, [sp, #0xb8] + str r0, [sp, #0x38] + mov r0, #0 + str r1, [sp, #0x50] + mov r1, #1 + str r0, [sp, #0x3c] + str r1, [sp, #0x54] + str r0, [sp, #0x84] + str r0, [sp, #0x88] + str r0, [sp, #0x9c] + mov r0, #0x13 + str r1, [sp, #0x8c] + str r6, [sp, #0x94] + str r2, [sp, #0x90] + str r0, [sp, #0xa0] + ldr r0, [r4, #0x4c] + bl sub_02009DC8 + mov r1, #0 + bl sub_0200A72C + str r0, [sp, #0x98] + ldr r0, [sp, #0xb8] + mov r1, #1 + mov r2, #0xd + bl sub_02012898 + mov r1, #1 + add r3, r5, #0 + add r2, r1, #0 + add r3, #0x14 + bl sub_0201ED94 + cmp r0, #0 + bne _0225A1F0 + bl sub_02022974 +_0225A1F0: + ldr r0, [r5, #0x18] + add r1, sp, #0x80 + str r0, [sp, #0xa4] + add r0, r5, #0 + bl ov22_02259C9C + add sp, #0xa8 + pop {r4, r5, r6, pc} + thumb_func_end ov22_0225A154 + + thumb_func_start ov22_0225A200 +ov22_0225A200: ; 0x0225A200 + lsl r1, r1, #2 + strb r3, [r0, r1] + add r1, r0, r1 + ldr r0, [sp, #4] + strb r2, [r1, #2] + add r0, r3, r0 + strb r0, [r1, #1] + ldr r0, [sp] + add r0, r2, r0 + strb r0, [r1, #3] + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225A200 + + thumb_func_start ov22_0225A218 +ov22_0225A218: ; 0x0225A218 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x6b + mov r4, #0 + str r0, [sp, #0xc] + mov r7, #0x6a + mov r6, #0x69 +_0225A228: + mov r0, #1 + str r0, [sp] + mov r1, #6 + str r4, [sp, #4] + lsl r1, r1, #6 + ldr r1, [r5, r1] + ldr r2, [sp, #0xc] + add r0, r5, #0 + mov r3, #0 + bl ov22_02255248 + mov r1, #6 + str r4, [sp] + lsl r1, r1, #6 + ldr r1, [r5, r1] + add r0, r5, #0 + add r2, r7, #0 + mov r3, #0 + bl ov22_0225528C + mov r1, #6 + str r4, [sp] + lsl r1, r1, #6 + ldr r1, [r5, r1] + add r0, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov22_022552A8 + ldr r0, [sp, #0xc] + add r4, r4, #1 + add r0, r0, #3 + str r0, [sp, #0xc] + add r7, r7, #3 + add r6, r6, #3 + cmp r4, #5 + blt _0225A228 + mov r0, #1 + str r0, [sp] + mov r1, #3 + str r1, [sp, #4] + mov r3, #0 + str r3, [sp, #8] + lsl r1, r1, #7 + ldr r1, [r5, r1] + add r0, r5, #0 + mov r2, #0x68 + bl ov22_02255268 + mov r1, #1 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #6 + lsl r1, r1, #6 + ldr r1, [r5, r1] + add r0, r5, #0 + mov r2, #0x78 + mov r3, #0 + bl ov22_02255268 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_0225A218 + + thumb_func_start ov22_0225A2A8 +ov22_0225A2A8: ; 0x0225A2A8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0225A2AE: + add r0, r5, #0 + add r1, r4, #0 + bl ov22_022552C4 + add r4, r4, #1 + cmp r4, #5 + blt _0225A2AE + add r0, r5, #0 + mov r1, #0 + bl ov22_022552D8 + add r0, r5, #0 + mov r1, #1 + bl ov22_022552D8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A2A8 + + thumb_func_start ov22_0225A2D0 +ov22_0225A2D0: ; 0x0225A2D0 + push {r3, lr} + cmp r1, #0 + bne _0225A2DC + bl ov22_02259DB0 + pop {r3, pc} +_0225A2DC: + cmp r1, #2 + bne _0225A2E6 + bl ov22_02259D98 + pop {r3, pc} +_0225A2E6: + cmp r1, #1 + beq _0225A2EE + cmp r1, #3 + bne _0225A2F2 +_0225A2EE: + bl ov22_02259DA4 +_0225A2F2: + pop {r3, pc} + thumb_func_end ov22_0225A2D0 + + thumb_func_start ov22_0225A2F4 +ov22_0225A2F4: ; 0x0225A2F4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bne _0225A310 + ldr r0, [r5, #0x10] + mov r1, #0 + mov r2, #0xf + bl sub_020128C4 + ldr r0, [r5, #0x10] + mov r1, #4 + bl sub_02012A60 + pop {r3, r4, r5, pc} +_0225A310: + cmp r4, #1 + bne _0225A31E + ldr r0, [r5, #0x10] + mov r1, #0 + mov r2, #0x13 + bl sub_020128C4 +_0225A31E: + cmp r4, #3 + bne _0225A334 + ldr r0, [r5, #0x10] + mov r1, #0 + mov r2, #0x13 + bl sub_020128C4 + ldr r0, [r5, #0x10] + mov r1, #3 + bl sub_02012A60 +_0225A334: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A2F4 + + thumb_func_start ov22_0225A338 +ov22_0225A338: ; 0x0225A338 + push {r3, lr} + cmp r3, r2 + bne _0225A346 + lsl r0, r1, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_0225A346: + pop {r3, pc} + thumb_func_end ov22_0225A338 + + thumb_func_start ov22_0225A348 +ov22_0225A348: ; 0x0225A348 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r0, #0 + add r4, r3, #0 + mov r0, #0 + mov r3, #0xd + bl sub_0200B144 + add r7, r0, #0 + bne _0225A360 + bl sub_02022974 +_0225A360: + add r0, r7, #0 + add r1, r4, #0 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0xe + mov r1, #1 + bl sub_0201A778 + add r4, r0, #0 + bl sub_0201A7A0 + mov r0, #0 + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x2c] + str r0, [sp] + str r0, [sp, #4] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r6, #0x40] + add r1, r4, #0 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A870 + ldr r3, [sp, #0x28] + mov r0, #2 + add r1, r5, #0 + mov r2, #0 + lsl r3, r3, #3 + bl sub_02002EEC + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0225A3CC ; =0x00010203 + add r2, r5, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r4, #0 + mov r1, #2 + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225A3CC: .word 0x00010203 + thumb_func_end ov22_0225A348 + + thumb_func_start ov22_0225A3D0 +ov22_0225A3D0: ; 0x0225A3D0 + ldr r3, _0225A3D8 ; =sub_0201A928 + mov r1, #1 + bx r3 + nop +_0225A3D8: .word sub_0201A928 + thumb_func_end ov22_0225A3D0 + + thumb_func_start ov22_0225A3DC +ov22_0225A3DC: ; 0x0225A3DC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r6, r2, #0 + bl sub_02021D28 + add r3, r0, #0 + add r2, sp, #0 + ldmia r3!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [sp] + lsl r0, r4, #0xc + add r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + lsl r0, r6, #0xc + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r1, r7, #0 + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A3DC + + thumb_func_start ov22_0225A418 +ov22_0225A418: ; 0x0225A418 + push {r4, lr} + add r4, r0, #0 + bl ov22_0225A3DC + ldr r0, [r4, #0x10] + bl sub_02012938 + pop {r4, pc} + thumb_func_end ov22_0225A418 \ No newline at end of file diff --git a/asm/ov22_0225A428.s b/asm/ov22_0225A428.s new file mode 100644 index 000000000..1b6dc6f39 --- /dev/null +++ b/asm/ov22_0225A428.s @@ -0,0 +1,1482 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_0225A428 +ov22_0225A428: ; 0x0225A428 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r1, #0 + add r6, r2, #0 + mov r1, #1 + add r5, r0, #0 + tst r1, r6 + beq _0225A442 + mov r2, #0x52 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 +_0225A442: + mov r0, #2 + tst r0, r6 + beq _0225A450 + ldr r1, [r4, #0] + add r0, r5, #0 + bl ov22_0225A6E0 +_0225A450: + mov r0, #4 + add r1, r6, #0 + tst r1, r0 + beq _0225A474 + mov r1, #0x1b + str r1, [sp] + str r0, [sp, #4] + mov r0, #0x1f + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r5, #0 + ldr r1, [r4, #0] + add r0, #0x2c + mov r2, #2 + mov r3, #0x13 + bl ov22_0225A748 +_0225A474: + mov r0, #8 + tst r0, r6 + beq _0225A48C + ldr r0, [r4, #0x24] + str r0, [sp] + add r0, r5, #0 + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0x10] + add r0, #0x38 + bl ov22_0225A914 +_0225A48C: + mov r0, #0x10 + tst r0, r6 + beq _0225A4AC + ldr r0, [r4, #0] + str r0, [sp] + ldr r0, [r4, #0x20] + str r0, [sp, #4] + ldr r0, [r4, #0x24] + str r0, [sp, #8] + add r0, r5, #0 + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0x1c] + add r0, #0xa0 + bl ov22_0225AB54 +_0225A4AC: + mov r0, #0x20 + tst r0, r6 + beq _0225A522 + mov r0, #0x1b + str r0, [sp] + mov r2, #2 + str r2, [sp, #4] + mov r0, #0x8b + str r0, [sp, #8] + mov r3, #1 + str r3, [sp, #0xc] + add r0, #0xa9 + ldr r1, [r4, #0] + add r0, r5, r0 + bl ov22_0225A748 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0225A55C ; =0x0001020F + mov r1, #0x1a + str r0, [sp, #8] + mov r0, #0xff + str r0, [sp, #0xc] + add r0, #0x35 + ldr r0, [r5, r0] + ldr r2, [r4, #0x14] + mov r3, #6 + bl ov22_0225A860 + mov r0, #0x48 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0225A55C ; =0x0001020F + mov r1, #0x1a + str r0, [sp, #8] + mov r0, #0xff + str r0, [sp, #0xc] + add r0, #0x35 + ldr r0, [r5, r0] + ldr r2, [r4, #0x14] + ldr r3, [r4, #0x18] + bl ov22_0225A860 + mov r0, #0x4d + lsl r0, r0, #2 + mov r2, #1 + ldr r0, [r5, r0] + mov r1, #0 + add r3, r2, #0 + bl sub_0200E060 +_0225A522: + ldr r0, [r4, #4] + str r0, [r5, #0x30] + ldr r0, [r4, #8] + str r0, [r5, #0x34] + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + bl ov22_0225A718 + ldr r0, [r4, #0xc] + bl sub_02027B50 + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #0xc] + bl sub_02027AC0 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + add r0, r1, #0 + sub r0, #8 + ldr r0, [r5, r0] + sub r1, #8 + orr r0, r6 + str r0, [r5, r1] + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0225A55C: .word 0x0001020F + thumb_func_end ov22_0225A428 + + thumb_func_start ov22_0225A560 +ov22_0225A560: ; 0x0225A560 + push {r4, lr} + mov r1, #0x4e + add r4, r0, #0 + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r1, #2 + tst r1, r2 + beq _0225A580 + bl ov22_0225A7B8 + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #2 + bic r2, r0 + str r2, [r4, r1] +_0225A580: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r0, #4 + tst r0, r1 + beq _0225A59E + ldr r0, [r4, #0x2c] + bl ov22_0225A7C0 + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #4 + bic r2, r0 + str r2, [r4, r1] +_0225A59E: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r0, #8 + tst r0, r1 + beq _0225A5C0 + add r0, r4, #0 + ldr r1, [r4, #0x34] + add r0, #0x38 + bl ov22_0225AA10 + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #8 + bic r2, r0 + str r2, [r4, r1] +_0225A5C0: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r0, #0x10 + tst r0, r1 + beq _0225A5E2 + add r0, r4, #0 + ldr r1, [r4, #0x34] + add r0, #0xa0 + bl ov22_0225AC58 + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #0x10 + bic r2, r0 + str r2, [r4, r1] +_0225A5E2: + mov r0, #0x4e + lsl r0, r0, #2 + ldr r2, [r4, r0] + mov r1, #0x20 + tst r1, r2 + beq _0225A602 + sub r0, r0, #4 + ldr r0, [r4, r0] + bl ov22_0225A7C0 + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #0x20 + bic r2, r0 + str r2, [r4, r1] +_0225A602: + mov r2, #0x52 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov22_0225A560 + + thumb_func_start ov22_0225A610 +ov22_0225A610: ; 0x0225A610 + push {r3, lr} + mov r1, #0x4e + lsl r1, r1, #2 + ldr r2, [r0, r1] + mov r1, #0x10 + tst r1, r2 + beq _0225A624 + add r0, #0xa0 + bl ov22_0225AC8C +_0225A624: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A610 + + thumb_func_start ov22_0225A628 +ov22_0225A628: ; 0x0225A628 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x4e + lsl r0, r0, #2 + add r4, r1, #0 + ldr r1, [r5, r0] + mov r0, #4 + add r6, r2, #0 + add r7, r3, #0 + tst r0, r1 + bne _0225A644 + bl sub_02022974 +_0225A644: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0xff + str r0, [sp, #8] + ldr r0, [r5, #0x2c] + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov22_0225A7CC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A628 + + thumb_func_start ov22_0225A660 +ov22_0225A660: ; 0x0225A660 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x4e + lsl r0, r0, #2 + add r4, r1, #0 + ldr r1, [r5, r0] + mov r0, #4 + add r6, r2, #0 + add r7, r3, #0 + tst r0, r1 + bne _0225A67C + bl sub_02022974 +_0225A67C: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #5 + lsl r0, r0, #6 + ldr r1, [r5, r0] + add r0, r0, #4 + str r1, [sp, #8] + add r0, r5, r0 + str r0, [sp, #0xc] + ldr r0, [r5, #0x2c] + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov22_0225A814 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_0225A660 + + thumb_func_start ov22_0225A6A0 +ov22_0225A6A0: ; 0x0225A6A0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020237BC + mov r0, #0x51 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} + thumb_func_end ov22_0225A6A0 + + thumb_func_start ov22_0225A6B8 +ov22_0225A6B8: ; 0x0225A6B8 + ldr r3, _0225A6C0 ; =ov22_0225A9C8 + add r0, #0x38 + bx r3 + nop +_0225A6C0: .word ov22_0225A9C8 + thumb_func_end ov22_0225A6B8 + + thumb_func_start ov22_0225A6C4 +ov22_0225A6C4: ; 0x0225A6C4 + add r0, #0xbc + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225A6C4 + + thumb_func_start ov22_0225A6CC +ov22_0225A6CC: ; 0x0225A6CC + add r0, #0xc0 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225A6CC + + thumb_func_start ov22_0225A6D4 +ov22_0225A6D4: ; 0x0225A6D4 + ldr r3, _0225A6DC ; =ov22_0225AF34 + add r0, #0xd0 + bx r3 + nop +_0225A6DC: .word ov22_0225AF34 + thumb_func_end ov22_0225A6D4 + + thumb_func_start ov22_0225A6E0 +ov22_0225A6E0: ; 0x0225A6E0 + push {r3, lr} + sub sp, #0x30 + str r1, [sp] + mov r1, #0x19 + str r1, [sp, #4] + mov r1, #0xe0 + str r1, [sp, #8] + mov r1, #0xe1 + str r1, [sp, #0xc] + mov r2, #0 + mov r1, #0xe2 + str r1, [sp, #0x10] + mov r1, #4 + str r1, [sp, #0x1c] + mov r1, #1 + str r1, [sp, #0x20] + mov r1, #0xe + str r1, [sp, #0x2c] + add r1, sp, #0 + str r2, [sp, #0x14] + str r2, [sp, #0x18] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + bl ov22_022597BC + add sp, #0x30 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A6E0 + + thumb_func_start ov22_0225A718 +ov22_0225A718: ; 0x0225A718 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + add r0, r1, #0 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xe + mov r2, #1 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #5 + add r3, r2, #0 + bl sub_0200DD0C + mov r0, #4 + mov r1, #0x40 + mov r2, #0xe + bl sub_02002E98 + add sp, #8 + pop {r4, pc} + thumb_func_end ov22_0225A718 + + thumb_func_start ov22_0225A748 +ov22_0225A748: ; 0x0225A748 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r1, #0 + add r6, r3, #0 + mov r0, #0xe + mov r1, #1 + add r4, r2, #0 + bl sub_0201A778 + str r0, [r5, #0] + bl sub_0201A7A0 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x28] + lsl r3, r4, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + mov r2, #5 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + ldr r0, [sp, #0x30] + lsr r3, r3, #0x18 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r1, [r5, #0] + add r0, r7, #0 + bl sub_0201A7E8 + ldr r0, [r5, #0] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [sp, #0x34] + cmp r0, #0 + beq _0225A7AC + mov r2, #1 + ldr r0, [r5, #0] + mov r1, #0 + add r3, r2, #0 + bl sub_0200E060 +_0225A7AC: + ldr r0, [r5, #0] + bl sub_0201A954 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A748 + + thumb_func_start ov22_0225A7B8 +ov22_0225A7B8: ; 0x0225A7B8 + ldr r3, _0225A7BC ; =ov22_02259804 + bx r3 + ; .align 2, 0 +_0225A7BC: .word ov22_02259804 + thumb_func_end ov22_0225A7B8 + + thumb_func_start ov22_0225A7C0 +ov22_0225A7C0: ; 0x0225A7C0 + ldr r3, _0225A7C8 ; =sub_0201A928 + mov r1, #1 + bx r3 + nop +_0225A7C8: .word sub_0201A928 + thumb_func_end ov22_0225A7C0 + + thumb_func_start ov22_0225A7CC +ov22_0225A7CC: ; 0x0225A7CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + mov r1, #0xf + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x28] + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0x2c] + add r2, r6, #0 + str r0, [sp, #4] + ldr r0, _0225A810 ; =0x0001020F + add r3, r7, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + add r0, r5, #0 + bl ov22_0225A860 + mov r2, #1 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + add r3, r2, #0 + bl sub_0200E060 + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225A810: .word 0x0001020F + thumb_func_end ov22_0225A7CC + + thumb_func_start ov22_0225A814 +ov22_0225A814: ; 0x0225A814 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + mov r1, #0xf + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x28] + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0x2c] + add r2, r6, #0 + str r0, [sp, #4] + ldr r0, _0225A85C ; =0x0001020F + add r3, r7, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + ldr r0, [sp, #0x34] + str r0, [sp, #0x10] + add r0, r5, #0 + bl ov22_0225A8B4 + mov r2, #1 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0 + add r3, r2, #0 + bl sub_0200E060 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0225A85C: .word 0x0001020F + thumb_func_end ov22_0225A814 + + thumb_func_start ov22_0225A860 +ov22_0225A860: ; 0x0225A860 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + add r4, r3, #0 + mov r0, #0 + mov r3, #0xd + bl sub_0200B144 + add r5, r0, #0 + bne _0225A878 + bl sub_02022974 +_0225A878: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x20] + str r0, [sp] + ldr r0, [sp, #0x2c] + mov r1, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x28] + add r2, r4, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r6, #0 + bl sub_0201D78C + add r6, r0, #0 + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_0200B190 + add r0, r6, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_0225A860 + + thumb_func_start ov22_0225A8B4 +ov22_0225A8B4: ; 0x0225A8B4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r4, [sp, #0x38] + add r7, r0, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + add r6, r2, #0 + str r3, [sp, #0x10] + cmp r0, #0 + beq _0225A8CC + bl sub_02022974 +_0225A8CC: + mov r0, #0 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0xd + bl sub_0200B144 + add r5, r0, #0 + bne _0225A8E0 + bl sub_02022974 +_0225A8E0: + ldr r1, [sp, #0x10] + add r0, r5, #0 + bl sub_0200B1EC + str r0, [r4, #0] + ldr r0, [sp, #0x2c] + ldr r3, [sp, #0x28] + str r0, [sp] + ldr r0, [sp, #0x34] + mov r1, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r4, #0] + add r0, r7, #0 + bl sub_0201D78C + add r4, r0, #0 + add r0, r5, #0 + bl sub_0200B190 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_0225A8B4 + + thumb_func_start ov22_0225A914 +ov22_0225A914: ; 0x0225A914 + push {r4, r5, r6, r7, lr} + sub sp, #0x6c + add r5, r1, #0 + mov r1, #0x67 + str r1, [sp] + mov r1, #0xe1 + str r1, [sp, #4] + mov r1, #0x66 + str r1, [sp, #8] + mov r1, #0x65 + str r1, [sp, #0xc] + mov r1, #2 + str r1, [sp, #0x10] + mov r1, #0x7d + add r4, r2, #0 + str r3, [sp, #0x1c] + lsl r1, r1, #4 + str r1, [sp, #0x14] + ldr r3, [sp, #0x80] + str r0, [sp, #0x18] + add r1, r4, #0 + mov r2, #0xe + bl ov22_0225AA34 + ldr r0, [sp, #0x18] + add r1, r4, #0 + add r2, sp, #0x48 + mov r3, #0 + bl ov22_0225AAF4 + add r0, sp, #0x48 + str r0, [sp, #0x2c] + mov r0, #2 + str r0, [sp, #0x40] + mov r0, #0 + str r0, [sp, #0x24] + str r0, [sp, #0x3c] + mov r0, #0xe + str r0, [sp, #0x44] + mov r0, #0x68 + ldr r7, [sp, #0x24] + str r5, [sp, #0x28] + str r0, [sp, #0x20] +_0225A96A: + ldr r0, [sp, #0x20] + mov r6, #0 + str r0, [sp, #0x34] + lsl r1, r0, #0xc + mov r0, #2 + lsl r0, r0, #0x14 + str r1, [sp, #0x34] + add r0, r1, r0 + str r0, [sp, #0x34] + ldr r0, [sp, #0x18] + lsl r1, r7, #2 + mov r4, #0x26 + add r5, r0, r1 +_0225A984: + str r4, [sp, #0x30] + lsl r0, r4, #0xc + str r0, [sp, #0x30] + add r0, sp, #0x28 + bl sub_02021B90 + mov r1, #1 + str r0, [r5, #0x10] + bl sub_02021D6C + ldr r0, [sp, #0x1c] + add r1, r6, r7 + cmp r1, r0 + blt _0225A9A8 + ldr r0, [r5, #0x10] + mov r1, #0 + bl sub_02021CAC +_0225A9A8: + add r6, r6, #1 + add r4, #0x12 + add r5, r5, #4 + cmp r6, #0xa + blt _0225A984 + ldr r0, [sp, #0x20] + add r7, #0xa + add r0, #0x12 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, #2 + blt _0225A96A + add sp, #0x6c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_0225A914 + + thumb_func_start ov22_0225A9C8 +ov22_0225A9C8: ; 0x0225A9C8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r6, [r7, #0x60] + add r5, r1, #0 + cmp r6, r5 + bge _0225A9EE + cmp r6, r5 + bge _0225AA0C + lsl r0, r6, #2 + add r4, r7, r0 +_0225A9DC: + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_02021D6C + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r5 + blt _0225A9DC + b _0225AA0C +_0225A9EE: + cmp r6, r5 + ble _0225AA0C + sub r6, r6, #1 + cmp r6, r5 + blt _0225AA0C + lsl r0, r6, #2 + add r4, r7, r0 +_0225A9FC: + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02021D6C + sub r6, r6, #1 + sub r4, r4, #4 + cmp r6, r5 + bge _0225A9FC +_0225AA0C: + str r5, [r7, #0x60] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_0225A9C8 + + thumb_func_start ov22_0225AA10 +ov22_0225AA10: ; 0x0225AA10 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r4, #0 + add r5, r6, #0 +_0225AA1A: + ldr r0, [r5, #0x10] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x14 + blt _0225AA1A + add r0, r6, #0 + add r1, r7, #0 + bl ov22_0225AAC0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AA10 + + thumb_func_start ov22_0225AA34 +ov22_0225AA34: ; 0x0225AA34 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r2, #0 + ldr r7, [sp, #0x3c] + ldr r2, [sp, #0x28] + add r5, r0, #0 + add r0, r7, r2 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + add r4, r1, #0 + str r6, [sp, #8] + ldr r0, [r4, #0] + str r3, [sp, #0x10] + add r1, r3, #0 + mov r3, #0 + bl sub_02009A4C + str r0, [r5, #0] + bl sub_0200A3DC + ldr r0, [r5, #0] + bl sub_02009D4C + ldr r2, [sp, #0x2c] + ldr r1, [sp, #0x10] + add r0, r7, r2 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x38] + mov r3, #0 + str r0, [sp, #8] + str r6, [sp, #0xc] + ldr r0, [r4, #4] + bl sub_02009B04 + str r0, [r5, #4] + bl sub_0200A640 + ldr r0, [r5, #4] + bl sub_02009D4C + ldr r2, [sp, #0x30] + ldr r1, [sp, #0x10] + add r0, r7, r2 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #8] + mov r3, #0 + bl sub_02009BC4 + ldr r2, [sp, #0x34] + str r0, [r5, #8] + add r0, r7, r2 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r4, #0xc] + ldr r1, [sp, #0x10] + mov r3, #0 + bl sub_02009BC4 + str r0, [r5, #0xc] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AA34 + + thumb_func_start ov22_0225AAC0 +ov22_0225AAC0: ; 0x0225AAC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + bl sub_0200A4E4 + ldr r0, [r5, #4] + bl sub_0200A6DC + ldr r0, [r4, #0] + ldr r1, [r5, #0] + bl sub_02009D68 + ldr r0, [r4, #4] + ldr r1, [r5, #4] + bl sub_02009D68 + ldr r0, [r4, #8] + ldr r1, [r5, #8] + bl sub_02009D68 + ldr r0, [r4, #0xc] + ldr r1, [r5, #0xc] + bl sub_02009D68 + pop {r3, r4, r5, pc} + thumb_func_end ov22_0225AAC0 + + thumb_func_start ov22_0225AAF4 +ov22_0225AAF4: ; 0x0225AAF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r7, r2, #0 + add r6, r3, #0 + bl sub_02009E08 + str r0, [sp, #0x2c] + ldr r0, [r5, #4] + bl sub_02009E08 + str r0, [sp, #0x30] + ldr r0, [r5, #8] + bl sub_02009E08 + str r0, [sp, #0x34] + ldr r0, [r5, #0xc] + bl sub_02009E08 + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r6, [sp, #0x10] + ldr r1, [r4, #0] + ldr r2, [sp, #0x30] + str r1, [sp, #0x14] + ldr r1, [r4, #4] + ldr r3, [sp, #0x34] + str r1, [sp, #0x18] + ldr r1, [r4, #8] + str r1, [sp, #0x1c] + ldr r1, [r4, #0xc] + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r1, [sp, #0x2c] + add r0, r7, #0 + bl sub_020093B4 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AAF4 + + thumb_func_start ov22_0225AB54 +ov22_0225AB54: ; 0x0225AB54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r4, r1, #0 + mov r1, #0xe5 + str r1, [sp] + mov r1, #0xe6 + str r1, [sp, #4] + mov r1, #0xe4 + str r1, [sp, #8] + mov r1, #0xe3 + str r1, [sp, #0xc] + mov r1, #2 + str r1, [sp, #0x10] + ldr r1, _0225AC50 ; =0x00000BB8 + add r5, r2, #0 + str r3, [sp, #0x18] + str r1, [sp, #0x14] + ldr r3, [sp, #0x80] + add r7, r0, #0 + add r1, r5, #0 + mov r2, #0xe + bl ov22_0225AA34 + add r0, r7, #0 + add r1, r5, #0 + add r2, sp, #0x3c + mov r3, #0 + bl ov22_0225AAF4 + add r0, sp, #0x3c + str r0, [sp, #0x20] + mov r2, #2 + mov r0, #0xe + mov r1, #0x3a + str r0, [sp, #0x38] + lsl r1, r1, #0xc + lsl r0, r2, #0x14 + mov r6, #0 + str r4, [sp, #0x1c] + str r1, [sp, #0x28] + add r0, r1, r0 + str r2, [sp, #0x34] + str r6, [sp, #0x30] + str r0, [sp, #0x28] + mov r4, #0x67 + add r5, r7, #0 +_0225ABB0: + str r4, [sp, #0x24] + lsl r0, r4, #0xc + str r0, [sp, #0x24] + add r0, sp, #0x1c + bl sub_02021B90 + str r0, [r5, #0x10] + add r6, r6, #1 + add r4, #0x18 + add r5, r5, #4 + cmp r6, #2 + blt _0225ABB0 + ldr r0, [sp, #0x18] + mov r1, #0x1e + str r0, [r7, #0x1c] + mul r1, r0 + str r1, [r7, #0x20] + ldr r1, [sp, #0x7c] + str r1, [r7, #0x2c] + str r0, [r1, #0] + ldr r1, [r7, #0x2c] + str r0, [r1, #8] + add r0, r7, #0 + mov r1, #0 + add r0, #0x90 + str r1, [r0, #0] + add r0, r7, #0 + bl ov22_0225ACE4 + mov r0, #0xe + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0xc1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r7, #0 + ldr r1, [sp, #0x78] + add r0, #0x18 + mov r2, #0xa + mov r3, #8 + bl ov22_0225A748 + ldr r0, [r7, #0x18] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + mov r3, #4 + ldr r0, _0225AC54 ; =0x00010200 + str r3, [sp, #4] + str r0, [sp, #8] + mov r2, #0xff + str r2, [sp, #0xc] + ldr r0, [r7, #0x18] + mov r1, #0x1a + add r2, #0x82 + bl ov22_0225A860 + mov r0, #0x48 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _0225AC54 ; =0x00010200 + mov r2, #0xff + str r0, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r7, #0x18] + mov r1, #0x1a + add r2, #0x82 + mov r3, #5 + bl ov22_0225A860 + ldr r0, [r7, #0x18] + bl sub_0201A954 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225AC50: .word 0x00000BB8 +_0225AC54: .word 0x00010200 + thumb_func_end ov22_0225AB54 + + thumb_func_start ov22_0225AC58 +ov22_0225AC58: ; 0x0225AC58 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x24] + add r4, r1, #0 + cmp r0, #0 + beq _0225AC68 + bl sub_0200DA58 +_0225AC68: + ldr r0, [r5, #0x28] + cmp r0, #0 + beq _0225AC72 + bl sub_0200DA58 +_0225AC72: + add r0, r5, #0 + add r1, r4, #0 + bl ov22_0225AAC0 + ldr r0, [r5, #0x18] + bl ov22_0225A7C0 + add r0, r5, #0 + mov r1, #0 + mov r2, #0x94 + bl sub_020D5124 + pop {r3, r4, r5, pc} + thumb_func_end ov22_0225AC58 + + thumb_func_start ov22_0225AC8C +ov22_0225AC8C: ; 0x0225AC8C + push {r4, lr} + add r4, r0, #0 + bl ov22_0225AD5C + ldr r0, [r4, #0x20] + mov r1, #0x1e + bl sub_020E1F6C + add r1, r0, #0 + ldr r0, [r4, #0x2c] + bl sub_02095C60 + add r0, r4, #0 + bl ov22_0225ACBC + add r0, r4, #0 + bl ov22_0225ACE4 + add r4, #0x30 + add r0, r4, #0 + bl ov22_0225AE9C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AC8C + + thumb_func_start ov22_0225ACBC +ov22_0225ACBC: ; 0x0225ACBC + push {r3, lr} + ldr r1, [r0, #0x2c] + ldr r2, [r1, #0] + ldr r1, [r0, #0x1c] + cmp r1, r2 + beq _0225ACDC + str r2, [r0, #0x1c] + cmp r2, #0xa + bgt _0225ACDC + add r1, r0, #0 + add r1, #0x30 + bl ov22_0225ADC0 + ldr r0, _0225ACE0 ; =0x00000683 + bl sub_02005748 +_0225ACDC: + pop {r3, pc} + nop +_0225ACE0: .word 0x00000683 + thumb_func_end ov22_0225ACBC + + thumb_func_start ov22_0225ACE4 +ov22_0225ACE4: ; 0x0225ACE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + ldr r0, [r6, #0x1c] + mov r1, #1 + str r0, [sp] + mov r0, #0xa + add r4, r1, #0 + mul r4, r0 + mov r7, #0 + add r5, r6, #0 +_0225ACFA: + ldr r0, [sp] + add r1, r4, #0 + bl sub_020E1F6C + str r0, [sp, #4] + cmp r0, #0xa + ble _0225AD0C + bl sub_02022974 +_0225AD0C: + ldr r0, [r5, #0x10] + ldr r1, [sp, #4] + bl sub_02021D6C + ldr r0, [sp, #4] + add r1, r0, #0 + ldr r0, [sp] + mul r1, r4 + sub r0, r0, r1 + str r0, [sp] + add r0, r4, #0 + mov r1, #0xa + bl sub_020E1F6C + add r4, r0, #0 + add r0, r6, #0 + add r0, #0x90 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0225AD4E + ldr r0, [r6, #0x1c] + cmp r0, #0xa + bgt _0225AD4E + ldr r0, [r5, #0x10] + mov r1, #1 + bl sub_02021EC4 + cmp r7, #1 + bne _0225AD4E + add r1, r6, #0 + add r1, #0x90 + mov r0, #1 + str r0, [r1, #0] +_0225AD4E: + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #2 + blt _0225ACFA + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225ACE4 + + thumb_func_start ov22_0225AD5C +ov22_0225AD5C: ; 0x0225AD5C + ldr r1, [r0, #0x20] + sub r1, r1, #1 + bmi _0225AD64 + str r1, [r0, #0x20] +_0225AD64: + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225AD5C + + thumb_func_start ov22_0225AD68 +ov22_0225AD68: ; 0x0225AD68 + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0x10] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov22_0225AD68 + + thumb_func_start ov22_0225AD78 +ov22_0225AD78: ; 0x0225AD78 + push {r4, lr} + add r4, r0, #0 + ldr r2, [r4, #0xc] + ldr r0, [r4, #8] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r4, #0x10] + lsl r1, r1, #0xc + bl sub_020BCFD0 + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r0, #1 + cmp r0, r1 + bgt _0225ADB8 + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_0225ADB8: + str r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AD78 + + thumb_func_start ov22_0225ADC0 +ov22_0225ADC0: ; 0x0225ADC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + str r1, [sp, #4] + mov r1, #0x3a + mov r0, #2 + lsl r1, r1, #0xc + lsl r0, r0, #0x14 + ldr r4, [sp, #4] + str r1, [sp, #0x10] + add r0, r1, r0 + str r0, [sp, #0x10] + add r0, r4, #0 + ldr r6, [sp] + mov r7, #0 + mov r5, #0x67 + str r0, [sp, #8] +_0225ADE2: + ldr r0, [r6, #0x10] + mov r1, #2 + str r0, [r4, #4] + bl sub_02021CF8 + ldr r2, [sp, #8] + str r5, [sp, #0xc] + lsl r0, r5, #0xc + add r2, #0xc + add r3, sp, #0xc + str r0, [sp, #0xc] + ldmia r3!, {r0, r1} + str r2, [sp, #8] + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r7, r7, #1 + str r0, [r2, #0] + add r6, r6, #4 + add r4, r4, #4 + add r5, #0x18 + cmp r7, #2 + blt _0225ADE2 + ldr r0, [sp] + ldr r1, [r0, #0x1c] + mov r0, #0xa + sub r0, r0, r1 + cmp r0, #0 + ble _0225AE3C + lsl r0, r0, #0xc + ldr r2, _0225AE98 ; =0x00000266 + asr r1, r0, #0x1f + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r4, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r4, #0xc + orr r1, r0 + lsl r0, r2, #1 + add r4, r1, r0 + b _0225AE40 +_0225AE3C: + mov r4, #1 + lsl r4, r4, #0xc +_0225AE40: + ldr r0, [sp, #4] + mov r2, #1 + add r0, #0x24 + add r1, r4, #0 + lsl r2, r2, #0xc + mov r3, #0x10 + bl ov22_0225AD68 + mov r2, #6 + asr r1, r4, #0x1f + add r0, r4, #0 + lsl r2, r2, #0xe + mov r3, #0 + bl sub_020E1F1C + mov r3, #2 + mov r2, #0 + lsl r3, r3, #0xa + add r3, r0, r3 + adc r1, r2 + lsl r0, r1, #0x14 + lsr r1, r3, #0xc + orr r1, r0 + mov r0, #6 + lsl r0, r0, #0xe + sub r4, r1, r0 + ldr r0, [sp, #4] + add r1, r4, #0 + add r0, #0x38 + mov r3, #0x10 + bl ov22_0225AD68 + ldr r0, [sp, #4] + add r1, r4, #0 + add r0, #0x4c + mov r2, #0 + mov r3, #0x10 + bl ov22_0225AD68 + ldr r0, [sp, #4] + mov r1, #1 + str r1, [r0, #0] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225AE98: .word 0x00000266 + thumb_func_end ov22_0225ADC0 + + thumb_func_start ov22_0225AE9C +ov22_0225AE9C: ; 0x0225AE9C + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0225AF2E + add r0, r5, #0 + add r0, #0x24 + bl ov22_0225AD78 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x38 + bl ov22_0225AD78 + add r0, r5, #0 + add r0, #0x4c + bl ov22_0225AD78 + ldr r0, [r5, #0x24] + add r1, sp, #0xc + str r0, [sp, #0xc] + ldr r0, [r5, #0x24] + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + str r0, [sp, #0x14] + ldr r0, [r5, #4] + bl sub_02021C70 + ldr r0, [r5, #8] + add r1, sp, #0xc + bl sub_02021C70 + add r6, r5, #0 + add r6, #0xc + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r1, [sp] + ldr r0, [r5, #0x38] + sub r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r5, #0x4c] + sub r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r5, #4] + add r1, r2, #0 + bl sub_02021C50 + add r6, r5, #0 + add r6, #0x18 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r1, [sp, #4] + ldr r0, [r5, #0x4c] + sub r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r5, #8] + add r1, r2, #0 + bl sub_02021C50 + cmp r4, #0 + beq _0225AF2E + mov r0, #0 + str r0, [r5, #0] +_0225AF2E: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AE9C + + thumb_func_start ov22_0225AF34 +ov22_0225AF34: ; 0x0225AF34 + ldr r0, [r0, #0] + cmp r0, #1 + beq _0225AF3E + mov r0, #1 + bx lr +_0225AF3E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225AF34 \ No newline at end of file diff --git a/asm/ov22_0225AF44.s b/asm/ov22_0225AF44.s new file mode 100644 index 000000000..fed14bcaa --- /dev/null +++ b/asm/ov22_0225AF44.s @@ -0,0 +1,54 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_0225AF44 +ov22_0225AF44: ; 0x0225AF44 + push {r3, lr} + sub sp, #0x10 + add r3, r1, #0 + stmia r0!, {r1} + add r3, #0x48 + str r3, [sp] + ldr r1, [r1, #0x74] + lsl r1, r1, #2 + add r1, #0x89 + str r1, [sp, #4] + mov r1, #0x10 + str r1, [sp, #8] + add r1, sp, #0 + str r2, [sp, #0xc] + bl ov22_02259820 + add sp, #0x10 + pop {r3, pc} + thumb_func_end ov22_0225AF44 + + thumb_func_start ov22_0225AF68 +ov22_0225AF68: ; 0x0225AF68 + ldr r3, _0225AF70 ; =ov22_02259838 + add r0, r0, #4 + mov r1, #1 + bx r3 + ; .align 2, 0 +_0225AF70: .word ov22_02259838 + thumb_func_end ov22_0225AF68 + + thumb_func_start ov22_0225AF74 +ov22_0225AF74: ; 0x0225AF74 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl ov22_022598A0 + mov r1, #0x1c + mov r0, #0 +_0225AF82: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _0225AF82 + pop {r4, pc} + thumb_func_end ov22_0225AF74 \ No newline at end of file diff --git a/asm/ov22_0225AF8C.s b/asm/ov22_0225AF8C.s new file mode 100644 index 000000000..cbebe0f33 --- /dev/null +++ b/asm/ov22_0225AF8C.s @@ -0,0 +1,925 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_0225AF8C +ov22_0225AF8C: ; 0x0225AF8C + push {r3, r4, lr} + sub sp, #0x6c + add r2, r0, #0 + add r4, r1, #0 + add r0, sp, #0 + add r1, r2, #0 + bl ov22_0225B4E4 + add r0, sp, #0 + add r1, r4, #0 + bl ov22_0225B4F8 + add r0, sp, #0 + bl ov22_0225B1BC + add sp, #0x6c + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AF8C + + thumb_func_start ov22_0225AFB0 +ov22_0225AFB0: ; 0x0225AFB0 + push {r3, r4, lr} + sub sp, #0x6c + add r2, r0, #0 + add r4, r1, #0 + add r0, sp, #0 + add r1, r2, #0 + bl ov22_0225B4E4 + add r0, sp, #0 + add r1, r4, #0 + bl ov22_0225B540 + add r0, sp, #0 + bl ov22_0225B1BC + add sp, #0x6c + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AFB0 + + thumb_func_start ov22_0225AFD4 +ov22_0225AFD4: ; 0x0225AFD4 + push {r3, r4, lr} + sub sp, #0x6c + add r2, r0, #0 + add r4, r1, #0 + add r0, sp, #0 + add r1, r2, #0 + bl ov22_0225B4E4 + add r0, sp, #0 + add r1, r4, #0 + bl ov22_0225B540 + add r0, sp, #0 + bl ov22_0225B258 + add sp, #0x6c + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225AFD4 + + thumb_func_start ov22_0225AFF8 +ov22_0225AFF8: ; 0x0225AFF8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x26 + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #1 + bne _0225B00E + sub r0, #0x48 + add r0, r4, r0 + bl ov22_0225AF68 +_0225B00E: + mov r0, #0x99 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #1 + bne _0225B01E + add r0, r4, #0 + bl ov22_0225B328 +_0225B01E: + pop {r4, pc} + thumb_func_end ov22_0225AFF8 + + thumb_func_start ov22_0225B020 +ov22_0225B020: ; 0x0225B020 + push {r4, lr} + mov r1, #0x26 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r1, [r4, r1] + cmp r1, #0 + beq _0225B032 + bl ov22_0225B480 +_0225B032: + add r0, r4, #0 + bl ov22_0225B464 + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_02254E0C + mov r0, #0x63 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #8 + add r0, r4, r0 + bl ov22_022594AC + add r0, r4, #0 + bl ov22_0225B35C + mov r0, #0x8d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B020 + + thumb_func_start ov22_0225B06C +ov22_0225B06C: ; 0x0225B06C + ldr r3, _0225B070 ; =ov22_02255530 + bx r3 + ; .align 2, 0 +_0225B070: .word ov22_02255530 + thumb_func_end ov22_0225B06C + + thumb_func_start ov22_0225B074 +ov22_0225B074: ; 0x0225B074 + mov r2, #0x99 + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov22_0225B074 + + thumb_func_start ov22_0225B07C +ov22_0225B07C: ; 0x0225B07C + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov22_0225B07C + + thumb_func_start ov22_0225B080 +ov22_0225B080: ; 0x0225B080 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + mov r2, #0x19 + add r4, r1, #0 + lsl r2, r2, #4 + add r5, r0, #0 + add r1, r2, #0 + add r0, r5, r2 + str r6, [sp] + add r1, #0xac + add r2, #0xb0 + ldr r1, [r5, r1] + ldr r2, [r5, r2] + add r3, r4, #0 + bl ov22_02257AD8 + mov r0, #0x26 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0225B0C8 + mov r3, #0x88 + ldr r0, [r5, #0x40] + mov r1, #2 + mov r2, #0 + sub r3, r3, r4 + bl sub_02019184 + mov r3, #0x10 + ldr r0, [r5, #0x40] + mov r1, #2 + mov r2, #3 + sub r3, r3, r6 + bl sub_02019184 +_0225B0C8: + mov r0, #0x8f + lsl r0, r0, #2 + str r4, [r5, r0] + add r0, r0, #4 + str r6, [r5, r0] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B080 + + thumb_func_start ov22_0225B0D8 +ov22_0225B0D8: ; 0x0225B0D8 + mov r3, #0x91 + lsl r3, r3, #2 + str r1, [r0, r3] + add r1, r3, #4 + str r2, [r0, r1] + bx lr + thumb_func_end ov22_0225B0D8 + + thumb_func_start ov22_0225B0E4 +ov22_0225B0E4: ; 0x0225B0E4 + mov r2, #0x93 + lsl r2, r2, #2 + strh r1, [r0, r2] + bx lr + thumb_func_end ov22_0225B0E4 + + thumb_func_start ov22_0225B0EC +ov22_0225B0EC: ; 0x0225B0EC + push {r3, r4} + mov r4, #0x25 + lsl r4, r4, #4 + str r1, [r0, r4] + add r1, r4, #4 + str r2, [r0, r1] + add r4, #8 + str r3, [r0, r4] + pop {r3, r4} + bx lr + thumb_func_end ov22_0225B0EC + + thumb_func_start ov22_0225B100 +ov22_0225B100: ; 0x0225B100 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x82 + lsl r0, r0, #2 + add r4, r1, #0 + add r6, r2, #0 + add r0, r5, r0 + add r1, sp, #8 + add r2, sp, #4 + bl ov22_02259270 + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, sp, #0x10 + add r2, sp, #0xc + bl ov22_02257CE0 + mov r0, #0x8f + lsl r0, r0, #2 + ldr r1, [sp, #0x10] + ldr r2, [r5, r0] + sub r1, r4, r1 + add r0, r0, #4 + add r7, r2, r1 + ldr r1, [r5, r0] + ldr r0, [sp, #0xc] + sub r0, r6, r0 + add r0, r1, r0 + str r0, [sp] + ldr r2, [sp] + add r0, r5, #0 + add r1, r7, #0 + bl ov22_0225B080 + ldr r2, [sp] + add r0, r5, #0 + sub r1, r4, r7 + sub r2, r6, r2 + bl ov22_0225B0D8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_0225B100 + + thumb_func_start ov22_0225B158 +ov22_0225B158: ; 0x0225B158 + push {r4, r5, r6, lr} + add r4, r2, #0 + mov r2, #0x95 + add r5, r0, #0 + mov r0, #0x28 + lsl r2, r2, #2 + sub r0, r0, r3 + ldr r2, [r5, r2] + lsl r0, r0, #0xc + add r6, r1, #0 + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + add r0, r5, #0 + mov r5, #2 + add r3, r1, #0 + add r1, r6, #0 + mov r6, #0 + lsl r5, r5, #0xa + add r5, r2, r5 + adc r3, r6 + lsl r2, r3, #0x14 + lsr r3, r5, #0xc + orr r3, r2 + asr r2, r3, #0xc + sub r2, r4, r2 + bl ov22_0225B100 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B158 + + thumb_func_start ov22_0225B198 +ov22_0225B198: ; 0x0225B198 + mov r2, #0x97 + lsl r2, r2, #2 + strh r1, [r0, r2] + sub r2, #0xcc + ldr r3, _0225B1A8 ; =ov22_02257D70 + add r0, r0, r2 + bx r3 + nop +_0225B1A8: .word ov22_02257D70 + thumb_func_end ov22_0225B198 + + thumb_func_start ov22_0225B1AC +ov22_0225B1AC: ; 0x0225B1AC + mov r2, #0x19 + lsl r2, r2, #4 + ldr r3, _0225B1B8 ; =ov22_02257B74 + add r0, r0, r2 + bx r3 + nop +_0225B1B8: .word ov22_02257B74 + thumb_func_end ov22_0225B1AC + + thumb_func_start ov22_0225B1BC +ov22_0225B1BC: ; 0x0225B1BC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x9a + ldr r0, [r5, #0x68] + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x9a + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x8e + ldr r1, [r5, #0x68] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r5, #0x68] + bl sub_02073C74 + mov r1, #0x8d + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #0] + ldr r1, [r4, r1] + bl sub_0202A61C + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B2D4 + ldr r1, [r5, #0x58] + ldr r2, [r5, #0x68] + add r0, r4, #0 + bl ov22_022554A8 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r2, [r5, #0x68] + add r0, r4, r0 + mov r1, #0x15 + bl ov22_02259484 + ldr r1, [r5, #0x68] + mov r0, #0x14 + bl ov22_02254DE0 + mov r1, #0x63 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B388 + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B450 + mov r1, #0x86 + lsl r1, r1, #2 + add r0, r4, r1 + sub r1, #0x88 + ldr r2, [r5, #0x68] + add r1, r4, r1 + bl ov22_0225AF44 + mov r0, #0x26 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B490 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov22_0225B1BC + + thumb_func_start ov22_0225B258 +ov22_0225B258: ; 0x0225B258 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x9a + ldr r0, [r5, #0x68] + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x9a + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x8e + ldr r1, [r5, #0x68] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r5, #0x68] + bl sub_02073C74 + mov r1, #0x8d + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #0] + ldr r1, [r4, r1] + bl sub_0202A61C + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B2D4 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r2, [r5, #0x68] + add r0, r4, r0 + mov r1, #0x15 + bl ov22_02259484 + ldr r1, [r5, #0x68] + mov r0, #0x14 + bl ov22_02254DE0 + mov r1, #0x63 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B388 + mov r0, #0x26 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r1, #1 + add r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov22_0225B490 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov22_0225B258 + + thumb_func_start ov22_0225B2D4 +ov22_0225B2D4: ; 0x0225B2D4 + push {r3, r4, r5, lr} + sub sp, #0x28 + add r4, r1, #0 + ldr r1, [r4, #0x68] + add r5, r0, #0 + mov r0, #0x19 + bl sub_02006C24 + mov r1, #6 + lsl r1, r1, #6 + str r0, [r5, r1] + ldr r0, _0225B324 ; =0x000002CE + add r1, sp, #0 + str r0, [sp] + mov r0, #0x76 + str r0, [sp, #4] + mov r0, #0x13 + str r0, [sp, #8] + ldr r0, [r4, #0x68] + str r0, [sp, #0xc] + ldr r2, [r4, #0x68] + add r0, r5, #0 + bl ov22_0225547C + ldr r3, [r4, #0x68] + add r0, r5, #0 + add r1, sp, #0x10 + add r2, r4, #0 + bl ov22_0225B588 + add r0, r5, #0 + add r1, sp, #0x10 + bl ov22_022551B4 + add r0, sp, #0x10 + bl ov22_02255338 + add sp, #0x28 + pop {r3, r4, r5, pc} + nop +_0225B324: .word 0x000002CE + thumb_func_end ov22_0225B2D4 + + thumb_func_start ov22_0225B328 +ov22_0225B328: ; 0x0225B328 + push {r3, r4, lr} + sub sp, #4 + mov r3, #0x25 + lsl r3, r3, #4 + add r1, r0, r3 + str r1, [sp] + add r1, r3, #0 + sub r1, #0x14 + ldr r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xc + ldr r1, [r0, r1] + add r1, r2, r1 + add r2, r3, #0 + sub r2, #0x10 + ldr r4, [r0, r2] + add r2, r3, #0 + sub r2, #8 + sub r3, r3, #4 + ldr r2, [r0, r2] + ldrh r3, [r0, r3] + add r2, r4, r2 + bl ov22_0225553C + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov22_0225B328 + + thumb_func_start ov22_0225B35C +ov22_0225B35C: ; 0x0225B35C + push {r4, lr} + add r4, r0, #0 + bl ov22_022551D0 + add r0, r4, #0 + bl ov22_022554F8 + mov r0, #0x26 + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0225B37A + add r0, r4, #0 + bl ov22_02255524 +_0225B37A: + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02006CA8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B35C + + thumb_func_start ov22_0225B388 +ov22_0225B388: ; 0x0225B388 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r0, #0 + add r2, sp, #0x28 + mov r0, #0 + add r7, r1, #0 + add r3, r2, #0 + add r1, r0, #0 + stmia r3!, {r0, r1} + stmia r3!, {r0, r1} + stmia r3!, {r0, r1} + stmia r3!, {r0, r1} + str r0, [r3, #0] + ldr r0, [r5, #0] + str r0, [sp, #0x28] + ldr r0, [r5, #4] + str r0, [sp, #0x2c] + ldr r0, [r5, #0x10] + str r0, [sp, #0x30] + ldr r0, [r5, #0x30] + str r0, [sp, #0x34] + ldr r0, [r5, #0x20] + str r0, [sp, #0x38] + ldr r0, [r5, #0x40] + str r0, [sp, #0x3c] + mov r0, #0x63 + lsl r0, r0, #2 + ldr r1, [r5, r0] + str r1, [sp, #0x40] + add r1, r0, #0 + sub r1, #8 + add r1, r5, r1 + str r1, [sp, #0x44] + mov r1, #0x15 + add r0, r0, #4 + str r1, [sp, #0x48] + add r0, r5, r0 + add r1, r2, #0 + bl ov22_022578F4 + ldr r0, [r7, #0] + bl sub_0202A60C + add r6, r0, #0 + ldr r0, [r7, #0] + bl sub_0202A614 + add r4, r0, #0 + ldr r0, [r7, #0] + bl sub_0202A604 + str r4, [sp] + str r0, [sp, #4] + ldr r0, [r7, #0x68] + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [sp, #8] + add r0, r5, r1 + add r1, #0xa4 + ldr r1, [r5, r1] + add r2, sp, #0x18 + add r3, r6, #0 + bl ov22_02257964 + ldr r0, [r7, #0x54] + mov r6, #0 + cmp r0, #0 + ble _0225B44C + add r4, r7, #0 +_0225B412: + ldr r0, [r4, #4] + bl sub_0202A624 + str r0, [sp, #0xc] + ldr r0, [r4, #4] + bl sub_0202A628 + str r0, [sp, #0x10] + ldr r0, [r4, #4] + bl sub_0202A62C + str r0, [sp, #0x14] + ldr r0, [r4, #4] + bl sub_0202A630 + str r0, [sp] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, r5, r0 + bl ov22_022579FC + ldr r0, [r7, #0x54] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _0225B412 +_0225B44C: + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov22_0225B388 + + thumb_func_start ov22_0225B450 +ov22_0225B450: ; 0x0225B450 + add r2, r1, #0 + mov r1, #0x19 + lsl r1, r1, #4 + add r0, r0, r1 + ldr r1, [r2, #0x5c] + ldr r3, _0225B460 ; =ov22_02257C88 + ldr r2, [r2, #0x68] + bx r3 + ; .align 2, 0 +_0225B460: .word ov22_02257C88 + thumb_func_end ov22_0225B450 + + thumb_func_start ov22_0225B464 +ov22_0225B464: ; 0x0225B464 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov22_02257A98 + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov22_02257948 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B464 + + thumb_func_start ov22_0225B480 +ov22_0225B480: ; 0x0225B480 + mov r1, #0x19 + lsl r1, r1, #4 + ldr r3, _0225B48C ; =ov22_02257CD4 + add r0, r0, r1 + bx r3 + nop +_0225B48C: .word ov22_02257CD4 + thumb_func_end ov22_0225B480 + + thumb_func_start ov22_0225B490 +ov22_0225B490: ; 0x0225B490 + push {r3, r4, r5, lr} + add r3, r1, #0 + mov r1, #0x8f + add r4, r0, #0 + mov r2, #0x48 + lsl r1, r1, #2 + str r2, [r4, r1] + mov r5, #0x38 + add r2, r1, #4 + str r5, [r4, r2] + add r2, r1, #0 + add r2, #8 + str r5, [r4, r2] + add r2, r1, #0 + mov r5, #0x40 + add r2, #0xc + str r5, [r4, r2] + lsl r2, r5, #6 + add r5, r1, #0 + add r5, #0x14 + str r2, [r4, r5] + add r5, r1, #0 + add r5, #0x18 + str r2, [r4, r5] + add r5, r1, #0 + add r5, #0x1c + str r2, [r4, r5] + mov r2, #0 + add r1, #0x10 + strh r2, [r4, r1] + ldr r1, [r3, #0x60] + ldr r2, [r3, #0x64] + bl ov22_0225B080 + mov r0, #0x97 + ldr r1, _0225B4E0 ; =0x00007FFF + lsl r0, r0, #2 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} + nop +_0225B4E0: .word 0x00007FFF + thumb_func_end ov22_0225B490 + + thumb_func_start ov22_0225B4E4 +ov22_0225B4E4: ; 0x0225B4E4 + ldr r2, [r1, #0] + str r2, [r0, #0x58] + ldr r2, [r1, #4] + str r2, [r0, #0x60] + ldr r2, [r1, #8] + str r2, [r0, #0x64] + ldr r1, [r1, #0xc] + str r1, [r0, #0x68] + bx lr + ; .align 2, 0 + thumb_func_end ov22_0225B4E4 + + thumb_func_start ov22_0225B4F8 +ov22_0225B4F8: ; 0x0225B4F8 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r5, r0, #0 + add r0, r7, #0 + bl sub_0202A138 + add r6, r5, #0 + str r0, [r5, #0] + mov r4, #0 + str r4, [r5, #0x54] + add r6, #0x54 +_0225B50E: + add r0, r7, #0 + add r1, r4, #0 + bl sub_0202A110 + cmp r0, #0 + beq _0225B530 + add r0, r7, #0 + add r1, r4, #0 + bl sub_0202A150 + ldr r1, [r5, #0x54] + lsl r1, r1, #2 + add r1, r5, r1 + str r0, [r1, #4] + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] +_0225B530: + add r4, r4, #1 + cmp r4, #0xa + blt _0225B50E + add r0, r7, #0 + bl sub_0202A1DC + str r0, [r5, #0x5c] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_0225B4F8 + + thumb_func_start ov22_0225B540 +ov22_0225B540: ; 0x0225B540 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r5, r0, #0 + add r0, r7, #0 + bl sub_0202A4D8 + add r6, r5, #0 + str r0, [r5, #0] + mov r4, #0 + str r4, [r5, #0x54] + add r6, #0x54 +_0225B556: + add r0, r7, #0 + add r1, r4, #0 + bl sub_0202A488 + cmp r0, #0 + beq _0225B578 + add r0, r7, #0 + add r1, r4, #0 + bl sub_0202A4F0 + ldr r1, [r5, #0x54] + lsl r1, r1, #2 + add r1, r5, r1 + str r0, [r1, #4] + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] +_0225B578: + add r4, r4, #1 + cmp r4, #0x14 + blt _0225B556 + add r0, r7, #0 + bl sub_0202A5B8 + str r0, [r5, #0x5c] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_0225B540 + + thumb_func_start ov22_0225B588 +ov22_0225B588: ; 0x0225B588 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r7, r3, #0 + add r5, r0, #0 + add r6, r2, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov22_02255410 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov22_0225B5A8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov22_0225B588 + + thumb_func_start ov22_0225B5A8 +ov22_0225B5A8: ; 0x0225B5A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #0x10] + add r0, r2, #0 + ldr r0, [r0, #0x54] + add r4, r1, #0 + str r2, [sp, #8] + str r3, [sp, #0xc] + cmp r0, #0 + ble _0225B620 + add r6, r2, #0 +_0225B5C2: + ldr r0, [r6, #4] + bl sub_0202A624 + add r5, r0, #0 + ldr r0, [r4, #0x10] + add r1, r5, #0 + bl sub_020229F8 + cmp r0, #1 + bne _0225B60E + mov r0, #1 + str r0, [sp] + mov r0, #6 + ldr r1, [sp, #4] + lsl r0, r0, #6 + ldr r0, [r1, r0] + ldr r3, [sp, #0xc] + add r1, r5, #1 + mov r2, #0 + bl sub_0200723C + add r7, r0, #0 + ldr r0, [r4, #0x10] + add r1, r7, #0 + add r2, r5, #0 + bl sub_02022A1C + ldr r1, [r4, #0] + lsl r5, r5, #3 + add r1, r1, r5 + add r0, r7, #0 + add r1, r1, #4 + bl sub_020A7118 + ldr r0, [sp, #4] + ldr r1, [r0, #0] + ldr r0, [r4, #0] + str r1, [r0, r5] +_0225B60E: + ldr r0, [sp, #0x10] + add r6, r6, #4 + add r0, r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + ldr r1, [r0, #0x54] + ldr r0, [sp, #0x10] + cmp r0, r1 + blt _0225B5C2 +_0225B620: + mov r0, #1 + str r0, [sp] + mov r1, #6 + ldr r0, [sp, #4] + lsl r1, r1, #6 + ldr r0, [r0, r1] + mov r1, #0 + ldr r3, [sp, #0xc] + add r2, r1, #0 + bl sub_0200723C + add r5, r0, #0 + ldr r0, [r4, #0x14] + add r1, r5, #0 + mov r2, #0 + bl sub_02022A1C + ldr r1, [r4, #8] + add r0, r5, #0 + add r1, r1, #4 + bl sub_020A71B0 + ldr r0, [sp, #4] + ldr r1, [r0, #0] + ldr r0, [r4, #8] + str r1, [r0, #0] + ldr r0, [r4, #8] + mov r1, #3 + str r1, [r0, #8] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B5A8 \ No newline at end of file diff --git a/asm/ov22_0225B660.s b/asm/ov22_0225B660.s new file mode 100644 index 000000000..8496dd3c6 --- /dev/null +++ b/asm/ov22_0225B660.s @@ -0,0 +1,851 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov22_0225B660 +ov22_0225B660: ; 0x0225B660 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r2, #2 + add r5, r0, #0 + mov r0, #3 + mov r1, #0xd + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r2, #1 + mov r0, #3 + mov r1, #0xe + lsl r2, r2, #0x12 + bl sub_02017FC8 + mov r1, #0x1a + add r0, r5, #0 + lsl r1, r1, #4 + mov r2, #0xd + bl sub_0200681C + mov r2, #0x1a + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _0225B730 ; =ov22_0225B848 + add r1, r4, #0 + bl sub_02017798 + bl sub_020177A4 + add r0, r5, #0 + bl sub_02006840 + add r5, r0, #0 + ldr r0, [r5, #8] + cmp r0, #0 + ldr r0, [r5, #0] + bne _0225B6BC + ldr r1, [r5, #4] + bl sub_02029CA8 + str r0, [r4, #0] + b _0225B6C4 +_0225B6BC: + ldr r1, [r5, #4] + bl sub_02029CD0 + str r0, [r4, #4] +_0225B6C4: + ldr r0, [r5, #4] + str r0, [r4, #8] + ldr r0, [r5, #8] + str r0, [r4, #0xc] + bl ov22_02255094 + ldr r0, _0225B734 ; =0x021BF6DC + mov r1, #0 + strb r1, [r0, #5] + bl sub_0201FFE8 + add r0, r4, #0 + add r0, #0x14 + mov r1, #0xe + bl ov22_022555D4 + ldr r0, [r4, #0x54] + str r0, [sp] + mov r0, #0x48 + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [r4, #0xc] + cmp r0, #0 + add r0, sp, #0 + bne _0225B704 + ldr r1, [r4, #0] + bl ov22_0225AF8C + b _0225B70A +_0225B704: + ldr r1, [r4, #4] + bl ov22_0225AFB0 +_0225B70A: + str r0, [r4, #0x10] + add r0, r4, #0 + bl ov22_0225B85C + add r0, r4, #0 + bl ov22_0225B910 + add r0, r4, #0 + bl ov22_0225B964 + add r0, r4, #0 + bl ov22_0225BA40 + add r0, r4, #0 + bl ov22_0225BAD0 + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225B730: .word ov22_0225B848 +_0225B734: .word 0x021BF6DC + thumb_func_end ov22_0225B660 + + thumb_func_start ov22_0225B738 +ov22_0225B738: ; 0x0225B738 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + bl sub_0200682C + add r5, r0, #0 + bl sub_020241B4 + bl sub_020A73C0 + ldr r0, [r5, #0x10] + bl ov22_0225AFF8 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + add r5, #0x14 + add r0, r5, #0 + bl ov22_0225562C + ldr r0, [r4, #0] + cmp r0, #5 + bhi _0225B7F2 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0225B774: ; jump table + .short _0225B780 - _0225B774 - 2 ; case 0 + .short _0225B786 - _0225B774 - 2 ; case 1 + .short _0225B7A4 - _0225B774 - 2 ; case 2 + .short _0225B7B4 - _0225B774 - 2 ; case 3 + .short _0225B7C4 - _0225B774 - 2 ; case 4 + .short _0225B7E4 - _0225B774 - 2 ; case 5 +_0225B780: + add r0, r0, #1 + str r0, [r4, #0] + b _0225B7F2 +_0225B786: + mov r0, #6 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + mov r0, #0 + mov r1, #5 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0225B7F2 +_0225B7A4: + bl sub_0200F2AC + cmp r0, #0 + beq _0225B7F2 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0225B7F2 +_0225B7B4: + ldr r1, _0225B7F8 ; =0x021BF67C + ldr r2, [r1, #0x48] + mov r1, #3 + tst r1, r2 + beq _0225B7F2 + add r0, r0, #1 + str r0, [r4, #0] + b _0225B7F2 +_0225B7C4: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + mov r0, #0 + mov r1, #2 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0225B7F2 +_0225B7E4: + bl sub_0200F2AC + cmp r0, #0 + beq _0225B7F2 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0225B7F2: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0225B7F8: .word 0x021BF67C + thumb_func_end ov22_0225B738 + + thumb_func_start ov22_0225B7FC +ov22_0225B7FC: ; 0x0225B7FC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl ov22_0225B020 + add r0, r4, #0 + bl ov22_0225BA00 + add r0, r4, #0 + bl ov22_0225BAA8 + add r4, #0x14 + add r0, r4, #0 + bl ov22_022555FC + bl ov22_022550B4 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0xd + bl sub_0201807C + mov r0, #0xe + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B7FC + + thumb_func_start ov22_0225B848 +ov22_0225B848: ; 0x0225B848 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl ov22_0225B06C + add r4, #0x14 + add r0, r4, #0 + bl ov22_0225561C + pop {r4, pc} + thumb_func_end ov22_0225B848 + + thumb_func_start ov22_0225B85C +ov22_0225B85C: ; 0x0225B85C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x40 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x7e + mov r2, #0 + mov r3, #0x60 + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [r5, #0x54] + mov r1, #0x7d + mov r3, #1 + bl sub_020070E8 + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _0225B8A2 + mov r1, #0x80 + mov r4, #4 + b _0225B8A6 +_0225B8A2: + mov r1, #0x7f + mov r4, #3 +_0225B8A6: + mov r0, #0xe + str r0, [sp] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0 + add r3, sp, #0x10 + bl sub_020071D0 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + mov r1, #1 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0x54] + bl sub_020198C0 + ldr r1, [sp, #0x10] + mov r2, #0 + ldrh r0, [r1] + add r3, r2, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r1, #2] + mov r1, #1 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0x54] + bl sub_02019E2C + add r0, r6, #0 + bl sub_020181C4 + ldr r0, [r5, #0x54] + mov r1, #1 + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov22_0225B85C + + thumb_func_start ov22_0225B910 +ov22_0225B910: ; 0x0225B910 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0x20 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #0xc + add r1, r0, #0 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r2, [r4, #0x54] + mov r0, #0xc + mov r1, #0xb + mov r3, #4 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r2, [r4, #0x54] + mov r0, #0xc + mov r1, #0xa + mov r3, #4 + bl sub_02006E3C + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225B910 + + thumb_func_start ov22_0225B964 +ov22_0225B964: ; 0x0225B964 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0xfa + lsl r0, r0, #2 + mov r1, #0x65 + str r0, [sp, #4] + lsl r1, r1, #2 + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0x14 + mov r2, #0xe9 + mov r3, #0 + bl ov22_02255248 + mov r0, #1 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0xfa + lsl r0, r0, #2 + mov r1, #0x65 + str r0, [sp, #8] + lsl r1, r1, #2 + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0x14 + mov r2, #0xea + mov r3, #0 + bl ov22_02255268 + mov r0, #0xfa + lsl r0, r0, #2 + mov r1, #0x65 + str r0, [sp] + lsl r1, r1, #2 + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0x14 + mov r2, #0xe8 + mov r3, #0 + bl ov22_0225528C + mov r0, #0xfa + lsl r0, r0, #2 + mov r1, #0x65 + str r0, [sp] + lsl r1, r1, #2 + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0x14 + mov r2, #0xe7 + mov r3, #0 + bl ov22_022552A8 + mov r0, #0x64 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0xfa + add r0, #0x14 + lsl r1, r1, #2 + mov r2, #0 + mov r3, #0x90 + bl ov22_022551E4 + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02021E80 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov22_0225B964 + + thumb_func_start ov22_0225BA00 +ov22_0225BA00: ; 0x0225BA00 + push {r4, lr} + mov r1, #0xfa + add r4, r0, #0 + add r0, #0x14 + lsl r1, r1, #2 + bl ov22_022552C4 + add r0, r4, #0 + mov r1, #0xfa + add r0, #0x14 + lsl r1, r1, #2 + bl ov22_022552D8 + add r0, r4, #0 + mov r1, #0xfa + add r0, #0x14 + lsl r1, r1, #2 + bl ov22_022552EC + add r0, r4, #0 + mov r1, #0xfa + add r0, #0x14 + lsl r1, r1, #2 + bl ov22_02255300 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021BD4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225BA00 + + thumb_func_start ov22_0225BA40 +ov22_0225BA40: ; 0x0225BA40 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0xe + mov r1, #1 + bl sub_0201A778 + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x12 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0x54] + ldr r1, [r4, r1] + mov r2, #3 + mov r3, #0 + bl sub_0201A7E8 + mov r0, #0 + mov r1, #0xa0 + mov r2, #0xe + bl sub_02002E7C + mov r0, #3 + mov r1, #0 + bl sub_02019060 + mov r0, #0 + mov r1, #2 + bl sub_02019060 + mov r0, #1 + add r1, r0, #0 + bl sub_02019060 + mov r1, #3 + ldr r0, [r4, #0x54] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225BA40 + + thumb_func_start ov22_0225BAA8 +ov22_0225BAA8: ; 0x0225BAA8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201ACF4 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201A8FC + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0201A928 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov22_0225BAA8 + + thumb_func_start ov22_0225BAD0 +ov22_0225BAD0: ; 0x0225BAD0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _0225BAEE + add r0, r4, #0 + bl ov22_0225BB00 + b _0225BAF4 +_0225BAEE: + add r0, r4, #0 + bl ov22_0225BC18 +_0225BAF4: + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201A954 + pop {r4, pc} + thumb_func_end ov22_0225BAD0 + + thumb_func_start ov22_0225BB00 +ov22_0225BB00: ; 0x0225BB00 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + ldr r2, _0225BC10 ; =0x00000181 + add r5, r0, #0 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xd + bl sub_0200B144 + str r0, [sp, #0x10] + cmp r0, #0 + bne _0225BB1C + bl sub_02022974 +_0225BB1C: + mov r0, #0xd + bl sub_0200B358 + add r6, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #5 + bl sub_02021D6C + mov r0, #3 + lsl r0, r0, #0x10 + str r0, [sp, #0x14] + mov r0, #9 + lsl r0, r0, #0x10 + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp, #0x1c] + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, sp, #0x14 + bl sub_02021C50 + mov r0, #0xc + mov r1, #0xd + bl sub_02023790 + add r7, r0, #0 + ldr r0, [r5, #0] + add r1, r7, #0 + bl sub_0202A1A0 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + add r4, r0, #0 + mov r0, #7 + str r0, [sp] + mov r1, #0 + lsr r3, r4, #0x1f + add r3, r4, r3 + asr r4, r3, #1 + mov r3, #0x80 + ldr r0, _0225BC14 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0x67 + str r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r7, #0 + sub r3, r3, r4 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, [r5, #0] + bl sub_0202A1F4 + add r2, r0, #0 + add r0, r6, #0 + mov r1, #0 + bl sub_0200BE48 + mov r0, #0xc8 + mov r1, #0xd + bl sub_02023790 + add r4, r0, #0 + ldr r0, [sp, #0x10] + mov r1, #0x2d + bl sub_0200B1EC + add r7, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #0x1b + str r0, [sp] + mov r1, #0 + ldr r0, _0225BC14 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0x67 + str r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + lsr r5, r3, #0x1f + add r5, r3, r5 + asr r5, r5, #1 + mov r3, #0x80 + add r2, r4, #0 + sub r3, r3, r5 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x10] + bl sub_0200B190 + add r0, r6, #0 + bl sub_0200B3F0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225BC10: .word 0x00000181 +_0225BC14: .word 0x00010200 + thumb_func_end ov22_0225BB00 + + thumb_func_start ov22_0225BC18 +ov22_0225BC18: ; 0x0225BC18 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r5, #8] + bl sub_02021D6C + ldr r0, [r5, #4] + bl sub_0202A5D0 + add r6, r0, #0 + mov r0, #0xd + bl sub_0200B358 + add r7, r0, #0 + mov r0, #0xc8 + mov r1, #0xd + bl sub_02023790 + add r4, r0, #0 + ldr r0, [r5, #8] + bl sub_020958B8 + add r2, r0, #0 + add r0, r7, #0 + mov r1, #0 + bl sub_0200BBDC + add r0, r6, #0 + bl sub_02095888 + add r2, r0, #0 + add r0, r7, #0 + mov r1, #1 + bl sub_0200BBA8 + ldr r0, [r5, #4] + bl sub_0202A544 + add r6, r0, #0 + ldr r0, [r5, #4] + add r1, r4, #0 + bl sub_0202A524 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, r7, #0 + mov r1, #3 + add r2, r4, #0 + add r3, r6, #0 + bl sub_0200B48C + mov r0, #0xd + bl sub_02073C74 + add r6, r0, #0 + ldr r0, [r5, #4] + add r1, r6, #0 + bl sub_0202A560 + add r0, r6, #0 + bl sub_02076B10 + add r2, r0, #0 + add r0, r7, #0 + mov r1, #4 + bl sub_0200B5CC + add r0, r6, #0 + bl sub_020181C4 + ldr r2, _0225BD70 ; =0x00000181 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xd + bl sub_0200B144 + str r0, [sp, #0x10] + cmp r0, #0 + bne _0225BCC4 + bl sub_02022974 +_0225BCC4: + ldr r0, [sp, #0x10] + mov r1, #0x2b + bl sub_0200B1EC + add r6, r0, #0 + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #7 + str r0, [sp] + mov r1, #0 + lsr r6, r3, #0x1f + add r6, r3, r6 + ldr r0, _0225BD74 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0x67 + str r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + asr r6, r6, #1 + mov r3, #0x80 + add r2, r4, #0 + sub r3, r3, r6 + bl sub_0201D78C + ldr r0, [sp, #0x10] + mov r1, #0x2c + bl sub_0200B1EC + add r6, r0, #0 + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #0x1b + str r0, [sp] + mov r1, #0 + ldr r0, _0225BD74 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0x67 + str r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + lsr r5, r3, #0x1f + add r5, r3, r5 + asr r5, r5, #1 + mov r3, #0x80 + add r2, r4, #0 + sub r3, r3, r5 + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x10] + bl sub_0200B190 + add r0, r7, #0 + bl sub_0200B3F0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0225BD70: .word 0x00000181 +_0225BD74: .word 0x00010200 + thumb_func_end ov22_0225BC18 \ No newline at end of file diff --git a/asm/ov23_0223E140.s b/asm/ov23_0223E140.s new file mode 100644 index 000000000..e62873a67 --- /dev/null +++ b/asm/ov23_0223E140.s @@ -0,0 +1,7163 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0223E140 +ov23_0223E140: ; 0x0223E140 + push {r3, r4, r5, r6, r7, lr} + ldr r2, _0223E1D0 ; =0x000008CC + ldr r4, _0223E1D4 ; =0x02257740 + add r3, r2, #0 + mov r1, #0 + mov r0, #0xff + add r3, #8 +_0223E14E: + ldr r5, [r4, #0] + add r5, r5, r1 + strb r0, [r5, r2] + ldr r5, [r4, #0] + add r5, r5, r1 + add r1, r1, #1 + strb r0, [r5, r3] + cmp r1, #8 + blt _0223E14E + ldr r0, _0223E1D4 ; =0x02257740 + ldr r1, _0223E1D8 ; =0x000009E4 + ldr r2, [r0, #0] + mov r3, #1 + strb r3, [r2, r1] + ldr r4, [r0, #0] + mov r2, #0 + add r3, r1, #1 + strb r2, [r4, r3] + ldr r3, [r0, #0] + mov r4, #0xc4 + add r1, r1, #3 + strb r4, [r3, r1] + mov r3, #0x81 + lsl r3, r3, #4 + add r4, r3, #0 + add r1, r2, #0 + add r5, r2, #0 + add r4, #8 +_0223E186: + ldr r6, [r0, #0] + add r2, r2, #1 + add r6, r6, r1 + str r5, [r6, r3] + ldr r6, [r0, #0] + add r6, r6, r1 + add r1, #0xc + strb r5, [r6, r4] + cmp r2, #8 + blt _0223E186 + ldr r6, _0223E1D4 ; =0x02257740 + mov r7, #0 +_0223E19E: + add r0, r5, #0 + mov r1, #0xd + bl sub_020E1F6C + add r4, r0, #0 + mov r1, #0xd + add r0, r5, #0 + mul r4, r1 + bl sub_020E1F6C + ldr r0, [r6, #0] + add r5, r5, #1 + add r0, r0, r4 + add r2, r1, r0 + ldr r0, _0223E1DC ; =0x000008DC + strb r7, [r2, r0] + ldr r0, [r6, #0] + add r0, r0, r4 + add r2, r1, r0 + mov r1, #2 + ldr r0, _0223E1E0 ; =0x0000095E + cmp r5, #0x82 + strb r1, [r2, r0] + blt _0223E19E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E1D0: .word 0x000008CC +_0223E1D4: .word 0x02257740 +_0223E1D8: .word 0x000009E4 +_0223E1DC: .word 0x000008DC +_0223E1E0: .word 0x0000095E + thumb_func_end ov23_0223E140 + + thumb_func_start ov23_0223E1E4 +ov23_0223E1E4: ; 0x0223E1E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r1, _0223E2D4 ; =0x02257740 + ldr r2, [r1, #0] + cmp r2, #0 + bne _0223E2D0 + mov r2, #0x9f + str r0, [r1, #0] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020C4CF4 + ldr r0, _0223E2D4 ; =0x02257740 + ldr r0, [r0, #0] + add r0, #8 + bl sub_020361BC + ldr r5, _0223E2D4 ; =0x02257740 + mov r2, #0 + ldr r0, [r5, #0] + ldr r7, _0223E2D8 ; =0x0000020A + str r4, [r0, #0] + ldr r0, _0223E2DC ; =0x0000FFFF + add r3, r2, #0 + mov r1, #0xff +_0223E218: + ldr r4, [r5, #0] + add r2, r2, #1 + add r6, r4, r3 + mov r4, #0x83 + lsl r4, r4, #2 + strb r1, [r6, r4] + ldr r4, [r5, #0] + add r6, r4, r3 + mov r4, #0x82 + lsl r4, r4, #2 + strh r0, [r6, r4] + ldr r4, [r5, #0] + add r4, r4, r3 + add r3, r3, #6 + strh r0, [r4, r7] + cmp r2, #0xfa + blt _0223E218 + bl ov23_0223E140 + ldr r1, _0223E2D4 ; =0x02257740 + mov r3, #0 + mov r0, #0x9e + ldr r2, [r1, #0] + mvn r3, r3 + lsl r0, r0, #4 + str r3, [r2, r0] + ldr r0, [r1, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r4, r0, #0 + bl sub_02029234 + cmp r0, #0 + beq _0223E2C8 + add r0, r4, #0 + bl sub_02028930 + str r0, [sp, #4] + ldr r0, _0223E2E0 ; =0x5D588B65 + mov r5, #0 + str r0, [sp, #8] + ldr r0, _0223E2E4 ; =0x00269EC3 + str r0, [sp, #0xc] +_0223E272: + add r0, r4, #0 + add r1, r5, #0 + bl sub_020291A4 + add r5, r5, #1 + cmp r5, #0xff + blt _0223E272 + mov r5, #0 + add r6, r5, #0 +_0223E284: + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + add r3, r6, #0 + str r6, [sp] + bl sub_02028EF8 + add r5, r5, #1 + cmp r5, #0x40 + blt _0223E284 + add r0, sp, #4 + bl ov23_02241DF8 + mov r1, #0xa + bl sub_020E1F6C + mov r1, #0x18 + sub r6, r1, r0 + mov r5, #0 + cmp r6, #0 + ble _0223E2BE + add r7, sp, #4 +_0223E2B0: + add r0, r7, #0 + add r1, r5, #0 + bl ov23_0223E434 + add r5, r5, #1 + cmp r5, r6 + blt _0223E2B0 +_0223E2BE: + add r0, r4, #0 + bl sub_02029240 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_0223E2C8: + bl ov23_0223E834 + bl ov23_02243CE8 +_0223E2D0: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E2D4: .word 0x02257740 +_0223E2D8: .word 0x0000020A +_0223E2DC: .word 0x0000FFFF +_0223E2E0: .word 0x5D588B65 +_0223E2E4: .word 0x00269EC3 + thumb_func_end ov23_0223E1E4 + + thumb_func_start ov23_0223E2E8 +ov23_0223E2E8: ; 0x0223E2E8 + mov r0, #0x9f + lsl r0, r0, #4 + bx lr + ; .align 2, 0 + thumb_func_end ov23_0223E2E8 + + thumb_func_start ov23_0223E2F0 +ov23_0223E2F0: ; 0x0223E2F0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_0223E2F0 + + thumb_func_start ov23_0223E2F4 +ov23_0223E2F4: ; 0x0223E2F4 + bx lr + ; .align 2, 0 + thumb_func_end ov23_0223E2F4 + + thumb_func_start ov23_0223E2F8 +ov23_0223E2F8: ; 0x0223E2F8 + push {r3, lr} + ldr r0, _0223E348 ; =0x02257740 + ldr r1, [r0, #0] + cmp r1, #0 + beq _0223E344 + ldr r0, _0223E34C ; =0x0000087C + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223E336 + bl sub_0200DA58 + ldr r0, _0223E348 ; =0x02257740 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _0223E34C ; =0x0000087C + str r2, [r1, r0] + bl ov23_0224219C + bl ov23_02254044 + ldr r0, _0223E348 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _0223E350 ; =0x000007E4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223E332 + mov r1, #4 + bl sub_02002154 +_0223E332: + bl sub_02059514 +_0223E336: + ldr r0, _0223E348 ; =0x02257740 + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, _0223E348 ; =0x02257740 + mov r1, #0 + str r1, [r0, #0] +_0223E344: + pop {r3, pc} + nop +_0223E348: .word 0x02257740 +_0223E34C: .word 0x0000087C +_0223E350: .word 0x000007E4 + thumb_func_end ov23_0223E2F8 + + thumb_func_start ov23_0223E354 +ov23_0223E354: ; 0x0223E354 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrh r0, [r1] + ldrh r1, [r1, #2] + bl ov23_0223E88C + add r4, r0, #0 + add r0, sp, #0 + strb r5, [r0] + beq _0223E39E + ldrb r0, [r4, #4] + cmp r0, #0xff + bne _0223E39E + add r0, r5, #0 + bl ov23_0224A6B8 + cmp r0, #0 + beq _0223E37C + mov r0, #1 + pop {r3, r4, r5, pc} +_0223E37C: + mov r0, #0x40 + add r1, sp, #0 + mov r2, #1 + bl sub_02035AC4 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + ldr r0, _0223E3A4 ; =0x02257740 + ldr r1, [r0, #0] + lsl r0, r5, #2 + add r1, r1, r0 + ldr r0, _0223E3A8 ; =0x000007E8 + str r4, [r1, r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_0223E39E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223E3A4: .word 0x02257740 +_0223E3A8: .word 0x000007E8 + thumb_func_end ov23_0223E354 + + thumb_func_start ov23_0223E3AC +ov23_0223E3AC: ; 0x0223E3AC + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _0223E3C4 + mov r0, #0 + pop {r4, r5, r6, pc} +_0223E3C4: + ldr r0, _0223E430 ; =0x000001DE + cmp r4, r0 + ble _0223E3CE + mov r0, #0 + pop {r4, r5, r6, pc} +_0223E3CE: + cmp r5, r0 + ble _0223E3D6 + mov r0, #0 + pop {r4, r5, r6, pc} +_0223E3D6: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl sub_02054F68 + cmp r0, #0 + beq _0223E42C + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #1 + bl sub_02054F68 + cmp r0, #0 + bne _0223E3F6 + mov r0, #1 + pop {r4, r5, r6, pc} +_0223E3F6: + add r0, r6, #0 + add r1, r5, #0 + sub r2, r4, #1 + bl sub_02054F68 + cmp r0, #0 + bne _0223E408 + mov r0, #1 + pop {r4, r5, r6, pc} +_0223E408: + add r0, r6, #0 + add r1, r5, #1 + add r2, r4, #0 + bl sub_02054F68 + cmp r0, #0 + bne _0223E41A + mov r0, #1 + pop {r4, r5, r6, pc} +_0223E41A: + add r0, r6, #0 + sub r1, r5, #1 + add r2, r4, #0 + bl sub_02054F68 + cmp r0, #0 + bne _0223E42C + mov r0, #1 + pop {r4, r5, r6, pc} +_0223E42C: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223E430: .word 0x000001DE + thumb_func_end ov23_0223E3AC + + thumb_func_start ov23_0223E434 +ov23_0223E434: ; 0x0223E434 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + ldr r0, _0223E648 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + str r0, [sp, #0x10] + ldr r0, _0223E648 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0x2c] + bl sub_02039E10 + sub r0, r0, #2 + lsl r0, r0, #0x15 + lsr r6, r0, #0x10 + ldr r0, _0223E648 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0x2c] + bl sub_02039E20 + sub r0, r0, #2 + lsl r0, r0, #0x15 + lsr r4, r0, #0x10 +_0223E46C: + ldr r1, [r5, #4] + ldr r0, [r5, #0] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + cmp r6, #0 + ldr r0, [r5, #0] + bne _0223E482 + lsr r1, r0, #0x10 + b _0223E48A +_0223E482: + lsr r1, r0, #0x10 + add r2, r1, #0 + mul r2, r6 + lsr r1, r2, #0x10 +_0223E48A: + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + add r1, #0x20 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + str r1, [sp, #0xc] + ldr r1, [r5, #4] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + cmp r4, #0 + ldr r0, [r5, #0] + bne _0223E4AA + lsr r0, r0, #0x10 + b _0223E4B2 +_0223E4AA: + lsr r0, r0, #0x10 + add r1, r0, #0 + mul r1, r4 + lsr r0, r1, #0x10 +_0223E4B2: + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r0, #0x40 + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + ldr r0, _0223E648 ; =0x02257740 + ldr r1, [sp, #0xc] + ldr r0, [r0, #0] + add r2, r7, #0 + ldr r0, [r0, #0] + bl ov23_0223E3AC + cmp r0, #0 + beq _0223E46C + ldr r1, [r5, #4] + ldr r0, [r5, #0] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + lsr r1, r0, #0x10 + mov r0, #6 + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r0, r0, #6 + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x20] + cmp r0, #0 + ble _0223E58E +_0223E4F4: + mov r0, #0 + str r0, [sp, #0x14] + str r0, [sp, #0x18] +_0223E4FA: + ldr r1, [r5, #4] + ldr r0, [r5, #0] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + lsr r2, r0, #0x10 + mov r1, #0x14 + mul r1, r2 + lsr r1, r1, #0x10 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 + ldr r1, [sp, #0xc] + str r0, [r5, #0] + add r1, r1, r2 + sub r1, #0xa + lsl r1, r1, #0x10 + lsr r4, r1, #0x10 + ldr r1, [r5, #4] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + lsr r1, r0, #0x10 + mov r0, #0x14 + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r0, r7, r0 + sub r0, #0xa + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldr r0, _0223E648 ; =0x02257740 + add r1, r4, #0 + ldr r0, [r0, #0] + add r2, r6, #0 + ldr r0, [r0, #0] + bl ov23_0223E3AC + cmp r0, #0 + beq _0223E552 + mov r0, #1 + str r0, [sp, #0x14] + b _0223E55C +_0223E552: + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #0x64 + blt _0223E4FA +_0223E55C: + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _0223E582 + bl ov23_0223E6F8 + cmp r0, #0 + beq _0223E58E + add r0, r4, #0 + add r1, r6, #0 + bl ov23_0223E740 + str r0, [sp, #0x24] + ldr r0, [sp, #0x10] + add r1, r4, #0 + add r2, r6, #0 + bl sub_02029140 + ldr r1, [sp, #0x24] + strb r0, [r1, #5] +_0223E582: + ldr r0, [sp, #0x1c] + add r1, r0, #1 + ldr r0, [sp, #0x20] + str r1, [sp, #0x1c] + cmp r1, r0 + blt _0223E4F4 +_0223E58E: + ldr r1, [r5, #4] + ldr r0, [r5, #0] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + lsr r1, r0, #0x10 + mov r0, #6 + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [sp, #8] + cmp r0, #0 + ble _0223E642 +_0223E5B2: + mov r0, #0 + str r0, [sp] +_0223E5B6: + ldr r1, [r5, #4] + ldr r0, [r5, #0] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + lsr r2, r0, #0x10 + mov r1, #0x14 + mul r1, r2 + lsr r1, r1, #0x10 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 + ldr r1, [sp, #0xc] + str r0, [r5, #0] + add r1, r1, r2 + sub r1, #0xa + lsl r1, r1, #0x10 + lsr r6, r1, #0x10 + ldr r1, [r5, #4] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + lsr r1, r0, #0x10 + mov r0, #0x14 + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r0, r7, r0 + sub r0, #0xa + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, _0223E648 ; =0x02257740 + add r1, r6, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + ldr r0, [r0, #0] + bl sub_02054F68 + cmp r0, #0 + bne _0223E62C + ldr r3, _0223E648 ; =0x02257740 + add r1, r4, #0 + ldr r4, [r3, #0] + ldr r3, _0223E64C ; =0x000009EC + add r0, r6, #0 + ldrb r3, [r4, r3] + add r2, r5, #0 + bl ov23_02243C3C + cmp r0, #0 + beq _0223E62C + ldr r0, _0223E648 ; =0x02257740 + ldr r2, [r0, #0] + ldr r0, _0223E64C ; =0x000009EC + ldrb r1, [r2, r0] + add r1, r1, #1 + strb r1, [r2, r0] + b _0223E636 +_0223E62C: + ldr r0, [sp] + add r0, r0, #1 + str r0, [sp] + cmp r0, #0x64 + blt _0223E5B6 +_0223E636: + ldr r0, [sp, #4] + add r1, r0, #1 + ldr r0, [sp, #8] + str r1, [sp, #4] + cmp r1, r0 + blt _0223E5B2 +_0223E642: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223E648: .word 0x02257740 +_0223E64C: .word 0x000009EC + thumb_func_end ov23_0223E434 + + thumb_func_start ov23_0223E650 +ov23_0223E650: ; 0x0223E650 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + ldr r0, _0223E6F4 ; =0x02257740 + str r1, [sp, #4] + ldr r0, [r0, #0] + add r5, r2, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + mov r4, #0 + str r0, [sp, #8] + str r4, [sp, #0xc] +_0223E66C: + ldr r1, [r5, #4] + ldr r0, [r5, #0] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + lsr r2, r0, #0x10 + mov r1, #0x14 + mul r1, r2 + lsr r1, r1, #0x10 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 + ldr r1, [sp] + str r0, [r5, #0] + add r1, r1, r2 + sub r1, #0xa + lsl r1, r1, #0x10 + lsr r6, r1, #0x10 + ldr r1, [r5, #4] + ldr r2, [r5, #8] + mul r0, r1 + add r0, r2, r0 + str r0, [r5, #0] + lsr r1, r0, #0x10 + mov r0, #0x14 + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [sp, #4] + add r0, r0, r1 + sub r0, #0xa + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + ldr r0, _0223E6F4 ; =0x02257740 + add r1, r6, #0 + ldr r0, [r0, #0] + add r2, r7, #0 + ldr r0, [r0, #0] + bl ov23_0223E3AC + cmp r0, #0 + beq _0223E6C6 + mov r0, #1 + str r0, [sp, #0xc] + b _0223E6CC +_0223E6C6: + add r4, r4, #1 + cmp r4, #0x64 + blt _0223E66C +_0223E6CC: + ldr r0, [sp, #0xc] + cmp r0, #0 + beq _0223E6F0 + bl ov23_0223E6F8 + cmp r0, #0 + beq _0223E6F0 + add r0, r6, #0 + add r1, r7, #0 + bl ov23_0223E740 + add r4, r0, #0 + ldr r0, [sp, #8] + add r1, r6, #0 + add r2, r7, #0 + bl sub_02029140 + strb r0, [r4, #5] +_0223E6F0: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E6F4: .word 0x02257740 + thumb_func_end ov23_0223E650 + + thumb_func_start ov23_0223E6F8 +ov23_0223E6F8: ; 0x0223E6F8 + push {r4, r5, r6, r7} + ldr r1, _0223E734 ; =0x02257740 + ldr r3, _0223E738 ; =0x0000020A + ldr r2, [r1, #0] + ldr r4, _0223E73C ; =0x0000FFFF + mov r0, #0 + add r1, r2, #0 + sub r5, r3, #2 + add r6, r4, #0 +_0223E70A: + ldrh r7, [r1, r5] + cmp r7, r6 + bne _0223E726 + ldrh r7, [r1, r3] + cmp r7, r4 + bne _0223E726 + mov r1, #0x82 + lsl r1, r1, #2 + add r2, r2, r1 + mov r1, #6 + mul r1, r0 + add r0, r2, r1 + pop {r4, r5, r6, r7} + bx lr +_0223E726: + add r0, r0, #1 + add r1, r1, #6 + cmp r0, #0xfa + blt _0223E70A + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_0223E734: .word 0x02257740 +_0223E738: .word 0x0000020A +_0223E73C: .word 0x0000FFFF + thumb_func_end ov23_0223E6F8 + + thumb_func_start ov23_0223E740 +ov23_0223E740: ; 0x0223E740 + push {r3, r4, r5, r6, r7, lr} + mov lr, r1 + mov r1, #0xf + str r0, [sp] + lsl r1, r1, #6 + mov r0, lr + mul r1, r0 + ldr r0, [sp] + mov r6, #0 + add r5, r0, r1 + ldr r0, _0223E820 ; =0x02257740 + mvn r6, r6 + ldr r3, [r0, #0] + mov r2, #0 + mov ip, r3 + lsr r7, r6, #0x10 +_0223E760: + mov r0, #0x82 + lsl r0, r0, #2 + ldrh r1, [r3, r0] + cmp r1, r7 + beq _0223E784 + add r0, r0, #2 + ldrh r0, [r3, r0] + ldr r4, _0223E824 ; =0x0000FFFF + cmp r0, r4 + beq _0223E784 + mov r4, #0xf + lsl r4, r4, #6 + mul r4, r0 + add r0, r1, r4 + cmp r5, r0 + bge _0223E7A8 + add r6, r2, #0 + b _0223E7B0 +_0223E784: + mov r0, #6 + mul r0, r2 + mov r1, ip + add r2, r1, r0 + mov r3, #0x82 + ldr r1, [sp] + lsl r3, r3, #2 + strh r1, [r2, r3] + ldr r4, _0223E820 ; =0x02257740 + add r2, r3, #2 + ldr r1, [r4, #0] + add r5, r1, r0 + mov r1, lr + strh r1, [r5, r2] + ldr r1, [r4, #0] + add r1, r1, r3 + add r0, r1, r0 + pop {r3, r4, r5, r6, r7, pc} +_0223E7A8: + add r2, r2, #1 + add r3, r3, #6 + cmp r2, #0xfa + blt _0223E760 +_0223E7B0: + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _0223E80E + mov r1, #0xf8 + cmp r6, #0xf8 + bgt _0223E7F2 + mov r0, #0x5d + ldr r3, _0223E820 ; =0x02257740 + ldr r7, _0223E828 ; =0x00000213 + lsl r0, r0, #4 +_0223E7C6: + ldr r2, [r3, #0] + sub r1, r1, #1 + add r5, r2, r0 + mov r2, #0x82 + lsl r2, r2, #2 + ldrh r4, [r5, r2] + add r2, r2, #6 + strh r4, [r5, r2] + ldr r2, [r3, #0] + add r5, r2, r0 + ldr r2, _0223E82C ; =0x0000020A + ldrh r4, [r5, r2] + add r2, r2, #6 + strh r4, [r5, r2] + ldr r2, [r3, #0] + ldr r4, _0223E830 ; =0x0000020D + add r2, r2, r0 + ldrb r4, [r2, r4] + sub r0, r0, #6 + strb r4, [r2, r7] + cmp r1, r6 + bge _0223E7C6 +_0223E7F2: + ldr r3, _0223E820 ; =0x02257740 + mov r0, #6 + ldr r1, [r3, #0] + mul r0, r6 + add r4, r1, r0 + mov r2, #0x82 + ldr r1, [sp] + lsl r2, r2, #2 + strh r1, [r4, r2] + ldr r1, [r3, #0] + add r3, r1, r0 + add r1, r2, #2 + mov r0, lr + strh r0, [r3, r1] +_0223E80E: + ldr r0, _0223E820 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x82 + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #6 + mul r0, r6 + add r0, r1, r0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E820: .word 0x02257740 +_0223E824: .word 0x0000FFFF +_0223E828: .word 0x00000213 +_0223E82C: .word 0x0000020A +_0223E830: .word 0x0000020D + thumb_func_end ov23_0223E740 + + thumb_func_start ov23_0223E834 +ov23_0223E834: ; 0x0223E834 + push {r4, r5, r6, lr} + ldr r0, _0223E874 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r6, r0, #0 + mov r5, #0 +_0223E846: + add r0, r6, #0 + add r1, r5, #0 + bl sub_020291CC + add r4, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + bl sub_020291EC + add r1, r0, #0 + cmp r4, #0 + beq _0223E86A + cmp r1, #0 + beq _0223E86A + add r0, r4, #0 + bl ov23_0223E740 + strb r5, [r0, #5] +_0223E86A: + add r5, r5, #1 + cmp r5, #0xff + blt _0223E846 + pop {r4, r5, r6, pc} + nop +_0223E874: .word 0x02257740 + thumb_func_end ov23_0223E834 + + thumb_func_start ov23_0223E878 +ov23_0223E878: ; 0x0223E878 + push {r3, lr} + bl sub_0203608C + cmp r0, #0 + bne _0223E88A + bl ov23_022414D4 + bl ov23_022413B4 +_0223E88A: + pop {r3, pc} + thumb_func_end ov23_0223E878 + + thumb_func_start ov23_0223E88C +ov23_0223E88C: ; 0x0223E88C + push {r4, r5, r6, r7} + ldr r3, _0223E8C4 ; =0x02257740 + ldr r5, _0223E8C8 ; =0x0000020A + ldr r4, [r3, #0] + mov r2, #0 + add r3, r4, #0 + sub r6, r5, #2 +_0223E89A: + ldrh r7, [r3, r6] + cmp r0, r7 + bne _0223E8B6 + ldrh r7, [r3, r5] + cmp r1, r7 + bne _0223E8B6 + mov r0, #0x82 + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #6 + mul r0, r2 + add r0, r1, r0 + pop {r4, r5, r6, r7} + bx lr +_0223E8B6: + add r2, r2, #1 + add r3, r3, #6 + cmp r2, #0xfa + blt _0223E89A + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_0223E8C4: .word 0x02257740 +_0223E8C8: .word 0x0000020A + thumb_func_end ov23_0223E88C + + thumb_func_start ov23_0223E8CC +ov23_0223E8CC: ; 0x0223E8CC + push {r3, r4, r5, r6, r7, lr} + add r2, r1, #0 + add r6, r1, #0 + str r2, [sp] + add r2, #0x50 + add r4, r0, #0 + add r7, r0, #0 + sub r6, #0x50 + str r2, [sp] + sub r4, #0x50 + add r7, #0x50 + mov r5, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _0223E8F0 + sub r0, r5, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223E8F0: + cmp r4, #0x40 + bge _0223E8F6 + mov r4, #0x40 +_0223E8F6: + mov r0, #2 + lsl r0, r0, #8 + cmp r7, r0 + ble _0223E900 + add r7, r0, #0 +_0223E900: + cmp r6, #0x20 + bge _0223E906 + mov r6, #0x20 +_0223E906: + mov r1, #0x1e + ldr r0, [sp] + lsl r1, r1, #4 + cmp r0, r1 + ble _0223E912 + str r1, [sp] +_0223E912: + ldr r0, _0223E994 ; =0x02257740 + mov r2, #0 + ldr r3, [r0, #0] +_0223E918: + ldr r0, _0223E998 ; =0x0000020A + ldrh r1, [r3, r0] + cmp r1, r6 + blt _0223E936 + ldr r0, [sp] + cmp r1, r0 + bgt _0223E936 + mov r0, #0x82 + lsl r0, r0, #2 + ldrh r0, [r3, r0] + cmp r0, r4 + ble _0223E936 + cmp r0, r7 + bge _0223E936 + add r5, r5, #1 +_0223E936: + add r2, r2, #1 + add r3, r3, #6 + cmp r2, #0xfa + blt _0223E918 + cmp r5, #0 + bne _0223E948 + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0223E948: + bl sub_0201D2E8 + add r1, r5, #0 + bl sub_020E1F6C + ldr r0, _0223E994 ; =0x02257740 + mov r3, #0 + ldr r2, [r0, #0] + mov ip, r1 + add r5, r3, #0 +_0223E95C: + ldr r0, _0223E998 ; =0x0000020A + ldrh r1, [r2, r0] + cmp r1, r6 + blt _0223E984 + ldr r0, [sp] + cmp r1, r0 + bgt _0223E984 + mov r0, #0x82 + lsl r0, r0, #2 + ldrh r0, [r2, r0] + cmp r0, r4 + ble _0223E984 + cmp r0, r7 + bge _0223E984 + mov r0, ip + cmp r3, r0 + bne _0223E982 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_0223E982: + add r3, r3, #1 +_0223E984: + add r5, r5, #1 + add r2, r2, #6 + cmp r5, #0xfa + blt _0223E95C + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223E994: .word 0x02257740 +_0223E998: .word 0x0000020A + thumb_func_end ov23_0223E8CC + + thumb_func_start ov23_0223E99C +ov23_0223E99C: ; 0x0223E99C + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223E9CC ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _0223E9D0 ; =0x000007E4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223E9B2 + mov r1, #4 + bl sub_02002154 +_0223E9B2: + ldr r1, _0223E9CC ; =0x02257740 + ldr r0, _0223E9D0 ; =0x000007E4 + ldr r2, [r1, #0] + mov r3, #0 + str r3, [r2, r0] + ldr r1, [r1, #0] + add r0, #0x98 + str r3, [r1, r0] + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + nop +_0223E9CC: .word 0x02257740 +_0223E9D0: .word 0x000007E4 + thumb_func_end ov23_0223E99C + + thumb_func_start ov23_0223E9D4 +ov23_0223E9D4: ; 0x0223E9D4 + push {r4, lr} + add r4, r2, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0223EA24 + bl sub_02035EE0 + cmp r0, #0 + beq _0223EA24 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x13 + add r3, r2, #0 + bl ov23_02253F40 + ldr r2, _0223EA28 ; =0x02257740 + mov r1, #0x9e + ldr r3, [r2, #0] + lsl r1, r1, #4 + str r0, [r3, r1] + ldr r1, [r2, #0] + ldr r0, _0223EA2C ; =ov23_0223EA38 + mov r2, #0 + bl sub_0200D9E8 + ldr r2, _0223EA28 ; =0x02257740 + ldr r1, _0223EA30 ; =0x0000087C + ldr r3, [r2, #0] + str r0, [r3, r1] + ldr r2, [r2, #0] + mov r0, #0 + ldr r1, [r2, r1] + ldr r2, _0223EA34 ; =ov23_0223E99C + bl ov23_022431EC + bl sub_020594FC +_0223EA24: + pop {r4, pc} + nop +_0223EA28: .word 0x02257740 +_0223EA2C: .word ov23_0223EA38 +_0223EA30: .word 0x0000087C +_0223EA34: .word ov23_0223E99C + thumb_func_end ov23_0223E9D4 + + thumb_func_start ov23_0223EA38 +ov23_0223EA38: ; 0x0223EA38 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _0223EAE4 ; =0x02257740 + ldr r2, [r0, #0] + mov r0, #0x9e + lsl r0, r0, #4 + ldr r1, [r2, r0] + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + beq _0223EA8A + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223EADE + mov r0, #4 + str r0, [sp] + ldr r0, _0223EAE4 ; =0x02257740 + ldr r1, _0223EAE8 ; =0x0225630E + ldr r0, [r0, #0] + ldr r2, _0223EAEC ; =0x000003D9 + ldr r0, [r0, #0] + mov r3, #0xb + ldr r0, [r0, #8] + bl sub_02002100 + ldr r2, _0223EAE4 ; =0x02257740 + ldr r1, _0223EAF0 ; =0x000007E4 + ldr r3, [r2, #0] + add sp, #8 + str r0, [r3, r1] + mov r3, #0 + mov r0, #0x9e + ldr r1, [r2, #0] + mvn r3, r3 + lsl r0, r0, #4 + str r3, [r1, r0] + pop {r4, pc} +_0223EA8A: + ldr r0, _0223EAF0 ; =0x000007E4 + mov r1, #4 + ldr r0, [r2, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0223EADE + cmp r0, #0 + add r0, sp, #4 + bne _0223EAA8 + mov r1, #1 + strb r1, [r0] + b _0223EAB0 +_0223EAA8: + mov r1, #0 + strb r1, [r0] + bl sub_02059514 +_0223EAB0: + mov r0, #0x41 + add r1, sp, #4 + bl sub_020360D0 + ldr r0, _0223EAE4 ; =0x02257740 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _0223EAF0 ; =0x000007E4 + str r2, [r1, r0] + bl ov23_0224219C + bl ov23_02254044 + add r0, r4, #0 + bl sub_0200DA58 + bl ov23_02243204 + ldr r0, _0223EAE4 ; =0x02257740 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _0223EAF4 ; =0x0000087C + str r2, [r1, r0] +_0223EADE: + add sp, #8 + pop {r4, pc} + nop +_0223EAE4: .word 0x02257740 +_0223EAE8: .word 0x0225630E +_0223EAEC: .word 0x000003D9 +_0223EAF0: .word 0x000007E4 +_0223EAF4: .word 0x0000087C + thumb_func_end ov23_0223EA38 + + thumb_func_start ov23_0223EAF8 +ov23_0223EAF8: ; 0x0223EAF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _0223EB7C ; =0x02257740 + add r7, r2, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + str r0, [sp] + ldr r0, _0223EB7C ; =0x02257740 + lsl r6, r5, #2 + ldr r1, [r0, #0] + ldr r0, _0223EB80 ; =0x000007E8 + add r2, r1, r6 + ldr r4, [r2, r0] + add r0, sp, #4 + strb r5, [r0] + ldrb r0, [r7] + cmp r0, #0 + beq _0223EB64 + cmp r4, #0 + beq _0223EB64 + ldrb r0, [r4, #4] + cmp r0, #0xff + bne _0223EB76 + mov r0, #0x42 + add r1, sp, #4 + mov r2, #1 + bl sub_02035AC4 + mov r0, #0xff + strb r0, [r4, #4] + ldr r0, _0223EB84 ; =0x0000FFFF + strh r0, [r4] + strh r0, [r4, #2] + ldrb r1, [r4, #5] + ldr r0, [sp] + bl sub_020291A4 + ldr r1, _0223EB7C ; =0x02257740 + mov r3, #1 + ldr r0, [r1, #0] + add sp, #8 + add r2, r0, r5 + ldr r0, _0223EB88 ; =0x00000808 + strb r3, [r2, r0] + ldr r1, [r1, #0] + mov r2, #0 + add r1, r1, r6 + sub r0, #0x20 + str r2, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_0223EB64: + add r2, r1, r5 + ldr r1, _0223EB88 ; =0x00000808 + mov r0, #0 + strb r0, [r2, r1] + ldr r2, _0223EB7C ; =0x02257740 + sub r1, #0x20 + ldr r2, [r2, #0] + add r2, r2, r6 + str r0, [r2, r1] +_0223EB76: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223EB7C: .word 0x02257740 +_0223EB80: .word 0x000007E8 +_0223EB84: .word 0x0000FFFF +_0223EB88: .word 0x00000808 + thumb_func_end ov23_0223EAF8 + + thumb_func_start ov23_0223EB8C +ov23_0223EB8C: ; 0x0223EB8C + push {r4, lr} + add r4, r2, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0223EBA8 + bl sub_020594FC + ldr r0, _0223EBB8 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl ov23_0223F70C +_0223EBA8: + ldr r0, _0223EBB8 ; =0x02257740 + mov r2, #1 + ldr r1, [r0, #0] + ldrb r0, [r4] + add r1, r1, r0 + ldr r0, _0223EBBC ; =0x000008C4 + strb r2, [r1, r0] + pop {r4, pc} + ; .align 2, 0 +_0223EBB8: .word 0x02257740 +_0223EBBC: .word 0x000008C4 + thumb_func_end ov23_0223EB8C + + thumb_func_start ov23_0223EBC0 +ov23_0223EBC0: ; 0x0223EBC0 + push {r3, r4} + ldr r2, _0223EBDC ; =0x02257740 + mov r4, #0 + ldr r1, [r2, #0] + add r3, r1, r0 + ldr r1, _0223EBE0 ; =0x00000808 + strb r4, [r3, r1] + ldr r2, [r2, #0] + add r1, #0xb0 + add r0, r2, r0 + strb r4, [r0, r1] + pop {r3, r4} + bx lr + nop +_0223EBDC: .word 0x02257740 +_0223EBE0: .word 0x00000808 + thumb_func_end ov23_0223EBC0 + + thumb_func_start ov23_0223EBE4 +ov23_0223EBE4: ; 0x0223EBE4 + push {r3, lr} + add r1, sp, #0 + strb r0, [r1] + ldrb r0, [r2] + strb r0, [r1, #1] + ldrb r0, [r2, #1] + strb r0, [r1, #2] + mov r0, #0x45 + add r1, sp, #0 + bl sub_02035B48 + pop {r3, pc} + thumb_func_end ov23_0223EBE4 + + thumb_func_start ov23_0223EBFC +ov23_0223EBFC: ; 0x0223EBFC + mov r0, #2 + bx lr + thumb_func_end ov23_0223EBFC + + thumb_func_start ov23_0223EC00 +ov23_0223EC00: ; 0x0223EC00 + push {r3, r4, r5, lr} + add r5, r2, #0 + ldrb r4, [r5] + bl sub_0203608C + cmp r4, r0 + beq _0223EC26 + ldr r1, _0223EC28 ; =0x02257740 + ldrb r3, [r5, #1] + ldr r0, [r1, #0] + add r2, r0, r4 + ldr r0, _0223EC2C ; =0x000008CC + strb r3, [r2, r0] + ldr r2, [r1, #0] + ldrb r1, [r5] + ldrb r3, [r5, #2] + add r0, #8 + add r1, r2, r1 + strb r3, [r1, r0] +_0223EC26: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223EC28: .word 0x02257740 +_0223EC2C: .word 0x000008CC + thumb_func_end ov23_0223EC00 + + thumb_func_start ov23_0223EC30 +ov23_0223EC30: ; 0x0223EC30 + mov r0, #3 + bx lr + thumb_func_end ov23_0223EC30 + + thumb_func_start ov23_0223EC34 +ov23_0223EC34: ; 0x0223EC34 + push {r3, r4, r5, lr} + sub sp, #0xa8 + ldr r5, _0223ED50 ; =0x022563A8 + add r4, r0, #0 + add r3, sp, #0x80 + mov r2, #5 +_0223EC40: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223EC40 + add r0, sp, #0x80 + bl sub_0201FE94 + ldr r5, _0223ED54 ; =0x02256328 + add r3, sp, #0x70 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223ED58 ; =0x02256338 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x1d + bl sub_02019690 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _0223ED5C ; =0x02256354 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x1d + bl sub_02019690 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + ldr r5, _0223ED60 ; =0x02256370 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x1d + bl sub_02019690 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + ldr r5, _0223ED64 ; =0x0225638C + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x1d + bl sub_02019690 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x1d + bl sub_02019690 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x1d + bl sub_02019690 + add sp, #0xa8 + pop {r3, r4, r5, pc} + nop +_0223ED50: .word 0x022563A8 +_0223ED54: .word 0x02256328 +_0223ED58: .word 0x02256338 +_0223ED5C: .word 0x02256354 +_0223ED60: .word 0x02256370 +_0223ED64: .word 0x0225638C + thumb_func_end ov23_0223EC34 + + thumb_func_start ov23_0223ED68 +ov23_0223ED68: ; 0x0223ED68 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r7, r3, #0 + cmp r4, #0 + beq _0223ED8A + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021D6C + b _0223ED9A +_0223ED8A: + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021D6C +_0223ED9A: + cmp r7, #0 + beq _0223EDB6 + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_02021D6C + ldr r0, _0223EE74 ; =0x000006A4 + bl sub_02005748 + b _0223EDE8 +_0223EDB6: + cmp r4, #0 + beq _0223EDD2 + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #3 + bl sub_02021D6C + ldr r0, _0223EE78 ; =0x000006A2 + bl sub_02005748 + b _0223EDE8 +_0223EDD2: + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #4 + bl sub_02021D6C + ldr r0, _0223EE7C ; =0x000006A3 + bl sub_02005748 +_0223EDE8: + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + add r5, #8 + lsl r0, r5, #0xc + add r6, #8 + str r0, [sp] + lsl r0, r6, #0xc + str r0, [sp, #4] + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [sp, #0x20] + cmp r0, #0 + beq _0223EE6A + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #5 + bl sub_02021D6C + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, _0223EE70 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 +_0223EE6A: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0223EE70: .word 0x02257740 +_0223EE74: .word 0x000006A4 +_0223EE78: .word 0x000006A2 +_0223EE7C: .word 0x000006A3 + thumb_func_end ov23_0223ED68 + + thumb_func_start ov23_0223EE80 +ov23_0223EE80: ; 0x0223EE80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0 + add r6, r0, #0 + mov r0, #0x3a + add r2, r1, #0 + bl sub_02004550 + bl ov23_0223E140 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r2, #5 + mov r0, #3 + mov r1, #0x1d + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r0, #0x1d + bl sub_02018340 + add r5, r0, #0 + ldr r0, _0223EF8C ; =0x02257740 + add r1, r5, #0 + ldr r0, [r0, #0] + str r5, [r0, #4] + ldr r0, _0223EF90 ; =ov23_022411E8 + bl sub_02017798 + bl ov23_0224219C + ldr r2, _0223EF94 ; =0x000001E2 + add r1, r5, #0 + add r3, r2, #0 + sub r3, #0xb5 + bl ov23_02253E2C + add r0, r5, #0 + bl ov23_0223EC34 + add r0, r5, #0 + mov r1, #0 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #1 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #2 + bl sub_02019EBC + mov r0, #0 + str r0, [sp] + mov r0, #0x1d + str r0, [sp, #4] + ldr r2, _0223EF94 ; =0x000001E2 + add r0, r5, #0 + mov r1, #3 + mov r3, #0xa + bl sub_0200DD0C + mov r0, #0x34 + mov r1, #0x1d + bl sub_02006C24 + mov r1, #0x60 + str r1, [sp] + mov r1, #0x1d + mov r2, #0 + str r1, [sp, #4] + mov r1, #1 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r0, #0x1d + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r5, #0 + add r3, r1, #0 + bl sub_020070E8 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + add r7, r0, #0 + str r3, [sp, #8] + mov r0, #0x1d + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #2 + add r2, r5, #0 + bl sub_0200710C + add r0, r4, #0 + bl sub_02006CA8 + mov r3, #0x80 + str r3, [sp] + mov r0, #0x1d + str r0, [sp, #4] + mov r0, #0x32 + mov r1, #0x34 + mov r2, #0 + add r3, #0xc0 + bl sub_02006E84 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + bl ov23_0223FA3C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223EF8C: .word 0x02257740 +_0223EF90: .word ov23_022411E8 +_0223EF94: .word 0x000001E2 + thumb_func_end ov23_0223EE80 + + thumb_func_start ov23_0223EF98 +ov23_0223EF98: ; 0x0223EF98 + push {r3, lr} + sub sp, #0x10 + ldr r0, _0223F01C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_022404C8 + ldr r0, _0223F01C ; =0x02257740 + mov r1, #1 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl sub_02019448 + ldr r0, _0223F01C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_0223FF8C + mov r0, #1 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x1d + str r0, [sp, #0xc] + ldr r2, _0223F01C ; =0x02257740 + mov r0, #0x37 + ldr r2, [r2, #0] + mov r1, #9 + ldr r2, [r2, #4] + mov r3, #2 + bl sub_02006E3C + ldr r0, _0223F01C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_022401B0 + mov r0, #0 + mov r1, #3 + bl sub_02019060 + mov r0, #1 + mov r1, #2 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + mov r0, #3 + mov r1, #0 + bl sub_02019060 + bl ov23_02240E88 + bl ov23_0224108C + ldr r0, _0223F01C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_02240688 + add sp, #0x10 + pop {r3, pc} + nop +_0223F01C: .word 0x02257740 + thumb_func_end ov23_0223EF98 + + thumb_func_start ov23_0223F020 +ov23_0223F020: ; 0x0223F020 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _0223F110 ; =0x02257740 + mov r1, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl sub_02019044 + ldr r0, _0223F110 ; =0x02257740 + mov r1, #1 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl sub_02019044 + ldr r0, _0223F110 ; =0x02257740 + mov r1, #2 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl sub_02019044 + ldr r0, _0223F110 ; =0x02257740 + mov r1, #3 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl sub_02019044 + ldr r0, _0223F110 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A4E4 + ldr r0, _0223F110 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x5b + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A4E4 + ldr r0, _0223F110 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A6DC + ldr r0, _0223F110 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A6DC + mov r6, #0 + ldr r7, _0223F110 ; =0x02257740 + add r4, r6, #0 +_0223F092: + ldr r0, [r7, #0] + add r1, r0, r4 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02009754 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0223F092 + mov r4, #0 + add r6, r4, #0 +_0223F0AC: + ldr r0, [r5, #0x18] + cmp r0, #0 + beq _0223F0B8 + bl sub_020181C4 + str r6, [r5, #0x18] +_0223F0B8: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223F0AC + ldr r0, _0223F110 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_02021964 + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + ldr r0, _0223F110 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl sub_020181C4 + ldr r0, _0223F110 ; =0x02257740 + mov r1, #0 + ldr r0, [r0, #0] + str r1, [r0, #4] + mov r0, #0x1d + bl sub_0201807C + bl ov23_0224219C + ldr r1, _0223F110 ; =0x02257740 + ldr r2, _0223F114 ; =0x000003E2 + ldr r1, [r1, #0] + add r3, r2, #0 + ldr r1, [r1, #0] + sub r3, #0xb5 + ldr r1, [r1, #8] + bl ov23_02253E2C + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F110: .word 0x02257740 +_0223F114: .word 0x000003E2 + thumb_func_end ov23_0223F020 + + thumb_func_start ov23_0223F118 +ov23_0223F118: ; 0x0223F118 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0x10] + cmp r0, #0x1b + bls _0223F12A + b _0223F6F4 +_0223F12A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223F136: ; jump table + .short _0223F16E - _0223F136 - 2 ; case 0 + .short _0223F18A - _0223F136 - 2 ; case 1 + .short _0223F1B2 - _0223F136 - 2 ; case 2 + .short _0223F1D0 - _0223F136 - 2 ; case 3 + .short _0223F1E8 - _0223F136 - 2 ; case 4 + .short _0223F1F8 - _0223F136 - 2 ; case 5 + .short _0223F206 - _0223F136 - 2 ; case 6 + .short _0223F24C - _0223F136 - 2 ; case 7 + .short _0223F266 - _0223F136 - 2 ; case 8 + .short _0223F278 - _0223F136 - 2 ; case 9 + .short _0223F2AA - _0223F136 - 2 ; case 10 + .short _0223F2EA - _0223F136 - 2 ; case 11 + .short _0223F310 - _0223F136 - 2 ; case 12 + .short _0223F34A - _0223F136 - 2 ; case 13 + .short _0223F36E - _0223F136 - 2 ; case 14 + .short _0223F3B0 - _0223F136 - 2 ; case 15 + .short _0223F400 - _0223F136 - 2 ; case 16 + .short _0223F428 - _0223F136 - 2 ; case 17 + .short _0223F484 - _0223F136 - 2 ; case 18 + .short _0223F4B8 - _0223F136 - 2 ; case 19 + .short _0223F4E4 - _0223F136 - 2 ; case 20 + .short _0223F528 - _0223F136 - 2 ; case 21 + .short _0223F5CC - _0223F136 - 2 ; case 22 + .short _0223F600 - _0223F136 - 2 ; case 23 + .short _0223F630 - _0223F136 - 2 ; case 24 + .short _0223F66C - _0223F136 - 2 ; case 25 + .short _0223F684 - _0223F136 - 2 ; case 26 + .short _0223F6B4 - _0223F136 - 2 ; case 27 +_0223F16E: + mov r0, #0 + bl ov23_0224DBF4 + bl ov23_022417CC + bl sub_0205764C + bl ov23_0224B430 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F18A: + ldr r0, [r5, #0x6c] + bl ov23_0224942C + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #2 + mov r1, #0x10 + mov r2, #0x12 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F1B2: + bl sub_0200F2AC + cmp r0, #0 + beq _0223F2B4 + ldr r0, [r5, #0x6c] + cmp r0, #0 + bne _0223F2B4 + add r0, r5, #0 + bl sub_0203CD44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F1D0: + add r0, r5, #0 + bl sub_0203CD4C + cmp r0, #0 + bne _0223F2B4 + bl sub_02039794 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F1E8: + add r0, r4, #0 + bl ov23_0223EE80 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F1F8: + bl ov23_0223EF98 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F206: + bl sub_02039734 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x1d + mov r1, #0x11 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F24C: + bl sub_0200F2AC + cmp r0, #0 + beq _0223F2B4 + mov r0, #0 + str r0, [r4, #8] + ldr r0, _0223F594 ; =0x0000054A + bl sub_02005748 + mov r0, #8 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F266: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x14 + ble _0223F2B4 + mov r0, #9 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F278: + bl ov23_0224219C + ldr r2, [r4, #0xc] + mov r1, #0 + bl ov23_0225410C + bl ov23_0224219C + mov r2, #0 + mov r1, #0x3e + add r3, r2, #0 + bl ov23_02253F60 + ldr r1, _0223F598 ; =0x02257740 + add sp, #0xc + ldr r2, [r1, #0] + mov r1, #0x9e + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F2AA: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x50 + bgt _0223F2B6 +_0223F2B4: + b _0223F6F4 +_0223F2B6: + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298B0 + add r5, r0, #0 + bl ov23_0224219C + bl ov23_02254044 + add r0, r5, #0 + bl sub_0202920C + cmp r0, #0 + beq _0223F2E2 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F2E2: + mov r0, #0xd + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F2EA: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x55 + add r3, r2, #0 + bl ov23_02253F40 + ldr r1, _0223F598 ; =0x02257740 + add sp, #0xc + ldr r2, [r1, #0] + mov r1, #0x9e + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F310: + ldr r0, _0223F598 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x9e + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223F3EE + ldr r0, _0223F59C ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223F338 + ldr r0, _0223F5A0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0223F3EE +_0223F338: + bl ov23_0224219C + bl ov23_02254044 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F34A: + add r0, r4, #0 + bl ov23_02240CFC + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_02240B84 + add r0, r4, #0 + bl ov23_0223FDE0 + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0223F36E: + add r0, r4, #0 + bl ov23_0223FDE0 + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + bne _0223F3EE + bl ov23_0224219C + mov r2, #0 + mov r1, #0x40 + add r3, r2, #0 + bl ov23_02253F40 + ldr r1, _0223F598 ; =0x02257740 + ldr r2, [r1, #0] + mov r1, #0x9e + lsl r1, r1, #4 + str r0, [r2, r1] + ldr r0, _0223F5A4 ; =0x000005E3 + bl sub_02005748 + mov r0, #0x3c + str r0, [r4, #0x4c] + mov r0, #0xf + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F3B0: + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + ldr r0, _0223F598 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x9e + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223F3EE + ldr r0, [r4, #0x4c] + sub r0, r0, #1 + str r0, [r4, #0x4c] + ldr r0, _0223F59C ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223F3F0 + ldr r0, _0223F5A0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _0223F3F0 + ldr r0, [r4, #0x4c] + cmp r0, #0 + beq _0223F3F0 +_0223F3EE: + b _0223F6F4 +_0223F3F0: + bl ov23_0224219C + bl ov23_02254044 + mov r0, #0x10 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F400: + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + add r0, r4, #0 + bl ov23_022409F0 + cmp r0, #0 + beq _0223F420 + mov r0, #0x11 + str r0, [r4, #0] + mov r0, #0x3c + add sp, #0xc + str r0, [r4, #0x4c] + pop {r4, r5, r6, r7, pc} +_0223F420: + mov r0, #0x12 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F428: + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + ldr r0, _0223F598 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x9e + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223F536 + ldr r0, [r4, #0x4c] + sub r0, r0, #1 + str r0, [r4, #0x4c] + ldr r0, _0223F59C ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223F466 + ldr r0, _0223F5A0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _0223F466 + ldr r0, [r4, #0x4c] + cmp r0, #0 + bne _0223F536 +_0223F466: + add r0, r4, #0 + bl ov23_02240A90 + cmp r0, #0 + beq _0223F47C + mov r0, #0x3c + str r0, [r4, #0x4c] + mov r0, #0xf + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F47C: + mov r0, #0x10 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F484: + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + bl ov23_0224219C + bl ov23_02254044 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x1d + mov r1, #0x10 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F4B8: + ldr r0, _0223F598 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + bl sub_0200F2AC + cmp r0, #0 + beq _0223F536 + bl sub_02039794 + add r0, r4, #0 + bl ov23_0223F020 + add r0, r5, #0 + bl sub_020509D4 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F4E4: + add r0, r5, #0 + bl sub_020509DC + cmp r0, #0 + beq _0223F536 + add r0, r5, #0 + bl ov23_02249404 + str r0, [r5, #0x6c] + bl sub_02039734 + bl sub_020594FC + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x11 + mov r2, #0x13 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F528: + mov r0, #0 + bl sub_0200F338 + bl sub_0200F2AC + cmp r0, #0 + bne _0223F538 +_0223F536: + b _0223F6F4 +_0223F538: + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + mov r3, #0x80 + str r3, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0x32 + mov r1, #0x34 + mov r2, #0 + add r3, #0xc0 + bl sub_02006E84 + mov r0, #2 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0x10] + ldr r2, _0223F5A8 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + bl sub_020576A0 + bl ov23_0224B460 + bl ov23_022417E0 + add r1, r4, #0 + mov r0, #0x43 + add r1, #0x50 + bl sub_020360D0 + bl sub_02059514 + ldr r0, _0223F598 ; =0x02257740 + b _0223F5AC + ; .align 2, 0 +_0223F594: .word 0x0000054A +_0223F598: .word 0x02257740 +_0223F59C: .word 0x021BF6BC +_0223F5A0: .word 0x021BF67C +_0223F5A4: .word 0x000005E3 +_0223F5A8: .word 0x000003D9 +_0223F5AC: + mov r2, #0 + ldr r1, [r0, #0] + mov r0, #0x22 + lsl r0, r0, #6 + str r2, [r1, r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + mov r0, #1 + bl ov23_0224DBF4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0223F5CC: + ldr r1, _0223F6F8 ; =0x02257740 + ldr r0, _0223F6FC ; =0x000009E8 + ldr r2, [r1, #0] + mov r3, #1 + strb r3, [r2, r0] + ldr r2, [r4, #8] + sub r2, r2, #1 + str r2, [r4, #8] + bne _0223F5E8 + ldr r1, [r1, #0] + mov r2, #0x64 + strb r2, [r1, r0] + mov r0, #0x17 + str r0, [r4, #0] +_0223F5E8: + ldr r0, _0223F6F8 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_02240B84 + ldr r0, _0223F6F8 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0223F600: + ldr r0, _0223F6F8 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + mov r0, #0xf + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x1d + mov r1, #2 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, _0223F700 ; =0x000006A1 + bl sub_02005748 + mov r0, #0x18 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F630: + bl sub_0200F2AC + cmp r0, #0 + beq _0223F65E + mov r6, #0 + ldr r7, _0223F6F8 ; =0x02257740 + add r5, r6, #0 +_0223F63E: + ldr r0, [r7, #0] + add r1, r0, r5 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #8 + blt _0223F63E + mov r0, #0x19 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F65E: + ldr r0, _0223F6F8 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0x20] + bl sub_020219F8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0223F66C: + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + mov r3, #7 + str r0, [sp] + bl sub_0200AAE0 + mov r0, #0x1a + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F684: + mov r0, #0 + bl sub_0200F32C + mov r0, #0 + bl sub_0200F338 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x3f + add r3, r2, #0 + bl ov23_02253F40 + ldr r1, _0223F6F8 ; =0x02257740 + add sp, #0xc + ldr r2, [r1, #0] + mov r1, #0x9e + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #0x3c + str r0, [r4, #0x4c] + mov r0, #0xf + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_0223F6B4: + ldr r0, _0223F6F8 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x9e + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223F6F4 + ldr r0, [r4, #0x4c] + sub r0, r0, #1 + str r0, [r4, #0x4c] + ldr r0, _0223F704 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223F6E8 + ldr r0, _0223F708 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _0223F6E8 + ldr r0, [r4, #0x4c] + cmp r0, #0 + bne _0223F6F4 +_0223F6E8: + bl ov23_0224219C + bl ov23_02254044 + mov r0, #0x13 + str r0, [r4, #0] +_0223F6F4: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F6F8: .word 0x02257740 +_0223F6FC: .word 0x000009E8 +_0223F700: .word 0x000006A1 +_0223F704: .word 0x021BF6BC +_0223F708: .word 0x021BF67C + thumb_func_end ov23_0223F118 + + thumb_func_start ov23_0223F70C +ov23_0223F70C: ; 0x0223F70C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xb + bl sub_0202BE14 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x9c + ldr r0, [r0, #0] + mov r2, #1 + bl sub_0202B758 + mov r0, #0xb + mov r1, #0x54 + bl sub_02018184 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x54 + bl sub_020C4CF4 + str r5, [r4, #0x10] + ldr r0, [r5, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206AA04 + ldr r0, _0223F760 ; =ov23_0223F118 + add r1, r4, #0 + mov r2, #0x64 + bl sub_0200D9E8 + ldr r1, _0223F764 ; =0x02257740 + ldr r2, [r1, #0] + mov r1, #0x22 + lsl r1, r1, #6 + str r0, [r2, r1] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223F760: .word ov23_0223F118 +_0223F764: .word 0x02257740 + thumb_func_end ov23_0223F70C + + thumb_func_start ov23_0223F768 +ov23_0223F768: ; 0x0223F768 + ldr r0, _0223F788 ; =0x02257740 + mov r2, #0 + ldr r3, [r0, #0] + mov r0, #0x81 + lsl r0, r0, #4 +_0223F772: + ldr r1, [r3, r0] + cmp r1, #0 + bne _0223F77C + mov r0, #1 + bx lr +_0223F77C: + add r2, r2, #1 + add r3, #0xc + cmp r2, #8 + blt _0223F772 + mov r0, #0 + bx lr + ; .align 2, 0 +_0223F788: .word 0x02257740 + thumb_func_end ov23_0223F768 + + thumb_func_start ov23_0223F78C +ov23_0223F78C: ; 0x0223F78C + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + ldr r2, _0223F7F8 ; =0x02257740 + mov r3, #0x81 + ldr r2, [r2, #0] + mov ip, r1 + mov r1, #0 + add r5, r2, #0 + lsl r3, r3, #4 +_0223F79E: + ldr r4, [r5, r3] + cmp r4, #0 + bne _0223F7E8 + add r4, r0, #0 + mov r3, #0x14 + mul r4, r3 + ldr r3, _0223F7FC ; =0x02256EB0 + mov r0, #0xc + mul r0, r1 + add r5, r3, r4 + mov r3, #0x81 + add r2, r2, r0 + lsl r3, r3, #4 + str r5, [r2, r3] + ldr r2, _0223F800 ; =0x02256EBE + ldrb r6, [r2, r4] + ldr r4, _0223F7F8 ; =0x02257740 + ldr r2, [r4, #0] + add r5, r2, r0 + add r2, r3, #4 + strb r6, [r5, r2] + ldr r2, [r4, #0] + mov r6, ip + add r5, r2, r0 + add r2, r3, #5 + strb r6, [r5, r2] + ldr r2, [r4, #0] + add r5, r2, r0 + add r2, r3, #6 + strb r7, [r5, r2] + ldr r2, [r4, #0] + mov r5, #0 + add r0, r2, r0 + add r3, #8 + strb r5, [r0, r3] + add r0, r1, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223F7E8: + add r1, r1, #1 + add r5, #0xc + cmp r1, #8 + blt _0223F79E + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F7F8: .word 0x02257740 +_0223F7FC: .word 0x02256EB0 +_0223F800: .word 0x02256EBE + thumb_func_end ov23_0223F78C + + thumb_func_start ov23_0223F804 +ov23_0223F804: ; 0x0223F804 + push {r3, r4} + ldr r3, [r0, #0] + cmp r3, #0 + bne _0223F812 + mov r0, #1 + pop {r3, r4} + bx lr +_0223F812: + lsr r4, r1, #0x1f + add r4, r1, r4 + ldrb r0, [r0, #0xc] + asr r1, r4, #1 + lsr r4, r2, #0x1f + add r4, r2, r4 + asr r2, r4, #1 + lsr r0, r0, #1 + mul r0, r2 + add r0, r1, r0 + ldrb r0, [r3, r0] + cmp r0, #0x6f + beq _0223F832 + mov r0, #1 + pop {r3, r4} + bx lr +_0223F832: + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov23_0223F804 + + thumb_func_start ov23_0223F838 +ov23_0223F838: ; 0x0223F838 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + str r0, [sp] + str r1, [sp, #4] + add r6, r2, #0 + bl ov23_0223F768 + cmp r0, #0 + bne _0223F850 + add sp, #0x2c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223F850: + ldr r0, [sp] + mov r1, #0x14 + mul r1, r0 + str r1, [sp, #0xc] + ldr r1, _0223F95C ; =0x02256EBC + ldr r0, [sp, #0xc] + ldrb r0, [r1, r0] + lsr r1, r0, #1 + ldr r0, [sp, #4] + add r0, r0, r1 + str r0, [sp, #0x1c] + ldr r1, _0223F960 ; =0x02256EBD + ldr r0, [sp, #0xc] + ldrb r0, [r1, r0] + lsr r0, r0, #1 + add r7, r6, r0 + ldr r0, [sp, #0x1c] + cmp r0, #0xd + ble _0223F87C + add sp, #0x2c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223F87C: + cmp r7, #0xa + ble _0223F886 + add sp, #0x2c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223F886: + ldr r0, [sp, #4] + str r0, [sp, #0x10] + add r1, r0, #0 + ldr r0, [sp, #0x1c] + cmp r1, r0 + bge _0223F8EA + mov r0, #0xd + mul r0, r6 + str r0, [sp, #0x20] +_0223F898: + add r4, r6, #0 + cmp r6, r7 + bge _0223F8DE + ldr r1, [sp, #0x10] + ldr r0, [sp, #4] + ldr r5, [sp, #0x20] + sub r0, r1, r0 + lsl r0, r0, #1 + str r0, [sp, #0x14] +_0223F8AA: + ldr r1, _0223F964 ; =0x02256EB0 + ldr r0, [sp, #0xc] + sub r2, r4, r6 + add r0, r1, r0 + ldr r1, [sp, #0x14] + lsl r2, r2, #1 + bl ov23_0223F804 + cmp r0, #0 + beq _0223F8D6 + ldr r0, _0223F968 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, [sp, #0x10] + add r0, r0, r1 + add r1, r5, r0 + ldr r0, _0223F96C ; =0x000008DC + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0223F8D6 + add sp, #0x2c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223F8D6: + add r4, r4, #1 + add r5, #0xd + cmp r4, r7 + blt _0223F8AA +_0223F8DE: + ldr r0, [sp, #0x10] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [sp, #0x10] + cmp r1, r0 + blt _0223F898 +_0223F8EA: + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r6, #0 + bl ov23_0223F78C + ldr r1, [sp, #4] + str r1, [sp, #8] + add r2, r1, #0 + ldr r1, [sp, #0x1c] + cmp r2, r1 + bge _0223F956 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x28] + mov r0, #0xd + mul r0, r6 + str r0, [sp, #0x24] +_0223F90C: + add r5, r6, #0 + cmp r6, r7 + bge _0223F94A + ldr r1, [sp, #8] + ldr r0, [sp, #4] + ldr r4, [sp, #0x24] + sub r0, r1, r0 + lsl r0, r0, #1 + str r0, [sp, #0x18] +_0223F91E: + ldr r1, _0223F964 ; =0x02256EB0 + ldr r0, [sp, #0xc] + sub r2, r5, r6 + add r0, r1, r0 + ldr r1, [sp, #0x18] + lsl r2, r2, #1 + bl ov23_0223F804 + cmp r0, #0 + beq _0223F942 + ldr r0, _0223F968 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, [sp, #8] + add r0, r0, r1 + add r2, r4, r0 + ldr r1, [sp, #0x28] + ldr r0, _0223F96C ; =0x000008DC + strb r1, [r2, r0] +_0223F942: + add r5, r5, #1 + add r4, #0xd + cmp r5, r7 + blt _0223F91E +_0223F94A: + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [sp, #8] + cmp r1, r0 + blt _0223F90C +_0223F956: + mov r0, #1 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F95C: .word 0x02256EBC +_0223F960: .word 0x02256EBD +_0223F964: .word 0x02256EB0 +_0223F968: .word 0x02257740 +_0223F96C: .word 0x000008DC + thumb_func_end ov23_0223F838 + + thumb_func_start ov23_0223F970 +ov23_0223F970: ; 0x0223F970 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _0223F9C4 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + add r6, r0, #0 + bl sub_020298B0 + add r0, r6, #0 + bl sub_02025E38 + bl sub_02025F20 + add r4, r0, #0 + mov r1, #1 + add r0, r6, #0 + and r4, r1 + bl sub_02027560 + bl sub_02027474 + mov r1, #0 + cmp r0, #0 + beq _0223F9B4 + cmp r4, #0 + beq _0223F9AE + ldrh r0, [r5, #8] + add r0, r1, r0 + pop {r4, r5, r6, pc} +_0223F9AE: + ldrh r0, [r5, #0xa] + add r0, r1, r0 + pop {r4, r5, r6, pc} +_0223F9B4: + cmp r4, #0 + beq _0223F9BE + ldrh r0, [r5, #4] + add r0, r1, r0 + pop {r4, r5, r6, pc} +_0223F9BE: + ldrh r0, [r5, #6] + add r0, r1, r0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223F9C4: .word 0x02257740 + thumb_func_end ov23_0223F970 + + thumb_func_start ov23_0223F9C8 +ov23_0223F9C8: ; 0x0223F9C8 + push {r4, r5, r6, lr} + mov r4, #0 + ldr r5, _0223F9EC ; =0x02256EB0 + add r6, r4, #0 +_0223F9D0: + ldrb r0, [r5, #0xe] + cmp r0, #0x3c + beq _0223F9E6 + add r0, r5, #0 + bl ov23_0223F970 + add r6, r6, #1 + add r4, r4, r0 + add r5, #0x14 + cmp r6, #0x55 + blo _0223F9D0 +_0223F9E6: + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_0223F9EC: .word 0x02256EB0 + thumb_func_end ov23_0223F9C8 + + thumb_func_start ov23_0223F9F0 +ov23_0223F9F0: ; 0x0223F9F0 + push {r4, r5, r6, lr} + ldr r5, _0223FA1C ; =0x02256EB0 + add r6, r0, #0 + mov r4, #0 +_0223F9F8: + ldrb r0, [r5, #0xe] + cmp r0, #0x3c + beq _0223FA14 + add r0, r5, #0 + bl ov23_0223F970 + sub r6, r6, r0 + bpl _0223FA0C + add r0, r4, #0 + pop {r4, r5, r6, pc} +_0223FA0C: + add r4, r4, #1 + add r5, #0x14 + cmp r4, #0x55 + blo _0223F9F8 +_0223FA14: + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223FA1C: .word 0x02256EB0 + thumb_func_end ov23_0223F9F0 + + thumb_func_start ov23_0223FA20 +ov23_0223FA20: ; 0x0223FA20 + mov r0, #0 + ldr r3, _0223FA38 ; =0x02256EB0 + add r2, r0, #0 +_0223FA26: + ldrb r1, [r3, #0xe] + cmp r1, #0x3c + blo _0223FA2E + add r0, r0, #1 +_0223FA2E: + add r2, r2, #1 + add r3, #0x14 + cmp r2, #0x55 + blo _0223FA26 + bx lr + ; .align 2, 0 +_0223FA38: .word 0x02256EB0 + thumb_func_end ov23_0223FA20 + + thumb_func_start ov23_0223FA3C +ov23_0223FA3C: ; 0x0223FA3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + str r0, [sp] + ldr r0, _0223FC94 ; =0x02257740 + str r1, [sp, #4] + ldr r0, [r0, #0] + str r2, [sp, #8] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298B0 + str r0, [sp, #0x38] + bl ov23_0223F9C8 + str r0, [sp, #0x1c] + bl ov23_0223FA20 + str r0, [sp, #0x28] + ldr r0, _0223FC94 ; =0x02257740 + ldr r4, [r0, #0] + add r5, r4, #0 + add r5, #8 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r4, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + ldr r2, [r5, #0x10] + ldr r3, [r5, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r4, #8] + str r3, [r5, #4] + add r0, r3, #0 + mov r1, #0 + mov r2, #3 + mov r3, #0 + bl sub_020E1F1C + ldr r0, [sp, #8] + add r1, r1, #2 + str r1, [r0, #0xc] + ldr r0, [sp, #0x38] + bl sub_0202920C + cmp r0, #0 + beq _0223FAA4 + ldr r0, [sp, #8] + mov r1, #3 + str r1, [r0, #0xc] +_0223FAA4: + ldr r0, [sp, #8] + mov r4, #0 + ldr r0, [r0, #0xc] + cmp r0, #0 + ble _0223FBAE + add r7, sp, #0x48 + str r4, [sp, #0x20] +_0223FAB2: + ldr r0, _0223FC94 ; =0x02257740 + ldr r6, [r0, #0] + add r5, r6, #0 + add r5, #8 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r6, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [r5, #0x10] + ldr r1, [r5, #0x14] + add r0, r0, r2 + str r0, [r6, #8] + adc r1, r3 + ldr r0, [sp, #0x1c] + str r1, [r5, #4] + cmp r0, #0 + bne _0223FAE0 + ldr r1, [r5, #4] + b _0223FAEC +_0223FAE0: + ldr r0, [r5, #4] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + mov r1, #0 + bl sub_020E1F1C +_0223FAEC: + add r0, r1, #0 + bl ov23_0223F9F0 + mov r1, #0x14 + str r0, [sp, #0x30] + mul r1, r0 + ldr r0, _0223FC98 ; =0x02256EB0 + add r0, r0, r1 + ldrb r5, [r0, #0xe] + ldr r0, [sp, #0x38] + add r1, r5, #0 + bl sub_02029274 + cmp r0, #0 + beq _0223FBA6 + cmp r5, #0x2c + blt _0223FB36 + cmp r5, #0x3b + bgt _0223FB36 + mov r3, #0 + add r2, r3, #0 + str r5, [r7, #0] + cmp r4, #0 + ble _0223FB30 + add r6, sp, #0x48 + mov r0, #1 +_0223FB20: + ldr r1, [r6, #0] + cmp r5, r1 + bne _0223FB28 + add r3, r0, #0 +_0223FB28: + add r2, r2, #1 + add r6, r6, #4 + cmp r2, r4 + blt _0223FB20 +_0223FB30: + cmp r3, #0 + bne _0223FBA6 + b _0223FB3A +_0223FB36: + mov r0, #0x1c + str r0, [r7, #0] +_0223FB3A: + ldr r0, _0223FC94 ; =0x02257740 + ldr r5, [r0, #0] + add r6, r5, #0 + add r6, #8 + ldr r0, [r6, #8] + ldr r1, [r6, #0xc] + ldr r2, [r5, #8] + ldr r3, [r6, #4] + bl sub_020E1F1C + add r3, r0, #0 + ldr r0, [r6, #0x10] + ldr r2, [r6, #0x14] + add r0, r0, r3 + adc r2, r1 + str r0, [r5, #8] + str r2, [r6, #4] + add r0, r2, #0 + mov r1, #0 + mov r2, #0xd + mov r3, #0 + bl sub_020E1F1C + add r6, r5, #0 + add r6, #8 + str r1, [sp, #0x18] + ldr r0, [r6, #8] + ldr r1, [r6, #0xc] + ldr r2, [r5, #8] + ldr r3, [r6, #4] + bl sub_020E1F1C + add r3, r0, #0 + ldr r0, [r6, #0x10] + ldr r2, [r6, #0x14] + add r0, r0, r3 + adc r2, r1 + str r0, [r5, #8] + str r2, [r6, #4] + add r0, r2, #0 + mov r1, #0 + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + add r2, r1, #0 + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x18] + bl ov23_0223F838 + cmp r0, #0 + beq _0223FBA6 + add r7, r7, #4 + add r4, r4, #1 +_0223FBA6: + ldr r0, [sp, #8] + ldr r0, [r0, #0xc] + cmp r4, r0 + blt _0223FAB2 +_0223FBAE: + ldr r0, [sp, #0x38] + bl sub_0202920C + cmp r0, #0 + bne _0223FC82 + mov r0, #0 + str r0, [sp, #0x34] + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + mov r1, #0x55 + sub r0, r1, r0 + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] +_0223FBCE: + ldr r0, _0223FC94 ; =0x02257740 + ldr r6, [r0, #0] + add r5, r6, #0 + add r5, #8 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r6, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + ldr r2, [r5, #0x10] + ldr r3, [r5, #0x14] + add r0, r2, r0 + str r0, [r6, #8] + adc r3, r1 + ldr r0, [sp, #0x28] + str r3, [r5, #4] + cmp r0, #0 + ldr r0, [r5, #4] + bne _0223FBFA + str r0, [sp, #0x10] + b _0223FC06 +_0223FBFA: + ldr r1, [sp, #0x3c] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x2c] + bl sub_020E1F1C + str r1, [sp, #0x10] +_0223FC06: + ldr r0, _0223FC94 ; =0x02257740 + ldr r5, [r0, #0] + add r6, r5, #0 + add r6, #8 + ldr r0, [r6, #8] + ldr r1, [r6, #0xc] + ldr r2, [r5, #8] + ldr r3, [r6, #4] + bl sub_020E1F1C + ldr r2, [r6, #0x10] + ldr r3, [r6, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r5, #8] + ldr r1, [sp, #0x40] + str r3, [r6, #4] + add r0, r3, #0 + mov r2, #0xd + mov r3, #0 + bl sub_020E1F1C + add r6, r5, #0 + add r6, #8 + add r7, r1, #0 + ldr r0, [r6, #8] + ldr r1, [r6, #0xc] + ldr r2, [r5, #8] + ldr r3, [r6, #4] + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [r6, #0x10] + ldr r1, [r6, #0x14] + add r0, r0, r2 + adc r1, r3 + str r0, [r5, #8] + str r1, [r6, #4] + add r0, r1, #0 + ldr r1, [sp, #0x44] + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + add r2, r1, #0 + ldr r1, [sp, #0x10] + ldr r0, [sp, #0x24] + add r0, r1, r0 + add r1, r7, #0 + bl ov23_0223F838 + cmp r0, #0 + beq _0223FC74 + add r4, r4, #1 +_0223FC74: + cmp r4, #0xc + bgt _0223FC82 + ldr r0, [sp, #0x34] + add r0, r0, #1 + str r0, [sp, #0x34] + cmp r0, #0x64 + blt _0223FBCE +_0223FC82: + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov23_0223FF60 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FC94: .word 0x02257740 +_0223FC98: .word 0x02256EB0 + thumb_func_end ov23_0223FA3C + + thumb_func_start ov23_0223FC9C +ov23_0223FC9C: ; 0x0223FC9C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r4, r0, #0 + ldr r0, _0223FDDC ; =0x02257740 + str r1, [sp, #0x10] + ldr r1, [r0, #0] + mov r0, #0x81 + lsl r0, r0, #4 + add r5, r1, r0 + mov r0, #0xc + add r6, r4, #0 + mul r6, r0 + add r0, r5, r6 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x10] + mov r1, #1 + str r2, [sp, #0x14] + str r3, [sp, #0x18] + bl sub_02019FE4 + str r0, [sp, #0x38] + ldr r0, [sp, #0x3c] + ldr r1, [r5, r6] + ldrb r0, [r0, #5] + add r6, r4, #0 + lsl r7, r0, #1 + ldr r0, [sp, #0x3c] + ldrb r0, [r0, #6] + lsl r0, r0, #1 + str r0, [sp, #0x34] + ldrb r0, [r1, #0xc] + ldrb r1, [r1, #0xd] + add r0, r7, r0 + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + add r0, r0, r1 + str r0, [sp, #0x2c] + mov r0, #0x37 + mov r1, #0x1d + bl sub_02006C24 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + ldr r0, [r0, #0xc] + cmp r4, r0 + blt _0223FCFA + mov r6, #4 +_0223FCFA: + cmp r4, r0 + blt _0223FD1A + mov r0, #0x20 + str r0, [sp] + mov r0, #0x1d + str r0, [sp, #4] + ldr r1, [sp, #0x3c] + add r3, r6, #3 + ldr r1, [r1, #0] + ldr r0, [sp, #0x20] + ldrh r1, [r1, #0x12] + mov r2, #0 + lsl r3, r3, #5 + bl sub_02007130 + b _0223FD4E +_0223FD1A: + ldr r1, [sp, #0x3c] + ldr r5, [sp, #0x18] + ldr r1, [r1, #0] + lsl r4, r4, #2 + ldrh r1, [r1, #0x12] + add r5, #0x28 + ldr r0, [sp, #0x20] + add r2, r5, r4 + mov r3, #0x1d + bl sub_020071EC + ldr r1, [sp, #0x18] + add r1, r1, r4 + str r0, [r1, #0x18] + ldr r0, [r5, r4] + mov r1, #0x20 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [r5, r4] + add r1, r6, #3 + ldr r0, [r0, #0xc] + lsl r1, r1, #5 + mov r2, #0x20 + bl sub_020C00B4 +_0223FD4E: + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x3c] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x1d + str r0, [sp, #0xc] + ldr r1, [r1, #0] + ldr r0, [sp, #0x20] + ldrh r1, [r1, #0x10] + ldr r2, [sp, #0x10] + mov r3, #1 + bl sub_020070E8 + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + bl sub_02006CA8 + ldr r0, [sp, #0x34] + str r0, [sp, #0x28] + add r1, r0, #0 + ldr r0, [sp, #0x2c] + cmp r1, r0 + bge _0223FDD6 + add r0, r6, #3 + lsl r1, r0, #0xc + ldr r0, [sp, #0x14] + add r6, r0, r1 + lsl r0, r7, #1 + str r0, [sp, #0x40] +_0223FD8C: + ldr r0, [sp, #0x30] + add r4, r7, #0 + cmp r7, r0 + bge _0223FDCA + ldr r0, [sp, #0x28] + add r0, r0, #4 + lsl r1, r0, #6 + ldr r0, [sp, #0x38] + add r1, r0, r1 + ldr r0, [sp, #0x40] + add r5, r1, r0 + ldr r1, [sp, #0x28] + ldr r0, [sp, #0x34] + sub r0, r1, r0 + str r0, [sp, #0x1c] +_0223FDAA: + ldr r0, [sp, #0x3c] + ldr r2, [sp, #0x1c] + ldr r0, [r0, #0] + sub r1, r4, r7 + add r6, r6, #1 + bl ov23_0223F804 + cmp r0, #0 + beq _0223FDC0 + sub r0, r6, #1 + strh r0, [r5] +_0223FDC0: + ldr r0, [sp, #0x30] + add r4, r4, #1 + add r5, r5, #2 + cmp r4, r0 + blt _0223FDAA +_0223FDCA: + ldr r0, [sp, #0x28] + add r1, r0, #1 + ldr r0, [sp, #0x2c] + str r1, [sp, #0x28] + cmp r1, r0 + blt _0223FD8C +_0223FDD6: + ldr r0, [sp, #0x24] + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FDDC: .word 0x02257740 + thumb_func_end ov23_0223FC9C + + thumb_func_start ov23_0223FDE0 +ov23_0223FDE0: ; 0x0223FDE0 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [sp] + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + str r0, [sp, #0x10] +_0223FDF2: + ldr r0, [sp, #0x14] + ldr r0, [r0, #0x38] + cmp r0, #1 + bne _0223FEE6 + ldr r0, _0223FF4C ; =0x000006A7 + bl sub_02005748 + mov r0, #0 + mov r4, #0 + str r4, [sp, #0x18] + str r0, [sp, #0x20] + str r0, [sp, #0x24] +_0223FE0A: + ldr r0, _0223FF50 ; =0x02257740 + ldr r6, [r0, #0] + ldr r0, [sp, #0x10] + add r5, r6, #0 + add r1, r0, r6 + mov r0, #0x81 + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r5, #8 + ldrb r0, [r0, #0xc] + str r1, [sp, #0xc] + ldr r1, [r5, #0xc] + lsl r7, r0, #3 + ldr r0, [r5, #8] + ldr r2, [r6, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + add r3, r0, #0 + add r2, r1, #0 + ldr r0, [r5, #0x10] + ldr r1, [r5, #0x14] + add r0, r0, r3 + adc r1, r2 + str r0, [r6, #8] + str r1, [r5, #4] + cmp r7, #0 + ldr r0, [r5, #4] + bne _0223FE48 + str r0, [sp, #8] + b _0223FE54 +_0223FE48: + ldr r1, [sp, #0x20] + add r2, r7, #0 + mov r3, #0 + bl sub_020E1F1C + str r1, [sp, #8] +_0223FE54: + mov r0, #0x81 + ldr r1, [sp, #0xc] + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r5, r6, #0 + ldrb r0, [r0, #0xd] + add r5, #8 + ldr r1, [r5, #0xc] + lsl r7, r0, #3 + ldr r0, [r5, #8] + ldr r2, [r6, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + add r3, r0, #0 + add r2, r1, #0 + ldr r0, [r5, #0x10] + ldr r1, [r5, #0x14] + add r0, r0, r3 + adc r1, r2 + str r0, [r6, #8] + str r1, [r5, #4] + cmp r7, #0 + bne _0223FE88 + ldr r1, [r5, #4] + b _0223FE94 +_0223FE88: + ldr r0, [r5, #4] + ldr r1, [sp, #0x24] + add r2, r7, #0 + mov r3, #0 + bl sub_020E1F1C +_0223FE94: + ldr r0, _0223FF50 ; =0x02257740 + ldr r3, [sp, #0xc] + ldr r2, [r0, #0] + ldr r0, _0223FF54 ; =0x00000815 + ldr r5, [sp, #0xc] + ldrb r0, [r3, r0] + lsl r3, r0, #4 + ldr r0, [sp, #8] + add r0, r0, r3 + ldr r3, _0223FF58 ; =0x00000816 + lsl r0, r0, #0xc + ldrb r3, [r5, r3] + lsl r3, r3, #4 + str r0, [sp, #0x28] + add r0, r1, r3 + add r0, #0x20 + lsl r0, r0, #0xc + str r0, [sp, #0x2c] + mov r0, #0x7f + add r1, r2, r4 + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, [sp, #0x18] + add r1, #8 + bl sub_02021D6C + ldr r0, _0223FF50 ; =0x02257740 + ldr r0, [r0, #0] + add r1, r0, r4 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x28 + bl sub_02021C50 + ldr r0, [sp, #0x18] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #3 + blt _0223FE0A +_0223FEE6: + ldr r0, [sp, #0x14] + add r0, r0, #4 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + add r0, #0xc + str r0, [sp, #0x10] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #4 + bge _0223FEFE + b _0223FDF2 +_0223FEFE: + mov r5, #0 + ldr r4, _0223FF5C ; =0x02257570 + mov r7, #0x20 + add r6, r5, #0 +_0223FF06: + ldr r0, [sp] + ldr r0, [r0, #0x38] + cmp r0, #0 + beq _0223FF3C + ldr r1, [sp] + ldr r1, [r1, #0x28] + ldr r3, [r1, #0xc] + add r1, r4, r0 + sub r1, r1, #1 + ldrb r2, [r1] + cmp r2, #0xff + bne _0223FF24 + ldr r0, [sp] + str r6, [r0, #0x38] + b _0223FF3C +_0223FF24: + add r1, r0, #1 + ldr r0, [sp] + cmp r2, #0xfe + str r1, [r0, #0x38] + beq _0223FF3C + lsl r0, r2, #1 + add r1, r5, #3 + add r0, r3, r0 + lsl r1, r1, #5 + add r2, r7, #0 + bl sub_020C00B4 +_0223FF3C: + ldr r0, [sp] + add r5, r5, #1 + add r0, r0, #4 + str r0, [sp] + cmp r5, #4 + blt _0223FF06 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FF4C: .word 0x000006A7 +_0223FF50: .word 0x02257740 +_0223FF54: .word 0x00000815 +_0223FF58: .word 0x00000816 +_0223FF5C: .word 0x02257570 + thumb_func_end ov23_0223FDE0 + + thumb_func_start ov23_0223FF60 +ov23_0223FF60: ; 0x0223FF60 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r4, #0 + str r3, [sp] + ldr r5, _0223FF88 ; =0x00000269 + cmp r6, #0 + ble _0223FF86 +_0223FF70: + ldr r3, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov23_0223FC9C + lsr r0, r0, #5 + add r4, r4, #1 + add r5, r5, r0 + cmp r4, r6 + blt _0223FF70 +_0223FF86: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FF88: .word 0x00000269 + thumb_func_end ov23_0223FF60 + + thumb_func_start ov23_0223FF8C +ov23_0223FF8C: ; 0x0223FF8C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + mov r0, #0 + str r0, [sp, #0xc] +_0223FF94: + ldr r0, _022401A0 ; =0x02257740 + ldr r4, [r0, #0] + add r5, r4, #0 + add r5, #8 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r4, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + ldr r2, [r5, #0x10] + ldr r3, [r5, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r4, #8] + str r3, [r5, #4] + add r0, r3, #0 + mov r1, #0 + mov r2, #0x15 + mov r3, #0 + bl sub_020E1F1C + add r5, r4, #0 + add r5, #8 + str r1, [sp, #0x20] + sub r1, #8 + str r1, [sp, #0x20] + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r4, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + ldr r2, [r5, #0x10] + ldr r3, [r5, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r4, #8] + str r3, [r5, #4] + add r0, r3, #0 + mov r1, #0 + mov r2, #0x12 + mov r3, #0 + bl sub_020E1F1C + sub r5, r1, #5 + add r0, r5, #0 + str r0, [sp, #0x14] + add r0, #8 + add r1, r5, #0 + str r5, [sp, #0x10] + str r0, [sp, #0x14] + cmp r1, r0 + bge _02240054 + add r0, r5, #0 + ldr r3, [sp, #0x20] + mov r1, #0xd + add r6, r0, #0 + mul r6, r1 + add r3, #8 +_0224000C: + cmp r5, #0xa + bge _0224004A + cmp r5, #0 + blt _0224004A + ldr r4, [sp, #0x20] + add r0, r4, #0 + cmp r0, r3 + bge _0224004A + ldr r0, [sp, #0x10] + sub r0, r5, r0 + lsl r1, r0, #3 + ldr r0, _022401A4 ; =0x02256E70 + add r7, r0, r1 +_02240026: + cmp r4, #0xd + bge _02240044 + cmp r4, #0 + blt _02240044 + ldr r0, [sp, #0x20] + sub r0, r4, r0 + ldrb r2, [r7, r0] + cmp r2, #0 + beq _02240044 + ldr r0, _022401A0 ; =0x02257740 + ldr r0, [r0, #0] + add r0, r6, r0 + add r1, r4, r0 + ldr r0, _022401A8 ; =0x0000095E + strb r2, [r1, r0] +_02240044: + add r4, r4, #1 + cmp r4, r3 + blt _02240026 +_0224004A: + ldr r0, [sp, #0x14] + add r5, r5, #1 + add r6, #0xd + cmp r5, r0 + blt _0224000C +_02240054: + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #0xa + blt _0223FF94 + mov r0, #0 + str r0, [sp, #4] +_02240062: + ldr r0, _022401A0 ; =0x02257740 + ldr r5, [r0, #0] + add r4, r5, #0 + add r4, #8 + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + ldr r2, [r5, #8] + ldr r3, [r4, #4] + bl sub_020E1F1C + ldr r2, [r4, #0x10] + ldr r3, [r4, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r5, #8] + str r3, [r4, #4] + add r0, r3, #0 + mov r1, #0 + mov r2, #0x12 + mov r3, #0 + bl sub_020E1F1C + add r6, r5, #0 + add r6, #8 + sub r4, r1, #5 + ldr r0, [r6, #8] + ldr r1, [r6, #0xc] + ldr r2, [r5, #8] + ldr r3, [r6, #4] + bl sub_020E1F1C + ldr r2, [r6, #0x10] + ldr r3, [r6, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r5, #8] + str r3, [r6, #4] + add r0, r3, #0 + mov r1, #0 + mov r2, #0xf + mov r3, #0 + bl sub_020E1F1C + sub r0, r1, #5 + str r0, [sp] + ldr r3, [sp] + mov r0, #1 + str r0, [sp, #8] + add r0, r3, #0 + add r0, r0, #5 + add r1, r3, #0 + str r0, [sp, #0x18] + cmp r1, r0 + bge _02240126 + mov r1, #0xd + add r0, r3, #0 + mul r1, r0 + ldr r7, _022401A8 ; =0x0000095E + add r1, r5, r1 + add r0, r4, #5 +_022400DA: + cmp r3, #0xa + bge _0224011C + cmp r3, #0 + blt _0224011C + add r5, r4, #0 + cmp r4, r0 + bge _02240116 + ldr r2, [sp] + sub r2, r3, r2 + lsl r6, r2, #3 + ldr r2, _022401A4 ; =0x02256E70 + add r2, r2, r6 +_022400F2: + cmp r5, #0xd + bge _02240110 + cmp r5, #0 + blt _02240110 + sub r6, r5, r4 + ldrb r6, [r2, r6] + cmp r6, #0 + beq _02240110 + add r6, r1, r5 + ldrb r6, [r6, r7] + cmp r6, #4 + bhs _02240110 + mov r2, #0 + str r2, [sp, #8] + b _02240116 +_02240110: + add r5, r5, #1 + cmp r5, r0 + blt _022400F2 +_02240116: + ldr r2, [sp, #8] + cmp r2, #0 + beq _02240126 +_0224011C: + ldr r2, [sp, #0x18] + add r3, r3, #1 + add r1, #0xd + cmp r3, r2 + blt _022400DA +_02240126: + ldr r0, [sp, #8] + cmp r0, #0 + beq _02240190 + ldr r0, [sp] + ldr r1, [sp] + str r0, [sp, #0x1c] + add r0, r0, #5 + mov ip, r0 + cmp r1, r0 + bge _02240190 + ldr r0, [sp] + mov r1, #0xd + add r3, r0, #0 + mul r3, r1 + add r6, r4, #5 +_02240144: + ldr r0, [sp, #0x1c] + cmp r0, #0xa + bge _02240182 + cmp r0, #0 + blt _02240182 + add r5, r4, #0 + cmp r4, r6 + bge _02240182 + ldr r1, [sp] + sub r1, r0, r1 + lsl r0, r1, #2 + add r1, r1, r0 + ldr r0, _022401AC ; =0x02256E3A + add r7, r0, r1 +_02240160: + cmp r5, #0xd + bge _0224017C + cmp r5, #0 + blt _0224017C + sub r0, r5, r4 + ldrb r2, [r7, r0] + cmp r2, #0 + beq _0224017C + ldr r0, _022401A0 ; =0x02257740 + ldr r0, [r0, #0] + add r0, r3, r0 + add r1, r5, r0 + ldr r0, _022401A8 ; =0x0000095E + strb r2, [r1, r0] +_0224017C: + add r5, r5, #1 + cmp r5, r6 + blt _02240160 +_02240182: + ldr r0, [sp, #0x1c] + mov r1, ip + add r0, r0, #1 + add r3, #0xd + str r0, [sp, #0x1c] + cmp r0, r1 + blt _02240144 +_02240190: + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #0xf + bge _0224019C + b _02240062 +_0224019C: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022401A0: .word 0x02257740 +_022401A4: .word 0x02256E70 +_022401A8: .word 0x0000095E +_022401AC: .word 0x02256E3A + thumb_func_end ov23_0223FF8C + + thumb_func_start ov23_022401B0 +ov23_022401B0: ; 0x022401B0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r1, #2 + str r0, [sp] + bl sub_02019FE4 + str r0, [sp, #8] + mov r2, #0 + mov r0, #4 + mov ip, r2 + str r0, [sp, #4] +_022401C6: + ldr r0, [sp, #4] + mov r6, #0 + lsl r3, r0, #5 +_022401CC: + ldr r0, _02240234 ; =0x02257740 + lsl r7, r3, #1 + ldr r0, [r0, #0] + ldr r4, _02240238 ; =0x00002001 + add r0, r2, r0 + add r1, r6, r0 + ldr r0, _0224023C ; =0x0000095E + add r6, r6, #1 + ldrb r0, [r1, r0] + add r3, r3, #2 + lsl r1, r0, #2 + ldr r0, _02240240 ; =0x02256E54 + ldr r1, [r0, r1] + ldr r0, [sp, #8] + ldrb r5, [r1] + add r0, r0, r7 + add r5, r5, r4 + ldr r4, [sp, #8] + strh r5, [r4, r7] + ldrb r5, [r1, #1] + ldr r4, _02240238 ; =0x00002001 + add r4, r5, r4 + strh r4, [r0, #2] + ldrb r5, [r1, #2] + ldr r4, _02240238 ; =0x00002001 + add r5, r5, r4 + add r4, r0, #0 + add r4, #0x40 + strh r5, [r4] + ldrb r4, [r1, #3] + ldr r1, _02240238 ; =0x00002001 + add r0, #0x42 + add r1, r4, r1 + strh r1, [r0] + cmp r6, #0xd + blt _022401CC + ldr r0, [sp, #4] + add r2, #0xd + add r0, r0, #2 + str r0, [sp, #4] + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #0xa + blt _022401C6 + ldr r0, [sp] + mov r1, #2 + bl sub_02019448 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02240234: .word 0x02257740 +_02240238: .word 0x00002001 +_0224023C: .word 0x0000095E +_02240240: .word 0x02256E54 + thumb_func_end ov23_022401B0 + + thumb_func_start ov23_02240244 +ov23_02240244: ; 0x02240244 + ldr r2, _02240278 ; =0x02257740 + mov r3, #0xd + ldr r2, [r2, #0] + mul r3, r1 + add r1, r2, r3 + add r0, r1, r0 + ldr r1, _0224027C ; =0x000008DC + ldrb r0, [r0, r1] + cmp r0, #0 + bne _0224025C + mov r0, #0 + bx lr +_0224025C: + sub r3, r0, #1 + mov r0, #0xc + mul r0, r3 + add r0, r2, r0 + sub r1, #0xc8 + ldrb r0, [r0, r1] + cmp r0, #0 + beq _02240274 + cmp r0, #0x3c + bge _02240274 + mov r0, #1 + bx lr +_02240274: + mov r0, #0 + bx lr + ; .align 2, 0 +_02240278: .word 0x02257740 +_0224027C: .word 0x000008DC + thumb_func_end ov23_02240244 + + thumb_func_start ov23_02240280 +ov23_02240280: ; 0x02240280 + ldr r2, _022402B0 ; =0x02257740 + mov r3, #0xd + ldr r2, [r2, #0] + mul r3, r1 + add r1, r2, r3 + add r0, r1, r0 + ldr r1, _022402B4 ; =0x000008DC + ldrb r0, [r0, r1] + cmp r0, #0 + bne _02240298 + mov r0, #0 + bx lr +_02240298: + sub r3, r0, #1 + mov r0, #0xc + mul r0, r3 + add r0, r2, r0 + sub r1, #0xc8 + ldrb r0, [r0, r1] + cmp r0, #0x3c + blo _022402AC + mov r0, #1 + bx lr +_022402AC: + mov r0, #0 + bx lr + ; .align 2, 0 +_022402B0: .word 0x02257740 +_022402B4: .word 0x000008DC + thumb_func_end ov23_02240280 + + thumb_func_start ov23_022402B8 +ov23_022402B8: ; 0x022402B8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r2, [sp, #4] + asr r2, r0, #3 + lsr r2, r2, #0x1c + add r2, r0, r2 + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + mov r5, #0 + sub r0, r0, #2 + asr r7, r2, #4 + add r6, r5, #0 + str r3, [sp, #8] + str r0, [sp, #0xc] + cmp r7, #0 + blt _022402E8 + cmp r7, #0xd + bge _022402E8 + cmp r0, #0 + blt _022402E8 + cmp r0, #0xa + blt _022402EA +_022402E8: + b _02240436 +_022402EA: + add r4, r0, #0 + mov r1, #0xd + ldr r0, _0224043C ; =0x02257740 + mul r4, r1 + ldr r1, [r0, #0] + ldr r0, _02240440 ; =0x0000095E + add r0, r1, r0 + add r1, r0, r4 + ldrb r0, [r1, r7] + cmp r0, #0 + beq _02240304 + sub r0, r0, #1 + strb r0, [r1, r7] +_02240304: + ldr r0, _0224043C ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02240440 ; =0x0000095E + add r0, r1, r0 + add r1, r0, r4 + ldrb r0, [r1, r7] + cmp r0, #0 + beq _02240318 + sub r0, r0, #1 + strb r0, [r1, r7] +_02240318: + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov23_02240280 + cmp r0, #0 + beq _02240336 + ldr r0, _0224043C ; =0x02257740 + ldr r0, [r0, #0] + add r0, r0, r4 + add r1, r0, r7 + ldr r0, _02240440 ; =0x0000095E + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02240336 + mov r5, #1 +_02240336: + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov23_02240244 + cmp r0, #0 + beq _0224035A + ldr r0, _0224043C ; =0x02257740 + ldr r0, [r0, #0] + add r0, r0, r4 + add r1, r0, r7 + ldr r0, _02240440 ; =0x0000095E + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224035A + ldr r0, [sp, #8] + mov r1, #0xf + mov r6, #1 + str r1, [r0, #0x14] +_0224035A: + ldr r1, [sp, #0xc] + ldr r2, [sp, #4] + add r1, r1, #2 + lsl r0, r7, #4 + lsl r1, r1, #4 + add r3, r5, #0 + str r6, [sp] + bl ov23_0223ED68 + cmp r5, #0 + bne _02240436 + ldr r0, [sp, #4] + cmp r0, #0 + bne _022403C2 + ldr r4, _02240444 ; =0x02257554 + ldr r5, _02240448 ; =0x02256BE0 + mov r3, #0 +_0224037C: + mov r0, #0 + ldrsb r1, [r4, r0] + ldr r0, [sp, #0xc] + add r2, r0, r1 + mov r0, #0 + ldrsb r0, [r5, r0] + add r1, r7, r0 + cmp r2, #0 + blt _022403B8 + cmp r2, #0xa + bge _022403B8 + cmp r1, #0 + blt _022403B8 + cmp r1, #0xd + bge _022403B8 + ldr r0, _0224043C ; =0x02257740 + mov r6, #0xd + ldr r0, [r0, #0] + mul r6, r2 + add r0, r0, r6 + add r0, r0, r1 + ldr r1, _02240440 ; =0x0000095E + ldrb r1, [r0, r1] + cmp r1, #0 + beq _022403B8 + ldr r1, _02240440 ; =0x0000095E + ldrb r1, [r0, r1] + sub r2, r1, #1 + ldr r1, _02240440 ; =0x0000095E + strb r2, [r0, r1] +_022403B8: + add r3, r3, #1 + add r4, r4, #1 + add r5, r5, #1 + cmp r3, #4 + blt _0224037C +_022403C2: + mov r0, #0 + ldr r2, _0224044C ; =0x0225756C + ldr r3, _02240450 ; =0x02257558 + mov ip, r0 +_022403CA: + mov r0, #0 + ldrsb r1, [r2, r0] + ldr r0, [sp, #0xc] + add r0, r0, r1 + mov r1, #0 + ldrsb r1, [r3, r1] + add r5, r7, r1 + cmp r0, #0 + blt _02240428 + cmp r0, #0xa + bge _02240428 + cmp r5, #0 + blt _02240428 + cmp r5, #0xd + bge _02240428 + add r4, r0, #0 + ldr r0, _0224043C ; =0x02257740 + mov r1, #0xd + ldr r0, [r0, #0] + mul r4, r1 + add r0, r0, r4 + add r6, r0, r5 + ldr r0, _02240440 ; =0x0000095E + ldrb r0, [r6, r0] + cmp r0, #0 + beq _02240408 + ldr r0, _02240440 ; =0x0000095E + ldrb r0, [r6, r0] + sub r1, r0, #1 + ldr r0, _02240440 ; =0x0000095E + strb r1, [r6, r0] +_02240408: + ldr r0, [sp, #4] + cmp r0, #0 + bne _02240428 + ldr r0, _0224043C ; =0x02257740 + ldr r1, _02240440 ; =0x0000095E + ldr r0, [r0, #0] + add r0, r0, r4 + add r0, r0, r5 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _02240428 + ldr r1, _02240440 ; =0x0000095E + ldrb r1, [r0, r1] + sub r4, r1, #1 + ldr r1, _02240440 ; =0x0000095E + strb r4, [r0, r1] +_02240428: + mov r0, ip + add r0, r0, #1 + add r2, r2, #1 + add r3, r3, #1 + mov ip, r0 + cmp r0, #4 + blt _022403CA +_02240436: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224043C: .word 0x02257740 +_02240440: .word 0x0000095E +_02240444: .word 0x02257554 +_02240448: .word 0x02256BE0 +_0224044C: .word 0x0225756C +_02240450: .word 0x02257558 + thumb_func_end ov23_022402B8 + + thumb_func_start ov23_02240454 +ov23_02240454: ; 0x02240454 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + ldrb r1, [r6, #1] + str r2, [sp] + ldrb r2, [r6, #3] + mov ip, r1 + mov r1, #0 + mov lr, r1 + mov r1, ip + str r3, [sp, #4] + cmp r1, r2 + bge _022404C2 + mov r1, ip + cmp r1, r2 + bge _022404C2 + mov r1, lr + str r1, [sp, #8] + mov r1, ip + mov r7, #0x3f + lsl r5, r1, #5 + lsl r7, r7, #0xa +_02240480: + ldr r2, [sp] + ldr r1, [sp, #8] + add r3, r2, r1 + ldrb r2, [r6] + ldrb r1, [r6, #2] + cmp r2, r1 + bge _022404A4 +_0224048E: + add r1, r2, r5 + lsl r1, r1, #1 + ldrh r4, [r0, r1] + add r2, r2, #1 + and r4, r7 + add r4, r3, r4 + strh r4, [r0, r1] + ldrb r1, [r6, #2] + add r3, r3, #1 + cmp r2, r1 + blt _0224048E +_022404A4: + mov r1, ip + add r1, r1, #1 + mov ip, r1 + ldr r2, [sp, #8] + ldr r1, [sp, #4] + add r5, #0x20 + add r1, r2, r1 + str r1, [sp, #8] + mov r1, lr + add r1, r1, #1 + mov lr, r1 + ldrb r2, [r6, #3] + mov r1, ip + cmp r1, r2 + blt _02240480 +_022404C2: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02240454 + + thumb_func_start ov23_022404C8 +ov23_022404C8: ; 0x022404C8 + push {r4, lr} + ldr r3, _022404EC ; =0x02257740 + ldr r2, _022404F0 ; =0x000009E6 + ldr r4, [r3, #0] + mov r1, #1 + strb r1, [r4, r2] + ldr r3, [r3, #0] + sub r2, r2, #2 + strb r1, [r3, r2] + bl sub_02019FE4 + ldr r1, _022404F4 ; =0x02256BF4 + mov r2, #0x30 + mov r3, #0x36 + bl ov23_02240454 + pop {r4, pc} + nop +_022404EC: .word 0x02257740 +_022404F0: .word 0x000009E6 +_022404F4: .word 0x02256BF4 + thumb_func_end ov23_022404C8 + + thumb_func_start ov23_022404F8 +ov23_022404F8: ; 0x022404F8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r3, #0 + add r5, r0, #0 + cmp r4, #2 + blt _02240530 + bne _02240542 + cmp r1, #0xd6 + ble _02240530 + cmp r1, #0xfc + bge _02240530 + cmp r2, #0x2b + ble _02240528 + cmp r2, #0x6e + bge _02240528 + ldr r2, _0224064C ; =0x02257740 + ldr r1, _02240650 ; =0x000009E6 + ldr r3, [r2, #0] + mov r0, #0 + strb r0, [r3, r1] + ldr r2, [r2, #0] + sub r1, r1, #2 + strb r0, [r2, r1] + b _02240542 +_02240528: + cmp r2, #0x72 + ble _02240530 + cmp r2, #0xae + blt _02240532 +_02240530: + b _02240648 +_02240532: + ldr r2, _0224064C ; =0x02257740 + ldr r1, _02240650 ; =0x000009E6 + ldr r3, [r2, #0] + mov r0, #1 + strb r0, [r3, r1] + ldr r2, [r2, #0] + sub r1, r1, #2 + strb r0, [r2, r1] +_02240542: + add r0, r5, #0 + mov r1, #1 + bl sub_02019FE4 + ldr r1, _0224064C ; =0x02257740 + add r6, r0, #0 + ldr r2, [r1, #0] + ldr r1, _02240650 ; =0x000009E6 + ldrb r1, [r2, r1] + cmp r1, #0 + beq _0224055E + cmp r1, #1 + beq _022405D0 + b _02240640 +_0224055E: + cmp r4, #2 + bne _02240580 + ldr r1, _02240654 ; =0x02256BF8 + mov r2, #0x18 + mov r3, #0x36 + bl ov23_02240454 + ldr r1, _02240658 ; =0x02256BF4 + add r0, r6, #0 + mov r2, #0x24 + mov r3, #0x36 + bl ov23_02240454 + ldr r0, _0224065C ; =0x000005DC + bl sub_02005748 + b _0224058E +_02240580: + cmp r4, #3 + bne _0224058E + ldr r1, _02240654 ; =0x02256BF8 + mov r2, #0x1e + mov r3, #0x36 + bl ov23_02240454 +_0224058E: + cmp r4, #2 + bne _02240640 + ldr r0, _0224064C ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #6 + bl sub_02021D6C + ldr r0, _0224064C ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x3a + lsl r0, r0, #0xe + str r0, [sp] + mov r0, #5 + lsl r0, r0, #0x10 + str r0, [sp, #4] + ldr r0, _0224064C ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 + b _02240640 +_022405D0: + cmp r4, #2 + bne _022405F2 + ldr r1, _02240654 ; =0x02256BF8 + mov r2, #0x12 + mov r3, #0x36 + bl ov23_02240454 + ldr r1, _02240658 ; =0x02256BF4 + add r0, r6, #0 + mov r2, #0x2a + mov r3, #0x36 + bl ov23_02240454 + ldr r0, _0224065C ; =0x000005DC + bl sub_02005748 + b _02240600 +_022405F2: + cmp r4, #3 + bne _02240600 + ldr r1, _02240658 ; =0x02256BF4 + mov r2, #0x30 + mov r3, #0x36 + bl ov23_02240454 +_02240600: + cmp r4, #2 + bne _02240640 + ldr r0, _0224064C ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #7 + bl sub_02021D6C + ldr r0, _0224064C ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x3a + lsl r0, r0, #0xe + str r0, [sp] + mov r0, #0x26 + lsl r0, r0, #0xe + str r0, [sp, #4] + ldr r0, _0224064C ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 +_02240640: + add r0, r5, #0 + mov r1, #1 + bl sub_02019448 +_02240648: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224064C: .word 0x02257740 +_02240650: .word 0x000009E6 +_02240654: .word 0x02256BF8 +_02240658: .word 0x02256BF4 +_0224065C: .word 0x000005DC + thumb_func_end ov23_022404F8 + + thumb_func_start ov23_02240660 +ov23_02240660: ; 0x02240660 + ldr r1, _02240680 ; =0x02257740 + ldr r2, [r1, #0] + ldr r1, _02240684 ; =0x000009E7 + ldrb r2, [r2, r1] + asr r1, r2, #1 + lsr r1, r1, #0x1e + add r1, r2, r1 + asr r1, r1, #2 + lsl r1, r1, #2 + add r1, #0x10 + lsl r1, r1, #0xc + str r1, [r0, #0] + mov r1, #1 + lsl r1, r1, #0x10 + str r1, [r0, #4] + bx lr + ; .align 2, 0 +_02240680: .word 0x02257740 +_02240684: .word 0x000009E7 + thumb_func_end ov23_02240660 + + thumb_func_start ov23_02240688 +ov23_02240688: ; 0x02240688 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r1, _02240750 ; =0x02257740 + str r0, [sp] + ldr r2, [r1, #0] + ldr r1, _02240754 ; =0x000009E7 + ldrb r4, [r2, r1] + mov r1, #0 + bl sub_02019FE4 + add r5, r0, #0 + asr r0, r4, #1 + lsr r0, r0, #0x1e + add r0, r4, r0 + asr r0, r0, #2 + lsl r4, r0, #2 + add r0, sp, #4 + bl ov23_02240660 + add r0, r4, #0 + mov r1, #0x18 + bl sub_020E1F6C + ldr r0, _02240750 ; =0x02257740 + ldr r2, [r0, #0] + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r2, r0] + asr r2, r1, #1 + lsr r2, r2, #0x1e + add r2, r1, r2 + asr r2, r2, #2 + mov r1, #6 + sub r1, r1, r2 + bl sub_02021D6C + add r4, #8 + mov r0, #0xd0 + sub r1, r0, r4 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r7, r0, #3 + mov r4, #0 + cmp r7, #0 + ble _02240744 +_022406E4: + mov r0, #0x19 + sub r0, r0, r4 + lsl r6, r0, #1 + add r0, r4, #0 + mov r1, #3 + bl sub_020E1F6C + add r0, r1, #0 + mov r1, #0x3f + ldrh r2, [r5, r6] + lsl r1, r1, #0xa + and r1, r2 + add r1, #0xb + sub r1, r1, r0 + strh r1, [r5, r6] + mov r1, #0x39 + sub r1, r1, r4 + lsl r1, r1, #1 + mov r2, #0x3f + ldrh r3, [r5, r1] + lsl r2, r2, #0xa + and r2, r3 + add r2, #0x41 + sub r2, r2, r0 + strh r2, [r5, r1] + mov r1, #0x59 + sub r1, r1, r4 + lsl r1, r1, #1 + mov r2, #0x3f + ldrh r3, [r5, r1] + lsl r2, r2, #0xa + and r2, r3 + add r2, #0x77 + sub r2, r2, r0 + strh r2, [r5, r1] + mov r1, #0x79 + sub r1, r1, r4 + lsl r1, r1, #1 + mov r2, #0x3f + ldrh r3, [r5, r1] + lsl r2, r2, #0xa + add r4, r4, #1 + and r2, r3 + add r2, #0xad + sub r0, r2, r0 + strh r0, [r5, r1] + cmp r4, r7 + blt _022406E4 +_02240744: + ldr r0, [sp] + mov r1, #0 + bl sub_02019448 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240750: .word 0x02257740 +_02240754: .word 0x000009E7 + thumb_func_end ov23_02240688 + + thumb_func_start ov23_02240758 +ov23_02240758: ; 0x02240758 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r5, #0 + str r0, [sp] + str r5, [sp, #4] +_02240762: + ldr r0, _02240800 ; =0x02257740 + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _02240804 ; =0x000008CC + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _022407E6 + ldr r0, _02240808 ; =0x000008D4 + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _022407E6 + bl sub_0203608C + bl sub_02058CA0 + add r4, r0, #0 + bl sub_0203608C + bl sub_02058CF4 + add r6, r0, #0 + add r0, r5, #0 + bl ov23_0224AD04 + add r7, r0, #0 + add r0, r5, #0 + bl ov23_0224AD40 + add r1, r4, #0 + sub r1, #0xa + cmp r7, r1 + ble _022407E6 + add r4, #0xa + cmp r7, r4 + bge _022407E6 + add r1, r6, #0 + sub r1, #0xa + cmp r0, r1 + ble _022407E6 + add r6, #0xa + cmp r0, r6 + bge _022407E6 + ldr r0, _02240800 ; =0x02257740 + ldr r1, _02240808 ; =0x000008D4 + ldr r0, [r0, #0] + ldr r3, [sp] + add r2, r0, r5 + ldr r0, _02240804 ; =0x000008CC + ldrb r1, [r2, r1] + ldrb r0, [r2, r0] + mov r2, #1 + bl ov23_022402B8 + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02240800 ; =0x02257740 + mov r1, #0xff + ldr r0, [r0, #0] + add r2, r0, r5 + ldr r0, _02240804 ; =0x000008CC + strb r1, [r2, r0] + ldr r0, _02240800 ; =0x02257740 + ldr r0, [r0, #0] + add r2, r0, r5 + ldr r0, _02240808 ; =0x000008D4 + strb r1, [r2, r0] +_022407E6: + add r5, r5, #1 + cmp r5, #8 + blt _02240762 + ldr r0, [sp, #4] + cmp r0, #0 + beq _022407FC + ldr r0, _02240800 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_022401B0 +_022407FC: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240800: .word 0x02257740 +_02240804: .word 0x000008CC +_02240808: .word 0x000008D4 + thumb_func_end ov23_02240758 + + thumb_func_start ov23_0224080C +ov23_0224080C: ; 0x0224080C + push {r4, r5, r6, lr} + add r4, r0, #0 + mov r5, #0 + bl ov23_02241CF4 + cmp r0, #0 + beq _02240894 + cmp r4, #6 + beq _02240828 + cmp r4, #7 + beq _02240828 + sub r0, r4, #1 + cmp r0, #1 + bhi _0224084E +_02240828: + ldr r0, _02240898 ; =0x02257740 + ldr r6, [r0, #0] + add r5, r6, #0 + add r5, #8 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r6, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + ldr r2, [r5, #0x10] + ldr r3, [r5, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r6, #8] + mov r0, #0 + str r3, [r5, #4] + add r5, r0, #1 + b _02240878 +_0224084E: + ldr r0, _02240898 ; =0x02257740 + ldr r6, [r0, #0] + add r5, r6, #0 + add r5, #8 + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r6, #8] + ldr r3, [r5, #4] + bl sub_020E1F1C + ldr r3, [r5, #0x10] + ldr r2, [r5, #0x14] + add r0, r3, r0 + adc r2, r1 + str r0, [r6, #8] + mov r1, #0 + lsr r0, r2, #0x1e + lsl r1, r1, #2 + orr r1, r0 + str r2, [r5, #4] + add r5, r1, #1 +_02240878: + sub r0, r4, #6 + cmp r0, #4 + bhi _02240880 + add r5, #0xa +_02240880: + ldr r0, _0224089C ; =0x000009E7 + mov r1, #0x27 + ldrb r4, [r6, r0] + add r0, r4, #0 + bl sub_020E1F6C + add r5, r5, r0 + cmp r4, #0 + beq _02240894 + add r5, r5, #5 +_02240894: + add r0, r5, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02240898: .word 0x02257740 +_0224089C: .word 0x000009E7 + thumb_func_end ov23_0224080C + + thumb_func_start ov23_022408A0 +ov23_022408A0: ; 0x022408A0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _022408E8 ; =0x02257740 + add r4, r1, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298A0 + ldr r0, _022408E8 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298B0 + add r6, r0, #0 + add r0, r5, #0 + bl ov23_02241CF4 + cmp r0, #0 + beq _022408D8 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224F6E0 + pop {r4, r5, r6, pc} +_022408D8: + add r0, r5, #0 + bl ov23_0224F710 + add r0, r6, #0 + add r1, r5, #0 + bl sub_02029250 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022408E8: .word 0x02257740 + thumb_func_end ov23_022408A0 + + thumb_func_start ov23_022408EC +ov23_022408EC: ; 0x022408EC + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, _02240930 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298B0 + add r5, r0, #0 + add r0, r4, #0 + bl ov23_02241CF4 + cmp r0, #0 + beq _0224091C + add r0, r5, #0 + bl sub_02028C3C + cmp r0, #0x28 + beq _02240918 + mov r0, #1 + pop {r3, r4, r5, pc} +_02240918: + mov r0, #0 + pop {r3, r4, r5, pc} +_0224091C: + add r0, r5, #0 + bl sub_02028D58 + cmp r0, #0x28 + beq _0224092A + mov r0, #1 + pop {r3, r4, r5, pc} +_0224092A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02240930: .word 0x02257740 + thumb_func_end ov23_022408EC + + thumb_func_start ov23_02240934 +ov23_02240934: ; 0x02240934 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #1 + mov lr, r0 + ldr r0, [r4, #0xc] + mov r2, #0 + cmp r0, #0 + ble _02240954 + add r3, sp, #0 + mov r1, #1 +_0224094A: + stmia r3!, {r1} + ldr r0, [r4, #0xc] + add r2, r2, #1 + cmp r2, r0 + blt _0224094A +_02240954: + mov r0, #0 + mov ip, r0 + ldr r0, _022409E0 ; =0x02257740 + mov r6, #0 + ldr r3, [r0, #0] + add r7, sp, #0 +_02240960: + mov r2, #0 +_02240962: + ldr r0, _022409E4 ; =0x000008DC + add r1, r3, r2 + ldrb r0, [r1, r0] + ldr r5, [r4, #0xc] + cmp r0, r5 + bgt _02240982 + cmp r0, #0 + beq _02240982 + ldr r5, _022409E8 ; =0x0000095E + ldrb r1, [r1, r5] + cmp r1, #0 + beq _02240982 + lsl r0, r0, #2 + add r0, r7, r0 + sub r0, r0, #4 + str r6, [r0, #0] +_02240982: + add r2, r2, #1 + cmp r2, #0xd + blt _02240962 + mov r0, ip + add r0, r0, #1 + add r3, #0xd + mov ip, r0 + cmp r0, #0xa + blt _02240960 + ldr r0, [r4, #0xc] + mov r3, #0 + cmp r0, #0 + ble _022409D8 + add r0, sp, #0 + add r1, r3, #0 + add r2, r4, #0 + mov r7, #1 +_022409A4: + ldr r5, [r0, #0] + cmp r5, #0 + bne _022409B0 + mov r5, #0 + mov lr, r5 + b _022409CA +_022409B0: + ldr r5, _022409E0 ; =0x02257740 + ldr r5, [r5, #0] + add r6, r5, r1 + ldr r5, _022409EC ; =0x00000818 + ldrb r5, [r6, r5] + cmp r5, #0 + bne _022409CA + ldr r5, _022409E0 ; =0x02257740 + str r7, [r2, #0x38] + ldr r5, [r5, #0] + add r6, r5, r1 + ldr r5, _022409EC ; =0x00000818 + strb r7, [r6, r5] +_022409CA: + ldr r5, [r4, #0xc] + add r3, r3, #1 + add r0, r0, #4 + add r1, #0xc + add r2, r2, #4 + cmp r3, r5 + blt _022409A4 +_022409D8: + mov r0, lr + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022409E0: .word 0x02257740 +_022409E4: .word 0x000008DC +_022409E8: .word 0x0000095E +_022409EC: .word 0x00000818 + thumb_func_end ov23_02240934 + + thumb_func_start ov23_022409F0 +ov23_022409F0: ; 0x022409F0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r1, [r5, #0xc] + mov r0, #0 + cmp r1, #0 + ble _02240A80 + ldr r2, _02240A84 ; =0x02257740 + ldr r3, _02240A88 ; =0x00000818 + ldr r2, [r2, #0] + add r6, r2, #0 +_02240A04: + ldrb r4, [r6, r3] + cmp r4, #1 + bne _02240A78 + add r4, r0, #0 + mov r1, #0xc + mul r4, r1 + ldr r0, _02240A8C ; =0x00000814 + add r1, r2, r4 + ldrb r0, [r1, r0] + bl ov23_0224080C + str r0, [r5, #0x48] + bl ov23_0224219C + ldr r1, _02240A84 ; =0x02257740 + ldr r1, [r1, #0] + add r2, r1, r4 + ldr r1, _02240A8C ; =0x00000814 + ldrb r1, [r2, r1] + bl ov23_02254080 + ldr r0, _02240A84 ; =0x02257740 + ldr r0, [r0, #0] + add r1, r0, r4 + ldr r0, _02240A8C ; =0x00000814 + ldrb r0, [r1, r0] + bl ov23_02241CF4 + cmp r0, #0 + beq _02240A50 + mov r4, #0x45 + bl ov23_0224219C + ldr r2, [r5, #0x48] + mov r1, #1 + bl ov23_02254154 + b _02240A5C +_02240A50: + mov r4, #0x11 + bl ov23_0224219C + mov r1, #2 + bl ov23_02254204 +_02240A5C: + bl ov23_0224219C + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F40 + ldr r1, _02240A84 ; =0x02257740 + ldr r2, [r1, #0] + mov r1, #0x9e + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #1 + pop {r4, r5, r6, pc} +_02240A78: + add r0, r0, #1 + add r6, #0xc + cmp r0, r1 + blt _02240A04 +_02240A80: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02240A84: .word 0x02257740 +_02240A88: .word 0x00000818 +_02240A8C: .word 0x00000814 + thumb_func_end ov23_022409F0 + + thumb_func_start ov23_02240A90 +ov23_02240A90: ; 0x02240A90 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, _02240B7C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298A0 + add r7, r0, #0 + ldr r0, _02240B7C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + ldr r5, [r4, #0xc] + mov r2, #0 + cmp r5, #0 + ble _02240B76 + ldr r0, _02240B7C ; =0x02257740 + ldr r6, [r0, #0] + ldr r0, _02240B80 ; =0x00000818 + add r3, r6, #0 +_02240ABE: + ldrb r1, [r3, r0] + cmp r1, #1 + bne _02240B6E + mov r0, #0xc + mul r0, r2 + ldr r1, _02240B80 ; =0x00000818 + mov r3, #0 + add r2, r6, r0 + strb r3, [r2, r1] + ldr r2, _02240B7C ; =0x02257740 + ldr r2, [r2, #0] + add r2, r2, r0 + sub r0, r1, #4 + ldrb r5, [r2, r0] + add r0, r5, #0 + bl ov23_02241CF4 + cmp r0, #0 + beq _02240AEE + add r0, r7, #0 + mov r1, #1 + bl sub_020295F8 + b _02240B3E +_02240AEE: + ldr r0, _02240B7C ; =0x02257740 + add r1, r5, #0 + ldr r0, [r0, #0] + mov r2, #1 + ldr r0, [r0, #0] + bl sub_0206D6C8 + cmp r5, #0x17 + blt _02240B04 + cmp r5, #0x1d + blt _02240B0C +_02240B04: + add r0, r5, #0 + sub r0, #0x24 + cmp r0, #1 + bhi _02240B36 +_02240B0C: + add r0, r7, #0 + mov r1, #1 + bl sub_02029644 + ldr r0, _02240B7C ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020507E4 + add r6, r0, #0 + bl sub_0206B40C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + bl sub_0206B41C + b _02240B3E +_02240B36: + add r0, r7, #0 + mov r1, #1 + bl sub_02029688 +_02240B3E: + add r0, r5, #0 + bl ov23_022408EC + cmp r0, #0 + beq _02240B52 + ldr r1, [r4, #0x48] + add r0, r5, #0 + bl ov23_022408A0 + b _02240B76 +_02240B52: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x41 + add r3, r2, #0 + bl ov23_02253F40 + ldr r1, _02240B7C ; =0x02257740 + ldr r2, [r1, #0] + mov r1, #0x9e + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02240B6E: + add r2, r2, #1 + add r3, #0xc + cmp r2, r5 + blt _02240ABE +_02240B76: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240B7C: .word 0x02257740 +_02240B80: .word 0x00000818 + thumb_func_end ov23_02240A90 + + thumb_func_start ov23_02240B84 +ov23_02240B84: ; 0x02240B84 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r0, _02240C84 ; =0x02257740 + ldr r4, [r0, #0] + ldr r0, _02240C88 ; =0x000009E8 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _02240C80 + sub r0, r0, #1 + ldrb r1, [r4, r0] + mov r0, #0xc4 + sub r6, r0, r1 + add r0, r6, #0 + mov r1, #0x32 + bl sub_020E1F6C + add r7, r0, #0 + ldr r0, _02240C88 ; =0x000009E8 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldr r0, _02240C84 ; =0x02257740 + mov r1, #0xf + ldr r5, [r0, #0] + add r0, r6, #0 + bl sub_020E1F6C + ldr r1, _02240C88 ; =0x000009E8 + ldrb r2, [r5, r1] + cmp r2, r0 + ble _02240BD6 + mov r2, #0 + add r0, r1, #2 + strb r2, [r5, r0] + ldr r0, _02240C84 ; =0x02257740 + ldr r3, [r0, #0] + add r0, r1, #2 + ldrsb r2, [r3, r0] + add r0, r1, #1 + strb r2, [r3, r0] + b _02240C52 +_02240BD6: + add r4, r5, #0 + add r4, #8 + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + ldr r2, [r5, #8] + ldr r3, [r4, #4] + bl sub_020E1F1C + ldr r2, [r4, #0x10] + ldr r3, [r4, #0x14] + add r0, r2, r0 + adc r3, r1 + str r0, [r5, #8] + str r3, [r4, #4] + add r6, r7, #3 + bne _02240BFA + ldr r1, [r4, #4] + b _02240C06 +_02240BFA: + ldr r0, [r4, #4] + mov r1, #0 + mov r3, #0 + add r2, r6, #0 + bl sub_020E1F1C +_02240C06: + add r2, r7, #3 + lsr r0, r2, #0x1f + add r0, r2, r0 + asr r7, r0, #1 + ldr r0, _02240C8C ; =0x000009E9 + sub r1, r1, r7 + strb r1, [r5, r0] + ldr r0, _02240C84 ; =0x02257740 + ldr r5, [r0, #0] + add r4, r5, #0 + add r4, #8 + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + ldr r2, [r5, #8] + ldr r3, [r4, #4] + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [r4, #0x10] + ldr r1, [r4, #0x14] + add r0, r0, r2 + adc r1, r3 + str r0, [r5, #8] + str r1, [r4, #4] + cmp r6, #0 + bne _02240C40 + ldr r1, [r4, #4] + b _02240C4C +_02240C40: + ldr r0, [r4, #4] + mov r1, #0 + mov r3, #0 + add r2, r6, #0 + bl sub_020E1F1C +_02240C4C: + ldr r0, _02240C90 ; =0x000009EA + sub r1, r1, r7 + strb r1, [r5, r0] +_02240C52: + add r0, sp, #0 + bl ov23_02240660 + ldr r0, _02240C84 ; =0x02257740 + ldr r1, _02240C8C ; =0x000009E9 + ldr r0, [r0, #0] + ldr r3, [sp] + ldrsb r2, [r0, r1] + add r1, r1, #1 + lsl r2, r2, #0xc + sub r2, r3, r2 + str r2, [sp] + ldrsb r1, [r0, r1] + ldr r2, [sp, #4] + lsl r1, r1, #0xc + sub r1, r2, r1 + str r1, [sp, #4] + mov r1, #0x7b + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, sp, #0 + bl sub_02021C50 +_02240C80: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240C84: .word 0x02257740 +_02240C88: .word 0x000009E8 +_02240C8C: .word 0x000009E9 +_02240C90: .word 0x000009EA + thumb_func_end ov23_02240B84 + + thumb_func_start ov23_02240C94 +ov23_02240C94: ; 0x02240C94 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02240CEC ; =0x02257740 + ldr r4, [r0, #0] + ldr r0, _02240CF0 ; =0x000009E8 + ldrb r6, [r4, r0] + cmp r6, #0 + beq _02240CEA + sub r0, r0, #1 + ldrb r1, [r4, r0] + mov r0, #0xc4 + sub r0, r0, r1 + mov r1, #0xa + bl sub_020E1F6C + cmp r6, r0 + ble _02240CBC + ldr r0, _02240CF0 ; =0x000009E8 + mov r1, #0 + strb r1, [r4, r0] +_02240CBC: + ldr r7, _02240CEC ; =0x02257740 + mov r4, #0 +_02240CC0: + ldr r6, [r7, #0] + ldr r3, _02240CF4 ; =0x000009E9 + lsl r1, r4, #0x18 + ldrsb r3, [r6, r3] + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl sub_02019184 + lsl r1, r4, #0x18 + ldr r6, [r7, #0] + ldr r3, _02240CF8 ; =0x000009EA + add r0, r5, #0 + ldrsb r3, [r6, r3] + lsr r1, r1, #0x18 + mov r2, #3 + bl sub_02019184 + add r4, r4, #1 + cmp r4, #3 + blt _02240CC0 +_02240CEA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240CEC: .word 0x02257740 +_02240CF0: .word 0x000009E8 +_02240CF4: .word 0x000009E9 +_02240CF8: .word 0x000009EA + thumb_func_end ov23_02240C94 + + thumb_func_start ov23_02240CFC +ov23_02240CFC: ; 0x02240CFC + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _02240E44 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298B0 + add r6, r0, #0 + ldr r0, _02240E44 ; =0x02257740 + ldr r2, [r0, #0] + ldr r0, _02240E48 ; =0x000009E5 + ldrb r1, [r2, r0] + cmp r1, #1 + bne _02240D22 + mov r1, #0 + strb r1, [r2, r0] +_02240D22: + ldr r1, _02240E4C ; =0x021BF6BC + ldrh r0, [r1, #0x20] + cmp r0, #0 + beq _02240DA6 + ldrh r0, [r1, #0x1c] + cmp r0, #0xd0 + bhs _02240D98 + ldrh r1, [r1, #0x1e] + cmp r1, #0x20 + blo _02240D98 + add r2, sp, #0 + strb r0, [r2] + strb r1, [r2, #1] + ldr r2, _02240E44 ; =0x02257740 + ldr r3, [r2, #0] + ldr r2, _02240E50 ; =0x000009E4 + ldrb r2, [r3, r2] + add r3, r5, #0 + bl ov23_022402B8 + ldr r0, _02240E44 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02240E50 ; =0x000009E4 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02240D5A + mov r4, #4 + b _02240D5C +_02240D5A: + mov r4, #8 +_02240D5C: + mov r0, #0x44 + add r1, sp, #0 + bl sub_020360D0 + ldr r0, _02240E44 ; =0x02257740 + ldr r1, _02240E54 ; =0x000009E7 + ldr r0, [r0, #0] + ldrb r2, [r0, r1] + cmp r2, r4 + ble _02240D74 + sub r2, r2, r4 + b _02240D76 +_02240D74: + mov r2, #0 +_02240D76: + strb r2, [r0, r1] + ldr r0, _02240E44 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_022401B0 + ldr r0, _02240E44 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov23_02240688 + ldr r0, _02240E44 ; =0x02257740 + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _02240E58 ; =0x000009E8 + strb r2, [r1, r0] + b _02240DA6 +_02240D98: + cmp r0, #0xd0 + blo _02240DA6 + ldr r0, _02240E44 ; =0x02257740 + mov r2, #2 + ldr r1, [r0, #0] + ldr r0, _02240E48 ; =0x000009E5 + strb r2, [r1, r0] +_02240DA6: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _02240DB8 + sub r0, r0, #1 + str r0, [r5, #0x14] + bne _02240DB8 + ldr r0, _02240E5C ; =0x000006A5 + bl sub_02005748 +_02240DB8: + ldr r0, _02240E44 ; =0x02257740 + ldr r2, _02240E4C ; =0x021BF6BC + ldr r3, [r0, #0] + ldr r4, _02240E48 ; =0x000009E5 + ldr r0, [r3, #4] + ldrh r1, [r2, #0x1c] + ldrh r2, [r2, #0x1e] + ldrb r3, [r3, r4] + bl ov23_022404F8 + ldr r0, _02240E44 ; =0x02257740 + ldr r2, [r0, #0] + add r0, r4, #0 + ldrb r1, [r2, r0] + cmp r1, #2 + blo _02240DDC + add r1, r1, #1 + strb r1, [r2, r0] +_02240DDC: + add r0, r5, #0 + bl ov23_02240758 + add r0, r5, #0 + bl ov23_02240934 + cmp r0, #0 + beq _02240E16 + add r0, r6, #0 + bl sub_02029220 + ldr r0, _02240E44 ; =0x02257740 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x1e + bl sub_0202CFEC + mov r0, #0xe + str r0, [r5, #0] + mov r0, #0x19 + str r0, [r5, #8] + mov r0, #1 + add r5, #0x50 + add sp, #4 + strb r0, [r5] + pop {r3, r4, r5, r6, pc} +_02240E16: + ldr r0, _02240E44 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02240E54 ; =0x000009E7 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02240E3E + add r0, r6, #0 + bl sub_02029220 + add r0, r5, #0 + mov r1, #0 + add r0, #0x50 + strb r1, [r0] + mov r0, #0x2d + str r0, [r5, #8] + mov r0, #0x16 + str r0, [r5, #0] + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_02240E3E: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02240E44: .word 0x02257740 +_02240E48: .word 0x000009E5 +_02240E4C: .word 0x021BF6BC +_02240E50: .word 0x000009E4 +_02240E54: .word 0x000009E7 +_02240E58: .word 0x000009E8 +_02240E5C: .word 0x000006A5 + thumb_func_end ov23_02240CFC + + thumb_func_start ov23_02240E60 +ov23_02240E60: ; 0x02240E60 + push {r3, r4} + ldr r3, _02240E80 ; =0x02257740 + ldr r2, _02240E84 ; =0x000009EB + ldr r4, [r3, #0] + ldrb r1, [r4, r2] + lsl r1, r1, #2 + add r4, r4, r1 + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [r3, #0] + ldrb r0, [r1, r2] + add r0, r0, #1 + strb r0, [r1, r2] + pop {r3, r4} + bx lr + ; .align 2, 0 +_02240E80: .word 0x02257740 +_02240E84: .word 0x000009EB + thumb_func_end ov23_02240E60 + + thumb_func_start ov23_02240E88 +ov23_02240E88: ; 0x02240E88 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r0, _02241084 ; =0x02257740 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _02241088 ; =0x000009EB + strb r2, [r1, r0] + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7c + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x1f + str r3, [sp, #0xc] + mov r2, #0x1d + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + bl ov23_0224119C + ldr r1, _02241084 ; =0x02257740 + mov r0, #0x1a + ldr r1, [r1, #0] + mov r2, #0x1d + add r1, #0x24 + bl sub_020095C4 + ldr r1, _02241084 ; =0x02257740 + ldr r2, [r1, #0] + str r0, [r2, #0x20] + ldr r0, [r1, #0] + mov r2, #6 + add r0, #0x24 + mov r1, #0 + lsl r2, r2, #0x12 + bl sub_0200964C + mov r4, #0 + mov r7, #0x53 + ldr r6, _02241084 ; =0x02257740 + add r5, r4, #0 + lsl r7, r7, #2 +_02240EE2: + mov r0, #2 + add r1, r4, #0 + mov r2, #0x1d + bl sub_02009714 + ldr r1, [r6, #0] + add r4, r4, #1 + add r1, r1, r5 + add r5, r5, #4 + str r0, [r1, r7] + cmp r4, #4 + blt _02240EE2 + mov r0, #0x40 + mov r1, #0x1d + bl sub_02006C24 + mov r3, #0 + add r4, r0, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x1d + str r0, [sp, #8] + ldr r0, _02241084 ; =0x02257740 + mov r2, #6 + ldr r1, [r0, #0] + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009A4C + bl ov23_02240E60 + ldr r0, _02241084 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241088 ; =0x000009EB + ldrb r0, [r1, r0] + sub r0, r0, #1 + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A328 + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x1d + str r0, [sp, #0xc] + ldr r0, _02241084 ; =0x02257740 + mov r2, #7 + ldr r1, [r0, #0] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009B04 + bl ov23_02240E60 + ldr r0, _02241084 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241088 ; =0x000009EB + ldrb r0, [r1, r0] + sub r0, r0, #1 + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x1d + str r0, [sp, #8] + ldr r0, _02241084 ; =0x02257740 + mov r2, #5 + ldr r1, [r0, #0] + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009BC4 + bl ov23_02240E60 + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x1d + str r0, [sp, #8] + ldr r0, _02241084 ; =0x02257740 + mov r2, #4 + ldr r1, [r0, #0] + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009BC4 + bl ov23_02240E60 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x1d + str r0, [sp, #8] + ldr r0, _02241084 ; =0x02257740 + mov r2, #3 + ldr r1, [r0, #0] + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + mov r3, #0 + bl sub_02009A4C + bl ov23_02240E60 + ldr r0, _02241084 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241088 ; =0x000009EB + ldrb r0, [r1, r0] + sub r0, r0, #1 + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A328 + mov r2, #1 + str r2, [sp] + str r2, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x1d + str r0, [sp, #0xc] + ldr r0, _02241084 ; =0x02257740 + mov r3, #0 + ldr r1, [r0, #0] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0x34 + bl sub_020098B8 + bl ov23_02240E60 + ldr r0, _02241084 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241088 ; =0x000009EB + ldrb r0, [r1, r0] + sub r0, r0, #1 + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + mov r0, #1 + str r0, [sp] + mov r2, #2 + str r2, [sp, #4] + mov r0, #0x1d + str r0, [sp, #8] + ldr r0, _02241084 ; =0x02257740 + mov r3, #0 + ldr r1, [r0, #0] + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009BC4 + bl ov23_02240E60 + mov r2, #1 + str r2, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x1d + str r0, [sp, #8] + ldr r0, _02241084 ; =0x02257740 + mov r3, #0 + ldr r1, [r0, #0] + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009BC4 + bl ov23_02240E60 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02241084: .word 0x02257740 +_02241088: .word 0x000009EB + thumb_func_end ov23_02240E88 + + thumb_func_start ov23_0224108C +ov23_0224108C: ; 0x0224108C + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + mov r7, #0 + str r7, [sp, #0x30] + str r7, [sp, #0x2c] +_02241096: + ldr r0, _02241198 ; =0x02257740 + mov r3, #0x53 + ldr r1, [r0, #0] + mov r0, #0 + str r7, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r3, r3, #2 + ldr r2, [r1, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r1, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r1, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r1, r2] + add r3, #0x54 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r1, r1, r3 + ldr r0, [sp, #0x30] + add r2, r7, #0 + add r0, r1, r0 + add r1, r7, #0 + add r3, r7, #0 + bl sub_020093B4 + ldr r6, _02241198 ; =0x02257740 + mov r2, #2 + ldr r1, [r6, #0] + lsl r2, r2, #0x10 + ldr r0, [r1, #0x20] + str r0, [sp, #0x34] + mov r0, #0x1a + lsl r0, r0, #4 + add r1, r1, r0 + ldr r0, [sp, #0x30] + str r2, [sp, #0x3c] + add r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x40] + lsr r0, r2, #5 + mov r1, #0 + str r1, [sp, #0x44] + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + str r0, [sp, #0x50] + add r0, sp, #0x34 + strh r1, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x5c] + mov r0, #0x1d + str r0, [sp, #0x60] + mov r0, #0xf + lsl r0, r0, #0x10 + str r1, [sp, #0x58] + str r1, [sp, #0x3c] + str r0, [sp, #0x40] + cmp r7, #0 + bne _02241150 + mov r4, #2 + mov r5, #8 +_02241128: + add r0, sp, #0x34 + bl sub_02021AA0 + ldr r1, [r6, #0] + add r2, r1, r5 + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r6, #0] + add r1, r0, r5 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + ble _02241128 +_02241150: + add r0, sp, #0x34 + bl sub_02021AA0 + ldr r2, _02241198 ; =0x02257740 + ldr r1, [sp, #0x2c] + ldr r3, [r2, #0] + add r3, r3, r1 + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r3, r1] + ldr r2, [r2, #0] + ldr r0, [sp, #0x2c] + add r0, r2, r0 + ldr r0, [r0, r1] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [sp, #0x30] + add r7, r7, #1 + add r0, #0x24 + str r0, [sp, #0x30] + ldr r0, [sp, #0x2c] + add r0, r0, #4 + str r0, [sp, #0x2c] + cmp r7, #2 + blt _02241096 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241198: .word 0x02257740 + thumb_func_end ov23_0224108C + + thumb_func_start ov23_0224119C +ov23_0224119C: ; 0x0224119C + push {r4, lr} + sub sp, #0x10 + ldr r4, _022411DC ; =0x02256318 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r1, _022411E0 ; =0x00200010 + add r0, r2, #0 + add r2, r1, #0 + bl sub_0201E88C + mov r0, #0x14 + mov r1, #0x1d + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + ldr r1, _022411E4 ; =0x00100010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + add sp, #0x10 + pop {r4, pc} + nop +_022411DC: .word 0x02256318 +_022411E0: .word 0x00200010 +_022411E4: .word 0x00100010 + thumb_func_end ov23_0224119C + + thumb_func_start ov23_022411E8 +ov23_022411E8: ; 0x022411E8 + push {r4, lr} + add r4, r0, #0 + bl ov23_02240C94 + add r0, r4, #0 + bl sub_0201C2B8 + bl sub_0201DCAC + bl sub_0200A858 + pop {r4, pc} + thumb_func_end ov23_022411E8 + + thumb_func_start ov23_02241200 +ov23_02241200: ; 0x02241200 + push {r3, lr} + lsl r0, r0, #0x10 + lsl r1, r1, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + bl ov23_0223E88C + cmp r0, #0 + beq _02241216 + mov r0, #1 + pop {r3, pc} +_02241216: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_02241200 + + thumb_func_start ov23_0224121C +ov23_0224121C: ; 0x0224121C + ldr r1, _02241234 ; =0x02257740 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02241230 + mov r1, #6 + mul r1, r0 + ldr r0, _02241238 ; =0x00000888 + add r1, r2, r1 + ldrh r0, [r1, r0] + bx lr +_02241230: + mov r0, #0 + bx lr + ; .align 2, 0 +_02241234: .word 0x02257740 +_02241238: .word 0x00000888 + thumb_func_end ov23_0224121C + + thumb_func_start ov23_0224123C +ov23_0224123C: ; 0x0224123C + ldr r1, _02241254 ; =0x02257740 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02241250 + mov r1, #6 + mul r1, r0 + ldr r0, _02241258 ; =0x0000088A + add r1, r2, r1 + ldrh r0, [r1, r0] + bx lr +_02241250: + mov r0, #0 + bx lr + ; .align 2, 0 +_02241254: .word 0x02257740 +_02241258: .word 0x0000088A + thumb_func_end ov23_0224123C + + thumb_func_start ov23_0224125C +ov23_0224125C: ; 0x0224125C + push {r4, lr} + ldr r1, _02241288 ; =0x02257740 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02241282 + ldr r1, _0224128C ; =0x00000884 + ldr r4, [r2, r1] + cmp r4, #0 + beq _02241282 + ldr r1, _02241290 ; =0x000005DE + ldrh r1, [r4, r1] + add r0, r1, r0 + mov r1, #0x53 + bl sub_020E1F6C + mov r0, #6 + mul r0, r1 + ldrh r0, [r4, r0] + pop {r4, pc} +_02241282: + mov r0, #0 + pop {r4, pc} + nop +_02241288: .word 0x02257740 +_0224128C: .word 0x00000884 +_02241290: .word 0x000005DE + thumb_func_end ov23_0224125C + + thumb_func_start ov23_02241294 +ov23_02241294: ; 0x02241294 + push {r4, lr} + ldr r1, _022412C0 ; =0x02257740 + ldr r2, [r1, #0] + cmp r2, #0 + beq _022412BC + ldr r1, _022412C4 ; =0x00000884 + ldr r4, [r2, r1] + cmp r4, #0 + beq _022412BC + ldr r1, _022412C8 ; =0x000005DE + ldrh r1, [r4, r1] + add r0, r1, r0 + mov r1, #0x53 + bl sub_020E1F6C + mov r0, #6 + mul r0, r1 + add r0, r4, r0 + ldrh r0, [r0, #2] + pop {r4, pc} +_022412BC: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_022412C0: .word 0x02257740 +_022412C4: .word 0x00000884 +_022412C8: .word 0x000005DE + thumb_func_end ov23_02241294 + + thumb_func_start ov23_022412CC +ov23_022412CC: ; 0x022412CC + push {r4, lr} + ldr r0, _022412EC ; =0x000005DE + add r4, r1, #0 + ldrh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + ldrh r1, [r4, r0] + cmp r1, #0x53 + bls _022412EA + sub r0, #0x94 + bl sub_02005748 + ldr r0, _022412EC ; =0x000005DE + mov r1, #0 + strh r1, [r4, r0] +_022412EA: + pop {r4, pc} + ; .align 2, 0 +_022412EC: .word 0x000005DE + thumb_func_end ov23_022412CC + + thumb_func_start ov23_022412F0 +ov23_022412F0: ; 0x022412F0 + push {r4, lr} + ldr r0, _02241350 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241354 ; =0x00000884 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241302 + bl sub_02022974 +_02241302: + ldr r0, _02241350 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241358 ; =0x00000878 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241312 + bl sub_02022974 +_02241312: + mov r1, #0x5e + mov r0, #0xb + lsl r1, r1, #4 + bl sub_02018184 + mov r2, #0x5e + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x47 + bl sub_020360DC + ldr r0, _0224135C ; =0x000005DE + mov r1, #0x49 + strh r1, [r4, r0] + ldr r0, _02241350 ; =0x02257740 + mov r2, #0x64 + ldr r1, [r0, #0] + ldr r0, _02241354 ; =0x00000884 + str r4, [r1, r0] + ldr r0, _02241360 ; =ov23_022412CC + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02241350 ; =0x02257740 + ldr r2, [r1, #0] + ldr r1, _02241358 ; =0x00000878 + str r0, [r2, r1] + pop {r4, pc} + ; .align 2, 0 +_02241350: .word 0x02257740 +_02241354: .word 0x00000884 +_02241358: .word 0x00000878 +_0224135C: .word 0x000005DE +_02241360: .word ov23_022412CC + thumb_func_end ov23_022412F0 + + thumb_func_start ov23_02241364 +ov23_02241364: ; 0x02241364 + push {r3, lr} + ldr r0, _02241394 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _02241398 ; =0x00000878 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241392 + bl sub_0200DA58 + ldr r0, _02241394 ; =0x02257740 + ldr r1, [r0, #0] + ldr r0, _0224139C ; =0x00000884 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, _02241394 ; =0x02257740 + ldr r0, _02241398 ; =0x00000878 + ldr r2, [r1, #0] + mov r3, #0 + str r3, [r2, r0] + ldr r1, [r1, #0] + add r0, #0xc + str r3, [r1, r0] +_02241392: + pop {r3, pc} + ; .align 2, 0 +_02241394: .word 0x02257740 +_02241398: .word 0x00000878 +_0224139C: .word 0x00000884 + thumb_func_end ov23_02241364 + + thumb_func_start ov23_022413A0 +ov23_022413A0: ; 0x022413A0 + ldr r1, _022413B0 ; =0x02257740 + mov r2, #1 + ldr r1, [r1, #0] + add r1, r1, r0 + mov r0, #0x87 + lsl r0, r0, #4 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_022413B0: .word 0x02257740 + thumb_func_end ov23_022413A0 + + thumb_func_start ov23_022413B4 +ov23_022413B4: ; 0x022413B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r5, #0 +_022413BA: + ldr r0, _02241424 ; =0x02257740 + ldr r1, [r0, #0] + mov r0, #0x87 + add r7, r1, r5 + lsl r0, r0, #4 + ldrb r0, [r7, r0] + sub r4, r0, #1 + cmp r0, #0 + beq _0224141A + mov r0, #0x82 + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #6 + mul r0, r4 + add r6, r1, r0 + ldr r0, _02241428 ; =0x0000FFFF + add r1, r0, #0 +_022413DC: + ldrh r3, [r6] + cmp r3, r1 + beq _0224140A + ldrh r2, [r6, #2] + cmp r2, r0 + beq _0224140A + add r0, sp, #0 + strh r3, [r0] + ldrh r1, [r6, #2] + strh r1, [r0, #2] + strb r5, [r0, #4] + mov r0, #0x48 + add r1, sp, #0 + bl sub_02035B48 + ldr r0, _02241424 ; =0x02257740 + add r2, r4, #3 + ldr r0, [r0, #0] + add r1, r0, r5 + mov r0, #0x87 + lsl r0, r0, #4 + strb r2, [r1, r0] + b _0224141A +_0224140A: + add r4, r4, #3 + add r6, #0x12 + cmp r4, #0xfa + blt _022413DC + mov r1, #0x87 + lsl r1, r1, #4 + mov r0, #0 + strb r0, [r7, r1] +_0224141A: + add r5, r5, #1 + cmp r5, #8 + blt _022413BA + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241424: .word 0x02257740 +_02241428: .word 0x0000FFFF + thumb_func_end ov23_022413B4 + + thumb_func_start ov23_0224142C +ov23_0224142C: ; 0x0224142C + push {r3, r4, r5, lr} + ldr r0, _022414C0 ; =0x02257740 + add r5, r2, #0 + ldr r2, [r0, #0] + cmp r2, #0 + beq _022414BC + ldrb r1, [r5, #4] + mov r0, #0xf + add r4, r1, #0 + and r4, r0 + ldr r0, _022414C4 ; =0x00000884 + ldr r0, [r2, r0] + cmp r0, #0 + bne _0224147C + bl sub_0203608C + cmp r4, r0 + bne _022414BC + ldrb r0, [r5, #4] + asr r1, r0, #4 + mov r0, #0xf + add r3, r1, #0 + and r3, r0 + cmp r3, #0 + ble _022414BC + cmp r3, #8 + bgt _022414BC + ldr r1, _022414C0 ; =0x02257740 + add r0, r5, #0 + ldr r2, [r1, #0] + ldr r1, _022414C8 ; =0x00000888 + add r4, r2, r1 + sub r1, r3, #1 + mov r2, #6 + add r3, r1, #0 + mul r3, r2 + add r1, r4, r3 + bl sub_020C4DB0 + pop {r3, r4, r5, pc} +_0224147C: + bl sub_0203608C + cmp r4, r0 + bne _022414BC + ldr r0, _022414C0 ; =0x02257740 + mov r2, #6 + ldr r1, [r0, #0] + ldr r0, _022414C4 ; =0x00000884 + ldr r4, [r1, r0] + ldr r1, _022414CC ; =0x000005DC + add r0, r5, #0 + ldrb r1, [r4, r1] + add r3, r1, #0 + mul r3, r2 + add r1, r4, r3 + bl sub_020C4DB0 + ldr r2, _022414C0 ; =0x02257740 + ldr r0, _022414C4 ; =0x00000884 + ldr r1, [r2, #0] + ldr r4, [r1, r0] + ldr r1, _022414CC ; =0x000005DC + ldrb r3, [r4, r1] + add r3, r3, #1 + strb r3, [r4, r1] + ldr r2, [r2, #0] + ldr r2, [r2, r0] + ldrb r0, [r2, r1] + cmp r0, #0xfa + blo _022414BC + mov r0, #0 + strb r0, [r2, r1] +_022414BC: + pop {r3, r4, r5, pc} + nop +_022414C0: .word 0x02257740 +_022414C4: .word 0x00000884 +_022414C8: .word 0x00000888 +_022414CC: .word 0x000005DC + thumb_func_end ov23_0224142C + + thumb_func_start ov23_022414D0 +ov23_022414D0: ; 0x022414D0 + mov r0, #6 + bx lr + thumb_func_end ov23_022414D0 + + thumb_func_start ov23_022414D4 +ov23_022414D4: ; 0x022414D4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r6, _022415AC ; =0x02257740 + mov r5, #0 + add r4, sp, #0 +_022414DE: + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _022415A0 + add r0, r5, #0 + bl sub_020593CC + cmp r0, #0 + ldr r0, [r6, #0] + beq _02241500 + add r2, r0, r5 + ldr r0, _022415B0 ; =0x000008B8 + mov r1, #0 + strb r1, [r2, r0] + b _022415A0 +_02241500: + ldr r1, _022415B0 ; =0x000008B8 + add r0, r0, r5 + ldrb r1, [r0, r1] + cmp r1, #0x1c + bhs _022415A0 + ldr r1, _022415B0 ; =0x000008B8 + ldrb r1, [r0, r1] + add r2, r1, #1 + ldr r1, _022415B0 ; =0x000008B8 + strb r2, [r0, r1] + ldr r0, [r6, #0] + add r1, r0, r5 + ldr r0, _022415B0 ; =0x000008B8 + ldrb r0, [r1, r0] + cmp r0, #0x14 + blo _022415A0 + add r0, r5, #0 + bl sub_02058DF8 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02058E4C + add r1, r0, #0 + lsl r0, r7, #0x10 + lsl r1, r1, #0x10 + lsr r0, r0, #0x10 + lsr r1, r1, #0x10 + bl ov23_0223E8CC + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02241582 + mov r2, #0x82 + ldr r1, [r6, #0] + lsl r2, r2, #2 + add r3, r1, r2 + mov r2, #6 + mul r2, r0 + add r0, r3, r2 + ldrh r3, [r3, r2] + ldr r2, _022415B4 ; =0x0000FFFF + cmp r3, r2 + beq _022415A0 + ldrh r3, [r0, #2] + cmp r3, r2 + beq _022415A0 + add r2, r1, r5 + ldr r1, _022415B0 ; =0x000008B8 + ldrb r1, [r2, r1] + sub r1, #0x13 + lsl r1, r1, #4 + add r1, r5, r1 + strb r1, [r4, #0xa] + ldrh r1, [r0] + strh r1, [r4, #6] + ldrh r0, [r0, #2] + add r1, sp, #4 + add r1, #2 + strh r0, [r4, #8] + mov r0, #0x48 + bl sub_02035B48 + b _022415A0 +_02241582: + ldr r0, [r6, #0] + add r1, r0, r5 + ldr r0, _022415B0 ; =0x000008B8 + ldrb r0, [r1, r0] + add r1, sp, #0 + sub r0, #0x13 + lsl r0, r0, #4 + add r0, r5, r0 + strb r0, [r4, #4] + mov r0, #0 + strh r0, [r4] + strh r0, [r4, #2] + mov r0, #0x48 + bl sub_02035B48 +_022415A0: + add r5, r5, #1 + cmp r5, #8 + blt _022414DE + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_022415AC: .word 0x02257740 +_022415B0: .word 0x000008B8 +_022415B4: .word 0x0000FFFF + thumb_func_end ov23_022414D4 + + thumb_func_start ov23_022415B8 +ov23_022415B8: ; 0x022415B8 + push {r3, r4, r5, r6, r7, lr} + ldr r6, _02241604 ; =0x02257740 + add r5, r0, #0 + ldr r0, [r6, #0] + cmp r0, #0 + bne _022415C8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022415C8: + mov r4, #0 + add r7, r4, #0 +_022415CC: + ldr r0, [r6, #0] + add r1, r0, r4 + ldr r0, _02241608 ; =0x000008C4 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _022415F8 + add r0, r4, #0 + bl sub_02032EE8 + ldr r1, [r6, #0] + add r3, r5, #0 + add r2, r1, r4 + ldr r1, _02241608 ; =0x000008C4 + strb r7, [r2, r1] + add r1, r7, #0 + mov r2, #0x69 + bl ov23_022422A8 + cmp r0, #0 + beq _022415F8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022415F8: + add r4, r4, #1 + cmp r4, #8 + blt _022415CC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241604: .word 0x02257740 +_02241608: .word 0x000008C4 + thumb_func_end ov23_022415B8 + + thumb_func_start ov23_0224160C +ov23_0224160C: ; 0x0224160C + push {r3, lr} + ldr r0, _02241624 ; =0x02257740 + ldr r1, [r0, #0] + cmp r1, #0 + beq _02241622 + ldr r0, _02241628 ; =0x000008C4 + mov r2, #8 + add r0, r1, r0 + mov r1, #0 + bl sub_020C4CF4 +_02241622: + pop {r3, pc} + ; .align 2, 0 +_02241624: .word 0x02257740 +_02241628: .word 0x000008C4 + thumb_func_end ov23_0224160C + + thumb_func_start ov23_0224162C +ov23_0224162C: ; 0x0224162C + ldr r1, _02241640 ; =0x02257740 + ldr r1, [r1, #0] + cmp r1, #0 + beq _0224163C + add r1, r1, r0 + ldr r0, _02241644 ; =0x00000808 + ldrb r0, [r1, r0] + bx lr +_0224163C: + mov r0, #0 + bx lr + ; .align 2, 0 +_02241640: .word 0x02257740 +_02241644: .word 0x00000808 + thumb_func_end ov23_0224162C + + thumb_func_start ov23_02241648 +ov23_02241648: ; 0x02241648 + push {r3, r4} + ldr r2, _02241668 ; =0x02257740 + ldr r1, [r2, #0] + cmp r1, #0 + beq _02241662 + add r3, r1, r0 + ldr r1, _0224166C ; =0x00000808 + mov r4, #0 + strb r4, [r3, r1] + ldr r2, [r2, #0] + add r1, #0xb0 + add r0, r2, r0 + strb r4, [r0, r1] +_02241662: + pop {r3, r4} + bx lr + nop +_02241668: .word 0x02257740 +_0224166C: .word 0x00000808 + thumb_func_end ov23_02241648 + + thumb_func_start ov23_02241670 +ov23_02241670: ; 0x02241670 + ldr r0, _0224168C ; =0x02257740 + ldr r1, [r0, #0] + cmp r1, #0 + beq _02241686 + mov r0, #0x22 + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241686 + mov r0, #1 + bx lr +_02241686: + mov r0, #0 + bx lr + nop +_0224168C: .word 0x02257740 + thumb_func_end ov23_02241670 + + thumb_func_start ov23_02241690 +ov23_02241690: ; 0x02241690 + ldr r2, _022416A0 ; =0x02257740 + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224169E + add r2, r2, r0 + ldr r0, _022416A4 ; =0x00000808 + strb r1, [r2, r0] +_0224169E: + bx lr + ; .align 2, 0 +_022416A0: .word 0x02257740 +_022416A4: .word 0x00000808 + thumb_func_end ov23_02241690 + + .rodata + + + .global Unk_ov23_0225630C +Unk_ov23_0225630C: ; 0x0225630C + .incbin "incbin/overlay23_rodata.bin", 0x0, 0x1 - 0x0 + + .global Unk_ov23_0225630D +Unk_ov23_0225630D: ; 0x0225630D + .incbin "incbin/overlay23_rodata.bin", 0x1, 0x2 - 0x1 + + .global Unk_ov23_0225630E +Unk_ov23_0225630E: ; 0x0225630E + .incbin "incbin/overlay23_rodata.bin", 0x2, 0xC - 0x2 + + .global Unk_ov23_02256318 +Unk_ov23_02256318: ; 0x02256318 + .incbin "incbin/overlay23_rodata.bin", 0xC, 0x1C - 0xC + + .global Unk_ov23_02256328 +Unk_ov23_02256328: ; 0x02256328 + .incbin "incbin/overlay23_rodata.bin", 0x1C, 0x2C - 0x1C + + .global Unk_ov23_02256338 +Unk_ov23_02256338: ; 0x02256338 + .incbin "incbin/overlay23_rodata.bin", 0x2C, 0x48 - 0x2C + + .global Unk_ov23_02256354 +Unk_ov23_02256354: ; 0x02256354 + .incbin "incbin/overlay23_rodata.bin", 0x48, 0x64 - 0x48 + + .global Unk_ov23_02256370 +Unk_ov23_02256370: ; 0x02256370 + .incbin "incbin/overlay23_rodata.bin", 0x64, 0x80 - 0x64 + + .global Unk_ov23_0225638C +Unk_ov23_0225638C: ; 0x0225638C + .incbin "incbin/overlay23_rodata.bin", 0x80, 0x9C - 0x80 + + .global Unk_ov23_022563A8 +Unk_ov23_022563A8: ; 0x022563A8 + .incbin "incbin/overlay23_rodata.bin", 0x9C, 0x28 + + + .data + + + .global Unk_ov23_02256BE0 +Unk_ov23_02256BE0: ; 0x02256BE0 + .incbin "incbin/overlay23_data.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov23_02256BE4 +Unk_ov23_02256BE4: ; 0x02256BE4 + .incbin "incbin/overlay23_data.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov23_02256BE8 +Unk_ov23_02256BE8: ; 0x02256BE8 + .incbin "incbin/overlay23_data.bin", 0x8, 0xC - 0x8 + + .global Unk_ov23_02256BEC +Unk_ov23_02256BEC: ; 0x02256BEC + .incbin "incbin/overlay23_data.bin", 0xC, 0x10 - 0xC + + .global Unk_ov23_02256BF0 +Unk_ov23_02256BF0: ; 0x02256BF0 + .incbin "incbin/overlay23_data.bin", 0x10, 0x14 - 0x10 + + .global Unk_ov23_02256BF4 +Unk_ov23_02256BF4: ; 0x02256BF4 + .incbin "incbin/overlay23_data.bin", 0x14, 0x18 - 0x14 + + .global Unk_ov23_02256BF8 +Unk_ov23_02256BF8: ; 0x02256BF8 + .incbin "incbin/overlay23_data.bin", 0x18, 0x1C - 0x18 + + .global Unk_ov23_02256BFC +Unk_ov23_02256BFC: ; 0x02256BFC + .incbin "incbin/overlay23_data.bin", 0x1C, 0x22 - 0x1C + + .global Unk_ov23_02256C02 +Unk_ov23_02256C02: ; 0x02256C02 + .incbin "incbin/overlay23_data.bin", 0x22, 0x28 - 0x22 + + .global Unk_ov23_02256C08 +Unk_ov23_02256C08: ; 0x02256C08 + .incbin "incbin/overlay23_data.bin", 0x28, 0x2E - 0x28 + + .global Unk_ov23_02256C0E +Unk_ov23_02256C0E: ; 0x02256C0E + .incbin "incbin/overlay23_data.bin", 0x2E, 0x34 - 0x2E + + .global Unk_ov23_02256C14 +Unk_ov23_02256C14: ; 0x02256C14 + .incbin "incbin/overlay23_data.bin", 0x34, 0x3A - 0x34 + + .global Unk_ov23_02256C1A +Unk_ov23_02256C1A: ; 0x02256C1A + .incbin "incbin/overlay23_data.bin", 0x3A, 0x40 - 0x3A + + .global Unk_ov23_02256C20 +Unk_ov23_02256C20: ; 0x02256C20 + .incbin "incbin/overlay23_data.bin", 0x40, 0x46 - 0x40 + + .global Unk_ov23_02256C26 +Unk_ov23_02256C26: ; 0x02256C26 + .incbin "incbin/overlay23_data.bin", 0x46, 0x4C - 0x46 + + .global Unk_ov23_02256C2C +Unk_ov23_02256C2C: ; 0x02256C2C + .incbin "incbin/overlay23_data.bin", 0x4C, 0x54 - 0x4C + + .global Unk_ov23_02256C34 +Unk_ov23_02256C34: ; 0x02256C34 + .incbin "incbin/overlay23_data.bin", 0x54, 0x5C - 0x54 + + .global Unk_ov23_02256C3C +Unk_ov23_02256C3C: ; 0x02256C3C + .incbin "incbin/overlay23_data.bin", 0x5C, 0x65 - 0x5C + + .global Unk_ov23_02256C45 +Unk_ov23_02256C45: ; 0x02256C45 + .incbin "incbin/overlay23_data.bin", 0x65, 0x6E - 0x65 + + .global Unk_ov23_02256C4E +Unk_ov23_02256C4E: ; 0x02256C4E + .incbin "incbin/overlay23_data.bin", 0x6E, 0x77 - 0x6E + + .global Unk_ov23_02256C57 +Unk_ov23_02256C57: ; 0x02256C57 + .incbin "incbin/overlay23_data.bin", 0x77, 0x80 - 0x77 + + .global Unk_ov23_02256C60 +Unk_ov23_02256C60: ; 0x02256C60 + .incbin "incbin/overlay23_data.bin", 0x80, 0x89 - 0x80 + + .global Unk_ov23_02256C69 +Unk_ov23_02256C69: ; 0x02256C69 + .incbin "incbin/overlay23_data.bin", 0x89, 0x92 - 0x89 + + .global Unk_ov23_02256C72 +Unk_ov23_02256C72: ; 0x02256C72 + .incbin "incbin/overlay23_data.bin", 0x92, 0x9E - 0x92 + + .global Unk_ov23_02256C7E +Unk_ov23_02256C7E: ; 0x02256C7E + .incbin "incbin/overlay23_data.bin", 0x9E, 0xAA - 0x9E + + .global Unk_ov23_02256C8A +Unk_ov23_02256C8A: ; 0x02256C8A + .incbin "incbin/overlay23_data.bin", 0xAA, 0xB6 - 0xAA + + .global Unk_ov23_02256C96 +Unk_ov23_02256C96: ; 0x02256C96 + .incbin "incbin/overlay23_data.bin", 0xB6, 0xC2 - 0xB6 + + .global Unk_ov23_02256CA2 +Unk_ov23_02256CA2: ; 0x02256CA2 + .incbin "incbin/overlay23_data.bin", 0xC2, 0xCE - 0xC2 + + .global Unk_ov23_02256CAE +Unk_ov23_02256CAE: ; 0x02256CAE + .incbin "incbin/overlay23_data.bin", 0xCE, 0xDA - 0xCE + + .global Unk_ov23_02256CBA +Unk_ov23_02256CBA: ; 0x02256CBA + .incbin "incbin/overlay23_data.bin", 0xDA, 0xEA - 0xDA + + .global Unk_ov23_02256CCA +Unk_ov23_02256CCA: ; 0x02256CCA + .incbin "incbin/overlay23_data.bin", 0xEA, 0xFA - 0xEA + + .global Unk_ov23_02256CDA +Unk_ov23_02256CDA: ; 0x02256CDA + .incbin "incbin/overlay23_data.bin", 0xFA, 0x10A - 0xFA + + .global Unk_ov23_02256CEA +Unk_ov23_02256CEA: ; 0x02256CEA + .incbin "incbin/overlay23_data.bin", 0x10A, 0x11A - 0x10A + + .global Unk_ov23_02256CFA +Unk_ov23_02256CFA: ; 0x02256CFA + .incbin "incbin/overlay23_data.bin", 0x11A, 0x12A - 0x11A + + .global Unk_ov23_02256D0A +Unk_ov23_02256D0A: ; 0x02256D0A + .incbin "incbin/overlay23_data.bin", 0x12A, 0x13A - 0x12A + + .global Unk_ov23_02256D1A +Unk_ov23_02256D1A: ; 0x02256D1A + .incbin "incbin/overlay23_data.bin", 0x13A, 0x14A - 0x13A + + .global Unk_ov23_02256D2A +Unk_ov23_02256D2A: ; 0x02256D2A + .incbin "incbin/overlay23_data.bin", 0x14A, 0x15A - 0x14A + + .global Unk_ov23_02256D3A +Unk_ov23_02256D3A: ; 0x02256D3A + .incbin "incbin/overlay23_data.bin", 0x15A, 0x16C - 0x15A + + .global Unk_ov23_02256D4C +Unk_ov23_02256D4C: ; 0x02256D4C + .incbin "incbin/overlay23_data.bin", 0x16C, 0x17E - 0x16C + + .global Unk_ov23_02256D5E +Unk_ov23_02256D5E: ; 0x02256D5E + .incbin "incbin/overlay23_data.bin", 0x17E, 0x192 - 0x17E + + .global Unk_ov23_02256D72 +Unk_ov23_02256D72: ; 0x02256D72 + .incbin "incbin/overlay23_data.bin", 0x192, 0x1A6 - 0x192 + + .global Unk_ov23_02256D86 +Unk_ov23_02256D86: ; 0x02256D86 + .incbin "incbin/overlay23_data.bin", 0x1A6, 0x1BA - 0x1A6 + + .global Unk_ov23_02256D9A +Unk_ov23_02256D9A: ; 0x02256D9A + .incbin "incbin/overlay23_data.bin", 0x1BA, 0x1CE - 0x1BA + + .global Unk_ov23_02256DAE +Unk_ov23_02256DAE: ; 0x02256DAE + .incbin "incbin/overlay23_data.bin", 0x1CE, 0x1E2 - 0x1CE + + .global Unk_ov23_02256DC2 +Unk_ov23_02256DC2: ; 0x02256DC2 + .incbin "incbin/overlay23_data.bin", 0x1E2, 0x1F6 - 0x1E2 + + .global Unk_ov23_02256DD6 +Unk_ov23_02256DD6: ; 0x02256DD6 + .incbin "incbin/overlay23_data.bin", 0x1F6, 0x20F - 0x1F6 + + .global Unk_ov23_02256DEF +Unk_ov23_02256DEF: ; 0x02256DEF + .incbin "incbin/overlay23_data.bin", 0x20F, 0x228 - 0x20F + + .global Unk_ov23_02256E08 +Unk_ov23_02256E08: ; 0x02256E08 + .incbin "incbin/overlay23_data.bin", 0x228, 0x241 - 0x228 + + .global Unk_ov23_02256E21 +Unk_ov23_02256E21: ; 0x02256E21 + .incbin "incbin/overlay23_data.bin", 0x241, 0x25A - 0x241 + + .global Unk_ov23_02256E3A +Unk_ov23_02256E3A: ; 0x02256E3A + .incbin "incbin/overlay23_data.bin", 0x25A, 0x274 - 0x25A + + .global Unk_ov23_02256E54 +Unk_ov23_02256E54: ; 0x02256E54 + .incbin "incbin/overlay23_data.bin", 0x274, 0x290 - 0x274 + + .global Unk_ov23_02256E70 +Unk_ov23_02256E70: ; 0x02256E70 + .incbin "incbin/overlay23_data.bin", 0x290, 0x2D0 - 0x290 + + .global Unk_ov23_02256EB0 +Unk_ov23_02256EB0: ; 0x02256EB0 + .incbin "incbin/overlay23_data.bin", 0x2D0, 0x974 - 0x2D0 + + .global Unk_ov23_02257554 +Unk_ov23_02257554: ; 0x02257554 + .incbin "incbin/overlay23_data.bin", 0x974, 0x978 - 0x974 + + .global Unk_ov23_02257558 +Unk_ov23_02257558: ; 0x02257558 + .incbin "incbin/overlay23_data.bin", 0x978, 0x97C - 0x978 + + .global Unk_ov23_0225755C +Unk_ov23_0225755C: ; 0x0225755C + .incbin "incbin/overlay23_data.bin", 0x97C, 0x980 - 0x97C + + .global Unk_ov23_02257560 +Unk_ov23_02257560: ; 0x02257560 + .incbin "incbin/overlay23_data.bin", 0x980, 0x984 - 0x980 + + .global Unk_ov23_02257564 +Unk_ov23_02257564: ; 0x02257564 + .incbin "incbin/overlay23_data.bin", 0x984, 0x988 - 0x984 + + .global Unk_ov23_02257568 +Unk_ov23_02257568: ; 0x02257568 + .incbin "incbin/overlay23_data.bin", 0x988, 0x98C - 0x988 + + .global Unk_ov23_0225756C +Unk_ov23_0225756C: ; 0x0225756C + .incbin "incbin/overlay23_data.bin", 0x98C, 0x990 - 0x98C + + .global Unk_ov23_02257570 +Unk_ov23_02257570: ; 0x02257570 + .incbin "incbin/overlay23_data.bin", 0x990, 0x10 + + + .bss + + + .global Unk_ov23_02257740 +Unk_ov23_02257740: ; 0x02257740 + .space 0x4 + diff --git a/asm/ov23_022416A8.s b/asm/ov23_022416A8.s new file mode 100644 index 000000000..597f32771 --- /dev/null +++ b/asm/ov23_022416A8.s @@ -0,0 +1,1178 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_022416A8 +ov23_022416A8: ; 0x022416A8 + ldr r3, _022416AC ; =sub_02059514 + bx r3 + ; .align 2, 0 +_022416AC: .word sub_02059514 + thumb_func_end ov23_022416A8 + + thumb_func_start ov23_022416B0 +ov23_022416B0: ; 0x022416B0 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0 + ble _022416D4 + bl ov23_0224219C + mov r1, #0 + add r2, r4, #0 + bl ov23_02254154 + bl ov23_0224219C + ldr r3, _022416DC ; =ov23_022416A8 + mov r1, #0x4b + mov r2, #1 + bl ov23_02253F40 + pop {r4, pc} +_022416D4: + bl ov23_022416A8 + pop {r4, pc} + nop +_022416DC: .word ov23_022416A8 + thumb_func_end ov23_022416B0 + + thumb_func_start ov23_022416E0 +ov23_022416E0: ; 0x022416E0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, _0224176C ; =0x02257744 + ldr r2, [r1, #0] + cmp r2, #0 + bne _0224176A + ldr r2, _02241770 ; =0x000004DC + str r0, [r1, #0] + mov r1, #0 + bl sub_020C4CF4 + ldr r0, _0224176C ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241774 ; =0x000004C8 + str r4, [r1, r0] + add r0, r4, #0 + bl sub_0203D174 + bl sub_020298B0 + mov r4, #0 + ldr r7, _0224176C ; =0x02257744 + add r6, r0, #0 + add r5, r4, #0 +_02241710: + add r0, r6, #0 + add r1, r4, #0 + bl sub_020290DC + ldr r1, [r7, #0] + add r1, r1, r5 + strb r0, [r1, #6] + add r0, r6, #0 + add r1, r4, #0 + bl sub_020290E8 + ldr r1, [r7, #0] + strh r0, [r1, r5] + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029108 + ldr r1, [r7, #0] + add r1, r1, r5 + strh r0, [r1, #2] + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029128 + ldr r1, [r7, #0] + add r1, r1, r5 + strb r0, [r1, #4] + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029134 + ldr r1, [r7, #0] + add r1, r1, r5 + strb r0, [r1, #5] + ldr r0, [r7, #0] + add r0, r0, r5 + ldrb r1, [r0, #6] + cmp r1, #0 + beq _02241762 + bl ov23_022418C0 +_02241762: + add r4, r4, #1 + add r5, #8 + cmp r4, #0x64 + blt _02241710 +_0224176A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224176C: .word 0x02257744 +_02241770: .word 0x000004DC +_02241774: .word 0x000004C8 + thumb_func_end ov23_022416E0 + + thumb_func_start ov23_02241778 +ov23_02241778: ; 0x02241778 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r0, _022417BC ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _022417C0 ; =0x000004C8 + ldr r0, [r1, r0] + bl sub_0203D174 + bl sub_020298B0 + mov r4, #0 + ldr r7, _022417BC ; =0x02257744 + add r6, r0, #0 + add r5, r4, #0 +_02241794: + ldr r3, [r7, #0] + add r2, r4, #0 + add r1, r3, r5 + ldrh r0, [r1, #2] + str r0, [sp] + ldrb r0, [r1, #4] + str r0, [sp, #4] + ldrb r0, [r1, #5] + str r0, [sp, #8] + ldrb r1, [r1, #6] + ldrh r3, [r3, r5] + add r0, r6, #0 + bl sub_02029088 + add r4, r4, #1 + add r5, #8 + cmp r4, #0x64 + blt _02241794 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022417BC: .word 0x02257744 +_022417C0: .word 0x000004C8 + thumb_func_end ov23_02241778 + + thumb_func_start ov23_022417C4 +ov23_022417C4: ; 0x022417C4 + ldr r0, _022417C8 ; =0x000004DC + bx lr + ; .align 2, 0 +_022417C8: .word 0x000004DC + thumb_func_end ov23_022417C4 + + thumb_func_start ov23_022417CC +ov23_022417CC: ; 0x022417CC + ldr r0, _022417D8 ; =0x02257744 + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _022417DC ; =0x000004DA + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_022417D8: .word 0x02257744 +_022417DC: .word 0x000004DA + thumb_func_end ov23_022417CC + + thumb_func_start ov23_022417E0 +ov23_022417E0: ; 0x022417E0 + ldr r0, _022417EC ; =0x02257744 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _022417F0 ; =0x000004DA + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_022417EC: .word 0x02257744 +_022417F0: .word 0x000004DA + thumb_func_end ov23_022417E0 + + thumb_func_start ov23_022417F4 +ov23_022417F4: ; 0x022417F4 + push {r3, lr} + ldr r0, _0224180C ; =0x02257744 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02241808 + bl sub_020181C4 + ldr r0, _0224180C ; =0x02257744 + mov r1, #0 + str r1, [r0, #0] +_02241808: + pop {r3, pc} + nop +_0224180C: .word 0x02257744 + thumb_func_end ov23_022417F4 + + thumb_func_start ov23_02241810 +ov23_02241810: ; 0x02241810 + push {r3, r4, r5, lr} + ldr r3, _02241880 ; =0x02257744 + ldr r2, _02241884 ; =0x000004DA + ldr r0, [r3, #0] + ldrb r1, [r0, r2] + cmp r1, #0 + bne _0224187E + sub r1, r2, #6 + ldr r1, [r0, r1] + add r4, r1, #1 + sub r1, r2, #6 + str r4, [r0, r1] + ldr r3, [r3, #0] + add r0, r1, #0 + ldr r1, [r3, r0] + mov r0, #0x7d + lsl r0, r0, #4 + cmp r1, r0 + blt _0224183C + mov r1, #0 + sub r0, r2, #6 + str r1, [r3, r0] +_0224183C: + ldr r0, _02241880 ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241888 ; =0x000004D4 + ldr r4, [r1, r0] + mov r1, #0x14 + add r0, r4, #0 + bl sub_020E1F6C + cmp r1, #0xa + bne _0224187E + add r0, r4, #0 + mov r1, #0x14 + bl sub_020E1F6C + add r5, r0, #0 + bl ov23_02241D18 + add r4, r0, #0 + add r0, r5, #0 + bl ov23_02241D38 + add r2, r0, #0 + cmp r4, #0 + beq _0224187E + cmp r2, #0 + beq _0224187E + ldr r0, _02241880 ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _0224188C ; =0x000004C8 + ldr r0, [r1, r0] + add r1, r4, #0 + bl ov5_021F57C8 +_0224187E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02241880: .word 0x02257744 +_02241884: .word 0x000004DA +_02241888: .word 0x000004D4 +_0224188C: .word 0x000004C8 + thumb_func_end ov23_02241810 + + thumb_func_start ov23_02241890 +ov23_02241890: ; 0x02241890 + push {r3, r4} + ldr r3, _022418BC ; =0x02257744 + lsl r1, r1, #2 + ldr r2, [r3, #0] + add r4, r2, r1 + mov r2, #0x32 + lsl r2, r2, #4 + ldr r4, [r4, r2] + cmp r4, #0 + bne _022418AA + mov r0, #0 + pop {r3, r4} + bx lr +_022418AA: + ldrh r4, [r4] + strh r4, [r0] + ldr r3, [r3, #0] + add r1, r3, r1 + ldr r1, [r1, r2] + ldrh r1, [r1, #2] + strh r1, [r0, #2] + pop {r3, r4} + bx lr + ; .align 2, 0 +_022418BC: .word 0x02257744 + thumb_func_end ov23_02241890 + + thumb_func_start ov23_022418C0 +ov23_022418C0: ; 0x022418C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + ldrh r0, [r0] + add r1, sp, #4 + strh r0, [r1] + ldr r0, [sp] + ldrh r0, [r0, #2] + strh r0, [r1, #2] + ldr r1, _02241920 ; =ov23_02241890 + mov r0, #0x64 + bl ov23_022427DC + add r0, sp, #4 + bl ov23_02242788 + add r4, r0, #0 + cmp r4, #0x64 + blt _022418EA + bl sub_02022974 +_022418EA: + mov r5, #0x63 + cmp r4, #0x63 + bge _0224190A + mov r7, #0xc7 + lsl r7, r7, #2 + ldr r1, _02241924 ; =0x02257744 + lsl r6, r5, #2 + add r0, r7, #4 +_022418FA: + ldr r2, [r1, #0] + sub r5, r5, #1 + add r3, r2, r6 + ldr r2, [r3, r7] + sub r6, r6, #4 + str r2, [r3, r0] + cmp r5, r4 + bgt _022418FA +_0224190A: + ldr r0, _02241924 ; =0x02257744 + ldr r1, [r0, #0] + lsl r0, r4, #2 + add r2, r1, r0 + mov r1, #0x32 + ldr r0, [sp] + lsl r1, r1, #4 + str r0, [r2, r1] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241920: .word ov23_02241890 +_02241924: .word 0x02257744 + thumb_func_end ov23_022418C0 + + thumb_func_start ov23_02241928 +ov23_02241928: ; 0x02241928 + push {r4, r5, r6, lr} + ldr r0, _0224195C ; =0x02257744 + mov r2, #0x32 + ldr r0, [r0, #0] + lsl r2, r2, #4 + add r0, r0, r2 + mov r1, #0 + lsr r2, r2, #1 + bl sub_020C4CF4 + mov r4, #0 + ldr r6, _0224195C ; =0x02257744 + add r5, r4, #0 +_02241942: + ldr r0, [r6, #0] + add r0, r0, r5 + ldrb r1, [r0, #6] + cmp r1, #0 + beq _02241950 + bl ov23_022418C0 +_02241950: + add r4, r4, #1 + add r5, #8 + cmp r4, #0x64 + blt _02241942 + pop {r4, r5, r6, pc} + nop +_0224195C: .word 0x02257744 + thumb_func_end ov23_02241928 + + thumb_func_start ov23_02241960 +ov23_02241960: ; 0x02241960 + mov r2, #0 +_02241962: + ldrb r1, [r0, #6] + cmp r1, #0 + beq _02241972 + add r2, r2, #1 + add r0, #8 + cmp r2, #0x64 + blt _02241962 + mov r0, #0 +_02241972: + bx lr + thumb_func_end ov23_02241960 + + thumb_func_start ov23_02241974 +ov23_02241974: ; 0x02241974 + bx lr + ; .align 2, 0 + thumb_func_end ov23_02241974 + + thumb_func_start ov23_02241978 +ov23_02241978: ; 0x02241978 + push {r3, lr} + add r2, sp, #0 + strh r0, [r2] + strh r1, [r2, #2] + ldr r1, _022419AC ; =ov23_02241890 + mov r0, #0x64 + bl ov23_022427DC + add r0, sp, #0 + bl ov23_0224271C + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0224199A + mov r0, #0 + pop {r3, pc} +_0224199A: + ldr r1, _022419B0 ; =0x02257744 + lsl r0, r0, #2 + ldr r1, [r1, #0] + add r1, r1, r0 + mov r0, #0x32 + lsl r0, r0, #4 + ldr r0, [r1, r0] + pop {r3, pc} + nop +_022419AC: .word ov23_02241890 +_022419B0: .word 0x02257744 + thumb_func_end ov23_02241978 + + thumb_func_start ov23_022419B4 +ov23_022419B4: ; 0x022419B4 + push {r3, r4, r5, lr} + add r4, r2, #0 + bl sub_0203608C + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, r5 + bne _02241A68 + bl sub_02058D88 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02058DC0 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02241978 + add r4, r0, #0 + beq _02241A68 + bl sub_020594FC + ldrb r2, [r4, #4] + ldrb r1, [r4, #5] + ldrb r0, [r4, #6] + add r1, r2, r1 + bl ov23_0224F6E0 + cmp r0, #0 + beq _02241A5A + ldr r0, _02241A6C ; =0x02257744 + ldrb r2, [r4, #6] + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _02241A70 ; =0x000004CC + strb r2, [r1, r0] + ldr r0, _02241A74 ; =0x000005E3 + bl sub_02005748 + ldrb r1, [r4, #4] + ldrb r0, [r4, #5] + mov r5, #0x63 + add r0, r1, r0 + cmp r0, #0x63 + bge _02241A10 + add r5, r0, #0 +_02241A10: + bl ov23_0224219C + mov r1, #1 + add r2, r5, #0 + bl ov23_02254154 + bl ov23_0224219C + ldrb r2, [r4, #6] + mov r1, #2 + bl ov23_022541DC + ldrb r5, [r4, #5] + ldrb r1, [r4, #4] + add r0, r5, r1 + cmp r0, #0x63 + ble _02241A36 + mov r0, #0x63 + sub r5, r0, r1 +_02241A36: + bl ov23_0224219C + ldr r3, _02241A78 ; =ov23_022416B0 + mov r1, #0x45 + mov r2, #1 + str r5, [sp] + bl ov23_02253F78 + bl ov23_0224219C + bl ov23_02253F98 + add r0, r4, #0 + bl ov23_02241C48 + bl ov23_02241778 + pop {r3, r4, r5, pc} +_02241A5A: + bl ov23_0224219C + ldr r3, _02241A7C ; =ov23_022416A8 + mov r1, #0x53 + mov r2, #1 + bl ov23_02253F40 +_02241A68: + pop {r3, r4, r5, pc} + nop +_02241A6C: .word 0x02257744 +_02241A70: .word 0x000004CC +_02241A74: .word 0x000005E3 +_02241A78: .word ov23_022416B0 +_02241A7C: .word ov23_022416A8 + thumb_func_end ov23_022419B4 + + thumb_func_start ov23_02241A80 +ov23_02241A80: ; 0x02241A80 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0] + bx lr + thumb_func_end ov23_02241A80 + + thumb_func_start ov23_02241A88 +ov23_02241A88: ; 0x02241A88 + push {r3, r4, r5, r6} + ldrh r6, [r0, #2] + mov r2, #0 + ldrh r3, [r0] + cmp r6, #0 + blt _02241AE2 + add r5, r2, #0 +_02241A96: + sub r4, r3, r5 + cmp r4, #0 + ble _02241AA0 + add r3, r4, #0 + b _02241ADA +_02241AA0: + cmp r3, #0 + beq _02241AA6 + sub r3, r3, #1 +_02241AA6: + lsl r4, r2, #1 + cmp r3, r4 + bge _02241AB0 + sub r5, r2, r3 + b _02241AB4 +_02241AB0: + add r5, r2, r4 + sub r5, r3, r5 +_02241AB4: + cmp r3, r2 + blt _02241ACA + lsl r6, r2, #1 + add r6, r2, r6 + cmp r3, r6 + bge _02241AC4 + sub r3, r4, r3 + b _02241ACA +_02241AC4: + lsl r2, r2, #2 + neg r2, r2 + add r3, r2, r3 +_02241ACA: + strh r3, [r1] + strh r5, [r1, #2] + ldrh r1, [r0] + add r1, r1, #1 + strh r1, [r0] + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_02241ADA: + add r2, r2, #1 + add r5, r5, #4 + cmp r2, r6 + ble _02241A96 +_02241AE2: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov23_02241A88 + + thumb_func_start ov23_02241AE8 +ov23_02241AE8: ; 0x02241AE8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #8] + add r6, r2, #0 + add r1, sp, #0xc + add r7, r3, #0 + strh r6, [r1] + strh r7, [r1, #2] + ldr r0, [sp] + strb r5, [r1, #4] + strb r0, [r1, #6] + ldr r0, [sp, #8] + strb r0, [r1, #5] + add r0, r6, #0 + add r1, r7, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _02241B26 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x54 + add r3, r2, #0 + bl ov23_02253F40 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_02241B26: + add r0, r6, #0 + add r1, r7, #0 + bl sub_02058108 + cmp r0, #0 + beq _02241B44 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x37 + add r3, r2, #0 + bl ov23_02253F40 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_02241B44: + ldr r0, _02241C3C ; =0x02257744 + add r2, r7, #0 + ldr r1, [r0, #0] + ldr r0, _02241C40 ; =0x000004C8 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_02054F68 + cmp r0, #0 + beq _02241B6A + bl ov23_0224219C + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + bl ov23_02253F40 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_02241B6A: + add r0, r6, #0 + add r1, r7, #0 + bl ov23_02241978 + add r4, r0, #0 + add r0, sp, #0xc + beq _02241BC2 + ldrb r1, [r4, #6] + ldrb r0, [r0, #6] + cmp r1, r0 + bne _02241BB2 + ldrb r0, [r4, #4] + str r0, [sp, #4] + cmp r0, r5 + ble _02241B96 + add r0, r5, #0 + mov r1, #5 + bl sub_020E1F6C + ldr r1, [sp, #4] + add r0, r1, r0 + b _02241B9E +_02241B96: + mov r1, #5 + bl sub_020E1F6C + add r0, r5, r0 +_02241B9E: + add r0, r0, #1 + strb r0, [r4, #4] + ldrb r0, [r4, #4] + cmp r0, #0x63 + bls _02241BAC + mov r0, #0x63 + strb r0, [r4, #4] +_02241BAC: + mov r0, #1 + str r0, [sp, #8] + b _02241BCA +_02241BB2: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x3b + add r3, r2, #0 + bl ov23_02253F40 + b _02241BCA +_02241BC2: + bl ov23_02241CAC + mov r0, #1 + str r0, [sp, #8] +_02241BCA: + ldr r0, [sp, #8] + cmp r0, #0 + beq _02241C38 + bl ov23_0224219C + ldr r2, [sp] + mov r1, #0 + bl ov23_022541A0 + bl ov23_0224219C + mov r1, #1 + add r2, r5, #0 + bl ov23_02254154 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x3a + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, [sp] + bl ov23_02250128 + ldr r0, _02241C44 ; =0x00000631 + bl sub_02005748 + ldr r0, _02241C3C ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241C40 ; =0x000004C8 + ldr r0, [r1, r0] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206AA14 + ldr r0, _02241C3C ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241C40 ; =0x000004C8 + ldr r0, [r1, r0] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x2f + bl sub_0202CF28 + ldr r0, _02241C3C ; =0x02257744 + add r2, r7, #0 + ldr r1, [r0, #0] + ldr r0, _02241C40 ; =0x000004C8 + ldr r0, [r1, r0] + add r1, r6, #0 + bl ov5_021F57C8 +_02241C38: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241C3C: .word 0x02257744 +_02241C40: .word 0x000004C8 +_02241C44: .word 0x00000631 + thumb_func_end ov23_02241AE8 + + thumb_func_start ov23_02241C48 +ov23_02241C48: ; 0x02241C48 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _02241CA4 ; =0x02257744 + mov r1, #0 + ldr r0, [r0, #0] + mvn r1, r1 + mov r4, #0 +_02241C56: + cmp r0, r6 + bne _02241C5E + add r1, r4, #0 + b _02241C66 +_02241C5E: + add r4, r4, #1 + add r0, #8 + cmp r4, #0x64 + blt _02241C56 +_02241C66: + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + bne _02241C72 + bl sub_02022974 +_02241C72: + cmp r4, #0x63 + bge _02241C92 + ldr r7, _02241CA4 ; =0x02257744 + lsl r5, r4, #3 +_02241C7A: + add r0, r4, #1 + ldr r1, [r7, #0] + lsl r0, r0, #3 + add r0, r1, r0 + add r1, r1, r5 + mov r2, #8 + bl sub_020C4DB0 + add r4, r4, #1 + add r5, #8 + cmp r4, #0x63 + blt _02241C7A +_02241C92: + ldr r0, _02241CA4 ; =0x02257744 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _02241CA8 ; =0x0000031E + strb r2, [r1, r0] + add r0, r6, #0 + bl ov23_02241928 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241CA4: .word 0x02257744 +_02241CA8: .word 0x0000031E + thumb_func_end ov23_02241C48 + + thumb_func_start ov23_02241CAC +ov23_02241CAC: ; 0x02241CAC + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, _02241CF0 ; =0x02257744 + ldr r0, [r0, #0] + bl ov23_02241960 + add r5, r0, #0 + bne _02241CD8 + ldr r0, _02241CF0 ; =0x02257744 + ldr r0, [r0, #0] + bl ov23_02241974 + bl ov23_02241C48 + ldr r0, _02241CF0 ; =0x02257744 + ldr r0, [r0, #0] + bl ov23_02241960 + add r5, r0, #0 + bne _02241CD8 + bl sub_02022974 +_02241CD8: + add r0, r4, #0 + add r1, r5, #0 + mov r2, #8 + bl sub_020C4DB0 + add r0, r5, #0 + bl ov23_022418C0 + bl ov23_02241778 + pop {r3, r4, r5, pc} + nop +_02241CF0: .word 0x02257744 + thumb_func_end ov23_02241CAC + + thumb_func_start ov23_02241CF4 +ov23_02241CF4: ; 0x02241CF4 + cmp r0, #0 + beq _02241D00 + cmp r0, #0xb + bge _02241D00 + mov r0, #1 + bx lr +_02241D00: + mov r0, #0 + bx lr + thumb_func_end ov23_02241CF4 + + thumb_func_start ov23_02241D04 +ov23_02241D04: ; 0x02241D04 + push {r3, lr} + bl ov23_02241978 + cmp r0, #0 + beq _02241D12 + mov r0, #1 + pop {r3, pc} +_02241D12: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_02241D04 + + thumb_func_start ov23_02241D18 +ov23_02241D18: ; 0x02241D18 + ldr r1, _02241D34 ; =0x02257744 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02241D2E + lsl r1, r0, #3 + add r0, r2, r1 + ldrb r0, [r0, #6] + cmp r0, #0 + beq _02241D2E + ldrh r0, [r2, r1] + bx lr +_02241D2E: + mov r0, #0 + bx lr + nop +_02241D34: .word 0x02257744 + thumb_func_end ov23_02241D18 + + thumb_func_start ov23_02241D38 +ov23_02241D38: ; 0x02241D38 + ldr r1, _02241D54 ; =0x02257744 + ldr r1, [r1, #0] + cmp r1, #0 + beq _02241D4E + lsl r0, r0, #3 + add r1, r1, r0 + ldrb r0, [r1, #6] + cmp r0, #0 + beq _02241D4E + ldrh r0, [r1, #2] + bx lr +_02241D4E: + mov r0, #0 + bx lr + nop +_02241D54: .word 0x02257744 + thumb_func_end ov23_02241D38 + + thumb_func_start ov23_02241D58 +ov23_02241D58: ; 0x02241D58 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + ldr r0, _02241DF0 ; =0x02257744 + mov r5, #0 + ldr r2, [r0, #0] + add r6, r5, #0 + add r7, r5, #0 + cmp r2, #0 + bne _02241D6E + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_02241D6E: + ldr r0, _02241DF4 ; =0x000004CC + add r4, r5, #0 +_02241D72: + ldrb r1, [r2, r0] + cmp r1, #0 + beq _02241DCE + mov r0, #4 + bl sub_0200B358 + add r5, r0, #0 + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + ldr r2, _02241DF0 ; =0x02257744 + add r6, r0, #0 + ldr r2, [r2, #0] + add r0, r5, #0 + add r3, r2, r4 + ldr r2, _02241DF4 ; =0x000004CC + mov r1, #2 + ldrb r2, [r3, r2] + bl sub_0200BACC + add r0, r5, #0 + mov r1, #2 + bl sub_0200C324 + bl ov23_0224219C + bl ov23_02253E3C + mov r1, #0x5f + add r2, r6, #0 + bl sub_0200B1B8 + ldr r1, [sp] + add r0, r5, #0 + add r2, r6, #0 + bl sub_0200C388 + ldr r1, _02241DF0 ; =0x02257744 + mov r0, #0 + ldr r1, [r1, #0] + mov r7, #1 + add r2, r1, r4 + ldr r1, _02241DF4 ; =0x000004CC + strb r0, [r2, r1] + b _02241DD6 +_02241DCE: + add r4, r4, #1 + add r2, r2, #1 + cmp r4, #8 + blt _02241D72 +_02241DD6: + cmp r6, #0 + beq _02241DE0 + add r0, r6, #0 + bl sub_020237BC +_02241DE0: + cmp r5, #0 + beq _02241DEA + add r0, r5, #0 + bl sub_0200B3F0 +_02241DEA: + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241DF0: .word 0x02257744 +_02241DF4: .word 0x000004CC + thumb_func_end ov23_02241D58 + + thumb_func_start ov23_02241DF8 +ov23_02241DF8: ; 0x02241DF8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, _02241E44 ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241E48 ; =0x000004C8 + ldr r0, [r1, r0] + bl sub_0203D174 + bl sub_020298B0 + add r4, r0, #0 + mov r5, #0 +_02241E10: + add r0, r4, #0 + add r1, r5, #0 + bl sub_020290DC + cmp r0, #0 + beq _02241E38 + add r0, r4, #0 + add r1, r5, #0 + bl sub_020290E8 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_02029108 + add r1, r0, #0 + add r0, r6, #0 + add r2, r7, #0 + bl ov23_0223E650 +_02241E38: + add r5, r5, #1 + cmp r5, #0x64 + blt _02241E10 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02241E44: .word 0x02257744 +_02241E48: .word 0x000004C8 + thumb_func_end ov23_02241DF8 + + thumb_func_start ov23_02241E4C +ov23_02241E4C: ; 0x02241E4C + push {r4, lr} + add r4, r1, #0 + ldrh r0, [r4, #2] + add r0, r0, #1 + strh r0, [r4, #2] + ldrh r0, [r4, #2] + cmp r0, #0x64 + bls _02241E66 + ldr r0, _02241E68 ; =0x0000054A + bl sub_02005748 + mov r0, #0 + strh r0, [r4, #2] +_02241E66: + pop {r4, pc} + ; .align 2, 0 +_02241E68: .word 0x0000054A + thumb_func_end ov23_02241E4C + + thumb_func_start ov23_02241E6C +ov23_02241E6C: ; 0x02241E6C + push {r4, lr} + ldr r0, _02241EC4 ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241EC8 ; =0x000004C4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241E7E + bl sub_02022974 +_02241E7E: + ldr r0, _02241EC4 ; =0x02257744 + ldr r1, [r0, #0] + mov r0, #0x13 + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241E90 + bl sub_02022974 +_02241E90: + mov r0, #0xb + mov r1, #4 + bl sub_02018184 + mov r1, #0 + mov r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r2, #0x64 + ldr r0, _02241EC4 ; =0x02257744 + strh r2, [r4, #2] + ldr r1, [r0, #0] + ldr r0, _02241EC8 ; =0x000004C4 + str r4, [r1, r0] + ldr r0, _02241ECC ; =ov23_02241E4C + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02241EC4 ; =0x02257744 + ldr r2, [r1, #0] + mov r1, #0x13 + lsl r1, r1, #6 + str r0, [r2, r1] + pop {r4, pc} + nop +_02241EC4: .word 0x02257744 +_02241EC8: .word 0x000004C4 +_02241ECC: .word ov23_02241E4C + thumb_func_end ov23_02241E6C + + thumb_func_start ov23_02241ED0 +ov23_02241ED0: ; 0x02241ED0 + push {r3, lr} + ldr r0, _02241F04 ; =0x02257744 + ldr r1, [r0, #0] + mov r0, #0x13 + lsl r0, r0, #6 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02241F02 + bl sub_0200DA58 + ldr r0, _02241F04 ; =0x02257744 + ldr r1, [r0, #0] + ldr r0, _02241F08 ; =0x000004C4 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, _02241F04 ; =0x02257744 + mov r0, #0x13 + ldr r2, [r1, #0] + mov r3, #0 + lsl r0, r0, #6 + str r3, [r2, r0] + ldr r1, [r1, #0] + add r0, r0, #4 + str r3, [r1, r0] +_02241F02: + pop {r3, pc} + ; .align 2, 0 +_02241F04: .word 0x02257744 +_02241F08: .word 0x000004C4 + thumb_func_end ov23_02241ED0 + + thumb_func_start ov23_02241F0C +ov23_02241F0C: ; 0x02241F0C + push {r3, lr} + ldr r1, _02241F38 ; =0x02257744 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02241F32 + ldr r1, _02241F3C ; =0x000004C4 + ldr r1, [r2, r1] + cmp r1, #0 + beq _02241F32 + ldrh r1, [r1, #2] + lsr r1, r1, #1 + add r0, r1, r0 + mov r1, #0x64 + bl sub_020E1F6C + add r0, r1, #0 + bl ov23_02241D18 + pop {r3, pc} +_02241F32: + mov r0, #0 + pop {r3, pc} + nop +_02241F38: .word 0x02257744 +_02241F3C: .word 0x000004C4 + thumb_func_end ov23_02241F0C + + thumb_func_start ov23_02241F40 +ov23_02241F40: ; 0x02241F40 + push {r3, lr} + ldr r1, _02241F6C ; =0x02257744 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02241F66 + ldr r1, _02241F70 ; =0x000004C4 + ldr r1, [r2, r1] + cmp r1, #0 + beq _02241F66 + ldrh r1, [r1, #2] + lsr r1, r1, #1 + add r0, r1, r0 + mov r1, #0x64 + bl sub_020E1F6C + add r0, r1, #0 + bl ov23_02241D38 + pop {r3, pc} +_02241F66: + mov r0, #0 + pop {r3, pc} + nop +_02241F6C: .word 0x02257744 +_02241F70: .word 0x000004C4 + thumb_func_end ov23_02241F40 + .bss + + + .global Unk_ov23_02257744 +Unk_ov23_02257744: ; 0x02257744 + .space 0x4 + diff --git a/asm/ov23_02241F74.s b/asm/ov23_02241F74.s new file mode 100644 index 000000000..41b857a6c --- /dev/null +++ b/asm/ov23_02241F74.s @@ -0,0 +1,2700 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02241F74 +ov23_02241F74: ; 0x02241F74 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl sub_02025E44 + bl sub_02027AC0 + add r4, r0, #0 + ldr r0, _022420E4 ; =0x02257748 + mov r2, #0x15 + str r6, [r0, #0] + add r0, r6, #0 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020C4CF4 + ldr r2, _022420E4 ; =0x02257748 + mov r3, #0x4d + ldr r0, [r2, #0] + lsl r3, r3, #2 + str r5, [r0, #0xc] + ldr r1, [r2, #0] + mov r0, #0 + strb r0, [r1, r3] + ldr r1, [r2, #0] + strh r0, [r1, #0x1c] + ldr r1, [r2, #0] + strh r0, [r1, #0x1e] + add r1, r3, #0 + ldr r6, [r2, #0] + add r1, #0x17 + strb r0, [r6, r1] + add r0, r3, #0 + ldr r1, [r2, #0] + mov r6, #1 + add r0, #0x13 + strb r6, [r1, r0] + add r3, #0xc0 + str r3, [sp] + ldr r0, _022420E8 ; =0x0000027A + ldr r2, [r5, #8] + mov r1, #0x21 + add r3, r4, #0 + bl ov23_02253D48 + ldr r1, _022420E4 ; =0x02257748 + add r3, r4, #0 + ldr r2, [r1, #0] + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r2, r1] + mov r0, #0 + str r0, [sp] + ldr r0, _022420EC ; =0x0000027E + ldr r2, [r5, #8] + mov r1, #0x21 + bl ov23_02253D48 + ldr r1, _022420E4 ; =0x02257748 + add r3, r4, #0 + ldr r2, [r1, #0] + mov r1, #0x47 + lsl r1, r1, #2 + str r0, [r2, r1] + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [sp] + mov r0, #0x9f + ldr r2, [r5, #8] + lsl r0, r0, #2 + mov r1, #0x21 + bl ov23_02253D48 + ldr r1, _022420E4 ; =0x02257748 + add r3, r4, #0 + ldr r2, [r1, #0] + mov r1, #0x12 + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #0 + str r0, [sp] + ldr r0, _022420F0 ; =0x0000027D + ldr r2, [r5, #8] + mov r1, #0x21 + bl ov23_02253D48 + ldr r1, _022420E4 ; =0x02257748 + add r3, r4, #0 + ldr r2, [r1, #0] + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r2, r1] + mov r0, #0 + str r0, [sp] + ldr r0, _022420F4 ; =0x00000276 + ldr r2, [r5, #8] + mov r1, #0x21 + bl ov23_02253D48 + ldr r2, _022420E4 ; =0x02257748 + mov r1, #0x4a + ldr r3, [r2, #0] + lsl r1, r1, #2 + str r0, [r3, r1] + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r2, #0] + ldr r2, _022420F8 ; =0x000003E2 + ldr r0, [r0, #0xc] + mov r1, #3 + ldr r0, [r0, #8] + mov r3, #0xa + bl sub_0200DD0C + mov r3, #0x80 + str r3, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0x32 + mov r1, #0x34 + mov r2, #0 + add r3, #0xc0 + bl sub_02006E84 + mov r0, #2 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, _022420E4 ; =0x02257748 + ldr r2, _022420FC ; =0x000003D9 + ldr r0, [r0, #0] + mov r1, #3 + ldr r0, [r0, #0xc] + mov r3, #0xb + ldr r0, [r0, #8] + bl sub_0200DAA4 + mov r3, #0 + ldr r0, _022420E4 ; =0x02257748 + add r4, r3, #0 + mov r2, #0xff + add r1, r3, #0 +_02242098: + ldr r5, [r0, #0] + add r5, r5, r3 + add r5, #0xc2 + strb r2, [r5] + ldr r5, [r0, #0] + add r5, r5, r3 + add r5, #0xd2 + strb r2, [r5] + ldr r5, [r0, #0] + add r3, r3, #1 + add r5, r5, r4 + add r5, #0xdc + add r4, r4, #4 + str r1, [r5, #0] + cmp r3, #8 + blt _02242098 + ldr r0, _022420E4 ; =0x02257748 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206A9F4 + mov r1, #0 + ldr r0, _02242100 ; =ov23_02243310 + add r2, r1, #0 + bl sub_0200D9E8 + ldr r1, _022420E4 ; =0x02257748 + ldr r1, [r1, #0] + str r0, [r1, #0x14] + ldr r0, _02242104 ; =ov23_022433F4 + bl sub_02032110 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_022420E4: .word 0x02257748 +_022420E8: .word 0x0000027A +_022420EC: .word 0x0000027E +_022420F0: .word 0x0000027D +_022420F4: .word 0x00000276 +_022420F8: .word 0x000003E2 +_022420FC: .word 0x000003D9 +_02242100: .word ov23_02243310 +_02242104: .word ov23_022433F4 + thumb_func_end ov23_02241F74 + + thumb_func_start ov23_02242108 +ov23_02242108: ; 0x02242108 + push {r4, r5, r6, lr} + mov r4, #0 + ldr r6, _02242198 ; =0x02257748 + add r5, r4, #0 +_02242110: + ldr r0, [r6, #0] + add r0, r0, r5 + add r0, #0xdc + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242120 + bl sub_020237BC +_02242120: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _02242110 + mov r0, #0 + bl sub_02032110 + ldr r0, _02242198 ; =0x02257748 + ldr r0, [r0, #0] + ldr r0, [r0, #0x14] + bl sub_0200DA58 + ldr r0, _02242198 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02253DD8 + ldr r0, _02242198 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02253DD8 + ldr r0, _02242198 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov23_02253DD8 + ldr r0, _02242198 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02253DD8 + ldr r0, _02242198 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02253DD8 + ldr r0, _02242198 ; =0x02257748 + mov r2, #0 + ldr r1, [r0, #0] + ldr r1, [r1, #0xc] + add r1, #0x90 + str r2, [r1, #0] + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, _02242198 ; =0x02257748 + mov r1, #0 + str r1, [r0, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02242198: .word 0x02257748 + thumb_func_end ov23_02242108 + + thumb_func_start ov23_0224219C +ov23_0224219C: ; 0x0224219C + ldr r0, _022421A8 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bx lr + ; .align 2, 0 +_022421A8: .word 0x02257748 + thumb_func_end ov23_0224219C + + thumb_func_start ov23_022421AC +ov23_022421AC: ; 0x022421AC + ldr r0, _022421B8 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bx lr + ; .align 2, 0 +_022421B8: .word 0x02257748 + thumb_func_end ov23_022421AC + + thumb_func_start ov23_022421BC +ov23_022421BC: ; 0x022421BC + ldr r0, _022421C8 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bx lr + ; .align 2, 0 +_022421C8: .word 0x02257748 + thumb_func_end ov23_022421BC + + thumb_func_start ov23_022421CC +ov23_022421CC: ; 0x022421CC + ldr r0, _022421D8 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bx lr + ; .align 2, 0 +_022421D8: .word 0x02257748 + thumb_func_end ov23_022421CC + + thumb_func_start ov23_022421DC +ov23_022421DC: ; 0x022421DC + ldr r0, _022421E8 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r1, r0] + bx lr + ; .align 2, 0 +_022421E8: .word 0x02257748 + thumb_func_end ov23_022421DC + + thumb_func_start ov23_022421EC +ov23_022421EC: ; 0x022421EC + push {r3, lr} + ldr r0, _02242238 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254210 + ldr r0, _02242238 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254210 + ldr r0, _02242238 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov23_02254210 + ldr r0, _02242238 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254210 + ldr r0, _02242238 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254210 + pop {r3, pc} + nop +_02242238: .word 0x02257748 + thumb_func_end ov23_022421EC + + thumb_func_start ov23_0224223C +ov23_0224223C: ; 0x0224223C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + str r2, [sp] + str r3, [sp, #4] + cmp r5, #0 + beq _022422A2 + cmp r6, #0 + beq _022422A2 + mov r0, #4 + bl sub_0200B358 + add r4, r0, #0 + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + add r7, r0, #0 + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_0200B498 + add r0, r4, #0 + mov r1, #1 + add r2, r6, #0 + bl sub_0200B498 + bl ov23_0224219C + bl ov23_02253E3C + ldr r1, [sp] + add r2, r7, #0 + bl sub_0200B1B8 + ldr r1, [sp, #4] + add r0, r4, #0 + add r2, r7, #0 + bl sub_0200C388 + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B3F0 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022422A2: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0224223C + + thumb_func_start ov23_022422A8 +ov23_022422A8: ; 0x022422A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp] + str r3, [sp, #4] + cmp r5, #0 + beq _02242300 + mov r0, #4 + bl sub_0200B358 + add r4, r0, #0 + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + add r6, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_0200B498 + bl ov23_0224219C + bl ov23_02253E3C + ldr r1, [sp] + add r2, r6, #0 + bl sub_0200B1B8 + ldr r1, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B3F0 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02242300: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_022422A8 + + thumb_func_start ov23_02242308 +ov23_02242308: ; 0x02242308 + push {r3, r4, r5, r6, r7, lr} + ldr r4, _02242404 ; =0x02257748 + add r6, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _02242318 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242318: + mov r5, #0 +_0224231A: + add r0, r5, #0 + bl sub_02032DE0 + cmp r0, #0 + beq _02242346 + add r0, r5, #0 + bl sub_02032EE8 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02032E30 + add r0, r7, #0 + mov r1, #1 + mov r2, #0x5b + add r3, r6, #0 + bl ov23_022422A8 + cmp r0, #0 + beq _02242346 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02242346: + ldr r0, [r4, #0] + add r0, r0, r5 + add r0, #0xc2 + ldrb r0, [r0] + cmp r0, #0xff + beq _02242384 + add r0, r5, #0 + bl sub_02032EE8 + add r7, r0, #0 + ldr r0, [r4, #0] + add r0, r0, r5 + add r0, #0xc2 + ldrb r0, [r0] + bl sub_02032EE8 + add r1, r0, #0 + ldr r0, [r4, #0] + add r3, r6, #0 + add r2, r0, r5 + add r2, #0xc2 + mov r0, #0xff + strb r0, [r2] + add r0, r7, #0 + mov r2, #0x6f + bl ov23_0224223C + cmp r0, #0 + beq _02242384 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02242384: + ldr r0, [r4, #0] + add r0, r0, r5 + add r0, #0xd2 + ldrb r0, [r0] + cmp r0, #0xff + beq _022423B2 + add r0, r5, #0 + bl sub_02032EE8 + ldr r1, [r4, #0] + add r3, r6, #0 + add r2, r1, r5 + add r2, #0xd2 + mov r1, #0xff + strb r1, [r2] + mov r1, #0 + mov r2, #0x70 + bl ov23_022422A8 + cmp r0, #0 + beq _022423B2 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022423B2: + ldr r0, [r4, #0] + ldr r1, _02242408 ; =0x0000013D + add r2, r0, r5 + ldrb r1, [r2, r1] + cmp r1, #1 + bne _022423FA + lsl r4, r5, #2 + add r0, r0, r4 + add r0, #0xdc + ldr r1, [r0, #0] + cmp r1, #0 + beq _022423EA + add r0, r6, #0 + bl sub_02023810 + ldr r0, _02242404 ; =0x02257748 + ldr r0, [r0, #0] + add r0, r0, r4 + add r0, #0xdc + ldr r0, [r0, #0] + bl sub_020237BC + ldr r0, _02242404 ; =0x02257748 + mov r1, #0 + ldr r0, [r0, #0] + add r0, r0, r4 + add r0, #0xdc + str r1, [r0, #0] +_022423EA: + ldr r0, _02242404 ; =0x02257748 + mov r2, #0 + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _02242408 ; =0x0000013D + strb r2, [r1, r0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022423FA: + add r5, r5, #1 + cmp r5, #8 + blt _0224231A + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242404: .word 0x02257748 +_02242408: .word 0x0000013D + thumb_func_end ov23_02242308 + + thumb_func_start ov23_0224240C +ov23_0224240C: ; 0x0224240C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, sp, #0 + strh r5, [r0] + strh r4, [r0, #2] + ldr r0, _02242454 ; =0x02257748 + add r1, r5, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + ldr r0, [r0, #0xc] + bl sub_02054F68 + cmp r0, #0 + beq _0224242E + mov r0, #1 + pop {r3, r4, r5, pc} +_0224242E: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_022442D8 + cmp r0, #0 + beq _0224243E + mov r0, #1 + pop {r3, r4, r5, pc} +_0224243E: + mov r1, #0 + add r0, sp, #0 + mvn r1, r1 + bl ov23_022512D4 + cmp r0, #0xff + beq _02242450 + mov r0, #1 + pop {r3, r4, r5, pc} +_02242450: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242454: .word 0x02257748 + thumb_func_end ov23_0224240C + + thumb_func_start ov23_02242458 +ov23_02242458: ; 0x02242458 + push {r4, lr} + sub sp, #0x18 + ldr r3, _02242534 ; =0x02257748 + ldr r2, _02242538 ; =0x00000146 + ldr r0, [r3, #0] + ldrb r1, [r0, r2] + cmp r1, #0 + bne _02242472 + add r1, r2, #0 + sub r1, #0x12 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _02242486 +_02242472: + mov r1, #0x4d + lsl r1, r1, #2 + ldrb r2, [r0, r1] + cmp r2, #0 + beq _02242480 + sub r2, r2, #1 + strb r2, [r0, r1] +_02242480: + add sp, #0x18 + mov r0, #0 + pop {r4, pc} +_02242486: + ldr r1, _0224253C ; =0x021BF6BC + ldrh r1, [r1, #0x20] + cmp r1, #0 + beq _0224252C + add r1, r2, #0 + mov r4, #0x1e + sub r1, #0x12 + strb r4, [r0, r1] + ldr r1, [r3, #0] + add r0, r2, #5 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224252C + bl sub_02057FAC + cmp r0, #0 + beq _0224252C + bl sub_0203608C + bl ov23_0224ACC0 + cmp r0, #0 + bne _0224252C + bl sub_020360F0 + cmp r0, #0 + beq _022424C2 + add sp, #0x18 + mov r0, #0 + pop {r4, pc} +_022424C2: + bl sub_0203608C + bl sub_020593CC + cmp r0, #0 + beq _022424D4 + add sp, #0x18 + mov r0, #0 + pop {r4, pc} +_022424D4: + ldr r3, _02242534 ; =0x02257748 + ldr r2, _0224253C ; =0x021BF6BC + ldr r3, [r3, #0] + ldrh r1, [r2, #0x1c] + ldr r3, [r3, #0xc] + ldrh r2, [r2, #0x1e] + add r3, #0x8c + ldr r3, [r3, #0] + add r0, sp, #0xc + bl ov5_021EAFA4 + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x14] + add r2, sp, #8 + add r3, sp, #4 + bl ov5_021E9230 + ldr r1, [sp, #8] + add r0, sp, #0 + strh r1, [r0] + ldr r1, [sp, #4] + strh r1, [r0, #2] + ldr r1, _0224253C ; =0x021BF6BC + ldr r0, _02242534 ; =0x02257748 + ldrh r3, [r1, #0x1c] + ldr r2, [r0, #0] + strh r3, [r2, #0x18] + ldrh r2, [r1, #0x1e] + ldr r1, [r0, #0] + strh r2, [r1, #0x1a] + ldr r2, [sp, #8] + ldr r1, [r0, #0] + strh r2, [r1, #0x1c] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + mov r2, #4 + strh r1, [r0, #0x1e] + mov r0, #0x30 + add r1, sp, #0 + bl sub_020359DC + add sp, #0x18 + mov r0, #1 + pop {r4, pc} +_0224252C: + mov r0, #0 + add sp, #0x18 + pop {r4, pc} + nop +_02242534: .word 0x02257748 +_02242538: .word 0x00000146 +_0224253C: .word 0x021BF6BC + thumb_func_end ov23_02242458 + + thumb_func_start ov23_02242540 +ov23_02242540: ; 0x02242540 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r2, #0 + str r0, [sp] + ldrh r0, [r6] + str r1, [sp, #4] + mov r1, #6 + sub r0, r0, #6 + str r0, [sp, #0xc] + ldrh r0, [r6, #2] + mov r4, #1 + sub r0, r0, #6 + str r0, [sp, #8] + add r0, sp, #0x14 + bl ov23_02241A80 + add r0, sp, #0x14 + add r1, sp, #0x10 + bl ov23_02241A88 + cmp r0, #0 + beq _022425B0 +_0224256C: + add r1, sp, #0x10 + mov r0, #0 + ldrh r2, [r6] + ldrsh r0, [r1, r0] + add r5, r2, r0 + mov r0, #2 + ldrh r2, [r6, #2] + ldrsh r0, [r1, r0] + add r7, r2, r0 + ldr r2, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + blx r2 + cmp r0, #0 + beq _022425A4 + ldr r0, [sp, #0xc] + sub r1, r5, r0 + ldr r0, [sp, #8] + sub r0, r7, r0 + lsl r0, r0, #4 + add r1, r1, r0 + ldr r0, [sp] + cmp r4, #8 + strb r1, [r0, r4] + bne _022425A2 + add r4, r4, #1 + b _022425B0 +_022425A2: + add r4, r4, #1 +_022425A4: + add r0, sp, #0x14 + add r1, sp, #0x10 + bl ov23_02241A88 + cmp r0, #0 + bne _0224256C +_022425B0: + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02242540 + + thumb_func_start ov23_022425B8 +ov23_022425B8: ; 0x022425B8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + strb r0, [r1] + ldr r1, _022425F0 ; =ov23_022442D8 + add r0, sp, #0 + add r2, r4, #0 + bl ov23_02242540 + add r2, r0, #0 + mov r0, #0x31 + add r1, sp, #0 + bl sub_02035AC4 + ldr r1, _022425F4 ; =ov23_02241200 + add r0, sp, #0 + add r2, r4, #0 + bl ov23_02242540 + add r2, r0, #0 + mov r0, #0x32 + add r1, sp, #0 + bl sub_02035AC4 + add sp, #0xc + pop {r3, r4, pc} + nop +_022425F0: .word ov23_022442D8 +_022425F4: .word ov23_02241200 + thumb_func_end ov23_022425B8 + + thumb_func_start ov23_022425F8 +ov23_022425F8: ; 0x022425F8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + bl sub_02059094 + cmp r0, #0 + beq _02242620 + add r0, r5, #0 + bl ov23_0224ACC0 + cmp r0, #0 + bne _02242620 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_022425B8 +_02242620: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_022425F8 + + thumb_func_start ov23_02242624 +ov23_02242624: ; 0x02242624 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0224264E + ldr r1, _02242650 ; =0x02257748 + add r0, r4, #1 + ldr r1, [r1, #0] + sub r2, r5, #1 + add r1, #0xfc + bl sub_020C4DB0 + ldr r0, _02242650 ; =0x02257748 + sub r2, r5, #1 + ldr r1, [r0, #0] + mov r0, #0x52 + lsl r0, r0, #2 + strb r2, [r1, r0] +_0224264E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242650: .word 0x02257748 + thumb_func_end ov23_02242624 + + thumb_func_start ov23_02242654 +ov23_02242654: ; 0x02242654 + push {r3, r4, r5, lr} + sub sp, #0x28 + add r4, r2, #0 + add r5, r1, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _022426EE + ldr r1, _022426F4 ; =0x02257748 + add r0, r4, #1 + ldr r2, [r1, #0] + mov r1, #0x41 + lsl r1, r1, #2 + add r1, r2, r1 + sub r2, r5, #1 + bl sub_020C4DB0 + ldr r2, _022426F4 ; =0x02257748 + ldr r0, _022426F8 ; =0x00000149 + ldr r1, [r2, #0] + sub r3, r5, #1 + strb r3, [r1, r0] + ldr r2, [r2, #0] + ldr r1, _022426FC ; =ov23_02241D04 + add r0, sp, #0x1c + add r2, #0x1c + bl ov23_02242540 + ldr r1, _022426F4 ; =0x02257748 + ldr r2, _02242700 ; =0x0000014A + ldr r3, [r1, #0] + strb r0, [r3, r2] + ldr r3, [r1, #0] + ldrb r0, [r3, r2] + sub r0, r0, #1 + strb r0, [r3, r2] + ldr r3, [r1, #0] + add r1, r2, #0 + add r0, sp, #0x1c + sub r1, #0x3e + ldrb r2, [r3, r2] + add r0, #1 + add r1, r3, r1 + bl sub_020C4DB0 + ldr r0, _022426F4 ; =0x02257748 + ldr r3, [r0, #0] + ldrh r0, [r3, #0x1a] + str r0, [sp] + add r0, r3, #0 + add r0, #0xfc + str r0, [sp, #4] + mov r0, #0x52 + lsl r0, r0, #2 + ldrb r1, [r3, r0] + str r1, [sp, #8] + add r1, r0, #0 + sub r1, #0x44 + add r1, r3, r1 + str r1, [sp, #0xc] + add r1, r0, #1 + ldrb r1, [r3, r1] + str r1, [sp, #0x10] + add r1, r0, #0 + sub r1, #0x3c + add r1, r3, r1 + str r1, [sp, #0x14] + add r0, r0, #2 + ldrb r0, [r3, r0] + str r0, [sp, #0x18] + ldr r0, [r3, #0xc] + ldrh r1, [r3, #0x1c] + ldrh r2, [r3, #0x1e] + ldrh r3, [r3, #0x18] + bl ov23_022489F8 +_022426EE: + add sp, #0x28 + pop {r3, r4, r5, pc} + nop +_022426F4: .word 0x02257748 +_022426F8: .word 0x00000149 +_022426FC: .word ov23_02241D04 +_02242700: .word 0x0000014A + thumb_func_end ov23_02242654 + + thumb_func_start ov23_02242704 +ov23_02242704: ; 0x02242704 + cmp r0, #0 + bne _0224270E + mov r0, #0xe1 + lsl r0, r0, #0xc + bx lr +_0224270E: + ldrh r1, [r0, #2] + ldrh r2, [r0] + mov r0, #0xf + lsl r0, r0, #6 + mul r0, r1 + add r0, r2, r0 + bx lr + thumb_func_end ov23_02242704 + + thumb_func_start ov23_0224271C +ov23_0224271C: ; 0x0224271C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r1, _02242784 ; =0x02257748 + mov r4, #0 + ldr r2, [r1, #0] + mov r1, #0x4b + lsl r1, r1, #2 + ldr r1, [r2, r1] + sub r5, r1, #1 + bl ov23_02242704 + str r0, [sp] + ldr r0, _02242784 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x45 + lsl r0, r0, #2 + ldr r7, [r1, r0] + cmp r5, #0 + ble _02242764 +_02242742: + add r1, r4, r5 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r6, r0, #1 + add r0, sp, #4 + add r1, r6, #0 + blx r7 + bl ov23_02242704 + ldr r1, [sp] + cmp r0, r1 + bge _0224275E + add r4, r6, #1 + b _02242760 +_0224275E: + add r5, r6, #0 +_02242760: + cmp r4, r5 + blt _02242742 +_02242764: + add r0, sp, #4 + add r1, r4, #0 + blx r7 + bl ov23_02242704 + ldr r1, [sp] + cmp r1, r0 + bne _0224277A + add sp, #8 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224277A: + mov r0, #0 + mvn r0, r0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02242784: .word 0x02257748 + thumb_func_end ov23_0224271C + + thumb_func_start ov23_02242788 +ov23_02242788: ; 0x02242788 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r1, _022427D8 ; =0x02257748 + mov r4, #0 + ldr r2, [r1, #0] + mov r1, #0x4b + lsl r1, r1, #2 + ldr r1, [r2, r1] + sub r5, r1, #2 + bl ov23_02242704 + str r0, [sp] + ldr r0, _022427D8 ; =0x02257748 + add r5, r5, #1 + ldr r1, [r0, #0] + mov r0, #0x45 + lsl r0, r0, #2 + ldr r7, [r1, r0] + cmp r5, #0 + ble _022427D2 +_022427B0: + add r1, r4, r5 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r6, r0, #1 + add r0, sp, #4 + add r1, r6, #0 + blx r7 + bl ov23_02242704 + ldr r1, [sp] + cmp r0, r1 + bge _022427CC + add r4, r6, #1 + b _022427CE +_022427CC: + add r5, r6, #0 +_022427CE: + cmp r4, r5 + blt _022427B0 +_022427D2: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022427D8: .word 0x02257748 + thumb_func_end ov23_02242788 + + thumb_func_start ov23_022427DC +ov23_022427DC: ; 0x022427DC + push {r3, r4} + ldr r3, _022427F4 ; =0x02257748 + mov r2, #0x45 + ldr r4, [r3, #0] + lsl r2, r2, #2 + str r1, [r4, r2] + ldr r1, [r3, #0] + add r2, #0x18 + str r0, [r1, r2] + pop {r3, r4} + bx lr + nop +_022427F4: .word 0x02257748 + thumb_func_end ov23_022427DC + + thumb_func_start ov23_022427F8 +ov23_022427F8: ; 0x022427F8 + push {r3, lr} + bl sub_0203608C + bl sub_020593CC + cmp r0, #0 + bne _02242810 + mov r0, #0x1b + bl sub_020360DC + bl sub_0203572C +_02242810: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_022427F8 + + thumb_func_start ov23_02242814 +ov23_02242814: ; 0x02242814 + ldr r0, _02242828 ; =0x02257748 + ldr r2, [r0, #0] + ldr r0, _0224282C ; =0x00000146 + ldrb r1, [r2, r0] + cmp r1, #0 + beq _02242824 + sub r1, r1, #1 + strb r1, [r2, r0] +_02242824: + bx lr + nop +_02242828: .word 0x02257748 +_0224282C: .word 0x00000146 + thumb_func_end ov23_02242814 + + thumb_func_start ov23_02242830 +ov23_02242830: ; 0x02242830 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _022428CC ; =0x02257748 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r4, r0, #0 + ldr r0, _022428CC ; =0x02257748 + ldr r2, [r0, #0] + ldr r0, _022428D0 ; =0x00000146 + ldrb r1, [r2, r0] + cmp r1, #0 + beq _02242858 + sub r0, #0x12 + ldrb r0, [r2, r0] + cmp r0, #0 + bne _022428C6 +_02242858: + bl sub_0203608C + bl sub_020593CC + cmp r0, #0 + bne _022428C6 + add r0, r4, #0 + bl sub_02028E28 + cmp r0, #0x28 + bne _02242876 + mov r0, #0x10 + orr r0, r5 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 +_02242876: + bl sub_0203608C + bl sub_02058D88 + add r4, r0, #0 + bl sub_0203608C + bl sub_02058DC0 + add r6, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov23_02241D04 + cmp r0, #0 + beq _0224289E + mov r0, #0x20 + orr r0, r5 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 +_0224289E: + mov r0, #0xf + add r2, r6, #0 + and r2, r0 + lsl r0, r4, #0x1c + add r1, sp, #0 + lsr r0, r0, #0x18 + strb r5, [r1] + add r0, r2, r0 + strb r0, [r1, #1] + mov r0, #0x1c + add r1, sp, #0 + bl sub_020360D0 + bl sub_0203572C + ldr r0, _022428CC ; =0x02257748 + mov r2, #8 + ldr r1, [r0, #0] + ldr r0, _022428D0 ; =0x00000146 + strb r2, [r1, r0] +_022428C6: + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_022428CC: .word 0x02257748 +_022428D0: .word 0x00000146 + thumb_func_end ov23_02242830 + + thumb_func_start ov23_022428D4 +ov23_022428D4: ; 0x022428D4 + mov r0, #2 + bx lr + thumb_func_end ov23_022428D4 + + thumb_func_start ov23_022428D8 +ov23_022428D8: ; 0x022428D8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r1, sp, #0 + add r6, r2, #0 + strb r5, [r1] + bl sub_02058EE0 + add r1, sp, #0 + strh r0, [r1, #2] + add r0, r5, #0 + bl sub_02058F18 + add r1, sp, #0 + strh r0, [r1, #4] + add r0, r5, #0 + bl sub_02058DF8 + ldr r1, _02242B10 ; =0x0000FFFF + cmp r0, r1 + bne _0224290E + add r0, r5, #0 + bl sub_02058E4C + ldr r1, _02242B10 ; =0x0000FFFF + cmp r0, r1 + beq _022429C2 +_0224290E: + add r0, r5, #0 + bl sub_02059094 + cmp r0, #0 + beq _022429C2 + add r0, r5, #0 + bl ov23_0224ACC0 + cmp r0, #0 + bne _022429C2 + add r1, sp, #0 + ldrh r0, [r1, #2] + ldrh r1, [r1, #4] + bl sub_0205900C + add r4, r0, #0 + cmp r4, #0xff + bne _02242934 + b _02242A3A +_02242934: + bl ov23_0224C1C8 + cmp r0, #0 + bne _022429C2 + add r0, r4, #0 + bl ov23_0224162C + cmp r0, #0 + beq _02242968 + mov r1, #4 + add r0, sp, #0 + strb r1, [r0, #6] + strb r4, [r0, #8] + add r1, sp, #4 + strb r5, [r0, #7] + mov r0, #0x1e + add r1, #2 + mov r2, #3 + bl sub_02035AC4 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242968: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov23_0224A658 + cmp r0, #0 + bne _022429C2 + add r0, r4, #0 + bl ov23_0224ACC0 + cmp r0, #0 + beq _022429B8 + add r0, r4, #0 + bl ov23_02244470 + cmp r0, #0 + bne _02242996 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02245560 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242996: + mov r1, #2 + add r0, sp, #0 + strb r1, [r0, #6] + strb r4, [r0, #8] + add r1, sp, #4 + strb r5, [r0, #7] + mov r0, #0x1e + add r1, #2 + mov r2, #3 + bl sub_02035AC4 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_022429B8: + add r0, r5, #0 + bl sub_02059094 + cmp r0, #0 + bne _022429C4 +_022429C2: + b _02242B0C +_022429C4: + add r0, r4, #0 + bl sub_02059094 + cmp r0, #0 + beq _022429D8 + add r0, r4, #0 + bl sub_020593E0 + cmp r0, #0 + beq _022429FA +_022429D8: + mov r1, #2 + add r0, sp, #0 + strb r1, [r0, #6] + strb r4, [r0, #8] + add r1, sp, #4 + strb r5, [r0, #7] + mov r0, #0x1e + add r1, #2 + mov r2, #3 + bl sub_02035AC4 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_022429FA: + mov r1, #1 + add r0, sp, #0 + strb r1, [r0, #6] + strb r4, [r0, #8] + strb r5, [r0, #7] + add r0, r4, #0 + bl sub_02059094 + cmp r0, #0 + beq _02242B0C + add r1, sp, #4 + mov r0, #0x1e + add r1, #2 + mov r2, #3 + bl sub_02035AC4 + cmp r0, #0 + beq _02242B0C + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add r0, r4, #0 + mov r1, #0 + bl sub_02059058 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02058FB0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242A3A: + ldrb r2, [r6] + add r1, sp, #0 + add r0, r5, #0 + add r1, #2 + bl ov23_02244080 + cmp r0, #0 + beq _02242A56 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242A56: + add r1, sp, #0 + add r0, r5, #0 + add r1, #2 + bl ov23_0223E354 + cmp r0, #0 + beq _02242A70 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242A70: + add r1, sp, #0 + add r0, r5, #0 + add r1, #2 + bl ov23_02251324 + cmp r0, #0 + beq _02242A8A + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242A8A: + add r1, sp, #0 + add r0, r5, #0 + add r1, #2 + bl ov23_0224D454 + cmp r0, #0 + beq _02242AA4 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242AA4: + add r1, sp, #0 + ldrh r0, [r1, #2] + ldrh r1, [r1, #4] + bl sub_02058108 + cmp r0, #0 + beq _02242AD4 + add r0, r5, #0 + mov r1, #0xff + mov r2, #0 + bl ov23_0224A658 + cmp r0, #0 + bne _02242B0C + mov r0, #0x18 + add r1, sp, #0 + bl sub_02035B48 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02242AD4: + ldrb r1, [r6] + mov r0, #0x20 + tst r0, r1 + beq _02242B0C + add r0, r5, #0 + bl ov23_0224A6B8 + cmp r0, #0 + bne _02242B0C + add r2, sp, #0 + ldrh r3, [r2, #4] + mov r1, #0xf + ldrb r0, [r6, #1] + and r3, r1 + ldrh r1, [r2, #2] + lsl r1, r1, #0x1c + lsr r1, r1, #0x18 + add r1, r3, r1 + cmp r0, r1 + bne _02242B0C + mov r0, #0x3f + add r1, sp, #0 + bl sub_02035B48 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 +_02242B0C: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02242B10: .word 0x0000FFFF + thumb_func_end ov23_022428D8 + + thumb_func_start ov23_02242B14 +ov23_02242B14: ; 0x02242B14 + push {r3, r4, r5, r6, r7, lr} + bl sub_0203608C + cmp r0, #0 + bne _02242B6C + mov r5, #0 + ldr r4, _02242BB0 ; =0x02257748 + add r7, r5, #0 + mov r6, #1 +_02242B26: + add r0, r5, #0 + bl sub_02032EE8 + cmp r0, #0 + beq _02242B42 + ldr r0, [r4, #0] + add r1, r0, r5 + ldr r0, _02242BB4 ; =0x00000135 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02242B42 + add r0, r5, #0 + bl ov23_0224B5CC +_02242B42: + add r0, r5, #0 + bl sub_02032EE8 + cmp r0, #0 + ldr r0, [r4, #0] + beq _02242B56 + add r1, r0, r5 + ldr r0, _02242BB4 ; =0x00000135 + strb r6, [r1, r0] + b _02242B5C +_02242B56: + add r1, r0, r5 + ldr r0, _02242BB4 ; =0x00000135 + strb r7, [r1, r0] +_02242B5C: + add r5, r5, #1 + cmp r5, #8 + blt _02242B26 + bl ov23_022433D0 + add r0, r0, #2 + bl sub_02037B58 +_02242B6C: + ldr r0, _02242BB0 ; =0x02257748 + ldr r2, [r0, #0] + ldr r0, _02242BB8 ; =0x00000145 + ldrb r1, [r2, r0] + add r1, r1, #1 + strb r1, [r2, r0] + bl sub_0203608C + cmp r0, #0 + bne _02242B8E + bl sub_02032CE8 + cmp r0, #0 + beq _02242B8E + mov r0, #1 + bl sub_02057AE4 +_02242B8E: + bl ov23_02241810 + bl ov23_02243AE8 + bl ov23_0223E878 + ldr r0, _02242BB0 ; =0x02257748 + ldr r1, [r0, #0] + ldr r0, _02242BBC ; =0x0000014B + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02242BAE + ldr r0, [r1, #0xc] + ldr r0, [r0, #8] + bl ov23_022468A8 +_02242BAE: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242BB0: .word 0x02257748 +_02242BB4: .word 0x00000135 +_02242BB8: .word 0x00000145 +_02242BBC: .word 0x0000014B + thumb_func_end ov23_02242B14 + + thumb_func_start ov23_02242BC0 +ov23_02242BC0: ; 0x02242BC0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _02242C74 ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02242C70 + mov r1, #0x15 + mov r0, #0xf + lsl r1, r1, #4 + bl sub_02018144 + add r1, r5, #0 + bl ov23_02241F74 + bl sub_02057C84 + add r1, r0, #0 + mov r0, #0xf + bl sub_02018144 + add r1, r5, #0 + mov r2, #1 + bl sub_02057524 + bl ov23_02243858 + add r1, r0, #0 + mov r0, #0xf + bl sub_02018144 + add r1, r5, #0 + bl ov23_022434BC + bl ov23_0224B5C4 + add r1, r0, #0 + mov r0, #0xf + bl sub_02018144 + add r1, r5, #0 + bl ov23_0224B144 + bl ov23_022417C4 + add r1, r0, #0 + mov r0, #0xf + bl sub_02018144 + add r1, r5, #0 + bl ov23_022416E0 + bl ov23_0223E2E8 + add r1, r0, #0 + mov r0, #0xf + bl sub_02018144 + add r1, r5, #0 + bl ov23_0223E1E4 + bl ov23_02253608 + add r1, r0, #0 + mov r0, #0xf + bl sub_02018144 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0203D174 + bl sub_020298A0 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203D174 + add r2, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov23_02253598 + add r0, r5, #0 + bl sub_0203D174 + bl sub_020298B0 + bl ov23_0224F588 +_02242C70: + pop {r4, r5, r6, pc} + nop +_02242C74: .word 0x02257748 + thumb_func_end ov23_02242BC0 + + thumb_func_start ov23_02242C78 +ov23_02242C78: ; 0x02242C78 + push {r3, lr} + ldr r0, _02242CAC ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242CA8 + bl ov23_022535EC + bl ov23_022417CC + bl ov23_0224B430 + bl ov23_02243520 + bl sub_0205764C + bl ov23_0223E2F0 + bl ov23_022421EC + ldr r0, _02242CAC ; =0x02257748 + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _02242CB0 ; =0x0000014B + strb r2, [r1, r0] +_02242CA8: + pop {r3, pc} + nop +_02242CAC: .word 0x02257748 +_02242CB0: .word 0x0000014B + thumb_func_end ov23_02242C78 + + thumb_func_start ov23_02242CB4 +ov23_02242CB4: ; 0x02242CB4 + push {r3, lr} + sub sp, #8 + ldr r0, _02242CFC ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242CF8 + bl sub_020576A0 + bl ov23_02253604 + bl ov23_022417E0 + bl ov23_0224B460 + bl ov23_022435A8 + bl ov23_0223E2F4 + ldr r1, _02242CFC ; =0x02257748 + ldr r0, _02242D00 ; =0x0000014B + ldr r2, [r1, #0] + mov r3, #0 + strb r3, [r2, r0] + str r3, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r1, #0] + ldr r2, _02242D04 ; =0x000003E2 + ldr r0, [r0, #0xc] + mov r1, #3 + ldr r0, [r0, #8] + mov r3, #0xa + bl sub_0200DD0C +_02242CF8: + add sp, #8 + pop {r3, pc} + ; .align 2, 0 +_02242CFC: .word 0x02257748 +_02242D00: .word 0x0000014B +_02242D04: .word 0x000003E2 + thumb_func_end ov23_02242CB4 + + thumb_func_start ov23_02242D08 +ov23_02242D08: ; 0x02242D08 + push {r3, lr} + ldr r0, _02242D40 ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242D3C + ldr r0, [r0, #0xc] + ldr r0, [r0, #0xc] + bl sub_020287F8 + bl ov23_0224B4E4 + bl ov23_022435DC + mov r0, #1 + bl sub_020576CC + bl ov23_022417F4 + bl ov23_0223E2F8 + bl ov23_0224F5B8 + bl ov23_022535CC + bl ov23_02242108 +_02242D3C: + pop {r3, pc} + nop +_02242D40: .word 0x02257748 + thumb_func_end ov23_02242D08 + + thumb_func_start ov23_02242D44 +ov23_02242D44: ; 0x02242D44 + push {r3, lr} + ldr r1, _02242D5C ; =0x02257748 + ldr r1, [r1, #0] + cmp r1, #0 + beq _02242D5A + bl ov23_02243670 + bl sub_02057764 + bl ov23_0224B518 +_02242D5A: + pop {r3, pc} + ; .align 2, 0 +_02242D5C: .word 0x02257748 + thumb_func_end ov23_02242D44 + + thumb_func_start ov23_02242D60 +ov23_02242D60: ; 0x02242D60 + push {r4, lr} + ldr r1, _02242E0C ; =0x02257748 + add r4, r0, #0 + ldr r3, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + ldrb r2, [r3, r1] + cmp r2, #0 + beq _02242D78 + mov r0, #0 + strb r0, [r3, r1] + pop {r4, pc} +_02242D78: + bl ov23_02242308 + cmp r0, #0 + beq _02242D8E + ldr r1, _02242E0C ; =0x02257748 + mov r0, #1 + ldr r2, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + strb r0, [r2, r1] + pop {r4, pc} +_02242D8E: + add r0, r4, #0 + bl ov23_022446B0 + cmp r0, #0 + beq _02242DA6 + ldr r1, _02242E0C ; =0x02257748 + mov r0, #1 + ldr r2, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + strb r0, [r2, r1] + pop {r4, pc} +_02242DA6: + add r0, r4, #0 + bl ov23_02244784 + cmp r0, #0 + beq _02242DBE + ldr r1, _02242E0C ; =0x02257748 + mov r0, #1 + ldr r2, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + strb r0, [r2, r1] + pop {r4, pc} +_02242DBE: + add r0, r4, #0 + bl ov23_0224D020 + cmp r0, #0 + beq _02242DD6 + ldr r1, _02242E0C ; =0x02257748 + mov r0, #1 + ldr r2, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + strb r0, [r2, r1] + pop {r4, pc} +_02242DD6: + add r0, r4, #0 + bl ov23_022415B8 + cmp r0, #0 + beq _02242DEE + ldr r1, _02242E0C ; =0x02257748 + mov r0, #1 + ldr r2, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + strb r0, [r2, r1] + pop {r4, pc} +_02242DEE: + add r0, r4, #0 + bl ov23_02241D58 + cmp r0, #0 + beq _02242E06 + ldr r1, _02242E0C ; =0x02257748 + mov r0, #1 + ldr r2, [r1, #0] + mov r1, #0x53 + lsl r1, r1, #2 + strb r0, [r2, r1] + pop {r4, pc} +_02242E06: + mov r0, #0 + pop {r4, pc} + nop +_02242E0C: .word 0x02257748 + thumb_func_end ov23_02242D60 + + thumb_func_start ov23_02242E10 +ov23_02242E10: ; 0x02242E10 + push {r3, lr} + ldr r1, _02242E24 ; =0x02257748 + ldr r1, [r1, #0] + cmp r1, #0 + beq _02242E20 + bl ov23_0224D130 + pop {r3, pc} +_02242E20: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02242E24: .word 0x02257748 + thumb_func_end ov23_02242E10 + + thumb_func_start ov23_02242E28 +ov23_02242E28: ; 0x02242E28 + push {r3, lr} + ldr r0, _02242E3C ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242E38 + bl ov23_0224D150 + pop {r3, pc} +_02242E38: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02242E3C: .word 0x02257748 + thumb_func_end ov23_02242E28 + + thumb_func_start ov23_02242E40 +ov23_02242E40: ; 0x02242E40 + push {r3, lr} + ldr r0, _02242E54 ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02242E50 + bl ov23_0224D178 + pop {r3, pc} +_02242E50: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02242E54: .word 0x02257748 + thumb_func_end ov23_02242E40 + + thumb_func_start ov23_02242E58 +ov23_02242E58: ; 0x02242E58 + cmp r0, #0x20 + ble _02242E6E + cmp r1, #0x40 + ble _02242E6E + ldr r2, _02242E74 ; =0x000001DF + cmp r0, r2 + bge _02242E6E + cmp r1, r2 + bge _02242E6E + mov r0, #0 + bx lr +_02242E6E: + mov r0, #1 + bx lr + nop +_02242E74: .word 0x000001DF + thumb_func_end ov23_02242E58 + + thumb_func_start ov23_02242E78 +ov23_02242E78: ; 0x02242E78 + push {r3, lr} + ldr r1, _02242ED8 ; =0x02257748 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02242ED2 + cmp r0, #0x10 + bge _02242EC4 + ldr r1, _02242EDC ; =0x00000147 + ldrb r1, [r2, r1] + cmp r1, #4 + bhi _02242ED2 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242E9A: ; jump table + .short _02242EA4 - _02242E9A - 2 ; case 0 + .short _02242EA8 - _02242E9A - 2 ; case 1 + .short _02242EB2 - _02242E9A - 2 ; case 2 + .short _02242EBE - _02242E9A - 2 ; case 3 + .short _02242EB8 - _02242E9A - 2 ; case 4 +_02242EA4: + mov r0, #0 + pop {r3, pc} +_02242EA8: + cmp r0, #8 + bge _02242EB2 + bl ov23_0224121C + pop {r3, pc} +_02242EB2: + bl ov23_02241F0C + pop {r3, pc} +_02242EB8: + bl ov23_02245698 + pop {r3, pc} +_02242EBE: + bl ov23_0224125C + pop {r3, pc} +_02242EC4: + ldr r0, [r2, #0xc] + ldr r0, [r0, #0xc] + bl sub_02029894 + bl sub_02029874 + pop {r3, pc} +_02242ED2: + mov r0, #0 + pop {r3, pc} + nop +_02242ED8: .word 0x02257748 +_02242EDC: .word 0x00000147 + thumb_func_end ov23_02242E78 + + thumb_func_start ov23_02242EE0 +ov23_02242EE0: ; 0x02242EE0 + push {r3, lr} + ldr r1, _02242F40 ; =0x02257748 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02242F3A + cmp r0, #0x10 + bge _02242F2C + ldr r1, _02242F44 ; =0x00000147 + ldrb r1, [r2, r1] + cmp r1, #4 + bhi _02242F3A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242F02: ; jump table + .short _02242F0C - _02242F02 - 2 ; case 0 + .short _02242F10 - _02242F02 - 2 ; case 1 + .short _02242F1A - _02242F02 - 2 ; case 2 + .short _02242F26 - _02242F02 - 2 ; case 3 + .short _02242F20 - _02242F02 - 2 ; case 4 +_02242F0C: + mov r0, #0 + pop {r3, pc} +_02242F10: + cmp r0, #8 + bge _02242F1A + bl ov23_0224123C + pop {r3, pc} +_02242F1A: + bl ov23_02241F40 + pop {r3, pc} +_02242F20: + bl ov23_022456CC + pop {r3, pc} +_02242F26: + bl ov23_02241294 + pop {r3, pc} +_02242F2C: + ldr r0, [r2, #0xc] + ldr r0, [r0, #0xc] + bl sub_02029894 + bl sub_0202987C + pop {r3, pc} +_02242F3A: + mov r0, #0 + pop {r3, pc} + nop +_02242F40: .word 0x02257748 +_02242F44: .word 0x00000147 + thumb_func_end ov23_02242EE0 + + thumb_func_start ov23_02242F48 +ov23_02242F48: ; 0x02242F48 + push {r3, lr} + ldr r1, _02242FA0 ; =0x02257748 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02242F9C + cmp r0, #0x10 + bge _02242F88 + ldr r1, _02242FA4 ; =0x00000147 + ldrb r1, [r2, r1] + cmp r1, #4 + bhi _02242F9C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242F6A: ; jump table + .short _02242F9C - _02242F6A - 2 ; case 0 + .short _02242F74 - _02242F6A - 2 ; case 1 + .short _02242F7C - _02242F6A - 2 ; case 2 + .short _02242F84 - _02242F6A - 2 ; case 3 + .short _02242F80 - _02242F6A - 2 ; case 4 +_02242F74: + cmp r0, #8 + bge _02242F7C + mov r0, #0xc + pop {r3, pc} +_02242F7C: + mov r0, #9 + pop {r3, pc} +_02242F80: + mov r0, #0xb + pop {r3, pc} +_02242F84: + mov r0, #0xc + pop {r3, pc} +_02242F88: + ldr r0, [r2, #0xc] + ldr r0, [r0, #0xc] + bl sub_02029894 + bl sub_0202988C + cmp r0, #0 + beq _02242F9C + mov r0, #3 + pop {r3, pc} +_02242F9C: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02242FA0: .word 0x02257748 +_02242FA4: .word 0x00000147 + thumb_func_end ov23_02242F48 + + thumb_func_start ov23_02242FA8 +ov23_02242FA8: ; 0x02242FA8 + ldr r0, _02242FB4 ; =0x02257748 + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _02242FB8 ; =0x00000147 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_02242FB4: .word 0x02257748 +_02242FB8: .word 0x00000147 + thumb_func_end ov23_02242FA8 + + thumb_func_start ov23_02242FBC +ov23_02242FBC: ; 0x02242FBC + ldr r0, _02242FC8 ; =0x02257748 + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _02242FCC ; =0x00000147 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_02242FC8: .word 0x02257748 +_02242FCC: .word 0x00000147 + thumb_func_end ov23_02242FBC + + thumb_func_start ov23_02242FD0 +ov23_02242FD0: ; 0x02242FD0 + ldr r0, _02242FDC ; =0x02257748 + mov r2, #2 + ldr r1, [r0, #0] + ldr r0, _02242FE0 ; =0x00000147 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_02242FDC: .word 0x02257748 +_02242FE0: .word 0x00000147 + thumb_func_end ov23_02242FD0 + + thumb_func_start ov23_02242FE4 +ov23_02242FE4: ; 0x02242FE4 + ldr r0, _02242FF0 ; =0x02257748 + mov r2, #4 + ldr r1, [r0, #0] + ldr r0, _02242FF4 ; =0x00000147 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_02242FF0: .word 0x02257748 +_02242FF4: .word 0x00000147 + thumb_func_end ov23_02242FE4 + + thumb_func_start ov23_02242FF8 +ov23_02242FF8: ; 0x02242FF8 + ldr r0, _02243004 ; =0x02257748 + mov r2, #3 + ldr r1, [r0, #0] + ldr r0, _02243008 ; =0x00000147 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_02243004: .word 0x02257748 +_02243008: .word 0x00000147 + thumb_func_end ov23_02242FF8 + + thumb_func_start ov23_0224300C +ov23_0224300C: ; 0x0224300C + ldr r2, _0224301C ; =0x02257748 + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224301A + add r0, r2, r0 + add r0, #0xc2 + strb r1, [r0] +_0224301A: + bx lr + ; .align 2, 0 +_0224301C: .word 0x02257748 + thumb_func_end ov23_0224300C + + thumb_func_start ov23_02243020 +ov23_02243020: ; 0x02243020 + ldr r1, _02243034 ; =0x02257748 + ldr r2, [r1, #0] + cmp r2, #0 + beq _02243030 + add r0, r2, r0 + mov r1, #1 + add r0, #0xd2 + strb r1, [r0] +_02243030: + bx lr + nop +_02243034: .word 0x02257748 + thumb_func_end ov23_02243020 + + thumb_func_start ov23_02243038 +ov23_02243038: ; 0x02243038 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _022430B4 ; =0x02257748 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022430B2 + lsl r4, r5, #2 + add r0, r0, r4 + add r0, #0xdc + ldr r0, [r0, #0] + cmp r0, #0 + bne _022430B2 + mov r0, #0x64 + mov r1, #0xf + bl sub_02023790 + ldr r1, _022430B4 ; =0x02257748 + ldr r1, [r1, #0] + add r1, r1, r4 + add r1, #0xdc + str r0, [r1, #0] + mov r0, #0xb + bl sub_0200B358 + add r6, r0, #0 + mov r0, #0x64 + mov r1, #0xb + bl sub_02023790 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02032EE8 + add r2, r0, #0 + add r0, r6, #0 + mov r1, #0 + bl sub_0200B498 + bl ov23_0224219C + bl ov23_02253E3C + mov r1, #0x73 + add r2, r7, #0 + bl sub_0200B1B8 + ldr r1, _022430B4 ; =0x02257748 + add r0, r6, #0 + ldr r1, [r1, #0] + add r2, r7, #0 + add r1, r1, r4 + add r1, #0xdc + ldr r1, [r1, #0] + bl sub_0200C388 + add r0, r7, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 +_022430B2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022430B4: .word 0x02257748 + thumb_func_end ov23_02243038 + + thumb_func_start ov23_022430B8 +ov23_022430B8: ; 0x022430B8 + ldr r1, _022430C8 ; =0x02257748 + mov r2, #1 + ldr r1, [r1, #0] + add r1, r1, r0 + ldr r0, _022430CC ; =0x0000013D + strb r2, [r1, r0] + bx lr + nop +_022430C8: .word 0x02257748 +_022430CC: .word 0x0000013D + thumb_func_end ov23_022430B8 + + thumb_func_start ov23_022430D0 +ov23_022430D0: ; 0x022430D0 + ldr r1, _022430DC ; =0x02257748 + ldr r1, [r1, #0] + add r1, #0xc0 + strh r0, [r1] + bx lr + nop +_022430DC: .word 0x02257748 + thumb_func_end ov23_022430D0 + + thumb_func_start ov23_022430E0 +ov23_022430E0: ; 0x022430E0 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + ldr r1, _02243150 ; =0x02257748 + add r5, r2, #0 + ldr r3, [r1, #0] + add r1, r3, #0 + add r1, #0xc0 + ldrh r4, [r1] + cmp r4, #0 + beq _0224314E + mov r1, #0 + add r2, r3, #0 +_022430F8: + ldrh r6, [r2, #0x20] + cmp r4, r6 + bne _02243114 + ldrh r6, [r2, #0x22] + cmp r0, r6 + bne _02243114 + lsl r1, r1, #3 + add r0, r3, r1 + strh r7, [r0, #0x24] + ldr r0, _02243150 ; =0x02257748 + ldr r0, [r0, #0] + add r0, r0, r1 + strh r5, [r0, #0x26] + pop {r3, r4, r5, r6, r7, pc} +_02243114: + add r1, r1, #1 + add r2, #8 + cmp r1, #0x14 + blt _022430F8 + mov r6, #0 + add r2, r3, #0 +_02243120: + ldrh r1, [r2, #0x20] + cmp r1, #0 + bne _02243142 + lsl r1, r6, #3 + add r2, r3, r1 + strh r4, [r2, #0x20] + ldr r2, _02243150 ; =0x02257748 + ldr r3, [r2, #0] + add r3, r3, r1 + strh r0, [r3, #0x22] + ldr r0, [r2, #0] + add r0, r0, r1 + strh r7, [r0, #0x24] + ldr r0, [r2, #0] + add r0, r0, r1 + strh r5, [r0, #0x26] + pop {r3, r4, r5, r6, r7, pc} +_02243142: + add r6, r6, #1 + add r2, #8 + cmp r6, #0x14 + blt _02243120 + bl sub_02022974 +_0224314E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243150: .word 0x02257748 + thumb_func_end ov23_022430E0 + + thumb_func_start ov23_02243154 +ov23_02243154: ; 0x02243154 + push {r4, r5} + ldr r1, _02243188 ; =0x02257748 + mov r3, #0 + ldr r1, [r1, #0] + add r2, r1, #0 + add r2, #0xc0 + ldrh r5, [r2] + add r4, r1, #0 +_02243164: + ldrh r2, [r4, #0x20] + cmp r5, r2 + bne _0224317A + ldrh r2, [r4, #0x22] + cmp r0, r2 + bne _0224317A + lsl r0, r3, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x26] + pop {r4, r5} + bx lr +_0224317A: + add r3, r3, #1 + add r4, #8 + cmp r3, #0x14 + blt _02243164 + mov r0, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_02243188: .word 0x02257748 + thumb_func_end ov23_02243154 + + thumb_func_start ov23_0224318C +ov23_0224318C: ; 0x0224318C + push {r4, r5} + ldr r1, _022431C0 ; =0x02257748 + mov r3, #0 + ldr r1, [r1, #0] + add r2, r1, #0 + add r2, #0xc0 + ldrh r5, [r2] + add r4, r1, #0 +_0224319C: + ldrh r2, [r4, #0x20] + cmp r5, r2 + bne _022431B2 + ldrh r2, [r4, #0x22] + cmp r0, r2 + bne _022431B2 + lsl r0, r3, #3 + add r0, r1, r0 + ldrh r0, [r0, #0x24] + pop {r4, r5} + bx lr +_022431B2: + add r3, r3, #1 + add r4, #8 + cmp r3, #0x14 + blt _0224319C + mov r0, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_022431C0: .word 0x02257748 + thumb_func_end ov23_0224318C + + thumb_func_start ov23_022431C4 +ov23_022431C4: ; 0x022431C4 + push {r4, lr} + ldrb r4, [r2] + bl sub_0203608C + cmp r4, r0 + bne _022431E4 + ldr r0, _022431E8 ; =0x02257748 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl ov23_022534A0 + mov r0, #0x19 + bl sub_020360DC + bl sub_020594FC +_022431E4: + pop {r4, pc} + nop +_022431E8: .word 0x02257748 + thumb_func_end ov23_022431C4 + + thumb_func_start ov23_022431EC +ov23_022431EC: ; 0x022431EC + push {r3, r4} + ldr r3, _02243200 ; =0x02257748 + ldr r4, [r3, #0] + str r0, [r4, #0] + ldr r0, [r3, #0] + str r1, [r0, #4] + ldr r0, [r3, #0] + str r2, [r0, #8] + pop {r3, r4} + bx lr + ; .align 2, 0 +_02243200: .word 0x02257748 + thumb_func_end ov23_022431EC + + thumb_func_start ov23_02243204 +ov23_02243204: ; 0x02243204 + ldr r0, _02243218 ; =0x02257748 + mov r2, #0 + ldr r1, [r0, #0] + str r2, [r1, #0] + ldr r1, [r0, #0] + str r2, [r1, #4] + ldr r0, [r0, #0] + str r2, [r0, #8] + bx lr + nop +_02243218: .word 0x02257748 + thumb_func_end ov23_02243204 + + thumb_func_start ov23_0224321C +ov23_0224321C: ; 0x0224321C + push {r4, lr} + ldr r0, _02243294 ; =0x02257748 + mov r4, #0 + ldr r2, [r0, #0] + ldr r0, [r2, #4] + cmp r0, #0 + beq _02243236 + ldr r1, [r2, #0] + ldr r2, [r2, #8] + blx r2 + bl ov23_02243204 + mov r4, #1 +_02243236: + bl ov23_022421EC + ldr r0, _02243294 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254044 + ldr r0, _02243294 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254044 + ldr r0, _02243294 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov23_02254044 + ldr r0, _02243294 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254044 + ldr r0, _02243294 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254044 + ldr r0, _02243294 ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254044 + add r0, r4, #0 + pop {r4, pc} + nop +_02243294: .word 0x02257748 + thumb_func_end ov23_0224321C + + thumb_func_start ov23_02243298 +ov23_02243298: ; 0x02243298 + push {r3, r4, r5, lr} + ldr r2, _0224330C ; =0x02257748 + add r4, r0, #0 + ldr r1, [r2, #0] + ldr r3, [r1, #4] + cmp r3, #0 + beq _022432AA + mov r0, #0 + pop {r3, r4, r5, pc} +_022432AA: + ldr r3, [r1, #0xc] + ldr r3, [r3, #0x10] + cmp r3, #0 + beq _022432CC + mov r0, #0x13 + lsl r0, r0, #4 + ldr r3, [r1, r0] + add r3, r3, #1 + str r3, [r1, r0] + ldr r1, [r2, #0] + ldr r0, [r1, r0] + cmp r0, #0x64 + ble _022432C8 + bl sub_02022974 +_022432C8: + mov r0, #0 + pop {r3, r4, r5, pc} +_022432CC: + bl ov23_0224ACC0 + cmp r0, #0 + beq _022432D8 + mov r0, #0 + pop {r3, r4, r5, pc} +_022432D8: + add r0, r4, #0 + bl sub_02058D48 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02058D68 + add r1, r0, #0 + add r0, r5, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _022432FA + cmp r4, #0 + beq _022432FA + mov r0, #0 + pop {r3, r4, r5, pc} +_022432FA: + ldr r0, _0224330C ; =0x02257748 + mov r2, #0 + ldr r1, [r0, #0] + mov r0, #0x13 + lsl r0, r0, #4 + str r2, [r1, r0] + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_0224330C: .word 0x02257748 + thumb_func_end ov23_02243298 + + thumb_func_start ov23_02243310 +ov23_02243310: ; 0x02243310 + push {r3, lr} + ldr r0, _0224335C ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254250 + ldr r0, _0224335C ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254250 + ldr r0, _0224335C ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl ov23_02254250 + ldr r0, _0224335C ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254250 + ldr r0, _0224335C ; =0x02257748 + ldr r1, [r0, #0] + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov23_02254250 + pop {r3, pc} + nop +_0224335C: .word 0x02257748 + thumb_func_end ov23_02243310 + + thumb_func_start ov23_02243360 +ov23_02243360: ; 0x02243360 + push {r3, lr} + sub sp, #8 + bl ov23_0224DB48 + add r1, sp, #0 + strh r0, [r1] + bl ov23_0224DB64 + add r1, sp, #0 + strh r0, [r1, #2] + bl ov23_0224DB84 + add r1, sp, #0 + strb r0, [r1, #4] + bl ov23_02241670 + add r1, sp, #0 + strb r0, [r1, #5] + mov r0, #0x46 + add r1, sp, #0 + bl sub_020360D0 + add sp, #8 + pop {r3, pc} + thumb_func_end ov23_02243360 + + thumb_func_start ov23_02243390 +ov23_02243390: ; 0x02243390 + push {r3, r4, r5, lr} + add r4, r2, #0 + ldrh r1, [r4] + add r5, r0, #0 + bl ov23_0224DBA0 + ldrh r1, [r4, #2] + add r0, r5, #0 + bl ov23_0224DBBC + ldrb r1, [r4, #4] + add r0, r5, #0 + bl ov23_0224DBD8 + ldrb r1, [r4, #5] + add r0, r5, #0 + bl ov23_02241690 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_02243390 + + thumb_func_start ov23_022433B8 +ov23_022433B8: ; 0x022433B8 + mov r0, #6 + bx lr + thumb_func_end ov23_022433B8 + + thumb_func_start ov23_022433BC +ov23_022433BC: ; 0x022433BC + ldr r1, _022433CC ; =0x02257748 + mov r2, #1 + ldr r1, [r1, #0] + add r0, r1, r0 + add r0, #0xca + strb r2, [r0] + bx lr + nop +_022433CC: .word 0x02257748 + thumb_func_end ov23_022433BC + + thumb_func_start ov23_022433D0 +ov23_022433D0: ; 0x022433D0 + ldr r1, _022433F0 ; =0x02257748 + mov r0, #0 + ldr r3, [r1, #0] + add r2, r0, #0 +_022433D8: + add r1, r3, #0 + add r1, #0xca + ldrb r1, [r1] + cmp r1, #0 + beq _022433E4 + add r0, r0, #1 +_022433E4: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #8 + blt _022433D8 + bx lr + nop +_022433F0: .word 0x02257748 + thumb_func_end ov23_022433D0 + + thumb_func_start ov23_022433F4 +ov23_022433F4: ; 0x022433F4 + ldr r1, _02243404 ; =0x02257748 + ldr r3, _02243408 ; =ov23_0224B5CC + ldr r1, [r1, #0] + mov r2, #0 + add r1, r1, r0 + add r1, #0xca + strb r2, [r1] + bx r3 + ; .align 2, 0 +_02243404: .word 0x02257748 +_02243408: .word ov23_0224B5CC + thumb_func_end ov23_022433F4 + .bss + + + .global Unk_ov23_02257748 +Unk_ov23_02257748: ; 0x02257748 + .space 0x4 + diff --git a/asm/ov23_0224340C.s b/asm/ov23_0224340C.s new file mode 100644 index 000000000..4dea42dea --- /dev/null +++ b/asm/ov23_0224340C.s @@ -0,0 +1,11512 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0224340C +ov23_0224340C: ; 0x0224340C + push {r3, r4, r5, r6, r7, lr} + ldr r0, _022434AC ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + bl sub_0203D174 + bl sub_020298B0 + mov r4, #0 + ldr r7, _022434AC ; =0x02257760 + add r6, r0, #0 + add r5, r4, #0 + str r4, [sp] +_02243426: + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029030 + ldr r1, [r7, #4] + add r2, r1, r5 + mov r1, #0xaa + lsl r1, r1, #2 + strb r0, [r2, r1] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202903C + ldr r1, [r7, #4] + add r2, r1, r5 + mov r1, #0xa9 + lsl r1, r1, #2 + strh r0, [r2, r1] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202905C + ldr r1, [r7, #4] + add r2, r1, r5 + ldr r1, _022434B0 ; =0x000002A6 + strh r0, [r2, r1] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202907C + ldr r1, [r7, #4] + add r2, r1, r5 + ldr r1, _022434B4 ; =0x000002A9 + strb r0, [r2, r1] + ldr r1, [r7, #4] + ldr r0, _022434B8 ; =0x00000B46 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224349A + mov r0, #0xaa + add r2, r1, r5 + lsl r0, r0, #2 + ldrb r3, [r2, r0] + cmp r3, #0 + beq _0224349A + ldr r1, _022434B0 ; =0x000002A6 + sub r0, r0, #4 + ldrh r0, [r2, r0] + ldrh r1, [r2, r1] + mov r2, #1 + bl ov23_02244E68 + ldr r2, [r7, #4] + ldr r1, [sp] + add r2, r2, r1 + mov r1, #0xc1 + lsl r1, r1, #2 + str r0, [r2, r1] +_0224349A: + ldr r0, [sp] + add r4, r4, #1 + add r0, r0, #4 + add r5, r5, #6 + str r0, [sp] + cmp r4, #0x10 + blt _02243426 + pop {r3, r4, r5, r6, r7, pc} + nop +_022434AC: .word 0x02257760 +_022434B0: .word 0x000002A6 +_022434B4: .word 0x000002A9 +_022434B8: .word 0x00000B46 + thumb_func_end ov23_0224340C + + thumb_func_start ov23_022434BC +ov23_022434BC: ; 0x022434BC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, _02243514 ; =0x02257760 + ldr r2, [r1, #4] + cmp r2, #0 + bne _02243510 + ldr r2, _02243518 ; =0x00000B48 + str r0, [r1, #4] + mov r1, #0 + bl sub_020C4CF4 + ldr r0, _02243514 ; =0x02257760 + ldr r0, [r0, #4] + str r4, [r0, #0x40] + add r0, r4, #0 + bl sub_0203D174 + bl sub_020298B0 + ldr r2, _02243514 ; =0x02257760 + mov r1, #0xa3 + ldr r3, [r2, #4] + mov r0, #0 + lsl r1, r1, #2 + str r0, [r3, r1] + ldr r1, _0224351C ; =0x00000B04 + mov r5, #0xff +_022434F2: + ldr r3, [r2, #4] + add r3, r3, r0 + add r0, r0, #1 + strb r5, [r3, r1] + cmp r0, #8 + blt _022434F2 + ldr r0, [r4, #0x24] + bl ov5_021EB0C8 + add r4, #0x8c + str r0, [r4, #0] + bl ov23_02243754 + bl ov23_0224340C +_02243510: + pop {r3, r4, r5, pc} + nop +_02243514: .word 0x02257760 +_02243518: .word 0x00000B48 +_0224351C: .word 0x00000B04 + thumb_func_end ov23_022434BC + + thumb_func_start ov23_02243520 +ov23_02243520: ; 0x02243520 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _022435A0 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + add r0, #0x8c + bl ov5_021EB184 + bl ov23_0224382C + bl ov23_02248BD0 + mov r5, #0 + mov r7, #0xc1 + lsl r7, r7, #2 + ldr r1, _022435A0 ; =0x02257760 + add r6, r5, #0 + add r2, r5, #0 + add r0, r7, #0 +_02243544: + ldr r3, [r1, #4] + add r4, r3, r6 + ldr r3, [r4, r0] + cmp r3, #0 + beq _02243550 + str r2, [r4, r7] +_02243550: + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #0x10 + blt _02243544 + ldr r0, _022435A0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243576 + bl sub_0200DA58 + ldr r0, _022435A0 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + str r2, [r1, r0] +_02243576: + ldr r0, _022435A0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243594 + bl sub_020181C4 + ldr r0, _022435A0 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r2, [r1, r0] +_02243594: + ldr r0, _022435A0 ; =0x02257760 + mov r2, #1 + ldr r1, [r0, #4] + ldr r0, _022435A4 ; =0x00000B46 + strb r2, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022435A0: .word 0x02257760 +_022435A4: .word 0x00000B46 + thumb_func_end ov23_02243520 + + thumb_func_start ov23_022435A8 +ov23_022435A8: ; 0x022435A8 + push {r3, lr} + ldr r0, _022435D4 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x24] + bl ov5_021EB0C8 + ldr r1, _022435D4 ; =0x02257760 + ldr r2, [r1, #4] + ldr r2, [r2, #0x40] + add r2, #0x8c + str r0, [r2, #0] + ldr r1, [r1, #4] + ldr r0, _022435D8 ; =0x00000B46 + mov r2, #0 + strb r2, [r1, r0] + bl ov23_0224340C + bl ov23_02243754 + pop {r3, pc} + nop +_022435D4: .word 0x02257760 +_022435D8: .word 0x00000B46 + thumb_func_end ov23_022435A8 + + thumb_func_start ov23_022435DC +ov23_022435DC: ; 0x022435DC + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r6, _02243668 ; =0x02257760 + add r5, r4, #0 + add r7, r4, #0 +_022435E6: + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0xc1 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243602 + bl sub_0207136C + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0xc1 + lsl r0, r0, #2 + str r7, [r1, r0] +_02243602: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x10 + blt _022435E6 + bl ov23_02248BD0 + bl ov23_0224382C + ldr r0, _02243668 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + add r0, #0x8c + bl ov5_021EB184 + ldr r0, _02243668 ; =0x02257760 + ldr r1, _0224366C ; =0x00000B34 + ldr r3, [r0, #4] + ldrh r2, [r3, r1] + cmp r2, #0xa + blo _02243634 + add r1, r1, #2 + ldrb r1, [r3, r1] + ldr r0, [r3, #0x40] + bl sub_0206DEEC +_02243634: + ldr r0, _02243668 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243646 + bl sub_0200DA58 +_02243646: + ldr r0, _02243668 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243658 + bl sub_020181C4 +_02243658: + ldr r0, _02243668 ; =0x02257760 + ldr r0, [r0, #4] + bl sub_020181C4 + ldr r0, _02243668 ; =0x02257760 + mov r1, #0 + str r1, [r0, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243668: .word 0x02257760 +_0224366C: .word 0x00000B34 + thumb_func_end ov23_022435DC + + thumb_func_start ov23_02243670 +ov23_02243670: ; 0x02243670 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r6, _022436E4 ; =0x02257760 + add r5, r4, #0 + add r7, r4, #0 +_0224367A: + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0xc1 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243696 + bl sub_0207136C + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0xc1 + lsl r0, r0, #2 + str r7, [r1, r0] +_02243696: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x10 + blt _0224367A + bl ov23_02248BD0 + bl ov23_0224340C + mov r4, #0 + ldr r2, _022436E4 ; =0x02257760 + ldr r0, _022436E8 ; =0x00000B3C + add r1, r4, #0 +_022436AE: + ldr r3, [r2, #4] + add r3, r3, r4 + add r4, r4, #1 + strb r1, [r3, r0] + cmp r4, #8 + blt _022436AE + ldr r0, _022436E4 ; =0x02257760 + ldr r2, [r0, #4] + mov r0, #0xd1 + lsl r0, r0, #2 + add r0, r2, r0 + mov r2, #0x12 + lsl r2, r2, #6 + bl sub_020C4CF4 + ldr r0, _022436E4 ; =0x02257760 + mov r2, #3 + ldr r1, [r0, #4] + ldr r0, _022436EC ; =0x000007C4 + lsl r2, r2, #8 + add r0, r1, r0 + mov r1, #0 + bl sub_020C4CF4 + bl ov23_02243CE8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022436E4: .word 0x02257760 +_022436E8: .word 0x00000B3C +_022436EC: .word 0x000007C4 + thumb_func_end ov23_02243670 + + thumb_func_start ov23_022436F0 +ov23_022436F0: ; 0x022436F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224374C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xd1 + lsl r0, r0, #2 + add r2, r1, r0 + lsl r1, r4, #4 + mov r0, #6 + mul r0, r1 + add r1, r2, r0 + mov r2, #0 + add r0, r2, #0 +_0224370A: + add r2, r2, #1 + strb r0, [r1, #4] + add r1, r1, #6 + cmp r2, #0x10 + blt _0224370A + add r0, r4, #0 + bl ov23_02243970 + ldr r0, _0224374C ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r4 + ldr r0, _02243750 ; =0x00000B3C + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0224374A + add r0, r4, #0 + bl ov23_0224AD98 + ldr r1, _0224374C ; =0x02257760 + add r0, r4, #0 + ldr r1, [r1, #4] + add r2, r1, r4 + ldr r1, _02243750 ; =0x00000B3C + ldrb r1, [r2, r1] + bl ov23_02244844 + ldr r0, _0224374C ; =0x02257760 + mov r2, #0 + ldr r0, [r0, #4] + add r1, r0, r4 + ldr r0, _02243750 ; =0x00000B3C + strb r2, [r1, r0] +_0224374A: + pop {r4, pc} + ; .align 2, 0 +_0224374C: .word 0x02257760 +_02243750: .word 0x00000B3C + thumb_func_end ov23_022436F0 + + thumb_func_start ov23_02243754 +ov23_02243754: ; 0x02243754 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r4, #0 + mov r7, #6 + ldr r6, _02243828 ; =0x02257760 + add r5, r4, #0 + lsl r7, r7, #6 +_02243762: + mov r0, #1 + add r1, r4, #0 + mov r2, #4 + bl sub_02009714 + ldr r1, [r6, #4] + add r4, r4, #1 + add r1, r1, r5 + add r5, r5, #4 + str r0, [r1, r7] + cmp r4, #4 + blt _02243762 + mov r0, #0x32 + mov r1, #4 + bl sub_02006C24 + mov r3, #0 + add r4, r0, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02243828 ; =0x02257760 + mov r2, #0x11 + ldr r1, [r0, #4] + mov r0, #6 + lsl r0, r0, #6 + ldr r0, [r1, r0] + add r1, r4, #0 + bl sub_02009A4C + ldr r2, _02243828 ; =0x02257760 + mov r1, #0x1a + ldr r3, [r2, #4] + lsl r1, r1, #4 + str r0, [r3, r1] + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, [r2, #4] + sub r1, #0x1c + ldr r0, [r0, r1] + add r1, r4, #0 + mov r2, #0x12 + bl sub_02009B04 + ldr r2, _02243828 ; =0x02257760 + mov r1, #0x69 + ldr r3, [r2, #4] + lsl r1, r1, #2 + str r0, [r3, r1] + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [r2, #4] + sub r1, #0x1c + ldr r0, [r0, r1] + add r1, r4, #0 + mov r2, #0x10 + bl sub_02009BC4 + ldr r2, _02243828 ; =0x02257760 + mov r1, #0x6a + ldr r3, [r2, #4] + lsl r1, r1, #2 + str r0, [r3, r1] + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [r2, #4] + sub r1, #0x1c + ldr r0, [r0, r1] + add r1, r4, #0 + mov r2, #0xf + bl sub_02009BC4 + ldr r1, _02243828 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0x6b + lsl r1, r1, #2 + str r0, [r2, r1] + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243828: .word 0x02257760 + thumb_func_end ov23_02243754 + + thumb_func_start ov23_0224382C +ov23_0224382C: ; 0x0224382C + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + mov r7, #6 + ldr r6, _0224384C ; =0x02257760 + add r5, r4, #0 + lsl r7, r7, #6 +_02243838: + ldr r0, [r6, #4] + add r0, r0, r5 + ldr r0, [r0, r7] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02243838 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224384C: .word 0x02257760 + thumb_func_end ov23_0224382C + + thumb_func_start ov23_02243850 +ov23_02243850: ; 0x02243850 + ldr r3, _02243854 ; =sub_02059514 + bx r3 + ; .align 2, 0 +_02243854: .word sub_02059514 + thumb_func_end ov23_02243850 + + thumb_func_start ov23_02243858 +ov23_02243858: ; 0x02243858 + ldr r0, _0224385C ; =0x00000B48 + bx lr + ; .align 2, 0 +_0224385C: .word 0x00000B48 + thumb_func_end ov23_02243858 + + thumb_func_start ov23_02243860 +ov23_02243860: ; 0x02243860 + mov r0, #0x60 + bx lr + thumb_func_end ov23_02243860 + + thumb_func_start ov23_02243864 +ov23_02243864: ; 0x02243864 + push {r3, r4} + ldr r3, _02243890 ; =0x02257760 + lsl r1, r1, #2 + ldr r2, [r3, #4] + add r4, r2, r1 + ldr r2, _02243894 ; =0x000007C4 + ldr r4, [r4, r2] + cmp r4, #0 + bne _0224387C + mov r0, #0 + pop {r3, r4} + bx lr +_0224387C: + ldrh r4, [r4] + strh r4, [r0] + ldr r3, [r3, #4] + add r1, r3, r1 + ldr r1, [r1, r2] + ldrh r1, [r1, #2] + strh r1, [r0, #2] + pop {r3, r4} + bx lr + nop +_02243890: .word 0x02257760 +_02243894: .word 0x000007C4 + thumb_func_end ov23_02243864 + + thumb_func_start ov23_02243898 +ov23_02243898: ; 0x02243898 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldrh r1, [r4] + add r0, sp, #0 + strh r1, [r0] + ldrh r1, [r4, #2] + strh r1, [r0, #2] + ldr r1, _02243900 ; =ov23_02243864 + mov r0, #0xc0 + bl ov23_022427DC + add r0, sp, #0 + bl ov23_02242788 + cmp r0, #0xc0 + bge _022438FE + ldr r1, _02243904 ; =0x02257760 + mov r3, #0 + ldr r5, [r1, #4] + ldr r1, _02243908 ; =0x000007C4 +_022438C0: + ldr r2, [r5, r1] + cmp r2, r4 + beq _022438FE + add r3, r3, #1 + add r5, r5, #4 + cmp r3, #0xc0 + blt _022438C0 + mov r2, #0xbe + cmp r0, #0xbe + bgt _022438EC + ldr r7, _02243904 ; =0x02257760 + ldr r6, _0224390C ; =0x000007C8 + lsl r3, r2, #2 +_022438DA: + ldr r1, [r7, #4] + ldr r5, _02243908 ; =0x000007C4 + add r1, r1, r3 + ldr r5, [r1, r5] + sub r2, r2, #1 + str r5, [r1, r6] + sub r3, r3, #4 + cmp r2, r0 + bge _022438DA +_022438EC: + ldr r1, _02243904 ; =0x02257760 + lsl r3, r0, #2 + ldr r0, [r1, #4] + add r2, r0, r3 + ldr r0, _02243908 ; =0x000007C4 + str r4, [r2, r0] + ldr r1, [r1, #4] + add r1, r1, r3 + str r4, [r1, r0] +_022438FE: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243900: .word ov23_02243864 +_02243904: .word 0x02257760 +_02243908: .word 0x000007C4 +_0224390C: .word 0x000007C8 + thumb_func_end ov23_02243898 + + thumb_func_start ov23_02243910 +ov23_02243910: ; 0x02243910 + push {r3, r4, r5, r6} + ldr r2, _02243964 ; =0x02257760 + mov r1, #0 + ldr r5, [r2, #4] + ldr r2, _02243968 ; =0x000007C4 + mvn r1, r1 + mov r4, #0 +_0224391E: + ldr r3, [r5, r2] + cmp r3, r0 + bne _02243928 + add r1, r4, #0 + b _02243930 +_02243928: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xc0 + blt _0224391E +_02243930: + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + beq _02243960 + cmp r1, #0xbf + bge _02243954 + ldr r0, _0224396C ; =0x000007C8 + ldr r3, _02243964 ; =0x02257760 + lsl r6, r1, #2 + sub r2, r0, #4 +_02243944: + ldr r4, [r3, #4] + add r1, r1, #1 + add r5, r4, r6 + ldr r4, [r5, r0] + add r6, r6, #4 + str r4, [r5, r2] + cmp r1, #0xbf + blt _02243944 +_02243954: + ldr r0, _02243964 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + mov r0, #0x2b + lsl r0, r0, #6 + str r2, [r1, r0] +_02243960: + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_02243964: .word 0x02257760 +_02243968: .word 0x000007C4 +_0224396C: .word 0x000007C8 + thumb_func_end ov23_02243910 + + thumb_func_start ov23_02243970 +ov23_02243970: ; 0x02243970 + push {r3, r4, r5, r6, r7, lr} + lsl r5, r0, #4 + ldr r7, _022439CC ; =0x02257760 + mov r6, #0 + add r4, r5, #0 +_0224397A: + mov r0, #0xd1 + ldr r1, [r7, #4] + lsl r0, r0, #2 + add r1, r1, r0 + mov r0, #6 + mul r0, r4 + add r0, r1, r0 + bl ov23_02243910 + add r6, r6, #1 + add r4, r4, #1 + cmp r6, #0x10 + blt _0224397A + mov r6, #0 + mov r0, #6 + add r7, r5, #0 + add r4, r6, #0 + mul r7, r0 +_0224399E: + ldr r0, _022439CC ; =0x02257760 + ldr r0, [r0, #4] + add r1, r7, r0 + add r2, r4, r1 + mov r1, #0xd2 + lsl r1, r1, #2 + ldrb r1, [r2, r1] + cmp r1, #0 + beq _022439C0 + mov r1, #0xd1 + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #6 + mul r0, r5 + add r0, r1, r0 + bl ov23_02243898 +_022439C0: + add r6, r6, #1 + add r4, r4, #6 + add r5, r5, #1 + cmp r6, #0x10 + blt _0224399E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022439CC: .word 0x02257760 + thumb_func_end ov23_02243970 + + thumb_func_start ov23_022439D0 +ov23_022439D0: ; 0x022439D0 + mov r2, #0 +_022439D2: + ldrb r1, [r0, #4] + cmp r1, #0 + beq _022439E2 + add r2, r2, #1 + add r0, r0, #6 + cmp r2, #0x10 + blt _022439D2 + mov r0, #0 +_022439E2: + bx lr + thumb_func_end ov23_022439D0 + + thumb_func_start ov23_022439E4 +ov23_022439E4: ; 0x022439E4 + mov r2, #0 +_022439E6: + ldrb r1, [r0, #4] + cmp r1, #0 + bne _022439F0 + add r0, r2, #0 + bx lr +_022439F0: + add r2, r2, #1 + add r0, r0, #6 + cmp r2, #0x10 + blt _022439E6 + mov r0, #0 + mvn r0, r0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_022439E4 + + thumb_func_start ov23_02243A00 +ov23_02243A00: ; 0x02243A00 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r1, _02243A78 ; =0x02257760 + ldr r6, [r1, #4] + mov r1, #0xd1 + lsl r1, r1, #2 + add r1, r6, r1 + sub r0, r0, r1 + mov r1, #6 + bl sub_020E2178 + add r4, r0, #0 + lsr r0, r4, #4 + str r0, [sp, #4] + add r0, r0, #1 + lsl r0, r0, #4 + str r0, [sp] + mov r0, #6 + add r5, r4, #0 + mul r5, r0 + mov r0, #0xd2 + mov r2, #0 + add r1, r6, r5 + lsl r0, r0, #2 + strb r2, [r1, r0] + ldr r0, [sp] + sub r6, r0, #1 + cmp r4, r6 + bhs _02243A5C + ldr r7, _02243A78 ; =0x02257760 +_02243A3C: + mov r0, #0xd1 + ldr r1, [r7, #4] + lsl r0, r0, #2 + add r1, r1, r0 + add r2, r4, #1 + mov r0, #6 + mul r0, r2 + add r0, r1, r0 + add r1, r1, r5 + mov r2, #6 + bl sub_020C4DB0 + add r4, r4, #1 + add r5, r5, #6 + cmp r4, r6 + blo _02243A3C +_02243A5C: + ldr r1, _02243A78 ; =0x02257760 + mov r2, #6 + ldr r3, [r1, #4] + ldr r1, [sp] + mov r0, #0 + mul r2, r1 + ldr r1, _02243A7C ; =0x00000342 + add r2, r3, r2 + strb r0, [r2, r1] + ldr r0, [sp, #4] + bl ov23_02243970 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243A78: .word 0x02257760 +_02243A7C: .word 0x00000342 + thumb_func_end ov23_02243A00 + + thumb_func_start ov23_02243A80 +ov23_02243A80: ; 0x02243A80 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02243AD0 ; =0x02257760 + add r6, r1, #0 + ldr r0, [r0, #4] + add r7, r2, #0 + ldr r0, [r0, #0x40] + add r1, r5, #0 + add r2, r6, #0 + str r3, [sp] + bl sub_02054F68 + cmp r0, #0 + beq _02243AA0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02243AA0: + add r0, r7, #0 + bl ov23_022439D0 + add r4, r0, #0 + bne _02243ABE + add r0, r7, #0 + bl ov23_02244EA0 + add r4, r0, #0 + bl ov23_02243A00 + add r0, r4, #0 + bl ov23_022439D0 + add r4, r0, #0 +_02243ABE: + strh r5, [r4] + ldr r0, [sp] + strh r6, [r4, #2] + strb r0, [r4, #4] + add r0, r4, #0 + bl ov23_02243898 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243AD0: .word 0x02257760 + thumb_func_end ov23_02243A80 + + thumb_func_start ov23_02243AD4 +ov23_02243AD4: ; 0x02243AD4 + push {r0, r1, r2, r3} + push {r3, lr} + mov r0, #0x20 + add r1, sp, #8 + bl sub_020360D0 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov23_02243AD4 + + thumb_func_start ov23_02243AE8 +ov23_02243AE8: ; 0x02243AE8 + ldr r3, _02243AEC ; =ov23_022457FC + bx r3 + ; .align 2, 0 +_02243AEC: .word ov23_022457FC + thumb_func_end ov23_02243AE8 + + thumb_func_start ov23_02243AF0 +ov23_02243AF0: ; 0x02243AF0 + ldr r1, _02243B04 ; =0x02257760 + ldr r3, _02243B08 ; =sub_02035F58 + ldr r2, [r1, #4] + mov r1, #0xa9 + lsl r1, r1, #2 + add r1, r2, r1 + mov r0, #0x23 + mov r2, #0x60 + bx r3 + nop +_02243B04: .word 0x02257760 +_02243B08: .word sub_02035F58 + thumb_func_end ov23_02243AF0 + + thumb_func_start ov23_02243B0C +ov23_02243B0C: ; 0x02243B0C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r1, _02243C30 ; =0x02257760 + add r5, r0, #0 + ldr r1, [r1, #4] + add r7, r2, #0 + cmp r1, #0 + bne _02243B1E + b _02243C2A +_02243B1E: + add r1, sp, #0 + strb r5, [r1, #6] + mov r2, #3 + strb r2, [r1, #7] + bl sub_02058EE0 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02058F18 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02058DF8 + ldr r1, _02243C34 ; =0x0000FFFF + cmp r0, r1 + bne _02243B60 + add r0, r5, #0 + bl sub_02058E4C + ldr r1, _02243C34 ; =0x0000FFFF + cmp r0, r1 + bne _02243B60 + mov r1, #7 + add r0, sp, #0 + strb r1, [r0, #7] + mov r0, #0x22 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02243B60: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0205900C + cmp r0, #0xff + beq _02243B80 + mov r1, #5 + add r0, sp, #0 + strb r1, [r0, #7] + mov r0, #0x22 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02243B80: + add r0, r6, #0 + add r1, r4, #0 + bl sub_02058108 + cmp r0, #0 + beq _02243BA0 + mov r1, #5 + add r0, sp, #0 + strb r1, [r0, #7] + mov r0, #0x22 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02243BA0: + add r0, r6, #0 + add r1, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _02243BC0 + mov r1, #4 + add r0, sp, #0 + strb r1, [r0, #7] + mov r0, #0x22 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02243BC0: + ldr r0, _02243C30 ; =0x02257760 + add r1, r6, #0 + ldr r0, [r0, #4] + add r2, r4, #0 + ldr r0, [r0, #0x40] + bl sub_02054F68 + cmp r0, #0 + beq _02243BE6 + mov r1, #6 + add r0, sp, #0 + strb r1, [r0, #7] + mov r0, #0x22 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_02243BE6: + add r0, r6, #0 + add r1, r4, #0 + bl ov23_0224240C + cmp r0, #0 + bne _02243C20 + ldr r2, _02243C30 ; =0x02257760 + add r1, r4, #0 + ldr r3, [r2, #4] + mov r2, #0xd1 + lsl r2, r2, #2 + add r2, r3, r2 + lsl r4, r5, #4 + mov r3, #6 + mul r3, r4 + add r2, r2, r3 + ldrb r3, [r7] + add r0, r6, #0 + bl ov23_02243A80 + cmp r0, #0 + beq _02243C20 + mov r2, #1 + add r1, sp, #0 + strb r2, [r1, #7] + add r1, sp, #0 + mov r2, #6 + bl sub_020C4DB0 +_02243C20: + mov r0, #0x22 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 +_02243C2A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243C30: .word 0x02257760 +_02243C34: .word 0x0000FFFF + thumb_func_end ov23_02243B0C + + thumb_func_start ov23_02243C38 +ov23_02243C38: ; 0x02243C38 + mov r0, #8 + bx lr + thumb_func_end ov23_02243C38 + + thumb_func_start ov23_02243C3C +ov23_02243C3C: ; 0x02243C3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp, #4] + ldr r0, _02243CE0 ; =0x02257760 + str r1, [sp, #8] + ldr r0, [r0, #4] + add r7, r2, #0 + ldr r0, [r0, #0x40] + add r5, r3, #0 + ldr r0, [r0, #0xc] + bl sub_020298B0 + str r0, [sp, #0xc] + cmp r5, #0x40 + blt _02243C60 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02243C60: + ldr r0, _02243CE0 ; =0x02257760 + ldr r2, [r7, #4] + ldr r1, [r0, #4] + mov r0, #0xd1 + lsl r0, r0, #2 + add r4, r1, r0 + asr r0, r5, #3 + lsr r0, r0, #0x1c + add r0, r5, r0 + asr r0, r0, #4 + add r0, #8 + lsl r1, r0, #4 + add r6, r1, #0 + mov r0, #6 + ldr r1, [r7, #0] + mul r6, r0 + ldr r0, [r7, #8] + mul r1, r2 + add r0, r0, r1 + str r0, [r7, #0] + lsr r1, r0, #0x10 + mov r0, #0x1a + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + ldr r0, _02243CE4 ; =0x02256788 + ldrb r7, [r0, r1] + ldr r0, [sp, #4] + ldr r1, [sp, #8] + bl ov23_0224240C + cmp r0, #0 + bne _02243CDA + add r0, r4, r6 + bl ov23_022439D0 + cmp r0, #0 + beq _02243CDA + ldr r0, [sp, #4] + ldr r1, [sp, #8] + add r2, r4, r6 + add r3, r7, #0 + bl ov23_02243A80 + cmp r0, #0 + beq _02243CDA + strb r5, [r0, #5] + ldr r0, [sp, #8] + ldr r3, [sp, #4] + str r0, [sp] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r2, r5, #0 + bl sub_02028EF8 + add sp, #0x10 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} +_02243CDA: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243CE0: .word 0x02257760 +_02243CE4: .word 0x02256788 + thumb_func_end ov23_02243C3C + + thumb_func_start ov23_02243CE8 +ov23_02243CE8: ; 0x02243CE8 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _02243D4C ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r5, r0, #0 + mov r4, #0 +_02243CFA: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02028F40 + add r7, r0, #0 + beq _02243D44 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02028F5C + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02028F88 + ldr r2, _02243D4C ; =0x02257760 + add r1, r0, #0 + ldr r3, [r2, #4] + mov r2, #0xd1 + lsl r2, r2, #2 + add r2, r3, r2 + asr r3, r4, #3 + lsr r3, r3, #0x1c + add r3, r4, r3 + asr r3, r3, #4 + add r3, #8 + add r0, r6, #0 + lsl r6, r3, #4 + mov r3, #6 + mul r3, r6 + add r2, r2, r3 + add r3, r7, #0 + bl ov23_02243A80 + cmp r0, #0 + beq _02243D44 + strb r4, [r0, #5] +_02243D44: + add r4, r4, #1 + cmp r4, #0x40 + blt _02243CFA + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243D4C: .word 0x02257760 + thumb_func_end ov23_02243CE8 + + thumb_func_start ov23_02243D50 +ov23_02243D50: ; 0x02243D50 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r0, _02243D9C ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + bl sub_0203D174 + bl sub_020298B0 + mov r4, #0 + add r7, r0, #0 + add r5, r4, #0 +_02243D68: + ldr r0, _02243D9C ; =0x02257760 + mov r1, #0xaa + ldr r0, [r0, #4] + mov r3, #0xa9 + add r6, r0, r5 + ldr r0, _02243DA0 ; =0x000002A6 + lsl r1, r1, #2 + ldrh r0, [r6, r0] + lsl r3, r3, #2 + add r2, r4, #0 + str r0, [sp] + ldr r0, _02243DA4 ; =0x000002A9 + ldrb r0, [r6, r0] + str r0, [sp, #4] + ldrb r1, [r6, r1] + ldrh r3, [r6, r3] + add r0, r7, #0 + bl sub_02028FE0 + add r4, r4, #1 + add r5, r5, #6 + cmp r4, #0x10 + blt _02243D68 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243D9C: .word 0x02257760 +_02243DA0: .word 0x000002A6 +_02243DA4: .word 0x000002A9 + thumb_func_end ov23_02243D50 + + thumb_func_start ov23_02243DA8 +ov23_02243DA8: ; 0x02243DA8 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _02243E1C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa9 + lsl r0, r0, #2 + add r0, r1, r0 + bl ov23_022439D0 + add r5, r0, #0 + bne _02243DE0 + ldr r0, _02243E1C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa9 + lsl r0, r0, #2 + add r0, r1, r0 + bl ov23_02244EA0 + bl ov23_02243E20 + ldr r0, _02243E1C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa9 + lsl r0, r0, #2 + add r0, r1, r0 + bl ov23_022439D0 + add r5, r0, #0 +_02243DE0: + ldr r0, _02243E1C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa9 + lsl r0, r0, #2 + add r0, r1, r0 + bl ov23_022439E4 + add r4, r0, #0 + add r0, r6, #0 + add r1, r5, #0 + mov r2, #6 + bl sub_020C4DB0 + bl ov23_02243D50 + ldrh r0, [r5] + ldrh r1, [r5, #2] + ldrb r3, [r5, #4] + mov r2, #1 + bl ov23_02244E68 + ldr r1, _02243E1C ; =0x02257760 + ldr r2, [r1, #4] + lsl r1, r4, #2 + add r2, r2, r1 + mov r1, #0xc1 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r4, r5, r6, pc} + nop +_02243E1C: .word 0x02257760 + thumb_func_end ov23_02243DA8 + + thumb_func_start ov23_02243E20 +ov23_02243E20: ; 0x02243E20 + push {r3, r4, r5, r6, r7, lr} + ldr r2, _02243ECC ; =0x02257760 + mov r6, #0 + ldr r3, [r2, #4] + mov r2, #0xa9 + lsl r2, r2, #2 + add r2, r3, r2 + ldrh r3, [r0] + mvn r6, r6 + mov r1, #0 +_02243E34: + ldrh r4, [r2] + cmp r3, r4 + bne _02243E46 + ldrh r5, [r0, #2] + ldrh r4, [r2, #2] + cmp r5, r4 + bne _02243E46 + add r6, r1, #0 + b _02243E4E +_02243E46: + add r1, r1, #1 + add r2, r2, #6 + cmp r1, #0x10 + blt _02243E34 +_02243E4E: + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _02243EC8 + add r5, r6, #0 + cmp r6, #0xf + bge _02243E84 + mov r0, #6 + add r4, r6, #0 + ldr r7, _02243ECC ; =0x02257760 + mul r4, r0 +_02243E64: + mov r0, #0xa9 + ldr r1, [r7, #4] + lsl r0, r0, #2 + add r1, r1, r0 + add r2, r5, #1 + mov r0, #6 + mul r0, r2 + add r0, r1, r0 + add r1, r1, r4 + mov r2, #6 + bl sub_020C4DB0 + add r5, r5, #1 + add r4, r4, #6 + cmp r5, #0xf + blt _02243E64 +_02243E84: + ldr r1, _02243ECC ; =0x02257760 + ldr r0, _02243ED0 ; =0x00000302 + ldr r2, [r1, #4] + mov r3, #0 + strb r3, [r2, r0] + ldr r1, [r1, #4] + lsl r4, r6, #2 + add r1, r1, r4 + add r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02243EA0 + bl sub_0207136C +_02243EA0: + cmp r6, #0xf + bge _02243EBC + mov r0, #0xc2 + lsl r0, r0, #2 + ldr r2, _02243ECC ; =0x02257760 + sub r1, r0, #4 +_02243EAC: + ldr r3, [r2, #4] + add r6, r6, #1 + add r5, r3, r4 + ldr r3, [r5, r0] + add r4, r4, #4 + str r3, [r5, r1] + cmp r6, #0xf + blt _02243EAC +_02243EBC: + ldr r0, _02243ECC ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + mov r0, #0xd + lsl r0, r0, #6 + str r2, [r1, r0] +_02243EC8: + pop {r3, r4, r5, r6, r7, pc} + nop +_02243ECC: .word 0x02257760 +_02243ED0: .word 0x00000302 + thumb_func_end ov23_02243E20 + + thumb_func_start ov23_02243ED4 +ov23_02243ED4: ; 0x02243ED4 + push {r4, lr} + add r4, r2, #0 + bl sub_0203608C + ldrb r1, [r4, #6] + cmp r1, r0 + bne _02243F6E + bl sub_020594FC + ldrb r0, [r4, #7] + cmp r0, #1 + bne _02243F18 + add r0, r4, #0 + bl ov23_02243DA8 + ldrb r0, [r4, #4] + bl ov23_0224FD68 + bl ov23_0224219C + ldrb r1, [r4, #4] + bl ov23_02254098 + bl ov23_0224219C + ldr r3, _02243F70 ; =ov23_02243850 + mov r1, #0x83 + mov r2, #1 + bl ov23_02253F40 + ldr r0, _02243F74 ; =0x00000623 + bl sub_02005748 + pop {r4, pc} +_02243F18: + cmp r0, #4 + bne _02243F2C + bl ov23_0224219C + ldr r3, _02243F70 ; =ov23_02243850 + mov r1, #0x49 + mov r2, #1 + bl ov23_02253F40 + pop {r4, pc} +_02243F2C: + cmp r0, #5 + bne _02243F40 + bl ov23_0224219C + ldr r3, _02243F70 ; =ov23_02243850 + mov r1, #0x37 + mov r2, #1 + bl ov23_02253F40 + pop {r4, pc} +_02243F40: + cmp r0, #6 + bne _02243F54 + bl ov23_0224219C + ldr r3, _02243F70 ; =ov23_02243850 + mov r1, #0x3c + mov r2, #1 + bl ov23_02253F40 + pop {r4, pc} +_02243F54: + cmp r0, #7 + bne _02243F60 + mov r0, #0 + bl ov23_02243850 + pop {r4, pc} +_02243F60: + bl ov23_0224219C + ldr r3, _02243F70 ; =ov23_02243850 + mov r1, #0x3b + mov r2, #1 + bl ov23_02253F40 +_02243F6E: + pop {r4, pc} + ; .align 2, 0 +_02243F70: .word ov23_02243850 +_02243F74: .word 0x00000623 + thumb_func_end ov23_02243ED4 + + thumb_func_start ov23_02243F78 +ov23_02243F78: ; 0x02243F78 + ldr r0, _02243F90 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xd1 + lsl r0, r0, #2 + add r3, r1, r0 + ldrh r1, [r2] + mov r0, #6 + mul r0, r1 + add r0, r3, r0 + ldr r3, _02243F94 ; =ov23_02243A00 + bx r3 + nop +_02243F90: .word 0x02257760 +_02243F94: .word ov23_02243A00 + thumb_func_end ov23_02243F78 + + thumb_func_start ov23_02243F98 +ov23_02243F98: ; 0x02243F98 + mov r0, #2 + bx lr + thumb_func_end ov23_02243F98 + + thumb_func_start ov23_02243F9C +ov23_02243F9C: ; 0x02243F9C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + lsl r1, r0, #4 + str r0, [sp] + mov r0, #6 + add r7, r1, #0 + mul r7, r0 + ldr r0, _02244018 ; =0x02257760 + add r5, r2, #0 + ldr r1, [r0, #4] + mov r0, #0xd1 + lsl r0, r0, #2 + add r0, r1, r0 + add r6, r0, r7 + bl sub_0203608C + cmp r0, #0 + bne _02244012 + cmp r4, #0x60 + beq _02243FCA + bl sub_02022974 +_02243FCA: + mov r0, #0 + add r4, r0, #0 +_02243FCE: + add r0, r0, #1 + strb r4, [r6, #4] + add r6, r6, #6 + cmp r0, #0x10 + blt _02243FCE +_02243FD8: + ldrb r3, [r5, #4] + cmp r3, #0 + beq _02243FF2 + ldr r2, _02244018 ; =0x02257760 + ldrh r0, [r5] + ldr r6, [r2, #4] + mov r2, #0xd1 + lsl r2, r2, #2 + add r2, r6, r2 + ldrh r1, [r5, #2] + add r2, r2, r7 + bl ov23_02243A80 +_02243FF2: + add r4, r4, #1 + add r5, r5, #6 + cmp r4, #0x10 + blt _02243FD8 + ldr r0, [sp] + add r1, sp, #4 + strb r0, [r1] + mov r0, #1 + strb r0, [r1, #1] + mov r0, #0x24 + add r1, sp, #4 + mov r2, #2 + bl sub_02035AC4 + bl ov23_02244638 +_02244012: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244018: .word 0x02257760 + thumb_func_end ov23_02243F9C + + thumb_func_start ov23_0224401C +ov23_0224401C: ; 0x0224401C + push {r4, lr} + ldr r0, _02244040 ; =0x02257760 + add r4, r2, #0 + ldr r0, [r0, #4] + cmp r0, #0 + beq _0224403C + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0224403C + ldr r0, _02244040 ; =0x02257760 + ldrb r2, [r4, #1] + ldr r1, [r0, #4] + ldr r0, _02244044 ; =0x00000B45 + strb r2, [r1, r0] +_0224403C: + pop {r4, pc} + nop +_02244040: .word 0x02257760 +_02244044: .word 0x00000B45 + thumb_func_end ov23_0224401C + + thumb_func_start ov23_02244048 +ov23_02244048: ; 0x02244048 + mov r0, #2 + bx lr + thumb_func_end ov23_02244048 + + thumb_func_start ov23_0224404C +ov23_0224404C: ; 0x0224404C + ldr r0, _02244060 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _02244064 ; =0x00000B45 + ldrb r0, [r1, r0] + cmp r0, #1 + bne _0224405C + mov r0, #1 + bx lr +_0224405C: + mov r0, #0 + bx lr + ; .align 2, 0 +_02244060: .word 0x02257760 +_02244064: .word 0x00000B45 + thumb_func_end ov23_0224404C + + thumb_func_start ov23_02244068 +ov23_02244068: ; 0x02244068 + ldr r0, _02244074 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + ldr r0, _02244078 ; =0x00000B45 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_02244074: .word 0x02257760 +_02244078: .word 0x00000B45 + thumb_func_end ov23_02244068 + + thumb_func_start ov23_0224407C +ov23_0224407C: ; 0x0224407C + mov r0, #4 + bx lr + thumb_func_end ov23_0224407C + + thumb_func_start ov23_02244080 +ov23_02244080: ; 0x02244080 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _02244138 ; =0x02257760 + add r6, r2, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + bl sub_0203D174 + bl sub_020298B0 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02058EE0 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02058F18 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_0224429C + add r4, r0, #0 + beq _02244132 + add r0, r5, #0 + bl ov23_0224A6B8 + cmp r0, #0 + beq _022440C2 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022440C2: + add r3, sp, #0 + ldrb r2, [r3, #7] + mov r0, #0xf + bic r2, r0 + lsl r0, r5, #0x18 + lsr r1, r0, #0x18 + mov r0, #0xf + and r0, r1 + orr r0, r2 + strb r0, [r3, #7] + add r0, r4, #0 + bl ov23_0224426C + add r1, sp, #0 + strb r0, [r1, #6] + add r0, r4, #0 + add r1, sp, #0 + mov r2, #6 + bl sub_020C4DB0 + mov r0, #0x10 + tst r0, r6 + add r1, sp, #0 + beq _022440FC + ldrb r2, [r1, #7] + mov r0, #0x40 + orr r0, r2 + strb r0, [r1, #7] + b _0224410A +_022440FC: + ldrb r2, [r1, #7] + mov r0, #0x40 + bic r2, r0 + add r0, r4, #0 + strb r2, [r1, #7] + bl ov23_02243A00 +_0224410A: + add r1, sp, #0 + ldrb r0, [r1, #6] + cmp r0, #8 + blo _0224411A + ldrb r1, [r1, #5] + add r0, r7, #0 + bl sub_02028FB4 +_0224411A: + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + mov r0, #0x33 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02244132: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244138: .word 0x02257760 + thumb_func_end ov23_02244080 + + thumb_func_start ov23_0224413C +ov23_0224413C: ; 0x0224413C + mov r0, #8 + bx lr + thumb_func_end ov23_0224413C + + thumb_func_start ov23_02244140 +ov23_02244140: ; 0x02244140 + push {r3, r4, r5, lr} + add r4, r2, #0 + ldrb r0, [r4, #7] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + cmp r0, #8 + blo _02244152 + bl sub_02022974 +_02244152: + ldrb r3, [r4, #7] + lsl r0, r3, #0x19 + lsr r0, r0, #0x1f + cmp r0, #1 + bne _0224417E + bl sub_0203608C + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + cmp r1, r0 + bne _02244250 + bl ov23_0224219C + ldr r3, _02244254 ; =ov23_02243850 + mov r1, #0x4e + mov r2, #1 + bl ov23_02253F40 + bl sub_020594FC + pop {r3, r4, r5, pc} +_0224417E: + ldr r1, _02244258 ; =0x02257760 + mov r0, #1 + ldr r2, [r1, #4] + lsl r1, r3, #0x1c + lsr r1, r1, #0x1c + add r2, r2, r1 + ldr r1, _0224425C ; =0x00000B2C + strb r0, [r2, r1] + bl sub_0203608C + ldrb r1, [r4, #6] + cmp r1, r0 + bne _022441A2 + add r0, r4, #0 + bl ov23_02243E20 + bl ov23_02243D50 +_022441A2: + bl sub_0203608C + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + cmp r1, r0 + bne _02244250 + ldrb r0, [r4, #4] + bl ov23_0224F730 + cmp r0, #0 + beq _0224423E + bl sub_0203608C + ldrb r1, [r4, #6] + cmp r1, r0 + beq _022441E8 + ldr r0, _02244258 ; =0x02257760 + ldr r2, [r0, #4] + ldr r0, _02244260 ; =0x00000B34 + ldrh r1, [r2, r0] + cmp r1, #0 + bne _022441D6 + ldrb r1, [r4, #4] + add r0, r0, #2 + strb r1, [r2, r0] +_022441D6: + ldr r0, _02244258 ; =0x02257760 + ldr r1, _02244264 ; =0x0000FFFF + ldr r3, [r0, #4] + ldr r0, _02244260 ; =0x00000B34 + ldrh r2, [r3, r0] + cmp r2, r1 + beq _022441E8 + add r1, r2, #1 + strh r1, [r3, r0] +_022441E8: + ldr r0, _02244268 ; =0x000005E3 + bl sub_02005748 + bl ov23_0224219C + add r5, r0, #0 + ldrb r0, [r4, #7] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + bl sub_02032EE8 + add r1, r0, #0 + add r0, r5, #0 + bl ov23_02254050 + bl ov23_0224219C + ldrb r2, [r4, #4] + mov r1, #2 + bl ov23_022541F0 + bl ov23_0224219C + mov r1, #2 + bl ov23_02254204 + bl ov23_0224219C + ldrb r1, [r4, #4] + bl ov23_02254098 + bl ov23_0224219C + ldr r3, _02244254 ; =ov23_02243850 + mov r1, #0x12 + mov r2, #1 + bl ov23_02253F40 + bl ov23_0224219C + bl ov23_02253F98 + b _0224424C +_0224423E: + bl ov23_0224219C + ldr r3, _02244254 ; =ov23_02243850 + mov r1, #0x4e + mov r2, #1 + bl ov23_02253F40 +_0224424C: + bl sub_020594FC +_02244250: + pop {r3, r4, r5, pc} + nop +_02244254: .word ov23_02243850 +_02244258: .word 0x02257760 +_0224425C: .word 0x00000B2C +_02244260: .word 0x00000B34 +_02244264: .word 0x0000FFFF +_02244268: .word 0x000005E3 + thumb_func_end ov23_02244140 + + thumb_func_start ov23_0224426C +ov23_0224426C: ; 0x0224426C + push {r3, lr} + ldr r1, _02244298 ; =0x02257760 + mov r3, #0 + ldr r2, [r1, #4] + mov r1, #0xd1 + lsl r1, r1, #2 + add r1, r2, r1 +_0224427A: + cmp r1, r0 + bne _02244288 + asr r0, r3, #3 + lsr r0, r0, #0x1c + add r0, r3, r0 + asr r0, r0, #4 + pop {r3, pc} +_02244288: + add r3, r3, #1 + add r1, r1, #6 + cmp r3, #0xc0 + blt _0224427A + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02244298: .word 0x02257760 + thumb_func_end ov23_0224426C + + thumb_func_start ov23_0224429C +ov23_0224429C: ; 0x0224429C + push {r3, lr} + add r2, sp, #0 + strh r0, [r2] + strh r1, [r2, #2] + ldr r1, _022442CC ; =ov23_02243864 + mov r0, #0xc0 + bl ov23_022427DC + add r0, sp, #0 + bl ov23_0224271C + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _022442BE + mov r0, #0 + pop {r3, pc} +_022442BE: + ldr r1, _022442D0 ; =0x02257760 + lsl r0, r0, #2 + ldr r1, [r1, #4] + add r1, r1, r0 + ldr r0, _022442D4 ; =0x000007C4 + ldr r0, [r1, r0] + pop {r3, pc} + ; .align 2, 0 +_022442CC: .word ov23_02243864 +_022442D0: .word 0x02257760 +_022442D4: .word 0x000007C4 + thumb_func_end ov23_0224429C + + thumb_func_start ov23_022442D8 +ov23_022442D8: ; 0x022442D8 + push {r3, lr} + bl ov23_0224429C + cmp r0, #0 + beq _022442E6 + mov r0, #1 + pop {r3, pc} +_022442E6: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_022442D8 + + thumb_func_start ov23_022442EC +ov23_022442EC: ; 0x022442EC + mov r0, #8 + bx lr + thumb_func_end ov23_022442EC + + thumb_func_start ov23_022442F0 +ov23_022442F0: ; 0x022442F0 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _022443C4 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r6, r0, #0 + add r0, r4, #0 + bl ov23_0224162C + cmp r0, #0 + beq _02244314 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_02244314: + add r0, r4, #0 + bl sub_02058DF8 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02058E4C + add r1, r0, #0 + add r0, r5, #0 + bl ov23_0224429C + add r5, r0, #0 + bne _02244334 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_02244334: + ldr r0, _022443C4 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r4 + ldr r0, _022443C8 ; =0x00000B3C + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02244358 + add r0, r4, #0 + bl ov23_0224AD98 + ldr r1, _022443C4 ; =0x02257760 + add r0, r4, #0 + ldr r1, [r1, #4] + add r2, r1, r4 + ldr r1, _022443C8 ; =0x00000B3C + ldrb r1, [r2, r1] + bl ov23_02244844 +_02244358: + ldrb r1, [r5, #4] + add r0, r4, #0 + bl ov23_02244830 + add r0, sp, #0 + ldrb r2, [r0, #7] + mov r1, #0x80 + bic r2, r1 + strb r2, [r0, #7] + ldrb r1, [r0, #7] + mov r2, #0xf + bic r1, r2 + lsl r2, r4, #0x18 + lsr r3, r2, #0x18 + mov r2, #0xf + and r2, r3 + orr r1, r2 + strb r1, [r0, #7] + add r0, r5, #0 + bl ov23_0224426C + add r1, sp, #0 + strb r0, [r1, #6] + add r0, r5, #0 + add r1, sp, #0 + mov r2, #6 + bl sub_020C4DB0 + add r1, sp, #0 + ldrb r0, [r1, #6] + cmp r0, #8 + blo _022443A0 + ldrb r1, [r1, #5] + add r0, r6, #0 + bl sub_02028FB4 +_022443A0: + mov r0, #0x25 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + ldr r0, _022443C4 ; =0x02257760 + ldrb r2, [r5, #4] + ldr r0, [r0, #4] + add r1, r0, r4 + ldr r0, _022443C8 ; =0x00000B3C + strb r2, [r1, r0] + add r0, r5, #0 + bl ov23_02243A00 + mov r0, #1 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_022443C4: .word 0x02257760 +_022443C8: .word 0x00000B3C + thumb_func_end ov23_022442F0 + + thumb_func_start ov23_022443CC +ov23_022443CC: ; 0x022443CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + ldr r1, _02244444 ; =0x02257760 + add r5, r0, #0 + ldr r1, [r1, #4] + add r4, r2, #0 + add r2, r1, r5 + ldr r1, _02244448 ; =0x00000B3C + add r7, r3, #0 + ldrb r1, [r2, r1] + cmp r1, #0 + beq _022443EA + bl ov23_02244844 +_022443EA: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02244830 + add r1, sp, #0 + ldrb r3, [r1, #7] + mov r0, #0xf + bic r3, r0 + lsl r0, r5, #0x18 + lsr r2, r0, #0x18 + mov r0, #0xf + and r0, r2 + orr r0, r3 + strb r0, [r1, #7] + strb r6, [r1, #6] + ldrb r2, [r1, #7] + mov r0, #0x80 + orr r0, r2 + strb r0, [r1, #7] + strb r4, [r1, #4] + ldr r0, [sp, #0x20] + strh r7, [r1] + strh r0, [r1, #2] + ldrb r0, [r1, #7] + mov r2, #0x30 + bic r0, r2 + ldr r2, [sp, #0x24] + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + lsl r2, r2, #0x1e + lsr r2, r2, #0x1a + orr r0, r2 + strb r0, [r1, #7] + mov r0, #0x25 + add r1, sp, #0 + mov r2, #8 + bl sub_02035AC4 + ldr r0, _02244444 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + ldr r0, _02244448 ; =0x00000B3C + strb r4, [r1, r0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244444: .word 0x02257760 +_02244448: .word 0x00000B3C + thumb_func_end ov23_022443CC + + thumb_func_start ov23_0224444C +ov23_0224444C: ; 0x0224444C + push {r4, lr} + ldr r1, _0224446C ; =0x02257760 + add r4, r0, #0 + ldr r1, [r1, #4] + cmp r1, #0 + beq _02244468 + bl sub_02059094 + cmp r0, #0 + beq _02244468 + add r0, r4, #0 + bl ov23_022442F0 + pop {r4, pc} +_02244468: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0224446C: .word 0x02257760 + thumb_func_end ov23_0224444C + + thumb_func_start ov23_02244470 +ov23_02244470: ; 0x02244470 + ldr r1, _02244484 ; =0x02257760 + lsl r0, r0, #3 + ldr r1, [r1, #4] + add r1, r1, r0 + ldr r0, _02244488 ; =0x00000ACB + ldrb r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bx lr + nop +_02244484: .word 0x02257760 +_02244488: .word 0x00000ACB + thumb_func_end ov23_02244470 + + thumb_func_start ov23_0224448C +ov23_0224448C: ; 0x0224448C + push {r4, r5, r6, lr} + ldr r0, _022445D4 ; =0x02257760 + add r4, r2, #0 + ldr r0, [r0, #4] + cmp r0, #0 + bne _0224449A + b _022445D2 +_0224449A: + ldr r0, [r0, #0x40] + bl sub_0203D174 + bl sub_020298A0 + add r6, r0, #0 + ldr r0, _022445D8 ; =0x00000622 + bl sub_02005748 + ldr r1, _022445D4 ; =0x02257760 + add r0, r4, #0 + ldr r2, [r1, #4] + ldr r1, _022445DC ; =0x00000AC4 + add r1, r2, r1 + ldrb r2, [r4, #7] + lsl r2, r2, #0x1c + lsr r2, r2, #0x19 + add r1, r1, r2 + mov r2, #8 + bl sub_020C4DB0 + ldrb r0, [r4, #4] + sub r0, #0x18 + cmp r0, #3 + bhi _02244530 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022444D8: ; jump table + .short _022444E0 - _022444D8 - 2 ; case 0 + .short _022444F4 - _022444D8 - 2 ; case 1 + .short _02244508 - _022444D8 - 2 ; case 2 + .short _0224451C - _022444D8 - 2 ; case 3 +_022444E0: + ldr r1, _022445D4 ; =0x02257760 + mov r0, #0x75 + ldr r2, [r1, #4] + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + add r2, r2, r1 + ldr r1, _022445E0 ; =0x00000B24 + strb r0, [r2, r1] + b _02244546 +_022444F4: + ldr r1, _022445D4 ; =0x02257760 + mov r0, #0x76 + ldr r2, [r1, #4] + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + add r2, r2, r1 + ldr r1, _022445E0 ; =0x00000B24 + strb r0, [r2, r1] + b _02244546 +_02244508: + ldr r1, _022445D4 ; =0x02257760 + mov r0, #0x77 + ldr r2, [r1, #4] + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + add r2, r2, r1 + ldr r1, _022445E0 ; =0x00000B24 + strb r0, [r2, r1] + b _02244546 +_0224451C: + ldr r1, _022445D4 ; =0x02257760 + mov r0, #0x78 + ldr r2, [r1, #4] + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + add r2, r2, r1 + ldr r1, _022445E0 ; =0x00000B24 + strb r0, [r2, r1] + b _02244546 +_02244530: + ldr r0, _022445D4 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022445E4 ; =0x00000ACB + add r0, r1, r0 + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r3, r1, #0x19 + ldrb r2, [r0, r3] + mov r1, #0x40 + orr r1, r2 + strb r1, [r0, r3] +_02244546: + ldrb r0, [r4, #7] + lsl r0, r0, #0x1c + lsr r5, r0, #0x1c + bl sub_0203608C + cmp r5, r0 + bne _02244568 + ldrb r3, [r4, #7] + ldrb r1, [r4, #4] + add r0, r5, #0 + lsl r2, r3, #0x18 + lsl r3, r3, #0x1a + lsr r2, r2, #0x1f + lsr r3, r3, #0x1e + bl ov23_022448C4 + b _02244570 +_02244568: + ldrb r1, [r4, #4] + add r0, r5, #0 + bl ov23_02248B3C +_02244570: + ldrb r0, [r4, #7] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + bl ov23_0224B00C + bl sub_0203608C + ldrb r1, [r4, #7] + lsl r1, r1, #0x1c + lsr r1, r1, #0x1c + cmp r1, r0 + bne _0224458E + add r0, r6, #0 + bl sub_0202970C +_0224458E: + ldrb r5, [r4, #6] + bl sub_0203608C + cmp r5, r0 + bne _022445D2 + ldrb r0, [r4, #7] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + cmp r5, r0 + beq _022445A8 + add r0, r6, #0 + bl sub_020296D4 +_022445A8: + ldr r0, _022445D4 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0xc] + bl sub_020507E4 + add r5, r0, #0 + bl sub_0206B42C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + bl sub_0206B43C + add r0, r4, #0 + bl ov23_02243E20 + bl ov23_02243D50 +_022445D2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022445D4: .word 0x02257760 +_022445D8: .word 0x00000622 +_022445DC: .word 0x00000AC4 +_022445E0: .word 0x00000B24 +_022445E4: .word 0x00000ACB + thumb_func_end ov23_0224448C + + thumb_func_start ov23_022445E8 +ov23_022445E8: ; 0x022445E8 + push {r4, lr} + ldrb r2, [r2] + ldr r1, _02244610 ; =0x02256558 + lsl r3, r2, #2 + ldr r1, [r1, r3] + ldr r3, _02244614 ; =0x02257760 + ldr r3, [r3, #4] + add r4, r3, r0 + ldr r3, _02244618 ; =0x00000B3C + ldrb r3, [r4, r3] + cmp r2, r3 + beq _02244608 + mov r0, #1 + bl sub_020389C4 + pop {r4, pc} +_02244608: + cmp r1, #0 + beq _0224460E + blx r1 +_0224460E: + pop {r4, pc} + ; .align 2, 0 +_02244610: .word 0x02256558 +_02244614: .word 0x02257760 +_02244618: .word 0x00000B3C + thumb_func_end ov23_022445E8 + + thumb_func_start ov23_0224461C +ov23_0224461C: ; 0x0224461C + push {r3, r4, r5, lr} + add r5, r2, #0 + ldrb r4, [r5] + bl sub_0203608C + cmp r4, r0 + beq _02244634 + ldrb r1, [r5, #1] + ldrb r2, [r5, #2] + add r0, r4, #0 + bl sub_02058BA8 +_02244634: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224461C + + thumb_func_start ov23_02244638 +ov23_02244638: ; 0x02244638 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r0, #0 + add r3, sp, #0 + ldr r1, _02244674 ; =0x02257760 + strb r0, [r3] + ldr r1, [r1, #4] + cmp r1, #0 + beq _0224466E + ldr r2, _02244678 ; =0x00000B3C + mov r4, #1 +_0224464E: + ldrb r5, [r1, r2] + cmp r5, #0 + beq _0224465E + add r5, r4, #0 + ldrb r6, [r3] + lsl r5, r0 + orr r5, r6 + strb r5, [r3] +_0224465E: + add r0, r0, #1 + add r1, r1, #1 + cmp r0, #8 + blt _0224464E + mov r0, #0x2d + add r1, sp, #0 + bl sub_02035B48 +_0224466E: + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02244674: .word 0x02257760 +_02244678: .word 0x00000B3C + thumb_func_end ov23_02244638 + + thumb_func_start ov23_0224467C +ov23_0224467C: ; 0x0224467C + push {r4, r5, r6, lr} + ldr r0, _022446A8 ; =0x02257760 + ldrb r5, [r2] + ldr r1, [r0, #4] + ldr r0, _022446AC ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0 + bne _022446A4 + mov r4, #0 + mov r6, #1 +_02244690: + add r0, r6, #0 + lsl r0, r4 + tst r0, r5 + beq _0224469E + add r0, r4, #0 + bl ov23_0224B00C +_0224469E: + add r4, r4, #1 + cmp r4, #8 + blt _02244690 +_022446A4: + pop {r4, r5, r6, pc} + nop +_022446A8: .word 0x02257760 +_022446AC: .word 0x00000B3B + thumb_func_end ov23_0224467C + + thumb_func_start ov23_022446B0 +ov23_022446B0: ; 0x022446B0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, _02244774 ; =0x02257760 + ldr r0, [r0, #4] + cmp r0, #0 + bne _022446C0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022446C0: + mov r5, #0 + mov r0, #0x40 + add r6, r5, #0 + str r0, [sp] +_022446C8: + ldr r0, _02244774 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _02244778 ; =0x00000ACB + add r0, r1, r0 + ldrb r2, [r0, r6] + lsl r1, r2, #0x19 + lsr r1, r1, #0x1f + cmp r1, #1 + bne _02244724 + ldr r1, [sp] + bic r2, r1 + strb r2, [r0, r6] + ldr r0, _02244774 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r6 + ldr r0, _0224477C ; =0x00000ACA + ldrb r0, [r1, r0] + cmp r0, #8 + blo _02244706 + add r0, r5, #0 + bl sub_02032EE8 + mov r1, #0 + mov r2, #0x63 + add r3, r7, #0 + bl ov23_022422A8 + cmp r0, #0 + beq _02244724 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02244706: + bl sub_02032EE8 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02032EE8 + add r1, r4, #0 + mov r2, #0x64 + add r3, r7, #0 + bl ov23_0224223C + cmp r0, #0 + beq _02244724 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02244724: + ldr r0, _02244774 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + ldr r0, _02244780 ; =0x00000B04 + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _02244768 + add r0, r5, #0 + bl sub_02032EE8 + add r4, r0, #0 + ldr r0, _02244774 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + ldr r0, _02244780 ; =0x00000B04 + ldrb r0, [r1, r0] + bl sub_02032EE8 + add r1, r0, #0 + ldr r0, _02244774 ; =0x02257760 + mov r2, #0xff + ldr r0, [r0, #4] + add r3, r0, r5 + ldr r0, _02244780 ; =0x00000B04 + strb r2, [r3, r0] + add r0, r4, #0 + mov r2, #0x74 + add r3, r7, #0 + bl ov23_0224223C + cmp r0, #0 + beq _02244768 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02244768: + add r5, r5, #1 + add r6, #8 + cmp r5, #8 + blt _022446C8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244774: .word 0x02257760 +_02244778: .word 0x00000ACB +_0224477C: .word 0x00000ACA +_02244780: .word 0x00000B04 + thumb_func_end ov23_022446B0 + + thumb_func_start ov23_02244784 +ov23_02244784: ; 0x02244784 + push {r3, r4, r5, r6, r7, lr} + ldr r6, _02244820 ; =0x02257760 + add r5, r0, #0 + ldr r0, [r6, #4] + cmp r0, #0 + bne _02244794 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02244794: + mov r4, #0 +_02244796: + ldr r0, [r6, #4] + ldr r1, _02244824 ; =0x00000B24 + add r0, r0, r4 + ldrb r7, [r0, r1] + cmp r7, #0 + beq _022447BE + mov r2, #0 + strb r2, [r0, r1] + add r0, r4, #0 + bl sub_02032EE8 + mov r1, #0 + add r2, r7, #0 + add r3, r5, #0 + bl ov23_022422A8 + cmp r0, #0 + beq _022447BE + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022447BE: + ldr r0, [r6, #4] + ldr r1, _02244828 ; =0x00000B2C + add r0, r0, r4 + ldrb r1, [r0, r1] + cmp r1, #1 + bne _022447E8 + ldr r1, _02244828 ; =0x00000B2C + mov r2, #0 + strb r2, [r0, r1] + add r0, r4, #0 + bl sub_02032EE8 + mov r1, #0 + mov r2, #0x5a + add r3, r5, #0 + bl ov23_022422A8 + cmp r0, #0 + beq _022447E8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022447E8: + ldr r0, [r6, #4] + add r1, r0, r4 + ldr r0, _0224482C ; =0x00000B1C + ldrb r0, [r1, r0] + cmp r0, #1 + bne _02244816 + add r0, r4, #0 + bl sub_02032EE8 + ldr r1, [r6, #4] + mov r2, #0 + add r3, r1, r4 + ldr r1, _0224482C ; =0x00000B1C + strb r2, [r3, r1] + add r1, r2, #0 + mov r2, #0x62 + add r3, r5, #0 + bl ov23_022422A8 + cmp r0, #0 + beq _02244816 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02244816: + add r4, r4, #1 + cmp r4, #8 + blt _02244796 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244820: .word 0x02257760 +_02244824: .word 0x00000B24 +_02244828: .word 0x00000B2C +_0224482C: .word 0x00000B1C + thumb_func_end ov23_02244784 + + thumb_func_start ov23_02244830 +ov23_02244830: ; 0x02244830 + push {r3, lr} + lsl r2, r1, #2 + ldr r1, _02244840 ; =0x022564CC + ldr r1, [r1, r2] + cmp r1, #0 + beq _0224483E + blx r1 +_0224483E: + pop {r3, pc} + ; .align 2, 0 +_02244840: .word 0x022564CC + thumb_func_end ov23_02244830 + + thumb_func_start ov23_02244844 +ov23_02244844: ; 0x02244844 + push {r3, lr} + lsl r2, r1, #2 + ldr r1, _02244854 ; =0x022565E4 + ldr r1, [r1, r2] + cmp r1, #0 + beq _02244852 + blx r1 +_02244852: + pop {r3, pc} + ; .align 2, 0 +_02244854: .word 0x022565E4 + thumb_func_end ov23_02244844 + + thumb_func_start ov23_02244858 +ov23_02244858: ; 0x02244858 + push {r4, lr} + ldr r2, _022448B4 ; =0x02257760 + add r4, r0, #0 + ldr r3, [r2, #4] + ldr r2, _022448B8 ; =0x00000B3B + ldrb r2, [r3, r2] + cmp r2, #0 + beq _022448B2 + lsl r3, r2, #2 + ldr r2, _022448BC ; =0x022566FC + ldr r2, [r2, r3] + cmp r2, #0 + beq _02244874 + blx r2 +_02244874: + bl sub_0203608C + cmp r0, #0 + beq _02244882 + add r0, r4, #0 + bl ov23_0224AD98 +_02244882: + mov r0, #0x10 + bl sub_0205948C + ldr r0, _022448C0 ; =0x00000609 + bl sub_02005748 + ldr r0, _022448B4 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + mov r0, #0x2a + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, #0 + bl ov23_0224B040 + bl ov23_0224219C + bl ov23_02254044 + ldr r0, _022448B4 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + ldr r0, _022448B8 ; =0x00000B3B + strb r2, [r1, r0] +_022448B2: + pop {r4, pc} + ; .align 2, 0 +_022448B4: .word 0x02257760 +_022448B8: .word 0x00000B3B +_022448BC: .word 0x022566FC +_022448C0: .word 0x00000609 + thumb_func_end ov23_02244858 + + thumb_func_start ov23_022448C4 +ov23_022448C4: ; 0x022448C4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #1 + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov23_02244858 + ldr r0, _022448F0 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022448F4 ; =0x00000B3B + strb r4, [r1, r0] + ldr r0, _022448F8 ; =0x02256440 + lsl r1, r4, #2 + ldr r3, [r0, r1] + cmp r3, #0 + beq _022448EE + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + blx r3 +_022448EE: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022448F0: .word 0x02257760 +_022448F4: .word 0x00000B3B +_022448F8: .word 0x02256440 + thumb_func_end ov23_022448C4 + + thumb_func_start ov23_022448FC +ov23_022448FC: ; 0x022448FC + push {r3, r4, r5, r6, r7, lr} + bl sub_02059328 + add r6, r0, #0 + ldr r0, _02244950 ; =0x02257760 + add r1, r6, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EA84 + bl sub_0203608C + ldr r1, _02244950 ; =0x02257760 + lsl r0, r0, #3 + ldr r1, [r1, #4] + add r1, r1, r0 + ldr r0, _02244954 ; =0x00000AC4 + ldrh r4, [r1, r0] + bl sub_0203608C + ldr r1, _02244950 ; =0x02257760 + lsl r0, r0, #3 + ldr r1, [r1, #4] + add r1, r1, r0 + ldr r0, _02244958 ; =0x00000AC6 + ldrh r5, [r1, r0] + add r0, r6, #0 + bl sub_0206419C + add r7, r0, #0 + add r0, r6, #0 + bl sub_020641A8 + add r2, r0, #0 + mov r0, #0 + add r1, r4, r7 + add r2, r5, r2 + bl sub_02057A94 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244950: .word 0x02257760 +_02244954: .word 0x00000AC4 +_02244958: .word 0x00000AC6 + thumb_func_end ov23_022448FC + + thumb_func_start ov23_0224495C +ov23_0224495C: ; 0x0224495C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _022449D4 ; =0x02257760 + add r6, r1, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + str r0, [sp] + ldr r0, _022449D4 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02059328 + str r0, [sp, #4] + bl sub_0203608C + ldr r1, _022449D4 ; =0x02257760 + lsl r0, r0, #3 + ldr r1, [r1, #4] + add r1, r1, r0 + ldr r0, _022449D8 ; =0x00000AC4 + ldrh r4, [r1, r0] + bl sub_0203608C + ldr r1, _022449D4 ; =0x02257760 + lsl r0, r0, #3 + ldr r1, [r1, #4] + add r1, r1, r0 + ldr r0, _022449DC ; =0x00000AC6 + cmp r6, #0 + ldrh r5, [r1, r0] + bne _022449BC + ldr r0, [sp, #4] + bl sub_0206419C + add r4, r4, r0 + ldr r0, [sp, #4] + bl sub_020641A8 + add r5, r5, r0 +_022449BC: + ldr r0, [sp] + cmp r0, r4 + bne _022449CC + cmp r7, r5 + bne _022449CC + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022449CC: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022449D4: .word 0x02257760 +_022449D8: .word 0x00000AC4 +_022449DC: .word 0x00000AC6 + thumb_func_end ov23_0224495C + + thumb_func_start ov23_022449E0 +ov23_022449E0: ; 0x022449E0 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl ov23_0224AD7C + add r0, r4, #0 + mov r1, #0x1e + bl sub_02059354 + pop {r4, pc} + thumb_func_end ov23_022449E0 + + thumb_func_start ov23_022449F4 +ov23_022449F4: ; 0x022449F4 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl ov23_0224AD7C + add r0, r4, #0 + mov r1, #0x1e + bl sub_02059354 + pop {r4, pc} + thumb_func_end ov23_022449F4 + + thumb_func_start ov23_02244A08 +ov23_02244A08: ; 0x02244A08 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl ov23_0224AD7C + add r0, r4, #0 + bl sub_02059378 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02244A08 + + thumb_func_start ov23_02244A1C +ov23_02244A1C: ; 0x02244A1C + ldr r3, _02244A24 ; =ov23_0224AD7C + mov r1, #2 + bx r3 + nop +_02244A24: .word ov23_0224AD7C + thumb_func_end ov23_02244A1C + + thumb_func_start ov23_02244A28 +ov23_02244A28: ; 0x02244A28 + ldr r3, _02244A30 ; =ov23_0224AD7C + mov r1, #2 + bx r3 + nop +_02244A30: .word ov23_0224AD7C + thumb_func_end ov23_02244A28 + + thumb_func_start ov23_02244A34 +ov23_02244A34: ; 0x02244A34 + push {r4, lr} + add r4, r0, #0 + mov r1, #3 + bl ov23_0224AD7C + add r0, r4, #0 + bl sub_02058B94 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02244A34 + + thumb_func_start ov23_02244A48 +ov23_02244A48: ; 0x02244A48 + ldr r3, _02244A50 ; =sub_02058B0C + mov r1, #0 + add r2, r1, #0 + bx r3 + ; .align 2, 0 +_02244A50: .word sub_02058B0C + thumb_func_end ov23_02244A48 + + thumb_func_start ov23_02244A54 +ov23_02244A54: ; 0x02244A54 + ldr r3, _02244A5C ; =sub_02058B0C + mov r1, #1 + mov r2, #0 + bx r3 + ; .align 2, 0 +_02244A5C: .word sub_02058B0C + thumb_func_end ov23_02244A54 + + thumb_func_start ov23_02244A60 +ov23_02244A60: ; 0x02244A60 + ldr r3, _02244A68 ; =sub_02058B0C + mov r1, #2 + mov r2, #0 + bx r3 + ; .align 2, 0 +_02244A68: .word sub_02058B0C + thumb_func_end ov23_02244A60 + + thumb_func_start ov23_02244A6C +ov23_02244A6C: ; 0x02244A6C + ldr r3, _02244A74 ; =sub_02058B0C + mov r1, #3 + mov r2, #0 + bx r3 + ; .align 2, 0 +_02244A74: .word sub_02058B0C + thumb_func_end ov23_02244A6C + + thumb_func_start ov23_02244A78 +ov23_02244A78: ; 0x02244A78 + ldr r3, _02244A80 ; =sub_02058B0C + mov r1, #0 + mov r2, #1 + bx r3 + ; .align 2, 0 +_02244A80: .word sub_02058B0C + thumb_func_end ov23_02244A78 + + thumb_func_start ov23_02244A84 +ov23_02244A84: ; 0x02244A84 + ldr r3, _02244A8C ; =sub_02058B0C + mov r1, #1 + add r2, r1, #0 + bx r3 + ; .align 2, 0 +_02244A8C: .word sub_02058B0C + thumb_func_end ov23_02244A84 + + thumb_func_start ov23_02244A90 +ov23_02244A90: ; 0x02244A90 + ldr r3, _02244A98 ; =sub_02058B0C + mov r1, #2 + mov r2, #1 + bx r3 + ; .align 2, 0 +_02244A98: .word sub_02058B0C + thumb_func_end ov23_02244A90 + + thumb_func_start ov23_02244A9C +ov23_02244A9C: ; 0x02244A9C + ldr r3, _02244AA4 ; =sub_02058B0C + mov r1, #3 + mov r2, #1 + bx r3 + ; .align 2, 0 +_02244AA4: .word sub_02058B0C + thumb_func_end ov23_02244A9C + + thumb_func_start ov23_02244AA8 +ov23_02244AA8: ; 0x02244AA8 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl ov23_0224AD7C + add r0, r4, #0 + bl sub_02058B7C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02244AA8 + + thumb_func_start ov23_02244ABC +ov23_02244ABC: ; 0x02244ABC + bx lr + ; .align 2, 0 + thumb_func_end ov23_02244ABC + + thumb_func_start ov23_02244AC0 +ov23_02244AC0: ; 0x02244AC0 + push {r4, lr} + mov r1, #1 + add r4, r0, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r4, r0 + bne _02244AD8 + mov r0, #1 + bl ov23_02245A58 +_02244AD8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02244AC0 + + thumb_func_start ov23_02244ADC +ov23_02244ADC: ; 0x02244ADC + push {r4, lr} + mov r1, #1 + add r4, r0, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r4, r0 + bne _02244AF4 + mov r0, #0 + bl ov23_02245A58 +_02244AF4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02244ADC + + thumb_func_start ov23_02244AF8 +ov23_02244AF8: ; 0x02244AF8 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02244B1C + ldr r0, _02244B20 ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + add r2, r6, #0 + ldr r0, [r0, #0x40] + bl ov23_02244EA4 +_02244B1C: + pop {r4, r5, r6, pc} + nop +_02244B20: .word 0x02257760 + thumb_func_end ov23_02244AF8 + + thumb_func_start ov23_02244B24 +ov23_02244B24: ; 0x02244B24 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02244B48 + ldr r0, _02244B4C ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + add r2, r6, #0 + ldr r0, [r0, #0x40] + bl ov23_022462A8 +_02244B48: + pop {r4, r5, r6, pc} + nop +_02244B4C: .word 0x02257760 + thumb_func_end ov23_02244B24 + + thumb_func_start ov23_02244B50 +ov23_02244B50: ; 0x02244B50 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244B64 ; =0x02257760 + mov r2, #0 + ldr r0, [r0, #4] + add r3, r2, #0 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244B64: .word 0x02257760 + thumb_func_end ov23_02244B50 + + thumb_func_start ov23_02244B68 +ov23_02244B68: ; 0x02244B68 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244B7C ; =0x02257760 + mov r2, #1 + ldr r0, [r0, #4] + mov r3, #0 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244B7C: .word 0x02257760 + thumb_func_end ov23_02244B68 + + thumb_func_start ov23_02244B80 +ov23_02244B80: ; 0x02244B80 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244B94 ; =0x02257760 + mov r2, #2 + ldr r0, [r0, #4] + mov r3, #0 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244B94: .word 0x02257760 + thumb_func_end ov23_02244B80 + + thumb_func_start ov23_02244B98 +ov23_02244B98: ; 0x02244B98 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244BAC ; =0x02257760 + mov r2, #3 + ldr r0, [r0, #4] + mov r3, #0 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244BAC: .word 0x02257760 + thumb_func_end ov23_02244B98 + + thumb_func_start ov23_02244BB0 +ov23_02244BB0: ; 0x02244BB0 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244BC4 ; =0x02257760 + mov r2, #0 + ldr r0, [r0, #4] + mov r3, #1 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244BC4: .word 0x02257760 + thumb_func_end ov23_02244BB0 + + thumb_func_start ov23_02244BC8 +ov23_02244BC8: ; 0x02244BC8 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244BDC ; =0x02257760 + mov r2, #1 + ldr r0, [r0, #4] + add r3, r2, #0 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244BDC: .word 0x02257760 + thumb_func_end ov23_02244BC8 + + thumb_func_start ov23_02244BE0 +ov23_02244BE0: ; 0x02244BE0 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244BF4 ; =0x02257760 + mov r2, #2 + ldr r0, [r0, #4] + mov r3, #1 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244BF4: .word 0x02257760 + thumb_func_end ov23_02244BE0 + + thumb_func_start ov23_02244BF8 +ov23_02244BF8: ; 0x02244BF8 + push {r3, lr} + add r1, r0, #0 + ldr r0, _02244C0C ; =0x02257760 + mov r2, #3 + ldr r0, [r0, #4] + mov r3, #1 + ldr r0, [r0, #0x40] + bl ov23_02244D80 + pop {r3, pc} + ; .align 2, 0 +_02244C0C: .word 0x02257760 + thumb_func_end ov23_02244BF8 + + thumb_func_start ov23_02244C10 +ov23_02244C10: ; 0x02244C10 + push {r4, lr} + ldr r0, _02244C68 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, _02244C68 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + add r3, r0, #0 + ldr r0, _02244C68 ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + mov r2, #0 + ldr r0, [r0, #0x40] + bl ov5_021F5634 + bl ov23_0224219C + ldr r2, _02244C68 ; =0x02257760 + mov r1, #0 + ldr r3, [r2, #4] + ldr r2, _02244C6C ; =0x00000B3B + ldrb r2, [r3, r2] + bl ov23_022541B4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x46 + add r3, r2, #0 + bl ov23_02253F60 + add r4, r0, #0 + mov r0, #0x10 + bl sub_02059464 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 +_02244C68: .word 0x02257760 +_02244C6C: .word 0x00000B3B + thumb_func_end ov23_02244C10 + + thumb_func_start ov23_02244C70 +ov23_02244C70: ; 0x02244C70 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #7 + bhi _02244D70 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02244C8A: ; jump table + .short _02244C9A - _02244C8A - 2 ; case 0 + .short _02244CAA - _02244C8A - 2 ; case 1 + .short _02244CC2 - _02244C8A - 2 ; case 2 + .short _02244CCA - _02244C8A - 2 ; case 3 + .short _02244CE2 - _02244C8A - 2 ; case 4 + .short _02244D3A - _02244C8A - 2 ; case 5 + .short _02244D70 - _02244C8A - 2 ; case 6 + .short _02244D42 - _02244C8A - 2 ; case 7 +_02244C9A: + bl ov23_02244C10 + str r0, [r4, #4] + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02244CAA: + mov r0, #1 + str r0, [sp] + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02244CC2: + add r0, r0, #1 + add sp, #8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02244CCA: + mov r0, #1 + str r0, [sp] + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #8 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02244CE2: + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + cmp r0, #0x1c + bne _02244D00 + ldr r0, _02244D74 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _02244D78 ; =0x00000B3B + ldrb r1, [r1, r0] + add r0, sp, #4 + strb r1, [r0] + mov r0, #0x26 + add r1, sp, #4 + bl sub_020360D0 +_02244D00: + ldr r0, [r4, #0x14] + cmp r0, #0x1e + ble _02244D70 + mov r0, #0x10 + bl sub_0205948C + mov r0, #1 + str r0, [sp] + sub r1, r0, #5 + mov r2, #0 + add r3, r0, #0 + bl sub_0200AAE0 + bl ov23_0224219C + bl ov23_02254044 + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + ldr r2, [r4, #0x18] + bl sub_02058BA8 + ldr r0, _02244D7C ; =0x0000065F + bl sub_02005748 + mov r0, #5 + add sp, #8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02244D3A: + mov r0, #6 + add sp, #8 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02244D42: + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + ldr r2, _02244D74 ; =0x02257760 + mov r0, #0xa3 + ldr r3, [r2, #4] + mov r1, #0 + lsl r0, r0, #2 + str r1, [r3, r0] + ldr r2, [r2, #4] + add r0, #0x10 + str r1, [r2, r0] + ldr r0, _02244D7C ; =0x0000065F + bl sub_020057A4 +_02244D70: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244D74: .word 0x02257760 +_02244D78: .word 0x00000B3B +_02244D7C: .word 0x0000065F + thumb_func_end ov23_02244C70 + + thumb_func_start ov23_02244D80 +ov23_02244D80: ; 0x02244D80 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #4 + mov r1, #0x1c + add r7, r2, #0 + str r3, [sp] + bl sub_02018184 + mov r1, #0 + mov r2, #0x1c + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _02244DD8 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02244DAE + bl sub_02022974 +_02244DAE: + ldr r0, _02244DD8 ; =0x02257760 + mov r2, #0x64 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + str r5, [r4, #8] + str r6, [r4, #0xc] + ldr r0, [sp] + str r7, [r4, #0x10] + str r0, [r4, #0x18] + ldr r0, _02244DDC ; =ov23_02244C70 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02244DD8 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244DD8: .word 0x02257760 +_02244DDC: .word ov23_02244C70 + thumb_func_end ov23_02244D80 + + thumb_func_start ov23_02244DE0 +ov23_02244DE0: ; 0x02244DE0 + push {r3, lr} + bl sub_02058BE8 + ldr r2, _02244E08 ; =0x02257760 + mov r0, #0xa7 + ldr r1, [r2, #4] + lsl r0, r0, #2 + ldr r3, [r1, r0] + cmp r3, #0 + beq _02244E04 + mov r1, #7 + str r1, [r3, #0] + ldr r2, [r2, #4] + mov r1, #0 + str r1, [r2, r0] + ldr r0, _02244E0C ; =0x0000065F + bl sub_020057A4 +_02244E04: + pop {r3, pc} + nop +_02244E08: .word 0x02257760 +_02244E0C: .word 0x0000065F + thumb_func_end ov23_02244DE0 + + thumb_func_start ov23_02244E10 +ov23_02244E10: ; 0x02244E10 + push {r4, lr} + bl sub_02058BE8 + ldr r0, _02244E5C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r1, r0] + cmp r4, #0 + beq _02244E5A + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + add r0, r4, #0 + bl sub_020181C4 + ldr r0, _02244E5C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + ldr r2, _02244E5C ; =0x02257760 + mov r0, #0xa3 + ldr r3, [r2, #4] + mov r1, #0 + lsl r0, r0, #2 + str r1, [r3, r0] + ldr r2, [r2, #4] + add r0, #0x10 + str r1, [r2, r0] + ldr r0, _02244E60 ; =0x0000065F + bl sub_020057A4 +_02244E5A: + pop {r4, pc} + ; .align 2, 0 +_02244E5C: .word 0x02257760 +_02244E60: .word 0x0000065F + thumb_func_end ov23_02244E10 + + thumb_func_start ov23_02244E64 +ov23_02244E64: ; 0x02244E64 + bx lr + ; .align 2, 0 + thumb_func_end ov23_02244E64 + + thumb_func_start ov23_02244E68 +ov23_02244E68: ; 0x02244E68 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + ldr r0, _02244E98 ; =0x02257760 + add r5, r1, #0 + ldr r0, [r0, #4] + ldr r1, _02244E9C ; =0x00000B46 + add r4, r2, #0 + ldrb r1, [r0, r1] + cmp r1, #0 + bne _02244E92 + sub r1, r3, #1 + str r1, [sp] + ldr r0, [r0, #0x40] + add r1, r6, #0 + add r2, r5, #0 + add r3, r4, #0 + bl ov5_021F4EAC + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02244E92: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02244E98: .word 0x02257760 +_02244E9C: .word 0x00000B46 + thumb_func_end ov23_02244E68 + + thumb_func_start ov23_02244EA0 +ov23_02244EA0: ; 0x02244EA0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_02244EA0 + + thumb_func_start ov23_02244EA4 +ov23_02244EA4: ; 0x02244EA4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #4 + mov r1, #0x20 + add r7, r2, #0 + bl sub_02018184 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _02244EF0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + add r0, r4, #0 + bl ov23_022451BC + ldr r0, [r5, #8] + add r1, r4, #0 + str r0, [r4, #0x10] + str r5, [r4, #0x14] + strb r6, [r4, #0x19] + ldr r0, _02244EF4 ; =ov23_022451C8 + mov r2, #0x64 + strb r7, [r4, #0x18] + bl sub_0200D9E8 + ldr r1, _02244EF0 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r3, r4, r5, r6, r7, pc} + nop +_02244EF0: .word 0x02257760 +_02244EF4: .word ov23_022451C8 + thumb_func_end ov23_02244EA4 + + thumb_func_start ov23_02244EF8 +ov23_02244EF8: ; 0x02244EF8 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, [sp, #0x38] + str r3, [sp, #4] + str r0, [sp, #0x38] + add r0, r2, #0 + sub r0, r5, r0 + add r4, r1, #0 + str r2, [sp] + bl sub_020D4070 + str r0, [sp, #0x20] + ldr r0, [sp, #4] + sub r0, r0, r4 + bl sub_020D4070 + ldr r1, [sp] + mov r7, #0 + cmp r5, r1 + bge _02244F28 + mov r1, #1 + str r1, [sp, #0x1c] + b _02244F2C +_02244F28: + sub r1, r7, #1 + str r1, [sp, #0x1c] +_02244F2C: + ldr r1, [sp, #4] + cmp r4, r1 + bge _02244F38 + mov r1, #1 + str r1, [sp, #0x18] + b _02244F3E +_02244F38: + mov r1, #0 + mvn r1, r1 + str r1, [sp, #0x18] +_02244F3E: + ldr r1, [sp, #0x20] + cmp r1, r0 + blt _02244F7C + neg r6, r1 + ldr r1, [sp] + cmp r5, r1 + beq _02244FB2 + lsl r0, r0, #1 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + lsl r0, r0, #1 + str r0, [sp, #8] +_02244F56: + ldr r2, [sp, #0x38] + add r0, r5, #0 + add r1, r4, #0 + bl ov23_022450D4 + add r7, r7, r0 + ldr r0, [sp, #0x1c] + add r5, r5, r0 + ldr r0, [sp, #0xc] + add r6, r6, r0 + bmi _02244F74 + ldr r0, [sp, #8] + sub r6, r6, r0 + ldr r0, [sp, #0x18] + add r4, r4, r0 +_02244F74: + ldr r0, [sp] + cmp r5, r0 + bne _02244F56 + b _02244FB2 +_02244F7C: + ldr r1, [sp, #4] + neg r6, r0 + cmp r4, r1 + beq _02244FB2 + ldr r1, [sp, #0x20] + lsl r0, r0, #1 + lsl r1, r1, #1 + str r1, [sp, #0x14] + str r0, [sp, #0x10] +_02244F8E: + ldr r2, [sp, #0x38] + add r0, r5, #0 + add r1, r4, #0 + bl ov23_022450D4 + add r7, r7, r0 + ldr r0, [sp, #0x18] + add r4, r4, r0 + ldr r0, [sp, #0x14] + add r6, r6, r0 + bmi _02244FAC + ldr r0, [sp, #0x10] + sub r6, r6, r0 + ldr r0, [sp, #0x1c] + add r5, r5, r0 +_02244FAC: + ldr r0, [sp, #4] + cmp r4, r0 + bne _02244F8E +_02244FB2: + cmp r7, #0 + beq _02244FC6 + ldr r0, _02244FCC ; =0x00000629 + bl sub_020057D4 + cmp r0, #0 + bne _02244FC6 + ldr r0, _02244FCC ; =0x00000629 + bl sub_02005748 +_02244FC6: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02244FCC: .word 0x00000629 + thumb_func_end ov23_02244EF8 + + thumb_func_start ov23_02244FD0 +ov23_02244FD0: ; 0x02244FD0 + push {r4, lr} + ldr r0, _0224505C ; =0x02257760 + ldr r2, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r2, r0] + cmp r4, #0 + beq _02245058 + ldrb r0, [r4, #0x19] + cmp r0, #0 + beq _02244FF0 + cmp r1, #0 + beq _02244FF0 + ldrb r0, [r4, #0x18] + bl ov23_022448FC +_02244FF0: + ldr r1, _02245060 ; =0x04000050 + mov r0, #0 + strh r0, [r1] + mov r1, #1 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _0224505C ; =0x02257760 + mov r1, #2 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl sub_02019FE4 + mov r3, #0 + mov r1, #2 + add r2, r3, #0 + lsl r1, r1, #0xa +_02245014: + strb r2, [r0, r3] + add r3, r3, #2 + cmp r3, r1 + blt _02245014 + mov r0, #2 + mov r1, #3 + bl sub_02019060 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x10 + bl sub_0205948C + ldr r0, _0224505C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + ldr r1, _0224505C ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_02245058: + pop {r4, pc} + nop +_0224505C: .word 0x02257760 +_02245060: .word 0x04000050 + thumb_func_end ov23_02244FD0 + + thumb_func_start ov23_02245064 +ov23_02245064: ; 0x02245064 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + str r1, [sp, #4] + add r0, r1, #0 + mov r1, #2 + add r6, r2, #0 + mov r4, #0 + bl sub_02019FE4 + add r5, r0, #0 + bne _02245082 + add sp, #8 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_02245082: + ldrh r2, [r6, #8] + ldr r0, _022450D0 ; =0x0000FFFF + cmp r2, r0 + beq _022450A2 + ldrh r3, [r6, #0xa] + cmp r3, r0 + beq _022450A2 + str r5, [sp] + ldrh r0, [r7] + ldrh r1, [r7, #2] + bl ov23_02244EF8 + ldr r0, [sp, #4] + mov r1, #2 + bl sub_02019448 +_022450A2: + ldrh r0, [r7] + mov r2, #0 + strh r0, [r6, #8] + ldrh r0, [r7, #2] + strh r0, [r6, #0xa] + mov r0, #2 + lsl r0, r0, #0xa +_022450B0: + ldrb r1, [r5, r2] + cmp r1, #0 + beq _022450B8 + add r4, r4, #1 +_022450B8: + add r2, r2, #2 + cmp r2, r0 + blt _022450B0 + cmp r4, #0xd + bge _022450C8 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022450C8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022450D0: .word 0x0000FFFF + thumb_func_end ov23_02245064 + + thumb_func_start ov23_022450D4 +ov23_022450D4: ; 0x022450D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r2, #0 + asr r2, r0, #2 + lsr r2, r2, #0x1d + add r2, r0, r2 + asr r0, r2, #3 + asr r2, r1, #2 + lsr r2, r2, #0x1d + add r2, r1, r2 + asr r1, r2, #3 + lsl r1, r1, #5 + add r0, r0, r1 + lsl r0, r0, #0x11 + lsr r0, r0, #0x10 + ldr r4, _022451B8 ; =0x0225641C + str r0, [sp, #4] + add r3, sp, #0xc + mov r2, #4 +_022450FA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _022450FA + ldr r0, [r4, #0] + mov r1, #2 + str r0, [r3, #0] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #4] + lsl r1, r1, #0xa + cmp r0, r1 + bls _0224511A + ldr r0, [sp, #8] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} +_0224511A: + ldr r1, [sp, #4] + lsr r0, r0, #0x1f + lsl r2, r1, #0x1a + sub r2, r2, r0 + mov r1, #0x1a + ror r2, r1 + add r0, r0, r2 + ldr r6, [sp, #8] + add r7, sp, #0xc + str r0, [sp] +_0224512E: + ldr r1, [r7, #0] + ldr r0, [sp, #4] + add r4, r0, r1 + ldr r0, [sp] + cmp r0, #0x3e + bne _02245146 + add r0, r6, #0 + mov r1, #3 + bl sub_020E1F6C + cmp r1, #2 + beq _022451A8 +_02245146: + ldr r0, [sp] + cmp r0, #0 + bne _02245158 + add r0, r6, #0 + mov r1, #3 + bl sub_020E1F6C + cmp r1, #0 + beq _022451A8 +_02245158: + mov r0, #2 + lsl r0, r0, #0xa + cmp r4, r0 + bge _022451A8 + cmp r4, #0 + blt _022451A8 + ldrb r0, [r5, r4] + cmp r0, #0 + beq _022451A8 + mov r1, #1 + str r1, [sp, #8] + cmp r6, #7 + bhi _0224519A + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224517E: ; jump table + .short _0224519A - _0224517E - 2 ; case 0 + .short _02245194 - _0224517E - 2 ; case 1 + .short _0224519A - _0224517E - 2 ; case 2 + .short _02245194 - _0224517E - 2 ; case 3 + .short _0224518E - _0224517E - 2 ; case 4 + .short _02245194 - _0224517E - 2 ; case 5 + .short _0224519A - _0224517E - 2 ; case 6 + .short _02245194 - _0224517E - 2 ; case 7 +_0224518E: + add r0, r0, #3 + strb r0, [r5, r4] + b _0224519E +_02245194: + add r0, r0, #2 + strb r0, [r5, r4] + b _0224519E +_0224519A: + add r0, r0, #1 + strb r0, [r5, r4] +_0224519E: + ldrb r0, [r5, r4] + cmp r0, #5 + bls _022451A8 + mov r0, #0 + strb r0, [r5, r4] +_022451A8: + add r6, r6, #1 + add r7, r7, #4 + cmp r6, #9 + blo _0224512E + ldr r0, [sp, #8] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_022451B8: .word 0x0225641C + thumb_func_end ov23_022450D4 + + thumb_func_start ov23_022451BC +ov23_022451BC: ; 0x022451BC + ldr r1, _022451C4 ; =0x0000FFFF + strh r1, [r0, #8] + strh r1, [r0, #0xa] + bx lr + ; .align 2, 0 +_022451C4: .word 0x0000FFFF + thumb_func_end ov23_022451BC + + thumb_func_start ov23_022451C8 +ov23_022451C8: ; 0x022451C8 + push {r3, r4, lr} + sub sp, #0x1c + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0xc + bls _022451D6 + b _022453F0 +_022451D6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022451E2: ; jump table + .short _022451FC - _022451E2 - 2 ; case 0 + .short _02245214 - _022451E2 - 2 ; case 1 + .short _02245248 - _022451E2 - 2 ; case 2 + .short _02245266 - _022451E2 - 2 ; case 3 + .short _0224530E - _022451E2 - 2 ; case 4 + .short _0224530E - _022451E2 - 2 ; case 5 + .short _0224530E - _022451E2 - 2 ; case 6 + .short _0224534E - _022451E2 - 2 ; case 7 + .short _022453A6 - _022451E2 - 2 ; case 8 + .short _022453B2 - _022451E2 - 2 ; case 9 + .short _022453F0 - _022451E2 - 2 ; case 10 + .short _022453C0 - _022451E2 - 2 ; case 11 + .short _022453DC - _022451E2 - 2 ; case 12 +_022451FC: + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + bl ov23_02244C10 + str r0, [r4, #4] + ldr r0, [r4, #0] + add sp, #0x1c + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_02245214: + mov r0, #1 + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + mov r1, #0 + mov r0, #0x12 + str r1, [sp] + lsl r0, r0, #4 + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r2, [r4, #0x10] + mov r0, #0x32 + mov r1, #9 + mov r3, #2 + bl sub_02006E3C + ldr r0, [r4, #0] + add sp, #0x1c + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_02245248: + mov r0, #0x20 + str r0, [sp] + mov r0, #4 + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x32 + mov r1, #0xa + add r3, r2, #0 + bl sub_02006E84 + ldr r0, [r4, #0] + add sp, #0x1c + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_02245266: + mov r0, #1 + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + ldr r0, _022453F4 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022453F8 ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0x13 + bne _0224529E + mov r1, #0 + mov r0, #6 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r2, [r4, #0x10] + mov r0, #0x32 + mov r1, #8 + mov r3, #2 + bl sub_02006E60 + b _022452E4 +_0224529E: + ldr r1, _022453FC ; =0x022563D0 + add r0, sp, #0x10 + ldrh r2, [r1, #0x10] + strh r2, [r0, #4] + ldrh r2, [r1, #0x12] + strh r2, [r0, #6] + ldrh r2, [r1, #0x14] + ldrh r1, [r1, #0x16] + strh r2, [r0, #8] + strh r1, [r0, #0xa] + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1e + sub r1, r1, r2 + mov r0, #0x1e + ror r1, r0 + add r0, r2, r1 + lsl r1, r0, #0x10 + mov r2, #0 + mov r0, #6 + str r2, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + str r2, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + lsr r2, r1, #0xf + add r1, sp, #0x14 + ldrh r1, [r1, r2] + ldr r2, [r4, #0x10] + mov r0, #0x32 + mov r3, #2 + bl sub_02006E60 +_022452E4: + mov r0, #0 + mov r1, #3 + bl sub_02019060 + mov r0, #1 + mov r1, #2 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + mov r0, #3 + mov r1, #0 + bl sub_02019060 + ldr r0, [r4, #0] + add sp, #0x1c + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_0224530E: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0x1e + ble _022453F0 + mov r0, #1 + sub r1, r0, #5 + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #7 + str r0, [r4, #0] + bl ov23_0224219C + mov r2, #0 + mov r1, #0x4d + add r3, r2, #0 + bl ov23_02253F60 + mov r0, #0 + str r0, [r4, #0x1c] + ldr r0, _02245400 ; =0x00000661 + bl sub_02005748 + add sp, #0x1c + pop {r3, r4, pc} +_0224534E: + ldr r1, _02245404 ; =0x021BF6BC + ldrh r0, [r1, #0x22] + cmp r0, #0 + beq _02245386 + ldrh r2, [r1, #0x1c] + add r0, sp, #0x10 + strh r2, [r0] + ldrh r1, [r1, #0x1e] + add r2, r4, #0 + strh r1, [r0, #2] + ldr r1, [r4, #0x10] + add r0, sp, #0x10 + bl ov23_02245064 + cmp r0, #0 + beq _0224538C + ldrb r0, [r4, #0x19] + cmp r0, #0 + beq _0224537A + mov r0, #0xb + str r0, [r4, #0] + b _0224538C +_0224537A: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] + b _0224538C +_02245386: + add r0, r4, #0 + bl ov23_022451BC +_0224538C: + ldr r0, [r4, #0x1c] + cmp r0, #0x3c + bge _022453F0 + add r0, r0, #1 + str r0, [r4, #0x1c] + cmp r0, #0x3c + bne _022453F0 + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x1c + pop {r3, r4, pc} +_022453A6: + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x1c + pop {r3, r4, pc} +_022453B2: + bl sub_0203608C + ldrb r1, [r4, #0x19] + bl ov23_02244FD0 + add sp, #0x1c + pop {r3, r4, pc} +_022453C0: + mov r0, #0 + strb r0, [r4, #0x19] + mov r0, #0x10 + bl sub_0205948C + ldrb r0, [r4, #0x18] + bl ov23_022448FC + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #0xc + add sp, #0x1c + str r0, [r4, #0] + pop {r3, r4, pc} +_022453DC: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #8 + ble _022453F0 + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_022453F0: + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_022453F4: .word 0x02257760 +_022453F8: .word 0x00000B3B +_022453FC: .word 0x022563D0 +_02245400: .word 0x00000661 +_02245404: .word 0x021BF6BC + thumb_func_end ov23_022451C8 + + thumb_func_start ov23_02245408 +ov23_02245408: ; 0x02245408 + mov r0, #4 + bx lr + thumb_func_end ov23_02245408 + + thumb_func_start ov23_0224540C +ov23_0224540C: ; 0x0224540C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl ov23_0224ACC0 + cmp r0, #0 + beq _02245454 + add r0, r4, #0 + bl ov23_0224AD98 + ldr r1, _02245464 ; =0x02257760 + add r0, r4, #0 + ldr r1, [r1, #4] + add r2, r1, r4 + ldr r1, _02245468 ; =0x00000B3C + ldrb r1, [r2, r1] + bl ov23_02244844 + add r0, r4, #0 + bl ov23_0224D87C + add r1, sp, #0 + strb r0, [r1, #3] + ldr r0, _02245464 ; =0x02257760 + ldr r0, [r0, #4] + add r2, r0, r4 + ldr r0, _02245468 ; =0x00000B3C + ldrb r0, [r2, r0] + strb r0, [r1] + strb r4, [r1, #1] + mov r0, #1 + strb r0, [r1, #2] + mov r0, #0x2a + add r1, sp, #0 + bl sub_02035B48 +_02245454: + ldr r0, _02245464 ; =0x02257760 + mov r2, #0 + ldr r0, [r0, #4] + add r1, r0, r4 + ldr r0, _02245468 ; =0x00000B3C + strb r2, [r1, r0] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02245464: .word 0x02257760 +_02245468: .word 0x00000B3C + thumb_func_end ov23_0224540C + + thumb_func_start ov23_0224546C +ov23_0224546C: ; 0x0224546C + push {r4, lr} + add r4, r0, #0 + bl ov23_0224AD98 + ldr r0, _022454AC ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r4 + ldr r0, _022454B0 ; =0x00000B3C + ldrb r1, [r1, r0] + cmp r1, #0 + beq _02245488 + add r0, r4, #0 + bl ov23_02244844 +_02245488: + ldr r1, _022454AC ; =0x02257760 + mov r3, #0 + ldr r0, [r1, #4] + add r2, r0, r4 + ldr r0, _022454B0 ; =0x00000B3C + strb r3, [r2, r0] + ldr r1, [r1, #4] + sub r0, #0x71 + add r3, r1, r0 + lsl r2, r4, #3 + ldrb r1, [r3, r2] + mov r0, #0x80 + bic r1, r0 + add r0, r4, #0 + strb r1, [r3, r2] + bl ov23_0224D87C + pop {r4, pc} + ; .align 2, 0 +_022454AC: .word 0x02257760 +_022454B0: .word 0x00000B3C + thumb_func_end ov23_0224546C + + thumb_func_start ov23_022454B4 +ov23_022454B4: ; 0x022454B4 + push {r4, r5, r6, lr} + add r4, r2, #0 + ldrb r0, [r4, #2] + ldrb r5, [r4] + cmp r0, #0 + ldrb r0, [r4, #1] + beq _022454C8 + bl ov23_0224B024 + b _022454CC +_022454C8: + bl ov23_0224B040 +_022454CC: + ldrb r0, [r4, #1] + bl ov23_02248B98 + ldrb r6, [r4, #1] + bl sub_0203608C + cmp r6, r0 + bne _022454F6 + ldr r0, _02245530 ; =0x02256670 + lsl r1, r5, #2 + ldr r2, [r0, r1] + cmp r2, #0 + beq _022454EC + ldrb r1, [r4, #3] + add r0, r6, #0 + blx r2 +_022454EC: + ldr r0, _02245534 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + ldr r0, _02245538 ; =0x00000B3B + strb r2, [r1, r0] +_022454F6: + sub r5, #0x18 + cmp r5, #3 + bhi _02245510 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02245508: ; jump table + .short _0224551E - _02245508 - 2 ; case 0 + .short _0224551E - _02245508 - 2 ; case 1 + .short _0224551E - _02245508 - 2 ; case 2 + .short _0224551E - _02245508 - 2 ; case 3 +_02245510: + ldr r0, _02245534 ; =0x02257760 + mov r2, #1 + ldr r1, [r0, #4] + ldrb r0, [r4, #1] + add r1, r1, r0 + ldr r0, _0224553C ; =0x00000B1C + strb r2, [r1, r0] +_0224551E: + bl sub_0203608C + cmp r0, #0 + beq _0224552C + ldrb r0, [r4, #1] + bl ov23_0224AD98 +_0224552C: + pop {r4, r5, r6, pc} + nop +_02245530: .word 0x02256670 +_02245534: .word 0x02257760 +_02245538: .word 0x00000B3B +_0224553C: .word 0x00000B1C + thumb_func_end ov23_022454B4 + + thumb_func_start ov23_02245540 +ov23_02245540: ; 0x02245540 + push {r3, lr} + ldr r0, _02245558 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _0224555C ; =0x00000B3B + ldrb r0, [r1, r0] + sub r0, #0xb + cmp r0, #1 + bhi _02245556 + ldrb r0, [r2] + bl ov23_02245B78 +_02245556: + pop {r3, pc} + ; .align 2, 0 +_02245558: .word 0x02257760 +_0224555C: .word 0x00000B3B + thumb_func_end ov23_02245540 + + thumb_func_start ov23_02245560 +ov23_02245560: ; 0x02245560 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov23_0224AD98 + ldr r1, _022455AC ; =0x02257760 + add r0, r4, #0 + ldr r1, [r1, #4] + add r2, r1, r4 + ldr r1, _022455B0 ; =0x00000B3C + ldrb r1, [r2, r1] + bl ov23_02244844 + add r1, sp, #0 + strb r4, [r1, #1] + ldr r0, _022455AC ; =0x02257760 + strb r5, [r1] + ldr r0, [r0, #4] + add r2, r0, r4 + ldr r0, _022455B0 ; =0x00000B3C + ldrb r0, [r2, r0] + strb r0, [r1, #2] + mov r0, #0x2c + add r1, sp, #0 + bl sub_02035B48 + ldr r0, _022455AC ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + add r2, r0, r4 + ldr r0, _022455B0 ; =0x00000B3C + strb r1, [r2, r0] + add r0, r5, #0 + bl sub_02059058 + pop {r3, r4, r5, pc} + nop +_022455AC: .word 0x02257760 +_022455B0: .word 0x00000B3C + thumb_func_end ov23_02245560 + + thumb_func_start ov23_022455B4 +ov23_022455B4: ; 0x022455B4 + push {r3, r4, r5, lr} + ldr r0, _02245680 ; =0x02257760 + add r4, r2, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + bl sub_0203D174 + bl sub_020298A0 + add r5, r0, #0 + ldrb r0, [r4, #1] + bl ov23_0224B024 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _02245616 + add r0, r5, #0 + bl sub_02029744 + ldr r0, _02245680 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x22 + bl sub_0202CFEC + bl sub_020594FC + bl ov23_0224219C + add r5, r0, #0 + ldrb r0, [r4, #1] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r5, #0 + bl ov23_02254068 + bl ov23_0224219C + ldr r3, _02245684 ; =ov23_02243850 + mov r1, #0x47 + mov r2, #1 + bl ov23_02253F40 +_02245616: + ldrb r0, [r4, #1] + bl ov23_02248B98 + ldrb r5, [r4, #1] + bl sub_0203608C + cmp r5, r0 + bne _02245662 + ldr r0, _02245680 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _02245688 ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0 + beq _02245662 + lsl r1, r0, #2 + ldr r0, _0224568C ; =0x022566FC + ldr r2, [r0, r1] + cmp r2, #0 + beq _02245642 + add r0, r5, #0 + mov r1, #0 + blx r2 +_02245642: + ldr r1, _02245680 ; =0x02257760 + mov r0, #0x2a + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #4 + str r3, [r2, r0] + ldr r1, [r1, #4] + ldr r0, _02245688 ; =0x00000B3B + strb r3, [r1, r0] + mov r0, #0x10 + bl sub_0205948C + bl ov23_0224219C + bl ov23_02254044 +_02245662: + bl sub_0203608C + cmp r0, #0 + beq _02245670 + ldrb r0, [r4, #1] + bl ov23_0224AD98 +_02245670: + ldr r0, _02245680 ; =0x02257760 + ldrb r2, [r4, #1] + ldr r1, [r0, #4] + ldrb r0, [r4] + add r1, r1, r0 + ldr r0, _02245690 ; =0x00000B04 + strb r2, [r1, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245680: .word 0x02257760 +_02245684: .word ov23_02243850 +_02245688: .word 0x00000B3B +_0224568C: .word 0x022566FC +_02245690: .word 0x00000B04 + thumb_func_end ov23_022455B4 + + thumb_func_start ov23_02245694 +ov23_02245694: ; 0x02245694 + mov r0, #3 + bx lr + thumb_func_end ov23_02245694 + + thumb_func_start ov23_02245698 +ov23_02245698: ; 0x02245698 + push {r4, lr} + ldr r1, _022456C8 ; =0x02257760 + ldr r2, [r1, #4] + cmp r2, #0 + beq _022456C2 + mov r1, #0xa6 + lsl r1, r1, #2 + ldr r4, [r2, r1] + cmp r4, #0 + beq _022456C2 + sub r1, #0xb6 + ldrh r1, [r4, r1] + lsr r1, r1, #1 + add r0, r1, r0 + mov r1, #0x50 + bl sub_020E1F6C + mov r0, #6 + mul r0, r1 + ldrh r0, [r4, r0] + pop {r4, pc} +_022456C2: + mov r0, #0 + pop {r4, pc} + nop +_022456C8: .word 0x02257760 + thumb_func_end ov23_02245698 + + thumb_func_start ov23_022456CC +ov23_022456CC: ; 0x022456CC + push {r4, lr} + ldr r1, _022456FC ; =0x02257760 + ldr r2, [r1, #4] + cmp r2, #0 + beq _022456F8 + mov r1, #0xa6 + lsl r1, r1, #2 + ldr r4, [r2, r1] + cmp r4, #0 + beq _022456F8 + sub r1, #0xb6 + ldrh r1, [r4, r1] + lsr r1, r1, #1 + add r0, r1, r0 + mov r1, #0x50 + bl sub_020E1F6C + mov r0, #6 + mul r0, r1 + add r0, r4, r0 + ldrh r0, [r0, #2] + pop {r4, pc} +_022456F8: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_022456FC: .word 0x02257760 + thumb_func_end ov23_022456CC + + thumb_func_start ov23_02245700 +ov23_02245700: ; 0x02245700 + push {r4, lr} + ldr r0, _02245720 ; =0x000001E2 + add r4, r1, #0 + ldrh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + ldrh r0, [r4, r0] + cmp r0, #0xa0 + bls _0224571E + ldr r0, _02245724 ; =0x0000054A + bl sub_02005748 + ldr r0, _02245720 ; =0x000001E2 + mov r1, #0 + strh r1, [r4, r0] +_0224571E: + pop {r4, pc} + ; .align 2, 0 +_02245720: .word 0x000001E2 +_02245724: .word 0x0000054A + thumb_func_end ov23_02245700 + + thumb_func_start ov23_02245728 +ov23_02245728: ; 0x02245728 + push {r4, lr} + ldr r0, _0224577C ; =0x02257760 + mov r1, #0xa6 + ldr r2, [r0, #4] + lsl r1, r1, #2 + ldr r0, [r2, r1] + cmp r0, #0 + bne _02245778 + sub r0, r1, #4 + ldr r0, [r2, r0] + cmp r0, #0 + bne _02245778 + mov r0, #4 + sub r1, #0xb4 + bl sub_02018184 + mov r2, #0x79 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x2e + bl sub_020360DC + ldr r0, _0224577C ; =0x02257760 + mov r2, #0x64 + ldr r1, [r0, #4] + mov r0, #0xa6 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02245780 ; =ov23_02245700 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _0224577C ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa5 + lsl r1, r1, #2 + str r0, [r2, r1] +_02245778: + pop {r4, pc} + nop +_0224577C: .word 0x02257760 +_02245780: .word ov23_02245700 + thumb_func_end ov23_02245728 + + thumb_func_start ov23_02245784 +ov23_02245784: ; 0x02245784 + push {r3, lr} + ldr r0, _022457DC ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa5 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022457D8 + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _022457E0 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, #0x1c + bl sub_020BDEC4 + ldr r0, _022457DC ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa5 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + ldr r0, _022457DC ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, _022457DC ; =0x02257760 + mov r0, #0xa5 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, r0, #4 + str r3, [r1, r0] +_022457D8: + pop {r3, pc} + nop +_022457DC: .word 0x02257760 +_022457E0: .word 0x04000050 + thumb_func_end ov23_02245784 + + thumb_func_start ov23_022457E4 +ov23_022457E4: ; 0x022457E4 + ldr r1, _022457F4 ; =0x02257760 + lsl r0, r0, #1 + ldr r1, [r1, #4] + mov r2, #1 + add r1, r1, r0 + ldr r0, _022457F8 ; =0x00000B0C + strh r2, [r1, r0] + bx lr + ; .align 2, 0 +_022457F4: .word 0x02257760 +_022457F8: .word 0x00000B0C + thumb_func_end ov23_022457E4 + + thumb_func_start ov23_022457FC +ov23_022457FC: ; 0x022457FC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r5, #0 + str r5, [sp] +_02245804: + ldr r0, _02245890 ; =0x02257760 + ldr r1, _02245894 ; =0x00000B0C + ldr r0, [r0, #4] + add r2, r0, r5 + ldrh r1, [r2, r1] + sub r4, r1, #1 + cmp r1, #0 + beq _02245880 + lsl r7, r4, #2 +_02245816: + add r1, r0, r7 + ldr r0, _02245898 ; =0x000007C4 + ldr r6, [r1, r0] + cmp r6, #0 + beq _0224585A + ldrb r0, [r6, #4] + cmp r0, #0 + beq _0224585A + add r0, r6, #0 + bl ov23_0224426C + ldr r1, [sp] + cmp r0, r1 + beq _02245836 + cmp r0, #8 + blt _0224585A +_02245836: + ldrh r0, [r6] + add r1, sp, #4 + strh r0, [r1] + ldrh r0, [r6, #2] + strh r0, [r1, #2] + ldr r0, [sp] + strb r0, [r1, #4] + mov r0, #0x2f + add r1, sp, #4 + bl sub_02035B48 + ldr r0, _02245890 ; =0x02257760 + add r2, r4, #2 + ldr r0, [r0, #4] + add r1, r0, r5 + ldr r0, _02245894 ; =0x00000B0C + strh r2, [r1, r0] + b _02245880 +_0224585A: + add r4, r4, #1 + add r7, r7, #4 + cmp r4, #0xc0 + blt _02245870 + ldr r0, _02245890 ; =0x02257760 + mov r2, #0 + ldr r0, [r0, #4] + add r1, r0, r5 + ldr r0, _02245894 ; =0x00000B0C + strh r2, [r1, r0] + b _02245880 +_02245870: + ldr r0, _02245890 ; =0x02257760 + ldr r1, _02245894 ; =0x00000B0C + ldr r0, [r0, #4] + add r2, r5, r0 + ldrh r1, [r2, r1] + sub r1, r1, #1 + cmp r4, r1 + bne _02245816 +_02245880: + ldr r0, [sp] + add r5, r5, #2 + add r0, r0, #1 + str r0, [sp] + cmp r0, #8 + blt _02245804 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245890: .word 0x02257760 +_02245894: .word 0x00000B0C +_02245898: .word 0x000007C4 + thumb_func_end ov23_022457FC + + thumb_func_start ov23_0224589C +ov23_0224589C: ; 0x0224589C + push {r3, r4, r5, lr} + ldr r0, _02245904 ; =0x02257760 + add r4, r2, #0 + ldr r1, [r0, #4] + mov r0, #0xa6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02245900 + bl sub_0203608C + ldrb r1, [r4, #4] + cmp r1, r0 + bne _02245900 + ldr r0, _02245904 ; =0x02257760 + mov r1, #0xa6 + ldr r0, [r0, #4] + lsl r1, r1, #2 + ldr r5, [r0, r1] + sub r1, #0xb8 + ldrb r1, [r5, r1] + mov r2, #6 + add r0, r4, #0 + add r3, r1, #0 + mul r3, r2 + add r1, r5, r3 + bl sub_020C4DB0 + ldr r2, _02245904 ; =0x02257760 + mov r1, #0xa6 + ldr r0, [r2, #4] + lsl r1, r1, #2 + ldr r4, [r0, r1] + add r0, r1, #0 + sub r0, #0xb8 + ldrb r0, [r4, r0] + add r3, r0, #1 + add r0, r1, #0 + sub r0, #0xb8 + strb r3, [r4, r0] + ldr r0, [r2, #4] + ldr r2, [r0, r1] + add r0, r1, #0 + sub r0, #0xb8 + ldrb r0, [r2, r0] + cmp r0, #0x50 + blo _02245900 + mov r0, #0 + sub r1, #0xb8 + strb r0, [r2, r1] +_02245900: + pop {r3, r4, r5, pc} + nop +_02245904: .word 0x02257760 + thumb_func_end ov23_0224589C + + thumb_func_start ov23_02245908 +ov23_02245908: ; 0x02245908 + mov r0, #6 + bx lr + thumb_func_end ov23_02245908 + + thumb_func_start ov23_0224590C +ov23_0224590C: ; 0x0224590C + push {r4, lr} + add r4, r0, #0 + bl sub_0203608C + cmp r4, r0 + bne _02245930 + ldr r1, _02245934 ; =0x02257760 + mov r0, #0xa7 + ldr r2, [r1, #4] + lsl r0, r0, #2 + ldr r3, [r2, r0] + cmp r3, #0 + beq _02245930 + mov r2, #2 + str r2, [r3, #0] + ldr r1, [r1, #4] + mov r2, #0 + str r2, [r1, r0] +_02245930: + pop {r4, pc} + nop +_02245934: .word 0x02257760 + thumb_func_end ov23_0224590C + + thumb_func_start ov23_02245938 +ov23_02245938: ; 0x02245938 + push {r3, lr} + ldr r0, _02245994 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02245990 + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _02245998 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, #0x1c + bl sub_020BDEC4 + bl sub_0203568C + ldr r0, _02245994 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + ldr r0, _02245994 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, _02245994 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_02245990: + pop {r3, pc} + nop +_02245994: .word 0x02257760 +_02245998: .word 0x04000050 + thumb_func_end ov23_02245938 + + thumb_func_start ov23_0224599C +ov23_0224599C: ; 0x0224599C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _022459B2 + cmp r0, #1 + beq _02245A4C + cmp r0, #2 + beq _02245A14 + pop {r3, r4, r5, pc} +_022459B2: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #1 + bne _022459C4 + bl ov23_02244C10 + str r0, [r4, #4] + b _022459EA +_022459C4: + cmp r0, #2 + bne _022459D8 + mov r0, #1 + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + b _022459EA +_022459D8: + cmp r0, #4 + bne _022459EA + mov r0, #1 + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 +_022459EA: + ldr r0, [r4, #0x10] + cmp r0, #0x1e + ble _02245A4C + bl ov23_0224219C + bl ov23_02254044 + mov r0, #1 + str r0, [r4, #0] + ldr r0, [r4, #8] + cmp r0, #0 + beq _02245A08 + bl sub_02035678 + b _02245A0C +_02245A08: + bl sub_02035664 +_02245A0C: + mov r0, #0x10 + bl sub_0205948C + pop {r3, r4, r5, pc} +_02245A14: + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _02245A50 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, #0x1c + bl sub_020BDEC4 + bl sub_0203568C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + ldr r1, _02245A54 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_02245A4C: + pop {r3, r4, r5, pc} + nop +_02245A50: .word 0x04000050 +_02245A54: .word 0x02257760 + thumb_func_end ov23_0224599C + + thumb_func_start ov23_02245A58 +ov23_02245A58: ; 0x02245A58 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + mov r1, #0x14 + bl sub_02018184 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0] + str r5, [r4, #8] + str r0, [r4, #0x10] + ldr r0, _02245A9C ; =0x02257760 + mov r2, #0x64 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02245AA0 ; =ov23_0224599C + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02245A9C ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + mov r0, #0x10 + bl sub_02059464 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245A9C: .word 0x02257760 +_02245AA0: .word ov23_0224599C + thumb_func_end ov23_02245A58 + + thumb_func_start ov23_02245AA4 +ov23_02245AA4: ; 0x02245AA4 + push {r4, lr} + add r4, r0, #0 + bl sub_0203608C + cmp r4, r0 + bne _02245AEE + ldr r0, _02245AF0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r1, r0] + cmp r4, #0 + beq _02245AEE + ldr r0, [r1, #0x40] + mov r1, #0 + ldr r0, [r0, #0x3c] + bl sub_0205ED0C + ldr r0, _02245AF0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + ldr r1, _02245AF0 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_02245AEE: + pop {r4, pc} + ; .align 2, 0 +_02245AF0: .word 0x02257760 + thumb_func_end ov23_02245AA4 + + thumb_func_start ov23_02245AF4 +ov23_02245AF4: ; 0x02245AF4 + push {r3, r4, r5, lr} + ldr r0, _02245B70 ; =0x02257760 + add r5, r1, #0 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r1, r0] + cmp r4, #0 + beq _02245B6E + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _02245B14 + bl sub_0207136C + mov r0, #0 + str r0, [r4, #0x14] +_02245B14: + ldrb r0, [r4, #0xd] + cmp r0, #0 + beq _02245B24 + cmp r5, #0 + beq _02245B24 + ldrb r0, [r4, #0xc] + bl ov23_022448FC +_02245B24: + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _02245B74 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, #0x1c + bl sub_020BDEC4 + ldr r0, _02245B70 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205ED0C + ldr r0, _02245B70 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + ldr r1, _02245B70 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_02245B6E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245B70: .word 0x02257760 +_02245B74: .word 0x04000050 + thumb_func_end ov23_02245AF4 + + thumb_func_start ov23_02245B78 +ov23_02245B78: ; 0x02245B78 + push {r4, lr} + add r4, r0, #0 + bl sub_0203608C + cmp r4, r0 + bne _02245B9C + ldr r0, _02245BA0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r1, [r1, r0] + cmp r1, #0 + beq _02245B9C + mov r0, #0xe + str r0, [r1, #0] + ldr r0, _02245BA4 ; =0x0000060B + bl sub_02005748 +_02245B9C: + pop {r4, pc} + nop +_02245BA0: .word 0x02257760 +_02245BA4: .word 0x0000060B + thumb_func_end ov23_02245B78 + + thumb_func_start ov23_02245BA8 +ov23_02245BA8: ; 0x02245BA8 + push {r4, r5, lr} + sub sp, #0x14 + ldr r3, _02245DE4 ; =0x022563F4 + add r4, r1, #0 + add r5, r0, #0 + add r2, sp, #4 + mov r1, #0xf +_02245BB6: + ldrb r0, [r3] + add r3, r3, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _02245BB6 + ldr r0, [r4, #0] + cmp r0, #0xe + bhi _02245C7A + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02245BD4: ; jump table + .short _02245BF2 - _02245BD4 - 2 ; case 0 + .short _02245C06 - _02245BD4 - 2 ; case 1 + .short _02245C1E - _02245BD4 - 2 ; case 2 + .short _02245C26 - _02245BD4 - 2 ; case 3 + .short _02245C3E - _02245BD4 - 2 ; case 4 + .short _02245C70 - _02245BD4 - 2 ; case 5 + .short _02245C70 - _02245BD4 - 2 ; case 6 + .short _02245CFC - _02245BD4 - 2 ; case 7 + .short _02245DDE - _02245BD4 - 2 ; case 8 + .short _02245D20 - _02245BD4 - 2 ; case 9 + .short _02245DDE - _02245BD4 - 2 ; case 10 + .short _02245D50 - _02245BD4 - 2 ; case 11 + .short _02245D6C - _02245BD4 - 2 ; case 12 + .short _02245DDE - _02245BD4 - 2 ; case 13 + .short _02245D92 - _02245BD4 - 2 ; case 14 +_02245BF2: + bl ov23_02244C10 + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0x1c] + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245C06: + mov r0, #1 + str r0, [sp] + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245C1E: + add r0, r0, #1 + add sp, #0x14 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245C26: + mov r0, #1 + str r0, [sp] + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245C3E: + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + cmp r0, #0x3c + ble _02245C56 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #0x1c] + pop {r4, r5, pc} +_02245C56: + ldrb r0, [r4, #0xc] + mov r1, #1 + bl ov23_0224495C + cmp r0, #0 + beq _02245C7A + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #0x1c] + pop {r4, r5, pc} +_02245C70: + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + cmp r0, #0x1e + bgt _02245C7C +_02245C7A: + b _02245DDE +_02245C7C: + mov r0, #0x10 + bl sub_0205948C + bl ov23_0224219C + bl ov23_02254044 + mov r0, #7 + str r0, [r4, #0] + ldr r0, _02245DE8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + add r5, r0, #0 + ldr r0, _02245DE8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + add r2, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + bne _02245CD6 + mov r0, #0x20 + str r0, [sp] + ldr r0, _02245DE8 ; =0x02257760 + add r1, r5, #0 + ldr r0, [r0, #4] + mov r3, #2 + ldr r0, [r0, #0x40] + bl ov5_021F4EAC + str r0, [r4, #0x14] + ldr r0, _02245DE8 ; =0x02257760 + ldr r1, _02245DEC ; =0xFFFFE000 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205ED0C + add sp, #0x14 + pop {r4, r5, pc} +_02245CD6: + mov r0, #0x20 + str r0, [sp] + ldr r0, _02245DE8 ; =0x02257760 + add r1, r5, #0 + ldr r0, [r0, #4] + mov r3, #3 + ldr r0, [r0, #0x40] + bl ov5_021F4EAC + str r0, [r4, #0x14] + ldr r0, _02245DE8 ; =0x02257760 + ldr r1, _02245DF0 ; =0xFFFFD000 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205ED0C + add sp, #0x14 + pop {r4, r5, pc} +_02245CFC: + ldr r0, _02245DE8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EA78 + add r5, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, r5 + beq _02245D16 + ldr r0, _02245DF4 ; =0x000005EB + bl sub_02005748 +_02245D16: + str r5, [r4, #0x18] + mov r0, #0 + add sp, #0x14 + str r0, [r4, #0x10] + pop {r4, r5, pc} +_02245D20: + ldr r0, _02245DE8 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205ED0C + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + ldr r1, _02245DE8 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] + add sp, #0x14 + pop {r4, r5, pc} +_02245D50: + mov r0, #0 + strb r0, [r4, #0xd] + mov r0, #0x10 + bl sub_0205948C + ldrb r0, [r4, #0xc] + bl ov23_022448FC + mov r0, #0 + str r0, [r4, #0x1c] + mov r0, #0xc + add sp, #0x14 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245D6C: + ldr r0, [r4, #0x1c] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #0x1c] + ldrb r0, [r4, #0xc] + bl ov23_0224495C + cmp r0, #0 + bne _02245D84 + ldr r0, [r4, #0x1c] + cmp r0, #0x3c + ble _02245DDE +_02245D84: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + add sp, #0x14 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245D92: + ldr r1, [r4, #0x10] + add r0, sp, #4 + ldrsb r1, [r0, r1] + mov r0, #9 + mvn r0, r0 + cmp r1, r0 + beq _02245DDE + ldr r0, _02245DE8 ; =0x02257760 + lsl r1, r1, #0xc + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205ED0C + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #5 + bne _02245DDE + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _02245DC6 + bl sub_0207136C + mov r0, #0 + str r0, [r4, #0x14] +_02245DC6: + ldrb r0, [r4, #0xd] + cmp r0, #0 + beq _02245DD4 + mov r0, #0xb + add sp, #0x14 + str r0, [r4, #0] + pop {r4, r5, pc} +_02245DD4: + mov r0, #0x29 + bl sub_020360DC + mov r0, #9 + str r0, [r4, #0] +_02245DDE: + add sp, #0x14 + pop {r4, r5, pc} + nop +_02245DE4: .word 0x022563F4 +_02245DE8: .word 0x02257760 +_02245DEC: .word 0xFFFFE000 +_02245DF0: .word 0xFFFFD000 +_02245DF4: .word 0x000005EB + thumb_func_end ov23_02245BA8 + + thumb_func_start ov23_02245DF8 +ov23_02245DF8: ; 0x02245DF8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #4 + mov r1, #0x24 + add r7, r2, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x24 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0] + str r5, [r4, #8] + str r0, [r4, #0x10] + ldr r0, _02245E4C ; =0x02257760 + strb r6, [r4, #0xd] + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EA78 + str r0, [r4, #0x18] + ldr r0, _02245E4C ; =0x02257760 + strb r7, [r4, #0xc] + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02245E50 ; =ov23_02245BA8 + add r1, r4, #0 + mov r2, #0x64 + bl sub_0200D9E8 + ldr r1, _02245E4C ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245E4C: .word 0x02257760 +_02245E50: .word ov23_02245BA8 + thumb_func_end ov23_02245DF8 + + thumb_func_start ov23_02245E54 +ov23_02245E54: ; 0x02245E54 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #4 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02245E74 + mov r0, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov23_02245DF8 +_02245E74: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02245E54 + + thumb_func_start ov23_02245E78 +ov23_02245E78: ; 0x02245E78 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #4 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02245E98 + mov r0, #1 + add r1, r4, #0 + add r2, r6, #0 + bl ov23_02245DF8 +_02245E98: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02245E78 + + thumb_func_start ov23_02245E9C +ov23_02245E9C: ; 0x02245E9C + push {r4, lr} + add r4, r0, #0 + bl ov23_0224AD98 + add r0, r4, #0 + bl sub_020593B4 + pop {r4, pc} + thumb_func_end ov23_02245E9C + + thumb_func_start ov23_02245EAC +ov23_02245EAC: ; 0x02245EAC + push {r4, lr} + add r4, r0, #0 + mov r1, #4 + bl ov23_0224AD7C + add r0, r4, #0 + mov r1, #0xa + bl sub_02059390 + pop {r4, pc} + thumb_func_end ov23_02245EAC + + thumb_func_start ov23_02245EC0 +ov23_02245EC0: ; 0x02245EC0 + push {r4, lr} + add r4, r0, #0 + mov r1, #4 + bl ov23_0224AD7C + add r0, r4, #0 + mov r1, #0x14 + bl sub_02059390 + pop {r4, pc} + thumb_func_end ov23_02245EC0 + + thumb_func_start ov23_02245ED4 +ov23_02245ED4: ; 0x02245ED4 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r0, #0 + add r0, sp, #0xc + bl sub_020361BC + mov r0, #0x45 + lsl r0, r0, #2 + ldrb r0, [r7, r0] + mov r4, #0 + cmp r0, #0 + ble _02245F8A + mov r0, #0 + add r5, r7, #0 + add r6, r7, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] +_02245EF8: + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x20] + add r0, r0, r2 + str r0, [sp, #0xc] + adc r1, r3 + ldr r0, [sp] + str r1, [sp, #0x10] + lsl r2, r0, #8 + lsr r1, r1, #0x18 + add r0, r5, #0 + orr r2, r1 + add r0, #0x48 + strh r2, [r0] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x20] + add r0, r0, r2 + adc r1, r3 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + add r0, r1, #0 + ldr r1, [sp, #4] + mov r2, #0xc0 + mov r3, #0 + bl sub_020E1F1C + add r0, r5, #0 + add r0, #0x4a + strh r1, [r0] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x20] + add r0, r0, r2 + adc r1, r3 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + add r0, r1, #0 + ldr r1, [sp, #8] + ldr r2, _02245F90 ; =0x0000FFFF + mov r3, #0 + bl sub_020E1F1C + mov r0, #0x45 + strh r1, [r6, #8] + lsl r0, r0, #2 + ldrb r0, [r7, r0] + add r4, r4, #1 + add r5, r5, #4 + add r6, r6, #2 + cmp r4, r0 + blt _02245EF8 +_02245F8A: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02245F90: .word 0x0000FFFF + thumb_func_end ov23_02245ED4 + + thumb_func_start ov23_02245F94 +ov23_02245F94: ; 0x02245F94 + push {r4, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0xc + bls _02245FA2 + b _02246208 +_02245FA2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02245FAE: ; jump table + .short _02245FC8 - _02245FAE - 2 ; case 0 + .short _02245FE2 - _02245FAE - 2 ; case 1 + .short _0224602E - _02245FAE - 2 ; case 2 + .short _02246070 - _02245FAE - 2 ; case 3 + .short _022460BC - _02245FAE - 2 ; case 4 + .short _022460FA - _02245FAE - 2 ; case 5 + .short _02246130 - _02245FAE - 2 ; case 6 + .short _0224616A - _02245FAE - 2 ; case 7 + .short _022461B2 - _02245FAE - 2 ; case 8 + .short _022461BE - _02245FAE - 2 ; case 9 + .short _02246208 - _02245FAE - 2 ; case 10 + .short _022461CE - _02245FAE - 2 ; case 11 + .short _022461F0 - _02245FAE - 2 ; case 12 +_02245FC8: + bl ov23_02244C10 + str r0, [r4, #4] + ldr r0, _0224620C ; =0x00000111 + mov r1, #0 + strb r1, [r4, r0] + bl ov23_02246324 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02245FE2: + mov r0, #1 + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + ldr r0, _02246210 ; =0x02257760 + ldr r1, _02246214 ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1d + bne _02246000 + mov r2, #2 + b _02246002 +_02246000: + mov r2, #0x1c +_02246002: + mov r3, #0 + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x17 + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_0200985C + ldr r1, _02246210 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_0224602E: + ldr r0, _02246210 ; =0x02257760 + ldr r1, _02246214 ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1d + bne _0224603E + mov r2, #3 + b _02246040 +_0224603E: + mov r2, #0x1d +_02246040: + mov r3, #0 + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r1, #7 + str r1, [sp, #8] + mov r1, #4 + str r1, [sp, #0xc] + mov r1, #0x5d + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_020098B8 + ldr r1, _02246210 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246070: + mov r0, #1 + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + ldr r0, _02246210 ; =0x02257760 + ldr r1, _02246214 ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1d + bne _0224608E + mov r2, #1 + b _02246090 +_0224608E: + mov r2, #0x1b +_02246090: + mov r3, #0 + str r3, [sp] + mov r1, #2 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x5e + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02246210 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_022460BC: + ldr r0, _02246210 ; =0x02257760 + ldr r1, _02246214 ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1d + bne _022460CC + mov r2, #0 + b _022460CE +_022460CC: + mov r2, #0x1a +_022460CE: + mov r3, #0 + str r3, [sp] + mov r1, #3 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x5f + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02246210 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_022460FA: + ldr r0, _02246210 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A450 + ldr r0, _02246210 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + mov r0, #0x45 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + bl ov23_0224644C + add r0, r4, #0 + bl ov23_02245ED4 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246130: + ldr r0, _0224620C ; =0x00000111 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #0x1e + bls _02246208 + mov r0, #1 + sub r1, r0, #5 + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x4c + add r3, r2, #0 + bl ov23_02253F60 + mov r0, #7 + str r0, [r4, #0] + mov r0, #0x46 + mov r1, #0 + lsl r0, r0, #2 + add sp, #0x10 + str r1, [r4, r0] + pop {r4, pc} +_0224616A: + ldr r0, _02246210 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02246640 + cmp r0, #0 + beq _02246192 + ldr r0, _02246218 ; =0x00000113 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _02246188 + mov r0, #0xb + str r0, [r4, #0] + b _02246192 +_02246188: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02246192: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0x3c + bge _02246208 + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0x3c + bne _02246208 + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r4, pc} +_022461B2: + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r4, pc} +_022461BE: + bl sub_0203608C + ldr r1, _02246218 ; =0x00000113 + ldrb r1, [r4, r1] + bl ov23_02246220 + add sp, #0x10 + pop {r4, pc} +_022461CE: + ldr r0, _02246218 ; =0x00000113 + mov r1, #0 + strb r1, [r4, r0] + mov r0, #0x10 + bl sub_0205948C + ldr r0, _0224621C ; =0x00000112 + ldrb r0, [r4, r0] + bl ov23_022448FC + ldr r0, _0224620C ; =0x00000111 + mov r1, #0 + strb r1, [r4, r0] + mov r0, #0xc + add sp, #0x10 + str r0, [r4, #0] + pop {r4, pc} +_022461F0: + ldr r0, _0224620C ; =0x00000111 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #8 + bls _02246208 + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02246208: + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0224620C: .word 0x00000111 +_02246210: .word 0x02257760 +_02246214: .word 0x00000B3B +_02246218: .word 0x00000113 +_0224621C: .word 0x00000112 + thumb_func_end ov23_02245F94 + + thumb_func_start ov23_02246220 +ov23_02246220: ; 0x02246220 + push {r3, r4, lr} + sub sp, #4 + ldr r0, _022462A0 ; =0x02257760 + ldr r2, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r2, r0] + cmp r4, #0 + beq _0224629C + ldr r0, _022462A4 ; =0x00000113 + ldrb r2, [r4, r0] + cmp r2, #0 + beq _02246246 + cmp r1, #0 + beq _02246246 + sub r0, r0, #1 + ldrb r0, [r4, r0] + bl ov23_022448FC +_02246246: + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + mov r0, #1 + mov r1, #0 + sub r2, r1, #4 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + mov r0, #0x45 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + bl ov23_02246370 + mov r0, #0x10 + bl sub_0205948C + ldr r0, _022462A0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + ldr r0, _022462A0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, _022462A0 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_0224629C: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_022462A0: .word 0x02257760 +_022462A4: .word 0x00000113 + thumb_func_end ov23_02246220 + + thumb_func_start ov23_022462A8 +ov23_022462A8: ; 0x022462A8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x12 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #4 + add r7, r2, #0 + bl sub_02018144 + mov r2, #0x12 + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _02246310 ; =0x00000113 + add r1, r0, #0 + strb r6, [r4, r0] + add r1, #9 + str r5, [r4, r1] + ldr r1, _02246314 ; =0x02257760 + ldr r2, [r1, #4] + ldr r1, _02246318 ; =0x00000B3B + ldrb r1, [r2, r1] + cmp r1, #0x1d + bne _022462E4 + mov r1, #0x20 + add r0, r1, #0 + add r0, #0xf4 + b _022462E8 +_022462E4: + mov r1, #0x10 + add r0, r0, #1 +_022462E8: + strb r1, [r4, r0] + ldr r0, _0224631C ; =0x00000112 + mov r2, #0x64 + strb r7, [r4, r0] + ldr r0, _02246314 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02246320 ; =ov23_02245F94 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02246314 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r3, r4, r5, r6, r7, pc} + nop +_02246310: .word 0x00000113 +_02246314: .word 0x02257760 +_02246318: .word 0x00000B3B +_0224631C: .word 0x00000112 +_02246320: .word ov23_02245F94 + thumb_func_end ov23_022462A8 + + thumb_func_start ov23_02246324 +ov23_02246324: ; 0x02246324 + push {r3, r4, r5, r6, r7, lr} + ldr r1, _0224636C ; =0x02257760 + mov r0, #0x20 + ldr r1, [r1, #4] + mov r2, #4 + add r1, #0x48 + bl sub_020095C4 + ldr r1, _0224636C ; =0x02257760 + ldr r2, [r1, #4] + str r0, [r2, #0x44] + ldr r0, [r1, #4] + mov r2, #6 + add r0, #0x48 + mov r1, #0 + lsl r2, r2, #0x12 + bl sub_0200964C + mov r4, #0 + mov r7, #0x17 + ldr r6, _0224636C ; =0x02257760 + add r5, r4, #0 + lsl r7, r7, #4 +_02246352: + mov r0, #2 + add r1, r4, #0 + mov r2, #4 + bl sub_02009714 + ldr r1, [r6, #4] + add r4, r4, #1 + add r1, r1, r5 + add r5, r5, #4 + str r0, [r1, r7] + cmp r4, #4 + blt _02246352 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224636C: .word 0x02257760 + thumb_func_end ov23_02246324 + + thumb_func_start ov23_02246370 +ov23_02246370: ; 0x02246370 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r4, #0 + cmp r6, #0 + ble _022463A4 + ldr r7, _02246448 ; =0x02257760 + add r5, r4, #0 +_0224637E: + ldr r0, [r7, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224639C + bl sub_02021BD4 + ldr r0, [r7, #4] + mov r1, #0 + add r2, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + str r1, [r2, r0] +_0224639C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r6 + blt _0224637E +_022463A4: + ldr r0, _02246448 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022463CC + bl sub_02009E08 + bl sub_0201EAD8 + cmp r0, #0 + beq _022463CC + ldr r0, _02246448 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A4E4 +_022463CC: + ldr r1, _02246448 ; =0x02257760 + mov r0, #0x19 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #4 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022463FC + bl sub_02009E08 + bl sub_0201F9DC + cmp r0, #0 + beq _022463FC + ldr r0, _02246448 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A6DC +_022463FC: + ldr r6, _02246448 ; =0x02257760 + mov r5, #0 + mov r0, #0x65 + ldr r1, [r6, #4] + lsl r0, r0, #2 + str r5, [r1, r0] + add r4, r5, #0 + add r7, r5, #0 +_0224640C: + ldr r0, [r6, #4] + add r1, r0, r4 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224641E + bl sub_02009754 +_0224641E: + ldr r0, [r6, #4] + add r5, r5, #1 + add r1, r0, r4 + mov r0, #0x17 + lsl r0, r0, #4 + add r4, r4, #4 + str r7, [r1, r0] + cmp r5, #4 + blt _0224640C + ldr r0, _02246448 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + cmp r0, #0 + beq _0224643E + bl sub_02021964 +_0224643E: + ldr r0, _02246448 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + str r1, [r0, #0x44] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246448: .word 0x02257760 + thumb_func_end ov23_02246370 + + thumb_func_start ov23_0224644C +ov23_0224644C: ; 0x0224644C + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + add r7, r0, #0 + ldr r0, _02246544 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + sub r2, r1, #1 + str r1, [sp] + str r2, [sp, #4] + str r2, [sp, #8] + str r1, [sp, #0xc] + mov r3, #0x17 + str r1, [sp, #0x10] + lsl r3, r3, #4 + ldr r2, [r0, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r0, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r0, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + add r3, #0x64 + str r2, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r0, r3 + add r2, r1, #0 + add r3, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + ldr r4, _02246544 ; =0x02257760 + mov r6, #0 + ldr r1, [r4, #4] + ldr r0, [r1, #0x44] + str r0, [sp, #0x2c] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x30] + mov r1, #2 + mov r0, #6 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + lsr r0, r1, #5 + str r1, [sp, #0x34] + str r6, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + add r0, sp, #0x2c + strh r6, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x54] + mov r0, #4 + str r6, [sp, #0x50] + str r0, [sp, #0x58] + cmp r7, #0 + ble _0224652E + add r5, r6, #0 +_022464CE: + mov r0, #0x4b + lsl r0, r0, #0xe + str r0, [sp, #0x34] + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021AA0 + ldr r1, [r4, #4] + add r2, r1, r5 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CC8 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021E50 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021E80 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r7 + blt _022464CE +_0224652E: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_02246544: .word 0x02257760 + thumb_func_end ov23_0224644C + + thumb_func_start ov23_02246548 +ov23_02246548: ; 0x02246548 + push {r4, lr} + lsl r4, r0, #2 + ldr r0, _02246570 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r4 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224656E + bl sub_02021BD4 + ldr r0, _02246570 ; =0x02257760 + mov r2, #0 + ldr r0, [r0, #4] + add r1, r0, r4 + mov r0, #0x7e + lsl r0, r0, #2 + str r2, [r1, r0] +_0224656E: + pop {r4, pc} + ; .align 2, 0 +_02246570: .word 0x02257760 + thumb_func_end ov23_02246548 + + thumb_func_start ov23_02246574 +ov23_02246574: ; 0x02246574 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r3, r0, #0 + add r0, r1, #0 + lsl r5, r3, #2 + add r1, r0, r5 + add r1, #0x48 + ldrh r1, [r1] + str r1, [sp] + add r1, r0, r5 + add r1, #0x4a + ldrh r7, [r1] + cmp r2, #0 + bne _022465A0 + add r6, r0, #0 + add r6, #8 + lsl r4, r3, #1 + mov r1, #1 + ldrh r2, [r6, r4] + lsl r1, r1, #0xa + add r1, r2, r1 + strh r1, [r6, r4] +_022465A0: + lsl r1, r3, #1 + add r0, r0, r1 + ldrh r0, [r0, #8] + mov r2, #0x12 + lsl r2, r2, #0xa + asr r0, r0, #4 + lsl r6, r0, #1 + ldr r0, _0224661C ; =0x020F983C + lsl r1, r6, #1 + ldrsh r0, [r0, r1] + mov r3, #0 + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsr r4, r2, #0xc + lsl r0, r1, #0x14 + orr r4, r0 + add r0, r6, #1 + lsl r1, r0, #1 + ldr r0, _0224661C ; =0x020F983C + mov r2, #0xa + ldrsh r0, [r0, r1] + lsl r2, r2, #0xa + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + bpl _022465F2 + neg r1, r1 +_022465F2: + ldr r0, _02246620 ; =0x02257760 + ldr r2, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + add r0, r2, r0 + ldr r2, [r0, r5] + cmp r2, #0 + beq _02246618 + ldr r2, [sp] + lsl r2, r2, #0xc + add r2, r4, r2 + str r2, [sp, #4] + lsl r2, r7, #0xc + add r1, r1, r2 + str r1, [sp, #8] + ldr r0, [r0, r5] + add r1, sp, #4 + bl sub_02021C50 +_02246618: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224661C: .word 0x020F983C +_02246620: .word 0x02257760 + thumb_func_end ov23_02246574 + + thumb_func_start ov23_02246624 +ov23_02246624: ; 0x02246624 + cmp r0, #0 + bne _02246634 + ldr r1, _02246638 ; =0x02257760 + mov r0, #0 + ldrsb r2, [r1, r0] + ldr r1, [r1, #4] + ldr r0, _0224663C ; =0x00000B3A + strb r2, [r1, r0] +_02246634: + bx lr + nop +_02246638: .word 0x02257760 +_0224663C: .word 0x00000B3A + thumb_func_end ov23_02246624 + + thumb_func_start ov23_02246640 +ov23_02246640: ; 0x02246640 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + ldr r1, _02246890 ; =0x02257760 + ldr r2, _02246894 ; =ov23_02246624 + mov r3, #0 + mov r0, #2 + bl sub_02004B70 + ldr r0, _02246898 ; =0x02257760 + ldr r2, [r0, #4] + ldr r0, _0224689C ; =0x00000B3B + ldrb r1, [r2, r0] + cmp r1, #0x1d + bne _0224666E + sub r0, r0, #1 + ldrsb r0, [r2, r0] + bl sub_020D4070 + mov r1, #0x21 + bl sub_020E1F6C + b _0224667C +_0224666E: + sub r0, r0, #1 + ldrsb r0, [r2, r0] + bl sub_020D4070 + mov r1, #0x19 + bl sub_020E1F6C +_0224667C: + mov r1, #0x11 + lsl r1, r1, #4 + ldrb r1, [r5, r1] + mov r2, #0x7e + lsl r2, r2, #2 + add r1, r5, r1 + add r1, #0xc8 + strb r0, [r1] + ldr r0, _02246898 ; =0x02257760 + add r1, r2, #0 + mov r4, #0 + ldr r0, [r0, #4] + sub r1, #0xe4 + b _022466A4 +_02246698: + lsl r3, r4, #2 + add r3, r0, r3 + ldr r3, [r3, r2] + cmp r3, #0 + bne _022466AA + add r4, r4, #1 +_022466A4: + ldrb r3, [r5, r1] + cmp r4, r3 + blt _02246698 +_022466AA: + mov r0, #0x45 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + cmp r4, r0 + bne _022466BA + add sp, #0x18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022466BA: + add r0, r5, #0 + str r0, [sp, #0x10] + add r0, #0x4a + add r7, r5, #0 + mov r4, #0 + str r0, [sp, #0x10] + add r7, #0x48 + b _0224685E +_022466CA: + lsl r2, r4, #2 + add r0, r5, r2 + add r0, #0x48 + ldrh r1, [r0] + cmp r1, #0 + beq _022466EC + mov r0, #1 + lsl r0, r0, #8 + cmp r1, r0 + bhs _022466EC + add r0, r5, r2 + add r0, #0x4a + ldrh r0, [r0] + cmp r0, #0 + beq _022466EC + cmp r0, #0xc0 + blo _022466F4 +_022466EC: + add r0, r4, #0 + bl ov23_02246548 + b _0224685C +_022466F4: + mov r0, #0x11 + lsl r0, r0, #4 + ldrb r1, [r5, r0] + add r0, r5, r4 + add r0, #0xf0 + ldrb r0, [r0] + sub r0, r1, r0 + bpl _02246706 + add r0, #0x28 +_02246706: + add r0, r5, r0 + add r0, #0xc8 + lsl r1, r4, #2 + ldrb r6, [r0] + add r0, r5, r1 + add r0, #0x48 + add r1, r5, r1 + ldrh r0, [r0] + add r1, #0x4a + ldrh r1, [r1] + sub r0, #0x80 + lsl r0, r0, #0xc + sub r1, #0x60 + str r0, [sp, #4] + lsl r0, r1, #0xc + asr r1, r0, #0x1f + add r2, r0, #0 + add r3, r1, #0 + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _022468A0 ; =0x00000000 + adc r1, r2 + lsr r0, r0, #0xc + lsl r1, r1, #0x14 + str r0, [sp, #8] + orr r0, r1 + str r0, [sp, #8] + ldr r0, [sp, #4] + asr r1, r0, #0x1f + add r2, r0, #0 + add r3, r1, #0 + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _022468A0 ; =0x00000000 + adc r1, r2 + lsr r2, r0, #0xc + lsl r1, r1, #0x14 + ldr r0, [sp, #8] + orr r2, r1 + add r0, r2, r0 + bl sub_020BCFF0 + str r0, [sp, #0xc] + cmp r6, #0 + bne _0224679A + mov r1, #0xa + lsl r1, r1, #0x10 + bl sub_020BCFD0 + mov r2, #0x26 + asr r1, r0, #0x1f + lsl r2, r2, #0xc + mov r3, #0 + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _022468A0 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + asr r1, r0, #0xc + add r0, r5, r4 + add r0, #0xf0 + strb r1, [r0] + b _02246852 +_0224679A: + lsl r2, r4, #2 + add r0, r5, r2 + add r0, #0x48 + ldrh r1, [r0] + add r0, r5, r2 + add r0, #0x4a + ldrh r0, [r0] + sub r1, #0x80 + sub r0, #0x60 + bne _022467C0 + cmp r1, #0 + ldrh r0, [r7, r2] + bge _022467BA + sub r0, r0, r6 + strh r0, [r7, r2] + b _02246852 +_022467BA: + add r0, r0, r6 + strh r0, [r7, r2] + b _02246852 +_022467C0: + cmp r1, #0 + bne _022467E0 + cmp r0, #0 + bge _022467D4 + ldr r0, [sp, #0x10] + ldrh r0, [r0, r2] + sub r1, r0, r6 + ldr r0, [sp, #0x10] + strh r1, [r0, r2] + b _02246852 +_022467D4: + ldr r0, [sp, #0x10] + ldrh r0, [r0, r2] + add r1, r0, r6 + ldr r0, [sp, #0x10] + strh r1, [r0, r2] + b _02246852 +_022467E0: + bl sub_020BDA20 + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + lsl r1, r6, #0xc + add r0, r0, r1 + str r0, [sp] + ldr r0, [sp, #0x14] + ldr r2, [sp] + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _022468A4 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _022468A0 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + asr r1, r0, #0xc + lsl r0, r4, #2 + add r0, r5, r0 + ldr r2, [sp] + add r1, #0x60 + add r0, #0x4a + strh r1, [r0] + ldr r0, [sp, #0x14] + asr r3, r2, #0x1f + asr r0, r0, #4 + lsl r0, r0, #1 + add r0, r0, #1 + lsl r1, r0, #1 + ldr r0, _022468A4 ; =0x020F983C + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _022468A0 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + asr r1, r0, #0xc + lsl r0, r4, #2 + add r0, r5, r0 + add r1, #0x80 + add r0, #0x48 + strh r1, [r0] +_02246852: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov23_02246574 +_0224685C: + add r4, r4, #1 +_0224685E: + mov r0, #0x45 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + cmp r4, r0 + bge _0224686A + b _022466CA +_0224686A: + mov r0, #0x11 + lsl r0, r0, #4 + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + ldrb r1, [r5, r0] + cmp r1, #0x28 + blo _0224687E + mov r1, #0 + strb r1, [r5, r0] +_0224687E: + ldr r0, _02246898 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + bl sub_020219F8 + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02246890: .word 0x02257760 +_02246894: .word ov23_02246624 +_02246898: .word 0x02257760 +_0224689C: .word 0x00000B3B +_022468A0: .word 0x00000000 +_022468A4: .word 0x020F983C + thumb_func_end ov23_02246640 + + thumb_func_start ov23_022468A8 +ov23_022468A8: ; 0x022468A8 + push {r3, lr} + ldr r1, _022468BC ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0x2a + lsl r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, #0 + beq _022468BA + blx r1 +_022468BA: + pop {r3, pc} + ; .align 2, 0 +_022468BC: .word 0x02257760 + thumb_func_end ov23_022468A8 + + thumb_func_start ov23_022468C0 +ov23_022468C0: ; 0x022468C0 + ldr r0, _022468D4 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022468D8 ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0x17 + bne _022468D0 + mov r0, #0x14 + bx lr +_022468D0: + mov r0, #7 + bx lr + ; .align 2, 0 +_022468D4: .word 0x02257760 +_022468D8: .word 0x00000B3B + thumb_func_end ov23_022468C0 + + thumb_func_start ov23_022468DC +ov23_022468DC: ; 0x022468DC + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #0xc] + add r0, sp, #0x24 + bl sub_020361BC + bl ov23_022468C0 + str r0, [sp, #4] + ldr r0, _02246A70 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _02246A74 ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0x17 + bne _02246922 + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x30] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + bl sub_020E1F1C + ldr r2, [sp, #0x34] + ldr r3, [sp, #0x38] + add r0, r2, r0 + adc r3, r1 + mov r1, #0 + str r0, [sp, #0x24] + lsr r0, r3, #0x1f + lsl r1, r1, #1 + orr r1, r0 + add r0, r1, #1 + str r3, [sp, #0x28] + str r0, [sp, #0xc] +_02246922: + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x30] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + bl sub_020E1F1C + ldr r2, [sp, #0x34] + ldr r3, [sp, #0x38] + add r0, r2, r0 + adc r3, r1 + str r0, [sp, #0x24] + str r3, [sp, #0x28] + add r0, r3, #0 + mov r1, #0 + mov r2, #3 + mov r3, #0 + bl sub_020E1F1C + ldr r0, [sp, #0xc] + mov r6, #0 + add r0, r0, r1 + add r0, r0, #5 + str r0, [sp, #8] + ldr r0, [sp, #4] + cmp r0, #0 + bgt _02246958 + b _02246A6A +_02246958: + mov r0, #0 + str r0, [sp, #0x14] + str r0, [sp, #0x18] + str r0, [sp, #0x1c] + str r0, [sp, #0x20] +_02246962: + ldr r0, [sp, #4] + sub r0, r0, r6 + sub r4, r0, #1 + ldr r0, [sp, #0xc] + cmp r6, r0 + bge _02246976 + add r1, r5, r4 + mov r0, #0 + strb r0, [r1, #8] + b _0224698A +_02246976: + ldr r0, [sp, #8] + cmp r6, r0 + bge _02246984 + add r1, r5, r4 + mov r0, #1 + strb r0, [r1, #8] + b _0224698A +_02246984: + add r1, r5, r4 + mov r0, #2 + strb r0, [r1, #8] +_0224698A: + ldrb r0, [r1, #8] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + lsl r1, r0, #2 + ldr r0, _02246A78 ; =0x022563E8 + ldr r0, [r0, r1] + ldr r1, [sp, #0x30] + str r0, [sp] + lsl r7, r0, #1 + mov r0, #0xc0 + sub r0, r0, r7 + str r0, [sp, #0x10] + ldr r0, [sp, #0x2c] + bl sub_020E1F1C + add r3, r1, #0 + add r2, r0, #0 + ldr r1, [sp, #0x34] + ldr r0, [sp, #0x38] + add r1, r1, r2 + adc r0, r3 + str r1, [sp, #0x24] + mov r1, #1 + lsl r1, r1, #8 + str r0, [sp, #0x28] + sub r2, r1, r7 + beq _022469CA + ldr r1, [sp, #0x14] + mov r3, #0 + bl sub_020E1F1C + add r0, r1, #0 +_022469CA: + lsl r1, r4, #3 + add r7, r5, r1 + ldr r1, [sp] + add r0, r1, r0 + lsl r0, r0, #0xc + str r0, [r7, #0x44] + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x30] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + bl sub_020E1F1C + add r2, r0, #0 + ldr r0, [sp, #0x34] + ldr r3, [sp, #0x38] + add r0, r0, r2 + str r0, [sp, #0x24] + adc r3, r1 + ldr r0, [sp, #0x10] + str r3, [sp, #0x28] + cmp r0, #0 + beq _02246A04 + ldr r1, [sp, #0x18] + add r0, r3, #0 + ldr r2, [sp, #0x10] + mov r3, #0 + bl sub_020E1F1C + add r3, r1, #0 +_02246A04: + ldr r0, [sp] + add r0, r0, r3 + lsl r0, r0, #0xc + str r0, [r7, #0x48] + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x30] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + bl sub_020E1F1C + ldr r3, [sp, #0x34] + ldr r2, [sp, #0x38] + add r0, r3, r0 + adc r2, r1 + str r0, [sp, #0x24] + lsl r0, r4, #1 + add r4, r5, r0 + str r2, [sp, #0x28] + add r0, r2, #0 + ldr r1, [sp, #0x1c] + ldr r2, _02246A7C ; =0x0000FFFF + mov r3, #0 + bl sub_020E1F1C + strh r1, [r4, #0x1c] + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x30] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x28] + bl sub_020E1F1C + ldr r2, [sp, #0x34] + ldr r3, [sp, #0x38] + add r0, r2, r0 + adc r3, r1 + str r0, [sp, #0x24] + ldr r1, [sp, #0x20] + ldr r2, _02246A7C ; =0x0000FFFF + str r3, [sp, #0x28] + add r0, r3, #0 + mov r3, #0 + bl sub_020E1F1C + mov r0, #0x4d + lsl r0, r0, #2 + strh r1, [r4, r0] + ldr r0, [sp, #4] + add r6, r6, #1 + cmp r6, r0 + bge _02246A6A + b _02246962 +_02246A6A: + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_02246A70: .word 0x02257760 +_02246A74: .word 0x00000B3B +_02246A78: .word 0x022563E8 +_02246A7C: .word 0x0000FFFF + thumb_func_end ov23_022468DC + + thumb_func_start ov23_02246A80 +ov23_02246A80: ; 0x02246A80 + push {r4, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0xc + bls _02246A8E + b _02246CD6 +_02246A8E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02246A9A: ; jump table + .short _02246AB4 - _02246A9A - 2 ; case 0 + .short _02246AD0 - _02246A9A - 2 ; case 1 + .short _02246B10 - _02246A9A - 2 ; case 2 + .short _02246B44 - _02246A9A - 2 ; case 3 + .short _02246B84 - _02246A9A - 2 ; case 4 + .short _02246BB4 - _02246A9A - 2 ; case 5 + .short _02246BCA - _02246A9A - 2 ; case 6 + .short _02246C0A - _02246A9A - 2 ; case 7 + .short _02246C6E - _02246A9A - 2 ; case 8 + .short _02246C84 - _02246A9A - 2 ; case 9 + .short _02246CD6 - _02246A9A - 2 ; case 10 + .short _02246C98 - _02246A9A - 2 ; case 11 + .short _02246CBC - _02246A9A - 2 ; case 12 +_02246AB4: + bl ov23_02244C10 + str r0, [r4, #4] + mov r0, #0x57 + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r4, r0] + bl ov23_02246324 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246AD0: + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02246CDC ; =0x02257760 + mov r2, #6 + ldr r1, [r0, #4] + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_0200985C + ldr r1, _02246CDC ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #1 + str r0, [sp] + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246B10: + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r2, #7 + str r2, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, _02246CDC ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_020098B8 + ldr r1, _02246CDC ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246B44: + mov r0, #1 + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02246CDC ; =0x02257760 + mov r2, #5 + ldr r1, [r0, #4] + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02246CDC ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246B84: + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r2, #4 + ldr r0, _02246CDC ; =0x02257760 + str r2, [sp, #8] + ldr r1, [r0, #4] + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02246CDC ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246BB4: + add r0, r4, #0 + bl ov23_022468DC + add r0, r4, #0 + bl ov23_02246D44 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02246BCA: + mov r0, #0x57 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #0x1e + bls _02246CD6 + mov r1, #3 + ldr r0, _02246CE0 ; =0x0400006C + mvn r1, r1 + bl sub_020BDEC4 + mov r0, #7 + str r0, [r4, #0] + bl ov23_0224219C + mov r2, #0 + mov r1, #0x4d + add r3, r2, #0 + bl ov23_02253F60 + mov r0, #0x16 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0x66 + lsl r0, r0, #4 + bl sub_02005748 + add sp, #0x10 + pop {r4, pc} +_02246C0A: + mov r0, #7 + str r0, [sp] + ldr r0, _02246CE4 ; =0x04000050 + mov r1, #0x10 + mov r2, #1 + mov r3, #0xe + bl sub_020BF55C + ldr r0, _02246CDC ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02246F20 + cmp r0, #0 + beq _02246C4E + mov r0, #0x66 + lsl r0, r0, #4 + mov r1, #0 + bl sub_020057A4 + ldr r0, _02246CE8 ; =0x0000015E + ldrb r0, [r4, r0] + cmp r0, #0 + beq _02246C44 + mov r0, #0xb + str r0, [r4, #0] + b _02246C4E +_02246C44: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02246C4E: + mov r0, #0x16 + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0x3c + bge _02246CD6 + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0x3c + bne _02246CD6 + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r4, pc} +_02246C6E: + mov r0, #0x66 + lsl r0, r0, #4 + mov r1, #0 + bl sub_020057A4 + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r4, pc} +_02246C84: + mov r0, #0xa + str r0, [r4, #0] + bl sub_0203608C + ldr r1, _02246CE8 ; =0x0000015E + ldrb r1, [r4, r1] + bl ov23_02247144 + add sp, #0x10 + pop {r4, pc} +_02246C98: + ldr r0, _02246CE8 ; =0x0000015E + mov r1, #0 + strb r1, [r4, r0] + mov r0, #0x10 + bl sub_0205948C + ldr r0, _02246CEC ; =0x0000015D + ldrb r0, [r4, r0] + bl ov23_022448FC + mov r0, #0x57 + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r4, r0] + mov r0, #0xc + add sp, #0x10 + str r0, [r4, #0] + pop {r4, pc} +_02246CBC: + mov r0, #0x57 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #8 + bls _02246CD6 + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02246CD6: + add sp, #0x10 + pop {r4, pc} + nop +_02246CDC: .word 0x02257760 +_02246CE0: .word 0x0400006C +_02246CE4: .word 0x04000050 +_02246CE8: .word 0x0000015E +_02246CEC: .word 0x0000015D + thumb_func_end ov23_02246A80 + + thumb_func_start ov23_02246CF0 +ov23_02246CF0: ; 0x02246CF0 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x59 + mov r0, #4 + lsl r1, r1, #2 + add r6, r2, #0 + bl sub_02018184 + mov r2, #0x59 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _02246D34 ; =0x0000015E + mov r2, #0x64 + strb r5, [r4, r0] + ldr r0, _02246D38 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02246D3C ; =ov23_02246A80 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02246D38 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, _02246D40 ; =0x0000015D + strb r6, [r4, r0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02246D34: .word 0x0000015E +_02246D38: .word 0x02257760 +_02246D3C: .word ov23_02246A80 +_02246D40: .word 0x0000015D + thumb_func_end ov23_02246CF0 + + thumb_func_start ov23_02246D44 +ov23_02246D44: ; 0x02246D44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + str r0, [sp, #0x2c] + ldr r0, _02246E8C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A450 + ldr r0, _02246E8C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + ldr r0, _02246E8C ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + mov r3, #0x17 + str r1, [sp] + sub r2, r1, #1 + str r2, [sp, #4] + str r2, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + lsl r3, r3, #4 + ldr r2, [r0, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r0, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r0, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + add r3, #0x64 + str r2, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r0, r3 + add r2, r1, #0 + add r3, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + ldr r0, _02246E8C ; =0x02257760 + mov r6, #0 + ldr r1, [r0, #4] + ldr r0, [r1, #0x44] + str r0, [sp, #0x30] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x34] + mov r1, #2 + mov r0, #6 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + str r0, [sp, #0x3c] + lsr r0, r1, #5 + str r1, [sp, #0x38] + str r6, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + add r0, sp, #0x30 + strh r6, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x58] + mov r0, #4 + str r6, [sp, #0x54] + str r0, [sp, #0x5c] + bl ov23_022468C0 + cmp r0, #0 + ble _02246E78 + add r5, r6, #0 + ldr r4, _02246E8C ; =0x02257760 + add r7, r5, #0 +_02246DEA: + mov r0, #0x4b + lsl r0, r0, #0xe + str r0, [sp, #0x38] + str r0, [sp, #0x3c] + add r0, sp, #0x30 + bl sub_02021AA0 + ldr r1, [r4, #4] + add r2, r1, r5 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CF8 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, [sp, #0x2c] + add r1, r1, r6 + ldrb r1, [r1, #8] + lsl r1, r1, #1 + bl sub_02021D6C + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + lsl r1, r7, #0x10 + lsr r1, r1, #0x10 + bl sub_02021E50 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021FE0 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021E80 + add r5, r5, #4 + add r7, r7, #4 + add r6, r6, #1 + bl ov23_022468C0 + cmp r6, r0 + blt _02246DEA +_02246E78: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246E8C: .word 0x02257760 + thumb_func_end ov23_02246D44 + + thumb_func_start ov23_02246E90 +ov23_02246E90: ; 0x02246E90 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _02246F18 ; =0x02257760 + add r4, r1, #0 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + add r1, r1, r0 + lsl r0, r5, #2 + ldr r2, [r1, r0] + cmp r2, #0 + beq _02246F14 + lsl r2, r5, #3 + add r3, r4, r2 + ldr r2, [r3, #0x44] + str r2, [sp] + ldr r2, [r3, #0x48] + str r2, [sp, #4] + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 + mov r0, #0x4d + lsl r0, r0, #2 + add r2, r4, r0 + lsl r1, r5, #1 + mov r3, #0x64 + add r4, r5, #0 + mul r4, r3 + mov r3, #0x25 + lsl r3, r3, #4 + ldrh r0, [r2, r1] + add r3, r4, r3 + add r0, r0, r3 + strh r0, [r2, r1] + ldrh r0, [r2, r1] + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02246F1C ; =0x020F983C + ldrsh r1, [r0, r1] + mov r0, #1 + lsl r0, r0, #0xc + add r0, r1, r0 + lsl r0, r0, #0x10 + mov r1, #5 + asr r0, r0, #0x10 + lsl r1, r1, #0xe + bl sub_020BCFD0 + mov r1, #1 + lsl r1, r1, #0xc + sub r0, r1, r0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, _02246F18 ; =0x02257760 + ldr r1, [r0, #4] + lsl r0, r5, #2 + add r1, r1, r0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C70 +_02246F14: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02246F18: .word 0x02257760 +_02246F1C: .word 0x020F983C + thumb_func_end ov23_02246E90 + + thumb_func_start ov23_02246F20 +ov23_02246F20: ; 0x02246F20 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r6, #0 + str r1, [sp] + add r4, r6, #0 + bl ov23_022468C0 + cmp r0, #0 + ble _02246F56 + ldr r5, [sp] +_02246F34: + add r0, r5, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02246F48 + ldr r1, [sp] + add r0, r4, #0 + bl ov23_02246E90 + b _02246F4A +_02246F48: + add r6, r6, #1 +_02246F4A: + add r5, r5, #4 + add r4, r4, #1 + bl ov23_022468C0 + cmp r4, r0 + blt _02246F34 +_02246F56: + bl ov23_022468C0 + cmp r6, r0 + bne _02246F64 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02246F64: + ldr r0, _022470F0 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + beq _02247034 + mov r5, #0 + bl ov23_022468C0 + cmp r0, #0 + ble _02247034 + ldr r6, [sp] + add r4, r6, #0 +_02246F7A: + add r0, r6, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02247026 + ldr r0, _022470F0 ; =0x021BF6BC + ldrh r0, [r0, #0x1e] + lsl r1, r0, #0xc + ldr r0, [r4, #0x48] + sub r0, r1, r0 + str r0, [sp, #0xc] + asr r7, r0, #0x1f + ldr r0, _022470F0 ; =0x021BF6BC + ldrh r0, [r0, #0x1c] + lsl r1, r0, #0xc + ldr r0, [r4, #0x44] + sub r0, r1, r0 + asr r1, r0, #0x1f + add r2, r0, #0 + add r3, r1, #0 + bl sub_020E1F1C + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + str r1, [sp, #8] + add r1, r7, #0 + add r2, r0, #0 + add r3, r7, #0 + bl sub_020E1F1C + add r7, r0, #0 + add r3, r1, #0 + mov r0, #2 + ldr r1, [sp, #0x10] + lsl r0, r0, #0xa + add r2, r1, r0 + ldr r1, [sp, #8] + ldr r0, _022470F4 ; =0x00000000 + adc r1, r0 + str r1, [sp, #8] + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + mov r0, #2 + lsl r0, r0, #0xa + ldr r2, _022470F4 ; =0x00000000 + add r0, r7, r0 + adc r3, r2 + lsl r2, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + add r0, r1, r0 + bl sub_020BCFF0 + ldr r1, [sp] + add r1, r1, r5 + ldrb r1, [r1, #8] + lsl r2, r1, #2 + ldr r1, _022470F8 ; =0x022563E8 + ldr r1, [r1, r2] + lsl r1, r1, #0xc + cmp r1, r0 + ble _02247026 + ldr r0, _022470FC ; =0x00000626 + bl sub_02005748 + ldr r0, _02247100 ; =0x02257760 + lsl r4, r5, #2 + ldr r0, [r0, #4] + add r1, r0, r4 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, [sp] + add r1, r1, r5 + ldrb r1, [r1, #8] + lsl r1, r1, #1 + add r1, r1, #1 + bl sub_02021D6C + ldr r0, [sp] + mov r1, #1 + add r0, r0, r4 + add r0, #0xe4 + str r1, [r0, #0] + b _02247034 +_02247026: + add r6, r6, #4 + add r4, #8 + add r5, r5, #1 + bl ov23_022468C0 + cmp r5, r0 + blt _02246F7A +_02247034: + mov r6, #0 + bl ov23_022468C0 + cmp r0, #0 + ble _022470E0 + ldr r7, [sp] + add r4, r7, #0 + add r5, r7, #0 +_02247044: + add r0, r7, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _022470D0 + ldrh r0, [r4, #0x1c] + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02247104 ; =0x020F983C + ldrsh r1, [r0, r1] + ldr r0, [r5, #0x48] + sub r0, r0, r1 + str r0, [r5, #0x48] + ldrh r1, [r4, #0x1c] + ldr r0, [r5, #0x44] + asr r1, r1, #4 + lsl r2, r1, #2 + ldr r1, _02247104 ; =0x020F983C + add r2, r1, r2 + mov r1, #2 + ldrsh r1, [r2, r1] + add r0, r0, r1 + str r0, [r5, #0x44] + ldr r0, [sp] + add r0, r0, r6 + ldrb r0, [r0, #8] + lsl r1, r0, #2 + ldr r0, _022470F8 ; =0x022563E8 + ldr r1, [r0, r1] + ldr r0, [r5, #0x48] + lsl r3, r1, #0xc + cmp r0, r3 + bge _02247090 + ldrh r2, [r4, #0x1c] + ldr r0, _02247108 ; =0x0000FFFF + sub r0, r0, r2 + strh r0, [r4, #0x1c] + b _022470A2 +_02247090: + mov r2, #0xc0 + sub r2, r2, r1 + lsl r2, r2, #0xc + cmp r0, r2 + blt _022470A2 + ldrh r2, [r4, #0x1c] + ldr r0, _02247108 ; =0x0000FFFF + sub r0, r0, r2 + strh r0, [r4, #0x1c] +_022470A2: + ldr r0, [r5, #0x44] + cmp r0, r3 + bge _022470B8 + ldrh r1, [r4, #0x1c] + mov r0, #2 + lsl r0, r0, #0xe + sub r1, r1, r0 + ldr r0, _02247108 ; =0x0000FFFF + sub r0, r0, r1 + strh r0, [r4, #0x1c] + b _022470D0 +_022470B8: + mov r2, #1 + lsl r2, r2, #8 + sub r1, r2, r1 + lsl r1, r1, #0xc + cmp r0, r1 + blt _022470D0 + ldrh r1, [r4, #0x1c] + lsl r0, r2, #7 + sub r1, r1, r0 + ldr r0, _02247108 ; =0x0000FFFF + sub r0, r0, r1 + strh r0, [r4, #0x1c] +_022470D0: + add r7, r7, #4 + add r4, r4, #2 + add r5, #8 + add r6, r6, #1 + bl ov23_022468C0 + cmp r6, r0 + blt _02247044 +_022470E0: + ldr r0, _02247100 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + bl sub_020219F8 + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022470F0: .word 0x021BF6BC +_022470F4: .word 0x00000000 +_022470F8: .word 0x022563E8 +_022470FC: .word 0x00000626 +_02247100: .word 0x02257760 +_02247104: .word 0x020F983C +_02247108: .word 0x0000FFFF + thumb_func_end ov23_02246F20 + + thumb_func_start ov23_0224710C +ov23_0224710C: ; 0x0224710C + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02247132 + ldr r0, _02247134 ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + add r2, r6, #0 + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02246CF0 +_02247132: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02247134: .word 0x02257760 + thumb_func_end ov23_0224710C + + thumb_func_start ov23_02247138 +ov23_02247138: ; 0x02247138 + ldr r3, _02247140 ; =ov23_0224AD7C + mov r1, #2 + bx r3 + nop +_02247140: .word ov23_0224AD7C + thumb_func_end ov23_02247138 + + thumb_func_start ov23_02247144 +ov23_02247144: ; 0x02247144 + push {r3, r4, r5, lr} + ldr r0, _022471C8 ; =0x02257760 + add r5, r1, #0 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r1, r0] + cmp r4, #0 + beq _022471C6 + mov r0, #0x66 + lsl r0, r0, #4 + mov r1, #0 + bl sub_020057A4 + ldr r0, _022471CC ; =0x0000015E + ldrb r1, [r4, r0] + cmp r1, #0 + beq _02247174 + cmp r5, #0 + beq _02247174 + sub r0, r0, #1 + ldrb r0, [r4, r0] + bl ov23_022448FC +_02247174: + ldr r1, _022471D0 ; =0x04000050 + mov r0, #0 + strh r0, [r1] + mov r1, #1 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _022471D4 ; =0x0400006C + mov r1, #0 + bl sub_020BDEC4 + bl ov23_022468C0 + bl ov23_02246370 + mov r0, #0x10 + bl sub_0205948C + ldr r0, _022471C8 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + ldr r0, _022471C8 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, _022471C8 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_022471C6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022471C8: .word 0x02257760 +_022471CC: .word 0x0000015E +_022471D0: .word 0x04000050 +_022471D4: .word 0x0400006C + thumb_func_end ov23_02247144 + + thumb_func_start ov23_022471D8 +ov23_022471D8: ; 0x022471D8 + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + ldr r0, _02247308 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A450 + ldr r0, _02247308 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + ldr r0, _02247308 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + mov r3, #0x17 + str r1, [sp] + sub r2, r1, #1 + str r2, [sp, #4] + str r2, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + lsl r3, r3, #4 + ldr r2, [r0, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r0, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r0, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + add r3, #0x64 + str r2, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r0, r3 + add r2, r1, #0 + add r3, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + ldr r4, _02247308 ; =0x02257760 + mov r6, #0 + ldr r1, [r4, #4] + mov r7, #0x19 + ldr r0, [r1, #0x44] + add r5, r6, #0 + str r0, [sp, #0x2c] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x30] + mov r1, #2 + mov r0, #6 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + lsr r0, r1, #5 + str r1, [sp, #0x34] + str r6, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + add r0, sp, #0x2c + strh r6, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x54] + mov r0, #4 + str r6, [sp, #0x50] + str r0, [sp, #0x58] + lsl r7, r7, #0xe +_02247274: + add r0, sp, #0x2c + str r7, [sp, #0x34] + str r7, [sp, #0x38] + bl sub_02021AA0 + ldr r1, [r4, #4] + add r2, r1, r5 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_02021D6C + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021E50 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0xf + sub r1, r1, r6 + bl sub_02021F58 + ldr r0, [r4, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021E80 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #0xf + blt _02247274 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_02247308: .word 0x02257760 + thumb_func_end ov23_022471D8 + + thumb_func_start ov23_0224730C +ov23_0224730C: ; 0x0224730C + push {r4, lr} + lsl r1, r1, #2 + add r4, r0, r1 + str r2, [r4, #8] + add r0, r4, #0 + ldr r2, [sp, #8] + add r0, #0x80 + str r2, [r0, #0] + str r3, [r4, #0x44] + ldr r0, [sp, #0xc] + add r4, #0xbc + str r0, [r4, #0] + ldr r0, _02247338 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r1 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC + pop {r4, pc} + ; .align 2, 0 +_02247338: .word 0x02257760 + thumb_func_end ov23_0224730C + + thumb_func_start ov23_0224733C +ov23_0224733C: ; 0x0224733C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + cmp r1, #4 + bhi _0224735C + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02247352: ; jump table + .short _022474B6 - _02247352 - 2 ; case 0 + .short _0224747E - _02247352 - 2 ; case 1 + .short _0224742E - _02247352 - 2 ; case 2 + .short _022473C6 - _02247352 - 2 ; case 3 + .short _0224735C - _02247352 - 2 ; case 4 +_0224735C: + mov r0, #2 + mov r2, #0x69 + str r0, [sp] + sub r0, r0, #6 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xb7 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #0xb + sub r3, r3, #5 + bl ov23_0224730C + mov r0, #1 + mvn r0, r0 + mov r2, #0x8c + str r0, [sp] + sub r0, r0, #2 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0x94 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #0xc + sub r3, #0xf + bl ov23_0224730C + mov r0, #1 + mvn r0, r0 + mov r2, #0x87 + str r0, [sp] + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0x99 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #0xd + sub r3, #0x14 + bl ov23_0224730C + mov r0, #2 + mov r2, #0x78 + str r0, [sp] + mov r0, #0 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xa8 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #0xe + sub r3, #0xb + bl ov23_0224730C +_022473C6: + mov r0, #3 + mov r2, #0x80 + str r0, [sp] + sub r0, r0, #7 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xa0 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #7 + sub r3, r3, #5 + bl ov23_0224730C + mov r0, #2 + mvn r0, r0 + mov r2, #0x84 + str r0, [sp] + sub r0, r0, #1 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0x9c + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #8 + sub r3, #0xf + bl ov23_0224730C + mov r0, #1 + mov r2, #0x70 + str r0, [sp] + sub r0, r0, #3 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xb0 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #9 + bl ov23_0224730C + mov r0, #1 + mov r2, #0x73 + str r0, [sp] + sub r0, r0, #3 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xad + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #0xa + add r3, r3, #2 + bl ov23_0224730C +_0224742E: + mov r0, #2 + mov r2, #0x8c + str r0, [sp] + sub r0, r0, #5 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0x94 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #4 + sub r3, #0xa + bl ov23_0224730C + mov r0, #1 + mvn r0, r0 + mov r2, #0x8c + str r0, [sp] + sub r0, r0, #1 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0x94 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #5 + sub r3, #0x14 + bl ov23_0224730C + mov r0, #0 + mvn r0, r0 + mov r2, #0x6e + str r0, [sp] + sub r0, r0, #1 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xb2 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #6 + bl ov23_0224730C +_0224747E: + mov r0, #1 + mvn r0, r0 + mov r2, #0x78 + str r0, [sp] + sub r0, r0, #1 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xa8 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #2 + sub r3, #0x1e + bl ov23_0224730C + mov r0, #1 + mvn r0, r0 + mov r2, #0x64 + str r0, [sp] + sub r0, r0, #1 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xbc + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #3 + sub r3, #0xa + bl ov23_0224730C +_022474B6: + mov r0, #2 + mov r2, #0x80 + str r0, [sp] + sub r0, r0, #5 + add r3, r2, #0 + str r0, [sp, #4] + add r3, #0xa0 + ldr r3, [r4, r3] + add r0, r4, #0 + mov r1, #1 + sub r3, #0x1e + bl ov23_0224730C + add sp, #8 + pop {r4, pc} + thumb_func_end ov23_0224733C + + thumb_func_start ov23_022474D4 +ov23_022474D4: ; 0x022474D4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + mov r7, #0 + add r4, r6, #0 + add r5, r7, #0 +_022474E0: + add r0, r4, #0 + add r0, #0x80 + ldr r1, [r0, #0] + cmp r1, #0 + beq _02247556 + ldr r0, [r4, #8] + add r0, r0, r1 + str r0, [r4, #8] + add r0, r4, #0 + add r0, #0xbc + ldr r1, [r4, #0x44] + ldr r0, [r0, #0] + add r0, r1, r0 + str r0, [r4, #0x44] + add r0, r4, #0 + add r0, #0xbc + ldr r1, [r0, #0] + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r0, [r6, r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + ldr r0, [r4, #8] + lsl r0, r0, #0xc + str r0, [sp] + ldr r0, [r4, #0x44] + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r0, _02247564 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C50 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r6, r0] + ldr r1, [r4, #0x44] + add r0, #0x23 + cmp r1, r0 + ble _02247556 + ldr r0, _02247564 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CAC + add r1, r4, #0 + add r1, #0x80 + mov r0, #0 + str r0, [r1, #0] +_02247556: + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #0xf + blt _022474E0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247564: .word 0x02257760 + thumb_func_end ov23_022474D4 + + thumb_func_start ov23_02247568 +ov23_02247568: ; 0x02247568 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r0, _022478A4 ; =0x00000125 + add r4, r1, #0 + ldrb r1, [r4, r0] + cmp r1, #6 + bhi _0224766E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02247582: ; jump table + .short _02247590 - _02247582 - 2 ; case 0 + .short _022475D8 - _02247582 - 2 ; case 1 + .short _02247608 - _02247582 - 2 ; case 2 + .short _02247692 - _02247582 - 2 ; case 3 + .short _022477A0 - _02247582 - 2 ; case 4 + .short _0224781A - _02247582 - 2 ; case 5 + .short _022479B4 - _02247582 - 2 ; case 6 +_02247590: + mov r1, #0 + sub r0, r0, #1 + strb r1, [r4, r0] + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + add r5, r0, #0 + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + add r2, r0, #0 + mov r0, #0x20 + str r0, [sp] + ldr r0, _022478A8 ; =0x02257760 + add r1, r5, #0 + ldr r0, [r0, #4] + mov r3, #5 + ldr r0, [r0, #0x40] + bl ov5_021F4F18 + mov r1, #0x45 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #1 + add r1, #0x11 + strb r0, [r4, r1] + ldr r0, _022478AC ; =0x0000065E + bl sub_02005748 + b _022479DE +_022475D8: + sub r1, r0, #1 + ldrb r1, [r4, r1] + add r2, r1, #1 + sub r1, r0, #1 + strb r2, [r4, r1] + ldrb r1, [r4, r1] + cmp r1, #0x14 + bls _0224766E + mov r1, #2 + strb r1, [r4, r0] + mov r1, #0 + sub r2, r0, #5 + str r1, [r4, r2] + add r2, r0, #0 + mov r3, #5 + sub r2, #9 + str r3, [r4, r2] + ldr r2, _022478A8 ; =0x02257760 + add r0, #0xd3 + ldr r2, [r2, #4] + ldr r0, [r2, r0] + bl sub_02021D6C + b _022479DE +_02247608: + mov r1, #2 + lsl r1, r1, #0x12 + str r1, [sp, #8] + sub r1, r0, #5 + ldr r1, [r4, r1] + add r0, #0xd3 + lsl r1, r1, #0xc + str r1, [sp, #0xc] + ldr r1, _022478A8 ; =0x02257760 + ldr r1, [r1, #4] + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_02021C50 + ldr r0, _022478A8 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC + mov r1, #0x12 + lsl r1, r1, #4 + ldr r2, [r4, r1] + cmp r2, #0x41 + ble _0224767E + mov r2, #3 + add r0, r1, #5 + strb r2, [r4, r0] + ldr r0, _022478B0 ; =0x0000065D + bl sub_02005748 + ldr r0, _022478A8 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022478B4 ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0x15 + bne _0224765C + mov r1, #0 + mvn r1, r1 + b _0224765E +_0224765C: + mov r1, #5 +_0224765E: + mov r0, #0x46 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02247670 +_0224766E: + b _022479DE +_02247670: + bl sub_0207136C + mov r0, #0x45 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _022479DE +_0224767E: + sub r0, r1, #4 + ldr r0, [r4, r0] + add r0, r2, r0 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r2, r0, #3 + sub r0, r1, #4 + str r2, [r4, r0] + b _022479DE +_02247692: + ldr r1, _022478B8 ; =0x021BF6BC + ldrh r2, [r1, #0x20] + cmp r2, #0 + beq _02247742 + sub r0, r0, #5 + ldrh r2, [r1, #0x1e] + ldr r0, [r4, r0] + sub r0, r2, r0 + lsl r0, r0, #0xc + str r0, [sp, #4] + asr r7, r0, #0x1f + ldrh r0, [r1, #0x1c] + sub r0, #0x80 + lsl r0, r0, #0xc + asr r1, r0, #0x1f + add r2, r0, #0 + add r3, r1, #0 + bl sub_020E1F1C + add r6, r0, #0 + ldr r0, [sp, #4] + add r5, r1, #0 + add r1, r7, #0 + add r2, r0, #0 + add r3, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r6, r6, r2 + adc r5, r3 + lsl r5, r5, #0x14 + lsr r6, r6, #0xc + orr r6, r5 + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + add r0, r6, r1 + bl sub_020BCFF0 + mov r1, #3 + lsl r1, r1, #0x10 + cmp r0, r1 + bge _02247742 + mov r0, #0x4b + mov r1, #3 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _022478BC ; =0x00000627 + bl sub_02005748 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r5, [r4, r0] + mov r1, #3 + add r0, r5, #0 + bl sub_020E1F6C + cmp r1, #2 + bne _02247742 + add r0, r5, #0 + mov r1, #3 + bl sub_020E1F6C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #2 + add r0, r4, #0 + add r1, r4, r1 + add r0, #0xf8 + add r1, #0xf8 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200A490 + mov r0, #0x49 + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r4, r0] + mov r1, #4 + add r0, r0, #1 + strb r1, [r4, r0] +_02247742: + mov r1, #0x46 + lsl r1, r1, #2 + ldr r0, [r4, r1] + cmp r0, #0xf + ble _02247760 + add r0, r1, #0 + mov r3, #0 + add r0, #0xc + strb r3, [r4, r0] + add r0, r1, #0 + mov r2, #5 + add r0, #0xd + strb r2, [r4, r0] + add r1, #0x14 + str r3, [r4, r1] +_02247760: + mov r0, #0x4b + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _0224777A + bge _02247770 + add r1, r1, #1 + str r1, [r4, r0] +_02247770: + mov r0, #0x4b + lsl r0, r0, #2 + ldr r1, [r4, r0] + neg r1, r1 + str r1, [r4, r0] +_0224777A: + mov r1, #0x4b + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r0, #0x80 + lsl r0, r0, #0xc + str r0, [sp, #8] + add r0, r1, #0 + sub r0, #0xc + ldr r0, [r4, r0] + add r1, #0xcc + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, r1] + add r1, sp, #8 + bl sub_02021C50 + b _022479DE +_022477A0: + sub r1, r0, #1 + ldrb r1, [r4, r1] + cmp r1, #0 + bne _022477BA + sub r0, #0xd + ldr r0, [r4, r0] + mov r1, #3 + bl sub_020E1F6C + add r1, r0, #0 + add r0, r4, #0 + bl ov23_0224733C +_022477BA: + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + add r0, r4, #0 + bl ov23_022474D4 + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + cmp r1, #0x14 + bne _022477DA + mov r1, #3 + add r0, r0, #1 + strb r1, [r4, r0] +_022477DA: + mov r0, #0x4b + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _022477F4 + bge _022477EA + add r1, r1, #1 + str r1, [r4, r0] +_022477EA: + mov r0, #0x4b + lsl r0, r0, #2 + ldr r1, [r4, r0] + neg r1, r1 + str r1, [r4, r0] +_022477F4: + mov r1, #0x4b + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r0, #0x80 + lsl r0, r0, #0xc + str r0, [sp, #8] + add r0, r1, #0 + sub r0, #0xc + ldr r0, [r4, r0] + add r1, #0xcc + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, r1] + add r1, sp, #8 + bl sub_02021C50 + b _022479DE +_0224781A: + sub r0, r0, #1 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _02247824 + b _02247944 +_02247824: + ldr r0, _022478C0 ; =0x0000062A + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x11 + add r0, #0xf8 + lsl r1, r1, #4 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + bl sub_0200A490 + mov r7, #1 + mov r5, #4 + mov r6, #0x52 +_02247840: + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021D6C + lsl r0, r6, #0xc + str r0, [sp, #8] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r2, [r4, r0] + lsr r1, r7, #0x1f + lsl r3, r7, #0x1f + sub r3, r3, r1 + mov r0, #0x1f + ror r3, r0 + add r2, #0x27 + add r0, r1, r3 + add r0, r2, r0 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_02021C50 + ldr r0, _022478A8 ; =0x02257760 + ldr r0, [r0, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC + add r7, r7, #1 + add r5, r5, #4 + add r6, #0xc + cmp r7, #9 + blt _02247840 + ldr r0, _022478A8 ; =0x02257760 + b _022478C4 + nop +_022478A4: .word 0x00000125 +_022478A8: .word 0x02257760 +_022478AC: .word 0x0000065E +_022478B0: .word 0x0000065D +_022478B4: .word 0x00000B3B +_022478B8: .word 0x021BF6BC +_022478BC: .word 0x00000627 +_022478C0: .word 0x0000062A +_022478C4: + ldr r1, [r0, #4] + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021D6C + mov r0, #0x19 + lsl r0, r0, #0xe + str r0, [sp, #8] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r0, #0x15 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, _022479F0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_02021C50 + ldr r0, _022479F0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC + ldr r0, _022479F0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021D6C + mov r0, #0x7a + lsl r0, r0, #0xc + str r0, [sp, #8] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, _022479F0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_02021C50 + ldr r0, _022479F0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC +_02247944: + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + bl sub_0201D2E8 + mov r1, #0xa + bl sub_020E1F6C + add r1, #0x7b + lsl r0, r1, #0xc + str r0, [sp, #8] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, #0xd8 + lsl r1, r1, #0xc + str r1, [sp, #0xc] + ldr r1, _022479F0 ; =0x02257760 + ldr r1, [r1, #4] + ldr r0, [r1, r0] + add r1, sp, #8 + bl sub_02021C50 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + mov r2, #0x1d + add r1, r1, #1 + str r1, [r4, r0] + add r1, r0, #4 + ldrb r1, [r4, r1] + lsr r5, r1, #0x1f + lsl r3, r1, #0x1d + sub r3, r3, r5 + ror r3, r2 + add r2, r5, r3 + beq _022479A2 + ldr r2, _022479F0 ; =0x02257760 + lsr r1, r1, #3 + ldr r2, [r2, #4] + add r0, #0xd8 + ldr r0, [r2, r0] + add r1, r1, #3 + bl sub_02021D6C +_022479A2: + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + cmp r1, #0x4b + bne _022479DE + mov r1, #6 + add r0, r0, #1 + strb r1, [r4, r0] + b _022479DE +_022479B4: + sub r0, #0x11 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022479C8 + bl sub_0207136C + mov r0, #0x45 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_022479C8: + ldr r0, _022479F0 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CAC + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022479DE: + ldr r0, _022479F0 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + bl sub_020219F8 + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_022479F0: .word 0x02257760 + thumb_func_end ov23_02247568 + + thumb_func_start ov23_022479F4 +ov23_022479F4: ; 0x022479F4 + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + ldr r3, _02247A58 ; =0x02256404 + add r2, sp, #0xc + add r5, r0, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + mov r1, #4 + sub r4, r0, #1 + mov r0, #0x32 + bl sub_02006C24 + add r6, r0, #0 + cmp r4, #6 + bge _02247A4E + add r0, r4, #1 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02247A5C ; =0x02257760 + lsl r3, r4, #2 + ldr r1, [r0, #4] + mov r0, #0x17 + lsl r0, r0, #4 + add r2, sp, #0xc + ldr r0, [r1, r0] + ldr r2, [r2, r3] + add r1, r6, #0 + mov r3, #0 + bl sub_02009A4C + add r1, r4, #1 + lsl r1, r1, #2 + add r1, r5, r1 + add r1, #0xf8 + str r0, [r1, #0] +_02247A4E: + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02247A58: .word 0x02256404 +_02247A5C: .word 0x02257760 + thumb_func_end ov23_022479F4 + + thumb_func_start ov23_02247A60 +ov23_02247A60: ; 0x02247A60 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0x17 + ldr r6, _02247A88 ; =0x02257760 + mov r4, #1 + add r5, r0, #4 + lsl r7, r7, #4 +_02247A6C: + add r0, r5, #0 + add r0, #0xf8 + ldr r1, [r0, #0] + cmp r1, #0 + beq _02247A7E + ldr r0, [r6, #4] + ldr r0, [r0, r7] + bl sub_02009D68 +_02247A7E: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + blt _02247A6C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247A88: .word 0x02257760 + thumb_func_end ov23_02247A60 + + thumb_func_start ov23_02247A8C +ov23_02247A8C: ; 0x02247A8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0xc + bls _02247A9A + b _02247D12 +_02247A9A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02247AA6: ; jump table + .short _02247AC0 - _02247AA6 - 2 ; case 0 + .short _02247B1C - _02247AA6 - 2 ; case 1 + .short _02247B66 - _02247AA6 - 2 ; case 2 + .short _02247B9C - _02247AA6 - 2 ; case 3 + .short _02247BDC - _02247AA6 - 2 ; case 4 + .short _02247C0E - _02247AA6 - 2 ; case 5 + .short _02247C1E - _02247AA6 - 2 ; case 6 + .short _02247C70 - _02247AA6 - 2 ; case 7 + .short _02247CB8 - _02247AA6 - 2 ; case 8 + .short _02247CC4 - _02247AA6 - 2 ; case 9 + .short _02247D12 - _02247AA6 - 2 ; case 10 + .short _02247CD4 - _02247AA6 - 2 ; case 11 + .short _02247CF8 - _02247AA6 - 2 ; case 12 +_02247AC0: + bl ov23_02244C10 + str r0, [r4, #4] + mov r0, #0x49 + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r4, r0] + ldr r1, _02247D18 ; =0x02257760 + mov r0, #0x20 + ldr r1, [r1, #4] + mov r2, #4 + add r1, #0x48 + bl sub_020095C4 + ldr r1, _02247D18 ; =0x02257760 + ldr r2, [r1, #4] + str r0, [r2, #0x44] + ldr r0, [r1, #4] + mov r2, #6 + add r0, #0x48 + mov r1, #0 + lsl r2, r2, #0x12 + bl sub_0200964C + mov r6, #0 + ldr r7, _02247D18 ; =0x02257760 + add r5, r6, #0 +_02247AF6: + mov r0, #8 + add r1, r6, #0 + mov r2, #4 + bl sub_02009714 + ldr r1, [r7, #4] + add r6, r6, #1 + add r2, r1, r5 + mov r1, #0x17 + lsl r1, r1, #4 + add r5, r5, #4 + str r0, [r2, r1] + cmp r6, #4 + blt _02247AF6 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247B1C: + mov r0, #1 + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02247D18 ; =0x02257760 + mov r2, #0x20 + ldr r1, [r0, #4] + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_0200985C + ldr r2, _02247D18 ; =0x02257760 + mov r1, #0x19 + ldr r3, [r2, #4] + lsl r1, r1, #4 + str r0, [r3, r1] + ldr r0, [r2, #4] + add sp, #0x10 + ldr r1, [r0, r1] + add r0, r4, #0 + add r0, #0xf8 + str r1, [r0, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247B66: + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, _02247D18 ; =0x02257760 + mov r2, #0x33 + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_020098B8 + ldr r1, _02247D18 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247B9C: + mov r0, #1 + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02247D18 ; =0x02257760 + mov r2, #0x1f + ldr r1, [r0, #4] + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02247D18 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247BDC: + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, _02247D18 ; =0x02257760 + mov r2, #0x1e + ldr r1, [r0, #4] + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02247D18 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247C0E: + add r0, r4, #0 + bl ov23_022471D8 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247C1E: + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + add r0, r4, #0 + bl ov23_022479F4 + mov r1, #0x49 + lsl r1, r1, #2 + ldrb r0, [r4, r1] + cmp r0, #0x1e + bls _02247D12 + ldr r0, _02247D18 ; =0x02257760 + ldr r2, [r0, #4] + ldr r0, _02247D1C ; =0x00000B3B + ldrb r0, [r2, r0] + cmp r0, #0x14 + bne _02247C52 + add r0, r4, #0 + add r0, #0xf8 + sub r1, #0x24 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + bl sub_0200A490 +_02247C52: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x4d + add r3, r2, #0 + bl ov23_02253F60 + mov r0, #0x4a + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #7 + add sp, #0x10 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247C70: + ldr r0, _02247D18 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02247568 + cmp r0, #0 + beq _02247C98 + ldr r0, _02247D20 ; =0x00000127 + ldrb r0, [r4, r0] + cmp r0, #0 + beq _02247C8E + mov r0, #0xb + str r0, [r4, #0] + b _02247C98 +_02247C8E: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02247C98: + mov r0, #0x4a + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0x3c + bge _02247D12 + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0x3c + bne _02247D12 + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_02247CB8: + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_02247CC4: + bl sub_0203608C + ldr r1, _02247D20 ; =0x00000127 + ldrb r1, [r4, r1] + bl ov23_02247DB0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_02247CD4: + ldr r0, _02247D20 ; =0x00000127 + mov r1, #0 + strb r1, [r4, r0] + mov r0, #0x10 + bl sub_0205948C + ldr r0, _02247D24 ; =0x00000126 + ldrb r0, [r4, r0] + bl ov23_022448FC + mov r0, #0x49 + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r4, r0] + mov r0, #0xc + add sp, #0x10 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02247CF8: + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #8 + bls _02247D12 + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02247D12: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247D18: .word 0x02257760 +_02247D1C: .word 0x00000B3B +_02247D20: .word 0x00000127 +_02247D24: .word 0x00000126 + thumb_func_end ov23_02247A8C + + thumb_func_start ov23_02247D28 +ov23_02247D28: ; 0x02247D28 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x13 + mov r0, #4 + lsl r1, r1, #4 + add r6, r2, #0 + bl sub_02018184 + mov r2, #0x13 + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _02247D6C ; =0x00000127 + mov r2, #0x64 + strb r5, [r4, r0] + sub r0, r0, #1 + strb r6, [r4, r0] + ldr r0, _02247D70 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02247D74 ; =ov23_02247A8C + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _02247D70 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02247D6C: .word 0x00000127 +_02247D70: .word 0x02257760 +_02247D74: .word ov23_02247A8C + thumb_func_end ov23_02247D28 + + thumb_func_start ov23_02247D78 +ov23_02247D78: ; 0x02247D78 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02247D9E + ldr r0, _02247DA0 ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + add r2, r6, #0 + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02247D28 +_02247D9E: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02247DA0: .word 0x02257760 + thumb_func_end ov23_02247D78 + + thumb_func_start ov23_02247DA4 +ov23_02247DA4: ; 0x02247DA4 + ldr r3, _02247DAC ; =ov23_0224AD7C + mov r1, #2 + bx r3 + nop +_02247DAC: .word ov23_0224AD7C + thumb_func_end ov23_02247DA4 + + thumb_func_start ov23_02247DB0 +ov23_02247DB0: ; 0x02247DB0 + push {r3, r4, r5, lr} + ldr r0, _02247E30 ; =0x02257760 + add r5, r1, #0 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r1, r0] + cmp r4, #0 + beq _02247E2E + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02247DD8 + bl sub_0207136C + mov r0, #0x45 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_02247DD8: + ldr r0, _02247E34 ; =0x00000127 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _02247DEC + cmp r5, #0 + beq _02247DEC + sub r0, r0, #1 + ldrb r0, [r4, r0] + bl ov23_022448FC +_02247DEC: + add r0, r4, #0 + bl ov23_02247A60 + mov r0, #0xf + bl ov23_02246370 + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + mov r0, #0x10 + bl sub_0205948C + ldr r0, _02247E30 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + ldr r1, _02247E30 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_02247E2E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02247E30: .word 0x02257760 +_02247E34: .word 0x00000127 + thumb_func_end ov23_02247DB0 + + thumb_func_start ov23_02247E38 +ov23_02247E38: ; 0x02247E38 + push {lr} + sub sp, #0x5c + ldr r0, _02247F48 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A450 + ldr r0, _02247F48 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + ldr r0, _02247F48 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + mov r3, #0x17 + str r1, [sp] + sub r2, r1, #1 + str r2, [sp, #4] + str r2, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + lsl r3, r3, #4 + ldr r2, [r0, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r0, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r0, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + add r3, #0x64 + str r2, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r0, r3 + add r2, r1, #0 + add r3, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + ldr r0, _02247F48 ; =0x02257760 + mov r2, #2 + ldr r1, [r0, #4] + lsl r2, r2, #0x10 + ldr r0, [r1, #0x44] + str r0, [sp, #0x2c] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x30] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + lsr r0, r2, #5 + mov r1, #0 + str r2, [sp, #0x34] + str r1, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + add r0, sp, #0x2c + strh r1, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x54] + mov r0, #4 + str r0, [sp, #0x58] + lsl r0, r0, #0x11 + str r0, [sp, #0x34] + mov r0, #0x15 + lsl r0, r0, #0xe + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r1, [sp, #0x50] + bl sub_02021AA0 + ldr r2, _02247F48 ; =0x02257760 + mov r1, #0x7e + ldr r3, [r2, #4] + lsl r1, r1, #2 + str r0, [r3, r1] + ldr r0, [r2, #4] + ldr r0, [r0, r1] + mov r1, #2 + bl sub_02021CF8 + ldr r0, _02247F48 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021D6C + ldr r0, _02247F48 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, _02247F48 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021E50 + ldr r0, _02247F48 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021E80 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x5c + pop {pc} + nop +_02247F48: .word 0x02257760 + thumb_func_end ov23_02247E38 + + thumb_func_start ov23_02247F4C +ov23_02247F4C: ; 0x02247F4C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + add r0, r5, #0 + add r0, #0x28 + ldrb r0, [r0] + mov r4, #0 + cmp r0, #0 + beq _02247F66 + cmp r0, #1 + beq _02247F86 + cmp r0, #2 + b _02248096 +_02247F66: + ldr r0, _022480A8 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022480AC ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0x1f + bne _02247F76 + mov r0, #4 + b _02247F78 +_02247F76: + mov r0, #2 +_02247F78: + str r0, [r5, #0x20] + mov r0, #0 + str r0, [r5, #0x24] + add r0, r5, #0 + mov r1, #1 + add r0, #0x28 + strb r1, [r0] +_02247F86: + ldr r1, _022480B0 ; =0x02257760 + ldr r2, _022480B4 ; =ov23_02246624 + mov r0, #2 + mov r3, #0 + bl sub_02004B70 + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + ldr r0, _022480A8 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022480B8 ; =0x00000B3A + ldrsb r0, [r1, r0] + bl sub_020D4070 + add r6, r0, #0 + ldr r0, [r5, #0x14] + mov r1, #0xa + bl sub_020E1F6C + add r0, r5, r1 + strb r6, [r0, #8] + mov r1, #0 + b _02247FBE +_02247FB6: + add r0, r5, r1 + ldrb r0, [r0, #8] + add r1, r1, #1 + add r4, r4, r0 +_02247FBE: + cmp r1, #0xa + blt _02247FB6 + mov r0, #0x7d + lsl r0, r0, #2 + cmp r4, r0 + ble _02247FD8 + ldr r0, [r5, #0x24] + add r0, r0, #1 + str r0, [r5, #0x24] + ldr r0, _022480BC ; =0x00000628 + bl sub_02005748 + b _02247FE0 +_02247FD8: + add r0, r5, #0 + mov r1, #0 + add r0, #0x28 + strb r1, [r0] +_02247FE0: + ldr r0, [r5, #0x24] + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #9 + bne _02247FF2 + ldr r0, [r5, #0x20] + sub r0, r0, #1 + str r0, [r5, #0x20] +_02247FF2: + ldr r2, [r5, #0x20] + cmp r2, #0 + bne _02248004 + mov r0, #2 + add r5, #0x28 + strb r0, [r5] + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_02248004: + ldr r0, _022480A8 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, _022480AC ; =0x00000B3B + ldrb r0, [r1, r0] + cmp r0, #0x1f + bne _02248034 + cmp r2, #2 + beq _02248028 + cmp r2, #3 + beq _02248022 + cmp r2, #4 + bne _0224802E + mov r4, #1 + lsl r4, r4, #0x1e + b _02248042 +_02248022: + mov r4, #0xff + lsl r4, r4, #0x16 + b _02248042 +_02248028: + mov r4, #0xfe + lsl r4, r4, #0x16 + b _02248042 +_0224802E: + mov r4, #0x3f + lsl r4, r4, #0x18 + b _02248042 +_02248034: + cmp r2, #2 + bne _0224803E + mov r4, #1 + lsl r4, r4, #0x1e + b _02248042 +_0224803E: + mov r4, #0xff + lsl r4, r4, #0x16 +_02248042: + ldr r0, [r5, #0x24] + mov r6, #0 + cmp r0, #0 + beq _0224804C + add r6, r6, #1 +_0224804C: + ldr r0, _022480C0 ; =0x45800000 + add r1, r4, #0 + bl sub_020E18B0 + bl sub_020E1740 + str r0, [sp] + ldr r0, _022480C0 ; =0x45800000 + add r1, r4, #0 + bl sub_020E18B0 + bl sub_020E1740 + str r0, [sp, #4] + ldr r0, _022480C0 ; =0x45800000 + add r1, r4, #0 + bl sub_020E18B0 + bl sub_020E1740 + str r0, [sp, #8] + ldr r0, _022480A8 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl sub_02021C70 + ldr r0, _022480A8 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_02021DCC +_02248096: + ldr r0, _022480A8 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + bl sub_020219F8 + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_022480A8: .word 0x02257760 +_022480AC: .word 0x00000B3B +_022480B0: .word 0x02257760 +_022480B4: .word ov23_02246624 +_022480B8: .word 0x00000B3A +_022480BC: .word 0x00000628 +_022480C0: .word 0x45800000 + thumb_func_end ov23_02247F4C + + thumb_func_start ov23_022480C4 +ov23_022480C4: ; 0x022480C4 + push {r4, lr} + sub sp, #0x10 + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0xc + bls _022480D2 + b _02248304 +_022480D2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022480DE: ; jump table + .short _022480F8 - _022480DE - 2 ; case 0 + .short _02248110 - _022480DE - 2 ; case 1 + .short _0224815C - _022480DE - 2 ; case 2 + .short _02248192 - _022480DE - 2 ; case 3 + .short _022481DE - _022480DE - 2 ; case 4 + .short _0224821C - _022480DE - 2 ; case 5 + .short _0224822C - _022480DE - 2 ; case 6 + .short _0224825A - _022480DE - 2 ; case 7 + .short _022482B0 - _022480DE - 2 ; case 8 + .short _022482BC - _022480DE - 2 ; case 9 + .short _02248304 - _022480DE - 2 ; case 10 + .short _022482CC - _022480DE - 2 ; case 11 + .short _022482F0 - _022480DE - 2 ; case 12 +_022480F8: + bl ov23_02244C10 + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0x24] + bl ov23_02246324 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02248110: + mov r0, #1 + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + ldr r0, _02248308 ; =0x02257760 + ldr r1, _0224830C ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1f + bne _0224812E + mov r2, #0x16 + b _02248130 +_0224812E: + mov r2, #0x19 +_02248130: + mov r3, #0 + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x17 + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_0200985C + ldr r1, _02248308 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_0224815C: + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, _02248308 ; =0x02257760 + mov r2, #0x13 + ldr r1, [r0, #4] + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0x32 + bl sub_020098B8 + ldr r1, _02248308 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_02248192: + mov r0, #1 + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + ldr r0, _02248308 ; =0x02257760 + ldr r1, _0224830C ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1f + bne _022481B0 + mov r2, #0x15 + b _022481B2 +_022481B0: + mov r2, #0x18 +_022481B2: + mov r3, #0 + str r3, [sp] + mov r1, #2 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x5e + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02248308 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_022481DE: + ldr r0, _02248308 ; =0x02257760 + ldr r1, _0224830C ; =0x00000B3B + ldr r0, [r0, #4] + ldrb r1, [r0, r1] + cmp r1, #0x1f + bne _022481EE + mov r2, #0x14 + b _022481F0 +_022481EE: + mov r2, #0x17 +_022481F0: + mov r3, #0 + str r3, [sp] + mov r1, #3 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x5f + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0x32 + bl sub_02009918 + ldr r1, _02248308 ; =0x02257760 + add sp, #0x10 + ldr r2, [r1, #4] + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_0224821C: + add r0, r4, #0 + bl ov23_02247E38 + ldr r0, [r4, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, pc} +_0224822C: + ldr r0, [r4, #0x24] + add r0, r0, #1 + str r0, [r4, #0x24] + cmp r0, #0x1e + ble _02248304 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x4c + add r3, r2, #0 + bl ov23_02253F60 + mov r1, #3 + ldr r0, _02248310 ; =0x0400006C + mvn r1, r1 + bl sub_020BDEC4 + mov r0, #7 + str r0, [r4, #0] + mov r0, #0 + add sp, #0x10 + str r0, [r4, #0x2c] + pop {r4, pc} +_0224825A: + mov r0, #7 + str r0, [sp] + ldr r0, _02248314 ; =0x04000050 + mov r1, #0x10 + mov r2, #1 + mov r3, #0xe + bl sub_020BF55C + ldr r0, _02248308 ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02247F4C + cmp r0, #0 + beq _02248296 + add r0, r4, #0 + add r0, #0x2a + ldrb r0, [r0] + cmp r0, #0 + beq _0224828C + mov r0, #0xb + str r0, [r4, #0] + b _02248296 +_0224828C: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02248296: + ldr r0, [r4, #0x2c] + cmp r0, #0x3c + bge _02248304 + add r0, r0, #1 + str r0, [r4, #0x2c] + cmp r0, #0x3c + bne _02248304 + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r4, pc} +_022482B0: + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x10 + pop {r4, pc} +_022482BC: + bl sub_0203608C + add r4, #0x2a + ldrb r1, [r4] + bl ov23_0224839C + add sp, #0x10 + pop {r4, pc} +_022482CC: + mov r0, #0x10 + bl sub_0205948C + add r0, r4, #0 + mov r1, #0 + add r0, #0x2a + strb r1, [r0] + add r0, r4, #0 + add r0, #0x29 + ldrb r0, [r0] + bl ov23_022448FC + mov r0, #0 + str r0, [r4, #0x24] + mov r0, #0xc + add sp, #0x10 + str r0, [r4, #0] + pop {r4, pc} +_022482F0: + ldr r0, [r4, #0x24] + add r0, r0, #1 + str r0, [r4, #0x24] + cmp r0, #8 + ble _02248304 + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02248304: + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_02248308: .word 0x02257760 +_0224830C: .word 0x00000B3B +_02248310: .word 0x0400006C +_02248314: .word 0x04000050 + thumb_func_end ov23_022480C4 + + thumb_func_start ov23_02248318 +ov23_02248318: ; 0x02248318 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r0, #4 + mov r1, #0x30 + add r6, r2, #0 + bl sub_02018184 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x30 + bl sub_020C4CF4 + add r0, r4, #0 + add r0, #0x2a + strb r5, [r0] + add r0, r4, #0 + add r0, #0x29 + strb r6, [r0] + ldr r0, _0224835C ; =0x02257760 + mov r2, #0x64 + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _02248360 ; =ov23_022480C4 + add r1, r4, #0 + bl sub_0200D9E8 + ldr r1, _0224835C ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224835C: .word 0x02257760 +_02248360: .word ov23_022480C4 + thumb_func_end ov23_02248318 + + thumb_func_start ov23_02248364 +ov23_02248364: ; 0x02248364 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _0224838A + ldr r0, _0224838C ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + add r2, r6, #0 + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02248318 +_0224838A: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224838C: .word 0x02257760 + thumb_func_end ov23_02248364 + + thumb_func_start ov23_02248390 +ov23_02248390: ; 0x02248390 + ldr r3, _02248398 ; =ov23_0224AD7C + mov r1, #2 + bx r3 + nop +_02248398: .word ov23_0224AD7C + thumb_func_end ov23_02248390 + + thumb_func_start ov23_0224839C +ov23_0224839C: ; 0x0224839C + push {r4, lr} + ldr r0, _02248410 ; =0x02257760 + ldr r2, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r2, r0] + cmp r4, #0 + beq _0224840C + add r0, r4, #0 + add r0, #0x2a + ldrb r0, [r0] + cmp r0, #0 + beq _022483C4 + cmp r1, #0 + beq _022483C4 + add r0, r4, #0 + add r0, #0x29 + ldrb r0, [r0] + bl ov23_022448FC +_022483C4: + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _02248414 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, #0x1c + bl sub_020BDEC4 + mov r0, #1 + bl ov23_02246370 + mov r0, #0x10 + bl sub_0205948C + ldr r0, _02248410 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + ldr r1, _02248410 ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_0224840C: + pop {r4, pc} + nop +_02248410: .word 0x02257760 +_02248414: .word 0x04000050 + thumb_func_end ov23_0224839C + + thumb_func_start ov23_02248418 +ov23_02248418: ; 0x02248418 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0] + cmp r1, #0xc + bhi _02248524 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02248430: ; jump table + .short _0224844A - _02248430 - 2 ; case 0 + .short _0224845E - _02248430 - 2 ; case 1 + .short _02248476 - _02248430 - 2 ; case 2 + .short _0224847E - _02248430 - 2 ; case 3 + .short _02248496 - _02248430 - 2 ; case 4 + .short _0224849E - _02248430 - 2 ; case 5 + .short _022484A6 - _02248430 - 2 ; case 6 + .short _022484CA - _02248430 - 2 ; case 7 + .short _02248524 - _02248430 - 2 ; case 8 + .short _022484E6 - _02248430 - 2 ; case 9 + .short _02248524 - _02248430 - 2 ; case 10 + .short _022484F4 - _02248430 - 2 ; case 11 + .short _02248510 - _02248430 - 2 ; case 12 +_0224844A: + bl ov23_02244C10 + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_0224845E: + mov r0, #1 + str r0, [sp] + mov r1, #0xa + mov r2, #0 + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_02248476: + add r0, r1, #1 + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_0224847E: + mov r0, #1 + str r0, [sp] + mov r1, #0 + mov r2, #0xa + add r3, r0, #0 + bl sub_0200AAE0 + ldr r0, [r4, #0] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, pc} +_02248496: + add r0, r1, #1 + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_0224849E: + add r0, r1, #1 + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_022484A6: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0x1e + ble _02248524 + bl ov23_0224219C + bl ov23_02254044 + mov r1, #3 + ldr r0, _02248528 ; =0x0400006C + mvn r1, r1 + bl sub_020BDEC4 + mov r0, #7 + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_022484CA: + ldrb r0, [r4, #0x11] + cmp r0, #0 + beq _022484D8 + mov r0, #0xb + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_022484D8: + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_022484E6: + bl sub_0203608C + ldrb r1, [r4, #0x11] + bl ov23_022485A8 + add sp, #4 + pop {r3, r4, pc} +_022484F4: + mov r0, #0x10 + bl sub_0205948C + mov r0, #0 + strb r0, [r4, #0x11] + ldrb r0, [r4, #0x10] + bl ov23_022448FC + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #0xc + add sp, #4 + str r0, [r4, #0] + pop {r3, r4, pc} +_02248510: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #8 + ble _02248524 + mov r0, #0x29 + bl sub_020360DC + mov r0, #8 + str r0, [r4, #0] +_02248524: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02248528: .word 0x0400006C + thumb_func_end ov23_02248418 + + thumb_func_start ov23_0224852C +ov23_0224852C: ; 0x0224852C + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r0, #4 + mov r1, #0x14 + add r6, r2, #0 + bl sub_02018184 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + strb r5, [r4, #0x11] + ldr r0, _02248568 ; =0x02257760 + strb r6, [r4, #0x10] + ldr r1, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + str r4, [r1, r0] + ldr r0, _0224856C ; =ov23_02248418 + add r1, r4, #0 + mov r2, #0x64 + bl sub_0200D9E8 + ldr r1, _02248568 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0xa3 + lsl r1, r1, #2 + str r0, [r2, r1] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02248568: .word 0x02257760 +_0224856C: .word ov23_02248418 + thumb_func_end ov23_0224852C + + thumb_func_start ov23_02248570 +ov23_02248570: ; 0x02248570 + push {r4, r5, r6, lr} + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + add r6, r2, #0 + bl ov23_0224AD7C + bl sub_0203608C + cmp r5, r0 + bne _02248596 + ldr r0, _02248598 ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + add r2, r6, #0 + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_0224852C +_02248596: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02248598: .word 0x02257760 + thumb_func_end ov23_02248570 + + thumb_func_start ov23_0224859C +ov23_0224859C: ; 0x0224859C + ldr r3, _022485A4 ; =ov23_0224AD7C + mov r1, #2 + bx r3 + nop +_022485A4: .word ov23_0224AD7C + thumb_func_end ov23_0224859C + + thumb_func_start ov23_022485A8 +ov23_022485A8: ; 0x022485A8 + push {r4, lr} + ldr r0, _0224860C ; =0x02257760 + ldr r2, [r0, #4] + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r4, [r2, r0] + cmp r4, #0 + beq _0224860A + ldrb r0, [r4, #0x11] + cmp r0, #0 + beq _022485C8 + cmp r1, #0 + beq _022485C8 + ldrb r0, [r4, #0x10] + bl ov23_022448FC +_022485C8: + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + ldr r0, _02248610 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, #0x1c + bl sub_020BDEC4 + mov r0, #0x10 + bl sub_0205948C + ldr r0, _0224860C ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + ldr r1, _0224860C ; =0x02257760 + mov r0, #0xa3 + ldr r2, [r1, #4] + mov r3, #0 + lsl r0, r0, #2 + str r3, [r2, r0] + ldr r1, [r1, #4] + add r0, #0x10 + str r3, [r1, r0] +_0224860A: + pop {r4, pc} + ; .align 2, 0 +_0224860C: .word 0x02257760 +_02248610: .word 0x04000050 + thumb_func_end ov23_022485A8 + + thumb_func_start ov23_02248614 +ov23_02248614: ; 0x02248614 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + ldr r0, [r1, #0x28] + str r1, [sp, #0x10] + lsl r0, r0, #0xc + str r0, [sp, #0x1c] + add r0, r1, #0 + ldr r0, [r0, #0x2c] + lsl r0, r0, #0xc + str r0, [sp, #0x20] + ldr r0, _02248740 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x1c + bl sub_02021C50 + ldr r0, [sp, #0x10] + mov r1, #0xa + ldr r0, [r0, #0x30] + lsl r0, r0, #0xc + bl sub_020E1F6C + str r0, [sp, #0x1c] + str r0, [sp, #0x24] + str r0, [sp, #0x20] + ldr r0, _02248740 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x1c + bl sub_02021C70 + ldr r0, _02248740 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021FE0 + mov r1, #0x10 + ldr r3, [sp, #0x10] + str r1, [sp] + ldr r4, [r3, #0x30] + ldr r0, _02248744 ; =0x04000050 + lsr r3, r4, #0x1f + add r3, r4, r3 + asr r3, r3, #1 + mov r2, #1 + sub r3, r1, r3 + bl sub_020BF55C + mov r0, #0 + ldr r7, [sp, #0x10] + str r0, [sp, #0xc] + str r0, [sp, #8] +_0224868A: + ldr r0, [r7, #0x14] + mov r4, #0 + cmp r0, #0 + ble _0224870A + ldr r0, [sp, #8] + add r5, r4, #0 + lsl r0, r0, #2 + str r0, [sp, #4] +_0224869A: + ldr r0, [r7, #8] + ldrb r6, [r0, r4] + ldr r0, [sp, #0x10] + ldr r0, [r0, #0x20] + lsr r2, r6, #0x1f + lsl r1, r6, #0x1c + sub r3, r0, #6 + sub r1, r1, r2 + mov r0, #0x1c + ror r1, r0 + add r0, r2, r1 + add r0, r3, r0 + lsl r1, r0, #0x10 + mov r0, #2 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x10] + add r2, sp, #0x14 + ldr r0, [r0, #0x24] + sub r1, r0, #6 + lsr r0, r6, #4 + add r0, r1, r0 + lsl r1, r0, #0x10 + mov r0, #2 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x24] + add r0, sp, #0x1c + add r1, sp, #0x18 + bl sub_020B2B2C + ldr r0, [sp, #0x18] + lsl r0, r0, #0xc + str r0, [sp, #0x1c] + ldr r0, [sp, #0x14] + lsl r0, r0, #0xc + str r0, [sp, #0x20] + ldr r0, _02248740 ; =0x02257760 + ldr r1, [r0, #4] + ldr r0, [sp, #4] + add r0, r0, r1 + add r1, r5, r0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0x1c + bl sub_02021C50 + ldr r0, [r7, #0x14] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _0224869A +_0224870A: + ldr r0, [sp, #8] + add r7, r7, #4 + add r0, #8 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #3 + blt _0224868A + ldr r0, [sp, #0x10] + ldr r0, [r0, #0x30] + add r1, r0, #1 + ldr r0, [sp, #0x10] + cmp r1, #0x14 + str r1, [r0, #0x30] + ble _02248730 + add sp, #0x28 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02248730: + ldr r0, _02248740 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + bl sub_020219F8 + mov r0, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248740: .word 0x02257760 +_02248744: .word 0x04000050 + thumb_func_end ov23_02248614 + + thumb_func_start ov23_02248748 +ov23_02248748: ; 0x02248748 + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + ldr r0, _02248880 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A450 + ldr r0, _02248880 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A640 + ldr r0, _02248880 ; =0x02257760 + mov r1, #0 + ldr r0, [r0, #4] + mov r3, #6 + str r1, [sp] + sub r2, r1, #1 + str r2, [sp, #4] + str r2, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + lsl r3, r3, #6 + ldr r2, [r0, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r0, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r0, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + add r3, #0x54 + str r2, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r0, r3 + add r2, r1, #0 + add r3, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + ldr r6, _02248880 ; =0x02257760 + mov r4, #0 + ldr r1, [r6, #4] + mov r7, #0x4b + ldr r0, [r1, #0x44] + add r5, r4, #0 + str r0, [sp, #0x2c] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x30] + mov r1, #2 + mov r0, #6 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + lsr r0, r1, #5 + str r1, [sp, #0x34] + str r4, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + add r0, sp, #0x2c + strh r4, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x54] + mov r0, #4 + str r4, [sp, #0x50] + str r0, [sp, #0x58] + lsl r7, r7, #0xe +_022487E4: + add r0, sp, #0x2c + str r7, [sp, #0x34] + str r7, [sp, #0x38] + bl sub_02021AA0 + ldr r1, [r6, #4] + add r2, r1, r5 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r2, r1] + cmp r4, #0 + bne _0224881E + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_02021CF8 + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021D6C + b _02248842 +_0224881E: + cmp r4, #9 + ldr r0, [r6, #4] + bge _02248834 + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021D6C + b _02248842 +_02248834: + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + bl sub_02021D6C +_02248842: + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021E50 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x19 + blt _022487E4 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_02248880: .word 0x02257760 + thumb_func_end ov23_02248748 + + thumb_func_start ov23_02248884 +ov23_02248884: ; 0x02248884 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r1, #0 + str r0, [sp, #4] + ldr r0, [r7, #0] + cmp r0, #9 + bls _02248894 + b _022489E0 +_02248894: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022488A0: ; jump table + .short _022488B4 - _022488A0 - 2 ; case 0 + .short _022489E0 - _022488A0 - 2 ; case 1 + .short _022489E0 - _022488A0 - 2 ; case 2 + .short _022489E0 - _022488A0 - 2 ; case 3 + .short _022489E0 - _022488A0 - 2 ; case 4 + .short _02248930 - _022488A0 - 2 ; case 5 + .short _022489E0 - _022488A0 - 2 ; case 6 + .short _0224893E - _022488A0 - 2 ; case 7 + .short _022489E0 - _022488A0 - 2 ; case 8 + .short _02248956 - _022488A0 - 2 ; case 9 +_022488B4: + mov r0, #7 + str r0, [sp] + ldr r0, _022489E4 ; =0x04000050 + mov r1, #0x10 + mov r2, #1 + mov r3, #0xe + bl sub_020BF55C + mov r1, #0xef + ldr r0, _022489E8 ; =0x04000040 + lsl r1, r1, #8 + strh r1, [r0] + mov r1, #0x10 + add r3, r0, #0 + strh r1, [r0, #4] + add r3, #8 + ldrh r4, [r3] + mov r1, #0x3f + mov r2, #0x1f + bic r4, r1 + orr r4, r2 + add r0, #0xa + strh r4, [r3] + ldrh r3, [r0] + bic r3, r1 + orr r2, r3 + mov r1, #0x20 + orr r2, r1 + strh r2, [r0] + lsl r3, r1, #0x15 + ldr r2, [r3, #0] + ldr r0, _022489EC ; =0xFFFF1FFF + and r2, r0 + lsl r0, r1, #8 + orr r0, r2 + str r0, [r3, #0] + bl sub_020594FC + ldr r0, _022489F0 ; =0x0000054A + bl sub_02005748 + ldr r1, _022489F4 ; =0x02257760 + mov r0, #0x20 + ldr r1, [r1, #4] + mov r2, #4 + add r1, #0x48 + bl sub_020095C4 + ldr r1, _022489F4 ; =0x02257760 + ldr r2, [r1, #4] + str r0, [r2, #0x44] + ldr r0, [r1, #4] + mov r2, #6 + add r0, #0x48 + mov r1, #0 + lsl r2, r2, #0x12 + bl sub_0200964C + mov r0, #5 + add sp, #8 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} +_02248930: + add r0, r7, #0 + bl ov23_02248748 + mov r0, #7 + add sp, #8 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} +_0224893E: + ldr r0, _022489F4 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x40] + ldr r0, [r0, #8] + bl ov23_02248614 + cmp r0, #0 + beq _022489E0 + mov r0, #9 + add sp, #8 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} +_02248956: + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _022489EC ; =0xFFFF1FFF + and r1, r2 + add r2, r0, #0 + str r1, [r0, #0] + mov r1, #0 + add r2, #0x50 + add r0, #0x6c + strh r1, [r2] + bl sub_020BDEC4 + ldr r0, _022489F4 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0200A4E4 + ldr r0, _022489F4 ; =0x02257760 + ldr r1, [r0, #4] + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0200A6DC + mov r4, #0 + ldr r6, _022489F4 ; =0x02257760 + add r5, r4, #0 +_02248992: + ldr r0, [r6, #4] + add r1, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022489A4 + bl sub_02021BD4 +_022489A4: + ldr r0, [r6, #4] + mov r1, #0 + add r2, r0, r5 + mov r0, #0x7e + lsl r0, r0, #2 + add r4, r4, #1 + add r5, r5, #4 + str r1, [r2, r0] + cmp r4, #0x19 + blt _02248992 + ldr r0, _022489F4 ; =0x02257760 + ldr r0, [r0, #4] + ldr r0, [r0, #0x44] + bl sub_02021964 + ldr r0, [sp, #4] + bl sub_0200DA58 + add r0, r7, #0 + bl sub_020181C4 + ldr r0, _022489F4 ; =0x02257760 + mov r2, #0 + ldr r1, [r0, #4] + mov r0, #0x29 + lsl r0, r0, #4 + str r2, [r1, r0] + mov r0, #0x80 + bl sub_0205948C +_022489E0: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022489E4: .word 0x04000050 +_022489E8: .word 0x04000040 +_022489EC: .word 0xFFFF1FFF +_022489F0: .word 0x0000054A +_022489F4: .word 0x02257760 + thumb_func_end ov23_02248884 + + thumb_func_start ov23_022489F8 +ov23_022489F8: ; 0x022489F8 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _02248A64 ; =0x02257760 + add r5, r1, #0 + ldr r1, [r0, #4] + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + bne _02248A62 + mov r0, #4 + mov r1, #0x34 + bl sub_02018184 + mov r1, #0 + mov r2, #0x34 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #0x30] + str r5, [r4, #0x20] + str r6, [r4, #0x24] + ldr r0, [sp, #0x18] + str r7, [r4, #0x28] + str r0, [r4, #0x2c] + ldr r0, [sp, #0x1c] + add r1, r4, #0 + str r0, [r4, #8] + ldr r0, [sp, #0x24] + mov r2, #0x64 + str r0, [r4, #0xc] + ldr r0, [sp, #0x2c] + str r0, [r4, #0x10] + ldr r0, [sp, #0x20] + str r0, [r4, #0x14] + ldr r0, [sp, #0x28] + str r0, [r4, #0x18] + ldr r0, [sp, #0x30] + str r0, [r4, #0x1c] + ldr r0, _02248A68 ; =ov23_02248884 + bl sub_0200D9E8 + ldr r1, _02248A64 ; =0x02257760 + ldr r2, [r1, #4] + mov r1, #0x29 + lsl r1, r1, #4 + str r0, [r2, r1] + mov r0, #0x80 + bl sub_02059464 +_02248A62: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248A64: .word 0x02257760 +_02248A68: .word ov23_02248884 + thumb_func_end ov23_022489F8 + + thumb_func_start ov23_02248A6C +ov23_02248A6C: ; 0x02248A6C + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, _02248B38 ; =0x02257760 + add r6, r0, #0 + ldr r1, [r1, #4] + cmp r1, #0 + bne _02248A86 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_02248A86: + ldr r5, [r4, #8] + add r0, r5, #0 + bl sub_02059444 + add r1, r0, #0 + ldr r0, [r4, #0] + cmp r0, #1 + beq _02248A9E + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + bne _02248AC2 +_02248A9E: + ldr r2, _02248B38 ; =0x02257760 + lsl r1, r5, #2 + ldr r3, [r2, #4] + mov r0, #0 + str r0, [r3, r1] + ldr r2, [r2, #4] + add r1, r2, r1 + str r0, [r1, #0x20] + add r0, r6, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_02058BE8 + pop {r4, r5, r6, pc} +_02248AC2: + ldr r0, [r4, #0xc] + cmp r0, #0xe + bhi _02248AF4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02248AD4: ; jump table + .short _02248AF4 - _02248AD4 - 2 ; case 0 + .short _02248AF2 - _02248AD4 - 2 ; case 1 + .short _02248AF2 - _02248AD4 - 2 ; case 2 + .short _02248AF2 - _02248AD4 - 2 ; case 3 + .short _02248AF2 - _02248AD4 - 2 ; case 4 + .short _02248AF2 - _02248AD4 - 2 ; case 5 + .short _02248AF2 - _02248AD4 - 2 ; case 6 + .short _02248AF2 - _02248AD4 - 2 ; case 7 + .short _02248AF2 - _02248AD4 - 2 ; case 8 + .short _02248AF4 - _02248AD4 - 2 ; case 9 + .short _02248AF4 - _02248AD4 - 2 ; case 10 + .short _02248AF4 - _02248AD4 - 2 ; case 11 + .short _02248AF4 - _02248AD4 - 2 ; case 12 + .short _02248AF2 - _02248AD4 - 2 ; case 13 + .short _02248AF2 - _02248AD4 - 2 ; case 14 +_02248AF2: + pop {r4, r5, r6, pc} +_02248AF4: + ldr r0, [r4, #4] + add r0, r0, #1 + lsr r3, r0, #0x1f + lsl r2, r0, #0x1d + str r0, [r4, #4] + sub r2, r2, r3 + mov r0, #0x1d + ror r2, r0 + add r0, r3, r2 + bne _02248B34 + cmp r1, #3 + bhi _02248B2E + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02248B18: ; jump table + .short _02248B20 - _02248B18 - 2 ; case 0 + .short _02248B24 - _02248B18 - 2 ; case 1 + .short _02248B28 - _02248B18 - 2 ; case 2 + .short _02248B2C - _02248B18 - 2 ; case 3 +_02248B20: + mov r1, #3 + b _02248B2E +_02248B24: + mov r1, #2 + b _02248B2E +_02248B28: + mov r1, #0 + b _02248B2E +_02248B2C: + mov r1, #1 +_02248B2E: + add r0, r5, #0 + bl sub_02059424 +_02248B34: + pop {r4, r5, r6, pc} + nop +_02248B38: .word 0x02257760 + thumb_func_end ov23_02248A6C + + thumb_func_start ov23_02248B3C +ov23_02248B3C: ; 0x02248B3C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _02248B8C ; =0x02257760 + add r7, r1, #0 + ldr r1, [r0, #4] + cmp r1, #0 + beq _02248B88 + ldr r0, _02248B90 ; =0x00000B46 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _02248B88 + lsl r5, r6, #2 + ldr r4, [r1, r5] + cmp r4, #0 + bne _02248B84 + mov r0, #4 + mov r1, #0x10 + bl sub_02018184 + mov r1, #0 + mov r2, #0x10 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _02248B8C ; =0x02257760 + add r1, r4, #0 + ldr r0, [r0, #4] + mov r2, #0x64 + str r4, [r0, r5] + ldr r0, _02248B94 ; =ov23_02248A6C + bl sub_0200D9E8 + ldr r1, _02248B8C ; =0x02257760 + ldr r1, [r1, #4] + add r1, r1, r5 + str r0, [r1, #0x20] +_02248B84: + str r6, [r4, #8] + str r7, [r4, #0xc] +_02248B88: + pop {r3, r4, r5, r6, r7, pc} + nop +_02248B8C: .word 0x02257760 +_02248B90: .word 0x00000B46 +_02248B94: .word ov23_02248A6C + thumb_func_end ov23_02248B3C + + thumb_func_start ov23_02248B98 +ov23_02248B98: ; 0x02248B98 + push {r3, r4, r5, lr} + ldr r1, _02248BCC ; =0x02257760 + add r5, r0, #0 + ldr r1, [r1, #4] + lsl r4, r5, #2 + ldr r1, [r1, r4] + cmp r1, #0 + beq _02248BC8 + bl ov23_0224B040 + ldr r0, _02248BCC ; =0x02257760 + mov r2, #1 + ldr r1, [r0, #4] + ldr r1, [r1, r4] + str r2, [r1, #0] + ldr r1, [r0, #4] + mov r2, #0 + str r2, [r1, r4] + ldr r0, [r0, #4] + add r0, r0, r4 + str r2, [r0, #0x20] + add r0, r5, #0 + bl sub_02058BE8 +_02248BC8: + pop {r3, r4, r5, pc} + nop +_02248BCC: .word 0x02257760 + thumb_func_end ov23_02248B98 + + thumb_func_start ov23_02248BD0 +ov23_02248BD0: ; 0x02248BD0 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + ldr r4, _02248C04 ; =0x02257760 + add r5, r6, #0 + add r7, r6, #0 +_02248BDA: + ldr r0, [r4, #4] + add r0, r0, r5 + ldr r0, [r0, #0x20] + cmp r0, #0 + beq _02248BFA + bl sub_0200DA58 + ldr r0, [r4, #4] + ldr r0, [r0, r5] + bl sub_020181C4 + ldr r0, [r4, #4] + add r0, r0, r5 + str r7, [r0, #0x20] + ldr r0, [r4, #4] + str r7, [r0, r5] +_02248BFA: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #8 + blt _02248BDA + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248C04: .word 0x02257760 + thumb_func_end ov23_02248BD0 + + .rodata + + + .global Unk_ov23_022563D0 +Unk_ov23_022563D0: ; 0x022563D0 + .incbin "incbin/overlay23_rodata.bin", 0xC4, 0xC8 - 0xC4 + + .global Unk_ov23_022563D4 +Unk_ov23_022563D4: ; 0x022563D4 + .incbin "incbin/overlay23_rodata.bin", 0xC8, 0xCC - 0xC8 + + .global Unk_ov23_022563D8 +Unk_ov23_022563D8: ; 0x022563D8 + .incbin "incbin/overlay23_rodata.bin", 0xCC, 0xD0 - 0xCC + + .global Unk_ov23_022563DC +Unk_ov23_022563DC: ; 0x022563DC + .incbin "incbin/overlay23_rodata.bin", 0xD0, 0xD4 - 0xD0 + + .global Unk_ov23_022563E0 +Unk_ov23_022563E0: ; 0x022563E0 + .incbin "incbin/overlay23_rodata.bin", 0xD4, 0xDC - 0xD4 + + .global Unk_ov23_022563E8 +Unk_ov23_022563E8: ; 0x022563E8 + .incbin "incbin/overlay23_rodata.bin", 0xDC, 0xE8 - 0xDC + + .global Unk_ov23_022563F4 +Unk_ov23_022563F4: ; 0x022563F4 + .incbin "incbin/overlay23_rodata.bin", 0xE8, 0xF8 - 0xE8 + + .global Unk_ov23_02256404 +Unk_ov23_02256404: ; 0x02256404 + .incbin "incbin/overlay23_rodata.bin", 0xF8, 0x110 - 0xF8 + + .global Unk_ov23_0225641C +Unk_ov23_0225641C: ; 0x0225641C + .incbin "incbin/overlay23_rodata.bin", 0x110, 0x134 - 0x110 + + .global Unk_ov23_02256440 +Unk_ov23_02256440: ; 0x02256440 + .incbin "incbin/overlay23_rodata.bin", 0x134, 0x1C0 - 0x134 + + .global Unk_ov23_022564CC +Unk_ov23_022564CC: ; 0x022564CC + .incbin "incbin/overlay23_rodata.bin", 0x1C0, 0x24C - 0x1C0 + + .global Unk_ov23_02256558 +Unk_ov23_02256558: ; 0x02256558 + .incbin "incbin/overlay23_rodata.bin", 0x24C, 0x2D8 - 0x24C + + .global Unk_ov23_022565E4 +Unk_ov23_022565E4: ; 0x022565E4 + .incbin "incbin/overlay23_rodata.bin", 0x2D8, 0x364 - 0x2D8 + + .global Unk_ov23_02256670 +Unk_ov23_02256670: ; 0x02256670 + .incbin "incbin/overlay23_rodata.bin", 0x364, 0x3F0 - 0x364 + + .global Unk_ov23_022566FC +Unk_ov23_022566FC: ; 0x022566FC + .incbin "incbin/overlay23_rodata.bin", 0x3F0, 0x47C - 0x3F0 + + .global Unk_ov23_02256788 +Unk_ov23_02256788: ; 0x02256788 + .incbin "incbin/overlay23_rodata.bin", 0x47C, 0x1A + + + .bss + + + .global Unk_ov23_02257760 +Unk_ov23_02257760: ; 0x02257760 + .space 0x1 + + .global Unk_ov23_02257764 +Unk_ov23_02257764: ; 0x02257764 + .space 0x4 + diff --git a/asm/ov23_02248C08.s b/asm/ov23_02248C08.s new file mode 100644 index 000000000..1528ea11f --- /dev/null +++ b/asm/ov23_02248C08.s @@ -0,0 +1,410 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02248C08 +ov23_02248C08: ; 0x02248C08 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp] + add r5, r0, #0 + str r2, [sp, #4] + add r0, r3, #0 + mov r1, #0x24 + str r3, [sp, #8] + bl sub_02018144 + str r0, [sp, #0xc] + mov r1, #0 + mov r2, #0x24 + bl sub_020C4CF4 + ldr r1, [sp, #0x28] + ldr r0, [sp, #0xc] + cmp r1, #0 + str r1, [r0, #0] + beq _02248C7E + ldr r1, [sp, #0x2c] + str r1, [r0, #4] + ldr r1, [sp, #0x30] + strb r1, [r0, #0x1e] + ldr r0, [sp, #8] + bl sub_020149F0 + ldr r1, [sp, #0xc] + str r0, [r1, #0x10] + ldr r1, _02248CA0 ; =0x0008090F + bl sub_02014A40 + ldr r1, [sp, #8] + ldr r0, [sp, #0xc] + strb r1, [r0, #0x1d] + ldr r1, [sp, #0xc] + ldrh r0, [r5, #0x10] + ldrb r1, [r1, #0x1d] + bl sub_02013A04 + add r7, r0, #0 + ldrh r0, [r5, #0x10] + mov r6, #0 + cmp r0, #0 + ble _02248C78 + add r4, r6, #0 +_02248C64: + ldr r1, [r5, #0] + add r0, r7, #0 + add r1, r1, r4 + bl sub_02013A90 + ldrh r0, [r5, #0x10] + add r6, r6, #1 + add r4, #8 + cmp r6, r0 + blt _02248C64 +_02248C78: + ldr r0, [sp, #0xc] + str r7, [r5, #0] + str r7, [r0, #8] +_02248C7E: + ldr r1, [sp] + ldr r0, [sp, #4] + add r1, r1, r0 + ldr r0, [sp, #0xc] + strh r1, [r0, #0x20] + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r5, #0 + bl sub_0200112C + ldr r1, [sp, #0xc] + str r0, [r1, #0xc] + add r0, r1, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248CA0: .word 0x0008090F + thumb_func_end ov23_02248C08 + + thumb_func_start ov23_02248CA4 +ov23_02248CA4: ; 0x02248CA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r7, r1, #0 + ldrh r1, [r4, #0x14] + ldrh r0, [r4, #0x16] + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldr r0, [r4, #0xc] + mov r1, #3 + bl sub_02001504 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldrh r0, [r4, #0x18] + cmp r0, r5 + bne _02248CD0 + ldrh r0, [r4, #0x1a] + cmp r0, r7 + beq _02248D1A +_02248CD0: + strh r5, [r4, #0x18] + add r0, r5, r1 + strh r7, [r4, #0x1a] + cmp r0, r6 + blt _02248D1A + cmp r5, r6 + bhi _02248D1A + ldr r0, [r4, #0xc] + mov r1, #7 + bl sub_02001504 + str r0, [sp] + ldr r0, [r4, #0xc] + mov r1, #9 + bl sub_02001504 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, [r4, #0xc] + mov r1, #8 + bl sub_02001504 + str r0, [sp, #4] + sub r0, r6, r5 + add r5, r7, #0 + mul r5, r0 + ldr r0, [r4, #0xc] + mov r1, #0x12 + bl sub_02001504 + ldr r3, [sp, #4] + add r1, r0, #0 + ldr r0, [r4, #0x10] + ldr r2, [sp] + add r3, r5, r3 + bl sub_02014A58 +_02248D1A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02248CA4 + + thumb_func_start ov23_02248D20 +ov23_02248D20: ; 0x02248D20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0xc] + str r0, [sp, #4] + ldr r0, [r5, #0] + cmp r0, #0 + beq _02248D6A + ldr r0, [sp, #4] + mov r1, #2 + bl sub_02001504 + add r7, r0, #0 + add r1, sp, #0xc + ldr r0, [sp, #4] + add r1, #2 + add r2, sp, #0xc + bl sub_020014DC + ldrb r0, [r5, #0x1c] + cmp r0, #0 + bne _02248D4E + b _02248E6C +_02248D4E: + add r1, sp, #0xc + ldrh r0, [r1, #2] + ldrh r1, [r1] + add r2, r5, #0 + bl ov23_02248CA4 + ldr r0, _02248EF0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _02248D6C + mov r0, #4 + tst r0, r1 + bne _02248D6C +_02248D6A: + b _02248EAA +_02248D6C: + ldr r0, _02248EF4 ; =0x000005DC + bl sub_02005748 + add r0, sp, #0xc + ldrh r1, [r0, #2] + ldrh r0, [r0] + add r2, r1, r0 + sub r0, r7, #1 + cmp r0, r2 + bne _02248D88 + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02248D88: + ldrh r1, [r5, #0x14] + ldrh r0, [r5, #0x16] + add r1, r1, r0 + cmp r2, r1 + bne _02248D9A + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02248D9A: + ldr r0, [r5, #4] + ldr r3, [r5, #0] + blx r3 + ldrb r1, [r5, #0x1d] + add r0, r7, #0 + bl sub_02013A04 + mov r4, #0 + add r6, r4, #0 + str r0, [sp] + cmp r7, #0 + ble _02248DF0 +_02248DB2: + ldrh r1, [r5, #0x14] + ldrh r0, [r5, #0x16] + add r0, r1, r0 + cmp r6, r0 + bne _02248DBE + b _02248DCA +_02248DBE: + ldr r2, [r5, #8] + lsl r1, r4, #3 + ldr r0, [sp] + add r1, r2, r1 + bl sub_02013A90 +_02248DCA: + add r0, sp, #0xc + ldrh r1, [r0, #2] + ldrh r0, [r0] + add r4, r4, #1 + add r0, r1, r0 + cmp r6, r0 + bne _02248DEA + ldrh r2, [r5, #0x14] + ldrh r1, [r5, #0x16] + ldr r3, [r5, #8] + ldr r0, [sp] + add r1, r2, r1 + lsl r1, r1, #3 + add r1, r3, r1 + bl sub_02013A90 +_02248DEA: + add r6, r6, #1 + cmp r6, r7 + blt _02248DB2 +_02248DF0: + ldrb r0, [r5, #0x1e] + cmp r0, #0 + beq _02248E34 + sub r0, r7, #1 + mov r4, #0 + str r0, [sp, #8] + cmp r0, #0 + ble _02248E26 + ldr r6, [sp] + add r7, r4, #0 +_02248E04: + ldr r0, [r5, #4] + add r1, r4, #0 + bl sub_02028AFC + cmp r0, #0 + bne _02248E14 + mov r0, #1 + b _02248E16 +_02248E14: + mov r0, #0 +_02248E16: + add r0, r7, r0 + str r0, [r6, #4] + ldr r0, [sp, #8] + add r4, r4, #1 + add r7, r7, #2 + add r6, #8 + cmp r4, r0 + blt _02248E04 +_02248E26: + lsl r0, r4, #1 + add r2, r0, #1 + ldr r0, [sp] + lsl r1, r4, #3 + add r0, r0, r1 + str r2, [r0, #4] + b _02248E48 +_02248E34: + sub r0, r7, #1 + mov r2, #0 + cmp r0, #0 + ble _02248E48 + ldr r1, [sp] +_02248E3E: + str r2, [r1, #4] + add r2, r2, #1 + add r1, #8 + cmp r2, r0 + blt _02248E3E +_02248E48: + ldr r0, [r5, #8] + bl sub_020181C4 + ldr r0, [sp] + ldr r1, [sp] + str r0, [r5, #8] + ldr r0, [sp, #4] + bl sub_020015CC + mov r0, #0 + strb r0, [r5, #0x1c] + ldr r0, [sp, #4] + bl sub_020013AC + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02248E6C: + ldr r0, _02248EF0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #4 + tst r0, r1 + beq _02248EAA + ldr r0, _02248EF4 ; =0x000005DC + bl sub_02005748 + add r0, sp, #0xc + ldrh r3, [r0, #2] + ldrh r1, [r0] + sub r2, r7, #1 + add r1, r3, r1 + cmp r2, r1 + bne _02248E92 + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02248E92: + strh r3, [r5, #0x14] + ldrh r1, [r0] + add sp, #0x10 + strh r1, [r5, #0x16] + ldrh r1, [r0, #2] + strh r1, [r5, #0x18] + ldrh r0, [r0] + strh r0, [r5, #0x1a] + mov r0, #1 + strb r0, [r5, #0x1c] + sub r0, r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_02248EAA: + ldr r0, [sp, #4] + bl sub_02001288 + add r4, r0, #0 + add r1, r5, #0 + ldr r0, [sp, #4] + add r1, #0x20 + ldrh r6, [r5, #0x20] + bl sub_020014D0 + ldrh r0, [r5, #0x20] + cmp r6, r0 + beq _02248ECA + ldr r0, _02248EF4 ; =0x000005DC + bl sub_02005748 +_02248ECA: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02248EDA + add r0, r0, #1 + cmp r4, r0 + beq _02248EE8 + b _02248EE2 +_02248EDA: + ldr r0, _02248EF4 ; =0x000005DC + bl sub_02005748 + b _02248EE8 +_02248EE2: + ldr r0, _02248EF4 ; =0x000005DC + bl sub_02005748 +_02248EE8: + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248EF0: .word 0x021BF67C +_02248EF4: .word 0x000005DC + thumb_func_end ov23_02248D20 + + thumb_func_start ov23_02248EF8 +ov23_02248EF8: ; 0x02248EF8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02001384 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02248F14 + ldr r0, [r4, #0x10] + bl sub_02014A20 + ldr r0, [r4, #8] + bl sub_020181C4 +_02248F14: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov23_02248EF8 \ No newline at end of file diff --git a/asm/ov23_02248F1C.s b/asm/ov23_02248F1C.s new file mode 100644 index 000000000..c40a8cb78 --- /dev/null +++ b/asm/ov23_02248F1C.s @@ -0,0 +1,1318 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02248F1C +ov23_02248F1C: ; 0x02248F1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r4, r1, #0 + mov r1, #0x6e + lsl r1, r1, #2 + ldr r2, [r4, r1] + str r2, [sp, #0x2c] + ldr r2, _022491C8 ; =0x02257768 + str r4, [r2, #0] + ldr r2, [r4, #0] + cmp r2, #8 + bls _02248F36 + b _022491C4 +_02248F36: + add r3, r2, r2 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_02248F42: ; jump table + .short _02248F54 - _02248F42 - 2 ; case 0 + .short _02248F7E - _02248F42 - 2 ; case 1 + .short _02249084 - _02248F42 - 2 ; case 2 + .short _0224908C - _02248F42 - 2 ; case 3 + .short _022490BE - _02248F42 - 2 ; case 4 + .short _022490C6 - _02248F42 - 2 ; case 5 + .short _02249130 - _02248F42 - 2 ; case 6 + .short _0224914C - _02248F42 - 2 ; case 7 + .short _022491B8 - _02248F42 - 2 ; case 8 +_02248F54: + mov r1, #0x39 + lsl r1, r1, #4 + ldr r0, [sp, #0x2c] + add r1, r4, r1 + bl ov23_0224944C + add r1, r4, #0 + add r0, r4, #4 + add r1, #0x44 + bl ov23_022491CC + mov r0, #0xeb + lsl r0, r0, #2 + add r0, r4, r0 + bl ov23_02249724 + ldr r0, [r4, #0] + add sp, #0x60 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02248F7E: + add r0, r4, #0 + bl ov23_02249584 + mov r1, #0xfa + lsl r1, r1, #2 + mov r0, #0 + mov r3, #0xba + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r3, r3, #2 + ldr r2, [r4, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r4, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r4, r2] + add r3, #0x20 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r4, r3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_020093B4 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + str r0, [sp, #0x30] + mov r0, #0xc2 + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #0x34] + mov r0, #0x12 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + str r0, [sp, #0x3c] + lsr r0, r1, #5 + mov r6, #0 + mov r7, #0xcb + str r1, [sp, #0x38] + str r6, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + add r0, sp, #0x30 + strh r6, [r0, #0x20] + mov r0, #2 + str r0, [sp, #0x58] + mov r0, #4 + str r6, [sp, #0x54] + str r0, [sp, #0x5c] + add r5, r4, #0 + lsl r7, r7, #2 +_02249002: + add r0, sp, #0x30 + bl sub_02021AA0 + mov r1, #0xcb + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r5, r7] + mov r1, #0 + bl sub_02021CAC + cmp r6, #0 + bne _02249030 + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021D6C +_02249030: + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #8 + blt _02249002 + mov r7, #0xd3 + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_02249040: + add r0, sp, #0x30 + bl sub_02021AA0 + mov r1, #0xd3 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0xd3 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, r7] + mov r1, #2 + bl sub_02021D6C + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #0x11 + blt _02249040 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #0] + add sp, #0x60 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_02249084: + add r0, r2, #1 + add sp, #0x60 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_0224908C: + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201975C + ldr r0, [r4, #0] + add sp, #0x60 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_022490BE: + add r0, r2, #1 + add sp, #0x60 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_022490C6: + sub r0, r1, #4 + ldr r0, [r4, r0] + add r2, r4, #0 + ldr r0, [r0, #0x3c] + add r1, r4, #4 + add r2, #0x44 + bl ov23_02249214 + mov r1, #0xcb + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x44 + add r1, r4, r1 + bl ov23_022492C8 + add r0, r4, #0 + add r0, #0xa4 + bl ov23_02249334 + mov r1, #0xd3 + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0xa4 + add r1, r4, r1 + bl ov23_0224937C + mov r3, #0xea + lsl r3, r3, #2 + add r0, r4, r3 + str r0, [sp] + add r0, r3, #4 + add r0, r4, r0 + str r0, [sp, #4] + mov r0, #0x6e + lsl r0, r0, #2 + add r1, r3, #0 + add r2, r3, #0 + sub r1, #0x18 + sub r2, #8 + sub r3, r3, #4 + ldr r0, [r4, r0] + add r1, r4, r1 + add r2, r4, r2 + add r3, r4, r3 + bl ov23_0224966C + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020219F8 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} +_02249130: + mov r0, #0x3a + lsl r0, r0, #4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DA04 + cmp r0, #0 + beq _022491C4 + ldr r0, [r4, #0] + add sp, #0x60 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_0224914C: + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200A4E4 + mov r0, #0xbf + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200A6DC + mov r7, #0xba + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_02249168: + ldr r0, [r5, r7] + bl sub_02009754 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _02249168 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021964 + mov r0, #0x39 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #0 + bl sub_0200E084 + mov r0, #0x39 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, [sp, #0x2c] + mov r1, #7 + bl sub_02019044 + ldr r0, [sp, #0x2c] + bl ov23_02249438 + mov r0, #0xeb + lsl r0, r0, #2 + add r0, r4, r0 + bl ov23_02249778 + ldr r0, [r4, #0] + add sp, #0x60 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_022491B8: + sub r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0 + str r2, [r1, #0x6c] + bl sub_020067D0 +_022491C4: + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022491C8: .word 0x02257768 + thumb_func_end ov23_02248F1C + + thumb_func_start ov23_022491CC +ov23_022491CC: ; 0x022491CC + push {r3, r4, r5, r6, r7, lr} + ldr r4, _02249210 ; =0x0225776C + add r6, r0, #0 + add r5, r1, #0 + mov r7, #0 +_022491D6: + mov r0, #0 + str r0, [r6, #0] + str r0, [r6, #4] + str r0, [r5, #0] + str r0, [r5, #4] + str r0, [r5, #8] + bl sub_0201D2E8 + mov r1, #0x7d + lsl r1, r1, #2 + bl sub_020E1F6C + add r1, #0x32 + str r1, [r4, #0] + bl sub_0201D2E8 + mov r1, #0x7d + lsl r1, r1, #2 + bl sub_020E1F6C + add r1, #0x32 + str r1, [r4, #4] + add r7, r7, #1 + add r6, #8 + add r5, #0xc + add r4, #8 + cmp r7, #8 + blt _022491D6 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249210: .word 0x0225776C + thumb_func_end ov23_022491CC + + thumb_func_start ov23_02249214 +ov23_02249214: ; 0x02249214 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + str r0, [sp] + add r4, r2, #0 + mov r7, #0 + add r6, r5, #0 +_02249220: + add r0, r7, #0 + bl sub_02058CA0 + str r0, [r6, #0] + add r0, r7, #0 + bl sub_02058CF4 + str r0, [r6, #4] + add r7, r7, #1 + add r6, #8 + cmp r7, #8 + blt _02249220 + bl sub_02035E38 + cmp r0, #0 + beq _0224928A + bl sub_0203608C + bl sub_02035D78 + cmp r0, #0 + bne _0224925E + ldr r0, [sp] + bl sub_0205EABC + str r0, [r5, #0] + ldr r0, [sp] + bl sub_0205EAC8 + str r0, [r5, #4] + b _0224928A +_0224925E: + ldr r7, [r5, #0] + ldr r6, [r5, #4] + bl sub_0203608C + lsl r0, r0, #3 + ldr r0, [r5, r0] + str r0, [r5, #0] + bl sub_0203608C + lsl r0, r0, #3 + add r0, r5, r0 + ldr r0, [r0, #4] + str r0, [r5, #4] + bl sub_0203608C + lsl r0, r0, #3 + str r7, [r5, r0] + bl sub_0203608C + lsl r0, r0, #3 + add r0, r5, r0 + str r6, [r0, #4] +_0224928A: + mov r6, #0 + mov r7, #0x3c +_0224928E: + ldr r0, [r5, #0] + ldr r1, [r5, #4] + bl ov23_02242E58 + cmp r0, #0 + bne _022492AA + ldr r0, [r5, #0] + sub r0, #0x20 + str r0, [r4, #0] + ldr r0, [r5, #4] + sub r0, #0x40 + str r0, [r4, #4] + str r7, [r4, #8] + b _022492BA +_022492AA: + ldr r1, [r4, #8] + cmp r1, #0 + beq _022492BA + ldr r0, [r4, #0] + cmp r0, #0 + blt _022492BA + sub r0, r1, #1 + str r0, [r4, #8] +_022492BA: + add r6, r6, #1 + add r5, #8 + add r4, #0xc + cmp r6, #8 + blt _0224928E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02249214 + + thumb_func_start ov23_022492C8 +ov23_022492C8: ; 0x022492C8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r7, #1 + add r5, r0, #0 + add r4, r1, #0 + mov r6, #0 + lsl r7, r7, #0xc +_022492D6: + ldr r0, [r5, #8] + cmp r0, #0 + beq _0224931C + ldr r1, [r5, #0] + mov r0, #0x8a + mul r0, r1 + mov r1, #7 + lsl r1, r1, #6 + bl sub_020E1F6C + add r0, #0x3c + lsl r0, r0, #0xc + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x1a + lsl r0, r0, #7 + lsl r1, r1, #4 + bl sub_020E1F6C + add r0, #9 + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r7, [sp, #8] + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021CAC + b _02249324 +_0224931C: + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021CAC +_02249324: + add r6, r6, #1 + add r5, #0xc + add r4, r4, #4 + cmp r6, #8 + blt _022492D6 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_022492C8 + + thumb_func_start ov23_02249334 +ov23_02249334: ; 0x02249334 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r4, #0 +_0224933A: + add r0, r4, #0 + bl ov23_02242E78 + add r6, r0, #0 + add r0, r4, #0 + bl ov23_02242EE0 + add r7, r0, #0 + add r0, r4, #0 + bl ov23_02242F48 + str r0, [sp] + add r0, r6, #0 + add r1, r7, #0 + bl ov23_02242E58 + cmp r0, #0 + bne _0224936A + sub r6, #0x20 + str r6, [r5, #0] + sub r7, #0x40 + str r7, [r5, #4] + ldr r0, [sp] + b _02249370 +_0224936A: + mov r0, #0 + str r0, [r5, #0] + str r0, [r5, #4] +_02249370: + add r4, r4, #1 + str r0, [r5, #8] + add r5, #0x10 + cmp r4, #0x11 + blt _0224933A + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_02249334 + + thumb_func_start ov23_0224937C +ov23_0224937C: ; 0x0224937C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r7, #1 + add r5, r0, #0 + add r4, r1, #0 + mov r6, #0 + lsl r7, r7, #0xc +_0224938A: + ldr r1, [r5, #0] + cmp r1, #0 + beq _022493E8 + mov r0, #0x8a + mul r0, r1 + mov r1, #7 + lsl r1, r1, #6 + bl sub_020E1F6C + add r0, #0x3c + lsl r0, r0, #0xc + str r0, [sp] + ldr r0, [r5, #4] + mov r1, #0x1a + lsl r0, r0, #7 + lsl r1, r1, #4 + bl sub_020E1F6C + add r0, #9 + lsl r1, r0, #0xc + mov r0, #3 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r7, [sp, #8] + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0 + bl sub_02021C50 + ldr r1, [r5, #8] + ldr r0, [r5, #0xc] + cmp r1, r0 + beq _022493F0 + cmp r1, #0 + ldr r0, [r4, #0] + beq _022493E0 + bl sub_02021D6C + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021CAC + b _022493F0 +_022493E0: + mov r1, #0 + bl sub_02021CAC + b _022493F0 +_022493E8: + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021CAC +_022493F0: + ldr r0, [r5, #8] + add r6, r6, #1 + str r0, [r5, #0xc] + add r5, #0x10 + add r4, r4, #4 + cmp r6, #0x11 + blt _0224938A + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_0224937C + + thumb_func_start ov23_02249404 +ov23_02249404: ; 0x02249404 + push {r4, lr} + add r4, r0, #0 + mov r1, #0x4e + mov r2, #4 + ldr r0, _02249428 ; =ov23_02248F1C + lsl r1, r1, #4 + add r3, r2, #0 + bl sub_0200679C + bl sub_0201CED0 + mov r1, #0x6d + lsl r1, r1, #2 + str r4, [r0, r1] + ldr r2, [r4, #8] + add r1, r1, #4 + str r2, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_02249428: .word ov23_02248F1C + thumb_func_end ov23_02249404 + + thumb_func_start ov23_0224942C +ov23_0224942C: ; 0x0224942C + ldr r1, [r0, #0] + cmp r1, #5 + bne _02249436 + mov r1, #6 + str r1, [r0, #0] +_02249436: + bx lr + thumb_func_end ov23_0224942C + + thumb_func_start ov23_02249438 +ov23_02249438: ; 0x02249438 + push {r4, lr} + add r4, r0, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #5 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov23_02249438 + + thumb_func_start ov23_0224944C +ov23_0224944C: ; 0x0224944C + push {r3, r4, r5, r6, lr} + sub sp, #0x64 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + add r0, r5, #0 + bl ov23_02249438 + ldr r4, _02249578 ; =0x022567DC + add r3, sp, #0x48 + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + ldr r4, _0224957C ; =0x022567C0 + add r3, sp, #0x2c + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + ldr r4, _02249580 ; =0x022567A4 + add r3, sp, #0x10 + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + mov r1, #7 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + add r0, r5, #0 + mov r1, #7 + bl sub_02019EBC + mov r0, #0x1c + mov r1, #4 + bl sub_02006C24 + mov r1, #0x40 + str r1, [sp] + mov r1, #0 + mov r2, #4 + add r3, r1, #0 + add r4, r0, #0 + str r2, [sp, #4] + bl sub_02007130 + mov r1, #0 + mov r0, #5 + str r1, [sp] + lsl r0, r0, #0xa + str r0, [sp, #4] + str r1, [sp, #8] + mov r3, #4 + add r0, r4, #0 + mov r1, #1 + add r2, r5, #0 + str r3, [sp, #0xc] + bl sub_020070E8 + mov r1, #0 + mov r0, #6 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + str r1, [sp, #8] + mov r3, #4 + add r0, r4, #0 + mov r1, #2 + add r2, r5, #0 + str r3, [sp, #0xc] + bl sub_0200710C + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #4 + mov r1, #0 + bl sub_0205D8CC + mov r0, #7 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #7 + bl sub_0205D8F4 + add r0, r6, #0 + mov r1, #0 + bl sub_0201ADA4 + mov r3, #0x80 + str r3, [sp] + mov r2, #4 + mov r0, #0x32 + mov r1, #0x34 + add r3, #0xc0 + str r2, [sp, #4] + bl sub_02006E84 + mov r0, #1 + bl sub_0200F338 + add sp, #0x64 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02249578: .word 0x022567DC +_0224957C: .word 0x022567C0 +_02249580: .word 0x022567A4 + thumb_func_end ov23_0224944C + + thumb_func_start ov23_02249584 +ov23_02249584: ; 0x02249584 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #7 + add r6, r0, #0 + lsl r1, r1, #6 + mov r0, #0x19 + add r1, r6, r1 + mov r2, #4 + bl sub_020095C4 + mov r1, #0x6f + lsl r1, r1, #2 + mov r7, #0xba + str r0, [r6, r1] + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_022495A6: + mov r0, #1 + add r1, r4, #0 + mov r2, #4 + bl sub_02009714 + str r0, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022495A6 + mov r0, #0x1c + mov r1, #4 + bl sub_02006C24 + add r4, r0, #0 + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r2, #4 + mov r0, #0xba + str r2, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r1, r4, #0 + mov r3, #0 + bl sub_02009A4C + mov r1, #0xbe + lsl r1, r1, #2 + str r0, [r6, r1] + add r0, r1, #0 + add r0, #0xf0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #4 + sub r1, #0xc + str r0, [sp, #0xc] + ldr r0, [r6, r1] + add r1, r4, #0 + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + mov r1, #0xbf + lsl r1, r1, #2 + str r0, [r6, r1] + add r0, r1, #0 + add r0, #0xec + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r6, r1] + add r1, r4, #0 + mov r2, #5 + mov r3, #0 + bl sub_02009BC4 + mov r1, #3 + lsl r1, r1, #8 + str r0, [r6, r1] + add r0, r1, #0 + add r0, #0xe8 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r6, r1] + add r1, r4, #0 + mov r2, #6 + mov r3, #0 + bl sub_02009BC4 + mov r1, #0xc1 + lsl r1, r1, #2 + str r0, [r6, r1] + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0200A3DC + mov r0, #0xbf + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0200A640 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_02249584 + + thumb_func_start ov23_0224966C +ov23_0224966C: ; 0x0224966C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r4, [sp, #0x2c] + str r1, [sp, #0xc] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r7, r2, #0 + add r6, r3, #0 + ldr r5, [sp, #0x28] + bl ov23_02242D60 + cmp r0, #0 + beq _022496A2 +_02249688: + add r1, r4, #0 + add r1, #0x80 + ldr r1, [r1, #0] + add r0, r4, #0 + bl ov23_02249844 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl ov23_02242D60 + cmp r0, #0 + bne _02249688 +_022496A2: + ldr r0, [r6, #0] + cmp r0, #0 + beq _022496B4 + cmp r0, #1 + beq _022496DA + cmp r0, #2 + beq _022496F4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_022496B4: + add r0, r4, #0 + bl ov23_022498C4 + add r2, r0, #0 + beq _02249720 + mov r0, #0x10 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r3, #0 + ldr r0, [sp, #0xc] + str r3, [sp, #8] + bl sub_0201D738 + str r0, [r7, #0] + mov r0, #1 + add sp, #0x10 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} +_022496DA: + ldr r0, [r7, #0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DA04 + cmp r0, #0 + beq _02249720 + mov r0, #2 + str r0, [r6, #0] + mov r0, #0 + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022496F4: + add r0, r4, #0 + bl ov23_02249900 + cmp r0, #0 + bne _02249720 + mov r1, #0 + ldr r0, [sp, #0xc] + mov r2, #2 + add r3, r1, #0 + bl sub_0201C04C + ldr r0, [sp, #0xc] + bl sub_0201A954 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + cmp r0, #8 + blt _02249720 + mov r0, #0 + str r0, [r5, #0] + str r0, [r6, #0] +_02249720: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0224966C + + thumb_func_start ov23_02249724 +ov23_02249724: ; 0x02249724 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + mov r7, #0x64 +_0224972E: + add r0, r7, #0 + mov r1, #4 + bl sub_02023790 + add r6, r6, #1 + stmia r4!, {r0} + cmp r6, #0x20 + blt _0224972E + add r0, r5, #0 + mov r1, #0 + add r0, #0x8c + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x90 + str r1, [r0, #0] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + add r1, r5, #0 + add r1, #0x80 + str r0, [r1, #0] + mov r4, #0 + mov r6, #0x50 + mov r7, #4 +_02249760: + add r0, r6, #0 + add r1, r7, #0 + bl sub_02023790 + add r1, r5, #0 + add r1, #0x84 + add r4, r4, #1 + add r5, r5, #4 + str r0, [r1, #0] + cmp r4, #2 + blt _02249760 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_02249724 + + thumb_func_start ov23_02249778 +ov23_02249778: ; 0x02249778 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 +_02249780: + ldr r0, [r4, #0] + bl sub_020237BC + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #0x20 + blt _02249780 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_020237BC + mov r4, #0 +_0224979A: + add r0, r5, #0 + add r0, #0x84 + ldr r0, [r0, #0] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0224979A + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02249778 + + thumb_func_start ov23_022497B0 +ov23_022497B0: ; 0x022497B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + add r0, r1, #0 + add r1, r5, #0 + add r1, #0x94 + mov r2, #0x50 + bl sub_02023DF0 + add r0, r5, #0 + add r0, #0x94 + ldrh r2, [r0] + mov r4, #0 + ldr r0, _02249840 ; =0x0000FFFF + add r1, r4, #0 + cmp r2, r0 + beq _022497F6 + add r7, r0, #0 + mov r0, #0xe + add r2, r5, #0 + lsl r0, r0, #0xc +_022497DA: + add r3, r2, #0 + add r3, #0x94 + ldrh r3, [r3] + cmp r3, r0 + bne _022497E8 + add r4, r4, #1 + add r6, r1, #0 +_022497E8: + add r2, r2, #2 + add r3, r2, #0 + add r3, #0x94 + ldrh r3, [r3] + add r1, r1, #1 + cmp r3, r7 + bne _022497DA +_022497F6: + cmp r4, #2 + blt _022497FE + bl sub_02022974 +_022497FE: + cmp r4, #0 + bne _02249810 + add r5, #0x84 + ldr r0, [r5, #0] + ldr r1, [sp] + bl sub_02023810 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02249810: + lsl r0, r6, #1 + add r0, r5, r0 + ldr r1, _02249840 ; =0x0000FFFF + add r0, #0x94 + strh r1, [r0] + add r0, r5, #0 + add r0, #0x84 + add r1, r5, #0 + ldr r0, [r0, #0] + add r1, #0x94 + bl sub_02023D28 + add r0, r5, #0 + add r0, #0x88 + add r1, r6, #1 + ldr r0, [r0, #0] + add r5, #0x94 + lsl r1, r1, #1 + add r1, r5, r1 + bl sub_02023D28 + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} + nop +_02249840: .word 0x0000FFFF + thumb_func_end ov23_022497B0 + + thumb_func_start ov23_02249844 +ov23_02249844: ; 0x02249844 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov23_022497B0 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x8c + mov r2, #0 + ldr r1, [r0, #0] + cmp r6, #0 + ble _02249878 + add r0, r5, #0 + add r0, #0x90 + ldr r3, [r0, #0] + add r0, r2, #0 +_02249862: + add r1, r1, #1 + cmp r1, #0x20 + bne _0224986A + add r1, r0, #0 +_0224986A: + cmp r1, r3 + bne _02249872 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02249872: + add r2, r2, #1 + cmp r2, r6 + blt _02249862 +_02249878: + mov r0, #0 + str r0, [sp] + cmp r6, #0 + ble _022498BE + add r7, r5, #0 + add r4, r5, #0 + add r7, #0x8c +_02249886: + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r4, #0 + lsl r0, r0, #2 + add r1, #0x84 + ldr r0, [r5, r0] + ldr r1, [r1, #0] + bl sub_02023810 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + cmp r0, #0x20 + bne _022498B2 + add r1, r5, #0 + add r1, #0x8c + mov r0, #0 + str r0, [r1, #0] +_022498B2: + ldr r0, [sp] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp] + cmp r0, r6 + blt _02249886 +_022498BE: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02249844 + + thumb_func_start ov23_022498C4 +ov23_022498C4: ; 0x022498C4 + add r1, r0, #0 + add r2, r0, #0 + add r1, #0x90 + add r2, #0x8c + ldr r1, [r1, #0] + ldr r2, [r2, #0] + cmp r2, r1 + beq _022498FA + add r2, r0, #0 + add r2, #0x90 + ldr r2, [r2, #0] + add r3, r2, #1 + add r2, r0, #0 + add r2, #0x90 + str r3, [r2, #0] + add r2, r0, #0 + add r2, #0x90 + ldr r2, [r2, #0] + cmp r2, #0x20 + bne _022498F4 + add r2, r0, #0 + mov r3, #0 + add r2, #0x90 + str r3, [r2, #0] +_022498F4: + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr +_022498FA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_022498C4 + + thumb_func_start ov23_02249900 +ov23_02249900: ; 0x02249900 + add r1, r0, #0 + add r1, #0x8c + add r0, #0x90 + ldr r1, [r1, #0] + ldr r0, [r0, #0] + cmp r1, r0 + bne _02249912 + mov r0, #1 + bx lr +_02249912: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_02249900 + + .rodata + + + .global Unk_ov23_022567A4 +Unk_ov23_022567A4: ; 0x022567A4 + .incbin "incbin/overlay23_rodata.bin", 0x498, 0x4B4 - 0x498 + + .global Unk_ov23_022567C0 +Unk_ov23_022567C0: ; 0x022567C0 + .incbin "incbin/overlay23_rodata.bin", 0x4B4, 0x4D0 - 0x4B4 + + .global Unk_ov23_022567DC +Unk_ov23_022567DC: ; 0x022567DC + .incbin "incbin/overlay23_rodata.bin", 0x4D0, 0x1C + + + .bss + + + .global Unk_ov23_02257768 +Unk_ov23_02257768: ; 0x02257768 + .space 0x4 + + .global Unk_ov23_0225776C +Unk_ov23_0225776C: ; 0x0225776C + .space 0x40 + diff --git a/asm/ov23_02249918.s b/asm/ov23_02249918.s new file mode 100644 index 000000000..820009fe0 --- /dev/null +++ b/asm/ov23_02249918.s @@ -0,0 +1,164 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02249918 +ov23_02249918: ; 0x02249918 + mov r0, #0x78 + bx lr + thumb_func_end ov23_02249918 + + thumb_func_start ov23_0224991C +ov23_0224991C: ; 0x0224991C + push {r4, lr} + add r4, r0, #0 + bl sub_020361BC + mov r1, #0 + add r4, #0x18 + add r0, r1, #0 +_0224992A: + strb r0, [r4, #0xa] + str r0, [r4, #4] + add r1, r1, #1 + add r4, #0xc + cmp r1, #8 + blt _0224992A + pop {r4, pc} + thumb_func_end ov23_0224991C + + thumb_func_start ov23_02249938 +ov23_02249938: ; 0x02249938 + bx lr + ; .align 2, 0 + thumb_func_end ov23_02249938 + + thumb_func_start ov23_0224993C +ov23_0224993C: ; 0x0224993C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #8 + blt _0224994A + bl sub_02022974 +_0224994A: + mov r0, #0xc + add r5, #0x18 + mul r0, r4 + add r0, r5, r0 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224993C + + thumb_func_start ov23_02249954 +ov23_02249954: ; 0x02249954 + mov r3, #0 + add r0, #0x18 + add r1, r3, #0 +_0224995A: + ldr r2, [r0, #4] + cmp r2, #0 + ble _02249964 + sub r2, r2, #1 + str r2, [r0, #4] +_02249964: + ldr r2, [r0, #4] + cmp r2, #0 + bne _0224996C + strb r1, [r0, #0xa] +_0224996C: + add r3, r3, #1 + add r0, #0xc + cmp r3, #8 + blt _0224995A + bx lr + ; .align 2, 0 + thumb_func_end ov23_02249954 + + thumb_func_start ov23_02249978 +ov23_02249978: ; 0x02249978 + strb r1, [r0, #0xa] + lsl r2, r1, #2 + ldr r1, _0224998C ; =0x02257580 + ldr r1, [r1, r2] + str r1, [r0, #4] + ldr r1, _02249990 ; =0x0225759C + ldr r1, [r1, r2] + str r1, [r0, #0] + bx lr + nop +_0224998C: .word 0x02257580 +_02249990: .word 0x0225759C + thumb_func_end ov23_02249978 + + thumb_func_start ov23_02249994 +ov23_02249994: ; 0x02249994 + ldr r3, _02249998 ; =ov23_02249978 + bx r3 + ; .align 2, 0 +_02249998: .word ov23_02249978 + thumb_func_end ov23_02249994 + + thumb_func_start ov23_0224999C +ov23_0224999C: ; 0x0224999C + ldrb r0, [r0, #0xa] + cmp r0, #0 + bne _022499A6 + mov r0, #1 + bx lr +_022499A6: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_0224999C + + thumb_func_start ov23_022499AC +ov23_022499AC: ; 0x022499AC + ldrb r0, [r0, #0xa] + cmp r0, #2 + bne _022499B6 + mov r0, #0 + bx lr +_022499B6: + cmp r0, #5 + bne _022499BE + mov r0, #0 + bx lr +_022499BE: + cmp r0, #3 + bne _022499C6 + mov r0, #1 + bx lr +_022499C6: + cmp r0, #1 + bne _022499CE + mov r0, #1 + bx lr +_022499CE: + cmp r0, #4 + bne _022499D6 + mov r0, #1 + bx lr +_022499D6: + cmp r0, #0 + bne _022499DE + mov r0, #1 + bx lr +_022499DE: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_022499AC + .data + + + .global Unk_ov23_02257580 +Unk_ov23_02257580: ; 0x02257580 + .incbin "incbin/overlay23_data.bin", 0x9A0, 0x9BC - 0x9A0 + + .global Unk_ov23_0225759C +Unk_ov23_0225759C: ; 0x0225759C + .incbin "incbin/overlay23_data.bin", 0x9BC, 0x1C + diff --git a/asm/ov23_022499E4.s b/asm/ov23_022499E4.s new file mode 100644 index 000000000..0bb9502e4 --- /dev/null +++ b/asm/ov23_022499E4.s @@ -0,0 +1,1045 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_022499E4 +ov23_022499E4: ; 0x022499E4 + bx lr + ; .align 2, 0 + thumb_func_end ov23_022499E4 + + thumb_func_start ov23_022499E8 +ov23_022499E8: ; 0x022499E8 + push {r4, lr} + add r4, r0, #0 + bl sub_0205964C + cmp r0, #0 + bne _02249A2A + add r0, r4, #0 + bl sub_0203D174 + bl sub_02036794 + add r0, r4, #0 + bl sub_0205965C + bl sub_0205964C + mov r2, #0x3a + add r4, r0, #0 + mov r0, #3 + mov r1, #0x21 + lsl r2, r2, #0xa + bl sub_02017FC8 + ldr r0, [r4, #0x18] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206ADDC + cmp r0, #0 + bne _02249A2A + bl sub_02036894 +_02249A2A: + pop {r4, pc} + thumb_func_end ov23_022499E8 + + thumb_func_start ov23_02249A2C +ov23_02249A2C: ; 0x02249A2C + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + mov r1, #1 + add r0, #0x41 + strb r1, [r0] + ldr r0, [r4, #0x18] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x24 + bl sub_0202CFEC + ldr r0, [r4, #0x18] + bl ov23_02242BC0 + ldr r0, _02249A58 ; =ov23_02249C34 + mov r1, #0 + bl ov23_02249C24 + pop {r4, pc} + ; .align 2, 0 +_02249A58: .word ov23_02249C34 + thumb_func_end ov23_02249A2C + + thumb_func_start ov23_02249A5C +ov23_02249A5C: ; 0x02249A5C + push {r3, lr} + bl sub_0205964C + cmp r0, #0 + beq _02249A6E + ldr r0, _02249A70 ; =ov23_0224A1A0 + mov r1, #3 + bl ov23_02249C24 +_02249A6E: + pop {r3, pc} + ; .align 2, 0 +_02249A70: .word ov23_0224A1A0 + thumb_func_end ov23_02249A5C + + thumb_func_start ov23_02249A74 +ov23_02249A74: ; 0x02249A74 + push {r3, lr} + bl sub_02036884 + ldr r0, _02249A84 ; =ov23_0224A02C + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_02249A84: .word ov23_0224A02C + thumb_func_end ov23_02249A74 + + thumb_func_start ov23_02249A88 +ov23_02249A88: ; 0x02249A88 + push {r3, lr} + bl sub_02033DFC + cmp r0, #0 + bne _02249A9E + bl ov23_0224C198 + ldr r0, _02249AA0 ; =ov23_02249C34 + mov r1, #0 + bl ov23_02249C24 +_02249A9E: + pop {r3, pc} + ; .align 2, 0 +_02249AA0: .word ov23_02249C34 + thumb_func_end ov23_02249A88 + + thumb_func_start ov23_02249AA4 +ov23_02249AA4: ; 0x02249AA4 + push {r3, lr} + bl sub_020368A4 + ldr r0, _02249AB4 ; =ov23_02249A88 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_02249AB4: .word ov23_02249A88 + thumb_func_end ov23_02249AA4 + + thumb_func_start ov23_02249AB8 +ov23_02249AB8: ; 0x02249AB8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + bl sub_0205964C + add r2, sp, #0 + ldr r5, [r0, #0x34] + ldr r3, _02249B3C ; =0x022567F8 + add r6, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, _02249B40 ; =ov23_02249E18 + ldr r4, _02249B44 ; =ov23_0224A09C + ldr r7, _02249B48 ; =ov23_02249CE4 + cmp r5, r0 + bne _02249AE8 + ldr r0, _02249B4C ; =ov23_02249E84 + mov r1, #0 + bl ov23_02249C24 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02249AE8: + cmp r4, r5 + bne _02249AFA + ldr r0, _02249B50 ; =ov23_0224A0CC + mov r1, #0 + bl ov23_02249C24 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02249AFA: + cmp r7, r5 + bne _02249B0C + ldr r0, _02249B54 ; =ov23_0224A138 + mov r1, #0 + bl ov23_02249C24 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02249B0C: + ldr r0, _02249B58 ; =ov23_0224A024 + cmp r0, r5 + bne _02249B20 + ldr r0, _02249B5C ; =ov23_0224A16C + mov r1, #0 + bl ov23_02249C24 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02249B20: + mov r1, #0 +_02249B22: + ldr r0, [r6, #0] + cmp r5, r0 + bne _02249B2E + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02249B2E: + add r1, r1, #1 + add r6, r6, #4 + cmp r1, #4 + blo _02249B22 + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249B3C: .word 0x022567F8 +_02249B40: .word ov23_02249E18 +_02249B44: .word ov23_0224A09C +_02249B48: .word ov23_02249CE4 +_02249B4C: .word ov23_02249E84 +_02249B50: .word ov23_0224A0CC +_02249B54: .word ov23_0224A138 +_02249B58: .word ov23_0224A024 +_02249B5C: .word ov23_0224A16C + thumb_func_end ov23_02249AB8 + + thumb_func_start ov23_02249B60 +ov23_02249B60: ; 0x02249B60 + push {r4, lr} + bl sub_0205964C + ldr r4, [r0, #0x34] + ldr r0, _02249BB4 ; =ov23_02249E98 + ldr r3, _02249BB8 ; =ov23_0224A0E0 + ldr r2, _02249BBC ; =ov23_0224A14C + ldr r1, _02249BC0 ; =ov23_0224A180 + cmp r4, r0 + bne _02249B80 + ldr r0, _02249BC4 ; =ov23_02249EA0 + mov r1, #0 + bl ov23_02249C24 + mov r0, #1 + pop {r4, pc} +_02249B80: + cmp r3, r4 + bne _02249B90 + ldr r0, _02249BC8 ; =ov23_0224A0E8 + mov r1, #0 + bl ov23_02249C24 + mov r0, #1 + pop {r4, pc} +_02249B90: + cmp r2, r4 + bne _02249BA0 + ldr r0, _02249BCC ; =ov23_0224A150 + mov r1, #0 + bl ov23_02249C24 + mov r0, #1 + pop {r4, pc} +_02249BA0: + cmp r1, r4 + bne _02249BB0 + ldr r0, _02249BD0 ; =ov23_0224A184 + mov r1, #0 + bl ov23_02249C24 + mov r0, #1 + pop {r4, pc} +_02249BB0: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02249BB4: .word ov23_02249E98 +_02249BB8: .word ov23_0224A0E0 +_02249BBC: .word ov23_0224A14C +_02249BC0: .word ov23_0224A180 +_02249BC4: .word ov23_02249EA0 +_02249BC8: .word ov23_0224A0E8 +_02249BCC: .word ov23_0224A150 +_02249BD0: .word ov23_0224A184 + thumb_func_end ov23_02249B60 + + thumb_func_start ov23_02249BD4 +ov23_02249BD4: ; 0x02249BD4 + push {r4, r5, lr} + sub sp, #0x34 + bl sub_0205964C + ldr r4, _02249C20 ; =0x02256808 + add r5, r0, #0 + add r3, sp, #0 + mov r2, #6 +_02249BE4: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02249BE4 + ldr r0, [r4, #0] + cmp r5, #0 + str r0, [r3, #0] + ldr r1, [r5, #0x34] + bne _02249BFC + add sp, #0x34 + mov r0, #0 + pop {r4, r5, pc} +_02249BFC: + ldr r0, [sp] + cmp r0, #0 + beq _02249C18 + add r2, sp, #0 +_02249C04: + ldr r0, [r2, #0] + cmp r1, r0 + bne _02249C10 + add sp, #0x34 + mov r0, #1 + pop {r4, r5, pc} +_02249C10: + add r2, r2, #4 + ldr r0, [r2, #0] + cmp r0, #0 + bne _02249C04 +_02249C18: + mov r0, #0 + add sp, #0x34 + pop {r4, r5, pc} + nop +_02249C20: .word 0x02256808 + thumb_func_end ov23_02249BD4 + + thumb_func_start ov23_02249C24 +ov23_02249C24: ; 0x02249C24 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_0205964C + str r5, [r0, #0x34] + strh r4, [r0, #0x3c] + pop {r3, r4, r5, pc} + thumb_func_end ov23_02249C24 + + thumb_func_start ov23_02249C34 +ov23_02249C34: ; 0x02249C34 + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _02249C48 + sub r0, r0, #1 + strh r0, [r4, #0x3c] + pop {r4, pc} +_02249C48: + bl sub_02035E38 + cmp r0, #0 + beq _02249C8E + ldr r0, [r4, #0x18] + bl ov23_02242D44 + bl sub_02032AC0 + mov r0, #0 + bl sub_02057AE4 + bl ov23_02243AF0 + bl ov23_0224C21C + ldr r0, [r4, #0x18] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206ADDC + cmp r0, #0 + bne _02249C82 + ldr r0, _02249C90 ; =ov23_02249C98 + mov r1, #0 + bl ov23_02249C24 + pop {r4, pc} +_02249C82: + bl sub_02059524 + ldr r0, _02249C94 ; =ov23_02249CC4 + mov r1, #0x18 + bl ov23_02249C24 +_02249C8E: + pop {r4, pc} + ; .align 2, 0 +_02249C90: .word ov23_02249C98 +_02249C94: .word ov23_02249CC4 + thumb_func_end ov23_02249C34 + + thumb_func_start ov23_02249C98 +ov23_02249C98: ; 0x02249C98 + push {r3, lr} + bl sub_0205964C + ldr r0, [r0, #0x18] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206ADDC + cmp r0, #0 + beq _02249CBE + bl sub_020367F0 + bl sub_02059524 + ldr r0, _02249CC0 ; =ov23_02249CE4 + mov r1, #0x18 + bl ov23_02249C24 +_02249CBE: + pop {r3, pc} + ; .align 2, 0 +_02249CC0: .word ov23_02249CE4 + thumb_func_end ov23_02249C98 + + thumb_func_start ov23_02249CC4 +ov23_02249CC4: ; 0x02249CC4 + push {r3, lr} + bl sub_0205964C + ldrh r1, [r0, #0x3c] + cmp r1, #0 + beq _02249CD6 + sub r1, r1, #1 + strh r1, [r0, #0x3c] + pop {r3, pc} +_02249CD6: + ldr r0, _02249CE0 ; =ov23_02249CE4 + mov r1, #0x18 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_02249CE0: .word ov23_02249CE4 + thumb_func_end ov23_02249CC4 + + thumb_func_start ov23_02249CE4 +ov23_02249CE4: ; 0x02249CE4 + push {r3, lr} + bl ov23_02242B14 + bl sub_02059524 + bl sub_02036834 + cmp r0, #0 + beq _02249D14 + bl sub_0203608C + cmp r0, #0 + bne _02249D0C + bl ov23_0224B598 + ldr r0, _02249D18 ; =ov23_02249DBC + mov r1, #0x3c + bl ov23_02249C24 + pop {r3, pc} +_02249D0C: + ldr r0, _02249D1C ; =ov23_02249D20 + mov r1, #0x78 + bl ov23_02249C24 +_02249D14: + pop {r3, pc} + nop +_02249D18: .word ov23_02249DBC +_02249D1C: .word ov23_02249D20 + thumb_func_end ov23_02249CE4 + + thumb_func_start ov23_02249D20 +ov23_02249D20: ; 0x02249D20 + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _02249D32 + sub r0, r0, #1 + strh r0, [r4, #0x3c] +_02249D32: + bl sub_02033E68 + cmp r0, #0 + bne _02249D48 + bl sub_020360F0 + cmp r0, #0 + bne _02249D48 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + bne _02249D56 +_02249D48: + bl sub_020367F0 + ldr r0, _02249DB4 ; =ov23_02249FFC + mov r1, #0 + bl ov23_02249C24 + pop {r4, pc} +_02249D56: + bl sub_0203608C + bl sub_02035D78 + cmp r0, #0 + beq _02249DB2 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _02249D78 + sub r0, r0, #1 + strh r0, [r4, #0x3c] + bl sub_02035B54 + mov r1, #0x42 + lsl r1, r1, #2 + cmp r0, r1 + bne _02249DB2 +_02249D78: + bl ov23_0224321C + mov r0, #0 + bl sub_020579BC + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl ov23_0224546C + mov r0, #0 + mov r1, #1 + bl ov23_02244858 + mov r0, #0 + bl sub_02032D98 + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + bl sub_02057DB8 + bl sub_02059570 + ldr r0, _02249DB8 ; =ov23_02249EBC + mov r1, #0xa + bl ov23_02249C24 +_02249DB2: + pop {r4, pc} + ; .align 2, 0 +_02249DB4: .word ov23_02249FFC +_02249DB8: .word ov23_02249EBC + thumb_func_end ov23_02249D20 + + thumb_func_start ov23_02249DBC +ov23_02249DBC: ; 0x02249DBC + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + bl ov23_02242B14 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _02249DD2 + sub r0, r0, #1 + strh r0, [r4, #0x3c] +_02249DD2: + bl sub_020360E8 + cmp r0, #0 + bne _02249DE0 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + bne _02249E0C +_02249DE0: + bl ov23_0224321C + cmp r0, #0 + beq _02249DEC + bl sub_02059514 +_02249DEC: + ldr r0, _02249E10 ; =0x022575B8 + bl ov23_022499E4 + mov r0, #0 + bl sub_02057AE4 + bl ov23_0224AAB0 + bl ov23_0224C21C + bl ov23_02243360 + ldr r0, _02249E14 ; =ov23_02249E18 + mov r1, #0 + bl ov23_02249C24 +_02249E0C: + pop {r4, pc} + nop +_02249E10: .word 0x022575B8 +_02249E14: .word ov23_02249E18 + thumb_func_end ov23_02249DBC + + thumb_func_start ov23_02249E18 +ov23_02249E18: ; 0x02249E18 + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + bl ov23_02242B14 + ldr r0, [r4, #0x18] + ldr r0, [r0, #0x10] + cmp r0, #0 + bne _02249E7E + bl sub_020360F0 + cmp r0, #0 + bne _02249E50 + bl sub_02033E48 + cmp r0, #0 + beq _02249E50 + bl sub_0203608C + bl sub_02035D78 + cmp r0, #0 + bne _02249E7E + bl sub_02036180 + cmp r0, #0 + bne _02249E7E +_02249E50: + mov r0, #0 + bl ov23_0224B5CC + bl ov23_0224AA84 + bl ov23_0224DA8C + mov r0, #0x2b + bl sub_020360DC + bl sub_0203608C + mov r1, #1 + bl ov23_02244858 + bl ov23_0224321C + bl sub_02036824 + ldr r0, _02249E80 ; =ov23_02249FB4 + mov r1, #0 + bl ov23_02249C24 +_02249E7E: + pop {r4, pc} + ; .align 2, 0 +_02249E80: .word ov23_02249FB4 + thumb_func_end ov23_02249E18 + + thumb_func_start ov23_02249E84 +ov23_02249E84: ; 0x02249E84 + push {r3, lr} + bl sub_0205764C + ldr r0, _02249E94 ; =ov23_02249E98 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_02249E94: .word ov23_02249E98 + thumb_func_end ov23_02249E84 + + thumb_func_start ov23_02249E98 +ov23_02249E98: ; 0x02249E98 + ldr r3, _02249E9C ; =ov23_02242B14 + bx r3 + ; .align 2, 0 +_02249E9C: .word ov23_02242B14 + thumb_func_end ov23_02249E98 + + thumb_func_start ov23_02249EA0 +ov23_02249EA0: ; 0x02249EA0 + push {r3, lr} + bl sub_0205964C + bl ov23_0224C198 + bl sub_020576A0 + ldr r0, _02249EB8 ; =ov23_02249E18 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_02249EB8: .word ov23_02249E18 + thumb_func_end ov23_02249EA0 + + thumb_func_start ov23_02249EBC +ov23_02249EBC: ; 0x02249EBC + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + ldrh r0, [r4, #0x3c] + cmp r0, #9 + bne _02249ED2 + bl sub_02032AC0 + bl ov23_02243360 +_02249ED2: + ldrh r0, [r4, #0x3c] + cmp r0, #1 + bne _02249EDE + mov r0, #0 + bl sub_02057B14 +_02249EDE: + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _02249EEA + sub r0, r0, #1 + strh r0, [r4, #0x3c] + pop {r4, pc} +_02249EEA: + bl sub_02032BDC + cmp r0, #0 + beq _02249F06 + ldr r0, _02249F0C ; =0x022575C4 + bl ov23_022499E4 + bl ov23_0224AAB0 + ldr r0, _02249F10 ; =ov23_02249F14 + mov r1, #0xc8 + bl ov23_02249C24 + pop {r4, pc} +_02249F06: + bl ov23_0224A09C + pop {r4, pc} + ; .align 2, 0 +_02249F0C: .word 0x022575C4 +_02249F10: .word ov23_02249F14 + thumb_func_end ov23_02249EBC + + thumb_func_start ov23_02249F14 +ov23_02249F14: ; 0x02249F14 + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + bl ov23_0224AC3C + cmp r0, #0 + beq _02249F32 + bl ov23_02243AF0 + ldr r0, _02249F48 ; =ov23_02249F4C + mov r1, #0 + bl ov23_02249C24 + pop {r4, pc} +_02249F32: + bl ov23_0224A09C + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _02249F42 + sub r0, r0, #1 + strh r0, [r4, #0x3c] + pop {r4, pc} +_02249F42: + bl ov23_0224A064 + pop {r4, pc} + ; .align 2, 0 +_02249F48: .word ov23_02249F4C + thumb_func_end ov23_02249F14 + + thumb_func_start ov23_02249F4C +ov23_02249F4C: ; 0x02249F4C + push {r3, lr} + bl ov23_0224404C + cmp r0, #0 + beq _02249F6E + ldr r0, _02249F74 ; =0x022575D8 + bl ov23_022499E4 + bl ov23_02244068 + bl ov23_0224C21C + ldr r0, _02249F78 ; =ov23_02249F7C + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} +_02249F6E: + bl ov23_0224A09C + pop {r3, pc} + ; .align 2, 0 +_02249F74: .word 0x022575D8 +_02249F78: .word ov23_02249F7C + thumb_func_end ov23_02249F4C + + thumb_func_start ov23_02249F7C +ov23_02249F7C: ; 0x02249F7C + push {r3, lr} + bl ov23_0224C420 + cmp r0, #0 + beq _02249FA6 + ldr r0, _02249FAC ; =0x022575F4 + bl ov23_022499E4 + bl ov23_0224C434 + mov r0, #1 + bl sub_02057AE4 + mov r0, #0x1f + bl sub_020360DC + ldr r0, _02249FB0 ; =ov23_0224A09C + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} +_02249FA6: + bl ov23_0224A09C + pop {r3, pc} + ; .align 2, 0 +_02249FAC: .word 0x022575F4 +_02249FB0: .word ov23_0224A09C + thumb_func_end ov23_02249F7C + + thumb_func_start ov23_02249FB4 +ov23_02249FB4: ; 0x02249FB4 + push {r3, lr} + bl sub_02036180 + cmp r0, #0 + beq _02249FCE + mov r0, #0 + add r1, r0, #0 + bl sub_02059058 + ldr r0, _02249FD0 ; =ov23_02249FD4 + mov r1, #0x1e + bl ov23_02249C24 +_02249FCE: + pop {r3, pc} + ; .align 2, 0 +_02249FD0: .word ov23_02249FD4 + thumb_func_end ov23_02249FB4 + + thumb_func_start ov23_02249FD4 +ov23_02249FD4: ; 0x02249FD4 + push {r3, lr} + bl sub_0205964C + ldrh r1, [r0, #0x3c] + cmp r1, #0 + beq _02249FE6 + sub r1, r1, #1 + strh r1, [r0, #0x3c] + pop {r3, pc} +_02249FE6: + bl sub_0203608C + cmp r0, #0 + bne _02249FF6 + ldr r0, _02249FF8 ; =ov23_02249C34 + mov r1, #0 + bl ov23_02249C24 +_02249FF6: + pop {r3, pc} + ; .align 2, 0 +_02249FF8: .word ov23_02249C34 + thumb_func_end ov23_02249FD4 + + thumb_func_start ov23_02249FFC +ov23_02249FFC: ; 0x02249FFC + push {r3, lr} + bl sub_0205964C + ldrh r1, [r0, #0x3c] + cmp r1, #0 + beq _0224A00E + sub r1, r1, #1 + strh r1, [r0, #0x3c] + pop {r3, pc} +_0224A00E: + bl sub_0203608C + cmp r0, #0 + bne _0224A01E + ldr r0, _0224A020 ; =ov23_02249C34 + mov r1, #0 + bl ov23_02249C24 +_0224A01E: + pop {r3, pc} + ; .align 2, 0 +_0224A020: .word ov23_02249C34 + thumb_func_end ov23_02249FFC + + thumb_func_start ov23_0224A024 +ov23_0224A024: ; 0x0224A024 + ldr r3, _0224A028 ; =ov23_02242B14 + bx r3 + ; .align 2, 0 +_0224A028: .word ov23_02242B14 + thumb_func_end ov23_0224A024 + + thumb_func_start ov23_0224A02C +ov23_0224A02C: ; 0x0224A02C + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + bl sub_0203608C + cmp r0, #0 + bne _0224A05C + ldr r0, [r4, #0x18] + bl ov23_02242D44 + bl sub_02032AC0 + mov r0, #0 + bl sub_02057AE4 + bl ov23_02243AF0 + bl ov23_0224C21C + ldr r0, _0224A060 ; =ov23_0224A024 + mov r1, #0 + bl ov23_02249C24 +_0224A05C: + pop {r4, pc} + nop +_0224A060: .word ov23_0224A024 + thumb_func_end ov23_0224A02C + + thumb_func_start ov23_0224A064 +ov23_0224A064: ; 0x0224A064 + push {r3, lr} + bl sub_0203608C + mov r1, #1 + bl ov23_02244858 + bl sub_0203608C + mov r1, #1 + bl ov23_0224D9AC + bl ov23_0224160C + bl sub_020578B0 + bl ov23_0224321C + bl sub_020367F0 + bl ov23_0224AC4C + ldr r0, _0224A098 ; =ov23_02249FFC + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_0224A098: .word ov23_02249FFC + thumb_func_end ov23_0224A064 + + thumb_func_start ov23_0224A09C +ov23_0224A09C: ; 0x0224A09C + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + bl ov23_02242B14 + bl sub_02059524 + ldr r0, [r4, #0x18] + ldr r0, [r0, #0x10] + cmp r0, #0 + bne _0224A0C8 + bl sub_02033E68 + cmp r0, #0 + bne _0224A0C4 + bl sub_020360F0 + cmp r0, #0 + beq _0224A0C8 +_0224A0C4: + bl ov23_0224A064 +_0224A0C8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224A09C + + thumb_func_start ov23_0224A0CC +ov23_0224A0CC: ; 0x0224A0CC + push {r3, lr} + bl sub_0205764C + ldr r0, _0224A0DC ; =ov23_0224A0E0 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_0224A0DC: .word ov23_0224A0E0 + thumb_func_end ov23_0224A0CC + + thumb_func_start ov23_0224A0E0 +ov23_0224A0E0: ; 0x0224A0E0 + ldr r3, _0224A0E4 ; =ov23_0224DAB4 + bx r3 + ; .align 2, 0 +_0224A0E4: .word ov23_0224DAB4 + thumb_func_end ov23_0224A0E0 + + thumb_func_start ov23_0224A0E8 +ov23_0224A0E8: ; 0x0224A0E8 + push {r3, lr} + bl sub_0205964C + bl ov23_0224C198 + bl sub_020576A0 + bl sub_02033E68 + cmp r0, #0 + bne _0224A106 + bl sub_020360F0 + cmp r0, #0 + beq _0224A124 +_0224A106: + bl ov23_0224B518 + bl sub_020578B0 + bl ov23_0224321C + bl sub_020367F0 + bl ov23_0224AC4C + ldr r0, _0224A130 ; =ov23_02249FFC + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} +_0224A124: + ldr r0, _0224A134 ; =ov23_0224A09C + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + nop +_0224A130: .word ov23_02249FFC +_0224A134: .word ov23_0224A09C + thumb_func_end ov23_0224A0E8 + + thumb_func_start ov23_0224A138 +ov23_0224A138: ; 0x0224A138 + push {r3, lr} + bl sub_0205764C + ldr r0, _0224A148 ; =ov23_0224A14C + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_0224A148: .word ov23_0224A14C + thumb_func_end ov23_0224A138 + + thumb_func_start ov23_0224A14C +ov23_0224A14C: ; 0x0224A14C + bx lr + ; .align 2, 0 + thumb_func_end ov23_0224A14C + + thumb_func_start ov23_0224A150 +ov23_0224A150: ; 0x0224A150 + push {r3, lr} + bl sub_0205964C + bl ov23_0224C198 + bl sub_020576A0 + ldr r0, _0224A168 ; =ov23_02249CE4 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_0224A168: .word ov23_02249CE4 + thumb_func_end ov23_0224A150 + + thumb_func_start ov23_0224A16C +ov23_0224A16C: ; 0x0224A16C + push {r3, lr} + bl ov23_0224A1D0 + ldr r0, _0224A17C ; =ov23_0224A180 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_0224A17C: .word ov23_0224A180 + thumb_func_end ov23_0224A16C + + thumb_func_start ov23_0224A180 +ov23_0224A180: ; 0x0224A180 + bx lr + ; .align 2, 0 + thumb_func_end ov23_0224A180 + + thumb_func_start ov23_0224A184 +ov23_0224A184: ; 0x0224A184 + push {r3, lr} + bl sub_0205964C + bl ov23_0224C198 + bl sub_020576A0 + ldr r0, _0224A19C ; =ov23_0224A024 + mov r1, #0 + bl ov23_02249C24 + pop {r3, pc} + ; .align 2, 0 +_0224A19C: .word ov23_0224A024 + thumb_func_end ov23_0224A184 + + thumb_func_start ov23_0224A1A0 +ov23_0224A1A0: ; 0x0224A1A0 + push {r4, lr} + bl sub_0205964C + add r4, r0, #0 + ldrh r0, [r4, #0x3c] + cmp r0, #0 + beq _0224A1B4 + sub r0, r0, #1 + strh r0, [r4, #0x3c] + pop {r4, pc} +_0224A1B4: + bl ov23_02242D08 + bl sub_020367D0 + mov r0, #0x21 + bl sub_0201807C + mov r0, #0 + add r4, #0x41 + strb r0, [r4] + bl sub_020596BC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224A1A0 + + .rodata + + + .global Unk_ov23_022567F8 +Unk_ov23_022567F8: ; 0x022567F8 + .incbin "incbin/overlay23_rodata.bin", 0x4EC, 0x4FC - 0x4EC + + .global Unk_ov23_02256808 +Unk_ov23_02256808: ; 0x02256808 + .incbin "incbin/overlay23_rodata.bin", 0x4FC, 0x34 + + + .data + + + .global Unk_ov23_022575B8 +Unk_ov23_022575B8: ; 0x022575B8 + .incbin "incbin/overlay23_data.bin", 0x9D8, 0x9E4 - 0x9D8 + + .global Unk_ov23_022575C4 +Unk_ov23_022575C4: ; 0x022575C4 + .incbin "incbin/overlay23_data.bin", 0x9E4, 0x9F8 - 0x9E4 + + .global Unk_ov23_022575D8 +Unk_ov23_022575D8: ; 0x022575D8 + .incbin "incbin/overlay23_data.bin", 0x9F8, 0xA14 - 0x9F8 + + .global Unk_ov23_022575F4 +Unk_ov23_022575F4: ; 0x022575F4 + .incbin "incbin/overlay23_data.bin", 0xA14, 0x15 + diff --git a/asm/ov23_0224A1D0.s b/asm/ov23_0224A1D0.s new file mode 100644 index 000000000..51fc10a1d --- /dev/null +++ b/asm/ov23_0224A1D0.s @@ -0,0 +1,1889 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0224A1D0 +ov23_0224A1D0: ; 0x0224A1D0 + push {r4, r5, r6, lr} + bl sub_02057518 + add r6, r0, #0 + beq _0224A1FC + mov r5, #0 + add r4, r5, #0 +_0224A1DE: + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + add r1, r4, #0 + add r2, r4, #0 + bl sub_02057DB8 + add r0, r5, #0 + bl sub_020593B4 + add r5, r5, #1 + cmp r5, #8 + blt _0224A1DE + ldr r0, _0224A200 ; =0x000002BD + mov r1, #1 + strb r1, [r6, r0] +_0224A1FC: + pop {r4, r5, r6, pc} + nop +_0224A200: .word 0x000002BD + thumb_func_end ov23_0224A1D0 + + thumb_func_start ov23_0224A204 +ov23_0224A204: ; 0x0224A204 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02057518 + add r4, r0, #0 + bl sub_0203608C + cmp r5, r0 + bne _0224A28A + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224A290 + ldr r0, [r4, #0x54] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x1c + bl sub_0202CFEC + mov r0, #0xa3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224A240 + bl sub_020181C4 +_0224A240: + mov r0, #0x9e + add r6, r4, #0 + lsl r0, r0, #2 + mov r3, #4 + add r6, #0x10 + add r1, r0, #4 +_0224A24C: + ldr r2, [r6, r0] + sub r3, r3, #1 + str r2, [r6, r1] + sub r6, r6, #4 + cmp r3, #1 + bge _0224A24C + mov r0, #0x29 + lsl r0, r0, #4 + add r6, r4, r0 + lsl r7, r5, #2 + ldr r1, [r6, r7] + sub r0, #0x14 + str r1, [r4, r0] + ldr r0, [r4, #0x54] + bl sub_0203D174 + bl sub_020298B0 + ldr r1, [r6, r7] + bl sub_02028830 + mov r0, #0 + str r0, [r6, r7] + mov r0, #0x22 + mul r0, r5 + mov r2, #0xff + add r1, r4, r0 + add r0, r2, #0 + add r0, #0x6b + strh r2, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_0224A28A: + add r0, r5, #0 + bl ov23_0224AE60 +_0224A290: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_0224A204 + + thumb_func_start ov23_0224A294 +ov23_0224A294: ; 0x0224A294 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_02057518 + mov r7, #0x29 + add r2, r0, #0 + lsl r1, r5, #2 + add r0, r2, r1 + lsl r7, r7, #4 + ldr r0, [r0, r7] + cmp r0, #0 + bne _0224A2F6 + lsl r0, r4, #2 + add r0, r2, r0 + ldr r3, [r0, r7] + cmp r3, #0 + beq _0224A2F6 + add r6, r2, r7 + str r3, [r6, r1] + mov r3, #0 + str r3, [r0, r7] + add r0, r2, r5 + mov r3, #1 + add r0, #0xfa + strb r3, [r0] + add r3, r2, r4 + add r3, #0xfa + mov r0, #0 + strb r0, [r3] + mov r0, #0x22 + add r3, r5, #0 + mul r3, r0 + ldr r7, _0224A2FC ; =0x0000016A + add r0, r2, r3 + strh r5, [r0, r7] + mov r0, #0x22 + mul r0, r4 + mov r5, #0xff + add r0, r2, r0 + strh r5, [r0, r7] + add r5, #0x4b + ldr r0, [r6, r1] + add r1, r2, r5 + add r1, r1, r3 + bl sub_02025E80 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224A2F6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224A2FC: .word 0x0000016A + thumb_func_end ov23_0224A294 + + thumb_func_start ov23_0224A300 +ov23_0224A300: ; 0x0224A300 + ldr r3, _0224A304 ; =sub_02059514 + bx r3 + ; .align 2, 0 +_0224A304: .word sub_02059514 + thumb_func_end ov23_0224A300 + + thumb_func_start ov23_0224A308 +ov23_0224A308: ; 0x0224A308 + ldr r3, _0224A30C ; =sub_02059514 + bx r3 + ; .align 2, 0 +_0224A30C: .word sub_02059514 + thumb_func_end ov23_0224A308 + + thumb_func_start ov23_0224A310 +ov23_0224A310: ; 0x0224A310 + ldr r3, _0224A318 ; =sub_0205948C + mov r0, #2 + bx r3 + nop +_0224A318: .word sub_0205948C + thumb_func_end ov23_0224A310 + + thumb_func_start ov23_0224A31C +ov23_0224A31C: ; 0x0224A31C + ldr r3, _0224A324 ; =sub_0205948C + mov r0, #0x20 + bx r3 + nop +_0224A324: .word sub_0205948C + thumb_func_end ov23_0224A31C + + thumb_func_start ov23_0224A328 +ov23_0224A328: ; 0x0224A328 + ldr r3, _0224A330 ; =sub_0205948C + mov r0, #1 + bx r3 + nop +_0224A330: .word sub_0205948C + thumb_func_end ov23_0224A328 + + thumb_func_start ov23_0224A334 +ov23_0224A334: ; 0x0224A334 + push {r3, lr} + bl sub_02057518 + cmp r0, #0 + beq _0224A346 + mov r1, #0xae + mov r2, #0 + lsl r1, r1, #2 + strb r2, [r0, r1] +_0224A346: + pop {r3, pc} + thumb_func_end ov23_0224A334 + + thumb_func_start ov23_0224A348 +ov23_0224A348: ; 0x0224A348 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_02057518 + add r0, r0, r4 + mov r2, #2 + add r1, sp, #0 + strb r2, [r1] + strb r4, [r1, #1] + add r0, #0xe2 + ldrb r0, [r0] + cmp r0, #0 + beq _0224A384 + add r0, r4, #0 + bl ov23_0224ACC0 + cmp r0, #0 + bne _0224A384 + add r0, r4, #0 + bl ov23_0224AEA4 + cmp r0, #0 + add r0, sp, #0 + beq _0224A380 + mov r1, #3 + strb r1, [r0] + b _0224A384 +_0224A380: + mov r1, #1 + strb r1, [r0] +_0224A384: + mov r0, #0x1d + add r1, sp, #0 + mov r2, #2 + bl sub_02035AC4 + cmp r0, #0 + beq _0224A3A2 + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #2 + beq _0224A3A2 + add r0, r4, #0 + mov r1, #0 + bl sub_02059058 +_0224A3A2: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224A348 + + thumb_func_start ov23_0224A3A8 +ov23_0224A3A8: ; 0x0224A3A8 + push {r3, r4, r5, lr} + add r5, r2, #0 + bl sub_02057518 + add r4, r0, #0 + bl sub_02035EE0 + cmp r0, #0 + beq _0224A408 + ldrb r0, [r5] + cmp r0, #1 + bne _0224A3E2 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A3E2 + mov r0, #0xae + lsl r0, r0, #2 + ldrb r1, [r4, r0] + cmp r1, #0 + bne _0224A408 + mov r1, #1 + strb r1, [r4, r0] + ldr r0, _0224A40C ; =ov23_0224A334 + ldr r1, [r4, #0x54] + bl ov23_0224F758 + pop {r3, r4, r5, pc} +_0224A3E2: + ldrb r0, [r5] + cmp r0, #3 + bne _0224A408 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A408 + mov r0, #0xae + lsl r0, r0, #2 + ldrb r1, [r4, r0] + cmp r1, #0 + bne _0224A408 + mov r1, #1 + strb r1, [r4, r0] + ldr r0, _0224A40C ; =ov23_0224A334 + ldr r1, [r4, #0x54] + bl ov23_02250A50 +_0224A408: + pop {r3, r4, r5, pc} + nop +_0224A40C: .word ov23_0224A334 + thumb_func_end ov23_0224A3A8 + + thumb_func_start ov23_0224A410 +ov23_0224A410: ; 0x0224A410 + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + bl sub_02057518 + add r4, r0, #0 + ldr r0, [r4, #0x54] + ldr r0, [r0, #0xc] + bl sub_020507E4 + add r6, r0, #0 + ldrb r0, [r5, #1] + cmp r0, #8 + blo _0224A42E + bl sub_02022974 +_0224A42E: + ldrb r0, [r5] + cmp r0, #4 + bne _0224A450 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A450 + bl sub_020594FC + bl ov23_0224219C + ldr r3, _0224A564 ; =ov23_0224A300 + mov r1, #0x48 + mov r2, #1 + bl ov23_02253F40 +_0224A450: + ldrb r0, [r5] + cmp r0, #1 + bne _0224A45E + ldrb r0, [r5, #1] + ldrb r1, [r5, #2] + bl sub_02058FE4 +_0224A45E: + ldrb r0, [r5] + cmp r0, #1 + bne _0224A518 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A518 + ldrb r0, [r5, #2] + ldr r1, _0224A568 ; =ov23_0224A334 + ldr r2, [r4, #0x54] + bl ov23_0224DCB8 + add r0, r4, #0 + add r0, #0x58 + ldrb r0, [r0] + mov r1, #0xf + ldrb r2, [r5, #1] + bic r0, r1 + mov r1, #0xf + and r1, r2 + orr r1, r0 + add r0, r4, #0 + add r0, #0x58 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x58 + ldrb r0, [r0] + mov r1, #0xf0 + bic r0, r1 + ldrb r1, [r5, #2] + lsl r1, r1, #0x1c + lsr r1, r1, #0x18 + orr r1, r0 + add r0, r4, #0 + add r0, #0x58 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x59 + ldrb r1, [r0] + mov r0, #1 + bic r1, r0 + add r0, r4, #0 + add r0, #0x59 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x59 + ldrb r1, [r0] + mov r0, #2 + bic r1, r0 + add r0, r4, #0 + add r0, #0x59 + strb r1, [r0] + ldrb r7, [r5, #2] + add r0, r4, r7 + add r0, #0x5a + ldrb r0, [r0] + cmp r0, #0 + bne _0224A518 + ldr r0, [r4, #0x54] + bl sub_0203D174 + bl sub_020298A0 + add r1, r7, #0 + bl sub_020294F4 + add r0, r6, #0 + bl sub_0206B354 + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + bl sub_0206B364 + add r0, r6, #0 + bl sub_0206B374 + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + bl sub_0206B384 + add r2, r4, #0 + ldrb r1, [r5, #2] + add r2, #0x5a + ldrb r0, [r2, r1] + add r0, r0, #1 + strb r0, [r2, r1] +_0224A518: + ldrb r0, [r5] + cmp r0, #1 + bne _0224A532 + ldrb r6, [r5, #2] + bl sub_0203608C + cmp r6, r0 + bne _0224A532 + ldrb r1, [r5, #1] + ldr r2, [r4, #0x54] + add r0, r6, #0 + bl ov23_0224F07C +_0224A532: + ldrb r0, [r5] + cmp r0, #2 + bne _0224A554 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A554 + bl sub_020594FC + bl ov23_0224219C + ldr r3, _0224A564 ; =ov23_0224A300 + mov r1, #2 + mov r2, #1 + bl ov23_02253F40 +_0224A554: + ldrb r0, [r5] + cmp r0, #1 + bne _0224A562 + ldrb r0, [r5, #1] + ldrb r1, [r5, #2] + bl ov23_0224300C +_0224A562: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A564: .word ov23_0224A300 +_0224A568: .word ov23_0224A334 + thumb_func_end ov23_0224A410 + + thumb_func_start ov23_0224A56C +ov23_0224A56C: ; 0x0224A56C + mov r0, #3 + bx lr + thumb_func_end ov23_0224A56C + + thumb_func_start ov23_0224A570 +ov23_0224A570: ; 0x0224A570 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + add r0, sp, #0 + strb r4, [r0, #1] + ldrb r1, [r2] + cmp r1, #0 + beq _0224A588 + cmp r1, #3 + beq _0224A598 + add sp, #4 + pop {r3, r4, pc} +_0224A588: + mov r1, #0 + strb r1, [r0] + mov r0, #0x55 + add r1, sp, #0 + bl sub_02035B48 + add sp, #4 + pop {r3, r4, pc} +_0224A598: + mov r1, #3 + strb r1, [r0] + mov r0, #0x55 + add r1, sp, #0 + bl sub_02035B48 + add r0, r4, #0 + mov r1, #0 + bl sub_02059058 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov23_0224A570 + + thumb_func_start ov23_0224A5B0 +ov23_0224A5B0: ; 0x0224A5B0 + push {r3, lr} + bl sub_0203608C + bl ov23_0224B040 + bl ov23_022421AC + bl ov23_02254044 + mov r0, #4 + bl sub_0205948C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224A5B0 + + thumb_func_start ov23_0224A5CC +ov23_0224A5CC: ; 0x0224A5CC + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + bl sub_02057518 + str r0, [sp] + ldr r0, [r5, #4] + mov r4, #0 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r7, #0 + bl sub_02035D78 + cmp r0, #0 + bne _0224A5F8 + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} +_0224A5F8: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + cmp r0, #0x3c + ble _0224A604 + mov r4, #1 +_0224A604: + cmp r4, #0 + beq _0224A61E + ldr r0, [sp] + mov r1, #1 + add r0, r0, r7 + add r0, #0xea + strb r1, [r0] + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_0224A61E: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0224A5CC + + thumb_func_start ov23_0224A620 +ov23_0224A620: ; 0x0224A620 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02057518 + add r4, r0, #0 + mov r0, #0xb + mov r1, #8 + bl sub_02018144 + add r1, r0, #0 + mov r2, #0 + str r2, [r1, #0] + add r0, r4, r5 + str r5, [r1, #4] + add r0, #0xea + strb r2, [r0] + ldr r0, _0224A654 ; =ov23_0224A5CC + mov r2, #0x64 + bl sub_0200D9E8 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + pop {r3, r4, r5, pc} + nop +_0224A654: .word ov23_0224A5CC + thumb_func_end ov23_0224A620 + + thumb_func_start ov23_0224A658 +ov23_0224A658: ; 0x0224A658 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #1 + add r5, r0, #0 + tst r1, r2 + beq _0224A66C + mov r1, #0xb + add r0, sp, #0 + strb r1, [r0] + b _0224A69E +_0224A66C: + bl ov23_0224AEA4 + cmp r0, #0 + beq _0224A67C + mov r1, #0xb + add r0, sp, #0 + strb r1, [r0] + b _0224A69E +_0224A67C: + cmp r4, #0xff + bne _0224A684 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224A684: + add r0, r4, #0 + bl ov23_0224AEA4 + cmp r0, #0 + bne _0224A692 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224A692: + mov r1, #5 + add r0, sp, #0 + strb r1, [r0] + add r0, r4, #0 + bl ov23_0224A620 +_0224A69E: + add r0, sp, #0 + strb r5, [r0, #1] + strb r4, [r0, #2] + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + mov r0, #0x55 + add r1, sp, #0 + bl sub_02035B48 + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224A658 + + thumb_func_start ov23_0224A6B8 +ov23_0224A6B8: ; 0x0224A6B8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl ov23_0224AEA4 + cmp r0, #0 + beq _0224A6CE + mov r1, #0xc + add r0, sp, #0 + strb r1, [r0] + b _0224A6D4 +_0224A6CE: + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_0224A6D4: + strb r4, [r0, #1] + mov r0, #0x55 + add r1, sp, #0 + bl sub_02035B48 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov23_0224A6B8 + + thumb_func_start ov23_0224A6E4 +ov23_0224A6E4: ; 0x0224A6E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + bl sub_02057518 + add r6, r0, #0 + bl ov23_0224321C + mov r0, #0 + bl sub_02057FC4 + mov r0, #4 + bl sub_02059464 + bl ov23_022421AC + add r7, r0, #0 + ldrb r0, [r5, #1] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r7, #0 + bl ov23_02254068 + cmp r4, #0 + beq _0224A746 + bl sub_0203608C + add r0, r6, r0 + mov r1, #0 + add r0, #0xfa + strb r1, [r0] + bl sub_0203608C + bl ov23_0224B040 + bl sub_0203608C + bl ov23_0224B00C + bl ov23_022421AC + ldr r3, _0224A770 ; =ov23_0224A5B0 + mov r1, #0xa + mov r2, #1 + bl ov23_02253F40 + b _0224A754 +_0224A746: + bl ov23_022421AC + ldr r3, _0224A770 ; =ov23_0224A5B0 + mov r1, #0xb + mov r2, #1 + bl ov23_02253F40 +_0224A754: + mov r0, #0xff + str r0, [sp] + mov r3, #0 + ldr r1, _0224A774 ; =0x00000424 + mov r0, #4 + mov r2, #0x3c + str r3, [sp, #4] + bl sub_0200502C + ldr r0, _0224A778 ; =0x000005F6 + bl sub_02005748 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A770: .word ov23_0224A5B0 +_0224A774: .word 0x00000424 +_0224A778: .word 0x000005F6 + thumb_func_end ov23_0224A6E4 + + thumb_func_start ov23_0224A77C +ov23_0224A77C: ; 0x0224A77C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r2, #0 + bl sub_02057518 + add r4, r0, #0 + ldr r0, [r4, #0x54] + bl sub_0203D174 + bl sub_020298A0 + add r6, r0, #0 + ldrb r0, [r5] + cmp r0, #5 + bgt _0224A7AE + cmp r0, #0 + blt _0224A7E8 + beq _0224A7C4 + cmp r0, #3 + bne _0224A7A6 + b _0224A96A +_0224A7A6: + cmp r0, #5 + beq _0224A812 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A7AE: + cmp r0, #0xc + bgt _0224A7E8 + cmp r0, #0xb + blt _0224A7E8 + bne _0224A7BA + b _0224A924 +_0224A7BA: + cmp r0, #0xc + bne _0224A7C0 + b _0224A948 +_0224A7C0: + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A7C4: + ldrb r0, [r5, #1] + lsl r1, r0, #2 + add r2, r4, r1 + mov r1, #0x29 + lsl r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, #0 + beq _0224A7E8 + bl ov23_0224AE60 + ldrb r0, [r5, #1] + bl ov23_0224B040 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + beq _0224A7EA +_0224A7E8: + b _0224AA52 +_0224A7EA: + bl sub_020594FC + bl ov23_022421AC + ldr r3, _0224AA58 ; =ov23_0224A308 + mov r1, #2 + mov r2, #1 + bl ov23_02253F40 + mov r0, #0xff + str r0, [sp] + mov r3, #0 + ldr r1, _0224AA5C ; =0x00000424 + mov r0, #4 + mov r2, #0x3c + str r3, [sp, #4] + bl sub_0200502C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A812: + ldrb r0, [r5, #1] + bl sub_02032EE8 + cmp r0, #0 + ldrb r0, [r5, #2] + bne _0224A826 + bl ov23_0224AE60 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A826: + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + bne _0224A848 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + beq _0224A840 + b _0224AA52 +_0224A840: + bl sub_02059514 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A848: + ldrb r0, [r5, #1] + bl sub_02032EE8 + add r1, r0, #0 + ldrb r0, [r5, #2] + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r2, r0] + bl sub_0202600C + cmp r0, #1 + bne _0224A8B2 + ldrb r0, [r5, #2] + bl ov23_0224AE60 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A894 + add r0, r6, #0 + bl sub_020297EC + bl sub_020594FC + bl ov23_022421AC + ldr r3, _0224AA60 ; =ov23_0224A300 + mov r1, #0xd + mov r2, #1 + bl ov23_02253F40 + ldr r0, _0224AA64 ; =0x00000625 + bl sub_02005748 + b _0224A8A8 +_0224A894: + bl sub_0203608C + ldrb r1, [r5, #2] + cmp r1, r0 + bne _0224A8A8 + add r0, r5, #0 + mov r1, #0 + add r2, r6, #0 + bl ov23_0224A6E4 +_0224A8A8: + ldrb r0, [r5, #1] + bl ov23_0224D530 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A8B2: + ldrb r0, [r5, #1] + ldrb r1, [r5, #2] + bl ov23_0224A294 + cmp r0, #0 + beq _0224A92E + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224A904 + add r0, r6, #0 + bl sub_0202955C + mov r0, #1 + bl sub_02059464 + bl ov23_022421AC + add r4, r0, #0 + ldrb r0, [r5, #2] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02254068 + bl ov23_022421AC + ldr r3, _0224AA68 ; =ov23_0224A328 + mov r1, #0xc + mov r2, #1 + bl ov23_02253F40 + ldr r0, _0224AA6C ; =0x00000425 + bl sub_0200549C + ldr r0, _0224AA64 ; =0x00000625 + bl sub_02005748 + b _0224A918 +_0224A904: + bl sub_0203608C + ldrb r1, [r5, #2] + cmp r1, r0 + bne _0224A918 + add r0, r5, #0 + mov r1, #1 + add r2, r6, #0 + bl ov23_0224A6E4 +_0224A918: + ldrb r0, [r5, #1] + ldrb r1, [r5, #2] + bl ov23_0224D518 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A924: + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + beq _0224A930 +_0224A92E: + b _0224AA52 +_0224A930: + mov r0, #2 + bl sub_02059464 + bl ov23_022421AC + ldr r3, _0224AA70 ; =ov23_0224A310 + mov r1, #6 + mov r2, #1 + bl ov23_02253F40 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A948: + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224AA52 + mov r0, #0x20 + bl sub_02059464 + bl ov23_022421AC + ldr r3, _0224AA74 ; =ov23_0224A31C + mov r1, #5 + mov r2, #1 + bl ov23_02253F40 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0224A96A: + ldrb r0, [r5, #1] + mov r1, #0 + add r0, r4, r0 + add r0, #0xfa + strb r1, [r0] + ldrb r0, [r5, #1] + bl ov23_0224B040 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224AA10 + ldr r0, [r4, #0x54] + bl sub_0203D174 + bl sub_020298A0 + add r6, r0, #0 + bl sub_0202958C + add r1, sp, #8 + strb r0, [r1] + add r0, r6, #0 + bl sub_020295C0 + ldr r0, [r4, #0x54] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206AA40 + ldrb r0, [r5, #1] + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r1, [r1, r0] + cmp r1, #0 + beq _0224A9CE + ldr r0, [r4, #0x54] + bl sub_0206DAB8 + ldr r0, _0224AA78 ; =0x000002B2 + ldr r1, _0224AA7C ; =0x0000FFFF + ldrh r2, [r4, r0] + cmp r2, r1 + beq _0224A9CE + add r1, r2, #1 + strh r1, [r4, r0] +_0224A9CE: + bl sub_020594FC + ldr r0, _0224AA80 ; =0x0000062B + bl sub_02005748 + add r0, r6, #0 + bl sub_0202958C + add r1, sp, #8 + ldrb r1, [r1] + cmp r1, r0 + bne _0224A9F6 + bl ov23_022421AC + ldr r3, _0224AA60 ; =ov23_0224A300 + mov r1, #7 + mov r2, #1 + bl ov23_02253F40 + b _0224A9FE +_0224A9F6: + mov r0, #0x60 + add r1, sp, #8 + bl sub_020360D0 +_0224A9FE: + mov r0, #0xff + str r0, [sp] + mov r3, #0 + ldr r1, _0224AA5C ; =0x00000424 + mov r0, #4 + mov r2, #0x3c + str r3, [sp, #4] + bl sub_0200502C +_0224AA10: + ldrb r0, [r5, #1] + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224AA4C + bl sub_0203608C + bl sub_02032EE8 + add r1, r0, #0 + ldrb r0, [r5, #1] + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r2, r0] + bl sub_0202600C + cmp r0, #1 + bne _0224AA4C + ldrb r0, [r5, #1] + bl sub_02032EE8 + add r1, r0, #0 + ldr r0, [r4, #0x54] + bl sub_0206DAD4 +_0224AA4C: + ldrb r0, [r5, #1] + bl ov23_0224A204 +_0224AA52: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0224AA58: .word ov23_0224A308 +_0224AA5C: .word 0x00000424 +_0224AA60: .word ov23_0224A300 +_0224AA64: .word 0x00000625 +_0224AA68: .word ov23_0224A328 +_0224AA6C: .word 0x00000425 +_0224AA70: .word ov23_0224A310 +_0224AA74: .word ov23_0224A31C +_0224AA78: .word 0x000002B2 +_0224AA7C: .word 0x0000FFFF +_0224AA80: .word 0x0000062B + thumb_func_end ov23_0224A77C + + thumb_func_start ov23_0224AA84 +ov23_0224AA84: ; 0x0224AA84 + push {r3, lr} + bl sub_02057518 + mov r2, #0xff + add r1, r2, #0 + mov r3, #0 + add r1, #0x6b +_0224AA92: + add r3, r3, #1 + strh r2, [r0, r1] + add r0, #0x22 + cmp r3, #8 + blt _0224AA92 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224AA84 + + thumb_func_start ov23_0224AAA0 +ov23_0224AAA0: ; 0x0224AAA0 + push {r3, lr} + bl sub_02057518 + ldr r1, _0224AAAC ; =0x0000025A + add r0, r0, r1 + pop {r3, pc} + ; .align 2, 0 +_0224AAAC: .word 0x0000025A + thumb_func_end ov23_0224AAA0 + + thumb_func_start ov23_0224AAB0 +ov23_0224AAB0: ; 0x0224AAB0 + push {r3, r4, r5, lr} + bl sub_02057518 + add r4, r0, #0 + ldr r0, _0224AB28 ; =0x000002B9 + mov r1, #0 + strb r1, [r4, r0] + bl sub_0203608C + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224AAE8 + bl sub_0203608C + add r1, r0, #0 + lsl r1, r1, #2 + add r2, r4, r1 + mov r1, #0x29 + lsl r1, r1, #4 + ldr r1, [r2, r1] + mov r0, #0x5b + bl sub_020360D0 + pop {r3, r4, r5, pc} +_0224AAE8: + mov r0, #0xf + bl sub_02025E6C + add r4, r0, #0 + mov r0, #0x14 + mov r1, #0xf + bl sub_02023790 + add r5, r0, #0 + cmp r4, #0 + bne _0224AB02 + bl sub_02022974 +_0224AB02: + cmp r5, #0 + bne _0224AB0A + bl sub_02022974 +_0224AB0A: + add r0, r4, #0 + add r1, r5, #0 + bl sub_02025EE0 + mov r0, #0x5b + add r1, r4, #0 + bl sub_020360D0 + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224AB28: .word 0x000002B9 + thumb_func_end ov23_0224AAB0 + + thumb_func_start ov23_0224AB2C +ov23_0224AB2C: ; 0x0224AB2C + mov r0, #0x20 + bx lr + thumb_func_end ov23_0224AB2C + + thumb_func_start ov23_0224AB30 +ov23_0224AB30: ; 0x0224AB30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + add r6, r2, #0 + bl sub_02057518 + add r7, r0, #0 + add r0, sp, #4 + strb r4, [r0] + beq _0224ABB0 + ldr r1, _0224ABB8 ; =0x0000014A + mov r0, #0x22 + add r5, r4, #0 + mul r5, r0 + add r1, r7, r1 + add r0, r6, #0 + add r1, r1, r5 + bl sub_02025E80 + add r0, r6, #0 + mov r1, #0xf + bl sub_02025F04 + str r0, [sp] + bl sub_02023C3C + cmp r0, #0 + beq _0224AB6E + ldr r0, _0224ABBC ; =0x0000016A + add r1, r7, r5 + strh r4, [r1, r0] +_0224AB6E: + ldr r0, _0224ABB8 ; =0x0000014A + mov r4, #0 + add r5, r7, #0 + add r6, r7, r0 +_0224AB76: + ldr r0, _0224ABBC ; =0x0000016A + ldrh r0, [r5, r0] + cmp r0, #0xff + beq _0224AB8C + ldr r0, _0224ABBC ; =0x0000016A + add r1, r6, #0 + strh r4, [r5, r0] + mov r0, #0x5c + mov r2, #0x22 + bl sub_02035A3C +_0224AB8C: + add r4, r4, #1 + add r5, #0x22 + add r6, #0x22 + cmp r4, #8 + blt _0224AB76 + mov r0, #0x5d + add r1, sp, #4 + mov r2, #1 + bl sub_02035AC4 + ldr r0, [sp] + bl sub_020237BC + ldr r0, _0224ABC0 ; =0x000002C2 + mov r1, #1 + add sp, #8 + strb r1, [r7, r0] + pop {r3, r4, r5, r6, r7, pc} +_0224ABB0: + bl sub_02022974 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224ABB8: .word 0x0000014A +_0224ABBC: .word 0x0000016A +_0224ABC0: .word 0x000002C2 + thumb_func_end ov23_0224AB30 + + thumb_func_start ov23_0224ABC4 +ov23_0224ABC4: ; 0x0224ABC4 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + bl sub_02057518 + add r4, r0, #0 + beq _0224AC08 + ldrh r5, [r7, #0x20] + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224ABE4 + bl sub_020181C4 +_0224ABE4: + mov r0, #0x29 + lsl r0, r0, #4 + add r6, r4, r0 + lsl r0, r5, #2 + str r0, [sp] + mov r0, #0xf + bl sub_02025E6C + ldr r1, [sp] + str r0, [r6, r1] + ldr r1, [r6, r1] + add r0, r7, #0 + bl sub_02025E80 + add r0, r4, r5 + mov r1, #1 + add r0, #0xfa + strb r1, [r0] +_0224AC08: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_0224ABC4 + + thumb_func_start ov23_0224AC0C +ov23_0224AC0C: ; 0x0224AC0C + mov r0, #0x22 + bx lr + thumb_func_end ov23_0224AC0C + + thumb_func_start ov23_0224AC10 +ov23_0224AC10: ; 0x0224AC10 + push {r3, r4, r5, lr} + add r5, r2, #0 + bl sub_02057518 + add r4, r0, #0 + bl sub_0203608C + ldrb r1, [r5] + cmp r1, r0 + bne _0224AC2A + ldr r0, _0224AC34 ; =0x000002B9 + mov r1, #1 + strb r1, [r4, r0] +_0224AC2A: + ldr r0, _0224AC38 ; =0x000002C2 + mov r1, #0 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} + nop +_0224AC34: .word 0x000002B9 +_0224AC38: .word 0x000002C2 + thumb_func_end ov23_0224AC10 + + thumb_func_start ov23_0224AC3C +ov23_0224AC3C: ; 0x0224AC3C + push {r3, lr} + bl sub_02057518 + ldr r1, _0224AC48 ; =0x000002B9 + ldrb r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 +_0224AC48: .word 0x000002B9 + thumb_func_end ov23_0224AC3C + + thumb_func_start ov23_0224AC4C +ov23_0224AC4C: ; 0x0224AC4C + push {r4, r5, r6, lr} + mov r6, #0 + bl sub_0203608C + add r5, r0, #0 + bl sub_02057518 + add r4, r0, #0 + lsl r0, r5, #2 + add r2, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r1, [r2, r0] + cmp r1, #0 + beq _0224AC84 + add r6, r1, #0 + mov r1, #0 + str r1, [r2, r0] + add r0, r4, r5 + add r0, #0xfa + strb r1, [r0] + mov r1, #0x22 + mul r1, r5 + mov r0, #0xff + add r2, r4, r1 + add r1, r0, #0 + add r1, #0x6b + strh r0, [r2, r1] +_0224AC84: + mov r5, #0 +_0224AC86: + add r0, r5, #0 + bl ov23_0224AE60 + add r5, r5, #1 + cmp r5, #8 + blt _0224AC86 + cmp r6, #0 + beq _0224ACB4 + mov r0, #0x29 + lsl r0, r0, #4 + str r6, [r4, r0] + add r0, r4, #0 + mov r1, #1 + add r0, #0xfa + strb r1, [r0] + ldr r1, _0224ACB8 ; =0x0000014A + add r0, r6, #0 + add r1, r4, r1 + bl sub_02025E80 + ldr r0, _0224ACBC ; =0x0000016A + mov r1, #0 + strh r1, [r4, r0] +_0224ACB4: + pop {r4, r5, r6, pc} + nop +_0224ACB8: .word 0x0000014A +_0224ACBC: .word 0x0000016A + thumb_func_end ov23_0224AC4C + + thumb_func_start ov23_0224ACC0 +ov23_0224ACC0: ; 0x0224ACC0 + push {r4, lr} + add r4, r0, #0 + bl sub_02057518 + ldr r0, [r0, #4] + cmp r0, #0 + beq _0224ACE4 + add r1, r4, #0 + bl ov23_0224993C + bl ov23_0224999C + cmp r0, #0 + bne _0224ACE0 + mov r0, #1 + pop {r4, pc} +_0224ACE0: + mov r0, #0 + pop {r4, pc} +_0224ACE4: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov23_0224ACC0 + + thumb_func_start ov23_0224ACE8 +ov23_0224ACE8: ; 0x0224ACE8 + push {r3, lr} + add r1, sp, #0 + strb r0, [r1] + mov r0, #0x1a + add r1, sp, #0 + bl sub_02035B48 + pop {r3, pc} + thumb_func_end ov23_0224ACE8 + + thumb_func_start ov23_0224ACF8 +ov23_0224ACF8: ; 0x0224ACF8 + ldr r3, _0224AD00 ; =ov23_02243020 + ldrb r0, [r2] + bx r3 + nop +_0224AD00: .word ov23_02243020 + thumb_func_end ov23_0224ACF8 + + thumb_func_start ov23_0224AD04 +ov23_0224AD04: ; 0x0224AD04 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02057518 + add r4, r0, #0 + bne _0224AD14 + ldr r0, _0224AD3C ; =0x0000FFFF + pop {r3, r4, r5, pc} +_0224AD14: + bl sub_0203608C + cmp r5, r0 + bne _0224AD26 + lsl r0, r5, #3 + add r0, r4, r0 + add r0, #0xa2 + ldrh r0, [r0] + pop {r3, r4, r5, pc} +_0224AD26: + bl sub_02058C40 + cmp r0, #0 + beq _0224AD38 + lsl r0, r5, #3 + add r0, r4, r0 + add r0, #0xa2 + ldrh r0, [r0] + pop {r3, r4, r5, pc} +_0224AD38: + ldr r0, _0224AD3C ; =0x0000FFFF + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224AD3C: .word 0x0000FFFF + thumb_func_end ov23_0224AD04 + + thumb_func_start ov23_0224AD40 +ov23_0224AD40: ; 0x0224AD40 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02057518 + add r4, r0, #0 + bne _0224AD50 + ldr r0, _0224AD78 ; =0x0000FFFF + pop {r3, r4, r5, pc} +_0224AD50: + bl sub_0203608C + cmp r5, r0 + bne _0224AD62 + lsl r0, r5, #3 + add r0, r4, r0 + add r0, #0xa4 + ldrh r0, [r0] + pop {r3, r4, r5, pc} +_0224AD62: + bl sub_02058C40 + cmp r0, #0 + beq _0224AD74 + lsl r0, r5, #3 + add r0, r4, r0 + add r0, #0xa4 + ldrh r0, [r0] + pop {r3, r4, r5, pc} +_0224AD74: + ldr r0, _0224AD78 ; =0x0000FFFF + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224AD78: .word 0x0000FFFF + thumb_func_end ov23_0224AD40 + + thumb_func_start ov23_0224AD7C +ov23_0224AD7C: ; 0x0224AD7C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_02057518 + ldr r0, [r0, #4] + add r1, r5, #0 + bl ov23_0224993C + add r1, r4, #0 + bl ov23_02249994 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224AD7C + + thumb_func_start ov23_0224AD98 +ov23_0224AD98: ; 0x0224AD98 + push {r4, lr} + add r4, r0, #0 + bl sub_02057518 + ldr r0, [r0, #4] + add r1, r4, #0 + bl ov23_0224993C + mov r1, #0 + bl ov23_02249994 + pop {r4, pc} + thumb_func_end ov23_0224AD98 + + thumb_func_start ov23_0224ADB0 +ov23_0224ADB0: ; 0x0224ADB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + str r1, [sp] + str r2, [sp, #4] + add r6, r3, #0 + bl sub_02057518 + add r4, r0, #0 + add r4, #0x62 + lsl r7, r5, #3 + add r0, r6, #0 + add r5, r4, r7 + bl sub_0206419C + ldr r1, [sp] + add r0, r1, r0 + strh r0, [r4, r7] + add r0, r6, #0 + bl sub_020641A8 + ldr r1, [sp, #4] + add r0, r1, r0 + strh r0, [r5, #2] + strb r6, [r5, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_0224ADB0 + + thumb_func_start ov23_0224ADE8 +ov23_0224ADE8: ; 0x0224ADE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r7, r1, #0 + str r2, [sp] + str r3, [sp, #4] + bl sub_02057518 + add r4, r0, #0 + beq _0224AE58 + add r1, r4, #0 + add r1, #0xa2 + lsl r0, r6, #3 + add r5, r1, r0 + ldr r0, _0224AE5C ; =0x000002BD + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0224AE18 + ldrh r1, [r5] + ldrh r3, [r5, #2] + ldr r0, [r4, #0x54] + mov r2, #0 + bl ov5_021F5634 +_0224AE18: + ldr r0, [sp] + strh r7, [r5] + strh r0, [r5, #2] + ldr r0, [sp, #4] + strb r0, [r5, #4] + lsl r0, r6, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + cmp r0, #0 + beq _0224AE36 + ldr r2, [sp] + ldr r3, [sp, #4] + add r1, r7, #0 + bl sub_0205ECE0 +_0224AE36: + ldr r0, _0224AE5C ; =0x000002BD + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0224AE4A + ldrh r1, [r5] + ldrh r3, [r5, #2] + ldr r0, [r4, #0x54] + mov r2, #0 + bl ov5_021F5634 +_0224AE4A: + ldr r0, _0224AE5C ; =0x000002BD + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0224AE58 + add r0, r6, #0 + bl ov23_0224B040 +_0224AE58: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224AE5C: .word 0x000002BD + thumb_func_end ov23_0224ADE8 + + thumb_func_start ov23_0224AE60 +ov23_0224AE60: ; 0x0224AE60 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02057518 + add r4, r0, #0 + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224AEA0 + bl sub_020181C4 + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x29 + mov r2, #0 + lsl r0, r0, #4 + str r2, [r1, r0] + add r0, r4, r5 + add r0, #0xfa + strb r2, [r0] + mov r0, #0x22 + mul r0, r5 + mov r2, #0xff + add r1, r4, r0 + add r0, r2, #0 + add r0, #0x6b + strh r2, [r1, r0] + mov r0, #1 + pop {r3, r4, r5, pc} +_0224AEA0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224AE60 + + thumb_func_start ov23_0224AEA4 +ov23_0224AEA4: ; 0x0224AEA4 + push {r4, lr} + add r4, r0, #0 + bl sub_02057518 + lsl r1, r4, #2 + add r1, r0, r1 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224AEBE + mov r0, #1 + pop {r4, pc} +_0224AEBE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224AEA4 + + thumb_func_start ov23_0224AEC4 +ov23_0224AEC4: ; 0x0224AEC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r7, r1, #0 + bl sub_02057518 + add r4, r0, #0 + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x29 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, #0 + bne _0224AF42 + add r0, r7, #0 + bl sub_02032EE8 + str r0, [sp] + cmp r0, #0 + beq _0224AF42 + mov r0, #0x29 + lsl r0, r0, #4 + add r6, r4, r0 + lsl r0, r5, #2 + str r0, [sp, #4] + mov r0, #0xf + bl sub_02025E6C + ldr r1, [sp, #4] + str r0, [r6, r1] + ldr r0, [sp] + ldr r1, [r6, r1] + bl sub_02025E80 + add r0, r4, r5 + mov r1, #1 + add r0, #0xfa + strb r1, [r0] + mov r0, #0x22 + add r1, r5, #0 + mul r1, r0 + ldr r2, _0224AF48 ; =0x0000016A + add r0, r4, r1 + strh r5, [r0, r2] + sub r2, #0x20 + add r2, r4, r2 + ldr r0, [sp] + add r1, r2, r1 + bl sub_02025E80 + bl sub_0203608C + cmp r7, r0 + bne _0224AF3C + ldr r0, [r4, #0x54] + ldr r0, [r0, #0xc] + bl sub_020298A0 + bl sub_020297B4 +_0224AF3C: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224AF42: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224AF48: .word 0x0000016A + thumb_func_end ov23_0224AEC4 + + thumb_func_start ov23_0224AF4C +ov23_0224AF4C: ; 0x0224AF4C + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02057518 + add r5, r0, #0 + add r5, #0x28 + lsl r4, r4, #2 + ldr r0, [r5, r4] + cmp r0, #0 + beq _0224AF78 + bl sub_020714F0 + cmp r0, #0 + beq _0224AF70 + ldr r0, [r5, r4] + bl sub_0207136C + b _0224AF74 +_0224AF70: + bl sub_02022974 +_0224AF74: + mov r0, #0 + str r0, [r5, r4] +_0224AF78: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224AF4C + + thumb_func_start ov23_0224AF7C +ov23_0224AF7C: ; 0x0224AF7C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02057518 + ldr r1, _0224B008 ; =0x000002BD + ldrb r1, [r0, r1] + cmp r1, #0 + bne _0224B006 + lsl r4, r5, #2 + add r1, r0, r4 + ldr r1, [r1, #8] + cmp r1, #0 + beq _0224B006 + add r7, r0, #0 + add r7, #0xfa + ldrb r2, [r7, r5] + cmp r2, #3 + bhi _0224B006 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224AFAC: ; jump table + .short _0224B000 - _0224AFAC - 2 ; case 0 + .short _0224AFE8 - _0224AFAC - 2 ; case 1 + .short _0224AFD0 - _0224AFAC - 2 ; case 2 + .short _0224AFB4 - _0224AFAC - 2 ; case 3 +_0224AFB4: + add r6, r0, #0 + add r6, #0x28 + ldr r0, [r6, r4] + cmp r0, #0 + bne _0224AFCA + add r0, r1, #0 + bl sub_0205EB3C + bl ov5_021F5488 + str r0, [r6, r4] +_0224AFCA: + mov r0, #0 + strb r0, [r7, r5] + pop {r3, r4, r5, r6, r7, pc} +_0224AFD0: + add r5, r0, #0 + add r5, #0x28 + ldr r0, [r5, r4] + cmp r0, #0 + bne _0224B006 + add r0, r1, #0 + bl sub_0205EB3C + bl ov5_021F52E4 + str r0, [r5, r4] + pop {r3, r4, r5, r6, r7, pc} +_0224AFE8: + add r5, r0, #0 + add r5, #0x28 + ldr r0, [r5, r4] + cmp r0, #0 + bne _0224B006 + add r0, r1, #0 + bl sub_0205EB3C + bl ov5_021F511C + str r0, [r5, r4] + pop {r3, r4, r5, r6, r7, pc} +_0224B000: + add r0, r5, #0 + bl ov23_0224AF4C +_0224B006: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B008: .word 0x000002BD + thumb_func_end ov23_0224AF7C + + thumb_func_start ov23_0224B00C +ov23_0224B00C: ; 0x0224B00C + push {r4, lr} + add r4, r0, #0 + bl sub_02057518 + add r0, #0xfa + ldrb r1, [r0, r4] + cmp r1, #1 + beq _0224B020 + mov r1, #2 + strb r1, [r0, r4] +_0224B020: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224B00C + + thumb_func_start ov23_0224B024 +ov23_0224B024: ; 0x0224B024 + push {r4, lr} + add r4, r0, #0 + bl sub_02057518 + add r0, #0xfa + ldrb r1, [r0, r4] + cmp r1, #1 + beq _0224B038 + mov r1, #3 + strb r1, [r0, r4] +_0224B038: + add r0, r4, #0 + bl ov23_0224AF4C + pop {r4, pc} + thumb_func_end ov23_0224B024 + + thumb_func_start ov23_0224B040 +ov23_0224B040: ; 0x0224B040 + push {r4, lr} + add r4, r0, #0 + bl sub_02057518 + add r0, #0xfa + ldrb r1, [r0, r4] + cmp r1, #1 + beq _0224B054 + mov r1, #0 + strb r1, [r0, r4] +_0224B054: + add r0, r4, #0 + bl ov23_0224AF4C + pop {r4, pc} + thumb_func_end ov23_0224B040 \ No newline at end of file diff --git a/asm/ov23_0224B05C.s b/asm/ov23_0224B05C.s new file mode 100644 index 000000000..3d37c9c02 --- /dev/null +++ b/asm/ov23_0224B05C.s @@ -0,0 +1,5663 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0224B05C +ov23_0224B05C: ; 0x0224B05C + push {r4, r5} + asr r2, r0, #4 + lsr r2, r2, #0x1b + add r2, r0, r2 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r3, r0, #5 + ldr r4, _0224B090 ; =0x0225760C + ldr r5, _0224B094 ; =0x02257620 + asr r2, r2, #5 + mov r0, #0 +_0224B074: + ldrb r1, [r4] + cmp r2, r1 + bne _0224B080 + ldrb r1, [r5] + cmp r3, r1 + beq _0224B08C +_0224B080: + add r0, r0, #1 + add r4, r4, #1 + add r5, r5, #1 + cmp r0, #0x11 + blt _0224B074 + mov r0, #0x10 +_0224B08C: + pop {r4, r5} + bx lr + ; .align 2, 0 +_0224B090: .word 0x0225760C +_0224B094: .word 0x02257620 + thumb_func_end ov23_0224B05C + + thumb_func_start ov23_0224B098 +ov23_0224B098: ; 0x0224B098 + push {r4, r5} + sub sp, #8 + ldr r3, _0224B0D8 ; =0x0225683C + add r2, sp, #0 + ldrh r4, [r3, #0x1c] + strh r4, [r2] + ldrh r4, [r3, #0x1e] + ldrh r3, [r3, #0x20] + strh r4, [r2, #2] + strh r3, [r2, #4] + ldrh r4, [r2] + ldrh r5, [r2, #2] + mov r3, #0 +_0224B0B2: + add r2, r4, #0 + add r2, #0x20 + cmp r0, r2 + bne _0224B0C6 + cmp r1, r5 + bne _0224B0C6 + add sp, #8 + mov r0, #1 + pop {r4, r5} + bx lr +_0224B0C6: + add r3, r3, #1 + add r4, #0x20 + cmp r3, #8 + blt _0224B0B2 + mov r0, #0 + add sp, #8 + pop {r4, r5} + bx lr + nop +_0224B0D8: .word 0x0225683C + thumb_func_end ov23_0224B098 + + thumb_func_start ov23_0224B0DC +ov23_0224B0DC: ; 0x0224B0DC + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldr r1, _0224B124 ; =0x0225683C + add r5, r0, #0 + ldrh r2, [r1, #0x22] + add r0, sp, #0 + strh r2, [r0] + ldrh r2, [r1, #0x24] + ldrh r1, [r1, #0x26] + strh r2, [r0, #2] + strh r1, [r0, #4] + bl sub_02033DFC + cmp r0, #0 + beq _0224B10A + add r0, sp, #0 + ldrh r1, [r0] + add sp, #8 + strh r1, [r4] + ldrh r0, [r0, #2] + strh r0, [r4, #2] + pop {r3, r4, r5, pc} +_0224B10A: + cmp r5, #0x10 + bne _0224B110 + mov r5, #0 +_0224B110: + add r0, sp, #0 + ldrh r2, [r0] + lsl r1, r5, #5 + add r1, r2, r1 + add r1, #0x20 + strh r1, [r4] + ldrh r0, [r0, #2] + strh r0, [r4, #2] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B124: .word 0x0225683C + thumb_func_end ov23_0224B0DC + + thumb_func_start ov23_0224B128 +ov23_0224B128: ; 0x0224B128 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_02036180 + cmp r0, #0 + beq _0224B138 + mov r5, #0x10 +_0224B138: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224B0DC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224B128 + + thumb_func_start ov23_0224B144 +ov23_0224B144: ; 0x0224B144 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, _0224B274 ; =0x022577AC + str r1, [sp] + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224B154 + b _0224B272 +_0224B154: + bl sub_02028554 + cmp r0, #0x94 + beq _0224B160 + bl sub_02022974 +_0224B160: + ldr r0, _0224B274 ; =0x022577AC + ldr r2, _0224B278 ; =0x000013E8 + str r4, [r0, #0] + add r0, r4, #0 + mov r1, #0 + bl sub_020C4CF4 + ldr r0, _0224B274 ; =0x022577AC + ldr r1, [sp] + ldr r2, [r0, #0] + mov r7, #0xff + str r1, [r2, #0] + mov r1, #0 + add r2, r1, #0 + add r3, r1, #0 +_0224B17E: + ldr r4, [r0, #0] + ldr r5, _0224B27C ; =0x00001284 + add r6, r4, r2 + ldr r4, _0224B280 ; =0x00000FFF + strh r4, [r6, r5] + ldr r4, [r0, #0] + add r5, r5, #2 + add r6, r4, r2 + ldr r4, _0224B280 ; =0x00000FFF + strh r4, [r6, r5] + ldr r4, [r0, #0] + ldr r5, _0224B284 ; =0x000012B4 + add r6, r4, r2 + ldr r4, _0224B280 ; =0x00000FFF + strh r4, [r6, r5] + ldr r4, [r0, #0] + add r5, r5, #2 + add r6, r4, r2 + ldr r4, _0224B280 ; =0x00000FFF + add r2, r2, #6 + strh r4, [r6, r5] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B288 ; =0x0000136B + strb r7, [r5, r4] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B28C ; =0x00001373 + strb r7, [r5, r4] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B290 ; =0x00001363 + strb r7, [r5, r4] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B294 ; =0x0000137B + strb r7, [r5, r4] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B298 ; =0x0000134B + strb r7, [r5, r4] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B29C ; =0x00001353 + strb r7, [r5, r4] + ldr r4, [r0, #0] + add r5, r4, r1 + ldr r4, _0224B2A0 ; =0x0000135B + add r1, r1, #1 + strb r7, [r5, r4] + ldr r4, [r0, #0] + ldr r5, _0224B2A4 ; =0x000013AC + add r6, r4, r3 + mov r4, #0x48 + strh r4, [r6, r5] + ldr r4, [r0, #0] + ldr r5, _0224B2A8 ; =0x000001B5 + add r6, r4, r3 + ldr r4, _0224B2AC ; =0x000013BC + strh r5, [r6, r4] + ldr r4, [r0, #0] + mov r5, #1 + add r6, r4, r3 + ldr r4, _0224B2B0 ; =0x000013CC + add r3, r3, #2 + strh r5, [r6, r4] + cmp r1, #8 + blt _0224B17E + mov r5, #0 + ldr r6, _0224B274 ; =0x022577AC + add r4, r5, #0 + mov r7, #0xff +_0224B20E: + ldr r0, [r6, #0] + add r0, #0xa + add r0, r0, r4 + bl sub_020292C0 + ldr r0, [r6, #0] + add r4, #0x96 + add r1, r0, r5 + ldr r0, _0224B2B4 ; =0x000012E5 + strb r7, [r1, r0] + ldr r0, [r6, #0] + add r1, r0, r5 + ldr r0, _0224B2B8 ; =0x0000133A + add r5, r5, #1 + strb r7, [r1, r0] + cmp r5, #0x11 + blt _0224B20E + ldr r0, _0224B274 ; =0x022577AC + mov r2, #0x22 + ldr r1, [r0, #0] + ldr r0, _0224B2BC ; =0x00000A04 + lsl r2, r2, #6 + add r0, r1, r0 + add r1, r7, #0 + bl sub_020C4CF4 + ldr r0, [sp] + bl ov23_0224B2C8 + ldr r2, _0224B274 ; =0x022577AC + ldr r0, _0224B2C0 ; =0x000013DC + ldr r1, [r2, #0] + mov r3, #0x48 + strh r3, [r1, r0] + add r1, r0, #2 + ldr r4, _0224B2A8 ; =0x000001B5 + ldr r3, [r2, #0] + add r0, r0, #4 + strh r4, [r3, r1] + ldr r1, [r2, #0] + mov r3, #1 + strb r3, [r1, r0] + ldr r0, _0224B2C4 ; =ov23_0224C5B4 + mov r1, #0 + mov r2, #0x64 + bl sub_0200D9E8 + ldr r1, _0224B274 ; =0x022577AC + ldr r1, [r1, #0] + str r0, [r1, #4] +_0224B272: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B274: .word 0x022577AC +_0224B278: .word 0x000013E8 +_0224B27C: .word 0x00001284 +_0224B280: .word 0x00000FFF +_0224B284: .word 0x000012B4 +_0224B288: .word 0x0000136B +_0224B28C: .word 0x00001373 +_0224B290: .word 0x00001363 +_0224B294: .word 0x0000137B +_0224B298: .word 0x0000134B +_0224B29C: .word 0x00001353 +_0224B2A0: .word 0x0000135B +_0224B2A4: .word 0x000013AC +_0224B2A8: .word 0x000001B5 +_0224B2AC: .word 0x000013BC +_0224B2B0: .word 0x000013CC +_0224B2B4: .word 0x000012E5 +_0224B2B8: .word 0x0000133A +_0224B2BC: .word 0x00000A04 +_0224B2C0: .word 0x000013DC +_0224B2C4: .word ov23_0224C5B4 + thumb_func_end ov23_0224B144 + + thumb_func_start ov23_0224B2C8 +ov23_0224B2C8: ; 0x0224B2C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_0203D174 + bl sub_02029894 + add r4, r0, #0 + bl sub_020298AC + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0202CD88 + bl sub_0202D034 + add r1, r0, #0 + add r0, r6, #0 + bl sub_020294D4 + ldr r1, _0224B32C ; =0x022577AC + add r0, r4, #0 + ldr r2, [r1, #0] + ldr r1, _0224B330 ; =0x0000096A + add r1, r2, r1 + mov r2, #0x94 + bl sub_020C4DB0 + ldr r1, _0224B32C ; =0x022577AC + add r0, r4, #0 + ldr r2, [r1, #0] + ldr r1, _0224B334 ; =0x00001204 + add r1, r2, r1 + bl ov23_0224B39C + ldr r1, _0224B32C ; =0x022577AC + add r0, r4, #0 + ldr r1, [r1, #0] + mov r2, #0x94 + add r1, #0xa + bl sub_020C4DB0 + ldr r1, _0224B32C ; =0x022577AC + add r0, r4, #0 + ldr r2, [r1, #0] + ldr r1, _0224B338 ; =0x00000A04 + add r1, r2, r1 + bl ov23_0224B39C + pop {r4, r5, r6, pc} + nop +_0224B32C: .word 0x022577AC +_0224B330: .word 0x0000096A +_0224B334: .word 0x00001204 +_0224B338: .word 0x00000A04 + thumb_func_end ov23_0224B2C8 + + thumb_func_start ov23_0224B33C +ov23_0224B33C: ; 0x0224B33C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + mov r0, #0 + mov ip, r0 + mov lr, r0 + add r0, r1, #0 + lsl r0, r0, #2 + str r1, [sp] + str r2, [sp, #4] + add r3, r3, r0 + mov r7, #1 +_0224B354: + ldr r1, [sp] + mov r0, ip + add r0, r1, r0 + cmp r0, #0x20 + bge _0224B386 + ldr r1, [sp, #4] + mov r0, lr + mov r2, #0 + add r4, r1, r0 +_0224B366: + ldrb r0, [r4] + cmp r0, #0 + beq _0224B37E + add r1, r6, r2 + cmp r1, #0x20 + bge _0224B37E + add r0, r7, #0 + lsl r0, r1 + ldr r5, [r3, #0] + mvn r0, r0 + and r0, r5 + str r0, [r3, #0] +_0224B37E: + add r2, r2, #1 + add r4, r4, #1 + cmp r2, #3 + blt _0224B366 +_0224B386: + mov r0, lr + add r0, r0, #3 + mov lr, r0 + mov r0, ip + add r0, r0, #1 + add r3, r3, #4 + mov ip, r0 + cmp r0, #3 + blt _0224B354 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0224B33C + + thumb_func_start ov23_0224B39C +ov23_0224B39C: ; 0x0224B39C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r2, sp, #0x10 + str r1, [sp] + ldr r3, _0224B428 ; =0x02256874 + add r5, r0, #0 + add r2, #1 + mov r1, #9 +_0224B3AC: + ldrb r0, [r3] + add r3, r3, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0224B3AC + ldr r3, _0224B42C ; =0x0225687D + add r2, sp, #8 + mov r1, #9 +_0224B3BE: + ldrb r0, [r3] + add r3, r3, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0224B3BE + ldr r0, [sp] + mov r1, #0xff + mov r2, #0x80 + bl sub_020C4CF4 + mov r4, #0 +_0224B3D6: + add r0, r5, #0 + add r1, r4, #0 + bl sub_020293B0 + str r0, [sp, #4] + cmp r0, #0 + beq _0224B41C + add r0, r5, #0 + add r1, r4, #0 + bl sub_020293FC + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202942C + add r6, r0, #0 + cmp r4, #0 + bne _0224B402 + add r2, sp, #0x10 + add r2, #1 + b _0224B412 +_0224B402: + cmp r4, #0x10 + bge _0224B410 + ldr r0, [sp, #4] + bl sub_0205741C + add r2, r0, #0 + b _0224B412 +_0224B410: + add r2, sp, #8 +_0224B412: + ldr r3, [sp] + add r0, r7, #0 + add r1, r6, #0 + bl ov23_0224B33C +_0224B41C: + add r4, r4, #1 + cmp r4, #0x20 + blt _0224B3D6 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0224B428: .word 0x02256874 +_0224B42C: .word 0x0225687D + thumb_func_end ov23_0224B39C + + thumb_func_start ov23_0224B430 +ov23_0224B430: ; 0x0224B430 + push {r3, lr} + bl ov23_0224C6E8 + ldr r0, _0224B458 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #4] + cmp r0, #0 + beq _0224B44C + bl sub_0200DA58 + ldr r0, _0224B458 ; =0x022577AC + mov r1, #0 + ldr r0, [r0, #0] + str r1, [r0, #4] +_0224B44C: + ldr r0, _0224B458 ; =0x022577AC + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _0224B45C ; =0x000013E4 + strb r2, [r1, r0] + pop {r3, pc} + ; .align 2, 0 +_0224B458: .word 0x022577AC +_0224B45C: .word 0x000013E4 + thumb_func_end ov23_0224B430 + + thumb_func_start ov23_0224B460 +ov23_0224B460: ; 0x0224B460 + push {r3, r4, r5, r6, r7, lr} + ldr r1, _0224B4D0 ; =0x022577AC + ldr r0, _0224B4D4 ; =0x000013E4 + ldr r2, [r1, #0] + mov r4, #0 + strb r4, [r2, r0] + ldr r1, [r1, #0] + add r0, r0, #2 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224B4B2 +_0224B476: + add r0, r4, #0 + bl ov23_0224C6AC + add r4, r4, #1 + cmp r4, #8 + blt _0224B476 + mov r5, #0 + ldr r6, _0224B4D0 ; =0x022577AC + ldr r7, _0224B4D8 ; =0x00000FFF + add r4, r5, #0 +_0224B48A: + ldr r1, [r6, #0] + ldr r0, _0224B4DC ; =0x00001284 + add r0, r1, r0 + ldrh r3, [r0, r4] + add r2, r0, r4 + cmp r3, r7 + beq _0224B4AA + ldrh r1, [r2, #2] + ldr r0, _0224B4D8 ; =0x00000FFF + cmp r1, r0 + beq _0224B4AA + ldrb r2, [r2, #4] + add r0, r3, #0 + add r3, r5, #0 + bl ov23_0224C588 +_0224B4AA: + add r5, r5, #1 + add r4, r4, #6 + cmp r5, #8 + blt _0224B48A +_0224B4B2: + ldr r0, _0224B4D0 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #4] + cmp r0, #0 + bne _0224B4CC + ldr r0, _0224B4E0 ; =ov23_0224C5B4 + mov r1, #0 + mov r2, #0x64 + bl sub_0200D9E8 + ldr r1, _0224B4D0 ; =0x022577AC + ldr r1, [r1, #0] + str r0, [r1, #4] +_0224B4CC: + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B4D0: .word 0x022577AC +_0224B4D4: .word 0x000013E4 +_0224B4D8: .word 0x00000FFF +_0224B4DC: .word 0x00001284 +_0224B4E0: .word ov23_0224C5B4 + thumb_func_end ov23_0224B460 + + thumb_func_start ov23_0224B4E4 +ov23_0224B4E4: ; 0x0224B4E4 + push {r3, lr} + ldr r0, _0224B514 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #4] + cmp r0, #0 + beq _0224B4FC + bl sub_0200DA58 + ldr r0, _0224B514 ; =0x022577AC + mov r1, #0 + ldr r0, [r0, #0] + str r1, [r0, #4] +_0224B4FC: + bl ov23_0224C6E8 + ldr r0, _0224B514 ; =0x022577AC + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224B50C + bl sub_020181C4 +_0224B50C: + ldr r0, _0224B514 ; =0x022577AC + mov r1, #0 + str r1, [r0, #0] + pop {r3, pc} + ; .align 2, 0 +_0224B514: .word 0x022577AC + thumb_func_end ov23_0224B4E4 + + thumb_func_start ov23_0224B518 +ov23_0224B518: ; 0x0224B518 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r7, _0224B57C ; =0x00000FFF + ldr r6, _0224B580 ; =0x022577AC + str r4, [sp] + add r5, r4, #0 +_0224B524: + ldr r0, [r6, #0] + add r0, #0xa + add r0, r0, r4 + bl sub_02029300 + ldr r0, [r6, #0] + add r4, #0x96 + add r1, r0, r5 + ldr r0, _0224B584 ; =0x00001284 + strh r7, [r1, r0] + ldr r0, [r6, #0] + add r1, r0, r5 + ldr r0, _0224B588 ; =0x00001286 + strh r7, [r1, r0] + ldr r0, [r6, #0] + add r1, r0, r5 + ldr r0, _0224B58C ; =0x000012B4 + strh r7, [r1, r0] + ldr r0, [r6, #0] + add r1, r0, r5 + ldr r0, _0224B590 ; =0x000012B6 + add r5, r5, #6 + strh r7, [r1, r0] + ldr r0, [sp] + add r0, r0, #1 + str r0, [sp] + cmp r0, #8 + blt _0224B524 + ldr r0, _0224B580 ; =0x022577AC + mov r2, #0x22 + ldr r1, [r0, #0] + ldr r0, _0224B594 ; =0x00000A04 + lsl r2, r2, #6 + add r0, r1, r0 + mov r1, #0xff + bl sub_020C4CF4 + ldr r0, _0224B580 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl ov23_0224B2C8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B57C: .word 0x00000FFF +_0224B580: .word 0x022577AC +_0224B584: .word 0x00001284 +_0224B588: .word 0x00001286 +_0224B58C: .word 0x000012B4 +_0224B590: .word 0x000012B6 +_0224B594: .word 0x00000A04 + thumb_func_end ov23_0224B518 + + thumb_func_start ov23_0224B598 +ov23_0224B598: ; 0x0224B598 + push {r4, r5, r6, lr} + mov r4, #0 + ldr r6, _0224B5C0 ; =0x022577AC + add r5, r4, #0 +_0224B5A0: + ldr r0, [r6, #0] + add r0, #0xa + add r0, r0, r5 + bl sub_020292C0 + add r4, r4, #1 + add r5, #0x96 + cmp r4, #0x11 + blt _0224B5A0 + ldr r0, _0224B5C0 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl ov23_0224B2C8 + pop {r4, r5, r6, pc} + nop +_0224B5C0: .word 0x022577AC + thumb_func_end ov23_0224B598 + + thumb_func_start ov23_0224B5C4 +ov23_0224B5C4: ; 0x0224B5C4 + ldr r0, _0224B5C8 ; =0x000013E8 + bx lr + ; .align 2, 0 +_0224B5C8: .word 0x000013E8 + thumb_func_end ov23_0224B5C4 + + thumb_func_start ov23_0224B5CC +ov23_0224B5CC: ; 0x0224B5CC + push {r4, r5} + ldr r2, _0224B610 ; =0x022577AC + ldr r1, [r2, #0] + cmp r1, #0 + beq _0224B60A + add r4, r1, r0 + ldr r1, _0224B614 ; =0x00001363 + mov r3, #0xff + strb r3, [r4, r1] + ldr r4, [r2, #0] + add r5, r4, r0 + add r4, r1, #0 + add r4, #8 + strb r3, [r5, r4] + ldr r4, [r2, #0] + add r5, r4, r0 + add r4, r1, #0 + add r4, #0x10 + strb r3, [r5, r4] + mov r3, #6 + mul r3, r0 + ldr r4, [r2, #0] + ldr r0, _0224B618 ; =0x00000FFF + add r5, r4, r3 + add r4, r1, #0 + sub r4, #0xaf + strh r0, [r5, r4] + ldr r2, [r2, #0] + sub r1, #0xad + add r2, r2, r3 + strh r0, [r2, r1] +_0224B60A: + pop {r4, r5} + bx lr + nop +_0224B610: .word 0x022577AC +_0224B614: .word 0x00001363 +_0224B618: .word 0x00000FFF + thumb_func_end ov23_0224B5CC + + thumb_func_start ov23_0224B61C +ov23_0224B61C: ; 0x0224B61C + push {r3, r4, r5, lr} + ldr r1, _0224B648 ; =0x022577AC + add r4, r0, #0 + ldr r1, [r1, #0] + cmp r1, #0 + beq _0224B646 + bl ov23_0224C6AC + ldr r1, _0224B648 ; =0x022577AC + mov r0, #6 + add r5, r4, #0 + mul r5, r0 + ldr r0, [r1, #0] + ldr r3, _0224B64C ; =0x00000FFF + add r2, r0, r5 + ldr r0, _0224B650 ; =0x00001284 + strh r3, [r2, r0] + ldr r1, [r1, #0] + add r0, r0, #2 + add r1, r1, r5 + strh r3, [r1, r0] +_0224B646: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B648: .word 0x022577AC +_0224B64C: .word 0x00000FFF +_0224B650: .word 0x00001284 + thumb_func_end ov23_0224B61C + + thumb_func_start ov23_0224B654 +ov23_0224B654: ; 0x0224B654 + ldr r3, _0224B658 ; =sub_02059514 + bx r3 + ; .align 2, 0 +_0224B658: .word sub_02059514 + thumb_func_end ov23_0224B654 + + thumb_func_start ov23_0224B65C +ov23_0224B65C: ; 0x0224B65C + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r7, r0, #0 + str r1, [sp] + add r5, r6, #0 +_0224B666: + ldr r0, _0224B6A8 ; =0x022577AC + ldr r4, [r0, #0] + add r4, #0xa + add r0, r4, r5 + bl sub_0202988C + cmp r0, #0 + beq _0224B69A + add r0, r6, #0 + bl sub_02058C90 + cmp r0, #0 + beq _0224B69A + add r0, r4, r5 + bl sub_02029874 + cmp r7, r0 + bne _0224B69A + add r0, r4, r5 + bl sub_0202987C + ldr r1, [sp] + cmp r1, r0 + bne _0224B69A + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224B69A: + add r6, r6, #1 + add r5, #0x96 + cmp r6, #8 + blt _0224B666 + mov r0, #0xff + pop {r3, r4, r5, r6, r7, pc} + nop +_0224B6A8: .word 0x022577AC + thumb_func_end ov23_0224B65C + + thumb_func_start ov23_0224B6AC +ov23_0224B6AC: ; 0x0224B6AC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r2, #0 + ldrb r4, [r5, #4] + bl sub_0203608C + cmp r4, r0 + bne _0224B6F4 + ldr r0, _0224B6F8 ; =0x022577AC + ldr r1, _0224B6FC ; =0x000013E4 + ldr r0, [r0, #0] + ldrb r1, [r0, r1] + cmp r1, #0 + bne _0224B6F4 + ldrb r1, [r5, #7] + cmp r1, #0 + str r4, [sp] + beq _0224B6E4 + ldrb r1, [r5, #5] + mov r3, #0 + str r1, [sp, #4] + ldrh r1, [r5] + ldrh r2, [r5, #2] + ldr r0, [r0, #0] + bl ov23_0224C090 + add sp, #8 + pop {r3, r4, r5, pc} +_0224B6E4: + ldrb r1, [r5, #5] + str r1, [sp, #4] + ldrh r1, [r5] + ldrh r2, [r5, #2] + ldrb r3, [r5, #6] + ldr r0, [r0, #0] + bl ov23_0224BC5C +_0224B6F4: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B6F8: .word 0x022577AC +_0224B6FC: .word 0x000013E4 + thumb_func_end ov23_0224B6AC + + thumb_func_start ov23_0224B700 +ov23_0224B700: ; 0x0224B700 + push {r4, lr} + add r4, r2, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0224B724 + bl sub_020594FC + bl ov23_0224219C + ldr r3, _0224B728 ; =ov23_0224B654 + mov r1, #0x58 + mov r2, #1 + bl ov23_02253F40 + bl ov23_0224DC24 +_0224B724: + pop {r4, pc} + nop +_0224B728: .word ov23_0224B654 + thumb_func_end ov23_0224B700 + + thumb_func_start ov23_0224B72C +ov23_0224B72C: ; 0x0224B72C + mov r0, #8 + bx lr + thumb_func_end ov23_0224B72C + + thumb_func_start ov23_0224B730 +ov23_0224B730: ; 0x0224B730 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, sp, #0 + add r4, r2, #0 + strb r5, [r0] + bl sub_0203608C + cmp r0, #0 + beq _0224B748 + bl sub_02022974 + pop {r3, r4, r5, pc} +_0224B748: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0224B780 + ldrb r0, [r4, #2] + cmp r0, #0 + ldrb r0, [r4] + beq _0224B776 + add r1, r5, #0 + bl ov23_0224B79C + cmp r0, #0 + bne _0224B78C + ldr r0, _0224B790 ; =0x022577AC + mov r2, #0xff + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _0224B794 ; =0x0000136B + strb r2, [r1, r0] + mov r0, #0x3d + add r1, sp, #0 + bl sub_02035B48 + pop {r3, r4, r5, pc} +_0224B776: + add r1, r5, #0 + mov r2, #0 + bl ov23_0224B844 + pop {r3, r4, r5, pc} +_0224B780: + ldr r0, _0224B790 ; =0x022577AC + mov r2, #0xff + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _0224B794 ; =0x0000136B + strb r2, [r1, r0] +_0224B78C: + pop {r3, r4, r5, pc} + nop +_0224B790: .word 0x022577AC +_0224B794: .word 0x0000136B + thumb_func_end ov23_0224B730 + + thumb_func_start ov23_0224B798 +ov23_0224B798: ; 0x0224B798 + mov r0, #3 + bx lr + thumb_func_end ov23_0224B798 + + thumb_func_start ov23_0224B79C +ov23_0224B79C: ; 0x0224B79C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0224B838 ; =0x022577AC + add r6, r1, #0 + ldr r1, [r0, #0] + mov r0, #0x96 + add r1, #8 + mul r0, r5 + add r0, r1, r0 + str r0, [sp] + add r0, r0, #2 + bl sub_0202988C + cmp r0, #0 + bne _0224B7C2 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224B7C2: + mov r0, #0x36 + bl sub_02036254 + cmp r0, #0 + beq _0224B7D2 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224B7D2: + ldr r7, _0224B838 ; =0x022577AC + mov r4, #0 +_0224B7D6: + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0224B7F4 + ldr r0, [r7, #0] + add r1, r0, r4 + ldr r0, _0224B83C ; =0x00001373 + ldrb r0, [r1, r0] + cmp r5, r0 + bne _0224B7F4 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224B7F4: + add r4, r4, #1 + cmp r4, #8 + blt _0224B7D6 + add r0, r5, #0 + add r1, sp, #4 + bl ov23_0224B128 + ldr r0, [sp] + strb r6, [r0, #1] + add r0, r5, #0 + bl ov23_0224C23C + ldr r2, _0224B838 ; =0x022577AC + lsl r0, r5, #0x18 + ldr r1, [r2, #0] + lsr r0, r0, #0x18 + add r3, r1, r6 + ldr r1, _0224B840 ; =0x0000136B + strb r0, [r3, r1] + ldr r2, [r2, #0] + add r1, #8 + add r2, r2, r6 + strb r0, [r2, r1] + add r2, sp, #4 + ldrh r1, [r2] + ldrh r2, [r2, #2] + add r0, r6, #0 + mov r3, #0 + bl ov23_0224ADB0 + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224B838: .word 0x022577AC +_0224B83C: .word 0x00001373 +_0224B840: .word 0x0000136B + thumb_func_end ov23_0224B79C + + thumb_func_start ov23_0224B844 +ov23_0224B844: ; 0x0224B844 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r1, sp, #4 + add r4, r0, #0 + str r2, [sp] + bl ov23_0224B0DC + ldr r0, _0224B8D0 ; =0x022577AC + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _0224B8D4 ; =0x0000136B + strb r4, [r1, r0] + bl sub_02036180 + cmp r0, #0 + beq _0224B878 + ldr r0, _0224B8D0 ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224B8D8 ; =0x000013DC + add r1, r0, #2 + ldrh r4, [r2, r0] + add r0, r0, #4 + ldrh r7, [r2, r1] + ldrb r6, [r2, r0] + b _0224B88E +_0224B878: + ldr r0, _0224B8D0 ; =0x022577AC + lsl r1, r5, #1 + ldr r0, [r0, #0] + add r2, r0, r1 + ldr r1, _0224B8DC ; =0x000013AC + add r0, r1, #0 + ldrh r4, [r2, r1] + add r0, #0x10 + add r1, #0x20 + ldrh r7, [r2, r0] + ldrh r6, [r2, r1] +_0224B88E: + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov23_0224ADB0 + add r0, r6, #0 + bl sub_0206419C + add r4, r4, r0 + add r0, r6, #0 + bl sub_020641A8 + add r1, sp, #4 + add r0, r7, r0 + strh r4, [r1, #6] + strh r0, [r1, #8] + strb r5, [r1, #0xa] + ldr r0, [sp] + strb r6, [r1, #0xb] + strb r0, [r1, #0xc] + add r1, sp, #8 + mov r0, #0x39 + add r1, #2 + bl sub_02035B48 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0224B8D0: .word 0x022577AC +_0224B8D4: .word 0x0000136B +_0224B8D8: .word 0x000013DC +_0224B8DC: .word 0x000013AC + thumb_func_end ov23_0224B844 + + thumb_func_start ov23_0224B8E0 +ov23_0224B8E0: ; 0x0224B8E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + ldr r0, _0224BA3C ; =0x022577AC + add r7, r1, #0 + ldr r0, [r0, #0] + str r2, [sp] + cmp r0, #0 + bne _0224B8F8 + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224B8F8: + cmp r6, #0 + beq _0224B90E + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + bne _0224B90E + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224B90E: + add r0, r6, #0 + bl ov23_0224ACC0 + cmp r0, #0 + beq _0224B91E + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224B91E: + ldr r0, _0224BA3C ; =0x022577AC + ldr r0, [r0, #0] + add r1, r0, r6 + ldr r0, _0224BA40 ; =0x0000136B + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _0224B932 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224B932: + ldr r1, [sp] + add r0, r7, #0 + bl ov23_0224B65C + cmp r0, #0xff + beq _0224B976 + ldr r1, _0224BA3C ; =0x022577AC + lsl r0, r0, #0x18 + ldr r1, [r1, #0] + lsr r0, r0, #0x18 + add r2, r1, r6 + ldr r1, _0224BA40 ; =0x0000136B + strb r0, [r2, r1] + mov r1, #1 + add r2, sp, #4 + strb r1, [r2, #7] + ldr r1, [sp] + strh r7, [r2] + strh r1, [r2, #2] + mov r1, #0 + strb r1, [r2, #6] + strb r6, [r2, #4] + strb r0, [r2, #5] + mov r0, #0x3a + add r1, sp, #4 + bl sub_02035B48 + add r0, r6, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224B976: + mov r5, #0 + add r4, r5, #0 +_0224B97A: + ldr r0, _0224BA3C ; =0x022577AC + ldr r0, [r0, #0] + add r0, #0xa + add r0, r0, r4 + bl sub_0202988C + cmp r0, #0 + beq _0224B9DA + add r0, r5, #0 + add r1, sp, #0xc + bl ov23_0224B0DC + add r0, sp, #4 + ldrh r0, [r0, #8] + cmp r7, r0 + bne _0224B9DA + add r0, sp, #4 + ldrh r1, [r0, #0xa] + ldr r0, [sp] + cmp r0, r1 + bne _0224B9DA + ldr r1, _0224BA3C ; =0x022577AC + lsl r0, r5, #0x18 + ldr r1, [r1, #0] + lsr r0, r0, #0x18 + add r2, r1, r6 + ldr r1, _0224BA40 ; =0x0000136B + mov r3, #0 + strb r0, [r2, r1] + add r2, sp, #4 + strb r3, [r2, #7] + ldr r1, [sp] + strh r7, [r2] + strh r1, [r2, #2] + strb r3, [r2, #6] + strb r6, [r2, #4] + strb r0, [r2, #5] + mov r0, #0x3a + add r1, sp, #4 + bl sub_02035B48 + add r0, r6, #0 + mov r1, #0 + bl sub_02059058 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224B9DA: + add r5, r5, #1 + add r4, #0x96 + cmp r5, #8 + ble _0224B97A + ldr r1, [sp] + add r0, r7, #0 + bl ov23_0224B098 + cmp r0, #0 + beq _0224BA36 + ldr r0, _0224BA3C ; =0x022577AC + lsl r2, r6, #1 + ldr r1, [r0, #0] + ldr r4, _0224BA44 ; =0x000013AC + add r0, r1, r2 + ldrh r2, [r0, r4] + add r3, sp, #4 + strh r2, [r3, #0xe] + add r2, r4, #0 + add r2, #0x10 + ldrh r2, [r0, r2] + strh r2, [r3, #0x10] + add r2, r4, #0 + strb r6, [r3, #0x12] + add r2, #0x20 + ldrh r0, [r0, r2] + mov r2, #0 + sub r4, #0x41 + strb r0, [r3, #0x13] + strb r2, [r3, #0x14] + add r0, r1, r6 + strb r2, [r0, r4] + ldrh r1, [r3, #0xe] + ldrh r2, [r3, #0x10] + ldrb r3, [r3, #0x13] + add r0, r6, #0 + bl ov23_0224ADB0 + add r1, sp, #0x10 + mov r0, #0x39 + add r1, #2 + bl sub_02035B48 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224BA36: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BA3C: .word 0x022577AC +_0224BA40: .word 0x0000136B +_0224BA44: .word 0x000013AC + thumb_func_end ov23_0224B8E0 + + thumb_func_start ov23_0224BA48 +ov23_0224BA48: ; 0x0224BA48 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _0224BA5A + mov r1, #4 + bl sub_02002154 +_0224BA5A: + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + bl ov23_02243204 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224BA48 + + thumb_func_start ov23_0224BA6C +ov23_0224BA6C: ; 0x0224BA6C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _0224BA7E + mov r1, #4 + bl sub_02002154 +_0224BA7E: + add r0, r4, #0 + mov r2, #0 + add r1, sp, #0 + strb r2, [r1, #1] + add r0, #0x2c + ldrb r0, [r0] + strb r0, [r1] + strb r2, [r1, #2] + mov r0, #0x3b + add r1, sp, #0 + bl sub_020360D0 + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + bl ov23_02243204 + bl ov23_0224DC24 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224BA6C + + thumb_func_start ov23_0224BAAC +ov23_0224BAAC: ; 0x0224BAAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0xc] + mov r5, #0 + ldr r6, [r4, #0] + cmp r0, #7 + bhi _0224BB0A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224BACA: ; jump table + .short _0224BADA - _0224BACA - 2 ; case 0 + .short _0224BAFE - _0224BACA - 2 ; case 1 + .short _0224BB24 - _0224BACA - 2 ; case 2 + .short _0224BB48 - _0224BACA - 2 ; case 3 + .short _0224BB6C - _0224BACA - 2 ; case 4 + .short _0224BB9E - _0224BACA - 2 ; case 5 + .short _0224BBC2 - _0224BACA - 2 ; case 6 + .short _0224BBE6 - _0224BACA - 2 ; case 7 +_0224BADA: + bl sub_02033DFC + cmp r0, #0 + beq _0224BAE8 + mov r6, #0x2f + mov r0, #3 + b _0224BAEC +_0224BAE8: + mov r6, #0x32 + mov r0, #1 +_0224BAEC: + str r0, [r4, #0xc] + bl ov23_0224219C + mov r2, #0 + add r1, r6, #0 + add r3, r2, #0 + bl ov23_02253F40 + b _0224BC14 +_0224BAFE: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + beq _0224BB0C +_0224BB0A: + b _0224BC14 +_0224BB0C: + mov r0, #4 + str r0, [sp] + ldr r0, [r6, #8] + ldr r1, _0224BC54 ; =0x02256864 + ldr r2, _0224BC58 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #4] + mov r0, #2 + str r0, [r4, #0xc] + b _0224BC14 +_0224BB24: + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224BB3A + add r0, r5, #0 + str r0, [r4, #4] + mov r0, #7 + str r0, [r4, #0xc] + b _0224BC14 +_0224BB3A: + sub r1, r5, #1 + cmp r0, r1 + beq _0224BC14 + add r0, r5, #0 + str r0, [r4, #4] + mov r5, #1 + b _0224BC14 +_0224BB48: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224BC14 + mov r0, #4 + str r0, [sp] + ldr r0, [r6, #8] + ldr r1, _0224BC54 ; =0x02256864 + ldr r2, _0224BC58 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #4] + mov r0, #4 + str r0, [r4, #0xc] + b _0224BC14 +_0224BB6C: + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224BB90 + add r0, r5, #0 + str r0, [r4, #4] + bl ov23_0224219C + add r2, r5, #0 + mov r1, #0x30 + add r3, r2, #0 + bl ov23_02253F40 + mov r0, #5 + str r0, [r4, #0xc] + b _0224BC14 +_0224BB90: + sub r1, r5, #1 + cmp r0, r1 + beq _0224BC14 + add r0, r5, #0 + str r0, [r4, #4] + mov r5, #1 + b _0224BC14 +_0224BB9E: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224BC14 + mov r0, #4 + str r0, [sp] + ldr r0, [r6, #8] + ldr r1, _0224BC54 ; =0x02256864 + ldr r2, _0224BC58 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #4] + mov r0, #6 + str r0, [r4, #0xc] + b _0224BC14 +_0224BBC2: + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224BBD8 + add r0, r5, #0 + str r0, [r4, #4] + mov r0, #7 + str r0, [r4, #0xc] + b _0224BC14 +_0224BBD8: + sub r1, r5, #1 + cmp r0, r1 + beq _0224BC14 + add r0, r5, #0 + str r0, [r4, #4] + mov r5, #1 + b _0224BC14 +_0224BBE6: + bl ov23_0224219C + bl ov23_02254044 + mov r0, #1 + add r1, sp, #4 + strb r0, [r1, #1] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + strb r0, [r1] + add r0, r5, #0 + strb r0, [r1, #2] + mov r0, #0x3b + add r1, sp, #4 + bl sub_020360D0 + add r0, r7, #0 + add r1, r4, #0 + bl ov23_0224BA48 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0224BC14: + bl sub_02033DFC + cmp r0, #0 + bne _0224BC38 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + cmp r0, #8 + bhs _0224BC38 + bl sub_02035D78 + cmp r0, #0 + bne _0224BC38 + bl sub_0203608C + cmp r0, #0 + beq _0224BC38 + mov r5, #1 +_0224BC38: + cmp r5, #0 + beq _0224BC50 + bl ov23_0224219C + bl ov23_02254044 + add r0, r7, #0 + add r1, r4, #0 + bl ov23_0224BA6C + bl sub_02059514 +_0224BC50: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BC54: .word 0x02256864 +_0224BC58: .word 0x000003D9 + thumb_func_end ov23_0224BAAC + + thumb_func_start ov23_0224BC5C +ov23_0224BC5C: ; 0x0224BC5C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + bl ov23_0224DC08 + mov r0, #4 + mov r1, #0x30 + bl sub_02018184 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x18] + str r6, [r4, #0x1c] + add r0, r4, #0 + ldr r1, [sp, #0x18] + str r7, [r4, #0x20] + add r0, #0x2b + strb r1, [r0] + add r0, r4, #0 + ldr r1, [sp, #0x1c] + add r0, #0x2c + strb r1, [r0] + mov r0, #2 + str r0, [r4, #0x14] + ldr r0, [sp] + add r1, r4, #0 + str r0, [r4, #0x24] + ldr r0, _0224BCBC ; =ov23_0224BAAC + str r5, [r4, #0] + mov r2, #0x64 + bl sub_0200D9E8 + str r0, [r4, #8] + ldr r1, [r4, #8] + ldr r2, _0224BCC0 ; =ov23_0224BA6C + add r0, r4, #0 + bl ov23_022431EC + bl sub_020594FC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BCBC: .word ov23_0224BAAC +_0224BCC0: .word ov23_0224BA6C + thumb_func_end ov23_0224BC5C + + thumb_func_start ov23_0224BCC4 +ov23_0224BCC4: ; 0x0224BCC4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r6, r1, #0 + add r7, r2, #0 + mov r4, #0 + str r3, [sp] + cmp r0, #0 + bne _0224BD16 + mov r0, #0xb + mov r1, #0x30 + bl sub_02018184 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x18] + str r6, [r4, #0x1c] + add r0, r4, #0 + ldr r1, [sp, #0x18] + str r7, [r4, #0x20] + add r0, #0x2b + strb r1, [r0] + add r0, r4, #0 + ldr r1, [sp, #0x1c] + add r0, #0x2c + strb r1, [r0] + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + cmp r0, #2 + beq _0224BD0E + bl sub_02022974 +_0224BD0E: + mov r0, #2 + str r0, [r4, #0x14] + ldr r0, [sp] + str r0, [r4, #0x24] +_0224BD16: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_0224BCC4 + + thumb_func_start ov23_0224BD1C +ov23_0224BD1C: ; 0x0224BD1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r7, #0 + str r0, [sp] + str r1, [sp, #4] + add r4, r7, #0 +_0224BD28: + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0224BD80 + ldr r0, [sp, #4] + cmp r0, #0 + beq _0224BD4A + add r0, r4, #0 + bl sub_02058DF8 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02058E4C + b _0224BD58 +_0224BD4A: + add r0, r4, #0 + bl sub_02058CA0 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02058CF4 +_0224BD58: + add r5, r0, #0 + ldr r0, _0224BD8C ; =0x0000FFFF + cmp r6, r0 + bne _0224BD64 + cmp r5, r0 + beq _0224BD80 +_0224BD64: + add r0, r6, #0 + add r1, r5, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _0224BD80 + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224B05C + ldr r1, [sp] + cmp r0, r1 + bne _0224BD80 + add r7, r7, #1 +_0224BD80: + add r4, r4, #1 + cmp r4, #8 + blt _0224BD28 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BD8C: .word 0x0000FFFF + thumb_func_end ov23_0224BD1C + + thumb_func_start ov23_0224BD90 +ov23_0224BD90: ; 0x0224BD90 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r2, [sp, #8] + add r6, r0, #0 + add r7, r1, #0 + str r3, [sp, #0xc] + bl ov23_0224219C + bl ov23_02253E3C + add r5, r0, #0 + ldr r1, [sp, #0x30] + mov r0, #2 + bl sub_02013A04 + add r4, r0, #0 + add r1, r5, #0 + mov r2, #0x26 + mov r3, #0 + bl sub_02013A4C + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0x27 + mov r3, #1 + bl sub_02013A4C + ldr r0, [sp, #0x30] + mov r1, #1 + str r4, [sp, #0x10] + bl sub_0201A778 + add r1, r0, #0 + str r1, [sp, #0x14] + mov r0, #0 + add r3, sp, #0x10 + strb r0, [r3, #8] + mov r0, #1 + strb r0, [r3, #9] + mov r0, #2 + strb r0, [r3, #0xa] + ldrb r0, [r3, #0xb] + mov r2, #0xf + bic r0, r2 + strb r0, [r3, #0xb] + ldrb r4, [r3, #0xb] + mov r0, #0x30 + bic r4, r0 + strb r4, [r3, #0xb] + ldrb r0, [r3, #0xb] + bic r0, r2 + strb r0, [r3, #0xb] + add r0, r6, #0 + add r2, r7, #0 + bl sub_0201A8D4 + ldr r0, [sp, #0x14] + ldr r2, [sp, #8] + ldr r3, [sp, #0xc] + mov r1, #1 + bl sub_0200DC48 + ldr r0, [sp, #0x30] + mov r2, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, sp, #0x10 + mov r1, #8 + add r3, r2, #0 + bl sub_02001B7C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov23_0224BD90 + + thumb_func_start ov23_0224BE28 +ov23_0224BE28: ; 0x0224BE28 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r0, #0 + ldr r0, [r4, #0xc] + mov r5, #0 + ldr r6, [r4, #0] + cmp r0, #0xa + bhi _0224BEEE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224BE46: ; jump table + .short _0224BE5C - _0224BE46 - 2 ; case 0 + .short _0224BE88 - _0224BE46 - 2 ; case 1 + .short _0224BEAC - _0224BE46 - 2 ; case 2 + .short _0224BED0 - _0224BE46 - 2 ; case 3 + .short _0224BEE2 - _0224BE46 - 2 ; case 4 + .short _0224BF08 - _0224BE46 - 2 ; case 5 + .short _0224BF6C - _0224BE46 - 2 ; case 6 + .short _0224BF90 - _0224BE46 - 2 ; case 7 + .short _0224BFC2 - _0224BE46 - 2 ; case 8 + .short _0224BFE0 - _0224BE46 - 2 ; case 9 + .short _0224C00A - _0224BE46 - 2 ; case 10 +_0224BE5C: + add r0, r4, #0 + add r0, #0x2c + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0x2b + ldrb r0, [r0] + cmp r1, r0 + beq _0224BE72 + mov r6, #0x2d + mov r0, #1 + b _0224BE76 +_0224BE72: + mov r6, #0x29 + mov r0, #4 +_0224BE76: + str r0, [r4, #0xc] + bl ov23_0224219C + mov r2, #0 + add r1, r6, #0 + add r3, r2, #0 + bl ov23_02253F40 + b _0224C042 +_0224BE88: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224BEEE + mov r0, #4 + str r0, [sp] + ldr r0, [r6, #8] + ldr r1, _0224C07C ; =0x02256864 + ldr r2, _0224C080 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #4] + mov r0, #2 + str r0, [r4, #0xc] + b _0224C042 +_0224BEAC: + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224BEC2 + add r0, r5, #0 + str r0, [r4, #4] + mov r0, #3 + str r0, [r4, #0xc] + b _0224C042 +_0224BEC2: + sub r1, r5, #1 + cmp r0, r1 + beq _0224BEEE + add r0, r5, #0 + str r0, [r4, #4] + mov r5, #1 + b _0224C042 +_0224BED0: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224BEEE + mov r0, #0xa + str r0, [r4, #0xc] + b _0224C042 +_0224BEE2: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + beq _0224BEF0 +_0224BEEE: + b _0224C042 +_0224BEF0: + mov r0, #4 + str r0, [sp] + ldr r0, [r6, #8] + ldr r1, _0224C07C ; =0x02256864 + ldr r2, _0224C080 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #4] + mov r0, #5 + str r0, [r4, #0xc] + b _0224C042 +_0224BF08: + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224BF5E + add r0, r5, #0 + str r0, [r4, #4] + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + bl ov23_0224AEA4 + cmp r0, #0 + bne _0224BF36 + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + add r1, r5, #0 + bl ov23_0224BD1C + cmp r0, #0 + ble _0224BF4A +_0224BF36: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x2c + add r3, r2, #0 + bl ov23_02253F40 + mov r0, #3 + str r0, [r4, #0xc] + b _0224C042 +_0224BF4A: + bl ov23_0224219C + add r2, r5, #0 + mov r1, #0x25 + add r3, r2, #0 + bl ov23_02253F40 + mov r0, #6 + str r0, [r4, #0xc] + b _0224C042 +_0224BF5E: + sub r1, r5, #1 + cmp r0, r1 + beq _0224C042 + add r0, r5, #0 + str r0, [r4, #4] + mov r5, #1 + b _0224C042 +_0224BF6C: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224C042 + mov r0, #4 + str r0, [sp] + ldr r0, [r6, #8] + ldr r1, _0224C084 ; =0x0225686C + ldr r2, _0224C080 ; =0x000003D9 + mov r3, #0xb + bl ov23_0224BD90 + str r0, [r4, #4] + mov r0, #7 + str r0, [r4, #0xc] + b _0224C042 +_0224BF90: + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224BFA6 + add r0, r5, #0 + str r0, [r4, #4] + mov r0, #3 + str r0, [r4, #0xc] + b _0224C042 +_0224BFA6: + cmp r0, #1 + bne _0224BFB4 + add r0, r5, #0 + str r0, [r4, #4] + mov r0, #8 + str r0, [r4, #0xc] + b _0224C042 +_0224BFB4: + sub r1, r5, #1 + cmp r0, r1 + beq _0224C042 + add r0, r5, #0 + str r0, [r4, #4] + mov r5, #1 + b _0224C042 +_0224BFC2: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224C042 + bl ov23_0224219C + bl ov23_02254044 + bl ov23_02249A74 + mov r0, #9 + str r0, [r4, #0xc] + b _0224C042 +_0224BFE0: + bl sub_02033DFC + cmp r0, #0 + beq _0224C042 + bl sub_0203608C + cmp r0, #0 + bne _0224C042 + mov r1, #1 + add r0, sp, #4 + strb r1, [r0] + mov r0, #0x56 + add r1, sp, #4 + bl sub_020360D0 + add r0, r7, #0 + add r1, r4, #0 + bl ov23_0224BA48 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0224C00A: + bl ov23_0224219C + bl ov23_02254044 + add r0, r4, #0 + mov r2, #1 + add r1, sp, #4 + strb r2, [r1, #2] + add r0, #0x2c + ldrb r0, [r0] + strb r0, [r1, #1] + strb r2, [r1, #3] + add r1, sp, #4 + mov r0, #0x3b + add r1, #1 + bl sub_020360D0 + add r0, r7, #0 + add r1, r4, #0 + bl ov23_0224BA48 + ldr r0, _0224C088 ; =0x022577AC + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _0224C08C ; =0x000012E4 + add sp, #8 + strb r2, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} +_0224C042: + add r0, r4, #0 + add r0, #0x2c + ldrb r0, [r0] + cmp r0, #0x10 + beq _0224C060 + bl sub_02058C90 + cmp r0, #0 + bne _0224C060 + ldr r0, [r4, #0xc] + cmp r0, #8 + beq _0224C060 + cmp r0, #9 + beq _0224C060 + mov r5, #1 +_0224C060: + cmp r5, #0 + beq _0224C078 + bl ov23_0224219C + bl ov23_02254044 + add r0, r7, #0 + add r1, r4, #0 + bl ov23_0224BA6C + bl sub_02059514 +_0224C078: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C07C: .word 0x02256864 +_0224C080: .word 0x000003D9 +_0224C084: .word 0x0225686C +_0224C088: .word 0x022577AC +_0224C08C: .word 0x000012E4 + thumb_func_end ov23_0224BE28 + + thumb_func_start ov23_0224C090 +ov23_0224C090: ; 0x0224C090 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #4 + mov r1, #0x30 + add r7, r2, #0 + str r3, [sp] + bl sub_02018184 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x18] + str r6, [r4, #0x1c] + add r0, r4, #0 + ldr r1, [sp, #0x18] + str r7, [r4, #0x20] + add r0, #0x2b + strb r1, [r0] + add r0, r4, #0 + ldr r1, [sp, #0x1c] + add r0, #0x2c + strb r1, [r0] + mov r0, #2 + str r0, [r4, #0x14] + ldr r0, [sp] + mov r1, #0 + str r0, [r4, #0x24] + add r0, r4, #0 + str r5, [r4, #0] + add r0, #0x29 + strb r1, [r0] + bl ov23_0224DC08 + ldr r0, _0224C0F8 ; =ov23_0224BE28 + add r1, r4, #0 + mov r2, #0x64 + bl sub_0200D9E8 + str r0, [r4, #8] + ldr r1, [r4, #8] + ldr r2, _0224C0FC ; =ov23_0224BA6C + add r0, r4, #0 + bl ov23_022431EC + bl sub_020594FC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C0F8: .word ov23_0224BE28 +_0224C0FC: .word ov23_0224BA6C + thumb_func_end ov23_0224C090 + + thumb_func_start ov23_0224C100 +ov23_0224C100: ; 0x0224C100 + mov r0, #8 + bx lr + thumb_func_end ov23_0224C100 + + thumb_func_start ov23_0224C104 +ov23_0224C104: ; 0x0224C104 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r0, _0224C18C ; =0x022577AC + add r4, r2, #0 + ldr r1, [r0, #0] + ldrb r0, [r4, #4] + mov r2, #0xff + add r1, r1, r0 + ldr r0, _0224C190 ; =0x00001363 + strb r2, [r1, r0] + ldrb r5, [r4, #4] + bl sub_0203608C + cmp r5, r0 + bne _0224C176 + bl ov23_022535EC + bl ov23_0224F24C + bl ov23_0224321C + bl sub_0203608C + mov r1, #0 + bl ov23_02244858 + mov r0, #0x2b + bl sub_020360DC + ldr r0, _0224C18C ; =0x022577AC + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _0224C194 ; =0x000013E6 + strb r2, [r1, r0] + mov r0, #1 + bl sub_02059638 + ldrb r0, [r4, #4] + str r0, [sp] + ldrb r0, [r4, #6] + str r0, [sp, #4] + ldr r0, _0224C18C ; =0x022577AC + ldrh r1, [r4] + ldr r0, [r0, #0] + ldrh r2, [r4, #2] + ldrb r3, [r4, #5] + ldr r0, [r0, #0] + bl ov23_0224CAF0 + ldr r0, _0224C18C ; =0x022577AC + mov r2, #0 + ldr r1, [r0, #0] + mov r0, #0xa + lsl r0, r0, #8 + str r2, [r1, r0] + add sp, #8 + pop {r3, r4, r5, pc} +_0224C176: + add r0, r5, #0 + bl ov23_02248B98 + ldrb r0, [r4, #4] + ldrh r1, [r4] + ldrh r2, [r4, #2] + ldrb r3, [r4, #5] + bl ov23_0224ADE8 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224C18C: .word 0x022577AC +_0224C190: .word 0x00001363 +_0224C194: .word 0x000013E6 + thumb_func_end ov23_0224C104 + + thumb_func_start ov23_0224C198 +ov23_0224C198: ; 0x0224C198 + ldr r3, _0224C1A0 ; =sub_020360DC + mov r0, #0x38 + bx r3 + nop +_0224C1A0: .word sub_020360DC + thumb_func_end ov23_0224C198 + + thumb_func_start ov23_0224C1A4 +ov23_0224C1A4: ; 0x0224C1A4 + push {r3, r4} + ldr r2, _0224C1C0 ; =0x022577AC + mov r4, #0xff + ldr r1, [r2, #0] + add r3, r1, r0 + ldr r1, _0224C1C4 ; =0x0000136B + strb r4, [r3, r1] + ldr r2, [r2, #0] + add r1, #8 + add r0, r2, r0 + strb r4, [r0, r1] + pop {r3, r4} + bx lr + nop +_0224C1C0: .word 0x022577AC +_0224C1C4: .word 0x0000136B + thumb_func_end ov23_0224C1A4 + + thumb_func_start ov23_0224C1C8 +ov23_0224C1C8: ; 0x0224C1C8 + ldr r1, _0224C1E4 ; =0x022577AC + ldr r1, [r1, #0] + cmp r1, #0 + beq _0224C1DE + add r1, r1, r0 + ldr r0, _0224C1E8 ; =0x0000136B + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _0224C1DE + mov r0, #1 + bx lr +_0224C1DE: + mov r0, #0 + bx lr + nop +_0224C1E4: .word 0x022577AC +_0224C1E8: .word 0x0000136B + thumb_func_end ov23_0224C1C8 + + thumb_func_start ov23_0224C1EC +ov23_0224C1EC: ; 0x0224C1EC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _0224C218 ; =0x022577AC + add r7, r1, #0 + ldr r1, [r0, #0] + add r5, r3, #0 + mov r0, #0x96 + add r1, #8 + mul r0, r5 + add r4, r1, r0 + beq _0224C216 + add r0, r2, #0 + bl sub_02059328 + add r3, r0, #0 + add r0, r4, #2 + add r1, r6, #0 + add r2, r7, #0 + bl sub_02029854 + strb r5, [r4] +_0224C216: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C218: .word 0x022577AC + thumb_func_end ov23_0224C1EC + + thumb_func_start ov23_0224C21C +ov23_0224C21C: ; 0x0224C21C + push {r3, lr} + bl sub_0203608C + ldr r1, _0224C234 ; =0x022577AC + mov r0, #0x35 + ldr r2, [r1, #0] + ldr r1, _0224C238 ; =0x00000968 + add r1, r2, r1 + mov r2, #0x96 + bl sub_02035F58 + pop {r3, pc} + ; .align 2, 0 +_0224C234: .word 0x022577AC +_0224C238: .word 0x00000968 + thumb_func_end ov23_0224C21C + + thumb_func_start ov23_0224C23C +ov23_0224C23C: ; 0x0224C23C + push {r4, lr} + ldr r1, _0224C258 ; =0x022577AC + add r4, r0, #0 + ldr r3, [r1, #0] + mov r2, #0x96 + add r1, r4, #0 + add r3, #8 + mul r1, r2 + mov r0, #0x36 + add r1, r3, r1 + bl sub_02035F00 + pop {r4, pc} + nop +_0224C258: .word 0x022577AC + thumb_func_end ov23_0224C23C + + thumb_func_start ov23_0224C25C +ov23_0224C25C: ; 0x0224C25C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r0, _0224C368 ; =0x022577AC + add r6, r2, #0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224C362 + bl sub_0203608C + ldrb r1, [r6, #1] + cmp r1, r0 + bne _0224C29C + ldr r0, _0224C368 ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224C36C ; =0x000012E4 + ldrb r1, [r2, r0] + cmp r1, #2 + bne _0224C29C + mov r1, #0 + strb r1, [r2, r0] + bl sub_02059514 + mov r0, #0x38 + bl sub_020360DC + mov r0, #0 + bl sub_02057AE4 + bl ov23_0224DC24 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_0224C29C: + ldr r0, _0224C368 ; =0x022577AC + mov r2, #5 + ldr r1, [r0, #0] + ldr r0, _0224C36C ; =0x000012E4 + strb r2, [r1, r0] + ldrb r5, [r6] + cmp r5, #0x11 + blt _0224C2B0 + bl sub_02022974 +_0224C2B0: + ldr r0, _0224C368 ; =0x022577AC + mov r2, #0x96 + ldr r4, [r0, #0] + add r7, r5, #0 + add r4, #8 + mul r7, r2 + add r5, r4, r7 + add r0, r6, #0 + add r1, r5, #0 + bl sub_020C4DB0 + ldr r2, _0224C368 ; =0x022577AC + ldrb r1, [r5, #1] + ldr r3, [r2, #0] + ldrb r0, [r4, r7] + add r3, r3, r1 + ldr r1, _0224C370 ; =0x00001363 + strb r0, [r3, r1] + ldrb r3, [r4, r7] + cmp r3, #0x10 + beq _0224C2E4 + ldrb r0, [r5, #1] + ldr r2, [r2, #0] + add r1, #0x18 + add r0, r2, r0 + strb r3, [r0, r1] +_0224C2E4: + ldrb r0, [r5] + add r1, sp, #8 + bl ov23_0224B128 + ldrb r4, [r5, #1] + bl sub_0203608C + cmp r4, r0 + bne _0224C354 + ldr r1, _0224C368 ; =0x022577AC + ldr r0, _0224C374 ; =0x000013E6 + ldr r2, [r1, #0] + mov r3, #1 + strb r3, [r2, r0] + ldrb r0, [r5, #1] + mov r3, #0 + add r2, sp, #8 + str r0, [sp] + str r3, [sp, #4] + ldr r0, [r1, #0] + ldrh r1, [r2] + ldrh r2, [r2, #2] + ldr r0, [r0, #0] + sub r2, r2, #1 + bl ov23_0224CAF0 + ldr r0, _0224C368 ; =0x022577AC + ldr r1, [r0, #0] + mov r0, #0xa + lsl r0, r0, #8 + str r5, [r1, r0] + add r0, r5, #2 + bl sub_02029874 + ldr r1, _0224C368 ; =0x022577AC + ldr r2, [r1, #0] + ldr r1, _0224C378 ; =0x000013DC + strh r0, [r2, r1] + add r0, r5, #2 + bl sub_0202987C + ldr r1, _0224C368 ; =0x022577AC + ldr r2, [r1, #0] + ldr r1, _0224C37C ; =0x000013DE + strh r0, [r2, r1] + add r0, r5, #2 + bl sub_02029884 + ldr r1, _0224C368 ; =0x022577AC + ldr r2, [r1, #0] + ldr r1, _0224C380 ; =0x000013E0 + strb r0, [r2, r1] + bl ov23_02243360 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_0224C354: + add r2, sp, #8 + ldrh r1, [r2] + ldrh r2, [r2, #2] + add r0, r4, #0 + mov r3, #0 + bl ov23_0224ADE8 +_0224C362: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C368: .word 0x022577AC +_0224C36C: .word 0x000012E4 +_0224C370: .word 0x00001363 +_0224C374: .word 0x000013E6 +_0224C378: .word 0x000013DC +_0224C37C: .word 0x000013DE +_0224C380: .word 0x000013E0 + thumb_func_end ov23_0224C25C + + thumb_func_start ov23_0224C384 +ov23_0224C384: ; 0x0224C384 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _0224C404 ; =0x022577AC + ldr r6, [r0, #0] + cmp r6, #0 + beq _0224C402 + mov r3, #0x96 + add r7, r5, #0 + add r6, #8 + mul r7, r3 + add r4, r6, r7 + add r0, r2, #0 + add r1, r4, #0 + add r2, r3, #0 + bl sub_020C4DB0 + strb r5, [r6, r7] + ldr r0, _0224C404 ; =0x022577AC + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _0224C408 ; =0x000013E2 + add r6, r5, #0 + strb r2, [r1, r0] + mov r0, #6 + mul r6, r0 + add r0, r4, #2 + bl sub_02029874 + ldr r1, _0224C404 ; =0x022577AC + ldr r1, [r1, #0] + add r2, r1, r6 + ldr r1, _0224C40C ; =0x000012B4 + strh r0, [r2, r1] + add r0, r4, #2 + bl sub_0202987C + ldr r1, _0224C404 ; =0x022577AC + ldr r1, [r1, #0] + add r2, r1, r6 + ldr r1, _0224C410 ; =0x000012B6 + strh r0, [r2, r1] + add r0, r4, #2 + bl sub_02029884 + ldr r1, _0224C404 ; =0x022577AC + ldr r1, [r1, #0] + add r2, r1, r6 + ldr r1, _0224C414 ; =0x000012B8 + strb r0, [r2, r1] + bl ov23_0224C448 + ldr r1, _0224C404 ; =0x022577AC + add r0, r4, #2 + ldr r2, [r1, #0] + ldr r1, _0224C418 ; =0x00000A04 + add r2, r2, r1 + lsl r1, r5, #7 + add r1, r2, r1 + bl ov23_0224B39C + add r0, r5, #0 + bl ov23_0224DAD0 +_0224C402: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C404: .word 0x022577AC +_0224C408: .word 0x000013E2 +_0224C40C: .word 0x000012B4 +_0224C410: .word 0x000012B6 +_0224C414: .word 0x000012B8 +_0224C418: .word 0x00000A04 + thumb_func_end ov23_0224C384 + + thumb_func_start ov23_0224C41C +ov23_0224C41C: ; 0x0224C41C + mov r0, #0x96 + bx lr + thumb_func_end ov23_0224C41C + + thumb_func_start ov23_0224C420 +ov23_0224C420: ; 0x0224C420 + ldr r0, _0224C42C ; =0x022577AC + ldr r1, [r0, #0] + ldr r0, _0224C430 ; =0x000013E3 + ldrb r0, [r1, r0] + bx lr + nop +_0224C42C: .word 0x022577AC +_0224C430: .word 0x000013E3 + thumb_func_end ov23_0224C420 + + thumb_func_start ov23_0224C434 +ov23_0224C434: ; 0x0224C434 + ldr r0, _0224C440 ; =0x022577AC + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _0224C444 ; =0x000013E3 + strb r2, [r1, r0] + bx lr + ; .align 2, 0 +_0224C440: .word 0x022577AC +_0224C444: .word 0x000013E3 + thumb_func_end ov23_0224C434 + + thumb_func_start ov23_0224C448 +ov23_0224C448: ; 0x0224C448 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + ldr r7, _0224C4B4 ; =0x022577AC + mov ip, r4 + add r5, r4, #0 +_0224C452: + ldr r0, [r7, #0] + ldr r1, _0224C4B8 ; =0x000012B4 + add r2, r0, r1 + add r1, r0, r4 + ldrh r6, [r2, r5] + ldr r0, _0224C4BC ; =0x0000138B + add r3, r2, r5 + strb r6, [r1, r0] + ldrh r0, [r2, r5] + add r5, r5, #6 + asr r1, r0, #8 + mov r0, #0xf + add r2, r1, #0 + and r2, r0 + ldrh r0, [r3, #2] + asr r1, r0, #4 + mov r0, #0xf0 + and r0, r1 + add r2, r2, r0 + ldr r0, [r7, #0] + add r1, r0, r4 + ldr r0, _0224C4C0 ; =0x0000138C + strb r2, [r1, r0] + ldr r0, [r7, #0] + ldrh r2, [r3, #2] + add r1, r0, r4 + ldr r0, _0224C4C4 ; =0x0000138D + strb r2, [r1, r0] + ldr r1, [r7, #0] + ldrb r0, [r3, #4] + add r2, r1, r4 + ldr r1, _0224C4C8 ; =0x0000138E + add r4, r4, #4 + strb r0, [r2, r1] + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #8 + blt _0224C452 + ldr r1, _0224C4B4 ; =0x022577AC + mov r0, #0x37 + ldr r2, [r1, #0] + ldr r1, _0224C4BC ; =0x0000138B + add r1, r2, r1 + mov r2, #0x20 + bl sub_02035F00 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C4B4: .word 0x022577AC +_0224C4B8: .word 0x000012B4 +_0224C4BC: .word 0x0000138B +_0224C4C0: .word 0x0000138C +_0224C4C4: .word 0x0000138D +_0224C4C8: .word 0x0000138E + thumb_func_end ov23_0224C448 + + thumb_func_start ov23_0224C4CC +ov23_0224C4CC: ; 0x0224C4CC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r0, _0224C574 ; =0x022577AC + str r2, [sp] + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224C56E + mov r4, #0 +_0224C4DC: + add r0, r4, #0 + bl ov23_0224C6AC + add r4, r4, #1 + cmp r4, #8 + blt _0224C4DC + mov r5, #0 + add r7, r5, #0 + add r6, r5, #0 + add r4, sp, #4 +_0224C4F0: + ldr r0, _0224C574 ; =0x022577AC + ldr r1, [r0, #0] + ldr r0, _0224C578 ; =0x00001284 + add r0, r1, r0 + mov ip, r0 + ldr r0, [sp] + add r2, r0, r5 + ldrb r0, [r0, r5] + add r5, r5, #4 + strh r0, [r4] + ldrb r0, [r2, #1] + ldrh r3, [r4] + lsl r1, r0, #8 + mov r0, #0xf + lsl r0, r0, #8 + and r0, r1 + add r0, r3, r0 + strh r0, [r4] + ldrb r0, [r2, #1] + lsl r1, r0, #4 + mov r0, #0xf + lsl r0, r0, #8 + and r0, r1 + strh r0, [r4, #2] + ldrh r1, [r4, #2] + ldrb r0, [r2, #2] + add r0, r1, r0 + strh r0, [r4, #2] + ldrb r0, [r2, #3] + strb r0, [r4, #4] + ldrh r1, [r4] + ldr r0, _0224C57C ; =0x00000FFF + cmp r1, r0 + beq _0224C55C + add r0, sp, #4 + ldrh r1, [r0, #2] + ldr r0, _0224C57C ; =0x00000FFF + cmp r1, r0 + beq _0224C55C + mov r1, ip + add r0, sp, #4 + add r1, r1, r6 + mov r2, #6 + bl sub_020C4DB0 + add r0, sp, #4 + add r1, sp, #4 + add r2, sp, #4 + ldrh r0, [r0] + ldrh r1, [r1, #2] + ldrb r2, [r2, #4] + add r3, r7, #0 + bl ov23_0224C588 +_0224C55C: + add r7, r7, #1 + add r6, r6, #6 + cmp r7, #8 + blt _0224C4F0 + ldr r0, _0224C574 ; =0x022577AC + mov r2, #1 + ldr r1, [r0, #0] + ldr r0, _0224C580 ; =0x000013E3 + strb r2, [r1, r0] +_0224C56E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224C574: .word 0x022577AC +_0224C578: .word 0x00001284 +_0224C57C: .word 0x00000FFF +_0224C580: .word 0x000013E3 + thumb_func_end ov23_0224C4CC + + thumb_func_start ov23_0224C584 +ov23_0224C584: ; 0x0224C584 + mov r0, #0x20 + bx lr + thumb_func_end ov23_0224C584 + + thumb_func_start ov23_0224C588 +ov23_0224C588: ; 0x0224C588 + push {r3, r4, r5, r6} + ldr r5, _0224C5AC ; =0x022577AC + ldr r4, [r5, #0] + add r6, r4, r3 + ldr r4, _0224C5B0 ; =0x0000133A + strb r2, [r6, r4] + lsl r2, r3, #1 + ldr r3, [r5, #0] + add r6, r3, r2 + add r3, r4, #0 + sub r3, #0x44 + strh r0, [r6, r3] + ldr r0, [r5, #0] + sub r4, #0x22 + add r0, r0, r2 + strh r1, [r0, r4] + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_0224C5AC: .word 0x022577AC +_0224C5B0: .word 0x0000133A + thumb_func_end ov23_0224C588 + + thumb_func_start ov23_0224C5B4 +ov23_0224C5B4: ; 0x0224C5B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + ldr r0, _0224C690 ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224C694 ; =0x000013E4 + ldrb r1, [r2, r0] + cmp r1, #0 + bne _0224C68A + add r0, r0, #1 + ldrb r0, [r2, r0] + cmp r0, #0 + beq _0224C68A + ldr r0, [r2, #0] + ldr r0, [r0, #0x3c] + cmp r0, #0 + beq _0224C68A + bl sub_0205EABC + add r4, r0, #0 + ldr r0, _0224C690 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + bne _0224C68A + mov r5, #0 + add r4, r5, #0 +_0224C5F6: + cmp r5, #8 + bge _0224C610 + add r0, r5, #0 + bl sub_02032EE8 + cmp r0, #0 + bne _0224C610 + add r0, r5, #0 + bl ov23_0224B61C + add r0, r5, #0 + bl ov23_0224D87C +_0224C610: + ldr r0, _0224C690 ; =0x022577AC + ldr r1, [r0, #0] + ldr r0, _0224C698 ; =0x0000133A + add r2, r1, r5 + ldrb r6, [r2, r0] + cmp r6, #0xff + beq _0224C682 + ldr r3, _0224C69C ; =0x000012F6 + add r0, r1, r4 + ldrh r3, [r0, r3] + str r3, [sp, #8] + ldr r3, _0224C6A0 ; =0x00001318 + ldrh r7, [r0, r3] + add r0, r3, #0 + sub r0, #0x33 + ldrb r0, [r2, r0] + cmp r0, #0xff + beq _0224C63E + ldr r1, [r1, #0] + add r1, #0xa4 + ldr r1, [r1, #0] + bl ov5_021E1674 +_0224C63E: + ldr r0, [sp, #8] + ldr r2, _0224C6A4 ; =0x000001AD + lsl r1, r0, #0x10 + mov r0, #2 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #2 + lsl r1, r7, #0x10 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x14] + ldr r0, _0224C690 ; =0x022577AC + add r2, r6, r2 + ldr r0, [r0, #0] + add r3, sp, #0xc + ldr r1, [r0, #0] + mov r0, #0 + str r0, [sp] + ldr r0, [r1, #0x50] + str r0, [sp, #4] + add r0, r1, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r1, #0x30] + bl ov5_021E19CC + ldr r1, _0224C690 ; =0x022577AC + ldr r1, [r1, #0] + add r2, r1, r5 + ldr r1, _0224C6A8 ; =0x000012E5 + strb r0, [r2, r1] +_0224C682: + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #0x11 + blt _0224C5F6 +_0224C68A: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C690: .word 0x022577AC +_0224C694: .word 0x000013E4 +_0224C698: .word 0x0000133A +_0224C69C: .word 0x000012F6 +_0224C6A0: .word 0x00001318 +_0224C6A4: .word 0x000001AD +_0224C6A8: .word 0x000012E5 + thumb_func_end ov23_0224C5B4 + + thumb_func_start ov23_0224C6AC +ov23_0224C6AC: ; 0x0224C6AC + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224C6E0 ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224C6E4 ; =0x000012E5 + add r1, r2, r4 + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _0224C6DC + ldr r1, [r2, #0] + add r1, #0xa4 + ldr r1, [r1, #0] + bl ov5_021E1674 + ldr r1, _0224C6E0 ; =0x022577AC + mov r3, #0xff + ldr r0, [r1, #0] + add r2, r0, r4 + ldr r0, _0224C6E4 ; =0x000012E5 + strb r3, [r2, r0] + ldr r1, [r1, #0] + add r0, #0x55 + add r1, r1, r4 + strb r3, [r1, r0] +_0224C6DC: + pop {r4, pc} + nop +_0224C6E0: .word 0x022577AC +_0224C6E4: .word 0x000012E5 + thumb_func_end ov23_0224C6AC + + thumb_func_start ov23_0224C6E8 +ov23_0224C6E8: ; 0x0224C6E8 + push {r4, lr} + ldr r0, _0224C704 ; =0x022577AC + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224C700 + mov r4, #0 +_0224C6F4: + add r0, r4, #0 + bl ov23_0224C6AC + add r4, r4, #1 + cmp r4, #0x11 + blt _0224C6F4 +_0224C700: + pop {r4, pc} + nop +_0224C704: .word 0x022577AC + thumb_func_end ov23_0224C6E8 + + thumb_func_start ov23_0224C708 +ov23_0224C708: ; 0x0224C708 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _0224C726 + cmp r0, #1 + beq _0224C734 + b _0224C746 +_0224C726: + add r0, r5, #0 + bl sub_0203CD44 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224C746 +_0224C734: + add r0, r5, #0 + bl sub_0203CD4C + cmp r0, #0 + bne _0224C746 + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} +_0224C746: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224C708 + + thumb_func_start ov23_0224C74C +ov23_0224C74C: ; 0x0224C74C + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _0224C76A + cmp r0, #1 + beq _0224C778 + b _0224C78A +_0224C76A: + add r0, r5, #0 + bl sub_0203CD00 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + b _0224C78A +_0224C778: + add r0, r5, #0 + bl sub_020509DC + cmp r0, #0 + beq _0224C78A + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} +_0224C78A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224C74C + + thumb_func_start ov23_0224C790 +ov23_0224C790: ; 0x0224C790 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r6, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0xd + bhi _0224C882 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224C7B6: ; jump table + .short _0224C7D2 - _0224C7B6 - 2 ; case 0 + .short _0224C7FC - _0224C7B6 - 2 ; case 1 + .short _0224C82C - _0224C7B6 - 2 ; case 2 + .short _0224C842 - _0224C7B6 - 2 ; case 3 + .short _0224C854 - _0224C7B6 - 2 ; case 4 + .short _0224C878 - _0224C7B6 - 2 ; case 5 + .short _0224C88C - _0224C7B6 - 2 ; case 6 + .short _0224C8B6 - _0224C7B6 - 2 ; case 7 + .short _0224CA86 - _0224C7B6 - 2 ; case 8 + .short _0224C956 - _0224C7B6 - 2 ; case 9 + .short _0224C972 - _0224C7B6 - 2 ; case 10 + .short _0224C9AA - _0224C7B6 - 2 ; case 11 + .short _0224C9E0 - _0224C7B6 - 2 ; case 12 + .short _0224CA0A - _0224C7B6 - 2 ; case 13 +_0224C7D2: + mov r0, #0 + bl ov23_0224DBF4 + bl ov23_0224DC08 + bl sub_02035E18 + add r1, r4, #0 + add r1, #0x28 + strb r0, [r1] + bl sub_02035EC8 + bl ov23_022417CC + bl ov23_02249AB8 + cmp r0, #0 + beq _0224C882 + mov r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C7FC: + bl sub_0200F2C0 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #2 + mov r1, #0x10 + mov r2, #0x12 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r5, #0x6c] + bl ov23_0224942C + ldr r0, _0224CAD4 ; =0x00000603 + bl sub_02005748 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C82C: + bl sub_0200F2AC + cmp r0, #0 + beq _0224C882 + ldr r0, [r5, #0x6c] + cmp r0, #0 + bne _0224C882 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C842: + add r0, r6, #0 + bl ov23_0224C708 + cmp r0, #0 + beq _0224C882 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C854: + ldr r0, [r4, #0x14] + add r1, sp, #0xc + str r0, [sp, #0xc] + ldr r0, [r4, #0x18] + str r0, [sp, #0x10] + ldr r0, [r4, #0x1c] + str r0, [sp, #0x14] + ldr r0, [r4, #0x20] + str r0, [sp, #0x18] + ldr r0, [r4, #0x24] + str r0, [sp, #0x1c] + add r0, r6, #0 + bl sub_020544F0 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C878: + add r0, r6, #0 + bl ov23_0224C74C + cmp r0, #0 + bne _0224C884 +_0224C882: + b _0224CACC +_0224C884: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C88C: + add r0, r5, #0 + bl ov23_02249404 + str r0, [r5, #0x6c] + bl sub_0200F2C0 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x11 + mov r2, #0x13 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0224CACC +_0224C8B6: + bl sub_0200F2AC + cmp r0, #0 + beq _0224C98A + bl sub_02033DFC + cmp r0, #0 + beq _0224C8DC + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + bl ov23_02242E58 + cmp r0, #0 + bne _0224C8DC + add r0, r4, #0 + mov r1, #0 + add r0, #0x2e + strb r1, [r0] + b _0224C8E4 +_0224C8DC: + add r0, r4, #0 + mov r1, #1 + add r0, #0x2e + strb r1, [r0] +_0224C8E4: + bl sub_02035EA8 + bl sub_020594FC + mov r3, #0x80 + str r3, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0x32 + mov r1, #0x34 + mov r2, #0 + add r3, #0xc0 + bl sub_02006E84 + mov r0, #2 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #8] + ldr r2, _0224CAD8 ; =0x000003D9 + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r4, #0 + add r0, #0x2d + ldrb r0, [r0] + cmp r0, #0 + beq _0224C936 + bl sub_020594EC + bl ov23_0224219C + mov r2, #0 + mov r1, #0x33 + add r3, r2, #0 + bl ov23_02253F40 + mov r0, #8 + str r0, [r4, #0xc] + b _0224CACC +_0224C936: + ldr r0, _0224CADC ; =0x022577AC + ldr r1, [r0, #0] + ldr r0, _0224CAE0 ; =0x000013E6 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224C948 + mov r0, #0xd + str r0, [r4, #0xc] + b _0224CACC +_0224C948: + add r0, r4, #0 + mov r1, #0 + add r0, #0x29 + strb r1, [r0] + mov r0, #9 + str r0, [r4, #0xc] + b _0224CACC +_0224C956: + add r0, r4, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x29 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0x29 + strb r1, [r0] + mov r0, #0xa + str r0, [r4, #0xc] + b _0224CACC +_0224C972: + add r0, r4, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x29 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x29 + ldrb r0, [r0] + cmp r0, #0xa + bhi _0224C98C +_0224C98A: + b _0224CACC +_0224C98C: + bl sub_02033DFC + cmp r0, #0 + beq _0224C99E + add r0, r4, #0 + add r0, #0x2e + ldrb r0, [r0] + cmp r0, #0 + bne _0224C9A4 +_0224C99E: + mov r0, #0xd + str r0, [r4, #0xc] + b _0224CACC +_0224C9A4: + mov r0, #0xb + str r0, [r4, #0xc] + b _0224CACC +_0224C9AA: + bl sub_02059624 + mov r0, #1 + mov r1, #0x24 + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r5, #0x3c] + mov r2, #1 + bl sub_02061550 + mov r0, #1 + bl sub_020593F4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x44 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _0224CAE4 ; =0x00000604 + bl sub_02005748 + mov r0, #0xc + str r0, [r4, #0xc] + b _0224CACC +_0224C9E0: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224CACC + ldr r0, _0224CAE8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224CACC + mov r0, #0xd + str r0, [r4, #0xc] + bl ov23_0224219C + bl ov23_02254044 + mov r0, #0 + bl sub_020593F4 + b _0224CACC +_0224CA0A: + bl sub_02033DFC + cmp r0, #0 + beq _0224CA24 + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + bl ov23_02242E58 + cmp r0, #0 + bne _0224CA24 + bl ov23_02249AA4 + b _0224CA28 +_0224CA24: + bl ov23_02249B60 +_0224CA28: + mov r0, #0 + bl sub_02059638 + bl sub_02059514 + add r0, r4, #0 + bl sub_020181C4 + bl sub_02033DFC + cmp r0, #0 + beq _0224CA52 + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + bl ov23_02242E58 + cmp r0, #0 + beq _0224CA52 + bl ov23_02242FA8 + b _0224CA56 +_0224CA52: + bl ov23_02242FBC +_0224CA56: + ldr r0, _0224CADC ; =0x022577AC + ldr r2, _0224CAEC ; =0x000012E4 + ldr r0, [r0, #0] + ldrb r1, [r0, r2] + cmp r1, #4 + bne _0224CA70 + ldr r1, _0224CAE0 ; =0x000013E6 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _0224CA70 + mov r1, #6 + strb r1, [r0, r2] + b _0224CA76 +_0224CA70: + ldr r1, _0224CAEC ; =0x000012E4 + mov r2, #0 + strb r2, [r0, r1] +_0224CA76: + bl ov23_0224DC24 + mov r0, #1 + bl ov23_0224DBF4 + add sp, #0x20 + mov r0, #1 + pop {r4, r5, r6, pc} +_0224CA86: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224CAAE + ldr r0, _0224CAE8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224CAAE + mov r0, #0xd + str r0, [r4, #0xc] + bl ov23_0224219C + bl ov23_02254044 + add sp, #0x20 + mov r0, #0 + pop {r4, r5, r6, pc} +_0224CAAE: + bl sub_02035E18 + cmp r0, #1 + ble _0224CACC + add r0, r4, #0 + add r0, #0x28 + ldrb r0, [r0] + cmp r0, #0 + bne _0224CACC + mov r0, #0xd + str r0, [r4, #0xc] + bl ov23_0224219C + bl ov23_02254044 +_0224CACC: + mov r0, #0 + add sp, #0x20 + pop {r4, r5, r6, pc} + nop +_0224CAD4: .word 0x00000603 +_0224CAD8: .word 0x000003D9 +_0224CADC: .word 0x022577AC +_0224CAE0: .word 0x000013E6 +_0224CAE4: .word 0x00000604 +_0224CAE8: .word 0x021BF67C +_0224CAEC: .word 0x000012E4 + thumb_func_end ov23_0224C790 + + thumb_func_start ov23_0224CAF0 +ov23_0224CAF0: ; 0x0224CAF0 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r5, [sp, #0x18] + add r4, r0, #0 + str r5, [sp] + str r5, [sp, #4] + bl ov23_0224BCC4 + add r2, r0, #0 + beq _0224CB12 + ldr r1, [sp, #0x1c] + add r0, #0x2d + strb r1, [r0] + ldr r1, _0224CB18 ; =ov23_0224C790 + add r0, r4, #0 + bl sub_02050904 +_0224CB12: + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0224CB18: .word ov23_0224C790 + thumb_func_end ov23_0224CAF0 + + thumb_func_start ov23_0224CB1C +ov23_0224CB1C: ; 0x0224CB1C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + str r0, [sp, #4] + ldr r0, [r4, #0xc] + mov r7, #0 + ldr r5, [r4, #0] + cmp r0, #0xa + bhi _0224CBB0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224CB3A: ; jump table + .short _0224CB50 - _0224CB3A - 2 ; case 0 + .short _0224CB98 - _0224CB3A - 2 ; case 1 + .short _0224CBB8 - _0224CB3A - 2 ; case 2 + .short _0224CC04 - _0224CB3A - 2 ; case 3 + .short _0224CC4A - _0224CB3A - 2 ; case 4 + .short _0224CC64 - _0224CB3A - 2 ; case 5 + .short _0224CC88 - _0224CB3A - 2 ; case 6 + .short _0224CD04 - _0224CB3A - 2 ; case 7 + .short _0224CD04 - _0224CB3A - 2 ; case 8 + .short _0224CCAC - _0224CB3A - 2 ; case 9 + .short _0224CCC4 - _0224CB3A - 2 ; case 10 +_0224CB50: + ldr r0, [r5, #0xc] + bl sub_02029894 + bl sub_0202988C + strb r0, [r4, #0x12] + bl sub_020594FC + bl ov23_0224219C + mov r1, #0x21 + bl ov23_02254098 + ldr r0, _0224CD54 ; =0x0000061E + bl sub_02005748 + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r1, r7, #0 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021F58FC + bl ov23_0224219C + add r2, r7, #0 + mov r1, #0x21 + add r3, r2, #0 + bl ov23_02253F40 + mov r0, #1 + str r0, [r4, #0xc] + add r0, r7, #0 + strb r0, [r4, #0x11] + b _0224CD04 +_0224CB98: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224CBB0 + ldrb r0, [r4, #0x11] + add r0, r0, #1 + strb r0, [r4, #0x11] + ldrb r0, [r4, #0x11] + cmp r0, #0x1e + bhi _0224CBB2 +_0224CBB0: + b _0224CD04 +_0224CBB2: + mov r0, #2 + str r0, [r4, #0xc] + b _0224CD04 +_0224CBB8: + bl sub_0203608C + bl sub_02058D88 + add r6, r0, #0 + bl sub_0203608C + bl sub_02058DC0 + str r0, [sp, #8] + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + bl sub_02059328 + str r0, [sp, #0xc] + bl ov23_0224219C + add r2, r7, #0 + mov r1, #0x22 + add r3, r2, #0 + bl ov23_02253F40 + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + add r0, r6, #0 + mov r3, #0x10 + bl ov23_0224C588 + ldr r3, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov5_021F5634 + mov r0, #3 + str r0, [r4, #0xc] + b _0224CD04 +_0224CC04: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224CD04 + bl sub_0203608C + add r1, r7, #0 + bl ov23_0224BD1C + cmp r0, #0 + beq _0224CC26 + mov r0, #4 + mov r6, #0x39 + str r0, [r4, #0xc] + b _0224CC3A +_0224CC26: + ldrb r0, [r4, #0x12] + cmp r0, #0 + beq _0224CC34 + mov r0, #5 + mov r6, #0x24 + str r0, [r4, #0xc] + b _0224CC3A +_0224CC34: + mov r0, #5 + mov r6, #0x23 + str r0, [r4, #0xc] +_0224CC3A: + bl ov23_0224219C + mov r2, #0 + add r1, r6, #0 + add r3, r2, #0 + bl ov23_02253F40 + b _0224CD04 +_0224CC4A: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224CD04 + ldr r0, _0224CD58 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r1, r0 + beq _0224CD04 + add r7, r0, #0 + b _0224CD04 +_0224CC64: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224CD04 + mov r0, #4 + str r0, [sp] + ldr r0, [r5, #8] + ldr r1, _0224CD5C ; =0x02256864 + ldr r2, _0224CD60 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #8] + mov r0, #6 + str r0, [r4, #0xc] + b _0224CD04 +_0224CC88: + ldr r0, [r4, #8] + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224CC9E + mov r0, #9 + str r0, [r4, #0xc] + add r0, r7, #0 + str r0, [r4, #8] + b _0224CD04 +_0224CC9E: + sub r1, r7, #1 + cmp r0, r1 + beq _0224CD04 + mov r0, #0 + mov r7, #1 + str r0, [r4, #8] + b _0224CD04 +_0224CCAC: + mov r0, #0x21 + bl ov23_0224FD68 + bl ov23_0224219C + bl ov23_02254044 + bl ov23_02249A74 + mov r0, #0xa + str r0, [r4, #0xc] + b _0224CD04 +_0224CCC4: + bl sub_02033DFC + cmp r0, #0 + beq _0224CD04 + bl sub_0203608C + cmp r0, #0 + bne _0224CD04 + mov r1, #2 + add r0, sp, #0x10 + strb r1, [r0] + ldrb r1, [r4, #0x12] + cmp r1, #0 + beq _0224CCE4 + mov r1, #3 + strb r1, [r0] +_0224CCE4: + bl ov23_0224D238 + mov r0, #0x56 + add r1, sp, #0x10 + bl sub_020360D0 + ldr r0, [sp, #4] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + bl ov23_02243204 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_0224CD04: + cmp r7, #0 + beq _0224CD4E + bl ov23_0224219C + ldr r3, _0224CD64 ; =ov23_0224B654 + mov r1, #0x38 + mov r2, #1 + bl ov23_02253F40 + mov r0, #0x10 + bl ov23_0224C6AC + bl sub_0203608C + bl sub_02058D88 + add r6, r0, #0 + bl sub_0203608C + bl sub_02058DC0 + add r3, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov5_021F5634 + ldr r0, [sp, #4] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + bl ov23_02243204 + bl ov23_0224DC24 +_0224CD4E: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0224CD54: .word 0x0000061E +_0224CD58: .word 0x021BF67C +_0224CD5C: .word 0x02256864 +_0224CD60: .word 0x000003D9 +_0224CD64: .word ov23_0224B654 + thumb_func_end ov23_0224CB1C + + thumb_func_start ov23_0224CD68 +ov23_0224CD68: ; 0x0224CD68 + push {r3, lr} + mov r1, #0 + add r0, sp, #0 + strb r1, [r0] + mov r0, #0x56 + add r1, sp, #0 + bl sub_020360D0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224CD68 + + thumb_func_start ov23_0224CD7C +ov23_0224CD7C: ; 0x0224CD7C + mov r0, #2 + bx lr + thumb_func_end ov23_0224CD7C + + thumb_func_start ov23_0224CD80 +ov23_0224CD80: ; 0x0224CD80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + add r6, r2, #0 + bl sub_02058EE0 + add r4, r0, #0 + add r0, r7, #0 + bl sub_02058F18 + add r5, r0, #0 + add r0, r7, #0 + bl sub_02058F80 + str r0, [sp, #4] + add r0, r7, #0 + bl sub_02058DF8 + add r0, r7, #0 + bl sub_02058E4C + sub r0, r5, r0 + beq _0224CDBC + add r0, r4, #1 + str r0, [sp, #0x10] + sub r0, r4, #1 + str r0, [sp, #8] + str r5, [sp, #0xc] + str r5, [sp] + b _0224CDC8 +_0224CDBC: + add r0, r5, #1 + str r0, [sp, #0xc] + sub r0, r5, #1 + str r0, [sp] + str r4, [sp, #0x10] + str r4, [sp, #8] +_0224CDC8: + add r0, sp, #0x14 + strb r7, [r0] + ldrb r1, [r6] + cmp r1, #0 + bne _0224CDD6 + mov r1, #0 + b _0224CDD8 +_0224CDD6: + mov r1, #5 +_0224CDD8: + strb r1, [r0, #1] + add r0, r4, #0 + add r1, r5, #0 + bl ov23_0224B65C + ldrb r1, [r6] + cmp r1, #0 + bne _0224CDEC + cmp r0, #0xff + bne _0224CE82 +_0224CDEC: + add r0, r4, #0 + add r1, r5, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _0224CE00 + mov r1, #6 + add r0, sp, #0x14 + strb r1, [r0, #1] + b _0224CE82 +_0224CE00: + ldr r0, _0224CE90 ; =0x022577AC + add r1, r4, #0 + ldr r0, [r0, #0] + add r2, r5, #0 + ldr r0, [r0, #0] + bl sub_02054F68 + cmp r0, #0 + beq _0224CE82 + ldr r0, _0224CE90 ; =0x022577AC + ldr r1, [sp, #0x10] + ldr r0, [r0, #0] + ldr r2, [sp, #0xc] + ldr r0, [r0, #0] + bl sub_02054F68 + cmp r0, #0 + beq _0224CE82 + ldr r0, _0224CE90 ; =0x022577AC + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r2, [sp] + ldr r0, [r0, #0] + bl sub_02054F68 + cmp r0, #0 + beq _0224CE82 + ldrb r0, [r6] + cmp r0, #0 + bne _0224CE44 + mov r1, #1 + add r0, sp, #0x14 + strb r1, [r0, #1] + b _0224CE82 +_0224CE44: + ldr r2, [sp, #4] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #0x10 + bl ov23_0224C1EC + mov r0, #0x10 + add r1, r7, #0 + bl ov23_0224B79C + cmp r0, #0 + beq _0224CE82 + ldrb r0, [r6] + cmp r0, #1 + beq _0224CE6C + cmp r0, #2 + beq _0224CE7C + cmp r0, #3 + beq _0224CE74 + b _0224CE82 +_0224CE6C: + mov r1, #2 + add r0, sp, #0x14 + strb r1, [r0, #1] + b _0224CE82 +_0224CE74: + mov r1, #3 + add r0, sp, #0x14 + strb r1, [r0, #1] + b _0224CE82 +_0224CE7C: + mov r1, #4 + add r0, sp, #0x14 + strb r1, [r0, #1] +_0224CE82: + mov r0, #0x57 + add r1, sp, #0x14 + bl sub_02035B48 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224CE90: .word 0x022577AC + thumb_func_end ov23_0224CD80 + + thumb_func_start ov23_0224CE94 +ov23_0224CE94: ; 0x0224CE94 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x10 + bl ov23_0224C6AC + ldr r0, [r4, #8] + cmp r0, #0 + beq _0224CEAC + mov r1, #4 + bl sub_02002154 +_0224CEAC: + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + bl ov23_02243204 + bl sub_02059514 + bl ov23_0224DC24 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_0224CE94 + + thumb_func_start ov23_0224CEC8 +ov23_0224CEC8: ; 0x0224CEC8 + push {r4, lr} + bl ov23_0224DC08 + mov r0, #4 + mov r1, #0x14 + bl sub_02018184 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0xc] + bl sub_0203608C + strb r0, [r4, #0x10] + ldr r0, _0224CF0C ; =0x022577AC + add r1, r4, #0 + ldr r0, [r0, #0] + mov r2, #0x64 + ldr r0, [r0, #0] + str r0, [r4, #0] + ldr r0, _0224CF10 ; =ov23_0224CB1C + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r1, [r4, #4] + ldr r2, _0224CF14 ; =ov23_0224CE94 + add r0, r4, #0 + bl ov23_022431EC + pop {r4, pc} + nop +_0224CF0C: .word 0x022577AC +_0224CF10: .word ov23_0224CB1C +_0224CF14: .word ov23_0224CE94 + thumb_func_end ov23_0224CEC8 + + thumb_func_start ov23_0224CF18 +ov23_0224CF18: ; 0x0224CF18 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _0224D018 ; =0x022577AC + add r5, r2, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298A0 + ldrb r4, [r5] + add r7, r0, #0 + bl sub_0203608C + cmp r4, r0 + bne _0224D016 + ldrb r0, [r5, #1] + cmp r0, #0 + bne _0224CF54 + bl sub_020594FC + bl ov23_0224219C + ldr r3, _0224D01C ; =ov23_0224B654 + mov r1, #0x36 + mov r2, #1 + bl ov23_02253F40 + bl ov23_0224DC24 + pop {r3, r4, r5, r6, r7, pc} +_0224CF54: + cmp r0, #1 + bne _0224CF5E + bl ov23_0224CEC8 + pop {r3, r4, r5, r6, r7, pc} +_0224CF5E: + cmp r0, #6 + bne _0224CF7A + bl sub_020594FC + bl ov23_0224219C + ldr r3, _0224D01C ; =ov23_0224B654 + mov r1, #0x4a + mov r2, #1 + bl ov23_02253F40 + bl ov23_0224DC24 + pop {r3, r4, r5, r6, r7, pc} +_0224CF7A: + cmp r0, #5 + bne _0224CF9A + bl sub_020594FC + bl ov23_0224219C + ldr r3, _0224D01C ; =ov23_0224B654 + mov r1, #0x58 + mov r2, #1 + bl ov23_02253F40 + bl ov23_02249AA4 + bl ov23_0224DC24 + pop {r3, r4, r5, r6, r7, pc} +_0224CF9A: + add r0, #0xfe + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #2 + bhi _0224D016 + add r0, r4, #0 + bl sub_02058D88 + add r4, r0, #0 + ldrb r0, [r5] + bl sub_02058DC0 + add r6, r0, #0 + ldrb r0, [r5] + bl sub_02058F50 + str r0, [sp] + ldrb r3, [r5] + ldr r2, [sp] + add r0, r4, #0 + add r1, r6, #0 + bl ov23_0224C1EC + ldr r2, [sp] + add r0, r4, #0 + add r1, r6, #0 + mov r3, #0x10 + bl ov23_0224C1EC + ldrb r0, [r5, #1] + cmp r0, #3 + bne _0224CFE0 + add r0, r7, #0 + bl sub_02029824 +_0224CFE0: + ldrb r0, [r5, #1] + add r0, #0xfd + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bhi _0224D016 + mov r0, #0xb + bl sub_0202BE20 + add r1, r0, #0 + ldr r0, _0224D018 ; =0x022577AC + mov r2, #1 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + add r0, #0x9c + ldr r0, [r0, #0] + bl sub_0202B758 + ldr r0, _0224D018 ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x23 + bl sub_0202CFEC +_0224D016: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D018: .word 0x022577AC +_0224D01C: .word ov23_0224B654 + thumb_func_end ov23_0224CF18 + + thumb_func_start ov23_0224D020 +ov23_0224D020: ; 0x0224D020 + push {r3, r4, r5, r6, r7, lr} + ldr r4, _0224D11C ; =0x022577AC + add r6, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0224D030 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224D030: + mov r5, #0 +_0224D032: + ldr r0, [r4, #0] + ldr r1, _0224D120 ; =0x0000137B + add r0, r0, r5 + ldrb r7, [r0, r1] + cmp r7, #0xff + beq _0224D068 + mov r2, #0xff + strb r2, [r0, r1] + cmp r5, r7 + beq _0224D068 + add r0, r5, #0 + bl sub_02032EE8 + str r0, [sp] + add r0, r7, #0 + bl sub_02032EE8 + add r1, r0, #0 + ldr r0, [sp] + mov r2, #0x68 + add r3, r6, #0 + bl ov23_0224223C + cmp r0, #0 + beq _0224D068 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224D068: + ldr r0, [r4, #0] + add r1, r0, r5 + ldr r0, _0224D124 ; =0x0000134B + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _0224D0A6 + add r0, r5, #0 + bl sub_02032EE8 + add r7, r0, #0 + ldr r0, [r4, #0] + add r1, r0, r5 + ldr r0, _0224D124 ; =0x0000134B + ldrb r0, [r1, r0] + bl sub_02032EE8 + add r1, r0, #0 + ldr r0, [r4, #0] + mov r2, #0xff + add r3, r0, r5 + ldr r0, _0224D124 ; =0x0000134B + strb r2, [r3, r0] + add r0, r7, #0 + mov r2, #0x6c + add r3, r6, #0 + bl ov23_0224223C + cmp r0, #0 + beq _0224D0A6 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224D0A6: + ldr r0, [r4, #0] + add r1, r0, r5 + ldr r0, _0224D128 ; =0x0000135B + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _0224D0D6 + add r0, r5, #0 + bl sub_02032EE8 + ldr r2, _0224D11C ; =0x022577AC + mov r1, #0xff + ldr r2, [r2, #0] + add r3, r2, r5 + ldr r2, _0224D128 ; =0x0000135B + strb r1, [r3, r2] + mov r1, #0 + mov r2, #0x6d + add r3, r6, #0 + bl ov23_022422A8 + cmp r0, #0 + beq _0224D116 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224D0D6: + ldr r0, _0224D12C ; =0x00001353 + ldrb r0, [r1, r0] + cmp r0, #0xff + beq _0224D110 + add r0, r5, #0 + bl sub_02032EE8 + add r7, r0, #0 + ldr r0, [r4, #0] + add r1, r0, r5 + ldr r0, _0224D12C ; =0x00001353 + ldrb r0, [r1, r0] + bl sub_02032EE8 + add r1, r0, #0 + ldr r0, [r4, #0] + mov r2, #0xff + add r3, r0, r5 + ldr r0, _0224D12C ; =0x00001353 + strb r2, [r3, r0] + add r0, r7, #0 + mov r2, #0x6e + add r3, r6, #0 + bl ov23_0224223C + cmp r0, #0 + beq _0224D110 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224D110: + add r5, r5, #1 + cmp r5, #8 + blt _0224D032 +_0224D116: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D11C: .word 0x022577AC +_0224D120: .word 0x0000137B +_0224D124: .word 0x0000134B +_0224D128: .word 0x0000135B +_0224D12C: .word 0x00001353 + thumb_func_end ov23_0224D020 + + thumb_func_start ov23_0224D130 +ov23_0224D130: ; 0x0224D130 + ldr r0, _0224D14C ; =0x022577AC + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224D146 + mov r0, #0xa + lsl r0, r0, #8 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224D146 + add r0, r0, #2 + bx lr +_0224D146: + mov r0, #0 + bx lr + nop +_0224D14C: .word 0x022577AC + thumb_func_end ov23_0224D130 + + thumb_func_start ov23_0224D150 +ov23_0224D150: ; 0x0224D150 + ldr r0, _0224D170 ; =0x022577AC + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224D16A + mov r0, #0xa + lsl r0, r0, #8 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224D16A + ldrb r1, [r0] + ldr r0, _0224D174 ; =0x0225760C + ldrb r0, [r0, r1] + bx lr +_0224D16A: + mov r0, #0 + bx lr + nop +_0224D170: .word 0x022577AC +_0224D174: .word 0x0225760C + thumb_func_end ov23_0224D150 + + thumb_func_start ov23_0224D178 +ov23_0224D178: ; 0x0224D178 + ldr r0, _0224D198 ; =0x022577AC + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224D192 + mov r0, #0xa + lsl r0, r0, #8 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0224D192 + ldrb r1, [r0] + ldr r0, _0224D19C ; =0x02257620 + ldrb r0, [r0, r1] + bx lr +_0224D192: + mov r0, #0 + bx lr + nop +_0224D198: .word 0x022577AC +_0224D19C: .word 0x02257620 + thumb_func_end ov23_0224D178 + + thumb_func_start ov23_0224D1A0 +ov23_0224D1A0: ; 0x0224D1A0 + push {r4, r5, r6, r7} + add r7, r0, #0 + ldr r0, _0224D228 ; =0x022577AC + add r5, r1, #0 + ldr r0, [r0, #0] + mov ip, r0 + cmp r0, #0 + bne _0224D1B6 + mov r0, #1 + pop {r4, r5, r6, r7} + bx lr +_0224D1B6: + cmp r5, #0x40 + blt _0224D1C0 + mov r0, #1 + pop {r4, r5, r6, r7} + bx lr +_0224D1C0: + asr r0, r7, #4 + asr r1, r5, #4 + lsr r0, r0, #0x1b + lsr r1, r1, #0x1b + add r0, r7, r0 + add r1, r5, r1 + ldr r3, _0224D22C ; =0x0225760C + ldr r4, _0224D230 ; =0x02257620 + asr r0, r0, #5 + asr r1, r1, #5 + mov r2, #0 +_0224D1D6: + ldrb r6, [r3] + cmp r0, r6 + bne _0224D216 + ldrb r6, [r4] + cmp r1, r6 + bne _0224D216 + lsr r4, r7, #0x1f + lsl r3, r7, #0x1b + sub r3, r3, r4 + mov r1, #0x1b + ror r3, r1 + mov r0, #1 + add r4, r4, r3 + add r3, r0, #0 + lsl r3, r4 + lsl r4, r2, #7 + mov r2, ip + add r2, r2, r4 + lsr r6, r5, #0x1f + lsl r4, r5, #0x1b + sub r4, r4, r6 + ror r4, r1 + add r1, r6, r4 + lsl r1, r1, #2 + add r2, r2, r1 + ldr r1, _0224D234 ; =0x00000A04 + ldr r1, [r2, r1] + tst r1, r3 + bne _0224D222 + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr +_0224D216: + add r2, r2, #1 + add r3, r3, #1 + add r4, r4, #1 + cmp r2, #0x11 + blt _0224D1D6 + mov r0, #1 +_0224D222: + pop {r4, r5, r6, r7} + bx lr + nop +_0224D228: .word 0x022577AC +_0224D22C: .word 0x0225760C +_0224D230: .word 0x02257620 +_0224D234: .word 0x00000A04 + thumb_func_end ov23_0224D1A0 + + thumb_func_start ov23_0224D238 +ov23_0224D238: ; 0x0224D238 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xb0 + ldr r0, _0224D38C ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_02029894 + str r0, [sp, #0xc] + ldr r0, _0224D38C ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0203D174 + bl sub_020298B0 + add r4, r0, #0 + mov r0, #0 + bl sub_02058EE0 + str r0, [sp, #8] + mov r0, #0 + bl sub_02058F18 + str r0, [sp, #4] + mov r0, #0 + bl sub_02058F80 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #0x28] + mov r0, #0xc + str r0, [sp, #0x2c] + ldr r0, _0224D38C ; =0x022577AC + ldr r0, [r0, #0] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206AA20 + ldr r0, [sp, #0xc] + bl sub_020292CC + add r0, r4, #0 + bl sub_02028B34 + add r0, sp, #0x10 + bl sub_020361BC + mov r4, #0 +_0224D2A0: + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + bl sub_020E1F1C + ldr r2, [sp, #0x20] + ldr r6, [sp, #0x24] + add r7, r2, r0 + adc r6, r1 + mov r1, #0 + add r0, r6, #0 + mov r2, #5 + mov r3, #0 + str r7, [sp, #0x10] + str r6, [sp, #0x14] + bl sub_020E1F1C + cmp r1, #2 + bge _0224D2CE + lsl r5, r1, #1 + add r5, #0xa + b _0224D2D4 +_0224D2CE: + sub r0, r1, #3 + lsl r5, r0, #1 + add r5, #0x12 +_0224D2D4: + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x1c] + add r2, r7, #0 + add r3, r6, #0 + bl sub_020E1F1C + ldr r2, [sp, #0x20] + ldr r3, [sp, #0x24] + add r0, r2, r0 + adc r3, r1 + str r0, [sp, #0x10] + str r3, [sp, #0x14] + add r0, r3, #0 + mov r1, #0 + mov r2, #6 + mov r3, #0 + bl sub_020E1F1C + lsl r6, r1, #1 + add r6, #0xc + mov r0, #1 + mov r1, #0 + cmp r4, #0 + blt _0224D31E + add r2, sp, #0x28 +_0224D306: + ldr r3, [r2, #0] + cmp r5, r3 + bne _0224D316 + ldr r3, [r2, #4] + cmp r6, r3 + bne _0224D316 + mov r0, #0 + b _0224D31E +_0224D316: + add r1, r1, #1 + add r2, #8 + cmp r1, r4 + ble _0224D306 +_0224D31E: + cmp r0, #0 + bne _0224D326 + sub r4, r4, #1 + b _0224D33E +_0224D326: + add r1, r4, #0 + ldr r0, [sp, #0xc] + add r1, #0x10 + add r2, r5, #0 + add r3, r6, #0 + bl sub_02029364 + add r1, sp, #0x28 + lsl r0, r4, #3 + add r0, r1, r0 + str r5, [r0, #8] + str r6, [r0, #0xc] +_0224D33E: + add r4, r4, #1 + cmp r4, #0x10 + blt _0224D2A0 + ldr r0, _0224D38C ; =0x022577AC + mov r2, #0x22 + ldr r1, [r0, #0] + ldr r0, _0224D390 ; =0x00000A04 + lsl r2, r2, #6 + add r0, r1, r0 + mov r1, #0xff + bl sub_020C4CF4 + ldr r0, [sp] + bl sub_02059328 + add r3, r0, #0 + ldr r0, [sp, #0xc] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + bl sub_02029854 + ldr r1, _0224D38C ; =0x022577AC + ldr r0, [sp, #0xc] + ldr r2, [r1, #0] + ldr r1, _0224D394 ; =0x0000096A + add r1, r2, r1 + mov r2, #0x94 + bl sub_020C4DB0 + ldr r1, _0224D38C ; =0x022577AC + ldr r0, [sp, #0xc] + ldr r2, [r1, #0] + ldr r1, _0224D398 ; =0x00001204 + add r1, r2, r1 + bl ov23_0224B39C + add sp, #0xb0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D38C: .word 0x022577AC +_0224D390: .word 0x00000A04 +_0224D394: .word 0x0000096A +_0224D398: .word 0x00001204 + thumb_func_end ov23_0224D238 + + thumb_func_start ov23_0224D39C +ov23_0224D39C: ; 0x0224D39C + push {r4, lr} + add r4, r0, #0 + bl ov23_022421CC + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F40 + pop {r4, pc} + thumb_func_end ov23_0224D39C + + thumb_func_start ov23_0224D3B0 +ov23_0224D3B0: ; 0x0224D3B0 + push {r3, lr} + bl ov23_022421CC + bl ov23_02254044 + pop {r3, pc} + thumb_func_end ov23_0224D3B0 + + thumb_func_start ov23_0224D3BC +ov23_0224D3BC: ; 0x0224D3BC + push {r4, lr} + add r4, r0, #0 + bl ov23_022421CC + mov r1, #0 + add r2, r4, #0 + bl ov23_022541C8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224D3BC + + thumb_func_start ov23_0224D3D0 +ov23_0224D3D0: ; 0x0224D3D0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov23_022421CC + add r1, r4, #0 + add r2, r5, #0 + bl ov23_02254154 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224D3D0 + + thumb_func_start ov23_0224D3E4 +ov23_0224D3E4: ; 0x0224D3E4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + str r1, [sp] + str r2, [sp, #4] + mov r4, #0 +_0224D3F0: + add r0, r5, #0 + add r1, r4, #0 + bl sub_020293B0 + str r0, [sp, #8] + cmp r0, #0 + beq _0224D448 + cmp r4, #0 + beq _0224D448 + cmp r4, #0x10 + bge _0224D448 + bl sub_0205741C + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_020293FC + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202942C + ldr r1, [sp] + ldr r2, [sp, #4] + sub r1, r1, r7 + sub r2, r2, r0 + cmp r1, #0 + blt _0224D448 + cmp r1, #2 + bgt _0224D448 + cmp r2, #0 + blt _0224D448 + cmp r2, #2 + bgt _0224D448 + lsl r0, r2, #1 + add r2, r2, r0 + add r0, r6, r1 + ldrb r0, [r2, r0] + cmp r0, #0 + beq _0224D448 + ldr r0, [sp, #8] + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0224D448: + add r4, r4, #1 + cmp r4, #0x20 + blt _0224D3F0 + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov23_0224D3E4 + + thumb_func_start ov23_0224D454 +ov23_0224D454: ; 0x0224D454 + push {r3, r4, r5, r6, lr} + sub sp, #4 + ldrh r4, [r1] + ldrh r6, [r1, #2] + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov23_0224D1A0 + cmp r0, #0 + bne _0224D4C0 + add r0, sp, #0 + strb r5, [r0] + add r0, r4, #0 + add r1, r6, #0 + bl ov23_0224B05C + ldr r1, _0224D4C8 ; =0x022577AC + mov r3, #0x1b + ldr r2, [r1, #0] + mov r1, #0x96 + add r2, #0xa + mul r1, r0 + add r0, r2, r1 + lsr r2, r4, #0x1f + lsl r1, r4, #0x1b + sub r1, r1, r2 + ror r1, r3 + add r1, r2, r1 + lsr r4, r6, #0x1f + lsl r2, r6, #0x1b + sub r2, r2, r4 + ror r2, r3 + add r2, r4, r2 + bl ov23_0224D3E4 + bl sub_0205746C + add r1, sp, #0 + strb r0, [r1, #1] + ldrb r0, [r1, #1] + cmp r0, #0 + beq _0224D4C0 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + mov r0, #0x3c + add r1, sp, #0 + bl sub_02035B48 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0224D4C0: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0224D4C8: .word 0x022577AC + thumb_func_end ov23_0224D454 + + thumb_func_start ov23_0224D4CC +ov23_0224D4CC: ; 0x0224D4CC + push {r3, r4, r5, lr} + ldr r0, _0224D4F8 ; =0x022577AC + add r5, r2, #0 + ldr r1, [r0, #0] + mov r0, #0xa + lsl r0, r0, #8 + ldr r0, [r1, r0] + add r0, r0, #2 + bl sub_020298AC + add r4, r0, #0 + bl sub_0203608C + ldrb r1, [r5] + cmp r1, r0 + bne _0224D4F4 + ldrb r1, [r5, #1] + add r0, r4, #0 + bl ov23_02253A00 +_0224D4F4: + pop {r3, r4, r5, pc} + nop +_0224D4F8: .word 0x022577AC + thumb_func_end ov23_0224D4CC + + thumb_func_start ov23_0224D4FC +ov23_0224D4FC: ; 0x0224D4FC + mov r0, #2 + bx lr + thumb_func_end ov23_0224D4FC + + thumb_func_start ov23_0224D500 +ov23_0224D500: ; 0x0224D500 + ldr r2, _0224D510 ; =0x022577AC + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224D50E + add r2, r2, r0 + ldr r0, _0224D514 ; =0x0000134B + strb r1, [r2, r0] +_0224D50E: + bx lr + ; .align 2, 0 +_0224D510: .word 0x022577AC +_0224D514: .word 0x0000134B + thumb_func_end ov23_0224D500 + + thumb_func_start ov23_0224D518 +ov23_0224D518: ; 0x0224D518 + ldr r2, _0224D528 ; =0x022577AC + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224D526 + add r2, r2, r0 + ldr r0, _0224D52C ; =0x00001353 + strb r1, [r2, r0] +_0224D526: + bx lr + ; .align 2, 0 +_0224D528: .word 0x022577AC +_0224D52C: .word 0x00001353 + thumb_func_end ov23_0224D518 + + thumb_func_start ov23_0224D530 +ov23_0224D530: ; 0x0224D530 + ldr r1, _0224D544 ; =0x022577AC + ldr r1, [r1, #0] + cmp r1, #0 + beq _0224D540 + add r1, r1, r0 + ldr r0, _0224D548 ; =0x0000135B + mov r2, #1 + strb r2, [r1, r0] +_0224D540: + bx lr + nop +_0224D544: .word 0x022577AC +_0224D548: .word 0x0000135B + thumb_func_end ov23_0224D530 + + thumb_func_start ov23_0224D54C +ov23_0224D54C: ; 0x0224D54C + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, _0224D5A0 ; =0x022577AC + mov r1, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + add r0, #0xa4 + ldr r0, [r0, #0] + bl ov5_021E18C4 + add r1, r0, #0 + add r0, sp, #8 + bl ov5_021E1894 + ldr r1, _0224D5A0 ; =0x022577AC + mov r0, #0 + ldr r1, [r1, #0] + ldr r1, [r1, #0] + add r1, #0xa4 + ldr r1, [r1, #0] + bl ov5_021E1674 + ldr r0, _0224D5A0 ; =0x022577AC + ldr r2, _0224D5A4 ; =0x0000013D + ldr r0, [r0, #0] + ldr r1, [r0, #0] + mov r0, #0 + str r0, [sp] + ldr r0, [r1, #0x50] + str r0, [sp, #4] + add r0, r1, #0 + ldrb r3, [r4, #5] + add r0, #0xa4 + ldr r0, [r0, #0] + add r2, r3, r2 + ldr r1, [r1, #0x30] + add r3, sp, #8 + bl ov5_021E19CC + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_0224D5A0: .word 0x022577AC +_0224D5A4: .word 0x0000013D + thumb_func_end ov23_0224D54C + + thumb_func_start ov23_0224D5A8 +ov23_0224D5A8: ; 0x0224D5A8 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224D5A8 + + thumb_func_start ov23_0224D5BC +ov23_0224D5BC: ; 0x0224D5BC + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #4 + bhi _0224D68A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224D5D6: ; jump table + .short _0224D5E0 - _0224D5D6 - 2 ; case 0 + .short _0224D600 - _0224D5D6 - 2 ; case 1 + .short _0224D62E - _0224D5D6 - 2 ; case 2 + .short _0224D65E - _0224D5D6 - 2 ; case 3 + .short _0224D67A - _0224D5D6 - 2 ; case 4 +_0224D5E0: + bl sub_020594FC + bl ov23_022421AC + mov r2, #0 + mov r1, #7 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _0224D690 ; =0x000005E3 + bl sub_02005748 + mov r0, #1 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, pc} +_0224D600: + bl ov23_022421AC + bl ov23_02254238 + cmp r0, #0 + bne _0224D68A + ldr r0, _0224D694 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224D68A + bl ov23_022421AC + ldrb r1, [r4, #5] + mov r2, #0 + add r3, r2, #0 + add r1, #0xe + bl ov23_02253F40 + mov r0, #2 + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, pc} +_0224D62E: + bl ov23_022421AC + bl ov23_02254238 + cmp r0, #0 + bne _0224D68A + ldr r0, _0224D694 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224D68A + add r0, r4, #0 + bl ov23_0224D54C + mov r0, #4 + str r0, [r4, #0] + bl ov23_022421AC + bl ov23_02254044 + bl sub_02059514 + add sp, #0xc + pop {r4, r5, pc} +_0224D65E: + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + add sp, #0xc + pop {r4, r5, pc} +_0224D67A: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + bl ov23_02243204 +_0224D68A: + add sp, #0xc + pop {r4, r5, pc} + nop +_0224D690: .word 0x000005E3 +_0224D694: .word 0x021BF67C + thumb_func_end ov23_0224D5BC + + thumb_func_start ov23_0224D698 +ov23_0224D698: ; 0x0224D698 + push {r3, lr} + add r1, sp, #0 + strb r0, [r1] + ldrb r0, [r2] + strb r0, [r1, #1] + mov r0, #0x61 + add r1, sp, #0 + bl sub_02035B48 + pop {r3, pc} + thumb_func_end ov23_0224D698 + + thumb_func_start ov23_0224D6AC +ov23_0224D6AC: ; 0x0224D6AC + push {r3, r4, r5, lr} + add r5, r2, #0 + bl sub_0203608C + ldrb r1, [r5] + cmp r1, r0 + bne _0224D6E8 + mov r0, #0xb + mov r1, #8 + bl sub_02018144 + mov r1, #0 + mov r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0] + ldrb r0, [r5, #1] + add r1, r4, #0 + mov r2, #0x64 + strb r0, [r4, #5] + ldr r0, _0224D6EC ; =ov23_0224D5BC + bl sub_0200D9E8 + add r1, r0, #0 + ldr r2, _0224D6F0 ; =ov23_0224D5A8 + add r0, r4, #0 + bl ov23_022431EC +_0224D6E8: + pop {r3, r4, r5, pc} + nop +_0224D6EC: .word ov23_0224D5BC +_0224D6F0: .word ov23_0224D5A8 + thumb_func_end ov23_0224D6AC + + thumb_func_start ov23_0224D6F4 +ov23_0224D6F4: ; 0x0224D6F4 + mov r0, #2 + bx lr + thumb_func_end ov23_0224D6F4 + + thumb_func_start ov23_0224D6F8 +ov23_0224D6F8: ; 0x0224D6F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp] + mov r4, #0 +_0224D704: + add r0, r5, #0 + add r1, r4, #0 + bl sub_020293B0 + str r0, [sp, #4] + cmp r0, #0 + beq _0224D744 + cmp r4, #0 + beq _0224D744 + cmp r4, #0x10 + bge _0224D744 + bl sub_0205741C + add r0, r5, #0 + add r1, r4, #0 + bl sub_020293FC + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202942C + ldr r1, [sp] + sub r2, r7, r6 + sub r0, r1, r0 + cmp r2, #0 + bne _0224D744 + cmp r0, #0 + bne _0224D744 + ldr r0, [sp, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0224D744: + add r4, r4, #1 + cmp r4, #0x20 + blt _0224D704 + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0224D6F8 + + thumb_func_start ov23_0224D750 +ov23_0224D750: ; 0x0224D750 + sub r0, #0x38 + cmp r0, #0xf + bhi _0224D7C2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224D762: ; jump table + .short _0224D782 - _0224D762 - 2 ; case 0 + .short _0224D786 - _0224D762 - 2 ; case 1 + .short _0224D78A - _0224D762 - 2 ; case 2 + .short _0224D78E - _0224D762 - 2 ; case 3 + .short _0224D792 - _0224D762 - 2 ; case 4 + .short _0224D796 - _0224D762 - 2 ; case 5 + .short _0224D79A - _0224D762 - 2 ; case 6 + .short _0224D79E - _0224D762 - 2 ; case 7 + .short _0224D7A2 - _0224D762 - 2 ; case 8 + .short _0224D7A6 - _0224D762 - 2 ; case 9 + .short _0224D7AA - _0224D762 - 2 ; case 10 + .short _0224D7AE - _0224D762 - 2 ; case 11 + .short _0224D7B2 - _0224D762 - 2 ; case 12 + .short _0224D7B6 - _0224D762 - 2 ; case 13 + .short _0224D7BA - _0224D762 - 2 ; case 14 + .short _0224D7BE - _0224D762 - 2 ; case 15 +_0224D782: + mov r0, #0xb + bx lr +_0224D786: + mov r0, #0xc + bx lr +_0224D78A: + mov r0, #0x12 + bx lr +_0224D78E: + mov r0, #0x13 + bx lr +_0224D792: + mov r0, #0x14 + bx lr +_0224D796: + mov r0, #0x15 + bx lr +_0224D79A: + mov r0, #0x16 + bx lr +_0224D79E: + mov r0, #0x17 + bx lr +_0224D7A2: + mov r0, #0x18 + bx lr +_0224D7A6: + mov r0, #0x19 + bx lr +_0224D7AA: + mov r0, #0x1a + bx lr +_0224D7AE: + mov r0, #0x1b + bx lr +_0224D7B2: + mov r0, #0x1c + bx lr +_0224D7B6: + mov r0, #0x1d + bx lr +_0224D7BA: + mov r0, #0x1e + bx lr +_0224D7BE: + mov r0, #0x1f + bx lr +_0224D7C2: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov23_0224D750 + + thumb_func_start ov23_0224D7C8 +ov23_0224D7C8: ; 0x0224D7C8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02058DF8 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02058E4C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02058F80 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + bne _0224D7F6 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0224D7F6: + add r0, r6, #0 + add r1, r4, #0 + bl ov23_0224D1A0 + cmp r0, #1 + bne _0224D86E + ldr r0, _0224D874 ; =0x022577AC + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _0224D878 ; =0x00001383 + ldrb r0, [r1, r0] + cmp r0, #0 + bne _0224D86E + add r0, r6, #0 + add r1, r4, #0 + bl ov23_0224B05C + ldr r1, _0224D874 ; =0x022577AC + lsr r3, r6, #0x1f + ldr r2, [r1, #0] + mov r1, #0x96 + add r2, #0xa + mul r1, r0 + add r0, r2, r1 + lsl r2, r6, #0x1b + sub r2, r2, r3 + mov r1, #0x1b + ror r2, r1 + add r1, r3, r2 + lsr r3, r4, #0x1f + lsl r7, r4, #0x1b + sub r7, r7, r3 + mov r2, #0x1b + ror r7, r2 + add r2, r3, r7 + bl ov23_0224D6F8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl ov23_0224D750 + add r2, r0, #0 + beq _0224D86E + ldr r1, _0224D874 ; =0x022577AC + mov r0, #1 + ldr r1, [r1, #0] + add r3, r1, r5 + ldr r1, _0224D878 ; =0x00001383 + strb r0, [r3, r1] + ldr r0, [sp, #8] + str r4, [sp] + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0xff + add r3, r6, #0 + bl ov23_022443CC + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0224D86E: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D874: .word 0x022577AC +_0224D878: .word 0x00001383 + thumb_func_end ov23_0224D7C8 + + thumb_func_start ov23_0224D87C +ov23_0224D87C: ; 0x0224D87C + ldr r1, _0224D890 ; =0x022577AC + ldr r1, [r1, #0] + cmp r1, #0 + beq _0224D88C + add r1, r1, r0 + ldr r0, _0224D894 ; =0x00001383 + mov r2, #0 + strb r2, [r1, r0] +_0224D88C: + mov r0, #0 + bx lr + ; .align 2, 0 +_0224D890: .word 0x022577AC +_0224D894: .word 0x00001383 + thumb_func_end ov23_0224D87C + + thumb_func_start ov23_0224D898 +ov23_0224D898: ; 0x0224D898 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r0, sp, #4 + mov r1, #0 + mov r2, #8 + bl sub_020C4CF4 + mov r4, #0 + add r5, sp, #4 +_0224D8AA: + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0224D926 + add r0, r4, #0 + bl sub_02058DF8 + str r0, [sp] + add r0, r4, #0 + bl sub_02058E4C + add r7, r0, #0 + ldr r1, [sp] + ldr r0, _0224D998 ; =0x0000FFFF + cmp r1, r0 + bne _0224D8D2 + cmp r7, r0 + beq _0224D926 +_0224D8D2: + ldr r0, [sp] + add r1, r7, #0 + bl ov23_0224B05C + add r6, r0, #0 + cmp r4, r6 + beq _0224D926 + cmp r6, #0x10 + beq _0224D926 + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + bne _0224D926 + ldr r0, _0224D99C ; =0x022577AC + ldr r1, _0224D9A0 ; =0x0000136B + ldr r0, [r0, #0] + add r0, r0, r4 + ldrb r1, [r0, r1] + cmp r1, #0xff + bne _0224D926 + ldr r1, _0224D9A4 ; =0x00001373 + ldrb r0, [r0, r1] + cmp r0, #0xff + bne _0224D926 + ldr r0, [sp] + add r1, r7, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _0224D926 + ldrb r0, [r5] + cmp r0, #0 + bne _0224D926 + add r0, r6, #0 + add r1, r4, #0 + mov r2, #1 + bl ov23_0224B844 + mov r0, #1 + strb r0, [r5] +_0224D926: + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #8 + blt _0224D8AA + bl sub_0203608C + ldr r1, _0224D99C ; =0x022577AC + add r4, r0, #0 + ldr r2, [r1, #0] + ldr r1, _0224D9A8 ; =0x000012E4 + ldrb r1, [r2, r1] + cmp r1, #6 + bne _0224D992 + bl sub_02058DF8 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02058E4C + add r5, r0, #0 + ldr r0, _0224D998 ; =0x0000FFFF + cmp r6, r0 + bne _0224D958 + cmp r5, r0 + beq _0224D980 +_0224D958: + add r0, r6, #0 + add r1, r5, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _0224D980 + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224B05C + add r5, sp, #4 + ldrb r1, [r5, r4] + cmp r1, #0 + bne _0224D980 + add r1, r4, #0 + mov r2, #1 + bl ov23_0224B844 + mov r0, #1 + strb r0, [r5, r4] +_0224D980: + add r0, sp, #4 + ldrb r0, [r0, r4] + cmp r0, #0 + beq _0224D992 + ldr r0, _0224D99C ; =0x022577AC + mov r2, #0 + ldr r1, [r0, #0] + ldr r0, _0224D9A8 ; =0x000012E4 + strb r2, [r1, r0] +_0224D992: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224D998: .word 0x0000FFFF +_0224D99C: .word 0x022577AC +_0224D9A0: .word 0x0000136B +_0224D9A4: .word 0x00001373 +_0224D9A8: .word 0x000012E4 + thumb_func_end ov23_0224D898 + + thumb_func_start ov23_0224D9AC +ov23_0224D9AC: ; 0x0224D9AC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _0224DA7C ; =0x022577AC + str r1, [sp, #8] + ldr r0, [r0, #0] + add r1, r0, r5 + ldr r0, _0224DA80 ; =0x00001363 + ldrb r0, [r1, r0] + cmp r0, #0xff + bne _0224D9C8 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224D9C8: + bl sub_0203608C + bl sub_02058CA0 + add r4, r0, #0 + bl sub_0203608C + bl sub_02058CF4 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + bne _0224D9F8 + ldr r0, _0224DA7C ; =0x022577AC + mov r2, #0xff + ldr r0, [r0, #0] + add sp, #0x10 + add r1, r0, r5 + ldr r0, _0224DA80 ; =0x00001363 + strb r2, [r1, r0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224D9F8: + bl ov23_022535EC + bl ov23_0224F24C + bl ov23_0224321C + bl sub_0203608C + mov r1, #0 + bl ov23_02244858 + ldr r0, _0224DA7C ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224DA84 ; =0x000013DC + add r1, r0, #2 + ldrh r6, [r2, r0] + add r0, r0, #4 + ldrh r4, [r2, r1] + ldrb r7, [r2, r0] + cmp r6, #0 + beq _0224DA26 + cmp r4, #0 + bne _0224DA2A +_0224DA26: + bl sub_02022974 +_0224DA2A: + add r0, r7, #0 + bl sub_0206419C + str r0, [sp, #0xc] + add r0, r7, #0 + bl sub_020641A8 + add r2, r0, #0 + ldr r0, _0224DA7C ; =0x022577AC + mov r3, #0 + ldr r1, [r0, #0] + ldr r0, _0224DA88 ; =0x000013E6 + add r2, r4, r2 + strb r3, [r1, r0] + ldr r1, [sp, #0xc] + ldr r0, [sp, #8] + str r5, [sp] + str r0, [sp, #4] + ldr r0, _0224DA7C ; =0x022577AC + add r1, r6, r1 + ldr r0, [r0, #0] + add r3, r7, #0 + ldr r0, [r0, #0] + bl ov23_0224CAF0 + bl ov23_02249AB8 + ldr r1, _0224DA7C ; =0x022577AC + mov r0, #0xa + ldr r2, [r1, #0] + mov r3, #0 + lsl r0, r0, #8 + str r3, [r2, r0] + ldr r0, [r1, #0] + mov r2, #0xff + add r1, r0, r5 + ldr r0, _0224DA80 ; =0x00001363 + strb r2, [r1, r0] + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DA7C: .word 0x022577AC +_0224DA80: .word 0x00001363 +_0224DA84: .word 0x000013DC +_0224DA88: .word 0x000013E6 + thumb_func_end ov23_0224D9AC + + thumb_func_start ov23_0224DA8C +ov23_0224DA8C: ; 0x0224DA8C + push {r3, lr} + ldr r0, _0224DAAC ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224DAB0 ; =0x000012E4 + ldrb r1, [r2, r0] + cmp r1, #1 + bne _0224DAA8 + mov r1, #2 + strb r1, [r2, r0] + bl sub_020578DC + mov r0, #0 + bl ov23_0224B5CC +_0224DAA8: + pop {r3, pc} + nop +_0224DAAC: .word 0x022577AC +_0224DAB0: .word 0x000012E4 + thumb_func_end ov23_0224DA8C + + thumb_func_start ov23_0224DAB4 +ov23_0224DAB4: ; 0x0224DAB4 + ldr r0, _0224DAC8 ; =0x022577AC + ldr r2, [r0, #0] + ldr r0, _0224DACC ; =0x000012E4 + ldrb r1, [r2, r0] + cmp r1, #5 + bne _0224DAC4 + mov r1, #4 + strb r1, [r2, r0] +_0224DAC4: + bx lr + nop +_0224DAC8: .word 0x022577AC +_0224DACC: .word 0x000012E4 + thumb_func_end ov23_0224DAB4 + + thumb_func_start ov23_0224DAD0 +ov23_0224DAD0: ; 0x0224DAD0 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl sub_02058EA0 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02058EC0 + add r4, r0, #0 + ldr r0, _0224DB40 ; =0x022577AC + add r1, r5, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + ldr r0, [r0, #0] + bl sub_02054F68 + cmp r0, #0 + bne _0224DB00 + cmp r6, #0 + beq _0224DB3E + bl sub_02033DFC + cmp r0, #0 + bne _0224DB3E +_0224DB00: + ldr r0, _0224DB44 ; =0x0000FFFF + cmp r5, r0 + bne _0224DB16 + cmp r4, r0 + bne _0224DB16 + add r0, r6, #0 + add r1, r6, #0 + mov r2, #1 + bl ov23_0224B844 + pop {r4, r5, r6, pc} +_0224DB16: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + bne _0224DB34 + ldr r0, _0224DB40 ; =0x022577AC + add r1, r5, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + ldr r0, [r0, #0] + bl sub_02054F68 + cmp r0, #0 + beq _0224DB3E +_0224DB34: + add r0, r6, #0 + add r1, r6, #0 + mov r2, #1 + bl ov23_0224B844 +_0224DB3E: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224DB40: .word 0x022577AC +_0224DB44: .word 0x0000FFFF + thumb_func_end ov23_0224DAD0 + + thumb_func_start ov23_0224DB48 +ov23_0224DB48: ; 0x0224DB48 + ldr r0, _0224DB5C ; =0x022577AC + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224DB56 + ldr r0, _0224DB60 ; =0x000013DC + ldrh r0, [r1, r0] + bx lr +_0224DB56: + mov r0, #0x48 + bx lr + nop +_0224DB5C: .word 0x022577AC +_0224DB60: .word 0x000013DC + thumb_func_end ov23_0224DB48 + + thumb_func_start ov23_0224DB64 +ov23_0224DB64: ; 0x0224DB64 + ldr r0, _0224DB78 ; =0x022577AC + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224DB72 + ldr r0, _0224DB7C ; =0x000013DE + ldrh r0, [r1, r0] + bx lr +_0224DB72: + ldr r0, _0224DB80 ; =0x000001B5 + bx lr + nop +_0224DB78: .word 0x022577AC +_0224DB7C: .word 0x000013DE +_0224DB80: .word 0x000001B5 + thumb_func_end ov23_0224DB64 + + thumb_func_start ov23_0224DB84 +ov23_0224DB84: ; 0x0224DB84 + ldr r0, _0224DB98 ; =0x022577AC + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224DB92 + ldr r0, _0224DB9C ; =0x000013E0 + ldrb r0, [r1, r0] + bx lr +_0224DB92: + mov r0, #1 + bx lr + nop +_0224DB98: .word 0x022577AC +_0224DB9C: .word 0x000013E0 + thumb_func_end ov23_0224DB84 + + thumb_func_start ov23_0224DBA0 +ov23_0224DBA0: ; 0x0224DBA0 + ldr r2, _0224DBB4 ; =0x022577AC + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224DBB0 + lsl r0, r0, #1 + add r2, r2, r0 + ldr r0, _0224DBB8 ; =0x000013AC + strh r1, [r2, r0] +_0224DBB0: + bx lr + nop +_0224DBB4: .word 0x022577AC +_0224DBB8: .word 0x000013AC + thumb_func_end ov23_0224DBA0 + + thumb_func_start ov23_0224DBBC +ov23_0224DBBC: ; 0x0224DBBC + ldr r2, _0224DBD0 ; =0x022577AC + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224DBCC + lsl r0, r0, #1 + add r2, r2, r0 + ldr r0, _0224DBD4 ; =0x000013BC + strh r1, [r2, r0] +_0224DBCC: + bx lr + nop +_0224DBD0: .word 0x022577AC +_0224DBD4: .word 0x000013BC + thumb_func_end ov23_0224DBBC + + thumb_func_start ov23_0224DBD8 +ov23_0224DBD8: ; 0x0224DBD8 + ldr r2, _0224DBEC ; =0x022577AC + ldr r2, [r2, #0] + cmp r2, #0 + beq _0224DBE8 + lsl r0, r0, #1 + add r2, r2, r0 + ldr r0, _0224DBF0 ; =0x000013CC + strh r1, [r2, r0] +_0224DBE8: + bx lr + nop +_0224DBEC: .word 0x022577AC +_0224DBF0: .word 0x000013CC + thumb_func_end ov23_0224DBD8 + + thumb_func_start ov23_0224DBF4 +ov23_0224DBF4: ; 0x0224DBF4 + ldr r1, _0224DC00 ; =0x022577AC + ldr r2, [r1, #0] + ldr r1, _0224DC04 ; =0x000013E5 + strb r0, [r2, r1] + bx lr + nop +_0224DC00: .word 0x022577AC +_0224DC04: .word 0x000013E5 + thumb_func_end ov23_0224DBF4 + + thumb_func_start ov23_0224DC08 +ov23_0224DC08: ; 0x0224DC08 + push {r3, lr} + mov r0, #1 + bl sub_02032174 + mov r0, #1 + bl sub_02032138 + mov r0, #1 + bl sub_02036814 + bl sub_020340FC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224DC08 + + thumb_func_start ov23_0224DC24 +ov23_0224DC24: ; 0x0224DC24 + push {r3, lr} + mov r0, #0 + bl sub_02032174 + mov r0, #0 + bl sub_02032138 + mov r0, #0 + bl sub_02036814 + bl sub_020340FC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224DC24 + + .rodata + + + .global Unk_ov23_0225683C +Unk_ov23_0225683C: ; 0x0225683C + .incbin "incbin/overlay23_rodata.bin", 0x530, 0x534 - 0x530 + + .global Unk_ov23_02256840 +Unk_ov23_02256840: ; 0x02256840 + .incbin "incbin/overlay23_rodata.bin", 0x534, 0x538 - 0x534 + + .global Unk_ov23_02256844 +Unk_ov23_02256844: ; 0x02256844 + .incbin "incbin/overlay23_rodata.bin", 0x538, 0x53C - 0x538 + + .global Unk_ov23_02256848 +Unk_ov23_02256848: ; 0x02256848 + .incbin "incbin/overlay23_rodata.bin", 0x53C, 0x540 - 0x53C + + .global Unk_ov23_0225684C +Unk_ov23_0225684C: ; 0x0225684C + .incbin "incbin/overlay23_rodata.bin", 0x540, 0x544 - 0x540 + + .global Unk_ov23_02256850 +Unk_ov23_02256850: ; 0x02256850 + .incbin "incbin/overlay23_rodata.bin", 0x544, 0x548 - 0x544 + + .global Unk_ov23_02256854 +Unk_ov23_02256854: ; 0x02256854 + .incbin "incbin/overlay23_rodata.bin", 0x548, 0x54C - 0x548 + + .global Unk_ov23_02256858 +Unk_ov23_02256858: ; 0x02256858 + .incbin "incbin/overlay23_rodata.bin", 0x54C, 0x552 - 0x54C + + .global Unk_ov23_0225685E +Unk_ov23_0225685E: ; 0x0225685E + .incbin "incbin/overlay23_rodata.bin", 0x552, 0x558 - 0x552 + + .global Unk_ov23_02256864 +Unk_ov23_02256864: ; 0x02256864 + .incbin "incbin/overlay23_rodata.bin", 0x558, 0x560 - 0x558 + + .global Unk_ov23_0225686C +Unk_ov23_0225686C: ; 0x0225686C + .incbin "incbin/overlay23_rodata.bin", 0x560, 0x568 - 0x560 + + .global Unk_ov23_02256874 +Unk_ov23_02256874: ; 0x02256874 + .incbin "incbin/overlay23_rodata.bin", 0x568, 0x571 - 0x568 + + .global Unk_ov23_0225687D +Unk_ov23_0225687D: ; 0x0225687D + .incbin "incbin/overlay23_rodata.bin", 0x571, 0x9 + + + .data + + + .global Unk_ov23_0225760C +Unk_ov23_0225760C: ; 0x0225760C + .incbin "incbin/overlay23_data.bin", 0xA2C, 0xA40 - 0xA2C + + .global Unk_ov23_02257620 +Unk_ov23_02257620: ; 0x02257620 + .incbin "incbin/overlay23_data.bin", 0xA40, 0x11 + + + .bss + + + .global Unk_ov23_022577AC +Unk_ov23_022577AC: ; 0x022577AC + .space 0x4 + diff --git a/asm/ov23_0224DC40.s b/asm/ov23_0224DC40.s new file mode 100644 index 000000000..a658238ff --- /dev/null +++ b/asm/ov23_0224DC40.s @@ -0,0 +1,2862 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0224DC40 +ov23_0224DC40: ; 0x0224DC40 + push {r3, lr} + ldrh r2, [r0, #0x2c] + add r0, sp, #0 + strb r2, [r0] + strb r1, [r0, #1] + mov r0, #0x4a + add r1, sp, #0 + bl sub_020360D0 + pop {r3, pc} + thumb_func_end ov23_0224DC40 + + thumb_func_start ov23_0224DC54 +ov23_0224DC54: ; 0x0224DC54 + push {r3, lr} + ldrh r2, [r0, #0x30] + add r0, sp, #0 + strb r2, [r0] + strb r1, [r0, #1] + mov r0, #0x49 + add r1, sp, #0 + bl sub_020360D0 + pop {r3, pc} + thumb_func_end ov23_0224DC54 + + thumb_func_start ov23_0224DC68 +ov23_0224DC68: ; 0x0224DC68 + push {r4, lr} + add r4, r1, #0 + cmp r4, #0x88 + blt _0224DC80 + ldrh r0, [r0, #0x30] + bl sub_02032EE8 + bl sub_02025F30 + cmp r0, #1 + bne _0224DC80 + add r4, #0x13 +_0224DC80: + bl ov23_0224219C + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F40 + pop {r4, pc} + thumb_func_end ov23_0224DC68 + + thumb_func_start ov23_0224DC90 +ov23_0224DC90: ; 0x0224DC90 + push {r4, lr} + add r4, r1, #0 + cmp r4, #0x88 + blt _0224DCA8 + ldrh r0, [r0, #0x2c] + bl sub_02032EE8 + bl sub_02025F30 + cmp r0, #1 + bne _0224DCA8 + add r4, #0x13 +_0224DCA8: + bl ov23_0224219C + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F40 + pop {r4, pc} + thumb_func_end ov23_0224DC90 + + thumb_func_start ov23_0224DCB8 +ov23_0224DCB8: ; 0x0224DCB8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x21 + mov r1, #0x3c + add r7, r2, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x3c + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _0224DD1C ; =0x022577B0 + mov r1, #1 + str r4, [r0, #4] + str r7, [r4, #8] + str r6, [r4, #0x2c] + add r0, r4, #0 + strh r5, [r4, #0x30] + add r0, #0x37 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0x38 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x29 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x2a + strb r1, [r0] + add r0, r4, #0 + ldrh r1, [r4, #0x30] + add r0, #0x28 + strb r1, [r0] + ldr r0, _0224DD20 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + bl ov23_0224DC68 + ldr r0, _0224DD24 ; =ov23_0224E2D8 + ldr r2, _0224DD28 ; =0x00002710 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DD1C: .word 0x022577B0 +_0224DD20: .word 0x000005DC +_0224DD24: .word ov23_0224E2D8 +_0224DD28: .word 0x00002710 + thumb_func_end ov23_0224DCB8 + + thumb_func_start ov23_0224DD2C +ov23_0224DD2C: ; 0x0224DD2C + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #4 + add r1, r0, #0 + bl sub_02013A04 + str r0, [r5, #0x1c] + mov r3, #1 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224DDD4 ; =0x000001E7 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, #0xc + ldr r0, [r0, #8] + mov r2, #3 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224DDD8 ; =0x000003D9 + add r0, #0xc + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r2, _0224DDDC ; =0x0000027A + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + ldr r4, _0224DDE0 ; =0x022568B4 + add r7, r0, #0 + mov r6, #0 +_0224DD7E: + ldr r0, [r5, #0x1c] + ldr r2, [r4, #0] + ldr r3, [r4, #4] + add r1, r7, #0 + bl sub_02013A4C + add r6, r6, #1 + add r4, #8 + cmp r6, #4 + blo _0224DD7E + add r0, r7, #0 + bl sub_0200B190 + bl ov23_02253D40 + add r1, sp, #0x14 + mov r2, #0x20 + bl sub_020C4DB0 + ldr r0, [r5, #0x1c] + mov r1, #0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xc + str r0, [sp, #0x20] + mov r3, #4 + add r0, sp, #0x14 + strh r3, [r0, #0x10] + strh r3, [r0, #0x12] + strh r1, [r5, #0x3a] + add r0, sp, #0x14 + add r2, r1, #0 + bl sub_0200112C + str r0, [r5, #0x20] + add r5, #0xc + add r0, r5, #0 + bl sub_0201A954 + bl sub_020594FC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DDD4: .word 0x000001E7 +_0224DDD8: .word 0x000003D9 +_0224DDDC: .word 0x0000027A +_0224DDE0: .word 0x022568B4 + thumb_func_end ov23_0224DD2C + + thumb_func_start ov23_0224DDE4 +ov23_0224DDE4: ; 0x0224DDE4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _0224DDFA + mov r1, #4 + bl sub_02002154 + mov r0, #0 + str r0, [r4, #0x24] +_0224DDFA: + ldr r0, [r4, #4] + cmp r0, #0 + beq _0224DE0C + mov r1, #1 + mvn r1, r1 + bl ov23_02251044 + bl ov23_02243204 +_0224DE0C: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E244 + ldr r1, [r4, #0x2c] + cmp r1, #0 + beq _0224DE1E + mov r0, #0 + blx r1 +_0224DE1E: + add r0, r4, #0 + bl sub_020181C4 + bl sub_02059514 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, _0224DE38 ; =0x022577B0 + mov r1, #0 + str r1, [r0, #4] + pop {r3, r4, r5, pc} + nop +_0224DE38: .word 0x022577B0 + thumb_func_end ov23_0224DDE4 + + thumb_func_start ov23_0224DE3C +ov23_0224DE3C: ; 0x0224DE3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + mov r0, #4 + add r1, r0, #0 + bl sub_02013A04 + str r0, [r5, #0x1c] + mov r3, #1 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224DF0C ; =0x000001B7 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, #0xc + ldr r0, [r0, #8] + mov r2, #3 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224DF10 ; =0x000003D9 + add r0, #0xc + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r2, _0224DF14 ; =0x00000279 + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r6, r0, #0 + mov r4, #0 + add r7, sp, #0x14 +_0224DE8E: + bl sub_0201D35C + mov r1, #0xc + bl sub_020E2178 + add r2, r1, #0 + mov r1, #0 + cmp r4, #0 + ble _0224DEB0 + add r3, r7, #0 +_0224DEA2: + ldrb r0, [r3] + cmp r0, r2 + beq _0224DEB0 + add r1, r1, #1 + add r3, r3, #1 + cmp r1, r4 + blt _0224DEA2 +_0224DEB0: + cmp r1, r4 + bne _0224DEC2 + strb r2, [r7, r4] + ldr r0, [r5, #0x1c] + add r1, r6, #0 + add r3, r2, #0 + bl sub_02013A4C + b _0224DEC4 +_0224DEC2: + sub r4, r4, #1 +_0224DEC4: + add r4, r4, #1 + cmp r4, #4 + blt _0224DE8E + add r0, r6, #0 + bl sub_0200B190 + ldr r4, _0224DF18 ; =0x02256894 + add r3, sp, #0x18 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0x1c] + mov r1, #0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r0, #0xc + str r0, [sp, #0x24] + add r0, r2, #0 + strh r1, [r5, #0x3a] + add r2, r1, #0 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x20] + add r5, #0xc + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DF0C: .word 0x000001B7 +_0224DF10: .word 0x000003D9 +_0224DF14: .word 0x00000279 +_0224DF18: .word 0x02256894 + thumb_func_end ov23_0224DE3C + + thumb_func_start ov23_0224DF1C +ov23_0224DF1C: ; 0x0224DF1C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x20] + bl sub_02001288 + add r4, r0, #0 + add r0, r5, #0 + bl ov23_0224F270 + bl sub_020360F0 + cmp r0, #0 + beq _0224DF50 + add r0, r5, #0 + mov r1, #3 + add r0, #0x37 + strb r1, [r0] + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224E244 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0224DF50: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224DF5E + add r0, r0, #1 + cmp r4, r0 + bne _0224DF64 +_0224DF5E: + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_0224DF64: + ldr r0, _0224DF9C ; =0x000005DC + bl sub_02005748 + add r0, sp, #0 + strb r4, [r0] + ldrh r1, [r5, #0x30] + strb r1, [r0, #1] + mov r1, #0 + strb r1, [r0, #2] + mov r0, #0x4f + add r1, sp, #0 + bl sub_020360D0 + add r0, r5, #0 + add r0, #0x32 + strb r4, [r0] + add r0, r5, #0 + mov r1, #0x1e + add r0, #0x37 + strb r1, [r0] + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224E244 + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0224DF9C: .word 0x000005DC + thumb_func_end ov23_0224DF1C + + thumb_func_start ov23_0224DFA0 +ov23_0224DFA0: ; 0x0224DFA0 + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #4 + add r1, r0, #0 + bl sub_02013A04 + str r0, [r5, #0x1c] + mov r3, #1 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224E050 ; =0x000001B7 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, #0xc + ldr r0, [r0, #8] + mov r2, #3 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224E054 ; =0x000003D9 + add r0, #0xc + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r2, #0x9e + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #4 + bl sub_0200B144 + add r6, r0, #0 + mov r4, #0 +_0224DFF2: + add r2, r5, #0 + add r2, #0x32 + ldrb r2, [r2] + ldr r0, [r5, #0x1c] + add r1, r6, #0 + lsl r2, r2, #2 + add r2, r4, r2 + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, #4 + blt _0224DFF2 + add r0, r6, #0 + bl sub_0200B190 + ldr r4, _0224E058 ; =0x02256894 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0x1c] + mov r1, #0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0xc + str r0, [sp, #0x20] + add r0, r2, #0 + strh r1, [r5, #0x3a] + add r2, r1, #0 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x20] + add r5, #0xc + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + nop +_0224E050: .word 0x000001B7 +_0224E054: .word 0x000003D9 +_0224E058: .word 0x02256894 + thumb_func_end ov23_0224DFA0 + + thumb_func_start ov23_0224E05C +ov23_0224E05C: ; 0x0224E05C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x20] + bl sub_02001288 + add r4, r0, #0 + add r0, r5, #0 + bl ov23_0224F270 + bl sub_020360F0 + cmp r0, #0 + beq _0224E08E + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224E244 + mov r0, #3 + add r5, #0x37 + strb r0, [r5] + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0224E08E: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224E09C + add r0, r0, #1 + cmp r4, r0 + bne _0224E0A2 +_0224E09C: + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_0224E0A2: + ldr r0, _0224E120 ; =0x000005DC + bl sub_02005748 + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224E244 + add r0, r5, #0 + add r0, #0x32 + ldrb r0, [r0] + lsl r0, r0, #2 + add r1, r4, r0 + add r0, sp, #0 + strb r1, [r0] + ldrh r1, [r5, #0x30] + strb r1, [r0, #1] + mov r1, #2 + strb r1, [r0, #2] + mov r0, #0x4f + add r1, sp, #0 + bl sub_020360D0 + bl ov23_0224219C + add r1, sp, #0 + ldrb r1, [r1] + bl ov23_022540C8 + bl ov23_0224219C + add r2, r5, #0 + add r2, #0x33 + ldrb r2, [r2] + mov r1, #6 + bl ov23_022540E0 + add r0, r5, #0 + add r0, #0x33 + ldrb r1, [r0] + add r0, sp, #0 + ldrb r0, [r0] + cmp r1, r0 + bne _0224E102 + add r0, r5, #0 + mov r1, #0x8d + bl ov23_0224DC68 + b _0224E10A +_0224E102: + add r0, r5, #0 + mov r1, #0x8c + bl ov23_0224DC68 +_0224E10A: + add r0, r5, #0 + mov r1, #0x24 + add r0, #0x37 + strb r1, [r0] + add r0, r5, #0 + mov r1, #0x1b + bl ov23_0224DC54 + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224E120: .word 0x000005DC + thumb_func_end ov23_0224E05C + + thumb_func_start ov23_0224E124 +ov23_0224E124: ; 0x0224E124 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov23_0224219C + add r5, r0, #0 + ldrh r0, [r4, #0x30] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r5, #0 + bl ov23_02254068 + bl ov23_0224219C + add r1, r4, #0 + add r1, #0x2a + ldrb r1, [r1] + bl ov23_022540F4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0xe + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, [r4, #8] + bl sub_0203D174 + bl sub_020298A0 + bl sub_0202952C + add r4, #0x2a + ldrb r0, [r4] + bl ov23_0224F634 + ldr r0, _0224E178 ; =0x000005E3 + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_0224E178: .word 0x000005E3 + thumb_func_end ov23_0224E124 + + thumb_func_start ov23_0224E17C +ov23_0224E17C: ; 0x0224E17C + push {r4, lr} + add r4, r1, #0 + bl ov23_0224219C + add r1, r4, #0 + bl ov23_022540F4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0xc + add r3, r2, #0 + bl ov23_02253F40 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224E17C + + thumb_func_start ov23_0224E19C +ov23_0224E19C: ; 0x0224E19C + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x24] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224E1DE + cmp r0, #0 + bne _0224E1CA + ldrh r1, [r4, #0x30] + add r0, r4, #0 + add r0, #0x28 + strb r1, [r0] + add r1, r4, #0 + mov r0, #0x4d + add r1, #0x28 + bl sub_020360D0 + mov r1, #0x15 + b _0224E1D4 +_0224E1CA: + add r0, r4, #0 + mov r1, #0xb + bl ov23_0224DC68 + mov r1, #0xf +_0224E1D4: + add r0, r4, #0 + add r0, #0x37 + strb r1, [r0] + mov r0, #0 + str r0, [r4, #0x24] +_0224E1DE: + pop {r4, pc} + thumb_func_end ov23_0224E19C + + thumb_func_start ov23_0224E1E0 +ov23_0224E1E0: ; 0x0224E1E0 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x20] + bl sub_02001288 + add r4, r0, #0 + add r0, r5, #0 + bl ov23_0224F270 + bl sub_020360F0 + cmp r0, #0 + beq _0224E200 + mov r4, #1 + mvn r4, r4 +_0224E200: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224E212 + add r0, r0, #1 + cmp r4, r0 + bne _0224E228 + mov r0, #0 + pop {r4, r5, r6, pc} +_0224E212: + ldr r0, _0224E240 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov23_0224E8E0 + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224E244 + b _0224E23A +_0224E228: + ldr r0, _0224E240 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + blx r4 + add r0, r6, #0 + add r1, r5, #0 + bl ov23_0224E244 +_0224E23A: + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_0224E240: .word 0x000005DC + thumb_func_end ov23_0224E1E0 + + thumb_func_start ov23_0224E244 +ov23_0224E244: ; 0x0224E244 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0224E27C + add r0, r4, #0 + add r0, #0xc + mov r1, #1 + bl sub_0200DC9C + mov r1, #0 + ldr r0, [r4, #0x20] + add r2, r1, #0 + bl sub_02001384 + add r0, r4, #0 + add r0, #0xc + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #0xc + bl sub_0201A8FC + ldr r0, [r4, #0x1c] + bl sub_02013A3C + mov r0, #0 + str r0, [r4, #0x1c] +_0224E27C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224E244 + + thumb_func_start ov23_0224E280 +ov23_0224E280: ; 0x0224E280 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl ov23_0224DC54 + add r0, r4, #0 + mov r1, #7 + bl ov23_0224DC68 + mov r0, #5 + add r4, #0x37 + strb r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224E280 + + thumb_func_start ov23_0224E29C +ov23_0224E29C: ; 0x0224E29C + push {r4, lr} + mov r1, #0x16 + add r4, r0, #0 + bl ov23_0224DC54 + mov r0, #0x1b + add r4, #0x37 + strb r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224E29C + + thumb_func_start ov23_0224E2B0 +ov23_0224E2B0: ; 0x0224E2B0 + mov r1, #0x10 + add r0, #0x37 + strb r1, [r0] + bx lr + thumb_func_end ov23_0224E2B0 + + thumb_func_start ov23_0224E2B8 +ov23_0224E2B8: ; 0x0224E2B8 + ldr r1, _0224E2CC ; =0x022577B0 + ldr r2, [r1, #4] + add r2, #0x2a + strb r0, [r2] + ldr r0, [r1, #4] + mov r2, #0x12 + add r0, #0x37 + strb r2, [r0] + bx lr + nop +_0224E2CC: .word 0x022577B0 + thumb_func_end ov23_0224E2B8 + + thumb_func_start ov23_0224E2D0 +ov23_0224E2D0: ; 0x0224E2D0 + mov r1, #0xb + add r0, #0x37 + strb r1, [r0] + bx lr + thumb_func_end ov23_0224E2D0 + + thumb_func_start ov23_0224E2D8 +ov23_0224E2D8: ; 0x0224E2D8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + cmp r0, #0x11 + beq _0224E304 + ldrh r0, [r4, #0x30] + bl sub_02035D78 + cmp r0, #0 + bne _0224E304 + mov r0, #0 + str r0, [r4, #4] + bl ov23_022535EC + add r0, r4, #0 + mov r1, #4 + add r0, #0x37 + strb r1, [r0] +_0224E304: + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + cmp r0, #0x29 + bhi _0224E3B8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224E31A: ; jump table + .short _0224E87A - _0224E31A - 2 ; case 0 + .short _0224E36E - _0224E31A - 2 ; case 1 + .short _0224E390 - _0224E31A - 2 ; case 2 + .short _0224E39A - _0224E31A - 2 ; case 3 + .short _0224E39A - _0224E31A - 2 ; case 4 + .short _0224E3AC - _0224E31A - 2 ; case 5 + .short _0224E3F8 - _0224E31A - 2 ; case 6 + .short _0224E40A - _0224E31A - 2 ; case 7 + .short _0224E3E6 - _0224E31A - 2 ; case 8 + .short _0224E42A - _0224E31A - 2 ; case 9 + .short _0224E87A - _0224E31A - 2 ; case 10 + .short _0224E45C - _0224E31A - 2 ; case 11 + .short _0224E480 - _0224E31A - 2 ; case 12 + .short _0224E49E - _0224E31A - 2 ; case 13 + .short _0224E4B2 - _0224E31A - 2 ; case 14 + .short _0224E4C4 - _0224E31A - 2 ; case 15 + .short _0224E4E6 - _0224E31A - 2 ; case 16 + .short _0224E87A - _0224E31A - 2 ; case 17 + .short _0224E4FA - _0224E31A - 2 ; case 18 + .short _0224E590 - _0224E31A - 2 ; case 19 + .short _0224E5CC - _0224E31A - 2 ; case 20 + .short _0224E5D6 - _0224E31A - 2 ; case 21 + .short _0224E640 - _0224E31A - 2 ; case 22 + .short _0224E61C - _0224E31A - 2 ; case 23 + .short _0224E62E - _0224E31A - 2 ; case 24 + .short _0224E67A - _0224E31A - 2 ; case 25 + .short _0224E684 - _0224E31A - 2 ; case 26 + .short _0224E6A4 - _0224E31A - 2 ; case 27 + .short _0224E6B6 - _0224E31A - 2 ; case 28 + .short _0224E6D2 - _0224E31A - 2 ; case 29 + .short _0224E6DC - _0224E31A - 2 ; case 30 + .short _0224E6FC - _0224E31A - 2 ; case 31 + .short _0224E738 - _0224E31A - 2 ; case 32 + .short _0224E778 - _0224E31A - 2 ; case 33 + .short _0224E7A0 - _0224E31A - 2 ; case 34 + .short _0224E7BC - _0224E31A - 2 ; case 35 + .short _0224E7C6 - _0224E31A - 2 ; case 36 + .short _0224E7F2 - _0224E31A - 2 ; case 37 + .short _0224E812 - _0224E31A - 2 ; case 38 + .short _0224E82E - _0224E31A - 2 ; case 39 + .short _0224E84A - _0224E31A - 2 ; case 40 + .short _0224E868 - _0224E31A - 2 ; case 41 +_0224E36E: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E3B8 + add r0, r4, #0 + bl ov23_0224DD2C + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E390: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E1E0 + b _0224E87A +_0224E39A: + bl ov23_0224219C + bl ov23_02254044 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224DDE4 + b _0224E87A +_0224E3AC: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + beq _0224E3BA +_0224E3B8: + b _0224E87A +_0224E3BA: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #9 + bne _0224E3D2 + add r0, r4, #0 + mov r1, #9 + add r0, #0x37 + strb r1, [r0] + ldrh r0, [r4, #0x30] + bl ov23_022538FC +_0224E3D2: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #6 + bne _0224E4DA + add r0, r4, #0 + mov r1, #6 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E3E6: + add r0, r4, #0 + mov r1, #0xf + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #7 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E3F8: + add r0, r4, #0 + mov r1, #8 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #7 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E40A: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E4DA + ldr r0, _0224E720 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224E4DA + add r0, r4, #0 + mov r1, #4 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E42A: + bl ov23_022539D8 + cmp r0, #0 + beq _0224E4DA + bl ov23_0224219C + bl ov23_02254044 + ldrh r0, [r4, #0x30] + bl sub_02032EE8 + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #8] + ldr r2, _0224E724 ; =ov23_0224E2D0 + ldr r0, [r0, #8] + add r3, r4, #0 + bl ov23_02253834 + add r0, r4, #0 + mov r1, #0xa + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E45C: + ldr r0, [r4, #8] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x20 + bl sub_0202CFEC + bl ov23_022539E8 + add r0, r4, #0 + mov r1, #9 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0xc + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E480: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E4DA + add r0, r4, #0 + mov r1, #0xe + bl ov23_0224DC54 + add r0, r4, #0 + mov r1, #0xd + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E49E: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0xd + bne _0224E4DA + add r0, r4, #0 + mov r1, #0xe + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E4B2: + add r0, r4, #0 + mov r1, #0xa + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #1 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E4C4: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E4DA + ldr r0, _0224E720 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _0224E4DC +_0224E4DA: + b _0224E87A +_0224E4DC: + add r0, r4, #0 + mov r1, #0xe + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E4E6: + ldr r0, _0224E728 ; =ov23_0224E2B8 + ldr r1, [r4, #8] + bl ov23_022511B0 + str r0, [r4, #4] + add r0, r4, #0 + mov r1, #0x11 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E4FA: + mov r0, #0 + str r0, [r4, #4] + ldr r0, _0224E72C ; =0x022577B0 + ldr r0, [r0, #4] + add r0, #0x2a + ldrb r0, [r0] + cmp r0, #0 + bne _0224E51C + add r0, r4, #0 + mov r1, #0xb + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E51C: + ldrh r0, [r4, #0x30] + bl sub_02032FC0 + cmp r0, #0 + beq _0224E538 + add r0, r4, #0 + mov r1, #0x57 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E538: + ldr r0, [r4, #8] + ldr r0, [r0, #0xc] + bl sub_02028810 + cmp r0, #0 + bne _0224E556 + add r0, r4, #0 + mov r1, #0x57 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E556: + ldr r0, _0224E72C ; =0x022577B0 + ldr r0, [r0, #4] + add r0, #0x2a + ldrb r0, [r0] + bl sub_0205748C + cmp r0, #0 + beq _0224E578 + add r0, r4, #0 + mov r1, #0x56 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E578: + ldr r1, _0224E72C ; =0x022577B0 + add r0, r4, #0 + ldr r1, [r1, #4] + add r1, #0x2a + ldrb r1, [r1] + bl ov23_0224E17C + add r0, r4, #0 + mov r1, #0x13 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E590: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E610 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #8] + ldr r1, _0224E730 ; =0x0225688C + ldr r0, [r0, #8] + ldr r2, _0224E734 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x24] + add r0, r4, #0 + mov r1, #0x14 + add r0, #0x37 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #8 + beq _0224E610 + add r0, r4, #0 + mov r1, #1 + add r0, #0x38 + strb r1, [r0] + b _0224E87A +_0224E5CC: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E19C + b _0224E87A +_0224E5D6: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E610 + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x16 + bne _0224E5F4 + add r0, r4, #0 + mov r1, #0x16 + add r0, #0x37 + strb r1, [r0] +_0224E5F4: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x18 + bne _0224E606 + add r0, r4, #0 + mov r1, #0x18 + add r0, #0x37 + strb r1, [r0] +_0224E606: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x17 + beq _0224E612 +_0224E610: + b _0224E87A +_0224E612: + add r0, r4, #0 + mov r1, #0x17 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E61C: + add r0, r4, #0 + mov r1, #0x1e + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x1a + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E62E: + add r0, r4, #0 + mov r1, #0xd + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x1a + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E640: + add r0, r4, #0 + bl ov23_0224E124 + ldr r0, [r4, #8] + ldr r0, [r0, #0xc] + bl sub_020507E4 + add r6, r0, #0 + bl sub_0206B3EC + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + bl sub_0206B3FC + ldr r0, [r4, #8] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x1f + bl sub_0202CFEC + add r0, r4, #0 + mov r1, #0x19 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E67A: + add r0, r4, #0 + mov r1, #0x1a + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E684: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E712 + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0xf + bne _0224E712 + add r0, r4, #0 + mov r1, #0xe + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E6A4: + add r0, r4, #0 + mov r1, #0x88 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x1c + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E6B6: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E712 + add r0, r4, #0 + bl ov23_0224DE3C + add r0, r4, #0 + mov r1, #0x1d + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E6D2: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224DF1C + b _0224E87A +_0224E6DC: + bl ov23_0224219C + add r1, r4, #0 + add r1, #0x32 + ldrb r1, [r1] + bl ov23_022540B0 + add r0, r4, #0 + mov r1, #0x89 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x1f + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E6FC: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E712 + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x20 + beq _0224E714 +_0224E712: + b _0224E87A +_0224E714: + add r0, r4, #0 + mov r1, #0x20 + add r0, #0x37 + strb r1, [r0] + b _0224E87A + nop +_0224E720: .word 0x021BF67C +_0224E724: .word ov23_0224E2D0 +_0224E728: .word ov23_0224E2B8 +_0224E72C: .word 0x022577B0 +_0224E730: .word 0x0225688C +_0224E734: .word 0x000003D9 +_0224E738: + add r0, r4, #0 + add r0, #0x33 + ldrb r6, [r0] + cmp r6, #0x33 + bne _0224E75C + add r0, r4, #0 + mov r1, #0x8b + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0 + add r0, #0x38 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0x21 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E75C: + bl ov23_0224219C + add r1, r6, #0 + bl ov23_022540C8 + add r0, r4, #0 + mov r1, #0x8a + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x22 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E778: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E87A + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x2a + bne _0224E87A + add r0, r4, #0 + mov r1, #0 + add r0, #0x38 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0xe + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E7A0: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E87A + add r0, r4, #0 + bl ov23_0224DFA0 + add r0, r4, #0 + mov r1, #0x23 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E7BC: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E05C + b _0224E87A +_0224E7C6: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E87A + ldr r0, [r4, #8] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x21 + bl sub_0202CFEC + add r0, r4, #0 + mov r1, #0x8e + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x25 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E7F2: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E87A + ldr r0, _0224E8DC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224E87A + add r0, r4, #0 + mov r1, #0x26 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E812: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x25 + bne _0224E87A + add r0, r4, #0 + mov r1, #0x64 + bl ov23_0224DC54 + add r0, r4, #0 + mov r1, #0x27 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E82E: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x64 + bne _0224E87A + add r0, r4, #0 + mov r1, #0x96 + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #0x28 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E84A: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224E87A + add r0, r4, #0 + mov r1, #0x65 + bl ov23_0224DC54 + add r0, r4, #0 + mov r1, #0x29 + add r0, #0x37 + strb r1, [r0] + b _0224E87A +_0224E868: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0x65 + bne _0224E87A + add r0, r4, #0 + mov r1, #0xe + add r0, #0x37 + strb r1, [r0] +_0224E87A: + add r0, r4, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #8 + bne _0224E8D6 + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + cmp r0, #4 + beq _0224E8D6 + cmp r0, #7 + beq _0224E8D6 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _0224E8A2 + mov r1, #4 + bl sub_02002154 + mov r0, #0 + str r0, [r4, #0x24] +_0224E8A2: + ldr r0, [r4, #4] + cmp r0, #0 + beq _0224E8C0 + mov r1, #1 + mvn r1, r1 + bl ov23_02251044 + bl ov23_02243204 + bl ov23_022421DC + bl ov23_02254044 + mov r0, #0 + str r0, [r4, #4] +_0224E8C0: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E244 + add r0, r4, #0 + mov r1, #8 + add r0, #0x37 + strb r1, [r0] + mov r0, #0 + add r4, #0x38 + strb r0, [r4] +_0224E8D6: + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0224E8DC: .word 0x021BF67C + thumb_func_end ov23_0224E2D8 + + thumb_func_start ov23_0224E8E0 +ov23_0224E8E0: ; 0x0224E8E0 + push {r4, lr} + add r4, r0, #0 + mov r1, #0xf + bl ov23_0224DC68 + add r0, r4, #0 + mov r1, #8 + bl ov23_0224DC54 + mov r0, #7 + add r4, #0x37 + strb r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224E8E0 + + thumb_func_start ov23_0224E8FC +ov23_0224E8FC: ; 0x0224E8FC + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x20] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224E93A + cmp r0, #0 + bne _0224E926 + add r0, r4, #0 + mov r1, #9 + bl ov23_0224DC40 + ldrh r0, [r4, #0x2c] + bl ov23_022538FC + mov r1, #0xa + b _0224E930 +_0224E926: + add r0, r4, #0 + mov r1, #6 + bl ov23_0224DC40 + mov r1, #8 +_0224E930: + add r0, r4, #0 + add r0, #0x34 + strb r1, [r0] + mov r0, #0 + str r0, [r4, #0x20] +_0224E93A: + pop {r4, pc} + thumb_func_end ov23_0224E8FC + + thumb_func_start ov23_0224E93C +ov23_0224E93C: ; 0x0224E93C + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x20] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224E9BE + cmp r0, #0 + bne _0224E9A2 + add r0, r4, #0 + add r0, #0x26 + ldrb r0, [r0] + bl ov23_0224F744 + cmp r0, #0 + beq _0224E988 + ldr r0, [r4, #4] + bl sub_0203D174 + bl sub_020298A0 + bl sub_0202977C + ldr r0, _0224E9C0 ; =0x000005E3 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x16 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0x13 + add r0, #0x34 + strb r1, [r0] + b _0224E9BA +_0224E988: + add r0, r4, #0 + mov r1, #0x17 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0x15 + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #0x15 + add r0, #0x34 + strb r1, [r0] + b _0224E9BA +_0224E9A2: + add r0, r4, #0 + mov r1, #0x18 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0x1d + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #0x15 + add r0, #0x34 + strb r1, [r0] +_0224E9BA: + mov r0, #0 + str r0, [r4, #0x20] +_0224E9BE: + pop {r4, pc} + ; .align 2, 0 +_0224E9C0: .word 0x000005E3 + thumb_func_end ov23_0224E93C + + thumb_func_start ov23_0224E9C4 +ov23_0224E9C4: ; 0x0224E9C4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224E9DA + mov r1, #4 + bl sub_02002154 + mov r0, #0 + str r0, [r4, #0x20] +_0224E9DA: + ldr r1, [r4, #0x28] + cmp r1, #0 + beq _0224E9E4 + mov r0, #0 + blx r1 +_0224E9E4: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224EA08 + add r0, r4, #0 + bl sub_020181C4 + bl sub_02059514 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, _0224EA04 ; =0x022577B0 + mov r1, #0 + str r1, [r0, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224EA04: .word 0x022577B0 + thumb_func_end ov23_0224E9C4 + + thumb_func_start ov23_0224EA08 +ov23_0224EA08: ; 0x0224EA08 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _0224EA40 + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl sub_0200DC9C + mov r1, #0 + ldr r0, [r4, #0x1c] + add r2, r1, #0 + bl sub_02001384 + add r0, r4, #0 + add r0, #8 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #8 + bl sub_0201A8FC + ldr r0, [r4, #0x18] + bl sub_02013A3C + mov r0, #0 + str r0, [r4, #0x18] +_0224EA40: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224EA08 + + thumb_func_start ov23_0224EA44 +ov23_0224EA44: ; 0x0224EA44 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + bl ov23_0224219C + add r6, r0, #0 + add r0, r5, #0 + bl sub_02032EE8 + add r1, r0, #0 + add r0, r6, #0 + bl ov23_02254068 + bl ov23_0224219C + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F40 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_0224EA44 + + thumb_func_start ov23_0224EA70 +ov23_0224EA70: ; 0x0224EA70 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov23_0224219C + add r4, r0, #0 + ldrh r0, [r5, #0x2c] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02254068 + bl ov23_0224219C + add r5, #0x26 + ldrb r1, [r5] + bl ov23_022540F4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x1f + add r3, r2, #0 + bl ov23_02253F40 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224EA70 + + thumb_func_start ov23_0224EAA4 +ov23_0224EAA4: ; 0x0224EAA4 + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #5 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x18] + mov r3, #1 + add r1, r5, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224EB68 ; =0x00000197 + add r1, #8 + str r0, [sp, #0x10] + ldr r0, [r5, #4] + mov r2, #3 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224EB6C ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r2, #0x9e + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #4 + bl sub_0200B144 + add r6, r0, #0 + mov r4, #0 +_0224EAF6: + add r2, r5, #0 + add r2, #0x2e + ldrb r2, [r2] + ldr r0, [r5, #0x18] + add r1, r6, #0 + lsl r2, r2, #2 + add r2, r4, r2 + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, #4 + blt _0224EAF6 + ldr r0, [r5, #0x18] + add r1, r6, #0 + mov r2, #0x30 + mov r3, #0x33 + bl sub_02013A4C + add r0, r6, #0 + bl sub_0200B190 + ldr r4, _0224EB70 ; =0x02256894 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0x18] + mov r1, #5 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #8 + str r0, [sp, #0x20] + add r0, sp, #0x14 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + mov r1, #0 + add r0, r2, #0 + strh r1, [r5, #0x36] + add r2, r1, #0 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x1c] + add r5, #8 + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + nop +_0224EB68: .word 0x00000197 +_0224EB6C: .word 0x000003D9 +_0224EB70: .word 0x02256894 + thumb_func_end ov23_0224EAA4 + + thumb_func_start ov23_0224EB74 +ov23_0224EB74: ; 0x0224EB74 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0x1c] + bl sub_02001288 + add r4, r0, #0 + add r1, r5, #0 + ldr r0, [r5, #0x1c] + add r1, #0x36 + ldrh r6, [r5, #0x36] + bl sub_020014D0 + ldrh r0, [r5, #0x36] + cmp r6, r0 + beq _0224EB9A + ldr r0, _0224EC44 ; =0x000005DC + bl sub_02005748 +_0224EB9A: + bl sub_020360F0 + cmp r0, #0 + beq _0224EBA6 + mov r4, #1 + mvn r4, r4 +_0224EBA6: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224EBB8 + add r0, r0, #1 + cmp r4, r0 + bne _0224EBBA + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224EBB8: + mov r4, #0x33 +_0224EBBA: + ldr r0, _0224EC44 ; =0x000005DC + bl sub_02005748 + add r0, r7, #0 + add r1, r5, #0 + bl ov23_0224EA08 + cmp r4, #0x33 + beq _0224EBFC + add r0, r5, #0 + add r0, #0x2e + ldrb r0, [r0] + lsl r0, r0, #2 + add r1, r4, r0 + add r0, r5, #0 + add r0, #0x2f + strb r1, [r0] + add r0, r5, #0 + mov r1, #0x1a + add r0, #0x34 + strb r1, [r0] + bl ov23_0224219C + add r1, r5, #0 + add r1, #0x2f + ldrb r1, [r1] + bl ov23_022540C8 + add r0, r5, #0 + mov r1, #0x92 + bl ov23_0224DC90 + b _0224EC1C +_0224EBFC: + add r0, r5, #0 + mov r1, #0x33 + add r0, #0x2f + strb r1, [r0] + add r0, r5, #0 + mov r1, #0x10 + add r0, #0x34 + strb r1, [r0] + add r0, r5, #0 + mov r1, #0 + add r0, #0x35 + strb r1, [r0] + add r0, r5, #0 + mov r1, #0x91 + bl ov23_0224DC90 +_0224EC1C: + add r0, r5, #0 + add r0, #0x2f + ldrb r1, [r0] + add r0, sp, #0 + strb r1, [r0] + ldrh r1, [r5, #0x2c] + strb r1, [r0, #1] + mov r1, #1 + strb r1, [r0, #2] + mov r0, #0x4f + add r1, sp, #0 + bl sub_020360D0 + add r0, r5, #0 + mov r1, #0x20 + bl ov23_0224DC40 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224EC44: .word 0x000005DC + thumb_func_end ov23_0224EB74 + + thumb_func_start ov23_0224EC48 +ov23_0224EC48: ; 0x0224EC48 + mov r1, #0xc + add r0, #0x34 + strb r1, [r0] + bx lr + thumb_func_end ov23_0224EC48 + + thumb_func_start ov23_0224EC50 +ov23_0224EC50: ; 0x0224EC50 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #0x2c] + bl sub_02035D78 + cmp r0, #0 + bne _0224EC6E + bl ov23_022535EC + add r0, r4, #0 + mov r1, #4 + add r0, #0x34 + strb r1, [r0] +_0224EC6E: + add r0, r4, #0 + add r0, #0x34 + ldrb r0, [r0] + cmp r0, #0x20 + bls _0224EC7A + b _0224F038 +_0224EC7A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224EC86: ; jump table + .short _0224F038 - _0224EC86 - 2 ; case 0 + .short _0224F038 - _0224EC86 - 2 ; case 1 + .short _0224ECDA - _0224EC86 - 2 ; case 2 + .short _0224F038 - _0224EC86 - 2 ; case 3 + .short _0224ECC8 - _0224EC86 - 2 ; case 4 + .short _0224ED20 - _0224EC86 - 2 ; case 5 + .short _0224ED32 - _0224EC86 - 2 ; case 6 + .short _0224ED5C - _0224EC86 - 2 ; case 7 + .short _0224ED66 - _0224EC86 - 2 ; case 8 + .short _0224ED78 - _0224EC86 - 2 ; case 9 + .short _0224ED98 - _0224EC86 - 2 ; case 10 + .short _0224F038 - _0224EC86 - 2 ; case 11 + .short _0224EDCA - _0224EC86 - 2 ; case 12 + .short _0224EDE2 - _0224EC86 - 2 ; case 13 + .short _0224EE00 - _0224EC86 - 2 ; case 14 + .short _0224EE16 - _0224EC86 - 2 ; case 15 + .short _0224EE28 - _0224EC86 - 2 ; case 16 + .short _0224EE46 - _0224EC86 - 2 ; case 17 + .short _0224EE70 - _0224EC86 - 2 ; case 18 + .short _0224EE7A - _0224EC86 - 2 ; case 19 + .short _0224EE8A - _0224EC86 - 2 ; case 20 + .short _0224EE94 - _0224EC86 - 2 ; case 21 + .short _0224EEBC - _0224EC86 - 2 ; case 22 + .short _0224EED4 - _0224EC86 - 2 ; case 23 + .short _0224EF06 - _0224EC86 - 2 ; case 24 + .short _0224EF24 - _0224EC86 - 2 ; case 25 + .short _0224EF2E - _0224EC86 - 2 ; case 26 + .short _0224EF56 - _0224EC86 - 2 ; case 27 + .short _0224EFA0 - _0224EC86 - 2 ; case 28 + .short _0224EFBE - _0224EC86 - 2 ; case 29 + .short _0224EFE4 - _0224EC86 - 2 ; case 30 + .short _0224F008 - _0224EC86 - 2 ; case 31 + .short _0224F01E - _0224EC86 - 2 ; case 32 +_0224ECC8: + bl ov23_0224219C + bl ov23_02254044 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E9C4 + b _0224F038 +_0224ECDA: + add r0, r4, #0 + mov r1, #0xc + add r0, #0x2e + strb r1, [r0] + ldr r0, _0224EFD4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _0224ECFE + add r0, r4, #0 + mov r1, #8 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #8 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224ECFE: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #5 + bne _0224ED12 + add r0, r4, #0 + mov r1, #5 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224ED12: + cmp r0, #0x16 + bne _0224EE0A + add r0, r4, #0 + mov r1, #0x16 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224ED20: + add r0, r4, #0 + mov r1, #0x18 + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #6 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224ED32: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EE0A + add r0, r4, #0 + mov r1, #7 + add r0, #0x34 + strb r1, [r0] + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #4] + ldr r1, _0224EFD8 ; =0x0225688C + ldr r0, [r0, #8] + ldr r2, _0224EFDC ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x20] + b _0224F038 +_0224ED5C: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E8FC + b _0224F038 +_0224ED66: + add r0, r4, #0 + mov r1, #0xf + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #9 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224ED78: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EE0A + ldr r0, _0224EFD4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224EE0A + add r0, r4, #0 + mov r1, #4 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224ED98: + bl ov23_022539D8 + cmp r0, #0 + beq _0224EE0A + bl ov23_0224219C + bl ov23_02254044 + ldrh r0, [r4, #0x2c] + bl sub_02032EE8 + add r1, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r2, _0224EFE0 ; =ov23_0224EC48 + ldr r0, [r0, #8] + add r3, r4, #0 + bl ov23_02253834 + add r0, r4, #0 + mov r1, #0xb + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EDCA: + bl ov23_022539E8 + ldrh r1, [r4, #0x2c] + add r0, r4, #0 + mov r2, #0x1a + bl ov23_0224EA44 + add r0, r4, #0 + mov r1, #0xd + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EDE2: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EE0A + add r0, r4, #0 + mov r1, #0xd + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0xe + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EE00: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #0xe + beq _0224EE0C +_0224EE0A: + b _0224F038 +_0224EE0C: + add r0, r4, #0 + mov r1, #0xf + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EE16: + add r0, r4, #0 + mov r1, #0x1b + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #2 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EE28: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EF12 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x34 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0x2a + bl ov23_0224DC40 + b _0224F038 +_0224EE46: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EF12 + add r0, r4, #0 + mov r1, #0x12 + add r0, #0x34 + strb r1, [r0] + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #4] + ldr r1, _0224EFD8 ; =0x0225688C + ldr r0, [r0, #8] + ldr r2, _0224EFDC ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x20] + b _0224F038 +_0224EE70: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224E93C + b _0224F038 +_0224EE7A: + add r0, r4, #0 + bl ov23_0224EA70 + add r0, r4, #0 + mov r1, #0x14 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EE8A: + add r0, r4, #0 + mov r1, #0x15 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EE94: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EF12 + ldr r0, _0224EFD4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224EF12 + add r0, r4, #0 + mov r1, #0xf + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EEBC: + add r0, r4, #0 + mov r1, #0x8f + bl ov23_0224DC90 + add r0, r4, #0 + add r0, #0x34 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EED4: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224EF12 + add r0, r4, #0 + add r0, #0x2e + ldrb r6, [r0] + cmp r6, #0xc + beq _0224EF12 + bl ov23_0224219C + add r1, r6, #0 + bl ov23_022540B0 + add r0, r4, #0 + mov r1, #0x90 + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #0x18 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EF06: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + beq _0224EF14 +_0224EF12: + b _0224F038 +_0224EF14: + add r0, r4, #0 + bl ov23_0224EAA4 + add r0, r4, #0 + mov r1, #0x19 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EF24: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224EB74 + b _0224F038 +_0224EF2E: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224F038 + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #0x1b + bne _0224F038 + add r0, r4, #0 + mov r1, #0x25 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0x1b + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EF56: + bl ov23_0224219C + add r1, r4, #0 + add r1, #0x30 + ldrb r1, [r1] + bl ov23_022540C8 + bl ov23_0224219C + add r2, r4, #0 + add r2, #0x2f + ldrb r2, [r2] + mov r1, #6 + bl ov23_022540E0 + add r0, r4, #0 + add r0, #0x2f + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0x30 + ldrb r0, [r0] + cmp r1, r0 + bne _0224EF8E + add r0, r4, #0 + mov r1, #0x94 + bl ov23_0224DC90 + b _0224EF96 +_0224EF8E: + add r0, r4, #0 + mov r1, #0x93 + bl ov23_0224DC90 +_0224EF96: + add r0, r4, #0 + mov r1, #0x1c + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EFA0: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224F038 + add r0, r4, #0 + mov r1, #0x95 + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #0x1d + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224EFBE: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224F038 + add r0, r4, #0 + mov r1, #0x1e + add r0, #0x34 + strb r1, [r0] + b _0224F038 + ; .align 2, 0 +_0224EFD4: .word 0x021BF67C +_0224EFD8: .word 0x0225688C +_0224EFDC: .word 0x000003D9 +_0224EFE0: .word ov23_0224EC48 +_0224EFE4: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #0x64 + bne _0224F038 + add r0, r4, #0 + mov r1, #0x64 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0x96 + bl ov23_0224DC90 + add r0, r4, #0 + mov r1, #0x1f + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224F008: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224F038 + add r0, r4, #0 + mov r1, #0x20 + add r0, #0x34 + strb r1, [r0] + b _0224F038 +_0224F01E: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #0x65 + bne _0224F038 + add r0, r4, #0 + mov r1, #0x65 + bl ov23_0224DC40 + add r0, r4, #0 + mov r1, #0xf + add r0, #0x34 + strb r1, [r0] +_0224F038: + add r0, r4, #0 + add r0, #0x35 + ldrb r0, [r0] + cmp r0, #8 + bne _0224F076 + add r0, r4, #0 + add r0, #0x34 + ldrb r0, [r0] + cmp r0, #4 + beq _0224F076 + cmp r0, #9 + beq _0224F076 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224F060 + mov r1, #4 + bl sub_02002154 + mov r0, #0 + str r0, [r4, #0x20] +_0224F060: + add r0, r5, #0 + add r1, r4, #0 + bl ov23_0224EA08 + add r0, r4, #0 + mov r1, #8 + add r0, #0x34 + strb r1, [r0] + mov r0, #0 + add r4, #0x35 + strb r0, [r4] +_0224F076: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_0224EC50 + + thumb_func_start ov23_0224F07C +ov23_0224F07C: ; 0x0224F07C + push {r4, r5, r6, lr} + ldr r0, _0224F0E4 ; =0x022577B0 + add r5, r1, #0 + ldr r0, [r0, #0] + add r6, r2, #0 + cmp r0, #0 + beq _0224F090 + bl sub_02022974 + pop {r4, r5, r6, pc} +_0224F090: + mov r0, #0x21 + mov r1, #0x38 + bl sub_02018144 + mov r1, #0 + mov r2, #0x38 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, _0224F0E4 ; =0x022577B0 + mov r1, #2 + str r4, [r0, #0] + str r6, [r4, #4] + add r0, r4, #0 + strh r5, [r4, #0x2c] + add r0, #0x34 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0x35 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0xc + add r0, #0x2e + strb r1, [r0] + bl ov23_0224219C + mov r2, #0 + mov r1, #0x16 + add r3, r2, #0 + bl ov23_02253F40 + bl sub_02059624 + ldr r0, _0224F0E8 ; =ov23_0224EC50 + ldr r2, _0224F0EC ; =0x00002710 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0] + pop {r4, r5, r6, pc} + nop +_0224F0E4: .word 0x022577B0 +_0224F0E8: .word ov23_0224EC50 +_0224F0EC: .word 0x00002710 + thumb_func_end ov23_0224F07C + + thumb_func_start ov23_0224F0F0 +ov23_0224F0F0: ; 0x0224F0F0 + ldr r3, _0224F0F8 ; =sub_02035B48 + mov r0, #0x4b + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_0224F0F8: .word sub_02035B48 + thumb_func_end ov23_0224F0F0 + + thumb_func_start ov23_0224F0FC +ov23_0224F0FC: ; 0x0224F0FC + ldr r3, _0224F104 ; =sub_02035B48 + mov r0, #0x4c + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_0224F104: .word sub_02035B48 + thumb_func_end ov23_0224F0FC + + thumb_func_start ov23_0224F108 +ov23_0224F108: ; 0x0224F108 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0224F132 + ldr r0, _0224F134 ; =0x022577B0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224F132 + cmp r5, #2 + beq _0224F128 + bl sub_02022974 +_0224F128: + ldr r0, _0224F134 ; =0x022577B0 + ldrb r1, [r4, #1] + ldr r0, [r0, #0] + add r0, #0x35 + strb r1, [r0] +_0224F132: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224F134: .word 0x022577B0 + thumb_func_end ov23_0224F108 + + thumb_func_start ov23_0224F138 +ov23_0224F138: ; 0x0224F138 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _0224F16E + ldr r0, _0224F170 ; =0x022577B0 + ldr r0, [r0, #4] + cmp r0, #0 + beq _0224F16E + cmp r5, #2 + beq _0224F158 + bl sub_02022974 +_0224F158: + ldr r0, _0224F170 ; =0x022577B0 + ldr r0, [r0, #4] + cmp r0, #0 + bne _0224F164 + bl sub_02022974 +_0224F164: + ldr r0, _0224F170 ; =0x022577B0 + ldrb r1, [r4, #1] + ldr r0, [r0, #4] + add r0, #0x38 + strb r1, [r0] +_0224F16E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224F170: .word 0x022577B0 + thumb_func_end ov23_0224F138 + + thumb_func_start ov23_0224F174 +ov23_0224F174: ; 0x0224F174 + mov r0, #2 + bx lr + thumb_func_end ov23_0224F174 + + thumb_func_start ov23_0224F178 +ov23_0224F178: ; 0x0224F178 + ldr r3, _0224F180 ; =sub_02035B48 + mov r0, #0x4e + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_0224F180: .word sub_02035B48 + thumb_func_end ov23_0224F178 + + thumb_func_start ov23_0224F184 +ov23_0224F184: ; 0x0224F184 + push {r3, r4, r5, lr} + ldr r0, _0224F1F4 ; =0x022577B0 + add r5, r2, #0 + ldr r4, [r0, #0] + bl sub_0203608C + ldrb r1, [r5] + cmp r1, r0 + bne _0224F1F2 + ldr r0, _0224F1F4 ; =0x022577B0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0224F1A2 + bl sub_02022974 +_0224F1A2: + add r0, r4, #0 + add r0, #0x34 + ldrb r0, [r0] + cmp r0, #2 + beq _0224F1BC + add r0, r4, #0 + mov r1, #8 + bl ov23_0224DC40 + mov r0, #8 + add r4, #0x34 + strb r0, [r4] + pop {r3, r4, r5, pc} +_0224F1BC: + ldrb r1, [r5] + add r0, r4, #0 + add r0, #0x24 + strb r1, [r0] + add r0, r4, #0 + ldrb r1, [r5, #1] + add r0, #0x25 + strb r1, [r0] + add r0, r4, #0 + ldrb r1, [r5, #2] + add r0, #0x26 + add r4, #0x34 + strb r1, [r0] + mov r0, #0x11 + strb r0, [r4] + bl ov23_0224219C + ldrb r1, [r5, #2] + bl ov23_022540F4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x1c + add r3, r2, #0 + bl ov23_02253F40 +_0224F1F2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224F1F4: .word 0x022577B0 + thumb_func_end ov23_0224F184 + + thumb_func_start ov23_0224F1F8 +ov23_0224F1F8: ; 0x0224F1F8 + mov r0, #3 + bx lr + thumb_func_end ov23_0224F1F8 + + thumb_func_start ov23_0224F1FC +ov23_0224F1FC: ; 0x0224F1FC + ldr r3, _0224F204 ; =sub_02035B48 + mov r0, #0x50 + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_0224F204: .word sub_02035B48 + thumb_func_end ov23_0224F1FC + + thumb_func_start ov23_0224F208 +ov23_0224F208: ; 0x0224F208 + push {r4, r5, r6, lr} + ldr r0, _0224F244 ; =0x022577B0 + add r5, r2, #0 + ldr r4, [r0, #0] + ldr r6, [r0, #4] + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _0224F242 + ldrb r0, [r5, #2] + cmp r0, #0 + beq _0224F22C + cmp r0, #1 + beq _0224F234 + cmp r0, #2 + beq _0224F23C + pop {r4, r5, r6, pc} +_0224F22C: + ldrb r0, [r5] + add r4, #0x2e + strb r0, [r4] + pop {r4, r5, r6, pc} +_0224F234: + ldrb r0, [r5] + add r6, #0x33 + strb r0, [r6] + pop {r4, r5, r6, pc} +_0224F23C: + ldrb r0, [r5] + add r4, #0x30 + strb r0, [r4] +_0224F242: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224F244: .word 0x022577B0 + thumb_func_end ov23_0224F208 + + thumb_func_start ov23_0224F248 +ov23_0224F248: ; 0x0224F248 + mov r0, #3 + bx lr + thumb_func_end ov23_0224F248 + + thumb_func_start ov23_0224F24C +ov23_0224F24C: ; 0x0224F24C + push {r3, lr} + ldr r0, _0224F26C ; =0x022577B0 + ldr r1, [r0, #4] + cmp r1, #0 + beq _0224F25C + ldr r0, [r1, #0] + bl ov23_0224DDE4 +_0224F25C: + ldr r0, _0224F26C ; =0x022577B0 + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224F26A + ldr r0, [r1, #0] + bl ov23_0224E9C4 +_0224F26A: + pop {r3, pc} + ; .align 2, 0 +_0224F26C: .word 0x022577B0 + thumb_func_end ov23_0224F24C + + thumb_func_start ov23_0224F270 +ov23_0224F270: ; 0x0224F270 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r1, r5, #0 + ldr r0, [r5, #0x20] + add r1, #0x3a + ldrh r4, [r5, #0x3a] + bl sub_020014D0 + ldrh r0, [r5, #0x3a] + cmp r4, r0 + beq _0224F28C + ldr r0, _0224F290 ; =0x000005DC + bl sub_02005748 +_0224F28C: + pop {r3, r4, r5, pc} + nop +_0224F290: .word 0x000005DC + thumb_func_end ov23_0224F270 + + .rodata + + + .global Unk_ov23_02256888 +Unk_ov23_02256888: ; 0x02256888 + .incbin "incbin/overlay23_rodata.bin", 0x57C, 0x580 - 0x57C + + .global Unk_ov23_0225688C +Unk_ov23_0225688C: ; 0x0225688C + .incbin "incbin/overlay23_rodata.bin", 0x580, 0x588 - 0x580 + + .global Unk_ov23_02256894 +Unk_ov23_02256894: ; 0x02256894 + .incbin "incbin/overlay23_rodata.bin", 0x588, 0x5A8 - 0x588 + + .global Unk_ov23_022568B4 +Unk_ov23_022568B4: ; 0x022568B4 + .incbin "incbin/overlay23_rodata.bin", 0x5A8, 0x20 + + + .bss + + + .global Unk_ov23_022577B0 +Unk_ov23_022577B0: ; 0x022577B0 + .space 0x4 + + .global Unk_ov23_022577B4 +Unk_ov23_022577B4: ; 0x022577B4 + .space 0x4 + diff --git a/asm/ov23_0224F294.s b/asm/ov23_0224F294.s new file mode 100644 index 000000000..fc78311db --- /dev/null +++ b/asm/ov23_0224F294.s @@ -0,0 +1,4009 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0224F294 +ov23_0224F294: ; 0x0224F294 + push {r4, r5, r6, r7, lr} + sub sp, #0xb4 + ldr r3, _0224F44C ; =0x022568EC + str r2, [sp, #0x14] + add r2, sp, #0x9c + str r0, [sp, #0xc] + str r1, [sp, #0x10] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0x42 + mov r1, #0xb + bl sub_02006C24 + add r4, r0, #0 + ldr r0, [sp, #0xc] + add r1, sp, #0x9c + add r0, #0x74 + mov r2, #8 + mov r3, #0xb + bl ov5_021D3190 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xe3 + lsl r0, r0, #6 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r0, #0x74 + mov r2, #9 + mov r3, #0 + bl ov5_021D32E8 + mov r0, #0xe3 + lsl r0, r0, #6 + str r0, [sp] + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r0, #0x74 + mov r2, #1 + mov r3, #0 + bl ov5_021D3374 + mov r0, #0xe3 + lsl r0, r0, #6 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r2, #0 + add r0, #0x74 + add r1, r4, #0 + add r3, r2, #0 + bl ov5_021D339C + mov r0, #1 + str r0, [sp] + mov r0, #0xe3 + lsl r0, r0, #6 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r0, #0x74 + mov r2, #2 + mov r3, #0 + bl ov5_021D3414 + ldr r0, [sp, #0xc] + ldr r1, _0224F450 ; =0x0225695C + add r0, #0x74 + bl ov5_021D3584 + mov r2, #0x76 + ldr r1, [sp, #0xc] + lsl r2, r2, #2 + str r0, [r1, r2] + add r0, r1, #0 + ldr r0, [r0, r2] + add r2, #0x60 + ldrh r1, [r1, r2] + ldr r0, [r0, #0] + bl ov23_0224F4D0 + ldr r0, _0224F454 ; =0x000038C1 + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r2, #8 + add r0, #0x74 + mov r3, #0 + bl ov5_021D3374 + ldr r0, _0224F454 ; =0x000038C1 + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0xc] + mov r2, #7 + add r0, #0x74 + mov r3, #0 + bl ov5_021D339C + mov r0, #1 + str r0, [sp] + ldr r0, _0224F454 ; =0x000038C1 + add r1, r4, #0 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + mov r2, #0xa + add r0, #0x74 + mov r3, #0 + bl ov5_021D3414 + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, [sp, #0x14] + mov r4, #0 + cmp r0, #0 + bls _0224F416 + ldr r5, [sp, #0xc] + ldr r3, _0224F458 ; =0x02256990 + add r7, r4, #0 + add r2, sp, #0x28 + mov r6, #6 +_0224F394: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _0224F394 + ldr r0, [r3, #0] + ldr r3, _0224F45C ; =0x022568E0 + str r0, [r2, #0] + ldmia r3!, {r0, r1} + add r2, sp, #0x1c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #0xc] + str r0, [sp, #0x18] + add r0, #0x74 + str r0, [sp, #0x18] +_0224F3B4: + add r6, sp, #0x28 + add r3, sp, #0x68 + mov r2, #6 +_0224F3BA: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224F3BA + ldr r0, [r6, #0] + add r1, sp, #0x68 + str r0, [r3, #0] + mov r0, #2 + ldrsh r0, [r1, r0] + add r1, r0, r7 + add r0, sp, #0x68 + strh r1, [r0, #2] + ldr r0, [sp, #0x10] + ldrb r1, [r0, r4] + lsl r0, r1, #1 + add r1, r1, r0 + add r0, sp, #0x68 + strh r1, [r0, #6] + ldr r0, [sp, #0x18] + add r1, sp, #0x68 + bl ov5_021D3584 + mov r1, #0x77 + lsl r1, r1, #2 + add r2, sp, #0x5c + add r3, sp, #0x1c + str r0, [r5, r1] + ldmia r3!, {r0, r1} + add r6, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r6, #0 + str r0, [r2, #0] + mov r0, #0x77 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #1 + ldr r0, [r0, #0] + bl sub_02021C80 + ldr r0, [sp, #0x14] + add r4, r4, #1 + add r7, #0x18 + add r5, r5, #4 + cmp r4, r0 + blo _0224F3B4 +_0224F416: + mov r1, #0x8e + ldr r0, [sp, #0xc] + lsl r1, r1, #2 + ldrh r0, [r0, r1] + sub r1, #0x60 + add r0, r0, #1 + lsl r2, r0, #2 + ldr r0, [sp, #0xc] + add r0, r0, r2 + ldr r0, [r0, r1] + mov r1, #2 + ldr r0, [r0, #0] + mov r2, #1 + bl ov23_0224F500 + ldr r0, [sp, #0x14] + mov r1, #0x7e + add r2, r0, #1 + ldr r0, [sp, #0xc] + lsl r1, r1, #2 + str r2, [r0, r1] + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + add sp, #0xb4 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224F44C: .word 0x022568EC +_0224F450: .word 0x0225695C +_0224F454: .word 0x000038C1 +_0224F458: .word 0x02256990 +_0224F45C: .word 0x022568E0 + thumb_func_end ov23_0224F294 + + thumb_func_start ov23_0224F460 +ov23_0224F460: ; 0x0224F460 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + bls _0224F48E + mov r7, #0x76 + lsl r7, r7, #2 + add r6, r7, #0 + add r6, #0x20 +_0224F478: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r7] + bl sub_0200D0F4 + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, r6] + cmp r4, r0 + blo _0224F478 +_0224F48E: + add r5, #0x74 + add r0, r5, #0 + bl ov5_021D375C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0224F460 + + thumb_func_start ov23_0224F498 +ov23_0224F498: ; 0x0224F498 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + bls _0224F4CC + mov r7, #0x76 + lsl r7, r7, #2 + add r6, r7, #0 + add r6, #0x20 +_0224F4B0: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r7] + mov r1, #1 + ldr r0, [r0, #0] + lsl r1, r1, #0xc + bl sub_02021E2C + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [r5, r6] + cmp r4, r0 + blo _0224F4B0 +_0224F4CC: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F498 + + thumb_func_start ov23_0224F4D0 +ov23_0224F4D0: ; 0x0224F4D0 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + mov r0, #0x18 + mul r0, r4 + add r0, #0x14 + lsl r0, r0, #0xc + str r0, [sp, #4] + add r0, r5, #0 + bl sub_02021C50 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov23_0224F4D0 + + thumb_func_start ov23_0224F500 +ov23_0224F500: ; 0x0224F500 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl sub_02021E24 + mov r1, #3 + bl sub_020E2178 + add r2, r0, #0 + lsl r1, r2, #1 + add r1, r2, r1 + add r0, r5, #0 + add r1, r4, r1 + bl sub_02021D6C + add r0, r5, #0 + add r1, r6, #0 + bl sub_02021EC4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F500 + + thumb_func_start ov23_0224F52C +ov23_0224F52C: ; 0x0224F52C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #1 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x76 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + add r4, r2, #0 + ldr r0, [r0, #0] + add r2, r1, #0 + bl ov23_0224F500 + add r0, r4, #1 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x76 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + ldr r0, [r0, #0] + add r2, r1, #0 + bl ov23_0224F500 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0224F52C + + thumb_func_start ov23_0224F560 +ov23_0224F560: ; 0x0224F560 + push {r4, lr} + add r4, r0, #0 + bl sub_02021E24 + mov r1, #3 + bl sub_020E2178 + cmp r1, #1 + bne _0224F586 + add r0, r4, #0 + bl sub_02021FD0 + cmp r0, #0 + bne _0224F586 + add r0, r4, #0 + mov r1, #2 + mov r2, #1 + bl ov23_0224F500 +_0224F586: + pop {r4, pc} + thumb_func_end ov23_0224F560 + + thumb_func_start ov23_0224F588 +ov23_0224F588: ; 0x0224F588 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xf + mov r1, #8 + bl sub_02018144 + ldr r1, _0224F5B4 ; =0x022577B8 + mov r2, #8 + str r0, [r1, #0] + mov r1, #0 + bl sub_020C4CF4 + ldr r0, _0224F5B4 ; =0x022577B8 + mov r2, #0 + ldr r1, [r0, #0] + strb r2, [r1, #4] + ldr r1, [r0, #0] + strb r2, [r1, #5] + ldr r0, [r0, #0] + str r4, [r0, #0] + pop {r4, pc} + nop +_0224F5B4: .word 0x022577B8 + thumb_func_end ov23_0224F588 + + thumb_func_start ov23_0224F5B8 +ov23_0224F5B8: ; 0x0224F5B8 + ldr r0, _0224F5C0 ; =0x022577B8 + ldr r3, _0224F5C4 ; =sub_020181C4 + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0224F5C0: .word 0x022577B8 +_0224F5C4: .word sub_020181C4 + thumb_func_end ov23_0224F5B8 + + thumb_func_start ov23_0224F5C8 +ov23_0224F5C8: ; 0x0224F5C8 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0203D174 + bl sub_020298B0 + bl sub_02028E28 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F5C8 + + thumb_func_start ov23_0224F5DC +ov23_0224F5DC: ; 0x0224F5DC + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0203D174 + bl sub_020298B0 + bl sub_020289A0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F5DC + + thumb_func_start ov23_0224F5F0 +ov23_0224F5F0: ; 0x0224F5F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_020289B8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F5F0 + + thumb_func_start ov23_0224F608 +ov23_0224F608: ; 0x0224F608 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0203D174 + bl sub_020298B0 + bl sub_02028B70 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F608 + + thumb_func_start ov23_0224F61C +ov23_0224F61C: ; 0x0224F61C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_02028B88 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F61C + + thumb_func_start ov23_0224F634 +ov23_0224F634: ; 0x0224F634 + push {r3, lr} + ldr r1, _0224F654 ; =0x022577B8 + ldr r1, [r1, #0] + ldrb r1, [r1, #5] + cmp r1, r0 + beq _0224F644 + bl sub_02022974 +_0224F644: + ldr r0, _0224F654 ; =0x022577B8 + ldr r1, [r0, #0] + ldr r0, [r1, #0] + ldrb r1, [r1, #4] + bl sub_02028B94 + pop {r3, pc} + nop +_0224F654: .word 0x022577B8 + thumb_func_end ov23_0224F634 + + thumb_func_start ov23_0224F658 +ov23_0224F658: ; 0x0224F658 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0203D174 + bl sub_020298B0 + bl sub_02028C3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F658 + + thumb_func_start ov23_0224F66C +ov23_0224F66C: ; 0x0224F66C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_02028E44 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F66C + + thumb_func_start ov23_0224F684 +ov23_0224F684: ; 0x0224F684 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_02028C54 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F684 + + thumb_func_start ov23_0224F69C +ov23_0224F69C: ; 0x0224F69C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_02028C60 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F69C + + thumb_func_start ov23_0224F6B4 +ov23_0224F6B4: ; 0x0224F6B4 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0203D174 + bl sub_020298B0 + bl sub_02028D58 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F6B4 + + thumb_func_start ov23_0224F6C8 +ov23_0224F6C8: ; 0x0224F6C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_02028D74 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224F6C8 + + thumb_func_start ov23_0224F6E0 +ov23_0224F6E0: ; 0x0224F6E0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0xb + blt _0224F6EE + bl sub_02022974 +_0224F6EE: + cmp r5, #6 + blt _0224F6F4 + sub r5, r5, #5 +_0224F6F4: + cmp r4, #0x63 + ble _0224F6FA + mov r4, #0x63 +_0224F6FA: + ldr r0, _0224F70C ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + ldr r0, [r0, #0] + bl sub_02028CB0 + pop {r3, r4, r5, pc} + nop +_0224F70C: .word 0x022577B8 + thumb_func_end ov23_0224F6E0 + + thumb_func_start ov23_0224F710 +ov23_0224F710: ; 0x0224F710 + push {r4, lr} + add r4, r0, #0 + cmp r4, #0x3c + blt _0224F71C + bl sub_02022974 +_0224F71C: + ldr r0, _0224F72C ; =0x022577B8 + add r1, r4, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_02028DB4 + pop {r4, pc} + nop +_0224F72C: .word 0x022577B8 + thumb_func_end ov23_0224F710 + + thumb_func_start ov23_0224F730 +ov23_0224F730: ; 0x0224F730 + add r1, r0, #0 + ldr r0, _0224F73C ; =0x022577B8 + ldr r3, _0224F740 ; =sub_02028E84 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0224F73C: .word 0x022577B8 +_0224F740: .word sub_02028E84 + thumb_func_end ov23_0224F730 + + thumb_func_start ov23_0224F744 +ov23_0224F744: ; 0x0224F744 + add r1, r0, #0 + ldr r0, _0224F750 ; =0x022577B8 + ldr r3, _0224F754 ; =sub_02028BC8 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0224F750: .word 0x022577B8 +_0224F754: .word sub_02028BC8 + thumb_func_end ov23_0224F744 + + thumb_func_start ov23_0224F758 +ov23_0224F758: ; 0x0224F758 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _0224F7C4 ; =0x000005FD + add r6, r1, #0 + bl sub_02005748 + mov r0, #2 + bl ov23_022430D0 + mov r1, #0x25 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x25 + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x7f + str r6, [r4, #0xc] + lsl r0, r0, #2 + str r5, [r4, r0] + mov r1, #0 + add r0, #0x4a + strb r1, [r4, r0] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x68] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x6c] + mov r0, #4 + bl sub_0200B358 + str r0, [r4, #0x70] + ldr r0, _0224F7C8 ; =ov23_0224F914 + ldr r2, _0224F7CC ; =0x00002710 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r1, [r4, #4] + ldr r2, _0224F7D0 ; =ov23_02251270 + add r0, r4, #0 + bl ov23_022431EC + pop {r4, r5, r6, pc} + nop +_0224F7C4: .word 0x000005FD +_0224F7C8: .word ov23_0224F914 +_0224F7CC: .word 0x00002710 +_0224F7D0: .word ov23_02251270 + thumb_func_end ov23_0224F758 + + thumb_func_start ov23_0224F7D4 +ov23_0224F7D4: ; 0x0224F7D4 + mov r1, #0 + strb r1, [r0] + mov r1, #1 + strb r1, [r0, #1] + mov r1, #2 + strb r1, [r0, #2] + mov r1, #3 + strb r1, [r0, #3] + mov r1, #4 + strb r1, [r0, #4] + mov r1, #5 + strb r1, [r0, #5] + mov r1, #6 + strb r1, [r0, #6] + mov r0, #7 + bx lr + thumb_func_end ov23_0224F7D4 + + thumb_func_start ov23_0224F7F4 +ov23_0224F7F4: ; 0x0224F7F4 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r0, sp, #0x18 + bl ov23_0224F7D4 + mov r0, #7 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r0, #1 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0x15 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224F904 ; =0x000002E7 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + add r1, #0x10 + ldr r0, [r0, #8] + mov r2, #3 + mov r3, #0x14 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224F908 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + bl ov23_0224219C + bl ov23_02253E3C + ldr r4, _0224F90C ; =0x02256924 + str r0, [sp, #0x14] + mov r6, #0 +_0224F84A: + cmp r6, #4 + bne _0224F872 + ldr r0, [r5, #0xc] + bl sub_0203D174 + bl sub_02025E38 + mov r1, #4 + bl sub_02025F04 + add r7, r0, #0 + ldr r0, [r5, #0x40] + ldr r2, [r4, #4] + add r1, r7, #0 + bl sub_02013A6C + add r0, r7, #0 + bl sub_020237BC + b _0224F87E +_0224F872: + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x14] + ldr r2, [r4, #0] + ldr r3, [r4, #4] + bl sub_02013A4C +_0224F87E: + add r6, r6, #1 + add r4, #8 + cmp r6, #7 + blo _0224F84A + ldr r0, [r5, #0xc] + mov r3, #0x8e + add r0, #0x90 + ldr r0, [r0, #0] + lsl r3, r3, #2 + strh r0, [r5, r3] + ldr r0, [r5, #0x40] + mov r1, #1 + str r0, [sp, #0x20] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x24] + add r0, sp, #0x18 + strb r1, [r0, #0x10] + strb r1, [r0, #0x11] + mov r1, #7 + strb r1, [r0, #0x12] + ldrb r2, [r0, #0x13] + mov r1, #0xf + bic r2, r1 + mov r1, #8 + orr r1, r2 + strb r1, [r0, #0x13] + ldrb r2, [r0, #0x13] + mov r1, #0x30 + bic r2, r1 + mov r1, #0x10 + orr r1, r2 + strb r1, [r0, #0x13] + ldrb r2, [r0, #0x13] + mov r1, #0xc0 + bic r2, r1 + mov r1, #0x40 + orr r1, r2 + strb r1, [r0, #0x13] + mov r0, #0xb + str r0, [sp] + ldr r0, _0224F910 ; =0x00000402 + mov r1, #0x1c + str r0, [sp, #4] + ldrh r3, [r5, r3] + add r0, sp, #0x20 + mov r2, #4 + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_02001AF4 + str r0, [r5, #0x54] + mov r0, #0 + str r0, [r5, #0x48] + add r0, r5, #0 + add r0, #0x10 + bl sub_0201A9A4 + add r0, r5, #0 + add r1, sp, #0x18 + mov r2, #7 + bl ov23_0224F294 + bl sub_020594FC + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224F904: .word 0x000002E7 +_0224F908: .word 0x000003D9 +_0224F90C: .word 0x02256924 +_0224F910: .word 0x00000402 + thumb_func_end ov23_0224F7F4 + + thumb_func_start ov23_0224F914 +ov23_0224F914: ; 0x0224F914 + push {r3, r4, r5, lr} + ldr r2, _0224FA4C ; =0x00000246 + add r4, r1, #0 + ldrb r2, [r4, r2] + add r5, r0, #0 + cmp r2, #0x13 + bls _0224F924 + b _0224FA4A +_0224F924: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224F930: ; jump table + .short _0224F958 - _0224F930 - 2 ; case 0 + .short _0224F968 - _0224F930 - 2 ; case 1 + .short _0224F96E - _0224F930 - 2 ; case 2 + .short _0224F984 - _0224F930 - 2 ; case 3 + .short _0224FA4A - _0224F930 - 2 ; case 4 + .short _0224F99A - _0224F930 - 2 ; case 5 + .short _0224F9A0 - _0224F930 - 2 ; case 6 + .short _0224F9A6 - _0224F930 - 2 ; case 7 + .short _0224F9AC - _0224F930 - 2 ; case 8 + .short _0224F9B2 - _0224F930 - 2 ; case 9 + .short _0224FA4A - _0224F930 - 2 ; case 10 + .short _0224F9B8 - _0224F930 - 2 ; case 11 + .short _0224F9BE - _0224F930 - 2 ; case 12 + .short _0224F9C4 - _0224F930 - 2 ; case 13 + .short _0224F9F2 - _0224F930 - 2 ; case 14 + .short _0224FA18 - _0224F930 - 2 ; case 15 + .short _0224FA3A - _0224F930 - 2 ; case 16 + .short _0224FA40 - _0224F930 - 2 ; case 17 + .short _0224FA34 - _0224F930 - 2 ; case 18 + .short _0224FA46 - _0224F930 - 2 ; case 19 +_0224F958: + add r0, r4, #0 + bl ov23_0224F7F4 + ldr r0, _0224FA4C ; =0x00000246 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} +_0224F968: + bl ov23_0224FA58 + pop {r3, r4, r5, pc} +_0224F96E: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_02243204 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov23_02250B34 + pop {r3, r4, r5, pc} +_0224F984: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_02243204 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov23_02250B34 + pop {r3, r4, r5, pc} +_0224F99A: + bl ov23_0224FF58 + pop {r3, r4, r5, pc} +_0224F9A0: + bl ov23_02250378 + pop {r3, r4, r5, pc} +_0224F9A6: + bl ov23_02250704 + pop {r3, r4, r5, pc} +_0224F9AC: + bl ov23_02250EAC + pop {r3, r4, r5, pc} +_0224F9B2: + bl ov23_022510F0 + pop {r3, r4, r5, pc} +_0224F9B8: + bl ov23_02250998 + pop {r3, r4, r5, pc} +_0224F9BE: + bl ov23_022509D4 + pop {r3, r4, r5, pc} +_0224F9C4: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224FA4A + ldr r0, _0224FA50 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224FA4A + bl ov23_0224219C + bl ov23_02254044 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov23_02250B34 + bl ov23_02243204 + pop {r3, r4, r5, pc} +_0224F9F2: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _0224FA4A + ldr r0, _0224FA50 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0224FA4A + ldr r1, [r4, #0] + add r0, r4, #0 + blx r1 + ldr r0, _0224FA54 ; =0x00000245 + ldrb r1, [r4, r0] + add r0, r0, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} +_0224FA18: + add r0, r4, #0 + bl ov23_0224FB7C + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov23_02250B34 + bl ov23_02243204 + ldr r0, [r4, #0xc] + bl sub_02054064 + pop {r3, r4, r5, pc} +_0224FA34: + bl ov23_02250048 + pop {r3, r4, r5, pc} +_0224FA3A: + bl ov23_0225044C + pop {r3, r4, r5, pc} +_0224FA40: + bl ov23_022507D8 + pop {r3, r4, r5, pc} +_0224FA46: + bl ov23_02250F8C +_0224FA4A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224FA4C: .word 0x00000246 +_0224FA50: .word 0x021BF67C +_0224FA54: .word 0x00000245 + thumb_func_end ov23_0224F914 + + thumb_func_start ov23_0224FA58 +ov23_0224FA58: ; 0x0224FA58 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #0x54] + bl sub_02001DC4 + add r5, r0, #0 + mov r1, #0x5e + ldr r0, [r4, #0x54] + lsl r1, r1, #4 + bl sub_02001C94 + mov r1, #0x8f + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, #0x54] + bl sub_02001DC4 + mov r2, #0x8e + lsl r2, r2, #2 + strh r0, [r4, r2] + ldrh r1, [r4, r2] + cmp r5, r1 + beq _0224FAAA + sub r2, #0x60 + ldr r0, [r4, r2] + ldr r0, [r0, #0] + bl ov23_0224F4D0 + mov r2, #0x8e + lsl r2, r2, #2 + ldrh r2, [r4, r2] + add r0, r4, #0 + add r1, r5, #0 + bl ov23_0224F52C + mov r0, #0x8e + lsl r0, r0, #2 + ldrh r1, [r4, r0] + ldr r0, [r4, #0xc] + add r0, #0x90 + str r1, [r0, #0] +_0224FAAA: + mov r0, #0x8e + lsl r0, r0, #2 + ldrh r1, [r4, r0] + sub r0, #0x60 + add r1, r1, #1 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r0, [r1, r0] + ldr r0, [r0, #0] + bl ov23_0224F560 + bl sub_020360F0 + cmp r0, #0 + beq _0224FAD2 + mov r1, #1 + mov r0, #0x8f + mvn r1, r1 + lsl r0, r0, #2 + str r1, [r4, r0] +_0224FAD2: + mov r1, #0x8f + lsl r1, r1, #2 + mov r2, #1 + ldr r0, [r4, r1] + mvn r2, r2 + cmp r0, r2 + beq _0224FAF6 + add r1, r2, #1 + cmp r0, r1 + bne _0224FAFE + add r0, r4, #0 + bl ov23_0224F498 + ldr r0, [r4, #0x74] + bl sub_020219F8 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224FAF6: + mov r0, #2 + add r1, #0xa + strb r0, [r4, r1] + b _0224FB66 +_0224FAFE: + ldr r1, _0224FB6C ; =ov23_0224FDE0 + cmp r0, r1 + beq _0224FB16 + ldr r1, _0224FB70 ; =ov23_022501BC + cmp r0, r1 + beq _0224FB16 + ldr r1, _0224FB74 ; =ov23_02250CD4 + cmp r0, r1 + beq _0224FB16 + ldr r1, _0224FB78 ; =ov23_02250598 + cmp r0, r1 + bne _0224FB3C +_0224FB16: + mov r0, #4 + bl sub_0206A780 + str r0, [r4, #8] + mov r1, #0xc8 + mov r2, #0x14 + mov r3, #0x7a + bl sub_0206A8A0 + mov r1, #0 + ldr r0, [r4, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r4, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_0224FB3C: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224FB5C + add r0, r4, #0 + bl ov23_0224F460 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_02001BC4 + mov r0, #0x7e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_0224FB5C: + mov r1, #0x8f + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r4, #0 + blx r1 +_0224FB66: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_0224FB6C: .word ov23_0224FDE0 +_0224FB70: .word ov23_022501BC +_0224FB74: .word ov23_02250CD4 +_0224FB78: .word ov23_02250598 + thumb_func_end ov23_0224FA58 + + thumb_func_start ov23_0224FB7C +ov23_0224FB7C: ; 0x0224FB7C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x4c] + cmp r0, #0 + beq _0224FB92 + mov r1, #0 + add r2, r1, #0 + bl ov23_02248EF8 + mov r0, #0 + str r0, [r4, #0x4c] +_0224FB92: + ldr r0, [r4, #0x48] + cmp r0, #0 + beq _0224FBA6 + mov r1, #0 + add r2, r1, #0 + bl sub_02001384 + mov r0, #0 + str r0, [r4, #0x48] + b _0224FBC6 +_0224FBA6: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224FBC6 + add r0, r4, #0 + bl ov23_0224F460 + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_02001BC4 + mov r0, #0x7e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_0224FBC6: + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A7CC + cmp r0, #0 + beq _0224FBF8 + add r0, r4, #0 + add r0, #0x10 + mov r1, #1 + bl sub_0200DC9C + ldrb r1, [r4, #0x14] + ldr r0, [r4, #0x10] + bl sub_0201C3C0 + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A8FC + ldr r0, [r4, #0x40] + bl sub_02013A3C + add r0, r4, #0 + bl ov23_02252DF4 +_0224FBF8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224FB7C + + thumb_func_start ov23_0224FBFC +ov23_0224FBFC: ; 0x0224FBFC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r5, r0, #0 + mov r0, #6 + str r0, [sp, #0x1c] + mov r0, #0x19 + mov r7, #0xb + str r0, [sp, #0x18] + cmp r1, #1 + beq _0224FC1A + cmp r1, #2 + beq _0224FC20 + cmp r1, #3 + beq _0224FC28 + b _0224FC32 +_0224FC1A: + mov r6, #3 + ldr r4, _0224FCDC ; =0x02257644 + b _0224FC32 +_0224FC20: + mov r6, #2 + mov r7, #0xd + ldr r4, _0224FCE0 ; =0x02257634 + b _0224FC32 +_0224FC28: + mov r0, #0x14 + ldr r4, _0224FCE4 ; =0x0225765C + mov r6, #3 + str r7, [sp, #0x1c] + str r0, [sp, #0x18] +_0224FC32: + add r0, r6, #0 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x44] + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x1c] + ldr r3, [sp, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + lsl r0, r6, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224FCE8 ; =0x000002E7 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + lsl r3, r3, #0x18 + ldr r0, [r0, #8] + add r1, #0x20 + mov r2, #3 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224FCEC ; =0x000003D9 + add r0, #0x20 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + bl ov23_0224219C + bl ov23_02253E3C + mov r7, #0 + str r0, [sp, #0x14] + cmp r6, #0 + ble _0224FC9E +_0224FC8A: + ldr r0, [r5, #0x44] + ldr r1, [sp, #0x14] + ldr r2, [r4, #0] + ldr r3, [r4, #4] + bl sub_02013A4C + add r7, r7, #1 + add r4, #8 + cmp r7, r6 + blt _0224FC8A +_0224FC9E: + ldr r4, _0224FCF0 ; =0x02256904 + add r3, sp, #0x20 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + lsl r0, r6, #0x10 + lsr r1, r0, #0x10 + add r0, sp, #0x20 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + ldr r0, [r5, #0x44] + mov r1, #0 + str r0, [sp, #0x20] + add r0, r5, #0 + add r0, #0x20 + str r0, [sp, #0x2c] + add r0, r2, #0 + add r2, r1, #0 + mov r3, #4 + str r5, [sp, #0x3c] + bl sub_0200112C + str r0, [r5, #0x50] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224FCDC: .word 0x02257644 +_0224FCE0: .word 0x02257634 +_0224FCE4: .word 0x0225765C +_0224FCE8: .word 0x000002E7 +_0224FCEC: .word 0x000003D9 +_0224FCF0: .word 0x02256904 + thumb_func_end ov23_0224FBFC + + thumb_func_start ov23_0224FCF4 +ov23_0224FCF4: ; 0x0224FCF4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #0 + beq _0224FD1C + mov r1, #0 + add r2, r1, #0 + bl sub_02001384 + add r1, r4, #0 + add r1, #0x24 + ldrb r1, [r1] + ldr r0, [r4, #0x20] + bl sub_0201C3C0 + ldr r0, [r4, #0x44] + bl sub_02013A3C + mov r0, #0 + str r0, [r4, #0x50] +_0224FD1C: + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A7CC + cmp r0, #0 + beq _0224FD3A + add r0, r4, #0 + add r0, #0x20 + mov r1, #1 + bl sub_0200DC9C + add r4, #0x20 + add r0, r4, #0 + bl sub_0201A8FC +_0224FD3A: + pop {r4, pc} + thumb_func_end ov23_0224FCF4 + + thumb_func_start ov23_0224FD3C +ov23_0224FD3C: ; 0x0224FD3C + push {r4, lr} + add r4, r0, #0 + bl ov23_0224FB7C + ldr r0, [r4, #8] + cmp r0, #0 + beq _0224FD52 + bl sub_0206A844 + mov r0, #0 + str r0, [r4, #8] +_0224FD52: + ldr r0, _0224FD64 ; =0x00000246 + mov r1, #0 + strb r1, [r4, r0] + bl ov23_022421DC + bl ov23_02254044 + pop {r4, pc} + nop +_0224FD64: .word 0x00000246 + thumb_func_end ov23_0224FD3C + + thumb_func_start ov23_0224FD68 +ov23_0224FD68: ; 0x0224FD68 + push {r3, lr} + ldr r1, _0224FD80 ; =0x022577B8 + ldr r2, [r1, #0] + ldrb r1, [r2, #5] + cmp r1, r0 + bne _0224FD7C + ldrb r1, [r2, #4] + ldr r0, [r2, #0] + bl sub_02028E50 +_0224FD7C: + pop {r3, pc} + nop +_0224FD80: .word 0x022577B8 + thumb_func_end ov23_0224FD68 + + thumb_func_start ov23_0224FD84 +ov23_0224FD84: ; 0x0224FD84 + push {r4, lr} + add r4, r1, #0 + mov r1, #0x13 + bl sub_02001504 + mov r2, #0x81 + add r1, r0, #0 + lsl r2, r2, #2 + ldr r2, [r1, r2] + add r0, r4, #0 + blx r2 + mov r1, #1 + mvn r1, r1 + cmp r4, r1 + bne _0224FDA6 + mov r4, #0x44 + b _0224FDAA +_0224FDA6: + add r4, r0, #0 + add r4, #0x22 +_0224FDAA: + bl ov23_022421DC + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0224FD84 + + thumb_func_start ov23_0224FDBC +ov23_0224FDBC: ; 0x0224FDBC + mov r1, #2 + ldr r2, _0224FDD4 ; =ov23_0224F5C8 + lsl r1, r1, #8 + str r2, [r0, r1] + ldr r2, _0224FDD8 ; =ov23_0224F66C + add r1, r1, #4 + str r2, [r0, r1] + mov r1, #0 + ldr r3, _0224FDDC ; =ov23_0224FE38 + str r1, [r0, #0x64] + bx r3 + nop +_0224FDD4: .word ov23_0224F5C8 +_0224FDD8: .word ov23_0224F66C +_0224FDDC: .word ov23_0224FE38 + thumb_func_end ov23_0224FDBC + + thumb_func_start ov23_0224FDE0 +ov23_0224FDE0: ; 0x0224FDE0 + push {r4, lr} + add r4, r0, #0 + mov r0, #8 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #8 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r2, _0224FE28 ; =ov23_0224F5C8 + sub r0, #0x30 + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, _0224FE2C ; =ov23_0224F66C + sub r0, #0x2c + str r2, [r4, r0] + ldr r0, _0224FE30 ; =ov23_0224FD84 + str r0, [r4, #0x60] + mov r0, #0 + str r0, [r4, #0x64] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r1, #0x1c + strh r0, [r4, r1] + ldr r1, _0224FE34 ; =0x02028EA9 + add r0, r4, #0 + bl ov23_0224FE38 + pop {r4, pc} + nop +_0224FE28: .word ov23_0224F5C8 +_0224FE2C: .word ov23_0224F66C +_0224FE30: .word ov23_0224FD84 +_0224FE34: .word 0x02028EA9 + thumb_func_end ov23_0224FDE0 + + thumb_func_start ov23_0224FE38 +ov23_0224FE38: ; 0x0224FE38 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r1, [sp, #0x14] + mov r1, #0x81 + add r5, r0, #0 + lsl r1, r1, #2 + ldr r7, [r5, r1] + sub r1, r1, #4 + ldr r1, [r5, r1] + blx r1 + add r6, r0, #0 + add r0, r5, #0 + bl ov23_0224FB7C + bl ov23_022421DC + ldr r1, _0224FF40 ; =0x00000276 + mov r2, #0 + bl ov23_02253DFC + add r0, r6, #1 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224FF44 ; =0x00000257 + add r1, #0x10 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224FF48 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + bl ov23_022421DC + bl ov23_02253E3C + mov r4, #0 + str r0, [sp, #0x18] + cmp r6, #0 + ble _0224FEC0 +_0224FEA8: + add r0, r4, #0 + add r1, r5, #0 + blx r7 + add r2, r0, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, r6 + blt _0224FEA8 +_0224FEC0: + mov r2, #0x22 + add r3, r2, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + sub r3, #0x24 + bl sub_02013A4C + ldr r3, _0224FF4C ; =0x02256904 + add r2, sp, #0x1c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r6, #1 + add r2, sp, #0x1c + strh r0, [r2, #0x10] + mov r1, #6 + strh r1, [r2, #0x12] + ldr r0, [r5, #0x40] + str r0, [sp, #0x1c] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x28] + ldr r0, [r5, #0x60] + str r0, [sp, #0x20] + ldr r0, [r5, #0x64] + str r0, [sp, #0x24] + str r5, [sp, #0x38] + ldrh r2, [r2, #0x10] + add r0, r5, #0 + bl ov23_02251238 + ldr r0, [sp, #0x14] + mov r2, #0x23 + str r0, [sp] + ldr r0, _0224FF50 ; =0x022577B8 + lsl r2, r2, #4 + ldr r0, [r0, #0] + mov r3, #4 + ldr r0, [r0, #0] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x1c + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov23_02248C08 + str r0, [r5, #0x4c] + ldr r0, _0224FF54 ; =0x00000246 + mov r1, #5 + strb r1, [r5, r0] + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_0224FF40: .word 0x00000276 +_0224FF44: .word 0x00000257 +_0224FF48: .word 0x000003D9 +_0224FF4C: .word 0x02256904 +_0224FF50: .word 0x022577B8 +_0224FF54: .word 0x00000246 + thumb_func_end ov23_0224FE38 + + thumb_func_start ov23_0224FF58 +ov23_0224FF58: ; 0x0224FF58 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + ldr r0, [r5, #0x4c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #8 + bl ov23_022430E0 + bl sub_020360F0 + cmp r0, #0 + beq _0224FF8A + mov r4, #1 + mvn r4, r4 +_0224FF8A: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _0224FF94 + add r4, r0, #0 +_0224FF94: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224FFBE + add r0, r0, #1 + cmp r4, r0 + bne _0224FFC6 + ldr r0, [r5, #0x4c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r1, sp, #0 + add r2, r0, #0 + ldrh r1, [r1, #2] + add r0, r5, #0 + mov r3, #6 + bl ov23_0225128C + mov r0, #0 + pop {r3, r4, r5, pc} +_0224FFBE: + add r0, r5, #0 + bl ov23_0224FD3C + b _0225003C +_0224FFC6: + bl ov23_022421DC + bl ov23_02254044 + ldr r0, _02250040 ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + strb r4, [r0, #4] + add r0, r4, #0 + bl ov23_0224F66C + ldr r1, _02250040 ; =0x022577B8 + ldr r2, [r1, #0] + strb r0, [r2, #5] + ldr r0, [r1, #0] + ldrb r0, [r0, #5] + cmp r0, #0x21 + bne _0224FFF6 + bl ov23_0224CD68 + ldr r0, _02250044 ; =0x00000246 + mov r1, #3 + strb r1, [r5, r0] + b _02250028 +_0224FFF6: + add r0, r5, #0 + bl ov23_0224FB7C + add r0, r5, #0 + mov r1, #1 + bl ov23_0224FBFC + ldr r0, _02250044 ; =0x00000246 + mov r1, #0x12 + strb r1, [r5, r0] + bl ov23_0224219C + ldr r2, _02250040 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541B4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x81 + add r3, r2, #0 + bl ov23_02253F60 +_02250028: + mov r1, #0 + ldr r0, [r5, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r5, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_0225003C: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250040: .word 0x022577B8 +_02250044: .word 0x00000246 + thumb_func_end ov23_0224FF58 + + thumb_func_start ov23_02250048 +ov23_02250048: ; 0x02250048 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r0, [r5, #0x50] + bl sub_02001288 + mov r1, #0x93 + add r4, r0, #0 + lsl r1, r1, #2 + ldrh r6, [r5, r1] + ldr r0, [r5, #0x50] + add r1, r5, r1 + bl sub_020014D0 + mov r0, #0x93 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + cmp r6, r0 + beq _02250072 + ldr r0, _02250110 ; =0x000005DC + bl sub_02005748 +_02250072: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02250084 + add r0, r0, #1 + cmp r4, r0 + bne _0225009E + mov r0, #0 + pop {r4, r5, r6, pc} +_02250084: + ldr r0, _02250110 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov23_0224FCF4 + add r0, r5, #0 + bl ov23_0224FDE0 + ldr r0, _02250114 ; =0x00000246 + mov r1, #5 + strb r1, [r5, r0] + b _0225010C +_0225009E: + add r0, r5, #0 + bl ov23_0224FCF4 + cmp r4, #1 + bne _022500CA + ldr r0, _02250118 ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + ldrb r0, [r0, #4] + bl ov23_0224F66C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl ov23_02243AD4 + ldr r0, _0225011C ; =0x00000631 + bl sub_02005748 + ldr r0, _02250114 ; =0x00000246 + mov r1, #3 + strb r1, [r5, r0] + b _0225010C +_022500CA: + cmp r4, #2 + bne _0225010C + ldr r0, _02250110 ; =0x000005DC + bl sub_02005748 + ldr r0, _02250118 ; =0x022577B8 + ldr r0, [r0, #0] + ldrb r0, [r0, #5] + bl ov23_0224FD68 + bl ov23_0224219C + ldr r2, _02250118 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541B4 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x82 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02250120 ; =ov23_0224FDE0 + mov r1, #5 + str r0, [r5, #0] + ldr r0, _02250124 ; =0x00000245 + strb r1, [r5, r0] + mov r1, #0xe + add r0, r0, #1 + strb r1, [r5, r0] +_0225010C: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02250110: .word 0x000005DC +_02250114: .word 0x00000246 +_02250118: .word 0x022577B8 +_0225011C: .word 0x00000631 +_02250120: .word ov23_0224FDE0 +_02250124: .word 0x00000245 + thumb_func_end ov23_02250048 + + thumb_func_start ov23_02250128 +ov23_02250128: ; 0x02250128 + push {r3, lr} + ldr r1, _02250148 ; =0x022577B8 + ldr r1, [r1, #0] + ldrb r1, [r1, #5] + cmp r1, r0 + beq _02250138 + bl sub_02022974 +_02250138: + ldr r0, _02250148 ; =0x022577B8 + ldr r1, [r0, #0] + ldr r0, [r1, #0] + ldrb r1, [r1, #4] + bl sub_02028C6C + pop {r3, pc} + nop +_02250148: .word 0x022577B8 + thumb_func_end ov23_02250128 + + thumb_func_start ov23_0225014C +ov23_0225014C: ; 0x0225014C + push {r4, lr} + add r4, r1, #0 + mov r1, #0x13 + bl sub_02001504 + mov r2, #0x81 + add r1, r0, #0 + lsl r2, r2, #2 + ldr r2, [r1, r2] + add r0, r4, #0 + blx r2 + mov r1, #1 + mvn r1, r1 + cmp r4, r1 + bne _0225016E + mov r4, #0x3d + b _02250172 +_0225016E: + add r4, r0, #0 + add r4, #0x3e +_02250172: + bl ov23_022421DC + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0225014C + + thumb_func_start ov23_02250184 +ov23_02250184: ; 0x02250184 + mov r2, #2 + ldr r1, _022501A4 ; =ov23_0224F658 + lsl r2, r2, #8 + str r1, [r0, r2] + add r1, r2, #4 + ldr r3, _022501A8 ; =ov23_0224F684 + add r2, #8 + str r3, [r0, r1] + ldr r1, _022501AC ; =ov23_0224F69C + ldr r3, _022501B0 ; =ov23_0225021C + str r1, [r0, r2] + ldr r1, _022501B4 ; =ov23_0225014C + str r1, [r0, #0x60] + ldr r1, _022501B8 ; =0x02028CD9 + bx r3 + nop +_022501A4: .word ov23_0224F658 +_022501A8: .word ov23_0224F684 +_022501AC: .word ov23_0224F69C +_022501B0: .word ov23_0225021C +_022501B4: .word ov23_0225014C +_022501B8: .word 0x02028CD9 + thumb_func_end ov23_02250184 + + thumb_func_start ov23_022501BC +ov23_022501BC: ; 0x022501BC + push {r4, lr} + add r4, r0, #0 + mov r0, #9 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #9 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r2, _02250208 ; =ov23_0224F658 + sub r0, #0x30 + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, _0225020C ; =ov23_0224F684 + sub r0, #0x2c + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, _02250210 ; =ov23_0224F69C + sub r0, #0x28 + str r2, [r4, r0] + ldr r0, _02250214 ; =ov23_0225014C + str r0, [r4, #0x60] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r1, #0x1c + strh r0, [r4, r1] + ldr r1, _02250218 ; =0x02028CD9 + add r0, r4, #0 + bl ov23_0225021C + pop {r4, pc} + nop +_02250208: .word ov23_0224F658 +_0225020C: .word ov23_0224F684 +_02250210: .word ov23_0224F69C +_02250214: .word ov23_0225014C +_02250218: .word 0x02028CD9 + thumb_func_end ov23_022501BC + + thumb_func_start ov23_0225021C +ov23_0225021C: ; 0x0225021C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + mov r2, #0x81 + add r5, r0, #0 + lsl r2, r2, #2 + str r1, [sp, #0x14] + ldr r1, [r5, r2] + str r1, [sp, #0x1c] + add r1, r2, #4 + ldr r7, [r5, r1] + sub r1, r2, #4 + ldr r1, [r5, r1] + blx r1 + add r6, r0, #0 + add r0, r5, #0 + bl ov23_0224FB7C + bl ov23_022421DC + mov r1, #0x9d + lsl r1, r1, #2 + mov r2, #0 + bl ov23_02253DFC + add r0, r6, #1 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02250364 ; =0x00000257 + add r1, #0x10 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02250368 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + bl ov23_022421DC + bl ov23_02253E3C + mov r4, #0 + str r0, [sp, #0x18] + cmp r6, #0 + ble _022502EA +_02250294: + ldr r2, [sp, #0x1c] + add r0, r4, #0 + add r1, r5, #0 + blx r2 + add r2, r0, #0 + ldr r0, [r5, #0x70] + mov r1, #2 + bl sub_0200BA94 + add r0, r4, #0 + add r1, r5, #0 + blx r7 + add r2, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x70] + mov r1, #6 + mov r3, #2 + bl sub_0200B60C + bl ov23_0224219C + bl ov23_02253E3C + ldr r2, [r5, #0x6c] + mov r1, #0x80 + bl sub_0200B1B8 + ldr r0, [r5, #0x70] + ldr r1, [r5, #0x68] + ldr r2, [r5, #0x6c] + bl sub_0200C388 + ldr r0, [r5, #0x40] + ldr r1, [r5, #0x68] + add r2, r4, #0 + bl sub_02013A6C + add r4, r4, #1 + cmp r4, r6 + blt _02250294 +_022502EA: + mov r2, #0x3c + add r3, r2, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + sub r3, #0x3e + bl sub_02013A4C + ldr r3, _0225036C ; =0x02256904 + add r2, sp, #0x20 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r6, #1 + add r2, sp, #0x20 + strh r0, [r2, #0x10] + mov r1, #6 + strh r1, [r2, #0x12] + ldr r0, [r5, #0x40] + str r0, [sp, #0x20] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x2c] + ldr r0, [r5, #0x60] + str r0, [sp, #0x24] + str r5, [sp, #0x3c] + ldrh r2, [r2, #0x10] + add r0, r5, #0 + bl ov23_02251238 + ldr r0, [sp, #0x14] + mov r2, #0x23 + str r0, [sp] + ldr r0, _02250370 ; =0x022577B8 + lsl r2, r2, #4 + ldr r0, [r0, #0] + mov r3, #4 + ldr r0, [r0, #0] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x20 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov23_02248C08 + str r0, [r5, #0x4c] + ldr r0, _02250374 ; =0x00000246 + mov r1, #6 + strb r1, [r5, r0] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02250364: .word 0x00000257 +_02250368: .word 0x000003D9 +_0225036C: .word 0x02256904 +_02250370: .word 0x022577B8 +_02250374: .word 0x00000246 + thumb_func_end ov23_0225021C + + thumb_func_start ov23_02250378 +ov23_02250378: ; 0x02250378 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + ldr r0, [r5, #0x4c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #9 + bl ov23_022430E0 + bl sub_020360F0 + cmp r0, #0 + beq _022503AA + mov r4, #1 + mvn r4, r4 +_022503AA: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022503B4 + add r4, r0, #0 +_022503B4: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _022503DE + add r0, r0, #1 + cmp r4, r0 + bne _022503E6 + ldr r0, [r5, #0x4c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r1, sp, #0 + add r2, r0, #0 + ldrh r1, [r1, #2] + add r0, r5, #0 + mov r3, #6 + bl ov23_0225128C + mov r0, #0 + pop {r3, r4, r5, pc} +_022503DE: + add r0, r5, #0 + bl ov23_0224FD3C + b _02250440 +_022503E6: + add r0, r5, #0 + bl ov23_0224FB7C + ldr r0, _02250444 ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + strb r4, [r0, #4] + add r0, r4, #0 + bl ov23_0224F684 + ldr r1, _02250444 ; =0x022577B8 + ldr r1, [r1, #0] + strb r0, [r1, #5] + add r0, r5, #0 + mov r1, #1 + bl ov23_0224FBFC + ldr r0, _02250448 ; =0x00000246 + mov r1, #0x10 + strb r1, [r5, r0] + bl ov23_0224219C + ldr r2, _02250444 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541A0 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x81 + add r3, r2, #0 + bl ov23_02253F60 + mov r1, #0 + ldr r0, [r5, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r5, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_02250440: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250444: .word 0x022577B8 +_02250448: .word 0x00000246 + thumb_func_end ov23_02250378 + + thumb_func_start ov23_0225044C +ov23_0225044C: ; 0x0225044C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r0, [r5, #0x50] + bl sub_02001288 + mov r1, #0x93 + add r4, r0, #0 + lsl r1, r1, #2 + ldrh r6, [r5, r1] + ldr r0, [r5, #0x50] + add r1, r5, r1 + bl sub_020014D0 + mov r0, #0x93 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + cmp r6, r0 + beq _02250476 + ldr r0, _0225052C ; =0x000005DC + bl sub_02005748 +_02250476: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02250488 + add r0, r0, #1 + cmp r4, r0 + bne _022504A2 + mov r0, #0 + pop {r4, r5, r6, pc} +_02250488: + ldr r0, _0225052C ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov23_0224FCF4 + add r0, r5, #0 + bl ov23_022501BC + ldr r0, _02250530 ; =0x00000246 + mov r1, #6 + strb r1, [r5, r0] + b _02250528 +_022504A2: + add r0, r5, #0 + bl ov23_0224FCF4 + cmp r4, #1 + bne _022504E6 + bl sub_0203608C + add r4, r0, #0 + bl sub_02058D88 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02058DC0 + add r4, r0, #0 + bl ov23_022421DC + bl ov23_02254044 + ldr r0, _02250534 ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + ldrb r0, [r0, #4] + bl ov23_0224F69C + add r1, r0, #0 + ldr r0, _02250534 ; =0x022577B8 + add r2, r6, #0 + ldr r0, [r0, #0] + add r3, r4, #0 + ldrb r0, [r0, #5] + bl ov23_02241AE8 + b _02250518 +_022504E6: + cmp r4, #2 + bne _02250518 + ldr r0, _0225052C ; =0x000005DC + bl sub_02005748 + ldr r0, _02250534 ; =0x022577B8 + ldr r0, [r0, #0] + ldrb r0, [r0, #5] + bl ov23_02250128 + bl ov23_0224219C + ldr r2, _02250534 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541A0 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x82 + add r3, r2, #0 + bl ov23_02253F40 +_02250518: + ldr r0, _02250538 ; =ov23_022501BC + mov r1, #6 + str r0, [r5, #0] + ldr r0, _0225053C ; =0x00000245 + strb r1, [r5, r0] + mov r1, #0xe + add r0, r0, #1 + strb r1, [r5, r0] +_02250528: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225052C: .word 0x000005DC +_02250530: .word 0x00000246 +_02250534: .word 0x022577B8 +_02250538: .word ov23_022501BC +_0225053C: .word 0x00000245 + thumb_func_end ov23_0225044C + + thumb_func_start ov23_02250540 +ov23_02250540: ; 0x02250540 + push {r4, lr} + add r4, r1, #0 + mov r1, #0x13 + bl sub_02001504 + mov r2, #0x81 + add r1, r0, #0 + lsl r2, r2, #2 + ldr r2, [r1, r2] + add r0, r4, #0 + blx r2 + mov r1, #1 + mvn r1, r1 + cmp r4, r1 + bne _02250562 + mov r4, #0x3d + b _02250566 +_02250562: + add r4, r0, #0 + add r4, #0x3e +_02250566: + bl ov23_022421DC + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02250540 + + thumb_func_start ov23_02250578 +ov23_02250578: ; 0x02250578 + mov r1, #2 + ldr r2, _0225058C ; =ov23_0224F6B4 + lsl r1, r1, #8 + str r2, [r0, r1] + ldr r2, _02250590 ; =ov23_0224F6C8 + add r1, r1, #4 + str r2, [r0, r1] + ldr r3, _02250594 ; =ov23_022505EC + mov r1, #0 + bx r3 + ; .align 2, 0 +_0225058C: .word ov23_0224F6B4 +_02250590: .word ov23_0224F6C8 +_02250594: .word ov23_022505EC + thumb_func_end ov23_02250578 + + thumb_func_start ov23_02250598 +ov23_02250598: ; 0x02250598 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xb + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r2, _022505DC ; =ov23_0224F6B4 + sub r0, #0x30 + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, _022505E0 ; =ov23_0224F6C8 + sub r0, #0x2c + str r2, [r4, r0] + ldr r0, _022505E4 ; =ov23_02250540 + str r0, [r4, #0x60] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r1, #0x1c + strh r0, [r4, r1] + ldr r1, _022505E8 ; =0x02028DD9 + add r0, r4, #0 + bl ov23_022505EC + pop {r4, pc} + nop +_022505DC: .word ov23_0224F6B4 +_022505E0: .word ov23_0224F6C8 +_022505E4: .word ov23_02250540 +_022505E8: .word 0x02028DD9 + thumb_func_end ov23_02250598 + + thumb_func_start ov23_022505EC +ov23_022505EC: ; 0x022505EC + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r1, [sp, #0x14] + mov r1, #0x81 + add r5, r0, #0 + lsl r1, r1, #2 + ldr r7, [r5, r1] + sub r1, r1, #4 + ldr r1, [r5, r1] + blx r1 + add r6, r0, #0 + add r0, r5, #0 + bl ov23_0224FB7C + bl ov23_022421DC + mov r1, #0x9d + lsl r1, r1, #2 + mov r2, #0 + bl ov23_02253DFC + add r0, r6, #1 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _022506F0 ; =0x00000257 + add r1, #0x10 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _022506F4 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + bl ov23_022421DC + bl ov23_02253E3C + mov r4, #0 + str r0, [sp, #0x18] + cmp r6, #0 + ble _02250676 +_0225065E: + add r0, r4, #0 + add r1, r5, #0 + blx r7 + add r2, r0, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, r6 + blt _0225065E +_02250676: + mov r2, #0x3c + add r3, r2, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + sub r3, #0x3e + bl sub_02013A4C + ldr r3, _022506F8 ; =0x02256904 + add r2, sp, #0x1c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r6, #1 + add r2, sp, #0x1c + strh r0, [r2, #0x10] + mov r1, #6 + strh r1, [r2, #0x12] + ldr r0, [r5, #0x40] + str r0, [sp, #0x1c] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x28] + ldr r0, [r5, #0x60] + str r0, [sp, #0x20] + str r5, [sp, #0x38] + ldrh r2, [r2, #0x10] + add r0, r5, #0 + bl ov23_02251238 + ldr r0, [sp, #0x14] + mov r2, #0x23 + str r0, [sp] + ldr r0, _022506FC ; =0x022577B8 + lsl r2, r2, #4 + ldr r0, [r0, #0] + mov r3, #4 + ldr r0, [r0, #0] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x1c + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov23_02248C08 + str r0, [r5, #0x4c] + ldr r0, _02250700 ; =0x00000246 + mov r1, #7 + strb r1, [r5, r0] + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022506F0: .word 0x00000257 +_022506F4: .word 0x000003D9 +_022506F8: .word 0x02256904 +_022506FC: .word 0x022577B8 +_02250700: .word 0x00000246 + thumb_func_end ov23_022505EC + + thumb_func_start ov23_02250704 +ov23_02250704: ; 0x02250704 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + ldr r0, [r5, #0x4c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #0xb + bl ov23_022430E0 + bl sub_020360F0 + cmp r0, #0 + beq _02250736 + mov r4, #1 + mvn r4, r4 +_02250736: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _02250740 + add r4, r0, #0 +_02250740: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0225076A + add r0, r0, #1 + cmp r4, r0 + bne _02250772 + ldr r0, [r5, #0x4c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r1, sp, #0 + add r2, r0, #0 + ldrh r1, [r1, #2] + add r0, r5, #0 + mov r3, #6 + bl ov23_0225128C + mov r0, #0 + pop {r3, r4, r5, pc} +_0225076A: + add r0, r5, #0 + bl ov23_0224FD3C + b _022507CC +_02250772: + add r0, r5, #0 + bl ov23_0224FB7C + ldr r0, _022507D0 ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + strb r4, [r0, #4] + add r0, r4, #0 + bl ov23_0224F6C8 + ldr r1, _022507D0 ; =0x022577B8 + ldr r1, [r1, #0] + strb r0, [r1, #5] + add r0, r5, #0 + mov r1, #3 + bl ov23_0224FBFC + bl ov23_0224219C + ldr r2, _022507D0 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541A0 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x81 + add r3, r2, #0 + bl ov23_02253F60 + ldr r0, _022507D4 ; =0x00000246 + mov r1, #0x11 + strb r1, [r5, r0] + mov r1, #0 + ldr r0, [r5, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r5, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_022507CC: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022507D0: .word 0x022577B8 +_022507D4: .word 0x00000246 + thumb_func_end ov23_02250704 + + thumb_func_start ov23_022507D8 +ov23_022507D8: ; 0x022507D8 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r0, [r5, #0x50] + bl sub_02001288 + mov r1, #0x93 + add r4, r0, #0 + lsl r1, r1, #2 + ldrh r6, [r5, r1] + ldr r0, [r5, #0x50] + add r1, r5, r1 + bl sub_020014D0 + mov r0, #0x93 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + cmp r6, r0 + beq _02250802 + ldr r0, _0225091C ; =0x000005DC + bl sub_02005748 +_02250802: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02250814 + add r0, r0, #1 + cmp r4, r0 + bne _0225082E + mov r0, #0 + pop {r4, r5, r6, pc} +_02250814: + ldr r0, _0225091C ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov23_0224FCF4 + add r0, r5, #0 + bl ov23_02250598 + ldr r0, _02250920 ; =0x00000246 + mov r1, #7 + strb r1, [r5, r0] + b _02250916 +_0225082E: + add r0, r5, #0 + bl ov23_0224FCF4 + cmp r4, #3 + bne _022508D2 + ldr r0, _02250924 ; =0x022577B8 + ldr r0, [r0, #0] + ldrb r0, [r0, #5] + bl sub_02028938 + add r4, r0, #0 + ldr r0, [r5, #0xc] + ldr r0, [r0, #0xc] + bl sub_0207D990 + add r6, r0, #0 + ldr r0, _0225091C ; =0x000005DC + bl sub_02005748 + lsl r1, r4, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + mov r2, #1 + mov r3, #4 + bl sub_0207D570 + cmp r0, #0 + beq _022508B2 + ldr r0, _02250924 ; =0x022577B8 + ldr r1, [r0, #0] + ldr r0, [r1, #0] + ldrb r1, [r1, #4] + bl sub_02028D80 + bl ov23_0224219C + ldr r2, _02250924 ; =0x022577B8 + mov r1, #0 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541A0 + ldr r0, _02250924 ; =0x022577B8 + ldr r0, [r0, #0] + ldrb r0, [r0, #5] + add r0, #0xe3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bhi _022508A2 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x51 + add r3, r2, #0 + bl ov23_02253F40 + b _02250906 +_022508A2: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x4f + add r3, r2, #0 + bl ov23_02253F40 + b _02250906 +_022508B2: + bl ov23_0224219C + ldr r2, _02250924 ; =0x022577B8 + mov r1, #0 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541A0 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x50 + add r3, r2, #0 + bl ov23_02253F40 + b _02250906 +_022508D2: + cmp r4, #2 + bne _02250906 + ldr r0, _0225091C ; =0x000005DC + bl sub_02005748 + ldr r0, _02250924 ; =0x022577B8 + ldr r1, [r0, #0] + ldr r0, [r1, #0] + ldrb r1, [r1, #4] + bl sub_02028D80 + bl ov23_0224219C + ldr r2, _02250924 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541A0 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x82 + add r3, r2, #0 + bl ov23_02253F40 +_02250906: + ldr r0, _02250928 ; =ov23_02250598 + mov r1, #7 + str r0, [r5, #0] + ldr r0, _0225092C ; =0x00000245 + strb r1, [r5, r0] + mov r1, #0xe + add r0, r0, #1 + strb r1, [r5, r0] +_02250916: + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_0225091C: .word 0x000005DC +_02250920: .word 0x00000246 +_02250924: .word 0x022577B8 +_02250928: .word ov23_02250598 +_0225092C: .word 0x00000245 + thumb_func_end ov23_022507D8 + + thumb_func_start ov23_02250930 +ov23_02250930: ; 0x02250930 + ldr r1, _02250938 ; =0x00000246 + mov r2, #2 + strb r2, [r0, r1] + bx lr + ; .align 2, 0 +_02250938: .word 0x00000246 + thumb_func_end ov23_02250930 + + thumb_func_start ov23_0225093C +ov23_0225093C: ; 0x0225093C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov23_0224FB7C + ldr r0, [r5, #0xc] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #0xc] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02242E58 + cmp r0, #0 + beq _02250978 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x42 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02250994 ; =0x00000246 + mov r1, #0xd + strb r1, [r5, r0] + pop {r3, r4, r5, pc} +_02250978: + bl ov23_0224219C + mov r2, #0 + mov r1, #0x34 + add r3, r2, #0 + bl ov23_02253F40 + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xb + add r1, #0x1e + strb r0, [r5, r1] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250994: .word 0x00000246 + thumb_func_end ov23_0225093C + + thumb_func_start ov23_02250998 +ov23_02250998: ; 0x02250998 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _022509C4 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0xc] + ldr r1, _022509C8 ; =0x022568D8 + ldr r0, [r0, #8] + ldr r2, _022509CC ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x5c] + ldr r0, _022509D0 ; =0x00000246 + mov r1, #0xc + strb r1, [r4, r0] +_022509C4: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_022509C8: .word 0x022568D8 +_022509CC: .word 0x000003D9 +_022509D0: .word 0x00000246 + thumb_func_end ov23_02250998 + + thumb_func_start ov23_022509D4 +ov23_022509D4: ; 0x022509D4 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x5c] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02250A06 + cmp r0, #0 + bne _022509F4 + ldr r0, _02250A08 ; =0x00000246 + mov r1, #0xf + strb r1, [r4, r0] + b _02250A02 +_022509F4: + bl ov23_0224219C + bl ov23_02254044 + add r0, r4, #0 + bl ov23_0224FD3C +_02250A02: + mov r0, #0 + str r0, [r4, #0x5c] +_02250A06: + pop {r4, pc} + ; .align 2, 0 +_02250A08: .word 0x00000246 + thumb_func_end ov23_022509D4 + + thumb_func_start ov23_02250A0C +ov23_02250A0C: ; 0x02250A0C + ldr r3, _02250A10 ; =ov23_0224FD3C + bx r3 + ; .align 2, 0 +_02250A10: .word ov23_0224FD3C + thumb_func_end ov23_02250A0C + + thumb_func_start ov23_02250A14 +ov23_02250A14: ; 0x02250A14 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl ov23_0224FB7C + bl ov23_02253968 + ldr r0, [r4, #0xc] + bl sub_0203D174 + bl sub_02025E38 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [r4, #0xc] + ldr r2, _02250A48 ; =ov23_02250A0C + ldr r0, [r0, #8] + add r3, r4, #0 + bl ov23_02253834 + ldr r0, _02250A4C ; =0x00000246 + mov r1, #0xa + strb r1, [r4, r0] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02250A48: .word ov23_02250A0C +_02250A4C: .word 0x00000246 + thumb_func_end ov23_02250A14 + + thumb_func_start ov23_02250A50 +ov23_02250A50: ; 0x02250A50 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x25 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x25 + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x7f + str r6, [r4, #0xc] + lsl r0, r0, #2 + str r5, [r4, r0] + mov r1, #0 + add r0, #0x4a + strb r1, [r4, r0] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x68] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x6c] + mov r0, #4 + bl sub_0200B358 + str r0, [r4, #0x70] + bl sub_020594FC + bl ov23_022421AC + mov r1, #0 + add r2, r1, #0 + add r3, r1, #0 + bl ov23_02253F40 + ldr r0, _02250AC0 ; =ov23_02250B9C + ldr r2, _02250AC4 ; =0x00002710 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r1, [r4, #4] + ldr r2, _02250AC8 ; =ov23_02251270 + add r0, r4, #0 + bl ov23_022431EC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02250AC0: .word ov23_02250B9C +_02250AC4: .word 0x00002710 +_02250AC8: .word ov23_02251270 + thumb_func_end ov23_02250A50 + + thumb_func_start ov23_02250ACC +ov23_02250ACC: ; 0x02250ACC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl ov23_022421AC + bl ov23_02254238 + cmp r0, #0 + bne _02250AF8 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0xc] + ldr r1, _02250AFC ; =0x022568D8 + ldr r0, [r0, #8] + ldr r2, _02250B00 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x5c] + ldr r0, _02250B04 ; =0x00000246 + mov r1, #1 + strb r1, [r4, r0] +_02250AF8: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02250AFC: .word 0x022568D8 +_02250B00: .word 0x000003D9 +_02250B04: .word 0x00000246 + thumb_func_end ov23_02250ACC + + thumb_func_start ov23_02250B08 +ov23_02250B08: ; 0x02250B08 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x5c] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02250B2E + cmp r0, #0 + bne _02250B24 + mov r1, #3 + b _02250B26 +_02250B24: + mov r1, #2 +_02250B26: + ldr r0, _02250B30 ; =0x00000246 + strb r1, [r4, r0] + mov r0, #0 + str r0, [r4, #0x5c] +_02250B2E: + pop {r4, pc} + ; .align 2, 0 +_02250B30: .word 0x00000246 + thumb_func_end ov23_02250B08 + + thumb_func_start ov23_02250B34 +ov23_02250B34: ; 0x02250B34 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x5c] + add r4, r2, #0 + cmp r0, #0 + beq _02250B48 + mov r1, #4 + bl sub_02002154 +_02250B48: + ldr r0, [r5, #0x68] + bl sub_020237BC + ldr r0, [r5, #0x6c] + bl sub_020237BC + ldr r0, [r5, #0x70] + bl sub_0200B3F0 + bl ov23_022421AC + bl ov23_02254044 + bl ov23_0224219C + bl ov23_02254044 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + beq _02250B78 + mov r0, #0 + blx r1 +_02250B78: + mov r0, #0 + str r0, [r5, #4] + ldr r0, [r5, #8] + cmp r0, #0 + beq _02250B86 + bl sub_0206A844 +_02250B86: + add r0, r5, #0 + bl sub_020181C4 + cmp r4, #0 + bne _02250B94 + bl sub_02059514 +_02250B94: + add r0, r6, #0 + bl sub_0200DA58 + pop {r4, r5, r6, pc} + thumb_func_end ov23_02250B34 + + thumb_func_start ov23_02250B9C +ov23_02250B9C: ; 0x02250B9C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_0203608C + bl ov23_0224AEA4 + cmp r0, #0 + bne _02250BBA + ldr r0, _02250C34 ; =0x00000246 + ldrb r1, [r4, r0] + cmp r1, #1 + bhi _02250BBA + mov r1, #2 + strb r1, [r4, r0] +_02250BBA: + ldr r0, _02250C34 ; =0x00000246 + ldrb r0, [r4, r0] + cmp r0, #4 + bhi _02250C32 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02250BCE: ; jump table + .short _02250BD8 - _02250BCE - 2 ; case 0 + .short _02250BE0 - _02250BCE - 2 ; case 1 + .short _02250BE8 - _02250BCE - 2 ; case 2 + .short _02250BF8 - _02250BCE - 2 ; case 3 + .short _02250C16 - _02250BCE - 2 ; case 4 +_02250BD8: + add r0, r4, #0 + bl ov23_02250ACC + pop {r3, r4, r5, pc} +_02250BE0: + add r0, r4, #0 + bl ov23_02250B08 + pop {r3, r4, r5, pc} +_02250BE8: + bl ov23_02243204 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov23_02250B34 + pop {r3, r4, r5, pc} +_02250BF8: + bl ov23_02243204 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov23_02250B34 + mov r1, #0 + add r0, sp, #0 + strb r1, [r0] + mov r0, #0x54 + add r1, sp, #0 + bl sub_020360D0 + pop {r3, r4, r5, pc} +_02250C16: + bl ov23_022421AC + bl ov23_02254238 + cmp r0, #0 + bne _02250C32 + ldr r0, _02250C38 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _02250C32 + ldr r0, _02250C34 ; =0x00000246 + mov r1, #2 + strb r1, [r4, r0] +_02250C32: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02250C34: .word 0x00000246 +_02250C38: .word 0x021BF67C + thumb_func_end ov23_02250B9C + + thumb_func_start ov23_02250C3C +ov23_02250C3C: ; 0x02250C3C + push {r4, lr} + add r4, r1, #0 + mov r1, #0x13 + bl sub_02001504 + mov r2, #0x81 + add r1, r0, #0 + lsl r2, r2, #2 + ldr r2, [r1, r2] + add r0, r4, #0 + blx r2 + mov r1, #1 + mvn r1, r1 + cmp r4, r1 + bne _02250C5E + mov r4, #0x8b + b _02250C62 +_02250C5E: + add r4, r0, #0 + add r4, #0x8a +_02250C62: + bl ov23_022421DC + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02250C3C + + thumb_func_start ov23_02250C74 +ov23_02250C74: ; 0x02250C74 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x13 + add r5, r0, #0 + bl sub_02001504 + ldr r0, [r0, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r4, #0 + bl sub_02028AFC + cmp r0, #0 + bne _02250CA2 + add r0, r5, #0 + mov r1, #1 + mov r2, #0xf + mov r3, #2 + bl sub_0200147C + pop {r3, r4, r5, pc} +_02250CA2: + mov r1, #2 + add r0, r5, #0 + mov r2, #0xf + add r3, r1, #0 + bl sub_0200147C + pop {r3, r4, r5, pc} + thumb_func_end ov23_02250C74 + + thumb_func_start ov23_02250CB0 +ov23_02250CB0: ; 0x02250CB0 + mov r1, #2 + ldr r2, _02250CC8 ; =ov23_0224F608 + lsl r1, r1, #8 + str r2, [r0, r1] + ldr r2, _02250CCC ; =ov23_0224F61C + add r1, r1, #4 + str r2, [r0, r1] + mov r1, #0 + ldr r3, _02250CD0 ; =ov23_02250D90 + str r1, [r0, #0x64] + bx r3 + nop +_02250CC8: .word ov23_0224F608 +_02250CCC: .word ov23_0224F61C +_02250CD0: .word ov23_02250D90 + thumb_func_end ov23_02250CB0 + + thumb_func_start ov23_02250CD4 +ov23_02250CD4: ; 0x02250CD4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xa + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xa + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r2, _02250D1C ; =ov23_0224F608 + sub r0, #0x30 + str r2, [r4, r0] + add r0, r1, #0 + ldr r2, _02250D20 ; =ov23_0224F61C + sub r0, #0x2c + str r2, [r4, r0] + ldr r0, _02250D24 ; =ov23_02250C3C + str r0, [r4, #0x60] + mov r0, #0 + str r0, [r4, #0x64] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r1, #0x1c + strh r0, [r4, r1] + ldr r1, _02250D28 ; =0x02028BE9 + add r0, r4, #0 + bl ov23_02250D90 + pop {r4, pc} + nop +_02250D1C: .word ov23_0224F608 +_02250D20: .word ov23_0224F61C +_02250D24: .word ov23_02250C3C +_02250D28: .word 0x02028BE9 + thumb_func_end ov23_02250CD4 + + thumb_func_start ov23_02250D2C +ov23_02250D2C: ; 0x02250D2C + mov r1, #2 + ldr r2, _02250D48 ; =ov23_0224F608 + lsl r1, r1, #8 + str r2, [r0, r1] + ldr r2, _02250D4C ; =ov23_0224F61C + add r1, r1, #4 + str r2, [r0, r1] + ldr r1, _02250D50 ; =ov23_02250C3C + ldr r3, _02250D54 ; =ov23_02250D90 + str r1, [r0, #0x60] + mov r1, #0 + str r1, [r0, #0x64] + ldr r1, _02250D58 ; =0x02028BE9 + bx r3 + ; .align 2, 0 +_02250D48: .word ov23_0224F608 +_02250D4C: .word ov23_0224F61C +_02250D50: .word ov23_02250C3C +_02250D54: .word ov23_02250D90 +_02250D58: .word 0x02028BE9 + thumb_func_end ov23_02250D2C + + thumb_func_start ov23_02250D5C +ov23_02250D5C: ; 0x02250D5C + mov r1, #2 + ldr r2, _02250D78 ; =ov23_0224F5DC + lsl r1, r1, #8 + str r2, [r0, r1] + ldr r2, _02250D7C ; =ov23_0224F5F0 + add r1, r1, #4 + str r2, [r0, r1] + ldr r1, _02250D80 ; =ov23_02250C3C + ldr r3, _02250D84 ; =ov23_02250D90 + str r1, [r0, #0x60] + ldr r1, _02250D88 ; =ov23_02250C74 + str r1, [r0, #0x64] + ldr r1, _02250D8C ; =0x02028A11 + bx r3 + ; .align 2, 0 +_02250D78: .word ov23_0224F5DC +_02250D7C: .word ov23_0224F5F0 +_02250D80: .word ov23_02250C3C +_02250D84: .word ov23_02250D90 +_02250D88: .word ov23_02250C74 +_02250D8C: .word 0x02028A11 + thumb_func_end ov23_02250D5C + + thumb_func_start ov23_02250D90 +ov23_02250D90: ; 0x02250D90 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r1, [sp, #0x14] + mov r1, #0x81 + add r5, r0, #0 + lsl r1, r1, #2 + ldr r7, [r5, r1] + sub r1, r1, #4 + ldr r1, [r5, r1] + blx r1 + add r6, r0, #0 + add r0, r5, #0 + bl ov23_0224FB7C + bl ov23_022421DC + ldr r1, _02250E94 ; =0x00000272 + mov r2, #0 + bl ov23_02253DFC + add r0, r6, #1 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02250E98 ; =0x00000257 + add r1, #0x10 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02250E9C ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + bl ov23_022421DC + bl ov23_02253E3C + mov r4, #0 + str r0, [sp, #0x18] + cmp r6, #0 + ble _02250E18 +_02250E00: + add r0, r4, #0 + add r1, r5, #0 + blx r7 + add r2, r0, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, r6 + blt _02250E00 +_02250E18: + mov r2, #0 + ldr r0, [r5, #0x40] + ldr r1, [sp, #0x18] + sub r3, r2, #2 + bl sub_02013A4C + ldr r3, _02250EA0 ; =0x02256904 + add r2, sp, #0x1c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r6, #1 + add r2, sp, #0x1c + strh r0, [r2, #0x10] + mov r1, #6 + strh r1, [r2, #0x12] + ldr r0, [r5, #0x64] + str r0, [sp, #0x24] + ldr r0, [r5, #0x40] + str r0, [sp, #0x1c] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x28] + ldr r0, [r5, #0x60] + str r0, [sp, #0x20] + str r5, [sp, #0x38] + ldrh r2, [r2, #0x10] + add r0, r5, #0 + bl ov23_02251238 + ldr r0, [sp, #0x14] + mov r2, #0x23 + str r0, [sp] + ldr r0, _02250EA4 ; =0x022577B8 + lsl r2, r2, #4 + ldr r0, [r0, #0] + mov r3, #4 + ldr r0, [r0, #0] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x1c + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov23_02248C08 + str r0, [r5, #0x4c] + ldr r0, _02250EA8 ; =0x00000246 + mov r1, #8 + strb r1, [r5, r0] + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02250E94: .word 0x00000272 +_02250E98: .word 0x00000257 +_02250E9C: .word 0x000003D9 +_02250EA0: .word 0x02256904 +_02250EA4: .word 0x022577B8 +_02250EA8: .word 0x00000246 + thumb_func_end ov23_02250D90 + + thumb_func_start ov23_02250EAC +ov23_02250EAC: ; 0x02250EAC + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + ldr r0, [r5, #0x4c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #0xa + bl ov23_022430E0 + bl sub_020360F0 + cmp r0, #0 + beq _02250EDE + mov r4, #1 + mvn r4, r4 +_02250EDE: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _02250EE8 + add r4, r0, #0 +_02250EE8: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02250F12 + add r0, r0, #1 + cmp r4, r0 + bne _02250F20 + ldr r0, [r5, #0x4c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r1, sp, #0 + add r2, r0, #0 + ldrh r1, [r1, #2] + add r0, r5, #0 + mov r3, #6 + bl ov23_0225128C + mov r0, #0 + pop {r3, r4, r5, pc} +_02250F12: + ldr r0, _02250F80 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov23_0224FD3C + b _02250F7A +_02250F20: + add r0, r5, #0 + bl ov23_0224FB7C + ldr r0, _02250F84 ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + strb r4, [r0, #4] + add r0, r4, #0 + bl ov23_0224F61C + ldr r1, _02250F84 ; =0x022577B8 + ldr r1, [r1, #0] + strb r0, [r1, #5] + add r0, r5, #0 + mov r1, #2 + bl ov23_0224FBFC + bl ov23_0224219C + ldr r2, _02250F84 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541C8 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x81 + add r3, r2, #0 + bl ov23_02253F60 + ldr r0, _02250F88 ; =0x00000246 + mov r1, #0x13 + strb r1, [r5, r0] + mov r1, #0 + ldr r0, [r5, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r5, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_02250F7A: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_02250F80: .word 0x000005DC +_02250F84: .word 0x022577B8 +_02250F88: .word 0x00000246 + thumb_func_end ov23_02250EAC + + thumb_func_start ov23_02250F8C +ov23_02250F8C: ; 0x02250F8C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r0, [r5, #0x50] + bl sub_02001288 + mov r1, #0x93 + add r4, r0, #0 + lsl r1, r1, #2 + ldrh r6, [r5, r1] + ldr r0, [r5, #0x50] + add r1, r5, r1 + bl sub_020014D0 + mov r0, #0x93 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + cmp r6, r0 + beq _02250FB6 + ldr r0, _02251030 ; =0x000005DC + bl sub_02005748 +_02250FB6: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02250FC8 + add r0, r0, #1 + cmp r4, r0 + bne _02250FE2 + mov r0, #0 + pop {r4, r5, r6, pc} +_02250FC8: + ldr r0, _02251030 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov23_0224FCF4 + add r0, r5, #0 + bl ov23_02250CD4 + ldr r0, _02251034 ; =0x00000246 + mov r1, #8 + strb r1, [r5, r0] + b _0225102C +_02250FE2: + add r0, r5, #0 + bl ov23_0224FCF4 + cmp r4, #2 + bne _0225101C + ldr r0, _02251030 ; =0x000005DC + bl sub_02005748 + ldr r0, _02251038 ; =0x022577B8 + ldr r1, [r0, #0] + ldr r0, [r1, #0] + ldrb r1, [r1, #4] + bl sub_02028B94 + bl ov23_0224219C + ldr r2, _02251038 ; =0x022577B8 + mov r1, #2 + ldr r2, [r2, #0] + ldrb r2, [r2, #5] + bl ov23_022541C8 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x82 + add r3, r2, #0 + bl ov23_02253F40 +_0225101C: + ldr r0, _0225103C ; =ov23_02250CD4 + mov r1, #8 + str r0, [r5, #0] + ldr r0, _02251040 ; =0x00000245 + strb r1, [r5, r0] + mov r1, #0xe + add r0, r0, #1 + strb r1, [r5, r0] +_0225102C: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02251030: .word 0x000005DC +_02251034: .word 0x00000246 +_02251038: .word 0x022577B8 +_0225103C: .word ov23_02250CD4 +_02251040: .word 0x00000245 + thumb_func_end ov23_02250F8C + + thumb_func_start ov23_02251044 +ov23_02251044: ; 0x02251044 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov23_0224FB7C + bl ov23_02242FBC + bl ov23_022535EC + bl ov23_02245784 + bl ov23_02241364 + bl ov23_02241ED0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02251070 + bl ov23_02253D10 +_02251070: + ldr r0, [r5, #0x5c] + cmp r0, #0 + beq _0225107C + mov r1, #4 + bl sub_02002154 +_0225107C: + add r0, r5, #0 + bl ov23_0224FCF4 + ldr r0, [r5, #8] + cmp r0, #0 + beq _0225108C + bl sub_0206A844 +_0225108C: + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _022510BC + ldr r0, _022510EC ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + strb r4, [r0, #4] + add r0, r4, #0 + bl ov23_0224F61C + ldr r1, _022510EC ; =0x022577B8 + ldr r1, [r1, #0] + strb r0, [r1, #5] + mov r1, #0x7f + lsl r1, r1, #2 + ldr r1, [r5, r1] + mov r0, #0 + blx r1 + mov r0, #0x7f + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_022510BC: + ldr r0, [r5, #0x68] + cmp r0, #0 + beq _022510C6 + bl sub_020237BC +_022510C6: + ldr r0, [r5, #0x6c] + cmp r0, #0 + beq _022510D0 + bl sub_020237BC +_022510D0: + ldr r0, [r5, #0x70] + cmp r0, #0 + beq _022510DA + bl sub_0200B3F0 +_022510DA: + ldr r0, [r5, #4] + cmp r0, #0 + beq _022510E4 + bl sub_0200DA58 +_022510E4: + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022510EC: .word 0x022577B8 + thumb_func_end ov23_02251044 + + thumb_func_start ov23_022510F0 +ov23_022510F0: ; 0x022510F0 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + bl sub_020360F0 + cmp r0, #0 + beq _02251108 + mov r4, #1 + mvn r4, r4 +_02251108: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _02251112 + add r4, r0, #0 +_02251112: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02251124 + add r0, r0, #1 + cmp r4, r0 + bne _02251162 + mov r0, #0 + pop {r3, r4, r5, pc} +_02251124: + mov r1, #0x7f + lsl r1, r1, #2 + ldr r0, [r5, r1] + cmp r0, #0 + beq _0225114A + ldr r0, _022511AC ; =0x022577B8 + mov r3, #0 + ldr r2, [r0, #0] + strb r4, [r2, #4] + ldr r2, [r0, #0] + strb r3, [r2, #5] + ldr r0, [r0, #0] + ldr r1, [r5, r1] + ldrb r0, [r0, #5] + blx r1 + mov r0, #0x7f + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_0225114A: + bl ov23_022421DC + bl ov23_02254044 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02251044 + bl ov23_02243204 + mov r0, #1 + pop {r3, r4, r5, pc} +_02251162: + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02251194 + ldr r0, _022511AC ; =0x022577B8 + add r1, r5, #0 + ldr r0, [r0, #0] + strb r4, [r0, #4] + add r0, r4, #0 + bl ov23_0224F61C + ldr r1, _022511AC ; =0x022577B8 + ldr r2, [r1, #0] + strb r0, [r2, #5] + ldr r0, [r1, #0] + mov r1, #0x7f + lsl r1, r1, #2 + ldrb r0, [r0, #5] + ldr r1, [r5, r1] + blx r1 + mov r0, #0x7f + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_02251194: + bl ov23_022421DC + bl ov23_02254044 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02251044 + bl ov23_02243204 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022511AC: .word 0x022577B8 + thumb_func_end ov23_022510F0 + + thumb_func_start ov23_022511B0 +ov23_022511B0: ; 0x022511B0 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x25 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x25 + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x7f + lsl r0, r0, #2 + str r6, [r4, #0xc] + add r1, r0, #0 + str r5, [r4, r0] + mov r2, #0 + add r1, #0x4a + strb r2, [r4, r1] + sub r0, r0, #4 + str r2, [r4, r0] + str r2, [r4, #0x48] + str r2, [r4, #0x60] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x68] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x6c] + mov r0, #4 + bl sub_0200B358 + str r0, [r4, #0x70] + add r0, r4, #0 + bl ov23_02250CD4 + ldr r0, _02251228 ; =0x00000246 + mov r1, #9 + strb r1, [r4, r0] + ldr r0, _0225122C ; =ov23_0224F914 + ldr r2, _02251230 ; =0x00002710 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r1, [r4, #4] + ldr r2, _02251234 ; =ov23_02251270 + add r0, r4, #0 + bl ov23_022431EC + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_02251228: .word 0x00000246 +_0225122C: .word ov23_0224F914 +_02251230: .word 0x00002710 +_02251234: .word ov23_02251270 + thumb_func_end ov23_022511B0 + + thumb_func_start ov23_02251238 +ov23_02251238: ; 0x02251238 + push {r3, r4} + mov r3, #0x23 + lsl r3, r3, #4 + ldr r4, [r0, r3] + add r4, r4, r1 + cmp r4, r2 + blt _02251254 + sub r1, r2, r1 + str r1, [r0, r3] + ldr r1, [r0, r3] + cmp r1, #0 + bge _02251254 + mov r1, #0 + str r1, [r0, r3] +_02251254: + mov r1, #0x8b + lsl r1, r1, #2 + ldr r3, [r0, r1] + sub r2, r2, #1 + cmp r3, r2 + blt _0225126C + str r2, [r0, r1] + ldr r2, [r0, r1] + cmp r2, #0 + bge _0225126C + mov r2, #0 + str r2, [r0, r1] +_0225126C: + pop {r3, r4} + bx lr + thumb_func_end ov23_02251238 + + thumb_func_start ov23_02251270 +ov23_02251270: ; 0x02251270 + push {r4, lr} + add r4, r1, #0 + mov r1, #1 + mov r0, #0 + add r2, r1, #0 + bl sub_0200AB4C + mov r1, #1 + add r0, r4, #0 + mvn r1, r1 + bl ov23_02251044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02251270 + + .rodata + + + .global Unk_ov23_022568D4 +Unk_ov23_022568D4: ; 0x022568D4 + .incbin "incbin/overlay23_rodata.bin", 0x5C8, 0x5CC - 0x5C8 + + .global Unk_ov23_022568D8 +Unk_ov23_022568D8: ; 0x022568D8 + .incbin "incbin/overlay23_rodata.bin", 0x5CC, 0x5D4 - 0x5CC + + .global Unk_ov23_022568E0 +Unk_ov23_022568E0: ; 0x022568E0 + .incbin "incbin/overlay23_rodata.bin", 0x5D4, 0x5E0 - 0x5D4 + + .global Unk_ov23_022568EC +Unk_ov23_022568EC: ; 0x022568EC + .incbin "incbin/overlay23_rodata.bin", 0x5E0, 0x5F8 - 0x5E0 + + .global Unk_ov23_02256904 +Unk_ov23_02256904: ; 0x02256904 + .incbin "incbin/overlay23_rodata.bin", 0x5F8, 0x618 - 0x5F8 + + .global Unk_ov23_02256924 +Unk_ov23_02256924: ; 0x02256924 + .incbin "incbin/overlay23_rodata.bin", 0x618, 0x650 - 0x618 + + .global Unk_ov23_0225695C +Unk_ov23_0225695C: ; 0x0225695C + .incbin "incbin/overlay23_rodata.bin", 0x650, 0x68 + + + .data + + + .global Unk_ov23_02257634 +Unk_ov23_02257634: ; 0x02257634 + .incbin "incbin/overlay23_data.bin", 0xA54, 0xA64 - 0xA54 + + .global Unk_ov23_02257644 +Unk_ov23_02257644: ; 0x02257644 + .incbin "incbin/overlay23_data.bin", 0xA64, 0xA7C - 0xA64 + + .global Unk_ov23_0225765C +Unk_ov23_0225765C: ; 0x0225765C + .incbin "incbin/overlay23_data.bin", 0xA7C, 0x18 + + + .bss + + + .global Unk_ov23_022577B8 +Unk_ov23_022577B8: ; 0x022577B8 + .space 0x4 + diff --git a/asm/ov23_0225128C.s b/asm/ov23_0225128C.s new file mode 100644 index 000000000..b481a6c08 --- /dev/null +++ b/asm/ov23_0225128C.s @@ -0,0 +1,1906 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0225128C +ov23_0225128C: ; 0x0225128C + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r7, r3, #0 + add r5, r0, #0 + add r4, r1, #0 + cmp r6, r7 + ble _022512D2 + cmp r4, #0 + ldr r0, [r5, #8] + beq _022512AA + mov r1, #0 + mov r2, #1 + bl sub_0206A8C4 + b _022512B2 +_022512AA: + mov r1, #0 + add r2, r1, #0 + bl sub_0206A8C4 +_022512B2: + add r0, r4, r7 + cmp r6, r0 + ldr r0, [r5, #8] + beq _022512C4 + mov r1, #1 + add r2, r1, #0 + bl sub_0206A8C4 + b _022512CC +_022512C4: + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_022512CC: + ldr r0, [r5, #8] + bl sub_0206A870 +_022512D2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_0225128C + + thumb_func_start ov23_022512D4 +ov23_022512D4: ; 0x022512D4 + ldrh r2, [r0] + ldrh r3, [r0, #2] + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + beq _022512E8 + cmp r1, #0 + beq _022512E8 + mov r0, #0xff + bx lr +_022512E8: + cmp r3, #0xc + bne _022512F0 + mov r3, #0 + b _022512FC +_022512F0: + cmp r3, #0x2c + bne _022512F8 + mov r3, #8 + b _022512FC +_022512F8: + mov r0, #0xff + bx lr +_022512FC: + add r0, r2, #0 + sub r0, #0xf + cmp r0, #1 + bhi _02251308 + mov r0, #0 + bx lr +_02251308: + mov r1, #0 +_0225130A: + add r0, r2, #0 + sub r0, #0x2f + cmp r0, #1 + bhi _02251316 + add r0, r1, r3 + bx lr +_02251316: + add r1, r1, #1 + sub r2, #0x20 + cmp r1, #8 + blt _0225130A + mov r0, #0xff + bx lr + ; .align 2, 0 + thumb_func_end ov23_022512D4 + + thumb_func_start ov23_02251324 +ov23_02251324: ; 0x02251324 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl sub_02058F80 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_022512D4 + add r4, r0, #0 + bl sub_02058F50 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02251346 + mov r4, #0xff +_02251346: + cmp r4, #0xff + beq _022513A0 + add r0, r5, #0 + mov r1, #0 + bl sub_02059058 + add r0, sp, #0 + strb r4, [r0, #2] + strb r5, [r0, #1] + mov r1, #0 + strb r1, [r0, #3] + cmp r4, r5 + beq _02251372 + add r0, r5, #0 + bl ov23_0224AEA4 + cmp r0, #0 + bne _02251392 + mov r1, #1 + add r0, sp, #0 + strb r1, [r0, #3] + b _02251392 +_02251372: + add r0, r5, #0 + bl ov23_0224AEA4 + cmp r0, #0 + beq _02251392 + mov r1, #3 + add r0, sp, #0 + strb r1, [r0] + add r0, r5, #0 + mov r1, #1 + add r2, sp, #0 + mov r3, #0 + bl ov23_0224A570 + mov r0, #1 + pop {r3, r4, r5, pc} +_02251392: + add r1, sp, #0 + mov r0, #0x53 + add r1, #1 + bl sub_02035B48 + mov r0, #1 + pop {r3, r4, r5, pc} +_022513A0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov23_02251324 + + thumb_func_start ov23_022513A4 +ov23_022513A4: ; 0x022513A4 + ldr r3, _022513AC ; =sub_0205948C + mov r0, #0x40 + bx r3 + nop +_022513AC: .word sub_0205948C + thumb_func_end ov23_022513A4 + + thumb_func_start ov23_022513B0 +ov23_022513B0: ; 0x022513B0 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + bl sub_02035EE0 + cmp r0, #0 + beq _02251408 + bl sub_0203608C + ldrb r1, [r5] + cmp r1, r0 + bne _02251408 + bl sub_0203608C + ldrb r1, [r5, #1] + cmp r1, r0 + bne _022513E4 + ldr r0, _0225140C ; =0x0000060C + bl sub_02005748 + bl sub_020594FC + add r0, r4, #0 + bl ov23_02251F94 + pop {r3, r4, r5, pc} +_022513E4: + mov r0, #0x40 + bl sub_02059464 + ldrb r0, [r5, #2] + cmp r0, #0 + beq _022513FA + add r0, r4, #0 + add r1, r5, #0 + bl ov23_022520E8 + pop {r3, r4, r5, pc} +_022513FA: + bl ov23_022421AC + ldr r3, _02251410 ; =ov23_022513A4 + mov r1, #9 + mov r2, #1 + bl ov23_02253F40 +_02251408: + pop {r3, r4, r5, pc} + nop +_0225140C: .word 0x0000060C +_02251410: .word ov23_022513A4 + thumb_func_end ov23_022513B0 + + thumb_func_start ov23_02251414 +ov23_02251414: ; 0x02251414 + mov r0, #3 + bx lr + thumb_func_end ov23_02251414 + + thumb_func_start ov23_02251418 +ov23_02251418: ; 0x02251418 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r4, r0, #0 + add r1, r5, #0 + bl sub_02028B88 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0202895C + cmp r0, #0 + beq _02251446 + add r0, r4, #0 + add r1, r5, #0 + bl sub_02028B94 + mov r0, #1 + pop {r3, r4, r5, pc} +_02251446: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_02251418 + + thumb_func_start ov23_0225144C +ov23_0225144C: ; 0x0225144C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r1, #0xc] + bl sub_0203D174 + bl sub_020298B0 + add r1, r5, #0 + add r4, r0, #0 + bl sub_02028AFC + cmp r0, #0 + beq _0225146C + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, pc} +_0225146C: + add r0, r4, #0 + add r1, r5, #0 + bl sub_020289B8 + bl ov23_0224F744 + cmp r0, #0 + beq _02251488 + add r0, r4, #0 + add r1, r5, #0 + bl sub_020289C4 + mov r0, #1 + pop {r3, r4, r5, pc} +_02251488: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov23_0225144C + + thumb_func_start ov23_0225148C +ov23_0225148C: ; 0x0225148C + push {r4, lr} + add r4, r1, #0 + mov r1, #0x13 + bl sub_02001504 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022514A0 + mov r4, #5 +_022514A0: + bl ov23_022421BC + mov r2, #0 + add r1, r4, #6 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, pc} + thumb_func_end ov23_0225148C + + thumb_func_start ov23_022514B0 +ov23_022514B0: ; 0x022514B0 + push {r4, lr} + add r4, r1, #0 + mov r1, #0x13 + bl sub_02001504 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022514C4 + mov r4, #3 +_022514C4: + bl ov23_022421BC + add r4, #0x2c + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_022514B0 + + thumb_func_start ov23_022514D8 +ov23_022514D8: ; 0x022514D8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #0x48] + bl sub_02001288 + add r5, r0, #0 + add r1, sp, #0 + ldr r0, [r4, #0x48] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #0x17 + bl ov23_022430E0 + add r0, r4, #0 + bl ov23_022521C8 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bhi _02251526 + bhs _02251532 + cmp r5, #4 + bhi _022515C6 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225151C: ; jump table + .short _02251540 - _0225151C - 2 ; case 0 + .short _022515AC - _0225151C - 2 ; case 1 + .short _022515BA - _0225151C - 2 ; case 2 + .short _0225159E - _0225151C - 2 ; case 3 + .short _02251590 - _0225151C - 2 ; case 4 +_02251526: + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _022515C6 + mov r0, #0 + pop {r3, r4, r5, pc} +_02251532: + ldr r0, _022515CC ; =0x0000060E + bl sub_02005748 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #2 + strb r1, [r4, r0] + b _022515C6 +_02251540: + ldr r0, [r4, #0xc] + ldr r0, [r0, #0xc] + bl sub_020298B0 + bl sub_020289A0 + cmp r0, #0 + bne _02251566 + bl ov23_022421BC + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #0x17 + strb r1, [r4, r0] + b _022515C6 +_02251566: + bl sub_02033DFC + cmp r0, #0 + beq _0225157A + bl ov23_02243204 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #3 + strb r1, [r4, r0] + b _022515C6 +_0225157A: + bl ov23_022421BC + mov r2, #0 + mov r1, #0x38 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #0x17 + strb r1, [r4, r0] + b _022515C6 +_02251590: + ldr r0, _022515D4 ; =0x000005DC + bl sub_02005748 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #8 + strb r1, [r4, r0] + b _022515C6 +_0225159E: + ldr r0, _022515D4 ; =0x000005DC + bl sub_02005748 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #6 + strb r1, [r4, r0] + b _022515C6 +_022515AC: + ldr r0, _022515D4 ; =0x000005DC + bl sub_02005748 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #0x11 + strb r1, [r4, r0] + b _022515C6 +_022515BA: + ldr r0, _022515D4 ; =0x000005DC + bl sub_02005748 + ldr r0, _022515D0 ; =0x00000246 + mov r1, #0x14 + strb r1, [r4, r0] +_022515C6: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_022515CC: .word 0x0000060E +_022515D0: .word 0x00000246 +_022515D4: .word 0x000005DC + thumb_func_end ov23_022514D8 + + thumb_func_start ov23_022515D8 +ov23_022515D8: ; 0x022515D8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r5, r0, #0 + add r0, r2, #1 + str r0, [sp, #0x18] + ldr r0, [r5, #0xc] + add r6, r1, #0 + ldr r0, [r0, #0xc] + str r3, [sp, #0x14] + bl sub_020298A0 + bl sub_0202958C + cmp r0, #3 + bge _022515FC + ldr r0, [sp, #0x18] + sub r0, r0, #1 + str r0, [sp, #0x18] +_022515FC: + add r0, r5, #0 + bl ov23_0224FB7C + ldr r0, [sp, #0x18] + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xe + str r0, [sp, #4] + ldr r0, [sp, #0x18] + add r1, #0x10 + lsl r0, r0, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x11 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _022516E0 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r2, _022516E4 ; =0x0000027F + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r7, r0, #0 + ldr r0, [sp, #0x18] + mov r4, #0 + cmp r0, #0 + ble _02251682 + sub r0, r0, #1 + str r0, [sp, #0x1c] +_0225165A: + ldr r0, [sp, #0x1c] + cmp r4, r0 + ldr r0, [r5, #0x40] + bne _02251670 + mov r3, #1 + add r1, r7, #0 + add r2, r6, #5 + mvn r3, r3 + bl sub_02013A4C + b _0225167A +_02251670: + add r1, r7, #0 + add r2, r6, r4 + add r3, r4, #0 + bl sub_02013A4C +_0225167A: + ldr r0, [sp, #0x18] + add r4, r4, #1 + cmp r4, r0 + blt _0225165A +_02251682: + add r0, r7, #0 + bl sub_0200B190 + bl ov23_02253D40 + add r1, sp, #0x20 + mov r2, #0x20 + bl sub_020C4DB0 + ldr r0, [sp, #0x18] + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + add r0, sp, #0x20 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + ldr r0, [r5, #0x40] + str r0, [sp, #0x20] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _022516B2 + str r0, [sp, #0x24] +_022516B2: + str r5, [sp, #0x3c] + add r2, sp, #0x20 + ldrh r2, [r2, #0x10] + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov23_02251238 + mov r2, #0x23 + lsl r2, r2, #4 + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x20 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x48] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022516E0: .word 0x000003D9 +_022516E4: .word 0x0000027F + thumb_func_end ov23_022515D8 + + thumb_func_start ov23_022516E8 +ov23_022516E8: ; 0x022516E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r6, r1, #0 + add r1, r2, #0 + add r1, r1, #1 + str r1, [sp, #0x1c] + add r5, r0, #0 + str r2, [sp, #0x14] + str r3, [sp, #0x18] + bl ov23_0224FB7C + ldr r0, [sp, #0x1c] + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xe + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + add r1, #0x10 + lsl r0, r0, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xe2 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x11 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _022517D8 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r2, _022517DC ; =0x0000027F + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r7, r0, #0 + ldr r0, [sp, #0x1c] + mov r4, #0 + cmp r0, #0 + ble _0225177A +_02251752: + ldr r0, [sp, #0x14] + cmp r4, r0 + ldr r0, [r5, #0x40] + bne _02251768 + mov r3, #1 + add r1, r7, #0 + add r2, r6, r4 + mvn r3, r3 + bl sub_02013A4C + b _02251772 +_02251768: + add r1, r7, #0 + add r2, r6, r4 + add r3, r4, #0 + bl sub_02013A4C +_02251772: + ldr r0, [sp, #0x1c] + add r4, r4, #1 + cmp r4, r0 + blt _02251752 +_0225177A: + add r0, r7, #0 + bl sub_0200B190 + bl ov23_02253D40 + add r1, sp, #0x20 + mov r2, #0x20 + bl sub_020C4DB0 + ldr r0, [sp, #0x14] + add r1, sp, #0x20 + add r0, r0, #1 + strh r0, [r1, #0x10] + ldr r0, [sp, #0x1c] + strh r0, [r1, #0x12] + ldr r0, [r5, #0x40] + str r0, [sp, #0x20] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x18] + cmp r0, #0 + beq _022517AA + str r0, [sp, #0x24] +_022517AA: + str r5, [sp, #0x3c] + add r2, sp, #0x20 + ldrh r2, [r2, #0x10] + ldr r1, [sp, #0x1c] + add r0, r5, #0 + bl ov23_02251238 + mov r2, #0x23 + lsl r2, r2, #4 + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x20 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x48] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022517D8: .word 0x000003D9 +_022517DC: .word 0x0000027F + thumb_func_end ov23_022516E8 + + thumb_func_start ov23_022517E0 +ov23_022517E0: ; 0x022517E0 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x48] + bl sub_02001288 + add r4, r0, #0 + add r1, sp, #0 + ldr r0, [r5, #0x48] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #0x16 + bl ov23_022430E0 + add r0, r5, #0 + bl ov23_022521C8 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bhi _02251826 + bhs _02251830 + cmp r4, #2 + bhi _02251880 + cmp r4, #0 + beq _0225183E + cmp r4, #1 + beq _02251854 + cmp r4, #2 + beq _0225186A + b _02251880 +_02251826: + add r0, r0, #1 + cmp r4, r0 + bne _02251880 + mov r0, #0 + pop {r3, r4, r5, pc} +_02251830: + ldr r0, _0225188C ; =0x000005DC + bl sub_02005748 + ldr r0, _02251890 ; =0x00000246 + mov r1, #0 + strb r1, [r5, r0] + b _02251886 +_0225183E: + bl sub_02033DFC + cmp r0, #0 + ldr r0, _02251890 ; =0x00000246 + beq _0225184E + mov r1, #0xb + strb r1, [r5, r0] + b _02251886 +_0225184E: + mov r1, #0xa + strb r1, [r5, r0] + b _02251886 +_02251854: + bl sub_02033DFC + cmp r0, #0 + ldr r0, _02251890 ; =0x00000246 + beq _02251864 + mov r1, #0xd + strb r1, [r5, r0] + b _02251886 +_02251864: + mov r1, #0xc + strb r1, [r5, r0] + b _02251886 +_0225186A: + bl sub_02033DFC + cmp r0, #0 + ldr r0, _02251890 ; =0x00000246 + beq _0225187A + mov r1, #0xf + strb r1, [r5, r0] + b _02251886 +_0225187A: + mov r1, #0xe + strb r1, [r5, r0] + b _02251886 +_02251880: + ldr r0, _02251890 ; =0x00000246 + mov r1, #2 + strb r1, [r5, r0] +_02251886: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_0225188C: .word 0x000005DC +_02251890: .word 0x00000246 + thumb_func_end ov23_022517E0 + + thumb_func_start ov23_02251894 +ov23_02251894: ; 0x02251894 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + ldr r0, [r5, #0x4c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #2 + bl ov23_022430E0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _022518C6 + add r4, r0, #0 +_022518C6: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _022518F2 + add r0, r0, #1 + cmp r4, r0 + bne _02251902 + ldr r0, [r5, #0x4c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r1, sp, #0 + add r2, r0, #0 + ldrh r1, [r1, #2] + add r0, r5, #0 + mov r3, #6 + bl ov23_0225128C + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_022518F2: + bl ov23_022421DC + bl ov23_02254044 + ldr r0, _0225195C ; =0x00000246 + mov r1, #0 + strb r1, [r5, r0] + b _02251954 +_02251902: + bl ov23_022421DC + bl ov23_02254044 + add r0, r4, #0 + add r1, r5, #0 + bl ov23_0224F61C + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov23_02251418 + cmp r0, #0 + beq _0225193A + bl ov23_022421BC + add r1, r6, #0 + bl ov23_022540F4 + bl ov23_022421BC + mov r2, #0 + mov r1, #0x25 + add r3, r2, #0 + bl ov23_02253F40 + b _02251948 +_0225193A: + bl ov23_022421BC + mov r2, #0 + mov r1, #0x26 + add r3, r2, #0 + bl ov23_02253F40 +_02251948: + ldr r0, _0225195C ; =0x00000246 + mov r1, #0x13 + strb r1, [r5, r0] + add r0, r5, #0 + bl ov23_0224FB7C +_02251954: + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0225195C: .word 0x00000246 + thumb_func_end ov23_02251894 + + thumb_func_start ov23_02251960 +ov23_02251960: ; 0x02251960 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + ldr r0, [r5, #0x4c] + bl ov23_02248D20 + add r4, r0, #0 + ldr r0, [r5, #0x4c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r2, sp, #0 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #6 + bl ov23_022430E0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _02251992 + add r4, r0, #0 +_02251992: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _022519BE + add r0, r0, #1 + cmp r4, r0 + bne _022519CE + ldr r0, [r5, #0x4c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r1, sp, #0 + add r2, r0, #0 + ldrh r1, [r1, #2] + add r0, r5, #0 + mov r3, #6 + bl ov23_0225128C + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_022519BE: + bl ov23_022421DC + bl ov23_02254044 + ldr r0, _02251A54 ; =0x00000246 + mov r1, #0 + strb r1, [r5, r0] + b _02251A38 +_022519CE: + bl ov23_022421DC + bl ov23_02254044 + add r0, r4, #0 + add r1, r5, #0 + bl ov23_0224F5F0 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov23_0225144C + cmp r0, #1 + bne _02251A06 + bl ov23_022421BC + add r1, r6, #0 + bl ov23_022540F4 + bl ov23_022421BC + mov r2, #0 + mov r1, #0x24 + add r3, r2, #0 + bl ov23_02253F40 + b _02251A2C +_02251A06: + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _02251A1E + bl ov23_022421BC + mov r2, #0 + mov r1, #0x37 + add r3, r2, #0 + bl ov23_02253F40 + b _02251A2C +_02251A1E: + bl ov23_022421BC + mov r2, #0 + mov r1, #0x27 + add r3, r2, #0 + bl ov23_02253F40 +_02251A2C: + ldr r0, _02251A54 ; =0x00000246 + mov r1, #0x16 + strb r1, [r5, r0] + add r0, r5, #0 + bl ov23_0224FB7C +_02251A38: + mov r1, #0 + ldr r0, [r5, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r5, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02251A54: .word 0x00000246 + thumb_func_end ov23_02251960 + + thumb_func_start ov23_02251A58 +ov23_02251A58: ; 0x02251A58 + push {r3, lr} + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02251A7C + ldr r0, _02251A80 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _02251A7C + bl ov23_022421BC + bl ov23_02254044 + mov r0, #1 + pop {r3, pc} +_02251A7C: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02251A80: .word 0x021BF67C + thumb_func_end ov23_02251A58 + + thumb_func_start ov23_02251A84 +ov23_02251A84: ; 0x02251A84 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0 + add r4, r1, #0 + str r0, [sp, #4] + ldr r0, [r4, #0x3c] + bl sub_0205EABC + lsl r1, r0, #0x10 + mov r0, #0xf + lsl r0, r0, #0x10 + sub r0, r0, r1 + str r0, [sp] + ldr r0, [r4, #0x3c] + bl sub_0205EAC8 + lsl r1, r0, #0x10 + mov r0, #0x11 + lsl r0, r0, #0x10 + sub r1, r0, r1 + str r1, [sp, #8] + cmp r5, #0 + bne _02251ABE + ldr r0, [sp] + neg r0, r0 + str r0, [sp] + neg r0, r1 + str r0, [sp, #8] +_02251ABE: + ldr r1, [r4, #0x24] + add r0, sp, #0 + bl sub_02020990 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_02251A84 + + thumb_func_start ov23_02251ACC +ov23_02251ACC: ; 0x02251ACC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r0, #0 + bl sub_02050A60 + add r4, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #5 + bhi _02251BAA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02251AF2: ; jump table + .short _02251AFE - _02251AF2 - 2 ; case 0 + .short _02251B22 - _02251AF2 - 2 ; case 1 + .short _02251B40 - _02251AF2 - 2 ; case 2 + .short _02251B4E - _02251AF2 - 2 ; case 3 + .short _02251B54 - _02251AF2 - 2 ; case 4 + .short _02251B80 - _02251AF2 - 2 ; case 5 +_02251AFE: + ldr r0, _02251BB0 ; =0x0000060D + bl sub_02005748 + mov r1, #0 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + mov r0, #1 + str r0, [r5, #0] + b _02251BAA +_02251B22: + bl sub_0200F2AC + cmp r0, #0 + beq _02251BAA + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_0205EB18 + mov r0, #1 + add r1, r4, #0 + bl ov23_02251A84 + mov r0, #2 + str r0, [r5, #0] + b _02251BAA +_02251B40: + add r0, r4, #0 + add r1, r6, #0 + bl ov23_02254D98 + mov r0, #3 + str r0, [r5, #0] + b _02251BAA +_02251B4E: + mov r0, #4 + str r0, [r5, #0] + b _02251BAA +_02251B54: + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_0205EB18 + mov r0, #0 + add r1, r4, #0 + bl ov23_02251A84 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + add r1, r0, #0 + add r2, r0, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #5 + str r0, [r5, #0] + b _02251BAA +_02251B80: + bl sub_0200F2AC + cmp r0, #0 + beq _02251BAA + add r0, r4, #0 + bl ov23_0224B2C8 + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206AA30 + add r0, r4, #0 + bl ov23_02251F94 + add r0, r5, #0 + bl sub_020181C4 + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_02251BAA: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02251BB0: .word 0x0000060D + thumb_func_end ov23_02251ACC + + thumb_func_start ov23_02251BB4 +ov23_02251BB4: ; 0x02251BB4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x68] + bl sub_020237BC + ldr r0, [r4, #0x6c] + bl sub_020237BC + ldr r0, [r4, #0x70] + bl sub_0200B3F0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _02251BDA + mov r0, #0 + blx r1 +_02251BDA: + ldr r0, [r4, #8] + cmp r0, #0 + beq _02251BE8 + bl sub_0206A844 + mov r0, #0 + str r0, [r4, #8] +_02251BE8: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_022421BC + bl ov23_02254044 + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + thumb_func_end ov23_02251BB4 + + thumb_func_start ov23_02251C04 +ov23_02251C04: ; 0x02251C04 + push {r3, r4, r5, r6, lr} + sub sp, #4 + ldr r2, _02251F80 ; =0x00000246 + add r4, r1, #0 + ldrb r3, [r4, r2] + add r6, r0, #0 + cmp r3, #0x17 + bhi _02251CF8 + add r3, r3, r3 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_02251C20: ; jump table + .short _02251C50 - _02251C20 - 2 ; case 0 + .short _02251C8E - _02251C20 - 2 ; case 1 + .short _02251C96 - _02251C20 - 2 ; case 2 + .short _02251E9E - _02251C20 - 2 ; case 3 + .short _02251F7C - _02251C20 - 2 ; case 4 + .short _02251F7C - _02251C20 - 2 ; case 5 + .short _02251CAA - _02251C20 - 2 ; case 6 + .short _02251CEE - _02251C20 - 2 ; case 7 + .short _02251D12 - _02251C20 - 2 ; case 8 + .short _02251D54 - _02251C20 - 2 ; case 9 + .short _02251D5C - _02251C20 - 2 ; case 10 + .short _02251D90 - _02251C20 - 2 ; case 11 + .short _02251DA8 - _02251C20 - 2 ; case 12 + .short _02251DDC - _02251C20 - 2 ; case 13 + .short _02251DF4 - _02251C20 - 2 ; case 14 + .short _02251E28 - _02251C20 - 2 ; case 15 + .short _02251E40 - _02251C20 - 2 ; case 16 + .short _02251ED4 - _02251C20 - 2 ; case 17 + .short _02251F04 - _02251C20 - 2 ; case 18 + .short _02251F0C - _02251C20 - 2 ; case 19 + .short _02251F20 - _02251C20 - 2 ; case 20 + .short _02251F50 - _02251C20 - 2 ; case 21 + .short _02251F58 - _02251C20 - 2 ; case 22 + .short _02251F6C - _02251C20 - 2 ; case 23 +_02251C50: + add r0, r4, #0 + bl ov23_02252E18 + mov r0, #0x17 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x17 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r1, #0x1a + strh r0, [r4, r1] + mov r1, #0 + ldr r3, _02251F84 ; =ov23_0225148C + add r0, r4, #0 + mov r2, #5 + str r1, [sp] + bl ov23_022515D8 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #1 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251C8E: + bl ov23_022514D8 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02251C96: + bl sub_02059514 + bl ov23_02243204 + add r0, r6, #0 + add r1, r4, #0 + bl ov23_02251BB4 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02251CAA: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_022421BC + bl ov23_02254044 + ldr r0, [r4, #0xc] + bl sub_0203D174 + bl sub_02025E38 + add r5, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0203D174 + bl sub_020298B0 + mov r3, #0 + str r3, [sp] + add r2, r0, #0 + ldr r0, [r4, #0xc] + add r1, r5, #0 + ldr r0, [r0, #8] + bl ov23_02253C64 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #7 + add r1, #0x3a + add sp, #4 + strb r0, [r4, r1] + pop {r3, r4, r5, r6, pc} +_02251CEE: + ldr r0, _02251F88 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _02251CFA +_02251CF8: + b _02251F7C +_02251CFA: + sub r2, #0x3a + ldr r0, [r4, r2] + bl ov23_02253D10 + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, #0x3a + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251D12: + bl ov23_022421BC + bl ov23_02254044 + mov r0, #0x16 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x16 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + add r1, #0x1a + strh r0, [r4, r1] + mov r0, #1 + str r0, [sp] + ldr r3, _02251F8C ; =ov23_022514B0 + add r0, r4, #0 + mov r1, #0x28 + mov r2, #3 + bl ov23_022516E8 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #9 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251D54: + bl ov23_022517E0 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02251D5C: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_02242FF8 + bl ov23_022412F0 + mov r0, #1 + sub r1, r0, #7 + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + bl ov23_022421BC + mov r2, #0 + mov r1, #0x30 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x10 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251D90: + bl ov23_022421BC + mov r2, #0 + mov r1, #0x39 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x10 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251DA8: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_02242FD0 + bl ov23_02241E6C + mov r0, #1 + sub r1, r0, #7 + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + bl ov23_022421BC + mov r2, #0 + mov r1, #0x31 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x10 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251DDC: + bl ov23_022421BC + mov r2, #0 + mov r1, #0x3a + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x10 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251DF4: + add r0, r4, #0 + bl ov23_0224FB7C + bl ov23_02242FE4 + bl ov23_02245728 + mov r0, #1 + sub r1, r0, #7 + mov r2, #0 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 + bl ov23_022421BC + mov r2, #0 + mov r1, #0x32 + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x10 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251E28: + bl ov23_022421BC + mov r2, #0 + mov r1, #0x3b + add r3, r2, #0 + bl ov23_02253F40 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x10 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251E40: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02251E56 + ldr r0, _02251F88 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _02251E58 +_02251E56: + b _02251F7C +_02251E58: + bl sub_02033DFC + cmp r0, #0 + bne _02251E6E + mov r0, #1 + mov r1, #0 + sub r2, r1, #6 + add r3, r0, #0 + str r0, [sp] + bl sub_0200AAE0 +_02251E6E: + bl ov23_022421BC + bl ov23_02254044 + bl sub_02033DFC + cmp r0, #0 + beq _02251E84 + bl ov23_02242FA8 + b _02251E88 +_02251E84: + bl ov23_02242FBC +_02251E88: + bl ov23_02245784 + bl ov23_02241364 + bl ov23_02241ED0 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #8 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251E9E: + ldr r0, [r4, #0xc] + ldr r0, [r0, #0x10] + cmp r0, #0 + bne _02251EC8 + mov r0, #0xb + mov r1, #0xc + bl sub_02018184 + mov r1, #0 + mov r2, #0xc + add r5, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r5, #0] + str r0, [r5, #4] + ldr r0, [r4, #0xc] + ldr r1, _02251F90 ; =ov23_02251ACC + add r2, r5, #0 + bl sub_02050904 +_02251EC8: + add r0, r6, #0 + add r1, r4, #0 + bl ov23_02251BB4 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02251ED4: + mov r0, #2 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #2 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + bl ov23_02250D2C + add r0, r4, #0 + mov r1, #0x1c + bl ov23_02252D74 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x12 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251F04: + bl ov23_02251894 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02251F0C: + add r0, r4, #0 + bl ov23_02251A58 + cmp r0, #0 + beq _02251F7C + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x11 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251F20: + mov r0, #6 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #6 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + bl ov23_02250D5C + add r0, r4, #0 + mov r1, #0x20 + bl ov23_02252D74 + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x15 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251F50: + bl ov23_02251960 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_02251F58: + add r0, r4, #0 + bl ov23_02251A58 + cmp r0, #0 + beq _02251F7C + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0x14 + add sp, #4 + strb r1, [r4, r0] + pop {r3, r4, r5, r6, pc} +_02251F6C: + add r0, r4, #0 + bl ov23_02251A58 + cmp r0, #0 + beq _02251F7C + ldr r0, _02251F80 ; =0x00000246 + mov r1, #0 + strb r1, [r4, r0] +_02251F7C: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02251F80: .word 0x00000246 +_02251F84: .word ov23_0225148C +_02251F88: .word 0x021BF67C +_02251F8C: .word ov23_022514B0 +_02251F90: .word ov23_02251ACC + thumb_func_end ov23_02251C04 + + thumb_func_start ov23_02251F94 +ov23_02251F94: ; 0x02251F94 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #1 + bl ov23_022430D0 + mov r1, #0x25 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x25 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020C4CF4 + str r5, [r4, #0xc] + bl ov23_022421BC + ldr r1, _02252024 ; =0x0000027F + mov r2, #1 + bl ov23_02253DFC + ldr r0, _02252028 ; =0x00000246 + mov r1, #0 + strb r1, [r4, r0] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x68] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x6c] + mov r0, #4 + bl sub_0200B358 + str r0, [r4, #0x70] + mov r0, #4 + bl sub_0206A780 + str r0, [r4, #8] + mov r1, #0xc8 + mov r2, #0x14 + mov r3, #0x7a + bl sub_0206A8A0 + mov r1, #0 + ldr r0, [r4, #8] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r4, #8] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 + ldr r0, _0225202C ; =ov23_02251C04 + ldr r2, _02252030 ; =0x00002710 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r1, [r4, #4] + ldr r2, _02252034 ; =ov23_02251270 + add r0, r4, #0 + bl ov23_022431EC + pop {r3, r4, r5, pc} + nop +_02252024: .word 0x0000027F +_02252028: .word 0x00000246 +_0225202C: .word ov23_02251C04 +_02252030: .word 0x00002710 +_02252034: .word ov23_02251270 + thumb_func_end ov23_02251F94 + + thumb_func_start ov23_02252038 +ov23_02252038: ; 0x02252038 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0225204E + cmp r0, #1 + beq _02252074 + cmp r0, #2 + beq _022520AC + pop {r3, r4, r5, pc} +_0225204E: + bl ov23_0224219C + bl ov23_02254238 + cmp r0, #0 + bne _022520BC + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #4] + ldr r1, _022520C0 ; =0x022569C8 + ldr r0, [r0, #8] + ldr r2, _022520C4 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #8] + mov r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_02252074: + ldr r0, [r4, #8] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _022520BC + cmp r0, #0 + bne _02252094 + add r1, r4, #0 + mov r0, #0x59 + add r1, #0xc + bl sub_020360D0 + b _022520A2 +_02252094: + mov r0, #0x40 + bl sub_0205948C + bl ov23_0224219C + bl ov23_02254044 +_022520A2: + mov r0, #2 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_022520AC: + add r0, r4, #0 + bl sub_020181C4 + bl ov23_02243204 + add r0, r5, #0 + bl sub_0200DA58 +_022520BC: + pop {r3, r4, r5, pc} + nop +_022520C0: .word 0x022569C8 +_022520C4: .word 0x000003D9 + thumb_func_end ov23_02252038 + + thumb_func_start ov23_022520C8 +ov23_022520C8: ; 0x022520C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _022520DA + mov r1, #4 + bl sub_02002154 +_022520DA: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov23_022520C8 + + thumb_func_start ov23_022520E8 +ov23_022520E8: ; 0x022520E8 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x25 + add r6, r0, #0 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r1, #0 + mov r2, #0x14 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0] + ldr r0, _02252150 ; =ov23_02252038 + ldr r2, _02252154 ; =0x00002710 + str r6, [r4, #4] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x10] + bl ov23_0224219C + add r6, r0, #0 + ldrb r0, [r5, #1] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r6, #0 + bl ov23_02254068 + bl ov23_0224219C + mov r2, #0 + mov r1, #0x43 + add r3, r2, #0 + bl ov23_02253F40 + ldrb r0, [r5] + ldr r2, _02252158 ; =ov23_022520C8 + strb r0, [r4, #0xc] + ldrb r0, [r5, #1] + strb r0, [r4, #0xd] + ldrb r0, [r5, #2] + strb r0, [r4, #0xe] + ldr r1, [r4, #0x10] + add r0, r4, #0 + bl ov23_022431EC + pop {r4, r5, r6, pc} + nop +_02252150: .word ov23_02252038 +_02252154: .word 0x00002710 +_02252158: .word ov23_022520C8 + thumb_func_end ov23_022520E8 + + thumb_func_start ov23_0225215C +ov23_0225215C: ; 0x0225215C + push {r4, lr} + add r4, r2, #0 + ldrb r0, [r4] + ldrb r1, [r4, #1] + bl ov23_0224AEC4 + cmp r0, #0 + beq _02252174 + mov r0, #0x5a + add r1, r4, #0 + bl sub_02035B48 +_02252174: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0225215C + + thumb_func_start ov23_02252178 +ov23_02252178: ; 0x02252178 + push {r3, r4, r5, lr} + add r4, r2, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _022521AE + bl ov23_022421AC + add r5, r0, #0 + ldrb r0, [r4, #1] + bl sub_02032EE8 + add r1, r0, #0 + add r0, r5, #0 + bl ov23_02254068 + bl ov23_022421AC + ldr r3, _022521C0 ; =ov23_022513A4 + mov r1, #8 + mov r2, #1 + bl ov23_02253F40 + ldr r0, _022521C4 ; =0x00000425 + bl sub_0200549C +_022521AE: + ldrb r0, [r4] + ldrb r1, [r4, #1] + bl ov23_0224AEC4 + ldrb r0, [r4] + ldrb r1, [r4, #1] + bl ov23_0224D500 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022521C0: .word ov23_022513A4 +_022521C4: .word 0x00000425 + thumb_func_end ov23_02252178 + + thumb_func_start ov23_022521C8 +ov23_022521C8: ; 0x022521C8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, _022521E8 ; =0x0000024A + ldr r0, [r5, #0x48] + ldrh r4, [r5, r1] + add r1, r5, r1 + bl sub_020014D0 + ldr r0, _022521E8 ; =0x0000024A + ldrh r0, [r5, r0] + cmp r4, r0 + beq _022521E6 + ldr r0, _022521EC ; =0x000005DC + bl sub_02005748 +_022521E6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022521E8: .word 0x0000024A +_022521EC: .word 0x000005DC + thumb_func_end ov23_022521C8 + + .rodata + + + .global Unk_ov23_022569C4 +Unk_ov23_022569C4: ; 0x022569C4 + .incbin "incbin/overlay23_rodata.bin", 0x6B8, 0x6BC - 0x6B8 + + .global Unk_ov23_022569C8 +Unk_ov23_022569C8: ; 0x022569C8 + .incbin "incbin/overlay23_rodata.bin", 0x6BC, 0x8 + diff --git a/asm/ov23_022521F0.s b/asm/ov23_022521F0.s new file mode 100644 index 000000000..bf57ecaaa --- /dev/null +++ b/asm/ov23_022521F0.s @@ -0,0 +1,2422 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_022521F0 +ov23_022521F0: ; 0x022521F0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + ldr r0, [r6, #0xc] + add r4, r1, #0 + bl sub_0203D174 + bl sub_020298B0 + bl sub_02028930 + add r7, r4, r0 + mov r4, #0 +_0225220A: + cmp r4, #0 + bne _02252212 + mov r5, #0x21 + b _0225222A +_02252212: + ldr r0, _022522E0 ; =0x5D588B65 + add r1, r7, #0 + mul r1, r0 + ldr r0, _022522E4 ; =0x00269EC3 + add r7, r1, r0 + lsr r1, r7, #0x10 + lsl r0, r1, #5 + add r0, r1, r0 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r5, r0, #1 +_0225222A: + mov r0, #0 + cmp r4, #0 + ble _02252246 + mov r1, #0x21 + add r3, r0, #0 + lsl r1, r1, #4 +_02252236: + add r2, r6, r0 + ldrb r2, [r2, r1] + cmp r5, r2 + bne _02252240 + add r5, r3, #0 +_02252240: + add r0, r0, #1 + cmp r0, r4 + blt _02252236 +_02252246: + cmp r5, #0 + bne _0225224E + sub r4, r4, #1 + b _022522D6 +_0225224E: + add r0, r5, #0 + bl ov23_022542AC + str r0, [sp, #4] + add r0, r5, #0 + bl ov23_022542BC + str r0, [sp, #8] + ldr r0, [sp, #4] + cmp r0, #0 + bne _0225226E + ldr r0, [sp, #8] + cmp r0, #0 + bne _0225226E + sub r4, r4, #1 + b _022522D6 +_0225226E: + mov r1, #0x21 + add r0, r6, r4 + lsl r1, r1, #4 + str r0, [sp] + strb r5, [r0, r1] + add r0, r5, #0 + bl ov23_0225429C + ldr r1, _022522E8 ; =0x00000215 + ldr r2, [sp] + strb r0, [r2, r1] + add r0, r2, #0 + ldrb r0, [r0, r1] + cmp r0, #6 + bne _022522A8 + ldr r0, _022522E0 ; =0x5D588B65 + add r2, r7, #0 + mul r2, r0 + ldr r0, _022522E4 ; =0x00269EC3 + add r7, r2, r0 + lsr r2, r7, #0x10 + lsl r0, r2, #2 + add r0, r2, r0 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r2, r0, #1 + ldr r0, [sp] + strb r2, [r0, r1] +_022522A8: + ldr r0, _022522E0 ; =0x5D588B65 + add r1, r7, #0 + mul r1, r0 + ldr r0, _022522E4 ; =0x00269EC3 + add r7, r1, r0 + ldr r1, [sp, #8] + ldr r0, [sp, #4] + sub r0, r1, r0 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + bne _022522C2 + lsr r0, r7, #0x10 + b _022522C8 +_022522C2: + lsr r0, r7, #0x10 + mul r1, r0 + lsr r0, r1, #0x10 +_022522C8: + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [sp, #4] + add r2, r0, r1 + ldr r1, _022522EC ; =0x0000021A + ldr r0, [sp] + strb r2, [r0, r1] +_022522D6: + add r4, r4, #1 + cmp r4, #5 + blt _0225220A + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022522E0: .word 0x5D588B65 +_022522E4: .word 0x00269EC3 +_022522E8: .word 0x00000215 +_022522EC: .word 0x0000021A + thumb_func_end ov23_022521F0 + + thumb_func_start ov23_022522F0 +ov23_022522F0: ; 0x022522F0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + ldr r0, [r6, #0xc] + add r4, r1, #0 + bl sub_0203D174 + add r5, r0, #0 + bl sub_020298B0 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02027560 + bl sub_02027474 + str r0, [sp, #4] + add r0, r7, #0 + bl sub_02028930 + add r7, r4, r0 + mov r4, #0 +_0225231C: + ldr r0, _022523F4 ; =0x5D588B65 + add r1, r7, #0 + mul r1, r0 + ldr r0, _022523F8 ; =0x00269EC3 + add r7, r1, r0 + lsr r1, r7, #0x10 + mov r0, #0x8a + mul r0, r1 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r5, r0, #1 + mov r0, #0 + cmp r4, #0 + ble _02252350 + mov r1, #0x21 + add r3, r0, #0 + lsl r1, r1, #4 +_02252340: + add r2, r6, r0 + ldrb r2, [r2, r1] + cmp r5, r2 + bne _0225234A + add r5, r3, #0 +_0225234A: + add r0, r0, #1 + cmp r0, r4 + blt _02252340 +_02252350: + cmp r5, #0 + bne _02252358 + sub r4, r4, #1 + b _022523EA +_02252358: + mov r1, #0x21 + add r0, r6, r4 + lsl r1, r1, #4 + str r0, [sp] + strb r5, [r0, r1] + add r0, r5, #0 + bl sub_0205742C + ldr r2, _022523FC ; =0x00000215 + ldr r1, [sp] + strb r0, [r1, r2] + ldr r0, [sp, #4] + cmp r0, #0 + bne _02252382 + add r0, r5, #0 + bl sub_0205747C + cmp r0, #1 + bne _02252382 + sub r4, r4, #1 + b _022523EA +_02252382: + ldr r0, _022523FC ; =0x00000215 + ldr r1, [sp] + ldrb r1, [r1, r0] + cmp r1, #0 + bne _02252390 + sub r4, r4, #1 + b _022523EA +_02252390: + cmp r1, #6 + bne _022523B0 + ldr r1, _022523F4 ; =0x5D588B65 + add r2, r7, #0 + mul r2, r1 + ldr r1, _022523F8 ; =0x00269EC3 + add r7, r2, r1 + lsr r2, r7, #0x10 + lsl r1, r2, #2 + add r1, r2, r1 + lsr r1, r1, #0x10 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + add r2, r1, #1 + ldr r1, [sp] + strb r2, [r1, r0] +_022523B0: + add r0, r5, #0 + bl sub_0205743C + str r0, [sp, #8] + add r0, r5, #0 + bl sub_0205744C + ldr r1, _022523F4 ; =0x5D588B65 + add r2, r7, #0 + mul r2, r1 + ldr r1, _022523F8 ; =0x00269EC3 + add r7, r2, r1 + ldr r1, [sp, #8] + sub r0, r0, r1 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + bne _022523D6 + lsr r0, r7, #0x10 + b _022523DC +_022523D6: + lsr r0, r7, #0x10 + mul r1, r0 + lsr r0, r1, #0x10 +_022523DC: + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [sp, #8] + add r2, r0, r1 + ldr r1, _02252400 ; =0x0000021A + ldr r0, [sp] + strb r2, [r0, r1] +_022523EA: + add r4, r4, #1 + cmp r4, #5 + blt _0225231C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022523F4: .word 0x5D588B65 +_022523F8: .word 0x00269EC3 +_022523FC: .word 0x00000215 +_02252400: .word 0x0000021A + thumb_func_end ov23_022522F0 + + thumb_func_start ov23_02252404 +ov23_02252404: ; 0x02252404 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r5, #0xc] + add r7, r2, #0 + add r4, r1, #0 + bl sub_0203D174 + bl sub_020298B0 + add r6, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + bl ov23_0224F684 + ldr r1, _022524A4 ; =0x00000215 + add r2, r5, r4 + ldrb r1, [r2, r1] + cmp r1, r0 + beq _02252432 + ldr r0, _022524A8 ; =0x0000FFFD + pop {r3, r4, r5, r6, r7, pc} +_02252432: + add r0, r7, #0 + add r1, r5, #0 + bl ov23_0224F69C + ldr r1, _022524AC ; =0x0000021A + add r2, r5, r4 + add r3, r0, #0 + ldrb r0, [r2, r1] + cmp r0, r3 + ble _0225244A + ldr r0, _022524B0 ; =0x0000FFFB + pop {r3, r4, r5, r6, r7, pc} +_0225244A: + add r0, r1, #0 + add r0, #0x2e + ldrb r0, [r5, r0] + cmp r0, #1 + bne _02252462 + sub r1, #0xa + ldrb r1, [r2, r1] + add r0, r6, #0 + bl sub_02028E84 + str r0, [sp] + b _02252484 +_02252462: + cmp r0, #0 + bne _02252474 + sub r1, #0xa + ldrb r1, [r2, r1] + add r0, r6, #0 + bl sub_02028BC8 + str r0, [sp] + b _02252484 +_02252474: + cmp r0, #2 + bne _02252484 + sub r1, #0xa + ldrb r1, [r2, r1] + add r0, r6, #0 + bl sub_02028DB4 + str r0, [sp] +_02252484: + ldr r0, [sp] + cmp r0, #0 + beq _02252494 + add r0, r6, #0 + add r1, r7, #0 + bl sub_02028C6C + b _02252498 +_02252494: + ldr r0, _022524B4 ; =0x0000FFFC + pop {r3, r4, r5, r6, r7, pc} +_02252498: + mov r0, #0x21 + add r1, r5, r4 + lsl r0, r0, #4 + ldrb r0, [r1, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_022524A4: .word 0x00000215 +_022524A8: .word 0x0000FFFD +_022524AC: .word 0x0000021A +_022524B0: .word 0x0000FFFB +_022524B4: .word 0x0000FFFC + thumb_func_end ov23_02252404 + + thumb_func_start ov23_022524B8 +ov23_022524B8: ; 0x022524B8 + push {r4, r5, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + mov r4, #3 + cmp r0, #2 + bne _022524CC + mov r4, #2 +_022524CC: + add r0, r5, #0 + bl ov23_0224FB7C + add r0, r4, #0 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + lsl r0, r4, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02252654 ; =0x000001EF + add r1, #0x10 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02252658 ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r1, #0x92 + lsl r1, r1, #2 + ldrb r0, [r5, r1] + cmp r0, #1 + bne _02252562 + sub r1, #0x24 + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov23_022521F0 + bl ov23_022421BC + bl ov23_02253E3C + add r1, r0, #0 + ldr r0, [r5, #0x40] + mov r2, #0xd + mov r3, #0 + bl sub_02013A4C + bl ov23_022421BC + bl ov23_02253E3C + add r1, r0, #0 + ldr r0, [r5, #0x40] + mov r2, #0xe + mov r3, #1 + bl sub_02013A4C + bl ov23_022421BC + bl ov23_02253E3C + mov r2, #0xf + add r1, r0, #0 + add r3, r2, #0 + ldr r0, [r5, #0x40] + sub r3, #0x11 + bl sub_02013A4C + b _022525DA +_02252562: + cmp r0, #0 + bne _022525B0 + sub r1, #0x24 + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov23_022522F0 + bl ov23_022421BC + bl ov23_02253E3C + add r1, r0, #0 + ldr r0, [r5, #0x40] + mov r2, #0x10 + mov r3, #0 + bl sub_02013A4C + bl ov23_022421BC + bl ov23_02253E3C + add r1, r0, #0 + ldr r0, [r5, #0x40] + mov r2, #0x11 + mov r3, #1 + bl sub_02013A4C + bl ov23_022421BC + bl ov23_02253E3C + mov r2, #0x12 + add r1, r0, #0 + add r3, r2, #0 + ldr r0, [r5, #0x40] + sub r3, #0x14 + bl sub_02013A4C + b _022525DA +_022525B0: + bl ov23_022421BC + bl ov23_02253E3C + add r1, r0, #0 + ldr r0, [r5, #0x40] + mov r2, #0x1c + mov r3, #0 + bl sub_02013A4C + bl ov23_022421BC + bl ov23_02253E3C + mov r2, #0x16 + add r1, r0, #0 + add r3, r2, #0 + ldr r0, [r5, #0x40] + sub r3, #0x18 + bl sub_02013A4C +_022525DA: + bl ov23_02253D40 + add r1, sp, #0x14 + mov r2, #0x20 + bl sub_020C4DB0 + ldr r0, [r5, #0x40] + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x20] + lsl r0, r4, #0x10 + lsr r1, r0, #0x10 + add r0, sp, #0x14 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + mov r0, #0x13 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #0x13 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r5, r1] + add r2, sp, #0x14 + ldrh r1, [r2, #0x12] + ldrh r2, [r2, #0x10] + add r0, r5, #0 + bl ov23_02251238 + mov r2, #0x23 + lsl r2, r2, #4 + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x14 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x48] + mov r0, #0x8b + lsl r0, r0, #2 + ldr r1, [r5, r0] + add r0, #0x1e + strh r1, [r5, r0] + add r0, r5, #0 + add r0, #0x10 + bl sub_0201A954 + add r0, r5, #0 + add sp, #0x34 + pop {r4, r5, pc} + nop +_02252654: .word 0x000001EF +_02252658: .word 0x000003D9 + thumb_func_end ov23_022524B8 + + thumb_func_start ov23_0225265C +ov23_0225265C: ; 0x0225265C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + mov r1, #0x13 + add r6, r0, #0 + add r7, r2, #0 + bl sub_02001504 + add r4, r0, #0 + add r0, #0x20 + mov r1, #0xf + bl sub_0201ADA4 + bl ov23_022421BC + bl ov23_02253E3C + ldr r1, _02252748 ; =0x00000247 + ldr r2, [r4, #0x68] + ldrb r1, [r4, r1] + add r1, #0x17 + bl sub_0200B1B8 + mov r3, #1 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x68] + add r0, #0x20 + bl sub_0201D738 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _022526FE + ldr r2, _0225274C ; =0x00000215 + add r3, r4, r5 + ldrb r2, [r3, r2] + ldr r0, [r4, #0x70] + mov r1, #2 + bl sub_0200BA94 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r2, _02252750 ; =0x0000021A + add r3, r4, r5 + ldrb r2, [r3, r2] + ldr r0, [r4, #0x70] + mov r1, #6 + mov r3, #2 + bl sub_0200B60C + bl ov23_022421BC + bl ov23_02253E3C + ldr r2, [r4, #0x68] + mov r1, #0x19 + bl sub_0200B1B8 + ldr r0, [r4, #0x70] + ldr r1, [r4, #0x6c] + ldr r2, [r4, #0x68] + bl sub_0200C388 + mov r0, #0x11 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x6c] + add r0, #0x20 + mov r3, #1 + bl sub_0201D738 +_022526FE: + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A9A4 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _02252710 + add r5, r0, #0 +_02252710: + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _02252728 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov23_0224FD84 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_02252728: + cmp r0, #0 + bne _0225273A + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov23_02250C3C + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0225273A: + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov23_02250540 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02252748: .word 0x00000247 +_0225274C: .word 0x00000215 +_02252750: .word 0x0000021A + thumb_func_end ov23_0225265C + + thumb_func_start ov23_02252754 +ov23_02252754: ; 0x02252754 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r6, r1, #0 + mov r1, #0x13 + str r0, [sp, #0xc] + str r2, [sp, #0x10] + bl sub_02001504 + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0203D174 + bl sub_020298B0 + str r0, [sp, #0x2c] + add r0, r4, #0 + mov r5, #0 + add r0, #0x20 + mov r1, #0xf + bl sub_0201ADA4 + sub r0, r5, #2 + cmp r6, r0 + bne _02252786 + b _022528FA +_02252786: + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0225280A + add r0, r6, #0 + add r1, r4, #0 + bl ov23_0224F66C + str r0, [sp, #0x24] + ldr r0, [sp, #0x2c] + bl sub_02028930 + mov r1, #0x89 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r1, r1, r0 + ldr r0, [sp, #0x24] + add r7, r0, r1 + bl ov23_0225429C + add r5, r0, #0 + cmp r5, #6 + bne _022527CE + ldr r0, _022529F4 ; =0x5D588B65 + add r1, r7, #0 + mul r1, r0 + ldr r0, _022529F8 ; =0x00269EC3 + add r7, r1, r0 + lsr r1, r7, #0x10 + lsl r0, r1, #2 + add r0, r1, r0 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r5, r0, #1 +_022527CE: + ldr r0, [sp, #0x24] + bl ov23_022542AC + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + bl ov23_022542BC + ldr r1, _022529F4 ; =0x5D588B65 + add r2, r7, #0 + mul r2, r1 + ldr r1, _022529F8 ; =0x00269EC3 + add r1, r2, r1 + ldr r2, [sp, #0x28] + sub r0, r0, r2 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + bne _022527F2 + b _022527F8 +_022527F2: + lsr r0, r1, #0x10 + add r1, r0, #0 + mul r1, r2 +_022527F8: + lsr r0, r1, #0x10 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [sp, #0x28] + add r1, r0, r1 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r7, r0, #1 + b _022528FA +_0225280A: + cmp r0, #0 + bne _02252888 + add r0, r6, #0 + add r1, r4, #0 + bl ov23_0224F61C + str r0, [sp, #0x20] + ldr r0, [sp, #0x2c] + bl sub_02028930 + mov r1, #0x89 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r1, r1, r0 + ldr r0, [sp, #0x20] + add r7, r0, r1 + bl sub_0205742C + add r5, r0, #0 + cmp r5, #6 + bne _0225284C + ldr r0, _022529F4 ; =0x5D588B65 + add r1, r7, #0 + mul r1, r0 + ldr r0, _022529F8 ; =0x00269EC3 + add r7, r1, r0 + lsr r1, r7, #0x10 + lsl r0, r1, #2 + add r0, r1, r0 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r5, r0, #1 +_0225284C: + ldr r0, [sp, #0x20] + bl sub_0205743C + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + bl sub_0205744C + ldr r1, _022529F4 ; =0x5D588B65 + add r2, r7, #0 + mul r2, r1 + ldr r1, _022529F8 ; =0x00269EC3 + add r1, r2, r1 + ldr r2, [sp, #0x14] + sub r0, r0, r2 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + bne _02252870 + b _02252876 +_02252870: + lsr r0, r1, #0x10 + add r1, r0, #0 + mul r1, r2 +_02252876: + lsr r0, r1, #0x10 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [sp, #0x14] + add r1, r0, r1 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r7, r0, #1 + b _022528FA +_02252888: + add r0, r6, #0 + add r1, r4, #0 + bl ov23_0224F6C8 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x2c] + bl sub_02028930 + mov r1, #0x89 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r1, r1, r0 + ldr r0, [sp, #0x1c] + add r7, r0, r1 + bl ov23_0225426C + add r5, r0, #0 + cmp r5, #6 + bne _022528C6 + ldr r0, _022529F4 ; =0x5D588B65 + add r1, r7, #0 + mul r1, r0 + ldr r0, _022529F8 ; =0x00269EC3 + add r7, r1, r0 + lsr r1, r7, #0x10 + lsl r0, r1, #2 + add r0, r1, r0 + lsr r0, r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r5, r0, #1 +_022528C6: + ldr r0, [sp, #0x1c] + bl ov23_0225427C + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + bl ov23_0225428C + ldr r1, _022529F4 ; =0x5D588B65 + add r2, r7, #0 + mul r2, r1 + ldr r1, _022529F8 ; =0x00269EC3 + add r1, r2, r1 + ldr r2, [sp, #0x18] + sub r0, r0, r2 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + bne _022528EA + b _022528F0 +_022528EA: + lsr r0, r1, #0x10 + add r1, r0, #0 + mul r1, r2 +_022528F0: + lsr r0, r1, #0x10 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [sp, #0x18] + add r7, r0, r1 +_022528FA: + bl ov23_022421BC + bl ov23_02253E3C + ldr r1, _022529FC ; =0x00000247 + ldr r2, [r4, #0x68] + ldrb r1, [r4, r1] + add r1, #0x17 + bl sub_0200B1B8 + mov r3, #1 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x68] + add r0, #0x20 + bl sub_0201D738 + mov r0, #1 + mvn r0, r0 + cmp r6, r0 + beq _022529B4 + cmp r5, #0 + beq _02252988 + ldr r0, [r4, #0x70] + mov r1, #2 + add r2, r5, #0 + bl sub_0200BA94 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0x70] + mov r1, #6 + add r2, r7, #0 + mov r3, #2 + bl sub_0200B60C + bl ov23_022421BC + bl ov23_02253E3C + ldr r2, [r4, #0x68] + mov r1, #0x19 + bl sub_0200B1B8 + ldr r0, [r4, #0x70] + ldr r1, [r4, #0x6c] + ldr r2, [r4, #0x68] + bl sub_0200C388 + mov r0, #0x11 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x6c] + add r0, #0x20 + mov r3, #1 + bl sub_0201D738 + ldr r0, _02252A00 ; =0x00000215 + strb r5, [r4, r0] + add r0, r0, #5 + strb r7, [r4, r0] + b _022529B4 +_02252988: + ldr r0, _02252A00 ; =0x00000215 + strb r5, [r4, r0] + bl ov23_022421BC + bl ov23_02253E3C + ldr r2, [r4, #0x68] + mov r1, #0x1a + bl sub_0200B1B8 + mov r0, #0x11 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x68] + add r0, #0x20 + mov r3, #1 + bl sub_0201D738 +_022529B4: + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A9A4 + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _022529D4 + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x10] + add r1, r6, #0 + bl ov23_0224FD84 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} +_022529D4: + cmp r0, #0 + bne _022529E6 + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x10] + add r1, r6, #0 + bl ov23_02250C3C + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} +_022529E6: + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x10] + add r1, r6, #0 + bl ov23_02250540 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022529F4: .word 0x5D588B65 +_022529F8: .word 0x00269EC3 +_022529FC: .word 0x00000247 +_02252A00: .word 0x00000215 + thumb_func_end ov23_02252754 + + thumb_func_start ov23_02252A04 +ov23_02252A04: ; 0x02252A04 + cmp r0, #5 + blt _02252A0C + mov r0, #0 + bx lr +_02252A0C: + add r1, r1, r0 + mov r0, #0x21 + lsl r0, r0, #4 + ldrb r0, [r1, r0] + bx lr + ; .align 2, 0 + thumb_func_end ov23_02252A04 + + thumb_func_start ov23_02252A18 +ov23_02252A18: ; 0x02252A18 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + bl ov23_0224FB7C + mov r0, #6 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0x40] + mov r2, #3 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02252B78 ; =0x0000015F + add r1, #0x10 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02252B7C ; =0x000003D9 + add r0, #0x10 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r2, #0x92 + lsl r2, r2, #2 + ldrb r0, [r5, r2] + cmp r0, #1 + bne _02252A80 + mov r0, #0 + mov r1, #0x1a + add r2, #0x2e + mov r3, #4 + bl sub_0200B144 + add r6, r0, #0 + bl ov23_022421DC + ldr r1, _02252B80 ; =0x00000276 + mov r2, #0 + bl ov23_02253DFC + b _02252ABC +_02252A80: + cmp r0, #0 + bne _02252AA0 + mov r0, #0 + mov r1, #0x1a + add r2, #0x2a + mov r3, #4 + bl sub_0200B144 + add r6, r0, #0 + bl ov23_022421DC + ldr r1, _02252B84 ; =0x00000272 + mov r2, #0 + bl ov23_02253DFC + b _02252ABC +_02252AA0: + mov r0, #0 + mov r1, #0x1a + add r2, #0x2c + mov r3, #4 + bl sub_0200B144 + add r6, r0, #0 + bl ov23_022421DC + mov r1, #0x9d + lsl r1, r1, #2 + mov r2, #0 + bl ov23_02253DFC +_02252ABC: + mov r7, #0x21 + mov r4, #0 + lsl r7, r7, #4 +_02252AC2: + add r2, r5, r4 + ldrb r2, [r2, r7] + ldr r0, [r5, #0x40] + add r1, r6, #0 + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, #5 + blt _02252AC2 + mov r2, #0 + ldr r0, [r5, #0x40] + add r1, r6, #0 + sub r3, r2, #2 + bl sub_02013A4C + add r0, r6, #0 + bl sub_0200B190 + bl ov23_02253D40 + add r1, sp, #0x14 + mov r2, #0x20 + bl sub_020C4DB0 + ldr r0, [r5, #0x40] + mov r1, #6 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0x10 + str r0, [sp, #0x20] + add r0, sp, #0x14 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + ldr r0, _02252B88 ; =ov23_0225265C + ldr r1, _02252B8C ; =ov23_02252A04 + str r0, [sp, #0x18] + mov r0, #0x81 + str r5, [sp, #0x30] + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, #0x44 + ldrb r0, [r5, r0] + add r0, #0xd + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r5, r1] + add r1, #0x18 + ldrb r0, [r5, r1] + add r0, #0xd + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + add r1, #0x1e + strh r0, [r5, r1] + add r2, sp, #0x14 + ldrh r1, [r2, #0x12] + ldrh r2, [r2, #0x10] + add r0, r5, #0 + bl ov23_02251238 + mov r2, #0x23 + lsl r2, r2, #4 + ldr r1, [r5, r2] + sub r2, r2, #4 + ldr r2, [r5, r2] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0x14 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0x48] + add r5, #0x10 + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_02252B78: .word 0x0000015F +_02252B7C: .word 0x000003D9 +_02252B80: .word 0x00000276 +_02252B84: .word 0x00000272 +_02252B88: .word ov23_0225265C +_02252B8C: .word ov23_02252A04 + thumb_func_end ov23_02252A18 + + thumb_func_start ov23_02252B90 +ov23_02252B90: ; 0x02252B90 + push {r4, lr} + add r4, r0, #0 + add r0, #0x20 + bl sub_0201A7CC + cmp r0, #0 + beq _02252BB0 + add r0, r4, #0 + add r0, #0x20 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A8FC +_02252BB0: + add r0, r4, #0 + bl ov23_0224FB7C + pop {r4, pc} + thumb_func_end ov23_02252B90 + + thumb_func_start ov23_02252BB8 +ov23_02252BB8: ; 0x02252BB8 + push {r4, lr} + mov r2, #0x92 + add r4, r1, #0 + lsl r2, r2, #2 + ldrb r2, [r4, r2] + cmp r2, #1 + bne _02252BD4 + bl ov23_0224F66C + add r1, r0, #0 + mov r0, #2 + bl ov23_02252CF4 + b _02252BF2 +_02252BD4: + cmp r2, #0 + bne _02252BE6 + bl ov23_0224F61C + add r1, r0, #0 + mov r0, #2 + bl ov23_02252D08 + b _02252BF2 +_02252BE6: + bl ov23_0224F6C8 + add r1, r0, #0 + mov r0, #2 + bl ov23_02252CE0 +_02252BF2: + ldr r1, _02252C04 ; =0x00000215 + mov r0, #4 + ldrb r1, [r4, r1] + bl ov23_02252CE0 + mov r0, #0xa + bl ov23_02252C9C + pop {r4, pc} + ; .align 2, 0 +_02252C04: .word 0x00000215 + thumb_func_end ov23_02252BB8 + + thumb_func_start ov23_02252C08 +ov23_02252C08: ; 0x02252C08 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0203D174 + bl sub_020298B0 + ldr r1, _02252C68 ; =0x00000215 + add r4, r0, #0 + ldrb r0, [r5, r1] + add r1, r1, #5 + ldrb r1, [r5, r1] + bl ov23_0224F6E0 + cmp r0, #0 + beq _02252C62 + mov r1, #0x92 + lsl r1, r1, #2 + ldrb r0, [r5, r1] + cmp r0, #1 + bne _02252C3E + sub r1, r1, #4 + ldrb r1, [r5, r1] + add r0, r4, #0 + bl sub_02028E50 + b _02252C5C +_02252C3E: + cmp r0, #0 + bne _02252C4E + sub r1, r1, #4 + ldrb r1, [r5, r1] + add r0, r4, #0 + bl sub_02028B94 + b _02252C5C +_02252C4E: + cmp r0, #2 + bne _02252C5C + sub r1, r1, #4 + ldrb r1, [r5, r1] + add r0, r4, #0 + bl sub_02028D80 +_02252C5C: + ldr r0, _02252C68 ; =0x00000215 + ldrb r0, [r5, r0] + pop {r3, r4, r5, pc} +_02252C62: + ldr r0, _02252C6C ; =0x0000FFFC + pop {r3, r4, r5, pc} + nop +_02252C68: .word 0x00000215 +_02252C6C: .word 0x0000FFFC + thumb_func_end ov23_02252C08 + + thumb_func_start ov23_02252C70 +ov23_02252C70: ; 0x02252C70 + ldr r0, _02252C74 ; =0x0000FFFE + bx lr + ; .align 2, 0 +_02252C74: .word 0x0000FFFE + thumb_func_end ov23_02252C70 + + thumb_func_start ov23_02252C78 +ov23_02252C78: ; 0x02252C78 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x68] + bl sub_020237BC + ldr r0, [r4, #0x6c] + bl sub_020237BC + ldr r0, [r4, #0x70] + bl sub_0200B3F0 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02252C78 + + thumb_func_start ov23_02252C98 +ov23_02252C98: ; 0x02252C98 + mov r0, #0 + bx lr + thumb_func_end ov23_02252C98 + + thumb_func_start ov23_02252C9C +ov23_02252C9C: ; 0x02252C9C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov23_022421BC + mov r1, #0x9f + lsl r1, r1, #2 + mov r2, #1 + bl ov23_02253DFC + bl ov23_022421BC + add r4, r0, #0 + bl sub_0203608C + bl sub_02032EE8 + add r1, r0, #0 + add r0, r4, #0 + bl ov23_02254068 + bl ov23_022421BC + mov r2, #0 + add r1, r5, #0 + add r3, r2, #0 + bl ov23_02253F40 + pop {r3, r4, r5, pc} + thumb_func_end ov23_02252C9C + + thumb_func_start ov23_02252CD4 +ov23_02252CD4: ; 0x02252CD4 + push {r3, lr} + bl ov23_022421BC + bl ov23_02254044 + pop {r3, pc} + thumb_func_end ov23_02252CD4 + + thumb_func_start ov23_02252CE0 +ov23_02252CE0: ; 0x02252CE0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov23_022421BC + add r1, r5, #0 + add r2, r4, #0 + bl ov23_022541A0 + pop {r3, r4, r5, pc} + thumb_func_end ov23_02252CE0 + + thumb_func_start ov23_02252CF4 +ov23_02252CF4: ; 0x02252CF4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov23_022421BC + add r1, r5, #0 + add r2, r4, #0 + bl ov23_022541B4 + pop {r3, r4, r5, pc} + thumb_func_end ov23_02252CF4 + + thumb_func_start ov23_02252D08 +ov23_02252D08: ; 0x02252D08 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov23_022421BC + add r1, r5, #0 + add r2, r4, #0 + bl ov23_022541C8 + pop {r3, r4, r5, pc} + thumb_func_end ov23_02252D08 + + thumb_func_start ov23_02252D1C +ov23_02252D1C: ; 0x02252D1C + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + add r0, #0x20 + bl sub_0201A7CC + cmp r0, #0 + bne _02252D5A + mov r0, #0xc + str r0, [sp] + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r3, #1 + str r3, [sp, #0x10] + ldr r0, [r4, #0xc] + add r1, r4, #0 + ldr r0, [r0, #8] + add r1, #0x20 + mov r2, #3 + bl sub_0201A7E8 + add r0, r4, #0 + ldr r2, _02252D70 ; =0x000003D9 + add r0, #0x20 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 +_02252D5A: + add r0, r4, #0 + add r0, #0x20 + mov r1, #0xf + bl sub_0201ADA4 + add r4, #0x20 + add r0, r4, #0 + bl sub_0201A954 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_02252D70: .word 0x000003D9 + thumb_func_end ov23_02252D1C + + thumb_func_start ov23_02252D74 +ov23_02252D74: ; 0x02252D74 + push {r4, r5, lr} + sub sp, #0x14 + mov r3, #1 + add r5, r0, #0 + str r3, [sp] + mov r0, #7 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x33 + str r0, [sp, #0x10] + ldr r0, [r5, #0xc] + add r4, r1, #0 + add r1, r5, #0 + ldr r0, [r0, #8] + add r1, #0x30 + mov r2, #3 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02252DF0 ; =0x000003D9 + add r0, #0x30 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + add r0, #0x30 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x30 + bl sub_0201A954 + bl ov23_022421BC + bl ov23_02253E3C + ldr r2, [r5, #0x68] + add r1, r4, #0 + bl sub_0200B1B8 + mov r3, #1 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r0, r5, #0 + ldr r2, [r5, #0x68] + add r0, #0x30 + bl sub_0201D738 + add r5, #0x30 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_02252DF0: .word 0x000003D9 + thumb_func_end ov23_02252D74 + + thumb_func_start ov23_02252DF4 +ov23_02252DF4: ; 0x02252DF4 + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl sub_0201A7CC + cmp r0, #0 + beq _02252E14 + add r0, r4, #0 + add r0, #0x30 + mov r1, #1 + bl sub_0200DC9C + add r4, #0x30 + add r0, r4, #0 + bl sub_0201A8FC +_02252E14: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02252DF4 + + thumb_func_start ov23_02252E18 +ov23_02252E18: ; 0x02252E18 + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl sub_0201A7CC + cmp r0, #0 + beq _02252E38 + add r0, r4, #0 + add r0, #0x30 + mov r1, #0 + bl sub_0200DC9C + add r4, #0x30 + add r0, r4, #0 + bl sub_0201A8FC +_02252E38: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02252E18 + + thumb_func_start ov23_02252E3C +ov23_02252E3C: ; 0x02252E3C + push {r3, r4, r5, lr} + ldr r5, _02252E6C ; =0x02257674 + mov r3, #0 +_02252E42: + ldrh r4, [r5, #2] + cmp r0, r4 + bne _02252E5C + ldrh r4, [r5, #4] + cmp r1, r4 + bne _02252E5C + mov r0, #6 + add r1, r3, #0 + mul r1, r0 + ldr r0, _02252E6C ; =0x02257674 + str r3, [r2, #0] + ldrh r0, [r0, r1] + pop {r3, r4, r5, pc} +_02252E5C: + add r3, r3, #1 + add r5, r5, #6 + cmp r3, #0x14 + blt _02252E42 + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02252E6C: .word 0x02257674 + thumb_func_end ov23_02252E3C + + thumb_func_start ov23_02252E70 +ov23_02252E70: ; 0x02252E70 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _022531A8 ; =0x00000246 + add r4, r1, #0 + ldrb r1, [r4, r0] + cmp r1, #0x12 + bhi _02252F40 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02252E8C: ; jump table + .short _02252EB2 - _02252E8C - 2 ; case 0 + .short _02252ED2 - _02252E8C - 2 ; case 1 + .short _02252EE8 - _02252E8C - 2 ; case 2 + .short _02252EF8 - _02252E8C - 2 ; case 3 + .short _02252F9C - _02252E8C - 2 ; case 4 + .short _02252FB2 - _02252E8C - 2 ; case 5 + .short _0225307E - _02252E8C - 2 ; case 6 + .short _0225309E - _02252E8C - 2 ; case 7 + .short _02253104 - _02252E8C - 2 ; case 8 + .short _02253200 - _02252E8C - 2 ; case 9 + .short _02253252 - _02252E8C - 2 ; case 10 + .short _022531F0 - _02252E8C - 2 ; case 11 + .short _02253278 - _02252E8C - 2 ; case 12 + .short _022532F0 - _02252E8C - 2 ; case 13 + .short _02253384 - _02252E8C - 2 ; case 14 + .short _022533AE - _02252E8C - 2 ; case 15 + .short _022533F8 - _02252E8C - 2 ; case 16 + .short _0225343A - _02252E8C - 2 ; case 17 + .short _0225344A - _02252E8C - 2 ; case 18 +_02252EB2: + add r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #2 + bne _02252EC2 + mov r0, #0x1b + bl ov23_02252C9C + b _02252EC8 +_02252EC2: + mov r0, #0 + bl ov23_02252C9C +_02252EC8: + ldr r0, _022531A8 ; =0x00000246 + mov r1, #1 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252ED2: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02252F40 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #2 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252EE8: + add r0, r4, #0 + bl ov23_022524B8 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #3 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252EF8: + ldr r0, [r4, #0x48] + bl sub_02001288 + add r5, r0, #0 + add r1, sp, #4 + ldr r0, [r4, #0x48] + add r1, #2 + add r2, sp, #4 + bl sub_020014DC + add r2, sp, #4 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #0x13 + bl ov23_022430E0 + ldr r1, _022531AC ; =0x0000024A + ldr r0, [r4, #0x48] + ldrh r6, [r4, r1] + add r1, r4, r1 + bl sub_020014D0 + ldr r0, _022531AC ; =0x0000024A + ldrh r0, [r4, r0] + cmp r6, r0 + beq _02252F32 + ldr r0, _022531B0 ; =0x000005DC + bl sub_02005748 +_02252F32: + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _02252F44 + add r0, r0, #1 + cmp r5, r0 + bne _02252F42 +_02252F40: + b _02253478 +_02252F42: + b _02252F5C +_02252F44: + ldr r0, _022531B0 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #0 + bl ov23_02252B90 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #0x11 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252F5C: + mov r1, #0x92 + lsl r1, r1, #2 + ldrb r0, [r4, r1] + cmp r0, #2 + bne _02252F76 + mov r2, #1 + sub r0, r1, #1 + strb r2, [r4, r0] + mov r2, #0xc + sub r0, r1, #2 + add sp, #8 + strb r2, [r4, r0] + pop {r4, r5, r6, pc} +_02252F76: + sub r0, r1, #1 + strb r5, [r4, r0] + cmp r5, #0 + ldr r0, _022531B0 ; =0x000005DC + bne _02252F8E + bl sub_02005748 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #4 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252F8E: + bl sub_02005748 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #0xc + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252F9C: + add r0, r4, #0 + bl ov23_02252D1C + add r0, r4, #0 + bl ov23_02252A18 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #5 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02252FB2: + ldr r0, [r4, #0x48] + bl sub_02001288 + add r5, r0, #0 + add r1, sp, #4 + ldr r0, [r4, #0x48] + add r1, #2 + add r2, sp, #4 + bl sub_020014DC + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + add r2, sp, #4 + ldrh r1, [r2] + add r0, #0xd + lsl r0, r0, #0x10 + ldrh r2, [r2, #2] + lsr r0, r0, #0x10 + bl ov23_022430E0 + ldr r1, _022531AC ; =0x0000024A + ldr r0, [r4, #0x48] + ldrh r6, [r4, r1] + add r1, r4, r1 + bl sub_020014D0 + ldr r0, _022531AC ; =0x0000024A + ldrh r0, [r4, r0] + cmp r6, r0 + beq _02252FF6 + ldr r0, _022531B0 ; =0x000005DC + bl sub_02005748 +_02252FF6: + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _02253000 + add r5, r0, #0 +_02253000: + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + beq _02253010 + bl ov23_022421DC + bl ov23_02254044 +_02253010: + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _02253020 + add r0, r0, #1 + cmp r5, r0 + beq _02253110 + b _02253038 +_02253020: + ldr r0, _022531B0 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + mov r1, #1 + bl ov23_02252B90 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #2 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253038: + ldr r0, _022531B0 ; =0x000005DC + bl sub_02005748 + mov r1, #0x91 + lsl r1, r1, #2 + strb r5, [r4, r1] + add r0, r1, #4 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0225305C + ldrb r2, [r4, r1] + sub r1, #0x34 + mov r0, #2 + add r2, r4, r2 + ldrb r1, [r2, r1] + bl ov23_02252CF4 + b _0225306E +_0225305C: + cmp r0, #0 + bne _0225306E + ldrb r2, [r4, r1] + sub r1, #0x34 + mov r0, #2 + add r2, r4, r2 + ldrb r1, [r2, r1] + bl ov23_02252D08 +_0225306E: + mov r0, #1 + bl ov23_02252C9C + ldr r0, _022531A8 ; =0x00000246 + mov r1, #6 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_0225307E: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02253110 + ldr r0, _022531B4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _02253110 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #7 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_0225309E: + add r0, r4, #0 + bl ov23_0224FB7C + mov r0, #0xc + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xc + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + bl ov23_02250184 + add r0, r4, #0 + mov r1, #0x13 + bl ov23_02252D74 + mov r2, #0x92 + lsl r2, r2, #2 + ldrb r0, [r4, r2] + cmp r0, #1 + bne _022530E6 + sub r1, r2, #4 + ldrb r1, [r4, r1] + sub r2, #0x38 + mov r0, #2 + add r1, r4, r1 + ldrb r1, [r1, r2] + bl ov23_02252CF4 + b _022530FA +_022530E6: + cmp r0, #0 + bne _022530FA + sub r1, r2, #4 + ldrb r1, [r4, r1] + sub r2, #0x38 + mov r0, #2 + add r1, r4, r1 + ldrb r1, [r1, r2] + bl ov23_02252D08 +_022530FA: + ldr r0, _022531A8 ; =0x00000246 + mov r1, #8 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253104: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + beq _02253112 +_02253110: + b _02253478 +_02253112: + ldr r0, [r4, #0x4c] + bl ov23_02248D20 + add r5, r0, #0 + ldr r0, [r4, #0x4c] + add r1, sp, #4 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #4 + bl sub_020014DC + add r2, sp, #4 + ldrh r1, [r2] + ldrh r2, [r2, #2] + mov r0, #0xc + bl ov23_022430E0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + beq _02253144 + bl ov23_022421DC + bl ov23_02254044 +_02253144: + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _02253154 + add r0, r0, #1 + cmp r5, r0 + beq _02253216 + b _02253164 +_02253154: + add r0, r4, #0 + bl ov23_02252DF4 + ldr r0, _022531A8 ; =0x00000246 + mov r1, #4 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253164: + mov r1, #0x91 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + add r0, r4, #0 + add r2, r5, #0 + bl ov23_02252404 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov23_02252B90 + add r0, r4, #0 + bl ov23_02252DF4 + ldr r1, _022531B8 ; =0x0000FFFC + cmp r5, r1 + bne _02253198 + mov r0, #3 + bl ov23_02252C9C + ldr r0, _022531A8 ; =0x00000246 + mov r1, #0xa + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253198: + add r0, r1, #1 + cmp r5, r0 + bne _022531C4 + mov r0, #4 + bl ov23_02252C9C + ldr r0, _022531A8 ; =0x00000246 + b _022531BC + ; .align 2, 0 +_022531A8: .word 0x00000246 +_022531AC: .word 0x0000024A +_022531B0: .word 0x000005DC +_022531B4: .word 0x021BF67C +_022531B8: .word 0x0000FFFC +_022531BC: + mov r1, #0xa + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_022531C4: + sub r0, r1, #1 + cmp r5, r0 + bne _022531DA + mov r0, #5 + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xa + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_022531DA: + mov r0, #0x91 + lsl r0, r0, #2 + strb r5, [r4, r0] + mov r0, #2 + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #9 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_022531F0: + mov r0, #3 + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xa + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253200: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02253216 + ldr r0, _02253480 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _02253218 +_02253216: + b _02253478 +_02253218: + mov r1, #0x92 + lsl r1, r1, #2 + ldrb r0, [r4, r1] + cmp r0, #1 + bne _0225322E + sub r1, r1, #4 + ldrb r1, [r4, r1] + mov r0, #2 + bl ov23_02252CF4 + b _0225323C +_0225322E: + cmp r0, #0 + bne _0225323C + sub r1, r1, #4 + ldrb r1, [r4, r1] + mov r0, #2 + bl ov23_02252D08 +_0225323C: + mov r0, #6 + bl ov23_02252C9C + ldr r0, _02253484 ; =0x000005E3 + bl sub_02005748 + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xa + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253252: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02253354 + ldr r0, _02253480 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _02253354 + mov r0, #8 + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #2 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253278: + add r0, r4, #0 + bl ov23_02252D1C + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + add r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov23_0224318C + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + add r1, #0x1c + ldrb r0, [r4, r1] + add r0, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov23_02243154 + mov r1, #0x23 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, _02253488 ; =ov23_02252754 + add r1, #0x18 + str r0, [r4, #0x60] + ldrb r0, [r4, r1] + cmp r0, #1 + bne _022532C4 + add r0, r4, #0 + bl ov23_0224FDBC + add r0, r4, #0 + mov r1, #0x14 + bl ov23_02252D74 + b _022532E6 +_022532C4: + cmp r0, #0 + bne _022532D8 + add r0, r4, #0 + bl ov23_02250CB0 + add r0, r4, #0 + mov r1, #0x15 + bl ov23_02252D74 + b _022532E6 +_022532D8: + add r0, r4, #0 + bl ov23_02250578 + add r0, r4, #0 + mov r1, #0x1d + bl ov23_02252D74 +_022532E6: + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xd + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_022532F0: + ldr r0, [r4, #0x4c] + bl ov23_02248D20 + add r5, r0, #0 + ldr r0, [r4, #0x4c] + add r1, sp, #4 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #4 + bl sub_020014DC + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + add r2, sp, #4 + ldrh r1, [r2] + add r0, #0x10 + lsl r0, r0, #0x10 + ldrh r2, [r2, #2] + lsr r0, r0, #0x10 + bl ov23_022430E0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _0225332C + add r0, r0, #1 + cmp r5, r0 + beq _02253354 + b _0225334C +_0225332C: + bl ov23_022421DC + bl ov23_02254044 + add r0, r4, #0 + mov r1, #1 + bl ov23_02252B90 + add r0, r4, #0 + bl ov23_02252DF4 + ldr r0, _0225347C ; =0x00000246 + mov r1, #2 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_0225334C: + ldr r0, _0225348C ; =0x00000215 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _02253356 +_02253354: + b _02253478 +_02253356: + bl ov23_022421DC + bl ov23_02254044 + mov r0, #0x91 + lsl r0, r0, #2 + strb r5, [r4, r0] + add r0, r4, #0 + mov r1, #1 + bl ov23_02252B90 + add r0, r4, #0 + bl ov23_02252DF4 + add r0, r5, #0 + add r1, r4, #0 + bl ov23_02252BB8 + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xe + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_02253384: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02253478 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0xc] + ldr r1, _02253490 ; =0x022569D8 + ldr r0, [r0, #8] + ldr r2, _02253494 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x5c] + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xf + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_022533AE: + ldr r0, [r4, #0x5c] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02253478 + cmp r0, #0 + bne _022533EA + add r0, r4, #0 + bl ov23_02252C08 + ldr r1, _02253498 ; =0x0000FFFC + cmp r0, r1 + bne _022533DC + mov r0, #3 + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xa + strb r1, [r4, r0] + b _022533F0 +_022533DC: + mov r0, #0xb + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #0x10 + strb r1, [r4, r0] + b _022533F0 +_022533EA: + ldr r0, _0225347C ; =0x00000246 + mov r1, #0x11 + strb r1, [r4, r0] +_022533F0: + mov r0, #0 + add sp, #8 + str r0, [r4, #0x5c] + pop {r4, r5, r6, pc} +_022533F8: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02253478 + ldr r0, _02253480 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _02253478 + bl ov23_022421BC + ldr r1, _0225349C ; =0x0000021A + ldrb r1, [r4, r1] + bl ov23_0225412C + ldr r1, _0225348C ; =0x00000215 + mov r0, #2 + ldrb r1, [r4, r1] + bl ov23_02252CE0 + mov r0, #7 + bl ov23_02252C9C + ldr r0, _02253484 ; =0x000005E3 + bl sub_02005748 + ldr r0, _0225347C ; =0x00000246 + mov r1, #0xa + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_0225343A: + mov r0, #9 + bl ov23_02252C9C + ldr r0, _0225347C ; =0x00000246 + mov r1, #0x12 + add sp, #8 + strb r1, [r4, r0] + pop {r4, r5, r6, pc} +_0225344A: + bl ov23_022421BC + bl ov23_02254238 + cmp r0, #0 + bne _02253478 + ldr r0, _02253480 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _02253478 + bl ov23_02252CD4 + add r0, r4, #0 + bl ov23_02252C78 + bl ov23_02243204 + add r0, r5, #0 + bl sub_0200DA58 + bl sub_02059514 +_02253478: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225347C: .word 0x00000246 +_02253480: .word 0x021BF67C +_02253484: .word 0x000005E3 +_02253488: .word ov23_02252754 +_0225348C: .word 0x00000215 +_02253490: .word 0x022569D8 +_02253494: .word 0x000003D9 +_02253498: .word 0x0000FFFC +_0225349C: .word 0x0000021A + thumb_func_end ov23_02252E70 + + thumb_func_start ov23_022534A0 +ov23_022534A0: ; 0x022534A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r0, #0 + bl sub_0203608C + bl sub_02058D88 + str r0, [sp, #8] + bl sub_0203608C + bl sub_02058DC0 + str r0, [sp, #4] + bl sub_0203608C + bl sub_02058F50 + bl sub_02059328 + str r0, [sp] + ldr r0, [sp, #8] + ldr r1, [sp, #4] + add r2, sp, #0xc + bl ov23_02252E3C + add r5, r0, #0 + add r0, r5, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov23_022430D0 + mov r1, #0x25 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x25 + mov r1, #0 + lsl r2, r2, #4 + add r6, r0, #0 + bl sub_020C4CF4 + mov r0, #0x92 + str r4, [r6, #0xc] + lsl r0, r0, #2 + strb r5, [r6, r0] + ldr r1, [sp, #0xc] + sub r0, #0x24 + str r1, [r6, r0] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r6, #0x68] + mov r0, #0x64 + mov r1, #4 + bl sub_02023790 + str r0, [r6, #0x6c] + mov r0, #4 + bl sub_0200B358 + str r0, [r6, #0x70] + ldr r0, _02253584 ; =0x00000246 + mov r1, #0 + strb r1, [r6, r0] + ldr r0, _02253588 ; =0x000005DC + bl sub_02005748 + ldr r0, _0225358C ; =ov23_02252E70 + ldr r2, _02253590 ; =0x00002710 + add r1, r6, #0 + bl sub_0200D9E8 + str r0, [r6, #4] + ldr r1, [r6, #4] + ldr r2, _02253594 ; =ov23_02251270 + add r0, r6, #0 + bl ov23_022431EC + ldr r0, [r6, #0xc] + bl sub_0203A4B4 + add r7, r0, #0 + ldr r0, [r6, #0xc] + bl sub_0203A4BC + add r5, r0, #0 + mov r4, #0 + cmp r7, #0 + ble _0225357E +_02253556: + ldrh r1, [r5, #0x18] + ldr r0, [sp, #8] + cmp r0, r1 + bne _02253576 + ldrh r1, [r5, #0x1a] + ldr r0, [sp, #4] + cmp r0, r1 + bne _02253576 + ldr r0, [r6, #0xc] + add r1, r4, #0 + ldr r0, [r0, #0x38] + bl sub_0206251C + ldr r1, [sp] + bl sub_02062974 +_02253576: + add r4, r4, #1 + add r5, #0x20 + cmp r4, r7 + blt _02253556 +_0225357E: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02253584: .word 0x00000246 +_02253588: .word 0x000005DC +_0225358C: .word ov23_02252E70 +_02253590: .word 0x00002710 +_02253594: .word ov23_02251270 + thumb_func_end ov23_022534A0 + + .rodata + + + .global Unk_ov23_022569D0 +Unk_ov23_022569D0: ; 0x022569D0 + .incbin "incbin/overlay23_rodata.bin", 0x6C4, 0x6C8 - 0x6C4 + + .global Unk_ov23_022569D4 +Unk_ov23_022569D4: ; 0x022569D4 + .incbin "incbin/overlay23_rodata.bin", 0x6C8, 0x6CC - 0x6C8 + + .global Unk_ov23_022569D8 +Unk_ov23_022569D8: ; 0x022569D8 + .incbin "incbin/overlay23_rodata.bin", 0x6CC, 0x8 + + + .data + + + .global Unk_ov23_02257674 +Unk_ov23_02257674: ; 0x02257674 + .incbin "incbin/overlay23_data.bin", 0xA94, 0x78 + diff --git a/asm/ov23_02253598.s b/asm/ov23_02253598.s new file mode 100644 index 000000000..5d5fda9c8 --- /dev/null +++ b/asm/ov23_02253598.s @@ -0,0 +1,953 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02253598 +ov23_02253598: ; 0x02253598 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + mov r1, #0 + mov r2, #0x30 + add r5, r0, #0 + bl sub_020C4CF4 + ldr r0, _022535C8 ; =0x022577BC + str r5, [r0, #0] + str r6, [r5, #8] + ldr r0, [r0, #0] + str r4, [r0, #0xc] + mov r0, #0xf + bl sub_0202855C + ldr r1, _022535C8 ; =0x022577BC + ldr r2, [r1, #0] + str r0, [r2, #0x10] + ldr r0, [r1, #0] + add r0, #0x14 + bl sub_020361BC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022535C8: .word 0x022577BC + thumb_func_end ov23_02253598 + + thumb_func_start ov23_022535CC +ov23_022535CC: ; 0x022535CC + push {r3, lr} + ldr r0, _022535E8 ; =0x022577BC + ldr r0, [r0, #0] + ldr r0, [r0, #0x10] + bl sub_020181C4 + ldr r0, _022535E8 ; =0x022577BC + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, _022535E8 ; =0x022577BC + mov r1, #0 + str r1, [r0, #0] + pop {r3, pc} + ; .align 2, 0 +_022535E8: .word 0x022577BC + thumb_func_end ov23_022535CC + + thumb_func_start ov23_022535EC +ov23_022535EC: ; 0x022535EC + push {r3, lr} + ldr r0, _02253600 ; =0x022577BC + ldr r1, [r0, #0] + ldr r0, [r1, #4] + cmp r0, #0 + beq _022535FE + ldr r1, [r1, #0] + bl ov23_022537D4 +_022535FE: + pop {r3, pc} + ; .align 2, 0 +_02253600: .word 0x022577BC + thumb_func_end ov23_022535EC + + thumb_func_start ov23_02253604 +ov23_02253604: ; 0x02253604 + bx lr + ; .align 2, 0 + thumb_func_end ov23_02253604 + + thumb_func_start ov23_02253608 +ov23_02253608: ; 0x02253608 + mov r0, #0x30 + bx lr + thumb_func_end ov23_02253608 + + thumb_func_start ov23_0225360C +ov23_0225360C: ; 0x0225360C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r7, r0, #0 + mov r0, #4 + str r1, [sp, #0xc] + add r5, r2, #0 + str r3, [sp, #0x10] + bl sub_0200B358 + str r0, [sp, #0x1c] + mov r0, #0x1e + mov r1, #4 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x1e + mov r1, #4 + bl sub_02023790 + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + mov r1, #0 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #1 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r7, #0 + add r2, r4, #0 + mov r3, #2 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0xc] + mov r1, #1 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0x11 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r7, #0 + add r2, r4, #0 + mov r3, #2 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0xc] + mov r1, #2 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #1 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r7, #0 + add r2, r4, #0 + mov r3, #0x84 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r5, #0 + bl sub_02025F24 + add r2, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + mov r1, #6 + mov r3, #5 + bl sub_0200B60C + ldr r0, [sp, #0xc] + mov r1, #5 + add r2, r4, #0 + bl sub_0200B1B8 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + add r2, r4, #0 + bl sub_0200C388 + mov r0, #1 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r2, [sp, #0x18] + add r0, r7, #0 + mov r3, #0x94 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x1c] + mov r1, #0 + add r2, r5, #0 + bl sub_0200B498 + ldr r0, [sp, #0xc] + mov r1, #4 + add r2, r4, #0 + bl sub_0200B1B8 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + add r2, r4, #0 + bl sub_0200C388 + mov r0, #1 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r2, [sp, #0x18] + add r0, r7, #0 + mov r3, #0x39 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x10] + bl sub_0202958C + add r1, r0, #0 + ldr r0, [sp, #0xc] + add r1, #0x14 + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0x11 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r7, #0 + add r2, r4, #0 + mov r3, #0x39 + str r1, [sp, #8] + bl sub_0201D738 + mov r5, #0 + mov r6, #0x27 +_02253738: + ldr r0, [sp, #0xc] + add r1, r5, #6 + add r2, r4, #0 + bl sub_0200B1B8 + str r6, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r7, #0 + mov r1, #0 + add r2, r4, #0 + mov r3, #2 + bl sub_0201D738 + add r5, r5, #1 + add r6, #0x10 + cmp r5, #7 + blt _02253738 + mov r0, #0 + ldr r6, _022537D0 ; =0x022576EC + str r0, [sp, #0x14] + mov r5, #0x27 +_02253768: + ldr r0, [sp, #0x10] + ldr r1, [r6, #0] + blx r1 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r1, #6 + ldr r0, [sp, #0x1c] + add r3, r1, #0 + bl sub_0200B60C + ldr r0, [sp, #0xc] + mov r1, #0xd + add r2, r4, #0 + bl sub_0200B1B8 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + add r2, r4, #0 + bl sub_0200C388 + str r5, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r2, [sp, #0x18] + add r0, r7, #0 + mov r1, #0 + mov r3, #0x94 + bl sub_0201D738 + ldr r0, [sp, #0x14] + add r6, r6, #4 + add r0, r0, #1 + add r5, #0x10 + str r0, [sp, #0x14] + cmp r0, #7 + blt _02253768 + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_0200B3F0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_022537D0: .word 0x022576EC + thumb_func_end ov23_0225360C + + thumb_func_start ov23_022537D4 +ov23_022537D4: ; 0x022537D4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #8 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #8 + bl sub_0201A8FC + ldr r1, [r4, #0] + cmp r1, #0 + beq _022537FE + ldr r0, [r4, #4] + blx r1 +_022537FE: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, _02253818 ; =0x022577BC + mov r2, #0 + ldr r1, [r0, #0] + str r2, [r1, #4] + ldr r0, [r0, #0] + str r2, [r0, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02253818: .word 0x022577BC + thumb_func_end ov23_022537D4 + + thumb_func_start ov23_0225381C +ov23_0225381C: ; 0x0225381C + push {r3, lr} + ldr r2, _02253830 ; =0x021BF67C + ldr r3, [r2, #0x48] + mov r2, #3 + tst r2, r3 + beq _0225382C + bl ov23_022537D4 +_0225382C: + pop {r3, pc} + nop +_02253830: .word 0x021BF67C + thumb_func_end ov23_0225381C + + thumb_func_start ov23_02253834 +ov23_02253834: ; 0x02253834 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + str r1, [sp, #0x14] + mov r0, #4 + mov r1, #0x2c + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x2c + bl sub_020C4CF4 + str r5, [r4, #0] + add r1, r4, #0 + str r6, [r4, #4] + mov r0, #2 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x13 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + add r0, r7, #0 + add r1, #8 + mov r2, #3 + mov r3, #4 + bl sub_0201A7E8 + add r0, r4, #0 + ldr r2, _022538EC ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r2, #0xa + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #6 + mov r3, #4 + bl sub_0200B144 + add r5, r0, #0 + add r0, r4, #0 + add r0, #8 + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [sp, #0x30] + cmp r0, #0 + beq _022538AE + ldr r0, _022538F0 ; =0x022577BC + ldr r0, [r0, #0] + ldr r3, [r0, #0xc] + b _022538B4 +_022538AE: + ldr r0, _022538F0 ; =0x022577BC + ldr r0, [r0, #0] + ldr r3, [r0, #0x10] +_022538B4: + add r0, r4, #0 + ldr r2, [sp, #0x14] + add r0, #8 + add r1, r5, #0 + bl ov23_0225360C + add r0, r4, #0 + add r0, #8 + bl sub_0201A9A4 + ldr r0, _022538F4 ; =0x000005FD + bl sub_02005748 + ldr r0, _022538F8 ; =ov23_0225381C + add r1, r4, #0 + mov r2, #0xa + bl sub_0200D9E8 + ldr r1, _022538F0 ; =0x022577BC + ldr r2, [r1, #0] + str r0, [r2, #4] + ldr r0, [r1, #0] + str r4, [r0, #0] + add r0, r5, #0 + bl sub_0200B190 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022538EC: .word 0x000003D9 +_022538F0: .word 0x022577BC +_022538F4: .word 0x000005FD +_022538F8: .word ov23_0225381C + thumb_func_end ov23_02253834 + + thumb_func_start ov23_022538FC +ov23_022538FC: ; 0x022538FC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_02028558 + add r4, r0, #0 + ldr r0, _02253960 ; =0x022577BC + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_0202CD88 + bl sub_0202D034 + add r6, r0, #0 + mov r0, #4 + add r1, r4, #1 + bl sub_02018144 + mov r1, #0 + add r2, r4, #1 + add r5, r0, #0 + bl sub_020C4CF4 + ldr r0, _02253964 ; =0x000F423F + strb r7, [r5] + cmp r6, r0 + blt _02253932 + add r6, r0, #0 +_02253932: + ldr r0, _02253960 ; =0x022577BC + add r1, r6, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020294D4 + ldr r0, _02253960 ; =0x022577BC + add r1, r5, #1 + ldr r0, [r0, #0] + add r2, r4, #0 + ldr r0, [r0, #0xc] + bl sub_020C4DB0 + mov r0, #0x51 + add r1, r5, #0 + add r2, r4, #1 + bl sub_020359DC + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_02253960: .word 0x022577BC +_02253964: .word 0x000F423F + thumb_func_end ov23_022538FC + + thumb_func_start ov23_02253968 +ov23_02253968: ; 0x02253968 + push {r3, lr} + ldr r0, _02253990 ; =0x022577BC + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_0202CD88 + bl sub_0202D034 + add r1, r0, #0 + ldr r0, _02253994 ; =0x000F423F + cmp r1, r0 + blt _02253982 + add r1, r0, #0 +_02253982: + ldr r0, _02253990 ; =0x022577BC + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020294D4 + pop {r3, pc} + nop +_02253990: .word 0x022577BC +_02253994: .word 0x000F423F + thumb_func_end ov23_02253968 + + thumb_func_start ov23_02253998 +ov23_02253998: ; 0x02253998 + add r3, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, _022539A4 ; =sub_02035AC4 + mov r0, #0x52 + bx r3 + ; .align 2, 0 +_022539A4: .word sub_02035AC4 + thumb_func_end ov23_02253998 + + thumb_func_start ov23_022539A8 +ov23_022539A8: ; 0x022539A8 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + bl sub_0203608C + ldrb r1, [r4] + cmp r1, r0 + bne _022539D0 + ldr r1, _022539D4 ; =0x022577BC + add r0, r4, #1 + ldr r1, [r1, #0] + sub r2, r5, #1 + ldr r1, [r1, #0x10] + bl sub_020C4DB0 + ldr r0, _022539D4 ; =0x022577BC + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x2c + strb r1, [r0] +_022539D0: + pop {r3, r4, r5, pc} + nop +_022539D4: .word 0x022577BC + thumb_func_end ov23_022539A8 + + thumb_func_start ov23_022539D8 +ov23_022539D8: ; 0x022539D8 + ldr r0, _022539E4 ; =0x022577BC + ldr r0, [r0, #0] + add r0, #0x2c + ldrb r0, [r0] + bx lr + nop +_022539E4: .word 0x022577BC + thumb_func_end ov23_022539D8 + + thumb_func_start ov23_022539E8 +ov23_022539E8: ; 0x022539E8 + ldr r0, _022539F4 ; =0x022577BC + mov r1, #0 + ldr r0, [r0, #0] + add r0, #0x2c + strb r1, [r0] + bx lr + ; .align 2, 0 +_022539F4: .word 0x022577BC + thumb_func_end ov23_022539E8 + + thumb_func_start ov23_022539F8 +ov23_022539F8: ; 0x022539F8 + ldr r3, _022539FC ; =sub_02059514 + bx r3 + ; .align 2, 0 +_022539FC: .word sub_02059514 + thumb_func_end ov23_022539F8 + + thumb_func_start ov23_02253A00 +ov23_02253A00: ; 0x02253A00 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + sub r0, #0x20 + lsl r1, r0, #2 + ldr r0, _02253A70 ; =0x022576EC + cmp r5, #0x20 + ldr r4, [r0, r1] + bge _02253A18 + bl sub_02022974 +_02253A18: + cmp r5, #0x2d + ble _02253A20 + bl sub_02022974 +_02253A20: + bl sub_020594FC + bl ov23_022421BC + mov r1, #0xa + lsl r1, r1, #6 + mov r2, #1 + bl ov23_02253DFC + mov r0, #4 + bl sub_0202855C + add r6, r0, #0 + bl sub_02028558 + add r2, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl sub_020C4DB0 + add r0, r6, #0 + blx r4 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020181C4 + bl ov23_022421BC + add r1, r4, #0 + bl ov23_02254178 + bl ov23_022421BC + ldr r3, _02253A74 ; =ov23_022539F8 + add r1, r5, #0 + mov r2, #1 + bl ov23_02253F40 + pop {r3, r4, r5, r6, r7, pc} + nop +_02253A70: .word 0x022576EC +_02253A74: .word ov23_022539F8 + thumb_func_end ov23_02253A00 + + thumb_func_start ov23_02253A78 +ov23_02253A78: ; 0x02253A78 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #0xc] + ldr r0, [sp, #0x40] + str r1, [sp, #0x10] + str r0, [sp, #0x40] + mov r0, #4 + add r5, r2, #0 + str r3, [sp, #0x14] + bl sub_0200B358 + add r7, r0, #0 + mov r0, #0x28 + mov r1, #4 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x28 + mov r1, #4 + bl sub_02023790 + add r6, r0, #0 + add r0, r7, #0 + mov r1, #1 + add r2, r5, #0 + bl sub_0200B498 + ldr r0, [sp, #0x10] + mov r1, #0xc + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + mov r0, #1 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0xc] + add r2, r6, #0 + mov r3, #2 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x10] + mov r1, #0xd + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0x12 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0xc] + add r2, r4, #0 + mov r3, #2 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x14] + bl sub_020295B8 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r1, #6 + str r0, [sp, #4] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B60C + ldr r0, [sp, #0x10] + mov r1, #0xe + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + mov r0, #0x12 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0xc] + add r2, r6, #0 + mov r3, #0x66 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x10] + mov r1, #0xf + add r2, r4, #0 + bl sub_0200B1B8 + mov r0, #0x34 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0xc] + add r2, r4, #0 + mov r3, #2 + str r1, [sp, #8] + bl sub_0201D738 + mov r5, #0 + str r5, [sp, #0x20] +_02253B5E: + ldr r0, [sp, #0x40] + ldr r2, [sp, #0x20] + mov r1, #4 + bl sub_020288C8 + str r0, [sp, #0x24] + cmp r0, #0 + beq _02253BF8 + ldr r2, [sp, #0x24] + add r0, r7, #0 + mov r1, #0 + bl sub_0200B498 + ldr r0, [sp, #0x10] + mov r1, #0x10 + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + add r0, r5, #0 + str r0, [sp, #0x1c] + add r0, #0x45 + str r0, [sp, #0x1c] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + mov r1, #0 + add r2, r6, #0 + mov r3, #2 + bl sub_0201D738 + ldr r0, [sp, #0x24] + bl sub_02025F24 + add r2, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #1 + mov r1, #5 + str r0, [sp, #4] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B60C + ldr r0, [sp, #0x10] + mov r1, #0x11 + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x1c] + mov r1, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r2, r6, #0 + mov r3, #0x66 + bl sub_0201D738 + ldr r0, [sp, #0x24] + bl sub_020181C4 + b _02253C42 +_02253BF8: + ldr r0, [sp, #0x10] + mov r1, #0x33 + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r5, #0 + str r0, [sp, #0x18] + add r0, #0x45 + str r0, [sp, #0x18] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + mov r1, #0 + add r2, r4, #0 + mov r3, #2 + bl sub_0201D738 + ldr r0, [sp, #0x10] + mov r1, #0x34 + add r2, r4, #0 + bl sub_0200B1B8 + ldr r0, [sp, #0x18] + mov r1, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r2, r4, #0 + mov r3, #0x66 + bl sub_0201D738 +_02253C42: + ldr r0, [sp, #0x20] + add r5, #0x11 + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #5 + blt _02253B5E + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_02253A78 + + thumb_func_start ov23_02253C64 +ov23_02253C64: ; 0x02253C64 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + str r1, [sp, #0x14] + mov r0, #4 + mov r1, #0x2c + add r6, r2, #0 + add r4, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x2c + add r5, r0, #0 + bl sub_020C4CF4 + add r1, r5, #0 + ldr r0, [sp, #0x30] + str r4, [r5, #0] + str r0, [r5, #4] + mov r0, #2 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x13 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + add r0, r7, #0 + add r1, #8 + mov r2, #3 + mov r3, #4 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02253D00 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r2, _02253D04 ; =0x0000027F + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r4, r0, #0 + add r0, r5, #0 + add r0, #8 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + ldr r3, _02253D08 ; =0x022577BC + str r6, [sp] + ldr r3, [r3, #0] + ldr r2, [sp, #0x14] + ldr r3, [r3, #0xc] + add r0, #8 + add r1, r4, #0 + bl ov23_02253A78 + ldr r0, _02253D0C ; =0x000005FD + bl sub_02005748 + add r0, r5, #0 + add r0, #8 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_0200B190 + add r0, r5, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02253D00: .word 0x000003D9 +_02253D04: .word 0x0000027F +_02253D08: .word 0x022577BC +_02253D0C: .word 0x000005FD + thumb_func_end ov23_02253C64 + + thumb_func_start ov23_02253D10 +ov23_02253D10: ; 0x02253D10 + push {r4, lr} + add r4, r0, #0 + add r0, #8 + mov r1, #0 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #8 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #8 + bl sub_0201A8FC + ldr r1, [r4, #0] + cmp r1, #0 + beq _02253D36 + ldr r0, [r4, #4] + blx r1 +_02253D36: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02253D10 + .data + + + .global Unk_ov23_022576EC +Unk_ov23_022576EC: ; 0x022576EC + .incbin "incbin/overlay23_data.bin", 0xB0C, 0x38 + + + .bss + + + .global Unk_ov23_022577BC +Unk_ov23_022577BC: ; 0x022577BC + .space 0x4 + diff --git a/asm/ov23_02253D40.s b/asm/ov23_02253D40.s new file mode 100644 index 000000000..1938d7bf8 --- /dev/null +++ b/asm/ov23_02253D40.s @@ -0,0 +1,773 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02253D40 +ov23_02253D40: ; 0x02253D40 + ldr r0, _02253D44 ; =0x022569E0 + bx lr + ; .align 2, 0 +_02253D44: .word 0x022569E0 + thumb_func_end ov23_02253D40 + + thumb_func_start ov23_02253D48 +ov23_02253D48: ; 0x02253D48 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x48 + add r7, r2, #0 + str r3, [sp, #4] + ldr r6, [sp, #0x20] + bl sub_02018144 + mov r1, #0 + mov r2, #0x48 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r0, [sp, #0x20] + cmp r0, #0 + bne _02253D70 + mov r6, #0xe6 +_02253D70: + add r0, r6, #0 + add r1, r5, #0 + bl sub_02023790 + str r0, [r4, #0] + add r0, r6, #0 + add r1, r5, #0 + bl sub_02023790 + str r0, [r4, #4] + add r0, r5, #0 + bl sub_0200B358 + str r0, [r4, #0x28] + ldr r0, [sp] + ldr r2, [sp] + str r0, [r4, #0x2c] + mov r0, #1 + mov r1, #0x1a + add r3, r5, #0 + bl sub_0200B144 + str r0, [r4, #0x24] + str r5, [r4, #0x34] + add r0, r4, #0 + str r7, [r4, #0x18] + add r0, #8 + bl sub_0201A7A0 + ldr r1, [r4, #0x44] + mov r0, #1 + bic r1, r0 + mov r0, #2 + bic r1, r0 + str r1, [r4, #0x44] + mov r0, #0 + str r0, [r4, #0x20] + ldr r0, [sp, #4] + ldr r1, _02253DD4 ; =0x0000032D + str r0, [r4, #0x38] + add r0, r4, #0 + add r0, #0x40 + strh r1, [r0] + add r0, r4, #0 + add r1, #0xb5 + add r0, #0x42 + strh r1, [r0] + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02253DD4: .word 0x0000032D + thumb_func_end ov23_02253D48 + + thumb_func_start ov23_02253DD8 +ov23_02253DD8: ; 0x02253DD8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020237BC + ldr r0, [r4, #4] + bl sub_020237BC + ldr r0, [r4, #0x28] + bl sub_0200B3F0 + ldr r0, [r4, #0x24] + bl sub_0200B190 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov23_02253DD8 + + thumb_func_start ov23_02253DFC +ov23_02253DFC: ; 0x02253DFC + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x2c] + add r4, r1, #0 + add r6, r2, #0 + cmp r0, r4 + beq _02253E28 + str r4, [r5, #0x2c] + ldr r0, [r5, #0x24] + bl sub_0200B190 + ldr r3, [r5, #0x34] + add r0, r6, #0 + mov r1, #0x1a + add r2, r4, #0 + bl sub_0200B144 + str r0, [r5, #0x24] + cmp r0, #0 + bne _02253E28 + bl sub_02022974 +_02253E28: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02253DFC + + thumb_func_start ov23_02253E2C +ov23_02253E2C: ; 0x02253E2C + str r1, [r0, #0x18] + add r1, r0, #0 + add r1, #0x42 + strh r2, [r1] + add r0, #0x40 + strh r3, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov23_02253E2C + + thumb_func_start ov23_02253E3C +ov23_02253E3C: ; 0x02253E3C + ldr r0, [r0, #0x24] + bx lr + thumb_func_end ov23_02253E3C + + thumb_func_start ov23_02253E40 +ov23_02253E40: ; 0x02253E40 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x30] + cmp r0, #8 + bge _02253E56 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02253E66 +_02253E56: + ldr r0, _02253E68 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _02253E66 + add r0, r4, #0 + bl ov23_02254044 +_02253E66: + pop {r4, pc} + ; .align 2, 0 +_02253E68: .word 0x021BF67C + thumb_func_end ov23_02253E40 + + thumb_func_start ov23_02253E6C +ov23_02253E6C: ; 0x02253E6C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x44] + ldr r2, [r4, #0] + lsl r0, r0, #0x1e + asr r0, r0, #0x1f + beq _02253E8C + ldr r0, [r4, #0x28] + ldr r1, [r4, #4] + bl sub_0200C388 + ldr r1, [r4, #0x44] + mov r0, #2 + ldr r2, [r4, #4] + bic r1, r0 + str r1, [r4, #0x44] +_02253E8C: + add r0, r2, #0 + pop {r4, pc} + thumb_func_end ov23_02253E6C + + thumb_func_start ov23_02253E90 +ov23_02253E90: ; 0x02253E90 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov23_02253FA4 + bl ov23_022421EC + add r0, r5, #0 + add r0, #8 + bl sub_0201A7CC + cmp r0, #0 + bne _02253ED8 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xc + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0x40 + ldrh r0, [r0] + add r1, r5, #0 + add r1, #8 + str r0, [sp, #0x10] + ldr r0, [r5, #0x18] + mov r2, #3 + mov r3, #2 + bl sub_0201A7E8 +_02253ED8: + add r0, r5, #0 + add r0, #8 + mov r1, #0xf + bl sub_0201ADA4 + add r2, r5, #0 + add r2, #0x42 + add r0, r5, #0 + ldrh r2, [r2] + add r0, #8 + mov r1, #1 + mov r3, #0xa + bl sub_0200E060 + cmp r4, #0 + beq _02253F04 + ldr r0, _02253F3C ; =ov23_02253E40 + add r1, r5, #0 + mov r2, #0x64 + bl sub_0200D9E8 + str r0, [r5, #0x20] +_02253F04: + ldr r1, [r5, #0x44] + mov r0, #1 + bic r1, r0 + mov r0, #1 + orr r1, r0 + mov r0, #4 + bic r1, r0 + add r0, r5, #0 + str r1, [r5, #0x44] + bl ov23_02253E6C + mov r3, #0 + str r3, [sp] + add r2, r0, #0 + ldr r0, [r5, #0x38] + mov r1, #1 + str r0, [sp, #4] + add r0, r5, #0 + str r3, [sp, #8] + add r0, #8 + bl sub_0201D738 + str r0, [r5, #0x30] + str r6, [r5, #0x1c] + str r7, [r5, #0x3c] + ldr r0, [r5, #0x30] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02253F3C: .word ov23_02253E40 + thumb_func_end ov23_02253E90 + + thumb_func_start ov23_02253F40 +ov23_02253F40: ; 0x02253F40 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + ldr r0, [r5, #0x24] + ldr r2, [r5, #0] + add r6, r3, #0 + bl sub_0200B1B8 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #0 + bl ov23_02253E90 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02253F40 + + thumb_func_start ov23_02253F60 +ov23_02253F60: ; 0x02253F60 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r4, [r5, #0x38] + mov r6, #0 + str r6, [r5, #0x38] + bl ov23_02253F40 + mov r1, #8 + str r1, [r5, #0x30] + str r4, [r5, #0x38] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02253F60 + + thumb_func_start ov23_02253F78 +ov23_02253F78: ; 0x02253F78 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + ldr r0, [r5, #0x24] + ldr r2, [r5, #0] + add r6, r3, #0 + bl sub_0200B1B8 + ldr r3, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov23_02253E90 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02253F78 + + thumb_func_start ov23_02253F98 +ov23_02253F98: ; 0x02253F98 + ldr r2, [r0, #0x44] + mov r1, #4 + orr r1, r2 + str r1, [r0, #0x44] + bx lr + ; .align 2, 0 + thumb_func_end ov23_02253F98 + + thumb_func_start ov23_02253FA4 +ov23_02253FA4: ; 0x02253FA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0x44] + lsl r0, r1, #0x1f + asr r0, r0, #0x1f + beq _02254040 + mov r0, #1 + bic r1, r0 + str r1, [r5, #0x44] + ldr r0, [r5, #0x30] + cmp r0, #8 + bge _02253FD4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _02253FD4 + ldr r0, [r5, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 +_02253FD4: + cmp r4, #0 + beq _02253FE2 + cmp r4, #1 + beq _02253FEE + cmp r4, #2 + beq _0225400A + b _02254024 +_02253FE2: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl sub_0200E084 + b _02254024 +_02253FEE: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl sub_0200E084 + add r0, r5, #0 + add r0, #8 + bl sub_0201ACF4 + add r0, r5, #0 + add r0, #8 + bl sub_0201A8FC + b _02254024 +_0225400A: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl sub_0200E084 + add r0, r5, #0 + add r0, #8 + bl sub_0201AD10 + add r0, r5, #0 + add r0, #8 + bl sub_0201A8FC +_02254024: + mov r0, #8 + str r0, [r5, #0x30] + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _02254036 + bl sub_0200DA58 + mov r0, #0 + str r0, [r5, #0x20] +_02254036: + ldr r1, [r5, #0x1c] + cmp r1, #0 + beq _02254040 + ldr r0, [r5, #0x3c] + blx r1 +_02254040: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_02253FA4 + + thumb_func_start ov23_02254044 +ov23_02254044: ; 0x02254044 + ldr r3, _0225404C ; =ov23_02253FA4 + mov r1, #2 + bx r3 + nop +_0225404C: .word ov23_02253FA4 + thumb_func_end ov23_02254044 + + thumb_func_start ov23_02254050 +ov23_02254050: ; 0x02254050 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #1 + bl sub_0200B498 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_02254050 + + thumb_func_start ov23_02254068 +ov23_02254068: ; 0x02254068 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #0 + bl sub_0200B498 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_02254068 + + thumb_func_start ov23_02254080 +ov23_02254080: ; 0x02254080 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #2 + bl sub_0200BACC + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_02254080 + + thumb_func_start ov23_02254098 +ov23_02254098: ; 0x02254098 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #3 + bl sub_0200BB04 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_02254098 + + thumb_func_start ov23_022540B0 +ov23_022540B0: ; 0x022540B0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #5 + bl sub_0200BC10 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022540B0 + + thumb_func_start ov23_022540C8 +ov23_022540C8: ; 0x022540C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #5 + bl sub_0200BC48 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022540C8 + + thumb_func_start ov23_022540E0 +ov23_022540E0: ; 0x022540E0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200BC48 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022540E0 + + thumb_func_start ov23_022540F4 +ov23_022540F4: ; 0x022540F4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + add r2, r1, #0 + mov r1, #2 + bl sub_0200BC80 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022540F4 + + thumb_func_start ov23_0225410C +ov23_0225410C: ; 0x0225410C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + ldr r0, [r4, #0x28] + bl sub_0200B60C + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + add sp, #8 + pop {r4, pc} + thumb_func_end ov23_0225410C + + thumb_func_start ov23_0225412C +ov23_0225412C: ; 0x0225412C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r2, r1, #0 + ldr r0, [r4, #0x28] + mov r1, #6 + mov r3, #2 + bl sub_0200B60C + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0225412C + + thumb_func_start ov23_02254154 +ov23_02254154: ; 0x02254154 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0x28] + mov r3, #2 + bl sub_0200B60C + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02254154 + + thumb_func_start ov23_02254178 +ov23_02254178: ; 0x02254178 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + add r2, r1, #0 + str r0, [sp, #4] + mov r1, #6 + ldr r0, [r4, #0x28] + add r3, r1, #0 + bl sub_0200B60C + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02254178 + + thumb_func_start ov23_022541A0 +ov23_022541A0: ; 0x022541A0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200BA94 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022541A0 + + thumb_func_start ov23_022541B4 +ov23_022541B4: ; 0x022541B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200BB04 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022541B4 + + thumb_func_start ov23_022541C8 +ov23_022541C8: ; 0x022541C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200BC80 + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022541C8 + + thumb_func_start ov23_022541DC +ov23_022541DC: ; 0x022541DC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200BACC + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022541DC + + thumb_func_start ov23_022541F0 +ov23_022541F0: ; 0x022541F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl sub_0200BB3C + ldr r1, [r4, #0x44] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0x44] + pop {r4, pc} + thumb_func_end ov23_022541F0 + + thumb_func_start ov23_02254204 +ov23_02254204: ; 0x02254204 + ldr r3, _0225420C ; =sub_0200C324 + ldr r0, [r0, #0x28] + bx r3 + nop +_0225420C: .word sub_0200C324 + thumb_func_end ov23_02254204 + + thumb_func_start ov23_02254210 +ov23_02254210: ; 0x02254210 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #8 + bge _02254234 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _02254234 + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 + mov r0, #8 + str r0, [r4, #0x30] +_02254234: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_02254210 + + thumb_func_start ov23_02254238 +ov23_02254238: ; 0x02254238 + push {r3, lr} + ldr r0, [r0, #0x30] + cmp r0, #8 + bne _02254244 + mov r0, #0 + pop {r3, pc} +_02254244: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_02254238 + + thumb_func_start ov23_02254250 +ov23_02254250: ; 0x02254250 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #8 + bge _0225426A + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0225426A + mov r0, #8 + str r0, [r4, #0x30] +_0225426A: + pop {r4, pc} + thumb_func_end ov23_02254250 + + .rodata + + + .global Unk_ov23_022569E0 +Unk_ov23_022569E0: ; 0x022569E0 + .incbin "incbin/overlay23_rodata.bin", 0x6D4, 0x20 + diff --git a/asm/ov23_0225426C.s b/asm/ov23_0225426C.s new file mode 100644 index 000000000..57d5875cd --- /dev/null +++ b/asm/ov23_0225426C.s @@ -0,0 +1,48 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0225426C +ov23_0225426C: ; 0x0225426C + lsl r1, r0, #1 + add r1, r0, r1 + ldr r0, _02254278 ; =0x02256A00 + ldrb r0, [r0, r1] + bx lr + nop +_02254278: .word 0x02256A00 + thumb_func_end ov23_0225426C + + thumb_func_start ov23_0225427C +ov23_0225427C: ; 0x0225427C + lsl r1, r0, #1 + add r1, r0, r1 + ldr r0, _02254288 ; =0x02256A01 + ldrb r0, [r0, r1] + bx lr + nop +_02254288: .word 0x02256A01 + thumb_func_end ov23_0225427C + + thumb_func_start ov23_0225428C +ov23_0225428C: ; 0x0225428C + lsl r1, r0, #1 + add r1, r0, r1 + ldr r0, _02254298 ; =0x02256A02 + ldrb r0, [r0, r1] + bx lr + nop +_02254298: .word 0x02256A02 + thumb_func_end ov23_0225428C + + .rodata + + + .global Unk_ov23_02256A00 +Unk_ov23_02256A00: ; 0x02256A00 + .incbin "incbin/overlay23_rodata.bin", 0x6F4, 0xB4 + diff --git a/asm/ov23_0225429C.s b/asm/ov23_0225429C.s new file mode 100644 index 000000000..e51664cb4 --- /dev/null +++ b/asm/ov23_0225429C.s @@ -0,0 +1,48 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_0225429C +ov23_0225429C: ; 0x0225429C + lsl r1, r0, #1 + add r1, r0, r1 + ldr r0, _022542A8 ; =0x02256AB4 + ldrb r0, [r0, r1] + bx lr + nop +_022542A8: .word 0x02256AB4 + thumb_func_end ov23_0225429C + + thumb_func_start ov23_022542AC +ov23_022542AC: ; 0x022542AC + lsl r1, r0, #1 + add r1, r0, r1 + ldr r0, _022542B8 ; =0x02256AB5 + ldrb r0, [r0, r1] + bx lr + nop +_022542B8: .word 0x02256AB5 + thumb_func_end ov23_022542AC + + thumb_func_start ov23_022542BC +ov23_022542BC: ; 0x022542BC + lsl r1, r0, #1 + add r1, r0, r1 + ldr r0, _022542C8 ; =0x02256AB6 + ldrb r0, [r0, r1] + bx lr + nop +_022542C8: .word 0x02256AB6 + thumb_func_end ov23_022542BC + + .rodata + + + .global Unk_ov23_02256AB4 +Unk_ov23_02256AB4: ; 0x02256AB4 + .incbin "incbin/overlay23_rodata.bin", 0x7A8, 0x66 + diff --git a/asm/ov23_022542CC.s b/asm/ov23_022542CC.s new file mode 100644 index 000000000..7bb2635c1 --- /dev/null +++ b/asm/ov23_022542CC.s @@ -0,0 +1,944 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_022542CC +ov23_022542CC: ; 0x022542CC + ldr r3, _022542D4 ; =sub_02018144 + mov r0, #4 + mov r1, #0x44 + bx r3 + ; .align 2, 0 +_022542D4: .word sub_02018144 + thumb_func_end ov23_022542CC + + thumb_func_start ov23_022542D8 +ov23_022542D8: ; 0x022542D8 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + str r1, [r0, #0] + mov r5, #0 + add r4, #0x38 + strb r5, [r4] + str r2, [r0, #0x30] + str r3, [r0, #0x34] + add r0, #0x40 + strh r5, [r0] + mov r0, #2 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r1, #8] + ldr r2, _02254308 ; =0x000003D9 + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02254308: .word 0x000003D9 + thumb_func_end ov23_022542D8 + + thumb_func_start ov23_0225430C +ov23_0225430C: ; 0x0225430C + ldr r3, _02254310 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_02254310: .word sub_020181C4 + thumb_func_end ov23_0225430C + + thumb_func_start ov23_02254314 +ov23_02254314: ; 0x02254314 + ldr r0, [r0, #0x3c] + bx lr + thumb_func_end ov23_02254314 + + thumb_func_start ov23_02254318 +ov23_02254318: ; 0x02254318 + push {r3, lr} + add r1, r0, #0 + add r1, #0x38 + ldrb r1, [r1] + cmp r1, #0 + beq _0225432E + cmp r1, #1 + beq _02254334 + cmp r1, #2 + beq _0225433A + b _0225434A +_0225432E: + bl ov23_0225437C + b _0225434A +_02254334: + bl ov23_022544C0 + b _0225434A +_0225433A: + add r1, r0, #0 + mov r2, #0 + add r1, #0x38 + strb r2, [r1] + bl ov23_0225451C + mov r0, #1 + pop {r3, pc} +_0225434A: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_02254318 + + thumb_func_start ov23_02254350 +ov23_02254350: ; 0x02254350 + push {r4, lr} + sub sp, #0x10 + ldr r3, _02254378 ; =0x02256B1C + add r2, sp, #0 + add r4, r1, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + bl ov23_022421CC + lsl r2, r4, #2 + add r1, sp, #0 + ldr r1, [r1, r2] + mov r2, #0 + add r3, r2, #0 + bl ov23_02253F60 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_02254378: .word 0x02256B1C + thumb_func_end ov23_02254350 + + thumb_func_start ov23_0225437C +ov23_0225437C: ; 0x0225437C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r0, #0 + mov r0, #4 + add r1, r0, #0 + bl sub_02013A04 + str r0, [r5, #0x24] + mov r2, #3 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _022544A4 ; =0x000001D7 + add r1, r5, #4 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + mov r3, #1 + add r1, r5, #0 + str r3, [sp] + mov r0, #7 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _022544A8 ; =0x000001C9 + add r1, #0x14 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + mov r2, #3 + ldr r0, [r0, #8] + bl sub_0201A7E8 + ldr r2, _022544AC ; =0x000003D9 + add r0, r5, #4 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + ldr r2, _022544AC ; =0x000003D9 + add r0, #0x14 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r3, _022544B0 ; =0x02256B2C + add r2, sp, #0x14 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r2, _022544B4 ; =0x0000027D + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0x14 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r7, #0 + mov r1, #0 + bl sub_0200B1EC + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x14 + add r2, r4, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r4, #0 + bl sub_020237BC + mov r6, #0 + add r4, sp, #0x14 +_02254436: + ldr r0, [r5, #0x24] + ldr r2, [r4, #0] + add r1, r7, #0 + add r3, r6, #0 + bl sub_02013A4C + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _02254436 + add r0, r7, #0 + bl sub_0200B190 + ldr r4, _022544B8 ; =0x02256B3C + add r3, sp, #0x24 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + mov r3, #4 + add r0, sp, #0x14 + strh r3, [r0, #0x20] + strh r3, [r0, #0x22] + ldr r0, [r5, #0x24] + str r0, [sp, #0x24] + add r0, r5, #4 + str r0, [sp, #0x30] + ldr r0, _022544BC ; =ov23_02254350 + str r0, [sp, #0x28] + add r0, r2, #0 + ldr r1, [r5, #0x30] + ldr r2, [r5, #0x34] + ldrh r1, [r1] + ldrh r2, [r2] + bl sub_0200112C + str r0, [r5, #0x28] + add r0, r5, #4 + bl sub_0201A954 + add r0, r5, #0 + add r0, #0x14 + bl sub_0201A954 + mov r0, #1 + add r5, #0x38 + strb r0, [r5] + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_022544A4: .word 0x000001D7 +_022544A8: .word 0x000001C9 +_022544AC: .word 0x000003D9 +_022544B0: .word 0x02256B2C +_022544B4: .word 0x0000027D +_022544B8: .word 0x02256B3C +_022544BC: .word ov23_02254350 + thumb_func_end ov23_0225437C + + thumb_func_start ov23_022544C0 +ov23_022544C0: ; 0x022544C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x28] + bl sub_02001288 + add r4, r0, #0 + add r0, r5, #0 + bl ov23_022549EC + cmp r4, #3 + bne _022544DA + mov r4, #1 + mvn r4, r4 +_022544DA: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _022544EA + add r0, r0, #1 + cmp r4, r0 + bne _02254500 + pop {r3, r4, r5, pc} +_022544EA: + ldr r0, _02254518 ; =0x000005DC + bl sub_02005748 + str r4, [r5, #0x3c] + mov r0, #2 + add r5, #0x38 + strb r0, [r5] + ldr r0, _02254518 ; =0x000005DC + bl sub_02005748 + pop {r3, r4, r5, pc} +_02254500: + ldr r0, _02254518 ; =0x000005DC + bl sub_02005748 + str r4, [r5, #0x3c] + mov r0, #2 + add r5, #0x38 + strb r0, [r5] + ldr r0, _02254518 ; =0x000005DC + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_02254518: .word 0x000005DC + thumb_func_end ov23_022544C0 + + thumb_func_start ov23_0225451C +ov23_0225451C: ; 0x0225451C + push {r4, lr} + add r4, r0, #0 + bl ov23_022421CC + bl ov23_02254044 + add r0, r4, #0 + add r0, #0x14 + mov r1, #1 + bl sub_0200DC9C + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x30] + ldr r2, [r4, #0x34] + bl sub_02001384 + add r0, r4, #4 + mov r1, #1 + bl sub_0200DC9C + ldrb r1, [r4, #8] + ldr r0, [r4, #4] + bl sub_0201C3C0 + add r0, r4, #4 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x14 + bl sub_0201A8FC + ldr r0, [r4, #0x24] + bl sub_02013A3C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0225451C + + thumb_func_start ov23_02254564 +ov23_02254564: ; 0x02254564 + push {r3, lr} + mov r2, #1 + and r1, r2 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + beq _0225457C + add r1, r2, #0 + mov r2, #0xf + mov r3, #2 + bl sub_0200147C + pop {r3, pc} +_0225457C: + mov r1, #2 + mov r2, #0xf + add r3, r1, #0 + bl sub_0200147C + pop {r3, pc} + thumb_func_end ov23_02254564 + + thumb_func_start ov23_02254588 +ov23_02254588: ; 0x02254588 + ldr r3, _02254590 ; =sub_02018144 + mov r0, #4 + mov r1, #0x4c + bx r3 + ; .align 2, 0 +_02254590: .word sub_02018144 + thumb_func_end ov23_02254588 + + thumb_func_start ov23_02254594 +ov23_02254594: ; 0x02254594 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + str r1, [r0, #0] + mov r5, #0 + add r4, #0x42 + strb r5, [r4] + str r5, [r0, #4] + str r2, [r0, #0x38] + str r3, [r0, #0x3c] + mov r0, #2 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r1, #8] + ldr r2, _022545C0 ; =0x000003D9 + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022545C0: .word 0x000003D9 + thumb_func_end ov23_02254594 + + thumb_func_start ov23_022545C4 +ov23_022545C4: ; 0x022545C4 + add r3, r0, #0 + add r3, #0x40 + strb r1, [r3] + add r0, #0x41 + strb r2, [r0] + bx lr + thumb_func_end ov23_022545C4 + + thumb_func_start ov23_022545D0 +ov23_022545D0: ; 0x022545D0 + ldr r3, _022545D4 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_022545D4: .word sub_020181C4 + thumb_func_end ov23_022545D0 + + thumb_func_start ov23_022545D8 +ov23_022545D8: ; 0x022545D8 + ldr r0, [r0, #0x44] + bx lr + thumb_func_end ov23_022545D8 + + thumb_func_start ov23_022545DC +ov23_022545DC: ; 0x022545DC + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x42 + ldrb r1, [r1] + cmp r1, #0 + beq _022545F4 + cmp r1, #1 + beq _022545FA + cmp r1, #2 + beq _02254600 + b _0225460E +_022545F4: + bl ov23_022546E0 + b _0225460E +_022545FA: + bl ov23_0225461C + b _0225460E +_02254600: + mov r1, #0 + add r4, #0x42 + strb r1, [r4] + bl ov23_02254958 + mov r0, #1 + pop {r4, pc} +_0225460E: + ldr r0, [r4, #4] + cmp r0, #0 + beq _02254618 + bl sub_0206A870 +_02254618: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov23_022545DC + + thumb_func_start ov23_0225461C +ov23_0225461C: ; 0x0225461C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x2c] + bl ov23_02248D20 + add r6, r0, #0 + ldr r0, [r5, #0x48] + lsr r4, r6, #1 + cmp r0, r4 + bne _02254634 + mov r4, #1 + mvn r4, r4 +_02254634: + ldr r0, [r5, #0x2c] + add r1, sp, #0 + ldr r0, [r0, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + ldr r0, [r5, #0x2c] + mov r1, #2 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r7, r0, #0 + ldr r0, [r5, #0x2c] + mov r1, #3 + ldr r0, [r0, #0xc] + bl sub_02001504 + add r3, r0, #0 + add r1, sp, #0 + lsl r2, r7, #0x10 + lsl r3, r3, #0x10 + ldrh r1, [r1, #2] + ldr r0, [r5, #4] + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl ov23_022549A8 + mov r0, #1 + mvn r0, r0 + cmp r6, r0 + beq _0225467C + add r0, r0, #1 + cmp r6, r0 + bne _0225468C + pop {r3, r4, r5, r6, r7, pc} +_0225467C: + str r0, [r5, #0x44] + mov r0, #2 + add r5, #0x42 + strb r0, [r5] + ldr r0, _0225469C ; =0x000005DC + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_0225468C: + str r4, [r5, #0x44] + mov r0, #2 + add r5, #0x42 + strb r0, [r5] + ldr r0, _0225469C ; =0x000005DC + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225469C: .word 0x000005DC + thumb_func_end ov23_0225461C + + thumb_func_start ov23_022546A0 +ov23_022546A0: ; 0x022546A0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0x13 + bl sub_02001504 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl sub_02001504 + lsr r1, r4, #1 + sub r0, r0, #1 + cmp r1, r0 + bne _022546C2 + ldr r4, _022546DC ; =0x00000116 + b _022546CC +_022546C2: + add r0, r6, #0 + bl sub_020289B8 + add r4, r0, #0 + add r4, #0x8a +_022546CC: + bl ov23_022421DC + mov r2, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov23_02253F60 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022546DC: .word 0x00000116 + thumb_func_end ov23_022546A0 + + thumb_func_start ov23_022546E0 +ov23_022546E0: ; 0x022546E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r7, r0, #0 + bl sub_020289A0 + str r0, [sp, #0x20] + str r0, [r5, #0x48] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #7 + ble _02254704 + mov r0, #7 + str r0, [sp, #0x1c] +_02254704: + ldr r0, [sp, #0x20] + mov r1, #4 + add r0, r0, #1 + bl sub_02013A04 + str r0, [r5, #0x28] + mov r2, #3 + str r2, [sp] + mov r0, #0xc + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + add r1, r5, #0 + lsl r0, r0, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02254930 ; =0x0000018F + add r1, #8 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + mov r3, #0x13 + ldr r0, [r0, #8] + bl sub_0201A7E8 + mov r3, #1 + add r1, r5, #0 + str r3, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02254934 ; =0x0000016F + add r1, #0x18 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + mov r2, #3 + ldr r0, [r0, #8] + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _02254938 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + ldr r2, _02254938 ; =0x000003D9 + add r0, #0x18 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r2, _0225493C ; =0x00000272 + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + str r0, [sp, #0x18] + ldr r2, _02254940 ; =0x0000027D + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + str r0, [sp, #0x24] + add r0, r5, #0 + add r0, #0x18 + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [sp, #0x24] + mov r1, #9 + bl sub_0200B1EC + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + mov r1, #0xa + bl sub_0200B1EC + str r0, [sp, #0x2c] + mov r0, #6 + mov r1, #4 + bl sub_02023790 + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + ldr r2, [sp, #0x28] + add r0, #0x18 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + mov r0, #4 + bl sub_0200B358 + mov r1, #1 + str r1, [sp] + add r2, r5, #0 + str r1, [sp, #4] + add r2, #0x40 + ldrb r2, [r2] + mov r1, #0 + mov r3, #2 + add r6, r0, #0 + bl sub_0200B60C + mov r1, #1 + str r1, [sp] + add r2, r5, #0 + str r1, [sp, #4] + add r2, #0x41 + ldrb r2, [r2] + add r0, r6, #0 + mov r3, #2 + bl sub_0200B60C + ldr r2, [sp, #0x2c] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0200C388 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r5, #0 + add r0, #0x18 + add r2, r4, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r6, #0 + bl sub_0200B3F0 + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x2c] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x24] + bl sub_0200B190 + ldr r0, [sp, #0x20] + mov r4, #0 + cmp r0, #0 + ble _0225487E + add r6, r4, #0 +_02254848: + add r0, r7, #0 + add r1, r4, #0 + bl sub_020289B8 + str r0, [sp, #0x14] + add r0, r7, #0 + add r1, r4, #0 + bl sub_02028AFC + cmp r0, #0 + bne _02254862 + mov r3, #1 + b _02254864 +_02254862: + mov r3, #0 +_02254864: + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + ldr r0, [r5, #0x28] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x14] + add r3, r6, r3 + bl sub_02013A4C + ldr r0, [sp, #0x20] + add r4, r4, #1 + add r6, r6, #2 + cmp r4, r0 + blt _02254848 +_0225487E: + lsl r3, r4, #1 + ldr r0, [r5, #0x28] + ldr r1, [sp, #0x18] + ldr r2, _02254944 ; =0x00000115 + add r3, r3, #1 + bl sub_02013A4C + ldr r0, [sp, #0x18] + bl sub_0200B190 + bl ov23_022421DC + ldr r1, _0225493C ; =0x00000272 + mov r2, #0 + bl ov23_02253DFC + ldr r4, _02254948 ; =0x02256B3C + add r3, sp, #0x30 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, _0225494C ; =ov23_02254564 + add r1, sp, #0x30 + str r0, [sp, #0x38] + ldr r0, [sp, #0x20] + mov r3, #4 + add r0, r0, #1 + strh r0, [r1, #0x10] + ldr r0, [sp, #0x1c] + strh r0, [r1, #0x12] + ldr r0, [r5, #0x28] + str r0, [sp, #0x30] + add r0, r5, #0 + add r0, #8 + str r0, [sp, #0x3c] + ldr r0, _02254950 ; =ov23_022546A0 + str r7, [sp, #0x4c] + str r0, [sp, #0x34] + ldr r0, _02254954 ; =0x02028A11 + str r0, [sp] + str r7, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + add r0, r2, #0 + ldr r1, [r5, #0x38] + ldr r2, [r5, #0x3c] + ldrh r1, [r1] + ldrh r2, [r2] + bl ov23_02248C08 + str r0, [r5, #0x2c] + add r0, r5, #0 + add r0, #8 + bl sub_0201A954 + add r0, r5, #0 + add r0, #0x18 + bl sub_0201A954 + mov r0, #4 + bl sub_0206A780 + str r0, [r5, #4] + mov r1, #0xc8 + mov r2, #0x1a + mov r3, #0x86 + bl sub_0206A8A0 + mov r1, #0 + ldr r0, [r5, #4] + add r2, r1, #0 + bl sub_0206A8C4 + ldr r0, [r5, #4] + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 + mov r0, #1 + add r5, #0x42 + strb r0, [r5] + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02254930: .word 0x0000018F +_02254934: .word 0x0000016F +_02254938: .word 0x000003D9 +_0225493C: .word 0x00000272 +_02254940: .word 0x0000027D +_02254944: .word 0x00000115 +_02254948: .word 0x02256B3C +_0225494C: .word ov23_02254564 +_02254950: .word ov23_022546A0 +_02254954: .word 0x02028A11 + thumb_func_end ov23_022546E0 + + thumb_func_start ov23_02254958 +ov23_02254958: ; 0x02254958 + push {r4, lr} + add r4, r0, #0 + bl ov23_022421DC + bl ov23_02254044 + add r0, r4, #0 + add r0, #0x18 + mov r1, #1 + bl sub_0200DC9C + ldr r0, [r4, #0x2c] + ldr r1, [r4, #0x38] + ldr r2, [r4, #0x3c] + bl ov23_02248EF8 + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl sub_0200DC9C + ldrb r1, [r4, #0xc] + ldr r0, [r4, #8] + bl sub_0201C3C0 + add r0, r4, #0 + add r0, #8 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x18 + bl sub_0201A8FC + ldr r0, [r4, #0x28] + bl sub_02013A3C + ldr r0, [r4, #4] + bl sub_0206A844 + pop {r4, pc} + thumb_func_end ov23_02254958 + + thumb_func_start ov23_022549A8 +ov23_022549A8: ; 0x022549A8 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r7, r3, #0 + add r6, r0, #0 + add r5, r1, #0 + cmp r4, r7 + bls _022549E8 + cmp r5, #0 + beq _022549C4 + mov r1, #0 + mov r2, #1 + bl sub_0206A8C4 + b _022549CC +_022549C4: + mov r1, #0 + add r2, r1, #0 + bl sub_0206A8C4 +_022549CC: + add r0, r5, r7 + cmp r4, r0 + beq _022549DE + mov r1, #1 + add r0, r6, #0 + add r2, r1, #0 + bl sub_0206A8C4 + pop {r3, r4, r5, r6, r7, pc} +_022549DE: + add r0, r6, #0 + mov r1, #1 + mov r2, #0 + bl sub_0206A8C4 +_022549E8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_022549A8 + + thumb_func_start ov23_022549EC +ov23_022549EC: ; 0x022549EC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x40 + ldrh r4, [r0] + add r1, r5, #0 + ldr r0, [r5, #0x28] + add r1, #0x40 + bl sub_020014D0 + add r5, #0x40 + ldrh r0, [r5] + cmp r4, r0 + beq _02254A0C + ldr r0, _02254A10 ; =0x000005DC + bl sub_02005748 +_02254A0C: + pop {r3, r4, r5, pc} + nop +_02254A10: .word 0x000005DC + thumb_func_end ov23_022549EC + + .rodata + + + .global Unk_ov23_02256B1C +Unk_ov23_02256B1C: ; 0x02256B1C + .incbin "incbin/overlay23_rodata.bin", 0x810, 0x820 - 0x810 + + .global Unk_ov23_02256B2C +Unk_ov23_02256B2C: ; 0x02256B2C + .incbin "incbin/overlay23_rodata.bin", 0x820, 0x830 - 0x820 + + .global Unk_ov23_02256B3C +Unk_ov23_02256B3C: ; 0x02256B3C + .incbin "incbin/overlay23_rodata.bin", 0x830, 0x20 + diff --git a/asm/ov23_02254A14.s b/asm/ov23_02254A14.s new file mode 100644 index 000000000..3a047b420 --- /dev/null +++ b/asm/ov23_02254A14.s @@ -0,0 +1,3267 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov23_02254A14 +ov23_02254A14: ; 0x02254A14 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r6, r0, #0 + add r7, r2, #0 + cmp r5, #0 + bne _02254A26 + bl sub_02022974 +_02254A26: + add r4, r7, #0 + add r4, #0x3c + add r0, r5, #0 + bl sub_020573FC + str r0, [r4, #0x18] + add r0, r5, #0 + bl sub_0205740C + str r0, [r4, #0x1c] + ldr r0, [r4, #0x18] + lsl r1, r0, #0xf + mov r0, #1 + lsl r0, r0, #0x14 + add r1, r1, r0 + lsr r0, r0, #8 + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r4, #0x1c] + lsl r1, r0, #0xf + mov r0, #0xd + lsl r0, r0, #0x10 + add r0, r1, r0 + str r0, [sp, #0x10] + add r0, r6, #0 + add r1, r5, #0 + bl ov23_02255E14 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r6, #0x50] + add r3, sp, #8 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r6, #0x30] + bl ov5_021E19CC + str r0, [r4, #0x10] + mov r0, #0x10 + str r0, [r7, #0x3c] + mov r0, #0xd + str r0, [r4, #4] + ldr r0, [r4, #0x18] + add r0, #0xf + str r0, [r4, #8] + ldr r0, [r4, #0x1c] + add r0, #0xc + str r0, [r4, #0xc] + str r5, [r4, #0x14] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02254A14 + + thumb_func_start ov23_02254A94 +ov23_02254A94: ; 0x02254A94 + add r2, r0, #0 + ldr r3, _02254AA0 ; =ov5_021E1674 + add r2, #0xa4 + add r0, r1, #0 + ldr r1, [r2, #0] + bx r3 + ; .align 2, 0 +_02254AA0: .word ov5_021E1674 + thumb_func_end ov23_02254A94 + + thumb_func_start ov23_02254AA4 +ov23_02254AA4: ; 0x02254AA4 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x24 + add r4, r0, #0 + mul r4, r1 + add r0, r5, r4 + ldr r0, [r0, #0x5c] + cmp r0, #0 + bne _02254ABA + bl sub_02022974 +_02254ABA: + add r2, r5, r4 + add r2, #0x60 + add r5, #0x3c + ldmia r2!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r5!, {r0, r1} + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_02254AA4 + + thumb_func_start ov23_02254AD4 +ov23_02254AD4: ; 0x02254AD4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02050A60 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0xa + bls _02254AF0 + b _02254C5A +_02254AF0: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02254AFC: ; jump table + .short _02254B12 - _02254AFC - 2 ; case 0 + .short _02254B6E - _02254AFC - 2 ; case 1 + .short _02254B8E - _02254AFC - 2 ; case 2 + .short _02254BA0 - _02254AFC - 2 ; case 3 + .short _02254BAC - _02254AFC - 2 ; case 4 + .short _02254BB8 - _02254AFC - 2 ; case 5 + .short _02254BC4 - _02254AFC - 2 ; case 6 + .short _02254BD0 - _02254AFC - 2 ; case 7 + .short _02254BDC - _02254AFC - 2 ; case 8 + .short _02254C06 - _02254AFC - 2 ; case 9 + .short _02254C2E - _02254AFC - 2 ; case 10 +_02254B12: + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + bl ov23_022542CC + ldr r3, _02254C60 ; =0x00000504 + add r1, r6, #0 + add r2, r3, #0 + str r0, [r4, r3] + ldr r0, [r4, r3] + add r2, #0x14 + add r3, #0x18 + add r2, r4, r2 + add r3, r4, r3 + bl ov23_022542D8 + bl ov23_02254588 + ldr r3, _02254C64 ; =0x00000508 + add r1, r6, #0 + add r2, r3, #0 + str r0, [r4, r3] + ldr r0, [r4, r3] + add r2, #0x12 + add r3, #0x16 + add r2, r4, r2 + add r3, r4, r3 + bl ov23_02254594 + add r2, r4, #0 + add r0, r6, #0 + add r1, r4, #0 + add r2, #0x5c + bl ov23_02255C78 + add r1, r4, #0 + add r0, r6, #0 + add r1, #0x5c + bl ov23_02255D78 + mov r0, #1 + add r1, r4, #0 + bl ov23_02255EBC + b _02254C5A +_02254B6E: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r1, #0x29 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #2 + add r1, r4, #0 + bl ov23_02255EBC + b _02254C5A +_02254B8E: + bl sub_0200F2AC + cmp r0, #0 + beq _02254C5A + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + b _02254C5A +_02254BA0: + ldr r1, _02254C68 ; =ov23_02254C84 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + b _02254C5A +_02254BAC: + ldr r1, _02254C6C ; =ov23_02254DF8 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + b _02254C5A +_02254BB8: + ldr r1, _02254C70 ; =ov23_02255100 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + b _02254C5A +_02254BC4: + ldr r1, _02254C74 ; =ov23_02255580 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + b _02254C5A +_02254BD0: + ldr r1, _02254C78 ; =ov23_02255850 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + b _02254C5A +_02254BDC: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02254C5A + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02254C5A + bl ov23_0224D3B0 + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + b _02254C5A +_02254C06: + ldr r0, _02254C7C ; =0x0000060E + bl sub_02005748 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0x28 + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #0xa + add r1, r4, #0 + bl ov23_02255EBC + b _02254C5A +_02254C2E: + bl sub_0200F2AC + cmp r0, #0 + beq _02254C5A + ldr r0, _02254C64 ; =0x00000508 + ldr r0, [r4, r0] + bl ov23_022545D0 + ldr r0, _02254C60 ; =0x00000504 + ldr r0, [r4, r0] + bl ov23_0225430C + ldr r0, _02254C80 ; =0x0000050C + ldr r0, [r4, r0] + bl ov5_021D1BEC + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_02254C5A: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02254C60: .word 0x00000504 +_02254C64: .word 0x00000508 +_02254C68: .word ov23_02254C84 +_02254C6C: .word ov23_02254DF8 +_02254C70: .word ov23_02255100 +_02254C74: .word ov23_02255580 +_02254C78: .word ov23_02255850 +_02254C7C: .word 0x0000060E +_02254C80: .word 0x0000050C + thumb_func_end ov23_02254AD4 + + thumb_func_start ov23_02254C84 +ov23_02254C84: ; 0x02254C84 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, _02254D8C ; =0x00000504 + ldr r0, [r4, r0] + bl ov23_02254318 + cmp r0, #0 + beq _02254D86 + ldr r0, _02254D8C ; =0x00000504 + ldr r0, [r4, r0] + bl ov23_02254314 + cmp r0, #0 + beq _02254CB8 + cmp r0, #1 + beq _02254D40 + cmp r0, #2 + beq _02254D58 + b _02254D70 +_02254CB8: + ldr r0, [r5, #0xc] + bl sub_020298B0 + bl sub_020289A0 + cmp r0, #0 + bne _02254CE2 + mov r0, #0x13 + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #8 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254CE2: + ldr r3, _02254D90 ; =0x00000521 + ldrb r1, [r4, r3] + cmp r1, #0xf + bls _02254D06 + mov r0, #0x14 + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #8 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254D06: + add r0, r3, #3 + ldrb r2, [r4, r0] + add r0, r1, #1 + cmp r0, r2 + ble _02254D2C + mov r0, #0x14 + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #8 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254D2C: + sub r3, #0x19 + ldr r0, [r4, r3] + bl ov23_022545C4 + mov r0, #4 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254D40: + ldr r2, _02254D94 ; =0x000004FC + mov r0, #0x10 + ldr r2, [r4, r2] + mov r1, #0xd + bl ov23_02255F04 + mov r0, #5 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254D58: + ldr r2, _02254D94 ; =0x000004FC + mov r0, #0x10 + ldr r2, [r4, r2] + mov r1, #0xd + bl ov23_02255F04 + mov r0, #6 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254D70: + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x5c + bl ov23_02255DDC + mov r0, #9 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #1 + pop {r3, r4, r5, pc} +_02254D86: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02254D8C: .word 0x00000504 +_02254D90: .word 0x00000521 +_02254D94: .word 0x000004FC + thumb_func_end ov23_02254C84 + + thumb_func_start ov23_02254D98 +ov23_02254D98: ; 0x02254D98 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r1, _02254DE4 ; =0x00000528 + mov r0, #0xb + bl sub_02018184 + ldr r2, _02254DE4 ; =0x00000528 + add r4, r0, #0 + mov r1, #0 + bl sub_020C4CF4 + mov r0, #0 + add r1, r4, #0 + bl ov23_02255EBC + mov r0, #5 + lsl r0, r0, #8 + str r5, [r4, r0] + ldr r0, [r5, #4] + ldr r1, _02254DE8 ; =0x02256B88 + ldr r0, [r0, #4] + bl ov5_021D1B6C + ldr r1, _02254DEC ; =0x0000050C + str r0, [r4, r1] + ldr r0, [r4, r1] + bl ov5_021D1C2C + ldr r1, _02254DF0 ; =0x000004FC + add r2, r4, #0 + str r0, [r4, r1] + ldr r1, _02254DF4 ; =ov23_02254AD4 + add r0, r6, #0 + bl sub_02050944 + pop {r4, r5, r6, pc} + nop +_02254DE4: .word 0x00000528 +_02254DE8: .word 0x02256B88 +_02254DEC: .word 0x0000050C +_02254DF0: .word 0x000004FC +_02254DF4: .word ov23_02254AD4 + thumb_func_end ov23_02254D98 + + thumb_func_start ov23_02254DF8 +ov23_02254DF8: ; 0x02254DF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #5 + bhi _02254E36 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02254E1E: ; jump table + .short _02254E2A - _02254E1E - 2 ; case 0 + .short _02254EAC - _02254E1E - 2 ; case 1 + .short _02254EC6 - _02254E1E - 2 ; case 2 + .short _02255066 - _02254E1E - 2 ; case 3 + .short _0225508C - _02254E1E - 2 ; case 4 + .short _022550BA - _02254E1E - 2 ; case 5 +_02254E2A: + ldr r0, _022550E4 ; =0x00000508 + ldr r0, [r4, r0] + bl ov23_022545DC + cmp r0, #0 + bne _02254E38 +_02254E36: + b _022550DE +_02254E38: + mov r0, #5 + lsl r0, r0, #8 + ldr r0, [r4, r0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r6, r0, #0 + ldr r0, _022550E4 ; =0x00000508 + ldr r0, [r4, r0] + bl ov23_022545D8 + add r7, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r7, r0 + bne _02254E66 + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x28 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02254E66: + add r0, r6, #0 + add r1, r7, #0 + bl sub_020289B8 + str r0, [sp, #4] + cmp r0, #0 + beq _02254EA6 + add r0, r6, #0 + add r1, r7, #0 + bl sub_02028AFC + cmp r0, #0 + bne _02254E90 + ldr r1, [sp, #4] + add r0, r5, #0 + add r2, r4, #0 + bl ov23_02254A14 + mov r0, #1 + str r0, [r4, #4] + b _022550DE +_02254E90: + mov r0, #0x15 + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #5 + str r0, [r4, #4] + b _022550DE +_02254EA6: + bl sub_02022974 + b _022550DE +_02254EAC: + ldr r0, _022550E8 ; =0x000004DC + add r0, r4, r0 + bl ov23_02256228 + ldr r2, _022550E8 ; =0x000004DC + ldr r0, [r4, #0x4c] + mov r1, #4 + add r2, r4, r2 + bl ov23_0225623C + mov r0, #2 + str r0, [r4, #4] + b _022550DE +_02254EC6: + ldr r1, _022550E8 ; =0x000004DC + add r0, r5, #0 + add r1, r4, r1 + bl ov23_0225624C + add r0, r4, #0 + add r1, r5, #0 + add r2, sp, #8 + bl ov23_02256098 + cmp r0, #0 + bne _02254FD2 + add r3, r4, #0 + add r3, #0x3c + add r2, sp, #0x18 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, _022550EC ; =0x021BF67C + mov r1, #0x20 + ldr r0, [r0, #0x4c] + mov r6, #1 + tst r1, r0 + beq _02254F0C + ldr r0, _022550F0 ; =0xFFFF0000 + mov r7, #0 + str r0, [sp] + ldr r0, [sp, #0x18] + sub r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + sub r0, r0, #1 + str r0, [sp, #0x20] + b _02254F5E +_02254F0C: + mov r1, #0x10 + add r2, r0, #0 + tst r2, r1 + beq _02254F28 + lsl r0, r1, #0xc + str r0, [sp] + ldr r0, [sp, #0x18] + mov r7, #0 + add r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + b _02254F5E +_02254F28: + mov r1, #0x40 + tst r1, r0 + beq _02254F42 + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #0x1c] + ldr r7, _022550F0 ; =0xFFFF0000 + sub r0, r0, #1 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x24] + sub r0, r0, #1 + str r0, [sp, #0x24] + b _02254F5E +_02254F42: + mov r1, #0x80 + tst r0, r1 + beq _02254F5C + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #0x1c] + lsl r7, r1, #9 + add r0, r0, #1 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x24] + add r0, r0, #1 + str r0, [sp, #0x24] + b _02254F5E +_02254F5C: + mov r6, #0 +_02254F5E: + cmp r6, #0 + beq _02254FAC + add r0, sp, #0x18 + bl ov23_02255B58 + cmp r0, #0 + bne _02254FAC + add r2, r4, #0 + add r3, sp, #0x18 + add r2, #0x3c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r4, #0x4c] + bl ov5_021E18E0 + add r6, r0, #0 + add r0, sp, #0xc + add r1, r6, #0 + bl ov5_021E1894 + ldr r1, [sp, #0xc] + ldr r0, [sp] + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + add r1, sp, #0xc + add r0, r0, r7 + str r0, [sp, #0x14] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #0x10] + add r0, r6, #0 + bl ov5_021E18A4 +_02254FAC: + ldr r0, _022550EC ; =0x021BF67C + ldr r2, [r0, #0x48] + mov r0, #1 + add r1, r2, #0 + tst r1, r0 + beq _02254FBC + str r0, [sp, #8] + b _02254FD2 +_02254FBC: + mov r0, #2 + tst r0, r2 + beq _02254FD2 + ldr r1, [r4, #0x4c] + add r0, r5, #0 + bl ov23_02254A94 + mov r0, #0 + add sp, #0x28 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_02254FD2: + ldr r0, [sp, #8] + cmp r0, #0 + bne _02254FDA + b _022550DE +_02254FDA: + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x3c + add r1, #0x5c + bl ov23_02255A98 + cmp r0, #0 + beq _0225504A + mov r0, #5 + lsl r0, r0, #8 + ldr r0, [r4, r0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r6, r0, #0 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x3c + add r1, #0x5c + bl ov23_02255B78 + add r7, r0, #0 + ldr r0, _022550E4 ; =0x00000508 + ldr r0, [r4, r0] + bl ov23_022545D8 + add r1, r0, #0 + add r0, r6, #0 + add r2, r7, #0 + bl sub_02028ACC + ldr r0, _022550F4 ; =0x000005FE + bl sub_02005748 + ldr r0, [r4, #0x50] + bl ov23_0224D3BC + mov r0, #0xb + bl ov23_0224D39C + ldr r1, _022550E8 ; =0x000004DC + str r0, [r4, #8] + add r0, r5, #0 + add r1, r4, r1 + bl ov23_0225628C + ldr r0, _022550F8 ; =0x00000521 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + mov r1, #0 + sub r0, r0, #1 + strb r1, [r4, r0] + mov r0, #4 + str r0, [r4, #4] + b _022550DE +_0225504A: + ldr r0, _022550FC ; =0x00000602 + bl sub_02005748 + mov r0, #0xc + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #3 + str r0, [r4, #4] + b _022550DE +_02255066: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _022550DE + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _022550DE + bl ov23_0224D3B0 + mov r0, #2 + str r0, [r4, #4] + b _022550DE +_0225508C: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _022550DE + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _022550DE + bl ov23_0224D3B0 + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x28 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022550BA: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _022550DE + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _022550DE + bl ov23_0224D3B0 + mov r0, #0 + str r0, [r4, #4] +_022550DE: + mov r0, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022550E4: .word 0x00000508 +_022550E8: .word 0x000004DC +_022550EC: .word 0x021BF67C +_022550F0: .word 0xFFFF0000 +_022550F4: .word 0x000005FE +_022550F8: .word 0x00000521 +_022550FC: .word 0x00000602 + thumb_func_end ov23_02254DF8 + + thumb_func_start ov23_02255100 +ov23_02255100: ; 0x02255100 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_02050A60 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #6 + bls _0225511C + b _02255576 +_0225511C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02255128: ; jump table + .short _02255136 - _02255128 - 2 ; case 0 + .short _02255176 - _02255128 - 2 ; case 1 + .short _02255464 - _02255128 - 2 ; case 2 + .short _022554B6 - _02255128 - 2 ; case 3 + .short _022554E0 - _02255128 - 2 ; case 4 + .short _02255506 - _02255128 - 2 ; case 5 + .short _02255548 - _02255128 - 2 ; case 6 +_02255136: + ldr r0, _02255448 ; =0x000004DC + add r0, r4, r0 + bl ov23_02256228 + ldr r0, _0225544C ; =0x000004FC + ldr r0, [r4, r0] + bl ov23_02255EFC + ldr r0, _0225544C ; =0x000004FC + add r2, r4, #0 + ldr r1, [r4, r0] + add r2, #0x5c + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x68] + add r3, sp, #0xc + bl ov23_02255B14 + cmp r0, #0 + beq _02255170 + ldr r1, [sp, #0xc] + mov r0, #0x24 + mul r0, r1 + add r0, r4, r0 + ldr r2, _02255448 ; =0x000004DC + ldr r0, [r0, #0x70] + mov r1, #8 + add r2, r4, r2 + bl ov23_0225623C +_02255170: + mov r0, #1 + str r0, [r4, #4] + b _02255576 +_02255176: + ldr r1, _02255448 ; =0x000004DC + mov r0, #1 + str r0, [sp] + add r0, r7, #0 + add r1, r4, r1 + bl ov23_0225624C + add r0, r4, #0 + add r1, r7, #0 + add r2, sp, #0x10 + bl ov23_02256104 + ldr r1, _0225544C ; =0x000004FC + cmp r0, #0 + ldr r2, [r4, r1] + ldr r2, [r2, #0x64] + str r2, [sp, #0x14] + ldr r2, [r4, r1] + ldr r2, [r2, #0x64] + str r2, [sp, #0x1c] + ldr r2, [r4, r1] + ldr r2, [r2, #0x68] + str r2, [sp, #0x18] + ldr r2, [r4, r1] + ldr r2, [r2, #0x68] + str r2, [sp, #0x20] + ldr r2, [r4, r1] + ldr r6, [r2, #0x58] + ldr r5, [r2, #0x60] + bne _02255278 + ldr r0, _02255450 ; =0x021BF67C + mov r2, #0x20 + ldr r0, [r0, #0x4c] + tst r2, r0 + beq _022551D8 + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + sub r6, r6, r0 + ldr r0, [sp, #0x14] + sub r0, r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + sub r0, r0, #1 + str r0, [sp, #0x1c] + b _02255242 +_022551D8: + mov r2, #0x10 + tst r2, r0 + beq _022551FA + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + add r6, r6, r0 + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + b _02255242 +_022551FA: + mov r2, #0x40 + tst r2, r0 + beq _0225521C + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + sub r5, r5, r0 + ldr r0, [sp, #0x18] + sub r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + sub r0, r0, #1 + str r0, [sp, #0x20] + b _02255242 +_0225521C: + mov r2, #0x80 + tst r0, r2 + beq _0225523E + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + add r5, r5, r0 + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + b _02255242 +_0225523E: + mov r0, #0 + str r0, [sp] +_02255242: + ldr r0, _02255450 ; =0x021BF67C + mov r1, #1 + ldr r0, [r0, #0x48] + add r2, r0, #0 + tst r2, r1 + beq _02255252 + str r1, [sp, #0x10] + b _02255278 +_02255252: + mov r1, #2 + tst r0, r1 + beq _02255278 + ldr r0, _0225544C ; =0x000004FC + ldr r0, [r4, r0] + bl ov23_02255F20 + ldr r1, _02255448 ; =0x000004DC + add r0, r7, #0 + add r1, r4, r1 + bl ov23_0225628C + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255278: + ldr r0, [sp] + cmp r0, #0 + beq _022552FA + add r0, sp, #0x14 + bl ov23_02255B58 + cmp r0, #0 + bne _022552FA + ldr r0, _0225544C ; =0x000004FC + add r3, sp, #8 + ldr r1, [r4, r0] + str r6, [r1, #0x58] + ldr r1, [r4, r0] + str r5, [r1, #0x60] + ldr r2, [sp, #0x14] + ldr r1, [r4, r0] + str r2, [r1, #0x64] + ldr r2, [sp, #0x18] + ldr r1, [r4, r0] + str r2, [r1, #0x68] + ldr r1, [r4, r0] + add r2, r4, #0 + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x68] + add r2, #0x5c + bl ov23_02255B14 + cmp r0, #0 + beq _022552E8 + ldr r0, _02255448 ; =0x000004DC + add r0, r4, r0 + bl ov23_022562A8 + ldr r2, [sp, #8] + mov r1, #0x24 + mul r1, r2 + add r1, r4, r1 + ldr r1, [r1, #0x70] + cmp r0, r1 + beq _022552FA + ldr r1, _02255448 ; =0x000004DC + add r0, r7, #0 + add r1, r4, r1 + bl ov23_0225628C + ldr r2, _02255448 ; =0x000004DC + ldr r1, [sp, #8] + mov r0, #0x24 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x70] + mov r1, #8 + add r2, r4, r2 + bl ov23_0225623C + b _022552FA +_022552E8: + ldr r1, _02255448 ; =0x000004DC + add r0, r7, #0 + add r1, r4, r1 + bl ov23_0225628C + ldr r0, _02255448 ; =0x000004DC + add r0, r4, r0 + bl ov23_02256228 +_022552FA: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02255332 + ldr r0, _0225544C ; =0x000004FC + ldr r0, [r4, r0] + ldr r0, [r0, #0x64] + cmp r0, #0x20 + blt _0225530E + bl sub_02022974 +_0225530E: + ldr r0, _0225544C ; =0x000004FC + ldr r0, [r4, r0] + ldr r0, [r0, #0x68] + cmp r0, #0x20 + blt _0225531C + bl sub_02022974 +_0225531C: + ldr r0, _0225544C ; =0x000004FC + add r2, r4, #0 + ldr r1, [r4, r0] + add r2, #0x5c + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x68] + add r3, sp, #4 + bl ov23_02255B14 + cmp r0, #0 + bne _02255334 +_02255332: + b _02255576 +_02255334: + ldr r1, [sp, #4] + cmp r1, #0 + beq _02255430 + mov r0, #0x24 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x74] + bl ov23_0224D3BC + ldr r1, [sp, #4] + mov r0, #0x24 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x74] + cmp r0, #6 + bne _022553C2 + ldr r0, _02255454 ; =0x00000523 + ldrb r1, [r4, r0] + cmp r1, #0x10 + bne _02255372 + mov r0, #0xf + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #4 + str r0, [r4, #4] + b _02255576 +_02255372: + sub r0, r0, #1 + ldrb r0, [r4, r0] + sub r0, r0, #1 + cmp r0, r1 + bge _02255392 + mov r0, #0x12 + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #4 + str r0, [r4, #4] + b _02255576 +_02255392: + mov r0, #0x19 + lsl r0, r0, #6 + bl sub_02005748 + mov r0, #0xe + bl ov23_0224D39C + str r0, [r4, #8] + ldr r0, _02255458 ; =0x00000522 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _022553AE + bl sub_02022974 +_022553AE: + ldr r0, _02255458 ; =0x00000522 + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + mov r1, #0 + sub r0, r0, #2 + strb r1, [r4, r0] + mov r0, #2 + str r0, [r4, #4] + b _02255404 +_022553C2: + mov r0, #5 + lsl r0, r0, #8 + ldr r0, [r4, r0] + ldr r0, [r0, #0xc] + bl sub_020298B0 + add r5, r0, #0 + ldr r0, _0225545C ; =0x000005EB + bl sub_02005748 + ldr r1, [sp, #4] + add r0, r5, #0 + bl sub_02028B20 + mov r0, #0xd + bl ov23_0224D39C + str r0, [r4, #8] + ldr r0, _02255460 ; =0x00000521 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _022553F2 + bl sub_02022974 +_022553F2: + ldr r0, _02255460 ; =0x00000521 + ldrb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, r0] + mov r1, #0 + sub r0, r0, #1 + strb r1, [r4, r0] + mov r0, #3 + str r0, [r4, #4] +_02255404: + ldr r2, [sp, #4] + mov r1, #0x24 + mul r1, r2 + add r1, r4, r1 + ldr r1, [r1, #0x70] + add r0, r7, #0 + bl ov23_02254A94 + add r1, r4, #0 + ldr r0, [sp, #4] + add r1, #0x5c + bl ov23_02255BF4 + ldr r0, _0225544C ; =0x000004FC + ldr r0, [r4, r0] + bl ov23_02255F20 + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + b _02255576 +_02255430: + mov r0, #0x16 + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #4 + str r0, [r4, #4] + b _02255576 + nop +_02255448: .word 0x000004DC +_0225544C: .word 0x000004FC +_02255450: .word 0x021BF67C +_02255454: .word 0x00000523 +_02255458: .word 0x00000522 +_0225545C: .word 0x000005EB +_02255460: .word 0x00000521 +_02255464: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _02255474 + b _02255576 +_02255474: + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02255576 + bl ov23_0224D3B0 + ldr r0, _0225557C ; =0x00000522 + ldrb r1, [r4, r0] + add r0, r0, #1 + ldrb r0, [r4, r0] + sub r5, r1, r0 + bpl _02255496 + bl sub_02022974 +_02255496: + cmp r5, #0 + bne _022554A8 + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022554A8: + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #5 + str r0, [r4, #4] + b _02255576 +_022554B6: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255576 + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02255576 + bl ov23_0224D3B0 + mov r0, #0 + str r0, [r4, #4] + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022554E0: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255576 + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02255576 + bl ov23_0224D3B0 + mov r0, #1 + str r0, [r4, #4] + b _02255576 +_02255506: + mov r1, #0x52 + lsl r1, r1, #4 + ldrb r2, [r4, r1] + add r0, r2, #1 + strb r0, [r4, r1] + cmp r2, #0xa + blo _02255576 + add r0, r1, #2 + ldrb r2, [r4, r0] + add r0, r1, #3 + ldrb r0, [r4, r0] + mov r1, #0 + sub r5, r2, r0 + add r0, r5, #0 + bl ov23_0224D3D0 + cmp r5, #1 + bne _02255532 + mov r0, #0x11 + bl ov23_0224D39C + b _02255538 +_02255532: + mov r0, #0x19 + bl ov23_0224D39C +_02255538: + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #6 + str r0, [r4, #4] + b _02255576 +_02255548: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255576 + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02255576 + bl ov23_0224D3B0 + mov r0, #3 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255576: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225557C: .word 0x00000522 + thumb_func_end ov23_02255100 + + thumb_func_start ov23_02255580 +ov23_02255580: ; 0x02255580 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_02050A60 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r5, r0, #0 + ldr r0, [r5, #4] + cmp r0, #0 + beq _022555A6 + cmp r0, #1 + beq _022555E6 + cmp r0, #2 + bne _022555A4 + b _02255814 +_022555A4: + b _02255838 +_022555A6: + ldr r0, _02255840 ; =0x000004DC + add r0, r5, r0 + bl ov23_02256228 + ldr r0, _02255844 ; =0x000004FC + ldr r0, [r5, r0] + bl ov23_02255EFC + ldr r0, _02255844 ; =0x000004FC + add r2, r5, #0 + ldr r1, [r5, r0] + add r2, #0x5c + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x68] + add r3, sp, #0xc + bl ov23_02255B14 + cmp r0, #0 + beq _022555E0 + ldr r1, [sp, #0xc] + mov r0, #0x24 + mul r0, r1 + add r0, r5, r0 + ldr r2, _02255840 ; =0x000004DC + ldr r0, [r0, #0x70] + mov r1, #8 + add r2, r5, r2 + bl ov23_0225623C +_022555E0: + mov r0, #1 + str r0, [r5, #4] + b _02255838 +_022555E6: + ldr r1, _02255840 ; =0x000004DC + mov r0, #1 + str r0, [sp] + add r0, r7, #0 + add r1, r5, r1 + bl ov23_0225624C + add r0, r5, #0 + add r1, r7, #0 + add r2, sp, #0x10 + bl ov23_02256174 + ldr r1, _02255844 ; =0x000004FC + cmp r0, #0 + ldr r2, [r5, r1] + ldr r2, [r2, #0x64] + str r2, [sp, #0x14] + ldr r2, [r5, r1] + ldr r2, [r2, #0x64] + str r2, [sp, #0x1c] + ldr r2, [r5, r1] + ldr r2, [r2, #0x68] + str r2, [sp, #0x18] + ldr r2, [r5, r1] + ldr r2, [r2, #0x68] + str r2, [sp, #0x20] + ldr r2, [r5, r1] + ldr r6, [r2, #0x58] + ldr r4, [r2, #0x60] + bne _022556E8 + ldr r0, _02255848 ; =0x021BF67C + mov r2, #0x20 + ldr r0, [r0, #0x4c] + tst r2, r0 + beq _02255648 + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + sub r6, r6, r0 + ldr r0, [sp, #0x14] + sub r0, r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + sub r0, r0, #1 + str r0, [sp, #0x1c] + b _022556B2 +_02255648: + mov r2, #0x10 + tst r2, r0 + beq _0225566A + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + add r6, r6, r0 + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + b _022556B2 +_0225566A: + mov r2, #0x40 + tst r2, r0 + beq _0225568C + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + sub r4, r4, r0 + ldr r0, [sp, #0x18] + sub r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + sub r0, r0, #1 + str r0, [sp, #0x20] + b _022556B2 +_0225568C: + mov r2, #0x80 + tst r0, r2 + beq _022556AE + add r1, #0xe9 + add r0, r1, #0 + bl sub_02005748 + mov r0, #1 + lsl r0, r0, #0x10 + add r4, r4, r0 + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + b _022556B2 +_022556AE: + mov r0, #0 + str r0, [sp] +_022556B2: + ldr r0, _02255848 ; =0x021BF67C + mov r1, #1 + ldr r0, [r0, #0x48] + add r2, r0, #0 + tst r2, r1 + beq _022556C2 + str r1, [sp, #0x10] + b _022556E8 +_022556C2: + mov r1, #2 + tst r0, r1 + beq _022556E8 + ldr r0, _02255844 ; =0x000004FC + ldr r0, [r5, r0] + bl ov23_02255F20 + ldr r1, _02255840 ; =0x000004DC + add r0, r7, #0 + add r1, r5, r1 + bl ov23_0225628C + mov r0, #3 + add r1, r5, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022556E8: + ldr r0, [sp] + cmp r0, #0 + beq _0225576A + add r0, sp, #0x14 + bl ov23_02255B58 + cmp r0, #0 + bne _0225576A + ldr r0, _02255844 ; =0x000004FC + add r3, sp, #8 + ldr r1, [r5, r0] + str r6, [r1, #0x58] + ldr r1, [r5, r0] + str r4, [r1, #0x60] + ldr r2, [sp, #0x14] + ldr r1, [r5, r0] + str r2, [r1, #0x64] + ldr r2, [sp, #0x18] + ldr r1, [r5, r0] + str r2, [r1, #0x68] + ldr r1, [r5, r0] + add r2, r5, #0 + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x68] + add r2, #0x5c + bl ov23_02255B14 + cmp r0, #0 + beq _02255758 + ldr r0, _02255840 ; =0x000004DC + add r0, r5, r0 + bl ov23_022562A8 + ldr r2, [sp, #8] + mov r1, #0x24 + mul r1, r2 + add r1, r5, r1 + ldr r1, [r1, #0x70] + cmp r0, r1 + beq _0225576A + ldr r1, _02255840 ; =0x000004DC + add r0, r7, #0 + add r1, r5, r1 + bl ov23_0225628C + ldr r2, _02255840 ; =0x000004DC + ldr r1, [sp, #8] + mov r0, #0x24 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x70] + mov r1, #8 + add r2, r5, r2 + bl ov23_0225623C + b _0225576A +_02255758: + ldr r1, _02255840 ; =0x000004DC + add r0, r7, #0 + add r1, r5, r1 + bl ov23_0225628C + ldr r0, _02255840 ; =0x000004DC + add r0, r5, r0 + bl ov23_02256228 +_0225576A: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02255838 + ldr r0, _02255844 ; =0x000004FC + ldr r0, [r5, r0] + ldr r0, [r0, #0x64] + cmp r0, #0x20 + blt _0225577E + bl sub_02022974 +_0225577E: + ldr r0, _02255844 ; =0x000004FC + ldr r0, [r5, r0] + ldr r0, [r0, #0x68] + cmp r0, #0x20 + blt _0225578C + bl sub_02022974 +_0225578C: + ldr r0, _02255844 ; =0x000004FC + add r2, r5, #0 + ldr r1, [r5, r0] + add r2, #0x5c + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x68] + add r3, sp, #4 + bl ov23_02255B14 + cmp r0, #0 + beq _02255838 + ldr r0, [sp, #4] + cmp r0, #0 + beq _022557FE + mov r1, #0x24 + mul r1, r0 + add r1, r5, r1 + ldr r1, [r1, #0x74] + cmp r1, #6 + bne _022557CA + mov r0, #0x10 + bl ov23_0224D39C + str r0, [r5, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r5, r0] + mov r0, #2 + str r0, [r5, #4] + b _02255838 +_022557CA: + add r1, r5, #0 + bl ov23_02254AA4 + ldr r0, [sp, #4] + add r1, r5, #0 + bl ov23_02255E2C + add r1, r5, #0 + ldr r0, [sp, #4] + add r1, #0x5c + bl ov23_02255BF4 + ldr r0, _0225584C ; =0x000005EB + bl sub_02005748 + ldr r0, _02255844 ; =0x000004FC + ldr r0, [r5, r0] + bl ov23_02255F20 + mov r0, #7 + add r1, r5, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022557FE: + mov r0, #0x17 + bl ov23_0224D39C + str r0, [r5, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r5, r0] + mov r0, #2 + str r0, [r5, #4] + b _02255838 +_02255814: + ldr r0, [r5, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255838 + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r5, r0] + add r1, r2, #1 + strb r1, [r5, r0] + cmp r2, #0x1e + blo _02255838 + bl ov23_0224D3B0 + mov r0, #1 + str r0, [r5, #4] +_02255838: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02255840: .word 0x000004DC +_02255844: .word 0x000004FC +_02255848: .word 0x021BF67C +_0225584C: .word 0x000005EB + thumb_func_end ov23_02255580 + + thumb_func_start ov23_02255850 +ov23_02255850: ; 0x02255850 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_02050A60 + str r0, [sp] + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #3 + bls _0225586C + b _02255A78 +_0225586C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02255878: ; jump table + .short _02255880 - _02255878 - 2 ; case 0 + .short _0225589A - _02255878 - 2 ; case 1 + .short _02255A24 - _02255878 - 2 ; case 2 + .short _02255A4A - _02255878 - 2 ; case 3 +_02255880: + ldr r0, _02255A80 ; =0x000004DC + add r0, r4, r0 + bl ov23_02256228 + ldr r2, _02255A80 ; =0x000004DC + ldr r0, [r4, #0x4c] + mov r1, #4 + add r2, r4, r2 + bl ov23_0225623C + mov r0, #1 + str r0, [r4, #4] + b _02255A78 +_0225589A: + ldr r1, _02255A80 ; =0x000004DC + ldr r0, [sp] + add r1, r4, r1 + bl ov23_0225624C + ldr r1, [sp] + add r0, r4, #0 + add r2, sp, #4 + bl ov23_022561BC + cmp r0, #0 + beq _022558B4 + b _022559BA +_022558B4: + add r3, r4, #0 + add r3, #0x3c + add r2, sp, #0x14 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, _02255A84 ; =0x021BF67C + mov r1, #0x20 + ldr r0, [r0, #0x4c] + mov r6, #1 + tst r1, r0 + beq _022558E0 + ldr r0, [sp, #0x14] + ldr r7, _02255A88 ; =0xFFFF0000 + sub r0, r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + mov r5, #0 + sub r0, r0, #1 + str r0, [sp, #0x1c] + b _0225592C +_022558E0: + mov r1, #0x10 + add r2, r0, #0 + tst r2, r1 + beq _022558FA + ldr r0, [sp, #0x14] + lsl r7, r1, #0xc + add r0, r0, #1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + mov r5, #0 + add r0, r0, #1 + str r0, [sp, #0x1c] + b _0225592C +_022558FA: + mov r1, #0x40 + tst r1, r0 + beq _02255912 + ldr r0, [sp, #0x18] + mov r7, #0 + sub r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + ldr r5, _02255A88 ; =0xFFFF0000 + sub r0, r0, #1 + str r0, [sp, #0x20] + b _0225592C +_02255912: + mov r1, #0x80 + tst r0, r1 + beq _0225592A + ldr r0, [sp, #0x18] + mov r7, #0 + add r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + lsl r5, r1, #9 + add r0, r0, #1 + str r0, [sp, #0x20] + b _0225592C +_0225592A: + mov r6, #0 +_0225592C: + cmp r6, #0 + beq _02255978 + add r0, sp, #0x14 + bl ov23_02255B58 + cmp r0, #0 + bne _02255978 + add r2, r4, #0 + add r3, sp, #0x14 + add r2, #0x3c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp] + ldr r1, [r4, #0x4c] + add r0, #0xa4 + ldr r0, [r0, #0] + bl ov5_021E18E0 + add r6, r0, #0 + add r0, sp, #8 + add r1, r6, #0 + bl ov5_021E1894 + ldr r0, [sp, #8] + add r1, sp, #8 + add r0, r0, r7 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r0, r0, r5 + str r0, [sp, #0x10] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, r6, #0 + bl ov5_021E18A4 +_02255978: + ldr r0, _02255A84 ; =0x021BF67C + ldr r2, [r0, #0x48] + mov r0, #1 + add r1, r2, #0 + tst r1, r0 + beq _02255988 + str r0, [sp, #4] + b _022559BA +_02255988: + mov r0, #2 + tst r0, r2 + beq _022559BA + add r0, r4, #0 + add r2, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x1c + add r2, #0x5c + bl ov23_02255BB8 + add r0, r4, #0 + bl ov23_02255E8C + ldr r1, _02255A80 ; =0x000004DC + ldr r0, [sp] + add r1, r4, r1 + bl ov23_0225628C + mov r0, #6 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022559BA: + ldr r0, [sp, #4] + cmp r0, #0 + beq _02255A78 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x3c + add r1, #0x5c + bl ov23_02255A98 + cmp r0, #0 + beq _02255A08 + add r0, r4, #0 + add r2, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x3c + add r2, #0x5c + bl ov23_02255BB8 + ldr r0, _02255A8C ; =0x000005FE + bl sub_02005748 + ldr r2, _02255A90 ; =0x000004FC + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x40] + ldr r2, [r4, r2] + bl ov23_02255F04 + ldr r1, _02255A80 ; =0x000004DC + ldr r0, [sp] + add r1, r4, r1 + bl ov23_0225628C + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #3 + str r0, [r4, #4] + b _02255A78 +_02255A08: + ldr r0, _02255A94 ; =0x00000602 + bl sub_02005748 + mov r0, #0xc + bl ov23_0224D39C + str r0, [r4, #8] + mov r0, #0x52 + mov r1, #0 + lsl r0, r0, #4 + strb r1, [r4, r0] + mov r0, #2 + str r0, [r4, #4] + b _02255A78 +_02255A24: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255A78 + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02255A78 + bl ov23_0224D3B0 + mov r0, #1 + str r0, [r4, #4] + b _02255A78 +_02255A4A: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02255A78 + mov r0, #0x52 + lsl r0, r0, #4 + ldrb r2, [r4, r0] + add r1, r2, #1 + strb r1, [r4, r0] + cmp r2, #0x1e + blo _02255A78 + bl ov23_0224D3B0 + mov r0, #6 + add r1, r4, #0 + bl ov23_02255EBC + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02255A78: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02255A80: .word 0x000004DC +_02255A84: .word 0x021BF67C +_02255A88: .word 0xFFFF0000 +_02255A8C: .word 0x000005FE +_02255A90: .word 0x000004FC +_02255A94: .word 0x00000602 + thumb_func_end ov23_02255850 + + thumb_func_start ov23_02255A98 +ov23_02255A98: ; 0x02255A98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r1, #0 + add r7, r0, #0 + mov r6, #0 + add r4, r5, #0 +_02255AA4: + ldr r0, [r5, #0] + cmp r0, #1 + bne _02255ABC + add r0, r4, #4 + add r1, r7, #0 + bl ov23_02255C30 + cmp r0, #0 + beq _02255ABC + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02255ABC: + add r6, r6, #1 + add r5, #0x24 + add r4, #0x24 + cmp r6, #0x20 + blt _02255AA4 + ldr r4, _02255B0C ; =0x02256B78 + add r3, sp, #0x10 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r7, #0 + add r1, r2, #0 + bl ov23_02255C30 + cmp r0, #0 + beq _02255AE6 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02255AE6: + ldr r4, _02255B10 ; =0x02256B68 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r7, #0 + add r1, r2, #0 + bl ov23_02255C30 + cmp r0, #0 + bne _02255B06 + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02255B06: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255B0C: .word 0x02256B78 +_02255B10: .word 0x02256B68 + thumb_func_end ov23_02255A98 + + thumb_func_start ov23_02255B14 +ov23_02255B14: ; 0x02255B14 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r2, #0 + add r7, r0, #0 + str r1, [sp] + str r3, [sp, #4] + mov r6, #0 + add r4, r5, #0 +_02255B24: + ldr r0, [r5, #0] + cmp r0, #1 + bne _02255B42 + ldr r2, [sp] + add r0, r4, #4 + add r1, r7, #0 + bl ov23_02255C58 + cmp r0, #0 + beq _02255B42 + ldr r0, [sp, #4] + add sp, #8 + str r6, [r0, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02255B42: + add r6, r6, #1 + add r5, #0x24 + add r4, #0x24 + cmp r6, #0x20 + blt _02255B24 + ldr r0, [sp, #4] + mov r1, #0x20 + str r1, [r0, #0] + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_02255B14 + + thumb_func_start ov23_02255B58 +ov23_02255B58: ; 0x02255B58 + ldr r1, [r0, #0] + cmp r1, #0xa + blt _02255B74 + ldr r1, [r0, #8] + cmp r1, #0x15 + bgt _02255B74 + ldr r1, [r0, #4] + cmp r1, #0xc + blt _02255B74 + ldr r0, [r0, #0xc] + cmp r0, #0x17 + bgt _02255B74 + mov r0, #0 + bx lr +_02255B74: + mov r0, #1 + bx lr + thumb_func_end ov23_02255B58 + + thumb_func_start ov23_02255B78 +ov23_02255B78: ; 0x02255B78 + push {r4, lr} + add r3, r0, #0 + mov r2, #0 + add r4, r1, #0 +_02255B80: + ldr r0, [r4, #0] + cmp r0, #0 + bne _02255BA8 + mov r0, #0x24 + add r4, r2, #0 + mul r4, r0 + mov r0, #1 + str r0, [r1, r4] + add r0, r1, r4 + add r4, r0, #4 + ldmia r3!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r4!, {r0, r1} + add r0, r2, #0 + pop {r4, pc} +_02255BA8: + add r2, r2, #1 + add r4, #0x24 + cmp r2, #0x20 + blt _02255B80 + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov23_02255B78 + + thumb_func_start ov23_02255BB8 +ov23_02255BB8: ; 0x02255BB8 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r5, r0, #0 + add r4, r2, #0 + cmp r7, #0x20 + blt _02255BC8 + bl sub_02022974 +_02255BC8: + mov r0, #0x24 + add r6, r7, #0 + mul r6, r0 + ldr r0, [r4, r6] + cmp r0, #0 + beq _02255BD8 + bl sub_02022974 +_02255BD8: + mov r0, #1 + str r0, [r4, r6] + add r0, r4, r6 + add r2, r0, #4 + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02255BB8 + + thumb_func_start ov23_02255BF4 +ov23_02255BF4: ; 0x02255BF4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0x20 + blt _02255C02 + bl sub_02022974 +_02255C02: + cmp r5, #0 + bne _02255C0A + bl sub_02022974 +_02255C0A: + mov r0, #0x24 + add r6, r5, #0 + mul r6, r0 + ldr r0, [r4, r6] + cmp r0, #0 + bne _02255C1A + bl sub_02022974 +_02255C1A: + mov r1, #0 + add r0, r4, r6 + str r1, [r0, #0x14] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + str r1, [r0, #0x10] + str r1, [r0, #0x18] + str r1, [r4, r6] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02255BF4 + + thumb_func_start ov23_02255C30 +ov23_02255C30: ; 0x02255C30 + ldr r3, [r0, #0] + ldr r2, [r1, #8] + cmp r3, r2 + bgt _02255C54 + ldr r3, [r1, #0] + ldr r2, [r0, #8] + cmp r3, r2 + bgt _02255C54 + ldr r3, [r0, #4] + ldr r2, [r1, #0xc] + cmp r3, r2 + bgt _02255C54 + ldr r1, [r1, #4] + ldr r0, [r0, #0xc] + cmp r1, r0 + bgt _02255C54 + mov r0, #1 + bx lr +_02255C54: + mov r0, #0 + bx lr + thumb_func_end ov23_02255C30 + + thumb_func_start ov23_02255C58 +ov23_02255C58: ; 0x02255C58 + ldr r3, [r0, #0] + cmp r3, r1 + bgt _02255C74 + ldr r3, [r0, #8] + cmp r1, r3 + bgt _02255C74 + ldr r1, [r0, #4] + cmp r1, r2 + bgt _02255C74 + ldr r0, [r0, #0xc] + cmp r2, r0 + bgt _02255C74 + mov r0, #1 + bx lr +_02255C74: + mov r0, #0 + bx lr + thumb_func_end ov23_02255C58 + + thumb_func_start ov23_02255C78 +ov23_02255C78: ; 0x02255C78 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r0, [r0, #0xc] + add r6, r1, #0 + str r2, [sp, #4] + bl sub_02029894 + ldr r1, _02255D0C ; =0x00000521 + mov r2, #0 + strb r2, [r6, r1] + add r1, r1, #1 + add r7, r0, #0 + strb r2, [r6, r1] + bl sub_02029460 + ldr r1, _02255D10 ; =0x00000523 + strb r0, [r6, r1] + add r0, r7, #0 + bl sub_0202948C + ldr r1, _02255D14 ; =0x00000524 + mov r4, #0 + strb r0, [r6, r1] +_02255CA6: + add r0, r7, #0 + add r1, r4, #0 + bl sub_020293B0 + add r5, r0, #0 + beq _02255D02 + cmp r5, #6 + bne _02255CC2 + ldr r0, _02255D18 ; =0x00000522 + ldrb r0, [r6, r0] + add r1, r0, #1 + ldr r0, _02255D18 ; =0x00000522 + strb r1, [r6, r0] + b _02255CE0 +_02255CC2: + cmp r5, #1 + beq _02255CE0 + cmp r5, #2 + beq _02255CE0 + cmp r5, #3 + beq _02255CE0 + cmp r5, #4 + beq _02255CE0 + cmp r5, #5 + beq _02255CE0 + ldr r0, _02255D0C ; =0x00000521 + ldrb r0, [r6, r0] + add r1, r0, #1 + ldr r0, _02255D0C ; =0x00000521 + strb r1, [r6, r0] +_02255CE0: + add r0, r7, #0 + add r1, r4, #0 + bl sub_020293FC + str r0, [sp, #8] + add r0, r7, #0 + add r1, r4, #0 + bl sub_0202942C + add r3, r0, #0 + ldr r0, [sp, #4] + ldr r2, [sp, #8] + str r0, [sp] + add r0, r4, #0 + add r1, r5, #0 + bl ov23_02255D1C +_02255D02: + add r4, r4, #1 + cmp r4, #0x20 + blt _02255CA6 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255D0C: .word 0x00000521 +_02255D10: .word 0x00000523 +_02255D14: .word 0x00000524 +_02255D18: .word 0x00000522 + thumb_func_end ov23_02255C78 + + thumb_func_start ov23_02255D1C +ov23_02255D1C: ; 0x02255D1C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r0, #0 + mov r0, #0 + add r5, r2, #0 + add r6, r3, #0 + str r0, [sp, #0x14] + add r0, r1, #0 + str r1, [sp] + ldr r4, [sp, #0x38] + str r0, [sp, #0x18] + str r5, [sp, #4] + str r6, [sp, #8] + bl sub_020573FC + str r0, [sp, #0x1c] + ldr r0, [sp] + bl sub_0205740C + str r0, [sp, #0x20] + sub r0, r0, #1 + add r0, r6, r0 + ldr r1, [sp, #0x1c] + str r0, [sp, #0x10] + sub r1, r1, #1 + add r1, r5, r1 + mov r0, #0x24 + add r2, r7, #0 + mul r2, r0 + add r0, r4, r2 + add r5, sp, #4 + add r3, r0, #4 + str r1, [sp, #0xc] + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + mov r0, #1 + str r0, [r4, r2] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov23_02255D1C + + thumb_func_start ov23_02255D78 +ov23_02255D78: ; 0x02255D78 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + add r4, r1, #0 + bl ov5_021E1610 + mov r7, #1 + mov r6, #0 + lsl r7, r7, #0xc +_02255D8E: + ldr r0, [r4, #0] + cmp r0, #0 + beq _02255DD0 + ldr r1, [r4, #0x18] + add r0, r5, #0 + bl ov23_02255E14 + add r2, r0, #0 + ldr r0, [r4, #4] + ldr r3, [r4, #0x1c] + ldr r1, [r4, #0x20] + lsl r0, r0, #0x10 + lsl r3, r3, #0xf + add r0, r0, r3 + str r0, [sp, #8] + ldr r0, [r4, #8] + lsl r1, r1, #0xf + lsl r0, r0, #0x10 + add r0, r0, r1 + str r0, [sp, #0x10] + str r7, [sp, #0xc] + mov r0, #0 + str r0, [sp] + ldr r0, [r5, #0x50] + add r3, sp, #8 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r5, #0x30] + bl ov5_021E19CC + str r0, [r4, #0x14] +_02255DD0: + add r6, r6, #1 + add r4, #0x24 + cmp r6, #0x20 + blt _02255D8E + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov23_02255D78 + + thumb_func_start ov23_02255DDC +ov23_02255DDC: ; 0x02255DDC + push {r3, r4, r5, r6, r7, lr} + ldr r0, [r0, #0xc] + add r5, r1, #0 + bl sub_02029894 + mov r4, #0 + add r6, r0, #0 + add r7, r4, #0 +_02255DEC: + ldr r0, [r5, #0] + cmp r0, #1 + bne _02255DFA + ldr r2, [r5, #0x18] + ldr r3, [r5, #4] + ldr r0, [r5, #8] + b _02255E00 +_02255DFA: + add r2, r7, #0 + add r3, r7, #0 + add r0, r7, #0 +_02255E00: + str r0, [sp] + add r0, r6, #0 + add r1, r4, #0 + bl sub_02029308 + add r4, r4, #1 + add r5, #0x24 + cmp r4, #0x20 + blt _02255DEC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov23_02255DDC + + thumb_func_start ov23_02255E14 +ov23_02255E14: ; 0x02255E14 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bne _02255E20 + bl sub_02022974 +_02255E20: + ldr r0, [r5, #0x30] + add r1, r4, #0 + bl ov5_021EFAE8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov23_02255E14 + + thumb_func_start ov23_02255E2C +ov23_02255E2C: ; 0x02255E2C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r0, #0 + mov r0, #0x24 + add r4, r6, #0 + add r5, r1, #0 + mul r4, r0 + add r0, r5, r4 + ldr r0, [r0, #0x5c] + cmp r0, #0 + bne _02255E46 + bl sub_02022974 +_02255E46: + add r0, r5, #0 + add r0, #0x60 + add r4, r0, r4 + mov r0, #5 + lsl r0, r0, #8 + ldr r0, [r5, r0] + ldr r1, [r4, #0x10] + add r0, #0xa4 + ldr r0, [r0, #0] + bl ov5_021E18E0 + add r1, r0, #0 + add r0, sp, #0 + bl ov5_021E1894 + add r3, sp, #0 + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + str r6, [r5, #0xc] + add r5, #0x1c + ldmia r4!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r5!, {r0, r1} + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov23_02255E2C + + thumb_func_start ov23_02255E8C +ov23_02255E8C: ; 0x02255E8C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0xc] + mov r0, #0x24 + mul r0, r1 + add r0, r4, r0 + ldr r0, [r0, #0x5c] + cmp r0, #0 + bne _02255EA2 + bl sub_02022974 +_02255EA2: + mov r0, #5 + lsl r0, r0, #8 + ldr r0, [r4, r0] + ldr r1, [r4, #0x2c] + add r0, #0xa4 + ldr r0, [r0, #0] + bl ov5_021E18E0 + add r4, #0x10 + add r1, r4, #0 + bl ov5_021E18A4 + pop {r4, pc} + thumb_func_end ov23_02255E8C + + thumb_func_start ov23_02255EBC +ov23_02255EBC: ; 0x02255EBC + str r0, [r1, #0] + mov r0, #0 + str r0, [r1, #4] + bx lr + thumb_func_end ov23_02255EBC + + thumb_func_start ov23_02255EC4 +ov23_02255EC4: ; 0x02255EC4 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + add r0, #0x54 + str r0, [sp] + ldr r1, _02255EEC ; =0x02257724 + mov r0, #4 + add r2, r4, #0 + add r3, sp, #4 + bl sub_0201CA24 + mov r0, #0 + str r0, [r4, #0x58] + str r0, [r4, #0x5c] + str r0, [r4, #0x60] + str r0, [r4, #0x64] + str r0, [r4, #0x68] + str r0, [r4, #0x6c] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_02255EEC: .word 0x02257724 + thumb_func_end ov23_02255EC4 + + thumb_func_start ov23_02255EF0 +ov23_02255EF0: ; 0x02255EF0 + ldr r3, _02255EF8 ; =sub_020181C4 + ldr r0, [r0, #0x54] + bx r3 + nop +_02255EF8: .word sub_020181C4 + thumb_func_end ov23_02255EF0 + + thumb_func_start ov23_02255EFC +ov23_02255EFC: ; 0x02255EFC + mov r1, #1 + str r1, [r0, #0x6c] + bx lr + ; .align 2, 0 + thumb_func_end ov23_02255EFC + + thumb_func_start ov23_02255F04 +ov23_02255F04: ; 0x02255F04 + str r0, [r2, #0x64] + lsl r3, r0, #0x10 + mov r0, #2 + lsl r0, r0, #0xe + str r1, [r2, #0x68] + add r3, r3, r0 + str r3, [r2, #0x58] + lsr r3, r0, #3 + lsl r1, r1, #0x10 + str r3, [r2, #0x5c] + add r0, r1, r0 + str r0, [r2, #0x60] + bx lr + ; .align 2, 0 + thumb_func_end ov23_02255F04 + + thumb_func_start ov23_02255F20 +ov23_02255F20: ; 0x02255F20 + mov r1, #0 + str r1, [r0, #0x6c] + bx lr + ; .align 2, 0 + thumb_func_end ov23_02255F20 + + thumb_func_start ov23_02255F28 +ov23_02255F28: ; 0x02255F28 + ldr r3, _02255F3C ; =0x0000FFFF + cmp r0, r3 + beq _02255F30 + str r0, [r2, #0] +_02255F30: + ldr r0, _02255F3C ; =0x0000FFFF + cmp r1, r0 + beq _02255F38 + str r1, [r2, #4] +_02255F38: + bx lr + nop +_02255F3C: .word 0x0000FFFF + thumb_func_end ov23_02255F28 + + thumb_func_start ov23_02255F40 +ov23_02255F40: ; 0x02255F40 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r1, #0 + str r0, [sp] + add r0, #0x8c + ldr r1, _02255FFC ; =0x021BF6BC + ldr r6, [r0, #0] + ldrh r0, [r1, #0x1c] + ldrh r1, [r1, #0x1e] + add r4, r2, #0 + bl ov23_02255F28 + ldr r1, [r4, #0] + ldr r2, [r4, #4] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #8 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + add r3, r6, #0 + bl ov5_021EAFA4 + ldr r1, [sp, #8] + mov r3, #0x1b + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + asr r0, r0, #0x10 + ldr r1, [sp, #0x10] + str r0, [sp, #4] + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + asr r7, r0, #0x10 + ldr r0, [sp, #4] + ldr r1, [sp, #4] + lsr r0, r0, #0x1f + lsl r1, r1, #0x1b + sub r1, r1, r0 + ror r1, r3 + add r2, r0, r1 + lsr r1, r7, #0x1f + lsl r0, r7, #0x1b + sub r0, r0, r1 + ror r0, r3 + ldr r6, [r5, #0x18] + ldr r4, [r5, #0x1c] + add r0, r1, r0 + sub r1, r6, #1 + add r1, r2, r1 + str r1, [sp, #0x1c] + sub r1, r4, #1 + str r0, [sp, #0x18] + add r0, r0, r1 + str r0, [sp, #0x20] + add r0, sp, #0x14 + str r2, [sp, #0x14] + bl ov23_02255B58 + cmp r0, #0 + bne _02255FF6 + add r3, sp, #0x14 + add r2, r5, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp, #4] + lsl r1, r7, #0x10 + lsl r2, r0, #0x10 + lsl r0, r6, #0xf + str r2, [sp, #8] + add r0, r2, r0 + str r0, [sp, #8] + lsl r0, r4, #0xf + str r1, [sp, #0x10] + add r0, r1, r0 + str r0, [sp, #0x10] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, [sp] + ldr r1, [r5, #0x10] + add r0, #0xa4 + str r0, [sp] + ldr r0, [r0, #0] + bl ov5_021E18E0 + add r1, sp, #8 + bl ov5_021E18A4 +_02255FF6: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02255FFC: .word 0x021BF6BC + thumb_func_end ov23_02255F40 + + thumb_func_start ov23_02256000 +ov23_02256000: ; 0x02256000 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r4, r1, #0 + add r0, #0x8c + ldr r1, _02256094 ; =0x021BF6BC + ldr r5, [r0, #0] + ldrh r0, [r1, #0x1c] + add r6, r2, #0 + ldrh r1, [r1, #0x1e] + add r2, r4, #0 + bl ov23_02255F28 + ldr r1, [r4, #0] + ldr r2, [r4, #4] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + add r0, sp, #0 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + add r3, r5, #0 + bl ov5_021EAFA4 + ldr r1, [sp] + mov r2, #0x1b + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + ldr r1, [sp, #8] + asr r4, r0, #0x10 + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + asr r5, r0, #0x10 + lsr r1, r4, #0x1f + lsl r0, r4, #0x1b + sub r0, r0, r1 + ror r0, r2 + add r0, r1, r0 + lsr r3, r5, #0x1f + lsl r1, r5, #0x1b + sub r1, r1, r3 + ror r1, r2 + add r1, r3, r1 + str r0, [sp, #0xc] + str r0, [sp, #0x14] + add r0, sp, #0xc + str r1, [sp, #0x10] + str r1, [sp, #0x18] + bl ov23_02255B58 + cmp r0, #0 + bne _0225608E + mov r0, #2 + lsl r1, r4, #0x10 + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp] + lsl r1, r5, #0x10 + add r1, r1, r0 + lsr r0, r0, #3 + add r2, r6, #0 + add r3, sp, #0 + str r1, [sp, #8] + str r0, [sp, #4] + ldmia r3!, {r0, r1} + add r2, #0x58 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + str r4, [r6, #0x64] + str r5, [r6, #0x68] +_0225608E: + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + nop +_02256094: .word 0x021BF6BC + thumb_func_end ov23_02256000 + + thumb_func_start ov23_02256098 +ov23_02256098: ; 0x02256098 + push {r3, r4, r5, lr} + add r3, r0, #0 + mov r0, #0 + ldr r4, _022560F8 ; =0x021BF6BC + str r0, [r2, #0] + ldrh r5, [r4, #0x20] + cmp r5, #0 + beq _022560C8 + ldr r0, _022560FC ; =0x021BF67C + ldr r0, [r0, #0x44] + cmp r0, #0 + bne _022560C4 + ldr r2, _02256100 ; =0x000004F8 + mov r0, #1 + str r0, [r3, r2] + add r0, r1, #0 + add r1, r3, #0 + sub r2, #8 + add r1, #0x3c + add r2, r3, r2 + bl ov23_02255F40 +_022560C4: + mov r0, #1 + pop {r3, r4, r5, pc} +_022560C8: + ldrh r4, [r4, #0x22] + cmp r4, #0 + beq _022560E8 + ldr r2, _02256100 ; =0x000004F8 + ldr r0, [r3, r2] + cmp r0, #0 + beq _022560E4 + add r0, r1, #0 + add r1, r3, #0 + sub r2, #8 + add r1, #0x3c + add r2, r3, r2 + bl ov23_02255F40 +_022560E4: + mov r0, #1 + pop {r3, r4, r5, pc} +_022560E8: + ldr r1, _02256100 ; =0x000004F8 + ldr r4, [r3, r1] + cmp r4, #0 + beq _022560F6 + str r0, [r3, r1] + mov r1, #1 + str r1, [r2, #0] +_022560F6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022560F8: .word 0x021BF6BC +_022560FC: .word 0x021BF67C +_02256100: .word 0x000004F8 + thumb_func_end ov23_02256098 + + thumb_func_start ov23_02256104 +ov23_02256104: ; 0x02256104 + push {r3, r4, r5, lr} + add r3, r0, #0 + mov r0, #0 + ldr r4, _02256168 ; =0x021BF6BC + str r0, [r2, #0] + ldrh r5, [r4, #0x20] + cmp r5, #0 + beq _02256136 + ldr r0, _0225616C ; =0x021BF67C + ldr r0, [r0, #0x44] + cmp r0, #0 + bne _02256132 + ldr r2, _02256170 ; =0x000004F8 + mov r0, #1 + str r0, [r3, r2] + add r0, r1, #0 + add r1, r2, #0 + add r2, r2, #4 + sub r1, #8 + ldr r2, [r3, r2] + add r1, r3, r1 + bl ov23_02256000 +_02256132: + mov r0, #1 + pop {r3, r4, r5, pc} +_02256136: + ldrh r4, [r4, #0x22] + cmp r4, #0 + beq _02256158 + ldr r2, _02256170 ; =0x000004F8 + ldr r0, [r3, r2] + cmp r0, #0 + beq _02256154 + add r0, r1, #0 + add r1, r2, #0 + add r2, r2, #4 + sub r1, #8 + ldr r2, [r3, r2] + add r1, r3, r1 + bl ov23_02256000 +_02256154: + mov r0, #1 + pop {r3, r4, r5, pc} +_02256158: + ldr r1, _02256170 ; =0x000004F8 + ldr r4, [r3, r1] + cmp r4, #0 + beq _02256166 + str r0, [r3, r1] + mov r1, #1 + str r1, [r2, #0] +_02256166: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256168: .word 0x021BF6BC +_0225616C: .word 0x021BF67C +_02256170: .word 0x000004F8 + thumb_func_end ov23_02256104 + + thumb_func_start ov23_02256174 +ov23_02256174: ; 0x02256174 + push {r4, lr} + add r3, r0, #0 + mov r0, #0 + ldr r4, _022561B0 ; =0x021BF6BC + str r0, [r2, #0] + ldrh r4, [r4, #0x20] + cmp r4, #0 + beq _022561A8 + ldr r0, _022561B4 ; =0x021BF67C + ldr r0, [r0, #0x44] + cmp r0, #0 + bne _022561A4 + ldr r4, _022561B8 ; =0x000004F8 + mov r0, #1 + str r0, [r3, r4] + str r0, [r2, #0] + add r0, r1, #0 + add r1, r4, #0 + add r2, r4, #4 + sub r1, #8 + ldr r2, [r3, r2] + add r1, r3, r1 + bl ov23_02256000 +_022561A4: + mov r0, #1 + pop {r4, pc} +_022561A8: + ldr r1, _022561B8 ; =0x000004F8 + str r0, [r3, r1] + pop {r4, pc} + nop +_022561B0: .word 0x021BF6BC +_022561B4: .word 0x021BF67C +_022561B8: .word 0x000004F8 + thumb_func_end ov23_02256174 + + thumb_func_start ov23_022561BC +ov23_022561BC: ; 0x022561BC + push {r3, r4, r5, lr} + add r3, r0, #0 + mov r0, #0 + ldr r4, _0225621C ; =0x021BF6BC + str r0, [r2, #0] + ldrh r5, [r4, #0x20] + cmp r5, #0 + beq _022561EC + ldr r0, _02256220 ; =0x021BF67C + ldr r0, [r0, #0x44] + cmp r0, #0 + bne _022561E8 + ldr r2, _02256224 ; =0x000004F8 + mov r0, #1 + str r0, [r3, r2] + add r0, r1, #0 + add r1, r3, #0 + sub r2, #8 + add r1, #0x3c + add r2, r3, r2 + bl ov23_02255F40 +_022561E8: + mov r0, #1 + pop {r3, r4, r5, pc} +_022561EC: + ldrh r4, [r4, #0x22] + cmp r4, #0 + beq _0225620C + ldr r2, _02256224 ; =0x000004F8 + ldr r0, [r3, r2] + cmp r0, #0 + beq _02256208 + add r0, r1, #0 + add r1, r3, #0 + sub r2, #8 + add r1, #0x3c + add r2, r3, r2 + bl ov23_02255F40 +_02256208: + mov r0, #1 + pop {r3, r4, r5, pc} +_0225620C: + ldr r1, _02256224 ; =0x000004F8 + ldr r4, [r3, r1] + cmp r4, #0 + beq _0225621A + str r0, [r3, r1] + mov r1, #1 + str r1, [r2, #0] +_0225621A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225621C: .word 0x021BF6BC +_02256220: .word 0x021BF67C +_02256224: .word 0x000004F8 + thumb_func_end ov23_022561BC + + thumb_func_start ov23_02256228 +ov23_02256228: ; 0x02256228 + mov r2, #0 + str r2, [r0, #4] + ldr r1, _02256238 ; =0x0000FFFF + str r2, [r0, #8] + str r1, [r0, #0] + str r2, [r0, #0xc] + str r2, [r0, #0x10] + bx lr + ; .align 2, 0 +_02256238: .word 0x0000FFFF + thumb_func_end ov23_02256228 + + thumb_func_start ov23_0225623C +ov23_0225623C: ; 0x0225623C + mov r3, #0 + str r3, [r2, #4] + str r1, [r2, #8] + str r0, [r2, #0] + str r3, [r2, #0xc] + mov r0, #1 + str r0, [r2, #0x10] + bx lr + thumb_func_end ov23_0225623C + + thumb_func_start ov23_0225624C +ov23_0225624C: ; 0x0225624C + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0x10] + cmp r1, #0 + beq _02256288 + ldr r1, [r4, #4] + add r2, r1, #1 + str r2, [r4, #4] + ldr r1, [r4, #8] + cmp r2, r1 + blt _02256288 + mov r1, #0 + str r1, [r4, #4] + ldr r1, [r4, #0xc] + add r0, #0xa4 + add r1, r1, #1 + lsr r3, r1, #0x1f + lsl r2, r1, #0x1f + sub r2, r2, r3 + mov r1, #0x1f + ror r2, r1 + add r1, r3, r2 + str r1, [r4, #0xc] + ldr r0, [r0, #0] + ldr r1, [r4, #0] + bl ov5_021E18E0 + ldr r1, [r4, #0xc] + bl ov5_021E18B4 +_02256288: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov23_0225624C + + thumb_func_start ov23_0225628C +ov23_0225628C: ; 0x0225628C + push {r3, lr} + ldr r2, [r1, #0x10] + cmp r2, #0 + beq _022562A4 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov5_021E18E0 + mov r1, #0 + bl ov5_021E18B4 +_022562A4: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov23_0225628C + + thumb_func_start ov23_022562A8 +ov23_022562A8: ; 0x022562A8 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov23_022562A8 + + thumb_func_start ov23_022562AC +ov23_022562AC: ; 0x022562AC + ldr r3, _022562B4 ; =ov23_02255EC4 + add r0, r2, #0 + bx r3 + nop +_022562B4: .word ov23_02255EC4 + thumb_func_end ov23_022562AC + + thumb_func_start ov23_022562B8 +ov23_022562B8: ; 0x022562B8 + bx lr + ; .align 2, 0 + thumb_func_end ov23_022562B8 + + thumb_func_start ov23_022562BC +ov23_022562BC: ; 0x022562BC + ldr r3, _022562C4 ; =ov23_02255EF0 + add r0, r2, #0 + bx r3 + nop +_022562C4: .word ov23_02255EF0 + thumb_func_end ov23_022562BC + + thumb_func_start ov23_022562C8 +ov23_022562C8: ; 0x022562C8 + push {r3, r4, r5, lr} + sub sp, #0x30 + ldr r0, [r2, #0x6c] + cmp r0, #0 + beq _022562FE + ldr r5, _02256304 ; =0x02256BA0 + add r4, sp, #0xc + mov r3, #4 +_022562D8: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _022562D8 + ldr r0, [r5, #0] + ldr r5, _02256308 ; =0x02256B5C + str r0, [r4, #0] + add r4, sp, #0 + ldmia r5!, {r0, r1} + add r3, r4, #0 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r4, #0] + add r0, r2, #0 + add r2, #0x58 + add r1, r2, #0 + add r2, sp, #0xc + bl sub_0201CA74 +_022562FE: + add sp, #0x30 + pop {r3, r4, r5, pc} + nop +_02256304: .word 0x02256BA0 +_02256308: .word 0x02256B5C + thumb_func_end ov23_022562C8 + + .rodata + + + .global Unk_ov23_02256B5C +Unk_ov23_02256B5C: ; 0x02256B5C + .incbin "incbin/overlay23_rodata.bin", 0x850, 0x85C - 0x850 + + .global Unk_ov23_02256B68 +Unk_ov23_02256B68: ; 0x02256B68 + .incbin "incbin/overlay23_rodata.bin", 0x85C, 0x86C - 0x85C + + .global Unk_ov23_02256B78 +Unk_ov23_02256B78: ; 0x02256B78 + .incbin "incbin/overlay23_rodata.bin", 0x86C, 0x87C - 0x86C + + .global Unk_ov23_02256B88 +Unk_ov23_02256B88: ; 0x02256B88 + .incbin "incbin/overlay23_rodata.bin", 0x87C, 0x894 - 0x87C + + .global Unk_ov23_02256BA0 +Unk_ov23_02256BA0: ; 0x02256BA0 + .incbin "incbin/overlay23_rodata.bin", 0x894, 0x24 + + + .data + + + .global Unk_ov23_02257724 +Unk_ov23_02257724: ; 0x02257724 + .incbin "incbin/overlay23_data.bin", 0xB44, 0x17 + diff --git a/asm/overlay24.s b/asm/ov24_02253CE0.s similarity index 94% rename from asm/overlay24.s rename to asm/ov24_02253CE0.s index 2c614f80c..e10b27a34 100644 --- a/asm/overlay24.s +++ b/asm/ov24_02253CE0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov24_02253CE0 ov24_02253CE0: ; 0x02253CE0 push {r3, r4, r5, lr} @@ -105,12 +108,11 @@ ov24_02253DB4: ; 0x02253DB4 mov r0, #1 bx lr thumb_func_end ov24_02253DB4 - ; 0x02253DB8 - .rodata - .incbin "incbin/overlay24_rodata.bin" - .bss - .space 0x0 + .global Unk_ov24_02253DB8 +Unk_ov24_02253DB8: ; 0x02253DB8 + .incbin "incbin/overlay24_rodata.bin", 0x0, 0x1C + diff --git a/asm/ov25_02253CE0.s b/asm/ov25_02253CE0.s new file mode 100644 index 000000000..30bb6e0c2 --- /dev/null +++ b/asm/ov25_02253CE0.s @@ -0,0 +1,1287 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov25_02253CE0 +ov25_02253CE0: ; 0x02253CE0 + ldr r3, _02253CE4 ; =sub_0203D158 + bx r3 + ; .align 2, 0 +_02253CE4: .word sub_0203D158 + thumb_func_end ov25_02253CE0 + + thumb_func_start ov25_02253CE8 +ov25_02253CE8: ; 0x02253CE8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #3 + str r2, [sp] + mov r1, #7 + lsl r2, r0, #0xe + add r7, r3, #0 + bl sub_02017FC8 + mov r0, #3 + mov r1, #8 + lsl r2, r0, #0xe + bl sub_02017FC8 + mov r0, #7 + mov r1, #0x64 + bl sub_02018144 + add r4, r0, #0 + beq _02253D52 + str r4, [r5, #0] + ldr r0, [sp] + str r6, [r4, #0x5c] + str r0, [r4, #0x54] + bl sub_02056B24 + str r0, [r4, #0x58] + ldr r0, [sp, #0x18] + str r7, [r4, #0x4c] + str r0, [r4, #0x50] + add r0, r4, #0 + bl ov25_02253DDC + cmp r0, #0 + beq _02253D52 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + ldr r0, _02253D54 ; =ov25_02253E94 + str r5, [r4, #0x34] + add r1, r4, #0 + mov r2, #4 + bl sub_0200D9E8 + str r0, [r4, #0x38] + ldr r0, _02253D58 ; =ov25_02253E40 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 +_02253D52: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02253D54: .word ov25_02253E94 +_02253D58: .word ov25_02253E40 + thumb_func_end ov25_02253CE8 + + thumb_func_start ov25_02253D5C +ov25_02253D5C: ; 0x02253D5C + push {r3, lr} + ldrb r1, [r0] + cmp r1, #3 + beq _02253D6E + cmp r1, #4 + beq _02253D6E + mov r1, #3 + bl ov25_02253E9C +_02253D6E: + pop {r3, pc} + thumb_func_end ov25_02253D5C + + thumb_func_start ov25_02253D70 +ov25_02253D70: ; 0x02253D70 + cmp r0, #0 + bne _02253D78 + mov r0, #1 + bx lr +_02253D78: + mov r0, #0 + bx lr + thumb_func_end ov25_02253D70 + + thumb_func_start ov25_02253D7C +ov25_02253D7C: ; 0x02253D7C + push {r4, lr} + add r4, r0, #0 + cmp r1, #5 + bhi _02253DCE + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02253D90: ; jump table + .short _02253DCE - _02253D90 - 2 ; case 0 + .short _02253D9C - _02253D90 - 2 ; case 1 + .short _02253DCE - _02253D90 - 2 ; case 2 + .short _02253DCE - _02253D90 - 2 ; case 3 + .short _02253DBE - _02253D90 - 2 ; case 4 + .short _02253DA2 - _02253D90 - 2 ; case 5 +_02253D9C: + mov r0, #1 + strb r0, [r4, #4] + pop {r4, pc} +_02253DA2: + ldr r0, [r4, #0x58] + bl sub_020568C8 + add r1, r0, #1 + ldr r0, _02253DD0 ; =0x0001869F + cmp r1, r0 + bls _02253DB2 + mov r1, #0 +_02253DB2: + ldr r0, [r4, #0x58] + bl sub_020568CC + mov r0, #1 + strb r0, [r4, #7] + pop {r4, pc} +_02253DBE: + ldrb r0, [r4, #2] + cmp r0, #2 + bne _02253DCE + ldr r1, [r4, #0x44] + cmp r1, #0 + beq _02253DCE + ldr r0, [r4, #0x48] + blx r1 +_02253DCE: + pop {r4, pc} + ; .align 2, 0 +_02253DD0: .word 0x0001869F + thumb_func_end ov25_02253D7C + + thumb_func_start ov25_02253DD4 +ov25_02253DD4: ; 0x02253DD4 + ldrb r0, [r0, #3] + bx lr + thumb_func_end ov25_02253DD4 + + thumb_func_start ov25_02253DD8 +ov25_02253DD8: ; 0x02253DD8 + ldr r0, [r0, #0x14] + bx lr + thumb_func_end ov25_02253DD8 + + thumb_func_start ov25_02253DDC +ov25_02253DDC: ; 0x02253DDC + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r2, [r4, #0x50] + add r0, #0x1c + add r1, #0x20 + add r3, r4, #0 + bl ov25_02254560 + cmp r0, #0 + beq _02253E1A + mov r1, #0 + strb r1, [r4] + strb r1, [r4, #1] + strb r1, [r4, #3] + strb r1, [r4, #4] + strb r1, [r4, #7] + strb r1, [r4, #5] + strb r1, [r4, #6] + sub r0, r1, #1 + str r0, [r4, #0x14] + strb r1, [r4, #2] + str r1, [r4, #8] + add r0, r4, #0 + str r1, [r4, #0x60] + bl ov25_02254284 + cmp r0, #0 + beq _02253E1A + mov r0, #1 + pop {r4, pc} +_02253E1A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_02253DDC + + thumb_func_start ov25_02253E20 +ov25_02253E20: ; 0x02253E20 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x38] + bl sub_0200DA58 + add r0, r4, #0 + bl ov25_022542C8 + add r0, r4, #0 + bl ov25_022541BC + ldr r0, [r4, #0x1c] + bl ov25_02254754 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_02253E20 + + thumb_func_start ov25_02253E40 +ov25_02253E40: ; 0x02253E40 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #4 + bhs _02253E64 + cmp r0, #0 + beq _02253E56 + add r0, r4, #0 + bl ov25_022542D4 +_02253E56: + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02253E90 ; =0x02255E6C + ldr r1, [r1, r2] + blx r1 + pop {r3, r4, r5, pc} +_02253E64: + beq _02253E6A + bl sub_02022974 +_02253E6A: + ldr r0, [r4, #0x34] + mov r1, #0 + str r1, [r0, #0] + add r0, r4, #0 + bl ov25_02253E20 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #7 + bl sub_0201807C + mov r0, #8 + bl sub_0201807C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02253E90: .word 0x02255E6C + thumb_func_end ov25_02253E40 + + thumb_func_start ov25_02253E94 +ov25_02253E94: ; 0x02253E94 + mov r0, #0 + strb r0, [r1, #4] + strb r0, [r1, #7] + bx lr + thumb_func_end ov25_02253E94 + + thumb_func_start ov25_02253E9C +ov25_02253E9C: ; 0x02253E9C + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + thumb_func_end ov25_02253E9C + + thumb_func_start ov25_02253EA4 +ov25_02253EA4: ; 0x02253EA4 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #3 + bhi _02253F28 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02253EBA: ; jump table + .short _02253EC2 - _02253EBA - 2 ; case 0 + .short _02253ED2 - _02253EBA - 2 ; case 1 + .short _02253EFE - _02253EBA - 2 ; case 2 + .short _02253F14 - _02253EBA - 2 ; case 3 +_02253EC2: + ldr r0, [r4, #0x1c] + mov r1, #0 + bl ov25_022547D0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + pop {r3, r4, r5, pc} +_02253ED2: + ldr r0, [r4, #0x1c] + mov r1, #0 + bl ov25_022547F4 + cmp r0, #0 + beq _02253F28 + ldr r0, [r4, #0x58] + bl sub_02056830 + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov25_02254170 + add r0, r4, #0 + add r1, r5, #0 + bl ov25_022541D8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + pop {r3, r4, r5, pc} +_02253EFE: + bl ov25_022541FC + cmp r0, #0 + beq _02253F28 + ldr r0, [r4, #0x1c] + mov r1, #1 + bl ov25_022547D0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] +_02253F14: + ldr r0, [r4, #0x1c] + mov r1, #1 + bl ov25_022547F4 + cmp r0, #0 + beq _02253F28 + add r0, r4, #0 + mov r1, #1 + bl ov25_02253E9C +_02253F28: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov25_02253EA4 + + thumb_func_start ov25_02253F2C +ov25_02253F2C: ; 0x02253F2C + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #4 + bhi _02253F60 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02253F42: ; jump table + .short _02253F4C - _02253F42 - 2 ; case 0 + .short _02253F7A - _02253F42 - 2 ; case 1 + .short _02253FCC - _02253F42 - 2 ; case 2 + .short _02254002 - _02253F42 - 2 ; case 3 + .short _0225401E - _02253F42 - 2 ; case 4 +_02253F4C: + bl ov25_0225450C + cmp r0, #0 + beq _02253F56 + b _02254068 +_02253F56: + ldr r0, [r4, #8] + cmp r0, #3 + beq _02253F62 + cmp r0, #5 + beq _02253F62 +_02253F60: + b _02254068 +_02253F62: + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #1 + strb r0, [r4, #5] + ldr r0, [r4, #0x1c] + mov r1, #4 + bl ov25_022547D0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + pop {r4, pc} +_02253F7A: + ldr r0, [r4, #8] + cmp r0, #3 + beq _02253F84 + cmp r0, #5 + bne _02253F88 +_02253F84: + mov r0, #1 + str r0, [r4, #0xc] +_02253F88: + ldr r0, [r4, #0x1c] + bl ov25_02254800 + cmp r0, #0 + beq _02254068 + ldr r0, [r4, #0x60] + cmp r0, #0 + ldr r0, [r4, #0x58] + bne _02253FA0 + bl sub_02056860 + b _02253FA4 +_02253FA0: + bl sub_02056838 +_02253FA4: + str r0, [r4, #0x20] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02253FC2 + ldr r0, [r4, #0x1c] + mov r1, #0xc + bl ov25_022547D0 + mov r0, #0x1e + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #4 + strb r0, [r4, #1] + pop {r4, pc} +_02253FC2: + mov r0, #3 + str r0, [r4, #0x10] + mov r0, #2 + strb r0, [r4, #1] + pop {r4, pc} +_02253FCC: + ldr r1, [r4, #8] + cmp r1, #3 + beq _02253FD6 + cmp r1, #5 + bne _02253FEC +_02253FD6: + ldr r0, [r4, #0x1c] + mov r1, #0xc + bl ov25_022547D0 + mov r0, #0x1e + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #4 + strb r0, [r4, #1] + pop {r4, pc} +_02253FEC: + ldr r1, [r4, #0x10] + cmp r1, #0 + beq _02253FF8 + sub r0, r1, #1 + str r0, [r4, #0x10] + pop {r4, pc} +_02253FF8: + bl ov25_0225420C + mov r0, #3 + strb r0, [r4, #1] + pop {r4, pc} +_02254002: + bl ov25_02254228 + cmp r0, #0 + beq _02254068 + add r0, r4, #0 + bl ov25_022541BC + bl sub_02099D44 + add r0, r4, #0 + mov r1, #2 + bl ov25_02253E9C + pop {r4, pc} +_0225401E: + ldr r0, [r4, #8] + cmp r0, #3 + beq _02254028 + cmp r0, #5 + bne _0225404A +_02254028: + ldr r0, [r4, #0x60] + cmp r0, #0 + ldr r0, [r4, #0x58] + bne _02254036 + bl sub_02056860 + b _0225403A +_02254036: + bl sub_02056838 +_0225403A: + str r0, [r4, #0x20] + mov r0, #0x1e + str r0, [r4, #0x10] + ldr r0, [r4, #0x1c] + mov r1, #0xd + bl ov25_022547D0 + pop {r4, pc} +_0225404A: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02254056 + sub r0, r0, #1 + str r0, [r4, #0x10] + pop {r4, pc} +_02254056: + ldr r0, [r4, #0x1c] + mov r1, #0xe + bl ov25_022547D0 + add r0, r4, #0 + bl ov25_0225420C + mov r0, #3 + strb r0, [r4, #1] +_02254068: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_02253F2C + + thumb_func_start ov25_0225406C +ov25_0225406C: ; 0x0225406C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _02254080 + cmp r1, #1 + beq _022540A4 + cmp r1, #2 + beq _022540BC + pop {r3, r4, r5, pc} +_02254080: + mov r0, #1 + strb r0, [r4, #6] + ldr r0, [r4, #0x58] + bl sub_02056830 + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov25_02254170 + add r0, r4, #0 + add r1, r5, #0 + bl ov25_022541D8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + pop {r3, r4, r5, pc} +_022540A4: + bl ov25_022541FC + cmp r0, #0 + beq _022540D6 + ldr r0, [r4, #0x1c] + mov r1, #2 + bl ov25_022547D0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + pop {r3, r4, r5, pc} +_022540BC: + ldr r0, [r4, #0x1c] + mov r1, #2 + bl ov25_022547F4 + cmp r0, #0 + beq _022540D6 + mov r0, #0 + strb r0, [r4, #5] + strb r0, [r4, #6] + add r0, r4, #0 + mov r1, #1 + bl ov25_02253E9C +_022540D6: + pop {r3, r4, r5, pc} + thumb_func_end ov25_0225406C + + thumb_func_start ov25_022540D8 +ov25_022540D8: ; 0x022540D8 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #3 + bhi _0225416C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022540EE: ; jump table + .short _022540F6 - _022540EE - 2 ; case 0 + .short _02254126 - _022540EE - 2 ; case 1 + .short _0225413A - _022540EE - 2 ; case 2 + .short _02254150 - _022540EE - 2 ; case 3 +_022540F6: + ldrb r1, [r4, #2] + cmp r1, #3 + bhi _0225416C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02254108: ; jump table + .short _02254120 - _02254108 - 2 ; case 0 + .short _02254110 - _02254108 - 2 ; case 1 + .short _02254116 - _02254108 - 2 ; case 2 + .short _02254120 - _02254108 - 2 ; case 3 +_02254110: + mov r0, #1 + strb r0, [r4, #1] + pop {r4, pc} +_02254116: + bl ov25_0225420C + mov r0, #2 + strb r0, [r4, #1] + pop {r4, pc} +_02254120: + mov r0, #2 + strb r0, [r4, #1] + pop {r4, pc} +_02254126: + bl ov25_022541FC + cmp r0, #0 + beq _0225416C + add r0, r4, #0 + bl ov25_0225420C + mov r0, #2 + strb r0, [r4, #1] + pop {r4, pc} +_0225413A: + bl ov25_02254228 + cmp r0, #0 + beq _0225416C + ldr r0, [r4, #0x1c] + mov r1, #0x11 + bl ov25_022547D0 + mov r0, #3 + strb r0, [r4, #1] + pop {r4, pc} +_02254150: + ldr r0, [r4, #0x1c] + bl ov25_02254800 + cmp r0, #0 + beq _0225416C + add r0, r4, #0 + bl ov25_022541BC + bl sub_0201E530 + add r0, r4, #0 + mov r1, #4 + bl ov25_02253E9C +_0225416C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_022540D8 + + thumb_func_start ov25_02254170 +ov25_02254170: ; 0x02254170 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bmi _0225417C + cmp r4, #0x19 + blo _02254180 +_0225417C: + bl sub_02022974 +_02254180: + mov r0, #0 + ldr r1, [r5, #0x14] + mvn r0, r0 + cmp r1, r0 + bne _022541B0 + ldr r2, _022541B4 ; =0x02255E7C + mov r1, #0 +_0225418E: + ldr r0, [r2, #0] + cmp r4, r0 + bne _022541A8 + ldr r0, _022541B8 ; =0x02255E80 + lsl r1, r1, #3 + ldr r6, [r0, r1] + mov r1, #2 + add r0, r6, #0 + bl sub_02006590 + str r4, [r5, #0x14] + str r6, [r5, #0x18] + pop {r4, r5, r6, pc} +_022541A8: + add r1, r1, #1 + add r2, #8 + cmp r1, #0x19 + blo _0225418E +_022541B0: + pop {r4, r5, r6, pc} + nop +_022541B4: .word 0x02255E7C +_022541B8: .word 0x02255E80 + thumb_func_end ov25_02254170 + + thumb_func_start ov25_022541BC +ov25_022541BC: ; 0x022541BC + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + ldr r1, [r4, #0x14] + mvn r0, r0 + cmp r1, r0 + beq _022541D6 + ldr r0, [r4, #0x18] + bl sub_02006514 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x14] +_022541D6: + pop {r4, pc} + thumb_func_end ov25_022541BC + + thumb_func_start ov25_022541D8 +ov25_022541D8: ; 0x022541D8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r0, [r4, #2] + cmp r0, #0 + beq _022541E6 + bl sub_02022974 +_022541E6: + add r0, r4, #0 + ldr r2, [r4, #0x4c] + ldr r3, [r4, #0x14] + ldr r5, [r4, #0x3c] + add r0, #0x24 + add r1, r4, #0 + blx r5 + mov r0, #1 + strb r0, [r4, #2] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov25_022541D8 + + thumb_func_start ov25_022541FC +ov25_022541FC: ; 0x022541FC + ldrb r0, [r0, #2] + cmp r0, #2 + bne _02254206 + mov r0, #1 + bx lr +_02254206: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov25_022541FC + + thumb_func_start ov25_0225420C +ov25_0225420C: ; 0x0225420C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #2] + cmp r0, #2 + beq _0225421A + bl sub_02022974 +_0225421A: + ldr r0, [r4, #0x24] + ldr r1, [r4, #0x40] + blx r1 + mov r0, #3 + strb r0, [r4, #2] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_0225420C + + thumb_func_start ov25_02254228 +ov25_02254228: ; 0x02254228 + ldrb r0, [r0, #2] + cmp r0, #0 + bne _02254232 + mov r0, #1 + bx lr +_02254232: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov25_02254228 + + thumb_func_start ov25_02254238 +ov25_02254238: ; 0x02254238 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02253CE0 + str r5, [r0, #0x3c] + str r4, [r0, #0x40] + mov r1, #0 + str r1, [r0, #0x44] + pop {r3, r4, r5, pc} + thumb_func_end ov25_02254238 + + thumb_func_start ov25_0225424C +ov25_0225424C: ; 0x0225424C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #2] + cmp r0, #1 + beq _0225425A + bl sub_02022974 +_0225425A: + mov r0, #2 + strb r0, [r4, #2] + pop {r4, pc} + thumb_func_end ov25_0225424C + + thumb_func_start ov25_02254260 +ov25_02254260: ; 0x02254260 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #2] + cmp r0, #3 + beq _0225426E + bl sub_02022974 +_0225426E: + mov r0, #0 + strb r0, [r4, #2] + pop {r4, pc} + thumb_func_end ov25_02254260 + + thumb_func_start ov25_02254274 +ov25_02254274: ; 0x02254274 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02253CE0 + str r5, [r0, #0x44] + str r4, [r0, #0x48] + pop {r3, r4, r5, pc} + thumb_func_end ov25_02254274 + + thumb_func_start ov25_02254284 +ov25_02254284: ; 0x02254284 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #7 + str r0, [sp] + ldr r0, _022542C0 ; =0x02255E60 + ldr r2, _022542C4 ; =ov25_022542E4 + mov r1, #3 + add r3, r4, #0 + bl ov25_02255ACC + str r0, [r4, #0x28] + cmp r0, #0 + beq _022542B8 + mov r1, #0 + add r2, r1, #0 + mov r3, #7 + bl ov25_02255C48 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x2c] + str r0, [r4, #0x30] + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_022542B8: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_022542C0: .word 0x02255E60 +_022542C4: .word ov25_022542E4 + thumb_func_end ov25_02254284 + + thumb_func_start ov25_022542C8 +ov25_022542C8: ; 0x022542C8 + ldr r3, _022542D0 ; =ov25_02255B34 + ldr r0, [r0, #0x28] + bx r3 + nop +_022542D0: .word ov25_02255B34 + thumb_func_end ov25_022542C8 + + thumb_func_start ov25_022542D4 +ov25_022542D4: ; 0x022542D4 + ldr r3, _022542E0 ; =ov25_02255B50 + mov r1, #0 + str r1, [r0, #8] + ldr r0, [r0, #0x28] + bx r3 + nop +_022542E0: .word ov25_02255B50 + thumb_func_end ov25_022542D4 + + thumb_func_start ov25_022542E4 +ov25_022542E4: ; 0x022542E4 + push {r3, r4, r5, r6, r7, lr} + add r5, r3, #0 + add r7, r0, #0 + add r0, r5, #0 + add r6, r1, #0 + str r2, [sp] + bl ov25_0225450C + cmp r0, #0 + bne _0225430E + ldr r0, [sp] + cmp r0, #0 + beq _02254308 + cmp r0, #1 + bne _02254312 + mov r0, #1 + strb r0, [r5, #3] + b _02254312 +_02254308: + mov r0, #0 + strb r0, [r5, #3] + b _02254312 +_0225430E: + mov r0, #0 + strb r0, [r5, #3] +_02254312: + cmp r7, #2 + bne _0225432E + add r0, r5, #0 + bl ov25_0225450C + cmp r0, #0 + beq _022543E6 + ldr r0, [sp] + cmp r0, #1 + bne _022543E6 + ldr r0, _022543E8 ; =0x0000066E + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_0225432E: + ldr r0, [sp] + mov r4, #0 + mvn r4, r4 + cmp r0, #0 + beq _0225433E + cmp r0, #1 + beq _0225434A + b _02254372 +_0225433E: + cmp r7, #0 + bne _02254346 + mov r4, #8 + b _02254372 +_02254346: + mov r4, #0xb + b _02254372 +_0225434A: + add r0, r5, #0 + bl ov25_0225450C + cmp r0, #0 + bne _0225435A + ldrb r0, [r5, #6] + cmp r0, #0 + beq _02254368 +_0225435A: + cmp r7, #0 + bne _02254362 + mov r4, #6 + b _02254364 +_02254362: + mov r4, #9 +_02254364: + mov r6, #0 + b _02254372 +_02254368: + cmp r7, #0 + bne _02254370 + mov r4, #7 + b _02254372 +_02254370: + mov r4, #0xa +_02254372: + mov r0, #0 + ldr r1, [r5, #0x2c] + mvn r0, r0 + cmp r1, r0 + beq _02254382 + add r0, r4, #0 + add r4, r1, #0 + str r0, [r5, #0x2c] +_02254382: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _022543A8 + ldr r0, [r5, #0x1c] + add r1, r4, #0 + bl ov25_022543EC + cmp r0, #0 + beq _022543A8 + cmp r4, #6 + beq _022543A6 + cmp r4, #7 + beq _022543A6 + add r0, r4, #0 + sub r0, #9 + cmp r0, #1 + bhi _022543A8 +_022543A6: + str r4, [r5, #0x30] +_022543A8: + cmp r6, #2 + beq _022543CC + cmp r6, #3 + beq _022543BE + cmp r6, #5 + bne _022543D8 + ldr r0, [r5, #0x28] + mov r1, #0 + bl ov25_02255C68 + b _022543D8 +_022543BE: + ldr r0, [r5, #0x30] + cmp r0, #6 + beq _022543C8 + cmp r0, #9 + bne _022543D8 +_022543C8: + mov r6, #0 + b _022543D8 +_022543CC: + ldr r0, [r5, #0x30] + cmp r0, #7 + beq _022543D6 + cmp r0, #0xa + bne _022543D8 +_022543D6: + mov r6, #3 +_022543D8: + str r6, [r5, #8] + cmp r7, #0 + bne _022543E2 + mov r0, #0 + b _022543E4 +_022543E2: + mov r0, #1 +_022543E4: + str r0, [r5, #0x60] +_022543E6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022543E8: .word 0x0000066E + thumb_func_end ov25_022542E4 + + thumb_func_start ov25_022543EC +ov25_022543EC: ; 0x022543EC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_022543F4: + add r0, r5, #0 + add r1, r6, #0 + bl ov25_022547F4 + cmp r0, #0 + bne _02254404 + mov r0, #0 + pop {r4, r5, r6, pc} +_02254404: + add r4, r4, #1 + cmp r4, #6 + blo _022543F4 + add r0, r5, #0 + add r1, r6, #0 + bl ov25_022547D0 + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov25_022543EC + + thumb_func_start ov25_02254418 +ov25_02254418: ; 0x02254418 + push {r3, lr} + bl ov25_02253CE0 + ldr r0, [r0, #0x1c] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov25_02254418 + + thumb_func_start ov25_02254424 +ov25_02254424: ; 0x02254424 + push {r4, lr} + add r4, r0, #0 + bl ov25_02253CE0 + ldrb r1, [r0, #5] + cmp r1, #0 + bne _02254442 + bl ov25_0225450C + cmp r0, #0 + bne _02254442 + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_02254442: + pop {r4, pc} + thumb_func_end ov25_02254424 + + thumb_func_start ov25_02254444 +ov25_02254444: ; 0x02254444 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02253CE0 + ldrb r1, [r0, #5] + cmp r1, #0 + bne _02254468 + bl ov25_0225450C + cmp r0, #0 + bne _02254468 + lsl r0, r5, #0x10 + lsl r1, r4, #0x18 + lsr r0, r0, #0x10 + lsr r1, r1, #0x18 + bl sub_02005844 +_02254468: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov25_02254444 + + thumb_func_start ov25_0225446C +ov25_0225446C: ; 0x0225446C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02253CE0 + ldrb r1, [r0, #5] + cmp r1, #0 + bne _022544B8 + bl ov25_0225450C + cmp r0, #0 + bne _022544B8 + add r0, r5, #0 + add r1, r4, #0 + bl sub_020227A4 + cmp r0, #0 + beq _022544B8 + ldr r0, [r5, #0] + sub r0, #0x10 + cmp r0, #0xbf + bhs _0225449C + mov r1, #1 + b _0225449E +_0225449C: + mov r1, #0 +_0225449E: + ldr r0, [r4, #0] + sub r0, #0x10 + cmp r0, #0x9f + bhs _022544AA + mov r0, #1 + b _022544AC +_022544AA: + mov r0, #0 +_022544AC: + tst r0, r1 + beq _022544B4 + mov r0, #1 + pop {r3, r4, r5, pc} +_022544B4: + mov r0, #0 + pop {r3, r4, r5, pc} +_022544B8: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov25_0225446C + + thumb_func_start ov25_022544BC +ov25_022544BC: ; 0x022544BC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02253CE0 + ldrb r1, [r0, #5] + cmp r1, #0 + bne _02254508 + bl ov25_0225450C + cmp r0, #0 + bne _02254508 + add r0, r5, #0 + add r1, r4, #0 + bl sub_020227C0 + cmp r0, #0 + beq _02254508 + ldr r0, [r5, #0] + sub r0, #0x10 + cmp r0, #0xbf + bhs _022544EC + mov r1, #1 + b _022544EE +_022544EC: + mov r1, #0 +_022544EE: + ldr r0, [r4, #0] + sub r0, #0x10 + cmp r0, #0x9f + bhs _022544FA + mov r0, #1 + b _022544FC +_022544FA: + mov r0, #0 +_022544FC: + tst r0, r1 + beq _02254504 + mov r0, #1 + pop {r3, r4, r5, pc} +_02254504: + mov r0, #0 + pop {r3, r4, r5, pc} +_02254508: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov25_022544BC + + thumb_func_start ov25_0225450C +ov25_0225450C: ; 0x0225450C + ldr r3, _02254514 ; =sub_020509A4 + ldr r0, [r0, #0x5c] + bx r3 + nop +_02254514: .word sub_020509A4 + thumb_func_end ov25_0225450C + + thumb_func_start ov25_02254518 +ov25_02254518: ; 0x02254518 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_0225450C + cmp r0, #0 + bne _02254532 + ldrb r0, [r5, #5] + cmp r0, #0 + bne _02254532 + add r0, r4, #0 + bl ov25_02255B50 +_02254532: + pop {r3, r4, r5, pc} + thumb_func_end ov25_02254518 + + thumb_func_start ov25_02254534 +ov25_02254534: ; 0x02254534 + ldrb r0, [r0, #4] + bx lr + thumb_func_end ov25_02254534 + + thumb_func_start ov25_02254538 +ov25_02254538: ; 0x02254538 + ldrb r0, [r0, #7] + bx lr + thumb_func_end ov25_02254538 + + thumb_func_start ov25_0225453C +ov25_0225453C: ; 0x0225453C + ldr r0, [r0, #0x5c] + bx lr + thumb_func_end ov25_0225453C + + thumb_func_start ov25_02254540 +ov25_02254540: ; 0x02254540 + ldr r0, [r0, #0x58] + bx lr + thumb_func_end ov25_02254540 + + thumb_func_start ov25_02254544 +ov25_02254544: ; 0x02254544 + ldr r0, [r0, #0x54] + bx lr + thumb_func_end ov25_02254544 + + thumb_func_start ov25_02254548 +ov25_02254548: ; 0x02254548 + push {r3, lr} + ldr r0, [r0, #0x54] + bl sub_02025E38 + bl sub_02025F30 + cmp r0, #1 + beq _0225455C + mov r0, #1 + pop {r3, pc} +_0225455C: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov25_02254548 + + .rodata + + + .global Unk_ov25_02255E60 +Unk_ov25_02255E60: ; 0x02255E60 + .incbin "incbin/overlay25_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov25_02255E6C +Unk_ov25_02255E6C: ; 0x02255E6C + .incbin "incbin/overlay25_rodata.bin", 0xC, 0x1C - 0xC + + .global Unk_ov25_02255E7C +Unk_ov25_02255E7C: ; 0x02255E7C + .incbin "incbin/overlay25_rodata.bin", 0x1C, 0xC8 + diff --git a/asm/ov25_02254560.s b/asm/ov25_02254560.s new file mode 100644 index 000000000..a0c2cd92d --- /dev/null +++ b/asm/ov25_02254560.s @@ -0,0 +1,1467 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov25_02254560 +ov25_02254560: ; 0x02254560 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x42 + add r5, r0, #0 + mov r0, #7 + lsl r1, r1, #4 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + str r0, [r5, #0] + add r4, r0, #0 + beq _0225464C + mov r0, #0x72 + lsl r0, r0, #2 + str r7, [r4, r0] + ldr r0, [r4, r0] + bl sub_020A7FFC + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #7 + bl ov25_02255540 + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + cmp r0, #0 + bne _022545AA + ldr r0, [r5, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_022545AA: + mov r0, #7 + str r6, [r4, #0] + bl sub_02018340 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp] + add r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + bl ov25_02254684 + mov r1, #0x75 + lsl r1, r1, #2 + add r0, r4, r1 + sub r1, #8 + ldr r1, [r4, r1] + bl ov25_02254DD8 + ldr r0, [r5, #0] + mov r1, #8 + add r0, r0, #4 + bl ov25_02255090 + ldr r0, [r5, #0] + mov r1, #0x48 + add r0, #0x2c + mov r2, #4 + mov r3, #6 + bl ov25_02254798 + ldr r0, [r5, #0] + mov r1, #0x4c + add r0, #0x6c + mov r2, #4 + mov r3, #6 + bl ov25_02254798 + ldr r0, [r5, #0] + mov r1, #0x50 + add r0, #0xac + mov r2, #4 + mov r3, #6 + bl ov25_02254798 + ldr r0, [r5, #0] + mov r1, #0x54 + add r0, #0xec + mov r2, #2 + mov r3, #4 + bl ov25_02254798 + mov r0, #0x4b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0x58 + mov r2, #2 + mov r3, #4 + bl ov25_02254798 + mov r0, #0x5b + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + mov r1, #0x5c + mov r2, #2 + mov r3, #4 + bl ov25_02254798 + ldr r0, _02254650 ; =ov25_02254654 + add r1, r4, #0 + mov r2, #0 + bl sub_0200DA3C + mov r1, #0x1d + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225464C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02254650: .word ov25_02254654 + thumb_func_end ov25_02254560 + + thumb_func_start ov25_02254654 +ov25_02254654: ; 0x02254654 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r3, _02254660 ; =ov25_02255614 + ldr r0, [r1, r0] + bx r3 + nop +_02254660: .word ov25_02255614 + thumb_func_end ov25_02254654 + + thumb_func_start ov25_02254664 +ov25_02254664: ; 0x02254664 + push {r3, lr} + bl ov25_02254418 + mov r1, #0x73 + lsl r1, r1, #2 + ldr r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov25_02254664 + + thumb_func_start ov25_02254674 +ov25_02254674: ; 0x02254674 + push {r3, lr} + bl ov25_02254418 + mov r1, #0x7e + lsl r1, r1, #2 + ldr r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov25_02254674 + + thumb_func_start ov25_02254684 +ov25_02254684: ; 0x02254684 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xc + mov r1, #0 + add r2, sp, #0 + mov r3, #7 + bl sub_02006F88 + add r4, r0, #0 + beq _022546B6 + ldr r0, [sp] + mov r2, #2 + lsl r2, r2, #8 + ldr r0, [r0, #0xc] + add r1, r5, r2 + bl sub_020C4B68 + mov r1, #2 + lsl r1, r1, #8 + add r0, r5, r1 + bl sub_020C2C54 + add r0, r4, #0 + bl sub_020181C4 +_022546B6: + pop {r3, r4, r5, pc} + thumb_func_end ov25_02254684 + + thumb_func_start ov25_022546B8 +ov25_022546B8: ; 0x022546B8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + bl ov25_02254418 + add r4, r0, #0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov25_02254540 + bl sub_02056888 + mov r1, #2 + lsl r1, r1, #8 + add r5, r4, r1 + lsl r4, r0, #6 + add r0, r5, r4 + lsl r1, r6, #5 + mov r2, #0x20 + bl sub_020C0108 + add r0, r5, r4 + add r1, r7, #0 + mov r2, #0x20 + bl sub_020C01B8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov25_022546B8 + + thumb_func_start ov25_022546F0 +ov25_022546F0: ; 0x022546F0 + push {r3, r4, r5, lr} + bl ov25_02254418 + add r4, r0, #0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov25_02254540 + bl sub_02056888 + mov r1, #2 + lsl r0, r0, #5 + lsl r1, r1, #8 + add r0, #0x10 + add r4, r4, r1 + lsl r5, r0, #1 + add r0, r4, r5 + mov r1, #0 + mov r2, #0x20 + bl sub_020C0108 + add r0, r4, r5 + mov r1, #0 + mov r2, #0x20 + bl sub_020C01B8 + pop {r3, r4, r5, pc} + thumb_func_end ov25_022546F0 + + thumb_func_start ov25_02254728 +ov25_02254728: ; 0x02254728 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov25_02254418 + add r4, r0, #0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov25_02254540 + bl sub_02056888 + mov r1, #2 + lsl r1, r1, #8 + add r1, r4, r1 + lsl r0, r0, #6 + add r0, r1, r0 + add r1, r5, #0 + mov r2, #0x20 + bl sub_020C4B18 + pop {r3, r4, r5, pc} + thumb_func_end ov25_02254728 + + thumb_func_start ov25_02254754 +ov25_02254754: ; 0x02254754 + push {r4, lr} + add r4, r0, #0 + beq _02254794 + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov25_02254F40 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02254772 + bl ov25_022555E8 +_02254772: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02254780 + bl sub_020181C4 +_02254780: + mov r0, #0x1d + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0225478E + bl sub_0200DA58 +_0225478E: + add r0, r4, #0 + bl sub_020181C4 +_02254794: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_02254754 + + thumb_func_start ov25_02254798 +ov25_02254798: ; 0x02254798 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0xf + mov r6, #0 + mov ip, r2 + mov lr, r1 + add r7, r3, #0 + add r2, r6, #0 + lsl r4, r4, #0xc +_022547A8: + mov r3, lr + mov r1, #0 + add r3, r3, r6 +_022547AE: + add r5, r1, r3 + orr r5, r4 + strh r5, [r0] + add r1, r1, #1 + add r0, r0, #2 + cmp r1, #4 + blt _022547AE + mov r1, ip + cmp r2, r1 + blt _022547C6 + cmp r2, r7 + blt _022547C8 +_022547C6: + add r6, #0x20 +_022547C8: + add r2, r2, #1 + cmp r2, #8 + blt _022547A8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov25_02254798 + + thumb_func_start ov25_022547D0 +ov25_022547D0: ; 0x022547D0 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, r2, #4 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + ldr r0, _022547F0 ; =0x02255F8C + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022547F0: .word 0x02255F8C + thumb_func_end ov25_022547D0 + + thumb_func_start ov25_022547F4 +ov25_022547F4: ; 0x022547F4 + ldr r3, _022547FC ; =ov25_02255130 + add r0, r0, #4 + bx r3 + nop +_022547FC: .word ov25_02255130 + thumb_func_end ov25_022547F4 + + thumb_func_start ov25_02254800 +ov25_02254800: ; 0x02254800 + ldr r3, _02254808 ; =ov25_02255154 + add r0, r0, #4 + bx r3 + nop +_02254808: .word ov25_02255154 + thumb_func_end ov25_02254800 + + thumb_func_start ov25_0225480C +ov25_0225480C: ; 0x0225480C + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, r0, #4 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_0225480C + + thumb_func_start ov25_02254820 +ov25_02254820: ; 0x02254820 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + mov r0, #0 + bl sub_020BDEA8 + mov r0, #0x80 + bl sub_020BEA50 + mov r0, #1 + lsl r0, r0, #8 + bl sub_020BEAF8 + ldr r2, _0225492C ; =0x04001000 + ldr r0, _02254930 ; =0xFFCFFFEF + ldr r1, [r2, #0] + and r1, r0 + mov r0, #0x10 + orr r0, r1 + str r0, [r2, #0] + bl sub_0201FF68 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, _02254934 ; =0x02255F54 + mov r1, #4 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, _02254938 ; =0x02255F70 + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + mov r0, #0x40 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #7 + mov r2, #0x7e + str r0, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r4, r2] + mov r0, #0xc + mov r1, #0xe + mov r3, #4 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #7 + mov r2, #0x7e + str r0, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r4, r2] + mov r0, #0xc + mov r1, #0xf + mov r3, #4 + bl sub_02006E60 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov25_02254548 + add r3, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0xd + mov r2, #4 + lsl r3, r3, #5 + bl sub_02006E9C + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + mov r2, #0xe4 + bl sub_02019CB8 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019448 + ldr r0, _0225492C ; =0x04001000 + ldr r1, _0225493C ; =0xFFFFE0FF + ldr r2, [r0, #0] + and r2, r1 + mov r1, #0x13 + lsl r1, r1, #8 + orr r1, r2 + str r1, [r0, #0] + ldr r2, [r0, #0] + ldr r1, _02254940 ; =0xFFFF1FFF + and r1, r2 + str r1, [r0, #0] + add r0, r5, #0 + bl ov25_0225480C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225492C: .word 0x04001000 +_02254930: .word 0xFFCFFFEF +_02254934: .word 0x02255F54 +_02254938: .word 0x02255F70 +_0225493C: .word 0xFFFFE0FF +_02254940: .word 0xFFFF1FFF + thumb_func_end ov25_02254820 + + thumb_func_start ov25_02254944 +ov25_02254944: ; 0x02254944 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0x10] + add r0, r1, #0 + bl ov25_02255244 + add r4, r0, #0 + ldr r0, [sp, #0x10] + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [sp, #0x10] + bl ov25_02255248 + cmp r0, #0 + beq _02254970 + cmp r0, #1 + beq _0225497C + cmp r0, #2 + beq _02254A50 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02254970: + mov r0, #0 + strh r0, [r4] + strh r0, [r4, #2] + ldr r0, [sp, #0x10] + bl ov25_0225524C +_0225497C: + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + ldrh r0, [r4] + cmp r0, #0 + beq _02254A56 + mov r0, #0 + strh r0, [r4] + ldrh r0, [r4, #2] + add r0, #0xc + strh r0, [r4, #2] + ldrh r0, [r4, #2] + cmp r0, #0x28 + bls _0225499C + mov r0, #0x28 + strh r0, [r4, #2] +_0225499C: + ldrh r1, [r4, #2] + lsr r3, r1, #0x1f + lsl r2, r1, #0x1e + lsr r0, r1, #2 + sub r2, r2, r3 + mov r1, #0x1e + ror r2, r1 + mov r1, #0xc + sub r6, r1, r0 + lsl r0, r0, #1 + str r0, [sp, #0x14] + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + add r7, r3, r2 + ldr r0, [sp, #0x14] + mov r1, #5 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0x40 + mov r3, #2 + bl sub_02019CB8 + cmp r7, #0 + beq _02254A34 + sub r0, r6, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + add r2, r7, #0 + lsl r0, r0, #2 + add r2, #0xe4 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #5 + lsr r2, r2, #0x10 + mov r3, #2 + bl sub_02019CB8 + ldr r0, [sp, #0x14] + mov r2, #0xe4 + add r0, r6, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + sub r2, r2, r7 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #5 + lsr r2, r2, #0x10 + mov r3, #2 + bl sub_02019CB8 +_02254A34: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #5 + bl sub_02019448 + ldrh r0, [r4, #2] + cmp r0, #0x28 + bne _02254A56 + ldr r0, [sp, #0x10] + bl ov25_0225524C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02254A50: + ldr r0, [sp, #0x10] + bl ov25_0225480C +_02254A56: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov25_02254944 + + thumb_func_start ov25_02254A5C +ov25_02254A5C: ; 0x02254A5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0x10] + add r0, r1, #0 + bl ov25_02255244 + add r4, r0, #0 + ldr r0, [sp, #0x10] + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [sp, #0x10] + bl ov25_02255248 + cmp r0, #0 + beq _02254A88 + cmp r0, #1 + beq _02254A94 + cmp r0, #2 + beq _02254B82 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02254A88: + mov r0, #0 + strh r0, [r4] + strh r0, [r4, #2] + ldr r0, [sp, #0x10] + bl ov25_0225524C +_02254A94: + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + ldrh r0, [r4] + cmp r0, #0 + beq _02254B88 + mov r0, #0 + strh r0, [r4] + ldrh r0, [r4, #2] + add r0, #8 + strh r0, [r4, #2] + ldrh r0, [r4, #2] + cmp r0, #0x28 + bls _02254AB4 + mov r0, #0x28 + strh r0, [r4, #2] +_02254AB4: + ldrh r0, [r4, #2] + mov r3, #2 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1e + lsr r7, r0, #2 + sub r1, r1, r2 + mov r0, #0x1e + ror r1, r0 + mov r0, #0x16 + sub r0, r0, r7 + str r0, [sp, #0x14] + str r3, [sp] + mov r0, #0x18 + add r6, r2, r1 + str r0, [sp, #4] + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #5 + mov r2, #0xe4 + bl sub_02019CB8 + ldr r0, [sp, #0x14] + mov r1, #5 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0xe4 + mov r3, #2 + bl sub_02019CB8 + cmp r6, #0 + beq _02254B66 + mov r0, #0 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + sub r3, r6, #1 + mov r2, #0xe7 + sub r2, r2, r3 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #5 + lsr r2, r2, #0x10 + mov r3, #2 + bl sub_02019CB8 + ldr r0, [sp, #0x14] + add r6, #0xe0 + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + lsl r2, r6, #0x10 + ldr r0, [r5, r0] + mov r1, #5 + lsr r2, r2, #0x10 + mov r3, #2 + bl sub_02019CB8 +_02254B66: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #5 + bl sub_02019448 + ldrh r0, [r4, #2] + cmp r0, #0x28 + bne _02254B88 + ldr r0, [sp, #0x10] + bl ov25_0225524C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02254B82: + ldr r0, [sp, #0x10] + bl ov25_0225480C +_02254B88: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov25_02254A5C + + thumb_func_start ov25_02254B8C +ov25_02254B8C: ; 0x02254B8C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r1, #0 + add r0, r5, #0 + bl ov25_02255244 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255248 + add r2, r0, #0 + cmp r2, #4 + bhs _02254BE6 + mov r3, #2 + str r3, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x14 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + mov r6, #0xe3 + lsl r0, r0, #2 + sub r2, r6, r2 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + mov r1, #5 + lsr r2, r2, #0x10 + bl sub_02019CB8 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019448 + add r0, r5, #0 + bl ov25_0225524C + add sp, #0x10 + pop {r4, r5, r6, pc} +_02254BE6: + add r0, r5, #0 + bl ov25_0225480C + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov25_02254B8C + + thumb_func_start ov25_02254BF0 +ov25_02254BF0: ; 0x02254BF0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r1, #0 + add r0, r5, #0 + bl ov25_02255244 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255248 + add r2, r0, #0 + cmp r2, #4 + bhs _02254C4A + mov r3, #2 + str r3, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x14 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + mov r6, #0xe7 + lsl r0, r0, #2 + sub r2, r6, r2 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + mov r1, #5 + lsr r2, r2, #0x10 + bl sub_02019CB8 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019448 + add r0, r5, #0 + bl ov25_0225524C + add sp, #0x10 + pop {r4, r5, r6, pc} +_02254C4A: + add r0, r5, #0 + bl ov25_0225480C + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov25_02254BF0 + + thumb_func_start ov25_02254C54 +ov25_02254C54: ; 0x02254C54 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + bl ov25_0225523C + add r4, r0, #0 + cmp r5, #0 + bne _02254C6E + mov r3, #0x1c + mov r0, #4 + b _02254C72 +_02254C6E: + mov r3, #0x1c + mov r0, #0xc +_02254C72: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r1, #4 + str r1, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0x7e + lsl r0, r0, #2 + lsl r3, r3, #0x18 + ldr r0, [r4, r0] + add r2, r7, #0 + lsr r3, r3, #0x18 + bl sub_020198C0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_02019448 + add r0, r6, #0 + bl ov25_0225480C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov25_02254C54 + + thumb_func_start ov25_02254CA8 +ov25_02254CA8: ; 0x02254CA8 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r1, r0, #0 + add r0, r4, #0 + add r1, #0x6c + mov r2, #0 + bl ov25_02254C54 + ldr r0, _02254CC8 ; =0x00000671 + bl sub_02005748 + pop {r4, pc} + nop +_02254CC8: .word 0x00000671 + thumb_func_end ov25_02254CA8 + + thumb_func_start ov25_02254CCC +ov25_02254CCC: ; 0x02254CCC + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + mov r1, #0x4b + add r2, r0, #0 + lsl r1, r1, #2 + add r1, r2, r1 + add r0, r4, #0 + mov r2, #1 + bl ov25_02254C54 + ldr r0, _02254CF0 ; =0x00000671 + bl sub_02005748 + pop {r4, pc} + nop +_02254CF0: .word 0x00000671 + thumb_func_end ov25_02254CCC + + thumb_func_start ov25_02254CF4 +ov25_02254CF4: ; 0x02254CF4 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r1, r0, #0 + add r0, r4, #0 + add r1, #0x2c + mov r2, #0 + bl ov25_02254C54 + pop {r4, pc} + thumb_func_end ov25_02254CF4 + + thumb_func_start ov25_02254D0C +ov25_02254D0C: ; 0x02254D0C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r1, r0, #0 + add r0, r4, #0 + add r1, #0xec + mov r2, #1 + bl ov25_02254C54 + pop {r4, pc} + thumb_func_end ov25_02254D0C + + thumb_func_start ov25_02254D24 +ov25_02254D24: ; 0x02254D24 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r1, r0, #0 + add r0, r4, #0 + add r1, #0xac + mov r2, #0 + bl ov25_02254C54 + ldr r0, _02254D44 ; =0x0000066F + bl sub_02005748 + pop {r4, pc} + nop +_02254D44: .word 0x0000066F + thumb_func_end ov25_02254D24 + + thumb_func_start ov25_02254D48 +ov25_02254D48: ; 0x02254D48 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + mov r1, #0x5b + add r2, r0, #0 + lsl r1, r1, #2 + add r1, r2, r1 + add r0, r4, #0 + mov r2, #1 + bl ov25_02254C54 + ldr r0, _02254D6C ; =0x0000066F + bl sub_02005748 + pop {r4, pc} + nop +_02254D6C: .word 0x0000066F + thumb_func_end ov25_02254D48 + + thumb_func_start ov25_02254D70 +ov25_02254D70: ; 0x02254D70 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + mov r1, #0x75 + add r4, r0, #0 + lsl r1, r1, #2 + add r1, r4, r1 + bl ov25_02254DE0 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r1, [r4, #0] + add r0, r4, r0 + bl ov25_02254EE8 + add r0, r5, #0 + bl ov25_0225480C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov25_02254D70 + + thumb_func_start ov25_02254D9C +ov25_02254D9C: ; 0x02254D9C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r1, r0, #0 + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r1, [r1, #0] + bl ov25_02254EE8 + add r0, r4, #0 + bl ov25_0225480C + pop {r4, pc} + thumb_func_end ov25_02254D9C + + thumb_func_start ov25_02254DBC +ov25_02254DBC: ; 0x02254DBC + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + mov r1, #0x75 + lsl r1, r1, #2 + add r0, r0, r1 + bl ov25_02254F40 + add r0, r4, #0 + bl ov25_0225480C + pop {r4, pc} + thumb_func_end ov25_02254DBC + + thumb_func_start ov25_02254DD8 +ov25_02254DD8: ; 0x02254DD8 + mov r2, #0 + str r2, [r0, #0] + str r1, [r0, #4] + bx lr + thumb_func_end ov25_02254DD8 + + thumb_func_start ov25_02254DE0 +ov25_02254DE0: ; 0x02254DE0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + mov r0, #7 + str r0, [sp] + add r0, r4, #0 + add r0, #8 + mov r1, #0xc + mov r2, #3 + mov r3, #4 + bl ov25_02255958 + cmp r0, #0 + beq _02254E7C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #2 + bl sub_02006EC0 + mov r0, #0x60 + str r0, [sp] + mov r0, #7 + mov r1, #0 + str r0, [sp, #4] + mov r0, #0xc + mov r2, #5 + add r3, r1, #0 + bl sub_02006E84 + add r0, r5, #0 + mov r1, #0xf + bl ov25_02254E84 + add r2, r4, #0 + ldr r0, [r4, #4] + ldr r1, _02254E80 ; =0x02255F44 + add r2, #8 + bl ov25_02255810 + str r0, [r4, #0x1c] + cmp r0, #0 + beq _02254E7C + add r2, r4, #0 + ldr r0, [r4, #4] + ldr r1, _02254E80 ; =0x02255F44 + add r2, #8 + bl ov25_02255810 + str r0, [r4, #0x20] + cmp r0, #0 + bne _02254E5E + ldr r0, [r4, #4] + ldr r1, [r4, #0x1c] + bl ov25_022558B0 + add sp, #0xc + pop {r4, r5, pc} +_02254E5E: + mov r1, #1 + lsl r1, r1, #0x10 + mov r2, #0 + bl ov25_022558F0 + ldr r0, [r4, #0x1c] + mov r1, #0xf + bl ov25_02255938 + ldr r0, [r4, #0x20] + mov r1, #0xf + bl ov25_02255938 + mov r0, #1 + str r0, [r4, #0] +_02254E7C: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02254E80: .word 0x02255F44 + thumb_func_end ov25_02254DE0 + + thumb_func_start ov25_02254E84 +ov25_02254E84: ; 0x02254E84 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r4, r1, #0 + bl ov25_02254540 + bl sub_02056888 + mov r0, #1 + lsl r0, r0, #0xa + add r0, r5, r0 + bl ov25_02254728 + ldr r1, _02254EE4 ; =0x00000402 + add r0, r1, #6 + ldrh r2, [r5, r1] + ldrh r0, [r5, r0] + strh r0, [r5, r1] + add r0, r1, #6 + strh r2, [r5, r0] + add r0, r1, #0 + add r2, r1, #0 + add r0, #0xe + add r2, #0x1c + ldrh r3, [r5, r2] + add r2, r1, #0 + ldrh r0, [r5, r0] + add r2, #0xe + strh r3, [r5, r2] + add r2, r1, #0 + add r2, #0x1c + strh r0, [r5, r2] + sub r0, r1, #2 + add r0, r5, r0 + mov r1, #0x20 + bl sub_020C2C54 + mov r0, #1 + lsl r0, r0, #0xa + add r0, r5, r0 + lsl r1, r4, #5 + mov r2, #0x20 + bl sub_020C01B8 + pop {r3, r4, r5, pc} + nop +_02254EE4: .word 0x00000402 + thumb_func_end ov25_02254E84 + + thumb_func_start ov25_02254EE8 +ov25_02254EE8: ; 0x02254EE8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02254F32 + ldr r0, [r1, #0] + ldr r2, _02254F34 ; =0x04000280 + mov r3, #0 + add r0, r0, #1 + strh r3, [r2] + str r0, [r2, #0x10] + add r0, r2, #0 + mov r1, #0xa + add r0, #0x18 + str r1, [r0, #0] + str r3, [r0, #4] + lsr r0, r2, #0xb +_02254F0A: + ldrh r1, [r2] + tst r1, r0 + bne _02254F0A + ldr r0, _02254F38 ; =0x040002A0 + add r3, r0, #0 + ldr r1, [r0, #0] + sub r3, #0x20 + lsr r0, r0, #0xb +_02254F1A: + ldrh r2, [r3] + tst r2, r0 + bne _02254F1A + ldr r0, _02254F3C ; =0x040002A8 + ldr r5, [r0, #0] + ldr r0, [r4, #0x1c] + bl ov25_022558C4 + ldr r0, [r4, #0x20] + add r1, r5, #0 + bl ov25_022558C4 +_02254F32: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02254F34: .word 0x04000280 +_02254F38: .word 0x040002A0 +_02254F3C: .word 0x040002A8 + thumb_func_end ov25_02254EE8 + + thumb_func_start ov25_02254F40 +ov25_02254F40: ; 0x02254F40 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02254F66 + ldr r0, [r4, #4] + ldr r1, [r4, #0x1c] + bl ov25_022558B0 + ldr r0, [r4, #4] + ldr r1, [r4, #0x20] + bl ov25_022558B0 + add r0, r4, #0 + add r0, #8 + bl ov25_022559B0 + mov r0, #0 + str r0, [r4, #0] +_02254F66: + pop {r4, pc} + thumb_func_end ov25_02254F40 + + thumb_func_start ov25_02254F68 +ov25_02254F68: ; 0x02254F68 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r1, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r6, #0 + bl ov25_02255244 + add r0, r6, #0 + bl ov25_02255248 + add r5, r0, #0 + cmp r5, #3 + bhi _02254FFC + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02254F94: ; jump table + .short _02254F9C - _02254F94 - 2 ; case 0 + .short _02254FB8 - _02254F94 - 2 ; case 1 + .short _02254FB8 - _02254F94 - 2 ; case 2 + .short _02254FB8 - _02254F94 - 2 ; case 3 +_02254F9C: + mov r0, #6 + str r0, [sp] + ldr r0, _02255000 ; =0x04001050 + mov r1, #2 + mov r2, #0x1c + mov r3, #0x1a + bl sub_020BF55C + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_02019448 +_02254FB8: + mov r3, #2 + str r3, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x14 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + mov r2, #0xe7 + lsl r0, r0, #2 + sub r2, r2, r5 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + mov r1, #5 + lsr r2, r2, #0x10 + bl sub_02019CB8 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019448 + cmp r5, #3 + bne _02254FF6 + add r0, r6, #0 + bl ov25_0225480C + add sp, #0x10 + pop {r4, r5, r6, pc} +_02254FF6: + add r0, r6, #0 + bl ov25_0225524C +_02254FFC: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02255000: .word 0x04001050 + thumb_func_end ov25_02254F68 + + thumb_func_start ov25_02255004 +ov25_02255004: ; 0x02255004 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + mov r3, #2 + add r4, r0, #0 + str r3, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x14 + str r0, [sp, #8] + mov r0, #0xf + str r0, [sp, #0xc] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + mov r2, #0x40 + bl sub_02019CB8 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_02019448 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019448 + mov r1, #0 + ldr r0, _02255060 ; =0x04001050 + add r2, r1, #0 + mov r3, #0x1f + str r1, [sp] + bl sub_020BF55C + add r0, r5, #0 + bl ov25_0225480C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02255060: .word 0x04001050 + thumb_func_end ov25_02255004 + + thumb_func_start ov25_02255064 +ov25_02255064: ; 0x02255064 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_02019044 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_02019044 + add r0, r5, #0 + bl ov25_0225480C + pop {r3, r4, r5, pc} + thumb_func_end ov25_02255064 + + .rodata + + + .global Unk_ov25_02255F44 +Unk_ov25_02255F44: ; 0x02255F44 + .incbin "incbin/overlay25_rodata.bin", 0xE4, 0xF4 - 0xE4 + + .global Unk_ov25_02255F54 +Unk_ov25_02255F54: ; 0x02255F54 + .incbin "incbin/overlay25_rodata.bin", 0xF4, 0x110 - 0xF4 + + .global Unk_ov25_02255F70 +Unk_ov25_02255F70: ; 0x02255F70 + .incbin "incbin/overlay25_rodata.bin", 0x110, 0x12C - 0x110 + + .global Unk_ov25_02255F8C +Unk_ov25_02255F8C: ; 0x02255F8C + .incbin "incbin/overlay25_rodata.bin", 0x12C, 0xE4 + diff --git a/asm/ov25_02255090.s b/asm/ov25_02255090.s new file mode 100644 index 000000000..2c8fc3dcd --- /dev/null +++ b/asm/ov25_02255090.s @@ -0,0 +1,687 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov25_02255090 +ov25_02255090: ; 0x02255090 + ldr r2, _022550AC ; =0x12345678 + str r1, [r0, #0] + mov r3, #0 + str r2, [r0, #4] + cmp r1, #0 + bls _022550A8 + sub r2, r3, #1 +_0225509E: + add r3, r3, #1 + str r2, [r0, #8] + add r0, r0, #4 + cmp r3, r1 + blo _0225509E +_022550A8: + bx lr + nop +_022550AC: .word 0x12345678 + thumb_func_end ov25_02255090 + + thumb_func_start ov25_022550B0 +ov25_022550B0: ; 0x022550B0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #4] + ldr r0, _022550EC ; =0x12345678 + cmp r1, r0 + beq _022550C2 + bl sub_02022974 +_022550C2: + ldr r6, [r5, #0] + mov r2, #0 + cmp r6, #0 + bls _022550E6 + add r3, r5, #0 + sub r0, r2, #1 +_022550CE: + ldr r1, [r3, #8] + cmp r1, r0 + bne _022550DE + lsl r0, r2, #2 + add r0, r5, r0 + str r4, [r0, #8] + mov r0, #1 + pop {r4, r5, r6, pc} +_022550DE: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, r6 + blo _022550CE +_022550E6: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_022550EC: .word 0x12345678 + thumb_func_end ov25_022550B0 + + thumb_func_start ov25_022550F0 +ov25_022550F0: ; 0x022550F0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #4] + ldr r0, _0225512C ; =0x12345678 + cmp r1, r0 + beq _02255102 + bl sub_02022974 +_02255102: + ldr r3, [r5, #0] + mov r2, #0 + cmp r3, #0 + bls _02255126 + add r1, r5, #0 +_0225510C: + ldr r0, [r1, #8] + cmp r4, r0 + bne _0225511E + mov r1, #0 + lsl r0, r2, #2 + mvn r1, r1 + add r0, r5, r0 + str r1, [r0, #8] + pop {r3, r4, r5, pc} +_0225511E: + add r2, r2, #1 + add r1, r1, #4 + cmp r2, r3 + blo _0225510C +_02255126: + bl sub_02022974 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225512C: .word 0x12345678 + thumb_func_end ov25_022550F0 + + thumb_func_start ov25_02255130 +ov25_02255130: ; 0x02255130 + push {r3, r4} + ldr r4, [r0, #0] + mov r3, #0 + cmp r4, #0 + bls _0225514E +_0225513A: + ldr r2, [r0, #8] + cmp r1, r2 + bne _02255146 + mov r0, #0 + pop {r3, r4} + bx lr +_02255146: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, r4 + blo _0225513A +_0225514E: + mov r0, #1 + pop {r3, r4} + bx lr + thumb_func_end ov25_02255130 + + thumb_func_start ov25_02255154 +ov25_02255154: ; 0x02255154 + push {r3, r4} + ldr r4, [r0, #0] + mov r3, #0 + cmp r4, #0 + bls _02255174 + sub r1, r3, #1 +_02255160: + ldr r2, [r0, #8] + cmp r2, r1 + beq _0225516C + mov r0, #0 + pop {r3, r4} + bx lr +_0225516C: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, r4 + blo _02255160 +_02255174: + mov r0, #1 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255154 + + thumb_func_start ov25_0225517C +ov25_0225517C: ; 0x0225517C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + str r2, [sp] + mov r0, #0 + add r5, r1, #0 + ldr r2, [r7, #0] + sub r1, r0, #1 + str r3, [sp, #4] + cmp r2, r1 + beq _0225521C + add r3, r7, #0 + sub r1, r0, #1 +_02255196: + ldr r2, [r3, #0] + cmp r5, r2 + bne _02255212 + add r6, r0, #0 + add r0, r7, #0 + str r0, [sp, #8] + add r0, #8 + mov r1, #0xc + str r0, [sp, #8] + mul r6, r1 + ldr r1, [sp, #8] + ldr r0, [sp, #0x28] + ldr r1, [r1, r6] + add r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + beq _0225520C + ldr r0, [sp, #8] + ldr r0, [r0, r6] + cmp r0, #0 + beq _022551C8 + add r0, r4, #0 + add r0, #0x18 + b _022551CA +_022551C8: + mov r0, #0 +_022551CA: + str r0, [r4, #0xc] + ldr r0, [sp, #0x20] + add r1, r5, #0 + bl ov25_022550B0 + cmp r0, #0 + beq _02255202 + ldr r0, [sp] + ldr r2, [sp, #0x24] + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #4] + str r5, [r4, #0] + ldr r0, [sp, #4] + add r5, r7, #4 + str r0, [r4, #0x10] + ldr r0, [r5, r6] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x14] + cmp r0, #0 + beq _02255220 + ldr r2, [r5, r6] + add r1, r4, #0 + blx r2 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_02255202: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_0225520C: + bl sub_02022974 + b _0225521C +_02255212: + add r3, #0xc + ldr r2, [r3, #0] + add r0, r0, #1 + cmp r2, r1 + bne _02255196 +_0225521C: + bl sub_02022974 +_02255220: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov25_0225517C + + thumb_func_start ov25_02255224 +ov25_02255224: ; 0x02255224 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + bl ov25_022550F0 + ldr r0, [r4, #0x14] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov25_02255224 + + thumb_func_start ov25_0225523C +ov25_0225523C: ; 0x0225523C + ldr r0, [r0, #8] + bx lr + thumb_func_end ov25_0225523C + + thumb_func_start ov25_02255240 +ov25_02255240: ; 0x02255240 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov25_02255240 + + thumb_func_start ov25_02255244 +ov25_02255244: ; 0x02255244 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov25_02255244 + + thumb_func_start ov25_02255248 +ov25_02255248: ; 0x02255248 + ldr r0, [r0, #4] + bx lr + thumb_func_end ov25_02255248 + + thumb_func_start ov25_0225524C +ov25_0225524C: ; 0x0225524C + ldr r1, [r0, #4] + add r1, r1, #1 + str r1, [r0, #4] + bx lr + thumb_func_end ov25_0225524C + + thumb_func_start ov25_02255254 +ov25_02255254: ; 0x02255254 + str r1, [r0, #4] + bx lr + thumb_func_end ov25_02255254 + + thumb_func_start ov25_02255258 +ov25_02255258: ; 0x02255258 + push {r3, r4, r5, r6} + mul r2, r3 + ldr r4, [sp, #0x18] + add r1, r1, r2 + lsl r6, r1, #1 + lsl r4, r4, #0xc + ldr r1, [sp, #0x10] + add r5, r4, #0 + orr r5, r1 + add r2, r0, r6 + strh r5, [r0, r6] + add r0, r1, #1 + orr r0, r4 + strh r0, [r2, #2] + ldr r0, [sp, #0x14] + lsl r3, r3, #1 + add r1, r1, r0 + add r0, r4, #0 + orr r0, r1 + strh r0, [r2, r3] + add r0, r1, #1 + add r1, r4, #0 + orr r1, r0 + add r0, r2, r3 + strh r1, [r0, #2] + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255258 + + thumb_func_start ov25_02255290 +ov25_02255290: ; 0x02255290 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x20 + bl sub_02018144 + add r7, r0, #0 + beq _022552FC + bl ov25_02254728 + mov r4, #0 + cmp r6, #0 + bls _022552F6 +_022552AC: + ldrh r3, [r5] + mov r0, #0x1f + lsl r0, r0, #0xa + and r0, r3 + asr r0, r0, #0xa + add r2, r0, #0 + mov r1, #0x72 + mov r0, #0x1f + mul r2, r1 + and r0, r3 + add r1, #0xb9 + mul r1, r0 + mov r0, #0x3e + lsl r0, r0, #4 + and r0, r3 + asr r3, r0, #5 + ldr r0, _02255300 ; =0x0000024B + mul r0, r3 + add r0, r1, r0 + mov r1, #0xfa + add r0, r2, r0 + lsl r1, r1, #2 + bl sub_020E2178 + lsr r1, r0, #3 + cmp r1, #3 + bls _022552E4 + mov r1, #3 +_022552E4: + ldr r0, _02255304 ; =0x02256078 + add r4, r4, #1 + ldrb r0, [r0, r1] + lsl r0, r0, #1 + ldrh r0, [r7, r0] + strh r0, [r5] + add r5, r5, #2 + cmp r4, r6 + blo _022552AC +_022552F6: + add r0, r7, #0 + bl sub_020181C4 +_022552FC: + pop {r3, r4, r5, r6, r7, pc} + nop +_02255300: .word 0x0000024B +_02255304: .word 0x02256078 + thumb_func_end ov25_02255290 + + thumb_func_start ov25_02255308 +ov25_02255308: ; 0x02255308 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #8 + mov r1, #0x20 + bl sub_02018144 + add r4, r0, #0 + beq _0225535E + mov r0, #8 + mov r1, #0x20 + bl sub_02018144 + add r5, r0, #0 + add r0, r4, #0 + bl ov25_02254728 + cmp r5, #0 + beq _02255358 + mov r0, #0 + add r1, r5, #0 + lsl r3, r6, #1 +_02255334: + ldrh r2, [r4, r3] + add r0, r0, #1 + strh r2, [r1] + add r1, r1, #2 + cmp r0, #0x10 + blt _02255334 + add r0, r5, #0 + mov r1, #0x20 + bl sub_020C2C54 + add r0, r5, #0 + lsl r1, r7, #5 + mov r2, #0x20 + bl sub_020C01B8 + add r0, r5, #0 + bl sub_020181C4 +_02255358: + add r0, r4, #0 + bl sub_020181C4 +_0225535E: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov25_02255308 + + thumb_func_start ov25_02255360 +ov25_02255360: ; 0x02255360 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02079FD0 + add r1, r0, #0 + mov r0, #0x13 + add r2, sp, #0 + mov r3, #8 + bl sub_02006F88 + add r4, r0, #0 + beq _0225539E + ldr r0, [sp] + mov r1, #0x40 + ldr r0, [r0, #0xc] + bl ov25_02255290 + ldr r0, [sp] + mov r1, #0x80 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [sp] + lsl r1, r5, #5 + ldr r0, [r0, #0xc] + mov r2, #0x80 + bl sub_020C01B8 + add r0, r4, #0 + bl sub_020181C4 +_0225539E: + pop {r3, r4, r5, pc} + thumb_func_end ov25_02255360 + + thumb_func_start ov25_022553A0 +ov25_022553A0: ; 0x022553A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #4] + lsl r0, r3, #1 + str r0, [sp, #0xc] + add r6, r1, #0 + str r2, [sp, #8] + ldr r2, _02255438 ; =0x02256074 + ldr r1, [sp, #0xc] + mov r0, #8 + ldrh r1, [r2, r1] + bl sub_02018144 + add r7, r0, #0 + beq _02255434 + mov r0, #0x13 + mov r1, #8 + bl sub_02006C24 + str r0, [sp, #0x1c] + cmp r0, #0 + beq _0225542E + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [sp, #8] + cmp r0, #0 + bls _02255428 + ldr r1, _0225543C ; =0x02256070 + ldr r0, [sp, #0xc] + ldr r4, [sp, #0x18] + ldrh r5, [r1, r0] + ldr r1, _02255438 ; =0x02256074 + ldrh r0, [r1, r0] + str r0, [sp, #0x14] + ldr r0, [sp, #4] + lsl r0, r0, #5 + str r0, [sp, #0x10] +_022553EA: + str r7, [sp] + ldr r0, [sp, #0x1c] + ldr r1, [r6, #0] + ldr r3, [sp, #0x14] + mov r2, #0 + bl sub_02006DC8 + add r0, r7, #0 + add r1, sp, #0x20 + bl sub_020A7118 + ldr r0, [sp, #0x20] + add r1, r5, #0 + ldr r0, [r0, #0x14] + bl sub_020C2C54 + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x10] + ldr r0, [r0, #0x14] + add r1, r1, r4 + add r2, r5, #0 + bl sub_020C0314 + ldr r0, [sp, #0x18] + add r6, r6, #4 + add r1, r0, #1 + ldr r0, [sp, #8] + add r4, r4, r5 + str r1, [sp, #0x18] + cmp r1, r0 + blo _022553EA +_02255428: + ldr r0, [sp, #0x1c] + bl sub_02006CA8 +_0225542E: + add r0, r7, #0 + bl sub_020181C4 +_02255434: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255438: .word 0x02256074 +_0225543C: .word 0x02256070 + thumb_func_end ov25_022553A0 + + thumb_func_start ov25_02255440 +ov25_02255440: ; 0x02255440 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r1, #0 + add r4, r2, #0 + mov r1, #2 + add r2, sp, #0xc + strh r1, [r2] + mov r3, #3 + strh r3, [r2, #2] + mov r3, #0xa + strh r3, [r2, #4] + mov r3, #0xb + strh r3, [r2, #6] + str r3, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + lsl r1, r4, #0x18 + lsr r1, r1, #0x18 + add r2, sp, #0xc + mov r3, #9 + add r6, r0, #0 + bl sub_020198C0 + mov r1, #4 + add r0, sp, #0xc + strh r1, [r0] + mov r1, #5 + strh r1, [r0, #2] + mov r1, #0xc + strh r1, [r0, #4] + mov r1, #0xd + strh r1, [r0, #6] + mov r3, #0xb + lsl r1, r4, #0x18 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + lsr r1, r1, #0x18 + add r2, sp, #0xc + bl sub_020198C0 + mov r1, #6 + add r0, sp, #0xc + strh r1, [r0] + mov r1, #7 + strh r1, [r0, #2] + mov r1, #0xe + strh r1, [r0, #4] + mov r1, #0xf + strh r1, [r0, #6] + mov r0, #0xb + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + lsl r1, r4, #0x18 + str r0, [sp, #8] + add r0, r6, #0 + lsr r1, r1, #0x18 + add r2, sp, #0xc + mov r3, #0xd + bl sub_020198C0 + add r0, r5, #0 + mov r1, #0xa + bl sub_020E2178 + mov r1, #0xa + mul r1, r0 + add r0, r0, #4 + sub r5, r5, r1 + lsr r1, r0, #2 + lsl r0, r0, #0x1e + lsl r1, r1, #4 + lsr r0, r0, #0x1d + add r2, r1, r0 + add r0, sp, #0xc + strh r2, [r0] + add r1, r2, #1 + strh r1, [r0, #2] + add r1, r2, #0 + add r1, #8 + strh r1, [r0, #4] + add r2, #9 + strh r2, [r0, #6] + mov r0, #0xb + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + lsl r1, r4, #0x18 + str r0, [sp, #8] + add r0, r6, #0 + lsr r1, r1, #0x18 + add r2, sp, #0xc + mov r3, #0xf + bl sub_020198C0 + add r0, r5, #4 + lsr r1, r0, #2 + lsl r0, r0, #0x1e + lsl r1, r1, #4 + lsr r0, r0, #0x1d + add r2, r1, r0 + add r0, sp, #0xc + strh r2, [r0] + add r1, r2, #1 + strh r1, [r0, #2] + add r1, r2, #0 + add r1, #8 + strh r1, [r0, #4] + add r2, #9 + strh r2, [r0, #6] + mov r0, #0xb + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + lsl r1, r4, #0x18 + str r0, [sp, #8] + add r0, r6, #0 + lsr r1, r1, #0x18 + add r2, sp, #0xc + mov r3, #0x11 + bl sub_020198C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov25_02255440 + + .rodata + + + .global Unk_ov25_02256070 +Unk_ov25_02256070: ; 0x02256070 + .incbin "incbin/overlay25_rodata.bin", 0x210, 0x214 - 0x210 + + .global Unk_ov25_02256074 +Unk_ov25_02256074: ; 0x02256074 + .incbin "incbin/overlay25_rodata.bin", 0x214, 0x218 - 0x214 + + .global Unk_ov25_02256078 +Unk_ov25_02256078: ; 0x02256078 + .incbin "incbin/overlay25_rodata.bin", 0x218, 0x4 + diff --git a/asm/ov25_02255540.s b/asm/ov25_02255540.s new file mode 100644 index 000000000..4f8c7b1f5 --- /dev/null +++ b/asm/ov25_02255540.s @@ -0,0 +1,807 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov25_02255540 +ov25_02255540: ; 0x02255540 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #0x1c + mov r6, #0 + bl sub_02018144 + add r4, r0, #0 + beq _022555AA + add r0, r6, #0 + str r0, [r4, #0x14] + str r0, [r4, #0xc] + str r0, [r4, #4] + str r7, [r4, #0] + str r5, [r4, #0x18] + add r0, r7, #0 + bl sub_020A813C + strh r0, [r4, #0x10] + ldrh r1, [r4, #0x10] + add r0, r5, #0 + lsl r1, r1, #3 + bl sub_02018144 + str r0, [r4, #0x14] + cmp r0, #0 + beq _022555AA + ldrh r2, [r4, #0x10] + mov r1, #0x94 + add r0, r5, #0 + mul r1, r2 + bl sub_02018144 + str r0, [r4, #0xc] + cmp r0, #0 + beq _022555AA + ldrh r1, [r4, #0x10] + add r0, r5, #0 + lsl r1, r1, #2 + bl sub_02018144 + str r0, [r4, #4] + cmp r0, #0 + beq _022555AA + ldrh r2, [r4, #0x10] + ldr r1, [r4, #0xc] + bl ov25_022559D8 + add r0, r6, #0 + strh r0, [r4, #0x12] + str r0, [r4, #8] + mov r6, #1 +_022555AA: + cmp r6, #0 + bne _022555E2 + cmp r4, #0 + beq _022555DE + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _022555BE + add r0, r5, #0 + bl sub_02018238 +_022555BE: + ldr r1, [r4, #0xc] + cmp r1, #0 + beq _022555CA + add r0, r5, #0 + bl sub_02018238 +_022555CA: + ldr r1, [r4, #4] + cmp r1, #0 + beq _022555D6 + add r0, r5, #0 + bl sub_02018238 +_022555D6: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02018238 +_022555DE: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022555E2: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov25_02255540 + + thumb_func_start ov25_022555E8 +ov25_022555E8: ; 0x022555E8 + push {r4, lr} + add r4, r0, #0 + beq _02255612 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _022555F8 + bl sub_020181C4 +_022555F8: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02255602 + bl sub_020181C4 +_02255602: + ldr r0, [r4, #4] + cmp r0, #0 + beq _0225560C + bl sub_020181C4 +_0225560C: + add r0, r4, #0 + bl sub_020181C4 +_02255612: + pop {r4, pc} + thumb_func_end ov25_022555E8 + + thumb_func_start ov25_02255614 +ov25_02255614: ; 0x02255614 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #0xc] + ldrh r0, [r0, #0x12] + cmp r0, #0 + bne _02255622 + b _022557EE +_02255622: + ldr r0, [sp, #0xc] + ldr r4, [r0, #8] + ldr r5, [r0, #0x14] + ldrh r0, [r0, #0x10] + cmp r4, #0 + str r0, [sp, #0x10] + bne _02255632 + b _022557D4 +_02255632: + add r0, r4, #0 + mov r1, #2 + add r0, #8 + lsl r1, r1, #0xc + bl sub_020A8D60 + add r0, r4, #0 + add r0, #0x8a + ldrb r0, [r0] + cmp r0, #0 + beq _0225564A + b _022557CC +_0225564A: + add r6, r4, #0 + add r6, #0x44 + mov r0, #0xc + ldrsh r0, [r6, r0] + ldr r1, [r4, #0x68] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x18] + mov r0, #0xe + ldrsh r0, [r6, r0] + ldr r1, [r4, #0x6c] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x1c] + add r0, r4, #0 + add r0, #0x8b + ldrb r0, [r0] + cmp r0, #0 + bne _0225568A + add r0, sp, #0x18 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + ldr r1, [sp, #0x10] + str r3, [sp, #8] + lsl r1, r1, #0x10 + ldr r2, [r4, #0x38] + add r0, r5, #0 + lsr r1, r1, #0x10 + bl sub_020A8DA0 + b _02255722 +_0225568A: + ldr r0, [r4, #0x70] + bl sub_020BB44C + ldrh r1, [r6, #0x12] + mov r0, #4 + tst r0, r1 + beq _022556BC + add r0, r4, #0 + add r0, #0x90 + ldrh r2, [r6, #0x10] + ldrh r0, [r0] + ldr r1, _022557F4 ; =0x020F983C + add r0, r2, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r3, r0, #2 + add r2, r1, r3 + ldrsh r1, [r1, r3] + mov r3, #2 + ldrsh r2, [r2, r3] + ldr r0, [r4, #0x70] + bl sub_020BB464 + b _022556DA +_022556BC: + add r0, r4, #0 + add r0, #0x90 + ldrh r0, [r0] + cmp r0, #0 + beq _022556DA + asr r0, r0, #4 + lsl r3, r0, #2 + ldr r1, _022557F4 ; =0x020F983C + ldr r0, [r4, #0x70] + add r2, r1, r3 + ldrsh r1, [r1, r3] + mov r3, #2 + ldrsh r2, [r2, r3] + bl sub_020BB464 +_022556DA: + ldrh r1, [r6, #0x12] + mov r0, #2 + tst r0, r1 + beq _022556FE + ldr r0, [r6, #4] + ldr r7, [r4, #0x70] + bl sub_020BCFE0 + str r0, [sp, #0x14] + ldr r0, [r6, #8] + bl sub_020BCFE0 + add r3, r0, #0 + ldr r2, [sp, #0x14] + add r0, r7, #0 + add r1, r7, #0 + bl sub_020BB470 +_022556FE: + ldr r0, [sp, #0xc] + ldr r1, [r4, #0x70] + ldr r0, [r0, #0] + bl sub_020A7D34 + add r1, sp, #0x18 + str r1, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r1, [sp, #0x10] + ldr r2, [r4, #0x38] + lsl r1, r1, #0x10 + ldr r3, [r4, #0x70] + add r0, r5, #0 + lsr r1, r1, #0x10 + bl sub_020A8DA0 +_02255722: + ldr r1, [sp, #0x10] + sub r1, r1, r0 + str r1, [sp, #0x10] + add r1, r0, #0 + sub r0, r0, #1 + cmp r1, #0 + beq _022557CC + ldr r7, _022557F8 ; =0xDFFFFFFF + asr r1, r7, #0x11 +_02255734: + ldr r3, [r5, #4] + ldr r2, _022557FC ; =0xFFFFF3FF + add r6, r4, #0 + and r2, r3 + add r3, r4, #0 + add r3, #0x86 + ldrh r3, [r3] + add r6, #0x88 + lsl r3, r3, #0x1e + lsr r3, r3, #0x14 + orr r2, r3 + str r2, [r5, #4] + ldr r3, _02255800 ; =0xFFFF0FFF + ldrh r6, [r6] + and r3, r2 + lsl r2, r2, #0x10 + lsr r2, r2, #0x1c + add r2, r2, r6 + lsl r2, r2, #0x1c + lsr r2, r2, #0x10 + orr r2, r3 + add r6, r4, #0 + ldr r3, _02255804 ; =0xFFFFFC00 + str r2, [r5, #4] + add r6, #0x8c + and r3, r2 + lsl r2, r2, #0x16 + ldrh r6, [r6] + lsr r2, r2, #0x16 + add r6, r2, r6 + ldr r2, _02255808 ; =0x000003FF + and r2, r6 + orr r2, r3 + add r6, r4, #0 + str r2, [r5, #4] + add r6, #0x8e + ldr r2, [r5, #0] + ldr r3, _0225580C ; =0xEFFFFFFF + ldrb r6, [r6] + and r3, r2 + lsl r2, r2, #3 + lsr r2, r2, #0x1f + eor r2, r6 + lsl r2, r2, #0x1f + lsr r2, r2, #3 + orr r2, r3 + add r6, r4, #0 + add r3, r2, #0 + str r2, [r5, #0] + add r6, #0x8f + lsl r2, r2, #2 + ldrb r6, [r6] + lsr r2, r2, #0x1f + and r3, r7 + eor r2, r6 + lsl r2, r2, #0x1f + lsr r2, r2, #2 + orr r2, r3 + add r6, r4, #0 + add r3, r2, #0 + str r2, [r5, #0] + add r6, #0x92 + lsl r2, r2, #0x13 + ldrb r6, [r6] + lsr r2, r2, #0x1f + and r3, r1 + eor r2, r6 + lsl r2, r2, #0x1f + lsr r2, r2, #0x13 + orr r2, r3 + str r2, [r5, #0] + add r2, r0, #0 + add r5, #8 + sub r0, r0, #1 + cmp r2, #0 + bne _02255734 +_022557CC: + ldr r4, [r4, #0x60] + cmp r4, #0 + beq _022557D4 + b _02255632 +_022557D4: + ldr r0, [sp, #0xc] + ldr r1, [r0, #0x14] + cmp r5, r1 + bls _022557EE + sub r3, r5, r1 + asr r2, r3, #2 + lsr r2, r2, #0x1d + add r2, r3, r2 + lsl r2, r2, #0xd + ldr r0, [r0, #0] + lsr r2, r2, #0x10 + bl sub_020A7B80 +_022557EE: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_022557F4: .word 0x020F983C +_022557F8: .word 0xDFFFFFFF +_022557FC: .word 0xFFFFF3FF +_02255800: .word 0xFFFF0FFF +_02255804: .word 0xFFFFFC00 +_02255808: .word 0x000003FF +_0225580C: .word 0xEFFFFFFF + thumb_func_end ov25_02255614 + + thumb_func_start ov25_02255810 +ov25_02255810: ; 0x02255810 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov25_02255A04 + add r4, r0, #0 + beq _022558AC + ldrb r1, [r5, #0xb] + add r0, #0x86 + strh r1, [r0] + add r0, r4, #0 + ldrb r1, [r5, #0xc] + add r0, #0x84 + strh r1, [r0] + add r0, r7, #0 + add r1, r4, #0 + bl ov25_02255A40 + ldr r0, [r6, #8] + str r0, [r4, #0] + ldr r0, [r6, #0xc] + str r0, [r4, #4] + ldrh r1, [r5, #8] + bl sub_020A6EF0 + add r1, r0, #0 + add r0, r4, #0 + ldr r2, [r4, #0] + add r0, #8 + bl sub_020A8C88 + ldr r1, [r5, #0] + ldr r0, [r5, #4] + str r1, [r4, #0x68] + add r1, r4, #0 + str r0, [r4, #0x6c] + mov r0, #0 + add r1, #0x88 + strh r0, [r1] + add r1, r4, #0 + add r1, #0x8c + strh r0, [r1] + ldrb r2, [r5, #0xa] + mov r1, #1 + tst r2, r1 + beq _02255870 + add r0, r1, #0 +_02255870: + add r1, r4, #0 + add r1, #0x8e + strb r0, [r1] + ldrb r1, [r5, #0xa] + mov r0, #2 + tst r0, r1 + beq _02255882 + mov r1, #1 + b _02255884 +_02255882: + mov r1, #0 +_02255884: + add r0, r4, #0 + add r0, #0x8f + strb r1, [r0] + add r1, r4, #0 + mov r0, #0 + add r1, #0x92 + strb r0, [r1] + add r1, r4, #0 + add r1, #0x90 + strh r0, [r1] + add r1, r4, #0 + add r1, #0x74 + str r1, [r4, #0x70] + add r1, r4, #0 + ldrb r2, [r5, #0xd] + add r1, #0x8b + strb r2, [r1] + add r1, r4, #0 + add r1, #0x8a + strb r0, [r1] +_022558AC: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov25_02255810 + + thumb_func_start ov25_022558B0 +ov25_022558B0: ; 0x022558B0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02255A98 + add r0, r5, #0 + add r1, r4, #0 + bl ov25_02255A1C + pop {r3, r4, r5, pc} + thumb_func_end ov25_022558B0 + + thumb_func_start ov25_022558C4 +ov25_022558C4: ; 0x022558C4 + push {r4, lr} + add r4, r0, #0 + lsl r1, r1, #0x10 + ldr r0, [r4, #4] + lsr r1, r1, #0x10 + bl sub_020A6EF0 + add r1, r0, #0 + add r0, r4, #0 + ldr r2, [r4, #0] + add r0, #8 + bl sub_020A8C88 + pop {r4, pc} + thumb_func_end ov25_022558C4 + + thumb_func_start ov25_022558E0 +ov25_022558E0: ; 0x022558E0 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _022558EA + mov r0, #1 + bx lr +_022558EA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov25_022558E0 + + thumb_func_start ov25_022558F0 +ov25_022558F0: ; 0x022558F0 + ldr r3, [r0, #0x68] + add r1, r3, r1 + str r1, [r0, #0x68] + ldr r1, [r0, #0x6c] + add r1, r1, r2 + str r1, [r0, #0x6c] + bx lr + ; .align 2, 0 + thumb_func_end ov25_022558F0 + + thumb_func_start ov25_02255900 +ov25_02255900: ; 0x02255900 + str r1, [r0, #0x68] + str r2, [r0, #0x6c] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255900 + + thumb_func_start ov25_02255908 +ov25_02255908: ; 0x02255908 + ldr r3, [r0, #0x68] + str r3, [r1, #0] + ldr r0, [r0, #0x6c] + str r0, [r2, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255908 + + thumb_func_start ov25_02255914 +ov25_02255914: ; 0x02255914 + add r0, #0x8a + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255914 + + thumb_func_start ov25_0225591C +ov25_0225591C: ; 0x0225591C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + bl ov25_02255A98 + add r0, r5, #0 + add r0, #0x84 + strh r4, [r0] + add r0, r6, #0 + add r1, r5, #0 + bl ov25_02255A40 + pop {r4, r5, r6, pc} + thumb_func_end ov25_0225591C + + thumb_func_start ov25_02255938 +ov25_02255938: ; 0x02255938 + add r0, #0x88 + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255938 + + thumb_func_start ov25_02255940 +ov25_02255940: ; 0x02255940 + add r0, #0x8c + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255940 + + thumb_func_start ov25_02255948 +ov25_02255948: ; 0x02255948 + add r0, #0x92 + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255948 + + thumb_func_start ov25_02255950 +ov25_02255950: ; 0x02255950 + add r0, #0x90 + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255950 + + thumb_func_start ov25_02255958 +ov25_02255958: ; 0x02255958 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r5, r0, #0 + add r6, r1, #0 + add r1, r2, #0 + add r7, r3, #0 + str r4, [r5, #0x10] + add r0, r6, #0 + add r2, r4, #0 + bl sub_02006FD8 + str r0, [r5, #0] + add r0, r6, #0 + add r1, r7, #0 + add r2, r4, #0 + bl sub_02006FD8 + str r0, [r5, #4] + ldr r0, [r5, #0] + cmp r0, #0 + beq _022559AA + ldr r1, [r5, #4] + cmp r1, #0 + beq _022559AA + add r1, r5, #0 + add r1, #8 + bl sub_020A6F38 + cmp r0, #0 + bne _02255998 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02255998: + ldr r0, [r5, #4] + add r5, #0xc + add r1, r5, #0 + bl sub_020A6D94 + cmp r0, #0 + bne _022559AA + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022559AA: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov25_02255958 + + thumb_func_start ov25_022559B0 +ov25_022559B0: ; 0x022559B0 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _022559C4 + ldr r0, [r4, #0x10] + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0] +_022559C4: + ldr r1, [r4, #4] + cmp r1, #0 + beq _022559D4 + ldr r0, [r4, #0x10] + bl sub_02018238 + mov r0, #0 + str r0, [r4, #4] +_022559D4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov25_022559B0 + + thumb_func_start ov25_022559D8 +ov25_022559D8: ; 0x022559D8 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r1, #0 + sub r6, r6, #1 + cmp r0, #0 + beq _022559FA +_022559E8: + add r0, r4, #0 + stmia r5!, {r4} + bl ov25_022559FC + add r0, r6, #0 + add r4, #0x94 + sub r6, r6, #1 + cmp r0, #0 + bne _022559E8 +_022559FA: + pop {r4, r5, r6, pc} + thumb_func_end ov25_022559D8 + + thumb_func_start ov25_022559FC +ov25_022559FC: ; 0x022559FC + mov r1, #0 + str r1, [r0, #0x60] + str r1, [r0, #0x64] + bx lr + thumb_func_end ov25_022559FC + + thumb_func_start ov25_02255A04 +ov25_02255A04: ; 0x02255A04 + ldrh r2, [r0, #0x12] + ldrh r1, [r0, #0x10] + cmp r2, r1 + bhs _02255A18 + add r1, r2, #1 + strh r1, [r0, #0x12] + ldr r1, [r0, #4] + lsl r0, r2, #2 + ldr r0, [r1, r0] + bx lr +_02255A18: + mov r0, #0 + bx lr + thumb_func_end ov25_02255A04 + + thumb_func_start ov25_02255A1C +ov25_02255A1C: ; 0x02255A1C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrh r0, [r5, #0x12] + add r4, r1, #0 + cmp r0, #0 + beq _02255A3C + add r0, r4, #0 + bl ov25_022559FC + ldrh r0, [r5, #0x12] + sub r0, r0, #1 + strh r0, [r5, #0x12] + ldrh r0, [r5, #0x12] + ldr r1, [r5, #4] + lsl r0, r0, #2 + str r4, [r1, r0] +_02255A3C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov25_02255A1C + + thumb_func_start ov25_02255A40 +ov25_02255A40: ; 0x02255A40 + push {r4, r5} + ldr r3, [r0, #8] + cmp r3, #0 + bne _02255A54 + str r1, [r0, #8] + mov r0, #0 + str r0, [r1, #0x60] + str r0, [r1, #0x64] + pop {r4, r5} + bx lr +_02255A54: + add r4, r1, #0 + add r4, #0x84 + ldr r5, [r4, #0] + add r2, r3, #0 +_02255A5C: + add r4, r2, #0 + add r4, #0x84 + ldr r4, [r4, #0] + cmp r5, r4 + bhs _02255A7E + cmp r2, r3 + bne _02255A6C + str r1, [r0, #8] +_02255A6C: + ldr r0, [r2, #0x64] + str r0, [r1, #0x64] + cmp r0, #0 + beq _02255A76 + str r1, [r0, #0x60] +_02255A76: + str r2, [r1, #0x60] + str r1, [r2, #0x64] + pop {r4, r5} + bx lr +_02255A7E: + ldr r4, [r2, #0x60] + cmp r4, #0 + bne _02255A90 + str r1, [r2, #0x60] + str r2, [r1, #0x64] + mov r0, #0 + str r0, [r1, #0x60] + pop {r4, r5} + bx lr +_02255A90: + add r2, r4, #0 + b _02255A5C + thumb_func_end ov25_02255A40 +_02255A94: + .byte 0x30, 0xBC, 0x70, 0x47 + + thumb_func_start ov25_02255A98 +ov25_02255A98: ; 0x02255A98 + ldr r2, [r1, #0x64] + cmp r2, #0 + beq _02255AB4 + ldr r0, [r1, #0x60] + cmp r0, #0 + beq _02255AAE + str r0, [r2, #0x60] + ldr r2, [r1, #0x64] + ldr r0, [r1, #0x60] + str r2, [r0, #0x64] + bx lr +_02255AAE: + mov r0, #0 + str r0, [r2, #0x60] + bx lr +_02255AB4: + ldr r3, [r1, #0x60] + cmp r3, #0 + beq _02255AC4 + mov r2, #0 + str r2, [r3, #0x64] + ldr r1, [r1, #0x60] + str r1, [r0, #8] + bx lr +_02255AC4: + mov r1, #0 + str r1, [r0, #8] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255A98 \ No newline at end of file diff --git a/asm/ov25_02255ACC.s b/asm/ov25_02255ACC.s new file mode 100644 index 000000000..43fb08e98 --- /dev/null +++ b/asm/ov25_02255ACC.s @@ -0,0 +1,462 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov25_02255ACC +ov25_02255ACC: ; 0x02255ACC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r7, r1, #0 + str r2, [sp] + str r3, [sp, #4] + ldr r5, [sp, #0x20] + bne _02255AE0 + bl sub_02022974 +_02255AE0: + add r0, r5, #0 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + beq _02255B2E + ldr r0, [sp] + str r5, [r4, #8] + str r0, [r4, #4] + str r6, [r4, #0] + mov r1, #0xe + ldr r0, [sp, #4] + str r7, [r4, #0xc] + str r0, [r4, #0x10] + add r0, r5, #0 + mul r1, r7 + bl sub_02018144 + str r0, [r4, #0x14] + cmp r0, #0 + beq _02255B24 + mov r6, #0 + cmp r7, #0 + bls _02255B2E + add r5, r6, #0 +_02255B12: + ldr r0, [r4, #0x14] + add r0, r0, r5 + bl ov25_02255C80 + add r6, r6, #1 + add r5, #0xe + cmp r6, r7 + blo _02255B12 + b _02255B2E +_02255B24: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02018238 + mov r4, #0 +_02255B2E: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov25_02255ACC + + thumb_func_start ov25_02255B34 +ov25_02255B34: ; 0x02255B34 + push {r4, lr} + add r4, r0, #0 + bne _02255B3E + bl sub_02022974 +_02255B3E: + ldr r0, [r4, #8] + ldr r1, [r4, #0x14] + bl sub_02018238 + ldr r0, [r4, #8] + add r1, r4, #0 + bl sub_02018238 + pop {r4, pc} + thumb_func_end ov25_02255B34 + + thumb_func_start ov25_02255B50 +ov25_02255B50: ; 0x02255B50 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + bl sub_0202278C + str r0, [sp, #4] + cmp r0, #0 + beq _02255BA8 + bl sub_02022798 + ldr r1, [r5, #0xc] + mov r7, #0 + str r0, [sp] + cmp r1, #0 + bls _02255BCE + add r4, r7, #0 + add r6, r7, #0 +_02255B72: + ldr r0, [r5, #0x14] + add r1, r0, r4 + ldrb r0, [r1, #1] + strb r0, [r1, #2] + ldr r0, [r5, #0x14] + add r0, r0, r4 + ldrb r0, [r0, #1] + cmp r0, #0 + ldr r0, [r5, #0] + beq _02255B8E + add r0, r0, r6 + bl sub_02022734 + b _02255B94 +_02255B8E: + add r0, r0, r6 + bl sub_02022760 +_02255B94: + ldr r1, [r5, #0x14] + add r7, r7, #1 + add r1, r1, r4 + strb r0, [r1, #1] + ldr r1, [r5, #0xc] + add r4, #0xe + add r6, r6, #4 + cmp r7, r1 + blo _02255B72 + b _02255BCE +_02255BA8: + ldr r1, [r5, #0xc] + mov r2, #0 + str r2, [sp] + cmp r1, #0 + bls _02255BCE + add r0, r2, #0 + add r3, r2, #0 +_02255BB6: + ldr r1, [r5, #0x14] + add r2, r2, #1 + add r4, r1, r0 + ldrb r1, [r4, #1] + strb r1, [r4, #2] + ldr r1, [r5, #0x14] + add r1, r1, r0 + strb r3, [r1, #1] + ldr r1, [r5, #0xc] + add r0, #0xe + cmp r2, r1 + blo _02255BB6 +_02255BCE: + mov r6, #0 + cmp r1, #0 + bls _02255C14 + ldr r7, _02255C44 ; =0x0225607C + add r4, r6, #0 +_02255BD8: + ldr r3, [r5, #0x14] + ldr r1, [sp, #4] + add r0, r3, r4 + ldrb r3, [r3, r4] + ldr r2, [sp] + lsl r3, r3, #2 + ldr r3, [r7, r3] + blx r3 + add r1, r0, #0 + ldr r0, [r5, #0x14] + add r0, r0, r4 + ldrb r2, [r0, #1] + ldrb r0, [r0, #2] + cmp r2, r0 + bne _02255BF8 + mov r2, #2 +_02255BF8: + cmp r1, #0 + bne _02255C00 + cmp r2, #2 + beq _02255C0A +_02255C00: + ldr r3, [r5, #0x10] + ldr r4, [r5, #4] + add r0, r6, #0 + blx r4 + b _02255C14 +_02255C0A: + ldr r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0xe + cmp r6, r0 + blo _02255BD8 +_02255C14: + ldr r0, [r5, #0xc] + add r6, r6, #1 + cmp r6, r0 + bhs _02255C3E + mov r0, #0xe + add r4, r6, #0 + ldr r7, _02255C44 ; =0x0225607C + mul r4, r0 +_02255C24: + ldr r3, [r5, #0x14] + ldr r1, [sp, #4] + add r0, r3, r4 + ldrb r3, [r3, r4] + ldr r2, [sp] + lsl r3, r3, #2 + ldr r3, [r7, r3] + blx r3 + ldr r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0xe + cmp r6, r0 + blo _02255C24 +_02255C3E: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02255C44: .word 0x0225607C + thumb_func_end ov25_02255B50 + + thumb_func_start ov25_02255C48 +ov25_02255C48: ; 0x02255C48 + push {r3, r4} + ldr r4, [r0, #0x14] + mov r0, #0xe + mul r0, r1 + add r1, r4, r0 + lsl r0, r2, #1 + add r0, r1, r0 + strh r3, [r0, #8] + pop {r3, r4} + bx lr + thumb_func_end ov25_02255C48 + + thumb_func_start ov25_02255C5C +ov25_02255C5C: ; 0x02255C5C + ldr r3, [r0, #0x14] + mov r0, #0xe + mul r0, r1 + add r0, r3, r0 + strh r2, [r0, #0xc] + bx lr + thumb_func_end ov25_02255C5C + + thumb_func_start ov25_02255C68 +ov25_02255C68: ; 0x02255C68 + add r3, r1, #0 + mov r2, #0xe + mul r3, r2 + ldr r1, [r0, #0x14] + mov r2, #0 + add r1, r1, r3 + strh r2, [r1, #4] + ldr r0, [r0, #0x14] + mov r1, #4 + strb r1, [r0, r3] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255C68 + + thumb_func_start ov25_02255C80 +ov25_02255C80: ; 0x02255C80 + mov r2, #0 + strb r2, [r0] + strb r2, [r0, #1] + strb r2, [r0, #2] + strh r2, [r0, #4] + strh r2, [r0, #6] + add r3, r0, #0 + add r1, r2, #0 +_02255C90: + add r2, r2, #1 + strh r1, [r3, #8] + add r3, r3, #2 + cmp r2, #2 + blo _02255C90 + strh r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255C80 + + thumb_func_start ov25_02255CA0 +ov25_02255CA0: ; 0x02255CA0 + strb r1, [r0] + mov r1, #0 + strh r1, [r0, #4] + bx lr + thumb_func_end ov25_02255CA0 + + thumb_func_start ov25_02255CA8 +ov25_02255CA8: ; 0x02255CA8 + strb r1, [r0] + bx lr + thumb_func_end ov25_02255CA8 + + thumb_func_start ov25_02255CAC +ov25_02255CAC: ; 0x02255CAC + ldrh r2, [r0, #4] + ldr r1, _02255CBC ; =0x0000FFFF + cmp r2, r1 + bhs _02255CB8 + add r1, r2, #1 + strh r1, [r0, #4] +_02255CB8: + bx lr + nop +_02255CBC: .word 0x0000FFFF + thumb_func_end ov25_02255CAC + + thumb_func_start ov25_02255CC0 +ov25_02255CC0: ; 0x02255CC0 + ldrh r3, [r0, #4] + mov r2, #0 +_02255CC4: + ldrh r1, [r0, #8] + cmp r3, r1 + bne _02255CCE + add r0, r2, #5 + bx lr +_02255CCE: + add r2, r2, #1 + add r0, r0, #2 + cmp r2, #2 + blo _02255CC4 + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov25_02255CC0 + + thumb_func_start ov25_02255CDC +ov25_02255CDC: ; 0x02255CDC + push {r3, lr} + ldrb r1, [r0, #1] + cmp r1, #0 + beq _02255CF2 + cmp r2, #0 + beq _02255CF2 + mov r1, #1 + bl ov25_02255CA0 + mov r0, #1 + pop {r3, pc} +_02255CF2: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov25_02255CDC + + thumb_func_start ov25_02255CF8 +ov25_02255CF8: ; 0x02255CF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov25_02255CAC + ldrb r0, [r5, #1] + cmp r0, #0 + beq _02255D26 + add r0, r5, #0 + bl ov25_02255CC0 + cmp r0, #0 + bne _02255D54 + ldrh r1, [r5, #0xc] + cmp r1, #0 + beq _02255D52 + ldrh r0, [r5, #4] + cmp r0, r1 + blo _02255D52 + mov r0, #0 + strh r0, [r5, #4] + mov r0, #7 + pop {r3, r4, r5, pc} +_02255D26: + cmp r4, #0 + beq _02255D36 + add r0, r5, #0 + mov r1, #0 + bl ov25_02255CA0 + mov r0, #2 + pop {r3, r4, r5, pc} +_02255D36: + ldrh r0, [r5, #6] + cmp r0, #0 + beq _02255D46 + add r0, r5, #0 + mov r1, #2 + bl ov25_02255CA8 + b _02255D52 +_02255D46: + add r0, r5, #0 + mov r1, #0 + bl ov25_02255CA0 + mov r0, #3 + pop {r3, r4, r5, pc} +_02255D52: + mov r0, #0 +_02255D54: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov25_02255CF8 + + thumb_func_start ov25_02255D58 +ov25_02255D58: ; 0x02255D58 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + bl ov25_02255CAC + ldrh r1, [r5, #4] + ldrh r0, [r5, #6] + cmp r1, r0 + bls _02255D76 + add r0, r5, #0 + mov r1, #0 + bl ov25_02255CA0 + mov r0, #3 + pop {r3, r4, r5, pc} +_02255D76: + ldrb r0, [r5, #1] + cmp r0, #0 + beq _02255D8C + cmp r4, #0 + beq _02255D8C + add r0, r5, #0 + mov r1, #3 + bl ov25_02255CA0 + mov r0, #4 + pop {r3, r4, r5, pc} +_02255D8C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov25_02255D58 + + thumb_func_start ov25_02255D90 +ov25_02255D90: ; 0x02255D90 + push {r3, lr} + ldrb r1, [r0, #1] + cmp r1, #0 + beq _02255D9E + bl ov25_02255CAC + b _02255DA4 +_02255D9E: + mov r1, #0 + bl ov25_02255CA0 +_02255DA4: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov25_02255D90 + + thumb_func_start ov25_02255DA8 +ov25_02255DA8: ; 0x02255DA8 + push {r3, lr} + ldrb r1, [r0, #1] + cmp r1, #0 + bne _02255DB6 + mov r1, #0 + bl ov25_02255CA0 +_02255DB6: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov25_02255DA8 + + .rodata + + + .global Unk_ov25_0225607C +Unk_ov25_0225607C: ; 0x0225607C + .incbin "incbin/overlay25_rodata.bin", 0x21C, 0x14 + diff --git a/asm/ov25_02255DBC.s b/asm/ov25_02255DBC.s new file mode 100644 index 000000000..8cd15bb97 --- /dev/null +++ b/asm/ov25_02255DBC.s @@ -0,0 +1,120 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov25_02255DBC +ov25_02255DBC: ; 0x02255DBC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0x1e + blo _02255DCE + bl sub_02022974 +_02255DCE: + cmp r4, #0x21 + blo _02255DD6 + bl sub_02022974 +_02255DD6: + cmp r5, #0x1e + blo _02255DDC + mov r5, #0 +_02255DDC: + cmp r4, #0x21 + blo _02255DE2 + mov r4, #0 +_02255DE2: + ldr r0, _02255DF4 ; =0x022560B0 + lsl r1, r5, #1 + ldrh r0, [r0, r1] + lsl r1, r4, #1 + str r0, [r6, #0] + ldr r0, _02255DF8 ; =0x022560EC + ldrh r0, [r0, r1] + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02255DF4: .word 0x022560B0 +_02255DF8: .word 0x022560EC + thumb_func_end ov25_02255DBC + + thumb_func_start ov25_02255DFC +ov25_02255DFC: ; 0x02255DFC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #4 + blo _02255E0C + bl sub_02022974 +_02255E0C: + ldr r0, _02255E1C ; =0x02256090 + lsl r1, r5, #3 + ldr r0, [r0, r1] + str r0, [r4, #0] + ldr r0, _02255E20 ; =0x02256094 + ldr r0, [r0, r1] + str r0, [r6, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02255E1C: .word 0x02256090 +_02255E20: .word 0x02256094 + thumb_func_end ov25_02255DFC + + thumb_func_start ov25_02255E24 +ov25_02255E24: ; 0x02255E24 + push {r4, r5} + ldr r5, _02255E54 ; =0x0225612E + mov r4, #0 +_02255E2A: + ldrh r3, [r5] + cmp r0, r3 + bne _02255E44 + ldr r0, _02255E58 ; =0x02256130 + lsl r3, r4, #2 + ldrb r0, [r0, r3] + str r0, [r1, #0] + ldr r0, _02255E5C ; =0x02256131 + ldrb r0, [r0, r3] + str r0, [r2, #0] + mov r0, #1 + pop {r4, r5} + bx lr +_02255E44: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x1d + blo _02255E2A + mov r0, #0 + pop {r4, r5} + bx lr + nop +_02255E54: .word 0x0225612E +_02255E58: .word 0x02256130 +_02255E5C: .word 0x02256131 + thumb_func_end ov25_02255E24 + + .rodata + + + .global Unk_ov25_02256090 +Unk_ov25_02256090: ; 0x02256090 + .incbin "incbin/overlay25_rodata.bin", 0x230, 0x250 - 0x230 + + .global Unk_ov25_022560B0 +Unk_ov25_022560B0: ; 0x022560B0 + .incbin "incbin/overlay25_rodata.bin", 0x250, 0x28C - 0x250 + + .global Unk_ov25_022560EC +Unk_ov25_022560EC: ; 0x022560EC + .incbin "incbin/overlay25_rodata.bin", 0x28C, 0x2CE - 0x28C + + .global Unk_ov25_0225612E +Unk_ov25_0225612E: ; 0x0225612E + .incbin "incbin/overlay25_rodata.bin", 0x2CE, 0x74 + diff --git a/asm/ov26_022561C0.s b/asm/ov26_022561C0.s new file mode 100644 index 000000000..e7c09778f --- /dev/null +++ b/asm/ov26_022561C0.s @@ -0,0 +1,344 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov26_022561C0 +ov26_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov26_022561D4 + ldr r1, _022561D0 ; =ov26_022562F8 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov26_022561D4 +_022561D0: .word ov26_022562F8 + thumb_func_end ov26_022561C0 + + thumb_func_start ov26_022561D4 +ov26_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x2c + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov26_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov26_022562BC + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov26_022562BC + thumb_func_end ov26_022561D4 + + thumb_func_start ov26_0225621C +ov26_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r1, r5, #0 + add r0, #0x24 + add r1, #0x14 + bl ov26_02256404 + cmp r0, #0 + beq _02256298 + mov r1, #0 + strb r1, [r5] + strb r1, [r5, #1] + strb r1, [r5, #2] + mov r0, #1 + strb r0, [r5, #3] + strb r1, [r5, #7] + add r0, r5, #0 + str r1, [r5, #0x20] + add r0, #0x14 + bl sub_02013880 + ldr r0, [r5, #0x14] + cmp r0, #0x18 + blo _02256256 + mov r1, #0x18 + bl sub_020E2178 + str r1, [r5, #0x14] +_02256256: + ldr r0, [r5, #0x18] + cmp r0, #0x3c + blo _02256270 + ldr r0, [r5, #0x14] + mov r1, #0x3c + bl sub_020E2178 + str r1, [r5, #0x14] + ldr r0, [r5, #0x18] + mov r1, #0x3c + bl sub_020E2178 + str r1, [r5, #0x18] +_02256270: + ldr r0, [r5, #0x18] + ldr r2, _0225629C ; =ov26_02256300 + strb r0, [r5, #6] + ldr r0, [r5, #0x14] + mov r1, #1 + strb r0, [r5, #5] + mov r0, #8 + str r0, [sp] + ldr r0, _022562A0 ; =0x02256718 + add r3, r5, #0 + bl ov25_02255ACC + str r0, [r5, #0x10] + cmp r0, #0 + bne _02256292 + mov r0, #0 + pop {r3, r4, r5, pc} +_02256292: + str r4, [r5, #0x28] + mov r0, #1 + pop {r3, r4, r5, pc} +_02256298: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225629C: .word ov26_02256300 +_022562A0: .word 0x02256718 + thumb_func_end ov26_0225621C + + thumb_func_start ov26_022562A4 +ov26_022562A4: ; 0x022562A4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + bl ov26_0225649C + ldr r0, [r4, #0x10] + bl ov25_02255B34 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov26_022562A4 + + thumb_func_start ov26_022562BC +ov26_022562BC: ; 0x022562BC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _022562F2 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x10] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _022562F4 ; =0x0225671C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562F2 + add r0, r4, #0 + bl ov26_022562A4 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x28] + bl ov25_02254260 +_022562F2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022562F4: .word 0x0225671C + thumb_func_end ov26_022562BC + + thumb_func_start ov26_022562F8 +ov26_022562F8: ; 0x022562F8 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov26_022562F8 + + thumb_func_start ov26_02256300 +ov26_02256300: ; 0x02256300 + cmp r2, #0 + beq _02256310 + cmp r2, #1 + bne _02256318 + mov r0, #1 + str r0, [r3, #0x20] + strb r0, [r3, #7] + bx lr +_02256310: + mov r0, #0 + str r0, [r3, #0x20] + mov r0, #1 + strb r0, [r3, #7] +_02256318: + bx lr + ; .align 2, 0 + thumb_func_end ov26_02256300 + + thumb_func_start ov26_0225631C +ov26_0225631C: ; 0x0225631C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256324 + b _02256326 +_02256324: + mov r1, #2 +_02256326: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov26_0225631C + + thumb_func_start ov26_02256330 +ov26_02256330: ; 0x02256330 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256340 + cmp r0, #1 + beq _02256350 + b _0225636A +_02256340: + ldr r0, [r4, #0x24] + mov r1, #0 + bl ov26_022564A8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225636A +_02256350: + ldr r0, [r4, #0x24] + mov r1, #0 + bl ov26_022564CC + cmp r0, #0 + beq _0225636A + ldr r0, [r4, #0x28] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov26_0225631C +_0225636A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov26_02256330 + + thumb_func_start ov26_02256370 +ov26_02256370: ; 0x02256370 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256384 + mov r1, #2 + bl ov26_0225631C + mov r0, #0 + pop {r4, pc} +_02256384: + ldrb r0, [r4, #7] + cmp r0, #0 + beq _02256396 + mov r0, #0 + strb r0, [r4, #7] + ldr r0, [r4, #0x24] + mov r1, #2 + bl ov26_022564A8 +_02256396: + ldr r0, [r4, #0x24] + mov r1, #1 + bl ov26_022564CC + cmp r0, #0 + beq _022563CA + ldr r0, [r4, #0x18] + strb r0, [r4, #6] + ldr r0, [r4, #0x14] + strb r0, [r4, #5] + add r0, r4, #0 + add r0, #0x14 + bl sub_02013880 + ldrb r1, [r4, #6] + ldr r0, [r4, #0x18] + cmp r1, r0 + bne _022563C2 + ldrb r1, [r4, #5] + ldr r0, [r4, #0x14] + cmp r1, r0 + beq _022563CA +_022563C2: + ldr r0, [r4, #0x24] + mov r1, #1 + bl ov26_022564A8 +_022563CA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov26_02256370 + + thumb_func_start ov26_022563D0 +ov26_022563D0: ; 0x022563D0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563E0 + cmp r0, #1 + beq _022563F0 + b _022563FE +_022563E0: + ldr r0, [r4, #0x24] + mov r1, #3 + bl ov26_022564A8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563FE +_022563F0: + ldr r0, [r4, #0x24] + bl ov26_022564D8 + cmp r0, #0 + beq _022563FE + mov r0, #1 + pop {r4, pc} +_022563FE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov26_022563D0 + + .rodata + + + .global Unk_ov26_02256718 +Unk_ov26_02256718: ; 0x02256718 + .incbin "incbin/overlay26_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov26_0225671C +Unk_ov26_0225671C: ; 0x0225671C + .incbin "incbin/overlay26_rodata.bin", 0x4, 0xC + + .section .sinit, 4 + .word ov26_022561C0 diff --git a/asm/overlay26.s b/asm/ov26_02256404.s similarity index 55% rename from asm/overlay26.s rename to asm/ov26_02256404.s index ccbdcdc4c..3de965e31 100644 --- a/asm/overlay26.s +++ b/asm/ov26_02256404.s @@ -1,330 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov26_022561C0 -ov26_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov26_022561D4 - ldr r1, _022561D0 ; =ov26_022562F8 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov26_022561D4 -_022561D0: .word ov26_022562F8 - thumb_func_end ov26_022561C0 - - thumb_func_start ov26_022561D4 -ov26_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x2c - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov26_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov26_022562BC - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov26_022562BC - thumb_func_end ov26_022561D4 - - thumb_func_start ov26_0225621C -ov26_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r1, r5, #0 - add r0, #0x24 - add r1, #0x14 - bl ov26_02256404 - cmp r0, #0 - beq _02256298 - mov r1, #0 - strb r1, [r5] - strb r1, [r5, #1] - strb r1, [r5, #2] - mov r0, #1 - strb r0, [r5, #3] - strb r1, [r5, #7] - add r0, r5, #0 - str r1, [r5, #0x20] - add r0, #0x14 - bl sub_02013880 - ldr r0, [r5, #0x14] - cmp r0, #0x18 - blo _02256256 - mov r1, #0x18 - bl sub_020E2178 - str r1, [r5, #0x14] -_02256256: - ldr r0, [r5, #0x18] - cmp r0, #0x3c - blo _02256270 - ldr r0, [r5, #0x14] - mov r1, #0x3c - bl sub_020E2178 - str r1, [r5, #0x14] - ldr r0, [r5, #0x18] - mov r1, #0x3c - bl sub_020E2178 - str r1, [r5, #0x18] -_02256270: - ldr r0, [r5, #0x18] - ldr r2, _0225629C ; =ov26_02256300 - strb r0, [r5, #6] - ldr r0, [r5, #0x14] - mov r1, #1 - strb r0, [r5, #5] - mov r0, #8 - str r0, [sp] - ldr r0, _022562A0 ; =0x02256718 - add r3, r5, #0 - bl ov25_02255ACC - str r0, [r5, #0x10] - cmp r0, #0 - bne _02256292 - mov r0, #0 - pop {r3, r4, r5, pc} -_02256292: - str r4, [r5, #0x28] - mov r0, #1 - pop {r3, r4, r5, pc} -_02256298: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225629C: .word ov26_02256300 -_022562A0: .word 0x02256718 - thumb_func_end ov26_0225621C - - thumb_func_start ov26_022562A4 -ov26_022562A4: ; 0x022562A4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - bl ov26_0225649C - ldr r0, [r4, #0x10] - bl ov25_02255B34 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov26_022562A4 - - thumb_func_start ov26_022562BC -ov26_022562BC: ; 0x022562BC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _022562F2 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x10] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _022562F4 ; =0x0225671C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562F2 - add r0, r4, #0 - bl ov26_022562A4 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x28] - bl ov25_02254260 -_022562F2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022562F4: .word 0x0225671C - thumb_func_end ov26_022562BC - - thumb_func_start ov26_022562F8 -ov26_022562F8: ; 0x022562F8 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov26_022562F8 - - thumb_func_start ov26_02256300 -ov26_02256300: ; 0x02256300 - cmp r2, #0 - beq _02256310 - cmp r2, #1 - bne _02256318 - mov r0, #1 - str r0, [r3, #0x20] - strb r0, [r3, #7] - bx lr -_02256310: - mov r0, #0 - str r0, [r3, #0x20] - mov r0, #1 - strb r0, [r3, #7] -_02256318: - bx lr - ; .align 2, 0 - thumb_func_end ov26_02256300 - - thumb_func_start ov26_0225631C -ov26_0225631C: ; 0x0225631C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256324 - b _02256326 -_02256324: - mov r1, #2 -_02256326: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov26_0225631C - - thumb_func_start ov26_02256330 -ov26_02256330: ; 0x02256330 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256340 - cmp r0, #1 - beq _02256350 - b _0225636A -_02256340: - ldr r0, [r4, #0x24] - mov r1, #0 - bl ov26_022564A8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225636A -_02256350: - ldr r0, [r4, #0x24] - mov r1, #0 - bl ov26_022564CC - cmp r0, #0 - beq _0225636A - ldr r0, [r4, #0x28] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov26_0225631C -_0225636A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov26_02256330 - - thumb_func_start ov26_02256370 -ov26_02256370: ; 0x02256370 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256384 - mov r1, #2 - bl ov26_0225631C - mov r0, #0 - pop {r4, pc} -_02256384: - ldrb r0, [r4, #7] - cmp r0, #0 - beq _02256396 - mov r0, #0 - strb r0, [r4, #7] - ldr r0, [r4, #0x24] - mov r1, #2 - bl ov26_022564A8 -_02256396: - ldr r0, [r4, #0x24] - mov r1, #1 - bl ov26_022564CC - cmp r0, #0 - beq _022563CA - ldr r0, [r4, #0x18] - strb r0, [r4, #6] - ldr r0, [r4, #0x14] - strb r0, [r4, #5] - add r0, r4, #0 - add r0, #0x14 - bl sub_02013880 - ldrb r1, [r4, #6] - ldr r0, [r4, #0x18] - cmp r1, r0 - bne _022563C2 - ldrb r1, [r4, #5] - ldr r0, [r4, #0x14] - cmp r1, r0 - beq _022563CA -_022563C2: - ldr r0, [r4, #0x24] - mov r1, #1 - bl ov26_022564A8 -_022563CA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov26_02256370 - - thumb_func_start ov26_022563D0 -ov26_022563D0: ; 0x022563D0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563E0 - cmp r0, #1 - beq _022563F0 - b _022563FE -_022563E0: - ldr r0, [r4, #0x24] - mov r1, #3 - bl ov26_022564A8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563FE -_022563F0: - ldr r0, [r4, #0x24] - bl ov26_022564D8 - cmp r0, #0 - beq _022563FE - mov r0, #1 - pop {r4, pc} -_022563FE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov26_022563D0 thumb_func_start ov26_02256404 ov26_02256404: ; 0x02256404 @@ -733,14 +413,15 @@ _0225670C: .word 0x04000280 _02256710: .word 0x040002A0 _02256714: .word 0x040002A8 thumb_func_end ov26_022565F4 - ; 0x02256718 - .rodata - .incbin "incbin/overlay26_rodata.bin" - .section .sinit, 4 - .word ov26_022561C0 - .bss - .space 0x0 + .global Unk_ov26_02256728 +Unk_ov26_02256728: ; 0x02256728 + .incbin "incbin/overlay26_rodata.bin", 0x10, 0x2C - 0x10 + + .global Unk_ov26_02256744 +Unk_ov26_02256744: ; 0x02256744 + .incbin "incbin/overlay26_rodata.bin", 0x2C, 0x3C + diff --git a/asm/ov27_022561C0.s b/asm/ov27_022561C0.s new file mode 100644 index 000000000..9f95a957a --- /dev/null +++ b/asm/ov27_022561C0.s @@ -0,0 +1,891 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov27_022561C0 +ov27_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov27_022561D4 + ldr r1, _022561D0 ; =ov27_02256358 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov27_022561D4 +_022561D0: .word ov27_02256358 + thumb_func_end ov27_022561C0 + + thumb_func_start ov27_022561D4 +ov27_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x68 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r2, [sp] + add r1, r7, #0 + bl ov27_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov27_022562FC + add r1, r4, #0 + mov r2, #1 + str r6, [r4, #0x64] + bl sub_0200D9E8 + cmp r0, #0 + beq _02256212 + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov27_022562FC + thumb_func_end ov27_022561D4 + + thumb_func_start ov27_0225621C +ov27_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r1, r5, #0 + str r2, [r5, #8] + add r0, r2, #0 + add r1, #0x38 + mov r2, #0x24 + bl sub_02099D7C + cmp r0, #0 + beq _02256270 + add r0, r5, #0 + add r0, #0x4c + ldmia r0!, {r2, r3} + add r0, r5, #0 + add r0, #0xc + stmia r0!, {r2, r3} + add r0, r5, #0 + add r0, #0x54 + ldmia r0!, {r2, r3} + add r0, r5, #0 + add r0, #0x14 + stmia r0!, {r2, r3} + ldr r0, [r5, #0x3c] + str r0, [r5, #0x30] + ldr r0, [r5, #0x40] + str r0, [r5, #0x2c] + ldr r0, [r5, #0x44] + str r0, [r5, #0x28] + ldr r0, [r5, #0x48] + str r0, [r5, #0x24] + ldr r0, [r5, #0x38] + str r0, [r5, #0x1c] + cmp r0, #0 + beq _0225626A + mov r0, #2 + str r0, [r5, #0x34] + b _0225627A +_0225626A: + mov r0, #0 + str r0, [r5, #0x34] + b _0225627A +_02256270: + add r0, r5, #0 + bl ov27_02256664 + mov r0, #0 + str r0, [r5, #0x34] +_0225627A: + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x60 + add r1, #0x1c + add r2, r4, #0 + bl ov27_0225680C + cmp r0, #0 + beq _022562A6 + mov r1, #0 + strb r1, [r5] + strb r1, [r5, #1] + ldrb r0, [r5] + strb r0, [r5, #3] + add r0, r5, #0 + strb r1, [r5, #2] + bl ov27_02256608 + cmp r0, #0 + beq _022562A6 + mov r0, #1 + pop {r3, r4, r5, pc} +_022562A6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov27_0225621C + + thumb_func_start ov27_022562AC +ov27_022562AC: ; 0x022562AC + push {r4, lr} + add r4, r0, #0 + add r0, #0xc + ldmia r0!, {r2, r3} + add r0, r4, #0 + add r0, #0x4c + stmia r0!, {r2, r3} + add r0, r4, #0 + add r0, #0x14 + ldmia r0!, {r2, r3} + add r0, r4, #0 + add r0, #0x54 + stmia r0!, {r2, r3} + ldr r0, [r4, #0x30] + add r1, r4, #0 + str r0, [r4, #0x3c] + ldr r0, [r4, #0x2c] + add r1, #0x38 + str r0, [r4, #0x40] + ldr r0, [r4, #0x28] + mov r2, #0x24 + str r0, [r4, #0x44] + ldr r0, [r4, #0x24] + str r0, [r4, #0x48] + ldr r0, [r4, #0x1c] + str r0, [r4, #0x38] + ldr r0, [r4, #8] + bl sub_02099D54 + add r0, r4, #0 + bl ov27_02256654 + ldr r0, [r4, #0x60] + bl ov27_02256890 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_022562AC + + thumb_func_start ov27_022562FC +ov27_022562FC: ; 0x022562FC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #6 + bhs _02256352 + ldrb r0, [r4, #2] + cmp r0, #0 + beq _0225631E + cmp r1, #5 + beq _0225631E + add r0, r4, #0 + mov r1, #5 + bl ov27_02256360 + mov r0, #0 + strb r0, [r4, #2] +_0225631E: + ldr r0, [r4, #0x64] + ldr r1, [r4, #0x5c] + bl ov25_02254518 + add r1, r4, #0 + add r0, r4, #0 + add r1, #0x1c + bl ov27_022566D8 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256354 ; =0x02256F9C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _02256352 + add r0, r4, #0 + bl ov27_022562AC + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x64] + bl ov25_02254260 +_02256352: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256354: .word 0x02256F9C + thumb_func_end ov27_022562FC + + thumb_func_start ov27_02256358 +ov27_02256358: ; 0x02256358 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov27_02256358 + + thumb_func_start ov27_02256360 +ov27_02256360: ; 0x02256360 + ldrb r2, [r0] + strb r2, [r0, #3] + ldrb r2, [r0, #2] + cmp r2, #0 + bne _0225636E + strb r1, [r0] + b _02256376 +_0225636E: + mov r1, #5 + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #2] +_02256376: + mov r1, #0 + strb r1, [r0, #1] + bx lr + thumb_func_end ov27_02256360 + + thumb_func_start ov27_0225637C +ov27_0225637C: ; 0x0225637C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225638C + cmp r0, #1 + beq _0225639C + b _022563C6 +_0225638C: + ldr r0, [r4, #0x60] + mov r1, #0 + bl ov27_022569C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563C6 +_0225639C: + ldr r0, [r4, #0x60] + mov r1, #0 + bl ov27_022569EC + cmp r0, #0 + beq _022563C6 + ldr r0, [r4, #0x64] + bl ov25_0225424C + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _022563BE + add r0, r4, #0 + mov r1, #2 + bl ov27_02256360 + b _022563C6 +_022563BE: + add r0, r4, #0 + mov r1, #1 + bl ov27_02256360 +_022563C6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_0225637C + + thumb_func_start ov27_022563CC +ov27_022563CC: ; 0x022563CC + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563DC + cmp r0, #1 + beq _022563F4 + b _02256448 +_022563DC: + ldrb r0, [r4, #4] + cmp r0, #1 + bne _02256448 + mov r1, #1 + str r1, [r4, #0x34] + ldr r0, [r4, #0x60] + bl ov27_022569C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256448 +_022563F4: + ldrb r0, [r4, #4] + cmp r0, #2 + beq _02256404 + cmp r0, #3 + beq _02256418 + cmp r0, #5 + beq _02256434 + b _02256448 +_02256404: + mov r0, #0 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + ldrb r0, [r4, #1] + sub r0, r0, #1 + strb r0, [r4, #1] + b _02256448 +_02256418: + mov r0, #2 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + bl ov27_02256680 + add r0, r4, #0 + mov r1, #2 + bl ov27_02256360 + b _02256448 +_02256434: + mov r0, #3 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #3 + bl ov27_02256360 +_02256448: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov27_022563CC + + thumb_func_start ov27_0225644C +ov27_0225644C: ; 0x0225644C + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _0225645C + cmp r1, #1 + beq _0225647A + b _022564CA +_0225645C: + ldrb r1, [r4, #4] + cmp r1, #1 + bne _022564CA + mov r1, #1 + str r1, [r4, #0x34] + bl ov27_022566C4 + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022564CA +_0225647A: + ldrb r0, [r4, #4] + cmp r0, #2 + beq _0225648A + cmp r0, #3 + beq _022564A0 + cmp r0, #5 + beq _022564B6 + b _022564CA +_0225648A: + mov r0, #0 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #1 + bl ov27_02256360 + b _022564CA +_022564A0: + mov r0, #0 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #1 + bl ov27_02256360 + b _022564CA +_022564B6: + mov r0, #3 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #3 + bl ov27_02256360 +_022564CA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_0225644C + + thumb_func_start ov27_022564D0 +ov27_022564D0: ; 0x022564D0 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #4] + cmp r1, #2 + beq _02256504 + cmp r1, #3 + beq _022564E4 + cmp r1, #6 + beq _0225651A + b _0225652E +_022564E4: + ldrb r1, [r4, #3] + cmp r1, #1 + bne _02256504 + bl ov27_02256680 + mov r0, #2 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #2 + bl ov27_02256360 + b _0225652E +_02256504: + mov r0, #0 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #1 + bl ov27_02256360 + b _0225652E +_0225651A: + mov r0, #4 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #4 + bl ov27_02256360 +_0225652E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_022564D0 + + thumb_func_start ov27_02256534 +ov27_02256534: ; 0x02256534 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #3 + bhi _022565CA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225654A: ; jump table + .short _02256552 - _0225654A - 2 ; case 0 + .short _0225655C - _0225654A - 2 ; case 1 + .short _02256580 - _0225654A - 2 ; case 2 + .short _022565AA - _0225654A - 2 ; case 3 +_02256552: + mov r0, #0 + strh r0, [r4, #6] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] +_0225655C: + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + ldrh r0, [r4, #6] + cmp r0, #0x5a + blo _022565CA + mov r0, #5 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + mov r0, #0 + strh r0, [r4, #6] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022565CA +_02256580: + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + ldrh r0, [r4, #6] + cmp r0, #0x3c + blo _022565CA + mov r0, #6 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + bl ov27_02256664 + mov r0, #0 + strh r0, [r4, #6] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022565CA +_022565AA: + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569EC + cmp r0, #0 + beq _022565CA + mov r0, #0 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #1 + bl ov27_022569C8 + add r0, r4, #0 + mov r1, #1 + bl ov27_02256360 +_022565CA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_02256534 + + thumb_func_start ov27_022565D0 +ov27_022565D0: ; 0x022565D0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022565E0 + cmp r0, #1 + beq _022565F4 + b _02256602 +_022565E0: + mov r0, #7 + str r0, [r4, #0x34] + ldr r0, [r4, #0x60] + mov r1, #3 + bl ov27_022569C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256602 +_022565F4: + ldr r0, [r4, #0x60] + bl ov27_022569F8 + cmp r0, #0 + beq _02256602 + mov r0, #1 + pop {r4, pc} +_02256602: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_022565D0 + + thumb_func_start ov27_02256608 +ov27_02256608: ; 0x02256608 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #8 + str r0, [sp] + ldr r0, _0225664C ; =0x02256F98 + ldr r2, _02256650 ; =ov27_02256660 + mov r1, #1 + add r3, r4, #0 + bl ov25_02255ACC + str r0, [r4, #0x5c] + cmp r0, #0 + beq _02256644 + mov r1, #0 + add r2, r1, #0 + mov r3, #0xf + bl ov25_02255C48 + ldr r0, [r4, #0x5c] + mov r1, #0 + mov r2, #1 + mov r3, #0x4b + bl ov25_02255C48 + mov r0, #0 + strb r0, [r4, #4] + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_02256644: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_0225664C: .word 0x02256F98 +_02256650: .word ov27_02256660 + thumb_func_end ov27_02256608 + + thumb_func_start ov27_02256654 +ov27_02256654: ; 0x02256654 + ldr r3, _0225665C ; =ov25_02255B34 + ldr r0, [r0, #0x5c] + bx r3 + nop +_0225665C: .word ov25_02255B34 + thumb_func_end ov27_02256654 + + thumb_func_start ov27_02256660 +ov27_02256660: ; 0x02256660 + strb r1, [r3, #4] + bx lr + thumb_func_end ov27_02256660 + + thumb_func_start ov27_02256664 +ov27_02256664: ; 0x02256664 + mov r2, #0 + str r2, [r0, #0x1c] + mov r1, #1 + str r1, [r0, #0x20] + str r2, [r0, #0x24] + str r2, [r0, #0x28] + str r2, [r0, #0x2c] + str r2, [r0, #0x30] + str r2, [r0, #0xc] + str r2, [r0, #0x10] + str r2, [r0, #0x14] + str r2, [r0, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov27_02256664 + + thumb_func_start ov27_02256680 +ov27_02256680: ; 0x02256680 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r3, [r4, #0xc] + mov r0, #0 + ldr r2, [r4, #0x10] + mov r1, #0 + eor r1, r2 + eor r0, r3 + orr r0, r1 + beq _022566B2 + bl sub_0202293C + add r5, r4, #0 + add r5, #0xc + ldr r7, [r4, #0x14] + ldr r2, [r4, #0xc] + ldr r6, [r4, #0x18] + sub r0, r0, r7 + sbc r1, r6 + ldr r3, [r5, #4] + add r0, r2, r0 + adc r3, r1 + str r0, [r4, #0xc] + str r3, [r5, #4] + b _022566BA +_022566B2: + bl sub_0202293C + str r0, [r4, #0xc] + str r1, [r4, #0x10] +_022566BA: + mov r0, #1 + str r0, [r4, #0x1c] + mov r0, #0 + str r0, [r4, #0x20] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov27_02256680 + + thumb_func_start ov27_022566C4 +ov27_022566C4: ; 0x022566C4 + push {r4, lr} + add r4, r0, #0 + bl sub_0202293C + str r0, [r4, #0x14] + str r1, [r4, #0x18] + mov r0, #0 + str r0, [r4, #0x1c] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov27_022566C4 + + thumb_func_start ov27_022566D8 +ov27_022566D8: ; 0x022566D8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _022566E6 + b _022567FC +_022566E6: + bl sub_0202293C + ldr r3, [r5, #0xc] + ldr r2, [r5, #0x10] + sub r0, r0, r3 + sbc r1, r2 + bl sub_02022944 + ldr r2, _02256800 ; =0x04000280 + mov r3, #1 + strh r3, [r2] + add r3, r2, #0 + add r3, #0x10 + str r0, [r3, #0] + str r1, [r3, #4] + mov r3, #0xfa + add r0, r2, #0 + lsl r3, r3, #2 + add r0, #0x18 + mov r1, #0 + str r3, [r0, #0] + str r1, [r0, #4] + lsr r0, r2, #0xb +_02256714: + ldrh r1, [r2] + tst r1, r0 + bne _02256714 + ldr r0, _02256804 ; =0x040002A0 + add r3, r0, #0 + ldr r6, [r0, #0] + ldr r5, [r0, #4] + sub r3, #0x20 + lsr r0, r0, #0xb +_02256726: + ldrh r1, [r3] + tst r1, r0 + bne _02256726 + ldr r2, _02256808 ; =0x040002A8 + mov r0, #1 + ldr r1, [r2, #0] + ldr r7, [r2, #4] + strh r0, [r3] + add r0, r2, #0 + sub r0, #0x18 + str r1, [r0, #0] + str r7, [r0, #4] + mov r1, #0xa + sub r2, #0x10 + str r1, [r2, #0] + mov r0, #0 + ldr r1, _02256800 ; =0x04000280 + str r0, [r2, #4] + lsr r0, r1, #0xb +_0225674C: + ldrh r2, [r1] + tst r2, r0 + bne _0225674C + ldr r0, _02256804 ; =0x040002A0 + ldr r2, [r0, #0] + str r2, [r4, #8] + mov r2, #1 + strh r2, [r1] + add r1, r0, #0 + sub r1, #0x10 + str r6, [r1, #0] + str r5, [r1, #4] + mov r2, #0x3c + sub r0, #8 + str r2, [r0, #0] + mov r1, #0 + ldr r2, _02256800 ; =0x04000280 + str r1, [r0, #4] + lsr r0, r2, #0xb +_02256772: + ldrh r1, [r2] + tst r1, r0 + bne _02256772 + ldr r0, _02256804 ; =0x040002A0 + add r1, r0, #0 + ldr r3, [r0, #0] + ldr r2, [r0, #4] + sub r1, #0x20 + lsr r0, r0, #0xb +_02256784: + ldrh r5, [r1] + tst r5, r0 + bne _02256784 + ldr r0, _02256808 ; =0x040002A8 + ldr r5, [r0, #0] + str r5, [r4, #0xc] + mov r5, #1 + strh r5, [r1] + add r1, r0, #0 + sub r1, #0x18 + str r3, [r1, #0] + str r2, [r1, #4] + mov r2, #0x3c + sub r0, #0x10 + str r2, [r0, #0] + mov r1, #0 + ldr r2, _02256800 ; =0x04000280 + str r1, [r0, #4] + lsr r0, r2, #0xb +_022567AA: + ldrh r1, [r2] + tst r1, r0 + bne _022567AA + ldr r0, _02256804 ; =0x040002A0 + add r2, r0, #0 + ldr r5, [r0, #0] + ldr r3, [r0, #4] + sub r2, #0x20 + lsr r0, r0, #0xb +_022567BC: + ldrh r1, [r2] + tst r1, r0 + bne _022567BC + ldr r1, _02256808 ; =0x040002A8 + mov r6, #0x18 + ldr r0, [r1, #0] + str r0, [r4, #0x10] + mov r0, #0 + sub r6, r5, r6 + mov ip, r3 + mov r6, ip + sbc r6, r0 + blo _022567FA + mov r0, #1 + strh r0, [r2] + add r0, r1, #0 + sub r0, #0x18 + str r5, [r0, #0] + str r3, [r0, #4] + mov r2, #0x18 + sub r1, #0x10 + str r2, [r1, #0] + mov r0, #0 + ldr r2, _02256800 ; =0x04000280 + str r0, [r1, #4] + lsr r0, r2, #0xb +_022567F0: + ldrh r1, [r2] + tst r1, r0 + bne _022567F0 + ldr r0, _02256808 ; =0x040002A8 + ldr r5, [r0, #0] +_022567FA: + str r5, [r4, #0x14] +_022567FC: + pop {r3, r4, r5, r6, r7, pc} + nop +_02256800: .word 0x04000280 +_02256804: .word 0x040002A0 +_02256808: .word 0x040002A8 + thumb_func_end ov27_022566D8 + + .rodata + + + .global Unk_ov27_02256F98 +Unk_ov27_02256F98: ; 0x02256F98 + .incbin "incbin/overlay27_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov27_02256F9C +Unk_ov27_02256F9C: ; 0x02256F9C + .incbin "incbin/overlay27_rodata.bin", 0x4, 0x18 + + .section .sinit, 4 + .word ov27_022561C0 + diff --git a/asm/overlay27.s b/asm/ov27_0225680C.s similarity index 53% rename from asm/overlay27.s rename to asm/ov27_0225680C.s index e39f02e76..24dfdce62 100644 --- a/asm/overlay27.s +++ b/asm/ov27_0225680C.s @@ -1,876 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov27_022561C0 -ov27_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov27_022561D4 - ldr r1, _022561D0 ; =ov27_02256358 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov27_022561D4 -_022561D0: .word ov27_02256358 - thumb_func_end ov27_022561C0 - - thumb_func_start ov27_022561D4 -ov27_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x68 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r2, [sp] - add r1, r7, #0 - bl ov27_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov27_022562FC - add r1, r4, #0 - mov r2, #1 - str r6, [r4, #0x64] - bl sub_0200D9E8 - cmp r0, #0 - beq _02256212 - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov27_022562FC - thumb_func_end ov27_022561D4 - - thumb_func_start ov27_0225621C -ov27_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r1, r5, #0 - str r2, [r5, #8] - add r0, r2, #0 - add r1, #0x38 - mov r2, #0x24 - bl sub_02099D7C - cmp r0, #0 - beq _02256270 - add r0, r5, #0 - add r0, #0x4c - ldmia r0!, {r2, r3} - add r0, r5, #0 - add r0, #0xc - stmia r0!, {r2, r3} - add r0, r5, #0 - add r0, #0x54 - ldmia r0!, {r2, r3} - add r0, r5, #0 - add r0, #0x14 - stmia r0!, {r2, r3} - ldr r0, [r5, #0x3c] - str r0, [r5, #0x30] - ldr r0, [r5, #0x40] - str r0, [r5, #0x2c] - ldr r0, [r5, #0x44] - str r0, [r5, #0x28] - ldr r0, [r5, #0x48] - str r0, [r5, #0x24] - ldr r0, [r5, #0x38] - str r0, [r5, #0x1c] - cmp r0, #0 - beq _0225626A - mov r0, #2 - str r0, [r5, #0x34] - b _0225627A -_0225626A: - mov r0, #0 - str r0, [r5, #0x34] - b _0225627A -_02256270: - add r0, r5, #0 - bl ov27_02256664 - mov r0, #0 - str r0, [r5, #0x34] -_0225627A: - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x60 - add r1, #0x1c - add r2, r4, #0 - bl ov27_0225680C - cmp r0, #0 - beq _022562A6 - mov r1, #0 - strb r1, [r5] - strb r1, [r5, #1] - ldrb r0, [r5] - strb r0, [r5, #3] - add r0, r5, #0 - strb r1, [r5, #2] - bl ov27_02256608 - cmp r0, #0 - beq _022562A6 - mov r0, #1 - pop {r3, r4, r5, pc} -_022562A6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov27_0225621C - - thumb_func_start ov27_022562AC -ov27_022562AC: ; 0x022562AC - push {r4, lr} - add r4, r0, #0 - add r0, #0xc - ldmia r0!, {r2, r3} - add r0, r4, #0 - add r0, #0x4c - stmia r0!, {r2, r3} - add r0, r4, #0 - add r0, #0x14 - ldmia r0!, {r2, r3} - add r0, r4, #0 - add r0, #0x54 - stmia r0!, {r2, r3} - ldr r0, [r4, #0x30] - add r1, r4, #0 - str r0, [r4, #0x3c] - ldr r0, [r4, #0x2c] - add r1, #0x38 - str r0, [r4, #0x40] - ldr r0, [r4, #0x28] - mov r2, #0x24 - str r0, [r4, #0x44] - ldr r0, [r4, #0x24] - str r0, [r4, #0x48] - ldr r0, [r4, #0x1c] - str r0, [r4, #0x38] - ldr r0, [r4, #8] - bl sub_02099D54 - add r0, r4, #0 - bl ov27_02256654 - ldr r0, [r4, #0x60] - bl ov27_02256890 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_022562AC - - thumb_func_start ov27_022562FC -ov27_022562FC: ; 0x022562FC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #6 - bhs _02256352 - ldrb r0, [r4, #2] - cmp r0, #0 - beq _0225631E - cmp r1, #5 - beq _0225631E - add r0, r4, #0 - mov r1, #5 - bl ov27_02256360 - mov r0, #0 - strb r0, [r4, #2] -_0225631E: - ldr r0, [r4, #0x64] - ldr r1, [r4, #0x5c] - bl ov25_02254518 - add r1, r4, #0 - add r0, r4, #0 - add r1, #0x1c - bl ov27_022566D8 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256354 ; =0x02256F9C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _02256352 - add r0, r4, #0 - bl ov27_022562AC - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x64] - bl ov25_02254260 -_02256352: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256354: .word 0x02256F9C - thumb_func_end ov27_022562FC - - thumb_func_start ov27_02256358 -ov27_02256358: ; 0x02256358 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov27_02256358 - - thumb_func_start ov27_02256360 -ov27_02256360: ; 0x02256360 - ldrb r2, [r0] - strb r2, [r0, #3] - ldrb r2, [r0, #2] - cmp r2, #0 - bne _0225636E - strb r1, [r0] - b _02256376 -_0225636E: - mov r1, #5 - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #2] -_02256376: - mov r1, #0 - strb r1, [r0, #1] - bx lr - thumb_func_end ov27_02256360 - - thumb_func_start ov27_0225637C -ov27_0225637C: ; 0x0225637C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225638C - cmp r0, #1 - beq _0225639C - b _022563C6 -_0225638C: - ldr r0, [r4, #0x60] - mov r1, #0 - bl ov27_022569C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563C6 -_0225639C: - ldr r0, [r4, #0x60] - mov r1, #0 - bl ov27_022569EC - cmp r0, #0 - beq _022563C6 - ldr r0, [r4, #0x64] - bl ov25_0225424C - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _022563BE - add r0, r4, #0 - mov r1, #2 - bl ov27_02256360 - b _022563C6 -_022563BE: - add r0, r4, #0 - mov r1, #1 - bl ov27_02256360 -_022563C6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_0225637C - - thumb_func_start ov27_022563CC -ov27_022563CC: ; 0x022563CC - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563DC - cmp r0, #1 - beq _022563F4 - b _02256448 -_022563DC: - ldrb r0, [r4, #4] - cmp r0, #1 - bne _02256448 - mov r1, #1 - str r1, [r4, #0x34] - ldr r0, [r4, #0x60] - bl ov27_022569C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256448 -_022563F4: - ldrb r0, [r4, #4] - cmp r0, #2 - beq _02256404 - cmp r0, #3 - beq _02256418 - cmp r0, #5 - beq _02256434 - b _02256448 -_02256404: - mov r0, #0 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - ldrb r0, [r4, #1] - sub r0, r0, #1 - strb r0, [r4, #1] - b _02256448 -_02256418: - mov r0, #2 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - bl ov27_02256680 - add r0, r4, #0 - mov r1, #2 - bl ov27_02256360 - b _02256448 -_02256434: - mov r0, #3 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #3 - bl ov27_02256360 -_02256448: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov27_022563CC - - thumb_func_start ov27_0225644C -ov27_0225644C: ; 0x0225644C - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _0225645C - cmp r1, #1 - beq _0225647A - b _022564CA -_0225645C: - ldrb r1, [r4, #4] - cmp r1, #1 - bne _022564CA - mov r1, #1 - str r1, [r4, #0x34] - bl ov27_022566C4 - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022564CA -_0225647A: - ldrb r0, [r4, #4] - cmp r0, #2 - beq _0225648A - cmp r0, #3 - beq _022564A0 - cmp r0, #5 - beq _022564B6 - b _022564CA -_0225648A: - mov r0, #0 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #1 - bl ov27_02256360 - b _022564CA -_022564A0: - mov r0, #0 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #1 - bl ov27_02256360 - b _022564CA -_022564B6: - mov r0, #3 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #3 - bl ov27_02256360 -_022564CA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_0225644C - - thumb_func_start ov27_022564D0 -ov27_022564D0: ; 0x022564D0 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #4] - cmp r1, #2 - beq _02256504 - cmp r1, #3 - beq _022564E4 - cmp r1, #6 - beq _0225651A - b _0225652E -_022564E4: - ldrb r1, [r4, #3] - cmp r1, #1 - bne _02256504 - bl ov27_02256680 - mov r0, #2 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #2 - bl ov27_02256360 - b _0225652E -_02256504: - mov r0, #0 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #1 - bl ov27_02256360 - b _0225652E -_0225651A: - mov r0, #4 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #4 - bl ov27_02256360 -_0225652E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_022564D0 - - thumb_func_start ov27_02256534 -ov27_02256534: ; 0x02256534 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #3 - bhi _022565CA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225654A: ; jump table - .short _02256552 - _0225654A - 2 ; case 0 - .short _0225655C - _0225654A - 2 ; case 1 - .short _02256580 - _0225654A - 2 ; case 2 - .short _022565AA - _0225654A - 2 ; case 3 -_02256552: - mov r0, #0 - strh r0, [r4, #6] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] -_0225655C: - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - ldrh r0, [r4, #6] - cmp r0, #0x5a - blo _022565CA - mov r0, #5 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - mov r0, #0 - strh r0, [r4, #6] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022565CA -_02256580: - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - ldrh r0, [r4, #6] - cmp r0, #0x3c - blo _022565CA - mov r0, #6 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - bl ov27_02256664 - mov r0, #0 - strh r0, [r4, #6] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022565CA -_022565AA: - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569EC - cmp r0, #0 - beq _022565CA - mov r0, #0 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #1 - bl ov27_022569C8 - add r0, r4, #0 - mov r1, #1 - bl ov27_02256360 -_022565CA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_02256534 - - thumb_func_start ov27_022565D0 -ov27_022565D0: ; 0x022565D0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022565E0 - cmp r0, #1 - beq _022565F4 - b _02256602 -_022565E0: - mov r0, #7 - str r0, [r4, #0x34] - ldr r0, [r4, #0x60] - mov r1, #3 - bl ov27_022569C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256602 -_022565F4: - ldr r0, [r4, #0x60] - bl ov27_022569F8 - cmp r0, #0 - beq _02256602 - mov r0, #1 - pop {r4, pc} -_02256602: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_022565D0 - - thumb_func_start ov27_02256608 -ov27_02256608: ; 0x02256608 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #8 - str r0, [sp] - ldr r0, _0225664C ; =0x02256F98 - ldr r2, _02256650 ; =ov27_02256660 - mov r1, #1 - add r3, r4, #0 - bl ov25_02255ACC - str r0, [r4, #0x5c] - cmp r0, #0 - beq _02256644 - mov r1, #0 - add r2, r1, #0 - mov r3, #0xf - bl ov25_02255C48 - ldr r0, [r4, #0x5c] - mov r1, #0 - mov r2, #1 - mov r3, #0x4b - bl ov25_02255C48 - mov r0, #0 - strb r0, [r4, #4] - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_02256644: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_0225664C: .word 0x02256F98 -_02256650: .word ov27_02256660 - thumb_func_end ov27_02256608 - - thumb_func_start ov27_02256654 -ov27_02256654: ; 0x02256654 - ldr r3, _0225665C ; =ov25_02255B34 - ldr r0, [r0, #0x5c] - bx r3 - nop -_0225665C: .word ov25_02255B34 - thumb_func_end ov27_02256654 - - thumb_func_start ov27_02256660 -ov27_02256660: ; 0x02256660 - strb r1, [r3, #4] - bx lr - thumb_func_end ov27_02256660 - - thumb_func_start ov27_02256664 -ov27_02256664: ; 0x02256664 - mov r2, #0 - str r2, [r0, #0x1c] - mov r1, #1 - str r1, [r0, #0x20] - str r2, [r0, #0x24] - str r2, [r0, #0x28] - str r2, [r0, #0x2c] - str r2, [r0, #0x30] - str r2, [r0, #0xc] - str r2, [r0, #0x10] - str r2, [r0, #0x14] - str r2, [r0, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov27_02256664 - - thumb_func_start ov27_02256680 -ov27_02256680: ; 0x02256680 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r3, [r4, #0xc] - mov r0, #0 - ldr r2, [r4, #0x10] - mov r1, #0 - eor r1, r2 - eor r0, r3 - orr r0, r1 - beq _022566B2 - bl sub_0202293C - add r5, r4, #0 - add r5, #0xc - ldr r7, [r4, #0x14] - ldr r2, [r4, #0xc] - ldr r6, [r4, #0x18] - sub r0, r0, r7 - sbc r1, r6 - ldr r3, [r5, #4] - add r0, r2, r0 - adc r3, r1 - str r0, [r4, #0xc] - str r3, [r5, #4] - b _022566BA -_022566B2: - bl sub_0202293C - str r0, [r4, #0xc] - str r1, [r4, #0x10] -_022566BA: - mov r0, #1 - str r0, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0x20] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov27_02256680 - - thumb_func_start ov27_022566C4 -ov27_022566C4: ; 0x022566C4 - push {r4, lr} - add r4, r0, #0 - bl sub_0202293C - str r0, [r4, #0x14] - str r1, [r4, #0x18] - mov r0, #0 - str r0, [r4, #0x1c] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov27_022566C4 - - thumb_func_start ov27_022566D8 -ov27_022566D8: ; 0x022566D8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _022566E6 - b _022567FC -_022566E6: - bl sub_0202293C - ldr r3, [r5, #0xc] - ldr r2, [r5, #0x10] - sub r0, r0, r3 - sbc r1, r2 - bl sub_02022944 - ldr r2, _02256800 ; =0x04000280 - mov r3, #1 - strh r3, [r2] - add r3, r2, #0 - add r3, #0x10 - str r0, [r3, #0] - str r1, [r3, #4] - mov r3, #0xfa - add r0, r2, #0 - lsl r3, r3, #2 - add r0, #0x18 - mov r1, #0 - str r3, [r0, #0] - str r1, [r0, #4] - lsr r0, r2, #0xb -_02256714: - ldrh r1, [r2] - tst r1, r0 - bne _02256714 - ldr r0, _02256804 ; =0x040002A0 - add r3, r0, #0 - ldr r6, [r0, #0] - ldr r5, [r0, #4] - sub r3, #0x20 - lsr r0, r0, #0xb -_02256726: - ldrh r1, [r3] - tst r1, r0 - bne _02256726 - ldr r2, _02256808 ; =0x040002A8 - mov r0, #1 - ldr r1, [r2, #0] - ldr r7, [r2, #4] - strh r0, [r3] - add r0, r2, #0 - sub r0, #0x18 - str r1, [r0, #0] - str r7, [r0, #4] - mov r1, #0xa - sub r2, #0x10 - str r1, [r2, #0] - mov r0, #0 - ldr r1, _02256800 ; =0x04000280 - str r0, [r2, #4] - lsr r0, r1, #0xb -_0225674C: - ldrh r2, [r1] - tst r2, r0 - bne _0225674C - ldr r0, _02256804 ; =0x040002A0 - ldr r2, [r0, #0] - str r2, [r4, #8] - mov r2, #1 - strh r2, [r1] - add r1, r0, #0 - sub r1, #0x10 - str r6, [r1, #0] - str r5, [r1, #4] - mov r2, #0x3c - sub r0, #8 - str r2, [r0, #0] - mov r1, #0 - ldr r2, _02256800 ; =0x04000280 - str r1, [r0, #4] - lsr r0, r2, #0xb -_02256772: - ldrh r1, [r2] - tst r1, r0 - bne _02256772 - ldr r0, _02256804 ; =0x040002A0 - add r1, r0, #0 - ldr r3, [r0, #0] - ldr r2, [r0, #4] - sub r1, #0x20 - lsr r0, r0, #0xb -_02256784: - ldrh r5, [r1] - tst r5, r0 - bne _02256784 - ldr r0, _02256808 ; =0x040002A8 - ldr r5, [r0, #0] - str r5, [r4, #0xc] - mov r5, #1 - strh r5, [r1] - add r1, r0, #0 - sub r1, #0x18 - str r3, [r1, #0] - str r2, [r1, #4] - mov r2, #0x3c - sub r0, #0x10 - str r2, [r0, #0] - mov r1, #0 - ldr r2, _02256800 ; =0x04000280 - str r1, [r0, #4] - lsr r0, r2, #0xb -_022567AA: - ldrh r1, [r2] - tst r1, r0 - bne _022567AA - ldr r0, _02256804 ; =0x040002A0 - add r2, r0, #0 - ldr r5, [r0, #0] - ldr r3, [r0, #4] - sub r2, #0x20 - lsr r0, r0, #0xb -_022567BC: - ldrh r1, [r2] - tst r1, r0 - bne _022567BC - ldr r1, _02256808 ; =0x040002A8 - mov r6, #0x18 - ldr r0, [r1, #0] - str r0, [r4, #0x10] - mov r0, #0 - sub r6, r5, r6 - mov ip, r3 - mov r6, ip - sbc r6, r0 - blo _022567FA - mov r0, #1 - strh r0, [r2] - add r0, r1, #0 - sub r0, #0x18 - str r5, [r0, #0] - str r3, [r0, #4] - mov r2, #0x18 - sub r1, #0x10 - str r2, [r1, #0] - mov r0, #0 - ldr r2, _02256800 ; =0x04000280 - str r0, [r1, #4] - lsr r0, r2, #0xb -_022567F0: - ldrh r1, [r2] - tst r1, r0 - bne _022567F0 - ldr r0, _02256808 ; =0x040002A8 - ldr r5, [r0, #0] -_022567FA: - str r5, [r4, #0x14] -_022567FC: - pop {r3, r4, r5, r6, r7, pc} - nop -_02256800: .word 0x04000280 -_02256804: .word 0x040002A0 -_02256808: .word 0x040002A8 - thumb_func_end ov27_022566D8 thumb_func_start ov27_0225680C ov27_0225680C: ; 0x0225680C @@ -1839,14 +973,27 @@ _02256F84: pop {r4, r5, r6, pc} ; .align 2, 0 thumb_func_end ov27_02256F7C - ; 0x02256F98 - .rodata - .incbin "incbin/overlay27_rodata.bin" - .section .sinit, 4 - .word ov27_022561C0 - .bss - .space 0x0 + .global Unk_ov27_02256FB4 +Unk_ov27_02256FB4: ; 0x02256FB4 + .incbin "incbin/overlay27_rodata.bin", 0x1C, 0x20 - 0x1C + + .global Unk_ov27_02256FB8 +Unk_ov27_02256FB8: ; 0x02256FB8 + .incbin "incbin/overlay27_rodata.bin", 0x20, 0x3C - 0x20 + + .global Unk_ov27_02256FD4 +Unk_ov27_02256FD4: ; 0x02256FD4 + .incbin "incbin/overlay27_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov27_02256FF0 +Unk_ov27_02256FF0: ; 0x02256FF0 + .incbin "incbin/overlay27_rodata.bin", 0x58, 0x88 - 0x58 + + .global Unk_ov27_02257020 +Unk_ov27_02257020: ; 0x02257020 + .incbin "incbin/overlay27_rodata.bin", 0x88, 0x90 + diff --git a/asm/ov28_022561C0.s b/asm/ov28_022561C0.s new file mode 100644 index 000000000..f89414fc1 --- /dev/null +++ b/asm/ov28_022561C0.s @@ -0,0 +1,1084 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov28_022561C0 +ov28_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov28_022561D4 + ldr r1, _022561D0 ; =ov28_02256324 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov28_022561D4 +_022561D0: .word ov28_02256324 + thumb_func_end ov28_022561C0 + + thumb_func_start ov28_022561D4 +ov28_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x28 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256208 + ldr r1, [sp] + add r2, r7, #0 + bl ov28_02256210 + cmp r0, #0 + beq _02256208 + ldr r0, _0225620C ; =ov28_022562CC + str r6, [r4, #0x10] + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02256208: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225620C: .word ov28_022562CC + thumb_func_end ov28_022561D4 + + thumb_func_start ov28_02256210 +ov28_02256210: ; 0x02256210 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + add r1, r4, #0 + add r0, #0x14 + add r1, #0x18 + bl ov28_0225697C + cmp r0, #0 + beq _0225628A + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #3] + strb r0, [r4, #2] + strb r0, [r4, #4] + mov r0, #0x11 + strh r0, [r4, #6] + sub r0, #0x12 + str r0, [r4, #8] + add r0, r4, #0 + add r0, #0x1c + mov r1, #0xa + bl ov28_02256E9C + add r0, r4, #0 + add r0, #0x20 + mov r1, #0xa + bl ov28_02256E9C + add r0, r4, #0 + add r0, #0x24 + mov r1, #0xa + bl ov28_02256E9C + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _02256268 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _02256268 + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _0225626E +_02256268: + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_0225626E: + mov r0, #8 + str r0, [sp] + ldr r0, _02256290 ; =0x02257658 + ldr r2, _02256294 ; =ov28_02256344 + mov r1, #0x11 + add r3, r4, #0 + bl ov25_02255ACC + str r0, [r4, #0xc] + cmp r0, #0 + bne _0225628A + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_0225628A: + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02256290: .word 0x02257658 +_02256294: .word ov28_02256344 + thumb_func_end ov28_02256210 + + thumb_func_start ov28_02256298 +ov28_02256298: ; 0x02256298 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _022562A6 + bl ov28_02256EC0 +_022562A6: + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _022562B0 + bl ov28_02256EC0 +_022562B0: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _022562BA + bl ov28_02256EC0 +_022562BA: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _022562C4 + bl ov25_02255B34 +_022562C4: + ldr r0, [r4, #0x14] + bl ov28_022569AC + pop {r4, pc} + thumb_func_end ov28_02256298 + + thumb_func_start ov28_022562CC +ov28_022562CC: ; 0x022562CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #3] + cmp r0, #0 + beq _022562E4 + add r0, r4, #0 + mov r1, #6 + bl ov28_0225632C + mov r0, #0 + strb r0, [r4, #3] +_022562E4: + ldrb r0, [r4] + cmp r0, #7 + bhs _0225631E + mov r0, #0x11 + strh r0, [r4, #6] + ldr r0, [r4, #0x10] + ldr r1, [r4, #0xc] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256320 ; =0x0225763C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _0225631E + add r0, r4, #0 + bl ov28_02256298 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x10] + bl ov25_02254260 +_0225631E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256320: .word 0x0225763C + thumb_func_end ov28_022562CC + + thumb_func_start ov28_02256324 +ov28_02256324: ; 0x02256324 + mov r1, #1 + strb r1, [r0, #3] + bx lr + ; .align 2, 0 + thumb_func_end ov28_02256324 + + thumb_func_start ov28_0225632C +ov28_0225632C: ; 0x0225632C + ldrb r2, [r0, #3] + cmp r2, #0 + bne _02256334 + b _02256336 +_02256334: + mov r1, #6 +_02256336: + strb r1, [r0] + ldrb r1, [r0] + strb r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov28_0225632C + + thumb_func_start ov28_02256344 +ov28_02256344: ; 0x02256344 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r3, #0 + cmp r2, #0 + beq _02256356 + cmp r2, #1 + beq _02256362 + b _0225636C +_02256356: + strh r5, [r4, #0x18] + ldr r0, [r4, #0x14] + mov r1, #2 + bl ov28_022569B8 + b _0225636C +_02256362: + strh r5, [r4, #0x18] + ldr r0, [r4, #0x14] + mov r1, #1 + bl ov28_022569B8 +_0225636C: + cmp r6, #3 + bne _02256372 + strh r5, [r4, #6] +_02256372: + pop {r4, r5, r6, pc} + thumb_func_end ov28_02256344 + + thumb_func_start ov28_02256374 +ov28_02256374: ; 0x02256374 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256384 + cmp r0, #1 + beq _02256394 + b _022563AE +_02256384: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563AE +_02256394: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov28_022569DC + cmp r0, #0 + beq _022563AE + ldr r0, [r4, #0x10] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov28_0225632C +_022563AE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_02256374 + + thumb_func_start ov28_022563B4 +ov28_022563B4: ; 0x022563B4 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _022563C4 + cmp r1, #1 + beq _02256468 + b _02256488 +_022563C4: + mov r1, #0 + mvn r1, r1 + str r1, [r4, #8] + ldrh r1, [r4, #6] + add r2, r1, #0 + sub r2, #0xa + cmp r2, #7 + bhi _0225641E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022563E0: ; jump table + .short _022563FA - _022563E0 - 2 ; case 0 + .short _02256400 - _022563E0 - 2 ; case 1 + .short _02256400 - _022563E0 - 2 ; case 2 + .short _02256400 - _022563E0 - 2 ; case 3 + .short _02256400 - _022563E0 - 2 ; case 4 + .short _02256410 - _022563E0 - 2 ; case 5 + .short _022563F0 - _022563E0 - 2 ; case 6 + .short _02256440 - _022563E0 - 2 ; case 7 +_022563F0: + bl ov28_02256868 + mov r0, #4 + str r0, [r4, #8] + b _02256440 +_022563FA: + mov r0, #1 + strb r0, [r4, #4] + b _02256440 +_02256400: + strh r1, [r4, #0x1a] + mov r0, #0 + strb r0, [r4, #4] + mov r0, #8 + str r0, [r4, #8] + mov r0, #2 + strb r0, [r4, #2] + b _02256440 +_02256410: + ldr r1, [r4, #0x1c] + bl ov28_02256914 + ldr r0, [r4, #0x1c] + bl ov28_02256EC8 + b _02256440 +_0225641E: + ldrb r0, [r4, #4] + cmp r0, #0 + ldr r0, [r4, #0x1c] + beq _02256434 + bl ov28_022571B8 + cmp r0, #0 + beq _02256440 + mov r0, #3 + str r0, [r4, #8] + b _02256440 +_02256434: + bl ov28_0225717C + cmp r0, #0 + beq _02256440 + mov r0, #3 + str r0, [r4, #8] +_02256440: + mov r0, #0 + ldr r1, [r4, #8] + mvn r0, r0 + cmp r1, r0 + beq _02256458 + ldr r0, [r4, #0x14] + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256488 +_02256458: + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _02256488 + add r0, r4, #0 + bl ov28_0225632C + b _02256488 +_02256468: + ldr r0, [r4, #0x14] + ldr r1, [r4, #8] + bl ov28_022569DC + cmp r0, #0 + beq _02256488 + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _02256484 + add r0, r4, #0 + bl ov28_0225632C + b _02256488 +_02256484: + mov r0, #0 + strb r0, [r4, #1] +_02256488: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov28_022563B4 + + thumb_func_start ov28_0225648C +ov28_0225648C: ; 0x0225648C + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _0225649C + cmp r1, #1 + beq _02256564 + b _02256584 +_0225649C: + mov r1, #0 + mvn r1, r1 + str r1, [r4, #8] + ldrh r1, [r4, #6] + add r2, r1, #0 + sub r2, #0xa + cmp r2, #7 + bhi _02256522 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022564B8: ; jump table + .short _022564D6 - _022564B8 - 2 ; case 0 + .short _022564EA - _022564B8 - 2 ; case 1 + .short _022564EA - _022564B8 - 2 ; case 2 + .short _022564EA - _022564B8 - 2 ; case 3 + .short _022564EA - _022564B8 - 2 ; case 4 + .short _022564F2 - _022564B8 - 2 ; case 5 + .short _022564C8 - _022564B8 - 2 ; case 6 + .short _0225653C - _022564B8 - 2 ; case 7 +_022564C8: + bl ov28_02256868 + mov r0, #4 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #2] + b _0225653C +_022564D6: + ldr r0, [r4, #0x20] + bl ov28_02256EC8 + mov r0, #5 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #4] + mov r0, #3 + strb r0, [r4, #2] + b _0225653C +_022564EA: + strh r1, [r4, #0x1a] + mov r0, #8 + str r0, [r4, #8] + b _0225653C +_022564F2: + ldr r0, [r4, #0x20] + ldr r1, [r4, #0x1c] + bl ov28_02256ED8 + ldrh r1, [r4, #0x1a] + add r0, r4, #0 + bl ov28_02256888 + cmp r0, #0 + beq _02256518 + ldr r1, [r4, #0x24] + add r0, r4, #0 + bl ov28_02256914 + mov r0, #6 + str r0, [r4, #8] + mov r0, #4 + strb r0, [r4, #2] + b _0225653C +_02256518: + mov r0, #9 + str r0, [r4, #8] + mov r0, #5 + strb r0, [r4, #2] + b _0225653C +_02256522: + ldr r0, [r4, #0x20] + bl ov28_02256EC8 + ldrh r1, [r4, #6] + ldr r0, [r4, #0x20] + bl ov28_0225717C + cmp r0, #0 + beq _0225653C + mov r0, #5 + str r0, [r4, #8] + mov r0, #3 + strb r0, [r4, #2] +_0225653C: + mov r0, #0 + ldr r1, [r4, #8] + mvn r0, r0 + cmp r1, r0 + beq _02256554 + ldr r0, [r4, #0x14] + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256584 +_02256554: + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _02256584 + add r0, r4, #0 + bl ov28_0225632C + b _02256584 +_02256564: + ldr r0, [r4, #0x14] + ldr r1, [r4, #8] + bl ov28_022569DC + cmp r0, #0 + beq _02256584 + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _02256580 + add r0, r4, #0 + bl ov28_0225632C + b _02256584 +_02256580: + mov r0, #0 + strb r0, [r4, #1] +_02256584: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov28_0225648C + + thumb_func_start ov28_02256588 +ov28_02256588: ; 0x02256588 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _02256598 + cmp r1, #1 + beq _0225667A + b _0225669A +_02256598: + mov r1, #0 + mvn r1, r1 + str r1, [r4, #8] + ldrh r1, [r4, #6] + add r2, r1, #0 + sub r2, #0xa + cmp r2, #7 + bhi _02256630 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022565B4: ; jump table + .short _022565D2 - _022565B4 - 2 ; case 0 + .short _022565D8 - _022565B4 - 2 ; case 1 + .short _022565D8 - _022565B4 - 2 ; case 2 + .short _022565D8 - _022565B4 - 2 ; case 3 + .short _022565D8 - _022565B4 - 2 ; case 4 + .short _02256606 - _022565B4 - 2 ; case 5 + .short _022565C4 - _022565B4 - 2 ; case 6 + .short _02256652 - _022565B4 - 2 ; case 7 +_022565C4: + bl ov28_02256868 + mov r0, #4 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #2] + b _02256652 +_022565D2: + mov r0, #1 + strb r0, [r4, #4] + b _02256652 +_022565D8: + ldrh r1, [r4, #0x1a] + bl ov28_02256888 + cmp r0, #0 + beq _022565FC + ldrh r0, [r4, #6] + strh r0, [r4, #0x1a] + mov r0, #0 + strb r0, [r4, #4] + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x24] + bl ov28_02256ED8 + mov r0, #7 + str r0, [r4, #8] + mov r0, #2 + strb r0, [r4, #2] + b _02256652 +_022565FC: + mov r0, #9 + str r0, [r4, #8] + mov r0, #5 + strb r0, [r4, #2] + b _02256652 +_02256606: + ldrh r1, [r4, #0x1a] + bl ov28_02256888 + cmp r0, #0 + beq _02256626 + ldr r1, [r4, #0x24] + add r0, r4, #0 + bl ov28_02256914 + mov r0, #6 + str r0, [r4, #8] + mov r0, #0 + strb r0, [r4, #4] + mov r0, #4 + strb r0, [r4, #2] + b _02256652 +_02256626: + mov r0, #9 + str r0, [r4, #8] + mov r0, #5 + strb r0, [r4, #2] + b _02256652 +_02256630: + ldrb r0, [r4, #4] + cmp r0, #0 + ldr r0, [r4, #0x20] + beq _02256646 + bl ov28_022571B8 + cmp r0, #0 + beq _02256652 + mov r0, #5 + str r0, [r4, #8] + b _02256652 +_02256646: + bl ov28_0225717C + cmp r0, #0 + beq _02256652 + mov r0, #5 + str r0, [r4, #8] +_02256652: + mov r0, #0 + ldr r1, [r4, #8] + mvn r0, r0 + cmp r1, r0 + beq _0225666A + ldr r0, [r4, #0x14] + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225669A +_0225666A: + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _0225669A + add r0, r4, #0 + bl ov28_0225632C + b _0225669A +_0225667A: + ldr r0, [r4, #0x14] + ldr r1, [r4, #8] + bl ov28_022569DC + cmp r0, #0 + beq _0225669A + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _02256696 + add r0, r4, #0 + bl ov28_0225632C + b _0225669A +_02256696: + mov r0, #0 + strb r0, [r4, #1] +_0225669A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_02256588 + + thumb_func_start ov28_022566A0 +ov28_022566A0: ; 0x022566A0 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _022566B0 + cmp r1, #1 + beq _02256784 + b _022567A4 +_022566B0: + mov r1, #0 + mvn r1, r1 + str r1, [r4, #8] + ldrh r1, [r4, #6] + add r2, r1, #0 + sub r2, #0xa + cmp r2, #7 + bhi _02256742 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022566CC: ; jump table + .short _022566EA - _022566CC - 2 ; case 0 + .short _022566FA - _022566CC - 2 ; case 1 + .short _022566FA - _022566CC - 2 ; case 2 + .short _022566FA - _022566CC - 2 ; case 3 + .short _022566FA - _022566CC - 2 ; case 4 + .short _02256712 - _022566CC - 2 ; case 5 + .short _022566DC - _022566CC - 2 ; case 6 + .short _0225675C - _022566CC - 2 ; case 7 +_022566DC: + bl ov28_02256868 + mov r0, #4 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #2] + b _0225675C +_022566EA: + bl ov28_02256868 + mov r0, #3 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #4] + strb r0, [r4, #2] + b _0225675C +_022566FA: + strh r1, [r4, #0x1a] + mov r0, #8 + str r0, [r4, #8] + mov r0, #0 + strb r0, [r4, #4] + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x24] + bl ov28_02256ED8 + mov r0, #2 + strb r0, [r4, #2] + b _0225675C +_02256712: + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x24] + bl ov28_02256ED8 + ldrh r1, [r4, #0x1a] + add r0, r4, #0 + bl ov28_02256888 + cmp r0, #0 + beq _02256738 + ldr r1, [r4, #0x24] + add r0, r4, #0 + bl ov28_02256914 + mov r0, #6 + str r0, [r4, #8] + mov r0, #0 + strb r0, [r4, #4] + b _0225675C +_02256738: + mov r0, #9 + str r0, [r4, #8] + mov r0, #5 + strb r0, [r4, #2] + b _0225675C +_02256742: + ldr r0, [r4, #0x1c] + bl ov28_02256EC8 + ldrh r1, [r4, #6] + ldr r0, [r4, #0x1c] + bl ov28_0225717C + cmp r0, #0 + beq _02256758 + mov r0, #3 + str r0, [r4, #8] +_02256758: + mov r0, #1 + strb r0, [r4, #2] +_0225675C: + mov r0, #0 + ldr r1, [r4, #8] + mvn r0, r0 + cmp r1, r0 + beq _02256774 + ldr r0, [r4, #0x14] + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022567A4 +_02256774: + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _022567A4 + add r0, r4, #0 + bl ov28_0225632C + b _022567A4 +_02256784: + ldr r0, [r4, #0x14] + ldr r1, [r4, #8] + bl ov28_022569DC + cmp r0, #0 + beq _022567A4 + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _022567A0 + add r0, r4, #0 + bl ov28_0225632C + b _022567A4 +_022567A0: + mov r0, #0 + strb r0, [r4, #1] +_022567A4: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov28_022566A0 + + thumb_func_start ov28_022567A8 +ov28_022567A8: ; 0x022567A8 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _022567B8 + cmp r1, #1 + beq _02256842 + b _02256862 +_022567B8: + mov r1, #0 + mvn r1, r1 + str r1, [r4, #8] + ldrh r1, [r4, #6] + sub r1, #0xa + cmp r1, #7 + bhi _02256800 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022567D2: ; jump table + .short _022567F0 - _022567D2 - 2 ; case 0 + .short _0225681A - _022567D2 - 2 ; case 1 + .short _0225681A - _022567D2 - 2 ; case 2 + .short _0225681A - _022567D2 - 2 ; case 3 + .short _0225681A - _022567D2 - 2 ; case 4 + .short _0225681A - _022567D2 - 2 ; case 5 + .short _022567E2 - _022567D2 - 2 ; case 6 + .short _0225681A - _022567D2 - 2 ; case 7 +_022567E2: + bl ov28_02256868 + mov r0, #3 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #2] + b _0225681A +_022567F0: + bl ov28_02256868 + mov r0, #3 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #4] + strb r0, [r4, #2] + b _0225681A +_02256800: + add r0, r4, #0 + bl ov28_02256868 + ldrh r1, [r4, #6] + ldr r0, [r4, #0x1c] + bl ov28_0225717C + cmp r0, #0 + beq _02256816 + mov r0, #3 + str r0, [r4, #8] +_02256816: + mov r0, #1 + strb r0, [r4, #2] +_0225681A: + mov r0, #0 + ldr r1, [r4, #8] + mvn r0, r0 + cmp r1, r0 + beq _02256832 + ldr r0, [r4, #0x14] + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256862 +_02256832: + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _02256862 + add r0, r4, #0 + bl ov28_0225632C + b _02256862 +_02256842: + ldr r0, [r4, #0x14] + ldr r1, [r4, #8] + bl ov28_022569DC + cmp r0, #0 + beq _02256862 + ldrb r1, [r4, #2] + ldrb r0, [r4] + cmp r1, r0 + beq _0225685E + add r0, r4, #0 + bl ov28_0225632C + b _02256862 +_0225685E: + mov r0, #0 + strb r0, [r4, #1] +_02256862: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_022567A8 + + thumb_func_start ov28_02256868 +ov28_02256868: ; 0x02256868 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + bl ov28_02256EC8 + ldr r0, [r4, #0x20] + bl ov28_02256EC8 + ldr r0, [r4, #0x24] + bl ov28_02256EC8 + mov r0, #0x11 + strh r0, [r4, #0x1a] + mov r0, #0 + strb r0, [r4, #4] + pop {r4, pc} + thumb_func_end ov28_02256868 + + thumb_func_start ov28_02256888 +ov28_02256888: ; 0x02256888 + push {r4, lr} + sub r1, #0xb + add r4, r0, #0 + cmp r1, #3 + bhi _022568D4 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225689E: ; jump table + .short _022568B2 - _0225689E - 2 ; case 0 + .short _022568A6 - _0225689E - 2 ; case 1 + .short _022568BE - _0225689E - 2 ; case 2 + .short _022568CA - _0225689E - 2 ; case 3 +_022568A6: + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + bl ov28_02256EE8 + b _022568D4 +_022568B2: + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + bl ov28_02256F74 + b _022568D4 +_022568BE: + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + bl ov28_02257028 + b _022568D4 +_022568CA: + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + ldr r2, [r4, #0x24] + bl ov28_02257058 +_022568D4: + ldr r0, [r4, #0x24] + mov r1, #0xa + bl ov28_02257240 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_02256888 + + thumb_func_start ov28_022568E0 +ov28_022568E0: ; 0x022568E0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022568F0 + cmp r0, #1 + beq _02256900 + b _0225690E +_022568F0: + ldr r0, [r4, #0x14] + mov r1, #0xa + bl ov28_022569B8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225690E +_02256900: + ldr r0, [r4, #0x14] + bl ov28_022569E8 + cmp r0, #0 + beq _0225690E + mov r0, #1 + pop {r4, pc} +_0225690E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_022568E0 + + thumb_func_start ov28_02256914 +ov28_02256914: ; 0x02256914 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + bl ov28_02257468 + add r4, r0, #0 + mov r2, #0 + mov r0, #0 + sub r0, r0, r4 + sbc r2, r1 + bge _02256976 + mov r2, #0 + ldr r0, _02256978 ; =0x000001ED + sub r0, r0, r4 + sbc r2, r1 + blt _02256976 + ldr r0, [r5, #0x10] + bl ov25_02254544 + bl sub_02027560 + add r5, r0, #0 + bl sub_02027474 + cmp r0, #0 + beq _0225694E + lsl r0, r4, #0x10 + lsr r4, r0, #0x10 + b _02256958 +_0225694E: + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_020775C4 + add r4, r0, #0 +_02256958: + cmp r4, #0 + beq _02256976 + ldr r0, _02256978 ; =0x000001ED + cmp r4, r0 + bhi _02256976 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02026FE8 + cmp r0, #0 + beq _02256976 + add r0, r4, #0 + mov r1, #0 + bl ov25_02254444 +_02256976: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256978: .word 0x000001ED + thumb_func_end ov28_02256914 + + .rodata + + + .global Unk_ov28_0225763C +Unk_ov28_0225763C: ; 0x0225763C + .incbin "incbin/overlay28_rodata.bin", 0x0, 0x1C - 0x0 + + .global Unk_ov28_02257658 +Unk_ov28_02257658: ; 0x02257658 + .incbin "incbin/overlay28_rodata.bin", 0x1C, 0x44 + + .section .sinit, 4 + .word ov28_022561C0 diff --git a/asm/ov28_0225697C.s b/asm/ov28_0225697C.s new file mode 100644 index 000000000..9b1d126b0 --- /dev/null +++ b/asm/ov28_0225697C.s @@ -0,0 +1,753 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov28_0225697C +ov28_0225697C: ; 0x0225697C + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r1, _022569A8 ; =0x0000048C + mov r0, #8 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + beq _022569A2 + str r6, [r4, #0] + str r7, [r4, #4] + add r0, #8 + mov r1, #8 + bl ov25_02255090 + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022569A2: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022569A8: .word 0x0000048C + thumb_func_end ov28_0225697C + + thumb_func_start ov28_022569AC +ov28_022569AC: ; 0x022569AC + push {r3, lr} + cmp r0, #0 + beq _022569B6 + bl sub_020181C4 +_022569B6: + pop {r3, pc} + thumb_func_end ov28_022569AC + + thumb_func_start ov28_022569B8 +ov28_022569B8: ; 0x022569B8 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _022569D8 ; =0x022579C0 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022569D8: .word 0x022579C0 + thumb_func_end ov28_022569B8 + + thumb_func_start ov28_022569DC +ov28_022569DC: ; 0x022569DC + ldr r3, _022569E4 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022569E4: .word ov25_02255130 + thumb_func_end ov28_022569DC + + thumb_func_start ov28_022569E8 +ov28_022569E8: ; 0x022569E8 + ldr r3, _022569F0 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022569F0: .word ov25_02255154 + thumb_func_end ov28_022569E8 + + thumb_func_start ov28_022569F4 +ov28_022569F4: ; 0x022569F4 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_022569F4 + + thumb_func_start ov28_02256A08 +ov28_02256A08: ; 0x02256A08 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_02255240 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _02256A98 ; =0x0225769C + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x10 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x11 + mov r3, #6 + bl sub_02006E60 + add r0, r5, #0 + bl ov28_02256AA4 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256A9C ; =0x04001000 + ldr r0, _02256AA0 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov28_022569F4 + add sp, #0x14 + pop {r4, r5, pc} + nop +_02256A98: .word 0x0225769C +_02256A9C: .word 0x04001000 +_02256AA0: .word 0xFFFFE0FF + thumb_func_end ov28_02256A08 + + thumb_func_start ov28_02256AA4 +ov28_02256AA4: ; 0x02256AA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + ldr r0, [r6, #4] + mov r1, #6 + bl sub_02019FE4 + mov ip, r0 + mov r0, #0 + ldr r3, _02256B20 ; =0x02257938 + str r0, [sp, #4] +_02256ABA: + ldrb r7, [r3, #1] + ldrb r0, [r3, #3] + mov r2, #0 + add r0, r7, r0 + cmp r7, r0 + bhs _02256B0C + lsl r0, r7, #5 + str r0, [sp] +_02256ACA: + ldrb r1, [r3] + ldrb r0, [r3, #2] + add r0, r1, r0 + cmp r1, r0 + bhs _02256AFA + ldr r0, [sp] + lsl r4, r0, #1 + mov r0, ip + add r4, r0, r4 + lsl r0, r1, #1 + add r4, r4, r0 +_02256AE0: + lsl r5, r2, #1 + ldrh r0, [r4] + add r5, r6, r5 + add r5, #0x4c + strh r0, [r5] + ldrb r5, [r3] + ldrb r0, [r3, #2] + add r1, r1, #1 + add r2, r2, #1 + add r0, r5, r0 + add r4, r4, #2 + cmp r1, r0 + blo _02256AE0 +_02256AFA: + ldr r0, [sp] + ldrb r1, [r3, #1] + add r0, #0x20 + str r0, [sp] + ldrb r0, [r3, #3] + add r7, r7, #1 + add r0, r1, r0 + cmp r7, r0 + blo _02256ACA +_02256B0C: + ldr r0, [sp, #4] + add r3, r3, #4 + add r0, r0, #1 + add r6, #0x40 + str r0, [sp, #4] + cmp r0, #0x11 + blo _02256ABA + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256B20: .word 0x02257938 + thumb_func_end ov28_02256AA4 + + thumb_func_start ov28_02256B24 +ov28_02256B24: ; 0x02256B24 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + ldrh r5, [r5] + ldr r0, _02256B78 ; =0x00000663 + bl ov25_02254424 + lsl r3, r5, #2 + ldr r0, _02256B7C ; =0x02257939 + ldr r2, _02256B80 ; =0x0225797C + ldrb r0, [r0, r3] + ldr r5, _02256B84 ; =0x02257938 + ldr r2, [r2, r3] + str r0, [sp] + ldr r0, _02256B88 ; =0x0225793A + mov r1, #6 + ldrb r0, [r0, r3] + str r0, [sp, #4] + ldr r0, _02256B8C ; =0x0225793B + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_020198C0 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02256B78: .word 0x00000663 +_02256B7C: .word 0x02257939 +_02256B80: .word 0x0225797C +_02256B84: .word 0x02257938 +_02256B88: .word 0x0225793A +_02256B8C: .word 0x0225793B + thumb_func_end ov28_02256B24 + + thumb_func_start ov28_02256B90 +ov28_02256B90: ; 0x02256B90 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + ldrh r5, [r0] + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + lsl r3, r5, #2 + ldr r0, _02256BE0 ; =0x02257939 + add r2, r4, #0 + ldrb r0, [r0, r3] + add r2, #0x4c + lsl r5, r5, #6 + str r0, [sp] + ldr r0, _02256BE4 ; =0x0225793A + add r2, r2, r5 + ldrb r0, [r0, r3] + ldr r5, _02256BE8 ; =0x02257938 + mov r1, #6 + str r0, [sp, #4] + ldr r0, _02256BEC ; =0x0225793B + ldrb r0, [r0, r3] + ldrb r3, [r5, r3] + str r0, [sp, #8] + ldr r0, [r4, #4] + bl sub_020198C0 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02256BE0: .word 0x02257939 +_02256BE4: .word 0x0225793A +_02256BE8: .word 0x02257938 +_02256BEC: .word 0x0225793B + thumb_func_end ov28_02256B90 + + thumb_func_start ov28_02256BF0 +ov28_02256BF0: ; 0x02256BF0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r5, #4] + add r1, #0x30 + bl ov28_0225726C + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x30 + bl ov28_02256E0C + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + pop {r4, r5, r6, pc} + thumb_func_end ov28_02256BF0 + + thumb_func_start ov28_02256C28 +ov28_02256C28: ; 0x02256C28 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r5, #4] + add r1, #0x30 + bl ov28_0225726C + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x30 + bl ov28_02256E0C + ldr r0, [r4, #4] + bl ov28_02256DCC + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov28_02256C28 + + thumb_func_start ov28_02256C68 +ov28_02256C68: ; 0x02256C68 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r5, #8] + add r1, #0x30 + bl ov28_0225726C + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x30 + bl ov28_02256E0C + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + pop {r4, r5, r6, pc} + thumb_func_end ov28_02256C68 + + thumb_func_start ov28_02256CA0 +ov28_02256CA0: ; 0x02256CA0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r5, #0xc] + add r1, #0x30 + bl ov28_0225726C + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x30 + bl ov28_02256E0C + ldr r0, [r4, #4] + bl ov28_02256DCC + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov28_02256CA0 + + thumb_func_start ov28_02256CE0 +ov28_02256CE0: ; 0x02256CE0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r5, #0xc] + add r1, #0x30 + bl ov28_0225726C + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x30 + bl ov28_02256E0C + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov28_02256D90 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r6, #0 + bl ov28_022569F4 + pop {r4, r5, r6, pc} + thumb_func_end ov28_02256CE0 + + thumb_func_start ov28_02256D20 +ov28_02256D20: ; 0x02256D20 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + mov r2, #0 + add r1, r4, #0 + mov r0, #0xc +_02256D32: + add r2, r2, #1 + strh r0, [r1, #0x30] + add r1, r1, #2 + cmp r2, #0xa + blo _02256D32 + lsl r0, r2, #1 + mov r1, #0xd + add r0, r4, r0 + strh r1, [r0, #0x30] + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x30 + bl ov28_02256E0C + ldr r0, [r4, #4] + bl ov28_02256DCC + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r5, #0 + bl ov28_022569F4 + pop {r3, r4, r5, pc} + thumb_func_end ov28_02256D20 + + thumb_func_start ov28_02256D64 +ov28_02256D64: ; 0x02256D64 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov28_02256D90 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r5, #0 + bl ov28_022569F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov28_02256D64 + + thumb_func_start ov28_02256D90 +ov28_02256D90: ; 0x02256D90 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + mov r1, #6 + add r4, r0, #0 + bl sub_02019FE4 + ldrh r1, [r5, #2] + cmp r1, #0x11 + bne _02256DAE + add r0, r4, #0 + bl ov28_02256DCC + add sp, #0xc + pop {r4, r5, pc} +_02256DAE: + sub r1, #0xb + lsl r1, r1, #1 + add r1, #0xf0 + str r1, [sp] + mov r1, #0x28 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #3 + add r2, r1, #0 + mov r3, #0x20 + bl ov25_02255258 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov28_02256D90 + + thumb_func_start ov28_02256DCC +ov28_02256DCC: ; 0x02256DCC + push {lr} + sub sp, #0xc + mov r1, #6 + bl sub_02019FE4 + mov r1, #0x29 + str r1, [sp] + mov r1, #0x28 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #3 + add r2, r1, #0 + mov r3, #0x20 + bl ov25_02255258 + add sp, #0xc + pop {pc} + thumb_func_end ov28_02256DCC + + thumb_func_start ov28_02256DF0 +ov28_02256DF0: ; 0x02256DF0 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov28_022569F4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov28_02256DF0 + + thumb_func_start ov28_02256E0C +ov28_02256E0C: ; 0x02256E0C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r1, #0 + mov r1, #6 + bl sub_02019FE4 + add r7, r0, #0 + ldrh r0, [r6] + mov r1, #0 + cmp r0, #0xd + beq _02256E2E + add r2, r6, #0 +_02256E24: + add r2, r2, #2 + ldrh r0, [r2] + add r1, r1, #1 + cmp r0, #0xd + bne _02256E24 +_02256E2E: + mov r0, #0xa + mov r4, #0 + sub r0, r0, r1 + str r0, [sp, #0xc] + beq _02256E5C + mov r5, #5 +_02256E3A: + mov r0, #0x2b + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r7, #0 + add r1, r5, #0 + mov r2, #3 + mov r3, #0x20 + bl ov25_02255258 + ldr r0, [sp, #0xc] + add r4, r4, #1 + add r5, r5, #2 + cmp r4, r0 + blo _02256E3A +_02256E5C: + mov r0, #0 + str r0, [sp, #0x10] + cmp r4, #0xa + bhs _02256E96 + bhs _02256E96 + lsl r0, r4, #1 + add r5, r0, #5 +_02256E6A: + ldrh r0, [r6] + add r1, r5, #0 + mov r2, #3 + lsl r0, r0, #1 + add r0, #0xa5 + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r7, #0 + mov r3, #0x20 + bl ov25_02255258 + ldr r0, [sp, #0x10] + add r4, r4, #1 + add r0, r0, #1 + add r5, r5, #2 + add r6, r6, #2 + str r0, [sp, #0x10] + cmp r4, #0xa + blo _02256E6A +_02256E96: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov28_02256E0C + + .rodata + + + .global Unk_ov28_0225769C +Unk_ov28_0225769C: ; 0x0225769C + .incbin "incbin/overlay28_rodata.bin", 0x60, 0x7C - 0x60 + + .global Unk_ov28_022576B8 +Unk_ov28_022576B8: ; 0x022576B8 + .incbin "incbin/overlay28_rodata.bin", 0x7C, 0x9C - 0x7C + + .global Unk_ov28_022576D8 +Unk_ov28_022576D8: ; 0x022576D8 + .incbin "incbin/overlay28_rodata.bin", 0x9C, 0xBC - 0x9C + + .global Unk_ov28_022576F8 +Unk_ov28_022576F8: ; 0x022576F8 + .incbin "incbin/overlay28_rodata.bin", 0xBC, 0xDC - 0xBC + + .global Unk_ov28_02257718 +Unk_ov28_02257718: ; 0x02257718 + .incbin "incbin/overlay28_rodata.bin", 0xDC, 0xFC - 0xDC + + .global Unk_ov28_02257738 +Unk_ov28_02257738: ; 0x02257738 + .incbin "incbin/overlay28_rodata.bin", 0xFC, 0x11C - 0xFC + + .global Unk_ov28_02257758 +Unk_ov28_02257758: ; 0x02257758 + .incbin "incbin/overlay28_rodata.bin", 0x11C, 0x13C - 0x11C + + .global Unk_ov28_02257778 +Unk_ov28_02257778: ; 0x02257778 + .incbin "incbin/overlay28_rodata.bin", 0x13C, 0x15C - 0x13C + + .global Unk_ov28_02257798 +Unk_ov28_02257798: ; 0x02257798 + .incbin "incbin/overlay28_rodata.bin", 0x15C, 0x17C - 0x15C + + .global Unk_ov28_022577B8 +Unk_ov28_022577B8: ; 0x022577B8 + .incbin "incbin/overlay28_rodata.bin", 0x17C, 0x19C - 0x17C + + .global Unk_ov28_022577D8 +Unk_ov28_022577D8: ; 0x022577D8 + .incbin "incbin/overlay28_rodata.bin", 0x19C, 0x1BC - 0x19C + + .global Unk_ov28_022577F8 +Unk_ov28_022577F8: ; 0x022577F8 + .incbin "incbin/overlay28_rodata.bin", 0x1BC, 0x1DC - 0x1BC + + .global Unk_ov28_02257818 +Unk_ov28_02257818: ; 0x02257818 + .incbin "incbin/overlay28_rodata.bin", 0x1DC, 0x1FC - 0x1DC + + .global Unk_ov28_02257838 +Unk_ov28_02257838: ; 0x02257838 + .incbin "incbin/overlay28_rodata.bin", 0x1FC, 0x21C - 0x1FC + + .global Unk_ov28_02257858 +Unk_ov28_02257858: ; 0x02257858 + .incbin "incbin/overlay28_rodata.bin", 0x21C, 0x23C - 0x21C + + .global Unk_ov28_02257878 +Unk_ov28_02257878: ; 0x02257878 + .incbin "incbin/overlay28_rodata.bin", 0x23C, 0x27C - 0x23C + + .global Unk_ov28_022578B8 +Unk_ov28_022578B8: ; 0x022578B8 + .incbin "incbin/overlay28_rodata.bin", 0x27C, 0x2BC - 0x27C + + .global Unk_ov28_022578F8 +Unk_ov28_022578F8: ; 0x022578F8 + .incbin "incbin/overlay28_rodata.bin", 0x2BC, 0x2FC - 0x2BC + + .global Unk_ov28_02257938 +Unk_ov28_02257938: ; 0x02257938 + .incbin "incbin/overlay28_rodata.bin", 0x2FC, 0x340 - 0x2FC + + .global Unk_ov28_0225797C +Unk_ov28_0225797C: ; 0x0225797C + .incbin "incbin/overlay28_rodata.bin", 0x340, 0x384 - 0x340 + + .global Unk_ov28_022579C0 +Unk_ov28_022579C0: ; 0x022579C0 + .incbin "incbin/overlay28_rodata.bin", 0x384, 0x90 + diff --git a/asm/ov28_02256E9C.s b/asm/ov28_02256E9C.s new file mode 100644 index 000000000..729e220cf --- /dev/null +++ b/asm/ov28_02256E9C.s @@ -0,0 +1,1081 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov28_02256E9C +ov28_02256E9C: ; 0x02256E9C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #8 + mov r1, #0xc + bl sub_02018144 + str r0, [r5, #0] + cmp r0, #0 + beq _02256EBC + strb r4, [r0, #0xa] + ldr r0, [r5, #0] + bl ov28_02256EC8 + mov r0, #1 + pop {r3, r4, r5, pc} +_02256EBC: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov28_02256E9C + + thumb_func_start ov28_02256EC0 +ov28_02256EC0: ; 0x02256EC0 + ldr r3, _02256EC4 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_02256EC4: .word sub_020181C4 + thumb_func_end ov28_02256EC0 + + thumb_func_start ov28_02256EC8 +ov28_02256EC8: ; 0x02256EC8 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #4] + strb r1, [r0, #9] + strb r1, [r0, #8] + strb r1, [r0, #0xb] + bx lr + ; .align 2, 0 + thumb_func_end ov28_02256EC8 + + thumb_func_start ov28_02256ED8 +ov28_02256ED8: ; 0x02256ED8 + add r2, r1, #0 + add r3, r0, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov28_02256ED8 + + thumb_func_start ov28_02256EE8 +ov28_02256EE8: ; 0x02256EE8 + push {r4, r5, r6, lr} + sub sp, #0x30 + add r5, r0, #0 + add r3, r1, #0 + ldrb r1, [r5, #9] + add r4, r2, #0 + cmp r1, #0 + bne _02256F1A + ldrb r0, [r3, #9] + cmp r0, #1 + bne _02256F1A + ldmia r3!, {r0, r1} + add r6, sp, #0x24 + add r4, r6, #0 + stmia r6!, {r0, r1} + ldr r0, [r3, #0] + add r1, r4, #0 + str r0, [r6, #0] + mov r0, #0 + strb r0, [r4, #9] + add r0, r5, #0 + bl ov28_02256F74 + add sp, #0x30 + pop {r4, r5, r6, pc} +_02256F1A: + cmp r1, #1 + bne _02256F42 + ldrb r0, [r3, #9] + cmp r0, #0 + bne _02256F42 + ldmia r5!, {r0, r1} + add r6, sp, #0x18 + add r2, r6, #0 + stmia r6!, {r0, r1} + ldr r0, [r5, #0] + add r1, r2, #0 + str r0, [r6, #0] + mov r0, #0 + strb r0, [r2, #9] + add r0, r3, #0 + add r2, r4, #0 + bl ov28_02256F74 + add sp, #0x30 + pop {r4, r5, r6, pc} +_02256F42: + add r1, r3, #0 + add r0, r5, #0 + add r2, sp, #0xc + add r3, sp, #0 + bl ov28_022575EC + ldr r2, [sp, #0xc] + ldr r1, [sp] + ldr r3, [sp, #0x10] + ldr r0, [sp, #4] + add r1, r2, r1 + adc r3, r0 + str r1, [r4, #0] + str r3, [r4, #4] + add r0, sp, #0 + ldrb r1, [r0, #0x14] + strb r1, [r4, #8] + ldrb r0, [r0, #0x15] + strb r0, [r4, #9] + add r0, r4, #0 + bl ov28_022574FC + add sp, #0x30 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov28_02256EE8 + + thumb_func_start ov28_02256F74 +ov28_02256F74: ; 0x02256F74 + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + ldrb r1, [r5, #9] + add r6, r2, #0 + cmp r1, #0 + bne _02256F8A + ldrb r0, [r4, #9] + cmp r0, #1 + beq _02256F94 +_02256F8A: + cmp r1, #1 + bne _02256FB6 + ldrb r0, [r4, #9] + cmp r0, #0 + bne _02256FB6 +_02256F94: + ldmia r4!, {r0, r1} + add r3, sp, #0x18 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + ldrb r1, [r2, #9] + mov r0, #1 + eor r0, r1 + strb r0, [r2, #9] + add r1, r2, #0 + add r0, r5, #0 + add r2, r6, #0 + bl ov28_02256EE8 + add sp, #0x24 + pop {r3, r4, r5, r6, pc} +_02256FB6: + add r0, r5, #0 + add r1, r4, #0 + bl ov28_022571F4 + cmp r0, #0 + beq _02256FCC + add r0, r6, #0 + bl ov28_02256EC8 + add sp, #0x24 + pop {r3, r4, r5, r6, pc} +_02256FCC: + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0xc + add r3, sp, #0 + bl ov28_022575EC + ldr r3, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r0, [sp] + ldr r1, [sp, #4] + add r5, sp, #0xc + add r4, sp, #0 + sub r0, r3, r0 + sbc r2, r1 + bhs _02256FEE + mov r1, #1 + b _02256FF0 +_02256FEE: + mov r1, #0 +_02256FF0: + add r0, sp, #0 + ldrb r0, [r0, #0x15] + eor r0, r1 + beq _02257006 + add r0, r5, #0 + add r5, r4, #0 + ldrb r1, [r5, #9] + add r4, r0, #0 + mov r0, #1 + eor r0, r1 + b _02257008 +_02257006: + ldrb r0, [r5, #9] +_02257008: + strb r0, [r6, #9] + ldr r2, [r5, #0] + ldr r1, [r4, #0] + ldr r3, [r5, #4] + ldr r0, [r4, #4] + sub r1, r2, r1 + sbc r3, r0 + str r1, [r6, #0] + str r3, [r6, #4] + ldrb r0, [r5, #8] + strb r0, [r6, #8] + add r0, r6, #0 + bl ov28_022574FC + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov28_02256F74 + + thumb_func_start ov28_02257028 +ov28_02257028: ; 0x02257028 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #4] + ldr r2, [r6, #0] + ldr r3, [r6, #4] + bl sub_020E1F1C + str r0, [r4, #0] + str r1, [r4, #4] + ldrb r1, [r5, #8] + ldrb r0, [r6, #8] + add r0, r1, r0 + strb r0, [r4, #8] + ldrb r1, [r5, #9] + ldrb r0, [r6, #9] + eor r0, r1 + strb r0, [r4, #9] + add r0, r4, #0 + bl ov28_022574FC + pop {r4, r5, r6, pc} + thumb_func_end ov28_02257028 + + thumb_func_start ov28_02257058 +ov28_02257058: ; 0x02257058 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r2, #0 + add r2, r1, #0 + add r3, r1, #0 + ldr r6, [r3, #4] + mov r3, #0 + ldr r2, [r2, #0] + mov r4, #0 + eor r3, r6 + eor r2, r4 + str r1, [sp] + orr r2, r3 + bne _0225707C + mov r0, #1 + add sp, #0x1c + strb r0, [r5, #0xb] + pop {r4, r5, r6, r7, pc} +_0225707C: + add r2, sp, #0x10 + add r3, sp, #4 + bl ov28_022575EC + add r0, sp, #4 + str r0, [sp] + ldr r4, [sp, #4] + ldr r3, [sp, #8] + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, _0225716C ; =0x04000280 + mov r6, #2 + strh r6, [r0] + add r6, r0, #0 + add r6, #0x10 + str r2, [r6, #0] + str r1, [r6, #4] + add r1, r0, #0 + add r1, #0x18 + str r4, [r1, #0] + str r3, [r1, #4] + lsr r1, r0, #0xb +_022570A8: + ldrh r2, [r0] + tst r2, r1 + bne _022570A8 + ldr r0, _02257170 ; =0x040002A0 + ldr r1, [r0, #0] + ldr r0, [r0, #4] + str r1, [r5, #0] + str r0, [r5, #4] + mov r0, #0 + strb r0, [r5, #8] + add r0, r5, #0 + bl ov28_02257498 + ldr r2, _0225716C ; =0x04000280 + add r7, r0, #0 + lsr r0, r2, #0xb +_022570C8: + ldrh r1, [r2] + tst r1, r0 + bne _022570C8 + ldr r0, _02257174 ; =0x040002A8 + mov r1, #0 + ldr r2, [r0, #4] + ldr r3, [r0, #0] + mov r0, #0 + eor r1, r2 + eor r0, r3 + orr r0, r1 + beq _0225715C +_022570E0: + ldrb r0, [r5, #8] + add r1, r7, #1 + add r1, r1, r0 + ldrb r0, [r5, #0xa] + cmp r1, r0 + bhs _0225715C + ldr r4, [sp, #4] + ldr r6, [sp, #8] + ldr r0, _0225716C ; =0x04000280 + mov r1, #2 + strh r1, [r0] + add r0, r3, #0 + add r1, r2, #0 + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + ldr r2, _02257178 ; =0x04000290 + mov r3, #0 + str r0, [r2, #0] + str r1, [r2, #4] + add r2, #8 + str r4, [r2, #0] + str r6, [r2, #4] + ldr r0, [r5, #0] + ldr r1, [r5, #4] + mov r2, #0xa + bl sub_020E1F1C + str r0, [r5, #0] + ldr r2, _0225716C ; =0x04000280 + str r1, [r5, #4] + lsr r0, r2, #0xb +_02257122: + ldrh r1, [r2] + tst r1, r0 + bne _02257122 + ldr r0, _02257170 ; =0x040002A0 + ldr r2, [r5, #0] + ldr r1, [r0, #0] + ldr r3, [r5, #4] + add r1, r2, r1 + ldr r0, [r0, #4] + ldr r2, _0225716C ; =0x04000280 + adc r3, r0 + str r1, [r5, #0] + str r3, [r5, #4] + ldrb r0, [r5, #8] + add r0, r0, #1 + strb r0, [r5, #8] + lsr r0, r2, #0xb +_02257144: + ldrh r1, [r2] + tst r1, r0 + bne _02257144 + ldr r0, _02257174 ; =0x040002A8 + mov r1, #0 + ldr r2, [r0, #4] + ldr r3, [r0, #0] + mov r0, #0 + eor r1, r2 + eor r0, r3 + orr r0, r1 + bne _022570E0 +_0225715C: + add r0, sp, #0x10 + ldrb r1, [r0, #9] + ldr r0, [sp] + ldrb r0, [r0, #9] + eor r0, r1 + strb r0, [r5, #9] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225716C: .word 0x04000280 +_02257170: .word 0x040002A0 +_02257174: .word 0x040002A8 +_02257178: .word 0x04000290 + thumb_func_end ov28_02257058 + + thumb_func_start ov28_0225717C +ov28_0225717C: ; 0x0225717C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov28_022574E8 + ldrb r1, [r5, #0xa] + cmp r0, r1 + blo _02257190 + mov r0, #0 + pop {r3, r4, r5, pc} +_02257190: + ldrb r0, [r5, #8] + cmp r0, #0 + bne _022571B2 + ldr r0, [r5, #0] + ldr r1, [r5, #4] + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + str r0, [r5, #0] + str r1, [r5, #4] + ldr r2, [r5, #0] + mov r0, #0 + add r2, r2, r4 + adc r1, r0 + str r2, [r5, #0] + str r1, [r5, #4] +_022571B2: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov28_0225717C + + thumb_func_start ov28_022571B8 +ov28_022571B8: ; 0x022571B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov28_022574E8 + ldrb r1, [r5, #0xa] + cmp r0, r1 + blo _022571CC + mov r0, #0 + pop {r3, r4, r5, pc} +_022571CC: + ldr r0, [r5, #0] + ldr r1, [r5, #4] + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + str r0, [r5, #0] + str r1, [r5, #4] + ldr r2, [r5, #0] + mov r0, #0 + add r2, r2, r4 + adc r1, r0 + str r2, [r5, #0] + str r1, [r5, #4] + ldrb r0, [r5, #8] + add r0, r0, #1 + strb r0, [r5, #8] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov28_022571B8 + + thumb_func_start ov28_022571F4 +ov28_022571F4: ; 0x022571F4 + push {r3, r4, r5, r6} + ldr r2, [r0, #4] + ldr r3, [r0, #0] + ldr r4, [r1, #4] + add r5, r2, #0 + eor r5, r4 + ldr r6, [r1, #0] + add r4, r3, #0 + eor r4, r6 + orr r4, r5 + beq _02257210 + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_02257210: + ldrb r5, [r0, #8] + ldrb r4, [r1, #8] + cmp r5, r4 + beq _0225721E + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_0225721E: + ldrb r4, [r0, #9] + ldrb r0, [r1, #9] + cmp r4, r0 + beq _02257238 + mov r1, #0 + mov r0, #0 + eor r1, r2 + eor r0, r3 + orr r0, r1 + beq _02257238 + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_02257238: + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov28_022571F4 + + thumb_func_start ov28_02257240 +ov28_02257240: ; 0x02257240 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldrb r1, [r5, #0xb] + cmp r1, #0 + beq _02257250 + mov r0, #0 + pop {r3, r4, r5, pc} +_02257250: + bl ov28_02257498 + ldrb r1, [r5, #8] + cmp r1, #0 + beq _0225725E + add r1, r1, #1 + add r0, r0, r1 +_0225725E: + cmp r0, r4 + bls _02257266 + mov r0, #0 + pop {r3, r4, r5, pc} +_02257266: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov28_02257240 + + thumb_func_start ov28_0225726C +ov28_0225726C: ; 0x0225726C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp] + ldrb r0, [r0, #0xb] + str r1, [sp, #0x10] + cmp r0, #0 + beq _02257280 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02257280: + ldr r0, [sp] + mov r1, #0 + ldr r7, [r0, #4] + ldr r6, [r0, #0] + mov r0, #0 + eor r1, r7 + eor r0, r6 + orr r0, r1 + bne _022572D6 + ldr r1, [sp, #0x10] + add r0, r1, #0 + add r2, r0, #2 + mov r0, #0 + strh r0, [r1] + ldr r1, [sp] + str r2, [sp, #0x10] + ldrb r1, [r1, #8] + cmp r1, #0 + beq _022572CA + add r1, r2, #2 + str r1, [sp, #0x10] + mov r1, #0xa + strh r1, [r2] + ldr r1, [sp] + ldrb r1, [r1, #8] + cmp r1, #0 + ble _022572CA + add r2, r0, #0 +_022572B8: + ldr r1, [sp, #0x10] + add r0, r0, #1 + strh r2, [r1] + add r1, r1, #2 + str r1, [sp, #0x10] + ldr r1, [sp] + ldrb r1, [r1, #8] + cmp r0, r1 + blt _022572B8 +_022572CA: + ldr r0, [sp, #0x10] + mov r1, #0xd + strh r1, [r0] + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022572D6: + mov r2, #0xa + mov r0, #1 + mov r1, #0 + sub r2, r6, r2 + mov ip, r7 + mov r2, ip + sbc r2, r1 + blo _022572FA + ldr r2, _0225744C ; =0x02257A58 +_022572E8: + add r2, #8 + ldr r3, [r2, #0] + add r0, r0, #1 + ldr r1, [r2, #4] + sub r3, r6, r3 + mov ip, r7 + mov r3, ip + sbc r3, r1 + bhs _022572E8 +_022572FA: + ldr r1, [sp] + str r0, [sp, #8] + ldrb r1, [r1, #8] + sub r3, r1, r0 + bmi _0225730C + add r1, r3, #2 + add r1, r0, r1 + str r1, [sp, #8] + b _02257314 +_0225730C: + cmp r1, #0 + beq _02257314 + add r1, r0, #1 + str r1, [sp, #8] +_02257314: + ldr r1, [sp] + ldr r4, [sp] + ldrb r2, [r1, #9] + ldr r1, [sp, #8] + ldrb r4, [r4, #0xa] + add r1, r1, r2 + cmp r1, r4 + bls _0225732A + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0225732A: + cmp r2, #1 + bne _02257338 + ldr r1, [sp, #0x10] + mov r2, #0xb + strh r2, [r1] + add r1, r1, #2 + str r1, [sp, #0x10] +_02257338: + ldr r5, [sp, #0x10] + cmp r3, #0 + blt _02257362 + add r0, r5, #0 + mov r1, #0 + strh r1, [r0] + mov r1, #0xa + add r5, r0, #4 + strh r1, [r0, #2] + add r0, r3, #0 + sub r3, r3, #1 + cmp r0, #0 + beq _022573CE + mov r0, #0 +_02257354: + add r1, r3, #0 + strh r0, [r5] + add r5, r5, #2 + sub r3, r3, #1 + cmp r1, #0 + bne _02257354 + b _022573CE +_02257362: + neg r1, r3 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #0x14] + ldr r1, [sp, #4] + cmp r1, #0 + ble _022573C0 + ldr r4, _02257450 ; =0x04000280 + sub r0, r0, #1 + mov lr, r0 + lsr r3, r4, #0xb + lsr r2, r4, #0xb +_0225737A: + mov r0, #2 + strh r0, [r4] + ldr r0, _02257454 ; =0x04000290 + mov r1, lr + str r6, [r0, #0] + str r7, [r0, #4] + ldr r0, [sp, #0x14] + sub r0, r1, r0 + lsl r1, r0, #3 + ldr r0, _02257458 ; =0x02257A50 + add r6, r0, r1 + ldr r1, [r0, r1] + ldr r6, [r6, #4] + ldr r0, _0225745C ; =0x04000298 + str r1, [r0, #0] + str r6, [r0, #4] +_0225739A: + ldrh r0, [r4] + tst r0, r3 + bne _0225739A + ldr r0, _02257460 ; =0x040002A0 + ldr r0, [r0, #0] + strh r0, [r5] + add r5, r5, #2 +_022573A8: + ldrh r0, [r4] + tst r0, r2 + bne _022573A8 + ldr r0, _02257464 ; =0x040002A8 + ldr r1, [sp, #4] + ldr r6, [r0, #0] + ldr r7, [r0, #4] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, r1 + blt _0225737A +_022573C0: + ldr r0, [sp] + ldrb r0, [r0, #8] + cmp r0, #0 + beq _022573CE + mov r0, #0xa + strh r0, [r5] + add r5, r5, #2 +_022573CE: + ldr r0, [sp, #0x10] + sub r1, r5, r0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + ldr r0, [sp, #8] + cmp r1, r0 + bhs _02257440 + sub r0, r0, r1 + str r0, [sp, #0x18] + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + cmp r0, #0 + ble _02257440 + ldr r4, _02257450 ; =0x04000280 + sub r0, r0, #1 + str r0, [sp, #0xc] + lsr r3, r4, #0xb + lsr r2, r4, #0xb +_022573F6: + mov r0, #2 + strh r0, [r4] + ldr r0, _02257454 ; =0x04000290 + ldr r1, [sp, #0xc] + str r6, [r0, #0] + str r7, [r0, #4] + ldr r0, [sp, #0x1c] + ldr r6, _02257458 ; =0x02257A50 + sub r0, r1, r0 + lsl r1, r0, #3 + ldr r0, _02257458 ; =0x02257A50 + add r0, r0, r1 + ldr r1, [r6, r1] + ldr r0, [r0, #4] + ldr r6, _0225745C ; =0x04000298 + str r1, [r6, #0] + add r1, r6, #0 + str r0, [r1, #4] +_0225741A: + ldrh r0, [r4] + tst r0, r3 + bne _0225741A + ldr r0, _02257460 ; =0x040002A0 + ldr r0, [r0, #0] + strh r0, [r5] + add r5, r5, #2 +_02257428: + ldrh r0, [r4] + tst r0, r2 + bne _02257428 + ldr r0, _02257464 ; =0x040002A8 + ldr r1, [sp, #0x18] + ldr r6, [r0, #0] + ldr r7, [r0, #4] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, r1 + blt _022573F6 +_02257440: + mov r0, #0xd + strh r0, [r5] + mov r0, #1 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225744C: .word 0x02257A58 +_02257450: .word 0x04000280 +_02257454: .word 0x04000290 +_02257458: .word 0x02257A50 +_0225745C: .word 0x04000298 +_02257460: .word 0x040002A0 +_02257464: .word 0x040002A8 + thumb_func_end ov28_0225726C + + thumb_func_start ov28_02257468 +ov28_02257468: ; 0x02257468 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + lsl r5, r2, #3 + ldr r2, _02257494 ; =0x02257A50 + add r3, r2, r5 + ldr r2, [r2, r5] + ldr r3, [r3, #4] + bl sub_020E1ED4 + ldrb r2, [r4, #9] + cmp r2, #1 + bne _02257490 + mov r2, #0 + mvn r2, r2 + add r3, r2, #0 + bl sub_020E1F1C +_02257490: + pop {r3, r4, r5, pc} + nop +_02257494: .word 0x02257A50 + thumb_func_end ov28_02257468 + + thumb_func_start ov28_02257498 +ov28_02257498: ; 0x02257498 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + ldr r2, [sp] + mov r0, #0xa + ldr r5, [r2, #0] + ldr r6, [r2, #4] + mov r2, #0xa + mov r1, #0 + mov r4, #1 + mov r3, #0 + sub r2, r5, r2 + mov ip, r6 + mov r2, ip + sbc r2, r3 + blo _022574D2 + ldr r2, [sp] + ldrb r7, [r2, #0xa] +_022574BA: + add r4, r4, #1 + cmp r4, r7 + bhi _022574D2 + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + sub r2, r5, r0 + mov ip, r6 + mov r2, ip + sbc r2, r1 + bhs _022574BA +_022574D2: + ldr r0, [sp] + ldrb r0, [r0, #8] + cmp r4, r0 + bls _022574DE + sub r4, r4, r0 + b _022574E0 +_022574DE: + mov r4, #1 +_022574E0: + ldr r0, [sp] + ldrb r0, [r0, #9] + add r0, r4, r0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov28_02257498 + + thumb_func_start ov28_022574E8 +ov28_022574E8: ; 0x022574E8 + push {r4, lr} + add r4, r0, #0 + bl ov28_02257498 + ldrb r1, [r4, #8] + cmp r1, #0 + beq _022574FA + add r1, r1, #1 + add r0, r0, r1 +_022574FA: + pop {r4, pc} + thumb_func_end ov28_022574E8 + + thumb_func_start ov28_022574FC +ov28_022574FC: ; 0x022574FC + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldrb r0, [r4, #8] + cmp r0, #0 + beq _02257582 + ldr r5, _022575DC ; =0x04000280 + ldr r2, [r4, #0] + add r3, r5, #0 + ldr r1, [r4, #4] + mov r0, #1 + strh r0, [r5] + add r3, #0x10 + str r2, [r3, #0] + add r0, r5, #0 + str r1, [r3, #4] + add r0, #0x18 + mov r2, #0xa + mov r1, #0 + str r2, [r0, #0] + str r1, [r0, #4] + add r1, r4, #0 + mov ip, r0 + add r1, #8 + b _02257564 +_0225752C: + mov r0, #2 + lsl r0, r0, #0xe +_02257530: + ldrh r2, [r5] + tst r2, r0 + bne _02257530 + ldr r0, _022575E0 ; =0x040002A0 + ldr r2, _022575E0 ; =0x040002A0 + ldr r0, [r0, #0] + ldr r2, [r2, #4] + str r0, [r4, #0] + str r2, [r4, #4] + ldr r6, [r4, #0] + mov r0, #1 + strh r0, [r5] + str r6, [r3, #0] + str r2, [r3, #4] + mov r2, #0xa + mov r0, ip + str r2, [r0, #0] + mov r2, #0 + mov r0, ip + str r2, [r0, #4] + ldrb r0, [r1] + sub r0, r0, #1 + strb r0, [r1] + ldrb r0, [r4, #8] + cmp r0, #0 + beq _02257582 +_02257564: + ldrh r2, [r5] + mov r0, #2 + lsl r0, r0, #0xe + tst r0, r2 + bne _02257564 + ldr r0, _022575E4 ; =0x040002A8 + mov r7, #0 + ldr r6, [r0, #0] + ldr r2, [r0, #4] + mov r0, #0 + eor r0, r2 + add r2, r6, #0 + eor r2, r7 + orr r0, r2 + beq _0225752C +_02257582: + add r0, r4, #0 + bl ov28_02257498 + ldrb r2, [r4, #8] + cmp r2, #0 + beq _022575D8 + add r1, r2, #1 + add r1, r0, r1 + ldrb r0, [r4, #0xa] + cmp r1, r0 + bls _022575D8 + sub r1, r1, r0 + cmp r1, r2 + bhi _022575D8 + ldr r5, [r4, #0] + ldr r3, [r4, #4] + ldr r0, _022575DC ; =0x04000280 + mov r2, #1 + strh r2, [r0] + add r2, r0, #0 + add r2, #0x10 + str r5, [r2, #0] + str r3, [r2, #4] + ldr r2, _022575E8 ; =0x02257A50 + lsl r3, r1, #3 + ldr r5, [r2, r3] + add r2, r0, #0 + add r2, #0x18 + mov r3, #0 + str r5, [r2, #0] + str r3, [r2, #4] + lsr r2, r0, #0xb +_022575C2: + ldrh r3, [r0] + tst r3, r2 + bne _022575C2 + ldr r0, _022575E0 ; =0x040002A0 + ldr r2, [r0, #0] + ldr r0, [r0, #4] + str r2, [r4, #0] + str r0, [r4, #4] + ldrb r0, [r4, #8] + sub r0, r0, r1 + strb r0, [r4, #8] +_022575D8: + pop {r3, r4, r5, r6, r7, pc} + nop +_022575DC: .word 0x04000280 +_022575E0: .word 0x040002A0 +_022575E4: .word 0x040002A8 +_022575E8: .word 0x02257A50 + thumb_func_end ov28_022574FC + + thumb_func_start ov28_022575EC +ov28_022575EC: ; 0x022575EC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + ldmia r6!, {r0, r1} + add r5, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r6, #0] + add r4, r3, #0 + str r0, [r2, #0] + ldmia r7!, {r0, r1} + add r2, r4, #0 + stmia r2!, {r0, r1} + ldr r0, [r7, #0] + str r0, [r2, #0] + ldrb r1, [r5, #8] + ldrb r0, [r4, #8] + cmp r1, r0 + bhs _02257616 + add r0, r5, #0 + add r5, r4, #0 + add r4, r0, #0 +_02257616: + ldrb r3, [r5, #8] + ldrb r2, [r4, #8] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + sub r2, r3, r2 + lsl r6, r2, #3 + ldr r2, _02257638 ; =0x02257A50 + add r3, r2, r6 + ldr r2, [r2, r6] + ldr r3, [r3, #4] + bl sub_020E1F1C + str r0, [r4, #0] + str r1, [r4, #4] + ldrb r0, [r5, #8] + strb r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02257638: .word 0x02257A50 + thumb_func_end ov28_022575EC + + .rodata + + + .global Unk_ov28_02257A50 +Unk_ov28_02257A50: ; 0x02257A50 + .incbin "incbin/overlay28_rodata.bin", 0x414, 0x58 + diff --git a/asm/overlay29.s b/asm/ov29_022561C0.s similarity index 54% rename from asm/overlay29.s rename to asm/ov29_022561C0.s index 8e718d930..dab1b26f5 100644 --- a/asm/overlay29.s +++ b/asm/ov29_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov29_022561C0 ov29_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -718,587 +721,16 @@ _022566BE: _022566C4: .word 0x000016F4 thumb_func_end ov29_0225668C - thumb_func_start ov29_022566C8 -ov29_022566C8: ; 0x022566C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x74 - bl sub_02018144 - add r4, r0, #0 - beq _02256722 - mov r0, #7 - bl sub_0201833C - cmp r0, #0 - bne _022566E8 - bl sub_02022974 -_022566E8: - add r0, r4, #0 - add r0, #8 - mov r1, #0x10 - bl ov25_02255090 - mov r0, #7 - bl sub_0201833C - cmp r0, #0 - bne _02256700 - bl sub_02022974 -_02256700: - str r6, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - bl ov25_02254664 - str r0, [r4, #0x50] - mov r0, #7 - bl sub_0201833C - cmp r0, #0 - bne _0225671C - bl sub_02022974 -_0225671C: - str r4, [r5, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256722: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov29_022566C8 - - thumb_func_start ov29_02256728 -ov29_02256728: ; 0x02256728 - push {r4, lr} - add r4, r0, #0 - mov r0, #8 - mov r1, #1 - bl sub_0201A778 - str r0, [r4, #0x70] - add r1, r0, #0 - beq _02256764 - ldr r0, [r4, #4] - ldr r2, _02256768 ; =0x02256B50 - bl sub_0201A8D4 - mov r2, #0xbe - ldr r1, [r4, #0] - ldr r0, _0225676C ; =0x000016E8 - lsl r2, r2, #6 - ldr r0, [r1, r0] - ldr r1, [r4, #0x70] - ldr r1, [r1, #0xc] - bl sub_02099DD0 - cmp r0, #0 - bne _02256760 - ldr r0, [r4, #0x70] - mov r1, #4 - bl sub_0201ADA4 -_02256760: - mov r0, #1 - pop {r4, pc} -_02256764: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02256768: .word 0x02256B50 -_0225676C: .word 0x000016E8 - thumb_func_end ov29_02256728 - - thumb_func_start ov29_02256770 -ov29_02256770: ; 0x02256770 - push {r4, lr} - add r4, r0, #0 - beq _022567AC - mov r0, #7 - bl sub_0201833C - cmp r0, #0 - bne _02256784 - bl sub_02022974 -_02256784: - ldr r2, [r4, #0x70] - cmp r2, #0 - beq _022567A6 - ldr r1, [r4, #0] - ldr r0, _022567B0 ; =0x000016E8 - ldr r0, [r1, r0] - ldr r1, [r2, #0xc] - mov r2, #0xbe - lsl r2, r2, #6 - bl sub_02099DA8 - ldr r0, [r4, #0x70] - bl sub_0201A8FC - ldr r0, [r4, #0x70] - bl sub_020181C4 -_022567A6: - add r0, r4, #0 - bl sub_020181C4 -_022567AC: - pop {r4, pc} - nop -_022567B0: .word 0x000016E8 - thumb_func_end ov29_02256770 - - thumb_func_start ov29_022567B4 -ov29_022567B4: ; 0x022567B4 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _022567D4 ; =0x02256BB0 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022567D4: .word 0x02256BB0 - thumb_func_end ov29_022567B4 - - thumb_func_start ov29_022567D8 -ov29_022567D8: ; 0x022567D8 - ldr r3, _022567E0 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022567E0: .word ov25_02255130 - thumb_func_end ov29_022567D8 - - thumb_func_start ov29_022567E4 -ov29_022567E4: ; 0x022567E4 - ldr r3, _022567EC ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022567EC: .word ov25_02255154 - thumb_func_end ov29_022567E4 - - thumb_func_start ov29_022567F0 -ov29_022567F0: ; 0x022567F0 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov29_022567F0 - - thumb_func_start ov29_02256804 -ov29_02256804: ; 0x02256804 - push {r4, r5, lr} - sub sp, #0x14 - mov r0, #8 - add r4, r1, #0 - bl sub_0201833C - cmp r0, #0 - bne _02256818 - bl sub_02022974 -_02256818: - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _022568F8 ; =0x02256B58 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #4] - ldr r2, _022568FC ; =0x02256B74 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _02256846 - bl sub_02022974 -_02256846: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x1e - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x1f - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _02256890 - bl sub_02022974 -_02256890: - add r0, r5, #0 - bl ov29_02256728 - ldr r0, [r5, #0x70] - bl sub_0201A954 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _022568AA - bl sub_02022974 -_022568AA: - add r0, r5, #0 - bl ov29_02256ABC - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _022568BE - bl sub_02022974 -_022568BE: - ldr r0, [r5, #4] - mov r1, #7 - bl sub_02019448 - ldr r1, _02256900 ; =0x04001000 - ldr r0, _02256904 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #0x14 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov29_022567F0 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _022568F4 - bl sub_02022974 -_022568F4: - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_022568F8: .word 0x02256B58 -_022568FC: .word 0x02256B74 -_02256900: .word 0x04001000 -_02256904: .word 0xFFFFE0FF - thumb_func_end ov29_02256804 - - thumb_func_start ov29_02256908 -ov29_02256908: ; 0x02256908 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - cmp r0, #1 - ldr r0, [r4, #0x68] - bne _0225692E - mov r1, #0 - bl ov25_022558C4 - ldr r0, [r4, #0x6c] - mov r1, #3 - bl ov25_022558C4 - b _0225693C -_0225692E: - mov r1, #1 - bl ov25_022558C4 - ldr r0, [r4, #0x6c] - mov r1, #2 - bl ov25_022558C4 -_0225693C: - ldr r0, _0225694C ; =0x00000663 - bl ov25_02254424 - add r0, r5, #0 - bl ov29_022567F0 - pop {r3, r4, r5, pc} - nop -_0225694C: .word 0x00000663 - thumb_func_end ov29_02256908 - - thumb_func_start ov29_02256950 -ov29_02256950: ; 0x02256950 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #0x70] - bl sub_0201ACCC - add r0, r4, #0 - bl ov29_022567F0 - pop {r4, pc} - thumb_func_end ov29_02256950 - - thumb_func_start ov29_02256968 -ov29_02256968: ; 0x02256968 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r4, r0, #3 - sub r0, r3, #1 - add r1, r1, r0 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r1, r2, #2 - lsr r1, r1, #0x1d - add r1, r2, r1 - asr r3, r1, #3 - ldr r1, [sp, #0x18] - asr r0, r0, #3 - sub r1, r1, #1 - add r2, r2, r1 - asr r1, r2, #2 - lsr r1, r1, #0x1d - add r1, r2, r1 - asr r1, r1, #3 - sub r1, r1, r3 - mov r2, #0x14 - sub r0, r0, r4 - mul r2, r3 - add r1, r1, #1 - add r4, r4, r2 - sub r2, r1, #1 - add r0, r0, #1 - str r2, [sp] - cmp r1, #0 - beq _022569DA - lsl r5, r4, #5 - lsl r7, r0, #5 -_022569B0: - add r0, r6, r5 - add r1, r7, #0 - bl sub_020C2C54 - add r1, r4, #0 - add r1, #0xc - add r0, r6, r5 - lsl r1, r1, #5 - add r2, r7, #0 - bl sub_020C090C - mov r0, #0xa - lsl r0, r0, #6 - ldr r1, [sp] - add r5, r5, r0 - add r0, r1, #0 - sub r0, r0, #1 - add r4, #0x14 - str r0, [sp] - cmp r1, #0 - bne _022569B0 -_022569DA: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov29_02256968 - - thumb_func_start ov29_022569DC -ov29_022569DC: ; 0x022569DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r0, r1, #0 - str r1, [sp, #8] - bl ov25_0225523C - add r7, r0, #0 - ldr r0, [r7, #0] - ldr r1, [r0, #0] - cmp r1, #0 - bne _02256A44 - ldr r1, [r0, #4] - ldr r0, [r0, #8] - lsl r1, r1, #1 - mov r5, #8 - lsl r0, r0, #1 - sub r6, r1, #4 - sub r4, r0, #4 - str r5, [sp, #0xc] - cmp r6, #0 - bge _02256A0C - add r0, r5, r6 - str r0, [sp, #0xc] - mov r6, #0 -_02256A0C: - cmp r4, #0 - bge _02256A14 - add r5, r5, r4 - mov r4, #0 -_02256A14: - ldr r0, [sp, #0xc] - lsl r2, r6, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - lsl r3, r4, #0x10 - ldr r0, [r7, #0x70] - mov r1, #4 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 - str r5, [sp] - ldr r0, [r7, #0x70] - ldr r3, [sp, #0xc] - ldr r0, [r0, #0xc] - add r1, r6, #0 - add r2, r4, #0 - bl ov29_02256968 - b _02256A72 -_02256A44: - ldr r1, [r0, #4] - ldr r0, [r0, #8] - lsl r5, r1, #1 - lsl r4, r0, #1 - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - lsl r2, r5, #0x10 - lsl r3, r4, #0x10 - ldr r0, [r7, #0x70] - mov r1, #1 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 - mov r3, #2 - str r3, [sp] - ldr r0, [r7, #0x70] - add r1, r5, #0 - ldr r0, [r0, #0xc] - add r2, r4, #0 - bl ov29_02256968 -_02256A72: - ldr r0, [sp, #8] - bl ov29_022567F0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov29_022569DC - - thumb_func_start ov29_02256A7C -ov29_02256A7C: ; 0x02256A7C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #0x70] - bl sub_0201ACCC - add r0, r4, #0 - bl ov29_022567F0 - pop {r4, pc} - thumb_func_end ov29_02256A7C - - thumb_func_start ov29_02256A94 -ov29_02256A94: ; 0x02256A94 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - bl ov29_02256B18 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #7 - bl sub_02019044 - add r0, r5, #0 - bl ov29_022567F0 - pop {r3, r4, r5, pc} - thumb_func_end ov29_02256A94 - - thumb_func_start ov29_02256ABC -ov29_02256ABC: ; 0x02256ABC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r3, #0 - str r3, [sp] - mov r2, #1 - add r7, r0, #0 - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0x20 - bl sub_02006EC0 - mov r0, #8 - str r0, [sp] - add r0, r7, #0 - add r0, #0x54 - mov r1, #0xc - mov r2, #0x21 - mov r3, #0x22 - bl ov25_02255958 - cmp r0, #0 - beq _02256B10 - add r0, r7, #0 - str r0, [sp, #0xc] - add r0, #0x54 - ldr r4, _02256B14 ; =0x02256B90 - mov r6, #0 - add r5, r7, #0 - str r0, [sp, #0xc] -_02256AFA: - ldr r0, [r7, #0x50] - ldr r2, [sp, #0xc] - add r1, r4, #0 - bl ov25_02255810 - str r0, [r5, #0x68] - add r6, r6, #1 - add r4, #0x10 - add r5, r5, #4 - cmp r6, #2 - blt _02256AFA -_02256B10: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02256B14: .word 0x02256B90 - thumb_func_end ov29_02256ABC - - thumb_func_start ov29_02256B18 -ov29_02256B18: ; 0x02256B18 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02256B20: - ldr r0, [r6, #0x50] - ldr r1, [r5, #0x68] - bl ov25_022558B0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blo _02256B20 - add r6, #0x54 - add r0, r6, #0 - bl ov25_022559B0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov29_02256B18 - ; 0x02256B3C - - .rodata - .incbin "incbin/overlay29_rodata.bin" + + + .global Unk_ov29_02256B3C +Unk_ov29_02256B3C: ; 0x02256B3C + .incbin "incbin/overlay29_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov29_02256B44 +Unk_ov29_02256B44: ; 0x02256B44 + .incbin "incbin/overlay29_rodata.bin", 0x8, 0xC .section .sinit, 4 .word ov29_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov29_022566C8.s b/asm/ov29_022566C8.s new file mode 100644 index 000000000..de3a4061a --- /dev/null +++ b/asm/ov29_022566C8.s @@ -0,0 +1,605 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov29_022566C8 +ov29_022566C8: ; 0x022566C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x74 + bl sub_02018144 + add r4, r0, #0 + beq _02256722 + mov r0, #7 + bl sub_0201833C + cmp r0, #0 + bne _022566E8 + bl sub_02022974 +_022566E8: + add r0, r4, #0 + add r0, #8 + mov r1, #0x10 + bl ov25_02255090 + mov r0, #7 + bl sub_0201833C + cmp r0, #0 + bne _02256700 + bl sub_02022974 +_02256700: + str r6, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + bl ov25_02254664 + str r0, [r4, #0x50] + mov r0, #7 + bl sub_0201833C + cmp r0, #0 + bne _0225671C + bl sub_02022974 +_0225671C: + str r4, [r5, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256722: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov29_022566C8 + + thumb_func_start ov29_02256728 +ov29_02256728: ; 0x02256728 + push {r4, lr} + add r4, r0, #0 + mov r0, #8 + mov r1, #1 + bl sub_0201A778 + str r0, [r4, #0x70] + add r1, r0, #0 + beq _02256764 + ldr r0, [r4, #4] + ldr r2, _02256768 ; =0x02256B50 + bl sub_0201A8D4 + mov r2, #0xbe + ldr r1, [r4, #0] + ldr r0, _0225676C ; =0x000016E8 + lsl r2, r2, #6 + ldr r0, [r1, r0] + ldr r1, [r4, #0x70] + ldr r1, [r1, #0xc] + bl sub_02099DD0 + cmp r0, #0 + bne _02256760 + ldr r0, [r4, #0x70] + mov r1, #4 + bl sub_0201ADA4 +_02256760: + mov r0, #1 + pop {r4, pc} +_02256764: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02256768: .word 0x02256B50 +_0225676C: .word 0x000016E8 + thumb_func_end ov29_02256728 + + thumb_func_start ov29_02256770 +ov29_02256770: ; 0x02256770 + push {r4, lr} + add r4, r0, #0 + beq _022567AC + mov r0, #7 + bl sub_0201833C + cmp r0, #0 + bne _02256784 + bl sub_02022974 +_02256784: + ldr r2, [r4, #0x70] + cmp r2, #0 + beq _022567A6 + ldr r1, [r4, #0] + ldr r0, _022567B0 ; =0x000016E8 + ldr r0, [r1, r0] + ldr r1, [r2, #0xc] + mov r2, #0xbe + lsl r2, r2, #6 + bl sub_02099DA8 + ldr r0, [r4, #0x70] + bl sub_0201A8FC + ldr r0, [r4, #0x70] + bl sub_020181C4 +_022567A6: + add r0, r4, #0 + bl sub_020181C4 +_022567AC: + pop {r4, pc} + nop +_022567B0: .word 0x000016E8 + thumb_func_end ov29_02256770 + + thumb_func_start ov29_022567B4 +ov29_022567B4: ; 0x022567B4 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _022567D4 ; =0x02256BB0 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022567D4: .word 0x02256BB0 + thumb_func_end ov29_022567B4 + + thumb_func_start ov29_022567D8 +ov29_022567D8: ; 0x022567D8 + ldr r3, _022567E0 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022567E0: .word ov25_02255130 + thumb_func_end ov29_022567D8 + + thumb_func_start ov29_022567E4 +ov29_022567E4: ; 0x022567E4 + ldr r3, _022567EC ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022567EC: .word ov25_02255154 + thumb_func_end ov29_022567E4 + + thumb_func_start ov29_022567F0 +ov29_022567F0: ; 0x022567F0 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov29_022567F0 + + thumb_func_start ov29_02256804 +ov29_02256804: ; 0x02256804 + push {r4, r5, lr} + sub sp, #0x14 + mov r0, #8 + add r4, r1, #0 + bl sub_0201833C + cmp r0, #0 + bne _02256818 + bl sub_02022974 +_02256818: + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _022568F8 ; =0x02256B58 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #4] + ldr r2, _022568FC ; =0x02256B74 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _02256846 + bl sub_02022974 +_02256846: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x1e + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x1f + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _02256890 + bl sub_02022974 +_02256890: + add r0, r5, #0 + bl ov29_02256728 + ldr r0, [r5, #0x70] + bl sub_0201A954 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _022568AA + bl sub_02022974 +_022568AA: + add r0, r5, #0 + bl ov29_02256ABC + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _022568BE + bl sub_02022974 +_022568BE: + ldr r0, [r5, #4] + mov r1, #7 + bl sub_02019448 + ldr r1, _02256900 ; =0x04001000 + ldr r0, _02256904 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #0x14 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov29_022567F0 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _022568F4 + bl sub_02022974 +_022568F4: + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_022568F8: .word 0x02256B58 +_022568FC: .word 0x02256B74 +_02256900: .word 0x04001000 +_02256904: .word 0xFFFFE0FF + thumb_func_end ov29_02256804 + + thumb_func_start ov29_02256908 +ov29_02256908: ; 0x02256908 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + cmp r0, #1 + ldr r0, [r4, #0x68] + bne _0225692E + mov r1, #0 + bl ov25_022558C4 + ldr r0, [r4, #0x6c] + mov r1, #3 + bl ov25_022558C4 + b _0225693C +_0225692E: + mov r1, #1 + bl ov25_022558C4 + ldr r0, [r4, #0x6c] + mov r1, #2 + bl ov25_022558C4 +_0225693C: + ldr r0, _0225694C ; =0x00000663 + bl ov25_02254424 + add r0, r5, #0 + bl ov29_022567F0 + pop {r3, r4, r5, pc} + nop +_0225694C: .word 0x00000663 + thumb_func_end ov29_02256908 + + thumb_func_start ov29_02256950 +ov29_02256950: ; 0x02256950 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #0x70] + bl sub_0201ACCC + add r0, r4, #0 + bl ov29_022567F0 + pop {r4, pc} + thumb_func_end ov29_02256950 + + thumb_func_start ov29_02256968 +ov29_02256968: ; 0x02256968 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r4, r0, #3 + sub r0, r3, #1 + add r1, r1, r0 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + asr r1, r2, #2 + lsr r1, r1, #0x1d + add r1, r2, r1 + asr r3, r1, #3 + ldr r1, [sp, #0x18] + asr r0, r0, #3 + sub r1, r1, #1 + add r2, r2, r1 + asr r1, r2, #2 + lsr r1, r1, #0x1d + add r1, r2, r1 + asr r1, r1, #3 + sub r1, r1, r3 + mov r2, #0x14 + sub r0, r0, r4 + mul r2, r3 + add r1, r1, #1 + add r4, r4, r2 + sub r2, r1, #1 + add r0, r0, #1 + str r2, [sp] + cmp r1, #0 + beq _022569DA + lsl r5, r4, #5 + lsl r7, r0, #5 +_022569B0: + add r0, r6, r5 + add r1, r7, #0 + bl sub_020C2C54 + add r1, r4, #0 + add r1, #0xc + add r0, r6, r5 + lsl r1, r1, #5 + add r2, r7, #0 + bl sub_020C090C + mov r0, #0xa + lsl r0, r0, #6 + ldr r1, [sp] + add r5, r5, r0 + add r0, r1, #0 + sub r0, r0, #1 + add r4, #0x14 + str r0, [sp] + cmp r1, #0 + bne _022569B0 +_022569DA: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov29_02256968 + + thumb_func_start ov29_022569DC +ov29_022569DC: ; 0x022569DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r0, r1, #0 + str r1, [sp, #8] + bl ov25_0225523C + add r7, r0, #0 + ldr r0, [r7, #0] + ldr r1, [r0, #0] + cmp r1, #0 + bne _02256A44 + ldr r1, [r0, #4] + ldr r0, [r0, #8] + lsl r1, r1, #1 + mov r5, #8 + lsl r0, r0, #1 + sub r6, r1, #4 + sub r4, r0, #4 + str r5, [sp, #0xc] + cmp r6, #0 + bge _02256A0C + add r0, r5, r6 + str r0, [sp, #0xc] + mov r6, #0 +_02256A0C: + cmp r4, #0 + bge _02256A14 + add r5, r5, r4 + mov r4, #0 +_02256A14: + ldr r0, [sp, #0xc] + lsl r2, r6, #0x10 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + lsl r3, r4, #0x10 + ldr r0, [r7, #0x70] + mov r1, #4 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 + str r5, [sp] + ldr r0, [r7, #0x70] + ldr r3, [sp, #0xc] + ldr r0, [r0, #0xc] + add r1, r6, #0 + add r2, r4, #0 + bl ov29_02256968 + b _02256A72 +_02256A44: + ldr r1, [r0, #4] + ldr r0, [r0, #8] + lsl r5, r1, #1 + lsl r4, r0, #1 + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + lsl r2, r5, #0x10 + lsl r3, r4, #0x10 + ldr r0, [r7, #0x70] + mov r1, #1 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 + mov r3, #2 + str r3, [sp] + ldr r0, [r7, #0x70] + add r1, r5, #0 + ldr r0, [r0, #0xc] + add r2, r4, #0 + bl ov29_02256968 +_02256A72: + ldr r0, [sp, #8] + bl ov29_022567F0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov29_022569DC + + thumb_func_start ov29_02256A7C +ov29_02256A7C: ; 0x02256A7C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #0x70] + bl sub_0201ACCC + add r0, r4, #0 + bl ov29_022567F0 + pop {r4, pc} + thumb_func_end ov29_02256A7C + + thumb_func_start ov29_02256A94 +ov29_02256A94: ; 0x02256A94 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + bl ov29_02256B18 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #7 + bl sub_02019044 + add r0, r5, #0 + bl ov29_022567F0 + pop {r3, r4, r5, pc} + thumb_func_end ov29_02256A94 + + thumb_func_start ov29_02256ABC +ov29_02256ABC: ; 0x02256ABC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r3, #0 + str r3, [sp] + mov r2, #1 + add r7, r0, #0 + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0x20 + bl sub_02006EC0 + mov r0, #8 + str r0, [sp] + add r0, r7, #0 + add r0, #0x54 + mov r1, #0xc + mov r2, #0x21 + mov r3, #0x22 + bl ov25_02255958 + cmp r0, #0 + beq _02256B10 + add r0, r7, #0 + str r0, [sp, #0xc] + add r0, #0x54 + ldr r4, _02256B14 ; =0x02256B90 + mov r6, #0 + add r5, r7, #0 + str r0, [sp, #0xc] +_02256AFA: + ldr r0, [r7, #0x50] + ldr r2, [sp, #0xc] + add r1, r4, #0 + bl ov25_02255810 + str r0, [r5, #0x68] + add r6, r6, #1 + add r4, #0x10 + add r5, r5, #4 + cmp r6, #2 + blt _02256AFA +_02256B10: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02256B14: .word 0x02256B90 + thumb_func_end ov29_02256ABC + + thumb_func_start ov29_02256B18 +ov29_02256B18: ; 0x02256B18 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02256B20: + ldr r0, [r6, #0x50] + ldr r1, [r5, #0x68] + bl ov25_022558B0 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blo _02256B20 + add r6, #0x54 + add r0, r6, #0 + bl ov25_022559B0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov29_02256B18 + + .rodata + + + .global Unk_ov29_02256B50 +Unk_ov29_02256B50: ; 0x02256B50 + .incbin "incbin/overlay29_rodata.bin", 0x14, 0x1C - 0x14 + + .global Unk_ov29_02256B58 +Unk_ov29_02256B58: ; 0x02256B58 + .incbin "incbin/overlay29_rodata.bin", 0x1C, 0x38 - 0x1C + + .global Unk_ov29_02256B74 +Unk_ov29_02256B74: ; 0x02256B74 + .incbin "incbin/overlay29_rodata.bin", 0x38, 0x54 - 0x38 + + .global Unk_ov29_02256B90 +Unk_ov29_02256B90: ; 0x02256B90 + .incbin "incbin/overlay29_rodata.bin", 0x54, 0x74 - 0x54 + + .global Unk_ov29_02256BB0 +Unk_ov29_02256BB0: ; 0x02256BB0 + .incbin "incbin/overlay29_rodata.bin", 0x74, 0x54 + diff --git a/asm/ov30_022561C0.s b/asm/ov30_022561C0.s new file mode 100644 index 000000000..0ea299bc1 --- /dev/null +++ b/asm/ov30_022561C0.s @@ -0,0 +1,331 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov30_022561C0 +ov30_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov30_022561D4 + ldr r1, _022561D0 ; =ov30_022562EC + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov30_022561D4 +_022561D0: .word ov30_022562EC + thumb_func_end ov30_022561C0 + + thumb_func_start ov30_022561D4 +ov30_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x2c + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov30_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov30_022562B0 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov30_022562B0 + thumb_func_end ov30_022561D4 + + thumb_func_start ov30_0225621C +ov30_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r1, r5, #0 + add r0, #0x24 + add r1, #0x14 + bl ov30_022563EC + cmp r0, #0 + beq _0225628A + mov r1, #0 + strb r1, [r5] + strb r1, [r5, #1] + strb r1, [r5, #2] + mov r0, #1 + strb r0, [r5, #3] + strb r1, [r5, #6] + add r0, r5, #0 + str r1, [r5, #0x20] + add r0, #0x14 + bl sub_02013880 + ldr r0, [r5, #0x14] + cmp r0, #0x18 + blo _02256256 + mov r1, #0x18 + bl sub_020E2178 + str r1, [r5, #0x14] +_02256256: + ldr r0, [r5, #0x18] + cmp r0, #0x3c + blo _02256266 + ldr r0, [r5, #0x14] + mov r1, #0x3c + bl sub_020E2178 + str r1, [r5, #0x14] +_02256266: + ldr r0, [r5, #0x18] + ldr r2, _02256290 ; =ov30_022562F4 + strb r0, [r5, #5] + mov r0, #8 + str r0, [sp] + ldr r0, _02256294 ; =0x02256678 + mov r1, #1 + add r3, r5, #0 + bl ov25_02255ACC + str r0, [r5, #0x10] + cmp r0, #0 + bne _02256284 + mov r0, #0 + pop {r3, r4, r5, pc} +_02256284: + str r4, [r5, #0x28] + mov r0, #1 + pop {r3, r4, r5, pc} +_0225628A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02256290: .word ov30_022562F4 +_02256294: .word 0x02256678 + thumb_func_end ov30_0225621C + + thumb_func_start ov30_02256298 +ov30_02256298: ; 0x02256298 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + bl ov30_02256444 + ldr r0, [r4, #0x10] + bl ov25_02255B34 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov30_02256298 + + thumb_func_start ov30_022562B0 +ov30_022562B0: ; 0x022562B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _022562E6 + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x10] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _022562E8 ; =0x0225667C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562E6 + add r0, r4, #0 + bl ov30_02256298 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x28] + bl ov25_02254260 +_022562E6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022562E8: .word 0x0225667C + thumb_func_end ov30_022562B0 + + thumb_func_start ov30_022562EC +ov30_022562EC: ; 0x022562EC + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov30_022562EC + + thumb_func_start ov30_022562F4 +ov30_022562F4: ; 0x022562F4 + cmp r2, #0 + beq _02256304 + cmp r2, #1 + bne _0225630C + mov r0, #1 + str r0, [r3, #0x20] + strb r0, [r3, #6] + bx lr +_02256304: + mov r0, #0 + str r0, [r3, #0x20] + mov r0, #1 + strb r0, [r3, #6] +_0225630C: + bx lr + ; .align 2, 0 + thumb_func_end ov30_022562F4 + + thumb_func_start ov30_02256310 +ov30_02256310: ; 0x02256310 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256318 + b _0225631A +_02256318: + mov r1, #2 +_0225631A: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov30_02256310 + + thumb_func_start ov30_02256324 +ov30_02256324: ; 0x02256324 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256334 + cmp r0, #1 + beq _02256344 + b _0225635E +_02256334: + ldr r0, [r4, #0x24] + mov r1, #0 + bl ov30_02256464 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225635E +_02256344: + ldr r0, [r4, #0x24] + mov r1, #0 + bl ov30_02256488 + cmp r0, #0 + beq _0225635E + ldr r0, [r4, #0x28] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov30_02256310 +_0225635E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov30_02256324 + + thumb_func_start ov30_02256364 +ov30_02256364: ; 0x02256364 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256378 + mov r1, #2 + bl ov30_02256310 + mov r0, #0 + pop {r4, pc} +_02256378: + ldrb r0, [r4, #6] + cmp r0, #0 + beq _0225638A + mov r0, #0 + strb r0, [r4, #6] + ldr r0, [r4, #0x24] + mov r1, #2 + bl ov30_02256464 +_0225638A: + ldr r0, [r4, #0x24] + mov r1, #1 + bl ov30_02256488 + cmp r0, #0 + beq _022563B2 + ldr r0, [r4, #0x18] + strb r0, [r4, #5] + add r0, r4, #0 + add r0, #0x14 + bl sub_02013880 + ldrb r1, [r4, #5] + ldr r0, [r4, #0x18] + cmp r1, r0 + beq _022563B2 + ldr r0, [r4, #0x24] + mov r1, #1 + bl ov30_02256464 +_022563B2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov30_02256364 + + thumb_func_start ov30_022563B8 +ov30_022563B8: ; 0x022563B8 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563C8 + cmp r0, #1 + beq _022563D8 + b _022563E6 +_022563C8: + ldr r0, [r4, #0x24] + mov r1, #3 + bl ov30_02256464 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563E6 +_022563D8: + ldr r0, [r4, #0x24] + bl ov30_02256494 + cmp r0, #0 + beq _022563E6 + mov r0, #1 + pop {r4, pc} +_022563E6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov30_022563B8 + + .rodata + + + .global Unk_ov30_02256678 +Unk_ov30_02256678: ; 0x02256678 + .incbin "incbin/overlay30_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov30_0225667C +Unk_ov30_0225667C: ; 0x0225667C + .incbin "incbin/overlay30_rodata.bin", 0x4, 0xC + + .section .sinit, 4 + .word ov30_022561C0 diff --git a/asm/overlay30.s b/asm/ov30_022563EC.s similarity index 53% rename from asm/overlay30.s rename to asm/ov30_022563EC.s index f816e0cc4..b6cd8308b 100644 --- a/asm/overlay30.s +++ b/asm/ov30_022563EC.s @@ -1,317 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov30_022561C0 -ov30_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov30_022561D4 - ldr r1, _022561D0 ; =ov30_022562EC - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov30_022561D4 -_022561D0: .word ov30_022562EC - thumb_func_end ov30_022561C0 - - thumb_func_start ov30_022561D4 -ov30_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x2c - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov30_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov30_022562B0 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov30_022562B0 - thumb_func_end ov30_022561D4 - - thumb_func_start ov30_0225621C -ov30_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r1, r5, #0 - add r0, #0x24 - add r1, #0x14 - bl ov30_022563EC - cmp r0, #0 - beq _0225628A - mov r1, #0 - strb r1, [r5] - strb r1, [r5, #1] - strb r1, [r5, #2] - mov r0, #1 - strb r0, [r5, #3] - strb r1, [r5, #6] - add r0, r5, #0 - str r1, [r5, #0x20] - add r0, #0x14 - bl sub_02013880 - ldr r0, [r5, #0x14] - cmp r0, #0x18 - blo _02256256 - mov r1, #0x18 - bl sub_020E2178 - str r1, [r5, #0x14] -_02256256: - ldr r0, [r5, #0x18] - cmp r0, #0x3c - blo _02256266 - ldr r0, [r5, #0x14] - mov r1, #0x3c - bl sub_020E2178 - str r1, [r5, #0x14] -_02256266: - ldr r0, [r5, #0x18] - ldr r2, _02256290 ; =ov30_022562F4 - strb r0, [r5, #5] - mov r0, #8 - str r0, [sp] - ldr r0, _02256294 ; =0x02256678 - mov r1, #1 - add r3, r5, #0 - bl ov25_02255ACC - str r0, [r5, #0x10] - cmp r0, #0 - bne _02256284 - mov r0, #0 - pop {r3, r4, r5, pc} -_02256284: - str r4, [r5, #0x28] - mov r0, #1 - pop {r3, r4, r5, pc} -_0225628A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02256290: .word ov30_022562F4 -_02256294: .word 0x02256678 - thumb_func_end ov30_0225621C - - thumb_func_start ov30_02256298 -ov30_02256298: ; 0x02256298 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - bl ov30_02256444 - ldr r0, [r4, #0x10] - bl ov25_02255B34 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov30_02256298 - - thumb_func_start ov30_022562B0 -ov30_022562B0: ; 0x022562B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _022562E6 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x10] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _022562E8 ; =0x0225667C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562E6 - add r0, r4, #0 - bl ov30_02256298 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x28] - bl ov25_02254260 -_022562E6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022562E8: .word 0x0225667C - thumb_func_end ov30_022562B0 - - thumb_func_start ov30_022562EC -ov30_022562EC: ; 0x022562EC - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov30_022562EC - - thumb_func_start ov30_022562F4 -ov30_022562F4: ; 0x022562F4 - cmp r2, #0 - beq _02256304 - cmp r2, #1 - bne _0225630C - mov r0, #1 - str r0, [r3, #0x20] - strb r0, [r3, #6] - bx lr -_02256304: - mov r0, #0 - str r0, [r3, #0x20] - mov r0, #1 - strb r0, [r3, #6] -_0225630C: - bx lr - ; .align 2, 0 - thumb_func_end ov30_022562F4 - - thumb_func_start ov30_02256310 -ov30_02256310: ; 0x02256310 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256318 - b _0225631A -_02256318: - mov r1, #2 -_0225631A: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov30_02256310 - - thumb_func_start ov30_02256324 -ov30_02256324: ; 0x02256324 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256334 - cmp r0, #1 - beq _02256344 - b _0225635E -_02256334: - ldr r0, [r4, #0x24] - mov r1, #0 - bl ov30_02256464 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225635E -_02256344: - ldr r0, [r4, #0x24] - mov r1, #0 - bl ov30_02256488 - cmp r0, #0 - beq _0225635E - ldr r0, [r4, #0x28] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov30_02256310 -_0225635E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov30_02256324 - - thumb_func_start ov30_02256364 -ov30_02256364: ; 0x02256364 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256378 - mov r1, #2 - bl ov30_02256310 - mov r0, #0 - pop {r4, pc} -_02256378: - ldrb r0, [r4, #6] - cmp r0, #0 - beq _0225638A - mov r0, #0 - strb r0, [r4, #6] - ldr r0, [r4, #0x24] - mov r1, #2 - bl ov30_02256464 -_0225638A: - ldr r0, [r4, #0x24] - mov r1, #1 - bl ov30_02256488 - cmp r0, #0 - beq _022563B2 - ldr r0, [r4, #0x18] - strb r0, [r4, #5] - add r0, r4, #0 - add r0, #0x14 - bl sub_02013880 - ldrb r1, [r4, #5] - ldr r0, [r4, #0x18] - cmp r1, r0 - beq _022563B2 - ldr r0, [r4, #0x24] - mov r1, #1 - bl ov30_02256464 -_022563B2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov30_02256364 - - thumb_func_start ov30_022563B8 -ov30_022563B8: ; 0x022563B8 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563C8 - cmp r0, #1 - beq _022563D8 - b _022563E6 -_022563C8: - ldr r0, [r4, #0x24] - mov r1, #3 - bl ov30_02256464 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563E6 -_022563D8: - ldr r0, [r4, #0x24] - bl ov30_02256494 - cmp r0, #0 - beq _022563E6 - mov r0, #1 - pop {r4, pc} -_022563E6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov30_022563B8 thumb_func_start ov30_022563EC ov30_022563EC: ; 0x022563EC @@ -657,14 +350,19 @@ _02256666: blt _02256666 pop {r4, r5, r6, pc} thumb_func_end ov30_02256658 - ; 0x02256678 - .rodata - .incbin "incbin/overlay30_rodata.bin" - .section .sinit, 4 - .word ov30_022561C0 - .bss - .space 0x0 + .global Unk_ov30_02256688 +Unk_ov30_02256688: ; 0x02256688 + .incbin "incbin/overlay30_rodata.bin", 0x10, 0x2C - 0x10 + + .global Unk_ov30_022566A4 +Unk_ov30_022566A4: ; 0x022566A4 + .incbin "incbin/overlay30_rodata.bin", 0x2C, 0x4C - 0x2C + + .global Unk_ov30_022566C4 +Unk_ov30_022566C4: ; 0x022566C4 + .incbin "incbin/overlay30_rodata.bin", 0x4C, 0x3C + diff --git a/asm/overlay31.s b/asm/ov31_022561C0.s similarity index 62% rename from asm/overlay31.s rename to asm/ov31_022561C0.s index 258f736dd..3333e50ef 100644 --- a/asm/overlay31.s +++ b/asm/ov31_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov31_022561C0 ov31_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -505,296 +508,16 @@ _0225654E: ; .align 2, 0 thumb_func_end ov31_02256518 - thumb_func_start ov31_02256554 -ov31_02256554: ; 0x02256554 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - beq _02256580 - add r0, #8 - mov r1, #8 - bl ov25_02255090 - str r6, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - cmp r0, #0 - beq _02256580 - str r4, [r5, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256580: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov31_02256554 - - thumb_func_start ov31_02256584 -ov31_02256584: ; 0x02256584 - push {r3, lr} - cmp r0, #0 - beq _0225658E - bl sub_020181C4 -_0225658E: - pop {r3, pc} - thumb_func_end ov31_02256584 - - thumb_func_start ov31_02256590 -ov31_02256590: ; 0x02256590 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _022565B0 ; =0x02256970 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022565B0: .word 0x02256970 - thumb_func_end ov31_02256590 - - thumb_func_start ov31_022565B4 -ov31_022565B4: ; 0x022565B4 - ldr r3, _022565BC ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022565BC: .word ov25_02255130 - thumb_func_end ov31_022565B4 - - thumb_func_start ov31_022565C0 -ov31_022565C0: ; 0x022565C0 - ldr r3, _022565C8 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022565C8: .word ov25_02255154 - thumb_func_end ov31_022565C0 - - thumb_func_start ov31_022565CC -ov31_022565CC: ; 0x022565CC - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov31_022565CC - - thumb_func_start ov31_022565E0 -ov31_022565E0: ; 0x022565E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _02256638 ; =0x02256954 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #4] - bl ov31_02256644 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl ov31_0225672C - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _0225663C ; =0x04001000 - ldr r0, _02256640 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov31_022565CC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256638: .word 0x02256954 -_0225663C: .word 0x04001000 -_02256640: .word 0xFFFFE0FF - thumb_func_end ov31_022565E0 - - thumb_func_start ov31_02256644 -ov31_02256644: ; 0x02256644 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #4] - mov r0, #8 - lsl r1, r0, #6 - bl sub_02018144 - str r0, [sp, #0x1c] - cmp r0, #0 - beq _022566E8 - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x14] - str r0, [sp, #0x10] - str r0, [sp, #0xc] - str r0, [sp, #8] - add r7, r0, #0 - add r6, r0, #0 - add r4, r0, #0 - add r5, r0, #0 -_0225666C: - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x1c] - orr r1, r0 - ldr r0, [sp, #8] - orr r0, r1 - orr r0, r7 - orr r0, r6 - orr r0, r4 - add r1, r5, #0 - orr r1, r0 - ldr r0, [sp, #0x18] - orr r0, r1 - ldr r1, [sp, #0x14] - add r1, r2, r1 - mov r2, #0x20 - bl sub_020C4BB8 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x10] - add r0, #0x20 - str r0, [sp, #0x14] - mov r0, #1 - lsl r0, r0, #0x18 - add r0, r1, r0 - str r0, [sp, #0x10] - mov r0, #1 - ldr r1, [sp, #0xc] - lsl r0, r0, #0x1c - add r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #1 - ldr r1, [sp, #8] - lsl r0, r0, #0x14 - add r0, r1, r0 - str r0, [sp, #8] - mov r0, #1 - lsl r0, r0, #0x10 - add r7, r7, r0 - lsr r0, r0, #4 - add r6, r6, r0 - mov r0, #1 - lsl r0, r0, #8 - add r4, r4, r0 - ldr r0, [sp, #0x18] - add r5, #0x10 - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #0x10 - blt _0225666C - mov r0, #0 - str r0, [sp] - mov r3, #2 - ldr r0, [sp, #4] - ldr r2, [sp, #0x1c] - mov r1, #6 - lsl r3, r3, #8 - bl sub_0201958C - ldr r0, [sp, #0x1c] - bl sub_020181C4 -_022566E8: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov31_02256644 - - thumb_func_start ov31_022566EC -ov31_022566EC: ; 0x022566EC - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r1, [r4, #0] - bl ov31_0225672C - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r5, #0 - bl ov31_022565CC - pop {r3, r4, r5, pc} - thumb_func_end ov31_022566EC - - thumb_func_start ov31_02256710 -ov31_02256710: ; 0x02256710 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov31_022565CC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov31_02256710 - - thumb_func_start ov31_0225672C -ov31_0225672C: ; 0x0225672C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #6 - bl sub_02019FE4 - mov r5, #0 - ldr r1, _02256760 ; =0x02256950 - add r0, #0x84 - add r2, r5, #0 -_0225673E: - add r3, r2, #0 - add r6, r0, #0 -_02256742: - ldrb r7, [r4, r3] - add r3, r3, #1 - add r7, r1, r7 - sub r7, r7, #1 - ldrb r7, [r7] - strh r7, [r6] - add r6, r6, #2 - cmp r3, #0x18 - blt _02256742 - add r5, r5, #1 - add r0, #0x40 - add r4, #0x18 - cmp r5, #0x14 - blt _0225673E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02256760: .word 0x02256950 - thumb_func_end ov31_0225672C - ; 0x02256764 - - .rodata - .incbin "incbin/overlay31_rodata.bin" + + + .global Unk_ov31_02256764 +Unk_ov31_02256764: ; 0x02256764 + .incbin "incbin/overlay31_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov31_02256770 +Unk_ov31_02256770: ; 0x02256770 + .incbin "incbin/overlay31_rodata.bin", 0xC, 0x1E0 .section .sinit, 4 .word ov31_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov31_02256554.s b/asm/ov31_02256554.s new file mode 100644 index 000000000..0a04c51a1 --- /dev/null +++ b/asm/ov31_02256554.s @@ -0,0 +1,306 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov31_02256554 +ov31_02256554: ; 0x02256554 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + beq _02256580 + add r0, #8 + mov r1, #8 + bl ov25_02255090 + str r6, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + cmp r0, #0 + beq _02256580 + str r4, [r5, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256580: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov31_02256554 + + thumb_func_start ov31_02256584 +ov31_02256584: ; 0x02256584 + push {r3, lr} + cmp r0, #0 + beq _0225658E + bl sub_020181C4 +_0225658E: + pop {r3, pc} + thumb_func_end ov31_02256584 + + thumb_func_start ov31_02256590 +ov31_02256590: ; 0x02256590 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _022565B0 ; =0x02256970 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022565B0: .word 0x02256970 + thumb_func_end ov31_02256590 + + thumb_func_start ov31_022565B4 +ov31_022565B4: ; 0x022565B4 + ldr r3, _022565BC ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022565BC: .word ov25_02255130 + thumb_func_end ov31_022565B4 + + thumb_func_start ov31_022565C0 +ov31_022565C0: ; 0x022565C0 + ldr r3, _022565C8 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022565C8: .word ov25_02255154 + thumb_func_end ov31_022565C0 + + thumb_func_start ov31_022565CC +ov31_022565CC: ; 0x022565CC + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov31_022565CC + + thumb_func_start ov31_022565E0 +ov31_022565E0: ; 0x022565E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _02256638 ; =0x02256954 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #4] + bl ov31_02256644 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl ov31_0225672C + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _0225663C ; =0x04001000 + ldr r0, _02256640 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov31_022565CC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256638: .word 0x02256954 +_0225663C: .word 0x04001000 +_02256640: .word 0xFFFFE0FF + thumb_func_end ov31_022565E0 + + thumb_func_start ov31_02256644 +ov31_02256644: ; 0x02256644 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #4] + mov r0, #8 + lsl r1, r0, #6 + bl sub_02018144 + str r0, [sp, #0x1c] + cmp r0, #0 + beq _022566E8 + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x14] + str r0, [sp, #0x10] + str r0, [sp, #0xc] + str r0, [sp, #8] + add r7, r0, #0 + add r6, r0, #0 + add r4, r0, #0 + add r5, r0, #0 +_0225666C: + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x1c] + orr r1, r0 + ldr r0, [sp, #8] + orr r0, r1 + orr r0, r7 + orr r0, r6 + orr r0, r4 + add r1, r5, #0 + orr r1, r0 + ldr r0, [sp, #0x18] + orr r0, r1 + ldr r1, [sp, #0x14] + add r1, r2, r1 + mov r2, #0x20 + bl sub_020C4BB8 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x10] + add r0, #0x20 + str r0, [sp, #0x14] + mov r0, #1 + lsl r0, r0, #0x18 + add r0, r1, r0 + str r0, [sp, #0x10] + mov r0, #1 + ldr r1, [sp, #0xc] + lsl r0, r0, #0x1c + add r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #1 + ldr r1, [sp, #8] + lsl r0, r0, #0x14 + add r0, r1, r0 + str r0, [sp, #8] + mov r0, #1 + lsl r0, r0, #0x10 + add r7, r7, r0 + lsr r0, r0, #4 + add r6, r6, r0 + mov r0, #1 + lsl r0, r0, #8 + add r4, r4, r0 + ldr r0, [sp, #0x18] + add r5, #0x10 + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #0x10 + blt _0225666C + mov r0, #0 + str r0, [sp] + mov r3, #2 + ldr r0, [sp, #4] + ldr r2, [sp, #0x1c] + mov r1, #6 + lsl r3, r3, #8 + bl sub_0201958C + ldr r0, [sp, #0x1c] + bl sub_020181C4 +_022566E8: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov31_02256644 + + thumb_func_start ov31_022566EC +ov31_022566EC: ; 0x022566EC + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r1, [r4, #0] + bl ov31_0225672C + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r5, #0 + bl ov31_022565CC + pop {r3, r4, r5, pc} + thumb_func_end ov31_022566EC + + thumb_func_start ov31_02256710 +ov31_02256710: ; 0x02256710 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov31_022565CC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov31_02256710 + + thumb_func_start ov31_0225672C +ov31_0225672C: ; 0x0225672C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #6 + bl sub_02019FE4 + mov r5, #0 + ldr r1, _02256760 ; =0x02256950 + add r0, #0x84 + add r2, r5, #0 +_0225673E: + add r3, r2, #0 + add r6, r0, #0 +_02256742: + ldrb r7, [r4, r3] + add r3, r3, #1 + add r7, r1, r7 + sub r7, r7, #1 + ldrb r7, [r7] + strh r7, [r6] + add r6, r6, #2 + cmp r3, #0x18 + blt _02256742 + add r5, r5, #1 + add r0, #0x40 + add r4, #0x18 + cmp r5, #0x14 + blt _0225673E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02256760: .word 0x02256950 + thumb_func_end ov31_0225672C + + .rodata + + + .global Unk_ov31_02256950 +Unk_ov31_02256950: ; 0x02256950 + .incbin "incbin/overlay31_rodata.bin", 0x1EC, 0x1F0 - 0x1EC + + .global Unk_ov31_02256954 +Unk_ov31_02256954: ; 0x02256954 + .incbin "incbin/overlay31_rodata.bin", 0x1F0, 0x20C - 0x1F0 + + .global Unk_ov31_02256970 +Unk_ov31_02256970: ; 0x02256970 + .incbin "incbin/overlay31_rodata.bin", 0x20C, 0x30 + diff --git a/asm/ov32_022561C0.s b/asm/ov32_022561C0.s new file mode 100644 index 000000000..946aed6a8 --- /dev/null +++ b/asm/ov32_022561C0.s @@ -0,0 +1,380 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov32_022561C0 +ov32_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov32_022561D4 + ldr r1, _022561D0 ; =ov32_022562AC + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov32_022561D4 +_022561D0: .word ov32_022562AC + thumb_func_end ov32_022561C0 + + thumb_func_start ov32_022561D4 +ov32_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x7c + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov32_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov32_02256278 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov32_02256278 + thumb_func_end ov32_022561D4 + + thumb_func_start ov32_0225621C +ov32_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x74 + add r1, r5, #4 + bl ov32_02256470 + cmp r0, #0 + beq _02256260 + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + add r0, r4, #0 + bl ov25_02254544 + bl sub_0207A268 + add r1, r0, #0 + add r0, r5, #4 + bl ov32_022563C8 + add r0, r5, #0 + mov r1, #0 + add r0, #0x68 + strh r1, [r0] + add r0, r5, #0 + add r0, #0x6a + strh r1, [r0] + str r1, [r5, #0x6c] + str r1, [r5, #0x70] + str r4, [r5, #0x78] + mov r0, #1 + pop {r3, r4, r5, pc} +_02256260: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov32_0225621C + + thumb_func_start ov32_02256264 +ov32_02256264: ; 0x02256264 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x74] + bl ov32_02256508 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov32_02256264 + + thumb_func_start ov32_02256278 +ov32_02256278: ; 0x02256278 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #3 + bhs _022562A4 + lsl r2, r1, #2 + ldr r1, _022562A8 ; =0x02256CC0 + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562A4 + add r0, r4, #0 + bl ov32_02256264 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x78] + bl ov25_02254260 +_022562A4: + pop {r3, r4, r5, pc} + nop +_022562A8: .word 0x02256CC0 + thumb_func_end ov32_02256278 + + thumb_func_start ov32_022562AC +ov32_022562AC: ; 0x022562AC + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov32_022562AC + + thumb_func_start ov32_022562B4 +ov32_022562B4: ; 0x022562B4 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562BC + b _022562BE +_022562BC: + mov r1, #2 +_022562BE: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov32_022562B4 + + thumb_func_start ov32_022562C8 +ov32_022562C8: ; 0x022562C8 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022562D8 + cmp r0, #1 + beq _022562E8 + b _02256302 +_022562D8: + ldr r0, [r4, #0x74] + mov r1, #0 + bl ov32_02256538 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256302 +_022562E8: + ldr r0, [r4, #0x74] + mov r1, #0 + bl ov32_0225655C + cmp r0, #0 + beq _02256302 + ldr r0, [r4, #0x78] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov32_022562B4 +_02256302: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov32_022562C8 + + thumb_func_start ov32_02256308 +ov32_02256308: ; 0x02256308 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _0225631C + mov r1, #2 + bl ov32_022562B4 + mov r0, #0 + pop {r4, pc} +_0225631C: + ldr r0, [r4, #0x74] + mov r1, #2 + bl ov32_0225655C + cmp r0, #0 + beq _02256386 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x6c + add r1, #0x70 + bl ov25_0225446C + add r1, r4, #0 + add r1, #0x68 + strh r0, [r1] + add r0, r4, #0 + add r0, #0x68 + ldrh r0, [r0] + cmp r0, #0 + beq _02256386 + bl sub_02022798 + add r1, r4, #0 + add r1, #0x6a + strh r0, [r1] + add r0, r4, #0 + add r0, #0x6a + ldrh r0, [r0] + cmp r0, #0 + beq _02256382 + ldr r0, [r4, #0x6c] + ldr r1, [r4, #0x70] + ldr r2, [r4, #4] + bl ov32_02256B78 + ldr r1, [r4, #4] + cmp r0, r1 + blo _02256382 + ldr r0, [r4, #0x78] + bl ov25_02254544 + bl sub_0207A268 + add r1, r0, #0 + add r0, r4, #4 + bl ov32_022563C8 + ldr r0, [r4, #0x74] + mov r1, #2 + bl ov32_02256538 +_02256382: + mov r0, #0 + pop {r4, pc} +_02256386: + mov r0, #0 + str r0, [r4, #0x6c] + str r0, [r4, #0x70] + add r4, #0x6a + strh r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov32_02256308 + + thumb_func_start ov32_02256394 +ov32_02256394: ; 0x02256394 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563A4 + cmp r0, #1 + beq _022563B4 + b _022563C2 +_022563A4: + ldr r0, [r4, #0x74] + mov r1, #1 + bl ov32_02256538 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563C2 +_022563B4: + ldr r0, [r4, #0x74] + bl ov32_02256568 + cmp r0, #0 + beq _022563C2 + mov r0, #1 + pop {r4, pc} +_022563C2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov32_02256394 + + thumb_func_start ov32_022563C8 +ov32_022563C8: ; 0x022563C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + add r0, r1, #0 + str r1, [sp, #4] + bl sub_0207A0F8 + ldr r1, [sp] + mov r6, #0 + str r0, [r1, #0] + cmp r0, #0 + ble _0225646C + add r5, r1, #0 +_022563E2: + ldr r0, [sp, #4] + add r1, r6, #0 + bl sub_0207A0FC + add r4, r0, #0 + bl sub_02073C88 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02079D40 + str r0, [r5, #4] + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + strh r0, [r5, #8] + add r0, r4, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + strh r0, [r5, #0xa] + add r0, r4, #0 + mov r1, #0xa4 + mov r2, #0 + bl sub_02074470 + strh r0, [r5, #0xc] + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + strh r0, [r5, #0xe] + add r0, r4, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + beq _0225643C + mov r0, #1 + b _0225643E +_0225643C: + mov r0, #0 +_0225643E: + strh r0, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + strb r0, [r5, #0x12] + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + strb r0, [r5, #0x13] + add r0, r4, #0 + add r1, r7, #0 + bl sub_02073CD4 + ldr r0, [sp] + add r6, r6, #1 + ldr r0, [r0, #0] + add r5, #0x10 + cmp r6, r0 + blt _022563E2 +_0225646C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov32_022563C8 + + .rodata + + + .global Unk_ov32_02256CC0 +Unk_ov32_02256CC0: ; 0x02256CC0 + .incbin "incbin/overlay32_rodata.bin", 0x0, 0xC + + .section .sinit, 4 + .word ov32_022561C0 diff --git a/asm/overlay32.s b/asm/ov32_02256470.s similarity index 75% rename from asm/overlay32.s rename to asm/ov32_02256470.s index b16a4465f..0ed707136 100644 --- a/asm/overlay32.s +++ b/asm/ov32_02256470.s @@ -1,370 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov32_022561C0 -ov32_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov32_022561D4 - ldr r1, _022561D0 ; =ov32_022562AC - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov32_022561D4 -_022561D0: .word ov32_022562AC - thumb_func_end ov32_022561C0 - - thumb_func_start ov32_022561D4 -ov32_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x7c - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov32_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov32_02256278 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov32_02256278 - thumb_func_end ov32_022561D4 - - thumb_func_start ov32_0225621C -ov32_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x74 - add r1, r5, #4 - bl ov32_02256470 - cmp r0, #0 - beq _02256260 - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - add r0, r4, #0 - bl ov25_02254544 - bl sub_0207A268 - add r1, r0, #0 - add r0, r5, #4 - bl ov32_022563C8 - add r0, r5, #0 - mov r1, #0 - add r0, #0x68 - strh r1, [r0] - add r0, r5, #0 - add r0, #0x6a - strh r1, [r0] - str r1, [r5, #0x6c] - str r1, [r5, #0x70] - str r4, [r5, #0x78] - mov r0, #1 - pop {r3, r4, r5, pc} -_02256260: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov32_0225621C - - thumb_func_start ov32_02256264 -ov32_02256264: ; 0x02256264 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x74] - bl ov32_02256508 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov32_02256264 - - thumb_func_start ov32_02256278 -ov32_02256278: ; 0x02256278 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #3 - bhs _022562A4 - lsl r2, r1, #2 - ldr r1, _022562A8 ; =0x02256CC0 - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562A4 - add r0, r4, #0 - bl ov32_02256264 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x78] - bl ov25_02254260 -_022562A4: - pop {r3, r4, r5, pc} - nop -_022562A8: .word 0x02256CC0 - thumb_func_end ov32_02256278 - - thumb_func_start ov32_022562AC -ov32_022562AC: ; 0x022562AC - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov32_022562AC - - thumb_func_start ov32_022562B4 -ov32_022562B4: ; 0x022562B4 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562BC - b _022562BE -_022562BC: - mov r1, #2 -_022562BE: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov32_022562B4 - - thumb_func_start ov32_022562C8 -ov32_022562C8: ; 0x022562C8 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022562D8 - cmp r0, #1 - beq _022562E8 - b _02256302 -_022562D8: - ldr r0, [r4, #0x74] - mov r1, #0 - bl ov32_02256538 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256302 -_022562E8: - ldr r0, [r4, #0x74] - mov r1, #0 - bl ov32_0225655C - cmp r0, #0 - beq _02256302 - ldr r0, [r4, #0x78] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov32_022562B4 -_02256302: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov32_022562C8 - - thumb_func_start ov32_02256308 -ov32_02256308: ; 0x02256308 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _0225631C - mov r1, #2 - bl ov32_022562B4 - mov r0, #0 - pop {r4, pc} -_0225631C: - ldr r0, [r4, #0x74] - mov r1, #2 - bl ov32_0225655C - cmp r0, #0 - beq _02256386 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x6c - add r1, #0x70 - bl ov25_0225446C - add r1, r4, #0 - add r1, #0x68 - strh r0, [r1] - add r0, r4, #0 - add r0, #0x68 - ldrh r0, [r0] - cmp r0, #0 - beq _02256386 - bl sub_02022798 - add r1, r4, #0 - add r1, #0x6a - strh r0, [r1] - add r0, r4, #0 - add r0, #0x6a - ldrh r0, [r0] - cmp r0, #0 - beq _02256382 - ldr r0, [r4, #0x6c] - ldr r1, [r4, #0x70] - ldr r2, [r4, #4] - bl ov32_02256B78 - ldr r1, [r4, #4] - cmp r0, r1 - blo _02256382 - ldr r0, [r4, #0x78] - bl ov25_02254544 - bl sub_0207A268 - add r1, r0, #0 - add r0, r4, #4 - bl ov32_022563C8 - ldr r0, [r4, #0x74] - mov r1, #2 - bl ov32_02256538 -_02256382: - mov r0, #0 - pop {r4, pc} -_02256386: - mov r0, #0 - str r0, [r4, #0x6c] - str r0, [r4, #0x70] - add r4, #0x6a - strh r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov32_02256308 - - thumb_func_start ov32_02256394 -ov32_02256394: ; 0x02256394 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563A4 - cmp r0, #1 - beq _022563B4 - b _022563C2 -_022563A4: - ldr r0, [r4, #0x74] - mov r1, #1 - bl ov32_02256538 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563C2 -_022563B4: - ldr r0, [r4, #0x74] - bl ov32_02256568 - cmp r0, #0 - beq _022563C2 - mov r0, #1 - pop {r4, pc} -_022563C2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov32_02256394 - - thumb_func_start ov32_022563C8 -ov32_022563C8: ; 0x022563C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - add r0, r1, #0 - str r1, [sp, #4] - bl sub_0207A0F8 - ldr r1, [sp] - mov r6, #0 - str r0, [r1, #0] - cmp r0, #0 - ble _0225646C - add r5, r1, #0 -_022563E2: - ldr r0, [sp, #4] - add r1, r6, #0 - bl sub_0207A0FC - add r4, r0, #0 - bl sub_02073C88 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02079D40 - str r0, [r5, #4] - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - strh r0, [r5, #8] - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - strh r0, [r5, #0xa] - add r0, r4, #0 - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - strh r0, [r5, #0xc] - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - strh r0, [r5, #0xe] - add r0, r4, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0225643C - mov r0, #1 - b _0225643E -_0225643C: - mov r0, #0 -_0225643E: - strh r0, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - strb r0, [r5, #0x12] - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - strb r0, [r5, #0x13] - add r0, r4, #0 - add r1, r7, #0 - bl sub_02073CD4 - ldr r0, [sp] - add r6, r6, #1 - ldr r0, [r0, #0] - add r5, #0x10 - cmp r6, r0 - blt _022563E2 -_0225646C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov32_022563C8 thumb_func_start ov32_02256470 ov32_02256470: ; 0x02256470 @@ -1448,14 +1088,23 @@ ov32_02256C54: ; 0x02256C54 nop _02256CBC: .word 0x00000669 thumb_func_end ov32_02256C54 - ; 0x02256CC0 - .rodata - .incbin "incbin/overlay32_rodata.bin" - .section .sinit, 4 - .word ov32_022561C0 - .bss - .space 0x0 + .global Unk_ov32_02256CCC +Unk_ov32_02256CCC: ; 0x02256CCC + .incbin "incbin/overlay32_rodata.bin", 0xC, 0x24 - 0xC + + .global Unk_ov32_02256CE4 +Unk_ov32_02256CE4: ; 0x02256CE4 + .incbin "incbin/overlay32_rodata.bin", 0x24, 0x3C - 0x24 + + .global Unk_ov32_02256CFC +Unk_ov32_02256CFC: ; 0x02256CFC + .incbin "incbin/overlay32_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov32_02256D18 +Unk_ov32_02256D18: ; 0x02256D18 + .incbin "incbin/overlay32_rodata.bin", 0x58, 0x30 + diff --git a/asm/ov33_022561C0.s b/asm/ov33_022561C0.s new file mode 100644 index 000000000..d33158e54 --- /dev/null +++ b/asm/ov33_022561C0.s @@ -0,0 +1,406 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov33_022561C0 +ov33_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov33_022561D4 + ldr r1, _022561D0 ; =ov33_02256374 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov33_022561D4 +_022561D0: .word ov33_02256374 + thumb_func_end ov33_022561C0 + + thumb_func_start ov33_022561D4 +ov33_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x64 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov33_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov33_02256340 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov33_02256340 + thumb_func_end ov33_022561D4 + + thumb_func_start ov33_0225621C +ov33_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + add r4, r1, #0 + add r0, #0x5c + add r1, r7, #4 + bl ov33_02256474 + cmp r0, #0 + beq _02256306 + mov r0, #0 + strb r0, [r7] + strb r0, [r7, #1] + strb r0, [r7, #2] + str r4, [r7, #0x60] + bl sub_020245A4 + bl sub_0207A268 + mov r1, #0 + str r0, [sp, #4] + str r1, [sp] + bl sub_0207A0F8 + mov r6, #0 + str r0, [r7, #4] + cmp r0, #0 + ble _022562EA + add r4, r7, #0 +_02256256: + ldr r0, [sp, #4] + add r1, r6, #0 + bl sub_0207A0FC + mov r1, #0x4c + mov r2, #0 + add r5, r0, #0 + bl sub_02074470 + cmp r0, #0 + bne _022562E2 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + strh r0, [r4, #0x10] + add r0, r5, #0 + bl sub_02079D40 + str r0, [r4, #8] + add r0, r5, #0 + mov r1, #9 + mov r2, #0 + bl sub_02074470 + bl ov33_0225630C + cmp r0, #6 + bhi _022562C4 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022562AA: ; jump table + .short _022562B8 - _022562AA - 2 ; case 0 + .short _022562B8 - _022562AA - 2 ; case 1 + .short _022562B8 - _022562AA - 2 ; case 2 + .short _022562C4 - _022562AA - 2 ; case 3 + .short _022562CE - _022562AA - 2 ; case 4 + .short _022562CE - _022562AA - 2 ; case 5 + .short _022562CE - _022562AA - 2 ; case 6 +_022562B8: + mov r1, #1 + strb r1, [r4, #0x12] + mov r1, #3 + sub r0, r1, r0 + strb r0, [r4, #0x13] + b _022562DA +_022562C4: + mov r0, #2 + strb r0, [r4, #0x12] + mov r0, #0 + strb r0, [r4, #0x13] + b _022562DA +_022562CE: + mov r1, #0 + strb r1, [r4, #0x12] + mov r1, #3 + sub r0, r1, r0 + neg r0, r0 + strb r0, [r4, #0x13] +_022562DA: + ldr r0, [sp] + add r4, #0xc + add r0, r0, #1 + str r0, [sp] +_022562E2: + ldr r0, [r7, #4] + add r6, r6, #1 + cmp r6, r0 + blt _02256256 +_022562EA: + ldr r0, [sp] + mov r1, #0 + str r0, [r7, #4] + add r0, r7, #0 + add r0, #0x50 + strh r1, [r0] + add r0, r7, #0 + add r0, #0x52 + strh r1, [r0] + str r1, [r7, #0x54] + add sp, #8 + str r1, [r7, #0x58] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02256306: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov33_0225621C + + thumb_func_start ov33_0225630C +ov33_0225630C: ; 0x0225630C + ldr r3, _02256328 ; =0x022577FC + mov r2, #0 +_02256310: + ldrb r1, [r3] + cmp r0, r1 + bhs _0225631A + add r0, r2, #0 + bx lr +_0225631A: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #6 + blo _02256310 + mov r0, #6 + bx lr + nop +_02256328: .word 0x022577FC + thumb_func_end ov33_0225630C + + thumb_func_start ov33_0225632C +ov33_0225632C: ; 0x0225632C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x5c] + bl ov33_022564F0 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov33_0225632C + + thumb_func_start ov33_02256340 +ov33_02256340: ; 0x02256340 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #3 + bhs _0225636C + lsl r2, r1, #2 + ldr r1, _02256370 ; =0x02257804 + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _0225636C + add r0, r4, #0 + bl ov33_0225632C + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x60] + bl ov25_02254260 +_0225636C: + pop {r3, r4, r5, pc} + nop +_02256370: .word 0x02257804 + thumb_func_end ov33_02256340 + + thumb_func_start ov33_02256374 +ov33_02256374: ; 0x02256374 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov33_02256374 + + thumb_func_start ov33_0225637C +ov33_0225637C: ; 0x0225637C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256384 + b _02256386 +_02256384: + mov r1, #2 +_02256386: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov33_0225637C + + thumb_func_start ov33_02256390 +ov33_02256390: ; 0x02256390 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563A0 + cmp r0, #1 + beq _022563B0 + b _022563CA +_022563A0: + ldr r0, [r4, #0x5c] + mov r1, #0 + bl ov33_02256548 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563CA +_022563B0: + ldr r0, [r4, #0x5c] + mov r1, #0 + bl ov33_0225656C + cmp r0, #0 + beq _022563CA + ldr r0, [r4, #0x60] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov33_0225637C +_022563CA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov33_02256390 + + thumb_func_start ov33_022563D0 +ov33_022563D0: ; 0x022563D0 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022563E4 + mov r1, #2 + bl ov33_0225637C + mov r0, #0 + pop {r4, pc} +_022563E4: + add r1, r4, #0 + add r0, #0x54 + add r1, #0x58 + bl ov25_0225446C + add r1, r4, #0 + add r1, #0x50 + strh r0, [r1] + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + cmp r0, #0 + beq _02256432 + ldr r0, [r4, #0x54] + sub r0, #0x10 + cmp r0, #0xbf + bhs _0225640A + mov r1, #1 + b _0225640C +_0225640A: + mov r1, #0 +_0225640C: + ldr r0, [r4, #0x58] + sub r0, #0x10 + cmp r0, #0x9f + bhs _02256418 + mov r0, #1 + b _0225641A +_02256418: + mov r0, #0 +_0225641A: + tst r0, r1 + beq _0225642A + bl sub_02022798 + add r4, #0x52 + strh r0, [r4] + mov r0, #0 + pop {r4, pc} +_0225642A: + add r0, r4, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] +_02256432: + mov r0, #0 + str r0, [r4, #0x54] + str r0, [r4, #0x58] + add r4, #0x52 + strh r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov33_022563D0 + + thumb_func_start ov33_02256440 +ov33_02256440: ; 0x02256440 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256450 + cmp r0, #1 + beq _02256460 + b _0225646E +_02256450: + ldr r0, [r4, #0x5c] + mov r1, #1 + bl ov33_02256548 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225646E +_02256460: + ldr r0, [r4, #0x5c] + bl ov33_02256578 + cmp r0, #0 + beq _0225646E + mov r0, #1 + pop {r4, pc} +_0225646E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov33_02256440 + + .rodata + + + .global Unk_ov33_022577FC +Unk_ov33_022577FC: ; 0x022577FC + .incbin "incbin/overlay33_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov33_02257804 +Unk_ov33_02257804: ; 0x02257804 + .incbin "incbin/overlay33_rodata.bin", 0x8, 0xC + + .section .sinit, 4 + .word ov33_022561C0 diff --git a/asm/overlay33.s b/asm/ov33_02256474.s similarity index 86% rename from asm/overlay33.s rename to asm/ov33_02256474.s index 894aa0de3..fa6de5e9f 100644 --- a/asm/overlay33.s +++ b/asm/ov33_02256474.s @@ -1,392 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov33_022561C0 -ov33_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov33_022561D4 - ldr r1, _022561D0 ; =ov33_02256374 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov33_022561D4 -_022561D0: .word ov33_02256374 - thumb_func_end ov33_022561C0 - - thumb_func_start ov33_022561D4 -ov33_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x64 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov33_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov33_02256340 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov33_02256340 - thumb_func_end ov33_022561D4 - - thumb_func_start ov33_0225621C -ov33_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - add r4, r1, #0 - add r0, #0x5c - add r1, r7, #4 - bl ov33_02256474 - cmp r0, #0 - beq _02256306 - mov r0, #0 - strb r0, [r7] - strb r0, [r7, #1] - strb r0, [r7, #2] - str r4, [r7, #0x60] - bl sub_020245A4 - bl sub_0207A268 - mov r1, #0 - str r0, [sp, #4] - str r1, [sp] - bl sub_0207A0F8 - mov r6, #0 - str r0, [r7, #4] - cmp r0, #0 - ble _022562EA - add r4, r7, #0 -_02256256: - ldr r0, [sp, #4] - add r1, r6, #0 - bl sub_0207A0FC - mov r1, #0x4c - mov r2, #0 - add r5, r0, #0 - bl sub_02074470 - cmp r0, #0 - bne _022562E2 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x10] - add r0, r5, #0 - bl sub_02079D40 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #9 - mov r2, #0 - bl sub_02074470 - bl ov33_0225630C - cmp r0, #6 - bhi _022562C4 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022562AA: ; jump table - .short _022562B8 - _022562AA - 2 ; case 0 - .short _022562B8 - _022562AA - 2 ; case 1 - .short _022562B8 - _022562AA - 2 ; case 2 - .short _022562C4 - _022562AA - 2 ; case 3 - .short _022562CE - _022562AA - 2 ; case 4 - .short _022562CE - _022562AA - 2 ; case 5 - .short _022562CE - _022562AA - 2 ; case 6 -_022562B8: - mov r1, #1 - strb r1, [r4, #0x12] - mov r1, #3 - sub r0, r1, r0 - strb r0, [r4, #0x13] - b _022562DA -_022562C4: - mov r0, #2 - strb r0, [r4, #0x12] - mov r0, #0 - strb r0, [r4, #0x13] - b _022562DA -_022562CE: - mov r1, #0 - strb r1, [r4, #0x12] - mov r1, #3 - sub r0, r1, r0 - neg r0, r0 - strb r0, [r4, #0x13] -_022562DA: - ldr r0, [sp] - add r4, #0xc - add r0, r0, #1 - str r0, [sp] -_022562E2: - ldr r0, [r7, #4] - add r6, r6, #1 - cmp r6, r0 - blt _02256256 -_022562EA: - ldr r0, [sp] - mov r1, #0 - str r0, [r7, #4] - add r0, r7, #0 - add r0, #0x50 - strh r1, [r0] - add r0, r7, #0 - add r0, #0x52 - strh r1, [r0] - str r1, [r7, #0x54] - add sp, #8 - str r1, [r7, #0x58] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02256306: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov33_0225621C - - thumb_func_start ov33_0225630C -ov33_0225630C: ; 0x0225630C - ldr r3, _02256328 ; =0x022577FC - mov r2, #0 -_02256310: - ldrb r1, [r3] - cmp r0, r1 - bhs _0225631A - add r0, r2, #0 - bx lr -_0225631A: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #6 - blo _02256310 - mov r0, #6 - bx lr - nop -_02256328: .word 0x022577FC - thumb_func_end ov33_0225630C - - thumb_func_start ov33_0225632C -ov33_0225632C: ; 0x0225632C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x5c] - bl ov33_022564F0 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov33_0225632C - - thumb_func_start ov33_02256340 -ov33_02256340: ; 0x02256340 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #3 - bhs _0225636C - lsl r2, r1, #2 - ldr r1, _02256370 ; =0x02257804 - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _0225636C - add r0, r4, #0 - bl ov33_0225632C - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x60] - bl ov25_02254260 -_0225636C: - pop {r3, r4, r5, pc} - nop -_02256370: .word 0x02257804 - thumb_func_end ov33_02256340 - - thumb_func_start ov33_02256374 -ov33_02256374: ; 0x02256374 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov33_02256374 - - thumb_func_start ov33_0225637C -ov33_0225637C: ; 0x0225637C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256384 - b _02256386 -_02256384: - mov r1, #2 -_02256386: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov33_0225637C - - thumb_func_start ov33_02256390 -ov33_02256390: ; 0x02256390 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563A0 - cmp r0, #1 - beq _022563B0 - b _022563CA -_022563A0: - ldr r0, [r4, #0x5c] - mov r1, #0 - bl ov33_02256548 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563CA -_022563B0: - ldr r0, [r4, #0x5c] - mov r1, #0 - bl ov33_0225656C - cmp r0, #0 - beq _022563CA - ldr r0, [r4, #0x60] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov33_0225637C -_022563CA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov33_02256390 - - thumb_func_start ov33_022563D0 -ov33_022563D0: ; 0x022563D0 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022563E4 - mov r1, #2 - bl ov33_0225637C - mov r0, #0 - pop {r4, pc} -_022563E4: - add r1, r4, #0 - add r0, #0x54 - add r1, #0x58 - bl ov25_0225446C - add r1, r4, #0 - add r1, #0x50 - strh r0, [r1] - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - cmp r0, #0 - beq _02256432 - ldr r0, [r4, #0x54] - sub r0, #0x10 - cmp r0, #0xbf - bhs _0225640A - mov r1, #1 - b _0225640C -_0225640A: - mov r1, #0 -_0225640C: - ldr r0, [r4, #0x58] - sub r0, #0x10 - cmp r0, #0x9f - bhs _02256418 - mov r0, #1 - b _0225641A -_02256418: - mov r0, #0 -_0225641A: - tst r0, r1 - beq _0225642A - bl sub_02022798 - add r4, #0x52 - strh r0, [r4] - mov r0, #0 - pop {r4, pc} -_0225642A: - add r0, r4, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] -_02256432: - mov r0, #0 - str r0, [r4, #0x54] - str r0, [r4, #0x58] - add r4, #0x52 - strh r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov33_022563D0 - - thumb_func_start ov33_02256440 -ov33_02256440: ; 0x02256440 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256450 - cmp r0, #1 - beq _02256460 - b _0225646E -_02256450: - ldr r0, [r4, #0x5c] - mov r1, #1 - bl ov33_02256548 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225646E -_02256460: - ldr r0, [r4, #0x5c] - bl ov33_02256578 - cmp r0, #0 - beq _0225646E - mov r0, #1 - pop {r4, pc} -_0225646E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov33_02256440 thumb_func_start ov33_02256474 ov33_02256474: ; 0x02256474 @@ -2967,17 +2585,71 @@ _022577F2: nop _022577F8: .word 0x00000163 thumb_func_end ov33_022572A0 - ; 0x022577FC - .rodata - .incbin "incbin/overlay33_rodata.bin" - .section .sinit, 4 - .word ov33_022561C0 + + .global Unk_ov33_02257810 +Unk_ov33_02257810: ; 0x02257810 + .incbin "incbin/overlay33_rodata.bin", 0x14, 0x18 - 0x14 + + .global Unk_ov33_02257814 +Unk_ov33_02257814: ; 0x02257814 + .incbin "incbin/overlay33_rodata.bin", 0x18, 0x1C - 0x18 + + .global Unk_ov33_02257818 +Unk_ov33_02257818: ; 0x02257818 + .incbin "incbin/overlay33_rodata.bin", 0x1C, 0x30 - 0x1C + + .global Unk_ov33_0225782C +Unk_ov33_0225782C: ; 0x0225782C + .incbin "incbin/overlay33_rodata.bin", 0x30, 0x48 - 0x30 + + .global Unk_ov33_02257844 +Unk_ov33_02257844: ; 0x02257844 + .incbin "incbin/overlay33_rodata.bin", 0x48, 0x60 - 0x48 + + .global Unk_ov33_0225785C +Unk_ov33_0225785C: ; 0x0225785C + .incbin "incbin/overlay33_rodata.bin", 0x60, 0x7C - 0x60 + + .global Unk_ov33_02257878 +Unk_ov33_02257878: ; 0x02257878 + .incbin "incbin/overlay33_rodata.bin", 0x7C, 0x24 + .data - .incbin "incbin/overlay33_data.bin" - .bss - .space 0x0 + + .global Unk_ov33_022578C0 +Unk_ov33_022578C0: ; 0x022578C0 + .incbin "incbin/overlay33_data.bin", 0x0, 0x14 - 0x0 + + .global Unk_ov33_022578D4 +Unk_ov33_022578D4: ; 0x022578D4 + .incbin "incbin/overlay33_data.bin", 0x14, 0x24 - 0x14 + + .global Unk_ov33_022578E4 +Unk_ov33_022578E4: ; 0x022578E4 + .incbin "incbin/overlay33_data.bin", 0x24, 0x38 - 0x24 + + .global Unk_ov33_022578F8 +Unk_ov33_022578F8: ; 0x022578F8 + .incbin "incbin/overlay33_data.bin", 0x38, 0x4C - 0x38 + + .global Unk_ov33_0225790C +Unk_ov33_0225790C: ; 0x0225790C + .incbin "incbin/overlay33_data.bin", 0x4C, 0x60 - 0x4C + + .global Unk_ov33_02257920 +Unk_ov33_02257920: ; 0x02257920 + .incbin "incbin/overlay33_data.bin", 0x60, 0x74 - 0x60 + + .global Unk_ov33_02257934 +Unk_ov33_02257934: ; 0x02257934 + .incbin "incbin/overlay33_data.bin", 0x74, 0x88 - 0x74 + + .global Unk_ov33_02257948 +Unk_ov33_02257948: ; 0x02257948 + .incbin "incbin/overlay33_data.bin", 0x88, 0x13 + diff --git a/asm/ov34_022561C0.s b/asm/ov34_022561C0.s new file mode 100644 index 000000000..4e22168ba --- /dev/null +++ b/asm/ov34_022561C0.s @@ -0,0 +1,508 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov34_022561C0 +ov34_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov34_022561D4 + ldr r1, _022561D0 ; =ov34_02256294 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov34_022561D4 +_022561D0: .word ov34_02256294 + thumb_func_end ov34_022561C0 + + thumb_func_start ov34_022561D4 +ov34_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x54 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov34_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov34_02256260 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov34_02256260 + thumb_func_end ov34_022561D4 + + thumb_func_start ov34_0225621C +ov34_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x48 + add r1, r5, #4 + bl ov34_02256540 + cmp r0, #0 + beq _0225623E + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + str r0, [r5, #0x50] + str r4, [r5, #0x4c] + mov r0, #1 + pop {r3, r4, r5, pc} +_0225623E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov34_0225621C + + thumb_func_start ov34_02256244 +ov34_02256244: ; 0x02256244 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + cmp r0, #0 + beq _02256252 + bl sub_020181C4 +_02256252: + ldr r0, [r4, #0x48] + bl ov34_02256604 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov34_02256244 + + thumb_func_start ov34_02256260 +ov34_02256260: ; 0x02256260 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #3 + bhs _0225628C + lsl r2, r1, #2 + ldr r1, _02256290 ; =0x02256A1C + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _0225628C + add r0, r4, #0 + bl ov34_02256244 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x4c] + bl ov25_02254260 +_0225628C: + pop {r3, r4, r5, pc} + nop +_02256290: .word 0x02256A1C + thumb_func_end ov34_02256260 + + thumb_func_start ov34_02256294 +ov34_02256294: ; 0x02256294 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov34_02256294 + + thumb_func_start ov34_0225629C +ov34_0225629C: ; 0x0225629C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562A4 + b _022562A6 +_022562A4: + mov r1, #2 +_022562A6: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov34_0225629C + + thumb_func_start ov34_022562B0 +ov34_022562B0: ; 0x022562B0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022562C0 + cmp r0, #1 + beq _022562D0 + b _022562EA +_022562C0: + ldr r0, [r4, #0x48] + mov r1, #0 + bl ov34_02256640 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022562EA +_022562D0: + ldr r0, [r4, #0x48] + mov r1, #0 + bl ov34_02256664 + cmp r0, #0 + beq _022562EA + ldr r0, [r4, #0x4c] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov34_0225629C +_022562EA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov34_022562B0 + + thumb_func_start ov34_022562F0 +ov34_022562F0: ; 0x022562F0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256310 + ldr r0, [r4, #0x48] + bl ov34_02256A0C + add r0, r4, #0 + mov r1, #2 + bl ov34_0225629C + add sp, #8 + mov r0, #0 + pop {r4, pc} +_02256310: + ldrb r1, [r4, #1] + cmp r1, #3 + bhi _022563DA + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02256322: ; jump table + .short _0225632A - _02256322 - 2 ; case 0 + .short _02256354 - _02256322 - 2 ; case 1 + .short _022563AA - _02256322 - 2 ; case 2 + .short _022563BC - _02256322 - 2 ; case 3 +_0225632A: + add r1, sp, #4 + add r2, sp, #0 + bl ov34_022563E4 + cmp r0, #0 + beq _022563DA + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl ov34_02256428 + ldr r0, _022563E0 ; =0x00000668 + bl ov25_02254424 + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov34_02256640 + mov r0, #1 + strb r0, [r4, #1] + b _022563DA +_02256354: + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov34_02256664 + cmp r0, #0 + beq _02256366 + mov r0, #0 + strb r0, [r4, #1] + b _022563DA +_02256366: + ldr r0, [r4, #0x4c] + bl ov25_02254534 + cmp r0, #1 + beq _0225637A + ldr r0, [r4, #0x4c] + bl ov25_0225450C + cmp r0, #0 + beq _02256386 +_0225637A: + ldr r0, [r4, #0x48] + bl ov34_02256A0C + mov r0, #2 + strb r0, [r4, #1] + b _022563DA +_02256386: + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov34_022563E4 + cmp r0, #0 + beq _022563DA + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl ov34_02256428 + ldr r0, [r4, #0x48] + bl ov34_02256A0C + mov r0, #3 + strb r0, [r4, #1] + b _022563DA +_022563AA: + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov34_02256664 + cmp r0, #0 + beq _022563DA + mov r0, #0 + strb r0, [r4, #1] + b _022563DA +_022563BC: + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov34_02256664 + cmp r0, #0 + beq _022563DA + ldr r0, _022563E0 ; =0x00000668 + bl ov25_02254424 + ldr r0, [r4, #0x48] + mov r1, #2 + bl ov34_02256640 + mov r0, #1 + strb r0, [r4, #1] +_022563DA: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_022563E0: .word 0x00000668 + thumb_func_end ov34_022562F0 + + thumb_func_start ov34_022563E4 +ov34_022563E4: ; 0x022563E4 + push {r3, r4, r5, lr} + ldr r0, [r0, #0x4c] + add r5, r1, #0 + add r4, r2, #0 + bl ov25_0225450C + cmp r0, #0 + bne _02256424 + add r0, r5, #0 + add r1, r4, #0 + bl sub_020227C0 + cmp r0, #0 + beq _02256424 + ldr r0, [r5, #0] + sub r0, #0x18 + cmp r0, #0xb0 + bhs _0225640C + mov r1, #1 + b _0225640E +_0225640C: + mov r1, #0 +_0225640E: + ldr r0, [r4, #0] + sub r0, #0x18 + cmp r0, #0x90 + bhs _0225641A + mov r0, #1 + b _0225641C +_0225641A: + mov r0, #0 +_0225641C: + tst r0, r1 + beq _02256424 + mov r0, #1 + pop {r3, r4, r5, pc} +_02256424: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov34_022563E4 + + thumb_func_start ov34_02256428 +ov34_02256428: ; 0x02256428 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x4c] + add r7, r1, #0 + str r2, [sp] + bl ov25_0225453C + mov r1, #8 + bl sub_0203F478 + str r0, [sp, #4] + add r4, r5, #4 + mov r1, #0 + str r1, [r4, #8] + ldr r0, [sp] + str r7, [r5, #4] + str r0, [r4, #4] + ldr r0, [sp, #4] + str r1, [r4, #0xc] + cmp r0, #0 + beq _022564E6 + ldrb r0, [r0, #4] + cmp r0, #0xff + beq _022564E0 + add r6, r4, #0 + ldr r5, [sp, #4] + add r6, #0xc +_02256460: + ldrh r0, [r5] + ldrh r1, [r5, #2] + add r2, sp, #0xc + add r3, sp, #8 + bl ov34_022564F0 + ldr r1, [sp, #8] + ldr r0, [sp] + sub r0, r1, r0 + ldr r1, [sp, #0xc] + sub r1, r1, r7 + add r2, r1, #0 + mul r2, r1 + add r1, r0, #0 + mul r1, r0 + add r0, r2, r1 + lsl r0, r0, #0xc + bl sub_020BCFF0 + ldrb r1, [r5, #4] + lsl r2, r1, #2 + ldr r1, _022564EC ; =0x02256A28 + ldr r1, [r1, r2] + cmp r0, r1 + bgt _022564C6 + ldr r1, [r4, #0xc] + cmp r1, #8 + bhs _022564D8 + mov r2, #6 + mul r2, r1 + ldr r0, [sp, #0xc] + add r1, r4, r2 + strh r0, [r1, #0x10] + ldr r2, [r4, #0xc] + mov r1, #6 + mul r1, r2 + ldr r0, [sp, #8] + add r1, r4, r1 + strh r0, [r1, #0x12] + ldr r2, [r4, #0xc] + mov r1, #6 + mul r1, r2 + ldrb r0, [r5, #4] + add r1, r4, r1 + strh r0, [r1, #0x14] + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + mov r0, #2 + str r0, [r4, #8] + b _022564D8 +_022564C6: + mov r1, #3 + lsl r1, r1, #0x10 + cmp r0, r1 + bgt _022564D8 + ldr r0, [r4, #8] + cmp r0, #0 + bne _022564D8 + mov r0, #1 + str r0, [r4, #8] +_022564D8: + add r5, r5, #6 + ldrb r0, [r5, #4] + cmp r0, #0xff + bne _02256460 +_022564E0: + ldr r0, [sp, #4] + bl sub_020181C4 +_022564E6: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022564EC: .word 0x02256A28 + thumb_func_end ov34_02256428 + + thumb_func_start ov34_022564F0 +ov34_022564F0: ; 0x022564F0 + push {r4, r5} + sub r4, r0, #7 + mov r0, #0xb + add r5, r4, #0 + mul r5, r0 + sub r1, r1, #7 + add r5, #0x70 + mul r0, r1 + str r5, [r2, #0] + add r0, #0x65 + str r0, [r3, #0] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov34_022564F0 + + thumb_func_start ov34_0225650C +ov34_0225650C: ; 0x0225650C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225651C + cmp r0, #1 + beq _0225652C + b _0225653A +_0225651C: + ldr r0, [r4, #0x48] + mov r1, #1 + bl ov34_02256640 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225653A +_0225652C: + ldr r0, [r4, #0x48] + bl ov34_02256670 + cmp r0, #0 + beq _0225653A + mov r0, #1 + pop {r4, pc} +_0225653A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov34_0225650C + + .rodata + + + .global Unk_ov34_02256A1C +Unk_ov34_02256A1C: ; 0x02256A1C + .incbin "incbin/overlay34_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov34_02256A28 +Unk_ov34_02256A28: ; 0x02256A28 + .incbin "incbin/overlay34_rodata.bin", 0xC, 0xC + + .section .sinit, 4 + .word ov34_022561C0 diff --git a/asm/overlay34.s b/asm/ov34_02256540.s similarity index 56% rename from asm/overlay34.s rename to asm/ov34_02256540.s index 07b8ff160..3269a4be6 100644 --- a/asm/overlay34.s +++ b/asm/ov34_02256540.s @@ -1,494 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov34_022561C0 -ov34_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov34_022561D4 - ldr r1, _022561D0 ; =ov34_02256294 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov34_022561D4 -_022561D0: .word ov34_02256294 - thumb_func_end ov34_022561C0 - - thumb_func_start ov34_022561D4 -ov34_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x54 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov34_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov34_02256260 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov34_02256260 - thumb_func_end ov34_022561D4 - - thumb_func_start ov34_0225621C -ov34_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x48 - add r1, r5, #4 - bl ov34_02256540 - cmp r0, #0 - beq _0225623E - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - str r0, [r5, #0x50] - str r4, [r5, #0x4c] - mov r0, #1 - pop {r3, r4, r5, pc} -_0225623E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov34_0225621C - - thumb_func_start ov34_02256244 -ov34_02256244: ; 0x02256244 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #0 - beq _02256252 - bl sub_020181C4 -_02256252: - ldr r0, [r4, #0x48] - bl ov34_02256604 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov34_02256244 - - thumb_func_start ov34_02256260 -ov34_02256260: ; 0x02256260 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #3 - bhs _0225628C - lsl r2, r1, #2 - ldr r1, _02256290 ; =0x02256A1C - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _0225628C - add r0, r4, #0 - bl ov34_02256244 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x4c] - bl ov25_02254260 -_0225628C: - pop {r3, r4, r5, pc} - nop -_02256290: .word 0x02256A1C - thumb_func_end ov34_02256260 - - thumb_func_start ov34_02256294 -ov34_02256294: ; 0x02256294 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov34_02256294 - - thumb_func_start ov34_0225629C -ov34_0225629C: ; 0x0225629C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562A4 - b _022562A6 -_022562A4: - mov r1, #2 -_022562A6: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov34_0225629C - - thumb_func_start ov34_022562B0 -ov34_022562B0: ; 0x022562B0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022562C0 - cmp r0, #1 - beq _022562D0 - b _022562EA -_022562C0: - ldr r0, [r4, #0x48] - mov r1, #0 - bl ov34_02256640 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022562EA -_022562D0: - ldr r0, [r4, #0x48] - mov r1, #0 - bl ov34_02256664 - cmp r0, #0 - beq _022562EA - ldr r0, [r4, #0x4c] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov34_0225629C -_022562EA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov34_022562B0 - - thumb_func_start ov34_022562F0 -ov34_022562F0: ; 0x022562F0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256310 - ldr r0, [r4, #0x48] - bl ov34_02256A0C - add r0, r4, #0 - mov r1, #2 - bl ov34_0225629C - add sp, #8 - mov r0, #0 - pop {r4, pc} -_02256310: - ldrb r1, [r4, #1] - cmp r1, #3 - bhi _022563DA - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02256322: ; jump table - .short _0225632A - _02256322 - 2 ; case 0 - .short _02256354 - _02256322 - 2 ; case 1 - .short _022563AA - _02256322 - 2 ; case 2 - .short _022563BC - _02256322 - 2 ; case 3 -_0225632A: - add r1, sp, #4 - add r2, sp, #0 - bl ov34_022563E4 - cmp r0, #0 - beq _022563DA - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl ov34_02256428 - ldr r0, _022563E0 ; =0x00000668 - bl ov25_02254424 - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov34_02256640 - mov r0, #1 - strb r0, [r4, #1] - b _022563DA -_02256354: - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov34_02256664 - cmp r0, #0 - beq _02256366 - mov r0, #0 - strb r0, [r4, #1] - b _022563DA -_02256366: - ldr r0, [r4, #0x4c] - bl ov25_02254534 - cmp r0, #1 - beq _0225637A - ldr r0, [r4, #0x4c] - bl ov25_0225450C - cmp r0, #0 - beq _02256386 -_0225637A: - ldr r0, [r4, #0x48] - bl ov34_02256A0C - mov r0, #2 - strb r0, [r4, #1] - b _022563DA -_02256386: - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov34_022563E4 - cmp r0, #0 - beq _022563DA - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl ov34_02256428 - ldr r0, [r4, #0x48] - bl ov34_02256A0C - mov r0, #3 - strb r0, [r4, #1] - b _022563DA -_022563AA: - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov34_02256664 - cmp r0, #0 - beq _022563DA - mov r0, #0 - strb r0, [r4, #1] - b _022563DA -_022563BC: - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov34_02256664 - cmp r0, #0 - beq _022563DA - ldr r0, _022563E0 ; =0x00000668 - bl ov25_02254424 - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov34_02256640 - mov r0, #1 - strb r0, [r4, #1] -_022563DA: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_022563E0: .word 0x00000668 - thumb_func_end ov34_022562F0 - - thumb_func_start ov34_022563E4 -ov34_022563E4: ; 0x022563E4 - push {r3, r4, r5, lr} - ldr r0, [r0, #0x4c] - add r5, r1, #0 - add r4, r2, #0 - bl ov25_0225450C - cmp r0, #0 - bne _02256424 - add r0, r5, #0 - add r1, r4, #0 - bl sub_020227C0 - cmp r0, #0 - beq _02256424 - ldr r0, [r5, #0] - sub r0, #0x18 - cmp r0, #0xb0 - bhs _0225640C - mov r1, #1 - b _0225640E -_0225640C: - mov r1, #0 -_0225640E: - ldr r0, [r4, #0] - sub r0, #0x18 - cmp r0, #0x90 - bhs _0225641A - mov r0, #1 - b _0225641C -_0225641A: - mov r0, #0 -_0225641C: - tst r0, r1 - beq _02256424 - mov r0, #1 - pop {r3, r4, r5, pc} -_02256424: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov34_022563E4 - - thumb_func_start ov34_02256428 -ov34_02256428: ; 0x02256428 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x4c] - add r7, r1, #0 - str r2, [sp] - bl ov25_0225453C - mov r1, #8 - bl sub_0203F478 - str r0, [sp, #4] - add r4, r5, #4 - mov r1, #0 - str r1, [r4, #8] - ldr r0, [sp] - str r7, [r5, #4] - str r0, [r4, #4] - ldr r0, [sp, #4] - str r1, [r4, #0xc] - cmp r0, #0 - beq _022564E6 - ldrb r0, [r0, #4] - cmp r0, #0xff - beq _022564E0 - add r6, r4, #0 - ldr r5, [sp, #4] - add r6, #0xc -_02256460: - ldrh r0, [r5] - ldrh r1, [r5, #2] - add r2, sp, #0xc - add r3, sp, #8 - bl ov34_022564F0 - ldr r1, [sp, #8] - ldr r0, [sp] - sub r0, r1, r0 - ldr r1, [sp, #0xc] - sub r1, r1, r7 - add r2, r1, #0 - mul r2, r1 - add r1, r0, #0 - mul r1, r0 - add r0, r2, r1 - lsl r0, r0, #0xc - bl sub_020BCFF0 - ldrb r1, [r5, #4] - lsl r2, r1, #2 - ldr r1, _022564EC ; =0x02256A28 - ldr r1, [r1, r2] - cmp r0, r1 - bgt _022564C6 - ldr r1, [r4, #0xc] - cmp r1, #8 - bhs _022564D8 - mov r2, #6 - mul r2, r1 - ldr r0, [sp, #0xc] - add r1, r4, r2 - strh r0, [r1, #0x10] - ldr r2, [r4, #0xc] - mov r1, #6 - mul r1, r2 - ldr r0, [sp, #8] - add r1, r4, r1 - strh r0, [r1, #0x12] - ldr r2, [r4, #0xc] - mov r1, #6 - mul r1, r2 - ldrb r0, [r5, #4] - add r1, r4, r1 - strh r0, [r1, #0x14] - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - mov r0, #2 - str r0, [r4, #8] - b _022564D8 -_022564C6: - mov r1, #3 - lsl r1, r1, #0x10 - cmp r0, r1 - bgt _022564D8 - ldr r0, [r4, #8] - cmp r0, #0 - bne _022564D8 - mov r0, #1 - str r0, [r4, #8] -_022564D8: - add r5, r5, #6 - ldrb r0, [r5, #4] - cmp r0, #0xff - bne _02256460 -_022564E0: - ldr r0, [sp, #4] - bl sub_020181C4 -_022564E6: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022564EC: .word 0x02256A28 - thumb_func_end ov34_02256428 - - thumb_func_start ov34_022564F0 -ov34_022564F0: ; 0x022564F0 - push {r4, r5} - sub r4, r0, #7 - mov r0, #0xb - add r5, r4, #0 - mul r5, r0 - sub r1, r1, #7 - add r5, #0x70 - mul r0, r1 - str r5, [r2, #0] - add r0, #0x65 - str r0, [r3, #0] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov34_022564F0 - - thumb_func_start ov34_0225650C -ov34_0225650C: ; 0x0225650C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225651C - cmp r0, #1 - beq _0225652C - b _0225653A -_0225651C: - ldr r0, [r4, #0x48] - mov r1, #1 - bl ov34_02256640 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225653A -_0225652C: - ldr r0, [r4, #0x48] - bl ov34_02256670 - cmp r0, #0 - beq _0225653A - mov r0, #1 - pop {r4, pc} -_0225653A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov34_0225650C thumb_func_start ov34_02256540 ov34_02256540: ; 0x02256540 @@ -1120,14 +636,27 @@ ov34_02256A0C: ; 0x02256A0C pop {r4, pc} ; .align 2, 0 thumb_func_end ov34_02256A0C - ; 0x02256A1C - .rodata - .incbin "incbin/overlay34_rodata.bin" - .section .sinit, 4 - .word ov34_022561C0 - .bss - .space 0x0 + .global Unk_ov34_02256A34 +Unk_ov34_02256A34: ; 0x02256A34 + .incbin "incbin/overlay34_rodata.bin", 0x18, 0x24 - 0x18 + + .global Unk_ov34_02256A40 +Unk_ov34_02256A40: ; 0x02256A40 + .incbin "incbin/overlay34_rodata.bin", 0x24, 0x34 - 0x24 + + .global Unk_ov34_02256A50 +Unk_ov34_02256A50: ; 0x02256A50 + .incbin "incbin/overlay34_rodata.bin", 0x34, 0x44 - 0x34 + + .global Unk_ov34_02256A60 +Unk_ov34_02256A60: ; 0x02256A60 + .incbin "incbin/overlay34_rodata.bin", 0x44, 0x60 - 0x44 + + .global Unk_ov34_02256A7C +Unk_ov34_02256A7C: ; 0x02256A7C + .incbin "incbin/overlay34_rodata.bin", 0x60, 0x30 + diff --git a/asm/ov35_022561C0.s b/asm/ov35_022561C0.s new file mode 100644 index 000000000..1b7fa1d7b --- /dev/null +++ b/asm/ov35_022561C0.s @@ -0,0 +1,349 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov35_022561C0 +ov35_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov35_022561D4 + ldr r1, _022561D0 ; =ov35_022562EC + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov35_022561D4 +_022561D0: .word ov35_022562EC + thumb_func_end ov35_022561C0 + + thumb_func_start ov35_022561D4 +ov35_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x20 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov35_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov35_022562B0 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov35_022562B0 + thumb_func_end ov35_022561D4 + + thumb_func_start ov35_0225621C +ov35_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #1 + add r1, r5, #0 + add r7, r2, #0 + add r4, r3, #0 + str r0, [r5, #0xc] + add r0, r4, #0 + add r1, #8 + mov r2, #4 + bl sub_02099D7C + cmp r0, #0 + bne _0225623E + mov r0, #0 + str r0, [r5, #8] +_0225623E: + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x10 + add r1, #8 + add r2, r7, #0 + str r4, [r5, #4] + bl ov35_02256410 + cmp r0, #0 + beq _02256276 + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _0225627C ; =0x02256720 + ldr r2, _02256280 ; =ov35_02256284 + mov r1, #1 + add r3, r5, #0 + bl ov25_02255ACC + str r0, [r5, #0x18] + mov r0, #0 + str r0, [r5, #0x1c] + str r6, [r5, #0x14] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02256276: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225627C: .word 0x02256720 +_02256280: .word ov35_02256284 + thumb_func_end ov35_0225621C + + thumb_func_start ov35_02256284 +ov35_02256284: ; 0x02256284 + cmp r0, #0 + bne _0225628A + str r1, [r3, #0x1c] +_0225628A: + bx lr + thumb_func_end ov35_02256284 + + thumb_func_start ov35_0225628C +ov35_0225628C: ; 0x0225628C + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #8 + mov r2, #4 + bl sub_02099D54 + ldr r0, [r4, #0x18] + bl ov25_02255B34 + ldr r0, [r4, #0x10] + bl ov35_0225644C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov35_0225628C + + thumb_func_start ov35_022562B0 +ov35_022562B0: ; 0x022562B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _022562E6 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _022562E8 ; =0x02256724 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562E6 + add r0, r4, #0 + bl ov35_0225628C + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x14] + bl ov25_02254260 +_022562E6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022562E8: .word 0x02256724 + thumb_func_end ov35_022562B0 + + thumb_func_start ov35_022562EC +ov35_022562EC: ; 0x022562EC + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov35_022562EC + + thumb_func_start ov35_022562F4 +ov35_022562F4: ; 0x022562F4 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562FC + b _022562FE +_022562FC: + mov r1, #2 +_022562FE: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov35_022562F4 + + thumb_func_start ov35_02256308 +ov35_02256308: ; 0x02256308 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256318 + cmp r0, #1 + beq _02256328 + b _02256342 +_02256318: + ldr r0, [r4, #0x10] + mov r1, #0 + bl ov35_02256548 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256342 +_02256328: + ldr r0, [r4, #0x10] + mov r1, #0 + bl ov35_0225656C + cmp r0, #0 + beq _02256342 + ldr r0, [r4, #0x14] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov35_022562F4 +_02256342: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov35_02256308 + + thumb_func_start ov35_02256348 +ov35_02256348: ; 0x02256348 + push {r4, lr} + add r4, r0, #0 + ldrb r2, [r4, #2] + add r1, r4, #0 + add r1, #8 + cmp r2, #0 + beq _02256360 + mov r1, #2 + bl ov35_022562F4 + mov r0, #0 + pop {r4, pc} +_02256360: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225636C + cmp r0, #1 + beq _0225638A + b _022563D2 +_0225636C: + ldr r0, [r4, #0x1c] + cmp r0, #1 + bne _022563D2 + mov r0, #0 + str r0, [r1, #4] + ldr r0, [r4, #0x10] + mov r1, #2 + bl ov35_02256548 + mov r0, #0 + str r0, [r4, #0x1c] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563D2 +_0225638A: + ldr r0, [r4, #0x1c] + cmp r0, #2 + bne _022563A4 + mov r0, #1 + str r0, [r1, #4] + ldr r0, [r4, #0x10] + mov r1, #2 + bl ov35_02256548 + mov r0, #0 + str r0, [r4, #0x1c] + strb r0, [r4, #1] + b _022563D2 +_022563A4: + cmp r0, #3 + bne _022563D2 + mov r0, #1 + str r0, [r1, #4] + ldr r0, [r1, #0] + add r2, r0, #1 + ldr r0, _022563D8 ; =0x0000270F + str r2, [r1, #0] + cmp r2, r0 + bls _022563BC + mov r0, #0 + str r0, [r1, #0] +_022563BC: + ldr r0, [r4, #0x10] + mov r1, #2 + bl ov35_02256548 + ldr r0, [r4, #0x10] + mov r1, #3 + bl ov35_02256548 + mov r0, #0 + str r0, [r4, #0x1c] + strb r0, [r4, #1] +_022563D2: + mov r0, #0 + pop {r4, pc} + nop +_022563D8: .word 0x0000270F + thumb_func_end ov35_02256348 + + thumb_func_start ov35_022563DC +ov35_022563DC: ; 0x022563DC + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563EC + cmp r0, #1 + beq _022563FC + b _0225640A +_022563EC: + ldr r0, [r4, #0x10] + mov r1, #1 + bl ov35_02256548 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225640A +_022563FC: + ldr r0, [r4, #0x10] + bl ov35_02256578 + cmp r0, #0 + beq _0225640A + mov r0, #1 + pop {r4, pc} +_0225640A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov35_022563DC + + .rodata + + + .global Unk_ov35_02256720 +Unk_ov35_02256720: ; 0x02256720 + .incbin "incbin/overlay35_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov35_02256724 +Unk_ov35_02256724: ; 0x02256724 + .incbin "incbin/overlay35_rodata.bin", 0x4, 0xC + + .section .sinit, 4 + .word ov35_022561C0 diff --git a/asm/overlay35.s b/asm/ov35_02256410.s similarity index 55% rename from asm/overlay35.s rename to asm/ov35_02256410.s index 7f09661f6..558fd50e5 100644 --- a/asm/overlay35.s +++ b/asm/ov35_02256410.s @@ -1,335 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov35_022561C0 -ov35_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov35_022561D4 - ldr r1, _022561D0 ; =ov35_022562EC - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov35_022561D4 -_022561D0: .word ov35_022562EC - thumb_func_end ov35_022561C0 - - thumb_func_start ov35_022561D4 -ov35_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x20 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov35_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov35_022562B0 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov35_022562B0 - thumb_func_end ov35_022561D4 - - thumb_func_start ov35_0225621C -ov35_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #1 - add r1, r5, #0 - add r7, r2, #0 - add r4, r3, #0 - str r0, [r5, #0xc] - add r0, r4, #0 - add r1, #8 - mov r2, #4 - bl sub_02099D7C - cmp r0, #0 - bne _0225623E - mov r0, #0 - str r0, [r5, #8] -_0225623E: - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x10 - add r1, #8 - add r2, r7, #0 - str r4, [r5, #4] - bl ov35_02256410 - cmp r0, #0 - beq _02256276 - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _0225627C ; =0x02256720 - ldr r2, _02256280 ; =ov35_02256284 - mov r1, #1 - add r3, r5, #0 - bl ov25_02255ACC - str r0, [r5, #0x18] - mov r0, #0 - str r0, [r5, #0x1c] - str r6, [r5, #0x14] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02256276: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225627C: .word 0x02256720 -_02256280: .word ov35_02256284 - thumb_func_end ov35_0225621C - - thumb_func_start ov35_02256284 -ov35_02256284: ; 0x02256284 - cmp r0, #0 - bne _0225628A - str r1, [r3, #0x1c] -_0225628A: - bx lr - thumb_func_end ov35_02256284 - - thumb_func_start ov35_0225628C -ov35_0225628C: ; 0x0225628C - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #8 - mov r2, #4 - bl sub_02099D54 - ldr r0, [r4, #0x18] - bl ov25_02255B34 - ldr r0, [r4, #0x10] - bl ov35_0225644C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov35_0225628C - - thumb_func_start ov35_022562B0 -ov35_022562B0: ; 0x022562B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _022562E6 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _022562E8 ; =0x02256724 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562E6 - add r0, r4, #0 - bl ov35_0225628C - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x14] - bl ov25_02254260 -_022562E6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022562E8: .word 0x02256724 - thumb_func_end ov35_022562B0 - - thumb_func_start ov35_022562EC -ov35_022562EC: ; 0x022562EC - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov35_022562EC - - thumb_func_start ov35_022562F4 -ov35_022562F4: ; 0x022562F4 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562FC - b _022562FE -_022562FC: - mov r1, #2 -_022562FE: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov35_022562F4 - - thumb_func_start ov35_02256308 -ov35_02256308: ; 0x02256308 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256318 - cmp r0, #1 - beq _02256328 - b _02256342 -_02256318: - ldr r0, [r4, #0x10] - mov r1, #0 - bl ov35_02256548 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256342 -_02256328: - ldr r0, [r4, #0x10] - mov r1, #0 - bl ov35_0225656C - cmp r0, #0 - beq _02256342 - ldr r0, [r4, #0x14] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov35_022562F4 -_02256342: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov35_02256308 - - thumb_func_start ov35_02256348 -ov35_02256348: ; 0x02256348 - push {r4, lr} - add r4, r0, #0 - ldrb r2, [r4, #2] - add r1, r4, #0 - add r1, #8 - cmp r2, #0 - beq _02256360 - mov r1, #2 - bl ov35_022562F4 - mov r0, #0 - pop {r4, pc} -_02256360: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225636C - cmp r0, #1 - beq _0225638A - b _022563D2 -_0225636C: - ldr r0, [r4, #0x1c] - cmp r0, #1 - bne _022563D2 - mov r0, #0 - str r0, [r1, #4] - ldr r0, [r4, #0x10] - mov r1, #2 - bl ov35_02256548 - mov r0, #0 - str r0, [r4, #0x1c] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563D2 -_0225638A: - ldr r0, [r4, #0x1c] - cmp r0, #2 - bne _022563A4 - mov r0, #1 - str r0, [r1, #4] - ldr r0, [r4, #0x10] - mov r1, #2 - bl ov35_02256548 - mov r0, #0 - str r0, [r4, #0x1c] - strb r0, [r4, #1] - b _022563D2 -_022563A4: - cmp r0, #3 - bne _022563D2 - mov r0, #1 - str r0, [r1, #4] - ldr r0, [r1, #0] - add r2, r0, #1 - ldr r0, _022563D8 ; =0x0000270F - str r2, [r1, #0] - cmp r2, r0 - bls _022563BC - mov r0, #0 - str r0, [r1, #0] -_022563BC: - ldr r0, [r4, #0x10] - mov r1, #2 - bl ov35_02256548 - ldr r0, [r4, #0x10] - mov r1, #3 - bl ov35_02256548 - mov r0, #0 - str r0, [r4, #0x1c] - strb r0, [r4, #1] -_022563D2: - mov r0, #0 - pop {r4, pc} - nop -_022563D8: .word 0x0000270F - thumb_func_end ov35_02256348 - - thumb_func_start ov35_022563DC -ov35_022563DC: ; 0x022563DC - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563EC - cmp r0, #1 - beq _022563FC - b _0225640A -_022563EC: - ldr r0, [r4, #0x10] - mov r1, #1 - bl ov35_02256548 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225640A -_022563FC: - ldr r0, [r4, #0x10] - bl ov35_02256578 - cmp r0, #0 - beq _0225640A - mov r0, #1 - pop {r4, pc} -_0225640A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov35_022563DC thumb_func_start ov35_02256410 ov35_02256410: ; 0x02256410 @@ -728,14 +403,23 @@ _02256714: .word 0x04000298 _02256718: .word 0x040002A0 _0225671C: .word 0x040002A8 thumb_func_end ov35_022566A8 - ; 0x02256720 - .rodata - .incbin "incbin/overlay35_rodata.bin" - .section .sinit, 4 - .word ov35_022561C0 - .bss - .space 0x0 + .global Unk_ov35_02256730 +Unk_ov35_02256730: ; 0x02256730 + .incbin "incbin/overlay35_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov35_02256740 +Unk_ov35_02256740: ; 0x02256740 + .incbin "incbin/overlay35_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov35_02256750 +Unk_ov35_02256750: ; 0x02256750 + .incbin "incbin/overlay35_rodata.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov35_0225676C +Unk_ov35_0225676C: ; 0x0225676C + .incbin "incbin/overlay35_rodata.bin", 0x4C, 0x3C + diff --git a/asm/ov36_022561C0.s b/asm/ov36_022561C0.s new file mode 100644 index 000000000..6095eed15 --- /dev/null +++ b/asm/ov36_022561C0.s @@ -0,0 +1,339 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov36_022561C0 +ov36_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov36_022561D4 + ldr r1, _022561D0 ; =ov36_022562D4 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov36_022561D4 +_022561D0: .word ov36_022562D4 + thumb_func_end ov36_022561C0 + + thumb_func_start ov36_022561D4 +ov36_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x20 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov36_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov36_02256298 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov36_02256298 + thumb_func_end ov36_022561D4 + + thumb_func_start ov36_0225621C +ov36_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + str r1, [r5, #0x10] + add r0, r1, #0 + add r4, r2, #0 + bl ov25_02254540 + str r0, [r5, #0x1c] + mov r0, #1 + str r0, [r5, #8] + ldr r0, [r5, #0x1c] + bl sub_020568C8 + str r0, [r5, #4] + add r0, r5, #0 + add r0, #0xc + add r1, r5, #4 + add r2, r4, #0 + bl ov36_02256404 + cmp r0, #0 + beq _0225626A + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _02256270 ; =0x02256718 + ldr r2, _02256274 ; =ov36_02256278 + mov r1, #1 + add r3, r5, #0 + bl ov25_02255ACC + str r0, [r5, #0x14] + mov r0, #0 + str r0, [r5, #0x18] + mov r0, #1 + pop {r3, r4, r5, pc} +_0225626A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02256270: .word 0x02256718 +_02256274: .word ov36_02256278 + thumb_func_end ov36_0225621C + + thumb_func_start ov36_02256278 +ov36_02256278: ; 0x02256278 + cmp r0, #0 + bne _0225627E + str r1, [r3, #0x18] +_0225627E: + bx lr + thumb_func_end ov36_02256278 + + thumb_func_start ov36_02256280 +ov36_02256280: ; 0x02256280 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl ov25_02255B34 + ldr r0, [r4, #0xc] + bl ov36_02256440 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov36_02256280 + + thumb_func_start ov36_02256298 +ov36_02256298: ; 0x02256298 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _022562CE + ldr r0, [r4, #0x10] + ldr r1, [r4, #0x14] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _022562D0 ; =0x0225671C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562CE + add r0, r4, #0 + bl ov36_02256280 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x10] + bl ov25_02254260 +_022562CE: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022562D0: .word 0x0225671C + thumb_func_end ov36_02256298 + + thumb_func_start ov36_022562D4 +ov36_022562D4: ; 0x022562D4 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov36_022562D4 + + thumb_func_start ov36_022562DC +ov36_022562DC: ; 0x022562DC + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562E4 + b _022562E6 +_022562E4: + mov r1, #2 +_022562E6: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov36_022562DC + + thumb_func_start ov36_022562F0 +ov36_022562F0: ; 0x022562F0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256300 + cmp r0, #1 + beq _02256310 + b _0225632A +_02256300: + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov36_0225653C + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225632A +_02256310: + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov36_02256560 + cmp r0, #0 + beq _0225632A + ldr r0, [r4, #0x10] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov36_022562DC +_0225632A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov36_022562F0 + + thumb_func_start ov36_02256330 +ov36_02256330: ; 0x02256330 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256344 + mov r1, #2 + bl ov36_022562DC + mov r0, #0 + pop {r4, pc} +_02256344: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256350 + cmp r0, #1 + beq _0225638A + b _022563CC +_02256350: + ldr r0, [r4, #0x18] + cmp r0, #1 + bne _0225636E + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + mov r1, #2 + bl ov36_0225653C + mov r0, #0 + str r0, [r4, #0x18] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563CC +_0225636E: + ldr r0, [r4, #0x10] + bl ov25_02254538 + cmp r0, #0 + beq _022563CC + ldr r0, [r4, #0x1c] + bl sub_020568C8 + str r0, [r4, #4] + ldr r0, [r4, #0xc] + mov r1, #3 + bl ov36_0225653C + b _022563CC +_0225638A: + ldr r0, [r4, #0x18] + cmp r0, #2 + bne _022563A4 + mov r0, #1 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + mov r1, #2 + bl ov36_0225653C + mov r0, #0 + str r0, [r4, #0x18] + strb r0, [r4, #1] + b _022563CC +_022563A4: + cmp r0, #3 + bne _022563CC + mov r0, #1 + str r0, [r4, #8] + mov r1, #0 + str r1, [r4, #4] + ldr r0, [r4, #0x1c] + bl sub_020568CC + ldr r0, [r4, #0xc] + mov r1, #2 + bl ov36_0225653C + ldr r0, [r4, #0xc] + mov r1, #3 + bl ov36_0225653C + mov r0, #0 + str r0, [r4, #0x18] + strb r0, [r4, #1] +_022563CC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov36_02256330 + + thumb_func_start ov36_022563D0 +ov36_022563D0: ; 0x022563D0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563E0 + cmp r0, #1 + beq _022563F0 + b _022563FE +_022563E0: + ldr r0, [r4, #0xc] + mov r1, #1 + bl ov36_0225653C + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563FE +_022563F0: + ldr r0, [r4, #0xc] + bl ov36_0225656C + cmp r0, #0 + beq _022563FE + mov r0, #1 + pop {r4, pc} +_022563FE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov36_022563D0 + + .rodata + + + .global Unk_ov36_02256718 +Unk_ov36_02256718: ; 0x02256718 + .incbin "incbin/overlay36_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov36_0225671C +Unk_ov36_0225671C: ; 0x0225671C + .incbin "incbin/overlay36_rodata.bin", 0x4, 0xC + + .section .sinit, 4 + .word ov36_022561C0 diff --git a/asm/overlay36.s b/asm/ov36_02256404.s similarity index 56% rename from asm/overlay36.s rename to asm/ov36_02256404.s index 971f8d4ac..65c8b6cf4 100644 --- a/asm/overlay36.s +++ b/asm/ov36_02256404.s @@ -1,325 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov36_022561C0 -ov36_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov36_022561D4 - ldr r1, _022561D0 ; =ov36_022562D4 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov36_022561D4 -_022561D0: .word ov36_022562D4 - thumb_func_end ov36_022561C0 - - thumb_func_start ov36_022561D4 -ov36_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x20 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov36_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov36_02256298 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov36_02256298 - thumb_func_end ov36_022561D4 - - thumb_func_start ov36_0225621C -ov36_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - str r1, [r5, #0x10] - add r0, r1, #0 - add r4, r2, #0 - bl ov25_02254540 - str r0, [r5, #0x1c] - mov r0, #1 - str r0, [r5, #8] - ldr r0, [r5, #0x1c] - bl sub_020568C8 - str r0, [r5, #4] - add r0, r5, #0 - add r0, #0xc - add r1, r5, #4 - add r2, r4, #0 - bl ov36_02256404 - cmp r0, #0 - beq _0225626A - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _02256270 ; =0x02256718 - ldr r2, _02256274 ; =ov36_02256278 - mov r1, #1 - add r3, r5, #0 - bl ov25_02255ACC - str r0, [r5, #0x14] - mov r0, #0 - str r0, [r5, #0x18] - mov r0, #1 - pop {r3, r4, r5, pc} -_0225626A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02256270: .word 0x02256718 -_02256274: .word ov36_02256278 - thumb_func_end ov36_0225621C - - thumb_func_start ov36_02256278 -ov36_02256278: ; 0x02256278 - cmp r0, #0 - bne _0225627E - str r1, [r3, #0x18] -_0225627E: - bx lr - thumb_func_end ov36_02256278 - - thumb_func_start ov36_02256280 -ov36_02256280: ; 0x02256280 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl ov25_02255B34 - ldr r0, [r4, #0xc] - bl ov36_02256440 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov36_02256280 - - thumb_func_start ov36_02256298 -ov36_02256298: ; 0x02256298 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _022562CE - ldr r0, [r4, #0x10] - ldr r1, [r4, #0x14] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _022562D0 ; =0x0225671C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562CE - add r0, r4, #0 - bl ov36_02256280 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x10] - bl ov25_02254260 -_022562CE: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022562D0: .word 0x0225671C - thumb_func_end ov36_02256298 - - thumb_func_start ov36_022562D4 -ov36_022562D4: ; 0x022562D4 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov36_022562D4 - - thumb_func_start ov36_022562DC -ov36_022562DC: ; 0x022562DC - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562E4 - b _022562E6 -_022562E4: - mov r1, #2 -_022562E6: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov36_022562DC - - thumb_func_start ov36_022562F0 -ov36_022562F0: ; 0x022562F0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256300 - cmp r0, #1 - beq _02256310 - b _0225632A -_02256300: - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov36_0225653C - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225632A -_02256310: - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov36_02256560 - cmp r0, #0 - beq _0225632A - ldr r0, [r4, #0x10] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov36_022562DC -_0225632A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov36_022562F0 - - thumb_func_start ov36_02256330 -ov36_02256330: ; 0x02256330 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256344 - mov r1, #2 - bl ov36_022562DC - mov r0, #0 - pop {r4, pc} -_02256344: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256350 - cmp r0, #1 - beq _0225638A - b _022563CC -_02256350: - ldr r0, [r4, #0x18] - cmp r0, #1 - bne _0225636E - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - mov r1, #2 - bl ov36_0225653C - mov r0, #0 - str r0, [r4, #0x18] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563CC -_0225636E: - ldr r0, [r4, #0x10] - bl ov25_02254538 - cmp r0, #0 - beq _022563CC - ldr r0, [r4, #0x1c] - bl sub_020568C8 - str r0, [r4, #4] - ldr r0, [r4, #0xc] - mov r1, #3 - bl ov36_0225653C - b _022563CC -_0225638A: - ldr r0, [r4, #0x18] - cmp r0, #2 - bne _022563A4 - mov r0, #1 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - mov r1, #2 - bl ov36_0225653C - mov r0, #0 - str r0, [r4, #0x18] - strb r0, [r4, #1] - b _022563CC -_022563A4: - cmp r0, #3 - bne _022563CC - mov r0, #1 - str r0, [r4, #8] - mov r1, #0 - str r1, [r4, #4] - ldr r0, [r4, #0x1c] - bl sub_020568CC - ldr r0, [r4, #0xc] - mov r1, #2 - bl ov36_0225653C - ldr r0, [r4, #0xc] - mov r1, #3 - bl ov36_0225653C - mov r0, #0 - str r0, [r4, #0x18] - strb r0, [r4, #1] -_022563CC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov36_02256330 - - thumb_func_start ov36_022563D0 -ov36_022563D0: ; 0x022563D0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563E0 - cmp r0, #1 - beq _022563F0 - b _022563FE -_022563E0: - ldr r0, [r4, #0xc] - mov r1, #1 - bl ov36_0225653C - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563FE -_022563F0: - ldr r0, [r4, #0xc] - bl ov36_0225656C - cmp r0, #0 - beq _022563FE - mov r0, #1 - pop {r4, pc} -_022563FE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov36_022563D0 thumb_func_start ov36_02256404 ov36_02256404: ; 0x02256404 @@ -718,14 +403,23 @@ _0225670C: .word 0x04000298 _02256710: .word 0x040002A0 _02256714: .word 0x040002A8 thumb_func_end ov36_0225669C - ; 0x02256718 - .rodata - .incbin "incbin/overlay36_rodata.bin" - .section .sinit, 4 - .word ov36_022561C0 - .bss - .space 0x0 + .global Unk_ov36_02256728 +Unk_ov36_02256728: ; 0x02256728 + .incbin "incbin/overlay36_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov36_02256738 +Unk_ov36_02256738: ; 0x02256738 + .incbin "incbin/overlay36_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov36_02256748 +Unk_ov36_02256748: ; 0x02256748 + .incbin "incbin/overlay36_rodata.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov36_02256764 +Unk_ov36_02256764: ; 0x02256764 + .incbin "incbin/overlay36_rodata.bin", 0x4C, 0x3C + diff --git a/asm/overlay37.s b/asm/ov37_022561C0.s similarity index 52% rename from asm/overlay37.s rename to asm/ov37_022561C0.s index b22bb49b2..b172553f7 100644 --- a/asm/overlay37.s +++ b/asm/ov37_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov37_022561C0 ov37_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -307,277 +310,16 @@ _022563CE: ; .align 2, 0 thumb_func_end ov37_022563A0 - thumb_func_start ov37_022563D4 -ov37_022563D4: ; 0x022563D4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #8 - mov r1, #0x3c - bl sub_02018144 - add r4, r0, #0 - beq _0225640A - add r0, #8 - mov r1, #4 - bl ov25_02255090 - str r5, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - bl ov25_02254664 - str r0, [r4, #0x20] - add r0, r4, #0 - add r1, r5, #0 - bl ov37_0225641C - str r4, [r6, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_0225640A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov37_022563D4 - - thumb_func_start ov37_02256410 -ov37_02256410: ; 0x02256410 - push {r3, lr} - cmp r0, #0 - beq _0225641A - bl sub_020181C4 -_0225641A: - pop {r3, pc} - thumb_func_end ov37_02256410 - - thumb_func_start ov37_0225641C -ov37_0225641C: ; 0x0225641C - push {r4, r5, lr} - sub sp, #0xc - mov r3, #0 - str r3, [sp] - mov r2, #1 - add r5, r0, #0 - add r4, r1, #0 - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0x68 - bl sub_02006EC0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - add r0, #0x28 - mov r1, #0xc - mov r2, #0x66 - mov r3, #0x67 - bl ov25_02255958 - add r2, r5, #0 - ldr r0, [r5, #0x20] - ldr r1, _0225646C ; =0x022565E8 - add r2, #0x28 - bl ov25_02255810 - str r0, [r5, #0x24] - ldr r0, [r4, #0] - cmp r0, #0 - bne _02256466 - ldr r0, [r5, #0x24] - mov r1, #1 - bl ov25_022558C4 -_02256466: - add sp, #0xc - pop {r4, r5, pc} - nop -_0225646C: .word 0x022565E8 - thumb_func_end ov37_0225641C - - thumb_func_start ov37_02256470 -ov37_02256470: ; 0x02256470 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - ldr r1, [r4, #0x24] - bl ov25_022558B0 - add r4, #0x28 - add r0, r4, #0 - bl ov25_022559B0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov37_02256470 - - thumb_func_start ov37_02256488 -ov37_02256488: ; 0x02256488 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _022564A8 ; =0x02256614 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022564A8: .word 0x02256614 - thumb_func_end ov37_02256488 - - thumb_func_start ov37_022564AC -ov37_022564AC: ; 0x022564AC - ldr r3, _022564B4 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022564B4: .word ov25_02255130 - thumb_func_end ov37_022564AC - - thumb_func_start ov37_022564B8 -ov37_022564B8: ; 0x022564B8 - ldr r3, _022564C0 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022564C0: .word ov25_02255154 - thumb_func_end ov37_022564B8 - - thumb_func_start ov37_022564C4 -ov37_022564C4: ; 0x022564C4 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov37_022564C4 - - thumb_func_start ov37_022564D8 -ov37_022564D8: ; 0x022564D8 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _0225655C ; =0x022565F8 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x65 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x64 - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256560 ; =0x04001000 - ldr r0, _02256564 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov37_022564C4 - add sp, #0x14 - pop {r4, r5, pc} - nop -_0225655C: .word 0x022565F8 -_02256560: .word 0x04001000 -_02256564: .word 0xFFFFE0FF - thumb_func_end ov37_022564D8 - - thumb_func_start ov37_02256568 -ov37_02256568: ; 0x02256568 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - bl ov37_02256470 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019044 - add r0, r5, #0 - bl ov37_022564C4 - pop {r3, r4, r5, pc} - thumb_func_end ov37_02256568 - - thumb_func_start ov37_02256588 -ov37_02256588: ; 0x02256588 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_0225523C - add r5, r0, #0 - add r0, r6, #0 - bl ov25_02255240 - add r4, r0, #0 - ldr r0, _022565D0 ; =0x00000663 - bl ov25_02254424 - ldr r0, [r4, #0] - cmp r0, #0 - ldr r0, [r5, #0x24] - beq _022565BA - mov r1, #0 - bl ov25_022558C4 - mov r0, #1 - add r1, r0, #0 - bl sub_020CB144 - b _022565C8 -_022565BA: - mov r1, #1 - bl ov25_022558C4 - mov r0, #1 - mov r1, #0 - bl sub_020CB144 -_022565C8: - add r0, r6, #0 - bl ov37_022564C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022565D0: .word 0x00000663 - thumb_func_end ov37_02256588 - ; 0x022565D4 - - .rodata - .incbin "incbin/overlay37_rodata.bin" + + + .global Unk_ov37_022565D4 +Unk_ov37_022565D4: ; 0x022565D4 + .incbin "incbin/overlay37_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov37_022565DC +Unk_ov37_022565DC: ; 0x022565DC + .incbin "incbin/overlay37_rodata.bin", 0x8, 0xC .section .sinit, 4 .word ov37_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov37_022563D4.s b/asm/ov37_022563D4.s new file mode 100644 index 000000000..0cc6ff171 --- /dev/null +++ b/asm/ov37_022563D4.s @@ -0,0 +1,287 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov37_022563D4 +ov37_022563D4: ; 0x022563D4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #8 + mov r1, #0x3c + bl sub_02018144 + add r4, r0, #0 + beq _0225640A + add r0, #8 + mov r1, #4 + bl ov25_02255090 + str r5, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + bl ov25_02254664 + str r0, [r4, #0x20] + add r0, r4, #0 + add r1, r5, #0 + bl ov37_0225641C + str r4, [r6, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_0225640A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov37_022563D4 + + thumb_func_start ov37_02256410 +ov37_02256410: ; 0x02256410 + push {r3, lr} + cmp r0, #0 + beq _0225641A + bl sub_020181C4 +_0225641A: + pop {r3, pc} + thumb_func_end ov37_02256410 + + thumb_func_start ov37_0225641C +ov37_0225641C: ; 0x0225641C + push {r4, r5, lr} + sub sp, #0xc + mov r3, #0 + str r3, [sp] + mov r2, #1 + add r5, r0, #0 + add r4, r1, #0 + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0x68 + bl sub_02006EC0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + add r0, #0x28 + mov r1, #0xc + mov r2, #0x66 + mov r3, #0x67 + bl ov25_02255958 + add r2, r5, #0 + ldr r0, [r5, #0x20] + ldr r1, _0225646C ; =0x022565E8 + add r2, #0x28 + bl ov25_02255810 + str r0, [r5, #0x24] + ldr r0, [r4, #0] + cmp r0, #0 + bne _02256466 + ldr r0, [r5, #0x24] + mov r1, #1 + bl ov25_022558C4 +_02256466: + add sp, #0xc + pop {r4, r5, pc} + nop +_0225646C: .word 0x022565E8 + thumb_func_end ov37_0225641C + + thumb_func_start ov37_02256470 +ov37_02256470: ; 0x02256470 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + ldr r1, [r4, #0x24] + bl ov25_022558B0 + add r4, #0x28 + add r0, r4, #0 + bl ov25_022559B0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov37_02256470 + + thumb_func_start ov37_02256488 +ov37_02256488: ; 0x02256488 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _022564A8 ; =0x02256614 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022564A8: .word 0x02256614 + thumb_func_end ov37_02256488 + + thumb_func_start ov37_022564AC +ov37_022564AC: ; 0x022564AC + ldr r3, _022564B4 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022564B4: .word ov25_02255130 + thumb_func_end ov37_022564AC + + thumb_func_start ov37_022564B8 +ov37_022564B8: ; 0x022564B8 + ldr r3, _022564C0 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022564C0: .word ov25_02255154 + thumb_func_end ov37_022564B8 + + thumb_func_start ov37_022564C4 +ov37_022564C4: ; 0x022564C4 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov37_022564C4 + + thumb_func_start ov37_022564D8 +ov37_022564D8: ; 0x022564D8 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _0225655C ; =0x022565F8 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x65 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x64 + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256560 ; =0x04001000 + ldr r0, _02256564 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov37_022564C4 + add sp, #0x14 + pop {r4, r5, pc} + nop +_0225655C: .word 0x022565F8 +_02256560: .word 0x04001000 +_02256564: .word 0xFFFFE0FF + thumb_func_end ov37_022564D8 + + thumb_func_start ov37_02256568 +ov37_02256568: ; 0x02256568 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + bl ov37_02256470 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019044 + add r0, r5, #0 + bl ov37_022564C4 + pop {r3, r4, r5, pc} + thumb_func_end ov37_02256568 + + thumb_func_start ov37_02256588 +ov37_02256588: ; 0x02256588 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_0225523C + add r5, r0, #0 + add r0, r6, #0 + bl ov25_02255240 + add r4, r0, #0 + ldr r0, _022565D0 ; =0x00000663 + bl ov25_02254424 + ldr r0, [r4, #0] + cmp r0, #0 + ldr r0, [r5, #0x24] + beq _022565BA + mov r1, #0 + bl ov25_022558C4 + mov r0, #1 + add r1, r0, #0 + bl sub_020CB144 + b _022565C8 +_022565BA: + mov r1, #1 + bl ov25_022558C4 + mov r0, #1 + mov r1, #0 + bl sub_020CB144 +_022565C8: + add r0, r6, #0 + bl ov37_022564C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022565D0: .word 0x00000663 + thumb_func_end ov37_02256588 + + .rodata + + + .global Unk_ov37_022565E8 +Unk_ov37_022565E8: ; 0x022565E8 + .incbin "incbin/overlay37_rodata.bin", 0x14, 0x24 - 0x14 + + .global Unk_ov37_022565F8 +Unk_ov37_022565F8: ; 0x022565F8 + .incbin "incbin/overlay37_rodata.bin", 0x24, 0x40 - 0x24 + + .global Unk_ov37_02256614 +Unk_ov37_02256614: ; 0x02256614 + .incbin "incbin/overlay37_rodata.bin", 0x40, 0x30 + diff --git a/asm/overlay38.s b/asm/ov38_022561C0.s similarity index 55% rename from asm/overlay38.s rename to asm/ov38_022561C0.s index b7ed9d6c1..81d63dad2 100644 --- a/asm/overlay38.s +++ b/asm/ov38_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov38_022561C0 ov38_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -217,187 +220,12 @@ _02256326: ; .align 2, 0 thumb_func_end ov38_022562F8 - thumb_func_start ov38_0225632C -ov38_0225632C: ; 0x0225632C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - beq _02256358 - add r0, #8 - mov r1, #8 - bl ov25_02255090 - str r6, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - cmp r0, #0 - beq _02256358 - str r4, [r5, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256358: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov38_0225632C - - thumb_func_start ov38_0225635C -ov38_0225635C: ; 0x0225635C - push {r3, lr} - cmp r0, #0 - beq _02256366 - bl sub_020181C4 -_02256366: - pop {r3, pc} - thumb_func_end ov38_0225635C - - thumb_func_start ov38_02256368 -ov38_02256368: ; 0x02256368 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _02256388 ; =0x0225649C - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_02256388: .word 0x0225649C - thumb_func_end ov38_02256368 - - thumb_func_start ov38_0225638C -ov38_0225638C: ; 0x0225638C - ldr r3, _02256394 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_02256394: .word ov25_02255130 - thumb_func_end ov38_0225638C - - thumb_func_start ov38_02256398 -ov38_02256398: ; 0x02256398 - ldr r3, _022563A0 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022563A0: .word ov25_02255154 - thumb_func_end ov38_02256398 - - thumb_func_start ov38_022563A4 -ov38_022563A4: ; 0x022563A4 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov38_022563A4 - - thumb_func_start ov38_022563B8 -ov38_022563B8: ; 0x022563B8 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _0225644C ; =0x02256480 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #8 - str r1, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r3, #6 - bl sub_02006E3C - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r5, #4] - mov r1, #6 - add r3, r2, #0 - bl sub_02019CB8 - mov r0, #0x20 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #0xc - mov r1, #9 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - ldr r0, [r5, #4] - mov r1, #0xc - mov r2, #6 - bl ov25_02255440 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256450 ; =0x04001000 - ldr r0, _02256454 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov38_022563A4 - add sp, #0x14 - pop {r4, r5, pc} - nop -_0225644C: .word 0x02256480 -_02256450: .word 0x04001000 -_02256454: .word 0xFFFFE0FF - thumb_func_end ov38_022563B8 - - thumb_func_start ov38_02256458 -ov38_02256458: ; 0x02256458 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov38_022563A4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov38_02256458 - ; 0x02256474 - - .rodata - .incbin "incbin/overlay38_rodata.bin" + + + .global Unk_ov38_02256474 +Unk_ov38_02256474: ; 0x02256474 + .incbin "incbin/overlay38_rodata.bin", 0x0, 0xC .section .sinit, 4 .word ov38_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov38_0225632C.s b/asm/ov38_0225632C.s new file mode 100644 index 000000000..098d314d8 --- /dev/null +++ b/asm/ov38_0225632C.s @@ -0,0 +1,193 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov38_0225632C +ov38_0225632C: ; 0x0225632C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + beq _02256358 + add r0, #8 + mov r1, #8 + bl ov25_02255090 + str r6, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + cmp r0, #0 + beq _02256358 + str r4, [r5, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256358: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov38_0225632C + + thumb_func_start ov38_0225635C +ov38_0225635C: ; 0x0225635C + push {r3, lr} + cmp r0, #0 + beq _02256366 + bl sub_020181C4 +_02256366: + pop {r3, pc} + thumb_func_end ov38_0225635C + + thumb_func_start ov38_02256368 +ov38_02256368: ; 0x02256368 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _02256388 ; =0x0225649C + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_02256388: .word 0x0225649C + thumb_func_end ov38_02256368 + + thumb_func_start ov38_0225638C +ov38_0225638C: ; 0x0225638C + ldr r3, _02256394 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_02256394: .word ov25_02255130 + thumb_func_end ov38_0225638C + + thumb_func_start ov38_02256398 +ov38_02256398: ; 0x02256398 + ldr r3, _022563A0 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022563A0: .word ov25_02255154 + thumb_func_end ov38_02256398 + + thumb_func_start ov38_022563A4 +ov38_022563A4: ; 0x022563A4 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov38_022563A4 + + thumb_func_start ov38_022563B8 +ov38_022563B8: ; 0x022563B8 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _0225644C ; =0x02256480 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #8 + str r1, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r3, #6 + bl sub_02006E3C + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r5, #4] + mov r1, #6 + add r3, r2, #0 + bl sub_02019CB8 + mov r0, #0x20 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #0xc + mov r1, #9 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + ldr r0, [r5, #4] + mov r1, #0xc + mov r2, #6 + bl ov25_02255440 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256450 ; =0x04001000 + ldr r0, _02256454 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov38_022563A4 + add sp, #0x14 + pop {r4, r5, pc} + nop +_0225644C: .word 0x02256480 +_02256450: .word 0x04001000 +_02256454: .word 0xFFFFE0FF + thumb_func_end ov38_022563B8 + + thumb_func_start ov38_02256458 +ov38_02256458: ; 0x02256458 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov38_022563A4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov38_02256458 + + .rodata + + + .global Unk_ov38_02256480 +Unk_ov38_02256480: ; 0x02256480 + .incbin "incbin/overlay38_rodata.bin", 0xC, 0x28 - 0xC + + .global Unk_ov38_0225649C +Unk_ov38_0225649C: ; 0x0225649C + .incbin "incbin/overlay38_rodata.bin", 0x28, 0x24 + diff --git a/asm/overlay39.s b/asm/ov39_022561C0.s similarity index 52% rename from asm/overlay39.s rename to asm/ov39_022561C0.s index 174e4b193..88ac25f0d 100644 --- a/asm/overlay39.s +++ b/asm/ov39_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov39_022561C0 ov39_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -306,295 +309,16 @@ _022563D6: ; .align 2, 0 thumb_func_end ov39_022563A8 - thumb_func_start ov39_022563DC -ov39_022563DC: ; 0x022563DC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x20 - bl sub_02018144 - add r4, r0, #0 - beq _02256408 - add r0, #8 - mov r1, #4 - bl ov25_02255090 - str r6, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - cmp r0, #0 - beq _02256408 - str r4, [r5, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256408: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov39_022563DC - - thumb_func_start ov39_0225640C -ov39_0225640C: ; 0x0225640C - push {r3, lr} - cmp r0, #0 - beq _02256416 - bl sub_020181C4 -_02256416: - pop {r3, pc} - thumb_func_end ov39_0225640C - - thumb_func_start ov39_02256418 -ov39_02256418: ; 0x02256418 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _02256438 ; =0x0225663C - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_02256438: .word 0x0225663C - thumb_func_end ov39_02256418 - - thumb_func_start ov39_0225643C -ov39_0225643C: ; 0x0225643C - ldr r3, _02256444 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_02256444: .word ov25_02255130 - thumb_func_end ov39_0225643C - - thumb_func_start ov39_02256448 -ov39_02256448: ; 0x02256448 - ldr r3, _02256450 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_02256450: .word ov25_02255154 - thumb_func_end ov39_02256448 - - thumb_func_start ov39_02256454 -ov39_02256454: ; 0x02256454 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov39_02256454 - - thumb_func_start ov39_02256468 -ov39_02256468: ; 0x02256468 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0x10] - add r0, r1, #0 - bl ov25_0225523C - add r6, r0, #0 - ldr r0, [sp, #0x10] - bl ov25_02255240 - add r5, r0, #0 - ldr r0, [r6, #4] - ldr r2, _0225650C ; =0x02256620 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r6, #4] - mov r0, #0xc - mov r1, #0x3b - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r6, #4] - mov r0, #0xc - mov r1, #0x3a - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - mov r4, #0 - add r7, r4, #0 -_022564CA: - ldr r2, [r5, #4] - add r0, r6, #0 - add r1, r4, #0 - add r3, r7, #0 - bl ov39_0225659C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _022564CA - ldr r0, [r6, #4] - mov r1, #6 - bl sub_02019448 - ldr r0, _02256510 ; =0x04001000 - ldr r1, _02256514 ; =0xFFFFE0FF - ldr r2, [r0, #0] - ldr r4, [r0, #0] - add r3, r2, #0 - and r3, r1 - lsl r1, r4, #0x13 - lsr r2, r1, #0x1b - mov r1, #4 - orr r1, r2 - lsl r1, r1, #8 - orr r1, r3 - str r1, [r0, #0] - ldr r0, [sp, #0x10] - str r4, [sp, #0x14] - bl ov39_02256454 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225650C: .word 0x02256620 -_02256510: .word 0x04001000 -_02256514: .word 0xFFFFE0FF - thumb_func_end ov39_02256468 - - thumb_func_start ov39_02256518 -ov39_02256518: ; 0x02256518 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov39_02256454 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov39_02256518 - - thumb_func_start ov39_02256534 -ov39_02256534: ; 0x02256534 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r3, r0, #0 - ldrh r1, [r3, #0x1c] - add r0, r4, #0 - lsl r2, r1, #2 - add r2, r3, r2 - ldr r2, [r2, #4] - mov r3, #1 - bl ov39_0225659C - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r5, #0 - bl ov39_02256454 - pop {r3, r4, r5, pc} - thumb_func_end ov39_02256534 - - thumb_func_start ov39_02256568 -ov39_02256568: ; 0x02256568 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r3, r0, #0 - ldrh r1, [r3, #0x1c] - add r0, r4, #0 - lsl r2, r1, #2 - add r2, r3, r2 - ldr r2, [r2, #4] - mov r3, #0 - bl ov39_0225659C - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r5, #0 - bl ov39_02256454 - pop {r3, r4, r5, pc} - thumb_func_end ov39_02256568 - - thumb_func_start ov39_0225659C -ov39_0225659C: ; 0x0225659C - push {r4, r5, r6, lr} - ldr r0, [r0, #4] - add r5, r1, #0 - mov r1, #6 - add r4, r2, #0 - add r6, r3, #0 - bl sub_02019FE4 - ldr r1, _022565EC ; =0x02256614 - lsl r2, r5, #1 - ldrh r1, [r1, r2] - lsl r1, r1, #1 - add r2, r0, r1 - cmp r4, #0 - beq _022565C4 - add r1, r5, #1 - mov r0, #0x48 - add r5, r1, #0 - mul r5, r0 - b _022565C6 -_022565C4: - mov r5, #0 -_022565C6: - cmp r6, #0 - beq _022565CC - add r5, #0x24 -_022565CC: - mov r3, #0 - add r0, r3, #0 -_022565D0: - add r1, r0, #0 - add r4, r2, #0 -_022565D4: - add r1, r1, #1 - strh r5, [r4] - add r5, r5, #1 - add r4, r4, #2 - cmp r1, #6 - blt _022565D4 - add r3, r3, #1 - add r2, #0x40 - cmp r3, #6 - blt _022565D0 - pop {r4, r5, r6, pc} - nop -_022565EC: .word 0x02256614 - thumb_func_end ov39_0225659C - ; 0x022565F0 - - .rodata - .incbin "incbin/overlay39_rodata.bin" + + + .global Unk_ov39_022565F0 +Unk_ov39_022565F0: ; 0x022565F0 + .incbin "incbin/overlay39_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov39_022565FC +Unk_ov39_022565FC: ; 0x022565FC + .incbin "incbin/overlay39_rodata.bin", 0xC, 0x18 .section .sinit, 4 .word ov39_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov39_022563DC.s b/asm/ov39_022563DC.s new file mode 100644 index 000000000..bfd706f6b --- /dev/null +++ b/asm/ov39_022563DC.s @@ -0,0 +1,305 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov39_022563DC +ov39_022563DC: ; 0x022563DC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x20 + bl sub_02018144 + add r4, r0, #0 + beq _02256408 + add r0, #8 + mov r1, #4 + bl ov25_02255090 + str r6, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + cmp r0, #0 + beq _02256408 + str r4, [r5, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256408: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov39_022563DC + + thumb_func_start ov39_0225640C +ov39_0225640C: ; 0x0225640C + push {r3, lr} + cmp r0, #0 + beq _02256416 + bl sub_020181C4 +_02256416: + pop {r3, pc} + thumb_func_end ov39_0225640C + + thumb_func_start ov39_02256418 +ov39_02256418: ; 0x02256418 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _02256438 ; =0x0225663C + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_02256438: .word 0x0225663C + thumb_func_end ov39_02256418 + + thumb_func_start ov39_0225643C +ov39_0225643C: ; 0x0225643C + ldr r3, _02256444 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_02256444: .word ov25_02255130 + thumb_func_end ov39_0225643C + + thumb_func_start ov39_02256448 +ov39_02256448: ; 0x02256448 + ldr r3, _02256450 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_02256450: .word ov25_02255154 + thumb_func_end ov39_02256448 + + thumb_func_start ov39_02256454 +ov39_02256454: ; 0x02256454 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov39_02256454 + + thumb_func_start ov39_02256468 +ov39_02256468: ; 0x02256468 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0x10] + add r0, r1, #0 + bl ov25_0225523C + add r6, r0, #0 + ldr r0, [sp, #0x10] + bl ov25_02255240 + add r5, r0, #0 + ldr r0, [r6, #4] + ldr r2, _0225650C ; =0x02256620 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r6, #4] + mov r0, #0xc + mov r1, #0x3b + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r6, #4] + mov r0, #0xc + mov r1, #0x3a + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + mov r4, #0 + add r7, r4, #0 +_022564CA: + ldr r2, [r5, #4] + add r0, r6, #0 + add r1, r4, #0 + add r3, r7, #0 + bl ov39_0225659C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _022564CA + ldr r0, [r6, #4] + mov r1, #6 + bl sub_02019448 + ldr r0, _02256510 ; =0x04001000 + ldr r1, _02256514 ; =0xFFFFE0FF + ldr r2, [r0, #0] + ldr r4, [r0, #0] + add r3, r2, #0 + and r3, r1 + lsl r1, r4, #0x13 + lsr r2, r1, #0x1b + mov r1, #4 + orr r1, r2 + lsl r1, r1, #8 + orr r1, r3 + str r1, [r0, #0] + ldr r0, [sp, #0x10] + str r4, [sp, #0x14] + bl ov39_02256454 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225650C: .word 0x02256620 +_02256510: .word 0x04001000 +_02256514: .word 0xFFFFE0FF + thumb_func_end ov39_02256468 + + thumb_func_start ov39_02256518 +ov39_02256518: ; 0x02256518 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov39_02256454 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov39_02256518 + + thumb_func_start ov39_02256534 +ov39_02256534: ; 0x02256534 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r3, r0, #0 + ldrh r1, [r3, #0x1c] + add r0, r4, #0 + lsl r2, r1, #2 + add r2, r3, r2 + ldr r2, [r2, #4] + mov r3, #1 + bl ov39_0225659C + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r5, #0 + bl ov39_02256454 + pop {r3, r4, r5, pc} + thumb_func_end ov39_02256534 + + thumb_func_start ov39_02256568 +ov39_02256568: ; 0x02256568 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r3, r0, #0 + ldrh r1, [r3, #0x1c] + add r0, r4, #0 + lsl r2, r1, #2 + add r2, r3, r2 + ldr r2, [r2, #4] + mov r3, #0 + bl ov39_0225659C + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + add r0, r5, #0 + bl ov39_02256454 + pop {r3, r4, r5, pc} + thumb_func_end ov39_02256568 + + thumb_func_start ov39_0225659C +ov39_0225659C: ; 0x0225659C + push {r4, r5, r6, lr} + ldr r0, [r0, #4] + add r5, r1, #0 + mov r1, #6 + add r4, r2, #0 + add r6, r3, #0 + bl sub_02019FE4 + ldr r1, _022565EC ; =0x02256614 + lsl r2, r5, #1 + ldrh r1, [r1, r2] + lsl r1, r1, #1 + add r2, r0, r1 + cmp r4, #0 + beq _022565C4 + add r1, r5, #1 + mov r0, #0x48 + add r5, r1, #0 + mul r5, r0 + b _022565C6 +_022565C4: + mov r5, #0 +_022565C6: + cmp r6, #0 + beq _022565CC + add r5, #0x24 +_022565CC: + mov r3, #0 + add r0, r3, #0 +_022565D0: + add r1, r0, #0 + add r4, r2, #0 +_022565D4: + add r1, r1, #1 + strh r5, [r4] + add r5, r5, #1 + add r4, r4, #2 + cmp r1, #6 + blt _022565D4 + add r3, r3, #1 + add r2, #0x40 + cmp r3, #6 + blt _022565D0 + pop {r4, r5, r6, pc} + nop +_022565EC: .word 0x02256614 + thumb_func_end ov39_0225659C + + .rodata + + + .global Unk_ov39_02256614 +Unk_ov39_02256614: ; 0x02256614 + .incbin "incbin/overlay39_rodata.bin", 0x24, 0x30 - 0x24 + + .global Unk_ov39_02256620 +Unk_ov39_02256620: ; 0x02256620 + .incbin "incbin/overlay39_rodata.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov39_0225663C +Unk_ov39_0225663C: ; 0x0225663C + .incbin "incbin/overlay39_rodata.bin", 0x4C, 0x3C + diff --git a/asm/ov40_022561C0.s b/asm/ov40_022561C0.s new file mode 100644 index 000000000..5173e2b04 --- /dev/null +++ b/asm/ov40_022561C0.s @@ -0,0 +1,381 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov40_022561C0 +ov40_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov40_022561D4 + ldr r1, _022561D0 ; =ov40_022562A4 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov40_022561D4 +_022561D0: .word ov40_022562A4 + thumb_func_end ov40_022561C0 + + thumb_func_start ov40_022561D4 +ov40_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x34 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov40_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov40_02256270 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov40_02256270 + thumb_func_end ov40_022561D4 + + thumb_func_start ov40_0225621C +ov40_0225621C: ; 0x0225621C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r6, r2, #0 + bl ov25_02254544 + bl sub_02026310 + str r0, [r5, #0x30] + ldr r1, [r5, #0x30] + add r0, r5, #4 + bl ov40_022563D0 + add r0, r5, #0 + add r0, #0x28 + add r1, r5, #4 + add r2, r6, #0 + bl ov40_0225645C + cmp r0, #0 + beq _02256256 + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + str r4, [r5, #0x2c] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256256: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov40_0225621C + + thumb_func_start ov40_0225625C +ov40_0225625C: ; 0x0225625C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + bl ov40_022564B8 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov40_0225625C + + thumb_func_start ov40_02256270 +ov40_02256270: ; 0x02256270 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #3 + bhs _0225629C + lsl r2, r1, #2 + ldr r1, _022562A0 ; =0x02256A38 + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _0225629C + add r0, r4, #0 + bl ov40_0225625C + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x2c] + bl ov25_02254260 +_0225629C: + pop {r3, r4, r5, pc} + nop +_022562A0: .word 0x02256A38 + thumb_func_end ov40_02256270 + + thumb_func_start ov40_022562A4 +ov40_022562A4: ; 0x022562A4 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov40_022562A4 + + thumb_func_start ov40_022562AC +ov40_022562AC: ; 0x022562AC + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562B4 + b _022562B6 +_022562B4: + mov r1, #2 +_022562B6: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov40_022562AC + + thumb_func_start ov40_022562C0 +ov40_022562C0: ; 0x022562C0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022562D0 + cmp r0, #1 + beq _022562E0 + b _022562FA +_022562D0: + ldr r0, [r4, #0x28] + mov r1, #0 + bl ov40_022565C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022562FA +_022562E0: + ldr r0, [r4, #0x28] + mov r1, #0 + bl ov40_022565EC + cmp r0, #0 + beq _022562FA + ldr r0, [r4, #0x2c] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov40_022562AC +_022562FA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov40_022562C0 + + thumb_func_start ov40_02256300 +ov40_02256300: ; 0x02256300 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256314 + mov r1, #2 + bl ov40_022562AC + mov r0, #0 + pop {r4, pc} +_02256314: + ldrb r1, [r4, #1] + cmp r1, #0 + beq _02256320 + cmp r1, #1 + beq _02256340 + b _02256350 +_02256320: + bl ov40_02256388 + cmp r0, #0 + beq _02256350 + ldr r1, [r4, #0x30] + add r0, r4, #4 + bl ov40_022563D0 + ldr r0, [r4, #0x28] + mov r1, #2 + bl ov40_022565C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256350 +_02256340: + ldr r0, [r4, #0x28] + mov r1, #2 + bl ov40_022565EC + cmp r0, #0 + beq _02256350 + mov r0, #0 + strb r0, [r4, #1] +_02256350: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov40_02256300 + + thumb_func_start ov40_02256354 +ov40_02256354: ; 0x02256354 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256364 + cmp r0, #1 + beq _02256374 + b _02256382 +_02256364: + ldr r0, [r4, #0x28] + mov r1, #1 + bl ov40_022565C8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256382 +_02256374: + ldr r0, [r4, #0x28] + bl ov40_022565F8 + cmp r0, #0 + beq _02256382 + mov r0, #1 + pop {r4, pc} +_02256382: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov40_02256354 + + thumb_func_start ov40_02256388 +ov40_02256388: ; 0x02256388 + push {r3, lr} + sub sp, #8 + ldr r0, [r0, #0x2c] + bl ov25_0225450C + cmp r0, #0 + bne _022563C8 + add r0, sp, #4 + add r1, sp, #0 + bl sub_020227C0 + cmp r0, #0 + beq _022563C8 + ldr r0, [sp, #4] + sub r0, #0x10 + cmp r0, #0xbf + bhs _022563AE + mov r1, #1 + b _022563B0 +_022563AE: + mov r1, #0 +_022563B0: + ldr r0, [sp] + sub r0, #0x10 + cmp r0, #0x9f + bhs _022563BC + mov r0, #1 + b _022563BE +_022563BC: + mov r0, #0 +_022563BE: + tst r0, r1 + beq _022563C8 + add sp, #8 + mov r0, #1 + pop {r3, pc} +_022563C8: + mov r0, #0 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov40_02256388 + + thumb_func_start ov40_022563D0 +ov40_022563D0: ; 0x022563D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + add r0, r1, #0 + str r1, [sp, #4] + bl ov5_021E6238 + ldr r1, [sp] + strb r0, [r1] + ldr r0, [sp, #4] + bl sub_02026234 + ldr r1, [sp] + mov r7, #0 + strb r0, [r1, #1] + add r0, r1, #0 + ldrb r0, [r0] + cmp r0, #0 + ble _02256456 + add r5, r1, #0 + add r6, r1, #0 +_022563FA: + ldr r0, [sp, #4] + add r1, r7, #0 + bl sub_02026218 + str r0, [sp, #8] + bl sub_02026220 + add r4, r0, #0 + bl sub_02073D20 + str r0, [sp, #0xc] + add r0, r4, #0 + bl sub_02079D40 + str r0, [r5, #4] + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + strh r0, [r6, #0x1c] + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + strh r0, [r6, #0x20] + ldr r0, [sp, #8] + bl ov5_021E6590 + str r0, [r5, #0xc] + add r0, r4, #0 + bl sub_02075D74 + str r0, [r5, #0x14] + ldr r1, [sp, #0xc] + add r0, r4, #0 + bl sub_02073D48 + ldr r0, [sp] + add r7, r7, #1 + ldrb r0, [r0] + add r5, r5, #4 + add r6, r6, #2 + cmp r7, r0 + blt _022563FA +_02256456: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov40_022563D0 + + .rodata + + + .global Unk_ov40_02256A38 +Unk_ov40_02256A38: ; 0x02256A38 + .incbin "incbin/overlay40_rodata.bin", 0x0, 0xC + + .section .sinit, 4 + .word ov40_022561C0 diff --git a/asm/overlay40.s b/asm/ov40_0225645C.s similarity index 67% rename from asm/overlay40.s rename to asm/ov40_0225645C.s index 7b7c0fe97..3beb828c0 100644 --- a/asm/overlay40.s +++ b/asm/ov40_0225645C.s @@ -1,371 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov40_022561C0 -ov40_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov40_022561D4 - ldr r1, _022561D0 ; =ov40_022562A4 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov40_022561D4 -_022561D0: .word ov40_022562A4 - thumb_func_end ov40_022561C0 - - thumb_func_start ov40_022561D4 -ov40_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x34 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov40_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov40_02256270 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov40_02256270 - thumb_func_end ov40_022561D4 - - thumb_func_start ov40_0225621C -ov40_0225621C: ; 0x0225621C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r6, r2, #0 - bl ov25_02254544 - bl sub_02026310 - str r0, [r5, #0x30] - ldr r1, [r5, #0x30] - add r0, r5, #4 - bl ov40_022563D0 - add r0, r5, #0 - add r0, #0x28 - add r1, r5, #4 - add r2, r6, #0 - bl ov40_0225645C - cmp r0, #0 - beq _02256256 - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - str r4, [r5, #0x2c] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256256: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov40_0225621C - - thumb_func_start ov40_0225625C -ov40_0225625C: ; 0x0225625C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl ov40_022564B8 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov40_0225625C - - thumb_func_start ov40_02256270 -ov40_02256270: ; 0x02256270 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #3 - bhs _0225629C - lsl r2, r1, #2 - ldr r1, _022562A0 ; =0x02256A38 - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _0225629C - add r0, r4, #0 - bl ov40_0225625C - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x2c] - bl ov25_02254260 -_0225629C: - pop {r3, r4, r5, pc} - nop -_022562A0: .word 0x02256A38 - thumb_func_end ov40_02256270 - - thumb_func_start ov40_022562A4 -ov40_022562A4: ; 0x022562A4 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov40_022562A4 - - thumb_func_start ov40_022562AC -ov40_022562AC: ; 0x022562AC - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562B4 - b _022562B6 -_022562B4: - mov r1, #2 -_022562B6: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov40_022562AC - - thumb_func_start ov40_022562C0 -ov40_022562C0: ; 0x022562C0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022562D0 - cmp r0, #1 - beq _022562E0 - b _022562FA -_022562D0: - ldr r0, [r4, #0x28] - mov r1, #0 - bl ov40_022565C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022562FA -_022562E0: - ldr r0, [r4, #0x28] - mov r1, #0 - bl ov40_022565EC - cmp r0, #0 - beq _022562FA - ldr r0, [r4, #0x2c] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov40_022562AC -_022562FA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov40_022562C0 - - thumb_func_start ov40_02256300 -ov40_02256300: ; 0x02256300 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256314 - mov r1, #2 - bl ov40_022562AC - mov r0, #0 - pop {r4, pc} -_02256314: - ldrb r1, [r4, #1] - cmp r1, #0 - beq _02256320 - cmp r1, #1 - beq _02256340 - b _02256350 -_02256320: - bl ov40_02256388 - cmp r0, #0 - beq _02256350 - ldr r1, [r4, #0x30] - add r0, r4, #4 - bl ov40_022563D0 - ldr r0, [r4, #0x28] - mov r1, #2 - bl ov40_022565C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256350 -_02256340: - ldr r0, [r4, #0x28] - mov r1, #2 - bl ov40_022565EC - cmp r0, #0 - beq _02256350 - mov r0, #0 - strb r0, [r4, #1] -_02256350: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov40_02256300 - - thumb_func_start ov40_02256354 -ov40_02256354: ; 0x02256354 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256364 - cmp r0, #1 - beq _02256374 - b _02256382 -_02256364: - ldr r0, [r4, #0x28] - mov r1, #1 - bl ov40_022565C8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256382 -_02256374: - ldr r0, [r4, #0x28] - bl ov40_022565F8 - cmp r0, #0 - beq _02256382 - mov r0, #1 - pop {r4, pc} -_02256382: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov40_02256354 - - thumb_func_start ov40_02256388 -ov40_02256388: ; 0x02256388 - push {r3, lr} - sub sp, #8 - ldr r0, [r0, #0x2c] - bl ov25_0225450C - cmp r0, #0 - bne _022563C8 - add r0, sp, #4 - add r1, sp, #0 - bl sub_020227C0 - cmp r0, #0 - beq _022563C8 - ldr r0, [sp, #4] - sub r0, #0x10 - cmp r0, #0xbf - bhs _022563AE - mov r1, #1 - b _022563B0 -_022563AE: - mov r1, #0 -_022563B0: - ldr r0, [sp] - sub r0, #0x10 - cmp r0, #0x9f - bhs _022563BC - mov r0, #1 - b _022563BE -_022563BC: - mov r0, #0 -_022563BE: - tst r0, r1 - beq _022563C8 - add sp, #8 - mov r0, #1 - pop {r3, pc} -_022563C8: - mov r0, #0 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov40_02256388 - - thumb_func_start ov40_022563D0 -ov40_022563D0: ; 0x022563D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - add r0, r1, #0 - str r1, [sp, #4] - bl ov5_021E6238 - ldr r1, [sp] - strb r0, [r1] - ldr r0, [sp, #4] - bl sub_02026234 - ldr r1, [sp] - mov r7, #0 - strb r0, [r1, #1] - add r0, r1, #0 - ldrb r0, [r0] - cmp r0, #0 - ble _02256456 - add r5, r1, #0 - add r6, r1, #0 -_022563FA: - ldr r0, [sp, #4] - add r1, r7, #0 - bl sub_02026218 - str r0, [sp, #8] - bl sub_02026220 - add r4, r0, #0 - bl sub_02073D20 - str r0, [sp, #0xc] - add r0, r4, #0 - bl sub_02079D40 - str r0, [r5, #4] - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - strh r0, [r6, #0x1c] - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - strh r0, [r6, #0x20] - ldr r0, [sp, #8] - bl ov5_021E6590 - str r0, [r5, #0xc] - add r0, r4, #0 - bl sub_02075D74 - str r0, [r5, #0x14] - ldr r1, [sp, #0xc] - add r0, r4, #0 - bl sub_02073D48 - ldr r0, [sp] - add r7, r7, #1 - ldrb r0, [r0] - add r5, r5, #4 - add r6, r6, #2 - cmp r7, r0 - blt _022563FA -_02256456: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov40_022563D0 thumb_func_start ov40_0225645C ov40_0225645C: ; 0x0225645C @@ -1133,14 +772,19 @@ _02256A30: bl ov25_022558C4 pop {r3, pc} thumb_func_end ov40_02256A14 - ; 0x02256A38 - .rodata - .incbin "incbin/overlay40_rodata.bin" - .section .sinit, 4 - .word ov40_022561C0 - .bss - .space 0x0 + .global Unk_ov40_02256A44 +Unk_ov40_02256A44: ; 0x02256A44 + .incbin "incbin/overlay40_rodata.bin", 0xC, 0x28 - 0xC + + .global Unk_ov40_02256A60 +Unk_ov40_02256A60: ; 0x02256A60 + .incbin "incbin/overlay40_rodata.bin", 0x28, 0x58 - 0x28 + + .global Unk_ov40_02256A90 +Unk_ov40_02256A90: ; 0x02256A90 + .incbin "incbin/overlay40_rodata.bin", 0x58, 0xB0 + diff --git a/asm/overlay41.s b/asm/ov41_022561C0.s similarity index 52% rename from asm/overlay41.s rename to asm/ov41_022561C0.s index 79d1816b5..1480d174c 100644 --- a/asm/overlay41.s +++ b/asm/ov41_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov41_022561C0 ov41_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -818,753 +821,16 @@ _0225679A: bx lr thumb_func_end ov41_02256790 - thumb_func_start ov41_022567B0 -ov41_022567B0: ; 0x022567B0 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #8 - mov r1, #0x70 - bl sub_02018144 - add r4, r0, #0 - beq _022567F4 - add r0, #8 - mov r1, #4 - bl ov25_02255090 - str r5, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - bl ov25_02254664 - str r0, [r4, #0x20] - add r0, r4, #0 - mov r1, #0 - add r0, #0x68 - strh r1, [r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov41_0225680C - ldr r0, [r4, #4] - cmp r0, #0 - beq _022567F4 - str r4, [r6, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_022567F4: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov41_022567B0 - - thumb_func_start ov41_022567F8 -ov41_022567F8: ; 0x022567F8 - push {r4, lr} - add r4, r0, #0 - beq _02256808 - bl ov41_02256864 - add r0, r4, #0 - bl sub_020181C4 -_02256808: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov41_022567F8 - - thumb_func_start ov41_0225680C -ov41_0225680C: ; 0x0225680C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r3, #0 - str r3, [sp] - mov r2, #1 - add r7, r0, #0 - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0x59 - bl sub_02006EC0 - mov r0, #8 - str r0, [sp] - add r0, r7, #0 - add r0, #0x34 - mov r1, #0xc - mov r2, #0x57 - mov r3, #0x58 - bl ov25_02255958 - add r0, r7, #0 - str r0, [sp, #0xc] - add r0, #0x34 - ldr r4, _02256860 ; =0x02256DC0 - mov r6, #0 - add r5, r7, #0 - str r0, [sp, #0xc] -_02256846: - ldr r0, [r7, #0x20] - ldr r2, [sp, #0xc] - add r1, r4, #0 - bl ov25_02255810 - str r0, [r5, #0x24] - add r6, r6, #1 - add r4, #0x10 - add r5, r5, #4 - cmp r6, #4 - blt _02256846 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02256860: .word 0x02256DC0 - thumb_func_end ov41_0225680C - - thumb_func_start ov41_02256864 -ov41_02256864: ; 0x02256864 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_0225686C: - ldr r1, [r5, #0x24] - cmp r1, #0 - beq _02256878 - ldr r0, [r6, #0x20] - bl ov25_022558B0 -_02256878: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0225686C - add r6, #0x34 - add r0, r6, #0 - bl ov25_022559B0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov41_02256864 - - thumb_func_start ov41_0225688C -ov41_0225688C: ; 0x0225688C - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _022568AC ; =0x02256E00 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022568AC: .word 0x02256E00 - thumb_func_end ov41_0225688C - - thumb_func_start ov41_022568B0 -ov41_022568B0: ; 0x022568B0 - ldr r3, _022568B8 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022568B8: .word ov25_02255130 - thumb_func_end ov41_022568B0 - - thumb_func_start ov41_022568BC -ov41_022568BC: ; 0x022568BC - ldr r3, _022568C4 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022568C4: .word ov25_02255154 - thumb_func_end ov41_022568BC - - thumb_func_start ov41_022568C8 -ov41_022568C8: ; 0x022568C8 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov41_022568C8 - - thumb_func_start ov41_022568DC -ov41_022568DC: ; 0x022568DC - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - mov r0, #8 - add r5, r1, #0 - bl sub_0201833C - cmp r0, #0 - bne _022568F0 - bl sub_02022974 -_022568F0: - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _022569AC ; =0x02256D88 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #4] - ldr r2, _022569B0 ; =0x02256DA4 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _0225691E - bl sub_02022974 -_0225691E: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0xc - mov r1, #0x56 - mov r3, #6 - bl sub_02006E3C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0xc - mov r1, #0x55 - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _0225696A - bl sub_02022974 -_0225696A: - add r0, r4, #0 - lsr r1, r6, #5 - bl ov41_022569BC - ldr r0, [r4, #4] - mov r1, #7 - bl sub_02019448 - ldr r1, _022569B4 ; =0x04001000 - ldr r0, _022569B8 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #0x14 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r5, #0 - bl ov41_022568C8 - mov r0, #8 - bl sub_0201833C - cmp r0, #0 - bne _022569A8 - bl sub_02022974 -_022569A8: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022569AC: .word 0x02256D88 -_022569B0: .word 0x02256DA4 -_022569B4: .word 0x04001000 -_022569B8: .word 0xFFFFE0FF - thumb_func_end ov41_022568DC - - thumb_func_start ov41_022569BC -ov41_022569BC: ; 0x022569BC - push {r3, r4, r5, lr} - sub sp, #8 - ldr r3, _02256A18 ; =0x02256D80 - add r4, r0, #0 - ldrh r5, [r3] - add r0, sp, #0 - add r2, sp, #0 - strh r5, [r0] - ldrh r5, [r3, #2] - strh r5, [r0, #2] - ldrh r5, [r3, #4] - ldrh r3, [r3, #6] - strh r5, [r0, #4] - strh r3, [r0, #6] - str r1, [r4, #0x58] - strh r1, [r0, #6] - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x48 - bl sub_0201A8D4 - ldr r0, [r4, #0] - mov r2, #0xbe - ldr r0, [r0, #8] - ldr r1, [r4, #0x54] - lsl r2, r2, #6 - bl sub_02099DD0 - cmp r0, #0 - bne _02256A02 - add r0, r4, #0 - add r0, #0x48 - mov r1, #4 - bl sub_0201ADA4 -_02256A02: - add r0, r4, #0 - add r0, #0x48 - bl sub_0201A9F4 - add r4, #0x48 - add r0, r4, #0 - bl sub_0201ACCC - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02256A18: .word 0x02256D80 - thumb_func_end ov41_022569BC - - thumb_func_start ov41_02256A1C -ov41_02256A1C: ; 0x02256A1C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255248 - cmp r0, #0 - beq _02256A38 - cmp r0, #1 - beq _02256A44 - pop {r3, r4, r5, pc} -_02256A38: - mov r0, #1 - str r0, [r4, #0x5c] - add r0, r5, #0 - bl ov25_0225524C - pop {r3, r4, r5, pc} -_02256A44: - ldr r0, [r4, #0] - mov r2, #0xbe - ldr r0, [r0, #8] - ldr r1, [r4, #0x54] - lsl r2, r2, #6 - bl sub_02099DA8 - add r0, r4, #0 - add r0, #0x48 - bl sub_0201A8FC - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #7 - bl sub_02019044 - add r0, r5, #0 - bl ov41_022568C8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov41_02256A1C - - thumb_func_start ov41_02256A74 -ov41_02256A74: ; 0x02256A74 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r0, #0x48 - bl sub_0201ACCC - add r0, r4, #0 - bl ov41_022568C8 - pop {r4, pc} - thumb_func_end ov41_02256A74 - - thumb_func_start ov41_02256A8C -ov41_02256A8C: ; 0x02256A8C - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r1, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - ldr r1, [r4, #0] - ldr r0, [r1, #0] - lsl r2, r0, #1 - ldr r0, [r1, #4] - mov r1, #0x14 - lsl r3, r0, #1 - asr r5, r3, #3 - asr r0, r2, #3 - mul r1, r5 - add r5, r0, r1 - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - add r0, r4, #0 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x48 - mov r1, #1 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 - ldr r1, [r4, #0x54] - lsl r0, r5, #5 - add r0, r1, r0 - ldr r1, [r4, #0x58] - mov r2, #0x20 - add r1, r1, r5 - lsl r1, r1, #5 - bl sub_020C090C - add r0, r6, #0 - bl ov41_022568C8 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov41_02256A8C - - thumb_func_start ov41_02256AE4 -ov41_02256AE4: ; 0x02256AE4 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r0, #0x48 - bl sub_0201ACCC - add r0, r4, #0 - bl ov41_022568C8 - pop {r4, pc} - thumb_func_end ov41_02256AE4 - - thumb_func_start ov41_02256AFC -ov41_02256AFC: ; 0x02256AFC - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - ldr r0, _02256B54 ; =0x00005B74 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _02256B1C - mov r1, #2 - b _02256B1E -_02256B1C: - mov r1, #1 -_02256B1E: - ldr r0, [r4, #0x28] - bl ov25_022558C4 - ldr r0, _02256B58 ; =0x00005B75 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _02256B30 - mov r1, #4 - b _02256B32 -_02256B30: - mov r1, #3 -_02256B32: - ldr r0, [r4, #0x2c] - bl ov25_022558C4 - ldr r0, _02256B5C ; =0x00005B76 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _02256B44 - mov r1, #6 - b _02256B46 -_02256B44: - mov r1, #5 -_02256B46: - ldr r0, [r4, #0x30] - bl ov25_022558C4 - add r0, r6, #0 - bl ov41_022568C8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02256B54: .word 0x00005B74 -_02256B58: .word 0x00005B75 -_02256B5C: .word 0x00005B76 - thumb_func_end ov41_02256AFC - - thumb_func_start ov41_02256B60 -ov41_02256B60: ; 0x02256B60 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r4, #0 - add r0, #0x48 - mov r1, #4 - bl sub_0201ADA4 - add r4, #0x48 - add r0, r4, #0 - bl sub_0201ACCC - add r0, r5, #0 - bl ov41_022568C8 - pop {r3, r4, r5, pc} - thumb_func_end ov41_02256B60 - - thumb_func_start ov41_02256B8C -ov41_02256B8C: ; 0x02256B8C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r5, #0 - bl ov25_02255248 - cmp r0, #0 - beq _02256BB6 - ldr r1, [r4, #0x5c] - cmp r1, #0 - beq _02256BB6 - add r0, r5, #0 - bl ov41_022568C8 - pop {r3, r4, r5, pc} -_02256BB6: - cmp r0, #4 - bls _02256BBC - b _02256D1A -_02256BBC: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02256BC8: ; jump table - .short _02256BD2 - _02256BC8 - 2 ; case 0 - .short _02256C06 - _02256BC8 - 2 ; case 1 - .short _02256C58 - _02256BC8 - 2 ; case 2 - .short _02256CA2 - _02256BC8 - 2 ; case 3 - .short _02256CD6 - _02256BC8 - 2 ; case 4 -_02256BD2: - add r0, r4, #0 - add r0, #0x68 - ldrh r0, [r0] - mov r1, #0x15 - lsl r1, r1, #4 - add r2, r0, r1 - add r0, r4, #0 - add r0, #0x68 - strh r2, [r0] - add r0, r4, #0 - add r0, #0x6a - strh r1, [r0] - add r1, r4, #0 - add r1, #0x68 - ldrh r1, [r1] - ldr r0, [r4, #0x24] - bl ov25_02255950 - mov r0, #0 - str r0, [r4, #0x64] - str r0, [r4, #0x60] - str r0, [r4, #0x5c] - add r0, r5, #0 - bl ov25_0225524C - pop {r3, r4, r5, pc} -_02256C06: - add r0, r4, #0 - add r0, #0x68 - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x6a - ldrh r0, [r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x68 - strh r1, [r0] - add r1, r4, #0 - add r1, #0x68 - ldrh r1, [r1] - ldr r0, [r4, #0x24] - bl ov25_02255950 - add r0, r4, #0 - add r0, #0x6a - ldrh r1, [r0] - mov r0, #0x15 - lsl r0, r0, #4 - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x6a - strh r1, [r0] - add r0, r4, #0 - add r0, #0x6a - mov r1, #3 - ldrh r0, [r0] - lsl r1, r1, #0xc - cmp r0, r1 - blo _02256D1A - add r0, r4, #0 - add r0, #0x6a - strh r1, [r0] - mov r0, #1 - str r0, [r4, #0x64] - add r0, r5, #0 - bl ov25_0225524C - pop {r3, r4, r5, pc} -_02256C58: - add r0, r4, #0 - add r0, #0x68 - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x6a - ldrh r0, [r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x68 - strh r1, [r0] - add r1, r4, #0 - add r1, #0x68 - ldrh r1, [r1] - ldr r0, [r4, #0x24] - bl ov25_02255950 - ldr r0, [r4, #0x60] - cmp r0, #0 - beq _02256D1A - bl sub_0201D35C - mov r1, #7 - and r0, r1 - str r0, [r4, #0x6c] - add r0, r4, #0 - add r0, #0x6a - ldrh r1, [r0] - mov r0, #0x1a - lsl r0, r0, #8 - cmp r1, r0 - bls _02256C9A - add r4, #0x6a - strh r0, [r4] -_02256C9A: - add r0, r5, #0 - bl ov25_0225524C - pop {r3, r4, r5, pc} -_02256CA2: - add r0, r4, #0 - add r0, #0x68 - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x6a - ldrh r0, [r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x68 - strh r1, [r0] - add r1, r4, #0 - add r1, #0x68 - ldrh r1, [r1] - ldr r0, [r4, #0x24] - bl ov25_02255950 - ldr r0, [r4, #0x6c] - cmp r0, #0 - bne _02256CCE - sub r0, r0, #1 - str r0, [r4, #0x6c] - pop {r3, r4, r5, pc} -_02256CCE: - add r0, r5, #0 - bl ov25_0225524C - pop {r3, r4, r5, pc} -_02256CD6: - add r0, r4, #0 - add r0, #0x6a - ldrh r0, [r0] - cmp r0, #0x50 - bls _02256D0E - add r0, r4, #0 - add r0, #0x6a - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x6a - sub r1, #0x50 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x68 - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x6a - ldrh r0, [r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x68 - strh r1, [r0] - ldr r0, [r4, #0x24] - add r4, #0x68 - ldrh r1, [r4] - bl ov25_02255950 - pop {r3, r4, r5, pc} -_02256D0E: - mov r0, #0 - add r4, #0x6a - strh r0, [r4] - add r0, r5, #0 - bl ov41_022568C8 -_02256D1A: - pop {r3, r4, r5, pc} - thumb_func_end ov41_02256B8C - - thumb_func_start ov41_02256D1C -ov41_02256D1C: ; 0x02256D1C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r5, #0 - bl ov25_02255248 - cmp r0, #0 - beq _02256D3E - cmp r0, #1 - beq _02256D4A - pop {r3, r4, r5, pc} -_02256D3E: - mov r0, #1 - str r0, [r4, #0x60] - add r0, r5, #0 - bl ov25_0225524C - pop {r3, r4, r5, pc} -_02256D4A: - add r0, r4, #0 - mov r1, #7 - bl ov41_022568B0 - cmp r0, #0 - beq _02256D62 - ldr r0, _02256D64 ; =0x0000066A - bl ov25_02254424 - add r0, r5, #0 - bl ov41_022568C8 -_02256D62: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256D64: .word 0x0000066A - thumb_func_end ov41_02256D1C - ; 0x02256D68 - - .rodata - .incbin "incbin/overlay41_rodata.bin" + + + .global Unk_ov41_02256D68 +Unk_ov41_02256D68: ; 0x02256D68 + .incbin "incbin/overlay41_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov41_02256D74 +Unk_ov41_02256D74: ; 0x02256D74 + .incbin "incbin/overlay41_rodata.bin", 0xC, 0xC .section .sinit, 4 .word ov41_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov41_022567B0.s b/asm/ov41_022567B0.s new file mode 100644 index 000000000..70333e3b3 --- /dev/null +++ b/asm/ov41_022567B0.s @@ -0,0 +1,771 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov41_022567B0 +ov41_022567B0: ; 0x022567B0 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #8 + mov r1, #0x70 + bl sub_02018144 + add r4, r0, #0 + beq _022567F4 + add r0, #8 + mov r1, #4 + bl ov25_02255090 + str r5, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + bl ov25_02254664 + str r0, [r4, #0x20] + add r0, r4, #0 + mov r1, #0 + add r0, #0x68 + strh r1, [r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov41_0225680C + ldr r0, [r4, #4] + cmp r0, #0 + beq _022567F4 + str r4, [r6, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_022567F4: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov41_022567B0 + + thumb_func_start ov41_022567F8 +ov41_022567F8: ; 0x022567F8 + push {r4, lr} + add r4, r0, #0 + beq _02256808 + bl ov41_02256864 + add r0, r4, #0 + bl sub_020181C4 +_02256808: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov41_022567F8 + + thumb_func_start ov41_0225680C +ov41_0225680C: ; 0x0225680C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r3, #0 + str r3, [sp] + mov r2, #1 + add r7, r0, #0 + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0x59 + bl sub_02006EC0 + mov r0, #8 + str r0, [sp] + add r0, r7, #0 + add r0, #0x34 + mov r1, #0xc + mov r2, #0x57 + mov r3, #0x58 + bl ov25_02255958 + add r0, r7, #0 + str r0, [sp, #0xc] + add r0, #0x34 + ldr r4, _02256860 ; =0x02256DC0 + mov r6, #0 + add r5, r7, #0 + str r0, [sp, #0xc] +_02256846: + ldr r0, [r7, #0x20] + ldr r2, [sp, #0xc] + add r1, r4, #0 + bl ov25_02255810 + str r0, [r5, #0x24] + add r6, r6, #1 + add r4, #0x10 + add r5, r5, #4 + cmp r6, #4 + blt _02256846 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02256860: .word 0x02256DC0 + thumb_func_end ov41_0225680C + + thumb_func_start ov41_02256864 +ov41_02256864: ; 0x02256864 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_0225686C: + ldr r1, [r5, #0x24] + cmp r1, #0 + beq _02256878 + ldr r0, [r6, #0x20] + bl ov25_022558B0 +_02256878: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0225686C + add r6, #0x34 + add r0, r6, #0 + bl ov25_022559B0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov41_02256864 + + thumb_func_start ov41_0225688C +ov41_0225688C: ; 0x0225688C + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _022568AC ; =0x02256E00 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022568AC: .word 0x02256E00 + thumb_func_end ov41_0225688C + + thumb_func_start ov41_022568B0 +ov41_022568B0: ; 0x022568B0 + ldr r3, _022568B8 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022568B8: .word ov25_02255130 + thumb_func_end ov41_022568B0 + + thumb_func_start ov41_022568BC +ov41_022568BC: ; 0x022568BC + ldr r3, _022568C4 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022568C4: .word ov25_02255154 + thumb_func_end ov41_022568BC + + thumb_func_start ov41_022568C8 +ov41_022568C8: ; 0x022568C8 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov41_022568C8 + + thumb_func_start ov41_022568DC +ov41_022568DC: ; 0x022568DC + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + mov r0, #8 + add r5, r1, #0 + bl sub_0201833C + cmp r0, #0 + bne _022568F0 + bl sub_02022974 +_022568F0: + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _022569AC ; =0x02256D88 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #4] + ldr r2, _022569B0 ; =0x02256DA4 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _0225691E + bl sub_02022974 +_0225691E: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0xc + mov r1, #0x56 + mov r3, #6 + bl sub_02006E3C + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0xc + mov r1, #0x55 + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _0225696A + bl sub_02022974 +_0225696A: + add r0, r4, #0 + lsr r1, r6, #5 + bl ov41_022569BC + ldr r0, [r4, #4] + mov r1, #7 + bl sub_02019448 + ldr r1, _022569B4 ; =0x04001000 + ldr r0, _022569B8 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #0x14 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r5, #0 + bl ov41_022568C8 + mov r0, #8 + bl sub_0201833C + cmp r0, #0 + bne _022569A8 + bl sub_02022974 +_022569A8: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022569AC: .word 0x02256D88 +_022569B0: .word 0x02256DA4 +_022569B4: .word 0x04001000 +_022569B8: .word 0xFFFFE0FF + thumb_func_end ov41_022568DC + + thumb_func_start ov41_022569BC +ov41_022569BC: ; 0x022569BC + push {r3, r4, r5, lr} + sub sp, #8 + ldr r3, _02256A18 ; =0x02256D80 + add r4, r0, #0 + ldrh r5, [r3] + add r0, sp, #0 + add r2, sp, #0 + strh r5, [r0] + ldrh r5, [r3, #2] + strh r5, [r0, #2] + ldrh r5, [r3, #4] + ldrh r3, [r3, #6] + strh r5, [r0, #4] + strh r3, [r0, #6] + str r1, [r4, #0x58] + strh r1, [r0, #6] + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x48 + bl sub_0201A8D4 + ldr r0, [r4, #0] + mov r2, #0xbe + ldr r0, [r0, #8] + ldr r1, [r4, #0x54] + lsl r2, r2, #6 + bl sub_02099DD0 + cmp r0, #0 + bne _02256A02 + add r0, r4, #0 + add r0, #0x48 + mov r1, #4 + bl sub_0201ADA4 +_02256A02: + add r0, r4, #0 + add r0, #0x48 + bl sub_0201A9F4 + add r4, #0x48 + add r0, r4, #0 + bl sub_0201ACCC + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02256A18: .word 0x02256D80 + thumb_func_end ov41_022569BC + + thumb_func_start ov41_02256A1C +ov41_02256A1C: ; 0x02256A1C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255248 + cmp r0, #0 + beq _02256A38 + cmp r0, #1 + beq _02256A44 + pop {r3, r4, r5, pc} +_02256A38: + mov r0, #1 + str r0, [r4, #0x5c] + add r0, r5, #0 + bl ov25_0225524C + pop {r3, r4, r5, pc} +_02256A44: + ldr r0, [r4, #0] + mov r2, #0xbe + ldr r0, [r0, #8] + ldr r1, [r4, #0x54] + lsl r2, r2, #6 + bl sub_02099DA8 + add r0, r4, #0 + add r0, #0x48 + bl sub_0201A8FC + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #7 + bl sub_02019044 + add r0, r5, #0 + bl ov41_022568C8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov41_02256A1C + + thumb_func_start ov41_02256A74 +ov41_02256A74: ; 0x02256A74 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r0, #0x48 + bl sub_0201ACCC + add r0, r4, #0 + bl ov41_022568C8 + pop {r4, pc} + thumb_func_end ov41_02256A74 + + thumb_func_start ov41_02256A8C +ov41_02256A8C: ; 0x02256A8C + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r1, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + ldr r1, [r4, #0] + ldr r0, [r1, #0] + lsl r2, r0, #1 + ldr r0, [r1, #4] + mov r1, #0x14 + lsl r3, r0, #1 + asr r5, r3, #3 + asr r0, r2, #3 + mul r1, r5 + add r5, r0, r1 + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + add r0, r4, #0 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, #0x48 + mov r1, #1 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 + ldr r1, [r4, #0x54] + lsl r0, r5, #5 + add r0, r1, r0 + ldr r1, [r4, #0x58] + mov r2, #0x20 + add r1, r1, r5 + lsl r1, r1, #5 + bl sub_020C090C + add r0, r6, #0 + bl ov41_022568C8 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov41_02256A8C + + thumb_func_start ov41_02256AE4 +ov41_02256AE4: ; 0x02256AE4 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r0, #0x48 + bl sub_0201ACCC + add r0, r4, #0 + bl ov41_022568C8 + pop {r4, pc} + thumb_func_end ov41_02256AE4 + + thumb_func_start ov41_02256AFC +ov41_02256AFC: ; 0x02256AFC + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r6, #0 + bl ov25_02255240 + add r5, r0, #0 + ldr r0, _02256B54 ; =0x00005B74 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _02256B1C + mov r1, #2 + b _02256B1E +_02256B1C: + mov r1, #1 +_02256B1E: + ldr r0, [r4, #0x28] + bl ov25_022558C4 + ldr r0, _02256B58 ; =0x00005B75 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _02256B30 + mov r1, #4 + b _02256B32 +_02256B30: + mov r1, #3 +_02256B32: + ldr r0, [r4, #0x2c] + bl ov25_022558C4 + ldr r0, _02256B5C ; =0x00005B76 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _02256B44 + mov r1, #6 + b _02256B46 +_02256B44: + mov r1, #5 +_02256B46: + ldr r0, [r4, #0x30] + bl ov25_022558C4 + add r0, r6, #0 + bl ov41_022568C8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02256B54: .word 0x00005B74 +_02256B58: .word 0x00005B75 +_02256B5C: .word 0x00005B76 + thumb_func_end ov41_02256AFC + + thumb_func_start ov41_02256B60 +ov41_02256B60: ; 0x02256B60 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r4, #0 + add r0, #0x48 + mov r1, #4 + bl sub_0201ADA4 + add r4, #0x48 + add r0, r4, #0 + bl sub_0201ACCC + add r0, r5, #0 + bl ov41_022568C8 + pop {r3, r4, r5, pc} + thumb_func_end ov41_02256B60 + + thumb_func_start ov41_02256B8C +ov41_02256B8C: ; 0x02256B8C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r5, #0 + bl ov25_02255248 + cmp r0, #0 + beq _02256BB6 + ldr r1, [r4, #0x5c] + cmp r1, #0 + beq _02256BB6 + add r0, r5, #0 + bl ov41_022568C8 + pop {r3, r4, r5, pc} +_02256BB6: + cmp r0, #4 + bls _02256BBC + b _02256D1A +_02256BBC: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02256BC8: ; jump table + .short _02256BD2 - _02256BC8 - 2 ; case 0 + .short _02256C06 - _02256BC8 - 2 ; case 1 + .short _02256C58 - _02256BC8 - 2 ; case 2 + .short _02256CA2 - _02256BC8 - 2 ; case 3 + .short _02256CD6 - _02256BC8 - 2 ; case 4 +_02256BD2: + add r0, r4, #0 + add r0, #0x68 + ldrh r0, [r0] + mov r1, #0x15 + lsl r1, r1, #4 + add r2, r0, r1 + add r0, r4, #0 + add r0, #0x68 + strh r2, [r0] + add r0, r4, #0 + add r0, #0x6a + strh r1, [r0] + add r1, r4, #0 + add r1, #0x68 + ldrh r1, [r1] + ldr r0, [r4, #0x24] + bl ov25_02255950 + mov r0, #0 + str r0, [r4, #0x64] + str r0, [r4, #0x60] + str r0, [r4, #0x5c] + add r0, r5, #0 + bl ov25_0225524C + pop {r3, r4, r5, pc} +_02256C06: + add r0, r4, #0 + add r0, #0x68 + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x6a + ldrh r0, [r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x68 + strh r1, [r0] + add r1, r4, #0 + add r1, #0x68 + ldrh r1, [r1] + ldr r0, [r4, #0x24] + bl ov25_02255950 + add r0, r4, #0 + add r0, #0x6a + ldrh r1, [r0] + mov r0, #0x15 + lsl r0, r0, #4 + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x6a + strh r1, [r0] + add r0, r4, #0 + add r0, #0x6a + mov r1, #3 + ldrh r0, [r0] + lsl r1, r1, #0xc + cmp r0, r1 + blo _02256D1A + add r0, r4, #0 + add r0, #0x6a + strh r1, [r0] + mov r0, #1 + str r0, [r4, #0x64] + add r0, r5, #0 + bl ov25_0225524C + pop {r3, r4, r5, pc} +_02256C58: + add r0, r4, #0 + add r0, #0x68 + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x6a + ldrh r0, [r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x68 + strh r1, [r0] + add r1, r4, #0 + add r1, #0x68 + ldrh r1, [r1] + ldr r0, [r4, #0x24] + bl ov25_02255950 + ldr r0, [r4, #0x60] + cmp r0, #0 + beq _02256D1A + bl sub_0201D35C + mov r1, #7 + and r0, r1 + str r0, [r4, #0x6c] + add r0, r4, #0 + add r0, #0x6a + ldrh r1, [r0] + mov r0, #0x1a + lsl r0, r0, #8 + cmp r1, r0 + bls _02256C9A + add r4, #0x6a + strh r0, [r4] +_02256C9A: + add r0, r5, #0 + bl ov25_0225524C + pop {r3, r4, r5, pc} +_02256CA2: + add r0, r4, #0 + add r0, #0x68 + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x6a + ldrh r0, [r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x68 + strh r1, [r0] + add r1, r4, #0 + add r1, #0x68 + ldrh r1, [r1] + ldr r0, [r4, #0x24] + bl ov25_02255950 + ldr r0, [r4, #0x6c] + cmp r0, #0 + bne _02256CCE + sub r0, r0, #1 + str r0, [r4, #0x6c] + pop {r3, r4, r5, pc} +_02256CCE: + add r0, r5, #0 + bl ov25_0225524C + pop {r3, r4, r5, pc} +_02256CD6: + add r0, r4, #0 + add r0, #0x6a + ldrh r0, [r0] + cmp r0, #0x50 + bls _02256D0E + add r0, r4, #0 + add r0, #0x6a + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x6a + sub r1, #0x50 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x68 + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x6a + ldrh r0, [r0] + add r1, r1, r0 + add r0, r4, #0 + add r0, #0x68 + strh r1, [r0] + ldr r0, [r4, #0x24] + add r4, #0x68 + ldrh r1, [r4] + bl ov25_02255950 + pop {r3, r4, r5, pc} +_02256D0E: + mov r0, #0 + add r4, #0x6a + strh r0, [r4] + add r0, r5, #0 + bl ov41_022568C8 +_02256D1A: + pop {r3, r4, r5, pc} + thumb_func_end ov41_02256B8C + + thumb_func_start ov41_02256D1C +ov41_02256D1C: ; 0x02256D1C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r5, #0 + bl ov25_02255248 + cmp r0, #0 + beq _02256D3E + cmp r0, #1 + beq _02256D4A + pop {r3, r4, r5, pc} +_02256D3E: + mov r0, #1 + str r0, [r4, #0x60] + add r0, r5, #0 + bl ov25_0225524C + pop {r3, r4, r5, pc} +_02256D4A: + add r0, r4, #0 + mov r1, #7 + bl ov41_022568B0 + cmp r0, #0 + beq _02256D62 + ldr r0, _02256D64 ; =0x0000066A + bl ov25_02254424 + add r0, r5, #0 + bl ov41_022568C8 +_02256D62: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256D64: .word 0x0000066A + thumb_func_end ov41_02256D1C + + .rodata + + + .global Unk_ov41_02256D80 +Unk_ov41_02256D80: ; 0x02256D80 + .incbin "incbin/overlay41_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov41_02256D88 +Unk_ov41_02256D88: ; 0x02256D88 + .incbin "incbin/overlay41_rodata.bin", 0x20, 0x3C - 0x20 + + .global Unk_ov41_02256DA4 +Unk_ov41_02256DA4: ; 0x02256DA4 + .incbin "incbin/overlay41_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov41_02256DC0 +Unk_ov41_02256DC0: ; 0x02256DC0 + .incbin "incbin/overlay41_rodata.bin", 0x58, 0x98 - 0x58 + + .global Unk_ov41_02256E00 +Unk_ov41_02256E00: ; 0x02256E00 + .incbin "incbin/overlay41_rodata.bin", 0x98, 0x78 + diff --git a/asm/ov42_022561C0.s b/asm/ov42_022561C0.s new file mode 100644 index 000000000..bc1db6d81 --- /dev/null +++ b/asm/ov42_022561C0.s @@ -0,0 +1,317 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov42_022561C0 +ov42_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov42_022561D4 + ldr r1, _022561D0 ; =ov42_022562B4 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov42_022561D4 +_022561D0: .word ov42_022562B4 + thumb_func_end ov42_022561C0 + + thumb_func_start ov42_022561D4 +ov42_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x14 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov42_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov42_02256280 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov42_02256280 + thumb_func_end ov42_022561D4 + + thumb_func_start ov42_0225621C +ov42_0225621C: ; 0x0225621C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r1, r5, #0 + add r6, r2, #0 + add r0, r3, #0 + add r1, #8 + mov r2, #4 + str r3, [r5, #4] + bl sub_02099D7C + cmp r0, #0 + bne _0225623A + mov r0, #1 + str r0, [r5, #8] +_0225623A: + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xc + add r1, #8 + add r2, r6, #0 + bl ov42_022563D4 + cmp r0, #0 + beq _0225625A + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + str r4, [r5, #0x10] + mov r0, #1 + pop {r4, r5, r6, pc} +_0225625A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov42_0225621C + + thumb_func_start ov42_02256260 +ov42_02256260: ; 0x02256260 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #8 + mov r2, #4 + bl sub_02099D54 + ldr r0, [r4, #0xc] + bl ov42_0225648C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov42_02256260 + + thumb_func_start ov42_02256280 +ov42_02256280: ; 0x02256280 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #3 + bhs _022562AC + lsl r2, r1, #2 + ldr r1, _022562B0 ; =0x022566A8 + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562AC + add r0, r4, #0 + bl ov42_02256260 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x10] + bl ov25_02254260 +_022562AC: + pop {r3, r4, r5, pc} + nop +_022562B0: .word 0x022566A8 + thumb_func_end ov42_02256280 + + thumb_func_start ov42_022562B4 +ov42_022562B4: ; 0x022562B4 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov42_022562B4 + + thumb_func_start ov42_022562BC +ov42_022562BC: ; 0x022562BC + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562C4 + b _022562C6 +_022562C4: + mov r1, #2 +_022562C6: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov42_022562BC + + thumb_func_start ov42_022562D0 +ov42_022562D0: ; 0x022562D0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022562E0 + cmp r0, #1 + beq _022562F0 + b _0225630A +_022562E0: + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov42_022564A0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225630A +_022562F0: + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov42_022564C4 + cmp r0, #0 + beq _0225630A + ldr r0, [r4, #0x10] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov42_022562BC +_0225630A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov42_022562D0 + + thumb_func_start ov42_02256310 +ov42_02256310: ; 0x02256310 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256320 + mov r1, #2 + bl ov42_022562BC +_02256320: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225632C + cmp r0, #1 + beq _0225634E + b _0225635E +_0225632C: + bl ov42_02256398 + cmp r0, #0 + beq _0225635E + bl sub_0201D35C + mov r1, #1 + and r0, r1 + str r0, [r4, #8] + ldr r0, [r4, #0xc] + mov r1, #2 + bl ov42_022564A0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225635E +_0225634E: + ldr r0, [r4, #0xc] + mov r1, #2 + bl ov42_022564C4 + cmp r0, #0 + beq _0225635E + mov r0, #0 + strb r0, [r4, #1] +_0225635E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov42_02256310 + + thumb_func_start ov42_02256364 +ov42_02256364: ; 0x02256364 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256374 + cmp r0, #1 + beq _02256384 + b _02256392 +_02256374: + ldr r0, [r4, #0xc] + mov r1, #1 + bl ov42_022564A0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256392 +_02256384: + ldr r0, [r4, #0xc] + bl ov42_022564D0 + cmp r0, #0 + beq _02256392 + mov r0, #1 + pop {r4, pc} +_02256392: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov42_02256364 + + thumb_func_start ov42_02256398 +ov42_02256398: ; 0x02256398 + push {r3, lr} + sub sp, #8 + add r0, sp, #4 + add r1, sp, #0 + bl ov25_022544BC + cmp r0, #0 + beq _022563CE + ldr r1, [sp, #4] + mov r0, #0x70 + sub r0, r0, r1 + add r3, r0, #0 + mul r3, r0 + ldr r1, [sp] + mov r0, #0x90 + sub r2, r0, r1 + add r1, r2, #0 + mul r1, r2 + str r1, [sp] + add r1, r3, r1 + lsl r0, r0, #2 + str r3, [sp, #4] + cmp r1, r0 + bhs _022563CE + add sp, #8 + mov r0, #1 + pop {r3, pc} +_022563CE: + mov r0, #0 + add sp, #8 + pop {r3, pc} + thumb_func_end ov42_02256398 + + .rodata + + + .global Unk_ov42_022566A8 +Unk_ov42_022566A8: ; 0x022566A8 + .incbin "incbin/overlay42_rodata.bin", 0x0, 0xC + + .section .sinit, 4 + .word ov42_022561C0 diff --git a/asm/overlay42.s b/asm/ov42_022563D4.s similarity index 56% rename from asm/overlay42.s rename to asm/ov42_022563D4.s index f2fc97e11..56cdb10d0 100644 --- a/asm/overlay42.s +++ b/asm/ov42_022563D4.s @@ -1,307 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov42_022561C0 -ov42_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov42_022561D4 - ldr r1, _022561D0 ; =ov42_022562B4 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov42_022561D4 -_022561D0: .word ov42_022562B4 - thumb_func_end ov42_022561C0 - - thumb_func_start ov42_022561D4 -ov42_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x14 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov42_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov42_02256280 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov42_02256280 - thumb_func_end ov42_022561D4 - - thumb_func_start ov42_0225621C -ov42_0225621C: ; 0x0225621C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r1, r5, #0 - add r6, r2, #0 - add r0, r3, #0 - add r1, #8 - mov r2, #4 - str r3, [r5, #4] - bl sub_02099D7C - cmp r0, #0 - bne _0225623A - mov r0, #1 - str r0, [r5, #8] -_0225623A: - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xc - add r1, #8 - add r2, r6, #0 - bl ov42_022563D4 - cmp r0, #0 - beq _0225625A - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - str r4, [r5, #0x10] - mov r0, #1 - pop {r4, r5, r6, pc} -_0225625A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov42_0225621C - - thumb_func_start ov42_02256260 -ov42_02256260: ; 0x02256260 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #8 - mov r2, #4 - bl sub_02099D54 - ldr r0, [r4, #0xc] - bl ov42_0225648C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov42_02256260 - - thumb_func_start ov42_02256280 -ov42_02256280: ; 0x02256280 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #3 - bhs _022562AC - lsl r2, r1, #2 - ldr r1, _022562B0 ; =0x022566A8 - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562AC - add r0, r4, #0 - bl ov42_02256260 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x10] - bl ov25_02254260 -_022562AC: - pop {r3, r4, r5, pc} - nop -_022562B0: .word 0x022566A8 - thumb_func_end ov42_02256280 - - thumb_func_start ov42_022562B4 -ov42_022562B4: ; 0x022562B4 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov42_022562B4 - - thumb_func_start ov42_022562BC -ov42_022562BC: ; 0x022562BC - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562C4 - b _022562C6 -_022562C4: - mov r1, #2 -_022562C6: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov42_022562BC - - thumb_func_start ov42_022562D0 -ov42_022562D0: ; 0x022562D0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022562E0 - cmp r0, #1 - beq _022562F0 - b _0225630A -_022562E0: - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov42_022564A0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225630A -_022562F0: - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov42_022564C4 - cmp r0, #0 - beq _0225630A - ldr r0, [r4, #0x10] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov42_022562BC -_0225630A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov42_022562D0 - - thumb_func_start ov42_02256310 -ov42_02256310: ; 0x02256310 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256320 - mov r1, #2 - bl ov42_022562BC -_02256320: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225632C - cmp r0, #1 - beq _0225634E - b _0225635E -_0225632C: - bl ov42_02256398 - cmp r0, #0 - beq _0225635E - bl sub_0201D35C - mov r1, #1 - and r0, r1 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - mov r1, #2 - bl ov42_022564A0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225635E -_0225634E: - ldr r0, [r4, #0xc] - mov r1, #2 - bl ov42_022564C4 - cmp r0, #0 - beq _0225635E - mov r0, #0 - strb r0, [r4, #1] -_0225635E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov42_02256310 - - thumb_func_start ov42_02256364 -ov42_02256364: ; 0x02256364 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256374 - cmp r0, #1 - beq _02256384 - b _02256392 -_02256374: - ldr r0, [r4, #0xc] - mov r1, #1 - bl ov42_022564A0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256392 -_02256384: - ldr r0, [r4, #0xc] - bl ov42_022564D0 - cmp r0, #0 - beq _02256392 - mov r0, #1 - pop {r4, pc} -_02256392: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov42_02256364 - - thumb_func_start ov42_02256398 -ov42_02256398: ; 0x02256398 - push {r3, lr} - sub sp, #8 - add r0, sp, #4 - add r1, sp, #0 - bl ov25_022544BC - cmp r0, #0 - beq _022563CE - ldr r1, [sp, #4] - mov r0, #0x70 - sub r0, r0, r1 - add r3, r0, #0 - mul r3, r0 - ldr r1, [sp] - mov r0, #0x90 - sub r2, r0, r1 - add r1, r2, #0 - mul r1, r2 - str r1, [sp] - add r1, r3, r1 - lsl r0, r0, #2 - str r3, [sp, #4] - cmp r1, r0 - bhs _022563CE - add sp, #8 - mov r0, #1 - pop {r3, pc} -_022563CE: - mov r0, #0 - add sp, #8 - pop {r3, pc} - thumb_func_end ov42_02256398 thumb_func_start ov42_022563D4 ov42_022563D4: ; 0x022563D4 @@ -668,14 +371,31 @@ _0225669C: .word 0x02256720 _022566A0: .word 0xFFFFE000 _022566A4: .word 0x00000676 thumb_func_end ov42_022565C4 - ; 0x022566A8 - .rodata - .incbin "incbin/overlay42_rodata.bin" - .section .sinit, 4 - .word ov42_022561C0 + + .global Unk_ov42_022566B4 +Unk_ov42_022566B4: ; 0x022566B4 + .incbin "incbin/overlay42_rodata.bin", 0xC, 0x1C - 0xC + + .global Unk_ov42_022566C4 +Unk_ov42_022566C4: ; 0x022566C4 + .incbin "incbin/overlay42_rodata.bin", 0x1C, 0x38 - 0x1C + + .global Unk_ov42_022566E0 +Unk_ov42_022566E0: ; 0x022566E0 + .incbin "incbin/overlay42_rodata.bin", 0x38, 0x30 + .bss - .space 0x20 + + + .global Unk_ov42_02256720 +Unk_ov42_02256720: ; 0x02256720 + .space 0x4 + + .global Unk_ov42_02256724 +Unk_ov42_02256724: ; 0x02256724 + .space 0x4 + diff --git a/asm/ov43_022561C0.s b/asm/ov43_022561C0.s new file mode 100644 index 000000000..cd2885d0b --- /dev/null +++ b/asm/ov43_022561C0.s @@ -0,0 +1,531 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov43_022561C0 +ov43_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov43_022561D4 + ldr r1, _022561D0 ; =ov43_02256310 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov43_022561D4 +_022561D0: .word ov43_02256310 + thumb_func_end ov43_022561C0 + + thumb_func_start ov43_022561D4 +ov43_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x24 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov43_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov43_022562CC + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov43_022562CC + thumb_func_end ov43_022561D4 + + thumb_func_start ov43_0225621C +ov43_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r1, r5, #0 + add r6, r2, #0 + add r0, r3, #0 + add r1, #8 + mov r2, #0xc + str r3, [r5, #4] + bl sub_02099D7C + cmp r0, #0 + bne _02256240 + add r0, r5, #0 + add r0, #8 + bl ov43_02256288 +_02256240: + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x14 + add r1, #8 + add r2, r6, #0 + bl ov43_02256544 + cmp r0, #0 + beq _02256278 + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _02256280 ; =0x02256A98 + ldr r2, _02256284 ; =ov43_02256308 + mov r1, #6 + add r3, r5, #0 + bl ov25_02255ACC + str r0, [r5, #0x1c] + mov r0, #0 + str r0, [r5, #0x20] + add sp, #4 + str r4, [r5, #0x18] + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_02256278: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02256280: .word 0x02256A98 +_02256284: .word ov43_02256308 + thumb_func_end ov43_0225621C + + thumb_func_start ov43_02256288 +ov43_02256288: ; 0x02256288 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0] + strh r0, [r4, #6] + strh r0, [r4, #8] + mov r0, #0x12 + strh r0, [r4, #0xa] + ldrh r0, [r4, #6] + ldrh r1, [r4, #8] + ldrh r2, [r4, #0xa] + bl ov43_022564AC + strh r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov43_02256288 + + thumb_func_start ov43_022562A8 +ov43_022562A8: ; 0x022562A8 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #8 + mov r2, #0xc + bl sub_02099D54 + ldr r0, [r4, #0x1c] + bl ov25_02255B34 + ldr r0, [r4, #0x14] + bl ov43_02256680 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov43_022562A8 + + thumb_func_start ov43_022562CC +ov43_022562CC: ; 0x022562CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _02256302 + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x1c] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256304 ; =0x02256A8C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _02256302 + add r0, r4, #0 + bl ov43_022562A8 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x18] + bl ov25_02254260 +_02256302: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256304: .word 0x02256A8C + thumb_func_end ov43_022562CC + + thumb_func_start ov43_02256308 +ov43_02256308: ; 0x02256308 + str r0, [r3, #8] + str r1, [r3, #0x20] + bx lr + ; .align 2, 0 + thumb_func_end ov43_02256308 + + thumb_func_start ov43_02256310 +ov43_02256310: ; 0x02256310 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov43_02256310 + + thumb_func_start ov43_02256318 +ov43_02256318: ; 0x02256318 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256320 + b _02256322 +_02256320: + mov r1, #2 +_02256322: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov43_02256318 + + thumb_func_start ov43_0225632C +ov43_0225632C: ; 0x0225632C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225633C + cmp r0, #1 + beq _0225634C + b _02256366 +_0225633C: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov43_022566B0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256366 +_0225634C: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov43_022566D4 + cmp r0, #0 + beq _02256366 + ldr r0, [r4, #0x18] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov43_02256318 +_02256366: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov43_0225632C + + thumb_func_start ov43_0225636C +ov43_0225636C: ; 0x0225636C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #2] + cmp r0, #0 + beq _0225638C + ldr r0, [r4, #0x14] + bl ov43_022566E0 + cmp r0, #0 + beq _02256388 + add r0, r4, #0 + mov r1, #2 + bl ov43_02256318 +_02256388: + mov r0, #0 + pop {r4, pc} +_0225638C: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225639C + cmp r0, #1 + beq _022563B2 + cmp r0, #2 + beq _02256464 + b _02256472 +_0225639C: + ldr r0, [r4, #0x20] + cmp r0, #1 + bne _02256472 + ldr r0, [r4, #0x14] + mov r1, #2 + bl ov43_022566B0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256472 +_022563B2: + ldr r0, [r4, #0x20] + cmp r0, #2 + bne _022563C6 + ldr r0, [r4, #0x14] + mov r1, #3 + bl ov43_022566B0 + mov r0, #0 + strb r0, [r4, #1] + b _02256472 +_022563C6: + cmp r0, #3 + bne _02256472 + ldr r0, [r4, #8] + cmp r0, #5 + bhi _02256440 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022563DC: ; jump table + .short _022563E8 - _022563DC - 2 ; case 0 + .short _022563F8 - _022563DC - 2 ; case 1 + .short _02256406 - _022563DC - 2 ; case 2 + .short _02256416 - _022563DC - 2 ; case 3 + .short _02256424 - _022563DC - 2 ; case 4 + .short _02256434 - _022563DC - 2 ; case 5 +_022563E8: + ldrh r0, [r4, #0xe] + mov r1, #0 + mvn r1, r1 + mov r2, #0 + bl ov43_022564EC + strh r0, [r4, #0xe] + b _02256440 +_022563F8: + ldrh r0, [r4, #0xe] + mov r1, #1 + mov r2, #0 + bl ov43_022564EC + strh r0, [r4, #0xe] + b _02256440 +_02256406: + ldrh r0, [r4, #0x10] + mov r1, #0 + mvn r1, r1 + mov r2, #0 + bl ov43_022564EC + strh r0, [r4, #0x10] + b _02256440 +_02256416: + ldrh r0, [r4, #0x10] + mov r1, #1 + mov r2, #0 + bl ov43_022564EC + strh r0, [r4, #0x10] + b _02256440 +_02256424: + ldrh r0, [r4, #0x12] + mov r1, #0 + mvn r1, r1 + mov r2, #1 + bl ov43_022564EC + strh r0, [r4, #0x12] + b _02256440 +_02256434: + ldrh r0, [r4, #0x12] + mov r1, #1 + add r2, r1, #0 + bl ov43_022564EC + strh r0, [r4, #0x12] +_02256440: + ldrh r0, [r4, #0xe] + ldrh r1, [r4, #0x10] + ldrh r2, [r4, #0x12] + bl ov43_022564AC + strh r0, [r4, #0xc] + ldr r0, [r4, #0x14] + mov r1, #3 + bl ov43_022566B0 + ldr r0, [r4, #0x14] + mov r1, #4 + bl ov43_022566B0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256472 +_02256464: + ldr r0, [r4, #0x14] + bl ov43_022566E0 + cmp r0, #0 + beq _02256472 + mov r0, #0 + strb r0, [r4, #1] +_02256472: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov43_0225636C + + thumb_func_start ov43_02256478 +ov43_02256478: ; 0x02256478 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256488 + cmp r0, #1 + beq _02256498 + b _022564A6 +_02256488: + ldr r0, [r4, #0x14] + mov r1, #1 + bl ov43_022566B0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022564A6 +_02256498: + ldr r0, [r4, #0x14] + bl ov43_022566E0 + cmp r0, #0 + beq _022564A6 + mov r0, #1 + pop {r4, pc} +_022564A6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov43_02256478 + + thumb_func_start ov43_022564AC +ov43_022564AC: ; 0x022564AC + push {r4, r5} + ldr r5, _022564E8 ; =0x02256AB0 + mov r3, #0x12 + add r4, r0, #0 + mul r4, r3 + add r4, r5, r4 + add r0, r3, #0 + ldrsb r5, [r4, r1] + sub r0, #0x1c + cmp r5, r0 + beq _022564CE + cmp r2, #0x12 + beq _022564D4 + ldrsb r0, [r4, r2] + sub r3, #0x1c + cmp r0, r3 + bne _022564D4 +_022564CE: + mov r0, #0 + pop {r4, r5} + bx lr +_022564D4: + mov r0, #3 + add r0, r0, r5 + cmp r2, #0x12 + beq _022564E4 + cmp r2, r1 + beq _022564E4 + ldrsb r1, [r4, r2] + add r0, r0, r1 +_022564E4: + pop {r4, r5} + bx lr + ; .align 2, 0 +_022564E8: .word 0x02256AB0 + thumb_func_end ov43_022564AC + + thumb_func_start ov43_022564EC +ov43_022564EC: ; 0x022564EC + push {r4, r5} + ldr r5, _02256540 ; =0x02256BF4 + mov r4, #0 +_022564F2: + ldrb r3, [r5] + cmp r3, r0 + beq _02256500 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x11 + blo _022564F2 +_02256500: + cmp r4, #0x11 + bne _02256514 + cmp r1, #0 + ble _0225650E + mov r0, #0 + pop {r4, r5} + bx lr +_0225650E: + mov r0, #8 + pop {r4, r5} + bx lr +_02256514: + add r4, r4, r1 + cmp r4, #0x11 + blt _02256526 + cmp r2, #0 + beq _02256524 + mov r0, #0x12 + pop {r4, r5} + bx lr +_02256524: + mov r4, #0 +_02256526: + cmp r4, #0 + bge _02256536 + cmp r2, #0 + beq _02256534 + mov r0, #0x12 + pop {r4, r5} + bx lr +_02256534: + mov r4, #0x10 +_02256536: + ldr r0, _02256540 ; =0x02256BF4 + ldrb r0, [r0, r4] + pop {r4, r5} + bx lr + nop +_02256540: .word 0x02256BF4 + thumb_func_end ov43_022564EC + + .rodata + + + .global Unk_ov43_02256A8C +Unk_ov43_02256A8C: ; 0x02256A8C + .incbin "incbin/overlay43_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov43_02256A98 +Unk_ov43_02256A98: ; 0x02256A98 + .incbin "incbin/overlay43_rodata.bin", 0xC, 0x24 - 0xC + + .global Unk_ov43_02256AB0 +Unk_ov43_02256AB0: ; 0x02256AB0 + .incbin "incbin/overlay43_rodata.bin", 0x24, 0x168 - 0x24 + + .global Unk_ov43_02256BF4 +Unk_ov43_02256BF4: ; 0x02256BF4 + .incbin "incbin/overlay43_rodata.bin", 0x168, 0x11 + + .section .sinit, 4 + .word ov43_022561C0 diff --git a/asm/overlay43.s b/asm/ov43_02256544.s similarity index 57% rename from asm/overlay43.s rename to asm/ov43_02256544.s index 0d816c6d1..4d33fb2e0 100644 --- a/asm/overlay43.s +++ b/asm/ov43_02256544.s @@ -1,509 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov43_022561C0 -ov43_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov43_022561D4 - ldr r1, _022561D0 ; =ov43_02256310 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov43_022561D4 -_022561D0: .word ov43_02256310 - thumb_func_end ov43_022561C0 - - thumb_func_start ov43_022561D4 -ov43_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x24 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov43_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov43_022562CC - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov43_022562CC - thumb_func_end ov43_022561D4 - - thumb_func_start ov43_0225621C -ov43_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r1, r5, #0 - add r6, r2, #0 - add r0, r3, #0 - add r1, #8 - mov r2, #0xc - str r3, [r5, #4] - bl sub_02099D7C - cmp r0, #0 - bne _02256240 - add r0, r5, #0 - add r0, #8 - bl ov43_02256288 -_02256240: - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x14 - add r1, #8 - add r2, r6, #0 - bl ov43_02256544 - cmp r0, #0 - beq _02256278 - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _02256280 ; =0x02256A98 - ldr r2, _02256284 ; =ov43_02256308 - mov r1, #6 - add r3, r5, #0 - bl ov25_02255ACC - str r0, [r5, #0x1c] - mov r0, #0 - str r0, [r5, #0x20] - add sp, #4 - str r4, [r5, #0x18] - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_02256278: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02256280: .word 0x02256A98 -_02256284: .word ov43_02256308 - thumb_func_end ov43_0225621C - - thumb_func_start ov43_02256288 -ov43_02256288: ; 0x02256288 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0] - strh r0, [r4, #6] - strh r0, [r4, #8] - mov r0, #0x12 - strh r0, [r4, #0xa] - ldrh r0, [r4, #6] - ldrh r1, [r4, #8] - ldrh r2, [r4, #0xa] - bl ov43_022564AC - strh r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov43_02256288 - - thumb_func_start ov43_022562A8 -ov43_022562A8: ; 0x022562A8 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #8 - mov r2, #0xc - bl sub_02099D54 - ldr r0, [r4, #0x1c] - bl ov25_02255B34 - ldr r0, [r4, #0x14] - bl ov43_02256680 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov43_022562A8 - - thumb_func_start ov43_022562CC -ov43_022562CC: ; 0x022562CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _02256302 - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x1c] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256304 ; =0x02256A8C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _02256302 - add r0, r4, #0 - bl ov43_022562A8 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x18] - bl ov25_02254260 -_02256302: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256304: .word 0x02256A8C - thumb_func_end ov43_022562CC - - thumb_func_start ov43_02256308 -ov43_02256308: ; 0x02256308 - str r0, [r3, #8] - str r1, [r3, #0x20] - bx lr - ; .align 2, 0 - thumb_func_end ov43_02256308 - - thumb_func_start ov43_02256310 -ov43_02256310: ; 0x02256310 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov43_02256310 - - thumb_func_start ov43_02256318 -ov43_02256318: ; 0x02256318 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256320 - b _02256322 -_02256320: - mov r1, #2 -_02256322: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov43_02256318 - - thumb_func_start ov43_0225632C -ov43_0225632C: ; 0x0225632C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225633C - cmp r0, #1 - beq _0225634C - b _02256366 -_0225633C: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov43_022566B0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256366 -_0225634C: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov43_022566D4 - cmp r0, #0 - beq _02256366 - ldr r0, [r4, #0x18] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov43_02256318 -_02256366: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov43_0225632C - - thumb_func_start ov43_0225636C -ov43_0225636C: ; 0x0225636C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #2] - cmp r0, #0 - beq _0225638C - ldr r0, [r4, #0x14] - bl ov43_022566E0 - cmp r0, #0 - beq _02256388 - add r0, r4, #0 - mov r1, #2 - bl ov43_02256318 -_02256388: - mov r0, #0 - pop {r4, pc} -_0225638C: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225639C - cmp r0, #1 - beq _022563B2 - cmp r0, #2 - beq _02256464 - b _02256472 -_0225639C: - ldr r0, [r4, #0x20] - cmp r0, #1 - bne _02256472 - ldr r0, [r4, #0x14] - mov r1, #2 - bl ov43_022566B0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256472 -_022563B2: - ldr r0, [r4, #0x20] - cmp r0, #2 - bne _022563C6 - ldr r0, [r4, #0x14] - mov r1, #3 - bl ov43_022566B0 - mov r0, #0 - strb r0, [r4, #1] - b _02256472 -_022563C6: - cmp r0, #3 - bne _02256472 - ldr r0, [r4, #8] - cmp r0, #5 - bhi _02256440 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022563DC: ; jump table - .short _022563E8 - _022563DC - 2 ; case 0 - .short _022563F8 - _022563DC - 2 ; case 1 - .short _02256406 - _022563DC - 2 ; case 2 - .short _02256416 - _022563DC - 2 ; case 3 - .short _02256424 - _022563DC - 2 ; case 4 - .short _02256434 - _022563DC - 2 ; case 5 -_022563E8: - ldrh r0, [r4, #0xe] - mov r1, #0 - mvn r1, r1 - mov r2, #0 - bl ov43_022564EC - strh r0, [r4, #0xe] - b _02256440 -_022563F8: - ldrh r0, [r4, #0xe] - mov r1, #1 - mov r2, #0 - bl ov43_022564EC - strh r0, [r4, #0xe] - b _02256440 -_02256406: - ldrh r0, [r4, #0x10] - mov r1, #0 - mvn r1, r1 - mov r2, #0 - bl ov43_022564EC - strh r0, [r4, #0x10] - b _02256440 -_02256416: - ldrh r0, [r4, #0x10] - mov r1, #1 - mov r2, #0 - bl ov43_022564EC - strh r0, [r4, #0x10] - b _02256440 -_02256424: - ldrh r0, [r4, #0x12] - mov r1, #0 - mvn r1, r1 - mov r2, #1 - bl ov43_022564EC - strh r0, [r4, #0x12] - b _02256440 -_02256434: - ldrh r0, [r4, #0x12] - mov r1, #1 - add r2, r1, #0 - bl ov43_022564EC - strh r0, [r4, #0x12] -_02256440: - ldrh r0, [r4, #0xe] - ldrh r1, [r4, #0x10] - ldrh r2, [r4, #0x12] - bl ov43_022564AC - strh r0, [r4, #0xc] - ldr r0, [r4, #0x14] - mov r1, #3 - bl ov43_022566B0 - ldr r0, [r4, #0x14] - mov r1, #4 - bl ov43_022566B0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256472 -_02256464: - ldr r0, [r4, #0x14] - bl ov43_022566E0 - cmp r0, #0 - beq _02256472 - mov r0, #0 - strb r0, [r4, #1] -_02256472: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov43_0225636C - - thumb_func_start ov43_02256478 -ov43_02256478: ; 0x02256478 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256488 - cmp r0, #1 - beq _02256498 - b _022564A6 -_02256488: - ldr r0, [r4, #0x14] - mov r1, #1 - bl ov43_022566B0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022564A6 -_02256498: - ldr r0, [r4, #0x14] - bl ov43_022566E0 - cmp r0, #0 - beq _022564A6 - mov r0, #1 - pop {r4, pc} -_022564A6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov43_02256478 - - thumb_func_start ov43_022564AC -ov43_022564AC: ; 0x022564AC - push {r4, r5} - ldr r5, _022564E8 ; =0x02256AB0 - mov r3, #0x12 - add r4, r0, #0 - mul r4, r3 - add r4, r5, r4 - add r0, r3, #0 - ldrsb r5, [r4, r1] - sub r0, #0x1c - cmp r5, r0 - beq _022564CE - cmp r2, #0x12 - beq _022564D4 - ldrsb r0, [r4, r2] - sub r3, #0x1c - cmp r0, r3 - bne _022564D4 -_022564CE: - mov r0, #0 - pop {r4, r5} - bx lr -_022564D4: - mov r0, #3 - add r0, r0, r5 - cmp r2, #0x12 - beq _022564E4 - cmp r2, r1 - beq _022564E4 - ldrsb r1, [r4, r2] - add r0, r0, r1 -_022564E4: - pop {r4, r5} - bx lr - ; .align 2, 0 -_022564E8: .word 0x02256AB0 - thumb_func_end ov43_022564AC - - thumb_func_start ov43_022564EC -ov43_022564EC: ; 0x022564EC - push {r4, r5} - ldr r5, _02256540 ; =0x02256BF4 - mov r4, #0 -_022564F2: - ldrb r3, [r5] - cmp r3, r0 - beq _02256500 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x11 - blo _022564F2 -_02256500: - cmp r4, #0x11 - bne _02256514 - cmp r1, #0 - ble _0225650E - mov r0, #0 - pop {r4, r5} - bx lr -_0225650E: - mov r0, #8 - pop {r4, r5} - bx lr -_02256514: - add r4, r4, r1 - cmp r4, #0x11 - blt _02256526 - cmp r2, #0 - beq _02256524 - mov r0, #0x12 - pop {r4, r5} - bx lr -_02256524: - mov r4, #0 -_02256526: - cmp r4, #0 - bge _02256536 - cmp r2, #0 - beq _02256534 - mov r0, #0x12 - pop {r4, r5} - bx lr -_02256534: - mov r4, #0x10 -_02256536: - ldr r0, _02256540 ; =0x02256BF4 - ldrb r0, [r0, r4] - pop {r4, r5} - bx lr - nop -_02256540: .word 0x02256BF4 - thumb_func_end ov43_022564EC thumb_func_start ov43_02256544 ov43_02256544: ; 0x02256544 @@ -1184,14 +685,23 @@ _02256A86: ; .align 2, 0 _02256A88: .word 0x00000000 thumb_func_end ov43_02256A4C - ; 0x02256A8C - .rodata - .incbin "incbin/overlay43_rodata.bin" - .section .sinit, 4 - .word ov43_022561C0 - .bss - .space 0x0 + .global Unk_ov43_02256C08 +Unk_ov43_02256C08: ; 0x02256C08 + .incbin "incbin/overlay43_rodata.bin", 0x17C, 0x18C - 0x17C + + .global Unk_ov43_02256C18 +Unk_ov43_02256C18: ; 0x02256C18 + .incbin "incbin/overlay43_rodata.bin", 0x18C, 0x1A8 - 0x18C + + .global Unk_ov43_02256C34 +Unk_ov43_02256C34: ; 0x02256C34 + .incbin "incbin/overlay43_rodata.bin", 0x1A8, 0x1F0 - 0x1A8 + + .global Unk_ov43_02256C7C +Unk_ov43_02256C7C: ; 0x02256C7C + .incbin "incbin/overlay43_rodata.bin", 0x1F0, 0x60 + diff --git a/asm/ov44_022561C0.s b/asm/ov44_022561C0.s new file mode 100644 index 000000000..9af74aa47 --- /dev/null +++ b/asm/ov44_022561C0.s @@ -0,0 +1,573 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov44_022561C0 +ov44_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov44_022561D4 + ldr r1, _022561D0 ; =ov44_02256374 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov44_022561D4 +_022561D0: .word ov44_02256374 + thumb_func_end ov44_022561C0 + + thumb_func_start ov44_022561D4 +ov44_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x68 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov44_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov44_02256338 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov44_02256338 + thumb_func_end ov44_022561D4 + + thumb_func_start ov44_0225621C +ov44_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #4] + add r0, r1, #0 + str r1, [sp, #8] + str r2, [sp, #0xc] + bl ov25_02254544 + bl sub_0207A268 + mov r1, #0 + str r0, [sp, #0x14] + str r1, [sp, #0x10] + bl sub_0207A0F8 + ldr r1, [sp, #4] + mov r7, #0 + add r1, #0x34 + strb r0, [r1] + ldr r0, [sp, #4] + add r0, #0x34 + ldrb r0, [r0] + cmp r0, #0 + ble _0225629E + ldr r6, [sp, #4] + add r5, r6, #0 +_02256250: + ldr r0, [sp, #0x14] + add r1, r7, #0 + bl sub_0207A0FC + mov r1, #0x4c + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + bne _02256292 + add r0, r4, #0 + bl sub_02079D40 + str r0, [r6, #4] + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + strh r0, [r5, #0x1c] + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + strh r0, [r5, #0x28] + ldr r0, [sp, #0x10] + str r4, [r6, #0x48] + add r0, r0, #1 + add r6, r6, #4 + add r5, r5, #2 + str r0, [sp, #0x10] +_02256292: + ldr r0, [sp, #4] + add r7, r7, #1 + add r0, #0x34 + ldrb r0, [r0] + cmp r7, r0 + blt _02256250 +_0225629E: + ldr r1, [sp, #4] + ldr r0, [sp, #0x10] + add r1, #0x34 + strb r0, [r1] + ldr r0, [sp, #4] + mov r1, #0 + add r0, #0x36 + strb r1, [r0] + ldr r0, [sp, #4] + add r0, #0x34 + ldrb r0, [r0] + cmp r0, #1 + bls _022562BA + mov r1, #1 +_022562BA: + ldr r0, [sp, #4] + ldr r2, [sp, #0xc] + add r0, #0x37 + strb r1, [r0] + ldr r0, [sp, #4] + ldr r1, [sp, #4] + add r0, #0x38 + add r1, r1, #4 + bl ov44_022565BC + cmp r0, #0 + beq _02256304 + ldr r0, [sp, #4] + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #1] + strb r1, [r0, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _0225630C ; =0x02256CB4 + ldr r2, _02256310 ; =ov44_0225632C + ldr r3, [sp, #4] + mov r1, #3 + bl ov25_02255ACC + ldr r1, [sp, #4] + str r0, [r1, #0x40] + ldr r0, [sp, #4] + mov r1, #0 + add r0, #0x46 + strh r1, [r0] + ldr r1, [sp, #8] + ldr r0, [sp, #4] + add sp, #0x18 + str r1, [r0, #0x3c] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02256304: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225630C: .word 0x02256CB4 +_02256310: .word ov44_0225632C + thumb_func_end ov44_0225621C + + thumb_func_start ov44_02256314 +ov44_02256314: ; 0x02256314 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + bl ov25_02255B34 + ldr r0, [r4, #0x38] + bl ov44_022565F8 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov44_02256314 + + thumb_func_start ov44_0225632C +ov44_0225632C: ; 0x0225632C + add r2, r3, #0 + add r2, #0x44 + strh r0, [r2] + add r3, #0x46 + strh r1, [r3] + bx lr + thumb_func_end ov44_0225632C + + thumb_func_start ov44_02256338 +ov44_02256338: ; 0x02256338 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _0225636E + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x40] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256370 ; =0x02256CC0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _0225636E + add r0, r4, #0 + bl ov44_02256314 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x3c] + bl ov25_02254260 +_0225636E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256370: .word 0x02256CC0 + thumb_func_end ov44_02256338 + + thumb_func_start ov44_02256374 +ov44_02256374: ; 0x02256374 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov44_02256374 + + thumb_func_start ov44_0225637C +ov44_0225637C: ; 0x0225637C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256384 + b _02256386 +_02256384: + mov r1, #2 +_02256386: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov44_0225637C + + thumb_func_start ov44_02256390 +ov44_02256390: ; 0x02256390 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563A0 + cmp r0, #1 + beq _022563B0 + b _022563CA +_022563A0: + ldr r0, [r4, #0x38] + mov r1, #0 + bl ov44_02256744 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563CA +_022563B0: + ldr r0, [r4, #0x38] + mov r1, #0 + bl ov44_02256768 + cmp r0, #0 + beq _022563CA + ldr r0, [r4, #0x3c] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov44_0225637C +_022563CA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov44_02256390 + + thumb_func_start ov44_022563D0 +ov44_022563D0: ; 0x022563D0 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022563E4 + mov r1, #2 + bl ov44_0225637C + mov r0, #0 + pop {r4, pc} +_022563E4: + ldrb r1, [r4, #1] + cmp r1, #3 + bhi _022564E8 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022563F6: ; jump table + .short _022563FE - _022563F6 - 2 ; case 0 + .short _0225646C - _022563F6 - 2 ; case 1 + .short _0225647C - _022563F6 - 2 ; case 2 + .short _022564D8 - _022563F6 - 2 ; case 3 +_022563FE: + add r1, r4, #0 + add r1, #0x46 + ldrh r1, [r1] + cmp r1, #1 + bne _022564E8 + add r1, r4, #0 + add r1, #0x44 + ldrh r1, [r1] + cmp r1, #0 + beq _02256448 + cmp r1, #1 + beq _0225641C + cmp r1, #2 + beq _02256432 + b _02256464 +_0225641C: + bl ov44_022564F0 + cmp r0, #0 + beq _02256464 + ldr r0, [r4, #0x38] + mov r1, #4 + bl ov44_02256744 + mov r0, #1 + strb r0, [r4, #1] + b _02256464 +_02256432: + bl ov44_0225653C + cmp r0, #0 + beq _02256464 + ldr r0, [r4, #0x38] + mov r1, #5 + bl ov44_02256744 + mov r0, #1 + strb r0, [r4, #1] + b _02256464 +_02256448: + add r0, #0x34 + ldrb r0, [r0] + cmp r0, #1 + bls _0225645E + ldr r0, [r4, #0x38] + mov r1, #2 + bl ov44_02256744 + mov r0, #2 + strb r0, [r4, #1] + b _02256464 +_0225645E: + ldr r0, _022564EC ; =0x0000066E + bl ov25_02254424 +_02256464: + mov r0, #0 + add r4, #0x46 + strh r0, [r4] + b _022564E8 +_0225646C: + ldr r0, [r4, #0x38] + bl ov44_02256774 + cmp r0, #0 + beq _022564E8 + mov r0, #0 + strb r0, [r4, #1] + b _022564E8 +_0225647C: + add r0, #0x46 + ldrh r0, [r0] + cmp r0, #2 + bne _02256492 + ldr r0, [r4, #0x38] + mov r1, #3 + bl ov44_02256744 + mov r0, #0 + strb r0, [r4, #1] + b _022564E8 +_02256492: + cmp r0, #3 + bne _022564E8 + add r0, r4, #0 + add r0, #0x36 + ldrb r0, [r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x48] + str r0, [r4, #0x60] + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #0x48] + str r0, [r4, #0x64] + add r0, r4, #0 + add r0, #0x60 + bl ov5_021E7790 + add r1, r4, #0 + add r1, #0x35 + strb r0, [r1] + ldr r0, [r4, #0x38] + mov r1, #3 + bl ov44_02256744 + ldr r0, [r4, #0x38] + mov r1, #6 + bl ov44_02256744 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022564E8 +_022564D8: + ldr r0, [r4, #0x38] + mov r1, #6 + bl ov44_02256768 + cmp r0, #0 + beq _022564E8 + mov r0, #0 + strb r0, [r4, #1] +_022564E8: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_022564EC: .word 0x0000066E + thumb_func_end ov44_022563D0 + + thumb_func_start ov44_022564F0 +ov44_022564F0: ; 0x022564F0 + push {r3, r4} + add r1, r0, #0 + add r1, #0x34 + ldrb r1, [r1] + cmp r1, #2 + bls _02256534 + add r2, r0, #0 + mov r1, #0 + add r2, #0x36 +_02256502: + ldrb r3, [r2] + add r3, r3, #1 + strb r3, [r2] + add r3, r0, #0 + add r3, #0x36 + ldrb r4, [r3] + add r3, r0, #0 + add r3, #0x34 + ldrb r3, [r3] + cmp r4, r3 + blo _0225651E + add r3, r0, #0 + add r3, #0x36 + strb r1, [r3] +_0225651E: + add r3, r0, #0 + add r3, #0x36 + ldrb r4, [r3] + add r3, r0, #0 + add r3, #0x37 + ldrb r3, [r3] + cmp r4, r3 + beq _02256502 + mov r0, #1 + pop {r3, r4} + bx lr +_02256534: + mov r0, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov44_022564F0 + + thumb_func_start ov44_0225653C +ov44_0225653C: ; 0x0225653C + push {r3, r4} + add r1, r0, #0 + add r1, #0x34 + ldrb r1, [r1] + cmp r1, #2 + bls _02256580 + add r2, r0, #0 + mov r1, #0 + add r2, #0x37 +_0225654E: + ldrb r3, [r2] + add r3, r3, #1 + strb r3, [r2] + add r3, r0, #0 + add r3, #0x37 + ldrb r4, [r3] + add r3, r0, #0 + add r3, #0x34 + ldrb r3, [r3] + cmp r4, r3 + blo _0225656A + add r3, r0, #0 + add r3, #0x37 + strb r1, [r3] +_0225656A: + add r3, r0, #0 + add r3, #0x37 + ldrb r4, [r3] + add r3, r0, #0 + add r3, #0x36 + ldrb r3, [r3] + cmp r4, r3 + beq _0225654E + mov r0, #1 + pop {r3, r4} + bx lr +_02256580: + mov r0, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov44_0225653C + + thumb_func_start ov44_02256588 +ov44_02256588: ; 0x02256588 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256598 + cmp r0, #1 + beq _022565A8 + b _022565B6 +_02256598: + ldr r0, [r4, #0x38] + mov r1, #1 + bl ov44_02256744 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022565B6 +_022565A8: + ldr r0, [r4, #0x38] + bl ov44_02256774 + cmp r0, #0 + beq _022565B6 + mov r0, #1 + pop {r4, pc} +_022565B6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov44_02256588 + + .rodata + + + .global Unk_ov44_02256CB4 +Unk_ov44_02256CB4: ; 0x02256CB4 + .incbin "incbin/overlay44_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov44_02256CC0 +Unk_ov44_02256CC0: ; 0x02256CC0 + .incbin "incbin/overlay44_rodata.bin", 0xC, 0xC + + .section .sinit, 4 + .word ov44_022561C0 diff --git a/asm/overlay44.s b/asm/ov44_022565BC.s similarity index 63% rename from asm/overlay44.s rename to asm/ov44_022565BC.s index a2730b8fa..2d23ba10c 100644 --- a/asm/overlay44.s +++ b/asm/ov44_022565BC.s @@ -1,559 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov44_022561C0 -ov44_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov44_022561D4 - ldr r1, _022561D0 ; =ov44_02256374 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov44_022561D4 -_022561D0: .word ov44_02256374 - thumb_func_end ov44_022561C0 - - thumb_func_start ov44_022561D4 -ov44_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x68 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov44_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov44_02256338 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov44_02256338 - thumb_func_end ov44_022561D4 - - thumb_func_start ov44_0225621C -ov44_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #4] - add r0, r1, #0 - str r1, [sp, #8] - str r2, [sp, #0xc] - bl ov25_02254544 - bl sub_0207A268 - mov r1, #0 - str r0, [sp, #0x14] - str r1, [sp, #0x10] - bl sub_0207A0F8 - ldr r1, [sp, #4] - mov r7, #0 - add r1, #0x34 - strb r0, [r1] - ldr r0, [sp, #4] - add r0, #0x34 - ldrb r0, [r0] - cmp r0, #0 - ble _0225629E - ldr r6, [sp, #4] - add r5, r6, #0 -_02256250: - ldr r0, [sp, #0x14] - add r1, r7, #0 - bl sub_0207A0FC - mov r1, #0x4c - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - bne _02256292 - add r0, r4, #0 - bl sub_02079D40 - str r0, [r6, #4] - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - strh r0, [r5, #0x1c] - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - strh r0, [r5, #0x28] - ldr r0, [sp, #0x10] - str r4, [r6, #0x48] - add r0, r0, #1 - add r6, r6, #4 - add r5, r5, #2 - str r0, [sp, #0x10] -_02256292: - ldr r0, [sp, #4] - add r7, r7, #1 - add r0, #0x34 - ldrb r0, [r0] - cmp r7, r0 - blt _02256250 -_0225629E: - ldr r1, [sp, #4] - ldr r0, [sp, #0x10] - add r1, #0x34 - strb r0, [r1] - ldr r0, [sp, #4] - mov r1, #0 - add r0, #0x36 - strb r1, [r0] - ldr r0, [sp, #4] - add r0, #0x34 - ldrb r0, [r0] - cmp r0, #1 - bls _022562BA - mov r1, #1 -_022562BA: - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - add r0, #0x37 - strb r1, [r0] - ldr r0, [sp, #4] - ldr r1, [sp, #4] - add r0, #0x38 - add r1, r1, #4 - bl ov44_022565BC - cmp r0, #0 - beq _02256304 - ldr r0, [sp, #4] - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #1] - strb r1, [r0, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _0225630C ; =0x02256CB4 - ldr r2, _02256310 ; =ov44_0225632C - ldr r3, [sp, #4] - mov r1, #3 - bl ov25_02255ACC - ldr r1, [sp, #4] - str r0, [r1, #0x40] - ldr r0, [sp, #4] - mov r1, #0 - add r0, #0x46 - strh r1, [r0] - ldr r1, [sp, #8] - ldr r0, [sp, #4] - add sp, #0x18 - str r1, [r0, #0x3c] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02256304: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225630C: .word 0x02256CB4 -_02256310: .word ov44_0225632C - thumb_func_end ov44_0225621C - - thumb_func_start ov44_02256314 -ov44_02256314: ; 0x02256314 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - bl ov25_02255B34 - ldr r0, [r4, #0x38] - bl ov44_022565F8 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov44_02256314 - - thumb_func_start ov44_0225632C -ov44_0225632C: ; 0x0225632C - add r2, r3, #0 - add r2, #0x44 - strh r0, [r2] - add r3, #0x46 - strh r1, [r3] - bx lr - thumb_func_end ov44_0225632C - - thumb_func_start ov44_02256338 -ov44_02256338: ; 0x02256338 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _0225636E - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x40] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256370 ; =0x02256CC0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _0225636E - add r0, r4, #0 - bl ov44_02256314 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x3c] - bl ov25_02254260 -_0225636E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256370: .word 0x02256CC0 - thumb_func_end ov44_02256338 - - thumb_func_start ov44_02256374 -ov44_02256374: ; 0x02256374 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov44_02256374 - - thumb_func_start ov44_0225637C -ov44_0225637C: ; 0x0225637C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256384 - b _02256386 -_02256384: - mov r1, #2 -_02256386: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov44_0225637C - - thumb_func_start ov44_02256390 -ov44_02256390: ; 0x02256390 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563A0 - cmp r0, #1 - beq _022563B0 - b _022563CA -_022563A0: - ldr r0, [r4, #0x38] - mov r1, #0 - bl ov44_02256744 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563CA -_022563B0: - ldr r0, [r4, #0x38] - mov r1, #0 - bl ov44_02256768 - cmp r0, #0 - beq _022563CA - ldr r0, [r4, #0x3c] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov44_0225637C -_022563CA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov44_02256390 - - thumb_func_start ov44_022563D0 -ov44_022563D0: ; 0x022563D0 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022563E4 - mov r1, #2 - bl ov44_0225637C - mov r0, #0 - pop {r4, pc} -_022563E4: - ldrb r1, [r4, #1] - cmp r1, #3 - bhi _022564E8 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022563F6: ; jump table - .short _022563FE - _022563F6 - 2 ; case 0 - .short _0225646C - _022563F6 - 2 ; case 1 - .short _0225647C - _022563F6 - 2 ; case 2 - .short _022564D8 - _022563F6 - 2 ; case 3 -_022563FE: - add r1, r4, #0 - add r1, #0x46 - ldrh r1, [r1] - cmp r1, #1 - bne _022564E8 - add r1, r4, #0 - add r1, #0x44 - ldrh r1, [r1] - cmp r1, #0 - beq _02256448 - cmp r1, #1 - beq _0225641C - cmp r1, #2 - beq _02256432 - b _02256464 -_0225641C: - bl ov44_022564F0 - cmp r0, #0 - beq _02256464 - ldr r0, [r4, #0x38] - mov r1, #4 - bl ov44_02256744 - mov r0, #1 - strb r0, [r4, #1] - b _02256464 -_02256432: - bl ov44_0225653C - cmp r0, #0 - beq _02256464 - ldr r0, [r4, #0x38] - mov r1, #5 - bl ov44_02256744 - mov r0, #1 - strb r0, [r4, #1] - b _02256464 -_02256448: - add r0, #0x34 - ldrb r0, [r0] - cmp r0, #1 - bls _0225645E - ldr r0, [r4, #0x38] - mov r1, #2 - bl ov44_02256744 - mov r0, #2 - strb r0, [r4, #1] - b _02256464 -_0225645E: - ldr r0, _022564EC ; =0x0000066E - bl ov25_02254424 -_02256464: - mov r0, #0 - add r4, #0x46 - strh r0, [r4] - b _022564E8 -_0225646C: - ldr r0, [r4, #0x38] - bl ov44_02256774 - cmp r0, #0 - beq _022564E8 - mov r0, #0 - strb r0, [r4, #1] - b _022564E8 -_0225647C: - add r0, #0x46 - ldrh r0, [r0] - cmp r0, #2 - bne _02256492 - ldr r0, [r4, #0x38] - mov r1, #3 - bl ov44_02256744 - mov r0, #0 - strb r0, [r4, #1] - b _022564E8 -_02256492: - cmp r0, #3 - bne _022564E8 - add r0, r4, #0 - add r0, #0x36 - ldrb r0, [r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x48] - str r0, [r4, #0x60] - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x48] - str r0, [r4, #0x64] - add r0, r4, #0 - add r0, #0x60 - bl ov5_021E7790 - add r1, r4, #0 - add r1, #0x35 - strb r0, [r1] - ldr r0, [r4, #0x38] - mov r1, #3 - bl ov44_02256744 - ldr r0, [r4, #0x38] - mov r1, #6 - bl ov44_02256744 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022564E8 -_022564D8: - ldr r0, [r4, #0x38] - mov r1, #6 - bl ov44_02256768 - cmp r0, #0 - beq _022564E8 - mov r0, #0 - strb r0, [r4, #1] -_022564E8: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_022564EC: .word 0x0000066E - thumb_func_end ov44_022563D0 - - thumb_func_start ov44_022564F0 -ov44_022564F0: ; 0x022564F0 - push {r3, r4} - add r1, r0, #0 - add r1, #0x34 - ldrb r1, [r1] - cmp r1, #2 - bls _02256534 - add r2, r0, #0 - mov r1, #0 - add r2, #0x36 -_02256502: - ldrb r3, [r2] - add r3, r3, #1 - strb r3, [r2] - add r3, r0, #0 - add r3, #0x36 - ldrb r4, [r3] - add r3, r0, #0 - add r3, #0x34 - ldrb r3, [r3] - cmp r4, r3 - blo _0225651E - add r3, r0, #0 - add r3, #0x36 - strb r1, [r3] -_0225651E: - add r3, r0, #0 - add r3, #0x36 - ldrb r4, [r3] - add r3, r0, #0 - add r3, #0x37 - ldrb r3, [r3] - cmp r4, r3 - beq _02256502 - mov r0, #1 - pop {r3, r4} - bx lr -_02256534: - mov r0, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov44_022564F0 - - thumb_func_start ov44_0225653C -ov44_0225653C: ; 0x0225653C - push {r3, r4} - add r1, r0, #0 - add r1, #0x34 - ldrb r1, [r1] - cmp r1, #2 - bls _02256580 - add r2, r0, #0 - mov r1, #0 - add r2, #0x37 -_0225654E: - ldrb r3, [r2] - add r3, r3, #1 - strb r3, [r2] - add r3, r0, #0 - add r3, #0x37 - ldrb r4, [r3] - add r3, r0, #0 - add r3, #0x34 - ldrb r3, [r3] - cmp r4, r3 - blo _0225656A - add r3, r0, #0 - add r3, #0x37 - strb r1, [r3] -_0225656A: - add r3, r0, #0 - add r3, #0x37 - ldrb r4, [r3] - add r3, r0, #0 - add r3, #0x36 - ldrb r3, [r3] - cmp r4, r3 - beq _0225654E - mov r0, #1 - pop {r3, r4} - bx lr -_02256580: - mov r0, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov44_0225653C - - thumb_func_start ov44_02256588 -ov44_02256588: ; 0x02256588 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256598 - cmp r0, #1 - beq _022565A8 - b _022565B6 -_02256598: - ldr r0, [r4, #0x38] - mov r1, #1 - bl ov44_02256744 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022565B6 -_022565A8: - ldr r0, [r4, #0x38] - bl ov44_02256774 - cmp r0, #0 - beq _022565B6 - mov r0, #1 - pop {r4, pc} -_022565B6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov44_02256588 thumb_func_start ov44_022565BC ov44_022565BC: ; 0x022565BC @@ -1469,14 +920,35 @@ _02256CAE: pop {r3, r4, r5, r6, r7, pc} ; .align 2, 0 thumb_func_end ov44_02256AC8 - ; 0x02256CB4 - .rodata - .incbin "incbin/overlay44_rodata.bin" - .section .sinit, 4 - .word ov44_022561C0 - .bss - .space 0x0 + .global Unk_ov44_02256CCC +Unk_ov44_02256CCC: ; 0x02256CCC + .incbin "incbin/overlay44_rodata.bin", 0x18, 0x30 - 0x18 + + .global Unk_ov44_02256CE4 +Unk_ov44_02256CE4: ; 0x02256CE4 + .incbin "incbin/overlay44_rodata.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov44_02256D00 +Unk_ov44_02256D00: ; 0x02256D00 + .incbin "incbin/overlay44_rodata.bin", 0x4C, 0x78 - 0x4C + + .global Unk_ov44_02256D2C +Unk_ov44_02256D2C: ; 0x02256D2C + .incbin "incbin/overlay44_rodata.bin", 0x78, 0xA8 - 0x78 + + .global Unk_ov44_02256D5C +Unk_ov44_02256D5C: ; 0x02256D5C + .incbin "incbin/overlay44_rodata.bin", 0xA8, 0x108 - 0xA8 + + .global Unk_ov44_02256DBC +Unk_ov44_02256DBC: ; 0x02256DBC + .incbin "incbin/overlay44_rodata.bin", 0x108, 0x168 - 0x108 + + .global Unk_ov44_02256E1C +Unk_ov44_02256E1C: ; 0x02256E1C + .incbin "incbin/overlay44_rodata.bin", 0x168, 0x7C + diff --git a/asm/ov45_022561C0.s b/asm/ov45_022561C0.s new file mode 100644 index 000000000..2cf0a6462 --- /dev/null +++ b/asm/ov45_022561C0.s @@ -0,0 +1,732 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov45_022561C0 +ov45_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov45_022561D4 + ldr r1, _022561D0 ; =ov45_02256354 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov45_022561D4 +_022561D0: .word ov45_02256354 + thumb_func_end ov45_022561C0 + + thumb_func_start ov45_022561D4 +ov45_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x34 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov45_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov45_02256318 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov45_02256318 + thumb_func_end ov45_022561D4 + + thumb_func_start ov45_0225621C +ov45_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r6, r2, #0 + bl ov25_02254540 + str r0, [r5, #0x10] + bl sub_020568D8 + strb r0, [r5, #3] + ldr r0, [r5, #0x10] + add r1, sp, #8 + add r2, sp, #4 + bl sub_020568E0 + ldr r0, [sp, #8] + strb r0, [r5, #6] + ldr r0, [sp, #4] + strb r0, [r5, #7] + add r0, r5, #3 + bl ov45_022562C0 + add r0, r5, #0 + add r0, #8 + add r1, r5, #3 + add r2, r6, #0 + bl ov45_022566EC + cmp r0, #0 + beq _022562B0 + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _022562B8 ; =0x02256CAC + ldr r2, _022562BC ; =ov45_02256310 + mov r1, #6 + add r3, r5, #0 + bl ov25_02255ACC + str r0, [r5, #0x14] + mov r0, #0 + str r0, [r5, #0x1c] + ldr r0, [r5, #0x14] + mov r1, #2 + mov r2, #4 + bl ov25_02255C5C + ldr r0, [r5, #0x14] + mov r1, #3 + mov r2, #4 + bl ov25_02255C5C + mov r1, #4 + ldr r0, [r5, #0x14] + add r2, r1, #0 + bl ov25_02255C5C + ldr r0, [r5, #0x14] + mov r1, #5 + mov r2, #4 + bl ov25_02255C5C + mov r0, #0 + str r0, [r5, #0x2c] + str r0, [r5, #0x30] + add sp, #0xc + str r4, [r5, #0xc] + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_022562B0: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_022562B8: .word 0x02256CAC +_022562BC: .word ov45_02256310 + thumb_func_end ov45_0225621C + + thumb_func_start ov45_022562C0 +ov45_022562C0: ; 0x022562C0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, sp, #0 + bl sub_02013880 + ldr r0, [sp] + cmp r0, #0x18 + blo _022562DA + mov r1, #0x18 + bl sub_020E2178 + str r1, [sp] +_022562DA: + ldr r0, [sp, #4] + cmp r0, #0x3c + blo _022562EA + ldr r0, [sp] + mov r1, #0x3c + bl sub_020E2178 + str r1, [sp] +_022562EA: + ldr r0, [sp] + strb r0, [r4, #1] + ldr r0, [sp, #4] + strb r0, [r4, #2] + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov45_022562C0 + + thumb_func_start ov45_022562F8 +ov45_022562F8: ; 0x022562F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl ov25_02255B34 + ldr r0, [r4, #8] + bl ov45_02256728 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov45_022562F8 + + thumb_func_start ov45_02256310 +ov45_02256310: ; 0x02256310 + str r0, [r3, #0x18] + str r1, [r3, #0x1c] + bx lr + ; .align 2, 0 + thumb_func_end ov45_02256310 + + thumb_func_start ov45_02256318 +ov45_02256318: ; 0x02256318 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #5 + bhs _0225634E + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x14] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256350 ; =0x02256C98 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _0225634E + add r0, r4, #0 + bl ov45_022562F8 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0xc] + bl ov25_02254260 +_0225634E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256350: .word 0x02256C98 + thumb_func_end ov45_02256318 + + thumb_func_start ov45_02256354 +ov45_02256354: ; 0x02256354 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov45_02256354 + + thumb_func_start ov45_0225635C +ov45_0225635C: ; 0x0225635C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256364 + b _02256366 +_02256364: + mov r1, #4 +_02256366: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov45_0225635C + + thumb_func_start ov45_02256370 +ov45_02256370: ; 0x02256370 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256380 + cmp r0, #1 + beq _02256390 + b _022563BA +_02256380: + ldr r0, [r4, #8] + mov r1, #0 + bl ov45_02256918 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563BA +_02256390: + ldr r0, [r4, #8] + mov r1, #0 + bl ov45_0225693C + cmp r0, #0 + beq _022563BA + ldr r0, [r4, #0xc] + bl ov25_0225424C + ldrb r0, [r4, #3] + cmp r0, #0 + beq _022563B2 + add r0, r4, #0 + mov r1, #2 + bl ov45_0225635C + b _022563BA +_022563B2: + add r0, r4, #0 + mov r1, #1 + bl ov45_0225635C +_022563BA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov45_02256370 + + thumb_func_start ov45_022563C0 +ov45_022563C0: ; 0x022563C0 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022563D4 + mov r1, #4 + bl ov45_0225635C + mov r0, #0 + pop {r4, pc} +_022563D4: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563E0 + cmp r0, #1 + beq _022564B2 + b _022564C6 +_022563E0: + ldr r1, [r4, #0x1c] + cmp r1, #1 + bne _0225641A + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _0225641A + mov r0, #1 + strb r0, [r4, #3] + add r0, r4, #3 + bl ov45_022562C0 + mov r2, #6 + mov r3, #7 + ldrsb r2, [r4, r2] + ldrsb r3, [r4, r3] + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020568F4 + ldr r0, [r4, #8] + mov r1, #2 + bl ov45_02256918 + mov r0, #0 + str r0, [r4, #0x1c] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022564C6 +_0225641A: + cmp r1, #1 + bne _02256430 + ldr r0, [r4, #0x18] + cmp r0, #1 + bne _02256430 + mov r0, #0 + str r0, [r4, #0x1c] + ldr r0, _022564CC ; =0x0000066E + bl ov25_02254424 + b _022564C6 +_02256430: + cmp r1, #1 + beq _02256438 + cmp r1, #7 + bne _022564C6 +_02256438: + ldr r0, [r4, #0x18] + cmp r0, #5 + bhi _022564A4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225644A: ; jump table + .short _022564A4 - _0225644A - 2 ; case 0 + .short _022564A4 - _0225644A - 2 ; case 1 + .short _02256456 - _0225644A - 2 ; case 2 + .short _0225646A - _0225644A - 2 ; case 3 + .short _0225647E - _0225644A - 2 ; case 4 + .short _02256492 - _0225644A - 2 ; case 5 +_02256456: + mov r0, #6 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #6] + ldrsb r0, [r4, r0] + cmp r0, #0x17 + ble _022564A4 + mov r0, #0 + strb r0, [r4, #6] + b _022564A4 +_0225646A: + mov r0, #6 + ldrsb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, #6] + ldrsb r0, [r4, r0] + cmp r0, #0 + bge _022564A4 + mov r0, #0x17 + strb r0, [r4, #6] + b _022564A4 +_0225647E: + mov r0, #7 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #7] + ldrsb r0, [r4, r0] + cmp r0, #0x3b + ble _022564A4 + mov r0, #0 + strb r0, [r4, #7] + b _022564A4 +_02256492: + mov r0, #7 + ldrsb r1, [r4, r0] + sub r1, r1, #1 + strb r1, [r4, #7] + ldrsb r0, [r4, r0] + cmp r0, #0 + bge _022564A4 + mov r0, #0x3b + strb r0, [r4, #7] +_022564A4: + mov r0, #0 + str r0, [r4, #0x1c] + ldr r0, [r4, #8] + mov r1, #4 + bl ov45_02256918 + b _022564C6 +_022564B2: + ldr r0, [r4, #8] + mov r1, #2 + bl ov45_0225693C + cmp r0, #0 + beq _022564C6 + add r0, r4, #0 + mov r1, #2 + bl ov45_0225635C +_022564C6: + mov r0, #0 + pop {r4, pc} + nop +_022564CC: .word 0x0000066E + thumb_func_end ov45_022563C0 + + thumb_func_start ov45_022564D0 +ov45_022564D0: ; 0x022564D0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022564E8 + mov r1, #4 + bl ov45_0225635C + add sp, #8 + mov r0, #0 + pop {r4, pc} +_022564E8: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022564F4 + cmp r0, #1 + beq _02256582 + b _02256592 +_022564F4: + add r0, r4, #3 + bl ov45_022566CC + cmp r0, #0 + beq _0225650C + add r0, r4, #0 + mov r1, #3 + bl ov45_0225635C + add sp, #8 + mov r0, #0 + pop {r4, pc} +_0225650C: + ldr r1, [r4, #0x1c] + cmp r1, #1 + bne _02256532 + ldr r0, [r4, #0x18] + cmp r0, #1 + bne _02256532 + mov r0, #0 + strb r0, [r4, #3] + ldr r0, [r4, #8] + mov r1, #3 + bl ov45_02256918 + mov r0, #0 + str r0, [r4, #0x1c] + add r0, r4, #0 + mov r1, #1 + bl ov45_0225635C + b _02256592 +_02256532: + cmp r1, #1 + bne _02256544 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _02256544 + ldr r0, _02256598 ; =0x0000066E + bl ov25_02254424 + b _02256592 +_02256544: + add r0, r4, #0 + bl ov45_02256664 + cmp r0, #0 + bne _02256554 + add r0, r4, #0 + bl ov45_02256668 +_02256554: + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov45_02256680 + cmp r0, #0 + beq _02256592 + mov r0, #5 + ldrsb r0, [r4, r0] + ldr r1, [sp] + cmp r1, r0 + beq _02256592 + strb r1, [r4, #5] + ldr r0, [sp, #4] + mov r1, #4 + strb r0, [r4, #4] + ldr r0, [r4, #8] + bl ov45_02256918 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256592 +_02256582: + ldr r0, [r4, #8] + mov r1, #4 + bl ov45_0225693C + cmp r0, #0 + beq _02256592 + mov r0, #0 + strb r0, [r4, #1] +_02256592: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_02256598: .word 0x0000066E + thumb_func_end ov45_022564D0 + + thumb_func_start ov45_0225659C +ov45_0225659C: ; 0x0225659C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022565B4 + mov r1, #4 + bl ov45_0225635C + add sp, #8 + mov r0, #0 + pop {r4, pc} +_022565B4: + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022565C0 + cmp r0, #1 + beq _022565D0 + b _0225665C +_022565C0: + ldr r0, [r4, #8] + mov r1, #5 + bl ov45_02256918 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225665C +_022565D0: + add r0, r4, #3 + bl ov45_022566CC + cmp r0, #0 + bne _022565F6 + ldr r0, [r4, #8] + bl ov45_02256C90 + ldr r0, [r4, #8] + mov r1, #2 + bl ov45_02256918 + add r0, r4, #0 + mov r1, #2 + bl ov45_0225635C + add sp, #8 + mov r0, #0 + pop {r4, pc} +_022565F6: + ldr r0, [r4, #0x1c] + cmp r0, #1 + bne _02256626 + ldr r0, [r4, #0x18] + cmp r0, #1 + bne _02256626 + mov r0, #0 + strb r0, [r4, #3] + ldr r0, [r4, #8] + bl ov45_02256C90 + ldr r0, [r4, #8] + mov r1, #3 + bl ov45_02256918 + mov r0, #0 + str r0, [r4, #0x1c] + add r0, r4, #0 + mov r1, #1 + bl ov45_0225635C + add sp, #8 + mov r0, #0 + pop {r4, pc} +_02256626: + add r0, r4, #0 + bl ov45_02256664 + cmp r0, #0 + bne _02256636 + add r0, r4, #0 + bl ov45_02256668 +_02256636: + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov45_02256680 + cmp r0, #0 + beq _0225665C + mov r0, #5 + ldrsb r0, [r4, r0] + ldr r1, [sp] + cmp r1, r0 + beq _0225665C + strb r1, [r4, #5] + ldr r0, [sp, #4] + mov r1, #4 + strb r0, [r4, #4] + ldr r0, [r4, #8] + bl ov45_02256918 +_0225665C: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov45_0225659C + + thumb_func_start ov45_02256664 +ov45_02256664: ; 0x02256664 + ldr r0, [r0, #0x2c] + bx lr + thumb_func_end ov45_02256664 + + thumb_func_start ov45_02256668 +ov45_02256668: ; 0x02256668 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + cmp r0, #0 + bne _0225667E + add r0, r4, #0 + add r0, #0x20 + bl sub_02013880 + mov r0, #1 + str r0, [r4, #0x30] +_0225667E: + pop {r4, pc} + thumb_func_end ov45_02256668 + + thumb_func_start ov45_02256680 +ov45_02256680: ; 0x02256680 + ldr r3, [r0, #0x30] + cmp r3, #0 + beq _02256692 + ldr r3, [r0, #0x20] + str r3, [r1, #0] + ldr r0, [r0, #0x24] + str r0, [r2, #0] + mov r0, #1 + bx lr +_02256692: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov45_02256680 + + thumb_func_start ov45_02256698 +ov45_02256698: ; 0x02256698 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022566A8 + cmp r0, #1 + beq _022566B8 + b _022566C6 +_022566A8: + ldr r0, [r4, #8] + mov r1, #1 + bl ov45_02256918 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022566C6 +_022566B8: + ldr r0, [r4, #8] + bl ov45_02256948 + cmp r0, #0 + beq _022566C6 + mov r0, #1 + pop {r4, pc} +_022566C6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov45_02256698 + + thumb_func_start ov45_022566CC +ov45_022566CC: ; 0x022566CC + mov r1, #1 + mov r2, #3 + ldrsb r3, [r0, r1] + ldrsb r2, [r0, r2] + cmp r3, r2 + bne _022566E4 + mov r2, #2 + ldrsb r3, [r0, r2] + mov r2, #4 + ldrsb r0, [r0, r2] + cmp r3, r0 + beq _022566E6 +_022566E4: + mov r1, #0 +_022566E6: + add r0, r1, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov45_022566CC + + .rodata + + + .global Unk_ov45_02256C98 +Unk_ov45_02256C98: ; 0x02256C98 + .incbin "incbin/overlay45_rodata.bin", 0x0, 0x14 - 0x0 + + .global Unk_ov45_02256CAC +Unk_ov45_02256CAC: ; 0x02256CAC + .incbin "incbin/overlay45_rodata.bin", 0x14, 0x18 + + .section .sinit, 4 + .word ov45_022561C0 diff --git a/asm/overlay45.s b/asm/ov45_022566EC.s similarity index 50% rename from asm/overlay45.s rename to asm/ov45_022566EC.s index 6cc75b3ca..88cae53df 100644 --- a/asm/overlay45.s +++ b/asm/ov45_022566EC.s @@ -1,718 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov45_022561C0 -ov45_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov45_022561D4 - ldr r1, _022561D0 ; =ov45_02256354 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov45_022561D4 -_022561D0: .word ov45_02256354 - thumb_func_end ov45_022561C0 - - thumb_func_start ov45_022561D4 -ov45_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x34 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov45_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov45_02256318 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov45_02256318 - thumb_func_end ov45_022561D4 - - thumb_func_start ov45_0225621C -ov45_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r6, r2, #0 - bl ov25_02254540 - str r0, [r5, #0x10] - bl sub_020568D8 - strb r0, [r5, #3] - ldr r0, [r5, #0x10] - add r1, sp, #8 - add r2, sp, #4 - bl sub_020568E0 - ldr r0, [sp, #8] - strb r0, [r5, #6] - ldr r0, [sp, #4] - strb r0, [r5, #7] - add r0, r5, #3 - bl ov45_022562C0 - add r0, r5, #0 - add r0, #8 - add r1, r5, #3 - add r2, r6, #0 - bl ov45_022566EC - cmp r0, #0 - beq _022562B0 - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _022562B8 ; =0x02256CAC - ldr r2, _022562BC ; =ov45_02256310 - mov r1, #6 - add r3, r5, #0 - bl ov25_02255ACC - str r0, [r5, #0x14] - mov r0, #0 - str r0, [r5, #0x1c] - ldr r0, [r5, #0x14] - mov r1, #2 - mov r2, #4 - bl ov25_02255C5C - ldr r0, [r5, #0x14] - mov r1, #3 - mov r2, #4 - bl ov25_02255C5C - mov r1, #4 - ldr r0, [r5, #0x14] - add r2, r1, #0 - bl ov25_02255C5C - ldr r0, [r5, #0x14] - mov r1, #5 - mov r2, #4 - bl ov25_02255C5C - mov r0, #0 - str r0, [r5, #0x2c] - str r0, [r5, #0x30] - add sp, #0xc - str r4, [r5, #0xc] - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_022562B0: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_022562B8: .word 0x02256CAC -_022562BC: .word ov45_02256310 - thumb_func_end ov45_0225621C - - thumb_func_start ov45_022562C0 -ov45_022562C0: ; 0x022562C0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, sp, #0 - bl sub_02013880 - ldr r0, [sp] - cmp r0, #0x18 - blo _022562DA - mov r1, #0x18 - bl sub_020E2178 - str r1, [sp] -_022562DA: - ldr r0, [sp, #4] - cmp r0, #0x3c - blo _022562EA - ldr r0, [sp] - mov r1, #0x3c - bl sub_020E2178 - str r1, [sp] -_022562EA: - ldr r0, [sp] - strb r0, [r4, #1] - ldr r0, [sp, #4] - strb r0, [r4, #2] - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov45_022562C0 - - thumb_func_start ov45_022562F8 -ov45_022562F8: ; 0x022562F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl ov25_02255B34 - ldr r0, [r4, #8] - bl ov45_02256728 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov45_022562F8 - - thumb_func_start ov45_02256310 -ov45_02256310: ; 0x02256310 - str r0, [r3, #0x18] - str r1, [r3, #0x1c] - bx lr - ; .align 2, 0 - thumb_func_end ov45_02256310 - - thumb_func_start ov45_02256318 -ov45_02256318: ; 0x02256318 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #5 - bhs _0225634E - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x14] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256350 ; =0x02256C98 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _0225634E - add r0, r4, #0 - bl ov45_022562F8 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0xc] - bl ov25_02254260 -_0225634E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256350: .word 0x02256C98 - thumb_func_end ov45_02256318 - - thumb_func_start ov45_02256354 -ov45_02256354: ; 0x02256354 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov45_02256354 - - thumb_func_start ov45_0225635C -ov45_0225635C: ; 0x0225635C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256364 - b _02256366 -_02256364: - mov r1, #4 -_02256366: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov45_0225635C - - thumb_func_start ov45_02256370 -ov45_02256370: ; 0x02256370 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256380 - cmp r0, #1 - beq _02256390 - b _022563BA -_02256380: - ldr r0, [r4, #8] - mov r1, #0 - bl ov45_02256918 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563BA -_02256390: - ldr r0, [r4, #8] - mov r1, #0 - bl ov45_0225693C - cmp r0, #0 - beq _022563BA - ldr r0, [r4, #0xc] - bl ov25_0225424C - ldrb r0, [r4, #3] - cmp r0, #0 - beq _022563B2 - add r0, r4, #0 - mov r1, #2 - bl ov45_0225635C - b _022563BA -_022563B2: - add r0, r4, #0 - mov r1, #1 - bl ov45_0225635C -_022563BA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov45_02256370 - - thumb_func_start ov45_022563C0 -ov45_022563C0: ; 0x022563C0 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022563D4 - mov r1, #4 - bl ov45_0225635C - mov r0, #0 - pop {r4, pc} -_022563D4: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563E0 - cmp r0, #1 - beq _022564B2 - b _022564C6 -_022563E0: - ldr r1, [r4, #0x1c] - cmp r1, #1 - bne _0225641A - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _0225641A - mov r0, #1 - strb r0, [r4, #3] - add r0, r4, #3 - bl ov45_022562C0 - mov r2, #6 - mov r3, #7 - ldrsb r2, [r4, r2] - ldrsb r3, [r4, r3] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020568F4 - ldr r0, [r4, #8] - mov r1, #2 - bl ov45_02256918 - mov r0, #0 - str r0, [r4, #0x1c] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022564C6 -_0225641A: - cmp r1, #1 - bne _02256430 - ldr r0, [r4, #0x18] - cmp r0, #1 - bne _02256430 - mov r0, #0 - str r0, [r4, #0x1c] - ldr r0, _022564CC ; =0x0000066E - bl ov25_02254424 - b _022564C6 -_02256430: - cmp r1, #1 - beq _02256438 - cmp r1, #7 - bne _022564C6 -_02256438: - ldr r0, [r4, #0x18] - cmp r0, #5 - bhi _022564A4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225644A: ; jump table - .short _022564A4 - _0225644A - 2 ; case 0 - .short _022564A4 - _0225644A - 2 ; case 1 - .short _02256456 - _0225644A - 2 ; case 2 - .short _0225646A - _0225644A - 2 ; case 3 - .short _0225647E - _0225644A - 2 ; case 4 - .short _02256492 - _0225644A - 2 ; case 5 -_02256456: - mov r0, #6 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #6] - ldrsb r0, [r4, r0] - cmp r0, #0x17 - ble _022564A4 - mov r0, #0 - strb r0, [r4, #6] - b _022564A4 -_0225646A: - mov r0, #6 - ldrsb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, #6] - ldrsb r0, [r4, r0] - cmp r0, #0 - bge _022564A4 - mov r0, #0x17 - strb r0, [r4, #6] - b _022564A4 -_0225647E: - mov r0, #7 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #7] - ldrsb r0, [r4, r0] - cmp r0, #0x3b - ble _022564A4 - mov r0, #0 - strb r0, [r4, #7] - b _022564A4 -_02256492: - mov r0, #7 - ldrsb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, #7] - ldrsb r0, [r4, r0] - cmp r0, #0 - bge _022564A4 - mov r0, #0x3b - strb r0, [r4, #7] -_022564A4: - mov r0, #0 - str r0, [r4, #0x1c] - ldr r0, [r4, #8] - mov r1, #4 - bl ov45_02256918 - b _022564C6 -_022564B2: - ldr r0, [r4, #8] - mov r1, #2 - bl ov45_0225693C - cmp r0, #0 - beq _022564C6 - add r0, r4, #0 - mov r1, #2 - bl ov45_0225635C -_022564C6: - mov r0, #0 - pop {r4, pc} - nop -_022564CC: .word 0x0000066E - thumb_func_end ov45_022563C0 - - thumb_func_start ov45_022564D0 -ov45_022564D0: ; 0x022564D0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022564E8 - mov r1, #4 - bl ov45_0225635C - add sp, #8 - mov r0, #0 - pop {r4, pc} -_022564E8: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022564F4 - cmp r0, #1 - beq _02256582 - b _02256592 -_022564F4: - add r0, r4, #3 - bl ov45_022566CC - cmp r0, #0 - beq _0225650C - add r0, r4, #0 - mov r1, #3 - bl ov45_0225635C - add sp, #8 - mov r0, #0 - pop {r4, pc} -_0225650C: - ldr r1, [r4, #0x1c] - cmp r1, #1 - bne _02256532 - ldr r0, [r4, #0x18] - cmp r0, #1 - bne _02256532 - mov r0, #0 - strb r0, [r4, #3] - ldr r0, [r4, #8] - mov r1, #3 - bl ov45_02256918 - mov r0, #0 - str r0, [r4, #0x1c] - add r0, r4, #0 - mov r1, #1 - bl ov45_0225635C - b _02256592 -_02256532: - cmp r1, #1 - bne _02256544 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _02256544 - ldr r0, _02256598 ; =0x0000066E - bl ov25_02254424 - b _02256592 -_02256544: - add r0, r4, #0 - bl ov45_02256664 - cmp r0, #0 - bne _02256554 - add r0, r4, #0 - bl ov45_02256668 -_02256554: - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov45_02256680 - cmp r0, #0 - beq _02256592 - mov r0, #5 - ldrsb r0, [r4, r0] - ldr r1, [sp] - cmp r1, r0 - beq _02256592 - strb r1, [r4, #5] - ldr r0, [sp, #4] - mov r1, #4 - strb r0, [r4, #4] - ldr r0, [r4, #8] - bl ov45_02256918 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256592 -_02256582: - ldr r0, [r4, #8] - mov r1, #4 - bl ov45_0225693C - cmp r0, #0 - beq _02256592 - mov r0, #0 - strb r0, [r4, #1] -_02256592: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_02256598: .word 0x0000066E - thumb_func_end ov45_022564D0 - - thumb_func_start ov45_0225659C -ov45_0225659C: ; 0x0225659C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022565B4 - mov r1, #4 - bl ov45_0225635C - add sp, #8 - mov r0, #0 - pop {r4, pc} -_022565B4: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022565C0 - cmp r0, #1 - beq _022565D0 - b _0225665C -_022565C0: - ldr r0, [r4, #8] - mov r1, #5 - bl ov45_02256918 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225665C -_022565D0: - add r0, r4, #3 - bl ov45_022566CC - cmp r0, #0 - bne _022565F6 - ldr r0, [r4, #8] - bl ov45_02256C90 - ldr r0, [r4, #8] - mov r1, #2 - bl ov45_02256918 - add r0, r4, #0 - mov r1, #2 - bl ov45_0225635C - add sp, #8 - mov r0, #0 - pop {r4, pc} -_022565F6: - ldr r0, [r4, #0x1c] - cmp r0, #1 - bne _02256626 - ldr r0, [r4, #0x18] - cmp r0, #1 - bne _02256626 - mov r0, #0 - strb r0, [r4, #3] - ldr r0, [r4, #8] - bl ov45_02256C90 - ldr r0, [r4, #8] - mov r1, #3 - bl ov45_02256918 - mov r0, #0 - str r0, [r4, #0x1c] - add r0, r4, #0 - mov r1, #1 - bl ov45_0225635C - add sp, #8 - mov r0, #0 - pop {r4, pc} -_02256626: - add r0, r4, #0 - bl ov45_02256664 - cmp r0, #0 - bne _02256636 - add r0, r4, #0 - bl ov45_02256668 -_02256636: - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov45_02256680 - cmp r0, #0 - beq _0225665C - mov r0, #5 - ldrsb r0, [r4, r0] - ldr r1, [sp] - cmp r1, r0 - beq _0225665C - strb r1, [r4, #5] - ldr r0, [sp, #4] - mov r1, #4 - strb r0, [r4, #4] - ldr r0, [r4, #8] - bl ov45_02256918 -_0225665C: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov45_0225659C - - thumb_func_start ov45_02256664 -ov45_02256664: ; 0x02256664 - ldr r0, [r0, #0x2c] - bx lr - thumb_func_end ov45_02256664 - - thumb_func_start ov45_02256668 -ov45_02256668: ; 0x02256668 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - cmp r0, #0 - bne _0225667E - add r0, r4, #0 - add r0, #0x20 - bl sub_02013880 - mov r0, #1 - str r0, [r4, #0x30] -_0225667E: - pop {r4, pc} - thumb_func_end ov45_02256668 - - thumb_func_start ov45_02256680 -ov45_02256680: ; 0x02256680 - ldr r3, [r0, #0x30] - cmp r3, #0 - beq _02256692 - ldr r3, [r0, #0x20] - str r3, [r1, #0] - ldr r0, [r0, #0x24] - str r0, [r2, #0] - mov r0, #1 - bx lr -_02256692: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov45_02256680 - - thumb_func_start ov45_02256698 -ov45_02256698: ; 0x02256698 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022566A8 - cmp r0, #1 - beq _022566B8 - b _022566C6 -_022566A8: - ldr r0, [r4, #8] - mov r1, #1 - bl ov45_02256918 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022566C6 -_022566B8: - ldr r0, [r4, #8] - bl ov45_02256948 - cmp r0, #0 - beq _022566C6 - mov r0, #1 - pop {r4, pc} -_022566C6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov45_02256698 - - thumb_func_start ov45_022566CC -ov45_022566CC: ; 0x022566CC - mov r1, #1 - mov r2, #3 - ldrsb r3, [r0, r1] - ldrsb r2, [r0, r2] - cmp r3, r2 - bne _022566E4 - mov r2, #2 - ldrsb r3, [r0, r2] - mov r2, #4 - ldrsb r0, [r0, r2] - cmp r3, r0 - beq _022566E6 -_022566E4: - mov r1, #0 -_022566E6: - add r0, r1, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov45_022566CC thumb_func_start ov45_022566EC ov45_022566EC: ; 0x022566EC @@ -1410,14 +702,19 @@ ov45_02256C90: ; 0x02256C90 str r1, [r0, #0] bx lr thumb_func_end ov45_02256C90 - ; 0x02256C98 - .rodata - .incbin "incbin/overlay45_rodata.bin" - .section .sinit, 4 - .word ov45_022561C0 - .bss - .space 0x0 + .global Unk_ov45_02256CC4 +Unk_ov45_02256CC4: ; 0x02256CC4 + .incbin "incbin/overlay45_rodata.bin", 0x2C, 0x48 - 0x2C + + .global Unk_ov45_02256CE0 +Unk_ov45_02256CE0: ; 0x02256CE0 + .incbin "incbin/overlay45_rodata.bin", 0x48, 0x9C - 0x48 + + .global Unk_ov45_02256D34 +Unk_ov45_02256D34: ; 0x02256D34 + .incbin "incbin/overlay45_rodata.bin", 0x9C, 0xD0 + diff --git a/asm/overlay46.s b/asm/ov46_022561C0.s similarity index 65% rename from asm/overlay46.s rename to asm/ov46_022561C0.s index f467213ab..6275a0dec 100644 --- a/asm/overlay46.s +++ b/asm/ov46_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov46_022561C0 ov46_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -1335,697 +1338,16 @@ _02256BC4: .word 0x040002A0 _02256BC8: .word 0x040002A8 thumb_func_end ov46_02256B10 - thumb_func_start ov46_02256BCC -ov46_02256BCC: ; 0x02256BCC - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #8 - mov r1, #0xac - bl sub_02018144 - add r4, r0, #0 - beq _02256C08 - add r0, #8 - mov r1, #8 - bl ov25_02255090 - str r5, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - bl ov25_02254664 - str r0, [r4, #0x30] - add r0, r4, #0 - add r1, r5, #0 - bl ov46_02256C20 - ldr r0, [r4, #4] - cmp r0, #0 - beq _02256C08 - str r4, [r6, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256C08: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov46_02256BCC - - thumb_func_start ov46_02256C0C -ov46_02256C0C: ; 0x02256C0C - push {r4, lr} - add r4, r0, #0 - beq _02256C1C - bl ov46_02256CF4 - add r0, r4, #0 - bl sub_020181C4 -_02256C1C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov46_02256C0C - - thumb_func_start ov46_02256C20 -ov46_02256C20: ; 0x02256C20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r3, #0 - str r3, [sp] - mov r2, #1 - add r7, r0, #0 - str r1, [sp, #0xc] - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #2 - bl sub_02006EC0 - mov r0, #0 - str r0, [sp] - mov r2, #1 - mov r3, #0xa - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0x5e - lsl r3, r3, #8 - bl sub_02006EC0 - mov r0, #8 - str r0, [sp] - add r0, r7, #0 - add r0, #0x78 - mov r1, #0xc - mov r2, #0x5c - mov r3, #0x5d - bl ov25_02255958 - mov r0, #8 - str r0, [sp] - add r0, r7, #0 - add r0, #0x8c - mov r1, #0xc - mov r2, #3 - mov r3, #4 - bl ov25_02255958 - add r0, r7, #0 - str r0, [sp, #0x14] - add r0, #0x78 - str r0, [sp, #0x14] - add r0, r7, #0 - str r0, [sp, #0x10] - add r0, #0x8c - ldr r6, _02256CF0 ; =0x022571E4 - mov r4, #0 - add r5, r7, #0 - str r0, [sp, #0x10] -_02256C8E: - cmp r4, #0xd - blt _02256CA4 - cmp r4, #0x10 - bgt _02256CA4 - ldr r0, [r7, #0x30] - ldr r2, [sp, #0x10] - add r1, r6, #0 - bl ov25_02255810 - str r0, [r5, #0x34] - b _02256CB6 -_02256CA4: - ldr r0, [r7, #0x30] - ldr r2, [sp, #0x14] - add r1, r6, #0 - bl ov25_02255810 - mov r1, #0x50 - str r0, [r5, #0x34] - bl ov25_02255940 -_02256CB6: - add r4, r4, #1 - add r6, #0x10 - add r5, r5, #4 - cmp r4, #0x11 - blt _02256C8E - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov46_02257054 - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov46_02257094 - ldr r0, [sp, #0xc] - ldr r0, [r0, #8] - cmp r0, #0 - bne _02256CDC - mov r1, #1 - b _02256CDE -_02256CDC: - mov r1, #0 -_02256CDE: - add r0, r7, #0 - bl ov46_022570C4 - mov r0, #0 - add r7, #0xa8 - str r0, [r7, #0] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256CF0: .word 0x022571E4 - thumb_func_end ov46_02256C20 - - thumb_func_start ov46_02256CF4 -ov46_02256CF4: ; 0x02256CF4 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02256CFC: - ldr r1, [r5, #0x34] - cmp r1, #0 - beq _02256D08 - ldr r0, [r6, #0x30] - bl ov25_022558B0 -_02256D08: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x11 - blt _02256CFC - add r0, r6, #0 - add r0, #0x78 - bl ov25_022559B0 - add r6, #0x8c - add r0, r6, #0 - bl ov25_022559B0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov46_02256CF4 - - thumb_func_start ov46_02256D24 -ov46_02256D24: ; 0x02256D24 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _02256D44 ; =0x02257178 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_02256D44: .word 0x02257178 - thumb_func_end ov46_02256D24 - - thumb_func_start ov46_02256D48 -ov46_02256D48: ; 0x02256D48 - ldr r3, _02256D50 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_02256D50: .word ov25_02255130 - thumb_func_end ov46_02256D48 - - thumb_func_start ov46_02256D54 -ov46_02256D54: ; 0x02256D54 - ldr r3, _02256D5C ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_02256D5C: .word ov25_02255154 - thumb_func_end ov46_02256D54 - - thumb_func_start ov46_02256D60 -ov46_02256D60: ; 0x02256D60 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov46_02256D60 - - thumb_func_start ov46_02256D74 -ov46_02256D74: ; 0x02256D74 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _02256E4C ; =0x0225715C - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0xc - mov r1, #0x5b - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0xc - mov r1, #0x5a - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256E50 ; =0x04001000 - ldr r0, _02256E54 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - ldr r1, [r4, #0] - ldr r0, [r1, #0xc] - cmp r0, #1 - beq _02256E08 - cmp r0, #2 - beq _02256DFE - cmp r0, #3 - beq _02256E1A - b _02256E40 -_02256DFE: - add r0, r4, #0 - mov r1, #6 - bl ov46_02256D24 - b _02256E40 -_02256E08: - ldr r0, [r4, #0x34] - mov r1, #3 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl ov25_022558C4 - b _02256E40 -_02256E1A: - ldr r0, [r1, #0x10] - cmp r0, #0 - ldr r0, [r4, #0x34] - beq _02256E32 - mov r1, #2 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl ov25_022558C4 - b _02256E40 -_02256E32: - mov r1, #3 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #0 - bl ov25_022558C4 -_02256E40: - add r0, r5, #0 - bl ov46_02256D60 - add sp, #0x14 - pop {r4, r5, pc} - nop -_02256E4C: .word 0x0225715C -_02256E50: .word 0x04001000 -_02256E54: .word 0xFFFFE0FF - thumb_func_end ov46_02256D74 - - thumb_func_start ov46_02256E58 -ov46_02256E58: ; 0x02256E58 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r5, #0 - bl ov25_02255248 - cmp r0, #0 - beq _02256E7A - cmp r0, #1 - beq _02256E88 - pop {r3, r4, r5, pc} -_02256E7A: - add r0, r4, #0 - mov r1, #1 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r5, #0 - bl ov25_0225524C -_02256E88: - add r0, r4, #0 - mov r1, #6 - bl ov46_02256D48 - cmp r0, #0 - beq _02256EA2 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019044 - add r0, r5, #0 - bl ov46_02256D60 -_02256EA2: - pop {r3, r4, r5, pc} - thumb_func_end ov46_02256E58 - - thumb_func_start ov46_02256EA4 -ov46_02256EA4: ; 0x02256EA4 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r4, #0 - mov r1, #0 - bl ov46_022570C4 - ldr r0, [r4, #0x34] - mov r1, #2 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #0 - bl ov25_022558C4 - add r0, r5, #0 - bl ov46_02256D60 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov46_02256EA4 - - thumb_func_start ov46_02256ED8 -ov46_02256ED8: ; 0x02256ED8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r4, #0 - mov r1, #1 - bl ov46_022570C4 - ldr r0, [r4, #0x34] - mov r1, #3 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl ov25_022558C4 - add r0, r5, #0 - bl ov46_02256D60 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov46_02256ED8 - - thumb_func_start ov46_02256F0C -ov46_02256F0C: ; 0x02256F0C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r1, r0, #0 - add r0, r4, #0 - bl ov46_02257054 - add r0, r5, #0 - bl ov46_02256D60 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov46_02256F0C - - thumb_func_start ov46_02256F30 -ov46_02256F30: ; 0x02256F30 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r1, r0, #0 - add r0, r4, #0 - bl ov46_02257094 - add r0, r5, #0 - bl ov46_02256D60 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov46_02256F30 - - thumb_func_start ov46_02256F54 -ov46_02256F54: ; 0x02256F54 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r5, #0 - bl ov25_02255248 - cmp r0, #0 - beq _02256F76 - cmp r0, #1 - beq _02256F9A - pop {r3, r4, r5, pc} -_02256F76: - ldr r0, [r4, #0x34] - mov r1, #2 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #0 - bl ov25_022558C4 - add r0, r4, #0 - mov r1, #0 - add r0, #0xa4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r5, #0 - bl ov25_0225524C -_02256F9A: - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02256FAC - add r0, r5, #0 - bl ov46_02256D60 - pop {r3, r4, r5, pc} -_02256FAC: - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xa4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - cmp r0, #8 - blo _0225700A - add r0, r4, #0 - add r0, #0xa8 - ldr r1, [r0, #0] - mov r0, #1 - eor r1, r0 - add r0, r4, #0 - add r0, #0xa8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - ldr r0, [r4, #0x34] - beq _02256FF0 - mov r1, #2 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl ov25_022558C4 - b _02256FFE -_02256FF0: - mov r1, #3 - bl ov25_022558C4 - ldr r0, [r4, #0x38] - mov r1, #0 - bl ov25_022558C4 -_02256FFE: - ldr r0, _0225700C ; =0x00000677 - bl ov25_02254424 - mov r0, #0 - add r4, #0xa4 - str r0, [r4, #0] -_0225700A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225700C: .word 0x00000677 - thumb_func_end ov46_02256F54 - - thumb_func_start ov46_02257010 -ov46_02257010: ; 0x02257010 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r0, r5, #0 - bl ov25_02255248 - cmp r0, #0 - beq _02257032 - cmp r0, #1 - beq _02257040 - pop {r3, r4, r5, pc} -_02257032: - add r0, r4, #0 - mov r1, #1 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r5, #0 - bl ov25_0225524C -_02257040: - add r0, r4, #0 - mov r1, #6 - bl ov46_02256D48 - cmp r0, #0 - beq _02257052 - add r0, r5, #0 - bl ov46_02256D60 -_02257052: - pop {r3, r4, r5, pc} - thumb_func_end ov46_02257010 - - thumb_func_start ov46_02257054 -ov46_02257054: ; 0x02257054 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #4] - cmp r0, #0 - beq _02257064 - mov r1, #6 - b _02257066 -_02257064: - mov r1, #5 -_02257066: - ldr r0, [r5, #0x3c] - bl ov25_022558C4 - ldrb r0, [r4, #5] - cmp r0, #0 - beq _02257076 - mov r1, #8 - b _02257078 -_02257076: - mov r1, #7 -_02257078: - ldr r0, [r5, #0x40] - bl ov25_022558C4 - ldrb r0, [r4, #6] - cmp r0, #0 - beq _02257088 - mov r1, #0xa - b _0225708A -_02257088: - mov r1, #9 -_0225708A: - ldr r0, [r5, #0x44] - bl ov25_022558C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov46_02257054 - - thumb_func_start ov46_02257094 -ov46_02257094: ; 0x02257094 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - ldrsb r1, [r4, r1] - ldr r0, [r5, #0x68] - bl ov25_022558C4 - mov r1, #1 - ldrsb r1, [r4, r1] - ldr r0, [r5, #0x6c] - bl ov25_022558C4 - mov r1, #2 - ldrsb r1, [r4, r1] - ldr r0, [r5, #0x70] - bl ov25_022558C4 - mov r1, #3 - ldrsb r1, [r4, r1] - ldr r0, [r5, #0x74] - bl ov25_022558C4 - pop {r3, r4, r5, pc} - thumb_func_end ov46_02257094 - - thumb_func_start ov46_022570C4 -ov46_022570C4: ; 0x022570C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x48] - add r4, r1, #0 - bl ov25_02255914 - ldr r0, [r5, #0x4c] - add r1, r4, #0 - bl ov25_02255914 - ldr r0, [r5, #0x50] - add r1, r4, #0 - bl ov25_02255914 - ldr r0, [r5, #0x54] - add r1, r4, #0 - bl ov25_02255914 - ldr r0, [r5, #0x58] - add r1, r4, #0 - bl ov25_02255914 - ldr r0, [r5, #0x5c] - add r1, r4, #0 - bl ov25_02255914 - ldr r0, [r5, #0x60] - add r1, r4, #0 - bl ov25_02255914 - ldr r0, [r5, #0x64] - add r1, r4, #0 - bl ov25_02255914 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov46_022570C4 - - thumb_func_start ov46_0225710C -ov46_0225710C: ; 0x0225710C - add r0, #0xa8 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov46_0225710C - ; 0x02257114 - - .rodata - .incbin "incbin/overlay46_rodata.bin" + + + .global Unk_ov46_02257114 +Unk_ov46_02257114: ; 0x02257114 + .incbin "incbin/overlay46_rodata.bin", 0x0, 0x1C - 0x0 + + .global Unk_ov46_02257130 +Unk_ov46_02257130: ; 0x02257130 + .incbin "incbin/overlay46_rodata.bin", 0x1C, 0x2C .section .sinit, 4 .word ov46_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov46_02256BCC.s b/asm/ov46_02256BCC.s new file mode 100644 index 000000000..0d6271a5f --- /dev/null +++ b/asm/ov46_02256BCC.s @@ -0,0 +1,707 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov46_02256BCC +ov46_02256BCC: ; 0x02256BCC + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #8 + mov r1, #0xac + bl sub_02018144 + add r4, r0, #0 + beq _02256C08 + add r0, #8 + mov r1, #8 + bl ov25_02255090 + str r5, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + bl ov25_02254664 + str r0, [r4, #0x30] + add r0, r4, #0 + add r1, r5, #0 + bl ov46_02256C20 + ldr r0, [r4, #4] + cmp r0, #0 + beq _02256C08 + str r4, [r6, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256C08: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov46_02256BCC + + thumb_func_start ov46_02256C0C +ov46_02256C0C: ; 0x02256C0C + push {r4, lr} + add r4, r0, #0 + beq _02256C1C + bl ov46_02256CF4 + add r0, r4, #0 + bl sub_020181C4 +_02256C1C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov46_02256C0C + + thumb_func_start ov46_02256C20 +ov46_02256C20: ; 0x02256C20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r3, #0 + str r3, [sp] + mov r2, #1 + add r7, r0, #0 + str r1, [sp, #0xc] + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #2 + bl sub_02006EC0 + mov r0, #0 + str r0, [sp] + mov r2, #1 + mov r3, #0xa + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0x5e + lsl r3, r3, #8 + bl sub_02006EC0 + mov r0, #8 + str r0, [sp] + add r0, r7, #0 + add r0, #0x78 + mov r1, #0xc + mov r2, #0x5c + mov r3, #0x5d + bl ov25_02255958 + mov r0, #8 + str r0, [sp] + add r0, r7, #0 + add r0, #0x8c + mov r1, #0xc + mov r2, #3 + mov r3, #4 + bl ov25_02255958 + add r0, r7, #0 + str r0, [sp, #0x14] + add r0, #0x78 + str r0, [sp, #0x14] + add r0, r7, #0 + str r0, [sp, #0x10] + add r0, #0x8c + ldr r6, _02256CF0 ; =0x022571E4 + mov r4, #0 + add r5, r7, #0 + str r0, [sp, #0x10] +_02256C8E: + cmp r4, #0xd + blt _02256CA4 + cmp r4, #0x10 + bgt _02256CA4 + ldr r0, [r7, #0x30] + ldr r2, [sp, #0x10] + add r1, r6, #0 + bl ov25_02255810 + str r0, [r5, #0x34] + b _02256CB6 +_02256CA4: + ldr r0, [r7, #0x30] + ldr r2, [sp, #0x14] + add r1, r6, #0 + bl ov25_02255810 + mov r1, #0x50 + str r0, [r5, #0x34] + bl ov25_02255940 +_02256CB6: + add r4, r4, #1 + add r6, #0x10 + add r5, r5, #4 + cmp r4, #0x11 + blt _02256C8E + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov46_02257054 + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov46_02257094 + ldr r0, [sp, #0xc] + ldr r0, [r0, #8] + cmp r0, #0 + bne _02256CDC + mov r1, #1 + b _02256CDE +_02256CDC: + mov r1, #0 +_02256CDE: + add r0, r7, #0 + bl ov46_022570C4 + mov r0, #0 + add r7, #0xa8 + str r0, [r7, #0] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256CF0: .word 0x022571E4 + thumb_func_end ov46_02256C20 + + thumb_func_start ov46_02256CF4 +ov46_02256CF4: ; 0x02256CF4 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02256CFC: + ldr r1, [r5, #0x34] + cmp r1, #0 + beq _02256D08 + ldr r0, [r6, #0x30] + bl ov25_022558B0 +_02256D08: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x11 + blt _02256CFC + add r0, r6, #0 + add r0, #0x78 + bl ov25_022559B0 + add r6, #0x8c + add r0, r6, #0 + bl ov25_022559B0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov46_02256CF4 + + thumb_func_start ov46_02256D24 +ov46_02256D24: ; 0x02256D24 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _02256D44 ; =0x02257178 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_02256D44: .word 0x02257178 + thumb_func_end ov46_02256D24 + + thumb_func_start ov46_02256D48 +ov46_02256D48: ; 0x02256D48 + ldr r3, _02256D50 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_02256D50: .word ov25_02255130 + thumb_func_end ov46_02256D48 + + thumb_func_start ov46_02256D54 +ov46_02256D54: ; 0x02256D54 + ldr r3, _02256D5C ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_02256D5C: .word ov25_02255154 + thumb_func_end ov46_02256D54 + + thumb_func_start ov46_02256D60 +ov46_02256D60: ; 0x02256D60 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov46_02256D60 + + thumb_func_start ov46_02256D74 +ov46_02256D74: ; 0x02256D74 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _02256E4C ; =0x0225715C + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0xc + mov r1, #0x5b + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0xc + mov r1, #0x5a + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256E50 ; =0x04001000 + ldr r0, _02256E54 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + ldr r1, [r4, #0] + ldr r0, [r1, #0xc] + cmp r0, #1 + beq _02256E08 + cmp r0, #2 + beq _02256DFE + cmp r0, #3 + beq _02256E1A + b _02256E40 +_02256DFE: + add r0, r4, #0 + mov r1, #6 + bl ov46_02256D24 + b _02256E40 +_02256E08: + ldr r0, [r4, #0x34] + mov r1, #3 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl ov25_022558C4 + b _02256E40 +_02256E1A: + ldr r0, [r1, #0x10] + cmp r0, #0 + ldr r0, [r4, #0x34] + beq _02256E32 + mov r1, #2 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl ov25_022558C4 + b _02256E40 +_02256E32: + mov r1, #3 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #0 + bl ov25_022558C4 +_02256E40: + add r0, r5, #0 + bl ov46_02256D60 + add sp, #0x14 + pop {r4, r5, pc} + nop +_02256E4C: .word 0x0225715C +_02256E50: .word 0x04001000 +_02256E54: .word 0xFFFFE0FF + thumb_func_end ov46_02256D74 + + thumb_func_start ov46_02256E58 +ov46_02256E58: ; 0x02256E58 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r5, #0 + bl ov25_02255248 + cmp r0, #0 + beq _02256E7A + cmp r0, #1 + beq _02256E88 + pop {r3, r4, r5, pc} +_02256E7A: + add r0, r4, #0 + mov r1, #1 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r5, #0 + bl ov25_0225524C +_02256E88: + add r0, r4, #0 + mov r1, #6 + bl ov46_02256D48 + cmp r0, #0 + beq _02256EA2 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019044 + add r0, r5, #0 + bl ov46_02256D60 +_02256EA2: + pop {r3, r4, r5, pc} + thumb_func_end ov46_02256E58 + + thumb_func_start ov46_02256EA4 +ov46_02256EA4: ; 0x02256EA4 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r4, #0 + mov r1, #0 + bl ov46_022570C4 + ldr r0, [r4, #0x34] + mov r1, #2 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #0 + bl ov25_022558C4 + add r0, r5, #0 + bl ov46_02256D60 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov46_02256EA4 + + thumb_func_start ov46_02256ED8 +ov46_02256ED8: ; 0x02256ED8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r4, #0 + mov r1, #1 + bl ov46_022570C4 + ldr r0, [r4, #0x34] + mov r1, #3 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl ov25_022558C4 + add r0, r5, #0 + bl ov46_02256D60 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov46_02256ED8 + + thumb_func_start ov46_02256F0C +ov46_02256F0C: ; 0x02256F0C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r1, r0, #0 + add r0, r4, #0 + bl ov46_02257054 + add r0, r5, #0 + bl ov46_02256D60 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov46_02256F0C + + thumb_func_start ov46_02256F30 +ov46_02256F30: ; 0x02256F30 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r1, r0, #0 + add r0, r4, #0 + bl ov46_02257094 + add r0, r5, #0 + bl ov46_02256D60 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov46_02256F30 + + thumb_func_start ov46_02256F54 +ov46_02256F54: ; 0x02256F54 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r5, #0 + bl ov25_02255248 + cmp r0, #0 + beq _02256F76 + cmp r0, #1 + beq _02256F9A + pop {r3, r4, r5, pc} +_02256F76: + ldr r0, [r4, #0x34] + mov r1, #2 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #0 + bl ov25_022558C4 + add r0, r4, #0 + mov r1, #0 + add r0, #0xa4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r5, #0 + bl ov25_0225524C +_02256F9A: + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02256FAC + add r0, r5, #0 + bl ov46_02256D60 + pop {r3, r4, r5, pc} +_02256FAC: + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xa4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + cmp r0, #8 + blo _0225700A + add r0, r4, #0 + add r0, #0xa8 + ldr r1, [r0, #0] + mov r0, #1 + eor r1, r0 + add r0, r4, #0 + add r0, #0xa8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + ldr r0, [r4, #0x34] + beq _02256FF0 + mov r1, #2 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #1 + bl ov25_022558C4 + b _02256FFE +_02256FF0: + mov r1, #3 + bl ov25_022558C4 + ldr r0, [r4, #0x38] + mov r1, #0 + bl ov25_022558C4 +_02256FFE: + ldr r0, _0225700C ; =0x00000677 + bl ov25_02254424 + mov r0, #0 + add r4, #0xa4 + str r0, [r4, #0] +_0225700A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0225700C: .word 0x00000677 + thumb_func_end ov46_02256F54 + + thumb_func_start ov46_02257010 +ov46_02257010: ; 0x02257010 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r0, r5, #0 + bl ov25_0225523C + add r4, r0, #0 + add r0, r5, #0 + bl ov25_02255240 + add r0, r5, #0 + bl ov25_02255248 + cmp r0, #0 + beq _02257032 + cmp r0, #1 + beq _02257040 + pop {r3, r4, r5, pc} +_02257032: + add r0, r4, #0 + mov r1, #1 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r5, #0 + bl ov25_0225524C +_02257040: + add r0, r4, #0 + mov r1, #6 + bl ov46_02256D48 + cmp r0, #0 + beq _02257052 + add r0, r5, #0 + bl ov46_02256D60 +_02257052: + pop {r3, r4, r5, pc} + thumb_func_end ov46_02257010 + + thumb_func_start ov46_02257054 +ov46_02257054: ; 0x02257054 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #4] + cmp r0, #0 + beq _02257064 + mov r1, #6 + b _02257066 +_02257064: + mov r1, #5 +_02257066: + ldr r0, [r5, #0x3c] + bl ov25_022558C4 + ldrb r0, [r4, #5] + cmp r0, #0 + beq _02257076 + mov r1, #8 + b _02257078 +_02257076: + mov r1, #7 +_02257078: + ldr r0, [r5, #0x40] + bl ov25_022558C4 + ldrb r0, [r4, #6] + cmp r0, #0 + beq _02257088 + mov r1, #0xa + b _0225708A +_02257088: + mov r1, #9 +_0225708A: + ldr r0, [r5, #0x44] + bl ov25_022558C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov46_02257054 + + thumb_func_start ov46_02257094 +ov46_02257094: ; 0x02257094 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + ldrsb r1, [r4, r1] + ldr r0, [r5, #0x68] + bl ov25_022558C4 + mov r1, #1 + ldrsb r1, [r4, r1] + ldr r0, [r5, #0x6c] + bl ov25_022558C4 + mov r1, #2 + ldrsb r1, [r4, r1] + ldr r0, [r5, #0x70] + bl ov25_022558C4 + mov r1, #3 + ldrsb r1, [r4, r1] + ldr r0, [r5, #0x74] + bl ov25_022558C4 + pop {r3, r4, r5, pc} + thumb_func_end ov46_02257094 + + thumb_func_start ov46_022570C4 +ov46_022570C4: ; 0x022570C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x48] + add r4, r1, #0 + bl ov25_02255914 + ldr r0, [r5, #0x4c] + add r1, r4, #0 + bl ov25_02255914 + ldr r0, [r5, #0x50] + add r1, r4, #0 + bl ov25_02255914 + ldr r0, [r5, #0x54] + add r1, r4, #0 + bl ov25_02255914 + ldr r0, [r5, #0x58] + add r1, r4, #0 + bl ov25_02255914 + ldr r0, [r5, #0x5c] + add r1, r4, #0 + bl ov25_02255914 + ldr r0, [r5, #0x60] + add r1, r4, #0 + bl ov25_02255914 + ldr r0, [r5, #0x64] + add r1, r4, #0 + bl ov25_02255914 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov46_022570C4 + + thumb_func_start ov46_0225710C +ov46_0225710C: ; 0x0225710C + add r0, #0xa8 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov46_0225710C + + .rodata + + + .global Unk_ov46_0225715C +Unk_ov46_0225715C: ; 0x0225715C + .incbin "incbin/overlay46_rodata.bin", 0x48, 0x64 - 0x48 + + .global Unk_ov46_02257178 +Unk_ov46_02257178: ; 0x02257178 + .incbin "incbin/overlay46_rodata.bin", 0x64, 0xD0 - 0x64 + + .global Unk_ov46_022571E4 +Unk_ov46_022571E4: ; 0x022571E4 + .incbin "incbin/overlay46_rodata.bin", 0xD0, 0x110 + diff --git a/asm/overlay47.s b/asm/ov47_022561C0.s similarity index 52% rename from asm/overlay47.s rename to asm/ov47_022561C0.s index 59e56c493..8adc49285 100644 --- a/asm/overlay47.s +++ b/asm/ov47_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov47_022561C0 ov47_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -614,547 +617,12 @@ _0225662E: ; .align 2, 0 thumb_func_end ov47_02256584 - thumb_func_start ov47_02256634 -ov47_02256634: ; 0x02256634 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #8 - mov r1, #0x80 - bl sub_02018144 - add r4, r0, #0 - beq _0225666A - add r0, #8 - mov r1, #4 - bl ov25_02255090 - str r5, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - bl ov25_02254664 - str r0, [r4, #0x20] - add r0, r4, #0 - add r1, r5, #0 - bl ov47_02256684 - str r4, [r6, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_0225666A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov47_02256634 - - thumb_func_start ov47_02256670 -ov47_02256670: ; 0x02256670 - push {r4, lr} - add r4, r0, #0 - beq _02256680 - bl ov47_022567FC - add r0, r4, #0 - bl sub_020181C4 -_02256680: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov47_02256670 - - thumb_func_start ov47_02256684 -ov47_02256684: ; 0x02256684 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - mov r3, #0 - str r3, [sp] - mov r2, #1 - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0x78 - bl sub_02006EC0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - add r0, #0x68 - mov r1, #0xc - mov r2, #0x76 - mov r3, #0x77 - bl ov25_02255958 - mov r2, #0 - add r0, sp, #0x24 - strb r2, [r0, #0x12] - mov r1, #2 - strb r1, [r0, #0x13] - strb r2, [r0, #0x15] - ldr r0, [r7, #0] - ldr r1, [r7, #4] - add r2, sp, #0x28 - add r3, sp, #0x24 - bl ov25_02255DBC - ldr r0, [sp, #0x28] - add r2, r5, #0 - lsl r0, r0, #0xc - str r0, [sp, #0x2c] - ldr r0, [sp, #0x24] - mov r1, #1 - lsl r0, r0, #0xc - str r0, [sp, #0x30] - add r0, sp, #0x24 - strb r1, [r0, #0x14] - mov r1, #0 - strh r1, [r0, #0x10] - ldr r0, [r5, #0x20] - add r1, sp, #0x2c - add r2, #0x68 - bl ov25_02255810 - str r0, [r5, #0x64] - mov r1, #1 - add r0, sp, #0x24 - strb r1, [r0, #0x15] - add r0, r5, #0 - str r0, [sp, #0x14] - add r0, #0x68 - mov r6, #0 - add r4, r7, #0 - str r5, [sp, #0xc] - str r0, [sp, #0x14] -_02256702: - ldrb r0, [r4, #0xc] - ldr r2, [sp, #0x14] - lsl r0, r0, #0xc - str r0, [sp, #0x2c] - ldrb r0, [r4, #0xd] - lsl r0, r0, #0xc - str r0, [sp, #0x30] - ldrb r0, [r4, #0xe] - add r1, r0, #2 - add r0, sp, #0x24 - strb r1, [r0, #0x14] - add r1, r6, #1 - strh r1, [r0, #0x10] - ldr r0, [r5, #0x20] - add r1, sp, #0x2c - bl ov25_02255810 - ldr r1, [sp, #0xc] - add r6, r6, #1 - str r0, [r1, #0x24] - add r0, r1, #0 - add r0, r0, #4 - add r4, r4, #4 - str r0, [sp, #0xc] - cmp r6, #6 - blt _02256702 - add r0, r5, #0 - str r0, [sp, #0x18] - add r0, #0x68 - mov r6, #0 - add r4, r5, #0 - str r7, [sp, #0x10] - str r0, [sp, #0x18] -_02256744: - add r0, r6, #0 - add r1, sp, #0x28 - add r2, sp, #0x24 - bl ov25_02255DFC - ldr r0, [sp, #0x28] - mov r1, #9 - lsl r0, r0, #0xc - str r0, [sp, #0x2c] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x18] - lsl r0, r0, #0xc - str r0, [sp, #0x30] - add r0, sp, #0x24 - strb r1, [r0, #0x14] - add r1, r6, #0 - add r1, #0xe - strh r1, [r0, #0x10] - ldr r0, [r5, #0x20] - add r1, sp, #0x2c - bl ov25_02255810 - str r0, [r4, #0x3c] - ldr r0, [sp, #0x10] - ldr r0, [r0, #0x2c] - cmp r0, #0 - bne _02256782 - ldr r0, [r4, #0x3c] - mov r1, #1 - bl ov25_02255914 -_02256782: - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r0, r0, #4 - add r4, r4, #4 - str r0, [sp, #0x10] - cmp r6, #4 - blt _02256744 - add r0, r5, #0 - str r0, [sp, #0x20] - add r0, #0x68 - mov r6, #0 - add r4, r5, #0 - str r0, [sp, #0x20] -_0225679C: - ldr r0, [r7, #0x40] - add r1, sp, #0x28 - add r2, sp, #0x24 - bl ov25_02255E24 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x28] - mov r1, #8 - lsl r0, r0, #0xc - str r0, [sp, #0x2c] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x20] - lsl r0, r0, #0xc - str r0, [sp, #0x30] - add r0, sp, #0x24 - strb r1, [r0, #0x14] - mov r1, #0x12 - strh r1, [r0, #0x10] - ldr r0, [r5, #0x20] - add r1, sp, #0x2c - bl ov25_02255810 - str r0, [r4, #0x4c] - ldr r0, [r7, #0x3c] - cmp r0, #0 - beq _022567D6 - ldr r0, [sp, #0x1c] - cmp r0, #0 - bne _022567DE -_022567D6: - ldr r0, [r4, #0x4c] - mov r1, #1 - bl ov25_02255914 -_022567DE: - add r6, r6, #1 - add r7, #8 - add r4, r4, #4 - cmp r6, #6 - blt _0225679C - ldr r0, _022567F8 ; =ov47_02256968 - add r1, r5, #0 - mov r2, #3 - bl sub_0200D9E8 - str r0, [r5, #0x7c] - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022567F8: .word ov47_02256968 - thumb_func_end ov47_02256684 - - thumb_func_start ov47_022567FC -ov47_022567FC: ; 0x022567FC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x7c] - bl sub_0200DA58 - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_0225680C: - ldr r1, [r4, #0x24] - cmp r1, #0 - beq _0225681A - ldr r0, [r5, #0x20] - bl ov25_022558B0 - str r7, [r4, #0x24] -_0225681A: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #6 - blt _0225680C - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_02256828: - ldr r1, [r4, #0x3c] - cmp r1, #0 - beq _02256836 - ldr r0, [r5, #0x20] - bl ov25_022558B0 - str r7, [r4, #0x3c] -_02256836: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _02256828 - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_02256844: - ldr r1, [r4, #0x4c] - cmp r1, #0 - beq _02256852 - ldr r0, [r5, #0x20] - bl ov25_022558B0 - str r7, [r4, #0x4c] -_02256852: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #6 - blt _02256844 - ldr r0, [r5, #0x20] - ldr r1, [r5, #0x64] - bl ov25_022558B0 - add r5, #0x68 - add r0, r5, #0 - bl ov25_022559B0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov47_022567FC - - thumb_func_start ov47_0225686C -ov47_0225686C: ; 0x0225686C - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _0225688C ; =0x02256A78 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_0225688C: .word 0x02256A78 - thumb_func_end ov47_0225686C - - thumb_func_start ov47_02256890 -ov47_02256890: ; 0x02256890 - ldr r3, _02256898 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_02256898: .word ov25_02255130 - thumb_func_end ov47_02256890 - - thumb_func_start ov47_0225689C -ov47_0225689C: ; 0x0225689C - ldr r3, _022568A4 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022568A4: .word ov25_02255154 - thumb_func_end ov47_0225689C - - thumb_func_start ov47_022568A8 -ov47_022568A8: ; 0x022568A8 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov47_022568A8 - - thumb_func_start ov47_022568BC -ov47_022568BC: ; 0x022568BC - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _02256940 ; =0x02256A5C - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x75 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x73 - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256944 ; =0x04001000 - ldr r0, _02256948 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov47_022568A8 - add sp, #0x14 - pop {r4, r5, pc} - nop -_02256940: .word 0x02256A5C -_02256944: .word 0x04001000 -_02256948: .word 0xFFFFE0FF - thumb_func_end ov47_022568BC - - thumb_func_start ov47_0225694C -ov47_0225694C: ; 0x0225694C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov47_022568A8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov47_0225694C - - thumb_func_start ov47_02256968 -ov47_02256968: ; 0x02256968 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _022569DE - ldr r7, [r4, #0x24] - lsl r6, r7, #2 - add r2, r4, r6 - ldrb r0, [r2, #0xf] - cmp r0, #0 - beq _022569A8 - add r0, r5, #0 - str r0, [sp, #4] - add r0, #0x24 - str r0, [sp, #4] - ldr r1, [sp, #4] - add r0, r0, r6 - str r0, [sp] - ldr r0, [r5, #0x20] - ldr r1, [r1, r6] - mov r2, #0 - bl ov25_0225591C - ldr r0, [sp, #4] - add r7, #8 - ldr r0, [r0, r6] - add r1, r7, #0 - bl ov25_022558C4 - b _022569CC -_022569A8: - add r0, r5, #0 - str r0, [sp, #8] - add r0, #0x24 - str r0, [sp, #8] - ldr r1, [sp, #8] - ldrb r2, [r2, #0xe] - add r0, r0, r6 - str r0, [sp] - ldr r0, [r5, #0x20] - ldr r1, [r1, r6] - add r2, r2, #2 - bl ov25_0225591C - ldr r0, [sp, #8] - add r1, r7, #1 - ldr r0, [r0, r6] - bl ov25_022558C4 -_022569CC: - add r2, r4, r6 - ldrb r1, [r2, #0xc] - ldr r0, [sp] - ldrb r2, [r2, #0xd] - ldr r0, [r0, #0] - lsl r1, r1, #0xc - lsl r2, r2, #0xc - bl ov25_02255900 -_022569DE: - ldr r0, [r4, #8] - cmp r0, #0 - beq _02256A48 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, sp, #0x10 - add r3, sp, #0xc - bl ov25_02255DBC - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - ldr r0, [r5, #0x64] - lsl r1, r1, #0xc - lsl r2, r2, #0xc - bl ov25_02255900 - mov r6, #0 - add r7, sp, #0x10 -_02256A02: - ldr r0, [r4, #0x3c] - cmp r0, #0 - beq _02256A36 - ldr r0, [r4, #0x40] - add r1, r7, #0 - add r2, sp, #0xc - bl ov25_02255E24 - cmp r0, #0 - ldr r0, [r5, #0x4c] - beq _02256A2E - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - lsl r1, r1, #0xc - lsl r2, r2, #0xc - bl ov25_02255900 - ldr r0, [r5, #0x4c] - mov r1, #0 - bl ov25_02255914 - b _02256A3E -_02256A2E: - mov r1, #1 - bl ov25_02255914 - b _02256A3E -_02256A36: - ldr r0, [r5, #0x4c] - mov r1, #1 - bl ov25_02255914 -_02256A3E: - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #6 - blo _02256A02 -_02256A48: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov47_02256968 - ; 0x02256A4C - - .rodata - .incbin "incbin/overlay47_rodata.bin" + + + .global Unk_ov47_02256A4C +Unk_ov47_02256A4C: ; 0x02256A4C + .incbin "incbin/overlay47_rodata.bin", 0x0, 0x10 .section .sinit, 4 .word ov47_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov47_02256634.s b/asm/ov47_02256634.s new file mode 100644 index 000000000..6ca0c5ab8 --- /dev/null +++ b/asm/ov47_02256634.s @@ -0,0 +1,553 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov47_02256634 +ov47_02256634: ; 0x02256634 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #8 + mov r1, #0x80 + bl sub_02018144 + add r4, r0, #0 + beq _0225666A + add r0, #8 + mov r1, #4 + bl ov25_02255090 + str r5, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + bl ov25_02254664 + str r0, [r4, #0x20] + add r0, r4, #0 + add r1, r5, #0 + bl ov47_02256684 + str r4, [r6, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_0225666A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov47_02256634 + + thumb_func_start ov47_02256670 +ov47_02256670: ; 0x02256670 + push {r4, lr} + add r4, r0, #0 + beq _02256680 + bl ov47_022567FC + add r0, r4, #0 + bl sub_020181C4 +_02256680: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov47_02256670 + + thumb_func_start ov47_02256684 +ov47_02256684: ; 0x02256684 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + mov r3, #0 + str r3, [sp] + mov r2, #1 + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0x78 + bl sub_02006EC0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + add r0, #0x68 + mov r1, #0xc + mov r2, #0x76 + mov r3, #0x77 + bl ov25_02255958 + mov r2, #0 + add r0, sp, #0x24 + strb r2, [r0, #0x12] + mov r1, #2 + strb r1, [r0, #0x13] + strb r2, [r0, #0x15] + ldr r0, [r7, #0] + ldr r1, [r7, #4] + add r2, sp, #0x28 + add r3, sp, #0x24 + bl ov25_02255DBC + ldr r0, [sp, #0x28] + add r2, r5, #0 + lsl r0, r0, #0xc + str r0, [sp, #0x2c] + ldr r0, [sp, #0x24] + mov r1, #1 + lsl r0, r0, #0xc + str r0, [sp, #0x30] + add r0, sp, #0x24 + strb r1, [r0, #0x14] + mov r1, #0 + strh r1, [r0, #0x10] + ldr r0, [r5, #0x20] + add r1, sp, #0x2c + add r2, #0x68 + bl ov25_02255810 + str r0, [r5, #0x64] + mov r1, #1 + add r0, sp, #0x24 + strb r1, [r0, #0x15] + add r0, r5, #0 + str r0, [sp, #0x14] + add r0, #0x68 + mov r6, #0 + add r4, r7, #0 + str r5, [sp, #0xc] + str r0, [sp, #0x14] +_02256702: + ldrb r0, [r4, #0xc] + ldr r2, [sp, #0x14] + lsl r0, r0, #0xc + str r0, [sp, #0x2c] + ldrb r0, [r4, #0xd] + lsl r0, r0, #0xc + str r0, [sp, #0x30] + ldrb r0, [r4, #0xe] + add r1, r0, #2 + add r0, sp, #0x24 + strb r1, [r0, #0x14] + add r1, r6, #1 + strh r1, [r0, #0x10] + ldr r0, [r5, #0x20] + add r1, sp, #0x2c + bl ov25_02255810 + ldr r1, [sp, #0xc] + add r6, r6, #1 + str r0, [r1, #0x24] + add r0, r1, #0 + add r0, r0, #4 + add r4, r4, #4 + str r0, [sp, #0xc] + cmp r6, #6 + blt _02256702 + add r0, r5, #0 + str r0, [sp, #0x18] + add r0, #0x68 + mov r6, #0 + add r4, r5, #0 + str r7, [sp, #0x10] + str r0, [sp, #0x18] +_02256744: + add r0, r6, #0 + add r1, sp, #0x28 + add r2, sp, #0x24 + bl ov25_02255DFC + ldr r0, [sp, #0x28] + mov r1, #9 + lsl r0, r0, #0xc + str r0, [sp, #0x2c] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x18] + lsl r0, r0, #0xc + str r0, [sp, #0x30] + add r0, sp, #0x24 + strb r1, [r0, #0x14] + add r1, r6, #0 + add r1, #0xe + strh r1, [r0, #0x10] + ldr r0, [r5, #0x20] + add r1, sp, #0x2c + bl ov25_02255810 + str r0, [r4, #0x3c] + ldr r0, [sp, #0x10] + ldr r0, [r0, #0x2c] + cmp r0, #0 + bne _02256782 + ldr r0, [r4, #0x3c] + mov r1, #1 + bl ov25_02255914 +_02256782: + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r0, r0, #4 + add r4, r4, #4 + str r0, [sp, #0x10] + cmp r6, #4 + blt _02256744 + add r0, r5, #0 + str r0, [sp, #0x20] + add r0, #0x68 + mov r6, #0 + add r4, r5, #0 + str r0, [sp, #0x20] +_0225679C: + ldr r0, [r7, #0x40] + add r1, sp, #0x28 + add r2, sp, #0x24 + bl ov25_02255E24 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x28] + mov r1, #8 + lsl r0, r0, #0xc + str r0, [sp, #0x2c] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x20] + lsl r0, r0, #0xc + str r0, [sp, #0x30] + add r0, sp, #0x24 + strb r1, [r0, #0x14] + mov r1, #0x12 + strh r1, [r0, #0x10] + ldr r0, [r5, #0x20] + add r1, sp, #0x2c + bl ov25_02255810 + str r0, [r4, #0x4c] + ldr r0, [r7, #0x3c] + cmp r0, #0 + beq _022567D6 + ldr r0, [sp, #0x1c] + cmp r0, #0 + bne _022567DE +_022567D6: + ldr r0, [r4, #0x4c] + mov r1, #1 + bl ov25_02255914 +_022567DE: + add r6, r6, #1 + add r7, #8 + add r4, r4, #4 + cmp r6, #6 + blt _0225679C + ldr r0, _022567F8 ; =ov47_02256968 + add r1, r5, #0 + mov r2, #3 + bl sub_0200D9E8 + str r0, [r5, #0x7c] + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022567F8: .word ov47_02256968 + thumb_func_end ov47_02256684 + + thumb_func_start ov47_022567FC +ov47_022567FC: ; 0x022567FC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x7c] + bl sub_0200DA58 + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_0225680C: + ldr r1, [r4, #0x24] + cmp r1, #0 + beq _0225681A + ldr r0, [r5, #0x20] + bl ov25_022558B0 + str r7, [r4, #0x24] +_0225681A: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #6 + blt _0225680C + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_02256828: + ldr r1, [r4, #0x3c] + cmp r1, #0 + beq _02256836 + ldr r0, [r5, #0x20] + bl ov25_022558B0 + str r7, [r4, #0x3c] +_02256836: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _02256828 + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_02256844: + ldr r1, [r4, #0x4c] + cmp r1, #0 + beq _02256852 + ldr r0, [r5, #0x20] + bl ov25_022558B0 + str r7, [r4, #0x4c] +_02256852: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #6 + blt _02256844 + ldr r0, [r5, #0x20] + ldr r1, [r5, #0x64] + bl ov25_022558B0 + add r5, #0x68 + add r0, r5, #0 + bl ov25_022559B0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov47_022567FC + + thumb_func_start ov47_0225686C +ov47_0225686C: ; 0x0225686C + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _0225688C ; =0x02256A78 + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_0225688C: .word 0x02256A78 + thumb_func_end ov47_0225686C + + thumb_func_start ov47_02256890 +ov47_02256890: ; 0x02256890 + ldr r3, _02256898 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_02256898: .word ov25_02255130 + thumb_func_end ov47_02256890 + + thumb_func_start ov47_0225689C +ov47_0225689C: ; 0x0225689C + ldr r3, _022568A4 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022568A4: .word ov25_02255154 + thumb_func_end ov47_0225689C + + thumb_func_start ov47_022568A8 +ov47_022568A8: ; 0x022568A8 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov47_022568A8 + + thumb_func_start ov47_022568BC +ov47_022568BC: ; 0x022568BC + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _02256940 ; =0x02256A5C + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x75 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x73 + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256944 ; =0x04001000 + ldr r0, _02256948 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov47_022568A8 + add sp, #0x14 + pop {r4, r5, pc} + nop +_02256940: .word 0x02256A5C +_02256944: .word 0x04001000 +_02256948: .word 0xFFFFE0FF + thumb_func_end ov47_022568BC + + thumb_func_start ov47_0225694C +ov47_0225694C: ; 0x0225694C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov47_022568A8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov47_0225694C + + thumb_func_start ov47_02256968 +ov47_02256968: ; 0x02256968 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + ldr r4, [r5, #0] + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _022569DE + ldr r7, [r4, #0x24] + lsl r6, r7, #2 + add r2, r4, r6 + ldrb r0, [r2, #0xf] + cmp r0, #0 + beq _022569A8 + add r0, r5, #0 + str r0, [sp, #4] + add r0, #0x24 + str r0, [sp, #4] + ldr r1, [sp, #4] + add r0, r0, r6 + str r0, [sp] + ldr r0, [r5, #0x20] + ldr r1, [r1, r6] + mov r2, #0 + bl ov25_0225591C + ldr r0, [sp, #4] + add r7, #8 + ldr r0, [r0, r6] + add r1, r7, #0 + bl ov25_022558C4 + b _022569CC +_022569A8: + add r0, r5, #0 + str r0, [sp, #8] + add r0, #0x24 + str r0, [sp, #8] + ldr r1, [sp, #8] + ldrb r2, [r2, #0xe] + add r0, r0, r6 + str r0, [sp] + ldr r0, [r5, #0x20] + ldr r1, [r1, r6] + add r2, r2, #2 + bl ov25_0225591C + ldr r0, [sp, #8] + add r1, r7, #1 + ldr r0, [r0, r6] + bl ov25_022558C4 +_022569CC: + add r2, r4, r6 + ldrb r1, [r2, #0xc] + ldr r0, [sp] + ldrb r2, [r2, #0xd] + ldr r0, [r0, #0] + lsl r1, r1, #0xc + lsl r2, r2, #0xc + bl ov25_02255900 +_022569DE: + ldr r0, [r4, #8] + cmp r0, #0 + beq _02256A48 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, sp, #0x10 + add r3, sp, #0xc + bl ov25_02255DBC + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + ldr r0, [r5, #0x64] + lsl r1, r1, #0xc + lsl r2, r2, #0xc + bl ov25_02255900 + mov r6, #0 + add r7, sp, #0x10 +_02256A02: + ldr r0, [r4, #0x3c] + cmp r0, #0 + beq _02256A36 + ldr r0, [r4, #0x40] + add r1, r7, #0 + add r2, sp, #0xc + bl ov25_02255E24 + cmp r0, #0 + ldr r0, [r5, #0x4c] + beq _02256A2E + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + lsl r1, r1, #0xc + lsl r2, r2, #0xc + bl ov25_02255900 + ldr r0, [r5, #0x4c] + mov r1, #0 + bl ov25_02255914 + b _02256A3E +_02256A2E: + mov r1, #1 + bl ov25_02255914 + b _02256A3E +_02256A36: + ldr r0, [r5, #0x4c] + mov r1, #1 + bl ov25_02255914 +_02256A3E: + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #6 + blo _02256A02 +_02256A48: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov47_02256968 + + .rodata + + + .global Unk_ov47_02256A5C +Unk_ov47_02256A5C: ; 0x02256A5C + .incbin "incbin/overlay47_rodata.bin", 0x10, 0x2C - 0x10 + + .global Unk_ov47_02256A78 +Unk_ov47_02256A78: ; 0x02256A78 + .incbin "incbin/overlay47_rodata.bin", 0x2C, 0x24 + diff --git a/asm/ov48_022561C0.s b/asm/ov48_022561C0.s new file mode 100644 index 000000000..25ae1f490 --- /dev/null +++ b/asm/ov48_022561C0.s @@ -0,0 +1,483 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov48_022561C0 +ov48_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov48_022561D4 + ldr r1, _022561D0 ; =ov48_022562F0 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov48_022561D4 +_022561D0: .word ov48_022562F0 + thumb_func_end ov48_022561C0 + + thumb_func_start ov48_022561D4 +ov48_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0xb0 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov48_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov48_022562BC + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov48_022562BC + thumb_func_end ov48_022561D4 + + thumb_func_start ov48_0225621C +ov48_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + add r1, r5, #0 + add r1, #0xac + str r7, [r1, #0] + str r2, [sp] + bl ov48_02256408 + str r0, [r5, #0xc] + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl ov25_0225453C + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A72C + add r6, r0, #0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A24C + cmp r0, #0 + beq _02256260 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #8] + str r0, [r5, #4] + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0xc] + b _02256266 +_02256260: + ldr r0, [r6, #8] + str r0, [r5, #4] + ldr r0, [r6, #0xc] +_02256266: + str r0, [r5, #8] + ldr r1, [r5, #4] + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r0, r0, #5 + str r0, [r5, #4] + ldr r1, [r5, #8] + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r0, r0, #5 + str r0, [r5, #8] + add r0, r5, #0 + add r1, r7, #0 + bl ov48_022564E0 + add r0, r5, #0 + ldr r2, [sp] + add r0, #0xa8 + add r1, r5, #4 + bl ov48_0225650C + cmp r0, #0 + beq _022562A4 + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022562A4: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov48_0225621C + + thumb_func_start ov48_022562A8 +ov48_022562A8: ; 0x022562A8 + push {r4, lr} + add r4, r0, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl ov48_0225654C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov48_022562A8 + + thumb_func_start ov48_022562BC +ov48_022562BC: ; 0x022562BC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4] + add r5, r0, #0 + cmp r1, #3 + bhs _022562EA + lsl r2, r1, #2 + ldr r1, _022562EC ; =0x02256A2C + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022562EA + add r0, r4, #0 + bl ov48_022562A8 + add r0, r5, #0 + bl sub_0200DA58 + add r4, #0xac + ldr r0, [r4, #0] + bl ov25_02254260 +_022562EA: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022562EC: .word 0x02256A2C + thumb_func_end ov48_022562BC + + thumb_func_start ov48_022562F0 +ov48_022562F0: ; 0x022562F0 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov48_022562F0 + + thumb_func_start ov48_022562F8 +ov48_022562F8: ; 0x022562F8 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256300 + b _02256302 +_02256300: + mov r1, #2 +_02256302: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov48_022562F8 + + thumb_func_start ov48_0225630C +ov48_0225630C: ; 0x0225630C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _0225631C + cmp r0, #1 + beq _02256330 + b _02256352 +_0225631C: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0 + bl ov48_02256558 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256352 +_02256330: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0 + bl ov48_0225657C + cmp r0, #0 + beq _02256352 + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov48_022562F8 +_02256352: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov48_0225630C + + thumb_func_start ov48_02256358 +ov48_02256358: ; 0x02256358 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256370 + mov r1, #2 + bl ov48_022562F8 + add sp, #8 + mov r0, #0 + pop {r4, pc} +_02256370: + bl ov48_02256478 + add r1, r4, #0 + add r1, #0x94 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #2 + bl ov48_0225657C + cmp r0, #0 + beq _022563C8 + add r0, sp, #4 + add r1, sp, #0 + bl ov25_022544BC + cmp r0, #0 + beq _022563C8 + ldr r0, [sp, #4] + sub r0, #0x10 + cmp r0, #0xc0 + bhs _022563A2 + mov r1, #1 + b _022563A4 +_022563A2: + mov r1, #0 +_022563A4: + ldr r0, [sp] + sub r0, #0x10 + cmp r0, #0xc0 + bhs _022563B0 + mov r0, #1 + b _022563B2 +_022563B0: + mov r0, #0 +_022563B2: + tst r0, r1 + beq _022563C8 + add r0, r4, #0 + bl ov48_02256408 + str r0, [r4, #0xc] + add r4, #0xa8 + ldr r0, [r4, #0] + mov r1, #2 + bl ov48_02256558 +_022563C8: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov48_02256358 + + thumb_func_start ov48_022563D0 +ov48_022563D0: ; 0x022563D0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563E0 + cmp r0, #1 + beq _022563F4 + b _02256404 +_022563E0: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #1 + bl ov48_02256558 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256404 +_022563F4: + add r4, #0xa8 + ldr r0, [r4, #0] + bl ov48_02256588 + cmp r0, #0 + beq _02256404 + mov r0, #1 + pop {r4, pc} +_02256404: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov48_022563D0 + + thumb_func_start ov48_02256408 +ov48_02256408: ; 0x02256408 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl ov25_02254544 + bl sub_02027854 + mov r4, #0 + add r6, r0, #0 + add r7, r4, #0 +_0225641E: + add r0, r6, #0 + add r1, r4, #0 + bl sub_02027D84 + cmp r0, #1 + bne _0225646A + add r0, r6, #0 + add r1, r4, #0 + bl sub_02027D04 + cmp r0, #5 + bne _0225646A + ldr r1, _02256474 ; =0x02256A38 + lsl r0, r4, #1 + ldr r2, _02256474 ; =0x02256A38 + add r1, r1, r0 + ldrb r0, [r2, r0] + strb r0, [r5, #0x10] + ldrb r0, [r1, #1] + strb r0, [r5, #0x11] + b _0225644C +_02256448: + add r1, r1, #2 + add r4, r4, #1 +_0225644C: + add r0, r4, #1 + cmp r0, #0x76 + bhs _02256462 + ldrb r2, [r5, #0x10] + ldrb r0, [r1, #2] + cmp r2, r0 + bne _02256462 + ldrb r2, [r5, #0x11] + ldrb r0, [r1, #3] + cmp r2, r0 + beq _02256448 +_02256462: + add r7, r7, #1 + add r5, r5, #2 + cmp r7, #0x40 + bge _02256470 +_0225646A: + add r4, r4, #1 + cmp r4, #0x76 + blo _0225641E +_02256470: + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02256474: .word 0x02256A38 + thumb_func_end ov48_02256408 + + thumb_func_start ov48_02256478 +ov48_02256478: ; 0x02256478 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0xac + ldr r0, [r0, #0] + mov r6, #0 + bl ov25_02254534 + cmp r0, #0 + beq _022564DC + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl ov25_0225453C + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A72C + add r7, r0, #0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A24C + cmp r0, #0 + beq _022564B6 + ldr r1, [r4, #0x1c] + ldr r0, [r1, #8] + ldr r1, [r1, #0xc] + b _022564BA +_022564B6: + ldr r0, [r7, #8] + ldr r1, [r7, #0xc] +_022564BA: + asr r2, r0, #4 + lsr r2, r2, #0x1b + add r2, r0, r2 + asr r0, r2, #5 + asr r2, r1, #4 + lsr r2, r2, #0x1b + add r2, r1, r2 + asr r1, r2, #5 + ldr r2, [r5, #4] + cmp r0, r2 + bne _022564D6 + ldr r2, [r5, #8] + cmp r1, r2 + beq _022564DC +_022564D6: + str r0, [r5, #4] + str r1, [r5, #8] + mov r6, #1 +_022564DC: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov48_02256478 + + thumb_func_start ov48_022564E0 +ov48_022564E0: ; 0x022564E0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r1, #0 + bl ov25_02254544 + bl sub_020507E4 + add r6, r0, #0 + mov r4, #0 +_022564F2: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0206B1F0 + add r1, r5, #0 + add r1, #0x98 + add r4, r4, #1 + add r5, r5, #4 + str r0, [r1, #0] + cmp r4, #4 + blt _022564F2 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov48_022564E0 + + .rodata + + + .global Unk_ov48_02256A2C +Unk_ov48_02256A2C: ; 0x02256A2C + .incbin "incbin/overlay48_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov48_02256A38 +Unk_ov48_02256A38: ; 0x02256A38 + .incbin "incbin/overlay48_rodata.bin", 0xC, 0xEC + + .section .sinit, 4 + .word ov48_022561C0 diff --git a/asm/overlay48.s b/asm/ov48_0225650C.s similarity index 59% rename from asm/overlay48.s rename to asm/ov48_0225650C.s index 5048bd058..5d11992dd 100644 --- a/asm/overlay48.s +++ b/asm/ov48_0225650C.s @@ -1,469 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov48_022561C0 -ov48_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov48_022561D4 - ldr r1, _022561D0 ; =ov48_022562F0 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov48_022561D4 -_022561D0: .word ov48_022562F0 - thumb_func_end ov48_022561C0 - - thumb_func_start ov48_022561D4 -ov48_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0xb0 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov48_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov48_022562BC - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov48_022562BC - thumb_func_end ov48_022561D4 - - thumb_func_start ov48_0225621C -ov48_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - add r1, r5, #0 - add r1, #0xac - str r7, [r1, #0] - str r2, [sp] - bl ov48_02256408 - str r0, [r5, #0xc] - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl ov25_0225453C - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A72C - add r6, r0, #0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A24C - cmp r0, #0 - beq _02256260 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #8] - str r0, [r5, #4] - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0xc] - b _02256266 -_02256260: - ldr r0, [r6, #8] - str r0, [r5, #4] - ldr r0, [r6, #0xc] -_02256266: - str r0, [r5, #8] - ldr r1, [r5, #4] - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r0, r0, #5 - str r0, [r5, #4] - ldr r1, [r5, #8] - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r0, r0, #5 - str r0, [r5, #8] - add r0, r5, #0 - add r1, r7, #0 - bl ov48_022564E0 - add r0, r5, #0 - ldr r2, [sp] - add r0, #0xa8 - add r1, r5, #4 - bl ov48_0225650C - cmp r0, #0 - beq _022562A4 - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022562A4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov48_0225621C - - thumb_func_start ov48_022562A8 -ov48_022562A8: ; 0x022562A8 - push {r4, lr} - add r4, r0, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl ov48_0225654C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov48_022562A8 - - thumb_func_start ov48_022562BC -ov48_022562BC: ; 0x022562BC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #3 - bhs _022562EA - lsl r2, r1, #2 - ldr r1, _022562EC ; =0x02256A2C - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022562EA - add r0, r4, #0 - bl ov48_022562A8 - add r0, r5, #0 - bl sub_0200DA58 - add r4, #0xac - ldr r0, [r4, #0] - bl ov25_02254260 -_022562EA: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022562EC: .word 0x02256A2C - thumb_func_end ov48_022562BC - - thumb_func_start ov48_022562F0 -ov48_022562F0: ; 0x022562F0 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov48_022562F0 - - thumb_func_start ov48_022562F8 -ov48_022562F8: ; 0x022562F8 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256300 - b _02256302 -_02256300: - mov r1, #2 -_02256302: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov48_022562F8 - - thumb_func_start ov48_0225630C -ov48_0225630C: ; 0x0225630C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225631C - cmp r0, #1 - beq _02256330 - b _02256352 -_0225631C: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0 - bl ov48_02256558 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256352 -_02256330: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0 - bl ov48_0225657C - cmp r0, #0 - beq _02256352 - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov48_022562F8 -_02256352: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov48_0225630C - - thumb_func_start ov48_02256358 -ov48_02256358: ; 0x02256358 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256370 - mov r1, #2 - bl ov48_022562F8 - add sp, #8 - mov r0, #0 - pop {r4, pc} -_02256370: - bl ov48_02256478 - add r1, r4, #0 - add r1, #0x94 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #2 - bl ov48_0225657C - cmp r0, #0 - beq _022563C8 - add r0, sp, #4 - add r1, sp, #0 - bl ov25_022544BC - cmp r0, #0 - beq _022563C8 - ldr r0, [sp, #4] - sub r0, #0x10 - cmp r0, #0xc0 - bhs _022563A2 - mov r1, #1 - b _022563A4 -_022563A2: - mov r1, #0 -_022563A4: - ldr r0, [sp] - sub r0, #0x10 - cmp r0, #0xc0 - bhs _022563B0 - mov r0, #1 - b _022563B2 -_022563B0: - mov r0, #0 -_022563B2: - tst r0, r1 - beq _022563C8 - add r0, r4, #0 - bl ov48_02256408 - str r0, [r4, #0xc] - add r4, #0xa8 - ldr r0, [r4, #0] - mov r1, #2 - bl ov48_02256558 -_022563C8: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov48_02256358 - - thumb_func_start ov48_022563D0 -ov48_022563D0: ; 0x022563D0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563E0 - cmp r0, #1 - beq _022563F4 - b _02256404 -_022563E0: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #1 - bl ov48_02256558 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256404 -_022563F4: - add r4, #0xa8 - ldr r0, [r4, #0] - bl ov48_02256588 - cmp r0, #0 - beq _02256404 - mov r0, #1 - pop {r4, pc} -_02256404: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov48_022563D0 - - thumb_func_start ov48_02256408 -ov48_02256408: ; 0x02256408 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl ov25_02254544 - bl sub_02027854 - mov r4, #0 - add r6, r0, #0 - add r7, r4, #0 -_0225641E: - add r0, r6, #0 - add r1, r4, #0 - bl sub_02027D84 - cmp r0, #1 - bne _0225646A - add r0, r6, #0 - add r1, r4, #0 - bl sub_02027D04 - cmp r0, #5 - bne _0225646A - ldr r1, _02256474 ; =0x02256A38 - lsl r0, r4, #1 - ldr r2, _02256474 ; =0x02256A38 - add r1, r1, r0 - ldrb r0, [r2, r0] - strb r0, [r5, #0x10] - ldrb r0, [r1, #1] - strb r0, [r5, #0x11] - b _0225644C -_02256448: - add r1, r1, #2 - add r4, r4, #1 -_0225644C: - add r0, r4, #1 - cmp r0, #0x76 - bhs _02256462 - ldrb r2, [r5, #0x10] - ldrb r0, [r1, #2] - cmp r2, r0 - bne _02256462 - ldrb r2, [r5, #0x11] - ldrb r0, [r1, #3] - cmp r2, r0 - beq _02256448 -_02256462: - add r7, r7, #1 - add r5, r5, #2 - cmp r7, #0x40 - bge _02256470 -_0225646A: - add r4, r4, #1 - cmp r4, #0x76 - blo _0225641E -_02256470: - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02256474: .word 0x02256A38 - thumb_func_end ov48_02256408 - - thumb_func_start ov48_02256478 -ov48_02256478: ; 0x02256478 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0xac - ldr r0, [r0, #0] - mov r6, #0 - bl ov25_02254534 - cmp r0, #0 - beq _022564DC - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl ov25_0225453C - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A72C - add r7, r0, #0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A24C - cmp r0, #0 - beq _022564B6 - ldr r1, [r4, #0x1c] - ldr r0, [r1, #8] - ldr r1, [r1, #0xc] - b _022564BA -_022564B6: - ldr r0, [r7, #8] - ldr r1, [r7, #0xc] -_022564BA: - asr r2, r0, #4 - lsr r2, r2, #0x1b - add r2, r0, r2 - asr r0, r2, #5 - asr r2, r1, #4 - lsr r2, r2, #0x1b - add r2, r1, r2 - asr r1, r2, #5 - ldr r2, [r5, #4] - cmp r0, r2 - bne _022564D6 - ldr r2, [r5, #8] - cmp r1, r2 - beq _022564DC -_022564D6: - str r0, [r5, #4] - str r1, [r5, #8] - mov r6, #1 -_022564DC: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov48_02256478 - - thumb_func_start ov48_022564E0 -ov48_022564E0: ; 0x022564E0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r1, #0 - bl ov25_02254544 - bl sub_020507E4 - add r6, r0, #0 - mov r4, #0 -_022564F2: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0206B1F0 - add r1, r5, #0 - add r1, #0x98 - add r4, r4, #1 - add r5, r5, #4 - str r0, [r1, #0] - cmp r4, #4 - blt _022564F2 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov48_022564E0 thumb_func_start ov48_0225650C ov48_0225650C: ; 0x0225650C @@ -1126,14 +667,15 @@ _02256A26: pop {r4, pc} ; .align 2, 0 thumb_func_end ov48_022569FC - ; 0x02256A2C - .rodata - .incbin "incbin/overlay48_rodata.bin" - .section .sinit, 4 - .word ov48_022561C0 - .bss - .space 0x0 + .global Unk_ov48_02256B24 +Unk_ov48_02256B24: ; 0x02256B24 + .incbin "incbin/overlay48_rodata.bin", 0xF8, 0x114 - 0xF8 + + .global Unk_ov48_02256B40 +Unk_ov48_02256B40: ; 0x02256B40 + .incbin "incbin/overlay48_rodata.bin", 0x114, 0x30 + diff --git a/asm/overlay49.s b/asm/ov49_022561C0.s similarity index 51% rename from asm/overlay49.s rename to asm/ov49_022561C0.s index fcb0fdc41..df37dc6d7 100644 --- a/asm/overlay49.s +++ b/asm/ov49_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov49_022561C0 ov49_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -302,278 +305,12 @@ _022563CE: ; .align 2, 0 thumb_func_end ov49_022563A0 - thumb_func_start ov49_022563D4 -ov49_022563D4: ; 0x022563D4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #8 - mov r1, #0x3c - bl sub_02018144 - add r4, r0, #0 - beq _0225640A - add r0, #8 - mov r1, #4 - bl ov25_02255090 - str r5, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - bl ov25_02254664 - str r0, [r4, #0x20] - add r0, r4, #0 - add r1, r5, #0 - bl ov49_02256410 - str r4, [r6, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_0225640A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov49_022563D4 - - thumb_func_start ov49_02256410 -ov49_02256410: ; 0x02256410 - push {r4, r5, lr} - sub sp, #0xc - mov r3, #0 - str r3, [sp] - mov r2, #1 - add r5, r0, #0 - add r4, r1, #0 - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0x45 - bl sub_02006EC0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - add r0, #0x28 - mov r1, #0xc - mov r2, #0x43 - mov r3, #0x44 - bl ov25_02255958 - add r2, r5, #0 - ldr r0, [r5, #0x20] - ldr r1, _02256460 ; =0x022565E0 - add r2, #0x28 - bl ov25_02255810 - str r0, [r5, #0x24] - ldr r1, [r4, #0] - mov r2, #0x25 - lsl r1, r1, #4 - add r1, #0x38 - lsl r1, r1, #0xc - lsl r2, r2, #0xe - bl ov25_02255900 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02256460: .word 0x022565E0 - thumb_func_end ov49_02256410 - - thumb_func_start ov49_02256464 -ov49_02256464: ; 0x02256464 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x24] - cmp r1, #0 - beq _02256474 - ldr r0, [r4, #0x20] - bl ov25_022558B0 -_02256474: - add r4, #0x28 - add r0, r4, #0 - bl ov25_022559B0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov49_02256464 - - thumb_func_start ov49_02256480 -ov49_02256480: ; 0x02256480 - push {r4, lr} - add r4, r0, #0 - beq _02256490 - bl ov49_02256464 - add r0, r4, #0 - bl sub_020181C4 -_02256490: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov49_02256480 - - thumb_func_start ov49_02256494 -ov49_02256494: ; 0x02256494 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _022564B4 ; =0x0225660C - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022564B4: .word 0x0225660C - thumb_func_end ov49_02256494 - - thumb_func_start ov49_022564B8 -ov49_022564B8: ; 0x022564B8 - ldr r3, _022564C0 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022564C0: .word ov25_02255130 - thumb_func_end ov49_022564B8 - - thumb_func_start ov49_022564C4 -ov49_022564C4: ; 0x022564C4 - ldr r3, _022564CC ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022564CC: .word ov25_02255154 - thumb_func_end ov49_022564C4 - - thumb_func_start ov49_022564D0 -ov49_022564D0: ; 0x022564D0 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov49_022564D0 - - thumb_func_start ov49_022564E4 -ov49_022564E4: ; 0x022564E4 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - add r0, r4, #0 - bl ov25_02255240 - ldr r0, [r5, #4] - ldr r2, _0225656C ; =0x022565F0 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x42 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x41 - mov r3, #6 - bl sub_02006E60 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256570 ; =0x04001000 - ldr r0, _02256574 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov49_022564D0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_0225656C: .word 0x022565F0 -_02256570: .word 0x04001000 -_02256574: .word 0xFFFFE0FF - thumb_func_end ov49_022564E4 - - thumb_func_start ov49_02256578 -ov49_02256578: ; 0x02256578 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov49_022564D0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov49_02256578 - - thumb_func_start ov49_02256594 -ov49_02256594: ; 0x02256594 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_0225523C - add r5, r0, #0 - add r0, r6, #0 - bl ov25_02255240 - add r4, r0, #0 - ldr r0, _022565D0 ; =0x00000663 - bl ov25_02254424 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r1, [r4, #0] - mov r2, #0x25 - lsl r1, r1, #4 - add r1, #0x38 - ldr r0, [r5, #0x24] - lsl r1, r1, #0xc - lsl r2, r2, #0xe - bl ov25_02255900 - add r0, r6, #0 - bl ov49_022564D0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022565D0: .word 0x00000663 - thumb_func_end ov49_02256594 - ; 0x022565D4 - - .rodata - .incbin "incbin/overlay49_rodata.bin" + + + .global Unk_ov49_022565D4 +Unk_ov49_022565D4: ; 0x022565D4 + .incbin "incbin/overlay49_rodata.bin", 0x0, 0xC .section .sinit, 4 .word ov49_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov49_022563D4.s b/asm/ov49_022563D4.s new file mode 100644 index 000000000..2c70e5d37 --- /dev/null +++ b/asm/ov49_022563D4.s @@ -0,0 +1,288 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov49_022563D4 +ov49_022563D4: ; 0x022563D4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #8 + mov r1, #0x3c + bl sub_02018144 + add r4, r0, #0 + beq _0225640A + add r0, #8 + mov r1, #4 + bl ov25_02255090 + str r5, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + bl ov25_02254664 + str r0, [r4, #0x20] + add r0, r4, #0 + add r1, r5, #0 + bl ov49_02256410 + str r4, [r6, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_0225640A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov49_022563D4 + + thumb_func_start ov49_02256410 +ov49_02256410: ; 0x02256410 + push {r4, r5, lr} + sub sp, #0xc + mov r3, #0 + str r3, [sp] + mov r2, #1 + add r5, r0, #0 + add r4, r1, #0 + str r2, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xc + mov r1, #0x45 + bl sub_02006EC0 + mov r0, #8 + str r0, [sp] + add r0, r5, #0 + add r0, #0x28 + mov r1, #0xc + mov r2, #0x43 + mov r3, #0x44 + bl ov25_02255958 + add r2, r5, #0 + ldr r0, [r5, #0x20] + ldr r1, _02256460 ; =0x022565E0 + add r2, #0x28 + bl ov25_02255810 + str r0, [r5, #0x24] + ldr r1, [r4, #0] + mov r2, #0x25 + lsl r1, r1, #4 + add r1, #0x38 + lsl r1, r1, #0xc + lsl r2, r2, #0xe + bl ov25_02255900 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02256460: .word 0x022565E0 + thumb_func_end ov49_02256410 + + thumb_func_start ov49_02256464 +ov49_02256464: ; 0x02256464 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x24] + cmp r1, #0 + beq _02256474 + ldr r0, [r4, #0x20] + bl ov25_022558B0 +_02256474: + add r4, #0x28 + add r0, r4, #0 + bl ov25_022559B0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov49_02256464 + + thumb_func_start ov49_02256480 +ov49_02256480: ; 0x02256480 + push {r4, lr} + add r4, r0, #0 + beq _02256490 + bl ov49_02256464 + add r0, r4, #0 + bl sub_020181C4 +_02256490: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov49_02256480 + + thumb_func_start ov49_02256494 +ov49_02256494: ; 0x02256494 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _022564B4 ; =0x0225660C + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_022564B4: .word 0x0225660C + thumb_func_end ov49_02256494 + + thumb_func_start ov49_022564B8 +ov49_022564B8: ; 0x022564B8 + ldr r3, _022564C0 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022564C0: .word ov25_02255130 + thumb_func_end ov49_022564B8 + + thumb_func_start ov49_022564C4 +ov49_022564C4: ; 0x022564C4 + ldr r3, _022564CC ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022564CC: .word ov25_02255154 + thumb_func_end ov49_022564C4 + + thumb_func_start ov49_022564D0 +ov49_022564D0: ; 0x022564D0 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov49_022564D0 + + thumb_func_start ov49_022564E4 +ov49_022564E4: ; 0x022564E4 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + add r0, r4, #0 + bl ov25_02255240 + ldr r0, [r5, #4] + ldr r2, _0225656C ; =0x022565F0 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x42 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r1, #0x41 + mov r3, #6 + bl sub_02006E60 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256570 ; =0x04001000 + ldr r0, _02256574 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov49_022564D0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_0225656C: .word 0x022565F0 +_02256570: .word 0x04001000 +_02256574: .word 0xFFFFE0FF + thumb_func_end ov49_022564E4 + + thumb_func_start ov49_02256578 +ov49_02256578: ; 0x02256578 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov49_022564D0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov49_02256578 + + thumb_func_start ov49_02256594 +ov49_02256594: ; 0x02256594 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + bl ov25_0225523C + add r5, r0, #0 + add r0, r6, #0 + bl ov25_02255240 + add r4, r0, #0 + ldr r0, _022565D0 ; =0x00000663 + bl ov25_02254424 + mov r0, #0 + add r1, r0, #0 + bl ov25_022546B8 + ldr r1, [r4, #0] + mov r2, #0x25 + lsl r1, r1, #4 + add r1, #0x38 + ldr r0, [r5, #0x24] + lsl r1, r1, #0xc + lsl r2, r2, #0xe + bl ov25_02255900 + add r0, r6, #0 + bl ov49_022564D0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022565D0: .word 0x00000663 + thumb_func_end ov49_02256594 + + .rodata + + + .global Unk_ov49_022565E0 +Unk_ov49_022565E0: ; 0x022565E0 + .incbin "incbin/overlay49_rodata.bin", 0xC, 0x1C - 0xC + + .global Unk_ov49_022565F0 +Unk_ov49_022565F0: ; 0x022565F0 + .incbin "incbin/overlay49_rodata.bin", 0x1C, 0x38 - 0x1C + + .global Unk_ov49_0225660C +Unk_ov49_0225660C: ; 0x0225660C + .incbin "incbin/overlay49_rodata.bin", 0x38, 0x30 + diff --git a/asm/ov50_022561C0.s b/asm/ov50_022561C0.s new file mode 100644 index 000000000..3cb1f91ab --- /dev/null +++ b/asm/ov50_022561C0.s @@ -0,0 +1,482 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov50_022561C0 +ov50_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov50_022561D4 + ldr r1, _022561D0 ; =ov50_022563B0 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov50_022561D4 +_022561D0: .word ov50_022563B0 + thumb_func_end ov50_022561C0 + + thumb_func_start ov50_022561D4 +ov50_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0xb0 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov50_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov50_0225636C + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov50_0225636C + thumb_func_end ov50_022561D4 + + thumb_func_start ov50_0225621C +ov50_0225621C: ; 0x0225621C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r1, #0 + add r0, sp, #4 + add r6, r2, #0 + bl sub_020138A4 + add r0, r4, #0 + bl ov25_02254540 + add r1, r5, #0 + add r1, #0x98 + str r0, [r1, #0] + add r0, r5, #4 + add r1, r5, #0 + add r2, sp, #4 + bl ov50_022562AC + add r0, r5, #0 + ldrb r1, [r5, #0x12] + add r0, #0xa8 + add r2, r6, #0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xa8 + ldr r1, [r0, #0] + ldr r0, [r5, #8] + sub r0, r0, #1 + add r1, r1, r0 + add r0, r5, #0 + add r0, #0xac + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x90 + add r1, r5, #4 + bl ov50_02256510 + cmp r0, #0 + beq _0225629C + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _022562A4 ; =0x02256998 + ldr r2, _022562A8 ; =ov50_02256360 + mov r1, #0x25 + add r3, r5, #0 + bl ov25_02255ACC + add r1, r5, #0 + add r1, #0x9c + str r0, [r1, #0] + add r0, r5, #0 + mov r1, #0 + add r0, #0xa0 + str r1, [r0, #0] + add r5, #0x94 + add sp, #0x14 + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0225629C: + mov r0, #0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_022562A4: .word 0x02256998 +_022562A8: .word ov50_02256360 + thumb_func_end ov50_0225621C + + thumb_func_start ov50_022562AC +ov50_022562AC: ; 0x022562AC + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r6, r0, #0 + ldr r0, [r4, #4] + str r1, [sp] + str r0, [r6, #0] + ldr r0, [r4, #8] + str r0, [r6, #8] + ldr r1, [r6, #0] + ldr r0, _0225633C ; =0x02256A2B + ldrb r0, [r0, r1] + str r0, [r6, #4] + ldr r0, [r6, #0] + cmp r0, #2 + bne _022562F0 + ldr r5, [r4, #0] + mov r1, #0x19 + add r0, r5, #0 + lsl r1, r1, #4 + bl sub_020E2178 + cmp r1, #0 + beq _022562EC + add r0, r5, #0 + mov r1, #0x64 + bl sub_020E2178 + cmp r1, #0 + beq _022562F0 + mov r0, #3 + tst r0, r5 + bne _022562F0 +_022562EC: + mov r0, #0x1d + str r0, [r6, #4] +_022562F0: + ldr r0, [r4, #8] + mov r1, #7 + sub r0, r0, #1 + bl sub_020E2178 + mov r2, #7 + ldr r3, [r4, #0xc] + sub r0, r2, r1 + add r7, r3, r0 + cmp r7, #7 + blo _02256310 + add r0, r7, #0 + add r1, r2, #0 + bl sub_020E2178 + add r7, r1, #0 +_02256310: + ldr r0, [r6, #4] + mov r4, #0 + cmp r0, #0 + bls _0225633A + add r5, r6, #0 +_0225631A: + ldr r0, [sp] + add r2, r4, #1 + strh r2, [r5, #0xc] + add r0, #0x98 + ldr r0, [r0, #0] + ldr r1, [r6, #0] + bl sub_020569A8 + strb r0, [r5, #0xf] + add r0, r7, r4 + strb r0, [r5, #0xe] + ldr r0, [r6, #4] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blo _0225631A +_0225633A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225633C: .word 0x02256A2B + thumb_func_end ov50_022562AC + + thumb_func_start ov50_02256340 +ov50_02256340: ; 0x02256340 + push {r4, lr} + add r4, r0, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl ov25_02255B34 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl ov50_0225654C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov50_02256340 + + thumb_func_start ov50_02256360 +ov50_02256360: ; 0x02256360 + add r2, r3, #0 + add r2, #0xa4 + str r0, [r2, #0] + add r3, #0xa0 + str r1, [r3, #0] + bx lr + thumb_func_end ov50_02256360 + + thumb_func_start ov50_0225636C +ov50_0225636C: ; 0x0225636C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _022563AA + add r0, r4, #0 + add r0, #0x94 + add r1, #0x9c + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _022563AC ; =0x0225698C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _022563AA + add r0, r4, #0 + bl ov50_02256340 + add r0, r5, #0 + bl sub_0200DA58 + add r4, #0x94 + ldr r0, [r4, #0] + bl ov25_02254260 +_022563AA: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022563AC: .word 0x0225698C + thumb_func_end ov50_0225636C + + thumb_func_start ov50_022563B0 +ov50_022563B0: ; 0x022563B0 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov50_022563B0 + + thumb_func_start ov50_022563B8 +ov50_022563B8: ; 0x022563B8 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022563C0 + b _022563C2 +_022563C0: + mov r1, #2 +_022563C2: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov50_022563B8 + + thumb_func_start ov50_022563CC +ov50_022563CC: ; 0x022563CC + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563DC + cmp r0, #1 + beq _022563F0 + b _02256412 +_022563DC: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + mov r1, #0 + bl ov50_022565FC + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256412 +_022563F0: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + mov r1, #0 + bl ov50_02256620 + cmp r0, #0 + beq _02256412 + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov50_022563B8 +_02256412: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov50_022563CC + + thumb_func_start ov50_02256418 +ov50_02256418: ; 0x02256418 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r1, [r5, #2] + cmp r1, #0 + beq _0225642C + mov r1, #2 + bl ov50_022563B8 + mov r0, #0 + pop {r3, r4, r5, pc} +_0225642C: + ldrb r0, [r5, #1] + cmp r0, #0 + beq _02256438 + cmp r0, #1 + beq _022564BE + b _022564D2 +_02256438: + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + cmp r0, #1 + bne _022564D2 + add r0, r5, #0 + mov r1, #0 + add r0, #0xa0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xa8 + ldr r2, [r0, #0] + add r0, r5, #0 + add r0, #0xa4 + ldr r1, [r0, #0] + cmp r1, r2 + blo _022564D2 + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r1, r0 + bhi _022564D2 + add r0, r5, #0 + add r0, #0x98 + sub r4, r1, r2 + ldr r0, [r0, #0] + ldr r1, [r5, #4] + add r2, r4, #1 + bl sub_020569A8 + cmp r0, #0 + beq _02256488 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + ldr r1, [r5, #4] + add r2, r4, #1 + bl sub_02056970 + b _02256496 +_02256488: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + ldr r1, [r5, #4] + add r2, r4, #1 + bl sub_02056934 +_02256496: + add r3, r5, #0 + add r3, #0x13 + lsl r2, r4, #2 + ldrb r1, [r3, r2] + mov r0, #1 + eor r0, r1 + strb r0, [r3, r2] + add r0, r5, #0 + add r0, #0x8c + str r4, [r0, #0] + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + mov r1, #2 + bl ov50_022565FC + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] + b _022564D2 +_022564BE: + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + mov r1, #2 + bl ov50_02256620 + cmp r0, #0 + beq _022564D2 + mov r0, #0 + strb r0, [r5, #1] +_022564D2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov50_02256418 + + thumb_func_start ov50_022564D8 +ov50_022564D8: ; 0x022564D8 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022564E8 + cmp r0, #1 + beq _022564FC + b _0225650C +_022564E8: + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + mov r1, #1 + bl ov50_022565FC + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225650C +_022564FC: + add r4, #0x90 + ldr r0, [r4, #0] + bl ov50_0225662C + cmp r0, #0 + beq _0225650C + mov r0, #1 + pop {r4, pc} +_0225650C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov50_022564D8 + + .rodata + + + .global Unk_ov50_0225698C +Unk_ov50_0225698C: ; 0x0225698C + .incbin "incbin/overlay50_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov50_02256998 +Unk_ov50_02256998: ; 0x02256998 + .incbin "incbin/overlay50_rodata.bin", 0xC, 0xA0 - 0xC + + .global Unk_ov50_02256A2C +Unk_ov50_02256A2C: ; 0x02256A2C + .incbin "incbin/overlay50_rodata.bin", 0xA0, 0xC + + .section .sinit, 4 + .word ov50_022561C0 diff --git a/asm/overlay50.s b/asm/ov50_02256510.s similarity index 57% rename from asm/overlay50.s rename to asm/ov50_02256510.s index d2880a93e..15fc03dd8 100644 --- a/asm/overlay50.s +++ b/asm/ov50_02256510.s @@ -1,464 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov50_022561C0 -ov50_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov50_022561D4 - ldr r1, _022561D0 ; =ov50_022563B0 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov50_022561D4 -_022561D0: .word ov50_022563B0 - thumb_func_end ov50_022561C0 - - thumb_func_start ov50_022561D4 -ov50_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0xb0 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov50_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov50_0225636C - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov50_0225636C - thumb_func_end ov50_022561D4 - - thumb_func_start ov50_0225621C -ov50_0225621C: ; 0x0225621C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r1, #0 - add r0, sp, #4 - add r6, r2, #0 - bl sub_020138A4 - add r0, r4, #0 - bl ov25_02254540 - add r1, r5, #0 - add r1, #0x98 - str r0, [r1, #0] - add r0, r5, #4 - add r1, r5, #0 - add r2, sp, #4 - bl ov50_022562AC - add r0, r5, #0 - ldrb r1, [r5, #0x12] - add r0, #0xa8 - add r2, r6, #0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xa8 - ldr r1, [r0, #0] - ldr r0, [r5, #8] - sub r0, r0, #1 - add r1, r1, r0 - add r0, r5, #0 - add r0, #0xac - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x90 - add r1, r5, #4 - bl ov50_02256510 - cmp r0, #0 - beq _0225629C - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _022562A4 ; =0x02256998 - ldr r2, _022562A8 ; =ov50_02256360 - mov r1, #0x25 - add r3, r5, #0 - bl ov25_02255ACC - add r1, r5, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r5, #0 - mov r1, #0 - add r0, #0xa0 - str r1, [r0, #0] - add r5, #0x94 - add sp, #0x14 - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0225629C: - mov r0, #0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_022562A4: .word 0x02256998 -_022562A8: .word ov50_02256360 - thumb_func_end ov50_0225621C - - thumb_func_start ov50_022562AC -ov50_022562AC: ; 0x022562AC - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r6, r0, #0 - ldr r0, [r4, #4] - str r1, [sp] - str r0, [r6, #0] - ldr r0, [r4, #8] - str r0, [r6, #8] - ldr r1, [r6, #0] - ldr r0, _0225633C ; =0x02256A2B - ldrb r0, [r0, r1] - str r0, [r6, #4] - ldr r0, [r6, #0] - cmp r0, #2 - bne _022562F0 - ldr r5, [r4, #0] - mov r1, #0x19 - add r0, r5, #0 - lsl r1, r1, #4 - bl sub_020E2178 - cmp r1, #0 - beq _022562EC - add r0, r5, #0 - mov r1, #0x64 - bl sub_020E2178 - cmp r1, #0 - beq _022562F0 - mov r0, #3 - tst r0, r5 - bne _022562F0 -_022562EC: - mov r0, #0x1d - str r0, [r6, #4] -_022562F0: - ldr r0, [r4, #8] - mov r1, #7 - sub r0, r0, #1 - bl sub_020E2178 - mov r2, #7 - ldr r3, [r4, #0xc] - sub r0, r2, r1 - add r7, r3, r0 - cmp r7, #7 - blo _02256310 - add r0, r7, #0 - add r1, r2, #0 - bl sub_020E2178 - add r7, r1, #0 -_02256310: - ldr r0, [r6, #4] - mov r4, #0 - cmp r0, #0 - bls _0225633A - add r5, r6, #0 -_0225631A: - ldr r0, [sp] - add r2, r4, #1 - strh r2, [r5, #0xc] - add r0, #0x98 - ldr r0, [r0, #0] - ldr r1, [r6, #0] - bl sub_020569A8 - strb r0, [r5, #0xf] - add r0, r7, r4 - strb r0, [r5, #0xe] - ldr r0, [r6, #4] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blo _0225631A -_0225633A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225633C: .word 0x02256A2B - thumb_func_end ov50_022562AC - - thumb_func_start ov50_02256340 -ov50_02256340: ; 0x02256340 - push {r4, lr} - add r4, r0, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl ov25_02255B34 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov50_0225654C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov50_02256340 - - thumb_func_start ov50_02256360 -ov50_02256360: ; 0x02256360 - add r2, r3, #0 - add r2, #0xa4 - str r0, [r2, #0] - add r3, #0xa0 - str r1, [r3, #0] - bx lr - thumb_func_end ov50_02256360 - - thumb_func_start ov50_0225636C -ov50_0225636C: ; 0x0225636C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _022563AA - add r0, r4, #0 - add r0, #0x94 - add r1, #0x9c - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _022563AC ; =0x0225698C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _022563AA - add r0, r4, #0 - bl ov50_02256340 - add r0, r5, #0 - bl sub_0200DA58 - add r4, #0x94 - ldr r0, [r4, #0] - bl ov25_02254260 -_022563AA: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022563AC: .word 0x0225698C - thumb_func_end ov50_0225636C - - thumb_func_start ov50_022563B0 -ov50_022563B0: ; 0x022563B0 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov50_022563B0 - - thumb_func_start ov50_022563B8 -ov50_022563B8: ; 0x022563B8 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022563C0 - b _022563C2 -_022563C0: - mov r1, #2 -_022563C2: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov50_022563B8 - - thumb_func_start ov50_022563CC -ov50_022563CC: ; 0x022563CC - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563DC - cmp r0, #1 - beq _022563F0 - b _02256412 -_022563DC: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - mov r1, #0 - bl ov50_022565FC - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256412 -_022563F0: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - mov r1, #0 - bl ov50_02256620 - cmp r0, #0 - beq _02256412 - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov50_022563B8 -_02256412: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov50_022563CC - - thumb_func_start ov50_02256418 -ov50_02256418: ; 0x02256418 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r1, [r5, #2] - cmp r1, #0 - beq _0225642C - mov r1, #2 - bl ov50_022563B8 - mov r0, #0 - pop {r3, r4, r5, pc} -_0225642C: - ldrb r0, [r5, #1] - cmp r0, #0 - beq _02256438 - cmp r0, #1 - beq _022564BE - b _022564D2 -_02256438: - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - cmp r0, #1 - bne _022564D2 - add r0, r5, #0 - mov r1, #0 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xa8 - ldr r2, [r0, #0] - add r0, r5, #0 - add r0, #0xa4 - ldr r1, [r0, #0] - cmp r1, r2 - blo _022564D2 - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r1, r0 - bhi _022564D2 - add r0, r5, #0 - add r0, #0x98 - sub r4, r1, r2 - ldr r0, [r0, #0] - ldr r1, [r5, #4] - add r2, r4, #1 - bl sub_020569A8 - cmp r0, #0 - beq _02256488 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - ldr r1, [r5, #4] - add r2, r4, #1 - bl sub_02056970 - b _02256496 -_02256488: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - ldr r1, [r5, #4] - add r2, r4, #1 - bl sub_02056934 -_02256496: - add r3, r5, #0 - add r3, #0x13 - lsl r2, r4, #2 - ldrb r1, [r3, r2] - mov r0, #1 - eor r0, r1 - strb r0, [r3, r2] - add r0, r5, #0 - add r0, #0x8c - str r4, [r0, #0] - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - mov r1, #2 - bl ov50_022565FC - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] - b _022564D2 -_022564BE: - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - mov r1, #2 - bl ov50_02256620 - cmp r0, #0 - beq _022564D2 - mov r0, #0 - strb r0, [r5, #1] -_022564D2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov50_02256418 - - thumb_func_start ov50_022564D8 -ov50_022564D8: ; 0x022564D8 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022564E8 - cmp r0, #1 - beq _022564FC - b _0225650C -_022564E8: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - mov r1, #1 - bl ov50_022565FC - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225650C -_022564FC: - add r4, #0x90 - ldr r0, [r4, #0] - bl ov50_0225662C - cmp r0, #0 - beq _0225650C - mov r0, #1 - pop {r4, pc} -_0225650C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov50_022564D8 thumb_func_start ov50_02256510 ov50_02256510: ; 0x02256510 @@ -1052,14 +598,31 @@ _0225692E: ; .align 2, 0 _02256988: .word 0x02256A98 thumb_func_end ov50_02256894 - ; 0x0225698C - .rodata - .incbin "incbin/overlay50_rodata.bin" - .section .sinit, 4 - .word ov50_022561C0 - .bss - .space 0x0 + .global Unk_ov50_02256A38 +Unk_ov50_02256A38: ; 0x02256A38 + .incbin "incbin/overlay50_rodata.bin", 0xAC, 0xBC - 0xAC + + .global Unk_ov50_02256A48 +Unk_ov50_02256A48: ; 0x02256A48 + .incbin "incbin/overlay50_rodata.bin", 0xBC, 0xD4 - 0xBC + + .global Unk_ov50_02256A60 +Unk_ov50_02256A60: ; 0x02256A60 + .incbin "incbin/overlay50_rodata.bin", 0xD4, 0xF0 - 0xD4 + + .global Unk_ov50_02256A7C +Unk_ov50_02256A7C: ; 0x02256A7C + .incbin "incbin/overlay50_rodata.bin", 0xF0, 0x10C - 0xF0 + + .global Unk_ov50_02256A98 +Unk_ov50_02256A98: ; 0x02256A98 + .incbin "incbin/overlay50_rodata.bin", 0x10C, 0x134 - 0x10C + + .global Unk_ov50_02256AC0 +Unk_ov50_02256AC0: ; 0x02256AC0 + .incbin "incbin/overlay50_rodata.bin", 0x134, 0x30 + diff --git a/asm/overlay51.s b/asm/ov51_022561C0.s similarity index 55% rename from asm/overlay51.s rename to asm/ov51_022561C0.s index 8b361760e..40357573f 100644 --- a/asm/overlay51.s +++ b/asm/ov51_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov51_022561C0 ov51_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -217,187 +220,12 @@ _02256326: ; .align 2, 0 thumb_func_end ov51_022562F8 - thumb_func_start ov51_0225632C -ov51_0225632C: ; 0x0225632C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - beq _02256358 - add r0, #8 - mov r1, #8 - bl ov25_02255090 - str r6, [r4, #0] - bl ov25_02254674 - str r0, [r4, #4] - cmp r0, #0 - beq _02256358 - str r4, [r5, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_02256358: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov51_0225632C - - thumb_func_start ov51_0225635C -ov51_0225635C: ; 0x0225635C - push {r3, lr} - cmp r0, #0 - beq _02256366 - bl sub_020181C4 -_02256366: - pop {r3, pc} - thumb_func_end ov51_0225635C - - thumb_func_start ov51_02256368 -ov51_02256368: ; 0x02256368 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _02256388 ; =0x0225649C - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_02256388: .word 0x0225649C - thumb_func_end ov51_02256368 - - thumb_func_start ov51_0225638C -ov51_0225638C: ; 0x0225638C - ldr r3, _02256394 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_02256394: .word ov25_02255130 - thumb_func_end ov51_0225638C - - thumb_func_start ov51_02256398 -ov51_02256398: ; 0x02256398 - ldr r3, _022563A0 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022563A0: .word ov25_02255154 - thumb_func_end ov51_02256398 - - thumb_func_start ov51_022563A4 -ov51_022563A4: ; 0x022563A4 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov51_022563A4 - - thumb_func_start ov51_022563B8 -ov51_022563B8: ; 0x022563B8 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _0225644C ; =0x02256480 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #8 - str r1, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r3, #6 - bl sub_02006E3C - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r5, #4] - mov r1, #6 - add r3, r2, #0 - bl sub_02019CB8 - mov r0, #0x20 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #0xc - mov r1, #9 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - ldr r0, [r5, #4] - mov r1, #0x1a - mov r2, #6 - bl ov25_02255440 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256450 ; =0x04001000 - ldr r0, _02256454 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov51_022563A4 - add sp, #0x14 - pop {r4, r5, pc} - nop -_0225644C: .word 0x02256480 -_02256450: .word 0x04001000 -_02256454: .word 0xFFFFE0FF - thumb_func_end ov51_022563B8 - - thumb_func_start ov51_02256458 -ov51_02256458: ; 0x02256458 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov51_022563A4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov51_02256458 - ; 0x02256474 - - .rodata - .incbin "incbin/overlay51_rodata.bin" + + + .global Unk_ov51_02256474 +Unk_ov51_02256474: ; 0x02256474 + .incbin "incbin/overlay51_rodata.bin", 0x0, 0xC .section .sinit, 4 .word ov51_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov51_0225632C.s b/asm/ov51_0225632C.s new file mode 100644 index 000000000..6a7410bfd --- /dev/null +++ b/asm/ov51_0225632C.s @@ -0,0 +1,193 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov51_0225632C +ov51_0225632C: ; 0x0225632C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + beq _02256358 + add r0, #8 + mov r1, #8 + bl ov25_02255090 + str r6, [r4, #0] + bl ov25_02254674 + str r0, [r4, #4] + cmp r0, #0 + beq _02256358 + str r4, [r5, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_02256358: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov51_0225632C + + thumb_func_start ov51_0225635C +ov51_0225635C: ; 0x0225635C + push {r3, lr} + cmp r0, #0 + beq _02256366 + bl sub_020181C4 +_02256366: + pop {r3, pc} + thumb_func_end ov51_0225635C + + thumb_func_start ov51_02256368 +ov51_02256368: ; 0x02256368 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _02256388 ; =0x0225649C + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_02256388: .word 0x0225649C + thumb_func_end ov51_02256368 + + thumb_func_start ov51_0225638C +ov51_0225638C: ; 0x0225638C + ldr r3, _02256394 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_02256394: .word ov25_02255130 + thumb_func_end ov51_0225638C + + thumb_func_start ov51_02256398 +ov51_02256398: ; 0x02256398 + ldr r3, _022563A0 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022563A0: .word ov25_02255154 + thumb_func_end ov51_02256398 + + thumb_func_start ov51_022563A4 +ov51_022563A4: ; 0x022563A4 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov51_022563A4 + + thumb_func_start ov51_022563B8 +ov51_022563B8: ; 0x022563B8 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _0225644C ; =0x02256480 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #8 + str r1, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r3, #6 + bl sub_02006E3C + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r5, #4] + mov r1, #6 + add r3, r2, #0 + bl sub_02019CB8 + mov r0, #0x20 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #0xc + mov r1, #9 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + ldr r0, [r5, #4] + mov r1, #0x1a + mov r2, #6 + bl ov25_02255440 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256450 ; =0x04001000 + ldr r0, _02256454 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov51_022563A4 + add sp, #0x14 + pop {r4, r5, pc} + nop +_0225644C: .word 0x02256480 +_02256450: .word 0x04001000 +_02256454: .word 0xFFFFE0FF + thumb_func_end ov51_022563B8 + + thumb_func_start ov51_02256458 +ov51_02256458: ; 0x02256458 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov51_022563A4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov51_02256458 + + .rodata + + + .global Unk_ov51_02256480 +Unk_ov51_02256480: ; 0x02256480 + .incbin "incbin/overlay51_rodata.bin", 0xC, 0x28 - 0xC + + .global Unk_ov51_0225649C +Unk_ov51_0225649C: ; 0x0225649C + .incbin "incbin/overlay51_rodata.bin", 0x28, 0x24 + diff --git a/asm/ov52_022561C0.s b/asm/ov52_022561C0.s new file mode 100644 index 000000000..7d6e6514f --- /dev/null +++ b/asm/ov52_022561C0.s @@ -0,0 +1,724 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov52_022561C0 +ov52_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov52_022561D4 + ldr r1, _022561D0 ; =ov52_0225629C + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov52_022561D4 +_022561D0: .word ov52_0225629C + thumb_func_end ov52_022561C0 + + thumb_func_start ov52_022561D4 +ov52_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x24 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov52_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov52_02256260 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov52_02256260 + thumb_func_end ov52_022561D4 + + thumb_func_start ov52_0225621C +ov52_0225621C: ; 0x0225621C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x14 + add r1, r5, #4 + bl ov52_02256694 + cmp r0, #0 + beq _02256248 + mov r1, #0 + strb r1, [r5] + strb r1, [r5, #1] + add r0, r5, #0 + strb r1, [r5, #2] + add r0, #0x20 + strb r1, [r0] + add r0, r5, #0 + add r0, #0x21 + strb r1, [r0] + str r4, [r5, #0x18] + mov r0, #1 + pop {r3, r4, r5, pc} +_02256248: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov52_0225621C + + thumb_func_start ov52_0225624C +ov52_0225624C: ; 0x0225624C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl ov52_022566EC + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov52_0225624C + + thumb_func_start ov52_02256260 +ov52_02256260: ; 0x02256260 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #6 + bhs _02256294 + add r0, r4, #0 + bl ov52_022565EC + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256298 ; =0x02256D4C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _02256294 + add r0, r4, #0 + bl ov52_0225624C + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x18] + bl ov25_02254260 +_02256294: + pop {r3, r4, r5, pc} + nop +_02256298: .word 0x02256D4C + thumb_func_end ov52_02256260 + + thumb_func_start ov52_0225629C +ov52_0225629C: ; 0x0225629C + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov52_0225629C + + thumb_func_start ov52_022562A4 +ov52_022562A4: ; 0x022562A4 + ldrb r2, [r0, #2] + cmp r2, #0 + bne _022562AC + b _022562AE +_022562AC: + mov r1, #5 +_022562AE: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov52_022562A4 + + thumb_func_start ov52_022562B8 +ov52_022562B8: ; 0x022562B8 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022562C8 + cmp r0, #1 + beq _022562D8 + b _022562F2 +_022562C8: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov52_022567A4 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022562F2 +_022562D8: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov52_022567C8 + cmp r0, #0 + beq _022562F2 + ldr r0, [r4, #0x18] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov52_022562A4 +_022562F2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov52_022562B8 + + thumb_func_start ov52_022562F8 +ov52_022562F8: ; 0x022562F8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _0225630C + mov r1, #5 + bl ov52_022562A4 + mov r0, #0 + pop {r3, r4, r5, pc} +_0225630C: + ldrb r1, [r4, #1] + cmp r1, #0 + bne _0225635A + bl ov52_02256554 + cmp r0, #0 + beq _0225635A + add r0, r4, #0 + bl ov52_02256684 + cmp r0, #0 + beq _02256354 + ldr r0, [r4, #0x18] + bl ov25_0225453C + add r5, r0, #0 + ldr r0, [r4, #0x14] + mov r1, #3 + bl ov52_022567A4 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A2C8 + cmp r0, #0 + beq _0225634A + add r0, r4, #0 + mov r1, #3 + bl ov52_022562A4 + b _0225635A +_0225634A: + add r0, r4, #0 + mov r1, #2 + bl ov52_022562A4 + b _0225635A +_02256354: + ldr r0, _02256360 ; =0x0000066E + bl ov25_02254424 +_0225635A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02256360: .word 0x0000066E + thumb_func_end ov52_022562F8 + + thumb_func_start ov52_02256364 +ov52_02256364: ; 0x02256364 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256378 + mov r1, #5 + bl ov52_022562A4 + mov r0, #0 + pop {r4, pc} +_02256378: + ldrb r1, [r4, #1] + cmp r1, #0 + beq _02256388 + cmp r1, #1 + beq _02256398 + cmp r1, #2 + beq _022563E0 + b _0225642C +_02256388: + bl ov52_0225664C + mov r0, #0 + str r0, [r4, #0x1c] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225642C +_02256398: + bl ov52_02256430 + cmp r0, #0 + beq _022563AC + add r0, r4, #0 + mov r1, #4 + bl ov52_022562A4 + mov r0, #0 + pop {r4, pc} +_022563AC: + ldr r0, [r4, #0x1c] + cmp r0, #0x3c + bhs _022563B6 + add r0, r0, #1 + str r0, [r4, #0x1c] +_022563B6: + add r0, r4, #0 + bl ov52_0225666C + cmp r0, #0 + beq _0225642C + ldr r0, [r4, #0x1c] + cmp r0, #0x3c + blo _0225642C + add r0, r4, #0 + bl ov52_0225659C + ldr r0, [r4, #0x14] + mov r1, #6 + bl ov52_022567A4 + mov r0, #0 + str r0, [r4, #0x1c] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225642C +_022563E0: + bl ov52_02256430 + cmp r0, #0 + bne _022563F2 + add r0, r4, #0 + bl ov52_02256554 + cmp r0, #0 + beq _0225640C +_022563F2: + add r0, r4, #0 + bl ov52_0225667C + ldr r0, [r4, #0x14] + mov r1, #2 + bl ov52_022567A4 + add r0, r4, #0 + mov r1, #1 + bl ov52_022562A4 + mov r0, #0 + pop {r4, pc} +_0225640C: + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + cmp r0, #0x1e + blo _0225642C + mov r0, #0 + str r0, [r4, #0x1c] + add r0, r4, #0 + bl ov52_0225659C + cmp r0, #0 + beq _0225642C + ldr r0, [r4, #0x14] + mov r1, #6 + bl ov52_022567A4 +_0225642C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov52_02256364 + + thumb_func_start ov52_02256430 +ov52_02256430: ; 0x02256430 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl ov25_0225450C + cmp r0, #0 + beq _02256442 + mov r0, #1 + pop {r4, pc} +_02256442: + ldr r0, [r4, #0x18] + bl ov25_02254534 + cmp r0, #0 + beq _02256450 + mov r0, #1 + pop {r4, pc} +_02256450: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov52_02256430 + + thumb_func_start ov52_02256454 +ov52_02256454: ; 0x02256454 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256468 + mov r1, #5 + bl ov52_022562A4 + mov r0, #0 + pop {r4, pc} +_02256468: + ldrb r1, [r4, #1] + cmp r1, #0 + beq _02256478 + cmp r1, #1 + beq _02256482 + cmp r1, #2 + beq _0225649C + b _022564B4 +_02256478: + mov r0, #0 + str r0, [r4, #0x1c] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] +_02256482: + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] + cmp r0, #0x3c + blo _022564B4 + ldr r0, [r4, #0x14] + mov r1, #4 + bl ov52_022567A4 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022564B4 +_0225649C: + bl ov52_02256554 + cmp r0, #0 + beq _022564B4 + ldr r0, [r4, #0x14] + mov r1, #2 + bl ov52_022567A4 + add r0, r4, #0 + mov r1, #1 + bl ov52_022562A4 +_022564B4: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov52_02256454 + + thumb_func_start ov52_022564B8 +ov52_022564B8: ; 0x022564B8 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022564CC + mov r1, #5 + bl ov52_022562A4 + mov r0, #0 + pop {r4, pc} +_022564CC: + ldrb r1, [r4, #1] + cmp r1, #0 + beq _022564D8 + cmp r1, #1 + beq _022564EC + b _02256504 +_022564D8: + bl ov52_0225667C + ldr r0, [r4, #0x14] + mov r1, #5 + bl ov52_022567A4 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256504 +_022564EC: + bl ov52_02256554 + cmp r0, #0 + beq _02256504 + ldr r0, [r4, #0x14] + mov r1, #2 + bl ov52_022567A4 + add r0, r4, #0 + mov r1, #1 + bl ov52_022562A4 +_02256504: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov52_022564B8 + + thumb_func_start ov52_02256508 +ov52_02256508: ; 0x02256508 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #1] + cmp r1, #0 + beq _0225651C + cmp r1, #1 + beq _02256526 + cmp r1, #2 + beq _02256540 + b _0225654E +_0225651C: + bl ov52_0225667C + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] +_02256526: + add r0, r4, #0 + bl ov52_02256684 + cmp r0, #0 + beq _0225654E + ldr r0, [r4, #0x14] + mov r1, #1 + bl ov52_022567A4 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225654E +_02256540: + ldr r0, [r4, #0x14] + bl ov52_022567D4 + cmp r0, #0 + beq _0225654E + mov r0, #1 + pop {r4, pc} +_0225654E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov52_02256508 + + thumb_func_start ov52_02256554 +ov52_02256554: ; 0x02256554 + push {r3, lr} + sub sp, #8 + ldr r0, [r0, #0x18] + bl ov25_0225450C + cmp r0, #0 + bne _02256594 + add r0, sp, #4 + add r1, sp, #0 + bl sub_020227C0 + cmp r0, #0 + beq _02256594 + ldr r0, [sp, #4] + sub r0, #0x10 + cmp r0, #0xbf + bhs _0225657A + mov r1, #1 + b _0225657C +_0225657A: + mov r1, #0 +_0225657C: + ldr r0, [sp] + sub r0, #0x10 + cmp r0, #0x9f + bhs _02256588 + mov r0, #1 + b _0225658A +_02256588: + mov r0, #0 +_0225658A: + tst r0, r1 + beq _02256594 + add sp, #8 + mov r0, #1 + pop {r3, pc} +_02256594: + mov r0, #0 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov52_02256554 + + thumb_func_start ov52_0225659C +ov52_0225659C: ; 0x0225659C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + mov r0, #0 + ldr r5, _022565E8 ; =0x02256D64 + str r0, [sp] + str r0, [sp, #4] +_022565AA: + ldr r0, [r5, #4] + mov r4, #0 + add r6, r4, #0 + cmp r0, #0 + bls _022565C6 +_022565B4: + ldr r0, [r5, #0] + ldrb r0, [r0, r4] + bl sub_02034120 + add r6, r6, r0 + ldr r0, [r5, #4] + add r4, r4, #1 + cmp r4, r0 + blo _022565B4 +_022565C6: + ldr r0, [r7, #4] + cmp r6, r0 + beq _022565D2 + mov r0, #1 + str r6, [r7, #4] + str r0, [sp] +_022565D2: + ldr r0, [sp, #4] + add r5, #8 + add r0, r0, #1 + add r7, r7, #4 + str r0, [sp, #4] + cmp r0, #4 + blo _022565AA + ldr r0, [sp] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022565E8: .word 0x02256D64 + thumb_func_end ov52_0225659C + + thumb_func_start ov52_022565EC +ov52_022565EC: ; 0x022565EC + push {r4, lr} + add r4, r0, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #3 + bhi _02256648 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02256604: ; jump table + .short _02256648 - _02256604 - 2 ; case 0 + .short _0225660C - _02256604 - 2 ; case 1 + .short _0225661C - _02256604 - 2 ; case 2 + .short _0225663A - _02256604 - 2 ; case 3 +_0225660C: + bl sub_02037C18 + cmp r0, #0 + beq _02256648 + mov r0, #2 + add r4, #0x20 + strb r0, [r4] + pop {r4, pc} +_0225661C: + add r0, r4, #0 + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #0 + beq _02256648 + bl sub_02037BFC + add r0, r4, #0 + mov r1, #0 + add r0, #0x21 + strb r1, [r0] + mov r0, #3 + add r4, #0x20 + strb r0, [r4] + pop {r4, pc} +_0225663A: + bl sub_02035E38 + cmp r0, #0 + bne _02256648 + mov r0, #0 + add r4, #0x20 + strb r0, [r4] +_02256648: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov52_022565EC + + thumb_func_start ov52_0225664C +ov52_0225664C: ; 0x0225664C + push {r4, lr} + add r4, r0, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + bne _02256668 + ldr r0, [r4, #0x18] + bl ov25_02254544 + bl sub_02037BC0 + mov r0, #1 + add r4, #0x20 + strb r0, [r4] +_02256668: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov52_0225664C + + thumb_func_start ov52_0225666C +ov52_0225666C: ; 0x0225666C + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #2 + bne _02256678 + mov r0, #1 + bx lr +_02256678: + mov r0, #0 + bx lr + thumb_func_end ov52_0225666C + + thumb_func_start ov52_0225667C +ov52_0225667C: ; 0x0225667C + mov r1, #1 + add r0, #0x21 + strb r1, [r0] + bx lr + thumb_func_end ov52_0225667C + + thumb_func_start ov52_02256684 +ov52_02256684: ; 0x02256684 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + bne _02256690 + mov r0, #1 + bx lr +_02256690: + mov r0, #0 + bx lr + thumb_func_end ov52_02256684 + + .rodata + + + .global Unk_ov52_02256D2C +Unk_ov52_02256D2C: ; 0x02256D2C + .incbin "incbin/overlay52_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov52_02256D30 +Unk_ov52_02256D30: ; 0x02256D30 + .incbin "incbin/overlay52_rodata.bin", 0x4, 0xC - 0x4 + + .global Unk_ov52_02256D38 +Unk_ov52_02256D38: ; 0x02256D38 + .incbin "incbin/overlay52_rodata.bin", 0xC, 0x14 - 0xC + + .global Unk_ov52_02256D40 +Unk_ov52_02256D40: ; 0x02256D40 + .incbin "incbin/overlay52_rodata.bin", 0x14, 0x20 - 0x14 + + .global Unk_ov52_02256D4C +Unk_ov52_02256D4C: ; 0x02256D4C + .incbin "incbin/overlay52_rodata.bin", 0x20, 0x38 - 0x20 + + .global Unk_ov52_02256D64 +Unk_ov52_02256D64: ; 0x02256D64 + .incbin "incbin/overlay52_rodata.bin", 0x38, 0x20 + + .section .sinit, 4 + .word ov52_022561C0 diff --git a/asm/overlay52.s b/asm/ov52_02256694.s similarity index 55% rename from asm/overlay52.s rename to asm/ov52_02256694.s index 56d52de6b..849bb5327 100644 --- a/asm/overlay52.s +++ b/asm/ov52_02256694.s @@ -1,694 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov52_022561C0 -ov52_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov52_022561D4 - ldr r1, _022561D0 ; =ov52_0225629C - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov52_022561D4 -_022561D0: .word ov52_0225629C - thumb_func_end ov52_022561C0 - - thumb_func_start ov52_022561D4 -ov52_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x24 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov52_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov52_02256260 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov52_02256260 - thumb_func_end ov52_022561D4 - - thumb_func_start ov52_0225621C -ov52_0225621C: ; 0x0225621C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x14 - add r1, r5, #4 - bl ov52_02256694 - cmp r0, #0 - beq _02256248 - mov r1, #0 - strb r1, [r5] - strb r1, [r5, #1] - add r0, r5, #0 - strb r1, [r5, #2] - add r0, #0x20 - strb r1, [r0] - add r0, r5, #0 - add r0, #0x21 - strb r1, [r0] - str r4, [r5, #0x18] - mov r0, #1 - pop {r3, r4, r5, pc} -_02256248: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov52_0225621C - - thumb_func_start ov52_0225624C -ov52_0225624C: ; 0x0225624C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl ov52_022566EC - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov52_0225624C - - thumb_func_start ov52_02256260 -ov52_02256260: ; 0x02256260 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #6 - bhs _02256294 - add r0, r4, #0 - bl ov52_022565EC - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256298 ; =0x02256D4C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _02256294 - add r0, r4, #0 - bl ov52_0225624C - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x18] - bl ov25_02254260 -_02256294: - pop {r3, r4, r5, pc} - nop -_02256298: .word 0x02256D4C - thumb_func_end ov52_02256260 - - thumb_func_start ov52_0225629C -ov52_0225629C: ; 0x0225629C - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov52_0225629C - - thumb_func_start ov52_022562A4 -ov52_022562A4: ; 0x022562A4 - ldrb r2, [r0, #2] - cmp r2, #0 - bne _022562AC - b _022562AE -_022562AC: - mov r1, #5 -_022562AE: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov52_022562A4 - - thumb_func_start ov52_022562B8 -ov52_022562B8: ; 0x022562B8 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022562C8 - cmp r0, #1 - beq _022562D8 - b _022562F2 -_022562C8: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov52_022567A4 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022562F2 -_022562D8: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov52_022567C8 - cmp r0, #0 - beq _022562F2 - ldr r0, [r4, #0x18] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov52_022562A4 -_022562F2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov52_022562B8 - - thumb_func_start ov52_022562F8 -ov52_022562F8: ; 0x022562F8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _0225630C - mov r1, #5 - bl ov52_022562A4 - mov r0, #0 - pop {r3, r4, r5, pc} -_0225630C: - ldrb r1, [r4, #1] - cmp r1, #0 - bne _0225635A - bl ov52_02256554 - cmp r0, #0 - beq _0225635A - add r0, r4, #0 - bl ov52_02256684 - cmp r0, #0 - beq _02256354 - ldr r0, [r4, #0x18] - bl ov25_0225453C - add r5, r0, #0 - ldr r0, [r4, #0x14] - mov r1, #3 - bl ov52_022567A4 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A2C8 - cmp r0, #0 - beq _0225634A - add r0, r4, #0 - mov r1, #3 - bl ov52_022562A4 - b _0225635A -_0225634A: - add r0, r4, #0 - mov r1, #2 - bl ov52_022562A4 - b _0225635A -_02256354: - ldr r0, _02256360 ; =0x0000066E - bl ov25_02254424 -_0225635A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02256360: .word 0x0000066E - thumb_func_end ov52_022562F8 - - thumb_func_start ov52_02256364 -ov52_02256364: ; 0x02256364 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256378 - mov r1, #5 - bl ov52_022562A4 - mov r0, #0 - pop {r4, pc} -_02256378: - ldrb r1, [r4, #1] - cmp r1, #0 - beq _02256388 - cmp r1, #1 - beq _02256398 - cmp r1, #2 - beq _022563E0 - b _0225642C -_02256388: - bl ov52_0225664C - mov r0, #0 - str r0, [r4, #0x1c] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225642C -_02256398: - bl ov52_02256430 - cmp r0, #0 - beq _022563AC - add r0, r4, #0 - mov r1, #4 - bl ov52_022562A4 - mov r0, #0 - pop {r4, pc} -_022563AC: - ldr r0, [r4, #0x1c] - cmp r0, #0x3c - bhs _022563B6 - add r0, r0, #1 - str r0, [r4, #0x1c] -_022563B6: - add r0, r4, #0 - bl ov52_0225666C - cmp r0, #0 - beq _0225642C - ldr r0, [r4, #0x1c] - cmp r0, #0x3c - blo _0225642C - add r0, r4, #0 - bl ov52_0225659C - ldr r0, [r4, #0x14] - mov r1, #6 - bl ov52_022567A4 - mov r0, #0 - str r0, [r4, #0x1c] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225642C -_022563E0: - bl ov52_02256430 - cmp r0, #0 - bne _022563F2 - add r0, r4, #0 - bl ov52_02256554 - cmp r0, #0 - beq _0225640C -_022563F2: - add r0, r4, #0 - bl ov52_0225667C - ldr r0, [r4, #0x14] - mov r1, #2 - bl ov52_022567A4 - add r0, r4, #0 - mov r1, #1 - bl ov52_022562A4 - mov r0, #0 - pop {r4, pc} -_0225640C: - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - cmp r0, #0x1e - blo _0225642C - mov r0, #0 - str r0, [r4, #0x1c] - add r0, r4, #0 - bl ov52_0225659C - cmp r0, #0 - beq _0225642C - ldr r0, [r4, #0x14] - mov r1, #6 - bl ov52_022567A4 -_0225642C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov52_02256364 - - thumb_func_start ov52_02256430 -ov52_02256430: ; 0x02256430 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl ov25_0225450C - cmp r0, #0 - beq _02256442 - mov r0, #1 - pop {r4, pc} -_02256442: - ldr r0, [r4, #0x18] - bl ov25_02254534 - cmp r0, #0 - beq _02256450 - mov r0, #1 - pop {r4, pc} -_02256450: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov52_02256430 - - thumb_func_start ov52_02256454 -ov52_02256454: ; 0x02256454 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256468 - mov r1, #5 - bl ov52_022562A4 - mov r0, #0 - pop {r4, pc} -_02256468: - ldrb r1, [r4, #1] - cmp r1, #0 - beq _02256478 - cmp r1, #1 - beq _02256482 - cmp r1, #2 - beq _0225649C - b _022564B4 -_02256478: - mov r0, #0 - str r0, [r4, #0x1c] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] -_02256482: - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - cmp r0, #0x3c - blo _022564B4 - ldr r0, [r4, #0x14] - mov r1, #4 - bl ov52_022567A4 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022564B4 -_0225649C: - bl ov52_02256554 - cmp r0, #0 - beq _022564B4 - ldr r0, [r4, #0x14] - mov r1, #2 - bl ov52_022567A4 - add r0, r4, #0 - mov r1, #1 - bl ov52_022562A4 -_022564B4: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov52_02256454 - - thumb_func_start ov52_022564B8 -ov52_022564B8: ; 0x022564B8 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022564CC - mov r1, #5 - bl ov52_022562A4 - mov r0, #0 - pop {r4, pc} -_022564CC: - ldrb r1, [r4, #1] - cmp r1, #0 - beq _022564D8 - cmp r1, #1 - beq _022564EC - b _02256504 -_022564D8: - bl ov52_0225667C - ldr r0, [r4, #0x14] - mov r1, #5 - bl ov52_022567A4 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256504 -_022564EC: - bl ov52_02256554 - cmp r0, #0 - beq _02256504 - ldr r0, [r4, #0x14] - mov r1, #2 - bl ov52_022567A4 - add r0, r4, #0 - mov r1, #1 - bl ov52_022562A4 -_02256504: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov52_022564B8 - - thumb_func_start ov52_02256508 -ov52_02256508: ; 0x02256508 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _0225651C - cmp r1, #1 - beq _02256526 - cmp r1, #2 - beq _02256540 - b _0225654E -_0225651C: - bl ov52_0225667C - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] -_02256526: - add r0, r4, #0 - bl ov52_02256684 - cmp r0, #0 - beq _0225654E - ldr r0, [r4, #0x14] - mov r1, #1 - bl ov52_022567A4 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225654E -_02256540: - ldr r0, [r4, #0x14] - bl ov52_022567D4 - cmp r0, #0 - beq _0225654E - mov r0, #1 - pop {r4, pc} -_0225654E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov52_02256508 - - thumb_func_start ov52_02256554 -ov52_02256554: ; 0x02256554 - push {r3, lr} - sub sp, #8 - ldr r0, [r0, #0x18] - bl ov25_0225450C - cmp r0, #0 - bne _02256594 - add r0, sp, #4 - add r1, sp, #0 - bl sub_020227C0 - cmp r0, #0 - beq _02256594 - ldr r0, [sp, #4] - sub r0, #0x10 - cmp r0, #0xbf - bhs _0225657A - mov r1, #1 - b _0225657C -_0225657A: - mov r1, #0 -_0225657C: - ldr r0, [sp] - sub r0, #0x10 - cmp r0, #0x9f - bhs _02256588 - mov r0, #1 - b _0225658A -_02256588: - mov r0, #0 -_0225658A: - tst r0, r1 - beq _02256594 - add sp, #8 - mov r0, #1 - pop {r3, pc} -_02256594: - mov r0, #0 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov52_02256554 - - thumb_func_start ov52_0225659C -ov52_0225659C: ; 0x0225659C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - mov r0, #0 - ldr r5, _022565E8 ; =0x02256D64 - str r0, [sp] - str r0, [sp, #4] -_022565AA: - ldr r0, [r5, #4] - mov r4, #0 - add r6, r4, #0 - cmp r0, #0 - bls _022565C6 -_022565B4: - ldr r0, [r5, #0] - ldrb r0, [r0, r4] - bl sub_02034120 - add r6, r6, r0 - ldr r0, [r5, #4] - add r4, r4, #1 - cmp r4, r0 - blo _022565B4 -_022565C6: - ldr r0, [r7, #4] - cmp r6, r0 - beq _022565D2 - mov r0, #1 - str r6, [r7, #4] - str r0, [sp] -_022565D2: - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - add r7, r7, #4 - str r0, [sp, #4] - cmp r0, #4 - blo _022565AA - ldr r0, [sp] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022565E8: .word 0x02256D64 - thumb_func_end ov52_0225659C - - thumb_func_start ov52_022565EC -ov52_022565EC: ; 0x022565EC - push {r4, lr} - add r4, r0, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #3 - bhi _02256648 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02256604: ; jump table - .short _02256648 - _02256604 - 2 ; case 0 - .short _0225660C - _02256604 - 2 ; case 1 - .short _0225661C - _02256604 - 2 ; case 2 - .short _0225663A - _02256604 - 2 ; case 3 -_0225660C: - bl sub_02037C18 - cmp r0, #0 - beq _02256648 - mov r0, #2 - add r4, #0x20 - strb r0, [r4] - pop {r4, pc} -_0225661C: - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #0 - beq _02256648 - bl sub_02037BFC - add r0, r4, #0 - mov r1, #0 - add r0, #0x21 - strb r1, [r0] - mov r0, #3 - add r4, #0x20 - strb r0, [r4] - pop {r4, pc} -_0225663A: - bl sub_02035E38 - cmp r0, #0 - bne _02256648 - mov r0, #0 - add r4, #0x20 - strb r0, [r4] -_02256648: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov52_022565EC - - thumb_func_start ov52_0225664C -ov52_0225664C: ; 0x0225664C - push {r4, lr} - add r4, r0, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - bne _02256668 - ldr r0, [r4, #0x18] - bl ov25_02254544 - bl sub_02037BC0 - mov r0, #1 - add r4, #0x20 - strb r0, [r4] -_02256668: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov52_0225664C - - thumb_func_start ov52_0225666C -ov52_0225666C: ; 0x0225666C - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #2 - bne _02256678 - mov r0, #1 - bx lr -_02256678: - mov r0, #0 - bx lr - thumb_func_end ov52_0225666C - - thumb_func_start ov52_0225667C -ov52_0225667C: ; 0x0225667C - mov r1, #1 - add r0, #0x21 - strb r1, [r0] - bx lr - thumb_func_end ov52_0225667C - - thumb_func_start ov52_02256684 -ov52_02256684: ; 0x02256684 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - bne _02256690 - mov r0, #1 - bx lr -_02256690: - mov r0, #0 - bx lr - thumb_func_end ov52_02256684 thumb_func_start ov52_02256694 ov52_02256694: ; 0x02256694 @@ -1488,14 +804,23 @@ _02256CB8: _02256D24: .word 0x00010804 _02256D28: .word 0x02256D84 thumb_func_end ov52_02256C64 - ; 0x02256D2C - .rodata - .incbin "incbin/overlay52_rodata.bin" - .section .sinit, 4 - .word ov52_022561C0 - .bss - .space 0x0 + .global Unk_ov52_02256D84 +Unk_ov52_02256D84: ; 0x02256D84 + .incbin "incbin/overlay52_rodata.bin", 0x58, 0x5C - 0x58 + + .global Unk_ov52_02256D88 +Unk_ov52_02256D88: ; 0x02256D88 + .incbin "incbin/overlay52_rodata.bin", 0x5C, 0x78 - 0x5C + + .global Unk_ov52_02256DA4 +Unk_ov52_02256DA4: ; 0x02256DA4 + .incbin "incbin/overlay52_rodata.bin", 0x78, 0xB8 - 0x78 + + .global Unk_ov52_02256DE4 +Unk_ov52_02256DE4: ; 0x02256DE4 + .incbin "incbin/overlay52_rodata.bin", 0xB8, 0x6C + diff --git a/asm/ov53_022561C0.s b/asm/ov53_022561C0.s new file mode 100644 index 000000000..9744f6786 --- /dev/null +++ b/asm/ov53_022561C0.s @@ -0,0 +1,354 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov53_022561C0 +ov53_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov53_022561D4 + ldr r1, _022561D0 ; =ov53_0225630C + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov53_022561D4 +_022561D0: .word ov53_0225630C + thumb_func_end ov53_022561C0 + + thumb_func_start ov53_022561D4 +ov53_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x40 + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov53_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov53_022562D0 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov53_022562D0 + thumb_func_end ov53_022561D4 + + thumb_func_start ov53_0225621C +ov53_0225621C: ; 0x0225621C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r0, r1, #0 + str r1, [sp, #4] + str r2, [sp, #8] + bl ov25_0225453C + add r6, r0, #0 + bl ov6_02243140 + str r0, [r7, #8] + cmp r0, #0 + beq _02256240 + add r0, r6, #0 + bl ov6_02243148 + b _02256242 +_02256240: + mov r0, #0 +_02256242: + str r0, [r7, #4] + mov r4, #0 + add r5, r7, #0 +_02256248: + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + bl ov6_02243114 + lsl r1, r4, #0x18 + str r0, [r5, #0x18] + add r0, r6, #0 + lsr r1, r1, #0x18 + bl ov6_022430E8 + str r0, [r5, #0xc] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _02256248 + add r0, r6, #0 + bl ov6_022430C4 + str r0, [r7, #0x24] + add r0, r7, #0 + ldr r2, [sp, #8] + add r0, #0x2c + add r1, r7, #4 + bl ov53_02256420 + cmp r0, #0 + beq _022562AA + mov r0, #0 + strb r0, [r7] + strb r0, [r7, #1] + strb r0, [r7, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _022562B0 ; =0x022568E0 + ldr r2, _022562B4 ; =ov53_02256314 + mov r1, #3 + add r3, r7, #0 + bl ov25_02255ACC + str r0, [r7, #0x34] + mov r0, #0 + str r0, [r7, #0x38] + str r0, [r7, #0x3c] + ldr r0, [sp, #4] + add sp, #0xc + str r0, [r7, #0x30] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022562AA: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022562B0: .word 0x022568E0 +_022562B4: .word ov53_02256314 + thumb_func_end ov53_0225621C + + thumb_func_start ov53_022562B8 +ov53_022562B8: ; 0x022562B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x34] + bl ov25_02255B34 + ldr r0, [r4, #0x2c] + bl ov53_02256454 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov53_022562B8 + + thumb_func_start ov53_022562D0 +ov53_022562D0: ; 0x022562D0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _02256306 + ldr r0, [r4, #0x30] + ldr r1, [r4, #0x34] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256308 ; =0x022568EC + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _02256306 + add r0, r4, #0 + bl ov53_022562B8 + add r0, r5, #0 + bl sub_0200DA58 + ldr r0, [r4, #0x30] + bl ov25_02254260 +_02256306: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256308: .word 0x022568EC + thumb_func_end ov53_022562D0 + + thumb_func_start ov53_0225630C +ov53_0225630C: ; 0x0225630C + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov53_0225630C + + thumb_func_start ov53_02256314 +ov53_02256314: ; 0x02256314 + str r0, [r3, #0x3c] + str r1, [r3, #0x38] + bx lr + ; .align 2, 0 + thumb_func_end ov53_02256314 + + thumb_func_start ov53_0225631C +ov53_0225631C: ; 0x0225631C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256324 + b _02256326 +_02256324: + mov r1, #2 +_02256326: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov53_0225631C + + thumb_func_start ov53_02256330 +ov53_02256330: ; 0x02256330 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256340 + cmp r0, #1 + beq _02256350 + b _0225636A +_02256340: + ldr r0, [r4, #0x2c] + mov r1, #0 + bl ov53_02256460 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225636A +_02256350: + ldr r0, [r4, #0x2c] + mov r1, #0 + bl ov53_02256484 + cmp r0, #0 + beq _0225636A + ldr r0, [r4, #0x30] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov53_0225631C +_0225636A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov53_02256330 + + thumb_func_start ov53_02256370 +ov53_02256370: ; 0x02256370 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _02256384 + mov r1, #2 + bl ov53_0225631C + mov r0, #0 + pop {r3, r4, r5, pc} +_02256384: + ldr r0, [r4, #0x30] + bl ov25_0225453C + add r5, r0, #0 + bl ov6_02243140 + str r0, [r4, #8] + cmp r0, #0 + bne _0225639A + mov r0, #0 + b _022563A0 +_0225639A: + add r0, r5, #0 + bl ov6_02243148 +_022563A0: + ldr r1, [r4, #4] + cmp r0, r1 + beq _022563B4 + str r0, [r4, #4] + ldr r0, [r4, #0x2c] + mov r1, #2 + bl ov53_02256460 + mov r0, #0 + pop {r3, r4, r5, pc} +_022563B4: + ldr r0, [r4, #0x2c] + mov r1, #3 + bl ov53_02256484 + cmp r0, #0 + beq _022563E6 + ldr r0, [r4, #0x38] + cmp r0, #1 + bne _022563E6 + ldr r1, [r4, #0x3c] + ldr r0, [r4, #0x24] + cmp r1, r0 + bhs _022563E2 + lsl r0, r1, #2 + add r0, r4, r0 + ldr r0, [r0, #0x18] + cmp r0, #0 + beq _022563E2 + str r1, [r4, #0x28] + ldr r0, [r4, #0x2c] + mov r1, #3 + bl ov53_02256460 +_022563E2: + mov r0, #0 + str r0, [r4, #0x38] +_022563E6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov53_02256370 + + thumb_func_start ov53_022563EC +ov53_022563EC: ; 0x022563EC + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _022563FC + cmp r0, #1 + beq _0225640C + b _0225641A +_022563FC: + ldr r0, [r4, #0x2c] + mov r1, #1 + bl ov53_02256460 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _0225641A +_0225640C: + ldr r0, [r4, #0x2c] + bl ov53_02256490 + cmp r0, #0 + beq _0225641A + mov r0, #1 + pop {r4, pc} +_0225641A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov53_022563EC + + .rodata + + + .global Unk_ov53_022568E0 +Unk_ov53_022568E0: ; 0x022568E0 + .incbin "incbin/overlay53_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov53_022568EC +Unk_ov53_022568EC: ; 0x022568EC + .incbin "incbin/overlay53_rodata.bin", 0xC, 0xC + + .section .sinit, 4 + .word ov53_022561C0 diff --git a/asm/overlay53.s b/asm/ov53_02256420.s similarity index 64% rename from asm/overlay53.s rename to asm/ov53_02256420.s index 54240c931..e78b4bca7 100644 --- a/asm/overlay53.s +++ b/asm/ov53_02256420.s @@ -1,340 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov53_022561C0 -ov53_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov53_022561D4 - ldr r1, _022561D0 ; =ov53_0225630C - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov53_022561D4 -_022561D0: .word ov53_0225630C - thumb_func_end ov53_022561C0 - - thumb_func_start ov53_022561D4 -ov53_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x40 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov53_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov53_022562D0 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov53_022562D0 - thumb_func_end ov53_022561D4 - - thumb_func_start ov53_0225621C -ov53_0225621C: ; 0x0225621C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r0, r1, #0 - str r1, [sp, #4] - str r2, [sp, #8] - bl ov25_0225453C - add r6, r0, #0 - bl ov6_02243140 - str r0, [r7, #8] - cmp r0, #0 - beq _02256240 - add r0, r6, #0 - bl ov6_02243148 - b _02256242 -_02256240: - mov r0, #0 -_02256242: - str r0, [r7, #4] - mov r4, #0 - add r5, r7, #0 -_02256248: - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - bl ov6_02243114 - lsl r1, r4, #0x18 - str r0, [r5, #0x18] - add r0, r6, #0 - lsr r1, r1, #0x18 - bl ov6_022430E8 - str r0, [r5, #0xc] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _02256248 - add r0, r6, #0 - bl ov6_022430C4 - str r0, [r7, #0x24] - add r0, r7, #0 - ldr r2, [sp, #8] - add r0, #0x2c - add r1, r7, #4 - bl ov53_02256420 - cmp r0, #0 - beq _022562AA - mov r0, #0 - strb r0, [r7] - strb r0, [r7, #1] - strb r0, [r7, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _022562B0 ; =0x022568E0 - ldr r2, _022562B4 ; =ov53_02256314 - mov r1, #3 - add r3, r7, #0 - bl ov25_02255ACC - str r0, [r7, #0x34] - mov r0, #0 - str r0, [r7, #0x38] - str r0, [r7, #0x3c] - ldr r0, [sp, #4] - add sp, #0xc - str r0, [r7, #0x30] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022562AA: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022562B0: .word 0x022568E0 -_022562B4: .word ov53_02256314 - thumb_func_end ov53_0225621C - - thumb_func_start ov53_022562B8 -ov53_022562B8: ; 0x022562B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x34] - bl ov25_02255B34 - ldr r0, [r4, #0x2c] - bl ov53_02256454 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov53_022562B8 - - thumb_func_start ov53_022562D0 -ov53_022562D0: ; 0x022562D0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _02256306 - ldr r0, [r4, #0x30] - ldr r1, [r4, #0x34] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256308 ; =0x022568EC - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _02256306 - add r0, r4, #0 - bl ov53_022562B8 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x30] - bl ov25_02254260 -_02256306: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256308: .word 0x022568EC - thumb_func_end ov53_022562D0 - - thumb_func_start ov53_0225630C -ov53_0225630C: ; 0x0225630C - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov53_0225630C - - thumb_func_start ov53_02256314 -ov53_02256314: ; 0x02256314 - str r0, [r3, #0x3c] - str r1, [r3, #0x38] - bx lr - ; .align 2, 0 - thumb_func_end ov53_02256314 - - thumb_func_start ov53_0225631C -ov53_0225631C: ; 0x0225631C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256324 - b _02256326 -_02256324: - mov r1, #2 -_02256326: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov53_0225631C - - thumb_func_start ov53_02256330 -ov53_02256330: ; 0x02256330 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256340 - cmp r0, #1 - beq _02256350 - b _0225636A -_02256340: - ldr r0, [r4, #0x2c] - mov r1, #0 - bl ov53_02256460 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225636A -_02256350: - ldr r0, [r4, #0x2c] - mov r1, #0 - bl ov53_02256484 - cmp r0, #0 - beq _0225636A - ldr r0, [r4, #0x30] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov53_0225631C -_0225636A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov53_02256330 - - thumb_func_start ov53_02256370 -ov53_02256370: ; 0x02256370 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _02256384 - mov r1, #2 - bl ov53_0225631C - mov r0, #0 - pop {r3, r4, r5, pc} -_02256384: - ldr r0, [r4, #0x30] - bl ov25_0225453C - add r5, r0, #0 - bl ov6_02243140 - str r0, [r4, #8] - cmp r0, #0 - bne _0225639A - mov r0, #0 - b _022563A0 -_0225639A: - add r0, r5, #0 - bl ov6_02243148 -_022563A0: - ldr r1, [r4, #4] - cmp r0, r1 - beq _022563B4 - str r0, [r4, #4] - ldr r0, [r4, #0x2c] - mov r1, #2 - bl ov53_02256460 - mov r0, #0 - pop {r3, r4, r5, pc} -_022563B4: - ldr r0, [r4, #0x2c] - mov r1, #3 - bl ov53_02256484 - cmp r0, #0 - beq _022563E6 - ldr r0, [r4, #0x38] - cmp r0, #1 - bne _022563E6 - ldr r1, [r4, #0x3c] - ldr r0, [r4, #0x24] - cmp r1, r0 - bhs _022563E2 - lsl r0, r1, #2 - add r0, r4, r0 - ldr r0, [r0, #0x18] - cmp r0, #0 - beq _022563E2 - str r1, [r4, #0x28] - ldr r0, [r4, #0x2c] - mov r1, #3 - bl ov53_02256460 -_022563E2: - mov r0, #0 - str r0, [r4, #0x38] -_022563E6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov53_02256370 - - thumb_func_start ov53_022563EC -ov53_022563EC: ; 0x022563EC - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022563FC - cmp r0, #1 - beq _0225640C - b _0225641A -_022563FC: - ldr r0, [r4, #0x2c] - mov r1, #1 - bl ov53_02256460 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225641A -_0225640C: - ldr r0, [r4, #0x2c] - bl ov53_02256490 - cmp r0, #0 - beq _0225641A - mov r0, #1 - pop {r4, pc} -_0225641A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov53_022563EC thumb_func_start ov53_02256420 ov53_02256420: ; 0x02256420 @@ -951,14 +621,19 @@ _022568BC: ; .align 2, 0 _022568DC: .word 0x000003E7 thumb_func_end ov53_02256874 - ; 0x022568E0 - .rodata - .incbin "incbin/overlay53_rodata.bin" - .section .sinit, 4 - .word ov53_022561C0 - .bss - .space 0x0 + .global Unk_ov53_022568F8 +Unk_ov53_022568F8: ; 0x022568F8 + .incbin "incbin/overlay53_rodata.bin", 0x18, 0x34 - 0x18 + + .global Unk_ov53_02256914 +Unk_ov53_02256914: ; 0x02256914 + .incbin "incbin/overlay53_rodata.bin", 0x34, 0x70 - 0x34 + + .global Unk_ov53_02256950 +Unk_ov53_02256950: ; 0x02256950 + .incbin "incbin/overlay53_rodata.bin", 0x70, 0x100 + diff --git a/asm/ov54_022561C0.s b/asm/ov54_022561C0.s new file mode 100644 index 000000000..eb0d3ddb2 --- /dev/null +++ b/asm/ov54_022561C0.s @@ -0,0 +1,363 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov54_022561C0 +ov54_022561C0: ; 0x022561C0 + ldr r3, _022561C8 ; =ov25_02254238 + ldr r0, _022561CC ; =ov54_022561D4 + ldr r1, _022561D0 ; =ov54_02256338 + bx r3 + ; .align 2, 0 +_022561C8: .word ov25_02254238 +_022561CC: .word ov54_022561D4 +_022561D0: .word ov54_02256338 + thumb_func_end ov54_022561C0 + + thumb_func_start ov54_022561D4 +ov54_022561D4: ; 0x022561D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0xac + add r7, r2, #0 + str r3, [sp] + bl sub_02018144 + add r4, r0, #0 + beq _02256212 + ldr r3, [sp] + add r1, r6, #0 + add r2, r7, #0 + bl ov54_0225621C + cmp r0, #0 + beq _0225620C + ldr r0, _02256218 ; =ov54_022562F4 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + cmp r0, #0 + beq _0225620C + str r4, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0225620C: + add r0, r4, #0 + bl sub_020181C4 +_02256212: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02256218: .word ov54_022562F4 + thumb_func_end ov54_022561D4 + + thumb_func_start ov54_0225621C +ov54_0225621C: ; 0x0225621C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + add r0, r1, #0 + str r1, [sp, #8] + str r2, [sp, #0xc] + bl ov25_02254540 + str r0, [sp, #0x10] + bl sub_02056AAC + ldr r1, [sp, #4] + mov r4, #0 + add r1, #0x94 + str r0, [r1, #0] + ldr r0, [sp, #4] + add r0, #0x94 + ldr r0, [r0, #0] + cmp r0, #0 + bls _02256276 + ldr r0, [sp, #4] + ldr r6, [sp, #4] + add r7, r0, #4 + add r6, #0xc + add r5, r0, #0 +_0225624E: + ldr r0, [sp, #0x10] + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl sub_02056AC8 + ldr r0, [sp, #0x10] + add r1, r4, #0 + bl sub_02056AFC + str r0, [r5, #8] + ldr r0, [sp, #4] + add r4, r4, #1 + add r0, #0x94 + ldr r0, [r0, #0] + add r6, #0xc + add r7, #0xc + add r5, #0xc + cmp r4, r0 + blo _0225624E +_02256276: + ldr r0, [sp, #4] + ldr r1, [sp, #4] + ldr r2, [sp, #0xc] + add r0, #0x98 + add r1, r1, #4 + bl ov54_0225642C + cmp r0, #0 + beq _022562C6 + ldr r0, [sp, #4] + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #1] + strb r1, [r0, #2] + mov r0, #8 + str r0, [sp] + ldr r0, _022562CC ; =0x022566E0 + ldr r2, _022562D0 ; =ov54_02256340 + ldr r3, [sp, #4] + mov r1, #0xc + bl ov25_02255ACC + ldr r1, [sp, #4] + add r1, #0xa0 + str r0, [r1, #0] + ldr r0, [sp, #4] + mov r1, #0 + add r0, #0xa4 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r0, #0xa8 + str r1, [r0, #0] + ldr r0, [sp, #4] + ldr r1, [sp, #8] + add r0, #0x9c + str r0, [sp, #4] + str r1, [r0, #0] + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022562C6: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022562CC: .word 0x022566E0 +_022562D0: .word ov54_02256340 + thumb_func_end ov54_0225621C + + thumb_func_start ov54_022562D4 +ov54_022562D4: ; 0x022562D4 + push {r4, lr} + add r4, r0, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + bl ov25_02255B34 + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + bl ov54_02256460 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov54_022562D4 + + thumb_func_start ov54_022562F4 +ov54_022562F4: ; 0x022562F4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4] + cmp r0, #3 + bhs _02256332 + add r0, r4, #0 + add r0, #0x9c + add r1, #0xa0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov25_02254518 + ldrb r1, [r4] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02256334 ; =0x022566D4 + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + beq _02256332 + add r0, r4, #0 + bl ov54_022562D4 + add r0, r5, #0 + bl sub_0200DA58 + add r4, #0x9c + ldr r0, [r4, #0] + bl ov25_02254260 +_02256332: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02256334: .word 0x022566D4 + thumb_func_end ov54_022562F4 + + thumb_func_start ov54_02256338 +ov54_02256338: ; 0x02256338 + mov r1, #1 + strb r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov54_02256338 + + thumb_func_start ov54_02256340 +ov54_02256340: ; 0x02256340 + add r2, r3, #0 + add r2, #0xa8 + str r0, [r2, #0] + add r3, #0xa4 + str r1, [r3, #0] + bx lr + thumb_func_end ov54_02256340 + + thumb_func_start ov54_0225634C +ov54_0225634C: ; 0x0225634C + ldrb r2, [r0, #2] + cmp r2, #0 + bne _02256354 + b _02256356 +_02256354: + mov r1, #2 +_02256356: + strb r1, [r0] + mov r1, #0 + strb r1, [r0, #1] + bx lr + ; .align 2, 0 + thumb_func_end ov54_0225634C + + thumb_func_start ov54_02256360 +ov54_02256360: ; 0x02256360 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256370 + cmp r0, #1 + beq _02256384 + b _022563A6 +_02256370: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r1, #0 + bl ov54_0225646C + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _022563A6 +_02256384: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r1, #0 + bl ov54_02256490 + cmp r0, #0 + beq _022563A6 + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl ov25_0225424C + add r0, r4, #0 + mov r1, #1 + bl ov54_0225634C +_022563A6: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov54_02256360 + + thumb_func_start ov54_022563AC +ov54_022563AC: ; 0x022563AC + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + beq _022563C0 + mov r1, #2 + bl ov54_0225634C + mov r0, #0 + pop {r4, pc} +_022563C0: + add r0, #0xa4 + ldr r0, [r0, #0] + cmp r0, #1 + bne _022563F0 + add r0, r4, #0 + add r0, #0xa8 + ldr r1, [r0, #0] + mov r0, #0xb + sub r1, r0, r1 + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + cmp r1, r0 + bhs _022563EA + mov r0, #0xc + mul r0, r1 + add r1, r4, r0 + ldr r0, [r1, #4] + ldr r1, [r1, #8] + bl ov25_02254444 +_022563EA: + mov r0, #0 + add r4, #0xa4 + str r0, [r4, #0] +_022563F0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov54_022563AC + + thumb_func_start ov54_022563F4 +ov54_022563F4: ; 0x022563F4 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #0 + beq _02256404 + cmp r0, #1 + beq _02256418 + b _02256428 +_02256404: + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r1, #1 + bl ov54_0225646C + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _02256428 +_02256418: + add r4, #0x98 + ldr r0, [r4, #0] + bl ov54_0225649C + cmp r0, #0 + beq _02256428 + mov r0, #1 + pop {r4, pc} +_02256428: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov54_022563F4 + + .rodata + + + .global Unk_ov54_022566D4 +Unk_ov54_022566D4: ; 0x022566D4 + .incbin "incbin/overlay54_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov54_022566E0 +Unk_ov54_022566E0: ; 0x022566E0 + .incbin "incbin/overlay54_rodata.bin", 0xC, 0x30 + + .section .sinit, 4 + .word ov54_022561C0 diff --git a/asm/overlay54.s b/asm/ov54_0225642C.s similarity index 50% rename from asm/overlay54.s rename to asm/ov54_0225642C.s index e0ad2c30c..9c2c6ddbc 100644 --- a/asm/overlay54.s +++ b/asm/ov54_0225642C.s @@ -1,349 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov54_022561C0 -ov54_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov54_022561D4 - ldr r1, _022561D0 ; =ov54_02256338 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov54_022561D4 -_022561D0: .word ov54_02256338 - thumb_func_end ov54_022561C0 - - thumb_func_start ov54_022561D4 -ov54_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0xac - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256212 - ldr r3, [sp] - add r1, r6, #0 - add r2, r7, #0 - bl ov54_0225621C - cmp r0, #0 - beq _0225620C - ldr r0, _02256218 ; =ov54_022562F4 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - cmp r0, #0 - beq _0225620C - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225620C: - add r0, r4, #0 - bl sub_020181C4 -_02256212: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256218: .word ov54_022562F4 - thumb_func_end ov54_022561D4 - - thumb_func_start ov54_0225621C -ov54_0225621C: ; 0x0225621C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - add r0, r1, #0 - str r1, [sp, #8] - str r2, [sp, #0xc] - bl ov25_02254540 - str r0, [sp, #0x10] - bl sub_02056AAC - ldr r1, [sp, #4] - mov r4, #0 - add r1, #0x94 - str r0, [r1, #0] - ldr r0, [sp, #4] - add r0, #0x94 - ldr r0, [r0, #0] - cmp r0, #0 - bls _02256276 - ldr r0, [sp, #4] - ldr r6, [sp, #4] - add r7, r0, #4 - add r6, #0xc - add r5, r0, #0 -_0225624E: - ldr r0, [sp, #0x10] - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl sub_02056AC8 - ldr r0, [sp, #0x10] - add r1, r4, #0 - bl sub_02056AFC - str r0, [r5, #8] - ldr r0, [sp, #4] - add r4, r4, #1 - add r0, #0x94 - ldr r0, [r0, #0] - add r6, #0xc - add r7, #0xc - add r5, #0xc - cmp r4, r0 - blo _0225624E -_02256276: - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r2, [sp, #0xc] - add r0, #0x98 - add r1, r1, #4 - bl ov54_0225642C - cmp r0, #0 - beq _022562C6 - ldr r0, [sp, #4] - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #1] - strb r1, [r0, #2] - mov r0, #8 - str r0, [sp] - ldr r0, _022562CC ; =0x022566E0 - ldr r2, _022562D0 ; =ov54_02256340 - ldr r3, [sp, #4] - mov r1, #0xc - bl ov25_02255ACC - ldr r1, [sp, #4] - add r1, #0xa0 - str r0, [r1, #0] - ldr r0, [sp, #4] - mov r1, #0 - add r0, #0xa4 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r0, #0xa8 - str r1, [r0, #0] - ldr r0, [sp, #4] - ldr r1, [sp, #8] - add r0, #0x9c - str r0, [sp, #4] - str r1, [r0, #0] - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022562C6: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022562CC: .word 0x022566E0 -_022562D0: .word ov54_02256340 - thumb_func_end ov54_0225621C - - thumb_func_start ov54_022562D4 -ov54_022562D4: ; 0x022562D4 - push {r4, lr} - add r4, r0, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - bl ov25_02255B34 - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - bl ov54_02256460 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov54_022562D4 - - thumb_func_start ov54_022562F4 -ov54_022562F4: ; 0x022562F4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhs _02256332 - add r0, r4, #0 - add r0, #0x9c - add r1, #0xa0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256334 ; =0x022566D4 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _02256332 - add r0, r4, #0 - bl ov54_022562D4 - add r0, r5, #0 - bl sub_0200DA58 - add r4, #0x9c - ldr r0, [r4, #0] - bl ov25_02254260 -_02256332: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256334: .word 0x022566D4 - thumb_func_end ov54_022562F4 - - thumb_func_start ov54_02256338 -ov54_02256338: ; 0x02256338 - mov r1, #1 - strb r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov54_02256338 - - thumb_func_start ov54_02256340 -ov54_02256340: ; 0x02256340 - add r2, r3, #0 - add r2, #0xa8 - str r0, [r2, #0] - add r3, #0xa4 - str r1, [r3, #0] - bx lr - thumb_func_end ov54_02256340 - - thumb_func_start ov54_0225634C -ov54_0225634C: ; 0x0225634C - ldrb r2, [r0, #2] - cmp r2, #0 - bne _02256354 - b _02256356 -_02256354: - mov r1, #2 -_02256356: - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov54_0225634C - - thumb_func_start ov54_02256360 -ov54_02256360: ; 0x02256360 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256370 - cmp r0, #1 - beq _02256384 - b _022563A6 -_02256370: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r1, #0 - bl ov54_0225646C - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563A6 -_02256384: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r1, #0 - bl ov54_02256490 - cmp r0, #0 - beq _022563A6 - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov54_0225634C -_022563A6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov54_02256360 - - thumb_func_start ov54_022563AC -ov54_022563AC: ; 0x022563AC - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - beq _022563C0 - mov r1, #2 - bl ov54_0225634C - mov r0, #0 - pop {r4, pc} -_022563C0: - add r0, #0xa4 - ldr r0, [r0, #0] - cmp r0, #1 - bne _022563F0 - add r0, r4, #0 - add r0, #0xa8 - ldr r1, [r0, #0] - mov r0, #0xb - sub r1, r0, r1 - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - cmp r1, r0 - bhs _022563EA - mov r0, #0xc - mul r0, r1 - add r1, r4, r0 - ldr r0, [r1, #4] - ldr r1, [r1, #8] - bl ov25_02254444 -_022563EA: - mov r0, #0 - add r4, #0xa4 - str r0, [r4, #0] -_022563F0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov54_022563AC - - thumb_func_start ov54_022563F4 -ov54_022563F4: ; 0x022563F4 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256404 - cmp r0, #1 - beq _02256418 - b _02256428 -_02256404: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r1, #1 - bl ov54_0225646C - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256428 -_02256418: - add r4, #0x98 - ldr r0, [r4, #0] - bl ov54_0225649C - cmp r0, #0 - beq _02256428 - mov r0, #1 - pop {r4, pc} -_02256428: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov54_022563F4 thumb_func_start ov54_0225642C ov54_0225642C: ; 0x0225642C @@ -684,14 +345,19 @@ _022566C0: pop {r3, r4, r5, r6, r7, pc} ; .align 2, 0 thumb_func_end ov54_022566A8 - ; 0x022566D4 - .rodata - .incbin "incbin/overlay54_rodata.bin" - .section .sinit, 4 - .word ov54_022561C0 - .bss - .space 0x0 + .global Unk_ov54_02256710 +Unk_ov54_02256710: ; 0x02256710 + .incbin "incbin/overlay54_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov54_0225672C +Unk_ov54_0225672C: ; 0x0225672C + .incbin "incbin/overlay54_rodata.bin", 0x58, 0x7C - 0x58 + + .global Unk_ov54_02256750 +Unk_ov54_02256750: ; 0x02256750 + .incbin "incbin/overlay54_rodata.bin", 0x7C, 0xC0 + diff --git a/asm/overlay55.s b/asm/ov55_022561C0.s similarity index 54% rename from asm/overlay55.s rename to asm/ov55_022561C0.s index c645ef53f..4c5093a50 100644 --- a/asm/overlay55.s +++ b/asm/ov55_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov55_022561C0 ov55_022561C0: ; 0x022561C0 ldr r3, _022561C8 ; =ov25_02254238 @@ -218,196 +221,12 @@ _02256326: ; .align 2, 0 thumb_func_end ov55_022562F8 - thumb_func_start ov55_0225632C -ov55_0225632C: ; 0x0225632C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - beq _0225635A - add r0, #8 - mov r1, #8 - bl ov25_02255090 - mov r0, #8 - str r6, [r4, #0] - bl sub_02018340 - str r0, [r4, #4] - cmp r0, #0 - beq _0225635A - str r4, [r5, #0] - mov r0, #1 - pop {r4, r5, r6, pc} -_0225635A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov55_0225632C - - thumb_func_start ov55_02256360 -ov55_02256360: ; 0x02256360 - push {r4, lr} - add r4, r0, #0 - beq _02256376 - ldr r0, [r4, #4] - cmp r0, #0 - beq _02256370 - bl sub_020181C4 -_02256370: - add r0, r4, #0 - bl sub_020181C4 -_02256376: - pop {r4, pc} - thumb_func_end ov55_02256360 - - thumb_func_start ov55_02256378 -ov55_02256378: ; 0x02256378 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _02256398 ; =0x022564AC - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_02256398: .word 0x022564AC - thumb_func_end ov55_02256378 - - thumb_func_start ov55_0225639C -ov55_0225639C: ; 0x0225639C - ldr r3, _022563A4 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022563A4: .word ov25_02255130 - thumb_func_end ov55_0225639C - - thumb_func_start ov55_022563A8 -ov55_022563A8: ; 0x022563A8 - ldr r3, _022563B0 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022563B0: .word ov25_02255154 - thumb_func_end ov55_022563A8 - - thumb_func_start ov55_022563B4 -ov55_022563B4: ; 0x022563B4 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov55_022563B4 - - thumb_func_start ov55_022563C8 -ov55_022563C8: ; 0x022563C8 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _0225645C ; =0x02256490 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #8 - str r1, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r3, #6 - bl sub_02006E3C - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r5, #4] - mov r1, #6 - add r3, r2, #0 - bl sub_02019CB8 - mov r0, #0x20 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #0xc - mov r1, #9 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - ldr r1, [r5, #0] - ldr r0, [r5, #4] - ldr r1, [r1, #0] - mov r2, #6 - bl ov25_02255440 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256460 ; =0x04001000 - ldr r0, _02256464 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov55_022563B4 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_0225645C: .word 0x02256490 -_02256460: .word 0x04001000 -_02256464: .word 0xFFFFE0FF - thumb_func_end ov55_022563C8 - - thumb_func_start ov55_02256468 -ov55_02256468: ; 0x02256468 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov55_022563B4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov55_02256468 - ; 0x02256484 - - .rodata - .incbin "incbin/overlay55_rodata.bin" + + + .global Unk_ov55_02256484 +Unk_ov55_02256484: ; 0x02256484 + .incbin "incbin/overlay55_rodata.bin", 0x0, 0xC .section .sinit, 4 .word ov55_022561C0 - - .bss - .space 0x0 diff --git a/asm/ov55_0225632C.s b/asm/ov55_0225632C.s new file mode 100644 index 000000000..2c95670a5 --- /dev/null +++ b/asm/ov55_0225632C.s @@ -0,0 +1,202 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov55_0225632C +ov55_0225632C: ; 0x0225632C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #8 + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + beq _0225635A + add r0, #8 + mov r1, #8 + bl ov25_02255090 + mov r0, #8 + str r6, [r4, #0] + bl sub_02018340 + str r0, [r4, #4] + cmp r0, #0 + beq _0225635A + str r4, [r5, #0] + mov r0, #1 + pop {r4, r5, r6, pc} +_0225635A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov55_0225632C + + thumb_func_start ov55_02256360 +ov55_02256360: ; 0x02256360 + push {r4, lr} + add r4, r0, #0 + beq _02256376 + ldr r0, [r4, #4] + cmp r0, #0 + beq _02256370 + bl sub_020181C4 +_02256370: + add r0, r4, #0 + bl sub_020181C4 +_02256376: + pop {r4, pc} + thumb_func_end ov55_02256360 + + thumb_func_start ov55_02256378 +ov55_02256378: ; 0x02256378 + push {lr} + sub sp, #0xc + add r2, r0, #0 + add r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r0, _02256398 ; =0x022564AC + ldr r3, [r2, #0] + bl ov25_0225517C + add sp, #0xc + pop {pc} + nop +_02256398: .word 0x022564AC + thumb_func_end ov55_02256378 + + thumb_func_start ov55_0225639C +ov55_0225639C: ; 0x0225639C + ldr r3, _022563A4 ; =ov25_02255130 + add r0, #8 + bx r3 + nop +_022563A4: .word ov25_02255130 + thumb_func_end ov55_0225639C + + thumb_func_start ov55_022563A8 +ov55_022563A8: ; 0x022563A8 + ldr r3, _022563B0 ; =ov25_02255154 + add r0, #8 + bx r3 + nop +_022563B0: .word ov25_02255154 + thumb_func_end ov55_022563A8 + + thumb_func_start ov55_022563B4 +ov55_022563B4: ; 0x022563B4 + push {r4, lr} + add r4, r0, #0 + bl ov25_0225523C + add r0, #8 + add r1, r4, #0 + bl ov25_02255224 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov55_022563B4 + + thumb_func_start ov55_022563C8 +ov55_022563C8: ; 0x022563C8 + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r2, _0225645C ; =0x02256490 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #8 + str r1, [sp, #0xc] + ldr r2, [r5, #4] + mov r0, #0xc + mov r3, #6 + bl sub_02006E3C + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x18 + str r0, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r5, #4] + mov r1, #6 + add r3, r2, #0 + bl sub_02019CB8 + mov r0, #0x20 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #0xc + mov r1, #9 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + ldr r1, [r5, #0] + ldr r0, [r5, #4] + ldr r1, [r1, #0] + mov r2, #6 + bl ov25_02255440 + ldr r0, [r5, #4] + mov r1, #6 + bl sub_02019448 + ldr r1, _02256460 ; =0x04001000 + ldr r0, _02256464 ; =0xFFFFE0FF + ldr r3, [r1, #0] + ldr r2, [r1, #0] + str r3, [sp, #0x10] + and r0, r2 + lsl r2, r3, #0x13 + lsr r3, r2, #0x1b + mov r2, #4 + orr r2, r3 + lsl r2, r2, #8 + orr r0, r2 + str r0, [r1, #0] + add r0, r4, #0 + bl ov55_022563B4 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_0225645C: .word 0x02256490 +_02256460: .word 0x04001000 +_02256464: .word 0xFFFFE0FF + thumb_func_end ov55_022563C8 + + thumb_func_start ov55_02256468 +ov55_02256468: ; 0x02256468 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov25_0225523C + ldr r0, [r0, #4] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + bl ov55_022563B4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov55_02256468 + + .rodata + + + .global Unk_ov55_02256490 +Unk_ov55_02256490: ; 0x02256490 + .incbin "incbin/overlay55_rodata.bin", 0xC, 0x28 - 0xC + + .global Unk_ov55_022564AC +Unk_ov55_022564AC: ; 0x022564AC + .incbin "incbin/overlay55_rodata.bin", 0x28, 0x24 + diff --git a/asm/overlay56.s b/asm/ov56_022561C0.s similarity index 97% rename from asm/overlay56.s rename to asm/ov56_022561C0.s index b9fabd7b7..4deb9a889 100644 --- a/asm/overlay56.s +++ b/asm/ov56_022561C0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov56_022561C0 ov56_022561C0: ; 0x022561C0 push {r4, lr} @@ -2123,12 +2126,39 @@ _0225722C: blt _022571DA pop {r3, r4, r5, r6, r7, pc} thumb_func_end ov56_022571D0 - ; 0x02257238 - .rodata - .incbin "incbin/overlay56_rodata.bin" - .bss - .space 0x0 + .global Unk_ov56_02257238 +Unk_ov56_02257238: ; 0x02257238 + .incbin "incbin/overlay56_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov56_02257244 +Unk_ov56_02257244: ; 0x02257244 + .incbin "incbin/overlay56_rodata.bin", 0xC, 0x18 - 0xC + + .global Unk_ov56_02257250 +Unk_ov56_02257250: ; 0x02257250 + .incbin "incbin/overlay56_rodata.bin", 0x18, 0x2C - 0x18 + + .global Unk_ov56_02257264 +Unk_ov56_02257264: ; 0x02257264 + .incbin "incbin/overlay56_rodata.bin", 0x2C, 0x48 - 0x2C + + .global Unk_ov56_02257280 +Unk_ov56_02257280: ; 0x02257280 + .incbin "incbin/overlay56_rodata.bin", 0x48, 0x64 - 0x48 + + .global Unk_ov56_0225729C +Unk_ov56_0225729C: ; 0x0225729C + .incbin "incbin/overlay56_rodata.bin", 0x64, 0x80 - 0x64 + + .global Unk_ov56_022572B8 +Unk_ov56_022572B8: ; 0x022572B8 + .incbin "incbin/overlay56_rodata.bin", 0x80, 0x9C - 0x80 + + .global Unk_ov56_022572D4 +Unk_ov56_022572D4: ; 0x022572D4 + .incbin "incbin/overlay56_rodata.bin", 0x9C, 0x1C + diff --git a/asm/overlay57.s b/asm/ov57_021D0D80.s similarity index 84% rename from asm/overlay57.s rename to asm/ov57_021D0D80.s index 0c93fdbe4..97cfda4bd 100644 --- a/asm/overlay57.s +++ b/asm/ov57_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov57_021D0D80 ov57_021D0D80: ; 0x021D0D80 push {r3, lr} @@ -212,44 +215,22 @@ _021D0EFE: _021D0F2C: .word 0x021D0FA0 thumb_func_end ov57_021D0EAC - thumb_func_start ov57_021D0F30 -ov57_021D0F30: ; 0x021D0F30 - push {r3, lr} - add r0, r1, #0 - bl sub_020246A8 - cmp r0, #0 - bne _021D0F42 - mov r0, #0 - bl sub_020C3EE4 -_021D0F42: - pop {r3, pc} - thumb_func_end ov57_021D0F30 - - thumb_func_start ov57_021D0F44 -ov57_021D0F44: ; 0x021D0F44 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl sub_0202479C - add r0, r4, #0 - bl sub_0203D1A8 - add r0, r4, #0 - bl sub_02025E38 - ldr r1, _021D0F6C ; =0x00000BB8 - bl sub_02025F78 - add r0, r4, #0 - bl sub_020507E4 - bl sub_0206A92C - pop {r4, pc} - ; .align 2, 0 -_021D0F6C: .word 0x00000BB8 - thumb_func_end ov57_021D0F44 - ; 0x021D0F70 - - .rodata - .incbin "incbin/overlay57_rodata.bin" - .bss - .space 0x0 + .global Unk_ov57_021D0F70 +Unk_ov57_021D0F70: ; 0x021D0F70 + .incbin "incbin/overlay57_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov57_021D0F80 +Unk_ov57_021D0F80: ; 0x021D0F80 + .incbin "incbin/overlay57_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov57_021D0F90 +Unk_ov57_021D0F90: ; 0x021D0F90 + .incbin "incbin/overlay57_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov57_021D0FA0 +Unk_ov57_021D0FA0: ; 0x021D0FA0 + .incbin "incbin/overlay57_rodata.bin", 0x30, 0x1D8 + diff --git a/asm/ov57_021D0F30.s b/asm/ov57_021D0F30.s new file mode 100644 index 000000000..c1cd79b0b --- /dev/null +++ b/asm/ov57_021D0F30.s @@ -0,0 +1,40 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov57_021D0F30 +ov57_021D0F30: ; 0x021D0F30 + push {r3, lr} + add r0, r1, #0 + bl sub_020246A8 + cmp r0, #0 + bne _021D0F42 + mov r0, #0 + bl sub_020C3EE4 +_021D0F42: + pop {r3, pc} + thumb_func_end ov57_021D0F30 + + thumb_func_start ov57_021D0F44 +ov57_021D0F44: ; 0x021D0F44 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl sub_0202479C + add r0, r4, #0 + bl sub_0203D1A8 + add r0, r4, #0 + bl sub_02025E38 + ldr r1, _021D0F6C ; =0x00000BB8 + bl sub_02025F78 + add r0, r4, #0 + bl sub_020507E4 + bl sub_0206A92C + pop {r4, pc} + ; .align 2, 0 +_021D0F6C: .word 0x00000BB8 + thumb_func_end ov57_021D0F44 \ No newline at end of file diff --git a/asm/overlay58.s b/asm/ov58_021D0D80.s similarity index 97% rename from asm/overlay58.s rename to asm/ov58_021D0D80.s index fc8047ceb..23c26ec2e 100644 --- a/asm/overlay58.s +++ b/asm/ov58_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov58_021D0D80 ov58_021D0D80: ; 0x021D0D80 push {r4, r5, r6, r7, lr} @@ -4077,14 +4080,67 @@ _021D2DA6: bx lr ; .align 2, 0 thumb_func_end ov58_021D2D4C - ; 0x021D2DD4 - .rodata - .incbin "incbin/overlay58_rodata.bin" + + + .global Unk_ov58_021D2DD4 +Unk_ov58_021D2DD4: ; 0x021D2DD4 + .incbin "incbin/overlay58_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov58_021D2DDC +Unk_ov58_021D2DDC: ; 0x021D2DDC + .incbin "incbin/overlay58_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov58_021D2DE4 +Unk_ov58_021D2DE4: ; 0x021D2DE4 + .incbin "incbin/overlay58_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov58_021D2DF4 +Unk_ov58_021D2DF4: ; 0x021D2DF4 + .incbin "incbin/overlay58_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov58_021D2E04 +Unk_ov58_021D2E04: ; 0x021D2E04 + .incbin "incbin/overlay58_rodata.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov58_021D2E20 +Unk_ov58_021D2E20: ; 0x021D2E20 + .incbin "incbin/overlay58_rodata.bin", 0x4C, 0x68 - 0x4C + + .global Unk_ov58_021D2E3C +Unk_ov58_021D2E3C: ; 0x021D2E3C + .incbin "incbin/overlay58_rodata.bin", 0x68, 0x84 - 0x68 + + .global Unk_ov58_021D2E58 +Unk_ov58_021D2E58: ; 0x021D2E58 + .incbin "incbin/overlay58_rodata.bin", 0x84, 0xA0 - 0x84 + + .global Unk_ov58_021D2E74 +Unk_ov58_021D2E74: ; 0x021D2E74 + .incbin "incbin/overlay58_rodata.bin", 0xA0, 0xBC - 0xA0 + + .global Unk_ov58_021D2E90 +Unk_ov58_021D2E90: ; 0x021D2E90 + .incbin "incbin/overlay58_rodata.bin", 0xBC, 0xE4 - 0xBC + + .global Unk_ov58_021D2EB8 +Unk_ov58_021D2EB8: ; 0x021D2EB8 + .incbin "incbin/overlay58_rodata.bin", 0xE4, 0x118 - 0xE4 + + .global Unk_ov58_021D2EEC +Unk_ov58_021D2EEC: ; 0x021D2EEC + .incbin "incbin/overlay58_rodata.bin", 0x118, 0x160 - 0x118 + + .global Unk_ov58_021D2F34 +Unk_ov58_021D2F34: ; 0x021D2F34 + .incbin "incbin/overlay58_rodata.bin", 0x160, 0x240 + .data - .incbin "incbin/overlay58_data.bin" - .bss - .space 0x0 + + .global Unk_ov58_021D3180 +Unk_ov58_021D3180: ; 0x021D3180 + .incbin "incbin/overlay58_data.bin", 0x0, 0xC0 + diff --git a/asm/overlay59.s b/asm/ov59_021D0D80.s similarity index 75% rename from asm/overlay59.s rename to asm/ov59_021D0D80.s index 1b4a47c60..6ce71c98d 100644 --- a/asm/overlay59.s +++ b/asm/ov59_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov59_021D0D80 ov59_021D0D80: ; 0x021D0D80 push {r4, r5, r6, r7, lr} @@ -3641,1198 +3644,62 @@ _021D2A24: .word 0x00004A4C _021D2A28: .word 0x00004A44 thumb_func_end ov59_021D292C - thumb_func_start ov59_021D2A2C -ov59_021D2A2C: ; 0x021D2A2C - mov r0, #0x2c - bx lr - thumb_func_end ov59_021D2A2C - - thumb_func_start ov59_021D2A30 -ov59_021D2A30: ; 0x021D2A30 - add r0, #0x2c - bx lr - thumb_func_end ov59_021D2A30 - - thumb_func_start ov59_021D2A34 -ov59_021D2A34: ; 0x021D2A34 - push {r4, r5, r6, r7} - add r7, r0, #0 - add r6, r7, #0 - mov ip, r1 - mov r5, #5 - add r6, #0xdc -_021D2A40: - add r4, r6, #0 - sub r4, #0x2c - add r3, r6, #0 - mov r2, #5 -_021D2A48: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D2A48 - ldr r0, [r4, #0] - sub r5, r5, #1 - sub r6, #0x2c - str r0, [r3, #0] - cmp r5, #2 - bgt _021D2A40 - add r7, #0x58 - mov r3, #5 -_021D2A60: - mov r2, ip - ldmia r2!, {r0, r1} - mov ip, r2 - stmia r7!, {r0, r1} - sub r3, r3, #1 - bne _021D2A60 - mov r0, ip - ldr r0, [r0, #0] - str r0, [r7, #0] - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov59_021D2A34 - - thumb_func_start ov59_021D2A78 -ov59_021D2A78: ; 0x021D2A78 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #2 - blt _021D2A86 - cmp r5, #5 - ble _021D2A8A -_021D2A86: - bl sub_02022974 -_021D2A8A: - add r2, r5, #1 - cmp r2, #5 - bgt _021D2AB2 - mov r0, #0x2c - mul r0, r2 - add r3, r4, r0 -_021D2A96: - add r6, r3, #0 - add r7, r3, #0 - sub r6, #0x2c - mov r5, #5 -_021D2A9E: - ldmia r7!, {r0, r1} - stmia r6!, {r0, r1} - sub r5, r5, #1 - bne _021D2A9E - ldr r0, [r7, #0] - add r2, r2, #1 - add r3, #0x2c - str r0, [r6, #0] - cmp r2, #5 - ble _021D2A96 -_021D2AB2: - ldr r0, _021D2AC0 ; =0x0000FFFF - add r1, r4, #0 - add r4, #0xdc - add r1, #0xdc - strh r0, [r4] - strh r0, [r1, #0x10] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2AC0: .word 0x0000FFFF - thumb_func_end ov59_021D2A78 - - thumb_func_start ov59_021D2AC4 -ov59_021D2AC4: ; 0x021D2AC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - add r5, r2, #0 - str r1, [sp, #4] - str r3, [sp, #8] - cmp r0, #0 - ble _021D2B3E - mov r7, #0x2c -_021D2ADC: - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - ldr r6, [r0, #0] - ldr r0, [sp, #4] - cmp r1, r0 - beq _021D2B2C - cmp r6, #0 - beq _021D2B2C - add r0, r6, #0 - bl sub_0202B510 - cmp r0, #1 - beq _021D2B2C - add r0, r6, #0 - add r1, r5, #0 - bl sub_0202B530 - cmp r0, #0 - bne _021D2B2C - mov r4, #0 -_021D2B04: - add r1, r4, #2 - add r2, r1, #0 - mul r2, r7 - add r0, r6, #0 - add r1, r5, r2 - bl sub_0202B530 - cmp r0, #0 - beq _021D2B1E - add r0, r5, #0 - add r1, r4, #2 - bl ov59_021D2A78 -_021D2B1E: - add r4, r4, #1 - cmp r4, #4 - blt _021D2B04 - add r0, r5, #0 - add r1, r6, #0 - bl ov59_021D2A34 -_021D2B2C: - ldr r0, [sp, #8] - add r0, r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp] - str r1, [sp, #0xc] - cmp r1, r0 - blt _021D2ADC -_021D2B3E: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2AC4 - - thumb_func_start ov59_021D2B44 -ov59_021D2B44: ; 0x021D2B44 - mov r0, #0x12 - lsl r0, r0, #4 - bx lr - ; .align 2, 0 - thumb_func_end ov59_021D2B44 - - thumb_func_start ov59_021D2B4C -ov59_021D2B4C: ; 0x021D2B4C - mov r0, #0x12 - lsl r0, r0, #4 - bx lr - ; .align 2, 0 - thumb_func_end ov59_021D2B4C - - thumb_func_start ov59_021D2B54 -ov59_021D2B54: ; 0x021D2B54 - mov r0, #0x12 - lsl r0, r0, #4 - bx lr - ; .align 2, 0 - thumb_func_end ov59_021D2B54 - - thumb_func_start ov59_021D2B5C -ov59_021D2B5C: ; 0x021D2B5C - push {r4, r5} - ldr r4, _021D2B8C ; =0x021D33E4 - lsl r5, r0, #2 - ldr r0, [r4, r5] - mov r2, #0 - ldrb r3, [r0] - cmp r3, #0xff - beq _021D2B84 - add r4, r0, #0 -_021D2B6E: - ldrb r3, [r0] - cmp r1, r3 - bne _021D2B7A - mov r0, #1 - pop {r4, r5} - bx lr -_021D2B7A: - add r2, r2, #1 - ldrb r3, [r4, r2] - add r0, r0, #1 - cmp r3, #0xff - bne _021D2B6E -_021D2B84: - mov r0, #0 - pop {r4, r5} - bx lr - nop -_021D2B8C: .word 0x021D33E4 - thumb_func_end ov59_021D2B5C - - thumb_func_start ov59_021D2B90 -ov59_021D2B90: ; 0x021D2B90 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, [sp, #0x20] - add r7, r2, #0 - str r1, [sp, #0x20] - ldr r1, [sp, #0x24] - str r3, [sp] - str r1, [sp, #0x24] - bl sub_02025E38 - add r4, r0, #0 - mov r0, #0 - str r0, [sp, #4] - ldr r0, [sp] - cmp r0, #0 - ble _021D2C22 -_021D2BB2: - mov r0, #0 - add r1, r5, #0 - mov r2, #0x48 - bl sub_020C4BB8 - add r0, r4, #0 - bl sub_02025F20 - str r0, [r5, #0] - add r0, r4, #0 - bl sub_02025F30 - strb r0, [r5, #4] - mov r0, #0xc - strb r0, [r5, #5] - mov r0, #2 - strb r0, [r5, #6] - add r0, r4, #0 - bl sub_02025EF0 - add r1, r0, #0 - add r0, r5, #0 - add r0, #8 - mov r2, #8 - bl sub_020021D0 - add r3, r5, #0 - add r6, r7, #0 - add r3, #0x18 - mov r2, #6 -_021D2BEE: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D2BEE - mov r0, #0 - strb r0, [r5, #0x19] - ldr r0, [sp, #0x20] - cmp r0, #1 - bne _021D2C10 - ldrb r1, [r5, #0x18] - ldr r0, [sp, #0x24] - bl ov59_021D2B5C - cmp r0, #0 - bne _021D2C10 - mov r0, #0 - strb r0, [r5, #0x18] -_021D2C10: - ldr r0, [sp, #4] - add r7, #0x30 - add r0, r0, #1 - str r0, [sp, #4] - add r1, r0, #0 - ldr r0, [sp] - add r5, #0x48 - cmp r1, r0 - blt _021D2BB2 -_021D2C22: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2B90 - - thumb_func_start ov59_021D2C28 -ov59_021D2C28: ; 0x021D2C28 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl sub_02018184 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r5, #0 - bl ov59_021D2B44 - cmp r4, r0 - beq _021D2C50 - bl sub_02022974 -_021D2C50: - mov r0, #1 - mov r2, #0x63 - str r0, [sp] - mov r0, #3 - lsl r2, r2, #2 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, r2 - mov r3, #4 - bl ov59_021D2B90 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2C28 - - thumb_func_start ov59_021D2C70 -ov59_021D2C70: ; 0x021D2C70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl sub_02018184 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r5, #0 - bl ov59_021D2B4C - cmp r4, r0 - beq _021D2C98 - bl sub_02022974 -_021D2C98: - mov r0, #1 - add r6, #0xc - str r0, [sp] - mov r3, #4 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - str r3, [sp, #4] - bl ov59_021D2B90 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2C70 - - thumb_func_start ov59_021D2CB4 -ov59_021D2CB4: ; 0x021D2CB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl sub_02018184 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r5, #0 - bl ov59_021D2B54 - cmp r4, r0 - beq _021D2CDC - bl sub_02022974 -_021D2CDC: - mov r0, #1 - str r0, [sp] - mov r0, #5 - add r6, #0xcc - str r0, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #4 - bl ov59_021D2B90 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov59_021D2CB4 - - thumb_func_start ov59_021D2CF8 -ov59_021D2CF8: ; 0x021D2CF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl sub_02018184 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r5, #0 - bl ov59_021D2B44 - cmp r4, r0 - beq _021D2D20 - bl sub_02022974 -_021D2D20: - mov r0, #0 - mov r2, #0x63 - str r0, [sp] - lsl r2, r2, #2 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, r2 - mov r3, #4 - bl ov59_021D2B90 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov59_021D2CF8 - - thumb_func_start ov59_021D2D3C -ov59_021D2D3C: ; 0x021D2D3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl sub_02018184 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r5, #0 - bl ov59_021D2B4C - cmp r4, r0 - beq _021D2D64 - bl sub_02022974 -_021D2D64: - mov r0, #0 - str r0, [sp] - mov r0, #1 - add r6, #0xc - str r0, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #4 - bl ov59_021D2B90 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov59_021D2D3C - - thumb_func_start ov59_021D2D80 -ov59_021D2D80: ; 0x021D2D80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl sub_02018184 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r5, #0 - bl ov59_021D2B54 - cmp r4, r0 - beq _021D2DA8 - bl sub_02022974 -_021D2DA8: - mov r0, #0 - str r0, [sp] - mov r0, #2 - add r6, #0xcc - str r0, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #4 - bl ov59_021D2B90 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov59_021D2D80 - - thumb_func_start ov59_021D2DC4 -ov59_021D2DC4: ; 0x021D2DC4 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r4, r1, #0 - ldrb r1, [r6, #0x18] - add r5, r0, #0 - cmp r1, #0 - bne _021D2DD6 - mov r0, #0 - pop {r4, r5, r6, pc} -_021D2DD6: - add r0, r3, #0 - bl ov59_021D2B5C - cmp r0, #0 - bne _021D2DE6 - mov r0, #0 - mvn r0, r0 - pop {r4, r5, r6, pc} -_021D2DE6: - mov r1, #0 - cmp r4, #0 - ble _021D2E10 - add r2, r5, #0 -_021D2DEE: - ldrb r0, [r2, #0x18] - cmp r0, #0 - bne _021D2E08 - mov r0, #0x48 - mul r0, r1 - add r3, r5, r0 - mov r2, #9 -_021D2DFC: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D2DFC - mov r0, #1 - pop {r4, r5, r6, pc} -_021D2E08: - add r1, r1, #1 - add r2, #0x48 - cmp r1, r4 - blt _021D2DEE -_021D2E10: - mov r2, #0 - cmp r4, #0 - ble _021D2E3A - add r1, r5, #0 -_021D2E18: - ldrb r0, [r1, #0x19] - cmp r0, #3 - blo _021D2E32 - mov r0, #0x48 - mul r0, r2 - add r3, r5, r0 - mov r2, #9 -_021D2E26: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D2E26 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D2E32: - add r2, r2, #1 - add r1, #0x48 - cmp r2, r4 - blt _021D2E18 -_021D2E3A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2DC4 - - thumb_func_start ov59_021D2E40 -ov59_021D2E40: ; 0x021D2E40 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_02032EE8 - cmp r0, #0 - bne _021D2E52 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2E52: - bl sub_02025FCC - cmp r0, #0 - beq _021D2E5C - add r4, r5, #0 -_021D2E5C: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov59_021D2E40 - - thumb_func_start ov59_021D2E60 -ov59_021D2E60: ; 0x021D2E60 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - str r0, [sp] - ldr r0, [sp, #0x44] - str r1, [sp, #4] - str r0, [sp, #0x44] - ldr r0, [sp, #0x48] - add r7, r2, #0 - str r0, [sp, #0x48] - add r0, sp, #0x1c - mov r1, #0 - mov r2, #0x10 - str r3, [sp, #8] - ldr r5, [sp, #0x40] - bl sub_020C4CF4 - mov r4, #0 - add r6, r4, #0 - cmp r7, #0 - ble _021D2F04 - str r5, [sp, #0x14] -_021D2E8A: - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D2EF8 - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x10] - b _021D2EF2 -_021D2E9A: - add r0, r4, #1 - add r1, r7, #0 - bl sub_020E1F6C - add r4, r1, #0 -_021D2EA4: - lsl r0, r4, #2 - str r0, [sp, #0xc] - ldr r0, [r5, r0] - cmp r0, #0 - beq _021D2E9A - cmp r4, r6 - beq _021D2E9A - add r0, sp, #0x1c - ldrb r0, [r0, r4] - cmp r0, #4 - beq _021D2E9A - add r1, r0, #1 - add r0, sp, #0x1c - strb r1, [r0, r4] - ldr r0, [sp, #8] - cmp r4, r0 - beq _021D2EE6 - ldr r2, [sp, #0x44] - add r0, r4, #0 - add r1, r5, #0 - bl ov59_021D2E40 - add r3, r0, #0 - beq _021D2EE6 - ldr r2, [sp, #0xc] - ldr r0, [sp] - ldr r3, [r3, r2] - ldr r2, [sp, #0x10] - ldr r1, [sp, #4] - add r2, r3, r2 - ldr r3, [sp, #0x48] - bl ov59_021D2DC4 -_021D2EE6: - ldr r0, [sp, #0x10] - add r0, #0x48 - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] -_021D2EF2: - ldr r0, [sp, #0x18] - cmp r0, #4 - blt _021D2EA4 -_021D2EF8: - ldr r0, [sp, #0x14] - add r6, r6, #1 - add r0, r0, #4 - str r0, [sp, #0x14] - cmp r6, r7 - blt _021D2E8A -_021D2F04: - mov r0, #0x1b - bl sub_02025C84 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2E60 - - thumb_func_start ov59_021D2F10 -ov59_021D2F10: ; 0x021D2F10 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [sp, #0x18] - str r3, [sp] - str r1, [sp, #4] - add r4, r2, #0 - mov r1, #1 - str r1, [sp, #8] - mov r1, #0x93 - lsl r1, r1, #2 - add r0, r0, r1 - mov r1, #0x10 - add r2, r5, #0 - add r3, r4, #0 - bl ov59_021D2E60 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2F10 - - thumb_func_start ov59_021D2F38 -ov59_021D2F38: ; 0x021D2F38 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [sp, #0x18] - str r3, [sp] - str r1, [sp, #4] - add r4, r2, #0 - mov r1, #2 - str r1, [sp, #8] - ldr r1, _021D2F5C ; =0x000006CC - add r2, r5, #0 - add r0, r0, r1 - mov r1, #8 - add r3, r4, #0 - bl ov59_021D2E60 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D2F5C: .word 0x000006CC - thumb_func_end ov59_021D2F38 - - thumb_func_start ov59_021D2F60 -ov59_021D2F60: ; 0x021D2F60 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [sp, #0x18] - str r3, [sp] - str r1, [sp, #4] - add r4, r2, #0 - mov r1, #0 - str r1, [sp, #8] - ldr r1, _021D2F84 ; =0x0000090C - add r2, r5, #0 - add r0, r0, r1 - mov r1, #8 - add r3, r4, #0 - bl ov59_021D2E60 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D2F84: .word 0x0000090C - thumb_func_end ov59_021D2F60 - - thumb_func_start ov59_021D2F88 -ov59_021D2F88: ; 0x021D2F88 - push {r3, lr} - bl sub_0202B4A0 - bl ov59_021D2A2C - pop {r3, pc} - thumb_func_end ov59_021D2F88 - - thumb_func_start ov59_021D2F94 -ov59_021D2F94: ; 0x021D2F94 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r2, #0 - bl sub_0202B4A0 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_02018184 - add r4, r0, #0 - add r0, r6, #0 - bl ov59_021D2A30 - add r1, r4, #0 - add r2, r5, #0 - bl sub_020C4C14 - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov59_021D2F94 - - thumb_func_start ov59_021D2FBC -ov59_021D2FBC: ; 0x021D2FBC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0202B4A0 - add r2, r0, #0 - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - ldr r3, [r4, #0x10] - bl ov59_021D2AC4 - pop {r4, pc} - thumb_func_end ov59_021D2FBC - - thumb_func_start ov59_021D2FD4 -ov59_021D2FD4: ; 0x021D2FD4 - push {r3, lr} - bl sub_0202A750 - bl sub_02029C60 - pop {r3, pc} - thumb_func_end ov59_021D2FD4 - - thumb_func_start ov59_021D2FE0 -ov59_021D2FE0: ; 0x021D2FE0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r2, #0 - bl sub_0202A750 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_02018184 - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0 - bl sub_02029CA8 - add r1, r4, #0 - add r2, r5, #0 - bl sub_020C4C14 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov59_021D2FE0 - - thumb_func_start ov59_021D300C -ov59_021D300C: ; 0x021D300C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0202A750 - add r2, r0, #0 - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - lsl r0, r0, #0x18 - ldr r3, [r4, #0x10] - lsr r0, r0, #0x18 - bl sub_0202A6A8 - pop {r4, pc} - thumb_func_end ov59_021D300C - - thumb_func_start ov59_021D3028 -ov59_021D3028: ; 0x021D3028 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0202440C - ldr r1, [r4, #0x14] - str r1, [sp] - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - ldr r3, [r4, #0x10] - bl ov59_021D2F10 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov59_021D3028 - - thumb_func_start ov59_021D3048 -ov59_021D3048: ; 0x021D3048 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0202440C - ldr r1, [r4, #0x14] - str r1, [sp] - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - ldr r3, [r4, #0x10] - bl ov59_021D2F38 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov59_021D3048 - - thumb_func_start ov59_021D3068 -ov59_021D3068: ; 0x021D3068 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0202440C - ldr r1, [r4, #0x14] - str r1, [sp] - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - ldr r3, [r4, #0x10] - bl ov59_021D2F60 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov59_021D3068 - - thumb_func_start ov59_021D3088 -ov59_021D3088: ; 0x021D3088 - ldr r3, _021D308C ; =sub_0202E9FC - bx r3 - ; .align 2, 0 -_021D308C: .word sub_0202E9FC - thumb_func_end ov59_021D3088 - - thumb_func_start ov59_021D3090 -ov59_021D3090: ; 0x021D3090 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0202E8C0 - ldr r0, [r4, #0] - str r0, [sp] - ldr r2, [r4, #8] - ldr r0, [r4, #4] - lsl r2, r2, #0x18 - ldr r1, [r4, #0xc] - ldr r3, [r4, #0x10] - lsr r2, r2, #0x18 - bl sub_0202ED0C - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov59_021D3090 - - thumb_func_start ov59_021D30B4 -ov59_021D30B4: ; 0x021D30B4 - push {r4, r5, r6, lr} - add r5, r2, #0 - add r6, r0, #0 - add r0, r1, #0 - add r1, r5, #0 - bl sub_02018184 - add r4, r0, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020C4CF4 - add r0, r6, #0 - mov r1, #0 - add r2, r4, #0 - bl sub_02073700 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov59_021D30B4 - - thumb_func_start ov59_021D30DC -ov59_021D30DC: ; 0x021D30DC - bx lr - ; .align 2, 0 - thumb_func_end ov59_021D30DC - - thumb_func_start ov59_021D30E0 -ov59_021D30E0: ; 0x021D30E0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - mov r0, #0 - ldr r6, _021D3134 ; =0x00000BB8 - ldr r5, _021D3138 ; =0x021D33FC - str r1, [sp, #4] - str r0, [sp, #8] -_021D30F0: - ldr r0, [sp] - ldr r1, [r5, #0] - blx r1 - add r4, r0, #0 - ldr r0, [sp] - ldr r3, [r5, #4] - mov r1, #0x33 - add r2, r4, #0 - blx r3 - add r7, r0, #0 - cmp r6, r4 - bhi _021D310C - bl sub_02022974 -_021D310C: - ldr r1, [sp, #4] - add r0, r7, #0 - add r2, r4, #0 - bl sub_020C4C14 - add r0, r7, #0 - bl sub_020181C4 - ldr r0, [sp, #4] - sub r6, r6, r4 - add r0, r0, r4 - str r0, [sp, #4] - ldr r0, [sp, #8] - add r5, #0xc - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #0xa - blt _021D30F0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3134: .word 0x00000BB8 -_021D3138: .word 0x021D33FC - thumb_func_end ov59_021D30E0 - - thumb_func_start ov59_021D313C -ov59_021D313C: ; 0x021D313C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x68 - str r0, [sp] - ldr r0, _021D3280 ; =0x00000BB8 - str r1, [sp, #4] - str r0, [sp, #0x14] - mov r0, #0x33 - str r0, [sp, #0x50] - ldr r0, [sp] - mov r7, #0 - str r0, [sp, #0x54] - bl sub_0203608C - add r5, r7, #0 - str r0, [sp, #0x5c] - mov r0, #5 - str r0, [sp, #0x58] - add r0, sp, #0x3c - str r0, [sp, #0x60] - add r0, sp, #0x28 - ldr r4, _021D3284 ; =0x021D33FC - str r0, [sp, #0x64] - str r5, [sp, #0x1c] - str r5, [sp, #0x20] - str r5, [sp, #0x24] -_021D316E: - ldr r0, [sp] - ldr r1, [r4, #0] - blx r1 - ldr r1, [sp, #0x1c] - add r5, r5, #1 - add r0, r1, r0 - add r4, #0xc - str r0, [sp, #0x1c] - cmp r5, #2 - blt _021D316E - ldr r4, _021D3284 ; =0x021D33FC - mov r5, #0 -_021D3186: - ldr r0, [sp] - ldr r1, [r4, #0] - blx r1 - ldr r1, [sp, #0x20] - add r5, r5, #1 - add r0, r1, r0 - add r4, #0xc - str r0, [sp, #0x20] - cmp r5, #3 - blt _021D3186 - ldr r4, _021D3284 ; =0x021D33FC - mov r5, #0 -_021D319E: - ldr r0, [sp] - ldr r1, [r4, #0] - blx r1 - ldr r1, [sp, #0x24] - add r5, r5, #1 - add r0, r1, r0 - add r4, #0xc - str r0, [sp, #0x24] - cmp r5, #4 - blt _021D319E - mov r0, #0 - str r0, [sp, #8] - ldr r0, _021D3284 ; =0x021D33FC - str r0, [sp, #0x10] - add r0, sp, #0x1c - str r0, [sp, #0xc] -_021D31BE: - ldr r1, [sp, #0x10] - ldr r0, [sp] - ldr r1, [r1, #0] - blx r1 - ldr r1, [sp, #0x14] - str r0, [sp, #0x18] - cmp r1, r0 - bhi _021D31D2 - bl sub_02022974 -_021D31D2: - mov r6, #0 - ldr r4, [sp, #4] - add r5, r6, #0 -_021D31D8: - add r0, r6, #0 - bl sub_02032EE8 - cmp r0, #0 - beq _021D31EA - ldr r0, [sp, #0x60] - add r1, r4, r7 - str r1, [r0, r5] - b _021D31F0 -_021D31EA: - ldr r1, [sp, #0x60] - mov r0, #0 - str r0, [r1, r5] -_021D31F0: - mov r0, #0x2f - lsl r0, r0, #6 - add r6, r6, #1 - add r4, r4, r0 - add r5, r5, #4 - cmp r6, #5 - blt _021D31D8 - ldr r0, [sp, #8] - cmp r0, #7 - beq _021D320C - cmp r0, #8 - beq _021D320C - cmp r0, #9 - bne _021D323E -_021D320C: - mov r6, #0 - ldr r4, [sp, #4] - add r5, r6, #0 -_021D3212: - add r0, r6, #0 - bl sub_02032EE8 - cmp r0, #0 - beq _021D322A - ldr r0, [sp, #0xc] - sub r0, #0x1c - ldr r0, [r0, #0] - add r1, r4, r0 - ldr r0, [sp, #0x64] - str r1, [r0, r5] - b _021D3230 -_021D322A: - ldr r1, [sp, #0x64] - mov r0, #0 - str r0, [r1, r5] -_021D3230: - mov r0, #0x2f - lsl r0, r0, #6 - add r6, r6, #1 - add r4, r4, r0 - add r5, r5, #4 - cmp r6, #5 - blt _021D3212 -_021D323E: - ldr r0, [sp, #0x10] - ldr r1, [r0, #8] - cmp r1, #0 - beq _021D324A - add r0, sp, #0x50 - blx r1 -_021D324A: - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - add r7, r7, r0 - sub r0, r1, r0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - add r0, #0xc - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #0xa - blo _021D31BE - ldr r0, [sp] - bl sub_0202440C - add r4, r0, #0 - bl sub_0202E2EC - add r0, r4, #0 - bl sub_0202E35C - add sp, #0x68 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3280: .word 0x00000BB8 -_021D3284: .word 0x021D33FC - thumb_func_end ov59_021D313C - ; 0x021D3288 - - .rodata - .incbin "incbin/overlay59_rodata.bin" + + + .global Unk_ov59_021D3288 +Unk_ov59_021D3288: ; 0x021D3288 + .incbin "incbin/overlay59_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov59_021D3290 +Unk_ov59_021D3290: ; 0x021D3290 + .incbin "incbin/overlay59_rodata.bin", 0x8, 0x12 - 0x8 + + .global Unk_ov59_021D329A +Unk_ov59_021D329A: ; 0x021D329A + .incbin "incbin/overlay59_rodata.bin", 0x12, 0x1C - 0x12 + + .global Unk_ov59_021D32A4 +Unk_ov59_021D32A4: ; 0x021D32A4 + .incbin "incbin/overlay59_rodata.bin", 0x1C, 0x2C - 0x1C + + .global Unk_ov59_021D32B4 +Unk_ov59_021D32B4: ; 0x021D32B4 + .incbin "incbin/overlay59_rodata.bin", 0x2C, 0x3C - 0x2C + + .global Unk_ov59_021D32C4 +Unk_ov59_021D32C4: ; 0x021D32C4 + .incbin "incbin/overlay59_rodata.bin", 0x3C, 0x54 - 0x3C + + .global Unk_ov59_021D32DC +Unk_ov59_021D32DC: ; 0x021D32DC + .incbin "incbin/overlay59_rodata.bin", 0x54, 0x70 - 0x54 + + .global Unk_ov59_021D32F8 +Unk_ov59_021D32F8: ; 0x021D32F8 + .incbin "incbin/overlay59_rodata.bin", 0x70, 0x8C - 0x70 + + .global Unk_ov59_021D3314 +Unk_ov59_021D3314: ; 0x021D3314 + .incbin "incbin/overlay59_rodata.bin", 0x8C, 0xA8 - 0x8C + + .global Unk_ov59_021D3330 +Unk_ov59_021D3330: ; 0x021D3330 + .incbin "incbin/overlay59_rodata.bin", 0xA8, 0xC4 - 0xA8 + + .global Unk_ov59_021D334C +Unk_ov59_021D334C: ; 0x021D334C + .incbin "incbin/overlay59_rodata.bin", 0xC4, 0xE0 - 0xC4 + + .global Unk_ov59_021D3368 +Unk_ov59_021D3368: ; 0x021D3368 + .incbin "incbin/overlay59_rodata.bin", 0xE0, 0x28 + .data - .incbin "incbin/overlay59_data.bin" - .bss - .space 0x0 + + .global Unk_ov59_021D3480 +Unk_ov59_021D3480: ; 0x021D3480 + .incbin "incbin/overlay59_data.bin", 0x0, 0x7C + diff --git a/asm/ov59_021D2A2C.s b/asm/ov59_021D2A2C.s new file mode 100644 index 000000000..637600631 --- /dev/null +++ b/asm/ov59_021D2A2C.s @@ -0,0 +1,174 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov59_021D2A2C +ov59_021D2A2C: ; 0x021D2A2C + mov r0, #0x2c + bx lr + thumb_func_end ov59_021D2A2C + + thumb_func_start ov59_021D2A30 +ov59_021D2A30: ; 0x021D2A30 + add r0, #0x2c + bx lr + thumb_func_end ov59_021D2A30 + + thumb_func_start ov59_021D2A34 +ov59_021D2A34: ; 0x021D2A34 + push {r4, r5, r6, r7} + add r7, r0, #0 + add r6, r7, #0 + mov ip, r1 + mov r5, #5 + add r6, #0xdc +_021D2A40: + add r4, r6, #0 + sub r4, #0x2c + add r3, r6, #0 + mov r2, #5 +_021D2A48: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D2A48 + ldr r0, [r4, #0] + sub r5, r5, #1 + sub r6, #0x2c + str r0, [r3, #0] + cmp r5, #2 + bgt _021D2A40 + add r7, #0x58 + mov r3, #5 +_021D2A60: + mov r2, ip + ldmia r2!, {r0, r1} + mov ip, r2 + stmia r7!, {r0, r1} + sub r3, r3, #1 + bne _021D2A60 + mov r0, ip + ldr r0, [r0, #0] + str r0, [r7, #0] + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov59_021D2A34 + + thumb_func_start ov59_021D2A78 +ov59_021D2A78: ; 0x021D2A78 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #2 + blt _021D2A86 + cmp r5, #5 + ble _021D2A8A +_021D2A86: + bl sub_02022974 +_021D2A8A: + add r2, r5, #1 + cmp r2, #5 + bgt _021D2AB2 + mov r0, #0x2c + mul r0, r2 + add r3, r4, r0 +_021D2A96: + add r6, r3, #0 + add r7, r3, #0 + sub r6, #0x2c + mov r5, #5 +_021D2A9E: + ldmia r7!, {r0, r1} + stmia r6!, {r0, r1} + sub r5, r5, #1 + bne _021D2A9E + ldr r0, [r7, #0] + add r2, r2, #1 + add r3, #0x2c + str r0, [r6, #0] + cmp r2, #5 + ble _021D2A96 +_021D2AB2: + ldr r0, _021D2AC0 ; =0x0000FFFF + add r1, r4, #0 + add r4, #0xdc + add r1, #0xdc + strh r0, [r4] + strh r0, [r1, #0x10] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2AC0: .word 0x0000FFFF + thumb_func_end ov59_021D2A78 + + thumb_func_start ov59_021D2AC4 +ov59_021D2AC4: ; 0x021D2AC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + add r5, r2, #0 + str r1, [sp, #4] + str r3, [sp, #8] + cmp r0, #0 + ble _021D2B3E + mov r7, #0x2c +_021D2ADC: + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + ldr r6, [r0, #0] + ldr r0, [sp, #4] + cmp r1, r0 + beq _021D2B2C + cmp r6, #0 + beq _021D2B2C + add r0, r6, #0 + bl sub_0202B510 + cmp r0, #1 + beq _021D2B2C + add r0, r6, #0 + add r1, r5, #0 + bl sub_0202B530 + cmp r0, #0 + bne _021D2B2C + mov r4, #0 +_021D2B04: + add r1, r4, #2 + add r2, r1, #0 + mul r2, r7 + add r0, r6, #0 + add r1, r5, r2 + bl sub_0202B530 + cmp r0, #0 + beq _021D2B1E + add r0, r5, #0 + add r1, r4, #2 + bl ov59_021D2A78 +_021D2B1E: + add r4, r4, #1 + cmp r4, #4 + blt _021D2B04 + add r0, r5, #0 + add r1, r6, #0 + bl ov59_021D2A34 +_021D2B2C: + ldr r0, [sp, #8] + add r0, r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp] + str r1, [sp, #0xc] + cmp r1, r0 + blt _021D2ADC +_021D2B3E: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2AC4 \ No newline at end of file diff --git a/asm/ov59_021D2B44.s b/asm/ov59_021D2B44.s new file mode 100644 index 000000000..3f30c350f --- /dev/null +++ b/asm/ov59_021D2B44.s @@ -0,0 +1,636 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov59_021D2B44 +ov59_021D2B44: ; 0x021D2B44 + mov r0, #0x12 + lsl r0, r0, #4 + bx lr + ; .align 2, 0 + thumb_func_end ov59_021D2B44 + + thumb_func_start ov59_021D2B4C +ov59_021D2B4C: ; 0x021D2B4C + mov r0, #0x12 + lsl r0, r0, #4 + bx lr + ; .align 2, 0 + thumb_func_end ov59_021D2B4C + + thumb_func_start ov59_021D2B54 +ov59_021D2B54: ; 0x021D2B54 + mov r0, #0x12 + lsl r0, r0, #4 + bx lr + ; .align 2, 0 + thumb_func_end ov59_021D2B54 + + thumb_func_start ov59_021D2B5C +ov59_021D2B5C: ; 0x021D2B5C + push {r4, r5} + ldr r4, _021D2B8C ; =0x021D33E4 + lsl r5, r0, #2 + ldr r0, [r4, r5] + mov r2, #0 + ldrb r3, [r0] + cmp r3, #0xff + beq _021D2B84 + add r4, r0, #0 +_021D2B6E: + ldrb r3, [r0] + cmp r1, r3 + bne _021D2B7A + mov r0, #1 + pop {r4, r5} + bx lr +_021D2B7A: + add r2, r2, #1 + ldrb r3, [r4, r2] + add r0, r0, #1 + cmp r3, #0xff + bne _021D2B6E +_021D2B84: + mov r0, #0 + pop {r4, r5} + bx lr + nop +_021D2B8C: .word 0x021D33E4 + thumb_func_end ov59_021D2B5C + + thumb_func_start ov59_021D2B90 +ov59_021D2B90: ; 0x021D2B90 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, [sp, #0x20] + add r7, r2, #0 + str r1, [sp, #0x20] + ldr r1, [sp, #0x24] + str r3, [sp] + str r1, [sp, #0x24] + bl sub_02025E38 + add r4, r0, #0 + mov r0, #0 + str r0, [sp, #4] + ldr r0, [sp] + cmp r0, #0 + ble _021D2C22 +_021D2BB2: + mov r0, #0 + add r1, r5, #0 + mov r2, #0x48 + bl sub_020C4BB8 + add r0, r4, #0 + bl sub_02025F20 + str r0, [r5, #0] + add r0, r4, #0 + bl sub_02025F30 + strb r0, [r5, #4] + mov r0, #0xc + strb r0, [r5, #5] + mov r0, #2 + strb r0, [r5, #6] + add r0, r4, #0 + bl sub_02025EF0 + add r1, r0, #0 + add r0, r5, #0 + add r0, #8 + mov r2, #8 + bl sub_020021D0 + add r3, r5, #0 + add r6, r7, #0 + add r3, #0x18 + mov r2, #6 +_021D2BEE: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D2BEE + mov r0, #0 + strb r0, [r5, #0x19] + ldr r0, [sp, #0x20] + cmp r0, #1 + bne _021D2C10 + ldrb r1, [r5, #0x18] + ldr r0, [sp, #0x24] + bl ov59_021D2B5C + cmp r0, #0 + bne _021D2C10 + mov r0, #0 + strb r0, [r5, #0x18] +_021D2C10: + ldr r0, [sp, #4] + add r7, #0x30 + add r0, r0, #1 + str r0, [sp, #4] + add r1, r0, #0 + ldr r0, [sp] + add r5, #0x48 + cmp r1, r0 + blt _021D2BB2 +_021D2C22: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2B90 + + thumb_func_start ov59_021D2C28 +ov59_021D2C28: ; 0x021D2C28 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl sub_02018184 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r5, #0 + bl ov59_021D2B44 + cmp r4, r0 + beq _021D2C50 + bl sub_02022974 +_021D2C50: + mov r0, #1 + mov r2, #0x63 + str r0, [sp] + mov r0, #3 + lsl r2, r2, #2 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, r2 + mov r3, #4 + bl ov59_021D2B90 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2C28 + + thumb_func_start ov59_021D2C70 +ov59_021D2C70: ; 0x021D2C70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl sub_02018184 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r5, #0 + bl ov59_021D2B4C + cmp r4, r0 + beq _021D2C98 + bl sub_02022974 +_021D2C98: + mov r0, #1 + add r6, #0xc + str r0, [sp] + mov r3, #4 + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + str r3, [sp, #4] + bl ov59_021D2B90 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2C70 + + thumb_func_start ov59_021D2CB4 +ov59_021D2CB4: ; 0x021D2CB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl sub_02018184 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r5, #0 + bl ov59_021D2B54 + cmp r4, r0 + beq _021D2CDC + bl sub_02022974 +_021D2CDC: + mov r0, #1 + str r0, [sp] + mov r0, #5 + add r6, #0xcc + str r0, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #4 + bl ov59_021D2B90 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov59_021D2CB4 + + thumb_func_start ov59_021D2CF8 +ov59_021D2CF8: ; 0x021D2CF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl sub_02018184 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r5, #0 + bl ov59_021D2B44 + cmp r4, r0 + beq _021D2D20 + bl sub_02022974 +_021D2D20: + mov r0, #0 + mov r2, #0x63 + str r0, [sp] + lsl r2, r2, #2 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, r2 + mov r3, #4 + bl ov59_021D2B90 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov59_021D2CF8 + + thumb_func_start ov59_021D2D3C +ov59_021D2D3C: ; 0x021D2D3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl sub_02018184 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r5, #0 + bl ov59_021D2B4C + cmp r4, r0 + beq _021D2D64 + bl sub_02022974 +_021D2D64: + mov r0, #0 + str r0, [sp] + mov r0, #1 + add r6, #0xc + str r0, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #4 + bl ov59_021D2B90 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov59_021D2D3C + + thumb_func_start ov59_021D2D80 +ov59_021D2D80: ; 0x021D2D80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + bl sub_02018184 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r5, #0 + bl ov59_021D2B54 + cmp r4, r0 + beq _021D2DA8 + bl sub_02022974 +_021D2DA8: + mov r0, #0 + str r0, [sp] + mov r0, #2 + add r6, #0xcc + str r0, [sp, #4] + add r0, r5, #0 + add r1, r7, #0 + add r2, r6, #0 + mov r3, #4 + bl ov59_021D2B90 + add r0, r7, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov59_021D2D80 + + thumb_func_start ov59_021D2DC4 +ov59_021D2DC4: ; 0x021D2DC4 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r4, r1, #0 + ldrb r1, [r6, #0x18] + add r5, r0, #0 + cmp r1, #0 + bne _021D2DD6 + mov r0, #0 + pop {r4, r5, r6, pc} +_021D2DD6: + add r0, r3, #0 + bl ov59_021D2B5C + cmp r0, #0 + bne _021D2DE6 + mov r0, #0 + mvn r0, r0 + pop {r4, r5, r6, pc} +_021D2DE6: + mov r1, #0 + cmp r4, #0 + ble _021D2E10 + add r2, r5, #0 +_021D2DEE: + ldrb r0, [r2, #0x18] + cmp r0, #0 + bne _021D2E08 + mov r0, #0x48 + mul r0, r1 + add r3, r5, r0 + mov r2, #9 +_021D2DFC: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D2DFC + mov r0, #1 + pop {r4, r5, r6, pc} +_021D2E08: + add r1, r1, #1 + add r2, #0x48 + cmp r1, r4 + blt _021D2DEE +_021D2E10: + mov r2, #0 + cmp r4, #0 + ble _021D2E3A + add r1, r5, #0 +_021D2E18: + ldrb r0, [r1, #0x19] + cmp r0, #3 + blo _021D2E32 + mov r0, #0x48 + mul r0, r2 + add r3, r5, r0 + mov r2, #9 +_021D2E26: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D2E26 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D2E32: + add r2, r2, #1 + add r1, #0x48 + cmp r2, r4 + blt _021D2E18 +_021D2E3A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2DC4 + + thumb_func_start ov59_021D2E40 +ov59_021D2E40: ; 0x021D2E40 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_02032EE8 + cmp r0, #0 + bne _021D2E52 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2E52: + bl sub_02025FCC + cmp r0, #0 + beq _021D2E5C + add r4, r5, #0 +_021D2E5C: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov59_021D2E40 + + thumb_func_start ov59_021D2E60 +ov59_021D2E60: ; 0x021D2E60 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + str r0, [sp] + ldr r0, [sp, #0x44] + str r1, [sp, #4] + str r0, [sp, #0x44] + ldr r0, [sp, #0x48] + add r7, r2, #0 + str r0, [sp, #0x48] + add r0, sp, #0x1c + mov r1, #0 + mov r2, #0x10 + str r3, [sp, #8] + ldr r5, [sp, #0x40] + bl sub_020C4CF4 + mov r4, #0 + add r6, r4, #0 + cmp r7, #0 + ble _021D2F04 + str r5, [sp, #0x14] +_021D2E8A: + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D2EF8 + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x10] + b _021D2EF2 +_021D2E9A: + add r0, r4, #1 + add r1, r7, #0 + bl sub_020E1F6C + add r4, r1, #0 +_021D2EA4: + lsl r0, r4, #2 + str r0, [sp, #0xc] + ldr r0, [r5, r0] + cmp r0, #0 + beq _021D2E9A + cmp r4, r6 + beq _021D2E9A + add r0, sp, #0x1c + ldrb r0, [r0, r4] + cmp r0, #4 + beq _021D2E9A + add r1, r0, #1 + add r0, sp, #0x1c + strb r1, [r0, r4] + ldr r0, [sp, #8] + cmp r4, r0 + beq _021D2EE6 + ldr r2, [sp, #0x44] + add r0, r4, #0 + add r1, r5, #0 + bl ov59_021D2E40 + add r3, r0, #0 + beq _021D2EE6 + ldr r2, [sp, #0xc] + ldr r0, [sp] + ldr r3, [r3, r2] + ldr r2, [sp, #0x10] + ldr r1, [sp, #4] + add r2, r3, r2 + ldr r3, [sp, #0x48] + bl ov59_021D2DC4 +_021D2EE6: + ldr r0, [sp, #0x10] + add r0, #0x48 + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] +_021D2EF2: + ldr r0, [sp, #0x18] + cmp r0, #4 + blt _021D2EA4 +_021D2EF8: + ldr r0, [sp, #0x14] + add r6, r6, #1 + add r0, r0, #4 + str r0, [sp, #0x14] + cmp r6, r7 + blt _021D2E8A +_021D2F04: + mov r0, #0x1b + bl sub_02025C84 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2E60 + + thumb_func_start ov59_021D2F10 +ov59_021D2F10: ; 0x021D2F10 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [sp, #0x18] + str r3, [sp] + str r1, [sp, #4] + add r4, r2, #0 + mov r1, #1 + str r1, [sp, #8] + mov r1, #0x93 + lsl r1, r1, #2 + add r0, r0, r1 + mov r1, #0x10 + add r2, r5, #0 + add r3, r4, #0 + bl ov59_021D2E60 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2F10 + + thumb_func_start ov59_021D2F38 +ov59_021D2F38: ; 0x021D2F38 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [sp, #0x18] + str r3, [sp] + str r1, [sp, #4] + add r4, r2, #0 + mov r1, #2 + str r1, [sp, #8] + ldr r1, _021D2F5C ; =0x000006CC + add r2, r5, #0 + add r0, r0, r1 + mov r1, #8 + add r3, r4, #0 + bl ov59_021D2E60 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D2F5C: .word 0x000006CC + thumb_func_end ov59_021D2F38 + + thumb_func_start ov59_021D2F60 +ov59_021D2F60: ; 0x021D2F60 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [sp, #0x18] + str r3, [sp] + str r1, [sp, #4] + add r4, r2, #0 + mov r1, #0 + str r1, [sp, #8] + ldr r1, _021D2F84 ; =0x0000090C + add r2, r5, #0 + add r0, r0, r1 + mov r1, #8 + add r3, r4, #0 + bl ov59_021D2E60 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D2F84: .word 0x0000090C + thumb_func_end ov59_021D2F60 + + .rodata + + + .global Unk_ov59_021D3390 +Unk_ov59_021D3390: ; 0x021D3390 + .incbin "incbin/overlay59_rodata.bin", 0x108, 0x110 - 0x108 + + .global Unk_ov59_021D3398 +Unk_ov59_021D3398: ; 0x021D3398 + .incbin "incbin/overlay59_rodata.bin", 0x110, 0x11C - 0x110 + + .global Unk_ov59_021D33A4 +Unk_ov59_021D33A4: ; 0x021D33A4 + .incbin "incbin/overlay59_rodata.bin", 0x11C, 0x128 - 0x11C + + .global Unk_ov59_021D33B0 +Unk_ov59_021D33B0: ; 0x021D33B0 + .incbin "incbin/overlay59_rodata.bin", 0x128, 0x138 - 0x128 + + .global Unk_ov59_021D33C0 +Unk_ov59_021D33C0: ; 0x021D33C0 + .incbin "incbin/overlay59_rodata.bin", 0x138, 0x148 - 0x138 + + .global Unk_ov59_021D33D0 +Unk_ov59_021D33D0: ; 0x021D33D0 + .incbin "incbin/overlay59_rodata.bin", 0x148, 0x15C - 0x148 + + .global Unk_ov59_021D33E4 +Unk_ov59_021D33E4: ; 0x021D33E4 + .incbin "incbin/overlay59_rodata.bin", 0x15C, 0x18 + diff --git a/asm/ov59_021D2F88.s b/asm/ov59_021D2F88.s new file mode 100644 index 000000000..15180ae09 --- /dev/null +++ b/asm/ov59_021D2F88.s @@ -0,0 +1,436 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov59_021D2F88 +ov59_021D2F88: ; 0x021D2F88 + push {r3, lr} + bl sub_0202B4A0 + bl ov59_021D2A2C + pop {r3, pc} + thumb_func_end ov59_021D2F88 + + thumb_func_start ov59_021D2F94 +ov59_021D2F94: ; 0x021D2F94 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r2, #0 + bl sub_0202B4A0 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_02018184 + add r4, r0, #0 + add r0, r6, #0 + bl ov59_021D2A30 + add r1, r4, #0 + add r2, r5, #0 + bl sub_020C4C14 + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov59_021D2F94 + + thumb_func_start ov59_021D2FBC +ov59_021D2FBC: ; 0x021D2FBC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0202B4A0 + add r2, r0, #0 + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + ldr r3, [r4, #0x10] + bl ov59_021D2AC4 + pop {r4, pc} + thumb_func_end ov59_021D2FBC + + thumb_func_start ov59_021D2FD4 +ov59_021D2FD4: ; 0x021D2FD4 + push {r3, lr} + bl sub_0202A750 + bl sub_02029C60 + pop {r3, pc} + thumb_func_end ov59_021D2FD4 + + thumb_func_start ov59_021D2FE0 +ov59_021D2FE0: ; 0x021D2FE0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r2, #0 + bl sub_0202A750 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_02018184 + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0 + bl sub_02029CA8 + add r1, r4, #0 + add r2, r5, #0 + bl sub_020C4C14 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov59_021D2FE0 + + thumb_func_start ov59_021D300C +ov59_021D300C: ; 0x021D300C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0202A750 + add r2, r0, #0 + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + lsl r0, r0, #0x18 + ldr r3, [r4, #0x10] + lsr r0, r0, #0x18 + bl sub_0202A6A8 + pop {r4, pc} + thumb_func_end ov59_021D300C + + thumb_func_start ov59_021D3028 +ov59_021D3028: ; 0x021D3028 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0202440C + ldr r1, [r4, #0x14] + str r1, [sp] + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + ldr r3, [r4, #0x10] + bl ov59_021D2F10 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov59_021D3028 + + thumb_func_start ov59_021D3048 +ov59_021D3048: ; 0x021D3048 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0202440C + ldr r1, [r4, #0x14] + str r1, [sp] + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + ldr r3, [r4, #0x10] + bl ov59_021D2F38 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov59_021D3048 + + thumb_func_start ov59_021D3068 +ov59_021D3068: ; 0x021D3068 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0202440C + ldr r1, [r4, #0x14] + str r1, [sp] + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + ldr r3, [r4, #0x10] + bl ov59_021D2F60 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov59_021D3068 + + thumb_func_start ov59_021D3088 +ov59_021D3088: ; 0x021D3088 + ldr r3, _021D308C ; =sub_0202E9FC + bx r3 + ; .align 2, 0 +_021D308C: .word sub_0202E9FC + thumb_func_end ov59_021D3088 + + thumb_func_start ov59_021D3090 +ov59_021D3090: ; 0x021D3090 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0202E8C0 + ldr r0, [r4, #0] + str r0, [sp] + ldr r2, [r4, #8] + ldr r0, [r4, #4] + lsl r2, r2, #0x18 + ldr r1, [r4, #0xc] + ldr r3, [r4, #0x10] + lsr r2, r2, #0x18 + bl sub_0202ED0C + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov59_021D3090 + + thumb_func_start ov59_021D30B4 +ov59_021D30B4: ; 0x021D30B4 + push {r4, r5, r6, lr} + add r5, r2, #0 + add r6, r0, #0 + add r0, r1, #0 + add r1, r5, #0 + bl sub_02018184 + add r4, r0, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020C4CF4 + add r0, r6, #0 + mov r1, #0 + add r2, r4, #0 + bl sub_02073700 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov59_021D30B4 + + thumb_func_start ov59_021D30DC +ov59_021D30DC: ; 0x021D30DC + bx lr + ; .align 2, 0 + thumb_func_end ov59_021D30DC + + thumb_func_start ov59_021D30E0 +ov59_021D30E0: ; 0x021D30E0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + mov r0, #0 + ldr r6, _021D3134 ; =0x00000BB8 + ldr r5, _021D3138 ; =0x021D33FC + str r1, [sp, #4] + str r0, [sp, #8] +_021D30F0: + ldr r0, [sp] + ldr r1, [r5, #0] + blx r1 + add r4, r0, #0 + ldr r0, [sp] + ldr r3, [r5, #4] + mov r1, #0x33 + add r2, r4, #0 + blx r3 + add r7, r0, #0 + cmp r6, r4 + bhi _021D310C + bl sub_02022974 +_021D310C: + ldr r1, [sp, #4] + add r0, r7, #0 + add r2, r4, #0 + bl sub_020C4C14 + add r0, r7, #0 + bl sub_020181C4 + ldr r0, [sp, #4] + sub r6, r6, r4 + add r0, r0, r4 + str r0, [sp, #4] + ldr r0, [sp, #8] + add r5, #0xc + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #0xa + blt _021D30F0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3134: .word 0x00000BB8 +_021D3138: .word 0x021D33FC + thumb_func_end ov59_021D30E0 + + thumb_func_start ov59_021D313C +ov59_021D313C: ; 0x021D313C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x68 + str r0, [sp] + ldr r0, _021D3280 ; =0x00000BB8 + str r1, [sp, #4] + str r0, [sp, #0x14] + mov r0, #0x33 + str r0, [sp, #0x50] + ldr r0, [sp] + mov r7, #0 + str r0, [sp, #0x54] + bl sub_0203608C + add r5, r7, #0 + str r0, [sp, #0x5c] + mov r0, #5 + str r0, [sp, #0x58] + add r0, sp, #0x3c + str r0, [sp, #0x60] + add r0, sp, #0x28 + ldr r4, _021D3284 ; =0x021D33FC + str r0, [sp, #0x64] + str r5, [sp, #0x1c] + str r5, [sp, #0x20] + str r5, [sp, #0x24] +_021D316E: + ldr r0, [sp] + ldr r1, [r4, #0] + blx r1 + ldr r1, [sp, #0x1c] + add r5, r5, #1 + add r0, r1, r0 + add r4, #0xc + str r0, [sp, #0x1c] + cmp r5, #2 + blt _021D316E + ldr r4, _021D3284 ; =0x021D33FC + mov r5, #0 +_021D3186: + ldr r0, [sp] + ldr r1, [r4, #0] + blx r1 + ldr r1, [sp, #0x20] + add r5, r5, #1 + add r0, r1, r0 + add r4, #0xc + str r0, [sp, #0x20] + cmp r5, #3 + blt _021D3186 + ldr r4, _021D3284 ; =0x021D33FC + mov r5, #0 +_021D319E: + ldr r0, [sp] + ldr r1, [r4, #0] + blx r1 + ldr r1, [sp, #0x24] + add r5, r5, #1 + add r0, r1, r0 + add r4, #0xc + str r0, [sp, #0x24] + cmp r5, #4 + blt _021D319E + mov r0, #0 + str r0, [sp, #8] + ldr r0, _021D3284 ; =0x021D33FC + str r0, [sp, #0x10] + add r0, sp, #0x1c + str r0, [sp, #0xc] +_021D31BE: + ldr r1, [sp, #0x10] + ldr r0, [sp] + ldr r1, [r1, #0] + blx r1 + ldr r1, [sp, #0x14] + str r0, [sp, #0x18] + cmp r1, r0 + bhi _021D31D2 + bl sub_02022974 +_021D31D2: + mov r6, #0 + ldr r4, [sp, #4] + add r5, r6, #0 +_021D31D8: + add r0, r6, #0 + bl sub_02032EE8 + cmp r0, #0 + beq _021D31EA + ldr r0, [sp, #0x60] + add r1, r4, r7 + str r1, [r0, r5] + b _021D31F0 +_021D31EA: + ldr r1, [sp, #0x60] + mov r0, #0 + str r0, [r1, r5] +_021D31F0: + mov r0, #0x2f + lsl r0, r0, #6 + add r6, r6, #1 + add r4, r4, r0 + add r5, r5, #4 + cmp r6, #5 + blt _021D31D8 + ldr r0, [sp, #8] + cmp r0, #7 + beq _021D320C + cmp r0, #8 + beq _021D320C + cmp r0, #9 + bne _021D323E +_021D320C: + mov r6, #0 + ldr r4, [sp, #4] + add r5, r6, #0 +_021D3212: + add r0, r6, #0 + bl sub_02032EE8 + cmp r0, #0 + beq _021D322A + ldr r0, [sp, #0xc] + sub r0, #0x1c + ldr r0, [r0, #0] + add r1, r4, r0 + ldr r0, [sp, #0x64] + str r1, [r0, r5] + b _021D3230 +_021D322A: + ldr r1, [sp, #0x64] + mov r0, #0 + str r0, [r1, r5] +_021D3230: + mov r0, #0x2f + lsl r0, r0, #6 + add r6, r6, #1 + add r4, r4, r0 + add r5, r5, #4 + cmp r6, #5 + blt _021D3212 +_021D323E: + ldr r0, [sp, #0x10] + ldr r1, [r0, #8] + cmp r1, #0 + beq _021D324A + add r0, sp, #0x50 + blx r1 +_021D324A: + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + add r7, r7, r0 + sub r0, r1, r0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + add r0, #0xc + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #0xa + blo _021D31BE + ldr r0, [sp] + bl sub_0202440C + add r4, r0, #0 + bl sub_0202E2EC + add r0, r4, #0 + bl sub_0202E35C + add sp, #0x68 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3280: .word 0x00000BB8 +_021D3284: .word 0x021D33FC + thumb_func_end ov59_021D313C + + .rodata + + + .global Unk_ov59_021D33FC +Unk_ov59_021D33FC: ; 0x021D33FC + .incbin "incbin/overlay59_rodata.bin", 0x174, 0x78 + diff --git a/asm/ov5_021D0D80.s b/asm/ov5_021D0D80.s new file mode 100644 index 000000000..f738a4a13 --- /dev/null +++ b/asm/ov5_021D0D80.s @@ -0,0 +1,1608 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D0D80 +ov5_021D0D80: ; 0x021D0D80 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0201C2B8 + bl sub_0201DCAC + bl sub_0200A858 + ldr r0, [r4, #0x38] + bl sub_0206285C + bl ov5_021EDC8C + bl sub_02020D68 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D0D80 + + thumb_func_start ov5_021D0DA4 +ov5_021D0DA4: ; 0x021D0DA4 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r6, #0 + bl sub_02006840 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #3 + bls _021D0DB8 + b _021D0F44 +_021D0DB8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D0DC4: ; jump table + .short _021D0DCC - _021D0DC4 - 2 ; case 0 + .short _021D0EB4 - _021D0DC4 - 2 ; case 1 + .short _021D0F32 - _021D0DC4 - 2 ; case 2 + .short _021D0F38 - _021D0DC4 - 2 ; case 3 +_021D0DCC: + add r0, r6, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + ldr r1, _021D0F50 ; =0x04000050 + add r0, r6, #0 + strh r0, [r1] + ldr r1, _021D0F54 ; =0x04001050 + strh r0, [r1] + bl sub_0200F32C + mov r0, #1 + bl sub_0200F32C + add r0, r4, #0 + bl ov5_021D173C + add r0, r4, #0 + bl sub_020531A0 + ldr r0, [r4, #0x74] + ldr r0, [r0, #0] + lsl r0, r0, #8 + lsr r0, r0, #0x1c + beq _021D0E3A + ldr r0, _021D0F58 ; =0x00000006 + mov r1, #2 + bl sub_02006590 + add r0, r4, #0 + bl ov5_021D1178 + cmp r0, #0 + beq _021D0E1E + cmp r0, #1 + beq _021D0E28 + cmp r0, #2 + beq _021D0E32 + b _021D0E3A +_021D0E1E: + ldr r0, _021D0F5C ; =0x00000008 + mov r1, #2 + bl sub_02006590 + b _021D0E3A +_021D0E28: + ldr r0, _021D0F60 ; =0x00000007 + mov r1, #2 + bl sub_02006590 + b _021D0E3A +_021D0E32: + ldr r0, _021D0F64 ; =0x00000009 + mov r1, #2 + bl sub_02006590 +_021D0E3A: + ldr r2, [r4, #0x74] + mov r0, #3 + ldr r2, [r2, #4] + mov r1, #4 + bl sub_02017FC8 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021D0E50 + bl sub_02022974 +_021D0E50: + mov r0, #4 + mov r1, #0x28 + bl sub_02018144 + mov r1, #0 + mov r2, #0x28 + str r0, [r4, #4] + bl sub_020C4CF4 + add r0, r4, #0 + mov r1, #4 + mov r2, #8 + bl ov5_021D1A94 + ldr r1, [r4, #4] + str r0, [r1, #4] + bl ov5_021D1414 + mov r0, #0x80 + mov r1, #4 + bl sub_0201DBEC + mov r0, #4 + add r1, r0, #0 + bl sub_02020B90 + mov r0, #4 + bl sub_0201CAF4 + bl ov5_021D15B4 + bl ov5_021D154C + bl sub_0201FFE8 + mov r0, #4 + bl sub_02018340 + str r0, [r4, #8] + bl ov5_021D1444 + mov r0, #0 + mov r1, #1 + bl sub_0205D8CC + add r0, r4, #0 + mov r1, #4 + bl sub_0203F5C0 + b _021D0F44 +_021D0EB4: + bl ov5_021D1790 + ldr r0, [r4, #0x30] + bl ov5_021EF7A0 + mov r0, #4 + bl ov5_021E15F4 + add r1, r4, #0 + add r1, #0xa4 + str r0, [r1, #0] + add r0, r4, #0 + bl ov5_021F0824 + add r0, r4, #0 + bl ov5_021D17EC + add r0, r4, #0 + bl ov5_021D1878 + add r0, r4, #0 + bl ov5_021D1968 + ldr r0, [r4, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + beq _021D0EFE + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A74C + add r1, r0, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #0xc] + bl ov5_021D5F24 +_021D0EFE: + ldr r1, [r4, #0x1c] + add r0, r4, #0 + ldr r1, [r1, #0] + bl sub_020556A0 + add r0, r4, #0 + mov r1, #3 + bl sub_0203F5C0 + mov r0, #4 + bl ov5_021EF3A8 + ldr r1, [r4, #4] + str r0, [r1, #0x1c] + ldr r0, [r4, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r4, #4] + mov r0, #4 + ldr r1, [r1, #0x1c] + bl ov5_021EF4BC + ldr r1, [r4, #4] + str r0, [r1, #0x20] + b _021D0F44 +_021D0F32: + bl ov5_021D5BD8 + b _021D0F44 +_021D0F38: + bl ov5_021D5BF4 + cmp r0, #0 + beq _021D0F44 + mov r6, #1 + str r6, [r4, #0x68] +_021D0F44: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + add r0, r6, #0 + pop {r4, r5, r6, pc} + nop +_021D0F50: .word 0x04000050 +_021D0F54: .word 0x04001050 +_021D0F58: .word 0x00000006 +_021D0F5C: .word 0x00000008 +_021D0F60: .word 0x00000007 +_021D0F64: .word 0x00000009 + thumb_func_end ov5_021D0DA4 + + thumb_func_start ov5_021D0F68 +ov5_021D0F68: ; 0x021D0F68 + push {r4, lr} + bl sub_02006840 + add r4, r0, #0 + bl ov5_021D119C + cmp r0, #0 + beq _021D0F94 + add r0, r4, #0 + bl sub_02055D94 + add r0, r4, #0 + bl ov5_021D13B4 + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov5_021EA714 + add r0, r4, #0 + bl ov5_021D11CC +_021D0F94: + add r1, r4, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r0, r4, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov5_021D134C + ldr r0, [r4, #0x68] + cmp r0, #0 + beq _021D0FAE + mov r0, #0 + pop {r4, pc} +_021D0FAE: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D0F68 + + thumb_func_start ov5_021D0FB4 +ov5_021D0FB4: ; 0x021D0FB4 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_02006840 + add r4, r0, #0 + ldr r1, [r4, #0x28] + bl ov5_021E8188 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D0FD6 + cmp r0, #1 + beq _021D1076 + cmp r0, #2 + bne _021D0FD4 + b _021D10FE +_021D0FD4: + b _021D1164 +_021D0FD6: + add r0, r4, #0 + bl sub_02068368 + ldr r0, [r4, #0x28] + bl ov5_021E9338 + ldr r0, [r4, #0x3c] + bl sub_0205EABC + ldr r1, [r4, #0x1c] + str r0, [r1, #8] + ldr r0, [r4, #0x3c] + bl sub_0205EAC8 + ldr r1, [r4, #0x1c] + str r0, [r1, #0xc] + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + ldr r1, [r4, #0x1c] + str r0, [r1, #0x10] + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + bl ov5_021EF300 + ldr r0, [r4, #0x50] + cmp r0, #0 + bne _021D1014 + bl sub_02022974 +_021D1014: + ldr r0, [r4, #0x28] + bl ov5_021E924C + ldr r0, [r4, #0x50] + bl ov5_021D3CAC + ldr r0, [r4, #0x50] + bl ov5_021D3D7C + add r0, r4, #0 + add r0, #0x54 + bl ov5_021D41B4 + ldr r0, [r4, #4] + ldr r0, [r0, #0x10] + bl ov5_021D5E8C + ldr r0, [r4, #4] + ldr r0, [r0, #0x10] + bl ov5_021D5EAC + ldr r0, [r4, #4] + mov r1, #0 + str r1, [r0, #0x10] + ldr r0, [r4, #0x38] + bl sub_02061BF0 + ldr r0, [r4, #0x38] + bl ov5_021ECC78 + ldr r0, [r4, #0x38] + bl sub_02062C30 + ldr r0, [r4, #0x40] + bl ov5_021DF500 + ldr r0, [r4, #0x34] + bl ov5_021D1A70 + mov r0, #0 + str r0, [r4, #0x34] + add r4, #0xa4 + ldr r0, [r4, #0] + bl ov5_021E1608 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D1164 +_021D1076: + ldr r0, [r4, #0x28] + bl ov5_021E9300 + cmp r0, #1 + bne _021D1164 + add r0, r4, #0 + add r0, #0x30 + bl ov5_021EFA10 + ldr r0, [r4, #0x28] + bl ov5_021E92E4 + add r0, r4, #0 + add r0, #0xa8 + bl ov5_021EFB30 + add r0, r4, #0 + bl ov5_021D5BA8 + add r0, r4, #0 + add r0, #0x4c + bl ov5_021D5278 + ldr r0, [r4, #0x64] + bl ov5_021E1B20 + ldr r0, [r4, #4] + ldr r0, [r0, #8] + bl ov5_021DD9C8 + ldr r0, [r4, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + beq _021D10BE + bl ov5_021D5EF8 +_021D10BE: + ldr r0, [r4, #4] + ldr r0, [r0, #0x20] + bl ov5_021EF4F8 + ldr r0, [r4, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3BC + ldr r0, [r4, #4] + ldr r0, [r0, #0x18] + bl sub_02055CBC + add r0, r4, #0 + add r0, #0x48 + bl ov5_021D57D8 + add r0, r4, #0 + add r0, #0x44 + bl ov5_021D5894 + bl ov5_021D1570 + ldr r0, [r4, #8] + bl ov5_021D1524 + add r0, r4, #0 + bl ov5_021D5C14 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D1164 +_021D10FE: + add r0, r4, #0 + bl ov5_021D5C30 + cmp r0, #0 + beq _021D1164 + bl ov5_021D15E8 + bl sub_02020BD0 + bl sub_0201DC3C + bl sub_0201CBA0 + ldr r0, [r4, #4] + ldr r0, [r0, #4] + bl ov5_021D1AE4 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + ldr r0, [r4, #8] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] + mov r0, #4 + bl sub_0201807C + ldr r0, [r4, #0x74] + ldr r0, [r0, #0] + lsl r0, r0, #8 + lsr r0, r0, #0x1c + beq _021D1160 + ldr r0, _021D1168 ; =0x00000006 + bl sub_02006514 + ldr r0, _021D116C ; =0x00000008 + bl sub_02006514 + ldr r0, _021D1170 ; =0x00000007 + bl sub_02006514 + ldr r0, _021D1174 ; =0x00000009 + bl sub_02006514 +_021D1160: + mov r0, #1 + pop {r3, r4, r5, pc} +_021D1164: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1168: .word 0x00000006 +_021D116C: .word 0x00000008 +_021D1170: .word 0x00000007 +_021D1174: .word 0x00000009 + thumb_func_end ov5_021D0FB4 + + thumb_func_start ov5_021D1178 +ov5_021D1178: ; 0x021D1178 + push {r3, lr} + bl sub_0203D174 + bl sub_02027860 + bl sub_02027F80 + cmp r0, #0 + bne _021D118E + mov r0, #1 + pop {r3, pc} +_021D118E: + cmp r0, #9 + bne _021D1196 + mov r0, #2 + pop {r3, pc} +_021D1196: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D1178 + + thumb_func_start ov5_021D119C +ov5_021D119C: ; 0x021D119C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + ldr r2, [r5, #0x1c] + ldr r1, [r2, #8] + cmp r4, r1 + bne _021D11BC + ldr r1, [r2, #0xc] + cmp r0, r1 + beq _021D11C6 +_021D11BC: + str r4, [r2, #8] + ldr r1, [r5, #0x1c] + str r0, [r1, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D11C6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D119C + + thumb_func_start ov5_021D11CC +ov5_021D11CC: ; 0x021D11CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D11E0 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D11E0: + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #0x28] + bl ov5_021EA6AC + sub r1, r4, r0 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r6, r0, #5 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r4, r0, #0 + ldr r0, [r5, #0x28] + bl ov5_021EA6B4 + sub r1, r4, r0 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r2, r0, #5 + ldr r0, [r5, #0x2c] + add r1, r6, #0 + bl sub_02039E30 + add r4, r0, #0 + ldr r0, [r5, #0x1c] + ldr r6, [r0, #0] + cmp r4, r6 + bne _021D1228 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D1228: + ldr r0, [r5, #0xc] + bl sub_0203A790 + add r7, r0, #0 + ldr r0, [r5, #0x1c] + add r1, r4, #0 + str r4, [r0, #0] + add r0, r5, #0 + bl sub_0203A3B0 + add r0, r5, #0 + mov r1, #1 + bl sub_020531C0 + add r0, r5, #0 + bl sub_0203A4B4 + str r0, [sp, #4] + add r0, r5, #0 + bl sub_0203A4BC + str r0, [sp] + ldr r0, [r5, #0x38] + ldr r3, [sp, #4] + add r1, r6, #0 + add r2, r4, #0 + bl sub_0206184C + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + bl sub_02069434 + ldr r1, [r5, #0x1c] + add r0, r5, #0 + ldr r1, [r1, #0] + bl sub_02055428 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #1 + bl sub_02055554 + add r0, r5, #0 + bl sub_0203A418 + ldr r0, [r5, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + beq _021D129C + add r0, r7, #0 + bl sub_0203A74C + add r1, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0xc] + bl ov5_021D5F7C +_021D129C: + add r0, r6, #0 + bl sub_0203A138 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0203A138 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0203A154 + add r2, r0, #0 + cmp r7, r6 + beq _021D12C8 + cmp r2, #0 + beq _021D12BE + sub r2, r2, #1 +_021D12BE: + ldr r0, [r5, #4] + add r1, r6, #0 + ldr r0, [r0, #8] + bl ov5_021DD9E8 +_021D12C8: + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D11CC + + thumb_func_start ov5_021D12D0 +ov5_021D12D0: ; 0x021D12D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x1c] + add r4, r1, #0 + ldr r6, [r0, #0] + ldr r0, [r5, #0xc] + bl sub_0203A790 + add r7, r0, #0 + ldr r0, [r5, #0x1c] + add r1, r4, #0 + str r4, [r0, #0] + add r0, r5, #0 + bl sub_0203A3B0 + add r0, r5, #0 + mov r1, #1 + bl sub_020532A8 + add r0, r5, #0 + bl sub_0203A4B4 + str r0, [sp, #4] + add r0, r5, #0 + bl sub_0203A4BC + str r0, [sp] + ldr r0, [r5, #0x38] + ldr r3, [sp, #4] + add r1, r6, #0 + add r2, r4, #0 + bl sub_0206184C + ldr r1, [r5, #0x1c] + add r0, r5, #0 + ldr r1, [r1, #0] + bl sub_02055428 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #1 + bl sub_02055554 + add r0, r5, #0 + bl sub_0203A418 + ldr r0, [r5, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + beq _021D1346 + add r0, r7, #0 + bl sub_0203A74C + add r1, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0xc] + bl ov5_021D5F7C +_021D1346: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D12D0 + + thumb_func_start ov5_021D134C +ov5_021D134C: ; 0x021D134C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020509A4 + cmp r0, #0 + bne _021D1360 + add r0, r5, #0 + bl sub_020559DC +_021D1360: + ldr r0, [r5, #0x4c] + bl ov5_021D5298 + add r0, r5, #0 + bl ov5_021E1B68 + mov r0, #1 + tst r0, r4 + beq _021D137A + ldr r0, [r5, #4] + ldr r0, [r0, #0x10] + bl ov5_021D5DEC +_021D137A: + mov r0, #8 + tst r0, r4 + beq _021D1386 + ldr r0, [r5, #0x50] + bl ov5_021D3F10 +_021D1386: + mov r0, #2 + tst r0, r4 + beq _021D13A4 + ldr r1, [r5, #0x28] + add r0, r5, #0 + bl ov5_021E8188 + add r0, r5, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D13A4 + add r0, r5, #0 + bl ov9_0224CA5C +_021D13A4: + mov r0, #4 + tst r0, r4 + beq _021D13B0 + add r0, r5, #0 + bl ov5_021D15F4 +_021D13B0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D134C + + thumb_func_start ov5_021D13B4 +ov5_021D13B4: ; 0x021D13B4 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A24C + cmp r0, #0 + beq _021D1412 + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A76C + add r7, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0205EABC + add r5, r0, #0 + ldr r0, [r4, #0x28] + bl ov5_021EA6AC + sub r1, r5, r0 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r6, r0, #5 + ldr r0, [r4, #0x3c] + bl sub_0205EAC8 + add r5, r0, #0 + ldr r0, [r4, #0x28] + bl ov5_021EA6B4 + sub r1, r5, r0 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r5, r0, #5 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r3, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + bl sub_02055740 +_021D1412: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D13B4 + + thumb_func_start ov5_021D1414 +ov5_021D1414: ; 0x021D1414 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D1430 ; =0x021F8988 + add r3, sp, #0 + mov r2, #5 +_021D141E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D141E + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D1430: .word 0x021F8988 + thumb_func_end ov5_021D1414 + + thumb_func_start ov5_021D1434 +ov5_021D1434: ; 0x021D1434 + ldr r3, _021D1438 ; =ov5_021D1444 + bx r3 + ; .align 2, 0 +_021D1438: .word ov5_021D1444 + thumb_func_end ov5_021D1434 + + thumb_func_start ov5_021D143C +ov5_021D143C: ; 0x021D143C + ldr r3, _021D1440 ; =ov5_021D1524 + bx r3 + ; .align 2, 0 +_021D1440: .word ov5_021D1524 + thumb_func_end ov5_021D143C + + thumb_func_start ov5_021D1444 +ov5_021D1444: ; 0x021D1444 + push {r3, r4, r5, lr} + sub sp, #0x68 + ldr r5, _021D1514 ; =0x021F8924 + add r3, sp, #0x58 + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D1518 ; =0x021F8950 + add r3, sp, #0x3c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + ldr r5, _021D151C ; =0x021F8934 + add r3, sp, #0x20 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + ldr r5, _021D1520 ; =0x021F896C + add r3, sp, #4 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r0, #0 + add r1, sp, #0 + strh r0, [r1] + mov r1, #2 + bl sub_020C2C54 + add r0, sp, #0 + mov r1, #0 + mov r2, #2 + bl sub_020C00B4 + add sp, #0x68 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1514: .word 0x021F8924 +_021D1518: .word 0x021F8950 +_021D151C: .word 0x021F8934 +_021D1520: .word 0x021F896C + thumb_func_end ov5_021D1444 + + thumb_func_start ov5_021D1524 +ov5_021D1524: ; 0x021D1524 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xf + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #3 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D1524 + + thumb_func_start ov5_021D154C +ov5_021D154C: ; 0x021D154C + push {lr} + sub sp, #0x14 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7c + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x1f + str r3, [sp, #0xc] + mov r2, #4 + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + add sp, #0x14 + pop {pc} + thumb_func_end ov5_021D154C + + thumb_func_start ov5_021D1570 +ov5_021D1570: ; 0x021D1570 + ldr r3, _021D1574 ; =sub_0200A878 + bx r3 + ; .align 2, 0 +_021D1574: .word sub_0200A878 + thumb_func_end ov5_021D1570 + + thumb_func_start ov5_021D1578 +ov5_021D1578: ; 0x021D1578 + push {r4, lr} + mov r1, #0 + add r4, r0, #0 + add r2, r1, #0 + bl ov5_021D5ADC + add r0, r4, #0 + mov r1, #2 + mov r2, #0 + bl ov5_021D5AF0 + add r0, r4, #0 + mov r1, #0x1f + mov r2, #0 + bl ov5_021D5B04 + mov r1, #2 + add r0, r4, #0 + lsl r1, r1, #0xe + mov r2, #1 + mov r3, #0 + bl ov5_021D5B18 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0x16 + bl ov5_021D58A8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D1578 + + thumb_func_start ov5_021D15B4 +ov5_021D15B4: ; 0x021D15B4 + push {r4, lr} + sub sp, #0x10 + ldr r4, _021D15E4 ; =0x021F8914 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #0x10 + add r0, r2, #0 + add r2, r1, #0 + bl sub_0201E88C + mov r0, #0x14 + mov r1, #4 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_021D15E4: .word 0x021F8914 + thumb_func_end ov5_021D15B4 + + thumb_func_start ov5_021D15E8 +ov5_021D15E8: ; 0x021D15E8 + push {r3, lr} + bl sub_0201E958 + bl sub_0201F8B4 + pop {r3, pc} + thumb_func_end ov5_021D15E8 + + thumb_func_start ov5_021D15F4 +ov5_021D15F4: ; 0x021D15F4 + push {r3, r4, r5, lr} + sub sp, #0x80 + add r4, r0, #0 + bl sub_020241B4 + ldr r0, [r4, #0x20] + cmp r0, #1 + bne _021D161A + add r0, r4, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D1614 + add r0, r4, #0 + bl ov9_02249F9C +_021D1614: + bl sub_0202049C + b _021D161E +_021D161A: + bl sub_020203EC +_021D161E: + add r0, r4, #0 + bl sub_0206979C + ldr r0, [r4, #0x28] + ldr r1, [r4, #0x44] + bl ov5_021E91FC + add r0, r4, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D163C + add r0, r4, #0 + bl ov9_0224CA50 +_021D163C: + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r4, #0x30] + bl ov5_021E1A6C + ldr r5, _021D16E8 ; =0x021C5A94 + add r3, sp, #0x40 + mov r2, #8 +_021D164E: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D164E + add r5, sp, #0x40 + add r3, sp, #0 + mov r2, #8 +_021D165C: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D165C + ldr r3, [sp, #0x28] + ldr r1, [sp, #0x38] + asr r0, r3, #0x1f + lsr r2, r3, #0x12 + lsl r0, r0, #0xe + orr r0, r2 + mov r2, #2 + lsl r5, r3, #0xe + mov r3, #0 + lsl r2, r2, #0xa + add r2, r5, r2 + adc r0, r3 + lsl r0, r0, #0x14 + lsr r2, r2, #0xc + orr r2, r0 + add r0, r1, r2 + str r0, [sp, #0x38] + ldr r1, _021D16E8 ; =0x021C5A94 + add r0, sp, #0 + mov r2, #0x40 + bl sub_020C4C14 + ldr r1, _021D16EC ; =0x021C5B0C + mov r0, #0x50 + ldr r2, [r1, #0x7c] + bic r2, r0 + str r2, [r1, #0x7c] + bl sub_020AF480 + ldr r0, [r4, #0x40] + bl ov5_021DF4F8 + bl sub_02020C08 + add r0, r4, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D16B8 + add r0, r4, #0 + bl ov9_02250780 +_021D16B8: + ldr r1, _021D16E8 ; =0x021C5A94 + add r0, sp, #0x40 + mov r2, #0x40 + bl sub_020C4C14 + ldr r1, _021D16EC ; =0x021C5B0C + mov r0, #0x50 + ldr r2, [r1, #0x7c] + bic r2, r0 + str r2, [r1, #0x7c] + bl sub_020AF480 + ldr r0, [r4, #4] + ldr r0, [r0, #4] + bl ov5_021D1B18 + ldr r1, _021D16F0 ; =0x02100844 + mov r0, #0 + ldr r1, [r1, #0] + bl sub_020241BC + add sp, #0x80 + pop {r3, r4, r5, pc} + nop +_021D16E8: .word 0x021C5A94 +_021D16EC: .word 0x021C5B0C +_021D16F0: .word 0x02100844 + thumb_func_end ov5_021D15F4 + + thumb_func_start ov5_021D16F4 +ov5_021D16F4: ; 0x021D16F4 + cmp r1, #1 + bne _021D1708 + add r1, r0, #0 + add r1, #0xc0 + ldr r2, [r1, #0] + mov r1, #4 + orr r1, r2 + add r0, #0xc0 + str r1, [r0, #0] + bx lr +_021D1708: + add r1, r0, #0 + add r1, #0xc0 + ldr r2, [r1, #0] + mov r1, #4 + bic r2, r1 + add r0, #0xc0 + str r2, [r0, #0] + bx lr + thumb_func_end ov5_021D16F4 + + thumb_func_start ov5_021D1718 +ov5_021D1718: ; 0x021D1718 + cmp r1, #1 + bne _021D172C + add r1, r0, #0 + add r1, #0xc0 + ldr r2, [r1, #0] + mov r1, #1 + orr r1, r2 + add r0, #0xc0 + str r1, [r0, #0] + bx lr +_021D172C: + add r1, r0, #0 + add r1, #0xc0 + ldr r2, [r1, #0] + mov r1, #1 + bic r2, r1 + add r0, #0xc0 + str r2, [r0, #0] + bx lr + thumb_func_end ov5_021D1718 + + thumb_func_start ov5_021D173C +ov5_021D173C: ; 0x021D173C + mov r1, #0xf + add r0, #0xc0 + str r1, [r0, #0] + bx lr + thumb_func_end ov5_021D173C + + thumb_func_start ov5_021D1744 +ov5_021D1744: ; 0x021D1744 + push {lr} + sub sp, #0xc + cmp r0, #1 + bne _021D1766 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} +_021D1766: + cmp r0, #0 + bne _021D1786 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} +_021D1786: + bl sub_02022974 + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov5_021D1744 + + thumb_func_start ov5_021D1790 +ov5_021D1790: ; 0x021D1790 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _021D17E4 ; =0x02100844 + ldr r0, [r0, #0] + lsl r1, r0, #1 + ldr r0, _021D17E8 ; =0x04000540 + str r1, [r0, #0] + bl ov5_021D38B8 + str r0, [r5, #0x50] + bl ov5_021D4194 + str r0, [r5, #0x54] + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A038 + ldr r1, [r5, #0x50] + bl ov5_021EF76C + str r0, [r5, #0x30] + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A04C + add r4, r0, #0 + ldr r0, [r5, #0x34] + cmp r0, #0 + beq _021D17D6 + bl sub_02022974 +_021D17D6: + mov r0, #4 + add r1, r4, #0 + bl ov5_021D1A14 + str r0, [r5, #0x34] + pop {r3, r4, r5, pc} + nop +_021D17E4: .word 0x02100844 +_021D17E8: .word 0x04000540 + thumb_func_end ov5_021D1790 + + thumb_func_start ov5_021D17EC +ov5_021D17EC: ; 0x021D17EC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x2c] + ldr r1, [r4, #0x30] + ldr r2, [r4, #0x50] + ldr r3, [r4, #0x60] + bl ov5_021E9084 + str r0, [r4, #0x28] + add r0, r4, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D183C + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #4] + str r0, [sp] + ldr r0, [r4, #0x1c] + add r1, sp, #8 + ldr r0, [r0, #0] + add r2, sp, #4 + add r3, sp, #0 + bl ov9_02251094 + ldr r0, [r4, #0x28] + ldr r1, [sp, #8] + ldr r2, [sp, #4] + ldr r3, [sp] + bl ov5_021EA678 + ldr r0, [r4, #0x28] + mov r1, #1 + bl ov5_021EA6A4 + ldr r0, [r4, #0x28] + mov r1, #1 + bl ov5_021EA6D0 +_021D183C: + mov r0, #8 + mov r1, #4 + bl ov5_021EF28C + add r1, r4, #0 + add r1, #0xa0 + str r0, [r1, #0] + bl ov5_021EFB0C + add r1, r4, #0 + add r1, #0xa8 + str r0, [r1, #0] + ldr r0, [r4, #0x70] + cmp r0, #0 + bne _021D1864 + ldr r0, [r4, #0x28] + ldr r1, _021D1874 ; =ov5_021F0030 + add r2, r4, #0 + bl ov5_021E9630 +_021D1864: + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0x28] + ldr r1, [r2, #8] + ldr r2, [r2, #0xc] + bl ov5_021E9150 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021D1874: .word ov5_021F0030 + thumb_func_end ov5_021D17EC + + thumb_func_start ov5_021D1878 +ov5_021D1878: ; 0x021D1878 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r1, #0x22 + mov r2, #4 + bl ov5_021DF440 + str r0, [r5, #0x40] + add r0, r5, #0 + mov r4, #0x50 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D1896 + mov r4, #0x70 +_021D1896: + ldr r0, [r5, #0x40] + add r1, r4, #0 + bl ov5_021DF47C + mov r2, #0x20 + str r2, [sp] + mov r0, #5 + str r2, [sp, #4] + lsl r0, r0, #0xc + str r0, [sp, #8] + lsl r0, r2, #6 + str r0, [sp, #0xc] + lsl r0, r2, #0xb + str r0, [sp, #0x10] + ldr r0, [r5, #0x40] + mov r1, #4 + add r3, r2, #0 + bl ov5_021DF488 + ldr r0, [r5, #0x70] + sub r0, r0, #1 + cmp r0, #1 + bhi _021D18CC + ldr r0, [r5, #0x38] + mov r1, #0 + bl sub_02062CCC +_021D18CC: + ldr r0, [r5, #0x70] + cmp r0, #1 + bne _021D18D6 + ldr r1, _021D195C ; =0x021FF7D0 + b _021D18E6 +_021D18D6: + add r0, r5, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D18E4 + ldr r1, _021D1960 ; =0x021FF6B8 + b _021D18E6 +_021D18E4: + ldr r1, _021D1964 ; =0x021FF744 +_021D18E6: + ldr r0, [r5, #0x40] + bl ov5_021DF4C8 + ldr r0, [r5, #0x70] + mov r4, #0xa + cmp r0, #2 + bne _021D18F6 + mov r4, #5 +_021D18F6: + ldr r0, [r5, #0x34] + bl ov5_021D1A6C + add r6, r0, #0 + ldr r0, [r5, #0x34] + bl ov5_021D1A68 + str r4, [sp] + add r3, r0, #0 + ldr r0, [r5, #0x38] + mov r1, #0x20 + add r2, r6, #3 + bl ov5_021ECC20 + ldr r0, [r5, #0x40] + bl ov5_021F1328 + add r0, r5, #0 + bl sub_0203D174 + bl sub_02027860 + bl sub_02027F80 + add r1, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205E884 + ldr r0, [r5, #0x38] + bl sub_02061C48 + bl sub_020595A4 + ldr r0, [r5, #0x38] + bl sub_02062C3C + ldr r0, [r5, #0x3c] + bl sub_0205EAFC + ldr r1, [r5, #0x28] + bl ov5_021E931C + add r0, r5, #0 + mov r1, #4 + bl sub_02055C8C + ldr r1, [r5, #4] + str r0, [r1, #0x18] + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_021D195C: .word 0x021FF7D0 +_021D1960: .word 0x021FF6B8 +_021D1964: .word 0x021FF744 + thumb_func_end ov5_021D1878 + + thumb_func_start ov5_021D1968 +ov5_021D1968: ; 0x021D1968 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + bl sub_0201FFD0 + bl ov5_021D5878 + str r0, [r4, #0x44] + bl ov5_021D1578 + bl ov5_021D57BC + str r0, [r4, #0x48] + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A770 + add r5, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0205EAFC + add r1, r4, #0 + add r2, r5, #0 + mov r3, #1 + bl ov5_021D5B40 + ldr r0, [r4, #0x30] + bl ov5_021EFAD8 + add r1, r0, #0 + ldr r0, [r4, #0x44] + bl ov5_021D521C + str r0, [r4, #0x4c] + add r0, r4, #0 + bl ov5_021D1A78 + cmp r0, #1 + bne _021D19C6 + ldr r0, [r4, #4] + mov r1, #0 + str r1, [r0, #0xc] + b _021D19D0 +_021D19C6: + add r0, r4, #0 + bl ov5_021D5EB8 + ldr r1, [r4, #4] + str r0, [r1, #0xc] +_021D19D0: + ldr r0, [r4, #8] + bl ov5_021DD98C + ldr r1, [r4, #4] + str r0, [r1, #8] + mov r0, #4 + bl ov5_021E1B08 + str r0, [r4, #0x64] + bl ov5_021D5CB0 + ldr r1, [r4, #4] + str r0, [r1, #0x10] + ldr r0, [r4, #0x30] + bl ov5_021EFA8C + add r1, r0, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #0x10] + bl ov5_021D5CE4 + add r0, r4, #0 + bl sub_02068344 + add r0, r4, #0 + bl ov5_021EE7C0 + ldr r0, _021D1A10 ; =ov5_021D0D80 + add r1, r4, #0 + bl sub_02017798 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D1A10: .word ov5_021D0D80 + thumb_func_end ov5_021D1968 + + thumb_func_start ov5_021D1A14 +ov5_021D1A14: ; 0x021D1A14 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + mov r1, #0x64 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0x60 + add r1, r6, #0 + add r2, r5, #0 + bl sub_02006ADC + ldr r1, _021D1A64 ; =0x0000FFFF + mov r2, #0 + add r3, r4, #0 +_021D1A32: + add r2, r2, #1 + str r1, [r3, #4] + add r3, r3, #4 + cmp r2, #0x18 + blt _021D1A32 + ldr r5, _021D1A64 ; =0x0000FFFF + mov r3, #0 + add r1, r0, #0 + add r2, r4, #0 +_021D1A44: + ldrh r6, [r1] + str r6, [r2, #4] + ldrh r6, [r1] + cmp r6, r5 + beq _021D1A58 + add r3, r3, #1 + add r1, r1, #2 + add r2, r2, #4 + cmp r3, #0x18 + blt _021D1A44 +_021D1A58: + strh r3, [r4] + bl sub_020181C4 + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_021D1A64: .word 0x0000FFFF + thumb_func_end ov5_021D1A14 + + thumb_func_start ov5_021D1A68 +ov5_021D1A68: ; 0x021D1A68 + add r0, r0, #4 + bx lr + thumb_func_end ov5_021D1A68 + + thumb_func_start ov5_021D1A6C +ov5_021D1A6C: ; 0x021D1A6C + ldrh r0, [r0] + bx lr + thumb_func_end ov5_021D1A6C + + thumb_func_start ov5_021D1A70 +ov5_021D1A70: ; 0x021D1A70 + ldr r3, _021D1A74 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021D1A74: .word sub_020181C4 + thumb_func_end ov5_021D1A70 + + thumb_func_start ov5_021D1A78 +ov5_021D1A78: ; 0x021D1A78 + push {r3, lr} + bl sub_0203D174 + bl sub_02027860 + bl sub_02027F80 + cmp r0, #9 + bne _021D1A8E + mov r0, #1 + pop {r3, pc} +_021D1A8E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D1A78 + + .rodata + + + .global Unk_ov5_021F8914 +Unk_ov5_021F8914: ; 0x021F8914 + .incbin "incbin/overlay5_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov5_021F8924 +Unk_ov5_021F8924: ; 0x021F8924 + .incbin "incbin/overlay5_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov5_021F8934 +Unk_ov5_021F8934: ; 0x021F8934 + .incbin "incbin/overlay5_rodata.bin", 0x20, 0x3C - 0x20 + + .global Unk_ov5_021F8950 +Unk_ov5_021F8950: ; 0x021F8950 + .incbin "incbin/overlay5_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov5_021F896C +Unk_ov5_021F896C: ; 0x021F896C + .incbin "incbin/overlay5_rodata.bin", 0x58, 0x74 - 0x58 + + .global Unk_ov5_021F8988 +Unk_ov5_021F8988: ; 0x021F8988 + .incbin "incbin/overlay5_rodata.bin", 0x74, 0x9C - 0x74 + + .global Unk_ov5_021F89B0 +Unk_ov5_021F89B0: ; 0x021F89B0 + .incbin "incbin/overlay5_rodata.bin", 0x9C, 0x10 + diff --git a/asm/ov5_021D1A94.s b/asm/ov5_021D1A94.s new file mode 100644 index 000000000..926c91fec --- /dev/null +++ b/asm/ov5_021D1A94.s @@ -0,0 +1,235 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D1A94 +ov5_021D1A94: ; 0x021D1A94 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #0x14 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r7, [r4, #0] + str r5, [r4, #4] + mov r0, #0x14 + add r7, r6, #0 + mul r7, r0 + str r6, [r4, #8] + add r0, r5, #0 + add r1, r7, #0 + bl sub_02018144 + str r0, [r4, #0xc] + ldr r1, [r4, #0xc] + mov r0, #0 + add r2, r7, #0 + bl sub_020C4B4C + add r0, r6, #0 + bl sub_0201CD80 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02018144 + str r0, [r4, #0x10] + ldr r1, [r4, #0x10] + add r0, r6, #0 + bl sub_0201CD88 + str r0, [r4, #0x10] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D1A94 + + thumb_func_start ov5_021D1AE4 +ov5_021D1AE4: ; 0x021D1AE4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + mov r6, #0 + cmp r0, #0 + ble _021D1B04 + add r4, r6, #0 +_021D1AF2: + ldr r0, [r5, #0xc] + add r0, r0, r4 + bl ov5_021D1BEC + ldr r0, [r5, #8] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _021D1AF2 +_021D1B04: + ldr r0, [r5, #0xc] + bl sub_020181C4 + ldr r0, [r5, #0x10] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D1AE4 + + thumb_func_start ov5_021D1B18 +ov5_021D1B18: ; 0x021D1B18 + ldr r3, _021D1B20 ; =sub_0201CDD4 + ldr r0, [r0, #0x10] + bx r3 + nop +_021D1B20: .word sub_0201CDD4 + thumb_func_end ov5_021D1B18 + + thumb_func_start ov5_021D1B24 +ov5_021D1B24: ; 0x021D1B24 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0203CD5C + cmp r0, #0 + beq _021D1B46 + ldr r0, [r4, #0xc] + ldr r3, [r0, #0x10] + cmp r3, #0 + beq _021D1B46 + ldr r1, [r4, #0] + ldr r2, [r4, #0x10] + ldr r1, [r1, #0] + add r0, r4, #0 + blx r3 +_021D1B46: + pop {r4, pc} + thumb_func_end ov5_021D1B24 + + thumb_func_start ov5_021D1B48 +ov5_021D1B48: ; 0x021D1B48 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0203CD5C + cmp r0, #0 + beq _021D1B6A + ldr r0, [r4, #0xc] + ldr r3, [r0, #0x14] + cmp r3, #0 + beq _021D1B6A + ldr r1, [r4, #0] + ldr r2, [r4, #0x10] + ldr r1, [r1, #0] + add r0, r4, #0 + blx r3 +_021D1B6A: + pop {r4, pc} + thumb_func_end ov5_021D1B48 + + thumb_func_start ov5_021D1B6C +ov5_021D1B6C: ; 0x021D1B6C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r2, [r5, #8] + add r6, r1, #0 + mov r1, #0 + ldr r4, [r5, #0xc] + cmp r2, #0 + ble _021D1BDC +_021D1B7C: + ldr r0, [r4, #4] + cmp r0, #0 + bne _021D1BD4 + ldr r0, _021D1BE4 ; =ov5_021D1B24 + ldr r2, [r6, #0] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + ldr r0, [r5, #0x10] + ldr r1, _021D1BE8 ; =ov5_021D1B48 + ldr r3, [r6, #0] + add r2, r4, #0 + bl sub_0201CE14 + str r0, [r4, #8] + str r5, [r4, #0] + str r6, [r4, #0xc] + ldr r0, [r4, #4] + cmp r0, #0 + bne _021D1BAA + bl sub_02022974 +_021D1BAA: + ldr r0, [r4, #8] + cmp r0, #0 + bne _021D1BB4 + bl sub_02022974 +_021D1BB4: + ldrh r1, [r6, #4] + cmp r1, #0 + beq _021D1BC2 + ldr r0, [r5, #4] + bl sub_02018144 + str r0, [r4, #0x10] +_021D1BC2: + ldr r3, [r6, #8] + cmp r3, #0 + beq _021D1BD0 + ldr r1, [r5, #0] + ldr r2, [r4, #0x10] + add r0, r4, #0 + blx r3 +_021D1BD0: + add r0, r4, #0 + pop {r4, r5, r6, pc} +_021D1BD4: + add r1, r1, #1 + add r4, #0x14 + cmp r1, r2 + blt _021D1B7C +_021D1BDC: + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D1BE4: .word ov5_021D1B24 +_021D1BE8: .word ov5_021D1B48 + thumb_func_end ov5_021D1B6C + + thumb_func_start ov5_021D1BEC +ov5_021D1BEC: ; 0x021D1BEC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + beq _021D1C2A + ldr r1, [r4, #0xc] + ldr r3, [r1, #0xc] + cmp r3, #0 + beq _021D1C06 + ldr r1, [r4, #0] + ldr r2, [r4, #0x10] + ldr r1, [r1, #0] + blx r3 +_021D1C06: + ldr r0, [r4, #0xc] + ldrh r0, [r0, #4] + cmp r0, #0 + beq _021D1C14 + ldr r0, [r4, #0x10] + bl sub_020181C4 +_021D1C14: + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, [r4, #8] + bl sub_0200DA58 + mov r0, #0 + add r1, r4, #0 + mov r2, #0x14 + bl sub_020C4B4C +_021D1C2A: + pop {r4, pc} + thumb_func_end ov5_021D1BEC + + thumb_func_start ov5_021D1C2C +ov5_021D1C2C: ; 0x021D1C2C + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov5_021D1C2C \ No newline at end of file diff --git a/asm/ov5_021D1C30.s b/asm/ov5_021D1C30.s new file mode 100644 index 000000000..1057b50eb --- /dev/null +++ b/asm/ov5_021D1C30.s @@ -0,0 +1,2380 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D1C30 +ov5_021D1C30: ; 0x021D1C30 + ldrh r2, [r0] + mov r1, #1 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #2 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #4 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #8 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #0x10 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #0x20 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #0x40 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + mov r1, #0x80 + bic r2, r1 + strh r2, [r0] + ldrh r2, [r0] + ldr r1, _021D1C9C ; =0xFFFFFEFF + and r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _021D1CA0 ; =0xFFFFFDFF + and r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _021D1CA4 ; =0xFFFFFBFF + and r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _021D1CA8 ; =0xFFFFF7FF + and r2, r1 + strh r2, [r0] + mov r2, #0xff + strb r2, [r0, #2] + asr r1, r1, #0xc + strb r1, [r0, #3] + bx lr + nop +_021D1C9C: .word 0xFFFFFEFF +_021D1CA0: .word 0xFFFFFDFF +_021D1CA4: .word 0xFFFFFBFF +_021D1CA8: .word 0xFFFFF7FF + thumb_func_end ov5_021D1C30 + + thumb_func_start ov5_021D1CAC +ov5_021D1CAC: ; 0x021D1CAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + add r4, r3, #0 + bl ov5_021D1C30 + ldr r0, [r7, #0x3c] + bl sub_0205EB14 + str r0, [sp, #4] + ldr r0, [r7, #0x3c] + bl sub_0205EB0C + str r0, [sp] + ldr r0, [r7, #0x3c] + bl sub_0205EA78 + add r2, r0, #0 + ldr r0, [sp, #4] + strh r6, [r5, #4] + strh r4, [r5, #6] + cmp r0, #3 + beq _021D1CE2 + cmp r0, #0 + bne _021D1D40 +_021D1CE2: + mov r0, #1 + lsl r0, r0, #0xa + tst r0, r6 + beq _021D1CF2 + ldrh r1, [r5] + mov r0, #4 + orr r0, r1 + strh r0, [r5] +_021D1CF2: + mov r0, #2 + lsl r0, r0, #0xa + tst r0, r6 + beq _021D1D02 + ldrh r1, [r5] + mov r0, #8 + orr r0, r1 + strh r0, [r5] +_021D1D02: + mov r3, #1 + add r0, r6, #0 + tst r0, r3 + beq _021D1D16 + ldrh r1, [r5] + mov r0, #1 + bic r1, r0 + add r0, r1, #0 + orr r0, r3 + strh r0, [r5] +_021D1D16: + mov r0, #2 + tst r0, r6 + beq _021D1D24 + ldrh r1, [r5] + mov r0, #0x80 + orr r0, r1 + strh r0, [r5] +_021D1D24: + mov r0, #0xf0 + add r3, r4, #0 + and r3, r0 + beq _021D1D34 + ldrh r1, [r5] + mov r0, #0x10 + orr r0, r1 + strh r0, [r5] +_021D1D34: + cmp r3, #0 + beq _021D1D40 + ldrh r1, [r5] + mov r0, #0x20 + orr r0, r1 + strh r0, [r5] +_021D1D40: + ldr r0, [sp, #4] + cmp r0, #3 + bne _021D1D54 + ldr r0, [sp] + cmp r0, #1 + bne _021D1D54 + ldrh r1, [r5] + mov r0, #0x40 + orr r0, r1 + strh r0, [r5] +_021D1D54: + ldr r0, [sp, #4] + cmp r0, #3 + bne _021D1D62 + ldrh r1, [r5] + mov r0, #2 + orr r0, r1 + strh r0, [r5] +_021D1D62: + cmp r2, #0 + bne _021D1D6C + mov r0, #0x40 + tst r0, r4 + bne _021D1D8A +_021D1D6C: + cmp r2, #1 + bne _021D1D76 + mov r0, #0x80 + tst r0, r4 + bne _021D1D8A +_021D1D76: + cmp r2, #2 + bne _021D1D80 + mov r0, #0x20 + tst r0, r4 + bne _021D1D8A +_021D1D80: + cmp r2, #3 + bne _021D1D8E + mov r0, #0x10 + tst r0, r4 + beq _021D1D8E +_021D1D8A: + strb r2, [r5, #3] + b _021D1D94 +_021D1D8E: + mov r0, #0 + mvn r0, r0 + strb r0, [r5, #3] +_021D1D94: + ldr r0, [r7, #0x3c] + add r1, r6, #0 + add r2, r4, #0 + bl sub_02061308 + strb r0, [r5, #2] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D1CAC + + thumb_func_start ov5_021D1DA4 +ov5_021D1DA4: ; 0x021D1DA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldrh r0, [r5] + add r4, r1, #0 + lsl r0, r0, #0x14 + lsr r0, r0, #0x1f + bne _021D1DC6 + add r0, r4, #0 + mov r1, #1 + bl sub_0203F5C0 + cmp r0, #1 + bne _021D1DC6 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1DC6: + ldrh r0, [r5] + lsl r0, r0, #0x14 + lsr r0, r0, #0x1f + bne _021D1E1E + ldr r0, [r4, #0xc] + bl sub_0207A268 + bl sub_02054AB0 + add r6, r0, #0 + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206A984 + cmp r0, #1 + bne _021D1DEA + mov r6, #1 +_021D1DEA: + add r0, r4, #0 + add r1, r6, #0 + bl sub_02067A84 + cmp r0, #1 + beq _021D1E0C + add r0, r4, #0 + mov r1, #2 + bl sub_02071CB4 + cmp r0, #1 + bne _021D1E1E + add r0, r4, #0 + bl ov8_0224C51C + cmp r0, #1 + bne _021D1E1E +_021D1E0C: + ldr r0, [r4, #0x3c] + bl sub_0205F56C + ldr r0, [r4, #0x38] + bl sub_02062C48 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1E1E: + ldrh r0, [r5] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + beq _021D1E40 + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206A9A4 + add r0, r4, #0 + bl ov5_021D2884 + cmp r0, #1 + bne _021D1E40 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1E40: + ldrh r0, [r5] + lsl r0, r0, #0x14 + lsr r0, r0, #0x1f + bne _021D1EAE + ldrh r1, [r5, #4] + ldrh r2, [r5, #6] + ldr r0, [r4, #0x3c] + mov r6, #0 + bl sub_02061308 + add r7, r0, #0 + ldr r0, [r4, #0xc] + bl sub_020507E4 + mov r1, #2 + bl sub_0206AEAC + cmp r0, #0 + beq _021D1E6A + mov r0, #1 + orr r6, r0 +_021D1E6A: + ldr r0, [r4, #0xc] + bl sub_0207A268 + mov r1, #0x7f + bl sub_020549A0 + cmp r0, #0xff + beq _021D1E7E + mov r0, #2 + orr r6, r0 +_021D1E7E: + add r0, r4, #0 + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + bne _021D1E98 + add r0, r4, #0 + bl ov9_02250F74 + cmp r0, #1 + bne _021D1E98 + mov r0, #4 + orr r6, r0 +_021D1E98: + ldr r1, [r4, #0x3c] + add r0, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov5_021DFDE0 + cmp r0, #1 + bne _021D1EAE + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1EAE: + ldrh r0, [r5] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + beq _021D1F04 + add r0, r4, #0 + bl ov5_021D249C + cmp r0, #0 + beq _021D1EC6 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1EC6: + add r0, r4, #0 + bl ov5_021D20DC + cmp r0, #1 + bne _021D1ED6 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1ED6: + add r0, r4, #0 + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + bne _021D1F04 + mov r0, #2 + ldrsb r1, [r5, r0] + sub r0, r0, #3 + cmp r1, r0 + bne _021D1EF4 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r1, r0, #0 +_021D1EF4: + add r0, r4, #0 + bl ov9_0224A67C + cmp r0, #1 + bne _021D1F04 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1F04: + ldrh r0, [r5] + lsl r0, r0, #0x1b + lsr r0, r0, #0x1f + beq _021D1F28 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + ldrb r1, [r5, #2] + cmp r1, r0 + bne _021D1F28 + add r0, r4, #0 + bl ov5_021D20DC + cmp r0, #1 + bne _021D1F28 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1F28: + ldrh r0, [r5] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _021D1F32 + b _021D2058 +_021D1F32: + add r0, r4, #0 + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + add r1, sp, #0xc + bne _021D1F48 + add r0, r4, #0 + bl ov5_021D2EA4 + b _021D1F4E +_021D1F48: + add r0, r4, #0 + bl sub_0203CA40 +_021D1F4E: + cmp r0, #1 + ldr r0, [r4, #0x3c] + bne _021D1F9C + bl sub_0205F588 + cmp r0, #1 + bne _021D1F6A + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0205F5E4 +_021D1F6A: + ldr r0, [sp, #0xc] + bl sub_02062950 + cmp r0, #9 + beq _021D1F8C + ldr r5, [sp, #0xc] + add r0, r5, #0 + bl sub_02062960 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + add r2, r5, #0 + bl sub_0203E880 + b _021D1F96 +_021D1F8C: + ldr r2, [sp, #0xc] + add r0, r4, #0 + mov r1, #0 + bl sub_0203E880 +_021D1F96: + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1F9C: + bl sub_0205F108 + add r6, r0, #0 + cmp r6, #1 + bhi _021D1FD8 + add r0, r4, #0 + bl sub_0203A440 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0203A448 + add r2, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl sub_0203CA6C + add r1, r0, #0 + ldr r0, _021D20D4 ; =0x0000FFFF + cmp r1, r0 + beq _021D1FD8 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1FD8: + cmp r6, #0 + bne _021D1FFC + add r0, r4, #0 + add r1, sp, #8 + bl ov5_021EFB40 + cmp r0, #0 + beq _021D1FFC + ldr r1, [sp, #8] + add r0, r4, #0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D1FFC: + ldr r0, [r4, #0x3c] + bl sub_0205EAA0 + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_020616F0 + add r1, r0, #0 + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl ov5_021D271C + add r1, r0, #0 + ldr r0, _021D20D4 ; =0x0000FFFF + cmp r1, r0 + beq _021D2030 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2030: + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r6, r0, #0 + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov5_021D2C98 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + add r3, r6, #0 + bl ov5_021F8410 + cmp r0, #1 + bne _021D2058 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2058: + ldrh r0, [r5] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + beq _021D2090 + add r0, r4, #0 + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + bne _021D2078 + mov r1, #3 + ldrsb r1, [r5, r1] + add r0, r4, #0 + bl ov9_0224A800 + b _021D2090 +_021D2078: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D2504 + cmp r0, #1 + bne _021D2090 + add r0, r4, #0 + bl ov5_021D2E14 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2090: + ldrh r0, [r5] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _021D20A8 + add r0, r4, #0 + bl sub_02069238 + cmp r0, #1 + bne _021D20A8 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D20A8: + ldrh r0, [r5] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _021D20CC + add r0, r4, #0 + bl sub_0203A9C8 + cmp r0, #1 + bne _021D20CC + ldr r0, _021D20D8 ; =0x000005FD + bl sub_02005748 + add r0, r4, #0 + bl sub_0203A9E0 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D20CC: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D20D4: .word 0x0000FFFF +_021D20D8: .word 0x000005FD + thumb_func_end ov5_021D1DA4 + + thumb_func_start ov5_021D20DC +ov5_021D20DC: ; 0x021D20DC + push {r3, r4, r5, lr} + add r1, sp, #0 + add r5, r0, #0 + bl sub_0203CBE0 + cmp r0, #1 + bne _021D2104 + ldr r4, [sp] + add r0, r4, #0 + bl sub_02062960 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + add r2, r4, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2104: + add r0, r5, #0 + bl sub_0203A440 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0203A448 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0203CB80 + add r1, r0, #0 + ldr r0, _021D2138 ; =0x0000FFFF + cmp r1, r0 + beq _021D2134 + lsl r1, r1, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2134: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D2138: .word 0x0000FFFF + thumb_func_end ov5_021D20DC + + thumb_func_start ov5_021D213C +ov5_021D213C: ; 0x021D213C + push {r4, lr} + add r4, r0, #0 + ldrh r0, [r4] + lsl r0, r0, #0x14 + lsr r0, r0, #0x1f + bne _021D2158 + add r0, r1, #0 + mov r1, #1 + bl sub_0203F5C0 + cmp r0, #1 + bne _021D2158 + mov r0, #1 + pop {r4, pc} +_021D2158: + bl sub_020363A0 + cmp r0, #0 + bne _021D216C + bl sub_0203608C + bl sub_020593CC + cmp r0, #0 + beq _021D2170 +_021D216C: + mov r0, #0 + pop {r4, pc} +_021D2170: + bl ov23_02242814 + ldrh r0, [r4] + lsl r1, r0, #0x1f + lsr r1, r1, #0x1f + beq _021D2186 + mov r0, #0 + bl ov23_02242830 + mov r0, #0 + pop {r4, pc} +_021D2186: + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _021D2194 + bl ov23_022427F8 + mov r0, #0 + pop {r4, pc} +_021D2194: + bl ov23_02242458 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021D213C + + thumb_func_start ov5_021D219C +ov5_021D219C: ; 0x021D219C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrh r0, [r4] + add r5, r1, #0 + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + beq _021D21CE + mov r0, #3 + ldrsb r0, [r4, r0] + cmp r0, #1 + bne _021D21CE + add r0, r5, #0 + bl ov5_021D2CFC + bl sub_0205DB1C + cmp r0, #0 + beq _021D21CE + ldr r1, _021D226C ; =0x0000238D + add r0, r5, #0 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D21CE: + bl sub_020363A0 + cmp r0, #0 + bne _021D21EA + bl sub_0203608C + bl sub_020593CC + cmp r0, #0 + bne _021D21EA + bl sub_02059D2C + cmp r0, #0 + bne _021D21EE +_021D21EA: + mov r0, #0 + pop {r3, r4, r5, pc} +_021D21EE: + ldrh r0, [r4] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _021D223E + add r0, r5, #0 + add r1, sp, #0 + bl sub_0203CA40 + cmp r0, #1 + bne _021D223E + ldr r0, [sp] + bl sub_02062948 + cmp r0, #1 + beq _021D223E + ldr r0, [r5, #0x3c] + bl sub_0205F588 + cmp r0, #1 + bne _021D2224 + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + add r1, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205F5E4 +_021D2224: + ldr r4, [sp] + add r0, r4, #0 + bl sub_02062960 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + add r2, r4, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D223E: + ldrh r0, [r4] + lsl r1, r0, #0x1f + lsr r1, r1, #0x1f + beq _021D2250 + add r0, r5, #0 + bl sub_0205B2D4 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2250: + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _021D2266 + ldr r0, _021D2270 ; =0x000005FD + bl sub_02005748 + add r0, r5, #0 + bl sub_0203AABC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2266: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D226C: .word 0x0000238D +_021D2270: .word 0x000005FD + thumb_func_end ov5_021D219C + + thumb_func_start ov5_021D2274 +ov5_021D2274: ; 0x021D2274 + push {r3, r4, r5, lr} + mov r5, #0 + mov r4, #1 +_021D227A: + add r0, r4, #0 + bl sub_02032EE8 + cmp r0, #0 + beq _021D2286 + add r5, r5, #1 +_021D2286: + add r4, r4, #1 + cmp r4, #5 + blt _021D227A + cmp r5, #1 + blt _021D2294 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2294: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D2274 + + thumb_func_start ov5_021D2298 +ov5_021D2298: ; 0x021D2298 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + bl sub_020318EC + mov r1, #0xfe + tst r0, r1 + beq _021D22CA + bl ov5_021D2274 + cmp r0, #0 + beq _021D22C6 + bl sub_02035E18 + cmp r0, #1 + ble _021D22C6 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D22C6: + mov r0, #0 + pop {r3, r4, r5, pc} +_021D22CA: + ldrh r0, [r4] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _021D2314 + add r0, r5, #0 + add r1, sp, #0 + bl sub_0203CA40 + cmp r0, #1 + bne _021D2314 + ldr r0, [r5, #0x3c] + bl sub_0205F588 + cmp r0, #1 + bne _021D22F6 + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + add r1, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205F5E4 +_021D22F6: + bl sub_02036B84 + ldr r4, [sp] + add r0, r4, #0 + bl sub_02062960 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + add r2, r4, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2314: + ldrh r0, [r4] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + beq _021D2334 + add r0, r5, #0 + bl ov5_021D2CFC + bl sub_0205DEE4 + cmp r0, #0 + beq _021D2334 + add r0, r5, #0 + bl sub_020545EC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2334: + ldrh r0, [r4] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _021D235E + bl sub_02035E18 + cmp r0, #1 + bgt _021D235E + ldr r0, _021D2364 ; =0x000005FD + bl sub_02005748 + add r0, r5, #0 + bl sub_0203AA78 + mov r0, #4 + bl sub_0205BEA8 + bl sub_02036BA0 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D235E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D2364: .word 0x000005FD + thumb_func_end ov5_021D2298 + + thumb_func_start ov5_021D2368 +ov5_021D2368: ; 0x021D2368 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldrh r0, [r5] + add r4, r1, #0 + lsl r0, r0, #0x14 + lsr r0, r0, #0x1f + bne _021D238A + add r0, r4, #0 + mov r1, #1 + bl sub_0203F5C0 + cmp r0, #1 + bne _021D238A + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D238A: + ldrh r0, [r5] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + beq _021D2442 + add r0, r4, #0 + add r1, sp, #0 + bl sub_0203CA40 + cmp r0, #1 + bne _021D23E8 + ldr r0, [r4, #0x3c] + bl sub_0205F588 + cmp r0, #1 + bne _021D23B6 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0205F5E4 +_021D23B6: + ldr r0, [sp] + bl sub_02062950 + cmp r0, #9 + beq _021D23D8 + ldr r5, [sp] + add r0, r5, #0 + bl sub_02062960 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + add r2, r5, #0 + bl sub_0203E880 + b _021D23E2 +_021D23D8: + ldr r2, [sp] + add r0, r4, #0 + mov r1, #0 + bl sub_0203E880 +_021D23E2: + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D23E8: + add r0, r4, #0 + bl sub_0203A440 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0203A448 + add r2, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl sub_0203CA6C + add r1, r0, #0 + ldr r0, _021D2494 ; =0x0000FFFF + cmp r1, r0 + beq _021D241A + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D241A: + add r0, r4, #0 + bl ov5_021D2D18 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021D271C + add r1, r0, #0 + ldr r0, _021D2494 ; =0x0000FFFF + cmp r1, r0 + beq _021D2442 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D2442: + ldrh r0, [r5] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1f + beq _021D245C + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D2504 + cmp r0, #1 + bne _021D245C + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D245C: + ldrh r0, [r5] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _021D2474 + add r0, r4, #0 + bl sub_02069238 + cmp r0, #1 + bne _021D2474 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D2474: + ldrh r0, [r5] + lsl r0, r0, #0x1d + lsr r0, r0, #0x1f + beq _021D248E + ldr r0, _021D2498 ; =0x000005FD + bl sub_02005748 + add r0, r4, #0 + bl sub_0203A9E0 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D248E: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D2494: .word 0x0000FFFF +_021D2498: .word 0x000005FD + thumb_func_end ov5_021D2368 + + thumb_func_start ov5_021D249C +ov5_021D249C: ; 0x021D249C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov5_021D2C7C + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206AE8C + cmp r0, #1 + bne _021D24E0 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl sub_02056374 + cmp r0, #1 + bne _021D24DA + add r0, r4, #0 + bl sub_0205639C + add r1, r0, #0 + add r0, r4, #0 + bl sub_02051450 + add sp, #8 + mov r0, #1 + pop {r4, pc} +_021D24DA: + add sp, #8 + mov r0, #0 + pop {r4, pc} +_021D24E0: + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A0EC + cmp r0, #0 + beq _021D24FC + add r0, r4, #0 + bl ov6_02240D5C + cmp r0, #1 + bne _021D24FC + add sp, #8 + mov r0, #1 + pop {r4, pc} +_021D24FC: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D249C + + thumb_func_start ov5_021D2504 +ov5_021D2504: ; 0x021D2504 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r5, r1, #0 + mov r1, #3 + ldrsb r2, [r5, r1] + sub r1, r1, #4 + add r6, r0, #0 + cmp r2, r1 + bne _021D251C + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D251C: + mov r1, #4 + bl sub_02071CB4 + cmp r0, #1 + bne _021D2536 + add r0, r6, #0 + bl ov8_0224BF4C + cmp r0, #1 + bne _021D2536 + add sp, #0x2c + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D2536: + add r0, r6, #0 + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov5_021D2C98 + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + add r0, r6, #0 + bl sub_02054F68 + cmp r0, #0 + bne _021D2554 + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D2554: + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + add r0, r6, #0 + add r3, sp, #0x18 + bl ov5_021D2D34 + cmp r0, #0 + beq _021D25BA + mov r0, #3 + ldrsb r1, [r5, r0] + sub r0, r0, #4 + cmp r1, r0 + beq _021D25BA + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + add r0, r6, #0 + bl sub_02054F94 + bl sub_0205DAEC + cmp r0, #0 + beq _021D25BA + mov r0, #3 + ldrsb r0, [r5, r0] + mov r1, #2 + str r0, [sp, #0xc] + add r0, r6, #0 + bl sub_02071CB4 + cmp r0, #1 + bne _021D259E + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + add r0, r6, #0 + add r3, sp, #0xc + bl ov8_0224C62C +_021D259E: + mov r3, #0 + str r3, [sp] + ldr r0, [sp, #0xc] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r0, r6, #0 + bl sub_02056BDC + add sp, #0x2c + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D25BA: + add r0, r6, #0 + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov5_021D2C7C + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + add r0, r6, #0 + bl sub_02054F94 + add r4, r0, #0 + bl sub_0205DAF8 + cmp r0, #0 + bne _021D25E2 + add r0, r4, #0 + bl sub_0205DB28 + cmp r0, #0 + beq _021D25F0 +_021D25E2: + mov r0, #3 + ldrsb r0, [r5, r0] + cmp r0, #3 + beq _021D2664 + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D25F0: + add r0, r4, #0 + bl sub_0205DB04 + cmp r0, #0 + bne _021D2604 + add r0, r4, #0 + bl sub_0205DB34 + cmp r0, #0 + beq _021D2612 +_021D2604: + mov r0, #3 + ldrsb r0, [r5, r0] + cmp r0, #2 + beq _021D2664 + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D2612: + add r0, r4, #0 + bl sub_0205DB1C + cmp r0, #0 + bne _021D2626 + add r0, r4, #0 + bl sub_0205DB4C + cmp r0, #0 + beq _021D2634 +_021D2626: + mov r0, #3 + ldrsb r0, [r5, r0] + cmp r0, #1 + beq _021D2664 + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D2634: + add r0, r4, #0 + bl sub_0205DC44 + cmp r0, #0 + beq _021D264C + mov r0, #3 + ldrsb r0, [r5, r0] + cmp r0, #3 + beq _021D2664 + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D264C: + add r0, r4, #0 + bl sub_0205DC50 + cmp r0, #0 + beq _021D2664 + mov r0, #3 + ldrsb r0, [r5, r0] + cmp r0, #2 + beq _021D2664 + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D2664: + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + add r0, r6, #0 + add r3, sp, #0x18 + bl ov5_021D2D34 + cmp r0, #0 + bne _021D267A + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D267A: + add r0, r4, #0 + bl sub_0205DAEC + cmp r0, #0 + beq _021D2688 + mov r1, #1 + b _021D2700 +_021D2688: + add r0, r4, #0 + bl sub_0205DC44 + cmp r0, #0 + beq _021D2696 + mov r1, #3 + b _021D2700 +_021D2696: + add r0, r4, #0 + bl sub_0205DC50 + cmp r0, #0 + beq _021D26A4 + mov r1, #3 + b _021D2700 +_021D26A4: + add r0, r4, #0 + bl sub_0205DAF8 + cmp r0, #0 + bne _021D26E0 + add r0, r4, #0 + bl sub_0205DB28 + cmp r0, #0 + bne _021D26E0 + add r0, r4, #0 + bl sub_0205DB04 + cmp r0, #0 + bne _021D26E0 + add r0, r4, #0 + bl sub_0205DB34 + cmp r0, #0 + bne _021D26E0 + add r0, r4, #0 + bl sub_0205DB1C + cmp r0, #0 + bne _021D26E0 + add r0, r4, #0 + bl sub_0205DB4C + cmp r0, #0 + beq _021D26FA +_021D26E0: + mov r3, #0 + str r3, [sp] + mov r0, #3 + ldrsb r0, [r5, r0] + str r0, [sp, #4] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r0, r6, #0 + bl sub_02056C18 + add sp, #0x2c + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D26FA: + add sp, #0x2c + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021D2700: + mov r3, #0 + str r3, [sp] + mov r0, #3 + ldrsb r0, [r5, r0] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r0, r6, #0 + bl sub_02056BDC + mov r0, #1 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021D2504 + + thumb_func_start ov5_021D271C +ov5_021D271C: ; 0x021D271C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x3c] + add r4, r1, #0 + bl sub_0205EA78 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0205DBE4 + cmp r0, #0 + beq _021D273C + cmp r6, #0 + bne _021D273C + ldr r0, _021D2844 ; =0x000007E2 + pop {r4, r5, r6, pc} +_021D273C: + add r0, r4, #0 + bl sub_0205DC80 + cmp r0, #0 + beq _021D274A + ldr r0, _021D2848 ; =0x000009C4 + pop {r4, r5, r6, pc} +_021D274A: + add r0, r4, #0 + bl sub_0205DC8C + cmp r0, #0 + beq _021D2758 + ldr r0, _021D284C ; =0x000009C5 + pop {r4, r5, r6, pc} +_021D2758: + add r0, r4, #0 + bl sub_0205DC98 + cmp r0, #0 + beq _021D2766 + ldr r0, _021D2850 ; =0x000009C6 + pop {r4, r5, r6, pc} +_021D2766: + add r0, r4, #0 + bl sub_0205DCA4 + cmp r0, #0 + beq _021D2774 + ldr r0, _021D2854 ; =0x000009C7 + pop {r4, r5, r6, pc} +_021D2774: + add r0, r4, #0 + bl sub_0205DCB0 + cmp r0, #0 + beq _021D2782 + ldr r0, _021D2858 ; =0x000009C8 + pop {r4, r5, r6, pc} +_021D2782: + add r0, r4, #0 + bl sub_0205DCBC + cmp r0, #0 + beq _021D2790 + ldr r0, _021D285C ; =0x000009C9 + pop {r4, r5, r6, pc} +_021D2790: + add r0, r4, #0 + bl sub_0205DCC8 + cmp r0, #0 + beq _021D279E + ldr r0, _021D2860 ; =0x000009CA + pop {r4, r5, r6, pc} +_021D279E: + add r0, r4, #0 + bl sub_0205DCD4 + cmp r0, #0 + beq _021D27AC + ldr r0, _021D2864 ; =0x000009CB + pop {r4, r5, r6, pc} +_021D27AC: + add r0, r4, #0 + bl sub_0205DDB4 + cmp r0, #0 + beq _021D27BA + ldr r0, _021D2868 ; =0x00002716 + pop {r4, r5, r6, pc} +_021D27BA: + add r0, r4, #0 + bl sub_0205DBF0 + cmp r0, #0 + beq _021D27C8 + ldr r0, _021D286C ; =0x000009CC + pop {r4, r5, r6, pc} +_021D27C8: + add r0, r4, #0 + bl sub_0205DDC0 + cmp r0, #0 + beq _021D27D6 + ldr r0, _021D2870 ; =0x000007EE + pop {r4, r5, r6, pc} +_021D27D6: + add r0, r4, #0 + bl sub_0205DE84 + cmp r0, #0 + beq _021D27E8 + cmp r6, #0 + bne _021D27E8 + ldr r0, _021D2874 ; =0x00002774 + pop {r4, r5, r6, pc} +_021D27E8: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021E0760 + cmp r0, #0 + beq _021D27F8 + ldr r0, _021D2878 ; =0x00002713 + pop {r4, r5, r6, pc} +_021D27F8: + ldr r0, [r5, #0x3c] + bl sub_0205EB74 + cmp r0, #2 + beq _021D283E + ldr r0, [r5, #0xc] + bl sub_02025E38 + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_02061760 + add r1, r0, #0 + ldr r0, [r5, #0x3c] + add r2, r4, #0 + bl ov5_021E0118 + cmp r0, #0 + beq _021D283E + add r0, r6, #0 + mov r1, #3 + bl sub_02025F34 + cmp r0, #0 + beq _021D283E + ldr r0, [r5, #0xc] + bl sub_0207A268 + mov r1, #0x39 + bl sub_020549A0 + cmp r0, #0xff + beq _021D283E + ldr r0, _021D287C ; =0x00002714 + pop {r4, r5, r6, pc} +_021D283E: + ldr r0, _021D2880 ; =0x0000FFFF + pop {r4, r5, r6, pc} + nop +_021D2844: .word 0x000007E2 +_021D2848: .word 0x000009C4 +_021D284C: .word 0x000009C5 +_021D2850: .word 0x000009C6 +_021D2854: .word 0x000009C7 +_021D2858: .word 0x000009C8 +_021D285C: .word 0x000009C9 +_021D2860: .word 0x000009CA +_021D2864: .word 0x000009CB +_021D2868: .word 0x00002716 +_021D286C: .word 0x000009CC +_021D2870: .word 0x000007EE +_021D2874: .word 0x00002774 +_021D2878: .word 0x00002713 +_021D287C: .word 0x00002714 +_021D2880: .word 0x0000FFFF + thumb_func_end ov5_021D271C + + thumb_func_start ov5_021D2884 +ov5_021D2884: ; 0x021D2884 + push {r3, r4, r5, r6, r7, lr} + mov r1, #3 + add r5, r0, #0 + bl sub_02071CB4 + cmp r0, #1 + bne _021D28A0 + add r0, r5, #0 + bl ov8_0224AAA8 + cmp r0, #0 + beq _021D28A0 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D28A0: + add r0, r5, #0 + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + bne _021D28BA + add r0, r5, #0 + bl ov9_0224A71C + cmp r0, #1 + bne _021D28BA + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D28BA: + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + add r2, r0, #0 + ldr r1, [r5, #0x3c] + add r0, r5, #0 + bl ov5_021E1154 + cmp r0, #1 + bne _021D28D2 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D28D2: + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl sub_02054F94 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021D29A0 + cmp r0, #1 + bne _021D28FC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D28FC: + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + add r3, r6, #0 + bl ov5_021D29D8 + cmp r0, #1 + bne _021D2916 + add r0, r5, #0 + bl ov5_021D2E14 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2916: + ldr r0, [r5, #0x3c] + bl sub_0205EF58 + cmp r0, #0 + beq _021D2924 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D2924: + add r0, r5, #0 + mov r1, #5 + mov r2, #1 + bl ov5_021EA714 + add r0, r5, #0 + bl ov5_021D2B94 + cmp r0, #1 + bne _021D293C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D293C: + add r0, r5, #0 + bl ov5_021D2C14 + cmp r0, #1 + bne _021D294A + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D294A: + add r0, r5, #0 + bl ov5_021D2ABC + cmp r0, #1 + bne _021D2958 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2958: + add r0, r5, #0 + bl ov5_021D2B08 + cmp r0, #1 + bne _021D2966 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2966: + add r0, r5, #0 + bl ov5_021D2B14 + cmp r0, #1 + bne _021D2974 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2974: + add r0, r5, #0 + bl ov5_021D2B20 + cmp r0, #1 + bne _021D2982 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2982: + add r0, r5, #0 + bl ov5_021D2B2C + cmp r0, #0 + beq _021D2992 + add r0, r5, #0 + bl ov5_021D2B54 +_021D2992: + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206B238 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D2884 + + thumb_func_start ov5_021D29A0 +ov5_021D29A0: ; 0x021D29A0 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_0203A4AC + add r5, r0, #0 + add r0, r4, #0 + bl sub_0203A4A4 + add r2, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_0203CC14 + add r1, r0, #0 + ldr r0, _021D29D4 ; =0x0000FFFF + cmp r1, r0 + beq _021D29CE + add r0, r4, #0 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D29CE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D29D4: .word 0x0000FFFF + thumb_func_end ov5_021D29A0 + + thumb_func_start ov5_021D29D8 +ov5_021D29D8: ; 0x021D29D8 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r3, #0 + add r3, sp, #0xc + add r4, r0, #0 + bl ov5_021D2D34 + cmp r0, #0 + bne _021D29F0 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D29F0: + add r0, r5, #0 + bl sub_0205DC2C + cmp r0, #1 + bne _021D2A34 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + cmp r0, #2 + bne _021D2A08 + mov r0, #3 + b _021D2A1A +_021D2A08: + cmp r0, #3 + bne _021D2A10 + mov r0, #2 + b _021D2A1A +_021D2A10: + bl sub_02022974 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2A1A: + mov r3, #0 + str r3, [sp] + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, r4, #0 + bl sub_02056BDC + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2A34: + add r0, r5, #0 + bl sub_0205DC38 + cmp r0, #1 + bne _021D2A70 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + cmp r0, #2 + beq _021D2A56 + cmp r0, #3 + beq _021D2A56 + bl sub_02022974 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2A56: + mov r3, #0 + str r3, [sp] + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, r4, #0 + bl sub_02056BDC + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2A70: + add r0, r5, #0 + bl sub_0205DB10 + cmp r0, #0 + bne _021D2A84 + add r0, r5, #0 + bl sub_0205DB40 + cmp r0, #0 + beq _021D2A9A +_021D2A84: + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, r4, #0 + bl sub_02056C18 + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2A9A: + add r0, r5, #0 + bl sub_0205DEE4 + cmp r0, #0 + beq _021D2AB4 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, r4, #0 + bl sub_02053F58 + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2AB4: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D29D8 + + thumb_func_start ov5_021D2ABC +ov5_021D2ABC: ; 0x021D2ABC + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0207A268 + add r5, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02026310 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021E7154 + cmp r0, #1 + bne _021D2AFE + ldr r0, [r4, #0xc] + bl sub_0202CD88 + add r5, r0, #0 + mov r1, #0xb + bl sub_0202CF28 + add r0, r5, #0 + mov r1, #0xf + bl sub_0202CFEC + ldr r1, _021D2B04 ; =0x000007EF + add r0, r4, #0 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2AFE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D2B04: .word 0x000007EF + thumb_func_end ov5_021D2ABC + + thumb_func_start ov5_021D2B08 +ov5_021D2B08: ; 0x021D2B08 + push {r3, lr} + bl ov5_021DBB94 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D2B08 + + thumb_func_start ov5_021D2B14 +ov5_021D2B14: ; 0x021D2B14 + push {r3, lr} + bl sub_02069B98 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D2B14 + + thumb_func_start ov5_021D2B20 +ov5_021D2B20: ; 0x021D2B20 + ldr r3, _021D2B28 ; =ov6_02246BF4 + add r1, r0, #0 + ldr r0, [r1, #0xc] + bx r3 + ; .align 2, 0 +_021D2B28: .word ov6_02246BF4 + thumb_func_end ov5_021D2B20 + + thumb_func_start ov5_021D2B2C +ov5_021D2B2C: ; 0x021D2B2C + push {r3, r4, r5, lr} + ldr r0, [r0, #0xc] + mov r5, #0 + bl sub_020507E4 + add r4, r0, #0 + bl sub_0206B44C + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + cmp r1, #0x80 + blo _021D2B4A + add r1, r5, #0 + mov r5, #1 +_021D2B4A: + add r0, r4, #0 + bl sub_0206B45C + add r0, r5, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D2B2C + + thumb_func_start ov5_021D2B54 +ov5_021D2B54: ; 0x021D2B54 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0207A268 + add r6, r0, #0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A138 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r6, #0 + bl sub_0207A0F8 + add r7, r0, #0 + mov r4, #0 + cmp r7, #0 + ble _021D2B90 +_021D2B7A: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #5 + add r2, r5, #0 + bl sub_02075C74 + add r4, r4, #1 + cmp r4, r7 + blt _021D2B7A +_021D2B90: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D2B54 + + thumb_func_start ov5_021D2B94 +ov5_021D2B94: ; 0x021D2B94 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0207A268 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0203A790 + bl sub_0203A78C + ldrh r1, [r0] + add r1, r1, #1 + strh r1, [r0] + ldrh r2, [r0] + mov r1, #3 + and r1, r2 + strh r1, [r0] + ldrh r0, [r0] + cmp r0, #0 + beq _021D2BC2 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2BC2: + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A138 + add r1, r0, #0 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + bl sub_02054B04 + cmp r0, #0 + beq _021D2BE4 + cmp r0, #1 + beq _021D2BE8 + cmp r0, #2 + beq _021D2BF4 + b _021D2C0A +_021D2BE4: + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2BE8: + ldr r0, [r5, #4] + ldr r0, [r0, #0x20] + bl ov5_021EF518 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2BF4: + ldr r0, [r5, #4] + ldr r0, [r0, #0x20] + bl ov5_021EF518 + ldr r1, _021D2C10 ; =0x000007D3 + add r0, r5, #0 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2C0A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D2C10: .word 0x000007D3 + thumb_func_end ov5_021D2B94 + + thumb_func_start ov5_021D2C14 +ov5_021D2C14: ; 0x021D2C14 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206AE5C + cmp r0, #0 + bne _021D2C2A + mov r0, #0 + pop {r4, pc} +_021D2C2A: + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A784 + ldrh r0, [r0] + cmp r0, #0 + bne _021D2C48 + ldr r1, _021D2C74 ; =0x00002262 + add r0, r4, #0 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r4, pc} +_021D2C48: + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A788 + ldrh r1, [r0] + add r1, r1, #1 + strh r1, [r0] + ldrh r1, [r0] + mov r0, #0x7d + lsl r0, r0, #2 + cmp r1, r0 + blo _021D2C70 + ldr r1, _021D2C78 ; =0x00002261 + add r0, r4, #0 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r4, pc} +_021D2C70: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D2C74: .word 0x00002262 +_021D2C78: .word 0x00002261 + thumb_func_end ov5_021D2C14 + + thumb_func_start ov5_021D2C7C +ov5_021D2C7C: ; 0x021D2C7C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x3c] + add r4, r1, #0 + add r6, r2, #0 + bl sub_0205EABC + str r0, [r4, #0] + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D2C7C + + thumb_func_start ov5_021D2C98 +ov5_021D2C98: ; 0x021D2C98 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x3c] + add r4, r1, #0 + add r6, r2, #0 + bl sub_0205EA78 + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov5_021D2CB4 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D2C98 + + thumb_func_start ov5_021D2CB4 +ov5_021D2CB4: ; 0x021D2CB4 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r5, r3, #0 + add r6, r1, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov5_021D2C7C + cmp r6, #3 + bhi _021D2CFA + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2CD4: ; jump table + .short _021D2CDC - _021D2CD4 - 2 ; case 0 + .short _021D2CE4 - _021D2CD4 - 2 ; case 1 + .short _021D2CEC - _021D2CD4 - 2 ; case 2 + .short _021D2CF4 - _021D2CD4 - 2 ; case 3 +_021D2CDC: + ldr r0, [r5, #0] + sub r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D2CE4: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021D2CEC: + ldr r0, [r4, #0] + sub r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_021D2CF4: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021D2CFA: + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D2CB4 + + thumb_func_start ov5_021D2CFC +ov5_021D2CFC: ; 0x021D2CFC + push {r4, lr} + sub sp, #8 + add r1, sp, #4 + add r2, sp, #0 + add r4, r0, #0 + bl ov5_021D2C7C + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl sub_02054F94 + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D2CFC + + thumb_func_start ov5_021D2D18 +ov5_021D2D18: ; 0x021D2D18 + push {r4, lr} + sub sp, #8 + add r1, sp, #4 + add r2, sp, #0 + add r4, r0, #0 + bl ov5_021D2C98 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl sub_02054F94 + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D2D18 + + thumb_func_start ov5_021D2D34 +ov5_021D2D34: ; 0x021D2D34 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r7, r1, #0 + str r2, [sp] + add r5, r3, #0 + bl sub_0203A468 + add r6, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + bne _021D2D50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D2D50: + add r0, r4, #0 + add r1, r6, #0 + bl sub_0203A450 + cmp r0, #0 + bne _021D2D60 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D2D60: + ldrh r3, [r0, #6] + mov r1, #1 + lsl r1, r1, #8 + cmp r3, r1 + bne _021D2D90 + ldrh r1, [r0, #4] + ldr r0, _021D2DC8 ; =0x00000FFF + cmp r1, r0 + beq _021D2D76 + bl sub_02022974 +_021D2D76: + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A730 + add r2, r0, #0 + ldmia r2!, {r0, r1} + stmia r5!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r5, #0] + b _021D2DA2 +_021D2D90: + ldrh r2, [r0, #2] + ldrh r1, [r0] + ldrh r0, [r0, #4] + str r0, [r5, #0] + str r3, [r5, #4] + str r1, [r5, #8] + str r2, [r5, #0xc] + mov r0, #1 + str r0, [r5, #0x10] +_021D2DA2: + ldr r0, [r4, #0xc] + bl sub_0203A790 + bl sub_0203A724 + add r5, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + ldr r1, [r4, #0x1c] + ldr r1, [r1, #0] + str r1, [r5, #0] + str r6, [r5, #4] + ldr r1, [sp] + str r7, [r5, #8] + str r1, [r5, #0xc] + str r0, [r5, #0x10] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2DC8: .word 0x00000FFF + thumb_func_end ov5_021D2D34 + + thumb_func_start ov5_021D2DCC +ov5_021D2DCC: ; 0x021D2DCC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r7, r1, #0 + str r2, [sp] + add r4, r3, #0 + bl sub_0203A790 + bl sub_0203A72C + add r6, r0, #0 + ldr r3, [r5, #0x1c] + add r2, r6, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + cmp r4, #0 + str r0, [r2, #0] + str r4, [r6, #0x10] + ldr r0, [sp] + str r7, [r6, #8] + str r0, [r6, #0xc] + bne _021D2E04 + ldr r0, [r6, #0xc] + add r0, r0, #1 + str r0, [r6, #0xc] +_021D2E04: + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + str r0, [r6, #0] + mov r0, #0 + mvn r0, r0 + str r0, [r6, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D2DCC + + thumb_func_start ov5_021D2E14 +ov5_021D2E14: ; 0x021D2E14 + push {r3, r4, lr} + sub sp, #0x1c + add r1, sp, #4 + add r2, sp, #0 + add r4, r0, #0 + bl ov5_021D2C7C + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + add r3, sp, #8 + bl ov5_021D2D34 + cmp r0, #0 + beq _021D2E5E + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A24C + cmp r0, #1 + bne _021D2EA0 + ldr r0, [sp, #8] + bl sub_0203A24C + cmp r0, #0 + bne _021D2EA0 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r3, r0, #0 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl ov5_021D2DCC + add sp, #0x1c + pop {r3, r4, pc} +_021D2E5E: + add r0, r4, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov5_021D2C98 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + add r3, sp, #8 + bl ov5_021D2D34 + cmp r0, #0 + beq _021D2EA0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A24C + cmp r0, #1 + bne _021D2EA0 + ldr r0, [sp, #8] + bl sub_0203A24C + cmp r0, #0 + bne _021D2EA0 + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + add r3, r0, #0 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + bl ov5_021D2DCC +_021D2EA0: + add sp, #0x1c + pop {r3, r4, pc} + thumb_func_end ov5_021D2E14 + + thumb_func_start ov5_021D2EA4 +ov5_021D2EA4: ; 0x021D2EA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + mov r0, #0 + str r0, [sp, #0xc] + add r5, r1, #0 + ldr r0, [r7, #0x3c] + add r1, sp, #8 + add r2, sp, #4 + add r3, sp, #0 + bl sub_020617BC + ldr r0, [r7, #0x38] + add r1, r5, #0 + add r2, sp, #0xc + mov r3, #1 + bl sub_020625B0 + cmp r0, #0 + beq _021D2F0E +_021D2ECC: + ldr r0, [r5, #0] + bl sub_02063020 + add r6, r0, #0 + ldr r0, [r5, #0] + bl sub_02063030 + lsr r1, r0, #0x1f + add r1, r0, r1 + ldr r0, [r5, #0] + asr r4, r1, #1 + bl sub_02063040 + ldr r1, [sp, #4] + cmp r1, r4 + bne _021D2EFE + ldr r1, [sp, #8] + cmp r1, r6 + bne _021D2EFE + ldr r1, [sp] + cmp r1, r0 + bne _021D2EFE + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D2EFE: + ldr r0, [r7, #0x38] + add r1, r5, #0 + add r2, sp, #0xc + mov r3, #1 + bl sub_020625B0 + cmp r0, #0 + bne _021D2ECC +_021D2F0E: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D2EA4 \ No newline at end of file diff --git a/asm/ov5_021D2F14.s b/asm/ov5_021D2F14.s new file mode 100644 index 000000000..5212646d1 --- /dev/null +++ b/asm/ov5_021D2F14.s @@ -0,0 +1,1127 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D2F14 +ov5_021D2F14: ; 0x021D2F14 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + str r1, [sp, #0x10] + add r4, r3, #0 + add r0, r2, #0 + add r1, r5, #4 + add r2, r4, #0 + bl sub_020095C4 + str r0, [r5, #0] + ldr r1, _021D30A4 ; =0x00000162 + ldr r0, [sp, #0x10] + strh r4, [r5, r1] + ldr r0, [r0, #0x10] + cmp r0, #0 + bne _021D2F3A + mov r2, #4 + b _021D2F3C +_021D2F3A: + mov r2, #6 +_021D2F3C: + sub r0, r1, #2 + strh r2, [r5, r0] + bl sub_02009F34 + mov r1, #0x16 + lsl r1, r1, #4 + ldrh r2, [r5, r1] + add r3, r0, #0 + add r0, r4, #0 + add r1, r2, #0 + mul r1, r3 + bl sub_02018144 + add r7, r0, #0 + mov r0, #0 + str r0, [sp, #0x1c] + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r0, [r5, r0] + cmp r0, #0 + bls _021D2F9E + ldr r6, [sp, #0x10] +_021D2F68: + ldr r1, [sp, #0x1c] + add r0, r7, #0 + bl sub_02009F38 + str r0, [sp, #0x20] + ldr r1, [r6, #0] + add r0, r4, #0 + bl sub_02017A40 + ldr r1, [sp, #0x20] + str r0, [sp, #0x24] + add r2, r4, #0 + bl sub_02009F40 + ldr r0, [sp, #0x24] + bl sub_020181C4 + ldr r0, [sp, #0x1c] + add r6, r6, #4 + add r0, r0, #1 + str r0, [sp, #0x1c] + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r0, [r5, r0] + ldr r1, [sp, #0x1c] + cmp r1, r0 + blo _021D2F68 +_021D2F9E: + mov r6, #0 + cmp r0, #0 + bls _021D2FD4 + str r5, [sp, #0x18] +_021D2FA6: + add r0, r7, #0 + add r1, r6, #0 + bl sub_02009F38 + bl sub_02009FA4 + add r1, r6, #0 + add r2, r4, #0 + bl sub_02009714 + mov r1, #0x13 + ldr r2, [sp, #0x18] + lsl r1, r1, #4 + str r0, [r2, r1] + add r0, r2, #0 + add r0, r0, #4 + str r0, [sp, #0x18] + add r0, r1, #0 + add r0, #0x30 + ldrh r0, [r5, r0] + add r6, r6, #1 + cmp r6, r0 + blo _021D2FA6 +_021D2FD4: + mov r1, #0 + str r1, [sp, #0x14] + cmp r0, #0 + bls _021D3020 + add r6, r5, #0 +_021D2FDE: + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl sub_02009F38 + str r0, [sp, #0x28] + bl sub_02009FA4 + add r1, r4, #0 + bl sub_02009CFC + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r6, r1] + add r0, r1, #0 + mov r2, #0x52 + sub r0, #0x18 + lsl r2, r2, #2 + ldr r0, [r6, r0] + ldr r1, [sp, #0x28] + ldr r2, [r6, r2] + add r3, r4, #0 + bl sub_02009C80 + ldr r0, [sp, #0x14] + add r6, r6, #4 + add r0, r0, #1 + str r0, [sp, #0x14] + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r0, [r5, r0] + ldr r1, [sp, #0x14] + cmp r1, r0 + blo _021D2FDE +_021D3020: + mov r6, #0 + cmp r0, #0 + bls _021D303E +_021D3026: + add r0, r7, #0 + add r1, r6, #0 + bl sub_02009F38 + bl sub_02009F8C + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r0, [r5, r0] + add r6, r6, #1 + cmp r6, r0 + blo _021D3026 +_021D303E: + add r0, r7, #0 + bl sub_020181C4 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A41C + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A684 + ldr r1, [sp, #0x10] + add r0, r4, #0 + ldr r1, [r1, #0x18] + bl sub_02017A40 + mov r3, #0x4e + lsl r3, r3, #2 + ldr r1, [r5, r3] + add r2, r3, #0 + str r1, [sp] + add r1, r3, #4 + ldr r1, [r5, r1] + sub r2, #8 + str r1, [sp, #4] + add r1, r3, #0 + add r1, #8 + ldr r1, [r5, r1] + add r6, r0, #0 + str r1, [sp, #8] + add r1, r3, #0 + add r1, #0xc + ldr r1, [r5, r1] + sub r3, r3, #4 + str r1, [sp, #0xc] + ldr r2, [r5, r2] + ldr r3, [r5, r3] + add r1, r4, #0 + bl sub_02009508 + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r6, #0 + bl sub_020181C4 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021D30A4: .word 0x00000162 + thumb_func_end ov5_021D2F14 + + thumb_func_start ov5_021D30A8 +ov5_021D30A8: ; 0x021D30A8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl sub_02021964 + mov r0, #0x4b + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020095A8 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A508 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A700 + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r0, [r5, r0] + mov r6, #0 + cmp r0, #0 + bls _021D3100 + mov r7, #0x16 + add r4, r5, #0 + lsl r7, r7, #4 +_021D30E2: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02009D20 + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02009754 + ldrh r0, [r5, r7] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blo _021D30E2 +_021D3100: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D30A8 + + thumb_func_start ov5_021D3104 +ov5_021D3104: ; 0x021D3104 + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + add r2, r0, #0 + add r4, r1, #0 + mov r0, #4 + ldrsh r0, [r4, r0] + mov r3, #0x4b + lsl r3, r3, #2 + lsl r0, r0, #0xc + str r0, [sp] + mov r0, #6 + ldrsh r0, [r4, r0] + add r6, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #8 + ldrsh r0, [r4, r0] + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [r2, #0] + str r0, [sp, #0xc] + ldr r0, [r2, r3] + ldr r1, [r4, #0] + ldr r5, [r0, #0] + mov r0, #0x24 + mul r0, r1 + add r0, r5, r0 + str r0, [sp, #0x10] + ldmia r6!, {r0, r1} + add r5, sp, #0x14 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + ldr r6, _021D318C ; =0x021F89C0 + str r0, [r5, #0] + ldmia r6!, {r0, r1} + add r5, sp, #0x20 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #0 + str r0, [r5, #0] + add r0, sp, #0 + strh r1, [r0, #0x2c] + ldr r0, [r4, #0xc] + add r3, #0x36 + str r0, [sp, #0x30] + ldr r0, [r4, #0x14] + str r0, [sp, #0x34] + ldrh r0, [r2, r3] + str r0, [sp, #0x38] + add r0, sp, #0xc + bl sub_02021AA0 + add r5, r0, #0 + bne _021D3174 + bl sub_02022974 +_021D3174: + ldrh r1, [r4, #0xa] + add r0, r5, #0 + bl sub_02021D6C + ldr r1, [r4, #0x10] + add r0, r5, #0 + bl sub_02021EC4 + add r0, r5, #0 + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + nop +_021D318C: .word 0x021F89C0 + thumb_func_end ov5_021D3104 + + thumb_func_start ov5_021D3190 +ov5_021D3190: ; 0x021D3190 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + str r1, [sp] + add r0, r2, #0 + str r3, [sp, #4] + add r1, r7, #4 + add r2, r3, #0 + bl sub_020095C4 + str r0, [r7, #0] + ldr r1, _021D326C ; =0x00000162 + ldr r0, [sp, #4] + strh r0, [r7, r1] + ldr r0, [sp] + ldr r0, [r0, #0x10] + cmp r0, #0 + beq _021D31BC + ldr r0, [sp] + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _021D31D2 +_021D31BC: + mov r1, #0x16 + mov r0, #4 + lsl r1, r1, #4 + strh r0, [r7, r1] + add r0, r1, #0 + mov r2, #0 + sub r0, #0x20 + str r2, [r7, r0] + sub r1, #0x1c + str r2, [r7, r1] + b _021D31D8 +_021D31D2: + mov r2, #6 + sub r0, r1, #2 + strh r2, [r7, r0] +_021D31D8: + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r1, [r7, r0] + mov r4, #0 + cmp r1, #0 + bls _021D3208 + ldr r5, [sp] + add r6, r7, #0 +_021D31E8: + ldr r0, [r5, #0] + ldr r2, [sp, #4] + add r1, r4, #0 + bl sub_02009714 + mov r1, #0x13 + lsl r1, r1, #4 + str r0, [r6, r1] + add r0, r1, #0 + add r0, #0x30 + ldrh r1, [r7, r0] + add r4, r4, #1 + add r5, r5, #4 + add r6, r6, #4 + cmp r4, r1 + blo _021D31E8 +_021D3208: + mov r0, #0 + str r0, [sp, #8] + cmp r1, #0 + bls _021D3266 + mov r6, #0x52 + add r5, r7, #0 + add r4, r0, #0 + lsl r6, r6, #2 +_021D3218: + ldr r0, [sp] + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D324C + ldr r1, [sp, #4] + bl sub_02009CFC + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x52 + lsl r0, r0, #2 + ldr r3, [r5, r0] + mov r1, #0 + ldr r0, [r3, #4] + cmp r0, #0 + bls _021D324C + add r2, r1, #0 +_021D323C: + ldr r0, [r3, #0] + add r1, r1, #1 + str r4, [r0, r2] + ldr r3, [r5, r6] + add r2, r2, #4 + ldr r0, [r3, #4] + cmp r1, r0 + blo _021D323C +_021D324C: + ldr r0, [sp] + add r5, r5, #4 + add r0, r0, #4 + str r0, [sp] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r1, [r7, r0] + ldr r0, [sp, #8] + cmp r0, r1 + blo _021D3218 +_021D3266: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021D326C: .word 0x00000162 + thumb_func_end ov5_021D3190 + + thumb_func_start ov5_021D3270 +ov5_021D3270: ; 0x021D3270 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x4d + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + ldr r1, [sp, #0x30] + add r6, r2, #0 + add r7, r3, #0 + bl sub_02009D34 + cmp r0, #0 + bne _021D3294 + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D3294: + ldr r0, [sp, #0x30] + add r2, r6, #0 + str r0, [sp] + ldr r0, [sp, #0x2c] + add r3, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x28] + str r0, [sp, #8] + ldr r0, _021D32E4 ; =0x00000162 + ldrh r1, [r5, r0] + sub r0, #0x2e + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_020098B8 + add r4, r0, #0 + beq _021D32DC + bl sub_0200A640 + cmp r0, #1 + beq _021D32C4 + bl sub_02022974 +_021D32C4: + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov5_021D3478 + ldr r1, [sp, #0x2c] + add r0, r4, #0 + bl sub_0200A760 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D32DC: + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D32E4: .word 0x00000162 + thumb_func_end ov5_021D3270 + + thumb_func_start ov5_021D32E8 +ov5_021D32E8: ; 0x021D32E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x4d + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + ldr r1, [sp, #0x30] + add r6, r2, #0 + add r7, r3, #0 + bl sub_02009D34 + cmp r0, #0 + bne _021D330C + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D330C: + ldr r0, [sp, #0x30] + add r2, r6, #0 + str r0, [sp] + ldr r0, [sp, #0x2c] + add r3, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x28] + str r0, [sp, #8] + ldr r0, _021D335C ; =0x00000162 + ldrh r1, [r5, r0] + sub r0, #0x2e + str r1, [sp, #0xc] + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02009B04 + add r4, r0, #0 + beq _021D3354 + bl sub_0200A640 + cmp r0, #1 + beq _021D333C + bl sub_02022974 +_021D333C: + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov5_021D3478 + ldr r1, [sp, #0x2c] + add r0, r4, #0 + bl sub_0200A760 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D3354: + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D335C: .word 0x00000162 + thumb_func_end ov5_021D32E8 + + thumb_func_start ov5_021D3360 +ov5_021D3360: ; 0x021D3360 + push {r4, lr} + sub sp, #8 + mov r4, #2 + str r4, [sp] + ldr r4, [sp, #0x10] + str r4, [sp, #4] + bl ov5_021D34AC + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D3360 + + thumb_func_start ov5_021D3374 +ov5_021D3374: ; 0x021D3374 + push {r4, lr} + sub sp, #8 + mov r4, #2 + str r4, [sp] + ldr r4, [sp, #0x10] + str r4, [sp, #4] + bl ov5_021D3518 + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D3374 + + thumb_func_start ov5_021D3388 +ov5_021D3388: ; 0x021D3388 + push {r4, lr} + sub sp, #8 + mov r4, #3 + str r4, [sp] + ldr r4, [sp, #0x10] + str r4, [sp, #4] + bl ov5_021D34AC + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D3388 + + thumb_func_start ov5_021D339C +ov5_021D339C: ; 0x021D339C + push {r4, lr} + sub sp, #8 + mov r4, #3 + str r4, [sp] + ldr r4, [sp, #0x10] + str r4, [sp, #4] + bl ov5_021D3518 + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D339C + + thumb_func_start ov5_021D33B0 +ov5_021D33B0: ; 0x021D33B0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r4, r1, #0 + ldr r0, [r5, r0] + ldr r1, [sp, #0x24] + add r6, r2, #0 + add r7, r3, #0 + bl sub_02009D34 + cmp r0, #0 + bne _021D33D4 + bl sub_02022974 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021D33D4: + ldr r0, [sp, #0x24] + add r2, r6, #0 + str r0, [sp] + ldr r0, [sp, #0x20] + add r3, r7, #0 + str r0, [sp, #4] + ldr r0, _021D3410 ; =0x00000162 + ldrh r1, [r5, r0] + sub r0, #0x32 + str r1, [sp, #8] + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200985C + add r4, r0, #0 + beq _021D3408 + bl sub_0200A3DC + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov5_021D3478 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021D3408: + bl sub_02022974 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3410: .word 0x00000162 + thumb_func_end ov5_021D33B0 + + thumb_func_start ov5_021D3414 +ov5_021D3414: ; 0x021D3414 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r4, r1, #0 + ldr r0, [r5, r0] + ldr r1, [sp, #0x24] + add r6, r2, #0 + add r7, r3, #0 + bl sub_02009D34 + cmp r0, #0 + bne _021D3438 + bl sub_02022974 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021D3438: + ldr r0, [sp, #0x24] + add r2, r6, #0 + str r0, [sp] + ldr r0, [sp, #0x20] + add r3, r7, #0 + str r0, [sp, #4] + ldr r0, _021D3474 ; =0x00000162 + ldrh r1, [r5, r0] + sub r0, #0x32 + str r1, [sp, #8] + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02009A4C + add r4, r0, #0 + beq _021D346C + bl sub_0200A3DC + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov5_021D3478 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021D346C: + bl sub_02022974 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3474: .word 0x00000162 + thumb_func_end ov5_021D3414 + + thumb_func_start ov5_021D3478 +ov5_021D3478: ; 0x021D3478 + push {r3, r4, r5, r6} + ldr r6, [r0, #4] + mov r3, #0 + cmp r6, #0 + ble _021D34A4 + ldr r5, [r0, #0] + add r4, r5, #0 +_021D3486: + ldr r2, [r4, #0] + cmp r2, #0 + bne _021D349C + lsl r2, r3, #2 + str r1, [r5, r2] + ldr r1, [r0, #8] + add r1, r1, #1 + str r1, [r0, #8] + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_021D349C: + add r3, r3, #1 + add r4, r4, #4 + cmp r3, r6 + blt _021D3486 +_021D34A4: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D3478 + + thumb_func_start ov5_021D34AC +ov5_021D34AC: ; 0x021D34AC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [sp, #0x28] + add r7, r1, #0 + lsl r4, r0, #2 + mov r0, #0x13 + lsl r0, r0, #4 + add r6, r5, r0 + ldr r0, [r6, r4] + ldr r1, [sp, #0x2c] + str r2, [sp, #0xc] + str r3, [sp, #0x10] + bl sub_02009D34 + cmp r0, #0 + bne _021D34D6 + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021D34D6: + ldr r0, [sp, #0x2c] + ldr r2, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #0x28] + ldr r3, [sp, #0x10] + str r0, [sp, #4] + ldr r0, _021D3514 ; =0x00000162 + add r1, r7, #0 + ldrh r0, [r5, r0] + str r0, [sp, #8] + ldr r0, [r6, r4] + bl sub_02009918 + add r1, r0, #0 + beq _021D350C + mov r0, #0x52 + add r2, r5, r4 + lsl r0, r0, #2 + ldr r0, [r2, r0] + bl ov5_021D3478 + cmp r0, #1 + beq _021D3510 + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021D350C: + bl sub_02022974 +_021D3510: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3514: .word 0x00000162 + thumb_func_end ov5_021D34AC + + thumb_func_start ov5_021D3518 +ov5_021D3518: ; 0x021D3518 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [sp, #0x28] + add r7, r1, #0 + lsl r4, r0, #2 + mov r0, #0x13 + lsl r0, r0, #4 + add r6, r5, r0 + ldr r0, [r6, r4] + ldr r1, [sp, #0x2c] + str r2, [sp, #0xc] + str r3, [sp, #0x10] + bl sub_02009D34 + cmp r0, #0 + bne _021D3542 + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021D3542: + ldr r0, [sp, #0x2c] + ldr r2, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #0x28] + ldr r3, [sp, #0x10] + str r0, [sp, #4] + ldr r0, _021D3580 ; =0x00000162 + add r1, r7, #0 + ldrh r0, [r5, r0] + str r0, [sp, #8] + ldr r0, [r6, r4] + bl sub_02009BC4 + add r1, r0, #0 + beq _021D3578 + mov r0, #0x52 + add r2, r5, r4 + lsl r0, r0, #2 + ldr r0, [r2, r0] + bl ov5_021D3478 + cmp r0, #1 + beq _021D357C + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021D3578: + bl sub_02022974 +_021D357C: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3580: .word 0x00000162 + thumb_func_end ov5_021D3518 + + thumb_func_start ov5_021D3584 +ov5_021D3584: ; 0x021D3584 + push {r3, r4, r5, r6, lr} + sub sp, #0x74 + add r5, r0, #0 + ldr r0, _021D3758 ; =0x00000162 + add r4, r1, #0 + ldrh r0, [r5, r0] + mov r1, #0x10 + bl sub_02018144 + add r6, r0, #0 + ldr r0, _021D3758 ; =0x00000162 + mov r1, #8 + ldrh r0, [r5, r0] + bl sub_02018144 + str r0, [r6, #8] + ldr r0, _021D3758 ; =0x00000162 + mov r1, #0x24 + ldrh r0, [r5, r0] + bl sub_02018144 + ldr r1, [r6, #8] + add r2, r4, #0 + str r0, [r1, #0] + ldr r0, [r6, #8] + mov r1, #0 + ldr r0, [r0, #0] + add r3, sp, #0x2c + str r0, [r6, #4] +_021D35BE: + ldr r0, [r2, #0x14] + add r1, r1, #1 + add r2, r2, #4 + stmia r3!, {r0} + cmp r1, #6 + blt _021D35BE + mov r1, #5 + lsl r1, r1, #6 + ldr r0, [r5, r1] + cmp r0, #0 + beq _021D35DC + add r1, r1, #4 + ldr r1, [r5, r1] + cmp r1, #0 + bne _021D35E6 +_021D35DC: + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x3c] + str r0, [sp, #0x40] + b _021D361C +_021D35E6: + mov r2, #0 + ldr r1, [sp, #0x3c] + mvn r2, r2 + cmp r1, r2 + beq _021D35FE + bl sub_02009D34 + cmp r0, #0 + bne _021D35FE + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x3c] +_021D35FE: + mov r0, #0 + ldr r1, [sp, #0x40] + mvn r0, r0 + cmp r1, r0 + beq _021D361C + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009D34 + cmp r0, #0 + bne _021D361C + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x40] +_021D361C: + ldr r0, [sp, #0x38] + str r0, [sp] + ldr r0, [sp, #0x3c] + str r0, [sp, #4] + ldr r0, [sp, #0x40] + str r0, [sp, #8] + ldr r0, [r4, #0x30] + str r0, [sp, #0xc] + ldr r0, [r4, #0x2c] + str r0, [sp, #0x10] + mov r0, #0x13 + lsl r0, r0, #4 + ldr r1, [r5, r0] + str r1, [sp, #0x14] + add r1, r0, #4 + ldr r1, [r5, r1] + str r1, [sp, #0x18] + add r1, r0, #0 + add r1, #8 + ldr r1, [r5, r1] + str r1, [sp, #0x1c] + add r1, r0, #0 + add r1, #0xc + ldr r1, [r5, r1] + str r1, [sp, #0x20] + add r1, r0, #0 + add r1, #0x10 + ldr r1, [r5, r1] + add r0, #0x14 + str r1, [sp, #0x24] + ldr r0, [r5, r0] + str r0, [sp, #0x28] + ldr r0, [r6, #4] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x30] + ldr r3, [sp, #0x34] + bl sub_020093B4 + ldr r0, [r5, #0] + str r0, [sp, #0x44] + ldr r0, [r6, #4] + str r0, [sp, #0x48] + mov r0, #0 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _021D368A + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D3698 +_021D368A: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D3698: + bl sub_020E1740 + str r0, [sp, #0x4c] + mov r0, #2 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _021D36B8 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D36C6 +_021D36B8: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D36C6: + bl sub_020E1740 + str r0, [sp, #0x50] + mov r0, #4 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _021D36E6 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D36F4 +_021D36E6: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D36F4: + bl sub_020E1740 + str r0, [sp, #0x54] + ldr r0, [r4, #0x10] + cmp r0, #2 + bne _021D370A + mov r0, #3 + ldr r1, [sp, #0x50] + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x50] +_021D370A: + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #0x58] + str r0, [sp, #0x5c] + str r0, [sp, #0x60] + mov r1, #0 + add r0, sp, #0x2c + strh r1, [r0, #0x38] + ldr r0, [r4, #8] + str r0, [sp, #0x68] + ldr r0, [r4, #0x10] + str r0, [sp, #0x6c] + ldr r0, _021D3758 ; =0x00000162 + ldrh r0, [r5, r0] + str r0, [sp, #0x70] + add r0, sp, #0x44 + bl sub_02021AA0 + str r0, [r6, #0] + cmp r0, #0 + beq _021D374E + bl sub_02021EE8 + add r5, r0, #0 + ldrh r1, [r4, #6] + ldr r0, [r6, #0] + bl sub_02021D6C + ldr r1, [r4, #0xc] + ldr r0, [r6, #0] + add r1, r5, r1 + bl sub_02021E90 + b _021D3752 +_021D374E: + bl sub_02022974 +_021D3752: + add r0, r6, #0 + add sp, #0x74 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D3758: .word 0x00000162 + thumb_func_end ov5_021D3584 + + thumb_func_start ov5_021D375C +ov5_021D375C: ; 0x021D375C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + bl sub_02021964 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0200A508 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0200A700 + mov r0, #0x16 + lsl r0, r0, #4 + ldrh r0, [r6, r0] + mov r4, #0 + cmp r0, #0 + bls _021D37AA + mov r7, #0x16 + add r5, r6, #0 + lsl r7, r7, #4 +_021D378C: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009D20 + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02009754 + ldrh r0, [r6, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blo _021D378C +_021D37AA: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D375C + + .rodata + + + .global Unk_ov5_021F89C0 +Unk_ov5_021F89C0: ; 0x021F89C0 + .incbin "incbin/overlay5_rodata.bin", 0xAC, 0xC + diff --git a/asm/ov5_021D37AC.s b/asm/ov5_021D37AC.s new file mode 100644 index 000000000..96c42da0b --- /dev/null +++ b/asm/ov5_021D37AC.s @@ -0,0 +1,1685 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D37AC +ov5_021D37AC: ; 0x021D37AC + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + mov r0, #0 + ldr r1, [r7, #0x18] + mvn r0, r0 + add r4, r3, #0 + cmp r1, r0 + bne _021D37C4 + bl sub_02022974 +_021D37C4: + mov r0, #0 + add r1, r6, #0 +_021D37C8: + ldr r2, [r1, #0] + cmp r2, #0 + beq _021D37DE + ldr r2, [r1, #0xc] + cmp r4, r2 + bne _021D37DE + ldr r2, [r1, #4] + cmp r2, r5 + bne _021D37DE + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D37DE: + add r0, r0, #1 + add r1, #0x10 + cmp r0, #2 + blt _021D37C8 + mov r2, #0 + add r1, r6, #0 +_021D37EA: + ldr r0, [r1, #0] + cmp r0, #0 + bne _021D3800 + lsl r1, r2, #4 + mov r0, #1 + str r0, [r6, r1] + add r0, r6, r1 + str r4, [r0, #0xc] + str r7, [r0, #8] + str r5, [r0, #4] + b _021D3808 +_021D3800: + add r2, r2, #1 + add r1, #0x10 + cmp r2, #2 + blt _021D37EA +_021D3808: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D37AC + + thumb_func_start ov5_021D380C +ov5_021D380C: ; 0x021D380C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0 + add r4, r1, #0 + mvn r0, r0 + add r7, r2, #0 + add r5, r3, #0 + cmp r4, r0 + bne _021D3822 + bl sub_02022974 +_021D3822: + add r0, r6, #0 + add r1, r4, #0 + mov r2, #4 + bl sub_02006CB8 + add r4, r0, #0 + bne _021D3834 + bl sub_02022974 +_021D3834: + add r0, r4, #0 + mov r1, #0 + bl sub_020B3C5C + add r6, r0, #0 + bne _021D3844 + bl sub_02022974 +_021D3844: + ldr r0, [sp, #0x1c] + add r1, r6, #0 + add r2, r7, #0 + bl sub_020B2CB4 + str r0, [r5, #0] + cmp r5, #0 + bne _021D3858 + bl sub_02022974 +_021D3858: + ldr r0, [r5, #0] + ldr r3, [sp, #0x18] + add r1, r6, #0 + add r2, r7, #0 + bl sub_020AE4F0 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D380C + + thumb_func_start ov5_021D3868 +ov5_021D3868: ; 0x021D3868 + push {r3, lr} + cmp r1, #0 + bne _021D3872 + mov r0, #0 + pop {r3, pc} +_021D3872: + cmp r0, #0 + bne _021D387A + mov r0, #0 + pop {r3, pc} +_021D387A: + bl sub_020AE870 + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3868 + + thumb_func_start ov5_021D3884 +ov5_021D3884: ; 0x021D3884 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021D388C: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D38AE + ldr r0, [r5, #8] + bl ov5_021D3F70 + cmp r0, #0 + beq _021D38AE + ldr r1, [r5, #8] + ldr r0, [r5, #4] + ldr r1, [r1, #0] + bl ov5_021D3868 + str r6, [r5, #0] + str r6, [r5, #0xc] + str r6, [r5, #8] + str r6, [r5, #4] +_021D38AE: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #2 + blt _021D388C + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D3884 + + thumb_func_start ov5_021D38B8 +ov5_021D38B8: ; 0x021D38B8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0xae + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + add r7, r0, #0 + mov r1, #0 + add r2, r7, #0 + add r6, r1, #0 + sub r0, r1, #1 +_021D38CE: + str r6, [r2, #0x14] + str r6, [r2, #0x20] + str r6, [r2, #0x10] + str r6, [r2, #0x18] + str r6, [r2, #0x1c] + str r6, [r2, #0x24] + str r0, [r2, #0x28] + str r6, [r2, #0x2c] + str r6, [r2, #0x30] + str r6, [r2, #0x34] + add r1, r1, #1 + add r2, #0x28 + cmp r1, #0x10 + blt _021D38CE + mov r0, #0x29 + lsl r0, r0, #4 + add r2, r0, #0 + add r3, r0, #0 + add r5, r7, #0 + mov r4, #0 + add r1, r0, #4 + add r2, #8 + add r3, #0xc +_021D38FC: + str r4, [r5, r0] + str r4, [r5, r1] + str r4, [r5, r2] + str r4, [r5, r3] + add r6, r6, #1 + add r5, #0x10 + cmp r6, #2 + blt _021D38FC + mov r1, #4 + add r0, r7, #0 + add r2, r1, #0 + bl sub_020182CC + mov r0, #0x6e + mov r1, #4 + bl sub_02006C24 + mov r1, #0x2b + lsl r1, r1, #4 + str r0, [r7, r1] + mov r0, #0x6f + mov r1, #4 + bl sub_02006C24 + mov r1, #0xad + lsl r1, r1, #2 + str r0, [r7, r1] + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D38B8 + + thumb_func_start ov5_021D3938 +ov5_021D3938: ; 0x021D3938 + cmp r0, #0 + bne _021D3940 + mov r0, #0 + bx lr +_021D3940: + ldr r0, [r0, #0] + bx lr + thumb_func_end ov5_021D3938 + + thumb_func_start ov5_021D3944 +ov5_021D3944: ; 0x021D3944 + mov r1, #1 + and r0, r1 + cmp r0, #1 + beq _021D394E + mov r1, #0 +_021D394E: + add r0, r1, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D3944 + + thumb_func_start ov5_021D3954 +ov5_021D3954: ; 0x021D3954 + asr r1, r0, #1 + mov r0, #1 + and r1, r0 + cmp r1, #1 + beq _021D3960 + mov r0, #0 +_021D3960: + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D3954 + + thumb_func_start ov5_021D3964 +ov5_021D3964: ; 0x021D3964 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #1 + beq _021D3972 + bl sub_02022974 +_021D3972: + ldr r0, [r4, #0x1c] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3964 + + thumb_func_start ov5_021D3978 +ov5_021D3978: ; 0x021D3978 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r6, r0, #0 + mov r0, #0xad + ldr r7, [sp, #0x4c] + lsl r0, r0, #2 + add r4, r1, #0 + str r2, [sp, #8] + ldr r0, [r7, r0] + add r1, r6, #0 + add r2, sp, #0x10 + add r5, r3, #0 + bl sub_02006D28 + cmp r4, #4 + blt _021D399C + bl sub_02022974 +_021D399C: + lsl r1, r4, #2 + add r0, sp, #0x14 + ldr r0, [r0, r1] + mov r1, #0 + mvn r1, r1 + str r0, [sp, #0xc] + cmp r0, r1 + bne _021D39B2 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D39B2: + add r0, sp, #0x10 + ldrb r0, [r0, #1] + bl ov5_021D3944 + ldr r1, [sp, #0x40] + cmp r1, r0 + beq _021D39C6 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D39C6: + mov r6, #0 + add r4, r7, #0 +_021D39CA: + cmp r5, #0 + beq _021D39D8 + ldr r0, [r4, #0x34] + cmp r5, r0 + bne _021D39D8 + bl sub_02022974 +_021D39D8: + add r6, r6, #1 + add r4, #0x28 + cmp r6, #0x10 + blt _021D39CA + mov r2, #0 + add r1, r7, #0 +_021D39E4: + ldr r0, [r1, #0x14] + cmp r0, #0 + bne _021D3A3C + add r4, r2, #0 + mov r0, #0x28 + mul r4, r0 + mov r1, #1 + add r0, r7, r4 + str r1, [r0, #0x14] + ldr r1, [sp, #0x3c] + add r6, r7, #0 + str r1, [r0, #0x20] + add r6, #0x10 + mov r1, #0 + str r1, [r6, r4] + str r1, [r0, #0x18] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x44] + str r1, [r0, #0x1c] + ldr r1, [sp, #0x38] + add r3, r6, r4 + str r1, [r0, #0x30] + str r5, [r0, #0x34] + ldr r0, [sp, #0x48] + ldr r1, [sp, #0xc] + str r0, [sp] + mov r0, #0x2b + str r7, [sp, #4] + lsl r0, r0, #4 + ldr r0, [r7, r0] + bl ov5_021D380C + add r1, r7, r4 + str r0, [r1, #0x24] + ldr r0, [sp, #8] + str r0, [r1, #0x28] + mov r0, #1 + str r0, [r1, #0x2c] + add r0, r6, r4 + bl ov5_021D3E7C + add sp, #0x24 + add r0, r6, r4 + pop {r4, r5, r6, r7, pc} +_021D3A3C: + add r2, r2, #1 + add r1, #0x28 + cmp r2, #0x10 + blt _021D39E4 + bl sub_02022974 + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3978 + + thumb_func_start ov5_021D3A50 +ov5_021D3A50: ; 0x021D3A50 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r4, r0, #0 + mov r0, #0xad + add r6, r3, #0 + lsl r0, r0, #2 + str r1, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r6, r0] + add r1, r4, #0 + add r2, sp, #0x20 + bl sub_02006D28 + add r0, sp, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _021D3B20 + mov r0, #0 + str r0, [sp, #0x14] + add r0, sp, #0x20 + str r0, [sp, #0x10] +_021D3A7A: + ldr r0, [sp, #0x10] + mov r1, #0 + ldr r0, [r0, #4] + mvn r1, r1 + str r0, [sp, #0x18] + cmp r0, r1 + beq _021D3B20 + add r0, sp, #0x20 + ldrb r0, [r0, #1] + bl ov5_021D3944 + cmp r0, #0 + bne _021D3B20 + mov r4, #0 + add r1, r6, #0 +_021D3A98: + ldr r0, [r1, #0x14] + cmp r0, #0 + bne _021D3B00 + mov r0, #0x28 + add r7, r4, #0 + mul r7, r0 + add r5, r6, r7 + mov r0, #1 + str r0, [r5, #0x14] + mov r1, #0 + str r1, [r5, #0x20] + str r1, [r5, #0x10] + ldr r0, [sp, #0x18] + str r1, [r5, #0x18] + str r0, [r5, #0x1c] + add r0, r6, #0 + str r0, [sp, #0x1c] + add r0, #0x10 + str r0, [sp, #0x1c] + str r1, [r5, #0x30] + str r1, [r5, #0x34] + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x1c] + str r0, [sp] + mov r0, #0x2b + str r6, [sp, #4] + lsl r0, r0, #4 + ldr r0, [r6, r0] + ldr r1, [sp, #0x18] + ldr r2, [sp, #8] + add r3, r3, r7 + bl ov5_021D380C + str r0, [r5, #0x24] + mov r0, #0 + mvn r0, r0 + str r0, [r5, #0x28] + mov r0, #1 + str r0, [r5, #0x2c] + ldr r0, [sp, #0x1c] + add r0, r0, r7 + bl ov5_021D3E7C + add r0, sp, #0x20 + ldrb r0, [r0, #2] + cmp r0, #0 + beq _021D3B08 + add r1, r5, #0 + mov r0, #1 + str r0, [r1, #0x20] + str r0, [r1, #0x28] + b _021D3B08 +_021D3B00: + add r4, r4, #1 + add r1, #0x28 + cmp r4, #0x10 + blt _021D3A98 +_021D3B08: + cmp r4, #0x10 + bne _021D3B10 + bl sub_02022974 +_021D3B10: + ldr r0, [sp, #0x10] + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #4 + blt _021D3A7A +_021D3B20: + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021D3A50 + + thumb_func_start ov5_021D3B24 +ov5_021D3B24: ; 0x021D3B24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + ldr r6, [sp, #0x30] + add r5, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + str r3, [sp] + cmp r6, #0 + bne _021D3B40 + bl sub_02022974 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D3B40: + add r0, r6, #0 + bl ov5_021D3F84 + cmp r5, r0 + blt _021D3B50 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D3B50: + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r1, r5, #0 + add r2, sp, #4 + bl sub_02006D28 + cmp r4, #4 + blt _021D3B66 + bl sub_02022974 +_021D3B66: + lsl r1, r4, #2 + add r0, sp, #8 + ldr r5, [r0, r1] + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _021D3B7A + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D3B7A: + add r0, sp, #4 + ldrb r0, [r0, #1] + bl ov5_021D3954 + cmp r7, r0 + beq _021D3B8C + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D3B8C: + mov r4, #0 + add r1, r6, #0 +_021D3B90: + ldr r0, [r1, #0x1c] + cmp r5, r0 + bne _021D3BD4 + add r0, sp, #4 + ldrb r0, [r0, #2] + cmp r0, #0 + beq _021D3BBA + add r2, r6, #0 + mov r3, #0x28 + mov r0, #0x29 + lsl r0, r0, #4 + add r2, #0x10 + mul r3, r4 + add r2, r2, r3 + lsl r3, r5, #0x18 + ldr r1, [sp] + add r0, r6, r0 + lsr r3, r3, #0x18 + bl ov5_021D37AC + b _021D3BBC +_021D3BBA: + mov r0, #1 +_021D3BBC: + cmp r0, #0 + beq _021D3BCE + mov r1, #0x28 + mul r1, r4 + add r1, r6, r1 + ldr r0, [sp] + ldr r1, [r1, #0x10] + bl sub_020AE77C +_021D3BCE: + add sp, #0x18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D3BD4: + add r4, r4, #1 + add r1, #0x28 + cmp r4, #0x10 + blt _021D3B90 + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3B24 + + thumb_func_start ov5_021D3BE4 +ov5_021D3BE4: ; 0x021D3BE4 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, _021D3CA8 ; =0x00000000 + str r1, [sp, #0xc] + add r4, r2, #0 + str r0, [sp] + bne _021D3BF8 + bl sub_02022974 +_021D3BF8: + add r0, r4, #0 + bl ov5_021D3F84 + cmp r5, r0 + blt _021D3C08 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D3C08: + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + add r2, sp, #0x10 + bl sub_02006D28 + add r0, sp, #0x10 + ldrb r0, [r0, #1] + bl ov5_021D3954 + cmp r0, #0 + beq _021D3C28 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D3C28: + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + str r0, [sp, #8] + add r0, #0x10 + add r7, sp, #0x10 + str r0, [sp, #8] +_021D3C36: + mov r0, #0 + ldr r3, [r7, #4] + mvn r0, r0 + cmp r3, r0 + bne _021D3C46 + ldr r0, [sp] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} +_021D3C46: + mov r5, #0 + add r1, r4, #0 +_021D3C4A: + ldr r0, [r1, #0x1c] + cmp r3, r0 + bne _021D3C8E + add r0, sp, #0x10 + ldrb r0, [r0, #2] + cmp r0, #0 + beq _021D3C74 + mov r2, #0x28 + add r6, r5, #0 + mov r0, #0x29 + mul r6, r2 + ldr r2, [sp, #8] + lsl r0, r0, #4 + lsl r3, r3, #0x18 + ldr r1, [sp, #0xc] + add r0, r4, r0 + add r2, r2, r6 + lsr r3, r3, #0x18 + bl ov5_021D37AC + b _021D3C76 +_021D3C74: + mov r0, #1 +_021D3C76: + cmp r0, #0 + beq _021D3C96 + mov r1, #0x28 + mul r1, r5 + add r1, r4, r1 + ldr r0, [sp, #0xc] + ldr r1, [r1, #0x10] + bl sub_020AE77C + mov r0, #1 + str r0, [sp] + b _021D3C96 +_021D3C8E: + add r5, r5, #1 + add r1, #0x28 + cmp r5, #0x10 + blt _021D3C4A +_021D3C96: + ldr r0, [sp, #4] + add r7, r7, #4 + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #4 + blt _021D3C36 + ldr r0, [sp] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3CA8: .word 0x00000000 + thumb_func_end ov5_021D3BE4 + + thumb_func_start ov5_021D3CAC +ov5_021D3CAC: ; 0x021D3CAC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + beq _021D3CE0 + mov r4, #0 + add r5, r6, #0 + add r7, r4, #0 +_021D3CB8: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021D3CD8 + cmp r0, #1 + bne _021D3CD2 + ldr r1, [r5, #0x10] + add r0, r6, #0 + bl sub_020B2CD8 + str r7, [r5, #0x10] + ldr r0, [r5, #0x24] + bl sub_020181C4 +_021D3CD2: + mov r0, #0 + str r0, [r5, #0x14] + str r0, [r5, #0x34] +_021D3CD8: + add r4, r4, #1 + add r5, #0x28 + cmp r4, #0x10 + blt _021D3CB8 +_021D3CE0: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3CAC + + thumb_func_start ov5_021D3CE4 +ov5_021D3CE4: ; 0x021D3CE4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + beq _021D3D16 + cmp r5, #0 + bne _021D3CF4 + bl sub_02022974 +_021D3CF4: + ldr r0, [r5, #4] + cmp r0, #0 + beq _021D3D16 + cmp r0, #1 + bne _021D3D10 + ldr r1, [r5, #0] + add r0, r4, #0 + bl sub_020B2CD8 + mov r0, #0 + str r0, [r5, #0] + ldr r0, [r5, #0x14] + bl sub_020181C4 +_021D3D10: + mov r0, #0 + str r0, [r5, #4] + str r0, [r5, #0x24] +_021D3D16: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D3CE4 + + thumb_func_start ov5_021D3D18 +ov5_021D3D18: ; 0x021D3D18 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0xad + lsl r0, r0, #2 + add r6, r1, #0 + add r1, r2, #0 + ldr r0, [r4, r0] + add r2, sp, #0 + add r5, r3, #0 + bl sub_02006D28 + cmp r5, #4 + blt _021D3D38 + bl sub_02022974 +_021D3D38: + lsl r1, r5, #2 + add r0, sp, #4 + ldr r5, [r0, r1] + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _021D3D4A + bl sub_02022974 +_021D3D4A: + mov r0, #0 + mov r2, #0x28 +_021D3D4E: + add r1, r0, #0 + mul r1, r2 + add r1, r4, r1 + ldr r3, [r1, #0x14] + cmp r3, #1 + bne _021D3D6C + ldr r3, [r1, #0x1c] + cmp r5, r3 + bne _021D3D6C + ldr r1, [r1, #0x10] + add r0, r6, #0 + bl ov5_021D3868 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021D3D6C: + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x10 + blo _021D3D4E + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3D18 + + thumb_func_start ov5_021D3D7C +ov5_021D3D7C: ; 0x021D3D7C + push {r4, lr} + add r4, r0, #0 + beq _021D3D9C + mov r0, #0x2b + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02006CA8 + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02006CA8 + add r0, r4, #0 + bl sub_020181C4 +_021D3D9C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3D7C + + thumb_func_start ov5_021D3DA0 +ov5_021D3DA0: ; 0x021D3DA0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _021D3DAE + bl sub_02022974 +_021D3DAE: + mov r6, #0 + add r1, r6, #0 + add r2, r4, #0 +_021D3DB4: + ldr r0, [r2, #0x34] + cmp r5, r0 + bne _021D3DCE + mov r0, #0x28 + add r4, #0x10 + mul r0, r1 + add r6, r4, r0 + ldr r0, [r6, #4] + cmp r0, #0 + bne _021D3DD6 + bl sub_02022974 + b _021D3DD6 +_021D3DCE: + add r1, r1, #1 + add r2, #0x28 + cmp r1, #0x10 + blt _021D3DB4 +_021D3DD6: + cmp r6, #0 + bne _021D3DDE + bl sub_02022974 +_021D3DDE: + add r0, r6, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3DA0 + + thumb_func_start ov5_021D3DE4 +ov5_021D3DE4: ; 0x021D3DE4 + push {r4, r5, lr} + sub sp, #0x14 + add r3, r0, #0 + mov r0, #0xad + add r5, r2, #0 + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + add r1, r3, #0 + add r2, sp, #0 + bl sub_02006D28 + cmp r4, #4 + blt _021D3E04 + bl sub_02022974 +_021D3E04: + lsl r1, r4, #2 + add r0, sp, #4 + mov r4, #0 + ldr r1, [r0, r1] + add r2, r4, #0 + add r3, r5, #0 +_021D3E10: + ldr r0, [r3, #0x1c] + cmp r1, r0 + bne _021D3E2A + mov r0, #0x28 + add r5, #0x10 + mul r0, r2 + add r4, r5, r0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021D3E32 + bl sub_02022974 + b _021D3E32 +_021D3E2A: + add r2, r2, #1 + add r3, #0x28 + cmp r2, #0x10 + blt _021D3E10 +_021D3E32: + cmp r4, #0 + bne _021D3E3A + bl sub_02022974 +_021D3E3A: + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov5_021D3DE4 + + thumb_func_start ov5_021D3E40 +ov5_021D3E40: ; 0x021D3E40 + str r1, [r0, #0x10] + bx lr + thumb_func_end ov5_021D3E40 + + thumb_func_start ov5_021D3E44 +ov5_021D3E44: ; 0x021D3E44 + mov r1, #1 + str r1, [r0, #0x1c] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D3E44 + + thumb_func_start ov5_021D3E4C +ov5_021D3E4C: ; 0x021D3E4C + ldr r1, [r0, #0x20] + ldr r0, [r0, #0] + cmp r1, #0 + bne _021D3E6E + ldr r2, [r0, #0] + ldr r0, [r0, #8] + ldrh r0, [r0, #4] + lsl r1, r0, #0xc + mov r0, #1 + lsl r0, r0, #0xc + sub r0, r1, r0 + cmp r2, r0 + blt _021D3E6A + mov r0, #1 + bx lr +_021D3E6A: + mov r0, #0 + bx lr +_021D3E6E: + ldr r0, [r0, #0] + cmp r0, #0 + bne _021D3E78 + mov r0, #1 + bx lr +_021D3E78: + mov r0, #0 + bx lr + thumb_func_end ov5_021D3E4C + + thumb_func_start ov5_021D3E7C +ov5_021D3E7C: ; 0x021D3E7C + ldr r1, [r0, #0x20] + cmp r1, #0 + bne _021D3E8A + ldr r0, [r0, #0] + mov r1, #0 + str r1, [r0, #0] + bx lr +_021D3E8A: + ldr r2, [r0, #0] + ldr r0, [r2, #8] + ldrh r0, [r0, #4] + lsl r1, r0, #0xc + mov r0, #1 + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [r2, #0] + bx lr + thumb_func_end ov5_021D3E7C + + thumb_func_start ov5_021D3E9C +ov5_021D3E9C: ; 0x021D3E9C + ldr r1, [r0, #0x20] + cmp r1, #0 + bne _021D3EB4 + ldr r2, [r0, #0] + ldr r0, [r2, #8] + ldrh r0, [r0, #4] + lsl r1, r0, #0xc + mov r0, #1 + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [r2, #0] + bx lr +_021D3EB4: + ldr r0, [r0, #0] + mov r1, #0 + str r1, [r0, #0] + bx lr + thumb_func_end ov5_021D3E9C + + thumb_func_start ov5_021D3EBC +ov5_021D3EBC: ; 0x021D3EBC + ldr r1, [r0, #0x20] + cmp r1, #0 + bne _021D3EE2 + ldr r3, [r0, #0] + mov r1, #1 + ldr r2, [r3, #0] + lsl r1, r1, #0xc + add r1, r2, r1 + str r1, [r3, #0] + ldr r2, [r0, #0] + ldr r0, [r2, #8] + ldr r1, [r2, #0] + ldrh r0, [r0, #4] + lsl r0, r0, #0xc + cmp r1, r0 + bne _021D3F02 + mov r0, #0 + str r0, [r2, #0] + bx lr +_021D3EE2: + ldr r0, [r0, #0] + ldr r2, [r0, #0] + cmp r2, #0 + bgt _021D3EFA + ldr r1, [r0, #8] + ldrh r1, [r1, #4] + lsl r2, r1, #0xc + mov r1, #1 + lsl r1, r1, #0xc + sub r1, r2, r1 + str r1, [r0, #0] + bx lr +_021D3EFA: + mov r1, #1 + lsl r1, r1, #0xc + sub r1, r2, r1 + str r1, [r0, #0] +_021D3F02: + bx lr + thumb_func_end ov5_021D3EBC + + thumb_func_start ov5_021D3F04 +ov5_021D3F04: ; 0x021D3F04 + str r1, [r0, #0x20] + bx lr + thumb_func_end ov5_021D3F04 + + thumb_func_start ov5_021D3F08 +ov5_021D3F08: ; 0x021D3F08 + str r1, [r0, #0x18] + bx lr + thumb_func_end ov5_021D3F08 + + thumb_func_start ov5_021D3F0C +ov5_021D3F0C: ; 0x021D3F0C + str r1, [r0, #0x24] + bx lr + thumb_func_end ov5_021D3F0C + + thumb_func_start ov5_021D3F10 +ov5_021D3F10: ; 0x021D3F10 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + cmp r0, #0 + beq _021D3F6E + mov r4, #0 + add r5, r0, #0 + add r5, #0x10 + add r6, r4, #0 + sub r7, r4, #1 +_021D3F22: + ldr r0, [r5, #4] + cmp r0, #1 + bne _021D3F5A + ldr r0, [r5, #0x10] + cmp r0, #1 + beq _021D3F5A + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _021D3F5A + add r0, r5, #0 + bl ov5_021D3EBC + ldr r0, [r5, #0x18] + cmp r0, r7 + beq _021D3F5A + add r0, r5, #0 + bl ov5_021D3E4C + cmp r0, #0 + beq _021D3F5A + ldr r0, [r5, #8] + add r1, r0, #1 + ldr r0, [r5, #0x18] + cmp r1, r0 + blt _021D3F58 + str r6, [r5, #0x1c] + b _021D3F5A +_021D3F58: + str r1, [r5, #8] +_021D3F5A: + add r4, r4, #1 + add r5, #0x28 + cmp r4, #0x10 + blt _021D3F22 + mov r1, #0x29 + ldr r0, [sp] + lsl r1, r1, #4 + add r0, r0, r1 + bl ov5_021D3884 +_021D3F6E: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D3F10 + + thumb_func_start ov5_021D3F70 +ov5_021D3F70: ; 0x021D3F70 + push {r3, lr} + bl ov5_021D3964 + cmp r0, #0 + bne _021D3F7E + mov r0, #1 + pop {r3, pc} +_021D3F7E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3F70 + + thumb_func_start ov5_021D3F84 +ov5_021D3F84: ; 0x021D3F84 + mov r1, #0xad + lsl r1, r1, #2 + ldr r3, _021D3F90 ; =sub_02006E34 + ldr r0, [r0, r1] + bx r3 + nop +_021D3F90: .word sub_02006E34 + thumb_func_end ov5_021D3F84 + + thumb_func_start ov5_021D3F94 +ov5_021D3F94: ; 0x021D3F94 + push {lr} + sub sp, #0x14 + mov r2, #0xad + lsl r2, r2, #2 + ldr r0, [r0, r2] + add r2, sp, #0 + bl sub_02006D28 + add r0, sp, #0 + ldrb r0, [r0] + cmp r0, #0 + bne _021D3FB2 + add sp, #0x14 + mov r0, #0 + pop {pc} +_021D3FB2: + mov r0, #0 + add r3, sp, #0 + sub r1, r0, #1 +_021D3FB8: + lsl r2, r0, #2 + add r2, r3, r2 + ldr r2, [r2, #4] + cmp r2, r1 + beq _021D3FCC + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #4 + blo _021D3FB8 +_021D3FCC: + add sp, #0x14 + pop {pc} + thumb_func_end ov5_021D3F94 + + thumb_func_start ov5_021D3FD0 +ov5_021D3FD0: ; 0x021D3FD0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bne _021D3FDC + bl sub_02022974 +_021D3FDC: + mov r1, #0x10 + mov r0, #0 + mov r2, #0x38 +_021D3FE2: + cmp r1, #0x10 + bne _021D3FF6 + add r3, r0, #0 + mul r3, r2 + add r3, r5, r3 + add r3, #0x34 + ldrb r3, [r3] + cmp r3, #0 + bne _021D3FF6 + add r1, r0, #0 +_021D3FF6: + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x10 + blo _021D3FE2 + cmp r1, #0x10 + beq _021D4012 + mov r0, #0x38 + add r2, r1, #0 + mul r2, r0 + add r0, r5, r2 + add r0, #0x34 + strb r4, [r0] + b _021D401A +_021D4012: + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D401A: + add r0, r5, r2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D3FD0 + + thumb_func_start ov5_021D4020 +ov5_021D4020: ; 0x021D4020 + add r1, r0, #0 + mov r3, #0 + add r1, #0x34 + strb r3, [r1] + str r3, [r0, #0x30] + str r3, [r0, #0x2c] + add r2, r3, #0 +_021D402E: + lsl r1, r3, #2 + add r1, r0, r1 + str r2, [r1, #0x14] + add r1, r3, #1 + lsl r1, r1, #0x18 + lsr r3, r1, #0x18 + cmp r3, #6 + blo _021D402E + bx lr + thumb_func_end ov5_021D4020 + + thumb_func_start ov5_021D4040 +ov5_021D4040: ; 0x021D4040 + push {r4, r5} + mov r4, #0 + add r3, r4, #0 + add r5, r0, #0 +_021D4048: + add r2, r5, #0 + add r2, #0x34 + ldrb r2, [r2] + cmp r1, r2 + bne _021D405A + mov r1, #0x38 + mul r1, r3 + add r4, r0, r1 + b _021D4062 +_021D405A: + add r3, r3, #1 + add r5, #0x38 + cmp r3, #0x10 + blt _021D4048 +_021D4062: + add r0, r4, #0 + pop {r4, r5} + bx lr + thumb_func_end ov5_021D4040 + + thumb_func_start ov5_021D4068 +ov5_021D4068: ; 0x021D4068 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #4 + ble _021D4078 + bl sub_02022974 +_021D4078: + cmp r5, #0 + beq _021D407E + str r5, [r6, #0x14] +_021D407E: + str r4, [r6, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D4068 + + thumb_func_start ov5_021D4084 +ov5_021D4084: ; 0x021D4084 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + add r6, r2, #0 + cmp r4, r0 + blt _021D4096 + bl sub_02022974 +_021D4096: + lsl r0, r4, #2 + str r6, [r5, r0] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D4084 + + thumb_func_start ov5_021D409C +ov5_021D409C: ; 0x021D409C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + cmp r4, r0 + blt _021D40AE + bl sub_02022974 +_021D40AE: + lsl r0, r4, #2 + ldr r0, [r5, r0] + str r0, [sp, #4] + bl ov5_021D3938 + str r0, [sp] + ldr r0, [r5, #0x2c] + bl ov5_021D3938 + add r7, r0, #0 + mov r4, #0 +_021D40C4: + lsl r0, r4, #2 + add r6, r5, r0 + ldr r0, [r6, #0x14] + cmp r0, #0 + beq _021D40DC + add r1, r7, #0 + bl ov5_021D3868 + ldr r0, [r6, #0x14] + ldr r1, [sp] + bl sub_020AE77C +_021D40DC: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #6 + blo _021D40C4 + ldr r0, [sp, #4] + str r0, [r5, #0x2c] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D409C + + thumb_func_start ov5_021D40F0 +ov5_021D40F0: ; 0x021D40F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #0x18] + ldr r0, [sp, #0x40] + str r1, [sp, #0x1c] + str r0, [sp, #0x40] + ldr r0, [sp, #0x4c] + str r2, [sp, #0x20] + str r0, [sp, #0x4c] + add r0, r3, #0 + mov r5, #0 + str r3, [sp, #0x24] + ldr r6, [sp, #0x44] + ldr r7, [sp, #0x48] + cmp r0, #0 + ble _021D4148 +_021D4110: + str r6, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x40] + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + mov r3, #0 + str r7, [sp, #0x14] + bl ov5_021D3978 + add r4, r0, #0 + bne _021D4136 + bl sub_02022974 +_021D4136: + ldr r0, [sp, #0x4c] + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021D4084 + ldr r0, [sp, #0x24] + add r5, r5, #1 + cmp r5, r0 + blt _021D4110 +_021D4148: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D40F0 + + thumb_func_start ov5_021D414C +ov5_021D414C: ; 0x021D414C + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + str r0, [sp] + ldr r0, [r6, #0x2c] + bl ov5_021D3938 + add r7, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021D415E: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021D416A + add r1, r7, #0 + bl ov5_021D3868 +_021D416A: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _021D415E + ldr r0, [r6, #0x10] + mov r5, #0 + cmp r0, #0 + ble _021D4190 + add r4, r6, #0 + add r7, r5, #0 +_021D417E: + ldr r0, [r4, #0] + ldr r1, [sp] + bl ov5_021D3CE4 + stmia r4!, {r7} + ldr r0, [r6, #0x10] + add r5, r5, #1 + cmp r5, r0 + blt _021D417E +_021D4190: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D414C + + thumb_func_start ov5_021D4194 +ov5_021D4194: ; 0x021D4194 + push {r4, lr} + mov r1, #0xe + mov r0, #4 + lsl r1, r1, #6 + bl sub_02018144 + add r4, r0, #0 + mov r2, #0xe + mov r0, #0 + add r1, r4, #0 + lsl r2, r2, #6 + bl sub_020C4BB8 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D4194 + + thumb_func_start ov5_021D41B4 +ov5_021D41B4: ; 0x021D41B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D41C6 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] +_021D41C6: + pop {r4, pc} + thumb_func_end ov5_021D41B4 + + thumb_func_start ov5_021D41C8 +ov5_021D41C8: ; 0x021D41C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + add r0, r1, #0 + lsl r1, r2, #0x18 + lsr r1, r1, #0x18 + add r6, r3, #0 + bl ov5_021D3FD0 + add r5, r0, #0 + bne _021D41E6 + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021D41E6: + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x34] + add r2, r5, #0 + bl ov5_021D4068 + add r0, sp, #0x38 + ldrb r4, [r0] + cmp r4, #0 + bne _021D41FC + bl sub_02022974 +_021D41FC: + cmp r4, #0 + bne _021D4202 + mov r4, #1 +_021D4202: + ldr r0, [sp, #0x3c] + str r4, [sp] + str r0, [sp, #4] + str r7, [sp, #8] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x30] + ldr r3, [sp, #0x34] + add r0, r6, #0 + str r5, [sp, #0xc] + bl ov5_021D40F0 + str r6, [r5, #0x30] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D41C8 + + thumb_func_start ov5_021D4220 +ov5_021D4220: ; 0x021D4220 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r5, r0, #0 + add r7, r1, #0 + add r6, r3, #0 + cmp r4, #6 + blo _021D4232 + bl sub_02022974 +_021D4232: + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021D4040 + add r5, r0, #0 + add r5, #0x14 + lsl r4, r4, #2 + ldr r0, [r5, r4] + cmp r0, #0 + beq _021D424A + bl sub_02022974 +_021D424A: + str r6, [r5, r4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D4220 + + thumb_func_start ov5_021D4250 +ov5_021D4250: ; 0x021D4250 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0 + bne _021D4260 + bl sub_02022974 +_021D4260: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D4040 + add r1, r6, #0 + bl ov5_021D409C + mov r1, #0 + bl ov5_021D3E40 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D4250 + + thumb_func_start ov5_021D4278 +ov5_021D4278: ; 0x021D4278 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r7, r2, #0 + add r4, r3, #0 + cmp r5, #0 + bne _021D428A + bl sub_02022974 +_021D428A: + add r0, r6, #0 + add r1, r5, #0 + bl ov5_021D4040 + add r1, r7, #0 + bl ov5_021D409C + add r5, r0, #0 + cmp r4, #0 + beq _021D42A6 + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_021D42A6: + add r0, r5, #0 + mov r1, #0 + bl ov5_021D3E40 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D4278 + + thumb_func_start ov5_021D42B0 +ov5_021D42B0: ; 0x021D42B0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bne _021D42BE + bl sub_02022974 +_021D42BE: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021D4040 + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D414C + add r0, r4, #0 + bl ov5_021D4020 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D42B0 + + thumb_func_start ov5_021D42D8 +ov5_021D42D8: ; 0x021D42D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bne _021D42E4 + bl sub_02022974 +_021D42E4: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D4040 + ldr r0, [r0, #0x2c] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D42D8 + + thumb_func_start ov5_021D42F0 +ov5_021D42F0: ; 0x021D42F0 + push {r4, lr} + bl ov5_021D42D8 + add r4, r0, #0 + bne _021D42FE + bl sub_02022974 +_021D42FE: + add r0, r4, #0 + bl ov5_021D3F70 + cmp r0, #0 + beq _021D430C + mov r0, #1 + pop {r4, pc} +_021D430C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021D42F0 + + thumb_func_start ov5_021D4310 +ov5_021D4310: ; 0x021D4310 + push {r3, lr} + bl ov5_021D4040 + ldr r0, [r0, #0x30] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D4310 \ No newline at end of file diff --git a/asm/ov5_021D431C.s b/asm/ov5_021D431C.s new file mode 100644 index 000000000..c61fa2318 --- /dev/null +++ b/asm/ov5_021D431C.s @@ -0,0 +1,1950 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D431C +ov5_021D431C: ; 0x021D431C + push {r3, lr} + mov r0, #4 + mov r1, #0x28 + bl sub_02018184 + mov r1, #0 + str r1, [r0, #0] + pop {r3, pc} + thumb_func_end ov5_021D431C + + thumb_func_start ov5_021D432C +ov5_021D432C: ; 0x021D432C + ldr r3, _021D4330 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021D4330: .word sub_020181C4 + thumb_func_end ov5_021D432C + + thumb_func_start ov5_021D4334 +ov5_021D4334: ; 0x021D4334 + str r0, [r2, #0x14] + str r1, [r2, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D4334 + + thumb_func_start ov5_021D433C +ov5_021D433C: ; 0x021D433C + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + cmp r0, #5 + bls _021D434C + b _021D4510 +_021D434C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4358: ; jump table + .short _021D4364 - _021D4358 - 2 ; case 0 + .short _021D43FE - _021D4358 - 2 ; case 1 + .short _021D445E - _021D4358 - 2 ; case 2 + .short _021D4472 - _021D4358 - 2 ; case 3 + .short _021D4486 - _021D4358 - 2 ; case 4 + .short _021D44F4 - _021D4358 - 2 ; case 5 +_021D4364: + ldr r5, _021D4528 ; =0x021F89F4 + add r3, sp, #0x34 + mov r2, #0xa +_021D436A: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D436A + mov r0, #0 + str r0, [r4, #0x20] + strb r0, [r4, #0x1d] + mov r0, #3 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + add r0, sp, #0x24 + str r0, [sp, #8] + sub r2, r2, #2 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + add r3, r2, #0 + bl sub_020550F4 + mov r0, #1 + strb r0, [r4, #0x1c] + add r0, sp, #0x20 + str r0, [sp] + add r0, sp, #0x1c + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0x34 + mov r2, #0x14 + add r3, sp, #0x24 + bl sub_02055208 + cmp r0, #0 + beq _021D43EC + ldr r0, [r6, #0x50] + ldr r1, [sp, #0x1c] + bl ov5_021D3F94 + add r7, r0, #0 + strb r7, [r4, #0x1e] + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + bl ov5_021E18BC + add r5, r0, #0 + ldr r0, [sp, #0x20] + bl ov5_021E18C0 + str r5, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x18] + mov r2, #1 + str r0, [sp, #8] + str r7, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + ldr r3, [sp, #0x1c] + bl ov5_021D41C8 + b _021D43F6 +_021D43EC: + bl sub_02022974 + add sp, #0x84 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021D43F6: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4510 +_021D43FE: + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D4310 + add r5, r0, #0 + cmp r5, #0x4b + beq _021D4416 + ldr r0, [r6, #0x24] + bl sub_020206B0 + mov r0, #1 + str r0, [r4, #0x20] +_021D4416: + add r0, r5, #0 + bl ov5_021D481C + cmp r0, #1 + bne _021D4424 + ldr r5, _021D452C ; =0x00000608 + b _021D4434 +_021D4424: + add r0, r5, #0 + bl ov5_021D481C + cmp r0, #2 + bne _021D4432 + ldr r5, _021D4530 ; =0x000005D4 + b _021D4434 +_021D4432: + ldr r5, _021D4534 ; =0x00000605 +_021D4434: + ldrb r0, [r4, #0x1e] + cmp r0, #2 + bne _021D443E + mov r2, #0 + b _021D444C +_021D443E: + cmp r0, #4 + bne _021D4446 + mov r2, #0 + b _021D444C +_021D4446: + bl sub_02022974 + mov r2, #0 +_021D444C: + ldr r0, [r6, #0x54] + mov r1, #1 + add r3, r5, #0 + bl ov5_021D4278 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4510 +_021D445E: + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4510 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4510 +_021D4472: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + mov r1, #0xc + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4510 +_021D4486: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D4510 + add r0, r5, #0 + bl sub_020656AC + add r0, r5, #0 + mov r1, #1 + bl sub_02062D64 + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D4310 + add r5, r0, #0 + bl ov5_021D481C + cmp r0, #1 + bne _021D44BA + mov r5, #0 + b _021D44CA +_021D44BA: + add r0, r5, #0 + bl ov5_021D481C + cmp r0, #2 + bne _021D44C8 + mov r5, #0 + b _021D44CA +_021D44C8: + ldr r5, _021D4538 ; =0x00000607 +_021D44CA: + ldrb r0, [r4, #0x1e] + cmp r0, #2 + bne _021D44D4 + mov r2, #1 + b _021D44E2 +_021D44D4: + cmp r0, #4 + bne _021D44DC + mov r2, #1 + b _021D44E2 +_021D44DC: + bl sub_02022974 + mov r2, #1 +_021D44E2: + ldr r0, [r6, #0x54] + mov r1, #1 + add r3, r5, #0 + bl ov5_021D4278 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4510 +_021D44F4: + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4510 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #1 + bl ov5_021D42B0 + add sp, #0x84 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021D4510: + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _021D4520 + add r4, #0x1d + ldr r0, [r6, #0x24] + add r1, r4, #0 + bl ov5_021D4798 +_021D4520: + mov r0, #0 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + nop +_021D4528: .word 0x021F89F4 +_021D452C: .word 0x00000608 +_021D4530: .word 0x000005D4 +_021D4534: .word 0x00000605 +_021D4538: .word 0x00000607 + thumb_func_end ov5_021D433C + + thumb_func_start ov5_021D453C +ov5_021D453C: ; 0x021D453C + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + cmp r0, #6 + bls _021D454C + b _021D4768 +_021D454C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4558: ; jump table + .short _021D4566 - _021D4558 - 2 ; case 0 + .short _021D461E - _021D4558 - 2 ; case 1 + .short _021D4690 - _021D4558 - 2 ; case 2 + .short _021D46B0 - _021D4558 - 2 ; case 3 + .short _021D46C4 - _021D4558 - 2 ; case 4 + .short _021D472A - _021D4558 - 2 ; case 5 + .short _021D475A - _021D4558 - 2 ; case 6 +_021D4566: + ldr r5, _021D4780 ; =0x021F8A44 + add r3, sp, #0x34 + mov r2, #0xa +_021D456C: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D456C + mov r3, #0 + str r3, [r4, #0x20] + strb r3, [r4, #0x1d] + mov r0, #3 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + add r0, sp, #0x24 + str r0, [sp, #8] + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + sub r2, r2, #2 + bl sub_020550F4 + mov r0, #1 + strb r0, [r4, #0x1c] + add r0, sp, #0x20 + str r0, [sp] + add r0, sp, #0x1c + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0x34 + mov r2, #0x14 + add r3, sp, #0x24 + bl sub_02055208 + cmp r0, #0 + beq _021D45EC + ldr r0, [r6, #0x50] + ldr r1, [sp, #0x1c] + bl ov5_021D3F94 + add r7, r0, #0 + strb r7, [r4, #0x1e] + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + bl ov5_021E18BC + add r5, r0, #0 + ldr r0, [sp, #0x20] + bl ov5_021E18C0 + str r5, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x18] + mov r2, #1 + str r0, [sp, #8] + str r7, [sp, #0xc] + str r2, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + ldr r3, [sp, #0x1c] + bl ov5_021D41C8 + b _021D4600 +_021D45EC: + bl sub_02022974 + mov r0, #1 + bl ov5_021D1744 + mov r0, #6 + str r0, [r4, #0] + add sp, #0x84 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D4600: + ldr r0, [r6, #0x24] + bl sub_02020A88 + strh r0, [r4, #0x24] + ldr r0, [sp, #0x1c] + cmp r0, #0x4b + beq _021D4616 + ldr r0, _021D4784 ; =0x0000FFA0 + ldr r1, [r6, #0x24] + bl sub_0202094C +_021D4616: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4768 +_021D461E: + mov r1, #0 + str r1, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r0, [r6, #0x10] + mov r2, #9 + bl sub_02056B30 + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D4310 + add r5, r0, #0 + cmp r5, #0x4b + beq _021D4648 + mov r0, #1 + str r0, [r4, #0x20] +_021D4648: + add r0, r5, #0 + bl ov5_021D481C + cmp r0, #1 + bne _021D4656 + ldr r5, _021D4788 ; =0x00000608 + b _021D4666 +_021D4656: + add r0, r5, #0 + bl ov5_021D481C + cmp r0, #2 + bne _021D4664 + ldr r5, _021D478C ; =0x000005D4 + b _021D4666 +_021D4664: + ldr r5, _021D4790 ; =0x00000605 +_021D4666: + ldrb r0, [r4, #0x1e] + cmp r0, #2 + bne _021D4670 + mov r2, #0 + b _021D467E +_021D4670: + cmp r0, #4 + bne _021D4678 + mov r2, #2 + b _021D467E +_021D4678: + bl sub_02022974 + mov r2, #0 +_021D467E: + ldr r0, [r6, #0x54] + mov r1, #1 + add r3, r5, #0 + bl ov5_021D4278 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4768 +_021D4690: + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4768 + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + mov r1, #0 + bl sub_02062D64 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4768 +_021D46B0: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + mov r1, #0xd + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4768 +_021D46C4: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D4768 + add r0, r5, #0 + bl sub_020656AC + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D4310 + add r5, r0, #0 + bl ov5_021D481C + cmp r0, #1 + bne _021D46F0 + mov r5, #0 + b _021D4700 +_021D46F0: + add r0, r5, #0 + bl ov5_021D481C + cmp r0, #2 + bne _021D46FE + mov r5, #0 + b _021D4700 +_021D46FE: + ldr r5, _021D4794 ; =0x00000607 +_021D4700: + ldrb r0, [r4, #0x1e] + cmp r0, #2 + bne _021D470A + mov r2, #1 + b _021D4718 +_021D470A: + cmp r0, #4 + bne _021D4712 + mov r2, #3 + b _021D4718 +_021D4712: + bl sub_02022974 + mov r2, #1 +_021D4718: + ldr r0, [r6, #0x54] + mov r1, #1 + add r3, r5, #0 + bl ov5_021D4278 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4768 +_021D472A: + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4768 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4768 + ldr r0, [r6, #0x24] + bl sub_02020A88 + ldrh r1, [r4, #0x24] + cmp r1, r0 + bne _021D4768 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #1 + bl ov5_021D42B0 + add sp, #0x84 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021D475A: + bl sub_0200F2AC + cmp r0, #0 + beq _021D4768 + add sp, #0x84 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021D4768: + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _021D4778 + add r4, #0x1d + ldr r0, [r6, #0x24] + add r1, r4, #0 + bl ov5_021D47DC +_021D4778: + mov r0, #0 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + nop +_021D4780: .word 0x021F8A44 +_021D4784: .word 0x0000FFA0 +_021D4788: .word 0x00000608 +_021D478C: .word 0x000005D4 +_021D4790: .word 0x00000605 +_021D4794: .word 0x00000607 + thumb_func_end ov5_021D453C + + thumb_func_start ov5_021D4798 +ov5_021D4798: ; 0x021D4798 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldrb r0, [r5] + mov r4, #0xc + add r1, r0, #0 + mul r1, r4 + cmp r1, #0x60 + bgt _021D47D8 + lsl r0, r1, #0x10 + lsr r0, r0, #0x10 + cmp r0, #0x60 + bls _021D47B8 + sub r0, #0x60 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_021D47B8: + add r0, r6, #0 + bl sub_02020A88 + sub r0, r0, r4 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + beq _021D47D2 + neg r0, r4 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r1, r6, #0 + bl sub_0202094C +_021D47D2: + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] +_021D47D8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D4798 + + thumb_func_start ov5_021D47DC +ov5_021D47DC: ; 0x021D47DC + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldrb r0, [r5] + lsl r0, r0, #4 + cmp r0, #0x60 + bge _021D4818 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #0x60 + bls _021D47FA + sub r0, #0x60 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + b _021D47FC +_021D47FA: + mov r4, #0x10 +_021D47FC: + add r0, r6, #0 + bl sub_02020A88 + add r0, r0, r4 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + beq _021D4812 + add r0, r4, #0 + add r1, r6, #0 + bl sub_0202094C +_021D4812: + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] +_021D4818: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D47DC + + thumb_func_start ov5_021D481C +ov5_021D481C: ; 0x021D481C + ldr r2, _021D4854 ; =0x000001BA + cmp r0, r2 + bne _021D4826 + mov r0, #2 + bx lr +_021D4826: + cmp r0, #0x46 + beq _021D484C + add r1, r2, #0 + sub r1, #0x90 + cmp r0, r1 + beq _021D484C + add r1, r2, #0 + add r1, #0xe + cmp r0, r1 + beq _021D484C + add r1, r2, #0 + sub r1, #0xf + cmp r0, r1 + beq _021D484C + add r2, #0x2a + cmp r0, r2 + beq _021D484C + cmp r0, #0x4b + bne _021D4850 +_021D484C: + mov r0, #1 + bx lr +_021D4850: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D4854: .word 0x000001BA + thumb_func_end ov5_021D481C + + thumb_func_start ov5_021D4858 +ov5_021D4858: ; 0x021D4858 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r5, r2, #0 + cmp r0, #5 + bls _021D486A + b _021D4A14 +_021D486A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4876: ; jump table + .short _021D4882 - _021D4876 - 2 ; case 0 + .short _021D4942 - _021D4876 - 2 ; case 1 + .short _021D4982 - _021D4876 - 2 ; case 2 + .short _021D49A2 - _021D4876 - 2 ; case 3 + .short _021D49CA - _021D4876 - 2 ; case 4 + .short _021D49E8 - _021D4876 - 2 ; case 5 +_021D4882: + ldr r3, _021D4A1C ; =0x021F89E4 + add r2, sp, #0x20 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + cmp r5, #2 + bne _021D48AC + mov r0, #2 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + add r0, sp, #0x30 + str r0, [sp, #8] + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + sub r2, r2, #2 + mov r3, #0 + bl sub_020550F4 + b _021D48C4 +_021D48AC: + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, sp, #0x30 + str r0, [sp, #8] + mov r2, #0 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + add r3, r2, #0 + bl sub_020550F4 +_021D48C4: + mov r0, #2 + strb r0, [r4, #0x1c] + add r0, sp, #0x1c + str r0, [sp] + add r0, sp, #0x18 + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0x20 + mov r2, #4 + add r3, sp, #0x30 + bl sub_02055208 + cmp r0, #0 + beq _021D4912 + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + add r7, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021E18BC + add r5, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021E18C0 + str r5, [sp] + str r0, [sp, #4] + str r7, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + ldr r3, [sp, #0x18] + mov r2, #2 + bl ov5_021D41C8 + b _021D491C +_021D4912: + bl sub_02022974 + add sp, #0x40 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D491C: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4936 + add r0, r5, #0 + mov r1, #0x49 + bl sub_02065638 + b _021D493A +_021D4936: + bl sub_02022974 +_021D493A: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4A14 +_021D4942: + mov r0, #1 + bl ov5_021D1744 + ldr r0, [r6, #0x54] + ldr r3, _021D4A20 ; =0x00000615 + mov r1, #2 + mov r2, #0 + bl ov5_021D4278 + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4976 + cmp r5, #3 + bne _021D496C + mov r1, #0xb + b _021D496E +_021D496C: + mov r1, #0xa +_021D496E: + add r0, r6, #0 + bl sub_02065638 + b _021D497A +_021D4976: + bl sub_02022974 +_021D497A: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4A14 +_021D4982: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4A14 + add r0, r5, #0 + mov r1, #0x4a + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4A14 +_021D49A2: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4A14 + cmp r5, #3 + bne _021D49BA + mov r1, #0xb + b _021D49BC +_021D49BA: + mov r1, #0xa +_021D49BC: + add r0, r6, #0 + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4A14 +_021D49CA: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D4A14 + add r0, r5, #0 + bl sub_020656AC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4A14 +_021D49E8: + ldr r0, [r6, #0x54] + mov r1, #2 + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4A14 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4A14 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #2 + bl ov5_021D42B0 + ldr r0, _021D4A20 ; =0x00000615 + mov r1, #0 + bl sub_020057A4 + add sp, #0x40 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D4A14: + mov r0, #0 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D4A1C: .word 0x021F89E4 +_021D4A20: .word 0x00000615 + thumb_func_end ov5_021D4858 + + thumb_func_start ov5_021D4A24 +ov5_021D4A24: ; 0x021D4A24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + add r5, r2, #0 + cmp r0, #4 + bls _021D4A36 + b _021D4BB8 +_021D4A36: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4A42: ; jump table + .short _021D4A4C - _021D4A42 - 2 ; case 0 + .short _021D4B0E - _021D4A42 - 2 ; case 1 + .short _021D4B48 - _021D4A42 - 2 ; case 2 + .short _021D4B6E - _021D4A42 - 2 ; case 3 + .short _021D4B8C - _021D4A42 - 2 ; case 4 +_021D4A4C: + ldr r3, _021D4BC0 ; =0x021F89D4 + add r2, sp, #0x20 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + cmp r5, #2 + bne _021D4A76 + mov r0, #2 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + add r0, sp, #0x30 + str r0, [sp, #8] + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + sub r2, r2, #2 + mov r3, #0 + bl sub_020550F4 + b _021D4A8E +_021D4A76: + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, sp, #0x30 + str r0, [sp, #8] + mov r2, #0 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + add r3, r2, #0 + bl sub_020550F4 +_021D4A8E: + mov r0, #2 + strb r0, [r4, #0x1c] + add r0, sp, #0x1c + str r0, [sp] + add r0, sp, #0x18 + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0x20 + mov r2, #4 + add r3, sp, #0x30 + bl sub_02055208 + cmp r0, #0 + beq _021D4ADE + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + add r7, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021E18BC + add r5, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021E18C0 + str r5, [sp] + str r0, [sp, #4] + str r7, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + ldr r3, [sp, #0x18] + mov r2, #2 + bl ov5_021D41C8 + b _021D4AE8 +_021D4ADE: + bl sub_02022974 + add sp, #0x40 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D4AE8: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4B02 + add r0, r5, #0 + mov r1, #0x49 + bl sub_02065638 + b _021D4B06 +_021D4B02: + bl sub_02022974 +_021D4B06: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4BB8 +_021D4B0E: + ldr r0, [r6, #0x54] + ldr r3, _021D4BC4 ; =0x00000615 + mov r1, #2 + mov r2, #0 + bl ov5_021D4278 + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4B3C + cmp r5, #2 + bne _021D4B32 + mov r1, #0xa + b _021D4B34 +_021D4B32: + mov r1, #0xb +_021D4B34: + add r0, r6, #0 + bl sub_02065638 + b _021D4B40 +_021D4B3C: + bl sub_02022974 +_021D4B40: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4BB8 +_021D4B48: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021D4BB8 + add r0, r5, #0 + mov r1, #0x4a + bl sub_02065638 + mov r0, #0 + bl ov5_021D1744 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4BB8 +_021D4B6E: + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D4BB8 + add r0, r5, #0 + bl sub_020656AC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4BB8 +_021D4B8C: + ldr r0, [r6, #0x54] + mov r1, #2 + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4BB8 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4BB8 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #2 + bl ov5_021D42B0 + ldr r0, _021D4BC4 ; =0x00000615 + mov r1, #0 + bl sub_020057A4 + add sp, #0x40 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D4BB8: + mov r0, #0 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D4BC0: .word 0x021F89D4 +_021D4BC4: .word 0x00000615 + thumb_func_end ov5_021D4A24 + + thumb_func_start ov5_021D4BC8 +ov5_021D4BC8: ; 0x021D4BC8 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldrb r1, [r4] + ldr r0, [r5, #0x54] + bl ov5_021D42F0 + cmp r0, #0 + beq _021D4BF0 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D4BF0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D4BC8 + + thumb_func_start ov5_021D4BF4 +ov5_021D4BF4: ; 0x021D4BF4 + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + ldr r6, _021D4C84 ; =0x021F8A94 + str r3, [sp, #0x18] + add r5, r0, #0 + add r7, r1, #0 + add r4, sp, #0x34 + mov r3, #0xa +_021D4C04: + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _021D4C04 + mov r0, #3 + str r0, [sp] + mov r3, #1 + add r1, r2, #0 + str r3, [sp, #4] + add r0, sp, #0x24 + str r0, [sp, #8] + sub r2, r3, #2 + add r0, r7, #0 + mov r3, #0 + bl sub_020550F4 + add r0, sp, #0x20 + str r0, [sp] + add r0, sp, #0x1c + str r0, [sp, #4] + add r0, r5, #0 + add r1, sp, #0x34 + mov r2, #0x14 + add r3, sp, #0x24 + bl sub_02055208 + cmp r0, #0 + beq _021D4C7C + ldr r0, [r5, #0x50] + ldr r1, [sp, #0x1c] + bl ov5_021D3F94 + add r6, r0, #0 + ldr r0, [r5, #0x30] + bl ov5_021EFAA0 + add r7, r0, #0 + ldr r0, [sp, #0x20] + bl ov5_021E18BC + add r4, r0, #0 + ldr r0, [sp, #0x20] + bl ov5_021E18C0 + str r4, [sp] + str r0, [sp, #4] + str r7, [sp, #8] + str r6, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r5, #0x50] + ldr r1, [r5, #0x54] + ldr r2, [sp, #0x18] + ldr r3, [sp, #0x1c] + bl ov5_021D41C8 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} +_021D4C7C: + bl sub_02022974 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4C84: .word 0x021F8A94 + thumb_func_end ov5_021D4BF4 + + thumb_func_start ov5_021D4C88 +ov5_021D4C88: ; 0x021D4C88 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x54] + add r7, r1, #0 + bl ov5_021D4310 + add r6, r0, #0 + ldr r0, [r5, #0x50] + add r1, r6, #0 + bl ov5_021D3F94 + add r4, r0, #0 + add r0, r6, #0 + bl ov5_021D481C + cmp r0, #1 + bne _021D4CAE + ldr r6, _021D4CE0 ; =0x00000608 + b _021D4CBE +_021D4CAE: + add r0, r6, #0 + bl ov5_021D481C + cmp r0, #2 + bne _021D4CBC + ldr r6, _021D4CE4 ; =0x000005D4 + b _021D4CBE +_021D4CBC: + ldr r6, _021D4CE8 ; =0x00000605 +_021D4CBE: + cmp r4, #2 + bne _021D4CC6 + mov r2, #0 + b _021D4CD4 +_021D4CC6: + cmp r4, #4 + bne _021D4CCE + mov r2, #0 + b _021D4CD4 +_021D4CCE: + bl sub_02022974 + mov r2, #0 +_021D4CD4: + ldr r0, [r5, #0x54] + add r1, r7, #0 + add r3, r6, #0 + bl ov5_021D4278 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4CE0: .word 0x00000608 +_021D4CE4: .word 0x000005D4 +_021D4CE8: .word 0x00000605 + thumb_func_end ov5_021D4C88 + + thumb_func_start ov5_021D4CEC +ov5_021D4CEC: ; 0x021D4CEC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x54] + add r7, r1, #0 + bl ov5_021D4310 + add r6, r0, #0 + ldr r0, [r5, #0x50] + add r1, r6, #0 + bl ov5_021D3F94 + add r4, r0, #0 + add r0, r6, #0 + bl ov5_021D481C + cmp r0, #1 + bne _021D4D12 + mov r6, #0 + b _021D4D22 +_021D4D12: + add r0, r6, #0 + bl ov5_021D481C + cmp r0, #2 + bne _021D4D20 + mov r6, #0 + b _021D4D22 +_021D4D20: + ldr r6, _021D4D44 ; =0x00000607 +_021D4D22: + cmp r4, #2 + bne _021D4D2A + mov r2, #1 + b _021D4D38 +_021D4D2A: + cmp r4, #4 + bne _021D4D32 + mov r2, #1 + b _021D4D38 +_021D4D32: + bl sub_02022974 + mov r2, #1 +_021D4D38: + ldr r0, [r5, #0x54] + add r1, r7, #0 + add r3, r6, #0 + bl ov5_021D4278 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4D44: .word 0x00000607 + thumb_func_end ov5_021D4CEC + + thumb_func_start ov5_021D4D48 +ov5_021D4D48: ; 0x021D4D48 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #4 + mov r1, #1 + bl sub_02018184 + add r2, r0, #0 + strb r4, [r2] + ldr r0, [r5, #0x10] + ldr r1, _021D4D64 ; =ov5_021D4BC8 + bl sub_02050944 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D4D64: .word ov5_021D4BC8 + thumb_func_end ov5_021D4D48 + + thumb_func_start ov5_021D4D68 +ov5_021D4D68: ; 0x021D4D68 + add r3, r0, #0 + add r2, r1, #0 + ldr r0, [r3, #0x50] + ldr r1, [r3, #0x54] + ldr r3, _021D4D74 ; =ov5_021D42B0 + bx r3 + ; .align 2, 0 +_021D4D74: .word ov5_021D42B0 + thumb_func_end ov5_021D4D68 + + thumb_func_start ov5_021D4D78 +ov5_021D4D78: ; 0x021D4D78 + push {r4, r5, lr} + sub sp, #0x2c + add r5, r2, #0 + ldr r2, _021D4DFC ; =0x021F89CC + add r4, r3, #0 + ldr r3, [r2, #0] + ldr r2, [r2, #4] + str r3, [sp, #0xc] + str r2, [sp, #0x10] + mov r2, #1 + str r2, [sp] + mov r2, #3 + str r2, [sp, #4] + add r2, sp, #0x1c + str r2, [sp, #8] + mov r2, #0 + sub r3, r2, #1 + bl sub_020550F4 + add r0, sp, #0x18 + str r0, [sp] + add r0, sp, #0x14 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0xc + mov r2, #2 + add r3, sp, #0x1c + bl sub_02055208 + cmp r0, #0 + bne _021D4DBA + bl sub_02022974 +_021D4DBA: + ldr r0, [sp, #0x18] + bl ov5_021E18BC + add r3, r0, #0 + ldr r0, [r4, #0x50] + add r1, r5, #0 + str r0, [sp] + ldr r0, [sp, #0x14] + mov r2, #1 + bl ov5_021D3B24 + cmp r0, #0 + bne _021D4DD8 + bl sub_02022974 +_021D4DD8: + ldr r0, [sp, #0x14] + ldr r2, [r4, #0x50] + add r1, r5, #0 + bl ov5_021D3DE4 + add r4, r0, #0 + bl ov5_021D3E7C + add r0, r4, #0 + mov r1, #0 + bl ov5_021D3E40 + add r0, r4, #0 + bl ov5_021D3E44 + add sp, #0x2c + pop {r4, r5, pc} + nop +_021D4DFC: .word 0x021F89CC + thumb_func_end ov5_021D4D78 + + thumb_func_start ov5_021D4E00 +ov5_021D4E00: ; 0x021D4E00 + push {r3, lr} + mov r0, #4 + mov r1, #0x10 + bl sub_02018184 + mov r1, #0 + str r1, [r0, #0] + pop {r3, pc} + thumb_func_end ov5_021D4E00 + + thumb_func_start ov5_021D4E10 +ov5_021D4E10: ; 0x021D4E10 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #3 + bhi _021D4EF6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D4E36: ; jump table + .short _021D4E3E - _021D4E36 - 2 ; case 0 + .short _021D4E9A - _021D4E36 - 2 ; case 1 + .short _021D4EB8 - _021D4E36 - 2 ; case 2 + .short _021D4ED6 - _021D4E36 - 2 ; case 3 +_021D4E3E: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + cmp r0, #1 + bne _021D4E5C + add r0, r6, #0 + mov r1, #1 + bl sub_02062D64 + mov r0, #1 + b _021D4E66 +_021D4E5C: + add r0, r6, #0 + mov r1, #0 + bl sub_02062D64 + mov r0, #3 +_021D4E66: + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + strb r0, [r4, #4] + ldr r0, [r5, #0x24] + bl sub_02020A88 + strh r0, [r4, #0xc] + ldr r0, _021D4F0C ; =0x0000FFA0 + ldr r1, [r5, #0x24] + bl sub_0202094C + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0xb + str r0, [sp, #8] + ldr r3, _021D4F10 ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #1 + str r0, [r4, #8] + b _021D4EF6 +_021D4E9A: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + mov r1, #0 + bl sub_02062D64 + add r0, r6, #0 + mov r1, #0xd + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4EF6 +_021D4EB8: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D4EF6 + add r0, r6, #0 + bl sub_020656AC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D4EF6 +_021D4ED6: + bl sub_0200F2AC + cmp r0, #0 + beq _021D4EF6 + ldr r0, [r5, #0x24] + bl sub_02020A88 + ldrh r1, [r4, #0xc] + cmp r1, r0 + bne _021D4EF6 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D4EF6: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D4F04 + ldr r0, [r5, #0x24] + add r1, r4, #4 + bl ov5_021D47DC +_021D4F04: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021D4F0C: .word 0x0000FFA0 +_021D4F10: .word 0x00007FFF + thumb_func_end ov5_021D4E10 + + thumb_func_start ov5_021D4F14 +ov5_021D4F14: ; 0x021D4F14 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02050A60 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02050A64 + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D4F34 + cmp r0, #1 + beq _021D4F70 + b _021D4F84 +_021D4F34: + ldr r0, [r4, #0x3c] + bl sub_0205EB3C + mov r1, #1 + bl sub_02062D64 + mov r0, #0 + str r0, [r5, #8] + strb r0, [r5, #4] + ldr r0, _021D4F98 ; =0x00000603 + bl sub_02005748 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xb + str r0, [sp, #8] + mov r0, #0 + ldr r3, _021D4F9C ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + mov r0, #1 + str r0, [r5, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D4F84 +_021D4F70: + bl sub_0200F2AC + cmp r0, #0 + beq _021D4F84 + add r0, r5, #0 + bl sub_020181C4 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D4F84: + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D4F92 + ldr r0, [r4, #0x24] + add r1, r5, #4 + bl ov5_021D4798 +_021D4F92: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D4F98: .word 0x00000603 +_021D4F9C: .word 0x00007FFF + thumb_func_end ov5_021D4F14 + + thumb_func_start ov5_021D4FA0 +ov5_021D4FA0: ; 0x021D4FA0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + bl sub_02050A60 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D4FC0 + cmp r0, #1 + beq _021D4FF2 + b _021D5006 +_021D4FC0: + mov r0, #0 + str r0, [r4, #8] + strb r0, [r4, #4] + ldr r0, _021D501C ; =0x00000603 + bl sub_02005748 + mov r1, #0 + str r1, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + add r0, r5, #0 + mov r2, #0x10 + add r3, r1, #0 + bl sub_02056B30 + mov r0, #1 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5006 +_021D4FF2: + bl sub_0200F2AC + cmp r0, #0 + beq _021D5006 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x10 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D5006: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D5014 + ldr r0, [r6, #0x24] + add r1, r4, #4 + bl ov5_021D4798 +_021D5014: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D501C: .word 0x00000603 + thumb_func_end ov5_021D4FA0 + + thumb_func_start ov5_021D5020 +ov5_021D5020: ; 0x021D5020 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #0x10] + bl sub_02050A60 + add r5, r0, #0 + ldr r0, [sp, #0x10] + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #3 + bhi _021D5138 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5046: ; jump table + .short _021D504E - _021D5046 - 2 ; case 0 + .short _021D50DC - _021D5046 - 2 ; case 1 + .short _021D50FA - _021D5046 - 2 ; case 2 + .short _021D5118 - _021D5046 - 2 ; case 3 +_021D504E: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + str r0, [sp, #0x14] + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + cmp r7, #1 + bne _021D5070 + ldr r0, [sp, #0x14] + mov r1, #1 + bl sub_02062D64 + mov r0, #1 + b _021D507A +_021D5070: + ldr r0, [sp, #0x14] + mov r1, #0 + bl sub_02062D64 + mov r0, #3 +_021D507A: + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + strb r0, [r4, #4] + ldr r0, [r5, #0x24] + bl sub_02020A88 + strh r0, [r4, #0xc] + ldr r0, _021D514C ; =0x0000FFA0 + ldr r1, [r5, #0x24] + bl sub_0202094C + cmp r7, #3 + bhi _021D50BA + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D50A2: ; jump table + .short _021D50AA - _021D50A2 - 2 ; case 0 + .short _021D50AE - _021D50A2 - 2 ; case 1 + .short _021D50B2 - _021D50A2 - 2 ; case 2 + .short _021D50B6 - _021D50A2 - 2 ; case 3 +_021D50AA: + mov r6, #3 + b _021D50BE +_021D50AE: + mov r6, #5 + b _021D50BE +_021D50B2: + mov r6, #7 + b _021D50BE +_021D50B6: + mov r6, #0x27 + b _021D50BE +_021D50BA: + bl sub_02022974 +_021D50BE: + mov r1, #0 + str r1, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r2, r6, #0 + bl sub_02056B30 + mov r0, #1 + str r0, [r4, #8] + b _021D5138 +_021D50DC: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + mov r1, #0 + bl sub_02062D64 + add r0, r6, #0 + mov r1, #0xd + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5138 +_021D50FA: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D5138 + add r0, r6, #0 + bl sub_020656AC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5138 +_021D5118: + bl sub_0200F2AC + cmp r0, #0 + beq _021D5138 + ldr r0, [r5, #0x24] + bl sub_02020A88 + ldrh r1, [r4, #0xc] + cmp r1, r0 + bne _021D5138 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D5138: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D5146 + ldr r0, [r5, #0x24] + add r1, r4, #4 + bl ov5_021D47DC +_021D5146: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D514C: .word 0x0000FFA0 + thumb_func_end ov5_021D5020 + + thumb_func_start ov5_021D5150 +ov5_021D5150: ; 0x021D5150 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r7, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #3 + bhi _021D5216 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5176: ; jump table + .short _021D517E - _021D5176 - 2 ; case 0 + .short _021D51C6 - _021D5176 - 2 ; case 1 + .short _021D51E4 - _021D5176 - 2 ; case 2 + .short _021D5202 - _021D5176 - 2 ; case 3 +_021D517E: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bne _021D51A0 + add r0, r6, #0 + mov r1, #1 + bl sub_02062D64 + mov r0, #1 + b _021D51AA +_021D51A0: + add r0, r6, #0 + mov r1, #0 + bl sub_02062D64 + mov r0, #3 +_021D51AA: + str r0, [r4, #0] + mov r1, #0 + mov r2, #1 + str r1, [sp] + mov r0, #6 + str r0, [sp, #4] + str r2, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + add r0, r7, #0 + add r3, r2, #0 + bl sub_02056B30 + b _021D5216 +_021D51C6: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + mov r1, #0 + bl sub_02062D64 + add r0, r5, #0 + mov r1, #0xd + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5216 +_021D51E4: + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02065684 + cmp r0, #1 + bne _021D5216 + add r0, r5, #0 + bl sub_020656AC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D5216 +_021D5202: + bl sub_0200F2AC + cmp r0, #0 + beq _021D5216 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D5216: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D5150 + + .rodata + + + .global Unk_ov5_021F89CC +Unk_ov5_021F89CC: ; 0x021F89CC + .incbin "incbin/overlay5_rodata.bin", 0xB8, 0xC0 - 0xB8 + + .global Unk_ov5_021F89D4 +Unk_ov5_021F89D4: ; 0x021F89D4 + .incbin "incbin/overlay5_rodata.bin", 0xC0, 0xD0 - 0xC0 + + .global Unk_ov5_021F89E4 +Unk_ov5_021F89E4: ; 0x021F89E4 + .incbin "incbin/overlay5_rodata.bin", 0xD0, 0xE0 - 0xD0 + + .global Unk_ov5_021F89F4 +Unk_ov5_021F89F4: ; 0x021F89F4 + .incbin "incbin/overlay5_rodata.bin", 0xE0, 0x130 - 0xE0 + + .global Unk_ov5_021F8A44 +Unk_ov5_021F8A44: ; 0x021F8A44 + .incbin "incbin/overlay5_rodata.bin", 0x130, 0x180 - 0x130 + + .global Unk_ov5_021F8A94 +Unk_ov5_021F8A94: ; 0x021F8A94 + .incbin "incbin/overlay5_rodata.bin", 0x180, 0x50 + diff --git a/asm/ov5_021D521C.s b/asm/ov5_021D521C.s new file mode 100644 index 000000000..4c601d1f4 --- /dev/null +++ b/asm/ov5_021D521C.s @@ -0,0 +1,611 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D521C +ov5_021D521C: ; 0x021D521C + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + cmp r6, #4 + blo _021D522A + bl sub_02022974 +_021D522A: + mov r0, #4 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + str r5, [r4, #0xc] + add r0, r6, #0 + add r1, r4, #4 + bl ov5_021D53D4 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + bl sub_020138C8 + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r3, r1, #1 + ldr r5, [r4, #0] + mov r1, #0 + cmp r5, #0 + bls _021D526A + ldr r2, [r4, #4] +_021D5258: + ldr r0, [r2, #0] + cmp r0, r3 + bls _021D5262 + str r1, [r4, #8] + b _021D526A +_021D5262: + add r1, r1, #1 + add r2, #0x30 + cmp r1, r5 + blo _021D5258 +_021D526A: + mov r0, #1 + str r0, [r4, #0x10] + add r0, r4, #0 + bl ov5_021D538C + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D521C + + thumb_func_start ov5_021D5278 +ov5_021D5278: ; 0x021D5278 + push {r4, lr} + add r4, r0, #0 + bne _021D5282 + bl sub_02022974 +_021D5282: + ldr r0, [r4, #0] + add r0, r0, #4 + bl ov5_021D555C + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov5_021D5278 + + thumb_func_start ov5_021D5298 +ov5_021D5298: ; 0x021D5298 + push {r3, r4, r5, lr} + add r4, r0, #0 + bne _021D52A2 + bl sub_02022974 +_021D52A2: + bl sub_020138C8 + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + ldr r1, [r4, #0] + cmp r1, #1 + bls _021D52F0 + ldr r1, [r4, #8] + sub r5, r1, #1 + bmi _021D52C2 + mov r2, #0x30 + ldr r3, [r4, #4] + mul r2, r5 + ldr r2, [r3, r2] + b _021D52C4 +_021D52C2: + mov r2, #0 +_021D52C4: + mov r3, #0x30 + ldr r5, [r4, #4] + mul r3, r1 + ldr r1, [r5, r3] + cmp r0, r1 + bge _021D52D4 + cmp r0, r2 + bge _021D52F0 +_021D52D4: + ldr r0, [r4, #8] + add r1, r0, #1 + str r1, [r4, #8] + ldr r0, [r4, #0] + cmp r1, r0 + blo _021D52E4 + mov r0, #0 + str r0, [r4, #8] +_021D52E4: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _021D52F0 + add r0, r4, #0 + bl ov5_021D538C +_021D52F0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5298 + + thumb_func_start ov5_021D52F4 +ov5_021D52F4: ; 0x021D52F4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp, #4] + add r6, r1, #0 + mov r4, #0 + add r5, r0, #0 + add r7, r0, #0 +_021D5302: + ldr r0, [sp, #4] + ldrb r1, [r0, #4] + mov r0, #1 + lsl r0, r4 + tst r0, r1 + beq _021D5330 + mov r0, #0x12 + ldrsh r0, [r5, r0] + mov r2, #0xe + mov r3, #0x10 + str r0, [sp] + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021D5A50 + ldrh r2, [r7, #6] + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021D5A78 + b _021D534A +_021D5330: + mov r0, #0 + mov r2, #0 + str r0, [sp] + add r0, r6, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov5_021D5A50 + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + bl ov5_021D5A78 +_021D534A: + add r4, r4, #1 + add r5, r5, #6 + add r7, r7, #2 + cmp r4, #4 + blt _021D5302 + ldr r1, [sp, #4] + mov r2, #0 + ldrh r1, [r1, #0x26] + add r0, r6, #0 + add r3, r2, #0 + bl ov5_021D5A8C + ldr r1, [sp, #4] + add r0, r6, #0 + ldrh r1, [r1, #0x28] + mov r2, #1 + bl ov5_021D5AA0 + ldr r1, [sp, #4] + mov r2, #0 + ldrh r1, [r1, #0x2a] + add r0, r6, #0 + add r3, r2, #0 + bl ov5_021D5AB4 + ldr r1, [sp, #4] + add r0, r6, #0 + ldrh r1, [r1, #0x2c] + mov r2, #1 + bl ov5_021D5AC8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D52F4 + + thumb_func_start ov5_021D538C +ov5_021D538C: ; 0x021D538C + add r3, r0, #0 + ldr r1, [r3, #8] + mov r0, #0x30 + mul r0, r1 + ldr r2, [r3, #4] + ldr r1, [r3, #0xc] + ldr r3, _021D53A0 ; =ov5_021D52F4 + add r0, r2, r0 + bx r3 + nop +_021D53A0: .word ov5_021D52F4 + thumb_func_end ov5_021D538C + + thumb_func_start ov5_021D53A4 +ov5_021D53A4: ; 0x021D53A4 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + mov r2, #0x40 + bl sub_020B2CE4 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x80 + bl sub_020B2CE4 + mov r2, #2 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #8 + bl sub_020B2CE4 + mov r2, #1 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #0xa + bl sub_020B2CE4 + pop {r4, pc} + thumb_func_end ov5_021D53A4 + + thumb_func_start ov5_021D53D4 +ov5_021D53D4: ; 0x021D53D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x24 + add r3, r0, #0 + str r1, [sp, #4] + mov r2, #0 + add r1, r3, #0 + mov r0, #0xb0 + mov r3, #4 + str r2, [sp] + bl sub_02006FE8 + mov r1, #0 + str r0, [sp, #0x18] + str r1, [sp, #0xc] + add r5, sp, #0x120 + mov r6, #1 + mov r7, #2 + add r4, r1, #0 +_021D53FA: + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + ldrsb r1, [r5, r4] + cmp r1, #0x45 + bne _021D5414 + ldrsb r1, [r5, r6] + cmp r1, #0x4f + bne _021D5414 + ldrsb r1, [r5, r7] + cmp r1, #0x46 + beq _021D5462 +_021D5414: + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + add r1, r5, #0 + mov r2, #0xd + bl sub_0201E0B8 + ldr r1, [sp, #0xc] + add r1, r1, #1 + str r1, [sp, #0xc] +_021D5462: + mov r1, #0 + ldrsb r1, [r5, r1] + cmp r1, #0x45 + bne _021D53FA + mov r1, #1 + ldrsb r1, [r5, r1] + cmp r1, #0x4f + bne _021D53FA + mov r1, #2 + ldrsb r1, [r5, r1] + cmp r1, #0x46 + bne _021D53FA + ldr r0, [sp, #0xc] + mov r1, #0x30 + add r4, r0, #0 + mul r4, r1 + mov r0, #4 + add r1, r4, #0 + bl sub_02018144 + ldr r1, [sp, #4] + add r2, r4, #0 + str r0, [r1, #0] + mov r1, #0 + bl sub_020C4CF4 + mov r1, #0 + str r1, [sp, #0x1c] + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x18] + cmp r1, #0 + ble _021D5548 + ldr r1, [sp, #0x1c] + str r1, [sp, #0x14] +_021D54A6: + ldr r1, [sp, #4] + mov r2, #0xd + ldr r5, [r1, #0] + ldr r1, [sp, #0x14] + add r4, r5, r1 + add r1, sp, #0x120 + bl sub_0201E0B8 + str r0, [sp, #8] + add r0, sp, #0x120 + add r1, sp, #0x20 + mov r2, #0x2c + bl sub_0201E0B8 + add r0, sp, #0x20 + bl sub_0201E0FC + ldr r1, [sp, #0x14] + add r6, r4, #0 + str r0, [r5, r1] + add r0, r4, #6 + mov r7, #0 + add r6, #0xe + str r0, [sp, #0x10] + add r5, r4, #0 +_021D54D8: + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + add r2, r6, #0 + bl ov5_021D5570 + str r0, [sp, #8] + ldrh r1, [r5, #6] + ldr r0, _021D5558 ; =0x0000FFFF + cmp r1, r0 + beq _021D54F8 + mov r0, #1 + ldrb r1, [r4, #4] + lsl r0, r7 + orr r0, r1 + strb r0, [r4, #4] + b _021D54FC +_021D54F8: + mov r0, #0 + strh r0, [r5, #6] +_021D54FC: + ldr r0, [sp, #0x10] + add r7, r7, #1 + add r0, r0, #2 + add r6, r6, #6 + add r5, r5, #2 + str r0, [sp, #0x10] + cmp r7, #4 + blt _021D54D8 + add r1, r4, #0 + ldr r0, [sp, #8] + add r1, #0x26 + bl ov5_021D5660 + add r1, r4, #0 + add r1, #0x28 + bl ov5_021D5660 + add r1, r4, #0 + add r1, #0x2a + bl ov5_021D5660 + add r4, #0x2c + add r1, r4, #0 + bl ov5_021D5660 + add r1, sp, #0x120 + mov r2, #0xd + bl sub_0201E0B8 + ldr r1, [sp, #0x14] + add r1, #0x30 + str r1, [sp, #0x14] + ldr r1, [sp, #0x1c] + add r2, r1, #1 + ldr r1, [sp, #0xc] + str r2, [sp, #0x1c] + cmp r2, r1 + blt _021D54A6 +_021D5548: + ldr r1, [sp, #0x18] + mov r0, #4 + bl sub_02018238 + ldr r0, [sp, #0xc] + add sp, #0x1fc + add sp, #0x24 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D5558: .word 0x0000FFFF + thumb_func_end ov5_021D53D4 + + thumb_func_start ov5_021D555C +ov5_021D555C: ; 0x021D555C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D555C + + thumb_func_start ov5_021D5570 +ov5_021D5570: ; 0x021D5570 + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x20 + str r1, [sp, #4] + add r7, r2, #0 + add r1, sp, #0x11c + mov r2, #0xd + bl sub_0201E0B8 + str r0, [sp] + add r0, sp, #0x11c + add r1, sp, #0x1c + mov r2, #0x2c + bl sub_0201E0B8 + add r4, r0, #0 + add r0, sp, #0x1c + bl sub_0201E0FC + cmp r0, #1 + bne _021D5648 + mov r6, #0 + add r5, sp, #8 +_021D559E: + add r0, r4, #0 + add r1, sp, #0x1c + mov r2, #0x2c + bl sub_0201E0B8 + add r4, r0, #0 + add r0, sp, #0x1c + bl sub_0201E0FC + strh r0, [r5] + add r6, r6, #1 + add r5, r5, #2 + cmp r6, #3 + blt _021D559E + add r1, sp, #8 + ldrh r0, [r1, #4] + ldrh r2, [r1] + ldrh r1, [r1, #2] + lsl r0, r0, #0xa + mov r6, #0 + lsl r1, r1, #5 + orr r1, r2 + orr r1, r0 + ldr r0, [sp, #4] + add r5, sp, #0x10 + strh r1, [r0] +_021D55D2: + add r0, r4, #0 + add r1, sp, #0x1c + mov r2, #0x2c + bl sub_0201E0B8 + add r4, r0, #0 + add r0, sp, #0x1c + bl sub_0201E0FC + add r6, r6, #1 + stmia r5!, {r0} + cmp r6, #3 + blt _021D55D2 + ldr r0, [sp, #0x10] + strh r0, [r7] + ldr r0, [sp, #0x14] + strh r0, [r7, #2] + ldr r0, [sp, #0x18] + strh r0, [r7, #4] + mov r0, #0 + ldrsh r1, [r7, r0] + mov r0, #1 + lsl r0, r0, #0xc + cmp r1, r0 + ble _021D5606 + strh r0, [r7] +_021D5606: + mov r0, #0 + ldrsh r1, [r7, r0] + ldr r0, _021D5658 ; =0xFFFFF000 + cmp r1, r0 + bge _021D5612 + strh r0, [r7] +_021D5612: + mov r0, #2 + ldrsh r2, [r7, r0] + lsl r1, r0, #0xb + cmp r2, r1 + ble _021D5620 + lsl r0, r0, #0xb + strh r0, [r7, #2] +_021D5620: + mov r0, #2 + ldrsh r1, [r7, r0] + ldr r0, _021D5658 ; =0xFFFFF000 + cmp r1, r0 + bge _021D562C + strh r0, [r7, #2] +_021D562C: + mov r0, #4 + ldrsh r2, [r7, r0] + lsl r1, r0, #0xa + cmp r2, r1 + ble _021D563A + lsl r0, r0, #0xa + strh r0, [r7, #4] +_021D563A: + mov r0, #4 + ldrsh r1, [r7, r0] + ldr r0, _021D5658 ; =0xFFFFF000 + cmp r1, r0 + bge _021D564E + strh r0, [r7, #4] + b _021D564E +_021D5648: + ldr r1, _021D565C ; =0x0000FFFF + ldr r0, [sp, #4] + strh r1, [r0] +_021D564E: + ldr r0, [sp] + add sp, #0x1fc + add sp, #0x20 + pop {r4, r5, r6, r7, pc} + nop +_021D5658: .word 0xFFFFF000 +_021D565C: .word 0x0000FFFF + thumb_func_end ov5_021D5570 + + thumb_func_start ov5_021D5660 +ov5_021D5660: ; 0x021D5660 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x14 + str r1, [sp, #4] + add r1, sp, #0x10c + add r1, #2 + mov r2, #0xd + bl sub_0201E0B8 + add r6, sp, #0x10c + add r7, sp, #0xc + str r0, [sp] + add r6, #2 + mov r4, #0 + add r5, sp, #8 + add r7, #2 +_021D5680: + add r0, r6, #0 + add r1, r7, #0 + mov r2, #0x2c + bl sub_0201E0B8 + add r6, r0, #0 + add r0, r7, #0 + bl sub_0201E0FC + strh r0, [r5] + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #3 + blt _021D5680 + add r0, sp, #8 + ldrh r1, [r0, #4] + lsl r2, r1, #0xa + ldrh r1, [r0] + ldrh r0, [r0, #2] + lsl r0, r0, #5 + orr r0, r1 + add r1, r2, #0 + orr r1, r0 + ldr r0, [sp, #4] + strh r1, [r0] + ldr r0, [sp] + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5660 \ No newline at end of file diff --git a/asm/ov5_021D56BC.s b/asm/ov5_021D56BC.s new file mode 100644 index 000000000..da29707ae --- /dev/null +++ b/asm/ov5_021D56BC.s @@ -0,0 +1,146 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D56BC +ov5_021D56BC: ; 0x021D56BC + push {r4, lr} + mov r0, #4 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + bne _021D56CE + bl sub_02022974 +_021D56CE: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D56BC + + thumb_func_start ov5_021D56D4 +ov5_021D56D4: ; 0x021D56D4 + push {r3, r4, r5, r6, lr} + sub sp, #0x4c + add r4, r0, #0 + add r0, sp, #4 + add r5, r1, #0 + bl sub_020C7DA0 + add r0, sp, #4 + add r1, r4, #0 + bl sub_020C8080 + cmp r0, #0 + beq _021D5770 + add r1, sp, #0 + add r0, sp, #4 + add r1, #2 + mov r2, #2 + bl sub_020C81D4 + cmp r0, #0 + bge _021D5702 + bl sub_02022974 +_021D5702: + add r0, sp, #4 + add r1, sp, #0 + mov r2, #2 + bl sub_020C81D4 + cmp r0, #0 + bge _021D5714 + bl sub_02022974 +_021D5714: + add r0, sp, #0 + ldrh r1, [r0, #2] + ldrh r0, [r0] + lsl r6, r1, #2 + lsl r4, r0, #2 + mov r0, #4 + add r1, r6, #0 + bl sub_02018144 + str r0, [r5, #0] + cmp r0, #0 + bne _021D5730 + bl sub_02022974 +_021D5730: + mov r0, #4 + add r1, r4, #0 + bl sub_02018144 + str r0, [r5, #4] + cmp r0, #0 + bne _021D5742 + bl sub_02022974 +_021D5742: + ldr r1, [r5, #0] + add r0, sp, #4 + add r2, r6, #0 + bl sub_020C81D4 + cmp r0, #0 + bge _021D5754 + bl sub_02022974 +_021D5754: + ldr r1, [r5, #4] + add r0, sp, #4 + add r2, r4, #0 + bl sub_020C81D4 + cmp r0, #0 + bge _021D5766 + bl sub_02022974 +_021D5766: + add r0, sp, #4 + bl sub_020C80C8 + add sp, #0x4c + pop {r3, r4, r5, r6, pc} +_021D5770: + bl sub_02022974 + add sp, #0x4c + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021D56D4 + + thumb_func_start ov5_021D5778 +ov5_021D5778: ; 0x021D5778 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_020181C4 + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021D5778 + + thumb_func_start ov5_021D5790 +ov5_021D5790: ; 0x021D5790 + ldr r1, [r1, #0] + lsl r0, r0, #2 + ldrh r0, [r1, r0] + strh r0, [r2] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D5790 + + thumb_func_start ov5_021D579C +ov5_021D579C: ; 0x021D579C + push {r3, r4} + lsl r4, r0, #2 + ldr r0, [r1, #0] + ldrh r0, [r0, r4] + strh r0, [r2] + ldr r0, [r1, #0] + add r0, r0, r4 + ldrh r0, [r0, #2] + strh r0, [r3] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D579C + + thumb_func_start ov5_021D57B4 +ov5_021D57B4: ; 0x021D57B4 + ldr r1, [r1, #4] + lsl r0, r0, #2 + add r0, r1, r0 + bx lr + thumb_func_end ov5_021D57B4 \ No newline at end of file diff --git a/asm/ov5_021D57BC.s b/asm/ov5_021D57BC.s new file mode 100644 index 000000000..c429a11c4 --- /dev/null +++ b/asm/ov5_021D57BC.s @@ -0,0 +1,136 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D57BC +ov5_021D57BC: ; 0x021D57BC + push {r4, lr} + mov r0, #4 + mov r1, #0x38 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #0x38 + bl sub_020C4B4C + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D57BC + + thumb_func_start ov5_021D57D8 +ov5_021D57D8: ; 0x021D57D8 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D57D8 + + thumb_func_start ov5_021D57EC +ov5_021D57EC: ; 0x021D57EC + ldr r0, [r0, #0] + bx lr + thumb_func_end ov5_021D57EC + + thumb_func_start ov5_021D57F0 +ov5_021D57F0: ; 0x021D57F0 + ldr r0, [r0, #8] + bx lr + thumb_func_end ov5_021D57F0 + + thumb_func_start ov5_021D57F4 +ov5_021D57F4: ; 0x021D57F4 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov5_021D57F4 + + thumb_func_start ov5_021D57F8 +ov5_021D57F8: ; 0x021D57F8 + ldrh r0, [r0, #0x10] + bx lr + thumb_func_end ov5_021D57F8 + + thumb_func_start ov5_021D57FC +ov5_021D57FC: ; 0x021D57FC + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + tst r0, r1 + beq _021D5808 + str r2, [r4, #0] +_021D5808: + mov r0, #2 + tst r0, r1 + beq _021D5810 + str r3, [r4, #4] +_021D5810: + mov r0, #4 + tst r0, r1 + beq _021D581A + ldr r0, [sp, #8] + str r0, [r4, #8] +_021D581A: + mov r0, #8 + tst r0, r1 + beq _021D5824 + ldr r0, [sp, #0xc] + str r0, [r4, #0xc] +_021D5824: + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + bl sub_020BFC74 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D57FC + + thumb_func_start ov5_021D5834 +ov5_021D5834: ; 0x021D5834 + push {r3, r4} + mov r4, #0x10 + tst r4, r1 + beq _021D583E + strh r2, [r0, #0x10] +_021D583E: + mov r2, #0x20 + tst r1, r2 + beq _021D5846 + str r3, [r0, #0x14] +_021D5846: + ldrh r1, [r0, #0x10] + ldr r0, [r0, #0x14] + lsl r0, r0, #0x10 + orr r1, r0 + ldr r0, _021D5858 ; =0x04000358 + str r1, [r0, #0] + pop {r3, r4} + bx lr + nop +_021D5858: .word 0x04000358 + thumb_func_end ov5_021D5834 + + thumb_func_start ov5_021D585C +ov5_021D585C: ; 0x021D585C + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + add r1, r4, #0 + add r1, #0x18 + mov r2, #0x20 + bl sub_020C4B68 + add r4, #0x18 + add r0, r4, #0 + bl sub_020BFD44 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D585C \ No newline at end of file diff --git a/asm/ov5_021D5878.s b/asm/ov5_021D5878.s new file mode 100644 index 000000000..adf0413b1 --- /dev/null +++ b/asm/ov5_021D5878.s @@ -0,0 +1,417 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D5878 +ov5_021D5878: ; 0x021D5878 + push {r4, lr} + mov r0, #4 + mov r1, #0x48 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #0x48 + bl sub_020C4B4C + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5878 + + thumb_func_start ov5_021D5894 +ov5_021D5894: ; 0x021D5894 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5894 + + thumb_func_start ov5_021D58A8 +ov5_021D58A8: ; 0x021D58A8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 + add r5, r0, #0 + add r6, r0, #0 +_021D58B6: + mov r0, #1 + lsl r0, r4 + tst r0, r7 + beq _021D58D0 + mov r1, #0 + mov r2, #2 + mov r3, #4 + ldrsh r1, [r5, r1] + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + add r0, r4, #0 + bl sub_020AF51C +_021D58D0: + add r1, r4, #4 + mov r0, #1 + lsl r0, r1 + tst r0, r7 + beq _021D58E2 + ldrh r1, [r6, #0x18] + add r0, r4, #0 + bl sub_020AF558 +_021D58E2: + add r4, r4, #1 + add r5, r5, #6 + add r6, r6, #2 + cmp r4, #4 + blt _021D58B6 + mov r0, #3 + lsl r0, r0, #8 + tst r0, r7 + beq _021D5904 + ldr r0, [sp, #8] + ldr r1, [sp, #8] + ldr r2, [sp, #8] + ldrh r0, [r0, #0x20] + ldrh r1, [r1, #0x22] + ldr r2, [r2, #0x28] + bl sub_020AF56C +_021D5904: + mov r0, #3 + lsl r0, r0, #0xa + tst r0, r7 + beq _021D591C + ldr r0, [sp, #8] + ldr r1, [sp, #8] + ldr r2, [sp, #8] + ldrh r0, [r0, #0x24] + ldrh r1, [r1, #0x26] + ldr r2, [r2, #0x2c] + bl sub_020AF590 +_021D591C: + mov r0, #1 + lsl r0, r0, #0xc + cmp r7, r0 + blt _021D5944 + ldr r0, [sp, #8] + ldr r1, [sp, #8] + ldr r0, [r0, #0x40] + ldr r2, [sp, #8] + str r0, [sp] + ldr r0, [sp, #8] + ldr r3, [sp, #8] + ldr r0, [r0, #0x44] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [r1, #0x34] + ldr r0, [r0, #0x30] + ldr r2, [r2, #0x38] + ldr r3, [r3, #0x3c] + bl sub_020AF5B4 +_021D5944: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021D58A8 + + thumb_func_start ov5_021D5948 +ov5_021D5948: ; 0x021D5948 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #1 + add r4, r2, #0 + lsl r0, r0, #8 + add r6, r1, #0 + tst r0, r4 + beq _021D5960 + ldrh r1, [r5, #0x20] + add r0, r6, #0 + bl sub_020B3564 +_021D5960: + mov r0, #2 + lsl r0, r0, #8 + tst r0, r4 + beq _021D5970 + ldrh r1, [r5, #0x22] + add r0, r6, #0 + bl sub_020B35A4 +_021D5970: + mov r0, #1 + lsl r0, r0, #0xa + tst r0, r4 + beq _021D5980 + ldrh r1, [r5, #0x24] + add r0, r6, #0 + bl sub_020B35E4 +_021D5980: + mov r0, #2 + lsl r0, r0, #0xa + tst r0, r4 + beq _021D5990 + ldrh r1, [r5, #0x26] + add r0, r6, #0 + bl sub_020B3624 +_021D5990: + mov r0, #1 + lsl r0, r0, #0xc + tst r0, r4 + beq _021D59A0 + ldr r1, [r5, #0x30] + add r0, r6, #0 + bl sub_020B3664 +_021D59A0: + mov r0, #2 + lsl r0, r0, #0xc + tst r0, r4 + beq _021D59B0 + ldr r1, [r5, #0x34] + add r0, r6, #0 + bl sub_020B36A4 +_021D59B0: + mov r0, #1 + lsl r0, r0, #0xe + tst r0, r4 + beq _021D59C0 + ldr r1, [r5, #0x38] + add r0, r6, #0 + bl sub_020B36E4 +_021D59C0: + mov r0, #2 + lsl r0, r0, #0xe + tst r0, r4 + beq _021D59D0 + ldr r1, [r5, #0x3c] + add r0, r6, #0 + bl sub_020B3724 +_021D59D0: + mov r0, #1 + lsl r0, r0, #0x10 + tst r0, r4 + beq _021D59E0 + ldr r1, [r5, #0x40] + add r0, r6, #0 + bl sub_020B3764 +_021D59E0: + mov r1, #2 + lsl r1, r1, #0x10 + add r0, r4, #0 + tst r0, r1 + beq _021D59F6 + ldr r2, [r5, #0x44] + lsr r1, r1, #2 + add r0, r6, #0 + and r1, r2 + bl sub_020B37A4 +_021D59F6: + mov r1, #1 + lsl r1, r1, #0x12 + add r0, r4, #0 + tst r0, r1 + beq _021D5A0C + ldr r2, [r5, #0x44] + lsr r1, r1, #4 + add r0, r6, #0 + and r1, r2 + bl sub_020B37E4 +_021D5A0C: + mov r1, #2 + lsl r1, r1, #0x12 + add r0, r4, #0 + tst r0, r1 + beq _021D5A22 + ldr r2, [r5, #0x44] + lsr r1, r1, #6 + add r0, r6, #0 + and r1, r2 + bl sub_020B3824 +_021D5A22: + mov r1, #1 + lsl r1, r1, #0x14 + add r0, r4, #0 + tst r0, r1 + beq _021D5A38 + ldr r2, [r5, #0x44] + lsr r1, r1, #8 + add r0, r6, #0 + and r1, r2 + bl sub_020B3864 +_021D5A38: + mov r1, #2 + lsl r1, r1, #0x14 + add r0, r4, #0 + tst r0, r1 + beq _021D5A4E + ldr r2, [r5, #0x44] + lsr r1, r1, #0xa + add r0, r6, #0 + and r1, r2 + bl sub_020B38A4 +_021D5A4E: + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D5948 + + thumb_func_start ov5_021D5A50 +ov5_021D5A50: ; 0x021D5A50 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #6 + add r4, r1, #0 + mul r4, r0 + strh r2, [r5, r4] + add r2, r5, #2 + strh r3, [r2, r4] + add r6, sp, #0 + mov r0, #0x10 + ldrsh r0, [r6, r0] + add r3, r5, #4 + strh r0, [r3, r4] + add r0, r1, #0 + ldrsh r1, [r5, r4] + ldrsh r2, [r2, r4] + ldrsh r3, [r3, r4] + bl sub_020AF51C + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D5A50 + + thumb_func_start ov5_021D5A78 +ov5_021D5A78: ; 0x021D5A78 + push {r4, lr} + add r4, r0, #0 + add r4, #0x18 + lsl r3, r1, #1 + strh r2, [r4, r3] + add r0, r1, #0 + ldrh r1, [r4, r3] + bl sub_020AF558 + pop {r4, pc} + thumb_func_end ov5_021D5A78 + + thumb_func_start ov5_021D5A8C +ov5_021D5A8C: ; 0x021D5A8C + push {r3, lr} + strh r1, [r0, #0x20] + str r2, [r0, #0x28] + cmp r3, #1 + bne _021D5A9E + mov r1, #1 + lsl r1, r1, #8 + bl ov5_021D58A8 +_021D5A9E: + pop {r3, pc} + thumb_func_end ov5_021D5A8C + + thumb_func_start ov5_021D5AA0 +ov5_021D5AA0: ; 0x021D5AA0 + push {r3, lr} + strh r1, [r0, #0x22] + cmp r2, #1 + bne _021D5AB0 + mov r1, #2 + lsl r1, r1, #8 + bl ov5_021D58A8 +_021D5AB0: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5AA0 + + thumb_func_start ov5_021D5AB4 +ov5_021D5AB4: ; 0x021D5AB4 + push {r3, lr} + strh r1, [r0, #0x24] + str r2, [r0, #0x2c] + cmp r3, #1 + bne _021D5AC6 + mov r1, #1 + lsl r1, r1, #0xa + bl ov5_021D58A8 +_021D5AC6: + pop {r3, pc} + thumb_func_end ov5_021D5AB4 + + thumb_func_start ov5_021D5AC8 +ov5_021D5AC8: ; 0x021D5AC8 + push {r3, lr} + strh r1, [r0, #0x26] + cmp r2, #1 + bne _021D5AD8 + mov r1, #2 + lsl r1, r1, #0xa + bl ov5_021D58A8 +_021D5AD8: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5AC8 + + thumb_func_start ov5_021D5ADC +ov5_021D5ADC: ; 0x021D5ADC + push {r3, lr} + str r1, [r0, #0x34] + cmp r2, #1 + bne _021D5AEC + mov r1, #2 + lsl r1, r1, #0xc + bl ov5_021D58A8 +_021D5AEC: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5ADC + + thumb_func_start ov5_021D5AF0 +ov5_021D5AF0: ; 0x021D5AF0 + push {r3, lr} + str r1, [r0, #0x38] + cmp r2, #1 + bne _021D5B00 + mov r1, #1 + lsl r1, r1, #0xe + bl ov5_021D58A8 +_021D5B00: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5AF0 + + thumb_func_start ov5_021D5B04 +ov5_021D5B04: ; 0x021D5B04 + push {r3, lr} + str r1, [r0, #0x40] + cmp r2, #1 + bne _021D5B14 + mov r1, #1 + lsl r1, r1, #0x10 + bl ov5_021D58A8 +_021D5B14: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5B04 + + thumb_func_start ov5_021D5B18 +ov5_021D5B18: ; 0x021D5B18 + push {r3, lr} + cmp r2, #1 + ldr r2, [r0, #0x44] + bne _021D5B26 + tst r2, r1 + beq _021D5B2A + pop {r3, pc} +_021D5B26: + tst r2, r1 + beq _021D5B3C +_021D5B2A: + ldr r2, [r0, #0x44] + eor r1, r2 + str r1, [r0, #0x44] + cmp r3, #1 + bne _021D5B3C + mov r1, #1 + lsl r1, r1, #0xc + bl ov5_021D58A8 +_021D5B3C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5B18 \ No newline at end of file diff --git a/asm/ov5_021D5B40.s b/asm/ov5_021D5B40.s new file mode 100644 index 000000000..343f8f25b --- /dev/null +++ b/asm/ov5_021D5B40.s @@ -0,0 +1,79 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D5B40 +ov5_021D5B40: ; 0x021D5B40 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0x18 + ldr r1, _021D5BA4 ; =0x021F8AE4 + mul r0, r2 + add r6, r3, #0 + add r4, r1, r0 + cmp r2, #0x11 + blo _021D5B5A + bl sub_02022974 +_021D5B5A: + mov r0, #4 + bl sub_020203AC + str r0, [r5, #0x24] + ldrb r0, [r4, #0xc] + add r2, r4, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x24] + str r0, [sp, #8] + ldrh r3, [r4, #0xe] + ldr r1, [r4, #0] + add r0, r7, #0 + bl sub_020206D0 + ldr r0, [r5, #0x24] + bl sub_020203D4 + ldr r0, [r4, #0x10] + ldr r1, [r4, #0x14] + ldr r2, [r5, #0x24] + bl sub_020206BC + cmp r6, #0 + beq _021D5B9E + ldr r0, [r5, #0x24] + mov r1, #6 + str r0, [sp] + mov r0, #7 + mov r2, #2 + mov r3, #4 + bl sub_02020304 +_021D5B9E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021D5BA4: .word 0x021F8AE4 + thumb_func_end ov5_021D5B40 + + thumb_func_start ov5_021D5BA8 +ov5_021D5BA8: ; 0x021D5BA8 + push {r4, lr} + add r4, r0, #0 + bl sub_020203E0 + ldr r0, [r4, #0x24] + bl sub_02020390 + ldr r0, [r4, #0x24] + bl sub_020203B8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5BA8 + + .rodata + + + .global Unk_ov5_021F8AE4 +Unk_ov5_021F8AE4: ; 0x021F8AE4 + .incbin "incbin/overlay5_rodata.bin", 0x1D0, 0x198 + diff --git a/asm/ov5_021D5BC0.s b/asm/ov5_021D5BC0.s new file mode 100644 index 000000000..b9acc33de --- /dev/null +++ b/asm/ov5_021D5BC0.s @@ -0,0 +1,180 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D5BC0 +ov5_021D5BC0: ; 0x021D5BC0 + push {r4, lr} + ldr r4, [r0, #0x18] + cmp r4, #0 + bne _021D5BCC + bl sub_02022974 +_021D5BCC: + cmp r4, #5 + blt _021D5BD4 + bl sub_02022974 +_021D5BD4: + sub r0, r4, #1 + pop {r4, pc} + thumb_func_end ov5_021D5BC0 + + thumb_func_start ov5_021D5BD8 +ov5_021D5BD8: ; 0x021D5BD8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021D5BC0 + add r1, r0, #0 + lsl r2, r1, #4 + ldr r1, _021D5BF0 ; =0x021F8C7C + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_021D5BF0: .word 0x021F8C7C + thumb_func_end ov5_021D5BD8 + + thumb_func_start ov5_021D5BF4 +ov5_021D5BF4: ; 0x021D5BF4 + push {r4, lr} + add r4, r0, #0 + bl ov5_021D5BC0 + lsl r1, r0, #4 + ldr r0, _021D5C10 ; =0x021F8C80 + ldr r1, [r0, r1] + cmp r1, #0 + bne _021D5C0A + mov r0, #1 + pop {r4, pc} +_021D5C0A: + add r0, r4, #0 + blx r1 + pop {r4, pc} + ; .align 2, 0 +_021D5C10: .word 0x021F8C80 + thumb_func_end ov5_021D5BF4 + + thumb_func_start ov5_021D5C14 +ov5_021D5C14: ; 0x021D5C14 + push {r4, lr} + add r4, r0, #0 + bl ov5_021D5BC0 + add r1, r0, #0 + lsl r2, r1, #4 + ldr r1, _021D5C2C ; =0x021F8C84 + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_021D5C2C: .word 0x021F8C84 + thumb_func_end ov5_021D5C14 + + thumb_func_start ov5_021D5C30 +ov5_021D5C30: ; 0x021D5C30 + push {r4, lr} + add r4, r0, #0 + bl ov5_021D5BC0 + add r1, r0, #0 + lsl r2, r1, #4 + ldr r1, _021D5C48 ; =0x021F8C88 + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_021D5C48: .word 0x021F8C88 + thumb_func_end ov5_021D5C30 + + thumb_func_start ov5_021D5C4C +ov5_021D5C4C: ; 0x021D5C4C + ldr r3, _021D5C50 ; =ov5_021EA728 + bx r3 + ; .align 2, 0 +_021D5C50: .word ov5_021EA728 + thumb_func_end ov5_021D5C4C + + thumb_func_start ov5_021D5C54 +ov5_021D5C54: ; 0x021D5C54 + ldr r3, _021D5C58 ; =sub_0205A0BC + bx r3 + ; .align 2, 0 +_021D5C58: .word sub_0205A0BC + thumb_func_end ov5_021D5C54 + + thumb_func_start ov5_021D5C5C +ov5_021D5C5C: ; 0x021D5C5C + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D5C74 ; =0x00000038 + mov r1, #2 + bl sub_02006590 + add r0, r4, #0 + bl ov56_02256410 + add r4, #0x84 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 +_021D5C74: .word 0x00000038 + thumb_func_end ov5_021D5C5C + + thumb_func_start ov5_021D5C78 +ov5_021D5C78: ; 0x021D5C78 + ldr r3, _021D5C7C ; =ov5_021EA790 + bx r3 + ; .align 2, 0 +_021D5C7C: .word ov5_021EA790 + thumb_func_end ov5_021D5C78 + + thumb_func_start ov5_021D5C80 +ov5_021D5C80: ; 0x021D5C80 + ldr r3, _021D5C84 ; =sub_0205A0A0 + bx r3 + ; .align 2, 0 +_021D5C84: .word sub_0205A0A0 + thumb_func_end ov5_021D5C80 + + thumb_func_start ov5_021D5C88 +ov5_021D5C88: ; 0x021D5C88 + push {r3, lr} + add r0, #0x84 + ldr r0, [r0, #0] + bl ov56_02256468 + ldr r0, _021D5C9C ; =0x00000038 + bl sub_02006514 + pop {r3, pc} + nop +_021D5C9C: .word 0x00000038 + thumb_func_end ov5_021D5C88 + + thumb_func_start ov5_021D5CA0 +ov5_021D5CA0: ; 0x021D5CA0 + ldr r3, _021D5CA4 ; =ov5_021EA7CC + bx r3 + ; .align 2, 0 +_021D5CA4: .word ov5_021EA7CC + thumb_func_end ov5_021D5CA0 + + thumb_func_start ov5_021D5CA8 +ov5_021D5CA8: ; 0x021D5CA8 + mov r0, #1 + bx lr + thumb_func_end ov5_021D5CA8 + + thumb_func_start ov5_021D5CAC +ov5_021D5CAC: ; 0x021D5CAC + mov r0, #1 + bx lr + thumb_func_end ov5_021D5CAC + + .rodata + + + .global Unk_ov5_021F8C7C +Unk_ov5_021F8C7C: ; 0x021F8C7C + .incbin "incbin/overlay5_rodata.bin", 0x368, 0x40 + diff --git a/asm/ov5_021D5CB0.s b/asm/ov5_021D5CB0.s new file mode 100644 index 000000000..e132a0dda --- /dev/null +++ b/asm/ov5_021D5CB0.s @@ -0,0 +1,306 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D5CB0 +ov5_021D5CB0: ; 0x021D5CB0 + push {r4, lr} + mov r1, #0x62 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + add r4, r0, #0 + bne _021D5CC4 + bl sub_02022974 +_021D5CC4: + mov r1, #0 + add r2, r4, #0 + add r0, r1, #0 +_021D5CCA: + strh r0, [r2, #0x1c] + strh r0, [r2, #0x1e] + str r0, [r2, #8] + str r0, [r2, #0x10] + str r0, [r2, #0x18] + str r0, [r2, #0x14] + add r1, r1, #1 + add r2, #0x18 + cmp r1, #0x10 + blt _021D5CCA + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5CB0 + + thumb_func_start ov5_021D5CE4 +ov5_021D5CE4: ; 0x021D5CE4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r6, #0 + mov r0, #0x9b + mov r1, #4 + bl sub_02006C24 + add r1, r6, #0 + mov r2, #4 + add r7, r0, #0 + bl sub_02006CB8 + str r0, [r5, #0] + str r0, [r5, #4] + ldr r0, [r0, #0] + add r4, r6, #0 + cmp r0, #0 + bls _021D5D26 +_021D5D0A: + ldr r1, [sp] + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov5_021D5D30 + cmp r0, #0 + blt _021D5D1C + add r6, r6, #1 +_021D5D1C: + ldr r0, [r5, #4] + add r4, r4, #1 + ldr r0, [r0, #0] + cmp r4, r0 + blo _021D5D0A +_021D5D26: + add r0, r7, #0 + bl sub_02006CA8 + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D5CE4 + + thumb_func_start ov5_021D5D30 +ov5_021D5D30: ; 0x021D5D30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r0, #0 + str r1, [sp] + str r2, [sp, #4] + str r3, [sp, #8] + bne _021D5D46 + mov r0, #0 + add sp, #0x38 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_021D5D46: + mov r4, #0 + add r1, r5, #0 +_021D5D4A: + ldr r0, [r1, #0x14] + cmp r0, #0 + beq _021D5D58 + add r4, r4, #1 + add r1, #0x18 + cmp r4, #0x10 + blt _021D5D4A +_021D5D58: + cmp r4, #0x10 + beq _021D5D62 + ldr r0, [sp] + cmp r0, #0 + bne _021D5D6A +_021D5D62: + mov r0, #0 + add sp, #0x38 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_021D5D6A: + mov r0, #0x18 + add r6, r4, #0 + mul r6, r0 + add r0, r5, #0 + str r0, [sp, #0xc] + add r0, #8 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + mov r1, #0x34 + add r7, r0, #0 + mul r7, r1 + ldr r1, [r5, #4] + ldr r0, [sp] + add r1, r1, #4 + add r1, r1, r7 + bl sub_0201DF50 + ldr r1, [sp, #0xc] + str r0, [r1, r6] + add r0, r1, #0 + ldr r0, [r0, r6] + cmp r0, #0 + bne _021D5DA0 + mov r0, #0 + add sp, #0x38 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_021D5DA0: + ldr r1, [r5, #4] + ldr r0, [sp] + add r1, r1, #4 + add r1, r1, r7 + bl sub_0201DFE4 + add r1, r5, r6 + str r0, [r1, #0xc] + ldr r1, _021D5DE8 ; =0x02201D20 + ldr r2, [sp, #4] + add r0, sp, #0x10 + bl sub_020D7510 + ldr r0, [r5, #4] + mov r2, #4 + add r0, r0, #4 + add r1, r0, r7 + add r0, r5, r6 + str r1, [r0, #0x18] + ldr r1, [sp, #4] + add r7, r5, #0 + ldr r0, [sp, #8] + add r7, #0x14 + add r1, r1, #1 + bl sub_02006CB8 + str r0, [r7, r6] + ldr r0, [r7, r6] + bl sub_020B3C1C + add r1, r5, r6 + str r0, [r1, #0x10] + add r0, r4, #0 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D5DE8: .word 0x02201D20 + thumb_func_end ov5_021D5D30 + + thumb_func_start ov5_021D5DEC +ov5_021D5DEC: ; 0x021D5DEC + push {r3, r4, r5, r6, r7, lr} + cmp r0, #0 + beq _021D5E58 + mov r4, #0 + add r5, r0, #0 + add r5, #8 + add r6, r4, #0 + add r7, r4, #0 +_021D5DFC: + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _021D5E50 + ldr r1, [r5, #0x10] + cmp r1, #0 + beq _021D5E50 + ldrh r0, [r5, #0x14] + lsl r0, r0, #1 + add r0, r1, r0 + ldrb r1, [r0, #0x11] + ldrh r0, [r5, #0x16] + cmp r1, r0 + bgt _021D5E4C + strh r6, [r5, #0x16] + ldrh r0, [r5, #0x14] + add r0, r0, #1 + strh r0, [r5, #0x14] + ldrh r0, [r5, #0x14] + ldr r1, [r5, #0x10] + lsl r0, r0, #1 + add r0, r1, r0 + ldrb r0, [r0, #0x10] + cmp r0, #0xff + bne _021D5E2E + strh r6, [r5, #0x14] +_021D5E2E: + ldrh r2, [r5, #0x14] + ldr r1, [r5, #0x10] + ldr r0, [r5, #8] + lsl r2, r2, #1 + add r1, r1, r2 + ldrb r1, [r1, #0x10] + bl sub_0201DEAC + add r2, r0, #0 + ldr r1, [r5, #0] + ldr r3, [r5, #4] + add r0, r7, #0 + bl sub_0201DC68 + b _021D5E50 +_021D5E4C: + add r0, r0, #1 + strh r0, [r5, #0x16] +_021D5E50: + add r4, r4, #1 + add r5, #0x18 + cmp r4, #0x10 + blt _021D5DFC +_021D5E58: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5DEC + + thumb_func_start ov5_021D5E5C +ov5_021D5E5C: ; 0x021D5E5C + push {r3, r4, r5, lr} + add r5, r0, #0 + beq _021D5E8A + mov r0, #0x18 + add r4, r1, #0 + mul r4, r0 + add r0, r5, r4 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _021D5E74 + bl sub_020181C4 +_021D5E74: + add r1, r5, #0 + add r1, #0x18 + ldr r0, [r1, r4] + cmp r0, #0 + beq _021D5E82 + mov r0, #0 + str r0, [r1, r4] +_021D5E82: + mov r1, #0 + add r0, r5, r4 + strh r1, [r0, #0x1c] + strh r1, [r0, #0x1e] +_021D5E8A: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D5E5C + + thumb_func_start ov5_021D5E8C +ov5_021D5E8C: ; 0x021D5E8C + push {r3, r4, r5, lr} + add r5, r0, #0 + beq _021D5EA8 + mov r4, #0 +_021D5E94: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D5E5C + add r4, r4, #1 + cmp r4, #0x10 + blt _021D5E94 + ldr r0, [r5, #0] + bl sub_020181C4 +_021D5EA8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5E8C + + thumb_func_start ov5_021D5EAC +ov5_021D5EAC: ; 0x021D5EAC + push {r3, lr} + cmp r0, #0 + beq _021D5EB6 + bl sub_020181C4 +_021D5EB6: + pop {r3, pc} + thumb_func_end ov5_021D5EAC + .data + + + .global Unk_ov5_02201D20 +Unk_ov5_02201D20: ; 0x02201D20 + .incbin "incbin/overlay5_data.bin", 0x0, 0x15 + diff --git a/asm/ov5_021D5EB8.s b/asm/ov5_021D5EB8.s new file mode 100644 index 000000000..cdfeb44da --- /dev/null +++ b/asm/ov5_021D5EB8.s @@ -0,0 +1,11768 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021D5EB8 +ov5_021D5EB8: ; 0x021D5EB8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D5ECC: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D5ECC + add r0, r5, #0 + bl ov5_021D6364 + str r0, [r4, #0] + mov r1, #0 + str r1, [r4, #4] + str r1, [r4, #8] + mov r0, #6 + str r0, [r4, #0xc] + str r1, [r4, #0x14] + mov r0, #0x1f + str r0, [r4, #0x10] + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D5EB8 + + thumb_func_start ov5_021D5EF8 +ov5_021D5EF8: ; 0x021D5EF8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D5F06 + bl sub_0200DA58 +_021D5F06: + add r0, r4, #0 + bl ov5_021D63A4 + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021D5F12: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021D5F12 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5EF8 + + thumb_func_start ov5_021D5F24 +ov5_021D5F24: ; 0x021D5F24 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + cmp r0, #6 + beq _021D5F34 + bl sub_02022974 +_021D5F34: + cmp r4, #0x1f + blt _021D5F3C + bl sub_02022974 +_021D5F3C: + ldr r2, [r5, #4] + cmp r2, r4 + beq _021D5F78 + ldr r0, [r5, #0] + mov r1, #8 + bl ov5_021D6418 + cmp r0, #0 + bne _021D5F52 + bl sub_02022974 +_021D5F52: + ldr r0, [r5, #0] + mov r1, #0 + add r2, r4, #0 + bl ov5_021D6418 + cmp r0, #0 + bne _021D5F64 + bl sub_02022974 +_021D5F64: + ldr r0, [r5, #0] + mov r1, #3 + add r2, r4, #0 + bl ov5_021D6418 + cmp r0, #0 + bne _021D5F76 + bl sub_02022974 +_021D5F76: + str r4, [r5, #4] +_021D5F78: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D5F24 + + thumb_func_start ov5_021D5F7C +ov5_021D5F7C: ; 0x021D5F7C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0x1f + blt _021D5F8A + bl sub_02022974 +_021D5F8A: + ldr r0, [r5, #0xc] + cmp r0, #6 + beq _021D5F96 + str r4, [r5, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D5F96: + ldr r0, [r5, #4] + cmp r0, r4 + bne _021D5FA0 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D5FA0: + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _021D5FAA + bl sub_02022974 +_021D5FAA: + str r4, [r5, #8] + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov5_021D6178 + cmp r0, #0 + bne _021D5FC6 + ldr r0, _021D5FD8 ; =ov5_021D5FE4 + mov r2, #0 + add r1, r5, #0 + str r2, [r5, #0xc] + bl sub_0200D9E8 + b _021D5FD2 +_021D5FC6: + ldr r0, _021D5FDC ; =ov5_021D60B4 + mov r2, #0 + add r1, r5, #0 + str r2, [r5, #0xc] + bl sub_0200D9E8 +_021D5FD2: + str r0, [r5, #0x14] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D5FD8: .word ov5_021D5FE4 +_021D5FDC: .word ov5_021D60B4 + thumb_func_end ov5_021D5F7C + + thumb_func_start ov5_021D5FE0 +ov5_021D5FE0: ; 0x021D5FE0 + ldr r0, [r0, #4] + bx lr + thumb_func_end ov5_021D5FE0 + + thumb_func_start ov5_021D5FE4 +ov5_021D5FE4: ; 0x021D5FE4 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + cmp r1, #5 + bhi _021D60B2 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D5FFA: ; jump table + .short _021D6006 - _021D5FFA - 2 ; case 0 + .short _021D6020 - _021D5FFA - 2 ; case 1 + .short _021D6046 - _021D5FFA - 2 ; case 2 + .short _021D6060 - _021D5FFA - 2 ; case 3 + .short _021D6074 - _021D5FFA - 2 ; case 4 + .short _021D6096 - _021D5FFA - 2 ; case 5 +_021D6006: + ldr r0, [r4, #0] + ldr r2, [r4, #4] + mov r1, #5 + bl ov5_021D6418 + cmp r0, #0 + bne _021D6018 + bl sub_02022974 +_021D6018: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D6020: + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov5_021D64D0 + cmp r0, #3 + beq _021D60B2 + ldr r0, [r4, #0] + ldr r2, [r4, #4] + mov r1, #8 + bl ov5_021D6418 + cmp r0, #0 + bne _021D603E + bl sub_02022974 +_021D603E: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D6046: + ldr r0, [r4, #0] + ldr r2, [r4, #8] + mov r1, #1 + bl ov5_021D6418 + cmp r0, #0 + bne _021D6058 + bl sub_02022974 +_021D6058: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D6060: + ldr r0, [r4, #0] + ldr r1, [r4, #8] + bl ov5_021D64D0 + cmp r0, #1 + beq _021D60B2 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D6074: + ldr r0, [r4, #0] + ldr r2, [r4, #8] + mov r1, #2 + bl ov5_021D6418 + cmp r0, #0 + bne _021D6086 + bl sub_02022974 +_021D6086: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} +_021D6096: + mov r1, #6 + str r1, [r4, #0xc] + mov r1, #0 + str r1, [r4, #0x14] + bl sub_0200DA58 + ldr r1, [r4, #0x10] + cmp r1, #0x1f + beq _021D60B2 + add r0, r4, #0 + bl ov5_021D5F7C + mov r0, #0x1f + str r0, [r4, #0x10] +_021D60B2: + pop {r4, pc} + thumb_func_end ov5_021D5FE4 + + thumb_func_start ov5_021D60B4 +ov5_021D60B4: ; 0x021D60B4 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0xc] + cmp r1, #4 + bhi _021D6176 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D60CA: ; jump table + .short _021D60D4 - _021D60CA - 2 ; case 0 + .short _021D60EE - _021D60CA - 2 ; case 1 + .short _021D6102 - _021D60CA - 2 ; case 2 + .short _021D612E - _021D60CA - 2 ; case 3 + .short _021D6154 - _021D60CA - 2 ; case 4 +_021D60D4: + ldr r0, [r4, #0] + ldr r2, [r4, #8] + mov r1, #1 + bl ov5_021D6418 + cmp r0, #0 + bne _021D60E6 + bl sub_02022974 +_021D60E6: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D60EE: + ldr r0, [r4, #0] + ldr r1, [r4, #8] + bl ov5_021D64D0 + cmp r0, #1 + beq _021D6176 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D6102: + ldr r0, [r4, #0] + ldr r2, [r4, #4] + mov r1, #7 + bl ov5_021D6418 + cmp r0, #0 + bne _021D6114 + bl sub_02022974 +_021D6114: + ldr r0, [r4, #0] + ldr r2, [r4, #8] + mov r1, #4 + bl ov5_021D6418 + cmp r0, #0 + bne _021D6126 + bl sub_02022974 +_021D6126: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D612E: + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov5_021D64D0 + cmp r0, #3 + beq _021D6176 + ldr r0, [r4, #0] + ldr r2, [r4, #4] + mov r1, #8 + bl ov5_021D6418 + cmp r0, #0 + bne _021D614C + bl sub_02022974 +_021D614C: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + pop {r4, pc} +_021D6154: + ldr r1, [r4, #8] + mov r2, #0 + str r1, [r4, #4] + str r2, [r4, #8] + mov r1, #6 + str r1, [r4, #0xc] + str r2, [r4, #0x14] + bl sub_0200DA58 + ldr r1, [r4, #0x10] + cmp r1, #0x1f + beq _021D6176 + add r0, r4, #0 + bl ov5_021D5F7C + mov r0, #0x1f + str r0, [r4, #0x10] +_021D6176: + pop {r4, pc} + thumb_func_end ov5_021D60B4 + + thumb_func_start ov5_021D6178 +ov5_021D6178: ; 0x021D6178 + mov r2, #0 + cmp r0, #7 + bgt _021D618E + cmp r0, #5 + blt _021D61CC + beq _021D6194 + cmp r0, #6 + beq _021D61A4 + cmp r0, #7 + beq _021D61BE + b _021D61CC +_021D618E: + cmp r0, #0x15 + beq _021D61B4 + b _021D61CC +_021D6194: + cmp r1, #6 + beq _021D61A0 + cmp r1, #0x15 + beq _021D61A0 + cmp r1, #7 + bne _021D61CC +_021D61A0: + mov r2, #1 + b _021D61CC +_021D61A4: + cmp r1, #5 + beq _021D61B0 + cmp r1, #0x15 + beq _021D61B0 + cmp r1, #7 + bne _021D61CC +_021D61B0: + mov r2, #1 + b _021D61CC +_021D61B4: + sub r0, r1, #5 + cmp r0, #2 + bhi _021D61CC + mov r2, #1 + b _021D61CC +_021D61BE: + cmp r1, #5 + beq _021D61CA + cmp r1, #0x15 + beq _021D61CA + cmp r1, #6 + bne _021D61CC +_021D61CA: + mov r2, #1 +_021D61CC: + add r0, r2, #0 + bx lr + thumb_func_end ov5_021D6178 + + thumb_func_start ov5_021D61D0 +ov5_021D61D0: ; 0x021D61D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + ldr r1, _021D627C ; =0xFFFFF000 + add r6, r0, #0 + add r0, #0x14 + bl sub_0202309C + mov r0, #0 + add r3, r6, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0xff + lsl r0, r0, #0xc + str r0, [sp, #0x14] + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [sp, #0x18] + add r0, r6, #0 + add r0, #0xac + add r1, sp, #0xc + mov r2, #1 + add r3, #0x14 + bl sub_0200A8B0 + mov r4, #0 + add r5, r6, #0 + mov r7, #0x1f +_021D6206: + add r0, r7, #0 + add r1, r4, #0 + mov r2, #4 + bl sub_02009714 + add r4, r4, #1 + stmia r5!, {r0} + cmp r4, #4 + blt _021D6206 + bl sub_02009F34 + add r1, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + str r0, [r6, #0x10] + mov r1, #0 + mov r2, #0x3f + bl ov5_021D6290 + ldr r0, [r6, #0x10] + mov r1, #1 + mov r2, #0x40 + bl ov5_021D6290 + ldr r0, [r6, #0x10] + mov r1, #2 + mov r2, #0x3d + bl ov5_021D6290 + ldr r0, [r6, #0x10] + mov r1, #3 + mov r2, #0x3e + bl ov5_021D6290 + mov r0, #0x60 + str r0, [sp] + add r0, r6, #0 + add r0, #0x14 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + add r0, sp, #0 + bl sub_020218BC + add r1, r6, #0 + add r1, #0xf4 + str r0, [r1, #0] + ldr r0, _021D6280 ; =ov5_021D6284 + add r1, r6, #0 + mov r2, #0xa + bl sub_0200D9E8 + add r6, #0xf8 + str r0, [r6, #0] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D627C: .word 0xFFFFF000 +_021D6280: .word ov5_021D6284 + thumb_func_end ov5_021D61D0 + + thumb_func_start ov5_021D6284 +ov5_021D6284: ; 0x021D6284 + ldr r3, _021D628C ; =sub_020219F8 + add r1, #0xf4 + ldr r0, [r1, #0] + bx r3 + ; .align 2, 0 +_021D628C: .word sub_020219F8 + thumb_func_end ov5_021D6284 + + thumb_func_start ov5_021D6290 +ov5_021D6290: ; 0x021D6290 + push {r3, r4, r5, lr} + add r5, r2, #0 + bl sub_02009F38 + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x41 + add r1, r5, #0 + mov r2, #0 + mov r3, #4 + bl sub_02006FE8 + add r5, r0, #0 + add r1, r4, #0 + mov r2, #4 + bl sub_02009F40 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D6290 + + thumb_func_start ov5_021D62BC +ov5_021D62BC: ; 0x021D62BC + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021D62C4: + ldr r0, [r6, #0x10] + add r1, r4, #0 + bl sub_02009F38 + bl sub_02009F8C + ldr r0, [r5, #0] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021D62C4 + ldr r0, [r6, #0x10] + bl sub_020181C4 + mov r0, #0 + str r0, [r6, #0x10] + add r0, r6, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + bl sub_02021964 + add r0, r6, #0 + mov r1, #0 + add r0, #0xf4 + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl sub_0200DA58 + mov r0, #0 + add r6, #0xf8 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D62BC + + thumb_func_start ov5_021D630C +ov5_021D630C: ; 0x021D630C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r1, _021D635C ; =0x0013F000 + cmp r0, r1 + ble _021D6322 + bl sub_020E1F6C + str r1, [r4, #0] + b _021D632C +_021D6322: + ldr r2, _021D6360 ; =0xFFFC0000 + cmp r0, r2 + bge _021D632C + add r0, r0, r1 + str r0, [r4, #0] +_021D632C: + mov r1, #1 + ldr r3, [r4, #4] + lsl r1, r1, #0x14 + cmp r3, r1 + ble _021D6346 + lsr r2, r3, #0x1f + lsl r1, r3, #0xc + sub r1, r1, r2 + mov r0, #0xc + ror r1, r0 + add r0, r2, r1 + str r0, [r4, #4] + b _021D6350 +_021D6346: + ldr r0, _021D6360 ; =0xFFFC0000 + cmp r3, r0 + bge _021D6350 + add r0, r3, r1 + str r0, [r4, #4] +_021D6350: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021C50 + pop {r3, r4, r5, pc} + nop +_021D635C: .word 0x0013F000 +_021D6360: .word 0xFFFC0000 + thumb_func_end ov5_021D630C + + thumb_func_start ov5_021D6364 +ov5_021D6364: ; 0x021D6364 + push {r3, r4, r5, lr} + mov r1, #0x43 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0x41 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + add r0, #8 + bl ov5_021D61D0 + ldr r0, _021D639C ; =0x02201D78 + mov r1, #4 + str r0, [r4, #0] + ldr r0, _021D63A0 ; =0x021F8D90 + str r0, [r4, #4] + mov r0, #0x41 + bl sub_02006C24 + mov r1, #0x42 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D639C: .word 0x02201D78 +_021D63A0: .word 0x021F8D90 + thumb_func_end ov5_021D6364 + + thumb_func_start ov5_021D63A4 +ov5_021D63A4: ; 0x021D63A4 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D640E + mov r5, #0 +_021D63B2: + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov5_021D68B8 + add r5, r5, #1 + cmp r5, #0x1f + blt _021D63B2 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + ldr r0, [r0, #0x48] + add r3, r2, #0 + bl ov5_021D57FC + ldr r1, _021D6414 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + strh r0, [r1] + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0] + add r0, #8 + bl ov5_021D62BC + mov r0, #0x42 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02006CA8 + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0] +_021D640E: + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021D6414: .word 0x04000008 + thumb_func_end ov5_021D63A4 + + thumb_func_start ov5_021D6418 +ov5_021D6418: ; 0x021D6418 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r6, r0, #0 + mov r5, #1 + cmp r4, #0x1f + ble _021D6428 + mov r0, #0 + pop {r4, r5, r6, pc} +_021D6428: + cmp r1, #8 + bhi _021D64CC + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D6438: ; jump table + .short _021D644A - _021D6438 - 2 ; case 0 + .short _021D6454 - _021D6438 - 2 ; case 1 + .short _021D645E - _021D6438 - 2 ; case 2 + .short _021D646C - _021D6438 - 2 ; case 3 + .short _021D647A - _021D6438 - 2 ; case 4 + .short _021D64AA - _021D6438 - 2 ; case 5 + .short _021D64B4 - _021D6438 - 2 ; case 6 + .short _021D64BC - _021D6438 - 2 ; case 7 + .short _021D64C6 - _021D6438 - 2 ; case 8 +_021D644A: + add r1, r4, #0 + bl ov5_021D66D0 + add r5, r0, #0 + b _021D64CC +_021D6454: + add r1, r4, #0 + bl ov5_021D6730 + add r5, r0, #0 + b _021D64CC +_021D645E: + add r1, r4, #0 + mov r2, #0 + add r3, r5, #0 + bl ov5_021D676C + add r5, r0, #0 + b _021D64CC +_021D646C: + add r1, r4, #0 + mov r2, #2 + add r3, r5, #0 + bl ov5_021D676C + add r5, r0, #0 + b _021D64CC +_021D647A: + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r0, [r0, #0x48] + bl ov5_021D57EC + cmp r0, #1 + bne _021D649A + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + mov r3, #2 + bl ov5_021D676C + add r5, r0, #0 + b _021D64CC +_021D649A: + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + add r3, r5, #0 + bl ov5_021D676C + add r5, r0, #0 + b _021D64CC +_021D64AA: + add r1, r4, #0 + add r2, r5, #0 + bl ov5_021D6868 + b _021D64CC +_021D64B4: + add r1, r4, #0 + bl ov5_021D6890 + b _021D64CC +_021D64BC: + add r1, r4, #0 + mov r2, #0 + bl ov5_021D6868 + b _021D64CC +_021D64C6: + add r1, r4, #0 + bl ov5_021D68B8 +_021D64CC: + add r0, r5, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D6418 + + thumb_func_start ov5_021D64D0 +ov5_021D64D0: ; 0x021D64D0 + cmp r1, #0x1f + blt _021D64D8 + mov r0, #0 + bx lr +_021D64D8: + ldr r2, [r0, #0] + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + ldrh r0, [r0, #0x10] + bx lr + thumb_func_end ov5_021D64D0 + + thumb_func_start ov5_021D64E4 +ov5_021D64E4: ; 0x021D64E4 + push {r3, lr} + add r3, r0, #0 + str r1, [sp] + ldr r0, _021D64F8 ; =0x04000050 + mov r1, #4 + mov r2, #0x21 + bl sub_020BF55C + pop {r3, pc} + nop +_021D64F8: .word 0x04000050 + thumb_func_end ov5_021D64E4 + + thumb_func_start ov5_021D64FC +ov5_021D64FC: ; 0x021D64FC + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0x10] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov5_021D64FC + + thumb_func_start ov5_021D650C +ov5_021D650C: ; 0x021D650C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + ldr r0, [r4, #0xc] + mul r0, r1 + ldr r1, [r4, #0x10] + bl sub_020E1F6C + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r0, #1 + cmp r0, r1 + bgt _021D6532 + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_021D6532: + str r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021D650C + + thumb_func_start ov5_021D6538 +ov5_021D6538: ; 0x021D6538 + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + strh r3, [r0, #0xe] + mov r1, #0 + strh r1, [r0, #0xc] + bx lr + thumb_func_end ov5_021D6538 + + thumb_func_start ov5_021D6548 +ov5_021D6548: ; 0x021D6548 + push {r4, lr} + add r4, r0, #0 + mov r2, #0xc + ldrsh r2, [r4, r2] + ldr r0, [r4, #8] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #0xe + ldrsh r1, [r4, r1] + bl sub_020BCFD0 + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + mov r0, #0xe + ldrsh r1, [r4, r0] + mov r0, #0xc + ldrsh r0, [r4, r0] + add r0, r0, #1 + cmp r0, r1 + bgt _021D658C + strh r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_021D658C: + strh r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D6548 + + thumb_func_start ov5_021D6594 +ov5_021D6594: ; 0x021D6594 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov5_021D6BFC + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021D6C30 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021D6C64 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021D6CA0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D6594 + + thumb_func_start ov5_021D65C0 +ov5_021D65C0: ; 0x021D65C0 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r4, r2, #0 + add r6, r1, #0 + add r7, r3, #0 + ldr r5, [sp, #0x40] + bl sub_02009F38 + str r0, [sp, #0x18] + add r1, r4, #0 + bl sub_02009FE8 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r1, r4, #0 + bl sub_0200A014 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + add r1, r4, #0 + bl sub_0200A040 + str r0, [sp, #0x24] + ldr r0, [sp, #0x18] + add r1, r4, #0 + bl sub_0200A074 + str r0, [sp, #0x28] + ldr r0, [sp, #0x18] + add r1, r4, #0 + bl sub_02009FB4 + cmp r6, #3 + bhi _021D668A + add r1, r6, r6 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D6610: ; jump table + .short _021D6618 - _021D6610 - 2 ; case 0 + .short _021D6636 - _021D6610 - 2 ; case 1 + .short _021D6658 - _021D6610 - 2 ; case 2 + .short _021D6672 - _021D6610 - 2 ; case 3 +_021D6618: + str r0, [sp] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x1c] + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #0x44] + ldr r3, [sp, #0x20] + str r0, [sp, #0xc] + add r0, r7, #0 + add r1, r5, #0 + bl sub_02009AA8 + str r0, [sp, #0x14] + b _021D668A +_021D6636: + str r0, [sp] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x1c] + str r0, [sp, #4] + ldr r0, [sp, #0x28] + ldr r3, [sp, #0x20] + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #0x44] + add r1, r5, #0 + str r0, [sp, #0x10] + add r0, r7, #0 + bl sub_02009B64 + str r0, [sp, #0x14] + b _021D668A +_021D6658: + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r0, r7, #0 + add r1, r5, #0 + bl sub_02009BC4 + str r0, [sp, #0x14] + b _021D668A +_021D6672: + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r0, r7, #0 + add r1, r5, #0 + bl sub_02009BC4 + str r0, [sp, #0x14] +_021D668A: + ldr r0, [sp, #0x14] + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021D65C0 + + thumb_func_start ov5_021D6690 +ov5_021D6690: ; 0x021D6690 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _021D66CC ; =0x0000FFFF + add r4, r2, #0 + cmp r1, r0 + beq _021D66C8 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D66A6 + bl sub_0200A4E4 +_021D66A6: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021D66B0 + bl sub_0200A6DC +_021D66B0: + mov r6, #0 +_021D66B2: + ldr r1, [r4, #0] + cmp r1, #0 + beq _021D66BE + ldr r0, [r5, #8] + bl sub_02009D68 +_021D66BE: + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #4 + blt _021D66B2 +_021D66C8: + pop {r4, r5, r6, pc} + nop +_021D66CC: .word 0x0000FFFF + thumb_func_end ov5_021D6690 + + thumb_func_start ov5_021D66D0 +ov5_021D66D0: ; 0x021D66D0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r2, #0x1c + ldr r3, [r5, #0] + mul r2, r1 + add r4, r3, r2 + ldr r1, [r4, #8] + cmp r1, #0 + bne _021D6728 + add r1, r4, #0 + bl ov5_021D6B60 + cmp r0, #0 + bne _021D66F0 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D66F0: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D6A48 + cmp r0, #0 + bne _021D6708 + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_021D6708: + ldr r1, [r4, #0xc] + ldr r0, [r4, #8] + str r1, [r0, #8] + ldrh r1, [r4] + ldr r0, _021D672C ; =0x0000FFFF + cmp r1, r0 + beq _021D671C + ldr r0, [r4, #8] + bl ov5_021D6D34 +_021D671C: + ldrh r1, [r4, #2] + add r0, r5, #0 + bl ov5_021D6A2C + mov r0, #2 + strh r0, [r4, #0x10] +_021D6728: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D672C: .word 0x0000FFFF + thumb_func_end ov5_021D66D0 + + thumb_func_start ov5_021D6730 +ov5_021D6730: ; 0x021D6730 + push {r4, lr} + mov r2, #0x1c + ldr r3, [r0, #0] + mul r2, r1 + add r4, r3, r2 + ldr r1, [r4, #8] + cmp r1, #0 + beq _021D6744 + mov r0, #1 + pop {r4, pc} +_021D6744: + add r1, r4, #0 + bl ov5_021D6B60 + cmp r0, #0 + bne _021D6752 + mov r0, #0 + pop {r4, pc} +_021D6752: + ldr r0, _021D6768 ; =ov5_021D6A84 + add r1, r4, #0 + mov r2, #1 + bl sub_0200D9E8 + str r0, [r4, #0x14] + mov r0, #1 + strh r0, [r4, #0x10] + mov r1, #0 + strh r1, [r4, #0x12] + pop {r4, pc} + ; .align 2, 0 +_021D6768: .word ov5_021D6A84 + thumb_func_end ov5_021D6730 + + thumb_func_start ov5_021D676C +ov5_021D676C: ; 0x021D676C + push {r4, r5, r6, lr} + add r5, r2, #0 + ldr r2, [r0, #0] + mov r0, #0x1c + mul r0, r1 + ldrh r1, [r2, r0] + add r4, r2, r0 + ldr r0, _021D6854 ; =0x0000FFFF + add r6, r3, #0 + cmp r1, r0 + beq _021D678C + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _021D678C + mov r0, #0 + pop {r4, r5, r6, pc} +_021D678C: + ldr r1, [r4, #8] + cmp r1, #0 + bne _021D6796 + mov r0, #0 + pop {r4, r5, r6, pc} +_021D6796: + ldrh r0, [r4, #0x10] + cmp r0, #2 + beq _021D67A0 + mov r0, #0 + pop {r4, r5, r6, pc} +_021D67A0: + ldr r0, [r4, #0x18] + mov r2, #4 + bl sub_0200D9E8 + ldr r1, [r4, #8] + ldr r3, _021D6858 ; =0x00000B88 + str r0, [r1, r3] + ldr r0, [r4, #8] + ldr r0, [r0, r3] + cmp r0, #0 + bne _021D67BA + mov r0, #0 + pop {r4, r5, r6, pc} +_021D67BA: + mov r0, #3 + strh r0, [r4, #0x10] + add r0, r3, #0 + ldr r1, [r4, #8] + add r0, #0x1a + strh r5, [r1, r0] + add r0, r3, #0 + ldr r1, [r4, #8] + mov r2, #0 + add r0, #0x1e + strh r2, [r1, r0] + ldr r1, [r4, #8] + add r0, r1, #0 + add r0, #0xc + str r0, [r1, #0x40] + ldr r1, [r4, #8] + add r0, r1, #0 + add r0, #0xc + str r0, [r1, #0x44] + add r0, r3, #0 + ldr r1, [r4, #8] + add r0, #0x1c + strh r6, [r1, r0] + add r0, r3, #0 + ldr r1, [r4, #8] + add r0, #0x14 + str r2, [r1, r0] + ldr r1, [r4, #8] + add r0, r3, #4 + ldr r6, _021D685C ; =0x021C5CE4 + add r5, r1, r0 + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r5, #0] + ldr r1, [r4, #4] + cmp r1, #0 + ble _021D6820 + mov r0, #4 + bl sub_02018144 + ldr r2, [r4, #8] + ldr r1, _021D6860 ; =0x00000B98 + str r0, [r2, r1] + ldr r0, [r4, #8] + ldr r2, [r4, #4] + ldr r0, [r0, r1] + mov r1, #0 + bl sub_020D5124 + b _021D6826 +_021D6820: + ldr r0, [r4, #8] + add r3, #0x10 + str r2, [r0, r3] +_021D6826: + ldrh r1, [r4, #2] + ldr r0, _021D6854 ; =0x0000FFFF + cmp r1, r0 + beq _021D6850 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r2, _021D6864 ; =0x0400000C + mov r1, #3 + ldrh r3, [r2] + mov r0, #1 + bic r3, r1 + orr r0, r3 + strh r0, [r2] + sub r2, r2, #4 + ldrh r3, [r2] + mov r0, #2 + bic r3, r1 + orr r0, r3 + strh r0, [r2] +_021D6850: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D6854: .word 0x0000FFFF +_021D6858: .word 0x00000B88 +_021D685C: .word 0x021C5CE4 +_021D6860: .word 0x00000B98 +_021D6864: .word 0x0400000C + thumb_func_end ov5_021D676C + + thumb_func_start ov5_021D6868 +ov5_021D6868: ; 0x021D6868 + push {r3, r4} + ldr r3, [r0, #0] + mov r0, #0x1c + mul r0, r1 + add r4, r3, r0 + ldrh r0, [r4, #0x10] + cmp r0, #3 + bne _021D6886 + ldr r1, [r4, #8] + ldr r0, _021D688C ; =0x00000BA6 + mov r3, #5 + strh r3, [r1, r0] + ldr r1, [r4, #8] + sub r0, r0, #2 + strh r2, [r1, r0] +_021D6886: + pop {r3, r4} + bx lr + nop +_021D688C: .word 0x00000BA6 + thumb_func_end ov5_021D6868 + + thumb_func_start ov5_021D6890 +ov5_021D6890: ; 0x021D6890 + push {r4, lr} + mov r2, #0x1c + ldr r3, [r0, #0] + mul r2, r1 + add r4, r3, r2 + bl ov5_021D64D0 + cmp r0, #3 + bne _021D68B2 + ldr r1, [r4, #8] + ldr r0, _021D68B4 ; =0x00000BA2 + mov r2, #5 + strh r2, [r1, r0] + ldr r1, [r4, #8] + ldr r2, [r4, #0x18] + mov r0, #0 + blx r2 +_021D68B2: + pop {r4, pc} + ; .align 2, 0 +_021D68B4: .word 0x00000BA2 + thumb_func_end ov5_021D6890 + + thumb_func_start ov5_021D68B8 +ov5_021D68B8: ; 0x021D68B8 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x1c + ldr r2, [r5, #0] + mul r0, r1 + add r4, r2, r0 + ldrh r1, [r4, #2] + ldr r0, _021D69A4 ; =0x0000FFFF + cmp r1, r0 + beq _021D68F6 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _021D69A8 ; =0x0400000C + mov r2, #3 + ldrh r3, [r0] + mov r1, #3 + bic r3, r2 + orr r1, r3 + strh r1, [r0] + sub r3, r0, #4 + ldrh r6, [r3] + mov r1, #1 + add r0, #0x44 + bic r6, r2 + orr r1, r6 + strh r1, [r3] + mov r1, #0 + strh r1, [r0] +_021D68F6: + ldr r2, [r4, #0xc] + cmp r2, #0 + beq _021D691E + ldrh r1, [r4] + add r0, r5, #0 + bl ov5_021D6690 + ldr r1, [r4, #0xc] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #0xc] + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D691E + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x14] +_021D691E: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D698A + add r0, #0xc + bl ov5_021D6FD8 + ldrh r1, [r4] + ldr r0, _021D69A4 ; =0x0000FFFF + cmp r1, r0 + beq _021D6938 + ldr r0, [r4, #8] + bl ov5_021D6D64 +_021D6938: + ldr r0, [r4, #8] + ldr r1, _021D69AC ; =0x00000B9C + ldr r1, [r0, r1] + cmp r1, #1 + bne _021D6946 + bl ov5_021DB4E4 +_021D6946: + ldr r1, [r4, #8] + ldr r0, _021D69B0 ; =0x00000B98 + ldr r1, [r1, r0] + cmp r1, #0 + beq _021D695E + mov r0, #4 + bl sub_02018238 + ldr r1, [r4, #8] + ldr r0, _021D69B0 ; =0x00000B98 + mov r2, #0 + str r2, [r1, r0] +_021D695E: + ldrh r0, [r4, #0x10] + cmp r0, #1 + bne _021D6970 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021D697E + bl sub_0200DA58 + b _021D697E +_021D6970: + cmp r0, #3 + bne _021D697E + ldr r1, [r4, #8] + ldr r0, _021D69B4 ; =0x00000B88 + ldr r0, [r1, r0] + bl sub_0200DA58 +_021D697E: + ldr r1, [r4, #8] + mov r0, #4 + bl sub_02018238 + mov r0, #0 + str r0, [r4, #8] +_021D698A: + mov r2, #0 + str r2, [sp] + mov r0, #0x41 + str r2, [sp, #4] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + ldr r0, [r0, #0x48] + add r3, r2, #0 + bl ov5_021D57FC + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D69A4: .word 0x0000FFFF +_021D69A8: .word 0x0400000C +_021D69AC: .word 0x00000B9C +_021D69B0: .word 0x00000B98 +_021D69B4: .word 0x00000B88 + thumb_func_end ov5_021D68B8 + + thumb_func_start ov5_021D69B8 +ov5_021D69B8: ; 0x021D69B8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrh r1, [r4, #2] + ldr r0, _021D6A1C ; =0x0000FFFF + cmp r1, r0 + beq _021D69EC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _021D6A20 ; =0x0400000C + mov r2, #3 + ldrh r3, [r0] + mov r1, #3 + bic r3, r2 + orr r1, r3 + strh r1, [r0] + sub r3, r0, #4 + ldrh r5, [r3] + mov r1, #1 + add r0, #0x44 + bic r5, r2 + orr r1, r5 + strh r1, [r3] + mov r1, #0 + strh r1, [r0] +_021D69EC: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D6A1A + add r0, #0xc + bl ov5_021D6FD8 + ldr r0, [r4, #8] + ldr r1, _021D6A24 ; =0x00000B9C + ldr r1, [r0, r1] + cmp r1, #1 + bne _021D6A06 + bl ov5_021DB4E4 +_021D6A06: + ldrh r0, [r4, #0x10] + cmp r0, #3 + bne _021D6A1A + ldr r1, [r4, #8] + ldr r0, _021D6A28 ; =0x00000B88 + ldr r0, [r1, r0] + bl sub_0200DA58 + mov r0, #2 + strh r0, [r4, #0x10] +_021D6A1A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6A1C: .word 0x0000FFFF +_021D6A20: .word 0x0400000C +_021D6A24: .word 0x00000B9C +_021D6A28: .word 0x00000B88 + thumb_func_end ov5_021D69B8 + + thumb_func_start ov5_021D6A2C +ov5_021D6A2C: ; 0x021D6A2C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021D6D84 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D6DCC + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D6E20 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D6A2C + + thumb_func_start ov5_021D6A48 +ov5_021D6A48: ; 0x021D6A48 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r1, [r4] + add r5, r0, #0 + ldr r0, _021D6A80 ; =0x0000FFFF + cmp r1, r0 + beq _021D6A7C + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _021D6A7C + add r0, r4, #0 + bl ov5_021D6BC4 + cmp r0, #0 + bne _021D6A6A + mov r0, #0 + pop {r3, r4, r5, pc} +_021D6A6A: + ldrh r1, [r4] + ldr r2, [r4, #0xc] + add r0, r5, #0 + bl ov5_021D6594 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021D6CDC +_021D6A7C: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6A80: .word 0x0000FFFF + thumb_func_end ov5_021D6A48 + + thumb_func_start ov5_021D6A84 +ov5_021D6A84: ; 0x021D6A84 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r2, [r4, #0x12] + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r2, #8 + ldr r0, [r0, #0] + bhi _021D6B5A + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D6AA0: ; jump table + .short _021D6AB2 - _021D6AA0 - 2 ; case 0 + .short _021D6AC8 - _021D6AA0 - 2 ; case 1 + .short _021D6AD8 - _021D6AA0 - 2 ; case 2 + .short _021D6AE6 - _021D6AA0 - 2 ; case 3 + .short _021D6AF6 - _021D6AA0 - 2 ; case 4 + .short _021D6B04 - _021D6AA0 - 2 ; case 5 + .short _021D6B14 - _021D6AA0 - 2 ; case 6 + .short _021D6B22 - _021D6AA0 - 2 ; case 7 + .short _021D6B32 - _021D6AA0 - 2 ; case 8 +_021D6AB2: + add r0, r4, #0 + bl ov5_021D6BC4 + cmp r0, #0 + bne _021D6AC0 + bl sub_02022974 +_021D6AC0: + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6AC8: + ldrh r1, [r4] + ldr r2, [r4, #0xc] + bl ov5_021D6BFC + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6AD8: + ldrh r1, [r4, #2] + bl ov5_021D6D84 + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6AE6: + ldrh r1, [r4] + ldr r2, [r4, #0xc] + bl ov5_021D6C30 + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6AF6: + ldrh r1, [r4, #2] + bl ov5_021D6DCC + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6B04: + ldrh r1, [r4] + ldr r2, [r4, #0xc] + bl ov5_021D6C64 + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6B14: + ldrh r1, [r4, #2] + bl ov5_021D6E20 + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6B22: + ldrh r1, [r4] + ldr r2, [r4, #0xc] + bl ov5_021D6CA0 + ldrh r0, [r4, #0x12] + add r0, r0, #1 + strh r0, [r4, #0x12] + pop {r3, r4, r5, pc} +_021D6B32: + bl ov5_021D6CDC + ldr r1, [r4, #0xc] + ldr r0, [r4, #8] + str r1, [r0, #8] + ldrh r1, [r4] + ldr r0, _021D6B5C ; =0x0000FFFF + cmp r1, r0 + beq _021D6B4A + ldr r0, [r4, #8] + bl ov5_021D6D34 +_021D6B4A: + mov r0, #2 + strh r0, [r4, #0x10] + mov r0, #0 + strh r0, [r4, #0x12] + str r0, [r4, #0x14] + add r0, r5, #0 + bl sub_0200DA58 +_021D6B5A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6B5C: .word 0x0000FFFF + thumb_func_end ov5_021D6A84 + + thumb_func_start ov5_021D6B60 +ov5_021D6B60: ; 0x021D6B60 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021D6B70 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D6B70: + ldr r1, _021D6BBC ; =0x00000BA8 + mov r0, #4 + bl sub_02018144 + str r0, [r4, #8] + cmp r0, #0 + bne _021D6B82 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D6B82: + ldr r2, _021D6BBC ; =0x00000BA8 + mov r1, #0 + bl sub_020D5124 + ldr r0, [r4, #8] + ldr r2, _021D6BC0 ; =0x00000BA2 + str r5, [r0, #0] + ldr r1, [r4, #8] + mov r0, #0 + strh r0, [r1, r2] + add r1, r2, #4 + ldr r3, [r4, #8] + sub r2, #0xa + strh r0, [r3, r1] + ldr r3, [r4, #8] + add r1, r3, #0 + add r1, #0xc + str r1, [r3, #0x40] + ldr r3, [r4, #8] + add r1, r3, #0 + add r1, #0xc + str r1, [r3, #0x44] + ldr r1, [r4, #8] + str r0, [r1, r2] + ldr r0, [r4, #8] + str r4, [r0, #4] + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_021D6BBC: .word 0x00000BA8 +_021D6BC0: .word 0x00000BA2 + thumb_func_end ov5_021D6B60 + + thumb_func_start ov5_021D6BC4 +ov5_021D6BC4: ; 0x021D6BC4 + push {r4, lr} + add r4, r0, #0 + ldrh r1, [r4] + ldr r0, _021D6BF8 ; =0x0000FFFF + cmp r1, r0 + beq _021D6BF4 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D6BDA + mov r0, #1 + pop {r4, pc} +_021D6BDA: + mov r0, #4 + mov r1, #0x64 + bl sub_02018144 + str r0, [r4, #0xc] + cmp r0, #0 + bne _021D6BEC + mov r0, #0 + pop {r4, pc} +_021D6BEC: + mov r1, #0 + mov r2, #0x64 + bl sub_020D5124 +_021D6BF4: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_021D6BF8: .word 0x0000FFFF + thumb_func_end ov5_021D6BC4 + + thumb_func_start ov5_021D6BFC +ov5_021D6BFC: ; 0x021D6BFC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _021D6C2C ; =0x0000FFFF + add r3, r1, #0 + add r4, r2, #0 + cmp r3, r0 + beq _021D6C26 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r3, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + ldr r3, [r5, #0x10] + mov r1, #2 + bl ov5_021D65C0 + str r0, [r4, #8] +_021D6C26: + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021D6C2C: .word 0x0000FFFF + thumb_func_end ov5_021D6BFC + + thumb_func_start ov5_021D6C30 +ov5_021D6C30: ; 0x021D6C30 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _021D6C60 ; =0x0000FFFF + add r3, r1, #0 + add r4, r2, #0 + cmp r3, r0 + beq _021D6C5A + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r3, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + ldr r3, [r5, #0x14] + mov r1, #3 + bl ov5_021D65C0 + str r0, [r4, #0xc] +_021D6C5A: + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021D6C60: .word 0x0000FFFF + thumb_func_end ov5_021D6C30 + + thumb_func_start ov5_021D6C64 +ov5_021D6C64: ; 0x021D6C64 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _021D6C9C ; =0x0000FFFF + add r3, r1, #0 + add r4, r2, #0 + cmp r3, r0 + beq _021D6C98 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r3, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + ldr r3, [r5, #8] + mov r1, #0 + bl ov5_021D65C0 + str r0, [r4, #0] + bl sub_0200A3DC + ldr r0, [r4, #0] + bl sub_02009D4C +_021D6C98: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6C9C: .word 0x0000FFFF + thumb_func_end ov5_021D6C64 + + thumb_func_start ov5_021D6CA0 +ov5_021D6CA0: ; 0x021D6CA0 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _021D6CD8 ; =0x0000FFFF + add r3, r1, #0 + add r4, r2, #0 + cmp r3, r0 + beq _021D6CD2 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + add r2, r3, #0 + ldr r0, [r5, #0x18] + ldr r3, [r5, #0xc] + bl ov5_021D65C0 + str r0, [r4, #4] + bl sub_0200A640 + ldr r0, [r4, #4] + bl sub_02009D4C +_021D6CD2: + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021D6CD8: .word 0x0000FFFF + thumb_func_end ov5_021D6CA0 + + thumb_func_start ov5_021D6CDC +ov5_021D6CDC: ; 0x021D6CDC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r1, [r4] + add r5, r0, #0 + ldr r0, _021D6D30 ; =0x0000FFFF + cmp r1, r0 + beq _021D6D2E + ldr r2, [r4, #0xc] + mov r0, #1 + str r0, [sp] + add r0, r2, #0 + add r0, #0x40 + add r1, r5, #0 + mov r3, #0 + bl ov5_021D6F4C + ldr r0, [r4, #0xc] + mov r1, #0 + add r0, #0x10 + mov r2, #0x30 + bl sub_020D5124 + add r5, #0xfc + ldr r1, [r5, #0] + ldr r0, [r4, #0xc] + str r1, [r0, #0x10] + ldr r1, [r4, #0xc] + add r0, r1, #0 + add r0, #0x40 + str r0, [r1, #0x14] + mov r1, #1 + ldr r0, [r4, #0xc] + lsl r1, r1, #0xc + str r1, [r0, #0x24] + ldr r0, [r4, #0xc] + str r1, [r0, #0x28] + ldr r0, [r4, #0xc] + str r1, [r0, #0x2c] + ldr r0, [r4, #0xc] + mov r1, #1 + str r1, [r0, #0x38] +_021D6D2E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D6D30: .word 0x0000FFFF + thumb_func_end ov5_021D6CDC + + thumb_func_start ov5_021D6D34 +ov5_021D6D34: ; 0x021D6D34 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 + add r7, r4, #0 +_021D6D3E: + ldr r0, [r6, #8] + add r0, #0x10 + bl sub_02021AA0 + str r0, [r5, #0x4c] + add r1, r7, #0 + bl sub_02021CAC + ldr r0, [r5, #0x4c] + cmp r0, #0 + bne _021D6D58 + bl sub_02022974 +_021D6D58: + add r4, r4, #1 + add r5, #0x3c + cmp r4, #0x30 + blt _021D6D3E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D6D34 + + thumb_func_start ov5_021D6D64 +ov5_021D6D64: ; 0x021D6D64 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 +_021D6D6C: + ldr r0, [r5, #0x4c] + cmp r0, #0 + beq _021D6D78 + bl sub_02021BD4 + str r6, [r5, #0x4c] +_021D6D78: + add r4, r4, #1 + add r5, #0x3c + cmp r4, #0x30 + blt _021D6D6C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D6D64 + + thumb_func_start ov5_021D6D84 +ov5_021D6D84: ; 0x021D6D84 + push {r3, lr} + sub sp, #0x18 + add r2, r0, #0 + ldr r0, _021D6DC8 ; =0x0000FFFF + cmp r1, r0 + beq _021D6DC4 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldr r3, [r2, #4] + mov r2, #0xc + mul r2, r1 + ldr r1, [r3, r2] + mov r2, #4 + bl sub_02006CB8 + add r1, sp, #0x14 + str r0, [sp] + bl sub_020A71B0 + ldr r1, [sp, #0x14] + mov r0, #2 + ldr r1, [r1, #0xc] + mov r2, #0x20 + mov r3, #0xc0 + bl sub_0201972C + ldr r0, [sp] + bl sub_020181C4 + mov r0, #0 + str r0, [sp] +_021D6DC4: + add sp, #0x18 + pop {r3, pc} + ; .align 2, 0 +_021D6DC8: .word 0x0000FFFF + thumb_func_end ov5_021D6D84 + + thumb_func_start ov5_021D6DCC +ov5_021D6DCC: ; 0x021D6DCC + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, _021D6E1C ; =0x0000FFFF + cmp r1, r0 + beq _021D6E18 + mov r2, #0xc + mov r0, #0x42 + lsl r0, r0, #2 + ldr r3, [r4, #4] + mul r2, r1 + add r1, r3, r2 + ldr r0, [r4, r0] + ldr r1, [r1, #4] + mov r2, #4 + bl sub_02006CB8 + add r1, sp, #0x14 + str r0, [sp, #8] + bl sub_020A7118 + ldr r3, [sp, #0x14] + mov r0, #0 + str r0, [sp] + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [r3, #0x14] + ldr r0, [r0, #8] + ldr r3, [r3, #0x10] + mov r1, #2 + bl sub_0201958C + ldr r0, [sp, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [sp, #8] +_021D6E18: + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_021D6E1C: .word 0x0000FFFF + thumb_func_end ov5_021D6DCC + + thumb_func_start ov5_021D6E20 +ov5_021D6E20: ; 0x021D6E20 + push {r4, r5, lr} + sub sp, #0x24 + add r4, r0, #0 + ldr r0, _021D6EC4 ; =0x0000FFFF + add r5, r1, #0 + cmp r5, r0 + beq _021D6EC0 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r1, #0xc + mov r0, #0x42 + lsl r0, r0, #2 + ldr r2, [r4, #4] + mul r1, r5 + add r1, r2, r1 + ldr r0, [r4, r0] + ldr r1, [r1, #8] + mov r2, #4 + bl sub_02006CB8 + str r0, [sp, #0x14] + cmp r0, #0 + bne _021D6E56 + bl sub_02022974 +_021D6E56: + ldr r0, [sp, #0x14] + add r1, sp, #0x18 + bl sub_020A7248 + ldr r3, [sp, #0x18] + mov r0, #0 + str r0, [sp] + add r2, r3, #0 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r3, [r3, #8] + ldr r0, [r0, #8] + mov r1, #2 + add r2, #0xc + bl sub_02019460 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r3, [sp, #0x18] + ldr r0, [r4, r0] + add r2, r3, #0 + ldr r0, [r0, #8] + ldr r3, [r3, #8] + mov r1, #2 + add r2, #0xc + bl sub_02019574 + mov r0, #0x20 + str r0, [sp] + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + add r0, #0xfe + ldr r0, [r4, r0] + mov r2, #0 + ldr r0, [r0, #8] + mov r1, #2 + add r3, r2, #0 + bl sub_02019E2C + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + ldr r0, [r0, #8] + bl sub_02019448 + ldr r0, [sp, #0x14] + bl sub_020181C4 + mov r0, #0 + str r0, [sp, #0x14] +_021D6EC0: + add sp, #0x24 + pop {r4, r5, pc} + ; .align 2, 0 +_021D6EC4: .word 0x0000FFFF + thumb_func_end ov5_021D6E20 + + thumb_func_start ov5_021D6EC8 +ov5_021D6EC8: ; 0x021D6EC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + add r4, r1, #0 + cmp r0, #0 + beq _021D6ED8 + bl sub_02022974 +_021D6ED8: + cmp r4, #0 + bgt _021D6EE0 + bl sub_02022974 +_021D6EE0: + cmp r4, #0x28 + bls _021D6EE8 + bl sub_02022974 +_021D6EE8: + add r0, r5, #0 + add r0, #0xc + str r0, [r5, #8] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D6EC8 + + thumb_func_start ov5_021D6EF0 +ov5_021D6EF0: ; 0x021D6EF0 + ldr r3, _021D6EFC ; =sub_020D5124 + mov r1, #0 + str r1, [r0, #8] + add r0, #0xc + mov r2, #0x28 + bx r3 + ; .align 2, 0 +_021D6EFC: .word sub_020D5124 + thumb_func_end ov5_021D6EF0 + + thumb_func_start ov5_021D6F00 +ov5_021D6F00: ; 0x021D6F00 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + ldr r6, [r5, #0] + bl ov5_021D75E4 + add r4, r0, #0 + bne _021D6F14 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D6F14: + add r1, r5, #0 + str r6, [r4, #0] + add r1, #0xc + str r1, [r4, #0x34] + ldr r1, [r5, #0x44] + str r1, [r4, #0x38] + ldr r1, [r5, #0x44] + str r4, [r1, #0x34] + str r4, [r5, #0x44] + add r1, r7, #0 + bl ov5_021D6EC8 + ldr r0, [r4, #8] + cmp r0, #0 + bne _021D6F36 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021D6F36: + ldr r0, [r4, #4] + cmp r0, #0 + bne _021D6F40 + bl sub_02022974 +_021D6F40: + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021CAC + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D6F00 + + thumb_func_start ov5_021D6F4C +ov5_021D6F4C: ; 0x021D6F4C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp, #0x2c] + add r7, r1, #0 + add r5, r2, #0 + str r3, [sp, #0x30] + mov r6, #0 + add r4, sp, #0x34 +_021D6F5C: + ldr r0, [r5, #0] + bl sub_02009E08 + add r6, r6, #1 + add r5, r5, #4 + stmia r4!, {r0} + cmp r6, #4 + blt _021D6F5C + ldr r0, [sp, #0x40] + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + ldr r0, [sp, #0x58] + str r0, [sp, #0x10] + ldr r0, [r7, #8] + str r0, [sp, #0x14] + ldr r0, [r7, #0xc] + str r0, [sp, #0x18] + ldr r0, [r7, #0x10] + str r0, [sp, #0x1c] + ldr r0, [r7, #0x14] + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r0, [sp, #0x2c] + ldr r1, [sp, #0x34] + ldr r2, [sp, #0x38] + ldr r3, [sp, #0x3c] + bl sub_020093B4 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D6F4C + + thumb_func_start ov5_021D6FA8 +ov5_021D6FA8: ; 0x021D6FA8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r1, [r4, #0x34] + ldr r0, [r4, #0x38] + str r1, [r0, #0x34] + ldr r1, [r4, #0x38] + ldr r0, [r4, #0x34] + str r1, [r0, #0x38] + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021CAC + add r0, r4, #0 + bl ov5_021D6EF0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x3c + ldr r5, [r4, #4] + bl sub_020D5124 + str r5, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D6FA8 + + thumb_func_start ov5_021D6FD8 +ov5_021D6FD8: ; 0x021D6FD8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x34] + cmp r0, r5 + beq _021D6FEE +_021D6FE2: + ldr r4, [r0, #0x34] + bl ov5_021D6FA8 + add r0, r4, #0 + cmp r4, r5 + bne _021D6FE2 +_021D6FEE: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D6FD8 + + thumb_func_start ov5_021D6FF0 +ov5_021D6FF0: ; 0x021D6FF0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x34] + add r6, r1, #0 + ldr r4, [r0, #0x34] + cmp r0, r5 + beq _021D7008 +_021D6FFE: + blx r6 + add r0, r4, #0 + ldr r4, [r4, #0x34] + cmp r0, r5 + bne _021D6FFE +_021D7008: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021D6FF0 + + thumb_func_start ov5_021D700C +ov5_021D700C: ; 0x021D700C + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D700C + + thumb_func_start ov5_021D7010 +ov5_021D7010: ; 0x021D7010 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #4] + bl sub_02021D28 + add r2, r0, #0 + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D7010 + + thumb_func_start ov5_021D7028 +ov5_021D7028: ; 0x021D7028 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + ldr r3, _021D7168 ; =0x021C5CE4 + add r5, r2, #0 + str r0, [sp, #4] + str r1, [sp, #8] + ldmia r3!, {r0, r1} + add r2, sp, #0x18 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, _021D716C ; =0x00000B8C + ldr r2, [sp, #0x18] + ldr r1, [r5, r0] + add r0, #8 + sub r6, r2, r1 + ldr r1, [sp, #0x20] + ldr r0, [r5, r0] + sub r4, r1, r0 + mov r0, #1 + mov r1, #3 + lsl r0, r0, #0xe + lsl r1, r1, #0xc + bl sub_020BCFD0 + add r7, r0, #0 + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r0, [r0, #0x24] + bl sub_02020A88 + str r0, [sp, #0xc] + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r0, [r0, #0x24] + bl sub_02020A90 + add r1, r0, #0 + add r0, sp, #0x10 + str r0, [sp] + ldr r0, [sp, #0xc] + add r2, r7, #0 + add r3, sp, #0x14 + bl sub_0201E34C + mov r1, #1 + ldr r0, [sp, #0x14] + lsl r1, r1, #0x14 + bl sub_020BCFD0 + str r0, [sp, #0x14] + cmp r4, #0 + bgt _021D70A4 + ldr r0, [sp, #0x10] + ldr r1, _021D7170 ; =0x000BE8D0 + bl sub_020BCFD0 + b _021D70AC +_021D70A4: + ldr r0, [sp, #0x10] + ldr r1, _021D7174 ; =0x000BE811 + bl sub_020BCFD0 +_021D70AC: + mov r7, #1 + lsl r7, r7, #0xc + str r0, [sp, #0x10] + cmp r6, #0 + bge _021D70D4 + ldr r7, _021D7178 ; =0xFFFFF000 + asr r1, r6, #0x1f + add r0, r6, #0 + asr r3, r7, #0xc + add r2, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r6, r2, #0xc + orr r6, r0 +_021D70D4: + ldr r1, [sp, #0x14] + add r0, r6, #0 + bl sub_020BCFD0 + add r6, r0, #0 + cmp r7, #0 + bge _021D70FC + asr r1, r6, #0x1f + asr r3, r7, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r6, r2, #0xc + orr r6, r0 +_021D70FC: + mov r7, #1 + lsl r7, r7, #0xc + cmp r4, #0 + bge _021D7122 + ldr r7, _021D7178 ; =0xFFFFF000 + asr r1, r4, #0x1f + add r0, r4, #0 + asr r3, r7, #0xc + add r2, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r4, r2, #0xc + orr r4, r0 +_021D7122: + ldr r1, [sp, #0x10] + add r0, r4, #0 + bl sub_020BCFD0 + add r3, r0, #0 + cmp r7, #0 + bge _021D714A + asr r1, r3, #0x1f + asr r3, r7, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r3, r2, #0xc + orr r3, r0 +_021D714A: + add r0, r6, r3 + beq _021D715C + ldr r0, _021D716C ; =0x00000B8C + add r2, sp, #0x18 + add r4, r5, r0 + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] +_021D715C: + ldr r0, [sp, #4] + str r6, [r0, #0] + ldr r0, [sp, #8] + str r3, [r0, #0] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D7168: .word 0x021C5CE4 +_021D716C: .word 0x00000B8C +_021D7170: .word 0x000BE8D0 +_021D7174: .word 0x000BE811 +_021D7178: .word 0xFFFFF000 + thumb_func_end ov5_021D7028 + + thumb_func_start ov5_021D717C +ov5_021D717C: ; 0x021D717C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r2, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov5_021D71B4 + cmp r5, #0 + beq _021D71A0 + ldr r0, [sp, #4] + asr r1, r0, #0xc + str r1, [r5, #0] + bpl _021D71A0 + mov r0, #1 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r5, #0] +_021D71A0: + cmp r4, #0 + beq _021D71B0 + ldr r0, [sp] + asr r0, r0, #0xc + str r0, [r4, #0] + bpl _021D71B0 + add r0, r0, #1 + str r0, [r4, #0] +_021D71B0: + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D717C + + thumb_func_start ov5_021D71B4 +ov5_021D71B4: ; 0x021D71B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp] + add r0, sp, #8 + add r1, sp, #4 + add r2, r5, #0 + bl ov5_021D7028 + ldr r4, [r5, #0x40] + add r5, #0xc + cmp r4, r5 + beq _021D71F8 + add r6, sp, #0xc +_021D71D2: + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021D7010 + ldr r1, [sp, #0xc] + ldr r0, [sp, #8] + sub r0, r1, r0 + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r0, [sp, #4] + sub r0, r1, r0 + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r6, #0 + bl ov5_021D630C + ldr r4, [r4, #0x34] + cmp r4, r5 + bne _021D71D2 +_021D71F8: + cmp r7, #0 + beq _021D7200 + ldr r0, [sp, #8] + str r0, [r7, #0] +_021D7200: + ldr r0, [sp] + cmp r0, #0 + beq _021D720A + ldr r1, [sp, #4] + str r1, [r0, #0] +_021D720A: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D71B4 + + thumb_func_start ov5_021D7210 +ov5_021D7210: ; 0x021D7210 + str r1, [r0, #0] + strh r2, [r0, #4] + mov r1, #0 + strh r1, [r0, #6] + strh r3, [r0, #8] + strh r1, [r0, #0xa] + ldr r1, [sp] + strh r1, [r0, #0xc] + ldr r1, [sp, #4] + strh r1, [r0, #0xe] + ldr r1, [sp, #8] + strh r1, [r0, #0x10] + ldr r1, [sp, #0xc] + strh r1, [r0, #0x12] + ldr r1, [sp, #0x10] + str r1, [r0, #0x14] + ldr r1, [sp, #0x14] + str r1, [r0, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D7210 + + thumb_func_start ov5_021D7238 +ov5_021D7238: ; 0x021D7238 + strh r1, [r0, #0xc] + strh r2, [r0, #0xe] + ldr r1, [sp] + strh r3, [r0, #0x10] + str r1, [r0, #0x14] + bx lr + thumb_func_end ov5_021D7238 + + thumb_func_start ov5_021D7244 +ov5_021D7244: ; 0x021D7244 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x10 + ldrsh r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + bne _021D7258 + mov r0, #1 + orr r4, r0 + b _021D727E +_021D7258: + bgt _021D725E + mov r2, #1 + b _021D7260 +_021D725E: + add r2, r4, #0 +_021D7260: + mov r0, #0xe + ldrsh r1, [r5, r0] + mov r0, #8 + ldrsh r0, [r5, r0] + cmp r0, r1 + blt _021D7270 + cmp r2, #0 + beq _021D7278 +_021D7270: + cmp r0, r1 + bgt _021D727E + cmp r2, #1 + bne _021D727E +_021D7278: + mov r0, #1 + orr r4, r0 + strh r1, [r5, #8] +_021D727E: + ldr r0, [r5, #0x14] + cmp r0, #0 + bne _021D728A + mov r0, #2 + orr r4, r0 + b _021D72B0 +_021D728A: + bgt _021D7290 + mov r2, #1 + b _021D7292 +_021D7290: + mov r2, #0 +_021D7292: + mov r0, #0xc + ldrsh r1, [r5, r0] + mov r0, #4 + ldrsh r0, [r5, r0] + cmp r0, r1 + blt _021D72A2 + cmp r2, #0 + beq _021D72AA +_021D72A2: + cmp r0, r1 + bgt _021D72B0 + cmp r2, #1 + bne _021D72B0 +_021D72AA: + mov r0, #2 + orr r4, r0 + strh r1, [r5, #4] +_021D72B0: + mov r0, #6 + ldrsh r1, [r5, r0] + sub r1, r1, #1 + strh r1, [r5, #6] + ldrsh r0, [r5, r0] + cmp r0, #0 + bgt _021D7304 + mov r1, #4 + ldrsh r1, [r5, r1] + ldr r0, [r5, #0] + ldr r2, [r5, #0x18] + blx r2 + mov r0, #8 + ldrsh r1, [r5, r0] + strh r1, [r5, #6] + mov r1, #1 + tst r1, r4 + bne _021D72DE + ldrsh r1, [r5, r0] + mov r0, #0x10 + ldrsh r0, [r5, r0] + add r0, r1, r0 + strh r0, [r5, #8] +_021D72DE: + mov r0, #2 + tst r0, r4 + bne _021D7304 + mov r0, #0xa + ldrsh r1, [r5, r0] + add r1, r1, #1 + strh r1, [r5, #0xa] + ldrsh r1, [r5, r0] + mov r0, #0x12 + ldrsh r0, [r5, r0] + cmp r1, r0 + blt _021D7304 + mov r0, #0 + strh r0, [r5, #0xa] + mov r0, #4 + ldrsh r1, [r5, r0] + ldr r0, [r5, #0x14] + add r0, r1, r0 + strh r0, [r5, #4] +_021D7304: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D7244 + + thumb_func_start ov5_021D7308 +ov5_021D7308: ; 0x021D7308 + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + ldr r1, [sp, #0x1c] + str r2, [r4, #0] + cmp r1, #0 + beq _021D7358 + cmp r1, #1 + bne _021D733C + add r1, r3, #0 + add r3, sp, #0 + add r0, r2, #0 + ldrh r3, [r3, #0x14] + ldr r2, [sp, #0x10] + bl ov5_021D7384 + add r0, r4, #0 + bl ov5_021D7480 + ldr r1, [sp, #0x18] + add r0, r4, #0 + mov r2, #1 + bl ov5_021D749C + add sp, #8 + pop {r4, pc} +_021D733C: + cmp r1, #2 + bne _021D7358 + add r1, sp, #0 + ldrh r1, [r1, #0x14] + ldr r4, [sp, #0x18] + str r1, [sp] + mov r1, #0x7f + mul r1, r4 + str r1, [sp, #4] + add r1, r2, #0 + add r2, r3, #0 + ldr r3, [sp, #0x10] + bl ov5_021D73B0 +_021D7358: + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021D7308 + + thumb_func_start ov5_021D735C +ov5_021D735C: ; 0x021D735C + push {r4, lr} + mov r4, #1 + cmp r2, #0 + beq _021D7380 + cmp r2, #1 + bne _021D7372 + add r0, r1, #0 + bl ov5_021D74B8 + add r4, r0, #0 + b _021D7380 +_021D7372: + cmp r2, #2 + bne _021D7380 + bl ov5_021D7434 + cmp r0, #0 + bne _021D7380 + mov r4, #0 +_021D7380: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov5_021D735C + + thumb_func_start ov5_021D7384 +ov5_021D7384: ; 0x021D7384 + push {r3, r4, r5, lr} + sub sp, #8 + str r1, [sp] + mov r1, #0 + add r4, r3, #0 + str r2, [sp, #4] + mvn r1, r1 + mov r2, #1 + mov r3, #0 + add r5, r0, #0 + bl ov5_021D57FC + mov r1, #0 + add r0, r5, #0 + mvn r1, r1 + add r2, r4, #0 + mov r3, #0x1f + bl ov5_021D5834 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D7384 + + thumb_func_start ov5_021D73B0 +ov5_021D73B0: ; 0x021D73B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + add r5, r0, #0 + add r0, r7, #0 + str r2, [sp] + str r3, [sp, #4] + ldr r4, [sp, #0x2c] + bl ov5_021D57F0 + str r0, [sp, #8] + add r0, r7, #0 + bl ov5_021D57F4 + str r0, [sp, #0xc] + add r0, r7, #0 + bl ov5_021D57F8 + add r6, r0, #0 + ldr r1, [sp, #0xc] + ldr r2, [sp, #4] + add r0, r5, #4 + add r3, r4, #0 + str r7, [r5, #0] + bl ov5_021D64FC + add r0, sp, #0x18 + ldrh r7, [r0, #0x10] + add r0, r5, #0 + mov r2, #0x1f + add r1, r6, #0 + and r1, r2 + add r0, #0x18 + and r2, r7 + add r3, r4, #0 + bl ov5_021D64FC + add r0, r5, #0 + asr r1, r6, #5 + mov r3, #0x1f + asr r2, r7, #5 + add r0, #0x2c + and r1, r3 + and r2, r3 + add r3, r4, #0 + bl ov5_021D64FC + add r0, r5, #0 + asr r1, r6, #0xa + mov r2, #0x1f + asr r3, r7, #0xa + and r1, r2 + and r2, r3 + add r0, #0x40 + add r3, r4, #0 + bl ov5_021D64FC + add r5, #0x54 + ldr r1, [sp, #8] + ldr r2, [sp] + add r0, r5, #0 + add r3, r4, #0 + bl ov5_021D64FC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021D73B0 + + thumb_func_start ov5_021D7434 +ov5_021D7434: ; 0x021D7434 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r5, #4 + bl ov5_021D650C + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x18 + bl ov5_021D650C + add r0, r5, #0 + add r0, #0x2c + bl ov5_021D650C + add r0, r5, #0 + add r0, #0x40 + bl ov5_021D650C + add r0, r5, #0 + add r0, #0x54 + bl ov5_021D650C + ldr r3, [r5, #0x40] + ldr r0, [r5, #0] + lsl r6, r3, #0xa + ldr r1, [r5, #0x54] + ldr r2, [r5, #4] + ldr r3, [r5, #0x18] + ldr r5, [r5, #0x2c] + lsl r5, r5, #5 + orr r3, r5 + orr r3, r6 + lsl r3, r3, #0x10 + lsr r3, r3, #0x10 + bl ov5_021D7384 + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021D7434 + + thumb_func_start ov5_021D7480 +ov5_021D7480: ; 0x021D7480 + mov r2, #0 + add r3, r0, #0 + add r1, r2, #0 +_021D7486: + add r0, r3, r2 + add r2, r2, #1 + strb r1, [r0, #4] + cmp r2, #0x20 + blt _021D7486 + ldr r0, [r3, #0] + add r1, r3, #4 + ldr r3, _021D7498 ; =ov5_021D585C + bx r3 + ; .align 2, 0 +_021D7498: .word ov5_021D585C + thumb_func_end ov5_021D7480 + + thumb_func_start ov5_021D749C +ov5_021D749C: ; 0x021D749C + mov r3, #0x7f + str r3, [r0, #0x24] + mov r3, #0 + str r3, [r0, #0x28] + strh r1, [r0, #0x2c] + cmp r2, #1 + bne _021D74B0 + mov r1, #1 + strh r1, [r0, #0x2e] + bx lr +_021D74B0: + sub r1, r3, #1 + strh r1, [r0, #0x2e] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D749C + + thumb_func_start ov5_021D74B8 +ov5_021D74B8: ; 0x021D74B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov5_021D74F4 + add r4, r0, #0 + ldr r0, [r5, #0x28] + cmp r0, #0 + bne _021D74D0 + ldr r0, [r5, #0] + add r1, r5, #4 + bl ov5_021D585C +_021D74D0: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D74B8 + + thumb_func_start ov5_021D74D4 +ov5_021D74D4: ; 0x021D74D4 + push {r4, lr} + add r4, r0, #0 + mov r2, #1 + str r2, [r4, #0x24] + mov r1, #0 + str r1, [r4, #0x28] + strh r1, [r4, #0x2c] + strh r2, [r4, #0x2e] + bl ov5_021D7534 + ldr r0, [r4, #0] + add r1, r4, #4 + bl ov5_021D585C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021D74D4 + + thumb_func_start ov5_021D74F4 +ov5_021D74F4: ; 0x021D74F4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x2e + ldrsh r1, [r5, r1] + mov r4, #0 + cmp r1, #0 + bne _021D7506 + mov r4, #1 + b _021D7530 +_021D7506: + ldr r1, [r5, #0x24] + cmp r1, #0 + bgt _021D7510 + mov r4, #1 + b _021D7530 +_021D7510: + ldr r1, [r5, #0x28] + add r2, r1, #1 + str r2, [r5, #0x28] + mov r1, #0x2c + ldrsh r1, [r5, r1] + cmp r2, r1 + blt _021D7530 + str r4, [r5, #0x28] + bl ov5_021D7534 + ldr r0, [r5, #0x24] + sub r0, r0, #1 + str r0, [r5, #0x24] + cmp r0, #0 + bgt _021D7530 + mov r4, #1 +_021D7530: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D74F4 + + thumb_func_start ov5_021D7534 +ov5_021D7534: ; 0x021D7534 + push {r3, r4} + mov r1, #0x2e + ldrsh r1, [r0, r1] + ldr r2, [r0, #0x24] + cmp r1, #0 + bge _021D7546 + mov r1, #0x7f + sub r2, r1, r2 + b _021D7546 +_021D7546: + asr r1, r2, #1 + lsr r1, r1, #0x1e + add r1, r2, r1 + asr r4, r1, #2 + mov r3, #0x1f + cmp r4, #0x1f + bge _021D7562 +_021D7554: + sub r1, r3, r4 + lsl r2, r1, #2 + add r1, r0, r3 + sub r3, r3, #1 + strb r2, [r1, #4] + cmp r3, r4 + bgt _021D7554 +_021D7562: + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021D7534 + + thumb_func_start ov5_021D7568 +ov5_021D7568: ; 0x021D7568 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + ldr r1, [sp, #0x28] + str r0, [sp] + str r1, [sp, #0x28] + add r1, r2, #0 + str r2, [sp, #4] + str r3, [sp, #8] + ldr r7, [sp, #0x2c] + blx r4 + ldr r0, [sp] + mov r6, #0 + ldr r5, [r0, #0x40] + str r6, [sp, #0x10] + ldr r0, [r5, #0x34] + str r0, [sp, #0xc] + ldr r0, [sp, #4] + cmp r0, #0 + ble _021D75DE + ldr r0, [sp] + add r0, #0xc + str r0, [sp] +_021D7596: + ldr r0, [sp] + cmp r5, r0 + beq _021D75DE + mov r4, #0 + cmp r6, #0 + ble _021D75B2 +_021D75A2: + add r0, r5, #0 + blx r7 + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D75B2 + add r4, r4, #1 + cmp r4, r6 + blt _021D75A2 +_021D75B2: + ldr r5, [sp, #0xc] + ldr r1, [sp, #0x10] + add r0, r5, #0 + ldr r0, [r0, #0x34] + str r0, [sp, #0xc] + ldr r0, [sp, #8] + cmp r1, r0 + blt _021D75D2 + add r0, r1, #0 + ldr r1, [sp, #8] + bl sub_020E1F6C + cmp r1, #0 + bne _021D75D2 + ldr r0, [sp, #0x28] + add r6, r6, r0 +_021D75D2: + ldr r0, [sp, #0x10] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #0x10] + cmp r1, r0 + blt _021D7596 +_021D75DE: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021D7568 + + thumb_func_start ov5_021D75E4 +ov5_021D75E4: ; 0x021D75E4 + mov r2, #0 + add r3, r0, #0 +_021D75E8: + ldr r1, [r3, #0x48] + cmp r1, #0 + bne _021D75F8 + mov r1, #0x3c + add r0, #0x48 + mul r1, r2 + add r0, r0, r1 + bx lr +_021D75F8: + add r2, r2, #1 + add r3, #0x3c + cmp r2, #0x30 + blt _021D75E8 + mov r0, #0 + bx lr + thumb_func_end ov5_021D75E4 + + thumb_func_start ov5_021D7604 +ov5_021D7604: ; 0x021D7604 + push {r3, lr} + ldr r0, _021D7654 ; =0x00000BA2 + ldrh r2, [r1, r0] + cmp r2, #5 + bhi _021D7652 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D761A: ; jump table + .short _021D7626 - _021D761A - 2 ; case 0 + .short _021D762C - _021D761A - 2 ; case 1 + .short _021D7632 - _021D761A - 2 ; case 2 + .short _021D7638 - _021D761A - 2 ; case 3 + .short _021D7646 - _021D761A - 2 ; case 4 + .short _021D764C - _021D761A - 2 ; case 5 +_021D7626: + mov r2, #1 + strh r2, [r1, r0] + pop {r3, pc} +_021D762C: + mov r2, #3 + strh r2, [r1, r0] + pop {r3, pc} +_021D7632: + mov r2, #3 + strh r2, [r1, r0] + pop {r3, pc} +_021D7638: + add r2, r0, #4 + ldrh r2, [r1, r2] + cmp r2, #5 + bne _021D7652 + mov r2, #4 + strh r2, [r1, r0] + pop {r3, pc} +_021D7646: + mov r2, #5 + strh r2, [r1, r0] + pop {r3, pc} +_021D764C: + ldr r0, [r1, #4] + bl ov5_021D69B8 +_021D7652: + pop {r3, pc} + ; .align 2, 0 +_021D7654: .word 0x00000BA2 + thumb_func_end ov5_021D7604 + + thumb_func_start ov5_021D7658 +ov5_021D7658: ; 0x021D7658 + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D7880 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D771A + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D7678: ; jump table + .short _021D7684 - _021D7678 - 2 ; case 0 + .short _021D76E2 - _021D7678 - 2 ; case 1 + .short _021D7724 - _021D7678 - 2 ; case 2 + .short _021D778A - _021D7678 - 2 ; case 3 + .short _021D77E8 - _021D7678 - 2 ; case 4 + .short _021D7836 - _021D7678 - 2 ; case 5 +_021D7684: + mov r0, #4 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + sub r0, r0, #1 + str r0, [sp, #8] + mov r2, #1 + str r2, [sp, #0xc] + ldr r0, _021D7884 ; =ov5_021D78A4 + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r4, #0 + mov r3, #8 + bl ov5_021D7210 + ldr r0, _021D7888 ; =0x0000726F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D788C ; =0x00006B5A + lsl r2, r2, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D7890 ; =0x00000BA4 + add r1, r4, #0 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + mov r0, #0 + add r4, #0xb4 + str r0, [r4, #0] + ldr r1, _021D7894 ; =0x00000639 + add r0, r5, #0 + bl ov5_021DB4B8 + ldr r0, _021D7898 ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D7854 +_021D76E2: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D7702 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D7854 +_021D7702: + ldr r2, _021D7890 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D771A + cmp r6, #3 + beq _021D771C +_021D771A: + b _021D7854 +_021D771C: + ldr r0, _021D7898 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D7854 +_021D7724: + mov r2, #4 + mov r3, #0 + str r2, [sp] + str r3, [sp, #4] + sub r0, r3, #1 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _021D7884 ; =ov5_021D78A4 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D7890 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7766 + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D7888 ; =0x0000726F + ldr r0, [r0, #0x48] + ldr r3, _021D788C ; =0x00006B5A + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74D4 +_021D7766: + mov r0, #1 + str r0, [sp] + ldr r0, _021D789C ; =ov5_021D7960 + ldr r1, _021D7884 ; =ov5_021D78A4 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #0xa + bl ov5_021D7568 + ldr r1, _021D7894 ; =0x00000639 + add r0, r5, #0 + bl ov5_021DB4B8 + ldr r0, _021D7898 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D7854 +_021D778A: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D77A6 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D78A4 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D77A6: + ldr r0, _021D78A0 ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D7854 + mov r0, #0 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #8 + mov r3, #1 + bl ov5_021D7238 + ldr r0, _021D7890 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D77D4 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D77D4: + mov r0, #0 + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D7898 ; =0x00000BA2 + mov r1, #4 + strh r1, [r5, r0] + add r0, r5, #0 + bl ov5_021DB4E4 + b _021D7854 +_021D77E8: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D7808 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D7854 +_021D7808: + ldr r0, _021D7890 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D781A + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74B8 + b _021D781C +_021D781A: + mov r0, #1 +_021D781C: + cmp r0, #1 + bne _021D7854 + cmp r6, #3 + bne _021D7854 + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D7854 + ldr r0, _021D7898 ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D7854 +_021D7836: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D784E + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D784E: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D7854: + ldr r0, _021D7898 ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D787A + cmp r0, #0 + beq _021D787A + add r0, r5, #0 + ldr r1, _021D789C ; =ov5_021D7960 + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C +_021D787A: + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_021D7880: .word 0x00000B98 +_021D7884: .word ov5_021D78A4 +_021D7888: .word 0x0000726F +_021D788C: .word 0x00006B5A +_021D7890: .word 0x00000BA4 +_021D7894: .word 0x00000639 +_021D7898: .word 0x00000BA2 +_021D789C: .word ov5_021D7960 +_021D78A0: .word 0x00000BA6 + thumb_func_end ov5_021D7658 + + thumb_func_start ov5_021D78A4 +ov5_021D78A4: ; 0x021D78A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp] + mov r0, #0 + str r0, [sp, #8] + add r0, r1, #0 + str r1, [sp, #4] + cmp r0, #0 + ble _021D7952 +_021D78B6: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r6, r0, #0 + beq _021D7952 + ldr r4, [r6, #8] + bl sub_0201D35C + mov r1, #0 + str r1, [r4, #0] + mov r1, #3 + add r7, r0, #0 + bl sub_020E2178 + add r5, r1, #0 + lsl r1, r5, #0x10 + ldr r0, [r6, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + add r0, r7, #0 + mov r1, #0x14 + bl sub_020E2178 + add r2, r5, #1 + mov r0, #0xa + mul r0, r2 + add r0, r1, r0 + str r0, [r4, #8] + cmp r5, #2 + bne _021D78FC + ldr r0, [r4, #8] + add r0, #0xa + str r0, [r4, #8] +_021D78FC: + add r0, r1, #0 + mov r1, #4 + mvn r1, r1 + bl sub_020E1F6C + mov r1, #4 + add r2, r5, #1 + mvn r1, r1 + mul r1, r2 + add r0, r0, r1 + str r0, [r4, #0x10] + cmp r5, #2 + bne _021D791C + ldr r0, [r4, #0x10] + sub r0, r0, #5 + str r0, [r4, #0x10] +_021D791C: + mov r0, #0 + str r0, [r4, #0xc] + add r0, r5, #1 + str r0, [r4, #4] + ldr r1, _021D7958 ; =0x0000010E + add r0, r7, #0 + bl sub_020E2178 + mov r0, #0xf + mul r0, r5 + add r0, r1, r0 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, _021D795C ; =0xFFFA0000 + add r1, sp, #0xc + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #4] + bl ov5_021D630C + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #8] + cmp r1, r0 + blt _021D78B6 +_021D7952: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D7958: .word 0x0000010E +_021D795C: .word 0xFFFA0000 + thumb_func_end ov5_021D78A4 + + thumb_func_start ov5_021D7960 +ov5_021D7960: ; 0x021D7960 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r4, [r5, #8] + add r0, sp, #0 + add r1, r5, #0 + bl ov5_021D7010 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D7982 + cmp r0, #1 + beq _021D79D2 + cmp r0, #2 + beq _021D79E4 + add sp, #0xc + pop {r4, r5, pc} +_021D7982: + ldr r0, [r4, #0x10] + ldr r1, [sp] + lsl r0, r0, #0xd + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #8] + ldr r1, [sp, #4] + lsl r0, r0, #0xd + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, r0, #2 + str r1, [r4, #0] + ldr r0, [r4, #4] + cmp r1, r0 + ble _021D79C6 + bl sub_0201D35C + mov r1, #0xa + bl sub_020E2178 + cmp r1, #7 + bhs _021D79B6 + mov r0, #2 + str r0, [r4, #0xc] + b _021D79C6 +_021D79B6: + mov r0, #1 + str r0, [r4, #0xc] + mov r0, #4 + str r0, [r4, #0] + ldr r0, [r5, #4] + mov r1, #3 + bl sub_02021E50 +_021D79C6: + ldr r0, [r5, #4] + add r1, sp, #0 + bl ov5_021D630C + add sp, #0xc + pop {r4, r5, pc} +_021D79D2: + ldr r1, [r4, #0] + sub r0, r1, #1 + str r0, [r4, #0] + cmp r1, #0 + bgt _021D79EA + mov r0, #2 + add sp, #0xc + str r0, [r4, #0xc] + pop {r4, r5, pc} +_021D79E4: + add r0, r5, #0 + bl ov5_021D6FA8 +_021D79EA: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D7960 + + thumb_func_start ov5_021D79F0 +ov5_021D79F0: ; 0x021D79F0 + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D7C20 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D7AB2 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D7A10: ; jump table + .short _021D7A1C - _021D7A10 - 2 ; case 0 + .short _021D7A7A - _021D7A10 - 2 ; case 1 + .short _021D7ABC - _021D7A10 - 2 ; case 2 + .short _021D7B2A - _021D7A10 - 2 ; case 3 + .short _021D7B82 - _021D7A10 - 2 ; case 4 + .short _021D7BD6 - _021D7A10 - 2 ; case 5 +_021D7A1C: + mov r2, #1 + str r2, [sp] + mov r0, #0xe + str r0, [sp, #4] + sub r0, #0x13 + str r0, [sp, #8] + str r2, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _021D7C24 ; =ov5_021D7C40 + mov r3, #0x18 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + ldr r0, _021D7C28 ; =0x0000726F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D7C2C ; =0x00006B5A + add r1, r4, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D7C30 ; =0x00000BA4 + lsl r2, r2, #2 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + mov r0, #0x10 + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D7C34 ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D7BF4 +_021D7A7A: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D7A9A + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D7BF4 +_021D7A9A: + ldr r2, _021D7C30 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D7AB2 + cmp r6, #3 + beq _021D7AB4 +_021D7AB2: + b _021D7BF4 +_021D7AB4: + ldr r0, _021D7C34 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D7BF4 +_021D7ABC: + mov r2, #1 + mov r3, #0xe + str r2, [sp] + add r0, r3, #0 + str r3, [sp, #4] + sub r0, #0x13 + str r0, [sp, #8] + str r2, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _021D7C24 ; =ov5_021D7C40 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + ldr r0, _021D7C30 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7B0E + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D7C28 ; =0x0000726F + ldr r0, [r0, #0x48] + ldr r3, _021D7C2C ; =0x00006B5A + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74D4 +_021D7B0E: + mov r0, #0x18 + str r0, [sp] + ldr r0, _021D7C38 ; =ov5_021D7E20 + ldr r1, _021D7C24 ; =ov5_021D7C40 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #2 + bl ov5_021D7568 + ldr r0, _021D7C34 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D7BF4 +_021D7B2A: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D7B46 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D7C40 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D7B46: + ldr r0, _021D7C3C ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D7BF4 + mov r0, #0 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0x18 + mov r3, #5 + bl ov5_021D7238 + ldr r0, _021D7C30 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7B74 + add r0, r4, #0 + add r0, #0x1c + mov r1, #2 + mov r2, #0 + bl ov5_021D749C +_021D7B74: + mov r0, #0x20 + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D7C34 ; =0x00000BA2 + mov r1, #4 + strh r1, [r5, r0] + b _021D7BF4 +_021D7B82: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D7BA2 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D7BF4 +_021D7BA2: + ldr r0, _021D7C30 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7BB4 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74B8 + b _021D7BB6 +_021D7BB4: + mov r0, #1 +_021D7BB6: + cmp r0, #1 + bne _021D7BF4 + cmp r6, #3 + bne _021D7BF4 + mov r0, #1 + add r4, #0xbc + str r0, [r4, #0] + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D7BF4 + ldr r0, _021D7C34 ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D7BF4 +_021D7BD6: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7BEE + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D7BEE: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D7BF4: + ldr r0, _021D7C34 ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D7C1A + cmp r0, #0 + beq _021D7C1A + add r0, r5, #0 + ldr r1, _021D7C38 ; =ov5_021D7E20 + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C +_021D7C1A: + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_021D7C20: .word 0x00000B98 +_021D7C24: .word ov5_021D7C40 +_021D7C28: .word 0x0000726F +_021D7C2C: .word 0x00006B5A +_021D7C30: .word 0x00000BA4 +_021D7C34: .word 0x00000BA2 +_021D7C38: .word ov5_021D7E20 +_021D7C3C: .word 0x00000BA6 + thumb_func_end ov5_021D79F0 + + thumb_func_start ov5_021D7C40 +ov5_021D7C40: ; 0x021D7C40 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r1, #0 + ldr r1, _021D7D4C ; =0x00000B98 + str r0, [sp] + ldr r0, [r0, r1] + str r0, [sp, #0x10] + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021D7C58 + lsl r7, r7, #1 +_021D7C58: + mov r6, #0 + cmp r7, #0 + ble _021D7D46 + ldr r0, [sp, #0x10] + str r0, [sp, #0xc] + add r0, #0xb8 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + str r0, [sp, #8] + add r0, #0xbc + str r0, [sp, #8] + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r0, r0, #1 + str r0, [sp, #4] +_021D7C76: + ldr r0, [sp] + mov r1, #0x28 + bl ov5_021D6F00 + add r4, r0, #0 + beq _021D7D46 + ldr r5, [r4, #8] + bl sub_0201D35C + mov r1, #3 + and r1, r0 + lsl r1, r1, #0x10 + ldr r0, [r4, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + mov r0, #0xa + str r0, [r5, #0x10] + mov r0, #0 + str r0, [r5, #0x14] + str r0, [r5, #0x18] + str r0, [r5, #0x20] + bl sub_0201D35C + mov r1, #0x3c + str r0, [sp, #0x14] + bl sub_020E1F6C + add r0, r1, #4 + str r0, [r5, #0x24] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x14] + lsr r0, r0, #0x1f + lsl r2, r1, #0x1f + sub r2, r2, r0 + mov r1, #0x1f + ror r2, r1 + add r0, r0, r2 + bne _021D7CC8 + mov r0, #1 + b _021D7CCC +_021D7CC8: + add r0, r1, #0 + sub r0, #0x20 +_021D7CCC: + str r0, [r5, #4] + bl sub_0201D35C + mov r1, #1 + and r0, r1 + add r0, r0, #4 + str r0, [r5, #8] + bl sub_0201D35C + mov r1, #1 + and r0, r1 + add r0, r0, #1 + str r0, [r5, #0xc] + ldr r0, [sp, #0xc] + str r0, [r5, #0] + ldr r0, [sp, #8] + str r0, [r5, #0x1c] + bl sub_0201D35C + ldr r1, _021D7D50 ; =0x0000019E + bl sub_020E2178 + sub r1, #0x20 + lsl r0, r1, #0xc + str r0, [sp, #0x18] + ldr r0, [sp, #0x10] + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021D7D24 + ldr r0, [sp, #4] + cmp r6, r0 + blt _021D7D24 + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + mov r0, #0x27 + mvn r0, r0 + sub r0, r0, r1 + lsl r0, r0, #0xc + str r0, [sp, #0x1c] + b _021D7D38 +_021D7D24: + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + mov r0, #7 + mvn r0, r0 + sub r0, r0, r1 + lsl r0, r0, #0xc + str r0, [sp, #0x1c] +_021D7D38: + ldr r0, [r4, #4] + add r1, sp, #0x18 + bl ov5_021D630C + add r6, r6, #1 + cmp r6, r7 + blt _021D7C76 +_021D7D46: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021D7D4C: .word 0x00000B98 +_021D7D50: .word 0x0000019E + thumb_func_end ov5_021D7C40 + + thumb_func_start ov5_021D7D54 +ov5_021D7D54: ; 0x021D7D54 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r0, sp, #0 + add r1, r5, #0 + bl ov5_021D7010 + ldr r0, [r4, #0x14] + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [r4, #8] + cmp r1, r0 + blt _021D7DAA + ldr r0, [r4, #4] + ldr r1, [sp] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + ldr r1, [r4, #0x14] + ldr r0, _021D7E18 ; =0xFFFF0000 + and r0, r1 + str r0, [r4, #0x14] + ldr r0, [r4, #0x10] + cmp r0, #0xa + ldr r0, [r4, #8] + bge _021D7D94 + sub r0, r0, #1 + b _021D7D96 +_021D7D94: + add r0, r0, #1 +_021D7D96: + str r0, [r4, #8] + ldr r0, [r4, #0x10] + cmp r0, #0x14 + blt _021D7DAA + mov r0, #0 + str r0, [r4, #0x10] + ldr r1, [r4, #4] + sub r0, r0, #1 + mul r0, r1 + str r0, [r4, #4] +_021D7DAA: + ldr r0, [r4, #0x14] + asr r1, r0, #0x10 + ldr r0, [r4, #0xc] + cmp r1, r0 + blt _021D7DC6 + mov r0, #1 + ldr r1, [sp, #4] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #0x14] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [r4, #0x14] +_021D7DC6: + ldr r0, [r5, #4] + add r1, sp, #0 + bl ov5_021D630C + ldr r0, [sp] + mov r1, #0x64 + asr r0, r0, #0xc + str r0, [sp] + ldr r0, [sp, #4] + asr r0, r0, #0xc + str r0, [sp, #4] + ldr r0, [r4, #0x18] + add r0, r0, #1 + bl sub_020E1F6C + str r1, [r4, #0x18] + ldr r0, [r4, #0x14] + add r1, r0, #1 + mov r0, #1 + lsl r0, r0, #0x10 + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [sp, #4] + ldr r0, _021D7E1C ; =0xFFFFFEE4 + cmp r1, r0 + bge _021D7E00 + sub r0, #0xc + cmp r1, r0 + bgt _021D7E08 +_021D7E00: + cmp r1, #0xd4 + ble _021D7E14 + cmp r1, #0xe8 + bge _021D7E14 +_021D7E08: + ldr r0, [r4, #0] + mov r1, #1 + str r1, [r0, #0] + add r0, r5, #0 + bl ov5_021D6FA8 +_021D7E14: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D7E18: .word 0xFFFF0000 +_021D7E1C: .word 0xFFFFFEE4 + thumb_func_end ov5_021D7D54 + + thumb_func_start ov5_021D7E20 +ov5_021D7E20: ; 0x021D7E20 + push {r3, lr} + ldr r1, [r0, #8] + ldr r3, [r1, #0x20] + ldr r2, [r1, #0x1c] + cmp r3, #0 + beq _021D7E32 + cmp r3, #1 + beq _021D7E3E + b _021D7E4C +_021D7E32: + ldr r2, [r2, #0] + cmp r2, #1 + bne _021D7E4C + add r2, r3, #1 + str r2, [r1, #0x20] + b _021D7E4C +_021D7E3E: + ldr r2, [r1, #0x24] + sub r2, r2, #1 + str r2, [r1, #0x24] + bpl _021D7E4C + bl ov5_021D6FA8 + pop {r3, pc} +_021D7E4C: + bl ov5_021D7D54 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021D7E20 + + thumb_func_start ov5_021D7E54 +ov5_021D7E54: ; 0x021D7E54 + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D8078 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D7F18 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D7E74: ; jump table + .short _021D7E80 - _021D7E74 - 2 ; case 0 + .short _021D7EE0 - _021D7E74 - 2 ; case 1 + .short _021D7F22 - _021D7E74 - 2 ; case 2 + .short _021D7F8A - _021D7E74 - 2 ; case 3 + .short _021D7FE2 - _021D7E74 - 2 ; case 4 + .short _021D8030 - _021D7E74 - 2 ; case 5 +_021D7E80: + mov r0, #6 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + sub r0, #8 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r2, #1 + ldr r0, _021D807C ; =ov5_021D8098 + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r4, #0 + mov r3, #0x1e + bl ov5_021D7210 + ldr r0, _021D8080 ; =0x00006D6F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D8084 ; =0x00006318 + add r1, r4, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldr r0, _021D8088 ; =0x00000BA4 + lsl r2, r2, #2 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #8 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0 + add r4, #0xb8 + str r0, [r4, #0] + ldr r0, _021D808C ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D804E +_021D7EE0: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D7F00 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D804E +_021D7F00: + ldr r2, _021D8088 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D7F18 + cmp r6, #3 + beq _021D7F1A +_021D7F18: + b _021D804E +_021D7F1A: + ldr r0, _021D808C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D804E +_021D7F22: + mov r2, #6 + mov r3, #3 + str r2, [sp] + add r0, r3, #0 + str r3, [sp, #4] + sub r0, #8 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _021D807C ; =ov5_021D8098 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D8088 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7F68 + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D8080 ; =0x00006D6F + ldr r0, [r0, #0x48] + ldr r3, _021D8084 ; =0x00006318 + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021D7F68: + mov r0, #0 + add r4, #0xb8 + str r0, [r4, #0] + mov r0, #3 + str r0, [sp] + ldr r0, _021D8090 ; =ov5_021D81BC + ldr r1, _021D807C ; =ov5_021D8098 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #2 + bl ov5_021D7568 + ldr r0, _021D808C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D804E +_021D7F8A: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D7FA6 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D8098 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D7FA6: + ldr r0, _021D8094 ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D804E + mov r0, #2 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0x1e + mov r3, #5 + bl ov5_021D7238 + ldr r0, _021D8088 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D7FD4 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D7FD4: + mov r0, #0 + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D808C ; =0x00000BA2 + mov r1, #4 + strh r1, [r5, r0] + b _021D804E +_021D7FE2: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8002 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D804E +_021D8002: + ldr r0, _021D8088 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8014 + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74B8 + b _021D8016 +_021D8014: + mov r0, #1 +_021D8016: + cmp r0, #1 + bne _021D804E + cmp r6, #3 + bne _021D804E + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D804E + ldr r0, _021D808C ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D804E +_021D8030: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8048 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D8048: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D804E: + ldr r0, _021D808C ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D8074 + cmp r0, #0 + beq _021D8074 + add r0, r5, #0 + ldr r1, _021D8090 ; =ov5_021D81BC + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C +_021D8074: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D8078: .word 0x00000B98 +_021D807C: .word ov5_021D8098 +_021D8080: .word 0x00006D6F +_021D8084: .word 0x00006318 +_021D8088: .word 0x00000BA4 +_021D808C: .word 0x00000BA2 +_021D8090: .word ov5_021D81BC +_021D8094: .word 0x00000BA6 + thumb_func_end ov5_021D7E54 + + thumb_func_start ov5_021D8098 +ov5_021D8098: ; 0x021D8098 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + ldr r3, _021D81B0 ; =0x021F8CCC + add r2, sp, #0x48 + str r0, [sp] + str r1, [sp, #4] + ldmia r3!, {r0, r1} + str r2, [sp, #0x10] + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r3, _021D81B4 ; =0x021F8CBC + add r2, sp, #0x38 + str r2, [sp, #0x14] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r1, _021D81B8 ; =0x00000B98 + ldr r0, [sp] + ldr r6, [r0, r1] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + cmp r0, #0 + ble _021D81AC + add r0, r6, #0 + str r0, [sp, #0x18] + add r0, #0xb8 + str r0, [sp, #0x18] + mov r0, #7 + mvn r0, r0 + lsl r0, r0, #0xc + str r0, [sp, #0x1c] +_021D80DC: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r4, r0, #0 + beq _021D81AC + ldr r0, [sp, #0x18] + ldr r5, [r4, #8] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xb8 + ldr r1, [r0, #0] + mov r0, #0x32 + lsl r0, r0, #4 + cmp r1, r0 + blt _021D810A + add r1, r6, #0 + add r1, #0xb8 + mov r0, #0 + str r0, [r1, #0] +_021D810A: + add r0, r6, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + mov r1, #0xc8 + bl sub_020E1F6C + lsl r0, r0, #2 + ldr r1, [sp, #0x10] + str r0, [sp, #8] + ldr r0, [r1, r0] + str r0, [r5, #0x14] + mov r0, #0 + str r0, [r5, #0] + bl sub_0201D35C + mov r1, #0x2a + bl sub_020E2178 + add r0, r1, #4 + str r0, [r5, #4] + sub r0, r0, #4 + mov r1, #0xf + bl sub_020E1F6C + add r7, r0, #0 + lsl r1, r7, #0x10 + ldr r0, [r4, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + add r0, r7, #1 + neg r1, r0 + str r1, [r5, #0x10] + ldr r2, [sp, #0x14] + ldr r1, [sp, #8] + ldr r1, [r2, r1] + mul r1, r0 + str r1, [r5, #8] + mov r0, #0 + str r0, [r5, #0xc] + add r0, sp, #0x20 + add r1, r4, #0 + bl ov5_021D7010 + add r3, sp, #0x20 + ldmia r3!, {r0, r1} + add r2, sp, #0x2c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bl sub_0201D35C + mov r1, #0x69 + lsl r1, r1, #2 + bl sub_020E2178 + mov r0, #1 + sub r2, r0, r7 + sub r0, #0x15 + mul r0, r2 + add r1, r0, r1 + mov r0, #7 + mvn r0, r0 + str r0, [sp, #0x30] + mov r0, #0 + str r0, [sp, #0x34] + str r1, [sp, #0x2c] + lsl r0, r1, #0xc + str r0, [sp, #0x2c] + ldr r0, [sp, #0x1c] + add r1, sp, #0x2c + str r0, [sp, #0x30] + ldr r0, [r4, #4] + bl ov5_021D630C + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #0xc] + cmp r1, r0 + blt _021D80DC +_021D81AC: + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D81B0: .word 0x021F8CCC +_021D81B4: .word 0x021F8CBC +_021D81B8: .word 0x00000B98 + thumb_func_end ov5_021D8098 + + thumb_func_start ov5_021D81BC +ov5_021D81BC: ; 0x021D81BC + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + ldr r4, [r5, #8] + bl ov5_021D7010 + add r3, sp, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D81E6 + cmp r0, #1 + beq _021D8232 + add sp, #0x18 + pop {r3, r4, r5, pc} +_021D81E6: + ldr r0, [r4, #0x10] + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, [r4, #8] + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [r4, #0] + add r0, r1, #1 + str r0, [r4, #0] + ldr r0, [r4, #4] + cmp r1, r0 + ble _021D820A + mov r0, #1 + str r0, [r4, #0xc] +_021D820A: + ldr r0, [r4, #0] + ldr r1, [r4, #0x14] + bl sub_020E1F6C + cmp r1, #0 + bne _021D8226 + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + ldr r0, [r4, #8] + cmp r0, #1 + ble _021D8226 + sub r0, r0, #1 + str r0, [r4, #8] +_021D8226: + ldr r0, [r5, #4] + add r1, sp, #0xc + bl ov5_021D630C + add sp, #0x18 + pop {r3, r4, r5, pc} +_021D8232: + add r0, r5, #0 + bl ov5_021D6FA8 + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D81BC + + thumb_func_start ov5_021D823C +ov5_021D823C: ; 0x021D823C + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D84AC ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D830A + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D825C: ; jump table + .short _021D8268 - _021D825C - 2 ; case 0 + .short _021D82D0 - _021D825C - 2 ; case 1 + .short _021D8314 - _021D825C - 2 ; case 2 + .short _021D8384 - _021D825C - 2 ; case 3 + .short _021D83DE - _021D825C - 2 ; case 4 + .short _021D842E - _021D825C - 2 ; case 5 +_021D8268: + mov r0, #6 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + sub r0, #8 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r2, #1 + ldr r0, _021D84B0 ; =ov5_021D8098 + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r4, #0 + mov r3, #0x1e + bl ov5_021D7210 + ldr r0, _021D84B4 ; =0x00006F6F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D84B8 ; =0x00006318 + add r1, r4, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldr r0, _021D84BC ; =0x00000BA4 + lsl r2, r2, #2 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #8 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + ldr r0, _021D84C0 ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D844C +_021D82D0: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D82F2 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021D844C +_021D82F2: + ldr r2, _021D84BC ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r1, r4, #0 + add r0, #0x4c + add r1, #0x1c + bl ov5_021D735C + cmp r0, #1 + bne _021D830A + cmp r6, #3 + beq _021D830C +_021D830A: + b _021D844C +_021D830C: + ldr r0, _021D84C0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D844C +_021D8314: + mov r2, #6 + mov r3, #3 + str r2, [sp] + add r0, r3, #0 + str r3, [sp, #4] + sub r0, #8 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _021D84B0 ; =ov5_021D8098 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D84BC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D835A + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D84B4 ; =0x00006F6F + ldr r0, [r0, #0x48] + ldr r3, _021D84B8 ; =0x00006318 + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021D835A: + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + mov r0, #3 + str r0, [sp] + ldr r0, _021D84C4 ; =ov5_021D81BC + ldr r1, _021D84B0 ; =ov5_021D8098 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #2 + bl ov5_021D7568 + ldr r0, _021D84C0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D844C +_021D8384: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D83A0 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D8098 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D83A0: + ldr r0, _021D84C8 ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D844C + mov r0, #2 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0x1e + mov r3, #5 + bl ov5_021D7238 + ldr r0, _021D84BC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D83CE + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D83CE: + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + ldr r0, _021D84C0 ; =0x00000BA2 + mov r1, #4 + strh r1, [r5, r0] + b _021D844C +_021D83DE: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8400 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021D844C +_021D8400: + ldr r0, _021D84BC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8412 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74B8 + b _021D8414 +_021D8412: + mov r0, #1 +_021D8414: + cmp r0, #1 + bne _021D844C + cmp r6, #3 + bne _021D844C + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D844C + ldr r0, _021D84C0 ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D844C +_021D842E: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8446 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D8446: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D844C: + ldr r0, _021D84C0 ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D84A6 + cmp r0, #0 + beq _021D84A6 + add r0, r5, #0 + ldr r1, _021D84C4 ; =ov5_021D81BC + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + add r0, r0, #6 + lsr r2, r0, #0x1f + lsl r1, r0, #0x18 + sub r1, r1, r2 + mov r0, #0x18 + ror r1, r0 + add r0, r4, #0 + add r1, r2, r1 + add r0, #0xbc + str r1, [r0, #0] + add r4, #0xbc + ldr r1, [r4, #0] + ldr r0, _021D84CC ; =0x000001FF + add r2, r1, #0 + neg r1, r1 + and r2, r0 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + and r0, r1 + add r1, r2, #0 + orr r1, r0 + ldr r0, _021D84D0 ; =0x04000018 + str r1, [r0, #0] +_021D84A6: + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_021D84AC: .word 0x00000B98 +_021D84B0: .word ov5_021D8098 +_021D84B4: .word 0x00006F6F +_021D84B8: .word 0x00006318 +_021D84BC: .word 0x00000BA4 +_021D84C0: .word 0x00000BA2 +_021D84C4: .word ov5_021D81BC +_021D84C8: .word 0x00000BA6 +_021D84CC: .word 0x000001FF +_021D84D0: .word 0x04000018 + thumb_func_end ov5_021D823C + + thumb_func_start ov5_021D84D4 +ov5_021D84D4: ; 0x021D84D4 + push {r3, r4, r5, lr} + sub sp, #0x10 + ldr r2, _021D8628 ; =0x00000B98 + add r4, r1, #0 + add r0, r2, #0 + add r0, #0xa + ldrh r0, [r4, r0] + ldr r5, [r4, r2] + cmp r0, #5 + bls _021D84EA + b _021D8622 +_021D84EA: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D84F6: ; jump table + .short _021D8502 - _021D84F6 - 2 ; case 0 + .short _021D853A - _021D84F6 - 2 ; case 1 + .short _021D8570 - _021D84F6 - 2 ; case 2 + .short _021D859E - _021D84F6 - 2 ; case 3 + .short _021D85CA - _021D84F6 - 2 ; case 4 + .short _021D8604 - _021D84F6 - 2 ; case 5 +_021D8502: + ldr r0, _021D862C ; =0x0000716F + add r2, #0xc + str r0, [sp] + ldr r0, _021D8630 ; =0x00006B5A + add r1, r5, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldrh r0, [r4, r2] + mov r2, #0x41 + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r0, #0x30 + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + mov r0, #0x10 + add r5, #0x98 + str r0, [r5, #0] + ldr r0, _021D8634 ; =0x00000BA2 + mov r1, #1 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D853A: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8554 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r5, #0x98 + sub r0, r0, #1 + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D8554: + add r2, #0xc + ldrh r2, [r4, r2] + add r0, r5, #0 + add r0, #0x30 + add r1, r5, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D8622 + ldr r0, _021D8634 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D8570: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D8594 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D862C ; =0x0000716F + ldr r0, [r0, #0x48] + ldr r3, _021D8630 ; =0x00006B5A + mov r1, #3 + str r0, [r5, #0] + bl ov5_021D7384 + add r0, r5, #0 + bl ov5_021D74D4 +_021D8594: + ldr r0, _021D8634 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D859E: + add r0, r2, #0 + add r0, #0xe + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021D8622 + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D85BA + add r0, r5, #0 + mov r1, #2 + mov r2, #0 + bl ov5_021D749C +_021D85BA: + mov r0, #0x10 + add r5, #0x98 + str r0, [r5, #0] + ldr r0, _021D8634 ; =0x00000BA2 + mov r1, #4 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D85CA: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D85E4 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r5, #0x98 + sub r0, r0, #1 + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D85E4: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D85F4 + add r0, r5, #0 + bl ov5_021D74B8 + b _021D85F6 +_021D85F4: + mov r0, #1 +_021D85F6: + cmp r0, #1 + bne _021D8622 + ldr r0, _021D8634 ; =0x00000BA2 + mov r1, #5 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D8604: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D861C + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D861C: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021D8622: + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_021D8628: .word 0x00000B98 +_021D862C: .word 0x0000716F +_021D8630: .word 0x00006B5A +_021D8634: .word 0x00000BA2 + thumb_func_end ov5_021D84D4 + + thumb_func_start ov5_021D8638 +ov5_021D8638: ; 0x021D8638 + push {r3, r4, r5, lr} + sub sp, #0x10 + ldr r2, _021D878C ; =0x00000B98 + add r4, r1, #0 + add r0, r2, #0 + add r0, #0xa + ldrh r0, [r4, r0] + ldr r5, [r4, r2] + cmp r0, #5 + bls _021D864E + b _021D8786 +_021D864E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D865A: ; jump table + .short _021D8666 - _021D865A - 2 ; case 0 + .short _021D869E - _021D865A - 2 ; case 1 + .short _021D86D4 - _021D865A - 2 ; case 2 + .short _021D8702 - _021D865A - 2 ; case 3 + .short _021D872E - _021D865A - 2 ; case 4 + .short _021D8768 - _021D865A - 2 ; case 5 +_021D8666: + ldr r0, _021D8790 ; =0x0000658F + add r2, #0xc + str r0, [sp] + ldr r0, _021D8794 ; =0x00006B5A + add r1, r5, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldrh r0, [r4, r2] + mov r2, #0x41 + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r0, #0x30 + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + mov r0, #0x10 + add r5, #0x98 + str r0, [r5, #0] + ldr r0, _021D8798 ; =0x00000BA2 + mov r1, #1 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D869E: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D86B8 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r5, #0x98 + sub r0, r0, #1 + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D86B8: + add r2, #0xc + ldrh r2, [r4, r2] + add r0, r5, #0 + add r0, #0x30 + add r1, r5, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D8786 + ldr r0, _021D8798 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D86D4: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D86F8 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D8790 ; =0x0000658F + ldr r0, [r0, #0x48] + ldr r3, _021D8794 ; =0x00006B5A + mov r1, #3 + str r0, [r5, #0] + bl ov5_021D7384 + add r0, r5, #0 + bl ov5_021D74D4 +_021D86F8: + ldr r0, _021D8798 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D8702: + add r0, r2, #0 + add r0, #0xe + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021D8786 + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D871E + add r0, r5, #0 + mov r1, #2 + mov r2, #0 + bl ov5_021D749C +_021D871E: + mov r0, #0x10 + add r5, #0x98 + str r0, [r5, #0] + ldr r0, _021D8798 ; =0x00000BA2 + mov r1, #4 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D872E: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8748 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r5, #0x98 + sub r0, r0, #1 + add sp, #0x10 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_021D8748: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D8758 + add r0, r5, #0 + bl ov5_021D74B8 + b _021D875A +_021D8758: + mov r0, #1 +_021D875A: + cmp r0, #1 + bne _021D8786 + ldr r0, _021D8798 ; =0x00000BA2 + mov r1, #5 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021D8768: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021D8780 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D8780: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021D8786: + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_021D878C: .word 0x00000B98 +_021D8790: .word 0x0000658F +_021D8794: .word 0x00006B5A +_021D8798: .word 0x00000BA2 + thumb_func_end ov5_021D8638 + + thumb_func_start ov5_021D879C +ov5_021D879C: ; 0x021D879C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r0, _021D8934 ; =0x00000B98 + add r4, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r4, r1] + ldr r5, [r4, r0] + cmp r1, #5 + bls _021D87B2 + b _021D8930 +_021D87B2: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D87BE: ; jump table + .short _021D87CA - _021D87BE - 2 ; case 0 + .short _021D8828 - _021D87BE - 2 ; case 1 + .short _021D8856 - _021D87BE - 2 ; case 2 + .short _021D88A4 - _021D87BE - 2 ; case 3 + .short _021D88D8 - _021D87BE - 2 ; case 4 + .short _021D8912 - _021D87BE - 2 ; case 5 +_021D87CA: + ldr r1, _021D8938 ; =0x00007A0F + mov r2, #0x41 + str r1, [sp] + ldr r1, _021D893C ; =0x00007FFF + add r0, #0xc + str r1, [sp, #4] + mov r1, #2 + str r1, [sp, #8] + ldrh r0, [r4, r0] + add r1, r5, #0 + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r0, #0x44 + ldr r2, [r2, #0x48] + add r1, #0x14 + mov r3, #5 + bl ov5_021D7308 + add r0, r5, #0 + mov r1, #0 + mov r2, #0x10 + mov r3, #0x1e + bl ov5_021D64FC + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + ldr r1, _021D8940 ; =0x0400000C + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #3 + orr r0, r2 + strh r0, [r1] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021D8944 ; =0x00000BA2 + mov r1, #1 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D8828: + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021D650C + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021D8930 + cmp r7, #1 + bne _021D8930 + ldr r0, _021D8944 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D8856: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D887C + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D8938 ; =0x00007A0F + ldr r0, [r0, #0x48] + ldr r3, _021D893C ; =0x00007FFF + mov r1, #5 + str r0, [r5, #0x14] + bl ov5_021D7384 + add r5, #0x14 + add r0, r5, #0 + bl ov5_021D74D4 +_021D887C: + mov r0, #0x10 + mov r1, #0 + bl ov5_021D64E4 + ldr r1, _021D8940 ; =0x0400000C + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #3 + orr r0, r2 + strh r0, [r1] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021D8944 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D88A4: + add r1, r0, #0 + add r1, #0xe + ldrh r1, [r4, r1] + cmp r1, #5 + bne _021D8930 + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D88C2 + add r0, r5, #0 + add r0, #0x14 + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D88C2: + add r0, r5, #0 + mov r1, #0x10 + mov r2, #0 + mov r3, #0x1e + bl ov5_021D64FC + ldr r0, _021D8944 ; =0x00000BA2 + mov r1, #4 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D88D8: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D88EC + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r6, r0, #0 + b _021D88EE +_021D88EC: + mov r6, #1 +_021D88EE: + add r0, r5, #0 + bl ov5_021D650C + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021D8930 + cmp r7, #1 + bne _021D8930 + ldr r0, _021D8944 ; =0x00000BA2 + mov r1, #5 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021D8912: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D892A + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0x14] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D892A: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021D8930: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D8934: .word 0x00000B98 +_021D8938: .word 0x00007A0F +_021D893C: .word 0x00007FFF +_021D8940: .word 0x0400000C +_021D8944: .word 0x00000BA2 + thumb_func_end ov5_021D879C + + thumb_func_start ov5_021D8948 +ov5_021D8948: ; 0x021D8948 + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D8B68 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D8A0A + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D8968: ; jump table + .short _021D8974 - _021D8968 - 2 ; case 0 + .short _021D89D2 - _021D8968 - 2 ; case 1 + .short _021D8A14 - _021D8968 - 2 ; case 2 + .short _021D8A78 - _021D8968 - 2 ; case 3 + .short _021D8AD0 - _021D8968 - 2 ; case 4 + .short _021D8B1E - _021D8968 - 2 ; case 5 +_021D8974: + mov r0, #8 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + sub r0, r2, #3 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _021D8B6C ; =ov5_021D8B88 + mov r3, #0xf + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D8B70 ; =0x00006EEF + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D8B74 ; =0x0000169A + lsl r2, r2, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D8B78 ; =0x00000BA4 + add r1, r4, #0 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + add r4, #0xb8 + str r1, [r4, #0] + ldr r0, _021D8B7C ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D8B3C +_021D89D2: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D89F2 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D8B3C +_021D89F2: + ldr r2, _021D8B78 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D8A0A + cmp r6, #3 + beq _021D8A0C +_021D8A0A: + b _021D8B3C +_021D8A0C: + ldr r0, _021D8B7C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D8B3C +_021D8A14: + mov r2, #8 + mov r3, #1 + str r2, [sp] + str r3, [sp, #4] + sub r0, r3, #3 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _021D8B6C ; =ov5_021D8B88 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D8B78 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8A58 + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D8B70 ; =0x00006EEF + ldr r0, [r0, #0x48] + ldr r3, _021D8B74 ; =0x0000169A + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021D8A58: + mov r0, #0 + add r4, #0xb8 + str r0, [r4, #0] + mov r3, #2 + ldr r0, _021D8B80 ; =ov5_021D8C90 + str r3, [sp] + str r0, [sp, #4] + ldr r1, _021D8B6C ; =ov5_021D8B88 + add r0, r5, #0 + mov r2, #0x18 + bl ov5_021D7568 + ldr r0, _021D8B7C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D8B3C +_021D8A78: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D8A94 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D8B88 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D8A94: + ldr r0, _021D8B84 ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D8B3C + mov r0, #2 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf + mov r3, #2 + bl ov5_021D7238 + ldr r0, _021D8B78 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8AC2 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D8AC2: + mov r0, #0x1f + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D8B7C ; =0x00000BA2 + mov r1, #4 + strh r1, [r5, r0] + b _021D8B3C +_021D8AD0: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8AF0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D8B3C +_021D8AF0: + ldr r0, _021D8B78 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8B02 + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74B8 + b _021D8B04 +_021D8B02: + mov r0, #1 +_021D8B04: + cmp r0, #1 + bne _021D8B3C + cmp r6, #3 + bne _021D8B3C + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D8B3C + ldr r0, _021D8B7C ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D8B3C +_021D8B1E: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8B36 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D8B36: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D8B3C: + ldr r0, _021D8B7C ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D8B62 + cmp r0, #0 + beq _021D8B62 + add r0, r5, #0 + ldr r1, _021D8B80 ; =ov5_021D8C90 + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C +_021D8B62: + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_021D8B68: .word 0x00000B98 +_021D8B6C: .word ov5_021D8B88 +_021D8B70: .word 0x00006EEF +_021D8B74: .word 0x0000169A +_021D8B78: .word 0x00000BA4 +_021D8B7C: .word 0x00000BA2 +_021D8B80: .word ov5_021D8C90 +_021D8B84: .word 0x00000BA6 + thumb_func_end ov5_021D8948 + + thumb_func_start ov5_021D8B88 +ov5_021D8B88: ; 0x021D8B88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #4] + ldr r1, _021D8C7C ; =0x00000B98 + str r0, [sp] + ldr r4, [r0, r1] + mov r1, #5 + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + lsl r1, r1, #6 + add r0, r0, #1 + bl sub_020E1F6C + add r0, r4, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r4, #0xb8 + ldr r0, [r4, #0] + mov r1, #0x28 + bl sub_020E1F6C + mov r1, #0 + str r1, [sp, #8] + ldr r1, [sp, #4] + cmp r1, #0 + ble _021D8C76 + lsl r6, r0, #2 +_021D8BC0: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r4, r0, #0 + beq _021D8C76 + ldr r5, [r4, #8] + mov r0, #0 + str r0, [r5, #0] + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + add r1, #0xf + str r1, [r5, #4] + sub r1, #0xf + add r0, r1, #0 + mov r1, #6 + bl sub_020E1F6C + mov r1, #3 + sub r7, r1, r0 + ldr r1, _021D8C80 ; =0x021F8D70 + add r0, r7, #1 + ldr r1, [r1, r6] + mul r1, r0 + str r1, [r5, #8] + ldr r1, _021D8C84 ; =0x021F8D30 + ldr r1, [r1, r6] + mul r1, r0 + str r1, [r5, #0x10] + mov r0, #0 + str r0, [r5, #0xc] + ldr r0, _021D8C84 ; =0x021F8D30 + ldr r0, [r0, r6] + str r0, [r5, #0x14] + bl sub_0201D35C + mov r1, #0xfa + lsl r1, r1, #2 + bl sub_020E2178 + ldr r0, _021D8C88 ; =0x00000309 + cmp r1, r0 + bne _021D8C2A + ldr r1, [r5, #8] + mov r7, #4 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + add r0, r1, r0 + str r0, [r5, #8] +_021D8C2A: + lsl r1, r7, #0x10 + ldr r0, [r4, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + add r0, sp, #0xc + add r1, r4, #0 + bl ov5_021D7010 + bl sub_0201D35C + mov r1, #0x18 + bl sub_020E2178 + ldr r0, _021D8C8C ; =0x00000106 + add r0, r1, r0 + str r0, [sp, #0xc] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + bl sub_0201D35C + mov r1, #0xc0 + bl sub_020E2178 + sub r1, #0x40 + str r1, [sp, #0x10] + lsl r0, r1, #0xc + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, sp, #0xc + bl ov5_021D630C + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #8] + cmp r1, r0 + blt _021D8BC0 +_021D8C76: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D8C7C: .word 0x00000B98 +_021D8C80: .word 0x021F8D70 +_021D8C84: .word 0x021F8D30 +_021D8C88: .word 0x00000309 +_021D8C8C: .word 0x00000106 + thumb_func_end ov5_021D8B88 + + thumb_func_start ov5_021D8C90 +ov5_021D8C90: ; 0x021D8C90 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + ldr r4, [r5, #8] + bl ov5_021D7010 + add r3, sp, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D8CBA + cmp r0, #1 + beq _021D8CFE + add sp, #0x18 + pop {r3, r4, r5, pc} +_021D8CBA: + ldr r0, [r4, #0x10] + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, [r4, #8] + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + mov r1, #5 + bl sub_020E1F6C + cmp r1, #0 + bne _021D8CE2 + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0x10] +_021D8CE2: + ldr r1, [r4, #0] + add r0, r1, #1 + str r0, [r4, #0] + ldr r0, [r4, #4] + cmp r1, r0 + ble _021D8CF2 + mov r0, #1 + str r0, [r4, #0xc] +_021D8CF2: + ldr r0, [r5, #4] + add r1, sp, #0xc + bl ov5_021D630C + add sp, #0x18 + pop {r3, r4, r5, pc} +_021D8CFE: + add r0, r5, #0 + bl ov5_021D6FA8 + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021D8C90 + + thumb_func_start ov5_021D8D08 +ov5_021D8D08: ; 0x021D8D08 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + ldr r0, _021D8FCC ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D8DDA + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D8D28: ; jump table + .short _021D8D34 - _021D8D28 - 2 ; case 0 + .short _021D8DA0 - _021D8D28 - 2 ; case 1 + .short _021D8DEC - _021D8D28 - 2 ; case 2 + .short _021D8E66 - _021D8D28 - 2 ; case 3 + .short _021D8EFA - _021D8D28 - 2 ; case 4 + .short _021D8F48 - _021D8D28 - 2 ; case 5 +_021D8D34: + mov r0, #8 + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + sub r0, r2, #3 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _021D8FD0 ; =ov5_021D8B88 + mov r3, #0xf + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D8FD4 ; =0x00006EEF + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D8FD8 ; =0x0000169A + lsl r2, r2, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D8FDC ; =0x00000BA4 + add r1, r4, #0 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + ldr r0, _021D8FE0 ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D8F66 +_021D8DA0: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8DC2 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021D8F66 +_021D8DC2: + ldr r2, _021D8FDC ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r1, r4, #0 + add r0, #0x4c + add r1, #0x1c + bl ov5_021D735C + cmp r0, #1 + bne _021D8DDA + cmp r6, #3 + beq _021D8DDC +_021D8DDA: + b _021D8F66 +_021D8DDC: + ldr r0, _021D8FE0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021D8F66 +_021D8DEC: + mov r2, #8 + mov r3, #1 + str r2, [sp] + str r3, [sp, #4] + sub r0, r3, #3 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _021D8FD0 ; =ov5_021D8B88 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D8FDC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8E30 + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D8FD4 ; =0x00006EEF + ldr r0, [r0, #0x48] + ldr r3, _021D8FD8 ; =0x0000169A + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021D8E30: + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + mov r3, #2 + ldr r0, _021D8FE4 ; =ov5_021D8C90 + str r3, [sp] + str r0, [sp, #4] + ldr r1, _021D8FD0 ; =ov5_021D8B88 + add r0, r5, #0 + mov r2, #0x18 + bl ov5_021D7568 + ldr r0, _021D8FE0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021D8F66 +_021D8E66: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D8EB6 + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + mov r1, #0x28 + bl sub_020E1F6C + lsl r1, r0, #2 + ldr r0, _021D8FE8 ; =0x021F8D10 + ldr r1, [r0, r1] + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + mov r0, #5 + mvn r0, r0 + cmp r1, r0 + bgt _021D8EA6 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #1 + bl ov5_021D8B88 + b _021D8EB0 +_021D8EA6: + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D8B88 +_021D8EB0: + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D8EB6: + ldr r0, _021D8FEC ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D8F66 + mov r0, #2 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf + mov r3, #2 + bl ov5_021D7238 + ldr r0, _021D8FDC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8EE4 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D8EE4: + add r0, r4, #0 + mov r1, #0x1f + add r0, #0xb4 + str r1, [r0, #0] + ldr r1, _021D8FE0 ; =0x00000BA2 + mov r0, #4 + strh r0, [r5, r1] + mov r1, #0 + bl sub_0201FF0C + b _021D8F66 +_021D8EFA: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D8F1C + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021D8F66 +_021D8F1C: + ldr r0, _021D8FDC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8F2E + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74B8 + add r7, r0, #0 +_021D8F2E: + cmp r7, #1 + bne _021D8F66 + cmp r6, #3 + bne _021D8F66 + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D8F66 + ldr r0, _021D8FE0 ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D8F66 +_021D8F48: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D8F60 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D8F60: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D8F66: + ldr r0, _021D8FE0 ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D8FC8 + cmp r0, #0 + beq _021D8FC8 + add r0, r5, #0 + ldr r1, _021D8FE4 ; =ov5_021D8C90 + add r0, #0xc + bl ov5_021D6FF0 + add r0, r5, #0 + add r1, sp, #0x1c + add r2, sp, #0x18 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + add r0, r0, #6 + lsr r2, r0, #0x1f + lsl r1, r0, #0x18 + sub r1, r1, r2 + mov r0, #0x18 + ror r1, r0 + add r0, r4, #0 + add r1, r2, r1 + add r0, #0xbc + str r1, [r0, #0] + add r4, #0xbc + ldr r3, [r4, #0] + ldr r0, [sp, #0x1c] + lsl r1, r3, #1 + sub r1, r1, r0 + add r2, r1, #0 + ldr r1, [sp, #0x18] + ldr r0, _021D8FF0 ; =0x000001FF + sub r1, r1, r3 + and r2, r0 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + and r0, r1 + add r1, r2, #0 + orr r1, r0 + ldr r0, _021D8FF4 ; =0x04000018 + str r1, [r0, #0] +_021D8FC8: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D8FCC: .word 0x00000B98 +_021D8FD0: .word ov5_021D8B88 +_021D8FD4: .word 0x00006EEF +_021D8FD8: .word 0x0000169A +_021D8FDC: .word 0x00000BA4 +_021D8FE0: .word 0x00000BA2 +_021D8FE4: .word ov5_021D8C90 +_021D8FE8: .word 0x021F8D10 +_021D8FEC: .word 0x00000BA6 +_021D8FF0: .word 0x000001FF +_021D8FF4: .word 0x04000018 + thumb_func_end ov5_021D8D08 + + thumb_func_start ov5_021D8FF8 +ov5_021D8FF8: ; 0x021D8FF8 + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D9298 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D90C6 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D9018: ; jump table + .short _021D9024 - _021D9018 - 2 ; case 0 + .short _021D908C - _021D9018 - 2 ; case 1 + .short _021D90D8 - _021D9018 - 2 ; case 2 + .short _021D914C - _021D9018 - 2 ; case 3 + .short _021D91D4 - _021D9018 - 2 ; case 4 + .short _021D9224 - _021D9018 - 2 ; case 5 +_021D9024: + mov r0, #0xa + str r0, [sp] + mov r2, #1 + str r2, [sp, #4] + sub r0, r2, #5 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #3 + str r0, [sp, #0x10] + ldr r0, _021D929C ; =ov5_021D92C4 + mov r3, #0x1e + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D92A0 ; =0x00006B6F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D92A4 ; =0x00006318 + lsl r2, r2, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D92A8 ; =0x00000BA4 + add r1, r4, #0 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #0x10 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + ldr r0, _021D92AC ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D9242 +_021D908C: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D90AE + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021D9242 +_021D90AE: + ldr r2, _021D92A8 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r1, r4, #0 + add r0, #0x4c + add r1, #0x1c + bl ov5_021D735C + cmp r0, #1 + bne _021D90C6 + cmp r6, #3 + beq _021D90C8 +_021D90C6: + b _021D9242 +_021D90C8: + ldr r0, _021D92AC ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021D9242 +_021D90D8: + mov r2, #0xa + mov r3, #1 + str r2, [sp] + str r3, [sp, #4] + sub r0, r3, #5 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #3 + str r0, [sp, #0x10] + ldr r0, _021D929C ; =ov5_021D92C4 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D92A8 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D911C + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D92A0 ; =0x00006B6F + ldr r0, [r0, #0x48] + ldr r3, _021D92A4 ; =0x00006318 + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021D911C: + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + mov r3, #2 + ldr r0, _021D92B0 ; =ov5_021D93DC + str r3, [sp] + str r0, [sp, #4] + ldr r1, _021D929C ; =ov5_021D92C4 + add r0, r5, #0 + mov r2, #0x14 + bl ov5_021D7568 + ldr r0, _021D92AC ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021D9242 +_021D914C: + mov r1, #6 + ldrsh r2, [r4, r1] + sub r0, r2, #1 + strh r0, [r4, #6] + cmp r2, #0 + bgt _021D9190 + add r0, r4, #0 + add r0, #0xb8 + ldr r2, [r0, #0] + sub r1, #0xe + asr r0, r2, #8 + lsr r0, r0, #0x17 + add r0, r2, r0 + asr r0, r0, #9 + lsl r2, r0, #2 + ldr r0, _021D92B4 ; =0x021F8CDC + ldr r0, [r0, r2] + cmp r0, r1 + bgt _021D9180 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #1 + bl ov5_021D92C4 + b _021D918A +_021D9180: + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D92C4 +_021D918A: + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D9190: + ldr r0, _021D92B8 ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D9242 + mov r0, #3 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0xc + mov r3, #4 + bl ov5_021D7238 + ldr r0, _021D92A8 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D91BE + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D91BE: + add r0, r4, #0 + mov r1, #0x14 + add r0, #0xb4 + str r1, [r0, #0] + ldr r1, _021D92AC ; =0x00000BA2 + mov r0, #4 + strh r0, [r5, r1] + mov r1, #0 + bl sub_0201FF0C + b _021D9242 +_021D91D4: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D91F6 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021D9242 +_021D91F6: + ldr r0, _021D92A8 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D9208 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74B8 + b _021D920A +_021D9208: + mov r0, #1 +_021D920A: + cmp r0, #1 + bne _021D9242 + cmp r6, #3 + bne _021D9242 + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D9242 + ldr r0, _021D92AC ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D9242 +_021D9224: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D923C + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D923C: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D9242: + ldr r0, _021D92AC ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D9294 + cmp r0, #0 + beq _021D9294 + add r0, r5, #0 + ldr r1, _021D92B0 ; =ov5_021D93DC + add r0, #0xc + bl ov5_021D6FF0 + add r0, r5, #0 + bl ov5_021D700C + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + add r0, #0xc + lsr r2, r0, #0x1f + lsl r1, r0, #0x18 + sub r1, r1, r2 + mov r0, #0x18 + ror r1, r0 + add r0, r4, #0 + add r1, r2, r1 + add r0, #0xbc + str r1, [r0, #0] + add r4, #0xbc + ldr r3, [r4, #0] + ldr r0, _021D92BC ; =0x000001FF + lsl r1, r3, #1 + add r2, r1, #0 + neg r1, r3 + and r2, r0 + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + and r0, r1 + add r1, r2, #0 + orr r1, r0 + ldr r0, _021D92C0 ; =0x04000018 + str r1, [r0, #0] +_021D9294: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D9298: .word 0x00000B98 +_021D929C: .word ov5_021D92C4 +_021D92A0: .word 0x00006B6F +_021D92A4: .word 0x00006318 +_021D92A8: .word 0x00000BA4 +_021D92AC: .word 0x00000BA2 +_021D92B0: .word ov5_021D93DC +_021D92B4: .word 0x021F8CDC +_021D92B8: .word 0x00000BA6 +_021D92BC: .word 0x000001FF +_021D92C0: .word 0x04000018 + thumb_func_end ov5_021D8FF8 + + thumb_func_start ov5_021D92C4 +ov5_021D92C4: ; 0x021D92C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + ldr r2, _021D93D0 ; =0x00000B98 + str r0, [sp] + ldr r0, [r0, r2] + add r2, r0, #0 + add r2, #0xb8 + ldr r2, [r2, #0] + add r3, r2, #1 + add r2, r0, #0 + add r2, #0xb8 + str r3, [r2, #0] + add r2, r0, #0 + add r2, #0xb8 + ldr r3, [r2, #0] + mov r2, #2 + lsl r2, r2, #0xa + cmp r3, r2 + blt _021D92F2 + add r2, r0, #0 + mov r3, #0 + add r2, #0xb8 + str r3, [r2, #0] +_021D92F2: + add r0, #0xb8 + ldr r2, [r0, #0] + asr r0, r2, #8 + lsr r0, r0, #0x17 + add r0, r2, r0 + asr r2, r0, #9 + mov r0, #0 + str r0, [sp, #8] + lsl r0, r1, #2 + str r0, [sp, #4] + cmp r0, #0 + ble _021D93CA + lsl r4, r2, #2 +_021D930C: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r6, r0, #0 + beq _021D93CA + ldr r5, [r6, #8] + mov r0, #0 + str r0, [r5, #0] + bl sub_0201D35C + mov r1, #6 + bl sub_020E2178 + add r1, #0x12 + str r1, [r5, #4] + bl sub_0201D35C + add r7, r0, #0 + mov r1, #3 + and r7, r1 + lsl r1, r7, #0x10 + ldr r0, [r6, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + ldr r1, _021D93D4 ; =0x021F8CDC + add r0, r7, #1 + ldr r1, [r1, r4] + mul r1, r0 + str r1, [r5, #0x10] + ldr r1, _021D93D8 ; =0x021F8CEC + ldr r1, [r1, r4] + mul r1, r0 + mov r0, #0 + str r1, [r5, #8] + str r0, [r5, #0xc] + cmp r7, #3 + bne _021D936E + ldr r0, _021D93D4 ; =0x021F8CDC + ldr r1, [r5, #0x10] + ldr r0, [r0, r4] + add r0, r1, r0 + str r0, [r5, #0x10] + ldr r0, _021D93D8 ; =0x021F8CEC + ldr r1, [r5, #8] + ldr r0, [r0, r4] + add r0, r1, r0 + str r0, [r5, #8] +_021D936E: + ldr r0, _021D93D4 ; =0x021F8CDC + add r1, r6, #0 + ldr r0, [r0, r4] + str r0, [r5, #0x14] + add r0, sp, #0xc + bl ov5_021D7010 + add r3, sp, #0xc + ldmia r3!, {r0, r1} + add r2, sp, #0x18 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bl sub_0201D35C + mov r1, #0x18 + bl sub_020E2178 + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + str r0, [sp, #0x18] + bl sub_0201D35C + mov r1, #0xa8 + bl sub_020E2178 + ldr r0, [sp, #0x18] + sub r1, #0x20 + lsl r0, r0, #0xc + str r0, [sp, #0x18] + str r1, [sp, #0x1c] + lsl r0, r1, #0xc + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [r6, #4] + add r1, sp, #0x18 + bl ov5_021D630C + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #8] + cmp r1, r0 + blt _021D930C +_021D93CA: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021D93D0: .word 0x00000B98 +_021D93D4: .word 0x021F8CDC +_021D93D8: .word 0x021F8CEC + thumb_func_end ov5_021D92C4 + + thumb_func_start ov5_021D93DC +ov5_021D93DC: ; 0x021D93DC + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + ldr r4, [r5, #8] + bl ov5_021D7010 + add r3, sp, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D9406 + cmp r0, #1 + beq _021D9458 + add sp, #0x18 + pop {r3, r4, r5, pc} +_021D9406: + ldr r0, [r4, #0x10] + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, [r4, #8] + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [r4, #0] + add r0, r1, #1 + str r0, [r4, #0] + ldr r0, [r4, #4] + cmp r1, r0 + ble _021D942A + mov r0, #1 + str r0, [r4, #0xc] +_021D942A: + ldr r0, [r4, #0] + lsr r2, r0, #0x1f + lsl r1, r0, #0x1e + sub r1, r1, r2 + mov r0, #0x1e + ror r1, r0 + add r0, r2, r1 + bne _021D944C + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r0, [r4, #8] + cmp r0, #1 + ble _021D944C + sub r0, r0, #1 + str r0, [r4, #8] +_021D944C: + ldr r0, [r5, #4] + add r1, sp, #0xc + bl ov5_021D630C + add sp, #0x18 + pop {r3, r4, r5, pc} +_021D9458: + add r0, r5, #0 + bl ov5_021D6FA8 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D93DC + + thumb_func_start ov5_021D9464 +ov5_021D9464: ; 0x021D9464 + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r0, _021D9670 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021D951E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D9484: ; jump table + .short _021D9490 - _021D9484 - 2 ; case 0 + .short _021D94E6 - _021D9484 - 2 ; case 1 + .short _021D9528 - _021D9484 - 2 ; case 2 + .short _021D9586 - _021D9484 - 2 ; case 3 + .short _021D95DE - _021D9484 - 2 ; case 4 + .short _021D9628 - _021D9484 - 2 ; case 5 +_021D9490: + mov r0, #0x14 + str r0, [sp] + mov r2, #2 + str r2, [sp, #4] + sub r0, r2, #4 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, _021D9674 ; =ov5_021D9690 + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r4, #0 + mov r3, #0x10 + bl ov5_021D7210 + ldr r0, _021D9678 ; =0x0000716F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D967C ; =0x00006B5A + lsl r2, r2, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D9680 ; =0x00000BA4 + add r1, r4, #0 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + mov r0, #0 + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D9684 ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021D9646 +_021D94E6: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D9506 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D9646 +_021D9506: + ldr r2, _021D9680 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D951E + cmp r6, #3 + beq _021D9520 +_021D951E: + b _021D9646 +_021D9520: + ldr r0, _021D9684 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D9646 +_021D9528: + mov r2, #0x14 + mov r3, #2 + str r2, [sp] + str r3, [sp, #4] + sub r0, r3, #4 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, _021D9674 ; =ov5_021D9690 + str r3, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + ldr r0, _021D9680 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D956A + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D9678 ; =0x0000716F + ldr r0, [r0, #0x48] + ldr r3, _021D967C ; =0x00006B5A + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74D4 +_021D956A: + mov r0, #1 + str r0, [sp] + ldr r0, _021D9688 ; =ov5_021D97C0 + ldr r1, _021D9674 ; =ov5_021D9690 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #0xa + bl ov5_021D7568 + ldr r0, _021D9684 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + b _021D9646 +_021D9586: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D95A2 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021D9690 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D95A2: + ldr r0, _021D968C ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021D9646 + mov r0, #9 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0x10 + mov r3, #6 + bl ov5_021D7238 + ldr r0, _021D9680 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D95D0 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D95D0: + mov r0, #0x14 + add r4, #0xb4 + str r0, [r4, #0] + ldr r0, _021D9684 ; =0x00000BA2 + mov r1, #4 + strh r1, [r5, r0] + b _021D9646 +_021D95DE: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D95FE + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D9646 +_021D95FE: + ldr r2, _021D9680 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D9646 + cmp r6, #3 + bne _021D9646 + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021D9646 + ldr r0, _021D9684 ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021D9646 +_021D9628: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D9640 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D9640: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D9646: + ldr r0, _021D9684 ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021D966C + cmp r0, #0 + beq _021D966C + add r0, r5, #0 + ldr r1, _021D9688 ; =ov5_021D97C0 + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C +_021D966C: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D9670: .word 0x00000B98 +_021D9674: .word ov5_021D9690 +_021D9678: .word 0x0000716F +_021D967C: .word 0x00006B5A +_021D9680: .word 0x00000BA4 +_021D9684: .word 0x00000BA2 +_021D9688: .word ov5_021D97C0 +_021D968C: .word 0x00000BA6 + thumb_func_end ov5_021D9464 + + thumb_func_start ov5_021D9690 +ov5_021D9690: ; 0x021D9690 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r1, #0 + str r1, [sp, #4] + cmp r0, #0 + bgt _021D96A4 + b _021D97BC +_021D96A4: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r4, r0, #0 + bne _021D96B2 + b _021D97BC +_021D96B2: + ldr r5, [r4, #8] + mov r0, #0 + str r0, [r5, #0] + bl sub_0201D35C + mov r1, #5 + bl sub_020E2178 + add r0, r1, #7 + str r0, [r5, #4] + bl sub_0201D35C + mov r1, #0xfa + lsl r1, r1, #2 + bl sub_020E2178 + lsr r2, r1, #0x1f + lsl r1, r1, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + bne _021D96E4 + mov r0, #1 + b _021D96E8 +_021D96E4: + mov r0, #0 + mvn r0, r0 +_021D96E8: + str r0, [r5, #8] + mov r0, #1 + str r0, [r5, #0xc] + bl sub_0201D35C + mov r1, #6 + bl sub_020E2178 + add r0, r1, #3 + str r0, [r5, #0x10] + bl sub_0201D35C + mov r1, #5 + bl sub_020E2178 + add r0, r1, #4 + str r0, [r5, #0x14] + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + str r1, [sp, #8] + add r0, sp, #0x10 + add r1, r4, #0 + bl ov5_021D7010 + bl sub_0201D35C + mov r1, #6 + lsl r1, r1, #6 + bl sub_020E2178 + sub r1, #0x40 + str r1, [sp, #0x10] + bl sub_0201D35C + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + ldr r0, [sp, #0x10] + sub r1, #8 + lsl r0, r0, #0xc + str r0, [sp, #0x10] + str r1, [sp, #0x14] + lsl r0, r1, #0xc + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #4] + add r1, sp, #0x10 + bl ov5_021D630C + ldr r1, [sp, #0x14] + ldr r0, [sp, #0x10] + asr r1, r1, #0xc + asr r0, r0, #0xc + str r1, [sp, #0x14] + mov r1, #3 + str r0, [sp, #0x10] + bl sub_020E1F6C + mov r1, #0x32 + sub r6, r1, r0 + mov r1, #0xce + sub r7, r1, r0 + bpl _021D977A + bl sub_0201D35C + neg r1, r7 + bl sub_020E2178 + sub r1, r6, r1 + b _021D9786 +_021D977A: + bl sub_0201D35C + add r1, r7, #0 + bl sub_020E2178 + add r1, r6, r1 +_021D9786: + ldr r0, [sp, #0x14] + cmp r6, r0 + bgt _021D9798 + cmp r1, r0 + blt _021D9798 + ldr r0, [r5, #4] + lsl r0, r0, #1 + str r0, [r5, #4] + b _021D97A2 +_021D9798: + bl sub_0201D35C + mov r1, #3 + and r0, r1 + str r0, [sp, #8] +_021D97A2: + ldr r1, [sp, #8] + ldr r0, [r4, #4] + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02021E50 + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #0xc] + cmp r1, r0 + bge _021D97BC + b _021D96A4 +_021D97BC: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021D9690 + + thumb_func_start ov5_021D97C0 +ov5_021D97C0: ; 0x021D97C0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r4, [r5, #8] + add r0, sp, #0 + add r1, r5, #0 + bl ov5_021D7010 + ldr r0, [r4, #0] + add r1, r0, #1 + str r1, [r4, #0] + ldr r0, [r4, #4] + cmp r1, r0 + blt _021D97E2 + add r0, r5, #0 + bl ov5_021D6FA8 +_021D97E2: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D97C0 + + thumb_func_start ov5_021D97E8 +ov5_021D97E8: ; 0x021D97E8 + push {r3, r4, r5, lr} + ldr r0, _021D9974 ; =0x00000B98 + add r5, r1, #0 + ldr r4, [r5, r0] + add r0, #0xa + ldrh r0, [r5, r0] + cmp r0, #5 + bhi _021D9854 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9804: ; jump table + .short _021D9810 - _021D9804 - 2 ; case 0 + .short _021D9834 - _021D9804 - 2 ; case 1 + .short _021D987E - _021D9804 - 2 ; case 2 + .short _021D98BE - _021D9804 - 2 ; case 3 + .short _021D9944 - _021D9804 - 2 ; case 4 + .short _021D996C - _021D9804 - 2 ; case 5 +_021D9810: + mov r0, #0 + str r0, [r4, #0] + mov r1, #0x10 + str r0, [r4, #4] + bl ov5_021D64E4 + mov r1, #2 + ldr r0, _021D9978 ; =0x04000018 + lsl r1, r1, #0x14 + str r1, [r0, #0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021D997C ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + pop {r3, r4, r5, pc} +_021D9834: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + cmp r0, #0xa + blt _021D9854 + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #4] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r4, #4] + bl ov5_021D64E4 + ldr r0, [r4, #4] + cmp r0, #0xa + bge _021D9856 +_021D9854: + b _021D9972 +_021D9856: + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + add r1, #0xa + str r1, [r4, #8] + bl sub_0201D35C + mov r1, #3 + bl sub_020E2178 + add r0, r1, #5 + str r0, [r4, #0xc] + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, _021D997C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + pop {r3, r4, r5, pc} +_021D987E: + mov r0, #0 + str r0, [r4, #0] + mov r0, #0xa + str r0, [r4, #4] + mov r1, #2 + ldr r0, _021D9978 ; =0x04000018 + lsl r1, r1, #0x14 + str r1, [r0, #0] + ldr r0, [r4, #4] + mov r1, #0x10 + bl ov5_021D64E4 + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + add r1, #0xa + str r1, [r4, #8] + bl sub_0201D35C + mov r1, #3 + bl sub_020E2178 + add r0, r1, #5 + str r0, [r4, #0xc] + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, _021D997C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + pop {r3, r4, r5, pc} +_021D98BE: + ldr r0, [r4, #0] + add r1, r0, #1 + str r1, [r4, #0] + ldr r0, [r4, #8] + cmp r1, r0 + blt _021D992C + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #0x10] + cmp r0, #1 + ldr r0, [r4, #4] + bne _021D9902 + sub r1, r0, #1 + str r1, [r4, #4] + ldr r0, [r4, #0xc] + cmp r1, r0 + bgt _021D992C + bl sub_0201D35C + mov r1, #0xf + bl sub_020E2178 + add r1, #0xa + str r1, [r4, #8] + bl sub_0201D35C + mov r1, #3 + bl sub_020E2178 + add r0, r1, #7 + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x10] + b _021D992C +_021D9902: + add r1, r0, #1 + str r1, [r4, #4] + ldr r0, [r4, #0xc] + cmp r1, r0 + blt _021D992C + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + add r1, #0xa + str r1, [r4, #8] + bl sub_0201D35C + mov r1, #3 + bl sub_020E2178 + add r0, r1, #5 + str r0, [r4, #0xc] + mov r0, #1 + str r0, [r4, #0x10] +_021D992C: + ldr r0, [r4, #4] + mov r1, #0x10 + bl ov5_021D64E4 + ldr r0, _021D9980 ; =0x00000BA6 + ldrh r1, [r5, r0] + cmp r1, #5 + bne _021D9972 + mov r1, #4 + sub r0, r0, #4 + strh r1, [r5, r0] + pop {r3, r4, r5, pc} +_021D9944: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + cmp r0, #0xa + blt _021D9972 + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r4, #4] + mov r1, #0x10 + sub r0, r0, #1 + str r0, [r4, #4] + bl ov5_021D64E4 + ldr r0, [r4, #4] + cmp r0, #0 + bgt _021D9972 + ldr r0, _021D997C ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + pop {r3, r4, r5, pc} +_021D996C: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021D9972: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D9974: .word 0x00000B98 +_021D9978: .word 0x04000018 +_021D997C: .word 0x00000BA2 +_021D9980: .word 0x00000BA6 + thumb_func_end ov5_021D97E8 + + thumb_func_start ov5_021D9984 +ov5_021D9984: ; 0x021D9984 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0xa + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + sub r0, r0, #3 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r2, #1 + add r4, r1, #0 + ldr r0, _021D99F8 ; =ov5_021DA0A8 + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r4, #0 + add r1, r5, #0 + mov r3, #0xf + bl ov5_021D7210 + ldr r0, _021D99FC ; =0x00006F6F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021D9A00 ; =0x00006B5A + add r1, r4, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021D9A04 ; =0x00000BA4 + lsl r2, r2, #2 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r4, #0xbc + str r1, [r4, #0] + ldr r1, _021D9A08 ; =0x0000063B + add r0, r5, #0 + bl ov5_021DB4B8 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_021D99F8: .word ov5_021DA0A8 +_021D99FC: .word 0x00006F6F +_021D9A00: .word 0x00006B5A +_021D9A04: .word 0x00000BA4 +_021D9A08: .word 0x0000063B + thumb_func_end ov5_021D9984 + + thumb_func_start ov5_021D9A0C +ov5_021D9A0C: ; 0x021D9A0C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D9A32 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D9A4E +_021D9A32: + ldr r2, _021D9A54 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r4, #0x1c + add r0, #0x4c + add r1, r4, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D9A4E + cmp r6, #3 + bne _021D9A4E + mov r0, #1 + pop {r4, r5, r6, pc} +_021D9A4E: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_021D9A54: .word 0x00000BA4 + thumb_func_end ov5_021D9A0C + + thumb_func_start ov5_021D9A58 +ov5_021D9A58: ; 0x021D9A58 + push {r3, r4, r5, lr} + sub sp, #0x18 + mov r2, #0xa + str r2, [sp] + mov r3, #0 + add r5, r0, #0 + str r3, [sp, #4] + sub r0, r3, #3 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _021D9AD4 ; =ov5_021DA0A8 + add r4, r1, #0 + str r0, [sp, #0x14] + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D7210 + ldr r0, _021D9AD8 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D9AA6 + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D9ADC ; =0x00006F6F + ldr r0, [r0, #0x48] + ldr r3, _021D9AE0 ; =0x00006B5A + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021D9AA6: + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r4, #0xbc + str r1, [r4, #0] + mov r0, #1 + str r0, [sp] + ldr r0, _021D9AE4 ; =ov5_021DA1A8 + ldr r1, _021D9AD4 ; =ov5_021DA0A8 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #5 + bl ov5_021D7568 + ldr r1, _021D9AE8 ; =0x0000063B + add r0, r5, #0 + bl ov5_021DB4B8 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_021D9AD4: .word ov5_021DA0A8 +_021D9AD8: .word 0x00000BA4 +_021D9ADC: .word 0x00006F6F +_021D9AE0: .word 0x00006B5A +_021D9AE4: .word ov5_021DA1A8 +_021D9AE8: .word 0x0000063B + thumb_func_end ov5_021D9A58 + + thumb_func_start ov5_021D9AEC +ov5_021D9AEC: ; 0x021D9AEC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x4b + add r0, r0, #1 + lsl r1, r1, #2 + bl sub_020E1F6C + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021D9B24 + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021DA0A8 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021D9B24: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021D9AEC + + thumb_func_start ov5_021D9B28 +ov5_021D9B28: ; 0x021D9B28 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + add r4, r1, #0 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf + mov r3, #3 + bl ov5_021D7238 + ldr r0, _021D9B64 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D9B54 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021D9B54: + mov r0, #0 + add r4, #0xb4 + str r0, [r4, #0] + add r0, r5, #0 + bl ov5_021DB4E4 + pop {r3, r4, r5, pc} + nop +_021D9B64: .word 0x00000BA4 + thumb_func_end ov5_021D9B28 + + thumb_func_start ov5_021D9B68 +ov5_021D9B68: ; 0x021D9B68 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021D9B8E + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + add r4, #0xb4 + sub r0, r0, #1 + str r0, [r4, #0] + b _021D9BB6 +_021D9B8E: + ldr r0, _021D9BBC ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021D9BA0 + add r4, #0x1c + add r0, r4, #0 + bl ov5_021D74B8 + b _021D9BA2 +_021D9BA0: + mov r0, #1 +_021D9BA2: + cmp r0, #1 + bne _021D9BB6 + cmp r6, #3 + bne _021D9BB6 + ldr r0, [r5, #0x40] + add r5, #0xc + cmp r0, r5 + bne _021D9BB6 + mov r0, #1 + pop {r4, r5, r6, pc} +_021D9BB6: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_021D9BBC: .word 0x00000BA4 + thumb_func_end ov5_021D9B68 + + thumb_func_start ov5_021D9BC0 +ov5_021D9BC0: ; 0x021D9BC0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _021D9BE8 ; =0x00000BA4 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9BDE + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r1, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D9BDE: + ldr r0, [r4, #4] + bl ov5_021D69B8 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_021D9BE8: .word 0x00000BA4 + thumb_func_end ov5_021D9BC0 + + thumb_func_start ov5_021D9BEC +ov5_021D9BEC: ; 0x021D9BEC + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D9C18 ; =0x00000BA2 + ldrh r0, [r4, r0] + cmp r0, #5 + beq _021D9C16 + cmp r0, #0 + beq _021D9C16 + add r0, r4, #0 + ldr r1, _021D9C1C ; =ov5_021DA1A8 + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r4, #0 + bl ov5_021D700C +_021D9C16: + pop {r4, pc} + ; .align 2, 0 +_021D9C18: .word 0x00000BA2 +_021D9C1C: .word ov5_021DA1A8 + thumb_func_end ov5_021D9BEC + + thumb_func_start ov5_021D9C20 +ov5_021D9C20: ; 0x021D9C20 + push {r4, r5, r6, lr} + sub sp, #8 + ldr r0, _021D9DE8 ; =0x00000B98 + add r4, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r4, r1] + add r6, r2, #0 + ldr r5, [r4, r0] + cmp r1, #5 + bls _021D9C38 + b _021D9DE2 +_021D9C38: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D9C44: ; jump table + .short _021D9C50 - _021D9C44 - 2 ; case 0 + .short _021D9CA6 - _021D9C44 - 2 ; case 1 + .short _021D9CB0 - _021D9C44 - 2 ; case 2 + .short _021D9D06 - _021D9C44 - 2 ; case 3 + .short _021D9DA2 - _021D9C44 - 2 ; case 4 + .short _021D9DBC - _021D9C44 - 2 ; case 5 +_021D9C50: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9C9C + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D9DEC ; =0x00006FAF + ldr r0, [r0, #0x48] + mov r1, #5 + mov r3, #0 + bl ov5_021D7384 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, _021D9DF0 ; =0x021F8E14 + ldr r0, [r0, #0x48] + bl ov5_021D585C + mov r1, #0x10 + add r0, r6, #0 + sub r1, r1, r6 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + ldr r1, [sp, #0x18] + add r0, #0x98 + str r1, [r0, #0] + mov r0, #0 + add r5, #0x9c + str r0, [r5, #0] +_021D9C9C: + ldr r0, _021D9DF4 ; =0x00000BA2 + mov r1, #1 + add sp, #8 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9CA6: + mov r1, #3 + add r0, #0xa + add sp, #8 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9CB0: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9CFC + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021D9DEC ; =0x00006FAF + ldr r0, [r0, #0x48] + mov r1, #5 + mov r3, #0 + bl ov5_021D7384 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, _021D9DF0 ; =0x021F8E14 + ldr r0, [r0, #0x48] + bl ov5_021D585C + mov r1, #0x10 + add r0, r6, #0 + sub r1, r1, r6 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + ldr r1, [sp, #0x18] + add r0, #0x98 + str r1, [r0, #0] + mov r0, #0 + add r5, #0x9c + str r0, [r5, #0] +_021D9CFC: + ldr r0, _021D9DF4 ; =0x00000BA2 + mov r1, #3 + add sp, #8 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9D06: + add r0, r5, #0 + add r0, #0x9c + ldr r0, [r0, #0] + cmp r0, #0 + bne _021D9D32 + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + sub r1, r0, r3 + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + bgt _021D9D7A + add r0, r5, #0 + mov r1, #1 + add r0, #0x9c + str r1, [r0, #0] + b _021D9D7A +_021D9D32: + cmp r0, #1 + bne _021D9D5A + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x98 + ldr r1, [r0, #0] + ldr r0, [sp, #0x1c] + cmp r1, r0 + blo _021D9D7A + add r0, r5, #0 + mov r1, #2 + add r0, #0x9c + str r1, [r0, #0] + b _021D9D7A +_021D9D5A: + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0x98 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x98 + ldr r0, [r0, #0] + cmp r0, #0 + bgt _021D9D7A + add r0, r5, #0 + mov r1, #1 + add r0, #0x9c + str r1, [r0, #0] +_021D9D7A: + add r5, #0x98 + ldr r1, [r5, #0] + asr r0, r1, #6 + lsr r0, r0, #0x19 + add r0, r1, r0 + asr r0, r0, #7 + add r0, r6, r0 + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + ldr r0, _021D9DF8 ; =0x00000BA6 + ldrh r1, [r4, r0] + cmp r1, #5 + bne _021D9DE2 + mov r1, #4 + sub r0, r0, #4 + add sp, #8 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9DA2: + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _021D9DF4 ; =0x00000BA2 + mov r1, #5 + add sp, #8 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9DBC: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9DDC + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + ldr r0, [r0, #0x48] + add r3, r2, #0 + bl ov5_021D57FC +_021D9DDC: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021D9DE2: + add sp, #8 + pop {r4, r5, r6, pc} + nop +_021D9DE8: .word 0x00000B98 +_021D9DEC: .word 0x00006FAF +_021D9DF0: .word 0x021F8E14 +_021D9DF4: .word 0x00000BA2 +_021D9DF8: .word 0x00000BA6 + thumb_func_end ov5_021D9C20 + + thumb_func_start ov5_021D9DFC +ov5_021D9DFC: ; 0x021D9DFC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r2, #0 + ldr r2, _021D9F08 ; =0x00000BA2 + add r4, r0, #0 + ldrh r0, [r4, r2] + add r5, r1, #0 + cmp r0, #5 + bhi _021D9F02 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9E1A: ; jump table + .short _021D9E26 - _021D9E1A - 2 ; case 0 + .short _021D9E56 - _021D9E1A - 2 ; case 1 + .short _021D9E70 - _021D9E1A - 2 ; case 2 + .short _021D9EA0 - _021D9E1A - 2 ; case 3 + .short _021D9EC4 - _021D9E1A - 2 ; case 4 + .short _021D9EE4 - _021D9E1A - 2 ; case 5 +_021D9E26: + str r3, [sp] + add r0, sp, #0x10 + ldrh r0, [r0, #0x10] + add r5, #0x30 + str r0, [sp, #4] + ldr r0, [sp, #0x24] + str r0, [sp, #8] + add r0, r2, #2 + ldrh r0, [r4, r0] + mov r2, #0x41 + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r3, r6, #0 + ldr r2, [r2, #0x48] + bl ov5_021D7308 + ldr r0, _021D9F08 ; =0x00000BA2 + mov r1, #1 + add sp, #0x10 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9E56: + add r2, r2, #2 + ldrh r2, [r4, r2] + add r5, #0x30 + add r0, r5, #0 + bl ov5_021D735C + cmp r0, #1 + bne _021D9F02 + ldr r0, _021D9F08 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9E70: + add r0, r2, #2 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9E96 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r2, r3, #0 + ldr r0, [r0, #0x48] + add r3, sp, #0x10 + str r0, [r5, #0] + ldrh r3, [r3, #0x10] + add r1, r6, #0 + bl ov5_021D7384 + add r0, r5, #0 + bl ov5_021D74D4 +_021D9E96: + ldr r0, _021D9F08 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9EA0: + add r0, r2, #4 + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021D9F02 + add r0, r2, #2 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9EBA + ldr r1, [sp, #0x28] + add r0, r5, #0 + mov r2, #0 + bl ov5_021D749C +_021D9EBA: + ldr r0, _021D9F08 ; =0x00000BA2 + mov r1, #4 + add sp, #0x10 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9EC4: + add r0, r2, #2 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9ED4 + add r0, r5, #0 + bl ov5_021D74B8 + b _021D9ED6 +_021D9ED4: + mov r0, #1 +_021D9ED6: + cmp r0, #1 + bne _021D9F02 + ldr r0, _021D9F08 ; =0x00000BA2 + mov r1, #5 + add sp, #0x10 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021D9EE4: + add r0, r2, #2 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021D9EFC + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021D9EFC: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021D9F02: + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D9F08: .word 0x00000BA2 + thumb_func_end ov5_021D9DFC + + thumb_func_start ov5_021D9F0C +ov5_021D9F0C: ; 0x021D9F0C + push {r3, r4, r5, lr} + ldr r0, _021D9FEC ; =0x00000B98 + add r4, r1, #0 + ldr r5, [r4, r0] + add r0, #0xa + ldrh r0, [r4, r0] + cmp r0, #5 + bhi _021D9FE0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D9F28: ; jump table + .short _021D9F34 - _021D9F28 - 2 ; case 0 + .short _021D9F58 - _021D9F28 - 2 ; case 1 + .short _021D9F6C - _021D9F28 - 2 ; case 2 + .short _021D9F90 - _021D9F28 - 2 ; case 3 + .short _021D9FBA - _021D9F28 - 2 ; case 4 + .short _021D9FCE - _021D9F28 - 2 ; case 5 +_021D9F34: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9984 + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x11 + bl ov5_021D6418 + ldr r0, [r4, #0] + mov r1, #3 + mov r2, #0x11 + bl ov5_021D6418 + ldr r0, _021D9FF0 ; =0x00000BA2 + mov r1, #1 + strh r1, [r4, r0] + b _021D9FE0 +_021D9F58: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9A0C + cmp r0, #0 + beq _021D9FE0 + ldr r0, _021D9FF0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021D9FE0 +_021D9F6C: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9A58 + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x11 + bl ov5_021D6418 + ldr r0, [r4, #0] + mov r1, #3 + mov r2, #0x11 + bl ov5_021D6418 + ldr r0, _021D9FF0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021D9FE0 +_021D9F90: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9AEC + ldr r0, _021D9FF4 ; =0x00000BA6 + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021D9FE0 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9B28 + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0x11 + bl ov5_021D6418 + ldr r0, _021D9FF0 ; =0x00000BA2 + mov r1, #4 + strh r1, [r4, r0] + b _021D9FE0 +_021D9FBA: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9B68 + cmp r0, #0 + beq _021D9FE0 + ldr r0, _021D9FF0 ; =0x00000BA2 + mov r1, #5 + strh r1, [r4, r0] + b _021D9FE0 +_021D9FCE: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9BC0 + ldr r0, [r4, #0] + mov r1, #8 + mov r2, #0x11 + bl ov5_021D6418 +_021D9FE0: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9BEC + pop {r3, r4, r5, pc} + nop +_021D9FEC: .word 0x00000B98 +_021D9FF0: .word 0x00000BA2 +_021D9FF4: .word 0x00000BA6 + thumb_func_end ov5_021D9F0C + + thumb_func_start ov5_021D9FF8 +ov5_021D9FF8: ; 0x021D9FF8 + push {r3, r4, r5, lr} + ldr r0, _021DA09C ; =0x00000B98 + add r4, r1, #0 + ldr r5, [r4, r0] + add r0, #0xa + ldrh r0, [r4, r0] + cmp r0, #5 + bhi _021DA090 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA014: ; jump table + .short _021DA020 - _021DA014 - 2 ; case 0 + .short _021DA030 - _021DA014 - 2 ; case 1 + .short _021DA044 - _021DA014 - 2 ; case 2 + .short _021DA054 - _021DA014 - 2 ; case 3 + .short _021DA074 - _021DA014 - 2 ; case 4 + .short _021DA088 - _021DA014 - 2 ; case 5 +_021DA020: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9984 + ldr r0, _021DA0A0 ; =0x00000BA2 + mov r1, #1 + strh r1, [r4, r0] + b _021DA090 +_021DA030: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9A0C + cmp r0, #0 + beq _021DA090 + ldr r0, _021DA0A0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021DA090 +_021DA044: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9A58 + ldr r0, _021DA0A0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021DA090 +_021DA054: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9AEC + ldr r0, _021DA0A4 ; =0x00000BA6 + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021DA090 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9B28 + ldr r0, _021DA0A0 ; =0x00000BA2 + mov r1, #4 + strh r1, [r4, r0] + b _021DA090 +_021DA074: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9B68 + cmp r0, #0 + beq _021DA090 + ldr r0, _021DA0A0 ; =0x00000BA2 + mov r1, #5 + strh r1, [r4, r0] + b _021DA090 +_021DA088: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9BC0 +_021DA090: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021D9BEC + pop {r3, r4, r5, pc} + nop +_021DA09C: .word 0x00000B98 +_021DA0A0: .word 0x00000BA2 +_021DA0A4: .word 0x00000BA6 + thumb_func_end ov5_021D9FF8 + + thumb_func_start ov5_021DA0A8 +ov5_021DA0A8: ; 0x021DA0A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r1, [sp, #4] + ldr r1, _021DA19C ; =0x00000B98 + str r0, [sp] + ldr r7, [r0, r1] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + cmp r0, #0 + ble _021DA198 +_021DA0BE: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r4, r0, #0 + beq _021DA198 + ldr r5, [r4, #8] + bl sub_0201D35C + mov r1, #0 + str r1, [r5, #0] + mov r1, #3 + add r6, r0, #0 + bl sub_020E2178 + str r1, [sp, #8] + lsl r1, r1, #0x10 + ldr r0, [r4, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + ldr r0, [sp, #8] + mov r1, #0x17 + add r0, r0, #1 + mvn r1, r1 + mul r1, r0 + str r1, [r5, #0x10] + mov r1, #0x18 + mul r1, r0 + add r0, r7, #0 + str r1, [r5, #8] + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x3c + bl sub_020E1F6C + lsl r2, r0, #2 + ldr r0, _021DA1A0 ; =0x021F8CFC + ldr r1, [r5, #0x10] + ldr r0, [r0, r2] + mul r0, r1 + str r0, [r5, #0x10] + add r0, r7, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x3c + bl sub_020E1F6C + lsl r2, r0, #2 + ldr r0, _021DA1A0 ; =0x021F8CFC + ldr r1, [r5, #8] + ldr r0, [r0, r2] + mul r0, r1 + str r0, [r5, #8] + mov r0, #0 + str r0, [r5, #0xc] + mov r0, #3 + and r0, r6 + str r0, [r5, #4] + add r0, r7, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x3c + bl sub_020E1F6C + add r1, r0, #0 + lsl r2, r1, #2 + ldr r1, _021DA1A0 ; =0x021F8CFC + ldr r0, [r5, #4] + ldr r1, [r1, r2] + bl sub_020E1F6C + str r0, [r5, #4] + add r0, sp, #0x10 + add r1, r4, #0 + bl ov5_021D7010 + add r3, sp, #0x10 + ldmia r3!, {r0, r1} + add r2, sp, #0x1c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #0x30 + str r0, [r2, #0] + ldr r0, _021DA1A4 ; =0x000001FF + and r0, r6 + str r0, [sp, #0x1c] + add r0, r6, #0 + bl sub_020E2178 + mov r0, #0 + str r0, [sp, #0x24] + ldr r0, [sp, #0x1c] + sub r1, #0x50 + lsl r0, r0, #0xc + str r0, [sp, #0x1c] + str r1, [sp, #0x20] + lsl r0, r1, #0xc + str r0, [sp, #0x20] + ldr r0, [r4, #4] + add r1, sp, #0x1c + bl ov5_021D630C + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #0xc] + cmp r1, r0 + blt _021DA0BE +_021DA198: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DA19C: .word 0x00000B98 +_021DA1A0: .word 0x021F8CFC +_021DA1A4: .word 0x000001FF + thumb_func_end ov5_021DA0A8 + + thumb_func_start ov5_021DA1A8 +ov5_021DA1A8: ; 0x021DA1A8 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + ldr r4, [r5, #8] + bl ov5_021D7010 + add r3, sp, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021DA1D6 + cmp r0, #1 + beq _021DA226 + cmp r0, #2 + beq _021DA238 + add sp, #0x18 + pop {r3, r4, r5, pc} +_021DA1D6: + ldr r0, [r4, #0x10] + ldr r1, [sp, #0xc] + lsl r0, r0, #0xd + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, [r4, #8] + ldr r1, [sp, #0x10] + lsl r0, r0, #0xd + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r0, #2 + str r1, [r4, #0] + ldr r0, [r4, #4] + cmp r1, r0 + ble _021DA21A + bl sub_0201D35C + mov r1, #0xa + bl sub_020E2178 + cmp r1, #5 + bhs _021DA20A + mov r0, #2 + str r0, [r4, #0xc] + b _021DA21A +_021DA20A: + mov r0, #1 + str r0, [r4, #0xc] + mov r0, #4 + str r0, [r4, #0] + ldr r0, [r5, #4] + mov r1, #3 + bl sub_02021E50 +_021DA21A: + ldr r0, [r5, #4] + add r1, sp, #0xc + bl ov5_021D630C + add sp, #0x18 + pop {r3, r4, r5, pc} +_021DA226: + ldr r1, [r4, #0] + sub r0, r1, #1 + str r0, [r4, #0] + cmp r1, #0 + bgt _021DA23E + mov r0, #2 + add sp, #0x18 + str r0, [r4, #0xc] + pop {r3, r4, r5, pc} +_021DA238: + add r0, r5, #0 + bl ov5_021D6FA8 +_021DA23E: + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DA1A8 + + thumb_func_start ov5_021DA244 +ov5_021DA244: ; 0x021DA244 + push {r4, r5, r6, lr} + sub sp, #0x20 + ldr r0, _021DA578 ; =0x00000B98 + add r5, r1, #0 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r5, r2] + ldr r4, [r5, r0] + cmp r2, #5 + bhi _021DA31E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DA264: ; jump table + .short _021DA270 - _021DA264 - 2 ; case 0 + .short _021DA2E4 - _021DA264 - 2 ; case 1 + .short _021DA330 - _021DA264 - 2 ; case 2 + .short _021DA3B2 - _021DA264 - 2 ; case 3 + .short _021DA41A - _021DA264 - 2 ; case 4 + .short _021DA46A - _021DA264 - 2 ; case 5 +_021DA270: + mov r2, #1 + str r2, [sp] + mov r0, #6 + str r0, [sp, #4] + sub r0, r0, #7 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _021DA57C ; =ov5_021DA5A0 + mov r3, #0xc + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] + ldr r0, _021DA580 ; =0x00006F2F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021DA584 ; =0x00003A94 + add r1, r4, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021DA588 ; =0x00000BA4 + lsl r2, r2, #2 + ldrh r0, [r5, r0] + add r1, #0x1c + str r0, [sp, #0xc] + ldr r3, [r5, #0] + add r0, r4, #0 + ldr r2, [r3, r2] + add r0, #0x4c + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] + ldr r0, _021DA58C ; =0x00000BA2 + mov r1, #1 + strh r1, [r5, r0] + b _021DA488 +_021DA2E4: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021DA306 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021DA488 +_021DA306: + ldr r2, _021DA588 ; =0x00000BA4 + add r0, r4, #0 + ldrh r2, [r5, r2] + add r1, r4, #0 + add r0, #0x4c + add r1, #0x1c + bl ov5_021D735C + cmp r0, #1 + bne _021DA31E + cmp r6, #3 + beq _021DA320 +_021DA31E: + b _021DA488 +_021DA320: + ldr r0, _021DA58C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021DA488 +_021DA330: + mov r2, #1 + mov r3, #6 + str r2, [sp] + str r3, [sp, #4] + sub r0, r3, #7 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, _021DA57C ; =ov5_021DA5A0 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov5_021D7210 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] + ldr r0, _021DA588 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021DA38E + mov r0, #0x41 + ldr r1, [r5, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021DA580 ; =0x00006F2F + ldr r0, [r0, #0x48] + ldr r3, _021DA584 ; =0x00003A94 + mov r1, #3 + str r0, [r4, #0x1c] + bl ov5_021D7384 + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74D4 +_021DA38E: + mov r0, #0x10 + str r0, [sp] + ldr r0, _021DA590 ; =ov5_021DA6BC + ldr r1, _021DA57C ; =ov5_021DA5A0 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x14 + mov r3, #2 + bl ov5_021D7568 + ldr r0, _021DA58C ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021DA488 +_021DA3B2: + mov r0, #6 + ldrsh r1, [r4, r0] + sub r0, r1, #1 + strh r0, [r4, #6] + cmp r1, #0 + bgt _021DA3CE + mov r1, #4 + ldrsh r1, [r4, r1] + add r0, r5, #0 + bl ov5_021DA5A0 + mov r0, #8 + ldrsh r0, [r4, r0] + strh r0, [r4, #6] +_021DA3CE: + ldr r0, _021DA594 ; =0x00000BA6 + ldrh r0, [r5, r0] + cmp r0, #5 + bne _021DA488 + mov r0, #0 + mvn r0, r0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0xc + mov r3, #1 + bl ov5_021D7238 + ldr r0, _021DA588 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021DA3FC + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021DA3FC: + add r0, r4, #0 + mov r1, #9 + add r0, #0xb4 + str r1, [r0, #0] + ldr r1, _021DA58C ; =0x00000BA2 + mov r0, #4 + strh r0, [r5, r1] + add r1, r4, #0 + mov r2, #1 + add r1, #0xc8 + str r2, [r1, #0] + mov r1, #0 + bl sub_0201FF0C + b _021DA488 +_021DA41A: + add r0, r4, #0 + bl ov5_021D7244 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #0 + ble _021DA43C + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021DA488 +_021DA43C: + ldr r0, _021DA588 ; =0x00000BA4 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021DA44E + add r0, r4, #0 + add r0, #0x1c + bl ov5_021D74B8 + b _021DA450 +_021DA44E: + mov r0, #1 +_021DA450: + cmp r0, #1 + bne _021DA488 + cmp r6, #3 + bne _021DA488 + add r0, r5, #0 + ldr r1, [r5, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021DA488 + ldr r0, _021DA58C ; =0x00000BA2 + mov r1, #5 + strh r1, [r5, r0] + b _021DA488 +_021DA46A: + add r0, #0xc + ldrh r0, [r5, r0] + cmp r0, #0 + beq _021DA482 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x1c] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021DA482: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021DA488: + ldr r0, _021DA58C ; =0x00000BA2 + ldrh r0, [r5, r0] + cmp r0, #5 + beq _021DA574 + cmp r0, #0 + beq _021DA574 + add r0, r5, #0 + ldr r1, _021DA590 ; =ov5_021DA6BC + add r0, #0xc + bl ov5_021D6FF0 + add r0, r5, #0 + add r1, sp, #0x1c + add r2, sp, #0x18 + bl ov5_021D717C + add r0, r5, #0 + bl ov5_021D700C + add r0, r4, #0 + add r0, #0xbc + ldr r1, [r0, #0] + asr r0, r1, #0x10 + lsl r0, r0, #0x10 + asr r2, r0, #0x10 + lsl r0, r1, #0x10 + ldr r1, [sp, #0x1c] + asr r0, r0, #0x10 + add r1, r2, r1 + lsl r1, r1, #0x10 + ldr r2, [sp, #0x18] + asr r5, r1, #0x10 + lsl r1, r2, #2 + add r1, r2, r1 + sub r0, r0, r1 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + cmp r5, #0 + bge _021DA4E2 + mov r1, #1 + lsl r1, r1, #8 + add r1, r5, r1 + lsl r1, r1, #0x10 + asr r5, r1, #0x10 + b _021DA4F0 +_021DA4E2: + mov r1, #1 + lsl r1, r1, #8 + cmp r5, r1 + blt _021DA4F0 + sub r1, r5, r1 + lsl r1, r1, #0x10 + asr r5, r1, #0x10 +_021DA4F0: + cmp r0, #0 + bge _021DA4FE + mov r1, #2 + lsl r1, r1, #0xa + add r0, r0, r1 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 +_021DA4FE: + add r1, r4, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r2, r1, #2 + add r1, r4, #0 + add r1, #0xc4 + str r2, [r1, #0] + add r1, r4, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + cmp r1, #0x3c + ble _021DA530 + add r1, r4, #0 + add r5, #0x20 + mov r2, #0 + add r1, #0xc4 + str r2, [r1, #0] + lsr r3, r5, #0x1f + lsl r2, r5, #0x18 + sub r2, r2, r3 + mov r1, #0x18 + ror r2, r1 + add r1, r3, r2 + lsl r1, r1, #0x10 + asr r5, r1, #0x10 +_021DA530: + add r0, r0, #2 + lsr r2, r0, #0x1f + lsl r1, r0, #0x15 + sub r1, r1, r2 + mov r0, #0x15 + ror r1, r0 + add r0, r2, r1 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + neg r0, r6 + mov r1, #5 + bl sub_020E1F6C + ldr r2, _021DA598 ; =0x000001FF + add r1, r5, #0 + lsl r3, r0, #0x10 + lsl r0, r2, #0x10 + and r1, r2 + and r0, r3 + orr r1, r0 + ldr r0, _021DA59C ; =0x04000018 + str r1, [r0, #0] + add r0, r4, #0 + lsl r1, r5, #0x10 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + ldr r1, [r0, #0] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + orr r0, r1 + add r4, #0xbc + str r0, [r4, #0] +_021DA574: + add sp, #0x20 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DA578: .word 0x00000B98 +_021DA57C: .word ov5_021DA5A0 +_021DA580: .word 0x00006F2F +_021DA584: .word 0x00003A94 +_021DA588: .word 0x00000BA4 +_021DA58C: .word 0x00000BA2 +_021DA590: .word ov5_021DA6BC +_021DA594: .word 0x00000BA6 +_021DA598: .word 0x000001FF +_021DA59C: .word 0x04000018 + thumb_func_end ov5_021DA244 + + thumb_func_start ov5_021DA5A0 +ov5_021DA5A0: ; 0x021DA5A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r7, r1, #0 + ldr r1, _021DA6B4 ; =0x00000B98 + str r0, [sp] + ldr r0, [r0, r1] + str r0, [sp, #0x10] + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021DA5B8 + lsl r7, r7, #1 +_021DA5B8: + mov r6, #0 + cmp r7, #0 + ble _021DA6AE + ldr r0, [sp, #0x10] + str r0, [sp, #0xc] + add r0, #0xb8 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + str r0, [sp, #8] + add r0, #0xc8 + str r0, [sp, #8] + lsr r0, r7, #0x1f + add r0, r7, r0 + asr r0, r0, #1 + str r0, [sp, #4] +_021DA5D6: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r4, r0, #0 + beq _021DA6AE + ldr r5, [r4, #8] + bl sub_0201D35C + mov r1, #3 + and r1, r0 + lsl r1, r1, #0x10 + ldr r0, [r4, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + mov r0, #0xa + str r0, [r5, #0x10] + mov r0, #0 + str r0, [r5, #0x14] + bl sub_0201D35C + lsr r1, r0, #0x1f + lsl r2, r0, #0x1f + sub r2, r2, r1 + mov r0, #0x1f + ror r2, r0 + add r0, r1, r2 + bne _021DA614 + mov r0, #1 + b _021DA618 +_021DA614: + mov r0, #0 + mvn r0, r0 +_021DA618: + str r0, [r5, #4] + bl sub_0201D35C + mov r0, #1 + str r0, [r5, #0xc] + ldr r0, [sp, #0xc] + str r0, [r5, #0] + ldr r0, [sp, #8] + str r0, [r5, #0x18] + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + add r1, #0xa + str r1, [r5, #0x1c] + add r0, sp, #0x14 + add r1, r4, #0 + bl ov5_021D7010 + add r3, sp, #0x14 + ldmia r3!, {r0, r1} + add r2, sp, #0x20 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bl sub_0201D35C + ldr r1, _021DA6B8 ; =0x0000019E + bl sub_020E2178 + ldr r0, [sp, #0x10] + sub r1, #0x20 + str r1, [sp, #0x20] + add r0, #0xb8 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021DA67E + ldr r0, [sp, #4] + cmp r6, r0 + blt _021DA67E + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + mov r0, #0x27 + mvn r0, r0 + sub r0, r0, r1 + str r0, [sp, #0x24] + b _021DA690 +_021DA67E: + bl sub_0201D35C + mov r1, #0x14 + bl sub_020E2178 + mov r0, #7 + mvn r0, r0 + sub r0, r0, r1 + str r0, [sp, #0x24] +_021DA690: + ldr r0, [sp, #0x20] + add r1, sp, #0x20 + lsl r0, r0, #0xc + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + lsl r0, r0, #0xc + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp, #0x28] + ldr r0, [r4, #4] + bl ov5_021D630C + add r6, r6, #1 + cmp r6, r7 + blt _021DA5D6 +_021DA6AE: + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021DA6B4: .word 0x00000B98 +_021DA6B8: .word 0x0000019E + thumb_func_end ov5_021DA5A0 + + thumb_func_start ov5_021DA6BC +ov5_021DA6BC: ; 0x021DA6BC + push {r4, r5, r6, lr} + sub sp, #0x18 + add r6, r0, #0 + add r0, sp, #0 + add r1, r6, #0 + ldr r4, [r6, #8] + bl ov5_021D7010 + add r5, sp, #0 + add r3, sp, #0xc + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r5, #0 + str r0, [r3, #0] + ldr r1, [r4, #0x14] + ldr r0, [r4, #0xc] + cmp r1, r0 + blt _021DA6F8 + mov r0, #1 + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x10] + str r5, [r4, #0x14] + ldr r0, [r6, #4] + add r1, r2, #0 + bl ov5_021D630C +_021DA6F8: + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + ldr r0, [sp, #0x10] + asr r0, r0, #0xc + str r0, [sp, #0x10] + ldr r0, [r4, #0x18] + ldr r0, [r0, #0] + cmp r0, #1 + bne _021DA718 + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + cmp r0, #0 + bgt _021DA718 + mov r5, #1 +_021DA718: + ldr r1, [sp, #0x10] + ldr r0, _021DA744 ; =0xFFFFFEE4 + cmp r1, r0 + bge _021DA726 + sub r0, #0xc + cmp r1, r0 + bgt _021DA72E +_021DA726: + cmp r1, #0xd4 + ble _021DA730 + cmp r1, #0xe8 + bge _021DA730 +_021DA72E: + mov r5, #1 +_021DA730: + cmp r5, #1 + bne _021DA740 + ldr r0, [r4, #0] + mov r1, #1 + str r1, [r0, #0] + add r0, r6, #0 + bl ov5_021D6FA8 +_021DA740: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DA744: .word 0xFFFFFEE4 + thumb_func_end ov5_021DA6BC + + thumb_func_start ov5_021DA748 +ov5_021DA748: ; 0x021DA748 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _021DA88C ; =0x00000B98 + add r5, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r5, r1] + ldr r4, [r5, r0] + cmp r1, #5 + bls _021DA75C + b _021DA88A +_021DA75C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DA768: ; jump table + .short _021DA774 - _021DA768 - 2 ; case 0 + .short _021DA774 - _021DA768 - 2 ; case 1 + .short _021DA774 - _021DA768 - 2 ; case 2 + .short _021DA792 - _021DA768 - 2 ; case 3 + .short _021DA87C - _021DA768 - 2 ; case 4 + .short _021DA884 - _021DA768 - 2 ; case 5 +_021DA774: + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #0x10] + mov r1, #0x1f + str r0, [r4, #4] + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DA890 ; =0x00000BA2 + mov r1, #3 + strh r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DA792: + ldr r0, [r4, #0x10] + cmp r0, #0 + blt _021DA79E + sub r0, r0, #1 + str r0, [r4, #0x10] + b _021DA86C +_021DA79E: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021DA7AE + cmp r0, #1 + beq _021DA7F0 + cmp r0, #2 + beq _021DA818 + b _021DA86C +_021DA7AE: + mov r0, #1 + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0x14] + bl sub_0201D35C + mov r1, #0x1e + lsl r1, r1, #4 + bl sub_020E2178 + add r1, #0xc8 + str r1, [r4, #0x18] + mov r0, #0 + str r0, [r4, #0x1c] + bl sub_0201D35C + mov r1, #3 + bl sub_020E2178 + cmp r1, #0 + beq _021DA7E4 + mov r0, #0x24 + str r0, [r4, #8] + ldr r0, _021DA894 ; =0x0000063D + bl sub_02005748 + b _021DA86C +_021DA7E4: + mov r0, #0xc8 + str r0, [r4, #8] + ldr r0, _021DA898 ; =0x0000063C + bl sub_02005748 + b _021DA86C +_021DA7F0: + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + ldr r1, [r4, #0x1c] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [r4, #0x1c] + ldr r0, [r4, #0x14] + cmp r0, #2 + blt _021DA808 + mov r0, #2 + str r0, [r4, #4] +_021DA808: + ldr r0, [r4, #0x1c] + mov r1, #0x64 + bl sub_020E1F6C + mov r1, #0x1f + bl ov5_021D64E4 + b _021DA86C +_021DA818: + ldr r1, [r4, #0x1c] + ldr r0, [r4, #8] + sub r0, r1, r0 + str r0, [r4, #0x1c] + cmp r0, #0 + bgt _021DA85E + mov r0, #0 + str r0, [r4, #4] + str r0, [r4, #0x1c] + ldr r0, [r4, #8] + cmp r0, #0xc8 + bne _021DA83E + bl sub_0201D35C + mov r1, #0xf + bl sub_020E2178 + str r1, [r4, #0x10] + b _021DA85E +_021DA83E: + bl sub_0201D35C + add r7, r0, #0 + ldr r1, [r4, #0x18] + mov r0, #0x32 + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + add r6, r0, #0 + add r0, r7, #0 + mov r1, #0x78 + bl sub_020E2178 + add r0, r6, r1 + str r0, [r4, #0x10] +_021DA85E: + ldr r0, [r4, #0x1c] + mov r1, #0x64 + bl sub_020E1F6C + mov r1, #0x1f + bl ov5_021D64E4 +_021DA86C: + ldr r0, _021DA89C ; =0x00000BA6 + ldrh r1, [r5, r0] + cmp r1, #5 + bne _021DA88A + mov r1, #4 + sub r0, r0, #4 + strh r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DA87C: + mov r1, #5 + add r0, #0xa + strh r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DA884: + ldr r0, [r5, #4] + bl ov5_021D69B8 +_021DA88A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DA88C: .word 0x00000B98 +_021DA890: .word 0x00000BA2 +_021DA894: .word 0x0000063D +_021DA898: .word 0x0000063C +_021DA89C: .word 0x00000BA6 + thumb_func_end ov5_021DA748 + + thumb_func_start ov5_021DA8A0 +ov5_021DA8A0: ; 0x021DA8A0 + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r0, _021DA9C8 ; =0x00000B98 + add r4, r1, #0 + ldr r5, [r4, r0] + add r0, #0xa + ldrh r0, [r4, r0] + cmp r0, #5 + bhi _021DA99E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DA8BE: ; jump table + .short _021DA8CA - _021DA8BE - 2 ; case 0 + .short _021DA8F2 - _021DA8BE - 2 ; case 1 + .short _021DA904 - _021DA8BE - 2 ; case 2 + .short _021DA93E - _021DA8BE - 2 ; case 3 + .short _021DA97C - _021DA8BE - 2 ; case 4 + .short _021DA998 - _021DA8BE - 2 ; case 5 +_021DA8CA: + mov r0, #4 + str r0, [sp] + mov r0, #0xf + str r0, [sp, #4] + sub r0, #0x11 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r2, #1 + ldr r0, _021DA9CC ; =ov5_021DA9DC + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r5, #0 + mov r3, #0x23 + bl ov5_021D7210 + ldr r0, _021DA9D0 ; =0x00000BA2 + mov r1, #1 + strh r1, [r4, r0] + b _021DA99E +_021DA8F2: + add r0, r5, #0 + bl ov5_021D7244 + cmp r0, #3 + bne _021DA99E + ldr r0, _021DA9D0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021DA99E +_021DA904: + mov r0, #0xf + str r0, [sp] + str r0, [sp, #4] + sub r0, #0x11 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r2, #1 + ldr r0, _021DA9CC ; =ov5_021DA9DC + str r2, [sp, #0x10] + str r0, [sp, #0x14] + add r0, r5, #0 + mov r3, #4 + bl ov5_021D7210 + mov r0, #1 + str r0, [sp] + ldr r0, _021DA9D4 ; =ov5_021DAADC + ldr r1, _021DA9CC ; =ov5_021DA9DC + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x10 + mov r3, #2 + bl ov5_021D7568 + ldr r0, _021DA9D0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021DA99E +_021DA93E: + mov r0, #6 + ldrsh r1, [r5, r0] + sub r0, r1, #1 + strh r0, [r5, #6] + cmp r1, #0 + bgt _021DA95A + mov r1, #4 + ldrsh r1, [r5, r1] + add r0, r4, #0 + bl ov5_021DA9DC + mov r0, #8 + ldrsh r0, [r5, r0] + strh r0, [r5, #6] +_021DA95A: + ldr r0, _021DA9D8 ; =0x00000BA6 + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021DA99E + mov r0, #2 + mvn r0, r0 + str r0, [sp] + add r0, r5, #0 + mov r1, #0 + mov r2, #0x23 + mov r3, #2 + bl ov5_021D7238 + ldr r0, _021DA9D0 ; =0x00000BA2 + mov r1, #4 + strh r1, [r4, r0] + b _021DA99E +_021DA97C: + add r0, r5, #0 + bl ov5_021D7244 + cmp r0, #3 + bne _021DA99E + add r0, r4, #0 + ldr r1, [r4, #0x40] + add r0, #0xc + cmp r1, r0 + bne _021DA99E + ldr r0, _021DA9D0 ; =0x00000BA2 + mov r1, #5 + strh r1, [r4, r0] + b _021DA99E +_021DA998: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DA99E: + ldr r0, _021DA9D0 ; =0x00000BA2 + ldrh r0, [r4, r0] + cmp r0, #5 + beq _021DA9C4 + cmp r0, #0 + beq _021DA9C4 + add r0, r4, #0 + ldr r1, _021DA9D4 ; =ov5_021DAADC + add r0, #0xc + bl ov5_021D6FF0 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov5_021D717C + add r0, r4, #0 + bl ov5_021D700C +_021DA9C4: + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DA9C8: .word 0x00000B98 +_021DA9CC: .word ov5_021DA9DC +_021DA9D0: .word 0x00000BA2 +_021DA9D4: .word ov5_021DAADC +_021DA9D8: .word 0x00000BA6 + thumb_func_end ov5_021DA8A0 + + thumb_func_start ov5_021DA9DC +ov5_021DA9DC: ; 0x021DA9DC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + add r0, r1, #0 + mov r7, #0 + str r1, [sp, #4] + cmp r0, #0 + ble _021DAAD2 +_021DA9EC: + ldr r0, [sp] + mov r1, #0x20 + bl ov5_021D6F00 + add r5, r0, #0 + beq _021DAAD2 + ldr r4, [r5, #8] + bl sub_0201D35C + mov r1, #0xe + bl sub_020E2178 + add r6, r1, #0 + lsl r1, r6, #0x10 + ldr r0, [r5, #4] + lsr r1, r1, #0x10 + bl sub_02021E50 + asr r0, r6, #1 + lsr r0, r0, #0x1e + add r0, r6, r0 + asr r6, r0, #2 + bl sub_0201D35C + mov r1, #0x19 + bl sub_020E2178 + add r2, r1, #0 + add r2, #8 + add r1, r6, #1 + add r0, r2, #0 + mul r0, r1 + str r0, [r4, #0] + mov r0, #0x10 + bl sub_020E1F6C + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #8] + bl sub_0201D35C + mov r1, #1 + and r0, r1 + str r0, [r4, #0xc] + add r0, r1, #0 + str r0, [r4, #0x10] + add r0, r6, #1 + cmp r0, #4 + bhi _021DAAB2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DAA5A: ; jump table + .short _021DAAB2 - _021DAA5A - 2 ; case 0 + .short _021DAA64 - _021DAA5A - 2 ; case 1 + .short _021DAA64 - _021DAA5A - 2 ; case 2 + .short _021DAA80 - _021DAA5A - 2 ; case 3 + .short _021DAA9A - _021DAA5A - 2 ; case 4 +_021DAA64: + bl sub_0201D35C + ldr r1, _021DAAD8 ; =0x000001FF + and r0, r1 + sub r0, #0x80 + str r0, [sp, #8] + bl sub_0201D35C + mov r1, #0xc0 + bl sub_020E2178 + add r1, #8 + str r1, [sp, #0xc] + b _021DAAB2 +_021DAA80: + bl sub_0201D35C + ldr r1, _021DAAD8 ; =0x000001FF + and r0, r1 + sub r0, #0x80 + str r0, [sp, #8] + bl sub_0201D35C + mov r1, #0x7f + and r0, r1 + add r0, #0x40 + str r0, [sp, #0xc] + b _021DAAB2 +_021DAA9A: + bl sub_0201D35C + ldr r1, _021DAAD8 ; =0x000001FF + and r0, r1 + sub r0, #0x80 + str r0, [sp, #8] + bl sub_0201D35C + mov r1, #0x1f + and r0, r1 + add r0, #0xa0 + str r0, [sp, #0xc] +_021DAAB2: + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + add r1, sp, #8 + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [sp, #0xc] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + ldr r0, [r5, #4] + bl ov5_021D630C + ldr r0, [sp, #4] + add r7, r7, #1 + cmp r7, r0 + blt _021DA9EC +_021DAAD2: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DAAD8: .word 0x000001FF + thumb_func_end ov5_021DA9DC + + thumb_func_start ov5_021DAADC +ov5_021DAADC: ; 0x021DAADC + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + ldr r4, [r5, #8] + bl ov5_021D7010 + add r3, sp, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [r4, #8] + ldr r0, [r4, #4] + add r0, r1, r0 + str r0, [r4, #8] + ldr r0, [r4, #0] + cmp r0, #0 + ble _021DAB1C + sub r0, r0, #1 + str r0, [r4, #0] + ldr r0, [r4, #8] + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x10] + b _021DAB2C +_021DAB1C: + ldr r0, [r4, #8] + mov r1, #0x32 + bl sub_020E1F6C + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x10] +_021DAB2C: + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #0 + bgt _021DAB58 + mov r0, #1 + str r0, [r4, #0x10] + ldr r1, [r4, #0xc] + cmp r1, #0 + bne _021DAB4C + ldr r2, [sp, #0xc] + lsl r1, r0, #0xd + add r1, r2, r1 + str r1, [sp, #0xc] + str r0, [r4, #0xc] + b _021DAB58 +_021DAB4C: + ldr r1, [sp, #0xc] + lsl r0, r0, #0xd + sub r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [r4, #0xc] +_021DAB58: + ldr r0, [r5, #4] + add r1, sp, #0xc + bl ov5_021D630C + ldr r0, [sp, #0x10] + asr r1, r0, #0xc + mov r0, #0xf + mvn r0, r0 + cmp r1, r0 + bgt _021DAB72 + add r0, r5, #0 + bl ov5_021D6FA8 +_021DAB72: + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DAADC + + thumb_func_start ov5_021DAB78 +ov5_021DAB78: ; 0x021DAB78 + push {r4, r5, r6, lr} + ldr r0, _021DAC5C ; =0x00000B98 + add r4, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r4, r1] + ldr r5, [r4, r0] + cmp r1, #5 + bhi _021DAC58 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DAB96: ; jump table + .short _021DABA2 - _021DAB96 - 2 ; case 0 + .short _021DABD4 - _021DAB96 - 2 ; case 1 + .short _021DABF2 - _021DAB96 - 2 ; case 2 + .short _021DAC18 - _021DAB96 - 2 ; case 3 + .short _021DAC34 - _021DAB96 - 2 ; case 4 + .short _021DAC52 - _021DAB96 - 2 ; case 5 +_021DABA2: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x10 + mov r3, #8 + bl ov5_021D64FC + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + ldr r1, _021DAC60 ; =0x0400000C + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #3 + orr r0, r2 + strh r0, [r1] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DAC64 ; =0x00000BA2 + mov r1, #1 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DABD4: + add r0, r5, #0 + bl ov5_021D650C + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021DAC58 + ldr r0, _021DAC64 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DABF2: + mov r0, #0x10 + mov r1, #0 + bl ov5_021D64E4 + ldr r1, _021DAC60 ; =0x0400000C + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #3 + orr r0, r2 + strh r0, [r1] + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DAC64 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DAC18: + add r0, #0xe + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021DAC58 + add r0, r5, #0 + mov r1, #0x10 + mov r2, #0 + mov r3, #8 + bl ov5_021D64FC + ldr r0, _021DAC64 ; =0x00000BA2 + mov r1, #4 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DAC34: + add r0, r5, #0 + bl ov5_021D650C + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021DAC58 + ldr r0, _021DAC64 ; =0x00000BA2 + mov r1, #5 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DAC52: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DAC58: + pop {r4, r5, r6, pc} + nop +_021DAC5C: .word 0x00000B98 +_021DAC60: .word 0x0400000C +_021DAC64: .word 0x00000BA2 + thumb_func_end ov5_021DAB78 + + thumb_func_start ov5_021DAC68 +ov5_021DAC68: ; 0x021DAC68 + push {r4, r5, r6, lr} + ldr r0, _021DAD30 ; =0x00000B98 + add r4, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r4, r1] + ldr r5, [r4, r0] + cmp r1, #5 + bhi _021DAD2C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DAC86: ; jump table + .short _021DAC92 - _021DAC86 - 2 ; case 0 + .short _021DACB6 - _021DAC86 - 2 ; case 1 + .short _021DACD4 - _021DAC86 - 2 ; case 2 + .short _021DACEC - _021DAC86 - 2 ; case 3 + .short _021DAD08 - _021DAC86 - 2 ; case 4 + .short _021DAD26 - _021DAC86 - 2 ; case 5 +_021DAC92: + add r0, r5, #0 + mov r1, #0 + mov r2, #4 + mov r3, #8 + bl ov5_021D64FC + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DAD34 ; =0x00000BA2 + mov r1, #1 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DACB6: + add r0, r5, #0 + bl ov5_021D650C + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #0 + beq _021DAD2C + ldr r0, _021DAD34 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DACD4: + mov r0, #4 + mov r1, #0xc + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DAD34 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DACEC: + add r0, #0xe + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021DAD2C + add r0, r5, #0 + mov r1, #4 + mov r2, #0 + mov r3, #8 + bl ov5_021D64FC + ldr r0, _021DAD34 ; =0x00000BA2 + mov r1, #4 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DAD08: + add r0, r5, #0 + bl ov5_021D650C + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #0 + beq _021DAD2C + ldr r0, _021DAD34 ; =0x00000BA2 + mov r1, #5 + strh r1, [r4, r0] + pop {r4, r5, r6, pc} +_021DAD26: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DAD2C: + pop {r4, r5, r6, pc} + nop +_021DAD30: .word 0x00000B98 +_021DAD34: .word 0x00000BA2 + thumb_func_end ov5_021DAC68 + + thumb_func_start ov5_021DAD38 +ov5_021DAD38: ; 0x021DAD38 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r0, _021DAEB4 ; =0x00000B98 + add r4, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r4, r1] + ldr r5, [r4, r0] + cmp r1, #5 + bls _021DAD4E + b _021DAEB0 +_021DAD4E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DAD5A: ; jump table + .short _021DAD66 - _021DAD5A - 2 ; case 0 + .short _021DADB6 - _021DAD5A - 2 ; case 1 + .short _021DADE4 - _021DAD5A - 2 ; case 2 + .short _021DAE24 - _021DAD5A - 2 ; case 3 + .short _021DAE58 - _021DAD5A - 2 ; case 4 + .short _021DAE92 - _021DAD5A - 2 ; case 5 +_021DAD66: + ldr r1, _021DAEB8 ; =0x0000764F + mov r2, #0x41 + str r1, [sp] + mov r1, #0 + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + add r0, #0xc + ldrh r0, [r4, r0] + add r1, r5, #0 + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r0, #0x44 + ldr r2, [r2, #0x48] + add r1, #0x14 + mov r3, #7 + bl ov5_021D7308 + add r0, r5, #0 + mov r1, #0 + mov r2, #9 + mov r3, #0x1e + bl ov5_021D64FC + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DAEBC ; =0x00000BA2 + mov r1, #1 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DADB6: + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021D650C + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021DAEB0 + cmp r7, #1 + bne _021DAEB0 + ldr r0, _021DAEBC ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DADE4: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAE0A + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021DAEB8 ; =0x0000764F + ldr r0, [r0, #0x48] + mov r1, #7 + mov r3, #0 + str r0, [r5, #0x14] + bl ov5_021D7384 + add r5, #0x14 + add r0, r5, #0 + bl ov5_021D74D4 +_021DAE0A: + mov r0, #9 + mov r1, #7 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DAEBC ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAE24: + add r1, r0, #0 + add r1, #0xe + ldrh r1, [r4, r1] + cmp r1, #5 + bne _021DAEB0 + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAE42 + add r0, r5, #0 + add r0, #0x14 + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021DAE42: + add r0, r5, #0 + mov r1, #9 + mov r2, #0 + mov r3, #0x1e + bl ov5_021D64FC + ldr r0, _021DAEBC ; =0x00000BA2 + mov r1, #4 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAE58: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAE6C + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r6, r0, #0 + b _021DAE6E +_021DAE6C: + mov r6, #1 +_021DAE6E: + add r0, r5, #0 + bl ov5_021D650C + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021DAEB0 + cmp r7, #1 + bne _021DAEB0 + ldr r0, _021DAEBC ; =0x00000BA2 + mov r1, #5 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAE92: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAEAA + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0x14] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021DAEAA: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DAEB0: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DAEB4: .word 0x00000B98 +_021DAEB8: .word 0x0000764F +_021DAEBC: .word 0x00000BA2 + thumb_func_end ov5_021DAD38 + + thumb_func_start ov5_021DAEC0 +ov5_021DAEC0: ; 0x021DAEC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r0, _021DB03C ; =0x00000B98 + add r4, r1, #0 + add r1, r0, #0 + add r1, #0xa + ldrh r1, [r4, r1] + ldr r5, [r4, r0] + cmp r1, #5 + bls _021DAED6 + b _021DB038 +_021DAED6: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DAEE2: ; jump table + .short _021DAEEE - _021DAEE2 - 2 ; case 0 + .short _021DAF3E - _021DAEE2 - 2 ; case 1 + .short _021DAF6C - _021DAEE2 - 2 ; case 2 + .short _021DAFAC - _021DAEE2 - 2 ; case 3 + .short _021DAFE0 - _021DAEE2 - 2 ; case 4 + .short _021DB01A - _021DAEE2 - 2 ; case 5 +_021DAEEE: + ldr r1, _021DB040 ; =0x00007555 + mov r2, #0x41 + str r1, [sp] + ldr r1, _021DB044 ; =0x00007FFF + add r0, #0xc + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + ldrh r0, [r4, r0] + add r1, r5, #0 + lsl r2, r2, #2 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r0, #0x44 + ldr r2, [r2, #0x48] + add r1, #0x14 + mov r3, #6 + bl ov5_021D7308 + add r0, r5, #0 + mov r1, #0 + mov r2, #9 + mov r3, #0x1e + bl ov5_021D64FC + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DB048 ; =0x00000BA2 + mov r1, #1 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAF3E: + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021D650C + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021DB038 + cmp r7, #1 + bne _021DB038 + ldr r0, _021DB048 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAF6C: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAF92 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021DB040 ; =0x00007555 + ldr r0, [r0, #0x48] + ldr r3, _021DB044 ; =0x00007FFF + mov r1, #6 + str r0, [r5, #0x14] + bl ov5_021D7384 + add r5, #0x14 + add r0, r5, #0 + bl ov5_021D74D4 +_021DAF92: + mov r0, #9 + mov r1, #7 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DB048 ; =0x00000BA2 + mov r1, #3 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAFAC: + add r1, r0, #0 + add r1, #0xe + ldrh r1, [r4, r1] + cmp r1, #5 + bne _021DB038 + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAFCA + add r0, r5, #0 + add r0, #0x14 + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021DAFCA: + add r0, r5, #0 + mov r1, #9 + mov r2, #0 + mov r3, #0x1e + bl ov5_021D64FC + ldr r0, _021DB048 ; =0x00000BA2 + mov r1, #4 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DAFE0: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DAFF4 + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r6, r0, #0 + b _021DAFF6 +_021DAFF4: + mov r6, #1 +_021DAFF6: + add r0, r5, #0 + bl ov5_021D650C + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, #1 + bne _021DB038 + cmp r7, #1 + bne _021DB038 + ldr r0, _021DB048 ; =0x00000BA2 + mov r1, #5 + add sp, #0x10 + strh r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_021DB01A: + add r0, #0xc + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DB032 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0x14] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021DB032: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DB038: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB03C: .word 0x00000B98 +_021DB040: .word 0x00007555 +_021DB044: .word 0x00007FFF +_021DB048: .word 0x00000BA2 + thumb_func_end ov5_021DAEC0 + + thumb_func_start ov5_021DB04C +ov5_021DB04C: ; 0x021DB04C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r1, [r1, r0] + ldr r0, _021DB13C ; =0x00000B98 + add r2, r0, #0 + add r2, #0xa + ldrh r2, [r4, r2] + ldr r5, [r4, r0] + cmp r2, #5 + bhi _021DB138 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021DB074: ; jump table + .short _021DB080 - _021DB074 - 2 ; case 0 + .short _021DB0AA - _021DB074 - 2 ; case 1 + .short _021DB0CC - _021DB074 - 2 ; case 2 + .short _021DB0DE - _021DB074 - 2 ; case 3 + .short _021DB110 - _021DB074 - 2 ; case 4 + .short _021DB12C - _021DB074 - 2 ; case 5 +_021DB080: + ldr r1, [r1, #4] + add r0, r5, #0 + ldr r1, [r1, #0x1c] + bl ov5_021DB614 + mov r0, #0x54 + mov r1, #1 + str r0, [sp] + mov r0, #0x1e + lsl r1, r1, #0x14 + str r0, [sp, #4] + add r0, r5, #0 + lsr r2, r1, #3 + mov r3, #0x80 + bl ov5_021DB6E0 + ldr r0, _021DB140 ; =0x00000BA2 + mov r1, #1 + add sp, #8 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021DB0AA: + add r0, r5, #0 + bl ov5_021DB700 + cmp r0, #1 + bne _021DB138 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + bl ov5_021DB7A4 + ldr r0, _021DB140 ; =0x00000BA2 + mov r1, #3 + add sp, #8 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021DB0CC: + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DB140 ; =0x00000BA2 + mov r1, #3 + add sp, #8 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021DB0DE: + add r0, #0xe + ldrh r0, [r4, r0] + cmp r0, #5 + bne _021DB138 + ldr r1, [r1, #4] + add r0, r5, #0 + ldr r1, [r1, #0x1c] + bl ov5_021DB614 + mov r0, #0x54 + mov r1, #2 + str r0, [sp] + mov r0, #0x1e + lsl r1, r1, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + lsl r2, r1, #3 + mov r3, #0x80 + bl ov5_021DB6E0 + ldr r0, _021DB140 ; =0x00000BA2 + mov r1, #4 + add sp, #8 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021DB110: + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl ov5_021DB700 + cmp r0, #1 + bne _021DB138 + ldr r0, _021DB140 ; =0x00000BA2 + mov r1, #5 + add sp, #8 + strh r1, [r4, r0] + pop {r3, r4, r5, pc} +_021DB12C: + add r0, r5, #0 + bl ov5_021DB690 + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DB138: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DB13C: .word 0x00000B98 +_021DB140: .word 0x00000BA2 + thumb_func_end ov5_021DB04C + + thumb_func_start ov5_021DB144 +ov5_021DB144: ; 0x021DB144 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + ldr r2, _021DB390 ; =0x00000B98 + add r4, r1, #0 + add r0, r2, #0 + add r0, #0xa + ldrh r0, [r4, r0] + ldr r5, [r4, r2] + cmp r0, #5 + bls _021DB15A + b _021DB2D4 +_021DB15A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DB166: ; jump table + .short _021DB172 - _021DB166 - 2 ; case 0 + .short _021DB1D4 - _021DB166 - 2 ; case 1 + .short _021DB208 - _021DB166 - 2 ; case 2 + .short _021DB25A - _021DB166 - 2 ; case 3 + .short _021DB28A - _021DB166 - 2 ; case 4 + .short _021DB2B6 - _021DB166 - 2 ; case 5 +_021DB172: + add r0, r5, #0 + mov r1, #0 + mov r2, #7 + mov r3, #8 + bl ov5_021D64FC + mov r0, #0 + mov r1, #0x10 + bl ov5_021D64E4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021DB394 ; =0x0000692F + mov r2, #0x41 + str r0, [sp] + ldr r0, _021DB398 ; =0x00007FFF + add r1, r5, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _021DB39C ; =0x00000BA4 + lsl r2, r2, #2 + ldrh r0, [r4, r0] + add r1, #0x14 + str r0, [sp, #0xc] + ldr r3, [r4, #0] + add r0, r5, #0 + ldr r2, [r3, r2] + add r0, #0x44 + ldr r2, [r2, #0x48] + mov r3, #3 + bl ov5_021D7308 + add r0, r5, #0 + mov r1, #0 + add r0, #0xac + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb4 + strh r1, [r0] + ldr r0, _021DB3A0 ; =0x00000BA2 + mov r1, #1 + strh r1, [r4, r0] + b _021DB2D4 +_021DB1D4: + add r2, #0xc + ldrh r2, [r4, r2] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x44 + add r1, #0x14 + bl ov5_021D735C + add r7, r0, #0 + add r0, r5, #0 + bl ov5_021D650C + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, r7 + bne _021DB2D4 + cmp r6, #1 + bne _021DB2D4 + ldr r0, _021DB3A0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021DB2D4 +_021DB208: + mov r0, #7 + mov r1, #9 + bl ov5_021D64E4 + ldr r0, _021DB39C ; =0x00000BA4 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DB236 + mov r0, #0x41 + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, _021DB394 ; =0x0000692F + ldr r0, [r0, #0x48] + ldr r3, _021DB398 ; =0x00007FFF + mov r1, #3 + str r0, [r5, #0x14] + bl ov5_021D7384 + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74D4 +_021DB236: + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + mov r1, #0 + add r0, #0xac + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb4 + strh r1, [r0] + ldr r0, _021DB3A0 ; =0x00000BA2 + mov r1, #3 + strh r1, [r4, r0] + b _021DB2D4 +_021DB25A: + add r2, #0xe + ldrh r0, [r4, r2] + cmp r0, #5 + bne _021DB2D4 + add r0, r5, #0 + mov r1, #7 + mov r2, #0 + mov r3, #8 + bl ov5_021D64FC + ldr r0, _021DB39C ; =0x00000BA4 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _021DB282 + add r0, r5, #0 + add r0, #0x14 + mov r1, #1 + mov r2, #0 + bl ov5_021D749C +_021DB282: + ldr r0, _021DB3A0 ; =0x00000BA2 + mov r1, #4 + strh r1, [r4, r0] + b _021DB2D4 +_021DB28A: + add r0, r5, #0 + bl ov5_021D650C + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x14 + bl ov5_021D74B8 + add r7, r0, #0 + ldr r0, [r5, #0] + mov r1, #0x10 + sub r1, r1, r0 + bl ov5_021D64E4 + cmp r6, r7 + bne _021DB2D4 + cmp r6, #1 + bne _021DB2D4 + ldr r0, _021DB3A0 ; =0x00000BA2 + mov r1, #5 + strh r1, [r4, r0] + b _021DB2D4 +_021DB2B6: + add r2, #0xc + ldrh r0, [r4, r2] + cmp r0, #0 + beq _021DB2CE + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r5, #0x14] + mov r1, #1 + add r3, r2, #0 + bl ov5_021D57FC +_021DB2CE: + ldr r0, [r4, #4] + bl ov5_021D69B8 +_021DB2D4: + ldr r0, _021DB3A0 ; =0x00000BA2 + ldrh r0, [r4, r0] + cmp r0, #5 + beq _021DB38A + cmp r0, #0 + beq _021DB38A + add r0, r4, #0 + add r1, sp, #0x14 + add r2, sp, #0x10 + bl ov5_021D71B4 + ldr r0, [sp, #0x10] + mov r2, #3 + asr r1, r0, #0x1f + lsl r2, r2, #0xa + mov r3, #0 + bl sub_020E1F1C + mov r3, #2 + mov r2, #0 + lsl r3, r3, #0xa + add r6, r0, r3 + adc r1, r2 + lsl r0, r1, #0x14 + lsr r1, r6, #0xc + orr r1, r0 + add r0, r5, #0 + add r0, #0xac + str r1, [sp, #0x10] + ldr r1, [r0, #0] + ldr r0, [sp, #0x14] + add r1, r1, r0 + add r0, r5, #0 + add r0, #0xac + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb0 + ldr r1, [r0, #0] + ldr r0, [sp, #0x10] + add r1, r1, r0 + add r0, r5, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xb4 + ldrh r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xb4 + strh r1, [r0] + add r0, r5, #0 + add r0, #0xb4 + ldrh r1, [r0] + lsr r0, r3, #2 + cmp r1, r0 + blo _021DB34A + add r0, r5, #0 + add r0, #0xb4 + strh r2, [r0] +_021DB34A: + add r3, r5, #0 + add r3, #0xac + ldr r3, [r3, #0] + mov r0, #0x41 + asr r7, r3, #0xc + add r3, r5, #0 + add r3, #0xb4 + ldrh r3, [r3] + ldr r1, [r4, #0] + lsl r0, r0, #2 + lsr r6, r3, #3 + ldr r0, [r1, r0] + ldr r3, _021DB3A4 ; =0x02201D38 + ldr r0, [r0, #8] + ldrb r3, [r3, r6] + mov r1, #2 + mov r2, #0 + add r3, r7, r3 + bl sub_0201C63C + mov r0, #0x41 + add r5, #0xb0 + ldr r3, [r5, #0] + ldr r1, [r4, #0] + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #2 + ldr r0, [r0, #8] + mov r2, #3 + asr r3, r3, #0xc + bl sub_0201C63C +_021DB38A: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DB390: .word 0x00000B98 +_021DB394: .word 0x0000692F +_021DB398: .word 0x00007FFF +_021DB39C: .word 0x00000BA4 +_021DB3A0: .word 0x00000BA2 +_021DB3A4: .word 0x02201D38 + thumb_func_end ov5_021DB144 + + thumb_func_start ov5_021DB3A8 +ov5_021DB3A8: ; 0x021DB3A8 + push {r3, lr} + sub sp, #8 + mov r2, #5 + lsl r2, r2, #8 + str r2, [sp] + mov r2, #1 + lsl r2, r2, #8 + str r2, [sp, #4] + mov r2, #4 + add r3, r2, #0 + bl ov5_021D9C20 + add sp, #8 + pop {r3, pc} + thumb_func_end ov5_021DB3A8 + + thumb_func_start ov5_021DB3C4 +ov5_021DB3C4: ; 0x021DB3C4 + push {r3, lr} + sub sp, #8 + mov r2, #1 + lsl r2, r2, #0xa + str r2, [sp] + lsr r2, r2, #2 + str r2, [sp, #4] + mov r2, #6 + mov r3, #1 + bl ov5_021D9C20 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DB3C4 + + thumb_func_start ov5_021DB3E0 +ov5_021DB3E0: ; 0x021DB3E0 + push {lr} + sub sp, #0xc + ldr r0, _021DB400 ; =0x00001842 + ldr r2, _021DB404 ; =0x00000B98 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r1, #0 + ldr r1, [r1, r2] + ldr r3, _021DB408 ; =0x000065EF + mov r2, #3 + bl ov5_021D9DFC + add sp, #0xc + pop {pc} + ; .align 2, 0 +_021DB400: .word 0x00001842 +_021DB404: .word 0x00000B98 +_021DB408: .word 0x000065EF + thumb_func_end ov5_021DB3E0 + + thumb_func_start ov5_021DB40C +ov5_021DB40C: ; 0x021DB40C + push {lr} + sub sp, #0xc + ldr r0, _021DB42C ; =0x00007B2D + ldr r2, _021DB430 ; =0x00000B98 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r1, #0 + ldr r1, [r1, r2] + ldr r3, _021DB434 ; =0x0000672F + mov r2, #2 + bl ov5_021D9DFC + add sp, #0xc + pop {pc} + ; .align 2, 0 +_021DB42C: .word 0x00007B2D +_021DB430: .word 0x00000B98 +_021DB434: .word 0x0000672F + thumb_func_end ov5_021DB40C + + thumb_func_start ov5_021DB438 +ov5_021DB438: ; 0x021DB438 + push {lr} + sub sp, #0xc + mov r0, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r2, _021DB458 ; =0x00000B98 + add r0, r1, #0 + ldr r1, [r1, r2] + ldr r3, _021DB45C ; =0x0000672F + mov r2, #2 + bl ov5_021D9DFC + add sp, #0xc + pop {pc} + ; .align 2, 0 +_021DB458: .word 0x00000B98 +_021DB45C: .word 0x0000672F + thumb_func_end ov5_021DB438 + + thumb_func_start ov5_021DB460 +ov5_021DB460: ; 0x021DB460 + push {lr} + sub sp, #0xc + mov r0, #5 + lsl r0, r0, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r2, _021DB484 ; =0x00000B98 + add r0, r1, #0 + ldr r1, [r1, r2] + ldr r3, _021DB488 ; =0x0000672F + mov r2, #2 + bl ov5_021D9DFC + add sp, #0xc + pop {pc} + nop +_021DB484: .word 0x00000B98 +_021DB488: .word 0x0000672F + thumb_func_end ov5_021DB460 + + thumb_func_start ov5_021DB48C +ov5_021DB48C: ; 0x021DB48C + push {lr} + sub sp, #0xc + ldr r0, _021DB4AC ; =0x00000421 + ldr r2, _021DB4B0 ; =0x00000B98 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r1, #0 + ldr r1, [r1, r2] + ldr r3, _021DB4B4 ; =0x00004B6F + mov r2, #1 + bl ov5_021D9DFC + add sp, #0xc + pop {pc} + ; .align 2, 0 +_021DB4AC: .word 0x00000421 +_021DB4B0: .word 0x00000B98 +_021DB4B4: .word 0x00004B6F + thumb_func_end ov5_021DB48C + + thumb_func_start ov5_021DB4B8 +ov5_021DB4B8: ; 0x021DB4B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021DB4E0 ; =0x00000B9C + add r4, r1, #0 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021DB4CA + bl sub_02022974 +_021DB4CA: + ldr r1, _021DB4E0 ; =0x00000B9C + mov r0, #1 + str r0, [r5, r1] + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + add r1, r1, #4 + strh r0, [r5, r1] + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_021DB4E0: .word 0x00000B9C + thumb_func_end ov5_021DB4B8 + + thumb_func_start ov5_021DB4E4 +ov5_021DB4E4: ; 0x021DB4E4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xba + lsl r0, r0, #4 + ldrh r0, [r4, r0] + mov r1, #0 + bl sub_020057A4 + ldr r0, _021DB4FC ; =0x00000B9C + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021DB4FC: .word 0x00000B9C + thumb_func_end ov5_021DB4E4 + + thumb_func_start ov5_021DB500 +ov5_021DB500: ; 0x021DB500 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0x1c] + bl sub_02013B54 + str r0, [sp, #0xc] + ldr r0, [r5, #0x20] + bl sub_02013B54 + ldr r7, [sp, #0xc] + str r0, [sp, #8] + mov r4, #0 + add r6, r0, #0 +_021DB51C: + mov r0, #2 + ldrsh r2, [r5, r0] + cmp r4, r2 + bgt _021DB53A + add r0, sp, #0x14 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + mov r1, #0 + ldrsh r1, [r5, r1] + ldr r0, [r5, #4] + add r3, r4, #0 + bl ov5_021DB588 + b _021DB570 +_021DB53A: + lsl r0, r2, #1 + cmp r4, r0 + bgt _021DB55C + sub r0, r0, r4 + lsl r1, r0, #1 + ldr r0, [sp, #0xc] + ldrh r0, [r0, r1] + str r0, [sp, #0x14] + mov r0, #2 + ldrsh r0, [r5, r0] + lsl r0, r0, #1 + sub r0, r0, r4 + lsl r1, r0, #1 + ldr r0, [sp, #8] + ldrh r0, [r0, r1] + str r0, [sp, #0x10] + b _021DB570 +_021DB55C: + add r0, sp, #0x14 + str r0, [sp] + add r0, sp, #0x10 + str r0, [sp, #4] + mov r1, #0 + ldrsh r1, [r5, r1] + ldr r0, [r5, #4] + add r3, r4, #0 + bl ov5_021DB588 +_021DB570: + ldr r0, [sp, #0x14] + add r4, r4, #1 + strh r0, [r7] + ldr r0, [sp, #0x10] + add r7, r7, #2 + strh r0, [r6] + add r6, r6, #2 + cmp r4, #0xc0 + blt _021DB51C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DB500 + + thumb_func_start ov5_021DB588 +ov5_021DB588: ; 0x021DB588 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r1, [sp] + ldr r5, [sp, #0x20] + ldr r4, [sp, #0x24] + sub r1, r3, r2 + bpl _021DB598 + neg r1, r1 +_021DB598: + cmp r1, r0 + blt _021DB5A6 + mov r0, #0 + str r0, [r5, #0] + add sp, #0xc + str r0, [r4, #0] + pop {r4, r5, r6, r7, pc} +_021DB5A6: + lsl r1, r1, #0xc + str r1, [sp, #4] + asr r7, r1, #0x1f + asr r1, r0, #0x1f + add r2, r0, #0 + add r3, r1, #0 + bl sub_020E1F1C + str r0, [sp, #8] + ldr r0, [sp, #4] + add r6, r1, #0 + add r1, r7, #0 + add r2, r0, #0 + add r3, r7, #0 + bl sub_020E1F1C + add r2, r0, #0 + add r3, r1, #0 + mov r0, #2 + ldr r1, [sp, #8] + mov r7, #0 + lsl r0, r0, #0xa + add r0, r1, r0 + adc r6, r7 + lsl r1, r6, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #2 + lsl r1, r1, #0xa + add r2, r2, r1 + adc r3, r7 + lsl r1, r3, #0x14 + lsr r2, r2, #0xc + orr r2, r1 + sub r0, r0, r2 + bl sub_020BCFF0 + asr r2, r0, #0xc + ldr r0, [sp] + sub r0, r0, r2 + str r0, [r5, #0] + bpl _021DB5FE + add r0, r7, #0 + str r0, [r5, #0] +_021DB5FE: + ldr r1, [r5, #0] + lsl r0, r2, #1 + add r0, r1, r0 + str r0, [r4, #0] + cmp r0, #0xff + ble _021DB60E + mov r0, #0xff + str r0, [r4, #0] +_021DB60E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DB588 + + thumb_func_start ov5_021DB614 +ov5_021DB614: ; 0x021DB614 + push {r4, r5, r6, lr} + ldr r2, _021DB680 ; =0x0000062C + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + bl sub_020D5124 + mov r2, #0x6b + add r1, r5, #0 + lsl r2, r2, #2 + mov r0, #4 + add r1, #0x2c + add r2, r5, r2 + bl sub_02013B10 + mov r1, #0xcb + ldr r2, _021DB684 ; =0x000004AC + lsl r1, r1, #2 + str r0, [r5, #0x1c] + mov r0, #4 + add r1, r5, r1 + add r2, r5, r2 + bl sub_02013B10 + str r0, [r5, #0x20] + mov r0, #0xcb + ldr r1, _021DB684 ; =0x000004AC + mov r3, #0 + add r6, r5, #0 + mov r2, #0xff + lsl r0, r0, #2 +_021DB652: + strh r2, [r6, r0] + strh r2, [r6, r1] + add r3, r3, #1 + add r6, r6, #2 + cmp r3, #0xc0 + blt _021DB652 + ldr r0, _021DB688 ; =ov5_021DB7F8 + add r1, r5, #0 + mov r2, #0x78 + str r4, [r5, #0x14] + bl sub_0200DA3C + mov r2, #1 + ldr r0, _021DB68C ; =ov5_021DB78C + add r1, r5, #0 + lsl r2, r2, #0xa + bl sub_0200DA3C + str r0, [r5, #0x24] + mov r0, #0 + str r0, [r5, #0x28] + pop {r4, r5, r6, pc} + nop +_021DB680: .word 0x0000062C +_021DB684: .word 0x000004AC +_021DB688: .word ov5_021DB7F8 +_021DB68C: .word ov5_021DB78C + thumb_func_end ov5_021DB614 + + thumb_func_start ov5_021DB690 +ov5_021DB690: ; 0x021DB690 + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + lsl r0, r0, #0x1a + mov r1, #0xe + ldr r2, [r0, #0] + lsl r1, r1, #0xc + and r1, r2 + lsr r3, r1, #0xd + ldr r2, [r0, #0] + ldr r1, _021DB6D8 ; =0xFFFF1FFF + and r2, r1 + mov r1, #2 + bic r3, r1 + lsl r1, r3, #0xd + orr r1, r2 + str r1, [r0, #0] + ldr r0, [r4, #0x18] + bl ov5_021EF43C + ldr r0, [r4, #0x24] + bl sub_0200DA58 + ldr r0, [r4, #0x1c] + bl sub_02013B40 + ldr r0, [r4, #0x20] + bl sub_02013B40 + ldr r2, _021DB6DC ; =0x0000062C + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + pop {r4, pc} + nop +_021DB6D8: .word 0xFFFF1FFF +_021DB6DC: .word 0x0000062C + thumb_func_end ov5_021DB690 + + thumb_func_start ov5_021DB6E0 +ov5_021DB6E0: ; 0x021DB6E0 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r3, #0 + ldr r3, [sp, #0x14] + add r0, r4, #4 + bl ov5_021D6538 + ldr r0, [sp, #0x10] + strh r5, [r4] + strh r0, [r4, #2] + mov r0, #1 + str r0, [r4, #0x28] + add r0, r4, #0 + bl ov5_021DB500 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DB6E0 + + thumb_func_start ov5_021DB700 +ov5_021DB700: ; 0x021DB700 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0x28] + cmp r1, #0 + bne _021DB712 + bl ov5_021DB7CC + mov r0, #1 + pop {r3, r4, r5, pc} +_021DB712: + add r0, r5, #4 + bl ov5_021D6548 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021DB500 + cmp r4, #1 + bne _021DB728 + mov r0, #0 + str r0, [r5, #0x28] +_021DB728: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DB700 + + thumb_func_start ov5_021DB72C +ov5_021DB72C: ; 0x021DB72C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r0, _021DB784 ; =0x04000006 + add r5, r1, #0 + ldrh r7, [r0] + mov r6, #0 + add r4, sp, #0 +_021DB73A: + ldr r0, [r5, #0x1c] + bl sub_02013B68 + add r6, r6, #1 + add r5, r5, #4 + stmia r4!, {r0} + cmp r6, #2 + blt _021DB73A + cmp r7, #0xc0 + bge _021DB780 + add r7, r7, #1 + cmp r7, #0xc0 + blt _021DB756 + sub r7, #0xc0 +_021DB756: + ldr r1, _021DB788 ; =0x04000004 + mov r0, #2 + ldrh r2, [r1] + tst r0, r2 + beq _021DB780 + ldr r2, [sp] + lsl r0, r7, #1 + ldrh r2, [r2, r0] + lsl r3, r2, #8 + mov r2, #0xff + lsl r2, r2, #8 + and r3, r2 + ldr r2, [sp, #4] + ldrh r0, [r2, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + orr r0, r3 + strh r0, [r1, #0x3e] + mov r0, #0xc0 + add r1, #0x42 + strh r0, [r1] +_021DB780: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB784: .word 0x04000006 +_021DB788: .word 0x04000004 + thumb_func_end ov5_021DB72C + + thumb_func_start ov5_021DB78C +ov5_021DB78C: ; 0x021DB78C + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r4, #0 +_021DB792: + ldr r0, [r5, #0x1c] + bl sub_02013B94 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021DB792 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DB78C + + thumb_func_start ov5_021DB7A4 +ov5_021DB7A4: ; 0x021DB7A4 + ldr r3, _021DB7B0 ; =sub_0200DA3C + add r1, r0, #0 + ldr r0, _021DB7B4 ; =ov5_021DB7B8 + mov r2, #0x80 + bx r3 + nop +_021DB7B0: .word sub_0200DA3C +_021DB7B4: .word ov5_021DB7B8 + thumb_func_end ov5_021DB7A4 + + thumb_func_start ov5_021DB7B8 +ov5_021DB7B8: ; 0x021DB7B8 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl ov5_021DB690 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DB7B8 + + thumb_func_start ov5_021DB7CC +ov5_021DB7CC: ; 0x021DB7CC + push {r3, r4, r5, r6, r7, lr} + mov r7, #6 + add r5, r0, #0 + mov r6, #0 + lsl r7, r7, #6 +_021DB7D6: + ldr r0, [r5, #0x1c] + bl sub_02013B68 + add r4, r0, #0 + ldr r0, [r5, #0x1c] + bl sub_02013B54 + add r1, r4, #0 + add r2, r7, #0 + bl sub_020D50B8 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021DB7D6 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DB7CC + + thumb_func_start ov5_021DB7F8 +ov5_021DB7F8: ; 0x021DB7F8 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r1, _021DB878 ; =0x0400004A + add r5, r0, #0 + ldrb r0, [r1] + add r7, sp, #0 + ldr r3, _021DB87C ; =0xFFFFC0FF + strb r0, [r7] + add r0, r1, #0 + sub r0, #0x4a + ldr r2, [r0, #0] + mov r0, #0xe + lsl r0, r0, #0xc + and r0, r2 + lsr r2, r0, #0xd + sub r0, r1, #2 + ldrh r6, [r0] + and r6, r3 + mov r3, #0x3f + lsl r3, r3, #8 + orr r6, r3 + lsr r3, r1, #0xd + orr r3, r6 + strh r3, [r0] + ldrh r1, [r1] + mov r0, #0x3f + bic r1, r0 + mov r0, #0x3e + orr r0, r1 + ldrb r1, [r7] + lsl r1, r1, #0x1a + lsr r1, r1, #0x1f + beq _021DB83E + mov r1, #0x20 + orr r0, r1 +_021DB83E: + ldr r1, _021DB878 ; =0x0400004A + mov r3, #0xff + strh r0, [r1] + add r0, r1, #0 + sub r0, #8 + strh r3, [r0] + sub r0, r1, #4 + mov r3, #0xc0 + strh r3, [r0] + sub r1, #0x4a + ldr r3, [r1, #0] + ldr r0, _021DB880 ; =0xFFFF1FFF + and r0, r3 + mov r3, #2 + orr r2, r3 + lsl r2, r2, #0xd + orr r0, r2 + str r0, [r1, #0] + ldr r0, [r4, #0x14] + ldr r1, _021DB884 ; =ov5_021DB72C + add r2, r4, #0 + bl ov5_021EF418 + str r0, [r4, #0x18] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DB878: .word 0x0400004A +_021DB87C: .word 0xFFFFC0FF +_021DB880: .word 0xFFFF1FFF +_021DB884: .word ov5_021DB72C + thumb_func_end ov5_021DB7F8 + + .rodata + + + .global Unk_ov5_021F8CBC +Unk_ov5_021F8CBC: ; 0x021F8CBC + .incbin "incbin/overlay5_rodata.bin", 0x3A8, 0x3B8 - 0x3A8 + + .global Unk_ov5_021F8CCC +Unk_ov5_021F8CCC: ; 0x021F8CCC + .incbin "incbin/overlay5_rodata.bin", 0x3B8, 0x3C8 - 0x3B8 + + .global Unk_ov5_021F8CDC +Unk_ov5_021F8CDC: ; 0x021F8CDC + .incbin "incbin/overlay5_rodata.bin", 0x3C8, 0x3D8 - 0x3C8 + + .global Unk_ov5_021F8CEC +Unk_ov5_021F8CEC: ; 0x021F8CEC + .incbin "incbin/overlay5_rodata.bin", 0x3D8, 0x3E8 - 0x3D8 + + .global Unk_ov5_021F8CFC +Unk_ov5_021F8CFC: ; 0x021F8CFC + .incbin "incbin/overlay5_rodata.bin", 0x3E8, 0x3FC - 0x3E8 + + .global Unk_ov5_021F8D10 +Unk_ov5_021F8D10: ; 0x021F8D10 + .incbin "incbin/overlay5_rodata.bin", 0x3FC, 0x41C - 0x3FC + + .global Unk_ov5_021F8D30 +Unk_ov5_021F8D30: ; 0x021F8D30 + .incbin "incbin/overlay5_rodata.bin", 0x41C, 0x43C - 0x41C + + .global Unk_ov5_021F8D50 +Unk_ov5_021F8D50: ; 0x021F8D50 + .incbin "incbin/overlay5_rodata.bin", 0x43C, 0x45C - 0x43C + + .global Unk_ov5_021F8D70 +Unk_ov5_021F8D70: ; 0x021F8D70 + .incbin "incbin/overlay5_rodata.bin", 0x45C, 0x47C - 0x45C + + .global Unk_ov5_021F8D90 +Unk_ov5_021F8D90: ; 0x021F8D90 + .incbin "incbin/overlay5_rodata.bin", 0x47C, 0x500 - 0x47C + + .global Unk_ov5_021F8E14 +Unk_ov5_021F8E14: ; 0x021F8E14 + .incbin "incbin/overlay5_rodata.bin", 0x500, 0x20 + + + .data + + + .global Unk_ov5_02201D38 +Unk_ov5_02201D38: ; 0x02201D38 + .incbin "incbin/overlay5_data.bin", 0x18, 0x58 - 0x18 + + .global Unk_ov5_02201D78 +Unk_ov5_02201D78: ; 0x02201D78 + .incbin "incbin/overlay5_data.bin", 0x58, 0x364 + diff --git a/asm/ov5_021DB888.s b/asm/ov5_021DB888.s new file mode 100644 index 000000000..d6d7a6d21 --- /dev/null +++ b/asm/ov5_021DB888.s @@ -0,0 +1,1048 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DB888 +ov5_021DB888: ; 0x021DB888 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r5, r1, #0 + add r6, r2, #0 + bl sub_02050A60 + mov r1, #0x12 + add r7, r0, #0 + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + add r4, r0, #0 + bne _021DB8AA + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} +_021DB8AA: + mov r2, #0x12 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + str r7, [r4, #4] + ldr r0, [r7, #0xc] + bl sub_020507E4 + str r0, [r4, #8] + mov r0, #0x45 + lsl r0, r0, #2 + str r6, [r4, r0] + add r0, r0, #4 + str r5, [r4, r0] + ldr r0, [sp] + ldr r1, _021DB8D4 ; =ov5_021DB8D8 + add r2, r4, #0 + bl sub_02050944 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DB8D4: .word ov5_021DB8D8 + thumb_func_end ov5_021DB888 + + thumb_func_start ov5_021DB8D8 +ov5_021DB8D8: ; 0x021DB8D8 + push {r3, r4, r5, lr} + sub sp, #8 + bl sub_02050A64 + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #9 + bhi _021DB912 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DB8F4: ; jump table + .short _021DB908 - _021DB8F4 - 2 ; case 0 + .short _021DB91E - _021DB8F4 - 2 ; case 1 + .short _021DB96C - _021DB8F4 - 2 ; case 2 + .short _021DB992 - _021DB8F4 - 2 ; case 3 + .short _021DB9A4 - _021DB8F4 - 2 ; case 4 + .short _021DB9C0 - _021DB8F4 - 2 ; case 5 + .short _021DB9D2 - _021DB8F4 - 2 ; case 6 + .short _021DB9F2 - _021DB8F4 - 2 ; case 7 + .short _021DBA3C - _021DB8F4 - 2 ; case 8 + .short _021DBA44 - _021DB8F4 - 2 ; case 9 +_021DB908: + ldr r0, [r4, #4] + bl ov5_021DBF20 + cmp r0, #1 + beq _021DB914 +_021DB912: + b _021DBA4E +_021DB914: + add r0, r4, #0 + mov r1, #1 + bl ov5_021DBA54 + b _021DBA4E +_021DB91E: + bl ov5_021DBA7C + add r0, r4, #0 + bl ov5_021DBA58 + cmp r0, #2 + bne _021DB940 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + strh r1, [r0] + add r0, r4, #0 + mov r1, #2 + bl ov5_021DBA54 + b _021DBA4E +_021DB940: + cmp r0, #0 + bne _021DB958 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + strh r1, [r0] + add r0, r4, #0 + mov r1, #7 + bl ov5_021DBA54 + b _021DBA4E +_021DB958: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + strh r1, [r0] + add r0, r4, #0 + mov r1, #8 + bl ov5_021DBA54 + b _021DBA4E +_021DB96C: + ldr r0, [r4, #4] + bl ov5_021E1014 + mov r1, #0x47 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x62 + lsl r0, r0, #4 + bl sub_02005748 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_0206B0F8 + add r0, r4, #0 + mov r1, #3 + bl ov5_021DBA54 + b _021DBA4E +_021DB992: + bl ov5_021DBCD4 + cmp r0, #0 + bne _021DBA4E + add r0, r4, #0 + mov r1, #4 + bl ov5_021DBA54 + b _021DBA4E +_021DB9A4: + bl ov5_021DBCE0 + cmp r0, #0 + bne _021DB9B6 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + strh r1, [r0] +_021DB9B6: + add r0, r4, #0 + mov r1, #5 + bl ov5_021DBA54 + b _021DBA4E +_021DB9C0: + bl ov5_021DBCD4 + cmp r0, #0 + bne _021DBA4E + add r0, r4, #0 + mov r1, #6 + bl ov5_021DBA54 + b _021DBA4E +_021DB9D2: + mov r0, #0x62 + lsl r0, r0, #4 + bl sub_020057D4 + cmp r0, #0 + bne _021DBA4E + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov5_021E1020 + add r0, r4, #0 + mov r1, #9 + bl ov5_021DBA54 + b _021DBA4E +_021DB9F2: + ldr r0, [r4, #8] + bl sub_0206B0E8 + mov r1, #0x64 + sub r5, r1, r0 + add r0, r5, #0 + mov r1, #0xa + bl sub_020E1F6C + cmp r0, #0 + bne _021DBA0C + mov r3, #1 + b _021DBA1E +_021DBA0C: + add r0, r5, #0 + mov r1, #0x64 + bl sub_020E1F6C + cmp r0, #0 + bne _021DBA1C + mov r3, #2 + b _021DBA1E +_021DBA1C: + mov r3, #3 +_021DBA1E: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + add r2, r5, #0 + bl sub_0200B60C + add r0, r4, #0 + mov r1, #9 + bl ov5_021DBA54 + b _021DBA4E +_021DBA3C: + mov r1, #9 + bl ov5_021DBA54 + b _021DBA4E +_021DBA44: + bl sub_020181C4 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_021DBA4E: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DB8D8 + + thumb_func_start ov5_021DBA54 +ov5_021DBA54: ; 0x021DBA54 + str r1, [r0, #0] + bx lr + thumb_func_end ov5_021DBA54 + + thumb_func_start ov5_021DBA58 +ov5_021DBA58: ; 0x021DBA58 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0206B0E8 + cmp r0, #0x64 + bne _021DBA78 + mov r0, #0x11 + lsl r0, r0, #4 + ldrh r0, [r4, r0] + cmp r0, #0 + bne _021DBA74 + mov r0, #1 + pop {r4, pc} +_021DBA74: + mov r0, #2 + pop {r4, pc} +_021DBA78: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021DBA58 + + thumb_func_start ov5_021DBA7C +ov5_021DBA7C: ; 0x021DBA7C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp] + ldr r0, [r0, #4] + bl sub_0203A4B4 + mov r2, #0 + str r0, [sp, #4] + str r2, [sp, #0x18] + cmp r0, #0 + bls _021DBAA2 + ldr r3, [sp] + add r1, r2, #0 +_021DBA96: + ldr r0, [sp, #4] + add r2, r2, #1 + str r1, [r3, #0x10] + add r3, r3, #4 + cmp r2, r0 + blo _021DBA96 +_021DBAA2: + ldr r0, [sp] + ldr r0, [r0, #4] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [sp] + ldr r0, [r0, #4] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + sub r1, r4, #7 + str r1, [sp, #0x14] + add r1, r4, #7 + str r1, [sp, #0x10] + sub r1, r0, #7 + add r0, r0, #6 + str r0, [sp, #8] + ldr r0, [sp, #0x14] + str r1, [sp, #0xc] + cmp r0, #0 + bge _021DBAD2 + mov r0, #0 + str r0, [sp, #0x14] +_021DBAD2: + ldr r0, [sp, #0xc] + cmp r0, #0 + bge _021DBADC + mov r0, #0 + str r0, [sp, #0xc] +_021DBADC: + ldr r0, [sp, #4] + mov r6, #0 + cmp r0, #0 + bls _021DBB62 + ldr r5, [sp] +_021DBAE6: + ldr r0, [sp] + add r1, r6, #0 + ldr r0, [r0, #4] + ldr r0, [r0, #0x38] + bl sub_0206251C + add r4, r0, #0 + beq _021DBB5A + bl sub_02062950 + cmp r0, #8 + bhi _021DBB5A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DBB0A: ; jump table + .short _021DBB5A - _021DBB0A - 2 ; case 0 + .short _021DBB1C - _021DBB0A - 2 ; case 1 + .short _021DBB1C - _021DBB0A - 2 ; case 2 + .short _021DBB5A - _021DBB0A - 2 ; case 3 + .short _021DBB1C - _021DBB0A - 2 ; case 4 + .short _021DBB1C - _021DBB0A - 2 ; case 5 + .short _021DBB1C - _021DBB0A - 2 ; case 6 + .short _021DBB1C - _021DBB0A - 2 ; case 7 + .short _021DBB1C - _021DBB0A - 2 ; case 8 +_021DBB1C: + add r0, r4, #0 + bl sub_02063020 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02063040 + ldr r1, [sp, #0x14] + cmp r7, r1 + blt _021DBB5A + ldr r1, [sp, #0x10] + cmp r7, r1 + bgt _021DBB5A + ldr r1, [sp, #0xc] + cmp r0, r1 + blt _021DBB5A + ldr r1, [sp, #8] + cmp r0, r1 + bgt _021DBB5A + add r0, r4, #0 + bl sub_02062948 + bl ov5_021DBB70 + cmp r0, #0 + bne _021DBB5A + ldr r0, [sp, #0x18] + str r4, [r5, #0x10] + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0x18] +_021DBB5A: + ldr r0, [sp, #4] + add r6, r6, #1 + cmp r6, r0 + blo _021DBAE6 +_021DBB62: + mov r2, #0x11 + ldr r1, [sp, #0x18] + ldr r0, [sp] + lsl r2, r2, #4 + strh r1, [r0, r2] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021DBA7C + + thumb_func_start ov5_021DBB70 +ov5_021DBB70: ; 0x021DBB70 + sub r0, #0x33 + cmp r0, #3 + bhi _021DBB8E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DBB82: ; jump table + .short _021DBB8A - _021DBB82 - 2 ; case 0 + .short _021DBB8A - _021DBB82 - 2 ; case 1 + .short _021DBB8A - _021DBB82 - 2 ; case 2 + .short _021DBB8A - _021DBB82 - 2 ; case 3 +_021DBB8A: + mov r0, #1 + bx lr +_021DBB8E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DBB70 + + thumb_func_start ov5_021DBB94 +ov5_021DBB94: ; 0x021DBB94 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0xc] + bl sub_020507E4 + add r4, r0, #0 + bl sub_0206B0E8 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0206B108 + add r5, r0, #0 + ldr r0, [r7, #0xc] + bl sub_0207D990 + ldr r1, _021DBC04 ; =0x000001BB + mov r2, #1 + mov r3, #4 + bl sub_0207D688 + cmp r0, #1 + bne _021DBBD2 + cmp r6, #0x64 + bhs _021DBBD2 + add r1, r6, #1 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + bl sub_0206B0F8 +_021DBBD2: + add r0, r4, #0 + bl sub_0206A9E4 + cmp r0, #1 + bne _021DBBFE + cmp r5, #0x64 + bhs _021DBBEE + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r4, #0 + add r1, r5, #0 + bl sub_0206B118 +_021DBBEE: + cmp r5, #0x64 + bne _021DBBFE + add r0, r4, #0 + bl sub_0206B0D4 + add r0, r7, #0 + bl ov5_021DBC08 +_021DBBFE: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DBC04: .word 0x000001BB + thumb_func_end ov5_021DBB94 + + thumb_func_start ov5_021DBC08 +ov5_021DBC08: ; 0x021DBC08 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_0203A4B4 + add r7, r0, #0 + ldr r5, _021DBC3C ; =0x00000000 + beq _021DBC38 +_021DBC16: + ldr r0, [r6, #0x38] + add r1, r5, #0 + bl sub_0206251C + add r4, r0, #0 + beq _021DBC32 + bl sub_02062948 + cmp r0, #0x31 + bne _021DBC32 + add r0, r4, #0 + mov r1, #2 + bl ov5_021DBECC +_021DBC32: + add r5, r5, #1 + cmp r5, r7 + blo _021DBC16 +_021DBC38: + pop {r3, r4, r5, r6, r7, pc} + nop +_021DBC3C: .word 0x00000000 + thumb_func_end ov5_021DBC08 + + thumb_func_start ov5_021DBC40 +ov5_021DBC40: ; 0x021DBC40 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + bl sub_02065700 + add r1, r0, #0 + ldr r0, _021DBC60 ; =0x00000112 + ldrh r2, [r4, r0] + add r2, r2, #1 + strh r2, [r4, r0] + add r0, r4, #0 + bl ov5_021DBC64 + pop {r4, pc} + nop +_021DBC60: .word 0x00000112 + thumb_func_end ov5_021DBC40 + + thumb_func_start ov5_021DBC64 +ov5_021DBC64: ; 0x021DBC64 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #4 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _021DBC7C + bl sub_02022974 + pop {r4, r5, r6, pc} +_021DBC7C: + ldr r0, _021DBC90 ; =ov5_021DBC94 + str r5, [r4, #8] + add r1, r4, #0 + mov r2, #0 + str r6, [r4, #4] + bl sub_0200D9E8 + str r0, [r4, #0] + pop {r4, r5, r6, pc} + nop +_021DBC90: .word ov5_021DBC94 + thumb_func_end ov5_021DBC64 + + thumb_func_start ov5_021DBC94 +ov5_021DBC94: ; 0x021DBC94 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + bl sub_0206574C + cmp r0, #1 + bne _021DBCCE + ldr r1, [r4, #8] + ldr r0, _021DBCD0 ; =0x00000112 + ldrh r0, [r1, r0] + cmp r0, #0 + bne _021DBCB0 + bl sub_02022974 +_021DBCB0: + ldr r2, [r4, #8] + ldr r0, _021DBCD0 ; =0x00000112 + ldrh r1, [r2, r0] + sub r1, r1, #1 + strh r1, [r2, r0] + ldr r0, [r4, #4] + bl sub_02065758 + ldr r0, [r4, #0] + bl sub_0200DA58 + mov r0, #4 + add r1, r4, #0 + bl sub_02018238 +_021DBCCE: + pop {r4, pc} + ; .align 2, 0 +_021DBCD0: .word 0x00000112 + thumb_func_end ov5_021DBC94 + + thumb_func_start ov5_021DBCD4 +ov5_021DBCD4: ; 0x021DBCD4 + ldr r1, _021DBCDC ; =0x00000112 + ldrh r0, [r0, r1] + bx lr + nop +_021DBCDC: .word 0x00000112 + thumb_func_end ov5_021DBCD4 + + thumb_func_start ov5_021DBCE0 +ov5_021DBCE0: ; 0x021DBCE0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + ldr r0, [r0, #0xc] + bl sub_020507E4 + str r0, [sp] + mov r0, #0x11 + lsl r0, r0, #4 + mov r7, #0 + ldrh r0, [r5, r0] + add r6, r7, #0 + cmp r0, #0 + ble _021DBD7C + add r4, r5, #0 +_021DBCFE: + ldr r0, [r4, #0x10] + bl ov5_021DBD88 + add r1, r0, #0 + ldr r0, [r5, #4] + bl sub_0203F2A0 + cmp r0, #0 + bne _021DBD1E + ldr r1, [r4, #0x10] + ldr r2, _021DBD80 ; =0x021F8E34 + add r0, r5, #0 + bl ov5_021DBC40 + mov r7, #1 + b _021DBD6E +_021DBD1E: + bl sub_0201D2E8 + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, #0x32 + bge _021DBD6E + ldr r0, [r4, #0x10] + bl ov5_021DBEB8 + cmp r0, #0 + bne _021DBD6E + ldr r0, [r4, #0x10] + mov r1, #0x31 + bl ov5_021DBECC + ldr r1, [r4, #0x10] + ldr r2, _021DBD84 ; =0x021F8E3C + add r0, r5, #0 + bl ov5_021DBC40 + ldr r0, [r5, #4] + ldr r1, [r4, #0x10] + mov r2, #0 + bl ov5_021DBF70 + add r7, r0, #0 + beq _021DBD66 + mov r1, #0x31 + bl ov5_021DBECC + ldr r2, _021DBD84 ; =0x021F8E3C + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021DBC40 +_021DBD66: + ldr r0, [sp] + mov r7, #1 + bl sub_0206A9C4 +_021DBD6E: + mov r0, #0x11 + lsl r0, r0, #4 + ldrh r0, [r5, r0] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _021DBCFE +_021DBD7C: + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DBD80: .word 0x021F8E34 +_021DBD84: .word 0x021F8E3C + thumb_func_end ov5_021DBCE0 + + thumb_func_start ov5_021DBD88 +ov5_021DBD88: ; 0x021DBD88 + push {r3, lr} + bl sub_02062960 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0203F254 + pop {r3, pc} + thumb_func_end ov5_021DBD88 + + thumb_func_start ov5_021DBD98 +ov5_021DBD98: ; 0x021DBD98 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, r1, #0 + add r5, r2, #0 + bl ov5_021DBEB8 + cmp r0, #0 + bne _021DBDAC + mov r0, #0 + pop {r3, r4, r5, pc} +_021DBDAC: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DBDDC + add r5, r0, #0 + cmp r5, #0xff + bne _021DBDBE + mov r0, #0 + pop {r3, r4, r5, pc} +_021DBDBE: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DBDFC + add r2, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DBE48 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021DBEA4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DBD98 + + thumb_func_start ov5_021DBDDC +ov5_021DBDDC: ; 0x021DBDDC + ldr r3, _021DBDF8 ; =0x021F8E48 + mov r2, #0 +_021DBDE0: + ldrh r0, [r3] + cmp r1, r0 + bne _021DBDEC + lsl r0, r2, #0x10 + lsr r0, r0, #0x10 + bx lr +_021DBDEC: + add r2, r2, #1 + add r3, #0xc + cmp r2, #0xf0 + blo _021DBDE0 + mov r0, #0xff + bx lr + ; .align 2, 0 +_021DBDF8: .word 0x021F8E48 + thumb_func_end ov5_021DBDDC + + thumb_func_start ov5_021DBDFC +ov5_021DBDFC: ; 0x021DBDFC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0xc + ldr r2, _021DBE40 ; =0x021F8E48 + mul r0, r1 + add r0, r2, r0 + ldr r7, _021DBE44 ; =0x0000FFFF + mov r4, #1 + add r5, r0, #2 +_021DBE0E: + ldrh r1, [r5] + cmp r1, #0 + bne _021DBE1C + sub r0, r4, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DBE1C: + cmp r1, r7 + beq _021DBE30 + add r0, r6, #0 + bl sub_0203F2A0 + cmp r0, #0 + bne _021DBE30 + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021DBE30: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #6 + blt _021DBE0E + sub r0, r4, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DBE40: .word 0x021F8E48 +_021DBE44: .word 0x0000FFFF + thumb_func_end ov5_021DBDFC + + thumb_func_start ov5_021DBE48 +ov5_021DBE48: ; 0x021DBE48 + push {r3, r4, r5, lr} + ldr r0, [r0, #0xc] + add r5, r1, #0 + add r4, r2, #0 + bl sub_020507E4 + cmp r4, #0 + beq _021DBE6C + add r1, r4, #0 + bl sub_0206AB00 + cmp r0, #0 + bne _021DBE6C + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021DBE70 + add r4, r0, #0 +_021DBE6C: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DBE48 + + thumb_func_start ov5_021DBE70 +ov5_021DBE70: ; 0x021DBE70 + sub r1, r1, #1 + lsl r1, r1, #0x10 + ldr r2, _021DBE9C ; =0x021F8E48 + lsr r3, r1, #0x10 + beq _021DBE96 + mov r1, #0xc + mul r1, r0 + add r2, r2, r1 + ldr r1, _021DBEA0 ; =0x0000FFFF +_021DBE82: + lsl r0, r3, #1 + ldrh r0, [r2, r0] + cmp r0, r1 + beq _021DBE8E + add r0, r3, #0 + bx lr +_021DBE8E: + sub r0, r3, #1 + lsl r0, r0, #0x10 + lsr r3, r0, #0x10 + bne _021DBE82 +_021DBE96: + mov r0, #0 + bx lr + nop +_021DBE9C: .word 0x021F8E48 +_021DBEA0: .word 0x0000FFFF + thumb_func_end ov5_021DBE70 + + thumb_func_start ov5_021DBEA4 +ov5_021DBEA4: ; 0x021DBEA4 + mov r2, #0xc + mul r2, r0 + ldr r0, _021DBEB4 ; =0x021F8E48 + lsl r1, r1, #1 + add r0, r0, r2 + ldrh r0, [r1, r0] + bx lr + nop +_021DBEB4: .word 0x021F8E48 + thumb_func_end ov5_021DBEA4 + + thumb_func_start ov5_021DBEB8 +ov5_021DBEB8: ; 0x021DBEB8 + push {r3, lr} + bl sub_02062948 + cmp r0, #0x31 + bne _021DBEC6 + mov r0, #1 + pop {r3, pc} +_021DBEC6: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DBEB8 + + thumb_func_start ov5_021DBECC +ov5_021DBECC: ; 0x021DBECC + ldr r3, _021DBED0 ; =sub_020633A8 + bx r3 + ; .align 2, 0 +_021DBED0: .word sub_020633A8 + thumb_func_end ov5_021DBECC + + thumb_func_start ov5_021DBED4 +ov5_021DBED4: ; 0x021DBED4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + beq _021DBF1C + add r0, r5, #0 + bl sub_0206298C + cmp r0, #0 + bne _021DBEEA + mov r4, #0xe + b _021DBEFC +_021DBEEA: + cmp r0, #1 + bne _021DBEF2 + mov r4, #0xf + b _021DBEFC +_021DBEF2: + cmp r0, #2 + bne _021DBEFA + mov r4, #0x10 + b _021DBEFC +_021DBEFA: + mov r4, #0x11 +_021DBEFC: + add r0, r6, #0 + add r1, r5, #0 + mov r2, #1 + bl ov5_021DBF70 + cmp r0, #0 + beq _021DBF12 + lsl r1, r4, #0x10 + lsr r1, r1, #0x10 + bl ov5_021DBECC +_021DBF12: + lsl r1, r4, #0x10 + add r0, r5, #0 + lsr r1, r1, #0x10 + bl ov5_021DBECC +_021DBF1C: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DBED4 + + thumb_func_start ov5_021DBF20 +ov5_021DBF20: ; 0x021DBF20 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_0203A4B4 + ldr r5, _021DBF6C ; =0x00000000 + add r7, r0, #0 + str r5, [sp] + beq _021DBF5C +_021DBF30: + ldr r0, [r6, #0x38] + add r1, r5, #0 + bl sub_0206251C + add r4, r0, #0 + beq _021DBF56 + bl sub_02062D1C + cmp r0, #1 + bne _021DBF50 + add r0, r4, #0 + bl sub_02062DDC + mov r0, #1 + str r0, [sp] + b _021DBF56 +_021DBF50: + add r0, r4, #0 + bl sub_02062DD0 +_021DBF56: + add r5, r5, #1 + cmp r5, r7 + blo _021DBF30 +_021DBF5C: + ldr r0, [sp] + cmp r0, #0 + bne _021DBF66 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DBF66: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DBF6C: .word 0x00000000 + thumb_func_end ov5_021DBF20 + + thumb_func_start ov5_021DBF70 +ov5_021DBF70: ; 0x021DBF70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + str r0, [sp] + str r2, [sp, #4] + bl sub_0203A4B4 + add r7, r0, #0 + add r0, r4, #0 + bl sub_02062960 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0xc] + bl sub_0203F254 + str r0, [sp, #8] + bl sub_0203F28C + cmp r0, #0 + bne _021DBFA0 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DBFA0: + mov r4, #0 + cmp r7, #0 + bls _021DC012 +_021DBFA6: + ldr r0, [sp] + add r1, r4, #0 + ldr r0, [r0, #0x38] + bl sub_0206251C + add r5, r0, #0 + beq _021DC00C + ldr r1, [sp, #4] + cmp r1, #0 + bne _021DBFC2 + bl sub_02062948 + cmp r0, #0x31 + beq _021DC00C +_021DBFC2: + add r0, r5, #0 + bl sub_02062950 + cmp r0, #8 + bhi _021DC00C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DBFD8: ; jump table + .short _021DC00C - _021DBFD8 - 2 ; case 0 + .short _021DBFEA - _021DBFD8 - 2 ; case 1 + .short _021DBFEA - _021DBFD8 - 2 ; case 2 + .short _021DC00C - _021DBFD8 - 2 ; case 3 + .short _021DBFEA - _021DBFD8 - 2 ; case 4 + .short _021DBFEA - _021DBFD8 - 2 ; case 5 + .short _021DBFEA - _021DBFD8 - 2 ; case 6 + .short _021DBFEA - _021DBFD8 - 2 ; case 7 + .short _021DBFEA - _021DBFD8 - 2 ; case 8 +_021DBFEA: + add r0, r5, #0 + bl sub_02062960 + add r6, r0, #0 + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl sub_0203F254 + ldr r1, [sp, #0xc] + cmp r1, r6 + beq _021DC00C + ldr r1, [sp, #8] + cmp r1, r0 + bne _021DC00C + add sp, #0x10 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DC00C: + add r4, r4, #1 + cmp r4, r7 + blo _021DBFA6 +_021DC012: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DBF70 + + .rodata + + + .global Unk_ov5_021F8E34 +Unk_ov5_021F8E34: ; 0x021F8E34 + .incbin "incbin/overlay5_rodata.bin", 0x520, 0x528 - 0x520 + + .global Unk_ov5_021F8E3C +Unk_ov5_021F8E3C: ; 0x021F8E3C + .incbin "incbin/overlay5_rodata.bin", 0x528, 0x534 - 0x528 + + .global Unk_ov5_021F8E48 +Unk_ov5_021F8E48: ; 0x021F8E48 + .incbin "incbin/overlay5_rodata.bin", 0x534, 0xB40 + diff --git a/asm/ov5_021DC018.s b/asm/ov5_021DC018.s new file mode 100644 index 000000000..de90595d8 --- /dev/null +++ b/asm/ov5_021DC018.s @@ -0,0 +1,2590 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DC018 +ov5_021DC018: ; 0x021DC018 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + ldr r1, [sp, #0x2c] + add r4, r0, #0 + add r5, r2, #0 + add r7, r3, #0 + cmp r1, #0 + bne _021DC046 + ldr r2, _021DC148 ; =0x00000169 + mov r0, #1 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r1, r6, #0 + add r1, #0x8c + str r0, [r1, #0] + add r0, r6, #0 + add r0, #0x97 + ldrb r1, [r0] + mov r0, #2 + orr r1, r0 + b _021DC056 +_021DC046: + add r0, r6, #0 + add r0, #0x8c + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0x97 + ldrb r1, [r0] + mov r0, #2 + bic r1, r0 +_021DC056: + add r0, r6, #0 + add r0, #0x97 + strb r1, [r0] + add r0, r6, #0 + ldr r1, [sp, #0x24] + add r0, #0x90 + str r1, [r0, #0] + add r0, r6, #0 + str r4, [r6, #0] + ldr r1, [sp, #0x20] + add r0, #0xa0 + str r1, [r0, #0] + add r1, r6, #0 + add r1, #0xa0 + ldr r1, [r1, #0] + mov r0, #0 + strh r0, [r1] + add r1, r6, #0 + add r1, #0xa4 + str r0, [r1, #0] + add r1, r6, #0 + add r1, #0xa8 + str r0, [r1, #0] + add r1, r6, #0 + add r1, #0x97 + ldrb r3, [r1] + add r4, sp, #8 + mov r1, #1 + bic r3, r1 + ldrb r2, [r4, #0x14] + mov r1, #1 + and r1, r2 + add r2, r3, #0 + orr r2, r1 + add r1, r6, #0 + add r1, #0x97 + strb r2, [r1] + add r1, r6, #0 + ldrb r2, [r4, #0x10] + add r1, #0x96 + mov r3, #0x40 + strb r2, [r1] + add r1, r6, #0 + add r1, #0x97 + ldrb r1, [r1] + bic r1, r3 + add r3, r6, #0 + add r3, #0x97 + strb r1, [r3] + add r1, r6, #0 + add r1, #0x97 + ldrb r1, [r1] + mov r3, #0x80 + bic r1, r3 + add r3, r6, #0 + add r3, #0x97 + strb r1, [r3] + add r1, r6, #0 + add r1, #0x98 + strb r5, [r1] + add r1, r6, #0 + add r1, #0x99 + strb r7, [r1] + add r1, r6, #0 + add r1, #0x9b + strb r0, [r1] + ldr r1, [sp, #0x28] + mov r3, #3 + str r1, [r6, #0x18] + add r1, r6, #0 + add r1, #0x94 + strb r3, [r1] + mov r1, #0xb7 + lsl r1, r1, #2 + strh r2, [r6, r1] + add r2, r6, #0 + add r3, r0, #0 +_021DC0F0: + add r1, r2, #0 + add r1, #0xbc + str r3, [r1, #0] + add r1, r2, #0 + add r1, #0xc0 + add r0, r0, #1 + add r2, #8 + str r3, [r1, #0] + cmp r0, #0x1c + blt _021DC0F0 + mov r7, #0xa9 + add r1, r6, #0 + add r2, r6, #0 + mov r5, #0 + mov r0, #0xff + lsl r7, r7, #2 +_021DC110: + mov r4, #0x71 + lsl r4, r4, #2 + str r5, [r1, r4] + add r4, r4, #4 + str r5, [r1, r4] + strh r0, [r2, r7] + add r3, r3, #1 + add r1, #8 + add r2, r2, #2 + cmp r3, #0x1c + blt _021DC110 + add r4, r6, #0 + mov r7, #0x50 +_021DC12A: + add r0, r7, #0 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x1c] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #0x1c + blt _021DC12A + add r6, #0xa0 + ldr r1, _021DC14C ; =0x0000EEEE + ldr r0, [r6, #0] + strh r1, [r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_021DC148: .word 0x00000169 +_021DC14C: .word 0x0000EEEE + thumb_func_end ov5_021DC018 + + thumb_func_start ov5_021DC150 +ov5_021DC150: ; 0x021DC150 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r1, #0 + mov r1, #0x2e + add r6, r0, #0 + mov r0, #4 + lsl r1, r1, #4 + str r2, [sp, #0x18] + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021DC170 + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021DC170: + mov r2, #0x2e + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + str r5, [sp] + add r0, sp, #0x20 + ldrb r0, [r0, #0x10] + add r1, r4, #0 + add r2, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x34] + str r0, [sp, #8] + ldr r0, [sp, #0x38] + str r0, [sp, #0xc] + ldr r0, [sp, #0x3c] + str r0, [sp, #0x10] + ldr r0, [sp, #0x40] + str r0, [sp, #0x14] + ldr r3, [sp, #0x18] + add r0, r6, #0 + bl ov5_021DC018 + add r0, r4, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021DC150 + + thumb_func_start ov5_021DC1A4 +ov5_021DC1A4: ; 0x021DC1A4 + ldr r3, _021DC1A8 ; =ov5_021DC290 + bx r3 + ; .align 2, 0 +_021DC1A8: .word ov5_021DC290 + thumb_func_end ov5_021DC1A4 + + thumb_func_start ov5_021DC1AC +ov5_021DC1AC: ; 0x021DC1AC + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + bl ov5_021DC300 + mov r1, #7 + tst r1, r0 + bne _021DC1C0 + lsr r0, r0, #3 + b _021DC1C4 +_021DC1C0: + lsr r0, r0, #3 + add r0, r0, #1 +_021DC1C4: + add r1, r4, #0 + add r1, #0x97 + ldrb r1, [r1] + lsl r1, r1, #0x19 + lsr r1, r1, #0x1f + beq _021DC1DE + add r1, r4, #0 + add r1, #0x98 + ldrb r1, [r1] + sub r2, r1, r0 + add r1, r4, #0 + add r1, #0x98 + strb r2, [r1] +_021DC1DE: + add r1, r4, #0 + add r1, #0x97 + ldrb r1, [r1] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1f + beq _021DC200 + add r1, r4, #0 + add r1, #0x99 + ldrb r2, [r1] + add r1, r4, #0 + add r1, #0x9b + ldrb r1, [r1] + lsl r1, r1, #1 + sub r2, r2, r1 + add r1, r4, #0 + add r1, #0x99 + strb r2, [r1] +_021DC200: + add r1, r4, #0 + add r1, #0x99 + ldrb r1, [r1] + lsl r0, r0, #0x18 + add r3, r4, #0 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x9b + ldrb r0, [r0] + add r1, r4, #0 + add r3, #0x98 + lsl r0, r0, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + str r0, [sp, #0x10] + ldr r0, [r4, #0] + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r2, _021DC288 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r4, #0 + ldr r2, _021DC288 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + bl ov5_021DC33C + add r1, r4, #0 + add r1, #0x96 + add r0, r4, #0 + ldrb r1, [r1] + add r0, #0xac + mov r2, #4 + bl sub_02001B9C + add r1, r4, #0 + add r1, #0xb8 + str r0, [r1, #0] + ldr r0, _021DC28C ; =ov5_021DC3B0 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add sp, #0x14 + pop {r3, r4, pc} + nop +_021DC288: .word 0x000003D9 +_021DC28C: .word ov5_021DC3B0 + thumb_func_end ov5_021DC1AC + + thumb_func_start ov5_021DC290 +ov5_021DC290: ; 0x021DC290 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + mov r0, #0x50 + mov r1, #4 + add r6, r2, #0 + bl sub_02023790 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r7, #0 + add r2, r4, #0 + bl sub_0200B1B8 + add r1, r5, #0 + add r1, #0x9b + ldrb r1, [r1] + add r0, r5, #0 + add r0, #0x90 + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r0, #0] + ldr r1, [r1, #0x1c] + add r2, r4, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x9b + ldrb r2, [r0] + lsl r0, r2, #2 + add r0, r5, r0 + ldr r1, [r0, #0x1c] + lsl r0, r2, #3 + add r0, r5, r0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + lsl r0, r0, #3 + add r0, r5, r0 + add r0, #0xc0 + str r6, [r0, #0] + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + add r5, #0x9b + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DC290 + + thumb_func_start ov5_021DC300 +ov5_021DC300: ; 0x021DC300 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, #0x9b + ldrb r0, [r0] + mov r6, #0 + add r4, r6, #0 + cmp r0, #0 + ble _021DC336 + add r5, r7, #0 +_021DC312: + add r0, r5, #0 + add r0, #0xbc + ldr r1, [r0, #0] + cmp r1, #0 + beq _021DC336 + mov r0, #0 + bl sub_02002F04 + cmp r6, r0 + bhs _021DC328 + add r6, r0, #0 +_021DC328: + add r0, r7, #0 + add r0, #0x9b + ldrb r0, [r0] + add r4, r4, #1 + add r5, #8 + cmp r4, r0 + blt _021DC312 +_021DC336: + add r6, #0xc + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DC300 + + thumb_func_start ov5_021DC33C +ov5_021DC33C: ; 0x021DC33C + add r2, r0, #0 + add r1, r0, #0 + add r2, #0xbc + add r1, #0xac + str r2, [r1, #0] + add r2, r0, #0 + add r1, r0, #0 + add r2, #8 + add r1, #0xb0 + str r2, [r1, #0] + add r1, r0, #0 + mov r2, #0 + add r1, #0xb4 + strb r2, [r1] + add r1, r0, #0 + mov r2, #1 + add r1, #0xb5 + strb r2, [r1] + add r1, r0, #0 + add r1, #0x9b + ldrb r2, [r1] + add r1, r0, #0 + add r1, #0xb6 + strb r2, [r1] + add r2, r0, #0 + add r2, #0xb7 + ldrb r3, [r2] + mov r2, #0xf + add r1, r0, #0 + bic r3, r2 + add r2, r0, #0 + add r2, #0xb7 + strb r3, [r2] + add r2, r0, #0 + add r2, #0xb7 + ldrb r3, [r2] + mov r2, #0x30 + add r1, #0xb7 + bic r3, r2 + add r2, r0, #0 + add r2, #0xb7 + strb r3, [r2] + add r0, #0x9b + ldrb r0, [r0] + ldrb r2, [r1] + cmp r0, #4 + blo _021DC3A6 + mov r0, #0xc0 + bic r2, r0 + mov r0, #0x40 + orr r0, r2 + strb r0, [r1] + bx lr +_021DC3A6: + mov r0, #0xc0 + bic r2, r0 + strb r2, [r1] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DC33C + + thumb_func_start ov5_021DC3B0 +ov5_021DC3B0: ; 0x021DC3B0 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + add r0, #0x94 + ldrb r0, [r0] + cmp r0, #0 + beq _021DC3CC + add r0, r4, #0 + add r0, #0x94 + ldrb r0, [r0] + add r4, #0x94 + sub r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_021DC3CC: + bl sub_0200F2AC + cmp r0, #0 + beq _021DC41C + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl sub_02001BE0 + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _021DC3EE + add r1, r1, #1 + cmp r0, r1 + beq _021DC41C + b _021DC40E +_021DC3EE: + add r0, r4, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021DC41C + add r0, r4, #0 + add r0, #0xa0 + ldr r1, _021DC420 ; =0x0000FFFE + ldr r0, [r0, #0] + strh r1, [r0] + add r0, r4, #0 + bl ov5_021DC424 + pop {r4, pc} +_021DC40E: + add r1, r4, #0 + add r1, #0xa0 + ldr r1, [r1, #0] + strh r0, [r1] + add r0, r4, #0 + bl ov5_021DC424 +_021DC41C: + pop {r4, pc} + nop +_021DC420: .word 0x0000FFFE + thumb_func_end ov5_021DC3B0 + + thumb_func_start ov5_021DC424 +ov5_021DC424: ; 0x021DC424 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _021DC488 ; =0x000005DC + bl sub_02005748 + add r0, r6, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02001BC4 + add r0, r6, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_021DC454: + ldr r0, [r5, #0x1c] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x1c + blt _021DC454 + add r0, r6, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021DC47A + add r0, r6, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_0200B190 +_021DC47A: + ldr r0, [r6, #4] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DC488: .word 0x000005DC + thumb_func_end ov5_021DC424 + + thumb_func_start ov5_021DC48C +ov5_021DC48C: ; 0x021DC48C + push {r3, r4, lr} + sub sp, #0x14 + add r4, sp, #0x10 + ldrb r4, [r4, #0x10] + str r4, [sp] + ldr r4, [sp, #0x24] + str r4, [sp, #4] + ldr r4, [sp, #0x28] + str r4, [sp, #8] + ldr r4, [sp, #0x2c] + str r4, [sp, #0xc] + ldr r4, [sp, #0x30] + str r4, [sp, #0x10] + bl ov5_021DC150 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DC48C + + thumb_func_start ov5_021DC4B0 +ov5_021DC4B0: ; 0x021DC4B0 + push {r3, lr} + bl ov5_021DC708 + pop {r3, pc} + thumb_func_end ov5_021DC4B0 + + thumb_func_start ov5_021DC4B8 +ov5_021DC4B8: ; 0x021DC4B8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021DC7A8 + mov r1, #7 + tst r1, r0 + bne _021DC4CA + lsr r1, r0, #3 + b _021DC4CE +_021DC4CA: + lsr r0, r0, #3 + add r1, r0, #1 +_021DC4CE: + add r0, r4, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + beq _021DC4E8 + add r0, r4, #0 + add r0, #0x98 + ldrb r0, [r0] + sub r2, r0, r1 + add r0, r4, #0 + add r0, #0x98 + strb r2, [r0] +_021DC4E8: + add r0, r4, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + beq _021DC51E + add r0, r4, #0 + add r0, #0x9b + ldrb r3, [r0] + cmp r3, #8 + bls _021DC50E + add r0, r4, #0 + add r0, #0x99 + ldrb r2, [r0] + add r0, r4, #0 + add r0, #0x99 + sub r2, #0x10 + strb r2, [r0] + b _021DC51E +_021DC50E: + add r0, r4, #0 + add r0, #0x99 + ldrb r2, [r0] + lsl r0, r3, #1 + sub r2, r2, r0 + add r0, r4, #0 + add r0, #0x99 + strb r2, [r0] +_021DC51E: + add r0, r4, #0 + bl ov5_021DC530 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DC4B8 + + thumb_func_start ov5_021DC528 +ov5_021DC528: ; 0x021DC528 + ldr r3, _021DC52C ; =ov5_021DC530 + bx r3 + ; .align 2, 0 +_021DC52C: .word ov5_021DC530 + thumb_func_end ov5_021DC528 + + thumb_func_start ov5_021DC530 +ov5_021DC530: ; 0x021DC530 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + add r0, #0x9b + ldrb r2, [r0] + cmp r2, #8 + bls _021DC56E + add r0, r4, #0 + add r0, #0x99 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x98 + str r0, [sp] + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r4, #0 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + b _021DC59E +_021DC56E: + add r0, r4, #0 + add r0, #0x99 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x98 + str r0, [sp] + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + lsl r0, r2, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r4, #0 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 +_021DC59E: + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r2, _021DC5F8 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r4, #0 + ldr r2, _021DC5F8 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + bl ov5_021DC7E4 + add r2, r4, #0 + add r2, #0x96 + mov r0, #0x67 + lsl r0, r0, #2 + ldrb r2, [r2] + add r0, r4, r0 + mov r1, #0 + mov r3, #4 + bl sub_0200112C + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + bl ov5_021DCAF4 + ldr r0, _021DC5FC ; =ov5_021DC95C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_021DC5F8: .word 0x000003D9 +_021DC5FC: .word ov5_021DC95C + thumb_func_end ov5_021DC530 + + thumb_func_start ov5_021DC600 +ov5_021DC600: ; 0x021DC600 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov5_021DC7A8 + mov r1, #7 + tst r1, r0 + bne _021DC618 + lsr r1, r0, #3 + b _021DC61C +_021DC618: + lsr r0, r0, #3 + add r1, r0, #1 +_021DC61C: + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + cmp r0, #8 + bls _021DC656 + add r0, r5, #0 + add r0, #0x99 + ldrb r0, [r0] + add r3, r5, #0 + add r3, #0x98 + str r0, [sp] + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, r5, #0 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + b _021DC686 +_021DC656: + add r2, r5, #0 + add r2, #0x99 + ldrb r2, [r2] + lsl r1, r1, #0x18 + lsl r0, r0, #0x19 + str r2, [sp] + lsr r1, r1, #0x18 + str r1, [sp, #4] + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + add r3, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r3, #0x98 + add r1, r5, #0 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 +_021DC686: + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r2, _021DC700 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r5, #0 + ldr r2, _021DC700 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + bl ov5_021DC7E4 + add r0, r5, #0 + add r0, #0xa4 + str r4, [r0, #0] + add r0, r5, #0 + add r0, #0xa8 + str r6, [r0, #0] + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + mov r3, #4 + ldrh r1, [r0] + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + ldrh r0, [r0] + add r1, r1, r0 + mov r0, #0xb7 + lsl r0, r0, #2 + strh r1, [r5, r0] + mov r0, #0x67 + lsl r0, r0, #2 + ldrh r1, [r4] + ldrh r2, [r6] + add r0, r5, r0 + bl sub_0200112C + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r5, #0 + bl ov5_021DCAF4 + ldr r0, _021DC704 ; =ov5_021DC95C + add r1, r5, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021DC700: .word 0x000003D9 +_021DC704: .word ov5_021DC95C + thumb_func_end ov5_021DC600 + + thumb_func_start ov5_021DC708 +ov5_021DC708: ; 0x021DC708 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r0, #0x50 + mov r1, #4 + add r7, r2, #0 + add r4, r3, #0 + bl sub_02023790 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [sp] + add r2, r6, #0 + bl sub_0200B1B8 + add r1, r5, #0 + add r1, #0x9b + ldrb r1, [r1] + add r0, r5, #0 + add r0, #0x90 + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r0, #0] + ldr r1, [r1, #0x1c] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0x9b + ldrb r1, [r0] + lsl r0, r1, #2 + add r0, r5, r0 + lsl r1, r1, #3 + add r2, r5, r1 + mov r1, #0x71 + ldr r0, [r0, #0x1c] + lsl r1, r1, #2 + str r0, [r2, r1] + add r0, r6, #0 + bl sub_020237BC + cmp r4, #0xfa + bne _021DC778 + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + mov r2, #2 + mvn r2, r2 + lsl r0, r0, #3 + add r1, r5, r0 + mov r0, #0x72 + lsl r0, r0, #2 + str r2, [r1, r0] + b _021DC788 +_021DC778: + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + lsl r0, r0, #3 + add r1, r5, r0 + mov r0, #0x72 + lsl r0, r0, #2 + str r4, [r1, r0] +_021DC788: + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + lsl r0, r0, #1 + add r1, r5, r0 + mov r0, #0xa9 + lsl r0, r0, #2 + strh r7, [r1, r0] + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + add r5, #0x9b + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DC708 + + thumb_func_start ov5_021DC7A8 +ov5_021DC7A8: ; 0x021DC7A8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, #0x9b + ldrb r0, [r0] + mov r6, #0 + add r4, r6, #0 + cmp r0, #0 + ble _021DC7DE + add r5, r7, #0 +_021DC7BA: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + beq _021DC7DE + mov r0, #0 + bl sub_02002F04 + cmp r6, r0 + bhs _021DC7D0 + add r6, r0, #0 +_021DC7D0: + add r0, r7, #0 + add r0, #0x9b + ldrb r0, [r0] + add r4, r4, #1 + add r5, #8 + cmp r4, r0 + blt _021DC7BA +_021DC7DE: + add r6, #0xc + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DC7A8 + + thumb_func_start ov5_021DC7E4 +ov5_021DC7E4: ; 0x021DC7E4 + push {r4, r5} + mov r3, #0x71 + lsl r3, r3, #2 + add r1, r3, #0 + add r2, r0, r3 + sub r1, #0x28 + str r2, [r0, r1] + add r1, r3, #0 + ldr r2, _021DC8E0 ; =ov5_021DC918 + sub r1, #0x24 + str r2, [r0, r1] + add r1, r3, #0 + ldr r2, _021DC8E4 ; =ov5_021DC8F4 + sub r1, #0x20 + str r2, [r0, r1] + add r2, r0, #0 + add r1, r3, #0 + add r2, #8 + sub r1, #0x1c + str r2, [r0, r1] + add r1, r0, #0 + add r1, #0x9b + ldrb r2, [r1] + add r1, r3, #0 + sub r1, #0x18 + strh r2, [r0, r1] + add r1, r3, #0 + mov r2, #8 + sub r1, #0x16 + strh r2, [r0, r1] + add r1, r3, #0 + mov r2, #1 + sub r1, #0x14 + strb r2, [r0, r1] + add r1, r3, #0 + mov r4, #0xc + sub r1, #0x13 + strb r4, [r0, r1] + add r1, r3, #0 + mov r4, #2 + sub r1, #0x12 + strb r4, [r0, r1] + add r1, r3, #0 + sub r1, #0x11 + ldrb r4, [r0, r1] + mov r1, #0xf + bic r4, r1 + orr r4, r2 + add r2, r3, #0 + sub r2, #0x11 + strb r4, [r0, r2] + add r2, r3, #0 + sub r2, #0x11 + ldrb r5, [r0, r2] + mov r2, #0xf0 + mov r4, #0x10 + bic r5, r2 + orr r5, r4 + add r4, r3, #0 + sub r4, #0x11 + strb r5, [r0, r4] + add r4, r3, #0 + sub r4, #0x10 + ldrb r4, [r0, r4] + bic r4, r1 + mov r1, #0xf + orr r4, r1 + add r1, r3, #0 + sub r1, #0x10 + strb r4, [r0, r1] + add r1, r3, #0 + sub r1, #0x10 + ldrb r4, [r0, r1] + mov r1, #0x20 + bic r4, r2 + add r2, r4, #0 + orr r2, r1 + add r1, r3, #0 + sub r1, #0x10 + strb r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + mov r1, #7 + bic r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + mov r1, #0x78 + bic r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + ldr r1, _021DC8E8 ; =0xFFFFFE7F + and r2, r1 + mov r1, #0x80 + orr r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + ldr r1, _021DC8EC ; =0xFFFF81FF + and r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + ldr r1, _021DC8F0 ; =0xFFFF7FFF + and r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + sub r3, #0xc + str r0, [r0, r3] + pop {r4, r5} + bx lr + ; .align 2, 0 +_021DC8E0: .word ov5_021DC918 +_021DC8E4: .word ov5_021DC8F4 +_021DC8E8: .word 0xFFFFFE7F +_021DC8EC: .word 0xFFFF81FF +_021DC8F0: .word 0xFFFF7FFF + thumb_func_end ov5_021DC7E4 + + thumb_func_start ov5_021DC8F4 +ov5_021DC8F4: ; 0x021DC8F4 + push {r3, lr} + mov r2, #2 + mvn r2, r2 + cmp r1, r2 + bne _021DC90A + mov r1, #3 + mov r2, #0xf + mov r3, #4 + bl sub_0200147C + pop {r3, pc} +_021DC90A: + mov r1, #1 + mov r2, #0xf + mov r3, #2 + bl sub_0200147C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DC8F4 + + thumb_func_start ov5_021DC918 +ov5_021DC918: ; 0x021DC918 + push {r3, r4, r5, lr} + mov r2, #0 + add r1, sp, #0 + strh r2, [r1, #2] + strh r2, [r1] + mov r1, #0x13 + add r5, r0, #0 + bl sub_02001504 + add r1, sp, #0 + add r4, r0, #0 + add r0, r5, #0 + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + add r0, r4, #0 + add r0, #0xa4 + ldr r2, [r0, #0] + cmp r2, #0 + beq _021DC95A + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DC95A + add r0, sp, #0 + ldrh r1, [r0, #2] + add r4, #0xa8 + strh r1, [r2] + ldrh r1, [r0] + ldr r0, [r4, #0] + strh r1, [r0] +_021DC95A: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DC918 + + thumb_func_start ov5_021DC95C +ov5_021DC95C: ; 0x021DC95C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r0, r5, #0 + add r0, #0x94 + ldrb r0, [r0] + cmp r0, #0 + beq _021DC978 + add r0, r5, #0 + add r0, #0x94 + ldrb r0, [r0] + add r5, #0x94 + sub r0, r0, #1 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021DC978: + bl sub_0200F2AC + cmp r0, #0 + beq _021DCA1A + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02001288 + add r4, r0, #0 + mov r0, #0x6f + mov r1, #0xb7 + lsl r0, r0, #2 + lsl r1, r1, #2 + ldrh r6, [r5, r1] + ldr r0, [r5, r0] + add r1, r5, r1 + bl sub_020014D0 + mov r0, #0xb7 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + cmp r6, r0 + beq _021DC9AE + ldr r0, _021DCA1C ; =0x000005DC + bl sub_02005748 +_021DC9AE: + ldr r0, _021DCA20 ; =0x021BF67C + mov r1, #0x40 + ldr r0, [r0, #0x4c] + tst r1, r0 + bne _021DC9CA + mov r1, #0x80 + tst r1, r0 + bne _021DC9CA + mov r1, #0x20 + tst r1, r0 + bne _021DC9CA + mov r1, #0x10 + tst r0, r1 + beq _021DC9D0 +_021DC9CA: + add r0, r5, #0 + bl ov5_021DCAF4 +_021DC9D0: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _021DC9E0 + add r0, r0, #1 + cmp r4, r0 + beq _021DCA1A + b _021DCA06 +_021DC9E0: + add r0, r5, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021DCA1A + ldr r0, _021DCA1C ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0xa0 + ldr r1, _021DCA24 ; =0x0000FFFE + ldr r0, [r0, #0] + strh r1, [r0] + add r0, r5, #0 + bl ov5_021DCA28 + pop {r4, r5, r6, pc} +_021DCA06: + ldr r0, _021DCA1C ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + strh r4, [r0] + add r0, r5, #0 + bl ov5_021DCA28 +_021DCA1A: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DCA1C: .word 0x000005DC +_021DCA20: .word 0x021BF67C +_021DCA24: .word 0x0000FFFE + thumb_func_end ov5_021DC95C + + thumb_func_start ov5_021DCA28 +ov5_021DCA28: ; 0x021DCA28 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _021DCA8C ; =0x000005DC + bl sub_02005748 + mov r0, #0x6f + lsl r0, r0, #2 + mov r1, #0 + ldr r0, [r6, r0] + add r2, r1, #0 + bl sub_02001384 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + add r0, #8 + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_021DCA58: + ldr r0, [r5, #0x1c] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x1c + blt _021DCA58 + add r0, r6, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021DCA7E + add r0, r6, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_0200B190 +_021DCA7E: + ldr r0, [r6, #4] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DCA8C: .word 0x000005DC + thumb_func_end ov5_021DCA28 + + thumb_func_start ov5_021DCA90 +ov5_021DCA90: ; 0x021DCA90 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + str r1, [sp, #0xc] + mov r0, #0x50 + mov r1, #4 + add r7, r2, #0 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x50 + mov r1, #4 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [r5, #0x18] + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [sp, #0xc] + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + str r7, [sp, #4] + str r3, [sp, #8] + ldr r0, [r5, #0x18] + mov r1, #1 + add r2, r6, #0 + bl sub_0201D738 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DCA90 + + thumb_func_start ov5_021DCAF4 +ov5_021DCAF4: ; 0x021DCAF4 + push {r4, lr} + mov r1, #0x6f + add r4, r0, #0 + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, r1, #6 + add r1, r4, r1 + bl sub_020014D0 + ldr r0, _021DCB20 ; =0x000001C2 + ldrh r1, [r4, r0] + add r0, #0xe2 + lsl r1, r1, #1 + add r1, r4, r1 + ldrh r1, [r1, r0] + cmp r1, #0xff + beq _021DCB1E + add r0, r4, #0 + mov r2, #0 + bl ov5_021DCA90 +_021DCB1E: + pop {r4, pc} + ; .align 2, 0 +_021DCB20: .word 0x000001C2 + thumb_func_end ov5_021DCAF4 + + thumb_func_start ov5_021DCB24 +ov5_021DCB24: ; 0x021DCB24 + push {r4, r5, lr} + sub sp, #0x14 + mov r4, #0 + str r4, [sp] + str r3, [sp, #4] + ldr r3, [sp, #0x20] + str r3, [sp, #8] + str r4, [sp, #0xc] + add r3, r4, #0 + str r4, [sp, #0x10] + bl ov5_021DC150 + add r5, r0, #0 + add r0, r4, #0 + add r1, r0, #0 + bl sub_02002DF8 + lsl r1, r0, #3 + mov r0, #7 + tst r0, r1 + bne _021DCB52 + lsr r4, r1, #3 + b _021DCB56 +_021DCB52: + lsr r0, r1, #3 + add r4, r0, #1 +_021DCB56: + add r0, r5, #0 + add r0, #0x99 + ldrb r0, [r0] + add r3, r5, #0 + add r1, r5, #0 + str r0, [sp] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xdd + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r3, #0x98 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r2, _021DCBF8 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r5, #0 + ldr r2, _021DCBF8 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + lsl r0, r4, #0x13 + lsr r0, r0, #0x10 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0 + add r0, #8 + mov r1, #0xf + add r3, r2, #0 + bl sub_0201AE78 + mov r2, #0 + add r0, r5, #0 + mov r1, #0xf + add r3, r2, #0 + bl ov5_021DCC00 + mov r1, #0x10 + add r0, r5, #0 + mov r2, #0x20 + add r3, r1, #0 + bl ov5_021DCC00 + add r0, r5, #0 + add r1, r5, #0 + add r0, #8 + add r1, #0xb0 + str r0, [r1, #0] + bl sub_0201A954 + ldr r0, _021DCBFC ; =ov5_021DCC64 + add r1, r5, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + add sp, #0x14 + pop {r4, r5, pc} + nop +_021DCBF8: .word 0x000003D9 +_021DCBFC: .word ov5_021DCC64 + thumb_func_end ov5_021DCB24 + + thumb_func_start ov5_021DCC00 +ov5_021DCC00: ; 0x021DCC00 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #0xc] + add r5, r0, #0 + mov r0, #0x50 + mov r1, #4 + str r2, [sp, #0x10] + add r7, r3, #0 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x50 + mov r1, #4 + bl sub_02023790 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [sp, #0xc] + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + str r7, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + add r5, #8 + ldr r3, [sp, #0x10] + add r0, r5, #0 + add r2, r6, #0 + bl sub_0201D738 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DCC00 + + thumb_func_start ov5_021DCC64 +ov5_021DCC64: ; 0x021DCC64 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r0, r6, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + ldrh r1, [r0] + ldr r0, _021DCCC4 ; =0x0000FFFF + cmp r1, r0 + bne _021DCCC2 + add r0, r6, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_021DCC90: + ldr r0, [r5, #0x1c] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x1c + blt _021DCC90 + add r0, r6, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021DCCB6 + add r0, r6, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_0200B190 +_021DCCB6: + ldr r0, [r6, #4] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 +_021DCCC2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021DCCC4: .word 0x0000FFFF + thumb_func_end ov5_021DCC64 + + thumb_func_start ov5_021DCCC8 +ov5_021DCCC8: ; 0x021DCCC8 + cmp r0, #0x8a + bgt _021DCD0A + bge _021DCD68 + cmp r0, #0x68 + bgt _021DCCF8 + bge _021DCD48 + cmp r0, #0xe + bgt _021DCCF2 + add r1, r0, #0 + sub r1, #0xb + bmi _021DCD8C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DCCEA: ; jump table + .short _021DCD7C - _021DCCEA - 2 ; case 0 + .short _021DCD80 - _021DCCEA - 2 ; case 1 + .short _021DCD84 - _021DCCEA - 2 ; case 2 + .short _021DCD88 - _021DCCEA - 2 ; case 3 +_021DCCF2: + cmp r0, #0x67 + beq _021DCD44 + b _021DCD8C +_021DCCF8: + cmp r0, #0x71 + bgt _021DCD04 + bge _021DCD58 + cmp r0, #0x70 + beq _021DCD54 + b _021DCD8C +_021DCD04: + cmp r0, #0x89 + beq _021DCD64 + b _021DCD8C +_021DCD0A: + cmp r0, #0xa4 + bgt _021DCD2C + bge _021DCD4C + cmp r0, #0x8b + bgt _021DCD18 + beq _021DCD6C + b _021DCD8C +_021DCD18: + cmp r0, #0x96 + bgt _021DCD8C + cmp r0, #0x8c + blt _021DCD8C + beq _021DCD70 + cmp r0, #0x8d + beq _021DCD74 + cmp r0, #0x96 + beq _021DCD50 + b _021DCD8C +_021DCD2C: + ldr r1, _021DCD90 ; =0x000001CE + cmp r0, r1 + bgt _021DCD3C + bge _021DCD60 + sub r1, r1, #1 + cmp r0, r1 + beq _021DCD5C + b _021DCD8C +_021DCD3C: + add r1, #0x68 + cmp r0, r1 + beq _021DCD78 + b _021DCD8C +_021DCD44: + mov r0, #1 + bx lr +_021DCD48: + mov r0, #0 + bx lr +_021DCD4C: + mov r0, #0 + bx lr +_021DCD50: + mov r0, #1 + bx lr +_021DCD54: + mov r0, #1 + bx lr +_021DCD58: + mov r0, #0 + bx lr +_021DCD5C: + mov r0, #1 + bx lr +_021DCD60: + mov r0, #0 + bx lr +_021DCD64: + mov r0, #4 + bx lr +_021DCD68: + mov r0, #3 + bx lr +_021DCD6C: + mov r0, #2 + bx lr +_021DCD70: + mov r0, #1 + bx lr +_021DCD74: + mov r0, #0 + bx lr +_021DCD78: + mov r0, #5 + bx lr +_021DCD7C: + mov r0, #3 + bx lr +_021DCD80: + mov r0, #2 + bx lr +_021DCD84: + mov r0, #1 + bx lr +_021DCD88: + mov r0, #0 + bx lr +_021DCD8C: + mov r0, #1 + bx lr + ; .align 2, 0 +_021DCD90: .word 0x000001CE + thumb_func_end ov5_021DCCC8 + + thumb_func_start ov5_021DCD94 +ov5_021DCD94: ; 0x021DCD94 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021DC300 + mov r1, #7 + tst r1, r0 + bne _021DCDAA + lsr r7, r0, #3 + b _021DCDAE +_021DCDAA: + lsr r0, r0, #3 + add r7, r0, #1 +_021DCDAE: + add r0, r5, #0 + add r0, #0x9b + ldrb r0, [r0] + add r1, r6, #0 + str r0, [sp, #0x14] + bl sub_020E1F6C + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + ldr r0, [sp, #0x14] + add r1, r6, #0 + bl sub_020E1F6C + cmp r1, #0 + beq _021DCDD2 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_021DCDD2: + add r0, r5, #0 + add r0, #0x99 + ldrb r0, [r0] + add r3, r5, #0 + add r1, r5, #0 + str r0, [sp] + add r0, r7, #0 + mul r0, r6 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + lsl r0, r4, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r3, #0x98 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r2, _021DCE5C ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r5, #0 + ldr r2, _021DCE5C ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov5_021DCE64 + add r1, r5, #0 + add r1, #0x96 + add r0, r5, #0 + ldrb r1, [r1] + add r0, #0xac + mov r2, #4 + bl sub_02001B9C + add r1, r5, #0 + add r1, #0xb8 + str r0, [r1, #0] + ldr r0, _021DCE60 ; =ov5_021DC3B0 + add r1, r5, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r5, #4] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DCE5C: .word 0x000003D9 +_021DCE60: .word ov5_021DC3B0 + thumb_func_end ov5_021DCD94 + + thumb_func_start ov5_021DCE64 +ov5_021DCE64: ; 0x021DCE64 + push {r3, r4} + add r4, r0, #0 + add r3, r0, #0 + add r4, #0xbc + add r3, #0xac + str r4, [r3, #0] + add r4, r0, #0 + add r3, r0, #0 + add r4, #8 + add r3, #0xb0 + str r4, [r3, #0] + add r3, r0, #0 + mov r4, #0 + add r3, #0xb4 + strb r4, [r3] + add r3, r0, #0 + add r3, #0xb5 + strb r1, [r3] + add r1, r0, #0 + add r1, #0xb6 + strb r2, [r1] + add r1, r0, #0 + add r1, #0xb7 + ldrb r2, [r1] + mov r1, #0xf + bic r2, r1 + add r1, r0, #0 + add r1, #0xb7 + strb r2, [r1] + add r1, r0, #0 + add r1, #0xb7 + ldrb r2, [r1] + mov r1, #0x30 + add r0, #0xb7 + bic r2, r1 + strb r2, [r0] + pop {r3, r4} + bx lr + thumb_func_end ov5_021DCE64 + + thumb_func_start ov5_021DCEB0 +ov5_021DCEB0: ; 0x021DCEB0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + mov r0, #4 + mov r1, #1 + bl sub_0201A778 + add r4, r0, #0 + str r6, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, r4, #0 + mov r2, #3 + add r3, r7, #0 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #8] + ldr r2, _021DCF50 ; =0x000003D9 + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + ldr r2, _021DCF50 ; =0x000003D9 + add r0, r4, #0 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r2, _021DCF54 ; =0x0000021F + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + mov r1, #0x12 + add r7, r0, #0 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r7, #0 + bl sub_0200B190 + add r0, r6, #0 + bl sub_020237BC + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021DCF6C + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DCF50: .word 0x000003D9 +_021DCF54: .word 0x0000021F + thumb_func_end ov5_021DCEB0 + + thumb_func_start ov5_021DCF58 +ov5_021DCF58: ; 0x021DCF58 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl sub_0200DC9C + add r0, r4, #0 + mov r1, #1 + bl sub_0201A928 + pop {r4, pc} + thumb_func_end ov5_021DCF58 + + thumb_func_start ov5_021DCF6C +ov5_021DCF6C: ; 0x021DCF6C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0x50 + str r0, [sp] + mov r3, #0x10 + add r0, r5, #0 + mov r1, #0xf + mov r2, #0 + str r3, [sp, #4] + bl sub_0201AE78 + ldr r2, _021DD01C ; =0x0000021F + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + str r0, [sp, #0xc] + mov r0, #4 + bl sub_0200B358 + add r6, r0, #0 + mov r0, #0x10 + mov r1, #4 + bl sub_02023790 + add r4, r0, #0 + ldr r0, [sp, #0xc] + mov r1, #0x13 + bl sub_0200B1EC + str r0, [sp, #0x10] + ldr r0, [r7, #0xc] + bl sub_02025E38 + bl sub_02025F74 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + ldr r2, [sp, #0x10] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x50 + sub r3, r1, r0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r5, #0 + add r2, r4, #0 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 + ldr r0, [sp, #0xc] + bl sub_0200B190 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DD01C: .word 0x0000021F + thumb_func_end ov5_021DCF6C + + thumb_func_start ov5_021DD020 +ov5_021DD020: ; 0x021DD020 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + mov r0, #4 + mov r1, #1 + bl sub_0201A778 + add r4, r0, #0 + str r6, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x29 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, r4, #0 + mov r2, #3 + add r3, r7, #0 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #8] + ldr r2, _021DD080 ; =0x000003D9 + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + ldr r2, _021DD080 ; =0x000003D9 + add r0, r4, #0 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021DD098 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD080: .word 0x000003D9 + thumb_func_end ov5_021DD020 + + thumb_func_start ov5_021DD084 +ov5_021DD084: ; 0x021DD084 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl sub_0200DC9C + add r0, r4, #0 + mov r1, #1 + bl sub_0201A928 + pop {r4, pc} + thumb_func_end ov5_021DD084 + + thumb_func_start ov5_021DD098 +ov5_021DD098: ; 0x021DD098 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + str r1, [sp, #0xc] + add r0, r1, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r2, _021DD13C ; =0x00000169 + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r7, r0, #0 + mov r0, #4 + bl sub_0200B358 + add r5, r0, #0 + mov r0, #0x10 + mov r1, #4 + bl sub_02023790 + add r4, r0, #0 + add r0, r7, #0 + mov r1, #0xc5 + bl sub_0200B1EC + str r0, [sp, #0x10] + ldr r0, [r6, #0xc] + bl sub_02025E50 + bl sub_0202B5B4 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #5 + bl sub_0200B60C + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x50 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r2, r4, #0 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_0200B3F0 + add r0, r7, #0 + bl sub_0200B190 + ldr r0, [sp, #0xc] + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DD13C: .word 0x00000169 + thumb_func_end ov5_021DD098 + + thumb_func_start ov5_021DD140 +ov5_021DD140: ; 0x021DD140 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + mov r0, #4 + mov r1, #1 + bl sub_0201A778 + add r4, r0, #0 + str r6, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x29 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, r4, #0 + mov r2, #3 + add r3, r7, #0 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r5, #8] + ldr r2, _021DD1A0 ; =0x000003D9 + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + ldr r2, _021DD1A0 ; =0x000003D9 + add r0, r4, #0 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021DD1A4 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD1A0: .word 0x000003D9 + thumb_func_end ov5_021DD140 + + thumb_func_start ov5_021DD1A4 +ov5_021DD1A4: ; 0x021DD1A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + str r1, [sp, #0xc] + add r0, r1, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r2, _021DD24C ; =0x00000169 + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + add r7, r0, #0 + mov r0, #4 + bl sub_0200B358 + add r5, r0, #0 + mov r0, #0x10 + mov r1, #4 + bl sub_02023790 + add r4, r0, #0 + add r0, r7, #0 + mov r1, #0xe6 + bl sub_0200B1EC + str r0, [sp, #0x10] + ldr r0, [r6, #0xc] + bl sub_0202D750 + mov r1, #0 + add r2, r1, #0 + bl sub_0202D230 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #5 + bl sub_0200B60C + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x50 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r2, r4, #0 + str r1, [sp, #8] + bl sub_0201D738 + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_0200B3F0 + add r0, r7, #0 + bl sub_0200B190 + ldr r0, [sp, #0xc] + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021DD24C: .word 0x00000169 + thumb_func_end ov5_021DD1A4 + + thumb_func_start ov5_021DD250 +ov5_021DD250: ; 0x021DD250 + push {r4, r5, lr} + sub sp, #0x14 + mov r4, #0 + str r4, [sp] + str r3, [sp, #4] + ldr r5, [sp, #0x20] + add r3, r4, #0 + str r5, [sp, #8] + str r4, [sp, #0xc] + str r4, [sp, #0x10] + bl ov5_021DC150 + add r4, r0, #0 + add r0, #0x99 + ldrb r0, [r0] + add r3, r4, #0 + add r1, r4, #0 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x3d + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r3, #0x98 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r2, _021DD394 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r4, #0 + ldr r2, _021DD394 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r0, #0x50 + str r0, [sp] + mov r0, #0x80 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0 + add r0, #8 + mov r1, #0xf + add r3, r2, #0 + bl sub_0201AE78 + mov r2, #0 + ldr r1, _021DD398 ; =0x00000111 + add r0, r4, #0 + add r3, r2, #0 + bl ov5_021DCC00 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r2, sp, #0x10 + ldrb r2, [r2, #0x14] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + ldr r1, _021DD39C ; =0x00000115 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x10 + bl ov5_021DCC00 + ldr r1, _021DD3A0 ; =0x00000112 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x20 + bl ov5_021DCC00 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r2, sp, #0x10 + ldrb r2, [r2, #0x18] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + ldr r1, _021DD39C ; =0x00000115 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x30 + bl ov5_021DCC00 + ldr r1, _021DD3A4 ; =0x00000113 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x40 + bl ov5_021DCC00 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r2, sp, #0x10 + ldrb r2, [r2, #0x1c] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + ldr r1, _021DD39C ; =0x00000115 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x50 + bl ov5_021DCC00 + mov r1, #0x45 + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #0 + mov r3, #0x60 + bl ov5_021DCC00 + add r2, sp, #0x30 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldrb r2, [r2] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + ldr r1, _021DD39C ; =0x00000115 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x70 + bl ov5_021DCC00 + add r0, r4, #0 + add r1, r4, #0 + add r0, #8 + add r1, #0xb0 + str r0, [r1, #0] + bl sub_0201A954 + add r0, r4, #0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_021DD394: .word 0x000003D9 +_021DD398: .word 0x00000111 +_021DD39C: .word 0x00000115 +_021DD3A0: .word 0x00000112 +_021DD3A4: .word 0x00000113 + thumb_func_end ov5_021DD250 + + thumb_func_start ov5_021DD3A8 +ov5_021DD3A8: ; 0x021DD3A8 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_021DD3C4: + ldr r0, [r5, #0x1c] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x1c + blt _021DD3C4 + add r0, r6, #0 + add r0, #0x97 + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021DD3EA + add r0, r6, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_0200B190 +_021DD3EA: + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD3A8 + + thumb_func_start ov5_021DD3F4 +ov5_021DD3F4: ; 0x021DD3F4 + add r2, r0, #0 + add r2, #0x97 + ldrb r3, [r2] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #0x40 + lsl r1, r1, #0x1f + bic r3, r2 + lsr r1, r1, #0x19 + orr r1, r3 + add r0, #0x97 + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DD3F4 + + thumb_func_start ov5_021DD410 +ov5_021DD410: ; 0x021DD410 + add r2, r0, #0 + add r2, #0x97 + ldrb r3, [r2] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #0x80 + lsl r1, r1, #0x1f + bic r3, r2 + lsr r1, r1, #0x18 + orr r1, r3 + add r0, #0x97 + strb r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DD410 \ No newline at end of file diff --git a/asm/ov5_021DD42C.s b/asm/ov5_021DD42C.s new file mode 100644 index 000000000..380393aa1 --- /dev/null +++ b/asm/ov5_021DD42C.s @@ -0,0 +1,374 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DD42C +ov5_021DD42C: ; 0x021DD42C + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl ov5_021DD574 + strb r0, [r4] + mov r0, #0 + strb r0, [r4, #1] + mov r0, #1 + strb r0, [r4, #2] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD42C + + thumb_func_start ov5_021DD444 +ov5_021DD444: ; 0x021DD444 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + str r3, [sp, #4] + add r0, #0x80 + add r6, r1, #0 + ldr r0, [r0, #0] + add r1, sp, #8 + add r7, r2, #0 + ldr r4, [sp, #0x38] + bl ov5_021DD588 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r1, sp, #8 + bl ov5_021DD610 + add r0, sp, #8 + add r1, r6, #0 + add r2, r7, #0 + bl ov5_021DD648 + cmp r4, #0 + bne _021DD484 + add r0, r5, #0 + bl ov5_021DD574 + add r2, r0, #0 + mov r0, #0 + mov r1, #1 + b _021DD48A +_021DD484: + ldrb r2, [r4] + ldrb r0, [r4, #1] + ldrb r1, [r4, #2] +_021DD48A: + str r0, [sp] + ldr r3, [sp, #4] + add r0, sp, #8 + bl ov5_021DD6B4 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DD444 + + thumb_func_start ov5_021DD498 +ov5_021DD498: ; 0x021DD498 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + add r0, #0x80 + add r4, r1, #0 + ldr r0, [r0, #0] + add r1, sp, #0 + add r6, r2, #0 + bl ov5_021DD588 + add r5, #0x80 + ldr r0, [r5, #0] + add r1, sp, #0 + bl ov5_021DD610 + add r0, sp, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021DD648 + add r0, sp, #0 + mov r1, #1 + bl ov5_021DD6DC + add sp, #0x18 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DD498 + + thumb_func_start ov5_021DD4CC +ov5_021DD4CC: ; 0x021DD4CC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r0, #0x80 + add r4, r1, #0 + ldr r0, [r0, #0] + add r1, sp, #4 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021DD588 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r1, sp, #4 + bl ov5_021DD610 + add r0, sp, #0x20 + ldrh r0, [r0, #0x10] + add r1, r4, #0 + add r2, r6, #0 + str r0, [sp] + add r0, sp, #4 + add r3, r7, #0 + bl ov5_021DD664 + add r0, sp, #0x20 + ldrb r0, [r0, #0x14] + cmp r0, #0xff + beq _021DD524 + add r0, r5, #0 + bl ov5_021DD574 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + add r3, sp, #0x20 + ldrb r3, [r3, #0x14] + add r0, sp, #4 + mov r1, #1 + bl ov5_021DD6B4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} +_021DD524: + add r0, sp, #4 + mov r1, #1 + bl ov5_021DD6DC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021DD4CC + + thumb_func_start ov5_021DD530 +ov5_021DD530: ; 0x021DD530 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r5, r0, #0 + add r0, #0x80 + add r4, r2, #0 + ldr r0, [r0, #0] + add r2, sp, #4 + add r6, r3, #0 + bl ov5_021DD5D0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r1, sp, #4 + bl ov5_021DD610 + ldr r1, [r5, #0x78] + add r0, sp, #4 + add r2, r4, #0 + bl ov5_021DD648 + add r0, r5, #0 + bl ov5_021DD574 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + add r0, sp, #4 + mov r1, #1 + add r3, r6, #0 + bl ov5_021DD6B4 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021DD530 + + thumb_func_start ov5_021DD574 +ov5_021DD574: ; 0x021DD574 + push {r3, lr} + add r0, #0x80 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_02025E44 + bl sub_02027AC0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD574 + + thumb_func_start ov5_021DD588 +ov5_021DD588: ; 0x021DD588 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x10 + add r5, r0, #0 + bl sub_0203F098 + ldr r0, [r0, #0] + mov r1, #0x11 + str r0, [r4, #0] + add r0, r5, #0 + bl sub_0203F098 + ldr r0, [r0, #0] + mov r1, #0xf + str r0, [r4, #4] + add r0, r5, #0 + bl sub_0203F098 + ldr r0, [r0, #0] + mov r1, #1 + str r0, [r4, #8] + add r0, r5, #0 + bl sub_0203F098 + str r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #6 + bl sub_0203F098 + str r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl sub_0203F098 + str r0, [r4, #0x14] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DD588 + + thumb_func_start ov5_021DD5D0 +ov5_021DD5D0: ; 0x021DD5D0 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x10 + add r5, r0, #0 + add r4, r2, #0 + bl sub_0203F098 + ldr r0, [r0, #0] + mov r1, #0x11 + str r0, [r4, #0] + add r0, r5, #0 + bl sub_0203F098 + ldr r0, [r0, #0] + mov r1, #1 + str r0, [r4, #4] + str r6, [r4, #8] + add r0, r5, #0 + bl sub_0203F098 + str r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #6 + bl sub_0203F098 + str r0, [r4, #0x10] + add r0, r5, #0 + mov r1, #3 + bl sub_0203F098 + str r0, [r4, #0x14] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DD5D0 + + thumb_func_start ov5_021DD610 +ov5_021DD610: ; 0x021DD610 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x10] + ldrb r0, [r0] + cmp r0, #0 + bne _021DD63C + ldr r0, [r5, #8] + ldr r1, [r4, #0xc] + mov r2, #3 + bl sub_0205D8F4 + ldr r0, [r5, #0xc] + bl sub_02025E44 + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0205D944 + ldr r0, [r4, #0x10] + mov r1, #1 + strb r1, [r0] +_021DD63C: + ldr r0, [r4, #0xc] + mov r1, #0xf + bl sub_0201ADA4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD610 + + thumb_func_start ov5_021DD648 +ov5_021DD648: ; 0x021DD648 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + ldr r2, [r4, #4] + bl sub_0200B1B8 + ldr r0, [r4, #8] + ldr r1, [r4, #0] + ldr r2, [r4, #4] + bl sub_0200C388 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD648 + + thumb_func_start ov5_021DD664 +ov5_021DD664: ; 0x021DD664 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r0, sp, #0 + add r7, r3, #0 + bl sub_02014A84 + add r0, sp, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02014CE0 + add r0, sp, #0 + mov r1, #0 + add r2, r7, #0 + bl sub_02014CF8 + add r2, sp, #0x10 + ldrh r2, [r2, #0x10] + add r0, sp, #0 + mov r1, #1 + bl sub_02014CF8 + add r0, sp, #0 + mov r1, #0x20 + bl sub_02014B34 + add r4, r0, #0 + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_02023810 + add r0, r4, #0 + bl sub_020237BC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD664 + + thumb_func_start ov5_021DD6B4 +ov5_021DD6B4: ; 0x021DD6B4 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r0, #0 + lsl r0, r3, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x18] + add r5, r2, #0 + str r0, [sp, #4] + add r6, r1, #0 + ldr r0, [r4, #0xc] + ldr r1, [r4, #0] + add r2, r6, #0 + add r3, r5, #0 + bl sub_0205D9CC + ldr r1, [r4, #0x14] + strb r0, [r1] + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DD6B4 + + thumb_func_start ov5_021DD6DC +ov5_021DD6DC: ; 0x021DD6DC + push {r3, r4, lr} + sub sp, #0xc + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + add r4, r0, #0 + str r3, [sp, #8] + ldr r0, [r4, #0xc] + ldr r2, [r4, #0] + bl sub_0201D738 + ldr r1, [r4, #0x14] + strb r0, [r1] + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD6DC \ No newline at end of file diff --git a/asm/ov5_021DD6FC.s b/asm/ov5_021DD6FC.s new file mode 100644 index 000000000..f6c0c71c9 --- /dev/null +++ b/asm/ov5_021DD6FC.s @@ -0,0 +1,535 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DD6FC +ov5_021DD6FC: ; 0x021DD6FC + push {r4, r5, r6, lr} + lsl r6, r1, #5 + add r5, r0, #0 + add r4, r2, #0 + add r1, r6, #0 + bl sub_020C2C54 + add r0, r5, #0 + lsl r1, r4, #5 + add r2, r6, #0 + bl sub_020C00B4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD6FC + + thumb_func_start ov5_021DD718 +ov5_021DD718: ; 0x021DD718 + push {lr} + sub sp, #0x14 + mov r3, #0 + add r1, r0, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #7 + str r0, [sp, #0xc] + ldr r0, _021DD740 ; =0x00000197 + mov r2, #3 + str r0, [sp, #0x10] + ldr r0, [r1, #0x1c] + add r1, #0x20 + bl sub_0201A7E8 + add sp, #0x14 + pop {pc} + ; .align 2, 0 +_021DD740: .word 0x00000197 + thumb_func_end ov5_021DD718 + + thumb_func_start ov5_021DD744 +ov5_021DD744: ; 0x021DD744 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + str r3, [sp, #4] + add r0, #0x31 + ldrb r0, [r0] + add r3, r5, #0 + add r6, r2, #0 + lsl r0, r0, #0x19 + lsr r4, r0, #0x18 + mov r0, #4 + add r7, r1, #0 + str r0, [sp] + mov r0, #0xa0 + add r1, r4, #0 + mov r2, #0 + add r3, #0x34 + bl sub_02006F50 + str r0, [r5, #0x38] + ldr r3, [r5, #0x34] + add r1, r7, #0 + str r6, [sp] + ldr r2, [r3, #0x14] + ldr r0, [r5, #0x1c] + ldr r3, [r3, #0x10] + bl sub_0201958C + mov r0, #0xa0 + add r1, r4, #1 + add r2, sp, #8 + mov r3, #4 + bl sub_02006F88 + add r4, r0, #0 + ldr r0, [sp, #8] + ldr r2, [sp, #4] + ldr r0, [r0, #0xc] + mov r1, #1 + bl ov5_021DD6FC + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021DD744 + + thumb_func_start ov5_021DD7A0 +ov5_021DD7A0: ; 0x021DD7A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r2, r1, #0 + add r2, #8 + add r6, r0, #0 + asr r0, r2, #2 + lsr r0, r0, #0x1d + add r0, r2, r0 + asr r0, r0, #3 + lsl r0, r0, #3 + sub r2, r0, r1 + lsr r0, r2, #0x1f + add r0, r2, r0 + asr r0, r0, #1 + add r2, r0, #4 + cmp r2, #8 + blt _021DD7C6 + mov r3, #0 + b _021DD7D8 +_021DD7C6: + mov r0, #8 + sub r0, r0, r2 + lsl r0, r0, #1 + add r2, r0, #7 + asr r0, r2, #2 + lsr r0, r0, #0x1d + add r0, r2, r0 + lsl r0, r0, #0x15 + lsr r3, r0, #0x18 +_021DD7D8: + cmp r1, #0 + bgt _021DD7E0 + mov r0, #0 + b _021DD7FA +_021DD7E0: + add r2, r1, #0 + add r2, #8 + asr r0, r2, #2 + lsr r0, r0, #0x1d + add r0, r2, r0 + asr r0, r0, #3 + add r0, r0, r3 + lsl r0, r0, #3 + add r0, #8 + sub r1, r0, r1 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 +_021DD7FA: + add r1, r0, #4 + add r0, r6, #0 + add r0, #0x30 + strb r1, [r0] + mov r0, #0 + str r0, [sp] + ldr r2, _021DD87C ; =0x000002D9 + add r0, r6, #0 + mov r1, #3 + mov r3, #7 + bl ov5_021DD744 + add r0, r6, #0 + add r0, #0x20 + mov r1, #0 + bl sub_0201ADA4 + add r0, r6, #0 + mov r4, #0 + str r0, [sp, #0x18] + add r0, #0x20 + add r5, r4, #0 + str r0, [sp, #0x18] +_021DD828: + add r0, r4, #0 + mov r1, #0x11 + bl sub_020E1F6C + add r7, r1, #0 + add r0, r4, #0 + mov r1, #0x11 + bl sub_020E1F6C + mov r1, #8 + str r1, [sp] + str r1, [sp, #4] + lsl r1, r7, #0x13 + lsr r1, r1, #0x10 + lsl r0, r0, #0x13 + lsl r2, r5, #0x10 + str r1, [sp, #8] + lsr r0, r0, #0x10 + str r0, [sp, #0xc] + mov r0, #8 + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [r6, #0x34] + ldr r0, [sp, #0x18] + ldr r1, [r1, #0x14] + lsr r2, r2, #0x10 + mov r3, #0 + bl sub_0201ADDC + add r4, r4, #1 + add r5, #8 + cmp r4, #0x55 + blt _021DD828 + add r0, r6, #0 + add r0, #0x20 + bl sub_0201A954 + ldr r0, [r6, #0x38] + bl sub_020181C4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DD87C: .word 0x000002D9 + thumb_func_end ov5_021DD7A0 + + thumb_func_start ov5_021DD880 +ov5_021DD880: ; 0x021DD880 + mov r1, #0 + str r1, [r0, #0] + strb r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + strh r1, [r0, #0x10] + str r1, [r0, #0x14] + str r1, [r0, #0x18] + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov5_021DD880 + + thumb_func_start ov5_021DD894 +ov5_021DD894: ; 0x021DD894 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021DD880 + str r4, [r5, #0x1c] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD894 + + thumb_func_start ov5_021DD8A4 +ov5_021DD8A4: ; 0x021DD8A4 + push {r4, lr} + add r4, r1, #0 + ldrb r0, [r4, #4] + cmp r0, #3 + bhi _021DD950 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DD8BA: ; jump table + .short _021DD950 - _021DD8BA - 2 ; case 0 + .short _021DD8C2 - _021DD8BA - 2 ; case 1 + .short _021DD900 - _021DD8BA - 2 ; case 2 + .short _021DD8EA - _021DD8BA - 2 ; case 3 +_021DD8C2: + ldr r0, [r4, #0xc] + sub r0, r0, #4 + str r0, [r4, #0xc] + bpl _021DD8CE + mov r0, #0 + str r0, [r4, #0xc] +_021DD8CE: + mov r1, #3 + ldr r0, [r4, #0x1c] + ldr r3, [r4, #0xc] + add r2, r1, #0 + bl sub_02019184 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _021DD950 + mov r0, #0 + strh r0, [r4, #0x10] + mov r0, #3 + strb r0, [r4, #4] + pop {r4, pc} +_021DD8EA: + ldrh r0, [r4, #0x10] + add r0, r0, #1 + strh r0, [r4, #0x10] + ldrh r0, [r4, #0x10] + cmp r0, #0x3c + blo _021DD950 + mov r0, #0 + strh r0, [r4, #0x10] + mov r0, #2 + strb r0, [r4, #4] + pop {r4, pc} +_021DD900: + ldr r0, [r4, #0xc] + add r0, r0, #4 + str r0, [r4, #0xc] + cmp r0, #0x26 + ble _021DD90E + mov r0, #0x26 + str r0, [r4, #0xc] +_021DD90E: + mov r1, #3 + ldr r0, [r4, #0x1c] + ldr r3, [r4, #0xc] + add r2, r1, #0 + bl sub_02019184 + ldr r0, [r4, #0xc] + cmp r0, #0x26 + bne _021DD950 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021DD94A + mov r0, #0 + str r0, [r4, #0x14] + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x18] + ldr r2, [r4, #0x40] + bl sub_02071CFC + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021DD7A0 + ldr r1, [r4, #0x40] + add r0, r4, #0 + bl ov5_021DD954 + mov r0, #1 + strb r0, [r4, #4] + pop {r4, pc} +_021DD94A: + add r0, r4, #0 + bl ov5_021DDA78 +_021DD950: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DD8A4 + + thumb_func_start ov5_021DD954 +ov5_021DD954: ; 0x021DD954 + push {r3, lr} + sub sp, #0x10 + add r3, r0, #0 + mov r0, #0x10 + add r2, r1, #0 + str r0, [sp] + mov r1, #0 + ldr r0, _021DD97C ; =0x00030200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r3, #0 + str r1, [sp, #0xc] + add r3, #0x30 + ldrb r3, [r3] + add r0, #0x20 + bl sub_0201D78C + add sp, #0x10 + pop {r3, pc} + nop +_021DD97C: .word 0x00030200 + thumb_func_end ov5_021DD954 + + thumb_func_start ov5_021DD980 +ov5_021DD980: ; 0x021DD980 + mov r1, #2 + strb r1, [r0, #4] + mov r1, #0 + strh r1, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DD980 + + thumb_func_start ov5_021DD98C +ov5_021DD98C: ; 0x021DD98C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + mov r1, #0x44 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0x16 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x40] + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DD894 + add r0, r4, #0 + bl ov5_021DD718 + ldr r2, _021DD9C4 ; =0x000001B1 + mov r0, #1 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + str r0, [r4, #0x3c] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DD9C4: .word 0x000001B1 + thumb_func_end ov5_021DD98C + + thumb_func_start ov5_021DD9C8 +ov5_021DD9C8: ; 0x021DD9C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0200B190 + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A8FC + ldr r0, [r4, #0x40] + bl sub_020237BC + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021DD9C8 + + thumb_func_start ov5_021DD9E8 +ov5_021DD9E8: ; 0x021DD9E8 + push {r3, r4, r5, lr} + add r4, r0, #0 + str r1, [r4, #0x18] + ldr r1, [r4, #0] + add r5, r2, #0 + cmp r1, #0 + bne _021DDA3C + mov r0, #1 + str r0, [r4, #0] + mov r1, #3 + ldr r0, [r4, #0x1c] + add r2, r1, #0 + mov r3, #0x26 + bl sub_02019184 + mov r0, #0x26 + str r0, [r4, #0xc] + ldr r0, _021DDA74 ; =ov5_021DD8A4 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #8] + mov r0, #1 + strb r0, [r4, #4] + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x18] + ldr r2, [r4, #0x40] + bl sub_02071CFC + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x31 + strb r5, [r0] + add r0, r4, #0 + bl ov5_021DD7A0 + ldr r1, [r4, #0x40] + add r0, r4, #0 + bl ov5_021DD954 + pop {r3, r4, r5, pc} +_021DDA3C: + ldrb r1, [r4, #4] + cmp r1, #3 + bhi _021DDA6E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DDA4E: ; jump table + .short _021DDA6E - _021DDA4E - 2 ; case 0 + .short _021DDA56 - _021DDA4E - 2 ; case 1 + .short _021DDA64 - _021DDA4E - 2 ; case 2 + .short _021DDA56 - _021DDA4E - 2 ; case 3 +_021DDA56: + bl ov5_021DD980 + mov r0, #1 + str r0, [r4, #0x14] + add r4, #0x31 + strb r5, [r4] + pop {r3, r4, r5, pc} +_021DDA64: + mov r0, #1 + str r0, [r4, #0x14] + add r4, #0x31 + strb r5, [r4] + pop {r3, r4, r5, pc} +_021DDA6E: + bl sub_02022974 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DDA74: .word ov5_021DD8A4 + thumb_func_end ov5_021DD9E8 + + thumb_func_start ov5_021DDA78 +ov5_021DDA78: ; 0x021DDA78 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021DDA86 + bl sub_0200DA58 +_021DDA86: + add r0, r4, #0 + add r0, #0x20 + bl sub_0201ACF4 + mov r1, #3 + ldr r0, [r4, #0x1c] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r1, [r4, #0x1c] + add r0, r4, #0 + bl ov5_021DD894 + pop {r4, pc} + thumb_func_end ov5_021DDA78 + + thumb_func_start ov5_021DDAA4 +ov5_021DDAA4: ; 0x021DDAA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A154 + cmp r0, #0 + beq _021DDAE2 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A288 + cmp r0, #0 + bne _021DDAE2 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A138 + add r4, r0, #0 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A154 + add r2, r0, #0 + beq _021DDAD8 + sub r2, r2, #1 +_021DDAD8: + ldr r0, [r5, #4] + add r1, r4, #0 + ldr r0, [r0, #8] + bl ov5_021DD9E8 +_021DDAE2: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DDAA4 \ No newline at end of file diff --git a/asm/ov5_021DDAE4.s b/asm/ov5_021DDAE4.s new file mode 100644 index 000000000..3ed94addf --- /dev/null +++ b/asm/ov5_021DDAE4.s @@ -0,0 +1,133 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DDAE4 +ov5_021DDAE4: ; 0x021DDAE4 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #4 + bhi _021DDBB8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DDB0A: ; jump table + .short _021DDB14 - _021DDB0A - 2 ; case 0 + .short _021DDB2C - _021DDB0A - 2 ; case 1 + .short _021DDB44 - _021DDB0A - 2 ; case 2 + .short _021DDB88 - _021DDB0A - 2 ; case 3 + .short _021DDBA2 - _021DDB0A - 2 ; case 4 +_021DDB14: + mov r0, #2 + add r1, r0, #0 + str r0, [sp] + sub r1, #0x12 + mov r2, #0 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDBB8 +_021DDB2C: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021DDBB8 + ldr r0, [r5, #8] + bl ov24_02253DA4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDBB8 +_021DDB44: + ldr r0, [r5, #8] + bl ov24_02253DB4 + cmp r0, #0 + beq _021DDBB8 + ldr r0, [r5, #0xc] + bl sub_02056B24 + add r6, r0, #0 + ldr r0, _021DDBC0 ; =0x00000018 + bl sub_02006514 + ldr r0, _021DDBC4 ; =0x00000019 + mov r1, #2 + bl sub_02006590 + add r0, r6, #0 + bl sub_020567D0 + mov r0, #1 + bl sub_0200A914 + str r0, [sp] + ldr r1, [r5, #4] + ldr r2, [r5, #0xc] + ldr r3, [r5, #8] + add r0, r5, #0 + add r1, #0x14 + bl ov25_02253CE8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDBB8 +_021DDB88: + mov r1, #0 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #4 + sub r2, #0x10 + mov r3, #0x3f + bl sub_0200AAE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDBB8 +_021DDBA2: + mov r0, #2 + bl sub_0200AC1C + cmp r0, #0 + beq _021DDBB8 + add r0, r4, #0 + bl sub_020181C4 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021DDBB8: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021DDBC0: .word 0x00000018 +_021DDBC4: .word 0x00000019 + thumb_func_end ov5_021DDAE4 + + thumb_func_start ov5_021DDBC8 +ov5_021DDBC8: ; 0x021DDBC8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb + mov r1, #4 + bl sub_02018184 + add r2, r0, #0 + mov r0, #0 + str r0, [r2, #0] + ldr r1, _021DDBE4 ; =ov5_021DDAE4 + add r0, r4, #0 + bl sub_02050944 + pop {r4, pc} + ; .align 2, 0 +_021DDBE4: .word ov5_021DDAE4 + thumb_func_end ov5_021DDBC8 \ No newline at end of file diff --git a/asm/ov5_021DDBE8.s b/asm/ov5_021DDBE8.s new file mode 100644 index 000000000..de8cd44a9 --- /dev/null +++ b/asm/ov5_021DDBE8.s @@ -0,0 +1,3343 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DDBE8 +ov5_021DDBE8: ; 0x021DDBE8 + push {r4, r5, r6, lr} + add r5, r1, #0 + lsl r1, r0, #2 + ldr r0, _021DDC24 ; =0x021F9A74 + add r6, r2, #0 + ldr r0, [r0, r1] + mov r1, #0x24 + mov r2, #5 + mov r3, #4 + bl sub_0200679C + bl sub_0201CED0 + add r4, r0, #0 + str r5, [r4, #0x10] + str r6, [r4, #0x14] + mov r0, #0x70 + mov r1, #4 + bl sub_02006C24 + str r0, [r4, #0x20] + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021DDC1C + mov r0, #0 + str r0, [r1, #0] +_021DDC1C: + mov r0, #0 + str r0, [r4, #0x18] + pop {r4, r5, r6, pc} + nop +_021DDC24: .word 0x021F9A74 + thumb_func_end ov5_021DDBE8 + + thumb_func_start ov5_021DDC28 +ov5_021DDC28: ; 0x021DDC28 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x20] + add r4, r1, #0 + bl sub_02006CA8 + ldr r1, [r5, #0xc] + mov r0, #4 + bl sub_02018238 + add r0, r4, #0 + bl sub_020067D0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DDC28 + + thumb_func_start ov5_021DDC44 +ov5_021DDC44: ; 0x021DDC44 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r0, #4 + mov r1, #0x4c + str r2, [sp] + add r5, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x4c + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _021DDC84 ; =ov5_021DDC88 + add r1, r4, #0 + mov r2, #5 + bl sub_0200D9E8 + str r5, [r4, #0x48] + cmp r5, #0 + beq _021DDC74 + mov r0, #0 + str r0, [r5, #0] +_021DDC74: + str r6, [r4, #0xc] + ldr r0, [sp] + str r7, [r4, #0x10] + str r0, [r4, #0x14] + ldr r0, [sp, #0x18] + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} + nop +_021DDC84: .word ov5_021DDC88 + thumb_func_end ov5_021DDC44 + + thumb_func_start ov5_021DDC88 +ov5_021DDC88: ; 0x021DDC88 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0] + cmp r1, #5 + bhi _021DDD6E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DDCA0: ; jump table + .short _021DDCAC - _021DDCA0 - 2 ; case 0 + .short _021DDCE4 - _021DDCA0 - 2 ; case 1 + .short _021DDCFE - _021DDCA0 - 2 ; case 2 + .short _021DDD12 - _021DDCA0 - 2 ; case 3 + .short _021DDD2C - _021DDCA0 - 2 ; case 4 + .short _021DDD50 - _021DDCA0 - 2 ; case 5 +_021DDCAC: + ldr r0, [r4, #0xc] + cmp r0, #1 + bne _021DDCC6 + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + ldr r2, [r4, #0x14] + add r0, #0x30 + mov r1, #0 + mov r3, #2 + bl ov5_021DDEFC + b _021DDCDC +_021DDCC6: + cmp r0, #2 + bne _021DDCDC + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + ldr r2, [r4, #0x14] + add r0, #0x30 + mov r1, #0 + mov r3, #1 + bl ov5_021DDEFC +_021DDCDC: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDD6E +_021DDCE4: + mov r0, #3 + str r0, [sp] + add r0, r4, #0 + ldr r2, [r4, #0x10] + ldr r3, [r4, #0xc] + add r0, #0x18 + mov r1, #0 + bl ov5_021DDEFC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDD6E +_021DDCFE: + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDF08 + cmp r0, #0 + beq _021DDD6E + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDD6E +_021DDD12: + mov r0, #3 + str r0, [sp] + add r0, r4, #0 + ldr r1, [r4, #0x10] + ldr r3, [r4, #0xc] + add r0, #0x18 + mov r2, #0 + bl ov5_021DDEFC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021DDD6E +_021DDD2C: + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDF08 + cmp r0, #0 + beq _021DDD6E + ldr r0, [r4, #8] + add r1, r0, #1 + str r1, [r4, #8] + ldr r0, [r4, #4] + cmp r1, r0 + bne _021DDD4A + mov r0, #5 + str r0, [r4, #0] + b _021DDD6E +_021DDD4A: + mov r0, #1 + str r0, [r4, #0] + b _021DDD6E +_021DDD50: + mov r1, #0 + str r1, [r4, #0] + str r1, [r4, #8] + ldr r2, [r4, #0x48] + cmp r2, #0 + beq _021DDD60 + mov r1, #1 + str r1, [r2, #0] +_021DDD60: + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + add sp, #4 + pop {r3, r4, pc} +_021DDD6E: + add r4, #0x30 + add r0, r4, #0 + bl ov5_021DDF08 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DDC88 + + thumb_func_start ov5_021DDD7C +ov5_021DDD7C: ; 0x021DDD7C + ldr r0, [r0, #0x18] + bx lr + thumb_func_end ov5_021DDD7C + + thumb_func_start ov5_021DDD80 +ov5_021DDD80: ; 0x021DDD80 + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0x10] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov5_021DDD80 + + thumb_func_start ov5_021DDD90 +ov5_021DDD90: ; 0x021DDD90 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + ldr r0, [r4, #0xc] + mul r0, r1 + ldr r1, [r4, #0x10] + bl sub_020E1F6C + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r0, #1 + cmp r0, r1 + bgt _021DDDB6 + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_021DDDB6: + str r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021DDD90 + + thumb_func_start ov5_021DDDBC +ov5_021DDDBC: ; 0x021DDDBC + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0x10] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov5_021DDDBC + + thumb_func_start ov5_021DDDCC +ov5_021DDDCC: ; 0x021DDDCC + push {r4, lr} + add r4, r0, #0 + ldr r2, [r4, #0xc] + ldr r0, [r4, #8] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r4, #0x10] + lsl r1, r1, #0xc + bl sub_020BCFD0 + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r0, #1 + cmp r0, r1 + bgt _021DDE0C + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_021DDE0C: + str r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DDDCC + + thumb_func_start ov5_021DDE14 +ov5_021DDE14: ; 0x021DDE14 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r5, r0, #0 + add r7, r2, #0 + add r0, r3, #0 + add r6, r1, #0 + lsl r2, r4, #0xc + str r3, [sp] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + sub r0, r7, r6 + mov r7, #2 + mov r3, #0 + lsl r7, r7, #0xa + add r2, r2, r7 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r2, r2, #0xc + orr r2, r1 + sub r2, r0, r2 + asr r1, r2, #0x1f + lsr r0, r2, #0x13 + lsl r1, r1, #0xd + orr r1, r0 + lsl r0, r2, #0xd + add r0, r0, r7 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + add r1, r4, #0 + mul r1, r4 + lsl r1, r1, #0xc + bl sub_020BCFD0 + str r6, [r5, #0] + ldr r1, [sp] + str r6, [r5, #4] + str r1, [r5, #8] + str r0, [r5, #0xc] + mov r0, #0 + str r0, [r5, #0x10] + str r4, [r5, #0x14] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DDE14 + + thumb_func_start ov5_021DDE74 +ov5_021DDE74: ; 0x021DDE74 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r6, [r5, #0x10] + ldr r0, [r5, #8] + lsl r2, r6, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsr r4, r2, #0xc + lsl r0, r1, #0x14 + add r2, r6, #0 + orr r4, r0 + ldr r0, [r5, #0xc] + mul r2, r6 + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + lsl r1, r2, #2 + bl sub_020BCFD0 + ldr r1, [r5, #4] + add r0, r4, r0 + add r0, r1, r0 + str r0, [r5, #0] + ldr r0, [r5, #0x10] + ldr r1, [r5, #0x14] + add r0, r0, #1 + cmp r0, r1 + bgt _021DDED4 + str r0, [r5, #0x10] + mov r0, #0 + pop {r4, r5, r6, pc} +_021DDED4: + str r1, [r5, #0x10] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DDE74 + + thumb_func_start ov5_021DDEDC +ov5_021DDEDC: ; 0x021DDEDC + push {r3, lr} + cmp r0, #1 + bne _021DDEEA + ldr r0, _021DDEF4 ; =0x0400006C + bl sub_020BDEC4 + pop {r3, pc} +_021DDEEA: + ldr r0, _021DDEF8 ; =0x0400106C + bl sub_020BDEC4 + pop {r3, pc} + nop +_021DDEF4: .word 0x0400006C +_021DDEF8: .word 0x0400106C + thumb_func_end ov5_021DDEDC + + thumb_func_start ov5_021DDEFC +ov5_021DDEFC: ; 0x021DDEFC + push {r3, lr} + str r3, [r0, #0x14] + ldr r3, [sp, #8] + bl ov5_021DDD80 + pop {r3, pc} + thumb_func_end ov5_021DDEFC + + thumb_func_start ov5_021DDF08 +ov5_021DDF08: ; 0x021DDF08 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov5_021DDD90 + add r4, r0, #0 + ldr r0, _021DDF20 ; =ov5_021DDF24 + add r1, r5, #0 + mov r2, #0xa + bl sub_0200DA3C + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021DDF20: .word ov5_021DDF24 + thumb_func_end ov5_021DDF08 + + thumb_func_start ov5_021DDF24 +ov5_021DDF24: ; 0x021DDF24 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0x14] + ldr r1, [r1, #0] + bl ov5_021DDEDC + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov5_021DDF24 + + thumb_func_start ov5_021DDF38 +ov5_021DDF38: ; 0x021DDF38 + push {r4, lr} + mov r0, #4 + mov r1, #0x30 + bl sub_02018144 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _021DDF6C ; =0x04000048 + mov r1, #0x3f + ldrh r2, [r0] + bic r2, r1 + mov r1, #0x1f + orr r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldrh r2, [r0] + ldr r1, _021DDF70 ; =0xFFFFC0FF + and r1, r2 + strh r1, [r0] + add r0, r4, #0 + pop {r4, pc} + nop +_021DDF6C: .word 0x04000048 +_021DDF70: .word 0xFFFFC0FF + thumb_func_end ov5_021DDF38 + + thumb_func_start ov5_021DDF74 +ov5_021DDF74: ; 0x021DDF74 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x24] + cmp r1, #0 + beq _021DDF82 + bl ov5_021DE0F0 +_021DDF82: + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021DDF98 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + nop +_021DDF98: .word 0xFFFF1FFF + thumb_func_end ov5_021DDF74 + + thumb_func_start ov5_021DDF9C +ov5_021DDF9C: ; 0x021DDF9C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x24] + add r7, r2, #0 + str r3, [sp, #4] + ldr r4, [sp, #0x20] + cmp r0, #0 + beq _021DDFB4 + bl sub_02022974 +_021DDFB4: + mov r0, #0 + str r0, [r6, #0x18] + ldr r1, [r6, #0x10] + add r6, #0x18 + ldr r1, [r1, #4] + ldr r2, [sp, #0x24] + ldr r1, [r1, #0x1c] + ldr r3, [sp, #0x28] + str r1, [r5, #0x20] + str r7, [r5, #0x18] + str r0, [r5, #0x1c] + ldr r0, [sp, #4] + str r6, [r5, #0x2c] + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021DDE14 + cmp r4, #0 + blt _021DDFF4 + mov r0, #0xff + ldr r2, _021DE020 ; =0x04000040 + sub r0, r0, r4 + strh r0, [r2] + add r0, r4, #1 + mov r1, #0xc0 + lsl r0, r0, #0x18 + strh r1, [r2, #4] + lsr r0, r0, #0x18 + strh r0, [r2, #2] + strh r1, [r2, #6] + b _021DE010 +_021DDFF4: + add r0, r4, #0 + add r0, #0xff + lsl r0, r0, #0x18 + mov r2, #1 + sub r2, r2, r4 + lsl r2, r2, #0x18 + ldr r1, _021DE020 ; =0x04000040 + lsr r0, r0, #0x18 + strh r0, [r1] + mov r0, #0xc0 + strh r0, [r1, #4] + lsr r2, r2, #0x18 + strh r2, [r1, #2] + strh r0, [r1, #6] +_021DE010: + mov r2, #1 + ldr r0, _021DE024 ; =ov5_021DE028 + add r1, r5, #0 + lsl r2, r2, #0xa + bl sub_0200DA3C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE020: .word 0x04000040 +_021DE024: .word ov5_021DE028 + thumb_func_end ov5_021DDF9C + + thumb_func_start ov5_021DE028 +ov5_021DE028: ; 0x021DE028 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r2, #1 + ldr r0, _021DE050 ; =ov5_021DE088 + add r4, r1, #0 + lsl r2, r2, #0xa + bl sub_0200DA3C + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r1, _021DE054 ; =ov5_021DE14C + add r2, r4, #0 + bl ov5_021EF418 + str r0, [r4, #0x24] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_021DE050: .word ov5_021DE088 +_021DE054: .word ov5_021DE14C + thumb_func_end ov5_021DE028 + + thumb_func_start ov5_021DE058 +ov5_021DE058: ; 0x021DE058 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov5_021DDD7C + cmp r0, #0 + beq _021DE06E + bl sub_02022974 +_021DE06E: + str r4, [r5, #0x18] + mov r0, #0 + str r0, [r5, #0x1c] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r0, r5, #0 + str r6, [sp] + bl ov5_021DDE14 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE058 + + thumb_func_start ov5_021DE088 +ov5_021DE088: ; 0x021DE088 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _021DE098 + cmp r0, #1 + beq _021DE0E4 + pop {r4, pc} +_021DE098: + add r0, r4, #0 + bl ov5_021DDE74 + cmp r0, #0 + beq _021DE0A8 + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] +_021DE0A8: + ldr r0, [r4, #0] + asr r0, r0, #0xc + bmi _021DE0C6 + mov r1, #0xff + sub r1, r1, r0 + ldr r2, _021DE0EC ; =0x04000040 + add r0, r0, #1 + strh r1, [r2] + mov r1, #0xc0 + lsl r0, r0, #0x18 + strh r1, [r2, #4] + lsr r0, r0, #0x18 + strh r0, [r2, #2] + strh r1, [r2, #6] + pop {r4, pc} +_021DE0C6: + add r1, r0, #0 + add r1, #0xff + lsl r1, r1, #0x18 + ldr r3, _021DE0EC ; =0x04000040 + lsr r1, r1, #0x18 + strh r1, [r3] + mov r1, #1 + sub r0, r1, r0 + mov r2, #0xc0 + lsl r0, r0, #0x18 + strh r2, [r3, #4] + lsr r0, r0, #0x18 + strh r0, [r3, #2] + strh r2, [r3, #6] + pop {r4, pc} +_021DE0E4: + add r0, r4, #0 + bl ov5_021DE0F0 + pop {r4, pc} + ; .align 2, 0 +_021DE0EC: .word 0x04000040 + thumb_func_end ov5_021DE088 + + thumb_func_start ov5_021DE0F0 +ov5_021DE0F0: ; 0x021DE0F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DE144 ; =0x04000048 + mov r2, #0x3f + ldrh r3, [r0] + mov r1, #0x1f + bic r3, r2 + orr r3, r1 + mov r1, #0x20 + orr r3, r1 + strh r3, [r0] + ldrh r3, [r0, #2] + bic r3, r2 + add r2, r0, #0 + strh r3, [r0, #2] + mov r3, #0 + sub r2, #8 + strh r3, [r2] + sub r0, r0, #4 + strh r3, [r0] + lsl r3, r1, #0x15 + ldr r2, [r3, #0] + ldr r0, _021DE148 ; =0xFFFF1FFF + and r2, r0 + lsl r0, r1, #8 + orr r0, r2 + str r0, [r3, #0] + ldr r0, [r4, #0x2c] + mov r1, #1 + str r1, [r0, #0] + ldr r0, [r4, #0x24] + bl ov5_021EF43C + mov r0, #0 + str r0, [r4, #0x24] + ldr r0, [r4, #0x28] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x28] + pop {r4, pc} + nop +_021DE144: .word 0x04000048 +_021DE148: .word 0xFFFF1FFF + thumb_func_end ov5_021DE0F0 + + thumb_func_start ov5_021DE14C +ov5_021DE14C: ; 0x021DE14C + push {r4, lr} + ldr r0, _021DE1BC ; =0x04000006 + add r4, r1, #0 + ldrh r0, [r0] + ldr r1, [r4, #0x18] + bl sub_020E2178 + mov r1, #1 + tst r0, r1 + ldr r0, [r4, #0] + bne _021DE164 + b _021DE166 +_021DE164: + neg r0, r0 +_021DE166: + asr r2, r0, #0xc + ldr r0, _021DE1C0 ; =0x000001FF + add r1, r2, #0 + and r1, r0 + ldr r0, _021DE1C4 ; =0x04000010 + cmp r2, #0 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + ldr r1, _021DE1C8 ; =0xFFFF1FFF + blt _021DE198 + add r3, r0, #0 + sub r3, #0x10 + ldr r2, [r3, #0] + and r2, r1 + lsl r1, r0, #9 + orr r1, r2 + str r1, [r3, #0] + add r0, #0x3a + ldrh r2, [r0] + mov r1, #0x3f + bic r2, r1 + strh r2, [r0] + pop {r4, pc} +_021DE198: + add r3, r0, #0 + sub r3, #0x10 + ldr r2, [r3, #0] + and r2, r1 + lsl r1, r0, #0xa + orr r1, r2 + str r1, [r3, #0] + add r0, #0x3a + ldrh r2, [r0] + mov r1, #0x3f + bic r2, r1 + mov r1, #0x1f + orr r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + pop {r4, pc} + nop +_021DE1BC: .word 0x04000006 +_021DE1C0: .word 0x000001FF +_021DE1C4: .word 0x04000010 +_021DE1C8: .word 0xFFFF1FFF + thumb_func_end ov5_021DE14C + + thumb_func_start ov5_021DE1CC +ov5_021DE1CC: ; 0x021DE1CC + push {r4, r5, r6, lr} + mov r0, #4 + mov r1, #0x48 + bl sub_02018144 + mov r1, #0 + mov r2, #0x48 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _021DE210 ; =0x04000048 + mov r5, #0x3f + ldrh r2, [r0] + mov r1, #0x1f + bic r2, r5 + add r3, r2, #0 + orr r3, r1 + mov r2, #0x20 + orr r3, r2 + strh r3, [r0] + ldrh r6, [r0] + ldr r3, _021DE214 ; =0xFFFFC0FF + lsl r1, r1, #8 + and r3, r6 + orr r3, r1 + lsl r1, r2, #8 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0, #2] + bic r1, r5 + strh r1, [r0, #2] + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_021DE210: .word 0x04000048 +_021DE214: .word 0xFFFFC0FF + thumb_func_end ov5_021DE1CC + + thumb_func_start ov5_021DE218 +ov5_021DE218: ; 0x021DE218 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x3c] + cmp r1, #0 + beq _021DE226 + bl ov5_021DE374 +_021DE226: + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021DE23C ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + nop +_021DE23C: .word 0xFFFF1FFF + thumb_func_end ov5_021DE218 + + thumb_func_start ov5_021DE240 +ov5_021DE240: ; 0x021DE240 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x3c] + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _021DE254 + bl sub_02022974 +_021DE254: + mov r1, #0 + str r1, [r5, #0x18] + ldr r0, [r5, #0x10] + mov r2, #0xff + ldr r0, [r0, #4] + add r5, #0x18 + ldr r0, [r0, #0x1c] + lsl r2, r2, #0xc + str r0, [r4, #0x38] + mov r0, #0x60 + str r0, [r4, #0x30] + str r1, [r4, #0x34] + str r5, [r4, #0x44] + add r0, r4, #0 + add r3, r7, #0 + str r6, [sp] + bl ov5_021DDE14 + add r0, r4, #0 + mov r2, #6 + ldr r3, [sp, #0x18] + add r0, #0x18 + mov r1, #0 + lsl r2, r2, #0x10 + str r6, [sp] + bl ov5_021DDE14 + ldr r2, _021DE2A4 ; =0x04000040 + mov r1, #0xff + strh r1, [r2] + mov r0, #0xc0 + strh r0, [r2, #4] + strh r1, [r2, #2] + strh r0, [r2, #6] + ldr r0, _021DE2A8 ; =ov5_021DE2AC + add r1, r4, #0 + lsr r2, r2, #0x10 + bl sub_0200DA3C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DE2A4: .word 0x04000040 +_021DE2A8: .word ov5_021DE2AC + thumb_func_end ov5_021DE240 + + thumb_func_start ov5_021DE2AC +ov5_021DE2AC: ; 0x021DE2AC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r2, #1 + ldr r0, _021DE2D4 ; =ov5_021DE2DC + add r4, r1, #0 + lsl r2, r2, #0xa + bl sub_0200DA3C + str r0, [r4, #0x40] + ldr r0, [r4, #0x38] + ldr r1, _021DE2D8 ; =ov5_021DE344 + add r2, r4, #0 + bl ov5_021EF418 + str r0, [r4, #0x3c] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_021DE2D4: .word ov5_021DE2DC +_021DE2D8: .word ov5_021DE344 + thumb_func_end ov5_021DE2AC + + thumb_func_start ov5_021DE2DC +ov5_021DE2DC: ; 0x021DE2DC + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _021DE2EC + cmp r0, #1 + beq _021DE338 + pop {r4, pc} +_021DE2EC: + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDE74 + add r0, r4, #0 + bl ov5_021DDE74 + cmp r0, #0 + beq _021DE304 + ldr r0, [r4, #0x34] + add r0, r0, #1 + str r0, [r4, #0x34] +_021DE304: + ldr r0, [r4, #0] + asr r2, r0, #0xc + ldr r0, [r4, #0x18] + mov r4, #0xff + asr r1, r0, #0xc + ldr r0, _021DE340 ; =0x04000040 + sub r3, r4, r2 + strh r3, [r0] + mov r3, #0x60 + sub r3, r3, r1 + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + strh r3, [r0, #4] + lsl r3, r2, #8 + lsl r2, r4, #8 + and r2, r3 + orr r2, r4 + add r1, #0x60 + strh r2, [r0, #2] + lsl r2, r1, #8 + lsl r1, r4, #8 + and r2, r1 + mov r1, #0xc0 + orr r1, r2 + strh r1, [r0, #6] + pop {r4, pc} +_021DE338: + add r0, r4, #0 + bl ov5_021DE374 + pop {r4, pc} + ; .align 2, 0 +_021DE340: .word 0x04000040 + thumb_func_end ov5_021DE2DC + + thumb_func_start ov5_021DE344 +ov5_021DE344: ; 0x021DE344 + ldr r0, _021DE36C ; =0x04000006 + ldr r1, [r1, #0x30] + ldrh r2, [r0] + cmp r2, r1 + ldr r1, _021DE370 ; =0xFFFF1FFF + bhi _021DE35E + sub r3, r0, #6 + ldr r2, [r3, #0] + lsr r0, r0, #0xd + and r1, r2 + orr r0, r1 + str r0, [r3, #0] + bx lr +_021DE35E: + sub r3, r0, #6 + ldr r2, [r3, #0] + lsr r0, r0, #0xc + and r1, r2 + orr r0, r1 + str r0, [r3, #0] + bx lr + ; .align 2, 0 +_021DE36C: .word 0x04000006 +_021DE370: .word 0xFFFF1FFF + thumb_func_end ov5_021DE344 + + thumb_func_start ov5_021DE374 +ov5_021DE374: ; 0x021DE374 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DE3C8 ; =0x04000048 + mov r2, #0x3f + ldrh r3, [r0] + mov r1, #0x1f + bic r3, r2 + orr r3, r1 + mov r1, #0x20 + orr r3, r1 + strh r3, [r0] + ldrh r3, [r0, #2] + bic r3, r2 + add r2, r0, #0 + strh r3, [r0, #2] + mov r3, #0 + sub r2, #8 + strh r3, [r2] + sub r0, r0, #4 + strh r3, [r0] + lsl r3, r1, #0x15 + ldr r2, [r3, #0] + ldr r0, _021DE3CC ; =0xFFFF1FFF + and r2, r0 + lsl r0, r1, #8 + orr r0, r2 + str r0, [r3, #0] + ldr r0, [r4, #0x44] + mov r1, #1 + str r1, [r0, #0] + ldr r0, [r4, #0x3c] + bl ov5_021EF43C + mov r0, #0 + str r0, [r4, #0x3c] + ldr r0, [r4, #0x40] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x40] + pop {r4, pc} + nop +_021DE3C8: .word 0x04000048 +_021DE3CC: .word 0xFFFF1FFF + thumb_func_end ov5_021DE374 + + thumb_func_start ov5_021DE3D0 +ov5_021DE3D0: ; 0x021DE3D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r1, #0 + ldr r1, [sp, #0x34] + str r2, [sp, #0x10] + lsl r1, r1, #5 + str r1, [sp] + mov r1, #4 + str r1, [sp, #4] + add r1, r3, #0 + ldr r3, [sp, #0x30] + mov r2, #0 + lsl r3, r3, #5 + add r6, r0, #0 + ldr r5, [sp, #0x38] + ldr r4, [sp, #0x3c] + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + add r0, r6, #0 + add r2, r5, #0 + add r3, r4, #0 + bl sub_020070E8 + mov r0, #4 + str r0, [sp] + add r0, r6, #0 + add r1, r7, #0 + mov r2, #0 + add r3, sp, #0x14 + bl sub_020071D0 + lsl r1, r4, #0x18 + ldr r2, [sp, #0x14] + mov r3, #0 + str r3, [sp] + add r6, r0, #0 + ldrh r0, [r2] + lsr r1, r1, #0x18 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_020198C0 + ldr r1, [sp, #0x14] + mov r2, #0 + ldrh r0, [r1] + add r3, r2, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r1, #2] + lsl r1, r4, #0x18 + lsr r1, r1, #0x18 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_02019E2C + add r0, r6, #0 + bl sub_020181C4 + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_0201C3C0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DE3D0 + + thumb_func_start ov5_021DE47C +ov5_021DE47C: ; 0x021DE47C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r2, #0 + add r0, r1, #0 + add r1, r5, #4 + mov r2, #4 + bl sub_020095C4 + mov r7, #0x4b + str r0, [r5, #0] + mov r4, #0 + lsl r7, r7, #2 +_021DE494: + add r0, r6, #0 + add r1, r4, #0 + mov r2, #4 + bl sub_02009714 + str r0, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021DE494 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE47C + + thumb_func_start ov5_021DE4AC +ov5_021DE4AC: ; 0x021DE4AC + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl sub_02021964 + mov r6, #0x4b + mov r4, #0 + lsl r6, r6, #2 +_021DE4BC: + ldr r0, [r5, r6] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021DE4BC + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DE4AC + + thumb_func_start ov5_021DE4CC +ov5_021DE4CC: ; 0x021DE4CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r6, [sp, #0x58] + add r5, r1, #0 + str r6, [sp] + mov r1, #1 + add r7, r0, #0 + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0x4b + str r1, [sp, #0xc] + lsl r0, r0, #2 + add r4, r2, #0 + str r3, [sp, #0x2c] + ldr r0, [r5, r0] + ldr r2, [sp, #0x4c] + add r1, r7, #0 + mov r3, #0 + bl sub_02009AA8 + str r0, [r4, #0] + str r6, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x48] + ldr r2, [sp, #0x2c] + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r7, #0 + mov r3, #0 + bl sub_02009B04 + str r0, [r4, #4] + str r6, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [sp, #0x50] + add r1, r7, #0 + mov r3, #0 + bl sub_02009BC4 + str r0, [r4, #8] + str r6, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [sp, #0x54] + add r1, r7, #0 + mov r3, #0 + bl sub_02009BC4 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl sub_0200A3DC + ldr r0, [r4, #0] + bl sub_02009D4C + ldr r0, [r4, #4] + bl sub_0200A640 + mov r0, #0 + mov r2, #0x4b + str r6, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r4, #0x10 + str r1, [sp, #0x14] + add r1, r2, #4 + ldr r1, [r5, r1] + add r3, r6, #0 + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r1, [r5, r1] + add r2, #0xc + str r1, [sp, #0x1c] + ldr r1, [r5, r2] + add r2, r6, #0 + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r4, #0 + add r1, r6, #0 + bl sub_020093B4 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DE4CC + + thumb_func_start ov5_021DE5A4 +ov5_021DE5A4: ; 0x021DE5A4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl sub_0200A4E4 + ldr r0, [r4, #4] + bl sub_0200A6DC + mov r7, #0x4b + mov r6, #0 + lsl r7, r7, #2 +_021DE5BC: + ldr r0, [r5, r7] + ldr r1, [r4, #0] + bl sub_02009D68 + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #4 + blt _021DE5BC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DE5A4 + + thumb_func_start ov5_021DE5D0 +ov5_021DE5D0: ; 0x021DE5D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r6, r0, #0 + add r4, r1, #0 + add r0, r2, #0 + mov r1, #2 + add r2, sp, #8 + add r7, r3, #0 + bl sub_02076AAC + add r0, r4, #0 + mov r1, #0x20 + bl sub_02018144 + add r5, r0, #0 + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + add r2, sp, #4 + add r3, r4, #0 + bl sub_02006F88 + add r4, r0, #0 + add r0, sp, #0x28 + ldrh r0, [r0, #0x10] + add r1, r5, #0 + mov r2, #0x10 + str r0, [sp] + ldr r0, [sp, #4] + add r3, r7, #0 + ldr r0, [r0, #0xc] + bl sub_0200393C + add r0, r6, #0 + add r1, r5, #0 + mov r2, #0x20 + bl ov5_021DE67C + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE5D0 + + thumb_func_start ov5_021DE62C +ov5_021DE62C: ; 0x021DE62C + push {r4, lr} + sub sp, #0x20 + ldr r0, [r0, #0] + add r1, #0x10 + str r0, [sp] + ldr r0, [sp, #0x28] + str r1, [sp, #4] + str r0, [sp, #0x10] + ldr r0, [sp, #0x2c] + str r2, [sp, #8] + str r0, [sp, #0x14] + mov r0, #1 + str r0, [sp, #0x18] + mov r0, #4 + str r0, [sp, #0x1c] + add r0, sp, #0 + str r3, [sp, #0xc] + bl sub_02021B90 + add r4, r0, #0 + bne _021DE65A + bl sub_02022974 +_021DE65A: + add r0, r4, #0 + add sp, #0x20 + pop {r4, pc} + thumb_func_end ov5_021DE62C + + thumb_func_start ov5_021DE660 +ov5_021DE660: ; 0x021DE660 + push {r4} + sub sp, #0xc + str r2, [sp, #4] + str r3, [sp, #8] + add r2, sp, #0 + add r4, r0, #0 + str r1, [sp] + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + add sp, #0xc + pop {r4} + bx lr + thumb_func_end ov5_021DE660 + + thumb_func_start ov5_021DE67C +ov5_021DE67C: ; 0x021DE67C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_02021F9C + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_020C2C54 + add r0, r6, #0 + mov r1, #1 + bl sub_020A81FC + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl sub_020C0160 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DE67C + + thumb_func_start ov5_021DE6A4 +ov5_021DE6A4: ; 0x021DE6A4 + push {r4, lr} + mov r1, #0x30 + bl sub_02018144 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE6A4 + + thumb_func_start ov5_021DE6BC +ov5_021DE6BC: ; 0x021DE6BC + ldr r3, _021DE6C0 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021DE6C0: .word sub_020181C4 + thumb_func_end ov5_021DE6BC + + thumb_func_start ov5_021DE6C4 +ov5_021DE6C4: ; 0x021DE6C4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0x2e + ldrb r0, [r0] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _021DE6DA + bl sub_02022974 +_021DE6DA: + ldr r3, [sp, #0x1c] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021DDD80 + add r0, r5, #0 + ldr r2, [sp, #0x18] + ldr r3, [sp, #0x1c] + add r0, #0x14 + add r1, r7, #0 + bl ov5_021DDD80 + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x24] + str r0, [r5, #0x28] + add r0, r5, #0 + add r0, #0x2c + strb r1, [r0] + add r0, r5, #0 + ldr r1, [sp, #0x28] + add r0, #0x2d + strb r1, [r0] + add r0, sp, #0x2c + ldrb r1, [r0] + add r0, r5, #0 + add r0, #0x2f + strb r1, [r0] + mov r0, #1 + add r5, #0x2e + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE6C4 + + thumb_func_start ov5_021DE71C +ov5_021DE71C: ; 0x021DE71C + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r1, r5, #0 + add r1, #0x2e + ldrb r1, [r1] + cmp r1, #0 + bne _021DE732 + add sp, #8 + mov r0, #1 + pop {r4, r5, r6, pc} +_021DE732: + bl ov5_021DDD90 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x14 + bl ov5_021DDD90 + add r0, r5, #0 + add r0, #0x2c + ldrb r0, [r0] + ldr r2, [r5, #0] + ldr r6, [r5, #0x14] + lsr r1, r0, #1 + sub r1, r2, r1 + lsl r1, r1, #0x10 + asr r3, r1, #0x10 + add r1, r5, #0 + add r1, #0x2d + ldrb r2, [r1] + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + lsr r1, r2, #1 + str r0, [sp] + add r0, r5, #0 + sub r1, r6, r1 + add r0, #0x2f + lsl r1, r1, #0x10 + ldrb r0, [r0] + asr r1, r1, #0x10 + add r2, r1, r2 + str r0, [sp, #4] + lsl r2, r2, #0x10 + ldr r0, [r5, #0x28] + asr r2, r2, #0x10 + bl ov5_021DE89C + add r0, r4, #0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE71C + + thumb_func_start ov5_021DE784 +ov5_021DE784: ; 0x021DE784 + push {r4, lr} + mov r1, #0x30 + bl sub_02018144 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE784 + + thumb_func_start ov5_021DE79C +ov5_021DE79C: ; 0x021DE79C + ldr r3, _021DE7A0 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021DE7A0: .word sub_020181C4 + thumb_func_end ov5_021DE79C + + thumb_func_start ov5_021DE7A4 +ov5_021DE7A4: ; 0x021DE7A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0x2e + ldrb r0, [r0] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _021DE7BA + bl sub_02022974 +_021DE7BA: + ldr r3, [sp, #0x1c] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021DDD80 + add r0, r5, #0 + ldr r2, [sp, #0x18] + ldr r3, [sp, #0x1c] + add r0, #0x14 + add r1, r7, #0 + bl ov5_021DDD80 + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x24] + str r0, [r5, #0x28] + add r0, r5, #0 + add r0, #0x2c + strb r1, [r0] + add r0, r5, #0 + ldr r1, [sp, #0x28] + add r0, #0x2d + strb r1, [r0] + add r0, sp, #0x2c + ldrb r1, [r0] + add r0, r5, #0 + add r0, #0x2f + strb r1, [r0] + mov r0, #1 + add r5, #0x2e + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE7A4 + + thumb_func_start ov5_021DE7FC +ov5_021DE7FC: ; 0x021DE7FC + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r0, #0x2e + ldrb r0, [r0] + cmp r0, #0 + bne _021DE810 + add sp, #8 + mov r0, #1 + pop {r4, r5, r6, pc} +_021DE810: + add r0, r5, #0 + add r0, #0x2c + ldrb r0, [r0] + ldr r2, [r5, #0] + ldr r4, [r5, #0x14] + lsr r1, r0, #1 + sub r1, r2, r1 + lsl r1, r1, #0x10 + asr r3, r1, #0x10 + add r1, r5, #0 + add r1, #0x2d + ldrb r2, [r1] + add r0, r3, r0 + lsl r0, r0, #0x10 + lsr r1, r2, #1 + sub r1, r4, r1 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + mov r0, #0 + add r2, r1, r2 + str r0, [sp, #4] + lsl r2, r2, #0x10 + ldr r0, [r5, #0x28] + asr r2, r2, #0x10 + bl ov5_021DE89C + add r0, r5, #0 + bl ov5_021DDD90 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x14 + bl ov5_021DDD90 + add r0, r5, #0 + add r0, #0x2c + ldrb r0, [r0] + ldr r2, [r5, #0] + ldr r6, [r5, #0x14] + lsr r1, r0, #1 + sub r1, r2, r1 + lsl r1, r1, #0x10 + asr r3, r1, #0x10 + add r1, r5, #0 + add r1, #0x2d + ldrb r2, [r1] + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + lsr r1, r2, #1 + str r0, [sp] + add r0, r5, #0 + sub r1, r6, r1 + add r0, #0x2f + lsl r1, r1, #0x10 + ldrb r0, [r0] + asr r1, r1, #0x10 + add r2, r1, r2 + str r0, [sp, #4] + lsl r2, r2, #0x10 + ldr r0, [r5, #0x28] + asr r2, r2, #0x10 + bl ov5_021DE89C + add r0, r4, #0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE7FC + + thumb_func_start ov5_021DE89C +ov5_021DE89C: ; 0x021DE89C + push {r3, r4, r5, lr} + sub sp, #8 + ldr r5, [sp, #0x18] + add r4, r1, #0 + cmp r5, #0 + ble _021DE8F4 + cmp r2, #0 + ble _021DE8F4 + cmp r3, r5 + beq _021DE8F4 + cmp r4, r2 + beq _021DE8F4 + cmp r3, #0 + bge _021DE8BA + mov r3, #0 +_021DE8BA: + mov r1, #1 + lsl r1, r1, #8 + cmp r5, r1 + ble _021DE8C4 + add r5, r1, #0 +_021DE8C4: + cmp r4, #0 + bge _021DE8CA + mov r4, #0 +_021DE8CA: + mov r1, #1 + lsl r1, r1, #8 + cmp r2, r1 + ble _021DE8D4 + add r2, r1, #0 +_021DE8D4: + sub r1, r5, r3 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + str r1, [sp] + sub r1, r2, r4 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + str r1, [sp, #4] + lsl r2, r3, #0x10 + add r1, sp, #8 + lsl r3, r4, #0x10 + ldrb r1, [r1, #0x14] + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0201AE78 +_021DE8F4: + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DE89C + + thumb_func_start ov5_021DE8F8 +ov5_021DE8F8: ; 0x021DE8F8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #4 + mov r1, #0xcc + bl sub_02018144 + mov r1, #0 + mov r2, #0xcc + add r7, r0, #0 + bl sub_020D5124 + mov r4, #0 + add r5, r7, #0 +_021DE912: + add r0, r6, #0 + bl ov5_021DE784 + str r0, [r5, #4] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x30 + blt _021DE912 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE8F8 + + thumb_func_start ov5_021DE928 +ov5_021DE928: ; 0x021DE928 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021DE930: + ldr r0, [r5, #4] + bl ov5_021DE79C + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x30 + blt _021DE930 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DE928 + + thumb_func_start ov5_021DE948 +ov5_021DE948: ; 0x021DE948 + push {r3, r4} + str r3, [r0, #0] + ldr r3, _021DE984 ; =0xFFFFFFF8 + add r3, sp + ldrb r4, [r3, #0x10] + add r3, r0, #0 + add r3, #0xc9 + strb r4, [r3] + add r3, r0, #0 + add r3, #0xc6 + strb r1, [r3] + add r1, r0, #0 + add r1, #0xc7 + strb r2, [r1] + add r1, r0, #0 + mov r2, #0 + add r1, #0xc4 + strb r2, [r1] + add r1, r0, #0 + add r1, #0xc5 + strb r2, [r1] + add r1, r0, #0 + add r1, #0xc8 + strb r2, [r1] + mov r1, #1 + add r0, #0xca + strb r1, [r0] + pop {r3, r4} + bx lr + nop +_021DE984: .word 0xFFFFFFF8 + thumb_func_end ov5_021DE948 + + thumb_func_start ov5_021DE988 +ov5_021DE988: ; 0x021DE988 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + add r0, #0xca + ldrb r0, [r0] + cmp r0, #0 + bne _021DE99C + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021DE99C: + add r0, r6, #0 + add r0, #0xc4 + ldrb r0, [r0] + cmp r0, #0x30 + bhs _021DEA20 + mov r1, #0xc8 + ldrsb r0, [r6, r1] + sub r2, r0, #1 + add r0, r6, #0 + add r0, #0xc8 + strb r2, [r0] + ldrsb r0, [r6, r1] + cmp r0, #0 + bgt _021DEA20 + add r0, r6, #0 + add r0, #0xc7 + ldrb r1, [r0] + add r0, r6, #0 + add r0, #0xc8 + strb r1, [r0] + add r0, r6, #0 + add r0, #0xc4 + ldrb r0, [r0] + mov r1, #0x1d + lsr r3, r0, #0x1f + lsl r2, r0, #0x1d + sub r2, r2, r3 + ror r2, r1 + add r2, r3, r2 + ldr r1, _021DEA7C ; =0x021F9988 + mov r3, #0x20 + ldrb r1, [r1, r2] + lsr r2, r0, #3 + lsl r4, r2, #5 + mov r2, #0xb0 + sub r2, r2, r4 + str r2, [sp] + add r2, r6, #0 + add r2, #0xc6 + ldrb r2, [r2] + lsl r0, r0, #2 + lsl r1, r1, #5 + str r2, [sp, #4] + ldr r2, [r6, #0] + add r0, r6, r0 + str r2, [sp, #8] + str r3, [sp, #0xc] + add r2, r6, #0 + str r3, [sp, #0x10] + add r2, #0xc9 + ldrb r2, [r2] + sub r3, #0x30 + add r1, #0x10 + str r2, [sp, #0x14] + ldr r0, [r0, #4] + add r2, r1, #0 + sub r3, r3, r4 + bl ov5_021DE7A4 + add r0, r6, #0 + add r0, #0xc4 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r6, #0 + add r0, #0xc4 + strb r1, [r0] +_021DEA20: + add r0, r6, #0 + add r0, #0xc5 + ldrb r4, [r0] + add r0, r6, #0 + add r0, #0xc4 + ldrb r0, [r0] + cmp r4, r0 + bge _021DEA58 + lsl r0, r4, #2 + add r7, r6, #0 + add r5, r6, r0 + add r7, #0xc5 +_021DEA38: + ldr r0, [r5, #4] + bl ov5_021DE7FC + str r0, [sp, #0x18] + cmp r0, #1 + bne _021DEA4A + ldrb r0, [r7] + add r0, r0, #1 + strb r0, [r7] +_021DEA4A: + add r0, r6, #0 + add r0, #0xc4 + ldrb r0, [r0] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _021DEA38 +_021DEA58: + add r0, r6, #0 + add r0, #0xc5 + ldrb r0, [r0] + cmp r0, #0x30 + blo _021DEA74 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _021DEA74 + mov r0, #0 + add r6, #0xca + strb r0, [r6] + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021DEA74: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021DEA7C: .word 0x021F9988 + thumb_func_end ov5_021DE988 + + thumb_func_start ov5_021DEA80 +ov5_021DEA80: ; 0x021DEA80 + push {r3, lr} + mov r1, #0x1c + bl sub_02018144 + add r3, r0, #0 + mov r2, #0x1c + mov r1, #0 +_021DEA8E: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _021DEA8E + pop {r3, pc} + thumb_func_end ov5_021DEA80 + + thumb_func_start ov5_021DEA98 +ov5_021DEA98: ; 0x021DEA98 + ldr r3, _021DEA9C ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021DEA9C: .word sub_020181C4 + thumb_func_end ov5_021DEA98 + + thumb_func_start ov5_021DEAA0 +ov5_021DEAA0: ; 0x021DEAA0 + push {r4, lr} + add r4, r1, #0 + ldr r1, [sp, #8] + str r1, [r0, #0] + ldr r1, _021DEAC4 ; =0xFFFFFFF8 + add r1, sp + ldrb r1, [r1, #0x14] + strb r1, [r0, #0x19] + mov r1, #1 + strb r1, [r0, #0x18] + add r1, r2, #0 + add r2, r3, #0 + add r0, r0, #4 + add r3, r4, #0 + bl ov5_021DDD80 + pop {r4, pc} + nop +_021DEAC4: .word 0xFFFFFFF8 + thumb_func_end ov5_021DEAA0 + + thumb_func_start ov5_021DEAC8 +ov5_021DEAC8: ; 0x021DEAC8 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrb r0, [r5, #0x18] + cmp r0, #0 + bne _021DEAD6 + mov r0, #1 + pop {r4, r5, r6, pc} +_021DEAD6: + ldr r0, [r5, #4] + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r5, #4 + bl ov5_021DDD90 + ldr r2, [r5, #4] + add r6, r0, #0 + lsl r2, r2, #0x10 + ldrb r3, [r5, #0x19] + ldr r0, [r5, #0] + add r1, r4, #0 + lsr r2, r2, #0x10 + bl ov5_021DEB04 + cmp r6, #1 + bne _021DEB00 + mov r0, #0 + strb r0, [r5, #0x18] + mov r0, #1 + pop {r4, r5, r6, pc} +_021DEB00: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DEAC8 + + thumb_func_start ov5_021DEB04 +ov5_021DEB04: ; 0x021DEB04 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #8] + asr r0, r2, #4 + add r4, r1, #0 + lsl r1, r0, #1 + lsl r0, r1, #1 + ldr r2, _021DEBE4 ; =0x020F983C + add r1, r1, #1 + lsl r1, r1, #1 + ldrsh r0, [r2, r0] + ldrsh r1, [r2, r1] + add r7, r3, #0 + bl sub_020BCFD0 + str r0, [sp, #0x14] + asr r0, r4, #4 + lsl r1, r0, #1 + lsl r0, r1, #1 + ldr r2, _021DEBE4 ; =0x020F983C + add r1, r1, #1 + lsl r1, r1, #1 + ldrsh r0, [r2, r0] + ldrsh r1, [r2, r1] + bl sub_020BCFD0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + mov r5, #0 + asr r0, r0, #0x1f + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + asr r0, r0, #0x1f + str r0, [sp, #0x10] +_021DEB48: + mov r0, #0x5f + sub r0, r0, r5 + lsl r6, r0, #0xc + asr r4, r6, #0x1f + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + add r2, r6, #0 + add r3, r4, #0 + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r0, r0, r2 + ldr r2, _021DEBE8 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + asr r0, r0, #0xc + str r0, [sp, #0x1c] + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x10] + add r2, r6, #0 + add r3, r4, #0 + bl sub_020E1F1C + mov r2, #2 + lsl r2, r2, #0xa + add r2, r0, r2 + ldr r0, _021DEBE8 ; =0x00000000 + ldr r4, [sp, #0x1c] + adc r1, r0 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + asr r0, r1, #0xc + add r6, r0, #0 + mov r2, #0x80 + ldr r1, [sp, #0x1c] + sub r0, r2, r0 + sub r1, r2, r1 + add r4, #0x80 + add r6, #0x80 + add r3, r0, #0 + cmp r0, r1 + ble _021DEBA8 + add r3, r1, #0 + add r1, r0, #0 +_021DEBA8: + cmp r6, r4 + ble _021DEBB2 + add r0, r6, #0 + add r6, r4, #0 + add r4, r0, #0 +_021DEBB2: + add r0, r1, #1 + str r0, [sp] + ldr r0, [sp, #8] + add r1, r5, #0 + add r2, r5, #1 + str r7, [sp, #4] + bl ov5_021DE89C + add r0, r4, #1 + str r0, [sp] + mov r1, #0xbf + mov r2, #0xc0 + ldr r0, [sp, #8] + sub r1, r1, r5 + sub r2, r2, r5 + add r3, r6, #0 + str r7, [sp, #4] + bl ov5_021DE89C + add r5, r5, #1 + cmp r5, #0x60 + blt _021DEB48 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DEBE4: .word 0x020F983C +_021DEBE8: .word 0x00000000 + thumb_func_end ov5_021DEB04 + + thumb_func_start ov5_021DEBEC +ov5_021DEBEC: ; 0x021DEBEC + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x24 + add r6, r0, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x24 + add r7, r0, #0 + bl sub_020D5124 + mov r4, #0 + add r5, r7, #0 +_021DEC04: + add r0, r6, #0 + bl ov5_021DEA80 + add r4, r4, #1 + stmia r5!, {r0} + cmp r4, #8 + blt _021DEC04 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DEBEC + + thumb_func_start ov5_021DEC18 +ov5_021DEC18: ; 0x021DEC18 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021DEC20: + ldr r0, [r5, #0] + bl ov5_021DEA98 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021DEC20 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DEC18 + + thumb_func_start ov5_021DEC38 +ov5_021DEC38: ; 0x021DEC38 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0xc] + ldr r4, _021DECB0 ; =0x021F9A2C + str r0, [sp, #8] + str r2, [sp, #0x10] + str r3, [sp, #0x14] + mov r6, #0 + add r5, r0, #0 +_021DEC4A: + ldrh r1, [r4] + ldr r0, _021DECB4 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + add r7, r0, #0 + ldrh r1, [r4, #2] + ldr r0, _021DECB4 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + add r3, r0, #0 + ldr r0, [sp, #0x10] + lsl r2, r7, #0x10 + str r0, [sp] + ldr r0, [sp, #0x14] + lsl r3, r3, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r1, [sp, #0xc] + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl ov5_021DEAA0 + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #8 + blt _021DEC4A + ldr r0, [sp, #8] + mov r1, #1 + add r0, #0x20 + strb r1, [r0] + add r1, #0xff + str r1, [sp] + str r0, [sp, #8] + ldr r0, [sp, #0x14] + mov r1, #0x5d + str r0, [sp, #4] + ldr r0, [sp, #0x10] + mov r2, #0x63 + mov r3, #0 + bl ov5_021DE89C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021DECB0: .word 0x021F9A2C +_021DECB4: .word 0x0000FFFF + thumb_func_end ov5_021DEC38 + + thumb_func_start ov5_021DECB8 +ov5_021DECB8: ; 0x021DECB8 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + bne _021DECC8 + mov r0, #1 + pop {r4, r5, r6, pc} +_021DECC8: + mov r4, #0 + add r5, r6, #0 +_021DECCC: + ldr r0, [r5, #0] + bl ov5_021DEAC8 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _021DECCC + cmp r0, #1 + bne _021DECE8 + mov r0, #0 + add r6, #0x20 + strb r0, [r6] + mov r0, #1 + pop {r4, r5, r6, pc} +_021DECE8: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DECB8 + + thumb_func_start ov5_021DECEC +ov5_021DECEC: ; 0x021DECEC + push {r4, lr} + mov r0, #4 + mov r1, #0xe8 + bl sub_02018144 + mov r1, #0 + mov r2, #0xe8 + add r4, r0, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov5_021DECEC + + thumb_func_start ov5_021DED04 +ov5_021DED04: ; 0x021DED04 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0xe0 + ldr r1, [r1, #0] + cmp r1, #0 + beq _021DED16 + bl ov5_021DEE84 +_021DED16: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DED04 + + thumb_func_start ov5_021DED20 +ov5_021DED20: ; 0x021DED20 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, [sp, #0x18] + add r7, r1, #0 + str r0, [sp, #0x18] + add r0, r7, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + add r6, r2, #0 + add r5, r3, #0 + cmp r0, #0 + beq _021DED3C + bl sub_02022974 +_021DED3C: + mov r2, #0 + str r2, [r4, #0x18] + ldr r0, [r4, #0x10] + add r4, #0x18 + ldr r0, [r0, #4] + add r3, r6, #0 + ldr r1, [r0, #0x1c] + add r0, r7, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r7, #0 + str r2, [r7, #0x14] + add r0, #0xe4 + str r4, [r0, #0] + add r0, r7, #0 + mov r1, #0xff + bl ov5_021DDD80 + mov r4, #0 +_021DED62: + add r0, r4, #0 + add r1, r5, #0 + bl sub_020E2178 + ldr r0, [sp, #0x18] + mul r0, r1 + add r1, r5, #0 + bl sub_020E2178 + add r6, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl sub_020E2178 + mov r1, #1 + tst r0, r1 + bne _021DED8A + add r0, r7, r4 + strb r6, [r0, #0x18] + b _021DED92 +_021DED8A: + ldr r0, [sp, #0x18] + sub r1, r0, r6 + add r0, r7, r4 + strb r1, [r0, #0x18] +_021DED92: + add r4, r4, #1 + cmp r4, #0xc0 + blt _021DED62 + ldr r0, _021DEDDC ; =0x04000048 + mov r1, #0x3f + ldrh r3, [r0] + ldr r2, [sp, #0x1c] + bic r3, r1 + orr r3, r2 + mov r2, #0x20 + orr r3, r2 + strh r3, [r0] + ldrh r3, [r0, #2] + bic r3, r1 + ldr r1, [sp, #0x20] + orr r1, r3 + strh r1, [r0, #2] + add r1, r0, #0 + mov r3, #0 + sub r1, #8 + strh r3, [r1] + mov r1, #0xc0 + sub r0, r0, #4 + strh r1, [r0] + lsl r3, r2, #0x15 + ldr r1, [r3, #0] + ldr r0, _021DEDE0 ; =0xFFFF1FFF + and r1, r0 + lsl r0, r2, #8 + orr r0, r1 + str r0, [r3, #0] + ldr r0, _021DEDE4 ; =ov5_021DEDE8 + add r1, r7, #0 + lsl r2, r2, #5 + bl sub_0200DA3C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DEDDC: .word 0x04000048 +_021DEDE0: .word 0xFFFF1FFF +_021DEDE4: .word ov5_021DEDE8 + thumb_func_end ov5_021DED20 + + thumb_func_start ov5_021DEDE8 +ov5_021DEDE8: ; 0x021DEDE8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r1, _021DEE1C ; =ov5_021DEE50 + add r2, r4, #0 + bl ov5_021EF418 + add r1, r4, #0 + add r1, #0xdc + str r0, [r1, #0] + mov r2, #1 + ldr r0, _021DEE20 ; =ov5_021DEE24 + add r1, r4, #0 + lsl r2, r2, #0xa + bl sub_0200DA3C + add r4, #0xe0 + str r0, [r4, #0] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + nop +_021DEE1C: .word ov5_021DEE50 +_021DEE20: .word ov5_021DEE24 + thumb_func_end ov5_021DEDE8 + + thumb_func_start ov5_021DEE24 +ov5_021DEE24: ; 0x021DEE24 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021DEE34 + cmp r0, #1 + beq _021DEE46 + pop {r4, pc} +_021DEE34: + add r0, r4, #0 + bl ov5_021DDD90 + cmp r0, #1 + bne _021DEE4C + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + pop {r4, pc} +_021DEE46: + add r0, r4, #0 + bl ov5_021DEE84 +_021DEE4C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DEE24 + + thumb_func_start ov5_021DEE50 +ov5_021DEE50: ; 0x021DEE50 + ldr r0, _021DEE7C ; =0x04000006 + ldrh r0, [r0] + cmp r0, #0xc0 + bge _021DEE78 + add r0, r1, r0 + ldrb r0, [r0, #0x18] + ldr r2, [r1, #0] + sub r0, r2, r0 + bpl _021DEE64 + mov r0, #0 +_021DEE64: + lsl r1, r0, #8 + mov r0, #0xff + lsl r0, r0, #8 + and r1, r0 + mov r0, #0xff + orr r0, r1 + ldr r1, _021DEE80 ; =0x04000040 + strh r0, [r1] + mov r0, #0xc0 + strh r0, [r1, #4] +_021DEE78: + bx lr + nop +_021DEE7C: .word 0x04000006 +_021DEE80: .word 0x04000040 + thumb_func_end ov5_021DEE50 + + thumb_func_start ov5_021DEE84 +ov5_021DEE84: ; 0x021DEE84 + push {r4, lr} + mov r2, #1 + lsl r2, r2, #0x1a + add r4, r0, #0 + ldr r1, [r2, #0] + ldr r0, _021DEEC4 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r1, #1 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xdc + ldr r0, [r0, #0] + bl ov5_021EF43C + add r0, r4, #0 + mov r1, #0 + add r0, #0xdc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + bl sub_0200DA58 + mov r0, #0 + add r4, #0xe0 + str r0, [r4, #0] + pop {r4, pc} + nop +_021DEEC4: .word 0xFFFF1FFF + thumb_func_end ov5_021DEE84 + + thumb_func_start ov5_021DEEC8 +ov5_021DEEC8: ; 0x021DEEC8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + mov r6, #1 + add r1, r0, #0 + tst r1, r6 + bne _021DEEEC + mov r1, #0x72 + lsl r1, r1, #4 + tst r1, r0 + bne _021DEEE2 + cmp r0, #0 + bne _021DEEE6 +_021DEEE2: + mov r6, #0 + b _021DEEEC +_021DEEE6: + bl sub_02022974 + mov r6, #0 +_021DEEEC: + ldr r0, [r5, #4] + bl sub_02054A40 + add r7, r0, #0 + ldr r0, [r5, #8] + bl sub_02054A40 + str r0, [sp] + add r0, r7, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + ldr r0, [sp] + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + mov r1, #0x55 + lsl r1, r1, #2 + ldr r1, [r5, r1] + sub r0, r0, r7 + cmp r1, #0x18 + bhi _021DEF66 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021DEF2A: ; jump table + .short _021DEF5C - _021DEF2A - 2 ; case 0 + .short _021DEF5C - _021DEF2A - 2 ; case 1 + .short _021DEF5C - _021DEF2A - 2 ; case 2 + .short _021DEF5C - _021DEF2A - 2 ; case 3 + .short _021DEF5C - _021DEF2A - 2 ; case 4 + .short _021DEF64 - _021DEF2A - 2 ; case 5 + .short _021DEF5C - _021DEF2A - 2 ; case 6 + .short _021DEF60 - _021DEF2A - 2 ; case 7 + .short _021DEF5C - _021DEF2A - 2 ; case 8 + .short _021DEF5C - _021DEF2A - 2 ; case 9 + .short _021DEF5C - _021DEF2A - 2 ; case 10 + .short _021DEF5C - _021DEF2A - 2 ; case 11 + .short _021DEF66 - _021DEF2A - 2 ; case 12 + .short _021DEF66 - _021DEF2A - 2 ; case 13 + .short _021DEF66 - _021DEF2A - 2 ; case 14 + .short _021DEF66 - _021DEF2A - 2 ; case 15 + .short _021DEF66 - _021DEF2A - 2 ; case 16 + .short _021DEF66 - _021DEF2A - 2 ; case 17 + .short _021DEF66 - _021DEF2A - 2 ; case 18 + .short _021DEF66 - _021DEF2A - 2 ; case 19 + .short _021DEF66 - _021DEF2A - 2 ; case 20 + .short _021DEF66 - _021DEF2A - 2 ; case 21 + .short _021DEF66 - _021DEF2A - 2 ; case 22 + .short _021DEF66 - _021DEF2A - 2 ; case 23 + .short _021DEF5C - _021DEF2A - 2 ; case 24 +_021DEF5C: + mov r4, #0 + b _021DEF66 +_021DEF60: + mov r4, #2 + b _021DEF66 +_021DEF64: + mov r4, #4 +_021DEF66: + cmp r0, #0 + ble _021DEF6C + add r4, r4, #1 +_021DEF6C: + mov r0, #6 + mul r0, r6 + add r0, r4, r0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DEEC8 + + thumb_func_start ov5_021DEF74 +ov5_021DEF74: ; 0x021DEF74 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DEF88 ; =0x0400006C + ldr r1, [r1, #0] + bl sub_020BDEC4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + ; .align 2, 0 +_021DEF88: .word 0x0400006C + thumb_func_end ov5_021DEF74 + + thumb_func_start ov5_021DEF8C +ov5_021DEF8C: ; 0x021DEF8C + ldr r3, _021DEF98 ; =sub_0200DA3C + mov r2, #1 + add r1, r0, #0 + ldr r0, _021DEF9C ; =ov5_021DEF74 + lsl r2, r2, #0xa + bx r3 + ; .align 2, 0 +_021DEF98: .word sub_0200DA3C +_021DEF9C: .word ov5_021DEF74 + thumb_func_end ov5_021DEF8C + + thumb_func_start ov5_021DEFA0 +ov5_021DEFA0: ; 0x021DEFA0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021DF020 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DEFB0 + bl sub_02022974 +_021DEFB0: + mov r0, #4 + mov r1, #0x18 + bl sub_02018144 + ldr r1, _021DF020 ; =0x02202120 + mov r2, #0x18 + str r0, [r1, #0] + mov r1, #0 +_021DEFC0: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021DEFC0 + ldr r0, _021DF020 ; =0x02202120 + mov r1, #0 + ldr r2, [r0, #0] + strh r1, [r2] + ldr r2, [r0, #0] + strb r1, [r2, #2] + ldr r0, [r0, #0] + str r4, [r0, #4] + mov r0, #2 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + bl sub_020BEC9C + mov r2, #2 + ldr r1, _021DF024 ; =0x06840000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + ldr r0, _021DF028 ; =0xC0320C04 + ldr r2, _021DF02C ; =0x04000064 + ldr r1, _021DF020 ; =0x02202120 + str r0, [r2, #0] + ldr r0, _021DF030 ; =ov5_021DF258 + ldr r1, [r1, #0] + lsr r2, r2, #0x10 + bl sub_0200DA3C + ldr r1, _021DF020 ; =0x02202120 + mov r2, #1 + ldr r0, _021DF034 ; =ov5_021DF28C + ldr r1, [r1, #0] + lsl r2, r2, #0xa + bl sub_0200D9E8 + pop {r4, pc} + ; .align 2, 0 +_021DF020: .word 0x02202120 +_021DF024: .word 0x06840000 +_021DF028: .word 0xC0320C04 +_021DF02C: .word 0x04000064 +_021DF030: .word ov5_021DF258 +_021DF034: .word ov5_021DF28C + thumb_func_end ov5_021DEFA0 + + thumb_func_start ov5_021DF038 +ov5_021DF038: ; 0x021DF038 + push {r3, lr} + ldr r0, _021DF050 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF046 + bl sub_02022974 +_021DF046: + ldr r0, _021DF050 ; =0x02202120 + mov r1, #1 + ldr r0, [r0, #0] + strb r1, [r0, #3] + pop {r3, pc} + ; .align 2, 0 +_021DF050: .word 0x02202120 + thumb_func_end ov5_021DF038 + + thumb_func_start ov5_021DF054 +ov5_021DF054: ; 0x021DF054 + push {r3, lr} + ldr r0, _021DF06C ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF062 + bl sub_02022974 +_021DF062: + ldr r0, _021DF06C ; =0x02202120 + ldr r0, [r0, #0] + ldrb r0, [r0, #2] + pop {r3, pc} + nop +_021DF06C: .word 0x02202120 + thumb_func_end ov5_021DF054 + + thumb_func_start ov5_021DF070 +ov5_021DF070: ; 0x021DF070 + push {r3, lr} + ldr r0, _021DF080 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021DF07E + bl sub_0201469C +_021DF07E: + pop {r3, pc} + ; .align 2, 0 +_021DF080: .word 0x02202120 + thumb_func_end ov5_021DF070 + + thumb_func_start ov5_021DF084 +ov5_021DF084: ; 0x021DF084 + push {r3, lr} + ldr r0, _021DF0C8 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF092 + bl sub_02022974 +_021DF092: + bl sub_020141E4 + ldr r0, _021DF0C8 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov5_021DF3D4 + ldr r0, _021DF0C8 ; =0x02202120 + mov r1, #1 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov5_021D16F4 + ldr r0, _021DF0C8 ; =0x02202120 + mov r1, #1 + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bl ov5_021D1718 + ldr r0, _021DF0C8 ; =0x02202120 + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, _021DF0C8 ; =0x02202120 + mov r1, #0 + str r1, [r0, #0] + pop {r3, pc} + ; .align 2, 0 +_021DF0C8: .word 0x02202120 + thumb_func_end ov5_021DF084 + + thumb_func_start ov5_021DF0CC +ov5_021DF0CC: ; 0x021DF0CC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _021DF170 ; =0x02202120 + add r4, r1, #0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF0E0 + bl sub_02022974 +_021DF0E0: + ldr r0, _021DF170 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + cmp r0, #0 + beq _021DF0EE + bl sub_02022974 +_021DF0EE: + mov r1, #0x12 + mov r0, #4 + lsl r1, r1, #0xa + bl sub_02018144 + ldr r2, _021DF170 ; =0x02202120 + mov r3, #0x12 + ldr r1, [r2, #0] + lsl r3, r3, #0xa + str r0, [r1, #0xc] + mov r0, #1 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r2, [r2, #0] + ldr r0, _021DF174 ; =ov5_021DF3E8 + ldr r1, _021DF178 ; =ov5_021DF414 + ldr r2, [r2, #0xc] + bl sub_02014014 + ldr r1, _021DF170 ; =0x02202120 + ldr r2, [r1, #0] + str r0, [r2, #8] + ldr r0, [r1, #0] + ldr r0, [r0, #8] + cmp r0, #0 + bne _021DF128 + bl sub_02022974 +_021DF128: + ldr r0, _021DF170 ; =0x02202120 + mov r1, #1 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_02014788 + ldr r0, _021DF170 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_02014784 + add r2, r0, #0 + mov r0, #1 + mov r1, #0xe1 + lsl r0, r0, #0xc + lsl r1, r1, #0xe + bl sub_020206BC + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r3, #4 + str r2, [sp] + bl sub_0200723C + add r1, r0, #0 + ldr r0, _021DF170 ; =0x02202120 + mov r2, #0 + ldr r0, [r0, #0] + add r3, r2, #0 + ldr r0, [r0, #8] + bl sub_020144CC + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021DF170: .word 0x02202120 +_021DF174: .word ov5_021DF3E8 +_021DF178: .word ov5_021DF414 + thumb_func_end ov5_021DF0CC + + thumb_func_start ov5_021DF17C +ov5_021DF17C: ; 0x021DF17C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r1, sp, #0 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + ldr r0, _021DF1C8 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF198 + bl sub_02022974 +_021DF198: + ldr r0, _021DF1C8 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + cmp r0, #0 + bne _021DF1A6 + bl sub_02022974 +_021DF1A6: + mov r4, #0 + cmp r5, #0 + bls _021DF1C2 + ldr r6, _021DF1C8 ; =0x02202120 + add r7, sp, #0 +_021DF1B0: + ldr r0, [r6, #0] + add r1, r4, #0 + ldr r0, [r0, #8] + add r2, r7, #0 + bl sub_020146E4 + add r4, r4, #1 + cmp r4, r5 + blo _021DF1B0 +_021DF1C2: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021DF1C8: .word 0x02202120 + thumb_func_end ov5_021DF17C + + thumb_func_start ov5_021DF1CC +ov5_021DF1CC: ; 0x021DF1CC + push {r3, lr} + ldr r0, _021DF204 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF1DA + bl sub_02022974 +_021DF1DA: + ldr r0, _021DF204 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + cmp r0, #0 + bne _021DF1E8 + mov r0, #1 + pop {r3, pc} +_021DF1E8: + bl sub_020146C0 + ldr r0, _021DF204 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_02014710 + cmp r0, #0 + bne _021DF1FE + mov r0, #1 + pop {r3, pc} +_021DF1FE: + mov r0, #0 + pop {r3, pc} + nop +_021DF204: .word 0x02202120 + thumb_func_end ov5_021DF1CC + + thumb_func_start ov5_021DF208 +ov5_021DF208: ; 0x021DF208 + push {r3, lr} + ldr r0, _021DF220 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_02014710 + cmp r0, #0 + bne _021DF21C + mov r0, #1 + pop {r3, pc} +_021DF21C: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021DF220: .word 0x02202120 + thumb_func_end ov5_021DF208 + + thumb_func_start ov5_021DF224 +ov5_021DF224: ; 0x021DF224 + push {r3, lr} + ldr r0, _021DF254 ; =0x02202120 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF232 + bl sub_02022974 +_021DF232: + ldr r0, _021DF254 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #8] + bl sub_0201411C + ldr r0, _021DF254 ; =0x02202120 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_020181C4 + ldr r0, _021DF254 ; =0x02202120 + mov r2, #0 + ldr r1, [r0, #0] + str r2, [r1, #8] + ldr r0, [r0, #0] + str r2, [r0, #0xc] + pop {r3, pc} + ; .align 2, 0 +_021DF254: .word 0x02202120 + thumb_func_end ov5_021DF224 + + thumb_func_start ov5_021DF258 +ov5_021DF258: ; 0x021DF258 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _021DF26A + cmp r0, #1 + beq _021DF270 + pop {r3, r4, r5, pc} +_021DF26A: + add r0, r0, #1 + strh r0, [r4] + pop {r3, r4, r5, pc} +_021DF270: + ldrb r0, [r4, #3] + cmp r0, #1 + bne _021DF288 + ldr r0, [r4, #4] + bl ov5_021DF30C + add r0, r5, #0 + bl sub_0200DA58 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] +_021DF288: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF258 + + thumb_func_start ov5_021DF28C +ov5_021DF28C: ; 0x021DF28C + push {r4, r5, lr} + sub sp, #0x3c + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #2 + bne _021DF2FA + bl sub_02014000 + add r1, sp, #0x30 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + ldr r3, _021DF300 ; =0x021F9990 + str r0, [r1, #8] + ldmia r3!, {r0, r1} + add r2, sp, #0x24 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, sp, #0 + bl sub_020BB4C8 + add r0, sp, #0x30 + bl sub_020AF4BC + add r0, sp, #0x24 + bl sub_020AF4EC + ldr r1, _021DF304 ; =0x021C5B48 + add r0, sp, #0 + bl sub_020C4C88 + ldr r1, _021DF308 ; =0x021C5B0C + mov r0, #0xa4 + ldr r2, [r1, #0x7c] + bic r2, r0 + str r2, [r1, #0x7c] + ldr r0, [r4, #4] + mov r1, #0 + bl ov5_021D16F4 + ldr r0, [r4, #4] + mov r1, #0 + bl ov5_021D1718 + mov r0, #0 + add r1, r0, #0 + bl sub_02019060 + mov r0, #1 + strb r0, [r4, #2] + add r0, r5, #0 + bl sub_0200DA58 +_021DF2FA: + add sp, #0x3c + pop {r4, r5, pc} + nop +_021DF300: .word 0x021F9990 +_021DF304: .word 0x021C5B48 +_021DF308: .word 0x021C5B0C + thumb_func_end ov5_021DF28C + + thumb_func_start ov5_021DF30C +ov5_021DF30C: ; 0x021DF30C + push {r4, r5, lr} + sub sp, #0x6c + ldr r5, _021DF3BC ; =0x021F9A4C + add r4, r0, #0 + add r3, sp, #0x44 + mov r2, #5 +_021DF318: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021DF318 + add r0, sp, #0x44 + bl sub_0201FE94 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + ldr r5, _021DF3C0 ; =0x021F999C + add r3, sp, #0x34 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r0, [r4, #8] + bl ov5_021D143C + ldr r2, _021DF3C4 ; =0x0400000E + mov r0, #0x43 + ldrh r1, [r2] + and r1, r0 + ldr r0, _021DF3C8 ; =0x00004884 + orr r0, r1 + strh r0, [r2] + mov r0, #3 + add r1, r0, #0 + bl sub_02019060 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + add r0, sp, #0x24 + bl sub_020BB44C + mov r2, #0 + str r2, [sp] + ldr r0, _021DF3CC ; =0x04000030 + add r1, sp, #0x24 + add r3, r2, #0 + str r2, [sp, #4] + bl sub_020BF4AC + ldr r5, _021DF3D0 ; =0x021F99D8 + add r3, sp, #8 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #8] + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + ldr r0, [r4, #8] + mov r1, #2 + bl sub_02019EBC + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x6c + pop {r4, r5, pc} + ; .align 2, 0 +_021DF3BC: .word 0x021F9A4C +_021DF3C0: .word 0x021F999C +_021DF3C4: .word 0x0400000E +_021DF3C8: .word 0x00004884 +_021DF3CC: .word 0x04000030 +_021DF3D0: .word 0x021F99D8 + thumb_func_end ov5_021DF30C + + thumb_func_start ov5_021DF3D4 +ov5_021DF3D4: ; 0x021DF3D4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #8] + bl ov5_021D1434 + pop {r4, pc} + thumb_func_end ov5_021DF3D4 + + thumb_func_start ov5_021DF3E8 +ov5_021DF3E8: ; 0x021DF3E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021DF410 ; =0x02202120 + add r4, r1, #0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF3FA + bl sub_02022974 +_021DF3FA: + cmp r4, #0 + beq _021DF402 + bl sub_02022974 +_021DF402: + ldr r0, _021DF410 ; =0x02202120 + ldr r2, [r0, #0] + ldr r0, [r2, #0x10] + add r1, r0, r5 + str r1, [r2, #0x10] + pop {r3, r4, r5, pc} + nop +_021DF410: .word 0x02202120 + thumb_func_end ov5_021DF3E8 + + thumb_func_start ov5_021DF414 +ov5_021DF414: ; 0x021DF414 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021DF43C ; =0x02202120 + add r4, r1, #0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _021DF426 + bl sub_02022974 +_021DF426: + cmp r4, #0 + beq _021DF42E + bl sub_02022974 +_021DF42E: + ldr r0, _021DF43C ; =0x02202120 + ldr r2, [r0, #0] + ldr r0, [r2, #0x14] + add r1, r0, r5 + str r1, [r2, #0x14] + pop {r3, r4, r5, pc} + nop +_021DF43C: .word 0x02202120 + thumb_func_end ov5_021DF414 + + .rodata + + + .global Unk_ov5_021F9988 +Unk_ov5_021F9988: ; 0x021F9988 + .incbin "incbin/overlay5_rodata.bin", 0x1074, 0x107C - 0x1074 + + .global Unk_ov5_021F9990 +Unk_ov5_021F9990: ; 0x021F9990 + .incbin "incbin/overlay5_rodata.bin", 0x107C, 0x1088 - 0x107C + + .global Unk_ov5_021F999C +Unk_ov5_021F999C: ; 0x021F999C + .incbin "incbin/overlay5_rodata.bin", 0x1088, 0x1098 - 0x1088 + + .global Unk_ov5_021F99AC +Unk_ov5_021F99AC: ; 0x021F99AC + .incbin "incbin/overlay5_rodata.bin", 0x1098, 0x10A8 - 0x1098 + + .global Unk_ov5_021F99BC +Unk_ov5_021F99BC: ; 0x021F99BC + .incbin "incbin/overlay5_rodata.bin", 0x10A8, 0x10C4 - 0x10A8 + + .global Unk_ov5_021F99D8 +Unk_ov5_021F99D8: ; 0x021F99D8 + .incbin "incbin/overlay5_rodata.bin", 0x10C4, 0x10E0 - 0x10C4 + + .global Unk_ov5_021F99F4 +Unk_ov5_021F99F4: ; 0x021F99F4 + .incbin "incbin/overlay5_rodata.bin", 0x10E0, 0x10FC - 0x10E0 + + .global Unk_ov5_021F9A10 +Unk_ov5_021F9A10: ; 0x021F9A10 + .incbin "incbin/overlay5_rodata.bin", 0x10FC, 0x1118 - 0x10FC + + .global Unk_ov5_021F9A2C +Unk_ov5_021F9A2C: ; 0x021F9A2C + .incbin "incbin/overlay5_rodata.bin", 0x1118, 0x1138 - 0x1118 + + .global Unk_ov5_021F9A4C +Unk_ov5_021F9A4C: ; 0x021F9A4C + .incbin "incbin/overlay5_rodata.bin", 0x1138, 0x1160 - 0x1138 + + .global Unk_ov5_021F9A74 +Unk_ov5_021F9A74: ; 0x021F9A74 + .incbin "incbin/overlay5_rodata.bin", 0x1160, 0x7C + + + .bss + + + .global Unk_ov5_02202120 +Unk_ov5_02202120: ; 0x02202120 + .space 0x4 + diff --git a/asm/ov5_021DF440.s b/asm/ov5_021DF440.s new file mode 100644 index 000000000..3d20d7197 --- /dev/null +++ b/asm/ov5_021DF440.s @@ -0,0 +1,1089 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DF440 +ov5_021DF440: ; 0x021DF440 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + add r0, r7, #0 + mov r1, #0x24 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x24 + bl sub_020D5124 + str r7, [r4, #0] + str r5, [r4, #4] + str r6, [r4, #0x10] + add r0, r7, #0 + lsl r1, r5, #3 + bl sub_02018144 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov5_021DF5E8 + add r0, r4, #0 + bl ov5_021DF588 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF440 + + thumb_func_start ov5_021DF47C +ov5_021DF47C: ; 0x021DF47C + ldr r3, _021DF484 ; =ov5_021DF6F8 + str r1, [r0, #8] + bx r3 + nop +_021DF484: .word ov5_021DF6F8 + thumb_func_end ov5_021DF47C + + thumb_func_start ov5_021DF488 +ov5_021DF488: ; 0x021DF488 + push {r3, r4, lr} + sub sp, #0x14 + ldr r4, [sp, #0x20] + str r4, [sp] + ldr r4, [sp, #0x24] + str r4, [sp, #4] + ldr r4, [sp, #0x28] + str r4, [sp, #8] + ldr r4, [sp, #0x2c] + str r4, [sp, #0xc] + ldr r4, [sp, #0x30] + str r4, [sp, #0x10] + bl ov5_021DF754 + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov5_021DF488 + + thumb_func_start ov5_021DF4A8 +ov5_021DF4A8: ; 0x021DF4A8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021DF694 + cmp r0, #0 + beq _021DF4BC + bl sub_02022974 + pop {r3, r4, r5, pc} +_021DF4BC: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021DF600 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF4A8 + + thumb_func_start ov5_021DF4C8 +ov5_021DF4C8: ; 0x021DF4C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #0x22 + beq _021DF4E2 +_021DF4D4: + add r0, r5, #0 + bl ov5_021DF4A8 + add r4, r4, #4 + ldr r1, [r4, #0] + cmp r1, #0x22 + bne _021DF4D4 +_021DF4E2: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DF4C8 + + thumb_func_start ov5_021DF4E4 +ov5_021DF4E4: ; 0x021DF4E4 + push {r3, lr} + bl ov5_021DF694 + cmp r0, #0 + beq _021DF4F2 + mov r0, #1 + pop {r3, pc} +_021DF4F2: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF4E4 + + thumb_func_start ov5_021DF4F8 +ov5_021DF4F8: ; 0x021DF4F8 + ldr r3, _021DF4FC ; =ov5_021DF71C + bx r3 + ; .align 2, 0 +_021DF4FC: .word ov5_021DF71C + thumb_func_end ov5_021DF4F8 + + thumb_func_start ov5_021DF500 +ov5_021DF500: ; 0x021DF500 + push {r4, lr} + add r4, r0, #0 + bl ov5_021DF708 + add r0, r4, #0 + bl ov5_021DF644 + add r0, r4, #0 + bl ov5_021DF7C4 + add r0, r4, #0 + bl ov5_021DF59C + ldr r0, [r4, #0x14] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021DF500 + + thumb_func_start ov5_021DF528 +ov5_021DF528: ; 0x021DF528 + push {r3, lr} + cmp r2, #0 + ldr r0, [r0, #0] + bne _021DF536 + bl sub_02018144 + pop {r3, pc} +_021DF536: + bl sub_02018184 + pop {r3, pc} + thumb_func_end ov5_021DF528 + + thumb_func_start ov5_021DF53C +ov5_021DF53C: ; 0x021DF53C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r3, #0 + bl ov5_021DF528 + add r1, r4, #0 + add r2, r5, #0 + add r6, r0, #0 + bl sub_020D5124 + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DF53C + + thumb_func_start ov5_021DF554 +ov5_021DF554: ; 0x021DF554 + ldr r3, _021DF558 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021DF558: .word sub_020181C4 + thumb_func_end ov5_021DF554 + + thumb_func_start ov5_021DF55C +ov5_021DF55C: ; 0x021DF55C + push {r3, lr} + bl ov5_021DF694 + cmp r0, #0 + bne _021DF56E + bl sub_02022974 + mov r0, #0 + pop {r3, pc} +_021DF56E: + ldr r0, [r0, #4] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF55C + + thumb_func_start ov5_021DF574 +ov5_021DF574: ; 0x021DF574 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov5_021DF574 + + thumb_func_start ov5_021DF578 +ov5_021DF578: ; 0x021DF578 + push {r3, lr} + bl sub_02062C00 + ldr r0, [r0, #0x40] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF578 + + thumb_func_start ov5_021DF584 +ov5_021DF584: ; 0x021DF584 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov5_021DF584 + + thumb_func_start ov5_021DF588 +ov5_021DF588: ; 0x021DF588 + push {r4, lr} + add r4, r0, #0 + bl ov5_021DF584 + add r1, r0, #0 + mov r0, #0x6b + bl sub_02006C24 + str r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov5_021DF588 + + thumb_func_start ov5_021DF59C +ov5_021DF59C: ; 0x021DF59C + ldr r3, _021DF5A4 ; =sub_02006CA8 + ldr r0, [r0, #0x18] + bx r3 + nop +_021DF5A4: .word sub_02006CA8 + thumb_func_end ov5_021DF59C + + thumb_func_start ov5_021DF5A8 +ov5_021DF5A8: ; 0x021DF5A8 + ldr r3, _021DF5B0 ; =sub_02006D84 + ldr r0, [r0, #0x18] + bx r3 + nop +_021DF5B0: .word sub_02006D84 + thumb_func_end ov5_021DF5A8 + + thumb_func_start ov5_021DF5B4 +ov5_021DF5B4: ; 0x021DF5B4 + ldr r3, _021DF5BC ; =sub_02006D28 + ldr r0, [r0, #0x18] + bx r3 + nop +_021DF5BC: .word sub_02006D28 + thumb_func_end ov5_021DF5B4 + + thumb_func_start ov5_021DF5C0 +ov5_021DF5C0: ; 0x021DF5C0 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r5, r2, #0 + add r6, r1, #0 + bl sub_02006D84 + add r1, r0, #0 + add r0, r4, #0 + add r2, r5, #0 + bl ov5_021DF528 + add r5, r0, #0 + ldr r0, [r4, #0x18] + add r1, r6, #0 + add r2, r5, #0 + bl sub_02006D28 + add r0, r5, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DF5C0 + + thumb_func_start ov5_021DF5E8 +ov5_021DF5E8: ; 0x021DF5E8 + push {r3, r4, r5, lr} + ldr r4, [r0, #4] + ldr r5, [r0, #0x14] + cmp r4, #0 + beq _021DF5FE +_021DF5F2: + add r0, r5, #0 + bl ov5_021DF6AC + add r5, #8 + sub r4, r4, #1 + bne _021DF5F2 +_021DF5FE: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DF5E8 + + thumb_func_start ov5_021DF600 +ov5_021DF600: ; 0x021DF600 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + bl ov5_021DF6D0 + add r1, r0, #0 + ldr r1, [r1, #4] + add r0, r5, #0 + blx r1 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021DF66C + add r1, r6, #0 + add r2, r4, #0 + bl ov5_021DF6B8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF600 + + thumb_func_start ov5_021DF628 +ov5_021DF628: ; 0x021DF628 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + bl ov5_021DF6D0 + add r1, r0, #0 + ldr r0, [r4, #4] + ldr r1, [r1, #8] + blx r1 + add r0, r4, #0 + bl ov5_021DF6AC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF628 + + thumb_func_start ov5_021DF644 +ov5_021DF644: ; 0x021DF644 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r4, [r6, #4] + ldr r5, [r6, #0x14] + cmp r4, #0 + beq _021DF668 +_021DF650: + add r0, r5, #0 + bl ov5_021DF6C0 + cmp r0, #0 + bne _021DF662 + add r0, r6, #0 + add r1, r5, #0 + bl ov5_021DF628 +_021DF662: + add r5, #8 + sub r4, r4, #1 + bne _021DF650 +_021DF668: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF644 + + thumb_func_start ov5_021DF66C +ov5_021DF66C: ; 0x021DF66C + push {r3, r4, r5, lr} + ldr r4, [r0, #4] + ldr r5, [r0, #0x14] + cmp r4, #0 + beq _021DF68A +_021DF676: + add r0, r5, #0 + bl ov5_021DF6C0 + cmp r0, #1 + bne _021DF684 + add r0, r5, #0 + pop {r3, r4, r5, pc} +_021DF684: + add r5, #8 + sub r4, r4, #1 + bne _021DF676 +_021DF68A: + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF66C + + thumb_func_start ov5_021DF694 +ov5_021DF694: ; 0x021DF694 + ldr r3, [r0, #4] + ldr r0, [r0, #0x14] + cmp r3, #0 + beq _021DF6A8 +_021DF69C: + ldr r2, [r0, #0] + cmp r2, r1 + beq _021DF6AA + add r0, #8 + sub r3, r3, #1 + bne _021DF69C +_021DF6A8: + mov r0, #0 +_021DF6AA: + bx lr + thumb_func_end ov5_021DF694 + + thumb_func_start ov5_021DF6AC +ov5_021DF6AC: ; 0x021DF6AC + mov r1, #0x22 + str r1, [r0, #0] + mov r1, #0 + str r1, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DF6AC + + thumb_func_start ov5_021DF6B8 +ov5_021DF6B8: ; 0x021DF6B8 + str r1, [r0, #0] + str r2, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DF6B8 + + thumb_func_start ov5_021DF6C0 +ov5_021DF6C0: ; 0x021DF6C0 + ldr r0, [r0, #0] + cmp r0, #0x22 + bne _021DF6CA + mov r0, #1 + bx lr +_021DF6CA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021DF6C0 + + thumb_func_start ov5_021DF6D0 +ov5_021DF6D0: ; 0x021DF6D0 + push {r3, lr} + ldr r1, _021DF6F4 ; =0x021FF85C + ldr r2, [r1, #0] + cmp r2, #0x22 + beq _021DF6EA +_021DF6DA: + cmp r2, r0 + bne _021DF6E2 + add r0, r1, #0 + pop {r3, pc} +_021DF6E2: + add r1, #0xc + ldr r2, [r1, #0] + cmp r2, #0x22 + bne _021DF6DA +_021DF6EA: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + nop +_021DF6F4: .word 0x021FF85C + thumb_func_end ov5_021DF6D0 + + thumb_func_start ov5_021DF6F8 +ov5_021DF6F8: ; 0x021DF6F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r4, #8] + bl sub_020711EC + str r0, [r4, #0x1c] + pop {r4, pc} + thumb_func_end ov5_021DF6F8 + + thumb_func_start ov5_021DF708 +ov5_021DF708: ; 0x021DF708 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _021DF71A + bl sub_0207121C + mov r0, #0 + str r0, [r4, #0x1c] +_021DF71A: + pop {r4, pc} + thumb_func_end ov5_021DF708 + + thumb_func_start ov5_021DF71C +ov5_021DF71C: ; 0x021DF71C + push {r3, lr} + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _021DF728 + bl sub_020713D0 +_021DF728: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF71C + + thumb_func_start ov5_021DF72C +ov5_021DF72C: ; 0x021DF72C + push {r4, lr} + sub sp, #8 + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r4, [sp, #0x14] + str r4, [sp, #4] + ldr r0, [r0, #0x1c] + bl sub_02071330 + add r4, r0, #0 + bne _021DF746 + bl sub_02022974 +_021DF746: + add r0, r4, #0 + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021DF72C + + thumb_func_start ov5_021DF74C +ov5_021DF74C: ; 0x021DF74C + ldr r3, _021DF750 ; =sub_0207136C + bx r3 + ; .align 2, 0 +_021DF750: .word sub_0207136C + thumb_func_end ov5_021DF74C + + thumb_func_start ov5_021DF754 +ov5_021DF754: ; 0x021DF754 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r2, #0 + add r5, r1, #0 + mov r2, #0 + str r3, [sp] + mov r1, #0x24 + add r3, r2, #0 + add r7, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r4, [r7, #0x20] + str r5, [r4, #0] + ldr r0, [sp] + strh r6, [r4, #4] + strh r0, [r4, #6] + ldr r0, [sp, #0x20] + ldr r2, [sp, #0x28] + strh r0, [r4, #8] + ldr r0, [sp, #0x24] + ldr r3, [sp] + strh r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #0x45 + bl ov5_021F067C + str r0, [r4, #0x10] + ldr r2, [sp, #0x2c] + ldr r3, [sp, #0x20] + add r0, r5, #0 + mov r1, #0x46 + bl ov5_021F067C + str r0, [r4, #0x14] + ldr r0, [sp, #0x24] + add r1, r5, #0 + bl sub_02022BD8 + str r0, [r4, #0x18] + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021DF8C8 + add r0, r7, #0 + str r6, [sp, #4] + bl ov5_021DF584 + str r0, [sp, #8] + add r0, sp, #4 + bl sub_02020C44 + str r0, [r4, #0xc] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021DF754 + + thumb_func_start ov5_021DF7C4 +ov5_021DF7C4: ; 0x021DF7C4 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r5, [r4, #0x20] + cmp r5, #0 + beq _021DF7F6 + ldr r0, [r5, #0xc] + bl sub_02020CCC + add r0, r5, #0 + bl ov5_021DF8FC + ldr r0, [r5, #0x10] + bl ov5_021F06D8 + ldr r0, [r5, #0x14] + bl ov5_021F06D8 + ldr r0, [r5, #0x18] + bl sub_02022C1C + add r0, r5, #0 + bl ov5_021DF554 + mov r0, #0 + str r0, [r4, #0x20] +_021DF7F6: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DF7C4 + + thumb_func_start ov5_021DF7F8 +ov5_021DF7F8: ; 0x021DF7F8 + push {r4, lr} + sub sp, #0x20 + ldr r0, [r0, #0x20] + add r3, sp, #8 + ldr r0, [r0, #0xc] + str r0, [sp] + str r1, [sp, #4] + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + add r2, sp, #0x14 + str r0, [r3, #0] + ldr r3, _021DF848 ; =0x021F9AF0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, sp, #0 + bl sub_0202119C + add r4, r0, #0 + bne _021DF828 + bl sub_02022974 +_021DF828: + cmp r4, #0 + beq _021DF842 + add r0, r4, #0 + bl sub_020213F4 + mov r1, #1 + bl sub_020B37A4 + add r0, r4, #0 + bl sub_020213F4 + bl ov5_021D53A4 +_021DF842: + add r0, r4, #0 + add sp, #0x20 + pop {r4, pc} + ; .align 2, 0 +_021DF848: .word 0x021F9AF0 + thumb_func_end ov5_021DF7F8 + + thumb_func_start ov5_021DF84C +ov5_021DF84C: ; 0x021DF84C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x20] + add r4, r2, #0 + bl ov5_021DF9B4 + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov5_021DF7F8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DF84C + + thumb_func_start ov5_021DF864 +ov5_021DF864: ; 0x021DF864 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + ldr r5, [r0, #0x20] + add r6, r1, #0 + ldr r0, [r5, #0x10] + add r1, r2, #0 + add r4, r3, #0 + bl ov5_021F075C + add r7, r0, #0 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl ov5_021F075C + add r1, sp, #0xc + bl sub_02024184 + ldr r0, [r5, #0x18] + ldr r1, [sp, #0x30] + bl sub_02022D98 + add r4, r0, #0 + bne _021DF896 + bl sub_02022974 +_021DF896: + add r0, r4, #0 + bl sub_02022DF4 + ldr r1, [sp, #0x34] + cmp r1, #1 + bne _021DF8A4 + mov r4, #0 +_021DF8A4: + str r0, [sp] + ldr r0, [sp, #0x38] + str r4, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + add r3, sp, #0xc + bl ov5_021DF930 + add r4, r0, #0 + bne _021DF8C0 + bl sub_02022974 +_021DF8C0: + add r0, r4, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF864 + + thumb_func_start ov5_021DF8C8 +ov5_021DF8C8: ; 0x021DF8C8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r2, #0 + mov r1, #0x28 + add r7, r0, #0 + mul r1, r5 + mov r2, #0 + bl ov5_021DF528 + add r4, r0, #0 + add r0, r7, #0 + lsl r1, r5, #3 + mov r2, #0 + str r4, [r6, #0x20] + bl ov5_021DF528 + str r0, [r6, #0x1c] + mov r1, #0x11 +_021DF8EC: + str r1, [r0, #0] + str r4, [r0, #4] + add r0, #8 + add r4, #0x28 + sub r5, r5, #1 + bne _021DF8EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF8C8 + + thumb_func_start ov5_021DF8FC +ov5_021DF8FC: ; 0x021DF8FC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + bl ov5_021DF554 + ldr r0, [r4, #0x20] + bl ov5_021DF554 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF8FC + + thumb_func_start ov5_021DF910 +ov5_021DF910: ; 0x021DF910 + push {r3, lr} + ldrh r2, [r0, #4] + ldr r3, [r0, #0x1c] +_021DF916: + ldr r0, [r3, #0] + cmp r0, r1 + bne _021DF922 + mov r0, #0x11 + str r0, [r3, #0] + pop {r3, pc} +_021DF922: + add r3, #8 + sub r2, r2, #1 + bne _021DF916 + bl sub_02022974 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF910 + + thumb_func_start ov5_021DF930 +ov5_021DF930: ; 0x021DF930 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldrh r5, [r6, #4] + add r0, r1, #0 + ldr r1, [sp, #0x1c] + str r2, [sp] + ldr r6, [r6, #0x1c] + add r7, r3, #0 + str r1, [sp, #0x1c] + mov r4, #0 + add r2, r5, #0 + add r3, r6, #0 +_021DF948: + ldr r1, [r3, #0] + cmp r1, r0 + bne _021DF952 + ldr r0, [r3, #4] + pop {r3, r4, r5, r6, r7, pc} +_021DF952: + add r3, #8 + sub r2, r2, #1 + bne _021DF948 +_021DF958: + ldr r1, [r6, #0] + cmp r1, #0x11 + bne _021DF964 + str r0, [r6, #0] + ldr r4, [r6, #4] + b _021DF96A +_021DF964: + add r6, #8 + sub r5, r5, #1 + bne _021DF958 +_021DF96A: + cmp r4, #0 + bne _021DF972 + bl sub_02022974 +_021DF972: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x28 + bl sub_020D5124 + ldr r0, [sp] + add r2, r4, #0 + str r0, [r4, #0] + add r2, #0xc + ldmia r7!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r7!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp, #0x18] + str r0, [r4, #4] + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _021DF9AC + bl sub_02022EF4 + str r0, [r4, #0x1c] + ldr r0, [sp, #0x1c] + bl sub_02022F04 + str r0, [r4, #0x20] + ldr r0, [sp, #0x1c] + bl sub_02022F14 + str r0, [r4, #0x24] +_021DF9AC: + ldr r0, [sp, #0x20] + str r0, [r4, #8] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DF930 + + thumb_func_start ov5_021DF9B4 +ov5_021DF9B4: ; 0x021DF9B4 + push {r3, lr} + ldrh r2, [r0, #4] + ldr r3, [r0, #0x1c] +_021DF9BA: + ldr r0, [r3, #0] + cmp r0, r1 + bne _021DF9C4 + ldr r0, [r3, #4] + pop {r3, pc} +_021DF9C4: + add r3, #8 + sub r2, r2, #1 + bne _021DF9BA + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF9B4 + + thumb_func_start ov5_021DF9D4 +ov5_021DF9D4: ; 0x021DF9D4 + ldr r3, _021DF9DC ; =ov5_021DF910 + ldr r0, [r0, #0x20] + bx r3 + nop +_021DF9DC: .word ov5_021DF910 + thumb_func_end ov5_021DF9D4 + + thumb_func_start ov5_021DF9E0 +ov5_021DF9E0: ; 0x021DF9E0 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0x20] + add r3, r2, #0 + ldr r0, [r0, #0x10] + ldr r2, [r4, #0x18] + bl ov5_021F0784 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DF9E0 + + thumb_func_start ov5_021DF9FC +ov5_021DF9FC: ; 0x021DF9FC + ldr r0, [r0, #0x20] + ldr r3, _021DFA04 ; =ov5_021F075C + ldr r0, [r0, #0x10] + bx r3 + ; .align 2, 0 +_021DFA04: .word ov5_021F075C + thumb_func_end ov5_021DF9FC + + thumb_func_start ov5_021DFA08 +ov5_021DFA08: ; 0x021DFA08 + ldr r0, [r0, #0x20] + ldr r3, _021DFA10 ; =ov5_021F0740 + ldr r0, [r0, #0x10] + bx r3 + ; .align 2, 0 +_021DFA10: .word ov5_021F0740 + thumb_func_end ov5_021DFA08 + + thumb_func_start ov5_021DFA14 +ov5_021DFA14: ; 0x021DFA14 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0x20] + add r3, r2, #0 + ldr r0, [r0, #0x14] + ldr r2, [r4, #0x18] + bl ov5_021F0784 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFA14 + + thumb_func_start ov5_021DFA30 +ov5_021DFA30: ; 0x021DFA30 + ldr r0, [r0, #0x20] + ldr r3, _021DFA38 ; =ov5_021F0740 + ldr r0, [r0, #0x14] + bx r3 + ; .align 2, 0 +_021DFA38: .word ov5_021F0740 + thumb_func_end ov5_021DFA30 + + thumb_func_start ov5_021DFA3C +ov5_021DFA3C: ; 0x021DFA3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + add r1, r2, #0 + ldr r4, [r5, #0x20] + mov r2, #1 + add r7, r3, #0 + bl ov5_021DF5C0 + str r0, [sp, #4] + add r0, r5, #0 + bl ov5_021DF584 + str r0, [sp] + ldr r0, [r4, #0x18] + ldr r1, [sp, #4] + add r2, r6, #0 + add r3, r7, #0 + bl sub_02022C9C + cmp r0, #0 + bne _021DFA6E + bl sub_02022974 +_021DFA6E: + ldr r2, [r4, #0x18] + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021DFA88 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DFA3C + + thumb_func_start ov5_021DFA7C +ov5_021DFA7C: ; 0x021DFA7C + ldr r0, [r0, #0x20] + ldr r3, _021DFA84 ; =sub_02022D38 + ldr r0, [r0, #0x18] + bx r3 + ; .align 2, 0 +_021DFA84: .word sub_02022D38 + thumb_func_end ov5_021DFA7C + + thumb_func_start ov5_021DFA88 +ov5_021DFA88: ; 0x021DFA88 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + mov r1, #0xc + mov r2, #1 + bl ov5_021DF528 + add r4, r0, #0 + mov r0, #1 + str r0, [r4, #0] + str r5, [r4, #4] + ldr r0, _021DFAB8 ; =ov5_021DFAC0 + add r1, r4, #0 + mov r2, #0xff + str r6, [r4, #8] + bl sub_0200DA04 + ldr r0, _021DFABC ; =ov5_021DFADC + add r1, r4, #0 + mov r2, #0xff + bl sub_0200DA3C + pop {r4, r5, r6, pc} + nop +_021DFAB8: .word ov5_021DFAC0 +_021DFABC: .word ov5_021DFADC + thumb_func_end ov5_021DFA88 + + thumb_func_start ov5_021DFAC0 +ov5_021DFAC0: ; 0x021DFAC0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + ldr r1, [r4, #4] + bl sub_02022E38 + mov r0, #1 + str r0, [r4, #0] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFAC0 + + thumb_func_start ov5_021DFADC +ov5_021DFADC: ; 0x021DFADC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #1 + bne _021DFAFC + ldr r0, [r4, #8] + ldr r1, [r4, #4] + bl sub_02022EA0 + add r0, r4, #0 + bl ov5_021DF554 + add r0, r5, #0 + bl sub_0200DA58 +_021DFAFC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFADC + + thumb_func_start ov5_021DFB00 +ov5_021DFB00: ; 0x021DFB00 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + str r0, [sp] + ldr r0, [sp, #0x18] + add r1, r2, #0 + str r0, [sp, #4] + ldr r2, [r5, #0x18] + add r0, r4, #0 + bl sub_0207389C + add r0, r4, #0 + bl sub_020738EC + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DFB00 + + thumb_func_start ov5_021DFB24 +ov5_021DFB24: ; 0x021DFB24 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0] + str r0, [sp] + ldr r0, [sp, #0x10] + str r0, [sp, #4] + add r0, r1, #0 + add r1, r2, #0 + ldr r2, [r4, #0x18] + bl sub_020739B4 + add sp, #8 + pop {r4, pc} + thumb_func_end ov5_021DFB24 + + thumb_func_start ov5_021DFB40 +ov5_021DFB40: ; 0x021DFB40 + push {r3, lr} + ldr r0, [r0, #0] + str r0, [sp] + add r0, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, [sp, #8] + bl sub_02073A6C + pop {r3, pc} + thumb_func_end ov5_021DFB40 + + .rodata + + + .global Unk_ov5_021F9AF0 +Unk_ov5_021F9AF0: ; 0x021F9AF0 + .incbin "incbin/overlay5_rodata.bin", 0x11DC, 0xC + diff --git a/asm/ov5_021DFB54.s b/asm/ov5_021DFB54.s new file mode 100644 index 000000000..b1ebf1935 --- /dev/null +++ b/asm/ov5_021DFB54.s @@ -0,0 +1,2887 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021DFB54 +ov5_021DFB54: ; 0x021DFB54 + ldr r3, _021DFB58 ; =sub_0205EB84 + bx r3 + ; .align 2, 0 +_021DFB58: .word sub_0205EB84 + thumb_func_end ov5_021DFB54 + + thumb_func_start ov5_021DFB5C +ov5_021DFB5C: ; 0x021DFB5C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r6, #0 + bl sub_0205EB90 + ldr r5, _021DFB8C ; =0x021F9B74 + add r4, r0, #0 +_021DFB6A: + mov r0, #1 + tst r0, r4 + beq _021DFB76 + ldr r1, [r5, #0] + add r0, r7, #0 + blx r1 +_021DFB76: + add r6, r6, #1 + lsr r4, r4, #1 + add r5, r5, #4 + cmp r6, #0xa + blo _021DFB6A + add r0, r7, #0 + mov r1, #0 + bl sub_0205EB8C + pop {r3, r4, r5, r6, r7, pc} + nop +_021DFB8C: .word 0x021F9B74 + thumb_func_end ov5_021DFB5C + + thumb_func_start ov5_021DFB90 +ov5_021DFB90: ; 0x021DFB90 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + bl sub_0205F108 + cmp r0, #0 + beq _021DFBA2 + mov r4, #0x18 + b _021DFBB8 +_021DFBA2: + add r0, r5, #0 + bl sub_0205EB3C + bl sub_02062C00 + mov r1, #2 + bl sub_02071CB4 + cmp r0, #1 + bne _021DFBB8 + mov r4, #0x1c +_021DFBB8: + add r0, r5, #0 + bl sub_0205EB98 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021E106C + add r0, r5, #0 + mov r1, #0 + bl sub_0205EB58 + add r0, r5, #0 + bl sub_0205EBC0 + add r0, r5, #0 + bl sub_0205EC04 + cmp r0, #0 + beq _021DFBEA + bl ov5_021DF74C +_021DFBEA: + add r0, r5, #0 + mov r1, #0 + bl sub_0205EC00 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DFB90 + + thumb_func_start ov5_021DFBF4 +ov5_021DFBF4: ; 0x021DFBF4 + push {r4, lr} + add r4, r0, #0 + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #1 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E106C + add r0, r4, #0 + mov r1, #1 + bl sub_0205EB58 + add r0, r4, #0 + bl sub_0205EBC0 + add r0, r4, #0 + bl sub_0205EC04 + cmp r0, #0 + beq _021DFC28 + bl ov5_021DF74C +_021DFC28: + add r0, r4, #0 + mov r1, #0 + bl sub_0205EC00 + ldr r0, _021DFC38 ; =0x00000618 + bl sub_02005748 + pop {r4, pc} + ; .align 2, 0 +_021DFC38: .word 0x00000618 + thumb_func_end ov5_021DFBF4 + + thumb_func_start ov5_021DFC3C +ov5_021DFC3C: ; 0x021DFC3C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_0205EB3C + add r6, r0, #0 + bl sub_02062C00 + add r0, r5, #0 + bl sub_0205F108 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0205EC04 + cmp r0, #0 + beq _021DFC62 + bl ov5_021DF74C +_021DFC62: + add r0, r5, #0 + mov r1, #0 + bl sub_0205EC00 + add r0, r5, #0 + bl sub_0205F16C + cmp r0, #1 + bne _021DFC7C + add r0, r5, #0 + bl sub_0205EA78 + b _021DFC82 +_021DFC7C: + add r0, r5, #0 + bl sub_0205EA94 +_021DFC82: + add r3, r0, #0 + cmp r4, #0 + bne _021DFC9C + mov r0, #1 + mov r1, #0 + str r0, [sp] + add r0, r6, #0 + add r2, r1, #0 + bl ov5_021F261C + add r1, r0, #0 + mov r4, #2 + b _021DFCB4 +_021DFC9C: + mov r1, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r1, #0 + add r3, r1, #0 + str r4, [sp, #8] + bl ov5_021F85BC + add r1, r0, #0 + mov r4, #0x19 +_021DFCB4: + add r0, r5, #0 + bl sub_0205EC00 + add r0, r5, #0 + bl sub_0205EB98 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021E106C + add r0, r5, #0 + mov r1, #2 + bl sub_0205EB58 + add r0, r5, #0 + bl sub_0205EBC0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFC3C + + thumb_func_start ov5_021DFCE4 +ov5_021DFCE4: ; 0x021DFCE4 + ldr r3, _021DFCEC ; =sub_0205EF6C + mov r1, #1 + bx r3 + nop +_021DFCEC: .word sub_0205EF6C + thumb_func_end ov5_021DFCE4 + + thumb_func_start ov5_021DFCF0 +ov5_021DFCF0: ; 0x021DFCF0 + push {r4, lr} + add r4, r0, #0 + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0x11 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E106C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFCF0 + + thumb_func_start ov5_021DFD0C +ov5_021DFD0C: ; 0x021DFD0C + push {r4, lr} + add r4, r0, #0 + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0x13 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E106C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFD0C + + thumb_func_start ov5_021DFD28 +ov5_021DFD28: ; 0x021DFD28 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0x14 + bl sub_0205F108 + cmp r0, #0 + beq _021DFD3A + mov r4, #0x1b + b _021DFD50 +_021DFD3A: + add r0, r5, #0 + bl sub_0205EB3C + bl sub_02062C00 + mov r1, #2 + bl sub_02071CB4 + cmp r0, #1 + bne _021DFD50 + mov r4, #0x1e +_021DFD50: + add r0, r5, #0 + bl sub_0205EB98 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021E106C + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DFD28 + + thumb_func_start ov5_021DFD68 +ov5_021DFD68: ; 0x021DFD68 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0x15 + bl sub_0205F108 + cmp r0, #0 + beq _021DFD7A + mov r4, #0x1a + b _021DFD90 +_021DFD7A: + add r0, r5, #0 + bl sub_0205EB3C + bl sub_02062C00 + mov r1, #2 + bl sub_02071CB4 + cmp r0, #1 + bne _021DFD90 + mov r4, #0x1d +_021DFD90: + add r0, r5, #0 + bl sub_0205EB98 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021E106C + pop {r3, r4, r5, pc} + thumb_func_end ov5_021DFD68 + + thumb_func_start ov5_021DFDA8 +ov5_021DFDA8: ; 0x021DFDA8 + push {r4, lr} + add r4, r0, #0 + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0x16 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E106C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFDA8 + + thumb_func_start ov5_021DFDC4 +ov5_021DFDC4: ; 0x021DFDC4 + push {r4, lr} + add r4, r0, #0 + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0x17 + bl sub_0205ED6C + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E106C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFDC4 + + thumb_func_start ov5_021DFDE0 +ov5_021DFDE0: ; 0x021DFDE0 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _021DFDF2 + bl sub_02022974 +_021DFDF2: + add r0, r5, #0 + bl sub_0205EB3C + cmp r0, #0 + bne _021DFE00 + bl sub_02022974 +_021DFE00: + add r0, r5, #0 + bl sub_0205EF58 + cmp r0, #1 + bne _021DFE20 + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov5_021E067C + cmp r0, #1 + bne _021DFE1C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFE1C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFE20: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0205F224 + cmp r0, #0 + bne _021DFE30 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFE30: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _021DFE50 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov5_021DFEF4 + cmp r0, #1 + bne _021DFE4C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFE4C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFE50: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov5_021DFE68 + cmp r0, #1 + bne _021DFE64 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFE64: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021DFDE0 + + thumb_func_start ov5_021DFE68 +ov5_021DFE68: ; 0x021DFE68 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r5, r2, #0 + add r6, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + add r4, r3, #0 + bl sub_02061434 + str r0, [sp] + mov r0, #4 + tst r0, r4 + beq _021DFE92 + add r0, r6, #0 + add r1, r5, #0 + bl ov9_0224A59C + cmp r0, #1 + bne _021DFE92 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFE92: + mov r0, #1 + tst r0, r4 + beq _021DFEAC + ldr r3, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov5_021DFF1C + cmp r0, #1 + bne _021DFEAC + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFEAC: + mov r0, #2 + tst r0, r4 + beq _021DFEC6 + ldr r3, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov5_021E04A8 + cmp r0, #1 + bne _021DFEC6 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFEC6: + ldr r3, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov5_021E032C + cmp r0, #1 + bne _021DFEDA + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFEDA: + ldr r3, [sp] + add r0, r6, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov5_021E04EC + cmp r0, #1 + bne _021DFEEE + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021DFEEE: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFE68 + + thumb_func_start ov5_021DFEF4 +ov5_021DFEF4: ; 0x021DFEF4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl sub_02061434 + add r3, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021E04EC + cmp r0, #1 + bne _021DFF18 + mov r0, #1 + pop {r4, r5, r6, pc} +_021DFF18: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021DFEF4 + + thumb_func_start ov5_021DFF1C +ov5_021DFF1C: ; 0x021DFF1C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + cmp r3, #1 + beq _021DFF2C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFF2C: + add r0, r7, #0 + add r1, r5, #0 + bl ov5_021E10D4 + add r4, r0, #0 + bne _021DFF3C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFF3C: + bl sub_02062920 + cmp r0, #0x54 + beq _021DFF48 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFF48: + add r0, r4, #0 + add r1, r5, #0 + bl sub_02063EBC + mov r1, #1 + bic r0, r1 + beq _021DFF76 + add r0, r6, #0 + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + bne _021DFF72 + add r0, r4, #0 + add r1, r5, #0 + bl ov9_0224F240 + cmp r0, #0 + bne _021DFF76 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFF72: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021DFF76: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + add r3, r4, #0 + bl ov5_021DFF88 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021DFF1C + + thumb_func_start ov5_021DFF88 +ov5_021DFF88: ; 0x021DFF88 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x18 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021E1110 + add r2, r0, #0 + str r5, [r2, #4] + str r4, [r2, #8] + str r7, [r2, #0x10] + ldr r1, _021DFFB8 ; =ov5_021DFFBC + str r6, [r2, #0xc] + add r0, r4, #0 + bl sub_02050904 + ldr r0, [r4, #0xc] + bl sub_0202CD88 + mov r1, #0x37 + bl sub_0202CF28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021DFFB8: .word ov5_021DFFBC + thumb_func_end ov5_021DFF88 + + thumb_func_start ov5_021DFFBC +ov5_021DFFBC: ; 0x021DFFBC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0205EB3C + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0x10] + cmp r0, #3 + bhi _021E00A8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021DFFE2: ; jump table + .short _021DFFEA - _021DFFE2 - 2 ; case 0 + .short _021E0036 - _021DFFE2 - 2 ; case 1 + .short _021E0084 - _021DFFE2 - 2 ; case 2 + .short _021E008E - _021DFFE2 - 2 ; case 3 +_021DFFEA: + add r0, r5, #0 + bl sub_020655F4 + cmp r0, #0 + beq _021E00A8 + add r0, r6, #0 + bl sub_020655F4 + cmp r0, #0 + bne _021E0008 + ldr r0, [r4, #0xc] + bl sub_020613AC + cmp r0, #0 + beq _021E00A8 +_021E0008: + ldr r0, [r4, #4] + mov r1, #8 + bl sub_02065838 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02065638 + ldr r0, [r4, #4] + mov r1, #0x20 + bl sub_02065838 + add r1, r0, #0 + add r0, r6, #0 + bl sub_02065638 + ldr r0, _021E00AC ; =0x00000627 + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E00A8 +_021E0036: + add r0, r5, #0 + bl sub_02065684 + cmp r0, #0 + beq _021E00A8 + add r0, r6, #0 + bl sub_02065684 + cmp r0, #0 + beq _021E00A8 + ldr r0, [r4, #8] + mov r1, #9 + bl sub_02071CB4 + cmp r0, #1 + bne _021E0072 + add r0, r5, #0 + bl ov9_0224F2B0 + cmp r0, #1 + bne _021E0072 + ldr r0, [r4, #8] + add r1, r7, #0 + add r2, r5, #0 + bl ov9_0224F2BC + str r0, [r4, #0x14] + mov r0, #3 + str r0, [r4, #0] + b _021E00A8 +_021E0072: + add r0, r5, #0 + bl sub_020656AC + add r0, r6, #0 + bl sub_020656AC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0084: + add r0, r4, #0 + bl ov5_021E1134 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E008E: + ldr r0, [r4, #0x14] + bl ov9_0224F6EC + cmp r0, #1 + bne _021E00A8 + add r0, r5, #0 + bl sub_020656AC + add r0, r6, #0 + bl sub_020656AC + mov r0, #2 + str r0, [r4, #0] +_021E00A8: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E00AC: .word 0x00000627 + thumb_func_end ov5_021DFFBC + + thumb_func_start ov5_021E00B0 +ov5_021E00B0: ; 0x021E00B0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x2c + add r7, r1, #0 + add r5, r2, #0 + bl ov5_021E1110 + add r4, r0, #0 + str r7, [r4, #4] + str r6, [r4, #0x1c] + ldr r0, [r6, #0x3c] + str r0, [r4, #0x20] + bl sub_0205EB3C + add r2, r4, #0 + str r0, [r4, #0x24] + add r2, #0xc + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r6, #0x10] + ldr r1, _021E00E8 ; =ov5_021E0160 + add r2, r4, #0 + bl sub_02050944 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E00E8: .word ov5_021E0160 + thumb_func_end ov5_021E00B0 + + thumb_func_start ov5_021E00EC +ov5_021E00EC: ; 0x021E00EC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r2, #0 + add r6, r1, #0 + bl sub_02050A60 + add r4, r0, #0 + add r1, r5, #0 + bl ov5_021E1140 + add r1, r0, #0 + add r0, r4, #0 + add r2, sp, #0 + bl ov5_021E1028 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0 + bl ov5_021E00B0 + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E00EC + + thumb_func_start ov5_021E0118 +ov5_021E0118: ; 0x021E0118 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r5, r1, #0 + bl sub_0205EB3C + add r6, r0, #0 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DB58 + cmp r0, #1 + bne _021E015A + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DEFC + cmp r0, #1 + beq _021E0148 + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DEF0 + cmp r0, #1 + bne _021E0156 +_021E0148: + add r0, r6, #0 + bl sub_02062F30 + cmp r0, #1 + bne _021E0156 + mov r0, #0 + pop {r4, r5, r6, pc} +_021E0156: + mov r0, #1 + pop {r4, r5, r6, pc} +_021E015A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0118 + + thumb_func_start ov5_021E0160 +ov5_021E0160: ; 0x021E0160 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + bl sub_02050A64 + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #5 + bhi _021E01CE + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E017C: ; jump table + .short _021E0188 - _021E017C - 2 ; case 0 + .short _021E01C2 - _021E017C - 2 ; case 1 + .short _021E01D8 - _021E017C - 2 ; case 2 + .short _021E027A - _021E017C - 2 ; case 3 + .short _021E027E - _021E017C - 2 ; case 4 + .short _021E02BC - _021E017C - 2 ; case 5 +_021E0188: + ldr r0, [r4, #0x20] + bl sub_0205F108 + cmp r0, #0 + bne _021E01A4 + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_020553F0 + ldr r0, [r4, #0x1c] + ldr r1, _021E0324 ; =0x0000047F + mov r2, #1 + bl sub_02055554 +_021E01A4: + ldr r0, [r4, #0xc] + cmp r0, #1 + bne _021E01BC + add r1, r4, #0 + ldr r0, [r4, #0x1c] + add r1, #0xc + bl ov5_021E103C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E031E +_021E01BC: + mov r0, #2 + str r0, [r4, #0] + b _021E031E +_021E01C2: + add r0, r4, #0 + add r0, #0xc + bl ov5_021E1050 + cmp r0, #1 + beq _021E01D0 +_021E01CE: + b _021E031E +_021E01D0: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E031E +_021E01D8: + ldr r0, [r4, #0x20] + bl sub_0205F108 + cmp r0, #0 + bne _021E0214 + ldr r0, [r4, #0x20] + bl sub_0205EABC + add r5, r0, #0 + ldr r0, [r4, #4] + bl sub_0206419C + add r6, r0, #0 + ldr r0, [r4, #0x20] + bl sub_0205EAC8 + add r7, r0, #0 + ldr r0, [r4, #4] + bl sub_020641A8 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0x24] + ldr r3, [r4, #4] + add r1, r5, r6 + add r2, r7, r2 + bl ov5_021F261C + b _021E0260 +_021E0214: + ldr r0, [r4, #0x24] + bl sub_02063020 + str r0, [sp, #0x14] + ldr r0, [r4, #0x24] + bl sub_02063030 + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0x24] + bl sub_02063040 + str r0, [sp, #0xc] + ldr r0, [r4, #0x20] + bl sub_0205F108 + add r5, r0, #0 + add r0, sp, #0xc + str r0, [sp] + ldr r0, [r4, #0x20] + ldr r1, [r4, #4] + add r2, sp, #0x14 + add r3, sp, #0x10 + bl sub_02061674 + ldr r0, [r4, #4] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r5, [sp, #8] + ldr r0, [r4, #0x20] + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0xc] + bl ov5_021F85BC +_021E0260: + str r0, [r4, #0x28] + ldr r0, [r4, #0x20] + ldr r1, [r4, #0x28] + bl sub_0205EC00 + ldr r0, [r4, #0x20] + mov r1, #2 + bl sub_0205EB58 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E031E +_021E027A: + add r0, r1, #1 + str r0, [r4, #0] +_021E027E: + ldr r0, [r4, #0x24] + bl sub_020655F4 + cmp r0, #1 + bne _021E031E + ldr r3, _021E0328 ; =0x021F9B3C + add r2, sp, #0x18 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x20] + bl sub_0205F108 + add r1, r0, #0 + lsl r2, r1, #2 + add r1, sp, #0x18 + ldr r0, [r4, #4] + ldr r1, [r1, r2] + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r4, #0x24] + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E031E +_021E02BC: + ldr r0, [r4, #0x24] + bl sub_02065684 + cmp r0, #0 + beq _021E031E + ldr r0, [r4, #0x24] + bl sub_020656AC + ldr r0, [r4, #0x20] + bl sub_0205F108 + cmp r0, #0 + ldr r0, [r4, #0x28] + bne _021E02F6 + mov r1, #1 + bl ov5_021F2838 + ldr r0, [r4, #0x20] + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #2 + bl sub_0205ED6C + add r1, r0, #0 + ldr r0, [r4, #0x20] + bl ov5_021E106C + b _021E0312 +_021E02F6: + mov r1, #2 + bl ov5_021F88CC + ldr r0, [r4, #0x20] + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0x19 + bl sub_0205ED6C + add r1, r0, #0 + ldr r0, [r4, #0x20] + bl ov5_021E106C +_021E0312: + add r0, r4, #0 + bl ov5_021E1134 + add sp, #0x30 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E031E: + mov r0, #0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E0324: .word 0x0000047F +_021E0328: .word 0x021F9B3C + thumb_func_end ov5_021E0160 + + thumb_func_start ov5_021E032C +ov5_021E032C: ; 0x021E032C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + cmp r3, #1 + bne _021E0342 + add r0, r5, #0 + bl sub_0205EB74 + cmp r0, #2 + beq _021E0346 +_021E0342: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E0346: + add r0, r5, #0 + bl sub_0205EB3C + add r6, r0, #0 + add r0, r5, #0 + bl sub_0205F158 + cmp r0, #0 + bne _021E0364 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_02060B7C + b _021E036E +_021E0364: + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_020611FC +_021E036E: + cmp r0, #0x20 + bne _021E0376 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E0376: + mov r1, #0x20 + bic r0, r1 + beq _021E0380 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E0380: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov5_021E0390 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E032C + + thumb_func_start ov5_021E0390 +ov5_021E0390: ; 0x021E0390 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x18 + add r5, r1, #0 + add r7, r2, #0 + bl ov5_021E1110 + add r4, r0, #0 + str r6, [r4, #4] + str r5, [r4, #8] + str r7, [r4, #0xc] + add r0, r7, #0 + bl sub_0205EB3C + str r0, [r4, #0x10] + add r0, r7, #0 + bl sub_0205EC04 + str r0, [r4, #0x14] + ldr r1, _021E03C4 ; =ov5_021E03C8 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050904 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E03C4: .word ov5_021E03C8 + thumb_func_end ov5_021E0390 + + thumb_func_start ov5_021E03C8 +ov5_021E03C8: ; 0x021E03C8 + push {r3, r4, r5, lr} + sub sp, #0x18 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021E03DE + cmp r0, #1 + beq _021E0452 + b _021E049C +_021E03DE: + ldr r0, [r4, #0x10] + bl sub_020655F4 + cmp r0, #1 + bne _021E049C + ldr r3, _021E04A4 ; =0x021F9B24 + add r2, sp, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0xc] + bl sub_0205F108 + add r5, r0, #0 + ldr r0, [r4, #0x14] + bne _021E041A + mov r1, #0 + bl ov5_021F2838 + ldr r0, [r4, #0xc] + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0 + bl sub_0205ED6C + b _021E042E +_021E041A: + mov r1, #2 + bl ov5_021F88DC + ldr r0, [r4, #0xc] + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0x18 + bl sub_0205ED6C +_021E042E: + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl ov5_021E106C + lsl r2, r5, #2 + add r1, sp, #0 + ldr r0, [r4, #4] + ldr r1, [r1, r2] + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E049C +_021E0452: + ldr r0, [r4, #0x10] + bl sub_02065684 + cmp r0, #0 + beq _021E049C + ldr r0, [r4, #0x10] + bl sub_020656AC + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021E046C + bl ov5_021DF74C +_021E046C: + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_0205EC00 + ldr r0, [r4, #0xc] + mov r1, #0 + bl sub_0205EB58 + ldr r0, [r4, #8] + ldr r1, [r0, #0x1c] + ldr r1, [r1, #0] + bl sub_020554A4 + add r1, r0, #0 + ldr r0, [r4, #8] + mov r2, #1 + bl sub_02055554 + add r0, r4, #0 + bl ov5_021E1134 + add sp, #0x18 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E049C: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_021E04A4: .word 0x021F9B24 + thumb_func_end ov5_021E03C8 + + thumb_func_start ov5_021E04A8 +ov5_021E04A8: ; 0x021E04A8 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + cmp r4, #1 + bne _021E04C2 + cmp r3, #1 + bne _021E04C2 + add r0, r5, #0 + bl sub_0205EB74 + cmp r0, #2 + beq _021E04C6 +_021E04C2: + mov r0, #0 + pop {r4, r5, r6, pc} +_021E04C6: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0206156C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DDB4 + cmp r0, #0 + bne _021E04DE + mov r0, #0 + pop {r4, r5, r6, pc} +_021E04DE: + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021E097C + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E04A8 + + thumb_func_start ov5_021E04EC +ov5_021E04EC: ; 0x021E04EC + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_0205F008 + cmp r0, #1 + bne _021E0500 + mov r0, #0 + pop {r4, r5, r6, pc} +_021E0500: + add r0, r4, #0 + bl sub_0205EB3C + bl sub_02062BE8 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + add r0, r6, #0 + bl sub_0205DCF0 + cmp r0, #1 + beq _021E0526 + add r0, r6, #0 + bl sub_0205DD0C + cmp r0, #1 + beq _021E0526 + mov r0, #0 + pop {r4, r5, r6, pc} +_021E0526: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E0534 + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E04EC + + thumb_func_start ov5_021E0534 +ov5_021E0534: ; 0x021E0534 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x10 + add r4, r1, #0 + bl ov5_021E1110 + add r2, r0, #0 + str r5, [r2, #8] + ldr r1, _021E055C ; =ov5_021E0560 + str r4, [r2, #0xc] + add r0, r5, #0 + bl sub_02050904 + ldr r0, [r5, #0xc] + bl sub_0202CD88 + mov r1, #0x38 + bl sub_0202CF28 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E055C: .word ov5_021E0560 + thumb_func_end ov5_021E0534 + + thumb_func_start ov5_021E0560 +ov5_021E0560: ; 0x021E0560 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0205EB3C + add r7, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021E0584 + cmp r0, #1 + beq _021E0590 + cmp r0, #2 + beq _021E05CA + b _021E0668 +_021E0584: + ldr r0, _021E0670 ; =0x00000651 + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0590: + add r0, r7, #0 + bl sub_020655F4 + cmp r0, #0 + bne _021E05A4 + ldr r0, [r4, #0xc] + bl sub_020613AC + cmp r0, #0 + beq _021E0668 +_021E05A4: + ldr r0, [r4, #4] + cmp r0, #5 + blt _021E05C4 + ldr r0, _021E0674 ; =0x00000652 + bl sub_02005748 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0205EFF0 + add r0, r4, #0 + bl ov5_021E1134 + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021E05C4: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E05CA: + ldr r0, [r4, #0xc] + bl sub_0205EA78 + ldr r2, _021E0678 ; =0x021BF67C + str r0, [sp] + ldr r1, [r2, #0x48] + ldr r2, [r2, #0x44] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, #0xc] + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl sub_02061308 + add r5, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + beq _021E0668 + ldr r0, [sp] + cmp r5, r0 + beq _021E0668 + mov r0, #1 + str r0, [r4, #0] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + add r0, r7, #0 + bl sub_02062BE8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DD0C + cmp r0, #1 + bne _021E0642 + add r0, r6, #0 + bl sub_02050A60 + add r1, sp, #8 + str r0, [sp, #4] + bl ov6_022413E4 + cmp r0, #1 + bne _021E0642 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0205EFF0 + add r0, r4, #0 + bl ov5_021E1134 + ldr r0, [sp, #4] + ldr r2, [sp, #8] + add r1, r6, #0 + bl sub_02050E78 + add sp, #0xc + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021E0642: + ldr r0, [r4, #4] + cmp r0, #5 + bge _021E064C + mov r6, #0x28 + b _021E0656 +_021E064C: + add r0, r7, #0 + mov r1, #1 + mov r6, #0x30 + bl sub_02062EE0 +_021E0656: + add r0, r5, #0 + add r1, r6, #0 + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r4, #0xc] + mov r2, #1 + bl sub_02061550 +_021E0668: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021E0670: .word 0x00000651 +_021E0674: .word 0x00000652 +_021E0678: .word 0x021BF67C + thumb_func_end ov5_021E0560 + + thumb_func_start ov5_021E067C +ov5_021E067C: ; 0x021E067C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_0205EB3C + bl sub_020655F4 + cmp r0, #0 + bne _021E0694 + mov r0, #0 + pop {r3, r4, r5, pc} +_021E0694: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E06A8 + cmp r0, #1 + bne _021E06A4 + mov r0, #1 + pop {r3, r4, r5, pc} +_021E06A4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E067C + + thumb_func_start ov5_021E06A8 +ov5_021E06A8: ; 0x021E06A8 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl sub_0205EBB8 + cmp r0, #1 + bge _021E06BA + mov r0, #0 + pop {r4, pc} +_021E06BA: + add r0, r4, #0 + bl sub_0205EA94 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E10D4 + add r4, r0, #0 + bne _021E06D0 + mov r0, #0 + pop {r4, pc} +_021E06D0: + bl sub_02062920 + cmp r0, #0x76 + beq _021E06DC + mov r0, #0 + pop {r4, pc} +_021E06DC: + add r0, r4, #0 + bl ov5_021EC7F0 + add r0, r4, #0 + bl sub_02061AF4 + ldr r0, _021E06F4 ; =0x0000065B + bl sub_02005748 + mov r0, #0 + pop {r4, pc} + nop +_021E06F4: .word 0x0000065B + thumb_func_end ov5_021E06A8 + + thumb_func_start ov5_021E06F8 +ov5_021E06F8: ; 0x021E06F8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x30 + add r7, r1, #0 + add r5, r2, #0 + bl ov5_021E1110 + add r4, r0, #0 + str r7, [r4, #4] + str r6, [r4, #0xc] + ldr r0, [r6, #0x3c] + str r0, [r4, #0x10] + bl sub_0205EB3C + add r2, r4, #0 + str r0, [r4, #0x14] + add r2, #0x1c + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r6, #0x10] + ldr r1, _021E0730 ; =ov5_021E07A0 + add r2, r4, #0 + bl sub_02050944 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E0730: .word ov5_021E07A0 + thumb_func_end ov5_021E06F8 + + thumb_func_start ov5_021E0734 +ov5_021E0734: ; 0x021E0734 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r2, #0 + add r6, r1, #0 + bl sub_02050A60 + add r4, r0, #0 + add r1, r5, #0 + bl ov5_021E1140 + add r1, r0, #0 + add r0, r4, #0 + add r2, sp, #0 + bl ov5_021E1028 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0 + bl ov5_021E06F8 + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E0734 + + thumb_func_start ov5_021E0760 +ov5_021E0760: ; 0x021E0760 + push {r3, lr} + cmp r1, #3 + bhi _021E079A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E0772: ; jump table + .short _021E077A - _021E0772 - 2 ; case 0 + .short _021E077A - _021E0772 - 2 ; case 1 + .short _021E078A - _021E0772 - 2 ; case 2 + .short _021E078A - _021E0772 - 2 ; case 3 +_021E077A: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DC68 + cmp r0, #1 + bne _021E079A + mov r0, #1 + pop {r3, pc} +_021E078A: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DC74 + cmp r0, #1 + bne _021E079A + mov r0, #1 + pop {r3, pc} +_021E079A: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0760 + + thumb_func_start ov5_021E07A0 +ov5_021E07A0: ; 0x021E07A0 + push {r4, r5, r6, lr} + bl sub_02050A64 + ldr r6, _021E07C8 ; =0x021F9B54 + add r5, r0, #0 +_021E07AA: + ldr r1, [r5, #0] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r6, r1] + blx r1 + add r4, r0, #0 + cmp r4, #2 + beq _021E07AA + cmp r4, #1 + bne _021E07C4 + add r0, r5, #0 + bl ov5_021E1134 +_021E07C4: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E07C8: .word 0x021F9B54 + thumb_func_end ov5_021E07A0 + + thumb_func_start ov5_021E07CC +ov5_021E07CC: ; 0x021E07CC + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x1c + bl ov5_021E103C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021E07CC + + thumb_func_start ov5_021E07E4 +ov5_021E07E4: ; 0x021E07E4 + push {r4, lr} + add r4, r0, #0 + add r0, #0x1c + bl ov5_021E1050 + cmp r0, #1 + bne _021E07F8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E07F8: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021E07E4 + + thumb_func_start ov5_021E07FC +ov5_021E07FC: ; 0x021E07FC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #4] + bl sub_0206419C + add r6, r0, #0 + ldr r0, [r5, #0x10] + bl sub_0205EAC8 + add r7, r0, #0 + ldr r0, [r5, #4] + bl sub_020641A8 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r5, #0x14] + ldr r3, [r5, #4] + add r1, r4, r6 + add r2, r7, r2 + bl ov5_021F28F4 + str r0, [r5, #0x18] + ldr r0, [r5, #0xc] + bl ov6_0224892C + str r0, [r5, #0x2c] + ldr r0, _021E084C ; =0x00000627 + bl sub_02005748 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E084C: .word 0x00000627 + thumb_func_end ov5_021E07FC + + thumb_func_start ov5_021E0850 +ov5_021E0850: ; 0x021E0850 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_020655F4 + cmp r0, #1 + bne _021E0874 + ldr r0, [r4, #4] + mov r1, #0x34 + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r4, #0x14] + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0874: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021E0850 + + thumb_func_start ov5_021E0878 +ov5_021E0878: ; 0x021E0878 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_02065684 + cmp r0, #1 + bne _021E0894 + ldr r0, [r4, #0] + mov r1, #1 + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, [r4, #0x18] + bl ov5_021F2974 +_021E0894: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021E0878 + + thumb_func_start ov5_021E0898 +ov5_021E0898: ; 0x021E0898 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_020655F4 + cmp r0, #1 + bne _021E08BC + ldr r0, [r4, #4] + mov r1, #0x10 + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r4, #0x14] + bl sub_02065638 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E08BC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021E0898 + + thumb_func_start ov5_021E08C0 +ov5_021E08C0: ; 0x021E08C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x14] + bl sub_02065684 + cmp r0, #0 + bne _021E08D2 + mov r0, #0 + pop {r3, r4, r5, pc} +_021E08D2: + ldr r0, [r5, #0x14] + bl sub_0206299C + add r4, r0, #0 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl sub_02064238 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, r4, #0 + bl ov5_021E0760 + cmp r0, #1 + bne _021E08F8 + mov r0, #5 + str r0, [r5, #0] + mov r0, #2 + pop {r3, r4, r5, pc} +_021E08F8: + ldr r0, [r5, #4] + mov r1, #0x34 + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r5, #0x14] + bl sub_02065638 + mov r1, #0 + str r1, [r5, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + ldr r0, [r5, #0x18] + bl ov5_021F2974 + ldr r0, [r5, #0x2c] + bl ov6_02248940 + mov r0, #0 + str r0, [r5, #0x2c] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E08C0 + + thumb_func_start ov5_021E0924 +ov5_021E0924: ; 0x021E0924 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + bl sub_02065684 + cmp r0, #0 + bne _021E0936 + mov r0, #0 + pop {r4, pc} +_021E0936: + ldr r0, [r4, #0x14] + bl sub_020656AC + ldr r0, [r4, #0x18] + bl ov5_021DF74C + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0924 + + thumb_func_start ov5_021E0948 +ov5_021E0948: ; 0x021E0948 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x54 + add r7, r1, #0 + add r5, r2, #0 + bl ov5_021E1110 + add r4, r0, #0 + str r7, [r4, #4] + str r6, [r4, #0x34] + ldr r0, [r6, #0x3c] + str r0, [r4, #0x38] + ldr r0, [r6, #0x3c] + bl sub_0205EB3C + str r0, [r4, #0x3c] + cmp r5, #0 + beq _021E0978 + add r2, r4, #0 + add r2, #0x40 + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} +_021E0978: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E0948 + + thumb_func_start ov5_021E097C +ov5_021E097C: ; 0x021E097C + push {r4, lr} + mov r2, #0 + add r4, r0, #0 + bl ov5_021E0948 + add r2, r0, #0 + ldr r1, _021E0994 ; =ov5_021E09D4 + add r0, r4, #0 + bl sub_02050904 + pop {r4, pc} + nop +_021E0994: .word ov5_021E09D4 + thumb_func_end ov5_021E097C + + thumb_func_start ov5_021E0998 +ov5_021E0998: ; 0x021E0998 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r2, #0 + add r6, r0, #0 + add r7, r1, #0 + bl sub_02050A60 + add r4, r0, #0 + add r1, r5, #0 + bl ov5_021E1140 + add r1, r0, #0 + add r0, r4, #0 + add r2, sp, #0 + bl ov5_021E1028 + add r0, r4, #0 + add r1, r7, #0 + add r2, sp, #0 + bl ov5_021E0948 + add r2, r0, #0 + ldr r1, _021E09D0 ; =ov5_021E09D4 + add r0, r6, #0 + bl sub_02050944 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E09D0: .word ov5_021E09D4 + thumb_func_end ov5_021E0998 + + thumb_func_start ov5_021E09D4 +ov5_021E09D4: ; 0x021E09D4 + push {r4, r5, r6, lr} + bl sub_02050A64 + ldr r6, _021E0A14 ; =0x021F9AFC + ldr r4, _021E0A18 ; =0x021F9B10 + add r5, r0, #0 +_021E09E0: + ldr r0, [r5, #4] + cmp r0, #0 + bne _021E09F2 + ldr r1, [r5, #0] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + blx r1 + b _021E09FC +_021E09F2: + ldr r1, [r5, #0] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r6, r1] + blx r1 +_021E09FC: + cmp r0, #2 + beq _021E09E0 + cmp r0, #1 + bne _021E0A0E + add r0, r5, #0 + bl ov5_021E1134 + mov r0, #1 + pop {r4, r5, r6, pc} +_021E0A0E: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_021E0A14: .word 0x021F9AFC +_021E0A18: .word 0x021F9B10 + thumb_func_end ov5_021E09D4 + + thumb_func_start ov5_021E0A1C +ov5_021E0A1C: ; 0x021E0A1C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + cmp r0, #1 + bne _021E0A3A + add r1, r4, #0 + ldr r0, [r4, #0x34] + add r1, #0x40 + bl ov5_021E103C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} +_021E0A3A: + mov r0, #2 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0A1C + + thumb_func_start ov5_021E0A44 +ov5_021E0A44: ; 0x021E0A44 + push {r4, lr} + add r4, r0, #0 + add r0, #0x40 + bl ov5_021E1050 + cmp r0, #1 + bne _021E0A5E + ldr r0, _021E0A64 ; =0x0000064D + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0A5E: + mov r0, #0 + pop {r4, pc} + nop +_021E0A64: .word 0x0000064D + thumb_func_end ov5_021E0A44 + + thumb_func_start ov5_021E0A68 +ov5_021E0A68: ; 0x021E0A68 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_02063020 + add r4, r0, #0 + mov r0, #0 + bl sub_0206419C + lsl r0, r0, #1 + add r4, r4, r0 + ldr r0, [r5, #0x3c] + bl sub_02063040 + add r6, r0, #0 + mov r0, #0 + bl sub_020641A8 + lsl r0, r0, #1 + add r6, r6, r0 + add r2, r5, #0 + add r0, r4, #0 + add r1, r6, #0 + add r2, #0x28 + bl sub_02064450 + add r1, r5, #0 + ldr r0, [r5, #0x34] + add r1, #0x28 + bl sub_020644A4 + str r4, [r5, #0xc] + ldr r0, [r5, #0x2c] + asr r1, r0, #3 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + str r0, [r5, #0x10] + str r6, [r5, #0x14] + ldr r0, [r5, #0x3c] + add r1, sp, #0xc + bl sub_02063050 + ldr r1, [sp, #0x14] + ldr r0, [r5, #0x30] + cmp r1, r0 + bgt _021E0ACE + bl sub_02022974 +_021E0ACE: + ldr r1, [sp, #0x10] + ldr r0, [r5, #0x2c] + cmp r1, r0 + blt _021E0ADA + bl sub_02022974 +_021E0ADA: + mov r0, #0 + str r0, [sp] + ldr r1, [r5, #0x2c] + ldr r0, [sp, #0x10] + add r3, sp, #0 + sub r2, r1, r0 + ldr r1, [r5, #0x30] + ldr r0, [sp, #0x14] + str r2, [sp, #4] + sub r1, r1, r0 + asr r0, r2, #5 + lsr r0, r0, #0x1a + add r0, r2, r0 + asr r0, r0, #6 + str r0, [sp, #4] + asr r0, r1, #5 + lsr r0, r0, #0x1a + add r0, r1, r0 + add r2, r5, #0 + str r1, [sp, #8] + asr r0, r0, #6 + str r0, [sp, #8] + ldmia r3!, {r0, r1} + add r2, #0x1c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r5, #0x34] + bl ov6_022485F4 + str r0, [r5, #0x50] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0 + add sp, #0x18 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E0A68 + + thumb_func_start ov5_021E0B24 +ov5_021E0B24: ; 0x021E0B24 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063050 + ldr r1, [sp, #4] + ldr r0, [r4, #0x20] + add r1, r1, r0 + str r1, [sp, #4] + ldr r0, [r4, #0x2c] + cmp r1, r0 + ble _021E0B42 + str r0, [sp, #4] +_021E0B42: + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063060 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x20 + blt _021E0B5E + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0B5E: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021E0B24 + + thumb_func_start ov5_021E0B64 +ov5_021E0B64: ; 0x021E0B64 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063050 + ldr r1, [sp, #4] + ldr r0, [r4, #0x20] + add r1, r1, r0 + str r1, [sp, #4] + ldr r0, [r4, #0x2c] + cmp r1, r0 + ble _021E0B82 + str r0, [sp, #4] +_021E0B82: + ldr r1, [sp, #8] + ldr r0, [r4, #0x24] + add r1, r1, r0 + str r1, [sp, #8] + ldr r0, [r4, #0x30] + cmp r1, r0 + bge _021E0B92 + str r0, [sp, #8] +_021E0B92: + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063060 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x40 + bge _021E0BAA + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021E0BAA: + ldr r1, [sp, #8] + ldr r0, [r4, #0x30] + cmp r1, r0 + beq _021E0BB6 + bl sub_02022974 +_021E0BB6: + ldr r1, [sp, #4] + ldr r0, [r4, #0x2c] + cmp r1, r0 + beq _021E0BC2 + bl sub_02022974 +_021E0BC2: + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0xc] + bl sub_02063024 + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x10] + bl sub_02063034 + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x14] + bl sub_02063044 + ldr r0, [r4, #0x3c] + bl sub_02064208 + ldr r0, [r4, #0x50] + bl ov6_02248608 + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021E0B64 + + thumb_func_start ov5_021E0BEC +ov5_021E0BEC: ; 0x021E0BEC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x40] + cmp r0, #1 + bne _021E0C0A + add r1, r4, #0 + ldr r0, [r4, #0x34] + add r1, #0x40 + bl ov5_021E103C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} +_021E0C0A: + mov r0, #2 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov5_021E0BEC + + thumb_func_start ov5_021E0C10 +ov5_021E0C10: ; 0x021E0C10 + push {r4, lr} + add r4, r0, #0 + add r0, #0x40 + bl ov5_021E1050 + cmp r0, #1 + bne _021E0C2A + ldr r0, _021E0C30 ; =0x0000064D + bl sub_02005748 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0C2A: + mov r0, #0 + pop {r4, pc} + nop +_021E0C30: .word 0x0000064D + thumb_func_end ov5_021E0C10 + + thumb_func_start ov5_021E0C34 +ov5_021E0C34: ; 0x021E0C34 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_02063020 + add r4, r0, #0 + mov r0, #1 + bl sub_0206419C + lsl r0, r0, #1 + add r4, r4, r0 + ldr r0, [r5, #0x3c] + bl sub_02063040 + add r6, r0, #0 + mov r0, #1 + bl sub_020641A8 + lsl r0, r0, #1 + add r6, r6, r0 + add r2, r5, #0 + add r0, r4, #0 + add r1, r6, #0 + add r2, #0x28 + bl sub_02064450 + add r1, r5, #0 + ldr r0, [r5, #0x34] + add r1, #0x28 + bl sub_020644A4 + mov r0, #0 + str r0, [r5, #0x18] + str r4, [r5, #0xc] + ldr r0, [r5, #0x2c] + asr r1, r0, #3 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + str r0, [r5, #0x10] + str r6, [r5, #0x14] + ldr r0, [r5, #0x3c] + add r1, sp, #0xc + bl sub_02063050 + ldr r1, [sp, #0x14] + ldr r0, [r5, #0x30] + cmp r1, r0 + blt _021E0C9E + bl sub_02022974 +_021E0C9E: + ldr r1, [sp, #0x10] + ldr r0, [r5, #0x2c] + cmp r1, r0 + bgt _021E0CAA + bl sub_02022974 +_021E0CAA: + mov r0, #0 + str r0, [sp] + ldr r1, [r5, #0x2c] + ldr r0, [sp, #0x10] + add r3, sp, #0 + sub r2, r1, r0 + ldr r1, [r5, #0x30] + ldr r0, [sp, #0x14] + str r2, [sp, #4] + sub r1, r1, r0 + asr r0, r2, #5 + lsr r0, r0, #0x1a + add r0, r2, r0 + asr r0, r0, #6 + str r0, [sp, #4] + asr r0, r1, #5 + lsr r0, r0, #0x1a + add r0, r1, r0 + add r2, r5, #0 + str r1, [sp, #8] + asr r0, r0, #6 + str r0, [sp, #8] + ldmia r3!, {r0, r1} + add r2, #0x1c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r5, #0x34] + bl ov6_022485F4 + str r0, [r5, #0x50] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0 + add sp, #0x18 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E0C34 + + thumb_func_start ov5_021E0CF4 +ov5_021E0CF4: ; 0x021E0CF4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063050 + ldr r1, [sp, #8] + ldr r0, [r4, #0x24] + add r1, r1, r0 + str r1, [sp, #8] + ldr r0, [r4, #0x30] + cmp r1, r0 + ble _021E0D14 + str r0, [sp, #8] + b _021E0D1C +_021E0D14: + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x24] + add r0, r1, r0 + str r0, [r4, #0x18] +_021E0D1C: + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063060 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x20 + blt _021E0D38 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021E0D38: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0CF4 + + thumb_func_start ov5_021E0D40 +ov5_021E0D40: ; 0x021E0D40 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063050 + ldr r1, [sp, #4] + ldr r0, [r4, #0x20] + add r1, r1, r0 + str r1, [sp, #4] + ldr r0, [r4, #0x2c] + cmp r1, r0 + bge _021E0D5E + str r0, [sp, #4] +_021E0D5E: + ldr r1, [sp, #8] + ldr r0, [r4, #0x24] + add r1, r1, r0 + str r1, [sp, #8] + ldr r0, [r4, #0x30] + cmp r1, r0 + ble _021E0D70 + str r0, [sp, #8] + b _021E0D78 +_021E0D70: + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x24] + add r0, r1, r0 + str r0, [r4, #0x18] +_021E0D78: + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063060 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x40 + bge _021E0D90 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021E0D90: + ldr r1, [sp, #8] + ldr r0, [r4, #0x30] + cmp r1, r0 + beq _021E0D9C + bl sub_02022974 +_021E0D9C: + ldr r1, [sp, #4] + ldr r0, [r4, #0x2c] + cmp r1, r0 + beq _021E0DA8 + bl sub_02022974 +_021E0DA8: + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0xc] + bl sub_02063024 + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x10] + bl sub_02063034 + ldr r0, [r4, #0x3c] + ldr r1, [r4, #0x14] + bl sub_02063044 + ldr r0, [r4, #0x3c] + bl sub_02064208 + ldr r0, [r4, #0x50] + bl ov6_02248608 + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0D40 + + thumb_func_start ov5_021E0DD4 +ov5_021E0DD4: ; 0x021E0DD4 + push {r3, lr} + bl sub_02050A60 + bl ov5_021E0DE0 + pop {r3, pc} + thumb_func_end ov5_021E0DD4 + + thumb_func_start ov5_021E0DE0 +ov5_021E0DE0: ; 0x021E0DE0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x18 + bl ov5_021E1110 + add r4, r0, #0 + str r5, [r4, #0] + ldr r0, [r5, #0x3c] + str r0, [r4, #4] + bl sub_0205EB3C + str r0, [r4, #8] + ldr r0, [r4, #4] + bl sub_0205EB98 + str r0, [r4, #0x10] + ldr r0, [r5, #0x10] + ldr r1, _021E0E0C ; =ov5_021E0E10 + add r2, r4, #0 + bl sub_02050944 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021E0E0C: .word ov5_021E0E10 + thumb_func_end ov5_021E0DE0 + + thumb_func_start ov5_021E0E10 +ov5_021E0E10: ; 0x021E0E10 + push {r4, lr} + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021E0E28 + cmp r0, #1 + beq _021E0E3A + cmp r0, #2 + beq _021E0E6C + b _021E0E86 +_021E0E28: + ldr r0, [r4, #8] + ldr r1, _021E0E8C ; =0x021F9B9C + bl sub_02065700 + str r0, [r4, #0x14] + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _021E0E86 +_021E0E3A: + ldr r0, [r4, #0x14] + bl sub_0206574C + cmp r0, #1 + bne _021E0E86 + ldr r1, [r4, #0x10] + mov r0, #0x12 + bl sub_0205ED6C + add r1, r0, #0 + ldr r0, [r4, #4] + bl ov5_021E106C + ldr r0, [r4, #0x14] + bl sub_02065758 + ldr r0, [r4, #8] + ldr r1, _021E0E90 ; =0x021F9C00 + bl sub_02065700 + str r0, [r4, #0x14] + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _021E0E86 +_021E0E6C: + ldr r0, [r4, #0x14] + bl sub_0206574C + cmp r0, #1 + bne _021E0E86 + ldr r0, [r4, #0x14] + bl sub_02065758 + add r0, r4, #0 + bl ov5_021E1134 + mov r0, #1 + pop {r4, pc} +_021E0E86: + mov r0, #0 + pop {r4, pc} + nop +_021E0E8C: .word 0x021F9B9C +_021E0E90: .word 0x021F9C00 + thumb_func_end ov5_021E0E10 + + thumb_func_start ov5_021E0E94 +ov5_021E0E94: ; 0x021E0E94 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02062DFC + cmp r0, #0 + beq _021E0EE4 + add r0, r4, #0 + bl sub_0205EB74 + cmp r0, #0 + bne _021E0EE4 + add r0, r5, #0 + bl sub_02062920 + cmp r0, #0xc4 + beq _021E0EE4 + cmp r0, #0xc5 + beq _021E0EE4 + ldr r1, _021E0EE8 ; =0x0000010E + sub r0, r0, r1 + cmp r0, #1 + bls _021E0EE4 + add r0, r4, #0 + bl sub_0205EB90 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0x40 + bl ov5_021DFB54 + add r0, r4, #0 + bl ov5_021DFB5C + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DFB54 +_021E0EE4: + pop {r3, r4, r5, pc} + nop +_021E0EE8: .word 0x0000010E + thumb_func_end ov5_021E0E94 + + thumb_func_start ov5_021E0EEC +ov5_021E0EEC: ; 0x021E0EEC + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02062DFC + cmp r0, #0 + beq _021E0F4C + add r0, r4, #0 + bl sub_0205EB74 + cmp r0, #0 + bne _021E0F4C + add r0, r5, #0 + bl sub_02062920 + cmp r0, #0xc4 + beq _021E0F2E + cmp r0, #0xc5 + beq _021E0F2E + ldr r2, _021E0F50 ; =0x0000010E + cmp r0, r2 + beq _021E0F2E + add r1, r2, #1 + cmp r0, r1 + beq _021E0F2E + add r1, r2, #4 + cmp r0, r1 + beq _021E0F2E + add r1, r2, #5 + cmp r0, r1 + bne _021E0F4C +_021E0F2E: + add r0, r4, #0 + bl sub_0205EB90 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl ov5_021DFB54 + add r0, r4, #0 + bl ov5_021DFB5C + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DFB54 +_021E0F4C: + pop {r3, r4, r5, pc} + nop +_021E0F50: .word 0x0000010E + thumb_func_end ov5_021E0EEC + + thumb_func_start ov5_021E0F54 +ov5_021E0F54: ; 0x021E0F54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + ldr r5, [r6, #0x3c] + str r1, [sp] + add r0, r5, #0 + bl sub_0205EB74 + add r7, r0, #0 + beq _021E0F6E + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E0F6E: + add r0, r5, #0 + bl sub_0205EB3C + str r0, [sp, #4] + mov r0, #4 + mov r1, #0x10 + bl sub_02018184 + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0] + str r6, [r4, #8] + str r5, [r4, #0xc] + ldr r0, [sp, #4] + str r7, [r4, #4] + bl sub_02062DDC + ldr r1, [sp] + add r0, r5, #0 + bl ov5_021DFB54 + add r0, r5, #0 + bl ov5_021DFB5C + ldr r0, _021E0FB8 ; =ov5_021E0FF0 + ldr r2, _021E0FBC ; =0x0000FFFF + add r1, r4, #0 + bl sub_0200D9E8 + add r4, r0, #0 + bne _021E0FB0 + bl sub_02022974 +_021E0FB0: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E0FB8: .word ov5_021E0FF0 +_021E0FBC: .word 0x0000FFFF + thumb_func_end ov5_021E0F54 + + thumb_func_start ov5_021E0FC0 +ov5_021E0FC0: ; 0x021E0FC0 + push {r4, r5, r6, lr} + add r5, r0, #0 + beq _021E0FEE + bl sub_0201CED0 + add r6, r0, #0 + ldr r4, [r6, #0xc] + add r0, r4, #0 + bl sub_0205EB98 + add r1, r0, #0 + mov r0, #0 + bl sub_0205ED6C + add r0, r4, #0 + bl ov5_021DFB90 + add r0, r6, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_021E0FEE: + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E0FC0 + + thumb_func_start ov5_021E0FF0 +ov5_021E0FF0: ; 0x021E0FF0 + push {r3, lr} + ldr r0, [r1, #0xc] + bl sub_0205EB3C + bl sub_02062B68 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021E0FF0 + + thumb_func_start ov5_021E1000 +ov5_021E1000: ; 0x021E1000 + ldr r3, _021E1008 ; =ov5_021E0F54 + mov r1, #0x80 + bx r3 + nop +_021E1008: .word ov5_021E0F54 + thumb_func_end ov5_021E1000 + + thumb_func_start ov5_021E100C +ov5_021E100C: ; 0x021E100C + ldr r3, _021E1010 ; =ov5_021E0FC0 + bx r3 + ; .align 2, 0 +_021E1010: .word ov5_021E0FC0 + thumb_func_end ov5_021E100C + + thumb_func_start ov5_021E1014 +ov5_021E1014: ; 0x021E1014 + ldr r3, _021E101C ; =ov5_021E0F54 + mov r1, #2 + lsl r1, r1, #8 + bx r3 + ; .align 2, 0 +_021E101C: .word ov5_021E0F54 + thumb_func_end ov5_021E1014 + + thumb_func_start ov5_021E1020 +ov5_021E1020: ; 0x021E1020 + ldr r3, _021E1024 ; =ov5_021E0FC0 + bx r3 + ; .align 2, 0 +_021E1024: .word ov5_021E0FC0 + thumb_func_end ov5_021E1020 + + thumb_func_start ov5_021E1028 +ov5_021E1028: ; 0x021E1028 + push {r4, lr} + add r4, r2, #0 + mov r2, #1 + str r2, [r4, #0] + str r1, [r4, #8] + ldr r0, [r0, #0x3c] + bl sub_0205EB98 + str r0, [r4, #4] + pop {r4, pc} + thumb_func_end ov5_021E1028 + + thumb_func_start ov5_021E103C +ov5_021E103C: ; 0x021E103C + push {r4, lr} + add r4, r1, #0 + ldr r2, [r4, #8] + ldr r3, [r4, #4] + mov r1, #0 + bl ov6_02243F88 + str r0, [r4, #0xc] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E103C + + thumb_func_start ov5_021E1050 +ov5_021E1050: ; 0x021E1050 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl ov6_02243FBC + cmp r0, #1 + bne _021E1068 + ldr r0, [r4, #0xc] + bl ov6_02243FC8 + mov r0, #1 + pop {r4, pc} +_021E1068: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021E1050 + + thumb_func_start ov5_021E106C +ov5_021E106C: ; 0x021E106C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_0205EB3C + add r6, r0, #0 + add r0, r5, #0 + bl sub_0205F108 + cmp r0, #0 + bne _021E1090 + mov r2, #0 + add r0, r6, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov5_021EE3FC + pop {r3, r4, r5, r6, r7, pc} +_021E1090: + add r0, r6, #0 + bl sub_02062C00 + add r1, r6, #0 + add r7, r0, #0 + bl ov9_0224A520 + str r0, [sp] + ldr r2, _021E10BC ; =ov5_021E10C0 + add r0, r6, #0 + add r1, r4, #0 + add r3, r5, #0 + bl ov5_021EE3FC + add r1, r0, #0 + beq _021E10B8 + ldr r2, [sp] + add r0, r7, #0 + bl ov9_0224A558 +_021E10B8: + pop {r3, r4, r5, r6, r7, pc} + nop +_021E10BC: .word ov5_021E10C0 + thumb_func_end ov5_021E106C + + thumb_func_start ov5_021E10C0 +ov5_021E10C0: ; 0x021E10C0 + push {r4, lr} + add r4, r1, #0 + bl sub_0205EB3C + bl sub_02062C00 + add r1, r4, #0 + bl ov9_0224A564 + pop {r4, pc} + thumb_func_end ov5_021E10C0 + + thumb_func_start ov5_021E10D4 +ov5_021E10D4: ; 0x021E10D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + bl sub_0205EABC + add r6, r0, #0 + add r0, r5, #0 + bl sub_0206419C + add r7, r0, #0 + add r0, r4, #0 + bl sub_0205EAC8 + str r0, [sp] + add r0, r5, #0 + bl sub_020641A8 + add r5, r0, #0 + add r0, r4, #0 + bl sub_0205EB3C + bl sub_02062A40 + ldr r2, [sp] + add r1, r6, r7 + add r2, r2, r5 + mov r3, #0 + bl sub_0206326C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E10D4 + + thumb_func_start ov5_021E1110 +ov5_021E1110: ; 0x021E1110 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + add r1, r5, #0 + bl sub_02018184 + add r4, r0, #0 + bne _021E1124 + bl sub_02022974 +_021E1124: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1110 + + thumb_func_start ov5_021E1134 +ov5_021E1134: ; 0x021E1134 + ldr r3, _021E113C ; =sub_02018238 + add r1, r0, #0 + mov r0, #4 + bx r3 + ; .align 2, 0 +_021E113C: .word sub_02018238 + thumb_func_end ov5_021E1134 + + thumb_func_start ov5_021E1140 +ov5_021E1140: ; 0x021E1140 + push {r4, lr} + ldr r0, [r0, #0xc] + add r4, r1, #0 + bl sub_0207A268 + add r1, r4, #0 + bl sub_0207A0FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1140 + + .rodata + + + .global Unk_ov5_021F9AFC +Unk_ov5_021F9AFC: ; 0x021F9AFC + .incbin "incbin/overlay5_rodata.bin", 0x11E8, 0x11FC - 0x11E8 + + .global Unk_ov5_021F9B10 +Unk_ov5_021F9B10: ; 0x021F9B10 + .incbin "incbin/overlay5_rodata.bin", 0x11FC, 0x1210 - 0x11FC + + .global Unk_ov5_021F9B24 +Unk_ov5_021F9B24: ; 0x021F9B24 + .incbin "incbin/overlay5_rodata.bin", 0x1210, 0x1228 - 0x1210 + + .global Unk_ov5_021F9B3C +Unk_ov5_021F9B3C: ; 0x021F9B3C + .incbin "incbin/overlay5_rodata.bin", 0x1228, 0x1240 - 0x1228 + + .global Unk_ov5_021F9B54 +Unk_ov5_021F9B54: ; 0x021F9B54 + .incbin "incbin/overlay5_rodata.bin", 0x1240, 0x1260 - 0x1240 + + .global Unk_ov5_021F9B74 +Unk_ov5_021F9B74: ; 0x021F9B74 + .incbin "incbin/overlay5_rodata.bin", 0x1260, 0x1288 - 0x1260 + + .global Unk_ov5_021F9B9C +Unk_ov5_021F9B9C: ; 0x021F9B9C + .incbin "incbin/overlay5_rodata.bin", 0x1288, 0x12EC - 0x1288 + + .global Unk_ov5_021F9C00 +Unk_ov5_021F9C00: ; 0x021F9C00 + .incbin "incbin/overlay5_rodata.bin", 0x12EC, 0x68 + diff --git a/asm/ov5_021E1154.s b/asm/ov5_021E1154.s new file mode 100644 index 000000000..63fa49b12 --- /dev/null +++ b/asm/ov5_021E1154.s @@ -0,0 +1,280 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E1154 +ov5_021E1154: ; 0x021E1154 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + bl sub_0205EB3C + bl sub_02062BE8 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, r4, #0 + bl sub_0205DEB4 + cmp r0, #1 + bne _021E1176 + mov r2, #3 + b _021E11A4 +_021E1176: + add r0, r4, #0 + bl sub_0205DEC0 + cmp r0, #1 + bne _021E1184 + mov r2, #2 + b _021E11A4 +_021E1184: + add r0, r4, #0 + bl sub_0205DECC + cmp r0, #1 + bne _021E1192 + mov r2, #0 + b _021E11A4 +_021E1192: + add r0, r4, #0 + bl sub_0205DED8 + cmp r0, #1 + bne _021E11A0 + mov r2, #1 + b _021E11A4 +_021E11A0: + mov r0, #0 + pop {r4, r5, r6, pc} +_021E11A4: + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021E11B0 + mov r0, #1 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E1154 + + thumb_func_start ov5_021E11B0 +ov5_021E11B0: ; 0x021E11B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x18 + add r6, r1, #0 + add r7, r2, #0 + bl ov5_021E132C + add r4, r0, #0 + str r5, [r4, #0xc] + str r6, [r4, #0x10] + ldr r0, _021E11D8 ; =0x00000658 + str r7, [r4, #0] + bl sub_02005748 + ldr r1, _021E11DC ; =ov5_021E120C + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050904 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E11D8: .word 0x00000658 +_021E11DC: .word ov5_021E120C + thumb_func_end ov5_021E11B0 + + thumb_func_start ov5_021E11E0 +ov5_021E11E0: ; 0x021E11E0 + cmp r0, #3 + bhi _021E1208 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E11F0: ; jump table + .short _021E11F8 - _021E11F0 - 2 ; case 0 + .short _021E1200 - _021E11F0 - 2 ; case 1 + .short _021E11FC - _021E11F0 - 2 ; case 2 + .short _021E1204 - _021E11F0 - 2 ; case 3 +_021E11F8: + mov r0, #2 + bx lr +_021E11FC: + mov r0, #1 + bx lr +_021E1200: + mov r0, #3 + bx lr +_021E1204: + mov r0, #0 + bx lr +_021E1208: + mov r0, #0 + bx lr + thumb_func_end ov5_021E11E0 + + thumb_func_start ov5_021E120C +ov5_021E120C: ; 0x021E120C + push {r4, r5, r6, lr} + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl sub_0205EB3C + add r6, r0, #0 + bl sub_02062BE8 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021E1234 + cmp r0, #1 + beq _021E1246 + cmp r0, #2 + beq _021E1276 + b _021E1324 +_021E1234: + mov r1, #1 + add r0, r6, #0 + lsl r1, r1, #8 + bl sub_020628BC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _021E1324 +_021E1246: + ldr r0, [r4, #0x10] + bl sub_02061544 + cmp r0, #0 + beq _021E1324 + ldr r0, [r4, #0] + mov r1, #0xc + bl sub_02065838 + add r1, r0, #0 + ldr r0, [r4, #0x10] + mov r2, #1 + bl sub_02061550 + ldr r0, [r4, #0x10] + ldr r1, [r4, #0] + bl sub_0205EA84 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #7 + str r0, [r4, #4] + b _021E1324 +_021E1276: + ldr r0, [r4, #4] + cmp r0, #2 + beq _021E1284 + cmp r0, #4 + beq _021E1284 + cmp r0, #6 + bne _021E1294 +_021E1284: + ldr r0, [r4, #0] + bl ov5_021E11E0 + str r0, [r4, #0] + ldr r0, [r4, #0x10] + ldr r1, [r4, #0] + bl sub_0205EA84 +_021E1294: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + bne _021E1324 + add r0, r5, #0 + bl sub_0205DEB4 + cmp r0, #1 + bne _021E12AC + mov r0, #3 + str r0, [r4, #0] + b _021E12E4 +_021E12AC: + add r0, r5, #0 + bl sub_0205DEC0 + cmp r0, #1 + bne _021E12BC + mov r0, #2 + str r0, [r4, #0] + b _021E12E4 +_021E12BC: + add r0, r5, #0 + bl sub_0205DECC + cmp r0, #1 + bne _021E12CC + mov r0, #0 + str r0, [r4, #0] + b _021E12E4 +_021E12CC: + add r0, r5, #0 + bl sub_0205DED8 + cmp r0, #1 + bne _021E12DC + mov r0, #1 + str r0, [r4, #0] + b _021E12E4 +_021E12DC: + ldr r0, [r4, #0] + bl ov5_021E11E0 + str r0, [r4, #0] +_021E12E4: + ldr r0, [r4, #0x10] + ldr r2, [r4, #0] + add r1, r6, #0 + bl sub_02060B7C + cmp r0, #0 + bne _021E12F8 + mov r0, #1 + str r0, [r4, #8] + b _021E1324 +_021E12F8: + add r0, r6, #0 + mov r1, #0x80 + bl sub_020628C4 + mov r1, #1 + add r0, r6, #0 + lsl r1, r1, #8 + bl sub_020628C4 + ldr r0, [r4, #0x10] + ldr r1, [r4, #0] + bl sub_0205EA84 + add r0, r4, #0 + bl ov5_021E1350 + ldr r0, _021E1328 ; =0x00000658 + mov r1, #0 + bl sub_020057A4 + mov r0, #1 + pop {r4, r5, r6, pc} +_021E1324: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E1328: .word 0x00000658 + thumb_func_end ov5_021E120C + + thumb_func_start ov5_021E132C +ov5_021E132C: ; 0x021E132C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + add r1, r5, #0 + bl sub_02018184 + add r4, r0, #0 + bne _021E1340 + bl sub_02022974 +_021E1340: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E132C + + thumb_func_start ov5_021E1350 +ov5_021E1350: ; 0x021E1350 + ldr r3, _021E1358 ; =sub_02018238 + add r1, r0, #0 + mov r0, #4 + bx r3 + ; .align 2, 0 +_021E1358: .word sub_02018238 + thumb_func_end ov5_021E1350 \ No newline at end of file diff --git a/asm/ov5_021E135C.s b/asm/ov5_021E135C.s new file mode 100644 index 000000000..706510757 --- /dev/null +++ b/asm/ov5_021E135C.s @@ -0,0 +1,323 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E135C +ov5_021E135C: ; 0x021E135C + add r1, r0, #0 + ldr r0, [r1, #0x10] + cmp r0, #3 + bhi _021E138E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E1370: ; jump table + .short _021E1378 - _021E1370 - 2 ; case 0 + .short _021E1384 - _021E1370 - 2 ; case 1 + .short _021E137E - _021E1370 - 2 ; case 2 + .short _021E138A - _021E1370 - 2 ; case 3 +_021E1378: + mov r0, #2 + str r0, [r1, #0x10] + b _021E138E +_021E137E: + mov r0, #1 + str r0, [r1, #0x10] + b _021E138E +_021E1384: + mov r0, #3 + str r0, [r1, #0x10] + b _021E138E +_021E138A: + mov r0, #0 + str r0, [r1, #0x10] +_021E138E: + ldr r0, [r1, #0] + ldr r3, _021E1398 ; =sub_0205EA84 + ldr r0, [r0, #0x3c] + ldr r1, [r1, #0x10] + bx r3 + ; .align 2, 0 +_021E1398: .word sub_0205EA84 + thumb_func_end ov5_021E135C + + thumb_func_start ov5_021E139C +ov5_021E139C: ; 0x021E139C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0x3c] + bl sub_0205EB3C + add r6, r0, #0 + ldr r0, [r5, #8] + cmp r0, #0 + beq _021E13BC + cmp r0, #1 + beq _021E13C6 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} +_021E13BC: + mov r0, #1 + str r0, [r5, #8] + ldr r0, _021E1464 ; =0x0000064F + bl sub_02005748 +_021E13C6: + ldr r0, [r5, #0xc] + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _021E13DC + add r0, r5, #0 + bl ov5_021E135C +_021E13DC: + add r0, r6, #0 + add r1, sp, #0x18 + bl sub_0206309C + ldr r4, [r5, #0xc] + add r0, r4, #0 + bl sub_020E01B8 + str r0, [sp, #0x14] + lsl r0, r4, #0xb + str r1, [sp, #0x10] + bl sub_020E01B8 + add r2, r0, #0 + add r3, r1, #0 + ldr r0, _021E1468 ; =0x9999999A + ldr r1, _021E146C ; =0x40C19999 + bl sub_020DFC6C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x10] + bl sub_020E0234 + bl sub_020E0088 + str r0, [sp, #0x1c] + add r0, r6, #0 + add r1, sp, #0x18 + bl sub_020630AC + ldr r0, [r5, #0xc] + add r0, r0, #1 + str r0, [r5, #0xc] + cmp r0, #0x14 + bne _021E1442 + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} +_021E1442: + ble _021E145E + bl sub_0200F2AC + cmp r0, #0 + beq _021E145E + ldr r0, [r5, #4] + mov r1, #1 + str r1, [r0, #0] + add r0, r5, #0 + bl sub_020181C4 + add r0, r7, #0 + bl sub_0200DA58 +_021E145E: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021E1464: .word 0x0000064F +_021E1468: .word 0x9999999A +_021E146C: .word 0x40C19999 + thumb_func_end ov5_021E139C + + thumb_func_start ov5_021E1470 +ov5_021E1470: ; 0x021E1470 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0x3c] + bl sub_0205EB3C + ldr r1, [r5, #8] + add r4, r0, #0 + cmp r1, #0 + beq _021E1494 + cmp r1, #1 + beq _021E14EC + cmp r1, #2 + beq _021E1574 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_021E1494: + bl sub_02062DDC + add r0, r4, #0 + add r1, sp, #0x14 + bl sub_0206309C + ldr r1, [r5, #0xc] + mov r0, #0x14 + sub r6, r0, r1 + add r0, r6, #0 + bl sub_020E01B8 + str r0, [sp, #0xc] + lsl r0, r6, #0xb + add r7, r1, #0 + bl sub_020E01B8 + add r2, r0, #0 + add r3, r1, #0 + ldr r0, _021E159C ; =0x9999999A + ldr r1, _021E15A0 ; =0x40C19999 + bl sub_020DFC6C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [sp, #0xc] + add r1, r7, #0 + bl sub_020E0234 + bl sub_020E0088 + str r0, [sp, #0x18] + add r0, r4, #0 + add r1, sp, #0x14 + bl sub_020630AC + add r0, r4, #0 + bl ov5_021ECCC8 + ldr r0, _021E15A4 ; =0x0000064F + bl sub_02005748 + mov r0, #1 + str r0, [r5, #8] +_021E14EC: + ldr r0, [r5, #0xc] + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _021E1502 + add r0, r5, #0 + bl ov5_021E135C +_021E1502: + add r0, r4, #0 + add r1, sp, #0x14 + bl sub_0206309C + ldr r1, [r5, #0xc] + mov r0, #0x14 + sub r6, r0, r1 + add r0, r6, #0 + bl sub_020E01B8 + str r0, [sp, #0x10] + lsl r0, r6, #0xb + add r7, r1, #0 + bl sub_020E01B8 + add r2, r0, #0 + add r3, r1, #0 + ldr r0, _021E159C ; =0x9999999A + ldr r1, _021E15A0 ; =0x40C19999 + bl sub_020DFC6C + add r2, r0, #0 + add r3, r1, #0 + ldr r0, [sp, #0x10] + add r1, r7, #0 + bl sub_020E0234 + bl sub_020E0088 + str r0, [sp, #0x18] + add r0, r4, #0 + add r1, sp, #0x14 + bl sub_020630AC + ldr r0, [r5, #0xc] + add r0, r0, #1 + str r0, [r5, #0xc] + cmp r0, #2 + bne _021E1566 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + add r1, r0, #0 + add r2, r0, #0 + mov r3, #0 + bl sub_0200F174 +_021E1566: + ldr r0, [r5, #0xc] + cmp r0, #0x14 + ble _021E1598 + mov r0, #2 + add sp, #0x20 + str r0, [r5, #8] + pop {r3, r4, r5, r6, r7, pc} +_021E1574: + bl sub_0200F2AC + cmp r0, #0 + beq _021E1598 + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0x3c] + bl sub_0205EA84 + ldr r0, [r5, #4] + mov r1, #1 + str r1, [r0, #0] + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_021E1598: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E159C: .word 0x9999999A +_021E15A0: .word 0x40C19999 +_021E15A4: .word 0x0000064F + thumb_func_end ov5_021E1470 + + thumb_func_start ov5_021E15A8 +ov5_021E15A8: ; 0x021E15A8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #4 + mov r1, #0x14 + add r7, r2, #0 + bl sub_02018184 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x14 + bl sub_020C4CF4 + str r5, [r4, #0] + str r7, [r4, #4] + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + str r0, [r4, #0x10] + cmp r6, #0 + beq _021E15DE + ldr r0, _021E15EC ; =ov5_021E139C + add r1, r4, #0 + mov r2, #0x64 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} +_021E15DE: + ldr r0, _021E15F0 ; =ov5_021E1470 + add r1, r4, #0 + mov r2, #0x64 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E15EC: .word ov5_021E139C +_021E15F0: .word ov5_021E1470 + thumb_func_end ov5_021E15A8 \ No newline at end of file diff --git a/asm/ov5_021E15F4.s b/asm/ov5_021E15F4.s new file mode 100644 index 000000000..e1c903b06 --- /dev/null +++ b/asm/ov5_021E15F4.s @@ -0,0 +1,747 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E15F4 +ov5_021E15F4: ; 0x021E15F4 + push {r4, lr} + mov r1, #0x46 + lsl r1, r1, #6 + bl sub_02018144 + add r4, r0, #0 + bl ov5_021E1610 + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov5_021E15F4 + + thumb_func_start ov5_021E1608 +ov5_021E1608: ; 0x021E1608 + ldr r3, _021E160C ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021E160C: .word sub_020181C4 + thumb_func_end ov5_021E1608 + + thumb_func_start ov5_021E1610 +ov5_021E1610: ; 0x021E1610 + push {r3, r4, r5, r6, r7} + sub sp, #0xc + mov r4, #0 + mov ip, r0 + add r7, sp, #0 + add r3, r4, #0 +_021E161C: + str r3, [r7, #0] + str r3, [r7, #4] + mov r0, #0x8c + add r1, r4, #0 + mul r1, r0 + mov r0, ip + add r2, r0, r1 + add r5, r2, #0 + str r3, [r7, #8] + mov r0, ip + str r3, [r0, r1] + str r3, [r2, #4] + str r3, [r2, #8] + str r3, [r2, #0xc] + add r6, r7, #0 + ldmia r6!, {r0, r1} + add r5, #0x68 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r6, r7, #0 + str r0, [r5, #0] + add r5, r2, #0 + ldmia r6!, {r0, r1} + add r5, #0x74 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r6, r7, #0 + str r0, [r5, #0] + add r5, r2, #0 + ldmia r6!, {r0, r1} + add r5, #0x80 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r5, #0] + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + str r3, [r2, #0x64] + cmp r4, #0x20 + blo _021E161C + add sp, #0xc + pop {r3, r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E1610 + + thumb_func_start ov5_021E1674 +ov5_021E1674: ; 0x021E1674 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0x20 + blt _021E1684 + bl sub_02022974 +_021E1684: + add r6, sp, #0 + mov r3, #0 + str r3, [r6, #0] + str r3, [r6, #4] + mov r0, #0x8c + mul r0, r5 + str r3, [r6, #8] + str r3, [r4, r0] + add r2, r4, r0 + str r3, [r2, #4] + str r3, [r2, #8] + add r4, r2, #0 + str r3, [r2, #0xc] + add r5, r6, #0 + ldmia r5!, {r0, r1} + add r4, #0x68 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + add r5, r6, #0 + str r0, [r4, #0] + add r4, r2, #0 + ldmia r5!, {r0, r1} + add r4, #0x74 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r4, #0] + add r4, r2, #0 + ldmia r6!, {r0, r1} + add r4, #0x80 + stmia r4!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r4, #0] + str r3, [r2, #0x64] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1674 + + thumb_func_start ov5_021E16CC +ov5_021E16CC: ; 0x021E16CC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldr r0, [sp, #0x28] + add r4, r1, #0 + str r0, [sp, #0x28] + mov r0, #0 + add r7, r2, #0 + add r5, r3, #0 + str r0, [sp, #4] + cmp r4, #0 + beq _021E1702 + mov r0, #4 + bl sub_02018184 + str r0, [sp, #4] + ldr r2, [sp, #4] + add r0, r6, #0 + add r1, r4, #0 + bl sub_02006E18 + add r0, r4, #0 + mov r1, #0x30 + bl sub_020E2178 + str r0, [sp] + b _021E1704 +_021E1702: + str r0, [sp] +_021E1704: + ldr r4, [sp, #4] + mov r6, #0 +_021E1708: + ldr r0, [sp] + cmp r6, r0 + bhs _021E1776 + ldr r0, [r4, #0] + add r2, r5, #0 + str r0, [r5, #0] + mov r0, #1 + str r0, [r5, #4] + mov r0, #0 + add r3, r4, #4 + str r0, [r5, #0xc] + ldmia r3!, {r0, r1} + add r2, #0x68 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, r4, #0 + str r0, [r2, #0] + add r3, #0x10 + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x74 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, r4, #0 + str r0, [r2, #0] + add r3, #0x1c + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x80 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, r5, #0 + str r0, [r2, #0] + add r2, r5, #0 + ldr r0, [r5, #0] + add r1, r7, #0 + add r2, #0x10 + add r3, #0x64 + bl ov5_021E1904 + ldr r1, [r5, #0] + add r0, r7, #0 + bl ov5_021EFAF8 + cmp r0, #0 + bne _021E1768 + mov r0, #0 + str r0, [r5, #0] +_021E1768: + add r1, r5, #0 + ldr r0, [r5, #0] + ldr r2, [sp, #0x28] + add r1, #0x10 + bl ov5_021D3BE4 + b _021E17B2 +_021E1776: + mov r1, #0 + add r0, sp, #8 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + add r0, r1, #0 + str r0, [r5, #0] + str r0, [r5, #4] + add r2, r5, #0 + add r3, sp, #8 + str r0, [r5, #0xc] + ldmia r3!, {r0, r1} + add r2, #0x68 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, sp, #8 + str r0, [r2, #0] + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x74 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, sp, #8 + str r0, [r2, #0] + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x80 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] +_021E17B2: + add r6, r6, #1 + add r5, #0x8c + add r4, #0x30 + cmp r6, #0x20 + blt _021E1708 + ldr r0, [sp, #4] + cmp r0, #0 + beq _021E17C6 + bl sub_020181C4 +_021E17C6: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E16CC + + thumb_func_start ov5_021E17CC +ov5_021E17CC: ; 0x021E17CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + ldr r4, _021E1888 ; =0x021F9C74 + str r2, [sp, #0xc] + str r3, [sp, #0x10] + add r6, r0, #0 + str r1, [sp, #8] + add r3, sp, #0x18 + mov r2, #4 +_021E17DE: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021E17DE + ldr r0, [r4, #0] + ldr r5, [sp, #0x60] + str r0, [r3, #0] + mov r7, #0 +_021E17EE: + ldr r0, [r5, #4] + cmp r0, #0 + beq _021E187A + ldr r0, [r5, #8] + cmp r0, #0 + bne _021E187A + add r4, r5, #0 + add r4, #0x68 + ldmia r4!, {r0, r1} + add r3, sp, #0x3c + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + ldr r1, [sp, #0x3c] + ldr r0, [r6, #0] + add r3, r5, #0 + add r0, r1, r0 + str r0, [sp, #0x3c] + ldr r1, [sp, #0x44] + ldr r0, [r6, #8] + add r3, #0x80 + add r0, r1, r0 + str r0, [sp, #0x44] + add r1, r2, #0 + ldr r0, [r5, #0x64] + add r2, sp, #0x18 + bl sub_0201CED8 + cmp r0, #0 + beq _021E187A + ldr r0, [sp, #8] + bl ov5_021EFAB4 + add r4, r0, #0 + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _021E1844 + ldr r0, [sp, #0x10] + ldr r1, [r5, #0x64] + ldr r2, _021E188C ; =0x00000F33 + bl ov5_021D5948 +_021E1844: + ldr r0, [r5, #0] + add r1, r4, #0 + add r2, sp, #0x14 + bl ov5_021D5790 + add r0, sp, #0x14 + ldrh r0, [r0] + add r1, sp, #0x3c + cmp r0, #0 + bne _021E1868 + add r0, r5, #0 + add r3, r5, #0 + add r0, #0x10 + add r2, sp, #0x18 + add r3, #0x80 + bl sub_0201CA74 + b _021E187A +_021E1868: + str r4, [sp] + ldr r0, [r5, #0] + add r3, r5, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x64] + add r2, sp, #0x18 + add r3, #0x80 + bl ov5_021E1944 +_021E187A: + add r7, r7, #1 + add r5, #0x8c + cmp r7, #0x20 + blt _021E17EE + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E1888: .word 0x021F9C74 +_021E188C: .word 0x00000F33 + thumb_func_end ov5_021E17CC + + thumb_func_start ov5_021E1890 +ov5_021E1890: ; 0x021E1890 + add r0, #0x74 + bx lr + thumb_func_end ov5_021E1890 + + thumb_func_start ov5_021E1894 +ov5_021E1894: ; 0x021E1894 + add r2, r1, #0 + add r2, #0x68 + add r3, r0, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + bx lr + thumb_func_end ov5_021E1894 + + thumb_func_start ov5_021E18A4 +ov5_021E18A4: ; 0x021E18A4 + add r3, r1, #0 + add r2, r0, #0 + ldmia r3!, {r0, r1} + add r2, #0x68 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bx lr + thumb_func_end ov5_021E18A4 + + thumb_func_start ov5_021E18B4 +ov5_021E18B4: ; 0x021E18B4 + str r1, [r0, #8] + bx lr + thumb_func_end ov5_021E18B4 + + thumb_func_start ov5_021E18B8 +ov5_021E18B8: ; 0x021E18B8 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov5_021E18B8 + + thumb_func_start ov5_021E18BC +ov5_021E18BC: ; 0x021E18BC + add r0, #0x10 + bx lr + thumb_func_end ov5_021E18BC + + thumb_func_start ov5_021E18C0 +ov5_021E18C0: ; 0x021E18C0 + ldr r0, [r0, #0x64] + bx lr + thumb_func_end ov5_021E18C0 + + thumb_func_start ov5_021E18C4 +ov5_021E18C4: ; 0x021E18C4 + mov r2, #0x8c + mul r2, r1 + add r0, r0, r2 + bx lr + thumb_func_end ov5_021E18C4 + + thumb_func_start ov5_021E18CC +ov5_021E18CC: ; 0x021E18CC + mov r3, #0 +_021E18CE: + ldr r2, [r0, #0] + cmp r2, r1 + beq _021E18DE + add r3, r3, #1 + add r0, #0x8c + cmp r3, #0x20 + blt _021E18CE + mov r0, #0 +_021E18DE: + bx lr + thumb_func_end ov5_021E18CC + + thumb_func_start ov5_021E18E0 +ov5_021E18E0: ; 0x021E18E0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0x20 + blt _021E18EE + bl sub_02022974 +_021E18EE: + mov r0, #0x8c + mul r0, r4 + add r4, r5, r0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021E18FE + bl sub_02022974 +_021E18FE: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E18E0 + + thumb_func_start ov5_021E1904 +ov5_021E1904: ; 0x021E1904 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + bl ov5_021EF9E8 + ldr r0, [r0, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _021E1938 + add r2, r0, #0 + add r2, #8 + beq _021E192C + ldrb r1, [r0, #9] + cmp r1, #0 + bls _021E192C + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _021E192E +_021E192C: + mov r1, #0 +_021E192E: + cmp r1, #0 + beq _021E1938 + ldr r1, [r1, #0] + add r1, r0, r1 + b _021E193A +_021E1938: + mov r1, #0 +_021E193A: + add r0, r5, #0 + str r1, [r4, #0] + bl sub_020AE608 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E1904 + + thumb_func_start ov5_021E1944 +ov5_021E1944: ; 0x021E1944 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + add r5, r3, #0 + bl sub_020AF4BC + ldr r1, _021E19C4 ; =0x021C5B48 + add r0, r4, #0 + bl sub_020C4C88 + ldr r1, _021E19C8 ; =0x021C5B0C + mov r0, #0xa4 + ldr r2, [r1, #0x7c] + bic r2, r0 + add r0, r5, #0 + str r2, [r1, #0x7c] + bl sub_020AF4EC + bl sub_020AF480 + add r2, sp, #0 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + add r2, #2 + add r3, sp, #0 + bl ov5_021D579C + add r0, sp, #0 + ldrh r0, [r0] + ldr r1, [sp, #0x18] + bl ov5_021D57B4 + add r6, r0, #0 + add r0, sp, #0 + ldrh r0, [r0, #2] + mov r5, #0xff + mov r4, #0 + cmp r0, #0 + ble _021E19C0 +_021E1994: + lsl r0, r4, #2 + add r2, r6, r0 + ldrh r0, [r6, r0] + cmp r5, r0 + beq _021E19A6 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + mov r3, #1 + b _021E19A8 +_021E19A6: + mov r3, #0 +_021E19A8: + ldrh r2, [r2, #2] + add r0, r7, #0 + add r1, r5, #0 + bl sub_020B2384 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, sp, #0 + ldrh r0, [r0, #2] + cmp r4, r0 + blt _021E1994 +_021E19C0: + pop {r3, r4, r5, r6, r7, pc} + nop +_021E19C4: .word 0x021C5B48 +_021E19C8: .word 0x021C5B0C + thumb_func_end ov5_021E1944 + + thumb_func_start ov5_021E19CC +ov5_021E19CC: ; 0x021E19CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r5, _021E1A68 ; =0x021F9C68 + add r6, r0, #0 + add r7, r1, #0 + ldmia r5!, {r0, r1} + add r4, sp, #4 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r4, #0] + mov r4, #0 + mov r0, #0x8c +_021E19E4: + add r1, r4, #0 + mul r1, r0 + add r5, r6, r1 + ldr r1, [r5, #4] + cmp r1, #0 + bne _021E1A54 + mov r0, #1 + str r0, [r5, #4] + add r6, r5, #0 + ldmia r3!, {r0, r1} + add r6, #0x68 + stmia r6!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r6, #0] + ldr r6, [sp, #0x28] + cmp r6, #0 + beq _021E1A18 + mov r0, #1 + str r0, [r5, #0xc] + add r3, r5, #0 + ldmia r6!, {r0, r1} + add r3, #0x74 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + b _021E1A1C +_021E1A18: + mov r0, #0 + str r0, [r5, #0xc] +_021E1A1C: + add r6, sp, #4 + add r3, r5, #0 + ldmia r6!, {r0, r1} + add r3, #0x80 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r7, #0 + str r0, [r3, #0] + add r3, r5, #0 + str r2, [r5, #0] + add r0, r2, #0 + add r2, r5, #0 + add r2, #0x10 + add r3, #0x64 + bl ov5_021E1904 + ldr r0, [sp, #0x2c] + mov r1, #0 + str r0, [sp] + ldr r0, [r5, #0] + add r5, #0x10 + add r2, r1, #0 + add r3, r5, #0 + bl ov5_021D3B24 + add sp, #0x10 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E1A54: + add r1, r4, #1 + lsl r1, r1, #0x18 + lsr r4, r1, #0x18 + cmp r4, #0x20 + blo _021E19E4 + bl sub_02022974 + mov r0, #0x20 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E1A68: .word 0x021F9C68 + thumb_func_end ov5_021E19CC + + thumb_func_start ov5_021E1A6C +ov5_021E1A6C: ; 0x021E1A6C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + ldr r4, _021E1B04 ; =0x021F9C98 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r3, sp, #0x14 + mov r2, #4 +_021E1A7A: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021E1A7A + ldr r0, [r4, #0] + mov r4, #0 + str r0, [r3, #0] + add r7, sp, #0x14 +_021E1A8A: + mov r0, #0x8c + add r1, r4, #0 + mul r1, r0 + ldr r0, [sp, #8] + add r5, r0, r1 + ldr r0, [r5, #4] + cmp r0, #0 + beq _021E1AF4 + ldr r0, [r5, #8] + cmp r0, #0 + bne _021E1AF4 + ldr r0, [sp, #0xc] + bl ov5_021EFAB4 + add r6, r0, #0 + ldr r0, [r5, #0] + add r1, r6, #0 + add r2, sp, #0x10 + bl ov5_021D5790 + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _021E1AC2 + add r1, r5, #0 + add r0, r7, #0 + add r1, #0x74 + bl sub_0201E268 +_021E1AC2: + add r0, sp, #0x10 + ldrh r0, [r0] + cmp r0, #0 + bne _021E1ADE + add r0, r5, #0 + add r1, r5, #0 + add r5, #0x80 + add r0, #0x10 + add r1, #0x68 + add r2, r7, #0 + add r3, r5, #0 + bl sub_0201CA74 + b _021E1AF4 +_021E1ADE: + str r6, [sp] + ldr r0, [r5, #0] + add r1, r5, #0 + str r0, [sp, #4] + ldr r0, [r5, #0x64] + add r5, #0x80 + add r1, #0x68 + add r2, r7, #0 + add r3, r5, #0 + bl ov5_021E1944 +_021E1AF4: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0x20 + blo _021E1A8A + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E1B04: .word 0x021F9C98 + thumb_func_end ov5_021E1A6C + + .rodata + + + .global Unk_ov5_021F9C68 +Unk_ov5_021F9C68: ; 0x021F9C68 + .incbin "incbin/overlay5_rodata.bin", 0x1354, 0x1360 - 0x1354 + + .global Unk_ov5_021F9C74 +Unk_ov5_021F9C74: ; 0x021F9C74 + .incbin "incbin/overlay5_rodata.bin", 0x1360, 0x1384 - 0x1360 + + .global Unk_ov5_021F9C98 +Unk_ov5_021F9C98: ; 0x021F9C98 + .incbin "incbin/overlay5_rodata.bin", 0x1384, 0x24 + diff --git a/asm/ov5_021E1B08.s b/asm/ov5_021E1B08.s new file mode 100644 index 000000000..32a75910f --- /dev/null +++ b/asm/ov5_021E1B08.s @@ -0,0 +1,319 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E1B08 +ov5_021E1B08: ; 0x021E1B08 + push {r3, lr} + mov r1, #0x14 + bl sub_02018144 + add r3, r0, #0 + mov r2, #0x14 + mov r1, #0 +_021E1B16: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _021E1B16 + pop {r3, pc} + thumb_func_end ov5_021E1B08 + + thumb_func_start ov5_021E1B20 +ov5_021E1B20: ; 0x021E1B20 + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #0x13] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1f + beq _021E1B30 + bl sub_0201A8FC +_021E1B30: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021E1B20 + + thumb_func_start ov5_021E1B38 +ov5_021E1B38: ; 0x021E1B38 + strb r1, [r0, #0x12] + strh r2, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E1B38 + + thumb_func_start ov5_021E1B40 +ov5_021E1B40: ; 0x021E1B40 + ldrb r3, [r0, #0x13] + mov r2, #0x7f + bic r3, r2 + mov r2, #0x7f + and r1, r2 + orr r1, r3 + strb r1, [r0, #0x13] + bx lr + thumb_func_end ov5_021E1B40 + + thumb_func_start ov5_021E1B50 +ov5_021E1B50: ; 0x021E1B50 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E1B50 + + thumb_func_start ov5_021E1B54 +ov5_021E1B54: ; 0x021E1B54 + ldrb r0, [r0, #0x12] + bx lr + thumb_func_end ov5_021E1B54 + + thumb_func_start ov5_021E1B58 +ov5_021E1B58: ; 0x021E1B58 + ldrb r0, [r0, #0x13] + lsl r0, r0, #0x19 + lsr r0, r0, #0x19 + bne _021E1B64 + mov r0, #1 + bx lr +_021E1B64: + mov r0, #0 + bx lr + thumb_func_end ov5_021E1B58 + + thumb_func_start ov5_021E1B68 +ov5_021E1B68: ; 0x021E1B68 + push {r4, lr} + ldr r4, [r0, #0x64] + ldrb r1, [r4, #0x13] + lsl r1, r1, #0x19 + lsr r1, r1, #0x19 + cmp r1, #4 + bhi _021E1BCA + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E1B82: ; jump table + .short _021E1BCA - _021E1B82 - 2 ; case 0 + .short _021E1B8C - _021E1B82 - 2 ; case 1 + .short _021E1B9A - _021E1B82 - 2 ; case 2 + .short _021E1BAC - _021E1B82 - 2 ; case 3 + .short _021E1BBE - _021E1B82 - 2 ; case 4 +_021E1B8C: + bl ov5_021E1BE0 + ldrb r1, [r4, #0x13] + mov r0, #0x7f + bic r1, r0 + strb r1, [r4, #0x13] + pop {r4, pc} +_021E1B9A: + bl ov5_021E1CB0 + cmp r0, #1 + bne _021E1BCA + ldrb r1, [r4, #0x13] + mov r0, #0x7f + bic r1, r0 + strb r1, [r4, #0x13] + pop {r4, pc} +_021E1BAC: + bl ov5_021E1C70 + cmp r0, #1 + bne _021E1BCA + ldrb r1, [r4, #0x13] + mov r0, #0x7f + bic r1, r0 + strb r1, [r4, #0x13] + pop {r4, pc} +_021E1BBE: + bl ov5_021E1C1C + ldrb r1, [r4, #0x13] + mov r0, #0x7f + bic r1, r0 + strb r1, [r4, #0x13] +_021E1BCA: + pop {r4, pc} + thumb_func_end ov5_021E1B68 + + thumb_func_start ov5_021E1BCC +ov5_021E1BCC: ; 0x021E1BCC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x64] + bl ov5_021E1B40 + add r0, r4, #0 + bl ov5_021E1B68 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1BCC + + thumb_func_start ov5_021E1BE0 +ov5_021E1BE0: ; 0x021E1BE0 + push {r4, lr} + mov r1, #3 + add r4, r0, #0 + add r3, r1, #0 + ldr r0, [r4, #8] + add r2, r1, #0 + sub r3, #0x33 + bl sub_02019184 + ldr r1, [r4, #0x64] + ldrb r0, [r1, #0x13] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + bne _021E1C10 + ldrb r2, [r1, #0x12] + ldr r0, [r4, #8] + mov r3, #3 + bl sub_0205DA1C + ldr r2, [r4, #0x64] + mov r0, #0x80 + ldrb r1, [r2, #0x13] + orr r0, r1 + strb r0, [r2, #0x13] +_021E1C10: + ldr r0, [r4, #0x64] + ldrb r1, [r0, #0x12] + ldrh r2, [r0, #0x10] + bl sub_0205DA80 + pop {r4, pc} + thumb_func_end ov5_021E1BE0 + + thumb_func_start ov5_021E1C1C +ov5_021E1C1C: ; 0x021E1C1C + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #0x64] + ldrb r1, [r0, #0x13] + lsl r1, r1, #0x18 + lsr r1, r1, #0x1f + beq _021E1C6A + bl sub_0201A8FC + mov r0, #0x12 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + mov r2, #0 + ldr r0, [r4, #8] + mov r1, #3 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r4, #8] + mov r1, #3 + bl sub_02019448 + mov r1, #3 + ldr r0, [r4, #8] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + ldr r2, [r4, #0x64] + mov r0, #0x80 + ldrb r1, [r2, #0x13] + bic r1, r0 + strb r1, [r2, #0x13] +_021E1C6A: + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1C1C + + thumb_func_start ov5_021E1C70 +ov5_021E1C70: ; 0x021E1C70 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + mov r1, #3 + bl sub_020192F8 + cmp r0, #0 + bne _021E1C84 + mov r0, #1 + pop {r4, pc} +_021E1C84: + mov r1, #0x2f + mvn r1, r1 + cmp r0, r1 + ble _021E1C90 + cmp r0, #0 + blt _021E1C9E +_021E1C90: + mov r1, #3 + add r3, r1, #0 + ldr r0, [r4, #8] + add r2, r1, #0 + sub r3, #0x33 + bl sub_02019184 +_021E1C9E: + ldr r0, [r4, #8] + mov r1, #3 + mov r2, #4 + mov r3, #0x10 + bl sub_02019184 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1C70 + + thumb_func_start ov5_021E1CB0 +ov5_021E1CB0: ; 0x021E1CB0 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #8] + mov r1, #3 + bl sub_020192F8 + mov r1, #0x2f + mvn r1, r1 + cmp r0, r1 + bne _021E1CFC + mov r0, #0x12 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0x10 + str r0, [sp, #0xc] + mov r2, #0 + ldr r0, [r4, #8] + mov r1, #3 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r4, #8] + mov r1, #3 + bl sub_02019448 + mov r1, #3 + ldr r0, [r4, #8] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + add sp, #0x10 + mov r0, #1 + pop {r4, pc} +_021E1CFC: + ble _021E1D02 + cmp r0, #0 + blt _021E1D0E +_021E1D02: + mov r1, #3 + ldr r0, [r4, #8] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 +_021E1D0E: + ldr r0, [r4, #8] + mov r1, #3 + mov r2, #5 + mov r3, #0x10 + bl sub_02019184 + mov r0, #0 + add sp, #0x10 + pop {r4, pc} + thumb_func_end ov5_021E1CB0 \ No newline at end of file diff --git a/asm/ov5_021E1D20.s b/asm/ov5_021E1D20.s new file mode 100644 index 000000000..1bb2159e9 --- /dev/null +++ b/asm/ov5_021E1D20.s @@ -0,0 +1,461 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E1D20 +ov5_021E1D20: ; 0x021E1D20 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [r1, #0xc] + add r5, r0, #0 + add r0, r4, #0 + bl sub_0203A790 + bl sub_0203A720 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02027560 + add r7, r0, #0 + ldr r0, [r6, #0] + bl sub_0203A138 + str r0, [r5, #4] + add r0, r7, #0 + bl sub_02027520 + cmp r0, #0 + beq _021E1D54 + add r0, r7, #0 + bl sub_02026E48 + b _021E1D56 +_021E1D54: + mov r0, #0 +_021E1D56: + str r0, [r5, #0] + add r0, r4, #0 + bl sub_02025E38 + str r0, [r5, #8] + add r0, r4, #0 + bl sub_02025E5C + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1D20 + + thumb_func_start ov5_021E1D6C +ov5_021E1D6C: ; 0x021E1D6C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + ldr r2, [r4, #4] + mov r1, #0 + add r5, r0, #0 + bl sub_0200B8C8 + ldr r2, [r4, #8] + add r0, r5, #0 + mov r1, #1 + bl sub_0200B498 + ldr r0, [r4, #8] + bl sub_02025F58 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + add r0, r5, #0 + mov r1, #2 + bl sub_0200B60C + ldr r2, [r4, #0] + cmp r2, #0x64 + blt _021E1DAA + mov r3, #3 + mov r0, #0 + b _021E1DB8 +_021E1DAA: + cmp r2, #0xa + blt _021E1DB4 + mov r3, #3 + mov r0, #1 + b _021E1DB8 +_021E1DB4: + mov r3, #2 + mov r0, #1 +_021E1DB8: + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #3 + bl sub_0200B60C + ldr r0, [r4, #0xc] + bl sub_0202CC58 + add r2, r0, #0 + cmp r2, #0x64 + blt _021E1DD8 + mov r3, #3 + mov r0, #0 + b _021E1DE6 +_021E1DD8: + cmp r2, #0xa + blt _021E1DE2 + mov r3, #3 + mov r0, #1 + b _021E1DE6 +_021E1DE2: + mov r3, #2 + mov r0, #1 +_021E1DE6: + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #4 + bl sub_0200B60C + ldr r0, [r4, #0xc] + bl sub_0202CC5C + mov r3, #2 + add r2, r0, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #5 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E1D6C + + thumb_func_start ov5_021E1E10 +ov5_021E1E10: ; 0x021E1E10 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021E1E1A + mov r0, #0xa + bx lr +_021E1E1A: + mov r0, #8 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E1E10 + + thumb_func_start ov5_021E1E20 +ov5_021E1E20: ; 0x021E1E20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0 + mov r1, #1 + bl sub_02002DF8 + add r4, r0, #0 + mov r0, #0 + mov r1, #3 + bl sub_02002DF8 + add r0, r4, r0 + str r0, [sp, #0x14] + mov r4, #0 + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r3, [r5, #4] + add r2, r4, #0 + bl sub_0200B29C + add r1, r4, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [r5, #0x10] + add r2, r6, #0 + add r3, r1, #0 + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _021E1EFC ; =0x021F9CD0 + ldr r7, _021E1F00 ; =0x021F9CC0 + str r0, [sp, #0xc] +_021E1E70: + ldr r0, [sp, #0xc] + ldr r1, [r0, #0] + cmp r1, #3 + bne _021E1E7E + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _021E1EE6 +_021E1E7E: + ldr r0, [sp, #0x14] + add r4, r4, r0 + ldr r0, [r5, #0x18] + bl sub_0200B1EC + add r6, r0, #0 + mov r1, #0 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r5, #0x10] + add r2, r6, #0 + add r3, r1, #0 + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + sub r2, r7, #4 + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + ldr r2, [r2, #0] + ldr r3, [r5, #4] + bl sub_0200B29C + add r6, r0, #0 + mov r0, #0 + mov r1, #2 + bl sub_02002DF8 + add r2, r0, #0 + mov r0, #0 + add r1, r6, #0 + bl sub_02002D7C + mov r1, #0x68 + sub r3, r1, r0 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r5, #0x10] + mov r1, #0 + add r2, r6, #0 + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC +_021E1EE6: + ldr r0, [sp, #0xc] + add r7, r7, #4 + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #5 + blo _021E1E70 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E1EFC: .word 0x021F9CD0 +_021E1F00: .word 0x021F9CC0 + thumb_func_end ov5_021E1E20 + + thumb_func_start ov5_021E1F04 +ov5_021E1F04: ; 0x021E1F04 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #0x10 + bl sub_02018144 + str r0, [r4, #0x10] + mov r3, #1 + str r3, [sp] + ldr r0, [r4, #0x2c] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r4, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _021E1F74 ; =0x00000189 + str r0, [sp, #0x10] + ldrb r2, [r4, #8] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r2, _021E1F78 ; =0x000003D9 + str r0, [sp, #4] + ldrb r1, [r4, #8] + ldr r0, [r4, #0xc] + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + mov r1, #6 + bl sub_02002DF8 + add r1, r0, #0 + ldr r0, [r4, #0x10] + bl sub_0201ADA4 + add r0, r4, #0 + bl ov5_021E1E20 + ldr r0, [r4, #0x10] + ldr r2, _021E1F78 ; =0x000003D9 + mov r1, #0 + mov r3, #0xb + bl sub_0200DC48 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_021E1F74: .word 0x00000189 +_021E1F78: .word 0x000003D9 + thumb_func_end ov5_021E1F04 + + thumb_func_start ov5_021E1F7C +ov5_021E1F7C: ; 0x021E1F7C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_0200DC9C + ldr r0, [r4, #0x10] + bl sub_0201A8FC + ldr r0, [r4, #0x10] + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E1F7C + + thumb_func_start ov5_021E1F98 +ov5_021E1F98: ; 0x021E1F98 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0x34 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + str r6, [r4, #0] + str r5, [r4, #4] + strb r7, [r4, #8] + ldr r0, [r6, #8] + str r0, [r4, #0xc] + add r0, r5, #0 + bl sub_0200B358 + str r0, [r4, #0x14] + ldr r2, _021E1FF0 ; =0x00000216 + mov r0, #1 + mov r1, #0x1a + add r3, r5, #0 + bl sub_0200B144 + str r0, [r4, #0x18] + add r0, r4, #0 + ldr r1, [r4, #0] + add r0, #0x1c + bl ov5_021E1D20 + add r1, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x1c + bl ov5_021E1D6C + mov r0, #0xd + str r0, [r4, #0x2c] + add r0, r4, #0 + add r0, #0x1c + bl ov5_021E1E10 + str r0, [r4, #0x30] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E1FF0: .word 0x00000216 + thumb_func_end ov5_021E1F98 + + thumb_func_start ov5_021E1FF4 +ov5_021E1FF4: ; 0x021E1FF4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl sub_0200B190 + ldr r0, [r4, #0x14] + bl sub_0200B3F0 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021E1FF4 + + thumb_func_start ov5_021E200C +ov5_021E200C: ; 0x021E200C + push {r4, lr} + add r4, r0, #0 + bl ov5_021E2028 + ldr r0, [r4, #0xc] + bl sub_020246E0 + cmp r0, #2 + bne _021E2022 + mov r0, #1 + pop {r4, pc} +_021E2022: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E200C + + thumb_func_start ov5_021E2028 +ov5_021E2028: ; 0x021E2028 + push {r4, lr} + add r4, r0, #0 + bl sub_0203A7A8 + add r0, r4, #0 + mov r1, #4 + mov r2, #0 + bl ov5_021EA714 + ldr r0, [r4, #0x3c] + bl sub_0205EABC + ldr r1, [r4, #0x1c] + str r0, [r1, #8] + ldr r0, [r4, #0x3c] + bl sub_0205EAC8 + ldr r1, [r4, #0x1c] + str r0, [r1, #0xc] + mov r1, #0 + ldr r0, [r4, #0x1c] + mvn r1, r1 + str r1, [r0, #4] + ldr r0, [r4, #0x3c] + bl sub_0205EA78 + ldr r1, [r4, #0x1c] + str r0, [r1, #0x10] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E2028 + + thumb_func_start ov5_021E2064 +ov5_021E2064: ; 0x021E2064 + push {r4, lr} + add r4, r0, #0 + bne _021E2070 + bl sub_02022974 + pop {r4, pc} +_021E2070: + ldr r0, [r4, #0x1c] + mov r1, #0x53 + ldr r2, [r0, #0] + lsl r1, r1, #2 + cmp r2, r1 + beq _021E2096 + add r0, r1, #1 + cmp r2, r0 + beq _021E2096 + add r1, #0x86 + cmp r2, r1 + beq _021E2096 + bl sub_02038EB4 + cmp r0, #1 + beq _021E2096 + add r0, r4, #0 + bl ov5_021E2028 +_021E2096: + pop {r4, pc} + thumb_func_end ov5_021E2064 + + .rodata + + + .global Unk_ov5_021F9CBC +Unk_ov5_021F9CBC: ; 0x021F9CBC + .incbin "incbin/overlay5_rodata.bin", 0x13A8, 0x13B8 - 0x13A8 + + .global Unk_ov5_021F9CCC +Unk_ov5_021F9CCC: ; 0x021F9CCC + .incbin "incbin/overlay5_rodata.bin", 0x13B8, 0x14 + diff --git a/asm/ov5_021E2098.s b/asm/ov5_021E2098.s new file mode 100644 index 000000000..c8aaf2e06 --- /dev/null +++ b/asm/ov5_021E2098.s @@ -0,0 +1,287 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E2098 +ov5_021E2098: ; 0x021E2098 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _021E20E0 ; =ov5_021E2178 + ldr r3, [r5, #0x28] + mov r1, #0x38 + mov r2, #5 + bl sub_0200679C + add r6, r0, #0 + bl sub_0201CED0 + add r4, r0, #0 + add r2, r4, #4 + mov r3, #5 +_021E20B4: + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + sub r3, r3, #1 + bne _021E20B4 + ldr r0, [r5, #0] + str r0, [r2, #0] + str r6, [r4, #0x34] + mov r0, #0 + str r0, [r4, #0x30] + bl sub_020BF00C + str r0, [r4, #0] + add r0, r4, #4 + bl ov5_021E2218 + ldr r0, _021E20E4 ; =ov5_021E21B8 + add r1, r4, #0 + mov r2, #0 + bl sub_0200DA3C + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E20E0: .word ov5_021E2178 +_021E20E4: .word ov5_021E21B8 + thumb_func_end ov5_021E2098 + + thumb_func_start ov5_021E20E8 +ov5_021E20E8: ; 0x021E20E8 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + bl sub_020BDE40 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_020BEA30 + ldr r0, [r4, #0] + ldr r0, [r0, #4] + cmp r0, #0xa + bgt _021E2118 + bge _021E213C + cmp r0, #6 + bgt _021E2158 + cmp r0, #2 + blt _021E2158 + beq _021E211E + cmp r0, #6 + beq _021E212E + b _021E2158 +_021E2118: + cmp r0, #0xe + beq _021E214A + b _021E2158 +_021E211E: + mov r1, #0x1a + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E215E +_021E212E: + mov r2, #2 + ldr r1, _021E216C ; =0x06820000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E215E +_021E213C: + mov r2, #2 + ldr r1, _021E2170 ; =0x06840000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E215E +_021E214A: + mov r2, #2 + ldr r1, _021E2174 ; =0x06860000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E215E +_021E2158: + mov r0, #0 + bl sub_020BEA30 +_021E215E: + ldr r0, [r4, #0] + ldr r0, [r0, #0x34] + bl sub_020067D0 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 +_021E216C: .word 0x06820000 +_021E2170: .word 0x06840000 +_021E2174: .word 0x06860000 + thumb_func_end ov5_021E20E8 + + thumb_func_start ov5_021E2178 +ov5_021E2178: ; 0x021E2178 + push {r4, r5, r6, r7} + ldr r0, [r1, #0x30] + cmp r0, #0 + beq _021E21B0 + ldr r6, [r1, #0x20] + ldr r5, [r1, #0x10] + ldr r4, [r1, #0x1c] + ldr r3, [r1, #0x18] + ldr r2, [r1, #0x14] + ldr r0, [r1, #0x24] + ldr r1, [r1, #0x28] + lsl r5, r5, #0x14 + lsl r7, r1, #8 + lsl r1, r3, #0x18 + lsl r3, r2, #0x1d + mov r2, #2 + lsl r2, r2, #0x1e + orr r3, r2 + lsl r2, r4, #0x19 + orr r2, r3 + orr r1, r2 + lsl r6, r6, #0x10 + orr r1, r5 + orr r1, r6 + orr r1, r7 + orr r1, r0 + ldr r0, _021E21B4 ; =0x04000064 + str r1, [r0, #0] +_021E21B0: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_021E21B4: .word 0x04000064 + thumb_func_end ov5_021E2178 + + thumb_func_start ov5_021E21B8 +ov5_021E21B8: ; 0x021E21B8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0xa + bgt _021E21D6 + bge _021E21EC + cmp r0, #6 + bgt _021E21FC + cmp r0, #2 + blt _021E21FC + beq _021E21DC + cmp r0, #6 + beq _021E21E4 + b _021E21FC +_021E21D6: + cmp r0, #0xe + beq _021E21F4 + b _021E21FC +_021E21DC: + mov r0, #1 + bl sub_020BEA30 + b _021E2202 +_021E21E4: + mov r0, #2 + bl sub_020BEA30 + b _021E2202 +_021E21EC: + mov r0, #4 + bl sub_020BEA30 + b _021E2202 +_021E21F4: + mov r0, #8 + bl sub_020BEA30 + b _021E2202 +_021E21FC: + mov r0, #0 + bl sub_020BEA30 +_021E2202: + ldr r0, [r4, #4] + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + bl sub_020BDE40 + mov r0, #1 + str r0, [r4, #0x30] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E21B8 + + thumb_func_start ov5_021E2218 +ov5_021E2218: ; 0x021E2218 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0xa + bgt _021E2234 + bge _021E2258 + cmp r0, #6 + bgt _021E2272 + cmp r0, #2 + blt _021E2272 + beq _021E223A + cmp r0, #6 + beq _021E224A + b _021E2272 +_021E2234: + cmp r0, #0xe + beq _021E2266 + b _021E2272 +_021E223A: + mov r1, #0x1a + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E2272 +_021E224A: + mov r2, #2 + ldr r1, _021E22A0 ; =0x06820000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E2272 +_021E2258: + mov r2, #2 + ldr r1, _021E22A4 ; =0x06840000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 + b _021E2272 +_021E2266: + mov r2, #2 + ldr r1, _021E22A8 ; =0x06860000 + mov r0, #0 + lsl r2, r2, #0x10 + bl sub_020C4BB8 +_021E2272: + ldr r5, [r4, #0x10] + ldr r1, [r4, #0x1c] + ldr r3, [r4, #0x18] + ldr r6, [r4, #0x14] + ldr r0, [r4, #0xc] + mov r4, #2 + lsl r2, r1, #0x10 + lsl r1, r0, #0x14 + lsl r5, r5, #0x1d + lsl r4, r4, #0x1e + orr r4, r5 + lsl r3, r3, #0x19 + lsl r0, r6, #0x18 + orr r3, r4 + orr r0, r3 + orr r0, r1 + add r1, r2, #0 + orr r1, r0 + mov r0, #0x10 + orr r1, r0 + ldr r0, _021E22AC ; =0x04000064 + str r1, [r0, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E22A0: .word 0x06820000 +_021E22A4: .word 0x06840000 +_021E22A8: .word 0x06860000 +_021E22AC: .word 0x04000064 + thumb_func_end ov5_021E2218 \ No newline at end of file diff --git a/asm/ov5_021E22B0.s b/asm/ov5_021E22B0.s new file mode 100644 index 000000000..495192d0a --- /dev/null +++ b/asm/ov5_021E22B0.s @@ -0,0 +1,81 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E22B0 +ov5_021E22B0: ; 0x021E22B0 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r4, r1, #0 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + bl sub_020BEC9C + mov r0, #4 + add r1, r0, #0 + bl sub_02018144 + add r7, r0, #0 + mov r0, #0 + add r1, r7, #0 + mov r2, #4 + bl sub_020C4B4C + ldr r6, _021E230C ; =0x021F9CE0 + add r3, sp, #0 + mov r2, #5 +_021E22EE: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021E22EE + ldr r0, [r6, #0] + str r0, [r3, #0] + add r0, sp, #0 + str r5, [sp, #0x20] + str r4, [sp, #0x24] + bl ov5_021E2098 + str r0, [r7, #0] + add r0, r7, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E230C: .word 0x021F9CE0 + thumb_func_end ov5_021E22B0 + + thumb_func_start ov5_021E2310 +ov5_021E2310: ; 0x021E2310 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + ldr r0, [r4, #0] + mov r2, #0 + add r3, r1, #0 + bl ov5_021E20E8 + mov r0, #4 + bl sub_020BE004 + mov r0, #0xe + mov r1, #1 + bl sub_0201FF0C + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + pop {r4, pc} + thumb_func_end ov5_021E2310 + + .rodata + + + .global Unk_ov5_021F9CE0 +Unk_ov5_021F9CE0: ; 0x021F9CE0 + .incbin "incbin/overlay5_rodata.bin", 0x13CC, 0x2C + diff --git a/asm/ov5_021E2338.s b/asm/ov5_021E2338.s new file mode 100644 index 000000000..24fddf45d --- /dev/null +++ b/asm/ov5_021E2338.s @@ -0,0 +1,7792 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E2338 +ov5_021E2338: ; 0x021E2338 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #5 + bls _021E234A + b _021E2496 +_021E234A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E2356: ; jump table + .short _021E2362 - _021E2356 - 2 ; case 0 + .short _021E2386 - _021E2356 - 2 ; case 1 + .short _021E23A2 - _021E2356 - 2 ; case 2 + .short _021E23EC - _021E2356 - 2 ; case 3 + .short _021E2444 - _021E2356 - 2 ; case 4 + .short _021E246C - _021E2356 - 2 ; case 5 +_021E2362: + mov r0, #4 + mov r1, #0x20 + bl sub_02018144 + str r0, [r4, #0xc] + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + ldr r5, [r4, #0xc] + bl ov5_021DDF38 + str r0, [r5, #0x1c] + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2386: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E23A2: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021E2496 + mov r1, #0 + str r1, [r4, #4] + ldr r0, [r4, #0] + mov r2, #2 + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, _021E249C ; =0xFFFFD000 + str r1, [sp] + str r0, [sp, #4] + lsl r0, r0, #2 + str r0, [sp, #8] + ldr r1, [r5, #0x1c] + add r0, r4, #0 + mov r3, #7 + bl ov5_021DDF9C + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + str r0, [r5, #0] + bl sub_02020A90 + mov r2, #0x32 + add r1, r0, #0 + mov r0, #6 + lsl r2, r2, #0xc + mov r3, #0x1e + str r0, [sp] + add r0, r5, #4 + add r2, r1, r2 + lsl r3, r3, #0xc + bl ov5_021DDE14 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021E23EC: + add r0, r5, #4 + bl ov5_021DDE74 + add r6, r0, #0 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl sub_02020A50 + cmp r6, #1 + bne _021E2496 + ldr r0, [r4, #0] + mov r2, #2 + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, _021E249C ; =0xFFFFD000 + mov r3, #6 + str r0, [sp] + mov r0, #0xff + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0x1e + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r1, [r5, #0x1c] + add r0, r4, #0 + bl ov5_021DE058 + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + str r0, [r5, #0] + bl sub_02020A90 + mov r2, #0x32 + add r1, r0, #0 + mov r0, #6 + lsl r2, r2, #0xc + str r0, [sp] + ldr r3, _021E24A0 ; =0xFFF01000 + add r0, r5, #4 + sub r2, r1, r2 + bl ov5_021DDE14 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021E2444: + add r0, r5, #4 + bl ov5_021DDE74 + add r6, r0, #0 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl sub_02020A50 + cmp r6, #1 + bne _021E2496 + add r0, r4, #0 + bl ov5_021DDD7C + cmp r0, #1 + bne _021E2496 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E246C: + mov r0, #0 + bl sub_0200F370 + ldr r0, _021E24A4 ; =0x04000010 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E2488 + mov r0, #1 + str r0, [r1, #0] +_021E2488: + ldr r0, [r5, #0x1c] + bl ov5_021DDF74 + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 +_021E2496: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021E249C: .word 0xFFFFD000 +_021E24A0: .word 0xFFF01000 +_021E24A4: .word 0x04000010 + thumb_func_end ov5_021E2338 + + thumb_func_start ov5_021E24A8 +ov5_021E24A8: ; 0x021E24A8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #5 + bls _021E24BA + b _021E2606 +_021E24BA: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E24C6: ; jump table + .short _021E24D2 - _021E24C6 - 2 ; case 0 + .short _021E24F6 - _021E24C6 - 2 ; case 1 + .short _021E2512 - _021E24C6 - 2 ; case 2 + .short _021E255C - _021E24C6 - 2 ; case 3 + .short _021E25B4 - _021E24C6 - 2 ; case 4 + .short _021E25DC - _021E24C6 - 2 ; case 5 +_021E24D2: + mov r0, #4 + mov r1, #0x20 + bl sub_02018144 + str r0, [r4, #0xc] + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + ldr r5, [r4, #0xc] + bl ov5_021DDF38 + str r0, [r5, #0x1c] + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E24F6: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2512: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021E2606 + mov r1, #0 + str r1, [r4, #4] + ldr r0, [r4, #0] + mov r2, #5 + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, _021E260C ; =0xFFFFE000 + str r1, [sp] + str r0, [sp, #4] + ldr r0, _021E2610 ; =0xFFFF4000 + mov r3, #7 + str r0, [sp, #8] + ldr r1, [r5, #0x1c] + add r0, r4, #0 + bl ov5_021DDF9C + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + str r0, [r5, #0] + bl sub_02020A90 + mov r2, #0x32 + add r1, r0, #0 + mov r0, #6 + lsl r2, r2, #0xc + mov r3, #0x1e + str r0, [sp] + add r0, r5, #4 + add r2, r1, r2 + lsl r3, r3, #0xc + bl ov5_021DDE14 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021E255C: + add r0, r5, #4 + bl ov5_021DDE74 + add r6, r0, #0 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl sub_02020A50 + cmp r6, #1 + bne _021E2606 + ldr r0, [r4, #0] + mov r2, #5 + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, _021E260C ; =0xFFFFE000 + mov r3, #6 + str r0, [sp] + mov r0, #0xff + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0x1e + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r1, [r5, #0x1c] + add r0, r4, #0 + bl ov5_021DE058 + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + str r0, [r5, #0] + bl sub_02020A90 + mov r2, #0x1e + add r1, r0, #0 + mov r0, #6 + lsl r2, r2, #0xc + str r0, [sp] + ldr r3, _021E2614 ; =0xFFF9C000 + add r0, r5, #4 + sub r2, r1, r2 + bl ov5_021DDE14 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021E25B4: + add r0, r5, #4 + bl ov5_021DDE74 + add r6, r0, #0 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl sub_02020A50 + cmp r6, #1 + bne _021E2606 + add r0, r4, #0 + bl ov5_021DDD7C + cmp r0, #1 + bne _021E2606 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E25DC: + mov r0, #0 + bl sub_0200F370 + ldr r0, _021E2618 ; =0x04000010 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E25F8 + mov r0, #1 + str r0, [r1, #0] +_021E25F8: + ldr r0, [r5, #0x1c] + bl ov5_021DDF74 + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 +_021E2606: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021E260C: .word 0xFFFFE000 +_021E2610: .word 0xFFFF4000 +_021E2614: .word 0xFFF9C000 +_021E2618: .word 0x04000010 + thumb_func_end ov5_021E24A8 + + thumb_func_start ov5_021E261C +ov5_021E261C: ; 0x021E261C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #6 + bls _021E262E + b _021E2740 +_021E262E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E263A: ; jump table + .short _021E2648 - _021E263A - 2 ; case 0 + .short _021E267A - _021E263A - 2 ; case 1 + .short _021E269A - _021E263A - 2 ; case 2 + .short _021E26D0 - _021E263A - 2 ; case 3 + .short _021E26E2 - _021E263A - 2 ; case 4 + .short _021E2704 - _021E263A - 2 ; case 5 + .short _021E2716 - _021E263A - 2 ; case 6 +_021E2648: + mov r0, #4 + mov r1, #0x10 + bl sub_02018144 + str r0, [r4, #0xc] + mov r2, #0x10 + mov r1, #0 +_021E2656: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021E2656 + ldr r0, [r4, #0xc] + mov r1, #4 + bl ov5_021E28B0 + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E267A: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + add r3, r4, #4 + bl ov5_021DDC44 + mov r0, #0xa + str r0, [r5, #0xc] + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E269A: + ldr r0, [r5, #0xc] + sub r0, r0, #1 + str r0, [r5, #0xc] + bpl _021E2740 + ldr r0, [r4, #0] + mov r3, #0x32 + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0xc + str r0, [r5, #0xc] + lsl r0, r0, #0xc + str r0, [sp] + lsl r3, r3, #4 + str r3, [sp, #4] + ldr r0, _021E2744 ; =0x04000010 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r2, #0xbf + sub r3, #0x76 + bl ov5_021E28E4 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E26D0: + ldr r0, [r5, #0xc] + sub r0, r0, #1 + str r0, [r5, #0xc] + bpl _021E2740 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E26E2: + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x1e + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2704: + bl sub_0200F2AC + cmp r0, #0 + beq _021E2740 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2716: + add r0, r5, #0 + bl ov5_021E28CC + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E2730 + mov r0, #1 + str r0, [r1, #0] +_021E2730: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 +_021E2740: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E2744: .word 0x04000010 + thumb_func_end ov5_021E261C + + thumb_func_start ov5_021E2748 +ov5_021E2748: ; 0x021E2748 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #6 + bls _021E275A + b _021E286E +_021E275A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E2766: ; jump table + .short _021E2774 - _021E2766 - 2 ; case 0 + .short _021E27A6 - _021E2766 - 2 ; case 1 + .short _021E27C6 - _021E2766 - 2 ; case 2 + .short _021E27FE - _021E2766 - 2 ; case 3 + .short _021E2810 - _021E2766 - 2 ; case 4 + .short _021E2832 - _021E2766 - 2 ; case 5 + .short _021E2844 - _021E2766 - 2 ; case 6 +_021E2774: + mov r0, #4 + mov r1, #0x10 + bl sub_02018144 + str r0, [r4, #0xc] + mov r2, #0x10 + mov r1, #0 +_021E2782: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021E2782 + ldr r0, [r4, #0xc] + mov r1, #4 + bl ov5_021E28B0 + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E27A6: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r4, #4 + bl ov5_021DDC44 + mov r0, #0xa + str r0, [r5, #0xc] + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E27C6: + ldr r0, [r5, #0xc] + sub r0, r0, #1 + str r0, [r5, #0xc] + bpl _021E286E + ldr r0, [r4, #0] + mov r3, #0x32 + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0xc + str r0, [r5, #0xc] + mov r0, #0xf + lsl r0, r0, #0xc + str r0, [sp] + lsl r3, r3, #4 + str r3, [sp, #4] + ldr r0, _021E2874 ; =0x04000010 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r2, #0xbf + add r3, #0xdf + bl ov5_021E28E4 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} +_021E27FE: + ldr r0, [r5, #0xc] + sub r0, r0, #1 + str r0, [r5, #0xc] + bpl _021E286E + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2810: + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x1e + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2832: + bl sub_0200F2AC + cmp r0, #0 + beq _021E286E + ldr r0, [r4, #0] + add sp, #0x14 + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2844: + add r0, r5, #0 + bl ov5_021E28CC + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E285E + mov r0, #1 + str r0, [r1, #0] +_021E285E: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 +_021E286E: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_021E2874: .word 0x04000010 + thumb_func_end ov5_021E2748 + + thumb_func_start ov5_021E2878 +ov5_021E2878: ; 0x021E2878 + ldr r3, _021E2884 ; =sub_0200DA04 + mov r2, #1 + add r1, r0, #0 + ldr r0, _021E2888 ; =ov5_021E288C + lsl r2, r2, #0xa + bx r3 + ; .align 2, 0 +_021E2884: .word sub_0200DA04 +_021E2888: .word ov5_021E288C + thumb_func_end ov5_021E2878 + + thumb_func_start ov5_021E288C +ov5_021E288C: ; 0x021E288C + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #8] + cmp r0, #2 + blo _021E28A0 + ldr r0, [r4, #0] + bl sub_02013DA4 + mov r0, #0 + str r0, [r4, #8] +_021E28A0: + ldr r0, [r4, #0] + bl sub_02013DDC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E288C + + thumb_func_start ov5_021E28B0 +ov5_021E28B0: ; 0x021E28B0 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl sub_02013BE0 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + add r0, r4, #0 + bl ov5_021E2878 + str r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E28B0 + + thumb_func_start ov5_021E28CC +ov5_021E28CC: ; 0x021E28CC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_0200DA58 + ldr r0, [r4, #0] + bl sub_02013D38 + ldr r0, [r4, #0] + bl sub_02013D74 + pop {r4, pc} + thumb_func_end ov5_021E28CC + + thumb_func_start ov5_021E28E4 +ov5_021E28E4: ; 0x021E28E4 + push {r4, r5, lr} + sub sp, #0x14 + ldr r4, [sp, #0x20] + add r5, sp, #0x10 + str r4, [sp] + mov r4, #0x14 + ldrsh r4, [r5, r4] + str r4, [sp, #4] + ldr r4, [sp, #0x28] + str r4, [sp, #8] + ldr r4, [sp, #0x2c] + str r4, [sp, #0xc] + ldr r4, [sp, #0x30] + str r4, [sp, #0x10] + ldr r0, [r0, #0] + bl sub_02013C10 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E28E4 + + thumb_func_start ov5_021E290C +ov5_021E290C: ; 0x021E290C + push {r3, r4, r5, r6, r7, lr} + ldr r0, [r0, #0] + add r7, r1, #0 + bl sub_02013D94 + add r5, r0, #0 + mov r6, #0 +_021E291A: + ldr r0, [r5, #0] + add r1, r7, #0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + add r0, r6, #0 + bl sub_020E2178 + mov r1, #1 + tst r0, r1 + bne _021E2932 + lsl r0, r4, #0x10 + b _021E2936 +_021E2932: + neg r0, r4 + lsl r0, r0, #0x10 +_021E2936: + lsr r0, r0, #0x10 + str r0, [r5, #0] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #0xc0 + blt _021E291A + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E290C + + thumb_func_start ov5_021E2944 +ov5_021E2944: ; 0x021E2944 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #5 + bhi _021E2A44 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E2960: ; jump table + .short _021E296C - _021E2960 - 2 ; case 0 + .short _021E298C - _021E2960 - 2 ; case 1 + .short _021E29A8 - _021E2960 - 2 ; case 2 + .short _021E29B6 - _021E2960 - 2 ; case 3 + .short _021E2A00 - _021E2960 - 2 ; case 4 + .short _021E2A20 - _021E2960 - 2 ; case 5 +_021E296C: + mov r0, #4 + mov r1, #0x1c + bl sub_02018144 + str r0, [r4, #0xc] + mov r2, #0x1c + mov r1, #0 +_021E297A: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021E297A + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E298C: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E29A8: + ldr r1, [r4, #4] + cmp r1, #0 + beq _021E2A44 + add r0, r0, #1 + add sp, #0xc + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E29B6: + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #0xc + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0x10 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + str r0, [r5, #0] + bl sub_02020A90 + mov r2, #0x19 + add r1, r0, #0 + mov r0, #0xc + lsl r2, r2, #0x10 + str r0, [sp] + ldr r3, _021E2A48 ; =0xFFFFE000 + add r0, r5, #4 + sub r2, r1, r2 + bl ov5_021DDE14 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2A00: + add r0, r5, #4 + bl ov5_021DDE74 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl sub_02020A50 + bl sub_0200F2AC + cmp r0, #0 + beq _021E2A44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2A20: + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E2A34 + mov r0, #1 + str r0, [r1, #0] +_021E2A34: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 +_021E2A44: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E2A48: .word 0xFFFFE000 + thumb_func_end ov5_021E2944 + + thumb_func_start ov5_021E2A4C +ov5_021E2A4C: ; 0x021E2A4C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #5 + bhi _021E2B4C + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E2A68: ; jump table + .short _021E2A74 - _021E2A68 - 2 ; case 0 + .short _021E2A94 - _021E2A68 - 2 ; case 1 + .short _021E2AB0 - _021E2A68 - 2 ; case 2 + .short _021E2ABE - _021E2A68 - 2 ; case 3 + .short _021E2B08 - _021E2A68 - 2 ; case 4 + .short _021E2B28 - _021E2A68 - 2 ; case 5 +_021E2A74: + mov r0, #4 + mov r1, #0x1c + bl sub_02018144 + str r0, [r4, #0xc] + mov r2, #0x1c + mov r1, #0 +_021E2A82: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021E2A82 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2A94: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2AB0: + ldr r1, [r4, #4] + cmp r1, #0 + beq _021E2B4C + add r0, r0, #1 + add sp, #0xc + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2ABE: + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #0xc + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0x10 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + str r0, [r5, #0] + bl sub_02020A90 + mov r2, #0x32 + add r1, r0, #0 + mov r0, #0xc + lsl r2, r2, #0x10 + str r0, [sp] + ldr r3, _021E2B50 ; =0xFFFFB000 + add r0, r5, #4 + sub r2, r1, r2 + bl ov5_021DDE14 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2B08: + add r0, r5, #4 + bl ov5_021DDE74 + ldr r0, [r5, #4] + ldr r1, [r5, #0] + bl sub_02020A50 + bl sub_0200F2AC + cmp r0, #0 + beq _021E2B4C + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E2B28: + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E2B3C + mov r0, #1 + str r0, [r1, #0] +_021E2B3C: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 +_021E2B4C: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E2B50: .word 0xFFFFB000 + thumb_func_end ov5_021E2A4C + + thumb_func_start ov5_021E2B54 +ov5_021E2B54: ; 0x021E2B54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r7, r1, #0 + str r0, [sp, #0x14] + ldr r0, [r7, #0] + ldr r4, [r7, #0xc] + cmp r0, #7 + bls _021E2B66 + b _021E2E92 +_021E2B66: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E2B72: ; jump table + .short _021E2B82 - _021E2B72 - 2 ; case 0 + .short _021E2C40 - _021E2B72 - 2 ; case 1 + .short _021E2C5A - _021E2B72 - 2 ; case 2 + .short _021E2C66 - _021E2B72 - 2 ; case 3 + .short _021E2CCA - _021E2B72 - 2 ; case 4 + .short _021E2D32 - _021E2B72 - 2 ; case 5 + .short _021E2DBE - _021E2B72 - 2 ; case 6 + .short _021E2E48 - _021E2B72 - 2 ; case 7 +_021E2B82: + mov r1, #0x1e + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x1e + str r0, [r7, #0xc] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r0, [r7, #0x10] + ldr r4, [r7, #0xc] + ldr r1, [r0, #0x24] + mov r0, #7 + lsl r0, r0, #6 + str r1, [r4, r0] + bl ov5_021DDF38 + str r0, [r4, #0x44] + add r0, r4, #0 + add r0, #0x48 + mov r1, #2 + mov r2, #1 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #6 + str r0, [sp, #0xc] + ldr r0, _021E2EA4 ; =0x000927C0 + mov r2, #0x61 + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r7, #0x20] + add r1, #0x48 + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r0, #0 + str r0, [sp, #0x18] + add r6, r0, #0 + add r0, r4, #0 + str r0, [sp, #0x20] + add r0, #0x48 + add r5, r4, #0 + str r0, [sp, #0x20] +_021E2BEC: + mov r0, #0 + str r0, [sp] + mov r1, #0x61 + str r0, [sp, #4] + lsl r1, r1, #2 + mov r2, #2 + mov r3, #6 + ldr r0, [sp, #0x20] + add r1, r4, r1 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov5_021DE62C + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_02021F58 + ldr r0, [sp, #0x18] + add r5, r5, #4 + add r0, r0, #1 + add r6, r6, #2 + str r0, [sp, #0x18] + cmp r0, #2 + blt _021E2BEC + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2C40: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + add r3, r7, #4 + bl ov5_021DDC44 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2C5A: + ldr r1, [r7, #4] + cmp r1, #0 + beq _021E2D28 + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2C66: + mov r0, #0xa + mov r2, #1 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x29 + lsl r2, r2, #0xc + mov r3, #2 + bl ov5_021DDE14 + ldr r1, [r4, #0] + add r0, sp, #0x54 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + mov r6, #0 + add r5, r4, #0 +_021E2C88: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02021CF8 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, sp, #0x54 + bl sub_02021C70 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E2C88 + add r0, r4, #0 + ldr r2, _021E2EA8 ; =0x0000FFFF + add r0, #0x18 + mov r1, #0 + mov r3, #0xa + bl ov5_021DDD80 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2CCA: + add r0, r4, #0 + bl ov5_021DDE74 + ldr r1, [r4, #0] + str r0, [sp, #0x1c] + add r0, sp, #0x54 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDD90 + mov r6, #0 + add r5, r4, #0 +_021E2CEA: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, sp, #0x54 + bl sub_02021C70 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E2CEA + mov r0, #0x6e + ldr r1, [r4, #0x18] + lsl r0, r0, #2 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + mov r1, #0x6f + lsl r1, r1, #2 + ldr r0, [r4, r1] + ldr r2, [r4, #0x18] + sub r1, #0xbc + sub r1, r2, r1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02021C94 + ldr r0, [sp, #0x1c] + cmp r0, #1 + beq _021E2D2A +_021E2D28: + b _021E2E92 +_021E2D2A: + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2D32: + mov r0, #0 + str r0, [sp] + mov r0, #0xff + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0xa + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r1, [r4, #0x44] + add r0, r7, #0 + mov r2, #0x60 + mov r3, #6 + bl ov5_021DDF9C + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021D6C + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021D6C + mov r0, #6 + str r0, [sp] + add r0, r4, #0 + mov r2, #0xff + mov r3, #0xa + add r0, #0x2c + mov r1, #0 + lsl r2, r2, #0xc + lsl r3, r3, #0xc + bl ov5_021DDE14 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02020A90 + add r1, r0, #0 + mov r0, #6 + str r0, [sp] + mov r0, #0x71 + mov r2, #0x7d + lsl r0, r0, #2 + lsl r2, r2, #0xe + ldr r3, _021E2EAC ; =0xFFFF6000 + add r0, r4, r0 + sub r2, r1, r2 + bl ov5_021DDE14 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021C94 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021C94 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2DBE: + add r0, r4, #0 + add r0, #0x2c + bl ov5_021DDE74 + mov r1, #2 + ldr r2, [r4, #0x2c] + lsl r1, r1, #0x12 + sub r1, r1, r2 + mov r2, #6 + add r0, sp, #0x30 + lsl r2, r2, #0x10 + mov r3, #0 + bl ov5_021DE660 + add r3, sp, #0x30 + ldmia r3!, {r0, r1} + add r2, sp, #0x48 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #2 + str r0, [r2, #0] + ldr r2, [r4, #0x2c] + lsl r1, r1, #0x12 + add r1, r2, r1 + mov r2, #6 + add r0, sp, #0x24 + lsl r2, r2, #0x10 + mov r3, #0 + bl ov5_021DE660 + add r3, sp, #0x24 + ldmia r3!, {r0, r1} + add r2, sp, #0x3c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, sp, #0x48 + str r0, [r2, #0] + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021C50 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x3c + bl sub_02021C50 + mov r0, #0x71 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDE74 + mov r1, #0x71 + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02020A50 + add r0, r7, #0 + bl ov5_021DDD7C + cmp r0, #0 + beq _021E2E92 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E2E92 +_021E2E48: + mov r0, #0 + bl sub_0200F370 + ldr r1, [r7, #0x14] + cmp r1, #0 + beq _021E2E58 + mov r0, #1 + str r0, [r1, #0] +_021E2E58: + mov r6, #0 + add r5, r4, #0 +_021E2E5C: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021BD4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E2E5C + mov r1, #0x61 + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x48 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + add r0, #0x48 + bl ov5_021DE4AC + ldr r0, [r4, #0x44] + bl ov5_021DDF74 + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl ov5_021DDC28 +_021E2E92: + ldr r0, [r7, #0] + cmp r0, #7 + beq _021E2E9E + ldr r0, [r4, #0x48] + bl sub_020219F8 +_021E2E9E: + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E2EA4: .word 0x000927C0 +_021E2EA8: .word 0x0000FFFF +_021E2EAC: .word 0xFFFF6000 + thumb_func_end ov5_021E2B54 + + thumb_func_start ov5_021E2EB0 +ov5_021E2EB0: ; 0x021E2EB0 + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + add r6, r1, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0] + ldr r4, [r6, #0xc] + cmp r0, #7 + bhi _021E2FAE + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E2ECC: ; jump table + .short _021E2EDC - _021E2ECC - 2 ; case 0 + .short _021E2F8E - _021E2ECC - 2 ; case 1 + .short _021E2FA8 - _021E2ECC - 2 ; case 2 + .short _021E2FB6 - _021E2ECC - 2 ; case 3 + .short _021E3044 - _021E2ECC - 2 ; case 4 + .short _021E30D4 - _021E2ECC - 2 ; case 5 + .short _021E310E - _021E2ECC - 2 ; case 6 + .short _021E3138 - _021E2ECC - 2 ; case 7 +_021E2EDC: + mov r1, #0x71 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x71 + str r0, [r6, #0xc] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r0, [r6, #0x10] + ldr r4, [r6, #0xc] + ldr r1, [r0, #0x24] + mov r0, #0x69 + lsl r0, r0, #2 + str r1, [r4, r0] + bl ov5_021DE1CC + str r0, [r4, #0x28] + add r0, r4, #0 + add r0, #0x2c + mov r1, #2 + mov r2, #1 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _021E3194 ; =0x000927C0 + mov r2, #0x5a + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r6, #0x20] + add r1, #0x2c + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + add r0, r4, #0 + str r0, [sp, #0x18] + add r0, #0x2c + mov r7, #0 + add r5, r4, #0 + str r0, [sp, #0x18] +_021E2F42: + mov r0, #0 + str r0, [sp] + mov r1, #0x5a + str r0, [sp, #4] + lsl r1, r1, #2 + mov r2, #2 + ldr r0, [sp, #0x18] + add r1, r4, r1 + lsl r2, r2, #0x12 + mov r3, #0 + bl ov5_021DE62C + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02021CF8 + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #2 + blt _021E2F42 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E2F8E: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r6, #4 + bl ov5_021DDC44 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E2FA8: + ldr r1, [r6, #4] + cmp r1, #0 + bne _021E2FB0 +_021E2FAE: + b _021E3182 +_021E2FB0: + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E2FB6: + mov r2, #3 + ldr r1, _021E3198 ; =0xFFF40000 + add r0, r4, #0 + lsl r2, r2, #0x12 + mov r3, #8 + bl ov5_021DDDBC + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r2, #2 + ldr r1, [r4, #0] + lsl r2, r2, #0x12 + sub r1, r2, r1 + add r0, sp, #0x40 + lsr r2, r2, #1 + mov r3, #0 + bl ov5_021DE660 + add r3, sp, #0x40 + ldmia r3!, {r0, r1} + add r2, sp, #0x70 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r3, #0 + str r0, [r2, #0] + mov r2, #2 + ldr r1, [r4, #0] + lsl r2, r2, #0x12 + add r0, sp, #0x34 + add r1, r1, r2 + bl ov5_021DE660 + add r3, sp, #0x34 + ldmia r3!, {r0, r1} + add r2, sp, #0x64 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, sp, #0x70 + str r0, [r2, #0] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021C50 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x64 + bl sub_02021C50 + add r0, r4, #0 + ldr r2, _021E319C ; =0x0001FFFE + add r0, #0x14 + mov r1, #0 + mov r3, #8 + bl ov5_021DDD80 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E3044: + add r0, r4, #0 + bl ov5_021DDDCC + mov r2, #2 + add r5, r0, #0 + ldr r1, [r4, #0] + lsl r2, r2, #0x12 + sub r1, r2, r1 + add r0, sp, #0x28 + lsr r2, r2, #1 + mov r3, #0 + bl ov5_021DE660 + add r3, sp, #0x28 + ldmia r3!, {r0, r1} + add r2, sp, #0x58 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r3, #0 + str r0, [r2, #0] + mov r2, #2 + ldr r1, [r4, #0] + lsl r2, r2, #0x12 + add r0, sp, #0x1c + add r1, r1, r2 + bl ov5_021DE660 + add r3, sp, #0x1c + ldmia r3!, {r0, r1} + add r2, sp, #0x4c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, sp, #0x58 + str r0, [r2, #0] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021C50 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x4c + bl sub_02021C50 + add r0, r4, #0 + add r0, #0x14 + bl ov5_021DDD90 + mov r0, #0x67 + ldr r1, [r4, #0x14] + lsl r0, r0, #2 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + ldr r1, [r4, #0x14] + mov r0, #0x1a + lsl r0, r0, #4 + neg r1, r1 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + cmp r5, #1 + bne _021E3182 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E30D4: + mov r3, #1 + lsl r3, r3, #0xc + str r3, [sp] + ldr r1, [r4, #0x28] + add r0, r6, #0 + mov r2, #8 + bl ov5_021DE240 + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02020A90 + add r1, r0, #0 + mov r0, #8 + str r0, [sp] + mov r0, #0x6a + mov r2, #0x7d + lsl r0, r0, #2 + lsl r2, r2, #0xe + ldr r3, _021E31A0 ; =0xFFFF6000 + add r0, r4, r0 + sub r2, r1, r2 + bl ov5_021DDE14 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E310E: + mov r0, #0x6a + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDE74 + mov r1, #0x6a + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02020A50 + add r0, r6, #0 + bl ov5_021DDD7C + cmp r0, #1 + bne _021E3182 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E3182 +_021E3138: + mov r0, #0 + bl sub_0200F370 + ldr r1, [r6, #0x14] + cmp r1, #0 + beq _021E3148 + mov r0, #1 + str r0, [r1, #0] +_021E3148: + mov r7, #0 + add r5, r4, #0 +_021E314C: + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021BD4 + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #2 + blt _021E314C + mov r1, #0x5a + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x2c + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + add r0, #0x2c + bl ov5_021DE4AC + ldr r0, [r4, #0x28] + bl ov5_021DE218 + ldr r1, [sp, #0x14] + add r0, r6, #0 + bl ov5_021DDC28 +_021E3182: + ldr r0, [r6, #0] + cmp r0, #7 + beq _021E318E + ldr r0, [r4, #0x2c] + bl sub_020219F8 +_021E318E: + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + nop +_021E3194: .word 0x000927C0 +_021E3198: .word 0xFFF40000 +_021E319C: .word 0x0001FFFE +_021E31A0: .word 0xFFFF6000 + thumb_func_end ov5_021E2EB0 + + thumb_func_start ov5_021E31A4 +ov5_021E31A4: ; 0x021E31A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + add r7, r1, #0 + str r0, [sp, #0x14] + ldr r0, [r7, #0] + ldr r4, [r7, #0xc] + cmp r0, #7 + bls _021E31B6 + b _021E3524 +_021E31B6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E31C2: ; jump table + .short _021E31D2 - _021E31C2 - 2 ; case 0 + .short _021E3292 - _021E31C2 - 2 ; case 1 + .short _021E32AC - _021E31C2 - 2 ; case 2 + .short _021E32F2 - _021E31C2 - 2 ; case 3 + .short _021E3358 - _021E31C2 - 2 ; case 4 + .short _021E33E4 - _021E31C2 - 2 ; case 5 + .short _021E3468 - _021E31C2 - 2 ; case 6 + .short _021E34D0 - _021E31C2 - 2 ; case 7 +_021E31D2: + mov r1, #0x7a + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x7a + str r0, [r7, #0xc] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r0, [r7, #0x10] + ldr r4, [r7, #0xc] + ldr r1, [r0, #0x24] + mov r0, #0x72 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + add r0, #0x40 + mov r1, #4 + bl ov5_021E28B0 + mov r0, #0x79 + mov r1, #0xc + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + add r0, #0x50 + mov r1, #2 + mov r2, #1 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #6 + str r0, [sp, #0xc] + ldr r0, _021E3544 ; =0x000927C0 + mov r2, #0x63 + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r7, #0x20] + add r1, #0x50 + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + add r0, r4, #0 + str r0, [sp, #0x1c] + add r0, #0x50 + mov r6, #0 + add r5, r4, #0 + str r0, [sp, #0x1c] +_021E3244: + mov r0, #0 + str r0, [sp] + mov r1, #0x63 + str r0, [sp, #4] + lsl r1, r1, #2 + mov r2, #2 + mov r3, #6 + ldr r0, [sp, #0x1c] + add r1, r4, r1 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov5_021DE62C + mov r1, #7 + lsl r1, r1, #6 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_02021F58 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E3244 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E3292: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + add r3, r7, #4 + bl ov5_021DDC44 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E32AC: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0 + bne _021E32E4 + mov r0, #3 + lsl r0, r0, #0xe + mov r3, #0x32 + str r0, [sp] + lsl r3, r3, #4 + str r3, [sp, #4] + ldr r0, _021E3548 ; =0x04000010 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0x40 + mov r2, #0xbf + sub r3, #0x76 + bl ov5_021E28E4 + mov r0, #1 + str r0, [r4, #0x4c] +_021E32E4: + ldr r0, [r7, #4] + cmp r0, #0 + beq _021E33BE + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E32F2: + add r0, r4, #0 + add r0, #0x18 + mov r1, #0 + mov r2, #0x10 + mov r3, #8 + bl ov5_021DDD80 + ldr r3, [r4, #0x18] + mov r0, #0x10 + sub r0, r0, r3 + str r0, [sp] + ldr r0, _021E354C ; =0x04000050 + mov r1, #0 + mov r2, #0xf + bl sub_020BF55C + mov r6, #0 + add r5, r4, #0 +_021E3316: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02021CF8 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021FE0 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E3316 + add r0, r4, #0 + ldr r2, _021E3550 ; =0x0000FFFF + add r0, #0x2c + mov r1, #0 + mov r3, #8 + bl ov5_021DDD80 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E3358: + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDD90 + add r6, r0, #0 + ldr r1, [r4, #0x18] + mov r0, #0x10 + sub r0, r0, r1 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _021E3554 ; =0x04000052 + strh r1, [r0] + ldr r0, [r4, #0x2c] + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r0, r4, #0 + add r0, #0x2c + bl ov5_021DDD90 + cmp r0, #0 + bne _021E33A2 + mov r0, #7 + ldr r1, [r4, #0x2c] + lsl r0, r0, #6 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + mov r0, #0x71 + lsl r0, r0, #2 + lsl r1, r5, #0x10 + ldr r0, [r4, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + b _021E33BA +_021E33A2: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021C94 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021C94 +_021E33BA: + cmp r6, #1 + beq _021E33C0 +_021E33BE: + b _021E3524 +_021E33C0: + ldr r0, _021E354C ; =0x04000050 + mov r6, #0 + strh r6, [r0] + add r5, r4, #0 +_021E33C8: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021FE0 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E33C8 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E33E4: + mov r1, #8 + str r1, [sp] + ldr r3, _021E3558 ; =0x0000019A + add r0, r4, #0 + lsl r1, r1, #9 + mov r2, #0x29 + bl ov5_021DDE14 + ldr r1, [r4, #0] + add r0, sp, #0x34 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + add r3, sp, #0x34 + add r2, sp, #0x4c + ldmia r3!, {r0, r1} + str r2, [sp, #0x20] + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r6, #0 + str r0, [r2, #0] + add r5, r4, #0 +_021E3412: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + ldr r1, [sp, #0x20] + bl sub_02021C70 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E3412 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02020A90 + add r1, r0, #0 + mov r0, #8 + str r0, [sp] + mov r0, #0x73 + mov r2, #0x7d + lsl r0, r0, #2 + lsl r2, r2, #0xe + ldr r3, _021E355C ; =0xFFFF6000 + add r0, r4, r0 + sub r2, r1, r2 + bl ov5_021DDE14 + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x18 + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E3468: + add r0, r4, #0 + bl ov5_021DDE74 + ldr r1, [r4, #0] + str r0, [sp, #0x18] + add r0, sp, #0x28 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + add r3, sp, #0x28 + add r2, sp, #0x40 + ldmia r3!, {r0, r1} + str r2, [sp, #0x24] + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r6, #0 + str r0, [r2, #0] + add r5, r4, #0 +_021E348E: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + ldr r1, [sp, #0x24] + bl sub_02021C70 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E348E + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDE74 + mov r1, #0x73 + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02020A50 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _021E3524 + bl sub_0200F2AC + cmp r0, #1 + bne _021E3524 + ldr r0, [r7, #0] + add r0, r0, #1 + str r0, [r7, #0] + b _021E3524 +_021E34D0: + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r1, [r7, #0x14] + cmp r1, #0 + beq _021E34E2 + mov r0, #1 + str r0, [r1, #0] +_021E34E2: + add r0, r4, #0 + add r0, #0x40 + bl ov5_021E28CC + mov r6, #0 + str r6, [r4, #0x4c] + add r5, r4, #0 +_021E34F0: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_02021BD4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #2 + blt _021E34F0 + mov r1, #0x63 + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x50 + add r1, r4, r1 + bl ov5_021DE5A4 + add r4, #0x50 + add r0, r4, #0 + bl ov5_021DE4AC + ldr r1, [sp, #0x14] + add r0, r7, #0 + bl ov5_021DDC28 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} +_021E3524: + ldr r0, [r4, #0x4c] + cmp r0, #1 + bne _021E3534 + add r0, r4, #0 + add r0, #0x40 + mov r1, #2 + bl ov5_021E290C +_021E3534: + ldr r0, [r7, #0] + cmp r0, #7 + beq _021E3540 + ldr r0, [r4, #0x50] + bl sub_020219F8 +_021E3540: + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E3544: .word 0x000927C0 +_021E3548: .word 0x04000010 +_021E354C: .word 0x04000050 +_021E3550: .word 0x0000FFFF +_021E3554: .word 0x04000052 +_021E3558: .word 0x0000019A +_021E355C: .word 0xFFFF6000 + thumb_func_end ov5_021E31A4 + + thumb_func_start ov5_021E3560 +ov5_021E3560: ; 0x021E3560 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp, #0x18] + add r0, r1, #0 + ldr r0, [r0, #0] + str r1, [sp, #0x1c] + ldr r4, [r1, #0xc] + cmp r0, #7 + bls _021E3574 + b _021E3A06 +_021E3574: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E3580: ; jump table + .short _021E3590 - _021E3580 - 2 ; case 0 + .short _021E36A8 - _021E3580 - 2 ; case 1 + .short _021E36C8 - _021E3580 - 2 ; case 2 + .short _021E3722 - _021E3580 - 2 ; case 3 + .short _021E37E2 - _021E3580 - 2 ; case 4 + .short _021E3880 - _021E3580 - 2 ; case 5 + .short _021E3930 - _021E3580 - 2 ; case 6 + .short _021E396E - _021E3580 - 2 ; case 7 +_021E3590: + mov r1, #9 + mov r0, #4 + lsl r1, r1, #6 + bl sub_02018144 + ldr r1, [sp, #0x1c] + mov r2, #9 + str r0, [r1, #0xc] + mov r1, #0 + lsl r2, r2, #6 + bl sub_020D5124 + ldr r0, [sp, #0x1c] + ldr r4, [r0, #0xc] + ldr r0, [r0, #0x10] + ldr r1, [r0, #0x24] + mov r0, #0x22 + lsl r0, r0, #4 + str r1, [r4, r0] + sub r0, #0x10 + add r0, r4, r0 + mov r1, #4 + bl ov5_021E28B0 + mov r0, #0x8f + mov r1, #0xe + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #3 + mov r2, #1 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _021E391C ; =0x000927C0 + mov r2, #0x4f + str r0, [sp, #0x10] + ldr r0, [sp, #0x1c] + lsl r2, r2, #2 + ldr r0, [r0, #0x20] + add r1, r4, #0 + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r7, #0x4f + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_021E3600: + mov r0, #0 + str r0, [sp] + mov r2, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r4, r7 + add r3, r2, #0 + bl ov5_021DE62C + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02021CF8 + mov r0, #4 + bl ov5_021DE6A4 + mov r1, #0x7d + lsl r1, r1, #2 + str r0, [r5, r1] + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _021E3600 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201A778 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r0, [sp, #0x1c] + ldr r1, [r4, r1] + ldr r0, [r0, #0x10] + mov r2, #3 + ldr r0, [r0, #8] + bl sub_0201A7E8 + mov r1, #0 + add r0, sp, #0x28 + strh r1, [r0] + mov r0, #3 + add r1, sp, #0x28 + mov r2, #2 + mov r3, #0x1e + bl sub_0201972C + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201A9A4 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [r0, #0] + b _021E3A06 +_021E36A8: + mov r1, #0x10 + ldr r3, [sp, #0x1c] + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r3, #4 + bl ov5_021DDC44 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [r0, #0] + b _021E3A06 +_021E36C8: + mov r3, #0x8f + lsl r3, r3, #2 + ldr r0, [r4, r3] + sub r0, r0, #1 + str r0, [r4, r3] + ldr r0, [r4, r3] + cmp r0, #0 + bne _021E3706 + mov r0, #3 + lsl r0, r0, #0xe + str r0, [sp] + add r0, r3, #0 + add r0, #0xe4 + str r0, [sp, #4] + ldr r0, _021E3920 ; =0x04000010 + mov r1, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #4 + str r0, [sp, #0x10] + add r0, r3, #0 + sub r0, #0x2c + add r0, r4, r0 + mov r2, #0xbf + add r3, #0x6e + bl ov5_021E28E4 + mov r0, #0x87 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] +_021E3706: + ldr r0, [sp, #0x1c] + ldr r0, [r0, #4] + cmp r0, #0 + beq _021E3732 + mov r0, #0x8f + mov r1, #6 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [r0, #0] + b _021E3A06 +_021E3722: + mov r0, #0x8f + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0 + blt _021E3734 +_021E3732: + b _021E3A06 +_021E3734: + sub r0, #0x1c + ldr r0, [r4, r0] + bl sub_02020A90 + add r1, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0x89 + mov r2, #0x7d + lsl r0, r0, #2 + lsl r2, r2, #0xe + ldr r3, _021E3924 ; =0xFFFF6000 + add r0, r4, r0 + sub r2, r1, r2 + bl ov5_021DDE14 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r2, _021E3928 ; =0x0000FFFF + add r0, r4, r0 + mov r1, #0 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #0x5f + lsl r0, r0, #2 + mov r2, #0x1f + add r0, r4, r0 + mov r1, #0xe7 + mvn r2, r2 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #0 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x83 + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r3, #0x40 + str r1, [sp, #8] + mov r1, #0x56 + str r1, [sp, #0xc] + str r3, [sp, #0x10] + mov r1, #0xf + str r1, [sp, #0x14] + sub r0, #0x18 + mov r1, #0x2b + ldr r0, [r4, r0] + add r2, r1, #0 + add r3, #0xf8 + bl ov5_021DE6C4 + mov r1, #0x2b + mov r2, #0xe7 + add r0, sp, #0x38 + lsl r1, r1, #0xc + lsl r2, r2, #0xc + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r1, #1 + lsl r0, r1, #9 + str r1, [r4, r0] + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [r0, #0] + mov r0, #0x8f + mov r1, #4 + lsl r0, r0, #2 + str r1, [r4, r0] + b _021E3A06 +_021E37E2: + mov r0, #0x8f + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0 + bge _021E3890 + sub r0, #0xac + mov r2, #0x1f + add r0, r4, r0 + mov r1, #0xe7 + mvn r2, r2 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r2, _021E392C ; =0xFFFF0001 + add r0, r4, r0 + mov r1, #0 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #0 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x83 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r0, #0x14 + str r1, [sp, #8] + mov r1, #0x56 + str r1, [sp, #0xc] + mov r1, #0x40 + str r1, [sp, #0x10] + mov r1, #0xf + str r1, [sp, #0x14] + mov r1, #0xd7 + add r3, r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + add r3, #0x61 + bl ov5_021DE6C4 + mov r1, #0xd7 + mov r2, #0xe7 + add r0, sp, #0x38 + lsl r1, r1, #0xc + lsl r2, r2, #0xc + mov r3, #1 + bl ov5_021DE660 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r1, #0x81 + mov r0, #1 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp, #0x1c] + add r1, #0x38 + ldr r0, [r0, #0] + add r2, r0, #1 + ldr r0, [sp, #0x1c] + str r2, [r0, #0] + mov r0, #2 + str r0, [r4, r1] + b _021E3A06 +_021E3880: + mov r0, #0x8f + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0 + blt _021E3892 +_021E3890: + b _021E3A06 +_021E3892: + sub r0, #0x98 + mov r2, #0x1f + add r0, r4, r0 + mov r1, #0xe7 + mvn r2, r2 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r2, _021E3928 ; =0x0000FFFF + add r0, r4, r0 + mov r1, #0 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #0 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0x83 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r0, #0x10 + str r1, [sp, #8] + mov r1, #0x56 + str r1, [sp, #0xc] + mov r1, #0x40 + str r1, [sp, #0x10] + mov r1, #0xf + str r1, [sp, #0x14] + mov r1, #0x81 + add r3, r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + add r3, #0xb7 + bl ov5_021DE6C4 + mov r1, #0x81 + mov r2, #0xe7 + add r0, sp, #0x38 + lsl r1, r1, #0xc + lsl r2, r2, #0xc + mov r3, #2 + bl ov5_021DE660 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x82 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [r0, #0] + b _021E3A06 + nop +_021E391C: .word 0x000927C0 +_021E3920: .word 0x04000010 +_021E3924: .word 0xFFFF6000 +_021E3928: .word 0x0000FFFF +_021E392C: .word 0xFFFF0001 +_021E3930: + mov r0, #0x89 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDE74 + mov r1, #0x89 + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02020A50 + mov r1, #2 + lsl r1, r1, #8 + ldr r0, [r4, r1] + cmp r0, #0 + bne _021E3A06 + add r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021E3A06 + add r1, #8 + ldr r0, [r4, r1] + cmp r0, #0 + bne _021E3A06 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x1c] + str r1, [r0, #0] + b _021E3A06 +_021E396E: + mov r0, #0 + bl sub_0200F370 + ldr r0, [sp, #0x1c] + ldr r1, [r0, #0x14] + cmp r1, #0 + beq _021E3980 + mov r0, #1 + str r0, [r1, #0] +_021E3980: + mov r0, #0x21 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov5_021E28CC + mov r0, #0x87 + lsl r0, r0, #2 + mov r6, #0 + add r7, r0, #0 + str r6, [r4, r0] + add r5, r4, #0 + sub r7, #0x28 +_021E3998: + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021BD4 + ldr r0, [r5, r7] + bl ov5_021DE6BC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _021E3998 + mov r1, #0x4f + lsl r1, r1, #2 + add r0, r4, #0 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + bl ov5_021DE4AC + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201ACF4 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201A8FC + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0201A928 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + ldr r0, [sp, #0x1c] + mov r1, #3 + ldr r0, [r0, #0x10] + ldr r0, [r0, #8] + bl sub_02019EBC + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x18] + bl ov5_021DDC28 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} +_021E3A06: + mov r0, #0x87 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #1 + bne _021E3A1A + sub r0, #0xc + add r0, r4, r0 + mov r1, #2 + bl ov5_021E290C +_021E3A1A: + mov r1, #0x5f + mov r0, #0 + lsl r1, r1, #2 + str r0, [sp, #0x20] + add r0, r4, r1 + add r1, #0x3c + add r5, r4, #0 + str r0, [sp, #0x24] + add r7, r4, r1 + add r6, r4, #0 +_021E3A2E: + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r5, r0] + cmp r0, #1 + bne _021E3A9C + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov5_021DE71C + cmp r0, #0 + beq _021E3A4E + mov r0, #2 + mov r1, #0 + lsl r0, r0, #8 + str r1, [r5, r0] +_021E3A4E: + ldr r0, [sp, #0x24] + bl ov5_021DDD90 + add r0, r7, #0 + bl ov5_021DDD90 + mov r1, #0x6e + lsl r1, r1, #2 + mov r0, #0x17 + ldr r1, [r6, r1] + lsl r0, r0, #4 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021D28 + add r3, r0, #0 + add r2, sp, #0x2c + ldmia r3!, {r0, r1} + mov ip, r2 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, ip + str r0, [r2, #0] + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r6, r0] + lsl r0, r0, #0xc + str r0, [sp, #0x30] + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021C50 +_021E3A9C: + ldr r0, [sp, #0x24] + add r5, r5, #4 + add r0, #0x14 + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + add r7, #0x14 + add r0, r0, #1 + add r6, #0x14 + str r0, [sp, #0x20] + cmp r0, #3 + blt _021E3A2E + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201A9A4 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + cmp r0, #7 + beq _021E3ACA + ldr r0, [r4, #0] + bl sub_020219F8 +_021E3ACA: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E3560 + + thumb_func_start ov5_021E3AD0 +ov5_021E3AD0: ; 0x021E3AD0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + ldr r4, [r5, #0xc] + cmp r0, #7 + bhi _021E3BA8 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E3AEC: ; jump table + .short _021E3AFC - _021E3AEC - 2 ; case 0 + .short _021E3B88 - _021E3AEC - 2 ; case 1 + .short _021E3BA2 - _021E3AEC - 2 ; case 2 + .short _021E3BB0 - _021E3AEC - 2 ; case 3 + .short _021E3C26 - _021E3AEC - 2 ; case 4 + .short _021E3CB2 - _021E3AEC - 2 ; case 5 + .short _021E3D00 - _021E3AEC - 2 ; case 6 + .short _021E3D28 - _021E3AEC - 2 ; case 7 +_021E3AFC: + mov r1, #0x1f + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x1f + str r0, [r5, #0xc] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r0, [r5, #0x10] + ldr r4, [r5, #0xc] + ldr r1, [r0, #0x24] + mov r0, #0x1d + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #1 + add r0, #0x5c + add r2, r1, #0 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _021E3D7C ; =0x000927C0 + mov r2, #0x66 + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r5, #0x20] + add r1, #0x5c + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r0, #0 + str r0, [sp] + mov r1, #0x66 + str r0, [sp, #4] + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #2 + ldr r3, _021E3D80 ; =0xFFFE0000 + add r0, #0x5c + add r1, r4, r1 + lsl r2, r2, #0x12 + bl ov5_021DE62C + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3B88: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + sub r1, #0x11 + add r2, r1, #0 + add r3, r5, #4 + bl ov5_021DDC44 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3BA2: + ldr r1, [r5, #4] + cmp r1, #0 + bne _021E3BAA +_021E3BA8: + b _021E3D6C +_021E3BAA: + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3BB0: + mov r2, #1 + mov r0, #0xc + lsl r2, r2, #0x14 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + lsr r3, r2, #7 + bl ov5_021DDE14 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0xc + str r0, [sp] + add r0, r4, #0 + mov r2, #2 + ldr r1, _021E3D84 ; =0x0000019A + add r0, #0x18 + lsl r2, r2, #0xc + mov r3, #0 + bl ov5_021DDE14 + mov r0, #0xc + str r0, [sp] + add r0, r4, #0 + mov r2, #2 + ldr r1, _021E3D84 ; =0x0000019A + add r0, #0x30 + lsl r2, r2, #0xc + mov r3, #0 + bl ov5_021DDE14 + ldr r1, [r4, #0x18] + ldr r2, [r4, #0x30] + add r0, sp, #0x2c + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x2c + mov r2, #2 + bl sub_02021C80 + add r0, r4, #0 + ldr r2, _021E3D88 ; =0x0000FFFF + add r0, #0x48 + mov r1, #0 + mov r3, #0xc + bl ov5_021DDD80 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3C26: + add r0, r4, #0 + bl ov5_021DDE74 + mov r1, #2 + lsl r1, r1, #0x12 + add r6, r0, #0 + ldr r3, [r4, #0] + lsr r2, r1, #2 + sub r2, r3, r2 + add r0, sp, #0x14 + mov r3, #0 + bl ov5_021DE660 + add r3, sp, #0x14 + add r2, sp, #0x20 + ldmia r3!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r7, #0 + str r0, [r2, #0] + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021C50 + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDE74 + add r0, r4, #0 + add r0, #0x30 + bl ov5_021DDE74 + ldr r1, [r4, #0x18] + ldr r2, [r4, #0x30] + add r0, sp, #0x2c + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x2c + bl sub_02021C70 + add r0, r4, #0 + add r0, #0x48 + bl ov5_021DDD90 + mov r0, #0x73 + ldr r1, [r4, #0x48] + lsl r0, r0, #2 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + cmp r6, #1 + bne _021E3D6C + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3CB2: + ldr r0, [r5, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #0x1d + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02020A90 + add r1, r0, #0 + mov r0, #8 + str r0, [sp] + mov r0, #0x75 + mov r2, #0xfa + lsl r0, r0, #2 + lsl r2, r2, #0xe + mov r3, #0xa + add r0, r4, r0 + sub r2, r1, r2 + lsl r3, r3, #0xc + bl ov5_021DDE14 + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x12 + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3D00: + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDE74 + mov r1, #0x75 + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02020A50 + bl sub_0200F2AC + cmp r0, #0 + beq _021E3D6C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E3D6C +_021E3D28: + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r0, [r5, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r5, #0x14] + cmp r1, #0 + beq _021E3D44 + mov r0, #1 + str r0, [r1, #0] +_021E3D44: + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021BD4 + mov r1, #0x66 + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x5c + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + add r0, #0x5c + bl ov5_021DE4AC + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021DDC28 +_021E3D6C: + ldr r0, [r5, #0] + cmp r0, #7 + beq _021E3D78 + ldr r0, [r4, #0x5c] + bl sub_020219F8 +_021E3D78: + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E3D7C: .word 0x000927C0 +_021E3D80: .word 0xFFFE0000 +_021E3D84: .word 0x0000019A +_021E3D88: .word 0x0000FFFF + thumb_func_end ov5_021E3AD0 + + thumb_func_start ov5_021E3D8C +ov5_021E3D8C: ; 0x021E3D8C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp, #0x14] + add r0, r1, #0 + ldr r0, [r0, #0] + str r1, [sp, #0x18] + ldr r4, [r1, #0xc] + cmp r0, #9 + bls _021E3DA0 + b _021E41BC +_021E3DA0: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E3DAC: ; jump table + .short _021E3DC0 - _021E3DAC - 2 ; case 0 + .short _021E3EBC - _021E3DAC - 2 ; case 1 + .short _021E3EDC - _021E3DAC - 2 ; case 2 + .short _021E3EF4 - _021E3DAC - 2 ; case 3 + .short _021E3F70 - _021E3DAC - 2 ; case 4 + .short _021E3FEC - _021E3DAC - 2 ; case 5 + .short _021E4062 - _021E3DAC - 2 ; case 6 + .short _021E40A2 - _021E3DAC - 2 ; case 7 + .short _021E40E8 - _021E3DAC - 2 ; case 8 + .short _021E4138 - _021E3DAC - 2 ; case 9 +_021E3DC0: + mov r1, #0x8a + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + ldr r1, [sp, #0x18] + mov r2, #0x8a + str r0, [r1, #0xc] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r0, [sp, #0x18] + mov r2, #1 + ldr r4, [r0, #0xc] + ldr r0, [r0, #0x10] + ldr r1, [r0, #0x24] + mov r0, #0x82 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #3 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _021E4128 ; =0x000927C0 + mov r2, #0x4f + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + lsl r2, r2, #2 + ldr r0, [r0, #0x20] + add r1, r4, #0 + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r7, #0x4f + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_021E3E1E: + mov r0, #0 + mov r2, #0 + str r0, [sp] + add r3, r2, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r4, r7 + sub r3, #0x20 + bl ov5_021DE62C + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _021E3E1E + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201A778 + mov r1, #2 + lsl r1, r1, #8 + str r0, [r4, r1] + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r0, [sp, #0x18] + ldr r1, [r4, r1] + ldr r0, [r0, #0x10] + mov r2, #3 + ldr r0, [r0, #8] + bl sub_0201A7E8 + mov r1, #0 + add r0, sp, #0x28 + strh r1, [r0] + mov r0, #3 + add r1, sp, #0x28 + mov r2, #2 + mov r3, #0x1e + bl sub_0201972C + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + bl sub_0201A9A4 + mov r0, #4 + bl ov5_021DE8F8 + mov r1, #0x81 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E41BC +_021E3EBC: + mov r1, #0x10 + ldr r3, [sp, #0x18] + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r3, #4 + bl ov5_021DDC44 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E41BC +_021E3EDC: + ldr r1, [sp, #0x18] + ldr r1, [r1, #4] + cmp r1, #0 + beq _021E3F04 + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + mov r0, #0x89 + mov r1, #0 + lsl r0, r0, #2 + strh r1, [r4, r0] + b _021E41BC +_021E3EF4: + mov r0, #0x89 + lsl r0, r0, #2 + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, r0] + ldrsh r1, [r4, r0] + cmp r1, #0 + ble _021E3F06 +_021E3F04: + b _021E41BC +_021E3F06: + sub r0, #0xa8 + mov r1, #0x1f + add r0, r4, r0 + mvn r1, r1 + mov r2, #0xe0 + mov r3, #5 + bl ov5_021DDD80 + mov r1, #2 + ldr r2, _021E412C ; =0xFFFE0000 + add r0, sp, #0x38 + lsl r1, r1, #0x12 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x6e + lsl r0, r0, #2 + ldr r2, _021E4130 ; =0x0000FFFF + add r0, r4, r0 + mov r1, #0 + mov r3, #5 + bl ov5_021DDD80 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021CF8 + mov r1, #0x7d + mov r3, #1 + lsl r1, r1, #2 + str r3, [r4, r1] + ldr r0, [sp, #0x18] + add r1, #0x30 + ldr r0, [r0, #0] + add r2, r0, #1 + ldr r0, [sp, #0x18] + str r2, [r0, #0] + strh r3, [r4, r1] + b _021E41BC +_021E3F70: + mov r0, #0x89 + lsl r0, r0, #2 + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, r0] + ldrsh r1, [r4, r0] + cmp r1, #0 + bgt _021E407C + sub r0, #0x94 + mov r1, #0x1f + add r0, r4, r0 + mvn r1, r1 + mov r2, #0xe0 + mov r3, #5 + bl ov5_021DDD80 + mov r1, #0xd + ldr r2, _021E412C ; =0xFFFE0000 + add r0, sp, #0x38 + lsl r1, r1, #0x10 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x73 + lsl r0, r0, #2 + ldr r2, _021E4134 ; =0xFFFF0001 + add r0, r4, r0 + mov r1, #0 + mov r3, #5 + bl ov5_021DDD80 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021CF8 + mov r1, #0x7e + mov r0, #1 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp, #0x18] + add r1, #0x2c + ldr r0, [r0, #0] + add r2, r0, #1 + ldr r0, [sp, #0x18] + str r2, [r0, #0] + mov r0, #3 + strh r0, [r4, r1] + b _021E41BC +_021E3FEC: + mov r0, #0x89 + lsl r0, r0, #2 + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, r0] + ldrsh r1, [r4, r0] + cmp r1, #0 + bgt _021E407C + sub r0, #0x80 + mov r1, #0x1f + add r0, r4, r0 + mvn r1, r1 + mov r2, #0xe0 + mov r3, #5 + bl ov5_021DDD80 + mov r1, #3 + ldr r2, _021E412C ; =0xFFFE0000 + add r0, sp, #0x38 + lsl r1, r1, #0x10 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x1e + lsl r0, r0, #4 + ldr r2, _021E4130 ; =0x0000FFFF + add r0, r4, r0 + mov r1, #0 + mov r3, #5 + bl ov5_021DDD80 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021CF8 + mov r0, #0x7f + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E41BC +_021E4062: + mov r1, #0x7d + lsl r1, r1, #2 + ldr r0, [r4, r1] + cmp r0, #0 + bne _021E407C + add r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _021E407C + add r1, #8 + ldr r0, [r4, r1] + cmp r0, #0 + beq _021E407E +_021E407C: + b _021E41BC +_021E407E: + mov r7, #0x17 + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #4 +_021E4086: + ldr r0, [r5, r7] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _021E4086 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E41BC +_021E40A2: + mov r0, #0xf + mov r1, #1 + str r0, [sp] + mov r0, #0x81 + lsl r0, r0, #2 + lsl r3, r1, #9 + ldr r0, [r4, r0] + ldr r3, [r4, r3] + add r2, r1, #0 + bl ov5_021DE948 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02020A90 + add r1, r0, #0 + mov r0, #0x40 + str r0, [sp] + mov r0, #0x83 + mov r2, #0xfa + lsl r0, r0, #2 + lsl r2, r2, #0xe + mov r3, #0xa + add r0, r4, r0 + sub r2, r1, r2 + lsl r3, r3, #0xc + bl ov5_021DDE14 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E41BC +_021E40E8: + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov5_021DE988 + add r5, r0, #0 + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + bl sub_0201A9A4 + mov r0, #0x83 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDE74 + mov r1, #0x83 + lsl r1, r1, #2 + ldr r0, [r4, r1] + sub r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02020A50 + cmp r5, #1 + bne _021E41BC + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E41BC + nop +_021E4128: .word 0x000927C0 +_021E412C: .word 0xFFFE0000 +_021E4130: .word 0x0000FFFF +_021E4134: .word 0xFFFF0001 +_021E4138: + mov r0, #0 + bl sub_0200F370 + ldr r0, [sp, #0x18] + ldr r1, [r0, #0x14] + cmp r1, #0 + beq _021E414A + mov r0, #1 + str r0, [r1, #0] +_021E414A: + mov r7, #0x17 + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #4 +_021E4152: + ldr r0, [r5, r7] + bl sub_02021BD4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #3 + blt _021E4152 + mov r1, #0x4f + lsl r1, r1, #2 + add r0, r4, #0 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + bl ov5_021DE4AC + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov5_021DE928 + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + bl sub_0201ACF4 + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + bl sub_0201A8FC + mov r0, #2 + lsl r0, r0, #8 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0201A928 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + ldr r0, [sp, #0x18] + mov r1, #3 + ldr r0, [r0, #0x10] + ldr r0, [r0, #8] + bl sub_02019EBC + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + bl ov5_021DDC28 +_021E41BC: + mov r1, #0x5f + mov r0, #0 + lsl r1, r1, #2 + str r0, [sp, #0x1c] + add r0, r4, r1 + add r1, #0x3c + add r5, r4, #0 + str r0, [sp, #0x20] + add r7, r4, r1 + add r6, r4, #0 +_021E41D0: + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _021E4238 + ldr r0, [sp, #0x20] + bl ov5_021DDD90 + str r0, [sp, #0x24] + add r0, r7, #0 + bl ov5_021DDD90 + ldr r0, [sp, #0x24] + cmp r0, #0 + beq _021E41F6 + mov r0, #0x7d + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_021E41F6: + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021D28 + add r3, r0, #0 + add r2, sp, #0x2c + ldmia r3!, {r0, r1} + mov ip, r2 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, ip + str r0, [r2, #0] + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r6, r0] + lsl r0, r0, #0xc + str r0, [sp, #0x30] + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021C50 + mov r1, #0x6e + lsl r1, r1, #2 + mov r0, #0x17 + ldr r1, [r6, r1] + lsl r0, r0, #4 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 +_021E4238: + ldr r0, [sp, #0x20] + add r5, r5, #4 + add r0, #0x14 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r7, #0x14 + add r0, r0, #1 + add r6, #0x14 + str r0, [sp, #0x1c] + cmp r0, #3 + blt _021E41D0 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + cmp r0, #9 + beq _021E425C + ldr r0, [r4, #0] + bl sub_020219F8 +_021E425C: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021E3D8C + + thumb_func_start ov5_021E4260 +ov5_021E4260: ; 0x021E4260 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #7 + bls _021E4272 + b _021E44A0 +_021E4272: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E427E: ; jump table + .short _021E428E - _021E427E - 2 ; case 0 + .short _021E431E - _021E427E - 2 ; case 1 + .short _021E4338 - _021E427E - 2 ; case 2 + .short _021E4344 - _021E427E - 2 ; case 3 + .short _021E4376 - _021E427E - 2 ; case 4 + .short _021E43A8 - _021E427E - 2 ; case 5 + .short _021E4418 - _021E427E - 2 ; case 6 + .short _021E445C - _021E427E - 2 ; case 7 +_021E428E: + mov r1, #0x69 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x69 + str r0, [r4, #0xc] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r5, [r4, #0xc] + mov r1, #1 + add r0, r5, #0 + add r0, #0x2c + add r2, r1, #0 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #7 + str r0, [sp, #8] + mov r0, #6 + str r0, [sp, #0xc] + ldr r0, _021E44B0 ; =0x000927C0 + mov r2, #0x5a + str r0, [sp, #0x10] + add r1, r5, #0 + lsl r2, r2, #2 + ldr r0, [r4, #0x20] + add r1, #0x2c + add r2, r5, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r0, #0 + str r0, [sp] + mov r1, #0x5a + str r0, [sp, #4] + add r0, r5, #0 + lsl r1, r1, #2 + mov r2, #2 + mov r3, #6 + add r0, #0x2c + add r1, r5, r1 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov5_021DE62C + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021FE0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E431E: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E4338: + ldr r1, [r4, #4] + cmp r1, #0 + beq _021E438E + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E4344: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x10 + mov r3, #0xc + bl ov5_021DDD80 + ldr r3, [r5, #0] + mov r0, #0x10 + sub r0, r0, r3 + str r0, [sp] + ldr r0, _021E44B4 ; =0x04000050 + mov r1, #0 + mov r2, #0xf + bl sub_020BF55C + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E4376: + add r0, r5, #0 + bl ov5_021DDD90 + ldr r2, [r5, #0] + mov r1, #0x10 + sub r1, r1, r2 + lsl r1, r1, #8 + orr r1, r2 + ldr r2, _021E44B8 ; =0x04000052 + cmp r0, #1 + strh r1, [r2] + beq _021E4390 +_021E438E: + b _021E44A0 +_021E4390: + mov r1, #0 + sub r0, r2, #2 + strh r1, [r0] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021FE0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E43A8: + mov r0, #6 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + ldr r2, _021E44BC ; =0x0000019A + add r0, #0x14 + lsl r1, r1, #0xc + mov r3, #1 + bl ov5_021DDE14 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02021CF8 + ldr r1, [r5, #0x14] + add r0, sp, #0x20 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + add r6, sp, #0x20 + add r3, sp, #0x38 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021C70 + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x10 + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E4418: + add r0, r5, #0 + add r0, #0x14 + bl ov5_021DDE74 + ldr r1, [r5, #0x14] + add r6, r0, #0 + add r0, sp, #0x14 + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + add r3, sp, #0x14 + add r2, sp, #0x2c + ldmia r3!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r7, #0 + str r0, [r2, #0] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021C70 + cmp r6, #1 + bne _021E44A0 + bl sub_0200F2AC + cmp r0, #1 + bne _021E44A0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021E44A0 +_021E445C: + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r0, [r4, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E4478 + mov r0, #1 + str r0, [r1, #0] +_021E4478: + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021BD4 + mov r1, #0x5a + add r0, r5, #0 + lsl r1, r1, #2 + add r0, #0x2c + add r1, r5, r1 + bl ov5_021DE5A4 + add r0, r5, #0 + add r0, #0x2c + bl ov5_021DE4AC + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 +_021E44A0: + ldr r0, [r4, #0] + cmp r0, #7 + beq _021E44AC + ldr r0, [r5, #0x2c] + bl sub_020219F8 +_021E44AC: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E44B0: .word 0x000927C0 +_021E44B4: .word 0x04000050 +_021E44B8: .word 0x04000052 +_021E44BC: .word 0x0000019A + thumb_func_end ov5_021E4260 + + thumb_func_start ov5_021E44C0 +ov5_021E44C0: ; 0x021E44C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r6, r1, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0] + ldr r4, [r6, #0xc] + cmp r0, #7 + bhi _021E4598 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E44DC: ; jump table + .short _021E44EC - _021E44DC - 2 ; case 0 + .short _021E4578 - _021E44DC - 2 ; case 1 + .short _021E4592 - _021E44DC - 2 ; case 2 + .short _021E45A0 - _021E44DC - 2 ; case 3 + .short _021E45EA - _021E44DC - 2 ; case 4 + .short _021E469C - _021E44DC - 2 ; case 5 + .short _021E46C6 - _021E44DC - 2 ; case 6 + .short _021E46D6 - _021E44DC - 2 ; case 7 +_021E44EC: + mov r1, #0x1b + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x1b + str r0, [r6, #0xc] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r4, [r6, #0xc] + mov r1, #4 + add r0, r4, #0 + mov r2, #1 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _021E4734 ; =0x000927C0 + mov r2, #0x4f + str r0, [sp, #0x10] + lsl r2, r2, #2 + ldr r0, [r6, #0x20] + add r1, r4, #0 + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r7, #0 + add r5, r4, #0 +_021E4536: + mov r0, #0 + mov r1, #0x4f + str r0, [sp] + lsl r1, r1, #2 + mov r2, #2 + mov r3, #6 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r4, r1 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov5_021DE62C + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #4 + blt _021E4536 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E4578: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r6, #4 + bl ov5_021DDC44 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E4592: + ldr r1, [r6, #4] + cmp r1, #0 + bne _021E459A +_021E4598: + b _021E4722 +_021E459A: + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E45A0: + mov r3, #6 + mov r2, #4 + lsl r3, r3, #6 + str r2, [sp] + add r0, r4, r3 + mov r1, #0 + lsl r2, r2, #0x11 + add r3, #0x1a + bl ov5_021DDE14 + mov r3, #0x66 + mov r0, #4 + mov r2, #0xa + lsl r3, r3, #2 + str r0, [sp] + add r0, r4, r3 + mov r1, #0 + lsl r2, r2, #0x10 + add r3, r3, #2 + bl ov5_021DDE14 + mov r7, #0 + add r5, r4, #0 +_021E45CE: + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #4 + blt _021E45CE + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E45EA: + mov r0, #6 + lsl r0, r0, #6 + mov r7, #0 + add r5, r4, r0 +_021E45F2: + add r0, r5, #0 + bl ov5_021DDE74 + add r7, r7, #1 + add r5, #0x18 + str r0, [sp, #0x18] + cmp r7, #2 + blt _021E45F2 + mov r2, #6 + lsl r2, r2, #6 + ldr r3, [r4, r2] + mov r1, #2 + lsl r2, r2, #0xa + sub r2, r2, r3 + add r0, sp, #0x1c + lsl r1, r1, #0x12 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x1c + bl sub_02021C50 + mov r2, #6 + lsl r2, r2, #6 + ldr r3, [r4, r2] + mov r1, #2 + lsl r2, r2, #0xa + add r2, r3, r2 + add r0, sp, #0x1c + lsl r1, r1, #0x12 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x1c + bl sub_02021C50 + mov r1, #0x66 + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r1, #2 + lsl r1, r1, #0x12 + sub r1, r1, r2 + mov r2, #6 + add r0, sp, #0x1c + lsl r2, r2, #0x10 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x1c + bl sub_02021C50 + mov r1, #0x66 + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r1, #2 + lsl r1, r1, #0x12 + add r1, r2, r1 + mov r2, #6 + add r0, sp, #0x1c + lsl r2, r2, #0x10 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x1c + bl sub_02021C50 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _021E4722 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E469C: + ldr r0, [r6, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x22 + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E46C6: + bl sub_0200F2AC + cmp r0, #1 + bne _021E4722 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E4722 +_021E46D6: + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r0, [r6, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r1, [r6, #0x14] + cmp r1, #0 + beq _021E46F2 + mov r0, #1 + str r0, [r1, #0] +_021E46F2: + mov r7, #0 + add r5, r4, #0 +_021E46F6: + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021BD4 + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #4 + blt _021E46F6 + mov r1, #0x4f + lsl r1, r1, #2 + add r0, r4, #0 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + bl ov5_021DE4AC + ldr r1, [sp, #0x14] + add r0, r6, #0 + bl ov5_021DDC28 +_021E4722: + ldr r0, [r6, #0] + cmp r0, #7 + beq _021E472E + ldr r0, [r4, #0] + bl sub_020219F8 +_021E472E: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E4734: .word 0x000927C0 + thumb_func_end ov5_021E44C0 + + thumb_func_start ov5_021E4738 +ov5_021E4738: ; 0x021E4738 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + str r0, [sp, #0x14] + add r0, r1, #0 + ldr r0, [r0, #0] + str r1, [sp, #0x18] + ldr r4, [r1, #0xc] + cmp r0, #7 + bls _021E474C + b _021E4A4C +_021E474C: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E4758: ; jump table + .short _021E4768 - _021E4758 - 2 ; case 0 + .short _021E47FA - _021E4758 - 2 ; case 1 + .short _021E481A - _021E4758 - 2 ; case 2 + .short _021E483E - _021E4758 - 2 ; case 3 + .short _021E497C - _021E4758 - 2 ; case 4 + .short _021E498E - _021E4758 - 2 ; case 5 + .short _021E49BE - _021E4758 - 2 ; case 6 + .short _021E49FC - _021E4758 - 2 ; case 7 +_021E4768: + mov r1, #0x3d + mov r0, #4 + lsl r1, r1, #4 + bl sub_02018144 + ldr r1, [sp, #0x18] + mov r2, #0x3d + str r0, [r1, #0xc] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r0, [sp, #0x18] + mov r1, #6 + ldr r4, [r0, #0xc] + mov r2, #1 + add r0, r4, #0 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _021E49D4 ; =0x000927C0 + mov r2, #0x4f + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + lsl r2, r2, #2 + ldr r0, [r0, #0x20] + add r1, r4, #0 + add r2, r4, r2 + mov r3, #0 + bl ov5_021DE4CC + mov r7, #0x4f + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_021E47BC: + mov r0, #0 + str r0, [sp] + mov r2, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r4, r7 + add r3, r2, #0 + bl ov5_021DE62C + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #6 + blt _021E47BC + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E4A4C +_021E47FA: + mov r0, #2 + str r0, [sp] + mov r0, #1 + add r1, r0, #0 + ldr r3, [sp, #0x18] + sub r1, #0x11 + add r2, r1, #0 + add r3, r3, #4 + bl ov5_021DDC44 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E4A4C +_021E481A: + ldr r1, [sp, #0x18] + ldr r1, [r1, #4] + cmp r1, #0 + beq _021E484E + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + mov r0, #0xf2 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r1, [r4, r0] + add r0, r0, #4 + lsl r2, r1, #5 + ldr r1, _021E49D8 ; =0x021F9EAC + ldr r1, [r1, r2] + str r1, [r4, r0] + b _021E4A4C +_021E483E: + mov r0, #0xf3 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0 + blt _021E4850 +_021E484E: + b _021E4A4C +_021E4850: + sub r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #8 + str r1, [sp] + mov r1, #0x86 + lsl r1, r1, #2 + add r2, r4, r1 + mov r1, #0x18 + mul r1, r0 + lsl r3, r0, #5 + add r0, r2, r1 + ldr r1, _021E49DC ; =0x021F9E94 + ldr r2, _021E49E0 ; =0x021F9E98 + ldr r5, _021E49E4 ; =0x021F9E9C + ldr r1, [r1, r3] + ldr r2, [r2, r3] + ldr r3, [r5, r3] + bl ov5_021DDE14 + mov r0, #0xf2 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #8 + str r1, [sp] + mov r1, #0xaa + lsl r1, r1, #2 + add r2, r4, r1 + mov r1, #0x18 + mul r1, r0 + lsl r3, r0, #5 + add r0, r2, r1 + ldr r1, _021E49E8 ; =0x021F9EA0 + ldr r2, _021E49EC ; =0x021F9EA4 + ldr r5, _021E49F0 ; =0x021F9EA8 + ldr r1, [r1, r3] + ldr r2, [r2, r3] + ldr r3, [r5, r3] + bl ov5_021DDE14 + mov r0, #0x62 + lsl r0, r0, #2 + mov r1, #8 + add r3, r4, r0 + mov r0, #0xf2 + str r1, [sp] + lsl r0, r0, #2 + ldr r2, [r4, r0] + mov r0, #0x18 + mul r0, r2 + add r0, r3, r0 + ldr r3, _021E49F4 ; =0xFFFFF99A + lsl r1, r1, #0xa + mov r2, #0x29 + bl ov5_021DDE14 + mov r0, #0xf2 + lsl r0, r0, #2 + ldr r2, [r4, r0] + sub r0, #0x90 + add r1, r4, r0 + mov r0, #0x14 + mul r0, r2 + lsl r3, r2, #5 + ldr r2, _021E49F8 ; =0x021F9EB0 + add r0, r1, r0 + ldr r2, [r2, r3] + mov r1, #0 + mov r3, #8 + bl ov5_021DDD80 + mov r0, #0xf2 + lsl r0, r0, #2 + ldr r0, [r4, r0] + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0xf2 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, _021E49DC ; =0x021F9E94 + lsl r3, r0, #5 + ldr r2, _021E49E8 ; =0x021F9EA0 + ldr r1, [r1, r3] + ldr r2, [r2, r3] + add r0, sp, #0x40 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0xf2 + lsl r0, r0, #2 + ldr r0, [r4, r0] + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #0x40 + bl sub_02021C50 + mov r1, #2 + lsl r1, r1, #0xc + add r0, sp, #0x34 + add r2, r1, #0 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0xf2 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #2 + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, sp, #0x34 + bl sub_02021C80 + mov r1, #0xf2 + lsl r1, r1, #2 + ldr r0, [r4, r1] + mov r3, #1 + lsl r0, r0, #2 + add r2, r4, r0 + add r0, r1, #0 + sub r0, #0x18 + str r3, [r2, r0] + ldr r0, [r4, r1] + add r0, r0, #1 + str r0, [r4, r1] + ldr r0, [r4, r1] + cmp r0, #6 + blt _021E4970 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E4A4C +_021E4970: + lsl r2, r0, #5 + ldr r0, _021E49D8 ; =0x021F9EAC + ldr r2, [r0, r2] + add r0, r1, #4 + str r2, [r4, r0] + b _021E4A4C +_021E497C: + mov r1, #0xf1 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + bne _021E4A4C + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E4A4C +_021E498E: + ldr r0, [sp, #0x18] + ldr r0, [r0, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3FC + mov r0, #0xc + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r2, #0 + str r0, [sp, #8] + mov r0, #3 + mov r1, #0x22 + add r3, r2, #0 + bl sub_0200F174 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E4A4C +_021E49BE: + bl sub_0200F2AC + cmp r0, #0 + beq _021E4A4C + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [r0, #0] + b _021E4A4C + nop +_021E49D4: .word 0x000927C0 +_021E49D8: .word 0x021F9EAC +_021E49DC: .word 0x021F9E94 +_021E49E0: .word 0x021F9E98 +_021E49E4: .word 0x021F9E9C +_021E49E8: .word 0x021F9EA0 +_021E49EC: .word 0x021F9EA4 +_021E49F0: .word 0x021F9EA8 +_021E49F4: .word 0xFFFFF99A +_021E49F8: .word 0x021F9EB0 +_021E49FC: + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0x10] + ldr r0, [r0, #4] + ldr r0, [r0, #0x1c] + bl ov5_021EF3DC + ldr r0, [sp, #0x18] + ldr r1, [r0, #0x14] + cmp r1, #0 + beq _021E4A1C + mov r0, #1 + str r0, [r1, #0] +_021E4A1C: + mov r7, #0x17 + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #4 +_021E4A24: + ldr r0, [r5, r7] + bl sub_02021BD4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #6 + blt _021E4A24 + mov r1, #0x4f + lsl r1, r1, #2 + add r0, r4, #0 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + bl ov5_021DE4AC + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + bl ov5_021DDC28 +_021E4A4C: + mov r1, #0x86 + mov r0, #0 + lsl r1, r1, #2 + str r0, [sp, #0x1c] + add r0, r4, r1 + str r0, [sp, #0x2c] + add r0, r1, #0 + add r0, #0x90 + add r0, r4, r0 + sub r1, #0x90 + str r0, [sp, #0x28] + add r0, r4, r1 + str r0, [sp, #0x24] + mov r0, #0xce + lsl r0, r0, #2 + add r0, r4, r0 + add r5, r4, #0 + str r0, [sp, #0x20] + add r6, r4, #0 + add r7, r4, #0 +_021E4A74: + mov r0, #0x3b + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #1 + bne _021E4B00 + ldr r0, [sp, #0x2c] + bl ov5_021DDE74 + str r0, [sp, #0x30] + ldr r0, [sp, #0x28] + bl ov5_021DDE74 + ldr r0, [sp, #0x24] + bl ov5_021DDE74 + ldr r0, [sp, #0x20] + bl ov5_021DDD90 + ldr r0, [sp, #0x30] + cmp r0, #0 + beq _021E4AB0 + mov r0, #0x3b + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02021CAC +_021E4AB0: + mov r1, #0x86 + mov r2, #0xaa + lsl r1, r1, #2 + lsl r2, r2, #2 + ldr r1, [r6, r1] + ldr r2, [r6, r2] + add r0, sp, #0x40 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, sp, #0x40 + bl sub_02021C50 + mov r0, #0x62 + lsl r0, r0, #2 + ldr r1, [r6, r0] + add r0, sp, #0x34 + add r2, r1, #0 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, sp, #0x34 + bl sub_02021C70 + mov r1, #0xce + lsl r1, r1, #2 + mov r0, #0x17 + ldr r1, [r7, r1] + lsl r0, r0, #4 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 +_021E4B00: + ldr r0, [sp, #0x2c] + add r5, r5, #4 + add r0, #0x18 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + add r6, #0x18 + add r0, #0x18 + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + add r7, #0x14 + add r0, #0x18 + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + add r0, #0x14 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #6 + blt _021E4A74 + ldr r0, [sp, #0x18] + ldr r0, [r0, #0] + cmp r0, #7 + beq _021E4B36 + ldr r0, [r4, #0] + bl sub_020219F8 +_021E4B36: + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E4738 + + thumb_func_start ov5_021E4B3C +ov5_021E4B3C: ; 0x021E4B3C + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + ldr r4, [r5, #0xc] + cmp r0, #7 + bls _021E4B4E + b _021E4DC0 +_021E4B4E: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E4B5A: ; jump table + .short _021E4B6A - _021E4B5A - 2 ; case 0 + .short _021E4C50 - _021E4B5A - 2 ; case 1 + .short _021E4C6A - _021E4B5A - 2 ; case 2 + .short _021E4C78 - _021E4B5A - 2 ; case 3 + .short _021E4CB2 - _021E4B5A - 2 ; case 4 + .short _021E4CF0 - _021E4B5A - 2 ; case 5 + .short _021E4D22 - _021E4B5A - 2 ; case 6 + .short _021E4D52 - _021E4B5A - 2 ; case 7 +_021E4B6A: + mov r1, #0x6f + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x6f + str r0, [r5, #0xc] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r4, [r5, #0xc] + mov r1, #1 + add r0, r4, #0 + add r0, #8 + add r2, r1, #0 + bl ov5_021DE47C + mov r3, #1 + mov r2, #0x51 + add r1, r4, #0 + lsl r2, r2, #2 + str r3, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #9 + str r0, [sp, #0xc] + ldr r0, _021E4DD0 ; =0x000927C0 + add r1, #8 + str r0, [sp, #0x10] + ldr r0, [r5, #0x20] + add r2, r4, r2 + bl ov5_021DE4CC + mov r0, #0 + str r0, [sp] + mov r1, #0x51 + str r0, [sp, #4] + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #2 + mov r3, #6 + add r0, #8 + add r1, r4, r1 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov5_021DE62C + mov r1, #0x5e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021FE0 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021E80 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + bl ov5_021DEBEC + str r0, [r4, #4] + mov r0, #4 + mov r1, #1 + bl sub_0201A778 + str r0, [r4, #0] + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + str r3, [sp, #0xc] + str r3, [sp, #0x10] + ldr r0, [r5, #0x10] + ldr r1, [r4, #0] + ldr r0, [r0, #8] + mov r2, #3 + bl sub_0201A7E8 + mov r1, #0 + add r0, sp, #0x14 + strh r1, [r0] + mov r0, #3 + add r1, sp, #0x14 + mov r2, #2 + mov r3, #0x1e + bl sub_0201972C + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r4, #0] + bl sub_0201A9A4 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E4DC0 +_021E4C50: + mov r1, #0x10 + mov r0, #2 + add r2, r1, #0 + str r0, [sp] + mov r0, #1 + sub r2, #0x20 + add r3, r5, #4 + bl ov5_021DDC44 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E4DC0 +_021E4C6A: + ldr r1, [r5, #4] + cmp r1, #0 + bne _021E4C72 + b _021E4DC0 +_021E4C72: + add r0, r0, #1 + str r0, [r5, #0] + b _021E4DC0 +_021E4C78: + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #0 + mov r2, #0x10 + mov r3, #0xf + bl ov5_021DDD80 + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x19 + lsl r0, r0, #4 + ldr r3, [r4, r0] + mov r0, #0x10 + sub r0, r0, r3 + str r0, [sp] + ldr r0, _021E4DD4 ; =0x04000050 + mov r1, #0 + mov r2, #0xf + bl sub_020BF55C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E4DC0 +_021E4CB2: + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov5_021DDD90 + mov r2, #0x19 + lsl r2, r2, #4 + ldr r1, [r4, r2] + mov r3, #0x10 + sub r3, r3, r1 + lsl r3, r3, #8 + orr r1, r3 + ldr r3, _021E4DD8 ; =0x04000052 + cmp r0, #1 + strh r1, [r3] + bne _021E4DC0 + mov r1, #0 + sub r0, r3, #2 + sub r2, #0x18 + strh r1, [r0] + ldr r0, [r4, r2] + bl sub_02021FE0 + ldr r0, [r5, #0] + mov r1, #0x10 + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0x6e + lsl r0, r0, #2 + str r1, [r4, r0] + b _021E4DC0 +_021E4CF0: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0 + bgt _021E4DC0 + sub r0, #0x3c + add r0, r4, r0 + mov r1, #0 + mov r2, #0xe + mov r3, #0x10 + bl ov5_021DDD80 + ldr r0, [r4, #4] + ldr r2, [r4, #0] + mov r1, #0x10 + mov r3, #0xf + bl ov5_021DEC38 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E4DC0 +_021E4D22: + mov r0, #0x5f + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021DDD90 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r1, [r4, r0] + lsl r0, r1, #4 + orr r1, r0 + ldr r0, _021E4DDC ; =0x0400004D + strb r1, [r0] + ldr r0, [r4, #4] + bl ov5_021DECB8 + cmp r0, #0 + beq _021E4D4A + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] +_021E4D4A: + ldr r0, [r4, #0] + bl sub_0201A9A4 + b _021E4DC0 +_021E4D52: + mov r0, #0 + bl sub_0200F370 + ldr r0, [r4, #4] + bl ov5_021DEC18 + ldr r1, [r5, #0x14] + cmp r1, #0 + beq _021E4D68 + mov r0, #1 + str r0, [r1, #0] +_021E4D68: + mov r0, #0x5e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021BD4 + mov r1, #0x51 + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #8 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + add r0, #8 + bl ov5_021DE4AC + ldr r0, [r4, #0] + bl sub_0201ACF4 + ldr r0, [r4, #0] + bl sub_0201A8FC + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0201A928 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + ldr r0, [r5, #0x10] + mov r1, #3 + ldr r0, [r0, #8] + bl sub_02019EBC + ldr r0, _021E4DDC ; =0x0400004D + mov r1, #0 + strb r1, [r0] + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021DDC28 +_021E4DC0: + ldr r0, [r5, #0] + cmp r0, #7 + beq _021E4DCC + ldr r0, [r4, #8] + bl sub_020219F8 +_021E4DCC: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E4DD0: .word 0x000927C0 +_021E4DD4: .word 0x04000050 +_021E4DD8: .word 0x04000052 +_021E4DDC: .word 0x0400004D + thumb_func_end ov5_021E4B3C + + thumb_func_start ov5_021E4DE0 +ov5_021E4DE0: ; 0x021E4DE0 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #8] + ldr r1, [r5, #0x24] + bl sub_02020910 + ldr r0, [r4, #0] + ldr r1, [r5, #0x24] + bl sub_02020A50 + ldrh r1, [r4, #4] + add r0, sp, #0 + strh r1, [r0] + ldrh r1, [r4, #6] + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + ldr r1, [r5, #0x24] + add r0, sp, #0 + bl sub_020209D4 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E4DE0 + + thumb_func_start ov5_021E4E14 +ov5_021E4E14: ; 0x021E4E14 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #7 + bls _021E4E26 + b _021E4F66 +_021E4E26: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E4E32: ; jump table + .short _021E4E42 - _021E4E32 - 2 ; case 0 + .short _021E4E7A - _021E4E32 - 2 ; case 1 + .short _021E4E92 - _021E4E32 - 2 ; case 2 + .short _021E4EA0 - _021E4E32 - 2 ; case 3 + .short _021E4EC4 - _021E4E32 - 2 ; case 4 + .short _021E4F00 - _021E4E32 - 2 ; case 5 + .short _021E4F22 - _021E4E32 - 2 ; case 6 + .short _021E4F38 - _021E4E32 - 2 ; case 7 +_021E4E42: + mov r0, #4 + mov r1, #0x10 + bl sub_02018144 + str r0, [r4, #0xc] + mov r2, #0x10 + mov r1, #0 +_021E4E50: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _021E4E50 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4E7A: + mov r0, #1 + mov r1, #0x10 + str r0, [sp] + add r2, r1, #0 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4E92: + ldr r1, [r4, #4] + cmp r1, #0 + beq _021E4F66 + add r0, r0, #1 + add sp, #0xc + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4EA0: + mov r0, #3 + mov r1, #0xf + bl ov5_021E22B0 + mov r2, #0 + str r0, [r5, #0] + mov r0, #0xc + add r1, r2, #0 + mul r1, r0 + ldr r0, _021E4F6C ; =0x021F9DDE + str r2, [r5, #8] + ldrh r0, [r0, r1] + add sp, #0xc + str r0, [r5, #0xc] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4EC4: + ldr r0, [r5, #0xc] + sub r0, r0, #1 + str r0, [r5, #0xc] + bpl _021E4F66 + ldr r2, [r5, #8] + mov r1, #0xc + ldr r3, _021E4F70 ; =0x021F9DD4 + mul r1, r2 + ldr r0, [r4, #0x10] + add r1, r3, r1 + bl ov5_021E4DE0 + ldr r0, [r5, #8] + add r2, r0, #1 + str r2, [r5, #8] + cmp r2, #0x10 + blo _021E4EF0 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4EF0: + mov r0, #0xc + add r1, r2, #0 + mul r1, r0 + ldr r0, _021E4F6C ; =0x021F9DDE + add sp, #0xc + ldrh r0, [r0, r1] + str r0, [r5, #0xc] + pop {r3, r4, r5, r6, pc} +_021E4F00: + mov r0, #0xa + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0 + str r0, [sp, #8] + ldr r3, _021E4F74 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4F22: + bl sub_0200F2AC + cmp r0, #0 + beq _021E4F66 + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4F38: + ldr r1, _021E4F74 ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 + add r0, r5, #0 + bl ov5_021E2310 + ldr r0, _021E4F78 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E4F56 + mov r0, #1 + str r0, [r1, #0] +_021E4F56: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 + ldr r1, _021E4F74 ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 +_021E4F66: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021E4F6C: .word 0x021F9DDE +_021E4F70: .word 0x021F9DD4 +_021E4F74: .word 0x00007FFF +_021E4F78: .word 0x04000050 + thumb_func_end ov5_021E4E14 + + thumb_func_start ov5_021E4F7C +ov5_021E4F7C: ; 0x021E4F7C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #9 + bhi _021E4FFE + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E4F98: ; jump table + .short _021E4FAC - _021E4F98 - 2 ; case 0 + .short _021E4FE0 - _021E4F98 - 2 ; case 1 + .short _021E4FF8 - _021E4F98 - 2 ; case 2 + .short _021E5008 - _021E4F98 - 2 ; case 3 + .short _021E5036 - _021E4F98 - 2 ; case 4 + .short _021E5060 - _021E4F98 - 2 ; case 5 + .short _021E508E - _021E4F98 - 2 ; case 6 + .short _021E50B0 - _021E4F98 - 2 ; case 7 + .short _021E50D2 - _021E4F98 - 2 ; case 8 + .short _021E50E8 - _021E4F98 - 2 ; case 9 +_021E4FAC: + mov r0, #4 + mov r1, #0x38 + bl sub_02018144 + mov r1, #0 + mov r2, #0x38 + str r0, [r4, #0xc] + bl sub_020D5124 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4FE0: + mov r0, #1 + mov r1, #0x10 + str r0, [sp] + add r2, r1, #0 + add r3, r4, #4 + bl ov5_021DDC44 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E4FF8: + ldr r1, [r4, #4] + cmp r1, #0 + bne _021E5000 +_021E4FFE: + b _021E5116 +_021E5000: + add r0, r0, #1 + add sp, #0xc + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E5008: + mov r0, #5 + mov r1, #0xd + bl ov5_021E22B0 + str r0, [r5, #0] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + bl sub_02020A88 + mov r2, #1 + add r1, r0, #0 + add r5, #8 + lsl r2, r2, #8 + add r0, r5, #0 + add r2, r1, r2 + mov r3, #0x28 + bl ov5_021DDD80 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E5036: + add r0, r5, #0 + add r0, #8 + bl ov5_021DDD90 + add r6, r0, #0 + ldr r0, [r5, #8] + ldr r1, [r4, #0x10] + lsl r0, r0, #0x10 + ldr r1, [r1, #0x24] + lsr r0, r0, #0x10 + bl sub_02020910 + cmp r6, #1 + bne _021E5116 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #5 + str r0, [r5, #0x34] + pop {r3, r4, r5, r6, pc} +_021E5060: + ldr r0, [r5, #0x34] + sub r0, r0, #1 + str r0, [r5, #0x34] + bpl _021E5116 + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x24] + bl sub_02020A90 + mov r3, #8 + str r3, [sp] + ldr r2, _021E511C ; =0x0092E000 + add r1, r0, #0 + add r5, #0x1c + add r0, r5, #0 + sub r2, r1, r2 + lsl r3, r3, #8 + bl ov5_021DDE14 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E508E: + add r0, r5, #0 + add r0, #0x1c + bl ov5_021DDE74 + ldr r1, [r4, #0x10] + add r6, r0, #0 + ldr r0, [r5, #0x1c] + ldr r1, [r1, #0x24] + bl sub_02020A50 + cmp r6, #1 + bne _021E5116 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E50B0: + mov r0, #0x3c + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0 + str r0, [sp, #8] + ldr r3, _021E5120 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E50D2: + bl sub_0200F2AC + cmp r0, #0 + beq _021E5116 + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #0] + add sp, #0xc + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021E50E8: + ldr r1, _021E5120 ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 + add r0, r5, #0 + bl ov5_021E2310 + ldr r0, _021E5124 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021E5106 + mov r0, #1 + str r0, [r1, #0] +_021E5106: + add r0, r4, #0 + add r1, r6, #0 + bl ov5_021DDC28 + ldr r1, _021E5120 ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 +_021E5116: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021E511C: .word 0x0092E000 +_021E5120: .word 0x00007FFF +_021E5124: .word 0x04000050 + thumb_func_end ov5_021E4F7C + + thumb_func_start ov5_021E5128 +ov5_021E5128: ; 0x021E5128 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r6, #0 + strh r6, [r5] + add r4, r5, #0 + ldr r7, [sp, #0x28] + str r1, [sp, #8] + str r2, [sp, #0xc] + str r3, [sp, #0x10] + strh r6, [r5, #2] + add r4, #0x14 +_021E5140: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r3, r7, #0 + bl ov5_021DE62C + mov r1, #0 + str r0, [r5, #4] + bl sub_02021CAC + cmp r6, #3 + beq _021E517E + ldr r0, [r5, #4] + mov r1, #2 + bl sub_02021CF8 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021D6C + mov r1, #2 + lsl r1, r1, #0xc + add r0, r4, #0 + lsr r2, r1, #1 + mov r3, #6 + bl ov5_021DDDBC + b _021E518C +_021E517E: + mov r1, #1 + lsl r1, r1, #0xc + add r0, r4, #0 + add r2, r1, #0 + mov r3, #6 + bl ov5_021DDDBC +_021E518C: + add r6, r6, #1 + add r5, r5, #4 + add r4, #0x14 + cmp r6, #4 + blt _021E5140 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E5128 + + thumb_func_start ov5_021E519C +ov5_021E519C: ; 0x021E519C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021E51A2: + ldr r0, [r5, #4] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021E51A2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E519C + + thumb_func_start ov5_021E51B4 +ov5_021E51B4: ; 0x021E51B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + mov r0, #1 + mov r1, #2 + str r0, [sp] + ldrsh r0, [r7, r1] + cmp r0, #4 + bge _021E51E2 + mov r0, #0 + str r0, [sp] + ldrsh r0, [r7, r0] + sub r0, r0, #1 + strh r0, [r7] + ldr r0, [sp] + ldrsh r0, [r7, r0] + cmp r0, #0 + bgt _021E51E2 + mov r0, #3 + strh r0, [r7] + ldrsh r0, [r7, r1] + add r0, r0, #1 + strh r0, [r7, #2] +_021E51E2: + mov r0, #0 + str r0, [sp, #4] + mov r0, #2 + ldrsh r0, [r7, r0] + cmp r0, #0 + ble _021E523A + add r6, r7, #0 + add r6, #0x14 + add r4, r7, #0 + add r5, r7, #0 +_021E51F6: + add r0, r6, #0 + bl ov5_021DDDCC + ldr r1, [r4, #0x14] + str r0, [sp, #8] + add r0, sp, #0xc + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DE660 + ldr r0, [r5, #4] + add r1, sp, #0xc + bl sub_02021C70 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021CAC + ldr r0, [sp, #8] + cmp r0, #0 + bne _021E5224 + mov r0, #0 + str r0, [sp] +_021E5224: + ldr r0, [sp, #4] + add r6, #0x14 + add r0, r0, #1 + str r0, [sp, #4] + mov r0, #2 + ldrsh r1, [r7, r0] + ldr r0, [sp, #4] + add r4, #0x14 + add r5, r5, #4 + cmp r0, r1 + blt _021E51F6 +_021E523A: + ldr r0, [sp] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E51B4 + + thumb_func_start ov5_021E5240 +ov5_021E5240: ; 0x021E5240 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + str r0, [sp] + ldr r2, _021E52A4 ; =0x00000167 + mov r0, #1 + mov r1, #0x1a + add r3, r5, #0 + bl sub_0200B144 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0200B358 + add r4, r0, #0 + mov r0, #0x80 + add r1, r5, #0 + bl sub_02023790 + add r7, r0, #0 + mov r0, #0x80 + add r1, r5, #0 + bl sub_02023790 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_0200B1B8 + ldr r2, [sp] + add r0, r4, #0 + mov r1, #0 + bl sub_0200BA08 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_0200B190 + add r0, r4, #0 + bl sub_0200B3F0 + add r0, r5, #0 + bl sub_020237BC + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E52A4: .word 0x00000167 + thumb_func_end ov5_021E5240 + + thumb_func_start ov5_021E52A8 +ov5_021E52A8: ; 0x021E52A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r7, r1, #0 + ldr r1, [r5, #0] + add r6, r2, #0 + ldr r4, [r5, #0xc] + cmp r1, #0xf + bls _021E52BC + b _021E5718 +_021E52BC: + add r2, r1, r1 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021E52C8: ; jump table + .short _021E52E8 - _021E52C8 - 2 ; case 0 + .short _021E5434 - _021E52C8 - 2 ; case 1 + .short _021E544A - _021E52C8 - 2 ; case 2 + .short _021E5456 - _021E52C8 - 2 ; case 3 + .short _021E54A4 - _021E52C8 - 2 ; case 4 + .short _021E54C4 - _021E52C8 - 2 ; case 5 + .short _021E54F2 - _021E52C8 - 2 ; case 6 + .short _021E553E - _021E52C8 - 2 ; case 7 + .short _021E556C - _021E52C8 - 2 ; case 8 + .short _021E558A - _021E52C8 - 2 ; case 9 + .short _021E55FE - _021E52C8 - 2 ; case 10 + .short _021E5614 - _021E52C8 - 2 ; case 11 + .short _021E563A - _021E52C8 - 2 ; case 12 + .short _021E5652 - _021E52C8 - 2 ; case 13 + .short _021E5672 - _021E52C8 - 2 ; case 14 + .short _021E5682 - _021E52C8 - 2 ; case 15 +_021E52E8: + mov r1, #0xa6 + add r0, r7, #0 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0xa6 + str r0, [r5, #0xc] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + ldr r4, [r5, #0xc] + mov r0, #0x20 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [r5, #0x20] + mov r1, #0xb + mov r2, #0 + mov r3, #0x40 + bl sub_02007130 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0xa + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r1, #0x9f + lsl r1, r1, #2 + str r2, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x10] + add r1, r4, r1 + ldr r0, [r0, #8] + mov r3, #0 + bl sub_0201A7E8 + mov r0, #0x9f + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r6, #4] + add r1, r7, #0 + bl ov5_021E5240 + mov r1, #0 + str r0, [sp, #0x14] + str r1, [sp] + ldr r0, _021E5688 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0x9f + lsl r0, r0, #2 + ldr r2, [sp, #0x14] + add r0, r4, r0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r4, #0 + add r0, #0x44 + mov r1, #8 + mov r2, #3 + bl ov5_021DE47C + mov r0, #1 + str r0, [sp] + ldrb r0, [r6, #0xd] + mov r2, #6 + add r1, r4, #0 + str r0, [sp, #4] + ldrb r0, [r6, #0xe] + lsl r2, r2, #6 + add r1, #0x44 + str r0, [sp, #8] + ldrb r0, [r6, #0xf] + add r2, r4, r2 + str r0, [sp, #0xc] + ldr r0, _021E568C ; =0x000927C0 + str r0, [sp, #0x10] + ldrb r3, [r6, #0xc] + ldr r0, [r5, #0x20] + bl ov5_021DE4CC + mov r0, #1 + str r0, [sp] + mov r0, #0x34 + str r0, [sp, #4] + mov r0, #0x35 + str r0, [sp, #8] + mov r0, #0x36 + str r0, [sp, #0xc] + ldr r0, _021E5690 ; =0x000927C1 + mov r2, #0x6d + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r5, #0x20] + add r1, #0x44 + add r2, r4, r2 + mov r3, #0x33 + bl ov5_021DE4CC + mov r0, #0 + str r0, [sp] + mov r1, #6 + str r0, [sp, #4] + add r0, r4, #0 + lsl r1, r1, #6 + mov r2, #0x11 + mov r3, #0x42 + add r0, #0x44 + add r1, r4, r1 + lsl r2, r2, #0x10 + lsl r3, r3, #0xc + bl ov5_021DE62C + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x4a + mov r2, #0x7b + lsl r0, r0, #0xc + str r0, [sp] + lsl r2, r2, #2 + add r0, r4, r2 + add r1, r4, #0 + sub r2, #0x38 + mov r3, #0x12 + add r1, #0x44 + add r2, r4, r2 + lsl r3, r3, #0xe + str r7, [sp, #4] + bl ov5_021E5128 + mov r0, #0 + str r0, [sp] + mov r0, #0x7a + lsl r0, r0, #2 + ldrh r2, [r6, #8] + ldr r0, [r4, r0] + add r1, r7, #0 + mov r3, #0xe + bl ov5_021DE5D0 + bl ov5_021DECEC + str r0, [r4, #0x40] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E5434: + mov r0, #1 + mov r1, #0x10 + str r0, [sp] + add r2, r1, #0 + add r3, r5, #4 + bl ov5_021DDC44 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E544A: + ldr r0, [r5, #4] + cmp r0, #0 + beq _021E54AC + add r0, r1, #1 + str r0, [r5, #0] + b _021E5718 +_021E5456: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x10] + ldr r0, [r0, #8] + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldrb r1, [r6, #0x12] + ldrb r2, [r6, #0x11] + ldrb r3, [r6, #0x10] + ldr r0, [r5, #0x20] + bl ov5_021DE3D0 + mov r0, #0xa3 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #0x10 + str r0, [sp] + mov r0, #0x1f + str r0, [sp, #4] + mov r0, #0x17 + str r0, [sp, #8] + ldr r1, [r4, #0x40] + add r0, r5, #0 + mov r2, #6 + mov r3, #8 + bl ov5_021DED20 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E54A4: + bl ov5_021DDD7C + cmp r0, #0 + bne _021E54AE +_021E54AC: + b _021E5718 +_021E54AE: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + ldr r0, [r4, #0x40] + bl ov5_021DED04 + mov r0, #0xa5 + mov r1, #0xa + lsl r0, r0, #2 + str r1, [r4, r0] + b _021E5718 +_021E54C4: + mov r0, #0xa5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0 + bge _021E55B2 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x7b + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021E51B4 + cmp r0, #1 + bne _021E55B2 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E54F2: + mov r0, #4 + str r0, [sp] + mov r1, #0x11 + ldr r2, [r6, #0] + ldr r3, _021E5694 ; =0xFFFC0000 + add r0, r4, #0 + lsl r1, r1, #0x10 + bl ov5_021DDE14 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021E80 + mov r2, #0x42 + ldr r1, [r4, #0] + add r0, sp, #0x1c + lsl r2, r2, #0xc + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x1c + bl sub_02021C50 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E553E: + add r0, r4, #0 + bl ov5_021DDE74 + mov r2, #0x42 + add r6, r0, #0 + ldr r1, [r4, #0] + add r0, sp, #0x1c + lsl r2, r2, #0xc + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x1c + bl sub_02021C50 + cmp r6, #1 + bne _021E55B2 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E556C: + add r0, r4, #0 + add r0, #0x18 + mov r1, #0 + mov r2, #0x10 + mov r3, #3 + bl ov5_021DDD80 + mov r0, #0xa5 + mov r1, #0xa + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E558A: + mov r0, #0xa5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0 + bge _021E55B2 + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDD90 + str r0, [sp, #0x18] + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DEF8C + ldr r0, [sp, #0x18] + cmp r0, #1 + beq _021E55B4 +_021E55B2: + b _021E5718 +_021E55B4: + mov r3, #0 + str r3, [sp] + mov r0, #0x7a + lsl r0, r0, #2 + ldrh r2, [r6, #8] + ldr r0, [r4, r0] + add r1, r7, #0 + bl ov5_021DE5D0 + mov r0, #0xd + mvn r0, r0 + mov r1, #0x21 + mov r2, #1 + bl sub_0200AB4C + ldr r3, [r4, #0] + ldr r0, [r5, #0x10] + asr r3, r3, #0xc + sub r3, #0x5c + ldr r0, [r0, #8] + mov r1, #2 + mov r2, #0 + neg r3, r3 + bl sub_0201C63C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_02019060 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E55FE: + add r0, r4, #0 + add r0, #0x18 + mov r1, #0x10 + mov r2, #0 + mov r3, #3 + bl ov5_021DDD80 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E5614: + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDD90 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DEF8C + cmp r6, #1 + bne _021E5718 + ldr r0, [r5, #0] + mov r1, #0x1a + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0xa5 + lsl r0, r0, #2 + str r1, [r4, r0] + b _021E5718 +_021E563A: + mov r0, #0xa5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0 + bge _021E5718 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E5652: + mov r0, #0xf + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0 + str r0, [sp, #8] + ldr r3, _021E5698 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E5672: + bl sub_0200F2AC + cmp r0, #0 + beq _021E5718 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021E5718 +_021E5682: + ldr r1, _021E5698 ; =0x00007FFF + b _021E569C + nop +_021E5688: .word 0x00010200 +_021E568C: .word 0x000927C0 +_021E5690: .word 0x000927C1 +_021E5694: .word 0xFFFC0000 +_021E5698: .word 0x00007FFF +_021E569C: + mov r0, #1 + bl sub_0200F344 + ldr r1, [r5, #0x14] + cmp r1, #0 + beq _021E56AC + mov r0, #1 + str r0, [r1, #0] +_021E56AC: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021BD4 + mov r0, #0x7b + lsl r0, r0, #2 + add r0, r4, r0 + bl ov5_021E519C + mov r1, #6 + add r0, r4, #0 + lsl r1, r1, #6 + add r0, #0x44 + add r1, r4, r1 + bl ov5_021DE5A4 + mov r1, #0x6d + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #0x44 + add r1, r4, r1 + bl ov5_021DE5A4 + add r0, r4, #0 + add r0, #0x44 + bl ov5_021DE4AC + mov r0, #0x9f + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021E575C ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + mov r0, #0 + add r1, r0, #0 + mov r2, #1 + bl sub_0200AB4C + ldr r0, [r5, #0x10] + mov r2, #0 + ldr r0, [r0, #8] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + add sp, #0x28 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E5718: + mov r3, #0xa3 + lsl r3, r3, #2 + ldr r0, [r4, r3] + cmp r0, #1 + bne _021E5748 + ldr r0, [r5, #0x10] + add r3, r3, #4 + ldr r0, [r0, #8] + ldr r3, [r4, r3] + mov r1, #3 + mov r2, #0 + bl sub_0201C63C + mov r3, #0x29 + lsl r3, r3, #4 + ldr r0, [r4, r3] + add r0, #0x1e + lsr r2, r0, #0x1f + lsl r1, r0, #0x17 + sub r1, r1, r2 + mov r0, #0x17 + ror r1, r0 + add r0, r2, r1 + str r0, [r4, r3] +_021E5748: + ldr r0, [r5, #0] + cmp r0, #0xf + beq _021E5754 + ldr r0, [r4, #0x44] + bl sub_020219F8 +_021E5754: + mov r0, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E575C: .word 0xFFFF1FFF + thumb_func_end ov5_021E52A8 + + thumb_func_start ov5_021E5760 +ov5_021E5760: ; 0x021E5760 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E5780 ; =0x021F9D34 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E577C + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E577C: + pop {r3, r4, r5, pc} + nop +_021E5780: .word 0x021F9D34 + thumb_func_end ov5_021E5760 + + thumb_func_start ov5_021E5784 +ov5_021E5784: ; 0x021E5784 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E57A4 ; =0x021F9D48 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E57A0 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E57A0: + pop {r3, r4, r5, pc} + nop +_021E57A4: .word 0x021F9D48 + thumb_func_end ov5_021E5784 + + thumb_func_start ov5_021E57A8 +ov5_021E57A8: ; 0x021E57A8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E57C8 ; =0x021F9D5C + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E57C4 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E57C4: + pop {r3, r4, r5, pc} + nop +_021E57C8: .word 0x021F9D5C + thumb_func_end ov5_021E57A8 + + thumb_func_start ov5_021E57CC +ov5_021E57CC: ; 0x021E57CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E57EC ; =0x021F9D70 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E57E8 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E57E8: + pop {r3, r4, r5, pc} + nop +_021E57EC: .word 0x021F9D70 + thumb_func_end ov5_021E57CC + + thumb_func_start ov5_021E57F0 +ov5_021E57F0: ; 0x021E57F0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E5810 ; =0x021F9D84 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E580C + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E580C: + pop {r3, r4, r5, pc} + nop +_021E5810: .word 0x021F9D84 + thumb_func_end ov5_021E57F0 + + thumb_func_start ov5_021E5814 +ov5_021E5814: ; 0x021E5814 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E5834 ; =0x021F9D98 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E5830 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E5830: + pop {r3, r4, r5, pc} + nop +_021E5834: .word 0x021F9D98 + thumb_func_end ov5_021E5814 + + thumb_func_start ov5_021E5838 +ov5_021E5838: ; 0x021E5838 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E5858 ; =0x021F9DAC + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E5854 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E5854: + pop {r3, r4, r5, pc} + nop +_021E5858: .word 0x021F9DAC + thumb_func_end ov5_021E5838 + + thumb_func_start ov5_021E585C +ov5_021E585C: ; 0x021E585C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E587C ; =0x021F9DC0 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E52A8 + cmp r0, #1 + bne _021E5878 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E5878: + pop {r3, r4, r5, pc} + nop +_021E587C: .word 0x021F9DC0 + thumb_func_end ov5_021E585C + + thumb_func_start ov5_021E5880 +ov5_021E5880: ; 0x021E5880 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_02025E38 + bl sub_02025F30 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021E5880 + + thumb_func_start ov5_021E5890 +ov5_021E5890: ; 0x021E5890 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r6, r0, #0 + ldr r0, [r6, #0] + str r1, [sp, #0x14] + str r2, [sp, #0x18] + ldr r4, [r6, #0xc] + cmp r0, #0xe + bls _021E58A6 + bl _021E6140 +_021E58A6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E58B2: ; jump table + .short _021E58D0 - _021E58B2 - 2 ; case 0 + .short _021E59D2 - _021E58B2 - 2 ; case 1 + .short _021E5AD2 - _021E58B2 - 2 ; case 2 + .short _021E5AEC - _021E58B2 - 2 ; case 3 + .short _021E5B08 - _021E58B2 - 2 ; case 4 + .short _021E5B32 - _021E58B2 - 2 ; case 5 + .short _021E5C9C - _021E58B2 - 2 ; case 6 + .short _021E5D72 - _021E58B2 - 2 ; case 7 + .short _021E5DA4 - _021E58B2 - 2 ; case 8 + .short _021E5E26 - _021E58B2 - 2 ; case 9 + .short _021E5E4A - _021E58B2 - 2 ; case 10 + .short _021E5E6E - _021E58B2 - 2 ; case 11 + .short _021E5EAC - _021E58B2 - 2 ; case 12 + .short _021E6026 - _021E58B2 - 2 ; case 13 + .short _021E60CC - _021E58B2 - 2 ; case 14 +_021E58D0: + add r0, r1, #0 + mov r1, #0x31 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x31 + str r0, [r6, #0xc] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r4, [r6, #0xc] + mov r1, #0xa + add r0, r4, #0 + add r0, #0x5c + mov r2, #4 + bl ov5_021DE47C + ldr r0, [r6, #0x10] + bl ov5_021E5880 + cmp r0, #0 + bne _021E5928 + mov r0, #1 + str r0, [sp] + mov r0, #0x94 + str r0, [sp, #4] + mov r0, #0x95 + str r0, [sp, #8] + mov r0, #0x96 + str r0, [sp, #0xc] + ldr r0, _021E5C7C ; =0x000927C0 + mov r2, #0x66 + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r6, #0x20] + add r1, #0x5c + add r2, r4, r2 + mov r3, #0x93 + bl ov5_021DE4CC + mov r1, #0 + b _021E594E +_021E5928: + mov r0, #1 + str r0, [sp] + mov r0, #0x98 + str r0, [sp, #4] + mov r0, #0x99 + str r0, [sp, #8] + mov r2, #0x9a + str r2, [sp, #0xc] + ldr r0, _021E5C7C ; =0x000927C0 + add r1, r4, #0 + str r0, [sp, #0x10] + add r2, #0xfe + ldr r0, [r6, #0x20] + add r1, #0x5c + add r2, r4, r2 + mov r3, #0x97 + bl ov5_021DE4CC + mov r1, #1 +_021E594E: + mov r0, #0xc1 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [sp, #0x18] + mov r2, #0x73 + ldrh r3, [r0] + mov r0, #1 + add r1, r4, #0 + str r0, [sp] + add r0, r3, #1 + str r0, [sp, #4] + add r0, r3, #2 + str r0, [sp, #8] + add r0, r3, #3 + str r0, [sp, #0xc] + ldr r0, _021E5C80 ; =0x000927C1 + lsl r2, r2, #2 + str r0, [sp, #0x10] + ldr r0, [r6, #0x20] + add r1, #0x5c + add r2, r4, r2 + bl ov5_021DE4CC + mov r0, #0xc + str r0, [sp] + mov r0, #0x28 + str r0, [sp, #4] + mov r0, #0x29 + str r0, [sp, #8] + mov r0, #0x2a + str r0, [sp, #0xc] + ldr r0, _021E5C84 ; =0x000927C2 + mov r2, #2 + str r0, [sp, #0x10] + ldr r3, [sp, #0x18] + add r1, r4, #0 + lsl r2, r2, #8 + ldrb r3, [r3, #2] + ldr r0, [r6, #0x20] + add r1, #0x5c + add r2, r4, r2 + bl ov5_021DE4CC + mov r0, #1 + str r0, [sp] + mov r0, #0x34 + str r0, [sp, #4] + mov r0, #0x35 + str r0, [sp, #8] + mov r0, #0x36 + str r0, [sp, #0xc] + ldr r0, _021E5C88 ; =0x000927C3 + mov r2, #0x8d + str r0, [sp, #0x10] + add r1, r4, #0 + lsl r2, r2, #2 + ldr r0, [r6, #0x20] + add r1, #0x5c + add r2, r4, r2 + mov r3, #0x33 + bl ov5_021DE4CC + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E59D2: + mov r1, #2 + lsl r1, r1, #0xc + add r0, sp, #0x2c + add r2, r1, #0 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x66 + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #0x1c] + str r0, [sp, #0x24] + add r0, r4, #0 + str r0, [sp, #0x28] + add r0, #0x5c + mov r7, #0 + add r5, r4, #0 + str r0, [sp, #0x28] +_021E59F6: + cmp r7, #3 + bge _021E5A02 + mov r0, #0 + ldr r1, [sp, #0x1c] + str r0, [sp, #0x20] + b _021E5A12 +_021E5A02: + sub r1, r7, #1 + mov r0, #0x34 + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x24] + add r1, r0, r2 + mov r0, #1 + str r0, [sp, #0x20] +_021E5A12: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r2, #0 + ldr r0, [sp, #0x28] + add r3, r2, #0 + bl ov5_021DE62C + mov r1, #0x9a + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp, #0x20] + bl sub_02021D6C + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021E80 + ldr r0, [sp, #0x1c] + add r7, r7, #1 + add r0, #0x34 + add r5, r5, #4 + str r0, [sp, #0x1c] + cmp r7, #4 + blt _021E59F6 + mov r0, #0xc1 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _021E5A74 + mov r2, #0 + str r2, [sp] + sub r0, #0x9c + ldr r0, [r4, r0] + ldr r1, [sp, #0x14] + mov r3, #0xe + bl ov5_021DE5D0 + b _021E5A86 +_021E5A74: + mov r1, #0 + str r1, [sp] + sub r0, #0x9c + ldr r0, [r4, r0] + ldr r1, [sp, #0x14] + mov r2, #1 + mov r3, #0xe + bl ov5_021DE5D0 +_021E5A86: + mov r0, #0 + str r0, [sp] + ldr r2, [sp, #0x18] + mov r0, #0x9b + lsl r0, r0, #2 + ldrh r2, [r2, #4] + ldr r0, [r4, r0] + ldr r1, [sp, #0x14] + mov r3, #0xe + bl ov5_021DE5D0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [sp, #0x14] + mov r2, #0x29 + add r1, r4, #0 + mov r3, #2 + lsl r2, r2, #4 + str r0, [sp, #4] + add r0, r4, r2 + sub r2, #0x5c + add r1, #0x5c + add r2, r4, r2 + lsl r3, r3, #0x12 + bl ov5_021E5128 + ldr r0, [r6, #0x10] + bl ov5_021DEFA0 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5AD2: + mov r1, #0x10 + mov r0, #1 + add r2, r1, #0 + add r3, r6, #4 + str r0, [sp] + bl ov5_021DDC44 + mov r0, #0 + str r0, [r6, #8] + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5AEC: + ldr r0, [r6, #8] + add r0, r0, #1 + str r0, [r6, #8] + cmp r0, #8 + bne _021E5AFA + bl ov5_021DF038 +_021E5AFA: + ldr r0, [r6, #4] + cmp r0, #0 + beq _021E5B10 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5B08: + bl ov5_021DF054 + cmp r0, #1 + beq _021E5B12 +_021E5B10: + b _021E6140 +_021E5B12: + ldr r0, [r6, #0x20] + mov r1, #0x6b + bl ov5_021DF0CC + mov r0, #8 + str r0, [sp] + ldr r0, _021E5C8C ; =0x04000050 + mov r1, #1 + mov r2, #0x1e + mov r3, #0 + bl sub_020BF55C + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5B32: + mov r0, #6 + mov r2, #0xe + mov r3, #5 + str r0, [sp] + ldr r1, _021E5C90 ; =0xFFF80000 + add r0, r4, #0 + lsl r2, r2, #0xe + lsl r3, r3, #0x10 + bl ov5_021DDE14 + mov r2, #0x17 + ldr r1, [r4, #0] + add r0, sp, #0x38 + lsl r2, r2, #0xe + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r1, #6 + add r0, r4, #0 + mov r2, #0x32 + str r1, [sp] + ldr r3, _021E5C94 ; =0xFFFB0000 + add r0, #0x30 + lsl r1, r1, #0x12 + lsl r2, r2, #0xe + bl ov5_021DDE14 + mov r2, #0x17 + ldr r1, [r4, #0x30] + add r0, sp, #0x38 + lsl r2, r2, #0xe + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x9b + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + sub r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #0x9b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x20 + str r0, [sp] + ldr r0, [sp, #0x14] + mov r1, #0xb + str r0, [sp, #4] + ldr r0, [r6, #0x20] + mov r2, #0 + mov r3, #0x40 + bl sub_02007130 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0xd + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r1, #0xbd + lsl r1, r1, #2 + str r2, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r6, #0x10] + add r1, r4, r1 + ldr r0, [r0, #8] + mov r3, #0x15 + bl sub_0201A7E8 + mov r0, #0xbd + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + ldrh r0, [r0, #6] + bl ov5_021E5240 + mov r1, #0 + add r5, r0, #0 + str r1, [sp] + ldr r0, _021E5C98 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #0xbd + lsl r0, r0, #2 + add r0, r4, r0 + add r2, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + mov r0, #3 + str r0, [r6, #4] + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 + ; .align 2, 0 +_021E5C7C: .word 0x000927C0 +_021E5C80: .word 0x000927C1 +_021E5C84: .word 0x000927C2 +_021E5C88: .word 0x000927C3 +_021E5C8C: .word 0x04000050 +_021E5C90: .word 0xFFF80000 +_021E5C94: .word 0xFFFB0000 +_021E5C98: .word 0x00010200 +_021E5C9C: + ldr r0, [r6, #4] + cmp r0, #0 + ble _021E5CC0 + sub r0, r0, #1 + str r0, [r6, #4] + bne _021E5CCA + mov r0, #3 + bl ov5_021DF17C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021E5CCA +_021E5CC0: + mov r0, #0x29 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov5_021E51B4 +_021E5CCA: + add r0, r4, #0 + bl ov5_021DDE74 + mov r2, #0x17 + ldr r1, [r4, #0] + add r0, sp, #0x38 + lsl r2, r2, #0xe + mov r3, #0 + bl ov5_021DE660 + add r5, sp, #0x38 + mov r2, #0x9e + lsl r2, r2, #2 + add r3, r4, r2 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + sub r2, #0x10 + str r0, [r3, #0] + ldr r0, [r4, r2] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + add r0, r4, #0 + add r0, #0x30 + bl ov5_021DDE74 + mov r2, #0x17 + add r7, r0, #0 + ldr r1, [r4, #0x30] + add r0, sp, #0x38 + lsl r2, r2, #0xe + mov r3, #0 + bl ov5_021DE660 + add r5, sp, #0x38 + mov r2, #0xa1 + lsl r2, r2, #2 + add r3, r4, r2 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + sub r2, #0x18 + str r0, [r3, #0] + ldr r0, [r4, r2] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + sub r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + cmp r7, #1 + bne _021E5E60 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5D72: + mov r0, #0x29 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov5_021E51B4 + add r5, r0, #0 + bl ov5_021DF208 + cmp r5, #0 + beq _021E5E60 + cmp r0, #0 + beq _021E5E60 + add r0, r4, #0 + add r0, #0x48 + mov r1, #0 + mov r2, #0x10 + mov r3, #3 + bl ov5_021DDD80 + bl ov5_021DF224 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5DA4: + add r0, r4, #0 + add r0, #0x48 + bl ov5_021DDD90 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x48 + bl ov5_021DEF8C + cmp r5, #1 + bne _021E5E60 + mov r3, #0 + mov r2, #0x9a + str r3, [sp] + lsl r2, r2, #2 + ldr r0, [r4, r2] + add r2, #0x9c + ldr r1, [sp, #0x14] + ldr r2, [r4, r2] + bl ov5_021DE5D0 + mov r3, #0 + mov r0, #0x9b + ldr r2, [sp, #0x18] + str r3, [sp] + lsl r0, r0, #2 + ldrh r2, [r2, #4] + ldr r0, [r4, r0] + ldr r1, [sp, #0x14] + bl ov5_021DE5D0 + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x27 + lsl r0, r0, #4 + mov r1, #2 + ldr r0, [r4, r0] + lsl r1, r1, #0xc + bl sub_02021CE4 + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x9d + lsl r0, r0, #2 + mov r1, #2 + ldr r0, [r4, r0] + lsl r1, r1, #0xc + bl sub_02021CE4 + ldr r0, [r6, #0x20] + mov r1, #0x6c + bl ov5_021DF0CC + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5E26: + add r0, r4, #0 + add r0, #0x48 + mov r1, #0x10 + mov r2, #0 + mov r3, #6 + bl ov5_021DDD80 + mov r0, #4 + bl ov5_021DF17C + mov r0, #0 + mov r1, #1 + bl sub_02019060 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5E4A: + add r0, r4, #0 + add r0, #0x48 + bl ov5_021DDD90 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x48 + bl ov5_021DEF8C + cmp r5, #1 + beq _021E5E62 +_021E5E60: + b _021E6140 +_021E5E62: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + mov r0, #8 + str r0, [r6, #4] + b _021E6140 +_021E5E6E: + ldr r0, [r6, #4] + cmp r0, #0 + ble _021E5E7A + sub r0, r0, #1 + str r0, [r6, #4] + b _021E6140 +_021E5E7A: + add r0, r2, #0 + ldrb r0, [r0, #3] + mov r1, #0 + ldr r2, _021E616C ; =0xFFFFE000 + str r0, [sp] + add r0, r4, #0 + add r3, r1, #0 + bl ov5_021DDE14 + ldr r0, [sp, #0x18] + mov r1, #0 + ldrb r0, [r0, #3] + ldr r2, _021E616C ; =0xFFFFE000 + add r3, r1, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDE14 + mov r0, #0 + str r0, [r6, #4] + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E5EAC: + ldr r0, [r6, #4] + add r0, r0, #1 + str r0, [r6, #4] + add r0, r4, #0 + bl ov5_021DDE74 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDE74 + ldr r1, [r6, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + add r0, sp, #0x38 + bne _021E5EF4 + mov r2, #0x9e + lsl r2, r2, #2 + ldr r3, [r4, r2] + ldr r1, [r4, #0] + add r2, r2, #4 + add r1, r3, r1 + ldr r3, [r4, r2] + ldr r2, [r4, #0x18] + add r2, r3, r2 + mov r3, #0 + bl ov5_021DE660 + b _021E5F0C +_021E5EF4: + mov r2, #0x9e + lsl r2, r2, #2 + ldr r3, [r4, r2] + ldr r1, [r4, #0] + add r2, r2, #4 + sub r1, r3, r1 + ldr r3, [r4, r2] + ldr r2, [r4, #0x18] + sub r2, r3, r2 + mov r3, #0 + bl ov5_021DE660 +_021E5F0C: + cmp r5, #0 + beq _021E5F20 + mov r0, #0x9e + lsl r0, r0, #2 + add r3, sp, #0x38 + add r2, r4, r0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] +_021E5F20: + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + ldr r1, [r6, #4] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + add r0, sp, #0x38 + bne _021E5F7C + mov r2, #0xa1 + lsl r2, r2, #2 + ldr r3, [r4, r2] + ldr r1, [r4, #0] + add r2, r2, #4 + sub r1, r3, r1 + ldr r3, [r4, r2] + ldr r2, [r4, #0x18] + sub r2, r3, r2 + mov r3, #0 + bl ov5_021DE660 + b _021E5F94 +_021E5F7C: + mov r2, #0xa1 + lsl r2, r2, #2 + ldr r3, [r4, r2] + ldr r1, [r4, #0] + add r2, r2, #4 + add r1, r3, r1 + ldr r3, [r4, r2] + ldr r2, [r4, #0x18] + add r2, r3, r2 + mov r3, #0 + bl ov5_021DE660 +_021E5F94: + cmp r5, #0 + beq _021E5FA8 + mov r0, #0xa1 + lsl r0, r0, #2 + add r3, sp, #0x38 + add r2, r4, r0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] +_021E5FA8: + mov r0, #0x9b + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + sub r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + cmp r5, #0 + bne _021E5FD8 + b _021E6140 +_021E5FD8: + ldr r0, [r6, #0] + mov r1, #0 + add r0, r0, #1 + str r0, [r6, #0] + mov r0, #4 + bl sub_0201FF0C + mov r2, #3 + mov r0, #0x10 + lsl r2, r2, #0x12 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + lsr r3, r2, #3 + bl ov5_021DDE14 + mov r0, #0x10 + mov r2, #3 + str r0, [sp] + add r0, r4, #0 + lsl r2, r2, #0x12 + add r0, #0x18 + mov r1, #0 + lsr r3, r2, #3 + bl ov5_021DDE14 + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + mov r1, #0 + str r0, [sp, #8] + ldr r3, _021E6170 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 + b _021E6140 +_021E6026: + add r0, r4, #0 + bl ov5_021DDE74 + add r0, r4, #0 + add r0, #0x18 + bl ov5_021DDE74 + mov r2, #0x9e + lsl r2, r2, #2 + ldr r3, [r4, r2] + ldr r1, [r4, #0] + add r2, r2, #4 + sub r1, r3, r1 + ldr r3, [r4, r2] + ldr r2, [r4, #0x18] + add r0, sp, #0x38 + sub r2, r3, r2 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r2, #0xa1 + lsl r2, r2, #2 + ldr r3, [r4, r2] + ldr r1, [r4, #0] + add r2, r2, #4 + add r1, r3, r1 + ldr r3, [r4, r2] + ldr r2, [r4, #0x18] + add r0, sp, #0x38 + add r2, r3, r2 + mov r3, #0 + bl ov5_021DE660 + mov r0, #0x9b + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0x3c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x3c] + ldr r1, [sp, #0x38] + lsl r0, r0, #2 + sub r0, r1, r0 + str r0, [sp, #0x38] + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0x38 + bl sub_02021C50 + bl sub_0200F2AC + cmp r0, #0 + beq _021E6140 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _021E6140 +_021E60CC: + ldr r1, _021E6170 ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 + ldr r1, [r6, #0x14] + cmp r1, #0 + beq _021E60DE + mov r0, #1 + str r0, [r1, #0] +_021E60DE: + mov r0, #0x29 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov5_021E519C + mov r0, #0xbd + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + mov r7, #0x9a + mov r6, #0 + add r5, r4, #0 + lsl r7, r7, #2 +_021E60FA: + ldr r0, [r5, r7] + bl sub_02021BD4 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #4 + blt _021E60FA + mov r0, #0x66 + lsl r0, r0, #2 + add r7, r4, #0 + mov r6, #0 + add r5, r4, r0 + add r7, #0x5c +_021E6114: + add r0, r7, #0 + add r1, r5, #0 + bl ov5_021DE5A4 + add r6, r6, #1 + add r5, #0x34 + cmp r6, #4 + blt _021E6114 + add r4, #0x5c + add r0, r4, #0 + bl ov5_021DE4AC + bl ov5_021DF224 + bl ov5_021DF084 + ldr r0, _021E6174 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add sp, #0x44 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021E6140: + ldr r0, [r6, #0] + cmp r0, #0xe + beq _021E6166 + ldr r0, [r4, #0x5c] + bl sub_020219F8 + ldr r0, [r6, #0] + cmp r0, #4 + ble _021E6166 + bl sub_020241B4 + bl ov5_021DF1CC + bl ov5_021DF070 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_021E6166: + mov r0, #0 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E616C: .word 0xFFFFE000 +_021E6170: .word 0x00007FFF +_021E6174: .word 0x04000050 + thumb_func_end ov5_021E5890 + + thumb_func_start ov5_021E6178 +ov5_021E6178: ; 0x021E6178 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E6198 ; =0x021F9D0C + add r0, r4, #0 + mov r1, #4 + bl ov5_021E5890 + cmp r0, #1 + bne _021E6194 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E6194: + pop {r3, r4, r5, pc} + nop +_021E6198: .word 0x021F9D0C + thumb_func_end ov5_021E6178 + + thumb_func_start ov5_021E619C +ov5_021E619C: ; 0x021E619C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E61BC ; =0x021F9D14 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E5890 + cmp r0, #1 + bne _021E61B8 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E61B8: + pop {r3, r4, r5, pc} + nop +_021E61BC: .word 0x021F9D14 + thumb_func_end ov5_021E619C + + thumb_func_start ov5_021E61C0 +ov5_021E61C0: ; 0x021E61C0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E61E0 ; =0x021F9D1C + add r0, r4, #0 + mov r1, #4 + bl ov5_021E5890 + cmp r0, #1 + bne _021E61DC + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E61DC: + pop {r3, r4, r5, pc} + nop +_021E61E0: .word 0x021F9D1C + thumb_func_end ov5_021E61C0 + + thumb_func_start ov5_021E61E4 +ov5_021E61E4: ; 0x021E61E4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E6204 ; =0x021F9D24 + add r0, r4, #0 + mov r1, #4 + bl ov5_021E5890 + cmp r0, #1 + bne _021E6200 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E6200: + pop {r3, r4, r5, pc} + nop +_021E6204: .word 0x021F9D24 + thumb_func_end ov5_021E61E4 + + thumb_func_start ov5_021E6208 +ov5_021E6208: ; 0x021E6208 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r2, _021E6228 ; =0x021F9D2C + add r0, r4, #0 + mov r1, #4 + bl ov5_021E5890 + cmp r0, #1 + bne _021E6224 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021DDC28 +_021E6224: + pop {r3, r4, r5, pc} + nop +_021E6228: .word 0x021F9D2C + thumb_func_end ov5_021E6208 + + .rodata + + + .global Unk_ov5_021F9D0C +Unk_ov5_021F9D0C: ; 0x021F9D0C + .incbin "incbin/overlay5_rodata.bin", 0x13F8, 0x1420 - 0x13F8 + + .global Unk_ov5_021F9D34 +Unk_ov5_021F9D34: ; 0x021F9D34 + .incbin "incbin/overlay5_rodata.bin", 0x1420, 0x14C0 - 0x1420 + + .global Unk_ov5_021F9DD4 +Unk_ov5_021F9DD4: ; 0x021F9DD4 + .incbin "incbin/overlay5_rodata.bin", 0x14C0, 0x1580 - 0x14C0 + + .global Unk_ov5_021F9E94 +Unk_ov5_021F9E94: ; 0x021F9E94 + .incbin "incbin/overlay5_rodata.bin", 0x1580, 0xC0 + diff --git a/asm/ov5_021E622C.s b/asm/ov5_021E622C.s new file mode 100644 index 000000000..f81e34bd5 --- /dev/null +++ b/asm/ov5_021E622C.s @@ -0,0 +1,2743 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E622C +ov5_021E622C: ; 0x021E622C + push {r3, lr} + bl sub_02026218 + bl sub_02026220 + pop {r3, pc} + thumb_func_end ov5_021E622C + + thumb_func_start ov5_021E6238 +ov5_021E6238: ; 0x021E6238 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r6, r0, #0 + add r5, r4, #0 + mov r7, #5 +_021E6242: + add r0, r6, #0 + add r1, r5, #0 + bl sub_02026218 + bl sub_02026220 + add r1, r7, #0 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021E6260 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 +_021E6260: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #2 + blo _021E6242 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E6238 + + thumb_func_start ov5_021E6270 +ov5_021E6270: ; 0x021E6270 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _021E62AC ; =0x02202124 + mov r4, #0 + str r5, [r0, #0] + mov r6, #5 + add r7, r4, #0 +_021E627E: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02026218 + bl sub_02026220 + add r1, r6, #0 + add r2, r7, #0 + bl sub_02074570 + cmp r0, #0 + bne _021E629A + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E629A: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #2 + blo _021E627E + mov r0, #0 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E62AC: .word 0x02202124 + thumb_func_end ov5_021E6270 + + thumb_func_start ov5_021E62B0 +ov5_021E62B0: ; 0x021E62B0 + push {r3, lr} + mov r1, #6 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + pop {r3, pc} + thumb_func_end ov5_021E62B0 + + thumb_func_start ov5_021E62C4 +ov5_021E62C4: ; 0x021E62C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r2, #0 + add r6, r0, #0 + str r1, [sp] + add r7, r3, #0 + bl sub_0207A0FC + add r4, r0, #0 + add r0, r5, #0 + bl sub_02026224 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_02026220 + str r0, [sp, #4] + add r0, r7, #0 + bl sub_02025E38 + bl sub_02025EF0 + add r0, r4, #0 + mov r1, #0x75 + add r2, sp, #0xc + bl sub_02074470 + add r0, r4, #0 + bl sub_02076B10 + bl ov5_021E62B0 + cmp r0, #0 + beq _021E6318 + ldr r0, [sp, #8] + bl sub_02026230 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0xaa + bl sub_02074470 +_021E6318: + ldr r1, [sp, #4] + add r0, r4, #0 + bl sub_02077618 + ldr r0, [sp, #4] + mov r1, #0 + bl sub_02077ADC + add r0, r5, #0 + mov r1, #0 + bl sub_02026258 + ldr r1, [sp] + add r0, r6, #0 + bl sub_0207A080 + ldr r1, _021E6354 ; =0x000001B9 + add r0, r6, #0 + bl sub_0207A230 + cmp r0, #0 + bne _021E634E + add r0, r7, #0 + bl sub_0202CC98 + bl sub_0202CCA8 +_021E634E: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021E6354: .word 0x000001B9 + thumb_func_end ov5_021E62C4 + + thumb_func_start ov5_021E6358 +ov5_021E6358: ; 0x021E6358 + push {r3, r4, r5, r6, r7, lr} + add r7, r3, #0 + add r5, r0, #0 + add r0, r7, #0 + add r6, r1, #0 + add r4, r2, #0 + bl sub_0202CD88 + mov r1, #0x28 + bl sub_0202CF28 + add r0, r4, #0 + bl ov5_021E6270 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02026218 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + bl ov5_021E62C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E6358 + + thumb_func_start ov5_021E638C +ov5_021E638C: ; 0x021E638C + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + mov r1, #0 + bl sub_02026218 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl sub_02026218 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02026220 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02026220 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _021E63DC + add r0, r7, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021E63DC + add r0, r5, #0 + add r1, r4, #0 + bl sub_020262A8 + add r0, r4, #0 + bl sub_020262F4 +_021E63DC: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E638C + + thumb_func_start ov5_021E63E0 +ov5_021E63E0: ; 0x021E63E0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #8] + add r4, sp, #8 + add r6, sp, #4 + add r7, sp, #4 +_021E63F2: + add r0, r5, #0 + bl sub_02076B14 + cmp r0, #0 + beq _021E6434 + mov r0, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0207727C + cmp r0, #0 + beq _021E642A +_021E640E: + ldr r1, _021E6440 ; =0x0000FFFF + cmp r0, r1 + bne _021E641C + ldrh r1, [r7] + add r0, r5, #0 + bl sub_02077134 +_021E641C: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0207727C + cmp r0, #0 + bne _021E640E +_021E642A: + ldr r0, [sp] + add r0, r0, #1 + str r0, [sp] + cmp r0, #0x64 + blt _021E63F2 +_021E6434: + add r0, r5, #0 + bl sub_0207418C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021E6440: .word 0x0000FFFF + thumb_func_end ov5_021E63E0 + + thumb_func_start ov5_021E6444 +ov5_021E6444: ; 0x021E6444 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + add r6, r1, #0 + mov r0, #4 + add r7, r2, #0 + bl sub_02073C74 + add r4, r0, #0 + add r0, r6, #0 + bl sub_02026220 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02026224 + str r0, [sp, #4] + add r0, r7, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_0200B5CC + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + add r0, r5, #0 + add r1, r4, #0 + bl sub_020774C8 + add r0, r4, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + cmp r0, #0x64 + beq _021E64BC + add r0, r4, #0 + mov r1, #8 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + add r0, r6, #0 + bl sub_02026228 + ldr r1, [sp, #8] + add r2, sp, #8 + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #8 + bl sub_02074B30 + add r0, r4, #0 + bl ov5_021E63E0 +_021E64BC: + add r0, r5, #0 + bl ov5_021E62B0 + cmp r0, #0 + beq _021E64D6 + ldr r0, [sp, #4] + bl sub_02026230 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0xaa + bl sub_02074B30 +_021E64D6: + ldr r0, [sp] + add r1, r4, #0 + bl sub_0207A048 + add r0, r5, #0 + bl sub_02073C54 + add r0, r6, #0 + mov r1, #0 + bl sub_02026258 + add r0, r4, #0 + bl sub_020181C4 + add r0, r7, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021E6444 + + thumb_func_start ov5_021E64F8 +ov5_021E64F8: ; 0x021E64F8 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + add r1, r3, #0 + bl sub_02026218 + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov5_021E6444 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r6, #0 + bl ov5_021E638C + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E64F8 + + thumb_func_start ov5_021E6520 +ov5_021E6520: ; 0x021E6520 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #4 + add r5, r1, #0 + bl sub_02073C74 + add r7, r0, #0 + bl sub_02076B10 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl sub_02077604 + add r0, r4, #0 + mov r1, #8 + mov r2, #0 + bl sub_02074570 + str r0, [sp] + add r0, r0, r5 + str r0, [sp] + add r0, r4, #0 + mov r1, #8 + add r2, sp, #0 + bl sub_02074C60 + add r0, r4, #0 + bl sub_02075B40 + add r4, r0, #0 + add r0, r7, #0 + bl sub_020181C4 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E6520 + + thumb_func_start ov5_021E6568 +ov5_021E6568: ; 0x021E6568 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_02026220 + add r6, r0, #0 + bl sub_02075B40 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, r5, #0 + bl sub_02026228 + add r1, r0, #0 + add r0, r6, #0 + bl ov5_021E6520 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + sub r0, r0, r4 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E6568 + + thumb_func_start ov5_021E6590 +ov5_021E6590: ; 0x021E6590 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02026220 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02026228 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021E6520 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E6590 + + thumb_func_start ov5_021E65B0 +ov5_021E65B0: ; 0x021E65B0 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r0, #0 + add r5, r1, #0 + bl sub_02026220 + add r6, r0, #0 + add r0, r4, #0 + bl ov5_021E6568 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + mov r1, #1 + add r0, r5, #0 + add r2, r4, #0 + mov r3, #3 + str r1, [sp, #4] + bl sub_0200B60C + add r0, r5, #0 + mov r1, #0 + add r2, r6, #0 + bl sub_0200B5CC + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E65B0 + + thumb_func_start ov5_021E65EC +ov5_021E65EC: ; 0x021E65EC + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r0, #0 + add r5, r1, #0 + bl sub_02026220 + add r6, r0, #0 + add r0, r4, #0 + bl ov5_021E6568 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r5, #0 + mov r1, #0 + add r2, r6, #0 + bl sub_0200B5CC + add r1, r4, #1 + mov r0, #0x64 + mul r0, r1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + mov r0, #0 + str r0, [sp] + mov r1, #1 + add r0, r5, #0 + add r2, r4, #0 + mov r3, #5 + str r1, [sp, #4] + bl sub_0200B60C + add r0, r4, #0 + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E65EC + + thumb_func_start ov5_021E6630 +ov5_021E6630: ; 0x021E6630 + push {r4, lr} + add r4, r2, #0 + bl sub_02026218 + add r1, r4, #0 + bl ov5_021E65EC + pop {r4, pc} + thumb_func_end ov5_021E6630 + + thumb_func_start ov5_021E6640 +ov5_021E6640: ; 0x021E6640 + push {r3, r4, r5, lr} + add r5, r2, #0 + bl sub_02026218 + add r4, r0, #0 + bl sub_02026220 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021E6664 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021E65B0 + pop {r3, r4, r5, pc} +_021E6664: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E6640 + + thumb_func_start ov5_021E6668 +ov5_021E6668: ; 0x021E6668 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + bl ov5_021E622C + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #1 + bl ov5_021E622C + str r0, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E6668 + + thumb_func_start ov5_021E6684 +ov5_021E6684: ; 0x021E6684 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r1, #0 + mvn r1, r1 + str r1, [sp] + add r1, sp, #4 + bl ov5_021E6668 + mov r4, #0 + add r5, sp, #4 +_021E6698: + ldr r0, [r5, #0] + bl sub_02075D74 + cmp r0, #1 + bne _021E66A4 + str r4, [sp] +_021E66A4: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _021E6698 + mov r7, #0 + add r6, r7, #0 + add r4, sp, #4 + add r5, sp, #0xc +_021E66B4: + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + str r0, [r5, #0] + cmp r0, #0x84 + bne _021E66C8 + add r7, r7, #1 + str r6, [sp] +_021E66C8: + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #2 + blt _021E66B4 + cmp r7, #2 + bne _021E66EA + bl sub_0201D2E8 + ldr r1, _021E671C ; =0x00007FFF + cmp r0, r1 + blo _021E66E6 + mov r0, #0 + str r0, [sp] + b _021E66EA +_021E66E6: + mov r0, #1 + str r0, [sp] +_021E66EA: + ldr r0, [sp] + mov r2, #0 + lsl r1, r0, #2 + add r0, sp, #4 + ldr r0, [r0, r1] + mov r1, #6 + bl sub_02074570 + cmp r0, #0xe5 + bne _021E6714 + bl sub_0201D2E8 + ldr r1, _021E671C ; =0x00007FFF + cmp r0, r1 + blo _021E670E + mov r0, #0 + mvn r0, r0 + str r0, [sp] +_021E670E: + ldr r0, [sp] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E6714: + mov r0, #0 + mvn r0, r0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E671C: .word 0x00007FFF + thumb_func_end ov5_021E6684 + + thumb_func_start ov5_021E6720 +ov5_021E6720: ; 0x021E6720 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + mov r5, #0 + bl ov5_021E6684 + add r1, r0, #0 + bpl _021E673C + bl sub_0201D35C + add r1, r0, #0 + ldr r0, [sp] + bl sub_02026270 + pop {r3, r4, r5, r6, r7, pc} +_021E673C: + ldr r0, [sp] + bl ov5_021E622C + add r1, r5, #0 + add r2, r1, #0 + bl sub_02074570 + bl sub_02075BFC + mov r7, #0x96 + add r6, r0, #0 + lsl r7, r7, #4 +_021E6754: + bl sub_0201D35C + add r4, r0, #0 + bl sub_02075BFC + cmp r6, r0 + bne _021E6766 + cmp r4, #0 + bne _021E676C +_021E6766: + add r5, r5, #1 + cmp r5, r7 + ble _021E6754 +_021E676C: + ldr r0, [sp] + add r1, r4, #0 + bl sub_02026270 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E6720 + + thumb_func_start ov5_021E6778 +ov5_021E6778: ; 0x021E6778 + push {r3, r4} + sub sp, #8 + mov r2, #0xff + strb r2, [r0, r1] + mov r2, #0 + add r3, sp, #0 +_021E6784: + ldrb r1, [r0, r2] + add r2, r2, #1 + strb r1, [r3] + add r3, r3, #1 + cmp r2, #6 + blt _021E6784 + mov r2, #0 + add r4, r2, #0 + add r3, sp, #0 +_021E6796: + ldrb r1, [r3] + cmp r1, #0xff + beq _021E67A0 + strb r1, [r0, r2] + add r2, r2, #1 +_021E67A0: + add r4, r4, #1 + add r3, r3, #1 + cmp r4, #6 + blt _021E6796 + add sp, #8 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E6778 + + thumb_func_start ov5_021E67B0 +ov5_021E67B0: ; 0x021E67B0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + str r1, [sp] + mov r0, #0 + add r1, sp, #8 +_021E67BC: + strb r0, [r1, r0] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #6 + blo _021E67BC + add r7, sp, #0xc + mov r5, #0 + add r6, sp, #8 + add r7, #2 +_021E67D0: + bl sub_0201D2E8 + mov r1, #6 + sub r1, r1, r5 + bl sub_020E1F6C + ldrb r0, [r6, r1] + add r1, r5, #0 + strb r0, [r7, r5] + add r0, r6, #0 + bl ov5_021E6778 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #3 + blo _021E67D0 + add r6, sp, #4 + mov r5, #0 + add r6, #1 + mov r7, #0x1f +_021E67FA: + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r0, r0, #0x1f + sub r0, r0, r1 + ror r0, r7 + add r0, r1, r0 + strb r0, [r6, r5] + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #3 + blo _021E67FA + mov r5, #0 + add r7, sp, #4 + add r6, sp, #4 +_021E681A: + add r1, sp, #4 + add r1, #1 + ldrb r1, [r1, r5] + ldr r0, [sp] + bl ov5_021E622C + add r1, sp, #0xc + add r1, #2 + ldrb r1, [r1, r5] + cmp r1, #5 + bhi _021E68CA + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021E683C: ; jump table + .short _021E6848 - _021E683C - 2 ; case 0 + .short _021E685E - _021E683C - 2 ; case 1 + .short _021E6874 - _021E683C - 2 ; case 2 + .short _021E688A - _021E683C - 2 ; case 3 + .short _021E68A0 - _021E683C - 2 ; case 4 + .short _021E68B6 - _021E683C - 2 ; case 5 +_021E6848: + mov r1, #0x46 + mov r2, #0 + bl sub_02074570 + strb r0, [r6] + add r0, r4, #0 + mov r1, #0x46 + add r2, r7, #0 + bl sub_02074B30 + b _021E68CA +_021E685E: + mov r1, #0x47 + mov r2, #0 + bl sub_02074570 + strb r0, [r6] + add r0, r4, #0 + mov r1, #0x47 + add r2, r7, #0 + bl sub_02074B30 + b _021E68CA +_021E6874: + mov r1, #0x48 + mov r2, #0 + bl sub_02074570 + strb r0, [r6] + add r0, r4, #0 + mov r1, #0x48 + add r2, r7, #0 + bl sub_02074B30 + b _021E68CA +_021E688A: + mov r1, #0x49 + mov r2, #0 + bl sub_02074570 + strb r0, [r6] + add r0, r4, #0 + mov r1, #0x49 + add r2, r7, #0 + bl sub_02074B30 + b _021E68CA +_021E68A0: + mov r1, #0x4a + mov r2, #0 + bl sub_02074570 + strb r0, [r6] + add r0, r4, #0 + mov r1, #0x4a + add r2, r7, #0 + bl sub_02074B30 + b _021E68CA +_021E68B6: + mov r1, #0x4b + mov r2, #0 + bl sub_02074570 + strb r0, [r6] + add r0, r4, #0 + mov r1, #0x4b + add r2, r7, #0 + bl sub_02074B30 +_021E68CA: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #3 + blo _021E681A + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021E67B0 + + thumb_func_start ov5_021E68D8 +ov5_021E68D8: ; 0x021E68D8 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r1, #0 + mov r1, #5 + add r2, r4, #0 + add r6, r4, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + ldr r0, _021E693C ; =0x00004E20 + ldr r3, _021E6940 ; =0x00000775 + add r2, r2, r0 + ldr r0, _021E6944 ; =0x021F9FA2 + add r1, r4, #0 +_021E68F6: + lsl r7, r1, #1 + ldrh r7, [r0, r7] + cmp r2, r7 + bne _021E6906 + add r0, r1, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + b _021E6910 +_021E6906: + add r1, r1, #1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + cmp r1, r3 + blo _021E68F6 +_021E6910: + ldr r2, _021E6944 ; =0x021F9FA2 + lsl r0, r6, #1 + ldr r3, _021E693C ; =0x00004E20 + mov r1, #0 + add r0, r2, r0 +_021E691A: + lsl r6, r1, #1 + ldrh r2, [r0, r6] + cmp r2, r3 + bhi _021E6934 + add r1, r1, #1 + strh r2, [r5, r6] + add r2, r4, #1 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsr r1, r1, #0x10 + lsr r4, r2, #0x10 + cmp r1, #0x10 + blo _021E691A +_021E6934: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E693C: .word 0x00004E20 +_021E6940: .word 0x00000775 +_021E6944: .word 0x021F9FA2 + thumb_func_end ov5_021E68D8 + + thumb_func_start ov5_021E6948 +ov5_021E6948: ; 0x021E6948 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r0, #0 + str r1, [sp] + mov r0, #4 + mov r1, #0xb4 + str r2, [sp, #4] + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + add r1, r4, #0 + mov r2, #0xb4 + str r0, [sp, #0x1c] + bl sub_020C4BB8 + add r0, r7, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x18] + add r0, r7, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0xc] + add r2, r4, #0 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0xc] + add r2, #0x30 + bl sub_02077660 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x14] + mov r6, #0 +_021E699C: + lsl r0, r6, #2 + add r5, r6, #0 + str r0, [sp, #0x20] + add r0, r4, r0 + add r5, #0x36 + str r0, [sp, #0x10] + ldr r0, [sp] + add r1, r5, #0 + mov r2, #0 + bl sub_02074570 + ldr r1, [sp, #0x20] + mov r2, #0 + str r0, [r4, r1] + ldr r0, [sp, #4] + add r1, r5, #0 + bl sub_02074570 + ldr r1, [sp, #0x10] + str r0, [r1, #0x20] + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #4 + blo _021E699C + add r1, r4, #0 + add r0, r7, #0 + add r1, #0x94 + bl ov5_021E68D8 + add r5, r0, #0 + mov r6, #0 +_021E69DC: + lsl r0, r6, #2 + ldr r1, [r4, r0] + str r0, [sp, #0x24] + cmp r1, #0 + beq _021E6A2C + mov r0, #0 + cmp r5, #0 + bls _021E6A22 +_021E69EC: + lsl r2, r0, #1 + add r2, r4, r2 + add r2, #0x94 + ldrh r2, [r2] + cmp r1, r2 + bne _021E6A18 + lsl r1, r1, #0x10 + add r0, r7, #0 + lsr r1, r1, #0x10 + bl sub_020770C4 + ldr r1, _021E6B3C ; =0x0000FFFF + cmp r0, r1 + bne _021E6A22 + ldr r1, [sp, #0x24] + add r0, r7, #0 + ldr r1, [r4, r1] + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02077134 + b _021E6A22 +_021E6A18: + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, r5 + blo _021E69EC +_021E6A22: + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #4 + blo _021E69DC +_021E6A2C: + mov r0, #0 + str r0, [sp, #8] +_021E6A30: + ldr r0, [sp, #8] + lsl r6, r0, #2 + ldr r0, [r4, r6] + cmp r0, #0 + beq _021E6A88 + mov r5, #0 +_021E6A3C: + mov r0, #0x52 + lsl r0, r0, #2 + add r0, r5, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D268 + ldr r1, [r4, r6] + cmp r1, r0 + bne _021E6A7E + lsl r2, r5, #0x18 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0xc] + lsr r2, r2, #0x18 + bl sub_02077FE4 + cmp r0, #0 + beq _021E6A7E + ldr r1, [r4, r6] + add r0, r7, #0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_020770C4 + ldr r1, _021E6B3C ; =0x0000FFFF + cmp r0, r1 + bne _021E6A7E + ldr r1, [r4, r6] + add r0, r7, #0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02077134 +_021E6A7E: + add r0, r5, #1 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #0x64 + blo _021E6A3C +_021E6A88: + ldr r0, [sp, #8] + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + cmp r0, #4 + blo _021E6A30 + mov r6, #0 +_021E6A98: + lsl r1, r6, #2 + ldr r0, [r4, r1] + cmp r0, #0 + beq _021E6AD8 + mov r3, #0 +_021E6AA2: + lsl r2, r3, #2 + add r2, r4, r2 + ldr r0, [r4, r1] + ldr r2, [r2, #0x20] + cmp r0, r2 + bne _021E6AC4 + cmp r0, #0 + beq _021E6AC4 + ldr r2, [sp, #0x1c] + add r5, r2, #0 + add r5, r5, #1 + lsl r5, r5, #0x10 + lsr r5, r5, #0x10 + lsl r2, r2, #2 + str r5, [sp, #0x1c] + add r2, r4, r2 + str r0, [r2, #0x10] +_021E6AC4: + add r0, r3, #1 + lsl r0, r0, #0x10 + lsr r3, r0, #0x10 + cmp r3, #4 + blo _021E6AA2 + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #4 + blo _021E6A98 +_021E6AD8: + mov r6, #0 +_021E6ADA: + lsl r0, r6, #2 + add r5, r4, r0 + ldr r3, [r5, #0x10] + cmp r3, #0 + beq _021E6B30 + ldr r0, [sp, #0x14] + mov r2, #0 + cmp r0, #0 + bls _021E6B26 +_021E6AEC: + lsl r0, r2, #1 + add r0, r4, r0 + ldrh r1, [r0, #0x30] + cmp r1, #0 + beq _021E6B1A + ldr r0, [r5, #0x10] + cmp r0, r1 + bne _021E6B1A + lsl r1, r3, #0x10 + add r0, r7, #0 + lsr r1, r1, #0x10 + bl sub_020770C4 + ldr r1, _021E6B3C ; =0x0000FFFF + cmp r0, r1 + bne _021E6B26 + ldr r1, [r5, #0x10] + add r0, r7, #0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_02077134 + b _021E6B26 +_021E6B1A: + add r0, r2, #1 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + ldr r0, [sp, #0x14] + cmp r2, r0 + blo _021E6AEC +_021E6B26: + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #4 + blo _021E6ADA +_021E6B30: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E6B3C: .word 0x0000FFFF + thumb_func_end ov5_021E6948 + + thumb_func_start ov5_021E6B40 +ov5_021E6B40: ; 0x021E6B40 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl sub_02026270 + add r0, r4, #0 + mov r1, #0 + bl sub_02026278 + pop {r4, pc} + thumb_func_end ov5_021E6B40 + + thumb_func_start ov5_021E6B54 +ov5_021E6B54: ; 0x021E6B54 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r0, r1, #0 + add r1, sp, #0 + bl ov5_021E6668 + ldr r2, _021E6BC4 ; =0x021F9F6C + mov r3, #0 + mov r1, #6 +_021E6B68: + add r0, r3, #0 + mul r0, r1 + ldrh r0, [r2, r0] + cmp r5, r0 + bne _021E6B76 + add r6, r3, #0 + b _021E6B80 +_021E6B76: + add r0, r3, #1 + lsl r0, r0, #0x10 + lsr r3, r0, #0x10 + cmp r3, #9 + blo _021E6B68 +_021E6B80: + cmp r3, #9 + bne _021E6B8A + add sp, #8 + add r0, r5, #0 + pop {r4, r5, r6, pc} +_021E6B8A: + ldr r0, [sp] + mov r1, #6 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [sp, #4] + mov r1, #6 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + mov r0, #6 + add r1, r6, #0 + mul r1, r0 + ldr r0, _021E6BC8 ; =0x021F9F6E + ldrh r0, [r0, r1] + cmp r4, r0 + beq _021E6BBC + cmp r2, r0 + beq _021E6BBC + ldr r0, _021E6BCC ; =0x021F9F70 + ldrh r5, [r0, r1] +_021E6BBC: + add r0, r5, #0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_021E6BC4: .word 0x021F9F6C +_021E6BC8: .word 0x021F9F6E +_021E6BCC: .word 0x021F9F70 + thumb_func_end ov5_021E6B54 + + thumb_func_start ov5_021E6BD0 +ov5_021E6BD0: ; 0x021E6BD0 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + add r0, r1, #0 + add r1, sp, #0 + bl ov5_021E6668 + ldr r0, [sp] + mov r1, #6 + mov r2, #0 + bl sub_02074570 + add r5, r0, #0 + ldr r0, [sp, #4] + mov r1, #6 + mov r2, #0 + bl sub_02074570 + cmp r5, #0xec + beq _021E6BFC + cmp r0, #0xec + bne _021E6C16 +_021E6BFC: + mov r1, #0x56 + add r0, r4, #0 + lsl r1, r1, #2 + bl sub_020770C4 + ldr r1, _021E6C1C ; =0x0000FFFF + cmp r0, r1 + bne _021E6C16 + mov r1, #0x56 + add r0, r4, #0 + lsl r1, r1, #2 + bl sub_02077134 +_021E6C16: + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021E6C1C: .word 0x0000FFFF + thumb_func_end ov5_021E6BD0 + + thumb_func_start ov5_021E6C20 +ov5_021E6C20: ; 0x021E6C20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r1, sp, #4 + str r0, [sp] + bl ov5_021E6668 + mov r4, #0 + add r7, sp, #4 +_021E6C32: + lsl r6, r4, #2 + ldr r0, [r7, r6] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + lsl r1, r4, #1 + add r2, sp, #0xc + strh r0, [r2, r1] + add r0, r2, #0 + ldrh r0, [r0, r1] + cmp r0, #0x84 + bne _021E6C56 + mov r0, #1 + eor r0, r4 + strb r0, [r5] + strb r4, [r5, #1] + b _021E6C68 +_021E6C56: + ldr r0, [r7, r6] + bl sub_02075D74 + cmp r0, #1 + bne _021E6C68 + mov r0, #1 + strb r4, [r5] + eor r0, r4 + strb r0, [r5, #1] +_021E6C68: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #2 + blo _021E6C32 + ldrb r0, [r5] + lsl r1, r0, #1 + add r0, sp, #0xc + ldrh r0, [r0, r1] + bl sub_02076F84 + add r4, r0, #0 + cmp r4, #0x1d + bne _021E6C98 + ldr r0, [sp] + bl sub_02026248 + mov r1, #2 + lsl r1, r1, #0xe + tst r0, r1 + beq _021E6C96 + mov r4, #0x20 + b _021E6C98 +_021E6C96: + mov r4, #0x1d +_021E6C98: + ldr r0, _021E6CE4 ; =0x0000013A + cmp r4, r0 + bne _021E6CB2 + ldr r0, [sp] + bl sub_02026248 + mov r1, #2 + lsl r1, r1, #0xe + tst r0, r1 + beq _021E6CB0 + ldr r4, _021E6CE8 ; =0x00000139 + b _021E6CB2 +_021E6CB0: + ldr r4, _021E6CE4 ; =0x0000013A +_021E6CB2: + ldr r0, _021E6CEC ; =0x000001EA + cmp r4, r0 + bne _021E6CBA + sub r4, r0, #1 +_021E6CBA: + ldrb r0, [r5, #1] + lsl r1, r0, #1 + add r0, sp, #0xc + ldrh r0, [r0, r1] + cmp r0, #0x84 + bne _021E6CDE + ldrb r0, [r5] + lsl r1, r0, #2 + add r0, sp, #4 + ldr r0, [r0, r1] + bl sub_02075D74 + cmp r0, #1 + beq _021E6CDE + ldrb r1, [r5, #1] + ldrb r0, [r5] + strb r0, [r5, #1] + strb r1, [r5] +_021E6CDE: + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E6CE4: .word 0x0000013A +_021E6CE8: .word 0x00000139 +_021E6CEC: .word 0x000001EA + thumb_func_end ov5_021E6C20 + + thumb_func_start ov5_021E6CF0 +ov5_021E6CF0: ; 0x021E6CF0 + push {r0, r1, r2, r3} + push {r4, r5, r6, lr} + sub sp, #0x20 + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0x13 + add r4, r3, #0 + bl sub_020759F0 + add r1, sp, #0x10 + strb r0, [r1] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + mov r3, #0x20 + bl sub_02073D80 + mov r1, #0 + add r0, sp, #0x10 + strb r1, [r0, #2] + mov r1, #4 + strh r1, [r0, #4] + add r0, r5, #0 + mov r1, #0x9b + add r2, sp, #0x14 + bl sub_02074B30 + add r0, r5, #0 + mov r1, #9 + add r2, sp, #0x10 + bl sub_02074B30 + add r2, sp, #0x10 + add r0, r5, #0 + mov r1, #0x9c + add r2, #2 + bl sub_02074B30 + add r0, sp, #0x30 + ldrb r0, [r0, #8] + cmp r0, #0 + beq _021E6D5A + add r0, r5, #0 + mov r1, #0x98 + add r2, sp, #0x38 + bl sub_02074B30 +_021E6D5A: + add r2, sp, #0x10 + mov r1, #1 + add r0, sp, #0x10 + strb r1, [r0, #1] + add r0, r5, #0 + mov r1, #0x4c + add r2, #1 + bl sub_02074B30 + ldr r0, _021E6DE4 ; =0x000001EE + mov r1, #4 + bl sub_0200B32C + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0x77 + add r2, r6, #0 + bl sub_02074B30 + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x40] + cmp r0, #4 + bne _021E6DCA + add r0, r4, #0 + bl sub_02025F20 + str r0, [sp, #0x1c] + add r0, r4, #0 + bl sub_02025F30 + str r0, [sp, #0x18] + add r0, r4, #0 + mov r1, #0x20 + bl sub_02025F04 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0x91 + add r2, r6, #0 + bl sub_02074B30 + add r0, r5, #0 + mov r1, #7 + add r2, sp, #0x1c + bl sub_02074B30 + add r0, r5, #0 + mov r1, #0x9d + add r2, sp, #0x18 + bl sub_02074B30 + add r0, r6, #0 + bl sub_020237BC +_021E6DCA: + mov r0, #0 + str r0, [sp] + ldr r2, [sp, #0x40] + ldr r3, [sp, #0x44] + add r0, r5, #0 + add r1, r4, #0 + bl sub_0209304C + add sp, #0x20 + pop {r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 +_021E6DE4: .word 0x000001EE + thumb_func_end ov5_021E6CF0 + + thumb_func_start ov5_021E6DE8 +ov5_021E6DE8: ; 0x021E6DE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0x10] + add r7, r0, #0 + ldr r0, [sp, #0x10] + mov r1, #0x13 + add r5, r2, #0 + add r6, r3, #0 + bl sub_020759F0 + add r1, sp, #0x14 + strb r0, [r1] + add r0, r5, #0 + bl sub_02026248 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02026280 + cmp r0, #0 + beq _021E6E3A + add r0, r6, #0 + add r1, r4, #0 + bl sub_02075E38 + cmp r0, #0 + bne _021E6E3A + mov r5, #0 +_021E6E20: + add r0, r4, #0 + bl sub_0201D30C + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl sub_02075E38 + cmp r0, #0 + bne _021E6E3A + add r5, r5, #1 + cmp r5, #4 + blt _021E6E20 +_021E6E3A: + mov r2, #1 + str r2, [sp] + str r4, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + add r0, r7, #0 + mov r3, #0x20 + bl sub_02073D80 + add r2, sp, #0x14 + mov r1, #0 + add r0, sp, #0x14 + strb r1, [r0, #1] + mov r1, #4 + strh r1, [r0, #2] + add r0, r7, #0 + mov r1, #0x9b + add r2, #2 + bl sub_02074B30 + add r0, r7, #0 + mov r1, #9 + add r2, sp, #0x14 + bl sub_02074B30 + add r2, sp, #0x14 + add r0, r7, #0 + mov r1, #0x9c + add r2, #1 + bl sub_02074B30 + add r0, r7, #0 + mov r1, #0x70 + add r2, sp, #0x30 + bl sub_02074B30 + ldr r0, _021E6EA4 ; =0x000001EE + mov r1, #4 + bl sub_0200B32C + add r4, r0, #0 + add r0, r7, #0 + mov r1, #0x77 + add r2, r4, #0 + bl sub_02074B30 + add r0, r4, #0 + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E6EA4: .word 0x000001EE + thumb_func_end ov5_021E6DE8 + + thumb_func_start ov5_021E6EA8 +ov5_021E6EA8: ; 0x021E6EA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #4 + str r1, [sp, #4] + add r7, r2, #0 + bl sub_02073C74 + add r1, sp, #0x10 + add r4, r0, #0 + add r0, r5, #0 + add r1, #1 + bl ov5_021E6C20 + add r1, r5, #0 + bl ov5_021E6B54 + add r6, r0, #0 + add r0, r7, #0 + bl sub_02025F20 + add r1, sp, #0x10 + str r0, [sp, #8] + ldrb r1, [r1, #1] + add r0, r5, #0 + bl ov5_021E622C + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r3, [sp, #8] + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov5_021E6DE8 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021E67B0 + add r1, sp, #0x10 + ldrb r1, [r1, #2] + add r0, r5, #0 + bl ov5_021E622C + add r1, sp, #0x10 + str r0, [sp, #0xc] + ldrb r1, [r1, #1] + add r0, r5, #0 + bl ov5_021E622C + add r2, r0, #0 + ldr r1, [sp, #0xc] + add r0, r4, #0 + bl ov5_021E6948 + mov r0, #1 + mov r1, #0 + bl sub_02017070 + add r3, r0, #0 + mov r0, #4 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + mov r2, #3 + bl sub_0209304C + cmp r6, #0xac + bne _021E6F44 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021E6BD0 +_021E6F44: + mov r1, #1 + add r0, sp, #0x10 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0x4c + add r2, sp, #0x10 + bl sub_02074B30 + ldr r0, [sp, #4] + add r1, r4, #0 + bl sub_0207A048 + add r0, r5, #0 + bl ov5_021E6B40 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021E6EA8 + + thumb_func_start ov5_021E6F6C +ov5_021E6F6C: ; 0x021E6F6C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_0207A0F8 + add r6, r0, #0 + mov r4, #0 + cmp r6, #0 + ble _021E6FBC + mov r7, #0xad +_021E6F7E: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0207A0FC + add r1, r7, #0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _021E6FB2 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #0xa + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x28 + beq _021E6FAE + cmp r0, #0x31 + bne _021E6FB2 +_021E6FAE: + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_021E6FB2: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, r6 + blt _021E6F7E +_021E6FBC: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E6F6C + + thumb_func_start ov5_021E6FC0 +ov5_021E6FC0: ; 0x021E6FC0 + push {r4, r5, r6, r7} + mov r4, #0 + add r3, r4, #0 +_021E6FC6: + ldrh r7, [r0] + add r5, r3, #0 + add r6, r1, #0 +_021E6FCC: + ldrh r2, [r6] + cmp r7, r2 + bne _021E6FD8 + mov r0, #1 + pop {r4, r5, r6, r7} + bx lr +_021E6FD8: + add r5, r5, #1 + add r6, r6, #2 + cmp r5, #2 + blt _021E6FCC + add r4, r4, #1 + add r0, r0, #2 + cmp r4, #2 + blt _021E6FC6 + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E6FC0 + + thumb_func_start ov5_021E6FF0 +ov5_021E6FF0: ; 0x021E6FF0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #4] + add r0, sp, #0x10 + add r4, sp, #0x18 + str r0, [sp] + add r7, sp, #8 + add r6, sp, #0x1c +_021E7004: + ldr r0, [r5, #0] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + strh r0, [r4] + ldr r0, [r5, #0] + mov r1, #7 + mov r2, #0 + bl sub_02074570 + ldr r1, [sp] + str r0, [r1, #0] + mov r1, #0 + ldr r0, [r5, #0] + add r2, r1, #0 + bl sub_02074570 + add r1, r0, #0 + ldrh r0, [r4] + bl sub_02075DAC + stmia r7!, {r0} + ldrh r0, [r4] + mov r1, #0x16 + bl sub_020759F0 + strh r0, [r6] + ldrh r0, [r4] + mov r1, #0x17 + bl sub_020759F0 + strh r0, [r6, #2] + ldr r0, [sp] + add r5, r5, #4 + add r0, r0, #4 + str r0, [sp] + ldr r0, [sp, #4] + add r4, r4, #2 + add r0, r0, #1 + add r6, r6, #4 + str r0, [sp, #4] + cmp r0, #2 + blo _021E7004 + add r0, sp, #8 + ldrh r1, [r0, #0x14] + cmp r1, #0xf + beq _021E706A + ldrh r0, [r0, #0x18] + cmp r0, #0xf + bne _021E7070 +_021E706A: + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021E7070: + cmp r1, #0xd + bne _021E707E + cmp r0, #0xd + bne _021E707E + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021E707E: + cmp r1, #0xd + beq _021E7086 + cmp r0, #0xd + bne _021E709A +_021E7086: + ldr r1, [sp, #0x10] + ldr r0, [sp, #0x14] + cmp r1, r0 + bne _021E7094 + add sp, #0x24 + mov r0, #0x14 + pop {r4, r5, r6, r7, pc} +_021E7094: + add sp, #0x24 + mov r0, #0x32 + pop {r4, r5, r6, r7, pc} +_021E709A: + ldr r1, [sp, #0xc] + ldr r0, [sp, #8] + cmp r0, r1 + bne _021E70A8 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021E70A8: + cmp r0, #2 + beq _021E70B0 + cmp r1, #2 + bne _021E70B6 +_021E70B0: + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021E70B6: + add r0, sp, #0x1c + add r1, sp, #0x20 + bl ov5_021E6FC0 + cmp r0, #0 + bne _021E70C8 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021E70C8: + add r0, sp, #8 + ldrh r1, [r0, #0x10] + ldrh r0, [r0, #0x12] + cmp r1, r0 + bne _021E70E6 + ldr r1, [sp, #0x10] + ldr r0, [sp, #0x14] + cmp r1, r0 + beq _021E70E0 + add sp, #0x24 + mov r0, #0x46 + pop {r4, r5, r6, r7, pc} +_021E70E0: + add sp, #0x24 + mov r0, #0x32 + pop {r4, r5, r6, r7, pc} +_021E70E6: + ldr r1, [sp, #0x10] + ldr r0, [sp, #0x14] + cmp r1, r0 + beq _021E70F4 + add sp, #0x24 + mov r0, #0x32 + pop {r4, r5, r6, r7, pc} +_021E70F4: + mov r0, #0x14 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E6FF0 + + thumb_func_start ov5_021E70FC +ov5_021E70FC: ; 0x021E70FC + push {r3, lr} + sub sp, #8 + add r1, sp, #0 + bl ov5_021E6668 + add r0, sp, #0 + bl ov5_021E6FF0 + add sp, #8 + pop {r3, pc} + thumb_func_end ov5_021E70FC + + thumb_func_start ov5_021E7110 +ov5_021E7110: ; 0x021E7110 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02055BC4 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02055BB8 + mov r1, #0x64 + mul r1, r0 + add r0, r4, #0 + add r5, r5, r1 + bl sub_02055C40 + cmp r0, #0 + beq _021E7134 + mov r0, #0xff + pop {r3, r4, r5, pc} +_021E7134: + ldr r2, _021E7150 ; =0x021F9F54 + mov r1, #0 +_021E7138: + ldrh r0, [r2] + cmp r5, r0 + bne _021E7142 + mov r0, #0xe6 + pop {r3, r4, r5, pc} +_021E7142: + add r1, r1, #1 + add r2, r2, #2 + cmp r1, #0xc + blo _021E7138 + mov r0, #0xff + pop {r3, r4, r5, pc} + nop +_021E7150: .word 0x021F9F54 + thumb_func_end ov5_021E7110 + + thumb_func_start ov5_021E7154 +ov5_021E7154: ; 0x021E7154 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + add r1, sp, #8 + str r0, [sp] + str r2, [sp, #4] + bl ov5_021E6668 + mov r6, #0 + add r4, r6, #0 + add r5, sp, #8 +_021E716A: + ldr r0, [r5, #0] + mov r1, #0xac + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021E7188 + ldr r0, [sp] + add r1, r4, #0 + bl sub_02026218 + mov r1, #1 + bl sub_02026260 + add r6, r6, #1 +_021E7188: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blo _021E716A + ldr r0, [sp] + bl sub_02026234 + cmp r0, #0 + bne _021E71D4 + cmp r6, #2 + bne _021E71D4 + ldr r0, [sp] + mov r1, #1 + bl sub_02026218 + bl sub_02026228 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0xff + bne _021E71D4 + ldr r0, [sp] + bl ov5_021E70FC + add r4, r0, #0 + bl sub_0201D2E8 + mov r1, #0x64 + mul r1, r0 + add r0, r1, #0 + ldr r1, _021E7274 ; =0x0000FFFF + bl sub_020E2178 + cmp r4, r0 + bls _021E71D4 + ldr r0, [sp] + bl ov5_021E6720 +_021E71D4: + ldr r0, [sp] + bl sub_02026250 + add r4, r0, #0 + ldr r0, [sp] + add r1, r4, #1 + bl sub_02026278 + ldr r0, [sp, #4] + bl ov5_021E7110 + add r1, r4, #1 + cmp r1, r0 + bne _021E726C + ldr r0, [sp] + mov r1, #0 + bl sub_02026278 + add r0, r7, #0 + bl ov5_021E6F6C + add r6, r0, #0 + add r0, r7, #0 + mov r5, #0 + bl sub_0207A0F8 + cmp r0, #0 + bls _021E726C +_021E720C: + add r0, r7, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0x4c + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _021E7260 + add r0, r4, #0 + mov r1, #3 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _021E7260 + add r0, r4, #0 + mov r1, #9 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x10] + cmp r0, #0 + beq _021E725A + cmp r0, r6 + blo _021E724A + sub r0, r0, r6 + str r0, [sp, #0x10] + b _021E724E +_021E724A: + sub r0, r0, #1 + str r0, [sp, #0x10] +_021E724E: + add r0, r4, #0 + mov r1, #9 + add r2, sp, #0x10 + bl sub_02074B30 + b _021E7260 +_021E725A: + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021E7260: + add r0, r7, #0 + add r5, r5, #1 + bl sub_0207A0F8 + cmp r5, r0 + blo _021E720C +_021E726C: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021E7274: .word 0x0000FFFF + thumb_func_end ov5_021E7154 + + thumb_func_start ov5_021E7278 +ov5_021E7278: ; 0x021E7278 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_0207A0F8 + add r6, r0, #0 + mov r5, #0 + cmp r6, #0 + ble _021E72B6 +_021E7288: + add r0, r7, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0x4c + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _021E72B0 + add r0, r4, #0 + mov r1, #9 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _021E72B0 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E72B0: + add r5, r5, #1 + cmp r5, r6 + blt _021E7288 +_021E72B6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E7278 + + thumb_func_start ov5_021E72BC +ov5_021E72BC: ; 0x021E72BC + push {r4, lr} + sub sp, #8 + add r4, r1, #0 + add r1, sp, #0 + bl ov5_021E6668 + ldr r0, [sp] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021E72EA + ldr r2, [sp] + add r0, r4, #0 + mov r1, #0 + bl sub_0200B5CC + ldr r2, [sp] + add r0, r4, #0 + mov r1, #2 + bl sub_0200B5EC +_021E72EA: + ldr r0, [sp, #4] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _021E7302 + ldr r2, [sp, #4] + add r0, r4, #0 + mov r1, #1 + bl sub_0200B5CC +_021E7302: + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E72BC + + thumb_func_start ov5_021E7308 +ov5_021E7308: ; 0x021E7308 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r1, sp, #0x18 + ldrb r6, [r1, #0x10] + add r5, r0, #0 + add r7, r2, #0 + add r1, r6, #0 + str r3, [sp, #8] + bl sub_02026218 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021E622C + add r5, r0, #0 + ldr r0, [sp, #0x2c] + add r1, r4, #0 + add r2, r5, #0 + bl sub_0200B5CC + ldr r0, [sp, #0xc] + bl sub_02026228 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021E6520 + lsl r0, r0, #0x18 + lsr r2, r0, #0x18 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + add r1, r7, #0 + mov r3, #3 + bl sub_0200B60C + add r0, r5, #0 + mov r1, #0x6f + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #2 + beq _021E7390 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #0x1d + beq _021E7380 + cmp r0, #0x20 + bne _021E7390 +_021E7380: + add r0, r5, #0 + mov r1, #0x4d + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _021E7390 + mov r4, #2 +_021E7390: + ldr r0, [sp, #0x2c] + ldr r1, [sp, #8] + add r2, r4, #0 + bl sub_0200BCF0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E7308 + + thumb_func_start ov5_021E73A0 +ov5_021E73A0: ; 0x021E73A0 + push {r3, r4, r5, lr} + add r5, r2, #0 + bl sub_0207A0FC + add r4, r0, #0 + bl sub_02076B10 + add r2, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl sub_0200B5CC + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E73A0 + + thumb_func_start ov5_021E73C8 +ov5_021E73C8: ; 0x021E73C8 + push {r4, lr} + add r4, r0, #0 + bl sub_02026234 + cmp r0, #0 + beq _021E73D8 + mov r0, #1 + pop {r4, pc} +_021E73D8: + add r0, r4, #0 + bl ov5_021E6238 + cmp r0, #0 + beq _021E73EA + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r4, pc} +_021E73EA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E73C8 + + thumb_func_start ov5_021E73F0 +ov5_021E73F0: ; 0x021E73F0 + cmp r0, #0x14 + bhi _021E73FC + bhs _021E740E + cmp r0, #0 + beq _021E740A + b _021E741A +_021E73FC: + cmp r0, #0x32 + bhi _021E7404 + beq _021E7412 + b _021E741A +_021E7404: + cmp r0, #0x46 + beq _021E7416 + b _021E741A +_021E740A: + mov r0, #3 + bx lr +_021E740E: + mov r0, #2 + bx lr +_021E7412: + mov r0, #1 + bx lr +_021E7416: + mov r0, #0 + bx lr +_021E741A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E73F0 + + thumb_func_start ov5_021E7420 +ov5_021E7420: ; 0x021E7420 + push {r3, lr} + bl ov5_021E70FC + bl ov5_021E73F0 + pop {r3, pc} + thumb_func_end ov5_021E7420 + + thumb_func_start ov5_021E742C +ov5_021E742C: ; 0x021E742C + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r4, r0, #0 + add r5, r1, #0 + mov r0, #8 + bl sub_02023790 + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_02073C74 + add r6, r0, #0 + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x14] + mov r5, #0 + add r7, sp, #0x34 +_021E7458: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x36 + mov r2, #0 + bl sub_02074470 + lsl r1, r5, #1 + strh r0, [r7, r1] + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x3a + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x30 + strb r0, [r1, r5] + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #4 + blo _021E7458 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_02074470 + add r7, r0, #0 + mov r5, #0 +_021E7490: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x46 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x24 + add r1, #2 + strb r0, [r1, r5] + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #6 + blo _021E7490 + add r0, r4, #0 + mov r1, #0xc + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #9] + add r0, r4, #0 + mov r1, #0x7a + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #8] + add r0, r4, #0 + mov r1, #0xb + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #7] + add r0, r4, #0 + mov r1, #0x9a + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #0xa] + add r0, r4, #0 + mov r1, #0x6e + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #5] + ldr r2, [sp, #0x10] + add r0, r4, #0 + mov r1, #0x91 + bl sub_02074470 + add r0, r4, #0 + mov r1, #0x9d + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #3] + add r0, r4, #0 + mov r1, #7 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x2c] + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #4] + ldr r1, _021E7718 ; =0x000001EA + ldr r0, [sp, #0x14] + cmp r0, r1 + bne _021E7564 + add r0, r4, #0 + mov r1, #0x98 + mov r2, #0 + bl sub_02074470 + add r5, r0, #0 + mov r0, #2 + mov r1, #1 + bl sub_02017070 + cmp r5, r0 + bne _021E7564 + ldr r0, [sp, #0x2c] + add r1, r7, #0 + bl sub_02075E38 + cmp r0, #0 + beq _021E7564 +_021E7550: + add r0, r7, #0 + bl sub_0201D30C + add r7, r0, #0 + ldr r0, [sp, #0x2c] + add r1, r7, #0 + bl sub_02075E38 + cmp r0, #0 + bne _021E7550 +_021E7564: + mov r2, #1 + str r2, [sp] + str r7, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r1, [sp, #0x14] + add r0, r6, #0 + mov r3, #0x20 + bl sub_02073D80 + mov r5, #0 + add r7, sp, #0x34 +_021E757E: + add r1, r5, #0 + lsl r2, r5, #1 + add r0, r6, #0 + add r1, #0x36 + add r2, r7, r2 + bl sub_02074B30 + add r1, r5, #0 + add r2, sp, #0x30 + add r0, r6, #0 + add r1, #0x3a + add r2, r2, r5 + bl sub_02074B30 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #4 + blo _021E757E + add r7, sp, #0x24 + mov r5, #0 + add r7, #2 +_021E75AA: + add r1, r5, #0 + add r0, r6, #0 + add r1, #0x46 + add r2, r7, r5 + bl sub_02074B30 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #6 + blo _021E75AA + add r2, sp, #0x20 + add r0, r6, #0 + mov r1, #0xc + add r2, #1 + bl sub_02074B30 + add r0, r6, #0 + mov r1, #0x7a + add r2, sp, #0x20 + bl sub_02074B30 + add r2, sp, #0x1c + add r0, r6, #0 + mov r1, #0xb + add r2, #3 + bl sub_02074B30 + add r2, sp, #0x1c + mov r1, #0x78 + add r0, sp, #0x18 + strb r1, [r0, #6] + add r0, r6, #0 + mov r1, #9 + add r2, #2 + bl sub_02074B30 + add r2, sp, #0x20 + add r0, r6, #0 + mov r1, #0x9a + add r2, #2 + bl sub_02074B30 + add r2, sp, #0x1c + add r0, r6, #0 + mov r1, #0x6e + add r2, #1 + bl sub_02074B30 + ldr r2, [sp, #0x10] + add r0, r6, #0 + mov r1, #0x91 + bl sub_02074B30 + add r2, sp, #0x18 + add r0, r6, #0 + mov r1, #0x9d + add r2, #3 + bl sub_02074B30 + add r0, r6, #0 + mov r1, #7 + add r2, sp, #0x2c + bl sub_02074B30 + add r0, r6, #0 + mov r1, #0x70 + add r2, sp, #0x1c + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0x98 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strh r0, [r1, #0xc] + add r0, r4, #0 + mov r1, #0x92 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #2] + add r0, r4, #0 + mov r1, #0x93 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #1] + add r0, r4, #0 + mov r1, #0x94 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1] + add r0, r6, #0 + mov r1, #0x98 + add r2, sp, #0x24 + bl sub_02074B30 + add r2, sp, #0x18 + add r0, r6, #0 + mov r1, #0x92 + add r2, #2 + bl sub_02074B30 + add r2, sp, #0x18 + add r0, r6, #0 + mov r1, #0x93 + add r2, #1 + bl sub_02074B30 + add r0, r6, #0 + mov r1, #0x94 + add r2, sp, #0x18 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0x99 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strh r0, [r1, #0xc] + add r0, r4, #0 + mov r1, #0x95 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #2] + add r0, r4, #0 + mov r1, #0x96 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1, #1] + add r0, r4, #0 + mov r1, #0x97 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x18 + strb r0, [r1] + add r0, r6, #0 + mov r1, #0x99 + add r2, sp, #0x24 + bl sub_02074B30 + add r2, sp, #0x18 + add r0, r6, #0 + mov r1, #0x95 + add r2, #2 + bl sub_02074B30 + add r2, sp, #0x18 + add r0, r6, #0 + mov r1, #0x96 + add r2, #1 + bl sub_02074B30 + add r0, r6, #0 + mov r1, #0x97 + add r2, sp, #0x18 + bl sub_02074B30 + add r0, r6, #0 + add r1, r4, #0 + bl sub_020775EC + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020181C4 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_021E7718: .word 0x000001EA + thumb_func_end ov5_021E742C + + thumb_func_start ov5_021E771C +ov5_021E771C: ; 0x021E771C + push {r4, r5, lr} + sub sp, #0x1c + mov r3, #0x46 + add r2, sp, #0 + strb r3, [r2, #3] + mov r5, #0 + strb r5, [r2, #2] + mov r3, #4 + strb r3, [r2, #1] + add r4, r0, #0 + strb r5, [r2] + bl ov5_021E742C + add r2, sp, #0 + add r0, r4, #0 + mov r1, #0x4c + add r2, #3 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #5 + add r2, r5, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r1, r5, #0 + add r2, sp, #4 + bl sub_0200B274 + add r0, r4, #0 + mov r1, #0x75 + add r2, sp, #4 + bl sub_02074B30 + add r2, sp, #0 + add r0, r4, #0 + mov r1, #0x4d + add r2, #2 + bl sub_02074B30 + add r2, sp, #0 + add r0, r4, #0 + mov r1, #0x9b + add r2, #1 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0x9c + add r2, sp, #0 + bl sub_02074B30 + add r0, r4, #0 + bl sub_0207418C + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E771C + + thumb_func_start ov5_021E7790 +ov5_021E7790: ; 0x021E7790 + push {r3, lr} + bl ov5_021E6FF0 + bl ov5_021E73F0 + pop {r3, pc} + thumb_func_end ov5_021E7790 + + .rodata + + + .global Unk_ov5_021F9F54 +Unk_ov5_021F9F54: ; 0x021F9F54 + .incbin "incbin/overlay5_rodata.bin", 0x1640, 0x1658 - 0x1640 + + .global Unk_ov5_021F9F6C +Unk_ov5_021F9F6C: ; 0x021F9F6C + .incbin "incbin/overlay5_rodata.bin", 0x1658, 0x168E - 0x1658 + + .global Unk_ov5_021F9FA2 +Unk_ov5_021F9FA2: ; 0x021F9FA2 + .incbin "incbin/overlay5_rodata.bin", 0x168E, 0xEEC + + + .bss + + + .global Unk_ov5_02202124 +Unk_ov5_02202124: ; 0x02202124 + .space 0x4 + diff --git a/asm/ov5_021E779C.s b/asm/ov5_021E779C.s new file mode 100644 index 000000000..5eff70795 --- /dev/null +++ b/asm/ov5_021E779C.s @@ -0,0 +1,6450 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021E779C +ov5_021E779C: ; 0x021E779C + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r1, #0 + add r1, r6, #0 + bl sub_020E1F6C + add r4, r1, #0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_020E1F6C + cmp r4, r1 + bne _021E77BA + mov r0, #1 + pop {r4, r5, r6, pc} +_021E77BA: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E779C + + thumb_func_start ov5_021E77C0 +ov5_021E77C0: ; 0x021E77C0 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r1, #0 + add r1, r6, #0 + bl sub_020E1F6C + add r4, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_020E1F6C + cmp r4, r0 + bne _021E77DE + mov r0, #1 + pop {r4, r5, r6, pc} +_021E77DE: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E77C0 + + thumb_func_start ov5_021E77E4 +ov5_021E77E4: ; 0x021E77E4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x30 + add r4, r1, #0 + mul r4, r0 + add r1, r5, r4 + ldr r0, [r1, #0x14] + cmp r0, #0 + beq _021E77FC + ldr r0, [r1, #0xc] + bl ov5_021E9640 +_021E77FC: + add r1, r5, r4 + ldr r0, [r1, #0x18] + cmp r0, #0 + beq _021E780A + ldr r0, [r1, #0x10] + bl ov5_021EF23C +_021E780A: + mov r1, #1 + add r0, r5, r4 + str r1, [r0, #0x28] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E77E4 + + thumb_func_start ov5_021E7814 +ov5_021E7814: ; 0x021E7814 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _021E7824 + ldr r0, [r4, #8] + bl ov5_021E9640 +_021E7824: + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021E7830 + ldr r0, [r4, #0xc] + bl ov5_021EF23C +_021E7830: + mov r0, #0 + str r0, [r4, #0x10] + str r0, [r4, #0x14] + pop {r4, pc} + thumb_func_end ov5_021E7814 + + thumb_func_start ov5_021E7838 +ov5_021E7838: ; 0x021E7838 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp, #4] + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r5, [sp, #0x2c] + ldr r4, [sp, #0x38] + cmp r0, #1 + bne _021E7890 + mov r1, #0 + add r2, r4, #0 + sub r0, r1, #1 +_021E7850: + add r1, r1, #1 + stmia r2!, {r0} + cmp r1, #4 + blt _021E7850 + cmp r5, #1 + bne _021E7876 + ldr r0, [sp, #0x30] + cmp r0, #1 + bne _021E786A + mov r0, #0 + add sp, #0x10 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021E786A: + mov r0, #0 + str r0, [r4, #0] + mov r0, #1 + add sp, #0x10 + str r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_021E7876: + mov r0, #0 + str r0, [r4, #0] + mov r0, #1 + str r0, [r4, #4] + cmp r5, #2 + bge _021E7884 + b _021E79A4 +_021E7884: + mov r0, #2 + str r0, [r4, #8] + mov r0, #3 + add sp, #0x10 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_021E7890: + add r0, r3, #0 + cmp r1, r0 + bge _021E789A + bl sub_02022974 +_021E789A: + ldr r1, [sp, #0x28] + ldr r0, [sp, #8] + cmp r0, r1 + bge _021E78A6 + bl sub_02022974 +_021E78A6: + ldr r1, [sp, #4] + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x28] + sub r1, r1, r0 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r7, r0, #5 + ldr r0, [sp, #8] + ldr r2, [sp, #0xc] + sub r0, r0, r3 + asr r1, r0, #4 + lsr r1, r1, #0x1b + add r1, r0, r1 + ldr r0, [sp, #0x34] + asr r6, r1, #5 + str r0, [sp] + ldr r0, [sp, #4] + ldr r1, [sp, #8] + bl ov5_021E8ABC + ldr r1, [sp, #0x34] + bl ov5_021E935C + add r1, r6, #0 + mul r1, r5 + add r1, r7, r1 + cmp r0, #3 + bhi _021E79A0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E78EC: ; jump table + .short _021E78F4 - _021E78EC - 2 ; case 0 + .short _021E791C - _021E78EC - 2 ; case 1 + .short _021E7946 - _021E78EC - 2 ; case 2 + .short _021E7972 - _021E78EC - 2 ; case 3 +_021E78F4: + sub r2, r1, r5 + str r1, [r4, #0xc] + sub r0, r2, #1 + str r0, [r4, #0] + str r2, [r4, #4] + sub r0, r1, #1 + str r0, [r4, #8] + sub r0, r7, #1 + bpl _021E790E + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0] + str r0, [r4, #8] +_021E790E: + sub r0, r6, #1 + bpl _021E79A4 + mov r0, #0 + mvn r0, r0 + add sp, #0x10 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_021E791C: + str r1, [r4, #8] + sub r0, r1, r5 + str r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #4] + add r0, r1, #1 + str r0, [r4, #0xc] + add r0, r7, #1 + cmp r0, r5 + blt _021E7938 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #4] + str r0, [r4, #0xc] +_021E7938: + sub r0, r6, #1 + bpl _021E79A4 + mov r0, #0 + mvn r0, r0 + add sp, #0x10 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021E7946: + str r1, [r4, #4] + sub r0, r1, #1 + add r1, r1, r5 + str r0, [r4, #0] + sub r0, r1, #1 + str r0, [r4, #8] + str r1, [r4, #0xc] + sub r0, r7, #1 + bpl _021E7960 + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0] + str r0, [r4, #8] +_021E7960: + ldr r0, [sp, #0x30] + add r1, r6, #1 + cmp r1, r0 + ble _021E79A4 + mov r0, #0 + mvn r0, r0 + add sp, #0x10 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_021E7972: + str r1, [r4, #0] + add r0, r1, #1 + str r0, [r4, #4] + add r0, r1, r5 + str r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #0xc] + add r0, r7, #1 + cmp r0, r5 + blt _021E798E + mov r0, #0 + mvn r0, r0 + str r0, [r4, #4] + str r0, [r4, #0xc] +_021E798E: + ldr r0, [sp, #0x30] + add r1, r6, #1 + cmp r1, r0 + ble _021E79A4 + mov r0, #0 + mvn r0, r0 + add sp, #0x10 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021E79A0: + bl sub_02022974 +_021E79A4: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E7838 + + thumb_func_start ov5_021E79A8 +ov5_021E79A8: ; 0x021E79A8 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r5, r0, #0 + sub r7, r6, #1 +_021E79B0: + ldr r1, _021E7A40 ; =0x0000086C + mov r0, #4 + bl sub_02018144 + lsl r4, r6, #2 + add r1, r5, r4 + add r1, #0x90 + str r0, [r1, #0] + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + ldr r0, _021E7A44 ; =0x00000864 + mov r1, #0 + str r1, [r2, r0] + add r2, r5, r4 + add r2, #0x90 + ldr r3, [r2, #0] + ldr r2, _021E7A48 ; =0x00000854 + ldr r1, [r5, #0] + add r0, r6, #0 + add r2, r3, r2 + bl ov5_021EEB84 + add r2, r5, r4 + add r2, #0x90 + ldr r3, [r2, #0] + ldr r2, _021E7A4C ; =0x00000858 + ldr r1, [r5, #0] + add r0, r6, #0 + add r2, r3, r2 + bl ov5_021EEB90 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _021E7A0C + mov r0, #4 + bl ov5_021E15F4 + add r1, r5, r4 + add r1, #0x90 + ldr r2, [r1, #0] + ldr r1, _021E7A50 ; =0x00000868 + str r0, [r2, r1] + b _021E7A18 +_021E7A0C: + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + ldr r0, _021E7A50 ; =0x00000868 + mov r1, #0 + str r1, [r2, r0] +_021E7A18: + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + mov r0, #0x86 + lsl r0, r0, #4 + str r7, [r1, r0] + add r1, r5, r4 + add r1, #0x90 + mov r2, #2 + ldr r1, [r1, #0] + add r0, r7, #0 + lsl r2, r2, #0xa + bl sub_020C4BB8 + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #4 + blo _021E79B0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7A40: .word 0x0000086C +_021E7A44: .word 0x00000864 +_021E7A48: .word 0x00000854 +_021E7A4C: .word 0x00000858 +_021E7A50: .word 0x00000868 + thumb_func_end ov5_021E79A8 + + thumb_func_start ov5_021E7A54 +ov5_021E7A54: ; 0x021E7A54 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r5, r0, #0 + add r7, r6, #0 +_021E7A5C: + ldr r1, _021E7AB8 ; =0x0000086C + mov r0, #4 + bl sub_02018144 + lsl r4, r6, #2 + add r1, r5, r4 + add r1, #0x90 + str r0, [r1, #0] + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E7ABC ; =0x00000864 + str r7, [r1, r0] + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _021E7A92 + mov r0, #4 + bl ov5_021E15F4 + add r1, r5, r4 + add r1, #0x90 + ldr r2, [r1, #0] + ldr r1, _021E7AC0 ; =0x00000868 + str r0, [r2, r1] + b _021E7A9C +_021E7A92: + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E7AC0 ; =0x00000868 + str r7, [r1, r0] +_021E7A9C: + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + mov r1, #0 + mov r0, #0x86 + mvn r1, r1 + lsl r0, r0, #4 + str r1, [r2, r0] + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #4 + blo _021E7A5C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7AB8: .word 0x0000086C +_021E7ABC: .word 0x00000864 +_021E7AC0: .word 0x00000868 + thumb_func_end ov5_021E7A54 + + thumb_func_start ov5_021E7AC4 +ov5_021E7AC4: ; 0x021E7AC4 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r5, r0, #0 + add r7, r6, #0 +_021E7ACC: + ldr r1, _021E7B3C ; =0x0000086C + mov r0, #4 + bl sub_02018144 + lsl r4, r6, #2 + add r1, r5, r4 + add r1, #0x90 + str r0, [r1, #0] + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E7B40 ; =0x00000864 + add r2, r5, r4 + str r7, [r1, r0] + add r2, #0x90 + ldr r3, [r2, #0] + ldr r2, _021E7B44 ; =0x00000854 + ldr r1, [r5, #0] + add r0, r6, #0 + add r2, r3, r2 + bl ov5_021EEB84 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _021E7B14 + mov r0, #4 + bl ov5_021E15F4 + add r1, r5, r4 + add r1, #0x90 + ldr r2, [r1, #0] + ldr r1, _021E7B48 ; =0x00000868 + str r0, [r2, r1] + b _021E7B20 +_021E7B14: + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + ldr r0, _021E7B48 ; =0x00000868 + mov r1, #0 + str r1, [r2, r0] +_021E7B20: + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + mov r1, #0 + mov r0, #0x86 + mvn r1, r1 + lsl r0, r0, #4 + str r1, [r2, r0] + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #4 + blo _021E7ACC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7B3C: .word 0x0000086C +_021E7B40: .word 0x00000864 +_021E7B44: .word 0x00000854 +_021E7B48: .word 0x00000868 + thumb_func_end ov5_021E7AC4 + + thumb_func_start ov5_021E7B4C +ov5_021E7B4C: ; 0x021E7B4C + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r7, r4, #0 +_021E7B54: + lsl r6, r4, #2 + add r0, r5, r6 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E7BA0 ; =0x00000864 + add r2, r5, r6 + str r7, [r1, r0] + add r2, #0x90 + ldr r3, [r2, #0] + ldr r2, _021E7BA4 ; =0x00000854 + ldr r1, [r5, #0] + add r0, r4, #0 + add r2, r3, r2 + bl ov5_021EEB84 + add r0, r5, r6 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E7BA8 ; =0x00000868 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021E7B84 + bl ov5_021E1610 +_021E7B84: + add r0, r5, r6 + add r0, #0x90 + ldr r2, [r0, #0] + mov r1, #0 + mov r0, #0x86 + mvn r1, r1 + lsl r0, r0, #4 + str r1, [r2, r0] + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021E7B54 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7BA0: .word 0x00000864 +_021E7BA4: .word 0x00000854 +_021E7BA8: .word 0x00000868 + thumb_func_end ov5_021E7B4C + + thumb_func_start ov5_021E7BAC +ov5_021E7BAC: ; 0x021E7BAC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + cmp r6, #0 + beq _021E7BD2 + mov r0, #4 + mov r1, #0x10 + bl sub_02018184 + add r4, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + mov r2, #0 + mov r3, #0x10 + str r4, [sp] + bl sub_02006DC8 + b _021E7BE8 +_021E7BD2: + bl sub_02022974 + mov r0, #0x10 + str r0, [sp] + mov r0, #0x43 + add r1, r7, #0 + mov r2, #4 + mov r3, #0 + bl sub_02006B38 + add r4, r0, #0 +_021E7BE8: + ldr r0, [r4, #0] + str r0, [r5, #0] + ldr r0, [r4, #4] + str r0, [r5, #0xc] + ldr r0, [r4, #8] + str r0, [r5, #4] + ldr r0, [r4, #0xc] + str r0, [r5, #8] + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E7BAC + + thumb_func_start ov5_021E7C00 +ov5_021E7C00: ; 0x021E7C00 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + ldr r4, [sp, #0x40] + lsl r6, r0, #2 + add r0, r4, r6 + ldr r0, [r0, #0x18] + str r1, [sp, #0xc] + ldr r5, [sp, #0x3c] + cmp r0, #0 + blt _021E7CC0 + ldr r1, [sp, #0x38] + mul r1, r3 + cmp r0, r1 + bge _021E7CC0 + add r1, r2, #0 + bl sub_02039F74 + add r1, r0, #0 + ldr r0, _021E7CC4 ; =0x0000FFFF + cmp r1, r0 + beq _021E7CC0 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0x10 + bl ov5_021E7BAC + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + ldr r2, [r4, r6] + bl sub_02006E18 + ldr r1, [r4, r6] + ldr r0, _021E7CC8 ; =0x00000868 + ldr r3, [r1, r0] + cmp r3, #0 + beq _021E7C64 + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + ldr r2, [sp, #0xc] + str r0, [sp] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x1c] + bl ov5_021E16CC +_021E7C64: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + ldr r0, [sp, #0xc] + ldr r7, [r4, r6] + bl ov5_021EFA8C + ldr r3, _021E7CCC ; =0x00000864 + str r0, [sp] + add r0, r7, r3 + add r2, r3, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x10 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xf8 + sub r2, #0x64 + sub r3, #0x10 + ldr r0, [r0, #0] + ldr r1, [sp, #0x14] + add r2, r7, r2 + add r3, r7, r3 + bl ov5_021E976C + str r0, [r4, #8] + ldr r0, [r4, #0x14] + add r3, r4, #0 + add r0, r0, #1 + str r0, [r4, #0x14] + ldr r2, [r4, r6] + ldr r6, _021E7CD0 ; =0x00000858 + add r5, #0xf8 + add r0, r2, r6 + str r0, [sp] + add r0, r4, #0 + add r0, #0x10 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r5, r6, #4 + ldr r1, [sp, #0x18] + ldr r2, [r2, r5] + add r3, #0x14 + bl ov5_021EF1F0 + str r0, [r4, #0xc] +_021E7CC0: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7CC4: .word 0x0000FFFF +_021E7CC8: .word 0x00000868 +_021E7CCC: .word 0x00000864 +_021E7CD0: .word 0x00000858 + thumb_func_end ov5_021E7C00 + + thumb_func_start ov5_021E7CD4 +ov5_021E7CD4: ; 0x021E7CD4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x2c + mov ip, r2 + ldr r2, _021E7D88 ; =0x00000820 + add r7, r1, #0 + add r2, sp + ldr r4, [r2, #0x18] + lsl r6, r0, #2 + add r0, r4, r6 + ldr r0, [r0, #0x18] + add r1, r3, #0 + ldr r5, [r2, #0x14] + cmp r0, #0 + blt _021E7D7C + ldr r2, [r2, #0x10] + mul r2, r1 + cmp r0, r2 + bge _021E7D7C + mov r1, ip + bl sub_02039F74 + add r1, r0, #0 + ldr r0, _021E7D8C ; =0x0000FFFF + cmp r1, r0 + beq _021E7D7C + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0xc + bl ov5_021E7BAC + add r0, r5, #0 + add r0, #0xf8 + mov r1, #2 + ldr r0, [r0, #0] + lsl r1, r1, #0xa + add r2, sp, #0x1c + bl sub_02006E18 + ldr r1, [r4, r6] + ldr r0, _021E7D90 ; =0x00000868 + ldr r3, [r1, r0] + cmp r3, #0 + beq _021E7D4A + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r2, r7, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + bl ov5_021E16CC +_021E7D4A: + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + add r0, r7, #0 + ldr r6, [r4, r6] + bl ov5_021EFA8C + ldr r3, _021E7D94 ; =0x00000864 + str r0, [sp] + add r0, r6, r3 + add r2, r3, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x10 + str r0, [sp, #8] + add r5, #0xf8 + sub r2, #0x64 + sub r3, #0x10 + ldr r0, [r5, #0] + ldr r1, [sp, #0x10] + add r2, r6, r2 + add r3, r6, r3 + bl ov5_021E976C + str r0, [r4, #8] +_021E7D7C: + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7D88: .word 0x00000820 +_021E7D8C: .word 0x0000FFFF +_021E7D90: .word 0x00000868 +_021E7D94: .word 0x00000864 + thumb_func_end ov5_021E7CD4 + + thumb_func_start ov5_021E7D98 +ov5_021E7D98: ; 0x021E7D98 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + ldr r4, [sp, #0x38] + lsl r6, r0, #2 + add r0, r4, r6 + ldr r0, [r0, #0x18] + add r7, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r5, [sp, #0x34] + cmp r0, #0 + blt _021E7E1C + ldr r3, [sp, #0x30] + mul r3, r2 + cmp r0, r3 + bge _021E7E1C + bl sub_02039F74 + add r1, r0, #0 + ldr r0, _021E7E20 ; =0x0000FFFF + cmp r1, r0 + beq _021E7E1C + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0xc + bl ov5_021E7BAC + add r0, r5, #0 + add r0, #0xf8 + mov r1, #2 + ldr r0, [r0, #0] + lsl r1, r1, #0xa + bl sub_02006E28 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + bl sub_02006E28 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + add r0, r7, #0 + ldr r6, [r4, r6] + bl ov5_021EFA8C + ldr r3, _021E7E24 ; =0x00000864 + str r0, [sp] + add r0, r6, r3 + add r2, r3, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x10 + str r0, [sp, #8] + add r5, #0xf8 + sub r2, #0x64 + sub r3, #0x10 + ldr r0, [r5, #0] + ldr r1, [sp, #0x10] + add r2, r6, r2 + add r3, r6, r3 + bl ov5_021E976C + str r0, [r4, #8] +_021E7E1C: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7E20: .word 0x0000FFFF +_021E7E24: .word 0x00000864 + thumb_func_end ov5_021E7D98 + + thumb_func_start ov5_021E7E28 +ov5_021E7E28: ; 0x021E7E28 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r4, r1, #0 + str r0, [sp, #0xc] + str r2, [sp, #4] + ldr r6, [sp, #0x44] + add r1, r0, #0 + bmi _021E7F0C + ldr r2, [sp, #0x38] + ldr r1, [sp, #0x3c] + add r5, r2, #0 + mul r5, r1 + add r1, r0, #0 + cmp r1, r5 + bge _021E7F0C + add r1, r3, #0 + bl sub_02039F74 + add r1, r0, #0 + ldr r0, _021E7F10 ; =0x0000FFFF + cmp r1, r0 + beq _021E7F0C + add r0, r6, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0x10 + bl ov5_021E7BAC + add r5, r6, #0 + add r0, r6, #0 + add r0, #0xf8 + lsl r4, r4, #2 + add r5, #0x90 + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + ldr r2, [r5, r4] + bl sub_02006E18 + ldr r1, [r5, r4] + ldr r0, _021E7F14 ; =0x00000868 + ldr r3, [r1, r0] + cmp r3, #0 + beq _021E7E94 + add r0, r6, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + ldr r2, [sp, #4] + str r0, [sp] + add r0, r6, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x1c] + bl ov5_021E16CC +_021E7E94: + ldr r0, [r5, r4] + str r0, [sp, #8] + ldr r0, [sp, #4] + bl ov5_021EFA8C + str r0, [sp] + add r0, r6, #0 + mov r7, #2 + add r0, #0xf8 + ldr r2, [sp, #8] + lsl r7, r7, #0xa + add r2, r2, r7 + ldr r3, [sp, #8] + add r7, #0x54 + ldr r0, [r0, #0] + ldr r1, [sp, #0x14] + add r3, r3, r7 + bl ov5_021E97AC + ldr r1, [sp, #0x40] + cmp r1, #1 + bne _021E7EC4 + bl ov5_021D53A4 +_021E7EC4: + ldr r0, _021E7F18 ; =0x00000864 + ldr r1, [r5, r4] + mov r2, #1 + str r2, [r1, r0] + mov ip, r0 + add r0, r6, #0 + mov r2, ip + mov r3, ip + add r0, #0xf8 + ldr r7, [r5, r4] + sub r2, #8 + sub r3, #0xc + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + ldr r2, [r7, r2] + ldr r3, [r7, r3] + bl ov5_021EF158 + mov r2, #0x86 + ldr r1, [r5, r4] + ldr r0, [sp, #0xc] + lsl r2, r2, #4 + str r0, [r1, r2] + add r0, r6, #0 + add r0, #0xfc + ldr r3, [r0, #0] + cmp r3, #0 + beq _021E7F0C + mov r0, #1 + lsl r0, r0, #8 + ldr r4, [r5, r4] + add r2, #8 + ldr r0, [r6, r0] + ldr r1, [sp, #0xc] + ldr r2, [r4, r2] + blx r3 +_021E7F0C: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E7F10: .word 0x0000FFFF +_021E7F14: .word 0x00000868 +_021E7F18: .word 0x00000864 + thumb_func_end ov5_021E7E28 + + thumb_func_start ov5_021E7F1C +ov5_021E7F1C: ; 0x021E7F1C + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x1fc + sub sp, #0x2c + str r2, [sp, #4] + ldr r2, _021E7FE0 ; =0x00000820 + add r7, r0, #0 + add r2, sp + add r4, r1, #0 + ldr r5, [r2, #0x1c] + cmp r7, #0 + blt _021E7FD2 + ldr r1, [r2, #0x10] + ldr r2, [r2, #0x14] + mul r2, r1 + cmp r7, r2 + bge _021E7FD2 + add r1, r3, #0 + bl sub_02039F74 + add r1, r0, #0 + ldr r0, _021E7FE4 ; =0x0000FFFF + cmp r1, r0 + beq _021E7FD2 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0xc + bl ov5_021E7BAC + add r0, r5, #0 + add r0, #0xf8 + mov r1, #2 + ldr r0, [r0, #0] + lsl r1, r1, #0xa + add r2, sp, #0x1c + bl sub_02006E18 + add r6, r5, #0 + lsl r4, r4, #2 + add r6, #0x90 + ldr r1, [r6, r4] + ldr r0, _021E7FE8 ; =0x00000868 + ldr r3, [r1, r0] + cmp r3, #0 + beq _021E7F92 + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + ldr r2, [sp, #4] + str r0, [sp] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + bl ov5_021E16CC +_021E7F92: + ldr r0, [r6, r4] + str r0, [sp, #8] + ldr r0, [sp, #4] + bl ov5_021EFA8C + str r0, [sp] + add r5, #0xf8 + ldr r0, [r5, #0] + mov r5, #2 + ldr r2, [sp, #8] + lsl r5, r5, #0xa + add r2, r2, r5 + ldr r3, [sp, #8] + add r5, #0x54 + ldr r1, [sp, #0x10] + add r3, r3, r5 + bl ov5_021E97AC + ldr r1, _021E7FE0 ; =0x00000820 + add r1, sp + ldr r1, [r1, #0x18] + cmp r1, #1 + bne _021E7FC4 + bl ov5_021D53A4 +_021E7FC4: + ldr r1, [r6, r4] + ldr r0, _021E7FEC ; =0x00000864 + mov r2, #1 + str r2, [r1, r0] + ldr r1, [r6, r4] + sub r0, r0, #4 + str r7, [r1, r0] +_021E7FD2: + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x1fc + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021E7FE0: .word 0x00000820 +_021E7FE4: .word 0x0000FFFF +_021E7FE8: .word 0x00000868 +_021E7FEC: .word 0x00000864 + thumb_func_end ov5_021E7F1C + + thumb_func_start ov5_021E7FF0 +ov5_021E7FF0: ; 0x021E7FF0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r4, r1, #0 + str r0, [sp, #0xc] + str r2, [sp, #4] + ldr r7, [sp, #0x44] + add r1, r0, #0 + bmi _021E80AA + ldr r2, [sp, #0x38] + ldr r1, [sp, #0x3c] + add r5, r2, #0 + mul r5, r1 + add r1, r0, #0 + cmp r1, r5 + bge _021E80AA + add r1, r3, #0 + bl sub_02039F74 + add r1, r0, #0 + ldr r0, _021E80B0 ; =0x0000FFFF + cmp r1, r0 + beq _021E80AA + add r0, r7, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0x10 + bl ov5_021E7BAC + add r5, r7, #0 + add r0, r7, #0 + add r0, #0xf8 + lsl r4, r4, #2 + add r5, #0x90 + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + ldr r2, [r5, r4] + bl sub_02006E18 + ldr r1, [r5, r4] + ldr r0, _021E80B4 ; =0x00000868 + ldr r3, [r1, r0] + cmp r3, #0 + beq _021E805C + add r0, r7, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + ldr r2, [sp, #4] + str r0, [sp] + add r0, r7, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x1c] + bl ov5_021E16CC +_021E805C: + add r0, r7, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x14] + bl sub_02006E28 + ldr r0, [r5, r4] + ldr r3, _021E80B8 ; =0x0000085C + mov ip, r0 + add r0, r7, #0 + mov r2, ip + add r0, #0xf8 + ldr r2, [r2, r3] + sub r3, r3, #4 + mov r6, ip + str r3, [sp, #8] + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + ldr r3, [r6, r3] + bl ov5_021EF158 + mov r2, #0x86 + ldr r1, [r5, r4] + ldr r0, [sp, #0xc] + lsl r2, r2, #4 + str r0, [r1, r2] + add r0, r7, #0 + add r0, #0xfc + ldr r3, [r0, #0] + cmp r3, #0 + beq _021E80AA + mov r0, #1 + lsl r0, r0, #8 + ldr r4, [r5, r4] + add r2, #8 + ldr r0, [r7, r0] + ldr r1, [sp, #0xc] + ldr r2, [r4, r2] + blx r3 +_021E80AA: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E80B0: .word 0x0000FFFF +_021E80B4: .word 0x00000868 +_021E80B8: .word 0x0000085C + thumb_func_end ov5_021E7FF0 + + thumb_func_start ov5_021E80BC +ov5_021E80BC: ; 0x021E80BC + ldr r1, [r0, #0] + cmp r1, #0 + bne _021E80CC + ldr r0, [r0, #4] + cmp r0, #0 + bne _021E80CC + mov r0, #1 + bx lr +_021E80CC: + mov r0, #0 + bx lr + thumb_func_end ov5_021E80BC + + thumb_func_start ov5_021E80D0 +ov5_021E80D0: ; 0x021E80D0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + str r3, [sp] + add r0, sp, #0x10 + add r7, r1, #0 + ldrb r1, [r0, #0x14] + mov r0, #0x30 + str r2, [sp, #8] + add r5, r1, #0 + mul r5, r0 + add r0, r4, #0 + str r0, [sp, #4] + add r0, #0x2c + str r0, [sp, #4] + ldr r0, [r0, r5] + cmp r0, #0 + beq _021E80F8 + bl sub_02022974 +_021E80F8: + ldr r0, [sp, #4] + mov r1, #1 + str r1, [r0, r5] + add r6, r4, r5 + add r0, sp, #0x10 + add r1, r6, #0 + ldrb r2, [r0, #0x18] + add r1, #0x30 + add r5, r4, #0 + strb r2, [r1] + add r2, r6, #0 + ldr r1, [sp, #8] + str r7, [r6, #0x1c] + str r1, [r6, #0x20] + ldr r1, [sp] + add r2, #0x24 + strb r1, [r2] + ldrb r0, [r0, #0x10] + add r1, r6, #0 + add r1, #0x25 + strb r0, [r1] + ldr r1, [sp] + add r5, #0x90 + lsl r3, r1, #2 + ldr r1, [r5, r3] + lsl r2, r0, #2 + str r1, [r6, #4] + ldr r0, [r5, r2] + add r1, r6, #0 + str r0, [r6, #8] + add r1, #0x26 + mov r0, #0 + strb r0, [r1] + str r0, [r6, #0x28] + add r0, r4, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + bne _021E814E + add r1, r4, #0 + add r1, #0xb4 + mov r0, #0 + str r0, [r1, #0] +_021E814E: + mov r1, #0x86 + ldr r0, [r5, r3] + lsl r1, r1, #4 + str r7, [r0, r1] + ldr r2, [r5, r2] + ldr r0, [sp, #8] + str r0, [r2, r1] + add r0, r4, #0 + add r0, #0xa0 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xa0 + strb r1, [r0] + add r0, r4, #0 + add r0, #0xa1 + ldrb r0, [r0] + add r4, #0xa1 + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + strb r0, [r4] + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021E80D0 + + thumb_func_start ov5_021E8188 +ov5_021E8188: ; 0x021E8188 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r0, r5, #0 + add r0, #0xa2 + ldrb r1, [r0] + add r4, r5, #0 + mov r0, #0x30 + add r2, r1, #0 + mul r2, r0 + add r0, #0xd4 + add r3, r5, #4 + ldr r0, [r5, r0] + add r6, r3, r2 + add r4, #0xcc + cmp r0, #0 + bne _021E81D8 + ldr r0, [r4, #0x20] + cmp r0, #1 + bne _021E81D8 + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _021E8240 + ldr r0, [r4, #0x14] + ldr r1, [r0, #0] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0] + cmp r1, r0 + ble _021E81C6 + bl sub_02022974 +_021E81C6: + ldr r0, [r4, #0x10] + ldr r1, [r0, #0] + ldr r0, [r4, #0x14] + ldr r0, [r0, #0] + sub r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0x10 + cmp r1, r0 + bge _021E81DA +_021E81D8: + b _021E8320 +_021E81DA: + ldr r1, [r4, #0xc] + add r2, sp, #0x10 + ldr r0, [r1, #0] + ldr r1, [r1, #8] + add r3, sp, #0xc + bl ov5_021E9230 + str r5, [sp] + mov r3, #0x43 + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, #8 + ldr r0, [sp, #0x10] + ldr r1, [sp, #0xc] + ldr r3, [r5, r3] + bl ov5_021E8F90 + ldr r2, [r4, #0xc] + add r3, r4, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021E8222 + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + bne _021E8302 +_021E8222: + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021E8236 + bl sub_02022974 +_021E8236: + mov r0, #0 + str r0, [r4, #0x18] + str r0, [r4, #0x10] + str r0, [r4, #0x14] + b _021E8320 +_021E8240: + ldr r2, [r4, #0xc] + ldr r3, [r4, #0] + ldr r7, [r2, #0] + cmp r3, r7 + beq _021E8258 + ldr r1, [r4, #8] + ldr r0, [r2, #8] + cmp r1, r0 + beq _021E8258 + bl sub_02022974 + b _021E8320 +_021E8258: + cmp r3, r7 + bne _021E8264 + ldr r1, [r4, #8] + ldr r0, [r2, #8] + cmp r1, r0 + beq _021E8320 +_021E8264: + mov r3, #1 + str r3, [r4, #0x18] + ldr r2, [r4, #0xc] + ldr r0, [r4, #0] + ldr r1, [r2, #0] + cmp r0, r1 + beq _021E82B8 + cmp r0, r1 + ble _021E8282 + str r4, [r4, #0x10] + ldr r0, [r4, #0xc] + str r0, [r4, #0x14] + mov r0, #3 + strb r0, [r4, #0x1c] + b _021E8288 +_021E8282: + str r2, [r4, #0x10] + str r4, [r4, #0x14] + strb r3, [r4, #0x1c] +_021E8288: + ldr r0, [r4, #0] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021E82A2 + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + bne _021E8302 +_021E82A2: + ldr r0, [r4, #0] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021E8318 + bl sub_02022974 + b _021E8318 +_021E82B8: + add r1, r5, #0 + add r1, #0xd8 + add r0, r5, #0 + ldr r1, [r1, #0] + add r0, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #8] + cmp r0, r1 + ble _021E82DA + add r0, r4, #0 + add r0, #8 + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + add r0, #8 + str r0, [r4, #0x14] + mov r0, #4 + b _021E82E6 +_021E82DA: + add r2, #8 + add r0, r4, #0 + str r2, [r4, #0x10] + add r0, #8 + str r0, [r4, #0x14] + mov r0, #2 +_021E82E6: + strb r0, [r4, #0x1c] + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021E8304 + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + beq _021E8304 +_021E8302: + b _021E8550 +_021E8304: + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021E8318 + bl sub_02022974 +_021E8318: + ldrb r0, [r4, #0x1c] + add r1, r5, #0 + bl ov5_021E9190 +_021E8320: + add r0, r5, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #3 + bls _021E832C + b _021E84A6 +_021E832C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8338: ; jump table + .short _021E8340 - _021E8338 - 2 ; case 0 + .short _021E8396 - _021E8338 - 2 ; case 1 + .short _021E84A6 - _021E8338 - 2 ; case 2 + .short _021E8492 - _021E8338 - 2 ; case 3 +_021E8340: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + add r1, r6, r0 + add r1, #0x20 + ldrb r1, [r1] + lsl r1, r1, #2 + add r1, r5, r1 + add r1, #0x80 + ldr r1, [r1, #0] + cmp r1, #1 + beq _021E8380 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r4, r5, #0 + str r1, [sp] + str r5, [sp, #4] + str r6, [sp, #8] + add r4, #0xf4 + add r1, r5, #0 + add r2, r5, #0 + add r3, r5, #0 + ldr r4, [r4, #0] + add r1, #0xb8 + add r2, #0xbc + add r3, #0xc0 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + ldr r4, [r4, #4] + blx r4 +_021E8380: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + add r6, #0x22 + mov r1, #1 + add r0, r0, #1 + strb r0, [r6] + add r0, r5, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021E84A6 +_021E8396: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + sub r0, r0, #1 + add r0, r6, r0 + add r0, #0x20 + ldrb r0, [r0] + lsl r0, r0, #2 + add r0, r5, r0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021E83CE + add r0, r6, #0 + bl ov5_021E7814 + add r1, r6, #0 + add r1, #0x22 + ldrb r1, [r1] + mov r0, #0 + sub r1, r1, #1 + add r1, r6, r1 + add r1, #0x20 + ldrb r1, [r1] + lsl r1, r1, #2 + add r1, r5, r1 + add r1, #0x80 + str r0, [r1, #0] +_021E83CE: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + cmp r0, #2 + bhi _021E84A6 + add r0, r6, #0 + add r0, #0x10 + bl ov5_021E80BC + cmp r0, #1 + bne _021E84A6 + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + cmp r0, #2 + blo _021E83F4 + mov r0, #1 + str r0, [r6, #0x24] + b _021E83FC +_021E83F4: + add r0, r5, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] +_021E83FC: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + sub r0, r0, #1 + lsl r0, r0, #2 + ldr r2, [r6, r0] + ldr r0, _021E8554 ; =0x00000864 + ldr r1, [r2, r0] + cmp r1, #1 + bne _021E8452 + sub r0, #0x10 + ldr r0, [r2, r0] + bl sub_020B3C0C + cmp r0, #0 + beq _021E843C + add r2, r0, #0 + add r2, #8 + beq _021E8430 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _021E8430 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _021E8432 +_021E8430: + mov r1, #0 +_021E8432: + cmp r1, #0 + beq _021E843C + ldr r1, [r1, #0] + add r4, r0, r1 + b _021E843E +_021E843C: + mov r4, #0 +_021E843E: + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + cmp r0, #1 + bne _021E8452 + add r0, r4, #0 + bl ov5_021D53A4 +_021E8452: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + mov r2, #0x86 + lsl r2, r2, #4 + sub r0, r0, #1 + lsl r0, r0, #2 + ldr r4, [r6, r0] + ldr r1, [r4, r2] + cmp r1, #0 + blt _021E84A6 + add r0, r5, #0 + add r0, #0xc0 + ldr r3, [r0, #0] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r3 + cmp r1, r0 + bge _021E84A6 + add r0, r5, #0 + add r0, #0xfc + ldr r3, [r0, #0] + cmp r3, #0 + beq _021E84A6 + mov r0, #1 + lsl r0, r0, #8 + add r2, #8 + ldr r0, [r5, r0] + ldr r2, [r4, r2] + blx r3 + b _021E84A6 +_021E8492: + add r6, #0x10 + add r0, r6, #0 + bl ov5_021E80BC + cmp r0, #1 + bne _021E84A6 + add r0, r5, #0 + mov r1, #0 + add r0, #0xa0 + strb r1, [r0] +_021E84A6: + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + bne _021E84C8 + add r0, r5, #0 + mov r1, #0 + add r0, #0xa2 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa1 + strb r1, [r0] + mov r0, #2 + add r5, #0xb4 + add sp, #0x14 + str r0, [r5, #0] + pop {r4, r5, r6, r7, pc} +_021E84C8: + add r0, r5, #0 + bl ov5_021E8DAC + cmp r0, #1 + bne _021E8550 + add r0, r5, #0 + add r0, #0xa2 + ldrb r1, [r0] + mov r0, #0x30 + mov r2, #0 + mul r0, r1 + add r0, r5, r0 + str r2, [r0, #0x2c] + add r0, r5, #0 + bl ov5_021E8DBC + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0xa0 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa2 + ldrb r0, [r0] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r5, #0 + add r1, r2, r1 + add r0, #0xa2 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + beq _021E851E + mov r1, #0 + b _021E852E +_021E851E: + add r0, r5, #0 + mov r1, #0 + add r0, #0xa2 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa1 + strb r1, [r0] + mov r1, #2 +_021E852E: + add r0, r5, #0 + add r0, #0xb4 + str r1, [r0, #0] + ldr r0, [r5, #0x6c] + cmp r0, #1 + bne _021E8550 + mov r0, #0 + str r0, [r5, #0x6c] + add r0, r5, #0 + add r0, #0x70 + ldrb r0, [r0] + add r1, r5, #0 + bl ov5_021E8DD4 + add r0, r5, #0 + bl ov5_021E8D50 +_021E8550: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E8554: .word 0x00000864 + thumb_func_end ov5_021E8188 + + thumb_func_start ov5_021E8558 +ov5_021E8558: ; 0x021E8558 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + ldr r4, [sp, #0x34] + str r2, [sp, #0x10] + add r7, r0, #0 + ldr r0, [r4, #0x6c] + add r5, r3, #0 + str r1, [sp, #0xc] + ldr r6, [sp, #0x30] + cmp r0, #1 + bne _021E8572 + bl sub_02022974 +_021E8572: + add r0, r6, #0 + add r1, r4, #0 + add r2, sp, #0x14 + bl ov5_021E8C58 + cmp r0, #1 + bne _021E85F0 + add r1, sp, #0x14 + ldrb r1, [r1] + add r0, r4, #0 + bl ov5_021E77E4 + add r0, r4, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #2 + blo _021E85D4 + mov r0, #1 + str r0, [r4, #0x6c] + ldr r0, [sp, #0xc] + str r7, [r4, #0x74] + str r0, [r4, #0x78] + add r1, r4, #0 + ldr r0, [sp, #0x10] + add r1, #0x7c + strb r0, [r1] + add r0, r4, #0 + add r0, #0x7d + strb r5, [r0] + ldr r0, [sp, #0x10] + add r2, r4, #0 + add r2, #0x90 + lsl r1, r0, #2 + ldr r0, [r2, r1] + str r0, [r4, #0x64] + lsl r0, r5, #2 + ldr r3, [r2, r0] + str r3, [r4, #0x68] + add r4, #0x70 + strb r6, [r4] + ldr r3, [r2, r1] + mov r1, #0x86 + lsl r1, r1, #4 + str r7, [r3, r1] + ldr r2, [r2, r0] + ldr r0, [sp, #0xc] + add sp, #0x18 + str r0, [r2, r1] + pop {r3, r4, r5, r6, r7, pc} +_021E85D4: + add r0, r4, #0 + str r5, [sp] + add r0, #0xa1 + ldrb r0, [r0] + ldr r2, [sp, #0xc] + add r1, r7, #0 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r3, [sp, #0x10] + add r0, r4, #0 + bl ov5_021E80D0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021E85F0: + add r0, r4, #0 + str r5, [sp] + add r0, #0xa1 + ldrb r0, [r0] + ldr r2, [sp, #0xc] + add r1, r7, #0 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r3, [sp, #0x10] + add r0, r4, #0 + bl ov5_021E80D0 + cmp r0, #1 + beq _021E8610 + bl sub_02022974 +_021E8610: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E8558 + + thumb_func_start ov5_021E8614 +ov5_021E8614: ; 0x021E8614 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r4, r6, #0 + lsl r5, r0, #2 + add r4, #0x90 + ldr r1, [r4, r5] + ldr r0, _021E8660 ; =0x00000864 + mov r2, #0 + str r2, [r1, r0] + ldr r1, [r4, r5] + sub r0, #8 + ldr r0, [r1, r0] + bl ov5_021EF1DC + ldr r1, [r4, r5] + ldr r0, _021E8664 ; =0x00000868 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021E863E + bl ov5_021E1610 +_021E863E: + add r3, r6, #0 + add r3, #0x90 + mov r0, #0 + mov r2, #0x86 + ldr r1, [r3, r5] + mvn r0, r0 + lsl r2, r2, #4 + str r0, [r1, r2] + ldr r1, [r3, r5] + sub r2, #0x60 + bl sub_020C4BB8 + add r0, r6, r5 + mov r1, #1 + add r0, #0x80 + str r1, [r0, #0] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021E8660: .word 0x00000864 +_021E8664: .word 0x00000868 + thumb_func_end ov5_021E8614 + + thumb_func_start ov5_021E8668 +ov5_021E8668: ; 0x021E8668 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r5, r1, #0 + add r1, r4, #0 + add r6, r0, #0 + add r7, r2, #0 + str r3, [sp] + bl ov5_021E8614 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E8614 + add r4, #0x90 + lsl r1, r6, #2 + lsl r5, r5, #2 + lsl r2, r7, #2 + ldr r0, [r4, r1] + ldr r3, [r4, r5] + ldr r6, [r4, r2] + str r6, [r4, r1] + ldr r1, [sp] + lsl r6, r1, #2 + ldr r1, [r4, r6] + str r1, [r4, r5] + str r0, [r4, r2] + str r3, [r4, r6] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E8668 + + thumb_func_start ov5_021E86A0 +ov5_021E86A0: ; 0x021E86A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #8] + add r7, r0, #0 + ldr r0, [sp, #8] + add r6, r2, #0 + cmp r0, #4 + bls _021E86B2 + b _021E89C6 +_021E86B2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E86BE: ; jump table + .short _021E89C6 - _021E86BE - 2 ; case 0 + .short _021E8838 - _021E86BE - 2 ; case 1 + .short _021E8914 - _021E86BE - 2 ; case 2 + .short _021E8766 - _021E86BE - 2 ; case 3 + .short _021E86C8 - _021E86BE - 2 ; case 4 +_021E86C8: + mov r0, #2 + mov r1, #3 + mov r2, #0 + mov r3, #1 + str r6, [sp] + bl ov5_021E8668 + add r0, r6, #0 + add r0, #0xad + ldrb r0, [r0] + cmp r0, #2 + bne _021E8712 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + mov r0, #1 + sub r5, r7, r2 + str r0, [sp, #0x10] + mov r0, #0 + sub r4, r5, #1 + str r0, [sp, #0xc] + cmp r5, #0 + bge _021E86FC + sub r5, r0, #1 + add r4, r5, #0 + b _021E8748 +_021E86FC: + cmp r4, #0 + blt _021E870C + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E8748 +_021E870C: + mov r4, #0 + mvn r4, r4 + b _021E8748 +_021E8712: + cmp r0, #3 + bne _021E8744 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + mov r0, #0 + sub r5, r7, r2 + str r0, [sp, #0x10] + mov r0, #1 + add r4, r5, #1 + str r0, [sp, #0xc] + cmp r5, #0 + bge _021E8732 + sub r5, r0, #2 + add r4, r5, #0 + b _021E8748 +_021E8732: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E8748 + mov r4, #0 + mvn r4, r4 + b _021E8748 +_021E8744: + bl sub_02022974 +_021E8748: + ldr r2, [sp, #0x10] + ldr r3, [sp, #0xc] + ldr r0, [sp, #8] + lsl r2, r2, #0x18 + str r0, [sp] + lsl r3, r3, #0x18 + add r0, r5, #0 + add r1, r4, #0 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + str r6, [sp, #4] + bl ov5_021E8558 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E8766: + mov r0, #1 + mov r1, #3 + mov r2, #0 + mov r3, #2 + str r6, [sp] + bl ov5_021E8668 + add r0, r6, #0 + add r0, #0xad + ldrb r0, [r0] + cmp r0, #1 + bne _021E87C4 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + sub r5, r7, #1 + sub r0, r7, r2 + sub r4, r0, #1 + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0xc] + cmp r5, #0 + blt _021E87A2 + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E87A8 +_021E87A2: + mov r5, #0 + mvn r5, r5 + add r4, r5, #0 +_021E87A8: + cmp r4, #0 + blt _021E87BE + add r2, r6, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E779C + cmp r0, #0 + bne _021E881A +_021E87BE: + mov r4, #0 + mvn r4, r4 + b _021E881A +_021E87C4: + cmp r0, #3 + bne _021E8816 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + sub r5, r7, #1 + add r0, r7, r2 + sub r4, r0, #1 + mov r0, #0 + str r0, [sp, #0x10] + mov r0, #2 + str r0, [sp, #0xc] + cmp r5, #0 + blt _021E87EC + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E87F2 +_021E87EC: + mov r5, #0 + mvn r5, r5 + add r4, r5, #0 +_021E87F2: + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r2 + cmp r0, r4 + ble _021E8810 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E779C + cmp r0, #0 + bne _021E881A +_021E8810: + mov r4, #0 + mvn r4, r4 + b _021E881A +_021E8816: + bl sub_02022974 +_021E881A: + ldr r2, [sp, #0x10] + ldr r3, [sp, #0xc] + ldr r0, [sp, #8] + lsl r2, r2, #0x18 + str r0, [sp] + lsl r3, r3, #0x18 + add r0, r5, #0 + add r1, r4, #0 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + str r6, [sp, #4] + bl ov5_021E8558 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E8838: + mov r0, #0 + mov r1, #2 + mov r2, #1 + mov r3, #3 + str r6, [sp] + bl ov5_021E8668 + add r0, r6, #0 + add r0, #0xad + ldrb r0, [r0] + cmp r0, #0 + bne _021E88A6 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + add r5, r7, #1 + sub r0, r7, r2 + add r4, r0, #1 + mov r0, #3 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r2 + cmp r0, r5 + ble _021E887C + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E8882 +_021E887C: + mov r5, #0 + mvn r5, r5 + add r4, r5, #0 +_021E8882: + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r2 + cmp r0, r4 + ble _021E88A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E779C + cmp r0, #0 + bne _021E88F6 +_021E88A0: + mov r4, #0 + mvn r4, r4 + b _021E88F6 +_021E88A6: + cmp r0, #2 + bne _021E88F6 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + add r5, r7, #1 + add r0, r7, r2 + add r4, r0, #1 + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #3 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r2 + cmp r0, r5 + ble _021E88D6 + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E88DC +_021E88D6: + mov r5, #0 + mvn r5, r5 + add r4, r5, #0 +_021E88DC: + cmp r4, #0 + blt _021E88F2 + add r2, r6, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E779C + cmp r0, #0 + bne _021E88F6 +_021E88F2: + mov r4, #0 + mvn r4, r4 +_021E88F6: + ldr r2, [sp, #0x10] + ldr r3, [sp, #0xc] + ldr r0, [sp, #8] + lsl r2, r2, #0x18 + str r0, [sp] + lsl r3, r3, #0x18 + add r0, r5, #0 + add r1, r4, #0 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + str r6, [sp, #4] + bl ov5_021E8558 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E8914: + mov r0, #0 + mov r1, #1 + mov r2, #2 + mov r3, #3 + str r6, [sp] + bl ov5_021E8668 + add r0, r6, #0 + add r0, #0xad + ldrb r0, [r0] + cmp r0, #0 + bne _021E8964 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + mov r0, #3 + str r0, [sp, #0x10] + mov r0, #2 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r5, r7, r2 + mul r0, r2 + sub r4, r5, #1 + cmp r0, r5 + bgt _021E8952 + ldr r0, [sp, #0xc] + sub r5, r0, #3 + add r4, r5, #0 + b _021E89A8 +_021E8952: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E89A8 + mov r4, #0 + mvn r4, r4 + b _021E89A8 +_021E8964: + cmp r0, #1 + bne _021E89A4 + add r0, r6, #0 + add r0, #0xc0 + ldr r2, [r0, #0] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #3 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r5, r7, r2 + mul r0, r2 + add r4, r5, #1 + cmp r0, r5 + bgt _021E898E + ldr r0, [sp, #0xc] + sub r5, r0, #4 + add r4, r5, #0 + b _021E89A8 +_021E898E: + cmp r0, r4 + ble _021E899E + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E89A8 +_021E899E: + mov r4, #0 + mvn r4, r4 + b _021E89A8 +_021E89A4: + bl sub_02022974 +_021E89A8: + ldr r2, [sp, #0x10] + ldr r3, [sp, #0xc] + ldr r0, [sp, #8] + lsl r2, r2, #0x18 + str r0, [sp] + lsl r3, r3, #0x18 + add r0, r5, #0 + add r1, r4, #0 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + str r6, [sp, #4] + bl ov5_021E8558 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021E89C6: + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E86A0 + + thumb_func_start ov5_021E89D0 +ov5_021E89D0: ; 0x021E89D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r1, #0 + add r4, r5, #0 + lsl r6, r0, #2 + mov r0, #0x86 + add r3, sp, #0x38 + mov r1, #0 + str r1, [r3, #0] + str r1, [r3, #4] + str r2, [sp, #4] + add r2, r5, #0 + add r4, #0x90 + str r1, [r3, #8] + add r2, #0xbc + ldr r1, [r4, r6] + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov5_021E901C + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [sp, #0x38] + ldr r0, [r5, r1] + add r0, r2, r0 + str r0, [sp, #0x38] + add r0, r1, #4 + ldr r2, [sp, #0x3c] + ldr r0, [r5, r0] + add r1, #8 + add r0, r2, r0 + str r0, [sp, #0x3c] + ldr r2, [sp, #0x40] + ldr r0, [r5, r1] + add r0, r2, r0 + str r0, [sp, #0x40] + ldr r1, [r4, r6] + ldr r0, _021E8A8C ; =0x00000864 + ldr r0, [r1, r0] + cmp r0, #1 + bne _021E8A5A + ldr r3, _021E8A90 ; =0x021FAEA0 + add r2, sp, #0x2c + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r3, _021E8A94 ; =0x021FAEB8 + str r0, [r2, #0] + add r2, sp, #8 + mov r7, #4 +_021E8A3C: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r7, r7, #1 + bne _021E8A3C + ldr r0, [r3, #0] + add r3, sp, #0x2c + str r0, [r2, #0] + mov r0, #2 + ldr r1, [r4, r6] + lsl r0, r0, #0xa + add r0, r1, r0 + add r1, sp, #0x38 + add r2, sp, #8 + bl sub_0201CA74 +_021E8A5A: + ldr r2, [r4, r6] + ldr r0, _021E8A8C ; =0x00000864 + ldr r1, [r2, r0] + cmp r1, #1 + bne _021E8A86 + add r0, r0, #4 + ldr r4, [r2, r0] + cmp r4, #0 + beq _021E8A86 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r2, r0, #0 + str r4, [sp] + add r5, #0xb8 + ldr r1, [r5, #0] + ldr r3, [sp, #4] + add r0, sp, #0x38 + bl ov5_021E17CC +_021E8A86: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_021E8A8C: .word 0x00000864 +_021E8A90: .word 0x021FAEA0 +_021E8A94: .word 0x021FAEB8 + thumb_func_end ov5_021E89D0 + + thumb_func_start ov5_021E8A98 +ov5_021E8A98: ; 0x021E8A98 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r1, #0 + add r6, r0, #0 + add r1, r7, #0 + bl sub_020E2178 + add r4, r1, #0 + add r0, r6, #0 + add r1, r7, #0 + bl sub_020E2178 + lsr r0, r0, #5 + add r1, r0, #0 + lsr r2, r4, #5 + mul r1, r5 + add r0, r2, r1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E8A98 + + thumb_func_start ov5_021E8ABC +ov5_021E8ABC: ; 0x021E8ABC + push {r3, r4} + sub r4, r0, r2 + ldr r2, [sp, #8] + sub r0, r1, r3 + mul r0, r2 + add r0, r4, r0 + pop {r3, r4} + bx lr + thumb_func_end ov5_021E8ABC + + thumb_func_start ov5_021E8ACC +ov5_021E8ACC: ; 0x021E8ACC + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r1, #0 + add r6, r0, #0 + add r1, r7, #0 + bl sub_020E2178 + add r4, r1, #0 + add r0, r6, #0 + add r1, r7, #0 + bl sub_020E2178 + lsr r0, r0, #5 + add r1, r0, #0 + lsr r2, r4, #5 + mul r1, r5 + add r0, r2, r1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E8ACC + + thumb_func_start ov5_021E8AF0 +ov5_021E8AF0: ; 0x021E8AF0 + push {r3, lr} + cmp r0, #0 + bne _021E8AFA + mov r0, #3 + pop {r3, pc} +_021E8AFA: + cmp r0, #1 + bne _021E8B02 + mov r0, #2 + pop {r3, pc} +_021E8B02: + cmp r0, #2 + bne _021E8B0A + mov r0, #1 + pop {r3, pc} +_021E8B0A: + cmp r0, #3 + bne _021E8B12 + mov r0, #0 + pop {r3, pc} +_021E8B12: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021E8AF0 + + thumb_func_start ov5_021E8B1C +ov5_021E8B1C: ; 0x021E8B1C + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + cmp r0, #4 + bhi _021E8B7C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8B32: ; jump table + .short _021E8B7C - _021E8B32 - 2 ; case 0 + .short _021E8B3C - _021E8B32 - 2 ; case 1 + .short _021E8B52 - _021E8B32 - 2 ; case 2 + .short _021E8B60 - _021E8B32 - 2 ; case 3 + .short _021E8B74 - _021E8B32 - 2 ; case 4 +_021E8B3C: + add r0, r4, #0 + add r1, r5, #0 + bl sub_020E1F6C + add r0, r1, #1 + cmp r0, r5 + blt _021E8B4E + add r0, r4, #0 + pop {r3, r4, r5, pc} +_021E8B4E: + add r0, r4, #1 + pop {r3, r4, r5, pc} +_021E8B52: + lsl r1, r1, #5 + add r0, r4, r5 + mul r1, r5 + cmp r0, r1 + blt _021E8B82 + add r0, r4, #0 + pop {r3, r4, r5, pc} +_021E8B60: + add r0, r4, #0 + add r1, r5, #0 + bl sub_020E1F6C + sub r0, r1, #1 + bpl _021E8B70 + add r0, r4, #0 + pop {r3, r4, r5, pc} +_021E8B70: + sub r0, r4, #1 + pop {r3, r4, r5, pc} +_021E8B74: + sub r0, r4, r5 + bpl _021E8B82 + add r0, r4, #0 + pop {r3, r4, r5, pc} +_021E8B7C: + bl sub_02022974 + mov r0, #0 +_021E8B82: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E8B1C + + thumb_func_start ov5_021E8B84 +ov5_021E8B84: ; 0x021E8B84 + cmp r0, #4 + bhi _021E8BBC + add r2, r0, r0 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021E8B94: ; jump table + .short _021E8BBC - _021E8B94 - 2 ; case 0 + .short _021E8BB6 - _021E8B94 - 2 ; case 1 + .short _021E8BA6 - _021E8B94 - 2 ; case 2 + .short _021E8BAE - _021E8B94 - 2 ; case 3 + .short _021E8B9E - _021E8B94 - 2 ; case 4 +_021E8B9E: + sub r0, r1, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr +_021E8BA6: + add r0, r1, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr +_021E8BAE: + sub r0, r1, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr +_021E8BB6: + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 +_021E8BBC: + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E8B84 + + thumb_func_start ov5_021E8BC0 +ov5_021E8BC0: ; 0x021E8BC0 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + bl ov5_021E8B84 + cmp r5, r0 + bge _021E8BF2 + sub r0, r0, r5 + cmp r0, #1 + bne _021E8BDE + ldrb r0, [r4] + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + b _021E8C1E +_021E8BDE: + cmp r0, #2 + bne _021E8BEC + ldrb r0, [r4] + sub r0, r0, #2 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + b _021E8C1E +_021E8BEC: + bl sub_02022974 + b _021E8C1E +_021E8BF2: + cmp r5, r0 + ble _021E8C1A + sub r0, r5, r0 + cmp r0, #1 + bne _021E8C06 + ldrb r0, [r4] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + b _021E8C1E +_021E8C06: + cmp r0, #2 + bne _021E8C14 + ldrb r0, [r4] + add r0, r0, #2 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + b _021E8C1E +_021E8C14: + bl sub_02022974 + b _021E8C1E +_021E8C1A: + bl sub_02022974 +_021E8C1E: + strb r6, [r4] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E8BC0 + + thumb_func_start ov5_021E8C24 +ov5_021E8C24: ; 0x021E8C24 + push {r3, lr} + cmp r0, #4 + bhi _021E8C50 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8C36: ; jump table + .short _021E8C50 - _021E8C36 - 2 ; case 0 + .short _021E8C48 - _021E8C36 - 2 ; case 1 + .short _021E8C44 - _021E8C36 - 2 ; case 2 + .short _021E8C4C - _021E8C36 - 2 ; case 3 + .short _021E8C40 - _021E8C36 - 2 ; case 4 +_021E8C40: + mov r0, #2 + pop {r3, pc} +_021E8C44: + mov r0, #4 + pop {r3, pc} +_021E8C48: + mov r0, #3 + pop {r3, pc} +_021E8C4C: + mov r0, #1 + pop {r3, pc} +_021E8C50: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov5_021E8C24 + + thumb_func_start ov5_021E8C58 +ov5_021E8C58: ; 0x021E8C58 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + add r7, r2, #0 + mov r4, #0 +_021E8C62: + ldr r0, [r5, #0x2c] + cmp r0, #1 + bne _021E8C7E + add r0, r6, #0 + bl ov5_021E8C24 + add r1, r5, #0 + add r1, #0x30 + ldrb r1, [r1] + cmp r1, r0 + bne _021E8C7E + strb r4, [r7] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021E8C7E: + add r4, r4, #1 + add r5, #0x30 + cmp r4, #2 + blt _021E8C62 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E8C58 + + thumb_func_start ov5_021E8C8C +ov5_021E8C8C: ; 0x021E8C8C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xa1 + ldrb r1, [r0] + mov r0, #0x30 + add r4, r5, #0 + mul r0, r1 + add r0, r5, r0 + ldr r0, [r0, #0x2c] + add r4, #0x64 + cmp r0, #0 + beq _021E8CA8 + bl sub_02022974 +_021E8CA8: + add r1, r5, #0 + add r1, #0xa1 + ldrb r2, [r1] + mov r1, #0x30 + mov r0, #1 + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + add r3, r5, #0 + str r0, [r2, #0x2c] + add r3, #0xa1 + ldrb r3, [r3] + ldrb r2, [r4, #0xc] + add r6, r3, #0 + mul r6, r1 + add r3, r5, r6 + add r3, #0x30 + strb r2, [r3] + add r3, r5, #0 + add r3, #0xa1 + ldrb r3, [r3] + ldr r2, [r4, #0x10] + add r6, r3, #0 + mul r6, r1 + add r3, r5, r6 + str r2, [r3, #0x1c] + add r3, r5, #0 + add r3, #0xa1 + ldrb r3, [r3] + ldr r2, [r4, #0x14] + add r6, r3, #0 + mul r6, r1 + add r3, r5, r6 + str r2, [r3, #0x20] + add r3, r5, #0 + add r3, #0xa1 + ldrb r3, [r3] + ldrb r2, [r4, #0x18] + add r6, r3, #0 + mul r6, r1 + add r3, r5, r6 + add r3, #0x24 + strb r2, [r3] + add r3, r5, #0 + add r3, #0xa1 + ldrb r3, [r3] + ldrb r2, [r4, #0x19] + add r6, r3, #0 + mul r6, r1 + add r3, r5, r6 + add r3, #0x25 + strb r2, [r3] + add r3, r5, #0 + add r3, #0xa1 + ldrb r3, [r3] + ldr r2, [r4, #0] + add r6, r3, #0 + mul r6, r1 + add r3, r5, r6 + str r2, [r3, #4] + add r2, r5, #0 + add r2, #0xa1 + ldrb r2, [r2] + ldr r4, [r4, #4] + add r3, r2, #0 + mul r3, r1 + add r2, r5, r3 + add r3, r5, #0 + str r4, [r2, #8] + add r3, #0xa1 + ldrb r3, [r3] + mov r2, #0 + add r4, r3, #0 + mul r4, r1 + add r3, r5, r4 + add r3, #0x26 + strb r2, [r3] + add r3, r5, #0 + add r3, #0xa1 + ldrb r3, [r3] + mul r1, r3 + add r1, r5, r1 + str r2, [r1, #0x28] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021E8C8C + + thumb_func_start ov5_021E8D50 +ov5_021E8D50: ; 0x021E8D50 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xa0 + ldrb r0, [r0] + add r4, r5, #0 + add r4, #0x64 + cmp r0, #2 + blo _021E8D64 + bl sub_02022974 +_021E8D64: + add r0, r5, #0 + bl ov5_021E8C8C + cmp r0, #1 + beq _021E8D72 + bl sub_02022974 +_021E8D72: + mov r0, #0x86 + ldr r2, [r4, #0x10] + ldr r1, [r4, #0] + lsl r0, r0, #4 + str r2, [r1, r0] + ldr r2, [r4, #0x14] + ldr r1, [r4, #4] + str r2, [r1, r0] + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xa0 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa1 + ldrb r0, [r0] + add r5, #0xa1 + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + strb r0, [r5] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E8D50 + + thumb_func_start ov5_021E8DAC +ov5_021E8DAC: ; 0x021E8DAC + add r1, r0, #0 + add r1, #0xa2 + ldrb r2, [r1] + mov r1, #0x30 + mul r1, r2 + add r0, r0, r1 + ldr r0, [r0, #0x28] + bx lr + thumb_func_end ov5_021E8DAC + + thumb_func_start ov5_021E8DBC +ov5_021E8DBC: ; 0x021E8DBC + mov r3, #0 + add r2, r3, #0 +_021E8DC0: + lsl r1, r3, #2 + add r1, r0, r1 + add r1, #0x80 + str r2, [r1, #0] + add r1, r3, #1 + lsl r1, r1, #0x18 + lsr r3, r1, #0x18 + cmp r3, #4 + blo _021E8DC0 + bx lr + thumb_func_end ov5_021E8DBC + + thumb_func_start ov5_021E8DD4 +ov5_021E8DD4: ; 0x021E8DD4 + cmp r0, #4 + bhi _021E8E24 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E8DE4: ; jump table + .short _021E8E24 - _021E8DE4 - 2 ; case 0 + .short _021E8DFC - _021E8DE4 - 2 ; case 1 + .short _021E8E0A - _021E8DE4 - 2 ; case 2 + .short _021E8E18 - _021E8DE4 - 2 ; case 3 + .short _021E8DEE - _021E8DE4 - 2 ; case 4 +_021E8DEE: + add r0, r1, #0 + mov r2, #1 + add r0, #0x88 + str r2, [r0, #0] + add r1, #0x8c + str r2, [r1, #0] + bx lr +_021E8DFC: + add r0, r1, #0 + mov r2, #1 + add r0, #0x80 + str r2, [r0, #0] + add r1, #0x88 + str r2, [r1, #0] + bx lr +_021E8E0A: + add r0, r1, #0 + mov r2, #1 + add r0, #0x80 + str r2, [r0, #0] + add r1, #0x84 + str r2, [r1, #0] + bx lr +_021E8E18: + add r0, r1, #0 + mov r2, #1 + add r0, #0x84 + str r2, [r0, #0] + add r1, #0x8c + str r2, [r1, #0] +_021E8E24: + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E8DD4 + + thumb_func_start ov5_021E8E28 +ov5_021E8E28: ; 0x021E8E28 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021E79A8 + ldr r0, [sp, #0x38] + add r1, r4, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r2, r6, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r3, r7, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x3c] + str r0, [sp, #0xc] + add r0, sp, #0x14 + str r0, [sp, #0x10] + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov5_021E7838 + mov r4, #0 + add r7, sp, #0x14 +_021E8E68: + lsl r6, r4, #2 + bl ov5_021EF13C + add r1, r5, r6 + add r1, #0x90 + ldr r2, [r1, #0] + ldr r1, _021E8EC8 ; =0x0000085C + str r0, [r2, r1] + add r0, r5, r6 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E8EC8 ; =0x0000085C + ldr r0, [r1, r0] + bl ov5_021EF248 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r2, r5, #0 + str r1, [sp] + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r3, r5, #0 + str r1, [sp, #4] + str r0, [sp, #8] + str r5, [sp, #0xc] + add r2, #0xb8 + add r3, #0xbc + ldr r0, [r7, r6] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + add r1, r4, #0 + bl ov5_021E7E28 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021E8E68 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021E8EC8: .word 0x0000085C + thumb_func_end ov5_021E8E28 + + thumb_func_start ov5_021E8ECC +ov5_021E8ECC: ; 0x021E8ECC + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021E7AC4 + ldr r0, [sp, #0x38] + add r1, r4, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r2, r6, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r3, r7, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x3c] + str r0, [sp, #0xc] + add r0, sp, #0x14 + str r0, [sp, #0x10] + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov5_021E7838 + mov r4, #0 + add r7, r4, #0 +_021E8F0C: + lsl r6, r4, #2 + add r0, r5, r6 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E8F5C ; =0x0000085C + str r7, [r1, r0] + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r2, r5, #0 + str r1, [sp] + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r3, r5, #0 + str r1, [sp, #4] + str r0, [sp, #8] + str r5, [sp, #0xc] + add r0, sp, #0x14 + add r2, #0xb8 + add r3, #0xbc + ldr r0, [r0, r6] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + add r1, r4, #0 + bl ov5_021E7F1C + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021E8F0C + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021E8F5C: .word 0x0000085C + thumb_func_end ov5_021E8ECC + + thumb_func_start ov5_021E8F60 +ov5_021E8F60: ; 0x021E8F60 + push {r4, lr} + add r1, r0, #0 + mov r3, #0 + add r1, #0xa2 + strb r3, [r1] + add r1, r0, #0 + add r1, #0xa1 + strb r3, [r1] + add r1, r0, #0 + add r1, #0xa0 + strb r3, [r1] + add r4, r0, #0 + add r2, r3, #0 + mov r1, #1 +_021E8F7C: + str r2, [r4, #0x2c] + str r1, [r4, #0x28] + add r3, r3, #1 + add r4, #0x30 + cmp r3, #2 + blt _021E8F7C + bl ov5_021E8DBC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E8F60 + + thumb_func_start ov5_021E8F90 +ov5_021E8F90: ; 0x021E8F90 + push {r3, r4, r5, lr} + mov r5, #0x41 + ldr r4, [sp, #0x10] + lsl r5, r5, #2 + ldr r5, [r4, r5] + cmp r5, #1 + bne _021E8FC6 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + cmp r0, #1 + ble _021E8FAE + add r0, r2, #0 + add r0, #0x1f + b _021E8FB2 +_021E8FAE: + add r0, r2, #0 + add r0, #0x10 +_021E8FB2: + add r1, r4, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + cmp r1, #1 + ble _021E8FC2 + add r1, r3, #0 + add r1, #0x1f + b _021E8FC6 +_021E8FC2: + add r1, r3, #0 + add r1, #0x10 +_021E8FC6: + add r5, r4, #0 + add r5, #0xc8 + ldr r5, [r5, #0] + str r5, [sp] + bl ov5_021E8ABC + add r1, r4, #0 + add r1, #0xa8 + str r0, [r1, #0] + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xa8 + add r1, #0xc8 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl ov5_021E935C + add r1, r4, #0 + add r1, #0xad + strb r0, [r1] + add r0, r4, #0 + add r0, #0xad + ldrb r0, [r0] + bl ov5_021E8AF0 + add r1, r4, #0 + add r1, #0xac + strb r0, [r1] + add r0, r4, #0 + add r1, r4, #0 + add r2, r4, #0 + add r0, #0xa8 + add r1, #0xc0 + add r2, #0xc8 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov5_021E8ACC + add r4, #0xa4 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E8F90 + + thumb_func_start ov5_021E901C +ov5_021E901C: ; 0x021E901C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r2, #0 + mov r2, #1 + add r5, r3, #0 + lsl r2, r2, #0x14 + str r2, [r5, #0] + str r2, [r5, #8] + mov r2, #0 + add r4, r0, #0 + mvn r2, r2 + str r1, [sp, #4] + cmp r4, r2 + beq _021E907E + bl sub_020E1F6C + lsl r0, r1, #0x10 + lsr r6, r0, #0x10 + ldr r1, [sp, #4] + add r0, r4, #0 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r7, #0 + bl sub_02039E10 + str r0, [sp, #8] + add r0, r7, #0 + bl sub_02039E88 + add r1, r0, #0 + ldr r0, [sp, #8] + add r2, r6, #0 + str r0, [sp] + add r0, r7, #0 + add r3, r4, #0 + bl sub_02039E8C + lsl r0, r0, #0xf + str r0, [r5, #4] + ldr r1, [r5, #0] + lsl r0, r6, #0x15 + add r0, r1, r0 + str r0, [r5, #0] + ldr r1, [r5, #8] + lsl r0, r4, #0x15 + add r0, r1, r0 + str r0, [r5, #8] +_021E907E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E901C + + thumb_func_start ov5_021E9084 +ov5_021E9084: ; 0x021E9084 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r1, [sp] + mov r1, #0x49 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + str r2, [sp, #4] + add r6, r3, #0 + bl sub_02018144 + mov r2, #0x49 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020C4CF4 + cmp r6, #0 + bne _021E90B6 + add r0, r4, #0 + ldr r1, _021E9148 ; =0x021FAE98 + add r0, #0xf4 + str r1, [r0, #0] + mov r7, #1 + b _021E90CA +_021E90B6: + cmp r6, #1 + bne _021E90C6 + add r0, r4, #0 + ldr r1, _021E914C ; =0x021FAE90 + add r0, #0xf4 + str r1, [r0, #0] + mov r7, #0 + b _021E90CA +_021E90C6: + bl sub_02022974 +_021E90CA: + add r0, r7, #0 + bl ov5_021EEAC8 + str r0, [r4, #0] + add r1, r4, #0 + ldr r0, [sp] + add r1, #0xb8 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xbc + str r5, [r0, #0] + add r0, r5, #0 + bl sub_02039E10 + add r1, r4, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r5, #0 + bl sub_02039E20 + add r1, r4, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r0, #5 + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] + add r1, r4, #0 + ldr r0, [sp, #4] + add r1, #0xf0 + str r0, [r1, #0] + add r0, r4, #0 + mov r1, #1 + add r0, #0xec + str r1, [r0, #0] + add r0, r4, #0 + bl ov5_021E8F60 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #2 + add r0, #0xb4 + str r1, [r0, #0] + mov r0, #0x43 + mov r1, #4 + bl sub_02006C24 + add r1, r4, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xfc + str r1, [r0, #0] + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E9148: .word 0x021FAE98 +_021E914C: .word 0x021FAE90 + thumb_func_end ov5_021E9084 + + thumb_func_start ov5_021E9150 +ov5_021E9150: ; 0x021E9150 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r6, #0x45 + add r5, r0, #0 + lsl r6, r6, #2 + ldr r3, [r5, r6] + sub r6, #8 + str r3, [sp] + add r3, r5, #0 + add r3, #0xc8 + ldr r3, [r3, #0] + add r4, r1, #0 + str r3, [sp, #4] + ldr r3, [r5, r6] + add r6, r5, #0 + add r6, #0xf4 + ldr r6, [r6, #0] + add r7, r2, #0 + ldr r6, [r6, #0] + blx r6 + mov r3, #0x43 + str r5, [sp] + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, #8 + ldr r3, [r5, r3] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021E8F90 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E9150 + + thumb_func_start ov5_021E9190 +ov5_021E9190: ; 0x021E9190 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r2, r5, #0 + add r3, r5, #0 + add r1, #0xc4 + add r2, #0xc8 + add r3, #0xa8 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + add r6, r0, #0 + bl ov5_021E8B1C + add r1, r5, #0 + add r2, r5, #0 + add r1, #0xc0 + add r2, #0xc8 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + add r7, r0, #0 + bl ov5_021E8A98 + add r1, r5, #0 + add r1, #0xc8 + add r4, r0, #0 + ldr r1, [r1, #0] + add r0, r7, #0 + bl ov5_021E935C + add r1, r5, #0 + add r1, #0xa4 + ldr r1, [r1, #0] + cmp r1, r4 + bne _021E91F8 + add r1, r5, #0 + add r1, #0xad + ldrb r1, [r1] + cmp r1, r0 + beq _021E91F8 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov5_021E86A0 + add r1, r5, #0 + add r1, #0xad + add r5, #0xac + ldrb r1, [r1] + add r0, r6, #0 + add r2, r5, #0 + bl ov5_021E8BC0 +_021E91F8: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E9190 + + thumb_func_start ov5_021E91FC +ov5_021E91FC: ; 0x021E91FC + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r1, #0 + sub r7, r4, #1 +_021E9206: + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0x90 + ldr r1, [r0, #0] + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r0, r7 + beq _021E9222 + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov5_021E89D0 +_021E9222: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021E9206 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E91FC + + thumb_func_start ov5_021E9230 +ov5_021E9230: ; 0x021E9230 + push {r3, r4} + asr r4, r0, #0xf + lsr r4, r4, #0x10 + add r4, r0, r4 + asr r0, r4, #0x10 + str r0, [r2, #0] + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + asr r0, r0, #0x10 + str r0, [r3, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E9230 + + thumb_func_start ov5_021E924C +ov5_021E924C: ; 0x021E924C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02017ACC + bl sub_020A6988 + bl sub_020A6CF0 + mov r4, #0 + add r6, r5, #4 + mov r7, #0x30 +_021E9262: + add r0, r4, #0 + mul r0, r7 + add r0, r6, r0 + bl ov5_021E7814 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #2 + blo _021E9262 + mov r6, #0 + add r7, r6, #0 +_021E927A: + lsl r4, r6, #2 + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + ldr r0, _021E92D8 ; =0x00000864 + mov r1, #0 + str r1, [r2, r0] + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E92DC ; =0x0000085C + ldr r0, [r1, r0] + bl ov5_021EF1D0 + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E92E0 ; =0x00000868 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021E92A8 + bl ov5_021E1608 +_021E92A8: + add r0, r5, r4 + add r0, #0x90 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r5, r4 + add r0, #0x90 + str r7, [r0, #0] + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #4 + blo _021E927A + add r0, r5, #0 + mov r1, #3 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #1 + add r0, #0xb0 + str r1, [r0, #0] + add r5, #0xec + str r7, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E92D8: .word 0x00000864 +_021E92DC: .word 0x0000085C +_021E92E0: .word 0x00000868 + thumb_func_end ov5_021E924C + + thumb_func_start ov5_021E92E4 +ov5_021E92E4: ; 0x021E92E4 + push {r4, lr} + add r4, r0, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl sub_02006CA8 + ldr r0, [r4, #0] + bl ov5_021EEB48 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E92E4 + + thumb_func_start ov5_021E9300 +ov5_021E9300: ; 0x021E9300 + add r1, r0, #0 + add r1, #0xb0 + ldr r1, [r1, #0] + cmp r1, #1 + bne _021E9316 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + bne _021E9316 + mov r0, #1 + bx lr +_021E9316: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E9300 + + thumb_func_start ov5_021E931C +ov5_021E931C: ; 0x021E931C + push {r4, r5} + add r5, r0, #0 + add r4, r1, #0 + add r2, r4, #0 + add r3, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0xcc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r4, #0xd8 + str r0, [r2, #0] + str r5, [r4, #0] + pop {r4, r5} + bx lr + thumb_func_end ov5_021E931C + + thumb_func_start ov5_021E9338 +ov5_021E9338: ; 0x021E9338 + mov r1, #0 + add r0, #0xd8 + str r1, [r0, #0] + bx lr + thumb_func_end ov5_021E9338 + + thumb_func_start ov5_021E9340 +ov5_021E9340: ; 0x021E9340 + lsl r0, r0, #2 + add r0, r1, r0 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E9350 ; =0x00000868 + ldr r0, [r1, r0] + str r0, [r2, #0] + bx lr + ; .align 2, 0 +_021E9350: .word 0x00000868 + thumb_func_end ov5_021E9340 + + thumb_func_start ov5_021E9354 +ov5_021E9354: ; 0x021E9354 + add r0, #0xac + ldrb r0, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E9354 + + thumb_func_start ov5_021E935C +ov5_021E935C: ; 0x021E935C + push {r4, lr} + add r4, r0, #0 + bl sub_020E2178 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1b + sub r1, r1, r2 + mov r0, #0x1b + ror r1, r0 + mov r0, #0x1f + and r0, r4 + add r1, r2, r1 + cmp r0, #0x10 + bge _021E9384 + cmp r1, #0x10 + bge _021E9380 + mov r0, #0 + pop {r4, pc} +_021E9380: + mov r0, #2 + pop {r4, pc} +_021E9384: + cmp r1, #0x10 + bge _021E938C + mov r0, #1 + pop {r4, pc} +_021E938C: + mov r0, #3 + pop {r4, pc} + thumb_func_end ov5_021E935C + + thumb_func_start ov5_021E9390 +ov5_021E9390: ; 0x021E9390 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + cmp r0, r5 + bne _021E93A6 + add r4, #0xac + ldrb r0, [r4] + pop {r3, r4, r5, pc} +_021E93A6: + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _021E93B2 + bl sub_02022974 +_021E93B2: + add r0, r4, #0 + add r0, #0xac + ldrb r1, [r0] + cmp r1, #3 + bls _021E93BE + b _021E955C +_021E93BE: + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E93CA: ; jump table + .short _021E93D2 - _021E93CA - 2 ; case 0 + .short _021E9434 - _021E93CA - 2 ; case 1 + .short _021E9498 - _021E93CA - 2 ; case 2 + .short _021E94FA - _021E93CA - 2 ; case 3 +_021E93D2: + add r0, r4, #0 + add r0, #0xa4 + add r2, r4, #0 + ldr r0, [r0, #0] + add r2, #0xc0 + ldr r2, [r2, #0] + sub r3, r5, r0 + cmp r2, r3 + bne _021E93EC + add r0, r1, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E93EC: + cmp r3, #1 + bne _021E9406 + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + beq _021E9406 + add r4, #0xac + ldrb r0, [r4] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E9406: + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xa4 + add r1, #0xc0 + ldr r2, [r1, #0] + ldr r0, [r0, #0] + add r3, r2, #1 + sub r1, r5, r0 + cmp r3, r1 + bne _021E9430 + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E9430 + add r4, #0xac + ldrb r0, [r4] + add r0, r0, #3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E9430: + mov r0, #4 + pop {r3, r4, r5, pc} +_021E9434: + add r0, r4, #0 + add r0, #0xa4 + add r2, r4, #0 + ldr r0, [r0, #0] + add r2, #0xc0 + ldr r2, [r2, #0] + sub r3, r5, r0 + cmp r2, r3 + bne _021E944E + add r0, r1, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E944E: + sub r1, r0, r5 + cmp r1, #1 + bne _021E946A + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + beq _021E946A + add r4, #0xac + ldrb r0, [r4] + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E946A: + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xa4 + add r1, #0xc0 + ldr r2, [r1, #0] + ldr r0, [r0, #0] + sub r3, r2, #1 + sub r1, r5, r0 + cmp r3, r1 + bne _021E9494 + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E9494 + add r4, #0xac + ldrb r0, [r4] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E9494: + mov r0, #4 + pop {r3, r4, r5, pc} +_021E9498: + add r0, r4, #0 + add r0, #0xa4 + add r2, r4, #0 + ldr r0, [r0, #0] + add r2, #0xc0 + ldr r2, [r2, #0] + sub r3, r0, r5 + cmp r2, r3 + bne _021E94B2 + sub r0, r1, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E94B2: + sub r1, r2, #1 + cmp r1, r3 + bne _021E94CE + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E94CE + add r4, #0xac + ldrb r0, [r4] + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E94CE: + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + sub r1, r5, r0 + cmp r1, #1 + bne _021E94F6 + add r2, r4, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + beq _021E94F6 + add r4, #0xac + ldrb r0, [r4] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E94F6: + mov r0, #4 + pop {r3, r4, r5, pc} +_021E94FA: + add r0, r4, #0 + add r0, #0xa4 + add r2, r4, #0 + ldr r0, [r0, #0] + add r2, #0xc0 + ldr r2, [r2, #0] + sub r3, r0, r5 + cmp r2, r3 + bne _021E9514 + sub r0, r1, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E9514: + add r1, r2, #1 + cmp r1, r3 + bne _021E9530 + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + bne _021E9530 + add r4, #0xac + ldrb r0, [r4] + sub r0, r0, #3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E9530: + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + sub r1, r0, r5 + cmp r1, #1 + bne _021E9558 + add r2, r4, #0 + add r2, #0xc0 + ldr r2, [r2, #0] + add r1, r5, #0 + bl ov5_021E77C0 + cmp r0, #0 + beq _021E9558 + add r4, #0xac + ldrb r0, [r4] + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_021E9558: + mov r0, #4 + pop {r3, r4, r5, pc} +_021E955C: + mov r0, #4 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021E9390 + + thumb_func_start ov5_021E9560 +ov5_021E9560: ; 0x021E9560 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #4 + blo _021E956E + bl sub_02022974 +_021E956E: + lsl r0, r5, #2 + add r0, r4, r0 + add r0, #0x90 + ldr r1, [r0, #0] + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r1, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E9560 + + thumb_func_start ov5_021E9580 +ov5_021E9580: ; 0x021E9580 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x43 + lsl r0, r0, #2 + str r3, [sp] + ldr r3, [r5, r0] + add r0, #8 + ldr r0, [r5, r0] + sub r6, r1, r3 + sub r4, r2, r0 + add r0, r5, #0 + asr r2, r4, #4 + add r0, #0xc0 + lsr r2, r2, #0x1b + ldr r1, [r0, #0] + asr r0, r6, #4 + add r2, r4, r2 + lsr r0, r0, #0x1b + asr r2, r2, #5 + add r0, r6, r0 + add r3, r2, #0 + asr r0, r0, #5 + mul r3, r1 + add r7, r0, r3 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r1 + cmp r7, r0 + blo _021E95CA + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + beq _021E95CA + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E95CA: + add r0, r5, #0 + add r0, #0xc0 + ldr r1, [r0, #0] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mul r0, r1 + cmp r7, r0 + blo _021E95E0 + bl sub_02022974 +_021E95E0: + add r0, r5, #0 + add r0, #0xc8 + ldr r1, [r0, #0] + add r0, r4, #0 + mul r0, r1 + add r0, r6, r0 + bl ov5_021E935C + add r1, r0, #0 + add r0, r7, #0 + add r2, r5, #0 + bl ov5_021E9390 + ldr r1, [sp] + cmp r1, #0 + beq _021E9602 + strb r0, [r1] +_021E9602: + cmp r0, #3 + bls _021E960A + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021E960A: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E9580 + + thumb_func_start ov5_021E9610 +ov5_021E9610: ; 0x021E9610 + lsl r1, r1, #2 + add r0, r0, r1 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E9620 ; =0x0000085C + ldr r0, [r1, r0] + bx lr + nop +_021E9620: .word 0x0000085C + thumb_func_end ov5_021E9610 + + thumb_func_start ov5_021E9624 +ov5_021E9624: ; 0x021E9624 + lsl r1, r1, #2 + add r0, r0, r1 + add r0, #0x90 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E9624 + + thumb_func_start ov5_021E9630 +ov5_021E9630: ; 0x021E9630 + add r3, r0, #0 + add r3, #0xfc + str r1, [r3, #0] + mov r1, #1 + lsl r1, r1, #8 + str r2, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E9630 + + thumb_func_start ov5_021E9640 +ov5_021E9640: ; 0x021E9640 + push {r3, lr} + bl sub_0201CED0 + mov r1, #1 + str r1, [r0, #0x1c] + pop {r3, pc} + thumb_func_end ov5_021E9640 + + thumb_func_start ov5_021E964C +ov5_021E964C: ; 0x021E964C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #1 + bne _021E965C + mov r0, #5 + strb r0, [r4, #0x14] +_021E965C: + ldrb r0, [r4, #0x14] + cmp r0, #5 + bls _021E9664 + b _021E9768 +_021E9664: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021E9670: ; jump table + .short _021E967C - _021E9670 - 2 ; case 0 + .short _021E96AC - _021E9670 - 2 ; case 1 + .short _021E96E2 - _021E9670 - 2 ; case 2 + .short _021E9700 - _021E9670 - 2 ; case 3 + .short _021E9768 - _021E9670 - 2 ; case 4 + .short _021E9756 - _021E9670 - 2 ; case 5 +_021E967C: + mov r0, #0 + str r0, [r4, #0x24] + mov r0, #0xe + ldr r5, [r4, #4] + lsl r0, r0, #0xc + cmp r5, r0 + bgt _021E968E + mov r0, #2 + b _021E9692 +_021E968E: + add r5, r0, #0 + mov r0, #1 +_021E9692: + strb r0, [r4, #0x14] + ldr r2, [r4, #0xc] + ldr r0, [r4, #0] + ldr r3, [r2, #0] + ldr r2, [r4, #0x24] + add r1, r5, #0 + add r2, r3, r2 + bl sub_02006E18 + ldr r0, [r4, #0x24] + add r0, r0, r5 + str r0, [r4, #0x24] + pop {r4, r5, r6, pc} +_021E96AC: + ldr r2, [r4, #0x24] + ldr r0, [r4, #4] + sub r5, r0, r2 + mov r0, #0xe + lsl r0, r0, #0xc + cmp r5, r0 + ble _021E96C0 + add r5, r0, #0 + mov r6, #0 + b _021E96C2 +_021E96C0: + mov r6, #1 +_021E96C2: + ldr r3, [r4, #0xc] + ldr r0, [r4, #0] + ldr r3, [r3, #0] + add r1, r5, #0 + add r2, r3, r2 + bl sub_02006E18 + cmp r6, #0 + beq _021E96DA + mov r0, #2 + strb r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_021E96DA: + ldr r0, [r4, #0x24] + add r0, r0, r5 + str r0, [r4, #0x24] + pop {r4, r5, r6, pc} +_021E96E2: + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _021E96FA + bl sub_0201CA5C + cmp r0, #1 + bne _021E96FA + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + ldr r0, [r0, #0] + bl sub_0201CBB0 +_021E96FA: + mov r0, #3 + strb r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_021E9700: + ldr r0, [r4, #0xc] + ldr r0, [r0, #0] + bl sub_020B3C0C + add r5, r0, #0 + ldrb r0, [r5, #9] + cmp r0, #1 + beq _021E9714 + bl sub_02022974 +_021E9714: + cmp r5, #0 + beq _021E9738 + add r1, r5, #0 + add r1, #8 + beq _021E972C + ldrb r0, [r5, #9] + cmp r0, #0 + bls _021E972C + ldrh r0, [r5, #0xe] + add r0, r1, r0 + add r0, r0, #4 + b _021E972E +_021E972C: + mov r0, #0 +_021E972E: + cmp r0, #0 + beq _021E9738 + ldr r0, [r0, #0] + add r5, r5, r0 + b _021E973A +_021E9738: + mov r5, #0 +_021E973A: + cmp r5, #0 + bne _021E9742 + bl sub_02022974 +_021E9742: + ldr r0, [r4, #8] + add r1, r5, #0 + bl sub_020AE608 + ldr r0, [r4, #0x18] + mov r1, #1 + str r1, [r0, #0] + mov r0, #5 + strb r0, [r4, #0x14] + pop {r4, r5, r6, pc} +_021E9756: + ldr r0, [r4, #0x20] + mov r1, #0 + str r1, [r0, #0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_021E9768: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E964C + + thumb_func_start ov5_021E976C +ov5_021E976C: ; 0x021E976C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #4 + mov r1, #0x28 + add r6, r2, #0 + add r7, r3, #0 + bl sub_02018184 + add r1, r0, #0 + str r5, [r1, #0] + str r4, [r1, #4] + str r6, [r1, #8] + ldr r0, [sp, #0x18] + str r7, [r1, #0xc] + str r0, [r1, #0x10] + mov r2, #0 + ldr r0, [sp, #0x1c] + strb r2, [r1, #0x14] + str r0, [r1, #0x18] + str r2, [r0, #0] + ldr r0, [sp, #0x20] + str r0, [r1, #0x20] + str r2, [r1, #0x1c] + ldr r0, _021E97A8 ; =ov5_021E964C + mov r2, #1 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021E97A8: .word ov5_021E964C + thumb_func_end ov5_021E976C + + thumb_func_start ov5_021E97AC +ov5_021E97AC: ; 0x021E97AC + push {r3, r4, r5, lr} + add r4, r3, #0 + add r5, r2, #0 + ldr r2, [r4, #0] + bl sub_02006E18 + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _021E97D6 + bl sub_0201CA5C + cmp r0, #1 + bne _021E97D6 + ldr r0, [r4, #0] + ldr r1, [sp, #0x10] + bl sub_0201CBB0 + cmp r0, #0 + bne _021E97D6 + bl sub_02022974 +_021E97D6: + ldr r0, [r4, #0] + bl sub_020B3C0C + ldrb r0, [r0, #9] + cmp r0, #1 + beq _021E97E6 + bl sub_02022974 +_021E97E6: + ldr r0, [r4, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _021E9810 + add r2, r0, #0 + add r2, #8 + beq _021E9804 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _021E9804 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _021E9806 +_021E9804: + mov r1, #0 +_021E9806: + cmp r1, #0 + beq _021E9810 + ldr r1, [r1, #0] + add r4, r0, r1 + b _021E9812 +_021E9810: + mov r4, #0 +_021E9812: + cmp r4, #0 + bne _021E981A + bl sub_02022974 +_021E981A: + add r0, r5, #0 + add r1, r4, #0 + bl sub_020AE608 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021E97AC + + thumb_func_start ov5_021E9828 +ov5_021E9828: ; 0x021E9828 + add r0, #0xf8 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021E9828 + + thumb_func_start ov5_021E9830 +ov5_021E9830: ; 0x021E9830 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x49 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + add r6, r2, #0 + bl sub_02018144 + mov r2, #0x49 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + bl ov5_021EEBC0 + str r0, [r4, #0] + add r0, r4, #0 + add r0, #0xb8 + str r7, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + str r5, [r0, #0] + cmp r5, #0 + beq _021E988C + add r0, r5, #0 + bl sub_02039E10 + add r1, r4, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r5, #0 + bl sub_02039E20 + add r1, r4, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r0, #5 + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] +_021E988C: + add r0, r4, #0 + mov r1, #0 + add r0, #0xec + str r1, [r0, #0] + add r0, r4, #0 + bl ov5_021E8F60 + add r0, r4, #0 + mov r1, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #2 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xf8 + str r6, [r0, #0] + cmp r6, #0 + bne _021E98C2 + mov r0, #0x43 + mov r1, #4 + bl sub_02006C24 + add r1, r4, #0 + add r1, #0xf8 + str r0, [r1, #0] +_021E98C2: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E9830 + + thumb_func_start ov5_021E98C8 +ov5_021E98C8: ; 0x021E98C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xb8 + str r2, [r0, #0] + add r0, r5, #0 + add r4, r1, #0 + add r0, #0xbc + str r4, [r0, #0] + add r0, r4, #0 + add r6, r3, #0 + bl sub_02039E10 + add r1, r5, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r4, #0 + bl sub_02039E20 + add r1, r5, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r0, #5 + add r0, r5, #0 + add r0, #0xc8 + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #0 + add r0, #0xec + str r1, [r0, #0] + add r0, r5, #0 + bl ov5_021E8F60 + add r0, r5, #0 + mov r1, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #2 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xf8 + str r6, [r0, #0] + cmp r6, #0 + bne _021E9934 + mov r0, #0x43 + mov r1, #4 + bl sub_02006C24 + add r5, #0xf8 + str r0, [r5, #0] +_021E9934: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021E98C8 + + thumb_func_start ov5_021E9938 +ov5_021E9938: ; 0x021E9938 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + add r5, r0, #0 + add r7, r6, #0 +_021E9940: + lsl r4, r6, #2 + add r0, r5, r4 + add r0, #0x90 + ldr r2, [r0, #0] + ldr r0, _021E9990 ; =0x00000864 + mov r1, #0 + str r1, [r2, r0] + add r0, r5, r4 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E9994 ; =0x00000868 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021E9960 + bl ov5_021E1608 +_021E9960: + add r0, r5, r4 + add r0, #0x90 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r5, r4 + add r0, #0x90 + str r7, [r0, #0] + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #4 + blo _021E9940 + add r0, r5, #0 + mov r1, #3 + add r0, #0xb4 + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #1 + add r0, #0xb0 + str r1, [r0, #0] + add r5, #0xec + str r7, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E9990: .word 0x00000864 +_021E9994: .word 0x00000868 + thumb_func_end ov5_021E9938 + + thumb_func_start ov5_021E9998 +ov5_021E9998: ; 0x021E9998 + push {r4, r5, r6, lr} + ldr r6, _021E99C0 ; =0x00000868 + add r5, r0, #0 + mov r4, #0 +_021E99A0: + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0x90 + ldr r0, [r0, #0] + ldr r0, [r0, r6] + cmp r0, #0 + beq _021E99B2 + bl ov5_021E1610 +_021E99B2: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021E99A0 + pop {r4, r5, r6, pc} + nop +_021E99C0: .word 0x00000868 + thumb_func_end ov5_021E9998 + + thumb_func_start ov5_021E99C4 +ov5_021E99C4: ; 0x021E99C4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov5_021EEB48 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021E99C4 + + thumb_func_start ov5_021E99D8 +ov5_021E99D8: ; 0x021E99D8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r6, #0x45 + add r5, r0, #0 + lsl r6, r6, #2 + ldr r3, [r5, r6] + sub r6, #8 + str r3, [sp] + add r3, r5, #0 + add r3, #0xc8 + ldr r3, [r3, #0] + add r4, r1, #0 + str r3, [sp, #4] + ldr r3, [r5, r6] + add r7, r2, #0 + bl ov5_021E9A14 + mov r3, #0x43 + str r5, [sp] + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, #8 + ldr r3, [r5, r3] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021E8F90 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021E99D8 + + thumb_func_start ov5_021E9A14 +ov5_021E9A14: ; 0x021E9A14 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov5_021E7AC4 + mov r3, #0x45 + lsl r3, r3, #2 + ldr r0, [r5, r3] + add r1, r4, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r2, r6, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + str r0, [sp, #8] + ldr r0, [sp, #0x3c] + str r0, [sp, #0xc] + add r0, sp, #0x14 + str r0, [sp, #0x10] + add r0, r3, #0 + sub r0, #0x10 + sub r3, #8 + ldr r0, [r5, r0] + ldr r3, [r5, r3] + bl ov5_021E7838 + mov r4, #0 + add r7, r4, #0 +_021E9A58: + lsl r6, r4, #2 + add r0, r5, r6 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E9AA8 ; =0x0000085C + str r7, [r1, r0] + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r2, r5, #0 + str r1, [sp] + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r3, r5, #0 + str r1, [sp, #4] + str r0, [sp, #8] + str r5, [sp, #0xc] + add r0, sp, #0x14 + add r2, #0xb8 + add r3, #0xbc + ldr r0, [r0, r6] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + add r1, r4, #0 + bl ov5_021E9B70 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021E9A58 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_021E9AA8: .word 0x0000085C + thumb_func_end ov5_021E9A14 + + thumb_func_start ov5_021E9AAC +ov5_021E9AAC: ; 0x021E9AAC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + bl ov5_021E7B4C + mov r3, #0x45 + lsl r3, r3, #2 + ldr r0, [r5, r3] + add r1, r6, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + add r2, r7, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + str r0, [sp, #0xc] + add r0, r3, #0 + str r4, [sp, #0x10] + sub r0, #0x10 + sub r3, #8 + ldr r0, [r5, r0] + ldr r3, [r5, r3] + bl ov5_021E7838 + mov r3, #0 + ldr r1, _021E9B0C ; =0x00000864 + add r2, r3, #0 +_021E9AF6: + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r3, r3, #1 + add r5, r5, #4 + str r2, [r0, r1] + cmp r3, #4 + blt _021E9AF6 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021E9B0C: .word 0x00000864 + thumb_func_end ov5_021E9AAC + + thumb_func_start ov5_021E9B10 +ov5_021E9B10: ; 0x021E9B10 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r1, #0 + add r6, r5, #0 + add r6, #0x90 + lsl r7, r4, #2 + str r2, [sp, #0x10] + ldr r1, [r6, r7] + ldr r0, _021E9B68 ; =0x0000085C + mov r2, #0 + str r2, [r1, r0] + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r2, r5, #0 + str r1, [sp] + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r2, #0xb8 + str r1, [sp, #4] + str r0, [sp, #8] + str r5, [sp, #0xc] + add r5, #0xbc + lsl r1, r4, #0x18 + ldr r0, [sp, #0x10] + ldr r2, [r2, #0] + ldr r3, [r5, #0] + lsr r1, r1, #0x18 + bl ov5_021E9B70 + ldr r1, [r6, r7] + ldr r0, _021E9B6C ; =0x00000864 + mov r2, #0 + str r2, [r1, r0] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021E9B68: .word 0x0000085C +_021E9B6C: .word 0x00000864 + thumb_func_end ov5_021E9B10 + + thumb_func_start ov5_021E9B70 +ov5_021E9B70: ; 0x021E9B70 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + add r4, r1, #0 + str r2, [sp, #4] + ldr r5, [sp, #0x3c] + cmp r7, #0 + blt _021E9BFE + ldr r2, [sp, #0x30] + ldr r1, [sp, #0x34] + mul r1, r2 + cmp r7, r1 + bge _021E9BFE + add r1, r3, #0 + bl sub_02039F74 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r2, sp, #0xc + bl ov5_021E7BAC + add r0, r5, #0 + add r0, #0xf8 + mov r1, #2 + ldr r2, [sp, #0x18] + lsl r1, r1, #0xa + ldr r0, [r0, #0] + add r1, r2, r1 + bl sub_02006E28 + add r6, r5, #0 + lsl r4, r4, #2 + add r6, #0x90 + ldr r1, [r6, r4] + ldr r0, _021E9C04 ; =0x00000854 + ldr r0, [r1, r0] + ldr r1, [sp, #0x10] + bl sub_020C2C54 + ldr r0, [r6, r4] + str r0, [sp, #8] + ldr r0, [sp, #4] + bl ov5_021EFA8C + str r0, [sp] + add r5, #0xf8 + ldr r0, [r5, #0] + mov r5, #2 + ldr r2, [sp, #8] + lsl r5, r5, #0xa + add r2, r2, r5 + ldr r3, [sp, #8] + add r5, #0x54 + ldr r1, [sp, #0x10] + add r3, r3, r5 + bl ov5_021E97AC + ldr r1, [sp, #0x38] + cmp r1, #1 + bne _021E9BF0 + bl ov5_021D53A4 +_021E9BF0: + ldr r1, [r6, r4] + ldr r0, _021E9C08 ; =0x00000864 + mov r2, #1 + str r2, [r1, r0] + ldr r1, [r6, r4] + sub r0, r0, #4 + str r7, [r1, r0] +_021E9BFE: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021E9C04: .word 0x00000854 +_021E9C08: .word 0x00000864 + thumb_func_end ov5_021E9B70 + + thumb_func_start ov5_021E9C0C +ov5_021E9C0C: ; 0x021E9C0C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + mov r4, #0 + add r5, r6, #0 +_021E9C16: + add r0, r5, #0 + add r0, #0x90 + ldr r1, [r0, #0] + mov r0, #0x86 + lsl r0, r0, #4 + ldr r1, [r1, r0] + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + beq _021E9C36 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + add r1, r6, #0 + add r2, r7, #0 + bl ov5_021E9C40 +_021E9C36: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021E9C16 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021E9C0C + + thumb_func_start ov5_021E9C40 +ov5_021E9C40: ; 0x021E9C40 + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + add r2, r0, #0 + add r5, r1, #0 + add r1, sp, #0x30 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + ldr r4, _021E9CCC ; =0x021FAEAC + str r0, [r1, #8] + ldmia r4!, {r0, r1} + add r3, sp, #0x24 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r6, _021E9CD0 ; =0x021FAEDC + str r0, [r3, #0] + add r4, sp, #0 + mov r3, #4 +_021E9C64: + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _021E9C64 + ldr r0, [r6, #0] + lsl r6, r2, #2 + str r0, [r4, #0] + add r4, r5, #0 + add r4, #0x90 + mov r0, #0x86 + add r2, r5, #0 + add r2, #0xbc + ldr r1, [r4, r6] + lsl r0, r0, #4 + ldr r0, [r1, r0] + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + add r3, sp, #0x30 + bl ov5_021E901C + mov r1, #0x46 + lsl r1, r1, #2 + ldr r2, [sp, #0x30] + ldr r0, [r5, r1] + add r0, r2, r0 + str r0, [sp, #0x30] + add r0, r1, #4 + ldr r2, [sp, #0x34] + ldr r0, [r5, r0] + add r1, #8 + add r0, r2, r0 + str r0, [sp, #0x34] + ldr r2, [sp, #0x38] + ldr r0, [r5, r1] + add r0, r2, r0 + str r0, [sp, #0x38] + ldr r2, [r4, r6] + ldr r0, _021E9CD4 ; =0x00000864 + ldr r1, [r2, r0] + cmp r1, #1 + bne _021E9CC8 + sub r0, #0x64 + add r0, r2, r0 + add r1, sp, #0x30 + add r2, sp, #0 + add r3, sp, #0x24 + bl sub_0201CA74 +_021E9CC8: + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021E9CCC: .word 0x021FAEAC +_021E9CD0: .word 0x021FAEDC +_021E9CD4: .word 0x00000864 + thumb_func_end ov5_021E9C40 + + thumb_func_start ov5_021E9CD8 +ov5_021E9CD8: ; 0x021E9CD8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #4 +_021E9CE0: + add r0, r4, #0 + bl ov5_021E7814 + add r6, r6, #1 + add r4, #0x30 + cmp r6, #2 + blt _021E9CE0 + mov r3, #0 + ldr r1, _021E9D38 ; =0x00000864 + add r2, r5, #0 + add r4, r3, #0 +_021E9CF6: + add r0, r2, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r3, r3, #1 + add r2, r2, #4 + str r4, [r0, r1] + cmp r3, #4 + blt _021E9CF6 + add r0, r5, #0 + mov r1, #3 + add r0, #0xb4 + str r1, [r0, #0] + mov r1, #1 + add r0, r5, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xec + str r4, [r0, #0] + sub r6, r1, #2 + lsl r7, r1, #0xb +_021E9D20: + add r1, r5, #0 + add r1, #0x90 + ldr r1, [r1, #0] + add r0, r6, #0 + add r2, r7, #0 + bl sub_020C4BB8 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _021E9D20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021E9D38: .word 0x00000864 + thumb_func_end ov5_021E9CD8 + + thumb_func_start ov5_021E9D3C +ov5_021E9D3C: ; 0x021E9D3C + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r0, r2, #0 + add r4, r3, #0 + str r1, [sp, #0x10] + ldr r0, [r0, #0] + ldr r1, [r4, #0] + str r2, [sp, #0x14] + bl ov5_021EEC24 + add r1, r4, #0 + add r1, #0xbc + ldr r1, [r1, #0] + add r0, r5, #0 + bl sub_02039D90 + mov r0, #0 + ldr r3, [sp, #0x14] + mov ip, r0 + add r5, r4, #0 +_021E9D66: + add r2, r3, #4 + add r6, r5, #4 + mov r7, #6 +_021E9D6C: + ldmia r2!, {r0, r1} + stmia r6!, {r0, r1} + sub r7, r7, #1 + bne _021E9D6C + mov r0, ip + add r0, r0, #1 + add r3, #0x30 + add r5, #0x30 + mov ip, r0 + cmp r0, #2 + blt _021E9D66 + ldr r2, [sp, #0x14] + mov r5, #0 + add r3, r4, #0 +_021E9D88: + add r0, r2, #0 + add r0, #0x80 + ldr r1, [r0, #0] + add r0, r3, #0 + add r0, #0x80 + add r5, r5, #1 + str r1, [r0, #0] + add r2, r2, #4 + add r3, r3, #4 + cmp r5, #4 + blt _021E9D88 + ldr r0, [sp, #0x14] + ldr r5, [sp, #0x14] + add r0, #0xa0 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0xa0 + strb r1, [r0] + ldr r0, [sp, #0x14] + add r6, r4, #0 + add r0, #0xa1 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0xa1 + strb r1, [r0] + ldr r0, [sp, #0x14] + add r0, #0xa2 + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0xa2 + strb r1, [r0] + ldr r0, [sp, #0x14] + add r0, #0xa4 + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa4 + str r1, [r0, #0] + ldr r0, [sp, #0x14] + add r0, #0xa8 + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xa8 + str r1, [r0, #0] + ldr r0, [sp, #0x14] + add r0, #0xac + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0xac + strb r1, [r0] + ldr r0, [sp, #0x14] + add r0, #0xad + ldrb r1, [r0] + add r0, r4, #0 + add r0, #0xad + strb r1, [r0] + mov r0, #0 + str r0, [sp, #0x18] +_021E9DFA: + add r0, r6, #0 + add r1, r5, #0 + add r0, #0x90 + add r1, #0x90 + ldr r2, [r1, #0] + mov r1, #2 + lsl r1, r1, #0xa + ldr r0, [r0, #0] + add r3, r2, r1 + add r2, r0, r1 + mov r7, #0xa +_021E9E10: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r7, r7, #1 + bne _021E9E10 + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r5, #0 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E9F90 ; =0x00000854 + ldr r2, [r1, r0] + add r1, r6, #0 + add r1, #0x90 + ldr r1, [r1, #0] + str r2, [r1, r0] + add r1, r5, #0 + add r1, #0x90 + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0x10 + ldr r1, [r2, r1] + add r2, r6, #0 + add r2, #0x90 + ldr r3, [r2, #0] + add r2, r0, #0 + add r2, #0x10 + str r1, [r3, r2] + add r1, r5, #0 + add r1, #0x90 + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0xc + ldr r2, [r2, r1] + add r1, r6, #0 + add r1, #0x90 + ldr r1, [r1, #0] + add r0, #0xc + str r2, [r1, r0] + ldr r0, [sp, #0x18] + add r5, r5, #4 + add r0, r0, #1 + add r6, r6, #4 + str r0, [sp, #0x18] + cmp r0, #4 + blt _021E9DFA + add r1, r4, #0 + ldr r0, [sp, #0x10] + add r1, #0xb8 + str r0, [r1, #0] + ldr r0, [sp, #0x14] + ldr r5, [sp, #0x14] + add r0, #0xc0 + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + ldr r0, [sp, #0x14] + add r3, r4, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [sp, #0x14] + add r5, #0xcc + add r0, #0xc0 + ldr r0, [r0, #0] + add r3, #0xcc + lsl r1, r0, #5 + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] + mov r2, #4 +_021E9EA2: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021E9EA2 + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r3, #0x41 + lsl r3, r3, #2 + ldr r0, [sp, #0x14] + add r1, r3, #0 + ldr r0, [r0, r3] + add r1, #8 + str r0, [r4, r3] + ldr r0, [sp, #0x14] + ldr r1, [r0, r1] + add r0, r3, #0 + add r0, #8 + str r1, [r4, r0] + add r1, r3, #0 + ldr r0, [sp, #0x14] + add r1, #0xc + ldr r1, [r0, r1] + add r0, r3, #0 + add r0, #0xc + str r1, [r4, r0] + add r1, r3, #0 + ldr r0, [sp, #0x14] + add r1, #0x10 + ldr r1, [r0, r1] + add r0, r3, #0 + add r0, #0x10 + str r1, [r4, r0] + add r1, r3, #0 + ldr r0, [sp, #0x14] + add r1, #0x14 + add r5, r0, r1 + add r0, r3, #0 + add r0, #0x14 + add r2, r4, r0 + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + ldr r1, [sp, #0x44] + str r0, [r2, #0] + add r2, r3, #0 + str r4, [sp] + add r2, #8 + add r3, #0x10 + ldr r0, [sp, #0x40] + ldr r2, [r4, r2] + ldr r3, [r4, r3] + bl ov5_021E8F90 + add r0, r4, #0 + mov r7, #0 + add r0, #0xb0 + str r7, [r0, #0] + ldr r0, [sp, #0x14] + add r5, r4, #0 + add r0, #0xb4 + str r0, [sp, #0x14] + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xb4 + str r1, [r0, #0] + add r6, sp, #0x1c +_021E9F26: + add r0, r5, #0 + add r0, #0x90 + ldr r1, [r0, #0] + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r1, r0] + stmia r6!, {r0} + add r0, r5, #0 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021E9F94 ; =0x0000085C + ldr r0, [r1, r0] + bl ov5_021EF248 + add r7, r7, #1 + add r5, r5, #4 + cmp r7, #4 + blt _021E9F26 + mov r5, #0 + add r6, sp, #0x1c +_021E9F4E: + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r1, r4, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r2, r4, #0 + str r1, [sp] + add r1, r4, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r3, r4, #0 + str r1, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + add r2, #0xb8 + add r3, #0xbc + lsl r1, r5, #0x18 + ldr r0, [r6, #0] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + lsr r1, r1, #0x18 + bl ov5_021E7FF0 + add r5, r5, #1 + add r6, r6, #4 + cmp r5, #4 + blt _021E9F4E + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021E9F90: .word 0x00000854 +_021E9F94: .word 0x0000085C + thumb_func_end ov5_021E9D3C + + thumb_func_start ov5_021E9F98 +ov5_021E9F98: ; 0x021E9F98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r1, #0] + ldr r1, [sp] + ldr r1, [r1, #0] + bl ov5_021EEC24 + ldr r0, [sp, #4] + ldr r1, [sp] + add r0, #0xbc + add r1, #0xbc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_02039D90 + ldr r5, [sp, #4] + ldr r6, [sp] + mov r7, #0 +_021E9FC0: + add r4, r5, #4 + add r3, r6, #4 + mov r2, #6 +_021E9FC6: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021E9FC6 + add r7, r7, #1 + add r5, #0x30 + add r6, #0x30 + cmp r7, #2 + blt _021E9FC0 + ldr r2, [sp, #4] + ldr r3, [sp] + mov r4, #0 +_021E9FDE: + add r0, r2, #0 + add r0, #0x80 + ldr r1, [r0, #0] + add r0, r3, #0 + add r0, #0x80 + add r4, r4, #1 + str r1, [r0, #0] + add r2, r2, #4 + add r3, r3, #4 + cmp r4, #4 + blt _021E9FDE + ldr r0, [sp, #4] + ldr r5, [sp, #4] + add r0, #0xa0 + ldrb r1, [r0] + ldr r0, [sp] + ldr r6, [sp] + add r0, #0xa0 + strb r1, [r0] + ldr r0, [sp, #4] + mov r7, #0 + add r0, #0xa1 + ldrb r1, [r0] + ldr r0, [sp] + add r0, #0xa1 + strb r1, [r0] + ldr r0, [sp, #4] + add r0, #0xa2 + ldrb r1, [r0] + ldr r0, [sp] + add r0, #0xa2 + strb r1, [r0] + ldr r0, [sp, #4] + add r0, #0xa4 + ldr r1, [r0, #0] + ldr r0, [sp] + add r0, #0xa4 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r0, #0xa8 + ldr r1, [r0, #0] + ldr r0, [sp] + add r0, #0xa8 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r0, #0xac + ldrb r1, [r0] + ldr r0, [sp] + add r0, #0xac + strb r1, [r0] + ldr r0, [sp, #4] + add r0, #0xad + ldrb r1, [r0] + ldr r0, [sp] + add r0, #0xad + strb r1, [r0] +_021EA04E: + add r0, r6, #0 + add r1, r5, #0 + add r0, #0x90 + add r1, #0x90 + ldr r2, [r1, #0] + mov r1, #2 + lsl r1, r1, #0xa + ldr r0, [r0, #0] + add r4, r2, r1 + add r3, r0, r1 + mov r2, #0xa +_021EA064: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021EA064 + ldr r0, [r4, #0] + add r7, r7, #1 + str r0, [r3, #0] + add r0, r5, #0 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021EA170 ; =0x00000854 + ldr r2, [r1, r0] + add r1, r6, #0 + add r1, #0x90 + ldr r1, [r1, #0] + str r2, [r1, r0] + add r1, r5, #0 + add r1, #0x90 + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0x10 + ldr r1, [r2, r1] + add r2, r6, #0 + add r2, #0x90 + ldr r3, [r2, #0] + add r2, r0, #0 + add r2, #0x10 + str r1, [r3, r2] + add r1, r5, #0 + add r1, #0x90 + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0xc + ldr r2, [r2, r1] + add r1, r6, #0 + add r1, #0x90 + ldr r1, [r1, #0] + add r0, #0xc + str r2, [r1, r0] + add r5, r5, #4 + add r6, r6, #4 + cmp r7, #4 + blt _021EA04E + ldr r0, [sp, #4] + ldr r4, [sp, #4] + add r0, #0xb8 + ldr r1, [r0, #0] + ldr r0, [sp] + ldr r3, [sp] + add r0, #0xb8 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r4, #0xcc + add r0, #0xc0 + ldr r1, [r0, #0] + ldr r0, [sp] + add r3, #0xcc + add r0, #0xc0 + str r1, [r0, #0] + ldr r0, [sp, #4] + mov r2, #4 + add r0, #0xc4 + ldr r1, [r0, #0] + ldr r0, [sp] + add r0, #0xc4 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r0, #5 + ldr r0, [sp] + add r0, #0xc8 + str r1, [r0, #0] +_021EA0F6: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021EA0F6 + ldr r0, [r4, #0] + ldr r1, [sp, #4] + str r0, [r3, #0] + mov r0, #0x41 + lsl r0, r0, #2 + ldr r2, [r1, r0] + ldr r1, [sp] + str r2, [r1, r0] + add r2, r0, #0 + ldr r1, [sp, #4] + add r2, #8 + ldr r3, [r1, r2] + add r2, r0, #0 + ldr r1, [sp] + add r2, #8 + str r3, [r1, r2] + add r2, r0, #0 + ldr r1, [sp, #4] + add r2, #0xc + ldr r3, [r1, r2] + add r2, r0, #0 + ldr r1, [sp] + add r2, #0xc + str r3, [r1, r2] + add r2, r0, #0 + ldr r1, [sp, #4] + add r2, #0x10 + ldr r3, [r1, r2] + add r2, r0, #0 + ldr r1, [sp] + add r2, #0x10 + str r3, [r1, r2] + add r2, r0, #0 + ldr r1, [sp, #4] + add r2, #0x14 + add r3, r1, r2 + ldr r1, [sp] + add r0, #0x14 + add r2, r1, r0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #0 + str r0, [r2, #0] + ldr r0, [sp] + add r0, #0xb0 + str r1, [r0, #0] + ldr r0, [sp, #4] + add r0, #0xb4 + str r0, [sp, #4] + ldr r1, [r0, #0] + ldr r0, [sp] + add r0, #0xb4 + str r0, [sp] + str r1, [r0, #0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021EA170: .word 0x00000854 + thumb_func_end ov5_021E9F98 + + thumb_func_start ov5_021EA174 +ov5_021EA174: ; 0x021EA174 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r0, r5, #0 + add r0, #0xa2 + ldrb r1, [r0] + add r4, r5, #0 + mov r0, #0x30 + add r2, r1, #0 + mul r2, r0 + add r0, #0xd4 + add r3, r5, #4 + ldr r0, [r5, r0] + add r6, r3, r2 + add r4, #0xcc + cmp r0, #0 + bne _021EA1C4 + ldr r0, [r4, #0x20] + cmp r0, #1 + bne _021EA1C4 + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _021EA22C + ldr r0, [r4, #0x14] + ldr r1, [r0, #0] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0] + cmp r1, r0 + ble _021EA1B2 + bl sub_02022974 +_021EA1B2: + ldr r0, [r4, #0x10] + ldr r1, [r0, #0] + ldr r0, [r4, #0x14] + ldr r0, [r0, #0] + sub r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0x10 + cmp r1, r0 + bge _021EA1C6 +_021EA1C4: + b _021EA30C +_021EA1C6: + ldr r1, [r4, #0xc] + add r2, sp, #0x10 + ldr r0, [r1, #0] + ldr r1, [r1, #8] + add r3, sp, #0xc + bl ov5_021E9230 + str r5, [sp] + mov r3, #0x43 + lsl r3, r3, #2 + ldr r2, [r5, r3] + add r3, #8 + ldr r0, [sp, #0x10] + ldr r1, [sp, #0xc] + ldr r3, [r5, r3] + bl ov5_021E8F90 + ldr r2, [r4, #0xc] + add r3, r4, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021EA20E + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + bne _021EA2EE +_021EA20E: + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021EA222 + bl sub_02022974 +_021EA222: + mov r0, #0 + str r0, [r4, #0x18] + str r0, [r4, #0x10] + str r0, [r4, #0x14] + b _021EA30C +_021EA22C: + ldr r2, [r4, #0xc] + ldr r3, [r4, #0] + ldr r7, [r2, #0] + cmp r3, r7 + beq _021EA244 + ldr r1, [r4, #8] + ldr r0, [r2, #8] + cmp r1, r0 + beq _021EA244 + bl sub_02022974 + b _021EA30C +_021EA244: + cmp r3, r7 + bne _021EA250 + ldr r1, [r4, #8] + ldr r0, [r2, #8] + cmp r1, r0 + beq _021EA30C +_021EA250: + mov r3, #1 + str r3, [r4, #0x18] + ldr r2, [r4, #0xc] + ldr r0, [r4, #0] + ldr r1, [r2, #0] + cmp r0, r1 + beq _021EA2A4 + cmp r0, r1 + ble _021EA26E + str r4, [r4, #0x10] + ldr r0, [r4, #0xc] + str r0, [r4, #0x14] + mov r0, #3 + strb r0, [r4, #0x1c] + b _021EA274 +_021EA26E: + str r2, [r4, #0x10] + str r4, [r4, #0x14] + strb r3, [r4, #0x1c] +_021EA274: + ldr r0, [r4, #0] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021EA28E + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + bne _021EA2EE +_021EA28E: + ldr r0, [r4, #0] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021EA304 + bl sub_02022974 + b _021EA304 +_021EA2A4: + add r1, r5, #0 + add r1, #0xd8 + add r0, r5, #0 + ldr r1, [r1, #0] + add r0, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #8] + cmp r0, r1 + ble _021EA2C6 + add r0, r4, #0 + add r0, #8 + str r0, [r4, #0x10] + ldr r0, [r4, #0xc] + add r0, #8 + str r0, [r4, #0x14] + mov r0, #4 + b _021EA2D2 +_021EA2C6: + add r2, #8 + add r0, r4, #0 + str r2, [r4, #0x10] + add r0, #8 + str r0, [r4, #0x14] + mov r0, #2 +_021EA2D2: + strb r0, [r4, #0x1c] + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021EA2F0 + mov r0, #1 + bl sub_02038AE0 + cmp r0, #0 + beq _021EA2F0 +_021EA2EE: + b _021EA536 +_021EA2F0: + ldr r0, [r4, #8] + lsr r2, r0, #0x1f + lsl r1, r0, #0x11 + sub r1, r1, r2 + mov r0, #0x11 + ror r1, r0 + add r0, r2, r1 + beq _021EA304 + bl sub_02022974 +_021EA304: + ldrb r0, [r4, #0x1c] + add r1, r5, #0 + bl ov5_021E9190 +_021EA30C: + add r0, r5, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + cmp r0, #3 + bls _021EA318 + b _021EA48C +_021EA318: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021EA324: ; jump table + .short _021EA32C - _021EA324 - 2 ; case 0 + .short _021EA37C - _021EA324 - 2 ; case 1 + .short _021EA48C - _021EA324 - 2 ; case 2 + .short _021EA478 - _021EA324 - 2 ; case 3 +_021EA32C: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + add r1, r6, r0 + add r1, #0x20 + ldrb r1, [r1] + lsl r1, r1, #2 + add r1, r5, r1 + add r1, #0x80 + ldr r1, [r1, #0] + cmp r1, #1 + beq _021EA366 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r2, r5, #0 + str r1, [sp] + str r5, [sp, #4] + add r1, r5, #0 + add r3, r5, #0 + str r6, [sp, #8] + add r1, #0xb8 + add r2, #0xbc + add r3, #0xc0 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + bl ov5_021E7D98 +_021EA366: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + add r6, #0x22 + mov r1, #1 + add r0, r0, #1 + strb r0, [r6] + add r0, r5, #0 + add r0, #0xb4 + str r1, [r0, #0] + b _021EA48C +_021EA37C: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + sub r0, r0, #1 + add r0, r6, r0 + add r0, #0x20 + ldrb r0, [r0] + lsl r0, r0, #2 + add r0, r5, r0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #1 + bne _021EA3B4 + add r0, r6, #0 + bl ov5_021E7814 + add r1, r6, #0 + add r1, #0x22 + ldrb r1, [r1] + mov r0, #0 + sub r1, r1, #1 + add r1, r6, r1 + add r1, #0x20 + ldrb r1, [r1] + lsl r1, r1, #2 + add r1, r5, r1 + add r1, #0x80 + str r0, [r1, #0] +_021EA3B4: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + cmp r0, #2 + bhi _021EA48C + add r0, r6, #0 + add r0, #0x10 + bl ov5_021E80BC + cmp r0, #1 + bne _021EA48C + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + cmp r0, #2 + blo _021EA3DA + mov r0, #1 + str r0, [r6, #0x24] + b _021EA3E2 +_021EA3DA: + add r0, r5, #0 + mov r1, #0 + add r0, #0xb4 + str r1, [r0, #0] +_021EA3E2: + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + sub r0, r0, #1 + lsl r0, r0, #2 + ldr r2, [r6, r0] + ldr r0, _021EA53C ; =0x00000864 + ldr r1, [r2, r0] + cmp r1, #1 + bne _021EA438 + sub r0, #0x10 + ldr r0, [r2, r0] + bl sub_020B3C0C + cmp r0, #0 + beq _021EA422 + add r2, r0, #0 + add r2, #8 + beq _021EA416 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _021EA416 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _021EA418 +_021EA416: + mov r1, #0 +_021EA418: + cmp r1, #0 + beq _021EA422 + ldr r1, [r1, #0] + add r4, r0, r1 + b _021EA424 +_021EA422: + mov r4, #0 +_021EA424: + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + cmp r0, #1 + bne _021EA438 + add r0, r4, #0 + bl ov5_021D53A4 +_021EA438: + add r0, r5, #0 + add r0, #0xfc + ldr r3, [r0, #0] + cmp r3, #0 + beq _021EA48C + add r0, r6, #0 + add r0, #0x22 + ldrb r0, [r0] + mov r2, #0x86 + lsl r2, r2, #4 + sub r0, r0, #1 + lsl r0, r0, #2 + ldr r4, [r6, r0] + ldr r1, [r4, r2] + cmp r1, #0 + blt _021EA48C + add r0, r5, #0 + add r6, r5, #0 + add r0, #0xc0 + add r6, #0xc4 + ldr r0, [r0, #0] + ldr r6, [r6, #0] + mul r6, r0 + cmp r1, r6 + bge _021EA48C + mov r0, #1 + lsl r0, r0, #8 + add r2, #8 + ldr r0, [r5, r0] + ldr r2, [r4, r2] + blx r3 + b _021EA48C +_021EA478: + add r6, #0x10 + add r0, r6, #0 + bl ov5_021E80BC + cmp r0, #1 + bne _021EA48C + add r0, r5, #0 + mov r1, #0 + add r0, #0xa0 + strb r1, [r0] +_021EA48C: + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + bne _021EA4AE + add r0, r5, #0 + mov r1, #0 + add r0, #0xa2 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa1 + strb r1, [r0] + mov r0, #2 + add r5, #0xb4 + add sp, #0x14 + str r0, [r5, #0] + pop {r4, r5, r6, r7, pc} +_021EA4AE: + add r0, r5, #0 + bl ov5_021E8DAC + cmp r0, #1 + bne _021EA536 + add r0, r5, #0 + add r0, #0xa2 + ldrb r1, [r0] + mov r0, #0x30 + mov r2, #0 + mul r0, r1 + add r0, r5, r0 + str r2, [r0, #0x2c] + add r0, r5, #0 + bl ov5_021E8DBC + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0xa0 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa2 + ldrb r0, [r0] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r5, #0 + add r1, r2, r1 + add r0, #0xa2 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa0 + ldrb r0, [r0] + cmp r0, #0 + beq _021EA504 + mov r1, #0 + b _021EA514 +_021EA504: + add r0, r5, #0 + mov r1, #0 + add r0, #0xa2 + strb r1, [r0] + add r0, r5, #0 + add r0, #0xa1 + strb r1, [r0] + mov r1, #2 +_021EA514: + add r0, r5, #0 + add r0, #0xb4 + str r1, [r0, #0] + ldr r0, [r5, #0x6c] + cmp r0, #1 + bne _021EA536 + mov r0, #0 + str r0, [r5, #0x6c] + add r0, r5, #0 + add r0, #0x70 + ldrb r0, [r0] + add r1, r5, #0 + bl ov5_021E8DD4 + add r0, r5, #0 + bl ov5_021E8D50 +_021EA536: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021EA53C: .word 0x00000864 + thumb_func_end ov5_021EA174 + + thumb_func_start ov5_021EA540 +ov5_021EA540: ; 0x021EA540 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xb8 + str r2, [r0, #0] + add r0, r5, #0 + add r4, r1, #0 + add r0, #0xbc + str r4, [r0, #0] + add r0, r4, #0 + bl sub_02039E10 + add r1, r5, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r4, #0 + bl sub_02039E20 + add r1, r5, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + lsl r1, r0, #5 + add r0, r5, #0 + add r0, #0xc8 + str r1, [r0, #0] + add r0, r5, #0 + bl ov5_021E8F60 + add r0, r5, #0 + mov r1, #0 + add r0, #0xb0 + str r1, [r0, #0] + mov r0, #2 + add r5, #0xb4 + str r0, [r5, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EA540 + + thumb_func_start ov5_021EA58C +ov5_021EA58C: ; 0x021EA58C + push {r4, r5, lr} + sub sp, #0x14 + mov r4, #0x45 + add r5, r0, #0 + lsl r4, r4, #2 + ldr r0, [r5, r4] + str r0, [sp] + add r0, r5, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + str r0, [sp, #0xc] + add r0, r4, #0 + str r3, [sp, #0x10] + sub r0, #0x10 + sub r4, #8 + ldr r0, [r5, r0] + ldr r3, [r5, r4] + bl ov5_021E7838 + mov r3, #0 + ldr r1, _021EA5DC ; =0x00000864 + add r2, r3, #0 +_021EA5C8: + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + add r3, r3, #1 + add r5, r5, #4 + str r2, [r0, r1] + cmp r3, #4 + blt _021EA5C8 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_021EA5DC: .word 0x00000864 + thumb_func_end ov5_021EA58C + + thumb_func_start ov5_021EA5E0 +ov5_021EA5E0: ; 0x021EA5E0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r7, r1, #0 + add r4, r5, #0 + add r4, #0x90 + lsl r6, r7, #2 + ldr r0, [r4, r6] + ldr r3, _021EA66C ; =0x00000864 + mov r1, #0 + str r1, [r0, r3] + str r2, [sp, #0x10] + lsl r0, r7, #0x18 + ldr r2, [r4, r6] + sub r3, #0x10 + ldr r1, [r5, #0] + lsr r0, r0, #0x18 + add r2, r2, r3 + bl ov5_021EEB84 + lsl r0, r7, #0x18 + ldr r3, [r4, r6] + ldr r2, _021EA670 ; =0x00000858 + ldr r1, [r5, #0] + lsr r0, r0, #0x18 + add r2, r3, r2 + bl ov5_021EEB90 + mov r0, #0 + mov r2, #0x86 + ldr r1, [r4, r6] + mvn r0, r0 + lsl r2, r2, #4 + str r0, [r1, r2] + ldr r1, [r4, r6] + sub r2, #0x60 + bl sub_020C4BB8 + ldr r1, [r4, r6] + ldr r0, _021EA674 ; =0x0000085C + ldr r0, [r1, r0] + bl ov5_021EF248 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl ov5_021EFAC0 + add r1, r5, #0 + add r1, #0xc0 + ldr r1, [r1, #0] + add r2, r5, #0 + str r1, [sp] + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r2, #0xb8 + str r1, [sp, #4] + str r0, [sp, #8] + str r5, [sp, #0xc] + add r5, #0xbc + lsl r1, r7, #0x18 + ldr r0, [sp, #0x10] + ldr r2, [r2, #0] + ldr r3, [r5, #0] + lsr r1, r1, #0x18 + bl ov5_021E7E28 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021EA66C: .word 0x00000864 +_021EA670: .word 0x00000858 +_021EA674: .word 0x0000085C + thumb_func_end ov5_021EA5E0 + + thumb_func_start ov5_021EA678 +ov5_021EA678: ; 0x021EA678 + push {r4, r5} + mov r4, #0x43 + lsl r4, r4, #2 + str r1, [r0, r4] + add r5, r4, #4 + str r2, [r0, r5] + add r5, r4, #0 + add r5, #8 + str r3, [r0, r5] + lsl r5, r1, #0x10 + add r1, r4, #0 + add r1, #0xc + str r5, [r0, r1] + add r1, r4, #0 + lsl r2, r2, #0x10 + add r1, #0x10 + str r2, [r0, r1] + lsl r1, r3, #0x10 + add r4, #0x14 + str r1, [r0, r4] + pop {r4, r5} + bx lr + thumb_func_end ov5_021EA678 + + thumb_func_start ov5_021EA6A4 +ov5_021EA6A4: ; 0x021EA6A4 + mov r2, #0x41 + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov5_021EA6A4 + + thumb_func_start ov5_021EA6AC +ov5_021EA6AC: ; 0x021EA6AC + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov5_021EA6AC + + thumb_func_start ov5_021EA6B4 +ov5_021EA6B4: ; 0x021EA6B4 + mov r1, #0x45 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov5_021EA6B4 + + thumb_func_start ov5_021EA6BC +ov5_021EA6BC: ; 0x021EA6BC + add r3, r1, #0 + mov r1, #0x46 + lsl r1, r1, #2 + add r2, r0, r1 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EA6BC + + thumb_func_start ov5_021EA6D0 +ov5_021EA6D0: ; 0x021EA6D0 + mov r2, #0x42 + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov5_021EA6D0 + + thumb_func_start ov5_021EA6D8 +ov5_021EA6D8: ; 0x021EA6D8 + add r0, #0xbc + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EA6D8 + + thumb_func_start ov5_021EA6E0 +ov5_021EA6E0: ; 0x021EA6E0 + lsl r1, r1, #2 + add r0, r0, r1 + add r0, #0x90 + ldr r1, [r0, #0] + ldr r0, _021EA6F0 ; =0x00000864 + str r2, [r1, r0] + bx lr + nop +_021EA6F0: .word 0x00000864 + thumb_func_end ov5_021EA6E0 + + thumb_func_start ov5_021EA6F4 +ov5_021EA6F4: ; 0x021EA6F4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r3, #0x43 + add r0, r1, #0 + str r4, [sp] + lsl r3, r3, #2 + add r1, r2, #0 + ldr r2, [r4, r3] + add r3, #8 + ldr r3, [r4, r3] + bl ov5_021E8F90 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EA6F4 + + .rodata + + + .global Unk_ov5_021FAE90 +Unk_ov5_021FAE90: ; 0x021FAE90 + .incbin "incbin/overlay5_rodata.bin", 0x257C, 0x2584 - 0x257C + + .global Unk_ov5_021FAE98 +Unk_ov5_021FAE98: ; 0x021FAE98 + .incbin "incbin/overlay5_rodata.bin", 0x2584, 0x258C - 0x2584 + + .global Unk_ov5_021FAEA0 +Unk_ov5_021FAEA0: ; 0x021FAEA0 + .incbin "incbin/overlay5_rodata.bin", 0x258C, 0x2598 - 0x258C + + .global Unk_ov5_021FAEAC +Unk_ov5_021FAEAC: ; 0x021FAEAC + .incbin "incbin/overlay5_rodata.bin", 0x2598, 0x25A4 - 0x2598 + + .global Unk_ov5_021FAEB8 +Unk_ov5_021FAEB8: ; 0x021FAEB8 + .incbin "incbin/overlay5_rodata.bin", 0x25A4, 0x25C8 - 0x25A4 + + .global Unk_ov5_021FAEDC +Unk_ov5_021FAEDC: ; 0x021FAEDC + .incbin "incbin/overlay5_rodata.bin", 0x25C8, 0x24 + diff --git a/asm/ov5_021EA714.s b/asm/ov5_021EA714.s new file mode 100644 index 000000000..39c73c1e0 --- /dev/null +++ b/asm/ov5_021EA714.s @@ -0,0 +1,184 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EA714 +ov5_021EA714: ; 0x021EA714 + push {r3, lr} + ldr r0, [r0, #4] + cmp r0, #0 + beq _021EA726 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _021EA726 + bl ov25_02253D7C +_021EA726: + pop {r3, pc} + thumb_func_end ov5_021EA714 + + thumb_func_start ov5_021EA728 +ov5_021EA728: ; 0x021EA728 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl sub_02056B24 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_020507E4 + add r6, r0, #0 + add r0, r4, #0 + bl sub_020567E0 + cmp r0, #0 + beq _021EA774 + add r0, r6, #0 + bl sub_0206AE2C + cmp r0, #0 + bne _021EA774 + ldr r0, _021EA788 ; =0x00000019 + mov r1, #2 + bl sub_02006590 + mov r0, #1 + bl sub_0200A914 + str r0, [sp] + ldr r1, [r5, #4] + ldr r2, [r5, #0xc] + ldr r3, [r5, #8] + add r0, r5, #0 + add r1, #0x14 + bl ov25_02253CE8 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_021EA774: + ldr r0, _021EA78C ; =0x00000018 + mov r1, #2 + bl sub_02006590 + ldr r0, [r5, #8] + bl ov25_02253CE0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021EA788: .word 0x00000019 +_021EA78C: .word 0x00000018 + thumb_func_end ov5_021EA728 + + thumb_func_start ov5_021EA790 +ov5_021EA790: ; 0x021EA790 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl sub_02056B24 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_020507E4 + add r6, r0, #0 + add r0, r4, #0 + bl sub_020567E0 + cmp r0, #0 + beq _021EA7C2 + add r0, r6, #0 + bl sub_0206AE2C + cmp r0, #0 + bne _021EA7C2 + ldr r0, [r5, #4] + ldr r0, [r0, #0x14] + bl ov25_02253D5C + pop {r4, r5, r6, pc} +_021EA7C2: + ldr r0, [r5, #8] + bl ov24_02253DA4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EA790 + + thumb_func_start ov5_021EA7CC +ov5_021EA7CC: ; 0x021EA7CC + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + bl sub_02056B24 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_020507E4 + add r6, r0, #0 + add r0, r4, #0 + bl sub_020567E0 + cmp r0, #0 + beq _021EA810 + add r0, r6, #0 + bl sub_0206AE2C + cmp r0, #0 + bne _021EA810 + ldr r0, [r5, #4] + ldr r0, [r0, #0x14] + bl ov25_02253D70 + cmp r0, #0 + beq _021EA824 + ldr r0, [r5, #4] + mov r1, #0 + str r1, [r0, #0x14] + ldr r0, _021EA828 ; =0x00000019 + bl sub_02006514 + mov r0, #1 + pop {r4, r5, r6, pc} +_021EA810: + ldr r0, [r5, #8] + bl ov24_02253DB4 + cmp r0, #0 + beq _021EA824 + ldr r0, _021EA82C ; =0x00000018 + bl sub_02006514 + mov r0, #1 + pop {r4, r5, r6, pc} +_021EA824: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021EA828: .word 0x00000019 +_021EA82C: .word 0x00000018 + thumb_func_end ov5_021EA7CC + + thumb_func_start ov5_021EA830 +ov5_021EA830: ; 0x021EA830 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021EA844 ; =0x00000018 + mov r1, #2 + bl sub_02006590 + ldr r0, [r4, #8] + bl ov24_02253CE0 + pop {r4, pc} + ; .align 2, 0 +_021EA844: .word 0x00000018 + thumb_func_end ov5_021EA830 + + thumb_func_start ov5_021EA848 +ov5_021EA848: ; 0x021EA848 + ldr r3, _021EA850 ; =ov24_02253DA4 + ldr r0, [r0, #8] + bx r3 + nop +_021EA850: .word ov24_02253DA4 + thumb_func_end ov5_021EA848 + + thumb_func_start ov5_021EA854 +ov5_021EA854: ; 0x021EA854 + push {r3, lr} + ldr r0, [r0, #8] + bl ov24_02253DB4 + cmp r0, #0 + beq _021EA86A + ldr r0, _021EA870 ; =0x00000018 + bl sub_02006514 + mov r0, #1 + pop {r3, pc} +_021EA86A: + mov r0, #0 + pop {r3, pc} + nop +_021EA870: .word 0x00000018 + thumb_func_end ov5_021EA854 \ No newline at end of file diff --git a/asm/ov5_021EA874.s b/asm/ov5_021EA874.s new file mode 100644 index 000000000..43b503051 --- /dev/null +++ b/asm/ov5_021EA874.s @@ -0,0 +1,930 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EA874 +ov5_021EA874: ; 0x021EA874 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x34] + bl sub_0202B370 + mov r1, #0 + bl sub_0202AED8 + add r1, r4, #0 + ldr r0, [r4, #0x34] + add r1, #0x4c + mov r2, #4 + bl sub_020391DC + cmp r0, #0 + bne _021EA89C + add sp, #8 + mov r0, #1 + pop {r4, pc} +_021EA89C: + add r0, r4, #0 + mov r1, #0 + add r0, #0x8c + str r1, [r0, #0] + ldr r0, [r4, #0x34] + bl sub_02025E44 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0x30] + ldr r2, _021EA8E8 ; =0x000001E2 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xa + bl sub_0200DD0C + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0x30] + ldr r2, _021EA8EC ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #1 + str r0, [r4, #0x48] + mov r0, #0 + add sp, #8 + pop {r4, pc} + nop +_021EA8E8: .word 0x000001E2 +_021EA8EC: .word 0x000003D9 + thumb_func_end ov5_021EA874 + + thumb_func_start ov5_021EA8F0 +ov5_021EA8F0: ; 0x021EA8F0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0 + add r6, r0, #0 + mvn r1, r1 + add r0, #0x8c + str r1, [r0, #0] + mov r4, #0 + bl sub_02035E18 + cmp r0, #0 + ble _021EA92C + add r5, r6, #0 +_021EA90A: + ldr r0, [r5, #0x4c] + cmp r0, #2 + bne _021EA920 + add r0, r6, #0 + add r0, #0x8c + str r4, [r0, #0] + lsl r0, r4, #2 + mov r1, #0 + add r0, r6, r0 + str r1, [r0, #0x4c] + b _021EA92C +_021EA920: + add r5, r5, #4 + add r4, r4, #1 + bl sub_02035E18 + cmp r4, r0 + blt _021EA90A +_021EA92C: + add r0, r6, #0 + add r0, #0x8c + ldr r1, [r0, #0] + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + bne _021EA940 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021EA940: + ldr r0, [r6, #0x34] + bl sub_0207D990 + ldr r1, _021EA9B8 ; =0x000001B5 + mov r2, #1 + mov r3, #4 + bl sub_0207D688 + cmp r0, #1 + bne _021EA97A + add r0, r6, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, [r6, #0x38] + mov r1, #0 + bl sub_0200B498 + add r0, r6, #0 + mov r1, #0x39 + bl ov5_021EAE78 + mov r0, #2 + str r0, [r6, #0x48] + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021EA97A: + ldr r0, [r6, #0x34] + bl sub_0202B370 + add r4, r0, #0 + mov r5, #0 +_021EA984: + add r0, r4, #0 + add r1, r5, #0 + bl sub_0202AF78 + cmp r0, #0 + bne _021EA9A6 + mov r0, #0 + add r1, r6, #0 + str r0, [sp] + add r1, #0x8c + ldr r0, [r6, #0x34] + ldr r1, [r1, #0] + add r2, r5, #0 + mov r3, #4 + bl sub_02039298 + b _021EA9AC +_021EA9A6: + add r5, r5, #1 + cmp r5, #0x20 + blt _021EA984 +_021EA9AC: + mov r0, #1 + str r0, [r6, #0x48] + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_021EA9B8: .word 0x000001B5 + thumb_func_end ov5_021EA8F0 + + thumb_func_start ov5_021EA9BC +ov5_021EA9BC: ; 0x021EA9BC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x40] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _021EA9E8 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0x30] + ldr r1, _021EA9F0 ; =0x021FAF00 + ldr r0, [r0, #8] + ldr r2, _021EA9F4 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x44] + mov r0, #3 + str r0, [r4, #0x48] +_021EA9E8: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_021EA9F0: .word 0x021FAF00 +_021EA9F4: .word 0x000003D9 + thumb_func_end ov5_021EA9BC + + thumb_func_start ov5_021EA9F8 +ov5_021EA9F8: ; 0x021EA9F8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r0, #0 + ldr r0, [r6, #0x44] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021EAA14 + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021EAA14: + cmp r0, #0 + bne _021EAA60 + ldr r0, [r6, #0x34] + bl sub_0202B370 + add r5, r0, #0 + mov r4, #0 +_021EAA22: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202AF78 + cmp r0, #0 + bne _021EAA44 + mov r0, #0 + add r1, r6, #0 + str r0, [sp] + add r1, #0x8c + ldr r0, [r6, #0x34] + ldr r1, [r1, #0] + add r2, r4, #0 + mov r3, #4 + bl sub_02039298 + b _021EAA4A +_021EAA44: + add r4, r4, #1 + cmp r4, #0x20 + blt _021EAA22 +_021EAA4A: + cmp r4, #0x20 + bne _021EAA60 + add r0, r6, #0 + mov r1, #0x3a + bl ov5_021EAE78 + mov r0, #4 + str r0, [r6, #0x48] + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_021EAA60: + mov r0, #1 + str r0, [r6, #0x48] + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EA9F8 + + thumb_func_start ov5_021EAA6C +ov5_021EAA6C: ; 0x021EAA6C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x40] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _021EAA98 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0x30] + ldr r1, _021EAAA0 ; =0x021FAF00 + ldr r0, [r0, #8] + ldr r2, _021EAAA4 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x44] + mov r0, #5 + str r0, [r4, #0x48] +_021EAA98: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_021EAAA0: .word 0x021FAF00 +_021EAAA4: .word 0x000003D9 + thumb_func_end ov5_021EAA6C + + thumb_func_start ov5_021EAAA8 +ov5_021EAAA8: ; 0x021EAAA8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x44] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021EAAC0 + mov r0, #0 + pop {r4, pc} +_021EAAC0: + cmp r0, #0 + bne _021EAAC8 + mov r0, #8 + b _021EAAE6 +_021EAAC8: + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, [r4, #0x38] + mov r1, #0 + bl sub_0200B498 + add r0, r4, #0 + mov r1, #0x3b + bl ov5_021EAE78 + mov r0, #6 +_021EAAE6: + str r0, [r4, #0x48] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021EAAA8 + + thumb_func_start ov5_021EAAEC +ov5_021EAAEC: ; 0x021EAAEC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x40] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _021EAB18 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0x30] + ldr r1, _021EAB20 ; =0x021FAF00 + ldr r0, [r0, #8] + ldr r2, _021EAB24 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x44] + mov r0, #7 + str r0, [r4, #0x48] +_021EAB18: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_021EAB20: .word 0x021FAF00 +_021EAB24: .word 0x000003D9 + thumb_func_end ov5_021EAAEC + + thumb_func_start ov5_021EAB28 +ov5_021EAB28: ; 0x021EAB28 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x44] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021EAB40 + mov r0, #0 + pop {r4, pc} +_021EAB40: + cmp r0, #0 + bne _021EAB48 + mov r0, #0xc + b _021EAB52 +_021EAB48: + add r0, r4, #0 + mov r1, #0x3a + bl ov5_021EAE78 + mov r0, #4 +_021EAB52: + str r0, [r4, #0x48] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021EAB28 + + thumb_func_start ov5_021EAB58 +ov5_021EAB58: ; 0x021EAB58 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r0, [r5, #0x34] + bl sub_0202B370 + add r6, r0, #0 + bl sub_0202AF94 + add r7, r0, #0 + add r0, r7, #1 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #0] + mov r0, #1 + str r0, [sp] + mov r0, #0xc + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _021EAC34 ; =0x000001AB + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0x30] + add r1, #0x20 + ldr r0, [r0, #8] + mov r2, #3 + mov r3, #0x13 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _021EAC38 ; =0x000003D9 + add r0, #0x20 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r4, #0 +_021EABAA: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202AF78 + cmp r0, #0 + beq _021EABD0 + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202AEF0 + add r1, r0, #0 + ldr r0, [r5, #8] + bl sub_02023D28 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + add r2, r4, #0 + bl sub_02013A6C +_021EABD0: + add r4, r4, #1 + cmp r4, #0x20 + blt _021EABAA + mov r2, #0xb + add r3, r2, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #0x3c] + sub r3, #0xd + bl sub_02013A4C + ldr r4, _021EAC3C ; =0x021FAF08 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r1, r7, #1 + add r0, sp, #0x14 + strh r1, [r0, #0x10] + mov r1, #5 + strh r1, [r0, #0x12] + ldr r0, [r5, #0] + mov r1, #0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0x20 + str r0, [sp, #0x20] + ldr r0, _021EAC40 ; =ov5_021EAF90 + str r5, [sp, #0x30] + str r0, [sp, #0x18] + add r0, r2, #0 + add r2, r1, #0 + mov r3, #4 + bl sub_0200112C + str r0, [r5, #4] + add r0, r5, #0 + add r0, #0x20 + bl sub_0201A954 + mov r0, #9 + str r0, [r5, #0x48] + mov r0, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021EAC34: .word 0x000001AB +_021EAC38: .word 0x000003D9 +_021EAC3C: .word 0x021FAF08 +_021EAC40: .word ov5_021EAF90 + thumb_func_end ov5_021EAB58 + + thumb_func_start ov5_021EAC44 +ov5_021EAC44: ; 0x021EAC44 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + bl sub_02001288 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _021EAC62 + add r0, r0, #1 + cmp r4, r0 + bne _021EAC8A + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EAC62: + ldr r0, _021EACF8 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, [r5, #0x38] + mov r1, #0 + bl sub_0200B498 + add r0, r5, #0 + mov r1, #0x3b + bl ov5_021EAE78 + mov r0, #6 + str r0, [r5, #0x48] + b _021EACD2 +_021EAC8A: + ldr r0, _021EACF8 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0x90 + str r4, [r0, #0] + ldr r0, [r5, #0x34] + bl sub_0202B370 + add r7, r0, #0 + mov r0, #4 + bl sub_02025E6C + add r6, r0, #0 + add r0, r7, #0 + add r1, r4, #0 + bl sub_0202AEF0 + add r1, r0, #0 + add r0, r6, #0 + bl sub_02025EC0 + ldr r0, [r5, #0x38] + mov r1, #0 + add r2, r6, #0 + bl sub_0200B498 + add r0, r6, #0 + bl sub_020181C4 + add r0, r5, #0 + mov r1, #0x3c + bl ov5_021EAE78 + mov r0, #0xa + str r0, [r5, #0x48] +_021EACD2: + add r0, r5, #0 + add r0, #0x20 + mov r1, #0 + bl sub_0200DC9C + add r0, r5, #0 + add r0, #0x20 + bl sub_0201A8FC + mov r1, #0 + ldr r0, [r5, #4] + add r2, r1, #0 + bl sub_02001384 + ldr r0, [r5, #0] + bl sub_02013A3C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021EACF8: .word 0x000005DC + thumb_func_end ov5_021EAC44 + + thumb_func_start ov5_021EACFC +ov5_021EACFC: ; 0x021EACFC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x40] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _021EAD28 + mov r0, #4 + str r0, [sp] + ldr r0, [r4, #0x30] + ldr r1, _021EAD30 ; =0x021FAF00 + ldr r0, [r0, #8] + ldr r2, _021EAD34 ; =0x000003D9 + mov r3, #0xb + bl sub_02002100 + str r0, [r4, #0x44] + mov r0, #0xb + str r0, [r4, #0x48] +_021EAD28: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_021EAD30: .word 0x021FAF00 +_021EAD34: .word 0x000003D9 + thumb_func_end ov5_021EACFC + + thumb_func_start ov5_021EAD38 +ov5_021EAD38: ; 0x021EAD38 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x34] + bl sub_0202B370 + add r4, r0, #0 + ldr r0, [r5, #0x44] + mov r1, #4 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021EAD58 + mov r0, #0 + pop {r3, r4, r5, pc} +_021EAD58: + cmp r0, #0 + bne _021EAD90 + ldr r0, [r5, #0x34] + bl sub_0203068C + add r1, r5, #0 + add r1, #0x90 + ldr r1, [r1, #0] + bl sub_02030788 + add r1, r5, #0 + add r1, #0x90 + ldr r1, [r1, #0] + add r0, r4, #0 + bl sub_0202AFD4 + mov r0, #0 + add r1, r5, #0 + str r0, [sp] + add r1, #0x8c + ldr r0, [r5, #0x34] + ldr r1, [r1, #0] + mov r2, #0x1f + mov r3, #4 + bl sub_02039298 + mov r0, #1 + b _021EADAE +_021EAD90: + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, [r5, #0x38] + mov r1, #0 + bl sub_0200B498 + add r0, r5, #0 + mov r1, #0x3b + bl ov5_021EAE78 + mov r0, #6 +_021EADAE: + str r0, [r5, #0x48] + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EAD38 + + thumb_func_start ov5_021EADB4 +ov5_021EADB4: ; 0x021EADB4 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02050A64 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02050A60 + ldr r0, [r4, #0x48] + cmp r0, #0xc + bhi _021EAE74 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021EADD6: ; jump table + .short _021EADF0 - _021EADD6 - 2 ; case 0 + .short _021EAE00 - _021EADD6 - 2 ; case 1 + .short _021EAE10 - _021EADD6 - 2 ; case 2 + .short _021EAE18 - _021EADD6 - 2 ; case 3 + .short _021EAE20 - _021EADD6 - 2 ; case 4 + .short _021EAE28 - _021EADD6 - 2 ; case 5 + .short _021EAE30 - _021EADD6 - 2 ; case 6 + .short _021EAE38 - _021EADD6 - 2 ; case 7 + .short _021EAE40 - _021EADD6 - 2 ; case 8 + .short _021EAE48 - _021EADD6 - 2 ; case 9 + .short _021EAE50 - _021EADD6 - 2 ; case 10 + .short _021EAE58 - _021EADD6 - 2 ; case 11 + .short _021EAE60 - _021EADD6 - 2 ; case 12 +_021EADF0: + add r0, r4, #0 + bl ov5_021EA874 + cmp r0, #0 + beq _021EAE74 + mov r0, #0xc + str r0, [r4, #0x48] + b _021EAE74 +_021EAE00: + add r0, r4, #0 + bl ov5_021EA8F0 + cmp r0, #0 + beq _021EAE74 + mov r0, #0xc + str r0, [r4, #0x48] + b _021EAE74 +_021EAE10: + add r0, r4, #0 + bl ov5_021EA9BC + b _021EAE74 +_021EAE18: + add r0, r4, #0 + bl ov5_021EA9F8 + b _021EAE74 +_021EAE20: + add r0, r4, #0 + bl ov5_021EAA6C + b _021EAE74 +_021EAE28: + add r0, r4, #0 + bl ov5_021EAAA8 + b _021EAE74 +_021EAE30: + add r0, r4, #0 + bl ov5_021EAAEC + b _021EAE74 +_021EAE38: + add r0, r4, #0 + bl ov5_021EAB28 + b _021EAE74 +_021EAE40: + add r0, r4, #0 + bl ov5_021EAB58 + b _021EAE74 +_021EAE48: + add r0, r4, #0 + bl ov5_021EAC44 + b _021EAE74 +_021EAE50: + add r0, r4, #0 + bl ov5_021EACFC + b _021EAE74 +_021EAE58: + add r0, r4, #0 + bl ov5_021EAD38 + b _021EAE74 +_021EAE60: + add r0, r4, #0 + bl ov5_021EAF1C + add r0, r4, #0 + bl sub_020181C4 + bl sub_0203D140 + mov r0, #1 + pop {r3, r4, r5, pc} +_021EAE74: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EADB4 + + thumb_func_start ov5_021EAE78 +ov5_021EAE78: ; 0x021EAE78 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0x10 + add r5, r1, #0 + bl sub_0201A7CC + cmp r0, #0 + beq _021EAE90 + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A8FC +_021EAE90: + ldr r0, [r4, #0x3c] + ldr r2, [r4, #8] + add r1, r5, #0 + bl sub_0200B1B8 + ldr r0, [r4, #0x38] + ldr r1, [r4, #0xc] + ldr r2, [r4, #8] + bl sub_0200C388 + ldr r0, [r4, #0x30] + add r1, r4, #0 + ldr r0, [r0, #8] + add r1, #0x10 + mov r2, #3 + bl sub_0205D8F4 + ldr r0, [r4, #0x30] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x10 + bl sub_0205D944 + ldr r0, [r4, #0x30] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r2, r0, #0 + add r0, r4, #0 + ldr r1, [r4, #0xc] + add r0, #0x10 + mov r3, #1 + bl sub_0205D994 + str r0, [r4, #0x40] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EAE78 + + thumb_func_start ov5_021EAEE0 +ov5_021EAEE0: ; 0x021EAEE0 + push {r4, lr} + mov r1, #0 + mov r2, #0x94 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #4 + bl sub_0200B358 + str r0, [r4, #0x38] + ldr r2, _021EAF18 ; =0x000002A3 + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + str r0, [r4, #0x3c] + mov r0, #0x6e + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0xc] + mov r0, #0x6e + mov r1, #4 + bl sub_02023790 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_021EAF18: .word 0x000002A3 + thumb_func_end ov5_021EAEE0 + + thumb_func_start ov5_021EAF1C +ov5_021EAF1C: ; 0x021EAF1C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_0200B190 + ldr r0, [r4, #0x38] + bl sub_0200B3F0 + ldr r0, [r4, #0xc] + bl sub_020237BC + ldr r0, [r4, #8] + bl sub_020237BC + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A7CC + cmp r0, #0 + beq _021EAF4C + add r4, #0x10 + add r0, r4, #0 + bl sub_0201A8FC +_021EAF4C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EAF1C + + thumb_func_start ov5_021EAF50 +ov5_021EAF50: ; 0x021EAF50 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r5, [r6, #0x10] + mov r0, #0xb + mov r1, #0x94 + bl sub_02018184 + add r4, r0, #0 + bl ov5_021EAEE0 + str r6, [r4, #0x30] + ldr r0, [r6, #0xc] + str r0, [r4, #0x34] + mov r0, #0 + str r0, [r4, #0x48] + cmp r5, #0 + bne _021EAF7E + ldr r1, _021EAF8C ; =ov5_021EADB4 + add r0, r6, #0 + add r2, r4, #0 + bl sub_02050904 + pop {r4, r5, r6, pc} +_021EAF7E: + ldr r1, _021EAF8C ; =ov5_021EADB4 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + pop {r4, r5, r6, pc} + nop +_021EAF8C: .word ov5_021EADB4 + thumb_func_end ov5_021EAF50 + + thumb_func_start ov5_021EAF90 +ov5_021EAF90: ; 0x021EAF90 + push {r3, lr} + cmp r2, #0 + bne _021EAF9C + ldr r0, _021EAFA0 ; =0x000005DC + bl sub_02005748 +_021EAF9C: + pop {r3, pc} + nop +_021EAFA0: .word 0x000005DC + thumb_func_end ov5_021EAF90 + + .rodata + + + .global Unk_ov5_021FAF00 +Unk_ov5_021FAF00: ; 0x021FAF00 + .incbin "incbin/overlay5_rodata.bin", 0x25EC, 0x25F4 - 0x25EC + + .global Unk_ov5_021FAF08 +Unk_ov5_021FAF08: ; 0x021FAF08 + .incbin "incbin/overlay5_rodata.bin", 0x25F4, 0x20 + diff --git a/asm/ov5_021EAFA4.s b/asm/ov5_021EAFA4.s new file mode 100644 index 000000000..af2dc69fa --- /dev/null +++ b/asm/ov5_021EAFA4.s @@ -0,0 +1,266 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EAFA4 +ov5_021EAFA4: ; 0x021EAFA4 + push {r4, r5, r6, r7, lr} + sub sp, #0x6c + add r4, r3, #0 + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0 + str r0, [sp, #0x58] + ldr r1, [r4, #0x50] + add r0, sp, #0x60 + add r6, r2, #0 + bl sub_02020AAC + ldr r3, _021EB0C0 ; =0x021FAF28 + add r2, sp, #0xc + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + cmp r6, #0x60 + str r0, [r2, #0] + bhs _021EAFDE + mov r1, #0x60 + sub r0, r1, r6 + lsl r0, r0, #0x18 + ldrh r2, [r4] + lsr r0, r0, #0x18 + mul r0, r2 + bl sub_020E1F6C + b _021EAFF8 +_021EAFDE: + sub r6, #0x60 + lsl r0, r6, #0x18 + ldrh r1, [r4] + lsr r0, r0, #0x18 + mul r0, r1 + mov r1, #0x60 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + mov r0, #0 + mvn r0, r0 + mul r0, r1 +_021EAFF8: + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + cmp r5, #0x80 + bhs _021EB016 + mov r2, #0x80 + sub r2, r2, r5 + lsl r2, r2, #0x18 + ldrh r0, [r4, #2] + lsr r2, r2, #0x18 + mul r2, r0 + asr r0, r2, #6 + lsr r0, r0, #0x19 + add r0, r2, r0 + lsl r0, r0, #9 + b _021EB034 +_021EB016: + ldrh r2, [r4, #2] + sub r5, #0x80 + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + add r3, r2, #0 + mul r3, r0 + asr r0, r3, #6 + lsr r0, r0, #0x19 + add r0, r3, r0 + lsl r0, r0, #9 + lsr r2, r0, #0x10 + mov r0, #0 + mvn r0, r0 + mul r0, r2 + lsl r0, r0, #0x10 +_021EB034: + lsr r5, r0, #0x10 + asr r0, r1, #4 + lsl r3, r0, #1 + lsl r1, r3, #1 + ldr r2, _021EB0C4 ; =0x020F983C + add r3, r3, #1 + lsl r3, r3, #1 + ldrsh r1, [r2, r1] + ldrsh r2, [r2, r3] + add r0, sp, #0x24 + bl sub_020BBC30 + add r0, sp, #0xc + add r1, sp, #0x24 + add r2, sp, #0x18 + bl sub_020BC2CC + asr r0, r5, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + ldr r3, _021EB0C4 ; =0x020F983C + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #0x24 + bl sub_020BBC50 + add r0, sp, #0x18 + add r1, sp, #0x24 + add r2, r0, #0 + bl sub_020BC2CC + add r0, sp, #0x18 + add r1, r4, #0 + add r1, #0x20 + add r2, r0, #0 + bl sub_020BC2CC + add r0, r4, #0 + add r0, #0x10 + add r1, sp, #0x18 + bl sub_020BD218 + add r1, r0, #0 + ldr r0, [r4, #0x1c] + bl sub_020BCFD0 + neg r0, r0 + add r1, sp, #0x18 + add r2, r4, #4 + add r3, sp, #0 + bl sub_020BD628 + ldr r1, [sp, #0x60] + ldr r0, [sp] + add r2, sp, #0x54 + add r0, r1, r0 + str r0, [sp, #0x54] + ldr r1, [sp, #0x68] + ldr r0, [sp, #8] + add r0, r1, r0 + str r0, [sp, #0x5c] + ldmia r2!, {r0, r1} + stmia r7!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r7, #0] + add sp, #0x6c + pop {r4, r5, r6, r7, pc} + nop +_021EB0C0: .word 0x021FAF28 +_021EB0C4: .word 0x020F983C + thumb_func_end ov5_021EAFA4 + + thumb_func_start ov5_021EB0C8 +ov5_021EB0C8: ; 0x021EB0C8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + mov r1, #0x60 + bl sub_02018144 + add r1, r5, #0 + add r4, r0, #0 + bl ov5_021EB0E0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB0C8 + + thumb_func_start ov5_021EB0E0 +ov5_021EB0E0: ; 0x021EB0E0 + push {r4, r5, lr} + sub sp, #0x2c + add r5, r0, #0 + add r4, r1, #0 + add r0, sp, #0 + bl sub_02020A94 + add r0, r4, #0 + bl sub_02020A88 + strh r0, [r5] + ldrh r0, [r5] + ldr r2, _021EB17C ; =0x020F983C + asr r0, r0, #4 + lsl r1, r0, #1 + lsl r0, r1, #1 + add r1, r1, #1 + lsl r1, r1, #1 + ldrsh r0, [r2, r0] + ldrsh r1, [r2, r1] + bl sub_020BCFD0 + lsl r0, r0, #2 + mov r1, #3 + bl sub_020E1F6C + bl sub_020BD964 + ldr r3, _021EB180 ; =0x021FAF34 + strh r0, [r5, #2] + ldmia r3!, {r0, r1} + add r2, sp, #0x20 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r4, #0 + str r0, [r2, #0] + add r0, sp, #0x14 + bl sub_02020ABC + add r0, sp, #8 + add r1, r4, #0 + bl sub_02020AAC + add r0, sp, #0x14 + add r1, sp, #8 + add r2, r5, #4 + bl sub_020BD1B0 + add r3, sp, #0x20 + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r5, #4 + str r0, [r2, #0] + add r0, sp, #0x20 + bl sub_020BD218 + str r0, [r5, #0x1c] + add r0, sp, #0 + ldrh r0, [r0] + ldr r3, _021EB17C ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + add r0, r5, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, #0x20 + bl sub_020BBC30 + str r4, [r5, #0x50] + add sp, #0x2c + pop {r4, r5, pc} + nop +_021EB17C: .word 0x020F983C +_021EB180: .word 0x021FAF34 + thumb_func_end ov5_021EB0E0 + + thumb_func_start ov5_021EB184 +ov5_021EB184: ; 0x021EB184 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021EB19E + bne _021EB194 + bl sub_02022974 +_021EB194: + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] +_021EB19E: + pop {r4, pc} + thumb_func_end ov5_021EB184 + + .rodata + + + .global Unk_ov5_021FAF28 +Unk_ov5_021FAF28: ; 0x021FAF28 + .incbin "incbin/overlay5_rodata.bin", 0x2614, 0x2620 - 0x2614 + + .global Unk_ov5_021FAF34 +Unk_ov5_021FAF34: ; 0x021FAF34 + .incbin "incbin/overlay5_rodata.bin", 0x2620, 0xC + diff --git a/asm/ov5_021EB1A0.s b/asm/ov5_021EB1A0.s new file mode 100644 index 000000000..3b26b1ffe --- /dev/null +++ b/asm/ov5_021EB1A0.s @@ -0,0 +1,3288 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EB1A0 +ov5_021EB1A0: ; 0x021EB1A0 + push {r4, lr} + add r4, r0, #0 + bl sub_02062920 + ldr r1, _021EB2E4 ; =0x00000107 + cmp r0, r1 + bgt _021EB24A + bge _021EB29C + cmp r0, #0x98 + bgt _021EB1DC + bge _021EB2B0 + cmp r0, #0x15 + bgt _021EB1C2 + bge _021EB29C + cmp r0, #0 + beq _021EB29C + b _021EB2C6 +_021EB1C2: + cmp r0, #0x64 + bgt _021EB1D6 + cmp r0, #0x61 + blt _021EB2C6 + beq _021EB29C + cmp r0, #0x62 + beq _021EB29C + cmp r0, #0x64 + beq _021EB2C2 + b _021EB2C6 +_021EB1D6: + cmp r0, #0x97 + beq _021EB2B0 + b _021EB2C6 +_021EB1DC: + cmp r0, #0xb0 + bgt _021EB1E8 + bge _021EB29C + cmp r0, #0x99 + beq _021EB2B0 + b _021EB2C6 +_021EB1E8: + cmp r0, #0xb1 + bgt _021EB1F0 + beq _021EB29C + b _021EB2C6 +_021EB1F0: + add r1, r0, #0 + sub r1, #0xb2 + cmp r1, #0x22 + bhi _021EB2C6 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021EB204: ; jump table + .short _021EB29C - _021EB204 - 2 ; case 0 + .short _021EB29C - _021EB204 - 2 ; case 1 + .short _021EB29C - _021EB204 - 2 ; case 2 + .short _021EB29C - _021EB204 - 2 ; case 3 + .short _021EB2C6 - _021EB204 - 2 ; case 4 + .short _021EB2C6 - _021EB204 - 2 ; case 5 + .short _021EB2C6 - _021EB204 - 2 ; case 6 + .short _021EB2C6 - _021EB204 - 2 ; case 7 + .short _021EB29C - _021EB204 - 2 ; case 8 + .short _021EB29C - _021EB204 - 2 ; case 9 + .short _021EB29C - _021EB204 - 2 ; case 10 + .short _021EB29C - _021EB204 - 2 ; case 11 + .short _021EB2C6 - _021EB204 - 2 ; case 12 + .short _021EB2C6 - _021EB204 - 2 ; case 13 + .short _021EB2C6 - _021EB204 - 2 ; case 14 + .short _021EB2C6 - _021EB204 - 2 ; case 15 + .short _021EB2C6 - _021EB204 - 2 ; case 16 + .short _021EB2A6 - _021EB204 - 2 ; case 17 + .short _021EB29C - _021EB204 - 2 ; case 18 + .short _021EB29C - _021EB204 - 2 ; case 19 + .short _021EB29C - _021EB204 - 2 ; case 20 + .short _021EB29C - _021EB204 - 2 ; case 21 + .short _021EB29C - _021EB204 - 2 ; case 22 + .short _021EB29C - _021EB204 - 2 ; case 23 + .short _021EB2C6 - _021EB204 - 2 ; case 24 + .short _021EB2C6 - _021EB204 - 2 ; case 25 + .short _021EB2C6 - _021EB204 - 2 ; case 26 + .short _021EB2C6 - _021EB204 - 2 ; case 27 + .short _021EB2C6 - _021EB204 - 2 ; case 28 + .short _021EB2C6 - _021EB204 - 2 ; case 29 + .short _021EB2C6 - _021EB204 - 2 ; case 30 + .short _021EB2C6 - _021EB204 - 2 ; case 31 + .short _021EB29C - _021EB204 - 2 ; case 32 + .short _021EB29C - _021EB204 - 2 ; case 33 + .short _021EB29C - _021EB204 - 2 ; case 34 +_021EB24A: + ldr r1, _021EB2E8 ; =0x0000010F + cmp r0, r1 + bgt _021EB278 + bge _021EB29C + sub r2, r1, #3 + cmp r0, r2 + bgt _021EB262 + bge _021EB29C + sub r1, r1, #7 + cmp r0, r1 + beq _021EB2B8 + b _021EB2C6 +_021EB262: + sub r2, r1, #2 + cmp r0, r2 + bgt _021EB270 + sub r1, r1, #2 + cmp r0, r1 + beq _021EB29C + b _021EB2C6 +_021EB270: + sub r1, r1, #1 + cmp r0, r1 + beq _021EB29C + b _021EB2C6 +_021EB278: + add r2, r1, #2 + cmp r0, r2 + bgt _021EB288 + bge _021EB29C + add r1, r1, #1 + cmp r0, r1 + beq _021EB29C + b _021EB2C6 +_021EB288: + add r2, r1, #3 + cmp r0, r2 + bgt _021EB296 + add r1, r1, #3 + cmp r0, r1 + beq _021EB29C + b _021EB2C6 +_021EB296: + add r1, r1, #4 + cmp r0, r1 + bne _021EB2C6 +_021EB29C: + add r0, r4, #0 + bl sub_02062AF0 + ldr r0, [r0, #4] + pop {r4, pc} +_021EB2A6: + add r0, r4, #0 + bl sub_02062AF0 + ldr r0, [r0, #4] + pop {r4, pc} +_021EB2B0: + add r0, r4, #0 + bl ov5_021ECB80 + pop {r4, pc} +_021EB2B8: + add r0, r4, #0 + bl sub_02062AF0 + ldr r0, [r0, #4] + pop {r4, pc} +_021EB2C2: + mov r0, #0 + pop {r4, pc} +_021EB2C6: + add r0, r4, #0 + bl ov5_021ECD04 + ldr r0, [r0, #4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + cmp r0, #1 + bne _021EB2E0 + add r0, r4, #0 + bl sub_02062AF0 + ldr r0, [r0, #4] + pop {r4, pc} +_021EB2E0: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021EB2E4: .word 0x00000107 +_021EB2E8: .word 0x0000010F + thumb_func_end ov5_021EB1A0 + + thumb_func_start ov5_021EB2EC +ov5_021EB2EC: ; 0x021EB2EC + push {r3, r4, r5, lr} + mov r1, #0x10 + add r5, r0, #0 + bl sub_02062ACC + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + strb r0, [r4, #2] + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EB312 + add r0, r5, #0 + bl sub_02062B68 +_021EB312: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB2EC + + thumb_func_start ov5_021EB314 +ov5_021EB314: ; 0x021EB314 + push {r4, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r1, r0, #0 + add r0, r4, #0 + add r1, r1, #4 + bl ov5_021ECFA4 + pop {r4, pc} + thumb_func_end ov5_021EB314 + + thumb_func_start ov5_021EB328 +ov5_021EB328: ; 0x021EB328 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EB340 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED01C +_021EB340: + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECFA4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB328 + + thumb_func_start ov5_021EB354 +ov5_021EB354: ; 0x021EB354 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB396 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021EB376 + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 +_021EB376: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EB396 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED03C + ldr r1, [r4, #4] + add r0, r5, #0 + bl ov5_021EDEB4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628C4 +_021EB396: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB354 + + thumb_func_start ov5_021EB398 +ov5_021EB398: ; 0x021EB398 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + bl sub_02062AF0 + ldr r7, [r0, #4] + add r0, r4, #0 + bl sub_02062AF0 + str r0, [sp] + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB402 + cmp r7, #0 + beq _021EB402 + add r0, r4, #0 + bl sub_0206298C + str r0, [sp, #4] + add r0, r4, #0 + bl sub_02062A14 + add r5, r0, #0 + cmp r5, #9 + blt _021EB3D2 + bl sub_02022974 +_021EB3D2: + lsl r6, r5, #2 + ldr r5, _021EB408 ; =0x021FF3D4 + ldr r2, [sp] + ldr r3, [sp, #4] + ldr r5, [r5, r6] + add r0, r4, #0 + add r1, r7, #0 + blx r5 + ldr r1, [sp, #4] + ldr r0, [sp] + strb r1, [r0, #2] + add r0, r4, #0 + bl sub_02062A14 + ldr r1, [sp] + strb r0, [r1, #3] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EC6C0 +_021EB402: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EB408: .word 0x021FF3D4 + thumb_func_end ov5_021EB398 + + thumb_func_start ov5_021EB40C +ov5_021EB40C: ; 0x021EB40C + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r5, r0, #0 + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB436 + ldr r5, [r5, #4] + cmp r5, #0 + beq _021EB436 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EC6C0 +_021EB436: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB40C + + thumb_func_start ov5_021EB438 +ov5_021EB438: ; 0x021EB438 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r5, r0, #0 + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB476 + ldr r5, [r5, #4] + cmp r5, #0 + beq _021EB476 + add r0, r4, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB466 + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EB466: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EC6C0 +_021EB476: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB438 + + thumb_func_start ov5_021EB478 +ov5_021EB478: ; 0x021EB478 + push {r4, lr} + mov r0, #2 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EB49C + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + b _021EB4A2 +_021EB49C: + add r0, r4, #0 + bl ov5_021EC668 +_021EB4A2: + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 + pop {r4, pc} + thumb_func_end ov5_021EB478 + + thumb_func_start ov5_021EB4AC +ov5_021EB4AC: ; 0x021EB4AC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EB4D0 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EB4D0: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB4E4 + mov r1, #2 + add r0, r4, #0 + lsl r1, r1, #0xa + bl sub_02021368 +_021EB4E4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EB4AC + + thumb_func_start ov5_021EB4E8 +ov5_021EB4E8: ; 0x021EB4E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EB50C + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EB50C: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB520 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EB520: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EB4E8 + + thumb_func_start ov5_021EB524 +ov5_021EB524: ; 0x021EB524 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EB548 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EB548: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB55C + mov r1, #2 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EB55C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EB524 + + thumb_func_start ov5_021EB560 +ov5_021EB560: ; 0x021EB560 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #2 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EB584 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EB584: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB598 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xe + bl sub_02021368 +_021EB598: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EB560 + + thumb_func_start ov5_021EB59C +ov5_021EB59C: ; 0x021EB59C + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r6, r0, #0 + add r4, r2, #0 + mov r0, #2 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EB5C8 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + mov r0, #0 + strh r0, [r4] +_021EB5C8: + mov r0, #3 + ldrsb r0, [r4, r0] + cmp r0, #6 + beq _021EB5D4 + mov r0, #0 + strh r0, [r4] +_021EB5D4: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB618 + ldr r6, _021EB61C ; =0x021FF35C + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #0 + str r0, [r3, #0] + ldrsh r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02021368 + mov r0, #0 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4] + ldrsh r1, [r4, r0] + lsl r2, r1, #2 + add r1, sp, #0 + ldr r1, [r1, r2] + cmp r1, #0 + bne _021EB618 + strh r0, [r4] +_021EB618: + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021EB61C: .word 0x021FF35C + thumb_func_end ov5_021EB59C + + thumb_func_start ov5_021EB620 +ov5_021EB620: ; 0x021EB620 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + add r4, r2, #0 + mov r0, #2 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EB64C + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + mov r0, #0 + strh r0, [r4] +_021EB64C: + mov r0, #3 + ldrsb r0, [r4, r0] + cmp r0, #7 + beq _021EB658 + mov r0, #0 + strh r0, [r4] +_021EB658: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB694 + ldr r6, _021EB698 ; =0x021FF32C + add r3, sp, #0 + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #0 + ldrsh r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02021368 + mov r0, #0 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4] + ldrsh r1, [r4, r0] + lsl r2, r1, #2 + add r1, sp, #0 + ldr r1, [r1, r2] + cmp r1, #0 + bne _021EB694 + strh r0, [r4] +_021EB694: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021EB698: .word 0x021FF32C + thumb_func_end ov5_021EB620 + + thumb_func_start ov5_021EB69C +ov5_021EB69C: ; 0x021EB69C + push {r4, r5, r6, lr} + sub sp, #0x20 + add r6, r0, #0 + add r4, r2, #0 + mov r0, #2 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EB6C8 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + mov r0, #0 + strh r0, [r4] +_021EB6C8: + mov r0, #3 + ldrsb r0, [r4, r0] + cmp r0, #8 + beq _021EB6D4 + mov r0, #0 + strh r0, [r4] +_021EB6D4: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EB718 + ldr r6, _021EB71C ; =0x021FF3B4 + add r3, sp, #0 + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #0 + ldrsh r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02021368 + mov r0, #0 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4] + ldrsh r1, [r4, r0] + lsl r2, r1, #2 + add r1, sp, #0 + ldr r1, [r1, r2] + cmp r1, #0 + bne _021EB718 + strh r0, [r4] +_021EB718: + add sp, #0x20 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021EB71C: .word 0x021FF3B4 + thumb_func_end ov5_021EB69C + + thumb_func_start ov5_021EB720 +ov5_021EB720: ; 0x021EB720 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + bl sub_02062AF0 + ldr r7, [r0, #4] + add r0, r4, #0 + bl sub_02062AF0 + str r0, [sp] + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB78A + cmp r7, #0 + beq _021EB78A + add r0, r4, #0 + bl sub_0206298C + str r0, [sp, #4] + add r0, r4, #0 + bl sub_02062A14 + add r5, r0, #0 + cmp r5, #0xa + blt _021EB75A + bl sub_02022974 +_021EB75A: + lsl r6, r5, #2 + ldr r5, _021EB790 ; =0x021FF420 + ldr r2, [sp] + ldr r3, [sp, #4] + ldr r5, [r5, r6] + add r0, r4, #0 + add r1, r7, #0 + blx r5 + ldr r1, [sp, #4] + ldr r0, [sp] + strb r1, [r0, #2] + add r0, r4, #0 + bl sub_02062A14 + ldr r1, [sp] + strb r0, [r1, #3] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EC6C0 +_021EB78A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EB790: .word 0x021FF420 + thumb_func_end ov5_021EB720 + + thumb_func_start ov5_021EB794 +ov5_021EB794: ; 0x021EB794 + push {r4, lr} + mov r0, #2 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + bne _021EB7A8 + mov r0, #3 + ldrsb r0, [r2, r0] + cmp r0, #9 + bne _021EB7C0 +_021EB7A8: + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + b _021EB7C6 +_021EB7C0: + add r0, r4, #0 + bl ov5_021EC668 +_021EB7C6: + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 + pop {r4, pc} + thumb_func_end ov5_021EB794 + + thumb_func_start ov5_021EB7D0 +ov5_021EB7D0: ; 0x021EB7D0 + push {r4, lr} + mov r0, #3 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r0, #9 + beq _021EB7EC + add r0, r4, #0 + mov r1, #4 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EB7EC: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + pop {r4, pc} + thumb_func_end ov5_021EB7D0 + + thumb_func_start ov5_021EB7F8 +ov5_021EB7F8: ; 0x021EB7F8 + push {r3, r4, r5, lr} + mov r1, #0x10 + add r5, r0, #0 + bl sub_02062ACC + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + strb r0, [r4] + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1c + sub r1, r1, r2 + mov r0, #0x1c + ror r1, r0 + add r0, r2, r1 + strb r0, [r4, #2] + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EB830 + add r0, r5, #0 + bl sub_02062B68 +_021EB830: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EB7F8 + + thumb_func_start ov5_021EB834 +ov5_021EB834: ; 0x021EB834 + push {r4, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r1, r0, #0 + add r0, r4, #0 + add r1, r1, #4 + bl ov5_021ECFA4 + pop {r4, pc} + thumb_func_end ov5_021EB834 + + thumb_func_start ov5_021EB848 +ov5_021EB848: ; 0x021EB848 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EB860 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED01C +_021EB860: + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECFA4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB848 + + thumb_func_start ov5_021EB874 +ov5_021EB874: ; 0x021EB874 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB8B6 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021EB896 + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 +_021EB896: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EB8B6 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED03C + ldr r1, [r4, #4] + add r0, r5, #0 + bl ov5_021EDEB4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628C4 +_021EB8B6: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EB874 + + thumb_func_start ov5_021EB8B8 +ov5_021EB8B8: ; 0x021EB8B8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r6, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EB942 + cmp r6, #0 + beq _021EB942 + add r0, r5, #0 + bl sub_0206298C + add r7, r0, #0 + add r0, r5, #0 + bl sub_02062A14 + mov r1, #2 + ldrsb r0, [r4, r1] + cmp r0, #0 + beq _021EB8FC + sub r0, r0, #1 + strb r0, [r4, #2] + add r0, r6, #0 + mov r1, #0 + bl sub_02021368 + b _021EB928 +_021EB8FC: + add r0, r6, #0 + lsl r1, r1, #0xb + bl sub_02021368 + mov r0, #1 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #1] + ldrsb r0, [r4, r0] + cmp r0, #0x20 + blt _021EB928 + mov r0, #0 + strb r0, [r4, #1] + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r2, r0, #0x1c + sub r2, r2, r1 + mov r0, #0x1c + ror r2, r0 + add r0, r1, r2 + strb r0, [r4, #2] +_021EB928: + strb r7, [r4] + add r0, r5, #0 + bl sub_02062A14 + strb r0, [r4, #3] + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021EC6C0 +_021EB942: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EB8B8 + + thumb_func_start ov5_021EB944 +ov5_021EB944: ; 0x021EB944 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EBA08 + cmp r4, #0 + beq _021EBA08 + add r0, r5, #0 + bl sub_0206298C + add r7, r0, #0 + add r0, r5, #0 + bl sub_02062A14 + cmp r0, #0 + bne _021EB9BC + cmp r7, #1 + bls _021EB982 + mov r0, #1 + str r0, [sp, #4] + b _021EB986 +_021EB982: + mov r0, #0 + str r0, [sp, #4] +_021EB986: + add r0, r4, #0 + bl sub_02021358 + ldr r1, [sp, #4] + cmp r1, r0 + bne _021EB99A + mov r0, #3 + ldrsb r0, [r6, r0] + cmp r0, #0 + bne _021EB9B2 +_021EB99A: + ldr r1, [sp, #4] + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 +_021EB9B2: + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 + b _021EB9EE +_021EB9BC: + cmp r7, #1 + bls _021EB9C6 + mov r0, #1 + str r0, [sp] + b _021EB9CA +_021EB9C6: + mov r0, #0 + str r0, [sp] +_021EB9CA: + add r0, r4, #0 + bl sub_02021358 + ldr r1, [sp] + cmp r1, r0 + beq _021EB9E4 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EB9E4: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EB9EE: + strb r7, [r6, #2] + add r0, r5, #0 + bl sub_02062A14 + strb r0, [r6, #3] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EC6C0 +_021EBA08: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EB944 + + thumb_func_start ov5_021EBA0C +ov5_021EBA0C: ; 0x021EBA0C + push {r3, r4, r5, lr} + mov r1, #0x10 + add r5, r0, #0 + bl sub_02062ACC + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + strb r0, [r4] + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EBA32 + add r0, r5, #0 + bl sub_02062B68 +_021EBA32: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EBA0C + + thumb_func_start ov5_021EBA34 +ov5_021EBA34: ; 0x021EBA34 + push {r3, r4, lr} + sub sp, #0xc + add r2, sp, #0 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r4, r0, #0 + str r1, [r2, #8] + bl sub_02062AF0 + add r1, r0, #0 + add r0, r4, #0 + add r1, r1, #4 + bl ov5_021ECFA4 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02063088 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EBA34 + + thumb_func_start ov5_021EBA60 +ov5_021EBA60: ; 0x021EBA60 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EBA78 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED01C +_021EBA78: + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECFA4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EBA60 + + thumb_func_start ov5_021EBA8C +ov5_021EBA8C: ; 0x021EBA8C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EBACE + ldr r0, [r4, #4] + cmp r0, #0 + bne _021EBAAE + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 +_021EBAAE: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EBACE + add r1, r4, #0 + add r1, #8 + bl ov5_021ED03C + ldr r1, [r4, #4] + add r0, r5, #0 + bl ov5_021EDEB4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628C4 +_021EBACE: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EBA8C + + thumb_func_start ov5_021EBAD0 +ov5_021EBAD0: ; 0x021EBAD0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + bl sub_02062AF0 + ldr r7, [r0, #4] + add r0, r4, #0 + bl sub_02062AF0 + str r0, [sp] + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EBB3A + cmp r7, #0 + beq _021EBB3A + add r0, r4, #0 + bl sub_0206298C + str r0, [sp, #4] + add r0, r4, #0 + bl sub_02062A14 + add r5, r0, #0 + cmp r5, #0xa + blt _021EBB0A + bl sub_02022974 +_021EBB0A: + lsl r6, r5, #2 + ldr r5, _021EBB40 ; =0x021FF3F8 + ldr r2, [sp] + ldr r3, [sp, #4] + ldr r5, [r5, r6] + add r0, r4, #0 + add r1, r7, #0 + blx r5 + ldr r1, [sp, #4] + ldr r0, [sp] + strb r1, [r0] + add r0, r4, #0 + bl sub_02062A14 + ldr r1, [sp] + strb r0, [r1, #2] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EC6C0 +_021EBB3A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EBB40: .word 0x021FF3F8 + thumb_func_end ov5_021EBAD0 + + thumb_func_start ov5_021EBB44 +ov5_021EBB44: ; 0x021EBB44 + push {r3, r4, r5, lr} + add r4, r2, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EBB72 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + ldrb r1, [r4, #3] + mov r0, #1 + bic r1, r0 + strb r1, [r4, #3] + pop {r3, r4, r5, pc} +_021EBB72: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #9 + bne _021EBB88 + ldrb r1, [r4, #3] + mov r0, #1 + bic r1, r0 + mov r0, #1 + orr r0, r1 + strb r0, [r4, #3] + pop {r3, r4, r5, pc} +_021EBB88: + ldrb r0, [r4, #3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021EBBAA + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EC69C + ldrb r1, [r4, #3] + mov r0, #1 + bic r1, r0 + strb r1, [r4, #3] + pop {r3, r4, r5, pc} +_021EBBAA: + add r0, r5, #0 + bl ov5_021EC668 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EBB44 + + thumb_func_start ov5_021EBBB4 +ov5_021EBBB4: ; 0x021EBBB4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r4, r2, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EBBDC + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + b _021EBC12 +_021EBBDC: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #9 + bne _021EBBF2 + ldrb r1, [r4, #3] + mov r0, #1 + bic r1, r0 + mov r0, #1 + orr r0, r1 + strb r0, [r4, #3] + pop {r4, r5, r6, pc} +_021EBBF2: + ldrb r0, [r4, #3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021EBC12 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EC69C + ldrb r1, [r4, #3] + mov r0, #1 + bic r1, r0 + strb r1, [r4, #3] +_021EBC12: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBC26 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0xa + bl sub_02021368 +_021EBC26: + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EBBB4 + + thumb_func_start ov5_021EBC28 +ov5_021EBC28: ; 0x021EBC28 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EBC4E + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + b _021EBC64 +_021EBC4E: + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #9 + bne _021EBC64 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021EC69C +_021EBC64: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBC78 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EBC78: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EBC28 + + thumb_func_start ov5_021EBC7C +ov5_021EBC7C: ; 0x021EBC7C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EBCA2 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + b _021EBCB8 +_021EBCA2: + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #9 + bne _021EBCB8 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021EC69C +_021EBCB8: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBCCC + mov r1, #2 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EBCCC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EBC7C + + thumb_func_start ov5_021EBCD0 +ov5_021EBCD0: ; 0x021EBCD0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EBCF6 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + b _021EBD0C +_021EBCF6: + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #9 + bne _021EBD0C + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021EC69C +_021EBD0C: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBD20 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xe + bl sub_02021368 +_021EBD20: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EBCD0 + + thumb_func_start ov5_021EBD24 +ov5_021EBD24: ; 0x021EBD24 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r6, r0, #0 + add r4, r2, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EBD52 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + mov r0, #0 + strb r0, [r4, #1] + b _021EBD68 +_021EBD52: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #9 + bne _021EBD68 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EC69C +_021EBD68: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #6 + beq _021EBD74 + mov r0, #0 + strb r0, [r4, #1] +_021EBD74: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBDBA + ldr r6, _021EBDC0 ; =0x021FF378 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #1 + str r0, [r3, #0] + ldrsb r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02021368 + mov r0, #1 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #1] + ldrsb r0, [r4, r0] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + cmp r0, #0 + bne _021EBDBA + mov r0, #0 + strb r0, [r4, #1] +_021EBDBA: + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + nop +_021EBDC0: .word 0x021FF378 + thumb_func_end ov5_021EBD24 + + thumb_func_start ov5_021EBDC4 +ov5_021EBDC4: ; 0x021EBDC4 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + add r4, r2, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EBDF2 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + mov r0, #0 + strb r0, [r4, #1] + b _021EBE08 +_021EBDF2: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #9 + bne _021EBE08 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EC69C +_021EBE08: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #7 + beq _021EBE14 + mov r0, #0 + strb r0, [r4, #1] +_021EBE14: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBE52 + ldr r6, _021EBE58 ; =0x021FF33C + add r3, sp, #0 + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #1 + ldrsb r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02021368 + mov r0, #1 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #1] + ldrsb r0, [r4, r0] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + cmp r0, #0 + bne _021EBE52 + mov r0, #0 + strb r0, [r4, #1] +_021EBE52: + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021EBE58: .word 0x021FF33C + thumb_func_end ov5_021EBDC4 + + thumb_func_start ov5_021EBE5C +ov5_021EBE5C: ; 0x021EBE5C + push {r4, r5, r6, lr} + sub sp, #0x20 + add r6, r0, #0 + add r4, r2, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + beq _021EBE8A + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + mov r0, #0 + strb r0, [r4, #1] + b _021EBEA0 +_021EBE8A: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #9 + bne _021EBEA0 + add r0, r3, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EC69C +_021EBEA0: + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #8 + beq _021EBEAC + mov r0, #0 + strb r0, [r4, #1] +_021EBEAC: + add r0, r6, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBEF2 + ldr r6, _021EBEF8 ; =0x021FF394 + add r3, sp, #0 + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #1 + ldrsb r1, [r4, r1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02021368 + mov r0, #1 + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, #1] + ldrsb r0, [r4, r0] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + cmp r0, #0 + bne _021EBEF2 + mov r0, #0 + strb r0, [r4, #1] +_021EBEF2: + add sp, #0x20 + pop {r4, r5, r6, pc} + nop +_021EBEF8: .word 0x021FF394 + thumb_func_end ov5_021EBE5C + + thumb_func_start ov5_021EBEFC +ov5_021EBEFC: ; 0x021EBEFC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + beq _021EBF22 + add r0, r3, #0 + bl ov5_021EDF24 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + b _021EBF3A +_021EBF22: + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #9 + beq _021EBF3A + add r0, r3, #0 + bl ov5_021EDF24 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #4 + bl ov5_021EC674 +_021EBF3A: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EBF4E + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EBF4E: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EBEFC + + thumb_func_start ov5_021EBF50 +ov5_021EBF50: ; 0x021EBF50 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + bl sub_02062AF0 + ldr r0, [r0, #4] + str r0, [sp] + add r0, r7, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r7, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EBFD2 + ldr r0, [sp] + cmp r0, #0 + beq _021EBFD2 + add r0, r7, #0 + bl sub_0206298C + str r0, [sp, #8] + add r0, r7, #0 + bl sub_02062A14 + str r0, [sp, #4] + cmp r0, #0xb + blt _021EBF8E + bl sub_02022974 +_021EBF8E: + mov r1, #2 + ldrsb r2, [r4, r1] + cmp r2, #0 + bne _021EBFA8 + ldr r0, [sp, #4] + cmp r0, r2 + beq _021EBFA8 + ldrb r0, [r4, #3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + bne _021EBFA8 + sub r0, r1, #3 + strb r0, [r4] +_021EBFA8: + ldr r5, [sp, #4] + ldr r1, [sp] + lsl r6, r5, #2 + ldr r5, _021EBFD8 ; =0x021FF448 + ldr r3, [sp, #8] + ldr r5, [r5, r6] + add r0, r7, #0 + add r2, r4, #0 + blx r5 + ldr r0, [sp, #8] + ldr r1, [sp] + strb r0, [r4] + ldr r0, [sp, #4] + strb r0, [r4, #2] + add r0, r7, #0 + bl ov5_021EDEB4 + ldr r1, [sp] + add r0, r7, #0 + bl ov5_021EC6C0 +_021EBFD2: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021EBFD8: .word 0x021FF448 + thumb_func_end ov5_021EBF50 + + thumb_func_start ov5_021EBFDC +ov5_021EBFDC: ; 0x021EBFDC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r3, #0 + add r4, r2, #0 + add r2, sp, #0 + ldr r3, _021EC064 ; =0x021FF30C + add r5, r1, #0 + add r7, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + lsl r0, r6, #2 + ldr r1, [r7, r0] + mov r0, #0 + ldrsb r0, [r4, r0] + cmp r6, r0 + beq _021EC01A + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + ldrb r1, [r4, #3] + mov r0, #1 + add sp, #0x10 + bic r1, r0 + strb r1, [r4, #3] + pop {r3, r4, r5, r6, r7, pc} +_021EC01A: + mov r2, #2 + ldrsb r0, [r4, r2] + cmp r0, #0 + beq _021EC032 + ldrb r1, [r4, #3] + mov r0, #1 + add sp, #0x10 + bic r1, r0 + mov r0, #1 + orr r0, r1 + strb r0, [r4, #3] + pop {r3, r4, r5, r6, r7, pc} +_021EC032: + ldrb r0, [r4, #3] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021EC056 + add r0, r5, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + ldrb r1, [r4, #3] + mov r0, #1 + add sp, #0x10 + bic r1, r0 + strb r1, [r4, #3] + pop {r3, r4, r5, r6, r7, pc} +_021EC056: + add r0, r5, #0 + lsl r1, r2, #0xb + bl sub_02021368 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EC064: .word 0x021FF30C + thumb_func_end ov5_021EBFDC + + thumb_func_start ov5_021EC068 +ov5_021EC068: ; 0x021EC068 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, r3, #0 + add r5, r1, #0 + add r6, r2, #0 + str r3, [sp] + bl ov5_021EDF30 + add r4, r0, #0 + mov r0, #0 + ldrsb r1, [r6, r0] + ldr r0, [sp] + cmp r0, r1 + bne _021EC08C + mov r0, #2 + ldrsb r0, [r6, r0] + cmp r0, #0 + beq _021EC09E +_021EC08C: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + b _021EC0CE +_021EC09E: + cmp r0, #9 + beq _021EC0B4 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + b _021EC0CE +_021EC0B4: + add r0, r5, #0 + bl sub_02021358 + cmp r4, r0 + beq _021EC0CE + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 +_021EC0CE: + add r0, r7, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EC0E2 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0xa + bl sub_02021368 +_021EC0E2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EC068 + + thumb_func_start ov5_021EC0E4 +ov5_021EC0E4: ; 0x021EC0E4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, r3, #0 + add r5, r1, #0 + add r6, r2, #0 + str r3, [sp] + bl ov5_021EDF30 + add r4, r0, #0 + mov r0, #0 + ldrsb r1, [r6, r0] + ldr r0, [sp] + cmp r0, r1 + beq _021EC112 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + b _021EC146 +_021EC112: + mov r0, #2 + ldrsb r0, [r6, r0] + cmp r0, #0xa + beq _021EC12C + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + b _021EC146 +_021EC12C: + add r0, r5, #0 + bl sub_02021358 + cmp r4, r0 + beq _021EC146 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 +_021EC146: + add r0, r7, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EC15A + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EC15A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EC0E4 + + thumb_func_start ov5_021EC15C +ov5_021EC15C: ; 0x021EC15C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + bl sub_02062AF0 + ldr r7, [r0, #4] + add r0, r4, #0 + bl sub_02062AF0 + str r0, [sp] + cmp r7, #0 + beq _021EC1D0 + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC1D0 + add r0, r4, #0 + bl sub_0206298C + str r0, [sp, #4] + add r0, r4, #0 + bl sub_02062A14 + add r5, r0, #0 + cmp r5, #4 + blt _021EC196 + bl sub_02022974 +_021EC196: + lsl r6, r5, #2 + ldr r5, _021EC1D4 ; =0x021FF31C + ldr r2, [sp] + ldr r3, [sp, #4] + ldr r5, [r5, r6] + add r0, r4, #0 + add r1, r7, #0 + blx r5 + ldr r2, [sp, #4] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EC374 + ldr r1, [sp, #4] + ldr r0, [sp] + strb r1, [r0] + add r0, r4, #0 + bl sub_02062A14 + ldr r1, [sp] + strb r0, [r1, #2] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021EC6C0 +_021EC1D0: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021EC1D4: .word 0x021FF31C + thumb_func_end ov5_021EC15C + + thumb_func_start ov5_021EC1D8 +ov5_021EC1D8: ; 0x021EC1D8 + push {r4, lr} + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + bne _021EC1EC + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #0 + beq _021EC202 +_021EC1EC: + ldr r1, _021EC224 ; =0x021FF34C + lsl r2, r3, #2 + ldr r1, [r1, r2] + add r0, r4, #0 + bl sub_02021344 + mov r1, #0xf + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_020213A4 +_021EC202: + add r0, r4, #0 + bl sub_020213D4 + mov r1, #1 + lsl r1, r1, #0xc + sub r1, r0, r1 + bpl _021EC212 + mov r1, #0 +_021EC212: + add r0, r4, #0 + bl sub_020213A4 + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 + pop {r4, pc} + nop +_021EC224: .word 0x021FF34C + thumb_func_end ov5_021EC1D8 + + thumb_func_start ov5_021EC228 +ov5_021EC228: ; 0x021EC228 + push {r4, lr} + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + bne _021EC23C + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #1 + beq _021EC250 +_021EC23C: + ldr r1, _021EC25C ; =0x021FF34C + lsl r2, r3, #2 + ldr r1, [r1, r2] + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EC250: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + pop {r4, pc} + ; .align 2, 0 +_021EC25C: .word 0x021FF34C + thumb_func_end ov5_021EC228 + + thumb_func_start ov5_021EC260 +ov5_021EC260: ; 0x021EC260 + push {r3, r4, r5, lr} + add r4, r2, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + add r5, r1, #0 + cmp r3, r0 + bne _021EC276 + mov r0, #2 + ldrsb r0, [r4, r0] + cmp r0, #2 + beq _021EC294 +_021EC276: + ldr r1, _021EC320 ; =0x021FF34C + lsl r2, r3, #2 + ldr r1, [r1, r2] + add r0, r5, #0 + bl sub_02021344 + mov r1, #0xf + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020213A4 + ldrb r1, [r4, #3] + mov r0, #0xfe + bic r1, r0 + strb r1, [r4, #3] +_021EC294: + add r0, r5, #0 + bl sub_020213D4 + add r1, r0, #0 + ldrb r0, [r4, #3] + lsl r2, r0, #0x18 + lsr r2, r2, #0x19 + beq _021EC2AE + cmp r2, #1 + beq _021EC2D0 + cmp r2, #2 + beq _021EC2F6 + b _021EC310 +_021EC2AE: + mov r3, #1 + lsl r3, r3, #0xc + sub r1, r1, r3 + mov r3, #0xa + lsl r3, r3, #0xc + cmp r1, r3 + bgt _021EC310 + add r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + mov r3, #0xfe + lsl r2, r2, #0x19 + bic r0, r3 + lsr r2, r2, #0x18 + orr r0, r2 + strb r0, [r4, #3] + b _021EC310 +_021EC2D0: + mov r3, #1 + lsl r3, r3, #0xc + add r1, r1, r3 + mov r3, #0xf + lsl r3, r3, #0xc + cmp r1, r3 + blt _021EC310 + add r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + mov r3, #0xfe + lsl r2, r2, #0x19 + bic r0, r3 + lsr r2, r2, #0x18 + orr r0, r2 + strb r0, [r4, #3] + mov r0, #0 + strb r0, [r4, #1] + b _021EC310 +_021EC2F6: + mov r0, #1 + ldrsb r2, [r4, r0] + add r2, r2, #1 + strb r2, [r4, #1] + ldrsb r0, [r4, r0] + cmp r0, #0x1e + blt _021EC310 + mov r0, #0 + strb r0, [r4, #1] + ldrb r2, [r4, #3] + mov r0, #0xfe + bic r2, r0 + strb r2, [r4, #3] +_021EC310: + add r0, r5, #0 + bl sub_020213A4 + add r0, r5, #0 + mov r1, #0 + bl sub_02021368 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021EC320: .word 0x021FF34C + thumb_func_end ov5_021EC260 + + thumb_func_start ov5_021EC324 +ov5_021EC324: ; 0x021EC324 + push {r4, lr} + mov r0, #0 + ldrsb r0, [r2, r0] + add r4, r1, #0 + cmp r3, r0 + bne _021EC338 + mov r0, #2 + ldrsb r0, [r2, r0] + cmp r0, #3 + beq _021EC34E +_021EC338: + ldr r1, _021EC370 ; =0x021FF34C + lsl r2, r3, #2 + ldr r1, [r1, r2] + add r0, r4, #0 + bl sub_02021344 + mov r1, #0xf + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_020213A4 +_021EC34E: + add r0, r4, #0 + bl sub_020213D4 + mov r1, #1 + lsl r1, r1, #0xc + sub r1, r0, r1 + bpl _021EC35E + mov r1, #0 +_021EC35E: + add r0, r4, #0 + bl sub_020213A4 + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 + pop {r4, pc} + nop +_021EC370: .word 0x021FF34C + thumb_func_end ov5_021EC324 + + thumb_func_start ov5_021EC374 +ov5_021EC374: ; 0x021EC374 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r2, #0 + add r2, sp, #0 + mov r0, #0 + str r0, [r2, #0] + str r0, [r2, #4] + str r0, [r2, #8] + add r0, r1, #0 + bl sub_02021394 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r4, #3 + bhi _021EC3DA + add r1, r4, r4 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021EC3A4: ; jump table + .short _021EC3DA - _021EC3A4 - 2 ; case 0 + .short _021EC3AC - _021EC3A4 - 2 ; case 1 + .short _021EC3B8 - _021EC3A4 - 2 ; case 2 + .short _021EC3CA - _021EC3A4 - 2 ; case 3 +_021EC3AC: + cmp r0, #0x18 + blt _021EC3DA + mov r0, #6 + lsl r0, r0, #0xc + str r0, [sp, #8] + b _021EC3DA +_021EC3B8: + cmp r0, #0x28 + bge _021EC3C4 + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp] + b _021EC3DA +_021EC3C4: + ldr r0, _021EC3E8 ; =0xFFFFB000 + str r0, [sp] + b _021EC3DA +_021EC3CA: + cmp r0, #0x38 + bge _021EC3D4 + ldr r0, _021EC3EC ; =0xFFFFF000 + str r0, [sp] + b _021EC3DA +_021EC3D4: + mov r0, #5 + lsl r0, r0, #0xc + str r0, [sp] +_021EC3DA: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02063088 + add sp, #0xc + pop {r4, r5, pc} + nop +_021EC3E8: .word 0xFFFFB000 +_021EC3EC: .word 0xFFFFF000 + thumb_func_end ov5_021EC374 + + thumb_func_start ov5_021EC3F0 +ov5_021EC3F0: ; 0x021EC3F0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC450 + cmp r4, #0 + beq _021EC450 + add r0, r5, #0 + bl sub_0206298C + add r7, r0, #0 + strb r7, [r6] + add r0, r5, #0 + bl sub_02062A14 + strb r0, [r6, #2] + add r0, r7, #0 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 + add r0, r4, #0 + mov r1, #0 + bl sub_02021368 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EC6C0 +_021EC450: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC3F0 + + thumb_func_start ov5_021EC454 +ov5_021EC454: ; 0x021EC454 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC4B8 + cmp r4, #0 + beq _021EC4B8 + add r0, r5, #0 + bl sub_0206298C + strb r0, [r6] + add r0, r5, #0 + bl sub_02062A14 + strb r0, [r6, #2] + add r0, r4, #0 + bl sub_02021358 + cmp r0, #0 + beq _021EC49E + add r0, r4, #0 + mov r1, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EC49E: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EC6C0 +_021EC4B8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC454 + + thumb_func_start ov5_021EC4BC +ov5_021EC4BC: ; 0x021EC4BC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC552 + cmp r4, #0 + beq _021EC552 + add r0, r5, #0 + bl sub_0206298C + add r7, r0, #0 + add r0, r5, #0 + bl sub_02062A14 + cmp r0, #0 + bne _021EC514 + add r0, r4, #0 + bl sub_02021358 + cmp r0, #1 + beq _021EC508 + add r0, r4, #0 + mov r1, #1 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EC508: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + b _021EC538 +_021EC514: + add r0, r4, #0 + bl sub_02021358 + cmp r0, #0 + beq _021EC52E + add r0, r4, #0 + mov r1, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EC52E: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EC538: + strb r7, [r6] + add r0, r5, #0 + bl sub_02062A14 + strb r0, [r6, #2] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EC6C0 +_021EC552: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EC4BC + + thumb_func_start ov5_021EC554 +ov5_021EC554: ; 0x021EC554 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC5BC + cmp r4, #0 + beq _021EC5BC + add r0, r5, #0 + bl sub_0206298C + mov r1, #0 + ldrsb r1, [r6, r1] + add r7, r0, #0 + cmp r7, r1 + beq _021EC598 + bl ov5_021EDF18 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021344 + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EC598: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EC6C0 + add r0, r5, #0 + strb r7, [r6] + bl sub_02062A14 + strb r0, [r6, #2] +_021EC5BC: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC554 + + thumb_func_start ov5_021EC5C0 +ov5_021EC5C0: ; 0x021EC5C0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #4] + add r0, r5, #0 + bl sub_02062AF0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC636 + cmp r4, #0 + beq _021EC636 + add r0, r5, #0 + bl sub_0206298C + str r0, [sp] + add r0, r5, #0 + bl sub_02062A14 + add r7, r0, #0 + mov r0, #2 + ldrsb r0, [r6, r0] + cmp r7, r0 + beq _021EC616 + cmp r7, #0 + bne _021EC606 + add r0, r4, #0 + mov r1, #0 + bl sub_02021344 + b _021EC60E +_021EC606: + add r0, r4, #0 + mov r1, #1 + bl sub_02021344 +_021EC60E: + add r0, r4, #0 + mov r1, #0 + bl sub_020213A4 +_021EC616: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [sp] + add r1, r4, #0 + strb r0, [r6] + add r0, r5, #0 + strb r7, [r6, #2] + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EC6C0 +_021EC636: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EC5C0 + + thumb_func_start ov5_021EC638 +ov5_021EC638: ; 0x021EC638 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r4, r1, #0xc + add r0, r4, #0 + add r1, r6, #0 + bl sub_020E1F6C + sub r1, r4, r1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020213A4 + add r0, r5, #0 + mov r1, #0 + bl sub_02021368 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC638 + + thumb_func_start ov5_021EC668 +ov5_021EC668: ; 0x021EC668 + ldr r3, _021EC670 ; =ov5_021EC638 + mov r1, #8 + bx r3 + nop +_021EC670: .word ov5_021EC638 + thumb_func_end ov5_021EC668 + + thumb_func_start ov5_021EC674 +ov5_021EC674: ; 0x021EC674 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r1, r2, #0 + bl ov5_021EC638 + add r0, r5, #0 + bl sub_020213D4 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + add r1, r6, #0 + bl sub_020213A4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC674 + + thumb_func_start ov5_021EC69C +ov5_021EC69C: ; 0x021EC69C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EC668 + add r0, r5, #0 + bl sub_020213D4 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02021344 + add r0, r5, #0 + add r1, r6, #0 + bl sub_020213A4 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EC69C + + thumb_func_start ov5_021EC6C0 +ov5_021EC6C0: ; 0x021EC6C0 + push {r4, r5, r6, lr} + mov r4, #1 + add r6, r1, #0 + lsl r1, r4, #9 + add r5, r0, #0 + bl sub_020628D8 + cmp r0, #1 + bne _021EC6D4 + mov r4, #0 +_021EC6D4: + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #1 + bne _021EC6F2 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #0 + bne _021EC6F2 + mov r4, #0 +_021EC6F2: + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + bl sub_02021320 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC6C0 + + thumb_func_start ov5_021EC700 +ov5_021EC700: ; 0x021EC700 + push {r4, lr} + ldr r3, _021EC72C ; =0x021FB51C + add r2, r1, #0 + ldr r4, [r3, #0] + ldr r1, _021EC730 ; =0x0000FFFF + cmp r4, r1 + beq _021EC726 +_021EC70E: + cmp r4, r0 + bne _021EC71E + add r3, r3, #4 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + pop {r4, pc} +_021EC71E: + add r3, #0x10 + ldr r4, [r3, #0] + cmp r4, r1 + bne _021EC70E +_021EC726: + bl sub_02022974 + pop {r4, pc} + ; .align 2, 0 +_021EC72C: .word 0x021FB51C +_021EC730: .word 0x0000FFFF + thumb_func_end ov5_021EC700 + + thumb_func_start ov5_021EC734 +ov5_021EC734: ; 0x021EC734 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + mov r1, #4 + bl sub_02062ACC + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062924 + add r1, sp, #0 + bl ov5_021EC700 + add r0, r5, #0 + add r1, sp, #0 + bl ov5_021F121C + str r0, [r4, #0] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021EC734 + + thumb_func_start ov5_021EC75C +ov5_021EC75C: ; 0x021EC75C + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EC75C + + thumb_func_start ov5_021EC760 +ov5_021EC760: ; 0x021EC760 + push {r4, lr} + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021EC776 + bl ov5_021DF74C + mov r0, #0 + str r0, [r4, #0] +_021EC776: + pop {r4, pc} + thumb_func_end ov5_021EC760 + + thumb_func_start ov5_021EC778 +ov5_021EC778: ; 0x021EC778 + push {r4, lr} + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021EC78E + bl ov5_021DF74C + mov r0, #0 + str r0, [r4, #0] +_021EC78E: + pop {r4, pc} + thumb_func_end ov5_021EC778 + + thumb_func_start ov5_021EC790 +ov5_021EC790: ; 0x021EC790 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062924 + add r1, sp, #0 + bl ov5_021EC700 + add r0, r5, #0 + add r1, sp, #0 + bl ov5_021F121C + str r0, [r4, #0] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC790 + + thumb_func_start ov5_021EC7B8 +ov5_021EC7B8: ; 0x021EC7B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #4 + bl sub_02062ACC + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021F2438 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC7B8 + + thumb_func_start ov5_021EC7D0 +ov5_021EC7D0: ; 0x021EC7D0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021EC7E4 + bl sub_02022974 +_021EC7E4: + add r0, r5, #0 + bl ov5_021F2438 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC7D0 + + thumb_func_start ov5_021EC7F0 +ov5_021EC7F0: ; 0x021EC7F0 + push {r4, lr} + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov5_021F247C + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov5_021EC7F0 + + thumb_func_start ov5_021EC804 +ov5_021EC804: ; 0x021EC804 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_020213F4 + mov r2, #0x1f + mov r1, #1 + lsl r2, r2, #0x10 + add r4, r0, #0 + bl sub_020B2D8C + ldr r1, [r5, #0x10] + add r0, r4, #0 + bl sub_020B3764 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC804 + + thumb_func_start ov5_021EC824 +ov5_021EC824: ; 0x021EC824 + push {r3, r4, r5, lr} + mov r1, #0x14 + add r5, r0, #0 + bl sub_02062ACC + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + strb r0, [r4, #2] + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EC852 + ldr r1, _021EC854 ; =ov5_021EC804 + add r2, r4, #0 + bl sub_02021444 + add r0, r5, #0 + bl sub_02062B68 +_021EC852: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021EC854: .word ov5_021EC804 + thumb_func_end ov5_021EC824 + + thumb_func_start ov5_021EC858 +ov5_021EC858: ; 0x021EC858 + push {r4, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r1, r0, #0 + add r0, r4, #0 + add r1, r1, #4 + bl ov5_021ECFA4 + pop {r4, pc} + thumb_func_end ov5_021EC858 + + thumb_func_start ov5_021EC86C +ov5_021EC86C: ; 0x021EC86C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EC884 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED01C +_021EC884: + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECFA4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EC86C + + thumb_func_start ov5_021EC898 +ov5_021EC898: ; 0x021EC898 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC8E4 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021EC8BA + add r0, r5, #0 + add r1, r4, #4 + bl ov5_021ECF04 +_021EC8BA: + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EC8E4 + add r1, r4, #0 + add r1, #8 + bl ov5_021ED03C + ldr r1, [r4, #4] + add r0, r5, #0 + bl ov5_021EDEB4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628C4 + ldr r0, [r4, #4] + ldr r1, _021EC8E8 ; =ov5_021EC804 + add r2, r4, #0 + bl sub_02021444 +_021EC8E4: + pop {r3, r4, r5, pc} + nop +_021EC8E8: .word ov5_021EC804 + thumb_func_end ov5_021EC898 + + thumb_func_start ov5_021EC8EC +ov5_021EC8EC: ; 0x021EC8EC + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC934 + ldr r6, [r4, #4] + cmp r6, #0 + beq _021EC934 + ldr r0, [r4, #0x10] + cmp r0, #0x1f + bhs _021EC910 + add r0, r0, #1 + str r0, [r4, #0x10] +_021EC910: + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021EC924 + mov r1, #1 + add r0, r6, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021EC924: + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021EC6C0 +_021EC934: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC8EC + + thumb_func_start ov5_021EC938 +ov5_021EC938: ; 0x021EC938 + push {r3, r4, r5, lr} + mov r1, #0x14 + add r4, r0, #0 + bl sub_02062ACC + add r5, r0, #0 + add r1, r5, #0 + add r0, r4, #0 + add r1, #8 + bl ov5_021ECF04 + ldr r0, [r5, #8] + cmp r0, #0 + beq _021EC95A + add r0, r4, #0 + bl sub_02062B68 +_021EC95A: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EC938 + + thumb_func_start ov5_021EC95C +ov5_021EC95C: ; 0x021EC95C + push {r4, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r1, r0, #0 + add r0, r4, #0 + add r1, #8 + bl ov5_021ECFA4 + pop {r4, pc} + thumb_func_end ov5_021EC95C + + thumb_func_start ov5_021EC970 +ov5_021EC970: ; 0x021EC970 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _021EC988 + add r1, r4, #0 + add r1, #0xc + bl ov5_021ED01C +_021EC988: + add r4, #8 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ECFA4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC970 + + thumb_func_start ov5_021EC9A0 +ov5_021EC9A0: ; 0x021EC9A0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EC9E4 + ldr r0, [r4, #8] + cmp r0, #0 + bne _021EC9C4 + add r1, r4, #0 + add r0, r5, #0 + add r1, #8 + bl ov5_021ECF04 +_021EC9C4: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021EC9E4 + add r1, r4, #0 + add r1, #0xc + bl ov5_021ED03C + ldr r1, [r4, #8] + add r0, r5, #0 + bl ov5_021EDEB4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628C4 +_021EC9E4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EC9A0 + + thumb_func_start ov5_021EC9E8 +ov5_021EC9E8: ; 0x021EC9E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021ECA68 + ldr r7, [r4, #8] + cmp r7, #0 + beq _021ECA68 + add r0, r5, #0 + bl ov5_021ECD38 + cmp r0, #0 + bne _021ECA18 + mov r1, #1 + add r0, r7, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021ECA18: + ldr r6, _021ECA6C ; =0x021FF474 + add r3, sp, #0 + mov r2, #8 +_021ECA1E: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021ECA1E + add r0, r5, #0 + add r1, sp, #0x40 + bl sub_02063078 + ldr r1, [sp, #0x44] + ldr r0, [r4, #4] + cmp r1, r0 + bne _021ECA58 + ldr r0, [r4, #0] + asr r0, r0, #1 + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + str r0, [sp, #0x44] + ldr r0, [r4, #0] + add r1, r0, #1 + mov r0, #0x1f + and r0, r1 + str r0, [r4, #0] + ldr r0, [sp, #0x44] + add r1, sp, #0x40 + str r0, [r4, #4] + add r0, r5, #0 + bl sub_02063088 +_021ECA58: + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + add r1, r7, #0 + bl ov5_021EC6C0 +_021ECA68: + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ECA6C: .word 0x021FF474 + thumb_func_end ov5_021EC9E8 + + .rodata + + + .global Unk_ov5_021FF30C +Unk_ov5_021FF30C: ; 0x021FF30C + .incbin "incbin/overlay5_rodata.bin", 0x69F8, 0x6A08 - 0x69F8 + + .global Unk_ov5_021FF31C +Unk_ov5_021FF31C: ; 0x021FF31C + .incbin "incbin/overlay5_rodata.bin", 0x6A08, 0x6A18 - 0x6A08 + + .global Unk_ov5_021FF32C +Unk_ov5_021FF32C: ; 0x021FF32C + .incbin "incbin/overlay5_rodata.bin", 0x6A18, 0x6A28 - 0x6A18 + + .global Unk_ov5_021FF33C +Unk_ov5_021FF33C: ; 0x021FF33C + .incbin "incbin/overlay5_rodata.bin", 0x6A28, 0x6A38 - 0x6A28 + + .global Unk_ov5_021FF34C +Unk_ov5_021FF34C: ; 0x021FF34C + .incbin "incbin/overlay5_rodata.bin", 0x6A38, 0x6A48 - 0x6A38 + + .global Unk_ov5_021FF35C +Unk_ov5_021FF35C: ; 0x021FF35C + .incbin "incbin/overlay5_rodata.bin", 0x6A48, 0x6A64 - 0x6A48 + + .global Unk_ov5_021FF378 +Unk_ov5_021FF378: ; 0x021FF378 + .incbin "incbin/overlay5_rodata.bin", 0x6A64, 0x6A80 - 0x6A64 + + .global Unk_ov5_021FF394 +Unk_ov5_021FF394: ; 0x021FF394 + .incbin "incbin/overlay5_rodata.bin", 0x6A80, 0x6AA0 - 0x6A80 + + .global Unk_ov5_021FF3B4 +Unk_ov5_021FF3B4: ; 0x021FF3B4 + .incbin "incbin/overlay5_rodata.bin", 0x6AA0, 0x6AC0 - 0x6AA0 + + .global Unk_ov5_021FF3D4 +Unk_ov5_021FF3D4: ; 0x021FF3D4 + .incbin "incbin/overlay5_rodata.bin", 0x6AC0, 0x6AE4 - 0x6AC0 + + .global Unk_ov5_021FF3F8 +Unk_ov5_021FF3F8: ; 0x021FF3F8 + .incbin "incbin/overlay5_rodata.bin", 0x6AE4, 0x6B0C - 0x6AE4 + + .global Unk_ov5_021FF420 +Unk_ov5_021FF420: ; 0x021FF420 + .incbin "incbin/overlay5_rodata.bin", 0x6B0C, 0x6B34 - 0x6B0C + + .global Unk_ov5_021FF448 +Unk_ov5_021FF448: ; 0x021FF448 + .incbin "incbin/overlay5_rodata.bin", 0x6B34, 0x6B60 - 0x6B34 + + .global Unk_ov5_021FF474 +Unk_ov5_021FF474: ; 0x021FF474 + .incbin "incbin/overlay5_rodata.bin", 0x6B60, 0x40 + diff --git a/asm/ov5_021ECA70.s b/asm/ov5_021ECA70.s new file mode 100644 index 000000000..25a5ddbc5 --- /dev/null +++ b/asm/ov5_021ECA70.s @@ -0,0 +1,251 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021ECA70 +ov5_021ECA70: ; 0x021ECA70 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov5_021ECB90 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_020630AC + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECA70 + + thumb_func_start ov5_021ECA90 +ov5_021ECA90: ; 0x021ECA90 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #0] + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021ECAB8 + cmp r4, #0 + beq _021ECAB8 + add r0, r5, #0 + bl ov5_021ECBA4 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 +_021ECAB8: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECA90 + + thumb_func_start ov5_021ECABC +ov5_021ECABC: ; 0x021ECABC + ldr r3, _021ECAC0 ; =ov5_021ECC0C + bx r3 + ; .align 2, 0 +_021ECAC0: .word ov5_021ECC0C + thumb_func_end ov5_021ECABC + + thumb_func_start ov5_021ECAC4 +ov5_021ECAC4: ; 0x021ECAC4 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021ECADA + add r1, r4, #4 + bl ov5_021ED01C +_021ECADA: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ECFA4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECAC4 + + thumb_func_start ov5_021ECAF0 +ov5_021ECAF0: ; 0x021ECAF0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021ECB30 + ldr r0, [r4, #0] + cmp r0, #0 + bne _021ECB12 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ECF04 +_021ECB12: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021ECB30 + add r1, r4, #4 + bl ov5_021ED03C + ldr r1, [r4, #0] + add r0, r5, #0 + bl ov5_021EDEB4 + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0x14 + bl sub_020628C4 +_021ECB30: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECAF0 + + thumb_func_start ov5_021ECB34 +ov5_021ECB34: ; 0x021ECB34 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov5_021ECB90 + mov r1, #0 + mov r0, #6 + lsl r0, r0, #0xe + str r0, [sp, #4] + str r1, [sp] + str r1, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_020630AC + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECB34 + + thumb_func_start ov5_021ECB58 +ov5_021ECB58: ; 0x021ECB58 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #0] + add r0, r5, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021ECB76 + cmp r4, #0 + beq _021ECB76 + add r0, r5, #0 + bl ov5_021ECBA4 +_021ECB76: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021ECB58 + + thumb_func_start ov5_021ECB78 +ov5_021ECB78: ; 0x021ECB78 + ldr r3, _021ECB7C ; =ov5_021ECC0C + bx r3 + ; .align 2, 0 +_021ECB7C: .word ov5_021ECC0C + thumb_func_end ov5_021ECB78 + + thumb_func_start ov5_021ECB80 +ov5_021ECB80: ; 0x021ECB80 + push {r3, lr} + bl sub_02062AF0 + bl ov5_021ECB8C + pop {r3, pc} + thumb_func_end ov5_021ECB80 + + thumb_func_start ov5_021ECB8C +ov5_021ECB8C: ; 0x021ECB8C + ldr r0, [r0, #0] + bx lr + thumb_func_end ov5_021ECB8C + + thumb_func_start ov5_021ECB90 +ov5_021ECB90: ; 0x021ECB90 + push {r4, lr} + add r4, r0, #0 + mov r1, #0xc + bl sub_02062ACC + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021ECF04 + pop {r4, pc} + thumb_func_end ov5_021ECB90 + + thumb_func_start ov5_021ECBA4 +ov5_021ECBA4: ; 0x021ECBA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02062AF0 + ldr r4, [r0, #0] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021368 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ECBCC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECBA4 + + thumb_func_start ov5_021ECBCC +ov5_021ECBCC: ; 0x021ECBCC + push {r4, r5, r6, lr} + mov r4, #1 + add r6, r1, #0 + lsl r1, r4, #9 + add r5, r0, #0 + bl sub_020628D8 + cmp r0, #1 + bne _021ECBE0 + mov r4, #0 +_021ECBE0: + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #1 + bne _021ECBFE + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #0 + bne _021ECBFE + mov r4, #0 +_021ECBFE: + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + bl sub_02021320 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECBCC + + thumb_func_start ov5_021ECC0C +ov5_021ECC0C: ; 0x021ECC0C + push {r4, lr} + add r4, r0, #0 + bl sub_02062AF0 + add r1, r0, #0 + add r0, r4, #0 + bl ov5_021ECFA4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECC0C \ No newline at end of file diff --git a/asm/ov5_021ECC20.s b/asm/ov5_021ECC20.s new file mode 100644 index 000000000..c5f21193b --- /dev/null +++ b/asm/ov5_021ECC20.s @@ -0,0 +1,309 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021ECC20 +ov5_021ECC20: ; 0x021ECC20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + mov r1, #1 + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_0206284C + cmp r0, #0 + beq _021ECC3A + bl sub_02022974 +_021ECC3A: + add r0, r5, #0 + bl ov5_021ECCA4 + add r0, r5, #0 + bl sub_02062824 + str r0, [sp, #0x14] + add r0, r5, #0 + bl sub_02062858 + sub r0, r0, #1 + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_0206285C + str r4, [sp] + str r6, [sp, #4] + ldr r1, [sp, #0x30] + str r7, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [sp, #0x14] + ldr r3, [sp, #0x10] + add r1, r5, #0 + bl ov5_021ECE40 + add r0, r5, #0 + mov r1, #1 + bl sub_02062838 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021ECC20 + + thumb_func_start ov5_021ECC78 +ov5_021ECC78: ; 0x021ECC78 + push {r4, lr} + add r4, r0, #0 + bl sub_02062CA8 + cmp r0, #1 + beq _021ECC88 + bl sub_02022974 +_021ECC88: + add r0, r4, #0 + bl sub_0206285C + bl ov5_021ECE94 + add r0, r4, #0 + mov r1, #1 + bl sub_02062840 + add r0, r4, #0 + bl ov5_021ECCBC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECC78 + + thumb_func_start ov5_021ECCA4 +ov5_021ECCA4: ; 0x021ECCA4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x51 + mov r1, #4 + bl sub_02006C24 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0206289C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECCA4 + + thumb_func_start ov5_021ECCBC +ov5_021ECCBC: ; 0x021ECCBC + push {r3, lr} + bl sub_020628A0 + bl sub_02006CA8 + pop {r3, pc} + thumb_func_end ov5_021ECCBC + + thumb_func_start ov5_021ECCC8 +ov5_021ECCC8: ; 0x021ECCC8 + push {r4, lr} + add r4, r0, #0 + bl sub_02062A40 + mov r1, #4 + bl sub_0206284C + cmp r0, #0 + bne _021ECD02 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xe + bl sub_020628D0 + cmp r0, #0 + beq _021ECD02 + add r0, r4, #0 + bl sub_02062DE8 + cmp r0, #0 + beq _021ECCFC + add r0, r4, #0 + bl sub_02062F7C + cmp r0, #0 + beq _021ECD02 +_021ECCFC: + add r0, r4, #0 + bl sub_02062B68 +_021ECD02: + pop {r4, pc} + thumb_func_end ov5_021ECCC8 + + thumb_func_start ov5_021ECD04 +ov5_021ECD04: ; 0x021ECD04 + push {r3, lr} + bl sub_02062920 + bl ov5_021ECD10 + pop {r3, pc} + thumb_func_end ov5_021ECD04 + + thumb_func_start ov5_021ECD10 +ov5_021ECD10: ; 0x021ECD10 + push {r3, lr} + ldr r3, _021ECD30 ; =0x021FC194 + ldr r1, _021ECD34 ; =0x0000FFFF +_021ECD16: + ldr r2, [r3, #0] + cmp r2, r0 + bne _021ECD20 + add r0, r3, #0 + pop {r3, pc} +_021ECD20: + add r3, #8 + ldr r2, [r3, #0] + cmp r2, r1 + bne _021ECD16 + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021ECD30: .word 0x021FC194 +_021ECD34: .word 0x0000FFFF + thumb_func_end ov5_021ECD10 + + thumb_func_start ov5_021ECD38 +ov5_021ECD38: ; 0x021ECD38 + push {r4, lr} + add r4, r0, #0 + bl sub_02062DE8 + cmp r0, #1 + bne _021ECD52 + add r0, r4, #0 + bl sub_02062F7C + cmp r0, #0 + bne _021ECD52 + mov r0, #1 + pop {r4, pc} +_021ECD52: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #8 + bl sub_020628D0 + cmp r0, #0 + beq _021ECD64 + mov r0, #1 + pop {r4, pc} +_021ECD64: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021ECD38 + + thumb_func_start ov5_021ECD68 +ov5_021ECD68: ; 0x021ECD68 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r2, #0 + bl sub_020628A0 + add r1, r4, #0 + add r6, r0, #0 + bl sub_02006D84 + add r1, r0, #0 + cmp r5, #1 + bne _021ECD88 + mov r0, #4 + bl sub_02018144 + b _021ECD8E +_021ECD88: + mov r0, #4 + bl sub_02018184 +_021ECD8E: + add r5, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl sub_02006D28 + add r0, r5, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECD68 + + thumb_func_start ov5_021ECDA0 +ov5_021ECDA0: ; 0x021ECDA0 + push {r3, r4, r5, lr} + sub sp, #0x30 + add r4, r1, #0 + add r5, r0, #0 + add r1, sp, #0x24 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0x18 + bl sub_02063078 + add r0, r5, #0 + add r1, sp, #0xc + bl sub_0206309C + add r0, r5, #0 + add r1, sp, #0 + bl sub_020630BC + ldr r1, [sp, #0x24] + ldr r0, [sp, #0x18] + ldr r2, [sp, #0xc] + add r0, r1, r0 + ldr r3, [sp] + add r0, r2, r0 + add r0, r3, r0 + str r0, [r4, #0] + ldr r1, [sp, #0x28] + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x10] + add r0, r1, r0 + ldr r3, [sp, #4] + add r0, r2, r0 + add r0, r3, r0 + str r0, [r4, #4] + ldr r1, [sp, #0x2c] + ldr r0, [sp, #0x20] + ldr r2, [sp, #0x14] + add r0, r1, r0 + ldr r3, [sp, #8] + add r0, r2, r0 + add r0, r3, r0 + str r0, [r4, #8] + add sp, #0x30 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECDA0 + + thumb_func_start ov5_021ECDFC +ov5_021ECDFC: ; 0x021ECDFC + push {r4, lr} + add r4, r0, #0 + bl sub_02062974 + add r0, r4, #0 + bl sub_02062D4C + cmp r0, #1 + bne _021ECE14 + add r0, r4, #0 + bl sub_02062B68 +_021ECE14: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECDFC + + thumb_func_start ov5_021ECE18 +ov5_021ECE18: ; 0x021ECE18 + push {r4, lr} + mov r1, #1 + add r4, r0, #0 + bl sub_02062D64 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECE18 + + thumb_func_start ov5_021ECE30 +ov5_021ECE30: ; 0x021ECE30 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021ECE30 + + thumb_func_start ov5_021ECE34 +ov5_021ECE34: ; 0x021ECE34 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021ECE34 + + thumb_func_start ov5_021ECE38 +ov5_021ECE38: ; 0x021ECE38 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021ECE38 + + thumb_func_start ov5_021ECE3C +ov5_021ECE3C: ; 0x021ECE3C + bx lr + ; .align 2, 0 + thumb_func_end ov5_021ECE3C \ No newline at end of file diff --git a/asm/ov5_021ECE40.s b/asm/ov5_021ECE40.s new file mode 100644 index 000000000..6584d1072 --- /dev/null +++ b/asm/ov5_021ECE40.s @@ -0,0 +1,3490 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021ECE40 +ov5_021ECE40: ; 0x021ECE40 + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + mov r2, #0x41 + add r5, r0, #0 + lsl r2, r2, #2 + str r1, [r5, r2] + add r1, r4, #0 + bl ov5_021EDDAC + ldr r2, [sp, #0x24] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EE320 + mov r2, #4 + mov r1, #8 + ldr r0, [sp, #0x18] + str r2, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + add r3, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + bl ov5_021ED224 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED0A4 + ldr r1, [sp, #0x20] + ldr r2, _021ECE8C ; =0x021FAF50 + ldr r3, _021ECE90 ; =0x021FAF48 + add r0, r5, #0 + bl ov5_021ED4E4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021ECE8C: .word 0x021FAF50 +_021ECE90: .word 0x021FAF48 + thumb_func_end ov5_021ECE40 + + thumb_func_start ov5_021ECE94 +ov5_021ECE94: ; 0x021ECE94 + push {r4, lr} + add r4, r0, #0 + bl ov5_021EE3C4 + add r0, r4, #0 + bl ov5_021ED0F0 + add r0, r4, #0 + bl ov5_021EDC8C + bl ov5_021EDDD4 + add r0, r4, #0 + bl ov5_021ED2AC + pop {r4, pc} + thumb_func_end ov5_021ECE94 + + thumb_func_start ov5_021ECEB4 +ov5_021ECEB4: ; 0x021ECEB4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #0 + add r6, r2, #0 + add r7, r0, #0 + str r1, [r5, #0] + bl ov5_021EDEA8 + add r1, r6, #0 + str r0, [sp] + bl ov5_021ED82C + add r4, r0, #0 + bne _021ECEDE + add r0, r7, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov5_021ED060 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_021ECEDE: + sub r0, r4, #3 + cmp r0, #1 + bhi _021ECEF4 + ldr r0, [sp] + add r1, r7, #0 + add r2, r5, #0 + add r3, r6, #0 + bl ov5_021EE228 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_021ECEF4: + add r0, r7, #0 + add r1, r6, #0 + bl ov5_021ECF1C + str r0, [r5, #0] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECEB4 + + thumb_func_start ov5_021ECF04 +ov5_021ECF04: ; 0x021ECF04 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_02062920 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ECEB4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECF04 + + thumb_func_start ov5_021ECF1C +ov5_021ECF1C: ; 0x021ECF1C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + add r4, r1, #0 + bl ov5_021EDEA8 + add r5, r0, #0 + bl ov5_021EDC8C + add r7, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDA0C + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED110 + add r5, r0, #0 + bne _021ECF48 + bl sub_02022974 +_021ECF48: + add r0, r6, #0 + add r1, sp, #0 + bl ov5_021ECDA0 + add r0, r4, #0 + bl ov5_021EDD50 + add r3, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + add r2, sp, #0 + bl ov5_021EDDDC + add r4, r0, #0 + bne _021ECF6A + bl sub_02022974 +_021ECF6A: + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021ECF1C + + thumb_func_start ov5_021ECF70 +ov5_021ECF70: ; 0x021ECF70 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + add r4, r2, #0 + bl sub_020211FC + mov r0, #0 + str r0, [r5, #0] + add r0, r6, #0 + bl sub_02062A40 + add r1, r6, #0 + add r2, r4, #0 + bl ov5_021ED1C8 + cmp r0, #0 + bne _021ECFA0 + add r0, r6, #0 + bl ov5_021EDEA8 + add r1, r4, #0 + bl ov5_021ED184 +_021ECFA0: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021ECF70 + + thumb_func_start ov5_021ECFA4 +ov5_021ECFA4: ; 0x021ECFA4 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + bl ov5_021ED094 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021ECFD6 + add r0, r5, #0 + bl sub_02062920 + add r6, r0, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021ECFCC + add r0, r5, #0 + bl sub_02067800 + add r6, r0, #0 +_021ECFCC: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov5_021ECF70 +_021ECFD6: + pop {r4, r5, r6, pc} + thumb_func_end ov5_021ECFA4 + + thumb_func_start ov5_021ECFD8 +ov5_021ECFD8: ; 0x021ECFD8 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + bl ov5_021ED094 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021ECFF2 + bl sub_020211FC + mov r0, #0 + str r0, [r5, #0] +_021ECFF2: + ldr r0, _021ED018 ; =0x0000FFFF + cmp r4, r0 + beq _021ED016 + add r0, r6, #0 + bl sub_02062A40 + add r1, r6, #0 + add r2, r4, #0 + bl ov5_021ED1C8 + cmp r0, #0 + bne _021ED016 + add r0, r6, #0 + bl ov5_021EDEA8 + add r1, r4, #0 + bl ov5_021ED184 +_021ED016: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021ED018: .word 0x0000FFFF + thumb_func_end ov5_021ECFD8 + + thumb_func_start ov5_021ED01C +ov5_021ED01C: ; 0x021ED01C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_02021334 + strh r0, [r4] + add r0, r5, #0 + bl sub_02021358 + strh r0, [r4, #2] + add r0, r5, #0 + bl sub_02021394 + str r0, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED01C + + thumb_func_start ov5_021ED03C +ov5_021ED03C: ; 0x021ED03C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrh r1, [r4] + add r5, r0, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_02021320 + ldrh r1, [r4, #2] + add r0, r5, #0 + bl sub_02021344 + ldr r1, [r4, #4] + add r0, r5, #0 + bl sub_02021380 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED03C + + thumb_func_start ov5_021ED060 +ov5_021ED060: ; 0x021ED060 + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDEA8 + add r1, r6, #0 + add r7, r0, #0 + bl ov5_021ED3A4 + cmp r0, #0 + bne _021ED084 + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021ECF1C + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021ED084: + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov5_021EE228 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED060 + + thumb_func_start ov5_021ED094 +ov5_021ED094: ; 0x021ED094 + push {r4, lr} + add r4, r0, #0 + bl ov5_021EDEA8 + add r1, r4, #0 + bl ov5_021EE264 + pop {r4, pc} + thumb_func_end ov5_021ED094 + + thumb_func_start ov5_021ED0A4 +ov5_021ED0A4: ; 0x021ED0A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #0x28 + add r7, r0, #0 + mov r0, #4 + mul r1, r5 + bl sub_02018144 + add r6, r0, #0 + add r0, r7, #0 + add r0, #0xe4 + str r6, [r0, #0] + cmp r6, #0 + bne _021ED0C4 + bl sub_02022974 +_021ED0C4: + mov r0, #4 + lsl r1, r5, #3 + bl sub_02018144 + add r4, r0, #0 + add r7, #0xf4 + str r4, [r7, #0] + cmp r4, #0 + bne _021ED0DA + bl sub_02022974 +_021ED0DA: + ldr r0, _021ED0EC ; =0x0000FFFF +_021ED0DC: + str r0, [r4, #0] + str r6, [r4, #4] + add r4, #8 + add r6, #0x28 + sub r5, r5, #1 + bne _021ED0DC + pop {r3, r4, r5, r6, r7, pc} + nop +_021ED0EC: .word 0x0000FFFF + thumb_func_end ov5_021ED0A4 + + thumb_func_start ov5_021ED0F0 +ov5_021ED0F0: ; 0x021ED0F0 + push {r4, lr} + add r4, r0, #0 + bl ov5_021ED1A4 + add r1, r4, #0 + add r1, #0xe4 + ldr r1, [r1, #0] + mov r0, #4 + bl sub_02018238 + add r4, #0xf4 + ldr r1, [r4, #0] + mov r0, #4 + bl sub_02018238 + pop {r4, pc} + thumb_func_end ov5_021ED0F0 + + thumb_func_start ov5_021ED110 +ov5_021ED110: ; 0x021ED110 + push {r4, r5, r6, lr} + add r2, r0, #0 + add r2, #0xf4 + ldr r4, [r2, #0] + ldr r2, [r0, #4] + add r6, r4, #0 + add r5, r2, #0 +_021ED11E: + ldr r3, [r6, #0] + cmp r3, r1 + bne _021ED128 + ldr r0, [r6, #4] + pop {r4, r5, r6, pc} +_021ED128: + add r6, #8 + sub r5, r5, #1 + bne _021ED11E + ldr r3, _021ED14C ; =0x0000FFFF +_021ED130: + ldr r5, [r4, #0] + cmp r5, r3 + bne _021ED142 + str r1, [r4, #0] + ldr r2, [r4, #4] + bl ov5_021EDE3C + ldr r0, [r4, #4] + pop {r4, r5, r6, pc} +_021ED142: + add r4, #8 + sub r2, r2, #1 + bne _021ED130 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021ED14C: .word 0x0000FFFF + thumb_func_end ov5_021ED110 + + thumb_func_start ov5_021ED150 +ov5_021ED150: ; 0x021ED150 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_0206285C + add r1, r0, #0 + add r1, #0xf4 + ldr r2, [r1, #0] + ldr r1, [r0, #4] +_021ED162: + ldr r0, [r2, #0] + cmp r0, r5 + bne _021ED178 + ldr r3, [r2, #4] + mov r2, #5 +_021ED16C: + ldmia r3!, {r0, r1} + stmia r4!, {r0, r1} + sub r2, r2, #1 + bne _021ED16C + mov r0, #1 + pop {r3, r4, r5, pc} +_021ED178: + add r2, #8 + sub r1, r1, #1 + bne _021ED162 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED150 + + thumb_func_start ov5_021ED184 +ov5_021ED184: ; 0x021ED184 + add r2, r0, #0 + add r2, #0xf4 + ldr r3, [r2, #0] + ldr r2, [r0, #4] +_021ED18C: + ldr r0, [r3, #0] + cmp r0, r1 + bne _021ED198 + ldr r0, _021ED1A0 ; =0x0000FFFF + str r0, [r3, #0] + bx lr +_021ED198: + add r3, #8 + sub r2, r2, #1 + bne _021ED18C + bx lr + ; .align 2, 0 +_021ED1A0: .word 0x0000FFFF + thumb_func_end ov5_021ED184 + + thumb_func_start ov5_021ED1A4 +ov5_021ED1A4: ; 0x021ED1A4 + push {r3, r4} + add r1, r0, #0 + add r1, #0xf4 + ldr r4, [r1, #0] + ldr r1, _021ED1C4 ; =0x0000FFFF + ldr r3, [r0, #4] + add r0, r1, #0 +_021ED1B2: + ldr r2, [r4, #0] + cmp r2, r0 + beq _021ED1BA + str r1, [r4, #0] +_021ED1BA: + add r4, #8 + sub r3, r3, #1 + bne _021ED1B2 + pop {r3, r4} + bx lr + ; .align 2, 0 +_021ED1C4: .word 0x0000FFFF + thumb_func_end ov5_021ED1A4 + + thumb_func_start ov5_021ED1C8 +ov5_021ED1C8: ; 0x021ED1C8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + bl sub_02062824 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062868 + str r0, [sp] +_021ED1DE: + ldr r0, [sp] + cmp r0, r6 + beq _021ED212 + bl sub_02062CF8 + cmp r0, #1 + bne _021ED212 + ldr r0, [sp] + bl sub_02062920 + add r5, r0, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021ED204 + ldr r0, [sp] + bl sub_02067800 + add r5, r0, #0 +_021ED204: + ldr r0, _021ED220 ; =0x0000FFFF + cmp r5, r0 + beq _021ED212 + cmp r5, r7 + bne _021ED212 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021ED212: + add r0, sp, #0 + bl sub_02062880 + sub r4, r4, #1 + bne _021ED1DE + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED220: .word 0x0000FFFF + thumb_func_end ov5_021ED1C8 + + thumb_func_start ov5_021ED224 +ov5_021ED224: ; 0x021ED224 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + mov r0, #4 + mov r1, #0x40 + lsl r2, r4, #0xc + add r3, r4, #0 + bl ov5_021F067C + add r1, r5, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r0, r5, #0 + bl ov5_021ED558 + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021EDCC4 + add r0, r5, #0 + sub r1, r4, r6 + bl ov5_021EDCCC + mov r0, #4 + mov r1, #0x41 + lsl r2, r7, #7 + add r3, r7, #0 + bl ov5_021F067C + add r1, r5, #0 + add r1, #0xfc + str r0, [r1, #0] + add r0, r5, #0 + bl ov5_021ED694 + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov5_021EDCD4 + ldr r1, [sp, #0x18] + add r0, r5, #0 + sub r1, r7, r1 + bl ov5_021EDCDC + ldr r0, [sp, #0x1c] + mov r1, #4 + bl sub_02022BD8 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EDCA8 + add r0, r5, #0 + bl ov5_021ED7D0 + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov5_021EDCE4 + ldr r2, [sp, #0x1c] + ldr r1, [sp, #0x20] + add r0, r5, #0 + sub r1, r2, r1 + bl ov5_021EDCEC + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021ED224 + + thumb_func_start ov5_021ED2AC +ov5_021ED2AC: ; 0x021ED2AC + push {r4, lr} + add r4, r0, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl ov5_021F06D8 + add r0, r4, #0 + add r0, #0xfc + ldr r0, [r0, #0] + bl ov5_021F06D8 + add r0, r4, #0 + bl ov5_021EDCB0 + bl sub_02022C1C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED2AC + + thumb_func_start ov5_021ED2D0 +ov5_021ED2D0: + ldr r3, [r2, #0] + cmp r3, r0 + bne _021ED2DA + add r0, r2, #0 + bx lr +_021ED2DA: + add r2, #8 + ldr r3, [r2, #0] + cmp r3, r1 + bne ov5_021ED2D0 + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021ED2D0 + + thumb_func_start ov5_021ED2E8 +ov5_021ED2E8: ; 0x021ED2E8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r4, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + add r7, r3, #0 + bl ov5_021F0770 + cmp r0, #1 + bne _021ED302 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021ED302: + ldr r2, [sp, #0x18] + add r0, r4, #0 + add r1, r7, #0 + bl ov5_021ED2D0 + add r7, r0, #0 + bne _021ED314 + bl sub_02022974 +_021ED314: + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020628A0 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r3, [r7, #4] + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021F0784 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED2E8 + + thumb_func_start ov5_021ED334 +ov5_021ED334: ; 0x021ED334 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0xf0 + add r4, r2, #0 + add r6, r1, #0 + ldr r0, [r0, #0] + add r1, r4, #0 + add r7, r3, #0 + bl sub_02022C40 + cmp r0, #0 + bne _021ED350 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021ED350: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDFF0 + cmp r0, #0 + beq _021ED360 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021ED360: + ldr r1, _021ED38C ; =0x0000FFFF + add r0, r4, #0 + add r2, r7, #0 + bl ov5_021ED2D0 + add r2, r0, #0 + bne _021ED372 + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_021ED372: + ldr r2, [r2, #4] + add r0, r5, #0 + add r1, r4, #0 + add r3, r6, #0 + bl ov5_021EDF3C + cmp r0, #1 + bne _021ED386 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021ED386: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_021ED38C: .word 0x0000FFFF + thumb_func_end ov5_021ED334 + + thumb_func_start ov5_021ED390 +ov5_021ED390: ; 0x021ED390 + push {r3, lr} + ldr r3, _021ED3A0 ; =0x021FC9B4 + add r2, r1, #0 + mov r1, #0 + bl ov5_021ED334 + pop {r3, pc} + nop +_021ED3A0: .word 0x021FC9B4 + thumb_func_end ov5_021ED390 + + thumb_func_start ov5_021ED3A4 +ov5_021ED3A4: ; 0x021ED3A4 + push {r3, lr} + ldr r3, _021ED3B4 ; =0x021FC9B4 + add r2, r1, #0 + mov r1, #1 + bl ov5_021ED334 + pop {r3, pc} + nop +_021ED3B4: .word 0x021FC9B4 + thumb_func_end ov5_021ED3A4 + + thumb_func_start ov5_021ED3B8 +ov5_021ED3B8: ; 0x021ED3B8 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, [r4, #0] + ldr r0, _021ED3D8 ; =0x0000FFFF + cmp r1, r0 + beq _021ED3D6 + add r6, r0, #0 +_021ED3C8: + add r0, r5, #0 + bl ov5_021ED390 + add r4, r4, #4 + ldr r1, [r4, #0] + cmp r1, r6 + bne _021ED3C8 +_021ED3D6: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021ED3D8: .word 0x0000FFFF + thumb_func_end ov5_021ED3B8 + + thumb_func_start ov5_021ED3DC +ov5_021ED3DC: ; 0x021ED3DC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDC98 + ldr r0, _021ED404 ; =0x021FB484 + add r1, r5, #0 + str r0, [sp] + add r1, #0xf8 + ldr r1, [r1, #0] + ldr r3, _021ED408 ; =0x0000FFFF + add r0, r5, #0 + add r2, r4, #0 + bl ov5_021ED2E8 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED56C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021ED404: .word 0x021FB484 +_021ED408: .word 0x0000FFFF + thumb_func_end ov5_021ED3DC + + thumb_func_start ov5_021ED40C +ov5_021ED40C: ; 0x021ED40C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDC98 + ldr r0, _021ED434 ; =0x021FB484 + add r1, r5, #0 + str r0, [sp] + add r1, #0xf8 + ldr r1, [r1, #0] + ldr r3, _021ED438 ; =0x0000FFFF + add r0, r5, #0 + add r2, r4, #0 + bl ov5_021ED2E8 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED5B4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021ED434: .word 0x021FB484 +_021ED438: .word 0x0000FFFF + thumb_func_end ov5_021ED40C + + thumb_func_start ov5_021ED43C +ov5_021ED43C: ; 0x021ED43C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, [r4, #0] + ldr r0, _021ED45C ; =0x0000FFFF + cmp r1, r0 + beq _021ED45A + add r6, r0, #0 +_021ED44C: + add r0, r5, #0 + bl ov5_021ED3DC + add r4, r4, #4 + ldr r1, [r4, #0] + cmp r1, r6 + bne _021ED44C +_021ED45A: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021ED45C: .word 0x0000FFFF + thumb_func_end ov5_021ED43C + + thumb_func_start ov5_021ED460 +ov5_021ED460: ; 0x021ED460 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCA0 + ldr r0, _021ED488 ; =0x021FB5BC + add r1, r5, #0 + str r0, [sp] + add r1, #0xfc + ldr r1, [r1, #0] + ldr r3, _021ED48C ; =0x0000FFFF + add r0, r5, #0 + add r2, r4, #0 + bl ov5_021ED2E8 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED6A8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021ED488: .word 0x021FB5BC +_021ED48C: .word 0x0000FFFF + thumb_func_end ov5_021ED460 + + thumb_func_start ov5_021ED490 +ov5_021ED490: ; 0x021ED490 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCA0 + ldr r0, _021ED4B8 ; =0x021FB5BC + add r1, r5, #0 + str r0, [sp] + add r1, #0xfc + ldr r1, [r1, #0] + ldr r3, _021ED4BC ; =0x0000FFFF + add r0, r5, #0 + add r2, r4, #0 + bl ov5_021ED2E8 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED6F0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021ED4B8: .word 0x021FB5BC +_021ED4BC: .word 0x0000FFFF + thumb_func_end ov5_021ED490 + + thumb_func_start ov5_021ED4C0 +ov5_021ED4C0: ; 0x021ED4C0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r1, [r4, #0] + ldr r0, _021ED4E0 ; =0x0000FFFF + cmp r1, r0 + beq _021ED4DE + add r6, r0, #0 +_021ED4D0: + add r0, r5, #0 + bl ov5_021ED460 + add r4, r4, #4 + ldr r1, [r4, #0] + cmp r1, r6 + bne _021ED4D0 +_021ED4DE: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021ED4E0: .word 0x0000FFFF + thumb_func_end ov5_021ED4C0 + + thumb_func_start ov5_021ED4E4 +ov5_021ED4E4: ; 0x021ED4E4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov5_021ED3B8 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED43C + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021ED4C0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED4E4 +_021ED502: .space 0x2 +_021ED504: + stmia r0!, {r1} + sub r2, r2, #1 + bne _021ED504 + bx lr + + thumb_func_start ov5_021ED50C +ov5_021ED50C: ; 0x021ED50C + push {r3, r4} +_021ED50E: + ldr r4, [r0, #0] + cmp r4, r2 + bne _021ED51C + str r1, [r0, #0] + mov r0, #1 + pop {r3, r4} + bx lr +_021ED51C: + add r0, r0, #4 + sub r3, r3, #1 + bne _021ED50E + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov5_021ED50C +_021ED528: + ldr r3, [r0, #0] + cmp r3, r1 + bne _021ED532 + mov r0, #1 + bx lr +_021ED532: + add r0, r0, #4 + sub r2, r2, #1 + bne _021ED528 + mov r0, #0 + bx lr + + thumb_func_start ov5_021ED53C +ov5_021ED53C: ; 0x021ED53C + push {r3, r4} +_021ED53E: + ldr r4, [r0, #0] + cmp r4, r1 + bne _021ED54C + str r2, [r0, #0] + mov r0, #1 + pop {r3, r4} + bx lr +_021ED54C: + add r0, r0, #4 + sub r3, r3, #1 + bne _021ED53E + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov5_021ED53C + + thumb_func_start ov5_021ED558 +ov5_021ED558: ; 0x021ED558 + push {r3, lr} + bl ov5_021EDCBC + ldr r1, _021ED568 ; =0x0000FFFF + mov r2, #8 + bl _021ED504 + pop {r3, pc} + ; .align 2, 0 +_021ED568: .word 0x0000FFFF + thumb_func_end ov5_021ED558 + + thumb_func_start ov5_021ED56C +ov5_021ED56C: ; 0x021ED56C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCC8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCBC + ldr r2, _021ED594 ; =0x0000FFFF + add r1, r4, #0 + add r3, r6, #0 + bl ov5_021ED50C + cmp r0, #0 + bne _021ED590 + bl sub_02022974 +_021ED590: + pop {r4, r5, r6, pc} + nop +_021ED594: .word 0x0000FFFF + thumb_func_end ov5_021ED56C + + thumb_func_start ov5_021ED598 +ov5_021ED598: ; 0x021ED598 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCC8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCBC + add r1, r4, #0 + add r2, r6, #0 + bl _021ED528 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021ED598 + + thumb_func_start ov5_021ED5B4 +ov5_021ED5B4: ; 0x021ED5B4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCBC + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCC8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCD0 + add r3, r0, #0 + ldr r2, _021ED5E4 ; =0x0000FFFF + add r0, r6, r4 + add r1, r7, #0 + bl ov5_021ED50C + cmp r0, #0 + bne _021ED5E2 + bl sub_02022974 +_021ED5E2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED5E4: .word 0x0000FFFF + thumb_func_end ov5_021ED5B4 + + thumb_func_start ov5_021ED5E8 +ov5_021ED5E8: ; 0x021ED5E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCBC + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCC8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCD0 + add r2, r0, #0 + add r0, r6, r4 + add r1, r7, #0 + bl _021ED528 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED5E8 + + thumb_func_start ov5_021ED610 +ov5_021ED610: ; 0x021ED610 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCBC + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCC8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCD0 + add r3, r0, #0 + ldr r2, _021ED638 ; =0x0000FFFF + add r0, r6, r4 + add r1, r7, #0 + bl ov5_021ED53C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED638: .word 0x0000FFFF + thumb_func_end ov5_021ED610 + + thumb_func_start ov5_021ED63C +ov5_021ED63C: ; 0x021ED63C + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + add r0, r6, #0 + bl ov5_021EDC98 + add r0, r6, #0 + bl ov5_021EDCBC + add r4, r0, #0 + add r0, r6, #0 + bl ov5_021EDCC8 + lsl r0, r0, #2 + add r5, r4, r0 + add r0, r6, #0 + bl ov5_021EDCD0 + add r4, r0, #0 +_021ED662: + ldr r1, [r5, #0] + ldr r0, _021ED690 ; =0x0000FFFF + cmp r1, r0 + beq _021ED686 + add r0, r7, #0 + mov r2, #0 + bl ov5_021EDAB4 + cmp r0, #0 + bne _021ED686 + add r0, r6, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [r5, #0] + bl ov5_021F0740 + ldr r0, _021ED690 ; =0x0000FFFF + str r0, [r5, #0] +_021ED686: + add r5, r5, #4 + sub r4, r4, #1 + bne _021ED662 + pop {r3, r4, r5, r6, r7, pc} + nop +_021ED690: .word 0x0000FFFF + thumb_func_end ov5_021ED63C + + thumb_func_start ov5_021ED694 +ov5_021ED694: ; 0x021ED694 + push {r3, lr} + bl ov5_021EDCC0 + ldr r1, _021ED6A4 ; =0x0000FFFF + mov r2, #8 + bl _021ED504 + pop {r3, pc} + ; .align 2, 0 +_021ED6A4: .word 0x0000FFFF + thumb_func_end ov5_021ED694 + + thumb_func_start ov5_021ED6A8 +ov5_021ED6A8: ; 0x021ED6A8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCD8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCC0 + ldr r2, _021ED6D0 ; =0x0000FFFF + add r1, r4, #0 + add r3, r6, #0 + bl ov5_021ED50C + cmp r0, #0 + bne _021ED6CC + bl sub_02022974 +_021ED6CC: + pop {r4, r5, r6, pc} + nop +_021ED6D0: .word 0x0000FFFF + thumb_func_end ov5_021ED6A8 + + thumb_func_start ov5_021ED6D4 +ov5_021ED6D4: ; 0x021ED6D4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCD8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCC0 + add r1, r4, #0 + add r2, r6, #0 + bl _021ED528 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021ED6D4 + + thumb_func_start ov5_021ED6F0 +ov5_021ED6F0: ; 0x021ED6F0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCC0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCD8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCE0 + add r3, r0, #0 + ldr r2, _021ED720 ; =0x0000FFFF + add r0, r6, r4 + add r1, r7, #0 + bl ov5_021ED50C + cmp r0, #0 + bne _021ED71E + bl sub_02022974 +_021ED71E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED720: .word 0x0000FFFF + thumb_func_end ov5_021ED6F0 + + thumb_func_start ov5_021ED724 +ov5_021ED724: ; 0x021ED724 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCC0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCD8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCE0 + add r2, r0, #0 + add r0, r6, r4 + add r1, r7, #0 + bl _021ED528 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED724 + + thumb_func_start ov5_021ED74C +ov5_021ED74C: ; 0x021ED74C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCC0 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCD8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCE0 + add r3, r0, #0 + ldr r2, _021ED774 ; =0x0000FFFF + add r0, r6, r4 + add r1, r7, #0 + bl ov5_021ED53C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED774: .word 0x0000FFFF + thumb_func_end ov5_021ED74C + + thumb_func_start ov5_021ED778 +ov5_021ED778: ; 0x021ED778 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + add r0, r6, #0 + bl ov5_021EDCA0 + add r0, r6, #0 + bl ov5_021EDCC0 + add r4, r0, #0 + add r0, r6, #0 + bl ov5_021EDCD8 + lsl r0, r0, #2 + add r5, r4, r0 + add r0, r6, #0 + bl ov5_021EDCE0 + add r4, r0, #0 +_021ED79E: + ldr r1, [r5, #0] + ldr r0, _021ED7CC ; =0x0000FFFF + cmp r1, r0 + beq _021ED7C2 + add r0, r7, #0 + mov r2, #0 + bl ov5_021EDB3C + cmp r0, #0 + bne _021ED7C2 + add r0, r6, #0 + add r0, #0xfc + ldr r0, [r0, #0] + ldr r1, [r5, #0] + bl ov5_021F0740 + ldr r0, _021ED7CC ; =0x0000FFFF + str r0, [r5, #0] +_021ED7C2: + add r5, r5, #4 + sub r4, r4, #1 + bne _021ED79E + pop {r3, r4, r5, r6, r7, pc} + nop +_021ED7CC: .word 0x0000FFFF + thumb_func_end ov5_021ED778 + + thumb_func_start ov5_021ED7D0 +ov5_021ED7D0: ; 0x021ED7D0 + push {r3, lr} + bl ov5_021EDCB8 + ldr r1, _021ED7E0 ; =0x0000FFFF + mov r2, #0x20 + bl _021ED504 + pop {r3, pc} + ; .align 2, 0 +_021ED7E0: .word 0x0000FFFF + thumb_func_end ov5_021ED7D0 + + thumb_func_start ov5_021ED7E4 +ov5_021ED7E4: ; 0x021ED7E4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCE8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCB8 + ldr r2, _021ED80C ; =0x0000FFFF + add r1, r4, #0 + add r3, r6, #0 + bl ov5_021ED50C + cmp r0, #0 + bne _021ED808 + bl sub_02022974 +_021ED808: + pop {r4, r5, r6, pc} + nop +_021ED80C: .word 0x0000FFFF + thumb_func_end ov5_021ED7E4 + + thumb_func_start ov5_021ED810 +ov5_021ED810: ; 0x021ED810 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EDCE8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCB8 + add r1, r4, #0 + add r2, r6, #0 + bl _021ED528 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021ED810 + + thumb_func_start ov5_021ED82C +ov5_021ED82C: ; 0x021ED82C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED810 + cmp r0, #1 + bne _021ED83E + mov r0, #1 + pop {r3, r4, r5, pc} +_021ED83E: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED924 + cmp r0, #1 + bne _021ED84E + mov r0, #2 + pop {r3, r4, r5, pc} +_021ED84E: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDFF0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021ED82C + + thumb_func_start ov5_021ED858 +ov5_021ED858: ; 0x021ED858 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCB8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCE8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCF0 + add r3, r0, #0 + ldr r2, _021ED888 ; =0x0000FFFF + add r0, r6, r4 + add r1, r7, #0 + bl ov5_021ED50C + cmp r0, #0 + bne _021ED886 + bl sub_02022974 +_021ED886: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED888: .word 0x0000FFFF + thumb_func_end ov5_021ED858 + + thumb_func_start ov5_021ED88C +ov5_021ED88C: ; 0x021ED88C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCB8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCE8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCF0 + add r3, r0, #0 + ldr r2, _021ED8B4 ; =0x0000FFFF + add r0, r6, r4 + add r1, r7, #0 + bl ov5_021ED53C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021ED8B4: .word 0x0000FFFF + thumb_func_end ov5_021ED88C + + thumb_func_start ov5_021ED8B8 +ov5_021ED8B8: ; 0x021ED8B8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + str r0, [sp] + add r0, r6, #0 + bl ov5_021EDCB0 + str r0, [sp, #4] + add r0, r6, #0 + bl ov5_021EDCB8 + add r4, r0, #0 + add r0, r6, #0 + bl ov5_021EDCE8 + lsl r0, r0, #2 + add r5, r4, r0 + add r0, r6, #0 + bl ov5_021EDCF0 + add r7, r0, #0 +_021ED8E2: + ldr r4, [r5, #0] + ldr r0, _021ED920 ; =0x0000FFFF + cmp r4, r0 + beq _021ED914 + ldr r0, [sp] + add r1, r4, #0 + mov r2, #0 + bl ov5_021EDA54 + cmp r0, #0 + bne _021ED914 + ldr r0, [sp, #4] + add r1, r4, #0 + bl sub_02022D38 + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021EDFBC + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021EE170 + ldr r0, _021ED920 ; =0x0000FFFF + str r0, [r5, #0] +_021ED914: + add r5, r5, #4 + sub r7, r7, #1 + bne _021ED8E2 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021ED920: .word 0x0000FFFF + thumb_func_end ov5_021ED8B8 + + thumb_func_start ov5_021ED924 +ov5_021ED924: ; 0x021ED924 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + bl ov5_021EDCB8 + add r6, r0, #0 + add r0, r5, #0 + bl ov5_021EDCE8 + lsl r4, r0, #2 + add r0, r5, #0 + bl ov5_021EDCF0 + add r2, r0, #0 + add r0, r6, r4 + add r1, r7, #0 + bl _021ED528 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED924 + + thumb_func_start ov5_021ED94C +ov5_021ED94C: ; 0x021ED94C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED810 + cmp r0, #1 + bne _021ED95E + mov r0, #0 + pop {r3, r4, r5, pc} +_021ED95E: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED924 + cmp r0, #1 + bne _021ED96E + mov r0, #1 + pop {r3, r4, r5, pc} +_021ED96E: + mov r0, #2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED94C + + thumb_func_start ov5_021ED974 +ov5_021ED974: ; 0x021ED974 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED598 + cmp r0, #1 + bne _021ED986 + mov r0, #0 + pop {r3, r4, r5, pc} +_021ED986: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED5E8 + cmp r0, #1 + bne _021ED996 + mov r0, #1 + pop {r3, r4, r5, pc} +_021ED996: + mov r0, #2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED974 + + thumb_func_start ov5_021ED99C +ov5_021ED99C: ; 0x021ED99C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED6D4 + cmp r0, #1 + bne _021ED9AE + mov r0, #0 + pop {r3, r4, r5, pc} +_021ED9AE: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED724 + cmp r0, #1 + bne _021ED9BE + mov r0, #1 + pop {r3, r4, r5, pc} +_021ED9BE: + mov r0, #2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021ED99C + + thumb_func_start ov5_021ED9C4 +ov5_021ED9C4: ; 0x021ED9C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED82C + cmp r0, #0 + bne _021ED9DA + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED3A4 +_021ED9DA: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021ED9C4 + + thumb_func_start ov5_021ED9DC +ov5_021ED9DC: ; 0x021ED9DC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED974 + cmp r0, #2 + bne _021ED9F2 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED40C +_021ED9F2: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021ED9DC + + thumb_func_start ov5_021ED9F4 +ov5_021ED9F4: ; 0x021ED9F4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED99C + cmp r0, #2 + bne _021EDA0A + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED490 +_021EDA0A: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021ED9F4 + + thumb_func_start ov5_021EDA0C +ov5_021EDA0C: ; 0x021EDA0C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov5_021EDD2C + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021ED9DC + add r0, r4, #0 + bl ov5_021EDD38 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021ED9F4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED9C4 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EDA0C + + thumb_func_start ov5_021EDA38 +ov5_021EDA38: ; 0x021EDA38 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021ED63C + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED778 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED8B8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EDA38 + + thumb_func_start ov5_021EDA54 +ov5_021EDA54: ; 0x021EDA54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0 + add r5, r2, #0 + str r1, [sp, #4] + str r1, [sp] + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + add r7, r0, #0 + bl sub_020625B0 + cmp r0, #1 + bne _021EDAAE +_021EDA72: + cmp r5, #0 + beq _021EDA7C + ldr r0, [sp] + cmp r5, r0 + beq _021EDA9E +_021EDA7C: + ldr r0, [sp] + bl sub_02062920 + add r4, r0, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021EDA94 + ldr r0, [sp] + bl sub_02067800 + add r4, r0, #0 +_021EDA94: + cmp r4, r6 + bne _021EDA9E + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EDA9E: + add r0, r7, #0 + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + bl sub_020625B0 + cmp r0, #1 + beq _021EDA72 +_021EDAAE: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EDA54 + + thumb_func_start ov5_021EDAB4 +ov5_021EDAB4: ; 0x021EDAB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0 + add r5, r2, #0 + str r1, [sp, #4] + str r1, [sp] + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + add r7, r0, #0 + bl sub_020625B0 + cmp r0, #1 + bne _021EDB32 +_021EDAD2: + cmp r5, #0 + beq _021EDADC + ldr r0, [sp] + cmp r5, r0 + beq _021EDB22 +_021EDADC: + ldr r0, [sp] + bl sub_02062920 + add r4, r0, #0 + ldr r0, _021EDB38 ; =0x0000FFFF + cmp r4, r0 + beq _021EDB22 + ldr r0, [sp] + bl ov5_021ECD04 + ldr r0, [r0, #4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + cmp r0, #1 + bne _021EDB22 + add r0, r4, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021EDB0C + ldr r0, [sp] + bl sub_02067800 + add r4, r0, #0 +_021EDB0C: + ldr r0, _021EDB38 ; =0x0000FFFF + cmp r4, r0 + beq _021EDB22 + add r0, r4, #0 + bl ov5_021EDD2C + cmp r6, r0 + bne _021EDB22 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EDB22: + add r0, r7, #0 + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + bl sub_020625B0 + cmp r0, #1 + beq _021EDAD2 +_021EDB32: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021EDB38: .word 0x0000FFFF + thumb_func_end ov5_021EDAB4 + + thumb_func_start ov5_021EDB3C +ov5_021EDB3C: ; 0x021EDB3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0 + add r5, r2, #0 + str r1, [sp, #4] + str r1, [sp] + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + add r7, r0, #0 + bl sub_020625B0 + cmp r0, #1 + bne _021EDBB8 +_021EDB5A: + cmp r5, #0 + beq _021EDB64 + ldr r0, [sp] + cmp r0, r5 + beq _021EDBA8 +_021EDB64: + ldr r0, _021EDBC0 ; =0x0000FFFF + cmp r4, r0 + beq _021EDBA8 + ldr r0, [sp] + bl ov5_021ECD04 + ldr r0, [r0, #4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + cmp r0, #1 + bne _021EDBA8 + ldr r0, [sp] + bl sub_02062920 + add r4, r0, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021EDB92 + ldr r0, [sp] + bl sub_02067800 + add r4, r0, #0 +_021EDB92: + ldr r0, _021EDBC0 ; =0x0000FFFF + cmp r4, r0 + beq _021EDBA8 + add r0, r4, #0 + bl ov5_021EDD38 + cmp r6, r0 + bne _021EDBA8 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EDBA8: + add r0, r7, #0 + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + bl sub_020625B0 + cmp r0, #1 + beq _021EDB5A +_021EDBB8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EDBC0: .word 0x0000FFFF + thumb_func_end ov5_021EDB3C + + thumb_func_start ov5_021EDBC4 +ov5_021EDBC4: ; 0x021EDBC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + add r7, r2, #0 + bl sub_0206285C + add r4, r0, #0 + add r0, r5, #0 + bl ov5_021EDD2C + str r0, [sp] + ldr r1, [sp] + add r0, r4, #0 + bl ov5_021ED974 + cmp r0, #1 + bne _021EDC0A + ldr r1, [sp] + add r0, r6, #0 + add r2, r7, #0 + bl ov5_021EDAB4 + cmp r0, #0 + bne _021EDC0A + add r0, r4, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + ldr r1, [sp] + bl ov5_021F0740 + ldr r1, [sp] + add r0, r4, #0 + bl ov5_021ED610 +_021EDC0A: + add r0, r5, #0 + bl ov5_021EDD38 + str r0, [sp, #4] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov5_021ED99C + cmp r0, #1 + bne _021EDC40 + ldr r1, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + bl ov5_021EDB3C + cmp r0, #0 + bne _021EDC40 + add r0, r4, #0 + add r0, #0xfc + ldr r0, [r0, #0] + ldr r1, [sp, #4] + bl ov5_021F0740 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov5_021ED74C +_021EDC40: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021ED94C + cmp r0, #1 + bne _021EDC7E + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov5_021EDA54 + cmp r0, #0 + bne _021EDC7E + add r0, r4, #0 + bl ov5_021EDCB0 + add r1, r5, #0 + bl sub_02022D38 + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021ED88C + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EDFBC + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EE170 +_021EDC7E: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDBC4 + + thumb_func_start ov5_021EDC84 +ov5_021EDC84: ; 0x021EDC84 + add r0, #0xe0 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDC84 + + thumb_func_start ov5_021EDC8C +ov5_021EDC8C: ; 0x021EDC8C + add r0, #0xe0 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDC8C + + thumb_func_start ov5_021EDC94 +ov5_021EDC94: ; 0x021EDC94 + str r1, [r0, #4] + bx lr + thumb_func_end ov5_021EDC94 + + thumb_func_start ov5_021EDC98 +ov5_021EDC98: ; 0x021EDC98 + add r0, #0xe8 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDC98 + + thumb_func_start ov5_021EDCA0 +ov5_021EDCA0: ; 0x021EDCA0 + add r0, #0xec + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDCA0 + + thumb_func_start ov5_021EDCA8 +ov5_021EDCA8: ; 0x021EDCA8 + add r0, #0xf0 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDCA8 + + thumb_func_start ov5_021EDCB0 +ov5_021EDCB0: ; 0x021EDCB0 + add r0, #0xf0 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDCB0 + + thumb_func_start ov5_021EDCB8 +ov5_021EDCB8: ; 0x021EDCB8 + add r0, #0x60 + bx lr + thumb_func_end ov5_021EDCB8 + + thumb_func_start ov5_021EDCBC +ov5_021EDCBC: ; 0x021EDCBC + add r0, #0x20 + bx lr + thumb_func_end ov5_021EDCBC + + thumb_func_start ov5_021EDCC0 +ov5_021EDCC0: ; 0x021EDCC0 + add r0, #0x40 + bx lr + thumb_func_end ov5_021EDCC0 + + thumb_func_start ov5_021EDCC4 +ov5_021EDCC4: ; 0x021EDCC4 + str r1, [r0, #8] + bx lr + thumb_func_end ov5_021EDCC4 + + thumb_func_start ov5_021EDCC8 +ov5_021EDCC8: ; 0x021EDCC8 + ldr r0, [r0, #8] + bx lr + thumb_func_end ov5_021EDCC8 + + thumb_func_start ov5_021EDCCC +ov5_021EDCCC: ; 0x021EDCCC + str r1, [r0, #0xc] + bx lr + thumb_func_end ov5_021EDCCC + + thumb_func_start ov5_021EDCD0 +ov5_021EDCD0: ; 0x021EDCD0 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov5_021EDCD0 + + thumb_func_start ov5_021EDCD4 +ov5_021EDCD4: ; 0x021EDCD4 + str r1, [r0, #0x10] + bx lr + thumb_func_end ov5_021EDCD4 + + thumb_func_start ov5_021EDCD8 +ov5_021EDCD8: ; 0x021EDCD8 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov5_021EDCD8 + + thumb_func_start ov5_021EDCDC +ov5_021EDCDC: ; 0x021EDCDC + str r1, [r0, #0x14] + bx lr + thumb_func_end ov5_021EDCDC + + thumb_func_start ov5_021EDCE0 +ov5_021EDCE0: ; 0x021EDCE0 + ldr r0, [r0, #0x14] + bx lr + thumb_func_end ov5_021EDCE0 + + thumb_func_start ov5_021EDCE4 +ov5_021EDCE4: ; 0x021EDCE4 + str r1, [r0, #0x18] + bx lr + thumb_func_end ov5_021EDCE4 + + thumb_func_start ov5_021EDCE8 +ov5_021EDCE8: ; 0x021EDCE8 + ldr r0, [r0, #0x18] + bx lr + thumb_func_end ov5_021EDCE8 + + thumb_func_start ov5_021EDCEC +ov5_021EDCEC: ; 0x021EDCEC + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov5_021EDCEC + + thumb_func_start ov5_021EDCF0 +ov5_021EDCF0: ; 0x021EDCF0 + ldr r0, [r0, #0x1c] + bx lr + thumb_func_end ov5_021EDCF0 + + thumb_func_start ov5_021EDCF4 +ov5_021EDCF4: ; 0x021EDCF4 + mov r3, #0x41 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _021EDD00 ; =ov5_021ECD68 + bx r3 + nop +_021EDD00: .word ov5_021ECD68 + thumb_func_end ov5_021EDCF4 + + thumb_func_start ov5_021EDD04 +ov5_021EDD04: ; 0x021EDD04 + push {r3, lr} + ldr r3, _021EDD24 ; =0x021FD77C + ldr r1, _021EDD28 ; =0x0000FFFF +_021EDD0A: + ldr r2, [r3, #0] + cmp r2, r0 + bne _021EDD14 + add r0, r3, #0 + pop {r3, pc} +_021EDD14: + add r3, #0x10 + ldr r2, [r3, #0] + cmp r2, r1 + bne _021EDD0A + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021EDD24: .word 0x021FD77C +_021EDD28: .word 0x0000FFFF + thumb_func_end ov5_021EDD04 + + thumb_func_start ov5_021EDD2C +ov5_021EDD2C: ; 0x021EDD2C + push {r3, lr} + bl ov5_021EDD04 + ldr r0, [r0, #4] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDD2C + + thumb_func_start ov5_021EDD38 +ov5_021EDD38: ; 0x021EDD38 + push {r3, lr} + bl ov5_021EDD04 + ldr r0, [r0, #8] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDD38 + + thumb_func_start ov5_021EDD44 +ov5_021EDD44: ; 0x021EDD44 + push {r3, lr} + bl ov5_021EDD04 + ldr r0, [r0, #0xc] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDD44 + + thumb_func_start ov5_021EDD50 +ov5_021EDD50: ; 0x021EDD50 + push {r3, lr} + bl ov5_021EDD2C + ldr r3, _021EDD70 ; =0x021FAF40 + ldr r1, _021EDD74 ; =0x0000FFFF +_021EDD5A: + ldr r2, [r3, #0] + cmp r2, r0 + bne _021EDD64 + mov r0, #0 + pop {r3, pc} +_021EDD64: + add r3, r3, #4 + ldr r2, [r3, #0] + cmp r2, r1 + bne _021EDD5A + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 +_021EDD70: .word 0x021FAF40 +_021EDD74: .word 0x0000FFFF + thumb_func_end ov5_021EDD50 + + thumb_func_start ov5_021EDD78 +ov5_021EDD78: ; 0x021EDD78 + push {r3, lr} + cmp r1, #1 + bne _021EDD88 + mov r1, #1 + lsl r1, r1, #0x16 + bl sub_020628BC + pop {r3, pc} +_021EDD88: + mov r1, #1 + lsl r1, r1, #0x16 + bl sub_020628C4 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDD78 + + thumb_func_start ov5_021EDD94 +ov5_021EDD94: ; 0x021EDD94 + push {r3, lr} + mov r1, #1 + lsl r1, r1, #0x16 + bl sub_020628D0 + cmp r0, #0 + beq _021EDDA6 + mov r0, #1 + pop {r3, pc} +_021EDDA6: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDD94 + + thumb_func_start ov5_021EDDAC +ov5_021EDDAC: ; 0x021EDDAC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #4 + add r4, r1, #0 + str r0, [sp, #4] + add r0, sp, #0 + str r4, [sp] + bl sub_02020C44 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021EDC84 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDC94 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EDDAC + + thumb_func_start ov5_021EDDD4 +ov5_021EDDD4: ; 0x021EDDD4 + ldr r3, _021EDDD8 ; =sub_02020CCC + bx r3 + ; .align 2, 0 +_021EDDD8: .word sub_02020CCC + thumb_func_end ov5_021EDDD4 + + thumb_func_start ov5_021EDDDC +ov5_021EDDDC: ; 0x021EDDDC + push {r3, r4, r5, lr} + sub sp, #0x20 + str r0, [sp] + str r1, [sp, #4] + add r4, r3, #0 + ldmia r2!, {r0, r1} + add r3, sp, #8 + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + add r2, sp, #0x14 + str r0, [r3, #0] + ldr r3, _021EDE38 ; =0x021FF4B4 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, sp, #0 + bl sub_0202119C + add r5, r0, #0 + beq _021EDE32 + mov r1, #0 + bl sub_02021320 + add r0, r5, #0 + mov r1, #0 + bl sub_02021344 + add r0, r5, #0 + mov r1, #0 + bl sub_020213A4 + add r0, r5, #0 + bl sub_020213F4 + add r1, r4, #0 + bl sub_020B37A4 + add r0, r5, #0 + bl sub_020213F4 + bl ov5_021D53A4 +_021EDE32: + add r0, r5, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021EDE38: .word 0x021FF4B4 + thumb_func_end ov5_021EDDDC + + thumb_func_start ov5_021EDE3C +ov5_021EDE3C: ; 0x021EDE3C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r4, r2, #0 + bl ov5_021EDD2C + add r1, r0, #0 + add r0, r6, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl ov5_021F075C + str r0, [r4, #0] + add r0, r5, #0 + bl ov5_021EDD38 + add r1, r0, #0 + add r0, r6, #0 + add r0, #0xfc + ldr r0, [r0, #0] + bl ov5_021F075C + add r1, r4, #0 + add r1, #0xc + bl sub_02024184 + add r0, r6, #0 + bl ov5_021EDCB0 + add r1, r5, #0 + bl sub_02022D98 + add r6, r0, #0 + bl sub_02022DF4 + str r0, [r4, #4] + add r0, r6, #0 + bl sub_02022EF4 + str r0, [r4, #0x1c] + add r0, r6, #0 + bl sub_02022F04 + str r0, [r4, #0x20] + add r0, r6, #0 + bl sub_02022F14 + str r0, [r4, #0x24] + add r0, r5, #0 + bl ov5_021EDD44 + str r0, [r4, #8] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EDE3C + + thumb_func_start ov5_021EDEA8 +ov5_021EDEA8: ; 0x021EDEA8 + push {r3, lr} + bl sub_02062A40 + bl sub_0206285C + pop {r3, pc} + thumb_func_end ov5_021EDEA8 + + thumb_func_start ov5_021EDEB4 +ov5_021EDEB4: ; 0x021EDEB4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl ov5_021ECDA0 + mov r0, #6 + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_020212A8 + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021EDEB4 + + thumb_func_start ov5_021EDED8 +ov5_021EDED8: ; 0x021EDED8 + push {r4, r5, r6, lr} + mov r4, #1 + add r6, r1, #0 + lsl r1, r4, #9 + add r5, r0, #0 + bl sub_020628D8 + cmp r0, #1 + bne _021EDEEC + mov r4, #0 +_021EDEEC: + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #1 + bne _021EDF0A + mov r1, #2 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #0 + bne _021EDF0A + mov r4, #0 +_021EDF0A: + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + bl sub_02021320 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDED8 + + thumb_func_start ov5_021EDF18 +ov5_021EDF18: ; 0x021EDF18 + lsl r1, r0, #2 + ldr r0, _021EDF20 ; =0x021FF4C0 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_021EDF20: .word 0x021FF4C0 + thumb_func_end ov5_021EDF18 + + thumb_func_start ov5_021EDF24 +ov5_021EDF24: ; 0x021EDF24 + lsl r1, r0, #2 + ldr r0, _021EDF2C ; =0x021FF4D0 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_021EDF2C: .word 0x021FF4D0 + thumb_func_end ov5_021EDF24 + + thumb_func_start ov5_021EDF30 +ov5_021EDF30: ; 0x021EDF30 + lsl r1, r0, #2 + ldr r0, _021EDF38 ; =0x021FF4E0 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_021EDF38: .word 0x021FF4E0 + thumb_func_end ov5_021EDF30 + + thumb_func_start ov5_021EDF3C +ov5_021EDF3C: ; 0x021EDF3C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + ldr r4, [r5, r0] + mov r0, #4 + add r6, r1, #0 + ldrsh r1, [r4, r0] + mov r0, #2 + ldrsh r0, [r4, r0] + add r7, r2, #0 + str r3, [sp] + cmp r1, r0 + bge _021EDF66 + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + bl sub_02020D50 + cmp r0, #1 + bne _021EDF98 +_021EDF66: + mov r2, #0 + ldrsh r3, [r4, r2] + ldr r0, [r4, #0xc] + cmp r3, #0 + ble _021EDF90 +_021EDF70: + ldr r1, [r0, #0xc] + cmp r1, #0 + bne _021EDF88 + add r5, #0xf0 + ldr r1, [r5, #0] + str r1, [r0, #0xc] + ldr r1, [sp] + str r1, [r0, #8] + str r6, [r0, #4] + str r7, [r0, #0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EDF88: + add r2, r2, #1 + add r0, #0x10 + cmp r2, r3 + blt _021EDF70 +_021EDF90: + bl sub_02022974 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EDF98: + add r0, r5, #0 + add r1, r7, #0 + mov r2, #0 + bl ov5_021EDCF4 + add r2, r0, #0 + ldr r3, [sp] + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021EE0E8 + mov r0, #4 + ldrsh r0, [r4, r0] + add r0, r0, #1 + strh r0, [r4, #4] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EDF3C + + thumb_func_start ov5_021EDFBC +ov5_021EDFBC: ; 0x021EDFBC + push {r3, r4} + mov r2, #1 + lsl r2, r2, #8 + ldr r0, [r0, r2] + mov r3, #0 + ldrsh r4, [r0, r3] + ldr r2, [r0, #0xc] + cmp r4, #0 + ble _021EDFEA +_021EDFCE: + ldr r0, [r2, #4] + cmp r0, r1 + bne _021EDFE2 + ldr r0, [r2, #0xc] + cmp r0, #0 + beq _021EDFE2 + mov r0, #0 + str r0, [r2, #0xc] + pop {r3, r4} + bx lr +_021EDFE2: + add r3, r3, #1 + add r2, #0x10 + cmp r3, r4 + blt _021EDFCE +_021EDFEA: + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDFBC + + thumb_func_start ov5_021EDFF0 +ov5_021EDFF0: ; 0x021EDFF0 + push {r3, r4} + mov r2, #1 + lsl r2, r2, #8 + ldr r0, [r0, r2] + mov r3, #0 + ldrsh r4, [r0, r3] + ldr r2, [r0, #0xc] + cmp r4, #0 + ble _021EE028 +_021EE002: + ldr r0, [r2, #4] + cmp r0, r1 + bne _021EE020 + ldr r0, [r2, #0xc] + cmp r0, #0 + beq _021EE020 + ldr r0, [r2, #8] + cmp r0, #0 + bne _021EE01A + mov r0, #3 + pop {r3, r4} + bx lr +_021EE01A: + mov r0, #4 + pop {r3, r4} + bx lr +_021EE020: + add r3, r3, #1 + add r2, #0x10 + cmp r3, r4 + blt _021EE002 +_021EE028: + mov r0, #0 + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EDFF0 + + thumb_func_start ov5_021EE030 +ov5_021EE030: ; 0x021EE030 + push {r3, r4, r5, r6, r7, lr} + str r1, [sp] + mov r1, #1 + ldr r0, [sp] + lsl r1, r1, #8 + ldr r4, [r0, r1] + add r0, #0xe0 + ldr r0, [r0, #0] + mov r6, #0 + ldr r5, [r4, #0xc] + bl sub_02020D50 + cmp r0, #1 + beq _021EE0E4 + add r7, r4, #4 + b _021EE07A +_021EE050: + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _021EE076 + ldr r0, [sp] + ldr r1, [r5, #0] + mov r2, #0 + bl ov5_021EDCF4 + add r2, r0, #0 + ldr r0, [sp] + ldr r1, [r5, #4] + ldr r3, [r5, #8] + bl ov5_021EE0E8 + mov r0, #0 + str r0, [r5, #0xc] + ldrsh r0, [r7, r0] + add r0, r0, #1 + strh r0, [r7] +_021EE076: + add r5, #0x10 + add r6, r6, #1 +_021EE07A: + mov r0, #4 + ldrsh r1, [r4, r0] + mov r0, #2 + ldrsh r0, [r4, r0] + cmp r1, r0 + bge _021EE08E + mov r0, #0 + ldrsh r0, [r4, r0] + cmp r6, r0 + blt _021EE050 +_021EE08E: + mov r6, #0 + ldrsh r0, [r4, r6] + ldr r7, [r4, #0xc] + sub r1, r0, #1 + cmp r1, #0 + ble _021EE0E0 + add r5, r7, #0 +_021EE09C: + ldr r1, [r5, #0xc] + cmp r1, #0 + bne _021EE0D2 + add r2, r6, #1 + cmp r2, r0 + bge _021EE0D2 + lsl r1, r2, #4 + add r3, r7, r1 +_021EE0AC: + ldr r1, [r3, #0xc] + cmp r1, #0 + beq _021EE0CA + lsl r0, r2, #4 + add r3, r7, r0 + mov ip, r3 + add r2, r5, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r1, #0 + mov r0, ip + str r1, [r0, #0xc] + b _021EE0D2 +_021EE0CA: + add r2, r2, #1 + add r3, #0x10 + cmp r2, r0 + blt _021EE0AC +_021EE0D2: + mov r0, #0 + ldrsh r0, [r4, r0] + add r6, r6, #1 + add r5, #0x10 + sub r1, r0, #1 + cmp r6, r1 + blt _021EE09C +_021EE0E0: + mov r0, #0 + strh r0, [r4, #4] +_021EE0E4: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE030 + + thumb_func_start ov5_021EE0E8 +ov5_021EE0E8: ; 0x021EE0E8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + mov r0, #4 + str r0, [sp] + add r0, r5, #0 + add r0, #0xf0 + add r4, r1, #0 + add r6, r3, #0 + add r1, r2, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + mov r3, #1 + bl sub_02022C9C + cmp r0, #0 + bne _021EE10E + bl sub_02022974 +_021EE10E: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EE134 + cmp r6, #0 + bne _021EE126 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED7E4 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_021EE126: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021ED858 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE0E8 + + thumb_func_start ov5_021EE134 +ov5_021EE134: ; 0x021EE134 + push {r4, r5, r6, lr} + mov r3, #1 + lsl r3, r3, #8 + ldr r3, [r0, r3] + mov r5, #1 + ldr r4, [r3, #0x10] + mov r2, #0 + strh r5, [r3, #6] + ldrsh r6, [r3, r2] + cmp r6, #0 + ble _021EE168 +_021EE14A: + ldr r5, [r4, #8] + cmp r5, #0 + bne _021EE160 + add r0, #0xf0 + ldr r0, [r0, #0] + str r0, [r4, #8] + str r1, [r4, #4] + mov r0, #0 + str r0, [r4, #0] + strh r0, [r3, #6] + pop {r4, r5, r6, pc} +_021EE160: + add r2, r2, #1 + add r4, #0xc + cmp r2, r6 + blt _021EE14A +_021EE168: + bl sub_02022974 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE134 + + thumb_func_start ov5_021EE170 +ov5_021EE170: ; 0x021EE170 + push {r4, r5} + mov r2, #1 + lsl r2, r2, #8 + ldr r2, [r0, r2] + mov r0, #1 + ldr r4, [r2, #0x10] + mov r3, #0 + strh r0, [r2, #6] + ldrsh r5, [r2, r3] + cmp r5, #0 + ble _021EE1A2 +_021EE186: + ldr r0, [r4, #8] + cmp r0, #0 + beq _021EE19A + ldr r0, [r4, #4] + cmp r0, r1 + bne _021EE19A + mov r0, #0 + str r0, [r4, #8] + str r0, [r4, #0] + b _021EE1A2 +_021EE19A: + add r3, r3, #1 + add r4, #0xc + cmp r3, r5 + blt _021EE186 +_021EE1A2: + mov r0, #0 + strh r0, [r2, #6] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EE170 + + thumb_func_start ov5_021EE1AC +ov5_021EE1AC: ; 0x021EE1AC + push {r3, r4, r5, r6, r7, lr} + mov r0, #1 + lsl r0, r0, #8 + ldr r6, [r1, r0] + ldrh r0, [r6, #6] + cmp r0, #1 + beq _021EE1E6 + mov r4, #0 + ldrsh r0, [r6, r4] + ldr r5, [r6, #0x10] + cmp r0, #0 + ble _021EE1E6 + mov r7, #1 +_021EE1C6: + ldr r0, [r5, #0] + cmp r0, #0 + bne _021EE1DA + ldr r0, [r5, #8] + cmp r0, #0 + beq _021EE1DA + ldr r1, [r5, #4] + bl sub_02022E38 + str r7, [r5, #0] +_021EE1DA: + mov r0, #0 + ldrsh r0, [r6, r0] + add r4, r4, #1 + add r5, #0xc + cmp r4, r0 + blt _021EE1C6 +_021EE1E6: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EE1AC + + thumb_func_start ov5_021EE1E8 +ov5_021EE1E8: ; 0x021EE1E8 + push {r3, r4, r5, r6, r7, lr} + mov r0, #1 + lsl r0, r0, #8 + ldr r6, [r1, r0] + mov r4, #0 + ldr r5, [r6, #0x10] + mov r0, #1 + strh r0, [r6, #6] + ldrsh r0, [r6, r4] + cmp r0, #0 + ble _021EE222 + add r7, r4, #0 +_021EE200: + ldr r0, [r5, #0] + cmp r0, #1 + bne _021EE216 + ldr r0, [r5, #8] + cmp r0, #0 + beq _021EE216 + ldr r1, [r5, #4] + bl sub_02022EA0 + str r7, [r5, #0] + str r7, [r5, #8] +_021EE216: + mov r0, #0 + ldrsh r0, [r6, r0] + add r4, r4, #1 + add r5, #0xc + cmp r4, r0 + blt _021EE200 +_021EE222: + mov r0, #0 + strh r0, [r6, #6] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EE1E8 + + thumb_func_start ov5_021EE228 +ov5_021EE228: ; 0x021EE228 + push {r4, r5, r6, lr} + mov r5, #1 + lsl r5, r5, #8 + ldr r5, [r0, r5] + mov r4, #0 + ldrsh r6, [r5, r4] + ldr r0, [r5, #8] + cmp r6, #0 + ble _021EE25E +_021EE23A: + ldr r5, [r0, #4] + cmp r5, #0 + bne _021EE256 + str r1, [r0, #4] + str r2, [r0, #8] + str r3, [r0, #0] + ldr r0, [r0, #8] + mov r2, #0 + str r2, [r0, #0] + add r0, r1, #0 + mov r1, #1 + bl ov5_021EDD78 + pop {r4, r5, r6, pc} +_021EE256: + add r4, r4, #1 + add r0, #0xc + cmp r4, r6 + blt _021EE23A +_021EE25E: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EE228 + + thumb_func_start ov5_021EE264 +ov5_021EE264: ; 0x021EE264 + push {r3, r4} + mov r2, #1 + lsl r2, r2, #8 + ldr r0, [r0, r2] + mov r3, #0 + ldrsh r4, [r0, r3] + ldr r2, [r0, #8] + cmp r4, #0 + ble _021EE28E +_021EE276: + ldr r0, [r2, #4] + cmp r0, r1 + bne _021EE286 + mov r0, #0 + str r0, [r2, #4] + str r0, [r2, #8] + pop {r3, r4} + bx lr +_021EE286: + add r3, r3, #1 + add r2, #0xc + cmp r3, r4 + blt _021EE276 +_021EE28E: + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EE264 + + thumb_func_start ov5_021EE294 +ov5_021EE294: ; 0x021EE294 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + ldr r6, [r7, r0] + mov r4, #0 + ldrsh r0, [r6, r4] + ldr r5, [r6, #8] + cmp r0, #0 + ble _021EE2C2 +_021EE2A8: + ldr r0, [r5, #4] + cmp r0, #0 + beq _021EE2B6 + add r0, r7, #0 + add r1, r5, #0 + bl ov5_021EE2D0 +_021EE2B6: + mov r0, #0 + ldrsh r0, [r6, r0] + add r4, r4, #1 + add r5, #0xc + cmp r4, r0 + blt _021EE2A8 +_021EE2C2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EE294 + + thumb_func_start ov5_021EE2C4 +ov5_021EE2C4: ; 0x021EE2C4 + ldr r3, _021EE2CC ; =ov5_021EE294 + add r0, r1, #0 + bx r3 + nop +_021EE2CC: .word ov5_021EE294 + thumb_func_end ov5_021EE2C4 + + thumb_func_start ov5_021EE2D0 +ov5_021EE2D0: ; 0x021EE2D0 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + bl ov5_021ED94C + cmp r0, #2 + beq _021EE31E + ldr r0, [r4, #4] + ldr r1, [r4, #0] + bl ov5_021ECF1C + ldr r1, [r4, #8] + str r0, [r1, #0] + ldr r0, [r4, #8] + ldr r0, [r0, #0] + cmp r0, #0 + bne _021EE2F6 + bl sub_02022974 +_021EE2F6: + ldr r0, [r4, #4] + mov r1, #0 + bl ov5_021EDD78 + mov r1, #2 + ldr r0, [r4, #4] + lsl r1, r1, #0x14 + bl sub_020628D8 + cmp r0, #1 + ldr r0, [r4, #4] + bne _021EE314 + bl sub_02062BA4 + b _021EE318 +_021EE314: + bl sub_02062B68 +_021EE318: + mov r0, #0 + str r0, [r4, #4] + str r0, [r4, #8] +_021EE31E: + pop {r4, pc} + thumb_func_end ov5_021EE2D0 + + thumb_func_start ov5_021EE320 +ov5_021EE320: ; 0x021EE320 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r1, #0 + add r5, r0, #0 + mov r0, #0xc + add r7, r6, #0 + mul r7, r0 + lsl r0, r6, #4 + lsl r1, r7, #1 + str r0, [sp, #4] + add r0, r1, r0 + str r0, [sp, #8] + add r0, #0x28 + str r0, [sp, #8] + ldr r1, [sp, #8] + mov r0, #4 + str r2, [sp] + bl sub_02018144 + add r4, r0, #0 + bne _021EE34E + bl sub_02022974 +_021EE34E: + ldr r2, [sp, #8] + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + ldr r0, [sp] + strh r6, [r4] + strh r0, [r4, #2] + add r0, r4, #0 + add r0, #0x28 + str r0, [r4, #8] + add r1, r0, r7 + ldr r0, [sp, #4] + str r1, [r4, #0xc] + add r0, r1, r0 + str r0, [r4, #0x10] + mov r0, #1 + lsl r0, r0, #8 + str r4, [r5, r0] + add r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02062858 + add r6, r0, #0 + ldr r0, _021EE3B4 ; =ov5_021EE030 + add r1, r5, #0 + add r2, r6, #1 + bl sub_0200D9E8 + str r0, [r4, #0x18] + ldr r0, _021EE3B8 ; =ov5_021EE2C4 + add r1, r5, #0 + add r2, r6, #2 + bl sub_0200D9E8 + str r0, [r4, #0x1c] + ldr r0, _021EE3BC ; =ov5_021EE1AC + add r1, r5, #0 + mov r2, #0xff + bl sub_0200DA04 + str r0, [r4, #0x20] + ldr r0, _021EE3C0 ; =ov5_021EE1E8 + add r1, r5, #0 + mov r2, #0xff + bl sub_0200DA3C + str r0, [r4, #0x24] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021EE3B4: .word ov5_021EE030 +_021EE3B8: .word ov5_021EE2C4 +_021EE3BC: .word ov5_021EE1AC +_021EE3C0: .word ov5_021EE1E8 + thumb_func_end ov5_021EE320 + + thumb_func_start ov5_021EE3C4 +ov5_021EE3C4: ; 0x021EE3C4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + ldr r4, [r5, r0] + mov r0, #1 + strh r0, [r4, #6] + ldr r0, [r4, #0x18] + bl sub_0200DA58 + ldr r0, [r4, #0x1c] + bl sub_0200DA58 + ldr r0, [r4, #0x20] + bl sub_0200DA58 + ldr r0, [r4, #0x24] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + mov r1, #0 + lsl r0, r0, #8 + str r1, [r5, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE3C4 + + thumb_func_start ov5_021EE3FC +ov5_021EE3FC: ; 0x021EE3FC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021EDD94 + cmp r0, #1 + beq _021EE418 + add r0, r5, #0 + bl ov5_021EB1A0 + cmp r0, #0 + bne _021EE444 +_021EE418: + add r0, r5, #0 + bl sub_02062920 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02062A40 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02061B48 + add r0, r7, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov5_021EDBC4 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02061AB4 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EE444: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov5_021EE454 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE3FC + + thumb_func_start ov5_021EE454 +ov5_021EE454: ; 0x021EE454 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r7, r0, #0 + str r1, [sp, #8] + str r2, [sp, #0xc] + str r3, [sp, #0x10] + bl ov5_021EDEA8 + str r0, [sp, #0x20] + bl ov5_021EDC8C + str r0, [sp, #0x1c] + add r0, r7, #0 + bl ov5_021EB1A0 + str r0, [sp, #0x18] + mov r0, #4 + mov r1, #0x60 + bl sub_02018184 + mov r1, #0 + mov r2, #0x60 + add r5, r0, #0 + bl sub_020D5124 + ldr r0, [sp, #8] + str r0, [r5, #0] + add r0, r7, #0 + str r7, [r5, #0x50] + bl sub_02062920 + add r6, r0, #0 + bl ov5_021EDD2C + ldr r4, _021EE684 ; =0x021FB484 + ldr r2, _021EE688 ; =0x0000FFFF +_021EE49C: + ldr r1, [r4, #0] + cmp r1, r0 + beq _021EE4AA + add r4, #8 + ldr r1, [r4, #0] + cmp r1, r2 + bne _021EE49C +_021EE4AA: + ldr r0, _021EE688 ; =0x0000FFFF + cmp r1, r0 + bne _021EE4B4 + bl sub_02022974 +_021EE4B4: + ldr r0, [sp, #0x20] + ldr r1, [r4, #4] + mov r2, #0 + bl ov5_021EDCF4 + str r0, [r5, #8] + add r0, r6, #0 + bl ov5_021EDD38 + ldr r4, _021EE68C ; =0x021FB5BC + ldr r2, _021EE688 ; =0x0000FFFF +_021EE4CA: + ldr r1, [r4, #0] + cmp r1, r0 + beq _021EE4D8 + add r4, #8 + ldr r1, [r4, #0] + cmp r1, r2 + bne _021EE4CA +_021EE4D8: + ldr r0, _021EE688 ; =0x0000FFFF + cmp r1, r0 + bne _021EE4E2 + bl sub_02022974 +_021EE4E2: + ldr r0, [sp, #0x20] + ldr r1, [r4, #4] + mov r2, #0 + bl ov5_021EDCF4 + add r1, r5, #0 + add r1, #0x14 + str r0, [r5, #0xc] + bl sub_02024184 + ldr r4, _021EE690 ; =0x021FC9B4 + ldr r0, _021EE688 ; =0x0000FFFF +_021EE4FA: + ldr r1, [r4, #0] + cmp r1, r6 + beq _021EE508 + add r4, #8 + ldr r1, [r4, #0] + cmp r1, r0 + bne _021EE4FA +_021EE508: + ldr r0, _021EE688 ; =0x0000FFFF + cmp r1, r0 + bne _021EE512 + bl sub_02022974 +_021EE512: + ldr r0, [sp, #0x20] + ldr r1, [r4, #4] + mov r2, #0 + bl ov5_021EDCF4 + str r0, [r5, #0x10] + bl sub_020B3C1C + add r4, r0, #0 + add r0, r6, #0 + bl ov5_021EDD44 + add r3, r0, #0 + add r0, r5, #0 + add r0, #0x14 + str r0, [sp] + add r0, r5, #0 + ldr r1, [r5, #8] + add r0, #0x28 + add r2, r4, #0 + bl sub_02021284 + ldr r0, [sp, #0x18] + bl sub_020212C0 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x34 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r6, #0 + bl ov5_021EDD50 + add r3, r0, #0 + add r1, r5, #0 + ldr r0, [sp, #0x1c] + add r1, #0x28 + add r2, sp, #0x34 + bl ov5_021EDDDC + str r0, [r5, #0x24] + cmp r0, #0 + bne _021EE56E + bl sub_02022974 +_021EE56E: + ldr r0, [r5, #0x24] + str r0, [sp, #0x24] + ldr r0, [sp, #0x18] + bl sub_02021310 + add r1, r0, #0 + ldr r0, [r5, #0x24] + bl sub_020212FC + ldr r0, [sp, #0x18] + bl sub_02021358 + add r1, r0, #0 + ldr r0, [r5, #0x24] + bl sub_02021344 + ldr r0, [sp, #0x18] + bl sub_020213D4 + add r1, r0, #0 + ldr r0, [r5, #0x24] + bl sub_020213A4 + ldr r0, [sp, #0x18] + bl sub_02021394 + add r1, r0, #0 + ldr r0, [r5, #0x24] + bl sub_02021380 + ldr r0, [r5, #0x24] + mov r1, #0 + bl sub_02021368 + ldr r0, [r5, #0x24] + mov r1, #1 + bl sub_02021320 + ldr r0, [r5, #0x24] + bl sub_02021414 + add r0, r7, #0 + bl sub_02062F64 + cmp r0, #1 + bne _021EE620 + add r0, r7, #0 + mov r1, #2 + bl sub_02062758 + str r0, [sp, #0x14] + add r0, r7, #0 + mov r1, #1 + bl sub_02064238 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + add r0, r4, #0 + bl sub_0205DF9C + cmp r0, #1 + bne _021EE5EE + mov r4, #2 + b _021EE5FE +_021EE5EE: + add r0, r4, #0 + bl sub_0205DE5C + cmp r0, #1 + bne _021EE5FC + mov r4, #0 + b _021EE5FE +_021EE5FC: + mov r4, #1 +_021EE5FE: + add r0, r7, #0 + add r1, sp, #0x28 + bl sub_02063050 + add r0, r7, #0 + bl ov5_021DF578 + ldr r1, [sp, #0x14] + str r4, [sp] + str r1, [sp, #4] + add r1, r5, #0 + ldr r2, [r5, #0x24] + add r1, #0x28 + add r3, sp, #0x28 + bl ov5_021F1BA4 + str r0, [r5, #0x54] +_021EE620: + add r0, r7, #0 + bl sub_02061B48 + mov r1, #0x41 + ldr r0, [sp, #0x20] + lsl r1, r1, #2 + ldr r0, [r0, r1] + add r1, r6, #0 + add r2, r7, #0 + bl ov5_021EDBC4 + ldr r1, [sp, #8] + add r0, r7, #0 + bl sub_02061AB4 + mov r1, #0x41 + ldr r0, [sp, #0x20] + lsl r1, r1, #2 + ldr r0, [r0, r1] + bl sub_02062858 + ldr r0, _021EE694 ; =ov5_021EE698 + add r1, r5, #0 + mov r2, #0xff + bl sub_0200DA3C + add r4, r0, #0 + bne _021EE65C + bl sub_02022974 +_021EE65C: + add r0, r4, #0 + add r1, r5, #0 + bl ov5_021EE698 + ldr r0, [r5, #0x24] + bl sub_02021404 + cmp r0, #0 + bne _021EE674 + mov r0, #0 + str r0, [sp, #0x24] + b _021EE67C +_021EE674: + ldr r0, [sp, #0x10] + str r0, [r5, #0x58] + ldr r0, [sp, #0xc] + str r0, [r5, #0x5c] +_021EE67C: + ldr r0, [sp, #0x24] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EE684: .word 0x021FB484 +_021EE688: .word 0x0000FFFF +_021EE68C: .word 0x021FB5BC +_021EE690: .word 0x021FC9B4 +_021EE694: .word ov5_021EE698 + thumb_func_end ov5_021EE454 + + thumb_func_start ov5_021EE698 +ov5_021EE698: ; 0x021EE698 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #4 + ldrsh r0, [r5, r0] + ldr r4, [r5, #0x50] + cmp r0, #0 + beq _021EE6AE + cmp r0, #1 + beq _021EE714 + pop {r4, r5, r6, pc} +_021EE6AE: + add r0, r4, #0 + bl sub_02062CF8 + cmp r0, #0 + beq _021EE6C2 + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #0 + bne _021EE6FE +_021EE6C2: + ldr r2, [r5, #0x5c] + cmp r2, #0 + beq _021EE6CE + ldr r0, [r5, #0x58] + ldr r1, [r5, #0x24] + blx r2 +_021EE6CE: + ldr r0, [r5, #0x54] + cmp r0, #0 + beq _021EE6D8 + bl sub_0207136C +_021EE6D8: + ldr r0, [r5, #0x24] + bl sub_020211FC + ldr r0, [r5, #8] + bl sub_020181C4 + ldr r0, [r5, #0xc] + bl sub_020181C4 + ldr r0, [r5, #0x10] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 + pop {r4, r5, r6, pc} +_021EE6FE: + add r0, r4, #0 + bl sub_02062920 + ldr r1, [r5, #0] + cmp r1, r0 + beq _021EE758 + mov r0, #4 + ldrsh r0, [r5, r0] + add r0, r0, #1 + strh r0, [r5, #4] + pop {r4, r5, r6, pc} +_021EE714: + add r0, r4, #0 + bl ov5_021EDD94 + cmp r0, #0 + bne _021EE758 + ldr r2, [r5, #0x5c] + cmp r2, #0 + beq _021EE72A + ldr r0, [r5, #0x58] + ldr r1, [r5, #0x24] + blx r2 +_021EE72A: + ldr r0, [r5, #0x54] + cmp r0, #0 + beq _021EE734 + bl sub_0207136C +_021EE734: + ldr r0, [r5, #0x24] + bl sub_020211FC + ldr r0, [r5, #8] + bl sub_020181C4 + ldr r0, [r5, #0xc] + bl sub_020181C4 + ldr r0, [r5, #0x10] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_0200DA58 +_021EE758: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE698 + + .rodata + + + .global Unk_ov5_021FF4B4 +Unk_ov5_021FF4B4: ; 0x021FF4B4 + .incbin "incbin/overlay5_rodata.bin", 0x6BA0, 0x6BAC - 0x6BA0 + + .global Unk_ov5_021FF4C0 +Unk_ov5_021FF4C0: ; 0x021FF4C0 + .incbin "incbin/overlay5_rodata.bin", 0x6BAC, 0x6BBC - 0x6BAC + + .global Unk_ov5_021FF4D0 +Unk_ov5_021FF4D0: ; 0x021FF4D0 + .incbin "incbin/overlay5_rodata.bin", 0x6BBC, 0x6BCC - 0x6BBC + + .global Unk_ov5_021FF4E0 +Unk_ov5_021FF4E0: ; 0x021FF4E0 + .incbin "incbin/overlay5_rodata.bin", 0x6BCC, 0x10 + diff --git a/asm/ov5_021EE75C.s b/asm/ov5_021EE75C.s new file mode 100644 index 000000000..7dd53afc1 --- /dev/null +++ b/asm/ov5_021EE75C.s @@ -0,0 +1,87 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EE75C +ov5_021EE75C: ; 0x021EE75C + mov r0, #0 + str r0, [r2, #0] + str r0, [r2, #4] + bx lr + thumb_func_end ov5_021EE75C + + thumb_func_start ov5_021EE764 +ov5_021EE764: ; 0x021EE764 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EE764 + + thumb_func_start ov5_021EE768 +ov5_021EE768: ; 0x021EE768 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r0, [r5, #0x3c] + add r4, r2, #0 + bl sub_0205EABC + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r7, r0, #0 + ldr r0, [r4, #0] + cmp r0, r6 + bne _021EE78A + ldr r0, [r4, #4] + cmp r0, r7 + beq _021EE7BC +_021EE78A: + str r6, [r4, #0] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + str r7, [r4, #4] + bl sub_02054F94 + add r4, r0, #0 + bl sub_0205DD84 + cmp r0, #0 + beq _021EE7A6 + mov r2, #0 + b _021EE7B2 +_021EE7A6: + add r0, r4, #0 + bl sub_0205DD78 + cmp r0, #0 + beq _021EE7BC + mov r2, #1 +_021EE7B2: + add r0, r6, #0 + add r1, r7, #0 + add r3, r5, #0 + bl ov5_021D4D78 +_021EE7BC: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE768 + + thumb_func_start ov5_021EE7C0 +ov5_021EE7C0: ; 0x021EE7C0 + ldr r0, [r0, #4] + ldr r3, _021EE7CC ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _021EE7D0 ; =0x021FF4F0 + bx r3 + nop +_021EE7CC: .word ov5_021D1B6C +_021EE7D0: .word 0x021FF4F0 + thumb_func_end ov5_021EE7C0 + + .rodata + + + .global Unk_ov5_021FF4F0 +Unk_ov5_021FF4F0: ; 0x021FF4F0 + .incbin "incbin/overlay5_rodata.bin", 0x6BDC, 0x18 + diff --git a/asm/ov5_021EE7D4.s b/asm/ov5_021EE7D4.s new file mode 100644 index 000000000..01ff1def3 --- /dev/null +++ b/asm/ov5_021EE7D4.s @@ -0,0 +1,376 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EE7D4 +ov5_021EE7D4: ; 0x021EE7D4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r1, #0 + add r2, r1, #0 + add r5, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r5, #0 + mov r1, #0x46 + mov r2, #0 + bl sub_02074470 + mov r1, #0xf + and r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0x47 + mov r2, #0 + bl sub_02074470 + mov r1, #0xf + and r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0x48 + mov r2, #0 + bl sub_02074470 + mov r1, #0xf + and r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x49 + mov r2, #0 + bl sub_02074470 + mov r1, #0xf + and r0, r1 + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + add r0, r5, #0 + mov r1, #0x4a + mov r2, #0 + bl sub_02074470 + mov r1, #0xf + and r0, r1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r5, #0 + mov r1, #0x4b + mov r2, #0 + bl sub_02074470 + mov r1, #0xf + and r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + eor r0, r6 + asr r1, r4, #8 + mul r0, r7 + eor r0, r1 + lsl r1, r4, #0x18 + lsr r3, r1, #0x18 + lsl r0, r0, #0x10 + ldr r2, [sp, #4] + ldr r1, [sp] + lsr r0, r0, #0x10 + eor r2, r1 + ldr r1, [sp, #8] + mul r2, r1 + add r1, r3, #0 + eor r1, r2 + lsl r1, r1, #0x10 + lsr r1, r1, #8 + add r0, r0, r1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021EE7D4 + + thumb_func_start ov5_021EE880 +ov5_021EE880: ; 0x021EE880 + ldr r2, _021EE8A4 ; =0x021FF508 + mov r3, #1 +_021EE884: + lsl r1, r3, #3 + add r1, r2, r1 + ldrh r1, [r1, #4] + cmp r0, r1 + bhs _021EE896 + sub r0, r3, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr +_021EE896: + add r1, r3, #1 + lsl r1, r1, #0x18 + lsr r3, r1, #0x18 + cmp r3, #0xf + blo _021EE884 + add r0, r3, #0 + bx lr + ; .align 2, 0 +_021EE8A4: .word 0x021FF508 + thumb_func_end ov5_021EE880 + + thumb_func_start ov5_021EE8A8 +ov5_021EE8A8: ; 0x021EE8A8 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r0, #4 + add r5, r1, #0 + bl sub_02098700 + add r4, r0, #0 + mov r1, #0 + mov r2, #4 + bl sub_0209872C + add r0, r4, #0 + add r1, r6, #0 + bl sub_02098808 + add r6, r0, #0 + add r0, r4, #0 + bl sub_020987BC + add r0, r4, #0 + bl sub_02098718 + add r0, r5, #0 + bl ov5_021EE880 + lsl r4, r0, #3 + ldr r0, _021EE914 ; =0x021FF50C + ldr r2, _021EE918 ; =0x021FF50A + ldrh r0, [r0, r4] + ldrh r2, [r2, r4] + asr r1, r5, #0x1f + mov r3, #0 + sub r0, r5, r0 + sbc r1, r3 + bl sub_020E1ED4 + add r2, r0, #0 + add r0, r6, #0 + ldr r6, _021EE91C ; =0x021FF508 + add r3, r1, #0 + mov r5, #0 + ldrh r4, [r6, r4] + add r1, r5, #0 + add r2, r4, r2 + adc r5, r3 + add r3, r5, #0 + bl sub_020E1F1C + mov r2, #0xa + mov r3, #0 + bl sub_020E1ED4 + pop {r4, r5, r6, pc} + nop +_021EE914: .word 0x021FF50C +_021EE918: .word 0x021FF50A +_021EE91C: .word 0x021FF508 + thumb_func_end ov5_021EE8A8 + + thumb_func_start ov5_021EE920 +ov5_021EE920: ; 0x021EE920 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0xc] + add r5, r1, #0 + bl sub_0207A268 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + str r0, [sp] + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + ldr r0, [sp] + bl ov5_021EE7D4 + add r1, sp, #4 + strh r0, [r1, #2] + ldrh r1, [r1, #2] + add r0, r5, #0 + bl ov5_021EE8A8 + add r6, r0, #0 + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206B0B4 + add r1, sp, #4 + strh r0, [r1] + ldrh r1, [r1] + add r0, r5, #0 + bl ov5_021EE8A8 + add r7, r0, #0 + mov r0, #0xfa + lsl r0, r0, #2 + mul r0, r6 + mov r1, #0xfe + bl sub_020E2178 + add r0, r0, #5 + mov r1, #0xa + bl sub_020E2178 + add r5, r0, #0 + mov r0, #0xfa + lsl r0, r0, #2 + mul r0, r7 + mov r1, #0xfe + bl sub_020E2178 + add r0, r0, #5 + mov r1, #0xa + bl sub_020E2178 + cmp r5, r0 + bne _021EE9A2 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EE9A2: + cmp r5, r0 + bls _021EE9B6 + ldr r2, [sp] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0206DC6C + add sp, #8 + mov r0, #2 + pop {r3, r4, r5, r6, r7, pc} +_021EE9B6: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EE920 + + thumb_func_start ov5_021EE9BC +ov5_021EE9BC: ; 0x021EE9BC + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + add r5, r1, #0 + bl sub_0207A268 + add r1, r5, #0 + bl sub_0207A0FC + bl ov5_021EE7D4 + add r1, sp, #0 + strh r0, [r1] + ldr r0, [r4, #0xc] + bl sub_020507E4 + add r1, sp, #0 + ldrh r1, [r1] + bl sub_0206B0C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EE9BC + + thumb_func_start ov5_021EE9E8 +ov5_021EE9E8: ; 0x021EE9E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0xf + add r7, r2, #0 + add r4, r3, #0 + bl sub_0203F098 + add r1, sp, #0x10 + add r5, r0, #0 + ldrh r1, [r1, #0x10] + add r0, r4, #0 + bl ov5_021EE8A8 + mov r1, #0xfa + lsl r1, r1, #2 + mul r1, r0 + add r0, r1, #0 + mov r1, #0xfe + bl sub_020E2178 + add r0, r0, #5 + mov r1, #0xa + bl sub_020E2178 + mov r1, #0xa + add r4, r0, #0 + bl sub_020E2178 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r1, r6, #0 + mov r3, #3 + bl sub_0200B60C + add r0, r4, #0 + mov r1, #0xa + bl sub_020E2178 + mov r0, #0 + add r2, r1, #0 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + ldr r0, [r5, #0] + add r1, r7, #0 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EE9E8 + + thumb_func_start ov5_021EEA54 +ov5_021EEA54: ; 0x021EEA54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_020507E4 + bl sub_0206B0B4 + add r1, sp, #4 + strh r0, [r1] + ldrh r0, [r1] + add r1, r4, #0 + add r2, r6, #0 + str r0, [sp] + add r0, r5, #0 + add r3, r7, #0 + bl ov5_021EE9E8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EEA54 + + thumb_func_start ov5_021EEA84 +ov5_021EEA84: ; 0x021EEA84 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + str r2, [sp, #4] + ldr r0, [r5, #0xc] + add r4, r3, #0 + add r7, r1, #0 + bl sub_0207A268 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r6, #0 + bl ov5_021EE7D4 + add r1, sp, #8 + strh r0, [r1] + ldrh r0, [r1] + add r1, r7, #0 + add r3, r4, #0 + str r0, [sp] + ldr r2, [sp, #4] + add r0, r5, #0 + bl ov5_021EE9E8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021EEA84 + + .rodata + + + .global Unk_ov5_021FF508 +Unk_ov5_021FF508: ; 0x021FF508 + .incbin "incbin/overlay5_rodata.bin", 0x6BF4, 0x80 + diff --git a/asm/ov5_021EEAC8.s b/asm/ov5_021EEAC8.s new file mode 100644 index 000000000..fbb029b99 --- /dev/null +++ b/asm/ov5_021EEAC8.s @@ -0,0 +1,249 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EEAC8 +ov5_021EEAC8: ; 0x021EEAC8 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #4 + mov r1, #0x24 + bl sub_02018144 + mov r1, #0 + mov r2, #0x24 + add r6, r0, #0 + bl sub_020D5124 + mov r0, #1 + strh r0, [r6] + cmp r7, #0 + beq _021EEAEA + mov r0, #2 + strh r0, [r6, #2] +_021EEAEA: + mov r4, #0 +_021EEAEC: + lsl r0, r4, #2 + add r5, r6, r0 + mov r0, #0xf + lsl r0, r0, #0xc + add r1, r4, #0 + mul r1, r0 + ldr r0, _021EEB44 ; =0x02202128 + add r0, r0, r1 + str r0, [r5, #4] + bne _021EEB04 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EEB04: + cmp r7, #0 + beq _021EEB22 + mov r1, #9 + mov r0, #4 + lsl r1, r1, #0xc + bl sub_02018144 + str r0, [r5, #0x14] + cmp r0, #0 + bne _021EEB1C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EEB1C: + mov r2, #9 + lsl r2, r2, #0xc + b _021EEB28 +_021EEB22: + mov r0, #0 + str r0, [r5, #0x14] + add r2, r0, #0 +_021EEB28: + mov r1, #0xf + add r0, r4, #0 + lsl r1, r1, #0xc + add r3, r6, #0 + bl ov5_021EEB9C + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021EEAEC + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EEB44: .word 0x02202128 + thumb_func_end ov5_021EEAC8 + + thumb_func_start ov5_021EEB48 +ov5_021EEB48: ; 0x021EEB48 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_021EEB52: + ldrh r0, [r5] + cmp r0, #2 + bne _021EEB5E + ldr r0, [r4, #4] + bl sub_020181C4 +_021EEB5E: + str r7, [r4, #4] + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _021EEB74 + ldrh r1, [r5, #2] + cmp r1, #2 + bne _021EEB70 + bl sub_020181C4 +_021EEB70: + mov r0, #0 + str r0, [r4, #0x14] +_021EEB74: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _021EEB52 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EEB48 + + thumb_func_start ov5_021EEB84 +ov5_021EEB84: ; 0x021EEB84 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #4] + str r0, [r2, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EEB84 + + thumb_func_start ov5_021EEB90 +ov5_021EEB90: ; 0x021EEB90 + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x14] + str r0, [r2, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EEB90 + + thumb_func_start ov5_021EEB9C +ov5_021EEB9C: ; 0x021EEB9C + push {r3, r4, r5, r6, r7, lr} + add r5, r3, #0 + lsl r4, r0, #2 + add r0, r5, r4 + add r6, r1, #0 + add r7, r2, #0 + ldr r0, [r0, #4] + mov r1, #0 + add r2, r6, #0 + bl sub_020C4CF4 + add r0, r5, r4 + ldr r0, [r0, #0x14] + mov r1, #0 + add r2, r7, #0 + bl sub_020C4CF4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EEB9C + + thumb_func_start ov5_021EEBC0 +ov5_021EEBC0: ; 0x021EEBC0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #4 + mov r1, #0x24 + bl sub_02018144 + str r0, [sp] + mov r1, #0 + mov r2, #0x24 + bl sub_020D5124 + mov r1, #2 + ldr r0, [sp] + cmp r6, #0 + strh r1, [r0] + beq _021EEBE2 + strh r1, [r0, #2] +_021EEBE2: + mov r7, #0xf + ldr r5, [sp] + mov r4, #0 + lsl r7, r7, #0xc +_021EEBEA: + mov r0, #4 + add r1, r7, #0 + bl sub_02018144 + mov r1, #0 + add r2, r7, #0 + str r0, [r5, #4] + bl sub_020C4CF4 + cmp r6, #1 + bne _021EEC16 + mov r1, #9 + mov r0, #4 + lsl r1, r1, #0xc + bl sub_02018144 + mov r2, #9 + mov r1, #0 + lsl r2, r2, #0xc + str r0, [r5, #0x14] + bl sub_020C4CF4 +_021EEC16: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blo _021EEBEA + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EEBC0 + + thumb_func_start ov5_021EEC24 +ov5_021EEC24: ; 0x021EEC24 + push {r4, r5, r6} + sub sp, #0x24 + add r3, r0, #0 + add r2, r1, #0 + add r6, r3, #0 + add r5, sp, #0 + mov r4, #4 +_021EEC32: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r4, r4, #1 + bne _021EEC32 + ldr r0, [r6, #0] + mov r1, #0 + str r0, [r5, #0] + ldrh r0, [r2] + add r4, sp, #0 + strh r0, [r3] + add r0, sp, #0 + ldrh r0, [r0] + strh r0, [r2] +_021EEC4C: + ldr r0, [r2, #4] + add r1, r1, #1 + str r0, [r3, #4] + ldr r0, [r4, #4] + add r3, r3, #4 + str r0, [r2, #4] + add r2, r2, #4 + add r4, r4, #4 + cmp r1, #4 + blt _021EEC4C + add sp, #0x24 + pop {r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EEC24 + .bss + + + .global Unk_ov5_02202128 +Unk_ov5_02202128: ; 0x02202128 + .space 0x3C000 + diff --git a/asm/ov5_021EEC68.s b/asm/ov5_021EEC68.s new file mode 100644 index 000000000..73fd790e3 --- /dev/null +++ b/asm/ov5_021EEC68.s @@ -0,0 +1,402 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EEC68 +ov5_021EEC68: ; 0x021EEC68 + push {r3, r4, r5, r6} + ldr r4, [r0, #0] + ldr r3, [r1, #0] + cmp r4, r3 + bgt _021EEC78 + add r3, r0, #0 + add r4, r1, #0 + b _021EEC7C +_021EEC78: + add r3, r1, #0 + add r4, r0, #0 +_021EEC7C: + ldr r6, [r0, #4] + ldr r5, [r1, #4] + cmp r6, r5 + bgt _021EEC8A + add r5, r0, #4 + add r0, r1, #4 + b _021EEC8E +_021EEC8A: + add r5, r1, #4 + add r0, r0, #4 +_021EEC8E: + ldr r6, [r2, #0] + ldr r1, [r3, #0] + cmp r1, r6 + bgt _021EECB0 + ldr r1, [r4, #0] + cmp r6, r1 + bgt _021EECB0 + ldr r2, [r2, #4] + ldr r1, [r5, #0] + cmp r1, r2 + bgt _021EECB0 + ldr r0, [r0, #0] + cmp r2, r0 + bgt _021EECB0 + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_021EECB0: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EEC68 + + thumb_func_start ov5_021EECB8 +ov5_021EECB8: ; 0x021EECB8 + push {r4, r5} + lsl r3, r1, #3 + ldr r1, [r0, #0] + ldr r5, [r0, #0x10] + ldrh r1, [r1, r3] + lsl r4, r1, #3 + add r1, r5, r4 + ldr r4, [r5, r4] + ldr r1, [r1, #4] + str r4, [r2, #0] + str r1, [r2, #4] + ldr r1, [r0, #0x10] + ldr r0, [r0, #0] + add r0, r0, r3 + ldrh r0, [r0, #2] + lsl r3, r0, #3 + add r0, r1, r3 + ldr r1, [r1, r3] + ldr r0, [r0, #4] + str r1, [r2, #8] + str r0, [r2, #0xc] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EECB8 + + thumb_func_start ov5_021EECE8 +ov5_021EECE8: ; 0x021EECE8 + push {r3, r4} + ldr r4, [r0, #0] + ldr r3, [r0, #0x14] + lsl r0, r1, #3 + add r0, r4, r0 + ldrh r1, [r0, #4] + mov r0, #0xc + mul r0, r1 + add r3, r3, r0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EECE8 + + thumb_func_start ov5_021EED08 +ov5_021EED08: ; 0x021EED08 + push {r3, r4} + ldr r4, [r0, #0] + ldr r3, [r0, #4] + lsl r0, r1, #3 + add r0, r4, r0 + ldrh r0, [r0, #6] + lsl r0, r0, #2 + ldr r0, [r3, r0] + str r0, [r2, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EED08 + + thumb_func_start ov5_021EED20 +ov5_021EED20: ; 0x021EED20 + mov r3, #0 + add r2, r3, #0 + sub r1, r3, #1 +_021EED26: + str r2, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + add r3, r3, #1 + add r0, #0xc + cmp r3, #0xa + blt _021EED26 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EED20 + + thumb_func_start ov5_021EED38 +ov5_021EED38: ; 0x021EED38 + push {r3, r4, r5, r6} + cmp r1, #0 + bne _021EED44 + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_021EED44: + cmp r1, #1 + bne _021EED52 + mov r0, #0 + strh r0, [r3] + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_021EED52: + sub r1, r1, #1 + lsr r5, r1, #0x1f + add r5, r1, r5 + mov r4, #0 + asr r5, r5, #1 +_021EED5C: + lsl r6, r5, #3 + ldr r6, [r0, r6] + cmp r6, r2 + ble _021EED7E + sub r1, r1, #1 + cmp r1, r4 + ble _021EED76 + add r6, r4, r5 + add r1, r5, #0 + lsr r5, r6, #0x1f + add r5, r6, r5 + asr r5, r5, #1 + b _021EED5C +_021EED76: + strh r5, [r3] + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr +_021EED7E: + add r4, r4, #1 + cmp r4, r1 + bge _021EED90 + add r6, r5, r1 + add r4, r5, #0 + lsr r5, r6, #0x1f + add r5, r6, r5 + asr r5, r5, #1 + b _021EED5C +_021EED90: + add r0, r5, #1 + strh r0, [r3] + mov r0, #1 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EED38 + + thumb_func_start ov5_021EED9C +ov5_021EED9C: ; 0x021EED9C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xc8 + str r0, [sp] + ldr r0, [sp, #0xe0] + add r4, r3, #0 + str r0, [sp, #0xe0] + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _021EEDB4 + add sp, #0xc8 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EEDB4: + str r1, [sp, #0x2c] + str r2, [sp, #0x30] + add r0, sp, #0x50 + mov r5, #0 + bl ov5_021EED20 + ldr r1, [r4, #0x1c] + ldr r6, [r4, #8] + lsl r1, r1, #0x10 + ldr r2, [sp, #0x30] + add r0, r6, #0 + lsr r1, r1, #0x10 + add r3, sp, #0x24 + bl ov5_021EED38 + cmp r0, #0 + bne _021EEDDC + add sp, #0xc8 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} +_021EEDDC: + add r0, sp, #0x24 + ldrh r0, [r0] + lsl r0, r0, #3 + add r1, r6, r0 + ldrh r0, [r1, #4] + str r0, [sp, #0x14] + ldrh r1, [r1, #6] + add r0, r5, #0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + cmp r0, #0 + bls _021EEEA2 + lsl r0, r1, #1 + add r7, sp, #0x50 + str r0, [sp, #0x10] +_021EEDFA: + ldr r0, [sp, #0x18] + ldr r2, [r4, #0xc] + lsl r1, r0, #1 + ldr r0, [sp, #0x10] + add r0, r0, r2 + ldrh r6, [r1, r0] + add r0, r4, #0 + add r2, sp, #0x40 + add r1, r6, #0 + bl ov5_021EECB8 + add r0, sp, #0x40 + add r1, sp, #0x48 + add r2, sp, #0x2c + bl ov5_021EEC68 + cmp r0, #1 + bne _021EEE92 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0x34 + bl ov5_021EECE8 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0x28 + bl ov5_021EED08 + ldr r0, [sp, #0x34] + ldr r2, [sp, #0x2c] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + str r0, [sp, #0x1c] + ldr r2, [sp, #0x30] + ldr r0, [sp, #0x3c] + str r1, [sp, #8] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r6, r0, #0 + ldr r0, [sp, #0x28] + ldr r2, [sp, #0x1c] + mov ip, r0 + mov r0, #2 + lsl r0, r0, #0xa + add r0, r2, r0 + ldr r3, [sp, #8] + ldr r2, _021EEF30 ; =0x00000000 + adc r3, r2 + lsl r2, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + mov r2, #2 + lsl r2, r2, #0xa + str r3, [sp, #8] + add r3, r6, r2 + ldr r2, _021EEF30 ; =0x00000000 + adc r1, r2 + lsl r1, r1, #0x14 + lsr r2, r3, #0xc + orr r2, r1 + add r1, r0, r2 + mov r0, ip + add r0, r0, r1 + ldr r1, [sp, #0x38] + neg r0, r0 + bl sub_020BCFD0 + str r0, [r7, #0] + add r5, r5, #1 + add r7, #0xc + cmp r5, #0xa + bge _021EEEA2 +_021EEE92: + ldr r0, [sp, #0x18] + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + str r1, [sp, #0x18] + ldr r0, [sp, #0x14] + cmp r1, r0 + blo _021EEDFA +_021EEEA2: + cmp r5, #1 + ble _021EEF0A + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + ldr r1, [sp, #0x50] + bl sub_0201E198 + add r4, r0, #0 + ldr r0, [sp] + ldr r1, [sp, #0x50] + bl sub_0201E190 + sub r6, r4, r0 + mov r4, #1 + cmp r5, #1 + ble _021EEEF6 +_021EEEC4: + mov r0, #0xc + add r7, r4, #0 + mul r7, r0 + add r1, sp, #0x50 + ldr r0, [sp] + ldr r1, [r1, r7] + bl sub_0201E198 + add r1, sp, #0x50 + str r0, [sp, #0x20] + ldr r0, [sp] + ldr r1, [r1, r7] + bl sub_0201E190 + ldr r1, [sp, #0x20] + sub r0, r1, r0 + cmp r6, r0 + ble _021EEEEC + add r6, r0, #0 + str r4, [sp, #0xc] +_021EEEEC: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, r5 + blt _021EEEC4 +_021EEEF6: + ldr r0, [sp, #0xc] + mov r1, #0xc + mul r1, r0 + add r0, sp, #0x50 + ldr r1, [r0, r1] + ldr r0, [sp, #0xe0] + add sp, #0xc8 + str r1, [r0, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EEF0A: + bne _021EEF18 + ldr r1, [sp, #0x50] + ldr r0, [sp, #0xe0] + add sp, #0xc8 + str r1, [r0, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EEF18: + cmp r5, #0 + beq _021EEF28 + ldr r1, [sp, #0x50] + ldr r0, [sp, #0xe0] + add sp, #0xc8 + str r1, [r0, #0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EEF28: + mov r0, #0 + add sp, #0xc8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EEF30: .word 0x00000000 + thumb_func_end ov5_021EED9C \ No newline at end of file diff --git a/asm/ov5_021EEF34.s b/asm/ov5_021EEF34.s new file mode 100644 index 000000000..ae89c5a24 --- /dev/null +++ b/asm/ov5_021EEF34.s @@ -0,0 +1,443 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EEF34 +ov5_021EEF34: ; 0x021EEF34 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + mov r2, #0x18 + add r4, r1, #0 + bl sub_020C4B4C + add r0, r5, #0 + mov r1, #4 + add r2, sp, #0 + bl sub_02006E18 + add r0, r5, #0 + mov r1, #2 + add r2, r4, #0 + bl sub_02006E18 + add r0, r5, #0 + mov r1, #2 + add r2, r4, #4 + bl sub_02006E18 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #2 + add r2, #8 + bl sub_02006E18 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #2 + add r2, #0xc + bl sub_02006E18 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #2 + add r2, #0x10 + bl sub_02006E18 + add r4, #0x14 + add r0, r5, #0 + mov r1, #2 + add r2, r4, #0 + bl sub_02006E18 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EEF34 + + thumb_func_start ov5_021EEF98 +ov5_021EEF98: ; 0x021EEF98 + push {r3, r4, r5, lr} + add r3, r0, #0 + add r0, r2, #0 + ldr r2, [r0, #0] + mov r4, #0 + str r2, [r1, #0x10] + ldr r2, [r3, #0] + lsl r2, r2, #3 + add r2, r4, r2 + ldr r4, [r0, #0] + add r4, r4, r2 + str r4, [r1, #0x14] + ldr r5, [r3, #4] + mov r4, #0xc + mul r4, r5 + add r2, r2, r4 + ldr r4, [r0, #0] + add r4, r4, r2 + str r4, [r1, #4] + ldr r4, [r3, #8] + lsl r4, r4, #2 + add r2, r2, r4 + ldr r4, [r0, #0] + add r4, r4, r2 + str r4, [r1, #0] + ldr r4, [r3, #0xc] + lsl r4, r4, #3 + add r2, r2, r4 + ldr r4, [r0, #0] + add r4, r4, r2 + str r4, [r1, #8] + ldr r4, [r3, #0x10] + ldr r0, [r0, #0] + lsl r4, r4, #3 + add r2, r2, r4 + add r0, r0, r2 + str r0, [r1, #0xc] + ldr r0, [r3, #0x14] + lsl r0, r0, #1 + add r1, r2, r0 + mov r0, #9 + lsl r0, r0, #0xc + cmp r1, r0 + ble _021EEFF4 + bl sub_02022974 +_021EEFF4: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EEF98 + + thumb_func_start ov5_021EEFF8 +ov5_021EEFF8: ; 0x021EEFF8 + add r3, r1, #0 + ldr r1, [r2, #0] + ldr r2, [r3, #0x10] + ldr r3, _021EF004 ; =sub_02006E18 + lsl r1, r1, #3 + bx r3 + ; .align 2, 0 +_021EF004: .word sub_02006E18 + thumb_func_end ov5_021EEFF8 + + thumb_func_start ov5_021EF008 +ov5_021EF008: ; 0x021EF008 + ldr r2, [r2, #4] + add r3, r1, #0 + mov r1, #0xc + mul r1, r2 + ldr r2, [r3, #0x14] + ldr r3, _021EF018 ; =sub_02006E18 + bx r3 + nop +_021EF018: .word sub_02006E18 + thumb_func_end ov5_021EF008 + + thumb_func_start ov5_021EF01C +ov5_021EF01C: ; 0x021EF01C + add r3, r1, #0 + ldr r1, [r2, #8] + ldr r2, [r3, #4] + ldr r3, _021EF028 ; =sub_02006E18 + lsl r1, r1, #2 + bx r3 + ; .align 2, 0 +_021EF028: .word sub_02006E18 + thumb_func_end ov5_021EF01C + + thumb_func_start ov5_021EF02C +ov5_021EF02C: ; 0x021EF02C + add r3, r1, #0 + ldr r1, [r2, #0xc] + ldr r2, [r3, #0] + ldr r3, _021EF038 ; =sub_02006E18 + lsl r1, r1, #3 + bx r3 + ; .align 2, 0 +_021EF038: .word sub_02006E18 + thumb_func_end ov5_021EF02C + + thumb_func_start ov5_021EF03C +ov5_021EF03C: ; 0x021EF03C + add r3, r1, #0 + ldr r1, [r2, #0x10] + ldr r2, [r3, #8] + ldr r3, _021EF048 ; =sub_02006E18 + lsl r1, r1, #3 + bx r3 + ; .align 2, 0 +_021EF048: .word sub_02006E18 + thumb_func_end ov5_021EF03C + + thumb_func_start ov5_021EF04C +ov5_021EF04C: ; 0x021EF04C + add r3, r1, #0 + ldr r1, [r2, #0x14] + ldr r2, [r3, #0xc] + ldr r3, _021EF058 ; =sub_02006E18 + lsl r1, r1, #1 + bx r3 + ; .align 2, 0 +_021EF058: .word sub_02006E18 + thumb_func_end ov5_021EF04C + + thumb_func_start ov5_021EF05C +ov5_021EF05C: ; 0x021EF05C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x74] + cmp r0, #1 + bne _021EF070 + add r0, r4, #0 + mov r1, #2 + add r0, #0x68 + strb r1, [r0] +_021EF070: + add r0, r4, #0 + add r0, #0x68 + ldrb r0, [r0] + cmp r0, #0 + beq _021EF084 + cmp r0, #1 + beq _021EF0B6 + cmp r0, #2 + beq _021EF102 + b _021EF116 +_021EF084: + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + cmp r0, #0 + beq _021EF094 + mov r2, #0 + b _021EF116 +_021EF094: + add r1, r4, #0 + ldr r0, [r4, #0x7c] + add r1, #0x4c + bl ov5_021EEF34 + add r2, r4, #0 + ldr r1, [r4, #0x5c] + ldr r0, [r4, #0x70] + add r2, #0x6c + str r1, [r0, #0x1c] + add r0, r4, #0 + ldr r1, [r4, #0x70] + add r0, #0x4c + bl ov5_021EEF98 + mov r2, #1 + b _021EF116 +_021EF0B6: + add r2, r4, #0 + ldr r0, [r4, #0x7c] + ldr r1, [r4, #0x70] + add r2, #0x4c + bl ov5_021EEFF8 + add r2, r4, #0 + ldr r0, [r4, #0x7c] + ldr r1, [r4, #0x70] + add r2, #0x4c + bl ov5_021EF008 + add r2, r4, #0 + ldr r0, [r4, #0x7c] + ldr r1, [r4, #0x70] + add r2, #0x4c + bl ov5_021EF01C + add r2, r4, #0 + ldr r0, [r4, #0x7c] + ldr r1, [r4, #0x70] + add r2, #0x4c + bl ov5_021EF02C + add r2, r4, #0 + ldr r0, [r4, #0x7c] + ldr r1, [r4, #0x70] + add r2, #0x4c + bl ov5_021EF03C + add r2, r4, #0 + ldr r0, [r4, #0x7c] + ldr r1, [r4, #0x70] + add r2, #0x4c + bl ov5_021EF04C + mov r2, #1 + b _021EF116 +_021EF102: + ldr r0, [r4, #0x78] + mov r1, #0 + str r1, [r0, #0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} +_021EF116: + cmp r2, #1 + bne _021EF138 + add r0, r4, #0 + add r0, #0x68 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x68 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x68 + ldrb r0, [r0] + cmp r0, #2 + bne _021EF138 + ldr r0, [r4, #0x70] + mov r1, #1 + str r1, [r0, #0x18] +_021EF138: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF05C + + thumb_func_start ov5_021EF13C +ov5_021EF13C: ; 0x021EF13C + push {r3, lr} + mov r0, #4 + mov r1, #0x20 + bl sub_02018144 + mov r1, #0 + str r1, [r0, #0x10] + str r1, [r0, #0x14] + str r1, [r0, #0] + str r1, [r0, #8] + str r1, [r0, #0xc] + str r1, [r0, #0x18] + str r1, [r0, #0x1c] + pop {r3, pc} + thumb_func_end ov5_021EF13C + + thumb_func_start ov5_021EF158 +ov5_021EF158: ; 0x021EF158 + push {r0, r1, r2, r3} + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r0, #4 + mov r1, #0x18 + add r5, r2, #0 + bl sub_02018184 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021EEF34 + ldr r0, [r4, #0x10] + add r1, r5, #0 + str r0, [r5, #0x1c] + add r0, r4, #0 + add r2, sp, #0x1c + bl ov5_021EEF98 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021EEFF8 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021EF008 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021EF01C + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021EF02C + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021EF03C + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov5_021EF04C + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + str r0, [r5, #0x18] + pop {r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov5_021EF158 + + thumb_func_start ov5_021EF1D0 +ov5_021EF1D0: ; 0x021EF1D0 + push {r3, lr} + cmp r0, #0 + beq _021EF1DA + bl sub_020181C4 +_021EF1DA: + pop {r3, pc} + thumb_func_end ov5_021EF1D0 + + thumb_func_start ov5_021EF1DC +ov5_021EF1DC: ; 0x021EF1DC + cmp r0, #0 + beq _021EF1EE + mov r1, #0 + str r1, [r0, #0x18] + str r1, [r0, #0x10] + str r1, [r0, #0x14] + str r1, [r0, #0] + str r1, [r0, #8] + str r1, [r0, #0xc] +_021EF1EE: + bx lr + thumb_func_end ov5_021EF1DC + + thumb_func_start ov5_021EF1F0 +ov5_021EF1F0: ; 0x021EF1F0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #4 + mov r1, #0x88 + add r6, r2, #0 + add r7, r3, #0 + bl sub_02018184 + add r1, r0, #0 + add r2, r1, #0 + mov r0, #0 + add r2, #0x68 + strb r0, [r2] + add r2, r1, #0 + str r5, [r1, #0x7c] + add r2, #0x80 + str r4, [r2, #0] + str r6, [r1, #0x70] + str r7, [r1, #0x78] + str r0, [r1, #0x74] + str r0, [r1, #0x64] + str r0, [r1, #0x48] + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r0, [r0, #0] + str r0, [r1, #0x6c] + add r0, r1, #0 + add r0, #0x84 + str r2, [r0, #0] + ldr r0, _021EF238 ; =ov5_021EF05C + mov r2, #1 + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EF238: .word ov5_021EF05C + thumb_func_end ov5_021EF1F0 + + thumb_func_start ov5_021EF23C +ov5_021EF23C: ; 0x021EF23C + push {r3, lr} + bl sub_0201CED0 + mov r1, #1 + str r1, [r0, #0x74] + pop {r3, pc} + thumb_func_end ov5_021EF23C + + thumb_func_start ov5_021EF248 +ov5_021EF248: ; 0x021EF248 + mov r1, #0 + str r1, [r0, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EF248 \ No newline at end of file diff --git a/asm/ov5_021EF250.s b/asm/ov5_021EF250.s new file mode 100644 index 000000000..fc154214f --- /dev/null +++ b/asm/ov5_021EF250.s @@ -0,0 +1,209 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EF250 +ov5_021EF250: ; 0x021EF250 + push {r4, r5} + ldr r3, [r2, #0x14] + cmp r3, #0 + bne _021EF25E + mov r0, #0 + pop {r4, r5} + bx lr +_021EF25E: + ldr r5, [r2, #0] + ldr r3, [r2, #8] + ldr r4, [r2, #4] + ldr r2, [r2, #0xc] + add r3, r5, r3 + add r2, r4, r2 + sub r3, r3, #1 + sub r2, r2, #1 + cmp r5, r0 + bgt _021EF284 + cmp r0, r3 + bgt _021EF284 + cmp r4, r1 + bgt _021EF284 + cmp r1, r2 + bgt _021EF284 + mov r0, #1 + pop {r4, r5} + bx lr +_021EF284: + mov r0, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EF250 + + thumb_func_start ov5_021EF28C +ov5_021EF28C: ; 0x021EF28C + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #8 + bl sub_02018144 + mov r1, #0x18 + add r4, r0, #0 + add r0, r6, #0 + mul r1, r5 + bl sub_02018144 + str r0, [r4, #4] + mov r6, #0 + str r5, [r4, #0] + cmp r5, #0 + bls _021EF2C8 + add r0, r6, #0 + mov r1, #0x18 +_021EF2B4: + add r2, r6, #0 + ldr r3, [r4, #4] + mul r2, r1 + add r2, r3, r2 + str r0, [r2, #0x14] + add r2, r6, #1 + lsl r2, r2, #0x18 + lsr r6, r2, #0x18 + cmp r6, r5 + blo _021EF2B4 +_021EF2C8: + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EF28C + + thumb_func_start ov5_021EF2CC +ov5_021EF2CC: ; 0x021EF2CC + push {r4, r5} + ldr r5, [sp, #0x10] + mov r4, #0x18 + mul r4, r0 + ldr r0, [r5, #4] + str r1, [r0, r4] + ldr r0, [r5, #4] + ldr r1, [sp, #8] + add r0, r0, r4 + str r2, [r0, #4] + ldr r0, [r5, #4] + add r0, r0, r4 + str r3, [r0, #8] + ldr r0, [r5, #4] + add r0, r0, r4 + str r1, [r0, #0xc] + ldr r0, [r5, #4] + ldr r1, [sp, #0xc] + add r0, r0, r4 + str r1, [r0, #0x10] + ldr r0, [r5, #4] + mov r1, #1 + add r0, r0, r4 + str r1, [r0, #0x14] + pop {r4, r5} + bx lr + thumb_func_end ov5_021EF2CC + + thumb_func_start ov5_021EF300 +ov5_021EF300: ; 0x021EF300 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF300 + + thumb_func_start ov5_021EF314 +ov5_021EF314: ; 0x021EF314 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + str r3, [sp] + cmp r3, #0 + bne _021EF326 + bl sub_02022974 +_021EF326: + ldr r0, [r5, #0] + mov r4, #0 + cmp r0, #0 + ble _021EF356 +_021EF32E: + mov r3, #0x18 + ldr r2, [r5, #4] + mul r3, r4 + add r0, r6, #0 + add r1, r7, #0 + add r2, r2, r3 + bl ov5_021EF250 + cmp r0, #0 + beq _021EF34A + ldr r0, [sp] + strb r4, [r0] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EF34A: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + ldr r0, [r5, #0] + cmp r4, r0 + blt _021EF32E +_021EF356: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF314 + + thumb_func_start ov5_021EF35C +ov5_021EF35C: ; 0x021EF35C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r5, r0 + blt _021EF36C + bl sub_02022974 +_021EF36C: + mov r0, #0x18 + add r6, r5, #0 + mul r6, r0 + ldr r0, [r4, #4] + add r0, r0, r6 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _021EF380 + bl sub_02022974 +_021EF380: + ldr r0, [r4, #4] + add r0, r0, r6 + ldr r0, [r0, #0x10] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EF35C + + thumb_func_start ov5_021EF388 +ov5_021EF388: ; 0x021EF388 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + ldr r0, [r6, #0] + add r4, r1, #0 + cmp r5, r0 + blt _021EF39A + bl sub_02022974 +_021EF39A: + mov r0, #0x18 + ldr r1, [r6, #4] + mul r0, r5 + add r0, r1, r0 + str r4, [r0, #0x10] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF388 \ No newline at end of file diff --git a/asm/ov5_021EF3A8.s b/asm/ov5_021EF3A8.s new file mode 100644 index 000000000..f57fb780f --- /dev/null +++ b/asm/ov5_021EF3A8.s @@ -0,0 +1,187 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EF3A8 +ov5_021EF3A8: ; 0x021EF3A8 + push {r4, lr} + mov r1, #0x1c + bl sub_02018144 + add r4, r0, #0 + bl ov5_021EF444 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF3A8 + + thumb_func_start ov5_021EF3BC +ov5_021EF3BC: ; 0x021EF3BC + push {r4, lr} + add r4, r0, #0 + beq _021EF3D8 + ldr r1, [r4, #0] + cmp r1, #1 + bne _021EF3CC + bl ov5_021EF3FC +_021EF3CC: + add r0, r4, #0 + bl ov5_021EF444 + add r0, r4, #0 + bl sub_020181C4 +_021EF3D8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF3BC + + thumb_func_start ov5_021EF3DC +ov5_021EF3DC: ; 0x021EF3DC + push {r4, lr} + add r4, r0, #0 + ldr r0, _021EF3F8 ; =ov5_021EF47C + add r1, r4, #0 + bl sub_020177BC + cmp r0, #1 + beq _021EF3F0 + bl sub_02022974 +_021EF3F0: + mov r0, #1 + str r0, [r4, #0] + pop {r4, pc} + nop +_021EF3F8: .word ov5_021EF47C + thumb_func_end ov5_021EF3DC + + thumb_func_start ov5_021EF3FC +ov5_021EF3FC: ; 0x021EF3FC + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_020177BC + cmp r0, #1 + beq _021EF410 + bl sub_02022974 +_021EF410: + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF3FC + + thumb_func_start ov5_021EF418 +ov5_021EF418: ; 0x021EF418 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r2, #0 + bl ov5_021EF49C + add r4, r0, #0 + bne _021EF42A + bl sub_02022974 +_021EF42A: + cmp r4, #0 + beq _021EF436 + str r6, [r4, #4] + str r5, [r4, #8] + mov r0, #1 + str r0, [r4, #0] +_021EF436: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF418 + + thumb_func_start ov5_021EF43C +ov5_021EF43C: ; 0x021EF43C + ldr r3, _021EF440 ; =ov5_021EF46C + bx r3 + ; .align 2, 0 +_021EF440: .word ov5_021EF46C + thumb_func_end ov5_021EF43C + + thumb_func_start ov5_021EF444 +ov5_021EF444: ; 0x021EF444 + push {r3, r4, r5, lr} + add r3, r0, #0 + mov r2, #0x1c + mov r1, #0 +_021EF44C: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _021EF44C + mov r4, #0 + str r4, [r0, #0] + add r5, r0, #4 +_021EF45A: + add r0, r5, #0 + bl ov5_021EF46C + add r4, r4, #1 + add r5, #0xc + cmp r4, #2 + blt _021EF45A + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF444 + + thumb_func_start ov5_021EF46C +ov5_021EF46C: ; 0x021EF46C + mov r2, #0 + ldr r1, _021EF478 ; =ov5_021EF498 + str r2, [r0, #0] + str r1, [r0, #8] + str r2, [r0, #4] + bx lr + ; .align 2, 0 +_021EF478: .word ov5_021EF498 + thumb_func_end ov5_021EF46C + + thumb_func_start ov5_021EF47C +ov5_021EF47C: ; 0x021EF47C + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r5, #4 +_021EF484: + ldr r1, [r5, #8] + ldr r2, [r5, #0xc] + add r0, r4, #0 + blx r2 + add r6, r6, #1 + add r5, #0xc + add r4, #0xc + cmp r6, #2 + blt _021EF484 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EF47C + + thumb_func_start ov5_021EF498 +ov5_021EF498: ; 0x021EF498 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EF498 + + thumb_func_start ov5_021EF49C +ov5_021EF49C: ; 0x021EF49C + mov r2, #0 + add r3, r0, #0 +_021EF4A0: + ldr r1, [r3, #4] + cmp r1, #0 + bne _021EF4B0 + add r1, r0, #4 + mov r0, #0xc + mul r0, r2 + add r0, r1, r0 + bx lr +_021EF4B0: + add r2, r2, #1 + add r3, #0xc + cmp r2, #2 + blt _021EF4A0 + mov r0, #0 + bx lr + thumb_func_end ov5_021EF49C \ No newline at end of file diff --git a/asm/ov5_021EF4BC.s b/asm/ov5_021EF4BC.s new file mode 100644 index 000000000..b6d407f18 --- /dev/null +++ b/asm/ov5_021EF4BC.s @@ -0,0 +1,371 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EF4BC +ov5_021EF4BC: ; 0x021EF4BC + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0xca + lsl r1, r1, #2 + add r6, r0, #0 + bl sub_02018144 + mov r2, #0xca + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + mov r2, #0x63 + mov r0, #0 + add r1, r4, #0 + lsl r2, r2, #2 + str r0, [r4, #0] + add r0, r6, #0 + add r1, #0xc + add r2, r4, r2 + bl sub_02013B10 + mov r1, #0xc3 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #4 + str r5, [r4, r0] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EF4BC + + thumb_func_start ov5_021EF4F8 +ov5_021EF4F8: ; 0x021EF4F8 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0] + cmp r1, #1 + bne _021EF506 + bl ov5_021EF710 +_021EF506: + mov r0, #0xc3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02013B40 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021EF4F8 + + thumb_func_start ov5_021EF518 +ov5_021EF518: ; 0x021EF518 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021EF526 + bl sub_02022974 +_021EF526: + mov r0, #0x31 + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, _021EF598 ; =ov5_021EF6C0 + add r2, r4, #0 + bl ov5_021EF418 + mov r2, #0xc5 + lsl r2, r2, #2 + str r0, [r4, r2] + ldr r0, _021EF59C ; =ov5_021EF5A8 + add r1, r4, #0 + add r2, #0xec + bl sub_0200D9E8 + mov r2, #0xc7 + lsl r2, r2, #2 + str r0, [r4, r2] + ldr r0, _021EF5A0 ; =ov5_021EF6B0 + add r1, r4, #0 + add r2, #0xe4 + bl sub_0200DA04 + mov r2, #0x32 + lsl r2, r2, #4 + str r0, [r4, r2] + ldr r0, _021EF5A4 ; =ov5_021EF6E4 + add r1, r4, #0 + add r2, #0xe0 + bl sub_0200DA04 + mov r1, #0xc9 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + mov r2, #6 + add r0, #0xc + mov r1, #0 + lsl r2, r2, #6 + bl sub_020D5124 + mov r2, #0x63 + lsl r2, r2, #2 + add r0, r4, r2 + mov r1, #0 + sub r2, #0xc + bl sub_020D5124 + mov r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #8] + mov r0, #0x61 + lsl r0, r0, #4 + bl sub_02005748 + pop {r4, pc} + ; .align 2, 0 +_021EF598: .word ov5_021EF6C0 +_021EF59C: .word ov5_021EF5A8 +_021EF5A0: .word ov5_021EF6B0 +_021EF5A4: .word ov5_021EF6E4 + thumb_func_end ov5_021EF518 + + thumb_func_start ov5_021EF5A8 +ov5_021EF5A8: ; 0x021EF5A8 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #8] + cmp r0, #3 + bhi _021EF630 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021EF5BE: ; jump table + .short _021EF5C6 - _021EF5BE - 2 ; case 0 + .short _021EF5D2 - _021EF5BE - 2 ; case 1 + .short _021EF5FE - _021EF5BE - 2 ; case 2 + .short _021EF624 - _021EF5BE - 2 ; case 3 +_021EF5C6: + mov r0, #3 + str r0, [r4, #4] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r4, pc} +_021EF5D2: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + mov r0, #0xc3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02013B54 + ldr r1, [r4, #4] + mov r2, #3 + sub r1, r2, r1 + bl ov5_021EF66C + ldr r0, [r4, #4] + cmp r0, #0 + bgt _021EF630 + mov r0, #3 + str r0, [r4, #4] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r4, pc} +_021EF5FE: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + mov r0, #0xc3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02013B54 + ldr r1, [r4, #4] + mov r2, #3 + bl ov5_021EF66C + ldr r0, [r4, #4] + cmp r0, #0 + bgt _021EF630 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r4, pc} +_021EF624: + add r0, r4, #0 + bl ov5_021EF710 + mov r0, #0 + bl sub_020BFEAC +_021EF630: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF5A8 + + thumb_func_start ov5_021EF634 +ov5_021EF634: ; 0x021EF634 + push {r4, lr} + ldr r1, _021EF664 ; =0x04000006 + ldrh r4, [r1] + mov r1, #0xc3 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bl sub_02013B68 + cmp r4, #0xc0 + bge _021EF662 + add r3, r4, #1 + cmp r3, #0xc0 + blt _021EF650 + sub r3, #0xc0 +_021EF650: + ldr r1, _021EF668 ; =0x04000004 + ldrh r2, [r1] + mov r1, #2 + tst r1, r2 + beq _021EF662 + lsl r1, r3, #1 + ldrh r0, [r0, r1] + bl sub_020BFEAC +_021EF662: + pop {r4, pc} + ; .align 2, 0 +_021EF664: .word 0x04000006 +_021EF668: .word 0x04000004 + thumb_func_end ov5_021EF634 + + thumb_func_start ov5_021EF66C +ov5_021EF66C: ; 0x021EF66C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + lsl r0, r1, #1 + add r0, r1, r0 + add r1, r2, #0 + mov r4, #1 + bl sub_020E1F6C + neg r1, r0 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + lsl r0, r0, #0x10 + mov r6, #0 + str r1, [sp] + lsr r7, r0, #0x10 +_021EF68A: + add r0, r6, #0 + mov r1, #0xa + bl sub_020E1F6C + cmp r1, #0 + bne _021EF69A + mov r0, #1 + eor r4, r0 +_021EF69A: + cmp r4, #0 + beq _021EF6A2 + strh r7, [r5] + b _021EF6A6 +_021EF6A2: + ldr r0, [sp] + strh r0, [r5] +_021EF6A6: + add r6, r6, #1 + add r5, r5, #2 + cmp r6, #0xc0 + blt _021EF68A + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EF66C + + thumb_func_start ov5_021EF6B0 +ov5_021EF6B0: ; 0x021EF6B0 + mov r2, #0xc6 + ldr r3, _021EF6BC ; =sub_020BFEAC + mov r0, #0 + lsl r2, r2, #2 + str r0, [r1, r2] + bx r3 + ; .align 2, 0 +_021EF6BC: .word sub_020BFEAC + thumb_func_end ov5_021EF6B0 + + thumb_func_start ov5_021EF6C0 +ov5_021EF6C0: ; 0x021EF6C0 + ldr r3, _021EF6C8 ; =ov5_021EF6CC + add r0, r1, #0 + bx r3 + nop +_021EF6C8: .word ov5_021EF6CC + thumb_func_end ov5_021EF6C0 + + thumb_func_start ov5_021EF6CC +ov5_021EF6CC: ; 0x021EF6CC + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #1 + bne _021EF6E2 + mov r1, #0xc6 + lsl r1, r1, #2 + ldr r1, [r0, r1] + cmp r1, #1 + bne _021EF6E2 + bl ov5_021EF634 +_021EF6E2: + pop {r3, pc} + thumb_func_end ov5_021EF6CC + + thumb_func_start ov5_021EF6E4 +ov5_021EF6E4: ; 0x021EF6E4 + ldr r3, _021EF6EC ; =ov5_021EF6F0 + add r0, r1, #0 + bx r3 + nop +_021EF6EC: .word ov5_021EF6F0 + thumb_func_end ov5_021EF6E4 + + thumb_func_start ov5_021EF6F0 +ov5_021EF6F0: ; 0x021EF6F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #1 + bne _021EF70C + mov r0, #0xc3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02013B94 + mov r0, #0xc6 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] +_021EF70C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF6F0 + + thumb_func_start ov5_021EF710 +ov5_021EF710: ; 0x021EF710 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xc5 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov5_021EF43C + mov r0, #0xc5 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, #8 + ldr r0, [r4, r0] + bl sub_0200DA58 + mov r0, #0xc7 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200DA58 + mov r0, #0x32 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200DA58 + mov r0, #0xc9 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + str r1, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EF710 \ No newline at end of file diff --git a/asm/ov5_021EF75C.s b/asm/ov5_021EF75C.s new file mode 100644 index 000000000..7a4cf4c02 --- /dev/null +++ b/asm/ov5_021EF75C.s @@ -0,0 +1,512 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EF75C +ov5_021EF75C: ; 0x021EF75C + ldr r2, [r1, #0x14] + ldr r3, _021EF768 ; =sub_020182F0 + add r1, r1, r2 + sub r1, r1, r0 + bx r3 + nop +_021EF768: .word sub_020182F0 + thumb_func_end ov5_021EF75C + + thumb_func_start ov5_021EF76C +ov5_021EF76C: ; 0x021EF76C + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r1, _021EF79C ; =0x00000C28 + mov r0, #4 + bl sub_02018144 + add r4, r0, #0 + mov r0, #4 + mov r1, #0x10 + bl sub_02018184 + mov r1, #0xc2 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r2, #0 + str r5, [r0, #0] + ldr r0, [r4, r1] + str r6, [r0, #4] + ldr r0, [r4, r1] + str r2, [r0, #0xc] + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021EF79C: .word 0x00000C28 + thumb_func_end ov5_021EF76C + + thumb_func_start ov5_021EF7A0 +ov5_021EF7A0: ; 0x021EF7A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x110 + add r5, r0, #0 + mov r0, #0xc2 + lsl r0, r0, #4 + ldr r7, [r5, r0] + sub r0, #8 + ldr r2, [r7, #0] + add r0, r5, r0 + mov r1, #0x2a + bl sub_02006AA4 + ldr r1, _021EF9BC ; =0x00000C18 + mov r0, #0x2b + ldrh r1, [r5, r1] + mov r2, #4 + bl sub_02006AC0 + ldr r1, _021EF9C0 ; =0x00000C24 + str r0, [r5, r1] + ldr r0, [r5, r1] + ldrh r1, [r0] + mov r0, #3 + lsl r0, r0, #8 + strh r1, [r7, #8] + cmp r1, r0 + blo _021EF7DA + bl sub_02022974 +_021EF7DA: + ldr r1, _021EF9C4 ; =0x00000C0C + mov r0, #0 + str r0, [r5, r1] + add r1, #0xe + ldrh r1, [r5, r1] + mov r0, #0x2c + mov r2, #4 + bl sub_02006AC0 + ldr r1, _021EF9C8 ; =0x00000C04 + mov r2, #4 + str r0, [r5, r1] + add r1, #0x14 + ldrh r1, [r5, r1] + mov r0, #0x47 + bl sub_02006AC0 + ldr r1, _021EF9CC ; =0x00000C08 + str r0, [r5, r1] + sub r0, r1, #4 + ldr r0, [r5, r0] + bl sub_020B3C1C + ldr r1, _021EF9C4 ; =0x00000C0C + str r0, [r5, r1] + ldrh r0, [r7, #8] + cmp r0, #0 + beq _021EF822 + sub r0, r1, #4 + ldr r0, [r5, r0] + bl sub_020B3C1C + mov r1, #0xc1 + lsl r1, r1, #4 + str r0, [r5, r1] + b _021EF828 +_021EF822: + mov r2, #0 + add r0, r1, #4 + str r2, [r5, r0] +_021EF828: + ldr r0, _021EF9C4 ; =0x00000C0C + ldr r0, [r5, r0] + bl sub_0201CBCC + cmp r0, #0 + bne _021EF838 + bl sub_02022974 +_021EF838: + ldr r1, _021EF9C8 ; =0x00000C04 + ldr r0, [r5, r1] + add r1, #8 + ldr r1, [r5, r1] + bl ov5_021EF75C + mov r0, #0xc1 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021EF866 + bl sub_0201CBCC + cmp r0, #0 + bne _021EF85A + bl sub_02022974 +_021EF85A: + ldr r1, _021EF9CC ; =0x00000C08 + ldr r0, [r5, r1] + add r1, #8 + ldr r1, [r5, r1] + bl ov5_021EF75C +_021EF866: + mov r2, #0 + mov r0, #3 + add r3, r5, #0 + add r1, r2, #0 + lsl r0, r0, #8 +_021EF870: + add r2, r2, #1 + str r1, [r3, #4] + add r3, r3, #4 + cmp r2, r0 + blt _021EF870 + ldr r0, _021EF9D0 ; =0x00000C14 + str r1, [r5, r0] + mov r0, #0x28 + mov r1, #4 + bl sub_02006C24 + str r0, [sp, #0xc] + ldr r0, [r7, #4] + bl ov5_021D3F84 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldrh r0, [r7, #8] + cmp r0, #0 + ble _021EF928 + ldr r0, [sp, #8] + str r0, [sp] +_021EF89E: + ldr r0, _021EF9C0 ; =0x00000C24 + ldr r1, [r5, r0] + ldr r0, [sp] + add r0, r1, r0 + ldrh r6, [r0, #2] + lsl r0, r6, #2 + add r4, r5, r0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021EF8B6 + bl sub_02022974 +_021EF8B6: + ldr r0, [sp, #0xc] + add r1, r6, #0 + mov r2, #4 + bl sub_02006CB8 + str r0, [r4, #4] + ldr r0, [sp, #4] + cmp r6, r0 + bge _021EF902 + ldr r0, [r4, #4] + bl sub_020B3C0C + cmp r0, #0 + beq _021EF8F2 + add r1, r0, #0 + add r1, #8 + beq _021EF8E6 + ldrb r2, [r0, #9] + cmp r2, #0 + bls _021EF8E6 + ldrh r2, [r0, #0xe] + add r1, r1, r2 + add r1, r1, #4 + b _021EF8E8 +_021EF8E6: + mov r1, #0 +_021EF8E8: + cmp r1, #0 + beq _021EF8F2 + ldr r1, [r1, #0] + add r1, r0, r1 + b _021EF8F4 +_021EF8F2: + mov r1, #0 +_021EF8F4: + mov r2, #0xc1 + lsl r2, r2, #4 + ldr r2, [r5, r2] + ldr r3, [r7, #4] + add r0, r6, #0 + bl ov5_021D3A50 +_021EF902: + mov r1, #0xc1 + lsl r1, r1, #4 + ldr r0, [r4, #4] + ldr r1, [r5, r1] + bl sub_0201CBB0 + cmp r0, #0 + bne _021EF916 + bl sub_02022974 +_021EF916: + ldr r0, [sp] + ldrh r1, [r7, #8] + add r0, r0, #2 + str r0, [sp] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, r1 + blt _021EF89E +_021EF928: + ldr r0, [r5, #4] + cmp r0, #0 + bne _021EF95E + ldr r0, [sp, #0xc] + mov r1, #0 + mov r2, #4 + bl sub_02006CB8 + str r0, [r5, #4] + bl sub_020B3C1C + add r4, r0, #0 + beq _021EF95E + bl sub_0201CBCC + cmp r0, #0 + bne _021EF94E + bl sub_02022974 +_021EF94E: + ldr r0, [r5, #4] + add r1, r4, #0 + bl sub_0201CBB0 + cmp r0, #0 + bne _021EF95E + bl sub_02022974 +_021EF95E: + ldr r0, [sp, #0xc] + bl sub_02006CA8 + ldr r2, _021EF9D4 ; =0x04000060 + ldr r0, _021EF9D8 ; =0xFFFFCFFF + ldrh r1, [r2] + and r1, r0 + mov r0, #0x20 + orr r0, r1 + strh r0, [r2] + add r0, r5, #0 + bl ov5_021EFAC0 + cmp r0, #0 + bne _021EF984 + ldr r0, _021EF9DC ; =0x021FF588 + bl sub_020BFD2C + b _021EF98A +_021EF984: + ldr r0, _021EF9E0 ; =0x021FF598 + bl sub_020BFD2C +_021EF98A: + bl ov5_021D56BC + ldr r1, _021EF9D0 ; =0x00000C14 + str r0, [r5, r1] + ldr r1, _021EF9E4 ; =0x022020DC + add r0, sp, #0x10 + bl sub_020D7510 + ldr r1, _021EF9D0 ; =0x00000C14 + add r0, sp, #0x10 + ldr r1, [r5, r1] + bl ov5_021D56D4 + mov r0, #0xc2 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_020181C4 + mov r0, #0xc2 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + add sp, #0x110 + pop {r3, r4, r5, r6, r7, pc} + nop +_021EF9BC: .word 0x00000C18 +_021EF9C0: .word 0x00000C24 +_021EF9C4: .word 0x00000C0C +_021EF9C8: .word 0x00000C04 +_021EF9CC: .word 0x00000C08 +_021EF9D0: .word 0x00000C14 +_021EF9D4: .word 0x04000060 +_021EF9D8: .word 0xFFFFCFFF +_021EF9DC: .word 0x021FF588 +_021EF9E0: .word 0x021FF598 +_021EF9E4: .word 0x022020DC + thumb_func_end ov5_021EF7A0 + + thumb_func_start ov5_021EF9E8 +ov5_021EF9E8: ; 0x021EF9E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bne _021EF9F4 + bl sub_02022974 +_021EF9F4: + add r2, r4, #4 + lsl r1, r5, #2 + ldr r0, [r2, r1] + cmp r0, #0 + bne _021EFA0C + ldr r0, [r4, #4] + cmp r0, #0 + bne _021EFA08 + bl sub_02022974 +_021EFA08: + add r0, r4, #4 + pop {r3, r4, r5, pc} +_021EFA0C: + add r0, r2, r1 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EF9E8 + + thumb_func_start ov5_021EFA10 +ov5_021EFA10: ; 0x021EFA10 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + ldr r0, _021EFA7C ; =0x00000C14 + ldr r0, [r1, r0] + cmp r0, #0 + beq _021EFA22 + bl ov5_021D5778 +_021EFA22: + mov r6, #0 + mov r7, #3 + add r4, r6, #0 + lsl r7, r7, #8 +_021EFA2A: + ldr r0, [r5, #0] + add r0, r0, r4 + ldr r0, [r0, #4] + cmp r0, #0 + beq _021EFA38 + bl sub_020181C4 +_021EFA38: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r7 + blt _021EFA2A + ldr r1, [r5, #0] + ldr r0, _021EFA80 ; =0x00000C24 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, [r5, #0] + ldr r0, _021EFA84 ; =0x00000C04 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, [r5, #0] + ldr r0, _021EFA84 ; =0x00000C04 + mov r2, #0 + str r2, [r1, r0] + ldr r1, [r5, #0] + add r0, r0, #4 + ldr r0, [r1, r0] + bl sub_020181C4 + ldr r1, [r5, #0] + ldr r0, _021EFA88 ; =0x00000C08 + mov r2, #0 + str r2, [r1, r0] + ldr r0, [r5, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + nop +_021EFA7C: .word 0x00000C14 +_021EFA80: .word 0x00000C24 +_021EFA84: .word 0x00000C04 +_021EFA88: .word 0x00000C08 + thumb_func_end ov5_021EFA10 + + thumb_func_start ov5_021EFA8C +ov5_021EFA8C: ; 0x021EFA8C + push {r4, lr} + add r4, r0, #0 + bne _021EFA96 + bl sub_02022974 +_021EFA96: + ldr r0, _021EFA9C ; =0x00000C0C + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021EFA9C: .word 0x00000C0C + thumb_func_end ov5_021EFA8C + + thumb_func_start ov5_021EFAA0 +ov5_021EFAA0: ; 0x021EFAA0 + push {r4, lr} + add r4, r0, #0 + bne _021EFAAA + bl sub_02022974 +_021EFAAA: + mov r0, #0xc1 + lsl r0, r0, #4 + ldr r0, [r4, r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EFAA0 + + thumb_func_start ov5_021EFAB4 +ov5_021EFAB4: ; 0x021EFAB4 + ldr r1, _021EFABC ; =0x00000C14 + ldr r0, [r0, r1] + bx lr + nop +_021EFABC: .word 0x00000C14 + thumb_func_end ov5_021EFAB4 + + thumb_func_start ov5_021EFAC0 +ov5_021EFAC0: ; 0x021EFAC0 + ldr r1, _021EFAD4 ; =0x00000C1E + ldrh r0, [r0, r1] + cmp r0, #0 + beq _021EFACC + cmp r0, #3 + bne _021EFAD0 +_021EFACC: + mov r0, #1 + bx lr +_021EFAD0: + mov r0, #0 + bx lr + ; .align 2, 0 +_021EFAD4: .word 0x00000C1E + thumb_func_end ov5_021EFAC0 + + thumb_func_start ov5_021EFAD8 +ov5_021EFAD8: ; 0x021EFAD8 + ldr r1, _021EFAE4 ; =0x00000C1E + ldrh r0, [r0, r1] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr + nop +_021EFAE4: .word 0x00000C1E + thumb_func_end ov5_021EFAD8 + + thumb_func_start ov5_021EFAE8 +ov5_021EFAE8: ; 0x021EFAE8 + ldr r2, _021EFAF4 ; =0x00000C24 + ldr r2, [r0, r2] + lsl r0, r1, #1 + ldrh r0, [r2, r0] + bx lr + nop +_021EFAF4: .word 0x00000C24 + thumb_func_end ov5_021EFAE8 + + thumb_func_start ov5_021EFAF8 +ov5_021EFAF8: ; 0x021EFAF8 + lsl r1, r1, #2 + add r0, r0, r1 + ldr r0, [r0, #4] + cmp r0, #0 + beq _021EFB06 + mov r0, #1 + bx lr +_021EFB06: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021EFAF8 + + .rodata + + + .global Unk_ov5_021FF588 +Unk_ov5_021FF588: ; 0x021FF588 + .incbin "incbin/overlay5_rodata.bin", 0x6C74, 0x6C84 - 0x6C74 + + .global Unk_ov5_021FF598 +Unk_ov5_021FF598: ; 0x021FF598 + .incbin "incbin/overlay5_rodata.bin", 0x6C84, 0x10 + + + .data + + + .global Unk_ov5_022020DC +Unk_ov5_022020DC: ; 0x022020DC + .incbin "incbin/overlay5_data.bin", 0x3BC, 0x2D + diff --git a/asm/ov5_021EFB0C.s b/asm/ov5_021EFB0C.s new file mode 100644 index 000000000..935465fe1 --- /dev/null +++ b/asm/ov5_021EFB0C.s @@ -0,0 +1,770 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021EFB0C +ov5_021EFB0C: ; 0x021EFB0C + push {r4, lr} + mov r0, #4 + mov r1, #0xfc + bl sub_02018144 + mov r4, #0 + add r2, r4, #0 +_021EFB1A: + lsl r1, r4, #3 + add r3, r0, r1 + strb r2, [r0, r1] + add r1, r4, #1 + lsl r1, r1, #0x18 + lsr r4, r1, #0x18 + str r2, [r3, #4] + cmp r4, #0x15 + blo _021EFB1A + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021EFB0C + + thumb_func_start ov5_021EFB30 +ov5_021EFB30: ; 0x021EFB30 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov5_021EFB30 + + thumb_func_start ov5_021EFB40 +ov5_021EFB40: ; 0x021EFB40 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r0, _021EFB90 ; =0x000007D8 + str r0, [r1, #0] + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EA78 + cmp r0, #0 + bne _021EFB8A + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, sp, #0xc + mov r2, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, r6, #0 + sub r3, r2, #1 + bl sub_020550F4 + add r0, r5, #0 + mov r1, #0x1a + add r2, sp, #0xc + mov r3, #0 + bl sub_02055178 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} +_021EFB8A: + mov r0, #0 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021EFB90: .word 0x000007D8 + thumb_func_end ov5_021EFB40 + + thumb_func_start ov5_021EFB94 +ov5_021EFB94: ; 0x021EFB94 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl ov5_021EFF10 + add r5, r0, #0 + cmp r5, #0x15 + bne _021EFBAA + bl sub_02022974 +_021EFBAA: + ldr r0, [r4, #0xc] + bl sub_0202D834 + bl sub_0202D840 + add r1, r0, #0 + add r0, r5, #0 + bl sub_0202D84C + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov5_021EFF34 + cmp r0, #0 + beq _021EFBCC + mov r0, #3 + pop {r3, r4, r5, pc} +_021EFBCC: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021EFBD6 + mov r0, #2 + pop {r3, r4, r5, pc} +_021EFBD6: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021EFB94 + + thumb_func_start ov5_021EFBDC +ov5_021EFBDC: ; 0x021EFBDC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0x1c] + ldr r0, [r0, #0] + bl ov5_021EFF10 + add r5, r0, #0 + cmp r5, #0x15 + bne _021EFBF2 + bl sub_02022974 +_021EFBF2: + ldr r0, [r6, #0xc] + bl sub_0202D834 + bl sub_0202D840 + str r0, [sp] + ldr r1, [sp] + add r0, r5, #0 + bl sub_0202D84C + add r4, r0, #0 + mov r0, #0x5a + lsl r0, r0, #4 + str r0, [r4, #0] + ldr r0, [r6, #0xc] + bl sub_02025E38 + bl sub_02025F20 + add r1, r5, #0 + bl ov5_021EFF4C + add r7, r0, #0 + ldr r0, [sp] + bl sub_0202D844 + cmp r5, r0 + bne _021EFC56 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #0x64 + blo _021EFC42 + bl sub_02022974 +_021EFC42: + cmp r6, #0x5a + bhs _021EFC56 + add r0, r4, #4 + bl ov5_021EFD58 + ldrb r0, [r4, #6] + bl ov5_021EFDC0 + strb r0, [r4, #7] + pop {r3, r4, r5, r6, r7, pc} +_021EFC56: + add r0, r7, #0 + add r1, r4, #6 + bl ov5_021EFCF8 + ldrb r0, [r4, #6] + cmp r0, #0 + beq _021EFC74 + add r0, r4, #4 + bl ov5_021EFD58 + ldrb r0, [r4, #6] + bl ov5_021EFDAC + strb r0, [r4, #5] + b _021EFC7C +_021EFC74: + mov r0, #0 + strb r0, [r4, #5] + strb r0, [r4, #4] + str r0, [r4, #0] +_021EFC7C: + ldrb r0, [r4, #6] + bl ov5_021EFDC0 + strb r0, [r4, #7] + ldr r1, [sp] + add r0, r5, #0 + bl sub_0202D848 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EFBDC + + thumb_func_start ov5_021EFC90 +ov5_021EFC90: ; 0x021EFC90 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl ov5_021EFF10 + add r4, r0, #0 + cmp r4, #0x15 + bne _021EFCA8 + bl sub_02022974 +_021EFCA8: + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + lsl r4, r4, #3 + add r0, r0, r4 + ldr r0, [r0, #4] + cmp r0, #0 + beq _021EFCF4 + ldr r0, [r5, #0x28] + bl ov5_021E9354 + ldr r1, [r5, #0x28] + add r2, sp, #0 + bl ov5_021E9340 + ldr r0, [sp] + mov r1, #0x1a + bl ov5_021E18CC + add r6, r0, #0 + bl ov5_021E18BC + add r1, r0, #0 + cmp r6, #0 + beq _021EFCEA + add r3, r5, #0 + add r3, #0xa8 + ldr r3, [r3, #0] + ldr r0, [r5, #0x50] + ldrb r3, [r3, r4] + mov r2, #0x1a + bl ov5_021D3D18 +_021EFCEA: + add r5, #0xa8 + ldr r0, [r5, #0] + mov r1, #0 + add r0, r0, r4 + str r1, [r0, #4] +_021EFCF4: + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021EFC90 + + thumb_func_start ov5_021EFCF8 +ov5_021EFCF8: ; 0x021EFCF8 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x64 + blo _021EFD16 + bl sub_02022974 +_021EFD16: + cmp r6, #0 + beq _021EFD3E + cmp r4, #1 + bge _021EFD24 + mov r0, #3 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021EFD24: + cmp r4, #0xa + bge _021EFD2E + mov r0, #0 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021EFD2E: + cmp r4, #0x1e + bge _021EFD38 + mov r0, #1 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021EFD38: + mov r0, #2 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021EFD3E: + cmp r4, #0xa + bge _021EFD48 + mov r0, #0 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021EFD48: + cmp r4, #0x1e + bge _021EFD52 + mov r0, #2 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021EFD52: + mov r0, #1 + strb r0, [r5] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021EFCF8 + + thumb_func_start ov5_021EFD58 +ov5_021EFD58: ; 0x021EFD58 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #0x64 + blo _021EFD74 + bl sub_02022974 +_021EFD74: + cmp r5, #5 + bge _021EFD7E + mov r0, #5 + strb r0, [r4] + pop {r3, r4, r5, pc} +_021EFD7E: + cmp r5, #0xa + bge _021EFD88 + mov r0, #4 + strb r0, [r4] + pop {r3, r4, r5, pc} +_021EFD88: + cmp r5, #0x14 + bge _021EFD92 + mov r0, #3 + strb r0, [r4] + pop {r3, r4, r5, pc} +_021EFD92: + cmp r5, #0x28 + bge _021EFD9C + mov r0, #2 + strb r0, [r4] + pop {r3, r4, r5, pc} +_021EFD9C: + cmp r5, #0x3c + bge _021EFDA6 + mov r0, #1 + strb r0, [r4] + pop {r3, r4, r5, pc} +_021EFDA6: + mov r0, #0 + strb r0, [r4] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EFD58 + + thumb_func_start ov5_021EFDAC +ov5_021EFDAC: ; 0x021EFDAC + cmp r0, #3 + bne _021EFDB4 + mov r0, #2 + bx lr +_021EFDB4: + cmp r0, #2 + bne _021EFDBC + mov r0, #1 + bx lr +_021EFDBC: + mov r0, #0 + bx lr + thumb_func_end ov5_021EFDAC + + thumb_func_start ov5_021EFDC0 +ov5_021EFDC0: ; 0x021EFDC0 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #0x64 + blo _021EFDDC + bl sub_02022974 +_021EFDDC: + cmp r4, #3 + bne _021EFDFC + cmp r5, #5 + bge _021EFDE8 + mov r0, #2 + pop {r3, r4, r5, pc} +_021EFDE8: + cmp r5, #6 + bge _021EFDF0 + mov r0, #1 + pop {r3, r4, r5, pc} +_021EFDF0: + cmp r5, #7 + bge _021EFDF8 + mov r0, #0 + pop {r3, r4, r5, pc} +_021EFDF8: + mov r0, #3 + pop {r3, r4, r5, pc} +_021EFDFC: + cmp r4, #2 + bne _021EFE1C + cmp r5, #0x4b + bge _021EFE08 + mov r0, #2 + pop {r3, r4, r5, pc} +_021EFE08: + cmp r5, #0x5f + bge _021EFE10 + mov r0, #1 + pop {r3, r4, r5, pc} +_021EFE10: + cmp r5, #0x60 + bge _021EFE18 + mov r0, #0 + pop {r3, r4, r5, pc} +_021EFE18: + mov r0, #3 + pop {r3, r4, r5, pc} +_021EFE1C: + cmp r4, #1 + bne _021EFE3C + cmp r5, #0x13 + bge _021EFE28 + mov r0, #2 + pop {r3, r4, r5, pc} +_021EFE28: + cmp r5, #0x4f + bge _021EFE30 + mov r0, #1 + pop {r3, r4, r5, pc} +_021EFE30: + cmp r5, #0x63 + bge _021EFE38 + mov r0, #0 + pop {r3, r4, r5, pc} +_021EFE38: + mov r0, #3 + pop {r3, r4, r5, pc} +_021EFE3C: + cmp r5, #1 + bge _021EFE44 + mov r0, #2 + pop {r3, r4, r5, pc} +_021EFE44: + cmp r5, #0x13 + bge _021EFE4C + mov r0, #1 + pop {r3, r4, r5, pc} +_021EFE4C: + cmp r5, #0x63 + bge _021EFE54 + mov r0, #0 + pop {r3, r4, r5, pc} +_021EFE54: + mov r0, #3 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021EFDC0 + + thumb_func_start ov5_021EFE58 +ov5_021EFE58: ; 0x021EFE58 + mov r2, #1 + cmp r0, #3 + bne _021EFE64 + mov r0, #2 + strb r0, [r1] + b _021EFE78 +_021EFE64: + cmp r0, #2 + bne _021EFE6C + strb r2, [r1] + b _021EFE78 +_021EFE6C: + cmp r0, #1 + bne _021EFE76 + mov r0, #0 + strb r0, [r1] + b _021EFE78 +_021EFE76: + mov r2, #0 +_021EFE78: + add r0, r2, #0 + bx lr + thumb_func_end ov5_021EFE58 + + thumb_func_start ov5_021EFE7C +ov5_021EFE7C: ; 0x021EFE7C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x2c] + add r7, r1, #0 + add r1, r2, #0 + bl sub_02039E68 + bl ov5_021EFF10 + add r4, r0, #0 + cmp r4, #0x15 + beq _021EFF0C + ldr r0, [r5, #0xc] + bl sub_0202D834 + bl sub_0202D840 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0202D84C + add r6, r0, #0 + ldr r0, [r6, #0] + bl ov5_021EFF34 + cmp r0, #0 + beq _021EFF0C + ldrb r0, [r6, #7] + add r1, sp, #4 + bl ov5_021EFE58 + add r6, r0, #0 + beq _021EFF0C + add r0, r7, #0 + mov r1, #0x1a + bl ov5_021E18CC + cmp r0, #0 + beq _021EFF0C + bl ov5_021E18BC + add r3, r5, #0 + add r7, r0, #0 + add r3, #0xa8 + ldr r3, [r3, #0] + lsl r4, r4, #3 + ldrb r3, [r3, r4] + ldr r0, [r5, #0x50] + add r1, r7, #0 + mov r2, #0x1a + bl ov5_021D3D18 + add r1, sp, #4 + add r2, r5, #0 + add r2, #0xa8 + ldrb r0, [r1] + ldr r2, [r2, #0] + add r3, r7, #0 + strb r0, [r2, r4] + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r2, #1 + add r0, r0, r4 + str r6, [r0, #4] + ldr r0, [r5, #0x50] + str r0, [sp] + ldrb r1, [r1] + mov r0, #0x1a + bl ov5_021D3B24 +_021EFF0C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021EFE7C + + thumb_func_start ov5_021EFF10 +ov5_021EFF10: ; 0x021EFF10 + ldr r2, _021EFF30 ; =0x021FF5B4 + mov r3, #0 +_021EFF14: + lsl r1, r3, #2 + ldr r1, [r2, r1] + cmp r0, r1 + bne _021EFF20 + add r0, r3, #0 + bx lr +_021EFF20: + add r1, r3, #1 + lsl r1, r1, #0x18 + lsr r3, r1, #0x18 + cmp r3, #0x15 + blo _021EFF14 + add r0, r3, #0 + bx lr + nop +_021EFF30: .word 0x021FF5B4 + thumb_func_end ov5_021EFF10 + + thumb_func_start ov5_021EFF34 +ov5_021EFF34: ; 0x021EFF34 + cmp r0, #0 + ble _021EFF42 + ldr r1, _021EFF48 ; =0x00000438 + cmp r0, r1 + bgt _021EFF42 + mov r0, #1 + bx lr +_021EFF42: + mov r0, #0 + bx lr + nop +_021EFF48: .word 0x00000438 + thumb_func_end ov5_021EFF34 + + thumb_func_start ov5_021EFF4C +ov5_021EFF4C: ; 0x021EFF4C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + lsr r2, r0, #0x18 + add r1, sp, #0 + strb r2, [r1] + lsr r2, r0, #0x10 + strb r2, [r1, #1] + lsr r2, r0, #8 + strb r2, [r1, #2] + strb r0, [r1, #3] + ldrb r0, [r1] + mov r1, #0x15 + bl sub_020E1F6C + add r0, sp, #0 + strb r1, [r0] + ldrb r0, [r0, #1] + mov r1, #0x15 + bl sub_020E1F6C + add r0, sp, #0 + strb r1, [r0, #1] + ldrb r0, [r0, #2] + mov r1, #0x15 + bl sub_020E1F6C + add r0, sp, #0 + strb r1, [r0, #2] + ldrb r0, [r0, #3] + mov r1, #0x15 + bl sub_020E1F6C + add r0, sp, #0 + strb r1, [r0, #3] + mov r0, #0 + mov r3, #1 + add r1, sp, #0 + add r2, r0, #0 +_021EFF98: + add r5, r2, #0 + cmp r3, #0 + bls _021EFFBC +_021EFF9E: + ldrb r7, [r1, r5] + ldrb r6, [r1, r3] + cmp r7, r6 + bne _021EFFB2 + add r6, r6, #1 + strb r6, [r1, r3] + ldrb r6, [r1, r3] + cmp r6, #0x15 + blo _021EFFB2 + strb r0, [r1, r3] +_021EFFB2: + add r5, r5, #1 + lsl r5, r5, #0x18 + lsr r5, r5, #0x18 + cmp r5, r3 + blo _021EFF9E +_021EFFBC: + add r3, r3, #1 + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + cmp r3, #4 + blo _021EFF98 + mov r2, #0 + add r1, sp, #0 +_021EFFCA: + ldrb r0, [r1, r2] + cmp r4, r0 + bne _021EFFD4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021EFFD4: + add r0, r2, #1 + lsl r0, r0, #0x18 + lsr r2, r0, #0x18 + cmp r2, #4 + blo _021EFFCA + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021EFF4C + + thumb_func_start ov5_021EFFE4 +ov5_021EFFE4: ; 0x021EFFE4 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r0, [r0, #0] + bl ov5_021EFF10 + add r5, r0, #0 + cmp r5, #0x15 + bne _021EFFFA + bl sub_02022974 +_021EFFFA: + ldr r0, [r4, #0xc] + bl sub_0202D834 + bl sub_0202D840 + add r1, r0, #0 + add r0, r5, #0 + bl sub_0202D84C + add r4, r0, #0 + ldrb r1, [r4, #5] + mov r0, #0x6a + lsl r2, r1, #2 + ldr r1, _021F002C ; =0x021FF5A8 + ldr r1, [r1, r2] + mov r2, #4 + bl sub_02006ADC + ldrb r1, [r4, #4] + lsl r1, r1, #2 + ldr r4, [r0, r1] + bl sub_020181C4 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021F002C: .word 0x021FF5A8 + thumb_func_end ov5_021EFFE4 + + thumb_func_start ov5_021F0030 +ov5_021F0030: ; 0x021F0030 + push {r3, lr} + add r3, r1, #0 + bmi _021F003E + add r1, r2, #0 + add r2, r3, #0 + bl ov5_021EFE7C +_021F003E: + pop {r3, pc} + thumb_func_end ov5_021F0030 + + thumb_func_start ov5_021F0040 +ov5_021F0040: ; 0x021F0040 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl ov5_021EFF10 + add r4, r0, #0 + cmp r4, #0x15 + bne _021F0056 + bl sub_02022974 +_021F0056: + add r0, r5, #0 + add r0, #0xa8 + ldr r1, [r0, #0] + lsl r0, r4, #3 + mov r2, #0 + add r0, r1, r0 + str r2, [r0, #4] + ldr r0, [r5, #0xc] + bl sub_0202D834 + bl sub_0202D840 + add r1, r0, #0 + add r0, r4, #0 + bl sub_0202D84C + mov r1, #0 + str r1, [r0, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F0040 + + .rodata + + + .global Unk_ov5_021FF5A8 +Unk_ov5_021FF5A8: ; 0x021FF5A8 + .incbin "incbin/overlay5_rodata.bin", 0x6C94, 0x6CA0 - 0x6C94 + + .global Unk_ov5_021FF5B4 +Unk_ov5_021FF5B4: ; 0x021FF5B4 + .incbin "incbin/overlay5_rodata.bin", 0x6CA0, 0x54 + diff --git a/asm/ov5_021F007C.s b/asm/ov5_021F007C.s new file mode 100644 index 000000000..6e2492cf7 --- /dev/null +++ b/asm/ov5_021F007C.s @@ -0,0 +1,866 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F007C +ov5_021F007C: ; 0x021F007C + push {r4, lr} + add r4, r2, #0 + mov r0, #0x41 + mov r1, #0x37 + add r2, r4, #4 + mov r3, #4 + bl sub_02006F88 + str r0, [r4, #0] + mov r1, #0 + str r1, [r4, #0x3c] + add r4, #0x28 + add r0, r4, #0 + mov r2, #8 + mov r3, #0x13 + bl ov5_021F02B8 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021F00B8 ; =0x00000648 + bl sub_02005748 + pop {r4, pc} + nop +_021F00B8: .word 0x00000648 + thumb_func_end ov5_021F007C + + thumb_func_start ov5_021F00BC +ov5_021F00BC: ; 0x021F00BC + push {r4, lr} + add r4, r2, #0 + mov r0, #0x41 + mov r1, #0x37 + add r2, r4, #4 + mov r3, #4 + bl sub_02006F88 + str r0, [r4, #0] + add r0, r4, #0 + mov r2, #0 + add r0, #0x28 + mov r1, #8 + mov r3, #0x13 + str r2, [r4, #0x3c] + bl ov5_021F02B8 + mov r0, #0 + str r0, [r4, #0x3c] + pop {r4, pc} + thumb_func_end ov5_021F00BC + + thumb_func_start ov5_021F00E4 +ov5_021F00E4: ; 0x021F00E4 + ldr r3, _021F00EC ; =sub_020181C4 + ldr r0, [r2, #0] + bx r3 + nop +_021F00EC: .word sub_020181C4 + thumb_func_end ov5_021F00E4 + + thumb_func_start ov5_021F00F0 +ov5_021F00F0: ; 0x021F00F0 + push {r3, r4, lr} + sub sp, #4 + add r4, r2, #0 + ldr r0, [r4, #0x3c] + cmp r0, #1 + beq _021F0132 + add r0, r4, #0 + add r0, #0x28 + bl ov5_021F02C8 + cmp r0, #0 + beq _021F010C + mov r0, #1 + str r0, [r4, #0x3c] +_021F010C: + ldr r0, _021F0138 ; =0x00005D5F + add r1, r4, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r3, [r4, #0x28] + ldr r0, [r0, #0xc] + lsl r3, r3, #0x18 + add r1, #8 + mov r2, #1 + lsr r3, r3, #0x18 + bl sub_020039F8 + add r4, #8 + mov r0, #2 + add r1, r4, #0 + mov r2, #0x20 + mov r3, #0xc0 + bl sub_0201972C +_021F0132: + add sp, #4 + pop {r3, r4, pc} + nop +_021F0138: .word 0x00005D5F + thumb_func_end ov5_021F00F0 + + thumb_func_start ov5_021F013C +ov5_021F013C: ; 0x021F013C + push {r3, r4, lr} + sub sp, #4 + ldr r0, [r1, #8] + add r4, r2, #0 + bl ov5_021F0260 + add r0, r4, #0 + mov r1, #0 + mov r2, #0xa + mov r3, #0x13 + bl ov5_021F02B8 + mov r3, #0 + str r3, [r4, #0x14] + mov r0, #0x10 + str r0, [sp] + ldr r0, _021F0180 ; =0x04000050 + mov r1, #4 + mov r2, #0x29 + bl sub_020BF55C + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _021F0184 ; =0x00000648 + bl sub_02005748 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_021F0180: .word 0x04000050 +_021F0184: .word 0x00000648 + thumb_func_end ov5_021F013C + + thumb_func_start ov5_021F0188 +ov5_021F0188: ; 0x021F0188 + push {r3, r4, lr} + sub sp, #4 + ldr r0, [r1, #8] + add r4, r2, #0 + bl ov5_021F0260 + add r0, r4, #0 + mov r1, #0xa + mov r2, #0 + mov r3, #0xf + bl ov5_021F02B8 + mov r0, #0 + str r0, [r4, #0x14] + mov r0, #6 + str r0, [sp] + ldr r0, _021F01B8 ; =0x04000050 + mov r1, #4 + mov r2, #0x21 + mov r3, #0xa + bl sub_020BF55C + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_021F01B8: .word 0x04000050 + thumb_func_end ov5_021F0188 + + thumb_func_start ov5_021F01BC +ov5_021F01BC: ; 0x021F01BC + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F01BC + + thumb_func_start ov5_021F01C0 +ov5_021F01C0: ; 0x021F01C0 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0x14] + cmp r0, #1 + beq _021F01E6 + add r0, r4, #0 + bl ov5_021F02C8 + cmp r0, #0 + beq _021F01D8 + mov r0, #1 + str r0, [r4, #0x14] +_021F01D8: + ldr r1, [r4, #0] + mov r0, #0x10 + sub r0, r0, r1 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _021F01E8 ; =0x04000052 + strh r1, [r0] +_021F01E6: + pop {r4, pc} + ; .align 2, 0 +_021F01E8: .word 0x04000052 + thumb_func_end ov5_021F01C0 + + thumb_func_start ov5_021F01EC +ov5_021F01EC: ; 0x021F01EC + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F01EC + + thumb_func_start ov5_021F01F0 +ov5_021F01F0: ; 0x021F01F0 + ldr r0, [r0, #4] + ldr r3, _021F01FC ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _021F0200 ; =0x021FF658 + bx r3 + nop +_021F01FC: .word ov5_021D1B6C +_021F0200: .word 0x021FF658 + thumb_func_end ov5_021F01F0 + + thumb_func_start ov5_021F0204 +ov5_021F0204: ; 0x021F0204 + ldr r0, [r0, #4] + ldr r3, _021F0210 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _021F0214 ; =0x021FF610 + bx r3 + nop +_021F0210: .word ov5_021D1B6C +_021F0214: .word 0x021FF610 + thumb_func_end ov5_021F0204 + + thumb_func_start ov5_021F0218 +ov5_021F0218: ; 0x021F0218 + ldr r3, _021F021C ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_021F021C: .word ov5_021D1BEC + thumb_func_end ov5_021F0218 + + thumb_func_start ov5_021F0220 +ov5_021F0220: ; 0x021F0220 + push {r3, lr} + bl ov5_021D1C2C + ldr r0, [r0, #0x14] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0220 + + thumb_func_start ov5_021F022C +ov5_021F022C: ; 0x021F022C + ldr r0, [r0, #4] + ldr r3, _021F0238 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _021F023C ; =0x021FF628 + bx r3 + nop +_021F0238: .word ov5_021D1B6C +_021F023C: .word 0x021FF628 + thumb_func_end ov5_021F022C + + thumb_func_start ov5_021F0240 +ov5_021F0240: ; 0x021F0240 + ldr r0, [r0, #4] + ldr r3, _021F024C ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _021F0250 ; =0x021FF640 + bx r3 + nop +_021F024C: .word ov5_021D1B6C +_021F0250: .word 0x021FF640 + thumb_func_end ov5_021F0240 + + thumb_func_start ov5_021F0254 +ov5_021F0254: ; 0x021F0254 + push {r3, lr} + bl ov5_021D1C2C + ldr r0, [r0, #0x3c] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0254 + + thumb_func_start ov5_021F0260 +ov5_021F0260: ; 0x021F0260 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r1, _021F02B0 ; =0x00005D5F + add r5, r0, #0 + add r0, sp, #4 + strh r1, [r0] + mov r0, #2 + add r1, sp, #4 + add r2, r0, #0 + mov r3, #0xc2 + bl sub_0201972C + mov r0, #4 + mov r1, #0x20 + bl sub_02018144 + mov r1, #0x11 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #2 + add r2, r4, #0 + mov r3, #0x20 + bl sub_0201958C + add r0, r4, #0 + bl sub_020181C4 + ldr r2, _021F02B4 ; =0x00006001 + add r0, r5, #0 + mov r1, #2 + bl sub_02019EE0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_021F02B0: .word 0x00005D5F +_021F02B4: .word 0x00006001 + thumb_func_end ov5_021F0260 + + thumb_func_start ov5_021F02B8 +ov5_021F02B8: ; 0x021F02B8 + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0x10] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov5_021F02B8 + + thumb_func_start ov5_021F02C8 +ov5_021F02C8: ; 0x021F02C8 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + ldr r0, [r4, #0xc] + mul r0, r1 + ldr r1, [r4, #0x10] + bl sub_020E1F6C + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r0, #1 + cmp r0, r1 + bgt _021F02EE + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_021F02EE: + str r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021F02C8 + + thumb_func_start ov5_021F02F4 +ov5_021F02F4: ; 0x021F02F4 + ldr r3, _021F02FC ; =sub_0201975C + mov r0, #2 + mov r1, #0 + bx r3 + ; .align 2, 0 +_021F02FC: .word sub_0201975C + thumb_func_end ov5_021F02F4 + + thumb_func_start ov5_021F0300 +ov5_021F0300: ; 0x021F0300 + ldr r3, _021F0308 ; =sub_0201975C + mov r0, #2 + ldr r1, _021F030C ; =0x00007FFF + bx r3 + ; .align 2, 0 +_021F0308: .word sub_0201975C +_021F030C: .word 0x00007FFF + thumb_func_end ov5_021F0300 + + thumb_func_start ov5_021F0310 +ov5_021F0310: ; 0x021F0310 + push {r4, lr} + sub sp, #8 + ldr r1, _021F0368 ; =0x00007FFF + add r4, r0, #0 + add r0, sp, #4 + strh r1, [r0] + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r1, _021F036C ; =0x0400000C + mov r0, #3 + ldrh r2, [r1] + mov r3, #0xc4 + bic r2, r0 + mov r0, #3 + orr r0, r2 + strh r0, [r1] + mov r0, #2 + add r1, sp, #4 + add r2, r0, #0 + bl sub_0201972C + mov r1, #2 + str r1, [sp] + ldr r0, [r4, #8] + add r2, r1, #0 + mov r3, #1 + bl sub_020196C0 + ldr r0, [r4, #8] + ldr r2, _021F0370 ; =0x00006002 + mov r1, #2 + bl sub_02019EE0 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r4, #0 + bl ov5_021F02F4 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_021F0368: .word 0x00007FFF +_021F036C: .word 0x0400000C +_021F0370: .word 0x00006002 + thumb_func_end ov5_021F0310 + + thumb_func_start ov5_021F0374 +ov5_021F0374: ; 0x021F0374 + push {r4, lr} + sub sp, #8 + ldr r1, _021F03CC ; =0x00007FFF + add r4, r0, #0 + add r0, sp, #4 + strh r1, [r0] + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + ldr r1, _021F03D0 ; =0x0400000E + mov r0, #3 + ldrh r2, [r1] + mov r3, #0xc4 + bic r2, r0 + mov r0, #3 + orr r2, r0 + strh r2, [r1] + add r1, sp, #4 + mov r2, #2 + bl sub_0201972C + mov r2, #2 + str r2, [sp] + ldr r0, [r4, #8] + mov r1, #3 + mov r3, #1 + bl sub_020196C0 + ldr r0, [r4, #8] + ldr r2, _021F03D4 ; =0x00006002 + mov r1, #3 + bl sub_02019EE0 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + add r0, r4, #0 + bl ov5_021F02F4 + add sp, #8 + pop {r4, pc} + nop +_021F03CC: .word 0x00007FFF +_021F03D0: .word 0x0400000E +_021F03D4: .word 0x00006002 + thumb_func_end ov5_021F0374 + + thumb_func_start ov5_021F03D8 +ov5_021F03D8: ; 0x021F03D8 + push {r3, lr} + ldr r0, [r0, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + bne _021F03E6 + mov r0, #0 + pop {r3, pc} +_021F03E6: + bl ov5_021D5FE0 + ldr r3, _021F0404 ; =0x021FF608 + mov r2, #0 +_021F03EE: + ldr r1, [r3, #0] + cmp r0, r1 + bne _021F03F8 + mov r0, #1 + pop {r3, pc} +_021F03F8: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, #1 + blo _021F03EE + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021F0404: .word 0x021FF608 + thumb_func_end ov5_021F03D8 + + thumb_func_start ov5_021F0408 +ov5_021F0408: ; 0x021F0408 + push {r3, lr} + ldr r0, [r0, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + bne _021F0416 + mov r0, #0 + pop {r3, pc} +_021F0416: + bl ov5_021D5FE0 + ldr r3, _021F0434 ; =0x021FF60C + mov r2, #0 +_021F041E: + ldr r1, [r3, #0] + cmp r0, r1 + bne _021F0428 + mov r0, #1 + pop {r3, pc} +_021F0428: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, #1 + blt _021F041E + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021F0434: .word 0x021FF60C + thumb_func_end ov5_021F0408 + + thumb_func_start ov5_021F0438 +ov5_021F0438: ; 0x021F0438 + push {r3, lr} + ldr r0, [r0, #4] + ldr r0, [r0, #0xc] + cmp r0, #0 + bne _021F0446 + mov r0, #0 + pop {r3, pc} +_021F0446: + bl ov5_021D5FE0 + ldr r3, _021F0464 ; =0x021FF670 + mov r2, #0 +_021F044E: + ldr r1, [r3, #0] + cmp r0, r1 + bne _021F0458 + mov r0, #0 + pop {r3, pc} +_021F0458: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, #0x12 + blt _021F044E + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 +_021F0464: .word 0x021FF670 + thumb_func_end ov5_021F0438 + + thumb_func_start ov5_021F0468 +ov5_021F0468: ; 0x021F0468 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F047A + bl ov5_021F0218 + mov r0, #0 + str r0, [r4, #0] +_021F047A: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0468 + + thumb_func_start ov5_021F0484 +ov5_021F0484: ; 0x021F0484 + mov r0, #0x10 + bx lr + thumb_func_end ov5_021F0484 + + thumb_func_start ov5_021F0488 +ov5_021F0488: ; 0x021F0488 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r4, r0, #0 + ldrh r1, [r4, #0xc] + cmp r1, #9 + bls _021F04A2 + b _021F0668 +_021F04A2: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021F04AE: ; jump table + .short _021F04C2 - _021F04AE - 2 ; case 0 + .short _021F04F6 - _021F04AE - 2 ; case 1 + .short _021F0520 - _021F04AE - 2 ; case 2 + .short _021F0540 - _021F04AE - 2 ; case 3 + .short _021F0594 - _021F04AE - 2 ; case 4 + .short _021F05B6 - _021F04AE - 2 ; case 5 + .short _021F0600 - _021F04AE - 2 ; case 6 + .short _021F0622 - _021F04AE - 2 ; case 7 + .short _021F0642 - _021F04AE - 2 ; case 8 + .short _021F0654 - _021F04AE - 2 ; case 9 +_021F04C2: + add r0, r5, #0 + bl ov5_021F0438 + cmp r0, #1 + bne _021F04EC + mov r0, #1 + strh r0, [r4, #0xc] + add r0, r5, #0 + bl ov5_021F03D8 + str r0, [r4, #8] + add r0, r5, #0 + bl ov5_021F0408 + str r0, [r4, #4] + cmp r0, #0 + beq _021F055C + add r0, r5, #0 + bl ov5_021F0300 + b _021F066C +_021F04EC: + mov r0, #7 + strh r0, [r4, #0xc] + mov r0, #0x14 + strh r0, [r4, #0xe] + b _021F066C +_021F04F6: + ldr r0, [r4, #8] + cmp r0, #0 + bne _021F0504 + add r0, r5, #0 + bl ov5_021F01F0 + b _021F050A +_021F0504: + add r0, r5, #0 + bl ov5_021F022C +_021F050A: + str r0, [r4, #0] + mov r0, #2 + mov r1, #0 + strh r0, [r4, #0xc] + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _021F066C +_021F0520: + ldr r0, [r4, #8] + cmp r0, #0 + ldr r0, [r4, #0] + bne _021F052E + bl ov5_021F0220 + b _021F0532 +_021F052E: + bl ov5_021F0254 +_021F0532: + cmp r0, #1 + bne _021F055C + mov r0, #0x16 + strh r0, [r4, #0xe] + mov r0, #3 + strh r0, [r4, #0xc] + b _021F066C +_021F0540: + mov r0, #0xe + ldrsh r0, [r4, r0] + sub r0, r0, #1 + strh r0, [r4, #0xe] + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A0EC + cmp r0, #0 + beq _021F058E + mov r0, #0xe + ldrsh r0, [r4, r0] + cmp r0, #0 + blt _021F055E +_021F055C: + b _021F066C +_021F055E: + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_02054F94 + add r1, r0, #0 + add r0, r5, #0 + bl ov6_02242110 + cmp r0, #0 + beq _021F0588 + mov r0, #6 + strh r0, [r4, #0xc] + b _021F066C +_021F0588: + mov r0, #4 + strh r0, [r4, #0xc] + b _021F066C +_021F058E: + mov r0, #4 + strh r0, [r4, #0xc] + b _021F066C +_021F0594: + ldr r0, [r4, #0] + bl ov5_021F0218 + ldr r0, [r4, #8] + cmp r0, #0 + bne _021F05A8 + add r0, r5, #0 + bl ov5_021F0204 + b _021F05AE +_021F05A8: + add r0, r5, #0 + bl ov5_021F0240 +_021F05AE: + str r0, [r4, #0] + mov r0, #5 + strh r0, [r4, #0xc] + b _021F066C +_021F05B6: + ldr r0, [r4, #8] + cmp r0, #0 + ldr r0, [r4, #0] + bne _021F05C4 + bl ov5_021F0220 + b _021F05C8 +_021F05C4: + bl ov5_021F0254 +_021F05C8: + cmp r0, #1 + bne _021F066C + ldr r0, [r4, #8] + cmp r0, #0 + bne _021F05F2 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _021F0670 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + mov r0, #2 + mov r1, #3 + bl sub_02019060 + ldr r0, [r5, #8] + mov r1, #2 + bl sub_02019EBC + b _021F05FA +_021F05F2: + mov r0, #2 + mov r1, #1 + bl sub_02019060 +_021F05FA: + mov r0, #8 + strh r0, [r4, #0xc] + b _021F066C +_021F0600: + bl ov5_021F0468 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021F0610 + add r0, r5, #0 + bl ov5_021F0374 +_021F0610: + add r0, r5, #0 + add r1, r6, #0 + bl ov6_022411C8 + cmp r0, #0 + bne _021F066C + bl sub_02022974 + b _021F066C +_021F0622: + mov r0, #0xe + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, #0xe] + ldrsh r0, [r4, r0] + cmp r0, #0 + bge _021F066C + mov r2, #0 + ldr r1, _021F0674 ; =0x000007ED + add r0, r6, #0 + add r3, r2, #0 + bl sub_0203E8E0 + mov r0, #9 + strh r0, [r4, #0xc] + b _021F066C +_021F0642: + mov r2, #0 + ldr r1, _021F0678 ; =0x000007EC + add r0, r6, #0 + add r3, r2, #0 + bl sub_0203E8E0 + mov r0, #9 + strh r0, [r4, #0xc] + b _021F066C +_021F0654: + bl ov5_021F0468 + ldr r0, [r4, #4] + cmp r0, #0 + beq _021F0664 + add r0, r5, #0 + bl ov5_021F0310 +_021F0664: + mov r0, #1 + pop {r4, r5, r6, pc} +_021F0668: + bl sub_02022974 +_021F066C: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F0670: .word 0x04000050 +_021F0674: .word 0x000007ED +_021F0678: .word 0x000007EC + thumb_func_end ov5_021F0488 + + .rodata + + + .global Unk_ov5_021FF608 +Unk_ov5_021FF608: ; 0x021FF608 + .incbin "incbin/overlay5_rodata.bin", 0x6CF4, 0x6CF8 - 0x6CF4 + + .global Unk_ov5_021FF60C +Unk_ov5_021FF60C: ; 0x021FF60C + .incbin "incbin/overlay5_rodata.bin", 0x6CF8, 0x6CFC - 0x6CF8 + + .global Unk_ov5_021FF610 +Unk_ov5_021FF610: ; 0x021FF610 + .incbin "incbin/overlay5_rodata.bin", 0x6CFC, 0x6D14 - 0x6CFC + + .global Unk_ov5_021FF628 +Unk_ov5_021FF628: ; 0x021FF628 + .incbin "incbin/overlay5_rodata.bin", 0x6D14, 0x6D2C - 0x6D14 + + .global Unk_ov5_021FF640 +Unk_ov5_021FF640: ; 0x021FF640 + .incbin "incbin/overlay5_rodata.bin", 0x6D2C, 0x6D44 - 0x6D2C + + .global Unk_ov5_021FF658 +Unk_ov5_021FF658: ; 0x021FF658 + .incbin "incbin/overlay5_rodata.bin", 0x6D44, 0x6D5C - 0x6D44 + + .global Unk_ov5_021FF670 +Unk_ov5_021FF670: ; 0x021FF670 + .incbin "incbin/overlay5_rodata.bin", 0x6D5C, 0x48 + diff --git a/asm/ov5_021F067C.s b/asm/ov5_021F067C.s new file mode 100644 index 000000000..b2f1825ee --- /dev/null +++ b/asm/ov5_021F067C.s @@ -0,0 +1,265 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F067C +ov5_021F067C: ; 0x021F067C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r2, #0 + lsl r2, r3, #3 + add r6, r5, r2 + add r6, #0x18 + str r2, [sp, #8] + add r2, r6, #0 + str r0, [sp] + add r7, r1, #0 + str r3, [sp, #4] + bl sub_02017FC8 + cmp r0, #1 + beq _021F069E + bl sub_02022974 +_021F069E: + sub r5, r6, r5 + add r0, r7, #0 + add r1, r5, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021F06B0 + bl sub_02022974 +_021F06B0: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + ldr r0, [sp] + str r0, [r4, #0] + ldr r0, [sp, #4] + str r7, [r4, #4] + str r0, [r4, #8] + ldr r0, [sp, #8] + str r6, [r4, #0xc] + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0x18 + str r0, [r4, #0x14] + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F067C + + thumb_func_start ov5_021F06D8 +ov5_021F06D8: ; 0x021F06D8 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r4, [r6, #8] + ldr r5, [r6, #0x14] + cmp r4, #0 + beq _021F06FA +_021F06E4: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021F06F2 + ldr r1, [r5, #4] + add r0, r6, #0 + bl ov5_021F0740 +_021F06F2: + sub r4, r4, #1 + add r5, #8 + cmp r4, #0 + bne _021F06E4 +_021F06FA: + ldr r4, [r6, #4] + add r0, r6, #0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0201807C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F06D8 + + thumb_func_start ov5_021F070C +ov5_021F070C: ; 0x021F070C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021F07FC + str r0, [sp] + cmp r0, #0 + bne _021F0724 + bl sub_02022974 +_021F0724: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov5_021F07B4 + add r5, r0, #0 + ldr r0, [sp] + add r1, r4, #0 + add r2, r5, #0 + bl ov5_021F0814 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F070C + + thumb_func_start ov5_021F0740 +ov5_021F0740: ; 0x021F0740 + push {r4, lr} + bl ov5_021F07DC + add r4, r0, #0 + bne _021F074E + bl sub_02022974 +_021F074E: + ldr r0, [r4, #0] + bl ov5_021F07D4 + add r0, r4, #0 + bl ov5_021F081C + pop {r4, pc} + thumb_func_end ov5_021F0740 + + thumb_func_start ov5_021F075C +ov5_021F075C: ; 0x021F075C + push {r4, lr} + bl ov5_021F07DC + add r4, r0, #0 + bne _021F076A + bl sub_02022974 +_021F076A: + ldr r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F075C + + thumb_func_start ov5_021F0770 +ov5_021F0770: ; 0x021F0770 + push {r3, lr} + bl ov5_021F07DC + cmp r0, #0 + beq _021F077E + mov r0, #1 + pop {r3, pc} +_021F077E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0770 + + thumb_func_start ov5_021F0784 +ov5_021F0784: ; 0x021F0784 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r5, r0, #0 + add r7, r3, #0 + add r6, r1, #0 + add r0, r4, #0 + add r1, r7, #0 + bl sub_02006D84 + add r2, r0, #0 + ldr r3, [sp, #0x18] + add r0, r5, #0 + add r1, r6, #0 + bl ov5_021F070C + add r5, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_02006D28 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0784 + + thumb_func_start ov5_021F07B4 +ov5_021F07B4: ; 0x021F07B4 + push {r4, lr} + cmp r2, #0 + ldr r0, [r0, #4] + bne _021F07C2 + bl sub_02018144 + b _021F07C6 +_021F07C2: + bl sub_02018184 +_021F07C6: + add r4, r0, #0 + cmp r4, #0 + bne _021F07D0 + bl sub_02022974 +_021F07D0: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov5_021F07B4 + + thumb_func_start ov5_021F07D4 +ov5_021F07D4: ; 0x021F07D4 + ldr r3, _021F07D8 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_021F07D8: .word sub_020181C4 + thumb_func_end ov5_021F07D4 + + thumb_func_start ov5_021F07DC +ov5_021F07DC: ; 0x021F07DC + ldr r3, [r0, #8] + ldr r0, [r0, #0x14] + cmp r3, #0 + beq _021F07F6 +_021F07E4: + ldr r2, [r0, #0] + cmp r2, #0 + beq _021F07F0 + ldr r2, [r0, #4] + cmp r2, r1 + beq _021F07F8 +_021F07F0: + add r0, #8 + sub r3, r3, #1 + bne _021F07E4 +_021F07F6: + mov r0, #0 +_021F07F8: + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F07DC + + thumb_func_start ov5_021F07FC +ov5_021F07FC: ; 0x021F07FC + ldr r2, [r0, #8] + ldr r0, [r0, #0x14] + cmp r2, #0 + beq _021F0810 +_021F0804: + ldr r1, [r0, #0] + cmp r1, #0 + beq _021F0812 + add r0, #8 + sub r2, r2, #1 + bne _021F0804 +_021F0810: + mov r0, #0 +_021F0812: + bx lr + thumb_func_end ov5_021F07FC + + thumb_func_start ov5_021F0814 +ov5_021F0814: ; 0x021F0814 + str r2, [r0, #0] + str r1, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F0814 + + thumb_func_start ov5_021F081C +ov5_021F081C: ; 0x021F081C + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #4] + bx lr + thumb_func_end ov5_021F081C \ No newline at end of file diff --git a/asm/ov5_021F0824.s b/asm/ov5_021F0824.s new file mode 100644 index 000000000..59c9a8abd --- /dev/null +++ b/asm/ov5_021F0824.s @@ -0,0 +1,88 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F0824 +ov5_021F0824: ; 0x021F0824 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r6, r0, #0 + ldr r0, [r6, #0xc] + bl sub_0205A080 + add r7, r0, #0 + beq _021F08C8 + bl ov23_02242E28 + add r4, r0, #0 + bl ov23_02242E40 + lsl r1, r4, #0x15 + lsl r0, r0, #0x15 + mov r5, #0 + str r1, [sp, #0xc] + str r0, [sp, #8] +_021F0848: + add r0, r7, #0 + add r1, r5, #0 + bl sub_020293B0 + add r4, r0, #0 + bl sub_020573FC + str r0, [sp, #0x10] + add r0, r4, #0 + bl sub_0205740C + str r0, [sp, #0x14] + cmp r4, #0 + beq _021F08C2 + add r0, r7, #0 + add r1, r5, #0 + bl sub_020293FC + str r0, [sp, #0x18] + add r0, r7, #0 + add r1, r5, #0 + bl sub_0202942C + mov r2, #1 + ldr r1, [sp, #0x18] + lsl r2, r2, #0xc + str r2, [sp, #0x20] + lsl r1, r1, #0x10 + lsl r0, r0, #0x10 + ldr r2, [sp, #0xc] + str r1, [sp, #0x1c] + add r1, r1, r2 + ldr r2, [sp, #8] + str r0, [sp, #0x24] + add r0, r0, r2 + ldr r2, [sp, #0x10] + str r1, [sp, #0x1c] + lsl r2, r2, #0xf + add r1, r1, r2 + str r1, [sp, #0x1c] + ldr r1, [sp, #0x14] + str r0, [sp, #0x24] + lsl r1, r1, #0xf + add r0, r0, r1 + str r0, [sp, #0x24] + ldr r0, [r6, #0x30] + add r1, r4, #0 + bl ov5_021EFAE8 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r6, #0x50] + add r3, sp, #0x1c + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r6, #0x30] + bl ov5_021E19CC +_021F08C2: + add r5, r5, #1 + cmp r5, #0x20 + blt _021F0848 +_021F08C8: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F0824 \ No newline at end of file diff --git a/asm/ov5_021F08CC.s b/asm/ov5_021F08CC.s new file mode 100644 index 000000000..89e8f1637 --- /dev/null +++ b/asm/ov5_021F08CC.s @@ -0,0 +1,825 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F08CC +ov5_021F08CC: ; 0x021F08CC + push {r3, r4, r5, lr} + add r0, r1, #0 + mov r1, #0x18 + add r5, r2, #0 + bl sub_02018184 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x18 + mov r0, #0 +_021F08E0: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _021F08E0 + add r0, r5, #0 + str r5, [r4, #0xc] + bl ov5_021F0E58 + str r0, [r4, #4] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F08CC + + thumb_func_start ov5_021F08F8 +ov5_021F08F8: ; 0x021F08F8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_02050A60 + add r4, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r5, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021F0916 + cmp r0, #1 + beq _021F0942 + b _021F09B0 +_021F0916: + ldr r0, [r4, #0x38] + bl sub_02062C48 + mov r0, #0 + str r0, [r5, #0x10] + add r2, r5, #0 + ldr r1, [r5, #0xc] + add r0, r4, #0 + add r2, #0x10 + bl ov6_0224106C + str r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r5, #8] + add r0, r4, #0 + bl ov5_021F09B4 + str r0, [r5, #0x14] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021F09B0 +_021F0942: + ldr r0, [r5, #0x14] + bl ov5_021F09D8 + cmp r0, #1 + bne _021F09B0 + ldr r0, [r5, #0x14] + bl ov5_021F09E4 + add r7, r0, #0 + ldr r0, [r5, #0x14] + bl ov5_021F09F0 + cmp r7, #1 + ldr r0, [r5, #0x10] + bne _021F0998 + ldr r0, [r0, #8] + mov r1, #0 + bl sub_0207A0FC + ldr r2, [r5, #4] + add r3, r0, #0 + lsl r2, r2, #0x10 + add r0, r4, #0 + mov r1, #1 + lsr r2, r2, #0x10 + bl sub_0206D340 + ldr r0, [r4, #0xc] + bl sub_0202CD88 + mov r1, #0xa + bl sub_0202CF28 + ldr r2, [r5, #0x10] + add r0, r4, #0 + add r1, r6, #0 + bl sub_02050E78 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021F0998: + cmp r0, #0 + beq _021F09A0 + bl sub_020520A4 +_021F09A0: + ldr r0, [r4, #0x38] + bl sub_02062C78 + add r0, r5, #0 + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021F09B0: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F08F8 + + thumb_func_start ov5_021F09B4 +ov5_021F09B4: ; 0x021F09B4 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x4c + add r4, r1, #0 + add r6, r2, #0 + bl ov5_021F0D1C + add r1, r0, #0 + str r5, [r1, #0x20] + str r4, [r1, #0x1c] + ldr r0, _021F09D4 ; =ov5_021F0A04 + mov r2, #0x80 + str r6, [r1, #0] + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F09D4: .word ov5_021F0A04 + thumb_func_end ov5_021F09B4 + + thumb_func_start ov5_021F09D8 +ov5_021F09D8: ; 0x021F09D8 + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #4] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F09D8 + + thumb_func_start ov5_021F09E4 +ov5_021F09E4: ; 0x021F09E4 + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #8] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F09E4 + + thumb_func_start ov5_021F09F0 +ov5_021F09F0: ; 0x021F09F0 + push {r4, lr} + add r4, r0, #0 + bl sub_0201CED0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov5_021F09F0 + + thumb_func_start ov5_021F0A04 +ov5_021F0A04: ; 0x021F0A04 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r0, [r5, #0x20] + ldr r6, [r0, #0x3c] + add r0, r6, #0 + bl sub_0205EB3C + ldr r7, _021F0A2C ; =0x021FFA0C + add r4, r0, #0 +_021F0A16: + ldr r3, [r5, #0xc] + add r0, r5, #0 + lsl r3, r3, #2 + ldr r3, [r7, r3] + add r1, r6, #0 + add r2, r4, #0 + blx r3 + cmp r0, #0 + bne _021F0A16 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F0A2C: .word 0x021FFA0C + thumb_func_end ov5_021F0A04 + + thumb_func_start ov5_021F0A30 +ov5_021F0A30: ; 0x021F0A30 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r0, #0 + bl ov5_021F0D6C + add r0, r4, #0 + bl sub_02062DDC + mov r0, #1 + str r0, [r5, #0xc] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0A30 + + thumb_func_start ov5_021F0A48 +ov5_021F0A48: ; 0x021F0A48 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r1, #0 + bl sub_020655F4 + cmp r0, #1 + bne _021F0A7A + add r0, r6, #0 + bl sub_020656AC + add r0, r4, #0 + mov r1, #0x20 + bl ov5_021DFB54 + add r0, r4, #0 + bl ov5_021DFB5C + add r0, r6, #0 + mov r1, #1 + bl sub_02062A0C + mov r0, #2 + str r0, [r5, #0xc] +_021F0A7A: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0A48 + + thumb_func_start ov5_021F0A80 +ov5_021F0A80: ; 0x021F0A80 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #0xa + bne _021F0A96 + mov r0, #0x65 + lsl r0, r0, #4 + bl sub_02005748 +_021F0A96: + ldr r0, [r4, #0x10] + cmp r0, #0x22 + bge _021F0AA0 + mov r0, #0 + pop {r4, pc} +_021F0AA0: + ldr r0, [r4, #0] + cmp r0, #1 + bne _021F0AAA + mov r0, #3 + b _021F0AAC +_021F0AAA: + mov r0, #0xc +_021F0AAC: + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0A80 + + thumb_func_start ov5_021F0AB8 +ov5_021F0AB8: ; 0x021F0AB8 + push {r4, lr} + add r4, r0, #0 + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r0, r0, #0x1e + sub r0, r0, r1 + mov r2, #0x1e + ror r0, r2 + add r0, r1, r0 + add r0, r0, #1 + add r1, r0, #0 + mul r1, r2 + str r1, [r4, #0x14] + ldr r0, [r4, #0x1c] + lsl r1, r0, #2 + ldr r0, _021F0AE8 ; =0x021FFA00 + ldr r0, [r0, r1] + str r0, [r4, #0x18] + mov r0, #4 + str r0, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + nop +_021F0AE8: .word 0x021FFA00 + thumb_func_end ov5_021F0AB8 + + thumb_func_start ov5_021F0AEC +ov5_021F0AEC: ; 0x021F0AEC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x14] + add r4, r2, #0 + sub r0, r0, #1 + str r0, [r5, #0x14] + bl ov5_021F0D40 + cmp r0, #1 + bne _021F0B08 + mov r0, #0xa + str r0, [r5, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} +_021F0B08: + ldr r0, [r5, #0x14] + cmp r0, #0 + ble _021F0B12 + mov r0, #0 + pop {r3, r4, r5, pc} +_021F0B12: + add r0, r4, #0 + mov r1, #2 + bl sub_02062A0C + mov r1, #0 + add r0, r4, #0 + mov r2, #1 + add r3, r1, #0 + bl ov5_021F5D8C + str r0, [r5, #0x24] + mov r0, #5 + str r0, [r5, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F0AEC + + thumb_func_start ov5_021F0B30 +ov5_021F0B30: ; 0x021F0B30 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + sub r0, r0, #1 + str r0, [r4, #0x18] + bl ov5_021F0D40 + cmp r0, #1 + bne _021F0B4A + mov r0, #6 + str r0, [r4, #0xc] + mov r0, #1 + pop {r4, pc} +_021F0B4A: + ldr r0, [r4, #0x18] + cmp r0, #0 + ble _021F0B54 + mov r0, #0 + pop {r4, pc} +_021F0B54: + mov r0, #0xb + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021F0B30 + + thumb_func_start ov5_021F0B5C +ov5_021F0B5C: ; 0x021F0B5C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + add r5, r2, #0 + bl ov5_021F5C58 + add r0, r5, #0 + mov r1, #3 + bl sub_02062A0C + mov r0, #0 + str r0, [r4, #0x10] + mov r1, #7 + str r1, [r4, #0xc] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0B5C + + thumb_func_start ov5_021F0B7C +ov5_021F0B7C: ; 0x021F0B7C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + add r0, r0, #1 + str r0, [r4, #0x10] + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021F0B94 + bl sub_0207136C + mov r0, #0 + str r0, [r4, #0x24] +_021F0B94: + ldr r0, [r4, #0x10] + cmp r0, #0xf + ble _021F0BAA + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #8 + str r0, [r4, #0xc] + add r0, r4, #0 + mov r1, #0x39 + bl ov5_021F0DE8 +_021F0BAA: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0B7C + + thumb_func_start ov5_021F0BB0 +ov5_021F0BB0: ; 0x021F0BB0 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F0E24 + cmp r0, #0 + bne _021F0BC0 + mov r0, #0 + pop {r4, pc} +_021F0BC0: + mov r0, #9 + str r0, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021F0BB0 + + thumb_func_start ov5_021F0BC8 +ov5_021F0BC8: ; 0x021F0BC8 + mov r2, #1 + str r2, [r0, #8] + mov r1, #0xf + str r1, [r0, #0xc] + add r0, r2, #0 + bx lr + thumb_func_end ov5_021F0BC8 + + thumb_func_start ov5_021F0BD4 +ov5_021F0BD4: ; 0x021F0BD4 + push {r4, lr} + add r4, r0, #0 + add r0, r2, #0 + mov r1, #0 + bl sub_02062A0C + add r0, r4, #0 + mov r1, #0x38 + bl ov5_021F0DE8 + mov r0, #0x10 + str r0, [r4, #0x10] + mov r0, #0xe + str r0, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021F0BD4 + + thumb_func_start ov5_021F0BF4 +ov5_021F0BF4: ; 0x021F0BF4 + push {r4, lr} + add r4, r0, #0 + add r0, r2, #0 + mov r1, #0 + bl sub_02062A0C + add r0, r4, #0 + mov r1, #0x37 + bl ov5_021F0DE8 + mov r0, #0x10 + str r0, [r4, #0x10] + mov r0, #0xe + str r0, [r4, #0xc] + ldr r0, [r4, #0x20] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + mov r1, #0x64 + bl sub_0202CF28 + ldr r0, [r4, #0x1c] + bl ov5_021F0E58 + add r2, r0, #0 + mov r1, #0 + ldr r0, [r4, #0x20] + add r3, r1, #0 + bl sub_0206D340 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021F0BF4 + + thumb_func_start ov5_021F0C34 +ov5_021F0C34: ; 0x021F0C34 + mov r1, #0x78 + str r1, [r0, #0x10] + mov r1, #0xd + str r1, [r0, #0xc] + mov r0, #1 + bx lr + thumb_func_end ov5_021F0C34 + + thumb_func_start ov5_021F0C40 +ov5_021F0C40: ; 0x021F0C40 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r2, #0 + sub r0, r0, #1 + str r0, [r5, #0x10] + bl ov5_021F0D40 + cmp r0, #1 + bne _021F0C5C + mov r0, #0xa + str r0, [r5, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} +_021F0C5C: + ldr r0, [r5, #0x10] + cmp r0, #0 + beq _021F0C66 + mov r0, #0 + pop {r3, r4, r5, pc} +_021F0C66: + add r0, r4, #0 + mov r1, #0 + bl sub_02062A0C + add r0, r5, #0 + mov r1, #0x36 + bl ov5_021F0DE8 + mov r0, #0x10 + str r0, [r5, #0x10] + mov r0, #0xe + str r0, [r5, #0xc] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0C40 + + thumb_func_start ov5_021F0C84 +ov5_021F0C84: ; 0x021F0C84 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x10] + add r1, r1, #1 + str r1, [r4, #0x10] + cmp r1, #0x10 + bge _021F0C96 + mov r0, #0 + pop {r4, pc} +_021F0C96: + mov r1, #0x10 + str r1, [r4, #0x10] + bl ov5_021F0E24 + cmp r0, #0 + bne _021F0CA6 + mov r0, #0 + pop {r4, pc} +_021F0CA6: + mov r0, #0xf + str r0, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0C84 + + thumb_func_start ov5_021F0CB0 +ov5_021F0CB0: ; 0x021F0CB0 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + add r5, r1, #0 + cmp r0, #0 + beq _021F0CC0 + bl ov5_021F5C58 +_021F0CC0: + add r0, r4, #0 + bl ov5_021F0DA4 + add r0, r5, #0 + bl sub_0205EB74 + bl sub_0205EED8 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021DFB54 + add r0, r5, #0 + bl ov5_021DFB5C + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #0x10 + str r0, [r4, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0CB0 + + thumb_func_start ov5_021F0CEC +ov5_021F0CEC: ; 0x021F0CEC + ldr r1, [r0, #0x10] + add r1, r1, #1 + str r1, [r0, #0x10] + cmp r1, #2 + ble _021F0CFA + mov r1, #0x11 + str r1, [r0, #0xc] +_021F0CFA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F0CEC + + thumb_func_start ov5_021F0D00 +ov5_021F0D00: ; 0x021F0D00 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021F0D12 + bl sub_0207136C + mov r0, #0 + str r0, [r4, #0x24] +_021F0D12: + mov r0, #1 + str r0, [r4, #4] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0D00 + + thumb_func_start ov5_021F0D1C +ov5_021F0D1C: ; 0x021F0D1C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #4 + add r1, r5, #0 + bl sub_02018184 + add r4, r0, #0 + bne _021F0D30 + bl sub_02022974 +_021F0D30: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0D1C + + thumb_func_start ov5_021F0D40 +ov5_021F0D40: ; 0x021F0D40 + ldr r0, _021F0D50 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r1, r0 + bne _021F0D4C + mov r0, #0 +_021F0D4C: + bx lr + nop +_021F0D50: .word 0x021BF67C + thumb_func_end ov5_021F0D40 + + thumb_func_start ov5_021F0D54 +ov5_021F0D54: ; 0x021F0D54 + ldr r0, _021F0D68 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _021F0D62 + mov r0, #1 + bx lr +_021F0D62: + mov r0, #0 + bx lr + nop +_021F0D68: .word 0x021BF67C + thumb_func_end ov5_021F0D54 + + thumb_func_start ov5_021F0D6C +ov5_021F0D6C: ; 0x021F0D6C + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + mov r1, #0x1a + mov r2, #0xd5 + mov r3, #4 + bl sub_0200B144 + str r0, [r4, #0x48] + mov r0, #1 + lsl r0, r0, #0xa + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x2c] + mov r0, #1 + lsl r0, r0, #0xa + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x30] + mov r0, #8 + mov r1, #0x40 + mov r2, #4 + bl sub_0200B368 + str r0, [r4, #0x34] + pop {r4, pc} + thumb_func_end ov5_021F0D6C + + thumb_func_start ov5_021F0DA4 +ov5_021F0DA4: ; 0x021F0DA4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x34] + bl sub_0200B3F0 + ldr r0, [r4, #0x2c] + bl sub_020237BC + ldr r0, [r4, #0x30] + bl sub_020237BC + ldr r0, [r4, #0x48] + bl sub_0200B190 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0DA4 + + thumb_func_start ov5_021F0DC4 +ov5_021F0DC4: ; 0x021F0DC4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r4, [r5, #0x20] + add r1, r5, #0 + ldr r0, [r4, #8] + add r1, #0x38 + mov r2, #3 + bl sub_0205D8F4 + ldr r0, [r4, #0xc] + bl sub_02025E44 + add r5, #0x38 + add r1, r0, #0 + add r0, r5, #0 + bl sub_0205D944 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F0DC4 + + thumb_func_start ov5_021F0DE8 +ov5_021F0DE8: ; 0x021F0DE8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021F0DC4 + ldr r0, [r5, #0x48] + ldr r2, [r5, #0x30] + add r1, r6, #0 + ldr r4, [r5, #0x20] + bl sub_0200B1B8 + ldr r0, [r5, #0x34] + ldr r1, [r5, #0x2c] + ldr r2, [r5, #0x30] + bl sub_0200C388 + ldr r0, [r4, #0xc] + bl sub_02025E44 + add r2, r0, #0 + add r0, r5, #0 + ldr r1, [r5, #0x2c] + add r0, #0x38 + mov r3, #1 + bl sub_0205D994 + add r5, #0x28 + strb r0, [r5] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0DE8 + + thumb_func_start ov5_021F0E24 +ov5_021F0E24: ; 0x021F0E24 + push {r4, lr} + add r4, r0, #0 + add r0, #0x28 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #1 + bne _021F0E52 + bl ov5_021F0D54 + cmp r0, #1 + bne _021F0E52 + add r0, r4, #0 + add r0, #0x38 + mov r1, #0 + bl sub_0200E084 + add r4, #0x38 + add r0, r4, #0 + bl sub_0201A8FC + mov r0, #1 + pop {r4, pc} +_021F0E52: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0E24 + + thumb_func_start ov5_021F0E58 +ov5_021F0E58: ; 0x021F0E58 + push {r3, lr} + cmp r0, #0 + beq _021F0E6A + cmp r0, #1 + beq _021F0E6E + cmp r0, #2 + beq _021F0E72 + bl sub_02022974 +_021F0E6A: + ldr r0, _021F0E78 ; =0x000001BD + pop {r3, pc} +_021F0E6E: + ldr r0, _021F0E7C ; =0x000001BE + pop {r3, pc} +_021F0E72: + ldr r0, _021F0E80 ; =0x000001BF + pop {r3, pc} + nop +_021F0E78: .word 0x000001BD +_021F0E7C: .word 0x000001BE +_021F0E80: .word 0x000001BF + thumb_func_end ov5_021F0E58 + + .rodata + + + .global Unk_ov5_021FFA00 +Unk_ov5_021FFA00: ; 0x021FFA00 + .incbin "incbin/overlay5_rodata.bin", 0x70EC, 0x70F8 - 0x70EC + + .global Unk_ov5_021FFA0C +Unk_ov5_021FFA0C: ; 0x021FFA0C + .incbin "incbin/overlay5_rodata.bin", 0x70F8, 0x48 + diff --git a/asm/ov5_021F0E84.s b/asm/ov5_021F0E84.s new file mode 100644 index 000000000..1e886afa7 --- /dev/null +++ b/asm/ov5_021F0E84.s @@ -0,0 +1,44 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F0E84 +ov5_021F0E84: ; 0x021F0E84 + lsl r1, r0, #2 + ldr r0, _021F0E8C ; =0x021FFA54 + ldrh r0, [r0, r1] + bx lr + ; .align 2, 0 +_021F0E8C: .word 0x021FFA54 + thumb_func_end ov5_021F0E84 + + thumb_func_start ov5_021F0E90 +ov5_021F0E90: ; 0x021F0E90 + ldr r2, _021F0EA8 ; =0x000001E7 + cmp r0, r2 + bne _021F0E9E + cmp r1, #1 + bne _021F0E9E + mov r0, #0 + bx lr +_021F0E9E: + lsl r1, r0, #2 + ldr r0, _021F0EAC ; =0x021FFA56 + ldrh r0, [r0, r1] + bx lr + nop +_021F0EA8: .word 0x000001E7 +_021F0EAC: .word 0x021FFA56 + thumb_func_end ov5_021F0E90 + + .rodata + + + .global Unk_ov5_021FFA54 +Unk_ov5_021FFA54: ; 0x021FFA54 + .incbin "incbin/overlay5_rodata.bin", 0x7140, 0x7B8 + diff --git a/asm/ov5_021F0EB0.s b/asm/ov5_021F0EB0.s new file mode 100644 index 000000000..e6c006916 --- /dev/null +++ b/asm/ov5_021F0EB0.s @@ -0,0 +1,233 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F0EB0 +ov5_021F0EB0: ; 0x021F0EB0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0x34 + bl sub_02018184 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + str r6, [r4, #0] + mov r0, #0 + str r0, [r4, #0xc] + str r5, [r4, #0x2c] + ldr r0, [r5, #0x24] + str r0, [r4, #0x30] + bl sub_02020A90 + str r0, [r4, #0x10] + str r0, [r4, #0x20] + ldr r0, _021F0EE8 ; =ov5_021F0F2C + ldr r2, _021F0EEC ; =0x0000FFFF + add r1, r4, #0 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F0EE8: .word ov5_021F0F2C +_021F0EEC: .word 0x0000FFFF + thumb_func_end ov5_021F0EB0 + + thumb_func_start ov5_021F0EF0 +ov5_021F0EF0: ; 0x021F0EF0 + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #8] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0EF0 + + thumb_func_start ov5_021F0EFC +ov5_021F0EFC: ; 0x021F0EFC + push {r4, lr} + add r4, r0, #0 + bl sub_0201CED0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov5_021F0EFC + + thumb_func_start ov5_021F0F10 +ov5_021F0F10: ; 0x021F0F10 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0201CED0 + mov r1, #0 + str r1, [r0, #4] + str r1, [r0, #8] + str r5, [r0, #0xc] + str r4, [r0, #0x14] + str r6, [r0, #0x1c] + str r1, [r0, #0x24] + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F0F10 + + thumb_func_start ov5_021F0F2C +ov5_021F0F2C: ; 0x021F0F2C + push {r3, lr} + add r0, r1, #0 + ldr r1, [r1, #0xc] + lsl r2, r1, #2 + ldr r1, _021F0F3C ; =0x0220020C + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + ; .align 2, 0 +_021F0F3C: .word 0x0220020C + thumb_func_end ov5_021F0F2C + + thumb_func_start ov5_021F0F40 +ov5_021F0F40: ; 0x021F0F40 + mov r1, #1 + str r1, [r0, #8] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F0F40 + + thumb_func_start ov5_021F0F48 +ov5_021F0F48: ; 0x021F0F48 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + beq _021F0F58 + cmp r1, #1 + beq _021F0F62 + pop {r4, pc} +_021F0F58: + bl ov5_021F0FC8 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] +_021F0F62: + add r0, r4, #0 + bl ov5_021F0FF8 + cmp r0, #1 + bne _021F0F76 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #8] +_021F0F76: + add r0, r4, #0 + bl ov5_021F0FB8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0F48 + + thumb_func_start ov5_021F0F80 +ov5_021F0F80: ; 0x021F0F80 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + beq _021F0F90 + cmp r1, #1 + beq _021F0F9A + pop {r4, pc} +_021F0F90: + bl ov5_021F0FE0 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] +_021F0F9A: + add r0, r4, #0 + bl ov5_021F0FF8 + cmp r0, #1 + bne _021F0FAE + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #8] +_021F0FAE: + add r0, r4, #0 + bl ov5_021F0FB8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F0F80 + + thumb_func_start ov5_021F0FB8 +ov5_021F0FB8: ; 0x021F0FB8 + ldr r3, _021F0FC4 ; =sub_02020A50 + add r1, r0, #0 + ldr r0, [r1, #0x20] + ldr r1, [r1, #0x30] + bx r3 + nop +_021F0FC4: .word sub_02020A50 + thumb_func_end ov5_021F0FB8 + + thumb_func_start ov5_021F0FC8 +ov5_021F0FC8: ; 0x021F0FC8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x1c] + bl sub_020E1F6C + str r0, [r4, #0x28] + ldr r1, [r4, #0x20] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov5_021F0FC8 + + thumb_func_start ov5_021F0FE0 +ov5_021F0FE0: ; 0x021F0FE0 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x20] + sub r0, r1, r0 + ldr r1, [r4, #0x1c] + bl sub_020E1F6C + str r0, [r4, #0x28] + ldr r0, [r4, #0x10] + str r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov5_021F0FE0 + + thumb_func_start ov5_021F0FF8 +ov5_021F0FF8: ; 0x021F0FF8 + ldr r2, [r0, #0x20] + ldr r1, [r0, #0x28] + add r1, r2, r1 + str r1, [r0, #0x20] + ldr r1, [r0, #0x24] + add r2, r1, #1 + str r2, [r0, #0x24] + ldr r1, [r0, #0x1c] + cmp r2, r1 + blo _021F1016 + str r1, [r0, #0x24] + ldr r1, [r0, #0x18] + str r1, [r0, #0x20] + mov r0, #1 + bx lr +_021F1016: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F0FF8 + + .rodata + + + .global Unk_ov5_0220020C +Unk_ov5_0220020C: ; 0x0220020C + .incbin "incbin/overlay5_rodata.bin", 0x78F8, 0x10 + diff --git a/asm/ov5_021F101C.s b/asm/ov5_021F101C.s new file mode 100644 index 000000000..45bb25f1d --- /dev/null +++ b/asm/ov5_021F101C.s @@ -0,0 +1,107 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F101C +ov5_021F101C: ; 0x021F101C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_02050A60 + str r0, [sp] + add r0, r7, #0 + bl sub_02050A64 + add r6, r0, #0 + add r0, r7, #0 + bl sub_02050A68 + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r6, #4] + cmp r0, #5 + bhi _021F10E0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F104A: ; jump table + .short _021F1056 - _021F104A - 2 ; case 0 + .short _021F1068 - _021F104A - 2 ; case 1 + .short _021F1088 - _021F104A - 2 ; case 2 + .short _021F10A6 - _021F104A - 2 ; case 3 + .short _021F10BE - _021F104A - 2 ; case 4 + .short _021F10D0 - _021F104A - 2 ; case 5 +_021F1056: + mov r0, #0xb + mov r1, #8 + bl sub_02018184 + str r0, [r6, #4] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F10E0 +_021F1068: + bl ov5_021F0484 + add r6, r0, #0 + mov r0, #0xb + add r1, r6, #0 + bl sub_02018184 + str r0, [r5, #4] + mov r1, #0 + add r2, r6, #0 + bl sub_020D5124 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F10E0 +_021F1088: + ldr r0, [sp] + ldr r0, [r0, #0x3c] + bl sub_0205EB98 + add r3, r0, #0 + ldr r0, [sp] + ldr r2, [r6, #0] + mov r1, #0 + bl ov6_02243F88 + str r0, [r5, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F10E0 +_021F10A6: + ldr r0, [r5, #0] + bl ov6_02243FBC + cmp r0, #0 + beq _021F10E0 + ldr r0, [r5, #0] + bl ov6_02243FC8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F10E0 +_021F10BE: + ldr r1, _021F10E4 ; =ov5_021F0488 + ldr r2, [r5, #4] + add r0, r7, #0 + bl sub_02050944 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F10E0 +_021F10D0: + add r0, r5, #0 + bl sub_020181C4 + add r0, r6, #0 + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021F10E0: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F10E4: .word ov5_021F0488 + thumb_func_end ov5_021F101C \ No newline at end of file diff --git a/asm/ov5_021F10E8.s b/asm/ov5_021F10E8.s new file mode 100644 index 000000000..58310ec21 --- /dev/null +++ b/asm/ov5_021F10E8.s @@ -0,0 +1,361 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F10E8 +ov5_021F10E8: ; 0x021F10E8 + push {r4, lr} + mov r2, #0 + mov r1, #0xc + add r3, r2, #0 + add r4, r0, #0 + bl ov5_021DF53C + str r4, [r0, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F10E8 + + thumb_func_start ov5_021F10FC +ov5_021F10FC: ; 0x021F10FC + push {r4, lr} + add r4, r0, #0 + bl ov5_021F114C + ldr r0, [r4, #8] + cmp r0, #0 + beq _021F110E + bl ov5_021DF554 +_021F110E: + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F10FC + + thumb_func_start ov5_021F1118 +ov5_021F1118: ; 0x021F1118 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + str r1, [r5, #0] + mov r2, #0 + add r0, r3, #0 + add r1, r5, #4 + add r3, r4, #0 + str r2, [sp] + bl ov5_021DFB00 + add r0, r5, #0 + add r0, #0x18 + add r1, r5, #4 + bl sub_02073B70 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1118 + + thumb_func_start ov5_021F113C +ov5_021F113C: ; 0x021F113C + ldr r1, _021F1144 ; =0x0000FFFF + ldr r3, _021F1148 ; =sub_0207395C + stmia r0!, {r1} + bx r3 + ; .align 2, 0 +_021F1144: .word 0x0000FFFF +_021F1148: .word sub_0207395C + thumb_func_end ov5_021F113C + + thumb_func_start ov5_021F114C +ov5_021F114C: ; 0x021F114C + push {r3, r4, r5, r6, r7, lr} + ldr r6, [r0, #4] + mov r4, #0 + ldr r5, [r0, #8] + cmp r6, #0 + bls _021F116E + ldr r7, _021F1170 ; =0x0000FFFF +_021F115A: + ldr r0, [r5, #0] + cmp r0, r7 + beq _021F1166 + add r0, r5, #0 + bl ov5_021F113C +_021F1166: + add r4, r4, #1 + add r5, #0x6c + cmp r4, r6 + blo _021F115A +_021F116E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F1170: .word 0x0000FFFF + thumb_func_end ov5_021F114C + + thumb_func_start ov5_021F1174 +ov5_021F1174: ; 0x021F1174 + ldr r3, [r0, #4] + ldr r0, [r0, #8] +_021F1178: + ldr r2, [r0, #0] + cmp r2, r1 + beq _021F1186 + add r0, #0x6c + sub r3, r3, #1 + bne _021F1178 + mov r0, #0 +_021F1186: + bx lr + thumb_func_end ov5_021F1174 + + thumb_func_start ov5_021F1188 +ov5_021F1188: ; 0x021F1188 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x1d + add r6, r0, #0 + bl ov5_021DF55C + add r4, r0, #0 + cmp r5, #0 + bne _021F119E + bl sub_02022974 +_021F119E: + mov r1, #0x6c + mov r2, #0 + add r0, r6, #0 + mul r1, r5 + add r3, r2, #0 + str r5, [r4, #4] + bl ov5_021DF53C + ldr r1, _021F11BC ; =0x0000FFFF + str r0, [r4, #8] +_021F11B2: + str r1, [r0, #0] + add r0, #0x6c + sub r5, r5, #1 + bne _021F11B2 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F11BC: .word 0x0000FFFF + thumb_func_end ov5_021F1188 + + thumb_func_start ov5_021F11C0 +ov5_021F11C0: ; 0x021F11C0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #0x1d + add r5, r0, #0 + add r6, r2, #0 + bl ov5_021DF55C + add r1, r4, #0 + add r7, r0, #0 + bl ov5_021F1174 + cmp r0, #0 + bne _021F11F6 + ldr r1, _021F11F8 ; =0x0000FFFF + add r0, r7, #0 + bl ov5_021F1174 + cmp r0, #0 + bne _021F11EC + bl sub_02022974 + pop {r3, r4, r5, r6, r7, pc} +_021F11EC: + add r1, r4, #0 + add r2, r6, #0 + add r3, r5, #0 + bl ov5_021F1118 +_021F11F6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F11F8: .word 0x0000FFFF + thumb_func_end ov5_021F11C0 + + thumb_func_start ov5_021F11FC +ov5_021F11FC: ; 0x021F11FC + push {r4, lr} + add r4, r1, #0 + mov r1, #0x1d + bl ov5_021DF55C + add r1, r4, #0 + bl ov5_021F1174 + add r4, r0, #0 + bne _021F1214 + bl sub_02022974 +_021F1214: + add r4, #0x18 + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F11FC + + thumb_func_start ov5_021F121C +ov5_021F121C: ; 0x021F121C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062920 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #2 + str r4, [sp, #0xc] + str r5, [sp, #0x10] + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F1254 ; =0x0220021C + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021F1254: .word 0x0220021C + thumb_func_end ov5_021F121C + + thumb_func_start ov5_021F1258 +ov5_021F1258: ; 0x021F1258 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x1c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x24] + bl sub_02062910 + str r0, [r4, #4] + ldr r0, [r4, #0x20] + ldr r1, [r4, #0x1c] + bl ov5_021F11FC + str r0, [r4, #0x18] + ldr r0, [r4, #0x24] + bl sub_02062E94 + cmp r0, #1 + ldr r0, [r4, #0x24] + bne _021F1294 + bl sub_02062C18 + b _021F1298 +_021F1294: + bl sub_02062918 +_021F1298: + str r0, [r4, #8] + add r4, #0xc + add r0, r5, #0 + add r1, r4, #0 + bl sub_020715E4 + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F1258 + + thumb_func_start ov5_021F12A8 +ov5_021F12A8: ; 0x021F12A8 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F12A8 + + thumb_func_start ov5_021F12AC +ov5_021F12AC: ; 0x021F12AC + push {r4, r5, r6, lr} + sub sp, #0x18 + add r4, r1, #0 + ldr r6, [r4, #0x24] + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r2, [r4, #8] + add r0, r6, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F12CE + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r4, r5, r6, pc} +_021F12CE: + add r0, r6, #0 + add r1, sp, #0xc + bl sub_02063050 + add r0, r6, #0 + add r1, sp, #0 + bl sub_02063078 + ldr r1, [sp] + ldr r0, [r4, #0xc] + ldr r2, [sp, #0xc] + add r0, r1, r0 + add r0, r2, r0 + str r0, [sp, #0xc] + ldr r1, [sp, #4] + ldr r0, [r4, #0x10] + ldr r2, [sp, #0x10] + add r0, r1, r0 + add r0, r2, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #8] + ldr r0, [r4, #0x14] + ldr r2, [sp, #0x14] + add r0, r1, r0 + add r0, r2, r0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, sp, #0xc + bl sub_020715D4 + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F12AC + + thumb_func_start ov5_021F1310 +ov5_021F1310: ; 0x021F1310 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x18] + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F1310 + + thumb_func_start ov5_021F1328 +ov5_021F1328: ; 0x021F1328 + push {r4, r5, r6, lr} + mov r5, #9 + add r1, r5, #0 + add r6, r0, #0 + ldr r4, _021F1348 ; =0x02200230 + bl ov5_021F1188 +_021F1336: + ldr r1, [r4, #0] + ldr r2, [r4, #4] + add r0, r6, #0 + bl ov5_021F11C0 + add r4, #8 + sub r5, r5, #1 + bne _021F1336 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F1348: .word 0x02200230 + thumb_func_end ov5_021F1328 + + .rodata + + + .global Unk_ov5_0220021C +Unk_ov5_0220021C: ; 0x0220021C + .incbin "incbin/overlay5_rodata.bin", 0x7908, 0x791C - 0x7908 + + .global Unk_ov5_02200230 +Unk_ov5_02200230: ; 0x02200230 + .incbin "incbin/overlay5_rodata.bin", 0x791C, 0x48 + diff --git a/asm/ov5_021F134C.s b/asm/ov5_021F134C.s new file mode 100644 index 000000000..cdbb3409b --- /dev/null +++ b/asm/ov5_021F134C.s @@ -0,0 +1,633 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F134C +ov5_021F134C: ; 0x021F134C + push {r3, r4, r5, lr} + mov r1, #0x16 + mov r2, #0 + lsl r1, r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0x20] + bl ov5_021F14FC + add r0, r4, #0 + bl ov5_021F1388 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F134C + + thumb_func_start ov5_021F1370 +ov5_021F1370: ; 0x021F1370 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F13AC + add r0, r4, #0 + bl ov5_021F153C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1370 + + thumb_func_start ov5_021F1388 +ov5_021F1388: ; 0x021F1388 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + bl ov5_021DF574 + ldr r0, [r0, #0x38] + bl sub_02062858 + sub r2, r0, #1 + ldr r0, _021F13A8 ; =ov5_021F1424 + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x24] + pop {r4, pc} + nop +_021F13A8: .word ov5_021F1424 + thumb_func_end ov5_021F1388 + + thumb_func_start ov5_021F13AC +ov5_021F13AC: ; 0x021F13AC + ldr r3, _021F13B4 ; =sub_0200DA58 + ldr r0, [r0, #0x24] + bx r3 + nop +_021F13B4: .word sub_0200DA58 + thumb_func_end ov5_021F13AC + + thumb_func_start ov5_021F13B8 +ov5_021F13B8: ; 0x021F13B8 + add r2, r0, #0 + add r2, #0x14 + add r3, r1, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + bx lr + thumb_func_end ov5_021F13B8 + + thumb_func_start ov5_021F13C8 +ov5_021F13C8: ; 0x021F13C8 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F13C8 + + thumb_func_start ov5_021F13D4 +ov5_021F13D4: ; 0x021F13D4 + ldr r1, [r0, #4] + lsl r2, r1, #2 + ldr r1, _021F13F8 ; =0x02200284 + ldr r1, [r1, r2] + str r1, [r0, #0x10] + ldr r2, [r0, #4] + mov r1, #0xc + add r3, r2, #0 + mul r3, r1 + ldr r1, _021F13FC ; =0x022002E4 + add r2, r0, #0 + add r3, r1, r3 + ldmia r3!, {r0, r1} + add r2, #0x14 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bx lr + ; .align 2, 0 +_021F13F8: .word 0x02200284 +_021F13FC: .word 0x022002E4 + thumb_func_end ov5_021F13D4 + + thumb_func_start ov5_021F1400 +ov5_021F1400: ; 0x021F1400 + ldr r3, [r0, #0] + cmp r3, r1 + bge _021F1412 + add r2, r3, r2 + str r2, [r0, #0] + cmp r2, r1 + ble _021F1420 + str r1, [r0, #0] + bx lr +_021F1412: + cmp r3, r1 + ble _021F1420 + sub r2, r3, r2 + str r2, [r0, #0] + cmp r2, r1 + bge _021F1420 + str r1, [r0, #0] +_021F1420: + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F1400 + + thumb_func_start ov5_021F1424 +ov5_021F1424: ; 0x021F1424 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + bl sub_02013960 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #0 + beq _021F1442 + cmp r1, #1 + beq _021F1464 + cmp r1, #2 + beq _021F146E + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_021F1442: + str r4, [r5, #4] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F13D4 + ldr r0, [r5, #0x10] + bl ov5_021F13C8 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021F1554 + ldr r0, [r5, #0] + add sp, #0x10 + add r0, r0, #1 + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} +_021F1464: + ldr r0, [r5, #4] + cmp r0, r4 + beq _021F14F0 + add r0, r1, #1 + str r0, [r5, #0] +_021F146E: + ldr r0, _021F14F4 ; =0x02200284 + lsl r1, r4, #2 + ldr r6, [r0, r1] + mov r0, #0xc + add r1, r4, #0 + mul r1, r0 + ldr r0, _021F14F8 ; =0x022002E4 + add r2, sp, #4 + add r3, r0, r1 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r5, #0 + ldr r1, [sp, #4] + add r0, #0x14 + mov r2, #0x10 + bl ov5_021F1400 + ldr r0, [sp, #8] + mov r2, #0x10 + str r0, [sp] + add r0, r5, #0 + ldr r1, [sp] + add r0, #0x18 + bl ov5_021F1400 + ldr r7, [sp, #0xc] + add r0, r5, #0 + add r0, #0x1c + add r1, r7, #0 + mov r2, #0x10 + bl ov5_021F1400 + add r0, r5, #0 + mov r2, #2 + add r0, #0x10 + add r1, r6, #0 + lsl r2, r2, #8 + bl ov5_021F1400 + ldr r0, [r5, #0x10] + bl ov5_021F13C8 + add r1, r0, #0 + add r0, r5, #0 + bl ov5_021F1554 + ldr r1, [sp, #4] + ldr r0, [r5, #0x14] + cmp r1, r0 + bne _021F14F0 + ldr r1, [r5, #0x18] + ldr r0, [sp] + cmp r0, r1 + bne _021F14F0 + ldr r0, [r5, #0x1c] + cmp r7, r0 + bne _021F14F0 + ldr r0, [r5, #0x10] + cmp r6, r0 + bne _021F14F0 + str r4, [r5, #4] + mov r0, #1 + str r0, [r5, #0] +_021F14F0: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F14F4: .word 0x02200284 +_021F14F8: .word 0x022002E4 + thumb_func_end ov5_021F1424 + + thumb_func_start ov5_021F14FC +ov5_021F14FC: ; 0x021F14FC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + add r5, r0, #0 + ldr r6, _021F1538 ; =0x02200278 + str r0, [sp, #4] + mov r7, #0 + add r4, #0x28 + add r5, #0x64 +_021F150E: + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [r6, #0] + ldr r0, [r0, #0x20] + add r1, r4, #0 + mov r2, #0 + bl ov5_021DFB00 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02073B70 + add r7, r7, #1 + add r6, r6, #4 + add r4, #0x14 + add r5, #0x54 + cmp r7, #3 + blt _021F150E + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F1538: .word 0x02200278 + thumb_func_end ov5_021F14FC + + thumb_func_start ov5_021F153C +ov5_021F153C: ; 0x021F153C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x28 +_021F1544: + add r0, r5, #0 + bl sub_0207395C + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _021F1544 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F153C + + thumb_func_start ov5_021F1554 +ov5_021F1554: ; 0x021F1554 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r2, #0x1f + add r4, r1, #0 + ldr r0, [r5, #0x34] + mov r1, #1 + lsl r2, r2, #0x10 + bl sub_020B2D8C + ldr r0, [r5, #0x34] + add r1, r4, #0 + bl sub_020B3764 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F1554 + + thumb_func_start ov5_021F1570 +ov5_021F1570: ; 0x021F1570 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + mov r1, #0 + str r4, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x1c] + bl sub_02063050 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F15B0 ; =0x022002AC + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_021F15B0: .word 0x022002AC + thumb_func_end ov5_021F1570 + + thumb_func_start ov5_021F15B4 +ov5_021F15B4: ; 0x021F15B4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x14 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r5, #0 + bl sub_020715B4 + str r0, [r4, #0x10] + ldr r0, [r4, #0x1c] + bl sub_02062920 + str r0, [r4, #0] + ldr r0, [r4, #0x1c] + bl sub_02062910 + str r0, [r4, #4] + ldr r0, [r4, #0x1c] + bl sub_02062E94 + cmp r0, #1 + ldr r0, [r4, #0x1c] + bne _021F15F6 + bl sub_02062C18 + b _021F15FA +_021F15F6: + bl sub_02062918 +_021F15FA: + str r0, [r4, #8] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F15B4 + + thumb_func_start ov5_021F1600 +ov5_021F1600: ; 0x021F1600 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F1600 + + thumb_func_start ov5_021F1604 +ov5_021F1604: ; 0x021F1604 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x1c] + ldr r1, [r4, #0] + add r5, r0, #0 + ldr r2, [r4, #4] + ldr r3, [r4, #8] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F1628 + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021F1628: + add r0, r6, #0 + mov r1, #8 + bl sub_02062CBC + cmp r0, #0 + beq _021F163E + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021F163E: + mov r0, #0 + str r0, [r4, #0xc] + ldr r1, _021F166C ; =0x00100200 + add r0, r6, #0 + bl sub_020628D8 + cmp r0, #1 + bne _021F1656 + mov r0, #1 + add sp, #0xc + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, pc} +_021F1656: + add r0, r6, #0 + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021F166C: .word 0x00100200 + thumb_func_end ov5_021F1604 + + thumb_func_start ov5_021F1670 +ov5_021F1670: ; 0x021F1670 + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + add r2, r1, #0 + add r4, r0, #0 + ldr r0, [r2, #0xc] + cmp r0, #0 + bne _021F16CA + ldr r6, _021F16D0 ; =0x022002C0 + add r5, sp, #0 + mov r3, #4 +_021F1684: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _021F1684 + ldr r0, [r6, #0] + add r1, sp, #0x24 + str r0, [r5, #0] + ldr r5, [r2, #0x18] + add r0, r5, #0 + bl ov5_021F13B8 + add r0, r4, #0 + add r1, sp, #0x30 + bl sub_020715E4 + mov r0, #2 + ldr r1, [sp, #0x30] + lsl r0, r0, #0xa + sub r1, r1, r0 + str r1, [sp, #0x30] + lsl r1, r0, #3 + ldr r2, [sp, #0x34] + lsl r0, r0, #1 + sub r1, r2, r1 + str r1, [sp, #0x34] + ldr r1, [sp, #0x38] + add r5, #0x64 + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, r5, #0 + add r1, sp, #0x30 + add r2, sp, #0x24 + add r3, sp, #0 + bl sub_02073BA4 +_021F16CA: + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + nop +_021F16D0: .word 0x022002C0 + thumb_func_end ov5_021F1670 + + thumb_func_start ov5_021F16D4 +ov5_021F16D4: ; 0x021F16D4 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021DF578 + add r6, r0, #0 + mov r1, #0 + str r6, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x1c] + bl sub_02063050 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F1714 ; =0x02200298 + add r0, r6, #0 + add r2, sp, #8 + add r3, r4, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F1714: .word 0x02200298 + thumb_func_end ov5_021F16D4 + + thumb_func_start ov5_021F1718 +ov5_021F1718: ; 0x021F1718 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x1c] + ldr r1, [r4, #0] + add r5, r0, #0 + ldr r2, [r4, #4] + ldr r3, [r4, #8] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F173C + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021F173C: + mov r0, #0 + str r0, [r4, #0xc] + ldr r1, _021F1768 ; =0x00100200 + add r0, r6, #0 + bl sub_020628D8 + cmp r0, #1 + bne _021F1754 + mov r0, #1 + add sp, #0xc + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, pc} +_021F1754: + add r0, r6, #0 + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021F1768: .word 0x00100200 + thumb_func_end ov5_021F1718 + + thumb_func_start ov5_021F176C +ov5_021F176C: ; 0x021F176C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #0xc] + add r6, r0, #0 + cmp r1, #1 + beq _021F17B2 + bl sub_020715B4 + ldr r5, [r4, #0x18] + add r4, r0, #0 + mov r1, #0x54 + mul r4, r1 + add r0, r6, #0 + add r1, sp, #0 + add r5, #0x64 + bl sub_020715E4 + mov r0, #2 + ldr r1, [sp] + lsl r0, r0, #0xa + sub r1, r1, r0 + str r1, [sp] + lsl r1, r0, #3 + ldr r2, [sp, #4] + lsl r0, r0, #1 + sub r1, r2, r1 + str r1, [sp, #4] + ldr r1, [sp, #8] + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, r4 + add r1, sp, #0 + bl sub_02073BB4 +_021F17B2: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F176C + + .rodata + + + .global Unk_ov5_02200278 +Unk_ov5_02200278: ; 0x02200278 + .incbin "incbin/overlay5_rodata.bin", 0x7964, 0x7970 - 0x7964 + + .global Unk_ov5_02200284 +Unk_ov5_02200284: ; 0x02200284 + .incbin "incbin/overlay5_rodata.bin", 0x7970, 0x7984 - 0x7970 + + .global Unk_ov5_02200298 +Unk_ov5_02200298: ; 0x02200298 + .incbin "incbin/overlay5_rodata.bin", 0x7984, 0x7998 - 0x7984 + + .global Unk_ov5_022002AC +Unk_ov5_022002AC: ; 0x022002AC + .incbin "incbin/overlay5_rodata.bin", 0x7998, 0x79AC - 0x7998 + + .global Unk_ov5_022002C0 +Unk_ov5_022002C0: ; 0x022002C0 + .incbin "incbin/overlay5_rodata.bin", 0x79AC, 0x79D0 - 0x79AC + + .global Unk_ov5_022002E4 +Unk_ov5_022002E4: ; 0x022002E4 + .incbin "incbin/overlay5_rodata.bin", 0x79D0, 0x3C + diff --git a/asm/ov5_021F17B8.s b/asm/ov5_021F17B8.s new file mode 100644 index 000000000..787ee1459 --- /dev/null +++ b/asm/ov5_021F17B8.s @@ -0,0 +1,684 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F17B8 +ov5_021F17B8: ; 0x021F17B8 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F17E4 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F17B8 + + thumb_func_start ov5_021F17D4 +ov5_021F17D4: ; 0x021F17D4 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F17F4 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F17D4 + + thumb_func_start ov5_021F17E4 +ov5_021F17E4: ; 0x021F17E4 + ldr r3, _021F17F0 ; =ov5_021DF9E0 + ldr r0, [r0, #0] + mov r1, #2 + mov r2, #0x14 + bx r3 + nop +_021F17F0: .word ov5_021DF9E0 + thumb_func_end ov5_021F17E4 + + thumb_func_start ov5_021F17F4 +ov5_021F17F4: ; 0x021F17F4 + ldr r3, _021F17FC ; =ov5_021DFA08 + ldr r0, [r0, #0] + mov r1, #2 + bx r3 + ; .align 2, 0 +_021F17FC: .word ov5_021DFA08 + thumb_func_end ov5_021F17F4 + + thumb_func_start ov5_021F1800 +ov5_021F1800: ; 0x021F1800 + push {r4, r5, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + bl sub_02062C00 + str r0, [sp, #8] + add r0, r5, #0 + bl ov5_021DF578 + mov r1, #1 + str r0, [sp, #0xc] + bl ov5_021DF55C + str r0, [sp, #0x10] + add r0, r5, #0 + add r1, sp, #0x18 + str r5, [sp, #0x14] + bl sub_02063050 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r1, _021F1848 ; =0x02200338 + add r2, sp, #0x18 + add r3, r4, #0 + bl ov5_021DF72C + add sp, #0x24 + pop {r4, r5, pc} + nop +_021F1848: .word 0x02200338 + thumb_func_end ov5_021F1800 + + thumb_func_start ov5_021F184C +ov5_021F184C: ; 0x021F184C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x14 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + bl sub_020715B4 + str r0, [r4, #0x10] + ldr r0, [r4, #0x20] + bl sub_02062910 + str r0, [r4, #0] + ldr r0, [r4, #0x20] + bl sub_02062918 + str r0, [r4, #4] + ldr r0, [r4, #0x20] + bl sub_02062920 + str r0, [r4, #8] + bl sub_020677F4 + cmp r0, #1 + bne _021F1896 + ldr r0, [r4, #0x20] + bl sub_02067800 + str r0, [r4, #8] +_021F1896: + mov r0, #1 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + str r0, [r4, #0x2c] + str r0, [r4, #0x30] + mov r0, #0x40 + str r0, [r4, #0x34] + ldr r0, [r4, #0x10] + cmp r0, #2 + bne _021F18AE + mov r0, #0 + str r0, [r4, #0x34] +_021F18AE: + ldr r1, [r4, #0x20] + add r0, r4, #0 + add r2, sp, #0 + bl ov5_021F1A24 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F1A8C + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F184C + + thumb_func_start ov5_021F18D0 +ov5_021F18D0: ; 0x021F18D0 + push {r3, lr} + ldr r0, [r1, #0xc] + cmp r0, #1 + bne _021F18DE + ldr r0, [r1, #0x24] + bl sub_020211FC +_021F18DE: + pop {r3, pc} + thumb_func_end ov5_021F18D0 + + thumb_func_start ov5_021F18E0 +ov5_021F18E0: ; 0x021F18E0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x20] + add r5, r0, #0 + add r0, r6, #0 + bl sub_02062920 + add r7, r0, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021F1902 + ldr r0, [r4, #0x20] + bl sub_02067800 + add r7, r0, #0 +_021F1902: + ldr r0, [r4, #8] + cmp r0, r7 + bne _021F1920 + ldr r1, [r4, #0] + ldr r2, [r4, #4] + add r0, r6, #0 + bl sub_02062764 + cmp r0, #0 + beq _021F1920 + add r0, r6, #0 + bl sub_02062F64 + cmp r0, #0 + bne _021F192A +_021F1920: + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021F192A: + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x34] + add r1, r1, r0 + mov r0, #0x12 + lsl r0, r0, #8 + str r1, [r4, #0x28] + cmp r1, r0 + blt _021F1944 + str r0, [r4, #0x28] + ldr r0, [r4, #0x34] + neg r0, r0 + str r0, [r4, #0x34] + b _021F1954 +_021F1944: + mov r0, #0xe + lsl r0, r0, #8 + cmp r1, r0 + bgt _021F1954 + str r0, [r4, #0x28] + ldr r0, [r4, #0x34] + neg r0, r0 + str r0, [r4, #0x34] +_021F1954: + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0 + bl ov5_021F1A24 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _021F1974 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F1A8C +_021F1974: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021F18E0 + + thumb_func_start ov5_021F1978 +ov5_021F1978: ; 0x021F1978 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r4, [r5, #0x20] + add r6, r0, #0 + add r0, r4, #0 + bl sub_02062920 + add r7, r0, #0 + bl sub_020677F4 + cmp r0, #1 + bne _021F199A + ldr r0, [r5, #0x20] + bl sub_02067800 + add r7, r0, #0 +_021F199A: + ldr r0, [r5, #8] + cmp r0, r7 + bne _021F19B8 + ldr r1, [r5, #0] + ldr r2, [r5, #4] + add r0, r4, #0 + bl sub_02062764 + cmp r0, #0 + beq _021F19B8 + add r0, r4, #0 + bl sub_02062F64 + cmp r0, #0 + bne _021F19C2 +_021F19B8: + add r0, r6, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_021F19C2: + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _021F1A1E + add r0, r4, #0 + bl sub_02062D58 + cmp r0, #1 + ldr r0, [r5, #0x24] + bne _021F19DC + mov r1, #0 + bl sub_02021320 + b _021F19E2 +_021F19DC: + mov r1, #1 + bl sub_02021320 +_021F19E2: + add r0, r6, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r5, #0x24] + add r1, sp, #0 + bl sub_020212A8 + add r1, r5, #0 + ldr r0, [r5, #0x24] + add r1, #0x28 + bl sub_020212D0 + ldr r0, [r5, #0x20] + bl ov5_021EB1A0 + add r4, r0, #0 + bl sub_02021358 + add r1, r0, #0 + ldr r0, [r5, #0x24] + bl sub_02021344 + add r0, r4, #0 + bl sub_02021394 + add r1, r0, #0 + ldr r0, [r5, #0x24] + bl sub_02021380 +_021F1A1E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1978 + + thumb_func_start ov5_021F1A24 +ov5_021F1A24: ; 0x021F1A24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r3, _021F1A88 ; =0x0220032C + add r4, r2, #0 + add r5, r0, #0 + str r1, [sp] + ldmia r3!, {r0, r1} + add r2, sp, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r4, #0 + str r0, [r2, #0] + ldr r0, [sp] + bl sub_02063078 + ldr r0, [r4, #8] + add r1, r4, #0 + neg r6, r0 + ldr r0, [sp] + ldr r7, [r4, #0] + bl sub_02063050 + ldr r0, [r5, #0x14] + add r1, r4, #0 + bl sub_020644A4 + ldr r1, [r4, #0] + add r1, r1, r7 + str r1, [r4, #0] + mov r1, #7 + lsl r1, r1, #0xc + ldr r2, [r4, #8] + sub r1, r6, r1 + add r1, r2, r1 + str r1, [r4, #8] + cmp r0, #0 + bne _021F1A76 + mov r0, #0 + add sp, #0x10 + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} +_021F1A76: + ldr r0, [r5, #0x10] + ldr r2, [r4, #4] + lsl r1, r0, #2 + add r0, sp, #4 + ldr r0, [r0, r1] + sub r0, r2, r0 + str r0, [r4, #4] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F1A88: .word 0x0220032C + thumb_func_end ov5_021F1A24 + + thumb_func_start ov5_021F1A8C +ov5_021F1A8C: ; 0x021F1A8C + push {r4, r5, lr} + sub sp, #0x34 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x20] + bl sub_02062A40 + ldr r1, [r4, #8] + add r2, sp, #0 + bl ov5_021ED150 + cmp r0, #0 + beq _021F1AD2 + ldr r0, [r4, #0x20] + bl ov5_021EDD94 + cmp r0, #1 + beq _021F1AD2 + ldr r0, [r4, #0x18] + mov r1, #2 + bl ov5_021DF9FC + str r0, [sp] + add r0, r5, #0 + add r1, sp, #0x28 + bl sub_020715E4 + ldr r0, [r4, #0x18] + add r1, sp, #0 + add r2, sp, #0x28 + bl ov5_021DF7F8 + str r0, [r4, #0x24] + mov r0, #1 + str r0, [r4, #0xc] +_021F1AD2: + add sp, #0x34 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1A8C + + thumb_func_start ov5_021F1AD8 +ov5_021F1AD8: ; 0x021F1AD8 + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r4, r1, #0 + add r6, r4, #0 + add r5, r0, #0 + add r6, #0x10 + add r3, sp, #0 + mov r2, #5 +_021F1AE8: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021F1AE8 + ldr r0, [r4, #8] + mov r1, #2 + bl ov5_021DF9FC + str r0, [sp] + add r0, r5, #0 + add r1, sp, #0x28 + bl sub_020715E4 + ldr r0, [r4, #8] + add r1, sp, #0 + add r2, sp, #0x28 + bl ov5_021DF7F8 + str r0, [r4, #0x3c] + ldr r5, [r4, #0x38] + add r0, r5, #0 + bl sub_02021358 + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_02021344 + add r0, r5, #0 + bl sub_020213D4 + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_020213A4 + add r0, r5, #0 + bl sub_02021394 + add r1, r0, #0 + ldr r0, [r4, #0x3c] + bl sub_02021380 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_02021368 + ldr r0, [r4, #0x3c] + bl sub_02021414 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021F1AD8 + + thumb_func_start ov5_021F1B4C +ov5_021F1B4C: ; 0x021F1B4C + push {r4, r5, lr} + sub sp, #0xc + ldr r3, _021F1BA0 ; =0x02200320 + add r5, r0, #0 + add r4, r1, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, r5, #0 + str r0, [r2, #0] + add r3, #0x50 + ldmia r3!, {r0, r1} + add r2, r4, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r4, #0 + str r0, [r2, #0] + ldr r0, [r5, #4] + bl sub_020644A4 + mov r1, #7 + ldr r2, [r4, #8] + lsl r1, r1, #0xc + sub r1, r2, r1 + str r1, [r4, #8] + cmp r0, #0 + bne _021F1B8C + mov r0, #0 + add sp, #0xc + str r0, [r4, #4] + pop {r4, r5, pc} +_021F1B8C: + ldr r0, [r5, #0] + ldr r2, [r4, #4] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + sub r0, r2, r0 + str r0, [r4, #4] + add sp, #0xc + pop {r4, r5, pc} + nop +_021F1BA0: .word 0x02200320 + thumb_func_end ov5_021F1B4C + + thumb_func_start ov5_021F1BA4 +ov5_021F1BA4: ; 0x021F1BA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov5_021DF574 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #1 + str r5, [sp, #0xc] + bl ov5_021DF55C + str r0, [sp, #0x10] + add r3, sp, #0x14 + mov r2, #5 +_021F1BC6: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021F1BC6 + str r6, [sp, #0x3c] + add r0, sp, #8 + str r0, [sp] + ldr r0, [sp, #0x5c] + ldr r1, _021F1BE8 ; =0x0220034C + str r0, [sp, #4] + ldr r3, [sp, #0x58] + add r0, r5, #0 + add r2, r7, #0 + bl ov5_021DF72C + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F1BE8: .word 0x0220034C + thumb_func_end ov5_021F1BA4 + + thumb_func_start ov5_021F1BEC +ov5_021F1BEC: ; 0x021F1BEC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r6, r0, #0 + add r3, r4, #4 + mov r2, #7 +_021F1BFE: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021F1BFE + add r0, r5, #0 + bl sub_020715B4 + str r0, [r4, #0] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [r4, #0x40] + str r0, [r4, #0x44] + str r0, [r4, #0x48] + mov r0, #0x40 + str r0, [r4, #0x4c] + ldr r0, [r4, #0] + cmp r0, #2 + bne _021F1C26 + mov r0, #0 + str r0, [r4, #0x4c] +_021F1C26: + add r1, r4, #0 + add r0, r5, #0 + add r1, #0x50 + bl sub_020715E4 + add r0, r4, #0 + add r1, sp, #0 + bl ov5_021F1B4C + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F1AD8 + add r0, r5, #0 + bl sub_0207153C + mov r0, #1 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021F1BEC + + thumb_func_start ov5_021F1C54 +ov5_021F1C54: ; 0x021F1C54 + ldr r3, _021F1C5C ; =sub_020211FC + ldr r0, [r1, #0x3c] + bx r3 + nop +_021F1C5C: .word sub_020211FC + thumb_func_end ov5_021F1C54 + + thumb_func_start ov5_021F1C60 +ov5_021F1C60: ; 0x021F1C60 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r2, [r1, #0x40] + ldr r0, [r1, #0x4c] + add r2, r2, r0 + mov r0, #0x12 + lsl r0, r0, #8 + str r2, [r1, #0x40] + cmp r2, r0 + blt _021F1C80 + str r0, [r1, #0x40] + ldr r0, [r1, #0x4c] + neg r0, r0 + str r0, [r1, #0x4c] + b _021F1C90 +_021F1C80: + mov r0, #0xe + lsl r0, r0, #8 + cmp r2, r0 + bgt _021F1C90 + str r0, [r1, #0x40] + ldr r0, [r1, #0x4c] + neg r0, r0 + str r0, [r1, #0x4c] +_021F1C90: + add r0, r1, #0 + add r1, sp, #0 + bl ov5_021F1B4C + add r0, r4, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F1C60 + + thumb_func_start ov5_021F1CA4 +ov5_021F1CA4: ; 0x021F1CA4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_020212A8 + ldr r0, [r4, #0x3c] + add r4, #0x40 + add r1, r4, #0 + bl sub_020212D0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1CA4 + + .rodata + + + .global Unk_ov5_02200320 +Unk_ov5_02200320: ; 0x02200320 + .incbin "incbin/overlay5_rodata.bin", 0x7A0C, 0x7A18 - 0x7A0C + + .global Unk_ov5_0220032C +Unk_ov5_0220032C: ; 0x0220032C + .incbin "incbin/overlay5_rodata.bin", 0x7A18, 0x7A24 - 0x7A18 + + .global Unk_ov5_02200338 +Unk_ov5_02200338: ; 0x02200338 + .incbin "incbin/overlay5_rodata.bin", 0x7A24, 0x7A38 - 0x7A24 + + .global Unk_ov5_0220034C +Unk_ov5_0220034C: ; 0x0220034C + .incbin "incbin/overlay5_rodata.bin", 0x7A38, 0x14 + diff --git a/asm/ov5_021F1CC8.s b/asm/ov5_021F1CC8.s new file mode 100644 index 000000000..4ed1bae80 --- /dev/null +++ b/asm/ov5_021F1CC8.s @@ -0,0 +1,530 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F1CC8 +ov5_021F1CC8: ; 0x021F1CC8 + push {r3, r4, r5, lr} + mov r2, #0 + ldr r1, _021F1CE4 ; =0x00000824 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F1CF8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_021F1CE4: .word 0x00000824 + thumb_func_end ov5_021F1CC8 + + thumb_func_start ov5_021F1CE8 +ov5_021F1CE8: ; 0x021F1CE8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F1D80 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F1CE8 + + thumb_func_start ov5_021F1CF8 +ov5_021F1CF8: ; 0x021F1CF8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + mov r1, #0x65 + ldr r5, [sp, #4] + lsl r1, r1, #2 + add r4, r0, #4 + add r0, r0, r1 + str r0, [sp, #0xc] + ldr r1, _021F1D74 ; =0x000004DC + ldr r0, [sp, #4] + ldr r7, _021F1D78 ; =0x0220039C + add r0, r0, r1 + ldr r6, _021F1D7C ; =0x02200374 + add r5, #0xcc + str r0, [sp, #8] +_021F1D1E: + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [r7, #0] + ldr r0, [r0, #0] + add r1, r4, #0 + mov r2, #0 + bl ov5_021DFB00 + ldr r0, [sp, #0xc] + add r1, r4, #0 + bl sub_02073B70 + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [r6, #0] + ldr r0, [r0, #0] + add r1, r5, #0 + mov r2, #0 + bl ov5_021DFB00 + ldr r0, [sp, #8] + add r1, r5, #0 + bl sub_02073B70 + ldr r0, [sp, #0xc] + add r7, r7, #4 + add r0, #0x54 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r4, #0x14 + add r0, #0x54 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + add r6, r6, #4 + add r0, r0, #1 + add r5, #0x14 + str r0, [sp, #0x10] + cmp r0, #0xa + blo _021F1D1E + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F1D74: .word 0x000004DC +_021F1D78: .word 0x0220039C +_021F1D7C: .word 0x02200374 + thumb_func_end ov5_021F1CF8 + + thumb_func_start ov5_021F1D80 +ov5_021F1D80: ; 0x021F1D80 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0 + add r4, r0, #4 + add r5, #0xcc +_021F1D8A: + add r0, r4, #0 + bl sub_0207395C + add r0, r5, #0 + bl sub_0207395C + add r6, r6, #1 + add r4, #0x14 + add r5, #0x14 + cmp r6, #0xa + blt _021F1D8A + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1D80 + + thumb_func_start ov5_021F1DA4 +ov5_021F1DA4: ; 0x021F1DA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r1, r3, #0 + mov r4, #0 + cmp r0, #4 + bhi _021F1E0E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F1DBE: ; jump table + .short _021F1DC8 - _021F1DBE - 2 ; case 0 + .short _021F1DD6 - _021F1DBE - 2 ; case 1 + .short _021F1DEE - _021F1DBE - 2 ; case 2 + .short _021F1DFA - _021F1DBE - 2 ; case 3 + .short _021F1DEE - _021F1DBE - 2 ; case 4 +_021F1DC8: + mov r0, #0x65 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x54 + mul r0, r2 + add r4, r1, r0 + b _021F1E0E +_021F1DD6: + lsl r3, r1, #4 + ldr r1, _021F1E1C ; =0x022003C4 + lsl r2, r2, #2 + add r1, r1, r3 + mov r0, #0x65 + ldr r2, [r2, r1] + lsl r0, r0, #2 + mov r1, #0x54 + add r0, r5, r0 + mul r1, r2 + add r4, r0, r1 + b _021F1E0E +_021F1DEE: + ldr r0, _021F1E20 ; =0x000004DC + add r1, r5, r0 + mov r0, #0x54 + mul r0, r2 + add r4, r1, r0 + b _021F1E0E +_021F1DFA: + lsl r3, r1, #4 + ldr r1, _021F1E1C ; =0x022003C4 + lsl r2, r2, #2 + add r1, r1, r3 + ldr r0, _021F1E20 ; =0x000004DC + ldr r2, [r2, r1] + mov r1, #0x54 + add r0, r5, r0 + mul r1, r2 + add r4, r0, r1 +_021F1E0E: + cmp r4, #0 + bne _021F1E16 + bl sub_02022974 +_021F1E16: + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_021F1E1C: .word 0x022003C4 +_021F1E20: .word 0x000004DC + thumb_func_end ov5_021F1DA4 + + thumb_func_start ov5_021F1E24 +ov5_021F1E24: ; 0x021F1E24 + push {r4, lr} + mov r4, #0 + cmp r1, #4 + bhi _021F1E7C + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021F1E38: ; jump table + .short _021F1E42 - _021F1E38 - 2 ; case 0 + .short _021F1E4C - _021F1E38 - 2 ; case 1 + .short _021F1E60 - _021F1E38 - 2 ; case 2 + .short _021F1E6A - _021F1E38 - 2 ; case 3 + .short _021F1E60 - _021F1E38 - 2 ; case 4 +_021F1E42: + add r1, r0, #4 + mov r0, #0x14 + mul r0, r2 + add r4, r1, r0 + b _021F1E7C +_021F1E4C: + ldr r1, _021F1E88 ; =0x022003C4 + lsl r3, r3, #4 + lsl r2, r2, #2 + add r1, r1, r3 + ldr r2, [r2, r1] + mov r1, #0x14 + add r0, r0, #4 + mul r1, r2 + add r4, r0, r1 + b _021F1E7C +_021F1E60: + mov r1, #0x14 + add r0, #0xcc + mul r1, r2 + add r4, r0, r1 + b _021F1E7C +_021F1E6A: + ldr r1, _021F1E88 ; =0x022003C4 + lsl r3, r3, #4 + lsl r2, r2, #2 + add r1, r1, r3 + ldr r2, [r2, r1] + mov r1, #0x14 + add r0, #0xcc + mul r1, r2 + add r4, r0, r1 +_021F1E7C: + cmp r4, #0 + bne _021F1E84 + bl sub_02022974 +_021F1E84: + add r0, r4, #0 + pop {r4, pc} + ; .align 2, 0 +_021F1E88: .word 0x022003C4 + thumb_func_end ov5_021F1E24 + + thumb_func_start ov5_021F1E8C +ov5_021F1E8C: ; 0x021F1E8C + ldr r3, _021F1E94 ; =ov5_021F1ECC + mov r1, #0 + bx r3 + nop +_021F1E94: .word ov5_021F1ECC + thumb_func_end ov5_021F1E8C + + thumb_func_start ov5_021F1E98 +ov5_021F1E98: ; 0x021F1E98 + ldr r3, _021F1EA0 ; =ov5_021F1ECC + mov r1, #1 + bx r3 + nop +_021F1EA0: .word ov5_021F1ECC + thumb_func_end ov5_021F1E98 + + thumb_func_start ov5_021F1EA4 +ov5_021F1EA4: ; 0x021F1EA4 + ldr r3, _021F1EAC ; =ov5_021F1ECC + mov r1, #2 + bx r3 + nop +_021F1EAC: .word ov5_021F1ECC + thumb_func_end ov5_021F1EA4 + + thumb_func_start ov5_021F1EB0 +ov5_021F1EB0: ; 0x021F1EB0 + ldr r3, _021F1EB8 ; =ov5_021F1ECC + mov r1, #3 + bx r3 + nop +_021F1EB8: .word ov5_021F1ECC + thumb_func_end ov5_021F1EB0 + + thumb_func_start ov5_021F1EBC +ov5_021F1EBC: ; 0x021F1EBC + ldr r3, _021F1EC4 ; =ov5_021F1ECC + mov r1, #4 + bx r3 + nop +_021F1EC4: .word ov5_021F1ECC + thumb_func_end ov5_021F1EBC + + thumb_func_start ov5_021F1EC8 +ov5_021F1EC8: ; 0x021F1EC8 + mov r0, #0 + bx lr + thumb_func_end ov5_021F1EC8 + + thumb_func_start ov5_021F1ECC +ov5_021F1ECC: ; 0x021F1ECC + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + add r4, r1, #0 + bl sub_02063008 + str r0, [sp, #0xc] + add r0, r5, #0 + bl sub_02063018 + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_02063074 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0206298C + str r0, [sp, #0x14] + add r0, r5, #0 + bl sub_02062990 + str r0, [sp, #0x18] + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r7, r0, #0 + add r0, r5, #0 + bl ov5_021DF578 + mov r1, #0xb + str r0, [sp, #8] + bl ov5_021DF55C + ldr r2, [sp, #0x14] + ldr r3, [sp, #0x18] + add r1, r4, #0 + add r5, r0, #0 + str r4, [sp, #0x1c] + bl ov5_021F1DA4 + str r0, [sp, #0x24] + ldr r2, [sp, #0x14] + ldr r3, [sp, #0x18] + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F1E24 + str r0, [sp, #0x20] + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x10] + add r2, sp, #0x28 + bl sub_02064450 + str r6, [sp, #0x2c] + cmp r4, #5 + bhi _021F1F9E + add r0, r4, r4 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F1F4C: ; jump table + .short _021F1F58 - _021F1F4C - 2 ; case 0 + .short _021F1F58 - _021F1F4C - 2 ; case 1 + .short _021F1F7A - _021F1F4C - 2 ; case 2 + .short _021F1F7A - _021F1F4C - 2 ; case 3 + .short _021F1F58 - _021F1F4C - 2 ; case 4 + .short _021F1F58 - _021F1F4C - 2 ; case 5 +_021F1F58: + mov r0, #2 + lsl r0, r0, #0xe + sub r1, r6, r0 + str r1, [sp, #0x2c] + sub r1, r4, #2 + cmp r1, #1 + bhi _021F1F70 + ldr r1, [sp, #0x30] + lsr r0, r0, #2 + sub r0, r1, r0 + str r0, [sp, #0x30] + b _021F1F9E +_021F1F70: + ldr r1, [sp, #0x30] + lsr r0, r0, #3 + add r0, r1, r0 + str r0, [sp, #0x30] + b _021F1F9E +_021F1F7A: + mov r0, #0xa + lsl r0, r0, #0xc + sub r0, r6, r0 + str r0, [sp, #0x2c] + sub r0, r4, #2 + cmp r0, #1 + bhi _021F1F94 + mov r0, #2 + ldr r1, [sp, #0x30] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x30] + b _021F1F9E +_021F1F94: + mov r0, #2 + ldr r1, [sp, #0x30] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x30] +_021F1F9E: + add r0, sp, #0x1c + str r0, [sp] + ldr r0, [sp, #8] + ldr r1, _021F1FB4 ; =0x02200360 + add r2, sp, #0x28 + mov r3, #0 + str r7, [sp, #4] + bl ov5_021DF72C + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F1FB4: .word 0x02200360 + thumb_func_end ov5_021F1ECC + + thumb_func_start ov5_021F1FB8 +ov5_021F1FB8: ; 0x021F1FB8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715B4 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_020715BC + ldr r1, [r0, #8] + str r1, [r4, #0x18] + ldr r1, [r0, #4] + str r1, [r4, #0x14] + mov r1, #0x1f + str r1, [r4, #0xc] + ldr r0, [r0, #0] + str r0, [r4, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1FB8 + + thumb_func_start ov5_021F1FE0 +ov5_021F1FE0: ; 0x021F1FE0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F1FE0 + + thumb_func_start ov5_021F1FE4 +ov5_021F1FE4: ; 0x021F1FE4 + push {r3, lr} + ldr r2, [r1, #0] + cmp r2, #0 + beq _021F1FF2 + cmp r2, #1 + beq _021F2004 + pop {r3, pc} +_021F1FF2: + ldr r0, [r1, #4] + add r0, r0, #1 + str r0, [r1, #4] + cmp r0, #0x10 + blt _021F2010 + ldr r0, [r1, #0] + add r0, r0, #1 + str r0, [r1, #0] + pop {r3, pc} +_021F2004: + ldr r2, [r1, #0xc] + sub r2, r2, #2 + str r2, [r1, #0xc] + bpl _021F2010 + bl ov5_021DF74C +_021F2010: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F1FE4 + + thumb_func_start ov5_021F2014 +ov5_021F2014: ; 0x021F2014 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #8] + cmp r1, #0 + bne _021F2046 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x14] + mov r2, #0x1f + ldr r0, [r0, #0xc] + mov r1, #1 + lsl r2, r2, #0x10 + bl sub_020B2D8C + ldr r0, [r4, #0x14] + ldr r1, [r4, #0xc] + ldr r0, [r0, #0xc] + bl sub_020B3764 + ldr r0, [r4, #0x18] + add r1, sp, #0 + bl sub_02073BB4 +_021F2046: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2014 + + .rodata + + + .global Unk_ov5_02200360 +Unk_ov5_02200360: ; 0x02200360 + .incbin "incbin/overlay5_rodata.bin", 0x7A4C, 0x7A60 - 0x7A4C + + .global Unk_ov5_02200374 +Unk_ov5_02200374: ; 0x02200374 + .incbin "incbin/overlay5_rodata.bin", 0x7A60, 0x7A88 - 0x7A60 + + .global Unk_ov5_0220039C +Unk_ov5_0220039C: ; 0x0220039C + .incbin "incbin/overlay5_rodata.bin", 0x7A88, 0x7AB0 - 0x7A88 + + .global Unk_ov5_022003C4 +Unk_ov5_022003C4: ; 0x022003C4 + .incbin "incbin/overlay5_rodata.bin", 0x7AB0, 0x40 + diff --git a/asm/ov5_021F204C.s b/asm/ov5_021F204C.s new file mode 100644 index 000000000..ab0301e1e --- /dev/null +++ b/asm/ov5_021F204C.s @@ -0,0 +1,523 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F204C +ov5_021F204C: ; 0x021F204C + push {r3, r4, r5, lr} + mov r1, #0x4f + mov r2, #0 + lsl r1, r1, #2 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F2078 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F204C + + thumb_func_start ov5_021F2068 +ov5_021F2068: ; 0x021F2068 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F20B8 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F2068 + + thumb_func_start ov5_021F2078 +ov5_021F2078: ; 0x021F2078 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #1 + lsl r1, r1, #8 + ldr r4, _021F20B4 ; =0x02200404 + str r0, [sp, #4] + mov r7, #0 + add r5, r0, r1 + add r6, r0, #4 +_021F208A: + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [r4, #0] + ldr r0, [r0, #0] + add r1, r5, #0 + mov r2, #0 + bl ov5_021DFB00 + add r0, r6, #0 + add r1, r5, #0 + bl sub_02073B70 + add r7, r7, #1 + add r4, r4, #4 + add r5, #0x14 + add r6, #0x54 + cmp r7, #3 + blt _021F208A + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F20B4: .word 0x02200404 + thumb_func_end ov5_021F2078 + + thumb_func_start ov5_021F20B8 +ov5_021F20B8: ; 0x021F20B8 + push {r3, r4, r5, lr} + mov r1, #1 + lsl r1, r1, #8 + mov r4, #0 + add r5, r0, r1 +_021F20C2: + add r0, r5, #0 + bl sub_0207395C + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _021F20C2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F20B8 + + thumb_func_start ov5_021F20D4 +ov5_021F20D4: ; 0x021F20D4 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + mov r1, #0xc + str r4, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x1c] + bl sub_02063050 + add r0, r5, #0 + bl sub_02062C0C + add r1, r0, #1 + add r0, sp, #0x14 + str r0, [sp] + str r1, [sp, #4] + ldr r1, _021F2114 ; =0x02200438 + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_021F2114: .word 0x02200438 + thumb_func_end ov5_021F20D4 + + thumb_func_start ov5_021F2118 +ov5_021F2118: ; 0x021F2118 + push {r4, lr} + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x18] + bl sub_02062910 + str r0, [r4, #0] + ldr r0, [r4, #0x18] + bl sub_02062918 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2118 + + thumb_func_start ov5_021F2144 +ov5_021F2144: ; 0x021F2144 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F2144 + + thumb_func_start ov5_021F2148 +ov5_021F2148: ; 0x021F2148 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x18] + ldr r1, [r4, #0] + add r5, r0, #0 + ldr r2, [r4, #4] + add r0, r6, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F216A + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021F216A: + mov r0, #0 + mov r1, #2 + str r0, [r4, #8] + add r0, r6, #0 + lsl r1, r1, #8 + bl sub_020628D8 + cmp r0, #1 + beq _021F218C + add r0, r6, #0 + bl sub_02062C00 + add r1, r6, #0 + bl sub_02055F00 + cmp r0, #0 + bne _021F2194 +_021F218C: + mov r0, #1 + add sp, #0xc + str r0, [r4, #8] + pop {r3, r4, r5, r6, pc} +_021F2194: + add r0, r6, #0 + bl sub_02062C00 + add r1, r6, #0 + bl sub_02055F88 + str r0, [r4, #0xc] + add r0, r6, #0 + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2148 + + thumb_func_start ov5_021F21B8 +ov5_021F21B8: ; 0x021F21B8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #8] + cmp r1, #1 + beq _021F21DC + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0xc] + add r2, r0, #4 + mov r0, #0x54 + mul r0, r1 + add r0, r2, r0 + add r1, sp, #0 + bl sub_02073BB4 +_021F21DC: + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F21B8 + + thumb_func_start ov5_021F21E0 +ov5_021F21E0: ; 0x021F21E0 + push {r4, lr} + mov r2, #0 + mov r1, #0xc + add r3, r2, #0 + add r4, r0, #0 + bl ov5_021DF53C + str r4, [r0, #8] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F21E0 + + thumb_func_start ov5_021F21F4 +ov5_021F21F4: ; 0x021F21F4 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F226C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F21F4 + + thumb_func_start ov5_021F2204 +ov5_021F2204: ; 0x021F2204 + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] + bx lr + thumb_func_end ov5_021F2204 + + thumb_func_start ov5_021F220C +ov5_021F220C: ; 0x021F220C + push {r3, lr} + ldr r1, [r0, #0] + sub r1, r1, #1 + str r1, [r0, #0] + bpl _021F221A + bl sub_02022974 +_021F221A: + pop {r3, pc} + thumb_func_end ov5_021F220C + + thumb_func_start ov5_021F221C +ov5_021F221C: ; 0x021F221C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021F2264 + mov r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #8] + mov r1, #0xb + mov r2, #0x6d + bl ov5_021DF9E0 + ldr r0, [r4, #8] + mov r1, #0xb + mov r2, #0xb5 + bl ov5_021DFA14 + ldr r0, [r4, #8] + mov r1, #0xc + mov r2, #0xe + mov r3, #1 + bl ov5_021DFA3C + mov r0, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F2268 ; =0x0220044C + mov r2, #0xb + str r0, [sp, #8] + ldr r0, [r4, #8] + mov r1, #0xd + add r3, r2, #0 + bl ov5_021DF864 +_021F2264: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021F2268: .word 0x0220044C + thumb_func_end ov5_021F221C + + thumb_func_start ov5_021F226C +ov5_021F226C: ; 0x021F226C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #1 + bne _021F229A + mov r0, #0 + str r0, [r4, #4] + ldr r0, [r4, #8] + mov r1, #0xb + bl ov5_021DFA08 + ldr r0, [r4, #8] + mov r1, #0xb + bl ov5_021DFA30 + ldr r0, [r4, #8] + mov r1, #0xc + bl ov5_021DFA7C + ldr r0, [r4, #8] + mov r1, #0xd + bl ov5_021DF9D4 +_021F229A: + pop {r4, pc} + thumb_func_end ov5_021F226C + + thumb_func_start ov5_021F229C +ov5_021F229C: ; 0x021F229C + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #0 + bne _021F22A8 + bl ov5_021F221C +_021F22A8: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F229C + + thumb_func_start ov5_021F22AC +ov5_021F22AC: ; 0x021F22AC + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #0 + bne _021F22B8 + bl ov5_021F226C +_021F22B8: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F22AC + + thumb_func_start ov5_021F22BC +ov5_021F22BC: ; 0x021F22BC + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + add r1, sp, #0x14 + bl ov5_021ECDA0 + mov r0, #2 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x1c] + add r0, r4, #0 + mov r1, #0x1c + str r4, [sp, #8] + bl ov5_021DF55C + str r0, [sp, #0xc] + add r0, sp, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r1, _021F2300 ; =0x02200410 + add r0, r4, #0 + add r2, sp, #0x14 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_021F2300: .word 0x02200410 + thumb_func_end ov5_021F22BC + + thumb_func_start ov5_021F2304 +ov5_021F2304: ; 0x021F2304 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x10] + bl ov5_021F229C + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0xc] + mov r1, #0xd + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x18] + ldr r0, [r4, #0x10] + bl ov5_021F2204 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F2304 + + thumb_func_start ov5_021F2344 +ov5_021F2344: ; 0x021F2344 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x18] + bl sub_020211FC + ldr r0, [r4, #0x10] + bl ov5_021F220C + ldr r0, [r4, #0x10] + bl ov5_021F22AC + pop {r4, pc} + thumb_func_end ov5_021F2344 + + thumb_func_start ov5_021F235C +ov5_021F235C: ; 0x021F235C + push {r4, r5, lr} + sub sp, #0x14 + ldr r5, _021F23B4 ; =0x02200424 + add r2, r0, #0 + add r4, r1, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r0, [r4, #8] + cmp r0, #1 + bne _021F2398 + mov r1, #0 + str r1, [r4, #8] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #5 + blt _021F2392 + add r0, r2, #0 + bl ov5_021DF74C + add sp, #0x14 + pop {r4, r5, pc} +_021F2392: + ldr r0, [r4, #0x18] + bl sub_02021380 +_021F2398: + ldr r1, [r4, #4] + ldr r0, [r4, #0x18] + lsl r2, r1, #2 + add r1, sp, #0 + ldr r1, [r1, r2] + bl sub_02021368 + cmp r0, #1 + bne _021F23AE + mov r0, #1 + str r0, [r4, #8] +_021F23AE: + add sp, #0x14 + pop {r4, r5, pc} + nop +_021F23B4: .word 0x02200424 + thumb_func_end ov5_021F235C + + thumb_func_start ov5_021F23B8 +ov5_021F23B8: ; 0x021F23B8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x18] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F23B8 + + .rodata + + + .global Unk_ov5_02200404 +Unk_ov5_02200404: ; 0x02200404 + .incbin "incbin/overlay5_rodata.bin", 0x7AF0, 0x7AFC - 0x7AF0 + + .global Unk_ov5_02200410 +Unk_ov5_02200410: ; 0x02200410 + .incbin "incbin/overlay5_rodata.bin", 0x7AFC, 0x7B10 - 0x7AFC + + .global Unk_ov5_02200424 +Unk_ov5_02200424: ; 0x02200424 + .incbin "incbin/overlay5_rodata.bin", 0x7B10, 0x7B24 - 0x7B10 + + .global Unk_ov5_02200438 +Unk_ov5_02200438: ; 0x02200438 + .incbin "incbin/overlay5_rodata.bin", 0x7B24, 0x7B38 - 0x7B24 + + .global Unk_ov5_0220044C +Unk_ov5_0220044C: ; 0x0220044C + .incbin "incbin/overlay5_rodata.bin", 0x7B38, 0x18 + diff --git a/asm/ov5_021F23D0.s b/asm/ov5_021F23D0.s new file mode 100644 index 000000000..b236bc10f --- /dev/null +++ b/asm/ov5_021F23D0.s @@ -0,0 +1,276 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F23D0 +ov5_021F23D0: ; 0x021F23D0 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F23FC + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F23D0 + + thumb_func_start ov5_021F23EC +ov5_021F23EC: ; 0x021F23EC + push {r4, lr} + add r4, r0, #0 + bl ov5_021F2424 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F23EC + + thumb_func_start ov5_021F23FC +ov5_021F23FC: ; 0x021F23FC + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x4e + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r4, #0x18 + add r1, r4, #0 + mov r3, #0xa5 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F23FC + + thumb_func_start ov5_021F2424 +ov5_021F2424: ; 0x021F2424 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl sub_0207395C + add r4, #0x18 + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F2424 + + thumb_func_start ov5_021F2438 +ov5_021F2438: ; 0x021F2438 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + mov r1, #0xd + add r4, r0, #0 + bl ov5_021DF55C + str r0, [sp, #0x18] + add r1, sp, #8 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r5, #0 + mov r1, #2 + str r4, [sp, #0x14] + str r5, [sp, #0x1c] + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F2478 ; =0x02200464 + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021F2478: .word 0x02200464 + thumb_func_end ov5_021F2438 + + thumb_func_start ov5_021F247C +ov5_021F247C: ; 0x021F247C + push {r3, lr} + bl sub_02071598 + mov r1, #1 + str r1, [r0, #0xc] + pop {r3, pc} + thumb_func_end ov5_021F247C + + thumb_func_start ov5_021F2488 +ov5_021F2488: ; 0x021F2488 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, r4, #0 + str r0, [r2, #0] + ldr r3, [r4, #0x14] + mov r0, #0 + str r0, [sp] + add r2, r3, #4 + ldr r0, [r4, #0x10] + add r1, #0x1c + add r3, #0x18 + bl ov5_021DFB40 + ldr r1, [r4, #0x14] + add r0, r4, #0 + add r2, r4, #0 + add r0, #0x40 + add r1, r1, #4 + add r2, #0x1c + bl sub_02073B90 + ldr r0, [r4, #0x18] + bl sub_02062910 + str r0, [r4, #4] + ldr r0, [r4, #0x18] + bl sub_02062918 + str r0, [r4, #8] + ldr r4, [r4, #0x18] + add r1, sp, #0x10 + add r0, r4, #0 + bl sub_02063050 + add r0, r4, #0 + add r1, sp, #4 + bl sub_02063078 + ldr r1, [sp, #0x10] + ldr r0, [sp, #4] + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [sp, #8] + add r0, r1, r0 + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [sp, #0xc] + add r0, r1, r0 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #0x10 + bl sub_020715D4 + mov r0, #1 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2488 + + thumb_func_start ov5_021F2510 +ov5_021F2510: ; 0x021F2510 + ldr r3, _021F2518 ; =sub_02073AA8 + add r1, #0x1c + add r0, r1, #0 + bx r3 + ; .align 2, 0 +_021F2518: .word sub_02073AA8 + thumb_func_end ov5_021F2510 + + thumb_func_start ov5_021F251C +ov5_021F251C: ; 0x021F251C + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0xc] + ldr r4, [r5, #0x18] + cmp r0, #0 + bne _021F2544 + ldr r1, [r5, #4] + ldr r2, [r5, #8] + add r0, r4, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F2568 + add r0, r6, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r4, r5, r6, pc} +_021F2544: + add r0, r5, #0 + add r0, #0x1c + bl sub_02073B40 + cmp r0, #1 + bne _021F255A + add r0, r6, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r4, r5, r6, pc} +_021F255A: + add r0, r5, #0 + mov r1, #1 + add r0, #0x1c + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 +_021F2568: + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _021F259E + add r0, r4, #0 + add r1, sp, #0xc + bl sub_02063050 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02063078 + ldr r1, [sp, #0xc] + ldr r0, [sp] + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r0, [sp, #4] + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [sp, #8] + add r0, r1, r0 + str r0, [sp, #0x14] + add r0, r6, #0 + add r1, sp, #0xc + bl sub_020715D4 +_021F259E: + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F251C + + thumb_func_start ov5_021F25A4 +ov5_021F25A4: ; 0x021F25A4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x40 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F25A4 + + .rodata + + + .global Unk_ov5_02200464 +Unk_ov5_02200464: ; 0x02200464 + .incbin "incbin/overlay5_rodata.bin", 0x7B50, 0x14 + diff --git a/asm/ov5_021F25C0.s b/asm/ov5_021F25C0.s new file mode 100644 index 000000000..d441fc2ad --- /dev/null +++ b/asm/ov5_021F25C0.s @@ -0,0 +1,371 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F25C0 +ov5_021F25C0: ; 0x021F25C0 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x6c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F25EC + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F25C0 + + thumb_func_start ov5_021F25DC +ov5_021F25DC: ; 0x021F25DC + push {r4, lr} + add r4, r0, #0 + bl ov5_021F2610 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F25DC + + thumb_func_start ov5_021F25EC +ov5_021F25EC: ; 0x021F25EC + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x51 + bl ov5_021DFB00 + add r0, r4, #0 + add r0, #0x18 + add r1, r4, #4 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F25EC + + thumb_func_start ov5_021F2610 +ov5_021F2610: ; 0x021F2610 + ldr r3, _021F2618 ; =sub_0207395C + add r0, r0, #4 + bx r3 + nop +_021F2618: .word sub_0207395C + thumb_func_end ov5_021F2610 + + thumb_func_start ov5_021F261C +ov5_021F261C: ; 0x021F261C + push {r4, r5, r6, lr} + sub sp, #0x30 + add r4, r1, #0 + add r6, r2, #0 + add r2, sp, #0x14 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r5, r0, #0 + str r1, [r2, #8] + str r3, [sp, #0x20] + bl ov5_021DF578 + mov r1, #0xf + str r0, [sp, #0x24] + bl ov5_021DF55C + str r0, [sp, #0x28] + ldr r0, [sp, #0x40] + str r5, [sp, #0x2c] + cmp r0, #0 + bne _021F2666 + add r0, r5, #0 + bl sub_02062C00 + mov r1, #2 + lsl r2, r4, #0x10 + lsl r1, r1, #0xe + add r2, r2, r1 + str r2, [sp, #0x14] + lsl r2, r6, #0x10 + add r1, r2, r1 + str r1, [sp, #0x1c] + add r1, sp, #0x14 + bl sub_020644A4 + b _021F2682 +_021F2666: + ldr r3, _021F26A0 ; =0x02200484 + add r2, sp, #8 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, sp, #0x14 + str r0, [r2, #0] + add r0, r5, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #8 + bl sub_020630AC +_021F2682: + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0x20 + str r1, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x24] + ldr r1, _021F26A4 ; =0x02200490 + ldr r3, [sp, #0x40] + add r2, sp, #0x14 + bl ov5_021DF72C + add sp, #0x30 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F26A0: .word 0x02200484 +_021F26A4: .word 0x02200490 + thumb_func_end ov5_021F261C + + thumb_func_start ov5_021F26A8 +ov5_021F26A8: ; 0x021F26A8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + bl sub_020715BC + add r7, r0, #0 + add r2, r5, #0 + add r3, r7, #0 + ldr r4, [r7, #0xc] + add r2, #0x24 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r4, #0 + bl sub_02062910 + str r0, [r5, #0xc] + add r0, r4, #0 + bl sub_02062918 + str r0, [r5, #0x10] + ldr r0, [r7, #0] + str r0, [r5, #8] + add r0, r6, #0 + bl sub_020715B4 + str r0, [r5, #0x18] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [r5, #0x1c] + lsr r0, r0, #2 + str r0, [r5, #0x20] + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F26A8 + + thumb_func_start ov5_021F26F0 +ov5_021F26F0: ; 0x021F26F0 + push {lr} + sub sp, #0xc + ldr r0, [r1, #0x30] + add r1, sp, #0 + mov r2, #0 + str r2, [r1, #0] + str r2, [r1, #4] + str r2, [r1, #8] + bl sub_020630AC + add sp, #0xc + pop {pc} + thumb_func_end ov5_021F26F0 + + thumb_func_start ov5_021F2708 +ov5_021F2708: ; 0x021F2708 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r1, #0 + ldr r4, [r5, #0x30] + ldr r1, [r5, #0xc] + add r6, r0, #0 + ldr r2, [r5, #0x10] + add r0, r4, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F272A + add r0, r6, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r4, r5, r6, pc} +_021F272A: + mov r0, #0 + str r0, [r5, #0] + add r0, r4, #0 + bl sub_0206298C + mov r1, #0 + mvn r1, r1 + str r0, [r5, #4] + cmp r0, r1 + bne _021F2746 + mov r0, #1 + add sp, #0x18 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_021F2746: + ldr r1, [r5, #0x18] + cmp r1, #0 + beq _021F27B0 + str r0, [r5, #8] + ldr r1, [r5, #0x1c] + ldr r0, [r5, #0x20] + add r2, r1, r0 + mov r1, #1 + lsl r1, r1, #0xe + str r2, [r5, #0x1c] + cmp r2, r1 + blt _021F2768 + str r1, [r5, #0x1c] + ldr r0, [r5, #0x20] + neg r0, r0 + str r0, [r5, #0x20] + b _021F2776 +_021F2768: + lsr r0, r1, #2 + cmp r2, r0 + bgt _021F2776 + str r0, [r5, #0x1c] + ldr r0, [r5, #0x20] + neg r0, r0 + str r0, [r5, #0x20] +_021F2776: + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [r5, #0x1c] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x10] + mov r0, #1 + lsl r0, r0, #0xe + str r0, [sp, #0x14] + add r0, r4, #0 + add r1, sp, #0xc + bl sub_020630AC + add r0, r4, #0 + add r1, sp, #0 + bl sub_02063050 + mov r0, #1 + ldr r1, [r5, #0x1c] + lsl r0, r0, #0xc + sub r0, r1, r0 + ldr r2, [sp, #4] + add r1, sp, #0 + add r0, r2, r0 + str r0, [sp, #4] + add r0, r6, #0 + bl sub_020715D4 +_021F27B0: + add sp, #0x18 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F2708 + + thumb_func_start ov5_021F27B4 +ov5_021F27B4: ; 0x021F27B4 + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + add r3, r1, #0 + add r6, r0, #0 + ldr r0, [r3, #0] + cmp r0, #1 + beq _021F282A + mov r0, #0 + ldr r1, [r3, #8] + mvn r0, r0 + cmp r1, r0 + beq _021F282A + ldr r0, [r3, #0x14] + ldr r5, _021F2830 ; =0x02200478 + add r0, r0, #1 + str r0, [r3, #0x14] + ldmia r5!, {r0, r1} + add r4, sp, #0 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + mov r2, #0 + str r0, [r4, #0] + ldr r4, [r3, #0x2c] + ldr r0, [r3, #8] + add r4, #0x18 + cmp r0, #3 + bhi _021F2808 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F27F6: ; jump table + .short _021F27FE - _021F27F6 - 2 ; case 0 + .short _021F2808 - _021F27F6 - 2 ; case 1 + .short _021F2802 - _021F27F6 - 2 ; case 2 + .short _021F2806 - _021F27F6 - 2 ; case 3 +_021F27FE: + mov r2, #0xb4 + b _021F2808 +_021F2802: + ldr r2, _021F2834 ; =0x0000010E + b _021F2808 +_021F2806: + mov r2, #0x5a +_021F2808: + mov r1, #0 + lsl r2, r2, #0x10 + add r0, sp, #0x18 + lsr r2, r2, #0x10 + add r3, r1, #0 + bl sub_0201E2E0 + add r0, r6, #0 + add r1, sp, #0xc + bl sub_020715E4 + add r0, r4, #0 + add r1, sp, #0xc + add r2, sp, #0 + add r3, sp, #0x18 + bl sub_02073BA4 +_021F282A: + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + nop +_021F2830: .word 0x02200478 +_021F2834: .word 0x0000010E + thumb_func_end ov5_021F27B4 + + thumb_func_start ov5_021F2838 +ov5_021F2838: ; 0x021F2838 + push {r4, lr} + add r4, r1, #0 + bl sub_02071598 + mov r1, #1 + str r4, [r0, #0x18] + lsl r1, r1, #0xc + str r1, [r0, #0x1c] + lsr r1, r1, #2 + str r1, [r0, #0x20] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2838 + + .rodata + + + .global Unk_ov5_02200478 +Unk_ov5_02200478: ; 0x02200478 + .incbin "incbin/overlay5_rodata.bin", 0x7B64, 0x7B70 - 0x7B64 + + .global Unk_ov5_02200484 +Unk_ov5_02200484: ; 0x02200484 + .incbin "incbin/overlay5_rodata.bin", 0x7B70, 0x7B7C - 0x7B70 + + .global Unk_ov5_02200490 +Unk_ov5_02200490: ; 0x02200490 + .incbin "incbin/overlay5_rodata.bin", 0x7B7C, 0x14 + diff --git a/asm/ov5_021F2850.s b/asm/ov5_021F2850.s new file mode 100644 index 000000000..0e74bc130 --- /dev/null +++ b/asm/ov5_021F2850.s @@ -0,0 +1,337 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F2850 +ov5_021F2850: ; 0x021F2850 + push {r4, lr} + mov r2, #0 + mov r1, #0x7c + add r3, r2, #0 + add r4, r0, #0 + bl ov5_021DF53C + str r4, [r0, #0x10] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2850 + + thumb_func_start ov5_021F2864 +ov5_021F2864: ; 0x021F2864 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F28C0 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F2864 + + thumb_func_start ov5_021F2874 +ov5_021F2874: ; 0x021F2874 + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] + bx lr + thumb_func_end ov5_021F2874 + + thumb_func_start ov5_021F287C +ov5_021F287C: ; 0x021F287C + push {r3, lr} + ldr r1, [r0, #0] + sub r1, r1, #1 + str r1, [r0, #0] + bpl _021F288A + bl sub_02022974 +_021F288A: + pop {r3, pc} + thumb_func_end ov5_021F287C + + thumb_func_start ov5_021F288C +ov5_021F288C: ; 0x021F288C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _021F28BA + mov r0, #1 + str r0, [sp] + add r1, r4, #0 + ldr r0, [r4, #0x10] + add r1, #0x14 + mov r2, #0 + mov r3, #0x52 + bl ov5_021DFB00 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0x28 + add r1, #0x14 + bl sub_02073B70 + mov r0, #1 + str r0, [r4, #4] +_021F28BA: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F288C + + thumb_func_start ov5_021F28C0 +ov5_021F28C0: ; 0x021F28C0 + push {r3, lr} + ldr r1, [r0, #4] + cmp r1, #1 + bne _021F28D2 + mov r1, #0 + str r1, [r0, #4] + add r0, #0x14 + bl sub_0207395C +_021F28D2: + pop {r3, pc} + thumb_func_end ov5_021F28C0 + + thumb_func_start ov5_021F28D4 +ov5_021F28D4: ; 0x021F28D4 + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #0 + bne _021F28E0 + bl ov5_021F288C +_021F28E0: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F28D4 + + thumb_func_start ov5_021F28E4 +ov5_021F28E4: ; 0x021F28E4 + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #0 + bne _021F28F0 + bl ov5_021F28C0 +_021F28F0: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F28E4 + + thumb_func_start ov5_021F28F4 +ov5_021F28F4: ; 0x021F28F4 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r6, r1, #0 + add r7, r2, #0 + add r2, sp, #0xc + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + str r3, [sp, #8] + add r5, r0, #0 + str r1, [r2, #8] + bl ov5_021DF578 + add r4, r0, #0 + ldr r0, [sp, #8] + str r4, [sp, #0x1c] + str r0, [sp, #0x18] + add r0, r5, #0 + bl sub_02062C00 + str r0, [sp, #0x20] + add r0, r4, #0 + mov r1, #0x10 + bl ov5_021DF55C + str r0, [sp, #0x24] + ldr r0, [sp, #0x40] + str r5, [sp, #0x28] + cmp r0, #0 + bne _021F294A + mov r0, #2 + lsl r1, r6, #0x10 + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0xc] + lsl r1, r7, #0x10 + add r0, r1, r0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + add r1, sp, #0xc + bl sub_020644A4 + b _021F2952 +_021F294A: + add r0, r5, #0 + add r1, sp, #0xc + bl sub_02063050 +_021F2952: + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0x18 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F2970 ; =0x022004B0 + ldr r3, [sp, #0x40] + add r0, r4, #0 + add r2, sp, #0xc + bl ov5_021DF72C + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F2970: .word 0x022004B0 + thumb_func_end ov5_021F28F4 + + thumb_func_start ov5_021F2974 +ov5_021F2974: ; 0x021F2974 + push {r4, lr} + add r4, r1, #0 + bl sub_02071598 + str r4, [r0, #0xc] + pop {r4, pc} + thumb_func_end ov5_021F2974 + + thumb_func_start ov5_021F2980 +ov5_021F2980: ; 0x021F2980 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r2, r0, #0 + add r6, r2, #0 + add r3, r4, #0 + ldmia r6!, {r0, r1} + add r3, #0x10 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r0, [r2, #0] + str r0, [r4, #4] + add r0, r5, #0 + bl sub_020715B4 + str r0, [r4, #0xc] + ldr r0, [r4, #0x1c] + bl ov5_021F28D4 + ldr r0, [r4, #0x1c] + bl ov5_021F2874 + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2980 + + thumb_func_start ov5_021F29BC +ov5_021F29BC: ; 0x021F29BC + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x1c] + bl ov5_021F287C + ldr r0, [r4, #0x1c] + bl ov5_021F28E4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F29BC + + thumb_func_start ov5_021F29D0 +ov5_021F29D0: ; 0x021F29D0 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [r1, #0xc] + ldr r4, [r1, #0x20] + cmp r0, #0 + beq _021F29FE + add r1, sp, #0xc + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + bl sub_020630AC + add r0, r4, #0 + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 +_021F29FE: + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F29D0 + + thumb_func_start ov5_021F2A04 +ov5_021F2A04: ; 0x021F2A04 + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + add r3, r1, #0 + add r6, r0, #0 + ldr r0, [r3, #0] + cmp r0, #1 + beq _021F2A70 + ldr r0, [r3, #8] + ldr r5, _021F2A74 ; =0x022004A4 + add r0, r0, #1 + str r0, [r3, #8] + ldmia r5!, {r0, r1} + add r4, sp, #0 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + mov r2, #0 + str r0, [r4, #0] + ldr r4, [r3, #0x1c] + ldr r0, [r3, #4] + add r4, #0x28 + cmp r0, #3 + bhi _021F2A4E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F2A3C: ; jump table + .short _021F2A44 - _021F2A3C - 2 ; case 0 + .short _021F2A4E - _021F2A3C - 2 ; case 1 + .short _021F2A48 - _021F2A3C - 2 ; case 2 + .short _021F2A4C - _021F2A3C - 2 ; case 3 +_021F2A44: + mov r2, #0xb4 + b _021F2A4E +_021F2A48: + ldr r2, _021F2A78 ; =0x0000010E + b _021F2A4E +_021F2A4C: + mov r2, #0x5a +_021F2A4E: + mov r1, #0 + lsl r2, r2, #0x10 + add r0, sp, #0x18 + lsr r2, r2, #0x10 + add r3, r1, #0 + bl sub_0201E2E0 + add r0, r6, #0 + add r1, sp, #0xc + bl sub_020715E4 + add r0, r4, #0 + add r1, sp, #0xc + add r2, sp, #0 + add r3, sp, #0x18 + bl sub_02073BA4 +_021F2A70: + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021F2A74: .word 0x022004A4 +_021F2A78: .word 0x0000010E + thumb_func_end ov5_021F2A04 + + .rodata + + + .global Unk_ov5_022004A4 +Unk_ov5_022004A4: ; 0x022004A4 + .incbin "incbin/overlay5_rodata.bin", 0x7B90, 0x7B9C - 0x7B90 + + .global Unk_ov5_022004B0 +Unk_ov5_022004B0: ; 0x022004B0 + .incbin "incbin/overlay5_rodata.bin", 0x7B9C, 0x14 + diff --git a/asm/ov5_021F2A7C.s b/asm/ov5_021F2A7C.s new file mode 100644 index 000000000..39b70badd --- /dev/null +++ b/asm/ov5_021F2A7C.s @@ -0,0 +1,199 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F2A7C +ov5_021F2A7C: ; 0x021F2A7C + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F2AA8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2A7C + + thumb_func_start ov5_021F2A98 +ov5_021F2A98: ; 0x021F2A98 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F2AD0 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F2A98 + + thumb_func_start ov5_021F2AA8 +ov5_021F2AA8: ; 0x021F2AA8 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0xf + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r4, #0x18 + add r1, r4, #0 + mov r3, #0xa0 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F2AA8 + + thumb_func_start ov5_021F2AD0 +ov5_021F2AD0: ; 0x021F2AD0 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl sub_0207395C + add r4, #0x18 + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F2AD0 + + thumb_func_start ov5_021F2AE4 +ov5_021F2AE4: ; 0x021F2AE4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + bl ov5_021DF578 + mov r1, #0x11 + str r0, [sp, #8] + bl ov5_021DF55C + str r0, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #0x10 + bl sub_02064450 + mov r0, #1 + ldr r2, [sp, #0x18] + lsl r1, r4, #3 + lsl r0, r0, #0xc + add r0, r1, r0 + add r0, r2, r0 + str r0, [sp, #0x18] + add r0, r5, #0 + bl sub_02063010 + lsl r1, r0, #0xf + mov r0, #2 + lsl r0, r0, #0xe + sub r0, r1, r0 + str r0, [sp, #0x14] + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, _021F2B44 ; =0x022004C4 + add r2, sp, #0x10 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F2B44: .word 0x022004C4 + thumb_func_end ov5_021F2AE4 + + thumb_func_start ov5_021F2B48 +ov5_021F2B48: ; 0x021F2B48 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl sub_020715BC + ldr r3, [r0, #4] + ldr r1, [r0, #0] + mov r0, #0 + str r1, [r4, #0x78] + str r3, [r4, #0x7c] + str r0, [sp] + add r2, r3, #4 + ldr r0, [r4, #0x78] + add r1, r4, #0 + add r3, #0x18 + bl ov5_021DFB40 + ldr r1, [r4, #0x7c] + add r0, r4, #0 + add r0, #0x24 + add r1, r1, #4 + add r2, r4, #0 + bl sub_02073B90 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2B48 + + thumb_func_start ov5_021F2B80 +ov5_021F2B80: ; 0x021F2B80 + ldr r3, _021F2B88 ; =sub_02073AA8 + add r0, r1, #0 + bx r3 + nop +_021F2B88: .word sub_02073AA8 + thumb_func_end ov5_021F2B80 + + thumb_func_start ov5_021F2B8C +ov5_021F2B8C: ; 0x021F2B8C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02073B40 + cmp r0, #1 + bne _021F2BA4 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, pc} +_021F2BA4: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2B8C + + thumb_func_start ov5_021F2BB4 +ov5_021F2BB4: ; 0x021F2BB4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x24 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2BB4 + + .rodata + + + .global Unk_ov5_022004C4 +Unk_ov5_022004C4: ; 0x022004C4 + .incbin "incbin/overlay5_rodata.bin", 0x7BB0, 0x14 + diff --git a/asm/ov5_021F2BD0.s b/asm/ov5_021F2BD0.s new file mode 100644 index 000000000..a525514e0 --- /dev/null +++ b/asm/ov5_021F2BD0.s @@ -0,0 +1,196 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F2BD0 +ov5_021F2BD0: ; 0x021F2BD0 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F2BFC + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2BD0 + + thumb_func_start ov5_021F2BEC +ov5_021F2BEC: ; 0x021F2BEC + push {r4, lr} + add r4, r0, #0 + bl ov5_021F2C24 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F2BEC + + thumb_func_start ov5_021F2BFC +ov5_021F2BFC: ; 0x021F2BFC + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x10 + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r4, #0x18 + add r1, r4, #0 + mov r3, #0xa1 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F2BFC + + thumb_func_start ov5_021F2C24 +ov5_021F2C24: ; 0x021F2C24 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl sub_0207395C + add r4, #0x18 + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F2C24 + + thumb_func_start ov5_021F2C38 +ov5_021F2C38: ; 0x021F2C38 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + add r7, r3, #0 + bl ov5_021DF578 + mov r1, #0x12 + str r0, [sp, #8] + bl ov5_021DF55C + str r0, [sp, #0xc] + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #0x10 + bl sub_02064450 + ldr r1, [sp, #0x18] + lsl r0, r4, #3 + add r0, r1, r0 + str r0, [sp, #0x18] + add r0, r5, #0 + bl sub_02063010 + lsl r1, r0, #0xf + mov r0, #2 + lsl r0, r0, #0xe + sub r0, r1, r0 + str r0, [sp, #0x14] + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, _021F2C94 ; =0x022004D8 + add r2, sp, #0x10 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021F2C94: .word 0x022004D8 + thumb_func_end ov5_021F2C38 + + thumb_func_start ov5_021F2C98 +ov5_021F2C98: ; 0x021F2C98 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl sub_020715BC + ldr r3, [r0, #4] + ldr r1, [r0, #0] + mov r0, #0 + str r1, [r4, #0x78] + str r3, [r4, #0x7c] + str r0, [sp] + add r2, r3, #4 + ldr r0, [r4, #0x78] + add r1, r4, #0 + add r3, #0x18 + bl ov5_021DFB40 + ldr r1, [r4, #0x7c] + add r0, r4, #0 + add r0, #0x24 + add r1, r1, #4 + add r2, r4, #0 + bl sub_02073B90 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2C98 + + thumb_func_start ov5_021F2CD0 +ov5_021F2CD0: ; 0x021F2CD0 + ldr r3, _021F2CD8 ; =sub_02073AA8 + add r0, r1, #0 + bx r3 + nop +_021F2CD8: .word sub_02073AA8 + thumb_func_end ov5_021F2CD0 + + thumb_func_start ov5_021F2CDC +ov5_021F2CDC: ; 0x021F2CDC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02073B40 + cmp r0, #1 + bne _021F2CF4 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, pc} +_021F2CF4: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2CDC + + thumb_func_start ov5_021F2D04 +ov5_021F2D04: ; 0x021F2D04 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x24 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2D04 + + .rodata + + + .global Unk_ov5_022004D8 +Unk_ov5_022004D8: ; 0x022004D8 + .incbin "incbin/overlay5_rodata.bin", 0x7BC4, 0x14 + diff --git a/asm/ov5_021F2D20.s b/asm/ov5_021F2D20.s new file mode 100644 index 000000000..07d91dee5 --- /dev/null +++ b/asm/ov5_021F2D20.s @@ -0,0 +1,730 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F2D20 +ov5_021F2D20: ; 0x021F2D20 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F2D4C + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2D20 + + thumb_func_start ov5_021F2D3C +ov5_021F2D3C: ; 0x021F2D3C + push {r4, lr} + add r4, r0, #0 + bl ov5_021F2E2C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F2D3C + + thumb_func_start ov5_021F2D4C +ov5_021F2D4C: ; 0x021F2D4C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0x53 + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0x54 + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #0 + mov r2, #0xaa + bl ov5_021DFA14 + ldr r0, [r4, #0] + mov r1, #3 + mov r2, #0xab + bl ov5_021DFA14 + ldr r0, [r4, #0] + mov r1, #4 + mov r2, #0xac + bl ov5_021DFA14 + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0xad + bl ov5_021DFA14 + mov r1, #0 + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #1 + bl ov5_021DFA3C + mov r2, #1 + ldr r0, [r4, #0] + mov r1, #4 + add r3, r2, #0 + bl ov5_021DFA3C + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #2 + mov r3, #1 + bl ov5_021DFA3C + ldr r0, [r4, #0] + mov r1, #6 + mov r2, #3 + mov r3, #1 + bl ov5_021DFA3C + mov r1, #0 + str r1, [sp] + ldr r0, _021F2E1C ; =0x02200540 + str r1, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + add r2, r1, #0 + add r3, r1, #0 + bl ov5_021DF864 + mov r0, #4 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F2E20 ; =0x02200558 + mov r1, #5 + str r0, [sp, #8] + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #3 + bl ov5_021DF864 + mov r2, #5 + str r2, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F2E24 ; =0x02200528 + mov r1, #6 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r3, #4 + bl ov5_021DF864 + mov r0, #6 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F2E28 ; =0x02200570 + mov r2, #5 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #7 + add r3, r2, #0 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021F2E1C: .word 0x02200540 +_021F2E20: .word 0x02200558 +_021F2E24: .word 0x02200528 +_021F2E28: .word 0x02200570 + thumb_func_end ov5_021F2D4C + + thumb_func_start ov5_021F2E2C +ov5_021F2E2C: ; 0x021F2E2C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #5 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #0 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #3 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #4 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #5 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #0 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #4 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #5 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #6 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #0 + bl ov5_021DF9D4 + ldr r0, [r4, #0] + mov r1, #5 + bl ov5_021DF9D4 + ldr r0, [r4, #0] + mov r1, #6 + bl ov5_021DF9D4 + ldr r0, [r4, #0] + mov r1, #7 + bl ov5_021DF9D4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2E2C + + thumb_func_start ov5_021F2EA4 +ov5_021F2EA4: ; 0x021F2EA4 + push {r4, r5, r6, lr} + sub sp, #0x30 + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02063020 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_02063030 + str r0, [sp, #0xc] + add r0, r5, #0 + bl sub_02063040 + str r0, [sp, #0x10] + add r0, r4, #0 + str r4, [sp, #0x18] + bl ov5_021DF574 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0x13 + bl ov5_021DF55C + str r0, [sp, #0x1c] + add r0, r5, #0 + add r1, sp, #0x24 + str r5, [sp, #0x20] + bl sub_02063050 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F2F08 ; =0x022004EC + add r0, r4, #0 + add r2, sp, #0x24 + add r3, r6, #0 + bl ov5_021DF72C + add sp, #0x30 + pop {r4, r5, r6, pc} + nop +_021F2F08: .word 0x022004EC + thumb_func_end ov5_021F2EA4 + + thumb_func_start ov5_021F2F0C +ov5_021F2F0C: ; 0x021F2F0C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x18 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x30] + bl sub_02062924 + str r0, [r4, #4] + ldr r0, [r4, #0x30] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x30] + bl sub_02062918 + str r0, [r4, #0xc] + ldr r0, [r4, #0x18] + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x20] + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #0x30] + bl sub_02063074 + str r0, [sp, #4] + ldr r0, [r4, #0x24] + add r1, sp, #0 + bl sub_020644A4 + str r0, [r4, #0x14] + mov r0, #2 + ldr r1, [sp] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp] + mov r0, #0x12 + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0x28] + mov r1, #0 + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x34] + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #0 + bne _021F2F9A + mov r0, #1 + str r0, [r4, #0] +_021F2F9A: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F2F0C + + thumb_func_start ov5_021F2FA0 +ov5_021F2FA0: ; 0x021F2FA0 + ldr r3, _021F2FA8 ; =sub_020211FC + ldr r0, [r1, #0x34] + bx r3 + nop +_021F2FA8: .word sub_020211FC + thumb_func_end ov5_021F2FA0 + + thumb_func_start ov5_021F2FAC +ov5_021F2FAC: ; 0x021F2FAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + ldr r6, [r4, #0x30] + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F2FD0 + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F2FD0: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021F3008 + add r0, r5, #0 + add r1, sp, #0xc + bl sub_020715E4 + ldr r0, [r4, #0x18] + add r1, sp, #0 + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x20] + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [r4, #0x24] + bl sub_020644A4 + str r0, [r4, #0x14] + cmp r0, #1 + bne _021F3008 + ldr r0, [sp, #4] + add r1, sp, #0xc + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_020715D4 +_021F3008: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F301A + cmp r0, #1 + beq _021F303E + cmp r0, #2 + beq _021F304C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F301A: + mov r1, #1 + ldr r0, [r4, #0x34] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x34] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #0xc + blt _021F3086 + mov r0, #1 + add sp, #0x18 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021F303E: + mov r1, #3 + ldr r0, [r4, #0x34] + lsl r1, r1, #0xe + bl sub_02021380 + mov r0, #2 + str r0, [r4, #0] +_021F304C: + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F3066 + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F3066: + add r0, r6, #0 + bl sub_02063020 + add r7, r0, #0 + add r0, r6, #0 + bl sub_02063040 + ldr r1, [r4, #0x18] + cmp r1, r7 + bne _021F3080 + ldr r1, [r4, #0x20] + cmp r1, r0 + beq _021F3086 +_021F3080: + add r0, r5, #0 + bl ov5_021DF74C +_021F3086: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F2FAC + + thumb_func_start ov5_021F308C +ov5_021F308C: ; 0x021F308C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + bl sub_020627B4 + cmp r0, #0 + bne _021F30AE + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r4, r5, pc} +_021F30AE: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x34] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F308C + + thumb_func_start ov5_021F30C4 +ov5_021F30C4: ; 0x021F30C4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #8 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, sp, #0 + str r0, [r2, #0] + add r0, r5, #0 + bl sub_020715E4 + ldr r0, [r4, #0x14] + mov r1, #0 + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x1c] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F30C4 + + thumb_func_start ov5_021F30FC +ov5_021F30FC: ; 0x021F30FC + ldr r3, _021F3104 ; =sub_020211FC + ldr r0, [r1, #0x1c] + bx r3 + nop +_021F3104: .word sub_020211FC + thumb_func_end ov5_021F30FC + + thumb_func_start ov5_021F3108 +ov5_021F3108: ; 0x021F3108 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F3116 + cmp r0, #1 + pop {r4, pc} +_021F3116: + mov r1, #1 + ldr r0, [r4, #0x1c] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x1c] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #0xc + blt _021F3138 + mov r0, #1 + str r0, [r4, #4] + str r0, [r4, #0] +_021F3138: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3108 + + thumb_func_start ov5_021F313C +ov5_021F313C: ; 0x021F313C + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x1c] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F313C + + thumb_func_start ov5_021F3154 +ov5_021F3154: ; 0x021F3154 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + ldr r6, [r0, #0x40] + add r5, r1, #0 + add r4, r2, #0 + str r0, [sp, #0x10] + add r0, r6, #0 + mov r1, #0x13 + add r7, r3, #0 + str r5, [sp, #8] + str r4, [sp, #0xc] + str r6, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + mov r0, #2 + lsl r1, r5, #0x10 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x20] + mov r0, #9 + lsl r1, r4, #0x10 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x24] + add r0, sp, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r1, _021F31A4 ; =0x02200514 + add r0, r6, #0 + add r2, sp, #0x1c + add r3, r7, #0 + bl ov5_021DF72C + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F31A4: .word 0x02200514 + thumb_func_end ov5_021F3154 + + thumb_func_start ov5_021F31A8 +ov5_021F31A8: ; 0x021F31A8 + push {r3, lr} + bl sub_02071598 + ldr r0, [r0, #4] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F31A8 + + thumb_func_start ov5_021F31B4 +ov5_021F31B4: ; 0x021F31B4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x10 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r5, #0 + bl sub_020715B4 + str r0, [r4, #0xc] + ldr r0, [r4, #0x10] + lsl r1, r0, #0x10 + mov r0, #2 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #0x14] + lsl r1, r0, #0x10 + mov r0, #9 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r4, #0x18] + add r1, sp, #0 + bl sub_020644A4 + mov r0, #1 + ldr r1, [sp, #4] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021F321E + cmp r0, #1 + beq _021F3222 + cmp r0, #2 + b _021F3226 +_021F321E: + mov r1, #5 + b _021F3228 +_021F3222: + mov r1, #6 + b _021F3228 +_021F3226: + mov r1, #7 +_021F3228: + ldr r0, [r4, #0x1c] + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x24] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F31B4 + + thumb_func_start ov5_021F3238 +ov5_021F3238: ; 0x021F3238 + ldr r3, _021F3240 ; =sub_020211FC + ldr r0, [r1, #0x24] + bx r3 + nop +_021F3240: .word sub_020211FC + thumb_func_end ov5_021F3238 + + thumb_func_start ov5_021F3244 +ov5_021F3244: ; 0x021F3244 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F3252 + cmp r0, #1 + pop {r4, pc} +_021F3252: + mov r1, #1 + ldr r0, [r4, #0x24] + lsl r1, r1, #0xc + bl sub_02021368 + cmp r0, #1 + bne _021F326A + mov r0, #1 + str r0, [r4, #4] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021F326A: + pop {r4, pc} + thumb_func_end ov5_021F3244 + + thumb_func_start ov5_021F326C +ov5_021F326C: ; 0x021F326C + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x24] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F326C + + .rodata + + + .global Unk_ov5_022004EC +Unk_ov5_022004EC: ; 0x022004EC + .incbin "incbin/overlay5_rodata.bin", 0x7BD8, 0x7BEC - 0x7BD8 + + .global Unk_ov5_02200500 +Unk_ov5_02200500: ; 0x02200500 + .incbin "incbin/overlay5_rodata.bin", 0x7BEC, 0x7C00 - 0x7BEC + + .global Unk_ov5_02200514 +Unk_ov5_02200514: ; 0x02200514 + .incbin "incbin/overlay5_rodata.bin", 0x7C00, 0x7C14 - 0x7C00 + + .global Unk_ov5_02200528 +Unk_ov5_02200528: ; 0x02200528 + .incbin "incbin/overlay5_rodata.bin", 0x7C14, 0x7C2C - 0x7C14 + + .global Unk_ov5_02200540 +Unk_ov5_02200540: ; 0x02200540 + .incbin "incbin/overlay5_rodata.bin", 0x7C2C, 0x7C44 - 0x7C2C + + .global Unk_ov5_02200558 +Unk_ov5_02200558: ; 0x02200558 + .incbin "incbin/overlay5_rodata.bin", 0x7C44, 0x7C5C - 0x7C44 + + .global Unk_ov5_02200570 +Unk_ov5_02200570: ; 0x02200570 + .incbin "incbin/overlay5_rodata.bin", 0x7C5C, 0x18 + diff --git a/asm/ov5_021F3284.s b/asm/ov5_021F3284.s new file mode 100644 index 000000000..526a819af --- /dev/null +++ b/asm/ov5_021F3284.s @@ -0,0 +1,283 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F3284 +ov5_021F3284: ; 0x021F3284 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F32B0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3284 + + thumb_func_start ov5_021F32A0 +ov5_021F32A0: ; 0x021F32A0 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F32F4 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F32A0 + + thumb_func_start ov5_021F32B0 +ov5_021F32B0: ; 0x021F32B0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #3 + mov r2, #0x56 + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #2 + mov r2, #0xae + bl ov5_021DFA14 + ldr r0, [r4, #0] + mov r1, #2 + mov r2, #5 + mov r3, #1 + bl ov5_021DFA3C + mov r3, #2 + mov r1, #3 + str r3, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F32F0 ; =0x0220059C + add r2, r1, #0 + str r0, [sp, #8] + ldr r0, [r4, #0] + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021F32F0: .word 0x0220059C + thumb_func_end ov5_021F32B0 + + thumb_func_start ov5_021F32F4 +ov5_021F32F4: ; 0x021F32F4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #3 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #2 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #2 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #3 + bl ov5_021DF9D4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F32F4 + + thumb_func_start ov5_021F331C +ov5_021F331C: ; 0x021F331C + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062C00 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0x15 + str r4, [sp, #0x18] + bl ov5_021DF55C + str r0, [sp, #0x1c] + add r1, sp, #8 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r5, #0 + mov r1, #2 + str r5, [sp, #0x20] + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F3368 ; =0x02200588 + add r0, r4, #0 + add r2, sp, #8 + add r3, r6, #0 + bl ov5_021DF72C + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021F3368: .word 0x02200588 + thumb_func_end ov5_021F331C + + thumb_func_start ov5_021F336C +ov5_021F336C: ; 0x021F336C + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, sp, #0 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r5, r0, #0 + str r1, [r2, #8] + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x14 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x20] + bl sub_02062924 + str r0, [r4, #4] + ldr r0, [r4, #0x20] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x20] + bl sub_02062918 + str r0, [r4, #0xc] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0x18] + mov r1, #3 + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x24] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F336C + + thumb_func_start ov5_021F33C4 +ov5_021F33C4: ; 0x021F33C4 + ldr r3, _021F33CC ; =sub_020211FC + ldr r0, [r1, #0x24] + bx r3 + nop +_021F33CC: .word sub_020211FC + thumb_func_end ov5_021F33C4 + + thumb_func_start ov5_021F33D0 +ov5_021F33D0: ; 0x021F33D0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + ldr r7, [r4, #0x20] + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + add r0, r7, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F33F0 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, r6, r7, pc} +_021F33F0: + add r0, r5, #0 + bl sub_020715B4 + add r6, r0, #0 + cmp r6, #1 + bne _021F340E + add r0, r7, #0 + bl sub_02062EC8 + cmp r0, #0 + bne _021F340E + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, r6, r7, pc} +_021F340E: + ldr r0, [r4, #0] + cmp r0, #0 + bne _021F3444 + mov r1, #1 + ldr r0, [r4, #0x24] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x24] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #0xc + blt _021F3444 + cmp r6, #0 + bne _021F343C + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, r6, r7, pc} +_021F343C: + ldr r0, [r4, #0x24] + mov r1, #0 + bl sub_02021380 +_021F3444: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F33D0 + + thumb_func_start ov5_021F3448 +ov5_021F3448: ; 0x021F3448 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x20] + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F346C + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021F346C: + add r0, r6, #0 + add r1, sp, #0 + bl sub_02063050 + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [r4, #0x24] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3448 + + .rodata + + + .global Unk_ov5_02200588 +Unk_ov5_02200588: ; 0x02200588 + .incbin "incbin/overlay5_rodata.bin", 0x7C74, 0x7C88 - 0x7C74 + + .global Unk_ov5_0220059C +Unk_ov5_0220059C: ; 0x0220059C + .incbin "incbin/overlay5_rodata.bin", 0x7C88, 0x18 + diff --git a/asm/ov5_021F348C.s b/asm/ov5_021F348C.s new file mode 100644 index 000000000..a91a5ee26 --- /dev/null +++ b/asm/ov5_021F348C.s @@ -0,0 +1,427 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F348C +ov5_021F348C: ; 0x021F348C + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #8 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #4] + bl ov5_021F34D0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F348C + + thumb_func_start ov5_021F34A8 +ov5_021F34A8: ; 0x021F34A8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F358C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F34A8 + + thumb_func_start ov5_021F34B8 +ov5_021F34B8: ; 0x021F34B8 + push {r3, lr} + mov r1, #0x17 + bl ov5_021DF55C + ldr r1, [r0, #0] + cmp r1, #1 + beq _021F34CE + mov r1, #1 + str r1, [r0, #0] + bl ov5_021F3518 +_021F34CE: + pop {r3, pc} + thumb_func_end ov5_021F34B8 + + thumb_func_start ov5_021F34D0 +ov5_021F34D0: ; 0x021F34D0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #0x58 + bl ov5_021DF9E0 + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #0xaf + bl ov5_021DFA14 + mov r1, #7 + ldr r0, [r4, #4] + add r2, r1, #0 + mov r3, #1 + bl ov5_021DFA3C + mov r0, #7 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3514 ; =0x022005D8 + mov r2, #6 + str r0, [sp, #8] + ldr r0, [r4, #4] + mov r1, #8 + add r3, r2, #0 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + nop +_021F3514: .word 0x022005D8 + thumb_func_end ov5_021F34D0 + + thumb_func_start ov5_021F3518 +ov5_021F3518: ; 0x021F3518 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #0xc + mov r2, #0x9f + bl ov5_021DF9E0 + ldr r0, [r4, #4] + mov r1, #0xd + mov r2, #0x9d + bl ov5_021DF9E0 + ldr r0, [r4, #4] + mov r1, #0xe + mov r2, #0x9e + bl ov5_021DF9E0 + mov r0, #7 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3588 ; =0x022005D8 + mov r1, #0xe + str r0, [sp, #8] + ldr r0, [r4, #4] + mov r2, #0xc + mov r3, #6 + bl ov5_021DF864 + mov r0, #7 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3588 ; =0x022005D8 + mov r1, #0xf + str r0, [sp, #8] + ldr r0, [r4, #4] + mov r2, #0xd + mov r3, #6 + bl ov5_021DF864 + mov r0, #7 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3588 ; =0x022005D8 + mov r1, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #4] + mov r2, #0xe + mov r3, #6 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021F3588: .word 0x022005D8 + thumb_func_end ov5_021F3518 + + thumb_func_start ov5_021F358C +ov5_021F358C: ; 0x021F358C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #6 + bl ov5_021DFA08 + ldr r0, [r4, #4] + mov r1, #6 + bl ov5_021DFA30 + ldr r0, [r4, #4] + mov r1, #7 + bl ov5_021DFA7C + ldr r0, [r4, #4] + mov r1, #8 + bl ov5_021DF9D4 + ldr r0, [r4, #0] + cmp r0, #1 + bne _021F35E6 + ldr r0, [r4, #4] + mov r1, #0xc + bl ov5_021DFA08 + ldr r0, [r4, #4] + mov r1, #0xd + bl ov5_021DFA08 + ldr r0, [r4, #4] + mov r1, #0xe + bl ov5_021DFA08 + ldr r0, [r4, #4] + mov r1, #0xe + bl ov5_021DF9D4 + ldr r0, [r4, #4] + mov r1, #0xf + bl ov5_021DF9D4 + ldr r0, [r4, #4] + mov r1, #0x10 + bl ov5_021DF9D4 +_021F35E6: + pop {r4, pc} + thumb_func_end ov5_021F358C + + thumb_func_start ov5_021F35E8 +ov5_021F35E8: ; 0x021F35E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + add r4, r2, #0 + add r0, r5, #0 + add r6, r3, #0 + bl sub_02062C00 + str r0, [r4, #0] + str r7, [r4, #4] + add r0, r7, #0 + mov r1, #0x17 + bl ov5_021DF55C + str r0, [r4, #8] + add r0, r5, #0 + add r1, r6, #0 + str r5, [r4, #0xc] + bl sub_02063050 + add r0, r5, #0 + bl sub_02063020 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02063040 + add r1, r0, #0 + add r0, r4, #0 + add r2, r6, #0 + bl sub_02064450 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + ldr r1, [sp, #0x18] + str r0, [r1, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F35E8 + + thumb_func_start ov5_021F3638 +ov5_021F3638: ; 0x021F3638 + push {r3, r4, r5, lr} + sub sp, #0x28 + add r5, r0, #0 + bl ov5_021DF578 + add r1, sp, #8 + str r1, [sp] + add r1, r5, #0 + add r2, sp, #0xc + add r3, sp, #0x1c + add r4, r0, #0 + bl ov5_021F35E8 + mov r0, #2 + ldr r1, [sp, #0x24] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x24] + add r0, sp, #0xc + str r0, [sp] + ldr r0, [sp, #8] + ldr r1, _021F3674 ; =0x022005C4 + str r0, [sp, #4] + add r0, r4, #0 + add r2, sp, #0x1c + mov r3, #0 + bl ov5_021DF72C + add sp, #0x28 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021F3674: .word 0x022005C4 + thumb_func_end ov5_021F3638 + + thumb_func_start ov5_021F3678 +ov5_021F3678: ; 0x021F3678 + push {r4, r5, r6, lr} + sub sp, #0x58 + ldr r6, _021F36EC ; =0x022005F0 + add r5, r0, #0 + add r4, r1, #0 + add r3, sp, #0xc + mov r2, #6 +_021F3686: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021F3686 + add r0, r5, #0 + bl ov5_021DF578 + add r1, sp, #8 + str r1, [sp] + add r1, r5, #0 + add r2, sp, #0x3c + add r3, sp, #0x4c + add r6, r0, #0 + bl ov5_021F35E8 + ldr r0, [sp, #0x44] + ldr r0, [r0, #0] + cmp r0, #1 + beq _021F36B0 + bl sub_02022974 +_021F36B0: + mov r0, #0xc + mul r0, r4 + add r1, sp, #0xc + ldr r2, [sp, #0x4c] + ldr r1, [r1, r0] + add r3, r4, #0 + add r1, r2, r1 + str r1, [sp, #0x4c] + add r1, sp, #0x10 + ldr r2, [sp, #0x50] + ldr r1, [r1, r0] + add r1, r2, r1 + str r1, [sp, #0x50] + add r1, sp, #0x14 + ldr r0, [r1, r0] + ldr r2, [sp, #0x54] + ldr r1, _021F36F0 ; =0x022005C4 + add r0, r2, r0 + str r0, [sp, #0x54] + add r0, sp, #0x3c + str r0, [sp] + ldr r0, [sp, #8] + add r2, sp, #0x4c + str r0, [sp, #4] + add r0, r6, #0 + bl ov5_021DF72C + add sp, #0x58 + pop {r4, r5, r6, pc} + nop +_021F36EC: .word 0x022005F0 +_021F36F0: .word 0x022005C4 + thumb_func_end ov5_021F3678 + + thumb_func_start ov5_021F36F4 +ov5_021F36F4: ; 0x021F36F4 + push {r4, r5, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x1c] + bl sub_02062910 + str r0, [r4, #4] + ldr r0, [r4, #0x1c] + bl sub_02062918 + str r0, [r4, #8] + add r0, r5, #0 + add r1, sp, #0x10 + bl sub_020715E4 + ldr r3, _021F3750 ; =0x022005B4 + add r2, sp, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + bl sub_020715B4 + add r1, r0, #0 + lsl r2, r1, #2 + add r1, sp, #0 + ldr r1, [r1, r2] + ldr r0, [r4, #0x14] + add r2, sp, #0x10 + bl ov5_021DF84C + str r0, [r4, #0x20] + mov r0, #1 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 +_021F3750: .word 0x022005B4 + thumb_func_end ov5_021F36F4 + + thumb_func_start ov5_021F3754 +ov5_021F3754: ; 0x021F3754 + ldr r3, _021F375C ; =sub_020211FC + ldr r0, [r1, #0x20] + bx r3 + nop +_021F375C: .word sub_020211FC + thumb_func_end ov5_021F3754 + + thumb_func_start ov5_021F3760 +ov5_021F3760: ; 0x021F3760 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _021F378E + mov r1, #1 + ldr r0, [r4, #0x20] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x20] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #9 + blt _021F378E + add r0, r5, #0 + bl ov5_021DF74C +_021F378E: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F3760 + + thumb_func_start ov5_021F3790 +ov5_021F3790: ; 0x021F3790 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x20] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F3790 + + .rodata + + + .global Unk_ov5_022005B4 +Unk_ov5_022005B4: ; 0x022005B4 + .incbin "incbin/overlay5_rodata.bin", 0x7CA0, 0x7CB0 - 0x7CA0 + + .global Unk_ov5_022005C4 +Unk_ov5_022005C4: ; 0x022005C4 + .incbin "incbin/overlay5_rodata.bin", 0x7CB0, 0x7CC4 - 0x7CB0 + + .global Unk_ov5_022005D8 +Unk_ov5_022005D8: ; 0x022005D8 + .incbin "incbin/overlay5_rodata.bin", 0x7CC4, 0x7CDC - 0x7CC4 + + .global Unk_ov5_022005F0 +Unk_ov5_022005F0: ; 0x022005F0 + .incbin "incbin/overlay5_rodata.bin", 0x7CDC, 0x30 + diff --git a/asm/ov5_021F37A8.s b/asm/ov5_021F37A8.s new file mode 100644 index 000000000..0ea364987 --- /dev/null +++ b/asm/ov5_021F37A8.s @@ -0,0 +1,355 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F37A8 +ov5_021F37A8: ; 0x021F37A8 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F37D4 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F37A8 + + thumb_func_start ov5_021F37C4 +ov5_021F37C4: ; 0x021F37C4 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F381C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F37C4 + + thumb_func_start ov5_021F37D4 +ov5_021F37D4: ; 0x021F37D4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #7 + mov r2, #0x59 + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #7 + mov r2, #0xb0 + bl ov5_021DFA14 + mov r1, #8 + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #1 + bl ov5_021DFA3C + mov r0, #8 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3818 ; =0x02200634 + mov r2, #7 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #9 + add r3, r2, #0 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + nop +_021F3818: .word 0x02200634 + thumb_func_end ov5_021F37D4 + + thumb_func_start ov5_021F381C +ov5_021F381C: ; 0x021F381C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #7 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #7 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #8 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #9 + bl ov5_021DF9D4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F381C + + thumb_func_start ov5_021F3844 +ov5_021F3844: ; 0x021F3844 + push {r4, r5, r6, lr} + sub sp, #0x30 + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02063020 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_02063030 + str r0, [sp, #0xc] + add r0, r5, #0 + bl sub_02063040 + str r0, [sp, #0x10] + add r0, r4, #0 + str r4, [sp, #0x18] + bl ov5_021DF574 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0x18 + bl ov5_021DF55C + str r0, [sp, #0x1c] + add r0, r5, #0 + add r1, sp, #0x24 + str r5, [sp, #0x20] + bl sub_02063050 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F38A8 ; =0x02200620 + add r0, r4, #0 + add r2, sp, #0x24 + add r3, r6, #0 + bl ov5_021DF72C + add sp, #0x30 + pop {r4, r5, r6, pc} + nop +_021F38A8: .word 0x02200620 + thumb_func_end ov5_021F3844 + + thumb_func_start ov5_021F38AC +ov5_021F38AC: ; 0x021F38AC + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x18 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x30] + bl sub_02062924 + str r0, [r4, #4] + ldr r0, [r4, #0x30] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x30] + bl sub_02062918 + str r0, [r4, #0xc] + ldr r0, [r4, #0x18] + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x20] + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #0x30] + bl sub_02063074 + str r0, [sp, #4] + ldr r0, [r4, #0x24] + add r1, sp, #0 + bl sub_020644A4 + str r0, [r4, #0x14] + mov r0, #2 + ldr r1, [sp] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp] + mov r0, #0x12 + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0x28] + mov r1, #9 + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x34] + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #0 + bne _021F393A + mov r0, #1 + str r0, [r4, #0] +_021F393A: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F38AC + + thumb_func_start ov5_021F3940 +ov5_021F3940: ; 0x021F3940 + ldr r3, _021F3948 ; =sub_020211FC + ldr r0, [r1, #0x34] + bx r3 + nop +_021F3948: .word sub_020211FC + thumb_func_end ov5_021F3940 + + thumb_func_start ov5_021F394C +ov5_021F394C: ; 0x021F394C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + ldr r6, [r4, #0x30] + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F3970 + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F3970: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021F39A8 + add r0, r5, #0 + add r1, sp, #0xc + bl sub_020715E4 + ldr r0, [r4, #0x18] + add r1, sp, #0 + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x20] + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [r4, #0x24] + bl sub_020644A4 + str r0, [r4, #0x14] + cmp r0, #1 + bne _021F39A8 + ldr r0, [sp, #4] + add r1, sp, #0xc + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_020715D4 +_021F39A8: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F39BA + cmp r0, #1 + beq _021F39DE + cmp r0, #2 + beq _021F39F4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F39BA: + mov r1, #1 + ldr r0, [r4, #0x34] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x34] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #0xc + blt _021F3A14 + mov r0, #1 + add sp, #0x18 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021F39DE: + mov r1, #3 + ldr r0, [r4, #0x34] + lsl r1, r1, #0xe + bl sub_02021380 + ldr r0, [r4, #0x34] + mov r1, #0 + bl sub_02021368 + mov r0, #2 + str r0, [r4, #0] +_021F39F4: + add r0, r6, #0 + bl sub_02063020 + add r7, r0, #0 + add r0, r6, #0 + bl sub_02063040 + ldr r1, [r4, #0x18] + cmp r1, r7 + bne _021F3A0E + ldr r1, [r4, #0x20] + cmp r1, r0 + beq _021F3A14 +_021F3A0E: + add r0, r5, #0 + bl ov5_021DF74C +_021F3A14: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F394C + + thumb_func_start ov5_021F3A18 +ov5_021F3A18: ; 0x021F3A18 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + bl sub_020627B4 + cmp r0, #0 + bne _021F3A3A + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r4, r5, pc} +_021F3A3A: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x34] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3A18 + + .rodata + + + .global Unk_ov5_02200620 +Unk_ov5_02200620: ; 0x02200620 + .incbin "incbin/overlay5_rodata.bin", 0x7D0C, 0x7D20 - 0x7D0C + + .global Unk_ov5_02200634 +Unk_ov5_02200634: ; 0x02200634 + .incbin "incbin/overlay5_rodata.bin", 0x7D20, 0x18 + diff --git a/asm/ov5_021F3A50.s b/asm/ov5_021F3A50.s new file mode 100644 index 000000000..579a653f6 --- /dev/null +++ b/asm/ov5_021F3A50.s @@ -0,0 +1,359 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F3A50 +ov5_021F3A50: ; 0x021F3A50 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F3A7C + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3A50 + + thumb_func_start ov5_021F3A6C +ov5_021F3A6C: ; 0x021F3A6C + push {r4, lr} + add r4, r0, #0 + bl ov5_021F3AC4 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F3A6C + + thumb_func_start ov5_021F3A7C +ov5_021F3A7C: ; 0x021F3A7C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #8 + mov r2, #0x5a + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #8 + mov r2, #0xb1 + bl ov5_021DFA14 + mov r1, #9 + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #1 + bl ov5_021DFA3C + mov r0, #9 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3AC0 ; =0x02200660 + mov r2, #8 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0xa + add r3, r2, #0 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + nop +_021F3AC0: .word 0x02200660 + thumb_func_end ov5_021F3A7C + + thumb_func_start ov5_021F3AC4 +ov5_021F3AC4: ; 0x021F3AC4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #8 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #8 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #9 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #0xa + bl ov5_021DF9D4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3AC4 + + thumb_func_start ov5_021F3AEC +ov5_021F3AEC: ; 0x021F3AEC + push {r4, r5, r6, lr} + sub sp, #0x30 + add r5, r0, #0 + add r6, r1, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02063020 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_02063030 + str r0, [sp, #0xc] + add r0, r5, #0 + bl sub_02063040 + str r0, [sp, #0x10] + add r0, r4, #0 + str r4, [sp, #0x18] + bl ov5_021DF574 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0x19 + bl ov5_021DF55C + str r0, [sp, #0x1c] + add r0, r5, #0 + add r1, sp, #0x24 + str r5, [sp, #0x20] + bl sub_02063050 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F3B50 ; =0x0220064C + add r0, r4, #0 + add r2, sp, #0x24 + add r3, r6, #0 + bl ov5_021DF72C + add sp, #0x30 + pop {r4, r5, r6, pc} + nop +_021F3B50: .word 0x0220064C + thumb_func_end ov5_021F3AEC + + thumb_func_start ov5_021F3B54 +ov5_021F3B54: ; 0x021F3B54 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x18 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x30] + bl sub_02062924 + str r0, [r4, #4] + ldr r0, [r4, #0x30] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x30] + bl sub_02062918 + str r0, [r4, #0xc] + ldr r0, [r4, #0x18] + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x20] + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #0x30] + bl sub_02063074 + str r0, [sp, #4] + ldr r0, [r4, #0x24] + add r1, sp, #0 + bl sub_020644A4 + str r0, [r4, #0x14] + mov r0, #0x1e + ldr r1, [sp] + lsl r0, r0, #0xa + add r0, r1, r0 + str r0, [sp] + mov r0, #2 + ldr r1, [sp, #4] + lsl r0, r0, #0xe + sub r0, r1, r0 + str r0, [sp, #4] + mov r0, #0xd + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0x28] + mov r1, #0xa + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x34] + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #0 + bne _021F3BEC + mov r0, #1 + str r0, [r4, #0] +_021F3BEC: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3B54 + + thumb_func_start ov5_021F3BF4 +ov5_021F3BF4: ; 0x021F3BF4 + ldr r3, _021F3BFC ; =sub_020211FC + ldr r0, [r1, #0x34] + bx r3 + nop +_021F3BFC: .word sub_020211FC + thumb_func_end ov5_021F3BF4 + + thumb_func_start ov5_021F3C00 +ov5_021F3C00: ; 0x021F3C00 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + ldr r6, [r4, #0x30] + ldr r1, [r4, #4] + add r5, r0, #0 + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + add r0, r6, #0 + bl sub_020627B4 + cmp r0, #0 + bne _021F3C24 + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F3C24: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021F3C5C + add r0, r5, #0 + add r1, sp, #0xc + bl sub_020715E4 + ldr r0, [r4, #0x18] + add r1, sp, #0 + lsl r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x20] + lsl r0, r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [r4, #0x24] + bl sub_020644A4 + str r0, [r4, #0x14] + cmp r0, #1 + bne _021F3C5C + ldr r0, [sp, #4] + add r1, sp, #0xc + str r0, [sp, #0x10] + add r0, r5, #0 + bl sub_020715D4 +_021F3C5C: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F3C6E + cmp r0, #1 + beq _021F3C92 + cmp r0, #2 + beq _021F3CA8 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_021F3C6E: + mov r1, #1 + ldr r0, [r4, #0x34] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x34] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #2 + blt _021F3CC8 + mov r0, #1 + add sp, #0x18 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} +_021F3C92: + mov r1, #2 + ldr r0, [r4, #0x34] + lsl r1, r1, #0xc + bl sub_02021380 + ldr r0, [r4, #0x34] + mov r1, #0 + bl sub_02021368 + mov r0, #2 + str r0, [r4, #0] +_021F3CA8: + add r0, r6, #0 + bl sub_02063020 + add r7, r0, #0 + add r0, r6, #0 + bl sub_02063040 + ldr r1, [r4, #0x18] + cmp r1, r7 + bne _021F3CC2 + ldr r1, [r4, #0x20] + cmp r1, r0 + beq _021F3CC8 +_021F3CC2: + add r0, r5, #0 + bl ov5_021DF74C +_021F3CC8: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F3C00 + + thumb_func_start ov5_021F3CCC +ov5_021F3CCC: ; 0x021F3CCC + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + ldr r1, [r4, #8] + ldr r2, [r4, #0xc] + bl sub_02062764 + cmp r0, #0 + bne _021F3CEC + add r0, r5, #0 + bl ov5_021DF74C + add sp, #0xc + pop {r4, r5, pc} +_021F3CEC: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x34] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F3CCC + + .rodata + + + .global Unk_ov5_0220064C +Unk_ov5_0220064C: ; 0x0220064C + .incbin "incbin/overlay5_rodata.bin", 0x7D38, 0x7D4C - 0x7D38 + + .global Unk_ov5_02200660 +Unk_ov5_02200660: ; 0x02200660 + .incbin "incbin/overlay5_rodata.bin", 0x7D4C, 0x18 + diff --git a/asm/ov5_021F3D00.s b/asm/ov5_021F3D00.s new file mode 100644 index 000000000..6322f9a89 --- /dev/null +++ b/asm/ov5_021F3D00.s @@ -0,0 +1,223 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F3D00 +ov5_021F3D00: ; 0x021F3D00 + push {r3, r4, r5, lr} + mov r1, #0x69 + mov r2, #0 + lsl r1, r1, #2 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F3D2C + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F3D00 + + thumb_func_start ov5_021F3D1C +ov5_021F3D1C: ; 0x021F3D1C + push {r4, lr} + add r4, r0, #0 + bl ov5_021F3D6C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F3D1C + + thumb_func_start ov5_021F3D2C +ov5_021F3D2C: ; 0x021F3D2C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r6, _021F3D68 ; =0x02200678 + str r0, [sp, #4] + mov r7, #0 + add r4, r0, #4 + add r5, #0x54 +_021F3D3C: + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + ldr r3, [r6, #0] + ldr r0, [r0, #0] + add r1, r4, #0 + mov r2, #0 + bl ov5_021DFB00 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02073B70 + add r7, r7, #1 + add r6, r6, #4 + add r4, #0x14 + add r5, #0x54 + cmp r7, #4 + blt _021F3D3C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F3D68: .word 0x02200678 + thumb_func_end ov5_021F3D2C + + thumb_func_start ov5_021F3D6C +ov5_021F3D6C: ; 0x021F3D6C + push {r3, r4, r5, lr} + mov r4, #0 + add r5, r0, #4 +_021F3D72: + add r0, r5, #0 + bl sub_0207395C + add r4, r4, #1 + add r5, #0x14 + cmp r4, #4 + blt _021F3D72 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3D6C + + thumb_func_start ov5_021F3D84 +ov5_021F3D84: ; 0x021F3D84 + mov r2, #0x54 + add r0, #0x54 + mul r2, r1 + add r0, r0, r2 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F3D84 + + thumb_func_start ov5_021F3D90 +ov5_021F3D90: ; 0x021F3D90 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021DF578 + add r6, r0, #0 + bl ov5_021DF574 + add r7, r0, #0 + add r0, r5, #0 + bl sub_02063020 + str r0, [sp, #8] + add r0, r5, #0 + bl sub_02063040 + add r1, r0, #0 + ldr r0, [sp, #8] + add r2, sp, #0x20 + bl sub_02064450 + add r0, r7, #0 + add r1, sp, #0x20 + bl sub_020644A4 + add r0, r6, #0 + mov r1, #0x1a + str r4, [sp, #0xc] + str r6, [sp, #0x10] + bl ov5_021DF55C + add r1, r4, #0 + str r0, [sp, #0x14] + str r5, [sp, #0x18] + bl ov5_021F3D84 + str r0, [sp, #0x1c] + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0xc + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F3DFC ; =0x02200688 + add r0, r6, #0 + add r2, sp, #0x20 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_021F3DFC: .word 0x02200688 + thumb_func_end ov5_021F3D90 + + thumb_func_start ov5_021F3E00 +ov5_021F3E00: ; 0x021F3E00 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_020715BC + add r3, r0, #0 + ldr r4, [r3, #0xc] + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x10 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r4, #0 + bl sub_02062910 + str r0, [r5, #8] + add r0, r4, #0 + bl sub_02062918 + str r0, [r5, #0xc] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F3E00 + + thumb_func_start ov5_021F3E30 +ov5_021F3E30: ; 0x021F3E30 + push {r4, lr} + add r2, r1, #0 + ldr r4, [r2, #0x1c] + ldr r1, [r2, #8] + ldr r2, [r2, #0xc] + add r0, r4, #0 + bl sub_02062764 + cmp r0, #1 + bne _021F3E4C + add r0, r4, #0 + mov r1, #0 + bl sub_0206A218 +_021F3E4C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3E30 + + thumb_func_start ov5_021F3E50 +ov5_021F3E50: ; 0x021F3E50 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F3E50 + + thumb_func_start ov5_021F3E54 +ov5_021F3E54: ; 0x021F3E54 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #4] + cmp r1, #1 + beq _021F3E6E + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x20] + add r1, sp, #0 + bl sub_02073BB4 +_021F3E6E: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3E54 + + .rodata + + + .global Unk_ov5_02200678 +Unk_ov5_02200678: ; 0x02200678 + .incbin "incbin/overlay5_rodata.bin", 0x7D64, 0x7D74 - 0x7D64 + + .global Unk_ov5_02200688 +Unk_ov5_02200688: ; 0x02200688 + .incbin "incbin/overlay5_rodata.bin", 0x7D74, 0x14 + diff --git a/asm/ov5_021F3E74.s b/asm/ov5_021F3E74.s new file mode 100644 index 000000000..7d5ea0558 --- /dev/null +++ b/asm/ov5_021F3E74.s @@ -0,0 +1,233 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F3E74 +ov5_021F3E74: ; 0x021F3E74 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F3EA0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3E74 + + thumb_func_start ov5_021F3E90 +ov5_021F3E90: ; 0x021F3E90 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F3EE8 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F3E90 + + thumb_func_start ov5_021F3EA0 +ov5_021F3EA0: ; 0x021F3EA0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #0x6b + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #9 + mov r2, #0xb4 + bl ov5_021DFA14 + ldr r0, [r4, #0] + mov r1, #0xa + mov r2, #0xc + mov r3, #1 + bl ov5_021DFA3C + mov r0, #0xa + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F3EE4 ; =0x022006B0 + mov r2, #9 + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #0xb + add r3, r2, #0 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + nop +_021F3EE4: .word 0x022006B0 + thumb_func_end ov5_021F3EA0 + + thumb_func_start ov5_021F3EE8 +ov5_021F3EE8: ; 0x021F3EE8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #9 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #9 + bl ov5_021DFA30 + ldr r0, [r4, #0] + mov r1, #0xa + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #0xb + bl ov5_021DF9D4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3EE8 + + thumb_func_start ov5_021F3F10 +ov5_021F3F10: ; 0x021F3F10 + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062C00 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0x1b + str r4, [sp, #0x18] + bl ov5_021DF55C + str r0, [sp, #0x1c] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x20] + bl sub_02063050 + add r0, r5, #0 + bl sub_02063020 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02063040 + add r1, r0, #0 + add r0, r6, #0 + add r2, sp, #8 + bl sub_02064450 + add r0, r5, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F3F70 ; =0x0220069C + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021F3F70: .word 0x0220069C + thumb_func_end ov5_021F3F10 + + thumb_func_start ov5_021F3F74 +ov5_021F3F74: ; 0x021F3F74 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x1c] + bl sub_02062910 + str r0, [r4, #4] + ldr r0, [r4, #0x1c] + bl sub_02062918 + str r0, [r4, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x14] + mov r1, #0xb + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x20] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov5_021F3F74 + + thumb_func_start ov5_021F3FB8 +ov5_021F3FB8: ; 0x021F3FB8 + ldr r3, _021F3FC0 ; =sub_020211FC + ldr r0, [r1, #0x20] + bx r3 + nop +_021F3FC0: .word sub_020211FC + thumb_func_end ov5_021F3FB8 + + thumb_func_start ov5_021F3FC4 +ov5_021F3FC4: ; 0x021F3FC4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _021F3FF2 + mov r1, #1 + ldr r0, [r4, #0x20] + lsl r1, r1, #0xc + bl sub_02021368 + ldr r0, [r4, #0x20] + bl sub_020213D4 + asr r1, r0, #0xb + lsr r1, r1, #0x14 + add r1, r0, r1 + asr r0, r1, #0xc + cmp r0, #7 + blt _021F3FF2 + add r0, r5, #0 + bl ov5_021DF74C +_021F3FF2: + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F3FC4 + + thumb_func_start ov5_021F3FF4 +ov5_021F3FF4: ; 0x021F3FF4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [r4, #0x20] + add r1, sp, #0 + bl sub_020212A8 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F3FF4 + + .rodata + + + .global Unk_ov5_0220069C +Unk_ov5_0220069C: ; 0x0220069C + .incbin "incbin/overlay5_rodata.bin", 0x7D88, 0x7D9C - 0x7D88 + + .global Unk_ov5_022006B0 +Unk_ov5_022006B0: ; 0x022006B0 + .incbin "incbin/overlay5_rodata.bin", 0x7D9C, 0x18 + diff --git a/asm/ov5_021F4018.s b/asm/ov5_021F4018.s new file mode 100644 index 000000000..ddb810a92 --- /dev/null +++ b/asm/ov5_021F4018.s @@ -0,0 +1,346 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F4018 +ov5_021F4018: ; 0x021F4018 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x80 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F4044 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4018 + + thumb_func_start ov5_021F4034 +ov5_021F4034: ; 0x021F4034 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F407C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F4034 + + thumb_func_start ov5_021F4044 +ov5_021F4044: ; 0x021F4044 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x6f + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x18 + mov r3, #0xa6 + bl ov5_021DFB24 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r4, #0x3c + add r1, r4, #0 + mov r3, #0xa7 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F4044 + + thumb_func_start ov5_021F407C +ov5_021F407C: ; 0x021F407C + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl sub_0207395C + add r0, r4, #0 + add r0, #0x18 + bl sub_02073AA8 + add r4, #0x3c + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F407C + + thumb_func_start ov5_021F4098 +ov5_021F4098: ; 0x021F4098 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r1, sp, #0x1c + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + ldr r0, [sp, #8] + mov r1, #0x1e + ldr r0, [r0, #0x40] + str r0, [sp, #0x10] + bl ov5_021DF4E4 + cmp r0, #0 + bne _021F40C2 + ldr r0, [sp, #0x10] + mov r1, #0x1e + bl ov5_021DF4A8 +_021F40C2: + ldr r0, [sp, #0x10] + mov r1, #0x1e + bl ov5_021DF55C + add r7, r0, #0 + ldr r0, [sp, #0x10] + str r7, [sp, #0x18] + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + cmp r0, #1 + beq _021F411A + add r4, r7, #0 + add r4, #0x60 + mov r6, #1 + mov r5, #0x10 +_021F40E0: + mov r0, #2 + lsl r1, r5, #0xc + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x1c] + mov r0, #0x4e + lsl r0, r0, #0xe + str r0, [sp, #0x24] + ldr r0, [sp, #8] + add r1, sp, #0x1c + mov r2, #0 + bl sub_020644D0 + str r0, [sp, #0x20] + add r0, sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + ldr r1, _021F4168 ; =0x022006C8 + add r2, sp, #0x1c + mov r3, #0 + bl ov5_021DF72C + add r6, r6, #1 + add r5, #0x10 + stmia r4!, {r0} + cmp r6, #5 + blt _021F40E0 +_021F411A: + ldr r0, [sp, #0xc] + cmp r0, #0 + beq _021F4162 + mov r5, #0x12 + add r7, #0x70 + lsl r4, r5, #4 + add r6, sp, #0x1c +_021F4128: + mov r0, #2 + lsl r1, r4, #0xc + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x1c] + mov r0, #0x4e + lsl r0, r0, #0xe + str r0, [sp, #0x24] + ldr r0, [sp, #8] + add r1, r6, #0 + mov r2, #0 + bl sub_020644D0 + str r0, [sp, #0x20] + add r0, sp, #0x14 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + ldr r1, _021F4168 ; =0x022006C8 + add r2, r6, #0 + mov r3, #0 + bl ov5_021DF72C + add r5, r5, #1 + add r4, #0x10 + stmia r7!, {r0} + cmp r5, #0x16 + blt _021F4128 +_021F4162: + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F4168: .word 0x022006C8 + thumb_func_end ov5_021F4098 + + thumb_func_start ov5_021F416C +ov5_021F416C: ; 0x021F416C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r0, [r0, #0x40] + add r4, r1, #0 + mov r1, #0x1e + str r0, [sp, #4] + bl ov5_021DF4E4 + cmp r0, #1 + beq _021F4184 + bl sub_02022974 +_021F4184: + ldr r0, [sp, #4] + mov r1, #0x1e + bl ov5_021DF55C + cmp r4, #0 + bne _021F4196 + add r5, r0, #0 + add r5, #0x60 + b _021F419A +_021F4196: + add r5, r0, #0 + add r5, #0x70 +_021F419A: + mov r7, #4 + mov r6, #0 + cmp r7, #0 + ble _021F41EC + ble _021F41EC +_021F41A4: + ldr r0, [r5, #0] + bl sub_02071598 + add r4, r0, #0 + mov r0, #1 + str r0, [r4, #0] + add r0, r4, #4 + bl sub_02073A90 + add r0, r4, #4 + bl sub_02073974 + add r0, r4, #0 + add r0, #0x80 + ldr r3, [r0, #0] + mov r0, #0 + str r0, [sp] + add r2, r3, #4 + ldr r0, [sp, #4] + add r1, r4, #4 + add r3, #0x3c + bl ov5_021DFB40 + add r1, r4, #0 + add r1, #0x80 + ldr r1, [r1, #0] + add r0, r4, #0 + add r0, #0x28 + add r1, r1, #4 + add r2, r4, #4 + bl sub_02073B90 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r7 + blt _021F41A4 +_021F41EC: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F416C + + thumb_func_start ov5_021F41F0 +ov5_021F41F0: ; 0x021F41F0 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl sub_020715BC + ldr r2, [r0, #0] + ldr r1, [r0, #4] + add r0, r4, #0 + str r2, [r4, #0x7c] + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r3, [r0, #0] + mov r0, #0 + str r0, [sp] + add r2, r3, #4 + ldr r0, [r4, #0x7c] + add r1, r4, #4 + add r3, #0x18 + bl ov5_021DFB40 + add r1, r4, #0 + add r1, #0x80 + ldr r1, [r1, #0] + add r0, r4, #0 + add r0, #0x28 + add r1, r1, #4 + add r2, r4, #4 + bl sub_02073B90 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F41F0 + + thumb_func_start ov5_021F4234 +ov5_021F4234: ; 0x021F4234 + ldr r3, _021F423C ; =sub_02073AA8 + add r0, r1, #4 + bx r3 + nop +_021F423C: .word sub_02073AA8 + thumb_func_end ov5_021F4234 + + thumb_func_start ov5_021F4240 +ov5_021F4240: ; 0x021F4240 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r2, #1 + cmp r0, #1 + bne _021F4262 + add r0, r4, #4 + bl sub_02073B40 + cmp r0, #1 + bne _021F4260 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, pc} +_021F4260: + mov r2, #0 +_021F4262: + mov r1, #1 + add r0, r4, #4 + lsl r1, r1, #0xc + bl sub_02073AC0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4240 + + thumb_func_start ov5_021F4270 +ov5_021F4270: ; 0x021F4270 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x28 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4270 + + .rodata + + + .global Unk_ov5_022006C8 +Unk_ov5_022006C8: ; 0x022006C8 + .incbin "incbin/overlay5_rodata.bin", 0x7DB4, 0x14 + diff --git a/asm/ov5_021F428C.s b/asm/ov5_021F428C.s new file mode 100644 index 000000000..baf5180c8 --- /dev/null +++ b/asm/ov5_021F428C.s @@ -0,0 +1,746 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F428C +ov5_021F428C: ; 0x021F428C + push {r3, r4, r5, lr} + mov r1, #2 + mov r2, #0 + lsl r1, r1, #8 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #8] + bl ov5_021F431C + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F428C + + thumb_func_start ov5_021F42A8 +ov5_021F42A8: ; 0x021F42A8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021F42BA + bl sub_020181C4 +_021F42BA: + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021F42C8 + bl sub_020181C4 +_021F42C8: + add r0, r4, #0 + bl ov5_021F4370 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F42A8 + + thumb_func_start ov5_021F42D8 +ov5_021F42D8: ; 0x021F42D8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #0x1f + add r7, r0, #0 + add r4, r2, #0 + bl ov5_021DF55C + add r6, r0, #0 + str r4, [r6, #4] + str r5, [r6, #0] + cmp r5, #0 + beq _021F4302 + mov r2, #0 + add r0, r7, #0 + lsl r1, r5, #2 + add r3, r2, #0 + bl ov5_021DF53C + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r6, r1] +_021F4302: + cmp r4, #0 + beq _021F4318 + mov r2, #0 + add r0, r7, #0 + lsl r1, r4, #2 + add r3, r2, #0 + bl ov5_021DF53C + mov r1, #0x7f + lsl r1, r1, #2 + str r0, [r6, r1] +_021F4318: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F42D8 + + thumb_func_start ov5_021F431C +ov5_021F431C: ; 0x021F431C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r7, #0 + ldr r4, _021F4368 ; =0x022006DC + mov r6, #0 + add r5, #0xc +_021F4328: + mov r0, #0 + str r0, [sp] + ldr r0, [r7, #8] + ldr r3, [r4, #0] + add r1, r5, #0 + mov r2, #0 + bl ov5_021DFB00 + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x14 + cmp r6, #3 + blt _021F4328 + add r5, r7, #0 + ldr r4, _021F436C ; =0x02200720 + mov r6, #0 + add r5, #0x48 +_021F434A: + mov r0, #0 + str r0, [sp] + ldr r0, [r7, #8] + ldr r3, [r4, #0] + add r1, r5, #0 + mov r2, #0 + bl ov5_021DFB24 + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x24 + cmp r6, #0xc + blt _021F434A + pop {r3, r4, r5, r6, r7, pc} + nop +_021F4368: .word 0x022006DC +_021F436C: .word 0x02200720 + thumb_func_end ov5_021F431C + + thumb_func_start ov5_021F4370 +ov5_021F4370: ; 0x021F4370 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r5, #0 + mov r6, #0 + add r4, #0xc +_021F437A: + add r0, r4, #0 + bl sub_0207395C + add r6, r6, #1 + add r4, #0x14 + cmp r6, #3 + blt _021F437A + mov r4, #0 + add r5, #0x48 +_021F438C: + add r0, r5, #0 + bl sub_02073AA8 + add r4, r4, #1 + add r5, #0x24 + cmp r4, #0xc + blt _021F438C + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F4370 + + thumb_func_start ov5_021F439C +ov5_021F439C: ; 0x021F439C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r0, #0x40] + mov r1, #0x1f + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r5, [sp, #0x2c] + bl ov5_021DF55C + add r6, r0, #0 + ldr r0, [sp, #0x28] + cmp r0, #0 + bne _021F43C0 + ldr r4, [r6, #0] + mov r0, #0x7e + b _021F43C4 +_021F43C0: + ldr r4, [r6, #4] + mov r0, #0x7f +_021F43C4: + lsl r0, r0, #2 + ldr r7, [r6, r0] + cmp r4, #0 + bne _021F43D0 + bl sub_02022974 +_021F43D0: + ldr r0, [sp, #4] + mov r1, #0 + strh r0, [r5, #2] + ldr r0, [sp, #8] + cmp r4, #0 + strh r0, [r5, #4] + ldr r0, [sp, #0xc] + str r0, [r5, #8] + ldr r0, [sp] + str r0, [r5, #0x10] + str r6, [r5, #0xc] + ble _021F4400 + add r2, r7, #0 +_021F43EA: + ldr r0, [r2, #0] + cmp r0, #0 + bne _021F43F8 + lsl r0, r1, #2 + add sp, #0x10 + add r0, r7, r0 + pop {r3, r4, r5, r6, r7, pc} +_021F43F8: + add r1, r1, #1 + add r2, r2, #4 + cmp r1, r4 + blt _021F43EA +_021F4400: + bl sub_02022974 + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F439C + + thumb_func_start ov5_021F440C +ov5_021F440C: ; 0x021F440C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r2, r0, #0 + add r6, r2, #0 + add r3, r4, #0 + ldmia r6!, {r0, r1} + add r3, #0x84 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #2 + str r0, [r3, #0] + ldrsh r0, [r2, r1] + mov r3, #4 + strh r0, [r4, #2] + ldrsh r0, [r2, r3] + strh r0, [r4, #4] + mov r0, #1 + ldrsb r2, [r2, r0] + lsl r0, r0, #0xc + strb r2, [r4, #1] + str r0, [r4, #8] + ldrsh r0, [r4, r1] + ldrsh r1, [r4, r3] + add r2, sp, #0 + bl sub_02064450 + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, sp, #0 + bl sub_020644A4 + add r4, #0x8c + mov r0, #6 + ldr r1, [r4, #0] + lsl r0, r0, #0xc + add r0, r1, r0 + ldr r2, [sp, #4] + add r1, sp, #0 + add r0, r2, r0 + str r0, [sp, #4] + add r0, r5, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021F440C + + thumb_func_start ov5_021F4474 +ov5_021F4474: ; 0x021F4474 + push {r4, r5, lr} + sub sp, #0x1c + ldr r5, [r0, #0x40] + mov r4, #0 + str r4, [sp] + add r4, sp, #8 + str r4, [sp, #4] + bl ov5_021F439C + add r4, r0, #0 + add r0, sp, #8 + mov r2, #0 + str r0, [sp] + ldr r1, _021F44A0 ; =0x0220070C + add r0, r5, #0 + add r3, r2, #0 + str r2, [sp, #4] + bl ov5_021DF72C + str r0, [r4, #0] + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 +_021F44A0: .word 0x0220070C + thumb_func_end ov5_021F4474 + + thumb_func_start ov5_021F44A4 +ov5_021F44A4: ; 0x021F44A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + bl sub_02071598 + add r7, r0, #0 + ldr r0, [r7, #0x6c] + str r0, [sp, #4] + ldr r0, [r7, #0x74] + cmp r0, #0 + beq _021F44BC + bl sub_02022974 +_021F44BC: + mov r2, #1 + ldr r0, [sp, #4] + str r2, [r7, #0] + ldr r0, [r0, #8] + mov r1, #0x94 + mov r3, #0 + bl ov5_021DF53C + str r0, [r7, #0x74] + ldr r1, [r7, #0x6c] + add r0, r7, #0 + add r0, #0xc + add r1, #0xc + bl sub_02073B70 + mov r0, #0 + str r0, [sp, #8] + add r5, r0, #0 + ldr r0, [sp, #4] + ldr r4, _021F4538 ; =0x022006E8 + str r0, [sp, #0xc] + add r0, #0xc + str r0, [sp, #0xc] + ldr r0, [sp, #4] + str r0, [sp, #0x10] + add r0, #0x48 + str r0, [sp, #0x10] + add r0, r7, #0 + str r0, [sp, #0x14] + add r0, #0xc + str r0, [sp, #0x14] +_021F44FA: + mov r0, #0 + str r0, [sp] + ldr r3, [r4, #0] + ldr r0, [sp, #4] + ldr r1, [r7, #0x74] + mov r6, #0x24 + mul r6, r3 + ldr r3, [sp, #0x10] + add r1, r1, #4 + ldr r0, [r0, #8] + ldr r2, [sp, #0xc] + add r1, r1, r5 + add r3, r3, r6 + bl ov5_021DFB40 + ldr r1, [r7, #0x74] + ldr r0, [sp, #0x14] + add r1, r1, #4 + add r1, r1, r5 + bl sub_02073B84 + ldr r0, [sp, #8] + add r4, r4, #4 + add r0, r0, #1 + add r5, #0x24 + str r0, [sp, #8] + cmp r0, #4 + blt _021F44FA + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F4538: .word 0x022006E8 + thumb_func_end ov5_021F44A4 + + thumb_func_start ov5_021F453C +ov5_021F453C: ; 0x021F453C + push {r4, lr} + bl sub_02071598 + add r4, r0, #0 + ldr r0, [r4, #0x74] + cmp r0, #0 + bne _021F454E + bl sub_02022974 +_021F454E: + ldr r0, [r4, #0x74] + ldr r0, [r0, #0] + cmp r0, #0xf + bne _021F455A + mov r0, #1 + pop {r4, pc} +_021F455A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F453C + + thumb_func_start ov5_021F4560 +ov5_021F4560: ; 0x021F4560 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r2, r0, #0 + add r6, r2, #0 + add r3, r4, #0 + ldmia r6!, {r0, r1} + add r3, #0x60 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #4 + str r0, [r3, #0] + mov r0, #2 + ldrsh r0, [r2, r0] + strh r0, [r4, #4] + ldrsh r0, [r2, r1] + strh r0, [r4, #6] + mov r0, #1 + ldrsb r0, [r2, r0] + add r2, sp, #0 + strh r0, [r4, #8] + ldrsh r0, [r4, r1] + mov r1, #6 + ldrsh r1, [r4, r1] + bl sub_02064450 + ldr r0, [r4, #0x70] + add r1, sp, #0 + bl sub_020644A4 + mov r0, #6 + ldr r1, [r4, #0x68] + lsl r0, r0, #0xc + add r0, r1, r0 + ldr r2, [sp, #4] + add r1, sp, #0 + add r0, r2, r0 + str r0, [sp, #4] + add r0, r5, #0 + bl sub_020715D4 + ldr r1, [r4, #0x6c] + add r0, r4, #0 + add r0, #0xc + add r1, #0x20 + bl sub_02073B70 + mov r0, #1 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4560 + + thumb_func_start ov5_021F45D0 +ov5_021F45D0: ; 0x021F45D0 + push {r4, r5, r6, lr} + add r6, r1, #0 + ldr r0, [r6, #0x74] + cmp r0, #0 + beq _021F45F6 + mov r4, #0 + add r5, r4, #0 +_021F45DE: + ldr r0, [r6, #0x74] + add r0, r0, #4 + add r0, r0, r5 + bl sub_02073AA8 + add r4, r4, #1 + add r5, #0x24 + cmp r4, #4 + blt _021F45DE + ldr r0, [r6, #0x74] + bl sub_020181C4 +_021F45F6: + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F45D0 + + thumb_func_start ov5_021F45F8 +ov5_021F45F8: ; 0x021F45F8 + push {r3, r4, r5, r6, r7, lr} + ldr r0, [r1, #0] + str r1, [sp] + cmp r0, #0 + beq _021F464A + cmp r0, #1 + bne _021F464A + add r0, r1, #0 + ldr r0, [r0, #0x74] + cmp r0, #0 + bne _021F4612 + bl sub_02022974 +_021F4612: + ldr r0, [sp] + mov r4, #0 + ldr r6, [r0, #0x74] + mov r7, #1 + add r5, r6, #4 +_021F461C: + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 + cmp r0, #0 + beq _021F4636 + add r0, r7, #0 + ldr r1, [r6, #0] + lsl r0, r4 + orr r0, r1 + str r0, [r6, #0] +_021F4636: + add r4, r4, #1 + add r5, #0x24 + cmp r4, #4 + blt _021F461C + ldr r0, [r6, #0] + cmp r0, #0xf + bne _021F464A + ldr r0, [sp] + mov r1, #0 + str r1, [r0, #0] +_021F464A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F45F8 + + thumb_func_start ov5_021F464C +ov5_021F464C: ; 0x021F464C + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0xc + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F464C + + thumb_func_start ov5_021F4668 +ov5_021F4668: ; 0x021F4668 + push {r4, r5, lr} + sub sp, #0x1c + ldr r5, [r0, #0x40] + mov r4, #1 + str r4, [sp] + add r4, sp, #8 + str r4, [sp, #4] + bl ov5_021F439C + add r4, r0, #0 + add r0, sp, #8 + mov r2, #0 + str r0, [sp] + ldr r1, _021F4694 ; =0x022006F8 + add r0, r5, #0 + add r3, r2, #0 + str r2, [sp, #4] + bl ov5_021DF72C + str r0, [r4, #0] + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 +_021F4694: .word 0x022006F8 + thumb_func_end ov5_021F4668 + + thumb_func_start ov5_021F4698 +ov5_021F4698: ; 0x021F4698 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r2, #0 + bl sub_02071598 + add r4, r0, #0 + add r0, #0x90 + ldr r7, [r0, #0] + ldrb r0, [r4] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021F46BA + add r0, r4, #0 + add r0, #0xc + bl sub_02073A90 +_021F46BA: + ldrb r1, [r4] + mov r0, #0x40 + orr r0, r1 + strb r0, [r4] + ldrb r1, [r4] + mov r0, #0x80 + bic r1, r0 + strb r1, [r4] + ldrb r1, [r4] + mov r0, #0x3f + bic r1, r0 + mov r0, #1 + orr r0, r1 + strb r0, [r4] + add r0, r5, #0 + bl sub_0206447C + add r5, r0, #0 + cmp r6, #1 + bne _021F46E4 + add r5, r5, #4 +_021F46E4: + mov r0, #0 + add r3, r7, #0 + mov r6, #0x24 + str r0, [sp] + add r1, r4, #0 + add r2, r7, #0 + ldr r0, [r7, #8] + add r3, #0x48 + mul r6, r5 + add r1, #0xc + add r2, #0x34 + add r3, r3, r6 + bl ov5_021DFB40 + add r0, r4, #0 + add r7, #0x34 + add r4, #0xc + add r0, #0x30 + add r1, r7, #0 + add r2, r4, #0 + bl sub_02073B90 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4698 + + thumb_func_start ov5_021F4714 +ov5_021F4714: ; 0x021F4714 + push {r4, lr} + add r4, r1, #0 + bl sub_02071598 + str r4, [r0, #8] + pop {r4, pc} + thumb_func_end ov5_021F4714 + + thumb_func_start ov5_021F4720 +ov5_021F4720: ; 0x021F4720 + push {r3, lr} + bl sub_02071598 + ldrb r0, [r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1f + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4720 + + thumb_func_start ov5_021F4730 +ov5_021F4730: ; 0x021F4730 + push {r4, lr} + add r4, r1, #0 + bl ov5_021F440C + add r0, r4, #0 + add r4, #0x90 + ldr r1, [r4, #0] + add r0, #0x30 + add r1, #0x34 + bl sub_02073B70 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4730 + + thumb_func_start ov5_021F474C +ov5_021F474C: ; 0x021F474C + push {r3, lr} + ldrb r0, [r1] + lsl r0, r0, #0x19 + lsr r0, r0, #0x1f + beq _021F475E + add r1, #0xc + add r0, r1, #0 + bl sub_02073AA8 +_021F475E: + pop {r3, pc} + thumb_func_end ov5_021F474C + + thumb_func_start ov5_021F4760 +ov5_021F4760: ; 0x021F4760 + push {r4, lr} + add r4, r1, #0 + ldrb r0, [r4] + lsl r0, r0, #0x1a + lsr r0, r0, #0x1a + beq _021F4790 + cmp r0, #1 + bne _021F4790 + add r0, r4, #0 + ldr r1, [r4, #8] + add r0, #0xc + mov r2, #0 + bl sub_02073AC0 + cmp r0, #0 + beq _021F4790 + ldrb r1, [r4] + mov r0, #0x3f + bic r1, r0 + strb r1, [r4] + ldrb r1, [r4] + mov r0, #0x80 + orr r0, r1 + strb r0, [r4] +_021F4790: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4760 + + thumb_func_start ov5_021F4794 +ov5_021F4794: ; 0x021F4794 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x30 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4794 + + .rodata + + + .global Unk_ov5_022006DC +Unk_ov5_022006DC: ; 0x022006DC + .incbin "incbin/overlay5_rodata.bin", 0x7DC8, 0x7DD4 - 0x7DC8 + + .global Unk_ov5_022006E8 +Unk_ov5_022006E8: ; 0x022006E8 + .incbin "incbin/overlay5_rodata.bin", 0x7DD4, 0x7DE4 - 0x7DD4 + + .global Unk_ov5_022006F8 +Unk_ov5_022006F8: ; 0x022006F8 + .incbin "incbin/overlay5_rodata.bin", 0x7DE4, 0x7DF8 - 0x7DE4 + + .global Unk_ov5_0220070C +Unk_ov5_0220070C: ; 0x0220070C + .incbin "incbin/overlay5_rodata.bin", 0x7DF8, 0x7E0C - 0x7DF8 + + .global Unk_ov5_02200720 +Unk_ov5_02200720: ; 0x02200720 + .incbin "incbin/overlay5_rodata.bin", 0x7E0C, 0x30 + diff --git a/asm/ov5_021F47B0.s b/asm/ov5_021F47B0.s new file mode 100644 index 000000000..85698c45f --- /dev/null +++ b/asm/ov5_021F47B0.s @@ -0,0 +1,833 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F47B0 +ov5_021F47B0: ; 0x021F47B0 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0xdc + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F47DC + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F47B0 + + thumb_func_start ov5_021F47CC +ov5_021F47CC: ; 0x021F47CC + push {r4, lr} + add r4, r0, #0 + bl ov5_021F4820 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F47CC + + thumb_func_start ov5_021F47DC +ov5_021F47DC: ; 0x021F47DC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r4, _021F481C ; =0x0220079C + mov r6, #0 + add r5, r7, #4 +_021F47E6: + mov r0, #0 + str r0, [sp] + ldr r0, [r7, #0] + ldr r3, [r4, #0] + add r1, r5, #0 + mov r2, #0 + bl ov5_021DFB00 + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x14 + cmp r6, #9 + blt _021F47E6 + ldr r0, [r7, #0x10] + mov r1, #0 + bl sub_020B37A4 + mov r2, #0 + str r2, [sp] + ldr r0, [r7, #0] + add r7, #0xb8 + add r1, r7, #0 + mov r3, #0xc7 + bl ov5_021DFB24 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F481C: .word 0x0220079C + thumb_func_end ov5_021F47DC + + thumb_func_start ov5_021F4820 +ov5_021F4820: ; 0x021F4820 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #4 +_021F4828: + add r0, r5, #0 + bl sub_0207395C + add r4, r4, #1 + add r5, #0x14 + cmp r4, #9 + blt _021F4828 + add r6, #0xb8 + add r0, r6, #0 + bl sub_02073AA8 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F4820 + + thumb_func_start ov5_021F4840 +ov5_021F4840: ; 0x021F4840 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + mov r1, #0x20 + str r2, [sp, #8] + str r5, [sp, #0xc] + bl ov5_021DF55C + str r0, [sp, #0x10] + add r0, r4, #0 + add r1, r6, #0 + str r4, [sp, #0x14] + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + mov r2, #0 + str r0, [sp, #4] + ldr r1, _021F4878 ; =0x02200754 + add r0, r5, #0 + add r3, r2, #0 + bl ov5_021DF72C + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_021F4878: .word 0x02200754 + thumb_func_end ov5_021F4840 + + thumb_func_start ov5_021F487C +ov5_021F487C: ; 0x021F487C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r6, r0, #0 + bl sub_020715BC + add r4, r0, #0 + add r2, r5, #0 + add r3, r4, #0 + add r2, #0x24 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0xc] + bl sub_0206298C + strb r0, [r5] + ldr r0, [r4, #4] + mov r1, #0x24 + mov r2, #0 + bl ov5_021DF528 + add r1, r5, #0 + add r1, #0x88 + str r0, [r1, #0] + ldr r1, [r5, #0x2c] + add r0, r5, #0 + add r0, #0x34 + add r1, r1, #4 + bl sub_02073B70 + ldr r3, [r5, #0x2c] + mov r0, #0 + add r1, r5, #0 + str r0, [sp] + add r1, #0x88 + add r2, r3, #4 + ldr r0, [r5, #0x28] + ldr r1, [r1, #0] + add r3, #0xb8 + bl ov5_021DFB40 + add r1, r5, #0 + add r1, #0x88 + add r0, r5, #0 + ldr r1, [r1, #0] + add r0, #0x34 + bl sub_02073B84 + add r0, r6, #0 + add r1, r5, #0 + bl ov5_021F4A24 + mov r0, #1 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F487C + + thumb_func_start ov5_021F48F0 +ov5_021F48F0: ; 0x021F48F0 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_02073A90 + add r4, #0x88 + ldr r0, [r4, #0] + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov5_021F48F0 + + thumb_func_start ov5_021F4908 +ov5_021F4908: ; 0x021F4908 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r4, r1, #0 + ldr r6, [r4, #0x30] + add r5, r0, #0 + add r0, r6, #0 + bl sub_0206298C + add r7, r0, #0 + add r0, r6, #0 + add r1, sp, #8 + bl sub_02063050 + ldr r1, [r4, #0x24] + add r0, r6, #0 + add r2, sp, #0x14 + bl ov5_021F4AB4 + strb r7, [r4] + strb r0, [r4, #1] + mov r0, #1 + ldrsb r0, [r4, r0] + ldr r1, [r4, #0x24] + cmp r0, r1 + bne _021F4944 + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F4A24 + b _021F4962 +_021F4944: + add r0, r4, #4 + str r0, [sp] + add r0, r4, #0 + add r0, #0x10 + str r0, [sp, #4] + mov r0, #0 + ldrsb r0, [r4, r0] + add r2, sp, #0x14 + add r3, sp, #8 + bl ov5_021F4B6C + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F49D0 +_021F4962: + add r4, #0x88 + mov r1, #1 + ldr r0, [r4, #0] + lsl r1, r1, #0xc + mov r2, #1 + bl sub_02073AC0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F4908 + + thumb_func_start ov5_021F4974 +ov5_021F4974: ; 0x021F4974 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r1, #0 + ldrb r1, [r4, #2] + cmp r1, #0 + bne _021F49CC + add r1, sp, #8 + bl sub_020715E4 + mov r0, #1 + ldr r1, [sp, #0xc] + lsl r0, r0, #0x10 + add r0, r1, r0 + str r0, [sp, #0xc] + ldrh r2, [r4, #0x1c] + add r1, sp, #0 + add r0, sp, #0 + strh r2, [r1] + ldrh r2, [r4, #0x1e] + strh r2, [r1, #2] + ldrh r2, [r4, #0x20] + strh r2, [r1, #4] + ldrh r2, [r4, #0x22] + strh r2, [r1, #6] + mov r1, #0 + bl ov5_021F4A80 + add r0, sp, #0 + add r0, #2 + mov r1, #0 + bl ov5_021F4A80 + add r0, sp, #4 + mov r1, #0 + bl ov5_021F4A80 + add r0, r4, #0 + add r4, #0x10 + add r0, #0x34 + add r1, sp, #8 + add r2, r4, #0 + add r3, sp, #0 + bl sub_02073BC8 +_021F49CC: + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov5_021F4974 + + thumb_func_start ov5_021F49D0 +ov5_021F49D0: ; 0x021F49D0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0 + ldrsb r0, [r4, r0] + lsl r2, r0, #3 + ldr r0, _021F4A20 ; =0x0220077C + add r1, r0, r2 + ldrh r0, [r0, r2] + strh r0, [r4, #0x1c] + ldrh r0, [r1, #2] + strh r0, [r4, #0x1e] + ldrh r0, [r1, #4] + strh r0, [r4, #0x20] + ldrh r0, [r1, #6] + add r1, sp, #0 + strh r0, [r4, #0x22] + ldr r0, [r4, #0x30] + bl sub_02063050 + ldr r1, [sp] + ldr r0, [r4, #4] + add r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [r4, #0xc] + add r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r4, r5, pc} + nop +_021F4A20: .word 0x0220077C + thumb_func_end ov5_021F49D0 + + thumb_func_start ov5_021F4A24 +ov5_021F4A24: ; 0x021F4A24 + push {r3, r4, r5, r6, r7, lr} + add r3, r0, #0 + add r2, r1, #0 + mov r0, #0 + ldrsb r1, [r2, r0] + mov r0, #0x48 + mov r7, #1 + add r6, r1, #0 + mul r6, r0 + ldrsb r0, [r2, r7] + ldr r5, _021F4A78 ; =0x022007C0 + mov r4, #0xc + add r1, r0, #0 + add r0, r5, r6 + mul r1, r4 + add r6, r1, r0 + add r5, r2, #0 + ldmia r6!, {r0, r1} + add r5, #0x10 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r5, #0] + mov r0, #0 + ldrsb r5, [r2, r0] + mov r0, #0x48 + add r1, r5, #0 + ldrsb r5, [r2, r7] + mul r1, r0 + ldr r0, _021F4A7C ; =0x022008E0 + mul r4, r5 + add r0, r0, r1 + add r5, r4, r0 + ldmia r5!, {r0, r1} + add r4, r2, #4 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + add r1, r2, #0 + str r0, [r4, #0] + add r0, r3, #0 + bl ov5_021F49D0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F4A78: .word 0x022007C0 +_021F4A7C: .word 0x022008E0 + thumb_func_end ov5_021F4A24 + + thumb_func_start ov5_021F4A80 +ov5_021F4A80: ; 0x021F4A80 + push {r4, lr} + add r4, r0, #0 + ldrh r0, [r4] + add r0, r0, r1 + strh r0, [r4] + ldrh r0, [r4] + lsl r1, r0, #0x10 + asr r1, r1, #0x10 + bpl _021F4AA6 + mov r0, #0x5a + lsl r0, r0, #2 + mov r1, #0 +_021F4A98: + ldrh r2, [r4] + add r2, r2, r0 + strh r2, [r4] + ldrsh r2, [r4, r1] + cmp r2, #0 + blt _021F4A98 + pop {r4, pc} +_021F4AA6: + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + strh r1, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4A80 + + thumb_func_start ov5_021F4AB4 +ov5_021F4AB4: ; 0x021F4AB4 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + str r0, [sp, #8] + str r1, [sp, #0xc] + str r2, [sp, #0x10] + add r0, r1, #0 + bne _021F4AC6 + bl sub_02022974 +_021F4AC6: + ldr r0, [sp, #8] + bl sub_02063020 + add r5, r0, #0 + ldr r0, [sp, #8] + bl sub_02063030 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + bl sub_02063040 + add r6, r0, #0 + ldr r0, [sp, #8] + bl sub_0206298C + add r4, r0, #0 + ldr r0, [sp, #8] + add r1, sp, #0x18 + bl sub_02063050 + ldr r0, [sp, #0xc] + mov r7, #0 + cmp r0, #0 + ble _021F4B5C +_021F4AF6: + add r0, r4, #0 + bl sub_0206419C + add r5, r5, r0 + add r0, r4, #0 + bl sub_020641A8 + add r6, r6, r0 + str r6, [sp] + ldr r0, [sp, #8] + ldr r3, [sp, #0x14] + add r1, sp, #0x18 + add r2, r5, #0 + str r4, [sp, #4] + bl sub_02063E18 + cmp r0, #0 + beq _021F4B54 + cmp r0, #1 + beq _021F4B54 + cmp r0, #4 + bne _021F4B44 + ldr r0, [sp, #8] + bl sub_02062A40 + add r1, r5, #0 + add r2, r6, #0 + mov r3, #1 + bl sub_0206326C + add r4, r0, #0 + bne _021F4B3A + bl sub_02022974 +_021F4B3A: + ldr r1, [sp, #0x10] + add r0, r4, #0 + bl sub_02063050 + b _021F4B4E +_021F4B44: + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + bl sub_02064450 +_021F4B4E: + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_021F4B54: + ldr r0, [sp, #0xc] + add r7, r7, #1 + cmp r7, r0 + blt _021F4AF6 +_021F4B5C: + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + bl sub_02064450 + add r0, r7, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021F4AB4 + + thumb_func_start ov5_021F4B6C +ov5_021F4B6C: ; 0x021F4B6C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r7, r1, #0 + add r1, r3, #0 + add r3, r0, #0 + str r0, [sp] + ldr r6, [sp, #0x38] + ldr r4, [sp, #0x3c] + cmp r3, #3 + bhi _021F4BB2 + add r3, r3, r3 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_021F4B8C: ; jump table + .short _021F4B94 - _021F4B8C - 2 ; case 0 + .short _021F4B9C - _021F4B8C - 2 ; case 1 + .short _021F4BA4 - _021F4B8C - 2 ; case 2 + .short _021F4BAC - _021F4B8C - 2 ; case 3 +_021F4B94: + ldr r1, [r1, #8] + ldr r0, [r2, #8] + sub r0, r1, r0 + b _021F4BB2 +_021F4B9C: + ldr r2, [r2, #8] + ldr r0, [r1, #8] + sub r0, r2, r0 + b _021F4BB2 +_021F4BA4: + ldr r1, [r1, #0] + ldr r0, [r2, #0] + sub r0, r1, r0 + b _021F4BB2 +_021F4BAC: + ldr r2, [r2, #0] + ldr r0, [r1, #0] + sub r0, r2, r0 +_021F4BB2: + asr r1, r0, #0xf + lsr r1, r1, #0x10 + add r1, r0, r1 + asr r5, r1, #0x10 + bpl _021F4BBE + neg r5, r5 +_021F4BBE: + cmp r5, r7 + ble _021F4BC4 + add r5, r7, #0 +_021F4BC4: + sub r5, r5, #1 + bpl _021F4BCA + mov r5, #0 +_021F4BCA: + lsr r1, r0, #0x1f + lsl r2, r0, #0x10 + sub r2, r2, r1 + mov r0, #0x10 + ror r2, r0 + str r5, [sp, #8] + add r0, r1, r2 + bpl _021F4BE0 + sub r1, r5, #1 + str r1, [sp, #8] + b _021F4BE8 +_021F4BE0: + cmp r0, #0 + ble _021F4BE8 + add r1, r5, #1 + str r1, [sp, #8] +_021F4BE8: + ldr r1, [sp, #8] + cmp r1, #0 + bge _021F4BF4 + mov r1, #0 + str r1, [sp, #8] + b _021F4BFA +_021F4BF4: + cmp r1, r7 + ble _021F4BFA + str r7, [sp, #8] +_021F4BFA: + ldr r1, _021F4CE0 ; =0x00001999 + bl sub_020E1F6C + add r7, r0, #0 + bpl _021F4C06 + neg r7, r7 +_021F4C06: + ldr r1, [sp, #8] + mov r0, #0xc + add r2, r1, #0 + mul r2, r0 + str r2, [sp, #0xc] + ldr r1, [sp] + mov r2, #0x48 + mul r2, r1 + str r2, [sp, #0x10] + ldr r2, _021F4CE4 ; =0x022008E0 + ldr r1, [sp, #0x10] + add r1, r2, r1 + ldr r2, [sp, #0xc] + str r1, [sp, #0x1c] + add r1, r1, r2 + str r1, [sp, #4] + add r1, r5, #0 + mul r1, r0 + ldr r0, [sp, #0x1c] + str r1, [sp, #0x14] + add r3, r1, r0 + ldmia r3!, {r0, r1} + add r2, r6, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r1, _021F4CE8 ; =0x022007C0 + str r0, [r2, #0] + ldr r0, [sp, #0x10] + add r3, r4, #0 + add r1, r1, r0 + ldr r0, [sp, #0xc] + str r1, [sp, #0x18] + add r5, r1, r0 + ldr r1, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r1, r0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r1, [r2, #0] + add r0, r3, #0 + str r1, [r0, #0] + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x1c] + ldr r1, [r0, r1] + ldr r0, [r6, #0] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, [r6, #0] + mul r0, r7 + add r0, r1, r0 + str r0, [r6, #0] + ldr r0, [sp, #4] + ldr r1, [r0, #4] + ldr r0, [r6, #4] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, [r6, #4] + mul r0, r7 + add r0, r1, r0 + str r0, [r6, #4] + ldr r0, [sp, #4] + ldr r1, [r0, #8] + ldr r0, [r6, #8] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, [r6, #8] + mul r0, r7 + add r0, r1, r0 + str r0, [r6, #8] + ldr r1, [sp, #0x18] + ldr r0, [sp, #0xc] + ldr r1, [r1, r0] + ldr r0, [r4, #0] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, [r4, #0] + mul r0, r7 + add r0, r1, r0 + str r0, [r4, #0] + ldr r1, [r5, #4] + ldr r0, [r4, #4] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, [r4, #4] + mul r0, r7 + add r0, r1, r0 + str r0, [r4, #4] + ldr r1, [r5, #8] + ldr r0, [r4, #8] + sub r0, r1, r0 + mov r1, #0xa + bl sub_020E1F6C + ldr r1, [r4, #8] + mul r0, r7 + add r0, r1, r0 + str r0, [r4, #8] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F4CE0: .word 0x00001999 +_021F4CE4: .word 0x022008E0 +_021F4CE8: .word 0x022007C0 + thumb_func_end ov5_021F4B6C + + thumb_func_start ov5_021F4CEC +ov5_021F4CEC: ; 0x021F4CEC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r1, #0 + add r1, sp, #8 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + add r4, r3, #0 + add r7, r2, #0 + str r0, [r1, #8] + cmp r4, #8 + blt _021F4D0A + bl sub_02022974 +_021F4D0A: + add r0, r6, #0 + add r1, r7, #0 + add r2, sp, #8 + bl sub_02064450 + add r0, r5, #0 + bl ov5_021DF574 + add r1, sp, #8 + bl sub_020644A4 + mov r0, #3 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #1 + ldr r1, [sp, #0x10] + lsl r0, r0, #0xe + sub r0, r1, r0 + str r0, [sp, #0x10] + str r5, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r1, _021F4D4C ; =0x02200768 + add r0, r5, #0 + add r2, sp, #8 + add r3, r4, #0 + bl ov5_021DF72C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021F4D4C: .word 0x02200768 + thumb_func_end ov5_021F4CEC + + thumb_func_start ov5_021F4D50 +ov5_021F4D50: ; 0x021F4D50 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715B4 + str r0, [r4, #0] + add r0, r5, #0 + bl sub_020715BC + str r0, [r4, #4] + mov r1, #0x20 + bl ov5_021DF55C + str r0, [r4, #8] + ldr r1, [r4, #8] + add r0, r4, #0 + add r3, r1, #4 + ldr r1, [r4, #0] + add r0, #0xc + add r2, r1, #1 + mov r1, #0x14 + mul r1, r2 + add r1, r3, r1 + bl sub_02073B70 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4D50 + + thumb_func_start ov5_021F4D88 +ov5_021F4D88: ; 0x021F4D88 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F4D88 + + thumb_func_start ov5_021F4D8C +ov5_021F4D8C: ; 0x021F4D8C + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F4D8C + + thumb_func_start ov5_021F4D90 +ov5_021F4D90: ; 0x021F4D90 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0xc + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4D90 + + .rodata + + + .global Unk_ov5_02200750 +Unk_ov5_02200750: ; 0x02200750 + .incbin "incbin/overlay5_rodata.bin", 0x7E3C, 0x7E40 - 0x7E3C + + .global Unk_ov5_02200754 +Unk_ov5_02200754: ; 0x02200754 + .incbin "incbin/overlay5_rodata.bin", 0x7E40, 0x7E54 - 0x7E40 + + .global Unk_ov5_02200768 +Unk_ov5_02200768: ; 0x02200768 + .incbin "incbin/overlay5_rodata.bin", 0x7E54, 0x7E68 - 0x7E54 + + .global Unk_ov5_0220077C +Unk_ov5_0220077C: ; 0x0220077C + .incbin "incbin/overlay5_rodata.bin", 0x7E68, 0x7E88 - 0x7E68 + + .global Unk_ov5_0220079C +Unk_ov5_0220079C: ; 0x0220079C + .incbin "incbin/overlay5_rodata.bin", 0x7E88, 0x7EAC - 0x7E88 + + .global Unk_ov5_022007C0 +Unk_ov5_022007C0: ; 0x022007C0 + .incbin "incbin/overlay5_rodata.bin", 0x7EAC, 0x7FCC - 0x7EAC + + .global Unk_ov5_022008E0 +Unk_ov5_022008E0: ; 0x022008E0 + .incbin "incbin/overlay5_rodata.bin", 0x7FCC, 0x120 + diff --git a/asm/ov5_021F4DAC.s b/asm/ov5_021F4DAC.s new file mode 100644 index 000000000..2af585378 --- /dev/null +++ b/asm/ov5_021F4DAC.s @@ -0,0 +1,62 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F4DAC +ov5_021F4DAC: ; 0x021F4DAC + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x6c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F4DD8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4DAC + + thumb_func_start ov5_021F4DC8 +ov5_021F4DC8: ; 0x021F4DC8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F4DFC + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F4DC8 + + thumb_func_start ov5_021F4DD8 +ov5_021F4DD8: ; 0x021F4DD8 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x11 + bl ov5_021DFB00 + add r0, r4, #0 + add r0, #0x18 + add r1, r4, #4 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4DD8 + + thumb_func_start ov5_021F4DFC +ov5_021F4DFC: ; 0x021F4DFC + ldr r3, _021F4E04 ; =sub_0207395C + add r0, r0, #4 + bx r3 + nop +_021F4E04: .word sub_0207395C + thumb_func_end ov5_021F4DFC \ No newline at end of file diff --git a/asm/ov5_021F4E08.s b/asm/ov5_021F4E08.s new file mode 100644 index 000000000..24249dc6b --- /dev/null +++ b/asm/ov5_021F4E08.s @@ -0,0 +1,332 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F4E08 +ov5_021F4E08: ; 0x021F4E08 + push {r3, r4, r5, lr} + mov r2, #0 + ldr r1, _021F4E24 ; =0x00000D6C + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F4E38 + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_021F4E24: .word 0x00000D6C + thumb_func_end ov5_021F4E08 + + thumb_func_start ov5_021F4E28 +ov5_021F4E28: ; 0x021F4E28 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F4E94 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F4E28 + + thumb_func_start ov5_021F4E38 +ov5_021F4E38: ; 0x021F4E38 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0xa6 + lsl r0, r0, #2 + mov r5, #0 + add r4, r7, #4 + add r6, r7, r0 +_021F4E46: + mov r0, #0 + str r0, [sp] + add r3, r5, #0 + ldr r0, [r7, #0] + add r1, r4, #0 + mov r2, #0 + add r3, #0x1a + bl ov5_021DFB00 + add r0, r6, #0 + add r1, r4, #0 + bl sub_02073B70 + add r5, r5, #1 + add r4, #0x14 + add r6, #0x54 + cmp r5, #0x20 + blt _021F4E46 + mov r2, #0 + mov r0, #0x14 + add r6, r5, #0 + str r2, [sp] + mul r6, r0 + add r4, r7, #4 + ldr r0, [r7, #0] + add r1, r4, r6 + mov r3, #0x19 + bl ov5_021DFB00 + mov r0, #0xa6 + lsl r0, r0, #2 + add r1, r7, r0 + mov r0, #0x54 + mul r0, r5 + add r0, r1, r0 + add r1, r4, r6 + bl sub_02073B70 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F4E38 + + thumb_func_start ov5_021F4E94 +ov5_021F4E94: ; 0x021F4E94 + push {r3, r4, r5, lr} + mov r4, #0 + add r5, r0, #4 +_021F4E9A: + add r0, r5, #0 + bl sub_0207395C + add r4, r4, #1 + add r5, #0x14 + cmp r4, #0x21 + blt _021F4E9A + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4E94 + + thumb_func_start ov5_021F4EAC +ov5_021F4EAC: ; 0x021F4EAC + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r5, r0, #0 + ldr r0, [r5, #0x40] + add r4, r1, #0 + mov r1, #3 + add r6, r2, #0 + add r7, r3, #0 + str r0, [sp, #8] + str r0, [sp, #0x24] + bl ov5_021DF55C + str r0, [sp, #0x28] + mov r0, #9 + mov r3, #0 + lsl r1, r4, #0x10 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + str r0, [sp, #0x14] + str r4, [sp, #0x18] + str r6, [sp, #0x1c] + str r5, [sp, #0x20] + str r3, [sp, #0x10] + add r0, sp, #0x18 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, _021F4F14 ; =0x02200A0C + add r2, sp, #0xc + bl ov5_021DF72C + add r5, r0, #0 + beq _021F4F0E + bl sub_02071598 + add r4, r0, #0 + ldr r0, [sp, #0x40] + str r0, [r4, #0x54] + add r0, r7, #0 + bl sub_020E17B4 + str r0, [r4, #0x58] + add r0, r7, #0 + bl sub_020E17B4 + str r0, [r4, #0x5c] +_021F4F0E: + add r0, r5, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F4F14: .word 0x02200A0C + thumb_func_end ov5_021F4EAC + + thumb_func_start ov5_021F4F18 +ov5_021F4F18: ; 0x021F4F18 + push {r3, r4, r5, r6, lr} + sub sp, #4 + ldr r4, [sp, #0x18] + add r5, r3, #0 + str r4, [sp] + bl ov5_021F4EAC + add r6, r0, #0 + beq _021F4F3C + bl sub_02071598 + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0x58] + add r0, r5, #0 + bl sub_020E17B4 + str r0, [r4, #0x5c] +_021F4F3C: + add r0, r6, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4F18 + + thumb_func_start ov5_021F4F44 +ov5_021F4F44: ; 0x021F4F44 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x6c + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x6c] + lsl r1, r0, #0x10 + mov r0, #9 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #0x70] + add r1, sp, #0 + lsl r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #4] + add r0, r5, #0 + bl sub_020715D4 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F4F44 + + thumb_func_start ov5_021F4F88 +ov5_021F4F88: ; 0x021F4F88 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F4F88 + + thumb_func_start ov5_021F4F8C +ov5_021F4F8C: ; 0x021F4F8C + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x58] + ldr r1, [r4, #0x5c] + bl sub_020E11CC + bhs _021F4FAE + ldr r0, [r4, #0x58] + bl sub_020E16BC + ldr r2, _021F4FB0 ; =0x9999999A + ldr r3, _021F4FB4 ; =0x3FC99999 + bl sub_020DFC6C + bl sub_020DFF84 + str r0, [r4, #0x58] +_021F4FAE: + pop {r4, pc} + ; .align 2, 0 +_021F4FB0: .word 0x9999999A +_021F4FB4: .word 0x3FC99999 + thumb_func_end ov5_021F4F8C + + thumb_func_start ov5_021F4FB8 +ov5_021F4FB8: ; 0x021F4FB8 + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + ldr r4, _021F5058 ; =0x02200A00 + add r2, r0, #0 + add r5, r1, #0 + ldmia r4!, {r0, r1} + add r3, sp, #0x24 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r6, _021F505C ; =0x02200A20 + str r0, [r3, #0] + add r4, sp, #0 + mov r3, #4 +_021F4FD2: + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _021F4FD2 + ldr r0, [r6, #0] + str r0, [r4, #0] + mov r0, #0xa6 + ldr r1, [r5, #0x7c] + lsl r0, r0, #2 + add r4, r1, r0 + ldr r1, [r5, #0x54] + mov r0, #0x54 + add r6, r1, #0 + mul r6, r0 + add r0, r2, #0 + add r1, sp, #0x30 + bl sub_020715E4 + ldr r0, [sp, #0x24] + bl sub_020E17B4 + ldr r1, [r5, #0x58] + bl sub_020E18B0 + bl sub_020E1740 + str r0, [sp, #0x24] + ldr r0, [sp, #0x28] + bl sub_020E17B4 + ldr r1, [r5, #0x58] + bl sub_020E18B0 + bl sub_020E1740 + str r0, [sp, #0x28] + ldr r0, [sp, #0x2c] + bl sub_020E17B4 + ldr r1, [r5, #0x58] + bl sub_020E18B0 + bl sub_020E1740 + str r0, [sp, #0x2c] + mov r0, #2 + ldr r1, [sp, #0x30] + lsl r0, r0, #0xa + sub r1, r1, r0 + str r1, [sp, #0x30] + ldr r1, [sp, #0x34] + lsl r0, r0, #1 + sub r0, r1, r0 + str r0, [sp, #0x34] + mov r0, #5 + ldr r1, [sp, #0x38] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x38] + add r0, r4, r6 + add r1, sp, #0x30 + add r2, sp, #0x24 + add r3, sp, #0 + bl sub_02073BA4 + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021F5058: .word 0x02200A00 +_021F505C: .word 0x02200A20 + thumb_func_end ov5_021F4FB8 + + .rodata + + + .global Unk_ov5_02200A00 +Unk_ov5_02200A00: ; 0x02200A00 + .incbin "incbin/overlay5_rodata.bin", 0x80EC, 0x80F8 - 0x80EC + + .global Unk_ov5_02200A0C +Unk_ov5_02200A0C: ; 0x02200A0C + .incbin "incbin/overlay5_rodata.bin", 0x80F8, 0x810C - 0x80F8 + + .global Unk_ov5_02200A20 +Unk_ov5_02200A20: ; 0x02200A20 + .incbin "incbin/overlay5_rodata.bin", 0x810C, 0x24 + diff --git a/asm/ov5_021F5060.s b/asm/ov5_021F5060.s new file mode 100644 index 000000000..4c8c65826 --- /dev/null +++ b/asm/ov5_021F5060.s @@ -0,0 +1,62 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F5060 +ov5_021F5060: ; 0x021F5060 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x6c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F508C + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5060 + + thumb_func_start ov5_021F507C +ov5_021F507C: ; 0x021F507C + push {r4, lr} + add r4, r0, #0 + bl ov5_021F50B0 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F507C + + thumb_func_start ov5_021F508C +ov5_021F508C: ; 0x021F508C + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x15 + bl ov5_021DFB00 + add r0, r4, #0 + add r0, #0x18 + add r1, r4, #4 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F508C + + thumb_func_start ov5_021F50B0 +ov5_021F50B0: ; 0x021F50B0 + ldr r3, _021F50B8 ; =sub_0207395C + add r0, r0, #4 + bx r3 + nop +_021F50B8: .word sub_0207395C + thumb_func_end ov5_021F50B0 \ No newline at end of file diff --git a/asm/ov5_021F50BC.s b/asm/ov5_021F50BC.s new file mode 100644 index 000000000..5970afae5 --- /dev/null +++ b/asm/ov5_021F50BC.s @@ -0,0 +1,265 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F50BC +ov5_021F50BC: ; 0x021F50BC + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x78 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #8] + bl ov5_021F50E8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F50BC + + thumb_func_start ov5_021F50D8 +ov5_021F50D8: ; 0x021F50D8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F5110 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F50D8 + + thumb_func_start ov5_021F50E8 +ov5_021F50E8: ; 0x021F50E8 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + add r1, r4, #0 + ldr r0, [r4, #8] + add r1, #0xc + mov r3, #0x16 + bl ov5_021DFB00 + add r0, r4, #0 + add r4, #0xc + add r0, #0x20 + add r1, r4, #0 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F50E8 + + thumb_func_start ov5_021F5110 +ov5_021F5110: ; 0x021F5110 + ldr r3, _021F5118 ; =sub_0207395C + add r0, #0xc + bx r3 + nop +_021F5118: .word sub_0207395C + thumb_func_end ov5_021F5110 + + thumb_func_start ov5_021F511C +ov5_021F511C: ; 0x021F511C + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + mov r1, #5 + str r4, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x1c] + bl sub_02063050 + add r0, sp, #0x14 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r1, _021F5154 ; =0x02200A50 + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021F5154: .word 0x02200A50 + thumb_func_end ov5_021F511C + + thumb_func_start ov5_021F5158 +ov5_021F5158: ; 0x021F5158 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x30 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x38] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x38] + bl sub_02062918 + str r0, [r4, #0xc] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + ldr r0, [r4, #0x38] + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5158 + + thumb_func_start ov5_021F51A0 +ov5_021F51A0: ; 0x021F51A0 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F51A0 + + thumb_func_start ov5_021F51A4 +ov5_021F51A4: ; 0x021F51A4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x38] + ldr r1, [r4, #8] + add r5, r0, #0 + ldr r2, [r4, #0xc] + add r0, r6, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F51C0 + bl sub_02022974 +_021F51C0: + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F51D0 + cmp r0, #1 + beq _021F51EE + add sp, #0xc + cmp r0, #2 + pop {r3, r4, r5, r6, pc} +_021F51D0: + add r0, r6, #0 + add r1, sp, #0 + bl sub_02063050 + mov r0, #0xa + ldr r1, [sp, #8] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_021F51EE: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x1e + blt _021F51FE + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021F51FE: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F51A4 + + thumb_func_start ov5_021F5204 +ov5_021F5204: ; 0x021F5204 + push {r4, r5, r6, lr} + sub sp, #0x60 + ldr r5, _021F527C ; =0x02200A44 + add r2, r0, #0 + add r4, r1, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x48 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + ldr r6, _021F5280 ; =0x02200A64 + str r0, [r3, #0] + add r5, sp, #0x24 + mov r3, #4 +_021F521E: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _021F521E + ldr r0, [r6, #0] + add r1, sp, #0x54 + str r0, [r5, #0] + add r0, r2, #0 + bl sub_020715E4 + mov r0, #0x19 + ldr r1, [sp, #0x58] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x58] + mov r0, #5 + ldr r1, [sp, #0x5c] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x5c] + bl sub_020AF5E0 + mov r2, #0 + add r5, r0, #0 + add r0, sp, #0x24 + mov r1, #0x5a + add r3, r2, #0 + bl sub_0201E2E0 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020C4C88 + add r0, sp, #0x24 + add r1, sp, #0 + add r2, r0, #0 + bl sub_020BB8EC + ldr r0, [r4, #0x34] + add r1, sp, #0x54 + add r0, #0x20 + add r2, sp, #0x48 + add r3, sp, #0x24 + bl sub_02073C1C + add sp, #0x60 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F527C: .word 0x02200A44 +_021F5280: .word 0x02200A64 + thumb_func_end ov5_021F5204 + + .rodata + + + .global Unk_ov5_02200A44 +Unk_ov5_02200A44: ; 0x02200A44 + .incbin "incbin/overlay5_rodata.bin", 0x8130, 0x813C - 0x8130 + + .global Unk_ov5_02200A50 +Unk_ov5_02200A50: ; 0x02200A50 + .incbin "incbin/overlay5_rodata.bin", 0x813C, 0x8150 - 0x813C + + .global Unk_ov5_02200A64 +Unk_ov5_02200A64: ; 0x02200A64 + .incbin "incbin/overlay5_rodata.bin", 0x8150, 0x24 + diff --git a/asm/ov5_021F5284.s b/asm/ov5_021F5284.s new file mode 100644 index 000000000..2ce858c50 --- /dev/null +++ b/asm/ov5_021F5284.s @@ -0,0 +1,244 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F5284 +ov5_021F5284: ; 0x021F5284 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x78 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #8] + bl ov5_021F52B0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5284 + + thumb_func_start ov5_021F52A0 +ov5_021F52A0: ; 0x021F52A0 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F52D8 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F52A0 + + thumb_func_start ov5_021F52B0 +ov5_021F52B0: ; 0x021F52B0 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + add r1, r4, #0 + ldr r0, [r4, #8] + add r1, #0xc + mov r3, #0x17 + bl ov5_021DFB00 + add r0, r4, #0 + add r4, #0xc + add r0, #0x20 + add r1, r4, #0 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F52B0 + + thumb_func_start ov5_021F52D8 +ov5_021F52D8: ; 0x021F52D8 + ldr r3, _021F52E0 ; =sub_0207395C + add r0, #0xc + bx r3 + nop +_021F52E0: .word sub_0207395C + thumb_func_end ov5_021F52D8 + + thumb_func_start ov5_021F52E4 +ov5_021F52E4: ; 0x021F52E4 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + mov r1, #6 + str r4, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x1c] + bl sub_02063050 + add r0, sp, #0x14 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r1, _021F531C ; =0x02200A94 + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021F531C: .word 0x02200A94 + thumb_func_end ov5_021F52E4 + + thumb_func_start ov5_021F5320 +ov5_021F5320: ; 0x021F5320 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x30 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x38] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x38] + bl sub_02062918 + str r0, [r4, #0xc] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + ldr r0, [r4, #0x38] + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5320 + + thumb_func_start ov5_021F5368 +ov5_021F5368: ; 0x021F5368 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F5368 + + thumb_func_start ov5_021F536C +ov5_021F536C: ; 0x021F536C + push {r4, r5, lr} + sub sp, #0xc + add r2, r1, #0 + ldr r5, [r2, #0x38] + ldr r1, [r2, #8] + add r4, r0, #0 + ldr r2, [r2, #0xc] + add r0, r5, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F5388 + bl sub_02022974 +_021F5388: + add r0, r5, #0 + add r1, sp, #0 + bl sub_02063050 + mov r0, #0xa + ldr r1, [sp, #8] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F536C + + thumb_func_start ov5_021F53A8 +ov5_021F53A8: ; 0x021F53A8 + push {r4, r5, r6, lr} + sub sp, #0x60 + ldr r5, _021F5420 ; =0x02200A88 + add r2, r0, #0 + add r4, r1, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x48 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + ldr r6, _021F5424 ; =0x02200AA8 + str r0, [r3, #0] + add r5, sp, #0x24 + mov r3, #4 +_021F53C2: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _021F53C2 + ldr r0, [r6, #0] + add r1, sp, #0x54 + str r0, [r5, #0] + add r0, r2, #0 + bl sub_020715E4 + mov r0, #0x19 + ldr r1, [sp, #0x58] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x58] + mov r0, #5 + ldr r1, [sp, #0x5c] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x5c] + bl sub_020AF5E0 + mov r2, #0 + add r5, r0, #0 + add r0, sp, #0x24 + mov r1, #0x5a + add r3, r2, #0 + bl sub_0201E2E0 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020C4C88 + add r0, sp, #0x24 + add r1, sp, #0 + add r2, r0, #0 + bl sub_020BB8EC + ldr r0, [r4, #0x34] + add r1, sp, #0x54 + add r0, #0x20 + add r2, sp, #0x48 + add r3, sp, #0x24 + bl sub_02073C1C + add sp, #0x60 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F5420: .word 0x02200A88 +_021F5424: .word 0x02200AA8 + thumb_func_end ov5_021F53A8 + + .rodata + + + .global Unk_ov5_02200A88 +Unk_ov5_02200A88: ; 0x02200A88 + .incbin "incbin/overlay5_rodata.bin", 0x8174, 0x8180 - 0x8174 + + .global Unk_ov5_02200A94 +Unk_ov5_02200A94: ; 0x02200A94 + .incbin "incbin/overlay5_rodata.bin", 0x8180, 0x8194 - 0x8180 + + .global Unk_ov5_02200AA8 +Unk_ov5_02200AA8: ; 0x02200AA8 + .incbin "incbin/overlay5_rodata.bin", 0x8194, 0x24 + diff --git a/asm/ov5_021F5428.s b/asm/ov5_021F5428.s new file mode 100644 index 000000000..ddc9c924b --- /dev/null +++ b/asm/ov5_021F5428.s @@ -0,0 +1,246 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F5428 +ov5_021F5428: ; 0x021F5428 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x78 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #8] + bl ov5_021F5454 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5428 + + thumb_func_start ov5_021F5444 +ov5_021F5444: ; 0x021F5444 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F547C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F5444 + + thumb_func_start ov5_021F5454 +ov5_021F5454: ; 0x021F5454 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + add r1, r4, #0 + ldr r0, [r4, #8] + add r1, #0xc + mov r3, #0x18 + bl ov5_021DFB00 + add r0, r4, #0 + add r4, #0xc + add r0, #0x20 + add r1, r4, #0 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5454 + + thumb_func_start ov5_021F547C +ov5_021F547C: ; 0x021F547C + ldr r3, _021F5484 ; =sub_0207395C + add r0, #0xc + bx r3 + nop +_021F5484: .word sub_0207395C + thumb_func_end ov5_021F547C + + thumb_func_start ov5_021F5488 +ov5_021F5488: ; 0x021F5488 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + mov r1, #7 + str r4, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, sp, #8 + str r5, [sp, #0x1c] + bl sub_02063050 + add r0, sp, #0x14 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r1, _021F54C0 ; =0x02200AD8 + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021F54C0: .word 0x02200AD8 + thumb_func_end ov5_021F5488 + + thumb_func_start ov5_021F54C4 +ov5_021F54C4: ; 0x021F54C4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + add r3, r0, #0 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x34 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x3c] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x3c] + bl sub_02062918 + str r0, [r4, #0xc] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + ldr r0, [r4, #0x3c] + add r1, sp, #0 + bl sub_02063050 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + mov r0, #0x3c + str r0, [r4, #0x30] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F54C4 + + thumb_func_start ov5_021F5510 +ov5_021F5510: ; 0x021F5510 + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F5510 + + thumb_func_start ov5_021F5514 +ov5_021F5514: ; 0x021F5514 + push {r3, r4, lr} + sub sp, #0xc + ldr r2, [r1, #0x30] + add r4, r0, #0 + cmp r2, #0 + beq _021F5526 + sub r0, r2, #1 + str r0, [r1, #0x30] + b _021F552E +_021F5526: + bl ov5_021DF74C + add sp, #0xc + pop {r3, r4, pc} +_021F552E: + ldr r0, [r1, #0x3c] + add r1, sp, #0 + bl sub_02063050 + mov r0, #0xa + ldr r1, [sp, #8] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F5514 + + thumb_func_start ov5_021F554C +ov5_021F554C: ; 0x021F554C + push {r4, r5, r6, lr} + sub sp, #0x60 + ldr r5, _021F55C4 ; =0x02200ACC + add r2, r0, #0 + add r4, r1, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x48 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + ldr r6, _021F55C8 ; =0x02200AEC + str r0, [r3, #0] + add r5, sp, #0x24 + mov r3, #4 +_021F5566: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _021F5566 + ldr r0, [r6, #0] + add r1, sp, #0x54 + str r0, [r5, #0] + add r0, r2, #0 + bl sub_020715E4 + mov r0, #0x19 + ldr r1, [sp, #0x58] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0x58] + mov r0, #5 + ldr r1, [sp, #0x5c] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x5c] + bl sub_020AF5E0 + mov r2, #0 + add r5, r0, #0 + add r0, sp, #0x24 + mov r1, #0x5a + add r3, r2, #0 + bl sub_0201E2E0 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020C4C88 + add r0, sp, #0x24 + add r1, sp, #0 + add r2, r0, #0 + bl sub_020BB8EC + ldr r0, [r4, #0x38] + add r1, sp, #0x54 + add r0, #0x20 + add r2, sp, #0x48 + add r3, sp, #0x24 + bl sub_02073C1C + add sp, #0x60 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F55C4: .word 0x02200ACC +_021F55C8: .word 0x02200AEC + thumb_func_end ov5_021F554C + + .rodata + + + .global Unk_ov5_02200ACC +Unk_ov5_02200ACC: ; 0x02200ACC + .incbin "incbin/overlay5_rodata.bin", 0x81B8, 0x81C4 - 0x81B8 + + .global Unk_ov5_02200AD8 +Unk_ov5_02200AD8: ; 0x02200AD8 + .incbin "incbin/overlay5_rodata.bin", 0x81C4, 0x81D8 - 0x81C4 + + .global Unk_ov5_02200AEC +Unk_ov5_02200AEC: ; 0x02200AEC + .incbin "incbin/overlay5_rodata.bin", 0x81D8, 0x24 + diff --git a/asm/ov5_021F55CC.s b/asm/ov5_021F55CC.s new file mode 100644 index 000000000..f6d98072d --- /dev/null +++ b/asm/ov5_021F55CC.s @@ -0,0 +1,234 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F55CC +ov5_021F55CC: ; 0x021F55CC + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F55F8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F55CC + + thumb_func_start ov5_021F55E8 +ov5_021F55E8: ; 0x021F55E8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F5620 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F55E8 + + thumb_func_start ov5_021F55F8 +ov5_021F55F8: ; 0x021F55F8 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x3a + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r4, #0x18 + add r1, r4, #0 + mov r3, #0xa2 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F55F8 + + thumb_func_start ov5_021F5620 +ov5_021F5620: ; 0x021F5620 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl sub_0207395C + add r4, #0x18 + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F5620 + + thumb_func_start ov5_021F5634 +ov5_021F5634: ; 0x021F5634 + push {r4, r5, lr} + sub sp, #0x1c + ldr r0, [r0, #0x40] + add r5, r1, #0 + mov r1, #8 + add r4, r3, #0 + str r0, [sp, #8] + bl ov5_021DF55C + str r0, [sp, #0xc] + mov r0, #2 + lsl r1, r5, #0x10 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x10] + mov r0, #0xa + lsl r0, r0, #0xc + str r0, [sp, #0x14] + lsl r0, r4, #0x10 + str r0, [sp, #0x18] + add r0, sp, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, _021F567C ; =0x02200B1C + add r2, sp, #0x10 + mov r3, #0 + bl ov5_021DF72C + ldr r0, _021F5680 ; =0x00000609 + bl sub_02005748 + add sp, #0x1c + pop {r4, r5, pc} + nop +_021F567C: .word 0x02200B1C +_021F5680: .word 0x00000609 + thumb_func_end ov5_021F5634 + + thumb_func_start ov5_021F5684 +ov5_021F5684: ; 0x021F5684 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl sub_020715BC + ldr r3, [r0, #4] + ldr r1, [r0, #0] + mov r0, #0 + str r1, [r4, #0x78] + str r3, [r4, #0x7c] + str r0, [sp] + add r2, r3, #4 + ldr r0, [r4, #0x78] + add r1, r4, #0 + add r3, #0x18 + bl ov5_021DFB40 + ldr r1, [r4, #0x7c] + add r0, r4, #0 + add r0, #0x24 + add r1, r1, #4 + add r2, r4, #0 + bl sub_02073B90 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5684 + + thumb_func_start ov5_021F56BC +ov5_021F56BC: ; 0x021F56BC + ldr r3, _021F56C4 ; =sub_02073AA8 + add r0, r1, #0 + bx r3 + nop +_021F56C4: .word sub_02073AA8 + thumb_func_end ov5_021F56BC + + thumb_func_start ov5_021F56C8 +ov5_021F56C8: ; 0x021F56C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02073B40 + cmp r0, #1 + bne _021F56E0 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, pc} +_021F56E0: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F56C8 + + thumb_func_start ov5_021F56F0 +ov5_021F56F0: ; 0x021F56F0 + push {r4, r5, r6, lr} + sub sp, #0x60 + ldr r3, _021F5754 ; =0x02200B10 + add r5, r0, #0 + add r4, r1, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x48 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r6, _021F5758 ; =0x02200B30 + str r0, [r2, #0] + add r3, sp, #0x24 + mov r2, #4 +_021F570A: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021F570A + ldr r0, [r6, #0] + str r0, [r3, #0] + bl sub_020AF5E0 + mov r2, #0 + add r6, r0, #0 + add r0, sp, #0x24 + mov r1, #0x5a + add r3, r2, #0 + bl sub_0201E2E0 + add r0, r6, #0 + add r1, sp, #0 + bl sub_020C4C88 + add r0, sp, #0x24 + add r1, sp, #0 + add r2, r0, #0 + bl sub_020BB8EC + add r0, r5, #0 + add r1, sp, #0x54 + bl sub_020715E4 + add r4, #0x24 + add r0, r4, #0 + add r1, sp, #0x54 + add r2, sp, #0x48 + add r3, sp, #0x24 + bl sub_02073BA4 + add sp, #0x60 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F5754: .word 0x02200B10 +_021F5758: .word 0x02200B30 + thumb_func_end ov5_021F56F0 + + .rodata + + + .global Unk_ov5_02200B10 +Unk_ov5_02200B10: ; 0x02200B10 + .incbin "incbin/overlay5_rodata.bin", 0x81FC, 0x8208 - 0x81FC + + .global Unk_ov5_02200B1C +Unk_ov5_02200B1C: ; 0x02200B1C + .incbin "incbin/overlay5_rodata.bin", 0x8208, 0x821C - 0x8208 + + .global Unk_ov5_02200B30 +Unk_ov5_02200B30: ; 0x02200B30 + .incbin "incbin/overlay5_rodata.bin", 0x821C, 0x24 + diff --git a/asm/ov5_021F575C.s b/asm/ov5_021F575C.s new file mode 100644 index 000000000..92d9393a5 --- /dev/null +++ b/asm/ov5_021F575C.s @@ -0,0 +1,188 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F575C +ov5_021F575C: ; 0x021F575C + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x40 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #4] + bl ov5_021F5788 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F575C + + thumb_func_start ov5_021F5778 +ov5_021F5778: ; 0x021F5778 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F57B4 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F5778 + + thumb_func_start ov5_021F5788 +ov5_021F5788: ; 0x021F5788 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #8 + mov r3, #0x5c + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #4] + add r4, #0x1c + add r1, r4, #0 + mov r3, #0xa4 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5788 + + thumb_func_start ov5_021F57B4 +ov5_021F57B4: ; 0x021F57B4 + push {r4, lr} + add r4, r0, #0 + add r0, #8 + bl sub_0207395C + add r4, #0x1c + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F57B4 + + thumb_func_start ov5_021F57C8 +ov5_021F57C8: ; 0x021F57C8 + push {r4, r5, lr} + sub sp, #0x1c + ldr r0, [r0, #0x40] + add r5, r1, #0 + mov r1, #9 + add r4, r2, #0 + str r0, [sp, #8] + bl ov5_021DF55C + str r0, [sp, #0xc] + mov r0, #2 + mov r3, #0 + lsl r1, r5, #0x10 + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x10] + lsl r1, r4, #0x10 + add r0, r1, r0 + str r0, [sp, #0x18] + str r3, [sp, #0x14] + add r0, sp, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, _021F5808 ; =0x02200B54 + add r2, sp, #0x10 + bl ov5_021DF72C + add sp, #0x1c + pop {r4, r5, pc} + nop +_021F5808: .word 0x02200B54 + thumb_func_end ov5_021F57C8 + + thumb_func_start ov5_021F580C +ov5_021F580C: ; 0x021F580C + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl sub_020715BC + ldr r3, [r0, #4] + ldr r1, [r0, #0] + add r2, r3, #0 + str r1, [r4, #0x78] + str r3, [r4, #0x7c] + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0x78] + add r1, r4, #0 + add r2, #8 + add r3, #0x1c + bl ov5_021DFB40 + ldr r1, [r4, #0x7c] + add r0, r4, #0 + add r0, #0x24 + add r1, #8 + add r2, r4, #0 + bl sub_02073B90 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F580C + + thumb_func_start ov5_021F5844 +ov5_021F5844: ; 0x021F5844 + ldr r3, _021F584C ; =sub_02073AA8 + add r0, r1, #0 + bx r3 + nop +_021F584C: .word sub_02073AA8 + thumb_func_end ov5_021F5844 + + thumb_func_start ov5_021F5850 +ov5_021F5850: ; 0x021F5850 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02073B40 + cmp r0, #1 + bne _021F5868 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, pc} +_021F5868: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5850 + + thumb_func_start ov5_021F5878 +ov5_021F5878: ; 0x021F5878 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x24 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5878 + + .rodata + + + .global Unk_ov5_02200B54 +Unk_ov5_02200B54: ; 0x02200B54 + .incbin "incbin/overlay5_rodata.bin", 0x8240, 0x14 + diff --git a/asm/ov5_021F5894.s b/asm/ov5_021F5894.s new file mode 100644 index 000000000..fbc032fc7 --- /dev/null +++ b/asm/ov5_021F5894.s @@ -0,0 +1,224 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F5894 +ov5_021F5894: ; 0x021F5894 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x3c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F58C0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5894 + + thumb_func_start ov5_021F58B0 +ov5_021F58B0: ; 0x021F58B0 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F58E8 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F58B0 + + thumb_func_start ov5_021F58C0 +ov5_021F58C0: ; 0x021F58C0 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x5b + bl ov5_021DFB00 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r4, #0x18 + add r1, r4, #0 + mov r3, #0xa3 + bl ov5_021DFB24 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov5_021F58C0 + + thumb_func_start ov5_021F58E8 +ov5_021F58E8: ; 0x021F58E8 + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + bl sub_0207395C + add r4, #0x18 + add r0, r4, #0 + bl sub_02073AA8 + pop {r4, pc} + thumb_func_end ov5_021F58E8 + + thumb_func_start ov5_021F58FC +ov5_021F58FC: ; 0x021F58FC + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + bl ov5_021DF578 + mov r1, #0xa + str r0, [sp, #8] + bl ov5_021DF55C + str r0, [sp, #0xc] + add r0, r4, #0 + add r1, sp, #0x10 + bl sub_02063050 + add r0, r4, #0 + bl sub_0206298C + cmp r0, #3 + bhi _021F5964 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F592E: ; jump table + .short _021F5936 - _021F592E - 2 ; case 0 + .short _021F5942 - _021F592E - 2 ; case 1 + .short _021F595A - _021F592E - 2 ; case 2 + .short _021F594E - _021F592E - 2 ; case 3 +_021F5936: + mov r0, #1 + ldr r1, [sp, #0x18] + lsl r0, r0, #0x10 + sub r0, r1, r0 + str r0, [sp, #0x18] + b _021F5964 +_021F5942: + mov r0, #1 + ldr r1, [sp, #0x18] + lsl r0, r0, #0x10 + add r0, r1, r0 + str r0, [sp, #0x18] + b _021F5964 +_021F594E: + mov r0, #1 + ldr r1, [sp, #0x10] + lsl r0, r0, #0x10 + add r0, r1, r0 + str r0, [sp, #0x10] + b _021F5964 +_021F595A: + mov r0, #1 + ldr r1, [sp, #0x10] + lsl r0, r0, #0x10 + sub r0, r1, r0 + str r0, [sp, #0x10] +_021F5964: + add r0, r4, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #8 + str r1, [sp] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, _021F5984 ; =0x02200B68 + add r2, sp, #0x10 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x1c + pop {r3, r4, pc} + nop +_021F5984: .word 0x02200B68 + thumb_func_end ov5_021F58FC + + thumb_func_start ov5_021F5988 +ov5_021F5988: ; 0x021F5988 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl sub_020715BC + ldr r3, [r0, #4] + ldr r1, [r0, #0] + mov r0, #0 + str r1, [r4, #0x78] + str r3, [r4, #0x7c] + str r0, [sp] + add r2, r3, #4 + ldr r0, [r4, #0x78] + add r1, r4, #0 + add r3, #0x18 + bl ov5_021DFB40 + ldr r1, [r4, #0x7c] + add r0, r4, #0 + add r0, #0x24 + add r1, r1, #4 + add r2, r4, #0 + bl sub_02073B90 + mov r0, #1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5988 + + thumb_func_start ov5_021F59C0 +ov5_021F59C0: ; 0x021F59C0 + ldr r3, _021F59C8 ; =sub_02073AA8 + add r0, r1, #0 + bx r3 + nop +_021F59C8: .word sub_02073AA8 + thumb_func_end ov5_021F59C0 + + thumb_func_start ov5_021F59CC +ov5_021F59CC: ; 0x021F59CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02073B40 + cmp r0, #1 + bne _021F59E4 + add r0, r5, #0 + bl ov5_021DF74C + pop {r3, r4, r5, pc} +_021F59E4: + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0 + bl sub_02073AC0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F59CC + + thumb_func_start ov5_021F59F4 +ov5_021F59F4: ; 0x021F59F4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_020715E4 + add r4, #0x24 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02073BB4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F59F4 + + .rodata + + + .global Unk_ov5_02200B68 +Unk_ov5_02200B68: ; 0x02200B68 + .incbin "incbin/overlay5_rodata.bin", 0x8254, 0x14 + diff --git a/asm/ov5_021F5A10.s b/asm/ov5_021F5A10.s new file mode 100644 index 000000000..67e3b5d72 --- /dev/null +++ b/asm/ov5_021F5A10.s @@ -0,0 +1,869 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F5A10 +ov5_021F5A10: ; 0x021F5A10 + push {r4, lr} + mov r2, #0 + mov r1, #0xc + add r3, r2, #0 + add r4, r0, #0 + bl ov5_021DF53C + str r4, [r0, #8] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5A10 + + thumb_func_start ov5_021F5A24 +ov5_021F5A24: ; 0x021F5A24 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F5B50 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F5A24 + + thumb_func_start ov5_021F5A34 +ov5_021F5A34: ; 0x021F5A34 + mov r1, #0 + ldrsh r1, [r0, r1] + add r1, r1, #1 + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F5A34 + + thumb_func_start ov5_021F5A40 +ov5_021F5A40: ; 0x021F5A40 + push {r3, lr} + mov r1, #0 + ldrsh r2, [r0, r1] + sub r2, r2, #1 + strh r2, [r0] + ldrsh r0, [r0, r1] + cmp r0, #0 + bge _021F5A54 + bl sub_02022974 +_021F5A54: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5A40 + + thumb_func_start ov5_021F5A58 +ov5_021F5A58: ; 0x021F5A58 + mov r1, #2 + ldrsh r1, [r0, r1] + add r1, r1, #1 + strh r1, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F5A58 + + thumb_func_start ov5_021F5A64 +ov5_021F5A64: ; 0x021F5A64 + push {r3, lr} + mov r1, #2 + ldrsh r2, [r0, r1] + sub r2, r2, #1 + strh r2, [r0, #2] + ldrsh r0, [r0, r1] + cmp r0, #0 + bge _021F5A78 + bl sub_02022974 +_021F5A78: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5A64 + + thumb_func_start ov5_021F5A7C +ov5_021F5A7C: ; 0x021F5A7C + push {r3, lr} + cmp r1, #0 + bne _021F5A88 + bl ov5_021F5A34 + pop {r3, pc} +_021F5A88: + bl ov5_021F5A58 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5A7C + + thumb_func_start ov5_021F5A90 +ov5_021F5A90: ; 0x021F5A90 + push {r3, lr} + cmp r1, #0 + bne _021F5A9C + bl ov5_021F5A40 + pop {r3, pc} +_021F5A9C: + bl ov5_021F5A64 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5A90 + + thumb_func_start ov5_021F5AA4 +ov5_021F5AA4: ; 0x021F5AA4 + push {r4, lr} + ldr r0, [r0, #0x40] + add r4, r1, #0 + mov r1, #0x14 + bl ov5_021DF55C + strb r4, [r0, #6] + pop {r4, pc} + thumb_func_end ov5_021F5AA4 + + thumb_func_start ov5_021F5AB4 +ov5_021F5AB4: ; 0x021F5AB4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r4, #4] + cmp r0, #0 + bne _021F5AF8 + mov r1, #1 + strb r1, [r4, #4] + ldr r0, [r4, #8] + mov r2, #0x55 + bl ov5_021DF9E0 + ldr r0, [r4, #8] + mov r1, #1 + mov r2, #0xaa + bl ov5_021DFA14 + mov r1, #1 + ldr r0, [r4, #8] + mov r2, #4 + add r3, r1, #0 + bl ov5_021DFA3C + mov r1, #1 + str r1, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F5AFC ; =0x02200BC0 + add r2, r1, #0 + str r0, [sp, #8] + ldr r0, [r4, #8] + add r3, r1, #0 + bl ov5_021DF864 +_021F5AF8: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021F5AFC: .word 0x02200BC0 + thumb_func_end ov5_021F5AB4 + + thumb_func_start ov5_021F5B00 +ov5_021F5B00: ; 0x021F5B00 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r4, #5] + cmp r0, #0 + bne _021F5B48 + mov r0, #1 + strb r0, [r4, #5] + ldr r0, [r4, #8] + mov r1, #0xa + mov r2, #0x6c + bl ov5_021DF9E0 + ldr r0, [r4, #8] + mov r1, #0xa + mov r2, #0xaa + bl ov5_021DFA14 + ldr r0, [r4, #8] + mov r1, #0xb + mov r2, #0xd + mov r3, #1 + bl ov5_021DFA3C + mov r0, #0xb + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021F5B4C ; =0x02200BC0 + mov r2, #0xa + str r0, [sp, #8] + ldr r0, [r4, #8] + mov r1, #0xc + add r3, r2, #0 + bl ov5_021DF864 +_021F5B48: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021F5B4C: .word 0x02200BC0 + thumb_func_end ov5_021F5B00 + + thumb_func_start ov5_021F5B50 +ov5_021F5B50: ; 0x021F5B50 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #4] + cmp r0, #1 + bne _021F5B7E + mov r0, #0 + strb r0, [r4, #4] + ldr r0, [r4, #8] + mov r1, #1 + bl ov5_021DFA08 + ldr r0, [r4, #8] + mov r1, #1 + bl ov5_021DFA30 + ldr r0, [r4, #8] + mov r1, #1 + bl ov5_021DFA7C + ldr r0, [r4, #8] + mov r1, #1 + bl ov5_021DF9D4 +_021F5B7E: + pop {r4, pc} + thumb_func_end ov5_021F5B50 + + thumb_func_start ov5_021F5B80 +ov5_021F5B80: ; 0x021F5B80 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #5] + cmp r0, #1 + bne _021F5BAE + mov r0, #0 + strb r0, [r4, #5] + ldr r0, [r4, #8] + mov r1, #0xa + bl ov5_021DFA08 + ldr r0, [r4, #8] + mov r1, #0xa + bl ov5_021DFA30 + ldr r0, [r4, #8] + mov r1, #0xb + bl ov5_021DFA7C + ldr r0, [r4, #8] + mov r1, #0xc + bl ov5_021DF9D4 +_021F5BAE: + pop {r4, pc} + thumb_func_end ov5_021F5B80 + + thumb_func_start ov5_021F5BB0 +ov5_021F5BB0: ; 0x021F5BB0 + push {r3, lr} + mov r1, #0 + ldrsh r1, [r0, r1] + cmp r1, #0 + bne _021F5BBE + bl ov5_021F5AB4 +_021F5BBE: + pop {r3, pc} + thumb_func_end ov5_021F5BB0 + + thumb_func_start ov5_021F5BC0 +ov5_021F5BC0: ; 0x021F5BC0 + push {r3, lr} + mov r1, #2 + ldrsh r1, [r0, r1] + cmp r1, #0 + bne _021F5BCE + bl ov5_021F5B00 +_021F5BCE: + pop {r3, pc} + thumb_func_end ov5_021F5BC0 + + thumb_func_start ov5_021F5BD0 +ov5_021F5BD0: ; 0x021F5BD0 + push {r3, lr} + mov r1, #0 + ldrsh r1, [r0, r1] + cmp r1, #0 + bne _021F5BDE + bl ov5_021F5B50 +_021F5BDE: + pop {r3, pc} + thumb_func_end ov5_021F5BD0 + + thumb_func_start ov5_021F5BE0 +ov5_021F5BE0: ; 0x021F5BE0 + push {r3, lr} + mov r1, #2 + ldrsh r1, [r0, r1] + cmp r1, #0 + bne _021F5BEE + bl ov5_021F5B80 +_021F5BEE: + pop {r3, pc} + thumb_func_end ov5_021F5BE0 + + thumb_func_start ov5_021F5BF0 +ov5_021F5BF0: ; 0x021F5BF0 + push {r3, lr} + cmp r1, #0 + bne _021F5BFC + bl ov5_021F5BB0 + pop {r3, pc} +_021F5BFC: + bl ov5_021F5BC0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5BF0 + + thumb_func_start ov5_021F5C04 +ov5_021F5C04: ; 0x021F5C04 + push {r3, lr} + cmp r1, #0 + bne _021F5C10 + bl ov5_021F5BD0 + pop {r3, pc} +_021F5C10: + bl ov5_021F5BE0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5C04 + + thumb_func_start ov5_021F5C18 +ov5_021F5C18: ; 0x021F5C18 + push {r4, r5, r6, lr} + sub sp, #8 + ldr r6, _021F5C48 ; =0x02200B7C + add r4, r3, #0 + ldmia r6!, {r5, r6} + add r3, sp, #0 + str r5, [sp] + str r6, [sp, #4] + lsl r1, r1, #2 + ldr r1, [r3, r1] + bl ov5_021DF84C + add r5, r0, #0 + cmp r4, #1 + bne _021F5C40 + bl sub_020213F4 + mov r1, #0 + bl sub_020B37A4 +_021F5C40: + add r0, r5, #0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_021F5C48: .word 0x02200B7C + thumb_func_end ov5_021F5C18 + + thumb_func_start ov5_021F5C4C +ov5_021F5C4C: ; 0x021F5C4C + push {r3, lr} + bl sub_02071598 + ldr r0, [r0, #0x14] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5C4C + + thumb_func_start ov5_021F5C58 +ov5_021F5C58: ; 0x021F5C58 + push {r3, lr} + bl sub_02071598 + mov r1, #1 + str r1, [r0, #0x10] + ldr r0, [r0, #0x40] + cmp r0, #0 + beq _021F5C6E + mov r1, #0 + bl sub_02021320 +_021F5C6E: + pop {r3, pc} + thumb_func_end ov5_021F5C58 + + thumb_func_start ov5_021F5C70 +ov5_021F5C70: ; 0x021F5C70 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x30 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5BF0 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r3, [r4, #0x38] + ldr r0, [r4, #0x34] + ldrb r3, [r3, #6] + ldr r1, [r4, #0x30] + add r2, sp, #0 + bl ov5_021F5C18 + str r0, [r4, #0x40] + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5A7C + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #1 + bne _021F5CC8 + ldr r0, _021F5CD0 ; =0x000005DD + bl sub_02005748 +_021F5CC8: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + nop +_021F5CD0: .word 0x000005DD + thumb_func_end ov5_021F5C70 + + thumb_func_start ov5_021F5CD4 +ov5_021F5CD4: ; 0x021F5CD4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + add r5, r0, #0 + bl sub_020715E4 + ldr r0, [r4, #0] + cmp r0, #0 + beq _021F5CF0 + cmp r0, #1 + beq _021F5D12 + cmp r0, #2 + b _021F5D2A +_021F5CF0: + ldr r1, [r4, #0x1c] + ldr r0, [r4, #0x28] + add r0, r1, r0 + str r0, [r4, #0x1c] + beq _021F5D06 + mov r0, #2 + ldr r1, [r4, #0x28] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [r4, #0x28] + b _021F5D2A +_021F5D06: + mov r0, #0 + str r0, [r4, #0x28] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F5D2A +_021F5D12: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x1e + blt _021F5D2A + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #0x14] +_021F5D2A: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5CD4 + + thumb_func_start ov5_021F5D38 +ov5_021F5D38: ; 0x021F5D38 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x40] + bl sub_020211FC + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5A90 + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5C04 + pop {r4, pc} + thumb_func_end ov5_021F5D38 + + thumb_func_start ov5_021F5D54 +ov5_021F5D54: ; 0x021F5D54 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #0x10] + cmp r1, #1 + beq _021F5D86 + add r1, sp, #0 + bl sub_020715E4 + ldr r1, [sp] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r4, #0x1c] + add r0, r1, r0 + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [r4, #0x20] + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [r4, #0x40] + add r1, sp, #0 + bl sub_020212A8 +_021F5D86: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F5D54 + + thumb_func_start ov5_021F5D8C +ov5_021F5D8C: ; 0x021F5D8C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r6, r1, #0 + str r2, [sp, #8] + add r7, r3, #0 + bl ov5_021DF578 + add r4, r0, #0 + mov r1, #0x14 + str r6, [sp, #0x18] + str r4, [sp, #0x1c] + bl ov5_021DF55C + str r0, [sp, #0x20] + add r0, r5, #0 + add r1, sp, #0xc + str r5, [sp, #0x24] + bl sub_02063050 + add r0, r5, #0 + bl sub_02062C0C + add r2, r0, #1 + cmp r7, #1 + bne _021F5DC4 + ldr r1, _021F5DDC ; =0x02200BAC + b _021F5DC6 +_021F5DC4: + ldr r1, _021F5DE0 ; =0x02200B84 +_021F5DC6: + add r0, sp, #0x18 + str r0, [sp] + str r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + add r2, sp, #0xc + bl ov5_021DF72C + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F5DDC: .word 0x02200BAC +_021F5DE0: .word 0x02200B84 + thumb_func_end ov5_021F5D8C + + thumb_func_start ov5_021F5DE4 +ov5_021F5DE4: ; 0x021F5DE4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x30 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x3c] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x3c] + bl sub_02062918 + str r0, [r4, #0xc] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5BF0 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r3, [r4, #0x38] + ldr r0, [r4, #0x34] + ldrb r3, [r3, #6] + ldr r1, [r4, #0x30] + add r2, sp, #0 + bl ov5_021F5C18 + str r0, [r4, #0x40] + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5A7C + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #1 + bne _021F5E4C + ldr r0, _021F5E54 ; =0x000005DD + bl sub_02005748 +_021F5E4C: + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + nop +_021F5E54: .word 0x000005DD + thumb_func_end ov5_021F5DE4 + + thumb_func_start ov5_021F5E58 +ov5_021F5E58: ; 0x021F5E58 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x3c] + ldr r1, [r4, #8] + add r5, r0, #0 + ldr r2, [r4, #0xc] + add r0, r6, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F5E74 + bl sub_02022974 +_021F5E74: + add r0, r6, #0 + add r1, sp, #0 + bl ov5_021ECDA0 + mov r0, #2 + ldr r1, [sp, #4] + lsl r0, r0, #0x10 + add r1, r1, r0 + str r1, [sp, #4] + ldr r2, [sp, #8] + lsr r1, r0, #5 + add r1, r2, r1 + str r1, [sp, #8] + ldr r1, [r4, #0] + cmp r1, #0 + beq _021F5E9C + cmp r1, #1 + beq _021F5EBC + cmp r1, #2 + b _021F5ED4 +_021F5E9C: + ldr r2, [r4, #0x1c] + ldr r1, [r4, #0x28] + add r1, r2, r1 + str r1, [r4, #0x1c] + beq _021F5EB0 + ldr r1, [r4, #0x28] + lsr r0, r0, #4 + sub r0, r1, r0 + str r0, [r4, #0x28] + b _021F5ED4 +_021F5EB0: + mov r0, #0 + str r0, [r4, #0x28] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F5ED4 +_021F5EBC: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x1e + blt _021F5ED4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #0x14] +_021F5ED4: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021F5E58 + + thumb_func_start ov5_021F5EE0 +ov5_021F5EE0: ; 0x021F5EE0 + push {r4, lr} + add r4, r1, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x30 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x3c] + bl sub_02062910 + str r0, [r4, #8] + ldr r0, [r4, #0x3c] + bl sub_02062918 + str r0, [r4, #0xc] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [r4, #0x28] + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5BF0 + ldr r0, [r4, #0x38] + ldr r1, [r4, #0x30] + bl ov5_021F5A7C + mov r0, #1 + pop {r4, pc} + thumb_func_end ov5_021F5EE0 + + thumb_func_start ov5_021F5F24 +ov5_021F5F24: ; 0x021F5F24 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r6, [r4, #0x3c] + ldr r1, [r4, #8] + add r5, r0, #0 + ldr r2, [r4, #0xc] + add r0, r6, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F5F40 + bl sub_02022974 +_021F5F40: + add r0, r6, #0 + add r1, sp, #0 + bl ov5_021ECDA0 + mov r0, #2 + ldr r1, [sp, #4] + lsl r0, r0, #0x10 + add r1, r1, r0 + str r1, [sp, #4] + ldr r1, [sp, #8] + lsr r0, r0, #5 + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [r4, #0] + cmp r0, #6 + bhi _021F5FFA + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021F5F6C: ; jump table + .short _021F5F7A - _021F5F6C - 2 ; case 0 + .short _021F5F7A - _021F5F6C - 2 ; case 1 + .short _021F5F80 - _021F5F6C - 2 ; case 2 + .short _021F5F9E - _021F5F6C - 2 ; case 3 + .short _021F5FC0 - _021F5F6C - 2 ; case 4 + .short _021F5FE2 - _021F5F6C - 2 ; case 5 + .short _021F5FFA - _021F5F6C - 2 ; case 6 +_021F5F7A: + add r0, r0, #1 + str r0, [r4, #0] + b _021F5FFA +_021F5F80: + ldr r3, [r4, #0x38] + ldr r0, [r4, #0x34] + ldrb r3, [r3, #6] + ldr r1, [r4, #0x30] + add r2, sp, #0 + bl ov5_021F5C18 + str r0, [r4, #0x40] + mov r1, #0 + bl sub_02021320 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F5FFA +_021F5F9E: + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02021320 + mov r0, #0 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #1 + bne _021F5FBA + ldr r0, _021F6008 ; =0x000005DD + bl sub_02005748 +_021F5FBA: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_021F5FC0: + ldr r1, [r4, #0x1c] + ldr r0, [r4, #0x28] + add r0, r1, r0 + str r0, [r4, #0x1c] + beq _021F5FD6 + mov r0, #2 + ldr r1, [r4, #0x28] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [r4, #0x28] + b _021F5FFA +_021F5FD6: + mov r0, #0 + str r0, [r4, #0x28] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021F5FFA +_021F5FE2: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x1e + blt _021F5FFA + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #0x14] +_021F5FFA: + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021F6008: .word 0x000005DD + thumb_func_end ov5_021F5F24 + + .rodata + + + .global Unk_ov5_02200B7C +Unk_ov5_02200B7C: ; 0x02200B7C + .incbin "incbin/overlay5_rodata.bin", 0x8268, 0x8270 - 0x8268 + + .global Unk_ov5_02200B84 +Unk_ov5_02200B84: ; 0x02200B84 + .incbin "incbin/overlay5_rodata.bin", 0x8270, 0x8284 - 0x8270 + + .global Unk_ov5_02200B98 +Unk_ov5_02200B98: ; 0x02200B98 + .incbin "incbin/overlay5_rodata.bin", 0x8284, 0x8298 - 0x8284 + + .global Unk_ov5_02200BAC +Unk_ov5_02200BAC: ; 0x02200BAC + .incbin "incbin/overlay5_rodata.bin", 0x8298, 0x82AC - 0x8298 + + .global Unk_ov5_02200BC0 +Unk_ov5_02200BC0: ; 0x02200BC0 + .incbin "incbin/overlay5_rodata.bin", 0x82AC, 0x18 + diff --git a/asm/ov5_021F600C.s b/asm/ov5_021F600C.s new file mode 100644 index 000000000..2620d99d0 --- /dev/null +++ b/asm/ov5_021F600C.s @@ -0,0 +1,243 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F600C +ov5_021F600C: ; 0x021F600C + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #4 + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F6038 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F600C + + thumb_func_start ov5_021F6028 +ov5_021F6028: ; 0x021F6028 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F6074 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F6028 + + thumb_func_start ov5_021F6038 +ov5_021F6038: ; 0x021F6038 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #4 + mov r2, #0x57 + bl ov5_021DF9E0 + ldr r0, [r4, #0] + mov r1, #3 + mov r2, #6 + mov r3, #1 + bl ov5_021DFA3C + mov r0, #3 + str r0, [sp] + mov r3, #0 + mov r1, #4 + ldr r0, _021F6070 ; =0x02200BEC + str r3, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + add r2, r1, #0 + bl ov5_021DF864 + add sp, #0xc + pop {r3, r4, pc} + nop +_021F6070: .word 0x02200BEC + thumb_func_end ov5_021F6038 + + thumb_func_start ov5_021F6074 +ov5_021F6074: ; 0x021F6074 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #4 + bl ov5_021DFA08 + ldr r0, [r4, #0] + mov r1, #3 + bl ov5_021DFA7C + ldr r0, [r4, #0] + mov r1, #4 + bl ov5_021DF9D4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F6074 + + thumb_func_start ov5_021F6094 +ov5_021F6094: ; 0x021F6094 + push {r4, r5, lr} + sub sp, #0x24 + add r5, r0, #0 + bl ov5_021DF578 + add r4, r0, #0 + add r0, r5, #0 + bl sub_02062C00 + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #0x16 + str r4, [sp, #0x18] + bl ov5_021DF55C + str r0, [sp, #0x1c] + add r1, sp, #8 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r5, #0 + mov r1, #2 + str r5, [sp, #0x20] + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F60E0 ; =0x02200BD8 + add r0, r4, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x24 + pop {r4, r5, pc} + nop +_021F60E0: .word 0x02200BD8 + thumb_func_end ov5_021F6094 + + thumb_func_start ov5_021F60E4 +ov5_021F60E4: ; 0x021F60E4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r2, sp, #0 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r5, r0, #0 + str r1, [r2, #8] + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x1c] + bl sub_02062910 + str r0, [r4, #4] + ldr r0, [r4, #0x1c] + bl sub_02062918 + str r0, [r4, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0x14] + mov r1, #4 + add r2, sp, #0 + bl ov5_021DF84C + str r0, [r4, #0x20] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F60E4 + + thumb_func_start ov5_021F6134 +ov5_021F6134: ; 0x021F6134 + ldr r3, _021F613C ; =sub_020211FC + ldr r0, [r1, #0x20] + bx r3 + nop +_021F613C: .word sub_020211FC + thumb_func_end ov5_021F6134 + + thumb_func_start ov5_021F6140 +ov5_021F6140: ; 0x021F6140 + push {r4, lr} + add r2, r1, #0 + add r4, r0, #0 + ldr r0, [r2, #0x1c] + ldr r1, [r2, #4] + ldr r2, [r2, #8] + bl sub_02062764 + cmp r0, #0 + bne _021F615A + add r0, r4, #0 + bl ov5_021DF74C +_021F615A: + pop {r4, pc} + thumb_func_end ov5_021F6140 + + thumb_func_start ov5_021F615C +ov5_021F615C: ; 0x021F615C + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r1, #0 + ldr r4, [r5, #0x1c] + ldr r1, [r5, #4] + add r6, r0, #0 + ldr r2, [r5, #8] + add r0, r4, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F617E + add r0, r6, #0 + bl ov5_021DF74C + add sp, #0x18 + pop {r4, r5, r6, pc} +_021F617E: + add r0, r4, #0 + add r1, sp, #0xc + bl sub_02063050 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02063078 + ldr r1, [sp, #0xc] + ldr r0, [sp] + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r0, [sp, #4] + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [sp, #8] + add r1, r1, r0 + mov r0, #3 + lsl r0, r0, #0xe + str r1, [sp, #0x14] + add r0, r1, r0 + str r0, [sp, #0x14] + ldr r0, [r5, #0x20] + add r1, sp, #0xc + bl sub_020212A8 + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov5_021F615C + + .rodata + + + .global Unk_ov5_02200BD8 +Unk_ov5_02200BD8: ; 0x02200BD8 + .incbin "incbin/overlay5_rodata.bin", 0x82C4, 0x82D8 - 0x82C4 + + .global Unk_ov5_02200BEC +Unk_ov5_02200BEC: ; 0x02200BEC + .incbin "incbin/overlay5_rodata.bin", 0x82D8, 0x18 + diff --git a/asm/ov5_021F61BC.s b/asm/ov5_021F61BC.s new file mode 100644 index 000000000..d815983d3 --- /dev/null +++ b/asm/ov5_021F61BC.s @@ -0,0 +1,372 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F61BC +ov5_021F61BC: ; 0x021F61BC + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x6c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F61E8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F61BC + + thumb_func_start ov5_021F61D8 +ov5_021F61D8: ; 0x021F61D8 + push {r4, lr} + add r4, r0, #0 + bl ov5_021F620C + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F61D8 + + thumb_func_start ov5_021F61E8 +ov5_021F61E8: ; 0x021F61E8 + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x50 + bl ov5_021DFB00 + add r0, r4, #0 + add r0, #0x18 + add r1, r4, #4 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F61E8 + + thumb_func_start ov5_021F620C +ov5_021F620C: ; 0x021F620C + ldr r3, _021F6214 ; =sub_0207395C + add r0, r0, #4 + bx r3 + nop +_021F6214: .word sub_0207395C + thumb_func_end ov5_021F620C + + thumb_func_start ov5_021F6218 +ov5_021F6218: ; 0x021F6218 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r2, sp, #8 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r5, r0, #0 + str r1, [r2, #8] + bl sub_0205EB3C + add r4, r0, #0 + bl ov5_021DF578 + add r6, r0, #0 + mov r1, #0xe + str r6, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + add r0, r4, #0 + mov r1, #2 + str r5, [sp, #0x1c] + bl sub_02062758 + add r1, sp, #0x14 + str r1, [sp] + str r0, [sp, #4] + ldr r1, _021F6260 ; =0x02200C10 + add r0, r6, #0 + add r2, sp, #8 + mov r3, #0 + bl ov5_021DF72C + add sp, #0x20 + pop {r4, r5, r6, pc} + nop +_021F6260: .word 0x02200C10 + thumb_func_end ov5_021F6218 + + thumb_func_start ov5_021F6264 +ov5_021F6264: ; 0x021F6264 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_020715BC + add r4, r0, #0 + add r3, r4, #0 + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x24 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #8] + bl sub_0205EB3C + mov r1, #0 + mvn r1, r1 + add r4, r0, #0 + str r1, [r5, #4] + bl sub_02062910 + str r0, [r5, #0x14] + add r0, r4, #0 + bl sub_02062918 + str r0, [r5, #0x18] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F6264 + + thumb_func_start ov5_021F629C +ov5_021F629C: ; 0x021F629C + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F629C + + thumb_func_start ov5_021F62A0 +ov5_021F62A0: ; 0x021F62A0 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r1, #0 + str r0, [sp] + ldr r0, [r5, #0x2c] + str r0, [sp, #4] + bl sub_0205EB3C + ldr r1, [r5, #0x14] + ldr r2, [r5, #0x18] + add r6, r0, #0 + bl sub_02062764 + cmp r0, #0 + bne _021F62C8 + ldr r0, [sp] + bl ov5_021DF74C + add sp, #0x24 + pop {r4, r5, r6, r7, pc} +_021F62C8: + ldr r7, [r5, #4] + add r0, r6, #0 + bl sub_02062BE8 + strb r0, [r5, #8] + ldrb r0, [r5, #8] + bl ov5_021F6414 + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0] + ldr r4, [r5, #4] + sub r0, r0, #1 + cmp r4, r0 + beq _021F62F0 + ldr r0, [sp, #4] + bl sub_0205EA78 + cmp r4, r0 + beq _021F62FE +_021F62F0: + mov r0, #0 + str r0, [r5, #0x1c] + str r0, [r5, #0x20] + mov r0, #1 + add sp, #0x24 + str r0, [r5, #0] + pop {r4, r5, r6, r7, pc} +_021F62FE: + cmp r7, r4 + beq _021F6308 + mov r0, #0 + str r0, [r5, #0x1c] + str r0, [r5, #0x20] +_021F6308: + add r0, r6, #0 + bl sub_02063020 + add r4, r0, #0 + ldr r0, [r5, #4] + bl sub_0206419C + add r7, r0, #0 + add r0, r6, #0 + bl sub_02063040 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_020641A8 + add r2, r0, #0 + ldr r1, [sp, #8] + add r0, r4, r7 + add r1, r1, r2 + add r2, sp, #0xc + bl sub_02064450 + add r0, r6, #0 + add r1, sp, #0x18 + bl sub_02063050 + ldr r0, [sp, #0x1c] + add r1, sp, #0xc + str r0, [sp, #0x10] + ldr r0, [sp] + bl sub_020715D4 + ldr r0, [r5, #0x1c] + add r0, r0, #1 + str r0, [r5, #0x1c] + cmp r0, #0xf + ble _021F6368 + mov r0, #0 + str r0, [r5, #0x1c] + ldr r0, [r5, #0x20] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + str r0, [r5, #0x20] +_021F6368: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021F62A0 + + thumb_func_start ov5_021F636C +ov5_021F636C: ; 0x021F636C + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r3, r1, #0 + add r6, r0, #0 + ldr r0, [r3, #0] + cmp r0, #1 + beq _021F6408 + mov r0, #0 + ldr r1, [r3, #4] + mvn r0, r0 + cmp r1, r0 + beq _021F6408 + ldr r5, _021F640C ; =0x02200C04 + add r4, sp, #0 + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + mov r7, #0x18 + str r0, [r4, #0] + ldr r1, [r3, #4] + ldr r4, _021F6410 ; =0x02200C24 + add r0, r1, #0 + mul r0, r7 + add r0, r4, r0 + ldr r5, [r3, #0x28] + ldr r4, [r3, #0x20] + mov r3, #0xc + mul r3, r4 + mov r2, #0 + add r5, #0x18 + add r4, r0, r3 + cmp r1, #3 + bhi _021F63CE + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F63BA: ; jump table + .short _021F63C2 - _021F63BA - 2 ; case 0 + .short _021F63CE - _021F63BA - 2 ; case 1 + .short _021F63C6 - _021F63BA - 2 ; case 2 + .short _021F63CC - _021F63BA - 2 ; case 3 +_021F63C2: + mov r2, #0xb4 + b _021F63CE +_021F63C6: + add r2, r7, #0 + add r2, #0xf6 + b _021F63CE +_021F63CC: + mov r2, #0x5a +_021F63CE: + mov r1, #0 + lsl r2, r2, #0x10 + add r0, sp, #0x18 + lsr r2, r2, #0x10 + add r3, r1, #0 + bl sub_0201E2E0 + add r0, r6, #0 + add r1, sp, #0xc + bl sub_020715E4 + ldr r1, [sp, #0xc] + ldr r0, [r4, #0] + add r2, sp, #0 + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r0, [r4, #4] + add r3, sp, #0x18 + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [r4, #8] + add r0, r1, r0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, sp, #0xc + bl sub_02073BA4 +_021F6408: + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F640C: .word 0x02200C04 +_021F6410: .word 0x02200C24 + thumb_func_end ov5_021F636C + + thumb_func_start ov5_021F6414 +ov5_021F6414: ; 0x021F6414 + push {r4, lr} + add r4, r0, #0 + bl sub_0205DB10 + cmp r0, #0 + beq _021F6424 + mov r0, #0 + pop {r4, pc} +_021F6424: + add r0, r4, #0 + bl sub_0205DB1C + cmp r0, #0 + beq _021F6432 + mov r0, #1 + pop {r4, pc} +_021F6432: + add r0, r4, #0 + bl sub_0205DB04 + cmp r0, #0 + beq _021F6440 + mov r0, #2 + pop {r4, pc} +_021F6440: + add r0, r4, #0 + bl sub_0205DAF8 + cmp r0, #0 + beq _021F644E + mov r0, #3 + pop {r4, pc} +_021F644E: + mov r0, #0 + mvn r0, r0 + pop {r4, pc} + thumb_func_end ov5_021F6414 + + .rodata + + + .global Unk_ov5_02200C04 +Unk_ov5_02200C04: ; 0x02200C04 + .incbin "incbin/overlay5_rodata.bin", 0x82F0, 0x82FC - 0x82F0 + + .global Unk_ov5_02200C10 +Unk_ov5_02200C10: ; 0x02200C10 + .incbin "incbin/overlay5_rodata.bin", 0x82FC, 0x8310 - 0x82FC + + .global Unk_ov5_02200C24 +Unk_ov5_02200C24: ; 0x02200C24 + .incbin "incbin/overlay5_rodata.bin", 0x8310, 0x60 + diff --git a/asm/ov5_021F6454.s b/asm/ov5_021F6454.s new file mode 100644 index 000000000..18341c295 --- /dev/null +++ b/asm/ov5_021F6454.s @@ -0,0 +1,2482 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F6454 +ov5_021F6454: ; 0x021F6454 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + str r0, [sp, #0x1c] + add r0, #0x80 + ldr r6, [r0, #0] + mov r1, #0xf + add r0, r6, #0 + bl sub_0203F098 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x1c] + bl sub_0203E838 + add r1, r0, #0 + ldr r0, [sp, #0x1c] + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + str r0, [sp, #0x30] + ldr r0, [sp, #0x1c] + bl sub_0203E838 + add r1, r0, #0 + ldr r0, [sp, #0x1c] + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + str r0, [sp, #0x34] + ldr r0, [sp, #0x1c] + bl sub_0203E838 + add r4, r0, #0 + ldr r0, [sp, #0x1c] + bl sub_0203E838 + add r7, r0, #0 + ldr r0, [sp, #0x1c] + bl sub_0203E838 + str r0, [sp, #0x38] + ldr r0, [sp, #0x1c] + mov r2, #0x67 + str r4, [r0, #0x64] + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x20 + bl sub_0200B144 + str r0, [sp, #0x20] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0203F118 + add r4, r0, #0 + ldr r0, [sp, #0x1c] + mov r1, #1 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F098 + add r5, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl sub_0203F118 + add r7, r0, #0 + ldr r1, [sp, #0x38] + add r0, r6, #0 + bl sub_0203F118 + mov r2, #1 + str r2, [sp] + ldr r1, [sp, #0x2c] + str r4, [sp, #4] + ldr r1, [r1, #0] + mov r3, #0 + str r1, [sp, #8] + ldr r1, [sp, #0x20] + str r5, [sp, #0xc] + str r1, [sp, #0x10] + str r7, [sp, #0x14] + str r0, [sp, #0x18] + add r0, r6, #0 + mov r1, #0x14 + bl ov5_021F6704 + add r7, r0, #0 + ldr r0, [r6, #0xc] + mov r1, #0xb + add r2, sp, #0x44 + bl sub_020308A0 + str r0, [sp, #0x28] + ldr r0, [sp, #0x44] + cmp r0, #1 + bne _021F6570 + ldr r1, [sp, #0x34] + mov r0, #0x20 + lsl r2, r1, #1 + ldr r1, _021F65C4 ; =0x0220210C + ldrh r1, [r1, r2] + add r2, sp, #0x40 + bl ov5_021F65FC + str r0, [sp, #0x24] + ldr r0, [sp, #0x40] + mov r4, #0 + cmp r0, #0 + ble _021F656A + ldr r0, [sp, #0x30] + ldr r5, [sp, #0x24] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x3c] +_021F653E: + ldr r0, [sp, #0x3c] + bl sub_0205E584 + add r2, r0, #0 + ldrh r3, [r5] + ldr r0, [r6, #0xc] + ldr r1, [sp, #0x28] + bl sub_020308BC + cmp r0, #0 + beq _021F6560 + ldrh r1, [r5] + add r0, r7, #0 + mov r2, #0xff + add r3, r1, #0 + bl ov5_021F6760 +_021F6560: + ldr r0, [sp, #0x40] + add r4, r4, #1 + add r5, r5, #2 + cmp r4, r0 + blt _021F653E +_021F656A: + ldr r0, [sp, #0x24] + bl sub_020181C4 +_021F6570: + ldr r0, [sp, #0x28] + cmp r0, #0 + beq _021F657A + bl sub_020181C4 +_021F657A: + ldr r2, _021F65C8 ; =0x00000169 + mov r0, #1 + mov r1, #0x1a + mov r3, #0x20 + bl sub_0200B144 + add r4, r0, #0 + add r0, r7, #0 + add r1, r4, #0 + bl ov5_021F661C + ldr r3, _021F65CC ; =0x0000FFFE + add r0, r7, #0 + mov r1, #0xc + mov r2, #0xff + bl ov5_021F6760 + add r0, r4, #0 + bl sub_0200B190 + ldr r1, [sp, #0x20] + add r0, r7, #0 + bl ov5_021F661C + add r0, r7, #0 + bl ov5_021F6768 + ldr r0, [sp, #0x1c] + ldr r1, _021F65D0 ; =ov5_021F65D4 + bl sub_0203E764 + ldr r0, [sp, #0x20] + bl sub_0200B190 + mov r0, #1 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F65C4: .word 0x0220210C +_021F65C8: .word 0x00000169 +_021F65CC: .word 0x0000FFFE +_021F65D0: .word ov5_021F65D4 + thumb_func_end ov5_021F6454 + + thumb_func_start ov5_021F65D4 +ov5_021F65D4: ; 0x021F65D4 + push {r3, lr} + add r1, r0, #0 + ldr r1, [r1, #0x64] + add r0, #0x80 + lsl r1, r1, #0x10 + ldr r0, [r0, #0] + lsr r1, r1, #0x10 + bl sub_0203F118 + ldrh r1, [r0] + ldr r0, _021F65F8 ; =0x0000EEEE + cmp r1, r0 + beq _021F65F2 + mov r0, #1 + pop {r3, pc} +_021F65F2: + mov r0, #0 + pop {r3, pc} + nop +_021F65F8: .word 0x0000EEEE + thumb_func_end ov5_021F65D4 + + thumb_func_start ov5_021F65FC +ov5_021F65FC: ; 0x021F65FC + push {r3, r4, lr} + sub sp, #0xc + add r4, r2, #0 + mov r2, #0 + add r3, r0, #0 + str r2, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0x4b + bl sub_02007068 + ldr r1, [sp, #8] + lsr r1, r1, #1 + str r1, [r4, #0] + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov5_021F65FC + + thumb_func_start ov5_021F661C +ov5_021F661C: ; 0x021F661C + mov r2, #0x7f + lsl r2, r2, #2 + str r1, [r0, r2] + bx lr + thumb_func_end ov5_021F661C + + thumb_func_start ov5_021F6624 +ov5_021F6624: ; 0x021F6624 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r2, #0 + mov r2, #0x7f + ldr r1, [sp, #0x2c] + lsl r2, r2, #2 + str r1, [r6, r2] + add r1, r2, #0 + add r1, #0xb + add r5, r3, #0 + ldrb r1, [r6, r1] + mov r3, #2 + bic r1, r3 + add r3, r2, #0 + add r3, #0xb + strb r1, [r6, r3] + ldr r3, [sp, #0x24] + add r1, r2, #4 + str r3, [r6, r1] + str r0, [r6, #0] + add r0, r2, #0 + ldr r1, [sp, #0x20] + add r0, #0x14 + str r1, [r6, r0] + add r0, r2, #0 + add r0, #0x14 + ldr r0, [r6, r0] + mov r1, #0 + strh r1, [r0] + add r0, r2, #0 + ldr r3, [sp, #0x30] + add r0, #0x18 + str r3, [r6, r0] + add r0, r2, #0 + ldr r3, [sp, #0x34] + add r0, #0x1c + str r3, [r6, r0] + add r0, r2, #0 + add r0, #0xb + ldrb r4, [r6, r0] + mov r0, #1 + bic r4, r0 + add r0, sp, #8 + ldrb r3, [r0, #0x14] + mov r0, #1 + and r0, r3 + add r3, r4, #0 + orr r3, r0 + add r0, r2, #0 + add r0, #0xb + strb r3, [r6, r0] + add r0, sp, #8 + add r3, r2, #0 + ldrb r0, [r0, #0x10] + add r3, #0xa + strb r0, [r6, r3] + add r3, r2, #0 + add r3, #0xc + strb r7, [r6, r3] + add r3, r2, #0 + add r3, #0xd + strb r5, [r6, r3] + add r3, r2, #0 + add r3, #0xf + strb r1, [r6, r3] + ldr r3, [sp, #0x28] + add r2, #8 + str r3, [r6, #0x18] + mov r3, #3 + strb r3, [r6, r2] + ldr r2, _021F66F8 ; =0x000006F4 + ldr r7, _021F66FC ; =0x00000604 + strh r0, [r6, r2] + add r2, r6, #0 + add r3, r6, #0 + add r5, r1, #0 + mov r0, #0xff +_021F66BE: + mov r4, #0x91 + lsl r4, r4, #2 + str r5, [r2, r4] + add r4, r4, #4 + str r5, [r2, r4] + strh r0, [r3, r7] + add r1, r1, #1 + add r2, #8 + add r3, r3, #2 + cmp r1, #0x78 + blt _021F66BE + add r4, r6, #0 + mov r7, #0x50 +_021F66D8: + add r0, r7, #0 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x1c] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #0x78 + blt _021F66D8 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r1, _021F6700 ; =0x0000EEEE + ldr r0, [r6, r0] + strh r1, [r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_021F66F8: .word 0x000006F4 +_021F66FC: .word 0x00000604 +_021F6700: .word 0x0000EEEE + thumb_func_end ov5_021F6624 + + thumb_func_start ov5_021F6704 +ov5_021F6704: ; 0x021F6704 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r1, #0 + add r6, r0, #0 + ldr r1, _021F675C ; =0x000006F8 + mov r0, #4 + str r2, [sp, #0x20] + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021F6722 + add sp, #0x24 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021F6722: + ldr r2, _021F675C ; =0x000006F8 + mov r1, #0 + bl sub_020D5124 + str r5, [sp] + add r0, sp, #0x28 + ldrb r0, [r0, #0x10] + add r1, r4, #0 + add r2, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x3c] + str r0, [sp, #8] + ldr r0, [sp, #0x40] + str r0, [sp, #0xc] + ldr r0, [sp, #0x44] + str r0, [sp, #0x10] + ldr r0, [sp, #0x48] + str r0, [sp, #0x14] + ldr r0, [sp, #0x4c] + str r0, [sp, #0x18] + ldr r0, [sp, #0x50] + str r0, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r0, r6, #0 + bl ov5_021F6624 + add r0, r4, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F675C: .word 0x000006F8 + thumb_func_end ov5_021F6704 + + thumb_func_start ov5_021F6760 +ov5_021F6760: ; 0x021F6760 + push {r3, lr} + bl ov5_021F6830 + pop {r3, pc} + thumb_func_end ov5_021F6760 + + thumb_func_start ov5_021F6768 +ov5_021F6768: ; 0x021F6768 + push {r3, r4, lr} + sub sp, #0x14 + ldr r3, _021F6824 ; =0x0000020B + add r4, r0, #0 + ldrb r1, [r4, r3] + cmp r1, #8 + bls _021F67A0 + sub r0, r3, #2 + ldrb r0, [r4, r0] + add r1, r4, #0 + sub r3, r3, #3 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + ldrb r3, [r4, r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + b _021F67CA +_021F67A0: + sub r0, r3, #2 + ldrb r0, [r4, r0] + sub r3, r3, #3 + mov r2, #3 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + lsl r0, r1, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r4, #0 + ldrb r3, [r4, r3] + ldr r0, [r0, #8] + add r1, #8 + bl sub_0201A7E8 +_021F67CA: + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r2, _021F6828 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r4, #0 + ldr r2, _021F6828 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + bl ov5_021F68BC + mov r2, #0x87 + lsl r2, r2, #2 + add r1, r2, #0 + add r0, r4, r2 + sub r1, #8 + sub r2, r2, #4 + ldr r1, [r4, r1] + ldr r2, [r4, r2] + ldrh r1, [r1] + ldrh r2, [r2] + mov r3, #4 + bl sub_0200112C + mov r1, #0x8f + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, _021F682C ; =ov5_021F6A34 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_021F6824: .word 0x0000020B +_021F6828: .word 0x000003D9 +_021F682C: .word ov5_021F6A34 + thumb_func_end ov5_021F6768 + + thumb_func_start ov5_021F6830 +ov5_021F6830: ; 0x021F6830 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r0, #0x50 + mov r1, #4 + add r7, r2, #0 + add r4, r3, #0 + bl sub_02023790 + add r6, r0, #0 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp] + add r2, r6, #0 + bl sub_0200B1B8 + mov r1, #2 + lsl r1, r1, #8 + ldr r0, [r5, r1] + add r1, #0xb + ldrb r1, [r5, r1] + add r2, r6, #0 + lsl r1, r1, #2 + add r1, r5, r1 + ldr r1, [r1, #0x1c] + bl sub_0200C388 + ldr r2, _021F68B4 ; =0x0000020B + ldrb r1, [r5, r2] + add r2, #0x39 + lsl r0, r1, #2 + add r0, r5, r0 + lsl r1, r1, #3 + ldr r0, [r0, #0x1c] + add r1, r5, r1 + str r0, [r1, r2] + add r0, r6, #0 + bl sub_020237BC + cmp r4, #0xfa + ldr r0, _021F68B4 ; =0x0000020B + bne _021F6896 + ldrb r1, [r5, r0] + mov r2, #2 + mvn r2, r2 + lsl r1, r1, #3 + add r1, r5, r1 + add r0, #0x3d + str r2, [r1, r0] + b _021F68A0 +_021F6896: + ldrb r1, [r5, r0] + add r0, #0x3d + lsl r1, r1, #3 + add r1, r5, r1 + str r4, [r1, r0] +_021F68A0: + ldr r1, _021F68B4 ; =0x0000020B + ldrb r0, [r5, r1] + lsl r0, r0, #1 + add r2, r5, r0 + ldr r0, _021F68B8 ; =0x00000604 + strh r7, [r2, r0] + ldrb r0, [r5, r1] + add r0, r0, #1 + strb r0, [r5, r1] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F68B4: .word 0x0000020B +_021F68B8: .word 0x00000604 + thumb_func_end ov5_021F6830 + + thumb_func_start ov5_021F68BC +ov5_021F68BC: ; 0x021F68BC + push {r4, r5} + mov r3, #0x91 + lsl r3, r3, #2 + add r1, r3, #0 + add r2, r0, r3 + sub r1, #0x28 + str r2, [r0, r1] + add r1, r3, #0 + ldr r2, _021F69B8 ; =ov5_021F69F0 + sub r1, #0x24 + str r2, [r0, r1] + add r1, r3, #0 + ldr r2, _021F69BC ; =ov5_021F69CC + sub r1, #0x20 + str r2, [r0, r1] + add r2, r0, #0 + add r1, r3, #0 + add r2, #8 + sub r1, #0x1c + str r2, [r0, r1] + add r1, r3, #0 + sub r1, #0x39 + ldrb r2, [r0, r1] + add r1, r3, #0 + sub r1, #0x18 + strh r2, [r0, r1] + add r1, r3, #0 + mov r2, #8 + sub r1, #0x16 + strh r2, [r0, r1] + add r1, r3, #0 + mov r2, #1 + sub r1, #0x14 + strb r2, [r0, r1] + add r1, r3, #0 + mov r4, #0xc + sub r1, #0x13 + strb r4, [r0, r1] + add r1, r3, #0 + mov r4, #2 + sub r1, #0x12 + strb r4, [r0, r1] + add r1, r3, #0 + sub r1, #0x11 + ldrb r4, [r0, r1] + mov r1, #0xf + bic r4, r1 + orr r4, r2 + add r2, r3, #0 + sub r2, #0x11 + strb r4, [r0, r2] + add r2, r3, #0 + sub r2, #0x11 + ldrb r5, [r0, r2] + mov r2, #0xf0 + mov r4, #0x10 + bic r5, r2 + orr r5, r4 + add r4, r3, #0 + sub r4, #0x11 + strb r5, [r0, r4] + add r4, r3, #0 + sub r4, #0x10 + ldrb r4, [r0, r4] + bic r4, r1 + mov r1, #0xf + orr r4, r1 + add r1, r3, #0 + sub r1, #0x10 + strb r4, [r0, r1] + add r1, r3, #0 + sub r1, #0x10 + ldrb r4, [r0, r1] + mov r1, #0x20 + bic r4, r2 + add r2, r4, #0 + orr r2, r1 + add r1, r3, #0 + sub r1, #0x10 + strb r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + mov r1, #7 + bic r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + mov r1, #0x78 + bic r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + ldr r1, _021F69C0 ; =0xFFFFFE7F + and r2, r1 + mov r1, #0x80 + orr r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + ldr r1, _021F69C4 ; =0xFFFF81FF + and r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + add r1, r3, #0 + sub r1, #0xe + ldrh r2, [r0, r1] + ldr r1, _021F69C8 ; =0xFFFF7FFF + and r2, r1 + add r1, r3, #0 + sub r1, #0xe + strh r2, [r0, r1] + sub r3, #0xc + str r0, [r0, r3] + pop {r4, r5} + bx lr + ; .align 2, 0 +_021F69B8: .word ov5_021F69F0 +_021F69BC: .word ov5_021F69CC +_021F69C0: .word 0xFFFFFE7F +_021F69C4: .word 0xFFFF81FF +_021F69C8: .word 0xFFFF7FFF + thumb_func_end ov5_021F68BC + + thumb_func_start ov5_021F69CC +ov5_021F69CC: ; 0x021F69CC + push {r3, lr} + mov r2, #2 + mvn r2, r2 + cmp r1, r2 + bne _021F69E2 + mov r1, #3 + mov r2, #0xf + mov r3, #4 + bl sub_0200147C + pop {r3, pc} +_021F69E2: + mov r1, #1 + mov r2, #0xf + mov r3, #2 + bl sub_0200147C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F69CC + + thumb_func_start ov5_021F69F0 +ov5_021F69F0: ; 0x021F69F0 + push {r3, r4, r5, lr} + mov r2, #0 + add r1, sp, #0 + strh r2, [r1, #2] + strh r2, [r1] + mov r1, #0x13 + add r5, r0, #0 + bl sub_02001504 + add r1, sp, #0 + add r4, r0, #0 + add r0, r5, #0 + add r1, #2 + add r2, sp, #0 + bl sub_020014DC + mov r1, #0x85 + lsl r1, r1, #2 + ldr r3, [r4, r1] + cmp r3, #0 + beq _021F6A30 + add r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021F6A30 + add r0, sp, #0 + ldrh r2, [r0, #2] + strh r2, [r3] + ldrh r2, [r0] + add r0, r1, #4 + ldr r0, [r4, r0] + strh r2, [r0] +_021F6A30: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F69F0 + + thumb_func_start ov5_021F6A34 +ov5_021F6A34: ; 0x021F6A34 + push {r4, r5, r6, lr} + mov r0, #0x81 + add r5, r1, #0 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + cmp r1, #0 + beq _021F6A48 + sub r1, r1, #1 + strb r1, [r5, r0] + pop {r4, r5, r6, pc} +_021F6A48: + bl sub_0200F2AC + cmp r0, #0 + beq _021F6AC2 + mov r0, #0x8f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02001288 + add r4, r0, #0 + mov r0, #0x8f + ldr r1, _021F6AC4 ; =0x000006F4 + lsl r0, r0, #2 + ldrh r6, [r5, r1] + ldr r0, [r5, r0] + add r1, r5, r1 + bl sub_020014D0 + ldr r0, _021F6AC4 ; =0x000006F4 + ldrh r0, [r5, r0] + cmp r6, r0 + beq _021F6A7A + ldr r0, _021F6AC8 ; =0x000005DC + bl sub_02005748 +_021F6A7A: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _021F6A8A + add r0, r0, #1 + cmp r4, r0 + beq _021F6AC2 + b _021F6AAE +_021F6A8A: + ldr r0, _021F6ACC ; =0x00000207 + ldrb r0, [r5, r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021F6AC2 + ldr r0, _021F6AC8 ; =0x000005DC + bl sub_02005748 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r1, _021F6AD0 ; =0x0000FFFE + ldr r0, [r5, r0] + strh r1, [r0] + add r0, r5, #0 + bl ov5_021F6AD4 + pop {r4, r5, r6, pc} +_021F6AAE: + ldr r0, _021F6AC8 ; =0x000005DC + bl sub_02005748 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r5, r0] + strh r4, [r0] + add r0, r5, #0 + bl ov5_021F6AD4 +_021F6AC2: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F6AC4: .word 0x000006F4 +_021F6AC8: .word 0x000005DC +_021F6ACC: .word 0x00000207 +_021F6AD0: .word 0x0000FFFE + thumb_func_end ov5_021F6A34 + + thumb_func_start ov5_021F6AD4 +ov5_021F6AD4: ; 0x021F6AD4 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _021F6B34 ; =0x000005DC + bl sub_02005748 + mov r0, #0x8f + lsl r0, r0, #2 + mov r1, #0 + ldr r0, [r6, r0] + add r2, r1, #0 + bl sub_02001384 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + add r0, #8 + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_021F6B04: + ldr r0, [r5, #0x1c] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x78 + blt _021F6B04 + ldr r0, _021F6B38 ; =0x00000207 + ldrb r1, [r6, r0] + lsl r1, r1, #0x1e + lsr r1, r1, #0x1f + cmp r1, #1 + bne _021F6B26 + sub r0, #0xb + ldr r0, [r6, r0] + bl sub_0200B190 +_021F6B26: + ldr r0, [r6, #4] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F6B34: .word 0x000005DC +_021F6B38: .word 0x00000207 + thumb_func_end ov5_021F6AD4 + + thumb_func_start ov5_021F6B3C +ov5_021F6B3C: ; 0x021F6B3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + add r1, r5, #0 + add r1, #0x80 + ldr r1, [r1, #0] + str r1, [sp] + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + str r0, [sp, #4] + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r5, #0x80 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_0203F118 + add r7, r0, #0 + ldr r0, [sp] + ldr r0, [r0, #0xc] + bl sub_0207A268 + ldr r1, [sp, #4] + bl sub_0207A0FC + add r5, r0, #0 + mov r1, #0x46 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0x47 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #0x48 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r1, #0x49 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x14] + add r0, r5, #0 + mov r1, #0x4a + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x18] + add r0, r5, #0 + mov r1, #0x4b + mov r2, #0 + bl sub_02074470 + mov r2, #0 + str r0, [sp, #0x1c] + strh r2, [r4] + add r0, sp, #8 +_021F6BF2: + lsl r3, r2, #2 + ldrh r1, [r4] + ldr r3, [r0, r3] + add r1, r1, r3 + strh r1, [r4] + add r1, r2, #1 + lsl r1, r1, #0x18 + lsr r2, r1, #0x18 + cmp r2, #6 + blo _021F6BF2 + mov r0, #0 + strh r0, [r6] + ldr r0, [sp, #8] + mov r5, #1 + strh r0, [r7] +_021F6C10: + lsl r1, r5, #2 + add r0, sp, #8 + ldr r4, [r0, r1] + ldrh r0, [r6] + lsl r1, r0, #2 + add r0, sp, #8 + ldr r0, [r0, r1] + cmp r0, r4 + bhs _021F6C28 + strh r5, [r6] + strh r4, [r7] + b _021F6C42 +_021F6C28: + cmp r0, r4 + bne _021F6C42 + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r2, r0, #0x1f + sub r2, r2, r1 + mov r0, #0x1f + ror r2, r0 + add r0, r1, r2 + bne _021F6C42 + strh r5, [r6] + strh r4, [r7] +_021F6C42: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #6 + blo _021F6C10 + ldrh r0, [r6] + lsl r1, r0, #1 + ldr r0, _021F6C5C ; =0x02200C84 + ldrh r0, [r0, r1] + strh r0, [r6] + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F6C5C: .word 0x02200C84 + thumb_func_end ov5_021F6B3C + + thumb_func_start ov5_021F6C60 +ov5_021F6C60: ; 0x021F6C60 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + mov r1, #0 + add r4, r0, #0 + str r1, [sp, #8] + add r1, r4, #0 + add r1, #0x80 + ldr r1, [r1, #0] + str r1, [sp, #4] + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F118 + str r0, [sp] + ldr r0, [sp, #4] + ldr r0, [r0, #0xc] + bl sub_0207A268 + add r7, r0, #0 + bl sub_0207A0F8 + add r6, r0, #0 + mov r4, #0 + ldr r0, [sp] + cmp r6, #0 + strh r4, [r0] + ble _021F6CC2 + add r5, sp, #0x10 +_021F6C9E: + add r0, r7, #0 + add r1, r4, #0 + bl sub_0207A0FC + mov r1, #6 + mov r2, #0 + bl sub_02074470 + str r0, [r5, #0] + cmp r0, #0x70 + bne _021F6CBA + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] +_021F6CBA: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r6 + blt _021F6C9E +_021F6CC2: + ldr r0, [sp, #8] + cmp r0, #0 + ble _021F6D16 + ldr r0, [sp, #4] + ldr r0, [r0, #0xc] + bl sub_0207D990 + ldr r2, [sp, #8] + mov r1, #0x70 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + mov r3, #4 + bl sub_0207D570 + cmp r0, #0 + bne _021F6CEE + ldr r0, [sp] + mov r1, #0xff + strh r1, [r0] + add sp, #0x28 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021F6CEE: + mov r5, #0 + str r5, [sp, #0xc] + cmp r6, #0 + ble _021F6D16 + add r4, sp, #0x10 +_021F6CF8: + ldr r0, [r4, #0] + cmp r0, #0x70 + bne _021F6D0E + add r0, r7, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #6 + add r2, sp, #0xc + bl sub_02074B30 +_021F6D0E: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, r6 + blt _021F6CF8 +_021F6D16: + mov r5, #0 + cmp r6, #0 + ble _021F6D74 +_021F6D1C: + add r0, r7, #0 + add r1, r5, #0 + bl sub_0207A0FC + mov r1, #0x70 + mov r2, #0 + add r4, r0, #0 + bl sub_02074470 + cmp r0, #0 + ble _021F6D6E + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + ldr r1, _021F6D7C ; =0x000001DF + cmp r0, r1 + beq _021F6D5A + add r1, #8 + cmp r0, r1 + beq _021F6D52 + mov r1, #0x7b + lsl r1, r1, #2 + cmp r0, r1 + beq _021F6D66 + b _021F6D6E +_021F6D52: + add r0, r4, #0 + bl sub_02077A00 + b _021F6D6E +_021F6D5A: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_02077C20 + b _021F6D6E +_021F6D66: + add r0, r4, #0 + mov r1, #0 + bl sub_02077ACC +_021F6D6E: + add r5, r5, #1 + cmp r5, r6 + blt _021F6D1C +_021F6D74: + mov r0, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F6D7C: .word 0x000001DF + thumb_func_end ov5_021F6C60 + + thumb_func_start ov5_021F6D80 +ov5_021F6D80: ; 0x021F6D80 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x80 + ldr r5, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F118 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0207A268 + add r1, r7, #0 + bl sub_0207A0FC + mov r2, #0 + add r4, r0, #0 + strh r2, [r6] + cmp r7, #0xff + bne _021F6DC8 + add r0, r2, #0 + pop {r3, r4, r5, r6, r7, pc} +_021F6DC8: + mov r1, #6 + bl sub_02074470 + cmp r0, #0x70 + bne _021F6DFC + ldr r0, [r5, #0xc] + bl sub_0207D990 + mov r1, #0x70 + mov r2, #1 + mov r3, #4 + bl sub_0207D570 + cmp r0, #0 + bne _021F6DEE + mov r0, #0xff + strh r0, [r6] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021F6DEE: + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #6 + add r2, sp, #0 + bl sub_02074B30 +_021F6DFC: + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + ble _021F6E46 + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + ldr r2, _021F6E4C ; =0x000001DF + cmp r0, r2 + beq _021F6E32 + add r1, r2, #0 + add r1, #8 + cmp r0, r1 + beq _021F6E2A + add r2, #0xd + cmp r0, r2 + beq _021F6E3E + b _021F6E46 +_021F6E2A: + add r0, r4, #0 + bl sub_02077A00 + b _021F6E46 +_021F6E32: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_02077C20 + b _021F6E46 +_021F6E3E: + add r0, r4, #0 + mov r1, #0 + bl sub_02077ACC +_021F6E46: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F6E4C: .word 0x000001DF + thumb_func_end ov5_021F6D80 + + thumb_func_start ov5_021F6E50 +ov5_021F6E50: ; 0x021F6E50 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r1, r5, #0 + add r1, #0x80 + ldr r4, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r5, #0x80 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_0203F150 + add r1, sp, #0 + strh r0, [r1] + ldr r0, [r4, #0xc] + bl sub_0207A268 + add r1, r6, #0 + bl sub_0207A0FC + mov r1, #0x70 + add r2, sp, #0 + bl sub_02074B30 + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov5_021F6E50 + + thumb_func_start ov5_021F6E9C +ov5_021F6E9C: ; 0x021F6E9C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r1, r5, #0 + add r1, #0x80 + ldr r4, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + str r0, [sp] + add r0, r5, #0 + bl sub_0203E838 + add r5, #0x80 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_0203F118 + add r6, r0, #0 + mov r0, #0xff + strh r0, [r6] + ldr r0, [r4, #0xc] + mov r7, #0 + bl sub_0207A268 + str r0, [sp, #4] + bl sub_0207A0F8 + add r5, r7, #0 + str r0, [sp, #8] + cmp r0, #0 + ble _021F6F34 +_021F6EE6: + ldr r0, [sp, #4] + add r1, r5, #0 + bl sub_0207A0FC + add r4, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + ldr r2, [sp, #0xc] + ldr r1, _021F6F40 ; =0x000001DF + cmp r2, r1 + bne _021F6F2C + ldr r1, [sp, #0x10] + cmp r1, #0 + beq _021F6F2C + cmp r0, #0 + bne _021F6F2C + ldrh r0, [r6] + cmp r0, #0xff + bne _021F6F2A + strh r5, [r6] +_021F6F2A: + add r7, r7, #1 +_021F6F2C: + ldr r0, [sp, #8] + add r5, r5, #1 + cmp r5, r0 + blt _021F6EE6 +_021F6F34: + ldr r0, [sp] + strh r7, [r0] + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021F6F40: .word 0x000001DF + thumb_func_end ov5_021F6E9C + + thumb_func_start ov5_021F6F44 +ov5_021F6F44: ; 0x021F6F44 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r1, r5, #0 + add r1, #0x80 + ldr r4, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + str r0, [sp] + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r0, r5, #0 + bl sub_0203E838 + add r5, #0x80 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_0203F150 + add r7, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0207A268 + add r1, r6, #0 + bl sub_0207A0FC + ldr r2, [sp] + add r1, r7, #0 + add r5, r0, #0 + bl sub_02077C20 + ldr r0, [r4, #0xc] + bl sub_02027560 + add r1, r5, #0 + bl sub_0202736C + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F6F44 + + thumb_func_start ov5_021F6FC0 +ov5_021F6FC0: ; 0x021F6FC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x80 + ldr r6, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F118 + add r5, r0, #0 + ldr r0, [r6, #0xc] + bl sub_0207A268 + add r1, r7, #0 + bl sub_0207A0FC + mov r1, #5 + mov r2, #0 + add r6, r0, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r6, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _021F70AE + ldr r0, _021F70C4 ; =0x0000010A + cmp r4, r0 + bgt _021F7060 + bge _021F70A4 + cmp r4, #0x84 + bgt _021F704C + bge _021F70A4 + cmp r4, #0xe + bgt _021F7046 + add r0, r4, #0 + sub r0, #0xa + bmi _021F70AE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021F703C: ; jump table + .short _021F70A4 - _021F703C - 2 ; case 0 + .short _021F70A4 - _021F703C - 2 ; case 1 + .short _021F70AE - _021F703C - 2 ; case 2 + .short _021F70A4 - _021F703C - 2 ; case 3 + .short _021F70A4 - _021F703C - 2 ; case 4 +_021F7046: + cmp r4, #0x81 + beq _021F70A4 + b _021F70AE +_021F704C: + cmp r4, #0xeb + bgt _021F7058 + bge _021F70A4 + cmp r4, #0xca + beq _021F70A4 + b _021F70AE +_021F7058: + sub r0, r0, #1 + cmp r4, r0 + beq _021F70A4 + b _021F70AE +_021F7060: + add r1, r0, #0 + add r1, #0x6c + cmp r4, r1 + bgt _021F7086 + add r1, r0, #0 + add r1, #0x6c + cmp r4, r1 + bge _021F70A4 + add r1, r0, #2 + cmp r4, r1 + bgt _021F707E + add r0, r0, #2 + cmp r4, r0 + beq _021F70A4 + b _021F70AE +_021F707E: + add r0, #0x5e + cmp r4, r0 + beq _021F70A4 + b _021F70AE +_021F7086: + add r1, r0, #0 + add r1, #0x92 + cmp r4, r1 + bgt _021F709E + add r1, r0, #0 + add r1, #0x92 + cmp r4, r1 + bge _021F70A4 + add r0, #0x87 + cmp r4, r0 + beq _021F70A4 + b _021F70AE +_021F709E: + add r0, #0x95 + cmp r4, r0 + bne _021F70AE +_021F70A4: + ldr r0, _021F70C8 ; =0x0000FFFF + add sp, #8 + strh r0, [r5] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_021F70AE: + add r0, r6, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov5_021F70CC + ldr r0, [sp] + strh r0, [r5] + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F70C4: .word 0x0000010A +_021F70C8: .word 0x0000FFFF + thumb_func_end ov5_021F6FC0 + + thumb_func_start ov5_021F70CC +ov5_021F70CC: ; 0x021F70CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + add r4, r2, #0 + add r6, r0, #0 + mov r1, #0x46 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x10] + add r0, r6, #0 + mov r1, #0x47 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x48 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #8] + add r0, r6, #0 + mov r1, #0x49 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #0x4a + mov r2, #0 + bl sub_02074470 + str r0, [sp] + add r0, r6, #0 + mov r1, #0x4b + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + cmp r5, #0 + beq _021F7168 + mov r1, #2 + and r0, r1 + lsl r0, r0, #4 + mov ip, r0 + ldr r0, [sp] + and r0, r1 + lsl r3, r0, #3 + ldr r0, [sp, #4] + and r0, r1 + lsl r0, r0, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + and r0, r1 + lsl r2, r0, #1 + ldr r0, [sp, #0x10] + and r0, r1 + asr r6, r0, #1 + ldr r0, [sp, #0xc] + and r0, r1 + orr r0, r6 + add r1, r2, #0 + orr r1, r0 + ldr r0, [sp, #0x14] + orr r0, r1 + add r1, r3, #0 + orr r1, r0 + mov r0, ip + orr r1, r0 + mov r0, #0x28 + str r1, [r5, #0] + mul r0, r1 + mov r1, #0x3f + bl sub_020E1F6C + add r0, #0x1e + str r0, [r5, #0] +_021F7168: + cmp r4, #0 + beq _021F71B2 + lsl r0, r7, #0x1f + lsr r5, r0, #0x1a + ldr r0, [sp] + mov r6, #1 + lsl r0, r0, #0x1f + lsr r3, r0, #0x1b + ldr r0, [sp, #4] + lsl r0, r0, #0x1f + lsr r2, r0, #0x1c + ldr r0, [sp, #8] + lsl r0, r0, #0x1f + lsr r1, r0, #0x1d + ldr r0, [sp, #0x10] + and r0, r6 + ldr r6, [sp, #0xc] + lsl r6, r6, #0x1f + lsr r6, r6, #0x1e + orr r0, r6 + orr r0, r1 + orr r0, r2 + orr r0, r3 + add r1, r5, #0 + orr r1, r0 + mov r0, #0xf + str r1, [r4, #0] + mul r0, r1 + mov r1, #0x3f + bl sub_020E1F6C + add r0, r0, #1 + str r0, [r4, #0] + cmp r0, #9 + blt _021F71B2 + add r0, r0, #1 + str r0, [r4, #0] +_021F71B2: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F70CC + + thumb_func_start ov5_021F71B8 +ov5_021F71B8: ; 0x021F71B8 + push {r3, r4, r5, r6, r7, lr} + add r0, #0x80 + ldr r4, [r0, #0] + ldr r0, [r4, #0xc] + bl sub_0207A268 + mov r1, #0 + bl sub_0207A0FC + add r5, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0202783C + add r4, r0, #0 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + add r3, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl sub_020278DC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F71B8 + + thumb_func_start ov5_021F7208 +ov5_021F7208: ; 0x021F7208 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x80 + ldr r5, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F118 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0202783C + add r1, sp, #8 + add r2, sp, #4 + add r3, sp, #0 + bl sub_02027914 + ldr r0, [sp, #8] + strh r0, [r6] + ldr r0, [sp, #4] + strh r0, [r7] + ldr r0, [sp] + strh r0, [r4] + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7208 + + thumb_func_start ov5_021F7270 +ov5_021F7270: ; 0x021F7270 + push {r4, r5, r6, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x80 + ldr r5, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F118 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0207A268 + add r1, r6, #0 + bl sub_0207A0FC + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + strh r0, [r4] + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F7270 + + thumb_func_start ov5_021F72B8 +ov5_021F72B8: ; 0x021F72B8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r1, r4, #0 + add r1, #0x80 + ldr r5, [r1, #0] + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F118 + add r4, r0, #0 + ldr r0, [r5, #0xc] + bl sub_020507E4 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0202CD88 + mov r1, #1 + sub r7, #0xd + add r5, r0, #0 + strh r1, [r4] + cmp r7, #7 + bls _021F7302 + b _021F740A +_021F7302: + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021F730E: ; jump table + .short _021F731E - _021F730E - 2 ; case 0 + .short _021F736E - _021F730E - 2 ; case 1 + .short _021F73BA - _021F730E - 2 ; case 2 + .short _021F73CA - _021F730E - 2 ; case 3 + .short _021F73DA - _021F730E - 2 ; case 4 + .short _021F73EA - _021F730E - 2 ; case 5 + .short _021F740A - _021F730E - 2 ; case 6 + .short _021F73FA - _021F730E - 2 ; case 7 +_021F731E: + mov r1, #0x1d + bl sub_0202CFB8 + cmp r0, #1 + bhs _021F732C + mov r0, #0 + strh r0, [r4] +_021F732C: + add r0, r5, #0 + mov r1, #0x3c + bl sub_0202CFB8 + cmp r0, #1 + bhs _021F733C + mov r0, #0 + strh r0, [r4] +_021F733C: + add r0, r5, #0 + mov r1, #0x3d + bl sub_0202CFB8 + cmp r0, #1 + bhs _021F734C + mov r0, #0 + strh r0, [r4] +_021F734C: + add r0, r5, #0 + mov r1, #0x3e + bl sub_0202CFB8 + cmp r0, #1 + bhs _021F735C + mov r0, #0 + strh r0, [r4] +_021F735C: + add r0, r5, #0 + mov r1, #0x3f + bl sub_0202CFB8 + cmp r0, #1 + bhs _021F740A + mov r0, #0 + strh r0, [r4] + b _021F740A +_021F736E: + mov r0, #0 + strh r0, [r4] + add r0, r6, #0 + bl sub_0206B588 + cmp r0, #2 + blo _021F7380 + mov r0, #1 + strh r0, [r4] +_021F7380: + add r0, r6, #0 + bl sub_0206B598 + cmp r0, #2 + blo _021F738E + mov r0, #1 + strh r0, [r4] +_021F738E: + add r0, r6, #0 + bl sub_0206B5A8 + cmp r0, #2 + blo _021F739C + mov r0, #1 + strh r0, [r4] +_021F739C: + add r0, r6, #0 + bl sub_0206B5B8 + cmp r0, #2 + blo _021F73AA + mov r0, #1 + strh r0, [r4] +_021F73AA: + add r0, r6, #0 + bl sub_0206B5C8 + cmp r0, #2 + blo _021F740A + mov r0, #1 + strh r0, [r4] + b _021F740A +_021F73BA: + mov r1, #0x49 + bl sub_0202CFB8 + cmp r0, #0xa + bhs _021F740A + mov r0, #0 + strh r0, [r4] + b _021F740A +_021F73CA: + mov r1, #0x39 + bl sub_0202CFB8 + cmp r0, #0x32 + bhs _021F740A + mov r0, #0 + strh r0, [r4] + b _021F740A +_021F73DA: + mov r1, #4 + bl sub_0202CFB8 + cmp r0, #0x32 + bhs _021F740A + mov r0, #0 + strh r0, [r4] + b _021F740A +_021F73EA: + mov r1, #0xb + bl sub_0202CFB8 + cmp r0, #0x1e + bhs _021F740A + mov r0, #0 + strh r0, [r4] + b _021F740A +_021F73FA: + mov r1, #0 + bl sub_0202CFB8 + ldr r1, _021F7410 ; =0x000493E0 + cmp r0, r1 + bhs _021F740A + mov r0, #0 + strh r0, [r4] +_021F740A: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F7410: .word 0x000493E0 + thumb_func_end ov5_021F72B8 + + thumb_func_start ov5_021F7414 +ov5_021F7414: ; 0x021F7414 + mov r0, #1 + bx lr + thumb_func_end ov5_021F7414 + + thumb_func_start ov5_021F7418 +ov5_021F7418: ; 0x021F7418 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r5, #0x80 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_0203F150 + mov r2, #0x93 + lsl r2, r2, #2 + cmp r6, r2 + beq _021F747C + add r1, r2, #2 + cmp r6, r1 + beq _021F74B0 + add r1, r2, #4 + cmp r6, r1 + beq _021F74E4 + b _021F7516 +_021F747C: + mov r1, #0x7f + str r1, [sp] + mov r5, #0 + ldr r1, _021F7528 ; =0x02200C90 + mov r2, #2 + add r3, r5, #0 +_021F7488: + ldrsh r6, [r1, r3] + cmp r4, r6 + bne _021F74A6 + ldrsh r6, [r1, r2] + cmp r0, r6 + bne _021F74A6 + ldr r0, _021F752C ; =0x000005CF + bl sub_02005748 + mov r0, #1 + ldrh r1, [r7] + lsl r0, r5 + orr r0, r1 + strh r0, [r7] + b _021F7516 +_021F74A6: + add r5, r5, #1 + add r1, r1, #4 + cmp r5, #7 + blo _021F7488 + b _021F7516 +_021F74B0: + mov r1, #0x7f + str r1, [sp] + mov r5, #0 + ldr r1, _021F7530 ; =0x02200CAC + mov r2, #2 + add r3, r5, #0 +_021F74BC: + ldrsh r6, [r1, r3] + cmp r4, r6 + bne _021F74DA + ldrsh r6, [r1, r2] + cmp r0, r6 + bne _021F74DA + ldr r0, _021F752C ; =0x000005CF + bl sub_02005748 + mov r0, #1 + ldrh r1, [r7] + lsl r0, r5 + orr r0, r1 + strh r0, [r7] + b _021F7516 +_021F74DA: + add r5, r5, #1 + add r1, r1, #4 + cmp r5, #7 + blo _021F74BC + b _021F7516 +_021F74E4: + mov r1, #0x7f + str r1, [sp] + mov r5, #0 + ldr r1, _021F7534 ; =0x02200CC8 + mov r2, #2 + add r3, r5, #0 +_021F74F0: + ldrsh r6, [r1, r3] + cmp r4, r6 + bne _021F750E + ldrsh r6, [r1, r2] + cmp r0, r6 + bne _021F750E + ldr r0, _021F752C ; =0x000005CF + bl sub_02005748 + mov r0, #1 + ldrh r1, [r7] + lsl r0, r5 + orr r0, r1 + strh r0, [r7] + b _021F7516 +_021F750E: + add r5, r5, #1 + add r1, r1, #4 + cmp r5, #7 + blo _021F74F0 +_021F7516: + ldrh r1, [r7] + ldr r0, [sp] + cmp r1, r0 + bne _021F7524 + mov r0, #0x41 + lsl r0, r0, #2 + strh r0, [r7] +_021F7524: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F7528: .word 0x02200C90 +_021F752C: .word 0x000005CF +_021F7530: .word 0x02200CAC +_021F7534: .word 0x02200CC8 + thumb_func_end ov5_021F7418 + + thumb_func_start ov5_021F7538 +ov5_021F7538: ; 0x021F7538 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r1, #0 + str r1, [sp, #8] + add r0, #0x80 + ldr r0, [r0, #0] + ldr r6, [r0, #0x38] + ldr r0, [r0, #0x3c] + bl sub_0205EB3C + add r1, sp, #0xc + str r0, [sp] + bl sub_02063050 + add r0, r6, #0 + add r1, sp, #4 + add r2, sp, #8 + mov r3, #1 + ldr r4, [sp, #0x10] + bl sub_020625B0 + cmp r0, #1 + bne _021F75FC + asr r1, r4, #3 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r7, r0, #0xc +_021F7570: + ldr r0, [sp, #4] + ldr r1, [sp] + cmp r0, r1 + beq _021F75EC + mov r1, #2 + lsl r1, r1, #0xc + bl sub_020628BC + mov r1, #1 + ldr r0, [sp, #4] + lsl r1, r1, #0xc + bl sub_020628D8 + cmp r0, #1 + bne _021F75A8 + ldr r0, [sp, #4] + add r1, sp, #0xc + bl sub_02063050 + ldr r0, [sp, #4] + add r1, sp, #0xc + str r4, [sp, #0x10] + bl sub_02063060 + ldr r0, [sp, #4] + add r1, r7, #0 + bl sub_02063034 +_021F75A8: + ldr r0, [sp, #4] + bl ov5_021EB1A0 + add r5, r0, #0 + bne _021F75D8 + ldr r0, [sp, #4] + bl sub_02062920 + bl sub_020677F4 + cmp r0, #0 + beq _021F75D8 + ldr r0, [sp, #4] + bl sub_02062D4C + cmp r0, #0 + beq _021F75D8 + ldr r0, [sp, #4] + bl sub_02062B68 + ldr r0, [sp, #4] + bl sub_02067A58 + add r5, r0, #0 +_021F75D8: + cmp r5, #0 + beq _021F75EC + ldr r0, [sp, #4] + add r1, r5, #0 + bl ov5_021EDEB4 + add r0, r5, #0 + mov r1, #1 + bl sub_02021320 +_021F75EC: + add r0, r6, #0 + add r1, sp, #4 + add r2, sp, #8 + mov r3, #1 + bl sub_020625B0 + cmp r0, #1 + beq _021F7570 +_021F75FC: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7538 + + thumb_func_start ov5_021F7604 +ov5_021F7604: ; 0x021F7604 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0 + str r1, [sp, #4] + add r0, #0x80 + ldr r0, [r0, #0] + ldr r4, [r0, #0x38] + ldr r0, [r0, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + add r0, r4, #0 + add r1, sp, #0 + add r2, sp, #4 + mov r3, #1 + bl sub_020625B0 + cmp r0, #1 + bne _021F764C + mov r6, #2 + lsl r6, r6, #0xc + add r7, sp, #0 +_021F7630: + ldr r0, [sp] + cmp r0, r5 + beq _021F763C + add r1, r6, #0 + bl sub_020628C4 +_021F763C: + add r0, r4, #0 + add r1, r7, #0 + add r2, sp, #4 + mov r3, #1 + bl sub_020625B0 + cmp r0, #1 + beq _021F7630 +_021F764C: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7604 + + thumb_func_start ov5_021F7654 +ov5_021F7654: ; 0x021F7654 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + mov r1, #2 + add r5, r0, #0 + lsl r1, r1, #0xc + bl sub_020628BC + add r0, r5, #0 + add r1, sp, #0 + bl sub_02063050 + lsl r0, r4, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r1, sp, #0 + bl sub_02063060 + add r0, r5, #0 + lsl r1, r4, #1 + bl sub_02063034 + add r0, r5, #0 + bl ov5_021EB1A0 + add r4, r0, #0 + beq _021F769A + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021EDEB4 + add r0, r4, #0 + mov r1, #1 + bl sub_02021320 +_021F769A: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7654 + + thumb_func_start ov5_021F76A0 +ov5_021F76A0: ; 0x021F76A0 + push {r4, lr} + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0x20 + ldr r4, [r0, #0x38] + add r0, r4, #0 + bl sub_0206251C + cmp r0, #0 + beq _021F76BA + mov r1, #9 + bl ov5_021F7654 +_021F76BA: + add r0, r4, #0 + mov r1, #2 + bl sub_0206251C + cmp r0, #0 + beq _021F76CC + mov r1, #9 + bl ov5_021F7654 +_021F76CC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021F76A0 + + thumb_func_start ov5_021F76D0 +ov5_021F76D0: ; 0x021F76D0 + push {r4, lr} + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0x20 + ldr r4, [r0, #0x38] + add r0, r4, #0 + bl sub_0206251C + cmp r0, #0 + beq _021F76EC + mov r1, #2 + lsl r1, r1, #0xc + bl sub_020628C4 +_021F76EC: + add r0, r4, #0 + mov r1, #2 + bl sub_0206251C + cmp r0, #0 + beq _021F7700 + mov r1, #2 + lsl r1, r1, #0xc + bl sub_020628C4 +_021F7700: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov5_021F76D0 + + thumb_func_start ov5_021F7704 +ov5_021F7704: ; 0x021F7704 + push {r4, lr} + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0xf + ldr r0, [r0, #0x38] + bl sub_0206251C + add r4, r0, #0 + beq _021F774E + bl sub_02063020 + cmp r0, #0x28 + bgt _021F7730 + cmp r0, #0x26 + blt _021F772A + beq _021F773A + cmp r0, #0x28 + beq _021F773E + b _021F7746 +_021F772A: + cmp r0, #0x1c + beq _021F7736 + b _021F7746 +_021F7730: + cmp r0, #0x30 + beq _021F7742 + b _021F7746 +_021F7736: + mov r1, #6 + b _021F7748 +_021F773A: + mov r1, #5 + b _021F7748 +_021F773E: + mov r1, #3 + b _021F7748 +_021F7742: + mov r1, #2 + b _021F7748 +_021F7746: + mov r1, #4 +_021F7748: + add r0, r4, #0 + bl ov5_021F7654 +_021F774E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7704 + + thumb_func_start ov5_021F7754 +ov5_021F7754: ; 0x021F7754 + push {r3, lr} + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0xf + ldr r0, [r0, #0x38] + bl sub_0206251C + cmp r0, #0 + beq _021F776E + mov r1, #2 + lsl r1, r1, #0xc + bl sub_020628C4 +_021F776E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7754 + + thumb_func_start ov5_021F7774 +ov5_021F7774: ; 0x021F7774 + push {r3, lr} + add r0, #0x80 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_0202C878 + bl sub_02038F8C + mov r0, #1 + pop {r3, pc} + thumb_func_end ov5_021F7774 + + thumb_func_start ov5_021F7788 +ov5_021F7788: ; 0x021F7788 + push {r4, lr} + add r4, r0, #0 + bl sub_0203E838 + add r4, #0x80 + add r1, r0, #0 + ldr r0, [r4, #0] + bl sub_0203F150 + add r1, r0, #0 + mov r0, #1 + bl sub_0200544C + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7788 + + .rodata + + + .global Unk_ov5_02200C84 +Unk_ov5_02200C84: ; 0x02200C84 + .incbin "incbin/overlay5_rodata.bin", 0x8370, 0x837C - 0x8370 + + .global Unk_ov5_02200C90 +Unk_ov5_02200C90: ; 0x02200C90 + .incbin "incbin/overlay5_rodata.bin", 0x837C, 0x8398 - 0x837C + + .global Unk_ov5_02200CAC +Unk_ov5_02200CAC: ; 0x02200CAC + .incbin "incbin/overlay5_rodata.bin", 0x8398, 0x83B4 - 0x8398 + + .global Unk_ov5_02200CC8 +Unk_ov5_02200CC8: ; 0x02200CC8 + .incbin "incbin/overlay5_rodata.bin", 0x83B4, 0x1C + + + .data + + + .global Unk_ov5_0220210C +Unk_ov5_0220210C: ; 0x0220210C + .incbin "incbin/overlay5_data.bin", 0x3EC, 0x12 + diff --git a/asm/ov5_021F77A8.s b/asm/ov5_021F77A8.s new file mode 100644 index 000000000..171b3ac4d --- /dev/null +++ b/asm/ov5_021F77A8.s @@ -0,0 +1,1536 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F77A8 +ov5_021F77A8: ; 0x021F77A8 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r5, #0x80 + add r4, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + bl sub_02027560 + add r1, r6, #0 + bl sub_02026FE8 + strh r0, [r4] + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F77A8 + + thumb_func_start ov5_021F77E8 +ov5_021F77E8: ; 0x021F77E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r5, #0x80 + add r4, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + bl sub_0207A268 + add r1, r6, #0 + bl sub_0207A0FC + add r1, r7, #0 + bl ov5_021F7B60 + strh r0, [r4] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F77E8 + + thumb_func_start ov5_021F7844 +ov5_021F7844: ; 0x021F7844 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r5, #0x80 + add r7, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0xc] + bl sub_0207A268 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl sub_02054988 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov5_021F7844 + + thumb_func_start ov5_021F789C +ov5_021F789C: ; 0x021F789C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r6, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r4, r0, #0 + add r0, r6, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r6, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F118 + add r6, #0x80 + add r5, r0, #0 + ldr r0, [r6, #0] + ldr r0, [r0, #0xc] + bl sub_0207D990 + ldr r2, _021F7984 ; =0x02200CE4 + add r6, r0, #0 + mov r1, #0 +_021F78D8: + ldrh r0, [r2] + cmp r4, r0 + bne _021F78FA + mov r0, #0xc + ldr r2, _021F7988 ; =0x02200CE6 + mul r0, r1 + ldrb r2, [r2, r0] + str r2, [sp, #8] + ldr r2, _021F798C ; =0x02200CE7 + ldrb r2, [r2, r0] + str r2, [sp, #4] + ldr r2, _021F7990 ; =0x02200CE8 + ldrb r2, [r2, r0] + str r2, [sp] + ldr r2, _021F7994 ; =0x02200CE9 + ldrb r7, [r2, r0] + b _021F7902 +_021F78FA: + add r1, r1, #1 + add r2, #0xc + cmp r1, #0x26 + blo _021F78D8 +_021F7902: + cmp r1, #0x26 + bne _021F7912 + bl sub_02022974 + mov r0, #0 + add sp, #0xc + strh r0, [r5] + pop {r4, r5, r6, r7, pc} +_021F7912: + mov r0, #1 + strh r0, [r5] + ldr r0, [sp, #8] + cmp r0, #0 + beq _021F7930 + ldr r2, [sp, #8] + add r0, r6, #0 + mov r1, #0x48 + mov r3, #0x20 + bl sub_0207D688 + cmp r0, #0 + bne _021F7930 + mov r0, #0 + strh r0, [r5] +_021F7930: + ldr r0, [sp, #4] + cmp r0, #0 + beq _021F794A + ldr r2, [sp, #4] + add r0, r6, #0 + mov r1, #0x49 + mov r3, #0x20 + bl sub_0207D688 + cmp r0, #0 + bne _021F794A + mov r0, #0 + strh r0, [r5] +_021F794A: + ldr r0, [sp] + cmp r0, #0 + beq _021F7964 + ldr r2, [sp] + add r0, r6, #0 + mov r1, #0x4a + mov r3, #0x20 + bl sub_0207D688 + cmp r0, #0 + bne _021F7964 + mov r0, #0 + strh r0, [r5] +_021F7964: + cmp r7, #0 + beq _021F797C + add r0, r6, #0 + mov r1, #0x4b + add r2, r7, #0 + mov r3, #0x20 + bl sub_0207D688 + cmp r0, #0 + bne _021F797C + mov r0, #0 + strh r0, [r5] +_021F797C: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_021F7984: .word 0x02200CE4 +_021F7988: .word 0x02200CE6 +_021F798C: .word 0x02200CE7 +_021F7990: .word 0x02200CE8 +_021F7994: .word 0x02200CE9 + thumb_func_end ov5_021F789C + + thumb_func_start ov5_021F7998 +ov5_021F7998: ; 0x021F7998 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + bl sub_0203E838 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r4, #0x80 + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0xc] + bl sub_0207D990 + ldr r2, _021F7A28 ; =0x02200CE4 + add r4, r0, #0 + mov r1, #0 +_021F79C0: + ldrh r0, [r2] + cmp r5, r0 + bne _021F79E0 + mov r0, #0xc + ldr r2, _021F7A2C ; =0x02200CE6 + mul r0, r1 + ldrb r2, [r2, r0] + str r2, [sp, #4] + ldr r2, _021F7A30 ; =0x02200CE7 + ldrb r2, [r2, r0] + str r2, [sp] + ldr r2, _021F7A34 ; =0x02200CE8 + ldrb r7, [r2, r0] + ldr r2, _021F7A38 ; =0x02200CE9 + ldrb r6, [r2, r0] + b _021F79E8 +_021F79E0: + add r1, r1, #1 + add r2, #0xc + cmp r1, #0x26 + blo _021F79C0 +_021F79E8: + cmp r1, #0x26 + bne _021F79F0 + bl sub_02022974 +_021F79F0: + ldr r2, [sp, #4] + add r0, r4, #0 + mov r1, #0x48 + mov r3, #0x20 + bl sub_0207D60C + ldr r2, [sp] + add r0, r4, #0 + mov r1, #0x49 + mov r3, #0x20 + bl sub_0207D60C + add r0, r4, #0 + mov r1, #0x4a + add r2, r7, #0 + mov r3, #0x20 + bl sub_0207D60C + add r0, r4, #0 + mov r1, #0x4b + add r2, r6, #0 + mov r3, #0x20 + bl sub_0207D60C + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F7A28: .word 0x02200CE4 +_021F7A2C: .word 0x02200CE6 +_021F7A30: .word 0x02200CE7 +_021F7A34: .word 0x02200CE8 +_021F7A38: .word 0x02200CE9 + thumb_func_end ov5_021F7998 + + thumb_func_start ov5_021F7A3C +ov5_021F7A3C: ; 0x021F7A3C + mov r1, #0xc + mul r1, r0 + ldr r0, _021F7A48 ; =0x02200CE4 + ldrh r0, [r0, r1] + bx lr + nop +_021F7A48: .word 0x02200CE4 + thumb_func_end ov5_021F7A3C + + thumb_func_start ov5_021F7A4C +ov5_021F7A4C: ; 0x021F7A4C + push {r3, lr} + ldr r3, _021F7A70 ; =0x02200CE4 + mov r2, #0 +_021F7A52: + ldrh r1, [r3] + cmp r0, r1 + bne _021F7A5E + lsl r0, r2, #0x10 + lsr r0, r0, #0x10 + pop {r3, pc} +_021F7A5E: + add r2, r2, #1 + add r3, #0xc + cmp r2, #0x26 + blo _021F7A52 + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + nop +_021F7A70: .word 0x02200CE4 + thumb_func_end ov5_021F7A4C + + thumb_func_start ov5_021F7A74 +ov5_021F7A74: ; 0x021F7A74 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + lsl r1, r4, #0x10 + lsr r2, r1, #0x10 + ldr r1, _021F7B58 ; =0x000001DF + cmp r4, r1 + bhi _021F7AB6 + bhs _021F7B18 + add r3, r1, #0 + sub r3, #0x5d + cmp r4, r3 + bhi _021F7AAC + add r3, r1, #0 + sub r3, #0x5d + cmp r4, r3 + beq _021F7AD2 + b _021F7B48 +_021F7AAC: + add r3, r1, #0 + sub r3, #0x42 + cmp r4, r3 + beq _021F7AF0 + b _021F7B48 +_021F7AB6: + add r3, r1, #0 + add r3, #8 + cmp r4, r3 + bhi _021F7AC8 + add r3, r1, #0 + add r3, #8 + cmp r4, r3 + beq _021F7B04 + b _021F7B48 +_021F7AC8: + add r3, r1, #0 + add r3, #0xd + cmp r4, r3 + beq _021F7B0E + b _021F7B48 +_021F7AD2: + cmp r0, #1 + bne _021F7ADC + add r2, r1, #0 + add r2, #0xf + b _021F7B48 +_021F7ADC: + cmp r0, #2 + bne _021F7AE6 + add r2, r1, #0 + add r2, #0x10 + b _021F7B48 +_021F7AE6: + cmp r0, #3 + bne _021F7B48 + add r2, r1, #0 + add r2, #0x11 + b _021F7B48 +_021F7AF0: + cmp r0, #1 + bne _021F7AFA + add r2, r1, #0 + add r2, #0x12 + b _021F7B48 +_021F7AFA: + cmp r0, #2 + bne _021F7B48 + add r2, r1, #0 + add r2, #0x13 + b _021F7B48 +_021F7B04: + cmp r0, #1 + bne _021F7B48 + add r2, r1, #0 + add r2, #0x14 + b _021F7B48 +_021F7B0E: + cmp r0, #1 + bne _021F7B48 + add r2, r1, #0 + add r2, #0x15 + b _021F7B48 +_021F7B18: + cmp r0, #1 + bne _021F7B22 + add r2, r1, #0 + add r2, #0x16 + b _021F7B48 +_021F7B22: + cmp r0, #2 + bne _021F7B2C + add r2, r1, #0 + add r2, #0x17 + b _021F7B48 +_021F7B2C: + cmp r0, #3 + bne _021F7B36 + add r2, r1, #0 + add r2, #0x18 + b _021F7B48 +_021F7B36: + cmp r0, #4 + bne _021F7B40 + add r2, r1, #0 + add r2, #0x19 + b _021F7B48 +_021F7B40: + cmp r0, #5 + bne _021F7B48 + add r2, r1, #0 + add r2, #0x1a +_021F7B48: + sub r1, r2, #1 + lsl r0, r1, #2 + add r1, r1, r0 + ldr r0, _021F7B5C ; =0x02200EAC + add r0, r0, r1 + ldrb r0, [r5, r0] + pop {r4, r5, r6, pc} + nop +_021F7B58: .word 0x000001DF +_021F7B5C: .word 0x02200EAC + thumb_func_end ov5_021F7A74 + + thumb_func_start ov5_021F7B60 +ov5_021F7B60: ; 0x021F7B60 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + mov r1, #5 + mov r2, #0 + str r0, [sp] + bl sub_02074470 + mov r5, #0 + add r4, sp, #0xc + add r6, r5, #0 +_021F7B76: + add r1, r5, #0 + ldr r0, [sp] + add r1, #0x36 + add r2, r6, #0 + bl sub_02074470 + strh r0, [r4] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _021F7B76 + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #4] +_021F7B92: + ldr r1, [sp, #8] + ldr r0, [sp] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov5_021F7A74 + add r3, r0, #0 + ldr r0, [sp, #4] + mov r2, #0xc + mul r2, r0 + ldr r0, _021F7C00 ; =0x02200CE4 + mov r1, #0 + add r2, r0, r2 +_021F7BAC: + add r4, r3, #0 + asr r4, r1 + mov r0, #1 + and r0, r4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bne _021F7BE0 + ldr r0, [r2, #8] + cmp r7, r0 + bne _021F7BE0 + ldrh r5, [r2] + mov r6, #0 + add r4, sp, #0xc +_021F7BC8: + ldrh r0, [r4] + cmp r0, r5 + beq _021F7BD6 + add r6, r6, #1 + add r4, r4, #2 + cmp r6, #4 + blt _021F7BC8 +_021F7BD6: + cmp r6, #4 + bne _021F7BE0 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021F7BE0: + add r1, r1, #1 + add r2, #0xc + cmp r1, #8 + blt _021F7BAC + ldr r0, [sp, #4] + add r0, #8 + str r0, [sp, #4] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #5 + blt _021F7B92 + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021F7C00: .word 0x02200CE4 + thumb_func_end ov5_021F7B60 + + thumb_func_start ov5_021F7C04 +ov5_021F7C04: ; 0x021F7C04 + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + str r0, [sp, #0x14] + add r0, #0x80 + ldr r6, [r0, #0] + mov r1, #0xf + add r0, r6, #0 + bl sub_0203F098 + add r5, r0, #0 + ldr r0, [sp, #0x14] + bl sub_0203E838 + add r1, r0, #0 + ldr r0, [sp, #0x14] + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + add r4, r0, #0 + ldr r0, [sp, #0x14] + bl sub_0203E838 + add r1, r0, #0 + ldr r0, [sp, #0x14] + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x14] + bl sub_0203E838 + add r7, r0, #0 + ldr r0, [sp, #0x14] + cmp r4, #0xff + str r7, [r0, #0x64] + beq _021F7C62 + add r0, #0x80 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bl sub_0207A268 + add r1, r4, #0 + bl sub_0207A0FC + str r0, [sp, #0x2c] +_021F7C62: + ldr r2, _021F7DD4 ; =0x00000287 + mov r0, #0 + mov r1, #0x1a + mov r3, #0x20 + bl sub_0200B144 + str r0, [sp, #0x28] + add r0, r6, #0 + add r1, r7, #0 + bl sub_0203F118 + add r7, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #1 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F098 + mov r2, #1 + str r2, [sp] + str r7, [sp, #4] + ldr r1, [r5, #0] + mov r3, #0 + str r1, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + mov r1, #0x14 + str r0, [sp, #0x10] + add r0, r6, #0 + bl ov5_021F7ED8 + str r0, [sp, #0x24] + mov r0, #0 + add r1, sp, #0x38 + add r7, r0, #0 +_021F7CA8: + add r0, r0, #1 + strh r7, [r1] + add r1, r1, #2 + cmp r0, #0x26 + blo _021F7CA8 + cmp r4, #0xff + beq _021F7D46 + add r5, r7, #0 + add r4, sp, #0x30 + mov r6, #0 +_021F7CBC: + add r1, r5, #0 + ldr r0, [sp, #0x2c] + add r1, #0x36 + add r2, r6, #0 + bl sub_02074470 + strh r0, [r4] + add r5, r5, #1 + add r4, r4, #2 + cmp r5, #4 + blt _021F7CBC + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x20] + add r6, sp, #0x38 +_021F7CDA: + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x2c] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov5_021F7A74 + mov ip, r0 + ldr r0, [sp, #0x20] + mov r2, #0xc + mul r2, r0 + ldr r0, _021F7DD8 ; =0x02200CE4 + mov r1, #0 + add r2, r0, r2 +_021F7CF4: + mov r0, ip + add r3, r0, #0 + asr r3, r1 + mov r0, #1 + and r0, r3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bne _021F7D2C + ldr r3, [r2, #8] + ldr r0, [sp, #0x1c] + cmp r0, r3 + bne _021F7D2C + ldrh r4, [r2] + mov r5, #0 + add r3, sp, #0x30 +_021F7D14: + ldrh r0, [r3] + cmp r0, r4 + beq _021F7D22 + add r5, r5, #1 + add r3, r3, #2 + cmp r5, #4 + blt _021F7D14 +_021F7D22: + cmp r5, #4 + bne _021F7D2C + strh r4, [r6] + add r6, r6, #2 + add r7, r7, #1 +_021F7D2C: + add r1, r1, #1 + add r2, #0xc + cmp r1, #8 + blt _021F7CF4 + ldr r0, [sp, #0x20] + add r0, #8 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #5 + blt _021F7CDA + b _021F7D6A +_021F7D46: + ldr r5, _021F7DD8 ; =0x02200CE4 + add r6, r7, #0 + add r4, sp, #0x38 +_021F7D4C: + ldr r1, [r5, #8] + ldr r0, [sp, #0x1c] + cmp r0, r1 + bne _021F7D62 + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl ov5_021F7A3C + strh r0, [r4] + add r4, r4, #2 + add r7, r7, #1 +_021F7D62: + add r6, r6, #1 + add r5, #0xc + cmp r6, #0x26 + blo _021F7D4C +_021F7D6A: + mov r5, #0 + cmp r7, #0 + ble _021F7D88 + add r4, sp, #0x38 + mov r6, #0xff +_021F7D74: + ldrh r1, [r4] + ldr r0, [sp, #0x24] + add r2, r6, #0 + add r3, r1, #0 + bl ov5_021F7F2C + add r5, r5, #1 + add r4, r4, #2 + cmp r5, r7 + blt _021F7D74 +_021F7D88: + ldr r2, _021F7DDC ; =0x00000169 + mov r0, #1 + mov r1, #0x1a + mov r3, #0x20 + bl sub_0200B144 + add r4, r0, #0 + ldr r0, [sp, #0x24] + add r1, r4, #0 + bl ov5_021F7E10 + ldr r0, [sp, #0x24] + ldr r3, _021F7DE0 ; =0x0000FFFE + mov r1, #5 + mov r2, #0xff + bl ov5_021F7F2C + add r0, r4, #0 + bl sub_0200B190 + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x28] + bl ov5_021F7E10 + ldr r0, [sp, #0x24] + bl ov5_021F7F34 + ldr r0, [sp, #0x14] + ldr r1, _021F7DE4 ; =ov5_021F7DE8 + bl sub_0203E764 + ldr r0, [sp, #0x28] + bl sub_0200B190 + mov r0, #1 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + nop +_021F7DD4: .word 0x00000287 +_021F7DD8: .word 0x02200CE4 +_021F7DDC: .word 0x00000169 +_021F7DE0: .word 0x0000FFFE +_021F7DE4: .word ov5_021F7DE8 + thumb_func_end ov5_021F7C04 + + thumb_func_start ov5_021F7DE8 +ov5_021F7DE8: ; 0x021F7DE8 + push {r3, lr} + add r1, r0, #0 + ldr r1, [r1, #0x64] + add r0, #0x80 + lsl r1, r1, #0x10 + ldr r0, [r0, #0] + lsr r1, r1, #0x10 + bl sub_0203F118 + ldrh r1, [r0] + ldr r0, _021F7E0C ; =0x0000EEEE + cmp r1, r0 + beq _021F7E06 + mov r0, #1 + pop {r3, pc} +_021F7E06: + mov r0, #0 + pop {r3, pc} + nop +_021F7E0C: .word 0x0000EEEE + thumb_func_end ov5_021F7DE8 + + thumb_func_start ov5_021F7E10 +ov5_021F7E10: ; 0x021F7E10 + add r0, #0xb8 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov5_021F7E10 + + thumb_func_start ov5_021F7E18 +ov5_021F7E18: ; 0x021F7E18 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x2c] + add r6, r1, #0 + add r1, #0xb8 + str r4, [r1, #0] + add r1, r6, #0 + add r1, #0xc3 + ldrb r4, [r1] + mov r1, #2 + mov r7, #0x23 + bic r4, r1 + add r1, r6, #0 + add r1, #0xc3 + strb r4, [r1] + add r1, r6, #0 + ldr r4, [sp, #0x24] + add r1, #0xbc + str r4, [r1, #0] + str r0, [r6, #0] + add r0, r6, #0 + ldr r1, [sp, #0x20] + add r0, #0xcc + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xc3 + add r4, sp, #8 + ldrb r0, [r0] + mov r1, #1 + ldrb r5, [r4, #0x14] + bic r0, r1 + mov r1, #1 + and r1, r5 + orr r1, r0 + add r0, r6, #0 + add r0, #0xc3 + strb r1, [r0] + add r1, r6, #0 + ldrb r0, [r4, #0x10] + add r1, #0xc2 + lsl r7, r7, #4 + strb r0, [r1] + add r1, r6, #0 + add r1, #0xc4 + strb r2, [r1] + add r1, r6, #0 + add r1, #0xc5 + strb r3, [r1] + add r2, r6, #0 + mov r1, #0 + add r2, #0xc7 + strb r1, [r2] + ldr r2, [sp, #0x28] + mov r3, #3 + str r2, [r6, #0x18] + add r2, r6, #0 + add r2, #0xc0 + strb r3, [r2] + ldr r2, _021F7ED0 ; =0x0000027E + add r3, r6, #0 + strh r0, [r6, r2] + add r2, r6, #0 + add r5, r1, #0 + mov r0, #0xff +_021F7E96: + add r4, r2, #0 + add r4, #0xf8 + str r5, [r4, #0] + add r4, r2, #0 + add r4, #0xfc + str r5, [r4, #0] + strh r0, [r3, r7] + add r1, r1, #1 + add r2, #8 + add r3, r3, #2 + cmp r1, #0x27 + blo _021F7E96 + add r4, r6, #0 + mov r7, #0x50 +_021F7EB2: + add r0, r7, #0 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x1c] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #0x27 + blo _021F7EB2 + add r6, #0xcc + ldr r1, _021F7ED4 ; =0x0000EEEE + ldr r0, [r6, #0] + strh r1, [r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_021F7ED0: .word 0x0000027E +_021F7ED4: .word 0x0000EEEE + thumb_func_end ov5_021F7E18 + + thumb_func_start ov5_021F7ED8 +ov5_021F7ED8: ; 0x021F7ED8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r1, #0 + mov r1, #0xa + add r6, r0, #0 + mov r0, #4 + lsl r1, r1, #6 + str r2, [sp, #0x18] + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + bne _021F7EF8 + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021F7EF8: + mov r2, #0xa + mov r1, #0 + lsl r2, r2, #6 + bl sub_020D5124 + str r5, [sp] + add r0, sp, #0x20 + ldrb r0, [r0, #0x10] + add r1, r4, #0 + add r2, r7, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x34] + str r0, [sp, #8] + ldr r0, [sp, #0x38] + str r0, [sp, #0xc] + ldr r0, [sp, #0x3c] + str r0, [sp, #0x10] + ldr r0, [sp, #0x40] + str r0, [sp, #0x14] + ldr r3, [sp, #0x18] + add r0, r6, #0 + bl ov5_021F7E18 + add r0, r4, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov5_021F7ED8 + + thumb_func_start ov5_021F7F2C +ov5_021F7F2C: ; 0x021F7F2C + push {r3, lr} + bl ov5_021F7FF8 + pop {r3, pc} + thumb_func_end ov5_021F7F2C + + thumb_func_start ov5_021F7F34 +ov5_021F7F34: ; 0x021F7F34 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + add r0, #0xc7 + ldrb r1, [r0] + cmp r1, #8 + bls _021F7F70 + add r0, r4, #0 + add r0, #0xc5 + ldrb r0, [r0] + add r3, r4, #0 + add r1, r4, #0 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r3, #0xc4 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 + b _021F7F9E +_021F7F70: + add r0, r4, #0 + add r0, #0xc5 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0xc4 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + lsl r0, r1, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r4, #0 + ldrb r3, [r3] + ldr r0, [r0, #8] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 +_021F7F9E: + mov r0, #0 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r2, _021F7FF0 ; =0x000003D9 + ldr r0, [r0, #8] + mov r1, #3 + mov r3, #0xb + bl sub_0200DAA4 + add r0, r4, #0 + ldr r2, _021F7FF0 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + bl ov5_021F8090 + add r2, r4, #0 + add r2, #0xc2 + add r0, r4, #0 + ldrb r2, [r2] + add r0, #0xd0 + mov r1, #0 + mov r3, #4 + bl sub_0200112C + add r1, r4, #0 + add r1, #0xf0 + str r0, [r1, #0] + ldr r0, _021F7FF4 ; =ov5_021F81A8 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_021F7FF0: .word 0x000003D9 +_021F7FF4: .word ov5_021F81A8 + thumb_func_end ov5_021F7F34 + + thumb_func_start ov5_021F7FF8 +ov5_021F7FF8: ; 0x021F7FF8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r1, [sp] + mov r0, #0x50 + mov r1, #4 + add r7, r2, #0 + add r4, r3, #0 + bl sub_02023790 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + ldr r1, [sp] + add r2, r6, #0 + bl sub_0200B1B8 + add r1, r5, #0 + add r1, #0xc7 + ldrb r1, [r1] + add r0, r5, #0 + add r0, #0xbc + lsl r1, r1, #2 + add r1, r5, r1 + ldr r0, [r0, #0] + ldr r1, [r1, #0x1c] + add r2, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + add r0, #0xc7 + ldrb r1, [r0] + lsl r0, r1, #2 + add r0, r5, r0 + lsl r1, r1, #3 + add r1, r5, r1 + ldr r0, [r0, #0x1c] + add r1, #0xf8 + str r0, [r1, #0] + add r0, r6, #0 + bl sub_020237BC + cmp r4, #0xfa + bne _021F8064 + add r0, r5, #0 + add r0, #0xc7 + ldrb r0, [r0] + mov r1, #2 + mvn r1, r1 + lsl r0, r0, #3 + add r0, r5, r0 + add r0, #0xfc + str r1, [r0, #0] + b _021F8072 +_021F8064: + add r0, r5, #0 + add r0, #0xc7 + ldrb r0, [r0] + lsl r0, r0, #3 + add r0, r5, r0 + add r0, #0xfc + str r4, [r0, #0] +_021F8072: + add r0, r5, #0 + add r0, #0xc7 + ldrb r0, [r0] + lsl r0, r0, #1 + add r1, r5, r0 + mov r0, #0x23 + lsl r0, r0, #4 + strh r7, [r1, r0] + add r0, r5, #0 + add r0, #0xc7 + ldrb r0, [r0] + add r5, #0xc7 + add r0, r0, #1 + strb r0, [r5] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov5_021F7FF8 + + thumb_func_start ov5_021F8090 +ov5_021F8090: ; 0x021F8090 + push {r3, r4} + add r2, r0, #0 + add r1, r0, #0 + add r2, #0xf8 + add r1, #0xd0 + str r2, [r1, #0] + add r1, r0, #0 + ldr r2, _021F818C ; =ov5_021F819C + add r1, #0xd4 + str r2, [r1, #0] + add r1, r0, #0 + mov r2, #0 + add r1, #0xd8 + str r2, [r1, #0] + add r2, r0, #0 + add r1, r0, #0 + add r2, #8 + add r1, #0xdc + str r2, [r1, #0] + add r1, r0, #0 + add r1, #0xc7 + ldrb r2, [r1] + add r1, r0, #0 + add r1, #0xe0 + strh r2, [r1] + add r1, r0, #0 + mov r2, #8 + add r1, #0xe2 + strh r2, [r1] + add r1, r0, #0 + mov r2, #1 + add r1, #0xe4 + strb r2, [r1] + add r1, r0, #0 + mov r3, #0xc + add r1, #0xe5 + strb r3, [r1] + add r1, r0, #0 + mov r3, #2 + add r1, #0xe6 + strb r3, [r1] + add r1, r0, #0 + add r1, #0xe7 + ldrb r3, [r1] + mov r1, #0xf + bic r3, r1 + orr r3, r2 + add r2, r0, #0 + add r2, #0xe7 + strb r3, [r2] + add r2, r0, #0 + add r2, #0xe7 + ldrb r4, [r2] + mov r2, #0xf0 + mov r3, #0x10 + bic r4, r2 + orr r4, r3 + add r3, r0, #0 + add r3, #0xe7 + strb r4, [r3] + add r3, r0, #0 + add r3, #0xe8 + ldrb r3, [r3] + bic r3, r1 + mov r1, #0xf + orr r3, r1 + add r1, r0, #0 + add r1, #0xe8 + strb r3, [r1] + add r1, r0, #0 + add r1, #0xe8 + ldrb r3, [r1] + mov r1, #0x20 + bic r3, r2 + add r2, r3, #0 + orr r2, r1 + add r1, r0, #0 + add r1, #0xe8 + strb r2, [r1] + add r1, r0, #0 + add r1, #0xea + ldrh r2, [r1] + mov r1, #7 + bic r2, r1 + add r1, r0, #0 + add r1, #0xea + strh r2, [r1] + add r1, r0, #0 + add r1, #0xea + ldrh r2, [r1] + mov r1, #0x78 + bic r2, r1 + add r1, r0, #0 + add r1, #0xea + strh r2, [r1] + add r1, r0, #0 + add r1, #0xea + ldrh r2, [r1] + ldr r1, _021F8190 ; =0xFFFFFE7F + and r2, r1 + mov r1, #0x80 + orr r2, r1 + add r1, r0, #0 + add r1, #0xea + strh r2, [r1] + add r1, r0, #0 + add r1, #0xea + ldrh r2, [r1] + ldr r1, _021F8194 ; =0xFFFF81FF + and r2, r1 + add r1, r0, #0 + add r1, #0xea + strh r2, [r1] + add r1, r0, #0 + add r1, #0xea + ldrh r2, [r1] + ldr r1, _021F8198 ; =0xFFFF7FFF + and r2, r1 + add r1, r0, #0 + add r1, #0xea + strh r2, [r1] + add r1, r0, #0 + add r1, #0xec + str r0, [r1, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 +_021F818C: .word ov5_021F819C +_021F8190: .word 0xFFFFFE7F +_021F8194: .word 0xFFFF81FF +_021F8198: .word 0xFFFF7FFF + thumb_func_end ov5_021F8090 + + thumb_func_start ov5_021F819C +ov5_021F819C: ; 0x021F819C + ldr r3, _021F81A4 ; =sub_02001504 + mov r1, #0x13 + bx r3 + nop +_021F81A4: .word sub_02001504 + thumb_func_end ov5_021F819C + + thumb_func_start ov5_021F81A8 +ov5_021F81A8: ; 0x021F81A8 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r0, r5, #0 + add r0, #0xc0 + ldrb r0, [r0] + cmp r0, #0 + beq _021F81C4 + add r0, r5, #0 + add r0, #0xc0 + ldrb r0, [r0] + add r5, #0xc0 + sub r0, r0, #1 + strb r0, [r5] + pop {r4, r5, r6, pc} +_021F81C4: + bl sub_0200F2AC + cmp r0, #0 + beq _021F8240 + add r0, r5, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + bl sub_02001288 + add r4, r0, #0 + add r0, r5, #0 + ldr r1, _021F8244 ; =0x0000027E + add r0, #0xf0 + ldrh r6, [r5, r1] + ldr r0, [r0, #0] + add r1, r5, r1 + bl sub_020014D0 + ldr r0, _021F8244 ; =0x0000027E + ldrh r0, [r5, r0] + cmp r6, r0 + beq _021F81F6 + ldr r0, _021F8248 ; =0x000005DC + bl sub_02005748 +_021F81F6: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _021F8206 + add r0, r0, #1 + cmp r4, r0 + beq _021F8240 + b _021F822C +_021F8206: + add r0, r5, #0 + add r0, #0xc3 + ldrb r0, [r0] + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021F8240 + ldr r0, _021F8248 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0xcc + ldr r1, _021F824C ; =0x0000FFFE + ldr r0, [r0, #0] + strh r1, [r0] + add r0, r5, #0 + bl ov5_021F8250 + pop {r4, r5, r6, pc} +_021F822C: + ldr r0, _021F8248 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + strh r4, [r0] + add r0, r5, #0 + bl ov5_021F8250 +_021F8240: + pop {r4, r5, r6, pc} + nop +_021F8244: .word 0x0000027E +_021F8248: .word 0x000005DC +_021F824C: .word 0x0000FFFE + thumb_func_end ov5_021F81A8 + + thumb_func_start ov5_021F8250 +ov5_021F8250: ; 0x021F8250 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _021F82B4 ; =0x000005DC + bl sub_02005748 + add r0, r6, #0 + add r0, #0xf0 + mov r1, #0 + ldr r0, [r0, #0] + add r2, r1, #0 + bl sub_02001384 + add r0, r6, #0 + add r0, #0xdc + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200DC9C + add r0, r6, #0 + add r0, #8 + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_021F8280: + ldr r0, [r5, #0x1c] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x27 + blo _021F8280 + add r0, r6, #0 + add r0, #0xc3 + ldrb r0, [r0] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + cmp r0, #1 + bne _021F82A6 + add r0, r6, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl sub_0200B190 +_021F82A6: + ldr r0, [r6, #4] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F82B4: .word 0x000005DC + thumb_func_end ov5_021F8250 + + thumb_func_start ov5_021F82B8 +ov5_021F82B8: ; 0x021F82B8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + add r0, #0x80 + ldr r7, [r0, #0] + mov r1, #0xf + add r0, r7, #0 + bl sub_0203F098 + str r0, [sp, #0x14] + add r0, r7, #0 + mov r1, #0 + bl sub_0203F098 + str r0, [sp, #0x18] + ldr r0, [r5, #8] + add r1, r0, #1 + str r1, [r5, #8] + ldrb r6, [r0] + add r0, r1, #1 + str r0, [r5, #8] + add r0, r5, #0 + ldrb r4, [r1] + bl sub_0203E838 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_0203F150 + str r0, [sp, #0x1c] + add r0, r5, #0 + bl sub_0203E838 + add r5, #0x80 + add r1, r0, #0 + ldr r0, [r5, #0] + bl sub_0203F118 + add r5, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021F7A4C + mov r1, #0xc + mul r1, r0 + ldr r0, [sp, #0x14] + add r2, r4, #0 + ldr r0, [r0, #0] + add r3, r5, #0 + str r0, [sp] + ldr r0, _021F8348 ; =0x02200CE6 + ldrb r0, [r0, r1] + str r0, [sp, #4] + ldr r0, _021F834C ; =0x02200CE7 + ldrb r0, [r0, r1] + str r0, [sp, #8] + ldr r0, _021F8350 ; =0x02200CE8 + ldrb r0, [r0, r1] + str r0, [sp, #0xc] + ldr r0, _021F8354 ; =0x02200CE9 + ldrb r0, [r0, r1] + add r1, r6, #0 + str r0, [sp, #0x10] + add r0, r7, #0 + bl ov5_021DD250 + ldr r1, [sp, #0x18] + str r0, [r1, #0] + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F8348: .word 0x02200CE6 +_021F834C: .word 0x02200CE7 +_021F8350: .word 0x02200CE8 +_021F8354: .word 0x02200CE9 + thumb_func_end ov5_021F82B8 + + thumb_func_start ov5_021F8358 +ov5_021F8358: ; 0x021F8358 + push {r3, lr} + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0203F098 + ldr r0, [r0, #0] + bl ov5_021DD3A8 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F8358 + + .rodata + + + .global Unk_ov5_02200CE4 +Unk_ov5_02200CE4: ; 0x02200CE4 + .incbin "incbin/overlay5_rodata.bin", 0x83D0, 0x8598 - 0x83D0 + + .global Unk_ov5_02200EAC +Unk_ov5_02200EAC: ; 0x02200EAC + .incbin "incbin/overlay5_rodata.bin", 0x8598, 0x9DD + diff --git a/asm/ov5_021F8370.s b/asm/ov5_021F8370.s new file mode 100644 index 000000000..5a04c5274 --- /dev/null +++ b/asm/ov5_021F8370.s @@ -0,0 +1,289 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F8370 +ov5_021F8370: ; 0x021F8370 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_0203D174 + bl sub_02027860 + mov r1, #0xa + bl sub_02027F6C + mov r1, #0x47 + add r4, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x47 + add r6, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + str r5, [r6, #0] + str r4, [r6, #4] + ldr r0, [r5, #4] + mov r4, #0 + str r6, [r0, #0x24] +_021F83A4: + add r0, r5, #0 + add r1, r4, #0 + bl ov5_021F8508 + cmp r0, #1 + bne _021F83B8 + add r0, r6, #0 + add r1, r4, #0 + bl ov5_021F8480 +_021F83B8: + add r4, r4, #1 + cmp r4, #0x14 + blt _021F83A4 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F8370 + + thumb_func_start ov5_021F83C0 +ov5_021F83C0: ; 0x021F83C0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r0, [r0, #0x24] + bl sub_020181C4 + ldr r0, [r4, #4] + mov r1, #0 + str r1, [r0, #0x24] + pop {r4, pc} + thumb_func_end ov5_021F83C0 + + thumb_func_start ov5_021F83D4 +ov5_021F83D4: ; 0x021F83D4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [sp, #0x18] + ldr r5, _021F840C ; =0x0220192C + add r7, r1, #0 + str r2, [sp] + str r0, [sp, #0x18] + mov r4, #0 +_021F83E4: + ldr r1, [sp] + add r0, r7, #0 + add r2, r5, #0 + add r3, r6, #0 + bl ov5_021F851C + cmp r0, #1 + bne _021F83FC + ldr r1, [sp, #0x18] + mov r0, #1 + str r0, [r1, #0] + pop {r3, r4, r5, r6, r7, pc} +_021F83FC: + add r4, r4, #1 + add r5, #0x18 + cmp r4, #0x17 + blt _021F83E4 + ldr r1, [sp, #0x18] + mov r0, #0 + str r0, [r1, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F840C: .word 0x0220192C + thumb_func_end ov5_021F83D4 + + thumb_func_start ov5_021F8410 +ov5_021F8410: ; 0x021F8410 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + str r1, [sp] + str r2, [sp, #4] + add r7, r3, #0 + bl sub_0203D174 + bl sub_02027860 + bl sub_02027F80 + cmp r0, #0xa + bne _021F846C + ldr r5, _021F8474 ; =0x0220192C + mov r4, #0 +_021F8430: + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r5, #0 + add r3, r6, #0 + bl ov5_021F851C + cmp r0, #1 + bne _021F8464 + ldrh r0, [r5] + lsl r1, r0, #2 + ldr r0, _021F8478 ; =0x022018DC + ldr r1, [r0, r1] + ldr r0, _021F847C ; =0x00002774 + cmp r1, r0 + bne _021F8452 + cmp r7, #0 + bne _021F8464 +_021F8452: + lsl r1, r1, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + mov r2, #0 + bl sub_0203E880 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021F8464: + add r4, r4, #1 + add r5, #0x18 + cmp r4, #0x17 + blt _021F8430 +_021F846C: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021F8474: .word 0x0220192C +_021F8478: .word 0x022018DC +_021F847C: .word 0x00002774 + thumb_func_end ov5_021F8410 + + thumb_func_start ov5_021F8480 +ov5_021F8480: ; 0x021F8480 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r1, #0 + add r0, sp, #0x14 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + ldr r0, [sp, #0xc] + str r1, [sp, #0x10] + lsl r1, r0, #2 + ldr r0, _021F8500 ; =0x0220188C + ldr r6, _021F8504 ; =0x0220192C + ldr r7, [r0, r1] + ldr r0, [sp, #8] + ldr r5, [r0, #0] + add r0, #8 + str r0, [sp, #8] +_021F84A6: + ldrh r1, [r6] + ldr r0, [sp, #0xc] + cmp r1, r0 + bne _021F84F0 + ldr r4, [sp, #8] + mov r1, #0 +_021F84B2: + ldrh r0, [r4] + cmp r0, #0 + bne _021F84E8 + mov r0, #1 + strh r0, [r4] + str r7, [r4, #4] + add r0, sp, #0x14 + str r0, [sp] + ldr r0, [r5, #0x50] + add r2, r7, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r5, #0x30] + add r3, r6, #4 + bl ov5_021E19CC + strh r0, [r4, #2] + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + add r1, r7, #0 + bl ov5_021E18CC + str r0, [r4, #8] + b _021F84F0 +_021F84E8: + add r1, r1, #1 + add r4, #0xc + cmp r1, #0x17 + blt _021F84B2 +_021F84F0: + ldr r0, [sp, #0x10] + add r6, #0x18 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #0x17 + blt _021F84A6 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F8500: .word 0x0220188C +_021F8504: .word 0x0220192C + thumb_func_end ov5_021F8480 + + thumb_func_start ov5_021F8508 +ov5_021F8508: ; 0x021F8508 + push {r4, lr} + ldr r0, [r0, #0xc] + add r4, r1, #0 + bl sub_020507E4 + mov r1, #2 + add r2, r4, #0 + bl sub_0206AF6C + pop {r4, pc} + thumb_func_end ov5_021F8508 + + thumb_func_start ov5_021F851C +ov5_021F851C: ; 0x021F851C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrh r0, [r2, #2] + add r4, r2, #0 + add r6, r1, #0 + add r4, #0x10 + cmp r0, #1 + bne _021F855C + ldrh r1, [r2] + add r0, r3, #0 + bl ov5_021F8508 + cmp r0, #1 + bne _021F855C + mov r0, #2 + ldrsh r0, [r4, r0] + cmp r6, r0 + blt _021F855C + mov r0, #6 + ldrsh r0, [r4, r0] + cmp r6, r0 + bgt _021F855C + mov r0, #0 + ldrsh r0, [r4, r0] + cmp r5, r0 + blt _021F855C + mov r0, #4 + ldrsh r0, [r4, r0] + cmp r5, r0 + bgt _021F855C + mov r0, #1 + pop {r4, r5, r6, pc} +_021F855C: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov5_021F851C + + .rodata + + + .global Unk_ov5_0220188C +Unk_ov5_0220188C: ; 0x0220188C + .incbin "incbin/overlay5_rodata.bin", 0x8F78, 0x8FC8 - 0x8F78 + + .global Unk_ov5_022018DC +Unk_ov5_022018DC: ; 0x022018DC + .incbin "incbin/overlay5_rodata.bin", 0x8FC8, 0x9018 - 0x8FC8 + + .global Unk_ov5_0220192C +Unk_ov5_0220192C: ; 0x0220192C + .incbin "incbin/overlay5_rodata.bin", 0x9018, 0x228 + diff --git a/asm/ov5_021F8560.s b/asm/ov5_021F8560.s new file mode 100644 index 000000000..69445bbb0 --- /dev/null +++ b/asm/ov5_021F8560.s @@ -0,0 +1,552 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov5_021F8560 +ov5_021F8560: ; 0x021F8560 + push {r3, r4, r5, lr} + mov r2, #0 + mov r1, #0x6c + add r3, r2, #0 + add r5, r0, #0 + bl ov5_021DF53C + add r4, r0, #0 + str r5, [r4, #0] + bl ov5_021F858C + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F8560 + + thumb_func_start ov5_021F857C +ov5_021F857C: ; 0x021F857C + push {r4, lr} + add r4, r0, #0 + bl ov5_021F85B0 + add r0, r4, #0 + bl ov5_021DF554 + pop {r4, pc} + thumb_func_end ov5_021F857C + + thumb_func_start ov5_021F858C +ov5_021F858C: ; 0x021F858C + push {r3, r4, lr} + sub sp, #4 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r3, #0x51 + bl ov5_021DFB00 + add r0, r4, #0 + add r0, #0x18 + add r1, r4, #4 + bl sub_02073B70 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F858C + + thumb_func_start ov5_021F85B0 +ov5_021F85B0: ; 0x021F85B0 + ldr r3, _021F85B8 ; =sub_0207395C + add r0, r0, #4 + bx r3 + nop +_021F85B8: .word sub_0207395C + thumb_func_end ov5_021F85B0 + + thumb_func_start ov5_021F85BC +ov5_021F85BC: ; 0x021F85BC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r6, r1, #0 + add r7, r2, #0 + add r2, sp, #0x24 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r5, r0, #0 + str r3, [sp, #8] + str r1, [r2, #8] + bl sub_0205EB3C + ldr r1, [sp, #0x48] + add r4, r0, #0 + str r1, [sp, #0xc] + ldr r1, [sp, #0x50] + str r1, [sp, #0x10] + bl ov5_021DF578 + mov r1, #0x21 + str r0, [sp, #0x14] + bl ov5_021DF55C + str r0, [sp, #0x18] + ldr r0, [sp, #0x4c] + str r4, [sp, #0x1c] + str r5, [sp, #0x20] + cmp r0, #0 + bne _021F8626 + add r0, r4, #0 + bl sub_02062C00 + ldr r2, [sp, #0x50] + ldr r0, _021F865C ; =0x02201BC8 + mov r1, #0xc + add r3, r2, #0 + mul r3, r1 + ldr r2, [r0, r3] + add r1, r0, r3 + lsl r0, r6, #0x10 + add r0, r2, r0 + ldr r2, [r1, #4] + str r0, [sp, #0x24] + lsl r0, r7, #0x10 + add r0, r2, r0 + str r0, [sp, #0x28] + ldr r0, [sp, #8] + ldr r1, [r1, #8] + lsl r0, r0, #0x10 + add r0, r1, r0 + str r0, [sp, #0x2c] + b _021F863E +_021F8626: + add r0, r4, #0 + add r1, sp, #0x24 + bl sub_02063050 + ldr r2, [sp, #0x50] + mov r1, #0xc + ldr r3, _021F8660 ; =0x02201C10 + mul r1, r2 + add r0, r4, #0 + add r1, r3, r1 + bl sub_020630AC +_021F863E: + add r0, r4, #0 + mov r1, #2 + bl sub_02062758 + add r1, sp, #0xc + str r1, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x14] + ldr r1, _021F8664 ; =0x02201B54 + ldr r3, [sp, #0x4c] + add r2, sp, #0x24 + bl ov5_021DF72C + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F865C: .word 0x02201BC8 +_021F8660: .word 0x02201C10 +_021F8664: .word 0x02201B54 + thumb_func_end ov5_021F85BC + + thumb_func_start ov5_021F8668 +ov5_021F8668: ; 0x021F8668 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r0, #0 + add r3, r4, #0 + add r6, r2, #0 + add r3, #0x38 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + mov r1, #4 + strh r0, [r4, #4] + mov r0, #1 + lsl r0, r0, #0xc + str r0, [r4, #0x2c] + lsr r0, r0, #2 + str r0, [r4, #0x30] + ldr r0, [r2, #4] + add r2, r4, #0 + str r0, [r4, #0x34] + ldrsh r1, [r4, r1] + add r2, #0xc + bl ov5_021F8878 + ldr r0, [r4, #0x34] + lsl r1, r0, #2 + ldr r0, _021F86C8 ; =0x02201B68 + ldr r0, [r0, r1] + strh r0, [r4, #8] + mov r0, #0x14 + strh r0, [r4, #0xa] + add r0, r5, #0 + bl sub_020715B4 + cmp r0, #1 + bne _021F86C4 + ldr r1, [r4, #0] + mov r0, #2 + orr r0, r1 + str r0, [r4, #0] +_021F86C4: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F86C8: .word 0x02201B68 + thumb_func_end ov5_021F8668 + + thumb_func_start ov5_021F86CC +ov5_021F86CC: ; 0x021F86CC + push {lr} + sub sp, #0xc + ldr r0, [r1, #0x48] + add r1, sp, #0 + mov r2, #0 + str r2, [r1, #0] + str r2, [r1, #4] + str r2, [r1, #8] + bl sub_020630AC + add sp, #0xc + pop {pc} + thumb_func_end ov5_021F86CC + + thumb_func_start ov5_021F86E4 +ov5_021F86E4: ; 0x021F86E4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [r5, #0] + add r7, r0, #0 + mov r0, #2 + ldr r4, [r5, #0x48] + ldr r6, [r5, #0x4c] + tst r0, r1 + bne _021F86FA + b _021F8838 +_021F86FA: + add r0, r4, #0 + bl sub_0206299C + strh r0, [r5, #4] + add r0, r6, #0 + bl sub_0205F108 + str r0, [r5, #0x34] + mov r0, #4 + ldrsh r1, [r5, r0] + sub r0, r0, #5 + cmp r1, r0 + bne _021F8718 + bl sub_02022974 +_021F8718: + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x30] + add r2, r1, r0 + mov r1, #1 + lsl r1, r1, #0xe + str r2, [r5, #0x2c] + cmp r2, r1 + blt _021F8732 + str r1, [r5, #0x2c] + ldr r0, [r5, #0x30] + neg r0, r0 + str r0, [r5, #0x30] + b _021F8740 +_021F8732: + lsr r0, r1, #2 + cmp r2, r0 + bgt _021F8740 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x30] + neg r0, r0 + str r0, [r5, #0x30] +_021F8740: + ldr r0, [r5, #0] + mov r1, #4 + tst r0, r1 + bne _021F8754 + ldrsh r1, [r5, r1] + add r2, r5, #0 + ldr r0, [r5, #0x34] + add r2, #0xc + bl ov5_021F8878 +_021F8754: + ldr r1, [r5, #0] + mov r0, #0x10 + tst r0, r1 + bne _021F8766 + ldr r0, [r5, #0x34] + lsl r1, r0, #2 + ldr r0, _021F883C ; =0x02201B68 + ldr r0, [r0, r1] + strh r0, [r5, #8] +_021F8766: + ldr r1, [r5, #0] + mov r0, #8 + tst r0, r1 + bne _021F8838 + ldr r1, [r5, #0x34] + mov r0, #0xc + add r2, r1, #0 + mul r2, r0 + ldr r0, _021F8840 ; =0x02201C10 + add r3, r0, r2 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [r5, #0] + mov r0, #0x20 + tst r0, r1 + bne _021F8796 + ldr r1, [sp, #4] + ldr r0, [r5, #0x2c] + add r0, r1, r0 + str r0, [sp, #4] + b _021F87AE +_021F8796: + ldr r1, [sp] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r0, [r5, #0x1c] + add r0, r1, r0 + str r0, [sp, #8] +_021F87AE: + add r0, r4, #0 + add r1, sp, #0 + bl sub_020630AC + add r0, r4, #0 + add r1, sp, #0 + bl sub_02063050 + ldr r1, [r5, #0] + mov r0, #0x40 + tst r0, r1 + bne _021F87D2 + ldr r1, [r5, #0x34] + mov r0, #0xc + ldr r2, _021F8844 ; =0x02201B80 + mul r0, r1 + add r4, r2, r0 + b _021F87D6 +_021F87D2: + add r4, r5, #0 + add r4, #0x20 +_021F87D6: + ldrh r0, [r5, #8] + bl sub_0201D1D4 + ldrh r3, [r5, #0xa] + ldr r1, [r4, #0] + ldr r2, [sp] + mul r0, r3 + add r0, r1, r0 + add r0, r2, r0 + str r0, [sp] + ldrh r0, [r5, #8] + bl sub_0201D15C + mov r1, #2 + ldr r3, [r4, #4] + lsl r1, r1, #0xe + add r1, r3, r1 + ldrh r3, [r5, #0xa] + ldr r2, [sp, #4] + mul r0, r3 + add r0, r1, r0 + add r1, r2, r0 + str r1, [sp, #4] + ldr r2, [sp, #8] + ldr r0, [r4, #8] + add r0, r2, r0 + str r0, [sp, #8] + ldr r3, [r5, #0] + mov r2, #0x20 + tst r2, r3 + bne _021F881C + ldr r0, [r5, #0x2c] + add r0, r1, r0 + str r0, [sp, #4] + b _021F8830 +_021F881C: + ldr r3, [sp] + ldr r2, [r5, #0x14] + add r2, r3, r2 + str r2, [sp] + ldr r2, [r5, #0x18] + add r1, r1, r2 + str r1, [sp, #4] + ldr r1, [r5, #0x1c] + add r0, r0, r1 + str r0, [sp, #8] +_021F8830: + add r0, r7, #0 + add r1, sp, #0 + bl sub_020715D4 +_021F8838: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021F883C: .word 0x02201B68 +_021F8840: .word 0x02201C10 +_021F8844: .word 0x02201B80 + thumb_func_end ov5_021F86E4 + + thumb_func_start ov5_021F8848 +ov5_021F8848: ; 0x021F8848 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r2, [r4, #0] + mov r1, #1 + tst r1, r2 + bne _021F886C + ldr r5, [r4, #0x44] + add r1, sp, #0 + add r5, #0x18 + bl sub_020715E4 + add r2, r4, #0 + add r0, r5, #0 + add r1, sp, #0 + add r2, #0xc + bl sub_02073BF0 +_021F886C: + ldrh r0, [r4, #6] + add r0, r0, #1 + strh r0, [r4, #6] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov5_021F8848 + + thumb_func_start ov5_021F8878 +ov5_021F8878: ; 0x021F8878 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + cmp r5, #6 + blo _021F8888 + bl sub_02022974 +_021F8888: + ldr r0, _021F88A4 ; =0x02201C58 + lsl r1, r5, #5 + lsl r2, r6, #3 + add r0, r0, r1 + add r1, r2, r0 + ldrh r0, [r2, r0] + strh r0, [r4] + ldrh r0, [r1, #2] + strh r0, [r4, #2] + ldrh r0, [r1, #4] + strh r0, [r4, #4] + ldrh r0, [r1, #6] + strh r0, [r4, #6] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021F88A4: .word 0x02201C58 + thumb_func_end ov5_021F8878 + + thumb_func_start ov5_021F88A8 +ov5_021F88A8: ; 0x021F88A8 + push {r3, lr} + bl sub_02071598 + add r0, #0xc + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F88A8 + + thumb_func_start ov5_021F88B4 +ov5_021F88B4: ; 0x021F88B4 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_02071598 + add r2, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + add r2, #0xc + bl ov5_021F8878 + pop {r3, r4, r5, pc} + thumb_func_end ov5_021F88B4 + + thumb_func_start ov5_021F88CC +ov5_021F88CC: ; 0x021F88CC + push {r4, lr} + add r4, r1, #0 + bl sub_02071598 + ldr r1, [r0, #0] + orr r1, r4 + str r1, [r0, #0] + pop {r4, pc} + thumb_func_end ov5_021F88CC + + thumb_func_start ov5_021F88DC +ov5_021F88DC: ; 0x021F88DC + push {r4, lr} + add r4, r1, #0 + bl sub_02071598 + ldr r2, [r0, #0] + mvn r1, r4 + and r1, r2 + str r1, [r0, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov5_021F88DC + + thumb_func_start ov5_021F88F0 +ov5_021F88F0: ; 0x021F88F0 + push {r3, lr} + bl sub_02071598 + add r0, #0x14 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F88F0 + + thumb_func_start ov5_021F88FC +ov5_021F88FC: ; 0x021F88FC + push {r3, lr} + bl sub_02071598 + add r0, #0x20 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov5_021F88FC + + thumb_func_start ov5_021F8908 +ov5_021F8908: ; 0x021F8908 + push {r4, lr} + add r4, r1, #0 + bl sub_02071598 + strh r4, [r0, #8] + pop {r4, pc} + thumb_func_end ov5_021F8908 + + .rodata + + + .global Unk_ov5_02201B54 +Unk_ov5_02201B54: ; 0x02201B54 + .incbin "incbin/overlay5_rodata.bin", 0x9240, 0x9254 - 0x9240 + + .global Unk_ov5_02201B68 +Unk_ov5_02201B68: ; 0x02201B68 + .incbin "incbin/overlay5_rodata.bin", 0x9254, 0x926C - 0x9254 + + .global Unk_ov5_02201B80 +Unk_ov5_02201B80: ; 0x02201B80 + .incbin "incbin/overlay5_rodata.bin", 0x926C, 0x92B4 - 0x926C + + .global Unk_ov5_02201BC8 +Unk_ov5_02201BC8: ; 0x02201BC8 + .incbin "incbin/overlay5_rodata.bin", 0x92B4, 0x92FC - 0x92B4 + + .global Unk_ov5_02201C10 +Unk_ov5_02201C10: ; 0x02201C10 + .incbin "incbin/overlay5_rodata.bin", 0x92FC, 0x9344 - 0x92FC + + .global Unk_ov5_02201C58 +Unk_ov5_02201C58: ; 0x02201C58 + .incbin "incbin/overlay5_rodata.bin", 0x9344, 0xC0 + diff --git a/asm/ov5_021FAF40.s b/asm/ov5_021FAF40.s new file mode 100644 index 000000000..d963211ab --- /dev/null +++ b/asm/ov5_021FAF40.s @@ -0,0 +1,216 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .rodata + + + .global Unk_ov5_021FAF40 +Unk_ov5_021FAF40: ; 0x021FAF40 + .incbin "incbin/overlay5_rodata.bin", 0x262C, 0x2634 - 0x262C + + .global Unk_ov5_021FAF48 +Unk_ov5_021FAF48: ; 0x021FAF48 + .incbin "incbin/overlay5_rodata.bin", 0x2634, 0x263C - 0x2634 + + .global Unk_ov5_021FAF50 +Unk_ov5_021FAF50: ; 0x021FAF50 + .incbin "incbin/overlay5_rodata.bin", 0x263C, 0x264C - 0x263C + + .global Unk_ov5_021FAF60 +Unk_ov5_021FAF60: ; 0x021FAF60 + .incbin "incbin/overlay5_rodata.bin", 0x264C, 0x2660 - 0x264C + + .global Unk_ov5_021FAF74 +Unk_ov5_021FAF74: ; 0x021FAF74 + .incbin "incbin/overlay5_rodata.bin", 0x2660, 0x2674 - 0x2660 + + .global Unk_ov5_021FAF88 +Unk_ov5_021FAF88: ; 0x021FAF88 + .incbin "incbin/overlay5_rodata.bin", 0x2674, 0x2688 - 0x2674 + + .global Unk_ov5_021FAF9C +Unk_ov5_021FAF9C: ; 0x021FAF9C + .incbin "incbin/overlay5_rodata.bin", 0x2688, 0x269C - 0x2688 + + .global Unk_ov5_021FAFB0 +Unk_ov5_021FAFB0: ; 0x021FAFB0 + .incbin "incbin/overlay5_rodata.bin", 0x269C, 0x26B0 - 0x269C + + .global Unk_ov5_021FAFC4 +Unk_ov5_021FAFC4: ; 0x021FAFC4 + .incbin "incbin/overlay5_rodata.bin", 0x26B0, 0x26C4 - 0x26B0 + + .global Unk_ov5_021FAFD8 +Unk_ov5_021FAFD8: ; 0x021FAFD8 + .incbin "incbin/overlay5_rodata.bin", 0x26C4, 0x26D8 - 0x26C4 + + .global Unk_ov5_021FAFEC +Unk_ov5_021FAFEC: ; 0x021FAFEC + .incbin "incbin/overlay5_rodata.bin", 0x26D8, 0x26EC - 0x26D8 + + .global Unk_ov5_021FB000 +Unk_ov5_021FB000: ; 0x021FB000 + .incbin "incbin/overlay5_rodata.bin", 0x26EC, 0x2700 - 0x26EC + + .global Unk_ov5_021FB014 +Unk_ov5_021FB014: ; 0x021FB014 + .incbin "incbin/overlay5_rodata.bin", 0x2700, 0x2714 - 0x2700 + + .global Unk_ov5_021FB028 +Unk_ov5_021FB028: ; 0x021FB028 + .incbin "incbin/overlay5_rodata.bin", 0x2714, 0x2728 - 0x2714 + + .global Unk_ov5_021FB03C +Unk_ov5_021FB03C: ; 0x021FB03C + .incbin "incbin/overlay5_rodata.bin", 0x2728, 0x273C - 0x2728 + + .global Unk_ov5_021FB050 +Unk_ov5_021FB050: ; 0x021FB050 + .incbin "incbin/overlay5_rodata.bin", 0x273C, 0x2750 - 0x273C + + .global Unk_ov5_021FB064 +Unk_ov5_021FB064: ; 0x021FB064 + .incbin "incbin/overlay5_rodata.bin", 0x2750, 0x2764 - 0x2750 + + .global Unk_ov5_021FB078 +Unk_ov5_021FB078: ; 0x021FB078 + .incbin "incbin/overlay5_rodata.bin", 0x2764, 0x2778 - 0x2764 + + .global Unk_ov5_021FB08C +Unk_ov5_021FB08C: ; 0x021FB08C + .incbin "incbin/overlay5_rodata.bin", 0x2778, 0x278C - 0x2778 + + .global Unk_ov5_021FB0A0 +Unk_ov5_021FB0A0: ; 0x021FB0A0 + .incbin "incbin/overlay5_rodata.bin", 0x278C, 0x27A0 - 0x278C + + .global Unk_ov5_021FB0B4 +Unk_ov5_021FB0B4: ; 0x021FB0B4 + .incbin "incbin/overlay5_rodata.bin", 0x27A0, 0x27B4 - 0x27A0 + + .global Unk_ov5_021FB0C8 +Unk_ov5_021FB0C8: ; 0x021FB0C8 + .incbin "incbin/overlay5_rodata.bin", 0x27B4, 0x27C8 - 0x27B4 + + .global Unk_ov5_021FB0DC +Unk_ov5_021FB0DC: ; 0x021FB0DC + .incbin "incbin/overlay5_rodata.bin", 0x27C8, 0x27DC - 0x27C8 + + .global Unk_ov5_021FB0F0 +Unk_ov5_021FB0F0: ; 0x021FB0F0 + .incbin "incbin/overlay5_rodata.bin", 0x27DC, 0x27F0 - 0x27DC + + .global Unk_ov5_021FB104 +Unk_ov5_021FB104: ; 0x021FB104 + .incbin "incbin/overlay5_rodata.bin", 0x27F0, 0x2808 - 0x27F0 + + .global Unk_ov5_021FB11C +Unk_ov5_021FB11C: ; 0x021FB11C + .incbin "incbin/overlay5_rodata.bin", 0x2808, 0x2820 - 0x2808 + + .global Unk_ov5_021FB134 +Unk_ov5_021FB134: ; 0x021FB134 + .incbin "incbin/overlay5_rodata.bin", 0x2820, 0x2838 - 0x2820 + + .global Unk_ov5_021FB14C +Unk_ov5_021FB14C: ; 0x021FB14C + .incbin "incbin/overlay5_rodata.bin", 0x2838, 0x2850 - 0x2838 + + .global Unk_ov5_021FB164 +Unk_ov5_021FB164: ; 0x021FB164 + .incbin "incbin/overlay5_rodata.bin", 0x2850, 0x2868 - 0x2850 + + .global Unk_ov5_021FB17C +Unk_ov5_021FB17C: ; 0x021FB17C + .incbin "incbin/overlay5_rodata.bin", 0x2868, 0x2880 - 0x2868 + + .global Unk_ov5_021FB194 +Unk_ov5_021FB194: ; 0x021FB194 + .incbin "incbin/overlay5_rodata.bin", 0x2880, 0x2898 - 0x2880 + + .global Unk_ov5_021FB1AC +Unk_ov5_021FB1AC: ; 0x021FB1AC + .incbin "incbin/overlay5_rodata.bin", 0x2898, 0x28B0 - 0x2898 + + .global Unk_ov5_021FB1C4 +Unk_ov5_021FB1C4: ; 0x021FB1C4 + .incbin "incbin/overlay5_rodata.bin", 0x28B0, 0x28C8 - 0x28B0 + + .global Unk_ov5_021FB1DC +Unk_ov5_021FB1DC: ; 0x021FB1DC + .incbin "incbin/overlay5_rodata.bin", 0x28C8, 0x28EC - 0x28C8 + + .global Unk_ov5_021FB200 +Unk_ov5_021FB200: ; 0x021FB200 + .incbin "incbin/overlay5_rodata.bin", 0x28EC, 0x2910 - 0x28EC + + .global Unk_ov5_021FB224 +Unk_ov5_021FB224: ; 0x021FB224 + .incbin "incbin/overlay5_rodata.bin", 0x2910, 0x2934 - 0x2910 + + .global Unk_ov5_021FB248 +Unk_ov5_021FB248: ; 0x021FB248 + .incbin "incbin/overlay5_rodata.bin", 0x2934, 0x2970 - 0x2934 + + .global Unk_ov5_021FB284 +Unk_ov5_021FB284: ; 0x021FB284 + .incbin "incbin/overlay5_rodata.bin", 0x2970, 0x29AC - 0x2970 + + .global Unk_ov5_021FB2C0 +Unk_ov5_021FB2C0: ; 0x021FB2C0 + .incbin "incbin/overlay5_rodata.bin", 0x29AC, 0x29E8 - 0x29AC + + .global Unk_ov5_021FB2FC +Unk_ov5_021FB2FC: ; 0x021FB2FC + .incbin "incbin/overlay5_rodata.bin", 0x29E8, 0x2A24 - 0x29E8 + + .global Unk_ov5_021FB338 +Unk_ov5_021FB338: ; 0x021FB338 + .incbin "incbin/overlay5_rodata.bin", 0x2A24, 0x2A6C - 0x2A24 + + .global Unk_ov5_021FB380 +Unk_ov5_021FB380: ; 0x021FB380 + .incbin "incbin/overlay5_rodata.bin", 0x2A6C, 0x2AD8 - 0x2A6C + + .global Unk_ov5_021FB3EC +Unk_ov5_021FB3EC: ; 0x021FB3EC + .incbin "incbin/overlay5_rodata.bin", 0x2AD8, 0x2B5C - 0x2AD8 + + .global Unk_ov5_021FB470 +Unk_ov5_021FB470: ; 0x021FB470 + .incbin "incbin/overlay5_rodata.bin", 0x2B5C, 0x2B70 - 0x2B5C + + .global Unk_ov5_021FB484 +Unk_ov5_021FB484: ; 0x021FB484 + .incbin "incbin/overlay5_rodata.bin", 0x2B70, 0x2C08 - 0x2B70 + + .global Unk_ov5_021FB51C +Unk_ov5_021FB51C: ; 0x021FB51C + .incbin "incbin/overlay5_rodata.bin", 0x2C08, 0x2CA8 - 0x2C08 + + .global Unk_ov5_021FB5BC +Unk_ov5_021FB5BC: ; 0x021FB5BC + .incbin "incbin/overlay5_rodata.bin", 0x2CA8, 0x2D68 - 0x2CA8 + + .global Unk_ov5_021FB67C +Unk_ov5_021FB67C: ; 0x021FB67C + .incbin "incbin/overlay5_rodata.bin", 0x2D68, 0x3068 - 0x2D68 + + .global Unk_ov5_021FB97C +Unk_ov5_021FB97C: ; 0x021FB97C + .incbin "incbin/overlay5_rodata.bin", 0x3068, 0x3880 - 0x3068 + + .global Unk_ov5_021FC194 +Unk_ov5_021FC194: ; 0x021FC194 + .incbin "incbin/overlay5_rodata.bin", 0x3880, 0x40A0 - 0x3880 + + .global Unk_ov5_021FC9B4 +Unk_ov5_021FC9B4: ; 0x021FC9B4 + .incbin "incbin/overlay5_rodata.bin", 0x40A0, 0x4E68 - 0x40A0 + + .global Unk_ov5_021FD77C +Unk_ov5_021FD77C: ; 0x021FD77C + .incbin "incbin/overlay5_rodata.bin", 0x4E68, 0x1B90 + diff --git a/asm/ov5_021FF6B8.s b/asm/ov5_021FF6B8.s new file mode 100644 index 000000000..7c72b1703 --- /dev/null +++ b/asm/ov5_021FF6B8.s @@ -0,0 +1,24 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .rodata + + + .global Unk_ov5_021FF6B8 +Unk_ov5_021FF6B8: ; 0x021FF6B8 + .incbin "incbin/overlay5_rodata.bin", 0x6DA4, 0x6E30 - 0x6DA4 + + .global Unk_ov5_021FF744 +Unk_ov5_021FF744: ; 0x021FF744 + .incbin "incbin/overlay5_rodata.bin", 0x6E30, 0x6EBC - 0x6E30 + + .global Unk_ov5_021FF7D0 +Unk_ov5_021FF7D0: ; 0x021FF7D0 + .incbin "incbin/overlay5_rodata.bin", 0x6EBC, 0x6F48 - 0x6EBC + + .global Unk_ov5_021FF85C +Unk_ov5_021FF85C: ; 0x021FF85C + .incbin "incbin/overlay5_rodata.bin", 0x6F48, 0x1A4 + diff --git a/asm/ov62_0222F2C0.s b/asm/ov62_0222F2C0.s new file mode 100644 index 000000000..88c1d78d9 --- /dev/null +++ b/asm/ov62_0222F2C0.s @@ -0,0 +1,1735 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_0222F2C0 +ov62_0222F2C0: ; 0x0222F2C0 + push {r3, r4, r5, lr} + sub sp, #0x28 + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _0222F500 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _0222F504 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #4 + mov r1, #0x66 + bl sub_0201DBEC + mov r0, #0xa2 + mov r1, #0x66 + bl sub_02006C24 + str r0, [r4, #0x14] + mov r0, #0x66 + bl sub_02018340 + str r0, [r4, #0x24] + mov r0, #0x66 + bl sub_02002F38 + str r0, [r4, #0x28] + mov r0, #4 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + mov r0, #0x66 + mov r2, #1 + add r3, r1, #0 + bl sub_02024220 + str r0, [r4, #0x60] + mov r0, #0x66 + bl sub_0200762C + str r0, [r4, #0x64] + bl sub_020A73C0 + ldr r0, [r4, #0x28] + mov r1, #1 + bl sub_02003858 + mov r2, #2 + ldr r0, [r4, #0x28] + mov r1, #0 + lsl r2, r2, #8 + mov r3, #0x66 + bl sub_02002F70 + mov r1, #1 + ldr r0, [r4, #0x28] + lsl r2, r1, #9 + mov r3, #0x66 + bl sub_02002F70 + mov r1, #2 + ldr r0, [r4, #0x28] + lsl r2, r1, #8 + mov r3, #0x66 + bl sub_02002F70 + mov r2, #2 + ldr r0, [r4, #0x28] + mov r1, #3 + lsl r2, r2, #8 + mov r3, #0x66 + bl sub_02002F70 + ldr r0, [r4, #0x24] + bl ov62_0222F670 + add r0, r4, #0 + bl ov62_0222F848 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + mov r0, #1 + str r0, [r4, #0x44] + add r0, r4, #0 + bl ov62_0222FF40 + mov r0, #1 + bl sub_02002B20 + ldr r0, _0222F508 ; =ov62_0222F8E4 + add r1, r4, #0 + bl sub_02017798 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0222F406 + add r0, r4, #0 + bl ov62_02241130 + ldr r1, _0222F50C ; =0x00200010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + ldr r1, _0222F50C ; =0x00200010 + mov r0, #2 + bl sub_0200966C + mov r0, #2 + bl sub_02009704 + bl sub_02039734 + mov r0, #1 + mov r1, #0x66 + bl sub_020397C8 + mov r0, #0x66 + bl sub_020394A8 + add r1, sp, #0x10 + add r5, r0, #0 + bl sub_020A71B0 + mov r0, #0x20 + str r0, [sp] + ldr r1, [sp, #0x10] + ldr r0, [r4, #0x28] + ldr r1, [r1, #0xc] + mov r2, #2 + mov r3, #0xe0 + bl sub_02002FBC + mov r0, #0x20 + str r0, [sp] + ldr r1, [sp, #0x10] + ldr r0, [r4, #0x28] + ldr r1, [r1, #0xc] + mov r2, #3 + mov r3, #0xe0 + bl sub_02002FBC + add r0, r5, #0 + bl sub_020181C4 +_0222F406: + mov r0, #0xc + str r0, [sp, #0x14] + mov r0, #0x66 + str r0, [sp, #0x18] + ldr r0, [r4, #0] + mov r1, #1 + str r0, [sp, #0x20] + lsl r0, r1, #0x14 + str r0, [sp, #0x24] + ldr r0, [r4, #0x18] + mov r5, sp + str r0, [sp, #4] + ldr r0, [r4, #0x1c] + sub r5, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #0x28] + add r3, sp, #0x14 + str r1, [sp, #0x1c] + str r0, [sp, #0xc] + ldmia r3!, {r0, r1} + add r2, r5, #0 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldmia r5!, {r0, r1, r2, r3} + bl sub_0208B284 + mov r1, #0x6f + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r4, r1] + add r1, r4, #0 + add r1, #0x5c + ldrb r1, [r1] + bl sub_0208B878 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B8B0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #2 + str r0, [sp, #0x1c] + lsl r0, r0, #0x13 + str r0, [sp, #0x24] + ldr r0, [r4, #0x18] + mov r5, sp + str r0, [sp, #4] + ldr r0, [r4, #0x1c] + sub r5, #0x10 + str r0, [sp, #8] + ldr r0, [r4, #0x28] + add r3, sp, #0x14 + str r0, [sp, #0xc] + ldmia r3!, {r0, r1} + add r2, r5, #0 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldmia r5!, {r0, r1, r2, r3} + bl sub_0208B284 + ldr r1, _0222F510 ; =0x000006F4 + str r0, [r4, r1] + ldr r0, [r4, r1] + add r1, r4, #0 + add r1, #0x5c + ldrb r1, [r1] + bl sub_0208B878 + ldr r0, _0222F510 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B8B0 + ldr r0, _0222F510 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + mov r0, #0x14 + mov r1, #0x66 + bl sub_02012744 + str r0, [r4, #0x50] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xa + mov r3, #0x66 + bl sub_0200B144 + str r0, [r4, #0x48] + mov r0, #0 + mov r1, #0x1a + mov r2, #0x14 + mov r3, #0x66 + bl sub_0200B144 + str r0, [r4, #0x4c] + add r0, r4, #0 + bl ov62_022338A8 + add r0, r4, #0 + bl sub_0208C06C + add r0, r4, #0 + bl ov62_022300D8 + add r0, r4, #0 + bl ov62_022337D4 + add sp, #0x28 + pop {r3, r4, r5, pc} + nop +_0222F500: .word 0xFFFFE0FF +_0222F504: .word 0x04001000 +_0222F508: .word ov62_0222F8E4 +_0222F50C: .word 0x00200010 +_0222F510: .word 0x000006F4 + thumb_func_end ov62_0222F2C0 + + thumb_func_start ov62_0222F514 +ov62_0222F514: ; 0x0222F514 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #0x24] + mov r1, #0 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #1 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #4 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #5 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019044 + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019044 + ldr r0, [r5, #0x24] + bl sub_020181C4 + ldr r0, [r5, #0x28] + mov r1, #0 + bl sub_02002FA0 + ldr r0, [r5, #0x28] + mov r1, #1 + bl sub_02002FA0 + ldr r0, [r5, #0x28] + mov r1, #2 + bl sub_02002FA0 + ldr r0, [r5, #0x28] + mov r1, #3 + bl sub_02002FA0 + ldr r0, [r5, #0x28] + bl sub_02002F54 + ldr r0, [r5, #0] + cmp r0, #0 + bne _0222F5DE + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0202783C + add r1, r5, #0 + add r1, #0x5c + ldrb r1, [r1] + bl sub_0202798C +_0222F5DE: + ldr r0, [r5, #0x14] + bl sub_02006CA8 + ldr r0, _0222F664 ; =0x0000416C + ldr r0, [r5, r0] + bl sub_0200DA58 + ldr r0, [r5, #0x18] + ldr r1, [r5, #0x1c] + bl sub_0200D0B0 + ldr r0, [r5, #0x18] + bl sub_0200C8D4 + bl sub_02039794 + bl sub_0201E530 + ldr r0, [r5, #0x2c] + bl sub_02024034 + mov r0, #0 + bl sub_02002B20 + ldr r7, _0222F668 ; =0x0000087C + mov r6, #0 + add r4, r5, #0 +_0222F614: + ldr r0, [r4, r7] + cmp r0, #0 + beq _0222F61E + bl sub_020181C4 +_0222F61E: + ldr r0, _0222F66C ; =0x0000088C + ldr r0, [r4, r0] + cmp r0, #0 + beq _0222F62A + bl sub_020181C4 +_0222F62A: + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0222F614 + ldr r0, [r5, #0x50] + bl sub_020127BC + ldr r0, [r5, #0x48] + bl sub_0200B190 + ldr r0, [r5, #0x4c] + bl sub_0200B190 + ldr r0, [r5, #0x60] + bl sub_020242C4 + ldr r0, [r5, #0x64] + bl sub_02007B6C + add r0, r5, #0 + bl ov62_022411EC + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_0201DC3C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222F664: .word 0x0000416C +_0222F668: .word 0x0000087C +_0222F66C: .word 0x0000088C + thumb_func_end ov62_0222F514 + + thumb_func_start ov62_0222F670 +ov62_0222F670: ; 0x0222F670 + push {r4, r5, lr} + sub sp, #0x3c + add r4, r0, #0 + bl sub_0201FF00 + ldr r5, _0222F7F4 ; =0x0224872C + add r3, sp, #0x2c + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0222F7F8 ; =0x02248788 + add r3, sp, #4 + mov r2, #5 +_0222F694: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0222F694 + add r0, sp, #4 + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0 + ldr r2, _0222F7FC ; =0x022487B0 + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + ldr r2, _0222F800 ; =0x022487CC + add r0, r4, #0 + mov r1, #1 + mov r3, #0 + bl sub_020183C4 + ldr r2, _0222F804 ; =0x022487E8 + add r0, r4, #0 + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + ldr r2, _0222F808 ; =0x02248804 + add r0, r4, #0 + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + ldr r2, _0222F80C ; =0x02248820 + add r0, r4, #0 + mov r1, #4 + mov r3, #0 + bl sub_020183C4 + ldr r2, _0222F810 ; =0x0224883C + add r0, r4, #0 + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + ldr r2, _0222F814 ; =0x02248858 + add r0, r4, #0 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + ldr r2, _0222F818 ; =0x02248874 + add r0, r4, #0 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #5 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #6 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #7 + bl sub_02019EBC + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #1 + bl ov62_0222F824 + mov r0, #8 + str r0, [sp] + ldr r0, _0222F81C ; =0x04000050 + mov r1, #4 + mov r2, #0x12 + mov r3, #7 + bl sub_020BF55C + mov r0, #8 + str r0, [sp] + ldr r0, _0222F820 ; =0x04001050 + mov r1, #4 + mov r2, #0x12 + mov r3, #7 + bl sub_020BF55C + add sp, #0x3c + pop {r4, r5, pc} + ; .align 2, 0 +_0222F7F4: .word 0x0224872C +_0222F7F8: .word 0x02248788 +_0222F7FC: .word 0x022487B0 +_0222F800: .word 0x022487CC +_0222F804: .word 0x022487E8 +_0222F808: .word 0x02248804 +_0222F80C: .word 0x02248820 +_0222F810: .word 0x0224883C +_0222F814: .word 0x02248858 +_0222F818: .word 0x02248874 +_0222F81C: .word 0x04000050 +_0222F820: .word 0x04001050 + thumb_func_end ov62_0222F670 + + thumb_func_start ov62_0222F824 +ov62_0222F824: ; 0x0222F824 + ldr r1, _0222F82C ; =0x021BF6DC + ldr r3, _0222F830 ; =sub_0201FFE8 + strb r0, [r1, #5] + bx r3 + ; .align 2, 0 +_0222F82C: .word 0x021BF6DC +_0222F830: .word sub_0201FFE8 + thumb_func_end ov62_0222F824 + + thumb_func_start ov62_0222F834 +ov62_0222F834: ; 0x0222F834 + push {r3, lr} + ldr r0, [r0, #0x24] + ldr r2, _0222F844 ; =0x022487E8 + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + pop {r3, pc} + ; .align 2, 0 +_0222F844: .word 0x022487E8 + thumb_func_end ov62_0222F834 + + thumb_func_start ov62_0222F848 +ov62_0222F848: ; 0x0222F848 + push {r3, r4, r5, r6, lr} + sub sp, #0x4c + add r4, r0, #0 + mov r0, #0x66 + bl sub_0200C6E4 + add r2, sp, #0x2c + ldr r5, _0222F8D8 ; =0x02248768 + str r0, [r4, #0x18] + ldmia r5!, {r0, r1} + add r3, r2, #0 + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + ldr r6, _0222F8DC ; =0x0224873C + stmia r2!, {r0, r1} + add r5, sp, #0x18 + ldmia r6!, {r0, r1} + add r2, r5, #0 + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r1, r3, #0 + str r0, [r5, #0] + ldr r0, [r4, #0x18] + mov r3, #0x20 + bl sub_0200C73C + ldr r3, _0222F8E0 ; =0x02248750 + add r2, sp, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x18] + bl sub_0200C704 + str r0, [r4, #0x1c] + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x1c] + mov r2, #0xc0 + bl sub_0200C7C0 + cmp r0, #0 + bne _0222F8B2 + bl sub_02022974 +_0222F8B2: + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x1c] + add r2, sp, #0 + bl sub_0200CB30 + cmp r0, #0 + bne _0222F8C4 + bl sub_02022974 +_0222F8C4: + ldr r0, [r4, #0x18] + bl sub_0200C738 + mov r2, #1 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + add sp, #0x4c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0222F8D8: .word 0x02248768 +_0222F8DC: .word 0x0224873C +_0222F8E0: .word 0x02248750 + thumb_func_end ov62_0222F848 + + thumb_func_start ov62_0222F8E4 +ov62_0222F8E4: ; 0x0222F8E4 + push {r4, lr} + add r4, r0, #0 + bl sub_0201DCAC + ldr r0, [r4, #0x28] + bl sub_02003694 + ldr r0, [r4, #0x24] + bl sub_0201C2B8 + ldr r3, _0222F908 ; =0x027E0000 + ldr r1, _0222F90C ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_0222F908: .word 0x027E0000 +_0222F90C: .word 0x00003FF8 + thumb_func_end ov62_0222F8E4 + + thumb_func_start ov62_0222F910 +ov62_0222F910: ; 0x0222F910 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #0x12 + bls _0222F91E + b _0222FAEA +_0222F91E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0222F92A: ; jump table + .short _0222F950 - _0222F92A - 2 ; case 0 + .short _0222F988 - _0222F92A - 2 ; case 1 + .short _0222F9A0 - _0222F92A - 2 ; case 2 + .short _0222F9B8 - _0222F92A - 2 ; case 3 + .short _0222F9D0 - _0222F92A - 2 ; case 4 + .short _0222F9E8 - _0222F92A - 2 ; case 5 + .short _0222FA00 - _0222F92A - 2 ; case 6 + .short _0222FA18 - _0222F92A - 2 ; case 7 + .short _0222FA30 - _0222F92A - 2 ; case 8 + .short _0222FA30 - _0222F92A - 2 ; case 9 + .short _0222FA48 - _0222F92A - 2 ; case 10 + .short _0222FA48 - _0222F92A - 2 ; case 11 + .short _0222FA60 - _0222F92A - 2 ; case 12 + .short _0222FA78 - _0222F92A - 2 ; case 13 + .short _0222FA90 - _0222F92A - 2 ; case 14 + .short _0222FAA8 - _0222F92A - 2 ; case 15 + .short _0222FAC0 - _0222F92A - 2 ; case 16 + .short _0222FACC - _0222F92A - 2 ; case 17 + .short _0222FAE4 - _0222F92A - 2 ; case 18 +_0222F950: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB0C ; =0x02248BD8 + ldr r1, [r1, r2] + blx r1 + add r6, r0, #0 + add r0, r4, #0 + mov r1, #1 + add r2, r6, #0 + add r3, r5, #0 + bl ov62_0222FB44 + cmp r6, #0 + bne _0222F96E + b _0222FAEE +_0222F96E: + ldr r0, [r4, #0x44] + cmp r0, #1 + bne _0222F97E + add r0, r4, #0 + mov r1, #0 + bl ov62_0222FB60 + b _0222FAEE +_0222F97E: + add r0, r4, #0 + mov r1, #1 + bl ov62_0222FB60 + b _0222FAEE +_0222F988: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB10 ; =0x02248BF0 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222F9A0: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB14 ; =0x02248C28 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222F9B8: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB18 ; =0x02248C50 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222F9D0: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB1C ; =0x02248D08 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222F9E8: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB20 ; =0x02248D20 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA00: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB24 ; =0x02248E24 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA18: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB28 ; =0x02248E50 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA30: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB2C ; =0x02248F58 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA48: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB30 ; =0x022490DC + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA60: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB30 ; =0x022490DC + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA78: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB34 ; =0x02249680 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FA90: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB38 ; =0x0224962C + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FAA8: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB3C ; =0x02249618 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FAC0: + mov r1, #0xff + mov r2, #1 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FACC: + ldr r1, [r4, #4] + lsl r2, r1, #2 + ldr r1, _0222FB40 ; =0x02249790 + ldr r1, [r1, r2] + blx r1 + add r2, r0, #0 + add r0, r4, #0 + mov r1, #0x10 + add r3, r5, #0 + bl ov62_0222FB44 + b _0222FAEE +_0222FAE4: + bl ov62_022348FC + b _0222FAEE +_0222FAEA: + mov r0, #1 + pop {r4, r5, r6, pc} +_0222FAEE: + bl sub_020241B4 + ldr r0, [r4, #0x64] + bl sub_02007768 + mov r0, #1 + mov r1, #0 + bl sub_020241BC + add r0, r4, #0 + bl ov62_022411D4 + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_0222FB0C: .word 0x02248BD8 +_0222FB10: .word 0x02248BF0 +_0222FB14: .word 0x02248C28 +_0222FB18: .word 0x02248C50 +_0222FB1C: .word 0x02248D08 +_0222FB20: .word 0x02248D20 +_0222FB24: .word 0x02248E24 +_0222FB28: .word 0x02248E50 +_0222FB2C: .word 0x02248F58 +_0222FB30: .word 0x022490DC +_0222FB34: .word 0x02249680 +_0222FB38: .word 0x0224962C +_0222FB3C: .word 0x02249618 +_0222FB40: .word 0x02249790 + thumb_func_end ov62_0222F910 + + thumb_func_start ov62_0222FB44 +ov62_0222FB44: ; 0x0222FB44 + push {r4, lr} + add r4, r0, #0 + cmp r2, #0 + beq _0222FB5C + str r1, [r3, #0] + mov r1, #0 + bl ov62_0222FB60 + add r0, r4, #0 + mov r1, #0 + bl ov62_0222FB6C +_0222FB5C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_0222FB44 + + thumb_func_start ov62_0222FB60 +ov62_0222FB60: ; 0x0222FB60 + str r1, [r0, #4] + mov r1, #0 + str r1, [r0, #8] + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov62_0222FB60 + + thumb_func_start ov62_0222FB6C +ov62_0222FB6C: ; 0x0222FB6C + str r1, [r0, #8] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov62_0222FB6C + + thumb_func_start ov62_0222FB74 +ov62_0222FB74: ; 0x0222FB74 + push {r4, lr} + add r4, r0, #0 + bl sub_0208C06C + add r0, r4, #0 + bl ov62_02230A5C + ldr r0, _0222FB8C ; =0x000006E4 + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + nop +_0222FB8C: .word 0x000006E4 + thumb_func_end ov62_0222FB74 + + thumb_func_start ov62_0222FB90 +ov62_0222FB90: ; 0x0222FB90 + push {r4, r5, r6, lr} + ldr r2, _0222FBF0 ; =0x000006D8 + ldr r3, _0222FBF4 ; =0x00000818 + ldr r4, [r0, r2] + ldr r1, [r0, r3] + lsl r4, r4, #2 + add r5, r0, r4 + add r4, r3, #4 + str r1, [r5, r4] + add r1, r2, #0 + add r1, #0xc + ldr r1, [r0, r1] + ldr r5, [r0, r3] + add r4, r1, #0 + ldr r1, [r0, r2] + mov r6, #0x24 + mul r4, r6 + lsl r1, r1, #2 + add r5, r5, r4 + add r4, r0, r1 + add r1, r2, #0 + sub r1, #0x14 + str r5, [r4, r1] + add r4, r2, #0 + add r4, #0xc + ldr r4, [r0, r4] + ldr r1, [r0, r3] + add r5, r4, #0 + mul r5, r6 + add r1, r1, r5 + ldr r1, [r1, #0x20] + mov r4, #0 + str r1, [r0, r3] + ldr r1, [r0, r2] + add r1, r1, #1 + str r1, [r0, r2] + add r2, #0xc + str r4, [r0, r2] + ldr r1, [r0, r3] + cmp r1, #0 + bne _0222FBE6 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_0222FBE6: + bl ov62_0222FB74 + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_0222FBF0: .word 0x000006D8 +_0222FBF4: .word 0x00000818 + thumb_func_end ov62_0222FB90 + + thumb_func_start ov62_0222FBF8 +ov62_0222FBF8: ; 0x0222FBF8 + push {r3, lr} + ldr r1, _0222FC14 ; =0x000006D8 + ldr r1, [r0, r1] + lsl r1, r1, #2 + add r2, r0, r1 + ldr r1, _0222FC18 ; =0x0000081C + ldr r2, [r2, r1] + sub r1, r1, #4 + str r2, [r0, r1] + bl ov62_0222FB74 + mov r0, #1 + pop {r3, pc} + nop +_0222FC14: .word 0x000006D8 +_0222FC18: .word 0x0000081C + thumb_func_end ov62_0222FBF8 + + thumb_func_start ov62_0222FC1C +ov62_0222FC1C: ; 0x0222FC1C + push {r3, r4, r5, lr} + ldr r3, _0222FD34 ; =0x000006E4 + add r4, r0, #0 + ldr r1, _0222FD38 ; =0x00000818 + ldr r5, [r4, r3] + mov r3, #0x24 + ldr r2, [r4, r1] + mul r3, r5 + add r2, r2, r3 + ldr r2, [r2, #0x10] + cmp r2, #0x13 + bhi _0222FD30 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0222FC40: ; jump table + .short _0222FD30 - _0222FC40 - 2 ; case 0 + .short _0222FD30 - _0222FC40 - 2 ; case 1 + .short _0222FC68 - _0222FC40 - 2 ; case 2 + .short _0222FD30 - _0222FC40 - 2 ; case 3 + .short _0222FC7E - _0222FC40 - 2 ; case 4 + .short _0222FC8A - _0222FC40 - 2 ; case 5 + .short _0222FD30 - _0222FC40 - 2 ; case 6 + .short _0222FD26 - _0222FC40 - 2 ; case 7 + .short _0222FC96 - _0222FC40 - 2 ; case 8 + .short _0222FCA2 - _0222FC40 - 2 ; case 9 + .short _0222FCAE - _0222FC40 - 2 ; case 10 + .short _0222FCBA - _0222FC40 - 2 ; case 11 + .short _0222FCC6 - _0222FC40 - 2 ; case 12 + .short _0222FCD2 - _0222FC40 - 2 ; case 13 + .short _0222FCDE - _0222FC40 - 2 ; case 14 + .short _0222FCEA - _0222FC40 - 2 ; case 15 + .short _0222FCF6 - _0222FC40 - 2 ; case 16 + .short _0222FD02 - _0222FC40 - 2 ; case 17 + .short _0222FD0E - _0222FC40 - 2 ; case 18 + .short _0222FD1A - _0222FC40 - 2 ; case 19 +_0222FC68: + add r1, #0x50 + ldr r0, [r4, r1] + mov r1, #0 + add r2, r1, #0 + bl sub_0208BA84 + add r0, r4, #0 + mov r1, #2 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_0222FC7E: + ldr r3, [r4, #0x10] + mov r1, #2 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FC8A: + ldr r3, [r4, #0x10] + mov r1, #3 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FC96: + ldr r3, [r4, #0x10] + mov r1, #4 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCA2: + ldr r3, [r4, #0x10] + mov r1, #5 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCAE: + ldr r3, [r4, #0x10] + mov r1, #6 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCBA: + ldr r3, [r4, #0x10] + mov r1, #7 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCC6: + ldr r3, [r4, #0x10] + mov r1, #8 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCD2: + ldr r3, [r4, #0x10] + mov r1, #9 + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCDE: + ldr r3, [r4, #0x10] + mov r1, #0xa + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCEA: + ldr r3, [r4, #0x10] + mov r1, #0xb + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FCF6: + ldr r3, [r4, #0x10] + mov r1, #0xc + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FD02: + ldr r3, [r4, #0x10] + mov r1, #0xd + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FD0E: + ldr r3, [r4, #0x10] + mov r1, #0xe + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FD1A: + ldr r3, [r4, #0x10] + mov r1, #0xf + mov r2, #1 + bl ov62_0222FB44 + pop {r3, r4, r5, pc} +_0222FD26: + ldr r3, [r4, #0x10] + mov r1, #0x11 + mov r2, #1 + bl ov62_0222FB44 +_0222FD30: + pop {r3, r4, r5, pc} + nop +_0222FD34: .word 0x000006E4 +_0222FD38: .word 0x00000818 + thumb_func_end ov62_0222FC1C + + thumb_func_start ov62_0222FD3C +ov62_0222FD3C: ; 0x0222FD3C + push {r4, r5, r6, lr} + ldr r3, _0222FDF8 ; =0x000006E4 + add r5, r0, #0 + ldr r1, _0222FDFC ; =0x00000818 + ldr r4, [r5, r3] + mov r3, #0x24 + ldr r2, [r5, r1] + mul r3, r4 + add r2, r2, r3 + ldr r4, [r2, #0x18] + ldr r2, [r5, #0] + mov r6, #1 + cmp r2, #6 + bhi _0222FD72 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0222FD64: ; jump table + .short _0222FD72 - _0222FD64 - 2 ; case 0 + .short _0222FD72 - _0222FD64 - 2 ; case 1 + .short _0222FDCA - _0222FD64 - 2 ; case 2 + .short _0222FDE0 - _0222FD64 - 2 ; case 3 + .short _0222FDE0 - _0222FD64 - 2 ; case 4 + .short _0222FD8E - _0222FD64 - 2 ; case 5 + .short _0222FDB2 - _0222FD64 - 2 ; case 6 +_0222FD72: + cmp r4, #3 + bhi _0222FDE0 + lsl r0, r4, #2 + add r1, r5, r0 + ldr r0, _0222FE00 ; =0x0000087C + ldr r0, [r1, r0] + cmp r0, #0 + bne _0222FDE0 + ldr r1, _0222FE04 ; =0x0000010D + add r0, r5, #0 + bl ov62_0223197C + mov r6, #0 + b _0222FDE0 +_0222FD8E: + cmp r4, #0 + bne _0222FDE0 + add r1, #0x18 + ldr r0, [r5, r1] + bl sub_0202A750 + add r1, r4, #0 + bl sub_02029CA8 + bl sub_02029F34 + add r6, r0, #0 + bne _0222FDE0 + ldr r1, _0222FE08 ; =0x00000122 + add r0, r5, #0 + bl ov62_0223197C + b _0222FDE0 +_0222FDB2: + cmp r4, #0x64 + bne _0222FDE0 + bl ov62_02231974 + cmp r0, #0 + beq _0222FDE0 + ldr r1, _0222FE0C ; =0x00000111 + add r0, r5, #0 + bl ov62_0223197C + mov r6, #0 + b _0222FDE0 +_0222FDCA: + ldr r2, _0222FE10 ; =0x0000270F + cmp r4, r2 + bne _0222FDE0 + add r1, #0x64 + ldr r1, [r5, r1] + cmp r1, #0 + bne _0222FDE0 + mov r1, #0x81 + bl ov62_0223197C + mov r6, #0 +_0222FDE0: + cmp r6, #0 + bne _0222FDEC + ldr r0, _0222FE14 ; =0x00000564 + bl sub_02005748 + b _0222FDF2 +_0222FDEC: + ldr r0, _0222FE18 ; =0x00000563 + bl sub_02005748 +_0222FDF2: + add r0, r6, #0 + pop {r4, r5, r6, pc} + nop +_0222FDF8: .word 0x000006E4 +_0222FDFC: .word 0x00000818 +_0222FE00: .word 0x0000087C +_0222FE04: .word 0x0000010D +_0222FE08: .word 0x00000122 +_0222FE0C: .word 0x00000111 +_0222FE10: .word 0x0000270F +_0222FE14: .word 0x00000564 +_0222FE18: .word 0x00000563 + thumb_func_end ov62_0222FD3C + + thumb_func_start ov62_0222FE1C +ov62_0222FE1C: ; 0x0222FE1C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #0 + bne _0222FF1C + ldr r0, _0222FF20 ; =0x000006E4 + str r5, [r4, r0] + add r0, r4, #0 + bl ov62_0222FD3C + cmp r0, #0 + beq _0222FF1C + cmp r5, #4 + bhi _0222FF1C + mov r0, #0x28 + mul r0, r5 + add r1, r4, r0 + ldr r0, _0222FF24 ; =0x000005FC + add r2, sp, #0 + ldr r0, [r1, r0] + add r1, sp, #0 + add r1, #2 + bl ov62_02230E74 + mov r0, #0x6f + lsl r0, r0, #4 + add r3, sp, #0 + mov r1, #2 + ldrsh r1, [r3, r1] + mov r2, #0 + ldrsh r2, [r3, r2] + add r1, #0x10 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + asr r1, r1, #0x10 + bl sub_0208B948 + mov r0, #0x6f + lsl r0, r0, #4 + add r3, sp, #0 + mov r1, #2 + ldrsh r1, [r3, r1] + mov r2, #0 + ldrsh r2, [r3, r2] + add r1, #0x10 + lsl r1, r1, #0x10 + ldr r0, [r4, r0] + asr r1, r1, #0x10 + bl sub_0208B8B8 + ldr r2, _0222FF20 ; =0x000006E4 + ldr r1, _0222FF28 ; =0x00000818 + ldr r0, [r4, r2] + ldr r6, [r4, r1] + mov r3, #0x24 + add r5, r0, #0 + mul r5, r3 + add r0, r6, r5 + ldr r5, [r0, #0x18] + add r0, r1, #0 + add r0, #0x54 + str r5, [r4, r0] + ldr r5, [r4, r1] + ldr r1, [r4, r2] + add r0, r4, #0 + add r2, r1, #0 + mul r2, r3 + add r1, r5, r2 + ldr r1, [r1, #0x14] + bl ov62_0222FB60 + ldr r1, _0222FF20 ; =0x000006E4 + ldr r0, _0222FF28 ; =0x00000818 + ldr r2, [r4, r1] + mov r1, #0x24 + ldr r3, [r4, r0] + mul r1, r2 + add r1, r3, r1 + ldr r1, [r1, #0x14] + cmp r1, #2 + bne _0222FECE + add r0, #0x50 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA84 + b _0222FEE0 +_0222FECE: + add r0, r4, #0 + bl ov62_02230014 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 +_0222FEE0: + ldr r1, _0222FF2C ; =0x0000086C + ldr r0, _0222FF30 ; =0x000003E7 + ldr r2, [r4, r1] + cmp r2, r0 + bne _0222FEF6 + add r0, r4, #0 + mov r1, #0xc1 + bl ov62_02231BC4 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222FEF6: + ldr r0, _0222FF34 ; =0x0000270F + cmp r2, r0 + bne _0222FF08 + ldr r1, _0222FF38 ; =0x0000012D + add r0, r4, #0 + bl ov62_02231BC4 + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0222FF08: + add r1, #0x30 + ldr r0, [r4, r1] + cmp r0, #0 + beq _0222FF1C + add r0, r4, #0 + bl ov62_02231A1C + ldr r0, _0222FF3C ; =0x0000089C + mov r1, #0 + str r1, [r4, r0] +_0222FF1C: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0222FF20: .word 0x000006E4 +_0222FF24: .word 0x000005FC +_0222FF28: .word 0x00000818 +_0222FF2C: .word 0x0000086C +_0222FF30: .word 0x000003E7 +_0222FF34: .word 0x0000270F +_0222FF38: .word 0x0000012D +_0222FF3C: .word 0x0000089C + thumb_func_end ov62_0222FE1C + + thumb_func_start ov62_0222FF40 +ov62_0222FF40: ; 0x0222FF40 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + add r2, r4, #0 + ldr r0, _0222FF74 ; =0x0000060C + mov r1, #0 + add r2, #0x30 + add r3, r4, #0 +_0222FF50: + add r1, r1, #1 + str r2, [r3, r0] + add r2, r2, #4 + add r3, #0x28 + cmp r1, #5 + blt _0222FF50 + mov r0, #0x66 + str r0, [sp] + add r0, r4, #0 + ldr r2, _0222FF78 ; =ov62_0222FE1C + add r0, #0x30 + mov r1, #5 + add r3, r4, #0 + bl sub_02023FCC + str r0, [r4, #0x2c] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0222FF74: .word 0x0000060C +_0222FF78: .word ov62_0222FE1C + thumb_func_end ov62_0222FF40 + + thumb_func_start ov62_0222FF7C +ov62_0222FF7C: ; 0x0222FF7C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r1, _02230008 ; =0x00000818 + str r0, [sp] + ldr r0, [r0, r1] + cmp r0, #0 + beq _02230004 + mov r4, #0 + ldr r5, [sp] + str r4, [sp, #4] + add r6, r4, #0 + add r7, sp, #8 +_0222FF94: + ldr r1, [sp] + ldr r0, _02230008 ; =0x00000818 + ldr r0, [r1, r0] + ldr r0, [r0, r4] + cmp r0, #0 + bne _0222FFBA + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + strb r6, [r0] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + strb r6, [r0, #1] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + strb r6, [r0, #2] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + strb r6, [r0, #3] + b _0222FFF6 +_0222FFBA: + ldr r0, _02230010 ; =0x000005FC + add r1, sp, #8 + ldr r0, [r5, r0] + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + mov r0, #0 + ldrsh r1, [r7, r0] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + sub r1, #0x10 + strb r1, [r0] + mov r0, #0 + ldrsh r1, [r7, r0] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + add r1, #0x10 + strb r1, [r0, #1] + mov r0, #2 + ldrsh r1, [r7, r0] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + strb r1, [r0, #2] + mov r0, #2 + ldrsh r1, [r7, r0] + ldr r0, _0223000C ; =0x0000060C + ldr r0, [r5, r0] + add r1, #0xa0 + strb r1, [r0, #3] +_0222FFF6: + ldr r0, [sp, #4] + add r4, #0x24 + add r0, r0, #1 + add r5, #0x28 + str r0, [sp, #4] + cmp r0, #5 + blt _0222FF94 +_02230004: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02230008: .word 0x00000818 +_0223000C: .word 0x0000060C +_02230010: .word 0x000005FC + thumb_func_end ov62_0222FF7C + + thumb_func_start ov62_02230014 +ov62_02230014: ; 0x02230014 + push {r3, r4, r5, r6, r7, lr} + mov r6, #0 + ldr r7, _0223004C ; =0x0000060C + add r5, r0, #0 + add r4, r6, #0 +_0223001E: + ldr r0, _02230050 ; =0x000005FC + add r1, sp, #0 + ldr r0, [r5, r0] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + ldr r0, _0223004C ; =0x0000060C + add r6, r6, #1 + ldr r0, [r5, r0] + strb r4, [r0] + ldr r0, _0223004C ; =0x0000060C + ldr r0, [r5, r0] + strb r4, [r0, #1] + ldr r0, _0223004C ; =0x0000060C + ldr r0, [r5, r0] + strb r4, [r0, #2] + ldr r0, [r5, r7] + add r5, #0x28 + strb r4, [r0, #3] + cmp r6, #5 + blt _0223001E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223004C: .word 0x0000060C +_02230050: .word 0x000005FC + thumb_func_end ov62_02230014 + + thumb_func_start ov62_02230054 +ov62_02230054: ; 0x02230054 + ldr r3, _0223005C ; =sub_0202404C + ldr r0, [r0, #0x2c] + bx r3 + nop +_0223005C: .word sub_0202404C + thumb_func_end ov62_02230054 + + thumb_func_start ov62_02230060 +ov62_02230060: ; 0x02230060 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02230090 ; =0x000006D8 + ldr r1, [r4, r0] + cmp r1, #0 + ble _02230072 + sub r1, r1, #1 + str r1, [r4, r0] + b _0223007C +_02230072: + beq _0223007C + mov r1, #0 + str r1, [r4, r0] + bl sub_02022974 +_0223007C: + ldr r0, _02230090 ; =0x000006D8 + ldr r0, [r4, r0] + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02230094 ; =0x0000081C + ldr r1, [r1, r0] + sub r0, r0, #4 + str r1, [r4, r0] + pop {r4, pc} + nop +_02230090: .word 0x000006D8 +_02230094: .word 0x0000081C + thumb_func_end ov62_02230060 + + thumb_func_start ov62_02230098 +ov62_02230098: ; 0x02230098 + ldr r1, _022300B8 ; =0x00000838 + mov r3, #0 + str r3, [r0, r1] + mov r2, #0xff + add r1, r1, #4 + str r2, [r0, r1] + mov r1, #0x21 + add r2, r3, #0 + lsl r1, r1, #6 +_022300AA: + add r3, r3, #1 + str r2, [r0, r1] + add r0, r0, #4 + cmp r3, #8 + blt _022300AA + bx lr + nop +_022300B8: .word 0x00000838 + thumb_func_end ov62_02230098 + + thumb_func_start ov62_022300BC +ov62_022300BC: ; 0x022300BC + ldr r1, _022300C4 ; =0x00000838 + ldr r0, [r0, r1] + bx lr + nop +_022300C4: .word 0x00000838 + thumb_func_end ov62_022300BC + + thumb_func_start ov62_022300C8 +ov62_022300C8: ; 0x022300C8 + ldr r2, _022300D4 ; =0x00000838 + mov r3, #1 + str r3, [r0, r2] + add r2, r2, #4 + str r1, [r0, r2] + bx lr + ; .align 2, 0 +_022300D4: .word 0x00000838 + thumb_func_end ov62_022300C8 + + .rodata + + + .global Unk_ov62_0224872C +Unk_ov62_0224872C: ; 0x0224872C + .incbin "incbin/overlay62_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov62_0224873C +Unk_ov62_0224873C: ; 0x0224873C + .incbin "incbin/overlay62_rodata.bin", 0x10, 0x24 - 0x10 + + .global Unk_ov62_02248750 +Unk_ov62_02248750: ; 0x02248750 + .incbin "incbin/overlay62_rodata.bin", 0x24, 0x3C - 0x24 + + .global Unk_ov62_02248768 +Unk_ov62_02248768: ; 0x02248768 + .incbin "incbin/overlay62_rodata.bin", 0x3C, 0x5C - 0x3C + + .global Unk_ov62_02248788 +Unk_ov62_02248788: ; 0x02248788 + .incbin "incbin/overlay62_rodata.bin", 0x5C, 0x84 - 0x5C + + .global Unk_ov62_022487B0 +Unk_ov62_022487B0: ; 0x022487B0 + .incbin "incbin/overlay62_rodata.bin", 0x84, 0xF4 - 0x84 + + .global Unk_ov62_02248820 +Unk_ov62_02248820: ; 0x02248820 + .incbin "incbin/overlay62_rodata.bin", 0xF4, 0x70 + diff --git a/asm/ov62_022300D8.s b/asm/ov62_022300D8.s new file mode 100644 index 000000000..91a798a17 --- /dev/null +++ b/asm/ov62_022300D8.s @@ -0,0 +1,2784 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_022300D8 +ov62_022300D8: ; 0x022300D8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + ldr r0, [r7, #0] + ldr r6, [r7, #0x14] + ldr r4, [r7, #0x24] + ldr r5, [r7, #0x28] + cmp r0, #0 + bne _022301B6 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x43 + add r2, r4, #0 + mov r3, #1 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x43 + add r2, r4, #0 + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x45 + add r2, r4, #0 + mov r3, #5 + bl sub_0200710C + add r0, r7, #0 + mov r1, #3 + bl ov62_02231710 + add r2, r0, #0 + mov r1, #0 + mov r0, #0x12 + str r1, [sp] + lsl r0, r0, #4 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r0, r7, #0 + mov r1, #3 + bl ov62_02231710 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x12 + lsl r0, r0, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r0, r7, #0 + mov r1, #0 + bl ov62_02231710 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r0, r7, #0 + mov r1, #0 + bl ov62_02231710 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + b _02230260 +_022301B6: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x36 + add r2, r4, #0 + mov r3, #1 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x36 + add r2, r4, #0 + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x37 + add r2, r4, #0 + mov r3, #5 + bl sub_0200710C + mov r1, #0 + mov r0, #0x12 + str r1, [sp] + lsl r0, r0, #4 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r2, #0x35 + mov r3, #0x66 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x12 + lsl r0, r0, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r2, #0x35 + mov r3, #0x66 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r2, #0x34 + mov r3, #0x66 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #0xa2 + mov r2, #0x34 + mov r3, #0x66 + bl sub_02003050 +_02230260: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x46 + add r2, r4, #0 + mov r3, #5 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x46 + add r2, r4, #0 + mov r3, #1 + bl sub_0200710C + ldr r0, [r7, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + add r0, r5, #0 + mov r2, #2 + mov r3, #0x10 + bl sub_02003A2C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_022300D8 + + thumb_func_start ov62_022302A8 +ov62_022302A8: ; 0x022302A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + mov r5, #2 + ldr r6, [r0, #0x14] + ldr r4, [r0, #0x24] + cmp r2, #0 + beq _022302BA + mov r5, #0 +_022302BA: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + mov r1, #0x2d + add r2, r4, #0 + add r3, r7, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl sub_0200710C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov62_022302A8 + + thumb_func_start ov62_022302F0 +ov62_022302F0: ; 0x022302F0 + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r5, [r0, #0x24] + ldr r4, [r0, #0x14] + mov r0, #0 + str r0, [sp] + add r6, r1, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x2d + add r2, r5, #0 + add r3, r6, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #1 + add r2, r5, #0 + add r3, r6, #0 + bl sub_0200710C + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_022302F0 + + thumb_func_start ov62_02230330 +ov62_02230330: ; 0x02230330 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r1, r0, #0 + ldr r6, [r1, #0x18] + ldr r5, [r1, #0x1c] + ldr r7, [r1, #0x28] + ldr r1, [r1, #0] + str r0, [sp, #0x18] + ldr r4, [r0, #0x14] + cmp r1, #0 + bne _02230394 + mov r1, #2 + bl ov62_02231710 + str r4, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0223045C ; =0x0000270F + mov r1, #2 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r6, #0 + add r3, r5, #0 + bl sub_0200CDC4 + ldr r0, [sp, #0x18] + mov r1, #2 + bl ov62_02231710 + str r4, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _02230460 ; =0x00002710 + add r2, r6, #0 + str r0, [sp, #0x14] + add r0, r7, #0 + add r3, r5, #0 + bl sub_0200CDC4 + b _022303D6 +_02230394: + str r4, [sp] + mov r0, #0x33 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0223045C ; =0x0000270F + mov r1, #2 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r6, #0 + add r3, r5, #0 + bl sub_0200CDC4 + str r4, [sp] + mov r0, #0x33 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _02230460 ; =0x00002710 + add r2, r6, #0 + str r0, [sp, #0x14] + add r0, r7, #0 + add r3, r5, #0 + bl sub_0200CDC4 +_022303D6: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0223045C ; =0x0000270F + add r1, r5, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x41 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _02230460 ; =0x00002710 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x41 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _0223045C ; =0x0000270F + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x2e + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _0223045C ; =0x0000270F + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x2f + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _02230460 ; =0x00002710 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x2e + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02230460 ; =0x00002710 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x2f + bl sub_0200CE54 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223045C: .word 0x0000270F +_02230460: .word 0x00002710 + thumb_func_end ov62_02230330 + + thumb_func_start ov62_02230464 +ov62_02230464: ; 0x02230464 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x80 + str r0, [sp] + ldr r0, [r0, #0x18] + add r4, sp, #0x28 + str r0, [sp, #0x18] + ldr r0, [sp] + add r2, sp, #0x20 + ldr r0, [r0, #0x1c] + mov r1, #2 + str r0, [sp, #0x14] + mov r0, #0 + strh r0, [r2, #0x2c] + strh r0, [r2, #0x2e] + strh r0, [r2, #0x30] + strh r0, [r2, #0x32] + str r0, [sp, #0x10] + str r0, [sp, #0x54] + mov r0, #1 + str r0, [sp, #0x5c] + ldr r0, [sp, #0x10] + ldr r3, _02230640 ; =0x02248890 + str r0, [sp, #0x7c] + str r0, [sp, #0x58] + ldr r0, _02230644 ; =0x0000270F + str r1, [sp, #0x78] + str r0, [sp, #0x60] + str r0, [sp, #0x64] + str r0, [sp, #0x68] + str r0, [sp, #0x6c] + sub r0, r1, #3 + str r0, [sp, #0x70] + str r0, [sp, #0x74] + add r0, sp, #0x40 + str r0, [sp, #0xc] + ldrh r0, [r3, #0x22] + ldr r5, _02230648 ; =0x022488D8 + str r4, [sp, #8] + strh r0, [r2, #0x20] + ldrh r0, [r3, #0x24] + add r6, sp, #0x20 + strh r0, [r2, #0x22] + ldrh r0, [r3, #0x26] + strh r0, [r2, #0x24] + ldrh r0, [r3, #0x28] + strh r0, [r2, #0x26] + ldrh r0, [r3, #0x2a] + strh r0, [r2, #0x28] + ldrh r0, [r3, #0x2c] + strh r0, [r2, #0x2a] + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + ldrb r0, [r3] + ldr r4, [sp] + ldr r1, _0223064C ; =0x000006F8 + strb r0, [r2] + ldrb r0, [r3, #1] + strb r0, [r2, #1] + ldrb r0, [r3, #2] + strb r0, [r2, #2] + ldrb r0, [r3, #3] + strb r0, [r2, #3] + ldrb r0, [r3, #4] + strb r0, [r2, #4] + ldrb r0, [r3, #5] + strb r0, [r2, #5] + add r0, r4, #0 + add r0, r0, r1 + str r0, [sp, #4] +_022304F6: + ldr r0, [sp, #0x10] + mov r1, #3 + mov r7, #0 + add r5, r4, #0 + bl sub_020E1F6C + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] +_02230508: + cmp r7, #0 + bne _0223051C + mov r0, #1 + str r0, [sp, #0x5c] + ldr r0, _02230644 ; =0x0000270F + str r0, [sp, #0x60] + str r0, [sp, #0x64] + str r0, [sp, #0x68] + str r0, [sp, #0x6c] + b _0223052A +_0223051C: + mov r0, #2 + str r0, [sp, #0x5c] + ldr r0, _02230650 ; =0x00002710 + str r0, [sp, #0x60] + str r0, [sp, #0x64] + str r0, [sp, #0x68] + str r0, [sp, #0x6c] +_0223052A: + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + add r2, sp, #0x4c + bl sub_0200CE6C + ldr r1, _0223064C ; =0x000006F8 + ldr r2, [sp, #0xc] + str r0, [r5, r1] + add r0, r1, #0 + mov r1, #0 + ldrsh r1, [r2, r1] + ldr r0, [r5, r0] + mov r2, #0x60 + bl ov62_02230E68 + ldr r0, _0223064C ; =0x000006F8 + ldr r0, [r5, r0] + bl sub_0200D330 + ldr r0, _0223064C ; =0x000006F8 + mov r1, #2 + ldr r0, [r5, r0] + bl sub_0200D6A4 + ldr r0, _0223064C ; =0x000006F8 + ldr r1, [sp, #8] + mov r2, #0xfe + ldr r0, [r5, r0] + ldr r1, [r1, #0] + lsl r2, r2, #0x16 + bl sub_0200D6E8 + mov r0, #0x72 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r1, [sp, #0x1c] + sub r0, #0xf + strb r1, [r4, r0] + ldr r0, _02230654 ; =0x00000724 + mov r1, #0 + str r1, [r4, r0] + ldr r0, [sp, #8] + ldr r1, [r0, #0] + ldr r0, _02230658 ; =0x00000708 + str r1, [r4, r0] + mov r0, #0 + ldrsb r0, [r6, r0] + lsl r1, r0, #1 + ldr r0, _0223065C ; =0x0000071C + add r1, #0xa + str r1, [r4, r0] + ldr r0, [sp, #0x10] + cmp r0, #3 + ldr r0, _02230660 ; =0x00000718 + bge _022305AE + mov r1, #0 + str r1, [r4, r0] + add r0, r1, #0 + ldrsb r1, [r6, r0] + ldr r0, _02230664 ; =0x0000070E + add r1, #8 + strh r1, [r4, r0] + mov r1, #0 + mvn r1, r1 + b _022305C2 +_022305AE: + mov r1, #0 + str r1, [r4, r0] + add r0, r1, #0 + ldrsb r1, [r6, r0] + mov r0, #0xff + add r1, #8 + sub r1, r0, r1 + ldr r0, _02230664 ; =0x0000070E + strh r1, [r4, r0] + mov r1, #1 +_022305C2: + add r0, r0, #2 + add r7, r7, #1 + add r5, r5, #4 + strb r1, [r4, r0] + cmp r7, #2 + blt _02230508 + ldr r0, _02230668 ; =ov62_02230C28 + ldr r1, [sp, #4] + mov r2, #5 + bl sub_0200DA04 + mov r1, #7 + lsl r1, r1, #8 + str r0, [r4, r1] + ldr r0, [sp, #0xc] + add r4, #0x30 + add r0, r0, #2 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r6, r6, #1 + add r0, r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, #0x30 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #6 + bge _02230600 + b _022304F6 +_02230600: + ldr r0, [sp] + sub r1, #0x28 + ldr r0, [r0, r1] + cmp r0, #0 + beq _0223063A + ldr r7, _02230654 ; =0x00000724 +_0223060C: + ldr r4, [sp] + ldr r1, _0223064C ; =0x000006F8 + mov r0, #0 + add r2, r4, #0 + add r6, r0, #0 + add r5, r2, r1 +_02230618: + ldr r1, [r4, r7] + cmp r1, #3 + beq _0223062C + mov r0, #7 + lsl r0, r0, #8 + ldr r0, [r4, r0] + add r1, r5, #0 + bl ov62_02230C28 + mov r0, #1 +_0223062C: + add r6, r6, #1 + add r4, #0x30 + add r5, #0x30 + cmp r6, #6 + blt _02230618 + cmp r0, #0 + bne _0223060C +_0223063A: + add sp, #0x80 + pop {r3, r4, r5, r6, r7, pc} + nop +_02230640: .word 0x02248890 +_02230644: .word 0x0000270F +_02230648: .word 0x022488D8 +_0223064C: .word 0x000006F8 +_02230650: .word 0x00002710 +_02230654: .word 0x00000724 +_02230658: .word 0x00000708 +_0223065C: .word 0x0000071C +_02230660: .word 0x00000718 +_02230664: .word 0x0000070E +_02230668: .word ov62_02230C28 + thumb_func_end ov62_02230464 + + thumb_func_start ov62_0223066C +ov62_0223066C: ; 0x0223066C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0 + ldr r6, _02230698 ; =0x000006F8 + str r0, [sp] +_02230676: + mov r4, #0 + add r5, r7, #0 +_0223067A: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0223067A + ldr r0, [sp] + add r7, #0x30 + add r0, r0, #1 + str r0, [sp] + cmp r0, #6 + blt _02230676 + pop {r3, r4, r5, r6, r7, pc} + nop +_02230698: .word 0x000006F8 + thumb_func_end ov62_0223066C + + thumb_func_start ov62_0223069C +ov62_0223069C: ; 0x0223069C + push {r4, r5, r6, lr} + mov r6, #7 + add r5, r0, #0 + mov r4, #0 + lsl r6, r6, #8 +_022306A6: + ldr r0, [r5, r6] + bl sub_0200DA58 + add r4, r4, #1 + add r5, #0x30 + cmp r4, #6 + blt _022306A6 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_0223069C + + thumb_func_start ov62_022306B8 +ov62_022306B8: ; 0x022306B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + ldr r1, [r0, #0x14] + ldr r7, [r0, #0x1c] + str r1, [sp, #0x10] + ldr r1, [r0, #0x18] + ldr r0, [r0, #0] + str r1, [sp, #0xc] + cmp r0, #6 + bhi _0223070E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022306D8: ; jump table + .short _022306E6 - _022306D8 - 2 ; case 0 + .short _0223070E - _022306D8 - 2 ; case 1 + .short _022306EE - _022306D8 - 2 ; case 2 + .short _02230706 - _022306D8 - 2 ; case 3 + .short _022306FE - _022306D8 - 2 ; case 4 + .short _022306F6 - _022306D8 - 2 ; case 5 + .short _022306F6 - _022306D8 - 2 ; case 6 +_022306E6: + mov r6, #0x3f + mov r4, #0x18 + mov r5, #0x19 + b _02230714 +_022306EE: + mov r6, #0x11 + mov r4, #0x12 + mov r5, #0x13 + b _02230714 +_022306F6: + mov r6, #8 + mov r4, #9 + mov r5, #0xa + b _02230714 +_022306FE: + mov r6, #0xb + mov r4, #0xc + mov r5, #0xd + b _02230714 +_02230706: + mov r6, #0xe + mov r4, #0xf + mov r5, #0x10 + b _02230714 +_0223070E: + mov r6, #0x30 + mov r4, #0x16 + mov r5, #0x17 +_02230714: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02230798 ; =0x00002711 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r3, r6, #0 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223079C ; =0x00002712 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r3, r6, #0 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _02230798 ; =0x00002711 + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r3, r4, #0 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _0223079C ; =0x00002712 + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r3, r4, #0 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02230798 ; =0x00002711 + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r3, r5, #0 + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _0223079C ; =0x00002712 + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + add r3, r5, #0 + bl sub_0200CE54 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02230798: .word 0x00002711 +_0223079C: .word 0x00002712 + thumb_func_end ov62_022306B8 + + thumb_func_start ov62_022307A0 +ov62_022307A0: ; 0x022307A0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r1, _022307B8 ; =0x00002711 + bl sub_0200D070 + ldr r0, [r4, #0x1c] + ldr r1, _022307BC ; =0x00002712 + bl sub_0200D070 + pop {r4, pc} + nop +_022307B8: .word 0x00002711 +_022307BC: .word 0x00002712 + thumb_func_end ov62_022307A0 + + thumb_func_start ov62_022307C0 +ov62_022307C0: ; 0x022307C0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _02230880 ; =0x00000534 + mov r7, #0 + add r4, r6, r0 + add r5, r6, #0 +_022307CC: + mov r2, #0x6e + lsl r2, r2, #4 + ldr r3, [r6, r2] + mov r2, #5 + sub r2, r2, r3 + lsl r2, r2, #4 + add r2, #0xd9 + lsl r2, r2, #0x10 + ldr r0, [r4, #0] + mov r1, #0x32 + asr r2, r2, #0x10 + bl ov62_02230E68 + ldr r0, _02230884 ; =0x00000548 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r5, r0] + sub r2, #0x2c + bl sub_020128C4 + add r7, r7, #1 + add r4, #0x28 + add r5, #0x28 + cmp r7, #5 + blt _022307CC + mov r5, #0 + add r4, r6, #0 + add r7, sp, #0 +_02230804: + ldr r0, _02230888 ; =0x000006D8 + ldr r0, [r6, r0] + cmp r0, #0 + beq _0223087E + ldr r0, _02230880 ; =0x00000534 + add r1, sp, #0 + ldr r0, [r4, r0] + add r1, #2 + add r2, sp, #0 + bl ov62_02230E74 + ldr r0, _02230888 ; =0x000006D8 + ldr r1, [r6, r0] + sub r0, r1, #1 + cmp r0, r5 + bne _02230834 + mov r0, #0xa9 + strh r0, [r7] + ldr r0, _02230880 ; =0x00000534 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0200D430 + b _02230862 +_02230834: + mov r0, #2 + ldrsh r0, [r7, r0] + sub r1, r1, r5 + lsl r1, r1, #2 + sub r0, r0, r1 + strh r0, [r7, #2] + ldr r0, _02230888 ; =0x000006D8 + mov r2, #5 + ldr r0, [r6, r0] + sub r1, r0, r5 + sub r0, r1, #1 + sub r2, r2, r1 + mov r1, #0x24 + mul r1, r2 + lsl r0, r0, #4 + add r1, #0x19 + add r0, r0, r1 + strh r0, [r7] + ldr r0, _02230880 ; =0x00000534 + mov r1, #2 + ldr r0, [r4, r0] + bl sub_0200D430 +_02230862: + ldr r0, _02230880 ; =0x00000534 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r7, r1] + ldrsh r2, [r7, r2] + ldr r0, [r4, r0] + bl ov62_02230E68 + ldr r0, _02230888 ; =0x000006D8 + add r5, r5, #1 + ldr r0, [r6, r0] + add r4, #0x28 + cmp r5, r0 + blt _02230804 +_0223087E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02230880: .word 0x00000534 +_02230884: .word 0x00000548 +_02230888: .word 0x000006D8 + thumb_func_end ov62_022307C0 + + thumb_func_start ov62_0223088C +ov62_0223088C: ; 0x0223088C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + add r5, r0, #0 + ldr r0, _02230A44 ; =0x00000534 + mov r1, #0x6e + add r4, r5, r0 + ldr r0, [r5, #0x18] + add r2, sp, #0x18 + str r0, [sp, #0xc] + ldr r0, [r5, #0x1c] + lsl r1, r1, #4 + str r0, [sp, #8] + ldr r0, [r5, #0x28] + str r0, [sp, #4] + mov r0, #0x2a + strh r0, [r2, #4] + ldr r3, [r5, r1] + mov r0, #5 + sub r0, r0, r3 + lsl r0, r0, #4 + add r0, #0xc9 + strh r0, [r2, #6] + ldr r1, [r5, r1] + cmp r1, #2 + bne _022308C8 + mov r0, #4 + sub r0, r0, r1 + lsl r0, r0, #4 + add r0, #0xc9 + strh r0, [r2, #6] +_022308C8: + mov r0, #0 + str r0, [sp, #0x10] + add r1, r0, #0 + add r0, sp, #0x18 + strh r1, [r0, #8] + ldr r1, [sp, #0x10] + mov r2, #1 + strh r1, [r0, #0xa] + add r0, r1, #0 + str r1, [sp, #0x4c] + ldr r1, _02230A48 ; =0x00002711 + str r0, [sp, #0x24] + str r1, [sp, #0x30] + sub r1, r1, #2 + mov r0, #3 + str r0, [sp, #0x48] + sub r0, r0, #4 + str r1, [sp, #0x14] + str r1, [sp, #0x34] + ldr r1, _02230A48 ; =0x00002711 + ldr r6, _02230A4C ; =0x022488A8 + ldr r7, [sp, #0x10] + str r2, [sp, #0x2c] + str r2, [sp, #0x28] + str r1, [sp, #0x38] + str r1, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] +_02230900: + mov r0, #2 + str r0, [sp, #0x2c] + ldr r0, _02230A50 ; =0x00002712 + ldr r1, [sp, #8] + str r0, [sp, #0x30] + sub r0, r0, #2 + str r0, [sp, #0x34] + ldr r0, _02230A50 ; =0x00002712 + add r2, sp, #0x1c + str r0, [sp, #0x38] + str r0, [sp, #0x3c] + ldrb r0, [r6, #5] + str r0, [sp, #0x24] + ldr r0, [sp, #0xc] + bl sub_0200CE6C + str r0, [r4, #0] + bl sub_0200D330 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0200D3F4 + add r2, sp, #0x18 + mov r1, #4 + ldrsh r1, [r2, r1] + add r3, r2, #0 + mov r2, #6 + add r1, #8 + lsl r1, r1, #0x10 + ldrsh r2, [r3, r2] + ldr r0, [r4, #0] + asr r1, r1, #0x10 + bl ov62_02230E68 + mov r0, #1 + str r0, [sp, #0x2c] + ldr r0, _02230A48 ; =0x00002711 + ldr r1, [sp, #8] + str r0, [sp, #0x30] + ldr r0, [sp, #0x14] + add r2, sp, #0x1c + str r0, [sp, #0x34] + ldr r0, _02230A48 ; =0x00002711 + str r0, [sp, #0x38] + str r0, [sp, #0x3c] + ldrb r0, [r6] + str r0, [sp, #0x24] + ldr r0, [sp, #0xc] + bl sub_0200CE6C + add r1, r4, #0 + add r1, #0xc8 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200D330 + add r2, sp, #0x18 + mov r1, #4 + add r0, r4, #0 + add r0, #0xc8 + ldrsh r1, [r2, r1] + add r3, r2, #0 + mov r2, #6 + ldrsh r2, [r3, r2] + ldr r0, [r0, #0] + bl ov62_02230E68 + ldr r1, _02230A54 ; =0x00000818 + add r0, r4, #0 + ldr r1, [r5, r1] + add r0, #0xc8 + ldr r0, [r0, #0] + ldr r1, [r1, r7] + bl sub_0200D3F4 + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r0, r0, #1 + add r4, #0x28 + add r7, #0x24 + str r0, [sp, #0x10] + cmp r0, #5 + blt _02230900 + mov r4, #0 + add r6, r5, #0 + add r7, sp, #0x18 +_022309B2: + ldr r0, _02230A58 ; =0x000006D8 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02230A2C + ldr r0, _02230A44 ; =0x00000534 + add r1, sp, #0x18 + ldr r0, [r6, r0] + add r1, #2 + add r2, sp, #0x18 + bl ov62_02230E74 + ldr r0, _02230A58 ; =0x000006D8 + ldr r1, [r5, r0] + sub r0, r1, #1 + cmp r0, r4 + bne _022309E2 + mov r0, #0xa9 + strh r0, [r7] + ldr r0, _02230A44 ; =0x00000534 + mov r1, #1 + ldr r0, [r6, r0] + bl sub_0200D430 + b _02230A10 +_022309E2: + mov r0, #2 + ldrsh r0, [r7, r0] + sub r1, r1, r4 + lsl r1, r1, #2 + sub r0, r0, r1 + strh r0, [r7, #2] + ldr r0, _02230A58 ; =0x000006D8 + mov r2, #5 + ldr r0, [r5, r0] + sub r1, r0, r4 + sub r0, r1, #1 + sub r2, r2, r1 + mov r1, #0x24 + mul r1, r2 + lsl r0, r0, #4 + add r1, #0x19 + add r0, r0, r1 + strh r0, [r7] + ldr r0, _02230A44 ; =0x00000534 + mov r1, #2 + ldr r0, [r6, r0] + bl sub_0200D430 +_02230A10: + ldr r0, _02230A44 ; =0x00000534 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r7, r1] + ldrsh r2, [r7, r2] + ldr r0, [r6, r0] + bl ov62_02230E68 + ldr r0, _02230A58 ; =0x000006D8 + add r4, r4, #1 + ldr r0, [r5, r0] + add r6, #0x28 + cmp r4, r0 + blt _022309B2 +_02230A2C: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [sp, #4] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02230A44: .word 0x00000534 +_02230A48: .word 0x00002711 +_02230A4C: .word 0x022488A8 +_02230A50: .word 0x00002712 +_02230A54: .word 0x00000818 +_02230A58: .word 0x000006D8 + thumb_func_end ov62_0223088C + + thumb_func_start ov62_02230A5C +ov62_02230A5C: ; 0x02230A5C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02230AB0 ; =0x000005FC + mov r4, #0 + str r4, [sp] + add r6, r5, #0 + add r7, r5, r0 +_02230A6A: + ldr r1, _02230AB4 ; =0x00000818 + ldr r0, _02230AB0 ; =0x000005FC + ldr r1, [r5, r1] + ldr r0, [r6, r0] + ldr r1, [r1, r4] + bl sub_0200D3F4 + ldr r0, _02230AB4 ; =0x00000818 + ldr r0, [r5, r0] + add r1, r0, r4 + ldr r0, [r0, r4] + cmp r0, #0 + beq _02230A9E + ldr r0, _02230AB0 ; =0x000005FC + ldr r1, [r1, #0xc] + ldr r0, [r6, r0] + bl sub_0200D364 + ldr r0, _02230AB4 ; =0x00000818 + add r1, r7, #0 + ldr r2, [r5, r0] + add r0, r5, #0 + add r3, r2, r4 + ldr r2, [r3, #8] + bl ov62_02230FC8 +_02230A9E: + ldr r0, [sp] + add r4, #0x24 + add r0, r0, #1 + add r6, #0x28 + add r7, #0x28 + str r0, [sp] + cmp r0, #5 + blt _02230A6A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02230AB0: .word 0x000005FC +_02230AB4: .word 0x00000818 + thumb_func_end ov62_02230A5C + + thumb_func_start ov62_02230AB8 +ov62_02230AB8: ; 0x02230AB8 + push {r3, r4, r5, r6, r7, lr} + ldr r7, _02230AE8 ; =0x00000548 + add r5, r0, #0 + add r6, r7, #0 + mov r4, #0 + sub r6, #0x14 +_02230AC4: + ldr r1, _02230AEC ; =0x000005FC + mov r0, #0x61 + ldr r1, [r5, r1] + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r1, [r1, #0] + bl sub_020131E0 + ldr r1, [r5, r6] + ldr r0, [r5, r7] + ldr r1, [r1, #0] + bl sub_020131E0 + add r4, r4, #1 + add r5, #0x28 + cmp r4, #5 + blt _02230AC4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02230AE8: .word 0x00000548 +_02230AEC: .word 0x000005FC + thumb_func_end ov62_02230AB8 + + thumb_func_start ov62_02230AF0 +ov62_02230AF0: ; 0x02230AF0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, _02230B64 ; =0x000006D8 + ldr r1, [r7, r0] + cmp r1, #0 + beq _02230B60 + mov r0, #0 + str r0, [sp] + cmp r1, #0 + ble _02230B60 + ldr r0, _02230B68 ; =0x00000534 + add r4, r7, #0 + add r5, r7, #0 + add r6, r7, r0 +_02230B0C: + ldr r1, _02230B6C ; =0x000006C4 + ldr r0, _02230B68 ; =0x00000534 + ldr r1, [r4, r1] + ldr r0, [r5, r0] + ldr r1, [r1, #0xc] + bl sub_0200D364 + ldr r0, _02230B6C ; =0x000006C4 + add r1, r6, #0 + ldr r3, [r4, r0] + add r0, r7, #0 + ldr r2, [r3, #8] + bl ov62_02230FC8 + ldr r0, _02230B70 ; =0x00000548 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r5, r0] + sub r2, #0x2c + bl sub_020128C4 + ldr r0, _02230B70 ; =0x00000548 + mov r1, #1 + ldr r0, [r5, r0] + bl sub_020129D0 + ldr r0, _02230B68 ; =0x00000534 + mov r1, #1 + ldr r0, [r5, r0] + bl sub_0200D3F4 + ldr r0, [sp] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp] + ldr r0, _02230B64 ; =0x000006D8 + add r5, #0x28 + ldr r1, [r7, r0] + ldr r0, [sp] + add r6, #0x28 + cmp r0, r1 + blt _02230B0C +_02230B60: + pop {r3, r4, r5, r6, r7, pc} + nop +_02230B64: .word 0x000006D8 +_02230B68: .word 0x00000534 +_02230B6C: .word 0x000006C4 +_02230B70: .word 0x00000548 + thumb_func_end ov62_02230AF0 + + thumb_func_start ov62_02230B74 +ov62_02230B74: ; 0x02230B74 + push {r3, r4, r5, lr} + ldr r1, _02230B98 ; =0x00000534 + mov r4, #0 + add r5, r0, r1 +_02230B7C: + ldr r0, [r5, #0] + bl sub_0200D0F4 + add r0, r5, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, #0x28 + cmp r4, #5 + blt _02230B7C + pop {r3, r4, r5, pc} + nop +_02230B98: .word 0x00000534 + thumb_func_end ov62_02230B74 + + thumb_func_start ov62_02230B9C +ov62_02230B9C: ; 0x02230B9C + push {r3, r4, r5, r6, r7, lr} + mov r7, #0x15 + add r5, r0, #0 + add r4, r1, #0 + mov r6, #0 + lsl r7, r7, #6 +_02230BA8: + ldr r0, [r5, r7] + cmp r0, #0 + ldr r0, _02230C18 ; =0x00000548 + bne _02230BC4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_020129D0 + ldr r0, _02230C1C ; =0x00000534 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200D3F4 + b _02230BD6 +_02230BC4: + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_020129D0 + ldr r0, _02230C1C ; =0x00000534 + add r1, r4, #0 + ldr r0, [r5, r0] + bl sub_0200D3F4 +_02230BD6: + ldr r0, _02230C20 ; =0x00000608 + ldr r0, [r5, r0] + cmp r0, #0 + bne _02230BF6 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_020129D0 + ldr r0, _02230C24 ; =0x000005FC + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0200D3F4 + b _02230C0C +_02230BF6: + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_020129D0 + ldr r0, _02230C24 ; =0x000005FC + add r1, r4, #0 + ldr r0, [r5, r0] + bl sub_0200D3F4 +_02230C0C: + add r6, r6, #1 + add r5, #0x28 + cmp r6, #5 + blt _02230BA8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02230C18: .word 0x00000548 +_02230C1C: .word 0x00000534 +_02230C20: .word 0x00000608 +_02230C24: .word 0x000005FC + thumb_func_end ov62_02230B9C + + thumb_func_start ov62_02230C28 +ov62_02230C28: ; 0x02230C28 + push {r4, lr} + sub sp, #0x40 + add r4, r1, #0 + ldr r0, [r4, #0x1c] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + str r0, [r4, #0x1c] + beq _02230C44 + b _02230E58 +_02230C44: + ldr r0, [r4, #0x2c] + cmp r0, #3 + bls _02230C4C + b _02230E26 +_02230C4C: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02230C58: ; jump table + .short _02230C60 - _02230C58 - 2 ; case 0 + .short _02230C76 - _02230C58 - 2 ; case 1 + .short _02230CEC - _02230C58 - 2 ; case 2 + .short _02230D96 - _02230C58 - 2 ; case 3 +_02230C60: + ldr r1, [r4, #0x28] + cmp r1, #3 + bne _02230C70 + add r0, r0, #1 + str r0, [r4, #0x2c] + mov r0, #0 + str r0, [r4, #0x28] + b _02230E26 +_02230C70: + add r0, r1, #1 + str r0, [r4, #0x28] + b _02230E26 +_02230C76: + ldr r1, [r4, #0x28] + cmp r1, #4 + bne _02230C86 + add r0, r0, #1 + str r0, [r4, #0x2c] + mov r0, #0 + str r0, [r4, #0x28] + b _02230E26 +_02230C86: + ldr r0, [r4, #0] + add r1, sp, #0x24 + add r2, sp, #0x20 + bl sub_0200D638 + ldr r0, [r4, #4] + add r1, sp, #0x1c + add r2, sp, #0x18 + bl sub_0200D638 + ldr r1, [r4, #0x20] + ldr r0, _02230E5C ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + mov r1, #0x18 + ldrsb r1, [r4, r1] + ldr r2, [sp, #0x24] + neg r1, r1 + mul r0, r1 + add r0, r2, r0 + mov r1, #0x5a + str r0, [sp, #0x24] + str r0, [sp, #0x1c] + ldr r0, [r4, #0x20] + lsl r1, r1, #2 + add r0, #0x20 + str r0, [r4, #0x20] + bl sub_020E1F6C + str r1, [r4, #0x20] + ldr r0, [r4, #0] + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + bl sub_0200D614 + ldr r0, [r4, #4] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x18] + bl sub_0200D614 + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] + b _02230E26 +_02230CEC: + ldr r3, _02230E60 ; =0x022488C0 + add r2, sp, #0x28 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r2, sp, #0 + ldr r0, [r4, #0] + add r1, sp, #4 + add r2, #2 + bl sub_0200D550 + ldr r0, [r4, #4] + add r1, sp, #4 + add r2, sp, #0 + bl sub_0200D550 + ldr r1, [r4, #0x28] + cmp r1, #0 + bne _02230D3A + mov r0, #0x16 + ldrsh r2, [r4, r0] + add r1, sp, #0 + mov r0, #4 + ldrsh r0, [r1, r0] + sub r0, r2, r0 + strh r0, [r4, #0x14] + mov r0, #0x14 + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x24] + bl sub_020E1F6C + strh r0, [r4, #0x14] + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] + b _02230D74 +_02230D3A: + ldr r0, [r4, #0x24] + add r0, r0, #1 + cmp r1, r0 + bne _02230D60 + mov r0, #0x16 + ldrsh r1, [r4, r0] + add r0, sp, #0 + strh r1, [r0, #4] + ldrb r0, [r4, #0x19] + lsl r1, r0, #2 + add r0, sp, #0x28 + ldr r0, [r0, r1] + str r0, [r4, #0x20] + ldr r0, [r4, #0x2c] + add r0, r0, #1 + str r0, [r4, #0x2c] + mov r0, #0 + str r0, [r4, #0x28] + b _02230D74 +_02230D60: + add r1, sp, #0 + mov r0, #4 + ldrsh r2, [r1, r0] + mov r0, #0x14 + ldrsh r0, [r4, r0] + add r0, r2, r0 + strh r0, [r1, #4] + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] +_02230D74: + add r3, sp, #0 + mov r1, #4 + mov r2, #2 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #0] + bl sub_0200D4C4 + add r3, sp, #0 + mov r1, #4 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #4] + bl sub_0200D4C4 + b _02230E26 +_02230D96: + ldr r0, [r4, #0x28] + cmp r0, #0 + bne _02230DAE + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0xc + add r2, sp, #0x10 + bl sub_0200D638 + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] +_02230DAE: + ldr r0, [r4, #0] + add r1, sp, #0x14 + add r2, sp, #0x10 + bl sub_0200D638 + ldr r0, [r4, #4] + add r1, sp, #0xc + add r2, sp, #8 + bl sub_0200D638 + ldr r1, [r4, #0x20] + ldr r0, _02230E5C ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + mov r2, #0x18 + ldrsb r2, [r4, r2] + ldr r1, [r4, #0xc] + neg r3, r2 + lsl r2, r0, #1 + add r0, r0, r2 + mul r0, r3 + add r0, r1, r0 + str r0, [sp, #0x14] + str r0, [sp, #0xc] + ldrb r0, [r4, #0x19] + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + ldr r0, [r4, #0x20] + beq _02230E02 + sub r0, r0, #4 + b _02230E04 +_02230E02: + add r0, r0, #4 +_02230E04: + str r0, [r4, #0x20] + mov r1, #0x5a + ldr r0, [r4, #0x20] + lsl r1, r1, #2 + bl sub_020E1F6C + str r1, [r4, #0x20] + ldr r0, [r4, #0] + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + bl sub_0200D614 + ldr r0, [r4, #4] + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + bl sub_0200D614 +_02230E26: + ldr r0, [r4, #0x2c] + cmp r0, #2 + blt _02230E58 + ldr r0, [r4, #0x10] + ldr r1, _02230E64 ; =0x3DCCCCCD + bl sub_020E1108 + bls _02230E58 + ldr r0, [r4, #0x10] + ldr r1, _02230E64 ; =0x3DCCCCCD + bl sub_020E1A9C + str r0, [r4, #0x10] + mov r2, #0xfe + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + lsl r2, r2, #0x16 + bl sub_0200D6E8 + mov r2, #0xfe + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + lsl r2, r2, #0x16 + bl sub_0200D6E8 +_02230E58: + add sp, #0x40 + pop {r4, pc} + ; .align 2, 0 +_02230E5C: .word 0x0000FFFF +_02230E60: .word 0x022488C0 +_02230E64: .word 0x3DCCCCCD + thumb_func_end ov62_02230C28 + + thumb_func_start ov62_02230E68 +ov62_02230E68: ; 0x02230E68 + push {r3, lr} + mov r3, #1 + lsl r3, r3, #0x14 + bl sub_0200D500 + pop {r3, pc} + thumb_func_end ov62_02230E68 + + thumb_func_start ov62_02230E74 +ov62_02230E74: ; 0x02230E74 + push {r3, lr} + mov r3, #1 + lsl r3, r3, #0x14 + bl sub_0200D5A0 + pop {r3, pc} + thumb_func_end ov62_02230E74 + + thumb_func_start ov62_02230E80 +ov62_02230E80: ; 0x02230E80 + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + add r6, r0, #0 + ldr r0, _02230FBC ; =0x02248890 + ldr r2, [r0, #8] + ldr r1, [r0, #0xc] + str r2, [sp, #0x2c] + str r1, [sp, #0x30] + ldr r1, [r0, #0x10] + ldr r0, [r0, #0x14] + str r1, [sp, #0x24] + str r0, [sp, #0x28] + mov r0, #0 + ldr r1, _02230FC0 ; =0x000005FC + str r0, [sp, #0x1c] + add r0, r6, r1 + sub r1, #0xc8 + str r0, [sp, #0x14] + add r0, r6, r1 + str r0, [sp, #0x10] +_02230EA8: + ldr r0, [sp, #0x14] + ldr r1, _02230FC4 ; =0x022488A8 + str r0, [sp, #0x34] + ldr r0, [sp, #0x10] + add r4, sp, #0x34 + str r0, [sp, #0x38] + mov r0, #0 + str r0, [sp, #0x18] + add r0, sp, #0x24 + str r0, [sp, #0xc] + ldr r0, [sp, #0x1c] + add r5, sp, #0x2c + add r0, r1, r0 + str r0, [sp, #8] + add r7, sp, #0x3c +_02230EC6: + add r0, r7, #0 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r6, #0x24] + add r1, r7, #0 + mov r2, #0x14 + mov r3, #2 + bl sub_0201A870 + add r0, r7, #0 + mov r1, #0x66 + bl sub_02012B20 + ldr r1, [r4, #0] + mov r2, #0x66 + str r0, [r1, #0x18] + ldr r1, [r5, #0] + add r0, r7, #0 + bl sub_02012898 + ldr r3, [r4, #0] + ldr r2, [r5, #0] + mov r1, #1 + add r3, #0x1c + bl sub_0201ED94 + ldr r0, [r4, #0] + add r1, sp, #0x20 + ldr r0, [r0, #0] + add r1, #2 + add r2, sp, #0x20 + bl sub_0200D550 + ldr r0, [r6, #0x50] + str r7, [sp, #0x50] + str r0, [sp, #0x4c] + ldr r0, [r6, #0x1c] + bl sub_0200D9B0 + str r0, [sp, #0x54] + ldr r1, [sp, #0xc] + ldr r0, [r6, #0x1c] + ldr r1, [r1, #0] + bl sub_0200D04C + str r0, [sp, #0x58] + ldr r0, [r4, #0] + add r1, sp, #0x20 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + str r0, [sp, #0x5c] + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + str r0, [sp, #0x60] + mov r0, #2 + ldrsh r0, [r1, r0] + add r0, #0x24 + str r0, [sp, #0x64] + mov r0, #0 + ldrsh r0, [r1, r0] + sub r0, #8 + str r0, [sp, #0x68] + mov r0, #3 + str r0, [sp, #0x6c] + ldr r0, [sp, #8] + ldrb r0, [r0] + sub r0, r0, #1 + str r0, [sp, #0x70] + ldr r0, [r5, #0] + str r0, [sp, #0x74] + mov r0, #0x66 + str r0, [sp, #0x78] + ldr r1, [r4, #0] + add r0, sp, #0x4c + ldr r1, [r1, #0x18] + bl sub_02012B60 + ldr r1, [r4, #0] + str r0, [r1, #0x14] + ldr r0, [r4, #0] + mov r1, #1 + ldr r0, [r0, #0x14] + bl sub_02012AC0 + add r0, r7, #0 + bl sub_0201A8FC + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0x14] + bl sub_020129D0 + ldr r0, [sp, #0xc] + add r4, r4, #4 + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r5, r5, #4 + add r0, r0, #5 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #2 + blt _02230EC6 + ldr r0, [sp, #0x14] + add r0, #0x28 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + add r0, #0x28 + str r0, [sp, #0x10] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #5 + bge _02230FB6 + b _02230EA8 +_02230FB6: + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + nop +_02230FBC: .word 0x02248890 +_02230FC0: .word 0x000005FC +_02230FC4: .word 0x022488A8 + thumb_func_end ov62_02230E80 + + thumb_func_start ov62_02230FC8 +ov62_02230FC8: ; 0x02230FC8 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r4, r0, #0 + add r5, r3, #0 + str r1, [sp, #0x10] + ldr r0, [r4, #0x48] + cmp r2, #8 + bne _02231058 + ldr r1, [r5, #0x18] + lsl r1, r1, #2 + add r3, r4, r1 + ldr r1, _02231134 ; =0x0000088C + ldr r1, [r3, r1] + cmp r1, #0 + bne _02230FF0 + add r1, r2, #0 + bl sub_0200B1EC + add r5, r0, #0 + b _022310E4 +_02230FF0: + mov r0, #0x66 + bl ov62_02231690 + add r6, r0, #0 + ldr r0, [r4, #0x48] + mov r1, #7 + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [r5, #0x18] + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02231134 ; =0x0000088C + ldr r0, [r1, r0] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x14] + ldr r1, [sp, #0x14] + add r0, r4, #0 + bl ov62_022349A8 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x14] + add r0, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl sub_0200C388 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 + b _022310E4 +_02231058: + cmp r2, #0x29 + bne _022310DC + ldr r1, [r5, #0x18] + lsl r1, r1, #2 + add r3, r4, r1 + ldr r1, _02231134 ; =0x0000088C + ldr r1, [r3, r1] + cmp r1, #0 + bne _02231074 + add r1, r2, #0 + bl sub_0200B1EC + add r5, r0, #0 + b _022310E4 +_02231074: + mov r0, #0x66 + bl ov62_02231690 + add r6, r0, #0 + ldr r0, [r4, #0x48] + mov r1, #7 + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [r5, #0x18] + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _02231134 ; =0x0000088C + ldr r0, [r1, r0] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r4, #0 + bl ov62_022349A8 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x18] + add r0, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r6, #0 + add r1, r5, #0 + add r2, r7, #0 + bl sub_0200C388 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 + b _022310E4 +_022310DC: + add r1, r2, #0 + bl sub_0200B1EC + add r5, r0, #0 +_022310E4: + add r0, sp, #0x1c + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0x24] + add r1, sp, #0x1c + mov r2, #0x14 + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02231138 ; =0x000E0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, sp, #0x1c + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x10] + ldr r0, [r0, #0x14] + ldr r1, [r1, #0x18] + add r2, sp, #0x1c + mov r3, #0x66 + bl sub_02012BE0 + add r0, r5, #0 + bl sub_020237BC + add r0, sp, #0x1c + bl sub_0201A8FC + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02231134: .word 0x0000088C +_02231138: .word 0x000E0D00 + thumb_func_end ov62_02230FC8 + + thumb_func_start ov62_0223113C +ov62_0223113C: ; 0x0223113C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r1, #0 + str r1, [sp] + ldr r1, _02231188 ; =0x000005FC + add r7, r0, r1 + sub r1, #0xc8 + add r6, r0, r1 +_0223114C: + str r7, [sp, #4] + str r6, [sp, #8] + mov r4, #0 + add r5, sp, #4 +_02231154: + ldr r0, [r5, #0] + ldr r0, [r0, #0x18] + bl sub_02012B48 + ldr r0, [r5, #0] + ldr r0, [r0, #0x14] + bl sub_02012BD8 + ldr r0, [r5, #0] + add r0, #0x1c + bl sub_0201EE28 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _02231154 + ldr r0, [sp] + add r7, #0x28 + add r0, r0, #1 + add r6, #0x28 + str r0, [sp] + cmp r0, #5 + blt _0223114C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02231188: .word 0x000005FC + thumb_func_end ov62_0223113C + + thumb_func_start ov62_0223118C +ov62_0223118C: ; 0x0223118C + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r7, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + ldr r6, _02231248 ; =0x0000270F + cmp r7, #2 + bne _0223119E + add r6, r6, #1 +_0223119E: + add r0, sp, #0xc + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0x10] + add r1, sp, #0xc + mov r2, #0x14 + mov r3, #2 + bl sub_0201A870 + add r0, sp, #0xc + mov r1, #0x66 + bl sub_02012B20 + str r0, [r5, #0xc] + add r0, sp, #0xc + add r1, r7, #0 + mov r2, #0x66 + bl sub_02012898 + add r3, r5, #0 + mov r1, #1 + add r2, r7, #0 + add r3, #0x10 + bl sub_0201ED94 + add r1, sp, #8 + ldr r0, [r5, #4] + add r1, #2 + add r2, sp, #8 + bl sub_0200D550 + ldr r0, [r4, #0x3c] + str r0, [sp, #0x1c] + add r0, sp, #0xc + str r0, [sp, #0x20] + ldr r0, [r4, #8] + bl sub_0200D9B0 + str r0, [sp, #0x24] + ldr r0, [r4, #8] + add r1, r6, #0 + bl sub_0200D04C + str r0, [sp, #0x28] + ldr r0, [r5, #4] + add r1, sp, #8 + ldr r0, [r0, #0] + str r0, [sp, #0x2c] + ldr r0, [r5, #0x14] + str r0, [sp, #0x30] + mov r0, #2 + ldrsh r0, [r1, r0] + add r0, #0x24 + str r0, [sp, #0x34] + mov r0, #0 + ldrsh r1, [r1, r0] + sub r1, #8 + str r0, [sp, #0x40] + mov r0, #0x66 + str r1, [sp, #0x38] + mov r1, #3 + str r0, [sp, #0x48] + str r7, [sp, #0x44] + str r1, [sp, #0x3c] + ldr r1, [r5, #0xc] + add r0, sp, #0x1c + bl sub_02012B60 + mov r1, #1 + str r0, [r5, #8] + bl sub_02012AC0 + add r0, sp, #0xc + bl sub_0201A8FC + ldr r0, [r5, #8] + mov r1, #0 + bl sub_020129D0 + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + nop +_02231248: .word 0x0000270F + thumb_func_end ov62_0223118C + + thumb_func_start ov62_0223124C +ov62_0223124C: ; 0x0223124C + push {r4, r5, r6, lr} + sub sp, #0x20 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x34] + add r1, r2, #0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, sp, #0x10 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0x10] + add r1, sp, #0x10 + mov r2, #0x14 + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022312AC ; =0x000E0D00 + add r2, r6, #0 + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, sp, #0x10 + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + add r2, sp, #0x10 + mov r3, #0x66 + bl sub_02012BE0 + add r0, r6, #0 + bl sub_020237BC + add r0, sp, #0x10 + bl sub_0201A8FC + add sp, #0x20 + pop {r4, r5, r6, pc} + nop +_022312AC: .word 0x000E0D00 + thumb_func_end ov62_0223124C + + thumb_func_start ov62_022312B0 +ov62_022312B0: ; 0x022312B0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_02012B48 + ldr r0, [r4, #8] + bl sub_02012BD8 + add r4, #0x10 + add r0, r4, #0 + bl sub_0201EE28 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_022312B0 + + thumb_func_start ov62_022312CC +ov62_022312CC: ; 0x022312CC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r6, [r0, #0x14] + ldr r4, [r0, #0x18] + ldr r5, [r0, #0x1c] + mov r0, #0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, _02231318 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x31 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _02231318 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x1a + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02231318 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x1b + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02231318: .word 0x00002E94 + thumb_func_end ov62_022312CC + + thumb_func_start ov62_0223131C +ov62_0223131C: ; 0x0223131C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r6, [r0, #0x14] + ldr r4, [r0, #0x18] + ldr r5, [r0, #0x1c] + mov r0, #0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, _02231368 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x7a + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _02231368 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x7b + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02231368 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x7c + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02231368: .word 0x00002E94 + thumb_func_end ov62_0223131C + + thumb_func_start ov62_0223136C +ov62_0223136C: ; 0x0223136C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r6, [r0, #0x14] + ldr r4, [r0, #0x18] + ldr r5, [r0, #0x1c] + mov r0, #0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, _022313B8 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x1e + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _022313B8 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x20 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _022313B8 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x1f + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022313B8: .word 0x00002E94 + thumb_func_end ov62_0223136C + + thumb_func_start ov62_022313BC +ov62_022313BC: ; 0x022313BC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r1, _022313DC ; =0x00002E94 + bl sub_0200D070 + ldr r0, [r4, #0x1c] + ldr r1, _022313DC ; =0x00002E94 + bl sub_0200D090 + ldr r0, [r4, #0x1c] + ldr r1, _022313DC ; =0x00002E94 + bl sub_0200D0A0 + pop {r4, pc} + nop +_022313DC: .word 0x00002E94 + thumb_func_end ov62_022313BC + + thumb_func_start ov62_022313E0 +ov62_022313E0: ; 0x022313E0 + push {r3, r4, lr} + sub sp, #0x34 + add r2, r0, #0 + mov r3, #0x80 + add r0, sp, #0 + strh r3, [r0] + mov r3, #0x60 + strh r3, [r0, #2] + mov r3, #0 + strh r3, [r0, #4] + strh r3, [r0, #6] + mov r0, #1 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0x2c] + sub r0, r0, #4 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r0, _02231448 ; =0x00002E94 + str r3, [sp, #0xc] + str r1, [sp, #0x10] + str r3, [sp, #0x30] + str r0, [sp, #0x14] + str r0, [sp, #0x1c] + str r0, [sp, #0x20] + cmp r1, #1 + bne _0223141C + ldr r0, _0223144C ; =0x0000270F + str r0, [sp, #0x18] + b _02231420 +_0223141C: + ldr r0, _02231450 ; =0x00002710 + str r0, [sp, #0x18] +_02231420: + ldr r0, [r2, #0x18] + ldr r1, [r2, #0x1c] + add r2, sp, #0 + bl sub_0200CE6C + add r4, r0, #0 + mov r1, #2 + bl sub_0200D41C + add r0, r4, #0 + mov r1, #0 + bl sub_0200D364 + add r0, r4, #0 + bl sub_0200D330 + add r0, r4, #0 + add sp, #0x34 + pop {r3, r4, pc} + nop +_02231448: .word 0x00002E94 +_0223144C: .word 0x0000270F +_02231450: .word 0x00002710 + thumb_func_end ov62_022313E0 + + thumb_func_start ov62_02231454 +ov62_02231454: ; 0x02231454 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + bl ov62_02230B9C + add r0, r4, #0 + bl ov62_02230B74 + add r0, r4, #0 + bl ov62_022307A0 + pop {r4, pc} + thumb_func_end ov62_02231454 + + thumb_func_start ov62_0223146C +ov62_0223146C: ; 0x0223146C + push {r4, lr} + add r4, r0, #0 + bl ov62_022306B8 + add r0, r4, #0 + bl ov62_02230060 + add r0, r4, #0 + bl sub_0208C06C + add r0, r4, #0 + bl ov62_0223088C + add r0, r4, #0 + mov r1, #1 + bl ov62_02230B9C + add r0, r4, #0 + bl ov62_02230A5C + add r0, r4, #0 + bl ov62_02230AB8 + add r0, r4, #0 + bl ov62_022307C0 + add r0, r4, #0 + bl ov62_02230AF0 + pop {r4, pc} + thumb_func_end ov62_0223146C + + thumb_func_start ov62_022314A8 +ov62_022314A8: ; 0x022314A8 + push {r4, lr} + add r4, r0, #0 + bl ov62_022306B8 + add r0, r4, #0 + bl ov62_02230060 + add r0, r4, #0 + bl sub_0208C06C + add r0, r4, #0 + bl ov62_0223088C + add r0, r4, #0 + mov r1, #1 + bl ov62_02230B9C + add r0, r4, #0 + bl ov62_02230A5C + add r0, r4, #0 + bl ov62_02230AB8 + add r0, r4, #0 + bl ov62_022307C0 + add r0, r4, #0 + bl ov62_02230AF0 + ldr r0, _022314EC ; =0x000006D8 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_022314EC: .word 0x000006D8 + thumb_func_end ov62_022314A8 + + thumb_func_start ov62_022314F0 +ov62_022314F0: ; 0x022314F0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0 + str r0, [r5, #0] + add r4, r1, #0 + mov r0, #0x1f + str r0, [r4, #0] + ldr r0, [sp, #0x20] + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + bne _02231528 + ldr r0, [r4, #0] + add r1, r6, #0 + str r0, [sp] + ldr r0, _02231558 ; =0x04000050 + ldr r3, [r5, #0] + add r2, r7, #0 + bl sub_020BF55C + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r0, _0223155C ; =0x04001050 + ldr r2, [sp, #0x1c] + ldr r3, [r5, #0] + bl sub_020BF55C +_02231528: + ldr r0, [sp, #0x20] + cmp r0, #1 + bne _0223153E + ldr r0, [r4, #0] + add r1, r6, #0 + str r0, [sp] + ldr r0, _02231558 ; =0x04000050 + ldr r3, [r5, #0] + add r2, r7, #0 + bl sub_020BF55C +_0223153E: + ldr r0, [sp, #0x20] + cmp r0, #2 + bne _02231554 + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r0, _0223155C ; =0x04001050 + ldr r2, [sp, #0x1c] + ldr r3, [r5, #0] + bl sub_020BF55C +_02231554: + pop {r3, r4, r5, r6, r7, pc} + nop +_02231558: .word 0x04000050 +_0223155C: .word 0x04001050 + thumb_func_end ov62_022314F0 + + thumb_func_start ov62_02231560 +ov62_02231560: ; 0x02231560 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [sp, #0x20] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + bne _02231590 + ldr r0, [r4, #0] + add r1, r6, #0 + str r0, [sp] + ldr r0, _022315C0 ; =0x04000050 + ldr r3, [r5, #0] + add r2, r7, #0 + bl sub_020BF55C + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r0, _022315C4 ; =0x04001050 + ldr r2, [sp, #0x1c] + ldr r3, [r5, #0] + bl sub_020BF55C +_02231590: + ldr r0, [sp, #0x20] + cmp r0, #1 + bne _022315A6 + ldr r0, [r4, #0] + add r1, r6, #0 + str r0, [sp] + ldr r0, _022315C0 ; =0x04000050 + ldr r3, [r5, #0] + add r2, r7, #0 + bl sub_020BF55C +_022315A6: + ldr r0, [sp, #0x20] + cmp r0, #2 + bne _022315BC + ldr r0, [r4, #0] + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r0, _022315C4 ; =0x04001050 + ldr r2, [sp, #0x1c] + ldr r3, [r5, #0] + bl sub_020BF55C +_022315BC: + pop {r3, r4, r5, r6, r7, pc} + nop +_022315C0: .word 0x04000050 +_022315C4: .word 0x04001050 + thumb_func_end ov62_02231560 + + thumb_func_start ov62_022315C8 +ov62_022315C8: ; 0x022315C8 + push {r3, r4, lr} + sub sp, #0xc + mov r4, #8 + str r4, [sp] + mov r3, #0x12 + str r3, [sp, #4] + str r2, [sp, #8] + add r2, r4, #0 + bl ov62_022314F0 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov62_022315C8 + + thumb_func_start ov62_022315E0 +ov62_022315E0: ; 0x022315E0 + push {r4, r5} + mov r4, #1 + cmp r2, #0 + ldr r2, [r0, #0] + bne _02231602 + cmp r2, #8 + bge _022315F4 + add r2, r2, #1 + str r2, [r0, #0] + mov r4, #0 +_022315F4: + ldr r2, [r1, #0] + cmp r2, #7 + ble _02231618 + sub r2, r2, #3 + str r2, [r1, #0] + mov r4, #0 + b _02231618 +_02231602: + cmp r2, #0 + ble _0223160C + sub r2, r2, #1 + str r2, [r0, #0] + mov r4, #0 +_0223160C: + ldr r2, [r1, #0] + cmp r2, #0x1f + bge _02231618 + add r2, r2, #3 + str r2, [r1, #0] + mov r4, #0 +_02231618: + cmp r3, #0 + bne _02231634 + ldr r2, [r1, #0] + ldr r5, [r0, #0] + lsl r2, r2, #8 + orr r5, r2 + ldr r2, _0223165C ; =0x04000052 + strh r5, [r2] + ldr r2, [r1, #0] + ldr r5, [r0, #0] + lsl r2, r2, #8 + orr r5, r2 + ldr r2, _02231660 ; =0x04001052 + strh r5, [r2] +_02231634: + cmp r3, #1 + bne _02231644 + ldr r2, [r1, #0] + ldr r5, [r0, #0] + lsl r2, r2, #8 + orr r5, r2 + ldr r2, _0223165C ; =0x04000052 + strh r5, [r2] +_02231644: + cmp r3, #2 + bne _02231656 + ldr r2, [r0, #0] + ldr r0, [r1, #0] + add r1, r2, #0 + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _02231660 ; =0x04001052 + strh r1, [r0] +_02231656: + add r0, r4, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 +_0223165C: .word 0x04000052 +_02231660: .word 0x04001052 + thumb_func_end ov62_022315E0 + + thumb_func_start ov62_02231664 +ov62_02231664: ; 0x02231664 + mov r2, #1 + cmp r1, #1 + ldr r1, [r0, #0] + bne _02231678 + cmp r1, #0x10 + bge _02231682 + add r1, r1, #2 + str r1, [r0, #0] + mov r2, #0 + b _02231682 +_02231678: + cmp r1, #0 + ble _02231682 + sub r1, r1, #2 + str r1, [r0, #0] + mov r2, #0 +_02231682: + add r0, r2, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov62_02231664 + + thumb_func_start ov62_02231688 +ov62_02231688: ; 0x02231688 + mov r1, #0x10 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov62_02231688 + + .rodata + + + .global Unk_ov62_02248890 +Unk_ov62_02248890: ; 0x02248890 + .incbin "incbin/overlay62_rodata.bin", 0x164, 0x16C - 0x164 + + .global Unk_ov62_02248898 +Unk_ov62_02248898: ; 0x02248898 + .incbin "incbin/overlay62_rodata.bin", 0x16C, 0x174 - 0x16C + + .global Unk_ov62_022488A0 +Unk_ov62_022488A0: ; 0x022488A0 + .incbin "incbin/overlay62_rodata.bin", 0x174, 0x17C - 0x174 + + .global Unk_ov62_022488A8 +Unk_ov62_022488A8: ; 0x022488A8 + .incbin "incbin/overlay62_rodata.bin", 0x17C, 0x186 - 0x17C + + .global Unk_ov62_022488B2 +Unk_ov62_022488B2: ; 0x022488B2 + .incbin "incbin/overlay62_rodata.bin", 0x186, 0x194 - 0x186 + + .global Unk_ov62_022488C0 +Unk_ov62_022488C0: ; 0x022488C0 + .incbin "incbin/overlay62_rodata.bin", 0x194, 0x1AC - 0x194 + + .global Unk_ov62_022488D8 +Unk_ov62_022488D8: ; 0x022488D8 + .incbin "incbin/overlay62_rodata.bin", 0x1AC, 0x18 + diff --git a/asm/ov62_02231690.s b/asm/ov62_02231690.s new file mode 100644 index 000000000..1faaf47c8 --- /dev/null +++ b/asm/ov62_02231690.s @@ -0,0 +1,6667 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02231690 +ov62_02231690: ; 0x02231690 + ldr r3, _0223169C ; =sub_0200B368 + add r2, r0, #0 + mov r0, #4 + mov r1, #0x40 + bx r3 + nop +_0223169C: .word sub_0200B368 + thumb_func_end ov62_02231690 + + thumb_func_start ov62_022316A0 +ov62_022316A0: ; 0x022316A0 + push {r3, r4, r5} + sub sp, #0x1c + ldr r4, _022316CC ; =0x02248944 + add r5, r0, #0 + ldmia r4!, {r0, r1} + add r3, sp, #0 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + add r5, #0x5c + str r0, [r3, #0] + ldrb r0, [r5] + lsl r0, r0, #2 + ldr r0, [r2, r0] + add sp, #0x1c + pop {r3, r4, r5} + bx lr + nop +_022316CC: .word 0x02248944 + thumb_func_end ov62_022316A0 + + thumb_func_start ov62_022316D0 +ov62_022316D0: ; 0x022316D0 + push {r3, r4, r5} + sub sp, #0x1c + ldr r4, _02231708 ; =0x0224897C + add r5, r0, #0 + ldmia r4!, {r0, r1} + add r3, sp, #0 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + ldr r0, [r5, #0] + cmp r0, #0 + beq _022316FA + add sp, #0x1c + ldr r0, _0223170C ; =0x00007E05 + pop {r3, r4, r5} + bx lr +_022316FA: + add r5, #0x5c + ldrb r0, [r5] + lsl r0, r0, #2 + ldr r0, [r2, r0] + add sp, #0x1c + pop {r3, r4, r5} + bx lr + ; .align 2, 0 +_02231708: .word 0x0224897C +_0223170C: .word 0x00007E05 + thumb_func_end ov62_022316D0 + + thumb_func_start ov62_02231710 +ov62_02231710: ; 0x02231710 + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + ldr r4, _022317BC ; =0x02248998 + add r5, r0, #0 + add r2, r1, #0 + add r3, sp, #0x58 + ldmia r4!, {r0, r1} + str r3, [sp] + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r4, _022317C0 ; =0x02248928 + str r0, [r3, #0] + add r3, sp, #0x3c + ldmia r4!, {r0, r1} + mov ip, r3 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r4, _022317C4 ; =0x022489B4 + str r0, [r3, #0] + add r3, sp, #0x20 + ldmia r4!, {r0, r1} + add r7, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r4, _022317C8 ; =0x02248960 + str r0, [r3, #0] + add r3, sp, #4 + ldmia r4!, {r0, r1} + add r6, r3, #0 + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + add r5, #0x5c + str r0, [r3, #0] + ldrb r0, [r5] + cmp r2, #3 + bhi _022317B0 + add r1, r2, r2 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02231784: ; jump table + .short _0223178C - _02231784 - 2 ; case 0 + .short _02231796 - _02231784 - 2 ; case 1 + .short _022317A0 - _02231784 - 2 ; case 2 + .short _022317A8 - _02231784 - 2 ; case 3 +_0223178C: + lsl r1, r0, #2 + ldr r0, [sp] + add sp, #0x74 + ldr r0, [r0, r1] + pop {r4, r5, r6, r7, pc} +_02231796: + lsl r1, r0, #2 + mov r0, ip + add sp, #0x74 + ldr r0, [r0, r1] + pop {r4, r5, r6, r7, pc} +_022317A0: + lsl r0, r0, #2 + add sp, #0x74 + ldr r0, [r7, r0] + pop {r4, r5, r6, r7, pc} +_022317A8: + lsl r0, r0, #2 + add sp, #0x74 + ldr r0, [r6, r0] + pop {r4, r5, r6, r7, pc} +_022317B0: + bl sub_02022974 + ldr r0, [sp, #0x58] + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + nop +_022317BC: .word 0x02248998 +_022317C0: .word 0x02248928 +_022317C4: .word 0x022489B4 +_022317C8: .word 0x02248960 + thumb_func_end ov62_02231710 + + thumb_func_start ov62_022317CC +ov62_022317CC: ; 0x022317CC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + ldr r1, [r5, #0x18] + ldr r4, [r5, #0x28] + str r1, [sp, #0x18] + ldr r7, [r5, #0x1c] + ldr r6, [r5, #0x14] + mov r1, #3 + bl ov62_02231710 + add r2, r0, #0 + mov r1, #0 + mov r0, #0x12 + str r1, [sp] + lsl r0, r0, #4 + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r4, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r0, r5, #0 + mov r1, #3 + bl ov62_02231710 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x12 + lsl r0, r0, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r0, r5, #0 + mov r1, #0 + bl ov62_02231710 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r0, r5, #0 + mov r1, #0 + bl ov62_02231710 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xa2 + mov r3, #0x66 + bl sub_02003050 + add r1, r5, #0 + mov r0, #0x6f + add r1, #0x5c + lsl r0, r0, #4 + ldrb r1, [r1] + ldr r0, [r5, r0] + bl sub_0208B63C + add r1, r5, #0 + mov r0, #0x6f + add r1, #0x5c + lsl r0, r0, #4 + ldrb r1, [r1] + ldr r0, [r5, r0] + bl sub_0208B63C + ldr r1, _022318E0 ; =0x0000270F + add r0, r7, #0 + bl sub_0200D080 + ldr r1, _022318E4 ; =0x00002710 + add r0, r7, #0 + bl sub_0200D080 + add r0, r5, #0 + mov r1, #2 + bl ov62_02231710 + str r6, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _022318E0 ; =0x0000270F + ldr r2, [sp, #0x18] + str r0, [sp, #0x14] + add r0, r4, #0 + mov r1, #2 + add r3, r7, #0 + bl sub_0200CDC4 + add r0, r5, #0 + mov r1, #2 + bl ov62_02231710 + str r6, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _022318E4 ; =0x00002710 + ldr r2, [sp, #0x18] + str r0, [sp, #0x14] + add r0, r4, #0 + add r3, r7, #0 + bl sub_0200CDC4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_022318E0: .word 0x0000270F +_022318E4: .word 0x00002710 + thumb_func_end ov62_022317CC + + thumb_func_start ov62_022318E8 +ov62_022318E8: ; 0x022318E8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x58] + ldr r2, _02231944 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r1, #2 + mov r3, #0 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + ldr r2, _02231944 ; =0x0000FFFF + add r3, r1, #0 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02231944 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r1, #3 + mov r3, #0 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02231944 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r1, #1 + mov r3, #0 + bl sub_02003A2C + add sp, #4 + pop {r3, r4, pc} + nop +_02231944: .word 0x0000FFFF + thumb_func_end ov62_022318E8 + + thumb_func_start ov62_02231948 +ov62_02231948: ; 0x02231948 + push {r3, r4, lr} + sub sp, #0xc + add r4, r2, #0 + mov r2, #0 + add r3, r0, #0 + str r2, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0x4b + mov r1, #0xd + bl sub_02007068 + ldr r1, [sp, #8] + lsr r1, r1, #1 + str r1, [r4, #0] + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02231948 + + thumb_func_start ov62_0223196C +ov62_0223196C: ; 0x0223196C + mov r2, #0x87 + lsl r2, r2, #4 + str r1, [r0, r2] + bx lr + thumb_func_end ov62_0223196C + + thumb_func_start ov62_02231974 +ov62_02231974: ; 0x02231974 + mov r1, #0x87 + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov62_02231974 + + thumb_func_start ov62_0223197C +ov62_0223197C: ; 0x0223197C + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + ldr r4, _02231A10 ; =0x000008A4 + add r6, r1, #0 + add r5, r0, #0 + sub r1, r4, #4 + ldr r1, [r5, r1] + cmp r1, #1 + beq _02231A0C + mov r2, #1 + sub r1, r4, #4 + str r2, [r5, r1] + mov r1, #6 + mov r2, #0 + bl ov62_022302A8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, _02231A14 ; =0x04001050 + mov r1, #0 + strh r1, [r0] + mov r0, #6 + bl sub_02019060 + add r0, r5, r4 + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r5, r4 + mov r2, #6 + mov r3, #1 + bl sub_0201A7E8 + ldr r0, [r5, #0x48] + add r1, r6, #0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, r4 + mov r1, #0xcc + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02231A18 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, r4 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC +_02231A0C: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02231A10: .word 0x000008A4 +_02231A14: .word 0x04001050 +_02231A18: .word 0x000F0D0C + thumb_func_end ov62_0223197C + + thumb_func_start ov62_02231A1C +ov62_02231A1C: ; 0x02231A1C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x8a + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0 + beq _02231A78 + mov r1, #0 + str r1, [r4, r0] + add r0, r0, #4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _02231A7C ; =0x000008A4 + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + mov r0, #8 + str r0, [sp] + ldr r0, _02231A80 ; =0x04000050 + mov r1, #4 + mov r2, #0x12 + mov r3, #7 + bl sub_020BF55C + mov r0, #8 + str r0, [sp] + ldr r0, _02231A84 ; =0x04001050 + mov r1, #4 + mov r2, #0x12 + mov r3, #7 + bl sub_020BF55C +_02231A78: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02231A7C: .word 0x000008A4 +_02231A80: .word 0x04000050 +_02231A84: .word 0x04001050 + thumb_func_end ov62_02231A1C + + thumb_func_start ov62_02231A88 +ov62_02231A88: ; 0x02231A88 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02231AA8 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _02231AA8 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + pop {r4, pc} + nop +_02231AA8: .word 0x000008A4 + thumb_func_end ov62_02231A88 + + thumb_func_start ov62_02231AAC +ov62_02231AAC: ; 0x02231AAC + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + ldr r4, _02231B34 ; =0x000008A4 + add r6, r1, #0 + add r5, r0, #0 + sub r1, r4, #4 + ldr r1, [r5, r1] + cmp r1, #1 + beq _02231B30 + mov r2, #1 + sub r1, r4, #4 + str r2, [r5, r1] + mov r1, #2 + mov r2, #0 + bl ov62_022302A8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, r4 + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r5, r4 + mov r2, #2 + mov r3, #1 + bl sub_0201A7E8 + ldr r0, [r5, #0x48] + add r1, r6, #0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, r4 + mov r1, #0xcc + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02231B38 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, r4 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC +_02231B30: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02231B34: .word 0x000008A4 +_02231B38: .word 0x000F0D0C + thumb_func_end ov62_02231AAC + + thumb_func_start ov62_02231B3C +ov62_02231B3C: ; 0x02231B3C + push {r4, r5, r6, lr} + sub sp, #0x10 + ldr r6, _02231B84 ; =0x000008A4 + add r5, r0, #0 + sub r0, r6, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02231B80 + ldr r0, [r5, #0x48] + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, r6 + mov r1, #0xcc + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02231B88 ; =0x000F0D0C + add r2, r4, #0 + str r0, [sp, #8] + add r0, r5, r6 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, r6 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC +_02231B80: + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02231B84: .word 0x000008A4 +_02231B88: .word 0x000F0D0C + thumb_func_end ov62_02231B3C + + thumb_func_start ov62_02231B8C +ov62_02231B8C: ; 0x02231B8C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x8a + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0 + beq _02231BBE + mov r1, #0 + str r1, [r4, r0] + add r0, r0, #4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _02231BC0 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C +_02231BBE: + pop {r4, pc} + ; .align 2, 0 +_02231BC0: .word 0x000008A4 + thumb_func_end ov62_02231B8C + + thumb_func_start ov62_02231BC4 +ov62_02231BC4: ; 0x02231BC4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + ldr r4, _02231C6C ; =0x000008A4 + add r5, r0, #0 + sub r0, r4, #4 + ldr r0, [r5, r0] + add r6, r1, #0 + cmp r0, #1 + beq _02231C66 + add r0, r4, #0 + sub r0, #8 + ldr r0, [r5, r0] + cmp r0, #1 + beq _02231C66 + mov r1, #1 + sub r0, r4, #4 + str r1, [r5, r0] + add r0, r4, #0 + sub r0, #8 + str r1, [r5, r0] + ldr r0, _02231C70 ; =0x04001050 + mov r1, #0 + strh r1, [r0] + mov r0, #6 + bl sub_02019060 + add r0, r5, #0 + mov r1, #6 + mov r2, #0 + bl ov62_022302A8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r5, r4 + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r5, r4 + mov r2, #6 + mov r3, #1 + bl sub_0201A7E8 + ldr r0, [r5, #0x48] + add r1, r6, #0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, r4 + mov r1, #0xcc + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02231C74 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, r4 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC +_02231C66: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_02231C6C: .word 0x000008A4 +_02231C70: .word 0x04001050 +_02231C74: .word 0x000F0D0C + thumb_func_end ov62_02231BC4 + + thumb_func_start ov62_02231C78 +ov62_02231C78: ; 0x02231C78 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xd8 + ldr r3, _02232004 ; =0x02248A28 + add r7, r1, #0 + str r0, [sp, #0x14] + add r2, sp, #0x88 + mov r1, #0x28 +_02231C86: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _02231C86 + ldr r4, _02232008 ; =0x022489F8 + add r3, sp, #0x58 + mov r2, #6 +_02231C98: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02231C98 + mov r0, #1 + str r0, [sp, #0x24] + mov r0, #0 + ldr r4, [sp, #0x14] + str r0, [sp, #0x28] + add r0, sp, #0x58 + add r4, #0xc + str r0, [sp, #0x1c] + add r5, sp, #0x88 +_02231CB2: + ldr r1, [sp, #0x1c] + ldr r0, [r7, #0x48] + ldr r1, [r1, #0] + bl sub_0200B1EC + add r6, r0, #0 + add r0, r4, #0 + bl sub_0201A7A0 + mov r0, #2 + ldrsh r0, [r5, r0] + mov r3, #0 + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #4 + ldrsh r0, [r5, r0] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #6 + ldrsh r0, [r5, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [sp, #0x24] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrsh r3, [r5, r3] + ldr r0, [r7, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r4, #0 + add r1, r6, #0 + bl ov62_0223429C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r6, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + mov r0, #4 + ldrsh r1, [r5, r0] + mov r0, #6 + ldrsh r0, [r5, r0] + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x24] + add r0, r0, r2 + str r0, [sp, #0x24] + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x1c] + add r4, #0x10 + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x28] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, #8 + blt _02231CB2 + ldr r0, [sp, #0x14] + ldr r0, [r0, #0] + str r0, [sp, #0x20] + mov r0, #0x66 + bl ov62_02231690 + add r4, r0, #0 + ldr r5, [sp, #0x14] + ldr r0, [sp, #0x20] + mov r1, #0x66 + add r5, #0xc + bl sub_02030B94 + str r0, [sp, #0x2c] + ldr r1, [sp, #0x2c] + add r0, r7, #0 + bl ov62_022349A8 + ldr r0, [r7, #0x48] + mov r1, #0xd + bl sub_0200B1EC + str r0, [sp, #0x30] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x2c] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x30] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x2c] + bl sub_020237BC + ldr r0, [sp, #0x30] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200C41C + ldr r0, [sp, #0x20] + bl sub_02030CCC + str r0, [sp, #0x34] + ldr r5, [sp, #0x14] + ldr r0, [r7, #0x48] + mov r1, #0xf + add r5, #0x2c + bl sub_0200B1EC + str r0, [sp, #0x38] + ldr r0, [sp, #0x20] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x3c] + ldr r1, [sp, #0x3c] + add r0, r7, #0 + bl ov62_022349A8 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r2, [sp, #0x34] + add r0, r4, #0 + mov r1, #0 + bl sub_0200C2E0 + ldr r2, [sp, #0x38] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x38] + bl sub_020237BC + ldr r0, [sp, #0x3c] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200C41C + ldr r5, [sp, #0x14] + ldr r0, [r7, #0x48] + add r5, #0x3c + mov r1, #0x10 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_02030BFC + add r6, r0, #0 + ldr r0, [sp, #0x20] + bl sub_02030C08 + ldr r5, [sp, #0x14] + str r0, [sp, #0x40] + add r5, #0x4c + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + cmp r6, #0 + bne _02231F18 + ldr r0, [r7, #0x48] + mov r1, #0x15 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + b _02231FD2 +_02231F18: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x44] + ldr r0, [r7, #0x48] + mov r1, #0x16 + bl sub_0200B1EC + str r0, [sp, #0x48] + add r0, r4, #0 + mov r1, #0 + add r2, r6, #0 + bl sub_0200BDD0 + ldr r1, [sp, #0x44] + ldr r2, [sp, #0x48] + add r0, r4, #0 + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + ldr r2, [sp, #0x44] + str r0, [sp, #8] + add r0, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x44] + bl sub_020237BC + ldr r0, [sp, #0x48] + bl sub_020237BC + ldr r0, [sp, #0x40] + cmp r0, #0 + beq _02231FD2 + ldr r0, [sp, #0x14] + mov r1, #0 + str r0, [sp, #0x18] + add r0, #0x5c + str r0, [sp, #0x18] + bl sub_0201ADA4 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r5, r0, #0 + ldr r0, [r7, #0x48] + mov r1, #0x17 + bl sub_0200B1EC + str r0, [sp, #0x4c] + ldr r3, [sp, #0x40] + add r0, r4, #0 + mov r1, #0 + add r2, r6, #0 + bl sub_0200BE08 + ldr r2, [sp, #0x4c] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x18] + mov r3, #4 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x18] + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + ldr r0, [sp, #0x4c] + bl sub_020237BC +_02231FD2: + add r0, r4, #0 + bl sub_0200C41C + ldr r5, [sp, #0x14] + ldr r0, [r7, #0x48] + add r5, #0x6c + mov r1, #0x11 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223200C ; =0x000F0D00 + b _02232010 + ; .align 2, 0 +_02232004: .word 0x02248A28 +_02232008: .word 0x022489F8 +_0223200C: .word 0x000F0D00 +_02232010: + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + add r1, sp, #0x50 + add r0, #0x7c + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + mov r2, #0x66 + bl sub_02030C28 + add r5, r0, #0 + bne _02232046 + add r0, sp, #0x50 + mov r1, #0x66 + bl sub_02014B34 + add r5, r0, #0 +_02232046: + ldr r0, [sp, #0x14] + mov r1, #0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223207C ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x14] + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B3F0 + add sp, #0xd8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223207C: .word 0x000F0D00 + thumb_func_end ov62_02231C78 + + thumb_func_start ov62_02232080 +ov62_02232080: ; 0x02232080 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0xc +_02232088: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #8 + blt _02232088 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02232080 + + thumb_func_start ov62_022320A0 +ov62_022320A0: ; 0x022320A0 + push {r3, lr} + ldr r0, [r0, #4] + cmp r0, #0 + beq _022320AC + bl sub_0200D3F4 +_022320AC: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_022320A0 + + thumb_func_start ov62_022320B0 +ov62_022320B0: ; 0x022320B0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0x1c] + ldr r1, _022320E8 ; =0x000186A0 + bl sub_0200D070 + ldr r0, [r5, #0x1c] + ldr r1, _022320E8 ; =0x000186A0 + bl sub_0200D080 + ldr r0, [r5, #0x1c] + ldr r1, _022320E8 ; =0x000186A0 + bl sub_0200D090 + ldr r0, [r5, #0x1c] + ldr r1, _022320E8 ; =0x000186A0 + bl sub_0200D0A0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _022320E4 + bl sub_0200D0F4 + mov r0, #0 + str r0, [r4, #4] +_022320E4: + pop {r3, r4, r5, pc} + nop +_022320E8: .word 0x000186A0 + thumb_func_end ov62_022320B0 + + thumb_func_start ov62_022320EC +ov62_022320EC: ; 0x022320EC + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + add r5, r0, #0 + add r0, r1, #0 + ldr r6, [r1, #0x18] + ldr r4, [r0, #0x1c] + ldr r7, [r0, #0x28] + str r1, [sp, #0x18] + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _022321F0 ; =0x000186A0 + mov r1, #2 + str r0, [sp, #0x14] + add r0, r7, #0 + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CD7C + str r0, [sp, #0x1c] + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _022321F0 ; =0x000186A0 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _022321F0 ; =0x000186A0 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x13 + bl sub_0200CE3C + ldr r0, [r5, #0] + bl sub_02030BBC + add r7, r0, #0 + ldr r0, [r5, #0] + bl sub_02030BCC + str r0, [sp, #0x20] + ldr r0, [r5, #0] + bl sub_02030BEC + str r0, [sp, #0x24] + cmp r7, #0 + beq _022321EC + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x20] + add r0, r7, #0 + bl sub_02079D8C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022321F0 ; =0x000186A0 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r6, #0 + mov r2, #0x13 + bl sub_0200D888 + mov r1, #0x4c + add r0, sp, #0x28 + strh r1, [r0] + mov r1, #0x3c + strh r1, [r0, #2] + mov r2, #0 + strh r2, [r0, #4] + strh r2, [r0, #6] + ldr r0, _022321F0 ; =0x000186A0 + mov r1, #1 + str r0, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + sub r0, r1, #2 + str r1, [sp, #0x38] + str r0, [sp, #0x4c] + str r0, [sp, #0x50] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x18] + str r2, [sp, #0x30] + str r2, [sp, #0x34] + str r2, [sp, #0x54] + str r2, [sp, #0x58] + ldr r0, [r0, #0x18] + ldr r1, [r1, #0x1c] + add r2, sp, #0x28 + bl sub_0200CE6C + str r0, [r5, #4] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x24] + add r0, r7, #0 + bl sub_02079EDC + add r2, r0, #0 + ldr r1, [sp, #0x1c] + ldr r0, [r5, #4] + add r1, r1, r2 + bl sub_0200D430 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0200D364 +_022321EC: + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022321F0: .word 0x000186A0 + thumb_func_end ov62_022320EC + + thumb_func_start ov62_022321F4 +ov62_022321F4: ; 0x022321F4 + ldr r3, _022321FC ; =sub_0200D3F4 + ldr r0, [r0, #8] + bx r3 + nop +_022321FC: .word sub_0200D3F4 + thumb_func_end ov62_022321F4 + + thumb_func_start ov62_02232200 +ov62_02232200: ; 0x02232200 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x1c] + ldr r1, _02232230 ; =0x0002869F + bl sub_0200D070 + ldr r0, [r4, #0x1c] + ldr r1, _02232230 ; =0x0002869F + bl sub_0200D080 + ldr r0, [r4, #0x1c] + ldr r1, _02232230 ; =0x0002869F + bl sub_0200D090 + ldr r0, [r4, #0x1c] + ldr r1, _02232230 ; =0x0002869F + bl sub_0200D0A0 + ldr r0, [r5, #8] + bl sub_0200D0F4 + pop {r3, r4, r5, pc} + nop +_02232230: .word 0x0002869F + thumb_func_end ov62_02232200 + + thumb_func_start ov62_02232234 +ov62_02232234: ; 0x02232234 + push {r4, lr} + add r4, r1, #0 + cmp r0, #0x10 + bgt _02232240 + cmp r0, #0 + bge _02232246 +_02232240: + bl sub_02022974 + mov r0, #0 +_02232246: + cmp r4, #4 + bne _02232252 + mov r1, #0x4f + lsl r1, r1, #2 + add r0, r0, r1 + pop {r4, pc} +_02232252: + cmp r4, #5 + blt _0223225A + mov r0, #0 + pop {r4, pc} +_0223225A: + lsl r2, r0, #4 + ldr r0, _02232268 ; =0x02248AD8 + lsl r1, r4, #2 + add r0, r0, r2 + ldr r0, [r1, r0] + pop {r4, pc} + nop +_02232268: .word 0x02248AD8 + thumb_func_end ov62_02232234 + + thumb_func_start ov62_0223226C +ov62_0223226C: ; 0x0223226C + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + add r5, r0, #0 + mov r0, #0xe + str r0, [sp, #0x20] + ldr r0, [r5, #0] + str r1, [sp, #0x18] + mov r7, #0xd + bl sub_02030BAC + ldr r1, [sp, #0x18] + ldr r2, _02232370 ; =0x0000086C + ldr r6, [r1, #0x18] + ldr r4, [r1, #0x1c] + ldr r1, [r1, #0x28] + str r1, [sp, #0x24] + ldr r1, [sp, #0x18] + ldr r1, [r1, r2] + cmp r1, #0 + bne _022322A0 + cmp r0, #1 + bne _022322C4 + mov r0, #0x10 + mov r7, #0xf + str r0, [sp, #0x20] + b _022322C4 +_022322A0: + ldr r0, [r5, #0] + bl sub_02030CDC + str r0, [sp, #0x1c] + cmp r0, #0x10 + blt _022322B0 + mov r0, #0 + str r0, [sp, #0x1c] +_022322B0: + ldr r0, [sp, #0x1c] + mov r1, #2 + bl ov62_02232234 + add r7, r0, #0 + ldr r0, [sp, #0x1c] + mov r1, #3 + bl ov62_02232234 + str r0, [sp, #0x20] +_022322C4: + mov r0, #0x92 + str r0, [sp] + str r7, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02232374 ; =0x0002869F + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CD7C + mov r0, #0 + str r0, [sp] + ldr r0, _02232374 ; =0x0002869F + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x92 + mov r3, #9 + bl sub_0200CE0C + mov r0, #0 + str r0, [sp] + ldr r0, _02232374 ; =0x0002869F + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x92 + mov r3, #0xa + bl sub_0200CE3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02232374 ; =0x0002869F + ldr r3, [sp, #0x20] + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0x92 + bl sub_0200D888 + mov r1, #0x28 + add r0, sp, #0x28 + strh r1, [r0] + mov r1, #0x3c + strh r1, [r0, #2] + mov r2, #0 + strh r2, [r0, #4] + strh r2, [r0, #6] + ldr r0, _02232374 ; =0x0002869F + mov r1, #1 + str r0, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + sub r0, r1, #2 + str r1, [sp, #0x38] + str r0, [sp, #0x4c] + str r0, [sp, #0x50] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x18] + str r2, [sp, #0x30] + str r2, [sp, #0x34] + str r2, [sp, #0x54] + str r2, [sp, #0x58] + ldr r0, [r0, #0x18] + ldr r1, [r1, #0x1c] + add r2, sp, #0x28 + bl sub_0200CE6C + str r0, [r5, #8] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r5, #8] + bl sub_0200D330 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02232370: .word 0x0000086C +_02232374: .word 0x0002869F + thumb_func_end ov62_0223226C + + thumb_func_start ov62_02232378 +ov62_02232378: ; 0x02232378 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov62_02231C78 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_0223226C + add r0, r5, #0 + add r1, r4, #0 + bl ov62_022320EC + pop {r3, r4, r5, pc} + thumb_func_end ov62_02232378 + + thumb_func_start ov62_02232394 +ov62_02232394: ; 0x02232394 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov62_02232080 + add r0, r5, #0 + mov r1, #0 + bl ov62_022323B8 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_02232200 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_022320B0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02232394 + + thumb_func_start ov62_022323B8 +ov62_022323B8: ; 0x022323B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov62_022320A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_022321F4 + pop {r3, r4, r5, pc} + thumb_func_end ov62_022323B8 + + thumb_func_start ov62_022323CC +ov62_022323CC: ; 0x022323CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, _02232498 ; =0x0000088C + add r4, r1, #0 + ldr r0, [r4, r0] + bl sub_02030BFC + str r0, [sp, #0x10] + ldr r0, _02232498 ; =0x0000088C + ldr r0, [r4, r0] + bl sub_02030C08 + add r6, r0, #0 + ldr r0, [sp, #0x10] + add r5, #0x18 + cmp r0, #0 + bne _02232400 + cmp r6, #0 + bne _02232400 + ldr r0, [r4, #0x48] + mov r1, #0x7d + bl sub_0200B1EC + str r0, [sp, #0x14] + b _0223246C +_02232400: + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + cmp r6, #0 + beq _02232438 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x14] + ldr r0, [r4, #0x48] + mov r1, #0x17 + bl sub_0200B1EC + add r4, r0, #0 + ldr r2, [sp, #0x10] + add r0, r7, #0 + mov r1, #0 + add r3, r6, #0 + bl sub_0200BE08 + ldr r1, [sp, #0x14] + add r0, r7, #0 + add r2, r4, #0 + bl sub_0200C388 + b _02232460 +_02232438: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x14] + ldr r0, [r4, #0x48] + mov r1, #0x16 + bl sub_0200B1EC + add r4, r0, #0 + ldr r2, [sp, #0x10] + add r0, r7, #0 + mov r1, #0 + bl sub_0200BDD0 + ldr r1, [sp, #0x14] + add r0, r7, #0 + add r2, r4, #0 + bl sub_0200C388 +_02232460: + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 +_0223246C: + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223249C ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + ldr r2, [sp, #0x14] + add r0, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x14] + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02232498: .word 0x0000088C +_0223249C: .word 0x000F0D00 + thumb_func_end ov62_022323CC + + thumb_func_start ov62_022324A0 +ov62_022324A0: ; 0x022324A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + str r0, [sp, #0x18] + add r0, #0x18 + add r4, r2, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #4] + str r1, [sp, #0x14] + str r0, [r5, #4] + mov r0, #0 + str r0, [r5, #0] + str r0, [r5, #0xc] + ldr r0, [r4, #0x24] + str r0, [r5, #0x10] + str r4, [r5, #0x28] + add r0, r1, #0 + ldr r0, [r0, #0x48] + str r0, [r5, #0x34] + ldr r0, [r5, #4] + ldr r1, [r5, #0x10] + bl sub_020E1F6C + add r0, r0, #1 + str r0, [r5, #0x14] + ldr r1, [r5, #4] + ldr r0, [r5, #0x10] + cmp r1, r0 + bge _022324E6 + str r1, [r5, #0x10] + sub r0, r1, #1 + str r0, [r5, #0x40] + ldr r0, [r5, #0x10] + sub r0, r0, #1 + str r0, [r5, #0x44] +_022324E6: + ldr r0, [sp, #0x18] + bl sub_0201A7A0 + ldr r0, [r4, #0x10] + ldr r1, [sp, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r4, #0x14] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r4, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [r4, #0x1c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, [r4, #0x20] + ldr r3, [r4, #0xc] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r0, #0x24] + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [sp, #0x18] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x10] + mov r7, #0 + cmp r0, #0 + ble _02232584 + add r6, r7, #0 +_02232538: + ldr r1, [r4, #0] + ldr r0, [r5, #0x34] + ldr r1, [r1, r6] + bl sub_0200B1EC + str r0, [sp, #0x1c] + ldr r0, [r4, #8] + mov r1, #0 + lsl r0, r0, #4 + mul r0, r7 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232590 ; =0x000F0D00 + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [r4, #0] + ldr r0, [r0, r6] + cmp r0, #0x10 + bne _0223257A + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov62_022323CC +_0223257A: + ldr r0, [r5, #0x10] + add r7, r7, #1 + add r6, #0x10 + cmp r7, r0 + blt _02232538 +_02232584: + ldr r0, [sp, #0x18] + bl sub_0201A9A4 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02232590: .word 0x000F0D00 + thumb_func_end ov62_022324A0 + + thumb_func_start ov62_02232594 +ov62_02232594: ; 0x02232594 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r4, r0, #0 + str r0, [sp, #0x20] + add r0, #0x18 + add r5, r3, #0 + str r0, [sp, #0x20] + ldr r0, [r5, #4] + str r1, [sp, #0x14] + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #0xc] + ldr r0, [r5, #0x24] + cmp r2, #0 + str r0, [r4, #0x10] + str r5, [r4, #0x28] + beq _022325BC + str r2, [r4, #0x34] + b _022325C2 +_022325BC: + add r0, r1, #0 + ldr r0, [r0, #0x48] + str r0, [r4, #0x34] +_022325C2: + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + bl sub_020E1F6C + add r0, r0, #1 + str r0, [r4, #0x14] + ldr r1, [r4, #0x10] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r4, #0x40] + ldr r1, [r4, #0x10] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r4, #0x44] + ldr r1, [r4, #4] + ldr r0, [r4, #0x10] + cmp r1, r0 + bge _022325F6 + str r1, [r4, #0x10] + sub r0, r1, #1 + str r0, [r4, #0x40] + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x44] +_022325F6: + ldr r0, [sp, #0x20] + bl sub_0201A7A0 + ldr r0, [r5, #0x10] + ldr r1, [sp, #0x20] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r5, #0x14] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [r5, #0x1c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, [r5, #0x20] + ldr r3, [r5, #0xc] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r0, #0x24] + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [sp, #0x20] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223268C + ldr r0, [r4, #0x10] + mov r6, #0 + cmp r0, #0 + ble _0223268A + add r7, r6, #0 +_0223264E: + ldr r1, [r5, #0] + ldr r0, [r4, #0x34] + ldr r1, [r1, r7] + bl sub_0200B1EC + str r0, [sp, #0x24] + ldr r0, [r5, #8] + mov r1, #0 + lsl r0, r0, #4 + mul r0, r6 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232770 ; =0x000F0D00 + ldr r2, [sp, #0x24] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [sp, #0x24] + bl sub_020237BC + ldr r0, [r4, #0x10] + add r6, r6, #1 + add r7, #0x10 + cmp r6, r0 + blt _0223264E +_0223268A: + b _02232766 +_0223268C: + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #0x10] + cmp r0, #0 + ble _02232766 + ldr r0, [sp, #0x14] + mov r5, #4 + str r0, [sp, #0x1c] +_0223269C: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x14] + mov r1, #0x63 + ldr r0, [r0, #0x48] + bl sub_0200B1EC + str r0, [sp, #0x28] + mov r0, #1 + ldr r1, [sp, #0x18] + str r0, [sp] + ldr r0, [sp, #0x2c] + add r1, r1, #1 + mov r2, #2 + mov r3, #1 + bl sub_020238A0 + ldr r2, [sp, #0x1c] + ldr r1, _02232774 ; =0x00002608 + add r0, r7, #0 + ldr r1, [r2, r1] + bl sub_02023D28 + ldr r0, [sp, #0x14] + add r1, r7, #0 + bl ov62_022349A8 + mov r0, #0 + ldr r1, [sp, #0x2c] + add r2, r0, #0 + bl sub_02002D7C + mov ip, r0 + str r5, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232770 ; =0x000F0D00 + ldr r2, [sp, #0x2c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + mov r3, #0x10 + mov r6, ip + mov r1, #0 + sub r3, r3, r6 + bl sub_0201D78C + str r5, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232770 ; =0x000F0D00 + ldr r2, [sp, #0x28] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + mov r1, #0 + mov r3, #0x10 + bl sub_0201D78C + str r5, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232770 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + add r2, r7, #0 + mov r3, #0x16 + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x2c] + bl sub_020237BC + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x1c] + ldr r1, [r4, #0x10] + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r5, #0x18 + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, r1 + blt _0223269C +_02232766: + ldr r0, [sp, #0x20] + bl sub_0201A9A4 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02232770: .word 0x000F0D00 +_02232774: .word 0x00002608 + thumb_func_end ov62_02232594 + + thumb_func_start ov62_02232778 +ov62_02232778: ; 0x02232778 + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0xe0 + add r4, r0, #0 + ldr r0, [sp, #0x2f4] + add r5, r3, #0 + str r0, [sp, #0x2f4] + ldr r0, [sp, #0x2f8] + str r1, [sp, #0x14] + str r0, [sp, #0x2f8] + mov r0, #0 + str r0, [sp, #0x40] + add r6, sp, #0x264 + add r1, r0, #0 + mov r3, #7 +_02232796: + stmia r6!, {r0, r1} + stmia r6!, {r0, r1} + sub r3, r3, #1 + bne _02232796 + stmia r6!, {r0, r1} + add r0, r4, #0 + str r0, [sp, #0x50] + add r0, #0x18 + str r0, [sp, #0x50] + ldr r0, [r5, #4] + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #0xc] + ldr r0, [r5, #0x24] + cmp r2, #0 + str r0, [r4, #0x10] + str r5, [r4, #0x28] + beq _022327C0 + str r2, [r4, #0x34] + b _022327C6 +_022327C0: + ldr r0, [sp, #0x14] + ldr r0, [r0, #0x48] + str r0, [r4, #0x34] +_022327C6: + ldr r0, [r4, #4] + ldr r1, [r4, #0x10] + bl sub_020E1F6C + add r0, r0, #1 + str r0, [r4, #0x14] + ldr r1, [r4, #4] + ldr r0, [r4, #0x10] + cmp r1, r0 + bge _022327E6 + str r1, [r4, #0x10] + sub r0, r1, #1 + str r0, [r4, #0x40] + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x44] +_022327E6: + ldr r1, [r4, #0x10] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r4, #0x40] + ldr r1, [r4, #0x10] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r4, #0x44] + ldr r0, [sp, #0x50] + bl sub_0201A7A0 + ldr r0, [r5, #0x10] + ldr r1, [sp, #0x50] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r5, #0x14] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r5, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [r5, #0x1c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, [r5, #0x20] + ldr r3, [r5, #0xc] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r0, #0x24] + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [sp, #0x50] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x66 + bl ov62_02231690 + add r2, sp, #0x58 + ldr r3, _02232AA4 ; =0x022488F8 + add r5, r0, #0 + ldmia r3!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r6, #1 + str r0, [r2, #0] + ldr r0, [r4, #0x28] + ldr r1, [r0, #0] + ldr r0, [r1, #8] + str r0, [sp, #0x38] + ldr r0, [r1, #0xc] + str r0, [sp, #0x3c] + mov r0, #0 + str r0, [sp, #0x264] + ldr r0, [sp, #0x2f4] + lsl r0, r0, #2 + ldr r1, [r7, r0] + cmp r1, #1 + ble _022328B0 + add r0, r1, #0 + mov r2, #0x10 + add r3, sp, #0x268 + mov ip, r0 +_0223287C: + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + add r0, r0, r2 + ldr r1, [r0, #0xc] + ldr r7, [r0, #8] + ldr r0, [sp, #0x3c] + str r1, [sp, #0x54] + eor r1, r0 + ldr r0, [sp, #0x38] + eor r0, r7 + orr r0, r1 + bne _0223289A + ldr r0, [sp, #0x40] + str r0, [r3, #0] + b _022328A4 +_0223289A: + ldr r0, [sp, #0x54] + str r7, [sp, #0x38] + str r0, [sp, #0x3c] + str r6, [r3, #0] + str r6, [sp, #0x40] +_022328A4: + add r6, r6, #1 + mov r0, ip + add r2, #0x10 + add r3, r3, #4 + cmp r6, r0 + blt _0223287C +_022328B0: + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [r4, #0x10] + cmp r0, #0 + bgt _022328BC + b _02232A90 +_022328BC: + add r0, sp, #0x264 + str r0, [sp, #0x20] + ldr r0, [sp, #0x2f4] + ldr r6, [sp, #0x18] + str r0, [sp, #0x1c] + add r0, #0x58 + str r0, [sp, #0x1c] +_022328CA: + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + ldr r0, [r0, #0x48] + bl sub_0200B1EC + str r0, [sp, #0x4c] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x48] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x34] + ldr r0, [sp, #0x2f4] + cmp r0, #0 + beq _02232904 + cmp r0, #1 + beq _0223292A + cmp r0, #2 + beq _0223294A + b _02232984 +_02232904: + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x34] + ldr r1, [r1, #0] + add r1, r1, r6 + ldr r1, [r1, #4] + bl sub_0200B1EC + str r0, [sp, #0x44] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x44] + add r0, r5, #0 + mov r1, #1 + mov r3, #0 + bl sub_0200B48C + b _02232984 +_0223292A: + ldr r0, [r4, #0x28] + mov r1, #0x66 + ldr r0, [r0, #0] + add r0, r0, r6 + ldr r0, [r0, #4] + str r0, [sp, #0x30] + mov r0, #0xff + bl sub_02023790 + str r0, [sp, #0x44] + ldr r2, [sp, #0x30] + add r0, r5, #0 + mov r1, #1 + bl sub_0200C2E0 + b _02232984 +_0223294A: + ldr r0, [r4, #0x28] + mov r1, #0x66 + ldr r0, [r0, #0] + add r0, r0, r6 + ldr r0, [r0, #4] + str r0, [sp, #0x2c] + mov r0, #0xff + bl sub_02023790 + str r0, [sp, #0x44] + ldr r0, [sp, #0x2c] + mov r1, #0x66 + add r2, sp, #0x64 + bl sub_0200B274 + ldr r0, [sp, #0x44] + add r1, sp, #0x64 + bl sub_02023D28 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x44] + add r0, r5, #0 + mov r1, #1 + mov r3, #0 + bl sub_0200B48C +_02232984: + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + add r1, r0, r6 + ldr r0, [r1, #8] + str r0, [sp, #0x24] + ldr r0, [r1, #0xc] + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x28] + bl ov62_0223438C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x34] + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x28] + bl sub_020239D4 + mov r0, #1 + str r0, [sp] + ldr r1, [sp, #0x20] + ldr r0, [sp, #0x48] + ldr r1, [r1, #0] + mov r2, #2 + add r1, r1, #1 + mov r3, #1 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x48] + add r0, r5, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x4c] + add r0, r5, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, [r4, #0x28] + add r2, r7, #0 + ldr r0, [r0, #8] + lsl r1, r0, #4 + ldr r0, [sp, #0x18] + mul r1, r0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232AA8 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x50] + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [r4, #0x28] + ldr r0, [r0, #8] + cmp r0, #2 + bne _02232A56 + ldr r0, [sp, #0x2f8] + cmp r0, #0 + beq _02232A56 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x34] + add r0, r5, #0 + mov r1, #2 + mov r3, #0 + bl sub_0200B48C + ldr r2, [sp, #0x2f8] + add r0, r5, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, [r4, #0x28] + add r2, r7, #0 + ldr r0, [r0, #8] + mov r3, #0x10 + lsl r1, r0, #4 + ldr r0, [sp, #0x18] + mul r1, r0 + add r1, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232AA8 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x50] + bl sub_0201D78C +_02232A56: + ldr r0, [sp, #0x4c] + bl sub_020237BC + ldr r0, [sp, #0x48] + bl sub_020237BC + ldr r0, [sp, #0x44] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x34] + bl sub_020237BC + add r0, r5, #0 + bl sub_0200C41C + ldr r0, [sp, #0x20] + ldr r1, [r4, #0x10] + add r0, r0, #4 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + add r6, #0x10 + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, r1 + bge _02232A90 + b _022328CA +_02232A90: + ldr r0, [sp, #0x50] + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_0200B3F0 + add sp, #0x1fc + add sp, #0xe0 + pop {r4, r5, r6, r7, pc} + nop +_02232AA4: .word 0x022488F8 +_02232AA8: .word 0x000F0D00 + thumb_func_end ov62_02232778 + + thumb_func_start ov62_02232AAC +ov62_02232AAC: ; 0x02232AAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + str r0, [sp, #0x14] + add r0, #0x18 + add r7, r2, #0 + str r0, [sp, #0x14] + ldr r0, [r7, #4] + add r4, r1, #0 + str r0, [r6, #4] + mov r0, #0 + str r0, [r6, #0] + str r0, [r6, #0xc] + ldr r0, [r7, #0x24] + add r5, r3, #0 + str r0, [r6, #0x10] + str r7, [r6, #0x28] + ldr r0, [r4, #0x48] + str r0, [r6, #0x34] + ldr r0, [r6, #4] + ldr r1, [r6, #0x10] + bl sub_020E1F6C + add r0, r0, #1 + str r0, [r6, #0x14] + ldr r1, [r6, #0x10] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r6, #0x40] + ldr r1, [r6, #0x10] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [r6, #0x44] + ldr r1, [r6, #4] + ldr r0, [r6, #0x10] + cmp r1, r0 + bge _02232B06 + str r1, [r6, #0x10] + sub r0, r1, #1 + str r0, [r6, #0x40] + ldr r0, [r6, #0x10] + sub r0, r0, #1 + str r0, [r6, #0x44] +_02232B06: + mov r0, #1 + str r0, [r6, #0x48] + ldr r0, [sp, #0x14] + bl sub_0201A7A0 + ldr r0, [r7, #0x10] + ldr r1, [sp, #0x14] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r7, #0x14] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r7, #0x18] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [r7, #0x1c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r2, [r7, #0x20] + ldr r3, [r7, #0xc] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r4, #0x24] + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [sp, #0x14] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r6, #0x10] + mov r4, #0 + cmp r0, #0 + ble _02232BA6 +_02232B58: + ldr r0, [r7, #8] + mov r1, #0 + lsl r0, r0, #3 + mul r0, r4 + add r0, r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232BB0 ; =0x000F0D00 + add r3, r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + ldr r2, [r5, #0] + bl sub_0201D78C + ldr r0, [r7, #8] + mov r1, #0 + lsl r0, r0, #3 + mul r0, r4 + add r0, r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232BB0 ; =0x000F0D00 + mov r3, #0x88 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + ldr r2, [r5, #4] + bl sub_0201D78C + ldr r0, [r6, #0x10] + add r4, r4, #1 + add r5, #8 + cmp r4, r0 + blt _02232B58 +_02232BA6: + ldr r0, [sp, #0x14] + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02232BB0: .word 0x000F0D00 + thumb_func_end ov62_02232AAC + + thumb_func_start ov62_02232BB4 +ov62_02232BB4: ; 0x02232BB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r1, [r5, #0x38] + ldr r0, [r5, #0xc] + add r4, r2, #0 + cmp r1, r0 + bne _02232BCA + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02232BCA: + ldr r1, [r5, #0x10] + ldr r0, [r5, #4] + cmp r1, r0 + bne _02232BD8 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02232BD8: + add r7, r5, #0 + add r7, #0x18 + add r0, r7, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r3, [r5, #0x40] + ldr r1, [r5, #0x3c] + mov r0, #0 + cmp r1, r3 + blt _02232C00 + ldr r2, [r5, #0x38] + ldr r1, [r5, #4] + sub r0, r2, r3 + add r3, r3, #1 + sub r3, r1, r3 + cmp r2, r3 + blt _02232C00 + ldr r0, [r5, #0x10] + sub r0, r1, r0 +_02232C00: + ldr r1, [r5, #0x10] + mov r6, #0 + cmp r1, #0 + ble _02232C62 + lsl r0, r0, #3 + add r4, r4, r0 +_02232C0C: + ldr r2, [r4, #0] + cmp r2, #0 + beq _02232C58 + ldr r0, [r5, #0x28] + mov r1, #0 + ldr r0, [r0, #8] + add r3, r1, #0 + lsl r0, r0, #3 + mul r0, r6 + add r0, r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232C74 ; =0x000F0D00 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r7, #0 + bl sub_0201D78C + ldr r0, [r5, #0x28] + mov r1, #0 + ldr r0, [r0, #8] + mov r3, #0x88 + lsl r0, r0, #3 + mul r0, r6 + add r0, r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232C74 ; =0x000F0D00 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + add r0, r7, #0 + bl sub_0201D78C +_02232C58: + ldr r0, [r5, #0x10] + add r6, r6, #1 + add r4, #8 + cmp r6, r0 + blt _02232C0C +_02232C62: + add r0, r7, #0 + bl sub_0201A954 + ldr r0, [r5, #0x38] + str r0, [r5, #0xc] + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02232C74: .word 0x000F0D00 + thumb_func_end ov62_02232BB4 + + thumb_func_start ov62_02232C78 +ov62_02232C78: ; 0x02232C78 + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0xe8 + add r4, r0, #0 + ldr r0, [sp, #0x2f8] + str r1, [sp, #0x10] + str r0, [sp, #0x2f8] + mov r0, #8 + ldrsh r1, [r4, r0] + ldr r0, [r4, #0xc] + str r3, [sp, #0x14] + cmp r1, r0 + bne _02232C9A + add sp, #0x1fc + add sp, #0xe8 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02232C9A: + ldr r1, [r4, #0x10] + ldr r0, [r4, #4] + cmp r1, r0 + bne _02232CAA + add sp, #0x1fc + add sp, #0xe8 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02232CAA: + add r0, r4, #0 + str r0, [sp, #0x58] + add r0, #0x18 + str r0, [sp, #0x58] + mov r0, #0x66 + bl ov62_02231690 + add r5, r0, #0 + ldr r0, [sp, #0x58] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp, #0x44] + str r0, [sp, #0x40] + mov r0, #8 + ldrsh r0, [r4, r0] + ldr r1, [r4, #0x10] + add r3, sp, #0x26c + str r0, [sp, #0x18] + add r0, r0, r1 + str r0, [sp, #0x34] + ldr r0, [sp, #0x44] + mov r2, #7 + add r1, r0, #0 +_02232CDC: + stmia r3!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02232CDC + stmia r3!, {r0, r1} + ldr r1, [r4, #4] + ldr r0, [sp, #0x34] + cmp r0, r1 + blt _02232CF6 + ldr r0, [r4, #0x10] + str r1, [sp, #0x34] + sub r0, r1, r0 + str r0, [sp, #0x18] +_02232CF6: + ldr r3, _02232F60 ; =0x02248904 + add r2, sp, #0x60 + ldmia r3!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r6, #1 + str r0, [r2, #0] + ldr r0, [r4, #0x28] + ldr r1, [r0, #0] + ldr r0, [r1, #8] + str r0, [sp, #0x38] + ldr r0, [r1, #0xc] + str r0, [sp, #0x3c] + mov r0, #0 + str r0, [sp, #0x26c] + ldr r0, [sp, #0x14] + lsl r0, r0, #2 + ldr r1, [r7, r0] + cmp r1, #1 + ble _02232D5C + add r0, r1, #0 + mov r2, #0x10 + add r3, sp, #0x270 + mov ip, r0 +_02232D28: + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + add r0, r0, r2 + ldr r1, [r0, #0xc] + ldr r7, [r0, #8] + ldr r0, [sp, #0x3c] + str r1, [sp, #0x5c] + eor r1, r0 + ldr r0, [sp, #0x38] + eor r0, r7 + orr r0, r1 + bne _02232D46 + ldr r0, [sp, #0x40] + str r0, [r3, #0] + b _02232D50 +_02232D46: + ldr r0, [sp, #0x5c] + str r7, [sp, #0x38] + str r0, [sp, #0x3c] + str r6, [r3, #0] + str r6, [sp, #0x40] +_02232D50: + add r6, r6, #1 + mov r0, ip + add r2, #0x10 + add r3, r3, #4 + cmp r6, r0 + blt _02232D28 +_02232D5C: + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x34] + cmp r1, r0 + blt _02232D66 + b _02232F46 +_02232D66: + add r0, r1, #0 + lsl r6, r0, #4 + add r1, sp, #0x26c + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x14] + str r0, [sp, #0x1c] + add r0, #0x58 + str r0, [sp, #0x1c] +_02232D7A: + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x1c] + ldr r0, [r0, #0x48] + bl sub_0200B1EC + str r0, [sp, #0x54] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x50] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x48] + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02232DB4 + cmp r0, #1 + beq _02232DDA + cmp r0, #2 + beq _02232DFA + b _02232E34 +_02232DB4: + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x34] + ldr r1, [r1, #0] + add r1, r1, r6 + ldr r1, [r1, #4] + bl sub_0200B1EC + str r0, [sp, #0x4c] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x4c] + add r0, r5, #0 + mov r1, #1 + mov r3, #0 + bl sub_0200B48C + b _02232E34 +_02232DDA: + ldr r0, [r4, #0x28] + mov r1, #0x66 + ldr r0, [r0, #0] + add r0, r0, r6 + ldr r0, [r0, #4] + str r0, [sp, #0x30] + mov r0, #0xff + bl sub_02023790 + str r0, [sp, #0x4c] + ldr r2, [sp, #0x30] + add r0, r5, #0 + mov r1, #1 + bl sub_0200C2E0 + b _02232E34 +_02232DFA: + ldr r0, [r4, #0x28] + mov r1, #0x66 + ldr r0, [r0, #0] + add r0, r0, r6 + ldr r0, [r0, #4] + str r0, [sp, #0x2c] + mov r0, #0xff + bl sub_02023790 + str r0, [sp, #0x4c] + ldr r0, [sp, #0x2c] + mov r1, #0x66 + add r2, sp, #0x6c + bl sub_0200B274 + ldr r0, [sp, #0x4c] + add r1, sp, #0x6c + bl sub_02023D28 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x4c] + add r0, r5, #0 + mov r1, #1 + mov r3, #0 + bl sub_0200B48C +_02232E34: + ldr r0, [r4, #0x28] + ldr r0, [r0, #0] + add r1, r0, r6 + ldr r0, [r1, #8] + str r0, [sp, #0x24] + ldr r0, [r1, #0xc] + str r0, [sp, #0x28] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x28] + bl ov62_0223438C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x48] + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x28] + bl sub_020239D4 + mov r0, #1 + str r0, [sp] + ldr r1, [sp, #0x20] + ldr r0, [sp, #0x50] + ldr r1, [r1, #0] + mov r2, #2 + add r1, r1, #1 + mov r3, #1 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x50] + add r0, r5, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x54] + add r0, r5, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, [r4, #0x28] + add r2, r7, #0 + ldr r0, [r0, #8] + lsl r1, r0, #4 + ldr r0, [sp, #0x44] + mul r1, r0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232F64 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x58] + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [r4, #0x28] + ldr r0, [r0, #8] + cmp r0, #2 + bne _02232F06 + ldr r0, [sp, #0x2f8] + cmp r0, #0 + beq _02232F06 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x48] + add r0, r5, #0 + mov r1, #2 + mov r3, #0 + bl sub_0200B48C + ldr r2, [sp, #0x2f8] + add r0, r5, #0 + add r1, r7, #0 + bl sub_0200C388 + ldr r0, [r4, #0x28] + add r2, r7, #0 + ldr r0, [r0, #8] + mov r3, #0x10 + lsl r1, r0, #4 + ldr r0, [sp, #0x44] + mul r1, r0 + add r1, #0x10 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02232F64 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x58] + bl sub_0201D78C +_02232F06: + ldr r0, [sp, #0x44] + add r0, r0, #1 + str r0, [sp, #0x44] + ldr r0, [sp, #0x54] + bl sub_020237BC + ldr r0, [sp, #0x50] + bl sub_020237BC + ldr r0, [sp, #0x4c] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x48] + bl sub_020237BC + add r0, r5, #0 + bl sub_0200C41C + ldr r0, [sp, #0x20] + add r6, #0x10 + add r0, r0, #4 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + add r1, r0, #1 + ldr r0, [sp, #0x34] + str r1, [sp, #0x18] + cmp r1, r0 + bge _02232F46 + b _02232D7A +_02232F46: + ldr r0, [sp, #0x58] + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_0200B3F0 + mov r0, #8 + ldrsh r0, [r4, r0] + str r0, [r4, #0xc] + mov r0, #0 + add sp, #0x1fc + add sp, #0xe8 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02232F60: .word 0x02248904 +_02232F64: .word 0x000F0D00 + thumb_func_end ov62_02232C78 + + thumb_func_start ov62_02232F68 +ov62_02232F68: ; 0x02232F68 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [r5, #0x28] + add r7, r1, #0 + ldr r0, [r0, #0x28] + cmp r0, #0 + beq _02232FB6 + ldr r0, [r5, #0x10] + ldr r6, [sp, #0x1c] + cmp r0, #0 + ble _02232FB6 + add r4, r6, #0 +_02232F86: + ldr r0, [r5, #0x28] + ldr r0, [r0, #0x28] + add r0, r0, r4 + bl sub_02022760 + cmp r0, #0 + beq _02232FAC + add r0, r7, #0 + bl ov62_02234520 + mov r1, #8 + ldrsh r1, [r5, r1] + ldr r0, [r5, #0x28] + add r1, r1, r6 + ldr r0, [r0, #0] + lsl r1, r1, #4 + add r0, r0, r1 + ldr r0, [r0, #4] + str r0, [sp, #0x1c] +_02232FAC: + ldr r0, [r5, #0x10] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _02232F86 +_02232FB6: + mov r0, #8 + ldrsh r1, [r5, r0] + ldr r0, [r5, #0xc] + cmp r1, r0 + bne _02232FC6 + ldr r0, [sp, #0x1c] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_02232FC6: + ldr r1, [r5, #0x10] + ldr r0, [r5, #4] + cmp r1, r0 + bne _02232FD4 + ldr r0, [sp, #0x1c] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_02232FD4: + add r0, r5, #0 + str r0, [sp, #0x18] + add r0, #0x18 + mov r1, #0 + str r0, [sp, #0x18] + bl sub_0201ADA4 + mov r0, #8 + ldrsh r0, [r5, r0] + ldr r2, [r5, #0x10] + ldr r1, [r5, #4] + str r0, [sp, #0x10] + add r0, r0, r2 + mov r6, #0 + str r0, [sp, #0x14] + cmp r0, r1 + blt _02232FFC + sub r0, r1, r2 + str r0, [sp, #0x10] + str r1, [sp, #0x14] +_02232FFC: + ldr r1, [sp, #0x10] + ldr r0, [sp, #0x14] + cmp r1, r0 + bge _0223304E + add r0, r1, #0 + lsl r4, r0, #4 +_02233008: + ldr r1, [r5, #0x28] + ldr r0, [r5, #0x34] + ldr r1, [r1, #0] + ldr r1, [r1, r4] + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [r5, #0x28] + mov r1, #0 + ldr r0, [r0, #8] + add r2, r7, #0 + lsl r0, r0, #4 + mul r0, r6 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02233060 ; =0x000F0D00 + add r3, r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r1, r0, #1 + ldr r0, [sp, #0x14] + add r4, #0x10 + str r1, [sp, #0x10] + cmp r1, r0 + blt _02233008 +_0223304E: + ldr r0, [sp, #0x18] + bl sub_0201A954 + mov r0, #8 + ldrsh r0, [r5, r0] + str r0, [r5, #0xc] + ldr r0, [sp, #0x1c] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02233060: .word 0x000F0D00 + thumb_func_end ov62_02232F68 + + thumb_func_start ov62_02233064 +ov62_02233064: ; 0x02233064 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + str r1, [sp, #0x14] + str r0, [sp, #0x10] + ldr r1, [r0, #0x38] + ldr r0, [r0, #0xc] + cmp r1, r0 + bne _0223307A + add sp, #0x2c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223307A: + ldr r0, [sp, #0x10] + ldr r1, [r0, #0x10] + ldr r0, [r0, #4] + cmp r1, r0 + bne _0223308A + add sp, #0x2c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223308A: + ldr r0, [sp, #0x10] + mov r1, #0 + str r0, [sp, #0x28] + add r0, #0x18 + str r0, [sp, #0x28] + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x10] + ldr r0, [r0, #0x40] + ldr r1, [r1, #0x3c] + cmp r1, r0 + blt _022330C4 + ldr r1, [sp, #0x10] + ldr r2, [r1, #0x38] + sub r1, r2, r0 + str r1, [sp, #0x1c] + ldr r1, [sp, #0x10] + add r0, r0, #1 + ldr r1, [r1, #4] + sub r0, r1, r0 + cmp r2, r0 + blt _022330C4 + ldr r0, [sp, #0x10] + ldr r0, [r0, #0x10] + sub r0, r1, r0 + str r0, [sp, #0x1c] +_022330C4: + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x10] + ldr r0, [r0, #0x10] + cmp r0, #0 + ble _022331AE + ldr r0, [sp, #0x1c] + mov r4, #4 + lsl r1, r0, #2 + ldr r0, [sp, #0x14] + add r0, r0, r1 + str r0, [sp, #0x18] +_022330DC: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r5, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0x63 + ldr r0, [r0, #0x48] + bl sub_0200B1EC + str r0, [sp, #0x24] + mov r0, #1 + str r0, [sp] + ldr r2, [sp, #0x1c] + ldr r1, [sp, #0x20] + add r0, r7, #0 + add r1, r2, r1 + add r1, r1, #1 + mov r2, #2 + mov r3, #1 + bl sub_020238A0 + ldr r2, [sp, #0x18] + ldr r1, _022331C0 ; =0x00002608 + add r0, r5, #0 + ldr r1, [r2, r1] + bl sub_02023D28 + ldr r0, [sp, #0x14] + add r1, r5, #0 + bl ov62_022349A8 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + mov ip, r0 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022331C4 ; =0x000F0D00 + mov r3, #0x10 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r6, ip + ldr r0, [sp, #0x28] + mov r1, #0 + add r2, r7, #0 + sub r3, r3, r6 + bl sub_0201D78C + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022331C4 ; =0x000F0D00 + ldr r2, [sp, #0x24] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + mov r1, #0 + mov r3, #0x10 + bl sub_0201D78C + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022331C4 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + add r2, r5, #0 + mov r3, #0x16 + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x24] + bl sub_020237BC + ldr r0, [sp, #0x18] + add r4, #0x18 + add r0, r0, #4 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x10] + ldr r1, [r0, #0x10] + ldr r0, [sp, #0x20] + cmp r0, r1 + blt _022330DC +_022331AE: + ldr r0, [sp, #0x28] + bl sub_0201A954 + ldr r0, [sp, #0x10] + ldr r1, [r0, #0x38] + str r1, [r0, #0xc] + mov r0, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022331C0: .word 0x00002608 +_022331C4: .word 0x000F0D00 + thumb_func_end ov62_02233064 + + thumb_func_start ov62_022331C8 +ov62_022331C8: ; 0x022331C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r4, #0 + mov r6, #0xff + cmp r1, #0 + bge _022331E8 + ldr r0, [r5, #0x38] + cmp r0, #0 + ble _02233200 + sub r0, r0, #1 + str r0, [r5, #0x38] + ldr r0, _022332A8 ; =0x0000055A + add r6, r4, #0 + bl sub_02005748 + b _02233200 +_022331E8: + ble _02233200 + ldr r0, [r5, #4] + ldr r1, [r5, #0x38] + sub r0, r0, #1 + cmp r1, r0 + bge _02233200 + add r0, r1, #1 + str r0, [r5, #0x38] + ldr r0, _022332A8 ; =0x0000055A + mov r6, #1 + bl sub_02005748 +_02233200: + cmp r6, #0 + beq _0223320A + cmp r6, #1 + beq _02233246 + b _0223326A +_0223320A: + ldr r2, [r5, #0x44] + ldr r1, [r5, #0x38] + cmp r1, r2 + bge _02233218 + lsl r0, r1, #0x10 + asr r4, r0, #0x10 + b _0223326A +_02233218: + ldr r0, [r5, #4] + sub r0, r0, r2 + cmp r1, r0 + blt _02233234 + add r2, r2, #1 + lsl r2, r2, #0x10 + asr r4, r2, #0x10 + cmp r1, r0 + blt _0223326A + sub r0, r1, r0 + add r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _0223326A +_02233234: + lsl r0, r2, #0x10 + asr r4, r0, #0x10 + cmp r1, r2 + bgt _0223326A + sub r0, r1, r2 + add r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _0223326A +_02233246: + ldr r0, [r5, #0x38] + ldr r2, [r5, #0x40] + cmp r0, r2 + bgt _02233254 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 + b _0223326A +_02233254: + lsl r1, r2, #0x10 + asr r4, r1, #0x10 + ldr r1, [r5, #4] + sub r1, r1, r2 + cmp r0, r1 + blt _0223326A + sub r1, r1, #1 + sub r0, r0, r1 + add r0, r4, r0 + lsl r0, r0, #0x10 + asr r4, r0, #0x10 +_0223326A: + cmp r4, #0 + bge _02233272 + bl sub_02022974 +_02233272: + cmp r6, #0xff + beq _02233278 + str r4, [r5, #0x3c] +_02233278: + ldr r2, [r5, #0x40] + ldr r0, [r5, #0x3c] + mov r3, #0 + cmp r0, r2 + blt _0223329C + ldr r1, [r5, #0x38] + sub r0, r1, r2 + lsl r0, r0, #0x10 + asr r3, r0, #0x10 + ldr r0, [r5, #4] + add r2, r2, #1 + sub r2, r0, r2 + cmp r1, r2 + blt _0223329C + ldr r1, [r5, #0x10] + sub r0, r0, r1 + lsl r0, r0, #0x10 + asr r3, r0, #0x10 +_0223329C: + add r0, r5, #0 + strh r3, [r5, #8] + bl ov62_0223349C + pop {r4, r5, r6, pc} + nop +_022332A8: .word 0x0000055A + thumb_func_end ov62_022331C8 + + thumb_func_start ov62_022332AC +ov62_022332AC: ; 0x022332AC + push {r4, lr} + add r4, r0, #0 + mov r2, #8 + ldrsh r0, [r4, r2] + add r1, r0, r1 + strh r1, [r4, #8] + ldrsh r1, [r4, r2] + cmp r1, #0 + bge _022332C2 + mov r1, #0 + strh r1, [r4, #8] +_022332C2: + ldr r2, [r4, #0x10] + ldr r1, [r4, #4] + cmp r2, r1 + bne _022332CE + mov r1, #0 + strh r1, [r4, #8] +_022332CE: + mov r1, #8 + ldrsh r1, [r4, r1] + ldr r3, [r4, #0x10] + ldr r2, [r4, #4] + add r1, r1, r3 + cmp r1, r2 + ble _022332E0 + sub r1, r2, r3 + strh r1, [r4, #8] +_022332E0: + mov r1, #8 + ldrsh r1, [r4, r1] + cmp r0, r1 + beq _022332EE + ldr r0, _022332F8 ; =0x0000055A + bl sub_02005748 +_022332EE: + add r0, r4, #0 + bl ov62_02233454 + pop {r4, pc} + nop +_022332F8: .word 0x0000055A + thumb_func_end ov62_022332AC + + thumb_func_start ov62_022332FC +ov62_022332FC: ; 0x022332FC + push {r4, lr} + add r4, r0, #0 + add r0, #0x18 + bl sub_0201ACF4 + add r4, #0x18 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + thumb_func_end ov62_022332FC + + thumb_func_start ov62_02233310 +ov62_02233310: ; 0x02233310 + ldr r3, _02233318 ; =sub_020D5124 + mov r1, #0 + mov r2, #0x50 + bx r3 + ; .align 2, 0 +_02233318: .word sub_020D5124 + thumb_func_end ov62_02233310 + + thumb_func_start ov62_0223331C +ov62_0223331C: ; 0x0223331C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x48 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x14] + ldr r7, [r4, #0x1c] + str r0, [sp, #0x10] + ldr r0, [r4, #0x18] + add r6, r2, #0 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp] + ldr r0, _02233428 ; =0x00030D40 + str r6, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x10] + add r1, r7, #0 + mov r3, #0x7f + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _02233428 ; =0x00030D40 + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r3, #0x7e + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02233428 ; =0x00030D40 + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r3, #0x7d + bl sub_0200CE54 + mov r1, #0x80 + add r0, sp, #0x14 + strh r1, [r0] + mov r1, #0x60 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + strh r1, [r0, #6] + mov r0, #1 + str r0, [sp, #0x1c] + str r0, [sp, #0x40] + sub r0, r0, #2 + str r0, [sp, #0x38] + str r0, [sp, #0x3c] + ldr r0, _02233428 ; =0x00030D40 + str r1, [sp, #0x20] + str r6, [sp, #0x24] + str r1, [sp, #0x44] + str r0, [sp, #0x28] + str r0, [sp, #0x30] + str r0, [sp, #0x34] + cmp r6, #1 + bne _022333A2 + ldr r0, _0223342C ; =0x0000270F + str r0, [sp, #0x2c] + b _022333A6 +_022333A2: + ldr r0, _02233430 ; =0x00002710 + str r0, [sp, #0x2c] +_022333A6: + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x1c] + add r2, sp, #0x14 + bl sub_0200CE6C + str r0, [r5, #0x2c] + ldr r0, [r4, #0x18] + ldr r1, [r4, #0x1c] + add r2, sp, #0x14 + bl sub_0200CE6C + str r0, [r5, #0x30] + ldr r0, [r5, #0x2c] + mov r1, #2 + bl sub_0200D41C + ldr r0, [r5, #0x30] + mov r1, #2 + bl sub_0200D41C + ldr r0, [r5, #0x2c] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x2c] + bl sub_0200D330 + ldr r0, [r5, #0x30] + bl sub_0200D330 + ldr r0, [r5, #0x30] + mov r1, #2 + bl sub_0200D7D4 + cmp r6, #1 + ldr r0, [r5, #0x2c] + bne _0223340C + mov r1, #0x80 + mov r2, #0x18 + bl sub_0200D4C4 + ldr r0, [r5, #0x30] + mov r1, #0x80 + mov r2, #0x78 + bl sub_0200D4C4 + b _0223341E +_0223340C: + mov r1, #0x80 + mov r2, #0x58 + bl sub_0200D4C4 + ldr r0, [r5, #0x30] + mov r1, #0x80 + mov r2, #0xb8 + bl sub_0200D4C4 +_0223341E: + add r0, r5, #0 + bl ov62_02233454 + add sp, #0x48 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02233428: .word 0x00030D40 +_0223342C: .word 0x0000270F +_02233430: .word 0x00002710 + thumb_func_end ov62_0223331C + + thumb_func_start ov62_02233434 +ov62_02233434: ; 0x02233434 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r3, r1, #0 + add r5, r2, #0 + ldr r0, [r4, #0x2c] + mov r1, #0x80 + add r2, r3, #0 + bl sub_0200D4C4 + ldr r0, [r4, #0x30] + mov r1, #0x80 + add r2, r5, #0 + bl sub_0200D4C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02233434 + + thumb_func_start ov62_02233454 +ov62_02233454: ; 0x02233454 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #8 + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _02233478 + ldr r0, [r4, #0x2c] + mov r1, #0 + bl sub_0200D3F4 +_02233478: + mov r0, #8 + ldrsh r1, [r4, r0] + ldr r0, [r4, #0x10] + add r1, r1, r0 + ldr r0, [r4, #4] + cmp r1, r0 + blt _0223348E + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3F4 +_0223348E: + ldr r0, [r4, #0x2c] + bl sub_0200D33C + ldr r0, [r4, #0x30] + bl sub_0200D33C + pop {r4, pc} + thumb_func_end ov62_02233454 + + thumb_func_start ov62_0223349C +ov62_0223349C: ; 0x0223349C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #8 + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _022334C0 + ldr r0, [r4, #0x2c] + mov r1, #0 + bl sub_0200D3F4 +_022334C0: + mov r0, #8 + ldrsh r1, [r4, r0] + ldr r0, [r4, #0x10] + add r1, r1, r0 + ldr r0, [r4, #4] + cmp r1, r0 + blt _022334D6 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3F4 +_022334D6: + ldr r1, [r4, #0x10] + ldr r0, [r4, #4] + cmp r1, r0 + blt _022334EE + ldr r0, [r4, #0x2c] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200D3F4 +_022334EE: + ldr r0, [r4, #0x2c] + bl sub_0200D33C + ldr r0, [r4, #0x30] + bl sub_0200D33C + pop {r4, pc} + thumb_func_end ov62_0223349C + + thumb_func_start ov62_022334FC +ov62_022334FC: ; 0x022334FC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x1c] + ldr r1, _02233528 ; =0x00030D40 + bl sub_0200D070 + ldr r0, [r4, #0x1c] + ldr r1, _02233528 ; =0x00030D40 + bl sub_0200D090 + ldr r0, [r4, #0x1c] + ldr r1, _02233528 ; =0x00030D40 + bl sub_0200D0A0 + ldr r0, [r5, #0x2c] + bl sub_0200D0F4 + ldr r0, [r5, #0x30] + bl sub_0200D0F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02233528: .word 0x00030D40 + thumb_func_end ov62_022334FC + + thumb_func_start ov62_0223352C +ov62_0223352C: ; 0x0223352C + push {r4, r5, lr} + sub sp, #0x34 + add r4, r3, #0 + mov r3, #0x80 + add r0, sp, #0 + strh r3, [r0] + mov r3, #0x60 + strh r3, [r0, #2] + mov r3, #0 + strh r3, [r0, #4] + strh r3, [r0, #6] + mov r0, #1 + str r0, [sp, #8] + str r0, [sp, #0x2c] + sub r0, r0, #2 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r0, _02233590 ; =0x00002E94 + str r3, [sp, #0xc] + str r2, [sp, #0x10] + str r3, [sp, #0x30] + str r0, [sp, #0x14] + str r0, [sp, #0x1c] + str r0, [sp, #0x20] + cmp r2, #1 + bne _02233566 + ldr r0, _02233594 ; =0x0000270F + str r0, [sp, #0x18] + b _0223356A +_02233566: + ldr r0, _02233598 ; =0x00002710 + str r0, [sp, #0x18] +_0223356A: + ldr r0, [r1, #0x18] + ldr r1, [r1, #0x1c] + add r2, sp, #0 + bl sub_0200CE6C + add r5, r0, #0 + mov r1, #2 + bl sub_0200D41C + add r0, r5, #0 + add r1, r4, #0 + bl sub_0200D364 + add r0, r5, #0 + bl sub_0200D330 + add r0, r5, #0 + add sp, #0x34 + pop {r4, r5, pc} + ; .align 2, 0 +_02233590: .word 0x00002E94 +_02233594: .word 0x0000270F +_02233598: .word 0x00002710 + thumb_func_end ov62_0223352C + + thumb_func_start ov62_0223359C +ov62_0223359C: ; 0x0223359C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl sub_0200D0F4 + ldr r0, [r4, #0x1c] + bl sub_0200D0F4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_0223359C + + thumb_func_start ov62_022335B0 +ov62_022335B0: ; 0x022335B0 + ldr r3, _022335B8 ; =ov62_022335BC + mov r2, #5 + bx r3 + nop +_022335B8: .word ov62_022335BC + thumb_func_end ov62_022335B0 + + thumb_func_start ov62_022335BC +ov62_022335BC: ; 0x022335BC + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + mov r2, #2 + add r3, r6, #0 + bl ov62_0223352C + str r0, [r5, #0x18] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + add r3, r6, #0 + bl ov62_0223352C + str r0, [r5, #0x1c] + ldr r0, [r5, #0x18] + mov r1, #0x18 + mov r2, #0x88 + bl sub_0200D4C4 + ldr r0, [r5, #0x1c] + mov r1, #0xe8 + mov r2, #0x88 + bl sub_0200D4C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_022335BC + + thumb_func_start ov62_022335F4 +ov62_022335F4: ; 0x022335F4 + ldr r3, _022335FC ; =sub_020D5124 + mov r1, #0 + mov r2, #0x20 + bx r3 + ; .align 2, 0 +_022335FC: .word sub_020D5124 + thumb_func_end ov62_022335F4 + + thumb_func_start ov62_02233600 +ov62_02233600: ; 0x02233600 + ldr r3, _02233604 ; =ov62_0223359C + bx r3 + ; .align 2, 0 +_02233604: .word ov62_0223359C + thumb_func_end ov62_02233600 + + thumb_func_start ov62_02233608 +ov62_02233608: ; 0x02233608 + push {r3, r4} + ldr r2, [r0, #0xc] + sub r4, r1, r2 + add r3, r4, #0 + mov r2, #1 + mul r3, r4 + lsl r2, r2, #8 + cmp r3, r2 + blt _0223362E + cmp r4, #0 + bge _02233624 + mov r2, #0 + mvn r2, r2 + b _02233626 +_02233624: + mov r2, #1 +_02233626: + strh r2, [r0, #0x10] + str r1, [r0, #0xc] + pop {r3, r4} + bx lr +_0223362E: + mov r1, #0 + strh r1, [r0, #0x10] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov62_02233608 + + thumb_func_start ov62_02233638 +ov62_02233638: ; 0x02233638 + ldr r2, [r1, #0x48] + cmp r2, #0 + beq _02233650 + ldr r1, [r1, #4] + cmp r1, #2 + bge _0223364A + mov r1, #0 + str r1, [r0, #0x14] + bx lr +_0223364A: + mov r1, #1 + str r1, [r0, #0x14] + bx lr +_02233650: + ldr r2, [r1, #0x10] + ldr r1, [r1, #4] + cmp r2, r1 + blt _0223365E + mov r1, #0 + str r1, [r0, #0x14] + bx lr +_0223365E: + mov r1, #1 + str r1, [r0, #0x14] + bx lr + thumb_func_end ov62_02233638 + + thumb_func_start ov62_02233664 +ov62_02233664: ; 0x02233664 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r0, sp, #4 + add r1, sp, #0 + mov r4, #0 + bl sub_020227A4 + add r6, r0, #0 + ldr r0, [r5, #0x14] + cmp r0, #0 + beq _02233688 + ldr r0, [r5, #0x18] + bl sub_0200D33C + ldr r0, [r5, #0x1c] + bl sub_0200D33C +_02233688: + ldr r0, [r5, #4] + cmp r0, #0 + bne _022336A2 + cmp r6, #0 + bne _022336A2 + mov r0, #0 + str r0, [r5, #4] + str r0, [r5, #0] + str r0, [r5, #8] + str r0, [r5, #0xc] + add sp, #8 + strh r0, [r5, #0x10] + pop {r4, r5, r6, pc} +_022336A2: + ldr r0, _022336FC ; =0x022488F0 + bl sub_02022734 + cmp r0, #0 + bne _022336B6 + ldr r0, _02233700 ; =0x022488F4 + bl sub_02022734 + cmp r0, #0 + beq _022336B8 +_022336B6: + mov r4, #1 +_022336B8: + cmp r4, #0 + ldr r0, [r5, #4] + beq _022336E8 + cmp r0, #0 + bne _022336D6 + mov r0, #1 + str r0, [r5, #4] + ldr r0, [sp, #4] + str r0, [r5, #8] + ldr r0, [sp] + add sp, #8 + str r0, [r5, #0xc] + mov r0, #2 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_022336D6: + ldr r0, [r5, #0] + sub r0, r0, #1 + str r0, [r5, #0] + ldr r1, [sp] + add r0, r5, #0 + bl ov62_02233608 + add sp, #8 + pop {r4, r5, r6, pc} +_022336E8: + cmp r0, #0 + beq _022336F6 + mov r0, #0 + str r0, [r5, #4] + str r0, [r5, #0] + str r0, [r5, #8] + str r0, [r5, #0xc] +_022336F6: + add sp, #8 + pop {r4, r5, r6, pc} + nop +_022336FC: .word 0x022488F0 +_02233700: .word 0x022488F4 + thumb_func_end ov62_02233664 + + thumb_func_start ov62_02233704 +ov62_02233704: ; 0x02233704 + push {r4, lr} + add r4, r1, #0 + mov r1, #0x83 + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl sub_0202CD88 + add r1, r4, #0 + bl sub_0202CFEC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02233704 + + thumb_func_start ov62_0223371C +ov62_0223371C: ; 0x0223371C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x77 + add r2, sp, #4 + bl sub_0202F1F8 + ldr r1, _0223374C ; =0x000008B4 + mov r3, #0 + ldr r0, [r4, r1] + sub r1, #0x84 + ldr r1, [r4, r1] + add r2, r0, #0 + str r1, [sp] + add r1, r0, #0 + add r1, #0x80 + add r2, #0xe4 + bl sub_0202FE20 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_0223374C: .word 0x000008B4 + thumb_func_end ov62_0223371C + + thumb_func_start ov62_02233750 +ov62_02233750: ; 0x02233750 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl ov62_0222F824 + bl sub_02039720 + mov r0, #1 + str r0, [r4, #4] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02233750 + + thumb_func_start ov62_0223376C +ov62_0223376C: ; 0x0223376C + ldr r2, _02233784 ; =0x0000052C + add r3, r0, #0 + str r1, [r3, r2] + mov r1, #0 + add r0, r2, #4 + str r1, [r3, r0] + add r1, r3, r2 + ldr r3, _02233788 ; =sub_0200DA04 + ldr r0, _0223378C ; =ov62_02233750 + mov r2, #4 + bx r3 + nop +_02233784: .word 0x0000052C +_02233788: .word sub_0200DA04 +_0223378C: .word ov62_02233750 + thumb_func_end ov62_0223376C + + thumb_func_start ov62_02233790 +ov62_02233790: ; 0x02233790 + mov r1, #0x53 + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov62_02233790 + + thumb_func_start ov62_02233798 +ov62_02233798: ; 0x02233798 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _022337CE + add r0, r4, #0 + bl ov62_02234534 + cmp r0, #1 + beq _022337CE + ldr r0, _022337D0 ; =0x00000524 + ldr r1, [r4, r0] + cmp r1, #1 + beq _022337CE + mov r1, #1 + str r1, [r4, r0] + ldr r0, [r4, #0x64] + bl sub_02008A94 + ldr r0, [r4, #0x1c] + bl sub_0200C7EC + bl sub_0200C800 + ldr r0, _022337D0 ; =0x00000524 + mov r1, #0 + str r1, [r4, r0] +_022337CE: + pop {r4, pc} + ; .align 2, 0 +_022337D0: .word 0x00000524 + thumb_func_end ov62_02233798 + + thumb_func_start ov62_022337D4 +ov62_022337D4: ; 0x022337D4 + push {r4, lr} + add r4, r0, #0 + ldr r0, _022337E8 ; =ov62_02233798 + add r1, r4, #0 + mov r2, #5 + bl sub_0200DA04 + ldr r1, _022337EC ; =0x0000416C + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 +_022337E8: .word ov62_02233798 +_022337EC: .word 0x0000416C + thumb_func_end ov62_022337D4 + + thumb_func_start ov62_022337F0 +ov62_022337F0: ; 0x022337F0 + push {r3, r4, lr} + sub sp, #4 + ldr r4, _02233818 ; =0x00000836 + add r3, r0, #0 + add r0, r3, r4 + str r0, [sp] + sub r0, r4, #6 + ldr r0, [r3, r0] + sub r4, r4, #2 + add r3, r3, r4 + bl ov62_02248598 + cmp r0, #1 + bls _02233812 + add sp, #4 + mov r0, #1 + pop {r3, r4, pc} +_02233812: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02233818: .word 0x00000836 + thumb_func_end ov62_022337F0 + + thumb_func_start ov62_0223381C +ov62_0223381C: ; 0x0223381C + ldr r2, _02233824 ; =0x00000874 + str r1, [r0, r2] + bx lr + nop +_02233824: .word 0x00000874 + thumb_func_end ov62_0223381C + + thumb_func_start ov62_02233828 +ov62_02233828: ; 0x02233828 + push {r3, r4, r5, r6, r7, lr} + ldr r3, _02233894 ; =0x000008B4 + add r2, r0, #0 + ldr r1, [r1, #0] + add r7, r2, r3 + str r0, [sp] + cmp r1, #1 + beq _02233892 + bl ov62_0224112C + ldr r1, _02233898 ; =0x00001D54 + mov r2, #0x1e + add r1, r7, r1 + bl ov61_0222BE20 + ldr r1, _0223389C ; =0x00003884 + mov r4, #0 + str r0, [r7, r1] + ldr r0, [r7, r1] + cmp r0, #0 + ble _02233892 + ldr r5, [sp] + mov r1, #0x9a + lsl r1, r1, #6 + add r0, r5, #0 + add r6, r0, r1 +_0223385C: + ldr r0, _022338A0 ; =0x00002608 + ldr r0, [r5, r0] + cmp r0, #0 + bne _02233868 + bl sub_02022974 +_02233868: + ldr r0, _022338A0 ; =0x00002608 + add r1, r6, #0 + ldr r0, [r5, r0] + mov r2, #0xe4 + bl sub_020C4DB0 + ldr r0, _022338A0 ; =0x00002608 + ldr r1, [sp] + ldr r0, [r5, r0] + add r2, r1, r4 + add r0, #0xa7 + ldrb r0, [r0] + ldr r1, _022338A4 ; =0x0000413C + add r4, r4, #1 + strb r0, [r2, r1] + ldr r0, _0223389C ; =0x00003884 + add r5, r5, #4 + ldr r0, [r7, r0] + add r6, #0xe4 + cmp r4, r0 + blt _0223385C +_02233892: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02233894: .word 0x000008B4 +_02233898: .word 0x00001D54 +_0223389C: .word 0x00003884 +_022338A0: .word 0x00002608 +_022338A4: .word 0x0000413C + thumb_func_end ov62_02233828 + + thumb_func_start ov62_022338A8 +ov62_022338A8: ; 0x022338A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + mov r5, #0 + add r4, r6, #0 + add r7, r5, #0 +_022338B4: + mov r0, #0x83 + str r5, [sp] + lsl r0, r0, #4 + ldr r0, [r6, r0] + mov r1, #0x66 + add r2, sp, #4 + mov r3, #0 + bl sub_0202F298 + ldr r0, [sp, #4] + cmp r0, #3 + bhi _02233980 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022338D8: ; jump table + .short _022338E0 - _022338D8 - 2 ; case 0 + .short _02233950 - _022338D8 - 2 ; case 1 + .short _02233904 - _022338D8 - 2 ; case 2 + .short _0223392A - _022338D8 - 2 ; case 3 +_022338E0: + ldr r0, _02233998 ; =0x0000087C + str r7, [r4, r0] + add r0, #0x10 + str r7, [r4, r0] + cmp r5, #0 + bne _02233980 + mov r0, #0x66 + bl sub_02030A80 + ldr r1, _0223399C ; =0x0000088C + str r0, [r4, r1] + add r0, r1, #0 + sub r1, #0x5c + ldr r0, [r4, r0] + ldr r1, [r6, r1] + bl sub_02030AA0 + b _02233980 +_02233904: + ldr r0, _02233998 ; =0x0000087C + mov r1, #0 + str r1, [r4, r0] + add r0, #0x10 + str r1, [r4, r0] + cmp r5, #0 + bne _02233980 + mov r0, #0x66 + bl sub_02030A80 + ldr r1, _0223399C ; =0x0000088C + str r0, [r4, r1] + add r0, r1, #0 + sub r1, #0x5c + ldr r0, [r4, r0] + ldr r1, [r6, r1] + bl sub_02030AA0 + b _02233980 +_0223392A: + ldr r0, _02233998 ; =0x0000087C + mov r1, #0 + str r1, [r4, r0] + add r0, #0x10 + str r1, [r4, r0] + cmp r5, #0 + bne _02233980 + mov r0, #0x66 + bl sub_02030A80 + ldr r1, _0223399C ; =0x0000088C + str r0, [r4, r1] + add r0, r1, #0 + sub r1, #0x5c + ldr r0, [r4, r0] + ldr r1, [r6, r1] + bl sub_02030AA0 + b _02233980 +_02233950: + mov r0, #0x66 + bl sub_0202FD88 + ldr r1, _02233998 ; =0x0000087C + cmp r5, #0 + str r0, [r4, r1] + bne _02233976 + mov r0, #0x66 + bl sub_02030A80 + ldr r1, _0223399C ; =0x0000088C + str r0, [r4, r1] + add r0, r1, #0 + sub r1, #0x5c + ldr r0, [r4, r0] + ldr r1, [r6, r1] + bl sub_02030AA0 + b _02233980 +_02233976: + mov r0, #0x66 + bl sub_0202FDB8 + ldr r1, _0223399C ; =0x0000088C + str r0, [r4, r1] +_02233980: + bl sub_0202F250 + cmp r0, #1 + bne _0223398C + bl sub_0202F22C +_0223398C: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #4 + blt _022338B4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02233998: .word 0x0000087C +_0223399C: .word 0x0000088C + thumb_func_end ov62_022338A8 + + thumb_func_start ov62_022339A0 +ov62_022339A0: ; 0x022339A0 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r4, #0 + add r7, r4, #0 +_022339AA: + ldr r0, _022339D4 ; =0x0000087C + ldr r0, [r5, r0] + cmp r0, #0 + beq _022339BA + bl sub_020181C4 + ldr r0, _022339D4 ; =0x0000087C + str r6, [r5, r0] +_022339BA: + ldr r0, _022339D8 ; =0x0000088C + ldr r0, [r5, r0] + cmp r0, #0 + beq _022339CA + bl sub_020181C4 + ldr r0, _022339D8 ; =0x0000088C + str r7, [r5, r0] +_022339CA: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022339AA + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022339D4: .word 0x0000087C +_022339D8: .word 0x0000088C + thumb_func_end ov62_022339A0 + + thumb_func_start ov62_022339DC +ov62_022339DC: ; 0x022339DC + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r4, [r0, #0x18] + ldr r5, [r0, #0x1c] + ldr r6, [r0, #0x28] + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _02233A40 ; =0x000186A0 + mov r1, #2 + str r0, [sp, #0x14] + add r0, r6, #0 + add r2, r4, #0 + add r3, r5, #0 + bl sub_0200CD7C + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02233A40 ; =0x000186A0 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02233A40 ; =0x000186A0 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x13 + bl sub_0200CE3C + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02233A40: .word 0x000186A0 + thumb_func_end ov62_022339DC + + thumb_func_start ov62_02233A44 +ov62_02233A44: ; 0x02233A44 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + ldr r1, _02233A64 ; =0x000186A0 + bl sub_0200D080 + ldr r0, [r4, #0x1c] + ldr r1, _02233A64 ; =0x000186A0 + bl sub_0200D090 + ldr r0, [r4, #0x1c] + ldr r1, _02233A64 ; =0x000186A0 + bl sub_0200D0A0 + pop {r4, pc} + nop +_02233A64: .word 0x000186A0 + thumb_func_end ov62_02233A44 + + thumb_func_start ov62_02233A68 +ov62_02233A68: ; 0x02233A68 + ldr r3, _02233A70 ; =sub_02006C24 + mov r0, #0x13 + mov r1, #0x66 + bx r3 + ; .align 2, 0 +_02233A70: .word sub_02006C24 + thumb_func_end ov62_02233A68 + + thumb_func_start ov62_02233A74 +ov62_02233A74: ; 0x02233A74 + ldr r3, _02233A78 ; =sub_02006CA8 + bx r3 + ; .align 2, 0 +_02233A78: .word sub_02006CA8 + thumb_func_end ov62_02233A74 + + thumb_func_start ov62_02233A7C +ov62_02233A7C: ; 0x02233A7C + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r2, #0 + str r1, [sp, #0xc] + add r4, r3, #0 + ldr r7, [r0, #0x18] + ldr r6, [r0, #0x1c] + bne _02233A92 + add sp, #0x4c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02233A92: + ldr r0, [sp, #0x60] + str r0, [sp, #0x10] + ldr r0, [sp, #0x64] + ldr r2, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x14] + add r0, r4, #0 + bl sub_02079D8C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02233B20 ; =0x000186A0 + ldr r2, [sp, #0xc] + add r0, r5, r0 + str r0, [sp, #8] + add r0, r7, #0 + add r1, r6, #0 + bl sub_0200D8E8 + mov r1, #0 + add r0, sp, #0x18 + add r2, r1, #0 + strh r1, [r0] + sub r2, #0x30 + strh r2, [r0, #2] + strh r1, [r0, #4] + strh r1, [r0, #6] + mov r0, #1 + str r0, [sp, #0x28] + sub r0, r0, #2 + str r1, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x44] + str r1, [sp, #0x48] + ldr r1, _02233B20 ; =0x000186A0 + str r0, [sp, #0x3c] + add r2, r5, r1 + str r2, [sp, #0x2c] + str r0, [sp, #0x40] + str r1, [sp, #0x30] + str r1, [sp, #0x34] + str r1, [sp, #0x38] + add r0, r7, #0 + add r1, r6, #0 + add r2, sp, #0x18 + bl sub_0200CE6C + add r5, r0, #0 + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + add r0, r4, #0 + bl sub_02079EDC + add r1, r0, #0 + add r0, r5, #0 + add r1, r1, #4 + bl sub_0200D430 + add r0, r5, #0 + mov r1, #1 + bl sub_0200D364 + add r0, r5, #0 + bl sub_0200D330 + add r0, r5, #0 + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02233B20: .word 0x000186A0 + thumb_func_end ov62_02233A7C + + thumb_func_start ov62_02233B24 +ov62_02233B24: ; 0x02233B24 + push {r4, lr} + add r4, r2, #0 + beq _02233B3A + ldr r2, _02233B3C ; =0x000186A0 + ldr r0, [r0, #0x1c] + add r1, r1, r2 + bl sub_0200D070 + add r0, r4, #0 + bl sub_0200D0F4 +_02233B3A: + pop {r4, pc} + ; .align 2, 0 +_02233B3C: .word 0x000186A0 + thumb_func_end ov62_02233B24 + + thumb_func_start ov62_02233B40 +ov62_02233B40: ; 0x02233B40 + push {r3, lr} + cmp r2, #0 + beq _02233B4C + add r0, r2, #0 + bl sub_0200D0F4 +_02233B4C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_02233B40 + + thumb_func_start ov62_02233B50 +ov62_02233B50: ; 0x02233B50 + push {r4, r5, r6, r7, lr} + sub sp, #0x9c + ldr r3, _02233E7C ; =0x022489D0 + add r7, r1, #0 + str r0, [sp, #0x14] + add r2, sp, #0x74 + mov r1, #0x14 +_02233B5E: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _02233B5E + ldr r3, _02233E80 ; =0x02248910 + add r2, sp, #0x5c + str r2, [sp, #0x20] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #1 + ldr r5, [sp, #0x14] + str r0, [sp, #0x3c] + mov r0, #0 + str r0, [sp, #0x40] + add r4, sp, #0x74 + add r5, #0x3c +_02233B8A: + mov r0, #0 + ldrsh r0, [r4, r0] + cmp r0, #0xff + beq _02233C3E + ldr r1, [sp, #0x20] + ldr r0, [r7, #0x48] + ldr r1, [r1, #0] + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + bl sub_0201A7A0 + mov r0, #2 + ldrsh r0, [r4, r0] + mov r3, #0 + add r1, r5, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #4 + ldrsh r0, [r4, r0] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #6 + ldrsh r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [sp, #0x3c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrsh r3, [r4, r3] + ldr r0, [r7, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02233E84 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r2, r6, #0 + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + mov r0, #4 + ldrsh r1, [r4, r0] + mov r0, #6 + ldrsh r0, [r4, r0] + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x3c] + add r0, r0, r2 + str r0, [sp, #0x3c] + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x20] + add r4, #8 + add r0, r0, #4 + str r0, [sp, #0x20] + ldr r0, [sp, #0x40] + add r5, #0x10 + add r0, r0, #1 + str r0, [sp, #0x40] + cmp r0, #5 + blt _02233B8A +_02233C3E: + ldr r0, [sp, #0x14] + ldr r6, [r0, #0] + mov r0, #0x66 + bl ov62_02231690 + ldr r5, [sp, #0x14] + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0x66 + add r5, #0x3c + bl sub_02030B94 + str r0, [sp, #0x44] + ldr r1, [sp, #0x44] + add r0, r7, #0 + bl ov62_022349A8 + ldr r0, [r7, #0x48] + mov r1, #7 + bl sub_0200B1EC + str r0, [sp, #0x48] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x44] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x48] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02233E84 ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x44] + bl sub_020237BC + ldr r0, [sp, #0x48] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200C41C + ldr r0, [sp, #0x14] + mov r1, #3 + ldr r0, [r0, #4] + mov r2, #0 + bl sub_0202FE98 + add r1, r0, #0 + ldr r5, [sp, #0x14] + ldr r0, [r7, #0x48] + add r1, #0x84 + add r5, #0x4c + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02233E84 ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200C41C + ldr r0, [sp, #0x14] + mov r1, #2 + ldr r0, [r0, #4] + mov r2, #0 + bl sub_0202FE98 + str r0, [sp, #0x4c] + cmp r0, #0 + beq _02233DD0 + ldr r5, [sp, #0x14] + mov r0, #0xff + mov r1, #0x66 + add r5, #0x5c + bl sub_02023790 + str r0, [sp, #0x50] + ldr r0, [r7, #0x48] + mov r1, #9 + bl sub_0200B1EC + str r0, [sp, #0x54] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x50] + ldr r1, [sp, #0x4c] + mov r2, #4 + mov r3, #0 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x50] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x54] + add r0, r4, #0 + add r1, r6, #0 + bl sub_0200C388 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02233E84 ; =0x000F0D00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x50] + bl sub_020237BC + ldr r0, [sp, #0x54] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200C41C + b _02233DE2 +_02233DD0: + ldr r5, [sp, #0x14] + mov r1, #0 + add r5, #0x6c + add r0, r5, #0 + bl sub_0201ADA4 + add r0, r5, #0 + bl sub_0201A9A4 +_02233DE2: + ldr r0, [sp, #0x14] + mov r1, #4 + ldr r0, [r0, #4] + mov r2, #0 + bl sub_0202FE98 + add r5, r0, #0 + str r1, [sp, #0x1c] + add r6, r1, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x38] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x34] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x30] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + add r0, #0x7c + str r0, [sp, #0x14] + ldr r2, _02233E88 ; =0x000186A0 + add r0, r5, #0 + mov r3, #0 + bl sub_020E1EE0 + str r0, [sp, #0x2c] + ldr r2, _02233E88 ; =0x000186A0 + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0 + bl sub_020E1ED4 + ldr r2, _02233E88 ; =0x000186A0 + str r0, [sp, #0x58] + mov r3, #0 + add r6, r1, #0 + bl sub_020E1EE0 + str r0, [sp, #0x28] + ldr r0, [sp, #0x58] + ldr r2, _02233E88 ; =0x000186A0 + add r1, r6, #0 + mov r3, #0 + bl sub_020E1ED4 + mov r1, #0xa + str r0, [sp, #0x24] + bl sub_020E2178 + mov r1, #0xa + bl sub_020E2178 + cmp r1, #0 + bne _02233E8C + ldr r0, [sp, #0x1c] + mov r1, #0 + eor r1, r0 + mov r2, #0 + add r0, r5, #0 + eor r0, r2 + orr r0, r1 + beq _02233E8C + ldr r0, [r7, #0x48] + mov r1, #0xc + bl sub_0200B1EC + add r6, r0, #0 + b _02233E96 + nop +_02233E7C: .word 0x022489D0 +_02233E80: .word 0x02248910 +_02233E84: .word 0x000F0D00 +_02233E88: .word 0x000186A0 +_02233E8C: + ldr r0, [r7, #0x48] + mov r1, #0xb + bl sub_0200B1EC + add r6, r0, #0 +_02233E96: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x2c] + mov r2, #5 + mov r3, #2 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r1, [sp, #0x28] + mov r2, #5 + mov r3, #2 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + mov r2, #2 + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x24] + add r3, r2, #0 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + mov r1, #2 + ldr r2, [sp, #0x38] + add r0, r4, #0 + mov r3, #0 + str r1, [sp, #4] + bl sub_0200B48C + mov r1, #1 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x34] + add r0, r4, #0 + mov r3, #0 + bl sub_0200B48C + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x30] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl sub_0200C388 + ldr r0, [sp, #0x14] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02233F70 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x14] + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_0201A9A4 + ldr r0, [sp, #0x38] + bl sub_020237BC + ldr r0, [sp, #0x34] + bl sub_020237BC + ldr r0, [sp, #0x30] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0200C41C + add r0, r4, #0 + bl sub_0200B3F0 + add sp, #0x9c + pop {r4, r5, r6, r7, pc} + nop +_02233F70: .word 0x000F0D00 + thumb_func_end ov62_02233B50 + + thumb_func_start ov62_02233F74 +ov62_02233F74: ; 0x02233F74 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x3c +_02233F7C: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #5 + blt _02233F7C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02233F74 + + thumb_func_start ov62_02233F94 +ov62_02233F94: ; 0x02233F94 + push {r3, lr} + mov r1, #3 + mov r2, #0 + bl sub_0202FE98 + cmp r0, #0x1a + bgt _02233FCC + bge _02233FD8 + add r1, r0, #0 + sub r1, #0xe + cmp r1, #9 + bhi _02233FDC + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02233FB8: ; jump table + .short _02233FD8 - _02233FB8 - 2 ; case 0 + .short _02233FDC - _02233FB8 - 2 ; case 1 + .short _02233FDC - _02233FB8 - 2 ; case 2 + .short _02233FD8 - _02233FB8 - 2 ; case 3 + .short _02233FDC - _02233FB8 - 2 ; case 4 + .short _02233FDC - _02233FB8 - 2 ; case 5 + .short _02233FD8 - _02233FB8 - 2 ; case 6 + .short _02233FDC - _02233FB8 - 2 ; case 7 + .short _02233FDC - _02233FB8 - 2 ; case 8 + .short _02233FD8 - _02233FB8 - 2 ; case 9 +_02233FCC: + cmp r0, #0x1d + bgt _02233FD4 + beq _02233FD8 + b _02233FDC +_02233FD4: + cmp r0, #0x20 + bne _02233FDC +_02233FD8: + mov r0, #1 + pop {r3, pc} +_02233FDC: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov62_02233F94 + + thumb_func_start ov62_02233FE0 +ov62_02233FE0: ; 0x02233FE0 + ldr r3, _02233FE8 ; =ov62_02233F94 + ldr r0, [r0, #4] + bx r3 + nop +_02233FE8: .word ov62_02233F94 + thumb_func_end ov62_02233FE0 + + thumb_func_start ov62_02233FEC +ov62_02233FEC: ; 0x02233FEC + push {r3, lr} + bl ov62_02233FE0 + cmp r0, #1 + bne _02233FFA + mov r0, #0x51 + pop {r3, pc} +_02233FFA: + mov r0, #0x52 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_02233FEC + + thumb_func_start ov62_02234000 +ov62_02234000: ; 0x02234000 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x140 + str r0, [sp, #0x18] + mov r0, #0 + str r1, [sp, #0x1c] + ldr r3, _0223420C ; =0x02248A78 + str r0, [sp, #0x44] + add r2, sp, #0xe0 + mov r1, #0x30 +_02234012: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _02234012 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0x18] + str r0, [sp, #0x3c] + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0x1c] + str r0, [sp, #0x38] + ldr r0, [sp, #0x1c] + ldr r4, [r0, #0x28] + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _02234210 ; =0x000186A0 + ldr r2, [sp, #0x3c] + str r0, [sp, #0x14] + ldr r3, [sp, #0x38] + add r0, r4, #0 + mov r1, #2 + bl sub_0200CD7C + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02234210 ; =0x000186A0 + ldr r1, [sp, #0x38] + str r0, [sp, #4] + ldr r0, [sp, #0x3c] + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02234210 ; =0x000186A0 + ldr r1, [sp, #0x38] + str r0, [sp, #4] + ldr r0, [sp, #0x3c] + mov r2, #0x13 + bl sub_0200CE3C + mov r0, #6 + mov r6, #0 + str r0, [sp, #0x34] + str r0, [sp, #0x2c] + ldr r0, [sp, #0x18] + str r6, [sp, #0x30] + str r6, [sp, #0x40] + bl ov62_02233FE0 + cmp r0, #1 + bne _022340A4 + mov r0, #3 + str r0, [sp, #0x34] + str r0, [sp, #0x2c] + mov r0, #1 + str r0, [sp, #0x40] +_022340A4: + ldr r4, [sp, #0x30] + ldr r0, [sp, #0x2c] + add r1, r4, #0 + cmp r1, r0 + bge _022340EA + lsl r1, r6, #2 + add r0, sp, #0x7c + add r5, r0, r1 + add r0, sp, #0x4c + add r7, r0, r1 +_022340B8: + mov r0, #0xff + str r0, [r5, #0] + ldr r0, [sp, #0x18] + mov r1, #0 + ldr r0, [r0, #4] + add r2, r4, #0 + bl sub_0202FE98 + str r0, [sp, #0x48] + ldr r0, [sp, #0x18] + mov r1, #1 + ldr r0, [r0, #4] + add r2, r4, #0 + bl sub_0202FE98 + ldr r1, [sp, #0x48] + cmp r1, #0 + beq _022340E2 + stmia r5!, {r1} + stmia r7!, {r0} + add r6, r6, #1 +_022340E2: + ldr r0, [sp, #0x2c] + add r4, r4, #1 + cmp r4, r0 + blt _022340B8 +_022340EA: + ldr r1, [sp, #0x2c] + add r0, r6, #0 + cmp r6, r1 + bge _0223410C + lsl r2, r6, #2 + add r1, sp, #0x7c + add r3, r1, r2 + add r1, sp, #0x4c + add r4, r1, r2 + mov r2, #0 +_022340FE: + stmia r3!, {r2} + ldr r1, [sp, #0x2c] + add r0, r0, #1 + stmia r4!, {r2} + add r6, r6, #1 + cmp r0, r1 + blt _022340FE +_0223410C: + ldr r1, [sp, #0x30] + ldr r0, [sp, #0x34] + add r0, r1, r0 + str r0, [sp, #0x30] + ldr r1, [sp, #0x2c] + ldr r0, [sp, #0x34] + add r0, r1, r0 + str r0, [sp, #0x2c] + cmp r0, #0xc + ble _022340A4 + add r0, sp, #0x7c + str r0, [sp, #0x28] + ldr r0, [sp, #0x40] + mov r1, #0x30 + add r2, sp, #0xe0 + mul r1, r0 + ldr r5, [sp, #0x18] + mov r6, #0 + add r7, sp, #0x4c + add r4, r2, r1 +_02234134: + ldr r0, [sp, #0x18] + mov r1, #0 + str r1, [r0, #0xc] + ldr r0, [sp, #0x28] + ldr r0, [r0, #0] + str r0, [sp, #0x20] + cmp r0, #0 + beq _022341F2 + ldr r0, [r7, #0] + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + ldr r2, [sp, #0x24] + bl sub_02079D8C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r1, [sp, #0x44] + ldr r0, _02234210 ; =0x000186A0 + mov r2, #0x13 + add r0, r1, r0 + str r0, [sp, #8] + ldr r0, [sp, #0x3c] + ldr r1, [sp, #0x38] + bl sub_0200D888 + mov r0, #0 + ldrsh r1, [r4, r0] + add r0, sp, #0xac + add r2, sp, #0xac + add r1, #8 + strh r1, [r0] + mov r0, #2 + ldrsh r1, [r4, r0] + add r0, sp, #0xac + sub r1, #0xc + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + strh r1, [r0, #6] + add r0, r1, #0 + str r0, [sp, #0xb4] + str r0, [sp, #0xb8] + mov r0, #1 + str r0, [sp, #0xbc] + add r0, r1, #0 + str r0, [sp, #0xd8] + str r0, [sp, #0xdc] + ldr r1, [sp, #0x44] + ldr r0, _02234210 ; =0x000186A0 + add r0, r1, r0 + str r0, [sp, #0xc0] + ldr r0, _02234210 ; =0x000186A0 + ldr r1, [sp, #0x1c] + str r0, [sp, #0xc4] + str r0, [sp, #0xc8] + str r0, [sp, #0xcc] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0xd0] + str r0, [sp, #0xd4] + ldr r0, [sp, #0x1c] + ldr r1, [r1, #0x1c] + ldr r0, [r0, #0x18] + bl sub_0200CE6C + str r0, [r5, #0xc] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x24] + mov r2, #0 + bl sub_02079EDC + add r1, r0, #0 + ldr r0, [r5, #0xc] + add r1, r1, #4 + bl sub_0200D430 + ldr r0, [r5, #0xc] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r5, #0xc] + bl sub_0200D330 + mov r1, #0xc + ldr r0, [r5, #0xc] + sub r1, r1, r6 + bl sub_0200D474 + ldr r0, [sp, #0x44] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #0x44] +_022341F2: + ldr r0, [sp, #0x18] + add r6, r6, #1 + add r0, r0, #4 + str r0, [sp, #0x18] + ldr r0, [sp, #0x28] + add r7, r7, #4 + add r0, r0, #4 + add r4, r4, #4 + str r0, [sp, #0x28] + cmp r6, #0xc + blt _02234134 + add sp, #0x140 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223420C: .word 0x02248A78 +_02234210: .word 0x000186A0 + thumb_func_end ov62_02234000 + + thumb_func_start ov62_02234214 +ov62_02234214: ; 0x02234214 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov62_02233B50 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_02234000 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02234214 + + thumb_func_start ov62_02234228 +ov62_02234228: ; 0x02234228 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + str r0, [sp] + ldr r0, [r6, #0x1c] + ldr r1, _02234278 ; =0x000186A0 + bl sub_0200D080 + ldr r0, [r6, #0x1c] + ldr r1, _02234278 ; =0x000186A0 + bl sub_0200D090 + ldr r0, [r6, #0x1c] + ldr r1, _02234278 ; =0x000186A0 + bl sub_0200D0A0 + mov r4, #0 + ldr r5, [sp] + add r7, r4, #0 +_0223424C: + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _02234264 + ldr r1, _02234278 ; =0x000186A0 + ldr r0, [r6, #0x1c] + add r1, r4, r1 + bl sub_0200D070 + ldr r0, [r5, #0xc] + bl sub_0200D0F4 + str r7, [r5, #0xc] +_02234264: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xc + blt _0223424C + ldr r0, [sp] + add r1, r6, #0 + bl ov62_02233F74 + pop {r3, r4, r5, r6, r7, pc} + nop +_02234278: .word 0x000186A0 + thumb_func_end ov62_02234228 + + thumb_func_start ov62_0223427C +ov62_0223427C: ; 0x0223427C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_02234284: + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _02234290 + add r1, r6, #0 + bl sub_0200D3F4 +_02234290: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xc + blt _02234284 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_0223427C + + thumb_func_start ov62_0223429C +ov62_0223429C: ; 0x0223429C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0 + add r2, r0, #0 + bl sub_02002D7C + add r4, r0, #0 + add r0, r5, #0 + bl sub_0201C294 + lsl r0, r0, #3 + sub r1, r0, r4 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223429C + + thumb_func_start ov62_022342BC +ov62_022342BC: ; 0x022342BC + ldr r1, _022342C8 ; =0x00000834 + mov r2, #0 + strh r2, [r0, r1] + add r1, r1, #2 + strh r2, [r0, r1] + bx lr + ; .align 2, 0 +_022342C8: .word 0x00000834 + thumb_func_end ov62_022342BC + + thumb_func_start ov62_022342CC +ov62_022342CC: ; 0x022342CC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0202783C + add r1, sp, #4 + str r1, [sp] + ldr r1, _02234310 ; =0x0000086C + add r2, sp, #0xc + ldr r1, [r5, r1] + add r3, sp, #8 + add r1, r1, #2 + add r4, r0, #0 + bl sub_020279A8 + add r0, sp, #4 + ldrb r0, [r0] + mov r2, #0 + mvn r2, r2 + str r0, [sp] + ldr r1, _02234310 ; =0x0000086C + add r0, r4, #0 + ldr r1, [r5, r1] + add r3, r2, #0 + add r1, r1, #2 + bl sub_020279D0 + mov r0, #1 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02234310: .word 0x0000086C + thumb_func_end ov62_022342CC + + thumb_func_start ov62_02234314 +ov62_02234314: ; 0x02234314 + push {r3, lr} + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #0 + bl sub_02019060 + mov r0, #7 + mov r1, #1 + bl sub_02019060 + pop {r3, pc} + thumb_func_end ov62_02234314 + + thumb_func_start ov62_02234358 +ov62_02234358: ; 0x02234358 + push {r4, r5, r6, lr} + ldr r0, [r0, #0x44] + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r0, #0 + bne _0223436E + add r0, r5, #0 + mov r1, #1 + bl sub_0208B9E0 +_0223436E: + add r0, r5, #0 + mov r1, #1 + bl sub_0208B8B0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0208B948 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0208B8B8 + pop {r4, r5, r6, pc} + thumb_func_end ov62_02234358 + + thumb_func_start ov62_0223438C +ov62_0223438C: ; 0x0223438C + push {r4, r5, r6, lr} + mov r3, #0 + mov r2, #1 + mov r5, #1 + sub r2, r2, r0 + sbc r3, r1 + bhs _022343B2 + mov r4, #0xa + mov r6, #0 +_0223439E: + add r2, r4, #0 + add r3, r6, #0 + bl sub_020E1ED4 + mov r2, #0 + mov r3, #1 + add r5, r5, #1 + sub r3, r3, r0 + sbc r2, r1 + blo _0223439E +_022343B2: + add r0, r5, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_0223438C + + thumb_func_start ov62_022343B8 +ov62_022343B8: ; 0x022343B8 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r3, r2, #0 + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + bl sub_0200710C + add sp, #0x10 + pop {r4, pc} + thumb_func_end ov62_022343B8 + + thumb_func_start ov62_022343D8 +ov62_022343D8: ; 0x022343D8 + push {r4, lr} + ldr r2, _02234438 ; =0x00004160 + add r4, r1, #0 + ldr r1, [r4, r2] + add r1, r1, #1 + str r1, [r4, r2] + ldr r1, [r4, r2] + cmp r1, #7 + blt _02234422 + bl sub_0200DA58 + ldr r0, _02234438 ; =0x00004160 + mov r2, #0 + str r2, [r4, r0] + sub r1, r0, #4 + str r2, [r4, r1] + add r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0208BA54 + ldr r0, _0223443C ; =0x00004164 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _0223443C ; =0x00004164 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B8B0 + ldr r0, _0223443C ; =0x00004164 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + pop {r4, pc} +_02234422: + lsl r0, r1, #1 + add r0, r0, #6 + lsl r0, r0, #0x10 + asr r1, r0, #0x10 + add r0, r2, #4 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + pop {r4, pc} + nop +_02234438: .word 0x00004160 +_0223443C: .word 0x00004164 + thumb_func_end ov62_022343D8 + + thumb_func_start ov62_02234440 +ov62_02234440: ; 0x02234440 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _02234508 ; =0x0000415C + ldr r1, [r4, r0] + cmp r1, #1 + bne _02234460 + add r0, #0xc + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223445A + bl sub_0200DA58 +_0223445A: + ldr r0, _0223450C ; =0x00004168 + mov r1, #0 + str r1, [r4, r0] +_02234460: + ldr r0, _02234510 ; =0x021BF6DC + ldrb r0, [r0, #5] + cmp r0, #0 + bne _0223446C + ldr r0, _02234514 ; =0x000006F4 + b _02234470 +_0223446C: + mov r0, #0x6f + lsl r0, r0, #4 +_02234470: + ldr r1, [r4, r0] + ldr r0, _02234518 ; =0x00004164 + str r1, [r4, r0] + ldr r0, _02234508 ; =0x0000415C + mov r1, #1 + str r1, [r4, r0] + mov r1, #0 + add r0, r0, #4 + str r1, [r4, r0] + add r0, sp, #4 + add r1, sp, #0 + bl sub_020227C0 + ldr r0, _02234518 ; =0x00004164 + ldr r0, [r4, r0] + bl sub_0208BA30 + ldr r0, _02234518 ; =0x00004164 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0208B8B0 + ldr r0, _02234518 ; =0x00004164 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0208B9E0 + ldr r0, _02234518 ; =0x00004164 + ldr r1, [sp, #4] + ldr r2, [sp] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8B8 + ldr r0, _02234518 ; =0x00004164 + ldr r1, [sp, #4] + ldr r2, [sp] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B948 + mov r2, #1 + ldr r0, _0223451C ; =ov62_022343D8 + add r1, r4, #0 + lsl r2, r2, #0xc + bl sub_0200D9E8 + ldr r2, _0223450C ; =0x00004168 + str r0, [r4, r2] + ldr r0, [r4, r2] + cmp r0, #0 + beq _022344EE + add r1, r4, #0 + bl ov62_022343D8 + add sp, #8 + pop {r4, pc} +_022344EE: + add r0, r2, #0 + mov r1, #0 + sub r0, #0xc + str r1, [r4, r0] + sub r0, r2, #4 + ldr r0, [r4, r0] + bl sub_0208B9E0 + bl sub_02022974 + add sp, #8 + pop {r4, pc} + nop +_02234508: .word 0x0000415C +_0223450C: .word 0x00004168 +_02234510: .word 0x021BF6DC +_02234514: .word 0x000006F4 +_02234518: .word 0x00004164 +_0223451C: .word ov62_022343D8 + thumb_func_end ov62_02234440 + + thumb_func_start ov62_02234520 +ov62_02234520: ; 0x02234520 + push {r3, lr} + bl ov62_02234440 + ldr r0, _02234530 ; =0x00000563 + bl sub_02005748 + pop {r3, pc} + nop +_02234530: .word 0x00000563 + thumb_func_end ov62_02234520 + + thumb_func_start ov62_02234534 +ov62_02234534: ; 0x02234534 + ldr r1, _0223453C ; =0x00000528 + ldr r0, [r0, r1] + bx lr + nop +_0223453C: .word 0x00000528 + thumb_func_end ov62_02234534 + + thumb_func_start ov62_02234540 +ov62_02234540: ; 0x02234540 + ldr r2, _02234548 ; =0x00000528 + str r1, [r0, r2] + bx lr + nop +_02234548: .word 0x00000528 + thumb_func_end ov62_02234540 + + thumb_func_start ov62_0223454C +ov62_0223454C: ; 0x0223454C + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r6, #0 + add r7, r3, #0 + bl ov62_022313E0 + add r1, r5, #0 + str r0, [r4, #4] + add r0, r4, #0 + add r1, #0x14 + add r2, r6, #0 + bl ov62_0223118C + add r5, #0x14 + add r0, r4, #0 + add r1, r5, #0 + add r2, r7, #0 + bl ov62_0223124C + add r3, sp, #8 + mov r1, #0x10 + mov r2, #0x14 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #4] + bl sub_0200D4C4 + add r3, sp, #8 + mov r1, #0x18 + mov r2, #0x1c + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #8] + bl sub_020128C4 + ldr r0, [r4, #8] + ldr r1, [sp, #0x2c] + bl sub_020129D0 + ldr r0, [r4, #4] + ldr r1, [sp, #0x28] + bl sub_0200D364 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_0223454C + + thumb_func_start ov62_022345A8 +ov62_022345A8: ; 0x022345A8 + push {r4, lr} + add r4, r0, #0 + bl ov62_022312B0 + ldr r0, [r4, #4] + bl sub_0200D0F4 + pop {r4, pc} + thumb_func_end ov62_022345A8 + + thumb_func_start ov62_022345B8 +ov62_022345B8: ; 0x022345B8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r1, r2, #0 + add r0, r3, #0 + ldr r2, [r5, #4] + ldr r3, _02234878 ; =0x00000504 + str r2, [r5, r3] + ldr r4, [r5, #8] + add r2, r3, #4 + str r4, [r5, r2] + ldr r2, [r5, #0x10] + ldr r4, [r2, #0] + add r2, r3, #0 + add r2, #8 + str r4, [r5, r2] + mov r2, #1 + add r3, #0x18 + mov r4, #0xc2 + str r2, [r5, r3] + cmp r0, #0 + beq _022345EE + cmp r0, #1 + beq _0223465E + cmp r0, #2 + beq _022346B0 + b _022348AE +_022345EE: + cmp r1, #0xe + bhi _02234658 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022345FE: ; jump table + .short _0223461C - _022345FE - 2 ; case 0 + .short _02234620 - _022345FE - 2 ; case 1 + .short _02234624 - _022345FE - 2 ; case 2 + .short _02234628 - _022345FE - 2 ; case 3 + .short _0223462C - _022345FE - 2 ; case 4 + .short _02234630 - _022345FE - 2 ; case 5 + .short _02234634 - _022345FE - 2 ; case 6 + .short _02234638 - _022345FE - 2 ; case 7 + .short _0223463C - _022345FE - 2 ; case 8 + .short _02234640 - _022345FE - 2 ; case 9 + .short _02234644 - _022345FE - 2 ; case 10 + .short _02234648 - _022345FE - 2 ; case 11 + .short _0223464C - _022345FE - 2 ; case 12 + .short _02234650 - _022345FE - 2 ; case 13 + .short _02234654 - _022345FE - 2 ; case 14 +_0223461C: + mov r4, #0xf4 + b _022348AE +_02234620: + mov r4, #0xf5 + b _022348AE +_02234624: + mov r4, #0xf6 + b _022348AE +_02234628: + mov r4, #0xf7 + b _022348AE +_0223462C: + mov r4, #0xf8 + b _022348AE +_02234630: + mov r4, #0xf9 + b _022348AE +_02234634: + mov r4, #0xfa + b _022348AE +_02234638: + mov r4, #0xfb + b _022348AE +_0223463C: + mov r4, #0xfc + b _022348AE +_02234640: + mov r4, #0xfd + b _022348AE +_02234644: + mov r4, #0xfe + b _022348AE +_02234648: + mov r4, #0xff + b _022348AE +_0223464C: + add r4, #0x3e + b _022348AE +_02234650: + add r4, #0x3f + b _022348AE +_02234654: + add r4, #0x40 + b _022348AE +_02234658: + bl sub_02022974 + b _022348AE +_0223465E: + cmp r1, #9 + bhi _022346AA + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223466E: ; jump table + .short _02234682 - _0223466E - 2 ; case 0 + .short _02234686 - _0223466E - 2 ; case 1 + .short _0223468A - _0223466E - 2 ; case 2 + .short _0223468E - _0223466E - 2 ; case 3 + .short _02234692 - _0223466E - 2 ; case 4 + .short _02234696 - _0223466E - 2 ; case 5 + .short _0223469A - _0223466E - 2 ; case 6 + .short _0223469E - _0223466E - 2 ; case 7 + .short _022346A2 - _0223466E - 2 ; case 8 + .short _022346A6 - _0223466E - 2 ; case 9 +_02234682: + add r4, #0x41 + b _022348AE +_02234686: + add r4, #0x42 + b _022348AE +_0223468A: + add r4, #0x43 + b _022348AE +_0223468E: + add r4, #0x44 + b _022348AE +_02234692: + add r4, #0x45 + b _022348AE +_02234696: + add r4, #0x46 + b _022348AE +_0223469A: + add r4, #0x47 + b _022348AE +_0223469E: + add r4, #0x48 + b _022348AE +_022346A2: + add r4, #0x49 + b _022348AE +_022346A6: + add r4, #0x4a + b _022348AE +_022346AA: + bl sub_02022974 + b _022348AE +_022346B0: + cmp r6, #8 + bls _022346B6 + b _022348AA +_022346B6: + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022346C2: ; jump table + .short _022346D4 - _022346C2 - 2 ; case 0 + .short _0223470C - _022346C2 - 2 ; case 1 + .short _0223473A - _022346C2 - 2 ; case 2 + .short _0223477A - _022346C2 - 2 ; case 3 + .short _022347A8 - _022346C2 - 2 ; case 4 + .short _022347C8 - _022346C2 - 2 ; case 5 + .short _02234802 - _022346C2 - 2 ; case 6 + .short _02234848 - _022346C2 - 2 ; case 7 + .short _0223487C - _022346C2 - 2 ; case 8 +_022346D4: + cmp r1, #5 + bhi _02234706 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022346E4: ; jump table + .short _022346F0 - _022346E4 - 2 ; case 0 + .short _022346F2 - _022346E4 - 2 ; case 1 + .short _022346F6 - _022346E4 - 2 ; case 2 + .short _022346FA - _022346E4 - 2 ; case 3 + .short _022346FE - _022346E4 - 2 ; case 4 + .short _02234702 - _022346E4 - 2 ; case 5 +_022346F0: + b _022348AE +_022346F2: + mov r4, #0xc3 + b _022348AE +_022346F6: + mov r4, #0xc4 + b _022348AE +_022346FA: + mov r4, #0xc5 + b _022348AE +_022346FE: + mov r4, #0xc6 + b _022348AE +_02234702: + mov r4, #0xc7 + b _022348AE +_02234706: + bl sub_02022974 + b _022348AE +_0223470C: + cmp r1, #3 + bhi _02234734 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223471C: ; jump table + .short _02234724 - _0223471C - 2 ; case 0 + .short _02234728 - _0223471C - 2 ; case 1 + .short _0223472C - _0223471C - 2 ; case 2 + .short _02234730 - _0223471C - 2 ; case 3 +_02234724: + mov r4, #0xc8 + b _022348AE +_02234728: + mov r4, #0xc9 + b _022348AE +_0223472C: + mov r4, #0xca + b _022348AE +_02234730: + mov r4, #0xcb + b _022348AE +_02234734: + bl sub_02022974 + b _022348AE +_0223473A: + cmp r1, #6 + bhi _02234774 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223474A: ; jump table + .short _02234758 - _0223474A - 2 ; case 0 + .short _0223475C - _0223474A - 2 ; case 1 + .short _02234760 - _0223474A - 2 ; case 2 + .short _02234764 - _0223474A - 2 ; case 3 + .short _02234768 - _0223474A - 2 ; case 4 + .short _0223476C - _0223474A - 2 ; case 5 + .short _02234770 - _0223474A - 2 ; case 6 +_02234758: + mov r4, #0xcc + b _022348AE +_0223475C: + mov r4, #0xcd + b _022348AE +_02234760: + mov r4, #0xce + b _022348AE +_02234764: + mov r4, #0xcf + b _022348AE +_02234768: + mov r4, #0xd0 + b _022348AE +_0223476C: + mov r4, #0xd1 + b _022348AE +_02234770: + mov r4, #0xd2 + b _022348AE +_02234774: + bl sub_02022974 + b _022348AE +_0223477A: + cmp r1, #3 + bhi _022347A2 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223478A: ; jump table + .short _02234792 - _0223478A - 2 ; case 0 + .short _02234796 - _0223478A - 2 ; case 1 + .short _0223479A - _0223478A - 2 ; case 2 + .short _0223479E - _0223478A - 2 ; case 3 +_02234792: + mov r4, #0xd3 + b _022348AE +_02234796: + mov r4, #0xd4 + b _022348AE +_0223479A: + mov r4, #0xd5 + b _022348AE +_0223479E: + mov r4, #0xd6 + b _022348AE +_022347A2: + bl sub_02022974 + b _022348AE +_022347A8: + cmp r1, #0 + beq _022347B6 + cmp r1, #1 + beq _022347BA + cmp r1, #2 + beq _022347BE + b _022347C2 +_022347B6: + mov r4, #0xd7 + b _022348AE +_022347BA: + mov r4, #0xd8 + b _022348AE +_022347BE: + mov r4, #0xd9 + b _022348AE +_022347C2: + bl sub_02022974 + b _022348AE +_022347C8: + cmp r1, #5 + bhi _022347FC + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022347D8: ; jump table + .short _022347E4 - _022347D8 - 2 ; case 0 + .short _022347E8 - _022347D8 - 2 ; case 1 + .short _022347EC - _022347D8 - 2 ; case 2 + .short _022347F0 - _022347D8 - 2 ; case 3 + .short _022347F4 - _022347D8 - 2 ; case 4 + .short _022347F8 - _022347D8 - 2 ; case 5 +_022347E4: + mov r4, #0xda + b _022348AE +_022347E8: + mov r4, #0xdb + b _022348AE +_022347EC: + mov r4, #0xdc + b _022348AE +_022347F0: + mov r4, #0xdd + b _022348AE +_022347F4: + mov r4, #0xde + b _022348AE +_022347F8: + mov r4, #0xdf + b _022348AE +_022347FC: + bl sub_02022974 + b _022348AE +_02234802: + cmp r1, #7 + bhi _02234842 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02234812: ; jump table + .short _02234822 - _02234812 - 2 ; case 0 + .short _02234826 - _02234812 - 2 ; case 1 + .short _0223482A - _02234812 - 2 ; case 2 + .short _0223482E - _02234812 - 2 ; case 3 + .short _02234832 - _02234812 - 2 ; case 4 + .short _02234836 - _02234812 - 2 ; case 5 + .short _0223483A - _02234812 - 2 ; case 6 + .short _0223483E - _02234812 - 2 ; case 7 +_02234822: + mov r4, #0xe0 + b _022348AE +_02234826: + mov r4, #0xe1 + b _022348AE +_0223482A: + mov r4, #0xe2 + b _022348AE +_0223482E: + mov r4, #0xe3 + b _022348AE +_02234832: + mov r4, #0xe4 + b _022348AE +_02234836: + mov r4, #0xe5 + b _022348AE +_0223483A: + mov r4, #0xe6 + b _022348AE +_0223483E: + mov r4, #0xe7 + b _022348AE +_02234842: + bl sub_02022974 + b _022348AE +_02234848: + cmp r1, #3 + bhi _02234870 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02234858: ; jump table + .short _02234860 - _02234858 - 2 ; case 0 + .short _02234864 - _02234858 - 2 ; case 1 + .short _02234868 - _02234858 - 2 ; case 2 + .short _0223486C - _02234858 - 2 ; case 3 +_02234860: + mov r4, #0xe8 + b _022348AE +_02234864: + mov r4, #0xe9 + b _022348AE +_02234868: + mov r4, #0xea + b _022348AE +_0223486C: + mov r4, #0xeb + b _022348AE +_02234870: + bl sub_02022974 + b _022348AE + nop +_02234878: .word 0x00000504 +_0223487C: + cmp r1, #3 + bhi _022348A4 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223488C: ; jump table + .short _02234894 - _0223488C - 2 ; case 0 + .short _02234898 - _0223488C - 2 ; case 1 + .short _0223489C - _0223488C - 2 ; case 2 + .short _022348A0 - _0223488C - 2 ; case 3 +_02234894: + mov r4, #0xec + b _022348AE +_02234898: + mov r4, #0xed + b _022348AE +_0223489C: + mov r4, #0xee + b _022348AE +_022348A0: + mov r4, #0xef + b _022348AE +_022348A4: + bl sub_02022974 + b _022348AE +_022348AA: + bl sub_02022974 +_022348AE: + mov r0, #0x51 + lsl r0, r0, #4 + str r4, [r5, r0] + ldr r0, [r5, r0] + pop {r4, r5, r6, pc} + thumb_func_end ov62_022345B8 + + thumb_func_start ov62_022348B8 +ov62_022348B8: ; 0x022348B8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r5, [r4, #4] + ldr r7, _022348F8 ; =0x00000504 + str r5, [r4, r7] + ldr r6, [r4, #8] + add r5, r7, #4 + str r6, [r4, r5] + ldr r5, [r4, #0x10] + ldr r6, [r5, #0] + add r5, r7, #0 + add r5, #8 + str r6, [r4, r5] + add r5, r7, #0 + mov r6, #0 + add r5, #0x10 + str r6, [r4, r5] + add r7, #0x14 + str r6, [r4, r7] + bl ov62_022345B8 + mov r1, #0x51 + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #1 + add r1, #0xc + str r0, [r4, r1] + ldr r0, [r4, #0x10] + mov r1, #0x12 + str r1, [r0, #0] + pop {r3, r4, r5, r6, r7, pc} + nop +_022348F8: .word 0x00000504 + thumb_func_end ov62_022348B8 + + thumb_func_start ov62_022348FC +ov62_022348FC: ; 0x022348FC + push {r4, lr} + ldr r2, _0223496C ; =0x00000514 + add r4, r0, #0 + ldr r1, [r4, r2] + cmp r1, #0 + beq _0223490E + cmp r1, #1 + beq _02234934 + b _0223494C +_0223490E: + add r1, r2, #4 + ldr r1, [r4, r1] + cmp r1, #8 + bge _02234922 + add r0, r2, #4 + ldr r0, [r4, r0] + add r1, r0, #1 + add r0, r2, #4 + str r1, [r4, r0] + pop {r4, pc} +_02234922: + sub r1, r2, #4 + ldr r1, [r4, r1] + bl ov62_02231AAC + ldr r0, _0223496C ; =0x00000514 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + pop {r4, pc} +_02234934: + bl sub_02022798 + cmp r0, #0 + beq _02234968 + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, _0223496C ; =0x00000514 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + pop {r4, pc} +_0223494C: + add r0, r2, #4 + ldr r0, [r4, r0] + cmp r0, #0 + ble _02234960 + add r0, r2, #4 + ldr r0, [r4, r0] + sub r1, r0, #1 + add r0, r2, #4 + str r1, [r4, r0] + pop {r4, pc} +_02234960: + sub r2, #8 + ldr r1, [r4, r2] + ldr r0, [r4, #0x10] + str r1, [r0, #0] +_02234968: + pop {r4, pc} + nop +_0223496C: .word 0x00000514 + thumb_func_end ov62_022348FC + + thumb_func_start ov62_02234970 +ov62_02234970: ; 0x02234970 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r2, #0 + mov r4, #1 + add r5, r0, #4 +_0223497A: + ldr r0, _022349A4 ; =0x0000087C + ldr r0, [r5, r0] + cmp r0, #0 + beq _02234996 + mov r1, #4 + mov r2, #0 + bl sub_0202FE98 + eor r1, r7 + eor r0, r6 + orr r0, r1 + bne _02234996 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02234996: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223497A + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022349A4: .word 0x0000087C + thumb_func_end ov62_02234970 + + thumb_func_start ov62_022349A8 +ov62_022349A8: ; 0x022349A8 + push {r4, r5, r6, lr} + add r5, r1, #0 + bl ov62_0224112C + mov r1, #0x51 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + mov r0, #0x40 + bl sub_02023790 + add r6, r0, #0 + mov r0, #0 + add r1, r5, #0 + add r2, r6, #0 + bl sub_02002DB4 + cmp r0, #0 + bne _022349DA + mov r1, #0x51 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov62_022349E4 +_022349DA: + add r0, r6, #0 + bl sub_020237BC + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_022349A8 + + thumb_func_start ov62_022349E4 +ov62_022349E4: ; 0x022349E4 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + bl sub_020237E8 + mov r0, #1 + mov r1, #0x1a + mov r2, #0xa + add r3, r5, #0 + bl sub_0200B144 + mov r1, #0x53 + add r5, r0, #0 + lsl r1, r1, #2 + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r5, #0 + bl sub_0200B190 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_022349E4 + + .rodata + + + .global Unk_ov62_022488F0 +Unk_ov62_022488F0: ; 0x022488F0 + .incbin "incbin/overlay62_rodata.bin", 0x1C4, 0x1CC - 0x1C4 + + .global Unk_ov62_022488F8 +Unk_ov62_022488F8: ; 0x022488F8 + .incbin "incbin/overlay62_rodata.bin", 0x1CC, 0x1D8 - 0x1CC + + .global Unk_ov62_02248904 +Unk_ov62_02248904: ; 0x02248904 + .incbin "incbin/overlay62_rodata.bin", 0x1D8, 0x1E4 - 0x1D8 + + .global Unk_ov62_02248910 +Unk_ov62_02248910: ; 0x02248910 + .incbin "incbin/overlay62_rodata.bin", 0x1E4, 0x1FC - 0x1E4 + + .global Unk_ov62_02248928 +Unk_ov62_02248928: ; 0x02248928 + .incbin "incbin/overlay62_rodata.bin", 0x1FC, 0x218 - 0x1FC + + .global Unk_ov62_02248944 +Unk_ov62_02248944: ; 0x02248944 + .incbin "incbin/overlay62_rodata.bin", 0x218, 0x234 - 0x218 + + .global Unk_ov62_02248960 +Unk_ov62_02248960: ; 0x02248960 + .incbin "incbin/overlay62_rodata.bin", 0x234, 0x250 - 0x234 + + .global Unk_ov62_0224897C +Unk_ov62_0224897C: ; 0x0224897C + .incbin "incbin/overlay62_rodata.bin", 0x250, 0x26C - 0x250 + + .global Unk_ov62_02248998 +Unk_ov62_02248998: ; 0x02248998 + .incbin "incbin/overlay62_rodata.bin", 0x26C, 0x288 - 0x26C + + .global Unk_ov62_022489B4 +Unk_ov62_022489B4: ; 0x022489B4 + .incbin "incbin/overlay62_rodata.bin", 0x288, 0x2A4 - 0x288 + + .global Unk_ov62_022489D0 +Unk_ov62_022489D0: ; 0x022489D0 + .incbin "incbin/overlay62_rodata.bin", 0x2A4, 0x2CC - 0x2A4 + + .global Unk_ov62_022489F8 +Unk_ov62_022489F8: ; 0x022489F8 + .incbin "incbin/overlay62_rodata.bin", 0x2CC, 0x2FC - 0x2CC + + .global Unk_ov62_02248A28 +Unk_ov62_02248A28: ; 0x02248A28 + .incbin "incbin/overlay62_rodata.bin", 0x2FC, 0x34C - 0x2FC + + .global Unk_ov62_02248A78 +Unk_ov62_02248A78: ; 0x02248A78 + .incbin "incbin/overlay62_rodata.bin", 0x34C, 0x3AC - 0x34C + + .global Unk_ov62_02248AD8 +Unk_ov62_02248AD8: ; 0x02248AD8 + .incbin "incbin/overlay62_rodata.bin", 0x3AC, 0x100 + diff --git a/asm/ov62_02234A10.s b/asm/ov62_02234A10.s new file mode 100644 index 000000000..f713193fc --- /dev/null +++ b/asm/ov62_02234A10.s @@ -0,0 +1,1041 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02234A10 +ov62_02234A10: ; 0x02234A10 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + ldr r4, _02234A88 ; =0x000008A4 + add r5, r0, #0 + add r0, r5, r4 + bl sub_0201A7A0 + mov r0, #0x10 + str r0, [sp] + str r0, [sp, #4] + mov r2, #2 + str r2, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r5, r4 + mov r3, #8 + bl sub_0201A7E8 + add r0, r5, r4 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0xc0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, r4 + add r1, r6, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02234A8C ; =0x00010E00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, r4 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add r0, r5, r4 + bl sub_0201A9A4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_02234A88: .word 0x000008A4 +_02234A8C: .word 0x00010E00 + thumb_func_end ov62_02234A10 + + thumb_func_start ov62_02234A90 +ov62_02234A90: ; 0x02234A90 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02234AB0 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _02234AB0 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + pop {r4, pc} + nop +_02234AB0: .word 0x000008A4 + thumb_func_end ov62_02234A90 + + thumb_func_start ov62_02234AB4 +ov62_02234AB4: ; 0x02234AB4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #6 + bls _02234AC2 + b _02234CB6 +_02234AC2: + add r2, r1, r1 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_02234ACE: ; jump table + .short _02234ADC - _02234ACE - 2 ; case 0 + .short _02234B7E - _02234ACE - 2 ; case 1 + .short _02234BC2 - _02234ACE - 2 ; case 2 + .short _02234C0E - _02234ACE - 2 ; case 3 + .short _02234C32 - _02234ACE - 2 ; case 4 + .short _02234C5A - _02234ACE - 2 ; case 5 + .short _02234C82 - _02234ACE - 2 ; case 6 +_02234ADC: + bl ov62_022300BC + cmp r0, #1 + bne _02234AEE + add r0, r4, #0 + mov r1, #1 + bl ov62_0222FB60 + b _02234CBE +_02234AEE: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + ldr r2, _02234CC4 ; =0x0000FFFE + mov r1, #2 + mov r3, #0x10 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + ldr r2, _02234CC8 ; =0x0000BFFF + mov r1, #0 + mov r3, #0x10 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + ldr r2, _02234CCC ; =0x00003FFE + mov r1, #3 + mov r3, #0x10 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + ldr r2, _02234CD0 ; =0x0000FFFF + mov r1, #1 + mov r3, #0x10 + bl sub_02003A2C + ldr r0, _02234CD4 ; =0x000006F4 + ldr r0, [r4, r0] + bl sub_0208BA30 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0208BA30 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234CBE +_02234B7E: + bl sub_0200F2AC + cmp r0, #0 + bne _02234B88 + b _02234CBE +_02234B88: + ldr r0, _02234CD4 ; =0x000006F4 + mov r1, #0x80 + ldr r0, [r4, r0] + mov r2, #0x10 + bl sub_0208B948 + ldr r0, _02234CD4 ; =0x000006F4 + mov r1, #0x80 + ldr r0, [r4, r0] + mov r2, #0xd8 + bl sub_0208B8B8 + ldr r0, _02234CD4 ; =0x000006F4 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0208B9E0 + ldr r0, _02234CD4 ; =0x000006F4 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0208B8B0 + ldr r0, _02234CD8 ; =0x0000055E + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234CBE +_02234BC2: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0x19 + blt _02234CBE + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x80 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x90 + bl sub_0208B948 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0x60 + bl sub_0208B8B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B8B0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234CBE +_02234C0E: + ldr r1, [r4, #0xc] + add r1, r1, #1 + str r1, [r4, #0xc] + cmp r1, #0x12 + blt _02234CBE + bl ov62_02234A10 + ldr r0, _02234CD4 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + mov r0, #0 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234CBE +_02234C32: + ldr r0, [r4, #0xc] + cmp r0, #0x10 + bge _02234C54 + add r0, r0, #4 + str r0, [r4, #0xc] + ldr r0, _02234CD0 ; =0x0000FFFF + mov r2, #0xf + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsl r2, r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02234CBE +_02234C54: + add r0, r1, #1 + str r0, [r4, #8] + b _02234CBE +_02234C5A: + ldr r0, [r4, #0xc] + cmp r0, #0 + ble _02234C7C + sub r0, r0, #4 + str r0, [r4, #0xc] + ldr r0, _02234CD0 ; =0x0000FFFF + mov r2, #0xf + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsl r2, r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02234CBE +_02234C7C: + add r0, r1, #1 + str r0, [r4, #8] + b _02234CBE +_02234C82: + bl sub_0202278C + cmp r0, #1 + bne _02234CBE + add r0, r4, #0 + bl ov62_02234A90 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, _02234CD4 ; =0x000006F4 + ldr r0, [r4, r0] + bl sub_0208BA54 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0208BA54 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234CBE +_02234CB6: + add r0, r4, #0 + mov r1, #1 + bl ov62_0222FB60 +_02234CBE: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02234CC4: .word 0x0000FFFE +_02234CC8: .word 0x0000BFFF +_02234CCC: .word 0x00003FFE +_02234CD0: .word 0x0000FFFF +_02234CD4: .word 0x000006F4 +_02234CD8: .word 0x0000055E + thumb_func_end ov62_02234AB4 + + thumb_func_start ov62_02234CDC +ov62_02234CDC: ; 0x02234CDC + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _02234CF4 + cmp r1, #1 + beq _02234DC4 + cmp r1, #2 + bne _02234CF2 + b _02234E8A +_02234CF2: + b _02234ECA +_02234CF4: + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02230330 + add r0, r4, #0 + bl ov62_02230464 + add r0, r4, #0 + bl ov62_022306B8 + add r0, r4, #0 + bl ov62_0223088C + add r0, r4, #0 + bl ov62_02230E80 + add r0, r4, #0 + bl ov62_02230A5C + add r0, r4, #0 + bl ov62_02230AF0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022300BC + cmp r0, #1 + bne _02234DB2 + ldr r0, [r4, #0] + cmp r0, #0 + bne _02234D56 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x45 + mov r3, #5 + bl sub_0200710C + b _02234D6E +_02234D56: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x37 + mov r3, #5 + bl sub_0200710C +_02234D6E: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0xe0 + bl sub_0208B948 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0xe0 + bl sub_0208B8B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B8B0 + ldr r1, _02234EE0 ; =0x0000083C + ldr r3, [r4, #0x10] + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #1 + bl ov62_0222FB44 + b _02234ED8 +_02234DB2: + ldr r0, _02234EE4 ; =0x0000055B + bl sub_02005748 + mov r0, #0x10 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234ED8 +_02234DC4: + bl ov62_022300BC + cmp r0, #1 + bne _02234DDE + bl sub_0200F2AC + cmp r0, #1 + beq _02234DD6 + b _02234ED8 +_02234DD6: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234ED8 +_02234DDE: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02234E5A + sub r0, r0, #2 + str r0, [r4, #0xc] + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _02234EE8 ; =0x0000FFFE + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _02234EEC ; =0x0000FFFF + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _02234EF0 ; =0x00003FFE + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _02234EEC ; =0x0000FFFF + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02234ED8 +_02234E5A: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #2 + mov r3, #0x10 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234ED8 +_02234E8A: + ldr r0, [r4, #0] + cmp r0, #0 + bne _02234EAA + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x45 + mov r3, #5 + bl sub_0200710C + b _02234EC2 +_02234EAA: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x37 + mov r3, #5 + bl sub_0200710C +_02234EC2: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234ED8 +_02234ECA: + ldr r1, _02234EF4 ; =0x00000724 + ldr r1, [r4, r1] + cmp r1, #3 + blt _02234ED8 + mov r1, #2 + bl ov62_0222FB60 +_02234ED8: + mov r0, #0 + add sp, #0x10 + pop {r4, pc} + nop +_02234EE0: .word 0x0000083C +_02234EE4: .word 0x0000055B +_02234EE8: .word 0x0000FFFE +_02234EEC: .word 0x0000FFFF +_02234EF0: .word 0x00003FFE +_02234EF4: .word 0x00000724 + thumb_func_end ov62_02234CDC + + thumb_func_start ov62_02234EF8 +ov62_02234EF8: ; 0x02234EF8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _02234F0C + cmp r1, #1 + beq _02234F74 + cmp r1, #2 + beq _02234F94 + b _02234FC0 +_02234F0C: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0x60 + bl sub_0208B948 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0x60 + bl sub_0208B8B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B8B0 + ldr r0, [r4, #0xc] + mov r3, #0x10 + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r5, [r4, #0xc] + ldr r0, [r4, #0x28] + sub r3, r3, r5 + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0xc] + cmp r0, #2 + bne _02234FC6 + mov r0, #0xf + str r0, [r4, #0xc] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234FC6 +_02234F74: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234FC6 +_02234F94: + ldr r0, [r4, #0xc] + mov r1, #1 + sub r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0x58] + mov r2, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _02234FC6 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02234FC6 +_02234FC0: + mov r1, #3 + bl ov62_0222FB60 +_02234FC6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02234EF8 + + thumb_func_start ov62_02234FCC +ov62_02234FCC: ; 0x02234FCC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov62_02235008 + add r4, r0, #0 + ldr r0, _02235004 ; =0x000005FC + add r1, sp, #0 + ldr r0, [r5, r0] + add r1, #2 + add r2, sp, #0 + bl ov62_02230E74 + mov r0, #0x6f + lsl r0, r0, #4 + add r3, sp, #0 + mov r1, #2 + ldrsh r1, [r3, r1] + mov r2, #0 + ldrsh r2, [r3, r2] + add r1, #0x10 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + bl sub_0208B8B8 + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_02235004: .word 0x000005FC + thumb_func_end ov62_02234FCC + + thumb_func_start ov62_02235008 +ov62_02235008: ; 0x02235008 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r0, [r5, #8] + cmp r0, #0 + beq _0223501A + cmp r0, #1 + beq _02235106 + b _022351F6 +_0223501A: + mov r0, #0x66 + mov r1, #0x54 + bl sub_02018144 + mov r1, #0 + mov r2, #0x54 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + add r0, r4, #0 + add r3, r4, #0 + mov r1, #0x10 + add r0, #0x50 + strb r1, [r0] + ldr r0, [r5, #0x58] + add r3, #0x50 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldrb r3, [r3] + ldr r0, [r5, #0x28] + mov r1, #2 + mov r2, #0xc + bl sub_02003A2C + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + ble _022350FE + ldr r0, [sp, #0x14] + mov r7, #0x19 + str r0, [sp, #4] + add r6, r5, #0 +_02235068: + ldr r0, [sp, #4] + mov r2, #0x6e + str r0, [r4, #0] + mov r0, #0x5a + str r0, [r4, #4] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r1, [r5, r0] + mov r0, #5 + sub r0, r0, r1 + lsl r0, r0, #4 + add r0, r7, r0 + strh r0, [r4, #8] + lsl r2, r2, #4 + ldr r3, [r5, r2] + mov r2, #5 + sub r2, r2, r3 + ldr r0, _0223526C ; =0x000005FC + lsl r2, r2, #4 + add r2, #0xa9 + lsl r2, r2, #0x10 + ldr r0, [r6, r0] + mov r1, #0x2a + asr r2, r2, #0x10 + bl ov62_02230E68 + ldr r0, _0223526C ; =0x000005FC + add r1, r4, #0 + ldr r0, [r6, r0] + add r1, #0xc + add r2, sp, #0x20 + bl sub_0200D638 + mov r2, #0x6e + lsl r2, r2, #4 + ldr r3, [r5, r2] + mov r2, #5 + ldr r0, _0223526C ; =0x000005FC + sub r2, r2, r3 + lsl r2, r2, #4 + add r2, #0xa9 + ldr r0, [r6, r0] + ldr r1, [r4, #0xc] + lsl r2, r2, #0xc + bl sub_0200D614 + mov r0, #0x61 + lsl r0, r0, #4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r6, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r6, r0] + mov r1, #1 + bl sub_020129D0 + ldr r0, [sp, #4] + add r4, #0x10 + add r0, r0, #4 + str r0, [sp, #4] + ldr r0, [sp, #0x14] + add r7, #0x24 + add r0, r0, #1 + str r0, [sp, #0x14] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r1, [r5, r0] + ldr r0, [sp, #0x14] + add r6, #0x28 + cmp r0, r1 + blt _02235068 +_022350FE: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02235266 +_02235106: + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + cmp r0, #0 + beq _0223513C + add r0, r4, #0 + add r0, #0x50 + ldrb r0, [r0] + add r3, r4, #0 + add r3, #0x50 + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x50 + strb r1, [r0] + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldrb r3, [r3] + ldr r0, [r5, #0x28] + mov r2, #0xc + bl sub_02003A2C +_0223513C: + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r1, [r5, r0] + cmp r1, #0 + ble _022351E8 + add r6, r5, #0 + add r7, sp, #0x18 +_02235150: + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223515C + sub r0, r0, #1 + str r0, [r4, #0] + b _022351D2 +_0223515C: + ldr r0, _0223526C ; =0x000005FC + add r1, sp, #0x1c + ldr r0, [r6, r0] + add r1, #2 + add r2, sp, #0x1c + bl ov62_02230E74 + mov r0, #8 + mov r1, #4 + ldrsh r0, [r4, r0] + ldrsh r2, [r7, r1] + cmp r2, r0 + bne _0223517E + ldr r0, [sp, #0xc] + add r0, r0, #1 + str r0, [sp, #0xc] + b _022351D2 +_0223517E: + add r1, r2, #0 + sub r1, #8 + cmp r1, r0 + ble _0223518C + sub r2, #8 + strh r2, [r7, #4] + b _0223518E +_0223518C: + strh r0, [r7, #4] +_0223518E: + mov r0, #4 + ldrsh r0, [r7, r0] + ldr r1, [r4, #4] + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, _02235270 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + lsl r1, r0, #4 + ldr r0, [r4, #4] + ldr r2, [r4, #0xc] + sub r0, r0, #4 + str r0, [r4, #4] + ldr r0, _0223526C ; =0x000005FC + add r1, r2, r1 + ldr r0, [r6, r0] + ldr r2, [sp, #8] + bl sub_0200D614 + mov r0, #0x61 + lsl r0, r0, #4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r6, r0] + sub r2, #0x2c + bl sub_020128C4 +_022351D2: + ldr r0, [sp, #0x10] + add r4, #0x10 + add r0, r0, #1 + str r0, [sp, #0x10] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r1, [r5, r0] + ldr r0, [sp, #0x10] + add r6, #0x28 + cmp r0, r1 + blt _02235150 +_022351E8: + ldr r0, [sp, #0xc] + cmp r0, r1 + bne _02235266 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02235266 +_022351F6: + ldr r1, _02235274 ; =0x000006E4 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r2, [r5, r1] + ldr r4, [r5, r0] + mov r0, #0x28 + mul r0, r2 + add r0, r5, r0 + sub r1, #0xe8 + ldr r0, [r0, r1] + add r1, sp, #0x18 + add r1, #2 + add r2, sp, #0x18 + bl ov62_02230E74 + mov r0, #0x6f + lsl r0, r0, #4 + add r2, sp, #0x18 + mov r1, #2 + ldrsh r1, [r2, r1] + mov r3, #0 + ldrsh r2, [r2, r3] + add r1, #0x10 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + bl sub_0208B948 + mov r0, #0x6f + lsl r0, r0, #4 + add r2, sp, #0x18 + mov r1, #2 + ldrsh r1, [r2, r1] + mov r3, #0 + ldrsh r2, [r2, r3] + add r1, #0x10 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + bl sub_0208B8B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r5, #0 + bl ov62_0222FF7C + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02235266: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223526C: .word 0x000005FC +_02235270: .word 0x0000FFFF +_02235274: .word 0x000006E4 + thumb_func_end ov62_02235008 + + .rodata + + + .global Unk_ov62_02248BD8 +Unk_ov62_02248BD8: ; 0x02248BD8 + .incbin "incbin/overlay62_rodata.bin", 0x4AC, 0x10 + diff --git a/asm/ov62_02235278.s b/asm/ov62_02235278.s new file mode 100644 index 000000000..84363caea --- /dev/null +++ b/asm/ov62_02235278.s @@ -0,0 +1,1536 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02235278 +ov62_02235278: ; 0x02235278 + push {r4, lr} + add r4, r0, #0 + bl sub_02022798 + cmp r0, #0 + beq _02235292 + ldr r0, _022352D4 ; =0x0000089C + ldr r0, [r4, r0] + cmp r0, #0 + bne _02235292 + add r0, r4, #0 + bl ov62_02231A1C +_02235292: + ldr r0, [r4, #0] + cmp r0, #0 + bne _022352CA + bl ov62_022352DC + cmp r0, #1 + beq _022352A6 + cmp r0, #2 + beq _022352B8 + b _022352CA +_022352A6: + ldr r0, _022352D8 ; =0x00000563 + bl sub_02005748 + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 + mov r0, #0 + pop {r4, pc} +_022352B8: + ldr r0, _022352D8 ; =0x00000563 + bl sub_02005748 + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 + mov r0, #0 + pop {r4, pc} +_022352CA: + add r0, r4, #0 + bl ov62_02230054 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_022352D4: .word 0x0000089C +_022352D8: .word 0x00000563 + thumb_func_end ov62_02235278 + + thumb_func_start ov62_022352DC +ov62_022352DC: ; 0x022352DC + push {r3, lr} + ldr r0, _02235300 ; =0x02248BE8 + bl sub_02022734 + cmp r0, #0 + beq _022352EC + mov r0, #1 + pop {r3, pc} +_022352EC: + ldr r0, _02235304 ; =0x02248BEC + bl sub_02022734 + cmp r0, #0 + beq _022352FA + mov r0, #2 + pop {r3, pc} +_022352FA: + mov r0, #0 + pop {r3, pc} + nop +_02235300: .word 0x02248BE8 +_02235304: .word 0x02248BEC + thumb_func_end ov62_022352DC + + thumb_func_start ov62_02235308 +ov62_02235308: ; 0x02235308 + push {r4, lr} + add r4, r0, #0 + bl sub_02022974 + mov r0, #1 + str r0, [r4, #0x44] + add r0, r4, #0 + mov r1, #0 + bl ov62_0222FB60 + add r0, r4, #0 + bl ov62_02235278 + pop {r4, pc} + thumb_func_end ov62_02235308 + + thumb_func_start ov62_02235324 +ov62_02235324: ; 0x02235324 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _0223533A + cmp r1, #1 + beq _02235364 + cmp r1, #2 + beq _022353EA + b _02235416 +_0223533A: + mov r1, #0 + str r1, [r4, #0x54] + mov r0, #0x6f + str r1, [r4, #0xc] + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0208B9E0 + ldr r0, _02235434 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223542C +_02235364: + ldr r1, [r4, #0xc] + cmp r1, #0x10 + beq _022353DE + add r1, r1, #2 + str r1, [r4, #0xc] + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _02235438 ; =0x0000FFFE + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _0223543C ; =0x0000FFFF + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _02235440 ; =0x00003FFE + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022316D0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0xc] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + ldr r2, _0223543C ; =0x0000FFFF + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223542C +_022353DE: + mov r0, #0x10 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223542C +_022353EA: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _022353F6 + sub r0, r0, #4 + str r0, [r4, #0xc] + b _0223542C +_022353F6: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223542C +_02235416: + bl sub_0200F2AC + cmp r0, #1 + bne _0223542C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add sp, #0xc + mov r0, #1 + pop {r3, r4, pc} +_0223542C: + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + nop +_02235434: .word 0x000006F4 +_02235438: .word 0x0000FFFE +_0223543C: .word 0x0000FFFF +_02235440: .word 0x00003FFE + thumb_func_end ov62_02235324 + + thumb_func_start ov62_02235444 +ov62_02235444: ; 0x02235444 + push {r4, lr} + add r4, r0, #0 + bl ov62_02235008 + cmp r0, #0 + beq _02235474 + ldr r0, [r4, #0x44] + cmp r0, #1 + bne _0223546C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r4, #0 + mov r1, #0 + bl ov62_0222FB60 + b _02235474 +_0223546C: + add r0, r4, #0 + mov r1, #1 + bl ov62_0222FB60 +_02235474: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02235444 + + thumb_func_start ov62_02235478 +ov62_02235478: ; 0x02235478 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x44] + cmp r1, #1 + bne _02235498 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r4, #0 + mov r1, #0 + bl ov62_0222FB60 + b _0223549E +_02235498: + mov r1, #1 + bl ov62_0222FB60 +_0223549E: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02235478 + + thumb_func_start ov62_022354A4 +ov62_022354A4: ; 0x022354A4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrb r0, [r4, #0x1d] + cmp r0, #0 + beq _022354B6 + cmp r0, #1 + beq _022354E0 + b _02235570 +_022354B6: + mov r0, #4 + ldrsh r1, [r4, r0] + mov r0, #0 + ldrsh r0, [r4, r0] + sub r0, r1, r0 + ldrb r1, [r4, #0x1c] + bl sub_020E1F6C + strh r0, [r4, #8] + mov r0, #6 + ldrsh r1, [r4, r0] + mov r0, #2 + ldrsh r0, [r4, r0] + sub r0, r1, r0 + ldrb r1, [r4, #0x1c] + bl sub_020E1F6C + strh r0, [r4, #0xa] + ldrb r0, [r4, #0x1d] + add r0, r0, #1 + strb r0, [r4, #0x1d] +_022354E0: + add r1, sp, #0 + ldr r0, [r4, #0x20] + add r1, #2 + add r2, sp, #0 + bl ov62_02230E74 + ldrb r0, [r4, #0x1c] + add r1, sp, #0 + sub r0, r0, #1 + strb r0, [r4, #0x1c] + ldrb r0, [r4, #0x1c] + cmp r0, #0 + bne _0223550E + mov r0, #4 + ldrsh r0, [r4, r0] + strh r0, [r1, #2] + mov r0, #6 + ldrsh r0, [r4, r0] + strh r0, [r1] + ldrb r0, [r4, #0x1d] + add r0, r0, #1 + strb r0, [r4, #0x1d] + b _02235526 +_0223550E: + mov r0, #2 + ldrsh r2, [r1, r0] + mov r0, #8 + ldrsh r0, [r4, r0] + add r0, r2, r0 + strh r0, [r1, #2] + mov r0, #0 + ldrsh r2, [r1, r0] + mov r0, #0xa + ldrsh r0, [r4, r0] + add r0, r2, r0 + strh r0, [r1] +_02235526: + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _0223554C + add r3, sp, #0 + mov r1, #2 + ldrsh r1, [r3, r1] + mov r2, #0 + ldrsh r2, [r3, r2] + add r1, #0x10 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + bl sub_0208B8B8 + ldrb r0, [r4, #0x1c] + cmp r0, #2 + bne _0223554C + ldr r0, [r4, #0x30] + mov r1, #1 + str r1, [r0, #0] +_0223554C: + add r3, sp, #0 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r4, #0x20] + bl ov62_02230E68 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x24] + sub r2, #0x2c + bl sub_020128C4 + ldr r0, [r4, #0x2c] + mov r1, #1 + str r1, [r0, #0] + pop {r3, r4, r5, pc} +_02235570: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_022354A4 + + thumb_func_start ov62_02235580 +ov62_02235580: ; 0x02235580 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _02235598 + cmp r1, #1 + beq _02235676 + cmp r1, #2 + bne _02235596 + b _02235800 +_02235596: + b _02235830 +_02235598: + mov r0, #0x66 + mov r1, #0x10 + bl sub_02018144 + str r0, [sp, #4] + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + mov r1, #0x86 + ldr r0, [sp, #4] + lsl r1, r1, #4 + str r0, [r4, r1] + mov r7, #0 + str r7, [r0, #8] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + ble _02235668 + ldr r0, [sp, #4] + add r6, r4, #0 + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #4] + str r0, [sp, #0x10] + add r0, #0xc + str r0, [sp, #0x10] +_022355D0: + mov r0, #0x66 + mov r1, #0x34 + bl sub_02018144 + mov r1, #0 + mov r2, #0x34 + add r5, r0, #0 + bl sub_020D5124 + ldr r0, _02235838 ; =0x000005FC + add r1, r5, #0 + ldr r0, [r6, r0] + add r2, r5, #2 + bl ov62_02230E74 + ldr r0, _02235838 ; =0x000005FC + ldr r0, [r6, r0] + str r0, [r5, #0x20] + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r6, r0] + str r0, [r5, #0x24] + ldr r0, [sp, #0xc] + str r0, [r5, #0x2c] + ldr r0, [sp, #0x10] + str r0, [r5, #0x30] + ldr r0, _0223583C ; =0x000006E4 + ldr r0, [r4, r0] + cmp r7, r0 + bne _02235626 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + str r0, [r5, #0x28] + mov r0, #0 + ldrsh r0, [r5, r0] + strh r0, [r5, #4] + mov r0, #0x2f + mvn r0, r0 + strh r0, [r5, #6] + mov r0, #8 + strb r0, [r5, #0x1c] + b _0223564E +_02235626: + mov r0, #0 + str r0, [r5, #0x28] + ldrsh r0, [r5, r0] + strh r0, [r5, #4] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r1, [r4, r0] + mov r0, #5 + sub r0, r0, r1 + lsl r0, r0, #4 + add r0, #0xcd + strh r0, [r5, #6] + mov r0, #6 + ldrsh r0, [r5, r0] + cmp r0, #0xdd + blt _0223564A + mov r0, #0xdd + strh r0, [r5, #6] +_0223564A: + mov r0, #8 + strb r0, [r5, #0x1c] +_0223564E: + mov r2, #2 + ldr r0, _02235840 ; =ov62_022354A4 + add r1, r5, #0 + lsl r2, r2, #0xc + bl sub_0200D9E8 + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r7, r7, #1 + add r6, #0x28 + cmp r7, r0 + blt _022355D0 +_02235668: + ldr r0, [sp, #4] + mov r1, #0 + str r1, [r0, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235830 +_02235676: + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r4, r0] + str r0, [sp, #8] + ldr r0, [r0, #0] + cmp r0, #0x10 + beq _022356A4 + add r1, r0, #2 + ldr r0, [sp, #8] + ldr r3, [sp, #8] + str r1, [r0, #0] + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r3, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_022356A4: + ldr r0, [sp, #8] + ldr r0, [r0, #0xc] + cmp r0, #1 + beq _022356AE + b _022357B8 +_022356AE: + ldr r0, [sp, #8] + mov r7, #0 + ldr r0, [r0, #8] + cmp r0, #0 + bne _022357AE + ldr r0, [sp, #8] + mov r1, #1 + str r1, [r0, #8] + ldr r0, _02235844 ; =0x00000534 + add r6, r4, #0 + add r0, r4, r0 + str r0, [sp, #0x18] + ldr r0, [sp, #8] + add r0, r0, #4 + str r0, [sp, #0x14] +_022356CC: + mov r0, #0x66 + mov r1, #0x34 + bl sub_02018144 + mov r1, #0 + mov r2, #0x34 + add r5, r0, #0 + bl sub_020D5124 + ldr r0, _02235844 ; =0x00000534 + add r1, r5, #0 + ldr r0, [r6, r0] + add r2, r5, #2 + bl ov62_02230E74 + ldr r0, _02235844 ; =0x00000534 + ldr r0, [r6, r0] + str r0, [r5, #0x20] + ldr r0, _02235848 ; =0x00000548 + ldr r0, [r6, r0] + str r0, [r5, #0x24] + ldr r0, [sp, #0x14] + str r0, [r5, #0x2c] + mov r0, #0 + str r0, [r5, #0x28] + ldrsh r0, [r5, r0] + strh r0, [r5, #4] + ldr r0, _0223584C ; =0x000006D8 + ldr r0, [r4, r0] + cmp r0, r7 + bne _02235774 + mov r0, #0 + ldrsh r0, [r5, r0] + ldr r1, _02235850 ; =0x00000818 + strh r0, [r5, #4] + mov r0, #0xa9 + strh r0, [r5, #6] + ldr r3, [r4, r1] + ldr r1, _0223583C ; =0x000006E4 + ldr r0, _02235844 ; =0x00000534 + ldr r2, [r4, r1] + mov r1, #0x24 + mul r1, r2 + add r1, r3, r1 + ldr r0, [r6, r0] + ldr r1, [r1, #0xc] + bl sub_0200D364 + ldr r0, _0223583C ; =0x000006E4 + mov r2, #0x28 + ldr r1, [r4, r0] + mov r0, #0x24 + add r3, r1, #0 + ldr r1, _0223584C ; =0x000006D8 + mul r3, r0 + ldr r0, _02235850 ; =0x00000818 + ldr r1, [r4, r1] + ldr r0, [r4, r0] + mul r2, r1 + ldr r1, [sp, #0x18] + mov ip, r0 + add r1, r1, r2 + mov r2, ip + add r3, r2, r3 + ldr r2, [r3, #8] + add r0, r4, #0 + bl ov62_02230FC8 + ldr r0, _0223584C ; =0x000006D8 + ldr r1, [r4, r0] + mov r0, #0x28 + mul r0, r1 + add r1, r4, r0 + ldr r0, _02235848 ; =0x00000548 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_020129D0 + ldr r0, _02235844 ; =0x00000534 + mov r1, #1 + ldr r0, [r6, r0] + bl sub_0200D3F4 + b _02235792 +_02235774: + mov r0, #0 + ldrsh r0, [r5, r0] + mov r1, #4 + sub r0, r0, #4 + strh r0, [r5, #4] + ldr r0, _0223584C ; =0x000006D8 + ldr r0, [r4, r0] + sub r2, r0, r7 + lsl r0, r2, #4 + sub r2, r1, r2 + mov r1, #0x24 + mul r1, r2 + add r1, #0x19 + add r0, r0, r1 + strh r0, [r5, #6] +_02235792: + mov r0, #4 + strb r0, [r5, #0x1c] + mov r2, #2 + ldr r0, _02235840 ; =ov62_022354A4 + add r1, r5, #0 + lsl r2, r2, #0xc + bl sub_0200D9E8 + ldr r0, _0223584C ; =0x000006D8 + add r7, r7, #1 + ldr r0, [r4, r0] + add r6, #0x28 + cmp r7, r0 + ble _022356CC +_022357AE: + ldr r0, [sp, #8] + ldr r1, [r0, #0xc] + str r1, [r0, #4] + mov r1, #0 + str r1, [r0, #0xc] +_022357B8: + ldr r0, _0223584C ; =0x000006D8 + mov r5, #0 + ldr r0, [r4, r0] + cmp r0, #0 + ble _022357EA + ldr r7, _02235844 ; =0x00000534 + add r6, r4, #0 +_022357C6: + cmp r5, r0 + bne _022357D4 + ldr r0, [r6, r7] + mov r1, #1 + bl sub_0200D430 + b _022357DE +_022357D4: + ldr r0, _02235844 ; =0x00000534 + mov r1, #2 + ldr r0, [r6, r0] + bl sub_0200D430 +_022357DE: + ldr r0, _0223584C ; =0x000006D8 + add r5, r5, #1 + ldr r0, [r4, r0] + add r6, #0x28 + cmp r5, r0 + blt _022357C6 +_022357EA: + ldr r0, [sp, #8] + ldr r0, [r0, #4] + cmp r0, #0 + bne _022357F8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022357F8: + ldr r0, [sp, #8] + mov r1, #0 + str r1, [r0, #4] + b _02235830 +_02235800: + ldr r1, _02235850 ; =0x00000818 + ldr r3, [r4, r1] + ldr r1, _0223583C ; =0x000006E4 + ldr r2, [r4, r1] + mov r1, #0x24 + mul r1, r2 + add r1, r3, r1 + ldr r1, [r1, #0x20] + cmp r1, #0 + bne _0223581A + bl ov62_0222FC1C + b _02235820 +_0223581A: + mov r1, #5 + bl ov62_0222FB60 +_02235820: + add r0, r4, #0 + bl ov62_0222FB90 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 +_02235830: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02235838: .word 0x000005FC +_0223583C: .word 0x000006E4 +_02235840: .word ov62_022354A4 +_02235844: .word 0x00000534 +_02235848: .word 0x00000548 +_0223584C: .word 0x000006D8 +_02235850: .word 0x00000818 + thumb_func_end ov62_02235580 + + thumb_func_start ov62_02235854 +ov62_02235854: ; 0x02235854 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223586C + cmp r1, #1 + beq _0223592E + cmp r1, #2 + bne _0223586A + b _02235A14 +_0223586A: + b _02235A4E +_0223586C: + mov r0, #0x66 + mov r1, #0x10 + bl sub_02018144 + str r0, [sp, #8] + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + mov r1, #0x86 + ldr r0, [sp, #8] + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + mov r6, #0 + add r0, #0xc + add r7, r5, #0 + str r0, [sp, #8] +_02235894: + mov r0, #0x66 + mov r1, #0x34 + bl sub_02018144 + mov r1, #0 + mov r2, #0x34 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _02235A6C ; =0x00000534 + add r1, r4, #0 + ldr r0, [r7, r0] + add r2, r4, #2 + bl ov62_02230E74 + ldr r0, _02235A6C ; =0x00000534 + ldr r0, [r7, r0] + str r0, [r4, #0x20] + ldr r0, _02235A70 ; =0x00000548 + ldr r0, [r7, r0] + str r0, [r4, #0x24] + ldr r0, [sp, #0xc] + str r0, [r4, #0x2c] + ldr r0, [sp, #8] + str r0, [r4, #0x30] + mov r0, #0 + str r0, [r4, #0x28] + ldrsh r0, [r4, r0] + strh r0, [r4, #4] + ldr r0, _02235A74 ; =0x000006D8 + ldr r0, [r5, r0] + sub r0, r0, #1 + cmp r0, r6 + bne _022358EA + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + str r0, [r4, #0x28] + mov r0, #0 + ldrsh r0, [r4, r0] + strh r0, [r4, #4] + mov r0, #0xd9 + b _02235906 +_022358EA: + mov r0, #0 + ldrsh r0, [r4, r0] + mov r1, #0x24 + add r0, r0, #4 + strh r0, [r4, #4] + ldr r0, _02235A74 ; =0x000006D8 + ldr r0, [r5, r0] + sub r2, r0, r6 + mov r0, #5 + sub r0, r0, r2 + mul r1, r0 + add r1, #0x1d + lsl r0, r2, #4 + add r0, r1, r0 +_02235906: + strh r0, [r4, #6] + mov r0, #4 + strb r0, [r4, #0x1c] + mov r2, #2 + ldr r0, _02235A78 ; =ov62_022354A4 + add r1, r4, #0 + lsl r2, r2, #0xc + bl sub_0200D9E8 + ldr r0, _02235A74 ; =0x000006D8 + add r6, r6, #1 + ldr r0, [r5, r0] + add r7, #0x28 + sub r0, r0, #1 + cmp r6, r0 + ble _02235894 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02235A64 +_0223592E: + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r5, r0] + str r0, [sp, #4] + ldr r0, [r0, #0xc] + cmp r0, #1 + bne _02235A12 + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r7, #0 + cmp r0, #0 + ble _022359CE + ldr r0, [sp, #4] + add r6, r5, #0 + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + str r0, [sp, #0x14] + add r0, #0xc + str r0, [sp, #0x14] +_02235958: + mov r0, #0x66 + mov r1, #0x34 + bl sub_02018144 + mov r1, #0 + mov r2, #0x34 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _02235A7C ; =0x000005FC + add r1, r4, #0 + ldr r0, [r6, r0] + add r2, r4, #2 + bl ov62_02230E74 + ldr r0, _02235A7C ; =0x000005FC + ldr r0, [r6, r0] + str r0, [r4, #0x20] + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r6, r0] + str r0, [r4, #0x24] + ldr r0, [sp, #0x10] + str r0, [r4, #0x2c] + ldr r0, [sp, #0x14] + str r0, [r4, #0x30] + mov r0, #0 + str r0, [r4, #0x28] + ldrsh r0, [r4, r0] + strh r0, [r4, #4] + mov r0, #0x6e + lsl r0, r0, #4 + ldr r1, [r5, r0] + mov r0, #5 + sub r0, r0, r1 + lsl r0, r0, #4 + add r0, #0xcd + strh r0, [r4, #6] + mov r0, #6 + ldrsh r0, [r4, r0] + cmp r0, #0xdd + blt _022359B0 + mov r0, #0xdd + strh r0, [r4, #6] +_022359B0: + mov r0, #8 + strb r0, [r4, #0x1c] + mov r2, #2 + ldr r0, _02235A78 ; =ov62_022354A4 + add r1, r4, #0 + lsl r2, r2, #0xc + bl sub_0200D9E8 + mov r0, #0x6e + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r7, r7, #1 + add r6, #0x28 + cmp r7, r0 + blt _02235958 +_022359CE: + ldr r0, [sp, #4] + mov r4, #0 + str r4, [r0, #0] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + ldr r0, _02235A74 ; =0x000006D8 + ldr r1, [r5, r0] + sub r1, r1, #1 + str r1, [r5, r0] + ldr r0, [r5, r0] + cmp r0, #0 + ble _02235A64 + ldr r7, _02235A6C ; =0x00000534 + add r6, r5, #0 +_022359EC: + sub r0, r0, #1 + cmp r4, r0 + bne _022359FC + ldr r0, [r6, r7] + mov r1, #1 + bl sub_0200D430 + b _02235A06 +_022359FC: + ldr r0, _02235A6C ; =0x00000534 + mov r1, #2 + ldr r0, [r6, r0] + bl sub_0200D430 +_02235A06: + ldr r0, _02235A74 ; =0x000006D8 + add r4, r4, #1 + ldr r0, [r5, r0] + add r6, #0x28 + cmp r4, r0 + blt _022359EC +_02235A12: + b _02235A64 +_02235A14: + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r4, #0] + cmp r0, #0x10 + beq _02235A3C + add r0, r0, #2 + str r0, [r4, #0] + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_02235A3C: + ldr r0, [r4, #4] + cmp r0, #0 + bne _02235A48 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02235A48: + mov r0, #0 + str r0, [r4, #4] + b _02235A64 +_02235A4E: + bl ov62_0222FBF8 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_020181C4 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 +_02235A64: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02235A6C: .word 0x00000534 +_02235A70: .word 0x00000548 +_02235A74: .word 0x000006D8 +_02235A78: .word ov62_022354A4 +_02235A7C: .word 0x000005FC + thumb_func_end ov62_02235854 + + thumb_func_start ov62_02235A80 +ov62_02235A80: ; 0x02235A80 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #4 + bls _02235A8E + b _02235C5C +_02235A8E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02235A9A: ; jump table + .short _02235AA4 - _02235A9A - 2 ; case 0 + .short _02235AD4 - _02235A9A - 2 ; case 1 + .short _02235B4A - _02235A9A - 2 ; case 2 + .short _02235BCE - _02235A9A - 2 ; case 3 + .short _02235BE6 - _02235A9A - 2 ; case 4 +_02235AA4: + mov r0, #0 + str r0, [r4, #0x54] + add r0, r4, #0 + add r0, #0x5c + ldrb r0, [r0] + cmp r0, #0 + beq _02235ABC + add r0, r4, #0 + add r0, #0x5c + ldrb r0, [r0] + sub r1, r0, #1 + b _02235ABE +_02235ABC: + mov r1, #6 +_02235ABE: + add r0, r4, #0 + add r0, #0x5c + strb r1, [r0] + add r0, r4, #0 + bl ov62_022316A0 + str r0, [r4, #0x58] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235C64 +_02235AD4: + add r0, r4, #0 + add r0, #0x54 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02235AE8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02235AE8: + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02235C64 +_02235B4A: + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF74 + add r1, r4, #0 + add r1, #0x5c + ldrb r1, [r1] + add r0, r4, #0 + bl ov62_022317CC + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235C64 +_02235BCE: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235C64 +_02235BE6: + add r0, r4, #0 + add r0, #0x54 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02235BFA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02235BFA: + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235C6C ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02235C64 +_02235C5C: + add r0, r4, #0 + mov r1, #0 + bl ov62_0222FB60 +_02235C64: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + nop +_02235C6C: .word 0x0000FFFF + thumb_func_end ov62_02235A80 + + thumb_func_start ov62_02235C70 +ov62_02235C70: ; 0x02235C70 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #4 + bls _02235C7E + b _02235E50 +_02235C7E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02235C8A: ; jump table + .short _02235C94 - _02235C8A - 2 ; case 0 + .short _02235CC8 - _02235C8A - 2 ; case 1 + .short _02235D3E - _02235C8A - 2 ; case 2 + .short _02235DC2 - _02235C8A - 2 ; case 3 + .short _02235DDA - _02235C8A - 2 ; case 4 +_02235C94: + mov r0, #0 + str r0, [r4, #0x54] + add r0, r4, #0 + add r0, #0x5c + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x5c + strb r1, [r0] + add r0, r4, #0 + add r0, #0x5c + ldrb r0, [r0] + mov r1, #7 + bl sub_020E1F6C + add r0, r4, #0 + add r0, #0x5c + strb r1, [r0] + add r0, r4, #0 + bl ov62_022316A0 + str r0, [r4, #0x58] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235E5A +_02235CC8: + add r0, r4, #0 + add r0, #0x54 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02235CDC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02235CDC: + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02235E5A +_02235D3E: + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF74 + add r1, r4, #0 + add r1, #0x5c + ldrb r1, [r1] + add r0, r4, #0 + bl ov62_022317CC + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235E5A +_02235DC2: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02235E5A +_02235DDA: + add r0, r4, #0 + add r0, #0x54 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02235DEE + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02235DEE: + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #0 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02235E60 ; =0x0000FFFF + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #0x54] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02235E5A +_02235E50: + mov r1, #0 + add r0, r4, #0 + str r1, [r4, #0x54] + bl ov62_0222FB60 +_02235E5A: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02235E60: .word 0x0000FFFF + thumb_func_end ov62_02235C70 + + .rodata + + + .global Unk_ov62_02248BE8 +Unk_ov62_02248BE8: ; 0x02248BE8 + .incbin "incbin/overlay62_rodata.bin", 0x4BC, 0x4C4 - 0x4BC + + .global Unk_ov62_02248BF0 +Unk_ov62_02248BF0: ; 0x02248BF0 + .incbin "incbin/overlay62_rodata.bin", 0x4C4, 0x24 + diff --git a/asm/ov62_02235E64.s b/asm/ov62_02235E64.s new file mode 100644 index 000000000..b35103c93 --- /dev/null +++ b/asm/ov62_02235E64.s @@ -0,0 +1,1773 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02235E64 +ov62_02235E64: ; 0x02235E64 + push {r3, r4, r5, lr} + mov r1, #0x67 + add r5, r0, #0 + mov r0, #0x66 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x67 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02235E64 + + thumb_func_start ov62_02235EBC +ov62_02235EBC: ; 0x02235EBC + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02235ED4 + cmp r1, #1 + beq _02235F32 + b _02235FBE +_02235ED4: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02235EE8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02235EE8: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223603C +_02235F32: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + add r1, r0, #0 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #2 + bl sub_02019060 + mov r0, #4 + mov r1, #0 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #1 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223603C +_02235FBE: + mov r1, #0 + bl ov62_0223376C + add r0, r5, #0 + bl ov62_022300BC + cmp r0, #1 + bne _02236034 + ldr r0, _02236044 ; =0x0000086C + mov r6, #0 + ldr r1, [r5, r0] + cmp r1, #0 + bne _02235FDC + mov r6, #1 + b _02236006 +_02235FDC: + lsl r1, r1, #2 + add r1, r5, r1 + add r0, #0x10 + ldr r0, [r1, r0] + mov r1, #5 + add r2, r6, #0 + bl sub_0202FE98 + mov r3, #0 + mov r2, #1 + eor r1, r3 + eor r0, r2 + orr r0, r1 + bne _02235FFC + mov r6, #1 + b _02236006 +_02235FFC: + ldr r0, _02236048 ; =0x00000874 + ldr r0, [r5, r0] + cmp r0, #1 + bne _02236006 + mov r6, #1 +_02236006: + cmp r6, #0 + beq _02236022 + add r0, r5, #0 + bl ov62_02236C20 + mov r0, #0x66 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #9 + bl ov62_0222FB60 + b _0223603C +_02236022: + mov r0, #0x66 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #6 + bl ov62_0222FB60 + b _0223603C +_02236034: + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_0223603C: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02236044: .word 0x0000086C +_02236048: .word 0x00000874 + thumb_func_end ov62_02235EBC + + thumb_func_start ov62_0223604C +ov62_0223604C: ; 0x0223604C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _0223605E + b _02236160 +_0223605E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223606A: ; jump table + .short _02236072 - _0223606A - 2 ; case 0 + .short _02236088 - _0223606A - 2 ; case 1 + .short _022360AA - _0223606A - 2 ; case 2 + .short _02236106 - _0223606A - 2 ; case 3 +_02236072: + bl ov62_02236C20 + add r0, r4, #0 + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236168 +_02236088: + bl ov62_02236B2C + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223616C ; =0x02248C1C + ldr r2, _02236170 ; =ov62_02236AB0 + mov r1, #3 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x5d + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236168 +_022360AA: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + add r0, #0x9c + add r1, r4, #0 + bl ov62_02234214 + add r0, r5, #0 + add r0, #0x9c + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + add r5, #0x9c + add r0, r5, #0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236168 +_02236106: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02236146 + add r0, r5, #0 + add r0, #0x9c + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02236B64 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02236146: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02236168 +_02236160: + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_02236168: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223616C: .word 0x02248C1C +_02236170: .word ov62_02236AB0 + thumb_func_end ov62_0223604C + + thumb_func_start ov62_02236174 +ov62_02236174: ; 0x02236174 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_02236174 + + thumb_func_start ov62_0223618C +ov62_0223618C: ; 0x0223618C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #3 + bhi _0223629A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022361A8: ; jump table + .short _022361B0 - _022361A8 - 2 ; case 0 + .short _022361DC - _022361A8 - 2 ; case 1 + .short _022361F4 - _022361A8 - 2 ; case 2 + .short _02236256 - _022361A8 - 2 ; case 3 +_022361B0: + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022361C2 + add r4, #0x9c + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02234228 + b _022361CC +_022361C2: + add r4, #0x10 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02232394 +_022361CC: + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022362B2 +_022361DC: + mov r2, #1 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022362B2 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022362B2 +_022361F4: + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _02236220 + add r0, r4, #0 + add r0, #0x10 + add r1, r5, #0 + bl ov62_02232378 + add r4, #0x10 + add r0, r4, #0 + mov r1, #0 + bl ov62_022323B8 + add r0, r5, #0 + mov r1, #0x50 + mov r2, #3 + bl ov62_022343B8 + b _02236246 +_02236220: + add r0, r4, #0 + add r0, #0x9c + add r1, r5, #0 + bl ov62_02234214 + add r0, r4, #0 + add r0, #0x9c + mov r1, #0 + bl ov62_0223427C + add r4, #0x9c + add r0, r4, #0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r5, #0 + mov r2, #3 + bl ov62_022343B8 +_02236246: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022362B2 +_02236256: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _022362B2 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _02236278 + add r4, #0x10 + add r0, r4, #0 + mov r1, #1 + bl ov62_022323B8 + b _02236282 +_02236278: + add r4, #0x9c + add r0, r4, #0 + mov r1, #1 + bl ov62_0223427C +_02236282: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022362B2 +_0223629A: + ldr r1, [r4, #0xc] + mov r0, #1 + eor r1, r0 + str r1, [r4, #0xc] + add r0, r5, #0 + add r1, #0x79 + bl ov62_02236BC8 + add r0, r5, #0 + mov r1, #3 + bl ov62_0222FB60 +_022362B2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223618C + + thumb_func_start ov62_022362B8 +ov62_022362B8: ; 0x022362B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + mov r6, #0x5e + ldr r4, [r5, r0] + lsl r6, r6, #2 + add r0, r4, r6 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r3, #4 + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x82 + bl sub_0200B1EC + add r7, r0, #0 + add r0, r4, r6 + add r1, r7, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02236394 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add r6, #0x10 + add r0, r4, r6 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x15 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r3, #0x12 + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x83 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, r6 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02236394 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02236394: .word 0x000F0D00 + thumb_func_end ov62_022362B8 + + thumb_func_start ov62_02236398 +ov62_02236398: ; 0x02236398 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x5e + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + mov r0, #0x5e + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #0x62 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + mov r0, #0x62 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02236398 + + thumb_func_start ov62_022363CC +ov62_022363CC: ; 0x022363CC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r2, [r4, #8] + ldr r5, [r4, r1] + cmp r2, #7 + bls _022363E0 + b _022365EA +_022363E0: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022363EC: ; jump table + .short _022363FC - _022363EC - 2 ; case 0 + .short _02236458 - _022363EC - 2 ; case 1 + .short _022364A8 - _022363EC - 2 ; case 2 + .short _022364E6 - _022363EC - 2 ; case 3 + .short _02236530 - _022363EC - 2 ; case 4 + .short _0223658E - _022363EC - 2 ; case 5 + .short _0223659E - _022363EC - 2 ; case 6 + .short _022365B0 - _022363EC - 2 ; case 7 +_022363FC: + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _02236430 + add r0, r5, #0 + add r0, #0x9c + add r1, r4, #0 + bl ov62_02234228 + b _0223643A +_02236430: + add r0, r5, #0 + add r0, #0x10 + add r1, r4, #0 + bl ov62_02232394 +_0223643A: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02236BA8 + mov r0, #0x66 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223660C +_02236458: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223648E + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02236C94 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223648E: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223660C +_022364A8: + bl ov62_022362B8 + mov r1, #0x4a + add r0, r4, #0 + lsl r1, r1, #2 + bl ov62_02231AAC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x54 + mov r3, #7 + bl sub_0200710C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223660C +_022364E6: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02236516 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02236516: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223660C +_02236530: + ldr r0, _02236614 ; =0x02248C14 + bl sub_02022760 + cmp r0, #0 + beq _02236570 + mov r0, #0x66 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r4, #0 + bl ov62_02234520 + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024800 + cmp r0, #0 + beq _02236560 + ldr r1, _02236618 ; =0x0000012A + add r0, r4, #0 + bl ov62_02231B3C + b _02236568 +_02236560: + ldr r1, _0223661C ; =0x0000012B + add r0, r4, #0 + bl ov62_02231B3C +_02236568: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223660C +_02236570: + ldr r0, _02236620 ; =0x02248C18 + bl sub_02022760 + cmp r0, #0 + beq _0223660C + mov r0, #0x66 + mov r1, #2 + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r4, #0 + bl ov62_02234520 + mov r0, #6 + str r0, [r4, #8] + b _0223660C +_0223658E: + sub r1, #0x30 + ldr r0, [r4, r1] + bl sub_020246E0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223660C +_0223659E: + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_02236398 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223660C +_022365B0: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _022365D0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022365D0: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223660C +_022365EA: + mov r0, #0x66 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #1 + bne _022365FE + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 + b _0223660C +_022365FE: + mov r1, #0 + str r1, [r5, r0] + str r1, [r5, #0xc] + add r0, r4, #0 + mov r1, #2 + bl ov62_0222FB60 +_0223660C: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02236614: .word 0x02248C14 +_02236618: .word 0x0000012A +_0223661C: .word 0x0000012B +_02236620: .word 0x02248C18 + thumb_func_end ov62_022363CC + + thumb_func_start ov62_02236624 +ov62_02236624: ; 0x02236624 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + beq _0223663A + cmp r1, #1 + beq _0223665E + cmp r1, #2 + beq _0223666E + b _022366B2 +_0223663A: + ldr r1, _022366CC ; =0x0000012B + bl ov62_02231AAC + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022366C4 +_0223665E: + bl sub_0200F2AC + cmp r0, #1 + bne _022366C4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022366C4 +_0223666E: + ldr r1, _022366D0 ; =0x00000874 + ldr r0, [r4, r1] + cmp r0, #0 + bne _022366AA + add r0, r1, #0 + sub r0, #8 + ldr r0, [r4, r0] + sub r1, #0x44 + str r0, [sp] + ldr r0, [r4, r1] + mov r1, #0x66 + add r2, sp, #0xc + mov r3, #0 + bl sub_0202F298 + mov r1, #0x83 + lsl r1, r1, #4 + ldr r0, [r4, r1] + add r1, #0x3c + ldr r1, [r4, r1] + bl ov62_022486A4 + bl sub_0202F22C + add r0, r4, #0 + bl ov62_022339A0 + add r0, r4, #0 + bl ov62_022338A8 +_022366AA: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022366C4 +_022366B2: + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_02236C20 + add r0, r4, #0 + mov r1, #9 + bl ov62_0222FB60 +_022366C4: + mov r0, #0 + add sp, #0x10 + pop {r4, pc} + nop +_022366CC: .word 0x0000012B +_022366D0: .word 0x00000874 + thumb_func_end ov62_02236624 + + thumb_func_start ov62_022366D4 +ov62_022366D4: ; 0x022366D4 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _022366F0 + cmp r1, #1 + beq _02236710 + cmp r1, #2 + beq _02236720 + b _0223679E +_022366F0: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022367AA +_02236710: + bl sub_0200F2AC + cmp r0, #1 + bne _022367AA + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022367AA +_02236720: + mov r1, #0x66 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + bne _0223676A + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _02236742 + add r0, r4, #0 + add r0, #0x9c + add r1, r5, #0 + bl ov62_02234228 + b _0223674C +_02236742: + add r0, r4, #0 + add r0, #0x10 + add r1, r5, #0 + bl ov62_02232394 +_0223674C: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + add r0, r5, #0 + bl ov62_02236BA8 + add r0, r5, #0 + bl ov62_02236C94 +_0223676A: + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022314A8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r1, [r5, #0x10] + add r0, r5, #0 + ldr r1, [r1, #0] + bl ov62_022300C8 + ldr r0, _022367B0 ; =0x00000868 + mov r1, #1 + ldr r0, [r5, r0] + mov r2, #0 + bl sub_0208BA84 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022367AA +_0223679E: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_022367AA: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_022367B0: .word 0x00000868 + thumb_func_end ov62_022366D4 + + thumb_func_start ov62_022367B4 +ov62_022367B4: ; 0x022367B4 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _022367CE + cmp r1, #1 + beq _02236812 + cmp r1, #2 + beq _02236852 + b _02236896 +_022367CE: + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022367FA + add r4, #0x9c + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02234228 + b _02236804 +_022367FA: + add r4, #0x10 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02232394 +_02236804: + add r0, r5, #0 + bl ov62_02236BA8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223691A +_02236812: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02236838 + add r0, r5, #0 + bl ov62_02236C94 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02236838: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223691A +_02236852: + mov r1, #1 + bl ov62_0223376C + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223691A +_02236896: + bl ov62_02233790 + cmp r0, #0 + beq _0223691A + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _022368EA + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r4, #0 + bl sub_020181C4 + b _0223691A +_022368EA: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223691A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_022367B4 + + thumb_func_start ov62_02236920 +ov62_02236920: ; 0x02236920 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #5 + bls _02236934 + b _02236A88 +_02236934: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02236940: ; jump table + .short _0223694C - _02236940 - 2 ; case 0 + .short _0223696C - _02236940 - 2 ; case 1 + .short _0223698E - _02236940 - 2 ; case 2 + .short _022369EA - _02236940 - 2 ; case 3 + .short _02236A5A - _02236940 - 2 ; case 4 + .short _02236A78 - _02236940 - 2 ; case 5 +_0223694C: + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236A9E +_0223696C: + bl ov62_02236B2C + mov r0, #0x66 + str r0, [sp] + ldr r0, _02236AA4 ; =0x02248C1C + ldr r2, _02236AA8 ; =ov62_02236AB0 + mov r1, #3 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x5d + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236A9E +_0223698E: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + add r0, #0x9c + add r1, r4, #0 + bl ov62_02234214 + add r0, r5, #0 + add r0, #0x9c + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + add r5, #0x9c + add r0, r5, #0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236A9E +_022369EA: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02236A40 + add r0, r5, #0 + add r0, #0x9c + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02236B64 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x66 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _02236A32 + mov r0, #0xff + b _02236A36 +_02236A32: + ldr r0, [r4, #8] + add r0, r0, #1 +_02236A36: + str r0, [r4, #8] + mov r0, #0x66 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_02236A40: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02236A9E +_02236A5A: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236A9E +_02236A78: + bl sub_0200F2AC + cmp r0, #1 + bne _02236A9E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02236A9E +_02236A88: + ldr r0, _02236AAC ; =0x000006D8 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + add r0, r4, #0 + bl ov62_02230098 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_02236A9E: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02236AA4: .word 0x02248C1C +_02236AA8: .word ov62_02236AB0 +_02236AAC: .word 0x000006D8 + thumb_func_end ov62_02236920 + + thumb_func_start ov62_02236AB0 +ov62_02236AB0: ; 0x02236AB0 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r5, r2] + cmp r1, #0 + bne _02236B24 + cmp r0, #0 + beq _02236ACC + cmp r0, #1 + beq _02236ADC + cmp r0, #2 + beq _02236B16 + pop {r3, r4, r5, pc} +_02236ACC: + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02236ADC: + add r0, r5, #0 + bl ov62_02234520 + ldr r0, _02236B28 ; =0x0000086C + ldr r0, [r5, r0] + cmp r0, #0 + beq _02236B02 + add r4, #0xa0 + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0 + bl sub_0202FE98 + mov r3, #0 + mov r2, #1 + eor r1, r3 + eor r0, r2 + orr r0, r1 + bne _02236B0C +_02236B02: + add r0, r5, #0 + mov r1, #7 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02236B0C: + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02236B16: + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #8 + bl ov62_0222FB60 +_02236B24: + pop {r3, r4, r5, pc} + nop +_02236B28: .word 0x0000086C + thumb_func_end ov62_02236AB0 + + thumb_func_start ov62_02236B2C +ov62_02236B2C: ; 0x02236B2C + push {r3, r4} + mov r3, #0x86 + lsl r3, r3, #4 + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + ldr r1, [r0, r3] + lsl r2, r2, #2 + add r4, r0, r2 + add r2, r3, #0 + add r2, #0x2c + ldr r4, [r4, r2] + add r2, r1, #0 + str r4, [r1, #0x10] + add r2, #0x9c + str r4, [r2, #0] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r0, r2] + add r3, #0x1c + lsl r2, r2, #2 + add r0, r0, r2 + ldr r0, [r0, r3] + add r1, #0xa0 + str r0, [r1, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov62_02236B2C + + thumb_func_start ov62_02236B64 +ov62_02236B64: ; 0x02236B64 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + mov r6, #0x5e + ldr r4, [r5, r0] + lsl r6, r6, #2 + add r0, r4, r6 + bl sub_0201A7A0 + mov r0, #3 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r2, #6 + mov r3, #8 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0x79 + bl ov62_02236BC8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_02236B64 + + thumb_func_start ov62_02236BA8 +ov62_02236BA8: ; 0x02236BA8 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x5e + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + mov r0, #0x5e + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02236BA8 + + thumb_func_start ov62_02236BC8 +ov62_02236BC8: ; 0x02236BC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + mov r6, #0x5e + add r7, r1, #0 + ldr r4, [r5, r0] + lsl r6, r6, #2 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + add r1, r7, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, r6 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02236C1C ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02236C1C: .word 0x000F0D00 + thumb_func_end ov62_02236BC8 + + thumb_func_start ov62_02236C20 +ov62_02236C20: ; 0x02236C20 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_022312CC + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r0, r1, #4 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + mov r0, #0x56 + lsl r0, r0, #2 + add r5, #0x14 + add r0, r4, r0 + add r1, r5, #0 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 + mov r0, #0x16 + lsl r0, r0, #4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02236C20 + + thumb_func_start ov62_02236C94 +ov62_02236C94: ; 0x02236C94 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0x56 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02236C94 + + .rodata + + + .global Unk_ov62_02248C14 +Unk_ov62_02248C14: ; 0x02248C14 + .incbin "incbin/overlay62_rodata.bin", 0x4E8, 0x4F0 - 0x4E8 + + .global Unk_ov62_02248C1C +Unk_ov62_02248C1C: ; 0x02248C1C + .incbin "incbin/overlay62_rodata.bin", 0x4F0, 0x4FC - 0x4F0 + + .global Unk_ov62_02248C28 +Unk_ov62_02248C28: ; 0x02248C28 + .incbin "incbin/overlay62_rodata.bin", 0x4FC, 0x28 + diff --git a/asm/ov62_02236CBC.s b/asm/ov62_02236CBC.s new file mode 100644 index 000000000..4d02f5e9b --- /dev/null +++ b/asm/ov62_02236CBC.s @@ -0,0 +1,2019 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02236CBC +ov62_02236CBC: ; 0x02236CBC + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + bne _02236CD8 + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + b _02236CE6 +_02236CD8: + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 +_02236CE6: + add r4, #0xc0 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02236CBC + + thumb_func_start ov62_02236CF8 +ov62_02236CF8: ; 0x02236CF8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r6, [r0, #0x14] + ldr r4, [r0, #0x18] + ldr r5, [r0, #0x1c] + mov r0, #0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, _02236D44 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x32 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _02236D44 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x1c + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02236D44 ; =0x00002E94 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x1d + bl sub_0200CE54 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02236D44: .word 0x00002E94 + thumb_func_end ov62_02236CF8 + + thumb_func_start ov62_02236D48 +ov62_02236D48: ; 0x02236D48 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_02236CF8 + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + add r1, r4, #0 + add r1, #0xbc + str r0, [r1, #0] + add r0, r4, #0 + add r1, r5, #0 + add r0, #0xb8 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0xb8 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + add r0, r4, #0 + add r0, #0xc0 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r0, #0] + sub r2, #0x2c + bl sub_020128C4 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_020129D0 + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + add r1, r4, #0 + add r1, #0x98 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r1, #0xdc + mov r2, #0xe0 + bl sub_0200D4C4 + add r0, r4, #0 + add r0, #0x98 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_0200D364 + add r4, #0x98 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r5, #0 + mov r1, #1 + bl ov62_02236CBC + pop {r3, r4, r5, pc} + thumb_func_end ov62_02236D48 + + thumb_func_start ov62_02236DE8 +ov62_02236DE8: ; 0x02236DE8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r0, r4, #0 + add r0, #0xb8 + bl ov62_022312B0 + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + bl sub_0200D0F4 + add r4, #0x98 + ldr r0, [r4, #0] + bl sub_0200D0F4 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + thumb_func_end ov62_02236DE8 + + thumb_func_start ov62_02236E14 +ov62_02236E14: ; 0x02236E14 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + ldr r5, [r0, #0x24] + str r0, [sp, #0x18] + ldr r7, [r0, #0x14] + ldr r6, [r0, #0x18] + ldr r4, [r0, #0x1c] + ldr r0, [r0, #0x28] + mov r1, #0x3e + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r7, #0 + add r2, r5, #0 + mov r3, #6 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r7, #0 + mov r1, #0x44 + add r2, r5, #0 + mov r3, #6 + bl sub_0200710C + ldr r0, [sp, #0x18] + mov r1, #0 + bl ov62_02231710 + str r7, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _022370B4 ; =0x0000726C + mov r1, #3 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _022370B4 ; =0x0000726C + add r1, r4, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x42 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _022370B4 ; =0x0000726C + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x47 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _022370B4 ; =0x0000726C + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x48 + bl sub_0200CE54 + ldr r0, [sp, #0x18] + mov r1, #1 + bl ov62_02231710 + str r7, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #6 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _022370B8 ; =0x00006E7A + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022370B8 ; =0x00006E7A + add r1, r4, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x40 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _022370B8 ; =0x00006E7A + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x26 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _022370B8 ; =0x00006E7A + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x27 + bl sub_0200CE54 + ldr r3, _022370BC ; =0x02248C84 + add r2, sp, #0x3c + ldmia r3!, {r0, r1} + str r2, [sp, #0x20] + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r3, _022370C0 ; =0x02248C70 + str r0, [r2, #0] + add r2, sp, #0x28 + ldmia r3!, {r0, r1} + str r2, [sp, #0x1c] + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r5, #0 + str r0, [r2, #0] +_02236F4C: + cmp r5, #3 + bne _02236F8E + str r7, [sp] + mov r0, #0x5c + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _022370C4 ; =0x00004705 + mov r1, #2 + add r0, r5, r0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022370C4 ; =0x00004705 + add r1, r4, #0 + add r0, r5, r0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x5b + bl sub_0200CC3C + b _02236FD0 +_02236F8E: + mov r0, #0x92 + str r0, [sp] + ldr r0, [sp, #0x20] + mov r1, #2 + ldr r0, [r0, #0] + add r2, r6, #0 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _022370C4 ; =0x00004705 + add r3, r4, #0 + add r0, r5, r0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x24] + bl sub_0200CD7C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022370C4 ; =0x00004705 + ldr r3, [sp, #0x1c] + add r0, r5, r0 + str r0, [sp, #8] + ldr r3, [r3, #0] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0x92 + bl sub_0200D888 +_02236FD0: + ldr r0, [sp, #0x20] + add r5, r5, #1 + add r0, r0, #4 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r0, r0, #4 + str r0, [sp, #0x1c] + cmp r5, #5 + blt _02236F4C + mov r0, #0 + str r0, [sp] + ldr r0, _022370C4 ; =0x00004705 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x92 + mov r3, #9 + bl sub_0200CE0C + mov r0, #0 + str r0, [sp] + ldr r0, _022370C4 ; =0x00004705 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x92 + mov r3, #0xa + bl sub_0200CE3C + mov r0, #0 + str r0, [sp] + ldr r0, _022370C8 ; =0x00004706 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x59 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _022370C8 ; =0x00004706 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r7, #0 + mov r3, #0x5a + bl sub_0200CE54 + ldr r1, _022370CC ; =0x0000088C + ldr r0, [sp, #0x18] + mov r6, #0xd + ldr r0, [r0, r1] + mov r7, #0xe + bl sub_02030BAC + ldr r1, [sp, #0x18] + cmp r0, #0 + ldr r4, [r1, #0x18] + ldr r5, [r1, #0x1c] + ldr r1, [r1, #0x28] + beq _02237050 + mov r6, #0xf + mov r7, #0x10 +_02237050: + mov r0, #0x92 + str r0, [sp] + str r6, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _022370D0 ; =0x0002869F + add r2, r4, #0 + str r0, [sp, #0x14] + add r0, r1, #0 + mov r1, #2 + add r3, r5, #0 + bl sub_0200CD7C + mov r0, #0 + str r0, [sp] + ldr r0, _022370D0 ; =0x0002869F + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x92 + mov r3, #9 + bl sub_0200CE0C + mov r0, #0 + str r0, [sp] + ldr r0, _022370D0 ; =0x0002869F + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x92 + mov r3, #0xa + bl sub_0200CE3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _022370D0 ; =0x0002869F + add r1, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + mov r2, #0x92 + add r3, r7, #0 + bl sub_0200D888 + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022370B4: .word 0x0000726C +_022370B8: .word 0x00006E7A +_022370BC: .word 0x02248C84 +_022370C0: .word 0x02248C70 +_022370C4: .word 0x00004705 +_022370C8: .word 0x00004706 +_022370CC: .word 0x0000088C +_022370D0: .word 0x0002869F + thumb_func_end ov62_02236E14 + + thumb_func_start ov62_022370D4 +ov62_022370D4: ; 0x022370D4 + push {r4, r5, r6, r7} + add r3, r0, #0 + mov r0, #0 + cmp r1, #0 + ble _022370E6 +_022370DE: + add r0, r0, #1 + add r3, r3, #2 + cmp r0, r1 + blt _022370DE +_022370E6: + add r7, r1, r2 + cmp r0, r7 + bge _02237126 + mov r1, #0x97 +_022370EE: + ldrh r6, [r3] + mov r2, #0x1f + add r0, r0, #1 + asr r4, r6, #0xa + and r4, r2 + add r5, r4, #0 + mov r2, #0x1d + mul r5, r2 + mov r2, #0x1f + and r2, r6 + mov r4, #0x4c + mul r4, r2 + asr r6, r6, #5 + mov r2, #0x1f + and r2, r6 + add r6, r2, #0 + mul r6, r1 + add r2, r4, r6 + add r2, r5, r2 + asr r5, r2, #8 + lsl r4, r5, #0xa + lsl r2, r5, #5 + orr r2, r4 + orr r2, r5 + strh r2, [r3] + add r3, r3, #2 + cmp r0, r7 + blt _022370EE +_02237126: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov62_022370D4 + + thumb_func_start ov62_0223712C +ov62_0223712C: ; 0x0223712C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp] + ldr r0, [r0, #0x28] + mov r1, #0x83 + str r0, [sp, #4] + ldr r0, [sp] + lsl r1, r1, #4 + ldr r0, [r0, r1] + bl sub_020507E4 + add r4, r0, #0 + bl sub_0206B5C8 + str r0, [sp, #0x30] + add r0, r4, #0 + bl sub_0206B588 + str r0, [sp, #0x34] + add r0, r4, #0 + bl sub_0206B5B8 + str r0, [sp, #0x38] + add r0, r4, #0 + bl sub_0206B5A8 + str r0, [sp, #0x3c] + add r0, r4, #0 + bl sub_0206B598 + ldr r3, _022371C8 ; =0x02248C5C + str r0, [sp, #0x40] + ldmia r3!, {r0, r1} + add r2, sp, #8 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r7, #0 + add r4, sp, #0x30 + add r5, sp, #0x1c + str r0, [r2, #0] +_02237180: + ldr r6, [r4, #0] + cmp r6, #0 + beq _022371B2 + add r3, sp, #8 + ldmia r3!, {r0, r1} + add r2, sp, #0x1c + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + cmp r6, #2 + str r0, [r2, #0] + bne _022371B2 + ldr r0, [sp] + mov r1, #2 + ldr r0, [r0, #0x28] + bl sub_0200316C + ldr r1, [r5, #0] + mov r2, #0x10 + add r1, r1, #4 + lsl r1, r1, #0x14 + lsr r1, r1, #0x10 + bl ov62_022370D4 +_022371B2: + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #5 + blt _02237180 + ldr r0, [sp, #4] + mov r1, #1 + bl sub_02003858 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022371C8: .word 0x02248C5C + thumb_func_end ov62_0223712C + + thumb_func_start ov62_022371CC +ov62_022371CC: ; 0x022371CC + push {r4, r5, r6, r7, lr} + sub sp, #0xa4 + add r7, r0, #0 + mov r0, #0 + str r0, [sp, #0x1c] + mov r0, #0x86 + lsl r0, r0, #4 + ldr r6, [r7, r0] + ldr r0, [sp, #0x1c] + add r1, sp, #0x20 + strh r0, [r1, #0x28] + mov r0, #1 + lsl r0, r0, #8 + strh r0, [r1, #0x2a] + ldr r0, [sp, #0x1c] + ldr r5, [sp, #0x1c] + strh r0, [r1, #0x2c] + strh r0, [r1, #0x2e] + mov r0, #0xa + str r0, [sp, #0x50] + ldr r0, [sp, #0x1c] + mov r1, #1 + str r0, [sp, #0x54] + str r0, [sp, #0x74] + str r0, [sp, #0x78] + sub r0, r1, #2 + str r0, [sp, #0x6c] + str r0, [sp, #0x70] + ldr r0, _02237490 ; =0x0002869F + str r1, [sp, #0x58] + str r0, [sp, #0x5c] + str r0, [sp, #0x60] + str r0, [sp, #0x64] + str r0, [sp, #0x68] + add r4, r6, #0 +_02237212: + ldr r0, [r7, #0x18] + ldr r1, [r7, #0x1c] + add r2, sp, #0x48 + bl sub_0200CE6C + str r0, [r4, #0x40] + mov r1, #1 + bl sub_0200D364 + ldr r0, [r4, #0x40] + bl sub_0200D330 + ldr r1, [r4, #4] + ldr r0, [r4, #0x40] + add r2, r1, #0 + bl sub_0200D6E8 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #5 + blt _02237212 + mov r5, #0 + add r4, r6, #0 +_02237240: + ldr r0, _02237494 ; =0x00004705 + add r0, r5, r0 + str r0, [sp, #0x5c] + str r0, [sp, #0x60] + cmp r5, #3 + bne _02237254 + ldr r0, _02237498 ; =0x00004706 + str r0, [sp, #0x64] + str r0, [sp, #0x68] + b _0223725A +_02237254: + ldr r0, _02237494 ; =0x00004705 + str r0, [sp, #0x64] + str r0, [sp, #0x68] +_0223725A: + ldr r0, [r7, #0x18] + ldr r1, [r7, #0x1c] + add r2, sp, #0x48 + bl sub_0200CE6C + str r0, [r4, #0x54] + cmp r5, #3 + ldr r0, [r4, #0x54] + bne _02237274 + mov r1, #0 + bl sub_0200D364 + b _0223727A +_02237274: + mov r1, #1 + bl sub_0200D364 +_0223727A: + ldr r0, [r4, #0x54] + bl sub_0200D330 + ldr r1, [r4, #4] + ldr r0, [r4, #0x54] + add r2, r1, #0 + bl sub_0200D6E8 + add r1, r5, #0 + ldr r0, [r4, #0x54] + add r1, #0xa + bl sub_0200D41C + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #5 + blt _02237240 + ldr r0, _0223749C ; =0x00006E7A + str r0, [sp, #0x5c] + str r0, [sp, #0x60] + str r0, [sp, #0x64] + str r0, [sp, #0x68] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x6c] + str r0, [sp, #0x70] + mov r0, #0x14 + str r0, [sp, #0x50] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r7, r0] + bl sub_020507E4 + add r4, r0, #0 + bl sub_0206B5C8 + str r0, [sp, #0x7c] + add r0, r4, #0 + bl sub_0206B588 + str r0, [sp, #0x80] + add r0, r4, #0 + bl sub_0206B5B8 + str r0, [sp, #0x84] + add r0, r4, #0 + bl sub_0206B5A8 + str r0, [sp, #0x88] + add r0, r4, #0 + bl sub_0206B598 + str r0, [sp, #0x8c] + mov r0, #0 + str r0, [sp, #4] + add r0, sp, #0x7c + ldr r2, _022374A0 ; =0x02248C98 + str r0, [sp, #0x10] + ldmia r2!, {r0, r1} + add r3, sp, #0x20 + stmia r3!, {r0, r1} + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + add r4, r6, #0 + add r5, sp, #0x34 + str r0, [r3, #0] +_02237300: + ldr r0, [r7, #0x18] + ldr r1, [r7, #0x1c] + add r2, sp, #0x48 + bl sub_0200CE6C + str r0, [r4, #0x68] + ldr r0, [sp, #0x10] + ldr r0, [r0, #0] + cmp r0, #0 + bne _02237336 + ldr r0, [r4, #0x68] + mov r1, #5 + bl sub_0200D364 + ldr r0, [r4, #0x68] + mov r1, #9 + bl sub_0200D41C + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_0200D3F4 + b _02237358 +_02237336: + add r3, sp, #0x20 + ldmia r3!, {r0, r1} + add r2, sp, #0x34 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r4, #0x68] + ldr r1, [r5, #0] + bl sub_0200D364 + ldr r1, [r5, #0] + ldr r0, [r4, #0x68] + add r1, r1, #4 + bl sub_0200D41C +_02237358: + ldr r0, [r4, #0x68] + bl sub_0200D330 + ldr r1, [r4, #4] + ldr r0, [r4, #0x68] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r0, [sp, #0x10] + add r4, r4, #4 + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #4] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _02237300 + ldr r0, _022374A4 ; =0x0000726C + mov r4, #0xfa + str r0, [sp, #0x5c] + str r0, [sp, #0x60] + str r0, [sp, #0x64] + str r0, [sp, #0x68] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x6c] + str r0, [sp, #0x70] + mov r0, #2 + str r0, [sp, #0x58] + mov r0, #0 + str r0, [sp, #0x18] + str r0, [sp, #0x50] + add r0, r6, #0 + add r0, #0x90 + ldr r0, [r0, #0] + lsl r4, r4, #2 + str r0, [sp] + ldr r0, [sp, #0x18] + add r5, sp, #0x90 + str r0, [sp, #8] +_022373AA: + ldr r0, [sp] + add r1, r4, #0 + bl sub_020E1F6C + str r0, [r5, #0] + ldr r0, [sp] + add r1, r4, #0 + bl sub_020E1F6C + str r1, [sp] + add r0, r4, #0 + mov r1, #0xa + bl sub_020E1F6C + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + bne _022373DC + ldr r0, [sp, #0x18] + cmp r0, #0 + bne _022373DC + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + b _022373E0 +_022373DC: + mov r0, #1 + str r0, [sp, #0x18] +_022373E0: + ldr r0, [sp, #8] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #4 + blt _022373AA + mov r0, #0xa + str r0, [sp, #0xa0] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0x58 + add r4, r6, #0 + add r5, sp, #0x90 + str r0, [sp, #0x14] +_022373FC: + ldr r0, [r7, #0x18] + ldr r1, [r7, #0x1c] + add r2, sp, #0x48 + bl sub_0200CE6C + str r0, [r4, #0x7c] + ldr r0, [r5, #0] + cmp r0, #0 + bne _0223741E + ldr r1, [sp, #0xc] + ldr r0, [sp, #0x1c] + cmp r1, r0 + bge _0223741E + ldr r0, [r4, #0x7c] + mov r1, #0 + bl sub_0200D3F4 +_0223741E: + ldr r0, [r4, #0x7c] + ldr r1, [r5, #0] + bl sub_0200D364 + ldr r1, [sp, #0x14] + ldr r0, [r4, #0x7c] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + mov r2, #0x48 + bl ov62_02230E68 + ldr r0, [r4, #0x7c] + bl sub_0200D330 + ldr r0, [sp, #0x14] + add r4, r4, #4 + add r0, #0x10 + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #5 + blt _022373FC + add r0, r6, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0200D3F4 + add r0, r6, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0200D3F4 + mov r5, #2 + mov r4, #0 + add r7, r5, #0 +_0223746C: + ldr r0, [r6, #0x40] + add r1, r5, #0 + bl sub_0200D6A4 + ldr r0, [r6, #0x54] + add r1, r7, #0 + bl sub_0200D6A4 + ldr r0, [r6, #0x68] + mov r1, #2 + bl sub_0200D6A4 + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #5 + blt _0223746C + add sp, #0xa4 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02237490: .word 0x0002869F +_02237494: .word 0x00004705 +_02237498: .word 0x00004706 +_0223749C: .word 0x00006E7A +_022374A0: .word 0x02248C98 +_022374A4: .word 0x0000726C + thumb_func_end ov62_022371CC + + thumb_func_start ov62_022374A8 +ov62_022374A8: ; 0x022374A8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r7, [r5, r0] + mov r4, #0 + add r6, r7, #0 +_022374B6: + ldr r1, _02237590 ; =0x00004705 + ldr r0, [r5, #0x1c] + add r1, r4, r1 + bl sub_0200D070 + ldr r1, _02237590 ; =0x00004705 + ldr r0, [r5, #0x1c] + add r1, r4, r1 + bl sub_0200D080 + ldr r0, [r6, #0x54] + bl sub_0200D0F4 + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #5 + blt _022374B6 + ldr r0, [r5, #0x1c] + ldr r1, _02237590 ; =0x00004705 + bl sub_0200D090 + ldr r0, [r5, #0x1c] + ldr r1, _02237590 ; =0x00004705 + bl sub_0200D0A0 + ldr r0, [r5, #0x1c] + ldr r1, _02237594 ; =0x00004706 + bl sub_0200D090 + ldr r0, [r5, #0x1c] + ldr r1, _02237594 ; =0x00004706 + bl sub_0200D0A0 + mov r6, #0 + add r4, r7, #0 +_022374FC: + ldr r0, [r4, #0x40] + bl sub_0200D0F4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #5 + blt _022374FC + ldr r0, [r5, #0x1c] + ldr r1, _02237598 ; =0x0002869F + bl sub_0200D070 + ldr r0, [r5, #0x1c] + ldr r1, _02237598 ; =0x0002869F + bl sub_0200D080 + ldr r0, [r5, #0x1c] + ldr r1, _02237598 ; =0x0002869F + bl sub_0200D090 + ldr r0, [r5, #0x1c] + ldr r1, _02237598 ; =0x0002869F + bl sub_0200D0A0 + mov r6, #0 + add r4, r7, #0 +_0223752E: + ldr r0, [r4, #0x68] + bl sub_0200D0F4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #5 + blt _0223752E + ldr r0, [r5, #0x1c] + ldr r1, _0223759C ; =0x00006E7A + bl sub_0200D070 + ldr r0, [r5, #0x1c] + ldr r1, _0223759C ; =0x00006E7A + bl sub_0200D080 + ldr r0, [r5, #0x1c] + ldr r1, _0223759C ; =0x00006E7A + bl sub_0200D090 + ldr r0, [r5, #0x1c] + ldr r1, _0223759C ; =0x00006E7A + bl sub_0200D0A0 + mov r4, #0 +_0223755E: + ldr r0, [r7, #0x7c] + bl sub_0200D0F4 + add r4, r4, #1 + add r7, r7, #4 + cmp r4, #5 + blt _0223755E + ldr r0, [r5, #0x1c] + ldr r1, _022375A0 ; =0x0000726C + bl sub_0200D070 + ldr r0, [r5, #0x1c] + ldr r1, _022375A0 ; =0x0000726C + bl sub_0200D080 + ldr r0, [r5, #0x1c] + ldr r1, _022375A0 ; =0x0000726C + bl sub_0200D090 + ldr r0, [r5, #0x1c] + ldr r1, _022375A0 ; =0x0000726C + bl sub_0200D0A0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02237590: .word 0x00004705 +_02237594: .word 0x00004706 +_02237598: .word 0x0002869F +_0223759C: .word 0x00006E7A +_022375A0: .word 0x0000726C + thumb_func_end ov62_022374A8 + + thumb_func_start ov62_022375A4 +ov62_022375A4: ; 0x022375A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r6, #0x5a + str r0, [sp] + mov r4, #0 + add r5, r0, #0 + lsl r6, r6, #2 +_022375B8: + ldr r0, [r5, #0x2c] + add r1, r6, #0 + add r0, #0x14 + str r0, [r5, #0x2c] + bl sub_020E1F6C + str r1, [r5, #0x2c] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _022375B8 + ldr r0, [sp] + ldr r1, [sp] + mov r2, #0 + add r0, #0xd4 + add r1, #0xd8 + add r3, r2, #0 + bl ov62_022315E0 + ldr r5, [sp] + mov r6, #0 + add r4, sp, #4 +_022375E4: + ldr r0, [sp] + ldr r0, [r0, #0x2c] + cmp r0, #0 + beq _022375F6 + ldr r0, [r5, #4] + ldr r1, _022376C0 ; =0x3D4CCCCD + bl sub_020E0B00 + b _02237612 +_022375F6: + ldr r0, [r5, #0x40] + mov r1, #0 + bl sub_0200D6A4 + ldr r0, [r5, #0x54] + mov r1, #0 + bl sub_0200D6A4 + ldr r0, [r5, #0x68] + mov r1, #0 + bl sub_0200D6A4 + mov r0, #0xfe + lsl r0, r0, #0x16 +_02237612: + str r0, [r5, #4] + ldr r0, [r5, #0x2c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r1, [r5, #0x18] + add r7, r1, #0 + mul r7, r0 + ldr r0, [r5, #0x2c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + ldr r1, [r5, #0x18] + add r2, r1, #0 + mul r2, r0 + mov r0, #0x6a + lsl r0, r0, #0xc + mov r1, #2 + sub r2, r0, r2 + lsl r1, r1, #0x12 + ldr r0, [r5, #0x68] + add r1, r7, r1 + bl sub_0200D614 + add r1, sp, #4 + ldr r0, [r5, #0x68] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x40] + sub r1, #0x20 + sub r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x54] + add r1, #0x10 + sub r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r1, [r5, #4] + ldr r0, [r5, #0x68] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r1, [r5, #4] + ldr r0, [r5, #0x40] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r1, [r5, #4] + ldr r0, [r5, #0x54] + add r2, r1, #0 + bl sub_0200D6E8 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #5 + blt _022375E4 + ldr r0, [sp] + ldr r0, [r0, #0x2c] + cmp r0, #0 + beq _022376BA + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022376BA: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022376C0: .word 0x3D4CCCCD + thumb_func_end ov62_022375A4 + + thumb_func_start ov62_022376C4 +ov62_022376C4: ; 0x022376C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r6, #0x5a + str r0, [sp] + mov r4, #0 + add r5, r0, #0 + lsl r6, r6, #2 +_022376D8: + ldr r0, [r5, #0x2c] + add r1, r6, #0 + add r0, #0x14 + str r0, [r5, #0x2c] + bl sub_020E1F6C + str r1, [r5, #0x2c] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _022376D8 + ldr r0, [sp] + ldr r0, [r0, #0x2c] + cmp r0, #0x14 + bne _0223771E + mov r6, #2 + ldr r4, [sp] + mov r5, #0 + add r7, r6, #0 +_022376FE: + ldr r0, [r4, #0x40] + add r1, r6, #0 + bl sub_0200D6A4 + ldr r0, [r4, #0x54] + add r1, r7, #0 + bl sub_0200D6A4 + ldr r0, [r4, #0x68] + mov r1, #2 + bl sub_0200D6A4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #5 + blt _022376FE +_0223771E: + ldr r0, [sp] + ldr r1, [sp] + add r0, #0xd4 + add r1, #0xd8 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + ldr r5, [sp] + mov r6, #0 + add r4, sp, #4 +_02237734: + ldr r0, [sp] + ldr r0, [r0, #0x2c] + cmp r0, #0 + beq _02237748 + ldr r0, [r5, #4] + ldr r1, _02237810 ; =0x3D4CCCCD + bl sub_020E1A9C + str r0, [r5, #4] + b _02237760 +_02237748: + ldr r0, [r5, #0x68] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x40] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r5, #0x54] + mov r1, #0 + bl sub_0200D3F4 +_02237760: + ldr r0, [r5, #0x2c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r1, [r5, #0x18] + add r2, r1, #0 + mul r2, r0 + mov r0, #2 + lsl r0, r0, #0x12 + sub r7, r0, r2 + ldr r0, [r5, #0x2c] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + ldr r1, [r5, #0x18] + add r2, r1, #0 + mul r2, r0 + mov r0, #0x6a + lsl r0, r0, #0xc + sub r2, r0, r2 + ldr r0, [r5, #0x68] + add r1, r7, #0 + bl sub_0200D614 + add r1, sp, #4 + ldr r0, [r5, #0x68] + add r1, #2 + add r2, sp, #4 + bl sub_0200D550 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x40] + sub r1, #0x20 + sub r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x54] + add r1, #0x10 + sub r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r1, [r5, #4] + ldr r0, [r5, #0x68] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r1, [r5, #4] + ldr r0, [r5, #0x40] + add r2, r1, #0 + bl sub_0200D6E8 + ldr r1, [r5, #4] + ldr r0, [r5, #0x54] + add r2, r1, #0 + bl sub_0200D6E8 + add r6, r6, #1 + add r5, r5, #4 + cmp r6, #5 + blt _02237734 + ldr r0, [sp] + ldr r0, [r0, #0x2c] + cmp r0, #0 + beq _02237808 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02237808: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02237810: .word 0x3D4CCCCD + thumb_func_end ov62_022376C4 + + thumb_func_start ov62_02237814 +ov62_02237814: ; 0x02237814 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, _02237880 ; =0x022497C0 + ldr r5, [r0, r1] + mov r7, #0 + add r6, sp, #0 +_02237822: + mov r1, #0 + mov r2, #2 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r5, #0x68] + lsl r1, r1, #0xc + lsl r2, r2, #0xc + bl sub_0200D614 + add r1, sp, #0 + ldr r0, [r5, #0x68] + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r5, #0x40] + sub r1, #0x20 + sub r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r5, #0x54] + add r1, #0x10 + sub r2, r2, #2 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #5 + blt _02237822 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02237880: .word 0x022497C0 + thumb_func_end ov62_02237814 + + thumb_func_start ov62_02237884 +ov62_02237884: ; 0x02237884 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + bne _02237926 + mov r0, #0x66 + mov r1, #0xdc + bl sub_02018144 + mov r1, #0 + mov r2, #0xdc + add r5, r0, #0 + bl sub_020C4CF4 + mov r0, #0x86 + lsl r0, r0, #4 + str r5, [r4, r0] + mov r0, #0 + str r0, [r5, #0] + add r1, r5, #0 + add r2, r0, #0 + mov r7, #0x40 + mov r6, #0x34 +_022378B4: + sub r3, r0, #2 + cmp r3, #1 + bhi _022378BE + str r6, [r1, #0x18] + b _022378C0 +_022378BE: + str r7, [r1, #0x18] +_022378C0: + ldr r3, _02237AB8 ; =0x3E4CCCCD + str r2, [r1, #0x2c] + str r3, [r1, #4] + add r0, r0, #1 + add r1, r1, #4 + add r2, #0x48 + cmp r0, #5 + blt _022378B4 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd4 + add r1, #0xd8 + mov r2, #0 + bl ov62_022315C8 + mov r0, #4 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r2, #0 + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd4 + add r1, #0xd8 + add r3, r2, #0 + str r2, [sp, #8] + bl ov62_02231560 + ldr r0, _02237ABC ; =0x00000561 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223792C +_02237926: + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] +_0223792C: + ldr r0, [r4, #8] + cmp r0, #4 + bls _02237934 + b _02237AA8 +_02237934: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02237940: ; jump table + .short _02237AA8 - _02237940 - 2 ; case 0 + .short _0223794A - _02237940 - 2 ; case 1 + .short _022379BE - _02237940 - 2 ; case 2 + .short _02237A1A - _02237940 - 2 ; case 3 + .short _02237A5E - _02237940 - 2 ; case 4 +_0223794A: + add r0, r5, #0 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02237974 + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0202D750 + mov r1, #0 + add r2, r1, #0 + bl sub_0202D230 + add r1, r5, #0 + add r1, #0x90 + str r0, [r1, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02237974: + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02237AB0 +_022379BE: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02231454 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + bl ov62_02234314 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + add r0, r4, #0 + bl ov62_02236E14 + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0x1c + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237AB0 +_02237A1A: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _02237AB0 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02236D48 + add r0, r4, #0 + bl ov62_022371CC + add r0, r4, #0 + bl ov62_0223712C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237AB0 +_02237A5E: + add r0, r4, #0 + bl ov62_022375A4 + add r6, r0, #0 + add r0, r5, #0 + add r1, r5, #0 + mov r2, #0 + add r0, #0xd4 + add r1, #0xd8 + add r3, r2, #0 + bl ov62_022315E0 + add r0, r5, #0 + mov r1, #0 + bl ov62_02231664 + cmp r6, #0 + bne _02237A8E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + bl ov62_02237814 +_02237A8E: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0x1c + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02237AB0 +_02237AA8: + add r0, r4, #0 + mov r1, #1 + bl ov62_0222FB60 +_02237AB0: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02237AB8: .word 0x3E4CCCCD +_02237ABC: .word 0x00000561 + thumb_func_end ov62_02237884 + + thumb_func_start ov62_02237AC0 +ov62_02237AC0: ; 0x02237AC0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + add r0, sp, #4 + add r1, sp, #0 + bl sub_020227C0 + cmp r0, #0 + beq _02237AF4 + ldr r0, [sp, #4] + cmp r0, #0x50 + bls _02237AF4 + cmp r0, #0xb0 + bhs _02237AF4 + ldr r0, [sp] + cmp r0, #0x98 + bls _02237AF4 + cmp r0, #0xb0 + bhs _02237AF4 + ldr r0, _02237AFC ; =0x00000563 + bl sub_02005748 + add r0, r4, #0 + mov r1, #2 + bl ov62_0222FB60 +_02237AF4: + mov r0, #0 + add sp, #8 + pop {r4, pc} + nop +_02237AFC: .word 0x00000563 + thumb_func_end ov62_02237AC0 + + thumb_func_start ov62_02237B00 +ov62_02237B00: ; 0x02237B00 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] + ldr r0, [r4, #8] + cmp r0, #4 + bls _02237B12 + b _02237C76 +_02237B12: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02237B1E: ; jump table + .short _02237B28 - _02237B1E - 2 ; case 0 + .short _02237B86 - _02237B1E - 2 ; case 1 + .short _02237B8A - _02237B1E - 2 ; case 2 + .short _02237BD2 - _02237B1E - 2 ; case 3 + .short _02237C16 - _02237B1E - 2 ; case 4 +_02237B28: + ldr r0, [r5, #0] + cmp r0, #0 + bne _02237B34 + ldr r0, _02237D14 ; =0x00000562 + bl sub_02005748 +_02237B34: + ldr r0, [r5, #0] + cmp r0, #0x10 + beq _02237B3E + add r0, r0, #2 + str r0, [r5, #0] +_02237B3E: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0x1c + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + ldr r2, _02237D18 ; =0x00004018 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + lsr r3, r3, #0x18 + bl sub_02003A2C + add r0, r4, #0 + bl ov62_022376C4 + cmp r0, #0 + beq _02237B7A + b _02237D0E +_02237B7A: + mov r0, #0 + str r0, [r5, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237D0E +_02237B86: + add r0, r0, #1 + str r0, [r4, #8] +_02237B8A: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022374A8 + add r0, r4, #0 + bl ov62_02236DE8 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + str r0, [r5, #0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237D0E +_02237BD2: + mov r0, #1 + bl ov62_0222F824 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02237D0E +_02237C16: + ldr r1, [r5, #0] + cmp r1, #0 + beq _02237C22 + sub r0, r1, #2 + str r0, [r5, #0] + b _02237D0E +_02237C22: + add r0, r0, #1 + str r0, [r4, #8] + add r0, r5, #0 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0x1c + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02237D0E +_02237C76: + add r0, r5, #0 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02237CDE + mov r0, #8 + str r0, [sp] + ldr r0, _02237D1C ; =0x04000050 + mov r1, #4 + mov r2, #0x12 + mov r3, #7 + bl sub_020BF55C + mov r0, #8 + str r0, [sp] + ldr r0, _02237D20 ; =0x04001050 + mov r1, #4 + mov r2, #0x12 + mov r3, #7 + bl sub_020BF55C + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + b _02237D0E +_02237CDE: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #0] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C +_02237D0E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02237D14: .word 0x00000562 +_02237D18: .word 0x00004018 +_02237D1C: .word 0x04000050 +_02237D20: .word 0x04001050 + thumb_func_end ov62_02237B00 + + .rodata + + + .global Unk_ov62_02248C50 +Unk_ov62_02248C50: ; 0x02248C50 + .incbin "incbin/overlay62_rodata.bin", 0x524, 0x530 - 0x524 + + .global Unk_ov62_02248C5C +Unk_ov62_02248C5C: ; 0x02248C5C + .incbin "incbin/overlay62_rodata.bin", 0x530, 0x544 - 0x530 + + .global Unk_ov62_02248C70 +Unk_ov62_02248C70: ; 0x02248C70 + .incbin "incbin/overlay62_rodata.bin", 0x544, 0x558 - 0x544 + + .global Unk_ov62_02248C84 +Unk_ov62_02248C84: ; 0x02248C84 + .incbin "incbin/overlay62_rodata.bin", 0x558, 0x56C - 0x558 + + .global Unk_ov62_02248C98 +Unk_ov62_02248C98: ; 0x02248C98 + .incbin "incbin/overlay62_rodata.bin", 0x56C, 0x14 + + + .data + + + .global Unk_ov62_022497C0 +Unk_ov62_022497C0: ; 0x022497C0 + .incbin "incbin/overlay62_data.bin", 0x0, 0x14 + diff --git a/asm/ov62_02237D24.s b/asm/ov62_02237D24.s new file mode 100644 index 000000000..58e50862b --- /dev/null +++ b/asm/ov62_02237D24.s @@ -0,0 +1,3893 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02237D24 +ov62_02237D24: ; 0x02237D24 + push {r3, r4, r5, lr} + mov r1, #0xba + add r5, r0, #0 + mov r0, #0x66 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0xba + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + ldr r0, _02237DB4 ; =0x00000016 + mov r1, #2 + bl sub_02006590 + mov r1, #0x86 + ldr r0, [r5, #0x24] + lsl r1, r1, #2 + str r0, [r4, r1] + mov r2, #0x48 + add r0, r1, #4 + str r2, [r4, r0] + add r0, r1, #0 + mov r2, #0x10 + add r0, #8 + str r2, [r4, r0] + mov r0, #0x66 + add r1, #0xc + str r0, [r4, r1] + bl sub_02029C68 + mov r1, #0x8e + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x66 + bl sub_02030A80 + mov r1, #0x25 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02237DB4: .word 0x00000016 + thumb_func_end ov62_02237D24 + + thumb_func_start ov62_02237DB8 +ov62_02237DB8: ; 0x02237DB8 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02237DD4 + cmp r1, #1 + beq _02237E32 + cmp r1, #2 + beq _02237E86 + b _02237E9C +_02237DD4: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02237DE8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02237DE8: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02237F00 +_02237E32: + mov r0, #0 + add r1, r0, #0 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #3 + mov r1, #2 + bl sub_02019060 + mov r0, #4 + mov r1, #0 + bl sub_02019060 + mov r0, #6 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02237F00 +_02237E86: + mov r1, #0 + bl ov62_0223376C + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02237F00 +_02237E9C: + bl ov62_02233790 + cmp r0, #0 + beq _02237F00 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + bl ov62_02239608 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_02237F00: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02237DB8 + + thumb_func_start ov62_02237F08 +ov62_02237F08: ; 0x02237F08 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02237F22 + cmp r1, #1 + beq _02237FB2 + cmp r1, #2 + beq _02237FC8 + b _02238018 +_02237F22: + bl ov62_02239518 + add r0, r5, #0 + mov r1, #0x23 + mov r2, #3 + bl ov62_022343B8 + add r0, r5, #0 + mov r1, #0x25 + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0202A750 + mov r1, #0 + bl sub_02029CA8 + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02237F8A + add r0, r1, #0 + sub r0, #0x14 + ldr r1, [r4, r1] + add r0, r4, r0 + bl ov22_0225AF8C + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl ov22_0225B074 +_02237F8A: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _02238044 ; =ov62_022394D8 + add r1, r5, #0 + bl sub_02017798 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223801E +_02237FB2: + mov r1, #0 + mov r3, #2 + ldr r0, [r5, #0x28] + add r2, r1, #0 + lsl r3, r3, #8 + bl sub_02003070 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223801E +_02237FC8: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02237FFE + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl ov62_02239724 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02237FFE: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223801E +_02238018: + mov r1, #3 + bl ov62_0222FB60 +_0223801E: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223803E + bl sub_020241B4 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_0225AFF8 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_0223803E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02238044: .word ov62_022394D8 + thumb_func_end ov62_02237F08 + + thumb_func_start ov62_02238048 +ov62_02238048: ; 0x02238048 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, _022380A8 ; =0x02248CB0 + bl sub_02022760 + cmp r0, #0 + beq _0223806A + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 +_0223806A: + ldr r0, _022380AC ; =0x02248CB4 + bl sub_02022760 + cmp r0, #0 + beq _02238082 + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #4 + bl ov62_0222FB60 +_02238082: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022380A2 + bl sub_020241B4 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_0225AFF8 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_022380A2: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022380A8: .word 0x02248CB0 +_022380AC: .word 0x02248CB4 + thumb_func_end ov62_02238048 + + thumb_func_start ov62_022380B0 +ov62_022380B0: ; 0x022380B0 + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _022380CA + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_022380CA: + ldr r0, [r4, #8] + cmp r0, #6 + bls _022380D2 + b _02238316 +_022380D2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022380DE: ; jump table + .short _022380EC - _022380DE - 2 ; case 0 + .short _0223815E - _022380DE - 2 ; case 1 + .short _022381D2 - _022380DE - 2 ; case 2 + .short _0223822A - _022380DE - 2 ; case 3 + .short _02238256 - _022380DE - 2 ; case 4 + .short _022382A6 - _022380DE - 2 ; case 5 + .short _022382C8 - _022380DE - 2 ; case 6 +_022380EC: + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + add r1, r0, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + mov r0, #7 + mov r1, #1 + bl sub_02019060 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020181C4 + mov r0, #0x25 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02030A98 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + add r0, r4, #0 + bl ov62_02239D0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_0223815E: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022381B8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022396E8 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + mov r2, #0 + ldr r0, [r4, #0x24] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022381B8: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022383CA +_022381D2: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r1, _022383D0 ; =0x0000011E + add r0, r4, #0 + bl ov62_02231AAC + mov r0, #0x66 + bl sub_02030A80 + mov r1, #0xb7 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0x83 + lsl r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02030AA0 + ldr r0, _022383D4 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_0223822A: + add r0, r4, #0 + bl ov62_0224112C + mov r2, #0xb7 + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0xb0 + ldr r2, [r5, r2] + bl ov61_0222B1B4 + cmp r0, #1 + beq _02238244 + b _022383CA +_02238244: + mov r0, #0xb7 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02030A98 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_02238256: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _022383D4 ; =0x00000565 + bne _0223828A + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #0 + bl ov62_022348B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_0223828A: + mov r1, #0 + bl sub_020057A4 + add r0, r4, #0 + mov r1, #0x2f + bl ov62_02233704 + ldr r0, _022383D8 ; =0x0000055F + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_022382A6: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_022382C8: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r5, #8 + add r0, r5, #0 + bl ov62_02231688 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022383CA +_02238316: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _022383CA + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223839A + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223834E + bl ov22_0225B020 + add r0, r4, #0 + bl ov62_0222F834 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + bl ov62_0223956C +_0223834E: + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, _022383DC ; =0x00000016 + bl sub_02006514 + ldr r0, _022383E0 ; =ov62_0222F8E4 + add r1, r4, #0 + bl sub_02017798 + b _022383CA +_0223839A: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_022383CA: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022383D0: .word 0x0000011E +_022383D4: .word 0x00000565 +_022383D8: .word 0x0000055F +_022383DC: .word 0x00000016 +_022383E0: .word ov62_0222F8E4 + thumb_func_end ov62_022380B0 + + thumb_func_start ov62_022383E4 +ov62_022383E4: ; 0x022383E4 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _022383FE + cmp r1, #1 + beq _02238470 + cmp r1, #2 + beq _022384D0 + b _0223851E +_022383FE: + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + add r1, r0, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + mov r0, #7 + mov r1, #1 + bl sub_02019060 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x25 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02030A98 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + add r0, r5, #0 + bl ov62_02239D0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022385E0 +_02238470: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022384B6 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022396E8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_022384B6: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022385E0 +_022384D0: + add r4, #8 + add r0, r4, #0 + bl ov62_02231688 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022385E0 +_0223851E: + bl ov62_02233790 + cmp r0, #0 + beq _022385E0 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _022385B0 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223855C + bl ov22_0225B020 + add r0, r5, #0 + bl ov62_0222F834 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + bl ov62_0223956C +_0223855C: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, _022385E4 ; =0x00000016 + bl sub_02006514 + ldr r0, _022385E8 ; =ov62_0222F8E4 + add r1, r5, #0 + bl sub_02017798 + b _022385E0 +_022385B0: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_022385E0: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022385E4: .word 0x00000016 +_022385E8: .word ov62_0222F8E4 + thumb_func_end ov62_022383E4 + + thumb_func_start ov62_022385EC +ov62_022385EC: ; 0x022385EC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #0 + bne _02238604 + mov r1, #1 + bl ov62_0223958C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223860A +_02238604: + mov r1, #3 + bl ov62_0222FB60 +_0223860A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_022385EC + + thumb_func_start ov62_02238610 +ov62_02238610: ; 0x02238610 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #4 + bls _02238622 + b _02238768 +_02238622: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223862E: ; jump table + .short _02238638 - _0223862E - 2 ; case 0 + .short _0223867E - _0223862E - 2 ; case 1 + .short _022386C6 - _0223862E - 2 ; case 2 + .short _022386F2 - _0223862E - 2 ; case 3 + .short _0223870C - _0223862E - 2 ; case 4 +_02238638: + mov r1, #0x3c + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x66 + str r0, [sp] + ldr r0, _02238788 ; =0x022491F0 + ldr r2, _0223878C ; =ov62_02239BAC + mov r1, #9 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x1d + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238784 +_0223867E: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022386AC + add r0, r4, #0 + mov r1, #0x72 + bl ov62_02231AAC + add r0, r4, #0 + bl ov62_02239BD8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022386AC: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02238784 +_022386C6: + mov r0, #0x1d + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0202404C + ldr r0, _02238790 ; =0x02248CAC + bl sub_02022760 + cmp r0, #0 + bne _022386E4 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _02238784 +_022386E4: + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238784 +_022386F2: + bl ov62_02239CE8 + mov r0, #0x1d + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02024034 + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223870C: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _0223872E + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02238784 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238784 +_0223872E: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223874E + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223874E: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02238784 +_02238768: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _0223877C + add r0, r4, #0 + mov r1, #4 + bl ov62_0222FB60 + b _02238784 +_0223877C: + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 +_02238784: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02238788: .word 0x022491F0 +_0223878C: .word ov62_02239BAC +_02238790: .word 0x02248CAC + thumb_func_end ov62_02238610 + + thumb_func_start ov62_02238794 +ov62_02238794: ; 0x02238794 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #4 + bls _022387A8 + b _02238932 +_022387A8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022387B4: ; jump table + .short _022387BE - _022387B4 - 2 ; case 0 + .short _022387D6 - _022387B4 - 2 ; case 1 + .short _02238878 - _022387B4 - 2 ; case 2 + .short _022388C4 - _022387B4 - 2 ; case 3 + .short _022388F8 - _022387B4 - 2 ; case 4 +_022387BE: + mov r1, #1 + bl ov62_0223958C + add r0, r4, #0 + mov r1, #0x3a + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238954 +_022387D6: + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + bne _022387E8 + b _02238954 +_022387E8: + add r0, r4, #0 + mov r1, #0x72 + bl ov62_02231AAC + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223895C ; =0x0000047C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022335B0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r3, _02238960 ; =0x02248CDC + add r2, r5, r0 + mov r6, #5 +_0223880C: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _0223880C + ldr r0, [r3, #0] + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r2, #0] + ldr r2, [r5, r1] + add r0, r1, #4 + str r2, [r5, r0] + add r0, r1, #0 + sub r0, #0x14 + ldr r0, [r5, r0] + add r1, #8 + str r0, [r5, r1] + ldr r0, _02238964 ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + mov r3, #0x1e + ldr r0, _02238964 ; =0x0000049C + lsl r3, r3, #4 + ldr r2, [r5, r3] + add r3, #0xc + add r0, r4, r0 + add r1, r4, #0 + add r3, r5, r3 + bl ov62_02232594 + ldr r1, _0223895C ; =0x0000047C + add r0, r4, r1 + add r1, #0x20 + add r1, r4, r1 + bl ov62_02233638 + ldr r0, _02238964 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + mov r2, #2 + bl ov62_0223331C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0x2e + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238954 +_02238878: + ldr r0, _0223895C ; =0x0000047C + add r0, r4, r0 + bl ov62_02233664 + ldr r1, _02238964 ; =0x0000049C + add r0, r4, r1 + sub r1, #0x10 + ldrsh r1, [r4, r1] + bl ov62_022332AC + ldr r0, _02238964 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_02232F68 + cmp r0, #0 + beq _022388AC + mov r1, #0x2e + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022388AC: + ldr r0, _02238968 ; =0x02248CAC + bl sub_02022760 + cmp r0, #0 + beq _02238954 + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238954 +_022388C4: + bl ov62_02231B8C + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223895C ; =0x0000047C + add r0, r4, r0 + bl ov62_02233600 + ldr r0, _02238964 ; =0x0000049C + add r0, r4, r0 + bl ov62_022332FC + ldr r0, _02238964 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022334FC + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022388F8: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02238918 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02238918: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02238954 +_02238932: + add r0, r4, #0 + bl ov62_02239B7C + mov r0, #0x2e + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223894C + add r0, r4, #0 + mov r1, #6 + bl ov62_0222FB60 + b _02238954 +_0223894C: + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_02238954: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0223895C: .word 0x0000047C +_02238960: .word 0x02248CDC +_02238964: .word 0x0000049C +_02238968: .word 0x02248CAC + thumb_func_end ov62_02238794 + + thumb_func_start ov62_0223896C +ov62_0223896C: ; 0x0223896C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02238986 + cmp r1, #1 + beq _022389F2 + cmp r1, #2 + beq _02238A52 + b _02238AA0 +_02238986: + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + add r1, r0, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + mov r0, #7 + mov r1, #1 + bl sub_02019060 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x25 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02030A98 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02238B62 +_022389F2: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02238A38 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022396E8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02238A38: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02238B62 +_02238A52: + add r4, #8 + add r0, r4, #0 + bl ov62_02231688 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02238B62 +_02238AA0: + bl ov62_02233790 + cmp r0, #0 + beq _02238B62 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02238B32 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02238ADE + bl ov22_0225B020 + add r0, r5, #0 + bl ov62_0222F834 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + bl ov62_0223956C +_02238ADE: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, _02238B68 ; =0x00000016 + bl sub_02006514 + ldr r0, _02238B6C ; =ov62_0222F8E4 + add r1, r5, #0 + bl sub_02017798 + b _02238B62 +_02238B32: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_02238B62: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02238B68: .word 0x00000016 +_02238B6C: .word ov62_0222F8E4 + thumb_func_end ov62_0223896C + + thumb_func_start ov62_02238B70 +ov62_02238B70: ; 0x02238B70 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _02238B86 + mov r0, #0 + pop {r3, r4, r5, pc} +_02238B86: + ldr r0, [r4, #8] + cmp r0, #4 + bls _02238B8E + b _02238CCC +_02238B8E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02238B9A: ; jump table + .short _02238BA4 - _02238B9A - 2 ; case 0 + .short _02238BE4 - _02238B9A - 2 ; case 1 + .short _02238C00 - _02238B9A - 2 ; case 2 + .short _02238C5E - _02238B9A - 2 ; case 3 + .short _02238C98 - _02238B9A - 2 ; case 4 +_02238BA4: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r1, _02238CF4 ; =0x0000011F + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, _02238CF8 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238CF0 +_02238BE4: + add r0, r4, #0 + bl ov62_0224112C + mov r1, #0x2e + lsl r1, r1, #4 + ldr r1, [r5, r1] + bl ov61_0222B1FC + cmp r0, #1 + bne _02238CF0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238CF0 +_02238C00: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #0 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _02238CF8 ; =0x00000565 + bne _02238C4A + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #1 + bl ov62_022348B8 + mov r0, #0xb9 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + mov r0, #0x6f + str r1, [r4, #0xc] + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0208B9E0 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 + b _02238CF0 +_02238C4A: + mov r1, #0 + bl sub_020057A4 + ldr r0, _02238CFC ; =0x0000055F + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238CF0 +_02238C5E: + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02238CF0 +_02238C98: + mov r1, #0xb9 + lsl r1, r1, #2 + ldr r0, [r5, r1] + cmp r0, #0 + beq _02238CB8 + add r0, r1, #0 + mov r2, #0 + sub r0, #0xb0 + str r2, [r5, r0] + sub r1, #0xb4 + str r2, [r5, r1] + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 + b _02238CF0 +_02238CB8: + ldr r1, _02238D00 ; =0x00000125 + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0xc] + b _02238CF0 +_02238CCC: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0x3c + bge _02238CDE + bl sub_02022798 + cmp r0, #1 + bne _02238CF0 +_02238CDE: + mov r0, #0 + str r0, [r4, #0xc] + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_02238CF0: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02238CF4: .word 0x0000011F +_02238CF8: .word 0x00000565 +_02238CFC: .word 0x0000055F +_02238D00: .word 0x00000125 + thumb_func_end ov62_02238B70 + + thumb_func_start ov62_02238D04 +ov62_02238D04: ; 0x02238D04 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02238D1E + cmp r1, #1 + beq _02238DA8 + cmp r1, #2 + beq _02238DBE + b _02238E26 +_02238D1E: + mov r1, #0x8d + mov r0, #0 + lsl r1, r1, #2 + str r0, [r4, #0xc] + ldr r0, [r4, r1] + lsl r0, r0, #2 + add r2, r4, r0 + add r0, r1, #0 + add r0, #8 + ldr r0, [r2, r0] + add r1, r1, #4 + ldr r1, [r4, r1] + add r0, #0x80 + bl ov61_0222AE80 + mov r1, #0x86 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, #0x20 + ldr r1, [r4, r1] + bl ov22_0225AF8C + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl ov22_0225B074 + bl ov62_02239518 + add r0, r5, #0 + mov r1, #0x23 + mov r2, #3 + bl ov62_022343B8 + add r0, r5, #0 + mov r1, #0x24 + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _02238E50 ; =ov62_022394D8 + add r1, r5, #0 + bl sub_02017798 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02238E2C +_02238DA8: + mov r1, #0 + mov r3, #2 + ldr r0, [r5, #0x28] + add r2, r1, #0 + lsl r3, r3, #8 + bl sub_02003070 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02238E2C +_02238DBE: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02238E0C + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov22_0225B074 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r1, #0x8d + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov62_02239854 + add r0, r5, #0 + bl ov62_02239498 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02238E0C: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02238E2C +_02238E26: + mov r1, #8 + bl ov62_0222FB60 +_02238E2C: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02238E4C + bl sub_020241B4 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_0225AFF8 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_02238E4C: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02238E50: .word ov62_022394D8 + thumb_func_end ov62_02238D04 + + thumb_func_start ov62_02238E54 +ov62_02238E54: ; 0x02238E54 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, _02238F14 ; =0x02248CAC + bl sub_02022760 + cmp r0, #0 + beq _02238E76 + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #9 + bl ov62_0222FB60 +_02238E76: + ldr r0, _02238F18 ; =0x02248CB8 + bl sub_02022760 + cmp r0, #0 + beq _02238E8E + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #0xa + bl ov62_0222FB60 +_02238E8E: + ldr r0, _02238F1C ; =0x02248CBC + bl sub_02022760 + cmp r0, #0 + beq _02238EBC + mov r1, #0x8d + lsl r1, r1, #2 + ldr r0, [r4, r1] + cmp r0, #0 + beq _02238EA4 + b _02238EAA +_02238EA4: + add r0, r1, #0 + add r0, #0xb0 + ldr r0, [r4, r0] +_02238EAA: + sub r0, r0, #1 + str r0, [r4, r1] + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #0xb + bl ov62_0222FB60 +_02238EBC: + ldr r0, _02238F20 ; =0x02248CC0 + bl sub_02022760 + cmp r0, #0 + beq _02238EEE + mov r1, #0x8d + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r0, r0, #1 + str r0, [r4, r1] + ldr r0, [r4, r1] + add r1, #0xb0 + ldr r1, [r4, r1] + bl sub_020E1F6C + mov r0, #0x8d + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #0xb + bl ov62_0222FB60 +_02238EEE: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02238F0E + bl sub_020241B4 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov22_0225AFF8 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_02238F0E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02238F14: .word 0x02248CAC +_02238F18: .word 0x02248CB8 +_02238F1C: .word 0x02248CBC +_02238F20: .word 0x02248CC0 + thumb_func_end ov62_02238E54 + + thumb_func_start ov62_02238F24 +ov62_02238F24: ; 0x02238F24 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02238F3A + cmp r1, #1 + beq _02238F80 + b _02239002 +_02238F3A: + ldr r1, [r4, #0xc] + cmp r1, #0 + bne _02238F58 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + add r0, r5, #0 + bl ov62_02239D0C + b _02238F72 +_02238F58: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232394 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 +_02238F72: + add r0, r5, #0 + bl ov62_02239424 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02239008 +_02238F80: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02238FE8 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02238FC2 + bl ov22_0225B020 + add r0, r5, #0 + bl ov62_0222F834 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #0x8a + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + bl ov62_0223956C +_02238FC2: + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02238FE8: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02239008 +_02239002: + mov r1, #3 + bl ov62_0222FB60 +_02239008: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02238F24 + + thumb_func_start ov62_0223900C +ov62_0223900C: ; 0x0223900C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #4 + bls _0223901E + b _022391FE +_0223901E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223902A: ; jump table + .short _02239034 - _0223902A - 2 ; case 0 + .short _0223906A - _0223902A - 2 ; case 1 + .short _022390CA - _0223902A - 2 ; case 2 + .short _02239186 - _0223902A - 2 ; case 3 + .short _022391A2 - _0223902A - 2 ; case 4 +_02239034: + ldr r1, [r4, #0xc] + cmp r1, #0 + bne _02239048 + bl ov62_02239D0C + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + b _02239062 +_02239048: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232394 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 +_02239062: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02239216 +_0223906A: + mov r2, #1 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + bne _0223907C + b _02239216 +_0223907C: + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022390C2 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022390AA + bl ov22_0225B020 + add r0, r5, #0 + bl ov62_0222F834 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #0x8a + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + bl ov62_0223956C +_022390AA: + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C +_022390C2: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02239216 +_022390CA: + ldr r1, [r4, #0xc] + cmp r1, #0 + bne _0223911A + mov r1, #1 + bl ov62_02234540 + mov r1, #0x8d + lsl r1, r1, #2 + ldr r0, [r4, r1] + lsl r0, r0, #2 + add r2, r4, r0 + add r0, r1, #0 + add r0, #8 + add r1, #0x1c + ldr r0, [r2, r0] + ldr r1, [r4, r1] + bl ov61_0222AFC0 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232378 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #0 + bl ov62_022323B8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #0x50 + mov r2, #3 + bl ov62_022343B8 + b _0223917E +_0223911A: + mov r1, #0x8d + lsl r1, r1, #2 + ldr r0, [r4, r1] + lsl r0, r0, #2 + add r2, r4, r0 + add r0, r1, #0 + add r0, #8 + ldr r0, [r2, r0] + add r1, r1, #4 + ldr r1, [r4, r1] + add r0, #0x80 + bl ov61_0222AE80 + mov r1, #0x86 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, #0x20 + ldr r1, [r4, r1] + bl ov22_0225AF8C + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl ov22_0225B074 + bl ov62_02239518 + add r0, r5, #0 + mov r1, #0x23 + mov r2, #3 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C +_0223917E: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02239216 +_02239186: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0223919A + mov r1, #0 + mov r3, #2 + ldr r0, [r5, #0x28] + add r2, r1, #0 + lsl r3, r3, #8 + bl sub_02003070 +_0223919A: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02239216 +_022391A2: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _02239216 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022391CE + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #1 + bl ov62_022323B8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + b _022391F6 +_022391CE: + mov r1, #0x8d + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov62_02239854 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov22_0225B074 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C +_022391F6: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02239216 +_022391FE: + ldr r1, [r4, #0xc] + mov r0, #1 + eor r1, r0 + str r1, [r4, #0xc] + add r0, r5, #0 + add r1, #0x79 + bl ov62_02239440 + add r0, r5, #0 + mov r1, #8 + bl ov62_0222FB60 +_02239216: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223900C + + thumb_func_start ov62_0223921C +ov62_0223921C: ; 0x0223921C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #4 + bls _0223922E + b _02239416 +_0223922E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223923A: ; jump table + .short _02239244 - _0223923A - 2 ; case 0 + .short _0223927A - _0223923A - 2 ; case 1 + .short _022392DA - _0223923A - 2 ; case 2 + .short _0223939E - _0223923A - 2 ; case 3 + .short _022393BA - _0223923A - 2 ; case 4 +_02239244: + ldr r1, [r4, #0xc] + cmp r1, #0 + bne _02239258 + bl ov62_02239D0C + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + b _02239272 +_02239258: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232394 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 +_02239272: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223941E +_0223927A: + mov r2, #1 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + bne _0223928C + b _0223941E +_0223928C: + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022392D2 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022392BA + bl ov22_0225B020 + add r0, r5, #0 + bl ov62_0222F834 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #0x8a + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + bl ov62_0223956C +_022392BA: + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C +_022392D2: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223941E +_022392DA: + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _0223934C + mov r1, #0x8d + lsl r1, r1, #2 + ldr r0, [r4, r1] + lsl r0, r0, #2 + add r2, r4, r0 + add r0, r1, #0 + add r0, #8 + ldr r0, [r2, r0] + add r1, r1, #4 + ldr r1, [r4, r1] + add r0, #0x80 + bl ov61_0222AE80 + mov r1, #0x86 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, #0x20 + ldr r1, [r4, r1] + bl ov22_0225AF8C + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl ov22_0225B074 + bl ov62_02239518 + add r0, r5, #0 + mov r1, #0x23 + mov r2, #3 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + b _0223938E +_0223934C: + mov r1, #0x8d + lsl r1, r1, #2 + ldr r0, [r4, r1] + lsl r0, r0, #2 + add r2, r4, r0 + add r0, r1, #0 + add r0, #8 + add r1, #0x1c + ldr r0, [r2, r0] + ldr r1, [r4, r1] + bl ov61_0222AFC0 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232378 + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #0 + bl ov62_022323B8 + add r0, r5, #0 + mov r1, #0x50 + mov r2, #3 + bl ov62_022343B8 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C +_0223938E: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223941E +_0223939E: + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022393B2 + mov r1, #0 + mov r3, #2 + ldr r0, [r5, #0x28] + add r2, r1, #0 + lsl r3, r3, #8 + bl sub_02003070 +_022393B2: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223941E +_022393BA: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _0223941E + ldr r0, [r4, #0xc] + cmp r0, #0 + bne _022393FA + mov r1, #0x8d + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov62_02239854 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl ov22_0225B074 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + b _0223940E +_022393FA: + mov r0, #0x25 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #1 + bl ov62_022323B8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C +_0223940E: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223941E +_02239416: + add r0, r5, #0 + mov r1, #8 + bl ov62_0222FB60 +_0223941E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223921C + + thumb_func_start ov62_02239424 +ov62_02239424: ; 0x02239424 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + add r0, r4, #0 + add r0, #0xd0 + bl sub_0201ACF4 + add r4, #0xd0 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02239424 + + thumb_func_start ov62_02239440 +ov62_02239440: ; 0x02239440 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r6, r1, #0 + add r4, #0xd0 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + add r1, r6, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02239494 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02239494: .word 0x000F0D00 + thumb_func_end ov62_02239440 + + thumb_func_start ov62_02239498 +ov62_02239498: ; 0x02239498 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r4, #0xd0 + add r0, r4, #0 + bl sub_0201A7A0 + mov r0, #3 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, #0 + mov r2, #6 + mov r3, #8 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0x79 + bl ov62_02239440 + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov62_02239498 + + thumb_func_start ov62_022394D8 +ov62_022394D8: ; 0x022394D8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r1, [r4, r0] + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022394F0 + bl ov22_0225B06C +_022394F0: + bl sub_0201DCAC + ldr r0, [r4, #0x28] + bl sub_02003694 + ldr r0, [r4, #0x24] + bl sub_0201C2B8 + ldr r3, _02239510 ; =0x027E0000 + ldr r1, _02239514 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_02239510: .word 0x027E0000 +_02239514: .word 0x00003FF8 + thumb_func_end ov62_022394D8 + + thumb_func_start ov62_02239518 +ov62_02239518: ; 0x02239518 + push {r4, r5} + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _02239560 ; =0xFFFF1FFF + add r4, r0, #0 + and r2, r1 + lsr r1, r0, #0xd + orr r1, r2 + str r1, [r0, #0] + add r4, #0x48 + ldrh r3, [r4] + mov r2, #0x3f + mov r1, #0x1f + bic r3, r2 + orr r1, r3 + mov r3, #0x20 + orr r1, r3 + strh r1, [r4] + add r4, r0, #0 + add r4, #0x4a + ldrh r5, [r4] + mov r1, #0x1e + bic r5, r2 + orr r1, r5 + orr r1, r3 + strh r1, [r4] + add r1, r0, #0 + ldr r2, _02239564 ; =0x000048B8 + add r1, #0x40 + strh r2, [r1] + ldr r1, _02239568 ; =0x00001090 + add r0, #0x44 + strh r1, [r0] + pop {r4, r5} + bx lr + ; .align 2, 0 +_02239560: .word 0xFFFF1FFF +_02239564: .word 0x000048B8 +_02239568: .word 0x00001090 + thumb_func_end ov62_02239518 + + thumb_func_start ov62_0223956C +ov62_0223956C: ; 0x0223956C + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02239584 ; =0xFFFF1FFF + and r1, r0 + str r1, [r2, #0] + ldr r2, _02239588 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + bx lr + nop +_02239584: .word 0xFFFF1FFF +_02239588: .word 0x04001000 + thumb_func_end ov62_0223956C + + thumb_func_start ov62_0223958C +ov62_0223958C: ; 0x0223958C + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + bne _022395C0 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + b _022395E6 +_022395C0: + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_020129D0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 +_022395E6: + mov r0, #0x1a + lsl r0, r0, #4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x6f + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + thumb_func_end ov62_0223958C + + thumb_func_start ov62_02239608 +ov62_02239608: ; 0x02239608 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_022312CC + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x20 + add r0, r4, r1 + add r1, r5, #0 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + mov r0, #0x6d + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + mov r0, #0x66 + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x6d + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #0x35 + bl ov62_0223124C + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_0200D364 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + mov r0, #0x1a + lsl r0, r0, #4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x6f + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223958C + pop {r3, r4, r5, pc} + thumb_func_end ov62_02239608 + + thumb_func_start ov62_022396E8 +ov62_022396E8: ; 0x022396E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0x66 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x6d + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_022396E8 + + thumb_func_start ov62_02239724 +ov62_02239724: ; 0x02239724 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r6, [r5, r0] + add r0, r6, #0 + add r0, #0x10 + bl sub_0201A7CC + cmp r0, #1 + bne _0223973E + b _0223984A +_0223973E: + add r0, r6, #0 + str r0, [sp, #0x20] + add r0, #0x10 + str r0, [sp, #0x20] + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r3, #0x10 + str r3, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [sp, #0x20] + mov r2, #2 + bl sub_0201A7E8 + ldr r0, [sp, #0x20] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x66 + bl ov62_02231690 + str r0, [sp, #0x18] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #0x38 + bl sub_0200B1EC + str r0, [sp, #0x1c] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r1, r4, #0 + bl sub_0202A1A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_022349A8 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0202A1F4 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0x18] + add r2, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r0, [sp, #0x18] + mov r1, #1 + add r2, r5, #0 + bl sub_0200BE48 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r1, r7, #0 + bl sub_0200C388 + add r0, r7, #0 + bl sub_02023C5C + mov r5, #0 + str r0, [sp, #0x14] + cmp r0, #0 + bls _0223982C + add r6, r5, #0 +_022397F0: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_02023C9C + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x80 + sub r0, r1, r0 + lsr r3, r0, #1 + str r6, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02239850 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + add r2, r4, #0 + bl sub_0201D78C + ldr r0, [sp, #0x14] + add r5, r5, #1 + add r6, #0x10 + cmp r5, r0 + blo _022397F0 +_0223982C: + ldr r0, [sp, #0x20] + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_0200B3F0 +_0223984A: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02239850: .word 0x000F0D00 + thumb_func_end ov62_02239724 + + thumb_func_start ov62_02239854 +ov62_02239854: ; 0x02239854 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r6, [r5, r0] + add r0, r6, #0 + add r0, #0x10 + bl sub_0201A7CC + cmp r0, #1 + bne _0223986E + b _0223997A +_0223986E: + add r0, r6, #0 + str r0, [sp, #0x20] + add r0, #0x10 + str r0, [sp, #0x20] + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r3, #0x10 + str r3, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [sp, #0x20] + mov r2, #2 + bl sub_0201A7E8 + ldr r0, [sp, #0x20] + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x66 + bl ov62_02231690 + str r0, [sp, #0x18] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #0x38 + bl sub_0200B1EC + str r0, [sp, #0x1c] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r1, r4, #0 + bl sub_0202A1A0 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_022349A8 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0202A1F4 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0x18] + add r2, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r0, [sp, #0x18] + mov r1, #1 + add r2, r5, #0 + bl sub_0200BE48 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + add r1, r7, #0 + bl sub_0200C388 + add r0, r7, #0 + bl sub_02023C5C + mov r5, #0 + str r0, [sp, #0x14] + cmp r0, #0 + bls _0223995C + add r6, r5, #0 +_02239920: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl sub_02023C9C + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x80 + sub r0, r1, r0 + lsr r3, r0, #1 + str r6, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02239980 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + add r2, r4, #0 + bl sub_0201D78C + ldr r0, [sp, #0x14] + add r5, r5, #1 + add r6, #0x10 + cmp r5, r0 + blo _02239920 +_0223995C: + ldr r0, [sp, #0x20] + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_0200B3F0 +_0223997A: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02239980: .word 0x000F0D00 + thumb_func_end ov62_02239854 + + thumb_func_start ov62_02239984 +ov62_02239984: ; 0x02239984 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #8] + add r0, r1, #1 + ldr r2, _02239A04 ; =0x022497D4 + lsl r0, r0, #1 + ldrh r4, [r2, r0] + lsl r0, r1, #1 + ldrh r6, [r2, r0] + ldr r1, [sp, #8] + mov r0, #0x66 + add r2, sp, #0xc + bl ov62_02231948 + str r0, [sp, #4] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02027560 + str r0, [sp] + add r7, r6, #0 + cmp r6, r4 + bge _022399D6 + ldr r0, [sp, #4] + lsl r1, r6, #1 + add r5, r0, r1 +_022399BE: + ldrh r1, [r5] + ldr r0, [sp] + bl sub_02026FE8 + cmp r0, #0 + bne _022399CE + ldr r0, _02239A08 ; =0x0000FFFF + strh r0, [r5] +_022399CE: + add r7, r7, #1 + add r5, r5, #2 + cmp r7, r4 + blt _022399BE +_022399D6: + cmp r6, r4 + bge _022399F6 + ldr r0, [sp, #4] + lsl r1, r6, #1 + add r2, r0, r1 + ldr r0, _02239A08 ; =0x0000FFFF +_022399E2: + ldrh r1, [r2] + cmp r1, r0 + beq _022399EE + mov r0, #1 + str r0, [sp, #8] + b _022399F6 +_022399EE: + add r6, r6, #1 + add r2, r2, #2 + cmp r6, r4 + blt _022399E2 +_022399F6: + ldr r0, [sp, #4] + bl sub_020181C4 + ldr r0, [sp, #8] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02239A04: .word 0x022497D4 +_02239A08: .word 0x0000FFFF + thumb_func_end ov62_02239984 + + thumb_func_start ov62_02239A0C +ov62_02239A0C: ; 0x02239A0C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r0, r1, #1 + ldr r2, _02239B74 ; =0x022497D4 + lsl r0, r0, #1 + ldrh r6, [r2, r0] + lsl r0, r1, #1 + ldrh r0, [r2, r0] + mov r2, #0x76 + lsl r2, r2, #2 + str r0, [sp] + mov r0, #0x66 + mov r1, #0 + add r2, r4, r2 + bl ov62_02231948 + mov r2, #0x77 + lsl r2, r2, #2 + str r0, [r4, r2] + sub r2, r2, #4 + mov r0, #0x66 + mov r1, #0 + add r2, r4, r2 + bl ov62_02231948 + str r0, [sp, #8] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02027560 + str r0, [sp, #4] + mov r0, #0x75 + ldr r7, [sp] + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r7, #0 + cmp r0, r6 + bge _02239A92 + lsl r1, r0, #1 + ldr r0, [sp, #8] + add r5, r0, r1 +_02239A6A: + ldrh r1, [r5] + ldr r0, [sp, #4] + bl sub_02026FE8 + cmp r0, #0 + bne _02239A7C + ldr r0, _02239B78 ; =0x0000FFFF + strh r0, [r5] + b _02239A8A +_02239A7C: + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r0, #1 + mov r0, #0x75 + lsl r0, r0, #2 + str r1, [r4, r0] +_02239A8A: + add r7, r7, #1 + add r5, r5, #2 + cmp r7, r6 + blt _02239A6A +_02239A92: + ldr r1, [sp] + mov r0, #0 + cmp r1, r6 + bge _02239AC2 + lsl r2, r1, #1 + ldr r1, [sp, #8] + ldr r7, _02239B78 ; =0x0000FFFF + add r2, r1, r2 + add r3, r0, #0 +_02239AA4: + ldrh r1, [r2] + cmp r1, r7 + beq _02239AB6 + mov r5, #0x77 + lsl r5, r5, #2 + ldr r5, [r4, r5] + add r0, r0, #1 + strh r1, [r5, r3] + add r3, r3, #2 +_02239AB6: + ldr r1, [sp] + add r2, r2, #2 + add r1, r1, #1 + str r1, [sp] + cmp r1, r6 + blt _02239AA4 +_02239AC2: + mov r1, #0x76 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r0, r1 + bge _02239AEA + mov r7, #0x77 + ldr r1, [sp, #8] + lsl r6, r0, #1 + lsl r7, r7, #2 + add r5, r1, r6 + sub r1, r7, #4 +_02239AD8: + ldrh r3, [r5] + ldr r2, [r4, r7] + add r0, r0, #1 + strh r3, [r2, r6] + ldr r2, [r4, r1] + add r5, r5, #2 + add r6, r6, #2 + cmp r0, r2 + blt _02239AD8 +_02239AEA: + ldr r0, [sp, #8] + bl sub_020181C4 + mov r1, #0x75 + lsl r1, r1, #2 + ldr r1, [r4, r1] + mov r0, #0x66 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x7a + lsl r2, r2, #2 + str r0, [r4, r2] + ldr r0, [r4, r2] + sub r2, #0x14 + ldr r2, [r4, r2] + mov r1, #0 + lsl r2, r2, #4 + bl sub_020C4CF4 + mov r0, #0x75 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r5, #0 + cmp r0, #0 + ble _02239B54 + mov r7, #0x7a + lsl r7, r7, #2 + add r0, r7, #0 + add r2, r5, #0 + add r3, r5, #0 + sub r0, #0x14 +_02239B2A: + mov r1, #0x77 + lsl r1, r1, #2 + ldr r1, [r4, r1] + mov r6, #0x7a + lsl r6, r6, #2 + ldrh r1, [r1, r2] + ldr r6, [r4, r6] + add r5, r5, #1 + str r1, [r6, r3] + mov r1, #0x77 + lsl r1, r1, #2 + ldr r1, [r4, r1] + ldr r6, [r4, r7] + ldrh r1, [r1, r2] + add r6, r6, r3 + add r2, r2, #2 + str r1, [r6, #4] + ldr r1, [r4, r0] + add r3, #0x10 + cmp r5, r1 + blt _02239B2A +_02239B54: + mov r2, #0x67 + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x66 + bl sub_0200B144 + mov r1, #0x1e + lsl r1, r1, #4 + str r0, [r4, r1] + mov r2, #1 + add r0, r1, #4 + str r2, [r4, r0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02239B74: .word 0x022497D4 +_02239B78: .word 0x0000FFFF + thumb_func_end ov62_02239A0C + + thumb_func_start ov62_02239B7C +ov62_02239B7C: ; 0x02239B7C + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x77 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x79 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} + thumb_func_end ov62_02239B7C + + thumb_func_start ov62_02239BAC +ov62_02239BAC: ; 0x02239BAC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #0 + bne _02239BD2 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02239984 + cmp r0, #0 + bne _02239BCA + ldr r0, _02239BD4 ; =0x00000564 + bl sub_02005748 + pop {r3, r4, r5, pc} +_02239BCA: + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02239A0C +_02239BD2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02239BD4: .word 0x00000564 + thumb_func_end ov62_02239BAC + + thumb_func_start ov62_02239BD8 +ov62_02239BD8: ; 0x02239BD8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r0, [sp, #0x14] + mov r0, #1 + str r0, [sp, #0x28] + mov r1, #0x86 + ldr r0, [sp, #0x14] + lsl r1, r1, #4 + ldr r4, [r0, r1] + ldr r5, _02239CDC ; =0x022491F0 + mov r7, #0 + add r4, #0xd0 +_02239BF0: + ldrb r0, [r5, #2] + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #0x24] + ldrb r0, [r5] + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #0x20] + ldrb r0, [r5, #3] + lsr r1, r0, #3 + ldr r0, [sp, #0x24] + sub r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + ldrb r0, [r5, #1] + lsr r1, r0, #3 + ldr r0, [sp, #0x20] + sub r0, r1, r0 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + add r0, r4, #0 + bl sub_0201A7A0 + ldr r0, [sp, #0x20] + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0x1c] + mov r2, #6 + str r0, [sp, #4] + str r6, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [sp, #0x24] + ldr r0, [r0, #0x24] + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + add r1, r7, #0 + ldr r0, [r0, #0x48] + add r1, #0x44 + bl sub_0200B1EC + str r0, [sp, #0x2c] + ldr r1, [sp, #0x2c] + add r0, r4, #0 + bl ov62_0223429C + lsl r1, r6, #3 + sub r1, #0x10 + str r0, [sp, #0x30] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r1, r7, #0 + bl ov62_02239984 + cmp r0, #1 + bne _02239C9A + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x2c] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02239CE0 ; =0x000F0D00 + ldr r3, [sp, #0x30] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0 + bl sub_0201D78C + b _02239CB6 +_02239C9A: + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x2c] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02239CE4 ; =0x000C0B00 + ldr r3, [sp, #0x30] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0 + bl sub_0201D78C +_02239CB6: + add r0, r4, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x2c] + bl sub_020237BC + ldr r0, [sp, #0x1c] + add r7, r7, #1 + add r1, r0, #0 + ldr r0, [sp, #0x28] + mul r1, r6 + add r0, r0, r1 + str r0, [sp, #0x28] + add r4, #0x10 + add r5, r5, #4 + cmp r7, #9 + blo _02239BF0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02239CDC: .word 0x022491F0 +_02239CE0: .word 0x000F0D00 +_02239CE4: .word 0x000C0B00 + thumb_func_end ov62_02239BD8 + + thumb_func_start ov62_02239CE8 +ov62_02239CE8: ; 0x02239CE8 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r5, [r0, r1] + mov r4, #0 + add r5, #0xd0 +_02239CF4: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #9 + blo _02239CF4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02239CE8 + + thumb_func_start ov62_02239D0C +ov62_02239D0C: ; 0x02239D0C + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A7CC + cmp r0, #1 + bne _02239D30 + add r0, r4, #0 + add r0, #0x10 + bl sub_0201ACF4 + add r4, #0x10 + add r0, r4, #0 + bl sub_0201A8FC +_02239D30: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02239D0C + + thumb_func_start ov62_02239D34 +ov62_02239D34: ; 0x02239D34 + bx lr + ; .align 2, 0 + thumb_func_end ov62_02239D34 + + thumb_func_start ov62_02239D38 +ov62_02239D38: ; 0x02239D38 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r1, [r1, #0] + ldr r4, [r0, r2] + cmp r1, #1 + beq _02239D5C + bl ov62_0224112C + mov r1, #0x8f + lsl r1, r1, #2 + add r1, r4, r1 + mov r2, #5 + bl ov61_0222BC90 + mov r1, #0xb9 + lsl r1, r1, #2 + str r0, [r4, r1] +_02239D5C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02239D38 + + .rodata + + + .global Unk_ov62_02248CAC +Unk_ov62_02248CAC: ; 0x02248CAC + .incbin "incbin/overlay62_rodata.bin", 0x580, 0x584 - 0x580 + + .global Unk_ov62_02248CB0 +Unk_ov62_02248CB0: ; 0x02248CB0 + .incbin "incbin/overlay62_rodata.bin", 0x584, 0x58C - 0x584 + + .global Unk_ov62_02248CB8 +Unk_ov62_02248CB8: ; 0x02248CB8 + .incbin "incbin/overlay62_rodata.bin", 0x58C, 0x598 - 0x58C + + .global Unk_ov62_02248CC4 +Unk_ov62_02248CC4: ; 0x02248CC4 + .incbin "incbin/overlay62_rodata.bin", 0x598, 0x5B0 - 0x598 + + .global Unk_ov62_02248CDC +Unk_ov62_02248CDC: ; 0x02248CDC + .incbin "incbin/overlay62_rodata.bin", 0x5B0, 0x5DC - 0x5B0 + + .global Unk_ov62_02248D08 +Unk_ov62_02248D08: ; 0x02248D08 + .incbin "incbin/overlay62_rodata.bin", 0x5DC, 0x5F4 - 0x5DC + + .global Unk_ov62_02248D20 +Unk_ov62_02248D20: ; 0x02248D20 + .incbin "incbin/overlay62_rodata.bin", 0x5F4, 0x30 + + + .data + + + .global Unk_ov62_022497D4 +Unk_ov62_022497D4: ; 0x022497D4 + .incbin "incbin/overlay62_data.bin", 0x14, 0x14 + diff --git a/asm/ov62_02239D60.s b/asm/ov62_02239D60.s new file mode 100644 index 000000000..ac6b3b646 --- /dev/null +++ b/asm/ov62_02239D60.s @@ -0,0 +1,5599 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02239D60 +ov62_02239D60: ; 0x02239D60 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x66 + bl sub_02030A80 + ldr r1, _02239D88 ; =0x00002ED8 + str r0, [r4, r1] + lsl r0, r5, #2 + add r2, r4, r0 + mov r0, #0xe3 + lsl r0, r0, #2 + ldr r0, [r2, r0] + ldr r1, [r4, r1] + bl ov61_0222AFC0 + pop {r3, r4, r5, pc} + nop +_02239D88: .word 0x00002ED8 + thumb_func_end ov62_02239D60 + + thumb_func_start ov62_02239D8C +ov62_02239D8C: ; 0x02239D8C + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _02239D9C ; =0x00002ED8 + ldr r3, _02239DA0 ; =sub_02030A98 + ldr r0, [r1, r0] + bx r3 + nop +_02239D9C: .word 0x00002ED8 +_02239DA0: .word sub_02030A98 + thumb_func_end ov62_02239D8C + + thumb_func_start ov62_02239DA4 +ov62_02239DA4: ; 0x02239DA4 + mov r2, #0 +_02239DA6: + ldrh r1, [r0, #0x28] + cmp r1, #0 + beq _02239DB0 + mov r0, #1 + bx lr +_02239DB0: + add r2, r2, #1 + add r0, r0, #2 + cmp r2, #0x1e + blt _02239DA6 + mov r0, #0 + bx lr + thumb_func_end ov62_02239DA4 + + thumb_func_start ov62_02239DBC +ov62_02239DBC: ; 0x02239DBC + push {r3, r4} + mov r1, #0x1b + lsl r1, r1, #4 + ldr r4, [r0, r1] + add r2, r4, #0 + cmp r4, #0x1e + bge _02239DE6 + lsl r1, r4, #1 + add r3, r0, r1 +_02239DCE: + ldrh r1, [r3, #0x2c] + cmp r1, #0 + beq _02239DDE + mov r1, #0x1b + lsl r1, r1, #4 + str r2, [r0, r1] + pop {r3, r4} + bx lr +_02239DDE: + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #0x1e + blt _02239DCE +_02239DE6: + mov r3, #0 + cmp r4, #0 + ble _02239E06 + add r2, r0, #0 +_02239DEE: + ldrh r1, [r2, #0x2c] + cmp r1, #0 + beq _02239DFE + mov r1, #0x1b + lsl r1, r1, #4 + str r3, [r0, r1] + pop {r3, r4} + bx lr +_02239DFE: + add r3, r3, #1 + add r2, r2, #2 + cmp r3, r4 + blt _02239DEE +_02239E06: + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov62_02239DBC + + thumb_func_start ov62_02239E0C +ov62_02239E0C: ; 0x02239E0C + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r5, r2] + cmp r0, #3 + bhi _02239EBA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02239E26: ; jump table + .short _02239E2E - _02239E26 - 2 ; case 0 + .short _02239E54 - _02239E26 - 2 ; case 1 + .short _02239E80 - _02239E26 - 2 ; case 2 + .short _02239E94 - _02239E26 - 2 ; case 3 +_02239E2E: + cmp r1, #2 + bne _02239EBA + add r0, r5, #0 + bl ov62_02234520 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0 + ble _02239E46 + sub r1, r1, #1 + b _02239E48 +_02239E46: + mov r1, #0x11 +_02239E48: + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239E54: + cmp r1, #2 + bne _02239EBA + add r0, r5, #0 + bl ov62_02234520 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + mov r1, #0x12 + bl sub_020E1F6C + mov r0, #0x1a + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239E80: + cmp r1, #0 + bne _02239EBA + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #9 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239E94: + cmp r1, #0 + bne _02239EBA + add r0, r5, #0 + bl ov62_02234520 + add r0, r4, #4 + bl ov62_02239DA4 + cmp r0, #0 + beq _02239EB2 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239EB2: + ldr r1, _02239EBC ; =0x0000010F + add r0, r5, #0 + bl ov62_0223AC0C +_02239EBA: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02239EBC: .word 0x0000010F + thumb_func_end ov62_02239E0C + + thumb_func_start ov62_02239EC0 +ov62_02239EC0: ; 0x02239EC0 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x86 + add r4, r2, #0 + lsl r0, r0, #4 + ldr r6, [r4, r0] + cmp r1, #0 + bne _02239EF8 + cmp r5, #6 + beq _02239EEA + add r0, r4, #0 + bl ov62_02234520 + mov r0, #0xe + lsl r0, r0, #6 + str r5, [r6, r0] + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 + pop {r4, r5, r6, pc} +_02239EEA: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 +_02239EF8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_02239EC0 + + thumb_func_start ov62_02239EFC +ov62_02239EFC: ; 0x02239EFC + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x86 + add r4, r2, #0 + lsl r0, r0, #4 + ldr r6, [r4, r0] + cmp r1, #0 + bne _02239F34 + cmp r5, #6 + beq _02239F26 + add r0, r4, #0 + bl ov62_02234520 + mov r0, #0xe + lsl r0, r0, #6 + str r5, [r6, r0] + add r0, r4, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r4, r5, r6, pc} +_02239F26: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0xc + bl ov62_0222FB60 +_02239F34: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_02239EFC + + thumb_func_start ov62_02239F38 +ov62_02239F38: ; 0x02239F38 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r5, r2] + cmp r1, #0 + bne _02239F92 + cmp r0, #0 + beq _02239F52 + cmp r0, #1 + beq _02239F74 + cmp r0, #2 + beq _02239F84 +_02239F52: + add r0, r5, #0 + bl ov62_02234520 + ldr r0, _02239F94 ; =0x00002F64 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02239F6A + add r0, r5, #0 + mov r1, #7 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239F6A: + add r0, r5, #0 + mov r1, #8 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239F74: + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #9 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02239F84: + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #6 + bl ov62_0222FB60 +_02239F92: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02239F94: .word 0x00002F64 + thumb_func_end ov62_02239F38 + + thumb_func_start ov62_02239F98 +ov62_02239F98: ; 0x02239F98 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r5, r2] + cmp r1, #0 + bne _0223A0A0 + cmp r0, #0 + beq _02239FB0 + cmp r0, #1 + beq _0223A078 + pop {r3, r4, r5, pc} +_02239FB0: + add r0, r5, #0 + bl ov62_02234520 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + mov r1, #0x1e + bl sub_020E1F6C + mov r0, #0x1b + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + bl ov62_02239DBC + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #6 + bl sub_020E1F6C + ldr r0, _0223A0A4 ; =0x00002F68 + str r1, [r4, r0] + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #6 + bl sub_020E1F6C + ldr r2, _0223A0A8 ; =0x00002F6C + str r0, [r4, r2] + sub r1, r2, #4 + ldr r3, [r4, r1] + mov r1, #0x18 + mul r1, r3 + ldr r3, [r4, r2] + mov r2, #0x16 + mov r0, #0x6f + mul r2, r3 + lsl r0, r0, #4 + add r1, #0x6e + add r2, #0x34 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8B8 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223B140 + add r0, r5, #0 + bl ov62_0223B050 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r1, #0x1b + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov62_0223ADC0 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r2, [r4, r0] + lsl r1, r2, #1 + add r1, r4, r1 + ldrh r1, [r1, #0x2c] + cmp r1, #0 + beq _0223A0A0 + sub r0, #0x58 + mov r1, #1 + ldr r0, [r4, r0] + lsl r1, r2 + bl ov62_0223ADB0 + cmp r0, #1 + beq _0223A0A0 + mov r1, #0x1b + lsl r1, r1, #4 + ldr r2, [r4, r1] + sub r1, #0x54 + lsl r0, r2, #1 + add r0, r4, r0 + add r2, r4, r2 + ldrh r0, [r0, #0x2c] + ldrb r1, [r2, r1] + bl sub_02005844 + pop {r3, r4, r5, pc} +_0223A078: + add r0, r5, #0 + bl ov62_02234520 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r5, #0 + mov r1, #0xb + bl ov62_0222FB60 +_0223A0A0: + pop {r3, r4, r5, pc} + nop +_0223A0A4: .word 0x00002F68 +_0223A0A8: .word 0x00002F6C + thumb_func_end ov62_02239F98 + + thumb_func_start ov62_0223A0AC +ov62_0223A0AC: ; 0x0223A0AC + push {r3, r4, r5, lr} + sub sp, #0x18 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_0223131C + mov r0, #0x20 + str r0, [sp] + mov r0, #0xe8 + str r0, [sp, #4] + mov r0, #0x24 + str r0, [sp, #8] + sub r0, #0x2c + str r0, [sp, #0xc] + mov r0, #0 + mov r1, #0xd2 + str r0, [sp, #0x10] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, r4, r1 + mov r2, #2 + mov r3, #3 + bl ov62_0223454C + mov r0, #0x80 + str r0, [sp] + mov r0, #0xe8 + str r0, [sp, #4] + mov r0, #0x24 + str r0, [sp, #8] + sub r0, #0x2c + str r0, [sp, #0xc] + mov r0, #1 + mov r1, #0xd9 + str r0, [sp, #0x10] + lsl r1, r1, #2 + str r0, [sp, #0x14] + add r0, r5, #0 + add r1, r4, r1 + mov r2, #2 + mov r3, #0x35 + bl ov62_0223454C + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223A0AC + + thumb_func_start ov62_0223A110 +ov62_0223A110: ; 0x0223A110 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0xd2 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022345A8 + mov r0, #0xd9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022345A8 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223A110 + + thumb_func_start ov62_0223A138 +ov62_0223A138: ; 0x0223A138 + mov r2, #0 + add r3, r0, #0 +_0223A13C: + ldrh r1, [r3, #0x2c] + cmp r1, #0 + beq _0223A14A + mov r1, #0x1b + lsl r1, r1, #4 + str r2, [r0, r1] + bx lr +_0223A14A: + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #0x1e + blt _0223A13C + bx lr + thumb_func_end ov62_0223A138 + + thumb_func_start ov62_0223A154 +ov62_0223A154: ; 0x0223A154 + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + mov r2, #0x67 + add r4, r1, #0 + add r7, r3, #0 + add r5, r0, #0 + add r0, r7, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + mov r0, #0x66 + str r0, [sp] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov61_0222AE88 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_0223A154 + + thumb_func_start ov62_0223A17C +ov62_0223A17C: ; 0x0223A17C + push {r3, r4, r5, lr} + ldr r1, _0223A280 ; =0x00002F70 + add r5, r0, #0 + mov r0, #0x66 + bl sub_02018144 + ldr r2, _0223A280 ; =0x00002F70 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02024420 + str r0, [r4, #0] + mov r0, #0x83 + mov r2, #0x1a + lsl r0, r0, #4 + lsl r2, r2, #4 + ldr r0, [r5, r0] + ldr r1, [r4, #0] + ldr r2, [r4, r2] + add r3, r4, #4 + bl ov62_0223A154 + add r0, r4, #0 + bl ov62_0223A138 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #0 + bl ov62_022315C8 + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223A284 ; =0x02248DB4 + ldr r2, _0223A288 ; =ov62_02239E0C + mov r1, #4 + add r3, r5, #0 + bl sub_02023FCC + mov r1, #0x33 + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223A28C ; =0x02248DDC + ldr r2, _0223A290 ; =ov62_02239EC0 + mov r1, #7 + add r3, r5, #0 + bl sub_02023FCC + mov r1, #0xcd + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223A28C ; =0x02248DDC + ldr r2, _0223A294 ; =ov62_02239EFC + mov r1, #7 + add r3, r5, #0 + bl sub_02023FCC + mov r1, #0xce + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223A298 ; =0x02248D6C + ldr r2, _0223A29C ; =ov62_02239F38 + mov r1, #3 + add r3, r5, #0 + bl sub_02023FCC + mov r1, #0xcf + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223A2A0 ; =0x02248D54 + ldr r2, _0223A2A4 ; =ov62_02239F98 + mov r1, #2 + add r3, r5, #0 + bl sub_02023FCC + mov r1, #0xd + lsl r1, r1, #6 + str r0, [r4, r1] + mov r0, #0x66 + bl sub_02030A80 + mov r1, #0xe1 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0x83 + lsl r1, r1, #4 + ldr r1, [r5, r1] + bl sub_02030AA0 + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223A280: .word 0x00002F70 +_0223A284: .word 0x02248DB4 +_0223A288: .word ov62_02239E0C +_0223A28C: .word 0x02248DDC +_0223A290: .word ov62_02239EC0 +_0223A294: .word ov62_02239EFC +_0223A298: .word 0x02248D6C +_0223A29C: .word ov62_02239F38 +_0223A2A0: .word 0x02248D54 +_0223A2A4: .word ov62_02239F98 + thumb_func_end ov62_0223A17C + + thumb_func_start ov62_0223A2A8 +ov62_0223A2A8: ; 0x0223A2A8 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223A2C2 + cmp r1, #1 + beq _0223A32E + cmp r1, #2 + beq _0223A35E + b _0223A388 +_0223A2C2: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _0223A2D8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223A2D8: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223A38E +_0223A32E: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223A38E +_0223A35E: + bl ov62_02233790 + cmp r0, #0 + beq _0223A38E + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223A0AC + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + bl ov62_02234314 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223A38E +_0223A388: + mov r1, #2 + bl ov62_0222FB60 +_0223A38E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223A2A8 + + thumb_func_start ov62_0223A394 +ov62_0223A394: ; 0x0223A394 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _0223A3A8 + b _0223A4B8 +_0223A3A8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223A3B4: ; jump table + .short _0223A3BC - _0223A3B4 - 2 ; case 0 + .short _0223A3FE - _0223A3B4 - 2 ; case 1 + .short _0223A436 - _0223A3B4 - 2 ; case 2 + .short _0223A462 - _0223A3B4 - 2 ; case 3 +_0223A3BC: + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + bl ov62_02231560 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223B140 + add r0, r4, #0 + bl ov62_0223AFEC + add r0, r4, #0 + bl ov62_0223AD7C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223A3FE: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + mov r2, #1 + add r1, r5, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A4B8 + mov r0, #0x83 + mov r2, #0x1a + lsl r0, r0, #4 + lsl r2, r2, #4 + ldr r0, [r4, r0] + ldr r1, [r5, #0] + ldr r2, [r5, r2] + add r3, r5, #4 + bl ov62_0223A154 + add r0, r5, #0 + bl ov62_0223A138 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A4B8 +_0223A436: + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223B230 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223B124 + add r0, r4, #0 + mov r1, #0 + bl ov62_0223AFC0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A4B8 +_0223A462: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A4B8 + mov r1, #0x1b + lsl r1, r1, #4 + ldr r1, [r5, r1] + add r0, r4, #0 + bl ov62_0223ADC0 + add r0, r4, #0 + bl ov62_0223AD20 + ldr r1, _0223A4C0 ; =0x0000010E + add r0, r4, #0 + bl ov62_0223AC0C + add r0, r4, #0 + mov r1, #0 + bl ov62_0223B124 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223AFC0 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _0223A4C4 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223A4B8: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223A4C0: .word 0x0000010E +_0223A4C4: .word 0x04000050 + thumb_func_end ov62_0223A394 + + thumb_func_start ov62_0223A4C8 +ov62_0223A4C8: ; 0x0223A4C8 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + bne _0223A4FC + mov r0, #0xda + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #0xdb + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + mov r0, #0xd3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + b _0223A522 +_0223A4FC: + mov r0, #0xda + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0xdb + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_020129D0 + mov r0, #0xd3 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 +_0223A522: + mov r0, #0x35 + lsl r0, r0, #4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0xdb + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + thumb_func_end ov62_0223A4C8 + + thumb_func_start ov62_0223A544 +ov62_0223A544: ; 0x0223A544 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + beq _0223A55C + cmp r0, #1 + beq _0223A5D2 + b _0223A62A +_0223A55C: + ldr r0, _0223A630 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B9E0 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A5B4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x4f + mov r3, #7 + bl sub_0200710C + add r0, r5, #0 + bl ov62_0223AB14 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223A4C8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223A5B4: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223A62A +_0223A5D2: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A60E + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r5, #0 + mov r1, #6 + bl ov62_0222FB60 + mov r1, #0x11 + add r0, r5, #0 + lsl r1, r1, #4 + bl ov62_0223AC0C +_0223A60E: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223A62A: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223A630: .word 0x000006F4 + thumb_func_end ov62_0223A544 + + thumb_func_start ov62_0223A634 +ov62_0223A634: ; 0x0223A634 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0xcd + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223A634 + + thumb_func_start ov62_0223A64C +ov62_0223A64C: ; 0x0223A64C + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _0223A666 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, pc} +_0223A666: + ldr r0, [r4, #8] + cmp r0, #7 + bls _0223A66E + b _0223A824 +_0223A66E: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223A67A: ; jump table + .short _0223A68A - _0223A67A - 2 ; case 0 + .short _0223A6A8 - _0223A67A - 2 ; case 1 + .short _0223A6F4 - _0223A67A - 2 ; case 2 + .short _0223A73A - _0223A67A - 2 ; case 3 + .short _0223A73E - _0223A67A - 2 ; case 4 + .short _0223A780 - _0223A67A - 2 ; case 5 + .short _0223A7AA - _0223A67A - 2 ; case 6 + .short _0223A802 - _0223A67A - 2 ; case 7 +_0223A68A: + add r0, r4, #0 + bl ov62_0223ABBC + ldr r0, _0223A834 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223A6A8: + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + bl ov62_02231560 + add r0, r4, #0 + bl ov62_0223B140 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223AFEC + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223AD7C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A82C +_0223A6F4: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A71C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223A71C: + ldr r0, [r4, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223A82C +_0223A73A: + add r0, r0, #1 + str r0, [r4, #8] +_0223A73E: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r1, #0x12 + add r0, r4, #0 + lsl r1, r1, #4 + bl ov62_02231AAC + ldr r0, _0223A838 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A82C +_0223A780: + add r0, r4, #0 + bl ov62_0224112C + mov r1, #0x1a + lsl r1, r1, #4 + ldr r1, [r5, r1] + mov r2, #0xe + str r1, [sp] + lsl r2, r2, #6 + ldr r1, [r5, r2] + add r2, r2, #4 + ldr r2, [r5, r2] + ldr r3, [r5, #0] + bl ov61_0222B224 + cmp r0, #1 + bne _0223A82C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A82C +_0223A7AA: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #0xc + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _0223A838 ; =0x00000565 + bne _0223A7DE + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #0xc] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #2 + bl ov62_022348B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A82C +_0223A7DE: + mov r1, #0 + bl sub_020057A4 + add r0, r4, #0 + mov r1, #0x30 + bl ov62_02233704 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223196C + ldr r0, _0223A83C ; =0x0000055F + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A82C +_0223A802: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223A82C +_0223A824: + add r0, r4, #0 + mov r1, #0xa + bl ov62_0222FB60 +_0223A82C: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223A834: .word 0x000006F4 +_0223A838: .word 0x00000565 +_0223A83C: .word 0x0000055F + thumb_func_end ov62_0223A64C + + thumb_func_start ov62_0223A840 +ov62_0223A840: ; 0x0223A840 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + beq _0223A85C + cmp r0, #1 + beq _0223A87A + cmp r0, #2 + beq _0223A8E0 + b _0223A92E +_0223A85C: + ldr r0, _0223A934 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B9E0 + add r0, r5, #0 + bl ov62_0223ABBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223A87A: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A8C2 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223A4C8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x4d + mov r3, #7 + bl sub_0200710C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223A8C2: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223A92E +_0223A8E0: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A912 + ldr r1, _0223A938 ; =0x0000010E + add r0, r5, #0 + bl ov62_0223AC0C + add r0, r5, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223A912: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223A92E: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223A934: .word 0x000006F4 +_0223A938: .word 0x0000010E + thumb_func_end ov62_0223A840 + + thumb_func_start ov62_0223A93C +ov62_0223A93C: ; 0x0223A93C + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223A958 + cmp r1, #1 + beq _0223A9A2 + cmp r1, #2 + beq _0223A9E8 + b _0223A9EE +_0223A958: + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + bl ov62_02231560 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223B140 + add r0, r5, #0 + bl ov62_0223AFEC + add r0, r5, #0 + bl ov62_0223AD7C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223A9A2: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223A9CA + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223A9CA: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223A9EE +_0223A9E8: + mov r1, #0xa + bl ov62_0222FB60 +_0223A9EE: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov62_0223A93C + + thumb_func_start ov62_0223A9F4 +ov62_0223A9F4: ; 0x0223A9F4 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223AA10 + cmp r1, #1 + beq _0223AA3C + cmp r1, #2 + beq _0223AA82 + b _0223AA88 +_0223AA10: + bl ov62_0223ABBC + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + bl ov62_02231560 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223AA3C: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223AA64 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223AA64: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223AA88 +_0223AA82: + mov r1, #0xd + bl ov62_0222FB60 +_0223AA88: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223A9F4 + + thumb_func_start ov62_0223AA90 +ov62_0223AA90: ; 0x0223AA90 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + mov r1, #0x86 + ldr r6, _0223AB08 ; =0x00000101 + ldr r0, [sp, #0x14] + lsl r1, r1, #4 + ldr r1, [r0, r1] + add r0, r6, #0 + add r0, #0xb3 + ldr r5, _0223AB0C ; =0x02248D9C + ldr r7, _0223AB10 ; =0x02248D78 + add r4, r1, r0 +_0223AAAE: + add r0, r4, #0 + bl sub_0201A7A0 + ldrb r0, [r5, #1] + add r1, r4, #0 + mov r2, #2 + str r0, [sp] + ldrb r0, [r5, #2] + str r0, [sp, #4] + ldrb r0, [r5, #3] + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldrb r3, [r5] + ldr r0, [r0, #0x24] + bl sub_0201A7E8 + ldr r1, [r7, #0] + add r0, r4, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201A9A4 + ldrb r1, [r5, #2] + ldrb r0, [r5, #3] + add r4, #0x10 + add r5, r5, #4 + mul r0, r1 + add r6, r6, r0 + ldr r0, [sp, #0x18] + add r7, r7, #4 + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #3 + blt _0223AAAE + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223AB08: .word 0x00000101 +_0223AB0C: .word 0x02248D9C +_0223AB10: .word 0x02248D78 + thumb_func_end ov62_0223AA90 + + thumb_func_start ov62_0223AB14 +ov62_0223AB14: ; 0x0223AB14 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r1, [r0, r1] + mov r0, #0x8d + lsl r0, r0, #2 + ldr r5, _0223ABB4 ; =0x02248DC4 + mov r6, #1 + mov r7, #0 + add r4, r1, r0 +_0223AB2C: + add r0, r4, #0 + bl sub_0201A7A0 + ldrb r0, [r5, #1] + add r1, r4, #0 + mov r2, #6 + str r0, [sp] + ldrb r0, [r5, #2] + str r0, [sp, #4] + ldrb r0, [r5, #3] + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldrb r3, [r5] + ldr r0, [r0, #0x24] + bl sub_0201A7E8 + ldr r0, [sp, #0x14] + add r1, r7, #0 + ldr r0, [r0, #0x48] + add r1, #0x3c + bl sub_0200B1EC + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r4, #0 + bl ov62_0223429C + str r0, [sp, #0x1c] + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223ABB8 ; =0x000F0D00 + ldr r2, [sp, #0x18] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r3, [sp, #0x1c] + add r0, r4, #0 + mov r1, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x18] + bl sub_020237BC + ldrb r1, [r5, #2] + ldrb r0, [r5, #3] + add r7, r7, #1 + add r4, #0x10 + mul r0, r1 + add r6, r6, r0 + add r5, r5, #4 + cmp r7, #6 + blo _0223AB2C + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223ABB4: .word 0x02248DC4 +_0223ABB8: .word 0x000F0D00 + thumb_func_end ov62_0223AB14 + + thumb_func_start ov62_0223ABBC +ov62_0223ABBC: ; 0x0223ABBC + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x8d + lsl r0, r0, #2 + mov r4, #0 + add r5, r1, r0 +_0223ABCC: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #6 + blo _0223ABCC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223ABBC + + thumb_func_start ov62_0223ABE4 +ov62_0223ABE4: ; 0x0223ABE4 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x6d + lsl r0, r0, #2 + mov r4, #0 + add r5, r1, r0 +_0223ABF4: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #3 + blt _0223ABF4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223ABE4 + + thumb_func_start ov62_0223AC0C +ov62_0223AC0C: ; 0x0223AC0C + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r5, [r0, r2] + mov r6, #0x75 + ldr r0, [r0, #0x48] + lsl r6, r6, #2 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, r6 + mov r1, #0xcc + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223AC54 ; =0x000F0D00 + add r2, r4, #0 + str r0, [sp, #8] + add r0, r5, r6 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, r6 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223AC54: .word 0x000F0D00 + thumb_func_end ov62_0223AC0C + + thumb_func_start ov62_0223AC58 +ov62_0223AC58: ; 0x0223AC58 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r1, #0xe + lsl r1, r1, #6 + ldr r1, [r4, r1] + ldr r0, [r5, #0x48] + add r1, #0x1c + bl sub_0200B1EC + str r0, [sp, #0x10] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r7, r0, #0 + mov r0, #0x66 + bl ov62_02231690 + ldr r1, _0223AD18 ; =0x000004D4 + str r0, [sp, #0x14] + ldr r1, [r5, r1] + add r0, r6, #0 + lsl r1, r1, #2 + add r2, r4, r1 + mov r1, #0xe3 + lsl r1, r1, #2 + ldr r1, [r2, r1] + bl sub_02023D28 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_022349A8 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0 + ldr r0, [sp, #0x14] + add r2, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + add r1, r7, #0 + bl sub_0200C388 + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0xcc + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223AD1C ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r4, r0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A9A4 + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_0200B3F0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223AD18: .word 0x000004D4 +_0223AD1C: .word 0x000F0D00 + thumb_func_end ov62_0223AC58 + + thumb_func_start ov62_0223AD20 +ov62_0223AD20: ; 0x0223AD20 + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r5, [r0, r1] + mov r6, #0x71 + mov r0, #0xff + mov r1, #0x66 + lsl r6, r6, #2 + bl sub_02023790 + add r1, r5, #4 + add r4, r0, #0 + bl sub_02023D28 + add r0, r5, r6 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, r6 + add r1, r4, #0 + bl ov62_0223429C + add r3, r0, #0 + mov r0, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223AD78 ; =0x000F0100 + mov r1, #0 + str r0, [sp, #8] + add r0, r5, r6 + add r2, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, r6 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223AD78: .word 0x000F0100 + thumb_func_end ov62_0223AD20 + + thumb_func_start ov62_0223AD7C +ov62_0223AD7C: ; 0x0223AD7C + push {r4, r5, r6, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x6d + lsl r0, r0, #2 + ldr r5, _0223ADAC ; =0x02248D78 + mov r6, #0 + add r4, r1, r0 +_0223AD8E: + ldr r1, [r5, #0] + add r0, r4, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201A9A4 + add r6, r6, #1 + add r4, #0x10 + add r5, r5, #4 + cmp r6, #2 + blt _0223AD8E + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223ADAC: .word 0x02248D78 + thumb_func_end ov62_0223AD7C + + thumb_func_start ov62_0223ADB0 +ov62_0223ADB0: ; 0x0223ADB0 + and r0, r1 + cmp r1, r0 + bne _0223ADBA + mov r0, #1 + bx lr +_0223ADBA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov62_0223ADB0 + + thumb_func_start ov62_0223ADC0 +ov62_0223ADC0: ; 0x0223ADC0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x14 + add r5, r1, #0 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r7, #0x6d + lsl r7, r7, #2 + add r0, r4, r7 + mov r1, #0 + bl sub_0201ADA4 + lsl r0, r5, #1 + add r0, r4, r0 + ldrh r6, [r0, #0x2c] + cmp r6, #0 + bne _0223ADF0 + add r0, r4, r7 + bl sub_0201A9A4 + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} +_0223ADF0: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r2, r7, #0 + sub r2, #0x5c + add r5, r0, #0 + ldr r0, [r4, r2] + add r2, #0x58 + ldr r2, [r4, r2] + mov r1, #1 + lsl r1, r2 + bl ov62_0223ADB0 + cmp r0, #1 + bne _0223AE14 + add r6, r7, #0 + add r6, #0x3a +_0223AE14: + add r0, r6, #0 + mov r1, #0x66 + add r2, sp, #0x10 + bl sub_0200B274 + add r0, r5, #0 + add r1, sp, #0x10 + bl sub_02023D28 + add r0, r4, r7 + add r1, r5, #0 + bl ov62_0223429C + add r3, r0, #0 + mov r0, #6 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223AE5C ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + add r0, r4, r7 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, r7 + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223AE5C: .word 0x000F0D00 + thumb_func_end ov62_0223ADC0 + + thumb_func_start ov62_0223AE60 +ov62_0223AE60: ; 0x0223AE60 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r4, [r0, #0x28] + str r1, [sp, #0x24] + ldr r1, [r0, #0x18] + str r1, [sp, #0x20] + ldr r1, [r0, #0x1c] + str r1, [sp, #0x1c] + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, _0223AFBC ; =0x000186A0 + ldr r2, [sp, #0x20] + str r0, [sp, #0x14] + ldr r3, [sp, #0x1c] + add r0, r4, #0 + mov r1, #2 + bl sub_0200CD7C + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0223AFBC ; =0x000186A0 + ldr r1, [sp, #0x1c] + str r0, [sp, #4] + ldr r0, [sp, #0x20] + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0223AFBC ; =0x000186A0 + ldr r1, [sp, #0x1c] + str r0, [sp, #4] + ldr r0, [sp, #0x20] + mov r2, #0x13 + bl sub_0200CE3C + ldr r7, [sp, #0x24] + mov r4, #0 + add r5, r7, #0 +_0223AED2: + ldr r0, [sp, #0x24] + ldrh r6, [r7, #0x2c] + add r1, r0, r4 + mov r0, #0x57 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + ldr r1, [sp, #0x24] + str r0, [sp, #0x18] + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + lsl r1, r4 + bl ov62_0223ADB0 + str r0, [sp, #0x28] + cmp r6, #0 + beq _0223AFAE + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x18] + add r0, r6, #0 + bl sub_02079D8C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0223AFBC ; =0x000186A0 + ldr r1, [sp, #0x1c] + add r0, r4, r0 + str r0, [sp, #8] + ldr r0, [sp, #0x20] + mov r2, #0x13 + bl sub_0200D888 + add r0, r4, #0 + mov r1, #6 + bl sub_020E1F6C + add r2, r1, #0 + mov r0, #0x18 + mul r2, r0 + add r2, #0x6e + add r0, sp, #0x2c + strh r2, [r0] + add r0, r4, #0 + mov r1, #6 + bl sub_020E1F6C + mov r1, #0x16 + mul r1, r0 + add r1, #0x30 + add r0, sp, #0x2c + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + strh r1, [r0, #6] + add r0, r1, #0 + str r0, [sp, #0x34] + str r0, [sp, #0x38] + mov r0, #1 + str r0, [sp, #0x3c] + add r0, r1, #0 + str r0, [sp, #0x58] + str r0, [sp, #0x5c] + ldr r0, _0223AFBC ; =0x000186A0 + add r2, sp, #0x2c + add r0, r4, r0 + str r0, [sp, #0x40] + ldr r0, _0223AFBC ; =0x000186A0 + str r0, [sp, #0x44] + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + sub r0, r1, #1 + str r0, [sp, #0x50] + sub r0, r1, #1 + str r0, [sp, #0x54] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x1c] + bl sub_0200CE6C + mov r1, #0xad + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x28] + add r0, r6, #0 + bl sub_02079EDC + add r1, r0, #0 + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r1, #4 + bl sub_0200D430 + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0200D364 + mov r0, #0xad + lsl r0, r0, #2 + mov r1, #0x1e + ldr r0, [r5, r0] + sub r1, r1, r4 + bl sub_0200D474 +_0223AFAE: + add r4, r4, #1 + add r7, r7, #2 + add r5, r5, #4 + cmp r4, #0x1e + blt _0223AED2 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223AFBC: .word 0x000186A0 + thumb_func_end ov62_0223AE60 + + thumb_func_start ov62_0223AFC0 +ov62_0223AFC0: ; 0x0223AFC0 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r6, #0 + add r5, r4, #0 +_0223AFCE: + ldrh r0, [r4, #0x2c] + cmp r0, #0 + beq _0223AFE0 + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_0200D3F4 +_0223AFE0: + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, #4 + cmp r6, #0x1e + blt _0223AFCE + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_0223AFC0 + + thumb_func_start ov62_0223AFEC +ov62_0223AFEC: ; 0x0223AFEC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r7, r0] + ldr r0, [r7, #0x1c] + ldr r1, _0223B04C ; =0x000186A0 + bl sub_0200D080 + ldr r0, [r7, #0x1c] + ldr r1, _0223B04C ; =0x000186A0 + bl sub_0200D090 + ldr r0, [r7, #0x1c] + ldr r1, _0223B04C ; =0x000186A0 + bl sub_0200D0A0 + mov r6, #0 + add r5, r4, #0 +_0223B012: + ldrh r0, [r4, #0x2c] + cmp r0, #0 + beq _0223B03E + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223B03E + ldr r1, _0223B04C ; =0x000186A0 + ldr r0, [r7, #0x1c] + add r1, r6, r1 + bl sub_0200D070 + mov r0, #0xad + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D0F4 + mov r0, #0xad + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_0223B03E: + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, #4 + cmp r6, #0x1e + blt _0223B012 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223B04C: .word 0x000186A0 + thumb_func_end ov62_0223AFEC + + thumb_func_start ov62_0223B050 +ov62_0223B050: ; 0x0223B050 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x10] + ldr r4, [r0, r1] + mov r0, #0x1b + lsl r0, r0, #4 + ldr r2, [r4, r0] + lsl r1, r2, #2 + add r1, r4, r1 + add r3, r1, #0 + add r3, #0xe0 + ldr r3, [r3, #0] + add r5, r4, r2 + str r3, [sp, #0x14] + add r3, r0, #0 + sub r3, #0x54 + ldrb r7, [r5, r3] + lsl r3, r2, #1 + add r3, r4, r3 + ldrh r5, [r3, #0x2c] + ldr r6, [r1, #0x68] + cmp r5, #0 + bne _0223B08E + mov r0, #0xcb + mov r1, #0 + lsl r0, r0, #2 + add sp, #0x34 + str r1, [r4, r0] + pop {r4, r5, r6, r7, pc} +_0223B08E: + sub r0, #0x58 + mov r1, #1 + ldr r0, [r4, r0] + lsl r1, r2 + bl ov62_0223ADB0 + cmp r0, #1 + bne _0223B0AC + ldr r0, _0223B11C ; =0x000001EA + cmp r5, r0 + bne _0223B0A8 + mov r7, #1 + b _0223B0AA +_0223B0A8: + mov r7, #0 +_0223B0AA: + ldr r5, _0223B120 ; =0x000001EE +_0223B0AC: + add r0, r5, #0 + mov r1, #0x66 + bl sub_02075894 + str r0, [sp, #0x18] + add r0, r5, #0 + add r1, r6, #0 + bl sub_02075DAC + str r0, [sp, #0x1c] + ldr r0, [sp, #0x14] + add r1, r6, #0 + bl sub_02075E38 + lsl r3, r7, #0x18 + str r0, [sp, #0x20] + ldr r1, [sp, #0x1c] + add r0, r5, #0 + mov r2, #2 + lsr r3, r3, #0x18 + str r6, [sp] + bl sub_02076648 + ldr r0, [sp, #0x20] + ldr r2, [sp, #0x1c] + str r0, [sp] + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + add r0, sp, #0x24 + add r1, r5, #0 + mov r3, #2 + str r6, [sp, #8] + bl sub_02075FB4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r1, sp, #0x24 + ldr r0, [r0, #0x64] + mov r2, #0x2a + mov r3, #0x5b + bl sub_02007C34 + mov r1, #0xcb + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [sp, #0x18] + bl sub_020759B8 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0223B11C: .word 0x000001EA +_0223B120: .word 0x000001EE + thumb_func_end ov62_0223B050 + + thumb_func_start ov62_0223B124 +ov62_0223B124: ; 0x0223B124 + push {r3, lr} + add r2, r1, #0 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223B13E + mov r1, #6 + bl sub_02007DEC +_0223B13E: + pop {r3, pc} + thumb_func_end ov62_0223B124 + + thumb_func_start ov62_0223B140 +ov62_0223B140: ; 0x0223B140 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223B156 + bl sub_02007DC8 +_0223B156: + pop {r3, pc} + thumb_func_end ov62_0223B140 + + thumb_func_start ov62_0223B158 +ov62_0223B158: ; 0x0223B158 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + sub r0, #0x30 + ldr r0, [r5, r0] + bl sub_02024420 + ldr r1, _0223B228 ; =0x0000017A + ldrb r2, [r4, r1] + cmp r2, #0x10 + blo _0223B17C + cmp r2, #0x18 + bhs _0223B17C + mov r2, #0 + strb r2, [r4, r1] +_0223B17C: + ldr r1, _0223B228 ; =0x0000017A + ldrb r1, [r4, r1] + cmp r1, #0x18 + blo _0223B18E + cmp r1, #0x20 + bhs _0223B18E + sub r1, #0x18 + bl sub_02079CFC +_0223B18E: + ldr r0, _0223B228 ; =0x0000017A + ldrb r1, [r4, r0] + cmp r1, #0x20 + blo _0223B19A + mov r1, #0 + strb r1, [r4, r0] +_0223B19A: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r1, _0223B228 ; =0x0000017A + ldr r0, [r5, #0x14] + ldrb r2, [r4, r1] + mov r3, #3 + lsl r1, r2, #1 + add r1, r2, r1 + ldr r2, [r5, #0x24] + add r1, #0x8a + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r1, _0223B228 ; =0x0000017A + ldr r0, [r5, #0x14] + ldrb r2, [r4, r1] + mov r3, #3 + lsl r1, r2, #1 + add r1, r2, r1 + ldr r2, [r5, #0x24] + add r1, #0x8c + bl sub_0200710C + mov r0, #0 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0xc0 + mov r1, #0xa2 + str r0, [sp, #8] + add r2, r1, #0 + str r0, [sp, #0xc] + add r2, #0xd8 + ldrb r3, [r4, r2] + ldr r0, [r5, #0x28] + lsl r2, r3, #1 + add r2, r3, r2 + add r2, #0x8b + mov r3, #0x66 + bl sub_02002FEC + add r0, r5, #0 + bl ov62_0223B050 + add r0, r5, #0 + bl ov62_0223AE60 + mov r1, #0x1b + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov62_0223ADC0 + add r0, r5, #0 + bl ov62_0223AD20 + ldr r1, _0223B22C ; =0x0000010E + add r0, r5, #0 + bl ov62_0223AC0C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223B228: .word 0x0000017A +_0223B22C: .word 0x0000010E + thumb_func_end ov62_0223B158 + + thumb_func_start ov62_0223B230 +ov62_0223B230: ; 0x0223B230 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + sub r0, #0x30 + ldr r0, [r5, r0] + bl sub_02024420 + ldr r1, _0223B2E4 ; =0x0000017A + ldrb r2, [r4, r1] + cmp r2, #0x10 + blo _0223B254 + cmp r2, #0x18 + bhs _0223B254 + mov r2, #0 + strb r2, [r4, r1] +_0223B254: + ldr r1, _0223B2E4 ; =0x0000017A + ldrb r1, [r4, r1] + cmp r1, #0x18 + blo _0223B270 + cmp r1, #0x20 + bhs _0223B270 + sub r1, #0x18 + bl sub_02079CFC + cmp r0, #0 + bne _0223B270 + ldr r0, _0223B2E4 ; =0x0000017A + mov r1, #0 + strb r1, [r4, r0] +_0223B270: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r1, _0223B2E4 ; =0x0000017A + ldr r0, [r5, #0x14] + ldrb r2, [r4, r1] + mov r3, #3 + lsl r1, r2, #1 + add r1, r2, r1 + ldr r2, [r5, #0x24] + add r1, #0x8a + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r1, _0223B2E4 ; =0x0000017A + ldr r0, [r5, #0x14] + ldrb r2, [r4, r1] + mov r3, #3 + lsl r1, r2, #1 + add r1, r2, r1 + ldr r2, [r5, #0x24] + add r1, #0x8c + bl sub_0200710C + mov r0, #0 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0xc0 + mov r1, #0xa2 + str r0, [sp, #8] + add r2, r1, #0 + str r0, [sp, #0xc] + add r2, #0xd8 + ldrb r3, [r4, r2] + ldr r0, [r5, #0x28] + lsl r2, r3, #1 + add r2, r3, r2 + add r2, #0x8b + mov r3, #0x66 + bl sub_02002FEC + add r0, r5, #0 + bl ov62_0223B050 + add r0, r5, #0 + bl ov62_0223AE60 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223B2E4: .word 0x0000017A + thumb_func_end ov62_0223B230 + + thumb_func_start ov62_0223B2E8 +ov62_0223B2E8: ; 0x0223B2E8 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223B304 + cmp r1, #1 + beq _0223B37E + cmp r1, #2 + beq _0223B3C2 + b _0223B400 +_0223B304: + mov r1, #2 + bl ov62_022302F0 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223AA90 + add r0, r5, #0 + bl ov62_0223B158 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223B124 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223AFC0 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x4d + mov r3, #7 + bl sub_0200710C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223B400 +_0223B37E: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + mov r2, #0 + add r1, r4, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223B400 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223B124 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223AFC0 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _0223B408 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223B400 +_0223B3C2: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223B3E4 + mov r0, #0x33 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, #0x14 + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223B3E4: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223B400: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223B408: .word 0x04000050 + thumb_func_end ov62_0223B2E8 + + thumb_func_start ov62_0223B40C +ov62_0223B40C: ; 0x0223B40C + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0xd1 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223B40C + + thumb_func_start ov62_0223B424 +ov62_0223B424: ; 0x0223B424 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r7, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223B43A + cmp r1, #1 + beq _0223B474 + b _0223B4CA +_0223B43A: + bl ov62_0223AFEC + add r0, r5, #0 + bl ov62_0223B140 + add r0, r5, #0 + bl ov62_0223ABE4 + add r0, r5, #0 + bl ov62_0223A110 + ldr r0, _0223B560 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B8B0 + ldr r0, _0223B560 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B9E0 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223B55C +_0223B474: + bl ov62_02233790 + cmp r0, #0 + beq _0223B55C + mov r6, #0 + add r4, r7, #0 +_0223B480: + mov r0, #0x33 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024034 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #5 + blt _0223B480 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r7, r0 + bl ov62_02231688 + add r0, r5, #0 + bl ov62_0223146C + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223B55C +_0223B4CA: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r7, r0 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223B524 + add r0, r5, #0 + bl ov62_022318E8 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r7, r0 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + mov r0, #0xe1 + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_02030A98 + add r0, r7, #0 + bl sub_020181C4 + b _0223B55C +_0223B524: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r7, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r7, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223B55C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B560: .word 0x000006F4 + thumb_func_end ov62_0223B424 + + thumb_func_start ov62_0223B564 +ov62_0223B564: ; 0x0223B564 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223B580 + cmp r1, #1 + beq _0223B60A + cmp r1, #2 + beq _0223B646 + b _0223B684 +_0223B580: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #2 + bl ov62_022302F0 + add r0, r5, #0 + bl ov62_0223AA90 + ldr r1, _0223B68C ; =0x00000113 + add r0, r5, #0 + bl ov62_0223AC0C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x4f + mov r3, #7 + bl sub_0200710C + add r0, r5, #0 + bl ov62_0223AB14 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223A4C8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223B684 +_0223B60A: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + mov r2, #0 + add r1, r4, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223B684 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, _0223B690 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223B684 +_0223B646: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223B668 + mov r0, #0xce + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r0, #0xc + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223B668: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223B684: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223B68C: .word 0x00000113 +_0223B690: .word 0x04000050 + thumb_func_end ov62_0223B564 + + thumb_func_start ov62_0223B694 +ov62_0223B694: ; 0x0223B694 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0xce + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223B694 + + thumb_func_start ov62_0223B6AC +ov62_0223B6AC: ; 0x0223B6AC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r0, [r0, r1] + ldr r1, _0223B75C ; =0x02248D50 + ldr r5, _0223B760 ; =0x02248D5C + ldr r2, [r1, #0x14] + ldr r1, [r1, #0x18] + mov r7, #1 + str r1, [sp, #0x24] + mov r1, #0 + str r1, [sp, #0x18] + mov r1, #0x8d + lsl r1, r1, #2 + add r6, sp, #0x20 + str r2, [sp, #0x20] + add r4, r0, r1 +_0223B6D2: + add r0, r4, #0 + bl sub_0201A7A0 + ldrb r0, [r5, #1] + add r1, r4, #0 + mov r2, #6 + str r0, [sp] + ldrb r0, [r5, #2] + str r0, [sp, #4] + ldrb r0, [r5, #3] + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldrb r3, [r5] + ldr r0, [r0, #0x24] + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + ldr r1, [r6, #0] + ldr r0, [r0, #0x48] + bl sub_0200B1EC + str r0, [sp, #0x1c] + ldr r1, [sp, #0x1c] + add r0, r4, #0 + bl ov62_0223429C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223B764 ; =0x000F0D00 + ldr r2, [sp, #0x1c] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + ldrb r1, [r5, #2] + ldrb r0, [r5, #3] + mul r0, r1 + add r7, r7, r0 + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x18] + add r4, #0x10 + add r0, r0, #1 + add r5, r5, #4 + add r6, r6, #4 + str r0, [sp, #0x18] + cmp r0, #2 + blt _0223B6D2 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B75C: .word 0x02248D50 +_0223B760: .word 0x02248D5C +_0223B764: .word 0x000F0D00 + thumb_func_end ov62_0223B6AC + + thumb_func_start ov62_0223B768 +ov62_0223B768: ; 0x0223B768 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + mov r6, #0x8d + add r7, r1, #0 + ldr r4, [r5, r0] + lsl r6, r6, #2 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + add r1, r7, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, r6 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223B7BC ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B7BC: .word 0x000F0D00 + thumb_func_end ov62_0223B768 + + thumb_func_start ov62_0223B7C0 +ov62_0223B7C0: ; 0x0223B7C0 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + mov r6, #0x8d + ldr r4, [r5, r0] + lsl r6, r6, #2 + add r0, r4, r6 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r3, #0xc + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x22 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #0x40 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223B83C ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, r6 + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223B83C: .word 0x000F0D00 + thumb_func_end ov62_0223B7C0 + + thumb_func_start ov62_0223B840 +ov62_0223B840: ; 0x0223B840 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x8d + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + mov r0, #0x8d + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_0223B840 + + thumb_func_start ov62_0223B860 +ov62_0223B860: ; 0x0223B860 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x8d + lsl r0, r0, #2 + mov r4, #0 + add r5, r1, r0 +_0223B870: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #2 + blt _0223B870 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223B860 + + thumb_func_start ov62_0223B888 +ov62_0223B888: ; 0x0223B888 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r0, [r0, r1] + mov r1, #0x6d + str r0, [sp, #0x24] + mov r0, #1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + lsl r1, r1, #2 + ldr r5, _0223B94C ; =0x02248D50 + mov r7, #0 + add r4, r0, r1 +_0223B8A6: + add r0, r4, #0 + bl sub_0201A7A0 + ldrb r0, [r5, #1] + add r1, r4, #0 + mov r2, #2 + str r0, [sp] + ldrb r0, [r5, #2] + str r0, [sp, #4] + ldrb r0, [r5, #3] + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldrb r3, [r5] + ldr r0, [r0, #0x24] + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + cmp r7, #0 + bne _0223B902 + mov r1, #0xe + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x24] + lsl r1, r1, #6 + ldr r2, [r2, r1] + ldr r1, _0223B950 ; =0x00000136 + ldr r0, [r0, #0x48] + add r1, r2, r1 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r4, #0 + add r1, r6, #0 + bl ov62_0223429C + str r0, [sp, #0x1c] + mov r0, #0 + str r0, [sp, #0x18] +_0223B902: + cmp r6, #0 + beq _0223B928 + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x1c] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223B954 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r6, #0 + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC +_0223B928: + add r0, r4, #0 + bl sub_0201A9A4 + ldrb r1, [r5, #2] + ldrb r0, [r5, #3] + add r7, r7, #1 + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp, #0x20] + add r4, #0x10 + add r0, r0, r2 + add r5, r5, #4 + str r0, [sp, #0x20] + cmp r7, #1 + blo _0223B8A6 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223B94C: .word 0x02248D50 +_0223B950: .word 0x00000136 +_0223B954: .word 0x000F0D00 + thumb_func_end ov62_0223B888 + + thumb_func_start ov62_0223B958 +ov62_0223B958: ; 0x0223B958 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x6d + lsl r0, r0, #2 + mov r4, #0 + add r5, r1, r0 +_0223B968: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #1 + blo _0223B968 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223B958 + + thumb_func_start ov62_0223B980 +ov62_0223B980: ; 0x0223B980 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _0223B99A + add sp, #0x14 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_0223B99A: + ldr r0, [r4, #8] + cmp r0, #8 + bls _0223B9A2 + b _0223BD2C +_0223B9A2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B9AE: ; jump table + .short _0223B9C0 - _0223B9AE - 2 ; case 0 + .short _0223BA06 - _0223B9AE - 2 ; case 1 + .short _0223BA94 - _0223B9AE - 2 ; case 2 + .short _0223BAD4 - _0223B9AE - 2 ; case 3 + .short _0223BAF2 - _0223B9AE - 2 ; case 4 + .short _0223BB9A - _0223B9AE - 2 ; case 5 + .short _0223BBD8 - _0223B9AE - 2 ; case 6 + .short _0223BC58 - _0223B9AE - 2 ; case 7 + .short _0223BCA0 - _0223B9AE - 2 ; case 8 +_0223B9C0: + ldr r0, _0223BD10 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + add r0, r4, #0 + bl ov62_0223ABE4 + add r0, r4, #0 + bl ov62_0223ABBC + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + bl ov62_02231560 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223BA06: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223BA76 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + mov r1, #3 + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + add r3, r1, #0 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x4e + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223BA76: + ldr r0, [r4, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223BE5E +_0223BA94: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r1, _0223BD14 ; =0x00000121 + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, _0223BD18 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223BE5E +_0223BAD4: + add r0, r4, #0 + bl ov62_0224112C + mov r1, #0xe + lsl r1, r1, #6 + ldr r1, [r5, r1] + bl ov61_0222B290 + cmp r0, #1 + beq _0223BAEA + b _0223BE5E +_0223BAEA: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223BE5E +_0223BAF2: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #0x10 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _0223BD18 ; =0x00000565 + bne _0223BB86 + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #0x10] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #3 + bl ov62_022348B8 + mov r0, #0xe2 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r0, _0223BD1C ; =0x00002F64 + str r1, [r5, r0] + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223AA90 + ldr r0, _0223BD10 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B8B0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #7 + str r0, [r4, #8] + b _0223BE5E +_0223BB86: + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223BD20 ; =0x0000055F + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223BE5E +_0223BB9A: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #0xe2 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223BBD2 + ldr r0, [r4, #8] + ldr r1, _0223BD24 ; =0x00000126 + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0xc] + add r0, r4, #0 + bl ov62_02231AAC + b _0223BE5E +_0223BBD2: + mov r0, #0xff + str r0, [r4, #8] + b _0223BE5E +_0223BBD8: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0x3c + bge _0223BBEA + bl sub_02022798 + cmp r0, #1 + bne _0223BC6E +_0223BBEA: + mov r0, #0 + str r0, [r4, #0xc] + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, _0223BD1C ; =0x00002F64 + mov r1, #0 + str r1, [r5, r0] + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223AA90 + ldr r0, _0223BD10 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B8B0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223BE5E +_0223BC58: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + bne _0223BC70 +_0223BC6E: + b _0223BE5E +_0223BC70: + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x4f + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223BE5E +_0223BCA0: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223BCF0 + add r0, r4, #0 + mov r1, #2 + bl ov62_022302F0 + ldr r1, _0223BD28 ; =0x00000113 + add r0, r4, #0 + bl ov62_0223AC0C + add r0, r4, #0 + bl ov62_0223AB14 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223BCF0: + ldr r0, [r4, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223BE5E + nop +_0223BD10: .word 0x000006F4 +_0223BD14: .word 0x00000121 +_0223BD18: .word 0x00000565 +_0223BD1C: .word 0x00002F64 +_0223BD20: .word 0x0000055F +_0223BD24: .word 0x00000126 +_0223BD28: .word 0x00000113 +_0223BD2C: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_02231664 + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + mov r2, #0 + add r1, r5, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223BE26 + add r0, r4, #0 + bl ov62_0223B888 + add r0, r4, #0 + bl ov62_0223BE7C + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223BE64 ; =0x00002EAC + ldr r3, _0223BE68 ; =0x02248DF8 + add r2, r5, r0 + mov r6, #5 +_0223BD6A: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _0223BD6A + ldr r0, [r3, #0] + mov r1, #0xe2 + str r0, [r2, #0] + lsl r1, r1, #2 + ldr r2, [r5, r1] + ldr r0, _0223BE6C ; =0x00002EB0 + add r1, #0xf4 + str r2, [r5, r0] + add r0, r4, r1 + add r1, r4, #0 + mov r2, #2 + bl ov62_022335BC + ldr r0, _0223BE70 ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + ldr r3, _0223BE64 ; =0x00002EAC + ldr r0, _0223BE70 ; =0x0000049C + add r2, r5, r3 + sub r3, #0xa0 + add r0, r4, r0 + add r1, r4, #0 + add r3, r5, r3 + bl ov62_02232AAC + ldr r1, _0223BE74 ; =0x0000047C + add r0, r4, r1 + add r1, #0x20 + add r1, r4, r1 + bl ov62_02233638 + ldr r0, _0223BE70 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + mov r2, #1 + bl ov62_0223331C + ldr r0, _0223BE70 ; =0x0000049C + mov r1, #0x38 + add r0, r4, r0 + mov r2, #0xb0 + bl ov62_02233434 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223B6AC + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r3, _0223BE78 ; =0x000004D8 + mov r1, #0x6f + ldr r6, [r4, r3] + mov r3, #0x18 + mul r3, r6 + lsl r1, r1, #4 + add r3, #0x44 + lsl r3, r3, #0x10 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x10 + asr r3, r3, #0x10 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0xc + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 +_0223BE26: + ldr r0, [r4, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #2 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223BE5E: + mov r0, #0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223BE64: .word 0x00002EAC +_0223BE68: .word 0x02248DF8 +_0223BE6C: .word 0x00002EB0 +_0223BE70: .word 0x0000049C +_0223BE74: .word 0x0000047C +_0223BE78: .word 0x000004D8 + thumb_func_end ov62_0223B980 + + thumb_func_start ov62_0223BE7C +ov62_0223BE7C: ; 0x0223BE7C + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp] + ldr r7, [r0, r1] + mov r0, #0xe2 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r6, #0 + cmp r0, #0 + ble _0223BEE6 + add r4, r7, #0 + add r5, r7, #0 +_0223BE96: + mov r0, #0x14 + mov r1, #0x66 + bl sub_02023790 + ldr r1, _0223BEE8 ; =0x00002E10 + str r0, [r4, r1] + add r0, r1, #0 + mov r1, #0xe3 + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r5, r1] + bl sub_02023D28 + ldr r1, _0223BEE8 ; =0x00002E10 + ldr r0, [sp] + ldr r1, [r4, r1] + bl ov62_022349A8 + mov r0, #0x1e + mov r1, #0x66 + bl sub_02023790 + ldr r1, _0223BEEC ; =0x00002E0C + str r0, [r4, r1] + add r0, r1, #0 + mov r1, #0xe3 + lsl r1, r1, #2 + ldr r1, [r5, r1] + ldr r0, [r4, r0] + add r1, #0x80 + bl sub_02023D28 + mov r0, #0xe2 + lsl r0, r0, #2 + ldr r0, [r7, r0] + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, r0 + blt _0223BE96 +_0223BEE6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BEE8: .word 0x00002E10 +_0223BEEC: .word 0x00002E0C + thumb_func_end ov62_0223BE7C + + thumb_func_start ov62_0223BEF0 +ov62_0223BEF0: ; 0x0223BEF0 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r6, [r0, r1] + mov r0, #0xe2 + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r4, #0 + cmp r0, #0 + ble _0223BF38 + add r5, r6, #0 + add r7, r4, #0 +_0223BF08: + ldr r0, _0223BF3C ; =0x00002E0C + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223BF18 + bl sub_020237BC + ldr r0, _0223BF3C ; =0x00002E0C + str r7, [r5, r0] +_0223BF18: + ldr r0, _0223BF40 ; =0x00002E10 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223BF2A + bl sub_020237BC + ldr r0, _0223BF40 ; =0x00002E10 + mov r1, #0 + str r1, [r5, r0] +_0223BF2A: + mov r0, #0xe2 + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r4, r4, #1 + add r5, #8 + cmp r4, r0 + blt _0223BF08 +_0223BF38: + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BF3C: .word 0x00002E0C +_0223BF40: .word 0x00002E10 + thumb_func_end ov62_0223BEF0 + + thumb_func_start ov62_0223BF44 +ov62_0223BF44: ; 0x0223BF44 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, _0223BFA0 ; =0x00002F64 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223BF92 + ldr r0, _0223BFA4 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233664 + ldr r1, _0223BFA8 ; =0x0000049C + add r0, r5, r1 + sub r1, #0x10 + ldrsh r1, [r5, r1] + bl ov62_022331C8 + ldr r0, _0223BFA8 ; =0x0000049C + ldr r2, _0223BFAC ; =0x00002E0C + add r0, r5, r0 + add r1, r5, #0 + add r2, r4, r2 + bl ov62_02232BB4 + ldr r2, _0223BFB0 ; =0x000004D8 + mov r0, #0x6f + ldr r3, [r5, r2] + mov r2, #0x18 + mul r2, r3 + lsl r0, r0, #4 + add r2, #0x44 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8EC +_0223BF92: + mov r0, #0xcf + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223BFA0: .word 0x00002F64 +_0223BFA4: .word 0x0000047C +_0223BFA8: .word 0x0000049C +_0223BFAC: .word 0x00002E0C +_0223BFB0: .word 0x000004D8 + thumb_func_end ov62_0223BF44 + + thumb_func_start ov62_0223BFB4 +ov62_0223BFB4: ; 0x0223BFB4 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223BFD2 + cmp r1, #1 + beq _0223C0A0 + cmp r1, #2 + bne _0223BFD0 + b _0223C0D6 +_0223BFD0: + b _0223C11A +_0223BFD2: + bl ov62_0223BEF0 + add r0, r5, #0 + bl ov62_0223B860 + ldr r0, _0223C120 ; =0x00002F64 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223C016 + add r0, r5, #0 + bl ov62_0223B958 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C124 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233600 + ldr r0, _0223C128 ; =0x0000049C + add r0, r5, r0 + bl ov62_022332FC + ldr r0, _0223C128 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022334FC + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + b _0223C036 +_0223C016: + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C12C ; =0x00002ED8 + add r1, r5, #0 + add r0, r4, r0 + bl ov62_02232394 + add r0, r5, #0 + bl ov62_02239D8C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 +_0223C036: + ldr r0, _0223C120 ; =0x00002F64 + mov r1, #0 + str r1, [r4, r0] + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223AA90 + add r0, r5, #0 + mov r1, #0xff + bl ov62_0223AC58 + ldr r0, _0223C130 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B8B0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223C0A0: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C11A + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x4f + mov r3, #7 + bl sub_0200710C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223C11A +_0223C0D6: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C11A + add r0, r5, #0 + mov r1, #2 + bl ov62_022302F0 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r1, _0223C134 ; =0x00000113 + add r0, r5, #0 + bl ov62_0223AC0C + add r0, r5, #0 + bl ov62_0223AB14 + add r0, r5, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223C11A: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C120: .word 0x00002F64 +_0223C124: .word 0x0000047C +_0223C128: .word 0x0000049C +_0223C12C: .word 0x00002ED8 +_0223C130: .word 0x000006F4 +_0223C134: .word 0x00000113 + thumb_func_end ov62_0223BFB4 + + thumb_func_start ov62_0223C138 +ov62_0223C138: ; 0x0223C138 + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _0223C14C + b _0223C306 +_0223C14C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223C158: ; jump table + .short _0223C160 - _0223C158 - 2 ; case 0 + .short _0223C1FC - _0223C158 - 2 ; case 1 + .short _0223C21A - _0223C158 - 2 ; case 2 + .short _0223C2B2 - _0223C158 - 2 ; case 3 +_0223C160: + bl ov62_0223B860 + ldr r0, _0223C3E8 ; =0x00002F64 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223C19E + add r0, r4, #0 + bl ov62_0223B958 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C3EC ; =0x0000047C + add r0, r4, r0 + bl ov62_02233600 + ldr r0, _0223C3F0 ; =0x0000049C + add r0, r4, r0 + bl ov62_022332FC + ldr r0, _0223C3F0 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022334FC + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + b _0223C1BE +_0223C19E: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C3F4 ; =0x00002ED8 + add r1, r4, #0 + add r0, r5, r0 + bl ov62_02232394 + add r0, r4, #0 + bl ov62_02239D8C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 +_0223C1BE: + ldr r0, _0223C3F8 ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B8B0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223C1FC: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + add r1, r5, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C2C8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223C3E0 +_0223C21A: + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C3FC ; =0x000004D4 + add r3, r5, #4 + ldr r0, [r4, r0] + mov r2, #0x33 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0xe3 + lsl r0, r0, #2 + ldr r6, [r1, r0] + add r6, #0x80 +_0223C234: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223C234 + ldr r0, [r6, #0] + str r0, [r3, #0] + add r0, r5, #0 + bl ov62_0223A138 + add r0, r4, #0 + mov r1, #2 + bl ov62_022302F0 + add r0, r4, #0 + bl ov62_0223AA90 + add r0, r4, #0 + bl ov62_0223B158 + add r0, r4, #0 + mov r1, #0xff + bl ov62_0223AC58 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223B124 + add r0, r4, #0 + mov r1, #0 + bl ov62_0223AFC0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x4b + mov r3, #7 + bl sub_0200710C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223C3E0 +_0223C2B2: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r5, r1 + add r1, r1, #4 + mov r2, #0 + add r1, r5, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + bne _0223C2CA +_0223C2C8: + b _0223C3E0 +_0223C2CA: + add r0, r4, #0 + mov r1, #0 + bl ov62_0223B124 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223AFC0 + add r0, r4, #0 + bl ov62_0223B7C0 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _0223C400 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223C3E0 +_0223C306: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223C3C4 + mov r0, #0x33 + lsl r0, r0, #4 + ldr r1, [r5, r0] + add r0, #0x14 + str r1, [r5, r0] + add r0, r5, #0 + bl ov62_0223A138 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #6 + bl sub_020E1F6C + ldr r0, _0223C404 ; =0x00002F68 + str r1, [r5, r0] + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #6 + bl sub_020E1F6C + ldr r3, _0223C408 ; =0x00002F6C + mov r1, #0x6f + str r0, [r5, r3] + sub r2, r3, #4 + ldr r6, [r5, r2] + mov r2, #0x18 + mul r2, r6 + ldr r6, [r5, r3] + mov r3, #0x16 + mul r3, r6 + lsl r1, r1, #4 + add r2, #0x6e + add r3, #0x34 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + ldr r1, [r4, r1] + add r0, r4, #0 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0xc + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r2, [r5, r0] + lsl r1, r2, #1 + add r1, r5, r1 + ldrh r1, [r1, #0x2c] + cmp r1, #0 + beq _0223C3BC + sub r0, #0x58 + mov r1, #1 + ldr r0, [r5, r0] + lsl r1, r2 + bl ov62_0223ADB0 + cmp r0, #1 + beq _0223C3BC + mov r1, #0x1b + lsl r1, r1, #4 + ldr r2, [r5, r1] + sub r1, #0x54 + lsl r0, r2, #1 + add r0, r5, r0 + add r2, r5, r2 + ldrh r0, [r0, #0x2c] + ldrb r1, [r2, r1] + bl sub_02005844 +_0223C3BC: + add r0, r4, #0 + mov r1, #0xa + bl ov62_0222FB60 +_0223C3C4: + ldr r0, [r4, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r5, r3] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223C3E0: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223C3E8: .word 0x00002F64 +_0223C3EC: .word 0x0000047C +_0223C3F0: .word 0x0000049C +_0223C3F4: .word 0x00002ED8 +_0223C3F8: .word 0x000006F4 +_0223C3FC: .word 0x000004D4 +_0223C400: .word 0x04000050 +_0223C404: .word 0x00002F68 +_0223C408: .word 0x00002F6C + thumb_func_end ov62_0223C138 + + thumb_func_start ov62_0223C40C +ov62_0223C40C: ; 0x0223C40C + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0xd + lsl r0, r0, #6 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223C40C + + thumb_func_start ov62_0223C424 +ov62_0223C424: ; 0x0223C424 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + beq _0223C440 + cmp r0, #1 + beq _0223C486 + cmp r0, #2 + beq _0223C492 + b _0223C50A +_0223C440: + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + bl ov62_02231560 + add r0, r5, #0 + bl ov62_0223B140 + add r0, r5, #0 + bl ov62_0223AFEC + add r0, r5, #0 + bl ov62_0223AD7C + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + add r0, r5, #0 + bl ov62_0223ABE4 + add r0, r5, #0 + bl ov62_0223B840 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223C486: + ldr r0, _0223C624 ; =0x00002F64 + mov r1, #0 + str r1, [r4, r0] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223C492: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + bne _0223C4AA + b _0223C61C +_0223C4AA: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + mov r1, #3 + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + add r3, r1, #0 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x4e + mov r3, #7 + bl sub_0200710C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223C61C +_0223C50A: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + mov r2, #0 + add r1, r4, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C61C + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0208B9E0 + add r0, r5, #0 + bl ov62_0223B888 + add r0, r5, #0 + bl ov62_0223B6AC + ldr r0, _0223C628 ; =0x0000047C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #2 + bl ov62_022335BC + ldr r3, _0223C62C ; =0x00002EAC + ldr r0, _0223C630 ; =0x0000049C + add r2, r4, r3 + sub r3, #0xa0 + add r0, r5, r0 + add r1, r5, #0 + add r3, r4, r3 + bl ov62_02232AAC + ldr r1, _0223C628 ; =0x0000047C + add r0, r5, r1 + add r1, #0x20 + add r1, r5, r1 + bl ov62_02233638 + ldr r0, _0223C630 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #1 + bl ov62_0223331C + ldr r0, _0223C630 ; =0x0000049C + mov r1, #0x38 + add r0, r5, r0 + mov r2, #0xb0 + bl ov62_02233434 + ldr r3, _0223C634 ; =0x000004D8 + mov r1, #0x6f + ldr r6, [r5, r3] + mov r3, #0x18 + mul r3, r6 + lsl r1, r1, #4 + add r3, #0x44 + lsl r3, r3, #0x10 + ldr r1, [r5, r1] + add r0, r5, #0 + mov r2, #0x10 + asr r3, r3, #0x10 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0xc + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _0223C624 ; =0x00002F64 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223C5FC + ldr r0, _0223C628 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233664 + ldr r1, _0223C630 ; =0x0000049C + add r0, r5, r1 + sub r1, #0x10 + ldrsh r1, [r5, r1] + bl ov62_022331C8 + ldr r0, _0223C630 ; =0x0000049C + ldr r2, _0223C638 ; =0x00002E0C + add r0, r5, r0 + add r1, r5, #0 + add r2, r4, r2 + bl ov62_02232BB4 + ldr r2, _0223C634 ; =0x000004D8 + mov r0, #0x6f + ldr r3, [r5, r2] + mov r2, #0x18 + mul r2, r3 + lsl r0, r0, #4 + add r2, #0x44 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8EC +_0223C5FC: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 +_0223C61C: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223C624: .word 0x00002F64 +_0223C628: .word 0x0000047C +_0223C62C: .word 0x00002EAC +_0223C630: .word 0x0000049C +_0223C634: .word 0x000004D8 +_0223C638: .word 0x00002E0C + thumb_func_end ov62_0223C424 + + thumb_func_start ov62_0223C63C +ov62_0223C63C: ; 0x0223C63C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + beq _0223C658 + cmp r0, #1 + beq _0223C6C2 + cmp r0, #2 + beq _0223C73E + b _0223C782 +_0223C658: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, _0223C788 ; =0x00002F64 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223C672 + add r0, r5, #0 + bl ov62_0223B958 +_0223C672: + ldr r0, _0223C78C ; =0x0000047C + add r0, r5, r0 + bl ov62_02233600 + ldr r0, _0223C790 ; =0x0000049C + add r0, r5, r0 + bl ov62_022332FC + ldr r0, _0223C790 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022334FC + ldr r0, _0223C788 ; =0x00002F64 + mov r1, #1 + str r1, [r4, r0] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + mov r2, #8 + mov r1, #0x69 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #8] + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + bl ov62_02231560 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223C6C2: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + mov r2, #1 + add r1, r4, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C782 + ldr r1, _0223C794 ; =0x000004D4 + add r0, r5, #0 + ldr r1, [r5, r1] + bl ov62_02239D60 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C798 ; =0x00002ED8 + add r1, r5, #0 + add r0, r4, r0 + bl ov62_02232378 + ldr r0, _0223C798 ; =0x00002ED8 + mov r1, #0 + add r0, r4, r0 + bl ov62_022323B8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223C782 +_0223C73E: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C782 + ldr r0, _0223C798 ; =0x00002ED8 + mov r1, #1 + add r0, r4, r0 + bl ov62_022323B8 + ldr r1, _0223C788 ; =0x00002F64 + add r0, r5, #0 + ldr r1, [r4, r1] + add r1, #0x79 + bl ov62_0223B768 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 +_0223C782: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C788: .word 0x00002F64 +_0223C78C: .word 0x0000047C +_0223C790: .word 0x0000049C +_0223C794: .word 0x000004D4 +_0223C798: .word 0x00002ED8 + thumb_func_end ov62_0223C63C + + thumb_func_start ov62_0223C79C +ov62_0223C79C: ; 0x0223C79C + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223C7B8 + cmp r1, #1 + beq _0223C7C6 + cmp r1, #2 + beq _0223C7EA + b _0223C84A +_0223C7B8: + ldr r0, _0223C92C ; =0x00002F64 + mov r1, #0 + str r1, [r4, r0] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223C924 +_0223C7C6: + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223C930 ; =0x00002ED8 + add r1, r5, #0 + add r0, r4, r0 + bl ov62_02232394 + add r0, r5, #0 + bl ov62_02239D8C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223C7EA: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + mov r2, #1 + add r1, r4, r1 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + bne _0223C802 + b _0223C924 +_0223C802: + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + mov r1, #3 + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + add r3, r1, #0 + bl sub_0200710C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223C924 +_0223C84A: + mov r1, #0x69 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #4 + add r1, r4, r1 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _0223C924 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r1, _0223C92C ; =0x00002F64 + add r0, r5, #0 + ldr r1, [r4, r1] + add r1, #0x79 + bl ov62_0223B768 + add r0, r5, #0 + bl ov62_0223B888 + ldr r0, _0223C934 ; =0x0000047C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #2 + bl ov62_022335BC + ldr r3, _0223C938 ; =0x00002EAC + ldr r0, _0223C93C ; =0x0000049C + add r2, r4, r3 + sub r3, #0xa0 + add r0, r5, r0 + add r1, r5, #0 + add r3, r4, r3 + bl ov62_02232AAC + ldr r1, _0223C934 ; =0x0000047C + add r0, r5, r1 + add r1, #0x20 + add r1, r5, r1 + bl ov62_02233638 + ldr r0, _0223C93C ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #1 + bl ov62_0223331C + ldr r0, _0223C93C ; =0x0000049C + mov r1, #0x38 + add r0, r5, r0 + mov r2, #0xb0 + bl ov62_02233434 + ldr r0, _0223C92C ; =0x00002F64 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223C900 + ldr r0, _0223C934 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233664 + ldr r1, _0223C93C ; =0x0000049C + add r0, r5, r1 + sub r1, #0x10 + ldrsh r1, [r5, r1] + bl ov62_022331C8 + ldr r0, _0223C93C ; =0x0000049C + ldr r2, _0223C940 ; =0x00002E0C + add r0, r5, r0 + add r1, r5, #0 + add r2, r4, r2 + bl ov62_02232BB4 + ldr r2, _0223C944 ; =0x000004D8 + mov r0, #0x6f + ldr r3, [r5, r2] + mov r2, #0x18 + mul r2, r3 + lsl r0, r0, #4 + add r2, #0x44 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8EC +_0223C900: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 +_0223C924: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223C92C: .word 0x00002F64 +_0223C930: .word 0x00002ED8 +_0223C934: .word 0x0000047C +_0223C938: .word 0x00002EAC +_0223C93C: .word 0x0000049C +_0223C940: .word 0x00002E0C +_0223C944: .word 0x000004D8 + thumb_func_end ov62_0223C79C + + thumb_func_start ov62_0223C948 +ov62_0223C948: ; 0x0223C948 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r7, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223C95E + cmp r1, #1 + beq _0223C9B4 + b _0223CA0A +_0223C95E: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223ABE4 + add r0, r5, #0 + bl ov62_0223A110 + ldr r0, _0223CAA0 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B8B0 + ldr r0, _0223CAA0 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0208B8B0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223CA9C +_0223C9B4: + bl ov62_02233790 + cmp r0, #0 + beq _0223CA9C + mov r6, #0 + add r4, r7, #0 +_0223C9C0: + mov r0, #0x33 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024034 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #5 + blt _0223C9C0 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r7, r0 + bl ov62_02231688 + add r0, r5, #0 + bl ov62_0223146C + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223CA9C +_0223CA0A: + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r7, r0 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223CA64 + add r0, r5, #0 + bl ov62_022318E8 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r7, r0 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + mov r0, #0xe1 + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_02030A98 + add r0, r7, #0 + bl sub_020181C4 + b _0223CA9C +_0223CA64: + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r7, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #1 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r3, #0x6b + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + lsl r3, r3, #2 + ldr r3, [r7, r3] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r1, #3 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223CA9C: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223CAA0: .word 0x000006F4 + thumb_func_end ov62_0223C948 + + thumb_func_start ov62_0223CAA4 +ov62_0223CAA4: ; 0x0223CAA4 + bx lr + ; .align 2, 0 + thumb_func_end ov62_0223CAA4 + + thumb_func_start ov62_0223CAA8 +ov62_0223CAA8: ; 0x0223CAA8 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r1, [r1, #0] + ldr r4, [r0, r2] + cmp r1, #1 + bne _0223CAC0 + mov r0, #0xe2 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} +_0223CAC0: + bl ov62_0224112C + mov r1, #0xe3 + lsl r1, r1, #2 + add r1, r4, r1 + mov r2, #0x14 + bl ov61_0222BD18 + mov r1, #0xe2 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #4 + add r1, #0x54 + ldr r2, _0223CAE8 ; =0x00002A30 + add r0, r4, r0 + add r1, r4, r1 + bl sub_020C4DB0 + pop {r4, pc} + nop +_0223CAE8: .word 0x00002A30 + thumb_func_end ov62_0223CAA8 + + .rodata + + + .global Unk_ov62_02248D50 +Unk_ov62_02248D50: ; 0x02248D50 + .incbin "incbin/overlay62_rodata.bin", 0x624, 0x628 - 0x624 + + .global Unk_ov62_02248D54 +Unk_ov62_02248D54: ; 0x02248D54 + .incbin "incbin/overlay62_rodata.bin", 0x628, 0x630 - 0x628 + + .global Unk_ov62_02248D5C +Unk_ov62_02248D5C: ; 0x02248D5C + .incbin "incbin/overlay62_rodata.bin", 0x630, 0x638 - 0x630 + + .global Unk_ov62_02248D64 +Unk_ov62_02248D64: ; 0x02248D64 + .incbin "incbin/overlay62_rodata.bin", 0x638, 0x640 - 0x638 + + .global Unk_ov62_02248D6C +Unk_ov62_02248D6C: ; 0x02248D6C + .incbin "incbin/overlay62_rodata.bin", 0x640, 0x64C - 0x640 + + .global Unk_ov62_02248D78 +Unk_ov62_02248D78: ; 0x02248D78 + .incbin "incbin/overlay62_rodata.bin", 0x64C, 0x658 - 0x64C + + .global Unk_ov62_02248D84 +Unk_ov62_02248D84: ; 0x02248D84 + .incbin "incbin/overlay62_rodata.bin", 0x658, 0x664 - 0x658 + + .global Unk_ov62_02248D90 +Unk_ov62_02248D90: ; 0x02248D90 + .incbin "incbin/overlay62_rodata.bin", 0x664, 0x670 - 0x664 + + .global Unk_ov62_02248D9C +Unk_ov62_02248D9C: ; 0x02248D9C + .incbin "incbin/overlay62_rodata.bin", 0x670, 0x67C - 0x670 + + .global Unk_ov62_02248DA8 +Unk_ov62_02248DA8: ; 0x02248DA8 + .incbin "incbin/overlay62_rodata.bin", 0x67C, 0x688 - 0x67C + + .global Unk_ov62_02248DB4 +Unk_ov62_02248DB4: ; 0x02248DB4 + .incbin "incbin/overlay62_rodata.bin", 0x688, 0x698 - 0x688 + + .global Unk_ov62_02248DC4 +Unk_ov62_02248DC4: ; 0x02248DC4 + .incbin "incbin/overlay62_rodata.bin", 0x698, 0x6B0 - 0x698 + + .global Unk_ov62_02248DDC +Unk_ov62_02248DDC: ; 0x02248DDC + .incbin "incbin/overlay62_rodata.bin", 0x6B0, 0x6CC - 0x6B0 + + .global Unk_ov62_02248DF8 +Unk_ov62_02248DF8: ; 0x02248DF8 + .incbin "incbin/overlay62_rodata.bin", 0x6CC, 0x6F8 - 0x6CC + + .global Unk_ov62_02248E24 +Unk_ov62_02248E24: ; 0x02248E24 + .incbin "incbin/overlay62_rodata.bin", 0x6F8, 0x724 - 0x6F8 + + .global Unk_ov62_02248E50 +Unk_ov62_02248E50: ; 0x02248E50 + .incbin "incbin/overlay62_rodata.bin", 0x724, 0x38 + diff --git a/asm/ov62_0223CAEC.s b/asm/ov62_0223CAEC.s new file mode 100644 index 000000000..1b0535a94 --- /dev/null +++ b/asm/ov62_0223CAEC.s @@ -0,0 +1,2556 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_0223CAEC +ov62_0223CAEC: ; 0x0223CAEC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r4, #0x1c] + cmp r0, #0 + ldr r0, _0223CBC0 ; =0x00000B0C + bne _0223CB1A + ldr r3, _0223CBC4 ; =0x02248F00 + add r2, r4, r0 + mov r6, #5 +_0223CB06: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _0223CB06 + ldr r0, [r3, #0] + mov r1, #0 + str r0, [r2, #0] + ldr r0, _0223CBC8 ; =0x00000748 + str r1, [r4, r0] + b _0223CB46 +_0223CB1A: + ldr r3, _0223CBCC ; =0x02248F2C + add r2, r4, r0 + mov r6, #5 +_0223CB20: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _0223CB20 + ldr r0, [r3, #0] + ldr r1, _0223CBD0 ; =0x00000714 + str r0, [r2, #0] + ldr r3, [r4, r1] + mov r1, #0x72 + ldr r2, [r4, #0xc] + lsl r1, r1, #2 + mul r1, r2 + ldrb r1, [r3, r1] + ldr r0, [r5, #0x4c] + add r1, #0x5e + bl sub_0200B1EC + ldr r1, _0223CBC8 ; =0x00000748 + str r0, [r4, r1] +_0223CB46: + mov r1, #0xb1 + ldr r0, [r4, #0x20] + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r3, [r4, #0xc] + ldr r0, _0223CBD4 ; =0x0000074C + lsl r2, r3, #2 + add r2, r3, r2 + add r0, r4, r0 + lsl r2, r2, #6 + add r2, r0, r2 + sub r0, r1, #4 + str r2, [r4, r0] + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223CBD8 ; =0x0000049C + add r0, r5, r0 + bl ov62_02233310 + ldr r0, [r4, #0xc] + ldr r3, _0223CBC0 ; =0x00000B0C + str r0, [sp] + ldr r0, [r4, #0x14] + ldr r2, _0223CBC8 ; =0x00000748 + str r0, [sp, #4] + ldr r0, [r4, r2] + sub r2, r2, #4 + str r0, [sp, #8] + ldr r0, _0223CBD8 ; =0x0000049C + ldr r2, [r4, r2] + add r0, r5, r0 + add r1, r5, #0 + add r3, r4, r3 + bl ov62_02232778 + ldr r1, _0223CBDC ; =0x0000047C + add r0, r5, r1 + add r1, #0x20 + add r1, r5, r1 + bl ov62_02233638 + ldr r0, _0223CBD8 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #1 + bl ov62_0223331C + ldr r0, _0223CBD8 ; =0x0000049C + mov r1, #0x70 + add r0, r5, r0 + mov r2, #0xb8 + bl ov62_02233434 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223CBC0: .word 0x00000B0C +_0223CBC4: .word 0x02248F00 +_0223CBC8: .word 0x00000748 +_0223CBCC: .word 0x02248F2C +_0223CBD0: .word 0x00000714 +_0223CBD4: .word 0x0000074C +_0223CBD8: .word 0x0000049C +_0223CBDC: .word 0x0000047C + thumb_func_end ov62_0223CAEC + + thumb_func_start ov62_0223CBE0 +ov62_0223CBE0: ; 0x0223CBE0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + ldr r0, _0223CF00 ; =0x00000714 + add r1, r4, #0 + add r1, #0xe0 + str r1, [r4, r0] + add r1, r0, #0 + sub r1, #0xdc + add r1, r4, r1 + add r0, r0, #4 + str r1, [r4, r0] + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0223CC12 + cmp r0, #1 + bne _0223CC08 + b _0223CD0C +_0223CC08: + cmp r0, #2 + bne _0223CC0E + b _0223CDF8 +_0223CC0E: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_0223CC12: + mov r6, #0 + add r5, r6, #0 + str r6, [sp] +_0223CC18: + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0xc] + cmp r0, #0 + bne _0223CC70 + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #6 + add r0, r4, r0 + add r2, r5, r0 + ldr r1, _0223CF04 ; =0x00002710 + ldr r0, _0223CF08 ; =0x0000074C + str r1, [r2, r0] + sub r0, #0x34 + ldr r2, [r4, r0] + ldr r1, [r4, #0xc] + mov r0, #0x48 + mul r0, r1 + add r0, r2, r0 + add r0, r6, r0 + ldrb r0, [r0, #4] + mov r1, #4 + bl ov62_02232234 + ldr r2, [r4, #0xc] + lsl r1, r2, #2 + add r1, r2, r1 + lsl r1, r1, #6 + add r1, r4, r1 + add r2, r5, r1 + mov r1, #0x75 + lsl r1, r1, #4 + str r0, [r2, r1] + ldr r2, [r4, #0xc] + asr r0, r6, #0x1f + lsl r1, r2, #2 + add r1, r2, r1 + lsl r1, r1, #6 + add r1, r4, r1 + add r2, r5, r1 + ldr r1, _0223CF0C ; =0x00000754 + str r6, [r2, r1] + add r1, r1, #4 + str r0, [r2, r1] + b _0223CCFA +_0223CC70: + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #6 + add r0, r4, r0 + add r2, r5, r0 + ldr r1, _0223CF10 ; =0x00004E20 + ldr r0, _0223CF08 ; =0x0000074C + str r1, [r2, r0] + sub r0, #0x38 + ldr r2, [r4, r0] + mov r0, #0x72 + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + mul r0, r1 + add r0, r2, r0 + add r0, r6, r0 + ldrb r0, [r0, #4] + mov r1, #4 + bl ov62_02232234 + ldr r2, [r4, #0xc] + lsl r1, r2, #2 + add r1, r2, r1 + lsl r1, r1, #6 + add r1, r4, r1 + add r2, r5, r1 + mov r1, #0x75 + lsl r1, r1, #4 + str r0, [r2, r1] + sub r1, #0x3c + ldr r2, [r4, r1] + mov r1, #0x72 + ldr r0, [r4, #0xc] + lsl r1, r1, #2 + mul r1, r0 + add r2, r2, r1 + ldr r1, [sp] + add r1, r1, r2 + add r1, #0x14 + ldmia r1!, {r2, r3} + lsl r1, r0, #2 + add r0, r0, r1 + lsl r0, r0, #6 + add r0, r4, r0 + add r1, r5, r0 + ldr r0, _0223CF0C ; =0x00000754 + add r0, r1, r0 + stmia r0!, {r2, r3} + ldr r1, [r4, #0xc] + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #6 + add r0, r4, r0 + add r3, r0, r5 + ldr r0, _0223CF0C ; =0x00000754 + ldr r2, [r3, r0] + add r0, r0, #4 + ldr r1, [r3, r0] + ldr r7, _0223CF14 ; =0x8AC72304 + ldr r0, _0223CF18 ; =0x89E7FFFF + sub r0, r2, r0 + sbc r1, r7 + blo _0223CCFA + ldr r1, _0223CF18 ; =0x89E7FFFF + ldr r0, _0223CF0C ; =0x00000754 + str r1, [r3, r0] + ldr r1, _0223CF14 ; =0x8AC72304 + add r0, r0, #4 + str r1, [r3, r0] +_0223CCFA: + ldr r0, [sp] + add r6, r6, #1 + add r0, #8 + add r5, #0x10 + str r0, [sp] + cmp r6, #0x10 + blt _0223CC18 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_0223CD0C: + mov r1, #0 + add r0, r1, #0 + add r7, r1, #0 +_0223CD12: + ldr r2, [r4, #0x1c] + ldr r3, [r4, #0xc] + cmp r2, #0 + bne _0223CD62 + lsl r2, r3, #2 + add r2, r3, r2 + lsl r2, r2, #6 + add r2, r4, r2 + add r5, r0, r2 + ldr r3, _0223CF1C ; =0x00007530 + ldr r2, _0223CF08 ; =0x0000074C + str r3, [r5, r2] + sub r2, #0x34 + ldr r3, [r4, #0xc] + mov r5, #0x48 + ldr r2, [r4, r2] + mul r5, r3 + add r2, r2, r5 + lsl r5, r3, #2 + add r3, r3, r5 + add r2, r1, r2 + lsl r3, r3, #6 + add r3, r4, r3 + add r5, r0, r3 + mov r3, #0x75 + ldrb r2, [r2, #0x14] + lsl r3, r3, #4 + str r2, [r5, r3] + ldr r5, [r4, #0xc] + asr r3, r1, #0x1f + lsl r2, r5, #2 + add r2, r5, r2 + lsl r2, r2, #6 + add r2, r4, r2 + ldr r5, _0223CF0C ; =0x00000754 + add r2, r0, r2 + str r1, [r2, r5] + add r5, r5, #4 + str r3, [r2, r5] + b _0223CDEA +_0223CD62: + lsl r2, r3, #2 + add r2, r3, r2 + lsl r2, r2, #6 + add r2, r4, r2 + add r5, r0, r2 + ldr r3, _0223CF20 ; =0x00009C40 + ldr r2, _0223CF08 ; =0x0000074C + str r3, [r5, r2] + sub r2, #0x38 + mov r5, #0x72 + ldr r3, [r4, #0xc] + lsl r5, r5, #2 + ldr r2, [r4, r2] + mul r5, r3 + add r2, r2, r5 + lsl r5, r3, #2 + add r2, r1, r2 + add r3, r3, r5 + add r2, #0x94 + lsl r3, r3, #6 + add r3, r4, r3 + add r5, r0, r3 + mov r3, #0x75 + ldrb r2, [r2] + lsl r3, r3, #4 + str r2, [r5, r3] + add r2, r3, #0 + sub r2, #0x3c + mov r3, #0x72 + ldr r5, [r4, #0xc] + lsl r3, r3, #2 + ldr r2, [r4, r2] + mul r3, r5 + add r2, r2, r3 + add r6, r7, r2 + add r6, #0xa0 + ldmia r6!, {r2, r3} + lsl r6, r5, #2 + add r5, r5, r6 + lsl r5, r5, #6 + add r5, r4, r5 + add r6, r0, r5 + ldr r5, _0223CF0C ; =0x00000754 + add r5, r6, r5 + stmia r5!, {r2, r3} + ldr r3, [r4, #0xc] + lsl r2, r3, #2 + add r2, r3, r2 + lsl r2, r2, #6 + add r2, r4, r2 + add r5, r2, r0 + ldr r2, _0223CF0C ; =0x00000754 + ldr r3, [r5, r2] + add r2, r2, #4 + ldr r2, [r5, r2] + ldr r6, _0223CF14 ; =0x8AC72304 + str r6, [sp, #0xc] + ldr r6, _0223CF18 ; =0x89E7FFFF + sub r3, r3, r6 + ldr r3, [sp, #0xc] + sbc r2, r3 + blo _0223CDEA + ldr r3, _0223CF18 ; =0x89E7FFFF + ldr r2, _0223CF0C ; =0x00000754 + str r3, [r5, r2] + ldr r3, _0223CF14 ; =0x8AC72304 + add r2, r2, #4 + str r3, [r5, r2] +_0223CDEA: + add r1, r1, #1 + add r0, #0x10 + add r7, #8 + cmp r1, #0xc + blt _0223CD12 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_0223CDF8: + mov r7, #0 + add r0, r7, #0 + add r1, r7, #0 + str r7, [sp, #0x10] +_0223CE00: + ldr r2, [r4, #0x1c] + ldr r3, [r4, #0xc] + cmp r2, #0 + bne _0223CE50 + lsl r2, r3, #2 + add r2, r3, r2 + lsl r2, r2, #6 + add r2, r4, r2 + add r5, r0, r2 + ldr r3, _0223CF24 ; =0x0000C350 + ldr r2, _0223CF08 ; =0x0000074C + str r3, [r5, r2] + sub r2, #0x34 + ldr r3, [r4, #0xc] + mov r5, #0x48 + ldr r2, [r4, r2] + mul r5, r3 + add r2, r2, r5 + lsl r5, r3, #2 + add r3, r3, r5 + add r2, r1, r2 + lsl r3, r3, #6 + add r3, r4, r3 + add r5, r0, r3 + mov r3, #0x75 + ldrh r2, [r2, #0x20] + lsl r3, r3, #4 + str r2, [r5, r3] + ldr r5, [r4, #0xc] + asr r3, r7, #0x1f + lsl r2, r5, #2 + add r2, r5, r2 + lsl r2, r2, #6 + add r2, r4, r2 + ldr r5, _0223CF0C ; =0x00000754 + add r2, r0, r2 + str r7, [r2, r5] + add r5, r5, #4 + str r3, [r2, r5] + b _0223CEEA +_0223CE50: + lsl r2, r3, #2 + add r2, r3, r2 + lsl r2, r2, #6 + add r2, r4, r2 + add r5, r0, r2 + ldr r3, _0223CF28 ; =0x0000EA60 + ldr r2, _0223CF08 ; =0x0000074C + str r3, [r5, r2] + sub r2, #0x38 + mov r5, #0x72 + ldr r3, [r4, #0xc] + lsl r5, r5, #2 + ldr r2, [r4, r2] + mul r5, r3 + add r2, r2, r5 + add r5, r1, r2 + mov r2, #1 + lsl r2, r2, #8 + ldrh r2, [r5, r2] + lsl r5, r3, #2 + add r3, r3, r5 + lsl r3, r3, #6 + add r3, r4, r3 + add r5, r0, r3 + mov r3, #0x75 + lsl r3, r3, #4 + str r2, [r5, r3] + ldr r2, [r4, #0xc] + str r2, [sp, #4] + add r2, r3, #0 + sub r2, #0x3c + mov r3, #0x72 + ldr r5, [sp, #4] + lsl r3, r3, #2 + ldr r2, [r4, r2] + mul r3, r5 + add r3, r2, r3 + ldr r2, [sp, #0x10] + add r3, r2, r3 + mov r2, #0x4a + lsl r2, r2, #2 + add r5, r3, r2 + ldmia r5!, {r2, r3} + ldr r5, [sp, #4] + lsl r6, r5, #2 + add r5, r5, r6 + lsl r5, r5, #6 + add r5, r4, r5 + add r6, r0, r5 + ldr r5, _0223CF0C ; =0x00000754 + add r5, r6, r5 + stmia r5!, {r2, r3} + ldr r3, [r4, #0xc] + lsl r2, r3, #2 + add r2, r3, r2 + lsl r2, r2, #6 + add r2, r4, r2 + add r3, r2, r0 + ldr r2, _0223CF0C ; =0x00000754 + str r3, [sp, #8] + ldr r5, [r3, r2] + add r2, r2, #4 + ldr r3, [r3, r2] + ldr r2, _0223CF14 ; =0x8AC72304 + mov ip, r2 + ldr r2, _0223CF18 ; =0x89E7FFFF + sub r2, r5, r2 + mov r2, ip + sbc r3, r2 + blo _0223CEEA + ldr r5, _0223CF18 ; =0x89E7FFFF + ldr r3, [sp, #8] + ldr r2, _0223CF0C ; =0x00000754 + str r5, [r3, r2] + ldr r5, _0223CF14 ; =0x8AC72304 + add r2, r2, #4 + str r5, [r3, r2] +_0223CEEA: + ldr r2, [sp, #0x10] + add r7, r7, #1 + add r2, #8 + add r0, #0x10 + add r1, r1, #2 + str r2, [sp, #0x10] + cmp r7, #0x14 + blt _0223CE00 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223CF00: .word 0x00000714 +_0223CF04: .word 0x00002710 +_0223CF08: .word 0x0000074C +_0223CF0C: .word 0x00000754 +_0223CF10: .word 0x00004E20 +_0223CF14: .word 0x8AC72304 +_0223CF18: .word 0x89E7FFFF +_0223CF1C: .word 0x00007530 +_0223CF20: .word 0x00009C40 +_0223CF24: .word 0x0000C350 +_0223CF28: .word 0x0000EA60 + thumb_func_end ov62_0223CBE0 + + thumb_func_start ov62_0223CF2C +ov62_0223CF2C: ; 0x0223CF2C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #0x14] + mov r0, #0 + str r0, [sp, #0x18] + mov r1, #0x86 + ldr r0, [sp, #0x14] + lsl r1, r1, #4 + ldr r4, [r0, r1] + ldr r5, _0223CFD8 ; =0x02248EA0 + mov r6, #1 + add r4, #0x84 +_0223CF44: + ldr r0, [r5, #4] + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r5, #8] + mov r2, #6 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r5, #0] + ldr r0, [r0, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r1, [r5, #8] + ldr r0, [r5, #0xc] + mul r0, r1 + add r6, r6, r0 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [r0, #0x48] + add r1, #0x50 + bl sub_0200B1EC + add r7, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov62_0223429C + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223CFDC ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r7, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + add r4, #0x10 + add r0, r0, #1 + add r5, #0x10 + str r0, [sp, #0x18] + cmp r0, #2 + blt _0223CF44 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223CFD8: .word 0x02248EA0 +_0223CFDC: .word 0x000F0D00 + thumb_func_end ov62_0223CF2C + + thumb_func_start ov62_0223CFE0 +ov62_0223CFE0: ; 0x0223CFE0 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r5, [r0, r1] + mov r4, #0 + add r5, #0x84 +_0223CFEC: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #2 + blt _0223CFEC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223CFE0 + + thumb_func_start ov62_0223D004 +ov62_0223D004: ; 0x0223D004 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r0, [r0, r1] + ldr r6, _0223D0F4 ; =0x02248EC0 + str r0, [sp, #0x1c] + ldr r4, [sp, #0x1c] + mov r0, #0 + ldr r5, _0223D0F8 ; =0x02248EE0 + mov r7, #1 + str r0, [sp, #0x18] + add r4, #0x24 +_0223D020: + add r0, r4, #0 + bl sub_0201A7A0 + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0x1c] + cmp r0, #0 + bne _0223D068 + ldr r0, [r6, #4] + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r6, #8] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r6, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r6, #0] + ldr r0, [r0, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r1, [r6, #8] + ldr r0, [r6, #0xc] + b _0223D0A0 +_0223D068: + ldr r0, [r5, #4] + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r5, #8] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r5, #0] + ldr r0, [r0, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r1, [r5, #8] + ldr r0, [r5, #0xc] +_0223D0A0: + mul r0, r1 + add r7, r7, r0 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + mov r1, #0x43 + ldr r0, [r0, #0x48] + bl sub_0200B1EC + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223D0FC ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r2, [sp, #0x20] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, [sp, #0x18] + add r4, #0x10 + add r0, r0, #1 + add r6, #0x10 + add r5, #0x10 + str r0, [sp, #0x18] + cmp r0, #2 + blt _0223D020 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D0F4: .word 0x02248EC0 +_0223D0F8: .word 0x02248EE0 +_0223D0FC: .word 0x000F0D00 + thumb_func_end ov62_0223D004 + + thumb_func_start ov62_0223D100 +ov62_0223D100: ; 0x0223D100 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r5, [r0, r1] + mov r4, #0 + add r5, #0x24 +_0223D10C: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #2 + blt _0223D10C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223D100 + + thumb_func_start ov62_0223D124 +ov62_0223D124: ; 0x0223D124 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #0x57 + blt _0223D134 + mov r5, #0 + bl sub_02022974 +_0223D134: + ldr r6, _0223D158 ; =0x022497E8 + lsl r5, r5, #2 + ldr r1, [r6, r5] + ldr r0, _0223D15C ; =0x0000FFFF + cmp r1, r0 + bne _0223D144 + bl sub_02022974 +_0223D144: + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0202CD88 + ldr r1, [r6, r5] + bl sub_0202CFB8 + pop {r4, r5, r6, pc} + nop +_0223D158: .word 0x022497E8 +_0223D15C: .word 0x0000FFFF + thumb_func_end ov62_0223D124 + + thumb_func_start ov62_0223D160 +ov62_0223D160: ; 0x0223D160 + push {r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x30 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x14] + mov r0, #0x66 + bl ov62_02231690 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0x24 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r4, #0x1c] + cmp r0, #0 + ldr r0, [r5, #0x4c] + bne _0223D1A6 + ldr r1, _0223D390 ; =0x00000718 + ldr r3, [r4, #0xc] + mov r2, #0x48 + ldr r1, [r4, r1] + mul r2, r3 + ldrb r1, [r1, r2] + sub r1, r1, #1 + bl sub_0200B1EC + b _0223D1BA +_0223D1A6: + ldr r1, _0223D394 ; =0x00000714 + mov r2, #0x72 + ldr r3, [r4, #0xc] + lsl r2, r2, #2 + ldr r1, [r4, r1] + mul r2, r3 + ldrb r1, [r1, r2] + sub r1, r1, #1 + bl sub_0200B1EC +_0223D1BA: + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223D398 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x24 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + add r0, #0x24 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + add r0, #0x34 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r4, #0x1c] + cmp r0, #0 + ldr r0, [r5, #0x48] + bne _0223D200 + ldr r1, [r4, #0x14] + add r1, #0x52 + bl sub_0200B1EC + b _0223D206 +_0223D200: + mov r1, #0x5b + bl sub_0200B1EC +_0223D206: + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223D398 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x34 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + add r0, #0x34 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + ldr r0, _0223D39C ; =0x0000088C + mov r1, #0x66 + ldr r0, [r5, r0] + bl sub_02030B94 + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0223D254 + cmp r0, #1 + beq _0223D292 + cmp r0, #2 + beq _0223D2BC + b _0223D326 +_0223D254: + ldr r0, _0223D39C ; =0x0000088C + ldr r0, [r5, r0] + bl sub_02030CDC + str r0, [sp, #0x20] + ldr r0, [r5, #0x48] + mov r1, #0x55 + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [sp, #0x20] + mov r1, #4 + bl ov62_02232234 + add r1, r0, #0 + ldr r0, _0223D3A0 ; =0x00000744 + ldr r0, [r4, r0] + bl sub_0200B1EC + str r0, [sp, #0x1c] + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + add r0, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + b _0223D326 +_0223D292: + ldr r0, _0223D39C ; =0x0000088C + ldr r0, [r5, r0] + bl sub_02030CCC + str r0, [sp, #0x24] + ldr r0, [r5, #0x48] + mov r1, #0x56 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x1c] + ldr r2, [sp, #0x24] + add r0, r6, #0 + mov r1, #0 + bl sub_0200C2E0 + b _0223D326 +_0223D2BC: + ldr r0, _0223D39C ; =0x0000088C + ldr r0, [r5, r0] + bl sub_02030BBC + str r0, [sp, #0x10] + ldr r0, _0223D39C ; =0x0000088C + ldr r0, [r5, r0] + bl sub_02030BEC + str r0, [sp, #0x28] + ldr r0, [r5, #0x48] + mov r1, #0x57 + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [sp, #0x28] + cmp r0, #0 + beq _0223D2E4 + ldr r0, _0223D3A4 ; =0x000001EE + str r0, [sp, #0x10] +_0223D2E4: + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _0223D308 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x10] + mov r1, #0x66 + add r2, sp, #0x2c + bl sub_0200B274 + ldr r0, [sp, #0x1c] + add r1, sp, #0x2c + bl sub_02023D28 + b _0223D312 +_0223D308: + ldr r0, [r5, #0x48] + mov r1, #0x15 + bl sub_0200B1EC + str r0, [sp, #0x1c] +_0223D312: + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + add r0, r6, #0 + add r3, r1, #0 + bl sub_0200B48C +_0223D326: + mov r1, #1 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x18] + add r0, r6, #0 + mov r3, #0 + bl sub_0200B48C + ldr r1, [sp, #0x14] + add r0, r6, #0 + add r2, r7, #0 + bl sub_0200C388 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223D398 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r2, [sp, #0x14] + add r0, #0x34 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r4, #0x34 + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r6, #0 + bl sub_0200C41C + add r0, r6, #0 + bl sub_0200B3F0 + add sp, #0x1fc + add sp, #0x30 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D390: .word 0x00000718 +_0223D394: .word 0x00000714 +_0223D398: .word 0x000F0D00 +_0223D39C: .word 0x0000088C +_0223D3A0: .word 0x00000744 +_0223D3A4: .word 0x000001EE + thumb_func_end ov62_0223D160 + + thumb_func_start ov62_0223D3A8 +ov62_0223D3A8: ; 0x0223D3A8 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + bne _0223D3DC + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0200D3F4 + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + mov r1, #1 + bl sub_020129D0 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + b _0223D402 +_0223D3DC: + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + mov r1, #0 + bl sub_020129D0 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 +_0223D402: + add r0, r4, #0 + add r0, #0xac + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r0, #0] + sub r2, #0x2c + bl sub_020128C4 + add r4, #0xc8 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_0223D3A8 + + thumb_func_start ov62_0223D424 +ov62_0223D424: ; 0x0223D424 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_0223131C + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + add r1, r4, #0 + add r1, #0xa8 + str r0, [r1, #0] + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + add r1, r4, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r4, #0 + add r1, r5, #0 + add r0, #0xa4 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0xc0 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0xa4 + add r1, #0x14 + mov r2, #0x35 + bl ov62_0223124C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0xc0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + add r0, r4, #0 + add r0, #0xac + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r0, #0] + sub r2, #0x2c + bl sub_020128C4 + add r0, r4, #0 + add r0, #0xc8 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r0, #0] + sub r2, #0x2c + bl sub_020128C4 + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + mov r1, #0 + bl sub_020129D0 + add r4, #0xc8 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_020129D0 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223D3A8 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223D424 + + thumb_func_start ov62_0223D4E4 +ov62_0223D4E4: ; 0x0223D4E4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r0, r4, #0 + add r0, #0xa4 + bl ov62_022312B0 + add r0, r4, #0 + add r0, #0xc0 + bl ov62_022312B0 + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl sub_0200D0F4 + add r4, #0xc4 + ldr r0, [r4, #0] + bl sub_0200D0F4 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223D4E4 + + thumb_func_start ov62_0223D518 +ov62_0223D518: ; 0x0223D518 + push {r3, r4, r5} + sub sp, #0xc + ldr r5, _0223D53C ; =0x02248E88 + add r2, r0, #0 + ldmia r5!, {r0, r1} + add r4, sp, #0 + add r3, r4, #0 + stmia r4!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r4, #0] + ldr r0, [r2, #0x14] + lsl r0, r0, #2 + ldr r0, [r3, r0] + str r0, [r2, #0x20] + add sp, #0xc + pop {r3, r4, r5} + bx lr + nop +_0223D53C: .word 0x02248E88 + thumb_func_end ov62_0223D518 + + thumb_func_start ov62_0223D540 +ov62_0223D540: ; 0x0223D540 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r5, r2] + cmp r1, #0 + bne _0223D5A2 + cmp r0, #0 + beq _0223D558 + cmp r0, #1 + beq _0223D576 + b _0223D594 +_0223D558: + add r0, r5, #0 + bl ov62_02234520 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r1, [r4, #0x10] + bl sub_020E1F6C + str r1, [r4, #0xc] + add r0, r5, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_0223D576: + add r0, r5, #0 + bl ov62_02234520 + ldr r0, [r4, #0x14] + add r0, r0, #1 + str r0, [r4, #0x14] + ldr r1, [r4, #0x18] + bl sub_020E1F6C + str r1, [r4, #0x14] + add r0, r5, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_0223D594: + add r0, r5, #0 + bl ov62_02234520 + add r0, r5, #0 + mov r1, #7 + bl ov62_0222FB60 +_0223D5A2: + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223D540 + + thumb_func_start ov62_0223D5A4 +ov62_0223D5A4: ; 0x0223D5A4 + push {r3, r4, r5, lr} + ldr r1, _0223D634 ; =0x00000B38 + add r5, r0, #0 + mov r0, #0x66 + bl sub_02018144 + ldr r2, _0223D634 ; =0x00000B38 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + add r0, #0xc + ldr r0, [r5, r0] + str r0, [r4, #0x1c] + mov r0, #3 + str r0, [r4, #0x10] + add r0, r5, #0 + bl sub_0208BE68 + cmp r0, #0 + bne _0223D5DA + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] +_0223D5DA: + mov r0, #3 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov62_0223D518 + ldr r1, [r5, #0x48] + ldr r0, _0223D638 ; =0x00000744 + str r1, [r4, r0] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223D63C ; =0x02248E94 + ldr r2, _0223D640 ; =ov62_0223D540 + mov r1, #3 + add r3, r5, #0 + bl sub_02023FCC + add r4, #0xdc + str r0, [r4, #0] + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D634: .word 0x00000B38 +_0223D638: .word 0x00000744 +_0223D63C: .word 0x02248E94 +_0223D640: .word ov62_0223D540 + thumb_func_end ov62_0223D5A4 + + thumb_func_start ov62_0223D644 +ov62_0223D644: ; 0x0223D644 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223D65A + cmp r1, #1 + beq _0223D6B8 + b _0223D72E +_0223D65A: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _0223D66E + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223D66E: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223D73E +_0223D6B8: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + bl ov62_0223D424 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #0 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223D73E +_0223D72E: + bl ov62_02233790 + cmp r0, #0 + beq _0223D73E + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_0223D73E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223D644 + + thumb_func_start ov62_0223D744 +ov62_0223D744: ; 0x0223D744 + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _0223D75E + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_0223D75E: + ldr r0, [r4, #8] + cmp r0, #6 + bls _0223D766 + b _0223DA8C +_0223D766: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223D772: ; jump table + .short _0223D780 - _0223D772 - 2 ; case 0 + .short _0223D7C0 - _0223D772 - 2 ; case 1 + .short _0223D7D8 - _0223D772 - 2 ; case 2 + .short _0223D8C2 - _0223D772 - 2 ; case 3 + .short _0223D8E2 - _0223D772 - 2 ; case 4 + .short _0223D9A6 - _0223D772 - 2 ; case 5 + .short _0223DA04 - _0223D772 - 2 ; case 6 +_0223D780: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r1, _0223DABC ; =0x00000117 + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, _0223DAC0 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223DAB4 +_0223D7C0: + add r0, r4, #0 + bl ov62_0224112C + bl ov61_0222B2B8 + cmp r0, #1 + beq _0223D7D0 + b _0223DAB4 +_0223D7D0: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223DAB4 +_0223D7D8: + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + bne _0223D816 + ldr r0, _0223DAC0 ; =0x00000565 + mov r1, #0 + bl sub_020057A4 + add r0, r4, #0 + bl ov62_02231B8C + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #4 + bl ov62_022348B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #5 + str r0, [r4, #8] + b _0223DAB4 +_0223D816: + mov r0, #0x71 + lsl r0, r0, #4 + add r1, r5, r0 + add r0, #0xc + str r1, [r5, r0] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02025E5C + bl sub_0202CC58 + ldr r1, _0223DAC4 ; =0x00000728 + strh r0, [r5, r1] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02025E5C + bl sub_0202CC5C + ldr r1, _0223DAC8 ; =0x0000072A + strb r0, [r5, r1] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02025E5C + bl sub_0202CC60 + ldr r1, _0223DACC ; =0x0000072B + strb r0, [r5, r1] + add r0, r1, #0 + sub r0, #0xf + ldr r0, [r5, r0] + ldrb r2, [r0] + add r0, r1, #1 + strb r2, [r5, r0] + add r0, r1, #0 + sub r0, #0xf + ldr r0, [r5, r0] + ldrb r2, [r0, #1] + add r0, r1, #0 + add r0, #9 + strb r2, [r5, r0] + add r0, r1, #0 + sub r0, #0xf + ldr r0, [r5, r0] + ldrb r2, [r0, #2] + add r0, r1, #0 + add r0, #0x11 + strb r2, [r5, r0] + add r1, r1, #1 + ldrb r1, [r5, r1] + add r0, r4, #0 + sub r1, r1, #1 + bl ov62_0223D124 + mov r1, #0x73 + lsl r1, r1, #4 + str r0, [r5, r1] + add r1, r1, #4 + ldrb r1, [r5, r1] + add r0, r4, #0 + sub r1, r1, #1 + bl ov62_0223D124 + ldr r1, _0223DAD0 ; =0x00000738 + str r0, [r5, r1] + add r1, r1, #4 + ldrb r1, [r5, r1] + add r0, r4, #0 + sub r1, r1, #1 + bl ov62_0223D124 + mov r1, #0x1d + lsl r1, r1, #6 + str r0, [r5, r1] + ldr r0, _0223DAC0 ; =0x00000565 + mov r1, #0 + bl sub_020057A4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223DAB4 +_0223D8C2: + add r0, r4, #0 + bl ov62_0224112C + ldr r1, _0223DAD4 ; =0x0000088C + ldr r2, _0223DAD8 ; =0x0000072C + ldr r1, [r4, r1] + add r2, r5, r2 + bl ov61_0222B2D8 + cmp r0, #1 + beq _0223D8DA + b _0223DAB4 +_0223D8DA: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223DAB4 +_0223D8E2: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + bne _0223D920 + ldr r0, _0223DAC0 ; =0x00000565 + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #5 + bl ov62_022348B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #5 + str r0, [r4, #8] + b _0223DAB4 +_0223D920: + ldr r1, [r5, #0x1c] + mov r0, #0 + cmp r1, #0 + bne _0223D948 + ldr r1, _0223DADC ; =0x00000718 + ldr r2, [r5, r1] + ldrb r1, [r2] + cmp r1, #0 + beq _0223D944 + add r1, r2, #0 + add r1, #0x48 + ldrb r1, [r1] + cmp r1, #0 + beq _0223D944 + add r2, #0x90 + ldrb r1, [r2] + cmp r1, #0 + bne _0223D966 +_0223D944: + mov r0, #1 + b _0223D966 +_0223D948: + ldr r1, _0223DAE0 ; =0x00000714 + ldr r3, [r5, r1] + ldrb r1, [r3] + cmp r1, #0 + beq _0223D964 + mov r1, #0x72 + lsl r1, r1, #2 + ldrb r2, [r3, r1] + cmp r2, #0 + beq _0223D964 + lsl r1, r1, #1 + ldrb r1, [r3, r1] + cmp r1, #0 + bne _0223D966 +_0223D964: + mov r0, #1 +_0223D966: + cmp r0, #0 + beq _0223D992 + mov r2, #0 + add r0, r4, #0 + mov r1, #5 + add r3, r2, #0 + bl ov62_022348B8 + mov r1, #0x4b + mov r0, #0x51 + lsl r1, r1, #2 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #5 + str r0, [r4, #8] + b _0223DAB4 +_0223D992: + ldr r0, _0223DAC0 ; =0x00000565 + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223DAE4 ; =0x0000055F + bl sub_02005748 + mov r0, #0xff + str r0, [r4, #8] + b _0223DAB4 +_0223D9A6: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223D4E4 + add r0, r5, #0 + add r0, #0xdc + ldr r0, [r0, #0] + bl sub_02024034 + add r5, #8 + add r0, r5, #0 + bl ov62_02231688 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223DAB4 +_0223DA04: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _0223DAB4 + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223DA5A + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r5, #0 + bl sub_020181C4 + b _0223DAB4 +_0223DA5A: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223DAB4 +_0223DA8C: + add r0, r4, #0 + bl ov62_0223CBE0 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 +_0223DAB4: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223DABC: .word 0x00000117 +_0223DAC0: .word 0x00000565 +_0223DAC4: .word 0x00000728 +_0223DAC8: .word 0x0000072A +_0223DACC: .word 0x0000072B +_0223DAD0: .word 0x00000738 +_0223DAD4: .word 0x0000088C +_0223DAD8: .word 0x0000072C +_0223DADC: .word 0x00000718 +_0223DAE0: .word 0x00000714 +_0223DAE4: .word 0x0000055F + thumb_func_end ov62_0223D744 + + thumb_func_start ov62_0223DAE8 +ov62_0223DAE8: ; 0x0223DAE8 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223DB00 + cmp r1, #1 + beq _0223DBAC + b _0223DC0E +_0223DB00: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x21 + mov r3, #3 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x22 + mov r3, #7 + bl sub_0200710C + add r0, r5, #0 + bl ov62_0223D004 + add r0, r5, #0 + bl ov62_0223D160 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223DC1C ; =0x0000047C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #2 + bl ov62_022335BC + add r0, r5, #0 + bl ov62_0223CAEC + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223CF2C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DC14 +_0223DBAC: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223DBDC + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223DBDC: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223DC14 +_0223DC0E: + mov r1, #6 + bl ov62_0222FB60 +_0223DC14: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223DC1C: .word 0x0000047C + thumb_func_end ov62_0223DAE8 + + thumb_func_start ov62_0223DC20 +ov62_0223DC20: ; 0x0223DC20 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, _0223DC60 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233664 + ldr r1, _0223DC64 ; =0x0000049C + add r0, r5, r1 + sub r1, #0x10 + ldrsh r1, [r5, r1] + bl ov62_022332AC + ldr r0, _0223DC68 ; =0x00000748 + add r1, r5, #0 + ldr r0, [r4, r0] + str r0, [sp] + ldr r0, _0223DC64 ; =0x0000049C + ldr r2, [r4, #0xc] + ldr r3, [r4, #0x14] + add r0, r5, r0 + bl ov62_02232C78 + add r4, #0xdc + ldr r0, [r4, #0] + bl sub_0202404C + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223DC60: .word 0x0000047C +_0223DC64: .word 0x0000049C +_0223DC68: .word 0x00000748 + thumb_func_end ov62_0223DC20 + + thumb_func_start ov62_0223DC6C +ov62_0223DC6C: ; 0x0223DC6C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223DC82 + cmp r1, #1 + beq _0223DCD8 + b _0223DD2A +_0223DC82: + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223DD34 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233600 + ldr r0, _0223DD38 ; =0x0000049C + add r0, r5, r0 + bl ov62_022332FC + ldr r0, _0223DD3C ; =0x00000748 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223DCA4 + bl sub_020237BC +_0223DCA4: + ldr r0, _0223DD38 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022334FC + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, _0223DD40 ; =0x000006F4 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_0208B9E0 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DD30 +_0223DCD8: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223DCF8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223DCF8: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223DD30 +_0223DD2A: + mov r1, #8 + bl ov62_0222FB60 +_0223DD30: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223DD34: .word 0x0000047C +_0223DD38: .word 0x0000049C +_0223DD3C: .word 0x00000748 +_0223DD40: .word 0x000006F4 + thumb_func_end ov62_0223DC6C + + thumb_func_start ov62_0223DD44 +ov62_0223DD44: ; 0x0223DD44 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223DD5A + cmp r1, #1 + beq _0223DD8A + b _0223DDD6 +_0223DD5A: + bl ov62_0223CFE0 + add r0, r5, #0 + bl ov62_0223D100 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223D4E4 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r4, #0xdc + ldr r0, [r4, #0] + bl sub_02024034 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DE5A +_0223DD8A: + mov r1, #1 + bl ov62_02234540 + add r4, #8 + add r0, r4, #0 + bl ov62_02231688 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DE5A +_0223DDD6: + bl ov62_02233790 + cmp r0, #0 + beq _0223DE5A + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223DE2A + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r4, #0 + bl sub_020181C4 + b _0223DE5A +_0223DE2A: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223DE5A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223DD44 + + thumb_func_start ov62_0223DE60 +ov62_0223DE60: ; 0x0223DE60 + push {r3, lr} + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223DE60 + + thumb_func_start ov62_0223DE6C +ov62_0223DE6C: ; 0x0223DE6C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223DE86 + cmp r1, #1 + beq _0223DEBC + cmp r1, #2 + beq _0223DED4 + b _0223DEFE +_0223DE86: + bl ov62_0223CBE0 + add r0, r4, #0 + bl ov62_0223D518 + add r0, r5, #0 + bl ov62_0223D100 + ldr r0, _0223DF08 ; =0x0000049C + add r0, r5, r0 + bl ov62_022332FC + ldr r0, _0223DF0C ; =0x00000748 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223DEAA + bl sub_020237BC +_0223DEAA: + ldr r0, _0223DF08 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022334FC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DF04 +_0223DEBC: + mov r2, #1 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223DF04 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DF04 +_0223DED4: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _0223DF04 + add r0, r5, #0 + bl ov62_0223D004 + add r0, r5, #0 + bl ov62_0223D160 + add r0, r5, #0 + bl ov62_0223CAEC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223DF04 +_0223DEFE: + mov r1, #6 + bl ov62_0222FB60 +_0223DF04: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223DF08: .word 0x0000049C +_0223DF0C: .word 0x00000748 + thumb_func_end ov62_0223DE6C + + thumb_func_start ov62_0223DF10 +ov62_0223DF10: ; 0x0223DF10 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r1, [r1, #0] + ldr r4, [r0, r2] + cmp r1, #1 + bne _0223DF2A + mov r0, #0x71 + lsl r0, r0, #4 + add r1, r4, r0 + add r0, #0xc + str r1, [r4, r0] + pop {r4, pc} +_0223DF2A: + bl ov62_0224112C + ldr r1, _0223DF48 ; =0x0000071C + add r1, r4, r1 + bl ov61_0222BD78 + ldr r1, _0223DF48 ; =0x0000071C + mov r2, #4 + ldr r0, [r4, r1] + sub r1, #0xc + add r1, r4, r1 + bl sub_020C4DB0 + pop {r4, pc} + nop +_0223DF48: .word 0x0000071C + thumb_func_end ov62_0223DF10 + + thumb_func_start ov62_0223DF4C +ov62_0223DF4C: ; 0x0223DF4C + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r1, [r1, #0] + ldr r4, [r0, r2] + cmp r1, #1 + bne _0223DF6E + add r1, r4, #0 + ldr r0, _0223DF9C ; =0x00000714 + add r1, #0xe0 + str r1, [r4, r0] + add r1, r0, #0 + sub r1, #0xdc + add r1, r4, r1 + add r0, r0, #4 + str r1, [r4, r0] + pop {r4, pc} +_0223DF6E: + bl ov62_0224112C + ldr r2, _0223DF9C ; =0x00000714 + add r1, r4, r2 + add r2, r2, #4 + add r2, r4, r2 + bl ov61_0222BDAC + ldr r0, _0223DF9C ; =0x00000714 + add r1, r4, #0 + ldr r0, [r4, r0] + ldr r2, _0223DFA0 ; =0x00000558 + add r1, #0xe0 + bl sub_020C4DB0 + ldr r1, _0223DFA4 ; =0x00000718 + mov r2, #0xd8 + ldr r0, [r4, r1] + sub r1, #0xe0 + add r1, r4, r1 + bl sub_020C4DB0 + pop {r4, pc} + ; .align 2, 0 +_0223DF9C: .word 0x00000714 +_0223DFA0: .word 0x00000558 +_0223DFA4: .word 0x00000718 + thumb_func_end ov62_0223DF4C + + .rodata + + + .global Unk_ov62_02248E88 +Unk_ov62_02248E88: ; 0x02248E88 + .incbin "incbin/overlay62_rodata.bin", 0x75C, 0x768 - 0x75C + + .global Unk_ov62_02248E94 +Unk_ov62_02248E94: ; 0x02248E94 + .incbin "incbin/overlay62_rodata.bin", 0x768, 0x774 - 0x768 + + .global Unk_ov62_02248EA0 +Unk_ov62_02248EA0: ; 0x02248EA0 + .incbin "incbin/overlay62_rodata.bin", 0x774, 0x794 - 0x774 + + .global Unk_ov62_02248EC0 +Unk_ov62_02248EC0: ; 0x02248EC0 + .incbin "incbin/overlay62_rodata.bin", 0x794, 0x7B4 - 0x794 + + .global Unk_ov62_02248EE0 +Unk_ov62_02248EE0: ; 0x02248EE0 + .incbin "incbin/overlay62_rodata.bin", 0x7B4, 0x7D4 - 0x7B4 + + .global Unk_ov62_02248F00 +Unk_ov62_02248F00: ; 0x02248F00 + .incbin "incbin/overlay62_rodata.bin", 0x7D4, 0x800 - 0x7D4 + + .global Unk_ov62_02248F2C +Unk_ov62_02248F2C: ; 0x02248F2C + .incbin "incbin/overlay62_rodata.bin", 0x800, 0x82C - 0x800 + + .global Unk_ov62_02248F58 +Unk_ov62_02248F58: ; 0x02248F58 + .incbin "incbin/overlay62_rodata.bin", 0x82C, 0x24 + + + .data + + + .global Unk_ov62_022497E8 +Unk_ov62_022497E8: ; 0x022497E8 + .incbin "incbin/overlay62_data.bin", 0x28, 0x15C + diff --git a/asm/ov62_0223DFA8.s b/asm/ov62_0223DFA8.s new file mode 100644 index 000000000..970acc681 --- /dev/null +++ b/asm/ov62_0223DFA8.s @@ -0,0 +1,6037 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_0223DFA8 +ov62_0223DFA8: ; 0x0223DFA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + ldr r4, _0223E014 ; =0x02249064 + add r3, sp, #0xc + mov r2, #0x3c +_0223DFB2: + ldrh r1, [r4] + add r4, r4, #2 + strh r1, [r3] + add r3, r3, #2 + sub r2, r2, #1 + bne _0223DFB2 + mov r1, #0 + str r1, [sp, #8] + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + ldr r7, _0223E018 ; =0x00002090 + str r0, [sp, #4] + ldr r0, [sp, #8] + str r0, [sp] +_0223DFD0: + ldr r0, [sp] + ldr r4, [sp, #4] + lsl r1, r0, #2 + add r0, sp, #0xc + mov r6, #0 + add r5, r0, r1 +_0223DFDC: + ldr r0, [r4, r7] + cmp r0, #0 + beq _0223DFEE + mov r1, #0 + mov r2, #2 + ldrsh r1, [r5, r1] + ldrsh r2, [r5, r2] + bl sub_0200D4C4 +_0223DFEE: + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #6 + blt _0223DFDC + ldr r0, [sp, #4] + add r0, #0x30 + str r0, [sp, #4] + ldr r0, [sp] + add r0, r0, #6 + str r0, [sp] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #5 + blt _0223DFD0 + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + nop +_0223E014: .word 0x02249064 +_0223E018: .word 0x00002090 + thumb_func_end ov62_0223DFA8 + + thumb_func_start ov62_0223E01C +ov62_0223E01C: ; 0x0223E01C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_022312CC + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + mov r1, #0x4d + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x20 + add r0, r4, r1 + add r1, r5, #0 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl sub_0200D364 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + mov r0, #0x47 + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x4e + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223F0A8 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223E01C + + thumb_func_start ov62_0223E0FC +ov62_0223E0FC: ; 0x0223E0FC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, _0223E224 ; =0x000008A4 + add r4, r1, #0 + sub r0, #0x44 + ldr r3, [r5, r0] + cmp r4, #0x64 + bne _0223E176 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r3, r0] + str r0, [sp, #0x14] + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x18] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + b _0223E1EE +_0223E176: + cmp r4, #0x66 + bne _0223E1E6 + lsl r0, r2, #2 + add r1, r5, r0 + ldr r0, _0223E224 ; =0x000008A4 + sub r0, #0x18 + ldr r0, [r1, r0] + str r0, [sp, #0x10] + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x10] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x1c] + ldr r1, [sp, #0x1c] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x1c] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + b _0223E1EE +_0223E1E6: + ldr r0, [r5, #0x48] + bl sub_0200B1EC + add r6, r0, #0 +_0223E1EE: + ldr r0, _0223E224 ; =0x000008A4 + mov r1, #0xcc + add r0, r5, r0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223E228 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _0223E224 ; =0x000008A4 + add r3, r1, #0 + add r0, r5, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _0223E224 ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E224: .word 0x000008A4 +_0223E228: .word 0x000F0D0C + thumb_func_end ov62_0223E0FC + + thumb_func_start ov62_0223E22C +ov62_0223E22C: ; 0x0223E22C + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _0223E246 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_0223E246: + ldr r0, [r4, #8] + cmp r0, #4 + bls _0223E24E + b _0223E3D4 +_0223E24E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223E25A: ; jump table + .short _0223E264 - _0223E25A - 2 ; case 0 + .short _0223E29A - _0223E25A - 2 ; case 1 + .short _0223E2D4 - _0223E25A - 2 ; case 2 + .short _0223E31A - _0223E25A - 2 ; case 3 + .short _0223E346 - _0223E25A - 2 ; case 4 +_0223E264: + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _0223E288 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + b _0223E294 +_0223E288: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_022323B8 +_0223E294: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223E29A: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E2BA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223E2BA: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223E3FE +_0223E2D4: + add r0, r4, #0 + mov r1, #0x75 + bl ov62_02231AAC + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _0223E404 ; =0x00002038 + mov r1, #0 + str r1, [r5, r0] + ldr r0, _0223E408 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E3FE +_0223E31A: + add r0, r4, #0 + bl ov62_0224112C + ldr r1, _0223E40C ; =0x000004D4 + ldr r1, [r4, r1] + lsl r1, r1, #2 + add r2, r4, r1 + ldr r1, _0223E410 ; =0x00002608 + ldr r2, [r2, r1] + add r1, r2, #0 + add r1, #0xd8 + add r2, #0xdc + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov61_0222B524 + cmp r0, #1 + bne _0223E3FE + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E3FE +_0223E346: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _0223E408 ; =0x00000565 + bne _0223E380 + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #8 + bl ov62_022348B8 + ldr r0, [r4, #8] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #8] + ldr r0, _0223E404 ; =0x00002038 + str r1, [r5, r0] + b _0223E3B8 +_0223E380: + mov r1, #0 + bl sub_020057A4 + mov r0, #0xff + ldr r1, _0223E404 ; =0x00002038 + str r0, [r4, #8] + mov r2, #1 + str r2, [r5, r1] + ldr r1, _0223E414 ; =0x0000413C + add r2, r4, r1 + ldr r1, _0223E40C ; =0x000004D4 + ldr r1, [r4, r1] + add r1, r2, r1 + ldr r2, _0223E418 ; =0x00000878 + str r1, [r4, r2] + add r1, r2, #0 + add r1, #0x3c + ldr r3, [r4, r1] + add r1, r0, #0 + add r1, #0x85 + str r3, [r5, r1] + add r0, #0x85 + add r2, #0x40 + add r1, r4, r2 + ldr r0, [r5, r0] + ldr r2, _0223E41C ; =0x00001D4C + bl sub_020C4DB0 +_0223E3B8: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + b _0223E3FE +_0223E3D4: + ldr r0, _0223E404 ; =0x00002038 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223E3F6 + ldr r0, _0223E420 ; =0x0000055F + bl sub_02005748 + ldr r1, _0223E424 ; =0x00002034 + add r0, r4, #0 + ldr r1, [r5, r1] + bl ov62_0222FB60 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223381C + b _0223E3FE +_0223E3F6: + add r0, r4, #0 + mov r1, #0x14 + bl ov62_0222FB60 +_0223E3FE: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223E404: .word 0x00002038 +_0223E408: .word 0x00000565 +_0223E40C: .word 0x000004D4 +_0223E410: .word 0x00002608 +_0223E414: .word 0x0000413C +_0223E418: .word 0x00000878 +_0223E41C: .word 0x00001D4C +_0223E420: .word 0x0000055F +_0223E424: .word 0x00002034 + thumb_func_end ov62_0223E22C + + thumb_func_start ov62_0223E428 +ov62_0223E428: ; 0x0223E428 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0202FF44 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02030A98 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_0223E428 + + thumb_func_start ov62_0223E448 +ov62_0223E448: ; 0x0223E448 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223E448 + + thumb_func_start ov62_0223E460 +ov62_0223E460: ; 0x0223E460 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223E47A + cmp r1, #1 + beq _0223E48A + cmp r1, #2 + beq _0223E4B8 + b _0223E504 +_0223E47A: + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223E50A +_0223E48A: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E50A + add r0, r5, #0 + bl ov62_02240A24 + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223E50A +_0223E4B8: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E4EA + add r0, r5, #0 + mov r1, #0x64 + mov r2, #0 + bl ov62_0223E0FC + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223E4EA: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223E50A +_0223E504: + mov r1, #0xc + bl ov62_0222FB60 +_0223E50A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223E460 + + thumb_func_start ov62_0223E510 +ov62_0223E510: ; 0x0223E510 + push {r4, r5, r6, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #7 + bls _0223E524 + b _0223E736 +_0223E524: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E530: ; jump table + .short _0223E540 - _0223E530 - 2 ; case 0 + .short _0223E550 - _0223E530 - 2 ; case 1 + .short _0223E5A2 - _0223E530 - 2 ; case 2 + .short _0223E5C0 - _0223E530 - 2 ; case 3 + .short _0223E5F6 - _0223E530 - 2 ; case 4 + .short _0223E63A - _0223E530 - 2 ; case 5 + .short _0223E680 - _0223E530 - 2 ; case 6 + .short _0223E6DC - _0223E530 - 2 ; case 7 +_0223E540: + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E7E8 +_0223E550: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E588 + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r1, _0223E7F0 ; =0x00000116 + add r0, r4, #0 + mov r2, #0 + bl ov62_0223E0FC + add r0, r4, #0 + bl ov62_022342BC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223E588: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223E7E8 +_0223E5A2: + ldr r2, _0223E7F4 ; =0x000004D4 + ldr r1, _0223E7F8 ; =0x00002028 + ldr r2, [r4, r2] + ldr r1, [r5, r1] + add r3, r4, r2 + ldr r2, _0223E7FC ; =0x0000413C + ldrb r2, [r3, r2] + bl ov62_022337F0 + cmp r0, #0 + beq _0223E688 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E7E8 +_0223E5C0: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + ldr r0, _0223E800 ; =0x00000565 + bl sub_02005748 + b _0223E7E8 +_0223E5F6: + bl ov62_022411B8 + cmp r0, #0 + bne _0223E604 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_0223E604: + mov r1, #0x46 + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #0 + bl ov62_0223E0FC + bl sub_0202FE04 + mov r1, #4 + mov r2, #0 + bl sub_0202FE98 + add r6, r0, #0 + add r5, r1, #0 + add r0, r4, #0 + bl ov62_0224112C + add r1, r6, #0 + add r2, r5, #0 + bl ov61_0222B550 + cmp r0, #1 + bne _0223E688 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E7E8 +_0223E63A: + bl ov62_022411B8 + cmp r0, #0 + bne _0223E648 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_0223E648: + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _0223E800 ; =0x00000565 + bne _0223E662 + mov r1, #0 + bl sub_020057A4 + b _0223E66E +_0223E662: + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223E804 ; =0x0000055F + bl sub_02005748 +_0223E66E: + ldr r0, [r4, #8] + ldr r1, _0223E808 ; =0x00000119 + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + mov r2, #0 + bl ov62_0223E0FC + b _0223E7E8 +_0223E680: + bl sub_02022798 + cmp r0, #0 + bne _0223E68A +_0223E688: + b _0223E7E8 +_0223E68A: + add r0, r4, #0 + bl ov62_02231A88 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223F038 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + bl ov62_022339A0 + add r0, r4, #0 + bl ov62_022338A8 + ldr r0, _0223E80C ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E7E8 +_0223E6DC: + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02024034 + add r0, r4, #0 + bl ov62_0223E428 + add r5, #8 + add r0, r5, #0 + bl ov62_02231688 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #1 + mov r1, #0x66 + bl sub_020397C8 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223E7E8 +_0223E736: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _0223E7E8 + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223E7B8 + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r5, #0 + bl sub_020181C4 + bl sub_0202F250 + cmp r0, #1 + bne _0223E7E8 + bl sub_0202F22C + b _0223E7E8 +_0223E7B8: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223E7E8: + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0223E7F0: .word 0x00000116 +_0223E7F4: .word 0x000004D4 +_0223E7F8: .word 0x00002028 +_0223E7FC: .word 0x0000413C +_0223E800: .word 0x00000565 +_0223E804: .word 0x0000055F +_0223E808: .word 0x00000119 +_0223E80C: .word 0x0000049C + thumb_func_end ov62_0223E510 + + thumb_func_start ov62_0223E810 +ov62_0223E810: ; 0x0223E810 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223E828 + cmp r1, #1 + beq _0223E886 + b _0223E8AC +_0223E828: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E86C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x54 + mov r3, #7 + bl sub_0200710C + ldr r2, _0223E8B8 ; =0x00002028 + add r0, r5, #0 + ldr r2, [r4, r2] + mov r1, #0x66 + bl ov62_0223E0FC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223E86C: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223E8B2 +_0223E886: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E8B2 + add r0, r5, #0 + bl ov62_02240944 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223E8B2 +_0223E8AC: + mov r1, #0xf + bl ov62_0222FB60 +_0223E8B2: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223E8B8: .word 0x00002028 + thumb_func_end ov62_0223E810 + + thumb_func_start ov62_0223E8BC +ov62_0223E8BC: ; 0x0223E8BC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r1, [r4, #8] + ldr r5, [r4, r0] + cmp r1, #3 + bls _0223E8D0 + b _0223EAD8 +_0223E8D0: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E8DC: ; jump table + .short _0223E8E4 - _0223E8DC - 2 ; case 0 + .short _0223E90C - _0223E8DC - 2 ; case 1 + .short _0223E946 - _0223E8DC - 2 ; case 2 + .short _0223EA6E - _0223E8DC - 2 ; case 3 +_0223E8E4: + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223EB04 +_0223E90C: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223E92C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223E92C: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223EB04 +_0223E946: + add r0, #0xc + ldr r0, [r4, r0] + cmp r0, #0xd2 + bne _0223E986 + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_0200D364 +_0223E986: + add r0, r4, #0 + bl ov62_0224088C + add r0, r4, #0 + bl ov62_02240900 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _0223EA0A + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _0223EA46 +_0223EA0A: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02232394 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02232378 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_0223EA46: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223EB04 +_0223EA6E: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223EABE + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _0223EA9C + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _0223EAA8 +_0223EA9C: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_022323B8 +_0223EAA8: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223EABE: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223EB04 +_0223EAD8: + ldr r1, _0223EB0C ; =0x00004138 + mov r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + ble _0223EAFC + mov r1, #0x9a + lsl r1, r1, #6 + add r5, r4, r1 + ldr r2, _0223EB0C ; =0x00004138 + add r6, r4, #0 + sub r1, #0x78 +_0223EAEE: + str r5, [r6, r1] + ldr r3, [r4, r2] + add r0, r0, #1 + add r5, #0xe4 + add r6, r6, #4 + cmp r0, r3 + blt _0223EAEE +_0223EAFC: + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 +_0223EB04: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223EB0C: .word 0x00004138 + thumb_func_end ov62_0223E8BC + + thumb_func_start ov62_0223EB10 +ov62_0223EB10: ; 0x0223EB10 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223EB10 + + thumb_func_start ov62_0223EB28 +ov62_0223EB28: ; 0x0223EB28 + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _0223EB3C + b _0223ED40 +_0223EB3C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223EB48: ; jump table + .short _0223EB50 - _0223EB48 - 2 ; case 0 + .short _0223EB78 - _0223EB48 - 2 ; case 1 + .short _0223EBC8 - _0223EB48 - 2 ; case 2 + .short _0223ECD6 - _0223EB48 - 2 ; case 3 +_0223EB50: + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223ED6C +_0223EB78: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223EBAE + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223F038 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223EBAE: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223ED6C +_0223EBC8: + bl ov62_0223E01C + ldr r0, _0223ED74 ; =0x0000086C + ldr r0, [r4, r0] + cmp r0, #0xd2 + bne _0223EC0C + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_0200D364 +_0223EC0C: + add r0, r4, #0 + bl ov62_02240900 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _0223EC7E + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _0223ECAE +_0223EC7E: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02232378 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_0223ECAE: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223ED6C +_0223ECD6: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223ED26 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _0223ED04 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _0223ED10 +_0223ED04: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_022323B8 +_0223ED10: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223ED26: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223ED6C +_0223ED40: + ldr r1, _0223ED78 ; =0x00004138 + mov r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + ble _0223ED64 + mov r1, #0x9a + lsl r1, r1, #6 + add r5, r4, r1 + ldr r2, _0223ED78 ; =0x00004138 + add r6, r4, #0 + sub r1, #0x78 +_0223ED56: + str r5, [r6, r1] + ldr r3, [r4, r2] + add r0, r0, #1 + add r5, #0xe4 + add r6, r6, #4 + cmp r0, r3 + blt _0223ED56 +_0223ED64: + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 +_0223ED6C: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223ED74: .word 0x0000086C +_0223ED78: .word 0x00004138 + thumb_func_end ov62_0223EB28 + + thumb_func_start ov62_0223ED7C +ov62_0223ED7C: ; 0x0223ED7C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223ED92 + cmp r1, #1 + beq _0223EE04 + b _0223EE7E +_0223ED92: + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl ov62_0223E428 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0223EDE2 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _0223EDEE +_0223EDE2: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232394 +_0223EDEE: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0224088C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223EE84 +_0223EE04: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223EE64 + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #0x6f + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D364 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223F0A8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223EE64: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223EE84 +_0223EE7E: + mov r1, #3 + bl ov62_0222FB60 +_0223EE84: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223ED7C + + thumb_func_start ov62_0223EE88 +ov62_0223EE88: ; 0x0223EE88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r1, #0 + ldr r1, _0223EF58 ; =0x0000088C + lsl r6, r2, #2 + add r4, r5, r1 + ldr r1, [r4, r6] + str r0, [sp, #0x10] + ldr r0, [r5, #0x48] + cmp r1, #0 + bne _0223EEA8 + mov r1, #8 + bl sub_0200B1EC + add r4, r0, #0 + b _0223EF06 +_0223EEA8: + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #7 + bl sub_0200B1EC + str r0, [sp, #0x14] + ldr r0, [r4, r6] + mov r1, #0x66 + bl sub_02030B94 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_022349A8 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + add r0, r7, #0 + add r2, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x14] + add r0, r7, #0 + add r1, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 +_0223EF06: + add r0, sp, #0x18 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r5, #0x24] + add r1, sp, #0x18 + mov r2, #0x14 + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223EF5C ; =0x000E0D00 + add r2, r4, #0 + str r0, [sp, #8] + add r0, sp, #0x18 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x10] + ldr r0, [r0, #8] + ldr r1, [r1, #0xc] + add r2, sp, #0x18 + mov r3, #0x66 + bl sub_02012BE0 + add r0, r4, #0 + bl sub_020237BC + add r0, sp, #0x18 + bl sub_0201A8FC + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223EF58: .word 0x0000088C +_0223EF5C: .word 0x000E0D00 + thumb_func_end ov62_0223EE88 + + thumb_func_start ov62_0223EF60 +ov62_0223EF60: ; 0x0223EF60 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r3, _0223F030 ; =0x02248FA8 + ldr r4, [r0, r1] + str r0, [sp] + add r2, sp, #0x20 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r3, _0223F034 ; =0x02248FB8 + add r2, sp, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp] + mov r1, #2 + bl ov62_0223136C + mov r0, #0x45 + lsl r0, r0, #2 + add r5, r4, r0 + add r0, sp, #0x20 + str r0, [sp, #8] + mov r0, #0x69 + str r0, [sp, #4] + ldr r0, [sp] + mov r6, #0 + str r0, [sp, #0xc] + add r0, #0x14 + add r7, sp, #0x10 + str r0, [sp, #0xc] +_0223EFA6: + ldr r0, [sp] + mov r1, #2 + bl ov62_022313E0 + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [sp, #0xc] + add r0, r5, #0 + mov r2, #2 + bl ov62_0223118C + ldr r2, [sp, #8] + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r5, #0 + bl ov62_0223124C + cmp r6, #3 + beq _0223EFD8 + ldr r1, [sp] + add r0, r5, #0 + add r2, r6, #1 + bl ov62_0223EE88 +_0223EFD8: + mov r0, #0x46 + ldr r2, [sp, #4] + lsl r0, r0, #2 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + mov r1, #0x32 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r7, #0] + bl sub_0200D364 + mov r0, #0x47 + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + ldr r0, [sp, #8] + add r6, r6, #1 + add r0, r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r4, #0x1c + add r0, #0x24 + add r5, #0x1c + add r7, r7, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _0223EFA6 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F030: .word 0x02248FA8 +_0223F034: .word 0x02248FB8 + thumb_func_end ov62_0223EF60 + + thumb_func_start ov62_0223F038 +ov62_0223F038: ; 0x0223F038 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp] + ldr r5, [r0, r1] + mov r0, #0x45 + lsl r0, r0, #2 + mov r6, #0 + add r4, r5, r0 + add r7, r0, #4 +_0223F04C: + add r0, r4, #0 + bl ov62_022312B0 + ldr r0, [r5, r7] + bl sub_0200D0F4 + add r6, r6, #1 + add r4, #0x1c + add r5, #0x1c + cmp r6, #4 + blt _0223F04C + ldr r0, [sp] + bl ov62_022313BC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov62_0223F038 + + thumb_func_start ov62_0223F06C +ov62_0223F06C: ; 0x0223F06C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223F06C + + thumb_func_start ov62_0223F0A8 +ov62_0223F0A8: ; 0x0223F0A8 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + bne _0223F0DC + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_020129D0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + b _0223F102 +_0223F0DC: + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_020129D0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 +_0223F102: + mov r0, #0x47 + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + mov r0, #0x4e + lsl r0, r0, #2 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + thumb_func_end ov62_0223F0A8 + + thumb_func_start ov62_0223F124 +ov62_0223F124: ; 0x0223F124 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r6, [r0, r1] + ldr r0, _0223F15C ; =0x00002030 + mov r4, #0 + ldr r0, [r6, r0] + cmp r0, #0 + ble _0223F152 + add r5, r6, #0 + ldr r7, _0223F15C ; =0x00002030 + add r5, #0x14 +_0223F13C: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + ldr r0, [r6, r7] + add r4, r4, #1 + add r5, #0x10 + cmp r4, r0 + blt _0223F13C +_0223F152: + ldr r0, _0223F15C ; =0x00002030 + mov r1, #0 + str r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F15C: .word 0x00002030 + thumb_func_end ov62_0223F124 + + thumb_func_start ov62_0223F160 +ov62_0223F160: ; 0x0223F160 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r6, [r0, r1] + ldr r0, _0223F198 ; =0x0000202C + mov r4, #0 + ldr r0, [r6, r0] + cmp r0, #0 + ble _0223F18E + add r5, r6, #0 + ldr r7, _0223F198 ; =0x0000202C + add r5, #0x94 +_0223F178: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + ldr r0, [r6, r7] + add r4, r4, #1 + add r5, #0x10 + cmp r4, r0 + blt _0223F178 +_0223F18E: + ldr r0, _0223F198 ; =0x0000202C + mov r1, #0 + str r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F198: .word 0x0000202C + thumb_func_end ov62_0223F160 + + thumb_func_start ov62_0223F19C +ov62_0223F19C: ; 0x0223F19C + push {r3, r4, r5, lr} + ldr r1, _0223F214 ; =0x0000217C + add r5, r0, #0 + mov r0, #0x66 + bl sub_02018144 + ldr r2, _0223F214 ; =0x0000217C + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + add r0, #0xc + ldr r1, [r5, r0] + mov r0, #0x4b + lsl r0, r0, #2 + cmp r1, r0 + bne _0223F1CA + mov r0, #0 + str r0, [r4, #0xc] + b _0223F1DE +_0223F1CA: + add r0, r0, #1 + cmp r1, r0 + bne _0223F1D6 + mov r0, #1 + str r0, [r4, #0xc] + b _0223F1DE +_0223F1D6: + cmp r1, #0xc8 + bne _0223F1DE + mov r0, #2 + str r0, [r4, #0xc] +_0223F1DE: + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223F214: .word 0x0000217C + thumb_func_end ov62_0223F19C + + thumb_func_start ov62_0223F218 +ov62_0223F218: ; 0x0223F218 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223F232 + cmp r1, #1 + beq _0223F290 + cmp r1, #2 + beq _0223F2EC + b _0223F328 +_0223F232: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _0223F246 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223F246: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223F342 +_0223F290: + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #0 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223F342 +_0223F2EC: + bl ov62_02233790 + cmp r0, #0 + beq _0223F342 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223E01C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223F342 +_0223F328: + bl ov62_022300BC + cmp r0, #1 + bne _0223F33A + add r0, r5, #0 + mov r1, #0x13 + bl ov62_0222FB60 + b _0223F342 +_0223F33A: + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_0223F342: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0223F218 + + thumb_func_start ov62_0223F348 +ov62_0223F348: ; 0x0223F348 + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _0223F362 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_0223F362: + ldr r0, [r4, #8] + cmp r0, #6 + bls _0223F36A + b _0223F622 +_0223F36A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223F376: ; jump table + .short _0223F384 - _0223F376 - 2 ; case 0 + .short _0223F3DC - _0223F376 - 2 ; case 1 + .short _0223F468 - _0223F376 - 2 ; case 2 + .short _0223F4EA - _0223F376 - 2 ; case 3 + .short _0223F50C - _0223F376 - 2 ; case 4 + .short _0223F546 - _0223F376 - 2 ; case 5 + .short _0223F57A - _0223F376 - 2 ; case 6 +_0223F384: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _0223F64C ; =0x0000086C + mov r1, #0x4b + ldr r0, [r4, r0] + lsl r1, r1, #2 + sub r0, r0, r1 + cmp r0, #1 + bhi _0223F3C6 + add r0, r4, #0 + sub r1, #0x15 + bl ov62_02231AAC + b _0223F3CE +_0223F3C6: + add r0, r4, #0 + sub r1, #8 + bl ov62_02231AAC +_0223F3CE: + ldr r0, _0223F650 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F3DC: + ldr r0, _0223F64C ; =0x0000086C + ldr r1, [r4, r0] + mov r0, #0x4b + lsl r0, r0, #2 + cmp r1, r0 + bne _0223F402 + mov r0, #0 + str r0, [r5, #0xc] + add r0, r4, #0 + bl ov62_0224112C + bl ov61_0222B4A8 + cmp r0, #1 + bne _0223F458 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F402: + add r0, r0, #1 + cmp r1, r0 + bne _0223F422 + mov r0, #1 + str r0, [r5, #0xc] + add r0, r4, #0 + bl ov62_0224112C + bl ov61_0222B4E4 + cmp r0, #1 + bne _0223F458 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F422: + cmp r1, #0xc8 + bne _0223F462 + mov r0, #2 + str r0, [r5, #0xc] + add r0, r4, #0 + bl sub_0208BE68 + cmp r0, #1 + bne _0223F44A + add r0, r4, #0 + bl ov62_0224112C + bl ov61_0222B44C + cmp r0, #1 + bne _0223F458 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F44A: + add r0, r4, #0 + bl ov62_0224112C + bl ov61_0222B3EC + cmp r0, #1 + beq _0223F45A +_0223F458: + b _0223F644 +_0223F45A: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F462: + bl sub_02022974 + b _0223F644 +_0223F468: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _0223F650 ; =0x00000565 + bne _0223F49C + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #7 + bl ov62_022348B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F49C: + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223F654 ; =0x0000055F + bl sub_02005748 + ldr r0, _0223F658 ; =0x00004138 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223F4E4 + mov r2, #0 + add r0, r4, #0 + mov r1, #5 + add r3, r2, #0 + bl ov62_022348B8 + ldr r0, [r5, #0xc] + cmp r0, #2 + bne _0223F4C6 + mov r1, #0x76 + b _0223F4CA +_0223F4C6: + mov r1, #0x4b + lsl r1, r1, #2 +_0223F4CA: + mov r0, #0x51 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F4E4: + mov r0, #0xff + str r0, [r4, #8] + b _0223F644 +_0223F4EA: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F50C: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223F52C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223F52C: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223F644 +_0223F546: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223F06C + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #1 + mov r1, #0x66 + bl sub_020397C8 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223F644 +_0223F57A: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _0223F644 + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223F5F0 + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r5, #0 + bl sub_020181C4 + b _0223F644 +_0223F5F0: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223F644 +_0223F622: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_0223F644: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223F64C: .word 0x0000086C +_0223F650: .word 0x00000565 +_0223F654: .word 0x0000055F +_0223F658: .word 0x00004138 + thumb_func_end ov62_0223F348 + + thumb_func_start ov62_0223F65C +ov62_0223F65C: ; 0x0223F65C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r3, _0223F754 ; =0x02248F8C + add r6, r4, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x14 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r6, #0x14 + str r0, [r2, #0] + add r0, r6, #0 + bl sub_0201A7A0 + mov r3, #3 + str r3, [sp] + mov r0, #0x14 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r6, #0 + mov r2, #2 + bl sub_0201A7E8 + add r0, r6, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r1, [r4, #0xc] + ldr r0, [r5, #0x48] + lsl r2, r1, #2 + add r1, sp, #0x14 + ldr r1, [r1, r2] + bl sub_0200B1EC + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F758 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + add r6, r4, #0 + add r6, #0x94 + add r0, r6, #0 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + add r0, #0xf2 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r6, #0 + mov r3, #0xb + bl sub_0201A7E8 + add r0, r6, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x5f + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #0x50 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F758 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + ldr r0, _0223F75C ; =0x0000202C + mov r1, #1 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F754: .word 0x02248F8C +_0223F758: .word 0x000F0D00 +_0223F75C: .word 0x0000202C + thumb_func_end ov62_0223F65C + + thumb_func_start ov62_0223F760 +ov62_0223F760: ; 0x0223F760 + push {r4, r5, r6, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223F77A + cmp r1, #1 + bne _0223F778 + b _0223F8BA +_0223F778: + b _0223F95A +_0223F77A: + bl sub_0202F250 + cmp r0, #0 + beq _0223F786 + bl sub_0202F22C +_0223F786: + ldr r0, _0223F968 ; =0x00002054 + ldr r3, _0223F96C ; =0x02248FD8 + add r2, r4, r0 + mov r6, #5 +_0223F78E: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _0223F78E + ldr r0, [r3, #0] + mov r1, #0 + str r0, [r2, #0] + ldr r0, _0223F968 ; =0x00002054 + str r1, [r4, r0] + ldr r1, _0223F970 ; =0x00004138 + add r0, r0, #4 + ldr r1, [r5, r1] + str r1, [r4, r0] + add r0, r5, #0 + bl ov62_022339DC + mov r0, #0x66 + bl ov62_02233A68 + mov r1, #0x82 + lsl r1, r1, #6 + str r0, [r4, r1] + mov r0, #0x7d + lsl r0, r0, #2 + add r1, #8 + str r0, [r4, r1] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r5, #0 + mov r1, #4 + mov r2, #3 + bl ov62_022343B8 + mov r1, #7 + add r0, r5, #0 + add r2, r1, #0 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223F0A8 + add r0, r5, #0 + bl ov62_0223F65C + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0223F974 ; =0x0000047C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022335B0 + ldr r0, _0223F978 ; =0x0000049C + ldr r3, _0223F968 ; =0x00002054 + add r0, r5, r0 + add r1, r5, #0 + mov r2, #0 + add r3, r4, r3 + bl ov62_02232594 + ldr r1, _0223F97C ; =0x000004E4 + mov r0, #1 + str r0, [r5, r1] + add r0, r1, #0 + sub r0, #0x68 + sub r1, #0x48 + add r0, r5, r0 + add r1, r5, r1 + bl ov62_02233638 + ldr r0, _0223F978 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #1 + bl ov62_0223331C + ldr r0, _0223F978 ; =0x0000049C + mov r1, #0x40 + add r0, r5, r0 + mov r2, #0xb8 + bl ov62_02233434 + ldr r0, _0223F978 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_02233064 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02240BF4 + add r0, r5, #0 + mov r1, #0 + bl ov62_02240D98 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223F960 +_0223F8BA: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223F928 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r5, #0 + mov r1, #1 + bl ov62_02240D98 + ldr r3, _0223F980 ; =0x000004D8 + mov r1, #0x6f + ldr r6, [r5, r3] + mov r3, #0x18 + mul r3, r6 + lsl r1, r1, #4 + add r3, #0x4c + lsl r3, r3, #0x10 + ldr r1, [r5, r1] + add r0, r5, #0 + mov r2, #0x10 + asr r3, r3, #0x10 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0xc + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223F928: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223F960 +_0223F95A: + mov r1, #4 + bl ov62_0222FB60 +_0223F960: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223F968: .word 0x00002054 +_0223F96C: .word 0x02248FD8 +_0223F970: .word 0x00004138 +_0223F974: .word 0x0000047C +_0223F978: .word 0x0000049C +_0223F97C: .word 0x000004E4 +_0223F980: .word 0x000004D8 + thumb_func_end ov62_0223F760 + + thumb_func_start ov62_0223F984 +ov62_0223F984: ; 0x0223F984 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223F9A0 + cmp r1, #1 + beq _0223FA2E + cmp r1, #2 + bne _0223F99E + b _0223FAA8 +_0223F99E: + b _0223FB42 +_0223F9A0: + ldr r0, _0223FB50 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233664 + ldr r1, _0223FB54 ; =0x0000049C + add r0, r5, r1 + sub r1, #0x10 + ldrsh r1, [r5, r1] + bl ov62_022331C8 + ldr r0, _0223FB54 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_02233064 + ldr r2, _0223FB58 ; =0x000004D8 + mov r0, #0x6f + ldr r3, [r5, r2] + mov r2, #0x18 + mul r2, r3 + lsl r0, r0, #4 + add r2, #0x4c + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8EC + add r0, r5, #0 + bl ov62_02240E30 + ldr r0, _0223FB5C ; =0x02248F7C + bl sub_02022760 + cmp r0, #0 + beq _0223FA0E + add r0, r5, #0 + bl ov62_02234520 + ldr r0, _0223FB60 ; =0x000004D4 + ldr r0, [r5, r0] + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0223FB64 ; =0x00002608 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223FA0E + ldr r0, _0223FB68 ; =0x00002034 + mov r1, #6 + str r1, [r4, r0] + mov r0, #0 + str r0, [r4, #0x10] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223FA0E: + ldr r0, _0223FB6C ; =0x02248F80 + bl sub_02022760 + cmp r0, #0 + bne _0223FA1A + b _0223FB4A +_0223FA1A: + add r0, r5, #0 + bl ov62_02234520 + ldr r0, _0223FB68 ; =0x00002034 + mov r1, #5 + str r1, [r4, r0] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FB4A +_0223FA2E: + ldr r0, _0223FB50 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233600 + ldr r0, _0223FB54 ; =0x0000049C + add r0, r5, r0 + bl ov62_022332FC + ldr r0, _0223FB54 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022334FC + mov r0, #0x82 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl ov62_02233A74 + add r0, r5, #0 + bl ov62_02240DDC + add r0, r5, #0 + bl ov62_02233A44 + add r0, r5, #0 + bl ov62_0223F124 + add r0, r5, #0 + bl ov62_0223F160 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _0223FB68 ; =0x00002034 + ldr r0, [r4, r0] + cmp r0, #5 + bne _0223FAA2 + ldr r0, _0223FB50 ; =0x0000047C + add r0, r5, r0 + bl ov62_022335F4 + ldr r0, _0223FB54 ; =0x0000049C + add r0, r5, r0 + bl ov62_02233310 + ldr r0, _0223FB70 ; =0x00002084 + mov r1, #0 + str r1, [r4, r0] +_0223FAA2: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223FAA8: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223FB10 + add r0, r5, #0 + mov r1, #0 + bl ov62_0223F0A8 + ldr r0, _0223FB68 ; =0x00002034 + ldr r0, [r4, r0] + cmp r0, #6 + bne _0223FB0A + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r5, #0 + add r0, r4, r0 + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl sub_0200D364 +_0223FB0A: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223FB10: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223FB4A +_0223FB42: + ldr r1, _0223FB68 ; =0x00002034 + ldr r1, [r4, r1] + bl ov62_0222FB60 +_0223FB4A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223FB50: .word 0x0000047C +_0223FB54: .word 0x0000049C +_0223FB58: .word 0x000004D8 +_0223FB5C: .word 0x02248F7C +_0223FB60: .word 0x000004D4 +_0223FB64: .word 0x00002608 +_0223FB68: .word 0x00002034 +_0223FB6C: .word 0x02248F80 +_0223FB70: .word 0x00002084 + thumb_func_end ov62_0223F984 + + thumb_func_start ov62_0223FB74 +ov62_0223FB74: ; 0x0223FB74 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223FB8E + cmp r1, #1 + beq _0223FBA6 + cmp r1, #2 + beq _0223FBF6 + b _0223FC1C +_0223FB8E: + bl ov62_0223F124 + add r0, r5, #0 + bl ov62_0223F160 + add r0, r5, #0 + bl ov62_02231B8C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FCC0 +_0223FBA6: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223FBDC + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223F06C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0223FBDC: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223FCC0 +_0223FBF6: + add r4, #8 + add r0, r4, #0 + bl ov62_02231688 + add r0, r5, #0 + bl ov62_0223146C + mov r0, #1 + mov r1, #0x66 + bl sub_020397C8 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FCC0 +_0223FC1C: + bl ov62_02233790 + cmp r0, #0 + beq _0223FCC0 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _0223FC90 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + bl sub_020181C4 + b _0223FCC0 +_0223FC90: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_0223FCC0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223FB74 + + thumb_func_start ov62_0223FCC4 +ov62_0223FCC4: ; 0x0223FCC4 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _0223FCD6 + b _0223FE06 +_0223FCD6: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223FCE2: ; jump table + .short _0223FCEA - _0223FCE2 - 2 ; case 0 + .short _0223FCFA - _0223FCE2 - 2 ; case 1 + .short _0223FD48 - _0223FCE2 - 2 ; case 2 + .short _0223FDAA - _0223FCE2 - 2 ; case 3 +_0223FCEA: + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223FE0E +_0223FCFA: + bl ov62_02240B94 + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223FE14 ; =0x02248FC8 + ldr r2, _0223FE18 ; =ov62_02240A50 + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x62 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223FE1C ; =0x02248F98 + ldr r2, _0223FE20 ; =ov62_02240AEC + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x63 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0223FE24 ; =0x02248F84 + ldr r2, _0223FE28 ; =ov62_02240B5C + mov r1, #2 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223FE0E +_0223FD48: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0223FE0E +_0223FDAA: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223FDEC + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02240900 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0223FDEC: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0223FE0E +_0223FE06: + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 +_0223FE0E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223FE14: .word 0x02248FC8 +_0223FE18: .word ov62_02240A50 +_0223FE1C: .word 0x02248F98 +_0223FE20: .word ov62_02240AEC +_0223FE24: .word 0x02248F84 +_0223FE28: .word ov62_02240B5C + thumb_func_end ov62_0223FCC4 + + thumb_func_start ov62_0223FE2C +ov62_0223FE2C: ; 0x0223FE2C + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0223FE2C + + thumb_func_start ov62_0223FE44 +ov62_0223FE44: ; 0x0223FE44 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #3 + bls _0223FE56 + b _0223FF74 +_0223FE56: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223FE62: ; jump table + .short _0223FE6A - _0223FE62 - 2 ; case 0 + .short _0223FEA8 - _0223FE62 - 2 ; case 1 + .short _0223FEC0 - _0223FE62 - 2 ; case 2 + .short _0223FF2C - _0223FE62 - 2 ; case 3 +_0223FE6A: + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0223FE84 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _0223FE90 +_0223FE84: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232394 +_0223FE90: + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FF8C +_0223FEA8: + mov r2, #1 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0223FF8C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FF8C +_0223FEC0: + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0223FEF0 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232378 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov62_022323B8 + add r0, r5, #0 + mov r1, #0x50 + mov r2, #3 + bl ov62_022343B8 + b _0223FF1C +_0223FEF0: + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234214 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r5, #0 + mov r2, #3 + bl ov62_022343B8 +_0223FF1C: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FF8C +_0223FF2C: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _0223FF8C + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0223FF50 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl ov62_022323B8 + b _0223FF5C +_0223FF50: + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + mov r1, #1 + bl ov62_0223427C +_0223FF5C: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0223FF8C +_0223FF74: + ldr r1, [r4, #0x10] + mov r0, #1 + eor r1, r0 + str r1, [r4, #0x10] + add r0, r5, #0 + add r1, #0x79 + bl ov62_022408A8 + add r0, r5, #0 + mov r1, #7 + bl ov62_0222FB60 +_0223FF8C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_0223FE44 + + thumb_func_start ov62_0223FF90 +ov62_0223FF90: ; 0x0223FF90 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0223FFAC + cmp r1, #1 + beq _0223FFCC + cmp r1, #2 + beq _0223FFDC + b _0224006E +_0223FFAC: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0224007A +_0223FFCC: + bl sub_0200F2AC + cmp r0, #1 + bne _0224007A + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0224007A +_0223FFDC: + mov r1, #1 + bl ov62_02234540 + ldr r0, [r4, #0x10] + cmp r0, #0 + bne _0223FFF6 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _02240002 +_0223FFF6: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02232394 +_02240002: + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x19 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024034 + add r0, r5, #0 + bl ov62_0223E428 + add r0, r5, #0 + bl ov62_0224088C + add r0, r5, #0 + bl ov62_022410F0 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022314A8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r1, [r5, #0x10] + add r0, r5, #0 + ldr r1, [r1, #0] + bl ov62_022300C8 + ldr r0, _02240080 ; =0x00000868 + mov r1, #1 + ldr r0, [r5, r0] + mov r2, #0 + bl sub_0208BA84 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0224007A +_0224006E: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0224007A: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02240080: .word 0x00000868 + thumb_func_end ov62_0223FF90 + + thumb_func_start ov62_02240084 +ov62_02240084: ; 0x02240084 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #5 + bls _02240098 + b _022402B8 +_02240098: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022400A4: ; jump table + .short _022400B0 - _022400A4 - 2 ; case 0 + .short _0224017E - _022400A4 - 2 ; case 1 + .short _022401CC - _022400A4 - 2 ; case 2 + .short _0224022E - _022400A4 - 2 ; case 3 + .short _0224028A - _022400A4 - 2 ; case 4 + .short _022402A8 - _022400A4 - 2 ; case 5 +_022400B0: + bl ov62_02234314 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + bl ov62_022315C8 + ldr r0, _022402D4 ; =0x00004138 + mov r2, #0 + ldr r0, [r4, r0] + cmp r0, #0 + ble _022400E4 + mov r0, #0x9a + lsl r0, r0, #6 + add r7, r0, #0 + add r3, r4, r0 + ldr r0, _022402D4 ; =0x00004138 + add r6, r4, #0 + sub r7, #0x78 +_022400D6: + str r3, [r6, r7] + ldr r1, [r4, r0] + add r2, r2, #1 + add r3, #0xe4 + add r6, r6, #4 + cmp r2, r1 + blt _022400D6 +_022400E4: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_0200D364 + mov r1, #0x7d + ldr r0, _022402D8 ; =0x00002088 + lsl r1, r1, #2 + str r1, [r5, r0] + ldr r1, _022402DC ; =0x000004A4 + sub r0, r0, #4 + ldrsh r1, [r4, r1] + str r1, [r5, r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022402CE +_0224017E: + bl ov62_02240B94 + mov r0, #0x66 + str r0, [sp] + ldr r0, _022402E0 ; =0x02248FC8 + ldr r2, _022402E4 ; =ov62_02240A50 + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x62 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _022402E8 ; =0x02248F98 + ldr r2, _022402EC ; =ov62_02240AEC + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x63 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _022402F0 ; =0x02248F84 + ldr r2, _022402F4 ; =ov62_02240B5C + mov r1, #2 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022402CE +_022401CC: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022402CE +_0224022E: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02240270 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02240900 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02240270: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022402CE +_0224028A: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022402CE +_022402A8: + bl sub_0200F2AC + cmp r0, #1 + bne _022402CE + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022402CE +_022402B8: + ldr r0, _022402F8 ; =0x000006D8 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + add r0, r4, #0 + bl ov62_02230098 + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 +_022402CE: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022402D4: .word 0x00004138 +_022402D8: .word 0x00002088 +_022402DC: .word 0x000004A4 +_022402E0: .word 0x02248FC8 +_022402E4: .word ov62_02240A50 +_022402E8: .word 0x02248F98 +_022402EC: .word ov62_02240AEC +_022402F0: .word 0x02248F84 +_022402F4: .word ov62_02240B5C +_022402F8: .word 0x000006D8 + thumb_func_end ov62_02240084 + + thumb_func_start ov62_022402FC +ov62_022402FC: ; 0x022402FC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + ldr r1, _022403F0 ; =0x000008A4 + add r5, r0, #0 + sub r1, #0x44 + ldr r6, [r5, r1] + mov r1, #2 + bl ov62_022302A8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _022403F0 ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + ldr r1, _022403F0 ; =0x000008A4 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r5, r1 + mov r2, #2 + mov r3, #1 + bl sub_0201A7E8 + cmp r4, #0x64 + bne _022403B0 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r6, r0] + str r0, [sp, #0x14] + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x18] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + b _022403BA +_022403B0: + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r6, r0, #0 +_022403BA: + ldr r0, _022403F0 ; =0x000008A4 + mov r1, #0xcc + add r0, r5, r0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022403F4 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _022403F0 ; =0x000008A4 + add r3, r1, #0 + add r0, r5, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _022403F0 ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022403F0: .word 0x000008A4 +_022403F4: .word 0x000F0D0C + thumb_func_end ov62_022402FC + + thumb_func_start ov62_022403F8 +ov62_022403F8: ; 0x022403F8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] + bl sub_0202FE04 + mov r1, #4 + mov r2, #0 + bl sub_0202FE98 + add r3, r0, #0 + add r2, r1, #0 + add r0, r4, #0 + add r1, r3, #0 + bl ov62_02234970 + cmp r0, #0 + ldr r0, [r4, #8] + bne _02240424 + b _02240758 +_02240424: + cmp r0, #6 + bls _0224042A + b _0224072A +_0224042A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02240436: ; jump table + .short _02240444 - _02240436 - 2 ; case 0 + .short _022404A8 - _02240436 - 2 ; case 1 + .short _02240508 - _02240436 - 2 ; case 2 + .short _02240518 - _02240436 - 2 ; case 3 + .short _02240550 - _02240436 - 2 ; case 4 + .short _022405A0 - _02240436 - 2 ; case 5 + .short _022406C0 - _02240436 - 2 ; case 6 +_02240444: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _02240460 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + b _0224046C +_02240460: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02232394 +_0224046C: + add r0, r4, #0 + bl ov62_0224088C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022410F0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02240884 +_022404A8: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022404EE + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223EF60 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022404EE: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02240884 +_02240508: + ldr r1, _0224082C ; =0x00000115 + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02240884 +_02240518: + bl sub_02022798 + cmp r0, #0 + bne _02240522 + b _02240884 +_02240522: + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02240884 +_02240550: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02240586 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223F038 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02240586: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02240884 +_022405A0: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223E01C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, _02240830 ; =0x0000086C + ldr r0, [r4, r0] + cmp r0, #0xd2 + bne _022405F6 + mov r0, #0x45 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + mov r0, #0x13 + lsl r0, r0, #4 + add r1, r4, #0 + add r0, r5, r0 + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_0200D364 +_022405F6: + add r0, r4, #0 + bl ov62_02240900 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _02240668 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _02240698 +_02240668: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02232378 + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_02240698: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02240884 +_022406C0: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02240710 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _022406EE + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _022406FA +_022406EE: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_022323B8 +_022406FA: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02240710: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02240884 +_0224072A: + ldr r1, _02240834 ; =0x00004138 + mov r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + ble _0224074E + mov r1, #0x9a + lsl r1, r1, #6 + add r5, r4, r1 + ldr r2, _02240834 ; =0x00004138 + add r6, r4, #0 + sub r1, #0x78 +_02240740: + str r5, [r6, r1] + ldr r3, [r4, r2] + add r0, r0, #1 + add r5, #0xe4 + add r6, r6, #4 + cmp r0, r3 + blt _02240740 +_0224074E: + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 + b _02240884 +_02240758: + cmp r0, #0 + beq _02240766 + cmp r0, #1 + beq _022407CA + cmp r0, #2 + beq _02240838 + b _0224087C +_02240766: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, [r5, #0x10] + cmp r0, #0 + bne _02240782 + mov r0, #0x22 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + b _0224078E +_02240782: + mov r0, #0x65 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02232394 +_0224078E: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022410F0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0224088C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02240884 +_022407CA: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02240810 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223EF60 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02240810: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02240884 + nop +_0224082C: .word 0x00000115 +_02240830: .word 0x0000086C +_02240834: .word 0x00004138 +_02240838: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _02240862 + add r0, r4, #0 + mov r1, #0x64 + mov r2, #0 + bl ov62_022402FC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02240862: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02240884 +_0224087C: + add r0, r4, #0 + mov r1, #0xc + bl ov62_0222FB60 +_02240884: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov62_022403F8 + + thumb_func_start ov62_0224088C +ov62_0224088C: ; 0x0224088C + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + add r0, r4, #0 + add r0, #0x94 + bl sub_0201ACF4 + add r4, #0x94 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_0224088C + + thumb_func_start ov62_022408A8 +ov62_022408A8: ; 0x022408A8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r6, r1, #0 + add r4, #0x94 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + add r1, r6, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022408FC ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_022408FC: .word 0x000F0D00 + thumb_func_end ov62_022408A8 + + thumb_func_start ov62_02240900 +ov62_02240900: ; 0x02240900 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r6, r4, #0 + add r6, #0x94 + add r0, r6, #0 + bl sub_0201A7A0 + mov r0, #3 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r6, #0 + mov r2, #6 + mov r3, #8 + bl sub_0201A7E8 + ldr r1, [r4, #0x10] + add r0, r5, #0 + add r1, #0x79 + bl ov62_022408A8 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov62_02240900 + + thumb_func_start ov62_02240944 +ov62_02240944: ; 0x02240944 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r6, r4, #0 + add r6, #0x94 + add r0, r6, #0 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r6, #0 + mov r3, #4 + bl sub_0201A7E8 + add r0, r6, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x82 + bl sub_0200B1EC + add r7, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02240A20 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0201A9A4 + add r4, #0xa4 + add r0, r4, #0 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x15 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, #0 + mov r3, #0x12 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x83 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02240A20 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02240A20: .word 0x000F0D00 + thumb_func_end ov62_02240944 + + thumb_func_start ov62_02240A24 +ov62_02240A24: ; 0x02240A24 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + add r0, r4, #0 + add r0, #0x94 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #0x94 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0xa4 + bl sub_0201ACF4 + add r4, #0xa4 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02240A24 + + thumb_func_start ov62_02240A50 +ov62_02240A50: ; 0x02240A50 + push {r3, r4, r5, lr} + add r4, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r5, [r4, r2] + cmp r1, #0 + bne _02240AE4 + cmp r0, #3 + bhi _02240AE4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02240A6E: ; jump table + .short _02240A76 - _02240A6E - 2 ; case 0 + .short _02240A86 - _02240A6E - 2 ; case 1 + .short _02240AAE - _02240A6E - 2 ; case 2 + .short _02240AD6 - _02240A6E - 2 ; case 3 +_02240A76: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02240A86: + add r0, r4, #0 + bl ov62_02234520 + bl sub_0202F250 + cmp r0, #0 + beq _02240A9E + add r0, r4, #0 + mov r1, #9 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02240A9E: + ldr r0, _02240AE8 ; =0x00002034 + mov r1, #9 + str r1, [r5, r0] + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02240AAE: + add r0, r4, #0 + bl ov62_02234520 + bl sub_0202F250 + cmp r0, #0 + beq _02240AC6 + add r0, r4, #0 + mov r1, #0xb + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02240AC6: + ldr r0, _02240AE8 ; =0x00002034 + mov r1, #0xb + str r1, [r5, r0] + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02240AD6: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0xa + bl ov62_0222FB60 +_02240AE4: + pop {r3, r4, r5, pc} + nop +_02240AE8: .word 0x00002034 + thumb_func_end ov62_02240A50 + + thumb_func_start ov62_02240AEC +ov62_02240AEC: ; 0x02240AEC + push {r4, lr} + add r4, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r3, [r4, r2] + cmp r1, #0 + bne _02240B54 + cmp r0, #3 + bhi _02240B54 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02240B0A: ; jump table + .short _02240B12 - _02240B0A - 2 ; case 0 + .short _02240B12 - _02240B0A - 2 ; case 1 + .short _02240B12 - _02240B0A - 2 ; case 2 + .short _02240B40 - _02240B0A - 2 ; case 3 +_02240B12: + add r1, r0, #1 + ldr r0, _02240B58 ; =0x00002028 + add r2, #0x2c + str r1, [r3, r0] + ldr r0, [r3, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, r2] + cmp r0, #0 + beq _02240B30 + add r0, r4, #0 + mov r1, #0xe + bl ov62_0222FB60 + b _02240B38 +_02240B30: + add r0, r4, #0 + mov r1, #0x11 + bl ov62_0222FB60 +_02240B38: + add r0, r4, #0 + bl ov62_02234520 + pop {r4, pc} +_02240B40: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_02231A88 + add r0, r4, #0 + mov r1, #0xd + bl ov62_0222FB60 +_02240B54: + pop {r4, pc} + nop +_02240B58: .word 0x00002028 + thumb_func_end ov62_02240AEC + + thumb_func_start ov62_02240B5C +ov62_02240B5C: ; 0x02240B5C + push {r4, lr} + add r4, r2, #0 + cmp r1, #0 + bne _02240B92 + cmp r0, #0 + beq _02240B6E + cmp r0, #1 + beq _02240B84 + pop {r4, pc} +_02240B6E: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_02240A24 + add r0, r4, #0 + mov r1, #0x11 + bl ov62_0222FB60 + pop {r4, pc} +_02240B84: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0x10 + bl ov62_0222FB60 +_02240B92: + pop {r4, pc} + thumb_func_end ov62_02240B5C + + thumb_func_start ov62_02240B94 +ov62_02240B94: ; 0x02240B94 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0x66 + bl sub_02030A80 + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, _02240BEC ; =0x000004D4 + ldr r1, [r4, r1] + ldr r0, [r5, r0] + lsl r0, r0, #2 + add r2, r5, r0 + ldr r0, _02240BF0 ; =0x00002608 + ldr r0, [r2, r0] + bl ov61_0222AFC0 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r0, #0x8c + str r1, [r4, r0] + mov r0, #0x66 + bl sub_0202FF2C + mov r1, #0x89 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, _02240BEC ; =0x000004D4 + ldr r1, [r4, r1] + ldr r0, [r5, r0] + lsl r0, r0, #2 + add r2, r5, r0 + ldr r0, _02240BF0 ; =0x00002608 + ldr r0, [r2, r0] + mov r2, #0x64 + add r0, #0x80 + bl sub_020C4DB0 + pop {r3, r4, r5, pc} + nop +_02240BEC: .word 0x000004D4 +_02240BF0: .word 0x00002608 + thumb_func_end ov62_02240B94 + + thumb_func_start ov62_02240BF4 +ov62_02240BF4: ; 0x02240BF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x80 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #8] + ldr r0, [r0, r1] + ldr r1, _02240D80 ; =0x000004A4 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + ldr r5, _02240D84 ; =0x02249034 + ldrsh r2, [r0, r1] + add r4, sp, #0x50 + mov r3, #6 +_02240C0E: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _02240C0E + mov r1, #0 + add r0, sp, #0x38 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + str r1, [r0, #0x10] + str r1, [r0, #0x14] + add r0, sp, #0x20 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + str r1, [r0, #0x10] + str r1, [r0, #0x14] + str r1, [sp, #0x18] + ldr r0, [sp, #8] + lsl r1, r2, #2 + add r0, r0, r1 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + str r0, [sp, #0xc] +_02240C42: + ldr r1, _02240D88 ; =0x00002608 + ldr r0, [sp, #0x10] + ldr r0, [r0, r1] + cmp r0, #0 + bne _02240C4E + b _02240D5C +_02240C4E: + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _02240C5C + mov r0, #1 + b _02240C5E +_02240C5C: + mov r0, #0 +_02240C5E: + mov r7, #0 + add r1, r7, #0 + add r2, sp, #0x38 + add r4, sp, #0x20 + add r3, r7, #0 +_02240C68: + stmia r2!, {r3} + add r1, r1, #1 + stmia r4!, {r3} + cmp r1, #6 + blt _02240C68 + mov r1, #0x18 + mul r1, r0 + add r0, sp, #0x50 + str r1, [sp, #0x1c] + add r0, r0, r1 + add r1, sp, #0x38 + add r2, sp, #0x20 +_02240C80: + ldr r5, [sp, #0x10] + ldr r4, _02240D88 ; =0x00002608 + ldr r6, [r0, #0] + ldr r5, [r5, r4] + lsl r4, r6, #1 + add r4, r5, r4 + add r4, #0x80 + ldrh r4, [r4] + cmp r4, #0 + beq _02240CA6 + stmia r1!, {r4} + ldr r5, [sp, #0x10] + ldr r4, _02240D88 ; =0x00002608 + add r7, r7, #1 + ldr r4, [r5, r4] + add r4, r4, r6 + add r4, #0x98 + ldrb r4, [r4] + stmia r2!, {r4} +_02240CA6: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, #3 + blt _02240C80 + ldr r1, _02240D88 ; =0x00002608 + ldr r0, [sp, #0x10] + ldr r0, [r0, r1] + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _02240CC0 + mov r7, #3 +_02240CC0: + ldr r0, [sp, #0x1c] + add r1, sp, #0x50 + add r0, r1, r0 + lsl r4, r7, #2 + add r1, sp, #0x38 + add r2, sp, #0x20 + mov r3, #3 + add r0, #0xc + add r1, r1, r4 + add r2, r2, r4 +_02240CD4: + ldr r5, [sp, #0x10] + ldr r4, _02240D88 ; =0x00002608 + ldr r6, [r0, #0] + ldr r5, [r5, r4] + lsl r4, r6, #1 + add r4, r5, r4 + add r4, #0x80 + ldrh r4, [r4] + cmp r4, #0 + beq _02240CFA + stmia r1!, {r4} + ldr r5, [sp, #0x10] + ldr r4, _02240D88 ; =0x00002608 + add r7, r7, #1 + ldr r4, [r5, r4] + add r4, r4, r6 + add r4, #0x98 + ldrb r4, [r4] + stmia r2!, {r4} +_02240CFA: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, #6 + blt _02240CD4 + ldr r5, [sp, #0xc] + mov r7, #0 + add r6, sp, #0x38 + add r4, sp, #0x20 +_02240D0A: + ldr r2, [sp, #0x14] + ldr r1, _02240D8C ; =0x00002088 + ldr r3, [r6, #0] + ldr r2, [r2, r1] + ldr r0, [r4, #0] + add r1, r1, #4 + str r2, [r5, r1] + str r0, [sp] + mov r0, #0 + mov r1, #0x82 + str r0, [sp, #4] + ldr r2, [sp, #0x14] + lsl r1, r1, #6 + ldr r1, [r2, r1] + ldr r2, _02240D90 ; =0x0000208C + ldr r0, [sp, #8] + ldr r2, [r5, r2] + bl ov62_02233A7C + ldr r1, _02240D94 ; =0x00002090 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02240D44 + mov r1, #6 + sub r1, r1, r7 + bl sub_0200D474 +_02240D44: + ldr r1, [sp, #0x14] + ldr r0, _02240D8C ; =0x00002088 + add r7, r7, #1 + ldr r0, [r1, r0] + add r6, r6, #4 + add r2, r0, #1 + ldr r0, _02240D8C ; =0x00002088 + add r4, r4, #4 + add r5, #8 + str r2, [r1, r0] + cmp r7, #6 + blt _02240D0A +_02240D5C: + ldr r0, [sp, #0x10] + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r0, #0x30 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #5 + bge _02240D74 + b _02240C42 +_02240D74: + ldr r0, [sp, #8] + bl ov62_0223DFA8 + add sp, #0x80 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240D80: .word 0x000004A4 +_02240D84: .word 0x02249034 +_02240D88: .word 0x00002608 +_02240D8C: .word 0x00002088 +_02240D90: .word 0x0000208C +_02240D94: .word 0x00002090 + thumb_func_end ov62_02240BF4 + + thumb_func_start ov62_02240D98 +ov62_02240D98: ; 0x02240D98 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0 + str r1, [sp, #4] + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + ldr r7, _02240DD8 ; =0x00002090 + str r0, [sp] +_02240DAC: + ldr r5, [sp] + mov r4, #0 +_02240DB0: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02240DBC + add r1, r6, #0 + bl sub_0200D3F4 +_02240DBC: + add r4, r4, #1 + add r5, #8 + cmp r4, #6 + blt _02240DB0 + ldr r0, [sp] + add r0, #0x30 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _02240DAC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240DD8: .word 0x00002090 + thumb_func_end ov62_02240D98 + + thumb_func_start ov62_02240DDC +ov62_02240DDC: ; 0x02240DDC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + mov r0, #0 + str r0, [sp, #4] + mov r0, #0x86 + lsl r0, r0, #4 + ldr r0, [r6, r0] + mov r7, #0 + str r0, [sp] +_02240DF0: + ldr r5, [sp] + mov r4, #0 +_02240DF4: + ldr r0, _02240E28 ; =0x00002090 + ldr r2, [r5, r0] + cmp r2, #0 + beq _02240E0A + ldr r1, _02240E2C ; =0x0000208C + add r0, r6, #0 + ldr r1, [r5, r1] + bl ov62_02233B24 + ldr r0, _02240E28 ; =0x00002090 + str r7, [r5, r0] +_02240E0A: + add r4, r4, #1 + add r5, #8 + cmp r4, #6 + blt _02240DF4 + ldr r0, [sp] + add r0, #0x30 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _02240DF0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240E28: .word 0x00002090 +_02240E2C: .word 0x0000208C + thumb_func_end ov62_02240DDC + + thumb_func_start ov62_02240E30 +ov62_02240E30: ; 0x02240E30 + push {r4, r5, r6, r7, lr} + sub sp, #0xa4 + mov r1, #0 + str r1, [sp, #0x20] + ldr r2, [sp, #0x20] + add r1, sp, #0x8c + str r2, [r1, #0] + str r2, [r1, #4] + str r2, [r1, #8] + str r2, [r1, #0xc] + str r2, [r1, #0x10] + str r2, [r1, #0x14] + mov r2, #0x86 + lsl r2, r2, #4 + add r1, r0, #0 + ldr r1, [r1, r2] + ldr r2, _022410CC ; =0x00002084 + str r1, [sp, #0x1c] + ldr r3, [r1, r2] + ldr r2, _022410D0 ; =0x000004A4 + add r1, r0, #0 + ldrsh r1, [r1, r2] + str r0, [sp, #8] + cmp r3, r1 + bne _02240E64 + b _022410C6 +_02240E64: + mov r1, #1 + bl ov62_02234540 + ldr r1, _022410CC ; =0x00002084 + ldr r0, [sp, #0x1c] + ldr r2, [r0, r1] + ldr r1, _022410D0 ; =0x000004A4 + ldr r0, [sp, #8] + ldrsh r0, [r0, r1] + cmp r2, r0 + ble _02240E7E + mov r0, #4 + str r0, [sp, #0x20] +_02240E7E: + ldr r0, [sp, #0x20] + mov r1, #0x30 + mul r1, r0 + ldr r0, [sp, #0x1c] + mov r6, #0 + add r4, r0, r1 + add r5, sp, #0x8c + add r7, r6, #0 +_02240E8E: + ldr r0, _022410D4 ; =0x00002090 + ldr r2, [r4, r0] + cmp r2, #0 + beq _02240EAA + ldr r1, _022410D8 ; =0x0000208C + ldr r0, [sp, #8] + ldr r1, [r4, r1] + bl ov62_02233B40 + ldr r0, _022410D8 ; =0x0000208C + ldr r0, [r4, r0] + str r0, [r5, #0] + ldr r0, _022410D4 ; =0x00002090 + str r7, [r4, r0] +_02240EAA: + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #6 + blt _02240E8E + ldr r0, [sp, #0x20] + cmp r0, #0 + beq _02240EF4 + ldr r2, _022410DC ; =0x00002060 + ldr r7, [sp, #0x1c] + mov r0, #4 + add r3, r2, #0 + add r5, r2, #0 + str r0, [sp, #0xc] + add r7, #0xc0 + add r3, #0x30 + sub r4, r2, #4 + add r5, #0x2c +_02240ECE: + mov r0, #0 + add r1, r7, #0 +_02240ED2: + ldr r6, [r1, r2] + add r0, r0, #1 + str r6, [r1, r3] + ldr r6, [r1, r4] + str r6, [r1, r5] + add r1, #8 + cmp r0, #6 + blt _02240ED2 + ldr r0, [sp, #0xc] + sub r7, #0x30 + sub r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #1 + bge _02240ECE + mov r0, #0 + str r0, [sp, #0x10] + b _02240F2C +_02240EF4: + ldr r6, _022410D4 ; =0x00002090 + ldr r7, [sp, #0x1c] + mov r0, #1 + add r2, r6, #0 + add r4, r6, #0 + mov ip, r0 + add r7, #0x30 + sub r2, #0x30 + sub r3, r6, #4 + sub r4, #0x34 +_02240F08: + mov r1, #0 + add r0, r7, #0 +_02240F0C: + ldr r5, [r0, r6] + add r1, r1, #1 + str r5, [r0, r2] + ldr r5, [r0, r3] + str r5, [r0, r4] + add r0, #8 + cmp r1, #6 + blt _02240F0C + mov r0, ip + add r0, r0, #1 + add r7, #0x30 + mov ip, r0 + cmp r0, #5 + blt _02240F08 + mov r0, #4 + str r0, [sp, #0x10] +_02240F2C: + ldr r1, _022410D0 ; =0x000004A4 + ldr r0, [sp, #8] + ldr r5, _022410E0 ; =0x02249004 + ldrsh r1, [r0, r1] + ldr r0, [sp, #0x10] + add r4, sp, #0x5c + add r2, r1, r0 + mov r3, #6 +_02240F3C: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _02240F3C + add r0, sp, #0x44 + mov r4, #0 + str r4, [r0, #0] + str r4, [r0, #4] + str r4, [r0, #8] + str r4, [r0, #0xc] + str r4, [r0, #0x10] + str r4, [r0, #0x14] + add r0, sp, #0x2c + str r4, [r0, #0] + str r4, [r0, #4] + str r4, [r0, #8] + str r4, [r0, #0xc] + str r4, [r0, #0x10] + str r4, [r0, #0x14] + lsl r0, r2, #2 + str r0, [sp, #0x14] + ldr r1, _022410E4 ; =0x00002608 + ldr r0, [sp, #8] + add r1, r0, r1 + ldr r0, [sp, #0x14] + str r1, [sp, #0x24] + ldr r0, [r1, r0] + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _02240F7E + mov r4, #1 +_02240F7E: + mov r0, #0 + str r0, [sp, #0x18] + add r1, sp, #0x44 + add r2, sp, #0x2c + add r6, r0, #0 +_02240F88: + stmia r1!, {r6} + add r0, r0, #1 + stmia r2!, {r6} + cmp r0, #6 + blt _02240F88 + mov r0, #0x18 + mul r0, r4 + add r1, sp, #0x5c + add r2, r1, r0 + str r0, [sp, #0x28] + ldr r1, [sp, #8] + ldr r0, [sp, #0x14] + add r3, sp, #0x44 + add r5, sp, #0x2c + add r4, r1, r0 +_02240FA6: + ldr r0, _022410E4 ; =0x00002608 + ldr r7, [r2, #0] + ldr r1, [r4, r0] + lsl r0, r7, #1 + add r0, r1, r0 + add r0, #0x80 + ldrh r0, [r0] + cmp r0, #0 + beq _02240FCC + stmia r3!, {r0} + ldr r0, _022410E4 ; =0x00002608 + ldr r0, [r4, r0] + add r0, r0, r7 + add r0, #0x98 + ldrb r0, [r0] + stmia r5!, {r0} + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] +_02240FCC: + add r6, r6, #1 + add r2, r2, #4 + cmp r6, #3 + blt _02240FA6 + ldr r1, [sp, #0x24] + ldr r0, [sp, #0x14] + ldr r0, [r1, r0] + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _02240FE8 + mov r0, #3 + str r0, [sp, #0x18] +_02240FE8: + ldr r0, [sp, #0x28] + add r1, sp, #0x5c + add r2, r1, r0 + ldr r0, [sp, #0x18] + mov r6, #3 + lsl r1, r0, #2 + add r0, sp, #0x44 + add r3, r0, r1 + add r0, sp, #0x2c + add r2, #0xc + add r5, r0, r1 +_02240FFE: + ldr r0, _022410E4 ; =0x00002608 + ldr r7, [r2, #0] + ldr r1, [r4, r0] + lsl r0, r7, #1 + add r0, r1, r0 + add r0, #0x80 + ldrh r0, [r0] + cmp r0, #0 + beq _02241024 + stmia r3!, {r0} + ldr r0, _022410E4 ; =0x00002608 + ldr r0, [r4, r0] + add r0, r0, r7 + add r0, #0x98 + ldrb r0, [r0] + stmia r5!, {r0} + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] +_02241024: + add r6, r6, #1 + add r2, r2, #4 + cmp r6, #6 + blt _02240FFE + ldr r0, [sp, #0x10] + mov r1, #0x30 + mul r1, r0 + ldr r0, [sp, #0x1c] + mov r5, #0 + add r7, sp, #0x44 + add r6, sp, #0x2c + add r4, r0, r1 +_0224103C: + ldr r2, [sp, #0x1c] + ldr r1, _022410E8 ; =0x00002088 + ldr r3, [r7, #0] + ldr r2, [r2, r1] + ldr r0, [r6, #0] + add r1, r1, #4 + str r2, [r4, r1] + str r0, [sp] + mov r0, #0 + mov r1, #0x82 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + lsl r1, r1, #6 + ldr r1, [r2, r1] + ldr r2, _022410D8 ; =0x0000208C + ldr r0, [sp, #8] + ldr r2, [r4, r2] + bl ov62_02233A7C + ldr r1, _022410D4 ; =0x00002090 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02241076 + mov r1, #6 + sub r1, r1, r5 + bl sub_0200D474 +_02241076: + ldr r1, [sp, #0x1c] + ldr r0, _022410E8 ; =0x00002088 + add r5, r5, #1 + ldr r0, [r1, r0] + add r7, r7, #4 + add r2, r0, #1 + ldr r0, _022410E8 ; =0x00002088 + add r6, r6, #4 + add r4, #8 + str r2, [r1, r0] + cmp r5, #6 + blt _0224103C + ldr r0, [sp, #8] + bl ov62_0223DFA8 + ldr r1, _022410D0 ; =0x000004A4 + ldr r0, [sp, #8] + ldr r6, _022410EC ; =0x000186A0 + ldrsh r2, [r0, r1] + ldr r1, _022410CC ; =0x00002084 + ldr r0, [sp, #0x1c] + mov r5, #0 + str r2, [r0, r1] + add r4, sp, #0x8c +_022410A6: + ldr r1, [r4, #0] + cmp r1, #0 + beq _022410B6 + ldr r0, [sp, #8] + add r1, r1, r6 + ldr r0, [r0, #0x1c] + bl sub_0200D070 +_022410B6: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #6 + blt _022410A6 + ldr r0, [sp, #8] + mov r1, #0 + bl ov62_02234540 +_022410C6: + add sp, #0xa4 + pop {r4, r5, r6, r7, pc} + nop +_022410CC: .word 0x00002084 +_022410D0: .word 0x000004A4 +_022410D4: .word 0x00002090 +_022410D8: .word 0x0000208C +_022410DC: .word 0x00002060 +_022410E0: .word 0x02249004 +_022410E4: .word 0x00002608 +_022410E8: .word 0x00002088 +_022410EC: .word 0x000186A0 + thumb_func_end ov62_02240E30 + + thumb_func_start ov62_022410F0 +ov62_022410F0: ; 0x022410F0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov62_022312B0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D0F4 + add r0, r5, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_022410F0 + + .rodata + + + .global Unk_ov62_02248F7C +Unk_ov62_02248F7C: ; 0x02248F7C + .incbin "incbin/overlay62_rodata.bin", 0x850, 0x854 - 0x850 + + .global Unk_ov62_02248F80 +Unk_ov62_02248F80: ; 0x02248F80 + .incbin "incbin/overlay62_rodata.bin", 0x854, 0x858 - 0x854 + + .global Unk_ov62_02248F84 +Unk_ov62_02248F84: ; 0x02248F84 + .incbin "incbin/overlay62_rodata.bin", 0x858, 0x860 - 0x858 + + .global Unk_ov62_02248F8C +Unk_ov62_02248F8C: ; 0x02248F8C + .incbin "incbin/overlay62_rodata.bin", 0x860, 0x86C - 0x860 + + .global Unk_ov62_02248F98 +Unk_ov62_02248F98: ; 0x02248F98 + .incbin "incbin/overlay62_rodata.bin", 0x86C, 0x87C - 0x86C + + .global Unk_ov62_02248FA8 +Unk_ov62_02248FA8: ; 0x02248FA8 + .incbin "incbin/overlay62_rodata.bin", 0x87C, 0x88C - 0x87C + + .global Unk_ov62_02248FB8 +Unk_ov62_02248FB8: ; 0x02248FB8 + .incbin "incbin/overlay62_rodata.bin", 0x88C, 0x89C - 0x88C + + .global Unk_ov62_02248FC8 +Unk_ov62_02248FC8: ; 0x02248FC8 + .incbin "incbin/overlay62_rodata.bin", 0x89C, 0x8AC - 0x89C + + .global Unk_ov62_02248FD8 +Unk_ov62_02248FD8: ; 0x02248FD8 + .incbin "incbin/overlay62_rodata.bin", 0x8AC, 0x8D8 - 0x8AC + + .global Unk_ov62_02249004 +Unk_ov62_02249004: ; 0x02249004 + .incbin "incbin/overlay62_rodata.bin", 0x8D8, 0x908 - 0x8D8 + + .global Unk_ov62_02249034 +Unk_ov62_02249034: ; 0x02249034 + .incbin "incbin/overlay62_rodata.bin", 0x908, 0x938 - 0x908 + + .global Unk_ov62_02249064 +Unk_ov62_02249064: ; 0x02249064 + .incbin "incbin/overlay62_rodata.bin", 0x938, 0x9B0 - 0x938 + + .global Unk_ov62_022490DC +Unk_ov62_022490DC: ; 0x022490DC + .incbin "incbin/overlay62_rodata.bin", 0x9B0, 0x54 + diff --git a/asm/ov62_0224112C.s b/asm/ov62_0224112C.s new file mode 100644 index 000000000..a8e19616b --- /dev/null +++ b/asm/ov62_0224112C.s @@ -0,0 +1,120 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_0224112C +ov62_0224112C: ; 0x0224112C + add r0, #0x68 + bx lr + thumb_func_end ov62_0224112C + + thumb_func_start ov62_02241130 +ov62_02241130: ; 0x02241130 + push {r4, lr} + sub sp, #0x40 + add r4, r0, #0 + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02025CCC + bl sub_02025D74 + str r0, [sp] + mov r0, #0x66 + str r0, [sp, #4] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0 + str r0, [sp, #8] + ldr r0, _02241190 ; =ov62_02239D34 + str r4, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02241194 ; =ov62_02239D38 + str r4, [sp, #0x3c] + str r0, [sp, #0x14] + ldr r0, _02241198 ; =ov62_0223CAA4 + add r4, #0x68 + str r0, [sp, #0x18] + ldr r0, _0224119C ; =ov62_0223CAA8 + str r0, [sp, #0x1c] + ldr r0, _022411A0 ; =ov62_0223DF10 + str r0, [sp, #0x20] + ldr r0, _022411A4 ; =ov62_0223DF4C + str r0, [sp, #0x24] + ldr r0, _022411A8 ; =ov62_02246944 + str r0, [sp, #0x28] + ldr r0, _022411AC ; =ov62_02233828 + str r0, [sp, #0x2c] + ldr r0, _022411B0 ; =ov62_02246968 + str r0, [sp, #0x30] + ldr r0, _022411B4 ; =ov62_0224699C + str r0, [sp, #0x34] + mov r0, #0 + str r0, [sp, #0x38] + add r0, r4, #0 + bl ov61_0222B008 + add sp, #0x40 + pop {r4, pc} + ; .align 2, 0 +_02241190: .word ov62_02239D34 +_02241194: .word ov62_02239D38 +_02241198: .word ov62_0223CAA4 +_0224119C: .word ov62_0223CAA8 +_022411A0: .word ov62_0223DF10 +_022411A4: .word ov62_0223DF4C +_022411A8: .word ov62_02246944 +_022411AC: .word ov62_02233828 +_022411B0: .word ov62_02246968 +_022411B4: .word ov62_0224699C + thumb_func_end ov62_02241130 + + thumb_func_start ov62_022411B8 +ov62_022411B8: ; 0x022411B8 + push {r3, lr} + mov r1, #0x42 + lsl r1, r1, #4 + ldr r1, [r0, r1] + cmp r1, #0 + bne _022411C8 + mov r0, #0 + pop {r3, pc} +_022411C8: + bl ov62_0224112C + bl ov61_0222BBBC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_022411B8 + + thumb_func_start ov62_022411D4 +ov62_022411D4: ; 0x022411D4 + push {r3, lr} + mov r1, #0x42 + lsl r1, r1, #4 + ldr r1, [r0, r1] + cmp r1, #0 + beq _022411E8 + bl ov62_0224112C + bl ov61_0222B57C +_022411E8: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_022411D4 + + thumb_func_start ov62_022411EC +ov62_022411EC: ; 0x022411EC + push {r3, lr} + mov r1, #0x42 + lsl r1, r1, #4 + ldr r1, [r0, r1] + cmp r1, #0 + beq _02241200 + bl ov62_0224112C + bl ov61_0222B0F0 +_02241200: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_022411EC \ No newline at end of file diff --git a/asm/ov62_02241204.s b/asm/ov62_02241204.s new file mode 100644 index 000000000..04d6d6d0e --- /dev/null +++ b/asm/ov62_02241204.s @@ -0,0 +1,10933 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02241204 +ov62_02241204: ; 0x02241204 + push {r4, r5, r6, r7, lr} + sub sp, #0x84 + ldr r4, _02241270 ; =0x02249430 + add r3, sp, #0xc + mov r2, #0x3c +_0224120E: + ldrh r1, [r4] + add r4, r4, #2 + strh r1, [r3] + add r3, r3, #2 + sub r2, r2, #1 + bne _0224120E + mov r1, #0 + str r1, [sp, #8] + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + ldr r7, _02241274 ; =0x0000051C + str r0, [sp, #4] + ldr r0, [sp, #8] + str r0, [sp] +_0224122C: + ldr r0, [sp] + ldr r4, [sp, #4] + lsl r1, r0, #2 + add r0, sp, #0xc + mov r6, #0 + add r5, r0, r1 +_02241238: + ldr r0, [r4, r7] + cmp r0, #0 + beq _0224124A + mov r1, #0 + mov r2, #2 + ldrsh r1, [r5, r1] + ldrsh r2, [r5, r2] + bl sub_0200D4C4 +_0224124A: + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #6 + blt _02241238 + ldr r0, [sp, #4] + add r0, #0x30 + str r0, [sp, #4] + ldr r0, [sp] + add r0, r0, #6 + str r0, [sp] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #5 + blt _0224122C + add sp, #0x84 + pop {r4, r5, r6, r7, pc} + nop +_02241270: .word 0x02249430 +_02241274: .word 0x0000051C + thumb_func_end ov62_02241204 + + thumb_func_start ov62_02241278 +ov62_02241278: ; 0x02241278 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x80 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #8] + ldr r0, [r0, r1] + ldr r4, _02241400 ; =0x022492F0 + str r0, [sp, #0x14] + add r3, sp, #0x50 + mov r2, #6 +_0224128C: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224128C + mov r0, #0 + add r1, sp, #0x38 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + str r0, [r1, #0xc] + str r0, [r1, #0x10] + str r0, [r1, #0x14] + add r1, sp, #0x20 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + str r0, [r1, #0xc] + str r0, [r1, #0x10] + str r0, [r1, #0x14] + str r0, [sp, #0x18] + ldr r1, _02241404 ; =0x000004A4 + ldr r0, [sp, #8] + ldrsh r0, [r0, r1] + lsl r1, r0, #2 + ldr r0, [sp, #8] + add r0, r0, r1 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + str r0, [sp, #0xc] +_022412C6: + ldr r1, _02241408 ; =0x00002608 + ldr r0, [sp, #0x10] + ldr r0, [r0, r1] + cmp r0, #0 + bne _022412D2 + b _022413DE +_022412D2: + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _022412E0 + mov r0, #1 + b _022412E2 +_022412E0: + mov r0, #0 +_022412E2: + mov r7, #0 + add r1, r7, #0 + add r2, sp, #0x38 + add r4, sp, #0x20 + add r3, r7, #0 +_022412EC: + stmia r2!, {r3} + add r1, r1, #1 + stmia r4!, {r3} + cmp r1, #6 + blt _022412EC + mov r1, #0x18 + mul r1, r0 + add r0, sp, #0x50 + str r1, [sp, #0x1c] + add r0, r0, r1 + add r1, sp, #0x38 + add r2, sp, #0x20 +_02241304: + ldr r5, [sp, #0x10] + ldr r4, _02241408 ; =0x00002608 + ldr r6, [r0, #0] + ldr r5, [r5, r4] + lsl r4, r6, #1 + add r4, r5, r4 + add r4, #0x80 + ldrh r4, [r4] + cmp r4, #0 + beq _0224132A + stmia r1!, {r4} + ldr r5, [sp, #0x10] + ldr r4, _02241408 ; =0x00002608 + add r7, r7, #1 + ldr r4, [r5, r4] + add r4, r4, r6 + add r4, #0x98 + ldrb r4, [r4] + stmia r2!, {r4} +_0224132A: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, #3 + blt _02241304 + ldr r1, _02241408 ; =0x00002608 + ldr r0, [sp, #0x10] + ldr r0, [r0, r1] + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _02241344 + mov r7, #3 +_02241344: + ldr r0, [sp, #0x1c] + add r1, sp, #0x50 + add r0, r1, r0 + lsl r4, r7, #2 + add r1, sp, #0x38 + add r2, sp, #0x20 + mov r3, #3 + add r0, #0xc + add r1, r1, r4 + add r2, r2, r4 +_02241358: + ldr r5, [sp, #0x10] + ldr r4, _02241408 ; =0x00002608 + ldr r6, [r0, #0] + ldr r5, [r5, r4] + lsl r4, r6, #1 + add r4, r5, r4 + add r4, #0x80 + ldrh r4, [r4] + cmp r4, #0 + beq _0224137E + stmia r1!, {r4} + ldr r5, [sp, #0x10] + ldr r4, _02241408 ; =0x00002608 + add r7, r7, #1 + ldr r4, [r5, r4] + add r4, r4, r6 + add r4, #0x98 + ldrb r4, [r4] + stmia r2!, {r4} +_0224137E: + add r3, r3, #1 + add r0, r0, #4 + cmp r3, #6 + blt _02241358 + ldr r5, [sp, #0xc] + mov r7, #0 + add r6, sp, #0x38 + add r4, sp, #0x20 +_0224138E: + ldr r2, [sp, #0x14] + ldr r1, _0224140C ; =0x00000514 + ldr r3, [r6, #0] + ldr r2, [r2, r1] + ldr r0, [r4, #0] + add r1, r1, #4 + str r2, [r5, r1] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x14] + ldr r1, _02241410 ; =0x0000050C + ldr r0, [sp, #8] + ldr r1, [r2, r1] + ldr r2, _02241414 ; =0x00000518 + ldr r2, [r5, r2] + bl ov62_02233A7C + ldr r1, _02241418 ; =0x0000051C + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + cmp r0, #0 + beq _022413C6 + mov r1, #6 + sub r1, r1, r7 + bl sub_0200D474 +_022413C6: + ldr r1, [sp, #0x14] + ldr r0, _0224140C ; =0x00000514 + add r7, r7, #1 + ldr r0, [r1, r0] + add r6, r6, #4 + add r2, r0, #1 + ldr r0, _0224140C ; =0x00000514 + add r4, r4, #4 + add r5, #8 + str r2, [r1, r0] + cmp r7, #6 + blt _0224138E +_022413DE: + ldr r0, [sp, #0x10] + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r0, #0x30 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #5 + bge _022413F6 + b _022412C6 +_022413F6: + ldr r0, [sp, #8] + bl ov62_02241204 + add sp, #0x80 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241400: .word 0x022492F0 +_02241404: .word 0x000004A4 +_02241408: .word 0x00002608 +_0224140C: .word 0x00000514 +_02241410: .word 0x0000050C +_02241414: .word 0x00000518 +_02241418: .word 0x0000051C + thumb_func_end ov62_02241278 + + thumb_func_start ov62_0224141C +ov62_0224141C: ; 0x0224141C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + mov r1, #0 + str r1, [sp, #4] + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + ldr r7, _0224145C ; =0x0000051C + str r0, [sp] +_02241430: + ldr r5, [sp] + mov r4, #0 +_02241434: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02241440 + add r1, r6, #0 + bl sub_0200D3F4 +_02241440: + add r4, r4, #1 + add r5, #8 + cmp r4, #6 + blt _02241434 + ldr r0, [sp] + add r0, #0x30 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _02241430 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224145C: .word 0x0000051C + thumb_func_end ov62_0224141C + + thumb_func_start ov62_02241460 +ov62_02241460: ; 0x02241460 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r1, #0x86 + add r6, r0, #0 + lsl r1, r1, #4 + ldr r1, [r6, r1] + str r1, [sp] + mov r1, #1 + bl ov62_02234540 + mov r0, #0 + str r0, [sp, #4] + add r7, r0, #0 +_0224147A: + ldr r5, [sp] + mov r4, #0 +_0224147E: + ldr r0, _022414B8 ; =0x0000051C + ldr r2, [r5, r0] + cmp r2, #0 + beq _02241494 + ldr r1, _022414BC ; =0x00000518 + add r0, r6, #0 + ldr r1, [r5, r1] + bl ov62_02233B24 + ldr r0, _022414B8 ; =0x0000051C + str r7, [r5, r0] +_02241494: + add r4, r4, #1 + add r5, #8 + cmp r4, #6 + blt _0224147E + ldr r0, [sp] + add r0, #0x30 + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #5 + blt _0224147A + add r0, r6, #0 + mov r1, #0 + bl ov62_02234540 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022414B8: .word 0x0000051C +_022414BC: .word 0x00000518 + thumb_func_end ov62_02241460 + + thumb_func_start ov62_022414C0 +ov62_022414C0: ; 0x022414C0 + push {r4, r5, r6, r7, lr} + sub sp, #0xa4 + mov r1, #0 + str r1, [sp, #0x20] + ldr r2, [sp, #0x20] + add r1, sp, #0x8c + str r2, [r1, #0] + str r2, [r1, #4] + str r2, [r1, #8] + str r2, [r1, #0xc] + str r2, [r1, #0x10] + str r2, [r1, #0x14] + mov r2, #0x86 + lsl r2, r2, #4 + add r1, r0, #0 + ldr r1, [r1, r2] + mov r2, #0x51 + lsl r2, r2, #4 + ldr r3, [r1, r2] + str r1, [sp, #0x1c] + sub r2, #0x6c + add r1, r0, #0 + ldrsh r1, [r1, r2] + str r0, [sp, #8] + cmp r3, r1 + bne _022414F6 + b _02241758 +_022414F6: + mov r1, #1 + bl ov62_02234540 + mov r1, #0x51 + ldr r0, [sp, #0x1c] + lsl r1, r1, #4 + ldr r2, [r0, r1] + ldr r0, [sp, #8] + sub r1, #0x6c + ldrsh r0, [r0, r1] + cmp r2, r0 + ble _02241512 + mov r0, #4 + str r0, [sp, #0x20] +_02241512: + ldr r0, [sp, #0x20] + mov r1, #0x30 + mul r1, r0 + ldr r0, [sp, #0x1c] + mov r6, #0 + add r4, r0, r1 + add r5, sp, #0x8c + add r7, r6, #0 +_02241522: + ldr r0, _0224175C ; =0x0000051C + ldr r2, [r4, r0] + cmp r2, #0 + beq _0224153E + ldr r1, _02241760 ; =0x00000518 + ldr r0, [sp, #8] + ldr r1, [r4, r1] + bl ov62_02233B40 + ldr r0, _02241760 ; =0x00000518 + ldr r0, [r4, r0] + str r0, [r5, #0] + ldr r0, _0224175C ; =0x0000051C + str r7, [r4, r0] +_0224153E: + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #6 + blt _02241522 + ldr r0, [sp, #0x20] + cmp r0, #0 + beq _02241588 + ldr r2, _02241764 ; =0x000004EC + ldr r7, [sp, #0x1c] + mov r0, #4 + add r3, r2, #0 + add r5, r2, #0 + str r0, [sp, #0xc] + add r7, #0xc0 + add r3, #0x30 + sub r4, r2, #4 + add r5, #0x2c +_02241562: + mov r0, #0 + add r1, r7, #0 +_02241566: + ldr r6, [r1, r2] + add r0, r0, #1 + str r6, [r1, r3] + ldr r6, [r1, r4] + str r6, [r1, r5] + add r1, #8 + cmp r0, #6 + blt _02241566 + ldr r0, [sp, #0xc] + sub r7, #0x30 + sub r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #1 + bge _02241562 + mov r0, #0 + str r0, [sp, #0x10] + b _022415C0 +_02241588: + ldr r6, _0224175C ; =0x0000051C + ldr r7, [sp, #0x1c] + mov r0, #1 + add r2, r6, #0 + add r4, r6, #0 + mov ip, r0 + add r7, #0x30 + sub r2, #0x30 + sub r3, r6, #4 + sub r4, #0x34 +_0224159C: + mov r1, #0 + add r0, r7, #0 +_022415A0: + ldr r5, [r0, r6] + add r1, r1, #1 + str r5, [r0, r2] + ldr r5, [r0, r3] + str r5, [r0, r4] + add r0, #8 + cmp r1, #6 + blt _022415A0 + mov r0, ip + add r0, r0, #1 + add r7, #0x30 + mov ip, r0 + cmp r0, #5 + blt _0224159C + mov r0, #4 + str r0, [sp, #0x10] +_022415C0: + ldr r1, _02241768 ; =0x000004A4 + ldr r0, [sp, #8] + ldr r5, _0224176C ; =0x02249320 + ldrsh r1, [r0, r1] + ldr r0, [sp, #0x10] + add r4, sp, #0x5c + add r2, r1, r0 + mov r3, #6 +_022415D0: + ldmia r5!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _022415D0 + add r0, sp, #0x44 + mov r4, #0 + str r4, [r0, #0] + str r4, [r0, #4] + str r4, [r0, #8] + str r4, [r0, #0xc] + str r4, [r0, #0x10] + str r4, [r0, #0x14] + add r0, sp, #0x2c + str r4, [r0, #0] + str r4, [r0, #4] + str r4, [r0, #8] + str r4, [r0, #0xc] + str r4, [r0, #0x10] + str r4, [r0, #0x14] + lsl r0, r2, #2 + str r0, [sp, #0x14] + ldr r1, _02241770 ; =0x00002608 + ldr r0, [sp, #8] + add r1, r0, r1 + ldr r0, [sp, #0x14] + str r1, [sp, #0x24] + ldr r0, [r1, r0] + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _02241612 + mov r4, #1 +_02241612: + mov r0, #0 + str r0, [sp, #0x18] + add r1, sp, #0x44 + add r2, sp, #0x2c + add r6, r0, #0 +_0224161C: + stmia r1!, {r6} + add r0, r0, #1 + stmia r2!, {r6} + cmp r0, #6 + blt _0224161C + mov r0, #0x18 + mul r0, r4 + add r1, sp, #0x5c + add r2, r1, r0 + str r0, [sp, #0x28] + ldr r1, [sp, #8] + ldr r0, [sp, #0x14] + add r3, sp, #0x44 + add r5, sp, #0x2c + add r4, r1, r0 +_0224163A: + ldr r0, _02241770 ; =0x00002608 + ldr r7, [r2, #0] + ldr r1, [r4, r0] + lsl r0, r7, #1 + add r0, r1, r0 + add r0, #0x80 + ldrh r0, [r0] + cmp r0, #0 + beq _02241660 + stmia r3!, {r0} + ldr r0, _02241770 ; =0x00002608 + ldr r0, [r4, r0] + add r0, r0, r7 + add r0, #0x98 + ldrb r0, [r0] + stmia r5!, {r0} + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] +_02241660: + add r6, r6, #1 + add r2, r2, #4 + cmp r6, #3 + blt _0224163A + ldr r1, [sp, #0x24] + ldr r0, [sp, #0x14] + ldr r0, [r1, r0] + add r0, #0x80 + bl ov62_02233F94 + cmp r0, #0 + beq _0224167C + mov r0, #3 + str r0, [sp, #0x18] +_0224167C: + ldr r0, [sp, #0x28] + add r1, sp, #0x5c + add r2, r1, r0 + ldr r0, [sp, #0x18] + mov r6, #3 + lsl r1, r0, #2 + add r0, sp, #0x44 + add r3, r0, r1 + add r0, sp, #0x2c + add r2, #0xc + add r5, r0, r1 +_02241692: + ldr r0, _02241770 ; =0x00002608 + ldr r7, [r2, #0] + ldr r1, [r4, r0] + lsl r0, r7, #1 + add r0, r1, r0 + add r0, #0x80 + ldrh r0, [r0] + cmp r0, #0 + beq _022416B8 + stmia r3!, {r0} + ldr r0, _02241770 ; =0x00002608 + ldr r0, [r4, r0] + add r0, r0, r7 + add r0, #0x98 + ldrb r0, [r0] + stmia r5!, {r0} + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] +_022416B8: + add r6, r6, #1 + add r2, r2, #4 + cmp r6, #6 + blt _02241692 + ldr r0, [sp, #0x10] + mov r1, #0x30 + mul r1, r0 + ldr r0, [sp, #0x1c] + mov r5, #0 + add r7, sp, #0x44 + add r6, sp, #0x2c + add r4, r0, r1 +_022416D0: + ldr r2, [sp, #0x1c] + ldr r1, _02241774 ; =0x00000514 + ldr r3, [r7, #0] + ldr r2, [r2, r1] + ldr r0, [r6, #0] + add r1, r1, #4 + str r2, [r4, r1] + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + ldr r1, _02241778 ; =0x0000050C + ldr r0, [sp, #8] + ldr r1, [r2, r1] + ldr r2, _02241760 ; =0x00000518 + ldr r2, [r4, r2] + bl ov62_02233A7C + ldr r1, _0224175C ; =0x0000051C + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02241708 + mov r1, #6 + sub r1, r1, r5 + bl sub_0200D474 +_02241708: + ldr r1, [sp, #0x1c] + ldr r0, _02241774 ; =0x00000514 + add r5, r5, #1 + ldr r0, [r1, r0] + add r7, r7, #4 + add r2, r0, #1 + ldr r0, _02241774 ; =0x00000514 + add r6, r6, #4 + add r4, #8 + str r2, [r1, r0] + cmp r5, #6 + blt _022416D0 + ldr r0, [sp, #8] + bl ov62_02241204 + ldr r1, _02241768 ; =0x000004A4 + ldr r0, [sp, #8] + ldr r6, _0224177C ; =0x000186A0 + ldrsh r2, [r0, r1] + ldr r0, [sp, #0x1c] + add r1, #0x6c + str r2, [r0, r1] + mov r5, #0 + add r4, sp, #0x8c +_02241738: + ldr r1, [r4, #0] + cmp r1, #0 + beq _02241748 + ldr r0, [sp, #8] + add r1, r1, r6 + ldr r0, [r0, #0x1c] + bl sub_0200D070 +_02241748: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #6 + blt _02241738 + ldr r0, [sp, #8] + mov r1, #0 + bl ov62_02234540 +_02241758: + add sp, #0xa4 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224175C: .word 0x0000051C +_02241760: .word 0x00000518 +_02241764: .word 0x000004EC +_02241768: .word 0x000004A4 +_0224176C: .word 0x02249320 +_02241770: .word 0x00002608 +_02241774: .word 0x00000514 +_02241778: .word 0x0000050C +_0224177C: .word 0x000186A0 + thumb_func_end ov62_022414C0 + + thumb_func_start ov62_02241780 +ov62_02241780: ; 0x02241780 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r0, [r0, r1] + mov r2, #0x13 + lsl r2, r2, #6 + ldrh r3, [r0, r2] + ldr r1, _022417BC ; =0x0000FFFF + cmp r3, r1 + beq _02241796 + mov r0, #1 + bx lr +_02241796: + add r1, r2, #2 + ldrb r1, [r0, r1] + cmp r1, #0xff + beq _022417A2 + mov r0, #1 + bx lr +_022417A2: + add r1, r2, #3 + ldrb r1, [r0, r1] + cmp r1, #0xff + bne _022417B2 + add r1, r2, #4 + ldrb r0, [r0, r1] + cmp r0, #0xff + beq _022417B6 +_022417B2: + mov r0, #1 + bx lr +_022417B6: + mov r0, #0 + bx lr + nop +_022417BC: .word 0x0000FFFF + thumb_func_end ov62_02241780 + + thumb_func_start ov62_022417C0 +ov62_022417C0: ; 0x022417C0 + push {r4, r5, r6, r7, lr} + sub sp, #0x9c + add r3, r1, #0 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r0, [r0, r1] + ldr r6, _022418C8 ; =0x022493D0 + str r0, [sp, #0x20] + add r4, sp, #0x3c + mov r2, #0xc +_022417D6: + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + sub r2, r2, #1 + bne _022417D6 + ldr r6, _022418CC ; =0x022491D8 + add r4, sp, #0x24 + add r2, r4, #0 + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + cmp r3, #0 + beq _022417F8 + cmp r3, #1 + b _02241804 +_022417F8: + ldr r1, _022418D0 ; =0x00000794 + ldr r0, [sp, #0x20] + mov r3, #6 + str r3, [r0, r1] + add r5, sp, #0x3c + str r2, [sp, #0x18] +_02241804: + mov r0, #0 + str r0, [sp, #0x1c] + ldr r1, _022418D0 ; =0x00000794 + ldr r0, [sp, #0x20] + mov r7, #1 + ldr r0, [r0, r1] + lsl r7, r7, #8 + cmp r0, #0 + ble _022418C4 + ldr r1, _022418D4 ; =0x00000614 + ldr r0, [sp, #0x20] + add r4, r0, r1 +_0224181C: + add r0, r4, #0 + bl sub_0201A7A0 + ldr r0, [r5, #4] + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r5, #8] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r5, #0] + ldr r0, [r0, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [r0, #0x48] + ldr r1, [r1, #0] + bl sub_0200B1EC + add r6, r0, #0 + ldr r1, [r5, #8] + ldr r0, [r5, #0xc] + mul r0, r1 + add r7, r7, r0 + mov r0, #0 + beq _02241880 + add r0, r4, #0 + add r1, r6, #0 + bl ov62_0223429C +_02241880: + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022418D8 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x20] + add r0, r0, #4 + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + add r4, #0x10 + add r0, r0, #1 + str r0, [sp, #0x1c] + ldr r0, _022418D0 ; =0x00000794 + add r5, #0x10 + ldr r1, [r1, r0] + ldr r0, [sp, #0x1c] + cmp r0, r1 + blt _0224181C +_022418C4: + add sp, #0x9c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022418C8: .word 0x022493D0 +_022418CC: .word 0x022491D8 +_022418D0: .word 0x00000794 +_022418D4: .word 0x00000614 +_022418D8: .word 0x000F0D00 + thumb_func_end ov62_022417C0 + + thumb_func_start ov62_022418DC +ov62_022418DC: ; 0x022418DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r6, [r5, r0] + ldr r7, _0224194C ; =0x00000644 + add r4, r1, #0 + add r0, r6, r7 + mov r1, #0 + bl sub_0201ADA4 + cmp r4, #0xff + bne _02241904 + ldr r0, [r5, #0x48] + mov r1, #0x7d + bl sub_0200B1EC + add r4, r0, #0 + b _02241924 +_02241904: + add r0, r4, #0 + sub r0, #0xfa + cmp r0, #3 + ldr r0, [r5, #0x48] + bhi _0224191A + sub r4, #0x55 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + b _02241924 +_0224191A: + add r4, #0x84 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 +_02241924: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02241950 ; =0x000F0D00 + add r2, r4, #0 + str r0, [sp, #8] + add r0, r6, r7 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, r7 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224194C: .word 0x00000644 +_02241950: .word 0x000F0D00 + thumb_func_end ov62_022418DC + + thumb_func_start ov62_02241954 +ov62_02241954: ; 0x02241954 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x1fc + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r7, _022419C8 ; =0x00000654 + add r6, r1, #0 + add r0, r4, r7 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _022419CC ; =0x0000FFFF + cmp r6, r0 + bne _02241980 + ldr r0, [r5, #0x48] + mov r1, #0x7d + bl sub_0200B1EC + add r5, r0, #0 + b _0224199C +_02241980: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0x66 + add r2, sp, #0x10 + bl sub_0200B274 + add r0, r5, #0 + add r1, sp, #0x10 + bl sub_02023D28 +_0224199C: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022419D0 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r7 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, r7 + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + add sp, #0x1fc + add sp, #0x14 + pop {r3, r4, r5, r6, r7, pc} + nop +_022419C8: .word 0x00000654 +_022419CC: .word 0x0000FFFF +_022419D0: .word 0x000F0D00 + thumb_func_end ov62_02241954 + + thumb_func_start ov62_022419D4 +ov62_022419D4: ; 0x022419D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r7, [r5, r0] + ldr r0, _02241A9C ; =0x00000664 + str r1, [sp, #0x10] + add r0, r7, r0 + mov r1, #0 + add r4, r2, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x10] + cmp r0, #0xff + bne _02241A04 + cmp r4, #0xff + bne _02241A04 + ldr r0, [r5, #0x48] + mov r1, #0x7d + bl sub_0200B1EC + str r0, [sp, #0x14] + b _02241A70 +_02241A04: + mov r0, #0x66 + bl ov62_02231690 + add r6, r0, #0 + cmp r4, #0 + beq _02241A3C + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x14] + ldr r0, [r5, #0x48] + mov r1, #0x17 + bl sub_0200B1EC + add r5, r0, #0 + ldr r2, [sp, #0x10] + add r0, r6, #0 + mov r1, #0 + add r3, r4, #0 + bl sub_0200BE08 + ldr r1, [sp, #0x14] + add r0, r6, #0 + add r2, r5, #0 + bl sub_0200C388 + b _02241A64 +_02241A3C: + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x14] + ldr r0, [r5, #0x48] + mov r1, #0x16 + bl sub_0200B1EC + add r5, r0, #0 + ldr r2, [sp, #0x10] + add r0, r6, #0 + mov r1, #0 + bl sub_0200BDD0 + ldr r1, [sp, #0x14] + add r0, r6, #0 + add r2, r5, #0 + bl sub_0200C388 +_02241A64: + add r0, r5, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 +_02241A70: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02241AA0 ; =0x000F0D00 + ldr r2, [sp, #0x14] + str r0, [sp, #8] + ldr r0, _02241A9C ; =0x00000664 + add r3, r1, #0 + add r0, r7, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _02241A9C ; =0x00000664 + add r0, r7, r0 + bl sub_0201A9A4 + ldr r0, [sp, #0x14] + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241A9C: .word 0x00000664 +_02241AA0: .word 0x000F0D00 + thumb_func_end ov62_022419D4 + + thumb_func_start ov62_02241AA4 +ov62_02241AA4: ; 0x02241AA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r3, r1, #0 + mov r1, #0x86 + lsl r1, r1, #4 + str r0, [sp, #0x14] + ldr r0, [r0, r1] + ldr r6, _02241BA8 ; =0x02249350 + str r0, [sp, #0x20] + add r4, sp, #0x30 + mov r2, #6 +_02241ABA: + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + sub r2, r2, #1 + bne _02241ABA + ldr r6, _02241BAC ; =0x02249144 + add r4, sp, #0x24 + ldmia r6!, {r0, r1} + add r2, r4, #0 + stmia r4!, {r0, r1} + ldr r0, [r6, #0] + cmp r3, #0 + str r0, [r4, #0] + beq _02241AD8 + cmp r3, #1 + b _02241AE4 +_02241AD8: + ldr r1, _02241BB0 ; =0x00000798 + ldr r0, [sp, #0x20] + mov r3, #3 + str r3, [r0, r1] + add r5, sp, #0x30 + str r2, [sp, #0x18] +_02241AE4: + mov r0, #0 + str r0, [sp, #0x1c] + ldr r1, _02241BB0 ; =0x00000798 + ldr r0, [sp, #0x20] + mov r7, #1 + ldr r0, [r0, r1] + lsl r7, r7, #8 + cmp r0, #0 + ble _02241BA4 + ldr r0, [sp, #0x20] + sub r1, #0xc4 + add r4, r0, r1 +_02241AFC: + add r0, r4, #0 + bl sub_0201A7A0 + ldr r0, [r5, #4] + add r1, r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r5, #8] + mov r2, #6 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r5, #0] + ldr r0, [r0, #0x24] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + ldr r0, [r0, #0x48] + ldr r1, [r1, #0] + bl sub_0200B1EC + add r6, r0, #0 + ldr r1, [r5, #8] + ldr r0, [r5, #0xc] + mul r0, r1 + add r7, r7, r0 + mov r0, #0 + beq _02241B60 + add r0, r4, #0 + add r1, r6, #0 + bl ov62_0223429C +_02241B60: + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02241BB4 ; =0x000F0D00 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x20] + add r0, r0, #4 + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + add r4, #0x10 + add r0, r0, #1 + str r0, [sp, #0x1c] + ldr r0, _02241BB0 ; =0x00000798 + add r5, #0x10 + ldr r1, [r1, r0] + ldr r0, [sp, #0x1c] + cmp r0, r1 + blt _02241AFC +_02241BA4: + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241BA8: .word 0x02249350 +_02241BAC: .word 0x02249144 +_02241BB0: .word 0x00000798 +_02241BB4: .word 0x000F0D00 + thumb_func_end ov62_02241AA4 + + thumb_func_start ov62_02241BB8 +ov62_02241BB8: ; 0x02241BB8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r6, [r0, r1] + sub r1, #0xcc + ldr r0, [r6, r1] + mov r4, #0 + cmp r0, #0 + ble _02241BE6 + ldr r0, _02241BF0 ; =0x00000614 + ldr r7, _02241BF4 ; =0x00000794 + add r5, r6, r0 +_02241BD0: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + ldr r0, [r6, r7] + add r4, r4, #1 + add r5, #0x10 + cmp r4, r0 + blt _02241BD0 +_02241BE6: + ldr r0, _02241BF4 ; =0x00000794 + mov r1, #0 + str r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_02241BF0: .word 0x00000614 +_02241BF4: .word 0x00000794 + thumb_func_end ov62_02241BB8 + + thumb_func_start ov62_02241BF8 +ov62_02241BF8: ; 0x02241BF8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r6, [r0, r1] + sub r1, #0xc8 + ldr r0, [r6, r1] + mov r4, #0 + cmp r0, #0 + ble _02241C28 + ldr r0, _02241C30 ; =0x000006D4 + add r7, r0, #0 + add r5, r6, r0 + add r7, #0xc4 +_02241C12: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + ldr r0, [r6, r7] + add r4, r4, #1 + add r5, #0x10 + cmp r4, r0 + blt _02241C12 +_02241C28: + ldr r0, _02241C34 ; =0x00000798 + mov r1, #0 + str r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241C30: .word 0x000006D4 +_02241C34: .word 0x00000798 + thumb_func_end ov62_02241BF8 + + thumb_func_start ov62_02241C38 +ov62_02241C38: ; 0x02241C38 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r6, _02241D18 ; =0x00000614 + add r0, r4, r6 + bl sub_0201A7A0 + mov r3, #3 + str r3, [sp] + mov r0, #0x14 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x20 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r2, #2 + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x7e + bl sub_0200B1EC + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02241D1C ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, r6 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + add r6, #0xc0 + add r0, r4, r6 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + add r0, #0xf2 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r3, #0xb + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x5f + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #0x50 + sub r0, r1, r0 + mov r1, #0 + lsr r3, r0, #1 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02241D1C ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, r6 + bl sub_0201A9A4 + add r0, r5, #0 + bl sub_020237BC + ldr r0, _02241D20 ; =0x00000798 + mov r1, #1 + str r1, [r4, r0] + sub r0, r0, #4 + str r1, [r4, r0] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241D18: .word 0x00000614 +_02241D1C: .word 0x000F0D00 +_02241D20: .word 0x00000798 + thumb_func_end ov62_02241C38 + + thumb_func_start ov62_02241D24 +ov62_02241D24: ; 0x02241D24 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02241D3C + cmp r1, #1 + beq _02241DE6 + b _02241E7E +_02241D3C: + bl ov62_02234314 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r5, #0 + mov r1, #0x38 + mov r2, #3 + bl ov62_022343B8 + add r0, r5, #0 + mov r1, #0x3b + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + add r0, r5, #0 + bl ov62_02245C64 + add r0, r5, #0 + mov r1, #0 + bl ov62_02245C08 + mov r1, #0x7d + ldr r0, _02241E8C ; =0x00000514 + lsl r1, r1, #2 + str r1, [r4, r0] + mov r0, #0x66 + str r0, [sp] + ldr r0, _02241E90 ; =0x022491AC + ldr r2, _02241E94 ; =ov62_022458A0 + mov r1, #5 + add r3, r5, #0 + bl sub_02023FCC + ldr r1, _02241E98 ; =0x00000608 + ldr r2, _02241E9C ; =ov62_02245968 + str r0, [r4, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _02241EA0 ; =0x022491F0 + mov r1, #9 + add r3, r5, #0 + bl sub_02023FCC + ldr r1, _02241EA4 ; =0x0000060C + add r5, #8 + str r0, [r4, r1] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _02241E84 +_02241DE6: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02241E64 + add r0, r5, #0 + mov r1, #0x7c + bl ov62_02231AAC + add r0, r5, #0 + mov r1, #0 + bl ov62_022417C0 + add r0, r5, #0 + mov r1, #0 + bl ov62_02241AA4 + mov r1, #0x13 + ldr r0, _02241EA8 ; =0x0000FFFF + lsl r1, r1, #6 + strh r0, [r4, r1] + mov r2, #0xff + add r0, r1, #2 + strb r2, [r4, r0] + add r0, r1, #3 + strb r2, [r4, r0] + add r0, r1, #4 + strb r2, [r4, r0] + ldrh r1, [r4, r1] + add r0, r5, #0 + bl ov62_02241954 + ldr r1, _02241EAC ; =0x000004C2 + add r0, r5, #0 + ldrb r1, [r4, r1] + bl ov62_022418DC + ldr r2, _02241EB0 ; =0x000004C3 + add r0, r5, #0 + ldrb r1, [r4, r2] + add r2, r2, #1 + ldrb r2, [r4, r2] + bl ov62_022419D4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02241E64: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02241E84 +_02241E7E: + mov r1, #3 + bl ov62_0222FB60 +_02241E84: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02241E8C: .word 0x00000514 +_02241E90: .word 0x022491AC +_02241E94: .word ov62_022458A0 +_02241E98: .word 0x00000608 +_02241E9C: .word ov62_02245968 +_02241EA0: .word 0x022491F0 +_02241EA4: .word 0x0000060C +_02241EA8: .word 0x0000FFFF +_02241EAC: .word 0x000004C2 +_02241EB0: .word 0x000004C3 + thumb_func_end ov62_02241D24 + + thumb_func_start ov62_02241EB4 +ov62_02241EB4: ; 0x02241EB4 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _02241EC8 ; =0x00000608 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02241EC8: .word 0x00000608 + thumb_func_end ov62_02241EB4 + + thumb_func_start ov62_02241ECC +ov62_02241ECC: ; 0x02241ECC + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02241EE6 + cmp r1, #1 + beq _02241F0E + cmp r1, #2 + beq _02241F48 + b _02241F72 +_02241EE6: + bl ov62_02241BB8 + add r0, r5, #0 + bl ov62_02241BF8 + add r0, r5, #0 + bl ov62_02231B8C + ldr r0, _0224201C ; =0x00000608 + ldr r0, [r4, r0] + bl sub_02024034 + ldr r0, _02242020 ; =0x0000060C + ldr r0, [r4, r0] + bl sub_02024034 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02242016 +_02241F0E: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02241F2E + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02241F2E: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242016 +_02241F48: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02245D50 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02242016 +_02241F72: + bl ov62_02233790 + cmp r0, #0 + beq _02242016 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02241FE6 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + bl sub_020181C4 + b _02242016 +_02241FE6: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_02242016: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0224201C: .word 0x00000608 +_02242020: .word 0x0000060C + thumb_func_end ov62_02241ECC + + thumb_func_start ov62_02242024 +ov62_02242024: ; 0x02242024 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0224203A + cmp r1, #1 + beq _02242044 + b _0224207E +_0224203A: + bl ov62_02241BF8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02242044: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242064 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02242064: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022420A6 +_0224207E: + ldr r1, _022420AC ; =0x000004C5 + ldrb r1, [r4, r1] + cmp r1, #0 + beq _02242090 + cmp r1, #1 + beq _02242098 + cmp r1, #2 + beq _022420A0 + b _022420A6 +_02242090: + mov r1, #6 + bl ov62_0222FB60 + b _022420A6 +_02242098: + mov r1, #7 + bl ov62_0222FB60 + b _022420A6 +_022420A0: + mov r1, #0xa + bl ov62_0222FB60 +_022420A6: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022420AC: .word 0x000004C5 + thumb_func_end ov62_02242024 + + thumb_func_start ov62_022420B0 +ov62_022420B0: ; 0x022420B0 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #4 + bls _022420C2 + b _02242258 +_022420C2: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022420CE: ; jump table + .short _022420D8 - _022420CE - 2 ; case 0 + .short _02242106 - _022420CE - 2 ; case 1 + .short _0224219C - _022420CE - 2 ; case 2 + .short _022421E6 - _022420CE - 2 ; case 3 + .short _02242216 - _022420CE - 2 ; case 4 +_022420D8: + mov r1, #0x71 + bl ov62_02231B3C + ldr r1, _02242264 ; =0x000004C2 + mov r0, #0xff + strb r0, [r5, r1] + ldrb r1, [r5, r1] + add r0, r4, #0 + bl ov62_022418DC + add r0, r4, #0 + mov r1, #1 + bl ov62_02245C08 + add r0, r4, #0 + mov r1, #0x3d + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242260 +_02242106: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242182 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _02242268 ; =0x0000047C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022335B0 + ldr r0, _0224226C ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + add r0, r4, #0 + bl sub_0208BE68 + cmp r0, #1 + ldr r0, _0224226C ; =0x0000049C + bne _02242152 + ldr r2, _02242270 ; =0x0224926C + add r0, r4, r0 + add r1, r4, #0 + bl ov62_022324A0 + b _0224215C +_02242152: + ldr r2, _02242274 ; =0x02249240 + add r0, r4, r0 + add r1, r4, #0 + bl ov62_022324A0 +_0224215C: + ldr r1, _02242268 ; =0x0000047C + add r0, r4, r1 + add r1, #0x20 + add r1, r4, r1 + bl ov62_02233638 + ldr r0, _0224226C ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + mov r2, #2 + bl ov62_0223331C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02242182: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242260 +_0224219C: + ldr r0, _02242268 ; =0x0000047C + add r0, r4, r0 + bl ov62_02233664 + ldr r1, _0224226C ; =0x0000049C + add r0, r4, r1 + sub r1, #0x10 + ldrsh r1, [r4, r1] + bl ov62_022332AC + ldr r0, _0224226C ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_02232F68 + add r1, r0, #0 + beq _022421CE + ldr r0, _02242264 ; =0x000004C2 + strb r1, [r5, r0] + add r0, r4, #0 + bl ov62_022418DC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022421CE: + ldr r0, _02242278 ; =0x02249138 + bl sub_02022760 + cmp r0, #0 + beq _02242260 + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242260 +_022421E6: + ldr r0, _02242268 ; =0x0000047C + add r0, r4, r0 + bl ov62_02233600 + ldr r0, _0224226C ; =0x0000049C + add r0, r4, r0 + bl ov62_022332FC + ldr r0, _0224226C ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022334FC + ldr r0, _02242268 ; =0x0000047C + add r0, r4, r0 + bl ov62_022335F4 + ldr r0, _0224226C ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02242216: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0224223E + add r0, r4, #0 + mov r1, #0 + bl ov62_02245C08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224223E: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242260 +_02242258: + add r0, r4, #0 + mov r1, #0xb + bl ov62_0222FB60 +_02242260: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242264: .word 0x000004C2 +_02242268: .word 0x0000047C +_0224226C: .word 0x0000049C +_02242270: .word 0x0224926C +_02242274: .word 0x02249240 +_02242278: .word 0x02249138 + thumb_func_end ov62_022420B0 + + thumb_func_start ov62_0224227C +ov62_0224227C: ; 0x0224227C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + bne _022422B0 + mov r1, #0x72 + bl ov62_02231B3C + mov r1, #0x13 + ldr r0, _022422BC ; =0x0000FFFF + lsl r1, r1, #6 + strh r0, [r4, r1] + ldrh r1, [r4, r1] + add r0, r5, #0 + bl ov62_02241954 + add r0, r5, #0 + mov r1, #1 + bl ov62_02245C08 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_022422B0: + add r0, r5, #0 + mov r1, #8 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022422BC: .word 0x0000FFFF + thumb_func_end ov62_0224227C + + thumb_func_start ov62_022422C0 +ov62_022422C0: ; 0x022422C0 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + str r0, [sp, #0x14] + mov r0, #1 + str r0, [sp, #0x28] + mov r1, #0x86 + ldr r0, [sp, #0x14] + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _022423C8 ; =0x000006D4 + ldr r5, _022423CC ; =0x022491F0 + mov r7, #0 + add r4, r1, r0 +_022422DA: + ldrb r0, [r5, #2] + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #0x24] + ldrb r0, [r5] + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #0x20] + ldrb r0, [r5, #3] + lsr r1, r0, #3 + ldr r0, [sp, #0x24] + sub r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + ldrb r0, [r5, #1] + lsr r1, r0, #3 + ldr r0, [sp, #0x20] + sub r0, r1, r0 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + add r0, r4, #0 + bl sub_0201A7A0 + ldr r0, [sp, #0x20] + add r1, r4, #0 + str r0, [sp] + ldr r0, [sp, #0x1c] + mov r2, #6 + str r0, [sp, #4] + str r6, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [sp, #0x24] + ldr r0, [r0, #0x24] + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + add r1, r7, #0 + ldr r0, [r0, #0x48] + add r1, #0x44 + bl sub_0200B1EC + str r0, [sp, #0x2c] + ldr r1, [sp, #0x2c] + add r0, r4, #0 + bl ov62_0223429C + lsl r1, r6, #3 + sub r1, #0x10 + str r0, [sp, #0x30] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r1, r7, #0 + bl ov62_02242748 + cmp r0, #1 + bne _02242384 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x2c] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022423D0 ; =0x000F0D00 + ldr r3, [sp, #0x30] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0 + bl sub_0201D78C + b _022423A0 +_02242384: + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x2c] + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022423D4 ; =0x000C0B00 + ldr r3, [sp, #0x30] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0 + bl sub_0201D78C +_022423A0: + add r0, r4, #0 + bl sub_0201A9A4 + ldr r0, [sp, #0x2c] + bl sub_020237BC + ldr r0, [sp, #0x1c] + add r7, r7, #1 + add r1, r0, #0 + ldr r0, [sp, #0x28] + mul r1, r6 + add r0, r0, r1 + str r0, [sp, #0x28] + add r4, #0x10 + add r5, r5, #4 + cmp r7, #9 + blo _022422DA + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_022423C8: .word 0x000006D4 +_022423CC: .word 0x022491F0 +_022423D0: .word 0x000F0D00 +_022423D4: .word 0x000C0B00 + thumb_func_end ov62_022422C0 + + thumb_func_start ov62_022423D8 +ov62_022423D8: ; 0x022423D8 + push {r3, r4, r5, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _022423FC ; =0x000006D4 + mov r4, #0 + add r5, r1, r0 +_022423E6: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #9 + blo _022423E6 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022423FC: .word 0x000006D4 + thumb_func_end ov62_022423D8 + + thumb_func_start ov62_02242400 +ov62_02242400: ; 0x02242400 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #4 + bhi _0224250A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224241C: ; jump table + .short _02242426 - _0224241C - 2 ; case 0 + .short _02242436 - _0224241C - 2 ; case 1 + .short _02242476 - _0224241C - 2 ; case 2 + .short _0224249E - _0224241C - 2 ; case 3 + .short _022424A8 - _0224241C - 2 ; case 4 +_02242426: + mov r1, #0x3c + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242524 +_02242436: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0224245C + add r0, r4, #0 + bl ov62_022422C0 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224245C: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242524 +_02242476: + ldr r0, _02242528 ; =0x0000060C + ldr r0, [r5, r0] + bl sub_0202404C + ldr r0, _0224252C ; =0x02249138 + bl sub_02022760 + cmp r0, #0 + bne _02242490 + ldr r0, _02242530 ; =0x000004D8 + ldr r0, [r5, r0] + cmp r0, #1 + bne _02242524 +_02242490: + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242524 +_0224249E: + bl ov62_022423D8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022424A8: + ldr r0, _02242530 ; =0x000004D8 + ldr r0, [r5, r0] + cmp r0, #1 + bne _022424C8 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242524 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242524 +_022424C8: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _022424F0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02245C08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022424F0: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242524 +_0224250A: + ldr r0, _02242530 ; =0x000004D8 + ldr r0, [r5, r0] + cmp r0, #1 + bne _0224251C + add r0, r4, #0 + mov r1, #9 + bl ov62_0222FB60 + b _02242524 +_0224251C: + add r0, r4, #0 + mov r1, #0xb + bl ov62_0222FB60 +_02242524: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242528: .word 0x0000060C +_0224252C: .word 0x02249138 +_02242530: .word 0x000004D8 + thumb_func_end ov62_02242400 + + thumb_func_start ov62_02242534 +ov62_02242534: ; 0x02242534 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #4 + bls _02242548 + b _02242702 +_02242548: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242554: ; jump table + .short _0224255E - _02242554 - 2 ; case 0 + .short _0224257E - _02242554 - 2 ; case 1 + .short _02242618 - _02242554 - 2 ; case 2 + .short _0224266C - _02242554 - 2 ; case 3 + .short _0224269C - _02242554 - 2 ; case 4 +_0224255E: + mov r1, #0x72 + bl ov62_02231B3C + add r0, r4, #0 + mov r1, #1 + bl ov62_02245C08 + add r0, r4, #0 + mov r1, #0x3a + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242726 +_0224257E: + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + bne _02242590 + b _02242726 +_02242590: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _0224272C ; =0x0000047C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022335B0 + mov r0, #0x4e + lsl r0, r0, #4 + ldr r3, _02242730 ; =0x022492C4 + add r2, r5, r0 + mov r6, #5 +_022425AC: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _022425AC + ldr r0, [r3, #0] + ldr r1, _02242734 ; =0x000004DC + str r0, [r2, #0] + ldr r2, [r5, r1] + add r0, r1, #4 + str r2, [r5, r0] + add r0, r1, #0 + sub r0, #0x14 + ldr r2, [r5, r0] + add r0, r1, #0 + add r0, #8 + sub r1, #0x40 + str r2, [r5, r0] + add r0, r4, r1 + bl ov62_02233310 + ldr r3, _02242738 ; =0x0000049C + add r1, r4, #0 + add r2, r3, #0 + add r2, #0x38 + add r0, r4, r3 + add r3, #0x44 + ldr r2, [r5, r2] + add r3, r5, r3 + bl ov62_02232594 + ldr r1, _0224273C ; =0x000004E4 + mov r0, #0 + str r0, [r4, r1] + add r0, r1, #0 + sub r0, #0x68 + sub r1, #0x48 + add r0, r4, r0 + add r1, r4, r1 + bl ov62_02233638 + ldr r0, _02242738 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + mov r2, #2 + bl ov62_0223331C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242726 +_02242618: + ldr r0, _0224272C ; =0x0000047C + add r0, r4, r0 + bl ov62_02233664 + ldr r1, _02242738 ; =0x0000049C + add r0, r4, r1 + sub r1, #0x10 + ldrsh r1, [r4, r1] + bl ov62_022332AC + ldr r0, _02242738 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_02232F68 + add r1, r0, #0 + beq _0224264C + mov r0, #0x13 + lsl r0, r0, #6 + strh r1, [r5, r0] + add r0, r4, #0 + bl ov62_02241954 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224264C: + ldr r0, _02242740 ; =0x02249138 + bl sub_02022760 + cmp r0, #0 + beq _02242726 + mov r0, #0x13 + ldr r1, _02242744 ; =0x0000FFFF + lsl r0, r0, #6 + strh r1, [r5, r0] + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242726 +_0224266C: + ldr r0, _0224272C ; =0x0000047C + add r0, r4, r0 + bl ov62_02233600 + ldr r0, _02242738 ; =0x0000049C + add r0, r4, r0 + bl ov62_022332FC + ldr r0, _02242738 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022334FC + ldr r0, _0224272C ; =0x0000047C + add r0, r4, r0 + bl ov62_022335F4 + ldr r0, _02242738 ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224269C: + mov r0, #0x13 + lsl r0, r0, #6 + ldrh r1, [r5, r0] + ldr r0, _02242744 ; =0x0000FFFF + cmp r1, r0 + beq _022426EA + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _022426D0 + add r0, r4, #0 + mov r1, #0 + bl ov62_02245C08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022426D0: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242726 +_022426EA: + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242726 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242726 +_02242702: + add r0, r4, #0 + bl ov62_02242938 + mov r0, #0x13 + lsl r0, r0, #6 + ldrh r1, [r5, r0] + ldr r0, _02242744 ; =0x0000FFFF + cmp r1, r0 + beq _0224271E + add r0, r4, #0 + mov r1, #0xb + bl ov62_0222FB60 + b _02242726 +_0224271E: + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 +_02242726: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224272C: .word 0x0000047C +_02242730: .word 0x022492C4 +_02242734: .word 0x000004DC +_02242738: .word 0x0000049C +_0224273C: .word 0x000004E4 +_02242740: .word 0x02249138 +_02242744: .word 0x0000FFFF + thumb_func_end ov62_02242534 + + thumb_func_start ov62_02242748 +ov62_02242748: ; 0x02242748 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #8] + add r0, r1, #1 + ldr r2, _022427C8 ; =0x02249944 + lsl r0, r0, #1 + ldrh r4, [r2, r0] + lsl r0, r1, #1 + ldrh r6, [r2, r0] + ldr r1, [sp, #8] + mov r0, #0x66 + add r2, sp, #0xc + bl ov62_02231948 + str r0, [sp, #4] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02027560 + str r0, [sp] + add r7, r6, #0 + cmp r6, r4 + bge _0224279A + ldr r0, [sp, #4] + lsl r1, r6, #1 + add r5, r0, r1 +_02242782: + ldrh r1, [r5] + ldr r0, [sp] + bl sub_02026FE8 + cmp r0, #0 + bne _02242792 + ldr r0, _022427CC ; =0x0000FFFF + strh r0, [r5] +_02242792: + add r7, r7, #1 + add r5, r5, #2 + cmp r7, r4 + blt _02242782 +_0224279A: + cmp r6, r4 + bge _022427BA + ldr r0, [sp, #4] + lsl r1, r6, #1 + add r2, r0, r1 + ldr r0, _022427CC ; =0x0000FFFF +_022427A6: + ldrh r1, [r2] + cmp r1, r0 + beq _022427B2 + mov r0, #1 + str r0, [sp, #8] + b _022427BA +_022427B2: + add r6, r6, #1 + add r2, r2, #2 + cmp r6, r4 + blt _022427A6 +_022427BA: + ldr r0, [sp, #4] + bl sub_020181C4 + ldr r0, [sp, #8] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_022427C8: .word 0x02249944 +_022427CC: .word 0x0000FFFF + thumb_func_end ov62_02242748 + + thumb_func_start ov62_022427D0 +ov62_022427D0: ; 0x022427D0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r0, r1, #1 + ldr r2, _02242920 ; =0x02249944 + lsl r0, r0, #1 + ldrh r6, [r2, r0] + lsl r0, r1, #1 + ldrh r0, [r2, r0] + ldr r2, _02242924 ; =0x000004CC + mov r1, #0 + str r0, [sp] + mov r0, #0x66 + add r2, r4, r2 + bl ov62_02231948 + mov r2, #0x4d + lsl r2, r2, #4 + str r0, [r4, r2] + sub r2, r2, #4 + mov r0, #0x66 + mov r1, #0 + add r2, r4, r2 + bl ov62_02231948 + str r0, [sp, #8] + mov r0, #0x83 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02027560 + str r0, [sp, #4] + ldr r0, _02242928 ; =0x000004C8 + mov r1, #0 + ldr r7, [sp] + str r1, [r4, r0] + add r0, r7, #0 + cmp r0, r6 + bge _0224284E + lsl r1, r0, #1 + ldr r0, [sp, #8] + add r5, r0, r1 +_0224282A: + ldrh r1, [r5] + ldr r0, [sp, #4] + bl sub_02026FE8 + cmp r0, #0 + bne _0224283C + ldr r0, _0224292C ; =0x0000FFFF + strh r0, [r5] + b _02242846 +_0224283C: + ldr r0, _02242928 ; =0x000004C8 + ldr r0, [r4, r0] + add r1, r0, #1 + ldr r0, _02242928 ; =0x000004C8 + str r1, [r4, r0] +_02242846: + add r7, r7, #1 + add r5, r5, #2 + cmp r7, r6 + blt _0224282A +_0224284E: + ldr r1, [sp] + mov r0, #0 + cmp r1, r6 + bge _0224287E + lsl r2, r1, #1 + ldr r1, [sp, #8] + ldr r7, _0224292C ; =0x0000FFFF + add r2, r1, r2 + add r3, r0, #0 +_02242860: + ldrh r1, [r2] + cmp r1, r7 + beq _02242872 + mov r5, #0x4d + lsl r5, r5, #4 + ldr r5, [r4, r5] + add r0, r0, #1 + strh r1, [r5, r3] + add r3, r3, #2 +_02242872: + ldr r1, [sp] + add r2, r2, #2 + add r1, r1, #1 + str r1, [sp] + cmp r1, r6 + blt _02242860 +_0224287E: + ldr r1, _02242924 ; =0x000004CC + ldr r1, [r4, r1] + cmp r0, r1 + bge _022428A4 + mov r7, #0x4d + ldr r1, [sp, #8] + lsl r6, r0, #1 + lsl r7, r7, #4 + add r5, r1, r6 + sub r1, r7, #4 +_02242892: + ldrh r3, [r5] + ldr r2, [r4, r7] + add r0, r0, #1 + strh r3, [r2, r6] + ldr r2, [r4, r1] + add r5, r5, #2 + add r6, r6, #2 + cmp r0, r2 + blt _02242892 +_022428A4: + ldr r0, [sp, #8] + bl sub_020181C4 + ldr r1, _02242928 ; =0x000004C8 + mov r0, #0x66 + ldr r1, [r4, r1] + lsl r1, r1, #4 + bl sub_02018144 + ldr r2, _02242930 ; =0x000004DC + mov r1, #0 + str r0, [r4, r2] + ldr r0, [r4, r2] + sub r2, #0x14 + ldr r2, [r4, r2] + lsl r2, r2, #4 + bl sub_020C4CF4 + ldr r0, _02242928 ; =0x000004C8 + mov r5, #0 + ldr r0, [r4, r0] + cmp r0, #0 + ble _02242904 + ldr r7, _02242930 ; =0x000004DC + add r2, r5, #0 + add r0, r7, #0 + add r3, r5, #0 + sub r0, #0x14 +_022428DC: + mov r1, #0x4d + lsl r1, r1, #4 + ldr r1, [r4, r1] + ldr r6, _02242930 ; =0x000004DC + ldrh r1, [r1, r2] + ldr r6, [r4, r6] + add r5, r5, #1 + str r1, [r6, r3] + mov r1, #0x4d + lsl r1, r1, #4 + ldr r1, [r4, r1] + ldr r6, [r4, r7] + ldrh r1, [r1, r2] + add r6, r6, r3 + add r2, r2, #2 + str r1, [r6, #4] + ldr r1, [r4, r0] + add r3, #0x10 + cmp r5, r1 + blt _022428DC +_02242904: + mov r2, #0x67 + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x66 + bl sub_0200B144 + ldr r1, _02242934 ; =0x000004D4 + mov r2, #1 + str r0, [r4, r1] + add r0, r1, #4 + str r2, [r4, r0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242920: .word 0x02249944 +_02242924: .word 0x000004CC +_02242928: .word 0x000004C8 +_0224292C: .word 0x0000FFFF +_02242930: .word 0x000004DC +_02242934: .word 0x000004D4 + thumb_func_end ov62_022427D0 + + thumb_func_start ov62_02242938 +ov62_02242938: ; 0x02242938 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + ldr r0, _02242964 ; =0x000004D4 + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _02242968 ; =0x000004DC + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x4d + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r0, _0224296C ; =0x000004D8 + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + nop +_02242964: .word 0x000004D4 +_02242968: .word 0x000004DC +_0224296C: .word 0x000004D8 + thumb_func_end ov62_02242938 + + thumb_func_start ov62_02242970 +ov62_02242970: ; 0x02242970 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #4 + bls _02242982 + b _02242B0C +_02242982: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224298E: ; jump table + .short _02242998 - _0224298E - 2 ; case 0 + .short _022429CE - _0224298E - 2 ; case 1 + .short _02242A46 - _0224298E - 2 ; case 2 + .short _02242AAA - _0224298E - 2 ; case 3 + .short _02242ACA - _0224298E - 2 ; case 4 +_02242998: + mov r1, #0x73 + bl ov62_02231B3C + ldr r2, _02242B18 ; =0x000004C3 + mov r1, #0xff + strb r1, [r5, r2] + add r0, r2, #1 + strb r1, [r5, r0] + ldrb r1, [r5, r2] + add r2, r2, #1 + ldrb r2, [r5, r2] + add r0, r4, #0 + bl ov62_022419D4 + add r0, r4, #0 + mov r1, #1 + bl ov62_02245C08 + add r0, r4, #0 + mov r1, #0x39 + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242B14 +_022429CE: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242A2C + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _02242B1C ; =0x0000047C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022335B0 + ldr r0, _02242B20 ; =0x0000049C + ldr r2, _02242B24 ; =0x02249214 + add r0, r4, r0 + add r1, r4, #0 + bl ov62_022324A0 + ldr r1, _02242B1C ; =0x0000047C + add r0, r4, r1 + add r1, #0x20 + add r1, r4, r1 + bl ov62_02233638 + ldr r0, _02242B20 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + mov r2, #2 + bl ov62_0223331C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02242A2C: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242B14 +_02242A46: + ldr r0, _02242B1C ; =0x0000047C + add r0, r4, r0 + bl ov62_02233664 + ldr r1, _02242B20 ; =0x0000049C + add r0, r4, r1 + sub r1, #0x10 + ldrsh r1, [r4, r1] + bl ov62_022332AC + ldr r0, _02242B20 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_02232F68 + cmp r0, #0 + beq _02242A92 + ldr r0, _02242B28 ; =0x0000088C + ldr r0, [r4, r0] + bl sub_02030BFC + ldr r1, _02242B18 ; =0x000004C3 + strb r0, [r5, r1] + ldr r0, _02242B28 ; =0x0000088C + ldr r0, [r4, r0] + bl sub_02030C08 + ldr r2, _02242B2C ; =0x000004C4 + strb r0, [r5, r2] + sub r1, r2, #1 + ldrb r1, [r5, r1] + ldrb r2, [r5, r2] + add r0, r4, #0 + bl ov62_022419D4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02242A92: + ldr r0, _02242B30 ; =0x02249138 + bl sub_02022760 + cmp r0, #0 + beq _02242B14 + add r0, r4, #0 + bl ov62_02234520 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242B14 +_02242AAA: + ldr r0, _02242B1C ; =0x0000047C + add r0, r4, r0 + bl ov62_02233600 + ldr r0, _02242B20 ; =0x0000049C + add r0, r4, r0 + bl ov62_022332FC + ldr r0, _02242B20 ; =0x0000049C + add r1, r4, #0 + add r0, r4, r0 + bl ov62_022334FC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02242ACA: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242AF2 + add r0, r4, #0 + mov r1, #0 + bl ov62_02245C08 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02242AF2: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242B14 +_02242B0C: + add r0, r4, #0 + mov r1, #0xb + bl ov62_0222FB60 +_02242B14: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242B18: .word 0x000004C3 +_02242B1C: .word 0x0000047C +_02242B20: .word 0x0000049C +_02242B24: .word 0x02249214 +_02242B28: .word 0x0000088C +_02242B2C: .word 0x000004C4 +_02242B30: .word 0x02249138 + thumb_func_end ov62_02242970 + + thumb_func_start ov62_02242B34 +ov62_02242B34: ; 0x02242B34 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02242B4A + cmp r1, #1 + beq _02242B64 + b _02242BAE +_02242B4A: + mov r1, #0x38 + mov r2, #3 + bl ov62_022343B8 + add r0, r5, #0 + mov r1, #0x3b + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02242BB4 +_02242B64: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02242B94 + add r0, r5, #0 + mov r1, #0x7c + bl ov62_02231B3C + add r0, r5, #0 + mov r1, #0 + bl ov62_02241AA4 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02242B94: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242BB4 +_02242BAE: + mov r1, #3 + bl ov62_0222FB60 +_02242BB4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02242B34 + + thumb_func_start ov62_02242BB8 +ov62_02242BB8: ; 0x02242BB8 + push {r4, r5, r6, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _02242BD2 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_02242BD2: + ldr r0, [r4, #8] + cmp r0, #3 + bhi _02242CB6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02242BE4: ; jump table + .short _02242BEC - _02242BE4 - 2 ; case 0 + .short _02242C02 - _02242BE4 - 2 ; case 1 + .short _02242C42 - _02242BE4 - 2 ; case 2 + .short _02242C8C - _02242BE4 - 2 ; case 3 +_02242BEC: + add r0, r4, #0 + mov r1, #0x75 + bl ov62_02231B3C + ldr r0, _02242CE0 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242CD8 +_02242C02: + ldr r0, _02242CE4 ; =0x000004C2 + ldrb r6, [r5, r0] + cmp r6, #0xff + bne _02242C1A + add r0, r4, #0 + bl sub_0208BE68 + cmp r0, #1 + bne _02242C18 + mov r6, #0xff + b _02242C1A +_02242C18: + mov r6, #0xfe +_02242C1A: + add r0, r4, #0 + bl ov62_0224112C + ldr r3, _02242CE8 ; =0x000004C4 + lsl r2, r6, #0x18 + ldrb r1, [r5, r3] + lsr r2, r2, #0x18 + str r1, [sp] + sub r1, r3, #4 + sub r3, r3, #1 + ldrh r1, [r5, r1] + ldrb r3, [r5, r3] + bl ov61_0222B394 + cmp r0, #1 + bne _02242CD8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242CD8 +_02242C42: + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _02242CE0 ; =0x00000565 + bne _02242C76 + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #7 + bl ov62_022345B8 + ldr r0, _02242CEC ; =0x00004138 + mov r1, #0 + str r1, [r4, r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242CD8 +_02242C76: + mov r1, #0 + bl sub_020057A4 + mov r0, #0x51 + mov r1, #0x76 + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242CD8 +_02242C8C: + ldr r0, _02242CEC ; =0x00004138 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02242CA8 + mov r1, #0x51 + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + bl ov62_02231B3C + ldr r0, _02242CF0 ; =0x00000564 + bl sub_02005748 + b _02242CAE +_02242CA8: + ldr r0, _02242CF4 ; =0x0000055F + bl sub_02005748 +_02242CAE: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02242CD8 +_02242CB6: + ldr r0, _02242CF8 ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + ldr r0, _02242CEC ; =0x00004138 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02242CD0 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 + b _02242CD8 +_02242CD0: + add r0, r4, #0 + mov r1, #0xd + bl ov62_0222FB60 +_02242CD8: + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_02242CE0: .word 0x00000565 +_02242CE4: .word 0x000004C2 +_02242CE8: .word 0x000004C4 +_02242CEC: .word 0x00004138 +_02242CF0: .word 0x00000564 +_02242CF4: .word 0x0000055F +_02242CF8: .word 0x0000049C + thumb_func_end ov62_02242BB8 + + thumb_func_start ov62_02242CFC +ov62_02242CFC: ; 0x02242CFC + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02242D12 + cmp r1, #1 + beq _02242D3A + b _02242D7C +_02242D12: + bl ov62_02241BB8 + add r0, r5, #0 + bl ov62_02241BF8 + add r0, r5, #0 + bl ov62_02231B8C + ldr r0, _02242D88 ; =0x00000608 + ldr r0, [r4, r0] + bl sub_02024034 + ldr r0, _02242D8C ; =0x0000060C + ldr r0, [r4, r0] + bl sub_02024034 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02242D82 +_02242D3A: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02242D62 + add r0, r5, #0 + mov r1, #1 + bl ov62_02245C08 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02242D62: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242D82 +_02242D7C: + mov r1, #0xe + bl ov62_0222FB60 +_02242D82: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02242D88: .word 0x00000608 +_02242D8C: .word 0x0000060C + thumb_func_end ov62_02242CFC + + thumb_func_start ov62_02242D90 +ov62_02242D90: ; 0x02242D90 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02242DAA + cmp r1, #1 + bne _02242DA8 + b _02242EAC +_02242DA8: + b _02242F4C +_02242DAA: + bl sub_0202F250 + cmp r0, #0 + beq _02242DB6 + bl sub_0202F22C +_02242DB6: + mov r0, #0x4e + lsl r0, r0, #4 + ldr r3, _02242F58 ; =0x02249298 + add r2, r4, r0 + mov r6, #5 +_02242DC0: + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + sub r6, r6, #1 + bne _02242DC0 + ldr r0, [r3, #0] + mov r1, #0 + str r0, [r2, #0] + mov r0, #0x4e + lsl r0, r0, #4 + str r1, [r4, r0] + ldr r1, _02242F5C ; =0x00004138 + add r0, r0, #4 + ldr r1, [r5, r1] + str r1, [r4, r0] + add r0, r5, #0 + bl ov62_022339DC + mov r0, #0x66 + bl ov62_02233A68 + ldr r1, _02242F60 ; =0x0000050C + mov r2, #3 + str r0, [r4, r1] + add r0, r5, #0 + mov r1, #4 + bl ov62_022343B8 + mov r1, #7 + add r0, r5, #0 + add r2, r1, #0 + bl ov62_022343B8 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + add r0, r5, #0 + bl ov62_02241C38 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _02242F64 ; =0x0000047C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022335B0 + ldr r3, _02242F68 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r3 + add r3, #0x44 + mov r2, #0 + add r3, r4, r3 + bl ov62_02232594 + ldr r1, _02242F6C ; =0x000004E4 + mov r0, #1 + str r0, [r5, r1] + add r0, r1, #0 + sub r0, #0x68 + sub r1, #0x48 + add r0, r5, r0 + add r1, r5, r1 + bl ov62_02233638 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + ldr r0, _02242F68 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + mov r2, #1 + bl ov62_0223331C + ldr r0, _02242F68 ; =0x0000049C + mov r1, #0x40 + add r0, r5, r0 + mov r2, #0xb8 + bl ov62_02233434 + ldr r0, _02242F68 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_02233064 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02241278 + add r0, r5, #0 + mov r1, #0 + bl ov62_0224141C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02242F52 +_02242EAC: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02242F1A + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r5, #0 + mov r1, #1 + bl ov62_0224141C + ldr r3, _02242F70 ; =0x000004D8 + mov r1, #0x6f + ldr r6, [r5, r3] + mov r3, #0x18 + mul r3, r6 + lsl r1, r1, #4 + add r3, #0x4c + lsl r3, r3, #0x10 + ldr r1, [r5, r1] + add r0, r5, #0 + mov r2, #0x10 + asr r3, r3, #0x10 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0xc + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02242F1A: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02242F52 +_02242F4C: + mov r1, #0xf + bl ov62_0222FB60 +_02242F52: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02242F58: .word 0x02249298 +_02242F5C: .word 0x00004138 +_02242F60: .word 0x0000050C +_02242F64: .word 0x0000047C +_02242F68: .word 0x0000049C +_02242F6C: .word 0x000004E4 +_02242F70: .word 0x000004D8 + thumb_func_end ov62_02242D90 + + thumb_func_start ov62_02242F74 +ov62_02242F74: ; 0x02242F74 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02242F8E + cmp r1, #1 + beq _02243004 + cmp r1, #2 + beq _0224307C + b _02243108 +_02242F8E: + ldr r0, _02243114 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233664 + ldr r1, _02243118 ; =0x0000049C + add r0, r5, r1 + sub r1, #0x10 + ldrsh r1, [r5, r1] + bl ov62_022331C8 + ldr r0, _02243118 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_02233064 + ldr r2, _0224311C ; =0x000004D8 + mov r0, #0x6f + ldr r3, [r5, r2] + mov r2, #0x18 + mul r2, r3 + lsl r0, r0, #4 + add r2, #0x4c + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #0x10 + asr r2, r2, #0x10 + bl sub_0208B8EC + add r0, r5, #0 + bl ov62_022414C0 + ldr r0, _02243120 ; =0x02249134 + bl sub_02022760 + cmp r0, #0 + beq _02242FE6 + add r0, r5, #0 + bl ov62_02234520 + mov r0, #0x11 + str r0, [r4, #0xc] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02242FE6: + ldr r0, _02243124 ; =0x02249138 + bl sub_02022760 + cmp r0, #0 + bne _02242FF2 + b _0224310E +_02242FF2: + add r0, r5, #0 + bl ov62_02234520 + mov r0, #0x10 + str r0, [r4, #0xc] + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0224310E +_02243004: + ldr r0, _02243114 ; =0x0000047C + add r0, r5, r0 + bl ov62_02233600 + ldr r0, _02243118 ; =0x0000049C + add r0, r5, r0 + bl ov62_022332FC + ldr r0, _02243118 ; =0x0000049C + add r1, r5, #0 + add r0, r5, r0 + bl ov62_022334FC + ldr r0, _02243128 ; =0x0000050C + ldr r0, [r4, r0] + bl ov62_02233A74 + add r0, r5, #0 + bl ov62_02241460 + add r0, r5, #0 + bl ov62_02233A44 + add r0, r5, #0 + bl ov62_02241BB8 + add r0, r5, #0 + bl ov62_02241BF8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, [r4, #0xc] + cmp r0, #0x10 + bne _02243076 + ldr r0, _02243114 ; =0x0000047C + add r0, r5, r0 + bl ov62_022335F4 + ldr r0, _02243118 ; =0x0000049C + add r0, r5, r0 + bl ov62_02233310 + mov r0, #0x51 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] +_02243076: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0224307C: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022430D6 + add r0, r5, #0 + mov r1, #0 + bl ov62_02245C08 + ldr r0, [r4, #0xc] + cmp r0, #0x11 + bne _022430D0 + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x30] + mov r1, #3 + bl sub_0200D364 +_022430D0: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_022430D6: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224310E +_02243108: + ldr r1, [r4, #0xc] + bl ov62_0222FB60 +_0224310E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02243114: .word 0x0000047C +_02243118: .word 0x0000049C +_0224311C: .word 0x000004D8 +_02243120: .word 0x02249134 +_02243124: .word 0x02249138 +_02243128: .word 0x0000050C + thumb_func_end ov62_02242F74 + + thumb_func_start ov62_0224312C +ov62_0224312C: ; 0x0224312C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02243142 + cmp r1, #1 + beq _022431A4 + b _02243222 +_02243142: + mov r1, #0x38 + mov r2, #3 + bl ov62_022343B8 + add r0, r5, #0 + mov r1, #0x3b + mov r2, #7 + bl ov62_022343B8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02245C08 + mov r0, #0x66 + str r0, [sp] + ldr r0, _0224322C ; =0x022491AC + ldr r2, _02243230 ; =ov62_022458A0 + mov r1, #5 + add r3, r5, #0 + bl sub_02023FCC + ldr r1, _02243234 ; =0x00000608 + ldr r2, _02243238 ; =ov62_02245968 + str r0, [r4, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0224323C ; =0x022491F0 + mov r1, #9 + add r3, r5, #0 + bl sub_02023FCC + ldr r1, _02243240 ; =0x0000060C + str r0, [r4, r1] + add r0, r5, #0 + mov r1, #0 + bl ov62_02241AA4 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02243228 +_022431A4: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02243208 + add r0, r5, #0 + mov r1, #0x7c + bl ov62_02231AAC + add r0, r5, #0 + mov r1, #0 + bl ov62_022417C0 + mov r1, #0x13 + lsl r1, r1, #6 + ldrh r1, [r4, r1] + add r0, r5, #0 + bl ov62_02241954 + ldr r1, _02243244 ; =0x000004C2 + add r0, r5, #0 + ldrb r1, [r4, r1] + bl ov62_022418DC + ldr r2, _02243248 ; =0x000004C3 + add r0, r5, #0 + ldrb r1, [r4, r2] + add r2, r2, #1 + ldrb r2, [r4, r2] + bl ov62_022419D4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02243208: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02243228 +_02243222: + mov r1, #3 + bl ov62_0222FB60 +_02243228: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224322C: .word 0x022491AC +_02243230: .word ov62_022458A0 +_02243234: .word 0x00000608 +_02243238: .word ov62_02245968 +_0224323C: .word 0x022491F0 +_02243240: .word 0x0000060C +_02243244: .word 0x000004C2 +_02243248: .word 0x000004C3 + thumb_func_end ov62_0224312C + + thumb_func_start ov62_0224324C +ov62_0224324C: ; 0x0224324C + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _0224325E + b _02243392 +_0224325E: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224326A: ; jump table + .short _02243272 - _0224326A - 2 ; case 0 + .short _02243282 - _0224326A - 2 ; case 1 + .short _022432CC - _0224326A - 2 ; case 2 + .short _02243336 - _0224326A - 2 ; case 3 +_02243272: + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224339A +_02243282: + bl ov62_0224443C + mov r0, #0x66 + str r0, [sp] + ldr r0, _022433A0 ; =0x0224919C + ldr r2, _022433A4 ; =ov62_02245994 + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _022433A8 ; =0x00000608 + ldr r2, _022433AC ; =ov62_02245A28 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _022433B0 ; =0x0224915C + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _022433B4 ; =0x0000060C + ldr r2, _022433B8 ; =ov62_02245A90 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _022433BC ; =0x0224913C + mov r1, #2 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x61 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224339A +_022432CC: + mov r1, #0x73 + mov r2, #0 + lsl r1, r1, #2 + str r2, [r5, r1] + mov r1, #1 + bl ov62_02234540 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224339A +_02243336: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02243378 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02245640 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02243378: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224339A +_02243392: + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 +_0224339A: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022433A0: .word 0x0224919C +_022433A4: .word ov62_02245994 +_022433A8: .word 0x00000608 +_022433AC: .word ov62_02245A28 +_022433B0: .word 0x0224915C +_022433B4: .word 0x0000060C +_022433B8: .word ov62_02245A90 +_022433BC: .word 0x0224913C + thumb_func_end ov62_0224324C + + thumb_func_start ov62_022433C0 +ov62_022433C0: ; 0x022433C0 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _022433D4 ; =0x00000608 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_022433D4: .word 0x00000608 + thumb_func_end ov62_022433C0 + + thumb_func_start ov62_022433D8 +ov62_022433D8: ; 0x022433D8 + push {r4, lr} + add r4, r0, #0 + bl ov62_02245D80 + cmp r0, #0 + beq _022433EC + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 +_022433EC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_022433D8 + + thumb_func_start ov62_022433F0 +ov62_022433F0: ; 0x022433F0 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + bl ov62_02246850 + cmp r0, #0 + beq _0224340A + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} +_0224340A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_022433F0 + + thumb_func_start ov62_02243410 +ov62_02243410: ; 0x02243410 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02243426 + cmp r1, #1 + beq _02243494 + b _02243502 +_02243426: + ldr r0, _0224350C ; =0x00000608 + ldr r0, [r4, r0] + bl sub_02024034 + ldr r0, _02243510 ; =0x0000060C + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl ov62_022444A0 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _02243474 + sub r0, #0xc0 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _0224347E +_02243474: + add r4, #0x80 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02232394 +_0224347E: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022455C4 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02243508 +_02243494: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022434E8 + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x6f + bl ov62_0223124C + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D364 + add r0, r5, #0 + mov r1, #1 + bl ov62_02245C08 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_022434E8: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02243508 +_02243502: + mov r1, #0xe + bl ov62_0222FB60 +_02243508: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224350C: .word 0x00000608 +_02243510: .word 0x0000060C + thumb_func_end ov62_02243410 + + thumb_func_start ov62_02243514 +ov62_02243514: ; 0x02243514 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] + bl sub_0202FE04 + mov r1, #4 + mov r2, #0 + bl sub_0202FE98 + add r3, r0, #0 + add r2, r1, #0 + add r0, r4, #0 + add r1, r3, #0 + bl ov62_02234970 + cmp r0, #0 + bne _0224353E + b _0224380A +_0224353E: + ldr r0, [r4, #8] + cmp r0, #5 + bls _02243546 + b _022437DC +_02243546: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02243552: ; jump table + .short _0224355E - _02243552 - 2 ; case 0 + .short _022435AC - _02243552 - 2 ; case 1 + .short _02243612 - _02243552 - 2 ; case 2 + .short _02243622 - _02243552 - 2 ; case 3 + .short _02243660 - _02243552 - 2 ; case 4 + .short _02243772 - _02243552 - 2 ; case 5 +_0224355E: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _0224357C + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + b _02243586 +_0224357C: + add r5, #0x80 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_02232394 +_02243586: + add r0, r4, #0 + bl ov62_022455C4 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224381C +_022435AC: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022435F8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02245D50 + add r0, r4, #0 + bl ov62_02244BE4 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022435F8: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224381C +_02243612: + ldr r1, _02243824 ; =0x00000115 + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224381C +_02243622: + bl sub_02022798 + cmp r0, #0 + bne _0224362C + b _0224381C +_0224362C: + add r0, r4, #0 + bl ov62_02244CA4 + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224381C +_02243660: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02245C64 + ldr r0, _02243828 ; =0x0000086C + ldr r0, [r4, r0] + cmp r0, #0xd2 + bne _022436A2 + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #3 + bl sub_0200D364 +_022436A2: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02245640 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _0224371E + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _0224374A +_0224371E: + add r0, r5, #0 + add r0, #0x80 + add r1, r4, #0 + bl ov62_02232378 + add r5, #0x80 + add r0, r5, #0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_0224374A: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224381C +_02243772: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022437C2 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _022437A2 + sub r0, #0xc0 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _022437AC +_022437A2: + add r0, r5, #0 + add r0, #0x80 + mov r1, #1 + bl ov62_022323B8 +_022437AC: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022437C2: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224381C +_022437DC: + ldr r1, _0224382C ; =0x00004138 + mov r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + ble _02243800 + mov r1, #0x9a + lsl r1, r1, #6 + add r5, r4, r1 + ldr r2, _0224382C ; =0x00004138 + add r6, r4, #0 + sub r1, #0x78 +_022437F2: + str r5, [r6, r1] + ldr r3, [r4, r2] + add r0, r0, #1 + add r5, #0xe4 + add r6, r6, #4 + cmp r0, r3 + blt _022437F2 +_02243800: + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 + b _0224381C +_0224380A: + add r0, r4, #0 + bl ov62_02245ECC + cmp r0, #0 + beq _0224381C + add r0, r4, #0 + mov r1, #0x17 + bl ov62_0222FB60 +_0224381C: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_02243824: .word 0x00000115 +_02243828: .word 0x0000086C +_0224382C: .word 0x00004138 + thumb_func_end ov62_02243514 + + thumb_func_start ov62_02243830 +ov62_02243830: ; 0x02243830 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _02243844 ; =0x0000060C + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02243844: .word 0x0000060C + thumb_func_end ov62_02243830 + + thumb_func_start ov62_02243848 +ov62_02243848: ; 0x02243848 + push {r4, r5, r6, lr} + add r4, r0, #0 + bl ov62_02246640 + cmp r0, #0 + beq _02243880 + ldr r1, _02243884 ; =0x00004138 + mov r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + ble _02243878 + mov r1, #0x9a + lsl r1, r1, #6 + add r5, r4, r1 + ldr r2, _02243884 ; =0x00004138 + add r6, r4, #0 + sub r1, #0x78 +_0224386A: + str r5, [r6, r1] + ldr r3, [r4, r2] + add r0, r0, #1 + add r5, #0xe4 + add r6, r6, #4 + cmp r0, r3 + blt _0224386A +_02243878: + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 +_02243880: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02243884: .word 0x00004138 + thumb_func_end ov62_02243848 + + thumb_func_start ov62_02243888 +ov62_02243888: ; 0x02243888 + push {r4, r5, r6, lr} + add r4, r0, #0 + bl ov62_02246428 + cmp r0, #0 + beq _022438C0 + ldr r1, _022438C4 ; =0x00004138 + mov r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + ble _022438B8 + mov r1, #0x9a + lsl r1, r1, #6 + add r5, r4, r1 + ldr r2, _022438C4 ; =0x00004138 + add r6, r4, #0 + sub r1, #0x78 +_022438AA: + str r5, [r6, r1] + ldr r3, [r4, r2] + add r0, r0, #1 + add r5, #0xe4 + add r6, r6, #4 + cmp r0, r3 + blt _022438AA +_022438B8: + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 +_022438C0: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022438C4: .word 0x00004138 + thumb_func_end ov62_02243888 + + thumb_func_start ov62_022438C8 +ov62_022438C8: ; 0x022438C8 + push {r4, lr} + add r4, r0, #0 + bl ov62_02245FE4 + cmp r0, #0 + beq _022438DC + add r0, r4, #0 + mov r1, #0x1a + bl ov62_0222FB60 +_022438DC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_022438C8 + + thumb_func_start ov62_022438E0 +ov62_022438E0: ; 0x022438E0 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_022438E0 + + thumb_func_start ov62_022438F8 +ov62_022438F8: ; 0x022438F8 + push {r4, lr} + add r4, r0, #0 + bl ov62_02246090 + cmp r0, #0 + beq _0224390C + add r0, r4, #0 + mov r1, #0x17 + bl ov62_0222FB60 +_0224390C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_022438F8 + + thumb_func_start ov62_02243910 +ov62_02243910: ; 0x02243910 + push {r3, lr} + bl ov62_0224613C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_02243910 + + thumb_func_start ov62_0224391C +ov62_0224391C: ; 0x0224391C + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + bl ov62_022411B8 + cmp r0, #0 + bne _02243936 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02243936: + ldr r0, [r4, #8] + cmp r0, #4 + bls _0224393E + b _02243AC4 +_0224393E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224394A: ; jump table + .short _02243954 - _0224394A - 2 ; case 0 + .short _0224398A - _0224394A - 2 ; case 1 + .short _022439C4 - _0224394A - 2 ; case 2 + .short _02243A0A - _0224394A - 2 ; case 3 + .short _02243A36 - _0224394A - 2 ; case 4 +_02243954: + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _0224397A + sub r0, #0xc0 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + b _02243984 +_0224397A: + add r0, r5, #0 + add r0, #0x80 + mov r1, #0 + bl ov62_022323B8 +_02243984: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224398A: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022439AA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022439AA: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02243AF8 +_022439C4: + add r0, r4, #0 + mov r1, #0x75 + bl ov62_02231AAC + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _02243B00 ; =0x000004B8 + mov r1, #0 + str r1, [r5, r0] + add r0, #0xad + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243AF8 +_02243A0A: + add r0, r4, #0 + bl ov62_0224112C + ldr r1, _02243B04 ; =0x000004D4 + ldr r1, [r4, r1] + lsl r1, r1, #2 + add r2, r4, r1 + ldr r1, _02243B08 ; =0x00002608 + ldr r2, [r2, r1] + add r1, r2, #0 + add r1, #0xd8 + add r2, #0xdc + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov61_0222B524 + cmp r0, #1 + bne _02243AF8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243AF8 +_02243A36: + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _02243B0C ; =0x00000565 + bne _02243A70 + mov r1, #0 + bl sub_020057A4 + add r0, r4, #0 + bl ov62_02231B8C + ldr r3, [sp, #4] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #8 + bl ov62_022348B8 + ldr r0, [r4, #8] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #8] + ldr r0, _02243B00 ; =0x000004B8 + str r1, [r5, r0] + b _02243AA8 +_02243A70: + mov r1, #0 + bl sub_020057A4 + mov r0, #0xff + str r0, [r4, #8] + ldr r0, _02243B00 ; =0x000004B8 + mov r1, #1 + str r1, [r5, r0] + ldr r1, _02243B10 ; =0x0000413C + add r2, r4, r1 + add r1, r0, #0 + add r1, #0x1c + ldr r1, [r4, r1] + add r2, r2, r1 + ldr r1, _02243B14 ; =0x00000878 + str r2, [r4, r1] + add r2, r1, #0 + add r2, #0x3c + ldr r3, [r4, r2] + add r2, r0, #4 + str r3, [r5, r2] + add r0, r0, #4 + add r1, #0x40 + ldr r0, [r5, r0] + ldr r2, _02243B18 ; =0x00001D4C + add r1, r4, r1 + bl sub_020C4DB0 +_02243AA8: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + b _02243AF8 +_02243AC4: + ldr r0, _02243B00 ; =0x000004B8 + ldr r1, [r5, r0] + cmp r1, #0 + beq _02243AEA + add r0, #0xa7 + bl sub_02005748 + add r0, r4, #0 + bl ov62_02231B8C + ldr r1, [r5, #0xc] + add r0, r4, #0 + bl ov62_0222FB60 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223381C + b _02243AF8 +_02243AEA: + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + mov r1, #0x1f + bl ov62_0222FB60 +_02243AF8: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02243B00: .word 0x000004B8 +_02243B04: .word 0x000004D4 +_02243B08: .word 0x00002608 +_02243B0C: .word 0x00000565 +_02243B10: .word 0x0000413C +_02243B14: .word 0x00000878 +_02243B18: .word 0x00001D4C + thumb_func_end ov62_0224391C + + thumb_func_start ov62_02243B1C +ov62_02243B1C: ; 0x02243B1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #5 + bls _02243B30 + b _02243D74 +_02243B30: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02243B3C: ; jump table + .short _02243B48 - _02243B3C - 2 ; case 0 + .short _02243C3E - _02243B3C - 2 ; case 1 + .short _02243C88 - _02243B3C - 2 ; case 2 + .short _02243CEA - _02243B3C - 2 ; case 3 + .short _02243D46 - _02243B3C - 2 ; case 4 + .short _02243D64 - _02243B3C - 2 ; case 5 +_02243B48: + bl ov62_02234314 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + bl ov62_022315C8 + ldr r0, _02243D90 ; =0x00004138 + mov r2, #0 + ldr r0, [r4, r0] + cmp r0, #0 + ble _02243B7C + mov r0, #0x9a + lsl r0, r0, #6 + add r7, r0, #0 + add r3, r4, r0 + ldr r0, _02243D90 ; =0x00004138 + add r6, r4, #0 + sub r7, #0x78 +_02243B6E: + str r3, [r6, r7] + ldr r1, [r4, r0] + add r2, r2, #1 + add r3, #0xe4 + add r6, r6, #4 + cmp r2, r1 + blt _02243B6E +_02243B7C: + ldr r0, _02243D94 ; =0x000004D4 + mov r3, #3 + ldr r0, [r4, r0] + add r1, r4, r0 + ldr r0, _02243D98 ; =0x0000413C + ldrb r1, [r1, r0] + ldr r0, _02243D9C ; =0x0000079C + strb r1, [r5, r0] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + add r0, r4, #0 + bl ov62_02245C64 + add r0, r4, #0 + mov r1, #0 + bl ov62_02245C08 + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #3 + bl sub_0200D364 + mov r1, #0x13 + ldr r0, _02243DA0 ; =0x0000FFFF + lsl r1, r1, #6 + strh r0, [r5, r1] + mov r2, #0xff + add r0, r1, #2 + strb r2, [r5, r0] + add r0, r1, #3 + strb r2, [r5, r0] + add r0, r1, #4 + strb r2, [r5, r0] + add r0, r1, #0 + add r2, #0xf5 + add r0, #0x54 + str r2, [r5, r0] + add r0, r1, #0 + sub r0, #0x1c + ldrsh r0, [r4, r0] + add r1, #0x50 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243D8A +_02243C3E: + bl ov62_0224443C + mov r0, #0x66 + str r0, [sp] + ldr r0, _02243DA4 ; =0x0224919C + ldr r2, _02243DA8 ; =ov62_02245994 + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _02243DAC ; =0x00000608 + ldr r2, _02243DB0 ; =ov62_02245A28 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _02243DB4 ; =0x0224915C + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _02243DB8 ; =0x0000060C + ldr r2, _02243DBC ; =ov62_02245A90 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _02243DC0 ; =0x0224913C + mov r1, #2 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x61 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243D8A +_02243C88: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243D8A +_02243CEA: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02243D2C + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02245640 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02243D2C: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02243D8A +_02243D46: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243D8A +_02243D64: + bl sub_0200F2AC + cmp r0, #1 + bne _02243D8A + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02243D8A +_02243D74: + ldr r0, _02243DC4 ; =0x000006D8 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + add r0, r4, #0 + bl ov62_02230098 + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 +_02243D8A: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02243D90: .word 0x00004138 +_02243D94: .word 0x000004D4 +_02243D98: .word 0x0000413C +_02243D9C: .word 0x0000079C +_02243DA0: .word 0x0000FFFF +_02243DA4: .word 0x0224919C +_02243DA8: .word ov62_02245994 +_02243DAC: .word 0x00000608 +_02243DB0: .word ov62_02245A28 +_02243DB4: .word 0x0224915C +_02243DB8: .word 0x0000060C +_02243DBC: .word ov62_02245A90 +_02243DC0: .word 0x0224913C +_02243DC4: .word 0x000006D8 + thumb_func_end ov62_02243B1C + + thumb_func_start ov62_02243DC8 +ov62_02243DC8: ; 0x02243DC8 + push {r3, r4, r5, lr} + mov r1, #0x7a + add r5, r0, #0 + mov r0, #0x66 + lsl r1, r1, #4 + bl sub_02018144 + mov r2, #0x7a + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02243DC8 + + thumb_func_start ov62_02243E20 +ov62_02243E20: ; 0x02243E20 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r2, [r5, #8] + ldr r4, [r5, r1] + cmp r2, #0 + beq _02243E36 + cmp r2, #1 + beq _02243E94 + b _02243EF0 +_02243E36: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02243E4A + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02243E4A: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02243FA4 +_02243E94: + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + add r1, r0, #0 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #2 + bl sub_02019060 + mov r0, #4 + mov r1, #0 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #1 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02243FA4 +_02243EF0: + add r1, #0xc + ldr r1, [r5, r1] + cmp r1, #0xc8 + beq _02243F02 + cmp r1, #0xd2 + beq _02243F32 + cmp r1, #0xdc + beq _02243F62 + b _02243F8A +_02243F02: + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r5, #0 + bl ov62_022300BC + cmp r0, #1 + bne _02243F28 + add r0, r5, #0 + mov r1, #6 + bl ov62_0222FB60 + b _02243FA4 +_02243F28: + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 + b _02243FA4 +_02243F32: + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r5, #0 + bl ov62_022300BC + cmp r0, #1 + bne _02243F58 + add r0, r5, #0 + mov r1, #0x1e + bl ov62_0222FB60 + b _02243FA4 +_02243F58: + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 + b _02243FA4 +_02243F62: + bl ov62_022300BC + cmp r0, #1 + bne _02243F74 + add r0, r5, #0 + mov r1, #0x13 + bl ov62_0222FB60 + b _02243F7C +_02243F74: + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_02243F7C: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + b _02243FA4 +_02243F8A: + mov r1, #0 + bl ov62_0223376C + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0208B9E0 + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_02243FA4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02243E20 + + thumb_func_start ov62_02243FA8 +ov62_02243FA8: ; 0x02243FA8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + mov r2, #0x75 + ldr r6, [r5, r1] + lsl r2, r2, #2 + add r4, r6, r2 + ldr r2, [r5, #8] + cmp r2, #0 + beq _02243FCA + cmp r2, #1 + beq _0224403A + cmp r2, #2 + beq _0224405E + b _022440A0 +_02243FCA: + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #5 + sub r1, #0x30 + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r0, [r5, r1] + bl sub_02025E44 + add r3, r0, #0 + mov r0, #0x66 + mov r1, #0xc + add r2, sp, #0xc + bl ov62_02246B00 + ldr r1, _022440AC ; =0x000004AC + mov r2, #0x22 + str r0, [r6, r1] + ldr r0, [r5, #0x14] + lsl r2, r2, #4 + str r0, [r4, r2] + ldr r3, [r5, #0x18] + add r0, r2, #4 + str r3, [r4, r0] + add r0, r2, #0 + ldr r3, [r5, #0x1c] + add r0, #8 + str r3, [r4, r0] + add r0, r2, #0 + ldr r3, [r5, #0x24] + add r0, #0xc + str r3, [r4, r0] + add r0, r2, #0 + ldr r3, [r5, #0x28] + add r0, #0x10 + str r3, [r4, r0] + add r0, r2, #0 + add r0, #0x88 + ldr r3, [r6, r1] + add r7, r4, r0 + ldmia r3!, {r0, r1} + stmia r7!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r7!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r7!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r7!, {r0, r1} + add r2, #0xb4 + str r5, [r4, r2] + add r0, r5, #0 + bl ov62_02245B24 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0224403A: + mov r2, #8 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r6, #4 + bl ov62_022314F0 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022440A6 +_0224405E: + add r0, r6, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r6, #0 + add r1, r6, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02244086 + add r0, r5, #0 + mov r1, #0x70 + bl ov62_0223197C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02244086: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r6, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022440A6 +_022440A0: + mov r1, #3 + bl ov62_0222FB60 +_022440A6: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022440AC: .word 0x000004AC + thumb_func_end ov62_02243FA8 + + thumb_func_start ov62_022440B0 +ov62_022440B0: ; 0x022440B0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r1, [r4, r0] + mov r0, #0x75 + lsl r0, r0, #2 + add r0, r1, r0 + bl ov62_02247084 + cmp r0, #1 + bne _022440D0 + add r0, r4, #0 + mov r1, #4 + bl ov62_0222FB60 +_022440D0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_022440B0 + + thumb_func_start ov62_022440D4 +ov62_022440D4: ; 0x022440D4 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #0x75 + lsl r1, r1, #2 + ldr r2, [r5, #8] + add r3, r4, r1 + cmp r2, #0 + beq _022440F2 + cmp r2, #1 + beq _02244118 + b _02244160 +_022440F2: + bl ov62_02231A1C + mov r2, #8 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, r4, #4 + bl ov62_02231560 + ldr r0, _0224417C ; =0x000004AC + ldr r0, [r4, r0] + bl ov62_02246B4C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02244118: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02244146 + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl ov62_02245BD8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02244146: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02244176 +_02244160: + add r1, #0xf4 + ldr r1, [r3, r1] + cmp r1, #0 + beq _02244170 + mov r1, #6 + bl ov62_0222FB60 + b _02244176 +_02244170: + mov r1, #5 + bl ov62_0222FB60 +_02244176: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224417C: .word 0x000004AC + thumb_func_end ov62_022440D4 + + thumb_func_start ov62_02244180 +ov62_02244180: ; 0x02244180 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + bne _022441B6 + add r4, #8 + add r0, r4, #0 + bl ov62_02231688 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02244252 +_022441B6: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02244222 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + bl sub_020181C4 + b _02244252 +_02244222: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C +_02244252: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02244180 + + thumb_func_start ov62_02244258 +ov62_02244258: ; 0x02244258 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + mov r1, #0x75 + lsl r1, r1, #2 + add r6, r5, r1 + ldr r1, [r4, #8] + cmp r1, #4 + bls _02244272 + b _022443AA +_02244272: + add r2, r1, r1 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224427E: ; jump table + .short _02244288 - _0224427E - 2 ; case 0 + .short _022442C6 - _0224427E - 2 ; case 1 + .short _022442F4 - _0224427E - 2 ; case 2 + .short _02244396 - _0224427E - 2 ; case 3 + .short _022443A4 - _0224427E - 2 ; case 4 +_02244288: + mov r1, #0x75 + bl ov62_0223197C + ldr r1, _022443CC ; =0x000006F4 + add r0, r4, #0 + ldr r1, [r4, r1] + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + ldr r0, _022443CC ; =0x000006F4 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_0208B9E0 + ldr r0, _022443CC ; =0x000006F4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _022443D0 ; =0x000004B8 + mov r1, #0 + str r1, [r5, r0] + add r0, #0xad + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022443C4 +_022442C6: + bl ov62_022411B8 + cmp r0, #0 + bne _022442D4 + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_022442D4: + add r0, r4, #0 + bl ov62_0224112C + mov r2, #0xb3 + lsl r2, r2, #2 + ldr r1, [r6, r2] + add r2, r2, #4 + ldr r2, [r6, r2] + bl ov61_0222B524 + cmp r0, #1 + bne _022443C4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022443C4 +_022442F4: + bl ov62_022411B8 + cmp r0, #0 + bne _02244302 + add sp, #4 + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_02244302: + add r0, r4, #0 + bl ov62_02231A1C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #0 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _022443D4 ; =0x00000565 + bne _0224434A + mov r1, #0 + bl sub_020057A4 + ldr r0, _022443D8 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r3, [sp] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #8 + bl ov62_022348B8 + add r0, r4, #0 + mov r1, #0 + bl ov62_0223376C + ldr r0, [r4, #8] + mov r1, #0 + add r0, r0, #1 + str r0, [r4, #8] + ldr r0, _022443D0 ; =0x000004B8 + str r1, [r5, r0] + b _0224437E +_0224434A: + mov r1, #0 + bl sub_020057A4 + mov r0, #0xff + str r0, [r4, #8] + ldr r0, _022443D0 ; =0x000004B8 + mov r1, #1 + str r1, [r5, r0] + add r0, #0xa7 + bl sub_02005748 + ldr r0, _022443DC ; =0x00002604 + ldr r1, _022443E0 ; =0x00000878 + add r0, r4, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x3c + ldr r2, [r4, r0] + ldr r0, _022443E4 ; =0x000004BC + add r1, #0x40 + str r2, [r5, r0] + ldr r0, [r5, r0] + ldr r2, _022443E8 ; =0x00001D4C + add r1, r4, r1 + bl sub_020C4DB0 +_0224437E: + ldr r0, _022443CC ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + bl sub_0208B9E0 + ldr r0, _022443CC ; =0x000006F4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + b _022443C4 +_02244396: + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022443C4 +_022443A4: + add r0, r1, #1 + str r0, [r4, #8] + b _022443C4 +_022443AA: + ldr r0, _022443D0 ; =0x000004B8 + ldr r0, [r5, r0] + cmp r0, #0 + beq _022443BC + add r0, r4, #0 + mov r1, #7 + bl ov62_0222FB60 + b _022443C4 +_022443BC: + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 +_022443C4: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_022443CC: .word 0x000006F4 +_022443D0: .word 0x000004B8 +_022443D4: .word 0x00000565 +_022443D8: .word 0x04000050 +_022443DC: .word 0x00002604 +_022443E0: .word 0x00000878 +_022443E4: .word 0x000004BC +_022443E8: .word 0x00001D4C + thumb_func_end ov62_02244258 + + thumb_func_start ov62_022443EC +ov62_022443EC: ; 0x022443EC + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x66 + bl sub_02030A80 + add r1, r4, #0 + add r1, #0x80 + str r0, [r1, #0] + ldr r0, _02244438 ; =0x000004BC + add r1, r4, #0 + add r1, #0x80 + ldr r0, [r4, r0] + ldr r1, [r1, #0] + bl ov61_0222AFC0 + add r0, r4, #0 + add r0, #0x80 + ldr r1, [r0, #0] + mov r0, #0x43 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #0x66 + bl sub_0202FF2C + mov r1, #0x11 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, _02244438 ; =0x000004BC + ldr r1, [r4, r1] + ldr r0, [r4, r0] + mov r2, #0x64 + add r0, #0x80 + bl sub_020C4DB0 + pop {r4, pc} + nop +_02244438: .word 0x000004BC + thumb_func_end ov62_022443EC + + thumb_func_start ov62_0224443C +ov62_0224443C: ; 0x0224443C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + mov r0, #0x66 + bl sub_02030A80 + add r1, r4, #0 + add r1, #0x80 + str r0, [r1, #0] + ldr r0, _02244498 ; =0x000004D4 + ldr r0, [r5, r0] + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0224449C ; =0x00002608 + ldr r0, [r1, r0] + add r1, r4, #0 + add r1, #0x80 + ldr r1, [r1, #0] + bl ov61_0222AFC0 + add r0, r4, #0 + add r0, #0x80 + ldr r1, [r0, #0] + mov r0, #0x43 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #0x66 + bl sub_0202FF2C + mov r1, #0x11 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, _02244498 ; =0x000004D4 + ldr r1, [r4, r1] + ldr r0, [r5, r0] + lsl r0, r0, #2 + add r2, r5, r0 + ldr r0, _0224449C ; =0x00002608 + ldr r0, [r2, r0] + mov r2, #0x64 + add r0, #0x80 + bl sub_020C4DB0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244498: .word 0x000004D4 +_0224449C: .word 0x00002608 + thumb_func_end ov62_0224443C + + thumb_func_start ov62_022444A0 +ov62_022444A0: ; 0x022444A0 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + mov r0, #0x11 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0202FF44 + add r4, #0x80 + ldr r0, [r4, #0] + bl sub_02030A98 + pop {r4, pc} + thumb_func_end ov62_022444A0 + + thumb_func_start ov62_022444BC +ov62_022444BC: ; 0x022444BC + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _022444D0 + b _022446A0 +_022444D0: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022444DC: ; jump table + .short _022444E4 - _022444DC - 2 ; case 0 + .short _022444F2 - _022444DC - 2 ; case 1 + .short _022445DC - _022444DC - 2 ; case 2 + .short _02244644 - _022444DC - 2 ; case 3 +_022444E4: + mov r1, #0 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022446A8 +_022444F2: + bl ov62_02233790 + cmp r0, #0 + bne _022444FC + b _022446A8 +_022444FC: + mov r2, #8 + str r2, [sp] + mov r3, #0x12 + str r3, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r5, #4 + bl ov62_02231560 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #6 + mov r2, #7 + bl ov62_022343B8 + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #0 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + add r0, r4, #0 + bl ov62_022443EC + add r0, r4, #0 + bl ov62_02245C64 + mov r0, #0x66 + str r0, [sp] + ldr r0, _022446B0 ; =0x0224919C + ldr r2, _022446B4 ; =ov62_022457A0 + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _022446B8 ; =0x00000608 + ldr r2, _022446BC ; =ov62_02245800 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _022446C0 ; =0x0224915C + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _022446C4 ; =0x0000060C + ldr r2, _022446C8 ; =ov62_02245868 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _022446CC ; =0x0224913C + mov r1, #2 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x61 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022446A8 +_022445DC: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022446A8 +_02244644: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02244686 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + add r0, r4, #0 + bl ov62_02245640 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02244686: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022446A8 +_022446A0: + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 +_022446A8: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_022446B0: .word 0x0224919C +_022446B4: .word ov62_022457A0 +_022446B8: .word 0x00000608 +_022446BC: .word ov62_02245800 +_022446C0: .word 0x0224915C +_022446C4: .word 0x0000060C +_022446C8: .word ov62_02245868 +_022446CC: .word 0x0224913C + thumb_func_end ov62_022444BC + + thumb_func_start ov62_022446D0 +ov62_022446D0: ; 0x022446D0 + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _022446E4 ; =0x00000608 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_022446E4: .word 0x00000608 + thumb_func_end ov62_022446D0 + + thumb_func_start ov62_022446E8 +ov62_022446E8: ; 0x022446E8 + push {r4, lr} + add r4, r0, #0 + bl ov62_02245D80 + cmp r0, #0 + beq _022446FC + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 +_022446FC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_022446E8 + + thumb_func_start ov62_02244700 +ov62_02244700: ; 0x02244700 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + bl ov62_02246850 + cmp r0, #0 + beq _0224471A + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} +_0224471A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02244700 + + thumb_func_start ov62_02244720 +ov62_02244720: ; 0x02244720 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _02244732 + b _022448D2 +_02244732: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224473E: ; jump table + .short _02244746 - _0224473E - 2 ; case 0 + .short _022447B4 - _0224473E - 2 ; case 1 + .short _022447F4 - _0224473E - 2 ; case 2 + .short _02244822 - _0224473E - 2 ; case 3 +_02244746: + ldr r0, _022448D8 ; =0x00000608 + ldr r0, [r5, r0] + bl sub_02024034 + ldr r0, _022448DC ; =0x0000060C + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + bl ov62_022444A0 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _02244794 + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + b _0224479E +_02244794: + add r5, #0x80 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_02232394 +_0224479E: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022455C4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022448D2 +_022447B4: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022447DA + add r0, r4, #0 + bl ov62_02245D50 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022447DA: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022448D2 +_022447F4: + add r5, #8 + add r0, r5, #0 + bl ov62_02231688 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022448D2 +_02244822: + bl ov62_02233790 + cmp r0, #0 + beq _022448D2 + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _022448A2 + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + bl sub_0202F250 + cmp r0, #1 + bne _022448D2 + bl sub_0202F22C + b _022448D2 +_022448A2: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_022448D2: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022448D8: .word 0x00000608 +_022448DC: .word 0x0000060C + thumb_func_end ov62_02244720 + + thumb_func_start ov62_022448E0 +ov62_022448E0: ; 0x022448E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r1, #0 + ldr r1, _022449B0 ; =0x0000088C + lsl r6, r2, #2 + add r4, r5, r1 + ldr r1, [r4, r6] + str r0, [sp, #0x10] + ldr r0, [r5, #0x48] + cmp r1, #0 + bne _02244900 + mov r1, #8 + bl sub_0200B1EC + add r4, r0, #0 + b _0224495E +_02244900: + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + ldr r0, [r5, #0x48] + mov r1, #7 + bl sub_0200B1EC + str r0, [sp, #0x14] + ldr r0, [r4, r6] + mov r1, #0x66 + bl sub_02030B94 + add r6, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl ov62_022349A8 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + add r0, r7, #0 + add r2, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r2, [sp, #0x14] + add r0, r7, #0 + add r1, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 +_0224495E: + add r0, sp, #0x18 + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r5, #0x24] + add r1, sp, #0x18 + mov r2, #0x14 + mov r3, #2 + bl sub_0201A870 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _022449B4 ; =0x000E0D00 + add r2, r4, #0 + str r0, [sp, #8] + add r0, sp, #0x18 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x10] + ldr r0, [r0, #8] + ldr r1, [r1, #0xc] + add r2, sp, #0x18 + mov r3, #0x66 + bl sub_02012BE0 + add r0, r4, #0 + bl sub_020237BC + add r0, sp, #0x18 + bl sub_0201A8FC + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_022449B0: .word 0x0000088C +_022449B4: .word 0x000E0D00 + thumb_func_end ov62_022448E0 + + thumb_func_start ov62_022449B8 +ov62_022449B8: ; 0x022449B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + ldr r1, _02244AAC ; =0x000008A4 + add r5, r0, #0 + sub r1, #0x44 + ldr r6, [r5, r1] + mov r1, #2 + bl ov62_022302A8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _02244AAC ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + ldr r1, _02244AAC ; =0x000008A4 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r5, r1 + mov r2, #2 + mov r3, #1 + bl sub_0201A7E8 + cmp r4, #0x64 + bne _02244A6A + add r6, #0x80 + ldr r0, [r6, #0] + str r0, [sp, #0x14] + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x18] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + b _02244A74 +_02244A6A: + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r6, r0, #0 +_02244A74: + ldr r0, _02244AAC ; =0x000008A4 + mov r1, #0xcc + add r0, r5, r0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02244AB0 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _02244AAC ; =0x000008A4 + add r3, r1, #0 + add r0, r5, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _02244AAC ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02244AAC: .word 0x000008A4 +_02244AB0: .word 0x000F0D0C + thumb_func_end ov62_022449B8 + + thumb_func_start ov62_02244AB4 +ov62_02244AB4: ; 0x02244AB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, _02244BDC ; =0x000008A4 + add r4, r1, #0 + sub r0, #0x44 + ldr r0, [r5, r0] + cmp r4, #0x64 + bne _02244B2C + add r0, #0x80 + ldr r0, [r0, #0] + str r0, [sp, #0x14] + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x14] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x18] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + b _02244BA4 +_02244B2C: + cmp r4, #0x66 + bne _02244B9C + lsl r0, r2, #2 + add r1, r5, r0 + ldr r0, _02244BDC ; =0x000008A4 + sub r0, #0x18 + ldr r0, [r1, r0] + str r0, [sp, #0x10] + mov r0, #0x66 + bl ov62_02231690 + add r7, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r6, r0, #0 + ldr r0, [sp, #0x10] + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x1c] + ldr r1, [sp, #0x1c] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + add r0, r7, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200C388 + ldr r0, [sp, #0x1c] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B3F0 + b _02244BA4 +_02244B9C: + ldr r0, [r5, #0x48] + bl sub_0200B1EC + add r6, r0, #0 +_02244BA4: + ldr r0, _02244BDC ; =0x000008A4 + mov r1, #0xcc + add r0, r5, r0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02244BE0 ; =0x000F0D0C + add r2, r6, #0 + str r0, [sp, #8] + ldr r0, _02244BDC ; =0x000008A4 + add r3, r1, #0 + add r0, r5, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _02244BDC ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244BDC: .word 0x000008A4 +_02244BE0: .word 0x000F0D0C + thumb_func_end ov62_02244AB4 + + thumb_func_start ov62_02244BE4 +ov62_02244BE4: ; 0x02244BE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + mov r1, #0x86 + lsl r1, r1, #4 + ldr r3, _02244C9C ; =0x0224916C + ldr r4, [r0, r1] + str r0, [sp] + add r2, sp, #0x20 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r3, _02244CA0 ; =0x0224917C + add r2, sp, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp] + mov r1, #2 + bl ov62_0223136C + add r0, sp, #0x20 + str r0, [sp, #8] + mov r0, #0x69 + str r0, [sp, #4] + ldr r0, [sp] + add r5, r4, #0 + str r0, [sp, #0xc] + add r0, #0x14 + mov r6, #0 + add r5, #0x10 + add r7, sp, #0x10 + str r0, [sp, #0xc] +_02244C28: + ldr r0, [sp] + mov r1, #2 + bl ov62_022313E0 + str r0, [r4, #0x14] + ldr r1, [sp, #0xc] + add r0, r5, #0 + mov r2, #2 + bl ov62_0223118C + ldr r2, [sp, #8] + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r5, #0 + bl ov62_0223124C + cmp r6, #3 + beq _02244C56 + ldr r1, [sp] + add r0, r5, #0 + add r2, r6, #1 + bl ov62_022448E0 +_02244C56: + ldr r2, [sp, #4] + ldr r0, [r4, #0x14] + lsl r2, r2, #0x10 + mov r1, #0x32 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r0, [r4, #0x14] + ldr r1, [r7, #0] + bl sub_0200D364 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x18] + sub r2, #0x2c + bl sub_020128C4 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_020129D0 + ldr r0, [sp, #8] + add r6, r6, #1 + add r0, r0, #4 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r4, #0x1c + add r0, #0x24 + add r5, #0x1c + add r7, r7, #4 + str r0, [sp, #4] + cmp r6, #4 + blt _02244C28 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244C9C: .word 0x0224916C +_02244CA0: .word 0x0224917C + thumb_func_end ov62_02244BE4 + + thumb_func_start ov62_02244CA4 +ov62_02244CA4: ; 0x02244CA4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r7, r0] + mov r6, #0 + add r4, r5, #0 + add r4, #0x10 +_02244CB4: + add r0, r4, #0 + bl ov62_022312B0 + ldr r0, [r5, #0x14] + bl sub_0200D0F4 + add r6, r6, #1 + add r4, #0x1c + add r5, #0x1c + cmp r6, #4 + blt _02244CB4 + add r0, r7, #0 + bl ov62_022313BC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov62_02244CA4 + + thumb_func_start ov62_02244CD4 +ov62_02244CD4: ; 0x02244CD4 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] + bl sub_0202FE04 + mov r1, #4 + mov r2, #0 + bl sub_0202FE98 + add r3, r0, #0 + add r2, r1, #0 + add r0, r4, #0 + add r1, r3, #0 + bl ov62_02234970 + cmp r0, #0 + bne _02244CFC + b _02244F5A +_02244CFC: + ldr r0, [r4, #8] + cmp r0, #5 + bls _02244D04 + b _02244EA6 +_02244D04: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02244D10: ; jump table + .short _02244D1C - _02244D10 - 2 ; case 0 + .short _02244D6A - _02244D10 - 2 ; case 1 + .short _02244DD0 - _02244D10 - 2 ; case 2 + .short _02244DE0 - _02244D10 - 2 ; case 3 + .short _02244E18 - _02244D10 - 2 ; case 4 + .short _02244E58 - _02244D10 - 2 ; case 5 +_02244D1C: + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _02244D3A + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + b _02244D44 +_02244D3A: + add r5, #0x80 + add r0, r5, #0 + add r1, r4, #0 + bl ov62_02232394 +_02244D44: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022455C4 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02244F6C +_02244D6A: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02244DB6 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_02245D50 + add r0, r4, #0 + bl ov62_02244BE4 + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02244DB6: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02244F6C +_02244DD0: + ldr r1, _02244F70 ; =0x00000115 + add r0, r4, #0 + bl ov62_02231AAC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02244F6C +_02244DE0: + bl sub_02022798 + cmp r0, #0 + bne _02244DEA + b _02244F6C +_02244DEA: + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02244F6C +_02244E18: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02244E3E + add r0, r4, #0 + bl ov62_02244CA4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02244E3E: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02244F6C +_02244E58: + ldr r0, _02244F74 ; =0x00000608 + ldr r0, [r5, r0] + bl sub_02024034 + ldr r0, _02244F78 ; =0x0000060C + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02024034 + add r5, #8 + add r0, r5, #0 + bl ov62_02231688 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022444A0 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02244F6C +_02244EA6: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _02244F6C + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02244F28 + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + bl sub_0202F250 + cmp r0, #1 + bne _02244F6C + bl sub_0202F22C + b _02244F6C +_02244F28: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02244F6C +_02244F5A: + add r0, r4, #0 + bl ov62_02245ECC + cmp r0, #0 + beq _02244F6C + add r0, r4, #0 + mov r1, #0xd + bl ov62_0222FB60 +_02244F6C: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244F70: .word 0x00000115 +_02244F74: .word 0x00000608 +_02244F78: .word 0x0000060C + thumb_func_end ov62_02244CD4 + + thumb_func_start ov62_02244F7C +ov62_02244F7C: ; 0x02244F7C + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + ldr r0, _02244F90 ; =0x0000060C + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02244F90: .word 0x0000060C + thumb_func_end ov62_02244F7C + + thumb_func_start ov62_02244F94 +ov62_02244F94: ; 0x02244F94 + push {r4, lr} + add r4, r0, #0 + bl ov62_02246640 + cmp r0, #0 + beq _02244FA8 + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 +_02244FA8: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02244F94 + + thumb_func_start ov62_02244FAC +ov62_02244FAC: ; 0x02244FAC + push {r4, lr} + add r4, r0, #0 + bl ov62_02246428 + cmp r0, #0 + beq _02244FC0 + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 +_02244FC0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02244FAC + + thumb_func_start ov62_02244FC4 +ov62_02244FC4: ; 0x02244FC4 + push {r4, lr} + add r4, r0, #0 + bl ov62_02245FE4 + cmp r0, #0 + beq _02244FD8 + add r0, r4, #0 + mov r1, #0x10 + bl ov62_0222FB60 +_02244FD8: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02244FC4 + + thumb_func_start ov62_02244FDC +ov62_02244FDC: ; 0x02244FDC + push {r3, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r1, [r0, r1] + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r1, r0] + bl sub_0202404C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_02244FDC + + thumb_func_start ov62_02244FF4 +ov62_02244FF4: ; 0x02244FF4 + push {r4, lr} + add r4, r0, #0 + bl ov62_02246090 + cmp r0, #0 + beq _02245008 + add r0, r4, #0 + mov r1, #0xd + bl ov62_0222FB60 +_02245008: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02244FF4 + + thumb_func_start ov62_0224500C +ov62_0224500C: ; 0x0224500C + push {r3, lr} + bl ov62_0224613C + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_0224500C + + thumb_func_start ov62_02245018 +ov62_02245018: ; 0x02245018 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #5 + bls _0224502C + b _022452E4 +_0224502C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02245038: ; jump table + .short _02245044 - _02245038 - 2 ; case 0 + .short _022450D8 - _02245038 - 2 ; case 1 + .short _02245178 - _02245038 - 2 ; case 2 + .short _02245244 - _02245038 - 2 ; case 3 + .short _022452B6 - _02245038 - 2 ; case 4 + .short _022452D4 - _02245038 - 2 ; case 5 +_02245044: + bl ov62_02233790 + cmp r0, #0 + beq _022450F0 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + bl ov62_022315C8 + ldr r0, _02245300 ; =0x00002604 + ldrb r1, [r4, r0] + ldr r0, _02245304 ; =0x0000079C + strb r1, [r5, r0] + ldr r0, _02245308 ; =0x000008B8 + ldr r1, _0224530C ; =0x000004BC + add r2, r4, r0 + str r2, [r5, r1] + ldr r1, [r5, r1] + sub r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + bl ov62_0223371C + add r0, r4, #0 + bl ov62_022443EC + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #0 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022452FA +_022450D8: + bl ov62_02233790 + cmp r0, #0 + beq _022450F0 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + bne _022450F2 +_022450F0: + b _022452FA +_022450F2: + mov r0, #0 + mov r1, #1 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #4 + mov r1, #1 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #0 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + mov r0, #0x66 + str r0, [sp] + ldr r0, _02245310 ; =0x0224919C + ldr r2, _02245314 ; =ov62_022457A0 + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _02245318 ; =0x00000608 + ldr r2, _0224531C ; =ov62_02245800 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _02245320 ; =0x0224915C + mov r1, #4 + add r3, r4, #0 + bl sub_02023FCC + ldr r1, _02245324 ; =0x0000060C + ldr r2, _02245328 ; =ov62_02245868 + str r0, [r5, r1] + mov r0, #0x66 + str r0, [sp] + ldr r0, _0224532C ; =0x0224913C + mov r1, #2 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x61 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022452FA +_02245178: + bl ov62_02245C64 + add r0, r4, #0 + bl ov62_02245640 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _022451F0 + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _0224521C +_022451F0: + add r0, r5, #0 + add r0, #0x80 + add r1, r4, #0 + bl ov62_02232378 + add r5, #0x80 + add r0, r5, #0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_0224521C: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022452FA +_02245244: + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + str r2, [r5, #8] + bl ov62_022315E0 + cmp r0, #0 + beq _0224529C + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _0224526C + sub r0, #0xc0 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _02245276 +_0224526C: + add r0, r5, #0 + add r0, #0x80 + mov r1, #1 + bl ov62_022323B8 +_02245276: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224529C: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _022452FA +_022452B6: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022452FA +_022452D4: + bl sub_0200F2AC + cmp r0, #1 + bne _022452FA + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022452FA +_022452E4: + ldr r0, _02245330 ; =0x000006D8 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + add r0, r4, #0 + bl ov62_02230098 + add r0, r4, #0 + mov r1, #8 + bl ov62_0222FB60 +_022452FA: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245300: .word 0x00002604 +_02245304: .word 0x0000079C +_02245308: .word 0x000008B8 +_0224530C: .word 0x000004BC +_02245310: .word 0x0224919C +_02245314: .word ov62_022457A0 +_02245318: .word 0x00000608 +_0224531C: .word ov62_02245800 +_02245320: .word 0x0224915C +_02245324: .word 0x0000060C +_02245328: .word ov62_02245868 +_0224532C: .word 0x0224913C +_02245330: .word 0x000006D8 + thumb_func_end ov62_02245018 + + thumb_func_start ov62_02245334 +ov62_02245334: ; 0x02245334 + push {r4, lr} + mov r1, #0x6f + add r4, r0, #0 + lsl r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02245334 + + thumb_func_start ov62_0224536C +ov62_0224536C: ; 0x0224536C + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _02245380 + b _022454A0 +_02245380: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224538C: ; jump table + .short _02245394 - _0224538C - 2 ; case 0 + .short _022453A8 - _0224538C - 2 ; case 1 + .short _02245406 - _0224538C - 2 ; case 2 + .short _0224548A - _0224538C - 2 ; case 3 +_02245394: + mov r1, #0x77 + bl ov62_02231AAC + ldr r0, _022454D0 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022454CA +_022453A8: + bl ov62_022411B8 + cmp r0, #0 + bne _022453B6 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_022453B6: + mov r3, #0 + mov r0, #0x83 + str r3, [sp] + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x66 + add r2, sp, #4 + bl sub_0202F298 + mov r0, #0x66 + bl sub_02030A80 + mov r1, #0x1d + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0x83 + lsl r1, r1, #4 + ldr r1, [r4, r1] + bl sub_02030AA0 + add r0, r4, #0 + bl ov62_0224112C + mov r1, #0x1d + lsl r1, r1, #4 + ldr r1, [r5, r1] + bl ov61_0222B338 + cmp r0, #1 + bne _022454CA + mov r0, #0x1d + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02030A98 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022454CA +_02245406: + bl ov62_022411B8 + cmp r0, #0 + bne _02245414 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_02245414: + bl sub_0202F22C + add r0, r4, #0 + bl ov62_02231B8C + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #8 + bl ov61_0222BB48 + cmp r0, #1 + bne _02245464 + ldr r0, _022454D0 ; =0x00000565 + mov r1, #0 + bl sub_020057A4 + ldr r3, [sp, #8] + add r0, r4, #0 + ldr r2, [r3, #0xc] + ldr r3, [r3, #4] + mov r1, #6 + bl ov62_022348B8 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + mov r0, #0xff + str r0, [r4, #8] + b _022454CA +_02245464: + add r0, r4, #0 + mov r1, #0x77 + bl ov62_02231AAC + add r0, r5, #0 + add r1, r4, #0 + bl ov62_022469A0 + ldr r0, _022454D0 ; =0x00000565 + mov r1, #0 + bl sub_020057A4 + ldr r0, _022454D4 ; =0x0000055F + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022454CA +_0224548A: + bl sub_02022798 + cmp r0, #0 + beq _022454CA + add r0, r4, #0 + bl ov62_02231B8C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _022454CA +_022454A0: + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + mov r1, #0x2e + bl ov62_02233704 + add r0, r4, #0 + mov r1, #4 + bl ov62_0222FB60 +_022454CA: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_022454D0: .word 0x00000565 +_022454D4: .word 0x0000055F + thumb_func_end ov62_0224536C + + thumb_func_start ov62_022454D8 +ov62_022454D8: ; 0x022454D8 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + bne _0224551C + add r4, #8 + add r0, r4, #0 + bl ov62_02231688 + add r0, r5, #0 + bl ov62_02230060 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_0223146C + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _022455C0 +_0224551C: + bl ov62_02233790 + cmp r0, #0 + beq _022455C0 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _02245590 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + b _022455C0 +_02245590: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_022455C0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_022454D8 + + thumb_func_start ov62_022455C4 +ov62_022455C4: ; 0x022455C4 + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + ldr r0, _022455E0 ; =0x000006D4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _022455E0 ; =0x000006D4 + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + nop +_022455E0: .word 0x000006D4 + thumb_func_end ov62_022455C4 + + thumb_func_start ov62_022455E4 +ov62_022455E4: ; 0x022455E4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r6, _02245638 ; =0x000006D4 + add r7, r1, #0 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + add r1, r7, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, r6 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0224563C ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245638: .word 0x000006D4 +_0224563C: .word 0x000F0D00 + thumb_func_end ov62_022455E4 + + thumb_func_start ov62_02245640 +ov62_02245640: ; 0x02245640 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r6, _02245688 ; =0x000006D4 + add r0, r4, r6 + bl sub_0201A7A0 + mov r0, #3 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r2, #6 + mov r3, #8 + bl sub_0201A7E8 + mov r1, #0x73 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + add r1, #0x79 + bl ov62_022455E4 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_02245688: .word 0x000006D4 + thumb_func_end ov62_02245640 + + thumb_func_start ov62_0224568C +ov62_0224568C: ; 0x0224568C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r6, _02245764 ; =0x000006D4 + add r0, r4, r6 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r3, #4 + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x82 + bl sub_0200B1EC + add r7, r0, #0 + add r0, r4, r6 + add r1, r7, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02245768 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add r6, #0x10 + add r0, r4, r6 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x15 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, r6 + mov r3, #0x12 + bl sub_0201A7E8 + add r0, r4, r6 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x83 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, r6 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02245768 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02245764: .word 0x000006D4 +_02245768: .word 0x000F0D00 + thumb_func_end ov62_0224568C + + thumb_func_start ov62_0224576C +ov62_0224576C: ; 0x0224576C + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + ldr r0, _02245798 ; =0x000006D4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _02245798 ; =0x000006D4 + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _0224579C ; =0x000006E4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _0224579C ; =0x000006E4 + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + nop +_02245798: .word 0x000006D4 +_0224579C: .word 0x000006E4 + thumb_func_end ov62_0224576C + + thumb_func_start ov62_022457A0 +ov62_022457A0: ; 0x022457A0 + push {r4, lr} + add r4, r2, #0 + cmp r1, #0 + bne _022457FE + cmp r0, #3 + bhi _022457FE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022457B8: ; jump table + .short _022457C0 - _022457B8 - 2 ; case 0 + .short _022457D0 - _022457B8 - 2 ; case 1 + .short _022457E0 - _022457B8 - 2 ; case 2 + .short _022457F0 - _022457B8 - 2 ; case 3 +_022457C0: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #9 + bl ov62_0222FB60 + pop {r4, pc} +_022457D0: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0xa + bl ov62_0222FB60 + pop {r4, pc} +_022457E0: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0xc + bl ov62_0222FB60 + pop {r4, pc} +_022457F0: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0xb + bl ov62_0222FB60 +_022457FE: + pop {r4, pc} + thumb_func_end ov62_022457A0 + + thumb_func_start ov62_02245800 +ov62_02245800: ; 0x02245800 + push {r4, lr} + add r4, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r3, [r4, r2] + cmp r1, #0 + bne _02245864 + cmp r0, #3 + bhi _02245864 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224581E: ; jump table + .short _02245826 - _0224581E - 2 ; case 0 + .short _02245826 - _0224581E - 2 ; case 1 + .short _02245826 - _0224581E - 2 ; case 2 + .short _02245856 - _0224581E - 2 ; case 3 +_02245826: + add r1, r0, #1 + mov r0, #0x72 + lsl r0, r0, #2 + str r1, [r3, r0] + ldr r0, [r3, r0] + add r2, #0x2c + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, r2] + cmp r0, #0 + beq _02245846 + add r0, r4, #0 + mov r1, #0xf + bl ov62_0222FB60 + b _0224584E +_02245846: + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 +_0224584E: + add r0, r4, #0 + bl ov62_02234520 + pop {r4, pc} +_02245856: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0xe + bl ov62_0222FB60 +_02245864: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02245800 + + thumb_func_start ov62_02245868 +ov62_02245868: ; 0x02245868 + push {r4, lr} + add r4, r2, #0 + cmp r1, #0 + bne _0224589E + cmp r0, #0 + beq _0224587A + cmp r0, #1 + beq _02245890 + pop {r4, pc} +_0224587A: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_0224576C + add r0, r4, #0 + mov r1, #0x12 + bl ov62_0222FB60 + pop {r4, pc} +_02245890: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0x11 + bl ov62_0222FB60 +_0224589E: + pop {r4, pc} + thumb_func_end ov62_02245868 + + thumb_func_start ov62_022458A0 +ov62_022458A0: ; 0x022458A0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x86 + add r4, r2, #0 + lsl r0, r0, #4 + ldr r6, [r4, r0] + cmp r1, #0 + bne _0224595C + cmp r5, #4 + bhi _0224595C + add r1, r5, r5 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022458C0: ; jump table + .short _022458CA - _022458C0 - 2 ; case 0 + .short _022458DE - _022458C0 - 2 ; case 1 + .short _022458F2 - _022458C0 - 2 ; case 2 + .short _02245924 - _022458C0 - 2 ; case 3 + .short _02245934 - _022458C0 - 2 ; case 4 +_022458CA: + add r0, r4, #0 + bl ov62_02234520 + ldr r0, _02245960 ; =0x000004C5 + mov r1, #5 + strb r5, [r6, r0] + add r0, r4, #0 + bl ov62_0222FB60 + pop {r3, r4, r5, r6, r7, pc} +_022458DE: + add r0, r4, #0 + bl ov62_02234520 + ldr r0, _02245960 ; =0x000004C5 + mov r1, #5 + strb r5, [r6, r0] + add r0, r4, #0 + bl ov62_0222FB60 + pop {r3, r4, r5, r6, r7, pc} +_022458F2: + add r0, #0x2c + ldr r0, [r4, r0] + bl sub_02030BFC + add r7, r0, #0 + add r0, r4, #0 + bl ov62_02234520 + cmp r7, #0 + bne _02245916 + ldr r0, _02245964 ; =0x00000564 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x80 + bl ov62_02231B3C + pop {r3, r4, r5, r6, r7, pc} +_02245916: + ldr r0, _02245960 ; =0x000004C5 + mov r1, #5 + strb r5, [r6, r0] + add r0, r4, #0 + bl ov62_0222FB60 + pop {r3, r4, r5, r6, r7, pc} +_02245924: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #4 + bl ov62_0222FB60 + pop {r3, r4, r5, r6, r7, pc} +_02245934: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_02241780 + cmp r0, #0 + bne _02245954 + ldr r0, _02245964 ; =0x00000564 + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x74 + bl ov62_02231B3C + pop {r3, r4, r5, r6, r7, pc} +_02245954: + add r0, r4, #0 + mov r1, #0xc + bl ov62_0222FB60 +_0224595C: + pop {r3, r4, r5, r6, r7, pc} + nop +_02245960: .word 0x000004C5 +_02245964: .word 0x00000564 + thumb_func_end ov62_022458A0 + + thumb_func_start ov62_02245968 +ov62_02245968: ; 0x02245968 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r1, #0 + bne _0224598E + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02242748 + cmp r0, #0 + bne _02245986 + ldr r0, _02245990 ; =0x00000564 + bl sub_02005748 + pop {r3, r4, r5, pc} +_02245986: + add r0, r4, #0 + add r1, r5, #0 + bl ov62_022427D0 +_0224598E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245990: .word 0x00000564 + thumb_func_end ov62_02245968 + + thumb_func_start ov62_02245994 +ov62_02245994: ; 0x02245994 + push {r3, r4, r5, lr} + add r4, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r5, [r4, r2] + cmp r1, #0 + bne _02245A24 + cmp r0, #3 + bhi _02245A24 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022459B2: ; jump table + .short _022459BA - _022459B2 - 2 ; case 0 + .short _022459CA - _022459B2 - 2 ; case 1 + .short _022459F0 - _022459B2 - 2 ; case 2 + .short _02245A16 - _022459B2 - 2 ; case 3 +_022459BA: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0x13 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_022459CA: + add r0, r4, #0 + bl ov62_02234520 + bl sub_0202F250 + cmp r0, #0 + beq _022459E2 + add r0, r4, #0 + mov r1, #0x14 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_022459E2: + mov r0, #0x14 + str r0, [r5, #0xc] + add r0, r4, #0 + mov r1, #0x1d + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_022459F0: + add r0, r4, #0 + bl ov62_02234520 + bl sub_0202F250 + cmp r0, #0 + beq _02245A08 + add r0, r4, #0 + mov r1, #0x16 + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02245A08: + mov r0, #0x16 + str r0, [r5, #0xc] + add r0, r4, #0 + mov r1, #0x1d + bl ov62_0222FB60 + pop {r3, r4, r5, pc} +_02245A16: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0x15 + bl ov62_0222FB60 +_02245A24: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02245994 + + thumb_func_start ov62_02245A28 +ov62_02245A28: ; 0x02245A28 + push {r4, lr} + add r4, r2, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r3, [r4, r2] + cmp r1, #0 + bne _02245A8C + cmp r0, #3 + bhi _02245A8C + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02245A46: ; jump table + .short _02245A4E - _02245A46 - 2 ; case 0 + .short _02245A4E - _02245A46 - 2 ; case 1 + .short _02245A4E - _02245A46 - 2 ; case 2 + .short _02245A7E - _02245A46 - 2 ; case 3 +_02245A4E: + add r1, r0, #1 + mov r0, #0x72 + lsl r0, r0, #2 + str r1, [r3, r0] + ldr r0, [r3, r0] + add r2, #0x2c + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, r2] + cmp r0, #0 + beq _02245A6E + add r0, r4, #0 + mov r1, #0x19 + bl ov62_0222FB60 + b _02245A76 +_02245A6E: + add r0, r4, #0 + mov r1, #0x1c + bl ov62_0222FB60 +_02245A76: + add r0, r4, #0 + bl ov62_02234520 + pop {r4, pc} +_02245A7E: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0x18 + bl ov62_0222FB60 +_02245A8C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02245A28 + + thumb_func_start ov62_02245A90 +ov62_02245A90: ; 0x02245A90 + push {r4, lr} + add r4, r2, #0 + cmp r1, #0 + bne _02245AC6 + cmp r0, #0 + beq _02245AA2 + cmp r0, #1 + beq _02245AB8 + pop {r4, pc} +_02245AA2: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_0224576C + add r0, r4, #0 + mov r1, #0x1c + bl ov62_0222FB60 + pop {r4, pc} +_02245AB8: + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + mov r1, #0x1b + bl ov62_0222FB60 +_02245AC6: + pop {r4, pc} + thumb_func_end ov62_02245A90 + + thumb_func_start ov62_02245AC8 +ov62_02245AC8: ; 0x02245AC8 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + ldr r0, [r4, #0x14] + bne _02245AF0 + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_020129D0 + ldr r0, [r4, #0x30] + mov r1, #0x80 + mov r2, #0xa8 + bl sub_0200D4C4 + b _02245B08 +_02245AF0: + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_020129D0 + ldr r0, [r4, #0x30] + mov r1, #0x50 + mov r2, #0xa8 + bl sub_0200D4C4 +_02245B08: + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x18] + sub r2, #0x2c + bl sub_020128C4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x34] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02245AC8 + + thumb_func_start ov62_02245B24 +ov62_02245B24: ; 0x02245B24 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + mov r1, #1 + bl ov62_022312CC + add r0, r4, #0 + mov r1, #1 + bl ov62_022313E0 + str r0, [r5, #0x14] + add r0, r4, #0 + mov r1, #1 + bl ov62_022313E0 + str r0, [r5, #0x30] + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #1 + bl ov62_0223118C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #1 + bl ov62_0223118C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x6f + bl ov62_0223124C + ldr r0, [r5, #0x14] + mov r1, #0x20 + mov r2, #0xa8 + bl sub_0200D4C4 + ldr r0, [r5, #0x30] + mov r1, #0x80 + mov r2, #0xa8 + bl sub_0200D4C4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r5, #0x18] + sub r2, #0x2c + bl sub_020128C4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r5, #0x34] + sub r2, #0x2c + bl sub_020128C4 + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_020129D0 + ldr r0, [r5, #0x34] + mov r1, #1 + bl sub_020129D0 + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #1 + bl sub_0200D364 + add r0, r4, #0 + mov r1, #0 + bl ov62_02245AC8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02245B24 + + thumb_func_start ov62_02245BD8 +ov62_02245BD8: ; 0x02245BD8 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] + add r0, r5, #0 + add r0, #0x10 + bl ov62_022312B0 + add r0, r5, #0 + add r0, #0x2c + bl ov62_022312B0 + ldr r0, [r5, #0x14] + bl sub_0200D0F4 + ldr r0, [r5, #0x30] + bl sub_0200D0F4 + add r0, r4, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02245BD8 + + thumb_func_start ov62_02245C08 +ov62_02245C08: ; 0x02245C08 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r4, [r0, r2] + cmp r1, #0 + ldr r0, [r4, #0x30] + bne _02245C30 + mov r1, #1 + bl sub_0200D3F4 + ldr r0, [r4, #0x34] + mov r1, #1 + bl sub_020129D0 + ldr r0, [r4, #0x14] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + b _02245C48 +_02245C30: + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r4, #0x34] + mov r1, #0 + bl sub_020129D0 + ldr r0, [r4, #0x14] + mov r1, #0x50 + mov r2, #0xe8 + bl sub_0200D4C4 +_02245C48: + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x18] + sub r2, #0x2c + bl sub_020128C4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x34] + sub r2, #0x2c + bl sub_020128C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02245C08 + + thumb_func_start ov62_02245C64 +ov62_02245C64: ; 0x02245C64 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + mov r1, #2 + bl ov62_022312CC + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + str r0, [r4, #0x14] + add r0, r5, #0 + mov r1, #2 + bl ov62_022313E0 + str r0, [r4, #0x30] + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #2 + bl ov62_0223118C + ldr r0, _02245D4C ; =0x0000086C + ldr r0, [r5, r0] + cmp r0, #0xd2 + bne _02245CDA + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x6f + bl ov62_0223124C + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x30] + mov r1, #1 + bl sub_0200D364 + b _02245D06 +_02245CDA: + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r4, #0 + add r1, r5, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r4, #0x30] + mov r1, #3 + bl sub_0200D364 +_02245D06: + ldr r0, [r4, #0x14] + mov r1, #0x20 + mov r2, #0xe8 + bl sub_0200D4C4 + ldr r0, [r4, #0x30] + mov r1, #0x80 + mov r2, #0xe8 + bl sub_0200D4C4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x18] + sub r2, #0x2c + bl sub_020128C4 + mov r1, #0x24 + add r2, r1, #0 + ldr r0, [r4, #0x34] + sub r2, #0x2c + bl sub_020128C4 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_020129D0 + ldr r0, [r4, #0x34] + mov r1, #1 + bl sub_020129D0 + add r0, r5, #0 + mov r1, #0 + bl ov62_02245C08 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245D4C: .word 0x0000086C + thumb_func_end ov62_02245C64 + + thumb_func_start ov62_02245D50 +ov62_02245D50: ; 0x02245D50 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r5, [r4, r0] + add r0, r5, #0 + add r0, #0x10 + bl ov62_022312B0 + add r0, r5, #0 + add r0, #0x2c + bl ov62_022312B0 + ldr r0, [r5, #0x14] + bl sub_0200D0F4 + ldr r0, [r5, #0x30] + bl sub_0200D0F4 + add r0, r4, #0 + bl ov62_022313BC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02245D50 + + thumb_func_start ov62_02245D80 +ov62_02245D80: ; 0x02245D80 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #3 + bls _02245D92 + b _02245EAE +_02245D92: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02245D9E: ; jump table + .short _02245DA6 - _02245D9E - 2 ; case 0 + .short _02245DE4 - _02245D9E - 2 ; case 1 + .short _02245DFC - _02245D9E - 2 ; case 2 + .short _02245E66 - _02245D9E - 2 ; case 3 +_02245DA6: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _02245DC2 + sub r0, #0xc0 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _02245DCC +_02245DC2: + add r4, #0x80 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02232394 +_02245DCC: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02245EC8 +_02245DE4: + mov r2, #1 + add r0, r4, #0 + add r1, r4, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02245EC8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02245EC8 +_02245DFC: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _02245E2C + add r0, r4, #0 + add r0, #0x80 + add r1, r5, #0 + bl ov62_02232378 + add r4, #0x80 + add r0, r4, #0 + mov r1, #0 + bl ov62_022323B8 + add r0, r5, #0 + mov r1, #0x50 + mov r2, #3 + bl ov62_022343B8 + b _02245E56 +_02245E2C: + sub r0, #0xc0 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r5, #0 + mov r2, #3 + bl ov62_022343B8 +_02245E56: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02245EC8 +_02245E66: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _02245EC8 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _02245E8C + add r4, #0x80 + add r0, r4, #0 + mov r1, #1 + bl ov62_022323B8 + b _02245E96 +_02245E8C: + sub r0, #0xc0 + add r0, r4, r0 + mov r1, #1 + bl ov62_0223427C +_02245E96: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02245EC8 +_02245EAE: + mov r1, #0x73 + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #1 + eor r0, r2 + str r0, [r4, r1] + ldr r1, [r4, r1] + add r0, r5, #0 + add r1, #0x79 + bl ov62_022455E4 + mov r0, #1 + pop {r3, r4, r5, pc} +_02245EC8: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02245D80 + + thumb_func_start ov62_02245ECC +ov62_02245ECC: ; 0x02245ECC + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02245EE6 + cmp r1, #1 + beq _02245F32 + cmp r1, #2 + beq _02245F98 + b _02245FDC +_02245EE6: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _02245F02 + sub r0, #0xc0 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _02245F0C +_02245F02: + add r4, #0x80 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_02232394 +_02245F0C: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022455C4 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02245FE0 +_02245F32: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02245F7E + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02245D50 + add r0, r5, #0 + bl ov62_02244BE4 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02245F7E: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02245FE0 +_02245F98: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #1 + bl ov62_022315E0 + cmp r0, #0 + beq _02245FC2 + add r0, r5, #0 + mov r1, #0x64 + mov r2, #0 + bl ov62_022449B8 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02245FC2: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02245FE0 +_02245FDC: + mov r0, #1 + pop {r3, r4, r5, pc} +_02245FE0: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02245ECC + + thumb_func_start ov62_02245FE4 +ov62_02245FE4: ; 0x02245FE4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + beq _02245FFC + cmp r0, #1 + beq _0224605C + b _02246082 +_02245FFC: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02246042 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x54 + mov r3, #7 + bl sub_0200710C + mov r2, #0x72 + lsl r2, r2, #2 + ldr r2, [r4, r2] + add r0, r5, #0 + mov r1, #0x66 + bl ov62_02244AB4 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02246042: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02246088 +_0224605C: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02246088 + add r0, r5, #0 + bl ov62_0224568C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02246088 +_02246082: + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, pc} +_02246088: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02245FE4 + + thumb_func_start ov62_02246090 +ov62_02246090: ; 0x02246090 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + ldr r0, [r5, #8] + cmp r0, #0 + beq _022460AA + cmp r0, #1 + beq _022460BA + cmp r0, #2 + beq _022460E8 + b _02246134 +_022460AA: + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02246138 +_022460BA: + add r0, r4, #0 + add r1, r4, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _02246138 + add r0, r5, #0 + bl ov62_0224576C + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02246138 +_022460E8: + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _0224611A + add r0, r5, #0 + mov r1, #0x64 + mov r2, #0 + bl ov62_02244AB4 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_0224611A: + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02246138 +_02246134: + mov r0, #1 + pop {r3, r4, r5, pc} +_02246138: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02246090 + + thumb_func_start ov62_0224613C +ov62_0224613C: ; 0x0224613C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r0, #0 + mov r2, #0x86 + lsl r2, r2, #4 + ldr r1, [r4, #8] + ldr r5, [r4, r2] + cmp r1, #7 + bls _02246150 + b _02246350 +_02246150: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224615C: ; jump table + .short _0224616C - _0224615C - 2 ; case 0 + .short _0224617C - _0224615C - 2 ; case 1 + .short _022461CE - _0224615C - 2 ; case 2 + .short _022461EE - _0224615C - 2 ; case 3 + .short _02246224 - _0224615C - 2 ; case 4 + .short _02246268 - _0224615C - 2 ; case 5 + .short _022462AE - _0224615C - 2 ; case 6 + .short _022462FA - _0224615C - 2 ; case 7 +_0224616C: + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246402 +_0224617C: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _022461B4 + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r1, _02246408 ; =0x00000116 + add r0, r4, #0 + mov r2, #0 + bl ov62_02244AB4 + add r0, r4, #0 + bl ov62_022342BC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022461B4: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02246402 +_022461CE: + mov r1, #0x72 + sub r2, #0xc4 + lsl r1, r1, #2 + ldrb r2, [r5, r2] + ldr r1, [r5, r1] + bl ov62_022337F0 + cmp r0, #0 + beq _022462B6 + ldr r0, _0224640C ; =0x0000079C + mov r1, #0 + strb r1, [r5, r0] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246402 +_022461EE: + mov r1, #0x6f + lsl r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0x80 + mov r3, #0x60 + bl ov62_02234358 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0x18 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + ldr r0, _02246410 ; =0x00000565 + bl sub_02005748 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246402 +_02246224: + bl ov62_022411B8 + cmp r0, #0 + bne _02246232 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_02246232: + mov r1, #0x46 + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #0 + bl ov62_02244AB4 + bl sub_0202FE04 + mov r1, #4 + mov r2, #0 + bl sub_0202FE98 + add r6, r0, #0 + add r5, r1, #0 + add r0, r4, #0 + bl ov62_0224112C + add r1, r6, #0 + add r2, r5, #0 + bl ov61_0222B550 + cmp r0, #1 + bne _022462B6 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246402 +_02246268: + bl ov62_022411B8 + cmp r0, #0 + bne _02246276 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_02246276: + add r0, r4, #0 + bl ov62_0224112C + add r1, sp, #4 + bl ov61_0222BB48 + cmp r0, #1 + ldr r0, _02246410 ; =0x00000565 + bne _02246290 + mov r1, #0 + bl sub_020057A4 + b _0224629C +_02246290: + mov r1, #0 + bl sub_020057A4 + ldr r0, _02246414 ; =0x0000055F + bl sub_02005748 +_0224629C: + ldr r0, [r4, #8] + ldr r1, _02246418 ; =0x00000119 + add r0, r0, #1 + str r0, [r4, #8] + add r0, r4, #0 + mov r2, #0 + bl ov62_02244AB4 + b _02246402 +_022462AE: + bl sub_02022798 + cmp r0, #0 + bne _022462B8 +_022462B6: + b _02246402 +_022462B8: + add r0, r4, #0 + bl ov62_02231A88 + add r0, r4, #0 + bl ov62_02244CA4 + mov r0, #0x6f + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0208B9E0 + mov r0, #0x6f + lsl r0, r0, #4 + mov r1, #0 + ldr r0, [r4, r0] + add r2, r1, #0 + bl sub_0208BA08 + add r0, r4, #0 + bl ov62_022339A0 + add r0, r4, #0 + bl ov62_022338A8 + ldr r0, _0224641C ; =0x0000049C + add r0, r4, r0 + bl ov62_02233310 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246402 +_022462FA: + ldr r0, _02246420 ; =0x00000608 + ldr r0, [r5, r0] + bl sub_02024034 + ldr r0, _02246424 ; =0x0000060C + ldr r0, [r5, r0] + bl sub_02024034 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_02024034 + add r5, #8 + add r0, r5, #0 + bl ov62_02231688 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r4, #0 + bl ov62_022444A0 + add r0, r4, #0 + bl ov62_0223146C + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #1 + mov r1, #0x66 + bl sub_020397C8 + add r0, r4, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246402 +_02246350: + add r0, r4, #0 + bl ov62_02233790 + cmp r0, #0 + beq _02246402 + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _022463D2 + add r0, r4, #0 + bl ov62_022318E8 + add r0, r5, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r4, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r4, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r4, #0x10] + add r0, r4, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r4, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r5, #0 + bl sub_020181C4 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019EBC + bl sub_0202F250 + cmp r0, #1 + bne _02246402 + bl sub_0202F22C + b _02246402 +_022463D2: + ldr r0, [r4, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_02246402: + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02246408: .word 0x00000116 +_0224640C: .word 0x0000079C +_02246410: .word 0x00000565 +_02246414: .word 0x0000055F +_02246418: .word 0x00000119 +_0224641C: .word 0x0000049C +_02246420: .word 0x00000608 +_02246424: .word 0x0000060C + thumb_func_end ov62_0224613C + + thumb_func_start ov62_02246428 +ov62_02246428: ; 0x02246428 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r1, [r4, #8] + ldr r5, [r4, r0] + cmp r1, #3 + bls _0224643C + b _02246634 +_0224643C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246448: ; jump table + .short _02246450 - _02246448 - 2 ; case 0 + .short _02246478 - _02246448 - 2 ; case 1 + .short _022464B2 - _02246448 - 2 ; case 2 + .short _022465CA - _02246448 - 2 ; case 3 +_02246450: + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224663A +_02246478: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02246498 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02246498: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224663A +_022464B2: + add r0, #0xc + ldr r0, [r4, r0] + cmp r0, #0xd2 + bne _022464E6 + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #3 + bl sub_0200D364 +_022464E6: + add r0, r4, #0 + bl ov62_022455C4 + add r0, r4, #0 + bl ov62_02245640 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _0224656C + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234228 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _022465A2 +_0224656C: + add r0, r5, #0 + add r0, #0x80 + add r1, r4, #0 + bl ov62_02232394 + add r0, r5, #0 + add r0, #0x80 + add r1, r4, #0 + bl ov62_02232378 + add r5, #0x80 + add r0, r5, #0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_022465A2: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _0224663A +_022465CA: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _0224661A + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _022465FA + sub r0, #0xc0 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _02246604 +_022465FA: + add r0, r5, #0 + add r0, #0x80 + mov r1, #1 + bl ov62_022323B8 +_02246604: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_0224661A: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224663A +_02246634: + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, pc} +_0224663A: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02246428 + + thumb_func_start ov62_02246640 +ov62_02246640: ; 0x02246640 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #3 + bls _02246654 + b _0224683E +_02246654: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246660: ; jump table + .short _02246668 - _02246660 - 2 ; case 0 + .short _02246694 - _02246660 - 2 ; case 1 + .short _022466D4 - _02246660 - 2 ; case 2 + .short _022467D4 - _02246660 - 2 ; case 3 +_02246668: + bl ov62_02231A88 + ldr r0, [r4, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0x24] + mov r1, #6 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246844 +_02246694: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022466BA + add r0, r4, #0 + bl ov62_02244CA4 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022466BA: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02246844 +_022466D4: + bl ov62_02245C64 + ldr r0, _0224684C ; =0x0000086C + ldr r0, [r4, r0] + cmp r0, #0xd2 + bne _0224670C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x10 + add r1, #0x14 + mov r2, #3 + bl ov62_0223124C + add r0, r5, #0 + add r1, r4, #0 + add r0, #0x2c + add r1, #0x14 + mov r2, #0x5e + bl ov62_0223124C + ldr r0, [r5, #0x14] + mov r1, #0 + bl sub_0200D364 + ldr r0, [r5, #0x30] + mov r1, #3 + bl sub_0200D364 +_0224670C: + add r0, r4, #0 + bl ov62_02245640 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r4, #0 + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _02246780 + sub r0, #0xc0 + add r0, r5, r0 + add r1, r4, #0 + bl ov62_02234214 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl ov62_0223427C + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov62_02233FEC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #3 + bl ov62_022343B8 + b _022467AC +_02246780: + add r0, r5, #0 + add r0, #0x80 + add r1, r4, #0 + bl ov62_02232378 + add r5, #0x80 + add r0, r5, #0 + mov r1, #0 + bl ov62_022323B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x50 + mov r3, #3 + bl sub_0200710C +_022467AC: + add r0, r4, #0 + mov r1, #0 + bl ov62_02234540 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #6 + mov r3, #7 + bl sub_0200710C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02246844 +_022467D4: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + mov r2, #0 + add r0, r5, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _02246824 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _02246804 + sub r0, #0xc0 + add r0, r5, r0 + mov r1, #1 + bl ov62_0223427C + b _0224680E +_02246804: + add r0, r5, #0 + add r0, #0x80 + mov r1, #1 + bl ov62_022323B8 +_0224680E: + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_02246824: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02246844 +_0224683E: + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, pc} +_02246844: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0224684C: .word 0x0000086C + thumb_func_end ov62_02246640 + + thumb_func_start ov62_02246850 +ov62_02246850: ; 0x02246850 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0224686C + cmp r1, #1 + beq _0224688C + cmp r1, #2 + beq _0224689C + b _0224692A +_0224686C: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x66 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02246930 +_0224688C: + bl sub_0200F2AC + cmp r0, #1 + bne _02246930 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02246930 +_0224689C: + mov r1, #1 + bl ov62_02234540 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + bne _022468B8 + sub r0, #0xc0 + add r0, r4, r0 + add r1, r5, #0 + bl ov62_02234228 + b _022468C2 +_022468B8: + add r0, r4, #0 + add r0, #0x80 + add r1, r5, #0 + bl ov62_02232394 +_022468C2: + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, _02246938 ; =0x00000608 + ldr r0, [r4, r0] + bl sub_02024034 + ldr r0, _0224693C ; =0x0000060C + ldr r0, [r4, r0] + bl sub_02024034 + mov r0, #0x61 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02024034 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_022444A0 + add r0, r5, #0 + bl ov62_022455C4 + add r0, r5, #0 + bl ov62_02245D50 + add r0, r5, #0 + bl ov62_022314A8 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r1, [r5, #0x10] + add r0, r5, #0 + ldr r1, [r1, #0] + bl ov62_022300C8 + ldr r0, _02246940 ; =0x00000868 + mov r1, #1 + ldr r0, [r5, r0] + mov r2, #0 + bl sub_0208BA84 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02246930 +_0224692A: + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_02246930: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_02246938: .word 0x00000608 +_0224693C: .word 0x0000060C +_02246940: .word 0x00000868 + thumb_func_end ov62_02246850 + + thumb_func_start ov62_02246944 +ov62_02246944: ; 0x02246944 + push {r4, lr} + mov r2, #0x86 + lsl r2, r2, #4 + ldr r1, [r1, #0] + ldr r4, [r0, r2] + cmp r1, #1 + beq _02246964 + bl ov62_0224112C + bl ov61_0222BDF0 + mov r2, #0x4b + lsl r2, r2, #4 + str r0, [r4, r2] + add r0, r2, #4 + str r1, [r4, r0] +_02246964: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02246944 + + thumb_func_start ov62_02246968 +ov62_02246968: ; 0x02246968 + push {r4, lr} + ldr r1, [r1, #0] + add r4, r0, #0 + cmp r1, #1 + beq _02246990 + bl ov62_0224112C + ldr r1, _02246994 ; =0x000008B4 + add r1, r4, r1 + bl ov61_0222BED8 + add r0, r4, #0 + bl ov62_0223371C + ldr r0, _02246994 ; =0x000008B4 + ldr r0, [r4, r0] + add r0, #0xa7 + ldrb r1, [r0] + ldr r0, _02246998 ; =0x00002604 + strb r1, [r4, r0] +_02246990: + pop {r4, pc} + nop +_02246994: .word 0x000008B4 +_02246998: .word 0x00002604 + thumb_func_end ov62_02246968 + + thumb_func_start ov62_0224699C +ov62_0224699C: ; 0x0224699C + bx lr + ; .align 2, 0 + thumb_func_end ov62_0224699C + + thumb_func_start ov62_022469A0 +ov62_022469A0: ; 0x022469A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r4, r0, #0 + mov r0, #0x66 + add r5, r1, #0 + bl ov62_02231690 + add r6, r0, #0 + mov r0, #0x4b + lsl r0, r0, #4 + ldr r7, [r4, r0] + add r0, r0, #4 + ldr r4, [r4, r0] + mov r0, #0xff + mov r1, #0x66 + str r4, [sp, #0x14] + bl sub_02023790 + str r0, [sp, #0x18] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x1c] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x20] + ldr r2, _02246AF0 ; =0x000186A0 + add r0, r7, #0 + add r1, r4, #0 + mov r3, #0 + bl sub_020E1ED4 + str r0, [sp, #0x24] + add r4, r1, #0 + ldr r0, [r5, #0x48] + ldr r1, _02246AF4 ; =0x00000127 + bl sub_0200B1EC + str r0, [sp, #0x28] + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + str r0, [sp, #0x2c] + ldr r1, [sp, #0x14] + ldr r2, _02246AF0 ; =0x000186A0 + add r0, r7, #0 + mov r3, #0 + bl sub_020E1EE0 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x18] + mov r2, #5 + mov r3, #2 + bl sub_020238A0 + ldr r0, [sp, #0x24] + ldr r2, _02246AF0 ; =0x000186A0 + add r1, r4, #0 + mov r3, #0 + bl sub_020E1EE0 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x1c] + mov r2, #5 + mov r3, #2 + bl sub_020238A0 + ldr r0, [sp, #0x24] + ldr r2, _02246AF0 ; =0x000186A0 + add r1, r4, #0 + mov r3, #0 + bl sub_020E1ED4 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + mov r2, #2 + ldr r0, [sp, #0x20] + add r3, r2, #0 + bl sub_020238A0 + mov r0, #1 + str r0, [sp] + mov r1, #2 + ldr r2, [sp, #0x18] + add r0, r6, #0 + mov r3, #0 + str r1, [sp, #4] + bl sub_0200B48C + mov r1, #1 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + add r0, r6, #0 + mov r3, #0 + bl sub_0200B48C + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x20] + add r0, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x28] + add r0, r6, #0 + bl sub_0200C388 + ldr r0, _02246AF8 ; =0x000008A4 + mov r1, #0xcc + add r0, r5, r0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02246AFC ; =0x000F0D00 + ldr r2, [sp, #0x2c] + str r0, [sp, #8] + ldr r0, _02246AF8 ; =0x000008A4 + add r3, r1, #0 + add r0, r5, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _02246AF8 ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A9A4 + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x2c] + bl sub_020237BC + add r0, r6, #0 + bl sub_0200C41C + add r0, r6, #0 + bl sub_0200B3F0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_02246AF0: .word 0x000186A0 +_02246AF4: .word 0x00000127 +_02246AF8: .word 0x000008A4 +_02246AFC: .word 0x000F0D00 + thumb_func_end ov62_022469A0 + + .rodata + + + .global Unk_ov62_02249130 +Unk_ov62_02249130: ; 0x02249130 + .incbin "incbin/overlay62_rodata.bin", 0xA04, 0xA08 - 0xA04 + + .global Unk_ov62_02249134 +Unk_ov62_02249134: ; 0x02249134 + .incbin "incbin/overlay62_rodata.bin", 0xA08, 0xA0C - 0xA08 + + .global Unk_ov62_02249138 +Unk_ov62_02249138: ; 0x02249138 + .incbin "incbin/overlay62_rodata.bin", 0xA0C, 0xA10 - 0xA0C + + .global Unk_ov62_0224913C +Unk_ov62_0224913C: ; 0x0224913C + .incbin "incbin/overlay62_rodata.bin", 0xA10, 0xA18 - 0xA10 + + .global Unk_ov62_02249144 +Unk_ov62_02249144: ; 0x02249144 + .incbin "incbin/overlay62_rodata.bin", 0xA18, 0xA24 - 0xA18 + + .global Unk_ov62_02249150 +Unk_ov62_02249150: ; 0x02249150 + .incbin "incbin/overlay62_rodata.bin", 0xA24, 0xA30 - 0xA24 + + .global Unk_ov62_0224915C +Unk_ov62_0224915C: ; 0x0224915C + .incbin "incbin/overlay62_rodata.bin", 0xA30, 0xA40 - 0xA30 + + .global Unk_ov62_0224916C +Unk_ov62_0224916C: ; 0x0224916C + .incbin "incbin/overlay62_rodata.bin", 0xA40, 0xA50 - 0xA40 + + .global Unk_ov62_0224917C +Unk_ov62_0224917C: ; 0x0224917C + .incbin "incbin/overlay62_rodata.bin", 0xA50, 0xA60 - 0xA50 + + .global Unk_ov62_0224918C +Unk_ov62_0224918C: ; 0x0224918C + .incbin "incbin/overlay62_rodata.bin", 0xA60, 0xA70 - 0xA60 + + .global Unk_ov62_0224919C +Unk_ov62_0224919C: ; 0x0224919C + .incbin "incbin/overlay62_rodata.bin", 0xA70, 0xA80 - 0xA70 + + .global Unk_ov62_022491AC +Unk_ov62_022491AC: ; 0x022491AC + .incbin "incbin/overlay62_rodata.bin", 0xA80, 0xA94 - 0xA80 + + .global Unk_ov62_022491C0 +Unk_ov62_022491C0: ; 0x022491C0 + .incbin "incbin/overlay62_rodata.bin", 0xA94, 0xAAC - 0xA94 + + .global Unk_ov62_022491D8 +Unk_ov62_022491D8: ; 0x022491D8 + .incbin "incbin/overlay62_rodata.bin", 0xAAC, 0xAC4 - 0xAAC + + .global Unk_ov62_022491F0 +Unk_ov62_022491F0: ; 0x022491F0 + .incbin "incbin/overlay62_rodata.bin", 0xAC4, 0xAE8 - 0xAC4 + + .global Unk_ov62_02249214 +Unk_ov62_02249214: ; 0x02249214 + .incbin "incbin/overlay62_rodata.bin", 0xAE8, 0xB14 - 0xAE8 + + .global Unk_ov62_02249240 +Unk_ov62_02249240: ; 0x02249240 + .incbin "incbin/overlay62_rodata.bin", 0xB14, 0xB40 - 0xB14 + + .global Unk_ov62_0224926C +Unk_ov62_0224926C: ; 0x0224926C + .incbin "incbin/overlay62_rodata.bin", 0xB40, 0xB6C - 0xB40 + + .global Unk_ov62_02249298 +Unk_ov62_02249298: ; 0x02249298 + .incbin "incbin/overlay62_rodata.bin", 0xB6C, 0xB98 - 0xB6C + + .global Unk_ov62_022492C4 +Unk_ov62_022492C4: ; 0x022492C4 + .incbin "incbin/overlay62_rodata.bin", 0xB98, 0xBC4 - 0xB98 + + .global Unk_ov62_022492F0 +Unk_ov62_022492F0: ; 0x022492F0 + .incbin "incbin/overlay62_rodata.bin", 0xBC4, 0xBF4 - 0xBC4 + + .global Unk_ov62_02249320 +Unk_ov62_02249320: ; 0x02249320 + .incbin "incbin/overlay62_rodata.bin", 0xBF4, 0xC24 - 0xBF4 + + .global Unk_ov62_02249350 +Unk_ov62_02249350: ; 0x02249350 + .incbin "incbin/overlay62_rodata.bin", 0xC24, 0xC54 - 0xC24 + + .global Unk_ov62_02249380 +Unk_ov62_02249380: ; 0x02249380 + .incbin "incbin/overlay62_rodata.bin", 0xC54, 0xCA4 - 0xC54 + + .global Unk_ov62_022493D0 +Unk_ov62_022493D0: ; 0x022493D0 + .incbin "incbin/overlay62_rodata.bin", 0xCA4, 0xD04 - 0xCA4 + + .global Unk_ov62_02249430 +Unk_ov62_02249430: ; 0x02249430 + .incbin "incbin/overlay62_rodata.bin", 0xD04, 0xD7C - 0xD04 + + .global Unk_ov62_022494A8 +Unk_ov62_022494A8: ; 0x022494A8 + .incbin "incbin/overlay62_rodata.bin", 0xD7C, 0xEEC - 0xD7C + + .global Unk_ov62_02249618 +Unk_ov62_02249618: ; 0x02249618 + .incbin "incbin/overlay62_rodata.bin", 0xEEC, 0xF00 - 0xEEC + + .global Unk_ov62_0224962C +Unk_ov62_0224962C: ; 0x0224962C + .incbin "incbin/overlay62_rodata.bin", 0xF00, 0xF54 - 0xF00 + + .global Unk_ov62_02249680 +Unk_ov62_02249680: ; 0x02249680 + .incbin "incbin/overlay62_rodata.bin", 0xF54, 0x80 + + + .data + + + .global Unk_ov62_02249944 +Unk_ov62_02249944: ; 0x02249944 + .incbin "incbin/overlay62_data.bin", 0x184, 0x14 + diff --git a/asm/ov62_02246B00.s b/asm/ov62_02246B00.s new file mode 100644 index 000000000..ed7344dd1 --- /dev/null +++ b/asm/ov62_02246B00.s @@ -0,0 +1,2475 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02246B00 +ov62_02246B00: ; 0x02246B00 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x20 + str r0, [sp] + add r5, r2, #0 + add r7, r3, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x20 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r1, [sp] + add r0, r6, #1 + str r6, [r4, #0] + bl sub_02023790 + str r0, [r4, #0x18] + str r7, [r4, #0x1c] + mov r2, #0 + add r1, r5, #0 + add r3, r4, #0 +_02246B2E: + ldr r0, [r1, #0] + add r2, r2, #1 + str r0, [r3, #4] + add r1, r1, #4 + add r3, r3, #4 + cmp r2, #3 + blt _02246B2E + sub r0, r2, #1 + lsl r0, r0, #2 + ldr r1, [r5, r0] + lsl r0, r2, #2 + add r0, r4, r0 + str r1, [r0, #4] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_02246B00 + + thumb_func_start ov62_02246B4C +ov62_02246B4C: ; 0x02246B4C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _02246B5A + bl sub_02022974 +_02246B5A: + cmp r4, #0 + bne _02246B62 + bl sub_02022974 +_02246B62: + ldr r0, [r4, #0x18] + bl sub_020237BC + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov62_02246B4C + + thumb_func_start ov62_02246B70 +ov62_02246B70: ; 0x02246B70 + push {r3, r4} + mov r2, #0x82 + lsl r2, r2, #2 + ldr r4, [r0, r2] + add r3, r2, #4 + str r4, [r0, r3] + str r1, [r0, r2] + add r1, r2, #0 + mov r3, #0 + add r1, #8 + str r3, [r0, r1] + add r1, r2, #0 + add r1, #0xc + str r3, [r0, r1] + add r1, r2, #0 + add r1, #0x10 + str r3, [r0, r1] + add r1, r2, #0 + add r1, #0x14 + str r3, [r0, r1] + ldr r1, [r0, r2] + cmp r1, #0 + beq _02246BC2 + sub r1, r1, #1 + lsl r1, r1, #2 + add r3, r0, r1 + add r1, r2, #0 + sub r1, #0x24 + ldrh r3, [r3, r1] + add r1, r2, #0 + add r1, #8 + str r3, [r0, r1] + ldr r1, [r0, r2] + sub r1, r1, #1 + lsl r1, r1, #2 + add r3, r0, r1 + add r1, r2, #0 + sub r1, #0x22 + ldrh r1, [r3, r1] + add r2, #0xc + str r1, [r0, r2] +_02246BC2: + mov r2, #0x83 + lsl r2, r2, #2 + ldr r1, [r0, r2] + cmp r1, #0 + beq _02246BF0 + sub r1, r1, #1 + lsl r1, r1, #2 + add r3, r0, r1 + add r1, r2, #0 + sub r1, #0x28 + ldrh r3, [r3, r1] + add r1, r2, #0 + add r1, #0xc + str r3, [r0, r1] + ldr r1, [r0, r2] + sub r1, r1, #1 + lsl r1, r1, #2 + add r3, r0, r1 + add r1, r2, #0 + sub r1, #0x26 + ldrh r1, [r3, r1] + add r2, #0x10 + str r1, [r0, r2] +_02246BF0: + pop {r3, r4} + bx lr + thumb_func_end ov62_02246B70 + + thumb_func_start ov62_02246BF4 +ov62_02246BF4: ; 0x02246BF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + mov r2, #0xa6 + lsl r2, r2, #2 + add r4, r2, #0 + mov r1, #1 + add r3, r0, #0 + str r1, [r3, r2] + mov r5, #0 + sub r4, #0xb4 + strh r5, [r3, r4] + add r4, r2, #0 + add r4, #0x14 + ldr r5, [r3, r4] + add r4, r2, #0 + sub r4, #0xb2 + strh r5, [r3, r4] + add r4, r2, #0 + add r4, #0x14 + ldr r5, [r3, r4] + add r4, r2, #0 + sub r4, #0xb0 + strh r5, [r3, r4] + add r4, r2, #0 + add r4, #0x14 + ldr r5, [r3, r4] + add r4, r2, #0 + add r4, #0x18 + ldr r3, [r3, r4] + add r4, r2, #0 + add r5, r5, r3 + add r6, r2, #0 + sub r4, #0xae + add r3, r0, #0 + strh r5, [r3, r4] + add r4, r2, #0 + add r4, #0x14 + ldr r5, [r3, r4] + add r4, r2, #0 + add r4, #0x18 + ldr r3, [r3, r4] + add r4, r2, #0 + add r5, r5, r3 + sub r4, #0xac + add r3, r0, #0 + strh r5, [r3, r4] + add r4, r2, #0 + add r5, r2, #0 + add r4, #0x1c + add r5, #0x14 + ldr r4, [r3, r4] + ldr r3, [r3, r5] + add r6, #0x18 + add r5, r0, #0 + ldr r5, [r5, r6] + sub r2, #0xaa + add r3, r3, r5 + add r4, r4, r3 + add r3, r0, #0 + str r0, [sp] + strh r4, [r3, r2] + bl ov62_02246B70 + mov r4, #0x81 + lsl r4, r4, #2 + add r3, r4, #0 + ldr r1, [sp] + mov r0, #0 + add r3, #0xa8 +_02246C7E: + ldr r2, [sp] + add r0, r0, #1 + ldr r5, [r2, r4] + ldr r2, [r1, r3] + add r1, r1, #4 + add r5, r5, r2 + ldr r2, [sp] + cmp r0, #3 + str r5, [r2, r4] + blt _02246C7E + ldr r4, _02246D5C ; =0x02249710 + add r3, sp, #8 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #0xab + ldr r0, [sp] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r2, #0 + cmp r0, #4 + beq _02246CB2 + mov r2, #1 +_02246CB2: + mov r0, #0xc + mul r0, r2 + add r3, sp, #8 + add r0, r3, r0 + mov r2, #0x77 + ldr r5, [sp] + mov r1, #0 + add r4, r0, #0 + lsl r2, r2, #2 +_02246CC4: + ldr r3, [r4, #0] + add r1, r1, #1 + strh r3, [r5, r2] + add r4, r4, #4 + add r5, r5, #2 + cmp r1, #3 + blt _02246CC4 + sub r2, r1, #1 + lsl r2, r2, #2 + ldr r2, [r0, r2] + ldr r0, [sp] + lsl r1, r1, #1 + add r1, r0, r1 + mov r0, #0x77 + lsl r0, r0, #2 + strh r2, [r1, r0] + ldr r1, [sp] + mov r0, #0 + mov r4, #0xab + mov r5, #0x15 + add r3, r0, #0 + add r2, r1, #0 + lsl r4, r4, #2 + lsl r5, r5, #4 +_02246CF4: + ldr r6, [r1, r4] + add r3, r3, #1 + add r0, r0, r6 + sub r6, r0, #1 + str r6, [r2, r5] + add r1, r1, #4 + add r2, #0x1c + cmp r3, #2 + blt _02246CF4 + ldr r0, [sp] + mov r5, #0 + mov r7, #0xab + mov ip, r5 + str r0, [sp, #4] + add r4, r0, #0 + lsl r7, r7, #2 +_02246D14: + mov r0, #0xab + ldr r2, [sp, #4] + lsl r0, r0, #2 + ldr r0, [r2, r0] + mov r1, #0 + cmp r0, #0 + ble _02246D40 + mov r0, ip + lsl r3, r0, #2 + ldr r0, [sp] + add r2, r4, #0 + add r3, r0, r3 + mov r0, ip + add r6, r0, #1 +_02246D30: + str r6, [r2, #4] + ldr r0, [r3, r7] + add r1, r1, #1 + add r2, #0x1c + add r4, #0x1c + add r5, r5, #1 + cmp r1, r0 + blt _02246D30 +_02246D40: + ldr r0, [sp, #4] + ldr r1, [sp] + add r0, r0, #4 + str r0, [sp, #4] + mov r0, ip + add r0, r0, #1 + mov ip, r0 + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r5, r0 + blt _02246D14 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246D5C: .word 0x02249710 + thumb_func_end ov62_02246BF4 + + thumb_func_start ov62_02246D60 +ov62_02246D60: ; 0x02246D60 + mov r2, #0x7d + lsl r2, r2, #2 + str r1, [r0, r2] + mov r3, #0 + add r1, r2, #4 + str r3, [r0, r1] + add r1, r2, #0 + add r1, #8 + str r3, [r0, r1] + add r2, #0xc + str r3, [r0, r2] + bx lr + thumb_func_end ov62_02246D60 + + thumb_func_start ov62_02246D78 +ov62_02246D78: ; 0x02246D78 + push {r4, lr} + add r4, r0, #0 + bl ov62_02246BF4 + add r0, r4, #0 + bl ov62_02247220 + add r0, r4, #0 + bl ov62_02247574 + add r0, r4, #0 + bl ov62_02247B48 + add r0, r4, #0 + bl ov62_02247754 + add r0, r4, #0 + mov r1, #0 + bl ov62_02247B88 + add r0, r4, #0 + bl ov62_0224784C + add r0, r4, #0 + bl ov62_02247CE0 + add r0, r4, #0 + mov r1, #1 + bl ov62_02246D60 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov62_02246D78 + + thumb_func_start ov62_02246DB8 +ov62_02246DB8: ; 0x02246DB8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x8d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02024034 + add r0, r4, #0 + bl ov62_02247694 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov62_02246DB8 + + thumb_func_start ov62_02246DD0 +ov62_02246DD0: ; 0x02246DD0 + push {r4, lr} + mov r1, #0x7f + add r4, r0, #0 + lsl r1, r1, #2 + ldr r2, [r4, r1] + cmp r2, #0 + bne _02246DE4 + add r0, r2, #1 + str r0, [r4, r1] + b _02246DF2 +_02246DE4: + bl ov62_022474A8 + mov r0, #0x8d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0202404C +_02246DF2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02246DD0 + + thumb_func_start ov62_02246DF8 +ov62_02246DF8: ; 0x02246DF8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x7f + add r5, r0, #0 + lsl r1, r1, #2 + ldr r2, [r5, r1] + cmp r2, #0 + beq _02246E0E + cmp r2, #1 + bne _02246E0C + b _02246F74 +_02246E0C: + b _0224701C +_02246E0E: + mov r1, #0 + add r2, r1, #0 + bl ov62_02247968 + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r6, #0 + cmp r0, #0 + ble _02246EB0 + ldr r7, _02247078 ; =0x02249974 + add r4, r5, #0 +_02246E26: + ldrb r0, [r4, #0x18] + cmp r0, #0 + beq _02246EA2 + mov r1, #0x14 + mov r2, #0x16 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, #0xc] + bl sub_0200D5DC + ldrb r0, [r4, #0x18] + sub r0, r0, #1 + strb r0, [r4, #0x18] + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r6, r0 + blt _02246E70 + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r6, r0 + bge _02246E70 + ldrb r0, [r4, #0x19] + lsl r1, r0, #2 + ldr r1, [r7, r1] + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl sub_0200D6E8 + ldrb r0, [r4, #0x19] + mov r1, #2 + add r0, r0, #1 + strb r0, [r4, #0x19] + ldr r0, [r4, #0xc] + bl sub_0200D6A4 +_02246E70: + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r6, r0 + blt _02246EA2 + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r6, r0 + bge _02246EA2 + ldrb r0, [r4, #0x19] + ldr r1, _0224707C ; =0x02249958 + lsl r2, r0, #2 + ldr r1, [r1, r2] + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl sub_0200D6E8 + ldrb r0, [r4, #0x19] + mov r1, #2 + add r0, r0, #1 + strb r0, [r4, #0x19] + ldr r0, [r4, #0xc] + bl sub_0200D6A4 +_02246EA2: + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r6, r6, #1 + add r4, #0x1c + cmp r6, r0 + blt _02246E26 +_02246EB0: + mov r7, #0x5a + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #2 +_02246EB8: + ldrb r0, [r4, r7] + cmp r0, #0 + beq _02246EE0 + mov r1, #0x59 + ldr r2, _02247080 ; =0x00000166 + mov r0, #0x57 + lsl r1, r1, #2 + lsl r0, r0, #2 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, r0] + bl sub_0200D5DC + mov r0, #0x5a + lsl r0, r0, #2 + ldrb r0, [r4, r0] + sub r1, r0, #1 + mov r0, #0x5a + lsl r0, r0, #2 + strb r1, [r4, r0] +_02246EE0: + add r6, r6, #1 + add r4, #0x1c + cmp r6, #2 + blt _02246EB8 + ldrb r0, [r5, #0x18] + cmp r0, #0 + bne _02246F68 + mov r0, #0x21 + lsl r0, r0, #4 + ldr r6, [r5, r0] + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r6, r0 + bge _02246F26 + mov r0, #0x1c + mul r0, r6 + mov r7, #0x85 + add r4, r5, r0 + lsl r7, r7, #2 +_02246F06: + ldr r0, [r4, #0] + ldr r1, [r4, #8] + bl ov62_02247B3C + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0200D364 + ldr r0, [r4, #0xc] + bl sub_0200D330 + ldr r0, [r5, r7] + add r6, r6, #1 + add r4, #0x1c + cmp r6, r0 + blt _02246F06 +_02246F26: + mov r0, #0x86 + lsl r0, r0, #2 + ldr r6, [r5, r0] + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r6, r0 + bge _02246F5E + mov r0, #0x1c + mul r0, r6 + mov r7, #0x87 + add r4, r5, r0 + lsl r7, r7, #2 +_02246F3E: + ldr r0, [r4, #0] + ldr r1, [r4, #8] + bl ov62_02247B3C + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0200D364 + ldr r0, [r4, #0xc] + bl sub_0200D330 + ldr r0, [r5, r7] + add r6, r6, #1 + add r4, #0x1c + cmp r6, r0 + blt _02246F3E +_02246F5E: + mov r0, #0x7f + lsl r0, r0, #2 + ldr r1, [r5, r0] + add r1, r1, #1 + str r1, [r5, r0] +_02246F68: + mov r0, #2 + lsl r0, r0, #8 + ldr r1, [r5, r0] + add r1, r1, #1 + str r1, [r5, r0] + b _02247072 +_02246F74: + add r0, r1, #0 + add r0, #0x14 + add r1, #0x18 + ldr r6, [r5, r0] + ldr r0, [r5, r1] + cmp r6, r0 + bge _02246FBA + mov r0, #0x1c + mul r0, r6 + ldr r7, _02247078 ; =0x02249974 + add r4, r5, r0 +_02246F8A: + ldrb r0, [r4, #0x19] + cmp r0, #6 + bne _02246F9A + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0200D6A4 + b _02246FAC +_02246F9A: + lsl r1, r0, #2 + ldr r1, [r7, r1] + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl sub_0200D6E8 + ldrb r0, [r4, #0x19] + add r0, r0, #1 + strb r0, [r4, #0x19] +_02246FAC: + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r6, r6, #1 + add r4, #0x1c + cmp r6, r0 + blt _02246F8A +_02246FBA: + mov r0, #0x86 + lsl r0, r0, #2 + ldr r6, [r5, r0] + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r6, r0 + bge _02247000 + mov r0, #0x1c + mul r0, r6 + ldr r7, _0224707C ; =0x02249958 + add r4, r5, r0 +_02246FD0: + ldrb r0, [r4, #0x19] + cmp r0, #6 + bne _02246FE0 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0200D6A4 + b _02246FF2 +_02246FE0: + lsl r1, r0, #2 + ldr r1, [r7, r1] + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl sub_0200D6E8 + ldrb r0, [r4, #0x19] + add r0, r0, #1 + strb r0, [r4, #0x19] +_02246FF2: + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r6, r6, #1 + add r4, #0x1c + cmp r6, r0 + blt _02246FD0 +_02247000: + mov r1, #2 + lsl r1, r1, #8 + ldr r0, [r5, r1] + add r0, r0, #1 + str r0, [r5, r1] + ldr r0, [r5, r1] + cmp r0, #6 + bne _02247072 + sub r0, r1, #4 + ldr r0, [r5, r0] + add r2, r0, #1 + sub r0, r1, #4 + str r2, [r5, r0] + b _02247072 +_0224701C: + bl ov62_02247CE0 + mov r1, #0xa9 + lsl r1, r1, #2 + ldr r0, [r5, r1] + cmp r0, #0 + bne _0224703E + sub r1, r1, #4 + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov62_02247518 + add r1, r0, #0 + add r0, r5, #0 + bl ov62_02247998 + b _02247050 +_0224703E: + sub r1, r1, #4 + ldr r1, [r5, r1] + add r0, r5, #0 + bl ov62_02247540 + add r1, r0, #0 + add r0, r5, #0 + bl ov62_02247998 +_02247050: + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02247064 + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + bl ov62_02247968 +_02247064: + add r0, r5, #0 + bl ov62_02247504 + add r0, r5, #0 + mov r1, #1 + bl ov62_02246D60 +_02247072: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247078: .word 0x02249974 +_0224707C: .word 0x02249958 +_02247080: .word 0x00000166 + thumb_func_end ov62_02246DF8 + + thumb_func_start ov62_02247084 +ov62_02247084: ; 0x02247084 + push {r3, r4, r5, lr} + mov r1, #0x7d + add r4, r0, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + lsl r2, r1, #2 + ldr r1, _022470A4 ; =0x02249700 + ldr r1, [r1, r2] + blx r1 + add r5, r0, #0 + bne _022470A0 + add r0, r4, #0 + bl ov62_02247A70 +_022470A0: + add r0, r5, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022470A4: .word 0x02249700 + thumb_func_end ov62_02247084 + + thumb_func_start ov62_022470A8 +ov62_022470A8: ; 0x022470A8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + mov r0, #0x64 + mov r1, #0x66 + bl sub_02023790 + mov r1, #0xb2 + str r0, [sp, #4] + mov r0, #1 + lsl r1, r1, #2 + str r0, [r7, r1] + mov r6, #0 + add r0, r1, #4 + str r6, [r7, r0] + add r0, r1, #0 + add r0, #8 + sub r1, #0xc4 + str r6, [r7, r0] + ldr r0, [r7, r1] + cmp r0, #0 + ble _02247148 + mov r0, #0xb3 + lsl r0, r0, #2 + add r4, r7, #0 + add r5, r7, r0 +_022470DC: + ldr r0, [r4, #0] + cmp r0, #0 + bne _022470F4 + mov r0, #1 + str r0, [r4, #0] + ldr r1, [r4, #8] + bl ov62_02247B3C + add r1, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0200D364 +_022470F4: + ldr r0, [r4, #0] + sub r0, r0, #1 + str r0, [sp, #8] + cmp r6, #0 + beq _0224710E + ldr r0, [r5, #0] + ldr r1, [r5, #4] + mov r2, #0xa + mov r3, #0 + bl sub_020E1F1C + str r0, [r5, #0] + str r1, [r5, #4] +_0224710E: + ldr r2, [r5, #0] + ldr r1, [sp, #8] + ldr r0, [r5, #4] + add r2, r2, r1 + ldr r1, _0224715C ; =0x00000000 + str r2, [r5, #0] + adc r0, r1 + str r0, [r5, #4] + mov r0, #1 + str r0, [sp] + mov r2, #1 + ldr r0, [sp, #4] + ldr r1, [sp, #8] + add r3, r2, #0 + bl sub_020238A0 + mov r0, #0xb + lsl r0, r0, #6 + ldr r0, [r7, r0] + ldr r1, [sp, #4] + bl sub_02023E4C + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r7, r0] + add r6, r6, #1 + add r4, #0x1c + cmp r6, r0 + blt _022470DC +_02247148: + ldr r0, [sp, #4] + bl sub_020237BC + add r0, r7, #0 + mov r1, #3 + bl ov62_02246D60 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224715C: .word 0x00000000 + thumb_func_end ov62_022470A8 + + thumb_func_start ov62_02247160 +ov62_02247160: ; 0x02247160 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #0 + bne _0224719C + sub r1, r0, #4 + ldr r1, [r5, r1] + sub r2, r1, #1 + add r1, r0, #0 + sub r1, #0x80 + str r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x80 + ldr r2, [r5, r1] + mov r1, #0x1c + mul r1, r2 + add r1, r5, r1 + ldr r3, [r1, #4] + add r1, r0, #0 + mov r2, #1 + add r1, #0x94 + str r2, [r5, r1] + add r1, r0, #0 + add r1, #0x98 + str r3, [r5, r1] + add r0, #0x9c + str r2, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_0224719C: + sub r0, #0x80 + ldr r6, [r5, r0] + mov r0, #0x1c + add r4, r6, #0 + mul r4, r0 + mov r0, #0 + str r0, [r5, r4] + add r1, r5, r4 + ldr r0, [r5, r4] + ldr r1, [r1, #8] + bl ov62_02247B3C + add r1, r0, #0 + add r0, r5, r4 + ldr r0, [r0, #0xc] + bl sub_0200D364 + add r0, r5, r4 + ldr r7, [r0, #4] + cmp r6, #0 + ble _0224720C + sub r1, r6, #1 + mov r0, #0x1c + add r4, r1, #0 + mul r4, r0 + add r1, r5, r4 + ldr r0, [r5, r4] + ldr r1, [r1, #8] + bl ov62_02247B3C + add r1, r0, #0 + add r0, r5, r4 + ldr r0, [r0, #0xc] + bl sub_0200D364 + add r0, r5, r4 + ldr r3, [r0, #4] + cmp r7, r3 + beq _022471FC + mov r1, #0xa7 + lsl r1, r1, #2 + mov r2, #1 + str r2, [r5, r1] + add r0, r1, #4 + str r3, [r5, r0] + add r1, #8 + str r2, [r5, r1] + pop {r3, r4, r5, r6, r7, pc} +_022471FC: + mov r0, #0xa7 + mov r1, #2 + lsl r0, r0, #2 + str r1, [r5, r0] + sub r1, r6, #1 + add r0, r0, #4 + str r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} +_0224720C: + mov r0, #0xb2 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r5, #0 + mov r1, #3 + bl ov62_02246D60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov62_02247160 + + thumb_func_start ov62_02247220 +ov62_02247220: ; 0x02247220 + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + mov r1, #0x8e + add r4, r0, #0 + lsl r1, r1, #2 + mov r0, #0 + add r1, r4, r1 + add r2, r4, #0 +_02247230: + add r0, r0, #1 + str r1, [r2, #0x10] + add r1, r1, #4 + add r2, #0x1c + cmp r0, #0xc + blt _02247230 + ldr r5, _022472F8 ; =0x02249728 + add r3, sp, #4 + mov r2, #0x30 +_02247242: + ldrh r1, [r5] + add r5, r5, #2 + strh r1, [r3] + add r3, r3, #2 + sub r2, r2, #1 + bne _02247242 + cmp r0, #0x18 + bge _022472B0 + add r2, sp, #4 + lsl r1, r0, #3 + add r1, r2, r1 + lsl r2, r0, #2 + mov r7, #0x5b + ldr r3, _022472FC ; =0x0000023B + add r2, r4, r2 + mvn r7, r7 +_02247262: + mov r5, #0x5d + mov r6, #0x59 + mvn r5, r5 + mvn r6, r6 + ldrsh r5, [r1, r5] + ldrsh r6, [r1, r6] + add r0, r0, #1 + sub r6, r5, r6 + mov r5, #0x8e + lsl r5, r5, #2 + strb r6, [r2, r5] + mov r5, #0x5f + mov r6, #0x5b + mvn r5, r5 + mvn r6, r6 + ldrsh r5, [r1, r5] + ldrsh r6, [r1, r6] + sub r6, r5, r6 + ldr r5, _02247300 ; =0x0000023A + strb r6, [r2, r5] + mov r5, #0x5d + mov r6, #0x59 + mvn r5, r5 + mvn r6, r6 + ldrsh r5, [r1, r5] + ldrsh r6, [r1, r6] + add r6, r5, r6 + ldr r5, _02247304 ; =0x00000239 + strb r6, [r2, r5] + mov r5, #0x5f + mvn r5, r5 + ldrsh r6, [r1, r5] + ldrsh r5, [r1, r7] + add r1, #8 + add r5, r6, r5 + strb r5, [r2, r3] + add r2, r2, #4 + cmp r0, #0x18 + blt _02247262 +_022472B0: + mov r0, #0x29 + lsl r0, r0, #4 + mov r3, #0x98 + strb r3, [r4, r0] + mov r2, #0x20 + add r1, r0, #2 + strb r2, [r4, r1] + mov r2, #0xb8 + add r1, r0, #1 + strb r2, [r4, r1] + mov r1, #0x80 + add r5, r0, #3 + strb r1, [r4, r5] + add r5, r0, #4 + strb r3, [r4, r5] + add r3, r0, #6 + strb r1, [r4, r3] + add r1, r0, #5 + strb r2, [r4, r1] + add r1, r0, #7 + mov r2, #0xe0 + strb r2, [r4, r1] + mov r1, #0x66 + sub r0, #0x58 + str r1, [sp] + ldr r2, _02247308 ; =ov62_0224730C + add r0, r4, r0 + mov r1, #0x18 + add r3, r4, #0 + bl sub_02023FCC + mov r1, #0x8d + lsl r1, r1, #2 + str r0, [r4, r1] + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022472F8: .word 0x02249728 +_022472FC: .word 0x0000023B +_02247300: .word 0x0000023A +_02247304: .word 0x00000239 +_02247308: .word ov62_0224730C + thumb_func_end ov62_02247220 + + thumb_func_start ov62_0224730C +ov62_0224730C: ; 0x0224730C + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + mov r2, #0x7d + lsl r2, r2, #2 + add r5, r0, #0 + ldr r0, [r4, r2] + cmp r0, #1 + beq _0224731E + b _0224749C +_0224731E: + add r0, r2, #0 + add r0, #0xa4 + ldr r0, [r4, r0] + cmp r0, #1 + beq _0224732E + mov r0, #1 + add r2, #0xa4 + str r0, [r4, r2] +_0224732E: + cmp r1, #0 + beq _02247334 + b _0224749C +_02247334: + cmp r5, #0xb + bhi _02247368 + mov r0, #0x1c + mul r0, r5 + add r2, r4, r0 + ldr r0, [r2, #8] + cmp r0, #1 + bne _02247352 + mov r0, #0xa7 + mov r1, #2 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + str r5, [r4, r0] + b _02247360 +_02247352: + mov r0, #0xa7 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r1, [r2, #4] + add r0, r0, #4 + str r1, [r4, r0] +_02247360: + ldr r0, _022474A0 ; =0x00000563 + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} +_02247368: + cmp r5, #0x16 + bne _0224737C + mov r0, #0x6e + mov r1, #0 + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r1, #2 + add r0, r0, #2 + strh r1, [r4, r0] + b _022473AE +_0224737C: + cmp r5, #0x17 + bne _02247390 + mov r0, #0x6e + mov r1, #3 + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r1, #2 + add r0, r0, #2 + strh r1, [r4, r0] + b _022473AE +_02247390: + add r0, r5, #0 + sub r0, #0xc + mov r1, #5 + bl sub_020E2178 + mov r0, #0x6e + lsl r0, r0, #2 + strh r1, [r4, r0] + add r0, r5, #0 + sub r0, #0xc + mov r1, #5 + bl sub_020E2178 + ldr r1, _022474A4 ; =0x000001BA + strh r0, [r4, r1] +_022473AE: + cmp r5, #0xc + blo _02247480 + cmp r5, #0x15 + bhi _02247480 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0224749C + ldr r0, _022474A0 ; =0x00000563 + bl sub_02005748 + mov r0, #0x62 + lsl r0, r0, #2 + ldr r7, [r4, r0] + mov r0, #0x1c + add r6, r7, #0 + mul r6, r0 + add r0, r5, #0 + sub r0, #0xb + str r0, [r4, r6] + add r1, r4, r6 + ldr r0, [r4, r6] + ldr r1, [r1, #8] + bl ov62_02247B3C + add r1, r0, #0 + add r0, r4, r6 + ldr r0, [r0, #0xc] + bl sub_0200D364 + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov62_02247968 + sub r5, #0xc + add r0, r4, #0 + add r1, r5, #0 + bl ov62_022479D4 + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov62_02247968 + add r0, r4, #0 + mov r1, #2 + mov r2, #1 + bl ov62_02247968 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #2 + bl ov62_02247A20 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + bl sub_0200D364 + add r0, r4, r6 + ldr r2, [r0, #4] + mov r0, #0x81 + lsl r0, r0, #2 + ldr r3, [r4, r0] + add r1, r7, #1 + cmp r1, r3 + bne _02247450 + add r1, r0, #0 + mov r2, #1 + add r1, #0x98 + str r2, [r4, r1] + add r1, r0, #0 + mov r2, #0 + add r1, #0x9c + str r2, [r4, r1] + add r0, #0xa0 + str r2, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_02247450: + mov r3, #0x1c + mul r3, r1 + add r3, r4, r3 + ldr r3, [r3, #4] + cmp r2, r3 + beq _02247472 + add r1, r0, #0 + mov r2, #1 + add r1, #0x98 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0x9c + str r3, [r4, r1] + mov r1, #0 + add r0, #0xa0 + str r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_02247472: + add r2, r0, #0 + mov r3, #2 + add r2, #0x98 + str r3, [r4, r2] + add r0, #0x9c + str r1, [r4, r0] + pop {r3, r4, r5, r6, r7, pc} +_02247480: + cmp r5, #0x16 + ldr r0, _022474A0 ; =0x00000563 + bne _02247492 + bl sub_02005748 + add r0, r4, #0 + bl ov62_02247160 + pop {r3, r4, r5, r6, r7, pc} +_02247492: + bl sub_02005748 + add r0, r4, #0 + bl ov62_022470A8 +_0224749C: + pop {r3, r4, r5, r6, r7, pc} + nop +_022474A0: .word 0x00000563 +_022474A4: .word 0x000001BA + thumb_func_end ov62_0224730C + + thumb_func_start ov62_022474A8 +ov62_022474A8: ; 0x022474A8 + push {r4, lr} + mov r1, #0xa7 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r2, [r4, r1] + cmp r2, #2 + bgt _022474C6 + cmp r2, #0 + blt _02247500 + beq _02247500 + cmp r2, #1 + beq _022474CA + cmp r2, #2 + beq _022474F2 + pop {r4, pc} +_022474C6: + cmp r2, #0xff + pop {r4, pc} +_022474CA: + add r1, r1, #4 + ldr r1, [r4, r1] + bl ov62_02246B70 + add r0, r4, #0 + bl ov62_02247B48 + add r0, r4, #0 + mov r1, #1 + bl ov62_02247B88 + add r0, r4, #0 + mov r1, #2 + bl ov62_02246D60 + mov r0, #0xa7 + mov r1, #0xff + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} +_022474F2: + add r1, r1, #4 + ldr r1, [r4, r1] + bl ov62_02247998 + add r0, r4, #0 + bl ov62_02247504 +_02247500: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_022474A8 + + thumb_func_start ov62_02247504 +ov62_02247504: ; 0x02247504 + mov r2, #0xa7 + lsl r2, r2, #2 + mov r3, #0 + str r3, [r0, r2] + add r1, r2, #4 + str r3, [r0, r1] + add r2, #8 + str r3, [r0, r2] + bx lr + ; .align 2, 0 + thumb_func_end ov62_02247504 + + thumb_func_start ov62_02247518 +ov62_02247518: ; 0x02247518 + push {r3, r4} + mov r2, #0x81 + lsl r2, r2, #2 + ldr r4, [r0, r2] + mov r3, #0 + cmp r4, #0 + ble _0224753A +_02247526: + ldr r2, [r0, #4] + cmp r1, r2 + bne _02247532 + add r0, r3, #0 + pop {r3, r4} + bx lr +_02247532: + add r3, r3, #1 + add r0, #0x1c + cmp r3, r4 + blt _02247526 +_0224753A: + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov62_02247518 + + thumb_func_start ov62_02247540 +ov62_02247540: ; 0x02247540 + push {r3, r4, r5, r6} + mov r2, #0x81 + lsl r2, r2, #2 + ldr r6, [r0, r2] + mov r5, #0 + add r4, r5, #0 + cmp r6, #0 + ble _0224756E + mov r2, #1 +_02247552: + ldr r3, [r0, #4] + cmp r1, r3 + bne _0224755C + add r5, r2, #0 + b _02247566 +_0224755C: + cmp r5, #1 + bne _02247566 + sub r0, r4, #1 + pop {r3, r4, r5, r6} + bx lr +_02247566: + add r4, r4, #1 + add r0, #0x1c + cmp r4, r6 + blt _02247552 +_0224756E: + sub r0, r6, #1 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov62_02247540 + + thumb_func_start ov62_02247574 +ov62_02247574: ; 0x02247574 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + mov r2, #0x89 + lsl r2, r2, #2 + add r1, r2, #4 + ldr r5, [r0, r1] + add r1, r2, #0 + add r1, #0xc + ldr r1, [r0, r1] + ldr r6, [r0, r2] + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r7, [r0, r1] + sub r1, r2, #4 + ldr r4, [r0, r1] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x36 + add r2, r7, #0 + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x2b + add r2, r7, #0 + mov r3, #3 + bl sub_0200710C + str r4, [sp] + mov r0, #0x2c + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + mov r1, #2 + add r2, r6, #0 + add r3, r5, #0 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0x28 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [sp, #4] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0x29 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + mov r0, #0xfa + lsl r0, r0, #2 + str r0, [sp, #4] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0x2a + bl sub_0200CE54 + str r4, [sp] + mov r0, #0x58 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, _02247690 ; =0x000003E9 + mov r1, #2 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r6, #0 + add r3, r5, #0 + bl sub_0200CDC4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02247690 ; =0x000003E9 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x57 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + ldr r0, _02247690 ; =0x000003E9 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x55 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02247690 ; =0x000003E9 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r4, #0 + mov r3, #0x56 + bl sub_0200CE54 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247690: .word 0x000003E9 + thumb_func_end ov62_02247574 + + thumb_func_start ov62_02247694 +ov62_02247694: ; 0x02247694 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r4, #0 + cmp r0, #0 + ble _022476BA + mov r7, #0x81 + add r5, r6, #0 + lsl r7, r7, #2 +_022476AA: + ldr r0, [r5, #0xc] + bl sub_0200D0F4 + ldr r0, [r6, r7] + add r4, r4, #1 + add r5, #0x1c + cmp r4, r0 + blt _022476AA +_022476BA: + mov r7, #0x57 + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_022476C2: + ldr r0, [r4, r7] + bl sub_0200D0F4 + add r5, r5, #1 + add r4, #0x1c + cmp r5, #2 + blt _022476C2 + mov r7, #0x65 + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_022476D8: + ldr r0, [r4, r7] + bl sub_0200D0F4 + add r5, r5, #1 + add r4, #0x1c + cmp r5, #3 + blt _022476D8 + mov r0, #0x8a + lsl r0, r0, #2 + mov r1, #0xfa + ldr r0, [r6, r0] + lsl r1, r1, #2 + bl sub_0200D070 + mov r0, #0x8a + lsl r0, r0, #2 + mov r1, #0xfa + ldr r0, [r6, r0] + lsl r1, r1, #2 + bl sub_0200D080 + mov r0, #0x8a + lsl r0, r0, #2 + mov r1, #0xfa + ldr r0, [r6, r0] + lsl r1, r1, #2 + bl sub_0200D090 + mov r0, #0x8a + lsl r0, r0, #2 + mov r1, #0xfa + ldr r0, [r6, r0] + lsl r1, r1, #2 + bl sub_0200D0A0 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r1, _02247750 ; =0x000003E9 + bl sub_0200D070 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r1, _02247750 ; =0x000003E9 + bl sub_0200D080 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r1, _02247750 ; =0x000003E9 + bl sub_0200D090 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r1, _02247750 ; =0x000003E9 + bl sub_0200D0A0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247750: .word 0x000003E9 + thumb_func_end ov62_02247694 + + thumb_func_start ov62_02247754 +ov62_02247754: ; 0x02247754 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0xc] + mov r0, #0x89 + lsl r0, r0, #2 + ldr r1, [sp] + add r2, r0, #4 + ldr r1, [r1, r0] + sub r0, #0x20 + str r1, [sp, #8] + ldr r1, [sp] + ldr r7, [sp, #0xc] + ldr r1, [r1, r2] + add r2, sp, #0x10 + str r1, [sp, #4] + ldr r1, [sp, #0xc] + strh r1, [r2] + strh r1, [r2, #2] + strh r1, [r2, #4] + strh r1, [r2, #6] + mov r1, #0xa + str r1, [sp, #0x18] + ldr r1, [sp, #0xc] + mov r2, #1 + str r1, [sp, #0x3c] + str r1, [sp, #0x40] + str r1, [sp, #0x1c] + mov r1, #0xfa + lsl r1, r1, #2 + str r1, [sp, #0x24] + str r1, [sp, #0x28] + str r1, [sp, #0x2c] + str r1, [sp, #0x30] + sub r1, r2, #2 + str r1, [sp, #0x34] + str r1, [sp, #0x38] + ldr r1, [sp] + str r2, [sp, #0x20] + ldr r0, [r1, r0] + add r0, r0, #2 + cmp r0, #0 + ble _02247846 + add r4, r1, #0 + mov r6, #0x4c + add r5, r1, #0 +_022477B2: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r1, [r4, r0] + ldr r0, [sp, #0xc] + add r0, r0, r1 + add r0, r0, #1 + cmp r7, r0 + add r2, sp, #0x10 + bne _02247800 + ldr r0, [sp, #8] + ldr r1, [sp, #4] + bl sub_0200CE6C + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + lsl r1, r6, #0x10 + ldr r0, [r4, r0] + asr r1, r1, #0x10 + mov r2, #0x18 + bl sub_0200D4C4 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x16 + bl sub_0200D364 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D330 + ldr r0, [sp, #0xc] + add r4, #0x1c + add r0, r0, #1 + str r0, [sp, #0xc] + b _02247834 +_02247800: + ldr r0, [sp, #8] + ldr r1, [sp, #4] + bl sub_0200CE6C + lsl r1, r6, #0x10 + str r0, [r5, #0xc] + asr r1, r1, #0x10 + mov r2, #0x18 + bl sub_0200D4C4 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + bl ov62_02247B3C + add r1, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0200D364 + ldr r0, [r5, #0xc] + mov r1, #0 + bl sub_0200D6A4 + ldr r0, [r5, #0xc] + bl sub_0200D330 + add r5, #0x1c +_02247834: + mov r0, #0x81 + ldr r1, [sp] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r7, r7, #1 + add r0, r0, #2 + add r6, #8 + cmp r7, r0 + blt _022477B2 +_02247846: + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov62_02247754 + + thumb_func_start ov62_0224784C +ov62_0224784C: ; 0x0224784C + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r6, [r5, r0] + add r0, r0, #4 + ldr r4, [r5, r0] + mov r2, #0 + add r0, sp, #0 + strh r2, [r0] + strh r2, [r0, #2] + strh r2, [r0, #4] + strh r2, [r0, #6] + ldr r0, _02247964 ; =0x000003E9 + mov r1, #1 + str r0, [sp, #0x14] + str r0, [sp, #0x18] + str r0, [sp, #0x1c] + str r0, [sp, #0x20] + sub r0, r1, #2 + str r1, [sp, #0x10] + str r2, [sp, #8] + str r2, [sp, #0x2c] + str r2, [sp, #0x30] + str r2, [sp, #0xc] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r6, #0 + add r1, r4, #0 + add r2, sp, #0 + bl sub_0200CE6C + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r6, #0 + add r1, r4, #0 + add r2, sp, #0 + bl sub_0200CE6C + mov r1, #0x1b + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r6, #0 + add r1, r4, #0 + add r2, sp, #0 + bl sub_0200CE6C + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r5, #0 + mov r1, #0 + bl ov62_02247998 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D330 + mov r2, #0x6e + lsl r2, r2, #2 + mov r1, #0 + strh r1, [r5, r2] + add r0, r2, #2 + strh r1, [r5, r0] + mov r0, #1 + sub r2, #0x14 + str r0, [r5, r2] + add r0, r5, #0 + bl ov62_022479D4 + mov r1, #0x1b + lsl r1, r1, #4 + ldr r0, [r5, r1] + sub r1, #0xc + ldr r1, [r5, r1] + bl sub_0200D364 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0200D330 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0200D810 + mov r2, #0x75 + lsl r2, r2, #2 + mov r1, #0 + strh r1, [r5, r2] + add r0, r2, #2 + strh r1, [r5, r0] + mov r0, #1 + sub r2, #0x14 + str r0, [r5, r2] + add r0, r5, #0 + bl ov62_022479D4 + mov r1, #0x73 + lsl r1, r1, #2 + ldr r0, [r5, r1] + sub r1, #0xc + ldr r1, [r5, r1] + bl sub_0200D364 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D330 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_0200D810 + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + bl ov62_02247968 + add r0, r5, #0 + mov r1, #2 + mov r2, #0 + bl ov62_02247968 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + nop +_02247964: .word 0x000003E9 + thumb_func_end ov62_0224784C + + thumb_func_start ov62_02247968 +ov62_02247968: ; 0x02247968 + push {r3, lr} + cmp r2, #1 + bne _02247982 + mov r2, #0x1c + mul r2, r1 + add r1, r0, r2 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_0200D3F4 + pop {r3, pc} +_02247982: + mov r2, #0x1c + mul r2, r1 + add r1, r0, r2 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D3F4 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov62_02247968 + + thumb_func_start ov62_02247998 +ov62_02247998: ; 0x02247998 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x1c + mul r0, r1 + add r0, r4, r0 + mov r2, #0x62 + ldr r0, [r0, #0xc] + lsl r2, r2, #2 + str r1, [r4, r2] + add r1, sp, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + mov r0, #0x65 + lsl r0, r0, #2 + add r3, sp, #0 + mov r2, #0 + ldrsh r2, [r3, r2] + mov r1, #2 + ldrsh r1, [r3, r1] + add r2, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + asr r2, r2, #0x10 + bl sub_0200D4C4 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov62_02247998 + + thumb_func_start ov62_022479D4 +ov62_022479D4: ; 0x022479D4 + push {r4, lr} + add r1, #0xc + mov r2, #0x1b + add r3, r0, #0 + lsl r2, r2, #4 + lsl r1, r1, #2 + ldr r0, [r3, r2] + add r3, r3, r1 + add r1, r2, #0 + add r1, #0x8a + ldrb r4, [r3, r1] + add r1, r2, #0 + add r1, #0x8b + ldrb r1, [r3, r1] + add r4, r4, r1 + lsr r1, r4, #0x1f + add r1, r4, r1 + add r4, r2, #0 + add r4, #0x88 + add r2, #0x89 + lsl r1, r1, #0xf + asr r1, r1, #0x10 + lsl r1, r1, #0x10 + ldrb r4, [r3, r4] + ldrb r2, [r3, r2] + asr r1, r1, #0x10 + add r3, r4, r2 + lsr r2, r3, #0x1f + add r2, r3, r2 + lsl r2, r2, #0xf + asr r2, r2, #0x10 + sub r2, #8 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_022479D4 + + thumb_func_start ov62_02247A20 +ov62_02247A20: ; 0x02247A20 + push {r4, lr} + add r3, r0, #0 + mov r0, #0x1c + mul r0, r2 + add r1, #0xc + mov r2, #0x65 + lsl r1, r1, #2 + add r0, r3, r0 + lsl r2, r2, #2 + add r3, r3, r1 + add r1, r2, #0 + add r1, #0xa6 + ldrb r4, [r3, r1] + add r1, r2, #0 + add r1, #0xa7 + ldrb r1, [r3, r1] + ldr r0, [r0, r2] + add r4, r4, r1 + lsr r1, r4, #0x1f + add r1, r4, r1 + add r4, r2, #0 + add r4, #0xa4 + add r2, #0xa5 + lsl r1, r1, #0xf + asr r1, r1, #0x10 + lsl r1, r1, #0x10 + ldrb r4, [r3, r4] + ldrb r2, [r3, r2] + asr r1, r1, #0x10 + add r3, r4, r2 + lsr r2, r3, #0x1f + add r2, r3, r2 + lsl r2, r2, #0xf + asr r2, r2, #0x10 + sub r2, #8 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + pop {r4, pc} + thumb_func_end ov62_02247A20 + + thumb_func_start ov62_02247A70 +ov62_02247A70: ; 0x02247A70 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D330 + mov r0, #0x1b + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0200D330 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D330 + add r4, r5, #0 + mov r7, #0x65 + mov r6, #1 + add r4, #0x1c + lsl r7, r7, #2 +_02247A9C: + ldr r0, [r4, r7] + bl sub_0200D37C + cmp r0, #3 + bne _02247AF0 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D3B8 + cmp r0, #0 + bne _02247B32 + mov r0, #0x65 + mov r1, #0x62 + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + bl sub_0200D364 + mov r0, #0xa6 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _02247ADA + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + bl ov62_02247968 + b _02247AE4 +_02247ADA: + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + bl ov62_02247968 +_02247AE4: + add r0, r5, #0 + mov r1, #2 + mov r2, #0 + bl ov62_02247968 + b _02247B32 +_02247AF0: + mov r1, #0x62 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r0, r1 + beq _02247B04 + mov r0, #0x65 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D364 +_02247B04: + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D37C + cmp r0, #3 + beq _02247B32 + mov r0, #0xa6 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #1 + bne _02247B28 + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + bl ov62_02247968 + b _02247B32 +_02247B28: + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + bl ov62_02247968 +_02247B32: + add r6, r6, #1 + add r4, #0x1c + cmp r6, #3 + blt _02247A9C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_02247A70 + + thumb_func_start ov62_02247B3C +ov62_02247B3C: ; 0x02247B3C + mov r2, #0 + cmp r1, #0 + bne _02247B44 + mov r2, #0xb +_02247B44: + add r0, r2, r0 + bx lr + thumb_func_end ov62_02247B3C + + thumb_func_start ov62_02247B48 +ov62_02247B48: ; 0x02247B48 + push {r4, r5, r6, r7} + mov r1, #0x81 + lsl r1, r1, #2 + ldr r1, [r0, r1] + mov r3, #0 + cmp r1, #0 + ble _02247B82 + mov r6, #0x85 + lsl r6, r6, #2 + add r4, r0, #0 + add r1, r3, #0 + mov r2, #1 + sub r7, r6, #4 +_02247B62: + ldr r5, [r0, r7] + cmp r3, r5 + blt _02247B72 + ldr r5, [r0, r6] + cmp r3, r5 + bge _02247B72 + str r2, [r4, #8] + b _02247B74 +_02247B72: + str r1, [r4, #8] +_02247B74: + mov r5, #0x81 + lsl r5, r5, #2 + ldr r5, [r0, r5] + add r3, r3, #1 + add r4, #0x1c + cmp r3, r5 + blt _02247B62 +_02247B82: + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov62_02247B48 + + thumb_func_start ov62_02247B88 +ov62_02247B88: ; 0x02247B88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp, #4] + mov r1, #0x82 + lsl r1, r1, #2 + str r0, [sp] + ldr r0, [r0, r1] + mov r4, #0 + lsl r2, r0, #1 + ldr r0, [sp] + str r4, [sp, #8] + add r2, r0, r2 + add r0, r1, #0 + sub r0, #0x2c + ldrsh r5, [r2, r0] + ldr r0, [sp] + sub r1, r1, #4 + ldr r0, [r0, r1] + cmp r0, #0 + bgt _02247BB2 + b _02247CDA +_02247BB2: + ldr r7, [sp] + add r6, r7, #0 +_02247BB6: + mov r0, #0x21 + ldr r1, [sp] + lsl r0, r0, #4 + ldr r0, [r1, r0] + cmp r4, r0 + blt _02247BE2 + add r2, r1, #0 + mov r1, #0x85 + lsl r1, r1, #2 + ldr r1, [r2, r1] + cmp r4, r1 + bge _02247BE2 + cmp r4, r0 + bne _02247BDA + add r5, #0x14 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 + b _02247BF4 +_02247BDA: + add r5, #0x20 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 + b _02247BF4 +_02247BE2: + cmp r4, #0 + bne _02247BEE + add r5, #0x14 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 + b _02247BF4 +_02247BEE: + add r5, #8 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 +_02247BF4: + add r1, sp, #0xc + ldr r0, [r7, #0xc] + add r1, #2 + add r2, sp, #0xc + bl sub_0200D550 + ldr r0, [sp, #4] + cmp r0, #0 + bne _02247C16 + add r3, sp, #0xc + mov r2, #0 + ldrsh r2, [r3, r2] + ldr r0, [r7, #0xc] + add r1, r5, #0 + bl sub_0200D4C4 + b _02247C32 +_02247C16: + add r1, sp, #0xc + mov r0, #2 + ldrsh r0, [r1, r0] + sub r1, r5, r0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r0, r0, #1 + strh r0, [r7, #0x14] + mov r0, #0 + strh r0, [r7, #0x16] + mov r0, #2 + strb r0, [r7, #0x18] + mov r0, #0 + strb r0, [r7, #0x19] +_02247C32: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r6, r0] + cmp r4, r0 + bne _02247CC8 + ldr r0, [sp, #8] + cmp r0, #2 + beq _02247CC8 + mov r0, #0x57 + lsl r0, r0, #2 + add r1, sp, #0xc + ldr r0, [r6, r0] + add r1, #2 + add r2, sp, #0xc + bl sub_0200D550 + ldr r1, [sp] + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r2, r1, #0 + mov r1, #0x21 + lsl r1, r1, #4 + ldr r1, [r2, r1] + cmp r1, r0 + bne _02247C6E + add r5, #8 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 + b _02247C84 +_02247C6E: + cmp r4, r1 + ble _02247C7E + cmp r4, r0 + bge _02247C7E + add r5, #0x14 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 + b _02247C84 +_02247C7E: + add r5, #8 + lsl r0, r5, #0x10 + asr r5, r0, #0x10 +_02247C84: + ldr r0, [sp, #4] + cmp r0, #0 + bne _02247C9E + mov r0, #0x57 + lsl r0, r0, #2 + add r3, sp, #0xc + mov r2, #0 + ldrsh r2, [r3, r2] + ldr r0, [r6, r0] + add r1, r5, #0 + bl sub_0200D4C4 + b _02247CC0 +_02247C9E: + add r1, sp, #0xc + mov r0, #2 + ldrsh r0, [r1, r0] + sub r1, r5, r0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + mov r0, #0x59 + lsl r0, r0, #2 + strh r1, [r6, r0] + mov r1, #0 + add r0, r0, #2 + strh r1, [r6, r0] + mov r0, #0x5a + mov r1, #2 + lsl r0, r0, #2 + strb r1, [r6, r0] +_02247CC0: + ldr r0, [sp, #8] + add r6, #0x1c + add r0, r0, #1 + str r0, [sp, #8] +_02247CC8: + mov r0, #0x81 + ldr r1, [sp] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r4, r4, #1 + add r7, #0x1c + cmp r4, r0 + bge _02247CDA + b _02247BB6 +_02247CDA: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov62_02247B88 + + thumb_func_start ov62_02247CE0 +ov62_02247CE0: ; 0x02247CE0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r6, r0] + mov r4, #0 + cmp r0, #0 + ble _02247D70 + add r5, r6, #0 +_02247CF4: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r6, r0] + cmp r4, r0 + blt _02247D10 + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r4, r0 + bge _02247D10 + mov r0, #0x10 + str r0, [sp] + add r7, r0, #0 + b _02247D16 +_02247D10: + mov r0, #4 + str r0, [sp] + mov r7, #8 +_02247D16: + add r2, sp, #4 + ldr r0, [r5, #0xc] + add r1, sp, #4 + add r2, #2 + bl sub_0200D550 + add r1, sp, #4 + mov r0, #2 + ldrsh r0, [r1, r0] + sub r1, r0, r7 + ldr r0, [r5, #0x10] + strb r1, [r0] + add r1, sp, #4 + mov r0, #0 + ldrsh r1, [r1, r0] + ldr r0, [sp] + sub r1, r1, r0 + ldr r0, [r5, #0x10] + strb r1, [r0, #2] + add r1, sp, #4 + mov r0, #2 + ldrsh r0, [r1, r0] + add r1, r0, r7 + ldr r0, [r5, #0x10] + strb r1, [r0, #1] + add r1, sp, #4 + mov r0, #0 + ldrsh r1, [r1, r0] + ldr r0, [sp] + add r1, r1, r0 + ldr r0, [r5, #0x10] + cmp r4, #0 + strb r1, [r0, #3] + bne _02247D62 + ldr r1, [r5, #0x10] + ldrb r0, [r1, #2] + sub r0, r0, #4 + strb r0, [r1, #2] +_02247D62: + mov r0, #0x81 + lsl r0, r0, #2 + ldr r0, [r6, r0] + add r4, r4, #1 + add r5, #0x1c + cmp r4, r0 + blt _02247CF4 +_02247D70: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov62_02247CE0 + + .rodata + + + .global Unk_ov62_02249700 +Unk_ov62_02249700: ; 0x02249700 + .incbin "incbin/overlay62_rodata.bin", 0xFD4, 0xFE4 - 0xFD4 + + .global Unk_ov62_02249710 +Unk_ov62_02249710: ; 0x02249710 + .incbin "incbin/overlay62_rodata.bin", 0xFE4, 0xFFC - 0xFE4 + + .global Unk_ov62_02249728 +Unk_ov62_02249728: ; 0x02249728 + .incbin "incbin/overlay62_rodata.bin", 0xFFC, 0x60 + + + .data + + + .global Unk_ov62_02249958 +Unk_ov62_02249958: ; 0x02249958 + .incbin "incbin/overlay62_data.bin", 0x198, 0x1B4 - 0x198 + + .global Unk_ov62_02249974 +Unk_ov62_02249974: ; 0x02249974 + .incbin "incbin/overlay62_data.bin", 0x1B4, 0x1C + diff --git a/asm/ov62_02247D74.s b/asm/ov62_02247D74.s new file mode 100644 index 000000000..323157e67 --- /dev/null +++ b/asm/ov62_02247D74.s @@ -0,0 +1,796 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02247D74 +ov62_02247D74: ; 0x02247D74 + push {r4, r5, lr} + sub sp, #0x14 + ldr r5, _02247DB0 ; =0x000008A4 + add r2, r1, #0 + add r4, r0, #0 + mov r1, #2 + bl ov62_022302A8 + add r0, r4, r5 + bl sub_0201A7A0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + str r0, [sp, #0x10] + ldr r0, [r4, #0x24] + add r1, r4, r5 + mov r2, #2 + mov r3, #1 + bl sub_0201A7E8 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_02247DB0: .word 0x000008A4 + thumb_func_end ov62_02247D74 + + thumb_func_start ov62_02247DB4 +ov62_02247DB4: ; 0x02247DB4 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02247DD4 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201ACF4 + ldr r0, _02247DD4 ; =0x000008A4 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + pop {r4, pc} + nop +_02247DD4: .word 0x000008A4 + thumb_func_end ov62_02247DB4 + + thumb_func_start ov62_02247DD8 +ov62_02247DD8: ; 0x02247DD8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + ldr r3, _02247E90 ; =0x0000011A + add r5, r0, #0 + add r0, r1, #0 + str r1, [sp, #0x10] + cmp r0, r3 + bne _02247E52 + lsl r0, r2, #2 + add r1, r5, r0 + ldr r0, _02247E94 ; =0x000008A4 + sub r0, #0x18 + ldr r7, [r1, r0] + mov r0, #0x66 + bl ov62_02231690 + add r6, r0, #0 + mov r0, #0xff + mov r1, #0x66 + bl sub_02023790 + add r4, r0, #0 + add r0, r7, #0 + mov r1, #0x66 + bl sub_02030B94 + str r0, [sp, #0x14] + ldr r1, [sp, #0x14] + add r0, r5, #0 + bl ov62_022349A8 + ldr r0, [r5, #0x48] + ldr r1, [sp, #0x10] + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + mov r1, #0 + str r0, [sp, #4] + ldr r2, [sp, #0x14] + add r0, r6, #0 + add r3, r1, #0 + bl sub_0200B48C + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + bl sub_0200C388 + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 + b _02247E5A +_02247E52: + ldr r0, [r5, #0x48] + bl sub_0200B1EC + add r4, r0, #0 +_02247E5A: + ldr r0, _02247E94 ; =0x000008A4 + mov r1, #0xcc + add r0, r5, r0 + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02247E98 ; =0x000F0D0C + add r2, r4, #0 + str r0, [sp, #8] + ldr r0, _02247E94 ; =0x000008A4 + add r3, r1, #0 + add r0, r5, r0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, _02247E94 ; =0x000008A4 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247E90: .word 0x0000011A +_02247E94: .word 0x000008A4 +_02247E98: .word 0x000F0D0C + thumb_func_end ov62_02247DD8 + + thumb_func_start ov62_02247E9C +ov62_02247E9C: ; 0x02247E9C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #4 + ldr r4, [r5, r0] + add r6, r4, #0 + add r6, #0x10 + add r0, r6, #0 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r6, #0 + mov r3, #4 + bl sub_0201A7E8 + add r0, r6, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x82 + bl sub_0200B1EC + add r7, r0, #0 + add r0, r6, #0 + add r1, r7, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02247F78 ; =0x000F0D00 + add r2, r7, #0 + str r0, [sp, #8] + add r0, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0201A9A4 + add r4, #0x20 + add r0, r4, #0 + bl sub_0201A7A0 + mov r2, #6 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x15 + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + add r1, r4, #0 + mov r3, #0x12 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x48] + mov r1, #0x83 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + bl ov62_0223429C + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _02247F78 ; =0x000F0D00 + add r2, r5, #0 + str r0, [sp, #8] + add r0, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02247F78: .word 0x000F0D00 + thumb_func_end ov62_02247E9C + + thumb_func_start ov62_02247F7C +ov62_02247F7C: ; 0x02247F7C + push {r4, lr} + mov r1, #0x86 + lsl r1, r1, #4 + ldr r4, [r0, r1] + add r0, r4, #0 + add r0, #0x10 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x20 + bl sub_0201ACF4 + add r4, #0x20 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov62_02247F7C + + thumb_func_start ov62_02247FA8 +ov62_02247FA8: ; 0x02247FA8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x66 + mov r1, #0x30 + bl sub_02018144 + mov r1, #0 + mov r2, #0x30 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x86 + lsl r0, r0, #4 + str r4, [r5, r0] + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r4, #0 + add r1, r4, #4 + mov r2, #0 + bl ov62_022315C8 + add r0, r5, #0 + mov r1, #1 + bl ov62_0222FB60 + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02247FA8 + + thumb_func_start ov62_02247FFC +ov62_02247FFC: ; 0x02247FFC + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _02248014 + cmp r1, #1 + beq _02248072 + b _02248100 +_02248014: + add r0, r4, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + cmp r0, #0 + beq _02248028 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02248028: + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + b _0224810E +_02248072: + mov r0, #0 + add r1, r0, #0 + bl sub_02019060 + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #2 + mov r1, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #2 + bl sub_02019060 + mov r0, #4 + mov r1, #0 + bl sub_02019060 + mov r0, #5 + mov r1, #3 + bl sub_02019060 + mov r0, #6 + mov r1, #1 + bl sub_02019060 + mov r0, #7 + mov r1, #2 + bl sub_02019060 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r5, #0x14] + ldr r2, [r5, #0x24] + mov r1, #0x3e + mov r3, #7 + bl sub_020070E8 + add r0, r5, #0 + mov r1, #1 + bl ov62_02234540 + add r0, r5, #0 + bl ov62_02231454 + add r0, r5, #0 + mov r1, #0 + bl ov62_02234540 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _0224810E +_02248100: + mov r1, #0 + bl ov62_0223376C + add r0, r5, #0 + mov r1, #2 + bl ov62_0222FB60 +_0224810E: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov62_02247FFC + + thumb_func_start ov62_02248114 +ov62_02248114: ; 0x02248114 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x86 + add r4, r0, #0 + lsl r1, r1, #4 + ldr r5, [r4, r1] + ldr r1, [r4, #8] + cmp r1, #6 + bls _02248128 + b _022482F0 +_02248128: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02248134: ; jump table + .short _02248142 - _02248134 - 2 ; case 0 + .short _0224818E - _02248134 - 2 ; case 1 + .short _022481E4 - _02248134 - 2 ; case 2 + .short _02248226 - _02248134 - 2 ; case 3 + .short _0224826A - _02248134 - 2 ; case 4 + .short _02248276 - _02248134 - 2 ; case 5 + .short _022482C0 - _02248134 - 2 ; case 6 +_02248142: + bl ov62_02247E9C + add r0, r4, #0 + mov r1, #0 + bl ov62_02247D74 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x66 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + ldr r2, [r4, #0x24] + mov r1, #0x54 + mov r3, #7 + bl sub_0200710C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02248306 +_0224818E: + add r0, r5, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #0 + mov r3, #2 + bl ov62_022315E0 + cmp r0, #0 + beq _022481CA + ldr r2, _0224830C ; =0x0000086C + ldr r1, _02248310 ; =0x0000011A + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov62_02247DD8 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022481CA: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02248306 +_022481E4: + ldr r0, _02248314 ; =0x02249788 + bl sub_02022760 + cmp r0, #0 + beq _02248206 + add r0, r4, #0 + bl ov62_02234520 + ldr r1, _02248318 ; =0x0000011B + add r0, r4, #0 + mov r2, #0 + bl ov62_02247DD8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02248306 +_02248206: + ldr r0, _0224831C ; =0x0224978C + bl sub_02022760 + cmp r0, #0 + beq _02248306 + add r0, r4, #0 + bl ov62_02234520 + mov r0, #1 + str r0, [r5, #0xc] + add r0, r4, #0 + bl ov62_02247DB4 + mov r0, #4 + str r0, [r4, #8] + b _02248306 +_02248226: + ldr r0, _02248314 ; =0x02249788 + bl sub_02022760 + cmp r0, #0 + beq _02248248 + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_022342BC + mov r0, #0 + str r0, [r5, #0xc] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02248306 +_02248248: + ldr r0, _0224831C ; =0x0224978C + bl sub_02022760 + cmp r0, #0 + beq _02248306 + add r0, r4, #0 + bl ov62_02234520 + add r0, r4, #0 + bl ov62_02247DB4 + mov r0, #1 + str r0, [r5, #0xc] + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02248306 +_0224826A: + bl ov62_02247F7C + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02248306 +_02248276: + add r0, r5, #0 + add r0, #8 + mov r1, #1 + bl ov62_02231664 + add r0, r5, #0 + add r1, r5, #4 + mov r2, #1 + mov r3, #0 + bl ov62_022315E0 + cmp r0, #0 + beq _022482A6 + ldr r0, [r5, #0xc] + cmp r0, #1 + bne _022482A0 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 + b _022482A6 +_022482A0: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] +_022482A6: + ldr r0, [r4, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r5, #8] + ldr r0, [r4, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C + b _02248306 +_022482C0: + bl ov62_022342CC + cmp r0, #0 + beq _022482E6 + add r0, r4, #0 + bl ov62_022339A0 + add r0, r4, #0 + bl ov62_022338A8 + ldr r1, _02248320 ; =0x0000011D + add r0, r4, #0 + mov r2, #0 + bl ov62_02247DD8 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + b _02248306 +_022482E6: + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 + b _02248306 +_022482F0: + bl sub_02022798 + cmp r0, #0 + beq _02248306 + add r0, r4, #0 + bl ov62_02247DB4 + add r0, r4, #0 + mov r1, #3 + bl ov62_0222FB60 +_02248306: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224830C: .word 0x0000086C +_02248310: .word 0x0000011A +_02248314: .word 0x02249788 +_02248318: .word 0x0000011B +_0224831C: .word 0x0224978C +_02248320: .word 0x0000011D + thumb_func_end ov62_02248114 + + thumb_func_start ov62_02248324 +ov62_02248324: ; 0x02248324 + push {r3, r4, r5, lr} + mov r1, #0x86 + add r5, r0, #0 + lsl r1, r1, #4 + ldr r4, [r5, r1] + ldr r1, [r5, #8] + cmp r1, #0 + beq _0224833E + cmp r1, #1 + beq _02248342 + cmp r1, #2 + beq _02248348 + b _0224837E +_0224833E: + add r0, r1, #1 + str r0, [r5, #8] +_02248342: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] +_02248348: + add r0, r5, #0 + bl ov62_0223146C + ldr r0, [r5, #0x24] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_02019EBC + ldr r0, [r5, #0x24] + mov r1, #7 + bl sub_02019EBC + add r0, r5, #0 + mov r1, #1 + bl ov62_0223376C + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + b _02248402 +_0224837E: + bl ov62_02233790 + cmp r0, #0 + beq _02248402 + add r0, r4, #0 + add r0, #8 + mov r1, #0 + bl ov62_02231664 + cmp r0, #0 + beq _022483D2 + add r0, r5, #0 + bl ov62_022318E8 + add r0, r4, #0 + add r0, #8 + bl ov62_02231688 + ldr r0, [r5, #0x58] + mov r1, #2 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r0, [r5, #0x28] + mov r2, #0xc + mov r3, #0x10 + bl sub_02003A2C + mov r1, #1 + ldr r3, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + bl ov62_0222FB44 + add r0, r5, #0 + mov r1, #5 + bl ov62_0222FB60 + add r0, r4, #0 + bl sub_020181C4 + b _02248402 +_022483D2: + ldr r0, [r5, #0x58] + mov r1, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #2 + lsr r3, r3, #0x18 + bl sub_02003A2C + ldr r0, [r5, #0x58] + mov r1, #3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r3, [r4, #8] + ldr r0, [r5, #0x28] + lsl r3, r3, #0x18 + mov r2, #0xc + lsr r3, r3, #0x18 + bl sub_02003A2C +_02248402: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_02248324 + + .rodata + + + .global Unk_ov62_02249788 +Unk_ov62_02249788: ; 0x02249788 + .incbin "incbin/overlay62_rodata.bin", 0x105C, 0x1064 - 0x105C + + .global Unk_ov62_02249790 +Unk_ov62_02249790: ; 0x02249790 + .incbin "incbin/overlay62_rodata.bin", 0x1064, 0x10 + diff --git a/asm/ov62_02248408.s b/asm/ov62_02248408.s new file mode 100644 index 000000000..b928934f4 --- /dev/null +++ b/asm/ov62_02248408.s @@ -0,0 +1,406 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov62_02248408 +ov62_02248408: ; 0x02248408 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r0, #0xaa + ldrb r0, [r0] + str r1, [sp] + str r2, [sp, #4] + add r1, sp, #0x28 + add r2, sp, #0x24 + bl sub_0202F4C0 + ldr r1, [sp, #4] + mov r0, #0x40 + bl sub_02023790 + add r4, r0, #0 + ldr r1, [sp, #4] + mov r0, #0x40 + bl sub_02023790 + str r0, [sp, #0x1c] + ldr r0, [sp, #4] + mov r1, #0x80 + bl sub_02018144 + add r5, r0, #0 + mov r0, #0 + ldr r1, [sp, #0x28] + str r0, [sp, #0x20] + cmp r1, #0 + ble _022484D2 + ldr r0, [sp] + mov r7, #0 + mvn r7, r7 + str r0, [sp, #0x14] + str r0, [sp, #0x10] + add r0, #0x3c + str r0, [sp, #0x10] + str r0, [sp, #0xc] + lsr r6, r7, #0x10 +_02248456: + ldr r2, [sp, #0x14] + mov r1, #7 + add r2, #0xe +_0224845C: + ldrh r0, [r2, #0x3c] + cmp r0, r6 + beq _0224846A + sub r1, r1, #1 + sub r2, r2, #2 + cmp r1, r7 + bgt _0224845C +_0224846A: + mov r0, #0 + mvn r0, r0 + cmp r1, r0 + bne _02248486 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #4] + bl ov62_0224856C + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x10] + mov r2, #8 + bl sub_02023DF0 + b _022484B4 +_02248486: + add r0, r4, #0 + bl sub_020237E8 + ldr r1, [sp, #0xc] + add r0, r4, #0 + bl sub_02023D28 + ldr r2, [sp, #0x1c] + mov r0, #0 + add r1, r4, #0 + bl sub_02002DB4 + cmp r0, #0 + bne _022484B4 + ldr r0, [sp, #0x1c] + ldr r1, [sp, #4] + bl ov62_0224856C + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x10] + mov r2, #8 + bl sub_02023DF0 +_022484B4: + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x28] + add r0, #0x34 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + add r0, #0x34 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r0, #0x34 + str r0, [sp, #0xc] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, r1 + blt _02248456 +_022484D2: + mov r0, #0 + str r0, [sp, #8] + cmp r1, #0 + ble _02248556 +_022484DA: + ldr r0, [sp] + ldr r0, [r0, #4] + bl sub_0207A0F8 + mov r6, #0 + str r0, [sp, #0x18] + cmp r0, #0 + ble _02248544 +_022484EA: + ldr r0, [sp] + add r1, r6, #0 + ldr r0, [r0, #4] + bl sub_0207A0FC + mov r1, #0xac + mov r2, #0 + add r7, r0, #0 + bl sub_02074470 + cmp r0, #0 + beq _02248544 + mov r0, #0 + add r1, r5, #0 + mov r2, #0x80 + bl sub_020C4AF0 + add r0, r7, #0 + mov r1, #0x75 + add r2, r5, #0 + bl sub_02074470 + add r0, r4, #0 + bl sub_020237E8 + add r0, r4, #0 + add r1, r5, #0 + bl sub_02023D28 + ldr r2, [sp, #0x1c] + mov r0, #0 + add r1, r4, #0 + bl sub_02002DB4 + cmp r0, #0 + bne _0224853C + add r0, r7, #0 + mov r1, #0xb3 + mov r2, #0 + bl sub_02074B30 +_0224853C: + ldr r0, [sp, #0x18] + add r6, r6, #1 + cmp r6, r0 + blt _022484EA +_02248544: + ldr r0, [sp] + ldr r1, [sp, #0x28] + add r0, r0, #4 + str r0, [sp] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, r1 + blt _022484DA +_02248556: + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + add r0, r5, #0 + bl sub_020181C4 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov62_02248408 + + thumb_func_start ov62_0224856C +ov62_0224856C: ; 0x0224856C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + bl sub_020237E8 + mov r0, #1 + mov r1, #0x1a + mov r2, #0xa + add r3, r5, #0 + bl sub_0200B144 + mov r1, #0x53 + add r5, r0, #0 + lsl r1, r1, #2 + add r2, r4, #0 + bl sub_0200B1B8 + add r0, r5, #0 + bl sub_0200B190 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov62_0224856C + + thumb_func_start ov62_02248598 +ov62_02248598: ; 0x02248598 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r6, r1, #0 + ldrh r1, [r4] + add r7, r0, #0 + add r5, r2, #0 + cmp r1, #0 + beq _022485AE + cmp r1, #1 + beq _02248602 + b _02248610 +_022485AE: + ldr r0, _02248614 ; =0x021C07A4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _022485BA + bl sub_02022974 +_022485BA: + cmp r5, #1 + bne _022485E2 + ldr r1, _02248614 ; =0x021C07A4 + ldr r2, _02248618 ; =0x0000E281 + ldr r0, [r1, #0] + add r0, #0xab + strb r5, [r0] + ldr r0, [r1, #0] + add r0, #0xcc + strh r2, [r0] + ldr r1, [r1, #0] + add r0, r7, #0 + add r1, #0x84 + mov r2, #0x58 + bl sub_0202486C + ldr r1, _02248614 ; =0x021C07A4 + ldr r1, [r1, #0] + add r1, #0xe4 + strh r0, [r1] +_022485E2: + ldr r0, _02248614 ; =0x021C07A4 + ldr r1, _0224861C ; =0x00001D4C + ldr r0, [r0, #0] + ldr r2, _02248620 ; =0x0000FFFF + ldrh r3, [r0, r1] + add r0, #0xe8 + sub r1, #0xe8 + eor r2, r3 + lsl r2, r2, #0x10 + add r2, r3, r2 + bl sub_0202F858 + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _02248610 +_02248602: + ldr r1, _02248614 ; =0x021C07A4 + ldr r3, [sp, #0x18] + ldr r1, [r1, #0] + add r2, r6, #0 + bl sub_0202F3AC + pop {r3, r4, r5, r6, r7, pc} +_02248610: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248614: .word 0x021C07A4 +_02248618: .word 0x0000E281 +_0224861C: .word 0x00001D4C +_02248620: .word 0x0000FFFF + thumb_func_end ov62_02248598 + + thumb_func_start ov62_02248624 +ov62_02248624: ; 0x02248624 + push {r3, lr} + ldr r0, _0224864C ; =0x021C07A4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02248632 + bl sub_02022974 +_02248632: + ldr r0, _0224864C ; =0x021C07A4 + ldr r1, _02248650 ; =0x00001D4C + ldr r0, [r0, #0] + ldr r2, _02248654 ; =0x0000FFFF + ldrh r3, [r0, r1] + add r0, #0xe8 + sub r1, #0xe8 + eor r2, r3 + lsl r2, r2, #0x10 + add r2, r3, r2 + bl sub_0202F858 + pop {r3, pc} + ; .align 2, 0 +_0224864C: .word 0x021C07A4 +_02248650: .word 0x00001D4C +_02248654: .word 0x0000FFFF + thumb_func_end ov62_02248624 + + thumb_func_start ov62_02248658 +ov62_02248658: ; 0x02248658 + push {r4, r5, r6, lr} + add r4, r3, #0 + add r5, r1, #0 + ldrh r1, [r4] + add r6, r2, #0 + cmp r1, #0 + beq _0224866C + cmp r1, #1 + beq _0224868E + b _0224869C +_0224866C: + ldr r0, _022486A0 ; =0x021C07A4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02248678 + bl sub_02022974 +_02248678: + ldr r0, _022486A0 ; =0x021C07A4 + ldr r1, [r0, #0] + add r0, r1, #0 + add r0, #0xdc + str r5, [r0, #0] + add r1, #0xe0 + str r6, [r1, #0] + ldrh r0, [r4] + add r0, r0, #1 + strh r0, [r4] + b _0224869C +_0224868E: + ldr r1, _022486A0 ; =0x021C07A4 + ldr r3, [sp, #0x10] + ldr r1, [r1, #0] + mov r2, #0 + bl sub_0202F3AC + pop {r4, r5, r6, pc} +_0224869C: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022486A0: .word 0x021C07A4 + thumb_func_end ov62_02248658 + + thumb_func_start ov62_022486A4 +ov62_022486A4: ; 0x022486A4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0224871C ; =0x021C07A4 + add r4, r1, #0 + ldr r0, [r0, #0] + cmp r0, #0 + bne _022486B6 + bl sub_02022974 +_022486B6: + ldr r1, _0224871C ; =0x021C07A4 + mov r2, #1 + ldr r0, [r1, #0] + add r0, #0xab + strb r2, [r0] + ldr r0, [r1, #0] + ldr r2, _02248720 ; =0x0000E281 + add r0, #0xcc + strh r2, [r0] + ldr r1, [r1, #0] + add r0, r5, #0 + add r1, #0x84 + mov r2, #0x58 + bl sub_0202486C + ldr r1, _0224871C ; =0x021C07A4 + ldr r3, _02248724 ; =0x0000FFFF + ldr r2, [r1, #0] + add r2, #0xe4 + strh r0, [r2] + ldr r0, [r1, #0] + ldr r1, _02248728 ; =0x00001D4C + ldrh r2, [r0, r1] + add r0, #0xe8 + sub r1, #0xe8 + eor r3, r2 + lsl r3, r3, #0x10 + add r2, r2, r3 + bl sub_0202F858 + mov r0, #8 + bl sub_02017DE0 + ldr r1, _0224871C ; =0x021C07A4 + add r0, r5, #0 + ldr r1, [r1, #0] + add r2, r4, #0 + bl sub_0202447C + add r4, r0, #0 + cmp r4, #2 + bne _02248712 + add r0, r5, #0 + bl sub_020246E0 + add r4, r0, #0 +_02248712: + mov r0, #8 + bl sub_02017DF0 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224871C: .word 0x021C07A4 +_02248720: .word 0x0000E281 +_02248724: .word 0x0000FFFF +_02248728: .word 0x00001D4C + thumb_func_end ov62_022486A4 \ No newline at end of file diff --git a/asm/ov63_0222AE60.s b/asm/ov63_0222AE60.s new file mode 100644 index 000000000..ddfa9dd23 --- /dev/null +++ b/asm/ov63_0222AE60.s @@ -0,0 +1,2059 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222AE60 +ov63_0222AE60: ; 0x0222AE60 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r3, #0 + add r4, r0, #0 + ldr r1, _0222AF04 ; =0x0000229C + add r0, r6, #0 + str r2, [sp] + bl sub_02018144 + ldr r2, _0222AF04 ; =0x0000229C + add r7, r0, #0 + mov r1, #0 + bl sub_020D5124 + str r4, [r7, #0] + mov r0, #0x92 + add r1, r6, #0 + str r5, [r7, #4] + bl sub_02006C24 + ldr r1, _0222AF08 ; =0x00002294 + str r0, [r7, r1] + mov r0, #0x99 + add r1, r6, #0 + bl sub_02006C24 + ldr r1, _0222AF0C ; =0x00002298 + mov r4, #0 + str r0, [r7, r1] + add r5, r7, #0 +_0222AE9C: + mov r0, #0x98 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02009714 + mov r1, #0x8a + lsl r1, r1, #6 + str r0, [r5, r1] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0222AE9C + mov r5, #0 + add r4, r7, #0 +_0222AEB8: + mov r0, #0x17 + add r1, r5, #2 + add r2, r6, #0 + bl sub_02009714 + ldr r1, _0222AF10 ; =0x00002288 + add r5, r5, #1 + str r0, [r4, r1] + add r4, r4, #4 + cmp r5, #2 + blt _0222AEB8 + mov r4, #0 +_0222AED0: + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov63_0222B374 + add r4, r4, #1 + cmp r4, #3 + blt _0222AED0 + ldr r0, [sp] + ldr r2, [sp] + mov r1, #0x18 + str r0, [r7, #0xc] + add r0, r6, #0 + mul r1, r2 + bl sub_02018144 + str r0, [r7, #8] + ldr r3, [r7, #0xc] + mov r2, #0x18 + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222AF04: .word 0x0000229C +_0222AF08: .word 0x00002294 +_0222AF0C: .word 0x00002298 +_0222AF10: .word 0x00002288 + thumb_func_end ov63_0222AE60 + + thumb_func_start ov63_0222AF14 +ov63_0222AF14: ; 0x0222AF14 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + mov r6, #0 + cmp r0, #0 + bls _0222AF40 + add r4, r6, #0 +_0222AF22: + ldr r0, [r5, #8] + add r0, r0, r4 + bl ov63_0222BC70 + cmp r0, #0 + bne _0222AF36 + ldr r0, [r5, #8] + add r0, r0, r4 + bl ov63_0222B210 +_0222AF36: + ldr r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0x18 + cmp r6, r0 + blo _0222AF22 +_0222AF40: + mov r4, #0 +_0222AF42: + add r0, r5, #0 + add r1, r4, #0 + bl ov63_0222B404 + add r4, r4, #1 + cmp r4, #3 + blt _0222AF42 + add r0, r5, #0 + bl ov63_0222AFF8 + ldr r0, _0222AF8C ; =0x00002294 + ldr r0, [r5, r0] + bl sub_02006CA8 + ldr r0, _0222AF90 ; =0x00002298 + ldr r0, [r5, r0] + bl sub_02006CA8 + mov r7, #0x8a + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #6 +_0222AF6E: + ldr r0, [r4, r7] + bl sub_02009754 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0222AF6E + ldr r0, [r5, #8] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222AF8C: .word 0x00002294 +_0222AF90: .word 0x00002298 + thumb_func_end ov63_0222AF14 + + thumb_func_start ov63_0222AF94 +ov63_0222AF94: ; 0x0222AF94 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r7, r3, #0 + add r5, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + add r6, r2, #0 + bl ov63_0222B47C + cmp r0, #0 + bne _0222AFB0 + bl sub_02022974 +_0222AFB0: + add r0, r4, #0 + bl ov63_0222B450 + add r1, r0, #0 + ldr r0, [sp, #0x20] + add r2, r6, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r3, r7, #0 + bl ov63_0222B4CC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov63_0222AF94 + + thumb_func_start ov63_0222AFD0 +ov63_0222AFD0: ; 0x0222AFD0 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl ov63_0222B450 + add r1, r0, #0 + add r0, r4, #0 + bl ov63_0222B738 + pop {r4, pc} + thumb_func_end ov63_0222AFD0 + + thumb_func_start ov63_0222AFE4 +ov63_0222AFE4: ; 0x0222AFE4 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl ov63_0222B450 + add r1, r0, #0 + add r0, r4, #0 + bl ov63_0222B7D4 + pop {r4, pc} + thumb_func_end ov63_0222AFE4 + + thumb_func_start ov63_0222AFF8 +ov63_0222AFF8: ; 0x0222AFF8 + push {r3, r4, r5, lr} + ldr r1, _0222B028 ; =0x00002290 + add r4, r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + beq _0222B008 + bl ov63_0222B078 +_0222B008: + mov r5, #0 +_0222B00A: + add r0, r4, #0 + add r1, r5, #0 + bl ov63_0222B7D4 + cmp r0, #1 + bne _0222B01E + add r0, r4, #0 + add r1, r5, #0 + bl ov63_0222B738 +_0222B01E: + add r5, r5, #1 + cmp r5, #0x97 + blt _0222B00A + pop {r3, r4, r5, pc} + nop +_0222B028: .word 0x00002290 + thumb_func_end ov63_0222AFF8 + + thumb_func_start ov63_0222B02C +ov63_0222B02C: ; 0x0222B02C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + add r6, r3, #0 + str r1, [sp, #8] + str r2, [sp, #0xc] + add r0, r2, #0 + bne _0222B040 + bl sub_02022974 +_0222B040: + ldr r1, [sp, #8] + add r0, r7, #0 + add r2, r6, #0 + bl ov63_0222B97C + add r0, r7, #0 + add r1, r6, #0 + bl ov63_0222BA20 + ldr r5, _0222B074 ; =0x0222D910 + mov r4, #0 +_0222B056: + str r6, [sp] + mov r0, #1 + str r0, [sp, #4] + ldrb r1, [r5] + ldr r2, [sp, #8] + ldr r3, [sp, #0xc] + add r0, r7, #0 + bl ov63_0222B4CC + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0222B056 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222B074: .word 0x0222D910 + thumb_func_end ov63_0222B02C + + thumb_func_start ov63_0222B078 +ov63_0222B078: ; 0x0222B078 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl ov63_0222B9EC + add r0, r6, #0 + bl ov63_0222BAB0 + ldr r5, _0222B09C ; =0x0222D910 + mov r4, #0 +_0222B08A: + ldrb r1, [r5] + add r0, r6, #0 + bl ov63_0222B738 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0222B08A + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222B09C: .word 0x0222D910 + thumb_func_end ov63_0222B078 + + thumb_func_start ov63_0222B0A0 +ov63_0222B0A0: ; 0x0222B0A0 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r2, r3, #0 + add r5, r0, #0 + bl ov63_0222B7E8 + ldr r0, _0222B0B4 ; =0x0000227C + str r4, [r5, r0] + pop {r3, r4, r5, pc} + nop +_0222B0B4: .word 0x0000227C + thumb_func_end ov63_0222B0A0 + + thumb_func_start ov63_0222B0B8 +ov63_0222B0B8: ; 0x0222B0B8 + ldr r3, _0222B0BC ; =ov63_0222B914 + bx r3 + ; .align 2, 0 +_0222B0BC: .word ov63_0222B914 + thumb_func_end ov63_0222B0B8 + + thumb_func_start ov63_0222B0C0 +ov63_0222B0C0: ; 0x0222B0C0 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + str r3, [sp] + bl ov63_0222BB00 + add r4, r0, #0 + add r0, r7, #0 + bl ov63_0222B450 + str r0, [sp, #4] + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov63_0222B7D4 + cmp r0, #1 + beq _0222B0EA + bl sub_02022974 +_0222B0EA: + mov r0, #0 + add r2, sp, #0xc + add r1, r0, #0 + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + ldr r1, [r5, #0] + mov r2, #0x38 + str r1, [sp, #0xc] + ldr r1, [sp, #4] + add r7, r1, #0 + add r1, r5, #0 + mul r7, r2 + add r1, #0x24 + add r1, r1, r7 + str r1, [sp, #0x10] + ldrsh r0, [r6, r0] + lsl r0, r0, #0xc + str r0, [sp, #0x14] + mov r0, #2 + ldrsh r1, [r6, r0] + lsl r1, r1, #0xc + str r1, [sp, #0x18] + lsl r1, r0, #0xb + str r1, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + mov r1, #4 + ldrsh r1, [r6, r1] + str r1, [sp, #0x30] + ldr r1, [sp] + str r1, [sp, #0x38] + add r1, r5, #0 + str r1, [sp, #8] + add r1, #0x1c + str r1, [sp, #8] + ldr r1, [r1, r7] + cmp r1, #3 + beq _0222B142 + cmp r1, #1 + bne _0222B148 +_0222B142: + mov r0, #1 + str r0, [sp, #0x34] + b _0222B14A +_0222B148: + str r0, [sp, #0x34] +_0222B14A: + add r0, sp, #0xc + bl sub_02021AA0 + str r0, [r4, #4] + mov r1, #6 + ldrsh r1, [r6, r1] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_02021E80 + add r0, r5, r7 + ldr r0, [r0, #0x20] + cmp r0, #1 + ldr r0, [r4, #4] + bne _0222B170 + mov r1, #6 + bl sub_02021D6C + b _0222B176 +_0222B170: + mov r1, #1 + bl sub_02021D6C +_0222B176: + mov r0, #9 + str r0, [r4, #0xc] + mov r0, #0 + strh r0, [r4, #0x14] + mov r0, #1 + str r0, [r4, #0x10] + add r0, r5, #0 + add r0, #0x10 + add r0, r0, r7 + str r0, [r4, #0] + ldr r0, _0222B208 ; =0x00002248 + add r0, r5, r0 + bl ov63_0222B96C + cmp r0, #0 + beq _0222B1FC + mov r0, #0 + add r2, sp, #0xc + add r1, r0, #0 + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + ldr r1, [r5, #0] + str r1, [sp, #0xc] + ldr r1, _0222B20C ; =0x00002258 + add r2, r5, r1 + str r2, [sp, #0x10] + ldrsh r0, [r6, r0] + add r1, #0x24 + lsl r0, r0, #0xc + str r0, [sp, #0x14] + mov r0, #2 + ldrsh r2, [r6, r0] + lsl r2, r2, #0xc + str r2, [sp, #0x18] + lsl r2, r0, #0xb + str r2, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + ldr r1, [r5, r1] + str r1, [sp, #0x30] + ldr r1, [sp] + str r1, [sp, #0x38] + ldr r1, [sp, #8] + ldr r1, [r1, r7] + cmp r1, #3 + beq _0222B1DE + cmp r1, #1 + bne _0222B1E4 +_0222B1DE: + mov r0, #1 + str r0, [sp, #0x34] + b _0222B1E6 +_0222B1E4: + str r0, [sp, #0x34] +_0222B1E6: + add r0, sp, #0xc + bl sub_02021AA0 + str r0, [r4, #8] + mov r1, #6 + ldrsh r1, [r6, r1] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_02021E80 + b _0222B200 +_0222B1FC: + mov r0, #0 + str r0, [r4, #8] +_0222B200: + add r0, r4, #0 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_0222B208: .word 0x00002248 +_0222B20C: .word 0x00002258 + thumb_func_end ov63_0222B0C0 + + thumb_func_start ov63_0222B210 +ov63_0222B210: ; 0x0222B210 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _0222B21E + bl sub_02021BD4 +_0222B21E: + ldr r0, [r4, #4] + bl sub_02021BD4 + mov r1, #0x18 + mov r0, #0 +_0222B228: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _0222B228 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222B210 + + thumb_func_start ov63_0222B234 +ov63_0222B234: ; 0x0222B234 + ldr r0, [r0, #4] + bx lr + thumb_func_end ov63_0222B234 + + thumb_func_start ov63_0222B238 +ov63_0222B238: ; 0x0222B238 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + lsl r0, r1, #0xc + str r0, [sp] + lsl r0, r2, #0xc + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [r4, #4] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #8] + cmp r0, #0 + beq _0222B274 + mov r0, #2 + ldr r1, [sp] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp] + mov r0, #0xe + ldr r1, [sp, #4] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #8] + add r1, sp, #0 + bl sub_02021C50 +_0222B274: + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov63_0222B238 + + thumb_func_start ov63_0222B278 +ov63_0222B278: ; 0x0222B278 + ldr r3, _0222B280 ; =sub_02021F58 + ldr r0, [r0, #4] + bx r3 + nop +_0222B280: .word sub_02021F58 + thumb_func_end ov63_0222B278 + + thumb_func_start ov63_0222B284 +ov63_0222B284: ; 0x0222B284 + push {r3, lr} + ldr r0, [r0, #4] + bl sub_02021F74 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov63_0222B284 + + thumb_func_start ov63_0222B294 +ov63_0222B294: ; 0x0222B294 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + bl sub_02021CAC + ldr r0, [r5, #8] + cmp r0, #0 + beq _0222B2AC + add r1, r4, #0 + bl sub_02021CAC +_0222B2AC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov63_0222B294 + + thumb_func_start ov63_0222B2B0 +ov63_0222B2B0: ; 0x0222B2B0 + ldr r3, _0222B2B8 ; =sub_02021D34 + ldr r0, [r0, #4] + bx r3 + nop +_0222B2B8: .word sub_02021D34 + thumb_func_end ov63_0222B2B0 + + thumb_func_start ov63_0222B2BC +ov63_0222B2BC: ; 0x0222B2BC + ldr r0, [r0, #0] + ldr r0, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222B2BC + + thumb_func_start ov63_0222B2C4 +ov63_0222B2C4: ; 0x0222B2C4 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov63_0222B2C4 + + thumb_func_start ov63_0222B2C8 +ov63_0222B2C8: ; 0x0222B2C8 + ldr r3, _0222B2D0 ; =sub_02021E50 + ldr r0, [r0, #4] + bx r3 + nop +_0222B2D0: .word sub_02021E50 + thumb_func_end ov63_0222B2C8 + + thumb_func_start ov63_0222B2D4 +ov63_0222B2D4: ; 0x0222B2D4 + ldr r3, _0222B2DC ; =sub_02021E74 + ldr r0, [r0, #4] + bx r3 + nop +_0222B2DC: .word sub_02021E74 + thumb_func_end ov63_0222B2D4 + + thumb_func_start ov63_0222B2E0 +ov63_0222B2E0: ; 0x0222B2E0 + push {lr} + sub sp, #0xc + ldr r3, [r0, #8] + cmp r3, #0 + beq _0222B302 + add r1, #8 + lsl r1, r1, #0xc + add r2, #0xe + str r1, [sp] + lsl r1, r2, #0xc + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + ldr r0, [r0, #8] + add r1, sp, #0 + bl sub_02021C50 +_0222B302: + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov63_0222B2E0 + + thumb_func_start ov63_0222B308 +ov63_0222B308: ; 0x0222B308 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0xa + blt _0222B318 + bl sub_02022974 +_0222B318: + cmp r6, #4 + blt _0222B320 + bl sub_02022974 +_0222B320: + str r4, [r5, #0xc] + mov r0, #0 + strh r0, [r5, #0x14] + ldr r0, _0222B338 ; =0x0222D920 + lsl r1, r4, #2 + ldr r2, [r0, r1] + cmp r2, #0 + beq _0222B336 + add r0, r5, #0 + add r1, r6, #0 + blx r2 +_0222B336: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222B338: .word 0x0222D920 + thumb_func_end ov63_0222B308 + + thumb_func_start ov63_0222B33C +ov63_0222B33C: ; 0x0222B33C + push {r4, lr} + add r4, r0, #0 + ldr r2, [r4, #0xc] + ldr r1, _0222B370 ; =0x0222D904 + mov r0, #0 + ldrb r2, [r1, r2] + cmp r2, #0xff + bne _0222B350 + mov r0, #1 + b _0222B35C +_0222B350: + mov r1, #0x14 + ldrsh r1, [r4, r1] + add r1, r1, #1 + cmp r2, r1 + blt _0222B35C + mov r0, #1 +_0222B35C: + cmp r0, #1 + bne _0222B36E + add r0, r4, #0 + bl ov63_0222BB38 + mov r0, #0x14 + ldrsh r0, [r4, r0] + add r0, r0, #1 + strh r0, [r4, #0x14] +_0222B36E: + pop {r4, pc} + ; .align 2, 0 +_0222B370: .word 0x0222D904 + thumb_func_end ov63_0222B33C + + thumb_func_start ov63_0222B374 +ov63_0222B374: ; 0x0222B374 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #0xc] + add r0, r1, #0 + lsl r5, r0, #4 + ldr r0, [sp, #0xc] + str r1, [sp, #0x10] + add r1, r0, r5 + ldr r0, _0222B3F4 ; =0x00002118 + str r2, [sp, #0x14] + ldr r0, [r1, r0] + cmp r0, #0 + beq _0222B392 + bl sub_02022974 +_0222B392: + ldr r0, _0222B3F8 ; =0x0222D970 + ldr r6, _0222B3FC ; =0x0222D900 + add r4, r0, r5 + ldr r0, [sp, #0xc] + mov r7, #0 + add r5, r0, r5 + ldr r0, [sp, #0x10] + lsl r1, r0, #1 + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + str r0, [sp, #0x18] +_0222B3AA: + lsr r2, r7, #0x1f + lsl r1, r7, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + ldrb r2, [r6] + ldr r1, [sp, #0x18] + add r0, r0, #2 + add r1, r2, r1 + str r1, [sp] + ldr r1, [sp, #0x14] + str r0, [sp, #4] + str r1, [sp, #8] + lsl r1, r0, #2 + ldr r0, [sp, #0xc] + ldr r2, [sp, #0xc] + add r1, r0, r1 + mov r0, #0x8a + lsl r0, r0, #6 + ldr r0, [r1, r0] + ldr r1, _0222B400 ; =0x00002294 + mov r3, #0 + ldr r1, [r2, r1] + ldr r2, [r4, #0] + bl sub_02009BC4 + ldr r1, _0222B3F4 ; =0x00002118 + add r7, r7, #1 + str r0, [r5, r1] + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r7, #4 + blt _0222B3AA + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222B3F4: .word 0x00002118 +_0222B3F8: .word 0x0222D970 +_0222B3FC: .word 0x0222D900 +_0222B400: .word 0x00002294 + thumb_func_end ov63_0222B374 + + thumb_func_start ov63_0222B404 +ov63_0222B404: ; 0x0222B404 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + lsl r5, r1, #4 + ldr r0, _0222B44C ; =0x00002118 + add r1, r6, r5 + ldr r0, [r1, r0] + cmp r0, #0 + bne _0222B418 + bl sub_02022974 +_0222B418: + mov r4, #0 + add r5, r6, r5 + add r7, r4, #0 +_0222B41E: + lsr r2, r4, #0x1f + lsl r1, r4, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + add r0, r0, #2 + lsl r0, r0, #2 + add r1, r6, r0 + mov r0, #0x8a + lsl r0, r0, #6 + ldr r0, [r1, r0] + ldr r1, _0222B44C ; =0x00002118 + ldr r1, [r5, r1] + bl sub_02009D68 + ldr r0, _0222B44C ; =0x00002118 + add r4, r4, #1 + str r7, [r5, r0] + add r5, r5, #4 + cmp r4, #4 + blt _0222B41E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222B44C: .word 0x00002118 + thumb_func_end ov63_0222B404 + + thumb_func_start ov63_0222B450 +ov63_0222B450: ; 0x0222B450 + push {r3, lr} + ldr r3, _0222B474 ; =0x0222D9A0 + mov r2, #0 +_0222B456: + ldrh r1, [r3] + cmp r0, r1 + bne _0222B464 + ldr r0, _0222B478 ; =0x0222D9A2 + lsl r1, r2, #2 + ldrh r0, [r0, r1] + pop {r3, pc} +_0222B464: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, #0x97 + blt _0222B456 + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_0222B474: .word 0x0222D9A0 +_0222B478: .word 0x0222D9A2 + thumb_func_end ov63_0222B450 + + thumb_func_start ov63_0222B47C +ov63_0222B47C: ; 0x0222B47C + cmp r1, #0 + bne _0222B496 + cmp r0, #0 + beq _0222B48E + cmp r0, #0x61 + beq _0222B48E + sub r0, #0xfc + cmp r0, #1 + bhi _0222B492 +_0222B48E: + mov r0, #1 + bx lr +_0222B492: + mov r0, #0 + bx lr +_0222B496: + mov r0, #1 + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222B47C + + thumb_func_start ov63_0222B49C +ov63_0222B49C: ; 0x0222B49C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #2 + beq _0222B4B0 + cmp r4, #3 + beq _0222B4B0 + bl sub_02022974 +_0222B4B0: + sub r1, r4, #2 + cmp r6, #0 + bne _0222B4B8 + add r1, r1, #2 +_0222B4B8: + ldr r0, _0222B4C8 ; =0x0222D900 + ldrb r2, [r0, r1] + mov r0, #1 + lsl r1, r5, #1 + lsl r0, r0, #8 + add r0, r1, r0 + add r0, r2, r0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222B4C8: .word 0x0222D900 + thumb_func_end ov63_0222B49C + + thumb_func_start ov63_0222B4CC +ov63_0222B4CC: ; 0x0222B4CC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0x38 + mul r0, r4 + add r0, r5, r0 + ldr r0, [r0, #0x14] + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _0222B4E6 + bl sub_02022974 +_0222B4E6: + ldr r0, [sp, #0x1c] + cmp r0, #0 + bne _0222B4FE + ldr r0, [sp, #0x18] + add r1, r4, #0 + str r0, [sp] + add r0, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov63_0222B510 + pop {r3, r4, r5, r6, r7, pc} +_0222B4FE: + ldr r0, [sp, #0x18] + add r1, r4, #0 + str r0, [sp] + add r0, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov63_0222B664 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222B4CC + + thumb_func_start ov63_0222B510 +ov63_0222B510: ; 0x0222B510 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r0, #0 + ldr r0, [sp, #0x58] + add r6, r5, #0 + str r0, [sp, #0x40] + mov r0, #2 + lsl r0, r0, #8 + add r0, r1, r0 + str r0, [sp, #0x38] + lsl r0, r1, #1 + str r0, [sp, #0x3c] + add r4, r1, #0 + mov r0, #0x38 + mul r4, r0 + ldr r0, [sp, #0x38] + mov r1, #0x8a + str r0, [sp] + add r0, r2, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x40] + str r2, [sp, #0x2c] + ldr r2, [sp, #0x3c] + str r3, [sp, #0x30] + lsl r1, r1, #6 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, #0x14 + ldr r1, [r5, r1] + add r6, #0x14 + add r2, #0xe + mov r3, #0 + bl sub_02009A4C + str r0, [r6, r4] + ldr r0, [sp, #0x38] + ldr r2, [sp, #0x3c] + str r0, [sp] + ldr r0, [sp, #0x2c] + add r7, r5, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [sp, #0x40] + add r2, #0xd + ldr r1, _0222B660 ; =0x00002284 + str r0, [sp, #0xc] + ldr r0, [r5, r1] + add r1, #0x10 + ldr r1, [r5, r1] + add r7, #0x18 + mov r3, #0 + str r2, [sp, #0x3c] + bl sub_02009B04 + str r0, [r7, r4] + ldr r0, [r6, r4] + bl sub_02009E1C + mov r1, #6 + ldr r2, [r0, #0x10] + lsl r1, r1, #0xa + cmp r2, r1 + beq _0222B596 + mov r1, #1 + str r1, [sp, #0x34] + b _0222B59A +_0222B596: + mov r1, #0 + str r1, [sp, #0x34] +_0222B59A: + ldr r1, [sp, #0x30] + cmp r1, #2 + bne _0222B5A8 + mov r1, #2 + lsl r1, r1, #0xa + str r1, [r0, #0x10] + b _0222B5C0 +_0222B5A8: + cmp r1, #1 + bne _0222B5C0 + ldr r1, [sp, #0x34] + cmp r1, #0 + beq _0222B5BA + mov r1, #5 + lsl r1, r1, #0xa + str r1, [r0, #0x10] + b _0222B5C0 +_0222B5BA: + mov r1, #6 + lsl r1, r1, #0xa + str r1, [r0, #0x10] +_0222B5C0: + ldr r0, [r6, r4] + bl sub_0200A450 + cmp r0, #0 + bne _0222B5CE + bl sub_02022974 +_0222B5CE: + ldr r0, [r7, r4] + bl sub_0200A640 + cmp r0, #0 + bne _0222B5DC + bl sub_02022974 +_0222B5DC: + ldr r0, [r5, #4] + cmp r0, #0 + beq _0222B5EC + ldr r1, [r7, r4] + add r0, r5, #0 + mov r2, #1 + bl ov63_0222BC80 +_0222B5EC: + ldr r0, [r6, r4] + bl sub_02009D4C + ldr r0, [r7, r4] + bl sub_02009D4C + ldr r0, [sp, #0x2c] + add r1, r5, r4 + str r0, [r1, #0x1c] + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x34] + str r0, [r1, #0x20] + mov r0, #0 + str r0, [r1, #0x10] + ldr r0, [sp, #0x30] + mov r1, #2 + bl ov63_0222B49C + add r6, r0, #0 + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x34] + mov r1, #3 + bl ov63_0222B49C + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + mov r2, #0x8a + str r0, [sp, #0x10] + lsl r2, r2, #6 + ldr r1, [r5, r2] + add r3, r6, #0 + str r1, [sp, #0x14] + add r1, r2, #4 + ldr r1, [r5, r1] + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r1, [r5, r1] + add r2, #0xc + str r1, [sp, #0x1c] + ldr r1, [r5, r2] + add r5, #0x24 + str r1, [sp, #0x20] + ldr r1, [sp, #0x38] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r5, r4 + add r2, r1, #0 + bl sub_020093B4 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_0222B660: .word 0x00002284 + thumb_func_end ov63_0222B510 + + thumb_func_start ov63_0222B664 +ov63_0222B664: ; 0x0222B664 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r7, r1, #0 + add r5, r0, #0 + sub r0, r7, #2 + str r0, [sp, #0x38] + mov r0, #2 + lsl r0, r0, #8 + add r0, r7, r0 + str r0, [sp, #0x34] + mov r0, #0x38 + add r4, r7, #0 + mul r4, r0 + ldr r0, [sp, #0x34] + mov r1, #0x8a + str r0, [sp] + add r0, r2, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x50] + add r6, r5, #0 + str r2, [sp, #0x2c] + str r3, [sp, #0x30] + lsl r1, r1, #6 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, #0x18 + ldr r1, [r5, r1] + add r6, #0x14 + sub r2, r7, #1 + mov r3, #0 + bl sub_02009A4C + str r0, [r6, r4] + ldr r0, [sp, #0x30] + cmp r0, #2 + bne _0222B6BA + ldr r0, [r6, r4] + bl sub_02009E1C + mov r1, #2 + lsl r1, r1, #0xa + str r1, [r0, #0x10] + b _0222B6CA +_0222B6BA: + cmp r0, #1 + bne _0222B6CA + ldr r0, [r6, r4] + bl sub_02009E1C + mov r1, #5 + lsl r1, r1, #0xa + str r1, [r0, #0x10] +_0222B6CA: + ldr r0, [r6, r4] + bl sub_0200A450 + cmp r0, #0 + bne _0222B6D8 + bl sub_02022974 +_0222B6D8: + ldr r0, [r6, r4] + bl sub_02009D4C + mov r0, #0 + add r2, r5, r4 + ldr r1, [sp, #0x2c] + str r0, [r2, #0x18] + str r1, [r2, #0x1c] + ldr r1, [sp, #0x30] + mov r6, #1 + str r1, [r2, #0x20] + str r6, [r2, #0x10] + mov r2, #6 + ldr r1, [sp, #0x38] + lsl r2, r2, #6 + add r3, r1, r2 + mov r2, #0x8a + str r3, [sp] + sub r1, r6, #2 + str r1, [sp, #4] + str r1, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r2, r2, #6 + ldr r1, [r5, r2] + str r1, [sp, #0x14] + add r1, r2, #4 + ldr r1, [r5, r1] + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r1, [r5, r1] + add r2, #0xc + str r1, [sp, #0x1c] + ldr r1, [r5, r2] + add r5, #0x24 + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r1, [sp, #0x34] + ldr r2, _0222B734 ; =0x00000402 + add r0, r5, r4 + bl sub_020093B4 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222B734: .word 0x00000402 + thumb_func_end ov63_0222B664 + + thumb_func_start ov63_0222B738 +ov63_0222B738: ; 0x0222B738 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + mov r0, #0x38 + add r4, r6, #0 + mul r4, r0 + add r0, r5, r4 + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _0222B750 + bl sub_02022974 +_0222B750: + add r0, r5, r4 + ldr r0, [r0, #0x10] + cmp r0, #0 + bne _0222B762 + add r0, r5, #0 + add r1, r6, #0 + bl ov63_0222B76C + pop {r4, r5, r6, pc} +_0222B762: + add r0, r5, #0 + add r1, r6, #0 + bl ov63_0222B7AC + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222B738 + + thumb_func_start ov63_0222B76C +ov63_0222B76C: ; 0x0222B76C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r5, #0 + mov r0, #0x38 + add r4, r1, #0 + mul r4, r0 + add r6, #0x14 + ldr r0, [r6, r4] + bl sub_0200A4E4 + add r7, r5, #0 + add r7, #0x18 + ldr r0, [r7, r4] + bl sub_0200A6DC + mov r0, #0x8a + lsl r0, r0, #6 + ldr r0, [r5, r0] + ldr r1, [r6, r4] + bl sub_02009D68 + ldr r0, _0222B7A8 ; =0x00002284 + ldr r1, [r7, r4] + ldr r0, [r5, r0] + bl sub_02009D68 + mov r0, #0 + str r0, [r6, r4] + str r0, [r7, r4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222B7A8: .word 0x00002284 + thumb_func_end ov63_0222B76C + + thumb_func_start ov63_0222B7AC +ov63_0222B7AC: ; 0x0222B7AC + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r6, #0 + mov r0, #0x38 + add r4, r1, #0 + add r5, #0x14 + mul r4, r0 + ldr r0, [r5, r4] + bl sub_0200A4E4 + mov r0, #0x8a + lsl r0, r0, #6 + ldr r0, [r6, r0] + ldr r1, [r5, r4] + bl sub_02009D68 + mov r0, #0 + str r0, [r5, r4] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222B7AC + + thumb_func_start ov63_0222B7D4 +ov63_0222B7D4: ; 0x0222B7D4 + mov r2, #0x38 + mul r2, r1 + add r0, r0, r2 + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _0222B7E4 + mov r0, #1 + bx lr +_0222B7E4: + mov r0, #0 + bx lr + thumb_func_end ov63_0222B7D4 + + thumb_func_start ov63_0222B7E8 +ov63_0222B7E8: ; 0x0222B7E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r6, r0, #0 + ldr r0, _0222B904 ; =0x00002248 + str r1, [sp, #0x2c] + ldr r0, [r6, r0] + add r7, r2, #0 + cmp r0, #0 + beq _0222B7FE + bl sub_02022974 +_0222B7FE: + mov r4, #0 + add r0, r6, #0 + add r1, r4, #0 + bl ov63_0222B7D4 + cmp r0, #1 + bne _0222B814 + add r0, r4, #0 + str r0, [sp, #0x30] + mov r4, #1 + b _0222B84C +_0222B814: + add r0, r6, #0 + mov r1, #1 + bl ov63_0222B7D4 + cmp r0, #1 + bne _0222B826 + mov r4, #1 + str r4, [sp, #0x30] + b _0222B84C +_0222B826: + add r0, r6, #0 + mov r1, #0x95 + bl ov63_0222B7D4 + cmp r0, #1 + bne _0222B83A + mov r0, #0x95 + str r0, [sp, #0x30] + mov r4, #1 + b _0222B84C +_0222B83A: + add r0, r6, #0 + mov r1, #0x96 + bl ov63_0222B7D4 + cmp r0, #1 + bne _0222B84C + mov r0, #0x96 + str r0, [sp, #0x30] + mov r4, #1 +_0222B84C: + cmp r4, #1 + beq _0222B854 + bl sub_02022974 +_0222B854: + mov r4, #0 + add r5, r6, #0 +_0222B858: + mov r0, #0x12 + lsl r0, r0, #4 + str r0, [sp] + add r0, r4, #2 + str r0, [sp, #4] + ldr r0, _0222B908 ; =0x00002288 + str r7, [sp, #8] + ldr r1, _0222B90C ; =0x00002294 + ldr r0, [r5, r0] + ldr r1, [r6, r1] + add r2, r4, #0 + mov r3, #0 + bl sub_02009BC4 + ldr r1, _0222B910 ; =0x00002250 + add r4, r4, #1 + str r0, [r5, r1] + add r5, r5, #4 + cmp r4, #2 + blt _0222B858 + mov r0, #0x12 + lsl r0, r0, #4 + str r0, [sp] + ldr r0, [sp, #0x2c] + add r1, #0x30 + str r0, [sp, #4] + str r7, [sp, #8] + ldr r0, [r6, r1] + add r1, #0x14 + ldr r1, [r6, r1] + mov r2, #2 + mov r3, #0 + bl sub_02009A4C + ldr r1, _0222B904 ; =0x00002248 + str r0, [r6, r1] + ldr r0, [r6, r1] + bl sub_0200A450 + cmp r0, #0 + bne _0222B8AE + bl sub_02022974 +_0222B8AE: + ldr r0, _0222B904 ; =0x00002248 + ldr r0, [r6, r0] + bl sub_02009D4C + mov r1, #0x12 + lsl r1, r1, #4 + mov r0, #0 + mov r3, #0x8a + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r3, r3, #6 + ldr r2, [r6, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r6, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r6, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r6, r2] + sub r3, #0x28 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r6, r3 + add r3, r1, #0 + ldr r2, [sp, #0x30] + add r3, #0xe0 + add r2, r2, r3 + add r3, r1, #0 + bl sub_020093B4 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0222B904: .word 0x00002248 +_0222B908: .word 0x00002288 +_0222B90C: .word 0x00002294 +_0222B910: .word 0x00002250 + thumb_func_end ov63_0222B7E8 + + thumb_func_start ov63_0222B914 +ov63_0222B914: ; 0x0222B914 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _0222B960 ; =0x00002248 + add r0, r5, r0 + bl ov63_0222B96C + cmp r0, #1 + bne _0222B95C + ldr r0, _0222B960 ; =0x00002248 + ldr r0, [r5, r0] + bl sub_0200A4E4 + mov r1, #0x8a + lsl r1, r1, #6 + ldr r0, [r5, r1] + sub r1, #0x38 + ldr r1, [r5, r1] + bl sub_02009D68 + ldr r0, _0222B960 ; =0x00002248 + mov r4, #0 + add r7, r0, #0 + str r4, [r5, r0] + add r6, r4, #0 + add r7, #8 +_0222B946: + ldr r0, _0222B964 ; =0x00002288 + ldr r1, _0222B968 ; =0x00002250 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + bl sub_02009D68 + str r6, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0222B946 +_0222B95C: + pop {r3, r4, r5, r6, r7, pc} + nop +_0222B960: .word 0x00002248 +_0222B964: .word 0x00002288 +_0222B968: .word 0x00002250 + thumb_func_end ov63_0222B914 + + thumb_func_start ov63_0222B96C +ov63_0222B96C: ; 0x0222B96C + ldr r0, [r0, #0] + cmp r0, #0 + beq _0222B976 + mov r0, #1 + bx lr +_0222B976: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222B96C + + thumb_func_start ov63_0222B97C +ov63_0222B97C: ; 0x0222B97C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _0222B9E0 ; =0x00002290 + add r4, r1, #0 + ldr r0, [r5, r0] + add r6, r2, #0 + cmp r0, #0 + beq _0222B992 + bl sub_02022974 +_0222B992: + ldr r0, _0222B9E4 ; =0x00000402 + mov r2, #0 + str r0, [sp] + str r4, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + ldr r1, _0222B9E8 ; =0x00002284 + str r6, [sp, #0xc] + ldr r0, [r5, r1] + add r1, #0x14 + ldr r1, [r5, r1] + add r3, r2, #0 + bl sub_02009B04 + ldr r1, _0222B9E0 ; =0x00002290 + str r0, [r5, r1] + ldr r0, [r5, r1] + bl sub_0200A640 + cmp r0, #0 + bne _0222B9C0 + bl sub_02022974 +_0222B9C0: + ldr r0, [r5, #4] + cmp r0, #0 + beq _0222B9D2 + ldr r1, _0222B9E0 ; =0x00002290 + add r0, r5, #0 + ldr r1, [r5, r1] + mov r2, #8 + bl ov63_0222BC80 +_0222B9D2: + ldr r0, _0222B9E0 ; =0x00002290 + ldr r0, [r5, r0] + bl sub_02009D4C + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0222B9E0: .word 0x00002290 +_0222B9E4: .word 0x00000402 +_0222B9E8: .word 0x00002284 + thumb_func_end ov63_0222B97C + + thumb_func_start ov63_0222B9EC +ov63_0222B9EC: ; 0x0222B9EC + push {r4, lr} + add r4, r0, #0 + ldr r0, _0222BA18 ; =0x00002290 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0222B9FC + bl sub_02022974 +_0222B9FC: + ldr r0, _0222BA18 ; =0x00002290 + ldr r0, [r4, r0] + bl sub_0200A6DC + ldr r1, _0222BA1C ; =0x00002284 + ldr r0, [r4, r1] + add r1, #0xc + ldr r1, [r4, r1] + bl sub_02009D68 + ldr r0, _0222BA18 ; =0x00002290 + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_0222BA18: .word 0x00002290 +_0222BA1C: .word 0x00002284 + thumb_func_end ov63_0222B9EC + + thumb_func_start ov63_0222BA20 +ov63_0222BA20: ; 0x0222BA20 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, _0222BA9C ; =0x00002148 + str r1, [sp, #0xc] + ldr r0, [r5, r0] + cmp r0, #0 + beq _0222BA34 + bl sub_02022974 +_0222BA34: + mov r0, #0x11 + mov r4, #0 + str r0, [sp, #0x10] + add r6, r5, #0 + mov r7, #0x12 +_0222BA3E: + mov r0, #6 + lsl r0, r0, #6 + add r0, r4, r0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r1, _0222BAA0 ; =0x00002298 + str r0, [sp, #8] + ldr r0, _0222BAA4 ; =0x00002288 + ldr r1, [r5, r1] + ldr r0, [r5, r0] + ldr r2, [sp, #0x10] + mov r3, #0 + bl sub_02009BC4 + ldr r1, _0222BA9C ; =0x00002148 + add r2, r7, #0 + str r0, [r6, r1] + mov r0, #6 + lsl r0, r0, #6 + add r0, r4, r0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, [sp, #0xc] + ldr r1, _0222BAA0 ; =0x00002298 + str r0, [sp, #8] + ldr r0, _0222BAA8 ; =0x0000228C + ldr r1, [r5, r1] + ldr r0, [r5, r0] + mov r3, #0 + bl sub_02009BC4 + ldr r1, _0222BAAC ; =0x0000214C + add r4, r4, #1 + str r0, [r6, r1] + ldr r0, [sp, #0x10] + add r6, #0x10 + add r0, r0, #2 + add r7, r7, #2 + str r0, [sp, #0x10] + cmp r4, #0x10 + blt _0222BA3E + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0222BA9C: .word 0x00002148 +_0222BAA0: .word 0x00002298 +_0222BAA4: .word 0x00002288 +_0222BAA8: .word 0x0000228C +_0222BAAC: .word 0x0000214C + thumb_func_end ov63_0222BA20 + + thumb_func_start ov63_0222BAB0 +ov63_0222BAB0: ; 0x0222BAB0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _0222BAF0 ; =0x00002148 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0222BAC0 + bl sub_02022974 +_0222BAC0: + mov r6, #0 + add r4, r5, #0 + add r7, r6, #0 +_0222BAC6: + ldr r0, _0222BAF4 ; =0x00002288 + ldr r1, _0222BAF0 ; =0x00002148 + ldr r0, [r5, r0] + ldr r1, [r4, r1] + bl sub_02009D68 + ldr r0, _0222BAF8 ; =0x0000228C + ldr r1, _0222BAFC ; =0x0000214C + ldr r0, [r5, r0] + ldr r1, [r4, r1] + bl sub_02009D68 + ldr r0, _0222BAF0 ; =0x00002148 + add r6, r6, #1 + str r7, [r4, r0] + add r0, r0, #4 + str r7, [r4, r0] + add r4, #0x10 + cmp r6, #0x10 + blt _0222BAC6 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222BAF0: .word 0x00002148 +_0222BAF4: .word 0x00002288 +_0222BAF8: .word 0x0000228C +_0222BAFC: .word 0x0000214C + thumb_func_end ov63_0222BAB0 + + thumb_func_start ov63_0222BB00 +ov63_0222BB00: ; 0x0222BB00 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + mov r6, #0 + cmp r0, #0 + bls _0222BB2E + add r4, r6, #0 +_0222BB0E: + ldr r0, [r5, #8] + add r0, r0, r4 + bl ov63_0222BC70 + cmp r0, #1 + bne _0222BB24 + mov r0, #0x18 + ldr r1, [r5, #8] + mul r0, r6 + add r0, r1, r0 + pop {r4, r5, r6, pc} +_0222BB24: + ldr r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0x18 + cmp r6, r0 + blo _0222BB0E +_0222BB2E: + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BB00 + + thumb_func_start ov63_0222BB38 +ov63_0222BB38: ; 0x0222BB38 + push {r3, lr} + ldr r1, [r0, #0xc] + lsl r2, r1, #2 + ldr r1, _0222BB4C ; =0x0222D948 + ldr r1, [r1, r2] + cmp r1, #0 + beq _0222BB48 + blx r1 +_0222BB48: + pop {r3, pc} + nop +_0222BB4C: .word 0x0222D948 + thumb_func_end ov63_0222BB38 + + thumb_func_start ov63_0222BB50 +ov63_0222BB50: ; 0x0222BB50 + ldr r3, _0222BB58 ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + bx r3 + ; .align 2, 0 +_0222BB58: .word sub_02021DCC + thumb_func_end ov63_0222BB50 + + thumb_func_start ov63_0222BB5C +ov63_0222BB5C: ; 0x0222BB5C + ldr r3, _0222BB68 ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + mov r1, #4 + bx r3 + nop +_0222BB68: .word sub_02021DCC + thumb_func_end ov63_0222BB5C + + thumb_func_start ov63_0222BB6C +ov63_0222BB6C: ; 0x0222BB6C + ldr r3, _0222BB78 ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + add r1, r1, #5 + bx r3 + nop +_0222BB78: .word sub_02021DCC + thumb_func_end ov63_0222BB6C + + thumb_func_start ov63_0222BB7C +ov63_0222BB7C: ; 0x0222BB7C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0x10] + ldr r0, [r5, #4] + add r1, r1, #5 + bl sub_02021DCC + str r4, [r5, #0x10] + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222BB7C + + thumb_func_start ov63_0222BB90 +ov63_0222BB90: ; 0x0222BB90 + ldr r3, _0222BB9C ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + add r1, #9 + bx r3 + nop +_0222BB9C: .word sub_02021DCC + thumb_func_end ov63_0222BB90 + + thumb_func_start ov63_0222BBA0 +ov63_0222BBA0: ; 0x0222BBA0 + ldr r3, _0222BBAC ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + add r1, r1, #5 + bx r3 + nop +_0222BBAC: .word sub_02021DCC + thumb_func_end ov63_0222BBA0 + + thumb_func_start ov63_0222BBB0 +ov63_0222BBB0: ; 0x0222BBB0 + ldr r3, _0222BBBC ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + add r1, r1, #5 + bx r3 + nop +_0222BBBC: .word sub_02021DCC + thumb_func_end ov63_0222BBB0 + + thumb_func_start ov63_0222BBC0 +ov63_0222BBC0: ; 0x0222BBC0 + ldr r3, _0222BBCC ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + add r1, r1, #5 + bx r3 + nop +_0222BBCC: .word sub_02021DCC + thumb_func_end ov63_0222BBC0 + + thumb_func_start ov63_0222BBD0 +ov63_0222BBD0: ; 0x0222BBD0 + ldr r3, _0222BBDC ; =sub_02021DCC + str r1, [r0, #0x10] + ldr r0, [r0, #4] + add r1, r1, #5 + bx r3 + nop +_0222BBDC: .word sub_02021DCC + thumb_func_end ov63_0222BBD0 + + thumb_func_start ov63_0222BBE0 +ov63_0222BBE0: ; 0x0222BBE0 + ldr r3, _0222BBEC ; =sub_02021E2C + mov r1, #2 + ldr r0, [r0, #4] + lsl r1, r1, #0xc + bx r3 + nop +_0222BBEC: .word sub_02021E2C + thumb_func_end ov63_0222BBE0 + + thumb_func_start ov63_0222BBF0 +ov63_0222BBF0: ; 0x0222BBF0 + ldr r3, _0222BBFC ; =sub_02021E2C + mov r1, #2 + ldr r0, [r0, #4] + lsl r1, r1, #0xc + bx r3 + nop +_0222BBFC: .word sub_02021E2C + thumb_func_end ov63_0222BBF0 + + thumb_func_start ov63_0222BC00 +ov63_0222BC00: ; 0x0222BC00 + push {r3, lr} + add r1, r0, #0 + mov r0, #0x14 + ldrsh r0, [r1, r0] + cmp r0, #0 + ldr r0, [r1, #4] + bne _0222BC16 + mov r1, #1 + bl sub_02021E50 + pop {r3, pc} +_0222BC16: + ldr r1, [r1, #0x10] + add r1, r1, #5 + bl sub_02021D6C + pop {r3, pc} + thumb_func_end ov63_0222BC00 + + thumb_func_start ov63_0222BC20 +ov63_0222BC20: ; 0x0222BC20 + ldr r3, _0222BC2C ; =sub_02021E2C + mov r1, #2 + ldr r0, [r0, #4] + lsl r1, r1, #0xc + bx r3 + nop +_0222BC2C: .word sub_02021E2C + thumb_func_end ov63_0222BC20 + + thumb_func_start ov63_0222BC30 +ov63_0222BC30: ; 0x0222BC30 + ldr r3, _0222BC3C ; =sub_02021E2C + mov r1, #1 + ldr r0, [r0, #4] + lsl r1, r1, #0xc + bx r3 + nop +_0222BC3C: .word sub_02021E2C + thumb_func_end ov63_0222BC30 + + thumb_func_start ov63_0222BC40 +ov63_0222BC40: ; 0x0222BC40 + ldr r3, _0222BC4C ; =sub_02021E2C + mov r1, #1 + ldr r0, [r0, #4] + lsl r1, r1, #0xc + bx r3 + nop +_0222BC4C: .word sub_02021E2C + thumb_func_end ov63_0222BC40 + + thumb_func_start ov63_0222BC50 +ov63_0222BC50: ; 0x0222BC50 + ldr r3, _0222BC5C ; =sub_02021E2C + mov r1, #2 + ldr r0, [r0, #4] + lsl r1, r1, #0xe + bx r3 + nop +_0222BC5C: .word sub_02021E2C + thumb_func_end ov63_0222BC50 + + thumb_func_start ov63_0222BC60 +ov63_0222BC60: ; 0x0222BC60 + ldr r3, _0222BC6C ; =sub_02021E2C + mov r1, #6 + ldr r0, [r0, #4] + lsl r1, r1, #0xc + bx r3 + nop +_0222BC6C: .word sub_02021E2C + thumb_func_end ov63_0222BC60 + + thumb_func_start ov63_0222BC70 +ov63_0222BC70: ; 0x0222BC70 + ldr r0, [r0, #4] + cmp r0, #0 + bne _0222BC7A + mov r0, #1 + bx lr +_0222BC7A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222BC70 + + thumb_func_start ov63_0222BC80 +ov63_0222BC80: ; 0x0222BC80 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl sub_02009E34 + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #1 + bl sub_0200A760 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #2 + bl sub_0200A760 + add r6, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r7, r0 + beq _0222BCC4 + lsl r0, r4, #0x15 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r1, [sp, #4] + lsl r3, r7, #0x14 + ldr r0, [r5, #4] + ldr r1, [r1, #0xc] + mov r2, #2 + lsr r3, r3, #0x10 + bl sub_02002FBC +_0222BCC4: + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _0222BCE2 + lsl r0, r4, #0x15 + lsr r0, r0, #0x10 + str r0, [sp] + ldr r1, [sp, #4] + lsl r3, r6, #0x14 + ldr r0, [r5, #4] + ldr r1, [r1, #0xc] + mov r2, #3 + lsr r3, r3, #0x10 + bl sub_02002FBC +_0222BCE2: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BC80 + + .rodata + + + .global Unk_ov63_0222D900 +Unk_ov63_0222D900: ; 0x0222D900 + .incbin "incbin/overlay63_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov63_0222D904 +Unk_ov63_0222D904: ; 0x0222D904 + .incbin "incbin/overlay63_rodata.bin", 0x4, 0x10 - 0x4 + + .global Unk_ov63_0222D910 +Unk_ov63_0222D910: ; 0x0222D910 + .incbin "incbin/overlay63_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov63_0222D920 +Unk_ov63_0222D920: ; 0x0222D920 + .incbin "incbin/overlay63_rodata.bin", 0x20, 0x48 - 0x20 + + .global Unk_ov63_0222D948 +Unk_ov63_0222D948: ; 0x0222D948 + .incbin "incbin/overlay63_rodata.bin", 0x48, 0x70 - 0x48 + + .global Unk_ov63_0222D970 +Unk_ov63_0222D970: ; 0x0222D970 + .incbin "incbin/overlay63_rodata.bin", 0x70, 0xA0 - 0x70 + + .global Unk_ov63_0222D9A0 +Unk_ov63_0222D9A0: ; 0x0222D9A0 + .incbin "incbin/overlay63_rodata.bin", 0xA0, 0x25C + diff --git a/asm/ov63_0222BCE8.s b/asm/ov63_0222BCE8.s new file mode 100644 index 000000000..a43669046 --- /dev/null +++ b/asm/ov63_0222BCE8.s @@ -0,0 +1,194 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222BCE8 +ov63_0222BCE8: ; 0x0222BCE8 + push {r3, r4, r5, r6, r7, lr} + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r0, r7, #0 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + bne _0222BD00 + bl sub_02022974 +_0222BD00: + strh r5, [r4] + strh r6, [r4, #2] + ldrh r2, [r4] + ldrh r1, [r4, #2] + add r0, r7, #0 + mul r1, r2 + lsl r1, r1, #2 + bl sub_02018144 + str r0, [r4, #4] + cmp r0, #0 + bne _0222BD1C + bl sub_02022974 +_0222BD1C: + ldrh r3, [r4] + ldrh r2, [r4, #2] + ldr r0, [r4, #4] + mov r1, #0 + mul r2, r3 + lsl r2, r2, #2 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222BCE8 + + thumb_func_start ov63_0222BD30 +ov63_0222BD30: ; 0x0222BD30 + push {r4, lr} + add r4, r0, #0 + bne _0222BD3A + bl sub_02022974 +_0222BD3A: + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov63_0222BD30 + + thumb_func_start ov63_0222BD48 +ov63_0222BD48: ; 0x0222BD48 + ldrh r0, [r0] + bx lr + thumb_func_end ov63_0222BD48 + + thumb_func_start ov63_0222BD4C +ov63_0222BD4C: ; 0x0222BD4C + ldrh r0, [r0, #2] + bx lr + thumb_func_end ov63_0222BD4C + + thumb_func_start ov63_0222BD50 +ov63_0222BD50: ; 0x0222BD50 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r4, #0 + bne _0222BD5E + bl sub_02022974 +_0222BD5E: + ldrh r3, [r4] + ldrh r2, [r4, #2] + ldr r0, [r4, #4] + add r1, r5, #0 + mul r2, r3 + lsl r2, r2, #2 + bl sub_020D50B8 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222BD50 + + thumb_func_start ov63_0222BD70 +ov63_0222BD70: ; 0x0222BD70 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _0222BDA8 ; =0x0222DBFC + add r4, r1, #0 + ldr r0, [r0, #0] + add r6, r2, #0 + str r0, [sp] + cmp r5, #0 + bne _0222BD88 + bl sub_02022974 +_0222BD88: + ldrh r2, [r5] + cmp r2, r4 + bls _0222BDA2 + ldrh r0, [r5, #2] + cmp r0, r6 + bls _0222BDA2 + add r0, r2, #0 + mul r0, r6 + add r0, r4, r0 + ldr r1, [r5, #4] + lsl r0, r0, #2 + ldr r0, [r1, r0] + str r0, [sp] +_0222BDA2: + ldr r0, [sp] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0222BDA8: .word 0x0222DBFC + thumb_func_end ov63_0222BD70 + + thumb_func_start ov63_0222BDAC +ov63_0222BDAC: ; 0x0222BDAC + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0 + bne _0222BDBE + bl sub_02022974 +_0222BDBE: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov63_0222BD70 + mov r1, #0 + mvn r1, r1 + str r0, [sp] + str r0, [sp, #4] + cmp r0, r1 + bne _0222BDDA + add sp, #8 + mov r0, #1 + pop {r4, r5, r6, pc} +_0222BDDA: + lsl r0, r0, #0x1f + lsr r0, r0, #0x1f + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BDAC + + thumb_func_start ov63_0222BDE4 +ov63_0222BDE4: ; 0x0222BDE4 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0 + bne _0222BDF6 + bl sub_02022974 +_0222BDF6: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov63_0222BD70 + mov r1, #0 + mvn r1, r1 + str r0, [sp] + str r0, [sp, #4] + cmp r0, r1 + bne _0222BE12 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_0222BE12: + lsr r0, r0, #1 + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222BDE4 + + .rodata + + + .global Unk_ov63_0222DBFC +Unk_ov63_0222DBFC: ; 0x0222DBFC + .incbin "incbin/overlay63_rodata.bin", 0x2FC, 0x4 + diff --git a/asm/ov63_0222BE18.s b/asm/ov63_0222BE18.s new file mode 100644 index 000000000..f30c98b6e --- /dev/null +++ b/asm/ov63_0222BE18.s @@ -0,0 +1,1736 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222BE18 +ov63_0222BE18: ; 0x0222BE18 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + bne _0222BE2E + bl sub_02022974 +_0222BE2E: + mov r1, #0x18 + add r0, r6, #0 + mul r1, r5 + str r5, [r4, #4] + bl sub_02018144 + str r0, [r4, #0] + cmp r0, #0 + bne _0222BE44 + bl sub_02022974 +_0222BE44: + ldr r3, [r4, #4] + mov r2, #0x18 + ldr r0, [r4, #0] + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BE18 + + thumb_func_start ov63_0222BE58 +ov63_0222BE58: ; 0x0222BE58 + push {r4, lr} + add r4, r0, #0 + bne _0222BE62 + bl sub_02022974 +_0222BE62: + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov63_0222BE58 + + thumb_func_start ov63_0222BE70 +ov63_0222BE70: ; 0x0222BE70 + push {r4, lr} + add r4, r1, #0 + ldrb r1, [r4, #7] + bl ov63_0222BF18 + add r1, r4, #0 + bl ov63_0222C350 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BE70 + + thumb_func_start ov63_0222BE84 +ov63_0222BE84: ; 0x0222BE84 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl ov63_0222BEB0 + add r5, r0, #0 + ldr r4, _0222BEAC ; =0x00000000 + beq _0222BEAA +_0222BE92: + lsl r1, r4, #0x10 + add r0, r6, #0 + lsr r1, r1, #0x10 + bl ov63_0222BF50 + cmp r0, #0 + beq _0222BEA4 + bl ov63_0222C37C +_0222BEA4: + add r4, r4, #1 + cmp r4, r5 + blo _0222BE92 +_0222BEAA: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0222BEAC: .word 0x00000000 + thumb_func_end ov63_0222BE84 + + thumb_func_start ov63_0222BEB0 +ov63_0222BEB0: ; 0x0222BEB0 + push {r4, lr} + add r4, r0, #0 + bne _0222BEBA + bl sub_02022974 +_0222BEBA: + ldr r0, [r4, #4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BEB0 + + thumb_func_start ov63_0222BEC0 +ov63_0222BEC0: ; 0x0222BEC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _0222BECE + bl sub_02022974 +_0222BECE: + cmp r4, #0 + bne _0222BED6 + bl sub_02022974 +_0222BED6: + add r0, r5, #0 + bl ov63_0222C0B8 + mov r1, #0 + ldrsh r2, [r4, r1] + strh r2, [r0, #4] + mov r2, #2 + ldrsh r3, [r4, r2] + strh r3, [r0, #6] + ldrsh r1, [r4, r1] + strh r1, [r0, #8] + ldrsh r1, [r4, r2] + strh r1, [r0, #0xa] + ldrh r1, [r4, #4] + strh r1, [r0, #0xc] + ldrh r1, [r4, #6] + strb r1, [r0, #0x15] + ldrh r1, [r4, #8] + strb r1, [r0, #0x14] + ldrh r1, [r4, #0xa] + strh r1, [r0, #0xe] + mov r1, #1 + str r1, [r0, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BEC0 + + thumb_func_start ov63_0222BF08 +ov63_0222BF08: ; 0x0222BF08 + mov r2, #0x18 + mov r1, #0 +_0222BF0C: + strb r1, [r0] + add r0, r0, #1 + sub r2, r2, #1 + bne _0222BF0C + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222BF08 + + thumb_func_start ov63_0222BF18 +ov63_0222BF18: ; 0x0222BF18 + push {r3, r4, r5, r6} + ldr r5, [r0, #4] + mov r2, #0 + cmp r5, #0 + bls _0222BF4A + ldr r4, [r0, #0] + add r3, r2, #0 + add r0, r4, #0 +_0222BF28: + ldr r6, [r0, #0] + cmp r6, #1 + bne _0222BF40 + add r6, r4, r3 + ldrh r6, [r6, #0xc] + cmp r1, r6 + bne _0222BF40 + mov r0, #0x18 + mul r0, r2 + add r0, r4, r0 + pop {r3, r4, r5, r6} + bx lr +_0222BF40: + add r2, r2, #1 + add r0, #0x18 + add r3, #0x18 + cmp r2, r5 + blo _0222BF28 +_0222BF4A: + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov63_0222BF18 + + thumb_func_start ov63_0222BF50 +ov63_0222BF50: ; 0x0222BF50 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _0222BF5E + bl sub_02022974 +_0222BF5E: + ldr r0, [r5, #4] + cmp r4, r0 + blo _0222BF68 + bl sub_02022974 +_0222BF68: + ldr r2, [r5, #0] + mov r0, #0x18 + add r1, r4, #0 + mul r1, r0 + ldr r0, [r2, r1] + cmp r0, #1 + bne _0222BF7A + add r0, r2, r1 + pop {r3, r4, r5, pc} +_0222BF7A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov63_0222BF50 + + thumb_func_start ov63_0222BF80 +ov63_0222BF80: ; 0x0222BF80 + ldr r3, _0222BF84 ; =ov63_0222BF18 + bx r3 + ; .align 2, 0 +_0222BF84: .word ov63_0222BF18 + thumb_func_end ov63_0222BF80 + + thumb_func_start ov63_0222BF88 +ov63_0222BF88: ; 0x0222BF88 + ldr r3, _0222BF8C ; =ov63_0222BF50 + bx r3 + ; .align 2, 0 +_0222BF8C: .word ov63_0222BF50 + thumb_func_end ov63_0222BF88 + + thumb_func_start ov63_0222BF90 +ov63_0222BF90: ; 0x0222BF90 + push {r4, r5, r6, lr} + add r4, r0, #0 + add r6, r1, #0 + cmp r4, #0 + bne _0222BF9E + bl sub_02022974 +_0222BF9E: + cmp r6, #0xa + bhi _0222BFF8 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222BFAE: ; jump table + .short _0222BFC4 - _0222BFAE - 2 ; case 0 + .short _0222BFCA - _0222BFAE - 2 ; case 1 + .short _0222BFD0 - _0222BFAE - 2 ; case 2 + .short _0222BFD6 - _0222BFAE - 2 ; case 3 + .short _0222BFDC - _0222BFAE - 2 ; case 4 + .short _0222BFE0 - _0222BFAE - 2 ; case 5 + .short _0222BFE4 - _0222BFAE - 2 ; case 6 + .short _0222BFE8 - _0222BFAE - 2 ; case 7 + .short _0222BFEC - _0222BFAE - 2 ; case 8 + .short _0222BFF0 - _0222BFAE - 2 ; case 9 + .short _0222BFF4 - _0222BFAE - 2 ; case 10 +_0222BFC4: + mov r0, #4 + ldrsh r5, [r4, r0] + b _0222BFFC +_0222BFCA: + mov r0, #6 + ldrsh r5, [r4, r0] + b _0222BFFC +_0222BFD0: + mov r0, #8 + ldrsh r5, [r4, r0] + b _0222BFFC +_0222BFD6: + mov r0, #0xa + ldrsh r5, [r4, r0] + b _0222BFFC +_0222BFDC: + ldrh r5, [r4, #0xc] + b _0222BFFC +_0222BFE0: + ldrb r5, [r4, #0x15] + b _0222BFFC +_0222BFE4: + ldrb r5, [r4, #0x14] + b _0222BFFC +_0222BFE8: + ldrh r5, [r4, #0xe] + b _0222BFFC +_0222BFEC: + ldrh r5, [r4, #0x10] + b _0222BFFC +_0222BFF0: + ldrh r5, [r4, #0x12] + b _0222BFFC +_0222BFF4: + ldrh r5, [r4, #0x16] + b _0222BFFC +_0222BFF8: + bl sub_02022974 +_0222BFFC: + add r0, r5, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222BF90 + + thumb_func_start ov63_0222C000 +ov63_0222C000: ; 0x0222C000 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C010 + bl sub_02022974 +_0222C010: + cmp r6, #0xa + bhi _0222C072 + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0222C020: ; jump table + .short _0222C036 - _0222C020 - 2 ; case 0 + .short _0222C03A - _0222C020 - 2 ; case 1 + .short _0222C03E - _0222C020 - 2 ; case 2 + .short _0222C042 - _0222C020 - 2 ; case 3 + .short _0222C046 - _0222C020 - 2 ; case 4 + .short _0222C04A - _0222C020 - 2 ; case 5 + .short _0222C056 - _0222C020 - 2 ; case 6 + .short _0222C062 - _0222C020 - 2 ; case 7 + .short _0222C066 - _0222C020 - 2 ; case 8 + .short _0222C06A - _0222C020 - 2 ; case 9 + .short _0222C06E - _0222C020 - 2 ; case 10 +_0222C036: + strh r4, [r5, #4] + pop {r4, r5, r6, pc} +_0222C03A: + strh r4, [r5, #6] + pop {r4, r5, r6, pc} +_0222C03E: + strh r4, [r5, #8] + pop {r4, r5, r6, pc} +_0222C042: + strh r4, [r5, #0xa] + pop {r4, r5, r6, pc} +_0222C046: + strh r4, [r5, #0xc] + pop {r4, r5, r6, pc} +_0222C04A: + cmp r4, #0xc + blt _0222C052 + bl sub_02022974 +_0222C052: + strb r4, [r5, #0x15] + pop {r4, r5, r6, pc} +_0222C056: + cmp r4, #4 + blt _0222C05E + bl sub_02022974 +_0222C05E: + strb r4, [r5, #0x14] + pop {r4, r5, r6, pc} +_0222C062: + strh r4, [r5, #0xe] + pop {r4, r5, r6, pc} +_0222C066: + strh r4, [r5, #0x10] + pop {r4, r5, r6, pc} +_0222C06A: + strh r4, [r5, #0x12] + pop {r4, r5, r6, pc} +_0222C06E: + strh r4, [r5, #0x16] + pop {r4, r5, r6, pc} +_0222C072: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222C000 + + thumb_func_start ov63_0222C078 +ov63_0222C078: ; 0x0222C078 + push {r0, r1, r2, r3} + lsl r0, r1, #1 + add r2, sp, #0 + mov r1, #0 + ldrsh r3, [r2, r1] + ldr r1, _0222C0A4 ; =0x0222DC04 + ldrsb r1, [r1, r0] + add r1, r3, r1 + strh r1, [r2] + mov r1, #2 + ldrsh r3, [r2, r1] + ldr r1, _0222C0A8 ; =0x0222DC05 + ldrsb r0, [r1, r0] + add r0, r3, r0 + strh r0, [r2, #2] + ldrh r1, [r2, #2] + ldrh r0, [r2] + lsl r1, r1, #0x10 + orr r0, r1 + add sp, #0x10 + bx lr + nop +_0222C0A4: .word 0x0222DC04 +_0222C0A8: .word 0x0222DC05 + thumb_func_end ov63_0222C078 + + thumb_func_start ov63_0222C0AC +ov63_0222C0AC: ; 0x0222C0AC + ldr r1, _0222C0B4 ; =0x0222DC00 + ldrb r0, [r1, r0] + bx lr + nop +_0222C0B4: .word 0x0222DC00 + thumb_func_end ov63_0222C0AC + + thumb_func_start ov63_0222C0B8 +ov63_0222C0B8: ; 0x0222C0B8 + push {r4, lr} + ldr r4, [r0, #4] + mov r1, #0 + cmp r4, #0 + bls _0222C0DC + ldr r3, [r0, #0] + add r2, r3, #0 +_0222C0C6: + ldr r0, [r2, #0] + cmp r0, #0 + bne _0222C0D4 + mov r0, #0x18 + mul r0, r1 + add r0, r3, r0 + pop {r4, pc} +_0222C0D4: + add r1, r1, #1 + add r2, #0x18 + cmp r1, r4 + blo _0222C0C6 +_0222C0DC: + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov63_0222C0B8 + + thumb_func_start ov63_0222C0E4 +ov63_0222C0E4: ; 0x0222C0E4 + ldrh r1, [r0, #6] + ldrh r0, [r0, #4] + lsl r1, r1, #0x10 + orr r0, r1 + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222C0E4 + + thumb_func_start ov63_0222C0F0 +ov63_0222C0F0: ; 0x0222C0F0 + ldrh r1, [r0, #0xa] + ldrh r0, [r0, #8] + lsl r1, r1, #0x10 + orr r0, r1 + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222C0F0 + + thumb_func_start ov63_0222C0FC +ov63_0222C0FC: ; 0x0222C0FC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r1, #8 + bl ov63_0222BF90 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #9 + bl ov63_0222BF90 + add r6, r0, #0 + add r0, r5, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + add r0, r5, #0 + bl ov63_0222C0F0 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r2, #8 + strh r0, [r1, #8] + ldrh r0, [r1, #2] + strh r0, [r1, #0xa] + mov r0, #0xc + ldrsh r3, [r1, r0] + ldrsh r2, [r1, r2] + sub r2, r3, r2 + strh r2, [r1, #0xc] + mov r2, #0xa + ldrsh r5, [r1, r2] + mov r2, #0xe + ldrsh r2, [r1, r2] + sub r2, r2, r5 + strh r2, [r1, #0xe] + cmp r4, #0 + ble _0222C17A + ldrsh r0, [r1, r0] + add r1, r6, #0 + mul r0, r4 + bl sub_020E1F6C + add r1, sp, #0 + strh r0, [r1, #0xc] + mov r0, #0xe + ldrsh r0, [r1, r0] + add r1, r6, #0 + mul r0, r4 + bl sub_020E1F6C + add r1, sp, #0 + b _0222C17E +_0222C17A: + mov r0, #0 + strh r0, [r1, #0xc] +_0222C17E: + strh r0, [r1, #0xe] + add r1, sp, #0 + mov r0, #0xc + ldrsh r2, [r1, r0] + mov r0, #8 + ldrsh r0, [r1, r0] + add r0, r2, r0 + strh r0, [r1, #0xc] + mov r0, #0xe + ldrsh r0, [r1, r0] + add r0, r0, r5 + strh r0, [r1, #0xe] + ldrh r2, [r1, #0xe] + ldrh r0, [r1, #0xc] + lsl r1, r2, #0x10 + orr r0, r1 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222C0FC + + thumb_func_start ov63_0222C1A4 +ov63_0222C1A4: ; 0x0222C1A4 + push {r0, r1, r2, r3} + add r1, sp, #0 + ldrh r2, [r1, #4] + strh r2, [r0, #4] + ldrh r1, [r1, #6] + strh r1, [r0, #6] + add sp, #0x10 + bx lr + thumb_func_end ov63_0222C1A4 + + thumb_func_start ov63_0222C1B4 +ov63_0222C1B4: ; 0x0222C1B4 + push {r0, r1, r2, r3} + add r1, sp, #0 + ldrh r2, [r1, #4] + strh r2, [r0, #8] + ldrh r1, [r1, #6] + strh r1, [r0, #0xa] + add sp, #0x10 + bx lr + thumb_func_end ov63_0222C1B4 + + thumb_func_start ov63_0222C1C4 +ov63_0222C1C4: ; 0x0222C1C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + str r1, [sp] + add r4, r2, #0 + bl ov63_0222C0E4 + add r1, sp, #0x10 + strh r0, [r1, #0xc] + lsr r0, r0, #0x10 + strh r0, [r1, #0xe] + ldrh r0, [r1, #0xc] + mov r2, sp + sub r2, r2, #4 + strh r0, [r1, #0x1c] + ldrh r0, [r1, #0xe] + strh r0, [r1, #0x1e] + ldrh r0, [r1, #0x1c] + strh r0, [r2] + ldrh r0, [r1, #0x1e] + add r1, r4, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C078 + add r1, sp, #0x10 + strh r0, [r1, #8] + lsr r0, r0, #0x10 + strh r0, [r1, #0xa] + ldrh r0, [r1, #8] + strh r0, [r1, #0x14] + ldrh r0, [r1, #0xa] + strh r0, [r1, #0x16] + add r0, r5, #0 + mov r1, #4 + bl ov63_0222BF90 + str r0, [sp, #4] + ldr r0, [sp] + bl ov63_0222BEB0 + mov r5, #0 + str r0, [sp, #8] + cmp r0, #0 + bls _0222C2A4 + add r4, sp, #0x10 + mov r0, #0x16 + ldrsh r7, [r4, r0] + mov r0, #0x14 + ldrsh r0, [r4, r0] + str r0, [sp, #0xc] +_0222C22A: + lsl r1, r5, #0x10 + ldr r0, [sp] + lsr r1, r1, #0x10 + bl ov63_0222BF88 + add r6, r0, #0 + beq _0222C29C + mov r1, #4 + bl ov63_0222BF90 + ldr r1, [sp, #4] + cmp r0, r1 + beq _0222C29C + add r0, r6, #0 + bl ov63_0222C0E4 + strh r0, [r4, #4] + lsr r0, r0, #0x10 + strh r0, [r4, #6] + ldrh r0, [r4, #4] + strh r0, [r4, #0x18] + ldrh r0, [r4, #6] + strh r0, [r4, #0x1a] + mov r0, #0x18 + ldrsh r1, [r4, r0] + ldr r0, [sp, #0xc] + cmp r1, r0 + bne _0222C270 + mov r0, #0x1a + ldrsh r0, [r4, r0] + cmp r0, r7 + bne _0222C270 + add sp, #0x30 + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} +_0222C270: + add r0, r6, #0 + bl ov63_0222C0F0 + strh r0, [r4] + lsr r0, r0, #0x10 + strh r0, [r4, #2] + ldrh r0, [r4] + strh r0, [r4, #0x10] + ldrh r0, [r4, #2] + strh r0, [r4, #0x12] + mov r0, #0x10 + ldrsh r1, [r4, r0] + ldr r0, [sp, #0xc] + cmp r1, r0 + bne _0222C29C + mov r0, #0x12 + ldrsh r0, [r4, r0] + cmp r0, r7 + bne _0222C29C + add sp, #0x30 + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} +_0222C29C: + ldr r0, [sp, #8] + add r5, r5, #1 + cmp r5, r0 + blo _0222C22A +_0222C2A4: + mov r0, #0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov63_0222C1C4 + + thumb_func_start ov63_0222C2AC +ov63_0222C2AC: ; 0x0222C2AC + push {r0, r1, r2, r3} + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r2, sp, #0x30 + mov r1, #6 + str r0, [sp] + ldrsh r6, [r2, r1] + bl ov63_0222BEB0 + mov r5, #0 + str r0, [sp, #8] + cmp r0, #0 + bls _0222C344 + add r1, sp, #0x30 + mov r0, #4 + ldrsh r7, [r1, r0] + add r4, sp, #0xc +_0222C2CE: + lsl r1, r5, #0x10 + ldr r0, [sp] + lsr r1, r1, #0x10 + bl ov63_0222BF88 + str r0, [sp, #4] + cmp r0, #0 + beq _0222C33C + bl ov63_0222C0E4 + strh r0, [r4, #4] + lsr r0, r0, #0x10 + strh r0, [r4, #6] + ldrh r0, [r4, #4] + strh r0, [r4, #0xc] + ldrh r0, [r4, #6] + strh r0, [r4, #0xe] + mov r0, #0xc + ldrsh r0, [r4, r0] + cmp r0, r7 + bne _0222C30C + mov r0, #0xe + ldrsh r0, [r4, r0] + cmp r0, r6 + bne _0222C30C + ldr r0, [sp, #4] + add sp, #0x1c + pop {r4, r5, r6, r7} + pop {r3} + add sp, #0x10 + bx r3 +_0222C30C: + ldr r0, [sp, #4] + bl ov63_0222C0F0 + strh r0, [r4] + lsr r0, r0, #0x10 + strh r0, [r4, #2] + ldrh r0, [r4] + strh r0, [r4, #8] + ldrh r0, [r4, #2] + strh r0, [r4, #0xa] + mov r0, #8 + ldrsh r0, [r4, r0] + cmp r0, r7 + bne _0222C33C + mov r0, #0xa + ldrsh r0, [r4, r0] + cmp r0, r6 + bne _0222C33C + ldr r0, [sp, #4] + add sp, #0x1c + pop {r4, r5, r6, r7} + pop {r3} + add sp, #0x10 + bx r3 +_0222C33C: + ldr r0, [sp, #8] + add r5, r5, #1 + cmp r5, r0 + blo _0222C2CE +_0222C344: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C2AC + + thumb_func_start ov63_0222C350 +ov63_0222C350: ; 0x0222C350 + push {r3, r4, r5, lr} + add r3, r1, #0 + ldrh r1, [r3] + mov r2, sp + sub r2, r2, #4 + strh r1, [r2] + ldrh r1, [r3, #2] + add r4, r0, #0 + strh r1, [r2, #2] + ldr r1, [r2, #0] + ldrb r2, [r3, #6] + ldrh r3, [r3, #4] + lsl r5, r3, #2 + ldr r3, _0222C378 ; =0x0222DC0C + ldr r3, [r3, r5] + blx r3 + mov r0, #0 + strh r0, [r4, #0x16] + pop {r3, r4, r5, pc} + nop +_0222C378: .word 0x0222DC0C + thumb_func_end ov63_0222C350 + + thumb_func_start ov63_0222C37C +ov63_0222C37C: ; 0x0222C37C + push {r4, lr} + mov r1, #5 + add r4, r0, #0 + bl ov63_0222BF90 + add r1, r0, #0 + lsl r2, r1, #2 + ldr r1, _0222C3A8 ; =0x0222DC3C + add r0, r4, #0 + ldr r1, [r1, r2] + blx r1 + ldrh r1, [r4, #0x16] + add r1, r1, #1 + strh r1, [r4, #0x16] + cmp r0, #1 + bne _0222C3A6 + add r0, r4, #0 + bl ov63_0222CA48 + mov r0, #0 + strh r0, [r4, #0x16] +_0222C3A6: + pop {r4, pc} + ; .align 2, 0 +_0222C3A8: .word 0x0222DC3C + thumb_func_end ov63_0222C37C + + thumb_func_start ov63_0222C3AC +ov63_0222C3AC: ; 0x0222C3AC + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C3BC + bl sub_02022974 +_0222C3BC: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C3AC + + thumb_func_start ov63_0222C404 +ov63_0222C404: ; 0x0222C404 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C414 + bl sub_02022974 +_0222C414: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #1 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #2 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C404 + + thumb_func_start ov63_0222C470 +ov63_0222C470: ; 0x0222C470 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C482 + bl sub_02022974 +_0222C482: + add r0, sp, #0x18 + ldrh r1, [r0, #4] + mov r2, sp + sub r2, r2, #4 + strh r1, [r2] + ldrh r0, [r0, #6] + add r1, r4, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C9E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + add r1, sp, #0x18 + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #2 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #8 + bl ov63_0222C000 + add sp, #8 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov63_0222C470 + + thumb_func_start ov63_0222C508 +ov63_0222C508: ; 0x0222C508 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C51A + bl sub_02022974 +_0222C51A: + add r0, sp, #0x18 + ldrh r1, [r0, #4] + mov r2, sp + sub r2, r2, #4 + strh r1, [r2] + ldrh r0, [r0, #6] + add r1, r4, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C9E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + add r1, sp, #0x18 + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #3 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #4 + bl ov63_0222C000 + add sp, #8 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov63_0222C508 + + thumb_func_start ov63_0222C5A0 +ov63_0222C5A0: ; 0x0222C5A0 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C5B0 + bl sub_02022974 +_0222C5B0: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #4 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C5A0 + + thumb_func_start ov63_0222C5F8 +ov63_0222C5F8: ; 0x0222C5F8 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C608 + bl sub_02022974 +_0222C608: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + mov r1, #5 + add r0, r5, #0 + add r2, r1, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #0x10 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C5F8 + + thumb_func_start ov63_0222C664 +ov63_0222C664: ; 0x0222C664 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C676 + bl sub_02022974 +_0222C676: + add r0, sp, #0x18 + ldrh r1, [r0, #4] + mov r2, sp + sub r2, r2, #4 + strh r1, [r2] + ldrh r0, [r0, #6] + add r1, r4, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C9E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + add r1, sp, #0x18 + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #6 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #0x10 + bl ov63_0222C000 + add sp, #8 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov63_0222C664 + + thumb_func_start ov63_0222C6FC +ov63_0222C6FC: ; 0x0222C6FC + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C70E + bl sub_02022974 +_0222C70E: + add r0, sp, #0x18 + ldrh r1, [r0, #4] + mov r2, sp + sub r2, r2, #4 + strh r1, [r2] + ldrh r0, [r0, #6] + add r1, r4, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C9E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + add r1, sp, #0x18 + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #7 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #4 + bl ov63_0222C000 + add sp, #8 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov63_0222C6FC + + thumb_func_start ov63_0222C794 +ov63_0222C794: ; 0x0222C794 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C7A4 + bl sub_02022974 +_0222C7A4: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #8 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #2 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C794 + + thumb_func_start ov63_0222C800 +ov63_0222C800: ; 0x0222C800 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C810 + bl sub_02022974 +_0222C810: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #9 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #4 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C800 + + thumb_func_start ov63_0222C86C +ov63_0222C86C: ; 0x0222C86C + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C87C + bl sub_02022974 +_0222C87C: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #0xa + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #8 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C86C + + thumb_func_start ov63_0222C8D8 +ov63_0222C8D8: ; 0x0222C8D8 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + cmp r5, #0 + bne _0222C8E8 + bl sub_02022974 +_0222C8E8: + add r1, sp, #0x10 + ldrh r2, [r1, #4] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + add r0, r5, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + add r1, sp, #0x10 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r0, r5, #0 + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #5 + mov r2, #0xb + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #8 + mov r2, #0 + bl ov63_0222C000 + add r0, r5, #0 + mov r1, #9 + mov r2, #0x10 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C8D8 + + thumb_func_start ov63_0222C944 +ov63_0222C944: ; 0x0222C944 + mov r0, #0 + bx lr + thumb_func_end ov63_0222C944 + + thumb_func_start ov63_0222C948 +ov63_0222C948: ; 0x0222C948 + ldr r3, _0222C94C ; =ov63_0222CA14 + bx r3 + ; .align 2, 0 +_0222C94C: .word ov63_0222CA14 + thumb_func_end ov63_0222C948 + + thumb_func_start ov63_0222C950 +ov63_0222C950: ; 0x0222C950 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + bl ov63_0222CA14 + add r4, r0, #0 + cmp r4, #1 + bne _0222C98A + add r0, r5, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 +_0222C98A: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222C950 + + thumb_func_start ov63_0222C990 +ov63_0222C990: ; 0x0222C990 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + bl ov63_0222CA14 + add r4, r0, #0 + cmp r4, #1 + bne _0222C9CA + add r0, r5, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 +_0222C9CA: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222C990 + + thumb_func_start ov63_0222C9D0 +ov63_0222C9D0: ; 0x0222C9D0 + mov r0, #0 + bx lr + thumb_func_end ov63_0222C9D0 + + thumb_func_start ov63_0222C9D4 +ov63_0222C9D4: ; 0x0222C9D4 + ldr r3, _0222C9D8 ; =ov63_0222CA14 + bx r3 + ; .align 2, 0 +_0222C9D8: .word ov63_0222CA14 + thumb_func_end ov63_0222C9D4 + + thumb_func_start ov63_0222C9DC +ov63_0222C9DC: ; 0x0222C9DC + ldr r3, _0222C9E0 ; =ov63_0222CA14 + bx r3 + ; .align 2, 0 +_0222C9E0: .word ov63_0222CA14 + thumb_func_end ov63_0222C9DC + + thumb_func_start ov63_0222C9E4 +ov63_0222C9E4: ; 0x0222C9E4 + push {r0, r1, r2, r3} + push {r3, lr} + add r0, sp, #8 + ldrh r2, [r0] + mov r3, sp + sub r3, r3, #4 + strh r2, [r3] + ldrh r0, [r0, #2] + strh r0, [r3, #2] + ldr r0, [r3, #0] + bl ov63_0222C078 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r2, [r1, #2] + ldrh r0, [r1] + lsl r1, r2, #0x10 + orr r0, r1 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222C9E4 + + thumb_func_start ov63_0222CA14 +ov63_0222CA14: ; 0x0222CA14 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r1, #8 + bl ov63_0222BF90 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #9 + bl ov63_0222BF90 + add r6, r0, #0 + cmp r4, r6 + bge _0222CA42 + add r0, r5, #0 + mov r1, #8 + add r2, r4, #1 + bl ov63_0222C000 + add r0, r4, #1 + cmp r0, r6 + bge _0222CA42 + mov r0, #0 + pop {r4, r5, r6, pc} +_0222CA42: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CA14 + + thumb_func_start ov63_0222CA48 +ov63_0222CA48: ; 0x0222CA48 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + add r0, r4, #0 + mov r1, #6 + bl ov63_0222BF90 + add r1, sp, #0 + add r2, r0, #0 + add r0, r4, #0 + mov r4, sp + ldrh r3, [r1, #4] + sub r4, r4, #4 + strh r3, [r4] + ldrh r1, [r1, #6] + strh r1, [r4, #2] + ldr r1, [r4, #0] + bl ov63_0222C3AC + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CA48 + + .rodata + + + .global Unk_ov63_0222DC00 +Unk_ov63_0222DC00: ; 0x0222DC00 + .incbin "incbin/overlay63_rodata.bin", 0x300, 0x304 - 0x300 + + .global Unk_ov63_0222DC04 +Unk_ov63_0222DC04: ; 0x0222DC04 + .incbin "incbin/overlay63_rodata.bin", 0x304, 0x30C - 0x304 + + .global Unk_ov63_0222DC0C +Unk_ov63_0222DC0C: ; 0x0222DC0C + .incbin "incbin/overlay63_rodata.bin", 0x30C, 0x33C - 0x30C + + .global Unk_ov63_0222DC3C +Unk_ov63_0222DC3C: ; 0x0222DC3C + .incbin "incbin/overlay63_rodata.bin", 0x33C, 0x30 + diff --git a/asm/ov63_0222CA88.s b/asm/ov63_0222CA88.s new file mode 100644 index 000000000..b9a94a10d --- /dev/null +++ b/asm/ov63_0222CA88.s @@ -0,0 +1,348 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222CA88 +ov63_0222CA88: ; 0x0222CA88 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r0, #0 + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r7, #0 + bne _0222CA9C + bl sub_02022974 +_0222CA9C: + cmp r5, #0 + bne _0222CAA4 + bl sub_02022974 +_0222CAA4: + cmp r4, #0 + bne _0222CAAC + bl sub_02022974 +_0222CAAC: + cmp r6, #0 + bne _0222CAB4 + bl sub_02022974 +_0222CAB4: + ldrb r1, [r4, #3] + add r0, r5, #0 + bl ov63_0222BF80 + str r0, [sp, #4] + cmp r0, #0 + bne _0222CAC6 + bl sub_02022974 +_0222CAC6: + str r6, [sp] + add r3, r4, #0 + ldrh r4, [r4] + add r2, r5, #0 + ldr r0, [sp, #4] + lsl r5, r4, #2 + ldr r4, _0222CAE0 ; =0x0222DC6C + add r1, r7, #0 + ldr r4, [r4, r5] + blx r4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0222CAE0: .word 0x0222DC6C + thumb_func_end ov63_0222CA88 + + thumb_func_start ov63_0222CAE4 +ov63_0222CAE4: ; 0x0222CAE4 + push {r3, r4, r5, lr} + mov r1, #5 + add r5, r0, #0 + add r4, r3, #0 + bl ov63_0222BF90 + cmp r0, #0 + beq _0222CAF8 + cmp r0, #4 + bne _0222CB0C +_0222CAF8: + ldrb r0, [r4, #2] + add r1, r5, #0 + str r0, [sp] + ldrh r2, [r4] + ldrb r3, [r4, #3] + ldr r0, [sp, #0x10] + bl ov63_0222CCB8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0222CB0C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222CAE4 + + thumb_func_start ov63_0222CB10 +ov63_0222CB10: ; 0x0222CB10 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + mov r1, #5 + add r4, r3, #0 + bl ov63_0222BF90 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #6 + bl ov63_0222BF90 + cmp r6, #0 + bne _0222CB46 + ldrb r1, [r4, #2] + cmp r0, r1 + beq _0222CB46 + str r1, [sp] + ldrh r2, [r4] + ldrb r3, [r4, #3] + ldr r0, [sp, #0x18] + add r1, r5, #0 + bl ov63_0222CCB8 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0222CB46: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov63_0222CB10 + + thumb_func_start ov63_0222CB4C +ov63_0222CB4C: ; 0x0222CB4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r1, #0 + mov r1, #5 + add r5, r0, #0 + str r2, [sp, #4] + add r4, r3, #0 + bl ov63_0222BF90 + add r6, r0, #0 + bne _0222CB94 + ldrb r2, [r4, #2] + add r0, r5, #0 + add r1, r7, #0 + bl ov63_0222CC3C + cmp r0, #1 + beq _0222CB94 + ldrb r2, [r4, #2] + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov63_0222CCA4 + cmp r0, #1 + beq _0222CB94 + ldrb r0, [r4, #2] + add r1, r5, #0 + str r0, [sp] + ldrh r2, [r4] + ldrb r3, [r4, #3] + ldr r0, [sp, #0x20] + bl ov63_0222CCB8 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0222CB94: + cmp r6, #0 + bne _0222CBBA + add r0, r5, #0 + mov r1, #0xa + bl ov63_0222BF90 + cmp r0, #8 + blt _0222CBBA + ldrb r0, [r4, #2] + add r1, r5, #0 + mov r2, #5 + str r0, [sp] + ldrb r3, [r4, #3] + ldr r0, [sp, #0x20] + bl ov63_0222CCB8 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0222CBBA: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222CB4C + + thumb_func_start ov63_0222CBC0 +ov63_0222CBC0: ; 0x0222CBC0 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + bl ov63_0222CB4C + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov63_0222CBC0 + + thumb_func_start ov63_0222CBD0 +ov63_0222CBD0: ; 0x0222CBD0 + push {r3, r4, r5, lr} + mov r1, #5 + add r5, r0, #0 + add r4, r3, #0 + bl ov63_0222BF90 + cmp r0, #0 + bne _0222CBF4 + ldrb r0, [r4, #2] + add r1, r5, #0 + str r0, [sp] + ldrh r2, [r4] + ldrb r3, [r4, #3] + ldr r0, [sp, #0x10] + bl ov63_0222CCB8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0222CBF4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222CBD0 + + thumb_func_start ov63_0222CBF8 +ov63_0222CBF8: ; 0x0222CBF8 + push {r3, lr} + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CBF8 + + thumb_func_start ov63_0222CC04 +ov63_0222CC04: ; 0x0222CC04 + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + bl ov63_0222CB4C + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov63_0222CC04 + + thumb_func_start ov63_0222CC14 +ov63_0222CC14: ; 0x0222CC14 + push {r3, r4, r5, lr} + mov r1, #5 + add r5, r0, #0 + add r4, r3, #0 + bl ov63_0222BF90 + cmp r0, #0 + bne _0222CC38 + ldrb r0, [r4, #2] + add r1, r5, #0 + str r0, [sp] + ldrh r2, [r4] + ldrb r3, [r4, #3] + ldr r0, [sp, #0x10] + bl ov63_0222CCB8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0222CC38: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222CC14 + + thumb_func_start ov63_0222CC3C +ov63_0222CC3C: ; 0x0222CC3C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r2, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + mov r2, sp + sub r2, r2, #4 + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldrh r0, [r1, #0xc] + strh r0, [r2] + ldrh r0, [r1, #0xe] + add r1, r5, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C078 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #8 + strh r0, [r2, #8] + ldrh r0, [r2, #2] + strh r0, [r2, #0xa] + ldrsh r3, [r2, r1] + add r0, r4, #0 + asr r1, r3, #3 + lsr r1, r1, #0x1c + add r1, r3, r1 + mov r3, #0xa + ldrsh r3, [r2, r3] + lsl r1, r1, #0xc + lsr r1, r1, #0x10 + asr r2, r3, #3 + lsr r2, r2, #0x1c + add r2, r3, r2 + lsl r2, r2, #0xc + lsr r2, r2, #0x10 + bl ov63_0222BDAC + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CC3C + + thumb_func_start ov63_0222CCA4 +ov63_0222CCA4: ; 0x0222CCA4 + push {r3, lr} + bl ov63_0222C1C4 + cmp r0, #0 + beq _0222CCB2 + mov r0, #1 + pop {r3, pc} +_0222CCB2: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CCA4 + + thumb_func_start ov63_0222CCB8 +ov63_0222CCB8: ; 0x0222CCB8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r5] + ldrh r0, [r1, #2] + strh r0, [r5, #2] + strh r4, [r5, #4] + ldr r0, [sp, #0x18] + strb r6, [r5, #7] + strb r0, [r5, #6] + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov63_0222CCB8 + + .rodata + + + .global Unk_ov63_0222DC6C +Unk_ov63_0222DC6C: ; 0x0222DC6C + .incbin "incbin/overlay63_rodata.bin", 0x36C, 0x30 + diff --git a/asm/ov63_0222CCE4.s b/asm/ov63_0222CCE4.s new file mode 100644 index 000000000..32cc88fc9 --- /dev/null +++ b/asm/ov63_0222CCE4.s @@ -0,0 +1,658 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222CCE4 +ov63_0222CCE4: ; 0x0222CCE4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + str r1, [sp] + ldr r0, [sp, #0x18] + mov r1, #0xc + add r5, r2, #0 + add r6, r3, #0 + bl sub_02018144 + add r4, r0, #0 + ldr r1, [sp] + ldr r3, [sp, #0x18] + add r0, r7, #0 + add r2, r5, #0 + bl ov63_0222AE60 + str r0, [r4, #0] + strh r5, [r4, #8] + ldrh r2, [r4, #8] + mov r1, #0x14 + ldr r0, [sp, #0x18] + mul r1, r2 + bl sub_02018144 + str r0, [r4, #4] + ldrh r3, [r4, #8] + mov r2, #0x14 + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + mov r0, #2 + strb r0, [r4, #0xa] + strb r6, [r4, #0xb] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222CCE4 + + thumb_func_start ov63_0222CD2C +ov63_0222CD2C: ; 0x0222CD2C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, [sp, #0x28] + add r7, r0, #0 + str r1, [sp, #4] + add r0, r5, #0 + mov r1, #0xc + add r6, r2, #0 + str r3, [sp, #8] + bl sub_02018144 + add r4, r0, #0 + ldr r1, [sp, #4] + add r0, r7, #0 + add r2, r6, #0 + add r3, r5, #0 + bl ov63_0222AE60 + str r0, [r4, #0] + strh r6, [r4, #8] + ldrh r2, [r4, #8] + mov r1, #0x14 + add r0, r5, #0 + mul r1, r2 + bl sub_02018144 + str r0, [r4, #4] + ldrh r3, [r4, #8] + mov r2, #0x14 + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + mov r0, #2 + strb r0, [r4, #0xa] + ldr r0, [sp, #0x24] + ldr r1, [sp, #8] + strb r0, [r4, #0xb] + str r5, [sp] + ldrb r2, [r4, #0xb] + ldr r0, [r4, #0] + ldr r3, [sp, #0x20] + bl ov63_0222AF94 + ldrb r1, [r4, #0xb] + ldr r0, [r4, #0] + ldr r2, _0222CD98 ; =0x00009C41 + add r3, r5, #0 + bl ov63_0222B0A0 + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0222CD98: .word 0x00009C41 + thumb_func_end ov63_0222CD2C + + thumb_func_start ov63_0222CD9C +ov63_0222CD9C: ; 0x0222CD9C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrh r0, [r5, #8] + mov r6, #0 + cmp r0, #0 + ble _0222CDC8 + add r4, r6, #0 +_0222CDAA: + ldr r0, [r5, #4] + add r0, r0, r4 + bl ov63_0222D07C + cmp r0, #0 + bne _0222CDBE + ldr r0, [r5, #4] + add r0, r0, r4 + bl ov63_0222CECC +_0222CDBE: + ldrh r0, [r5, #8] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _0222CDAA +_0222CDC8: + ldr r0, [r5, #0] + bl ov63_0222B0B8 + add r0, r5, #0 + bl ov63_0222CE24 + ldr r0, [r5, #0] + bl ov63_0222AF14 + ldr r0, [r5, #4] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222CD9C + + thumb_func_start ov63_0222CDE8 +ov63_0222CDE8: ; 0x0222CDE8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + bl ov63_0222AFE4 + cmp r0, #0 + bne _0222CE0A + str r4, [sp] + ldrb r2, [r5, #0xb] + ldr r0, [r5, #0] + add r1, r6, #0 + add r3, r7, #0 + bl ov63_0222AF94 +_0222CE0A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222CDE8 + + thumb_func_start ov63_0222CE0C +ov63_0222CE0C: ; 0x0222CE0C + ldr r3, _0222CE14 ; =ov63_0222AFD0 + ldr r0, [r0, #0] + bx r3 + nop +_0222CE14: .word ov63_0222AFD0 + thumb_func_end ov63_0222CE0C + + thumb_func_start ov63_0222CE18 +ov63_0222CE18: ; 0x0222CE18 + ldr r3, _0222CE20 ; =ov63_0222AFE4 + ldr r0, [r0, #0] + bx r3 + nop +_0222CE20: .word ov63_0222AFE4 + thumb_func_end ov63_0222CE18 + + thumb_func_start ov63_0222CE24 +ov63_0222CE24: ; 0x0222CE24 + ldr r3, _0222CE2C ; =ov63_0222AFF8 + ldr r0, [r0, #0] + bx r3 + nop +_0222CE2C: .word ov63_0222AFF8 + thumb_func_end ov63_0222CE24 + + thumb_func_start ov63_0222CE30 +ov63_0222CE30: ; 0x0222CE30 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldrb r1, [r5, #0xb] + add r3, r2, #0 + ldr r0, [r5, #0] + add r2, r4, #0 + bl ov63_0222B02C + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222CE30 + + thumb_func_start ov63_0222CE44 +ov63_0222CE44: ; 0x0222CE44 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + add r7, r2, #0 + str r3, [sp] + bl ov63_0222D08C + add r4, r0, #0 + add r0, r5, #0 + mov r1, #5 + bl ov63_0222BF90 + strh r0, [r4, #8] + add r0, r5, #0 + mov r1, #6 + bl ov63_0222BF90 + strh r0, [r4, #0xa] + add r0, r5, #0 + mov r1, #4 + bl ov63_0222BF90 + strh r0, [r4, #0xc] + str r5, [r4, #0] + strb r7, [r4, #0x12] + mov r0, #1 + strb r0, [r4, #0x13] + mov r1, #0 + strh r1, [r4, #0xe] + add r0, r5, #0 + strh r1, [r4, #0x10] + bl ov63_0222BF90 + add r1, sp, #4 + strh r0, [r1] + add r0, r5, #0 + mov r1, #1 + bl ov63_0222BF90 + add r1, sp, #4 + strh r0, [r1, #2] + mov r0, #2 + ldrsh r0, [r1, r0] + ldrb r1, [r4, #0x12] + bl ov63_0222D034 + add r1, sp, #4 + strh r0, [r1, #4] + ldrb r0, [r6, #0xa] + strh r0, [r1, #6] + add r0, r5, #0 + mov r1, #7 + bl ov63_0222BF90 + add r2, r0, #0 + ldr r0, [r6, #0] + ldr r3, [sp] + add r1, sp, #4 + bl ov63_0222B0C0 + str r0, [r4, #4] + add r0, r4, #0 + bl ov63_0222CF14 + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov63_0222CE44 + + thumb_func_start ov63_0222CECC +ov63_0222CECC: ; 0x0222CECC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov63_0222B210 + mov r1, #0x14 + mov r0, #0 +_0222CEDA: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _0222CEDA + pop {r4, pc} + thumb_func_end ov63_0222CECC + + thumb_func_start ov63_0222CEE4 +ov63_0222CEE4: ; 0x0222CEE4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrh r0, [r5, #8] + mov r6, #0 + cmp r0, #0 + ble _0222CF10 + add r4, r6, #0 +_0222CEF2: + ldr r0, [r5, #4] + add r0, r0, r4 + bl ov63_0222D07C + cmp r0, #0 + bne _0222CF06 + ldr r0, [r5, #4] + add r0, r0, r4 + bl ov63_0222CF14 +_0222CF06: + ldrh r0, [r5, #8] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _0222CEF2 +_0222CF10: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CEE4 + + thumb_func_start ov63_0222CF14 +ov63_0222CF14: ; 0x0222CF14 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldrb r0, [r5, #0x13] + cmp r0, #0 + beq _0222CF9E + ldr r0, [r5, #0] + mov r1, #5 + bl ov63_0222BF90 + add r6, r0, #0 + ldr r0, [r5, #0] + mov r1, #6 + bl ov63_0222BF90 + add r4, r0, #0 + ldr r0, [r5, #0] + mov r1, #8 + bl ov63_0222BF90 + lsl r0, r0, #0x10 + asr r1, r0, #0x10 + ldrh r0, [r5, #8] + cmp r0, r6 + bne _0222CF50 + ldrh r0, [r5, #0xa] + cmp r0, r4 + bne _0222CF50 + cmp r1, #0 + bne _0222CF66 +_0222CF50: + strh r6, [r5, #8] + strh r4, [r5, #0xa] + ldr r0, [r5, #4] + add r1, r6, #0 + bl ov63_0222D0C4 + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov63_0222D110 +_0222CF66: + add r1, sp, #0 + add r0, r5, #0 + add r1, #2 + add r2, sp, #0 + bl ov63_0222D0E0 + add r3, sp, #0 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r5, #4] + bl ov63_0222B238 + add r1, sp, #0 + mov r0, #0 + ldrsh r0, [r1, r0] + ldrb r1, [r5, #0x12] + bl ov63_0222D034 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + ldr r0, [r5, #4] + bl ov63_0222B278 + ldr r0, [r5, #4] + bl ov63_0222B33C +_0222CF9E: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CF14 + + thumb_func_start ov63_0222CFA4 +ov63_0222CFA4: ; 0x0222CFA4 + strb r1, [r0, #0x13] + bx lr + thumb_func_end ov63_0222CFA4 + + thumb_func_start ov63_0222CFA8 +ov63_0222CFA8: ; 0x0222CFA8 + ldr r3, _0222CFB0 ; =ov63_0222D110 + mov r1, #1 + ldrh r2, [r0, #0xa] + bx r3 + ; .align 2, 0 +_0222CFB0: .word ov63_0222D110 + thumb_func_end ov63_0222CFA8 + + thumb_func_start ov63_0222CFB4 +ov63_0222CFB4: ; 0x0222CFB4 + ldr r3, _0222CFBC ; =ov63_0222B33C + ldr r0, [r0, #4] + bx r3 + nop +_0222CFBC: .word ov63_0222B33C + thumb_func_end ov63_0222CFB4 + + thumb_func_start ov63_0222CFC0 +ov63_0222CFC0: ; 0x0222CFC0 + push {r4, lr} + add r4, r0, #0 + ldrh r1, [r4, #8] + ldr r0, [r4, #4] + bl ov63_0222D0C4 + add r1, r0, #0 + ldrh r2, [r4, #0xa] + add r0, r4, #0 + bl ov63_0222D110 + add r0, r4, #0 + bl ov63_0222CF14 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222CFC0 + + thumb_func_start ov63_0222CFE0 +ov63_0222CFE0: ; 0x0222CFE0 + push {r0, r1, r2, r3} + push {r3, lr} + add r3, sp, #8 + mov r1, #4 + mov r2, #6 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r0, #4] + bl ov63_0222B238 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222CFE0 + + thumb_func_start ov63_0222CFFC +ov63_0222CFFC: ; 0x0222CFFC + ldr r3, _0222D004 ; =ov63_0222B2B0 + ldr r0, [r0, #4] + bx r3 + nop +_0222D004: .word ov63_0222B2B0 + thumb_func_end ov63_0222CFFC + + thumb_func_start ov63_0222D008 +ov63_0222D008: ; 0x0222D008 + ldr r3, _0222D010 ; =ov63_0222B294 + ldr r0, [r0, #4] + bx r3 + nop +_0222D010: .word ov63_0222B294 + thumb_func_end ov63_0222D008 + + thumb_func_start ov63_0222D014 +ov63_0222D014: ; 0x0222D014 + ldr r3, _0222D01C ; =ov63_0222B284 + ldr r0, [r0, #4] + bx r3 + nop +_0222D01C: .word ov63_0222B284 + thumb_func_end ov63_0222D014 + + thumb_func_start ov63_0222D020 +ov63_0222D020: ; 0x0222D020 + push {r4, lr} + add r2, r1, #0 + add r4, r0, #0 + mov r1, #0 + bl ov63_0222D110 + ldr r0, [r4, #4] + bl ov63_0222B33C + pop {r4, pc} + thumb_func_end ov63_0222D020 + + thumb_func_start ov63_0222D034 +ov63_0222D034: ; 0x0222D034 + cmp r1, #1 + bne _0222D040 + lsl r1, r0, #1 + ldr r0, _0222D048 ; =0x00009C40 + sub r0, r0, r1 + bx lr +_0222D040: + lsl r1, r0, #1 + ldr r0, _0222D04C ; =0x00009C41 + sub r0, r0, r1 + bx lr + ; .align 2, 0 +_0222D048: .word 0x00009C40 +_0222D04C: .word 0x00009C41 + thumb_func_end ov63_0222D034 + + thumb_func_start ov63_0222D050 +ov63_0222D050: ; 0x0222D050 + push {r3, lr} + ldr r0, [r0, #4] + bl ov63_0222B234 + bl sub_02021F48 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D050 + + thumb_func_start ov63_0222D060 +ov63_0222D060: ; 0x0222D060 + push {r0, r1, r2, r3} + push {r3, lr} + add r3, sp, #8 + mov r1, #4 + mov r2, #6 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r0, #4] + bl ov63_0222B2E0 + pop {r3} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov63_0222D060 + + thumb_func_start ov63_0222D07C +ov63_0222D07C: ; 0x0222D07C + ldr r0, [r0, #4] + cmp r0, #0 + bne _0222D086 + mov r0, #1 + bx lr +_0222D086: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222D07C + + thumb_func_start ov63_0222D08C +ov63_0222D08C: ; 0x0222D08C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrh r0, [r5, #8] + mov r6, #0 + cmp r0, #0 + ble _0222D0BA + add r4, r6, #0 +_0222D09A: + ldr r0, [r5, #4] + add r0, r0, r4 + bl ov63_0222D07C + cmp r0, #1 + bne _0222D0B0 + mov r0, #0x14 + ldr r1, [r5, #4] + mul r0, r6 + add r0, r1, r0 + pop {r4, r5, r6, pc} +_0222D0B0: + ldrh r0, [r5, #8] + add r6, r6, #1 + add r4, #0x14 + cmp r6, r0 + blt _0222D09A +_0222D0BA: + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D08C + + thumb_func_start ov63_0222D0C4 +ov63_0222D0C4: ; 0x0222D0C4 + push {r4, lr} + add r4, r1, #0 + bl ov63_0222B2BC + cmp r0, #2 + bne _0222D0D4 + mov r0, #0 + pop {r4, pc} +_0222D0D4: + ldr r0, _0222D0DC ; =0x0222DCA8 + ldrb r0, [r0, r4] + pop {r4, pc} + nop +_0222D0DC: .word 0x0222DCA8 + thumb_func_end ov63_0222D0C4 + + thumb_func_start ov63_0222D0E0 +ov63_0222D0E0: ; 0x0222D0E0 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r0, [r0, #0] + add r5, r1, #0 + add r4, r2, #0 + bl ov63_0222C0FC + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #4 + ldrsh r0, [r1, r0] + strh r0, [r5] + mov r0, #6 + ldrsh r0, [r1, r0] + strh r0, [r4] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D0E0 + + thumb_func_start ov63_0222D110 +ov63_0222D110: ; 0x0222D110 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + str r2, [sp] + bl ov63_0222B2D4 + add r7, r0, #0 + ldr r0, [r5, #4] + bl ov63_0222B2C4 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldr r0, [r5, #4] + ldr r2, [sp] + add r1, r4, #0 + bl ov63_0222B308 + cmp r6, r4 + beq _0222D15A + ldr r0, _0222D15C ; =0x0222DC9C + ldrb r0, [r0, r4] + cmp r0, #1 + bne _0222D14E + ldrh r0, [r5, #0x10] + cmp r0, r4 + bne _0222D14E + ldrh r1, [r5, #0xe] + ldr r0, [r5, #4] + bl ov63_0222B2C8 +_0222D14E: + ldr r0, _0222D15C ; =0x0222DC9C + ldrb r0, [r0, r6] + cmp r0, #1 + bne _0222D15A + strh r6, [r5, #0x10] + strh r7, [r5, #0xe] +_0222D15A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0222D15C: .word 0x0222DC9C + thumb_func_end ov63_0222D110 + + .rodata + + + .global Unk_ov63_0222DC9C +Unk_ov63_0222DC9C: ; 0x0222DC9C + .incbin "incbin/overlay63_rodata.bin", 0x39C, 0x3A8 - 0x39C + + .global Unk_ov63_0222DCA8 +Unk_ov63_0222DCA8: ; 0x0222DCA8 + .incbin "incbin/overlay63_rodata.bin", 0x3A8, 0xC + diff --git a/asm/ov63_0222D160.s b/asm/ov63_0222D160.s new file mode 100644 index 000000000..914423dc5 --- /dev/null +++ b/asm/ov63_0222D160.s @@ -0,0 +1,73 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222D160 +ov63_0222D160: ; 0x0222D160 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + add r0, r1, #0 + bl ov63_0222C0FC + add r3, sp, #0 + strh r0, [r3] + lsr r0, r0, #0x10 + strh r0, [r3, #2] + ldrh r0, [r3] + mov r1, #6 + mov r2, #4 + strh r0, [r3, #4] + ldrh r0, [r3, #2] + strh r0, [r3, #6] + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, r4, #0 + sub r1, #0x60 + sub r2, #0x70 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl ov63_0222D1A8 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D160 + + thumb_func_start ov63_0222D19C +ov63_0222D19C: ; 0x0222D19C + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #1] + strb r1, [r0, #2] + strb r1, [r0, #3] + bx lr + thumb_func_end ov63_0222D19C + + thumb_func_start ov63_0222D1A8 +ov63_0222D1A8: ; 0x0222D1A8 + strh r1, [r0] + strh r2, [r0, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222D1A8 + + thumb_func_start ov63_0222D1B0 +ov63_0222D1B0: ; 0x0222D1B0 + mov r1, #0 + ldrsh r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222D1B0 + + thumb_func_start ov63_0222D1B8 +ov63_0222D1B8: ; 0x0222D1B8 + mov r1, #2 + ldrsh r0, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov63_0222D1B8 \ No newline at end of file diff --git a/asm/ov63_0222D1C0.s b/asm/ov63_0222D1C0.s new file mode 100644 index 000000000..3fb1c07b4 --- /dev/null +++ b/asm/ov63_0222D1C0.s @@ -0,0 +1,790 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222D1C0 +ov63_0222D1C0: ; 0x0222D1C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r7, r1, #0 + add r0, r3, #0 + mov r1, #0x1c + add r5, r2, #0 + str r3, [sp, #4] + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x1c + mov r0, #0 +_0222D1DC: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0222D1DC + str r6, [r4, #0] + str r7, [r4, #4] + ldrb r0, [r5] + add r2, r5, #0 + str r0, [r4, #0x10] + ldrb r1, [r5, #1] + str r1, [r4, #0x14] + ldr r0, [r4, #4] + bl ov63_0222D31C + ldr r0, [sp, #4] + add r3, r4, #0 + str r0, [sp] + ldrb r0, [r5, #8] + ldrb r1, [r5, #9] + ldrb r2, [r5, #0xa] + add r3, #0xc + bl sub_02006F6C + str r0, [r4, #8] + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D1C0 + + thumb_func_start ov63_0222D214 +ov63_0222D214: ; 0x0222D214 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D214 + + thumb_func_start ov63_0222D228 +ov63_0222D228: ; 0x0222D228 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r6, r0, #0 + add r0, r4, #0 + bl ov63_0222D1B0 + add r5, r0, #0 + add r0, r4, #0 + bl ov63_0222D1B8 + add r4, r0, #0 + ldr r0, [r6, #0x10] + cmp r0, #0 + bne _0222D2A8 + cmp r5, #0 + ble _0222D25C + lsl r0, r5, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0222D26A +_0222D25C: + lsl r0, r5, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0222D26A: + add r7, r0, #0 + cmp r4, #0 + ble _0222D282 + lsl r0, r4, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0222D290 +_0222D282: + lsl r0, r4, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0222D290: + bl sub_020E1740 + str r0, [sp] + add r0, r7, #0 + bl sub_020E1740 + add r2, r0, #0 + ldr r0, [r6, #0] + ldr r1, [sp] + bl sub_0200962C + b _0222D30E +_0222D2A8: + cmp r5, #0 + ble _0222D2BE + lsl r0, r5, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0222D2CC +_0222D2BE: + lsl r0, r5, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0222D2CC: + add r7, r0, #0 + cmp r4, #0 + ble _0222D2E4 + lsl r0, r4, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0222D2F2 +_0222D2E4: + lsl r0, r4, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0222D2F2: + bl sub_020E1740 + str r0, [sp, #4] + add r0, r7, #0 + bl sub_020E1740 + mov r2, #3 + add r3, r0, #0 + lsl r2, r2, #0x12 + ldr r0, [r6, #0] + ldr r1, [sp, #4] + add r2, r3, r2 + bl sub_0200964C +_0222D30E: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov63_0222D378 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222D228 + + thumb_func_start ov63_0222D31C +ov63_0222D31C: ; 0x0222D31C + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + ldr r6, _0222D374 ; =0x0222DCB4 + add r5, r0, #0 + add r4, r1, #0 + ldmia r6!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldrb r1, [r2, #2] + add r0, sp, #0 + strb r1, [r0, #0x11] + ldrb r1, [r2, #3] + strb r1, [r0, #0x12] + ldrb r1, [r2, #4] + strb r1, [r0, #0x13] + ldrb r1, [r2, #5] + strb r1, [r0, #0x14] + ldrb r1, [r2, #6] + strb r1, [r0, #0x15] + mov r1, #0 + strb r1, [r0, #0x16] + ldrb r0, [r2, #7] + lsl r1, r4, #0x18 + lsr r1, r1, #0x18 + str r0, [sp, #0x18] + add r0, r5, #0 + bl sub_02019044 + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + add r2, sp, #0 + mov r3, #0 + bl sub_020183C4 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + nop +_0222D374: .word 0x0222DCB4 + thumb_func_end ov63_0222D31C + + thumb_func_start ov63_0222D378 +ov63_0222D378: ; 0x0222D378 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + asr r0, r1, #2 + lsr r0, r0, #0x1d + add r0, r1, r0 + lsl r0, r0, #0xd + asr r3, r0, #0x10 + asr r0, r2, #2 + lsr r0, r0, #0x1d + add r0, r2, r0 + lsr r4, r1, #0x1f + lsl r6, r1, #0x1d + sub r6, r6, r4 + mov r1, #0x1d + ror r6, r1 + add r4, r4, r6 + lsl r4, r4, #0x10 + asr r6, r4, #0x10 + lsr r4, r2, #0x1f + lsl r2, r2, #0x1d + sub r2, r2, r4 + ror r2, r1 + add r1, r4, r2 + lsl r1, r1, #0x10 + asr r4, r1, #0x10 + lsl r0, r0, #0xd + ldrh r1, [r5, #0x18] + asr r0, r0, #0x10 + cmp r3, r1 + bne _0222D3BC + ldrh r1, [r5, #0x1a] + cmp r0, r1 + beq _0222D3E4 +_0222D3BC: + strh r3, [r5, #0x18] + strh r0, [r5, #0x1a] + neg r0, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + neg r3, r3 + lsl r3, r3, #0x10 + ldr r0, [r5, #4] + ldr r1, [r5, #0x14] + ldr r2, [r5, #0xc] + asr r3, r3, #0x10 + bl ov63_0222D408 + ldr r1, [r5, #0x14] + ldr r0, [r5, #4] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201C3C0 +_0222D3E4: + ldr r1, [r5, #0x14] + ldr r0, [r5, #4] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #0 + add r3, r6, #0 + bl sub_0201C63C + ldr r1, [r5, #0x14] + ldr r0, [r5, #4] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + mov r2, #3 + add r3, r4, #0 + bl sub_0201C63C + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov63_0222D378 + + thumb_func_start ov63_0222D408 +ov63_0222D408: ; 0x0222D408 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + str r0, [sp, #0x1c] + add r0, r2, #0 + ldrh r0, [r0] + ldr r4, [sp, #0x50] + add r5, r3, #0 + lsl r0, r0, #0xd + asr r0, r0, #0x10 + str r0, [sp, #0x34] + add r0, r2, #0 + ldrh r0, [r0, #2] + str r1, [sp, #0x20] + str r2, [sp, #0x24] + lsl r0, r0, #0xd + asr r0, r0, #0x10 + str r0, [sp, #0x30] + cmp r5, #0 + bge _0222D438 + neg r0, r5 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0x2c] + b _0222D43C +_0222D438: + mov r0, #0 + str r0, [sp, #0x2c] +_0222D43C: + cmp r4, #0 + bge _0222D44A + neg r0, r4 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp, #0x28] + b _0222D44E +_0222D44A: + mov r0, #0 + str r0, [sp, #0x28] +_0222D44E: + cmp r5, #0 + bgt _0222D454 + mov r5, #0 +_0222D454: + cmp r4, #0 + bgt _0222D45A + mov r4, #0 +_0222D45A: + mov r0, #0x21 + sub r0, r0, r5 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 + mov r0, #0x19 + sub r0, r0, r4 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldr r0, [sp, #0x2c] + add r1, r0, r7 + ldr r0, [sp, #0x34] + cmp r0, r1 + bge _0222D47C + sub r0, r1, r0 + sub r0, r7, r0 + lsl r0, r0, #0x10 + asr r7, r0, #0x10 +_0222D47C: + ldr r0, [sp, #0x28] + add r1, r0, r6 + ldr r0, [sp, #0x30] + cmp r0, r1 + bge _0222D48E + sub r0, r1, r0 + sub r0, r6, r0 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 +_0222D48E: + mov r2, #0 + str r2, [sp] + mov r0, #0x21 + str r0, [sp, #4] + mov r0, #0x19 + ldr r1, [sp, #0x20] + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + lsl r1, r1, #0x18 + ldr r0, [sp, #0x1c] + lsr r1, r1, #0x18 + add r3, r2, #0 + bl sub_02019CB8 + lsl r0, r7, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x20] + add r0, #0xc + str r0, [sp, #0x24] + str r0, [sp, #8] + ldr r0, [sp, #0x2c] + lsl r1, r1, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x28] + lsl r2, r5, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x10] + ldr r0, [sp, #0x34] + lsl r3, r4, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x14] + ldr r0, [sp, #0x30] + lsr r1, r1, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl ov63_0222D4F8 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov63_0222D408 + + thumb_func_start ov63_0222D4F8 +ov63_0222D4F8: ; 0x0222D4F8 + push {r4, r5, r6, r7, lr} + sub sp, #0x54 + str r0, [sp, #0x1c] + str r1, [sp, #0x20] + ldr r0, [sp, #0x70] + str r3, [sp, #0x24] + str r0, [sp, #0x70] + ldr r0, [sp, #0x78] + add r4, r2, #0 + str r0, [sp, #0x78] + ldr r0, [sp, #0x7c] + str r0, [sp, #0x7c] + ldr r0, [sp, #0x80] + str r0, [sp, #0x80] + ldr r0, [sp, #0x7c] + ldr r1, [sp, #0x80] + bl ov63_0222D688 + str r0, [sp, #0x40] + cmp r0, #0 + add r1, sp, #0x58 + bne _0222D550 + ldrb r0, [r1, #0x10] + add r2, r4, #0 + str r0, [sp] + ldrb r0, [r1, #0x14] + str r0, [sp, #4] + ldr r0, [sp, #0x70] + str r0, [sp, #8] + ldrb r0, [r1, #0x1c] + str r0, [sp, #0xc] + ldr r0, [sp, #0x78] + str r0, [sp, #0x10] + ldr r0, [sp, #0x7c] + str r0, [sp, #0x14] + ldr r0, [sp, #0x80] + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x20] + ldr r3, [sp, #0x24] + bl sub_020198E8 + add sp, #0x54 + pop {r4, r5, r6, r7, pc} +_0222D550: + mov r0, #0x14 + ldrsb r0, [r1, r0] + str r0, [sp, #0x48] + cmp r0, #0 + bgt _0222D55C + b _0222D682 +_0222D55C: + mov r0, #0x10 + ldrsb r0, [r1, r0] + str r0, [sp, #0x3c] + mov r0, #0x1c + ldrsb r0, [r1, r0] + str r0, [sp, #0x38] + lsl r0, r4, #0x18 + asr r0, r0, #0x18 + str r0, [sp, #0x34] +_0222D56E: + ldr r0, [sp, #0x78] + lsr r2, r0, #0x1f + lsl r1, r0, #0x1b + sub r1, r1, r2 + mov r0, #0x1b + ror r1, r0 + add r0, r2, r1 + ldr r1, [sp, #0x48] + add r1, r0, r1 + cmp r1, #0x20 + bgt _0222D58E + ldr r1, [sp, #0x48] + str r1, [sp, #0x44] + mov r1, #0 + str r1, [sp, #0x48] + b _0222D5A2 +_0222D58E: + mov r1, #0x20 + sub r1, r1, r0 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + str r1, [sp, #0x44] + ldr r2, [sp, #0x48] + sub r1, r2, r1 + lsl r1, r1, #0x18 + asr r1, r1, #0x18 + str r1, [sp, #0x48] +_0222D5A2: + ldr r1, [sp, #0x78] + ldr r4, [sp, #0x3c] + lsl r1, r1, #0x13 + asr r2, r1, #0x18 + add r1, r4, #0 + ldr r5, [sp, #0x38] + ldr r7, [sp, #0x34] + cmp r1, #0 + ble _0222D662 + lsl r1, r2, #0x18 + lsr r1, r1, #0x18 + str r1, [sp, #0x30] + ldr r1, [sp, #0x44] + lsl r0, r0, #0x18 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + lsr r0, r0, #0x18 + str r1, [sp, #0x2c] + str r0, [sp, #0x4c] +_0222D5C8: + lsr r2, r5, #0x1f + lsl r1, r5, #0x1b + sub r1, r1, r2 + mov r0, #0x1b + ror r1, r0 + add r0, r2, r1 + str r0, [sp, #0x28] + add r0, r0, r4 + cmp r0, #0x20 + bgt _0222D5E2 + add r6, r4, #0 + mov r4, #0 + b _0222D5F2 +_0222D5E2: + ldr r0, [sp, #0x28] + mov r1, #0x20 + sub r0, r1, r0 + lsl r0, r0, #0x18 + asr r6, r0, #0x18 + sub r0, r4, r6 + lsl r0, r0, #0x18 + asr r4, r0, #0x18 +_0222D5F2: + ldr r0, [sp, #0x7c] + asr r1, r5, #4 + str r0, [sp] + ldr r0, [sp, #0x80] + lsr r1, r1, #0x1b + add r1, r5, r1 + str r0, [sp, #4] + add r0, sp, #0x50 + str r0, [sp, #8] + lsl r1, r1, #0x13 + asr r1, r1, #0x18 + lsl r1, r1, #0x18 + ldr r0, [sp, #0x70] + ldr r2, [sp, #0x30] + ldr r3, [sp, #0x40] + lsr r1, r1, #0x18 + bl ov63_0222D6BC + lsl r1, r6, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + ldr r1, [sp, #0x2c] + lsl r2, r7, #0x18 + str r1, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x28] + add r1, sp, #0x50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x4c] + lsr r2, r2, #0x18 + str r0, [sp, #0x10] + mov r0, #0 + ldrsh r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x14] + mov r0, #2 + ldrsh r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x20] + ldr r3, [sp, #0x24] + bl sub_020198E8 + add r0, r5, r6 + lsl r0, r0, #0x18 + asr r5, r0, #0x18 + add r0, r7, r6 + lsl r0, r0, #0x18 + asr r7, r0, #0x18 + cmp r4, #0 + bgt _0222D5C8 +_0222D662: + ldr r1, [sp, #0x78] + ldr r0, [sp, #0x44] + add r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x78] + ldr r1, [sp, #0x24] + ldr r0, [sp, #0x44] + add r0, r1, r0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x24] + ldr r0, [sp, #0x48] + cmp r0, #0 + ble _0222D682 + b _0222D56E +_0222D682: + add sp, #0x54 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D4F8 + + thumb_func_start ov63_0222D688 +ov63_0222D688: ; 0x0222D688 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0x40 + bls _0222D696 + bl sub_02022974 +_0222D696: + cmp r4, #0x40 + bls _0222D69E + bl sub_02022974 +_0222D69E: + cmp r5, #0x20 + bhi _0222D6AE + cmp r4, #0x20 + bhi _0222D6AA + mov r0, #0 + pop {r3, r4, r5, pc} +_0222D6AA: + mov r0, #2 + pop {r3, r4, r5, pc} +_0222D6AE: + cmp r4, #0x20 + bhi _0222D6B6 + mov r0, #1 + pop {r3, r4, r5, pc} +_0222D6B6: + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D688 + + thumb_func_start ov63_0222D6BC +ov63_0222D6BC: ; 0x0222D6BC + push {r4, r5, r6, lr} + add r5, r3, #0 + add r6, r2, #0 + ldr r4, [sp, #0x10] + ldr r3, [sp, #0x14] + ldr r2, [sp, #0x18] + cmp r5, #3 + bhi _0222D770 + add r5, r5, r5 + add r5, pc + ldrh r5, [r5, #6] + lsl r5, r5, #0x10 + asr r5, r5, #0x10 + add pc, r5 +_0222D6D8: ; jump table + .short _0222D6E0 - _0222D6D8 - 2 ; case 0 + .short _0222D6E6 - _0222D6D8 - 2 ; case 1 + .short _0222D704 - _0222D6D8 - 2 ; case 2 + .short _0222D722 - _0222D6D8 - 2 ; case 3 +_0222D6E0: + strh r4, [r2] + strh r3, [r2, #2] + pop {r4, r5, r6, pc} +_0222D6E6: + add r5, r1, #1 + lsl r5, r5, #5 + cmp r5, r4 + bgt _0222D6F2 + mov r4, #0x20 + b _0222D6F6 +_0222D6F2: + lsl r5, r1, #5 + sub r4, r4, r5 +_0222D6F6: + strh r4, [r2] + strh r3, [r2, #2] + lsl r2, r3, #0x16 + asr r2, r2, #0x10 + mul r2, r1 + add r0, r0, r2 + pop {r4, r5, r6, pc} +_0222D704: + add r1, r6, #1 + lsl r1, r1, #5 + strh r4, [r2] + cmp r1, r3 + bgt _0222D712 + mov r1, #0x20 + b _0222D716 +_0222D712: + lsl r1, r6, #5 + sub r1, r3, r1 +_0222D716: + strh r1, [r2, #2] + lsl r1, r4, #0x16 + asr r1, r1, #0x10 + mul r1, r6 + add r0, r0, r1 + pop {r4, r5, r6, pc} +_0222D722: + add r5, r1, #1 + lsl r5, r5, #5 + cmp r5, r4 + bgt _0222D72E + mov r5, #0x20 + b _0222D732 +_0222D72E: + lsl r5, r1, #5 + sub r5, r4, r5 +_0222D732: + strh r5, [r2] + add r5, r6, #1 + lsl r5, r5, #5 + cmp r5, r3 + bgt _0222D740 + mov r5, #0x20 + b _0222D744 +_0222D740: + lsl r5, r6, #5 + sub r5, r3, r5 +_0222D744: + strh r5, [r2, #2] + cmp r6, #0 + bne _0222D75C + mov r2, #0 + cmp r1, #0 + beq _0222D76C + mov r1, #2 + lsl r1, r1, #0xa + add r1, r2, r1 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 + b _0222D76C +_0222D75C: + lsl r2, r4, #0x16 + lsr r2, r2, #0x10 + cmp r1, #0 + beq _0222D76C + lsl r1, r3, #6 + add r1, r2, r1 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 +_0222D76C: + add r0, r0, r2 + pop {r4, r5, r6, pc} +_0222D770: + bl sub_02022974 + bl sub_02022974 + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222D6BC + + .rodata + + + .global Unk_ov63_0222DCB4 +Unk_ov63_0222DCB4: ; 0x0222DCB4 + .incbin "incbin/overlay63_rodata.bin", 0x3B4, 0x1C + diff --git a/asm/ov63_0222D77C.s b/asm/ov63_0222D77C.s new file mode 100644 index 000000000..16719856a --- /dev/null +++ b/asm/ov63_0222D77C.s @@ -0,0 +1,219 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov63_0222D77C +ov63_0222D77C: ; 0x0222D77C + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _0222D792 + bl sub_02022974 +_0222D792: + add r1, r5, #1 + str r1, [r4, #4] + add r0, r6, #0 + lsl r1, r1, #3 + bl sub_02018144 + str r0, [r4, #0] + ldr r2, [r4, #4] + mov r1, #0 + lsl r2, r2, #3 + bl sub_020D5124 + mov r0, #0 + strh r0, [r4, #8] + strh r0, [r4, #0xa] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222D77C + + thumb_func_start ov63_0222D7B4 +ov63_0222D7B4: ; 0x0222D7B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D7B4 + + thumb_func_start ov63_0222D7C8 +ov63_0222D7C8: ; 0x0222D7C8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldrh r0, [r5, #0xa] + add r4, r1, #0 + ldr r1, [r5, #4] + add r0, r0, #1 + bl sub_020E2178 + ldrh r0, [r5, #8] + cmp r0, r1 + bne _0222D7E8 + add r0, r5, #0 + add r1, sp, #0 + bl ov63_0222D810 +_0222D7E8: + ldrh r0, [r5, #0xa] + ldr r3, [r5, #0] + lsl r2, r0, #3 + ldrh r0, [r4] + add r1, r3, r2 + strh r0, [r3, r2] + ldrh r0, [r4, #2] + strh r0, [r1, #2] + ldrh r0, [r4, #4] + strh r0, [r1, #4] + ldrh r0, [r4, #6] + strh r0, [r1, #6] + ldrh r0, [r5, #0xa] + ldr r1, [r5, #4] + add r0, r0, #1 + bl sub_020E2178 + strh r1, [r5, #0xa] + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222D7C8 + + thumb_func_start ov63_0222D810 +ov63_0222D810: ; 0x0222D810 + push {r4, lr} + add r4, r0, #0 + ldrh r2, [r4, #8] + ldrh r0, [r4, #0xa] + cmp r0, r2 + bne _0222D820 + mov r0, #0 + pop {r4, pc} +_0222D820: + ldr r3, [r4, #0] + lsl r0, r2, #3 + add r2, r3, r0 + ldrh r0, [r3, r0] + strh r0, [r1] + ldrh r0, [r2, #2] + strh r0, [r1, #2] + ldrh r0, [r2, #4] + strh r0, [r1, #4] + ldrh r0, [r2, #6] + strh r0, [r1, #6] + ldrh r0, [r4, #8] + ldr r1, [r4, #4] + add r0, r0, #1 + bl sub_020E2178 + strh r1, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D810 + + thumb_func_start ov63_0222D848 +ov63_0222D848: ; 0x0222D848 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + bne _0222D85E + bl sub_02022974 +_0222D85E: + add r1, r5, #1 + str r1, [r4, #4] + add r0, r6, #0 + lsl r1, r1, #2 + bl sub_02018144 + str r0, [r4, #0] + ldr r2, [r4, #4] + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + mov r0, #0 + strh r0, [r4, #8] + strh r0, [r4, #0xa] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov63_0222D848 + + thumb_func_start ov63_0222D880 +ov63_0222D880: ; 0x0222D880 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D880 + + thumb_func_start ov63_0222D894 +ov63_0222D894: ; 0x0222D894 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrh r0, [r5, #0xa] + add r4, r1, #0 + ldr r1, [r5, #4] + add r0, r0, #1 + bl sub_020E2178 + ldrh r0, [r5, #8] + cmp r0, r1 + bne _0222D8B2 + add r0, r5, #0 + add r1, sp, #0 + bl ov63_0222D8D0 +_0222D8B2: + ldrh r0, [r5, #0xa] + ldr r3, [r5, #0] + lsl r2, r0, #2 + ldrh r0, [r4] + add r1, r3, r2 + strh r0, [r3, r2] + ldrh r0, [r4, #2] + strh r0, [r1, #2] + ldrh r0, [r5, #0xa] + ldr r1, [r5, #4] + add r0, r0, #1 + bl sub_020E2178 + strh r1, [r5, #0xa] + pop {r3, r4, r5, pc} + thumb_func_end ov63_0222D894 + + thumb_func_start ov63_0222D8D0 +ov63_0222D8D0: ; 0x0222D8D0 + push {r4, lr} + add r4, r0, #0 + ldrh r2, [r4, #8] + ldrh r0, [r4, #0xa] + cmp r0, r2 + bne _0222D8E0 + mov r0, #0 + pop {r4, pc} +_0222D8E0: + ldr r3, [r4, #0] + lsl r0, r2, #2 + add r2, r3, r0 + ldrh r0, [r3, r0] + strh r0, [r1] + ldrh r0, [r2, #2] + strh r0, [r1, #2] + ldrh r0, [r4, #8] + ldr r1, [r4, #4] + add r0, r0, #1 + bl sub_020E2178 + strh r1, [r4, #8] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov63_0222D8D0 \ No newline at end of file diff --git a/asm/overlay64.s b/asm/ov64_0222DCE0.s similarity index 97% rename from asm/overlay64.s rename to asm/ov64_0222DCE0.s index b9f256959..219960d64 100644 --- a/asm/overlay64.s +++ b/asm/ov64_0222DCE0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov64_0222DCE0 ov64_0222DCE0: ; 0x0222DCE0 push {r3, r4, r5, lr} @@ -8719,14 +8722,159 @@ _02232196: nop _0223219C: .word 0x000001C1 thumb_func_end ov64_0223217C - ; 0x022321A0 - .rodata - .incbin "incbin/overlay64_rodata.bin" + + + .global Unk_ov64_022321A0 +Unk_ov64_022321A0: ; 0x022321A0 + .incbin "incbin/overlay64_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov64_022321A4 +Unk_ov64_022321A4: ; 0x022321A4 + .incbin "incbin/overlay64_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov64_022321A8 +Unk_ov64_022321A8: ; 0x022321A8 + .incbin "incbin/overlay64_rodata.bin", 0x8, 0xC - 0x8 + + .global Unk_ov64_022321AC +Unk_ov64_022321AC: ; 0x022321AC + .incbin "incbin/overlay64_rodata.bin", 0xC, 0x10 - 0xC + + .global Unk_ov64_022321B0 +Unk_ov64_022321B0: ; 0x022321B0 + .incbin "incbin/overlay64_rodata.bin", 0x10, 0x14 - 0x10 + + .global Unk_ov64_022321B4 +Unk_ov64_022321B4: ; 0x022321B4 + .incbin "incbin/overlay64_rodata.bin", 0x14, 0x18 - 0x14 + + .global Unk_ov64_022321B8 +Unk_ov64_022321B8: ; 0x022321B8 + .incbin "incbin/overlay64_rodata.bin", 0x18, 0x1C - 0x18 + + .global Unk_ov64_022321BC +Unk_ov64_022321BC: ; 0x022321BC + .incbin "incbin/overlay64_rodata.bin", 0x1C, 0x22 - 0x1C + + .global Unk_ov64_022321C2 +Unk_ov64_022321C2: ; 0x022321C2 + .incbin "incbin/overlay64_rodata.bin", 0x22, 0x2A - 0x22 + + .global Unk_ov64_022321CA +Unk_ov64_022321CA: ; 0x022321CA + .incbin "incbin/overlay64_rodata.bin", 0x2A, 0x34 - 0x2A + + .global Unk_ov64_022321D4 +Unk_ov64_022321D4: ; 0x022321D4 + .incbin "incbin/overlay64_rodata.bin", 0x34, 0x40 - 0x34 + + .global Unk_ov64_022321E0 +Unk_ov64_022321E0: ; 0x022321E0 + .incbin "incbin/overlay64_rodata.bin", 0x40, 0x4C - 0x40 + + .global Unk_ov64_022321EC +Unk_ov64_022321EC: ; 0x022321EC + .incbin "incbin/overlay64_rodata.bin", 0x4C, 0x5C - 0x4C + + .global Unk_ov64_022321FC +Unk_ov64_022321FC: ; 0x022321FC + .incbin "incbin/overlay64_rodata.bin", 0x5C, 0x6C - 0x5C + + .global Unk_ov64_0223220C +Unk_ov64_0223220C: ; 0x0223220C + .incbin "incbin/overlay64_rodata.bin", 0x6C, 0x7C - 0x6C + + .global Unk_ov64_0223221C +Unk_ov64_0223221C: ; 0x0223221C + .incbin "incbin/overlay64_rodata.bin", 0x7C, 0x8E - 0x7C + + .global Unk_ov64_0223222E +Unk_ov64_0223222E: ; 0x0223222E + .incbin "incbin/overlay64_rodata.bin", 0x8E, 0xA2 - 0x8E + + .global Unk_ov64_02232242 +Unk_ov64_02232242: ; 0x02232242 + .incbin "incbin/overlay64_rodata.bin", 0xA2, 0xB8 - 0xA2 + + .global Unk_ov64_02232258 +Unk_ov64_02232258: ; 0x02232258 + .incbin "incbin/overlay64_rodata.bin", 0xB8, 0xCC - 0xB8 + + .global Unk_ov64_0223226C +Unk_ov64_0223226C: ; 0x0223226C + .incbin "incbin/overlay64_rodata.bin", 0xCC, 0xEC - 0xCC + + .global Unk_ov64_0223228C +Unk_ov64_0223228C: ; 0x0223228C + .incbin "incbin/overlay64_rodata.bin", 0xEC, 0x114 - 0xEC + + .global Unk_ov64_022322B4 +Unk_ov64_022322B4: ; 0x022322B4 + .incbin "incbin/overlay64_rodata.bin", 0x114, 0x144 - 0x114 + + .global Unk_ov64_022322E4 +Unk_ov64_022322E4: ; 0x022322E4 + .incbin "incbin/overlay64_rodata.bin", 0x144, 0x184 - 0x144 + + .global Unk_ov64_02232324 +Unk_ov64_02232324: ; 0x02232324 + .incbin "incbin/overlay64_rodata.bin", 0x184, 0x1F0 - 0x184 + + .global Unk_ov64_02232390 +Unk_ov64_02232390: ; 0x02232390 + .incbin "incbin/overlay64_rodata.bin", 0x1F0, 0x27C - 0x1F0 + + .global Unk_ov64_0223241C +Unk_ov64_0223241C: ; 0x0223241C + .incbin "incbin/overlay64_rodata.bin", 0x27C, 0x280 - 0x27C + + .global Unk_ov64_02232420 +Unk_ov64_02232420: ; 0x02232420 + .incbin "incbin/overlay64_rodata.bin", 0x280, 0x284 - 0x280 + + .global Unk_ov64_02232424 +Unk_ov64_02232424: ; 0x02232424 + .incbin "incbin/overlay64_rodata.bin", 0x284, 0x288 - 0x284 + + .global Unk_ov64_02232428 +Unk_ov64_02232428: ; 0x02232428 + .incbin "incbin/overlay64_rodata.bin", 0x288, 0x28C - 0x288 + + .global Unk_ov64_0223242C +Unk_ov64_0223242C: ; 0x0223242C + .incbin "incbin/overlay64_rodata.bin", 0x28C, 0x294 - 0x28C + + .global Unk_ov64_02232434 +Unk_ov64_02232434: ; 0x02232434 + .incbin "incbin/overlay64_rodata.bin", 0x294, 0x7 + .data - .incbin "incbin/overlay64_data.bin" - .bss - .space 0x0 + + .global Unk_ov64_02232440 +Unk_ov64_02232440: ; 0x02232440 + .incbin "incbin/overlay64_data.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov64_02232450 +Unk_ov64_02232450: ; 0x02232450 + .incbin "incbin/overlay64_data.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov64_02232460 +Unk_ov64_02232460: ; 0x02232460 + .incbin "incbin/overlay64_data.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov64_02232470 +Unk_ov64_02232470: ; 0x02232470 + .incbin "incbin/overlay64_data.bin", 0x30, 0x4C - 0x30 + + .global Unk_ov64_0223248C +Unk_ov64_0223248C: ; 0x0223248C + .incbin "incbin/overlay64_data.bin", 0x4C, 0x68 - 0x4C + + .global Unk_ov64_022324A8 +Unk_ov64_022324A8: ; 0x022324A8 + .incbin "incbin/overlay64_data.bin", 0x68, 0x60 + diff --git a/asm/overlay65.s b/asm/ov65_0222DCE0.s similarity index 65% rename from asm/overlay65.s rename to asm/ov65_0222DCE0.s index e073cd4f9..66bf6e90b 100644 --- a/asm/overlay65.s +++ b/asm/ov65_0222DCE0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov65_0222DCE0 ov65_0222DCE0: ; 0x0222DCE0 push {r3, lr} @@ -14531,7651 +14534,170 @@ _0223505E: pop {r4, pc} thumb_func_end ov65_0223503C - thumb_func_start ov65_02235060 -ov65_02235060: ; 0x02235060 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r2, #0 - add r4, r1, #0 - ldr r2, _02235120 ; =0x000006FC - mov r1, #0 - add r5, r0, #0 - str r3, [sp] - bl sub_020D5124 - ldr r0, [sp, #0x24] - str r4, [r5, #4] - sub r0, r0, #1 - lsr r7, r0, #3 - ldr r0, [sp] - add r2, r6, #0 - str r0, [r5, #0x10] - add r0, r5, #0 - ldr r1, [r5, #4] - add r0, #0x14 - bl ov65_0223587C - ldr r0, [r5, #0x10] - add r1, r4, #0 - bl ov65_02235918 - add r0, r7, #0 - bl ov65_02236474 - add r2, sp, #4 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - strh r0, [r2, #4] - ldrh r1, [r2, #2] - strh r1, [r2, #6] - ldrh r0, [r2, #4] - add r2, r4, #0 - bl ov63_0222BCE8 - ldr r1, _02235124 ; =0x000006E4 - str r0, [r5, r1] - add r0, r7, #0 - bl ov65_02236480 - add r1, r0, #0 - ldr r0, _02235124 ; =0x000006E4 - ldr r0, [r5, r0] - bl ov63_0222BD50 - mov r0, #0x30 - add r1, r4, #0 - bl ov63_0222BE18 - ldr r1, _02235128 ; =0x000006E8 - add r2, r4, #0 - str r0, [r5, r1] - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov65_022357E8 - mov r0, #0x6f - lsl r0, r0, #4 - add r0, r5, r0 - bl ov63_0222D19C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov65_0223582C - ldr r0, [r5, #0x10] - add r1, r4, #0 - add r2, r6, #0 - bl ov65_02235920 - mov r1, #0x6d - lsl r1, r1, #4 - add r0, r5, #0 - add r1, r5, r1 - add r2, r6, #0 - bl ov65_022362B0 - mov r0, #0x80 - add r1, r4, #0 - bl ov63_0222D848 - ldr r1, _0223512C ; =0x000006F8 - str r0, [r5, r1] - mov r0, #1 - str r0, [r5, #0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02235120: .word 0x000006FC -_02235124: .word 0x000006E4 -_02235128: .word 0x000006E8 -_0223512C: .word 0x000006F8 - thumb_func_end ov65_02235060 - - thumb_func_start ov65_02235130 -ov65_02235130: ; 0x02235130 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02235184 ; =0x000006F8 - ldr r0, [r4, r0] - bl ov63_0222D880 - add r0, r4, #0 - bl ov65_0223586C - mov r1, #0x6d - lsl r1, r1, #4 - add r0, r4, #0 - add r1, r4, r1 - bl ov65_022362EC - add r0, r4, #0 - bl ov65_0223560C - add r0, r4, #0 - bl ov65_0223581C - ldr r0, _02235188 ; =0x000006E8 - ldr r0, [r4, r0] - bl ov63_0222BE58 - ldr r0, _0223518C ; =0x000006E4 - ldr r0, [r4, r0] - bl ov63_0222BD30 - add r0, r4, #0 - add r0, #0x14 - bl ov65_022358CC - ldr r0, [r4, #0x10] - bl ov65_0223591C - ldr r2, _02235190 ; =0x000006FC - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 -_02235184: .word 0x000006F8 -_02235188: .word 0x000006E8 -_0223518C: .word 0x000006E4 -_02235190: .word 0x000006FC - thumb_func_end ov65_02235130 - - thumb_func_start ov65_02235194 -ov65_02235194: ; 0x02235194 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov65_02235194 - - thumb_func_start ov65_02235198 -ov65_02235198: ; 0x02235198 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02235234 ; =0x000006E8 - ldr r0, [r4, r0] - bl ov63_0222BE84 - add r0, r4, #0 - bl ov65_0223573C - add r0, r4, #0 - bl ov65_022356E8 - mov r1, #0x6f - lsl r1, r1, #4 - add r0, r4, r1 - sub r1, #0x24 - ldr r1, [r4, r1] - ldr r1, [r1, #0] - bl ov63_0222D160 - ldr r1, _02235238 ; =0x000006F4 - ldr r0, [r4, r1] - sub r1, r1, #4 - add r1, r4, r1 - bl ov63_0222D228 - ldr r0, _0223523C ; =0x000006EC - ldr r0, [r4, r0] - bl ov63_0222CEE4 - add r0, r4, #0 - bl ov65_02235778 - add r0, r4, #0 - bl ov65_02235B78 - add r0, r4, #0 - bl ov65_02235634 - cmp r0, #1 - bne _0223522E - add r0, r4, #0 - bl ov65_02235BE8 - cmp r0, #1 - bne _02235208 - add r0, r4, #0 - bl ov65_02235B30 - ldr r0, _02235240 ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #0x80 - tst r0, r1 - beq _02235208 - mov r0, #1 - pop {r4, pc} -_02235208: - ldr r0, _02235240 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0223522E - add r0, r4, #0 - bl ov65_02235254 - cmp r0, #0 - beq _02235220 - mov r0, #2 - pop {r4, pc} -_02235220: - add r0, r4, #0 - bl ov65_02235654 - cmp r0, #1 - bne _0223522E - mov r0, #3 - pop {r4, pc} -_0223522E: - mov r0, #0 - pop {r4, pc} - nop -_02235234: .word 0x000006E8 -_02235238: .word 0x000006F4 -_0223523C: .word 0x000006EC -_02235240: .word 0x021BF67C - thumb_func_end ov65_02235198 - - thumb_func_start ov65_02235244 -ov65_02235244: ; 0x02235244 - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #0 - beq _02235252 - ldr r0, [r0, #0x14] - bl sub_020219F8 -_02235252: - pop {r3, pc} - thumb_func_end ov65_02235244 - - thumb_func_start ov65_02235254 -ov65_02235254: ; 0x02235254 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223526C ; =0x000006CC - ldr r0, [r4, r0] - cmp r0, #0 - bne _02235264 - bl sub_02022974 -_02235264: - ldr r0, _0223526C ; =0x000006CC - ldr r0, [r4, r0] - ldrb r0, [r0, #0xa] - pop {r4, pc} - ; .align 2, 0 -_0223526C: .word 0x000006CC - thumb_func_end ov65_02235254 - - thumb_func_start ov65_02235270 -ov65_02235270: ; 0x02235270 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _022352C4 ; =0x000006CC - ldr r0, [r4, r0] - cmp r0, #0 - bne _02235282 - bl sub_02022974 -_02235282: - ldr r0, _022352C4 ; =0x000006CC - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl ov63_0222C0E4 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #4 - strh r0, [r2, #4] - ldrh r0, [r2, #2] - strh r0, [r2, #6] - ldrsh r3, [r2, r1] - ldr r0, _022352C8 ; =0x000006E4 - asr r1, r3, #3 - lsr r1, r1, #0x1c - add r1, r3, r1 - mov r3, #6 - ldrsh r3, [r2, r3] - lsl r1, r1, #0xc - ldr r0, [r4, r0] - asr r2, r3, #3 - lsr r2, r2, #0x1c - add r2, r3, r2 - lsl r2, r2, #0xc - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov63_0222BDE4 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_022352C4: .word 0x000006CC -_022352C8: .word 0x000006E4 - thumb_func_end ov65_02235270 - - thumb_func_start ov65_022352CC -ov65_022352CC: ; 0x022352CC - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _02235324 ; =0x000006CC - ldr r0, [r4, r0] - cmp r0, #0 - bne _022352DE - bl sub_02022974 -_022352DE: - ldr r0, _02235324 ; =0x000006CC - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl ov63_0222C0E4 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #4 - strh r0, [r2, #4] - ldrh r0, [r2, #2] - strh r0, [r2, #6] - ldrsh r3, [r2, r1] - ldr r0, _02235328 ; =0x000006E4 - asr r1, r3, #3 - lsr r1, r1, #0x1c - add r1, r3, r1 - mov r3, #6 - ldrsh r3, [r2, r3] - lsl r1, r1, #0xc - ldr r0, [r4, r0] - asr r2, r3, #3 - lsr r2, r2, #0x1c - add r2, r3, r2 - asr r2, r2, #4 - add r2, r2, #1 - lsl r2, r2, #0x10 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov63_0222BDE4 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_02235324: .word 0x000006CC -_02235328: .word 0x000006E4 - thumb_func_end ov65_022352CC - - thumb_func_start ov65_0223532C -ov65_0223532C: ; 0x0223532C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - ldr r0, [r5, #4] - bl ov63_0222D014 - add r2, r0, #0 - add r1, sp, #0 - add r0, r4, #0 - mov r4, sp - ldrh r3, [r1, #4] - sub r4, r4, #4 - sub r2, r2, #2 - strh r3, [r4] - ldrh r1, [r1, #6] - strh r1, [r4, #2] - ldr r1, [r4, #0] - bl ov65_02235B88 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_0223532C - - thumb_func_start ov65_02235370 -ov65_02235370: ; 0x02235370 - ldr r3, _02235374 ; =ov65_02235BD8 - bx r3 - ; .align 2, 0 -_02235374: .word ov65_02235BD8 - thumb_func_end ov65_02235370 - - thumb_func_start ov65_02235378 -ov65_02235378: ; 0x02235378 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov65_02235378 - - thumb_func_start ov65_0223537C -ov65_0223537C: ; 0x0223537C - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov65_0223537C - - thumb_func_start ov65_02235380 -ov65_02235380: ; 0x02235380 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - bl ov65_02235D7C - add r4, r0, #0 - ldr r0, _022353E4 ; =0x000006CC - add r1, sp, #0xc - str r4, [r5, r0] - add r0, r5, #0 - bl ov65_02235D08 - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0xc - str r3, [sp, #8] - bl ov65_02235DE4 - add r0, r5, #0 - add r1, r4, #0 - bl ov65_02235E48 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov65_02235DAC - mov r1, #0x6f - lsl r1, r1, #4 - add r0, r5, r1 - sub r1, #0x24 - ldr r1, [r5, r1] - ldr r1, [r1, #0] - bl ov63_0222D160 - ldr r1, _022353E8 ; =0x000006F4 - ldr r0, [r5, r1] - sub r1, r1, #4 - add r1, r5, r1 - bl ov63_0222D228 - add r0, r4, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022353E4: .word 0x000006CC -_022353E8: .word 0x000006F4 - thumb_func_end ov65_02235380 - - thumb_func_start ov65_022353EC -ov65_022353EC: ; 0x022353EC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r6, r2, #0 - add r7, r1, #0 - bl ov65_02235D7C - add r4, r0, #0 - add r0, r5, #0 - add r1, sp, #0x14 - sub r2, r6, #1 - bl ov65_02235C64 - ldr r0, _02235474 ; =0x000006CC - ldr r0, [r5, r0] - cmp r0, #0 - beq _02235442 - ldr r0, [r0, #0] - bl ov63_0222C0E4 - add r1, sp, #0xc - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r2, #8 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #4 - ldrsh r0, [r1, r0] - ldrsh r2, [r1, r2] - cmp r0, r2 - bne _02235442 - mov r0, #6 - mov r2, #0xa - ldrsh r0, [r1, r0] - ldrsh r1, [r1, r2] - cmp r0, r1 - bne _02235442 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02235442: - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x14 - add r3, r6, #0 - bl ov65_02235DE4 - add r0, r5, #0 - add r1, r4, #0 - bl ov65_02235E68 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov65_02235DAC - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02235474: .word 0x000006CC - thumb_func_end ov65_022353EC - - thumb_func_start ov65_02235478 -ov65_02235478: ; 0x02235478 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #6 - bl ov63_0222BF90 - ldr r0, _022354B0 ; =ov65_022361B0 - mov r1, #0 - str r0, [r4, #0x10] - ldr r0, _022354B4 ; =ov65_02235EF8 - str r0, [r4, #0x18] - mov r0, #2 - strh r0, [r4, #0xc] - strh r1, [r4, #8] - ldr r0, [r4, #4] - bl ov63_0222CFA4 - ldr r0, [r4, #4] - bl ov63_0222CFA8 - add r0, r5, #0 - mov r1, #4 - add r2, r4, #0 - bl ov65_02236250 - pop {r3, r4, r5, pc} - nop -_022354B0: .word ov65_022361B0 -_022354B4: .word ov65_02235EF8 - thumb_func_end ov65_02235478 - - thumb_func_start ov65_022354B8 -ov65_022354B8: ; 0x022354B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov63_0222CECC - ldr r0, [r4, #0] - bl ov63_0222BF08 - mov r1, #0x1c - mov r0, #0 -_022354CC: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _022354CC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_022354B8 - - thumb_func_start ov65_022354D8 -ov65_022354D8: ; 0x022354D8 - push {r3, lr} - ldr r0, [r0, #0] - mov r1, #4 - bl ov63_0222BF90 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, pc} - thumb_func_end ov65_022354D8 - - thumb_func_start ov65_022354E8 -ov65_022354E8: ; 0x022354E8 - push {r3, lr} - ldr r0, [r0, #0] - mov r1, #6 - bl ov63_0222BF90 - bl ov63_0222C0AC - pop {r3, pc} - thumb_func_end ov65_022354E8 - - thumb_func_start ov65_022354F8 -ov65_022354F8: ; 0x022354F8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x10] - add r4, r2, #0 - str r0, [r5, #0x14] - ldr r0, _02235568 ; =ov65_0223622C - mov r1, #4 - str r0, [r5, #0x10] - ldrh r0, [r5, #0xc] - strh r0, [r5, #0xe] - mov r0, #5 - strh r0, [r5, #0xc] - ldr r0, [r5, #0] - bl ov63_0222BF90 - add r3, r0, #0 - add r0, r6, #0 - mov r1, #0 - add r2, r4, #0 - bl ov65_02236230 - ldr r0, [r5, #4] - mov r1, #0 - bl ov63_0222CFA4 - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov63_0222D020 - ldr r0, [r5, #0] - mov r1, #0 - bl ov63_0222BF90 - add r1, sp, #0 - strh r0, [r1] - ldr r0, [r5, #0] - mov r1, #1 - bl ov63_0222BF90 - add r1, sp, #0 - strh r0, [r1, #2] - mov r3, sp - ldrh r2, [r1] - ldr r0, [r5, #4] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #2] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222CFE0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02235568: .word ov65_0223622C - thumb_func_end ov65_022354F8 - - thumb_func_start ov65_0223556C -ov65_0223556C: ; 0x0223556C - push {r3, lr} - cmp r1, #0 - beq _0223558A - ldr r0, [r1, #0x14] - cmp r0, #0 - beq _0223558A - str r0, [r1, #0x10] - mov r0, #0 - str r0, [r1, #0x14] - ldrh r0, [r1, #0xe] - strh r0, [r1, #0xc] - ldr r0, [r1, #4] - mov r1, #1 - bl ov63_0222CFA4 -_0223558A: - pop {r3, pc} - thumb_func_end ov65_0223556C - - thumb_func_start ov65_0223558C -ov65_0223558C: ; 0x0223558C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r4, r2, #0 - bl ov65_02236278 - cmp r0, #0 - bne _022355A2 - strb r4, [r5, #0xb] - pop {r4, r5, r6, pc} -_022355A2: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov65_0223628C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_0223558C - - thumb_func_start ov65_022355B0 -ov65_022355B0: ; 0x022355B0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov65_02235654 - cmp r0, #1 - bne _022355E6 - add r0, r5, #0 - bl ov65_022352CC - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - sub r0, r0, #3 - lsl r0, r0, #0x18 - asr r4, r0, #0x18 - bmi _022355D2 - cmp r4, #4 - blt _022355D6 -_022355D2: - bl sub_02022974 -_022355D6: - mov r0, #0x6d - lsl r0, r0, #4 - lsl r1, r4, #0x18 - add r0, r5, r0 - lsr r1, r1, #0x18 - bl ov65_02236440 - pop {r3, r4, r5, pc} -_022355E6: - bl sub_02022974 - pop {r3, r4, r5, pc} - thumb_func_end ov65_022355B0 - - thumb_func_start ov65_022355EC -ov65_022355EC: ; 0x022355EC - mov r1, #0x6d - lsl r1, r1, #4 - ldr r3, _022355F8 ; =ov65_02236464 - add r0, r0, r1 - bx r3 - nop -_022355F8: .word ov65_02236464 - thumb_func_end ov65_022355EC - - thumb_func_start ov65_022355FC -ov65_022355FC: ; 0x022355FC - mov r1, #0x6d - lsl r1, r1, #4 - ldr r3, _02235608 ; =ov65_02236304 - add r1, r0, r1 - bx r3 - nop -_02235608: .word ov65_02236304 - thumb_func_end ov65_022355FC - - thumb_func_start ov65_0223560C -ov65_0223560C: ; 0x0223560C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x63 - lsl r0, r0, #2 - mov r6, #0 - add r4, r5, r0 - add r7, r0, #0 -_0223561A: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02235626 - add r0, r4, #0 - bl ov65_022354B8 -_02235626: - add r6, r6, #1 - add r5, #0x1c - add r4, #0x1c - cmp r6, #0x30 - blt _0223561A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_0223560C - - thumb_func_start ov65_02235634 -ov65_02235634: ; 0x02235634 - push {r3, lr} - ldr r1, _02235650 ; =0x000006CC - ldr r0, [r0, r1] - mov r1, #5 - ldr r0, [r0, #0] - bl ov63_0222BF90 - cmp r0, #0 - bne _0223564A - mov r0, #1 - pop {r3, pc} -_0223564A: - mov r0, #0 - pop {r3, pc} - nop -_02235650: .word 0x000006CC - thumb_func_end ov65_02235634 - - thumb_func_start ov65_02235654 -ov65_02235654: ; 0x02235654 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _022356E0 ; =0x000006CC - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldr r0, _022356E0 ; =0x000006CC - mov r1, #6 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl ov63_0222BF90 - add r4, r0, #0 - add r0, sp, #0 - mov r2, sp - ldrh r1, [r0, #0xc] - sub r2, r2, #4 - strh r1, [r2] - ldrh r0, [r0, #0xe] - add r1, r4, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C078 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #8 - strh r0, [r2, #8] - ldrh r0, [r2, #2] - strh r0, [r2, #0xa] - ldrsh r3, [r2, r1] - ldr r0, _022356E4 ; =0x000006E4 - asr r1, r3, #3 - lsr r1, r1, #0x1c - add r1, r3, r1 - mov r3, #0xa - ldrsh r3, [r2, r3] - lsl r1, r1, #0xc - ldr r0, [r5, r0] - asr r2, r3, #3 - lsr r2, r2, #0x1c - add r2, r3, r2 - lsl r2, r2, #0xc - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov63_0222BDE4 - cmp r4, #0 - bne _022356DA - cmp r0, #2 - bne _022356DA - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, pc} -_022356DA: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022356E0: .word 0x000006CC -_022356E4: .word 0x000006E4 - thumb_func_end ov65_02235654 - - thumb_func_start ov65_022356E8 -ov65_022356E8: ; 0x022356E8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _02235730 ; =0x000006F8 - add r1, sp, #8 - ldr r0, [r5, r0] - bl ov63_0222D8D0 - cmp r0, #1 - bne _0223572C - ldr r7, _02235734 ; =0x000006E8 - add r6, sp, #0 - add r4, sp, #8 -_02235702: - ldr r0, _02235738 ; =0x000006E4 - ldr r1, [r5, r7] - ldr r0, [r5, r0] - add r2, r4, #0 - add r3, r6, #0 - bl ov63_0222CA88 - cmp r0, #1 - bne _0223571E - ldr r0, _02235734 ; =0x000006E8 - add r1, r6, #0 - ldr r0, [r5, r0] - bl ov63_0222BE70 -_0223571E: - ldr r0, _02235730 ; =0x000006F8 - add r1, r4, #0 - ldr r0, [r5, r0] - bl ov63_0222D8D0 - cmp r0, #1 - beq _02235702 -_0223572C: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02235730: .word 0x000006F8 -_02235734: .word 0x000006E8 -_02235738: .word 0x000006E4 - thumb_func_end ov65_022356E8 - - thumb_func_start ov65_0223573C -ov65_0223573C: ; 0x0223573C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x63 - lsl r0, r0, #2 - mov r6, #0 - add r4, r7, #0 - add r5, r7, r0 -_0223574A: - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223576A - mov r2, #0x67 - lsl r2, r2, #2 - ldr r2, [r4, r2] - add r0, r7, #0 - add r1, r5, #0 - blx r2 - cmp r0, #1 - bne _0223576A - add r0, r5, #0 - bl ov65_022354B8 -_0223576A: - add r6, r6, #1 - add r4, #0x1c - add r5, #0x1c - cmp r6, #0x30 - blt _0223574A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_0223573C - - thumb_func_start ov65_02235778 -ov65_02235778: ; 0x02235778 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x63 - lsl r0, r0, #2 - mov r6, #0 - add r4, r7, #0 - add r5, r7, r0 -_02235786: - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223579C - mov r2, #0x69 - lsl r2, r2, #2 - ldr r2, [r4, r2] - add r0, r7, #0 - add r1, r5, #0 - blx r2 -_0223579C: - add r6, r6, #1 - add r4, #0x1c - add r5, #0x1c - cmp r6, #0x30 - blt _02235786 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_02235778 - - thumb_func_start ov65_022357A8 -ov65_022357A8: ; 0x022357A8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r1, #0] - ldr r1, _022357E4 ; =0x000006E8 - ldr r1, [r4, r1] - bl ov63_0222C1C4 - cmp r0, #0 - beq _022357DE - mov r2, #0x63 - mov r1, #0 - add r5, r4, #0 - lsl r2, r2, #2 -_022357C2: - ldr r3, [r5, r2] - cmp r3, r0 - bne _022357D6 - mov r0, #0x63 - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r3, r4, r5, pc} -_022357D6: - add r1, r1, #1 - add r5, #0x1c - cmp r1, #0x30 - blt _022357C2 -_022357DE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022357E4: .word 0x000006E8 - thumb_func_end ov65_022357A8 - - thumb_func_start ov65_022357E8 -ov65_022357E8: ; 0x022357E8 - push {r4, r5, lr} - sub sp, #0xc - add r3, r1, #0 - mov r1, #0 - add r5, r0, #0 - add r4, r2, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - str r4, [sp, #8] - ldr r0, [r5, #0x14] - mov r2, #0x30 - bl ov63_0222CD2C - ldr r1, _02235818 ; =0x000006EC - add r2, r4, #0 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #2 - bl ov63_0222CE30 - add sp, #0xc - pop {r4, r5, pc} - nop -_02235818: .word 0x000006EC - thumb_func_end ov65_022357E8 - - thumb_func_start ov65_0223581C -ov65_0223581C: ; 0x0223581C - ldr r1, _02235824 ; =0x000006EC - ldr r3, _02235828 ; =ov63_0222CD9C - ldr r0, [r0, r1] - bx r3 - ; .align 2, 0 -_02235824: .word 0x000006EC -_02235828: .word ov63_0222CD9C - thumb_func_end ov65_0223581C - - thumb_func_start ov65_0223582C -ov65_0223582C: ; 0x0223582C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r6, _02235864 ; =0x02238BCC - add r4, r1, #0 - add r5, r0, #0 - add r2, sp, #0 - mov r1, #0xb -_0223583A: - ldrb r0, [r6] - add r6, r6, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0223583A - add r0, sp, #0 - ldrb r1, [r0, #9] - add r2, sp, #0 - add r1, r1, r3 - strb r1, [r0, #9] - add r0, r5, #0 - ldr r1, [r5, #0x10] - add r0, #0x18 - add r3, r4, #0 - bl ov63_0222D1C0 - ldr r1, _02235868 ; =0x000006F4 - str r0, [r5, r1] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02235864: .word 0x02238BCC -_02235868: .word 0x000006F4 - thumb_func_end ov65_0223582C - - thumb_func_start ov65_0223586C -ov65_0223586C: ; 0x0223586C - ldr r1, _02235874 ; =0x000006F4 - ldr r3, _02235878 ; =ov63_0222D214 - ldr r0, [r0, r1] - bx r3 - ; .align 2, 0 -_02235874: .word 0x000006F4 -_02235878: .word ov63_0222D214 - thumb_func_end ov65_0223586C - - thumb_func_start ov65_0223587C -ov65_0223587C: ; 0x0223587C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - str r2, [sp] - mov r0, #0x60 - add r1, r7, #4 - add r2, r6, #0 - bl sub_020095C4 - mov r2, #0x32 - str r0, [r7, #0] - add r0, r7, #4 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C - mov r4, #0 - add r5, r7, #0 -_022358A0: - mov r0, #0x10 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02009714 - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r5, r1] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022358A0 - ldr r2, [sp] - add r0, r7, #0 - add r1, r6, #0 - bl ov65_022358F8 - add r0, r7, #0 - add r1, r6, #0 - bl ov65_02235908 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_0223587C - - thumb_func_start ov65_022358CC -ov65_022358CC: ; 0x022358CC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl ov65_02235910 - add r0, r7, #0 - bl ov65_02235900 - mov r6, #0x4b - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #2 -_022358E2: - ldr r0, [r5, r6] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022358E2 - ldr r0, [r7, #0] - bl sub_02021964 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_022358CC - - thumb_func_start ov65_022358F8 -ov65_022358F8: ; 0x022358F8 - ldr r3, _022358FC ; =ov65_02235960 - bx r3 - ; .align 2, 0 -_022358FC: .word ov65_02235960 - thumb_func_end ov65_022358F8 - - thumb_func_start ov65_02235900 -ov65_02235900: ; 0x02235900 - ldr r3, _02235904 ; =ov65_02235A60 - bx r3 - ; .align 2, 0 -_02235904: .word ov65_02235A60 - thumb_func_end ov65_02235900 - - thumb_func_start ov65_02235908 -ov65_02235908: ; 0x02235908 - ldr r3, _0223590C ; =ov65_02235A94 - bx r3 - ; .align 2, 0 -_0223590C: .word ov65_02235A94 - thumb_func_end ov65_02235908 - - thumb_func_start ov65_02235910 -ov65_02235910: ; 0x02235910 - ldr r3, _02235914 ; =ov65_02235B14 - bx r3 - ; .align 2, 0 -_02235914: .word ov65_02235B14 - thumb_func_end ov65_02235910 - - thumb_func_start ov65_02235918 -ov65_02235918: ; 0x02235918 - bx lr - ; .align 2, 0 - thumb_func_end ov65_02235918 - - thumb_func_start ov65_0223591C -ov65_0223591C: ; 0x0223591C - bx lr - ; .align 2, 0 - thumb_func_end ov65_0223591C - - thumb_func_start ov65_02235920 -ov65_02235920: ; 0x02235920 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - mov r0, #1 - add r4, r2, #0 - lsl r0, r0, #8 - mov r2, #0 - add r5, r1, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x1e - add r3, r2, #0 - str r5, [sp, #4] - bl sub_02007130 - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - add r0, r4, #0 - mov r1, #0x1d - add r2, r6, #0 - str r5, [sp, #0xc] - bl sub_020070E8 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02235920 - - thumb_func_start ov65_02235960 -ov65_02235960: ; 0x02235960 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r4, r1, #0 - mov r1, #0x32 - add r5, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - add r6, r2, #0 - str r4, [sp, #8] - add r1, #0xfa - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #0x25 - mov r3, #0 - bl sub_02009A4C - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r5, r1] - mov r1, #0x32 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - add r1, #0xfe - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #0x24 - mov r3, #0 - bl sub_02009B04 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r0, #0x32 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - str r4, [sp, #8] - sub r1, #0xc - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #0x26 - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x32 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - str r4, [sp, #8] - sub r1, #0xc - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #0x27 - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r5, r1] - sub r1, #0xc - ldr r0, [r5, r1] - bl sub_0200A3DC - cmp r0, #1 - beq _022359F4 - bl sub_02022974 -_022359F4: - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_0200A640 - cmp r0, #1 - beq _02235A06 - bl sub_02022974 -_02235A06: - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009D4C - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_02009D4C - mov r1, #0x32 - add r0, r1, #0 - str r1, [sp] - sub r0, #0x33 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - mov r3, #0x4d - str r0, [sp, #0xc] - mov r2, #2 - str r2, [sp, #0x10] - add r2, r1, #0 - add r2, #0xfa - ldr r2, [r5, r2] - lsl r3, r3, #2 - str r2, [sp, #0x14] - add r2, r1, #0 - add r2, #0xfe - ldr r2, [r5, r2] - str r2, [sp, #0x18] - ldr r2, [r5, r3] - str r2, [sp, #0x1c] - add r2, r3, #4 - ldr r2, [r5, r2] - add r3, #0x18 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r5, r3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_020093B4 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - thumb_func_end ov65_02235960 - - thumb_func_start ov65_02235A60 -ov65_02235A60: ; 0x02235A60 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_0200A6DC - mov r7, #0x4b - lsl r7, r7, #2 - add r6, r7, #0 - mov r4, #0 - add r6, #0x10 -_02235A82: - ldr r0, [r5, r7] - ldr r1, [r5, r6] - bl sub_02009D68 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02235A82 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_02235A60 - - thumb_func_start ov65_02235A94 -ov65_02235A94: ; 0x02235A94 - push {r3, r4, r5, lr} - sub sp, #0x30 - add r4, r0, #0 - add r2, sp, #0 - mov r0, #0 - add r3, r1, #0 - add r5, r2, #0 - add r1, r0, #0 - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - ldr r1, [r4, #0] - str r1, [sp] - mov r1, #0x53 - lsl r1, r1, #2 - add r1, r4, r1 - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #0x28] - lsl r1, r1, #0xc - str r0, [sp, #0x24] - add r0, r2, #0 - str r1, [sp, #0x14] - str r1, [sp, #0x18] - str r3, [sp, #0x2c] - bl sub_02021AA0 - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0x5d - lsl r1, r1, #2 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021D6C - add sp, #0x30 - pop {r3, r4, r5, pc} - thumb_func_end ov65_02235A94 - - thumb_func_start ov65_02235B14 -ov65_02235B14: ; 0x02235B14 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02021BD4 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021BD4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02235B14 - - thumb_func_start ov65_02235B30 -ov65_02235B30: ; 0x02235B30 - push {r4, lr} - sub sp, #0x10 - add r1, sp, #0 - add r4, r0, #0 - bl ov65_02235D08 - add r2, sp, #0 - mov r0, #0 - ldrsh r1, [r2, r0] - add r1, #8 - strh r1, [r2] - mov r1, #2 - ldrsh r3, [r2, r1] - add r3, #0x20 - strh r3, [r2, #2] - ldrsh r0, [r2, r0] - lsl r0, r0, #0xc - str r0, [sp, #4] - ldrsh r0, [r2, r1] - add r1, sp, #4 - lsl r0, r0, #0xc - str r0, [sp, #8] - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021C50 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02235B30 - - thumb_func_start ov65_02235B78 -ov65_02235B78: ; 0x02235B78 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r0, [r0, r1] - ldr r3, _02235B84 ; =sub_02021CAC - mov r1, #0 - bx r3 - ; .align 2, 0 -_02235B84: .word sub_02021CAC - thumb_func_end ov65_02235B78 - - thumb_func_start ov65_02235B88 -ov65_02235B88: ; 0x02235B88 - push {r0, r1, r2, r3} - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r1, sp, #0x18 - mov r0, #4 - ldrsh r0, [r1, r0] - add r4, r2, #0 - add r0, #8 - lsl r0, r0, #0x10 - asr r0, r0, #4 - str r0, [sp] - mov r0, #6 - ldrsh r0, [r1, r0] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021C50 - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02021F58 - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - add sp, #0xc - pop {r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov65_02235B88 - - thumb_func_start ov65_02235BD8 -ov65_02235BD8: ; 0x02235BD8 - mov r1, #0x62 - lsl r1, r1, #2 - ldr r0, [r0, r1] - ldr r3, _02235BE4 ; =sub_02021CAC - mov r1, #0 - bx r3 - ; .align 2, 0 -_02235BE4: .word sub_02021CAC - thumb_func_end ov65_02235BD8 - - thumb_func_start ov65_02235BE8 -ov65_02235BE8: ; 0x02235BE8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _02235C5C ; =0x000006CC - ldr r0, [r5, r0] - cmp r0, #0 - bne _02235BFC - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02235BFC: - ldr r0, [r0, #0] - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - ldr r0, _02235C5C ; =0x000006CC - mov r1, #6 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl ov63_0222BF90 - add r4, r0, #0 - ldr r0, _02235C60 ; =0x000006E4 - add r2, sp, #0 - mov r1, #4 - ldrsh r3, [r2, r1] - ldr r0, [r5, r0] - asr r1, r3, #3 - lsr r1, r1, #0x1c - add r1, r3, r1 - mov r3, #6 - ldrsh r3, [r2, r3] - lsl r1, r1, #0xc - lsr r1, r1, #0x10 - asr r2, r3, #3 - lsr r2, r2, #0x1c - add r2, r3, r2 - lsl r2, r2, #0xc - lsr r2, r2, #0x10 - bl ov63_0222BDE4 - cmp r0, #0xf - bne _02235C54 - cmp r4, #1 - bne _02235C54 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_02235C54: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02235C5C: .word 0x000006CC -_02235C60: .word 0x000006E4 - thumb_func_end ov65_02235BE8 - - thumb_func_start ov65_02235C64 -ov65_02235C64: ; 0x02235C64 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #7 - add r4, r2, #0 - and r4, r0 - ldr r0, _02235D04 ; =0x000006E4 - str r1, [sp] - ldr r0, [r5, r0] - lsr r7, r2, #3 - bl ov63_0222BD48 - add r6, r0, #0 - ldr r0, _02235D04 ; =0x000006E4 - ldr r0, [r5, r0] - bl ov63_0222BD4C - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #4] - cmp r0, #0 - bls _02235CFC - add r0, r7, #3 - str r0, [sp, #0x14] - add r0, r4, #7 - str r0, [sp, #0xc] -_02235C9A: - mov r4, #0 - cmp r6, #0 - bls _02235CF0 - ldr r0, [sp, #8] - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 -_02235CB0: - ldr r0, _02235D04 ; =0x000006E4 - lsl r1, r4, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - add r2, r7, #0 - bl ov63_0222BDE4 - ldr r1, [sp, #0xc] - cmp r0, r1 - bne _02235CEA - ldr r0, _02235D04 ; =0x000006E4 - lsl r1, r4, #0x10 - ldr r0, [r5, r0] - ldr r2, [sp, #0x10] - lsr r1, r1, #0x10 - bl ov63_0222BDE4 - ldr r1, [sp, #0x14] - cmp r0, r1 - bne _02235CEA - ldr r0, [sp] - lsl r1, r4, #4 - strh r1, [r0] - ldr r0, [sp, #8] - lsl r1, r0, #4 - ldr r0, [sp] - add sp, #0x18 - strh r1, [r0, #2] - pop {r3, r4, r5, r6, r7, pc} -_02235CEA: - add r4, r4, #1 - cmp r4, r6 - blo _02235CB0 -_02235CF0: - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #8] - cmp r1, r0 - blo _02235C9A -_02235CFC: - bl sub_02022974 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02235D04: .word 0x000006E4 - thumb_func_end ov65_02235C64 - - thumb_func_start ov65_02235D08 -ov65_02235D08: ; 0x02235D08 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - ldr r0, _02235D78 ; =0x000006E4 - str r1, [sp] - ldr r0, [r7, r0] - bl ov63_0222BD48 - add r5, r0, #0 - ldr r0, _02235D78 ; =0x000006E4 - ldr r0, [r7, r0] - bl ov63_0222BD4C - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #4] - cmp r0, #0 - bls _02235D70 -_02235D2E: - mov r4, #0 - cmp r5, #0 - bls _02235D64 - ldr r0, [sp, #8] - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 -_02235D3A: - ldr r0, _02235D78 ; =0x000006E4 - lsl r1, r4, #0x10 - ldr r0, [r7, r0] - lsr r1, r1, #0x10 - add r2, r6, #0 - bl ov63_0222BDE4 - cmp r0, #0xf - bne _02235D5E - ldr r0, [sp] - lsl r1, r4, #4 - strh r1, [r0] - ldr r0, [sp, #8] - lsl r1, r0, #4 - ldr r0, [sp] - add sp, #0xc - strh r1, [r0, #2] - pop {r4, r5, r6, r7, pc} -_02235D5E: - add r4, r4, #1 - cmp r4, r5 - blo _02235D3A -_02235D64: - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #8] - cmp r1, r0 - blo _02235D2E -_02235D70: - bl sub_02022974 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02235D78: .word 0x000006E4 - thumb_func_end ov65_02235D08 - - thumb_func_start ov65_02235D7C -ov65_02235D7C: ; 0x02235D7C - push {r4, lr} - mov r2, #0x63 - mov r1, #0 - add r4, r0, #0 - lsl r2, r2, #2 -_02235D86: - ldr r3, [r4, r2] - cmp r3, #0 - bne _02235D9A - mov r2, #0x63 - lsl r2, r2, #2 - add r2, r0, r2 - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} -_02235D9A: - add r1, r1, #1 - add r4, #0x1c - cmp r1, #0x30 - blt _02235D86 - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02235D7C - - thumb_func_start ov65_02235DAC -ov65_02235DAC: ; 0x02235DAC - push {r3, r4, r5, lr} - add r3, r0, #0 - ldr r0, _02235DE0 ; =0x000006EC - add r5, r1, #0 - ldr r0, [r3, r0] - ldr r1, [r5, #0] - ldr r3, [r3, #4] - add r4, r2, #0 - bl ov63_0222CE44 - str r0, [r5, #4] - cmp r4, #0 - bne _02235DDC - ldr r0, [r5, #4] - mov r1, #0 - bl ov63_0222CFA4 - ldr r0, [r5, #4] - bl ov63_0222CFA8 - ldr r0, [r5, #4] - mov r1, #0 - bl ov63_0222D008 -_02235DDC: - pop {r3, r4, r5, pc} - nop -_02235DE0: .word 0x000006EC - thumb_func_end ov65_02235DAC - - thumb_func_start ov65_02235DE4 -ov65_02235DE4: ; 0x02235DE4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - mov r1, #0 - ldrsh r1, [r2, r1] - add r5, sp, #0 - strh r1, [r5] - mov r1, #2 - ldrsh r1, [r2, r1] - strh r1, [r5, #2] - ldr r1, [sp, #0x20] - strh r3, [r5, #4] - strh r1, [r5, #6] - add r1, sp, #8 - ldrb r2, [r1, #0x14] - strh r2, [r5, #8] - ldrh r1, [r1, #0x10] - strh r1, [r5, #0xa] - ldr r1, _02235E18 ; =0x000006E8 - ldr r0, [r0, r1] - add r1, sp, #0 - bl ov63_0222BEC0 - str r0, [r4, #0] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02235E18: .word 0x000006E8 - thumb_func_end ov65_02235DE4 - - thumb_func_start ov65_02235E1C -ov65_02235E1C: ; 0x02235E1C - ldrh r0, [r0, #0xc] - cmp r0, #5 - bhi _02235E42 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02235E2E: ; jump table - .short _02235E3A - _02235E2E - 2 ; case 0 - .short _02235E3E - _02235E2E - 2 ; case 1 - .short _02235E3E - _02235E2E - 2 ; case 2 - .short _02235E3A - _02235E2E - 2 ; case 3 - .short _02235E3A - _02235E2E - 2 ; case 4 - .short _02235E3E - _02235E2E - 2 ; case 5 -_02235E3A: - mov r0, #1 - bx lr -_02235E3E: - mov r0, #0 - bx lr -_02235E42: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov65_02235E1C - - thumb_func_start ov65_02235E48 -ov65_02235E48: ; 0x02235E48 - add r2, r1, #0 - ldr r1, _02235E5C ; =ov65_02236044 - ldr r3, _02235E60 ; =ov65_02236250 - str r1, [r2, #0x10] - ldr r1, _02235E64 ; =ov65_02235EF4 - str r1, [r2, #0x18] - mov r1, #0 - strh r1, [r2, #0xc] - bx r3 - nop -_02235E5C: .word ov65_02236044 -_02235E60: .word ov65_02236250 -_02235E64: .word ov65_02235EF4 - thumb_func_end ov65_02235E48 - - thumb_func_start ov65_02235E68 -ov65_02235E68: ; 0x02235E68 - ldr r0, _02235E7C ; =ov65_02236158 - str r0, [r1, #0x10] - ldr r0, _02235E80 ; =ov65_02235EF8 - str r0, [r1, #0x18] - mov r0, #0x2d - strh r0, [r1, #8] - mov r0, #1 - strh r0, [r1, #0xc] - bx lr - nop -_02235E7C: .word ov65_02236158 -_02235E80: .word ov65_02235EF8 - thumb_func_end ov65_02235E68 - - thumb_func_start ov65_02235E84 -ov65_02235E84: ; 0x02235E84 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _02235EBC ; =ov65_022361C8 - add r4, r1, #0 - str r0, [r4, #0x10] - ldr r0, _02235EC0 ; =ov65_02235EF4 - str r0, [r4, #0x18] - bl sub_0201D35C - ldr r1, _02235EC4 ; =0x000003FF - add r2, r4, #0 - and r1, r0 - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - strh r0, [r4, #8] - mov r0, #3 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #0 - bl ov65_02236250 - ldr r0, [r4, #4] - mov r1, #1 - bl ov63_0222CFA4 - pop {r3, r4, r5, pc} - nop -_02235EBC: .word ov65_022361C8 -_02235EC0: .word ov65_02235EF4 -_02235EC4: .word 0x000003FF - thumb_func_end ov65_02235E84 - - thumb_func_start ov65_02235EC8 -ov65_02235EC8: ; 0x02235EC8 - push {r4, lr} - add r4, r1, #0 - ldr r1, _02235EEC ; =ov65_02236214 - add r2, r4, #0 - str r1, [r4, #0x10] - ldr r1, _02235EF0 ; =ov65_02235F94 - str r1, [r4, #0x18] - mov r1, #0x1c - strh r1, [r4, #8] - mov r1, #4 - strh r1, [r4, #0xc] - bl ov65_02236250 - ldr r0, [r4, #4] - mov r1, #0 - bl ov63_0222CFA4 - pop {r4, pc} - ; .align 2, 0 -_02235EEC: .word ov65_02236214 -_02235EF0: .word ov65_02235F94 - thumb_func_end ov65_02235EC8 - - thumb_func_start ov65_02235EF4 -ov65_02235EF4: ; 0x02235EF4 - bx lr - ; .align 2, 0 - thumb_func_end ov65_02235EF4 - - thumb_func_start ov65_02235EF8 -ov65_02235EF8: ; 0x02235EF8 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - ldr r0, [r4, #4] - bl ov63_0222CFB4 - ldr r0, [r4, #4] - bl ov63_0222CFFC - cmp r0, #0 - bne _02235F16 - ldr r0, [r4, #4] - mov r1, #1 - bl ov63_0222D008 -_02235F16: - ldr r0, [r4, #0] - mov r1, #0 - bl ov63_0222BF90 - add r1, sp, #0 - strh r0, [r1, #4] - ldr r0, [r4, #0] - mov r1, #1 - bl ov63_0222BF90 - add r1, sp, #0 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - strh r0, [r1] - ldrh r0, [r1, #6] - strh r0, [r1, #2] - ldrh r0, [r4, #8] - bl sub_0201D15C - ldr r2, _02235F90 ; =0xFFF40000 - asr r1, r0, #0x1f - asr r3, r2, #0x14 - bl sub_020E1F1C - mov r5, #2 - mov r6, #0 - lsl r5, r5, #0xa - mov r3, #6 - add r2, sp, #0 - add r5, r0, r5 - adc r1, r6 - lsl r0, r1, #0x14 - lsr r1, r5, #0xc - orr r1, r0 - ldrsh r3, [r2, r3] - asr r0, r1, #0xc - add r0, r3, r0 - strh r0, [r2, #6] - mov r3, sp - ldrh r1, [r2, #4] - ldr r0, [r4, #4] - sub r3, r3, #4 - strh r1, [r3] - ldrh r1, [r2, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222CFE0 - add r1, sp, #0 - mov r3, sp - ldrh r2, [r1] - ldr r0, [r4, #4] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #2] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222D060 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02235F90: .word 0xFFF40000 - thumb_func_end ov65_02235EF8 - - thumb_func_start ov65_02235F94 -ov65_02235F94: ; 0x02235F94 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov63_0222BF90 - add r1, sp, #0 - strh r0, [r1, #4] - ldr r0, [r4, #0] - mov r1, #1 - bl ov63_0222BF90 - add r1, sp, #0 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - strh r0, [r1] - ldrh r0, [r1, #6] - strh r0, [r1, #2] - mov r0, #8 - ldrsh r0, [r4, r0] - sub r0, #0x10 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - cmp r0, #0 - ble _0223600A - mov r1, #6 - bl sub_020E1F6C - lsl r0, r1, #0x10 - asr r1, r0, #0x10 - mov r0, #0xb4 - mul r0, r1 - mov r1, #6 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - add r1, sp, #0 - mov r2, #6 - ldrsh r3, [r1, r2] - asr r2, r0, #0x1f - lsr r5, r0, #0x12 - lsl r2, r2, #0xe - lsl r6, r0, #0xe - mov r0, #2 - orr r2, r5 - mov r5, #0 - lsl r0, r0, #0xa - add r6, r6, r0 - adc r2, r5 - lsl r0, r2, #0x14 - lsr r2, r6, #0xc - orr r2, r0 - asr r0, r2, #0xc - sub r0, r3, r0 - strh r0, [r1, #6] -_0223600A: - add r1, sp, #0 - ldrh r2, [r1, #4] - mov r3, sp - ldr r0, [r4, #4] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222CFE0 - add r1, sp, #0 - mov r3, sp - ldrh r2, [r1] - ldr r0, [r4, #4] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #2] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222D060 - ldr r0, [r4, #4] - mov r1, #1 - bl ov63_0222D020 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02235F94 - - thumb_func_start ov65_02236044 -ov65_02236044: ; 0x02236044 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #0] - mov r1, #6 - bl ov63_0222BF90 - add r4, r0, #0 - ldr r0, [r6, #0] - mov r1, #4 - bl ov63_0222BF90 - add r7, r0, #0 - ldr r0, [r6, #0] - mov r1, #5 - bl ov63_0222BF90 - cmp r0, #0 - beq _0223606E - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0223606E: - ldr r0, _02236154 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _022360A8 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov65_022357A8 - str r0, [sp] - cmp r0, #0 - beq _022360A4 - bl ov65_02235E1C - cmp r0, #1 - bne _0223609E - ldr r0, [sp] - mov r1, #4 - ldr r0, [r0, #0] - bl ov63_0222BF90 - strb r0, [r6, #0xa] - b _022360A8 -_0223609E: - mov r0, #0 - strb r0, [r6, #0xa] - b _022360A8 -_022360A4: - mov r0, #0 - strb r0, [r6, #0xa] -_022360A8: - ldr r0, [r5, #0xc] - cmp r0, #1 - bne _022360B2 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022360B2: - ldr r0, _02236154 ; =0x021BF67C - mov r1, #2 - ldr r0, [r0, #0x44] - add r2, r0, #0 - tst r2, r1 - beq _022360C0 - mov r1, #3 -_022360C0: - mov r2, #0x40 - tst r2, r0 - beq _022360E4 - cmp r4, #0 - bne _022360D6 - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_022360D6: - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_022360E4: - mov r2, #0x80 - tst r2, r0 - beq _02236108 - cmp r4, #1 - bne _022360FA - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_022360FA: - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_02236108: - mov r2, #0x20 - tst r2, r0 - beq _0223612C - cmp r4, #2 - bne _0223611E - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_0223611E: - add r0, r5, #0 - mov r1, #1 - mov r2, #2 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_0223612C: - mov r2, #0x10 - tst r0, r2 - beq _0223614E - cmp r4, #3 - bne _02236142 - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov65_02236230 - b _0223614E -_02236142: - add r0, r5, #0 - mov r1, #1 - mov r2, #3 - add r3, r7, #0 - bl ov65_02236230 -_0223614E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02236154: .word 0x021BF67C - thumb_func_end ov65_02236044 - - thumb_func_start ov65_02236158 -ov65_02236158: ; 0x02236158 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #8 - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, #8] - ldrsh r0, [r4, r0] - cmp r0, #0 - bgt _022361A8 - ldr r0, [r4, #4] - bl ov63_0222CFC0 - ldr r0, [r4, #4] - mov r1, #1 - bl ov63_0222CFA4 - ldr r0, _022361AC ; =0x000006CC - mov r1, #4 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl ov63_0222BF90 - add r6, r0, #0 - ldr r0, [r4, #0] - mov r1, #4 - bl ov63_0222BF90 - cmp r0, r6 - bne _0223619E - add r0, r5, #0 - add r1, r4, #0 - bl ov65_02235E48 - b _022361A8 -_0223619E: - ldrb r2, [r4, #0xb] - add r0, r5, #0 - add r1, r4, #0 - bl ov65_0223628C -_022361A8: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022361AC: .word 0x000006CC - thumb_func_end ov65_02236158 - - thumb_func_start ov65_022361B0 -ov65_022361B0: ; 0x022361B0 - mov r0, #8 - ldrsh r2, [r1, r0] - add r2, r2, #1 - strh r2, [r1, #8] - ldrsh r0, [r1, r0] - cmp r0, #0x2d - ble _022361C2 - mov r0, #1 - bx lr -_022361C2: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov65_022361B0 - - thumb_func_start ov65_022361C8 -ov65_022361C8: ; 0x022361C8 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #8 - ldrsh r1, [r5, r0] - sub r1, r1, #1 - strh r1, [r5, #8] - ldrsh r0, [r5, r0] - cmp r0, #0 - bgt _0223620A - bl sub_0201D35C - ldr r1, _02236210 ; =0x000003FF - and r1, r0 - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - strh r0, [r5, #8] - bl sub_0201D35C - add r4, r0, #0 - mov r1, #3 - and r4, r1 - ldr r0, [r5, #0] - mov r1, #4 - bl ov63_0222BF90 - add r3, r0, #0 - add r0, r6, #0 - mov r1, #0 - add r2, r4, #0 - bl ov65_02236230 -_0223620A: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02236210: .word 0x000003FF - thumb_func_end ov65_022361C8 - - thumb_func_start ov65_02236214 -ov65_02236214: ; 0x02236214 - mov r0, #8 - ldrsh r2, [r1, r0] - sub r2, r2, #1 - strh r2, [r1, #8] - ldrsh r0, [r1, r0] - cmp r0, #0 - bge _02236226 - mov r0, #0x1c - strh r0, [r1, #8] -_02236226: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov65_02236214 - - thumb_func_start ov65_0223622C -ov65_0223622C: ; 0x0223622C - mov r0, #0 - bx lr - thumb_func_end ov65_0223622C - - thumb_func_start ov65_02236230 -ov65_02236230: ; 0x02236230 - push {r3, r4, lr} - sub sp, #4 - add r4, sp, #0 - strh r1, [r4] - strb r2, [r4, #2] - ldr r1, _0223624C ; =0x000006F8 - strb r3, [r4, #3] - ldr r0, [r0, r1] - add r1, sp, #0 - bl ov63_0222D894 - add sp, #4 - pop {r3, r4, pc} - nop -_0223624C: .word 0x000006F8 - thumb_func_end ov65_02236230 - - thumb_func_start ov65_02236250 -ov65_02236250: ; 0x02236250 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - ldr r0, [r4, #0] - mov r1, #6 - bl ov63_0222BF90 - add r7, r0, #0 - ldr r0, [r4, #0] - mov r1, #4 - bl ov63_0222BF90 - add r3, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov65_02236230 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_02236250 - - thumb_func_start ov65_02236278 -ov65_02236278: ; 0x02236278 - ldr r1, [r0, #0x18] - ldr r0, _02236288 ; =ov65_02235EF8 - cmp r1, r0 - beq _02236284 - mov r0, #1 - bx lr -_02236284: - mov r0, #0 - bx lr - ; .align 2, 0 -_02236288: .word ov65_02235EF8 - thumb_func_end ov65_02236278 - - thumb_func_start ov65_0223628C -ov65_0223628C: ; 0x0223628C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - beq _0223629A - cmp r4, #1 - beq _022362A0 - b _022362A6 -_0223629A: - bl ov65_02235E84 - b _022362AA -_022362A0: - bl ov65_02235EC8 - b _022362AA -_022362A6: - bl sub_02022974 -_022362AA: - strb r4, [r5, #0xb] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_0223628C - - thumb_func_start ov65_022362B0 -ov65_022362B0: ; 0x022362B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r3, r0, #0 - add r5, r4, #0 - mov r1, #0x14 - mov r0, #0 -_022362BC: - strb r0, [r5] - add r5, r5, #1 - sub r1, r1, #1 - bne _022362BC - ldr r3, [r3, #4] - add r0, r2, #0 - mov r1, #0x1f - add r2, r4, #4 - bl sub_020071EC - str r0, [r4, #0] - mov r0, #0xf - strb r0, [r4, #8] - mov r0, #0 - strb r0, [r4, #9] - ldrb r0, [r4, #9] - lsl r1, r0, #1 - ldr r0, _022362E8 ; =0x02238BC8 - ldrh r0, [r0, r1] - strh r0, [r4, #0xa] - pop {r3, r4, r5, pc} - nop -_022362E8: .word 0x02238BC8 - thumb_func_end ov65_022362B0 - - thumb_func_start ov65_022362EC -ov65_022362EC: ; 0x022362EC - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - mov r1, #0x14 - mov r0, #0 -_022362FA: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _022362FA - pop {r4, pc} - thumb_func_end ov65_022362EC - - thumb_func_start ov65_02236304 -ov65_02236304: ; 0x02236304 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov65_02236318 - add r0, r4, #0 - bl ov65_02236384 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02236304 - - thumb_func_start ov65_02236318 -ov65_02236318: ; 0x02236318 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0xa - ldrsh r1, [r5, r0] - sub r1, r1, #1 - strh r1, [r5, #0xa] - ldrsh r0, [r5, r0] - cmp r0, #0 - bgt _0223637E - ldrb r0, [r5, #9] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - strb r0, [r5, #9] - ldrb r0, [r5, #9] - lsl r1, r0, #1 - ldr r0, _02236380 ; =0x02238BC8 - ldrh r0, [r0, r1] - strh r0, [r5, #0xa] - ldrb r0, [r5, #9] - cmp r0, #1 - bne _02236350 - mov r6, #2 - b _02236352 -_02236350: - mov r6, #1 -_02236352: - mov r4, #0 - mov r7, #1 -_02236356: - add r0, r7, #0 - ldrb r1, [r5, #8] - lsl r0, r4 - tst r0, r1 - beq _02236378 - add r0, r5, #0 - add r1, r6, #0 - bl ov65_02236410 - add r1, r4, #1 - lsl r1, r1, #1 - add r2, r0, #0 - mov r0, #0xf - add r1, #0xe0 - mov r3, #2 - bl sub_0201DC68 -_02236378: - add r4, r4, #1 - cmp r4, #4 - blt _02236356 -_0223637E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02236380: .word 0x02238BC8 - thumb_func_end ov65_02236318 - - thumb_func_start ov65_02236384 -ov65_02236384: ; 0x02236384 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r3, [r4, #0xd] - mov r0, #0 - add r1, r0, #0 - lsl r5, r3, #2 - ldr r3, _02236400 ; =0x02238BD7 - add r2, r0, #0 - ldrb r3, [r3, r5] - cmp r3, #1 - bne _022363AC - mov r3, #0xe - ldrsh r5, [r4, r3] - sub r5, r5, #1 - strh r5, [r4, #0xe] - ldrsh r3, [r4, r3] - cmp r3, #0 - bgt _022363B6 - mov r2, #1 - b _022363B6 -_022363AC: - ldrb r3, [r4, #0x10] - cmp r3, #0 - beq _022363B6 - strb r0, [r4, #0x10] - mov r2, #1 -_022363B6: - cmp r2, #0 - beq _022363E2 - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xd] - cmp r0, #8 - blo _022363CE - add r0, r4, #0 - bl ov65_0223641C - pop {r3, r4, r5, pc} -_022363CE: - lsl r1, r0, #2 - ldr r0, _02236404 ; =0x02238BD8 - ldrb r0, [r0, r1] - ldr r1, _02236408 ; =0x02238BDA - strh r0, [r4, #0xe] - ldrb r0, [r4, #0xd] - lsl r2, r0, #2 - ldr r0, _0223640C ; =0x02238BD9 - ldrb r1, [r1, r2] - ldrb r0, [r0, r2] -_022363E2: - cmp r0, #0 - beq _022363FE - add r0, r4, #0 - bl ov65_02236410 - ldrb r1, [r4, #0xc] - add r2, r0, #0 - mov r0, #0xf - add r1, r1, #1 - lsl r1, r1, #1 - add r1, #0xe0 - mov r3, #2 - bl sub_0201DC68 -_022363FE: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02236400: .word 0x02238BD7 -_02236404: .word 0x02238BD8 -_02236408: .word 0x02238BDA -_0223640C: .word 0x02238BD9 - thumb_func_end ov65_02236384 - - thumb_func_start ov65_02236410 -ov65_02236410: ; 0x02236410 - ldr r0, [r0, #4] - ldr r2, [r0, #0xc] - add r0, r1, #1 - lsl r0, r0, #1 - add r0, r2, r0 - bx lr - thumb_func_end ov65_02236410 - - thumb_func_start ov65_0223641C -ov65_0223641C: ; 0x0223641C - ldrb r1, [r0, #0xc] - ldrb r3, [r0, #8] - mov r2, #1 - lsl r2, r1 - add r1, r3, #0 - orr r1, r2 - strb r1, [r0, #8] - mov r1, #0 - strb r1, [r0, #0xc] - strb r1, [r0, #0xd] - strh r1, [r0, #0xe] - strb r1, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov65_0223641C - - thumb_func_start ov65_02236438 -ov65_02236438: ; 0x02236438 - mov r1, #1 - strb r1, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov65_02236438 - - thumb_func_start ov65_02236440 -ov65_02236440: ; 0x02236440 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldrb r1, [r5, #0xd] - cmp r1, #0 - beq _02236450 - bl ov65_0223641C -_02236450: - mov r0, #1 - ldrb r1, [r5, #8] - lsl r0, r4 - eor r0, r1 - strb r0, [r5, #8] - add r0, r5, #0 - strb r4, [r5, #0xc] - bl ov65_02236438 - pop {r3, r4, r5, pc} - thumb_func_end ov65_02236440 - - thumb_func_start ov65_02236464 -ov65_02236464: ; 0x02236464 - push {r3, lr} - ldrb r1, [r0, #0xd] - cmp r1, #0 - beq _02236470 - bl ov65_02236438 -_02236470: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov65_02236464 - - thumb_func_start ov65_02236474 -ov65_02236474: ; 0x02236474 - lsl r1, r0, #2 - ldr r0, _0223647C ; =0x02238BF8 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_0223647C: .word 0x02238BF8 - thumb_func_end ov65_02236474 - - thumb_func_start ov65_02236480 -ov65_02236480: ; 0x02236480 - lsl r1, r0, #2 - ldr r0, _02236488 ; =0x02239E4C - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_02236488: .word 0x02239E4C - thumb_func_end ov65_02236480 - - thumb_func_start ov65_0223648C -ov65_0223648C: ; 0x0223648C - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02006840 - add r5, r0, #0 - ldr r0, _02236540 ; =0x0000003F - mov r1, #2 - bl sub_02006590 - bl sub_020389B8 - cmp r0, #1 - beq _022364AA - bl sub_02022974 -_022364AA: - mov r1, #0x60 - mov r0, #3 - lsl r2, r1, #0xa - bl sub_02017FC8 - mov r2, #0xa - mov r0, #3 - mov r1, #0x61 - lsl r2, r2, #0xc - bl sub_02017FC8 - mov r1, #0x8a - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #0x60 - bl sub_0200681C - mov r2, #0x8a - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #4 - bl sub_020C4CF4 - add r0, r4, #0 - add r0, #0x20 - mov r1, #1 - mov r2, #4 - bl sub_020C4CF4 - mov r0, #0x10 - mov r1, #0x60 - bl sub_0201DBEC - bl sub_020388E8 - add r1, r0, #0 - str r0, [r4, #0] - add r1, #0x22 - ldrb r1, [r1] - add r0, #0x21 - strb r1, [r0] - add r0, r4, #0 - bl ov65_02236794 - strb r0, [r4, #4] - mov r0, #0xff - strb r0, [r4, #6] - add r0, r4, #0 - bl sub_0209C390 - add r0, r4, #0 - bl ov65_0223760C - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0x60 - bl ov65_022367A8 - ldr r0, _02236544 ; =ov65_02236780 - add r1, r4, #0 - bl sub_02017798 - bl sub_02039734 - mov r0, #1 - add r4, #0x27 - strb r0, [r4] - pop {r3, r4, r5, pc} - nop -_02236540: .word 0x0000003F -_02236544: .word ov65_02236780 - thumb_func_end ov65_0223648C - - thumb_func_start ov65_02236548 -ov65_02236548: ; 0x02236548 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r6, #0 - bl sub_02006840 - add r7, r0, #0 - ldr r0, [r5, #0] - cmp r0, #4 - bls _02236566 - b _0223666E -_02236566: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02236572: ; jump table - .short _0223657C - _02236572 - 2 ; case 0 - .short _0223659A - _02236572 - 2 ; case 1 - .short _022365AA - _02236572 - 2 ; case 2 - .short _02236640 - _02236572 - 2 ; case 3 - .short _02236660 - _02236572 - 2 ; case 4 -_0223657C: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x60 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223666E -_0223659A: - bl sub_0200F2AC - cmp r0, #0 - beq _0223666E - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223666E -_022365AA: - add r0, r4, #0 - add r0, #0x27 - ldrb r0, [r0] - cmp r0, #0 - beq _022365BE - add r0, r4, #0 - add r1, r7, #0 - mov r2, #0x60 - bl ov65_02237370 -_022365BE: - ldrb r0, [r4, #4] - cmp r0, #0 - beq _022365F0 - bl sub_02032AAC - cmp r0, #1 - bne _022365DC - add r0, r4, #0 - bl ov65_02237970 - bl sub_02032CE8 - add r0, r4, #0 - bl ov65_0223782C -_022365DC: - ldrb r3, [r4, #5] - add r0, r4, #0 - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _02236684 ; =0x02239B80 - mov r2, #0x60 - ldr r3, [r3, r6] - blx r3 - add r6, r0, #0 - b _02236612 -_022365F0: - ldrb r3, [r4, #5] - add r0, r4, #0 - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _02236688 ; =0x02239B08 - mov r2, #0x60 - ldr r3, [r3, r6] - blx r3 - add r6, r0, #0 - bl sub_02032AAC - cmp r0, #1 - bne _02236612 - add r0, r4, #0 - mov r1, #0x60 - bl ov65_02237860 -_02236612: - add r0, r4, #0 - bl ov65_02237660 - cmp r0, #0 - beq _02236626 - add r0, r4, #0 - add r1, r7, #0 - mov r2, #0x60 - bl ov65_02237034 -_02236626: - add r0, r4, #0 - bl ov65_022377A4 - cmp r6, #1 - bne _0223666E - ldrb r0, [r4, #7] - strb r0, [r7, #3] - ldrb r0, [r4, #0x11] - strb r0, [r7, #4] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223666E -_02236640: - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x60 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223666E -_02236660: - bl sub_0200F2AC - cmp r0, #0 - beq _0223666E - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223666E: - add r0, r4, #0 - add r0, #0x30 - bl ov65_022372B0 - ldr r0, [r4, #0x48] - bl sub_020219F8 - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02236684: .word 0x02239B80 -_02236688: .word 0x02239B08 - thumb_func_end ov65_02236548 - - thumb_func_start ov65_0223668C -ov65_0223668C: ; 0x0223668C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - add r0, r4, #0 - bl ov65_0223761C - add r0, r4, #0 - bl ov65_022377E8 - add r0, r4, #0 - bl ov65_02237504 - add r0, r4, #0 - mov r1, #0x60 - bl ov65_022367F8 - bl sub_0201DC3C - add r0, r5, #0 - bl sub_02006830 - mov r0, #0x61 - bl sub_0201807C - mov r0, #0x60 - bl sub_0201807C - ldr r0, _022366E0 ; =0x0000003F - bl sub_02006514 - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_022366E0: .word 0x0000003F - thumb_func_end ov65_0223668C - - thumb_func_start ov65_022366E4 -ov65_022366E4: ; 0x022366E4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrb r0, [r5, #4] - add r4, r1, #0 - cmp r0, #0 - bne _02236742 - ldrh r6, [r4] - bl sub_0203608C - cmp r6, r0 - ldr r0, [r4, #4] - bne _0223671C - cmp r0, #0 - beq _02236710 - cmp r0, #1 - beq _0223670A - cmp r0, #2 - beq _02236716 - pop {r4, r5, r6, pc} -_0223670A: - mov r0, #1 - strb r0, [r5, #0x13] - pop {r4, r5, r6, pc} -_02236710: - mov r0, #2 - strb r0, [r5, #0x13] - pop {r4, r5, r6, pc} -_02236716: - mov r0, #3 - strb r0, [r5, #0x13] - pop {r4, r5, r6, pc} -_0223671C: - cmp r0, #0 - beq _02236734 - cmp r0, #1 - beq _0223672A - cmp r0, #2 - beq _02236734 - pop {r4, r5, r6, pc} -_0223672A: - add r0, r5, r6 - mov r1, #1 - add r0, #0x28 - strb r1, [r0] - pop {r4, r5, r6, pc} -_02236734: - bl sub_02032AAC - cmp r0, #1 - bne _02236742 - ldrh r0, [r4] - bl sub_02032D98 -_02236742: - pop {r4, r5, r6, pc} - thumb_func_end ov65_022366E4 - - thumb_func_start ov65_02236744 -ov65_02236744: ; 0x02236744 - push {r3, lr} - add r1, r0, #0 - add r1, #0x2c - ldrb r1, [r1] - cmp r1, #0 - bne _0223675C - mov r1, #1 - add r0, #0x2c - strb r1, [r0] - mov r0, #0xd - bl sub_020364F0 -_0223675C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov65_02236744 - - thumb_func_start ov65_02236760 -ov65_02236760: ; 0x02236760 - ldrb r2, [r0, #4] - cmp r2, #1 - beq _0223677C - ldrb r2, [r1] - add r3, r0, #0 - add r0, #0x20 - strb r2, [r0] - ldrb r0, [r1, #1] - add r3, #0x20 - strb r0, [r3, #1] - ldrb r0, [r1, #2] - strb r0, [r3, #2] - ldrb r0, [r1, #3] - strb r0, [r3, #3] -_0223677C: - bx lr - ; .align 2, 0 - thumb_func_end ov65_02236760 - - thumb_func_start ov65_02236780 -ov65_02236780: ; 0x02236780 - push {r3, lr} - ldr r0, [r0, #0x30] - bl sub_0201C2B8 - bl sub_0201DCAC - bl sub_0200A858 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov65_02236780 - - thumb_func_start ov65_02236794 -ov65_02236794: ; 0x02236794 - push {r3, lr} - bl sub_0203608C - cmp r0, #0 - bne _022367A2 - mov r0, #1 - pop {r3, pc} -_022367A2: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov65_02236794 - - thumb_func_start ov65_022367A8 -ov65_022367A8: ; 0x022367A8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov65_02236820 - add r0, r5, #0 - add r0, #0x30 - add r1, r6, #0 - bl ov65_02236840 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_02236A28 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_02236C10 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_02236C7C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_02237034 - add r5, #0x30 - add r0, r5, #0 - add r1, r6, #0 - bl ov65_02236D50 - pop {r4, r5, r6, pc} - thumb_func_end ov65_022367A8 - - thumb_func_start ov65_022367F8 -ov65_022367F8: ; 0x022367F8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x30 - add r4, r1, #0 - bl ov65_02236E04 - add r0, r5, #0 - add r0, #0x30 - bl ov65_02236C5C - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - bl ov65_02236B90 - add r5, #0x30 - add r0, r5, #0 - bl ov65_022369F0 - pop {r3, r4, r5, pc} - thumb_func_end ov65_022367F8 - - thumb_func_start ov65_02236820 -ov65_02236820: ; 0x02236820 - push {r4, lr} - sub sp, #0x28 - ldr r4, _0223683C ; =0x02239AB0 - add r3, sp, #0 - mov r2, #5 -_0223682A: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223682A - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_0223683C: .word 0x02239AB0 - thumb_func_end ov65_02236820 - - thumb_func_start ov65_02236840 -ov65_02236840: ; 0x02236840 - push {r3, r4, r5, r6, lr} - sub sp, #0x74 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02018340 - add r3, sp, #0x64 - ldr r6, _022369E0 ; =0x02239A3C - str r0, [r5, #0] - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r6, _022369E4 ; =0x02239A78 - add r3, sp, #0x48 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #0 - str r0, [r3, #0] - ldr r0, [r5, #0] - add r3, r1, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - add r3, r4, #0 - bl sub_02019690 - ldr r0, [r5, #0] - mov r1, #0 - bl sub_02019EBC - ldr r6, _022369E8 ; =0x02239A5C - add r3, sp, #0x2c - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r5, #0] - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02019EBC - ldr r6, _022369EC ; =0x02239A94 - add r3, sp, #0x10 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r5, #0] - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - ldr r0, [r5, #0] - mov r1, #2 - bl sub_02019EBC - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0x5c - add r1, r4, #0 - bl sub_02006C24 - mov r1, #0x20 - str r1, [sp] - mov r1, #0xd - mov r2, #0 - mov r3, #0xa0 - add r6, r0, #0 - str r4, [sp, #4] - bl sub_02007130 - mov r1, #0 - mov r0, #6 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r6, #0 - mov r1, #0xc - mov r3, #2 - bl sub_020070E8 - mov r3, #0x79 - lsl r3, r3, #2 - add r0, r6, #0 - mov r1, #0xe - mov r2, #0 - add r3, r5, r3 - str r4, [sp] - bl sub_020071D0 - mov r2, #0x1e - lsl r2, r2, #4 - str r0, [r5, r2] - add r2, #0x10 - add r0, r6, #0 - mov r1, #0x2c - add r2, r5, r2 - add r3, r4, #0 - bl sub_020071EC - mov r1, #0x7b - lsl r1, r1, #2 - str r0, [r5, r1] - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r6, #0 - mov r1, #0x2d - bl sub_020070E8 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r6, #0 - mov r1, #0x2e - bl sub_0200710C - add r0, r5, #0 - mov r1, #0 - bl ov65_022372EC - mov r0, #0x7d - mov r1, #3 - lsl r0, r0, #2 - strh r1, [r5, r0] - mov r1, #1 - add r0, r0, #2 - strh r1, [r5, r0] - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x74 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022369E0: .word 0x02239A3C -_022369E4: .word 0x02239A78 -_022369E8: .word 0x02239A5C -_022369EC: .word 0x02239A94 - thumb_func_end ov65_02236840 - - thumb_func_start ov65_022369F0 -ov65_022369F0: ; 0x022369F0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02019044 - ldr r0, [r4, #0] - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov65_022369F0 - - thumb_func_start ov65_02236A28 -ov65_02236A28: ; 0x02236A28 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0 - mov r1, #0x20 - add r4, r2, #0 - bl sub_02002E98 - ldr r0, [r6, #8] - bl sub_02025E44 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - str r4, [sp, #4] - mov r1, #1 - ldr r0, [r5, #0] - add r2, r1, #0 - mov r3, #2 - bl sub_0200DD0C - mov r0, #0 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0] - mov r1, #1 - mov r2, #0x1f - mov r3, #3 - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0] - mov r1, #2 - mov r2, #0x30 - mov r3, #4 - bl sub_0200DAA4 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r2, #1 - mov r1, #0x63 - lsl r1, r1, #2 - str r2, [sp, #0xc] - mov r0, #0x28 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, r5, r1 - mov r3, #2 - bl sub_0201A7E8 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x63 - lsl r0, r0, #2 - mov r1, #1 - add r0, r5, r0 - add r2, r1, #0 - mov r3, #2 - bl sub_0200E060 - mov r2, #1 - mov r1, #0x67 - lsl r1, r1, #2 - str r2, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - str r2, [sp, #0xc] - mov r0, #0x94 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, r5, r1 - add r3, r2, #0 - bl sub_0201A7E8 - mov r0, #0x67 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x67 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - mov r2, #0x1f - mov r3, #3 - bl sub_0200DC48 - mov r0, #0x10 - str r0, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r3, #2 - str r3, [sp, #8] - mov r2, #1 - str r2, [sp, #0xc] - mov r1, #0xca - str r1, [sp, #0x10] - add r1, #0xe2 - ldr r0, [r5, #0] - add r1, r5, r1 - bl sub_0201A7E8 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #5 - str r0, [sp] - mov r0, #0x14 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r2, #1 - mov r1, #0x6f - lsl r1, r1, #2 - str r2, [sp, #0xc] - add r0, #0xfa - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, r5, r1 - add r3, r2, #0 - bl sub_0201A7E8 - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - mov r2, #0x1f - mov r3, #3 - bl sub_0200DC48 - mov r1, #5 - str r1, [sp] - mov r0, #7 - str r0, [sp, #4] - str r1, [sp, #8] - mov r2, #1 - ldr r1, _02236B8C ; =0x000001A2 - str r2, [sp, #0xc] - str r1, [sp, #0x10] - add r1, #0x2a - ldr r0, [r5, #0] - add r1, r5, r1 - mov r3, #0x17 - bl sub_0201A7E8 - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0xf - bl sub_0201ADA4 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02236B8C: .word 0x000001A2 - thumb_func_end ov65_02236A28 - - thumb_func_start ov65_02236B90 -ov65_02236B90: ; 0x02236B90 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov65_02236F38 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_0200E084 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A8FC - mov r0, #0x67 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_0200DC9C - mov r0, #0x67 - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A8FC - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A8FC - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_0200DC9C - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A8FC - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_0200DC9C - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A8FC - mov r0, #0x77 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02236C0C - add r1, r4, #0 - bl sub_02002154 -_02236C0C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02236B90 - - thumb_func_start ov65_02236C10 -ov65_02236C10: ; 0x02236C10 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r1, #0 - bl sub_0200B358 - str r0, [r5, #4] - ldr r2, _02236C58 ; =0x000002A2 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - str r0, [r5, #8] - mov r0, #1 - lsl r0, r0, #8 - add r1, r6, #0 - bl sub_02023790 - str r0, [r5, #0xc] - mov r0, #1 - lsl r0, r0, #8 - add r1, r6, #0 - bl sub_02023790 - str r0, [r5, #0x10] - mov r0, #0xff - strb r0, [r5, #0x14] - ldr r0, [r4, #8] - bl sub_02025E44 - bl sub_02027AC0 - strh r0, [r5, #0x16] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02236C58: .word 0x000002A2 - thumb_func_end ov65_02236C10 - - thumb_func_start ov65_02236C5C -ov65_02236C5C: ; 0x02236C5C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl sub_020237BC - ldr r0, [r4, #0xc] - bl sub_020237BC - ldr r0, [r4, #8] - bl sub_0200B190 - ldr r0, [r4, #4] - bl sub_0200B3F0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02236C5C - - thumb_func_start ov65_02236C7C -ov65_02236C7C: ; 0x02236C7C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5] - cmp r0, #3 - bhi _02236CC0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02236C96: ; jump table - .short _02236CC0 - _02236C96 - 2 ; case 0 - .short _02236C9E - _02236C96 - 2 ; case 1 - .short _02236CAA - _02236C96 - 2 ; case 2 - .short _02236CB6 - _02236C96 - 2 ; case 3 -_02236C9E: - mov r1, #0 - ldr r0, [r4, #4] - add r2, r1, #0 - bl sub_0200C0B0 - b _02236CC0 -_02236CAA: - ldr r0, [r4, #4] - mov r1, #0 - mov r2, #1 - bl sub_0200C0B0 - b _02236CC0 -_02236CB6: - ldr r0, [r4, #4] - mov r1, #0 - mov r2, #2 - bl sub_0200C0B0 -_02236CC0: - ldrb r2, [r5] - ldr r1, _02236D44 ; =0x02239E5C - ldr r0, [r4, #8] - ldrb r1, [r1, r2] - ldr r2, [r4, #0x10] - bl sub_0200B1B8 - ldr r0, [r4, #4] - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x10] - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r2, #0xff - str r2, [sp, #4] - ldr r0, _02236D48 ; =0x0001020F - add r2, #0x9d - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r4, r2 - ldr r2, [r4, #0xc] - add r3, r1, #0 - bl sub_0201D78C - mov r0, #0x67 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A9A4 - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A9A4 - ldr r0, [r4, #8] - ldr r2, [r4, #0xc] - mov r1, #0x80 - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - mov r2, #0xff - str r2, [sp, #4] - ldr r0, _02236D4C ; =0x00010200 - add r2, #0xad - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r4, r2 - ldr r2, [r4, #0xc] - add r3, r1, #0 - bl sub_0201D78C - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A9A4 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02236D44: .word 0x02239E5C -_02236D48: .word 0x0001020F -_02236D4C: .word 0x00010200 - thumb_func_end ov65_02236C7C - - thumb_func_start ov65_02236D50 -ov65_02236D50: ; 0x02236D50 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r0, #0 - add r6, r1, #0 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7e - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x1f - str r3, [sp, #0xc] - add r2, r0, #0 - str r6, [sp, #0x10] - bl sub_0200A784 - ldr r4, _02236DFC ; =0x02239A4C - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - ldr r1, _02236E00 ; =0x00200010 - mov r2, #0x10 - str r6, [sp, #0x20] - bl sub_0201E88C - mov r0, #4 - add r1, r6, #0 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - ldr r1, _02236E00 ; =0x00200010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - add r1, r7, #0 - mov r0, #4 - add r1, #0x1c - add r2, r6, #0 - bl sub_020095C4 - str r0, [r7, #0x18] - mov r4, #0 - add r5, r7, #0 -_02236DBC: - mov r0, #4 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02009714 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r5, r1] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02236DBC - mov r0, #4 - add r1, r6, #0 - bl ov63_0222BE18 - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [r7, r1] - str r6, [sp] - ldr r0, [r7, #0x18] - mov r1, #0 - mov r2, #4 - mov r3, #1 - bl ov63_0222CCE4 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r7, r1] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02236DFC: .word 0x02239A4C -_02236E00: .word 0x00200010 - thumb_func_end ov65_02236D50 - - thumb_func_start ov65_02236E04 -ov65_02236E04: ; 0x02236E04 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov63_0222CD9C - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov63_0222BE58 - ldr r0, [r5, #0x18] - bl sub_02021964 - mov r6, #0x51 - mov r4, #0 - lsl r6, r6, #2 -_02236E28: - ldr r0, [r5, r6] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02236E28 - bl sub_0201E958 - bl sub_0201F8B4 - bl sub_0200A878 - pop {r4, r5, r6, pc} - thumb_func_end ov65_02236E04 - - thumb_func_start ov65_02236E44 -ov65_02236E44: ; 0x02236E44 - push {r3, lr} - str r3, [sp] - mov r3, #0 - bl ov65_02236E50 - pop {r3, pc} - thumb_func_end ov65_02236E44 - - thumb_func_start ov65_02236E50 -ov65_02236E50: ; 0x02236E50 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldrb r0, [r5, #0x14] - add r4, r1, #0 - add r6, r3, #0 - str r2, [sp, #0x10] - cmp r0, #0xff - beq _02236E74 - bl sub_0201D724 - cmp r0, #0 - beq _02236E74 - ldrb r0, [r5, #0x14] - bl sub_0201D730 - mov r0, #0xff - strb r0, [r5, #0x14] -_02236E74: - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #1 - ldr r1, [sp, #0x28] - lsl r0, r0, #8 - bl sub_02023790 - add r7, r0, #0 - ldr r0, [r5, #8] - ldr r1, [sp, #0x10] - add r2, r7, #0 - bl sub_0200B1B8 - ldr r0, [r5, #4] - ldr r1, [r5, #0xc] - add r2, r7, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - ldrh r0, [r5, #0x16] - mov r1, #1 - str r0, [sp, #4] - ldr r0, _02236EF4 ; =0x0001020F - str r0, [sp, #8] - str r3, [sp, #0xc] - mov r0, #0x63 - lsl r0, r0, #2 - ldr r2, [r5, #0xc] - add r0, r5, r0 - bl sub_0201D78C - strb r0, [r5, #0x14] - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [r4, #8] - bl sub_02025E44 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x28] - mov r1, #1 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r2, r1, #0 - mov r3, #2 - bl sub_0200DD0C - strb r6, [r5, #0x15] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02236EF4: .word 0x0001020F - thumb_func_end ov65_02236E50 - - thumb_func_start ov65_02236EF8 -ov65_02236EF8: ; 0x02236EF8 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #0x14] - cmp r0, #0xff - bne _02236F10 - ldrb r0, [r4, #0x15] - cmp r0, #0 - beq _02236F22 - sub r0, r0, #1 - strb r0, [r4, #0x15] - mov r0, #0 - pop {r4, pc} -_02236F10: - bl sub_0201D724 - cmp r0, #0 - bne _02236F22 - ldrb r0, [r4, #0x14] - cmp r0, #0xff - beq _02236F22 - mov r0, #0xff - strb r0, [r4, #0x14] -_02236F22: - ldrb r0, [r4, #0x14] - cmp r0, #0xff - bne _02236F32 - ldrb r0, [r4, #0x15] - cmp r0, #0 - bne _02236F32 - mov r0, #1 - pop {r4, pc} -_02236F32: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02236EF8 - - thumb_func_start ov65_02236F38 -ov65_02236F38: ; 0x02236F38 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #0x14] - cmp r0, #0xff - beq _02236F54 - bl sub_0201D724 - cmp r0, #0 - beq _02236F50 - ldrb r0, [r4, #0x14] - bl sub_0201D730 -_02236F50: - mov r0, #0xff - strb r0, [r4, #0x14] -_02236F54: - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A9A4 - mov r0, #0 - strb r0, [r4, #0x15] - pop {r4, pc} - thumb_func_end ov65_02236F38 - - thumb_func_start ov65_02236F70 -ov65_02236F70: ; 0x02236F70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #1 - add r4, r3, #0 - str r1, [sp, #0x10] - lsl r0, r0, #8 - add r1, r4, #0 - str r2, [sp, #0x14] - bl sub_02023790 - add r6, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - add r1, r4, #0 - bl sub_02023790 - add r7, r0, #0 - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - add r0, r5, #0 - mov r3, #0 - str r4, [sp] - bl ov65_0223726C - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - str r4, [sp] - add r0, r5, #0 - mov r3, #1 - bl ov65_02237284 - ldr r0, [r5, #8] - mov r1, #0x83 - add r2, r6, #0 - bl sub_0200B1B8 - ldr r0, [r5, #4] - add r1, r7, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0xf - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r2, #0xff - str r2, [sp, #4] - ldr r0, _02237014 ; =0x0001020F - add r2, #0xcd - str r0, [sp, #8] - add r0, r5, r2 - add r2, r7, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - mov r2, #0x1f - mov r3, #3 - bl sub_0200DC48 - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02237014: .word 0x0001020F - thumb_func_end ov65_02236F70 - - thumb_func_start ov65_02237018 -ov65_02237018: ; 0x02237018 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl sub_0200DC9C - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201AD10 - pop {r4, pc} - thumb_func_end ov65_02237018 - - thumb_func_start ov65_02237034 -ov65_02237034: ; 0x02237034 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp, #4] - add r7, r1, #0 - add r5, r2, #0 - bl sub_02032AAC - cmp r0, #0 - beq _02237096 - ldr r6, [sp, #4] - mov r4, #0 - add r6, #0x30 -_0223704C: - cmp r4, #0 - bne _0223706A - add r0, r4, #0 - bl sub_02032DE0 - cmp r0, #1 - bne _0223706A - ldr r0, [sp, #4] - add r1, r6, #0 - add r2, r7, #0 - add r3, r4, #0 - str r5, [sp] - bl ov65_0223709C - b _02237090 -_0223706A: - add r0, r4, #0 - bl sub_02032E00 - cmp r0, #1 - bne _02237084 - ldr r0, [sp, #4] - add r1, r6, #0 - add r2, r7, #0 - add r3, r4, #0 - str r5, [sp] - bl ov65_0223709C - b _02237090 -_02237084: - add r0, r6, #0 - add r1, r7, #0 - add r2, r4, #0 - add r3, r5, #0 - bl ov65_022371FC -_02237090: - add r4, r4, #1 - cmp r4, #4 - blt _0223704C -_02237096: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_02237034 - - thumb_func_start ov65_0223709C -ov65_0223709C: ; 0x0223709C - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - ldr r7, [sp, #0x40] - str r0, [sp, #0x1c] - mov r0, #1 - add r5, r1, #0 - lsl r0, r0, #8 - add r1, r7, #0 - str r2, [sp, #0x20] - add r4, r3, #0 - bl sub_02023790 - str r0, [sp, #0x28] - mov r0, #1 - lsl r0, r0, #8 - add r1, r7, #0 - bl sub_02023790 - str r0, [sp, #0x24] - ldr r1, [sp, #0x20] - str r7, [sp] - add r0, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov65_0223726C - ldr r0, [r5, #8] - ldr r2, [sp, #0x28] - mov r1, #0x81 - bl sub_0200B1B8 - ldr r0, [r5, #4] - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x28] - bl sub_0200C388 - mov r0, #0xa0 - str r0, [sp] - mov r0, #0x10 - lsl r6, r4, #4 - str r0, [sp, #4] - mov r0, #0x6f - lsl r0, r0, #2 - lsl r3, r6, #0x10 - add r0, r5, r0 - mov r1, #0xf - mov r2, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - mov r1, #0 - str r6, [sp] - mov r2, #0xff - str r2, [sp, #4] - ldr r0, _022371F8 ; =0x0001020F - add r2, #0xbd - str r0, [sp, #8] - add r0, r5, r2 - ldr r2, [sp, #0x24] - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r1, [sp, #0x20] - str r7, [sp] - add r0, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov65_02237284 - ldr r0, [r5, #8] - ldr r2, [sp, #0x28] - mov r1, #0x82 - bl sub_0200B1B8 - ldr r0, [r5, #4] - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x28] - bl sub_0200C388 - str r6, [sp] - mov r2, #0xff - str r2, [sp, #4] - ldr r0, _022371F8 ; =0x0001020F - add r2, #0xbd - str r0, [sp, #8] - add r0, r5, r2 - mov r1, #0 - ldr r2, [sp, #0x24] - mov r3, #0x48 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A9A4 - bl sub_0203608C - cmp r4, r0 - bne _0223717C - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #0 - beq _02237178 - mov r2, #2 - b _0223718E -_02237178: - mov r2, #1 - b _0223718E -_0223717C: - ldr r0, [sp, #0x1c] - add r0, r0, r4 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _0223718C - mov r2, #2 - b _0223718E -_0223718C: - mov r2, #1 -_0223718E: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - lsl r1, r4, #1 - add r4, r1, #5 - mov r1, #2 - str r1, [sp] - add r3, r0, #0 - lsl r2, r2, #0x19 - str r1, [sp, #4] - add r3, #0xc - str r3, [sp, #8] - lsr r2, r2, #0x18 - str r2, [sp, #0xc] - mov r2, #0 - str r2, [sp, #0x10] - ldrh r2, [r0] - lsl r3, r4, #0x18 - lsr r3, r3, #0x18 - lsl r2, r2, #0x15 - lsr r2, r2, #0x18 - str r2, [sp, #0x14] - ldrh r0, [r0, #2] - mov r2, #0x12 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] - ldr r0, [r5, #0] - bl sub_020198E8 - mov r1, #2 - str r1, [sp] - lsl r3, r4, #0x18 - str r1, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - ldr r0, [r5, #0] - mov r2, #0x12 - lsr r3, r3, #0x18 - bl sub_02019E2C - ldr r0, [r5, #0] - mov r1, #2 - bl sub_0201C3C0 - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x24] - bl sub_020237BC - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022371F8: .word 0x0001020F - thumb_func_end ov65_0223709C - - thumb_func_start ov65_022371FC -ov65_022371FC: ; 0x022371FC - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0xa0 - add r4, r2, #0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x6f - lsl r0, r0, #2 - lsl r3, r4, #0x14 - add r0, r5, r0 - mov r1, #0xf - mov r2, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - str r1, [sp] - add r2, r0, #0 - lsl r3, r4, #1 - add r3, r3, #5 - lsl r3, r3, #0x18 - str r1, [sp, #4] - add r2, #0xc - str r2, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - str r2, [sp, #0x10] - ldrh r2, [r0] - lsr r3, r3, #0x18 - lsl r2, r2, #0x15 - lsr r2, r2, #0x18 - str r2, [sp, #0x14] - ldrh r0, [r0, #2] - mov r2, #0x12 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] - ldr r0, [r5, #0] - bl sub_020198E8 - ldr r0, [r5, #0] - mov r1, #2 - bl sub_0201C3C0 - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r5, r0 - bl sub_0201A9A4 - add sp, #0x1c - pop {r4, r5, pc} - thumb_func_end ov65_022371FC - - thumb_func_start ov65_0223726C -ov65_0223726C: ; 0x0223726C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r2, #0 - add r4, r3, #0 - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, [r5, #4] - add r1, r4, #0 - bl sub_0200B498 - pop {r3, r4, r5, pc} - thumb_func_end ov65_0223726C - - thumb_func_start ov65_02237284 -ov65_02237284: ; 0x02237284 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r0, r2, #0 - add r4, r3, #0 - bl sub_02032EE8 - bl sub_02025F24 - add r2, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #4] - add r1, r4, #0 - mov r3, #5 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02237284 - - thumb_func_start ov65_022372B0 -ov65_022372B0: ; 0x022372B0 - push {r4, lr} - mov r1, #0x7d - add r4, r0, #0 - lsl r1, r1, #2 - ldrsh r2, [r4, r1] - cmp r2, #0 - bgt _022372E0 - add r1, r1, #2 - ldrsh r1, [r4, r1] - bl ov65_022372EC - mov r0, #0x7d - mov r1, #3 - lsl r0, r0, #2 - strh r1, [r4, r0] - add r0, r0, #2 - ldrsh r0, [r4, r0] - mov r1, #0x12 - add r0, r0, #1 - bl sub_020E1F6C - ldr r0, _022372E8 ; =0x000001F6 - strh r1, [r4, r0] - pop {r4, pc} -_022372E0: - sub r0, r2, #1 - strh r0, [r4, r1] - pop {r4, pc} - nop -_022372E8: .word 0x000001F6 - thumb_func_end ov65_022372B0 - - thumb_func_start ov65_022372EC -ov65_022372EC: ; 0x022372EC - push {r4, lr} - mov r2, #0x1f - add r3, r0, #0 - lsl r2, r2, #4 - ldr r2, [r3, r2] - add r4, r1, #0 - ldr r3, [r2, #0xc] - ldr r2, _02237318 ; =0x02239C04 - mov r0, #0xf - ldrb r2, [r2, r4] - mov r1, #0 - lsl r2, r2, #5 - add r2, r3, r2 - mov r3, #0x20 - bl sub_0201DC68 - cmp r0, #0 - bne _02237314 - bl sub_02022974 -_02237314: - pop {r4, pc} - nop -_02237318: .word 0x02239C04 - thumb_func_end ov65_022372EC - - thumb_func_start ov65_0223731C -ov65_0223731C: ; 0x0223731C - push {r4, lr} - add r4, r0, #0 - ldr r2, [r4, #0] - add r0, r2, #0 - add r0, #0x22 - ldrb r1, [r0] - mov r0, #1 - add r2, #0x22 - sub r0, r0, r1 - strb r0, [r2] - ldr r1, [r4, #0] - add r0, r1, #0 - add r0, #0x22 - ldrb r0, [r0] - add r1, #0x21 - strb r0, [r1] - ldr r0, [r4, #0] - add r0, #0x21 - ldrb r0, [r0] - bl ov4_021D2584 - ldr r0, [r4, #0] - mov r1, #0x24 - bl ov4_021D222C - ldr r0, [r4, #0] - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #1 - bne _02237360 - add r0, r4, #0 - bl ov65_02237520 - b _02237366 -_02237360: - add r0, r4, #0 - bl ov65_02237534 -_02237366: - ldr r0, [r4, #0] - add r0, #0x22 - ldrb r0, [r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_0223731C - - thumb_func_start ov65_02237370 -ov65_02237370: ; 0x02237370 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldrb r0, [r4, #4] - cmp r0, #0 - ldrb r0, [r4, #5] - beq _022373A4 - add r0, #0xe5 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #2 - bls _02237428 - bl sub_020380E4 - cmp r0, #2 - bgt _022373BA - add r0, r4, #0 - bl ov65_02237548 - cmp r0, #1 - bgt _022373BA - add r0, r4, #0 - bl ov65_02237450 - cmp r0, #0 - bne _022373BA - pop {r3, r4, r5, r6, r7, pc} -_022373A4: - cmp r0, #0xf - beq _02237428 - cmp r0, #0x10 - beq _02237428 - cmp r0, #0x11 - beq _02237428 - add r0, #0xfa - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bls _02237428 -_022373BA: - add r0, r4, #0 - bl ov65_02237A54 - add r6, r0, #0 - add r0, r4, #0 - bl ov65_02237628 - add r7, r0, #0 - add r0, r4, #0 - bl ov65_02237548 - add r5, r0, #0 - bl sub_02035E18 - cmp r5, r0 - ble _022373DE - mov r5, #1 - b _022373E0 -_022373DE: - mov r5, #0 -_022373E0: - bl sub_020380E4 - cmp r0, #3 - bge _02237418 - bl sub_020383E8 - cmp r0, #0 - bne _02237418 - bl sub_02038284 - cmp r0, #0 - bne _02237418 - mov r0, #0 - bl sub_02035D78 - cmp r0, #0 - beq _02237418 - add r0, r4, #0 - bl ov65_02237450 - cmp r0, #0 - beq _02237418 - cmp r5, #1 - beq _02237418 - cmp r6, #1 - beq _02237418 - cmp r7, #1 - bne _02237428 -_02237418: - ldrb r0, [r4, #4] - cmp r0, #0 - beq _02237424 - mov r0, #0x1b - strb r0, [r4, #5] - pop {r3, r4, r5, r6, r7, pc} -_02237424: - mov r0, #0xf - strb r0, [r4, #5] -_02237428: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_02237370 - - thumb_func_start ov65_0223742C -ov65_0223742C: ; 0x0223742C - push {r4, lr} - add r4, r0, #0 - bl sub_020380E4 - cmp r0, #3 - bgt _02237448 - bl sub_02038284 - cmp r0, #0 - bne _02237448 - bl sub_020383E8 - cmp r0, #0 - beq _0223744C -_02237448: - mov r0, #0xf - strb r0, [r4, #5] -_0223744C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_0223742C - - thumb_func_start ov65_02237450 -ov65_02237450: ; 0x02237450 - push {r3, lr} - bl sub_02035E18 - cmp r0, #0 - ble _0223745E - mov r0, #1 - pop {r3, pc} -_0223745E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov65_02237450 - - thumb_func_start ov65_02237464 -ov65_02237464: ; 0x02237464 - push {r3, r4, r5, lr} - add r4, r1, #0 - bl sub_020380A0 - add r5, r0, #0 - cmp r5, #1 - bne _02237494 - cmp r4, #3 - bhi _02237494 - add r0, r4, r4 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02237482: ; jump table - .short _0223748A - _02237482 - 2 ; case 0 - .short _02237490 - _02237482 - 2 ; case 1 - .short _02237490 - _02237482 - 2 ; case 2 - .short _02237490 - _02237482 - 2 ; case 3 -_0223748A: - bl sub_02038B00 - b _02237494 -_02237490: - bl sub_02038B20 -_02237494: - add r0, r5, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov65_02237464 - - thumb_func_start ov65_02237498 -ov65_02237498: ; 0x02237498 - ldrb r1, [r1] - cmp r1, #3 - bhi _022374D0 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022374AA: ; jump table - .short _022374B2 - _022374AA - 2 ; case 0 - .short _022374BA - _022374AA - 2 ; case 1 - .short _022374C2 - _022374AA - 2 ; case 2 - .short _022374CA - _022374AA - 2 ; case 3 -_022374B2: - ldr r1, [r0, #0] - mov r2, #0x12 - strb r2, [r1, #0x1b] - b _022374D0 -_022374BA: - ldr r1, [r0, #0] - mov r2, #0x16 - strb r2, [r1, #0x1b] - b _022374D0 -_022374C2: - ldr r1, [r0, #0] - mov r2, #0x18 - strb r2, [r1, #0x1b] - b _022374D0 -_022374CA: - ldr r1, [r0, #0] - mov r2, #0x1a - strb r2, [r1, #0x1b] -_022374D0: - ldr r3, _022374D8 ; =ov4_021D222C - ldr r0, [r0, #0] - mov r1, #0x24 - bx r3 - ; .align 2, 0 -_022374D8: .word ov4_021D222C - thumb_func_end ov65_02237498 - - thumb_func_start ov65_022374DC -ov65_022374DC: ; 0x022374DC - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #0x11] - cmp r1, #1 - bne _022374EA - mov r0, #0 - pop {r4, pc} -_022374EA: - bl ov65_02237450 - cmp r0, #1 - bne _022374FE - mov r0, #0x61 - bl ov4_021D1E74 - mov r0, #1 - strb r0, [r4, #0x11] - pop {r4, pc} -_022374FE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_022374DC - - thumb_func_start ov65_02237504 -ov65_02237504: ; 0x02237504 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #0x11] - cmp r0, #0 - bne _02237512 - mov r0, #0 - pop {r4, pc} -_02237512: - bl ov4_021D1F18 - mov r0, #0 - strb r0, [r4, #0x11] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237504 - - thumb_func_start ov65_02237520 -ov65_02237520: ; 0x02237520 - push {r3, lr} - bl ov65_022374DC - cmp r0, #0 - beq _02237532 - bl sub_020041FC - bl sub_02004A84 -_02237532: - pop {r3, pc} - thumb_func_end ov65_02237520 - - thumb_func_start ov65_02237534 -ov65_02237534: ; 0x02237534 - push {r3, lr} - bl ov65_02237504 - cmp r0, #0 - beq _02237546 - mov r0, #0 - mov r1, #0x78 - bl sub_02004A68 -_02237546: - pop {r3, pc} - thumb_func_end ov65_02237534 - - thumb_func_start ov65_02237548 -ov65_02237548: ; 0x02237548 - ldr r3, _0223754C ; =sub_02032E64 - bx r3 - ; .align 2, 0 -_0223754C: .word sub_02032E64 - thumb_func_end ov65_02237548 - - thumb_func_start ov65_02237550 -ov65_02237550: ; 0x02237550 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r7, #1 - bl sub_0203608C - sub r4, r0, #1 - bmi _02237586 -_02237560: - add r0, r4, #0 - bl sub_02032DC4 - cmp r0, #1 - bne _02237576 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022376A0 - b _02237582 -_02237576: - add r0, r4, #0 - bl sub_02032E00 - cmp r0, #0 - bne _02237582 - mov r7, #0 -_02237582: - sub r4, r4, #1 - bpl _02237560 -_02237586: - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_02237550 - - thumb_func_start ov65_0223758C -ov65_0223758C: ; 0x0223758C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r0, #0 - str r0, [sp, #4] - mov r5, #1 - mov r6, #0x16 - add r7, sp, #0 - add r4, sp, #0 -_0223759C: - add r0, r5, #0 - bl sub_02032DC4 - cmp r0, #1 - bne _022375C0 - add r0, r6, #0 - add r1, r7, #0 - mov r2, #8 - strh r5, [r4] - bl sub_020359DC - cmp r0, #1 - beq _022375BA - bl sub_02022974 -_022375BA: - add r0, r5, #0 - bl sub_02032D98 -_022375C0: - add r5, r5, #1 - cmp r5, #4 - blt _0223759C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_0223758C - - thumb_func_start ov65_022375CC -ov65_022375CC: ; 0x022375CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r0, #0 - str r0, [sp, #4] - mov r5, #1 - mov r6, #0x16 - add r7, sp, #0 - add r4, sp, #0 -_022375DC: - add r0, r5, #0 - bl sub_02032DE0 - cmp r0, #1 - bne _02237600 - add r0, r6, #0 - add r1, r7, #0 - mov r2, #8 - strh r5, [r4] - bl sub_020359DC - cmp r0, #1 - beq _022375FA - bl sub_02022974 -_022375FA: - add r0, r5, #0 - bl sub_02032D98 -_02237600: - add r5, r5, #1 - cmp r5, #4 - blt _022375DC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_022375CC - - thumb_func_start ov65_0223760C -ov65_0223760C: ; 0x0223760C - ldr r3, _02237614 ; =ov4_021D1120 - add r1, r0, #0 - ldr r0, _02237618 ; =ov65_02237654 - bx r3 - ; .align 2, 0 -_02237614: .word ov4_021D1120 -_02237618: .word ov65_02237654 - thumb_func_end ov65_0223760C - - thumb_func_start ov65_0223761C -ov65_0223761C: ; 0x0223761C - ldr r3, _02237624 ; =ov4_021D1120 - mov r0, #0 - add r1, r0, #0 - bx r3 - ; .align 2, 0 -_02237624: .word ov4_021D1120 - thumb_func_end ov65_0223761C - - thumb_func_start ov65_02237628 -ov65_02237628: ; 0x02237628 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0 - add r6, r0, #0 - add r4, r7, #0 -_02237630: - add r5, r6, r4 - ldrb r0, [r5, #0x14] - cmp r0, #1 - bne _0223764A - ldrb r0, [r5, #0x18] - bl sub_02032E00 - cmp r0, #1 - bne _02237644 - mov r7, #1 -_02237644: - mov r0, #0 - strb r0, [r5, #0x14] - strb r0, [r5, #0x18] -_0223764A: - add r4, r4, #1 - cmp r4, #4 - blt _02237630 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_02237628 - - thumb_func_start ov65_02237654 -ov65_02237654: ; 0x02237654 - mov r2, #1 - add r1, r1, r0 - strb r2, [r1, #0x14] - strb r0, [r1, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov65_02237654 - - thumb_func_start ov65_02237660 -ov65_02237660: ; 0x02237660 - push {r3, r4, r5, r6} - mov r4, #0 - add r3, r4, #0 - mov r2, #1 -_02237668: - add r6, r0, r3 - add r1, r6, #0 - add r1, #0x20 - ldrb r5, [r1] - ldrb r1, [r6, #0x1c] - cmp r1, r5 - beq _02237678 - add r4, r2, #0 -_02237678: - add r3, r3, #1 - strb r5, [r6, #0x1c] - cmp r3, #4 - blt _02237668 - add r1, r0, #0 - add r1, #0x24 - ldrb r1, [r1] - cmp r1, #0 - beq _02237692 - mov r1, #0 - add r0, #0x24 - strb r1, [r0] - mov r4, #1 -_02237692: - add r0, r4, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov65_02237660 - - thumb_func_start ov65_02237698 -ov65_02237698: ; 0x02237698 - mov r1, #1 - add r0, #0x24 - strb r1, [r0] - bx lr - thumb_func_end ov65_02237698 - - thumb_func_start ov65_022376A0 -ov65_022376A0: ; 0x022376A0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r6, r2, #0 - bl sub_02032E00 - cmp r0, #0 - bne _022376CE - add r0, r4, #0 - bl sub_02032E1C - add r0, r5, #0 - add r0, #0x25 - strb r4, [r0] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022376D0 - add r0, r5, #0 - bl ov65_02237698 -_022376CE: - pop {r4, r5, r6, pc} - thumb_func_end ov65_022376A0 - - thumb_func_start ov65_022376D0 -ov65_022376D0: ; 0x022376D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - add r5, r0, #0 - mov r0, #0xc - add r4, r6, #0 - mul r4, r0 - mov r0, #0x63 - lsl r0, r0, #2 - add r7, r5, r0 - ldr r0, [r7, r4] - str r2, [sp] - cmp r0, #0 - bne _0223779C - ldr r1, _022377A0 ; =0x02239AD8 - ldrh r2, [r1, r4] - add r0, r1, r4 - add r1, sp, #4 - strh r2, [r1] - ldrh r2, [r0, #2] - strh r2, [r1, #2] - ldrh r2, [r0, #4] - strh r2, [r1, #4] - ldrh r2, [r0, #6] - strh r2, [r1, #6] - ldrh r2, [r0, #8] - strh r2, [r1, #8] - ldrh r0, [r0, #0xa] - strh r0, [r1, #0xa] - bl sub_0203608C - cmp r6, r0 - beq _0223772C - add r0, r6, #0 - bl sub_02032EE8 - add r6, r0, #0 - bne _02237720 - bl sub_02022974 -_02237720: - add r0, r6, #0 - bl sub_02025F8C - add r1, sp, #4 - strh r0, [r1, #0xa] - b _02237740 -_0223772C: - ldr r0, [r5, #0] - ldrb r0, [r0, #0x1e] - cmp r0, #0 - add r0, sp, #4 - bne _0223773C - mov r1, #0 - strh r1, [r0, #0xa] - b _02237740 -_0223773C: - mov r1, #0x61 - strh r1, [r0, #0xa] -_02237740: - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, sp, #4 - bl ov63_0222BEC0 - str r0, [r7, r4] - mov r0, #0x62 - add r1, sp, #4 - lsl r0, r0, #2 - ldrh r1, [r1, #0xa] - ldr r0, [r5, r0] - bl ov63_0222CE18 - cmp r0, #0 - bne _02237772 - mov r0, #0x62 - add r1, sp, #4 - lsl r0, r0, #2 - ldrh r1, [r1, #0xa] - ldr r0, [r5, r0] - ldr r3, [sp] - mov r2, #2 - bl ov63_0222CDE8 -_02237772: - mov r0, #0x19 - lsl r0, r0, #4 - add r6, r5, r0 - sub r0, #8 - ldr r0, [r5, r0] - ldr r1, [r7, r4] - ldr r3, [sp] - mov r2, #0 - bl ov63_0222CE44 - str r0, [r6, r4] - ldr r0, [r6, r4] - mov r1, #0 - bl ov63_0222D008 - mov r0, #0x65 - lsl r0, r0, #2 - add r1, r5, r0 - ldrh r0, [r1, r4] - add r0, r0, #1 - strh r0, [r1, r4] -_0223779C: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022377A0: .word 0x02239AD8 - thumb_func_end ov65_022376D0 - - thumb_func_start ov65_022377A4 -ov65_022377A4: ; 0x022377A4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x63 - lsl r0, r0, #2 - mov r6, #0 - add r4, r7, r0 - add r5, r7, #0 -_022377B2: - mov r2, #0x65 - lsl r2, r2, #2 - ldrh r2, [r5, r2] - add r0, r7, #0 - add r1, r4, #0 - lsl r3, r2, #2 - ldr r2, _022377E4 ; =0x02239A2C - ldr r2, [r2, r3] - blx r2 - add r6, r6, #1 - add r4, #0xc - add r5, #0xc - cmp r6, #4 - blt _022377B2 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl ov63_0222BE84 - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl ov63_0222CEE4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022377E4: .word 0x02239A2C - thumb_func_end ov65_022377A4 - - thumb_func_start ov65_022377E8 -ov65_022377E8: ; 0x022377E8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov63_0222CE24 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - mov r2, #0x30 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_022377E8 - - thumb_func_start ov65_02237808 -ov65_02237808: ; 0x02237808 - push {r3, lr} - sub sp, #8 - add r0, sp, #0 - strh r1, [r0] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x16 - add r1, sp, #0 - mov r2, #8 - bl sub_020359DC - cmp r0, #1 - beq _02237826 - bl sub_02022974 -_02237826: - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov65_02237808 - - thumb_func_start ov65_0223782C -ov65_0223782C: ; 0x0223782C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_02237832: - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - add r0, r0, #1 - cmp r0, r4 - bge _02237856 - add r0, r4, #0 - bl sub_02032DC4 - cmp r0, #1 - bne _02237856 - add r0, r5, #0 - add r1, r4, #0 - bl ov65_02237808 - add r0, r4, #0 - bl sub_02032D98 -_02237856: - add r4, r4, #1 - cmp r4, #4 - blt _02237832 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_0223782C - - thumb_func_start ov65_02237860 -ov65_02237860: ; 0x02237860 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r1, #0 - add r7, r4, #0 -_0223786A: - add r0, r5, r4 - add r0, #0x28 - ldrb r0, [r0] - cmp r0, #1 - bne _02237892 - add r0, r4, #0 - bl sub_02032DE0 - cmp r0, #1 - bne _02237892 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022376A0 - add r0, r5, r4 - add r0, #0x28 - strb r7, [r0] - mov r0, #1 - strb r0, [r5, #0x12] -_02237892: - add r4, r4, #1 - cmp r4, #4 - blt _0223786A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov65_02237860 - - thumb_func_start ov65_0223789C -ov65_0223789C: ; 0x0223789C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022378AE - bl sub_02022974 -_022378AE: - mov r0, #0x6f - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl sub_0200E7FC - mov r1, #0x86 - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_0223789C - - thumb_func_start ov65_022378C4 -ov65_022378C4: ; 0x022378C4 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r4, r1, #0 - add r6, r2, #0 - cmp r0, #0 - beq _02237902 - bl sub_0200EBA0 - mov r0, #0x86 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r0, [r4, #8] - bl sub_02025E44 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - str r6, [sp, #4] - mov r1, #1 - ldr r0, [r5, #0x30] - add r2, r1, #0 - mov r3, #2 - bl sub_0200DD0C -_02237902: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_022378C4 - - thumb_func_start ov65_02237908 -ov65_02237908: ; 0x02237908 - bx lr - ; .align 2, 0 - thumb_func_end ov65_02237908 - - thumb_func_start ov65_0223790C -ov65_0223790C: ; 0x0223790C - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - mov r1, #0 - bl ov63_0222CFA4 - ldr r0, [r4, #4] - bl ov63_0222CFA8 - ldr r0, [r4, #4] - mov r1, #1 - bl ov63_0222D008 - mov r0, #2 - strh r0, [r4, #8] - ldr r0, [r4, #0] - mov r1, #6 - bl ov63_0222BF90 - ldr r1, _0223793C ; =0x02239A20 - ldrb r0, [r1, r0] - add r0, #0x10 - strh r0, [r4, #0xa] - pop {r4, pc} - ; .align 2, 0 -_0223793C: .word 0x02239A20 - thumb_func_end ov65_0223790C - - thumb_func_start ov65_02237940 -ov65_02237940: ; 0x02237940 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - bl ov63_0222CFB4 - mov r0, #0xa - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, #0xa] - ldrsh r0, [r4, r0] - cmp r0, #0 - bgt _0223796A - ldr r0, [r4, #4] - bl ov63_0222CFC0 - ldr r0, [r4, #4] - mov r1, #1 - bl ov63_0222CFA4 - mov r0, #3 - strh r0, [r4, #8] -_0223796A: - pop {r4, pc} - thumb_func_end ov65_02237940 - - thumb_func_start ov65_0223796C -ov65_0223796C: ; 0x0223796C - bx lr - ; .align 2, 0 - thumb_func_end ov65_0223796C - - thumb_func_start ov65_02237970 -ov65_02237970: ; 0x02237970 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - bl sub_02032AAC - cmp r0, #0 - beq _02237A0C - bl sub_02032E64 - add r7, r0, #0 - bl sub_02032D84 - cmp r0, #0 - beq _0223799E - mov r0, #5 - bl sub_02036254 - cmp r0, #0 - bne _0223799E - mov r0, #1 - str r0, [sp] -_0223799E: - mov r4, #0 - cmp r7, #0 - ble _022379E6 -_022379A4: - cmp r4, #0 - bne _022379B0 - ldr r0, [r5, #0] - add r0, #0x21 - ldrb r0, [r0] - b _022379CC -_022379B0: - add r0, r4, #0 - bl sub_02032F40 - add r6, r0, #0 - cmp r6, #0x20 - bne _022379C0 - bl sub_02022974 -_022379C0: - mov r0, #0x24 - ldr r1, [r5, #0] - mul r0, r6 - add r0, r1, r0 - add r0, #0x45 - ldrb r0, [r0] -_022379CC: - add r1, r5, r4 - add r1, #0x20 - ldrb r1, [r1] - cmp r0, r1 - beq _022379DA - mov r1, #1 - str r1, [sp] -_022379DA: - add r1, r5, r4 - add r1, #0x20 - add r4, r4, #1 - strb r0, [r1] - cmp r4, r7 - blt _022379A4 -_022379E6: - ldr r0, [sp] - cmp r0, #1 - bne _02237A0C - add r2, r5, #0 - add r5, #0x20 - ldrb r0, [r5] - add r1, sp, #4 - add r2, #0x20 - strb r0, [r1] - ldrb r0, [r2, #1] - strb r0, [r1, #1] - ldrb r0, [r2, #2] - strb r0, [r1, #2] - ldrb r0, [r2, #3] - mov r2, #4 - strb r0, [r1, #3] - mov r0, #0x18 - bl sub_020359DC -_02237A0C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_02237970 - - thumb_func_start ov65_02237A10 -ov65_02237A10: ; 0x02237A10 - push {r3, lr} - mov r0, #0xd - bl sub_02036540 - cmp r0, #0 - beq _02237A20 - mov r0, #1 - pop {r3, pc} -_02237A20: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov65_02237A10 - - thumb_func_start ov65_02237A24 -ov65_02237A24: ; 0x02237A24 - push {r3, r4, r5, lr} - ldr r0, [r0, #8] - add r5, r1, #0 - bl sub_0202B628 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x1d - bl sub_0202C244 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #4 - bl sub_0202B758 - pop {r3, r4, r5, pc} - thumb_func_end ov65_02237A24 - - thumb_func_start ov65_02237A44 -ov65_02237A44: ; 0x02237A44 - mov r1, #1 - strb r1, [r0, #0x10] - ldr r1, _02237A50 ; =0x00000708 - str r1, [r0, #0xc] - bx lr - nop -_02237A50: .word 0x00000708 - thumb_func_end ov65_02237A44 - - thumb_func_start ov65_02237A54 -ov65_02237A54: ; 0x02237A54 - ldrb r1, [r0, #0x10] - cmp r1, #0 - bne _02237A5E - mov r0, #0 - bx lr -_02237A5E: - ldr r1, [r0, #0xc] - cmp r1, #0 - ble _02237A6C - sub r1, r1, #1 - str r1, [r0, #0xc] - mov r0, #0 - bx lr -_02237A6C: - mov r0, #1 - bx lr - thumb_func_end ov65_02237A54 - - thumb_func_start ov65_02237A70 -ov65_02237A70: ; 0x02237A70 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - add r4, r2, #0 - add r1, #0x21 - ldrb r1, [r1] - cmp r1, #1 - bne _02237A84 - bl ov65_02237520 -_02237A84: - mov r0, #0 - bl ov4_021D26EC - mov r0, #0 - mov r1, #1 - bl sub_020388F4 - bl sub_0203608C - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov65_022376D0 - mov r0, #1 - strb r0, [r5, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov65_02237A70 - - thumb_func_start ov65_02237AA8 -ov65_02237AA8: ; 0x02237AA8 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x6b - bl ov65_02236E44 - mov r0, #2 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237AA8 - - thumb_func_start ov65_02237AC0 -ov65_02237AC0: ; 0x02237AC0 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r0, #0x30 - add r6, r1, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _02237AD8 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_02237AD8: - add r0, r5, #0 - bl ov65_02237450 - cmp r0, #1 - bne _02237B1E - bl sub_02032E44 - add r4, r0, #0 - cmp r4, #0xff - beq _02237B1E - ldrb r1, [r5, #6] - cmp r1, #0 - beq _02237B1E - bl sub_02032F40 - cmp r0, #0x20 - bne _02237B1C - add r0, sp, #0 - strh r4, [r0] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - bl sub_02032D98 - mov r0, #0x16 - add r1, sp, #0 - mov r2, #8 - bl sub_020359DC - cmp r0, #1 - beq _02237B1E - bl sub_02022974 - b _02237B1E -_02237B1C: - strb r4, [r5, #6] -_02237B1E: - ldr r0, _02237B94 ; =0x021BF67C - mov r1, #1 - ldr r0, [r0, #0x48] - tst r1, r0 - beq _02237B56 - ldr r0, _02237B98 ; =0x000005DD - bl sub_02005748 - add r0, r5, #0 - bl ov65_02237450 - cmp r0, #0 - bne _02237B3E - mov r0, #6 - strb r0, [r5, #5] - b _02237B8C -_02237B3E: - add r0, r5, #0 - bl ov65_02237548 - ldrb r1, [r6, #1] - cmp r1, r0 - bgt _02237B50 - mov r0, #8 - strb r0, [r5, #5] - b _02237B8C -_02237B50: - mov r0, #6 - strb r0, [r5, #5] - b _02237B8C -_02237B56: - mov r1, #2 - add r2, r0, #0 - tst r2, r1 - beq _02237B6A - ldr r0, _02237B98 ; =0x000005DD - bl sub_02005748 - mov r0, #0x16 - strb r0, [r5, #5] - b _02237B8C -_02237B6A: - ldrb r2, [r5, #6] - cmp r2, #0xff - beq _02237B7C - ldr r0, _02237B98 ; =0x000005DD - bl sub_02005748 - mov r0, #3 - strb r0, [r5, #5] - b _02237B8C -_02237B7C: - lsl r1, r1, #9 - tst r0, r1 - beq _02237B8C - mov r0, #0x1e - strb r0, [r5, #5] - ldr r0, _02237B98 ; =0x000005DD - bl sub_02005748 -_02237B8C: - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_02237B94: .word 0x021BF67C -_02237B98: .word 0x000005DD - thumb_func_end ov65_02237AC0 - - thumb_func_start ov65_02237B9C -ov65_02237B9C: ; 0x02237B9C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r2, #0 - ldrb r2, [r5, #6] - add r0, #0x30 - add r3, r6, #0 - add r4, r1, #0 - bl ov65_02236F70 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - mov r2, #0x6c - add r3, r6, #0 - bl ov65_02236E44 - mov r0, #4 - strb r0, [r5, #5] - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov65_02237B9C - - thumb_func_start ov65_02237BC4 -ov65_02237BC4: ; 0x02237BC4 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0x30 - add r5, r2, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _02237BD8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02237BD8: - str r5, [sp] - ldr r0, [r4, #0x30] - ldr r1, _02237BF4 ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002100 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #5 - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02237BF4: .word 0x02239A24 - thumb_func_end ov65_02237BC4 - - thumb_func_start ov65_02237BF8 -ov65_02237BF8: ; 0x02237BF8 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - add r6, r2, #0 - add r4, r1, #0 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02237C90 - ldrb r2, [r5, #6] - add r1, sp, #0 - cmp r0, #0 - strh r2, [r1] - bne _02237C5C - mov r0, #1 - str r0, [sp, #4] - ldrb r1, [r5, #6] - add r0, r5, #0 - add r2, r6, #0 - bl ov65_022376A0 - ldr r0, [r5, #0] - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #1 - bne _02237C44 - add r0, r5, #0 - bl ov65_02237504 - add r0, r5, #0 - bl ov65_02237520 -_02237C44: - add r0, r5, #0 - bl ov65_02237548 - ldrb r1, [r4, #2] - cmp r1, r0 - bgt _02237C56 - mov r0, #8 - strb r0, [r5, #5] - b _02237C6A -_02237C56: - mov r0, #1 - strb r0, [r5, #5] - b _02237C6A -_02237C5C: - mov r0, #0 - str r0, [sp, #4] - ldrb r0, [r5, #6] - bl sub_02032D98 - mov r0, #1 - strb r0, [r5, #5] -_02237C6A: - mov r0, #0x16 - add r1, sp, #0 - mov r2, #8 - bl sub_020359DC - cmp r0, #1 - beq _02237C7C - bl sub_02022974 -_02237C7C: - mov r0, #0xff - strb r0, [r5, #6] - add r0, r5, #0 - add r0, #0x30 - bl ov65_02237018 - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_02237C90: - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02237BF8 - - thumb_func_start ov65_02237C98 -ov65_02237C98: ; 0x02237C98 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x77 - bl ov65_02236E44 - mov r0, #7 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237C98 - - thumb_func_start ov65_02237CB0 -ov65_02237CB0: ; 0x02237CB0 - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _02237CC2 - mov r0, #0 - pop {r4, pc} -_02237CC2: - mov r0, #0x13 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237CB0 - - thumb_func_start ov65_02237CCC -ov65_02237CCC: ; 0x02237CCC - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x6f - bl ov65_02236E44 - mov r0, #9 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237CCC - - thumb_func_start ov65_02237CE4 -ov65_02237CE4: ; 0x02237CE4 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0x30 - add r5, r2, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _02237CF8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02237CF8: - str r5, [sp] - ldr r0, [r4, #0x30] - ldr r1, _02237D14 ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002100 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xa - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02237D14: .word 0x02239A24 - thumb_func_end ov65_02237CE4 - - thumb_func_start ov65_02237D18 -ov65_02237D18: ; 0x02237D18 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - add r1, r2, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02237D5A - cmp r0, #0 - bne _02237D3C - mov r0, #0xb - strb r0, [r5, #5] - b _02237D52 -_02237D3C: - add r0, r5, #0 - bl ov65_02237548 - ldrb r1, [r4, #2] - cmp r1, r0 - bgt _02237D4E - mov r0, #0x13 - strb r0, [r5, #5] - b _02237D52 -_02237D4E: - mov r0, #1 - strb r0, [r5, #5] -_02237D52: - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_02237D5A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02237D18 - - thumb_func_start ov65_02237D60 -ov65_02237D60: ; 0x02237D60 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0x1e - add r6, r2, #0 - str r1, [r5, #8] - bl ov65_0223758C - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - mov r2, #0x66 - add r3, r6, #0 - bl ov65_02236E44 - add r0, r5, #0 - bl ov65_0223789C - add r0, r5, #0 - bl ov65_02237A44 - mov r0, #0xc - strb r0, [r5, #5] - bl ov4_021D25FC - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02237D60 - - thumb_func_start ov65_02237D98 -ov65_02237D98: ; 0x02237D98 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02035E18 - add r5, r0, #0 - bl sub_02032E64 - cmp r5, r0 - beq _02237DB4 - add r0, r4, #0 - bl ov65_0223758C - mov r0, #0 - pop {r3, r4, r5, pc} -_02237DB4: - bl ov4_021D25C0 - cmp r0, #0 - bne _02237DC0 - mov r0, #0 - pop {r3, r4, r5, pc} -_02237DC0: - mov r0, #1 - bl ov4_021D26EC - mov r0, #0xd - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02237D98 - - thumb_func_start ov65_02237DD0 -ov65_02237DD0: ; 0x02237DD0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - bne _02237DEE - mov r1, #0 - mov r0, #0x17 - add r2, r1, #0 - bl sub_020359DC - cmp r0, #0 - beq _02237DF2 - mov r0, #0xe - strb r0, [r4, #5] - b _02237DF2 -_02237DEE: - sub r0, r0, #1 - str r0, [r4, #8] -_02237DF2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237DD0 - - thumb_func_start ov65_02237DF8 -ov65_02237DF8: ; 0x02237DF8 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0xd - add r5, r1, #0 - bl sub_02036540 - cmp r0, #0 - beq _02237E1E - add r0, r4, #0 - add r1, r5, #0 - bl ov65_02237498 - bl sub_020365F4 - mov r0, #0xe - bl sub_020364F0 - mov r0, #0xf - strb r0, [r4, #5] -_02237E1E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02237DF8 - - thumb_func_start ov65_02237E24 -ov65_02237E24: ; 0x02237E24 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0xe - bl sub_02036540 - cmp r0, #0 - beq _02237E4E - ldr r0, [r4, #0] - ldrb r1, [r0, #0x1b] - add r0, sp, #0 - strh r1, [r0] - bl sub_0203608C - add r1, sp, #0 - bl sub_02036614 - cmp r0, #1 - bne _02237E4E - mov r0, #0x10 - strb r0, [r4, #5] -_02237E4E: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov65_02237E24 - - thumb_func_start ov65_02237E54 -ov65_02237E54: ; 0x02237E54 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl ov65_02237548 - add r7, r0, #0 - bl sub_0203608C - mov r5, #0 - add r4, r5, #0 - str r0, [sp] - cmp r7, #0 - ble _02237E98 -_02237E6C: - ldr r0, [sp] - cmp r0, r4 - beq _02237E90 - add r0, r4, #0 - bl sub_0203664C - cmp r0, #0 - beq _02237E92 - ldrh r1, [r0] - ldr r0, [r6, #0] - ldrb r0, [r0, #0x1b] - cmp r1, r0 - bne _02237E8A - add r5, r5, #1 - b _02237E92 -_02237E8A: - mov r0, #0x1b - strb r0, [r6, #5] - b _02237E92 -_02237E90: - add r5, r5, #1 -_02237E92: - add r4, r4, #1 - cmp r4, r7 - blt _02237E6C -_02237E98: - cmp r5, r7 - bne _02237EA0 - mov r0, #0x11 - strb r0, [r6, #5] -_02237EA0: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_02237E54 - - thumb_func_start ov65_02237EA4 -ov65_02237EA4: ; 0x02237EA4 - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - add r1, r0, #0 - bl sub_020388F4 - mov r0, #0x12 - bl sub_020364F0 - mov r0, #0x12 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237EA4 - - thumb_func_start ov65_02237EC0 -ov65_02237EC0: ; 0x02237EC0 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x12 - add r4, r1, #0 - add r6, r2, #0 - bl sub_02036540 - cmp r0, #0 - beq _02237EEC - mov r0, #1 - strb r0, [r5, #7] - add r0, r4, #0 - add r1, r6, #0 - bl ov65_02237A24 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022378C4 - mov r0, #1 - pop {r4, r5, r6, pc} -_02237EEC: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov65_02237EC0 - - thumb_func_start ov65_02237EF0 -ov65_02237EF0: ; 0x02237EF0 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x78 - bl ov65_02236E44 - mov r0, #0x14 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237EF0 - - thumb_func_start ov65_02237F08 -ov65_02237F08: ; 0x02237F08 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r0, #0x30 - add r4, r2, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _02237F20 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02237F20: - mov r0, #1 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0x30] - ldr r1, _02237F44 ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002054 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x15 - strb r0, [r5, #5] - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02237F44: .word 0x02239A24 - thumb_func_end ov65_02237F08 - - thumb_func_start ov65_02237F48 -ov65_02237F48: ; 0x02237F48 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - add r1, r2, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02237F9A - cmp r0, #0 - bne _02237F6C - mov r0, #0x16 - strb r0, [r5, #5] - b _02237F92 -_02237F6C: - add r0, r5, #0 - bl ov65_02237450 - cmp r0, #0 - beq _02237F8E - add r0, r5, #0 - bl ov65_02237548 - ldrb r1, [r4, #2] - cmp r1, r0 - bgt _02237F88 - mov r0, #8 - strb r0, [r5, #5] - b _02237F92 -_02237F88: - mov r0, #1 - strb r0, [r5, #5] - b _02237F92 -_02237F8E: - mov r0, #1 - strb r0, [r5, #5] -_02237F92: - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_02237F9A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02237F48 - - thumb_func_start ov65_02237FA0 -ov65_02237FA0: ; 0x02237FA0 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x79 - bl ov65_02236E44 - mov r0, #0x17 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02237FA0 - - thumb_func_start ov65_02237FB8 -ov65_02237FB8: ; 0x02237FB8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r0, #0x30 - add r4, r2, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _02237FD0 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02237FD0: - mov r0, #1 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0x30] - ldr r1, _02237FF4 ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002054 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x18 - strb r0, [r5, #5] - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02237FF4: .word 0x02239A24 - thumb_func_end ov65_02237FB8 - - thumb_func_start ov65_02237FF8 -ov65_02237FF8: ; 0x02237FF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - add r1, r2, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0223804A - cmp r0, #0 - bne _0223801C - mov r0, #0x19 - strb r0, [r5, #5] - b _02238042 -_0223801C: - add r0, r5, #0 - bl ov65_02237450 - cmp r0, #0 - beq _0223803E - add r0, r5, #0 - bl ov65_02237548 - ldrb r1, [r4, #2] - cmp r1, r0 - bgt _02238038 - mov r0, #8 - strb r0, [r5, #5] - b _02238042 -_02238038: - mov r0, #1 - strb r0, [r5, #5] - b _02238042 -_0223803E: - mov r0, #1 - strb r0, [r5, #5] -_02238042: - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_0223804A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02237FF8 - - thumb_func_start ov65_02238050 -ov65_02238050: ; 0x02238050 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x7a - bl ov65_02236E44 - mov r0, #0x1e - str r0, [r4, #8] - mov r0, #0x1a - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02238050 - - thumb_func_start ov65_0223806C -ov65_0223806C: ; 0x0223806C - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _0223807E - mov r0, #0 - pop {r4, pc} -_0223807E: - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0 - ble _0223808C - mov r0, #0 - pop {r4, pc} -_0223808C: - mov r0, #0 - strb r0, [r4, #7] - bl sub_02038378 - add r0, r4, #0 - bl ov65_022375CC - bl sub_02038B60 - mov r0, #0 - mov r1, #1 - bl sub_020388F4 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_0223806C - - thumb_func_start ov65_022380AC -ov65_022380AC: ; 0x022380AC - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r6, r1, #0 - add r4, r2, #0 - cmp r0, #0 - beq _022380CC - add r1, r4, #0 - bl sub_02002154 - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_022380CC: - add r0, r5, #0 - add r0, #0x30 - bl ov65_02237018 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov65_022378C4 - mov r0, #0x1c - strb r0, [r5, #5] - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_022380AC - - thumb_func_start ov65_022380E8 -ov65_022380E8: ; 0x022380E8 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x76 - bl ov65_02236E44 - mov r0, #0x1d - strb r0, [r4, #5] - add r0, r4, #0 - bl ov65_022375CC - mov r0, #0 - pop {r4, pc} - thumb_func_end ov65_022380E8 - - thumb_func_start ov65_02238104 -ov65_02238104: ; 0x02238104 - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _02238116 - mov r0, #0 - pop {r4, pc} -_02238116: - bl sub_02038378 - bl sub_02038B60 - add r0, r4, #0 - bl ov65_022375CC - mov r0, #0 - mov r1, #1 - strb r0, [r4, #7] - bl sub_020388F4 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02238104 - - thumb_func_start ov65_02238134 -ov65_02238134: ; 0x02238134 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - add r3, r2, #0 - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #1 - bne _02238148 - mov r2, #0x7d - b _0223814A -_02238148: - mov r2, #0x7c -_0223814A: - add r0, r4, #0 - add r0, #0x30 - bl ov65_02236E44 - mov r0, #0x1f - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02238134 - - thumb_func_start ov65_0223815C -ov65_0223815C: ; 0x0223815C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0x30 - add r5, r2, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _02238170 - mov r0, #0 - pop {r3, r4, r5, pc} -_02238170: - str r5, [sp] - ldr r0, [r4, #0x30] - ldr r1, _0223818C ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002100 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x20 - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223818C: .word 0x02239A24 - thumb_func_end ov65_0223815C - - thumb_func_start ov65_02238190 -ov65_02238190: ; 0x02238190 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - add r4, r2, #0 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _022381C8 - cmp r0, #0 - bne _022381BC - add r0, r5, #0 - add r1, r4, #0 - bl ov65_0223731C - add r0, r5, #0 - bl ov65_02237698 -_022381BC: - mov r0, #1 - strb r0, [r5, #5] - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_022381C8: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov65_02238190 - - thumb_func_start ov65_022381CC -ov65_022381CC: ; 0x022381CC - push {r4, lr} - add r4, r0, #0 - bl sub_02032AC0 - mov r0, #0 - mov r1, #1 - bl sub_020388F4 - mov r0, #1 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov65_022381CC - - thumb_func_start ov65_022381E4 -ov65_022381E4: ; 0x022381E4 - push {r4, lr} - add r1, r2, #0 - add r4, r0, #0 - bl ov65_02237550 - mov r0, #0 - bl sub_02035D78 - cmp r0, #0 - bne _022381FE - mov r0, #0xf - strb r0, [r4, #5] - b _0223820C -_022381FE: - mov r0, #0 - bl sub_02032E00 - cmp r0, #0 - beq _0223820C - mov r0, #2 - strb r0, [r4, #5] -_0223820C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov65_022381E4 - - thumb_func_start ov65_02238210 -ov65_02238210: ; 0x02238210 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r6, #0 - bl ov65_02237550 - add r0, r5, #0 - mov r2, #0 - add r0, #0x30 - add r1, r4, #0 - add r3, r2, #0 - str r6, [sp] - bl ov65_0223726C - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - mov r2, #0x72 - add r3, r6, #0 - bl ov65_02236E44 - add r0, r5, #0 - bl ov65_0223789C - mov r0, #3 - strb r0, [r5, #5] - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02238210 - - thumb_func_start ov65_02238250 -ov65_02238250: ; 0x02238250 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r6, #0 - bl ov65_02237550 - add r0, r5, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _0223826E - mov r0, #0 - pop {r4, r5, r6, pc} -_0223826E: - ldrb r0, [r5, #0x13] - cmp r0, #0 - beq _022382AA - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022378C4 - ldrb r0, [r5, #0x13] - cmp r0, #1 - beq _0223828E - cmp r0, #2 - beq _02238294 - cmp r0, #3 - beq _022382A0 - b _022382AA -_0223828E: - mov r0, #4 - strb r0, [r5, #5] - b _022382AA -_02238294: - mov r0, #6 - strb r0, [r5, #5] - mov r0, #0x74 - add r5, #0x2d - strb r0, [r5] - b _022382AA -_022382A0: - mov r0, #6 - strb r0, [r5, #5] - mov r0, #0x84 - add r5, #0x2d - strb r0, [r5] -_022382AA: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02238250 - - thumb_func_start ov65_022382B0 -ov65_022382B0: ; 0x022382B0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r2, #0 - mov r2, #0 - add r5, r0, #0 - add r0, #0x30 - add r3, r2, #0 - add r6, r1, #0 - str r4, [sp] - bl ov65_0223726C - add r0, r5, #0 - add r0, #0x30 - add r1, r6, #0 - mov r2, #0x73 - mov r3, #0x1e - str r4, [sp] - bl ov65_02236E50 - mov r0, #5 - strb r0, [r5, #5] - bl sub_0203608C - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0x60 - bl ov65_022376A0 - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_022382B0 - - thumb_func_start ov65_022382F0 -ov65_022382F0: ; 0x022382F0 - push {r4, lr} - add r4, r0, #0 - add r1, r2, #0 - bl ov65_02237550 - add r0, r4, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _0223830A - mov r0, #0 - pop {r4, pc} -_0223830A: - mov r0, #8 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_022382F0 - - thumb_func_start ov65_02238314 -ov65_02238314: ; 0x02238314 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - mov r2, #0 - add r5, r0, #0 - add r0, #0x30 - add r3, r2, #0 - add r4, r1, #0 - str r6, [sp] - bl ov65_0223726C - add r2, r5, #0 - add r2, #0x2d - add r0, r5, #0 - ldrb r2, [r2] - add r0, #0x30 - add r1, r4, #0 - add r3, r6, #0 - bl ov65_02236E44 - mov r0, #7 - strb r0, [r5, #5] - bl sub_02038378 - bl sub_02038B60 - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02238314 - - thumb_func_start ov65_02238350 -ov65_02238350: ; 0x02238350 - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _02238362 - mov r0, #0 - pop {r4, pc} -_02238362: - mov r0, #0 - mov r1, #1 - strb r0, [r4, #7] - bl sub_020388F4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov65_02238350 - - thumb_func_start ov65_02238370 -ov65_02238370: ; 0x02238370 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r6, #0 - bl ov65_02237550 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - mov r2, #0x7b - add r3, r6, #0 - bl ov65_02236E44 - add r0, r5, #0 - bl ov65_0223789C - mov r0, #9 - strb r0, [r5, #5] - ldr r0, [r5, #0] - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #1 - bne _022383A6 - add r0, r5, #0 - bl ov65_02237520 -_022383A6: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02238370 - - thumb_func_start ov65_022383AC -ov65_022383AC: ; 0x022383AC - push {r4, lr} - add r4, r0, #0 - add r1, r2, #0 - bl ov65_02237550 - add r0, r4, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _022383C6 - mov r0, #0 - pop {r4, pc} -_022383C6: - mov r0, #0xa - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_022383AC - - thumb_func_start ov65_022383D0 -ov65_022383D0: ; 0x022383D0 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r6, #0 - bl ov65_02237550 - ldrb r0, [r5, #0x12] - cmp r0, #0 - beq _02238404 - mov r0, #0 - strb r0, [r5, #0x12] - ldr r0, [r5, #0] - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #1 - bne _022383FE - add r0, r5, #0 - bl ov65_02237504 - add r0, r5, #0 - bl ov65_02237520 -_022383FE: - add r0, r5, #0 - bl ov65_02237698 -_02238404: - add r0, r5, #0 - bl ov65_02237A10 - cmp r0, #1 - bne _02238448 - bl sub_020365F4 - mov r0, #0xe - bl sub_020364F0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022378C4 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - mov r2, #0x66 - add r3, r6, #0 - bl ov65_02236E44 - add r0, r5, #0 - bl ov65_02237A44 - mov r0, #0x4b - lsl r0, r0, #2 - str r0, [r5, #8] - add r0, r5, #0 - bl ov65_0223789C - mov r0, #0xb - strb r0, [r5, #5] - b _02238462 -_02238448: - ldr r0, _02238468 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - lsl r0, r0, #0xa - tst r0, r1 - beq _02238462 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022378C4 - mov r0, #0x12 - strb r0, [r5, #5] -_02238462: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02238468: .word 0x021BF67C - thumb_func_end ov65_022383D0 - - thumb_func_start ov65_0223846C -ov65_0223846C: ; 0x0223846C - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0xe - bl sub_02036540 - cmp r0, #0 - beq _022384B6 - ldr r0, [r4, #0] - ldrb r1, [r0, #0x1b] - add r0, sp, #0 - strh r1, [r0] - add r0, r4, #0 - bl ov65_02237548 - add r5, r0, #0 - bl sub_02035E18 - cmp r5, r0 - beq _022384A4 - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0 - bgt _022384A0 - mov r0, #0xf - strb r0, [r4, #5] -_022384A0: - mov r0, #0 - pop {r3, r4, r5, pc} -_022384A4: - bl sub_0203608C - add r1, sp, #0 - bl sub_02036614 - cmp r0, #1 - bne _022384B6 - mov r0, #0xc - strb r0, [r4, #5] -_022384B6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_0223846C - - thumb_func_start ov65_022384BC -ov65_022384BC: ; 0x022384BC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl ov65_02237548 - add r7, r0, #0 - bl sub_0203608C - mov r5, #0 - add r4, r5, #0 - str r0, [sp] - cmp r7, #0 - ble _02238500 -_022384D4: - ldr r0, [sp] - cmp r0, r4 - beq _022384F8 - add r0, r4, #0 - bl sub_0203664C - cmp r0, #0 - beq _022384FA - ldrh r1, [r0] - ldr r0, [r6, #0] - ldrb r0, [r0, #0x1b] - cmp r1, r0 - bne _022384F2 - add r5, r5, #1 - b _022384FA -_022384F2: - mov r0, #0xf - strb r0, [r6, #5] - b _022384FA -_022384F8: - add r5, r5, #1 -_022384FA: - add r4, r4, #1 - cmp r4, r7 - blt _022384D4 -_02238500: - cmp r5, r7 - bne _02238508 - mov r0, #0xd - strb r0, [r6, #5] -_02238508: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov65_022384BC - - thumb_func_start ov65_0223850C -ov65_0223850C: ; 0x0223850C - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - add r1, r0, #0 - bl sub_020388F4 - mov r0, #0x12 - bl sub_020364F0 - mov r0, #0xe - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_0223850C - - thumb_func_start ov65_02238528 -ov65_02238528: ; 0x02238528 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x12 - add r4, r1, #0 - add r6, r2, #0 - bl sub_02036540 - cmp r0, #0 - beq _02238554 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov65_022378C4 - mov r0, #1 - strb r0, [r5, #7] - add r0, r4, #0 - add r1, r6, #0 - bl ov65_02237A24 - mov r0, #1 - pop {r4, r5, r6, pc} -_02238554: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov65_02238528 - - thumb_func_start ov65_02238558 -ov65_02238558: ; 0x02238558 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r6, r1, #0 - add r4, r2, #0 - cmp r0, #0 - beq _02238578 - add r1, r4, #0 - bl sub_02002154 - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_02238578: - add r0, r5, #0 - add r0, #0x30 - bl ov65_02237018 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov65_022378C4 - mov r0, #0x10 - strb r0, [r5, #5] - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02238558 - - thumb_func_start ov65_02238594 -ov65_02238594: ; 0x02238594 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x76 - bl ov65_02236E44 - mov r0, #0x11 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02238594 - - thumb_func_start ov65_022385AC -ov65_022385AC: ; 0x022385AC - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _022385BE - mov r0, #0 - pop {r4, pc} -_022385BE: - bl sub_02038378 - bl sub_02038B60 - mov r0, #0 - mov r1, #1 - strb r0, [r4, #7] - bl sub_020388F4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov65_022385AC - - thumb_func_start ov65_022385D4 -ov65_022385D4: ; 0x022385D4 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r6, #0 - bl ov65_02237550 - ldr r0, [r5, #0] - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #1 - bne _022385F0 - mov r2, #0x7d - b _022385F2 -_022385F0: - mov r2, #0x7c -_022385F2: - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - add r3, r6, #0 - bl ov65_02236E44 - mov r0, #0x13 - strb r0, [r5, #5] - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_022385D4 - - thumb_func_start ov65_02238608 -ov65_02238608: ; 0x02238608 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r0, #0 - add r1, r5, #0 - bl ov65_02237550 - add r0, r4, #0 - bl ov65_02237A10 - cmp r0, #1 - bne _0223862E - mov r0, #0xa - strb r0, [r4, #5] - add r4, #0x30 - add r0, r4, #0 - bl ov65_02236F38 - mov r0, #0 - pop {r3, r4, r5, pc} -_0223862E: - add r0, r4, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _0223863E - mov r0, #0 - pop {r3, r4, r5, pc} -_0223863E: - str r5, [sp] - ldr r0, [r4, #0x30] - ldr r1, _0223865C ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002100 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x14 - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223865C: .word 0x02239A24 - thumb_func_end ov65_02238608 - - thumb_func_start ov65_02238660 -ov65_02238660: ; 0x02238660 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r0, #0 - add r1, r4, #0 - bl ov65_02237550 - add r0, r5, #0 - bl ov65_02237A10 - cmp r0, #1 - bne _02238698 - mov r0, #0xa - strb r0, [r5, #5] - add r0, r5, #0 - add r0, #0x30 - bl ov65_02236F38 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02002154 - mov r1, #0x83 - mov r0, #0 - lsl r1, r1, #2 - str r0, [r5, r1] - pop {r3, r4, r5, pc} -_02238698: - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _022386CA - cmp r0, #0 - bne _022386BE - add r0, r5, #0 - add r1, r4, #0 - bl ov65_0223731C - add r0, r5, #0 - bl ov65_02237698 -_022386BE: - mov r0, #8 - strb r0, [r5, #5] - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_022386CA: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov65_02238660 - - thumb_func_start ov65_022386D0 -ov65_022386D0: ; 0x022386D0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - mov r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl sub_02032F40 - add r1, r5, #0 - add r1, #0x26 - strb r0, [r1] - add r0, r5, #0 - add r0, #0x26 - ldrb r0, [r0] - cmp r0, #0x20 - bne _022386F4 - bl sub_02022974 -_022386F4: - add r0, r5, #0 - mov r2, #0 - add r0, #0x30 - add r1, r6, #0 - add r3, r2, #0 - str r4, [sp] - bl ov65_0223726C - bl sub_02038378 - add r0, r5, #0 - mov r1, #0 - add r0, #0x27 - strb r1, [r0] - add r0, r5, #0 - add r0, #0x30 - add r1, r6, #0 - mov r2, #0x84 - add r3, r4, #0 - bl ov65_02236E44 - mov r0, #0x16 - strb r0, [r5, #5] - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov65_022386D0 - - thumb_func_start ov65_02238728 -ov65_02238728: ; 0x02238728 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0x30 - add r5, r2, #0 - bl ov65_02236EF8 - cmp r0, #0 - bne _0223873C - mov r0, #0 - pop {r3, r4, r5, pc} -_0223873C: - str r5, [sp] - ldr r0, [r4, #0x30] - ldr r1, _02238758 ; =0x02239A24 - mov r2, #0x30 - mov r3, #4 - bl sub_02002100 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x17 - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02238758: .word 0x02239A24 - thumb_func_end ov65_02238728 - - thumb_func_start ov65_0223875C -ov65_0223875C: ; 0x0223875C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02238788 - cmp r0, #0 - bne _0223877C - mov r0, #0x18 - b _0223877E -_0223877C: - mov r0, #0x1d -_0223877E: - strb r0, [r4, #5] - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_02238788: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov65_0223875C - - thumb_func_start ov65_0223878C -ov65_0223878C: ; 0x0223878C - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - add r0, #0x30 - mov r2, #0x11 - bl ov65_02236E44 - add r0, r4, #0 - bl ov65_0223789C - mov r0, #0x5a - str r0, [r4, #8] - mov r0, #0x19 - strb r0, [r4, #5] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov65_0223878C - - thumb_func_start ov65_022387AC -ov65_022387AC: ; 0x022387AC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - add r4, r1, #0 - cmp r0, #0 - ble _022387C0 - sub r0, r0, #1 - str r0, [r5, #8] - mov r0, #0 - pop {r3, r4, r5, pc} -_022387C0: - add r0, r5, #0 - add r0, #0x30 - bl ov65_02236EF8 - cmp r0, #0 - bne _022387D0 - mov r0, #0 - pop {r3, r4, r5, pc} -_022387D0: - add r0, r5, #0 - add r0, #0x26 - ldrb r0, [r0] - ldrb r1, [r4] - bl ov65_02237464 - cmp r0, #0 - beq _022387E4 - mov r0, #0x1a - strb r0, [r5, #5] -_022387E4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov65_022387AC - - thumb_func_start ov65_022387E8 -ov65_022387E8: ; 0x022387E8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov65_0223742C - bl sub_020380E4 - cmp r0, #1 - bne _02238832 - mov r0, #0 - bl sub_02035D78 - cmp r0, #1 - bne _02238832 - mov r0, #0 - bl sub_0203632C - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov65_022378C4 - mov r1, #0 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - str r4, [sp, #8] - bl sub_0200F174 - mov r0, #0x1b - strb r0, [r5, #5] -_02238832: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov65_022387E8 - - thumb_func_start ov65_02238838 -ov65_02238838: ; 0x02238838 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _022388F4 - ldr r0, [r6, #8] - mov r1, #0 - bl sub_020329E0 - add r0, r5, #0 - mov r1, #1 - add r0, #0x27 - strb r1, [r0] - add r0, r5, #0 - bl ov65_022377E8 - add r0, r5, #0 - add r1, r4, #0 - bl ov65_022367F8 - add r0, r5, #0 - mov r2, #0x7e - add r0, #0x30 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - add r0, r5, #0 - bl ov65_0223760C - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov65_022367A8 - bl sub_02039734 - mov r1, #0 - strb r1, [r5, #0x12] - strb r1, [r5, #0x13] - add r0, r5, #0 - add r0, #0x14 - strb r1, [r5, #0x14] - strb r1, [r0, #1] - strb r1, [r0, #2] - strb r1, [r0, #3] - add r0, r5, #0 - add r0, #0x18 - strb r1, [r5, #0x18] - strb r1, [r0, #1] - strb r1, [r0, #2] - strb r1, [r0, #3] - add r0, r5, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #4 - bl sub_020C4CF4 - add r0, r5, #0 - add r0, #0x20 - mov r1, #1 - mov r2, #4 - bl sub_020C4CF4 - add r0, r5, #0 - add r1, r5, #0 - mov r3, #0 - add r0, #0x24 - strb r3, [r0] - add r0, r5, #0 - add r0, #0x26 - strb r3, [r0] - add r0, r5, #0 - add r0, #0x28 - strb r3, [r0] - add r1, #0x28 - strb r3, [r1, #1] - strb r3, [r1, #2] - strb r3, [r1, #3] - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #3 - add r2, r1, #0 - str r4, [sp, #8] - bl sub_0200F174 - mov r0, #0x1c - strb r0, [r5, #5] -_022388F4: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov65_02238838 - - thumb_func_start ov65_022388FC -ov65_022388FC: ; 0x022388FC - push {r4, lr} - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _0223890C - mov r0, #0 - strb r0, [r4, #5] -_0223890C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov65_022388FC - - thumb_func_start ov65_02238910 -ov65_02238910: ; 0x02238910 - push {r4, lr} - add r4, r0, #0 - bl sub_02038378 - bl sub_02038B60 - mov r0, #0 - mov r1, #1 - strb r0, [r4, #7] - bl sub_020388F4 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov65_02238910 - ; 0x0223892C - - .rodata - .incbin "incbin/overlay65_rodata.bin" + + + .global Unk_ov65_0223892C +Unk_ov65_0223892C: ; 0x0223892C + .incbin "incbin/overlay65_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov65_02238930 +Unk_ov65_02238930: ; 0x02238930 + .incbin "incbin/overlay65_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov65_02238934 +Unk_ov65_02238934: ; 0x02238934 + .incbin "incbin/overlay65_rodata.bin", 0x8, 0xC - 0x8 + + .global Unk_ov65_02238938 +Unk_ov65_02238938: ; 0x02238938 + .incbin "incbin/overlay65_rodata.bin", 0xC, 0x10 - 0xC + + .global Unk_ov65_0223893C +Unk_ov65_0223893C: ; 0x0223893C + .incbin "incbin/overlay65_rodata.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov65_02238944 +Unk_ov65_02238944: ; 0x02238944 + .incbin "incbin/overlay65_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov65_0223894C +Unk_ov65_0223894C: ; 0x0223894C + .incbin "incbin/overlay65_rodata.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov65_02238954 +Unk_ov65_02238954: ; 0x02238954 + .incbin "incbin/overlay65_rodata.bin", 0x28, 0x30 - 0x28 + + .global Unk_ov65_0223895C +Unk_ov65_0223895C: ; 0x0223895C + .incbin "incbin/overlay65_rodata.bin", 0x30, 0x3C - 0x30 + + .global Unk_ov65_02238968 +Unk_ov65_02238968: ; 0x02238968 + .incbin "incbin/overlay65_rodata.bin", 0x3C, 0x4C - 0x3C + + .global Unk_ov65_02238978 +Unk_ov65_02238978: ; 0x02238978 + .incbin "incbin/overlay65_rodata.bin", 0x4C, 0x5C - 0x4C + + .global Unk_ov65_02238988 +Unk_ov65_02238988: ; 0x02238988 + .incbin "incbin/overlay65_rodata.bin", 0x5C, 0x6C - 0x5C + + .global Unk_ov65_02238998 +Unk_ov65_02238998: ; 0x02238998 + .incbin "incbin/overlay65_rodata.bin", 0x6C, 0x84 - 0x6C + + .global Unk_ov65_022389B0 +Unk_ov65_022389B0: ; 0x022389B0 + .incbin "incbin/overlay65_rodata.bin", 0x84, 0xA0 - 0x84 + + .global Unk_ov65_022389CC +Unk_ov65_022389CC: ; 0x022389CC + .incbin "incbin/overlay65_rodata.bin", 0xA0, 0xBC - 0xA0 + + .global Unk_ov65_022389E8 +Unk_ov65_022389E8: ; 0x022389E8 + .incbin "incbin/overlay65_rodata.bin", 0xBC, 0xD8 - 0xBC + + .global Unk_ov65_02238A04 +Unk_ov65_02238A04: ; 0x02238A04 + .incbin "incbin/overlay65_rodata.bin", 0xD8, 0xF4 - 0xD8 + + .global Unk_ov65_02238A20 +Unk_ov65_02238A20: ; 0x02238A20 + .incbin "incbin/overlay65_rodata.bin", 0xF4, 0x110 - 0xF4 + + .global Unk_ov65_02238A3C +Unk_ov65_02238A3C: ; 0x02238A3C + .incbin "incbin/overlay65_rodata.bin", 0x110, 0x12C - 0x110 + + .global Unk_ov65_02238A58 +Unk_ov65_02238A58: ; 0x02238A58 + .incbin "incbin/overlay65_rodata.bin", 0x12C, 0x148 - 0x12C + + .global Unk_ov65_02238A74 +Unk_ov65_02238A74: ; 0x02238A74 + .incbin "incbin/overlay65_rodata.bin", 0x148, 0x164 - 0x148 + + .global Unk_ov65_02238A90 +Unk_ov65_02238A90: ; 0x02238A90 + .incbin "incbin/overlay65_rodata.bin", 0x164, 0x184 - 0x164 + + .global Unk_ov65_02238AB0 +Unk_ov65_02238AB0: ; 0x02238AB0 + .incbin "incbin/overlay65_rodata.bin", 0x184, 0x1A4 - 0x184 + + .global Unk_ov65_02238AD0 +Unk_ov65_02238AD0: ; 0x02238AD0 + .incbin "incbin/overlay65_rodata.bin", 0x1A4, 0x1C4 - 0x1A4 + + .global Unk_ov65_02238AF0 +Unk_ov65_02238AF0: ; 0x02238AF0 + .incbin "incbin/overlay65_rodata.bin", 0x1C4, 0x1E4 - 0x1C4 + + .global Unk_ov65_02238B10 +Unk_ov65_02238B10: ; 0x02238B10 + .incbin "incbin/overlay65_rodata.bin", 0x1E4, 0x20C - 0x1E4 + + .global Unk_ov65_02238B38 +Unk_ov65_02238B38: ; 0x02238B38 + .incbin "incbin/overlay65_rodata.bin", 0x20C, 0x90 + .data - .incbin "incbin/overlay65_data.bin" + + + .global Unk_ov65_02239C20 +Unk_ov65_02239C20: ; 0x02239C20 + .incbin "incbin/overlay65_data.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov65_02239C28 +Unk_ov65_02239C28: ; 0x02239C28 + .incbin "incbin/overlay65_data.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov65_02239C30 +Unk_ov65_02239C30: ; 0x02239C30 + .incbin "incbin/overlay65_data.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov65_02239C38 +Unk_ov65_02239C38: ; 0x02239C38 + .incbin "incbin/overlay65_data.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov65_02239C40 +Unk_ov65_02239C40: ; 0x02239C40 + .incbin "incbin/overlay65_data.bin", 0x20, 0x3C - 0x20 + + .global Unk_ov65_02239C5C +Unk_ov65_02239C5C: ; 0x02239C5C + .incbin "incbin/overlay65_data.bin", 0x3C, 0x5C - 0x3C + + .global Unk_ov65_02239C7C +Unk_ov65_02239C7C: ; 0x02239C7C + .incbin "incbin/overlay65_data.bin", 0x5C, 0x7C - 0x5C + + .global Unk_ov65_02239C9C +Unk_ov65_02239C9C: ; 0x02239C9C + .incbin "incbin/overlay65_data.bin", 0x7C, 0x9C - 0x7C + + .global Unk_ov65_02239CBC +Unk_ov65_02239CBC: ; 0x02239CBC + .incbin "incbin/overlay65_data.bin", 0x9C, 0xBC - 0x9C + + .global Unk_ov65_02239CDC +Unk_ov65_02239CDC: ; 0x02239CDC + .incbin "incbin/overlay65_data.bin", 0xBC, 0x10C - 0xBC + + .global Unk_ov65_02239D2C +Unk_ov65_02239D2C: ; 0x02239D2C + .incbin "incbin/overlay65_data.bin", 0x10C, 0x120 + .bss - .space 0x20 + + + .global Unk_ov65_02239E60 +Unk_ov65_02239E60: ; 0x02239E60 + .space 0x4 + diff --git a/asm/ov65_02235060.s b/asm/ov65_02235060.s new file mode 100644 index 000000000..2615b3f43 --- /dev/null +++ b/asm/ov65_02235060.s @@ -0,0 +1,2760 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov65_02235060 +ov65_02235060: ; 0x02235060 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r2, #0 + add r4, r1, #0 + ldr r2, _02235120 ; =0x000006FC + mov r1, #0 + add r5, r0, #0 + str r3, [sp] + bl sub_020D5124 + ldr r0, [sp, #0x24] + str r4, [r5, #4] + sub r0, r0, #1 + lsr r7, r0, #3 + ldr r0, [sp] + add r2, r6, #0 + str r0, [r5, #0x10] + add r0, r5, #0 + ldr r1, [r5, #4] + add r0, #0x14 + bl ov65_0223587C + ldr r0, [r5, #0x10] + add r1, r4, #0 + bl ov65_02235918 + add r0, r7, #0 + bl ov65_02236474 + add r2, sp, #4 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + strh r0, [r2, #4] + ldrh r1, [r2, #2] + strh r1, [r2, #6] + ldrh r0, [r2, #4] + add r2, r4, #0 + bl ov63_0222BCE8 + ldr r1, _02235124 ; =0x000006E4 + str r0, [r5, r1] + add r0, r7, #0 + bl ov65_02236480 + add r1, r0, #0 + ldr r0, _02235124 ; =0x000006E4 + ldr r0, [r5, r0] + bl ov63_0222BD50 + mov r0, #0x30 + add r1, r4, #0 + bl ov63_0222BE18 + ldr r1, _02235128 ; =0x000006E8 + add r2, r4, #0 + str r0, [r5, r1] + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov65_022357E8 + mov r0, #0x6f + lsl r0, r0, #4 + add r0, r5, r0 + bl ov63_0222D19C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov65_0223582C + ldr r0, [r5, #0x10] + add r1, r4, #0 + add r2, r6, #0 + bl ov65_02235920 + mov r1, #0x6d + lsl r1, r1, #4 + add r0, r5, #0 + add r1, r5, r1 + add r2, r6, #0 + bl ov65_022362B0 + mov r0, #0x80 + add r1, r4, #0 + bl ov63_0222D848 + ldr r1, _0223512C ; =0x000006F8 + str r0, [r5, r1] + mov r0, #1 + str r0, [r5, #0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02235120: .word 0x000006FC +_02235124: .word 0x000006E4 +_02235128: .word 0x000006E8 +_0223512C: .word 0x000006F8 + thumb_func_end ov65_02235060 + + thumb_func_start ov65_02235130 +ov65_02235130: ; 0x02235130 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02235184 ; =0x000006F8 + ldr r0, [r4, r0] + bl ov63_0222D880 + add r0, r4, #0 + bl ov65_0223586C + mov r1, #0x6d + lsl r1, r1, #4 + add r0, r4, #0 + add r1, r4, r1 + bl ov65_022362EC + add r0, r4, #0 + bl ov65_0223560C + add r0, r4, #0 + bl ov65_0223581C + ldr r0, _02235188 ; =0x000006E8 + ldr r0, [r4, r0] + bl ov63_0222BE58 + ldr r0, _0223518C ; =0x000006E4 + ldr r0, [r4, r0] + bl ov63_0222BD30 + add r0, r4, #0 + add r0, #0x14 + bl ov65_022358CC + ldr r0, [r4, #0x10] + bl ov65_0223591C + ldr r2, _02235190 ; =0x000006FC + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 +_02235184: .word 0x000006F8 +_02235188: .word 0x000006E8 +_0223518C: .word 0x000006E4 +_02235190: .word 0x000006FC + thumb_func_end ov65_02235130 + + thumb_func_start ov65_02235194 +ov65_02235194: ; 0x02235194 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov65_02235194 + + thumb_func_start ov65_02235198 +ov65_02235198: ; 0x02235198 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02235234 ; =0x000006E8 + ldr r0, [r4, r0] + bl ov63_0222BE84 + add r0, r4, #0 + bl ov65_0223573C + add r0, r4, #0 + bl ov65_022356E8 + mov r1, #0x6f + lsl r1, r1, #4 + add r0, r4, r1 + sub r1, #0x24 + ldr r1, [r4, r1] + ldr r1, [r1, #0] + bl ov63_0222D160 + ldr r1, _02235238 ; =0x000006F4 + ldr r0, [r4, r1] + sub r1, r1, #4 + add r1, r4, r1 + bl ov63_0222D228 + ldr r0, _0223523C ; =0x000006EC + ldr r0, [r4, r0] + bl ov63_0222CEE4 + add r0, r4, #0 + bl ov65_02235778 + add r0, r4, #0 + bl ov65_02235B78 + add r0, r4, #0 + bl ov65_02235634 + cmp r0, #1 + bne _0223522E + add r0, r4, #0 + bl ov65_02235BE8 + cmp r0, #1 + bne _02235208 + add r0, r4, #0 + bl ov65_02235B30 + ldr r0, _02235240 ; =0x021BF67C + ldr r1, [r0, #0x44] + mov r0, #0x80 + tst r0, r1 + beq _02235208 + mov r0, #1 + pop {r4, pc} +_02235208: + ldr r0, _02235240 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0223522E + add r0, r4, #0 + bl ov65_02235254 + cmp r0, #0 + beq _02235220 + mov r0, #2 + pop {r4, pc} +_02235220: + add r0, r4, #0 + bl ov65_02235654 + cmp r0, #1 + bne _0223522E + mov r0, #3 + pop {r4, pc} +_0223522E: + mov r0, #0 + pop {r4, pc} + nop +_02235234: .word 0x000006E8 +_02235238: .word 0x000006F4 +_0223523C: .word 0x000006EC +_02235240: .word 0x021BF67C + thumb_func_end ov65_02235198 + + thumb_func_start ov65_02235244 +ov65_02235244: ; 0x02235244 + push {r3, lr} + ldr r1, [r0, #0] + cmp r1, #0 + beq _02235252 + ldr r0, [r0, #0x14] + bl sub_020219F8 +_02235252: + pop {r3, pc} + thumb_func_end ov65_02235244 + + thumb_func_start ov65_02235254 +ov65_02235254: ; 0x02235254 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223526C ; =0x000006CC + ldr r0, [r4, r0] + cmp r0, #0 + bne _02235264 + bl sub_02022974 +_02235264: + ldr r0, _0223526C ; =0x000006CC + ldr r0, [r4, r0] + ldrb r0, [r0, #0xa] + pop {r4, pc} + ; .align 2, 0 +_0223526C: .word 0x000006CC + thumb_func_end ov65_02235254 + + thumb_func_start ov65_02235270 +ov65_02235270: ; 0x02235270 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _022352C4 ; =0x000006CC + ldr r0, [r4, r0] + cmp r0, #0 + bne _02235282 + bl sub_02022974 +_02235282: + ldr r0, _022352C4 ; =0x000006CC + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl ov63_0222C0E4 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #4 + strh r0, [r2, #4] + ldrh r0, [r2, #2] + strh r0, [r2, #6] + ldrsh r3, [r2, r1] + ldr r0, _022352C8 ; =0x000006E4 + asr r1, r3, #3 + lsr r1, r1, #0x1c + add r1, r3, r1 + mov r3, #6 + ldrsh r3, [r2, r3] + lsl r1, r1, #0xc + ldr r0, [r4, r0] + asr r2, r3, #3 + lsr r2, r2, #0x1c + add r2, r3, r2 + lsl r2, r2, #0xc + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov63_0222BDE4 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_022352C4: .word 0x000006CC +_022352C8: .word 0x000006E4 + thumb_func_end ov65_02235270 + + thumb_func_start ov65_022352CC +ov65_022352CC: ; 0x022352CC + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _02235324 ; =0x000006CC + ldr r0, [r4, r0] + cmp r0, #0 + bne _022352DE + bl sub_02022974 +_022352DE: + ldr r0, _02235324 ; =0x000006CC + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl ov63_0222C0E4 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #4 + strh r0, [r2, #4] + ldrh r0, [r2, #2] + strh r0, [r2, #6] + ldrsh r3, [r2, r1] + ldr r0, _02235328 ; =0x000006E4 + asr r1, r3, #3 + lsr r1, r1, #0x1c + add r1, r3, r1 + mov r3, #6 + ldrsh r3, [r2, r3] + lsl r1, r1, #0xc + ldr r0, [r4, r0] + asr r2, r3, #3 + lsr r2, r2, #0x1c + add r2, r3, r2 + asr r2, r2, #4 + add r2, r2, #1 + lsl r2, r2, #0x10 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov63_0222BDE4 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_02235324: .word 0x000006CC +_02235328: .word 0x000006E4 + thumb_func_end ov65_022352CC + + thumb_func_start ov65_0223532C +ov65_0223532C: ; 0x0223532C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + ldr r0, [r5, #4] + bl ov63_0222D014 + add r2, r0, #0 + add r1, sp, #0 + add r0, r4, #0 + mov r4, sp + ldrh r3, [r1, #4] + sub r4, r4, #4 + sub r2, r2, #2 + strh r3, [r4] + ldrh r1, [r1, #6] + strh r1, [r4, #2] + ldr r1, [r4, #0] + bl ov65_02235B88 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_0223532C + + thumb_func_start ov65_02235370 +ov65_02235370: ; 0x02235370 + ldr r3, _02235374 ; =ov65_02235BD8 + bx r3 + ; .align 2, 0 +_02235374: .word ov65_02235BD8 + thumb_func_end ov65_02235370 + + thumb_func_start ov65_02235378 +ov65_02235378: ; 0x02235378 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov65_02235378 + + thumb_func_start ov65_0223537C +ov65_0223537C: ; 0x0223537C + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov65_0223537C + + thumb_func_start ov65_02235380 +ov65_02235380: ; 0x02235380 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + bl ov65_02235D7C + add r4, r0, #0 + ldr r0, _022353E4 ; =0x000006CC + add r1, sp, #0xc + str r4, [r5, r0] + add r0, r5, #0 + bl ov65_02235D08 + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0xc + str r3, [sp, #8] + bl ov65_02235DE4 + add r0, r5, #0 + add r1, r4, #0 + bl ov65_02235E48 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov65_02235DAC + mov r1, #0x6f + lsl r1, r1, #4 + add r0, r5, r1 + sub r1, #0x24 + ldr r1, [r5, r1] + ldr r1, [r1, #0] + bl ov63_0222D160 + ldr r1, _022353E8 ; =0x000006F4 + ldr r0, [r5, r1] + sub r1, r1, #4 + add r1, r5, r1 + bl ov63_0222D228 + add r0, r4, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022353E4: .word 0x000006CC +_022353E8: .word 0x000006F4 + thumb_func_end ov65_02235380 + + thumb_func_start ov65_022353EC +ov65_022353EC: ; 0x022353EC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + add r6, r2, #0 + add r7, r1, #0 + bl ov65_02235D7C + add r4, r0, #0 + add r0, r5, #0 + add r1, sp, #0x14 + sub r2, r6, #1 + bl ov65_02235C64 + ldr r0, _02235474 ; =0x000006CC + ldr r0, [r5, r0] + cmp r0, #0 + beq _02235442 + ldr r0, [r0, #0] + bl ov63_0222C0E4 + add r1, sp, #0xc + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r2, #8 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #4 + ldrsh r0, [r1, r0] + ldrsh r2, [r1, r2] + cmp r0, r2 + bne _02235442 + mov r0, #6 + mov r2, #0xa + ldrsh r0, [r1, r0] + ldrsh r1, [r1, r2] + cmp r0, r1 + bne _02235442 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02235442: + lsl r0, r7, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x14 + add r3, r6, #0 + bl ov65_02235DE4 + add r0, r5, #0 + add r1, r4, #0 + bl ov65_02235E68 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov65_02235DAC + add r0, r4, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02235474: .word 0x000006CC + thumb_func_end ov65_022353EC + + thumb_func_start ov65_02235478 +ov65_02235478: ; 0x02235478 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #6 + bl ov63_0222BF90 + ldr r0, _022354B0 ; =ov65_022361B0 + mov r1, #0 + str r0, [r4, #0x10] + ldr r0, _022354B4 ; =ov65_02235EF8 + str r0, [r4, #0x18] + mov r0, #2 + strh r0, [r4, #0xc] + strh r1, [r4, #8] + ldr r0, [r4, #4] + bl ov63_0222CFA4 + ldr r0, [r4, #4] + bl ov63_0222CFA8 + add r0, r5, #0 + mov r1, #4 + add r2, r4, #0 + bl ov65_02236250 + pop {r3, r4, r5, pc} + nop +_022354B0: .word ov65_022361B0 +_022354B4: .word ov65_02235EF8 + thumb_func_end ov65_02235478 + + thumb_func_start ov65_022354B8 +ov65_022354B8: ; 0x022354B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov63_0222CECC + ldr r0, [r4, #0] + bl ov63_0222BF08 + mov r1, #0x1c + mov r0, #0 +_022354CC: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _022354CC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_022354B8 + + thumb_func_start ov65_022354D8 +ov65_022354D8: ; 0x022354D8 + push {r3, lr} + ldr r0, [r0, #0] + mov r1, #4 + bl ov63_0222BF90 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, pc} + thumb_func_end ov65_022354D8 + + thumb_func_start ov65_022354E8 +ov65_022354E8: ; 0x022354E8 + push {r3, lr} + ldr r0, [r0, #0] + mov r1, #6 + bl ov63_0222BF90 + bl ov63_0222C0AC + pop {r3, pc} + thumb_func_end ov65_022354E8 + + thumb_func_start ov65_022354F8 +ov65_022354F8: ; 0x022354F8 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0x10] + add r4, r2, #0 + str r0, [r5, #0x14] + ldr r0, _02235568 ; =ov65_0223622C + mov r1, #4 + str r0, [r5, #0x10] + ldrh r0, [r5, #0xc] + strh r0, [r5, #0xe] + mov r0, #5 + strh r0, [r5, #0xc] + ldr r0, [r5, #0] + bl ov63_0222BF90 + add r3, r0, #0 + add r0, r6, #0 + mov r1, #0 + add r2, r4, #0 + bl ov65_02236230 + ldr r0, [r5, #4] + mov r1, #0 + bl ov63_0222CFA4 + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov63_0222D020 + ldr r0, [r5, #0] + mov r1, #0 + bl ov63_0222BF90 + add r1, sp, #0 + strh r0, [r1] + ldr r0, [r5, #0] + mov r1, #1 + bl ov63_0222BF90 + add r1, sp, #0 + strh r0, [r1, #2] + mov r3, sp + ldrh r2, [r1] + ldr r0, [r5, #4] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #2] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222CFE0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_02235568: .word ov65_0223622C + thumb_func_end ov65_022354F8 + + thumb_func_start ov65_0223556C +ov65_0223556C: ; 0x0223556C + push {r3, lr} + cmp r1, #0 + beq _0223558A + ldr r0, [r1, #0x14] + cmp r0, #0 + beq _0223558A + str r0, [r1, #0x10] + mov r0, #0 + str r0, [r1, #0x14] + ldrh r0, [r1, #0xe] + strh r0, [r1, #0xc] + ldr r0, [r1, #4] + mov r1, #1 + bl ov63_0222CFA4 +_0223558A: + pop {r3, pc} + thumb_func_end ov65_0223556C + + thumb_func_start ov65_0223558C +ov65_0223558C: ; 0x0223558C + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + add r4, r2, #0 + bl ov65_02236278 + cmp r0, #0 + bne _022355A2 + strb r4, [r5, #0xb] + pop {r4, r5, r6, pc} +_022355A2: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov65_0223628C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_0223558C + + thumb_func_start ov65_022355B0 +ov65_022355B0: ; 0x022355B0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov65_02235654 + cmp r0, #1 + bne _022355E6 + add r0, r5, #0 + bl ov65_022352CC + lsl r0, r0, #0x18 + asr r0, r0, #0x18 + sub r0, r0, #3 + lsl r0, r0, #0x18 + asr r4, r0, #0x18 + bmi _022355D2 + cmp r4, #4 + blt _022355D6 +_022355D2: + bl sub_02022974 +_022355D6: + mov r0, #0x6d + lsl r0, r0, #4 + lsl r1, r4, #0x18 + add r0, r5, r0 + lsr r1, r1, #0x18 + bl ov65_02236440 + pop {r3, r4, r5, pc} +_022355E6: + bl sub_02022974 + pop {r3, r4, r5, pc} + thumb_func_end ov65_022355B0 + + thumb_func_start ov65_022355EC +ov65_022355EC: ; 0x022355EC + mov r1, #0x6d + lsl r1, r1, #4 + ldr r3, _022355F8 ; =ov65_02236464 + add r0, r0, r1 + bx r3 + nop +_022355F8: .word ov65_02236464 + thumb_func_end ov65_022355EC + + thumb_func_start ov65_022355FC +ov65_022355FC: ; 0x022355FC + mov r1, #0x6d + lsl r1, r1, #4 + ldr r3, _02235608 ; =ov65_02236304 + add r1, r0, r1 + bx r3 + nop +_02235608: .word ov65_02236304 + thumb_func_end ov65_022355FC + + thumb_func_start ov65_0223560C +ov65_0223560C: ; 0x0223560C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x63 + lsl r0, r0, #2 + mov r6, #0 + add r4, r5, r0 + add r7, r0, #0 +_0223561A: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02235626 + add r0, r4, #0 + bl ov65_022354B8 +_02235626: + add r6, r6, #1 + add r5, #0x1c + add r4, #0x1c + cmp r6, #0x30 + blt _0223561A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_0223560C + + thumb_func_start ov65_02235634 +ov65_02235634: ; 0x02235634 + push {r3, lr} + ldr r1, _02235650 ; =0x000006CC + ldr r0, [r0, r1] + mov r1, #5 + ldr r0, [r0, #0] + bl ov63_0222BF90 + cmp r0, #0 + bne _0223564A + mov r0, #1 + pop {r3, pc} +_0223564A: + mov r0, #0 + pop {r3, pc} + nop +_02235650: .word 0x000006CC + thumb_func_end ov65_02235634 + + thumb_func_start ov65_02235654 +ov65_02235654: ; 0x02235654 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _022356E0 ; =0x000006CC + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldr r0, _022356E0 ; =0x000006CC + mov r1, #6 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl ov63_0222BF90 + add r4, r0, #0 + add r0, sp, #0 + mov r2, sp + ldrh r1, [r0, #0xc] + sub r2, r2, #4 + strh r1, [r2] + ldrh r0, [r0, #0xe] + add r1, r4, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C078 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #8 + strh r0, [r2, #8] + ldrh r0, [r2, #2] + strh r0, [r2, #0xa] + ldrsh r3, [r2, r1] + ldr r0, _022356E4 ; =0x000006E4 + asr r1, r3, #3 + lsr r1, r1, #0x1c + add r1, r3, r1 + mov r3, #0xa + ldrsh r3, [r2, r3] + lsl r1, r1, #0xc + ldr r0, [r5, r0] + asr r2, r3, #3 + lsr r2, r2, #0x1c + add r2, r3, r2 + lsl r2, r2, #0xc + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov63_0222BDE4 + cmp r4, #0 + bne _022356DA + cmp r0, #2 + bne _022356DA + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, pc} +_022356DA: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022356E0: .word 0x000006CC +_022356E4: .word 0x000006E4 + thumb_func_end ov65_02235654 + + thumb_func_start ov65_022356E8 +ov65_022356E8: ; 0x022356E8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _02235730 ; =0x000006F8 + add r1, sp, #8 + ldr r0, [r5, r0] + bl ov63_0222D8D0 + cmp r0, #1 + bne _0223572C + ldr r7, _02235734 ; =0x000006E8 + add r6, sp, #0 + add r4, sp, #8 +_02235702: + ldr r0, _02235738 ; =0x000006E4 + ldr r1, [r5, r7] + ldr r0, [r5, r0] + add r2, r4, #0 + add r3, r6, #0 + bl ov63_0222CA88 + cmp r0, #1 + bne _0223571E + ldr r0, _02235734 ; =0x000006E8 + add r1, r6, #0 + ldr r0, [r5, r0] + bl ov63_0222BE70 +_0223571E: + ldr r0, _02235730 ; =0x000006F8 + add r1, r4, #0 + ldr r0, [r5, r0] + bl ov63_0222D8D0 + cmp r0, #1 + beq _02235702 +_0223572C: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02235730: .word 0x000006F8 +_02235734: .word 0x000006E8 +_02235738: .word 0x000006E4 + thumb_func_end ov65_022356E8 + + thumb_func_start ov65_0223573C +ov65_0223573C: ; 0x0223573C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x63 + lsl r0, r0, #2 + mov r6, #0 + add r4, r7, #0 + add r5, r7, r0 +_0223574A: + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223576A + mov r2, #0x67 + lsl r2, r2, #2 + ldr r2, [r4, r2] + add r0, r7, #0 + add r1, r5, #0 + blx r2 + cmp r0, #1 + bne _0223576A + add r0, r5, #0 + bl ov65_022354B8 +_0223576A: + add r6, r6, #1 + add r4, #0x1c + add r5, #0x1c + cmp r6, #0x30 + blt _0223574A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_0223573C + + thumb_func_start ov65_02235778 +ov65_02235778: ; 0x02235778 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x63 + lsl r0, r0, #2 + mov r6, #0 + add r4, r7, #0 + add r5, r7, r0 +_02235786: + mov r0, #0x63 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223579C + mov r2, #0x69 + lsl r2, r2, #2 + ldr r2, [r4, r2] + add r0, r7, #0 + add r1, r5, #0 + blx r2 +_0223579C: + add r6, r6, #1 + add r4, #0x1c + add r5, #0x1c + cmp r6, #0x30 + blt _02235786 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_02235778 + + thumb_func_start ov65_022357A8 +ov65_022357A8: ; 0x022357A8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r1, #0] + ldr r1, _022357E4 ; =0x000006E8 + ldr r1, [r4, r1] + bl ov63_0222C1C4 + cmp r0, #0 + beq _022357DE + mov r2, #0x63 + mov r1, #0 + add r5, r4, #0 + lsl r2, r2, #2 +_022357C2: + ldr r3, [r5, r2] + cmp r3, r0 + bne _022357D6 + mov r0, #0x63 + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r3, r4, r5, pc} +_022357D6: + add r1, r1, #1 + add r5, #0x1c + cmp r1, #0x30 + blt _022357C2 +_022357DE: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_022357E4: .word 0x000006E8 + thumb_func_end ov65_022357A8 + + thumb_func_start ov65_022357E8 +ov65_022357E8: ; 0x022357E8 + push {r4, r5, lr} + sub sp, #0xc + add r3, r1, #0 + mov r1, #0 + add r5, r0, #0 + add r4, r2, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + str r4, [sp, #8] + ldr r0, [r5, #0x14] + mov r2, #0x30 + bl ov63_0222CD2C + ldr r1, _02235818 ; =0x000006EC + add r2, r4, #0 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #2 + bl ov63_0222CE30 + add sp, #0xc + pop {r4, r5, pc} + nop +_02235818: .word 0x000006EC + thumb_func_end ov65_022357E8 + + thumb_func_start ov65_0223581C +ov65_0223581C: ; 0x0223581C + ldr r1, _02235824 ; =0x000006EC + ldr r3, _02235828 ; =ov63_0222CD9C + ldr r0, [r0, r1] + bx r3 + ; .align 2, 0 +_02235824: .word 0x000006EC +_02235828: .word ov63_0222CD9C + thumb_func_end ov65_0223581C + + thumb_func_start ov65_0223582C +ov65_0223582C: ; 0x0223582C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r6, _02235864 ; =0x02238BCC + add r4, r1, #0 + add r5, r0, #0 + add r2, sp, #0 + mov r1, #0xb +_0223583A: + ldrb r0, [r6] + add r6, r6, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0223583A + add r0, sp, #0 + ldrb r1, [r0, #9] + add r2, sp, #0 + add r1, r1, r3 + strb r1, [r0, #9] + add r0, r5, #0 + ldr r1, [r5, #0x10] + add r0, #0x18 + add r3, r4, #0 + bl ov63_0222D1C0 + ldr r1, _02235868 ; =0x000006F4 + str r0, [r5, r1] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02235864: .word 0x02238BCC +_02235868: .word 0x000006F4 + thumb_func_end ov65_0223582C + + thumb_func_start ov65_0223586C +ov65_0223586C: ; 0x0223586C + ldr r1, _02235874 ; =0x000006F4 + ldr r3, _02235878 ; =ov63_0222D214 + ldr r0, [r0, r1] + bx r3 + ; .align 2, 0 +_02235874: .word 0x000006F4 +_02235878: .word ov63_0222D214 + thumb_func_end ov65_0223586C + + thumb_func_start ov65_0223587C +ov65_0223587C: ; 0x0223587C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + str r2, [sp] + mov r0, #0x60 + add r1, r7, #4 + add r2, r6, #0 + bl sub_020095C4 + mov r2, #0x32 + str r0, [r7, #0] + add r0, r7, #4 + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_0200964C + mov r4, #0 + add r5, r7, #0 +_022358A0: + mov r0, #0x10 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02009714 + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r5, r1] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022358A0 + ldr r2, [sp] + add r0, r7, #0 + add r1, r6, #0 + bl ov65_022358F8 + add r0, r7, #0 + add r1, r6, #0 + bl ov65_02235908 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_0223587C + + thumb_func_start ov65_022358CC +ov65_022358CC: ; 0x022358CC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl ov65_02235910 + add r0, r7, #0 + bl ov65_02235900 + mov r6, #0x4b + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #2 +_022358E2: + ldr r0, [r5, r6] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022358E2 + ldr r0, [r7, #0] + bl sub_02021964 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_022358CC + + thumb_func_start ov65_022358F8 +ov65_022358F8: ; 0x022358F8 + ldr r3, _022358FC ; =ov65_02235960 + bx r3 + ; .align 2, 0 +_022358FC: .word ov65_02235960 + thumb_func_end ov65_022358F8 + + thumb_func_start ov65_02235900 +ov65_02235900: ; 0x02235900 + ldr r3, _02235904 ; =ov65_02235A60 + bx r3 + ; .align 2, 0 +_02235904: .word ov65_02235A60 + thumb_func_end ov65_02235900 + + thumb_func_start ov65_02235908 +ov65_02235908: ; 0x02235908 + ldr r3, _0223590C ; =ov65_02235A94 + bx r3 + ; .align 2, 0 +_0223590C: .word ov65_02235A94 + thumb_func_end ov65_02235908 + + thumb_func_start ov65_02235910 +ov65_02235910: ; 0x02235910 + ldr r3, _02235914 ; =ov65_02235B14 + bx r3 + ; .align 2, 0 +_02235914: .word ov65_02235B14 + thumb_func_end ov65_02235910 + + thumb_func_start ov65_02235918 +ov65_02235918: ; 0x02235918 + bx lr + ; .align 2, 0 + thumb_func_end ov65_02235918 + + thumb_func_start ov65_0223591C +ov65_0223591C: ; 0x0223591C + bx lr + ; .align 2, 0 + thumb_func_end ov65_0223591C + + thumb_func_start ov65_02235920 +ov65_02235920: ; 0x02235920 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + mov r0, #1 + add r4, r2, #0 + lsl r0, r0, #8 + mov r2, #0 + add r5, r1, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x1e + add r3, r2, #0 + str r5, [sp, #4] + bl sub_02007130 + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + add r0, r4, #0 + mov r1, #0x1d + add r2, r6, #0 + str r5, [sp, #0xc] + bl sub_020070E8 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02235920 + + thumb_func_start ov65_02235960 +ov65_02235960: ; 0x02235960 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r4, r1, #0 + mov r1, #0x32 + add r5, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + add r6, r2, #0 + str r4, [sp, #8] + add r1, #0xfa + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #0x25 + mov r3, #0 + bl sub_02009A4C + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r5, r1] + mov r1, #0x32 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + add r1, #0xfe + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #0x24 + mov r3, #0 + bl sub_02009B04 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r0, #0x32 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + str r4, [sp, #8] + sub r1, #0xc + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #0x26 + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x32 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + str r4, [sp, #8] + sub r1, #0xc + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #0x27 + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r5, r1] + sub r1, #0xc + ldr r0, [r5, r1] + bl sub_0200A3DC + cmp r0, #1 + beq _022359F4 + bl sub_02022974 +_022359F4: + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_0200A640 + cmp r0, #1 + beq _02235A06 + bl sub_02022974 +_02235A06: + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009D4C + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_02009D4C + mov r1, #0x32 + add r0, r1, #0 + str r1, [sp] + sub r0, #0x33 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + mov r3, #0x4d + str r0, [sp, #0xc] + mov r2, #2 + str r2, [sp, #0x10] + add r2, r1, #0 + add r2, #0xfa + ldr r2, [r5, r2] + lsl r3, r3, #2 + str r2, [sp, #0x14] + add r2, r1, #0 + add r2, #0xfe + ldr r2, [r5, r2] + str r2, [sp, #0x18] + ldr r2, [r5, r3] + str r2, [sp, #0x1c] + add r2, r3, #4 + ldr r2, [r5, r2] + add r3, #0x18 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r5, r3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_020093B4 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + thumb_func_end ov65_02235960 + + thumb_func_start ov65_02235A60 +ov65_02235A60: ; 0x02235A60 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_0200A6DC + mov r7, #0x4b + lsl r7, r7, #2 + add r6, r7, #0 + mov r4, #0 + add r6, #0x10 +_02235A82: + ldr r0, [r5, r7] + ldr r1, [r5, r6] + bl sub_02009D68 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02235A82 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_02235A60 + + thumb_func_start ov65_02235A94 +ov65_02235A94: ; 0x02235A94 + push {r3, r4, r5, lr} + sub sp, #0x30 + add r4, r0, #0 + add r2, sp, #0 + mov r0, #0 + add r3, r1, #0 + add r5, r2, #0 + add r1, r0, #0 + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + stmia r5!, {r0, r1} + ldr r1, [r4, #0] + str r1, [sp] + mov r1, #0x53 + lsl r1, r1, #2 + add r1, r4, r1 + str r1, [sp, #4] + mov r1, #1 + str r1, [sp, #0x28] + lsl r1, r1, #0xc + str r0, [sp, #0x24] + add r0, r2, #0 + str r1, [sp, #0x14] + str r1, [sp, #0x18] + str r3, [sp, #0x2c] + bl sub_02021AA0 + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0x5d + lsl r1, r1, #2 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021D6C + add sp, #0x30 + pop {r3, r4, r5, pc} + thumb_func_end ov65_02235A94 + + thumb_func_start ov65_02235B14 +ov65_02235B14: ; 0x02235B14 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02021BD4 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021BD4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02235B14 + + thumb_func_start ov65_02235B30 +ov65_02235B30: ; 0x02235B30 + push {r4, lr} + sub sp, #0x10 + add r1, sp, #0 + add r4, r0, #0 + bl ov65_02235D08 + add r2, sp, #0 + mov r0, #0 + ldrsh r1, [r2, r0] + add r1, #8 + strh r1, [r2] + mov r1, #2 + ldrsh r3, [r2, r1] + add r3, #0x20 + strh r3, [r2, #2] + ldrsh r0, [r2, r0] + lsl r0, r0, #0xc + str r0, [sp, #4] + ldrsh r0, [r2, r1] + add r1, sp, #4 + lsl r0, r0, #0xc + str r0, [sp, #8] + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021C50 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02235B30 + + thumb_func_start ov65_02235B78 +ov65_02235B78: ; 0x02235B78 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r0, [r0, r1] + ldr r3, _02235B84 ; =sub_02021CAC + mov r1, #0 + bx r3 + ; .align 2, 0 +_02235B84: .word sub_02021CAC + thumb_func_end ov65_02235B78 + + thumb_func_start ov65_02235B88 +ov65_02235B88: ; 0x02235B88 + push {r0, r1, r2, r3} + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r1, sp, #0x18 + mov r0, #4 + ldrsh r0, [r1, r0] + add r4, r2, #0 + add r0, #8 + lsl r0, r0, #0x10 + asr r0, r0, #4 + str r0, [sp] + mov r0, #6 + ldrsh r0, [r1, r0] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021C50 + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02021F58 + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CAC + add sp, #0xc + pop {r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov65_02235B88 + + thumb_func_start ov65_02235BD8 +ov65_02235BD8: ; 0x02235BD8 + mov r1, #0x62 + lsl r1, r1, #2 + ldr r0, [r0, r1] + ldr r3, _02235BE4 ; =sub_02021CAC + mov r1, #0 + bx r3 + ; .align 2, 0 +_02235BE4: .word sub_02021CAC + thumb_func_end ov65_02235BD8 + + thumb_func_start ov65_02235BE8 +ov65_02235BE8: ; 0x02235BE8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _02235C5C ; =0x000006CC + ldr r0, [r5, r0] + cmp r0, #0 + bne _02235BFC + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02235BFC: + ldr r0, [r0, #0] + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + ldr r0, _02235C5C ; =0x000006CC + mov r1, #6 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl ov63_0222BF90 + add r4, r0, #0 + ldr r0, _02235C60 ; =0x000006E4 + add r2, sp, #0 + mov r1, #4 + ldrsh r3, [r2, r1] + ldr r0, [r5, r0] + asr r1, r3, #3 + lsr r1, r1, #0x1c + add r1, r3, r1 + mov r3, #6 + ldrsh r3, [r2, r3] + lsl r1, r1, #0xc + lsr r1, r1, #0x10 + asr r2, r3, #3 + lsr r2, r2, #0x1c + add r2, r3, r2 + lsl r2, r2, #0xc + lsr r2, r2, #0x10 + bl ov63_0222BDE4 + cmp r0, #0xf + bne _02235C54 + cmp r4, #1 + bne _02235C54 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_02235C54: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02235C5C: .word 0x000006CC +_02235C60: .word 0x000006E4 + thumb_func_end ov65_02235BE8 + + thumb_func_start ov65_02235C64 +ov65_02235C64: ; 0x02235C64 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #7 + add r4, r2, #0 + and r4, r0 + ldr r0, _02235D04 ; =0x000006E4 + str r1, [sp] + ldr r0, [r5, r0] + lsr r7, r2, #3 + bl ov63_0222BD48 + add r6, r0, #0 + ldr r0, _02235D04 ; =0x000006E4 + ldr r0, [r5, r0] + bl ov63_0222BD4C + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #4] + cmp r0, #0 + bls _02235CFC + add r0, r7, #3 + str r0, [sp, #0x14] + add r0, r4, #7 + str r0, [sp, #0xc] +_02235C9A: + mov r4, #0 + cmp r6, #0 + bls _02235CF0 + ldr r0, [sp, #8] + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #8] + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 +_02235CB0: + ldr r0, _02235D04 ; =0x000006E4 + lsl r1, r4, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + add r2, r7, #0 + bl ov63_0222BDE4 + ldr r1, [sp, #0xc] + cmp r0, r1 + bne _02235CEA + ldr r0, _02235D04 ; =0x000006E4 + lsl r1, r4, #0x10 + ldr r0, [r5, r0] + ldr r2, [sp, #0x10] + lsr r1, r1, #0x10 + bl ov63_0222BDE4 + ldr r1, [sp, #0x14] + cmp r0, r1 + bne _02235CEA + ldr r0, [sp] + lsl r1, r4, #4 + strh r1, [r0] + ldr r0, [sp, #8] + lsl r1, r0, #4 + ldr r0, [sp] + add sp, #0x18 + strh r1, [r0, #2] + pop {r3, r4, r5, r6, r7, pc} +_02235CEA: + add r4, r4, #1 + cmp r4, r6 + blo _02235CB0 +_02235CF0: + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #8] + cmp r1, r0 + blo _02235C9A +_02235CFC: + bl sub_02022974 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02235D04: .word 0x000006E4 + thumb_func_end ov65_02235C64 + + thumb_func_start ov65_02235D08 +ov65_02235D08: ; 0x02235D08 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + ldr r0, _02235D78 ; =0x000006E4 + str r1, [sp] + ldr r0, [r7, r0] + bl ov63_0222BD48 + add r5, r0, #0 + ldr r0, _02235D78 ; =0x000006E4 + ldr r0, [r7, r0] + bl ov63_0222BD4C + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #4] + cmp r0, #0 + bls _02235D70 +_02235D2E: + mov r4, #0 + cmp r5, #0 + bls _02235D64 + ldr r0, [sp, #8] + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 +_02235D3A: + ldr r0, _02235D78 ; =0x000006E4 + lsl r1, r4, #0x10 + ldr r0, [r7, r0] + lsr r1, r1, #0x10 + add r2, r6, #0 + bl ov63_0222BDE4 + cmp r0, #0xf + bne _02235D5E + ldr r0, [sp] + lsl r1, r4, #4 + strh r1, [r0] + ldr r0, [sp, #8] + lsl r1, r0, #4 + ldr r0, [sp] + add sp, #0xc + strh r1, [r0, #2] + pop {r4, r5, r6, r7, pc} +_02235D5E: + add r4, r4, #1 + cmp r4, r5 + blo _02235D3A +_02235D64: + ldr r0, [sp, #8] + add r1, r0, #1 + ldr r0, [sp, #4] + str r1, [sp, #8] + cmp r1, r0 + blo _02235D2E +_02235D70: + bl sub_02022974 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02235D78: .word 0x000006E4 + thumb_func_end ov65_02235D08 + + thumb_func_start ov65_02235D7C +ov65_02235D7C: ; 0x02235D7C + push {r4, lr} + mov r2, #0x63 + mov r1, #0 + add r4, r0, #0 + lsl r2, r2, #2 +_02235D86: + ldr r3, [r4, r2] + cmp r3, #0 + bne _02235D9A + mov r2, #0x63 + lsl r2, r2, #2 + add r2, r0, r2 + mov r0, #0x1c + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} +_02235D9A: + add r1, r1, #1 + add r4, #0x1c + cmp r1, #0x30 + blt _02235D86 + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02235D7C + + thumb_func_start ov65_02235DAC +ov65_02235DAC: ; 0x02235DAC + push {r3, r4, r5, lr} + add r3, r0, #0 + ldr r0, _02235DE0 ; =0x000006EC + add r5, r1, #0 + ldr r0, [r3, r0] + ldr r1, [r5, #0] + ldr r3, [r3, #4] + add r4, r2, #0 + bl ov63_0222CE44 + str r0, [r5, #4] + cmp r4, #0 + bne _02235DDC + ldr r0, [r5, #4] + mov r1, #0 + bl ov63_0222CFA4 + ldr r0, [r5, #4] + bl ov63_0222CFA8 + ldr r0, [r5, #4] + mov r1, #0 + bl ov63_0222D008 +_02235DDC: + pop {r3, r4, r5, pc} + nop +_02235DE0: .word 0x000006EC + thumb_func_end ov65_02235DAC + + thumb_func_start ov65_02235DE4 +ov65_02235DE4: ; 0x02235DE4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + mov r1, #0 + ldrsh r1, [r2, r1] + add r5, sp, #0 + strh r1, [r5] + mov r1, #2 + ldrsh r1, [r2, r1] + strh r1, [r5, #2] + ldr r1, [sp, #0x20] + strh r3, [r5, #4] + strh r1, [r5, #6] + add r1, sp, #8 + ldrb r2, [r1, #0x14] + strh r2, [r5, #8] + ldrh r1, [r1, #0x10] + strh r1, [r5, #0xa] + ldr r1, _02235E18 ; =0x000006E8 + ldr r0, [r0, r1] + add r1, sp, #0 + bl ov63_0222BEC0 + str r0, [r4, #0] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02235E18: .word 0x000006E8 + thumb_func_end ov65_02235DE4 + + thumb_func_start ov65_02235E1C +ov65_02235E1C: ; 0x02235E1C + ldrh r0, [r0, #0xc] + cmp r0, #5 + bhi _02235E42 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02235E2E: ; jump table + .short _02235E3A - _02235E2E - 2 ; case 0 + .short _02235E3E - _02235E2E - 2 ; case 1 + .short _02235E3E - _02235E2E - 2 ; case 2 + .short _02235E3A - _02235E2E - 2 ; case 3 + .short _02235E3A - _02235E2E - 2 ; case 4 + .short _02235E3E - _02235E2E - 2 ; case 5 +_02235E3A: + mov r0, #1 + bx lr +_02235E3E: + mov r0, #0 + bx lr +_02235E42: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov65_02235E1C + + thumb_func_start ov65_02235E48 +ov65_02235E48: ; 0x02235E48 + add r2, r1, #0 + ldr r1, _02235E5C ; =ov65_02236044 + ldr r3, _02235E60 ; =ov65_02236250 + str r1, [r2, #0x10] + ldr r1, _02235E64 ; =ov65_02235EF4 + str r1, [r2, #0x18] + mov r1, #0 + strh r1, [r2, #0xc] + bx r3 + nop +_02235E5C: .word ov65_02236044 +_02235E60: .word ov65_02236250 +_02235E64: .word ov65_02235EF4 + thumb_func_end ov65_02235E48 + + thumb_func_start ov65_02235E68 +ov65_02235E68: ; 0x02235E68 + ldr r0, _02235E7C ; =ov65_02236158 + str r0, [r1, #0x10] + ldr r0, _02235E80 ; =ov65_02235EF8 + str r0, [r1, #0x18] + mov r0, #0x2d + strh r0, [r1, #8] + mov r0, #1 + strh r0, [r1, #0xc] + bx lr + nop +_02235E7C: .word ov65_02236158 +_02235E80: .word ov65_02235EF8 + thumb_func_end ov65_02235E68 + + thumb_func_start ov65_02235E84 +ov65_02235E84: ; 0x02235E84 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _02235EBC ; =ov65_022361C8 + add r4, r1, #0 + str r0, [r4, #0x10] + ldr r0, _02235EC0 ; =ov65_02235EF4 + str r0, [r4, #0x18] + bl sub_0201D35C + ldr r1, _02235EC4 ; =0x000003FF + add r2, r4, #0 + and r1, r0 + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + strh r0, [r4, #8] + mov r0, #3 + strh r0, [r4, #0xc] + add r0, r5, #0 + mov r1, #0 + bl ov65_02236250 + ldr r0, [r4, #4] + mov r1, #1 + bl ov63_0222CFA4 + pop {r3, r4, r5, pc} + nop +_02235EBC: .word ov65_022361C8 +_02235EC0: .word ov65_02235EF4 +_02235EC4: .word 0x000003FF + thumb_func_end ov65_02235E84 + + thumb_func_start ov65_02235EC8 +ov65_02235EC8: ; 0x02235EC8 + push {r4, lr} + add r4, r1, #0 + ldr r1, _02235EEC ; =ov65_02236214 + add r2, r4, #0 + str r1, [r4, #0x10] + ldr r1, _02235EF0 ; =ov65_02235F94 + str r1, [r4, #0x18] + mov r1, #0x1c + strh r1, [r4, #8] + mov r1, #4 + strh r1, [r4, #0xc] + bl ov65_02236250 + ldr r0, [r4, #4] + mov r1, #0 + bl ov63_0222CFA4 + pop {r4, pc} + ; .align 2, 0 +_02235EEC: .word ov65_02236214 +_02235EF0: .word ov65_02235F94 + thumb_func_end ov65_02235EC8 + + thumb_func_start ov65_02235EF4 +ov65_02235EF4: ; 0x02235EF4 + bx lr + ; .align 2, 0 + thumb_func_end ov65_02235EF4 + + thumb_func_start ov65_02235EF8 +ov65_02235EF8: ; 0x02235EF8 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + ldr r0, [r4, #4] + bl ov63_0222CFB4 + ldr r0, [r4, #4] + bl ov63_0222CFFC + cmp r0, #0 + bne _02235F16 + ldr r0, [r4, #4] + mov r1, #1 + bl ov63_0222D008 +_02235F16: + ldr r0, [r4, #0] + mov r1, #0 + bl ov63_0222BF90 + add r1, sp, #0 + strh r0, [r1, #4] + ldr r0, [r4, #0] + mov r1, #1 + bl ov63_0222BF90 + add r1, sp, #0 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + strh r0, [r1] + ldrh r0, [r1, #6] + strh r0, [r1, #2] + ldrh r0, [r4, #8] + bl sub_0201D15C + ldr r2, _02235F90 ; =0xFFF40000 + asr r1, r0, #0x1f + asr r3, r2, #0x14 + bl sub_020E1F1C + mov r5, #2 + mov r6, #0 + lsl r5, r5, #0xa + mov r3, #6 + add r2, sp, #0 + add r5, r0, r5 + adc r1, r6 + lsl r0, r1, #0x14 + lsr r1, r5, #0xc + orr r1, r0 + ldrsh r3, [r2, r3] + asr r0, r1, #0xc + add r0, r3, r0 + strh r0, [r2, #6] + mov r3, sp + ldrh r1, [r2, #4] + ldr r0, [r4, #4] + sub r3, r3, #4 + strh r1, [r3] + ldrh r1, [r2, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222CFE0 + add r1, sp, #0 + mov r3, sp + ldrh r2, [r1] + ldr r0, [r4, #4] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #2] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222D060 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02235F90: .word 0xFFF40000 + thumb_func_end ov65_02235EF8 + + thumb_func_start ov65_02235F94 +ov65_02235F94: ; 0x02235F94 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl ov63_0222BF90 + add r1, sp, #0 + strh r0, [r1, #4] + ldr r0, [r4, #0] + mov r1, #1 + bl ov63_0222BF90 + add r1, sp, #0 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + strh r0, [r1] + ldrh r0, [r1, #6] + strh r0, [r1, #2] + mov r0, #8 + ldrsh r0, [r4, r0] + sub r0, #0x10 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + cmp r0, #0 + ble _0223600A + mov r1, #6 + bl sub_020E1F6C + lsl r0, r1, #0x10 + asr r1, r0, #0x10 + mov r0, #0xb4 + mul r0, r1 + mov r1, #6 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + add r1, sp, #0 + mov r2, #6 + ldrsh r3, [r1, r2] + asr r2, r0, #0x1f + lsr r5, r0, #0x12 + lsl r2, r2, #0xe + lsl r6, r0, #0xe + mov r0, #2 + orr r2, r5 + mov r5, #0 + lsl r0, r0, #0xa + add r6, r6, r0 + adc r2, r5 + lsl r0, r2, #0x14 + lsr r2, r6, #0xc + orr r2, r0 + asr r0, r2, #0xc + sub r0, r3, r0 + strh r0, [r1, #6] +_0223600A: + add r1, sp, #0 + ldrh r2, [r1, #4] + mov r3, sp + ldr r0, [r4, #4] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222CFE0 + add r1, sp, #0 + mov r3, sp + ldrh r2, [r1] + ldr r0, [r4, #4] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #2] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222D060 + ldr r0, [r4, #4] + mov r1, #1 + bl ov63_0222D020 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02235F94 + + thumb_func_start ov65_02236044 +ov65_02236044: ; 0x02236044 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r6, #0] + mov r1, #6 + bl ov63_0222BF90 + add r4, r0, #0 + ldr r0, [r6, #0] + mov r1, #4 + bl ov63_0222BF90 + add r7, r0, #0 + ldr r0, [r6, #0] + mov r1, #5 + bl ov63_0222BF90 + cmp r0, #0 + beq _0223606E + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0223606E: + ldr r0, _02236154 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _022360A8 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov65_022357A8 + str r0, [sp] + cmp r0, #0 + beq _022360A4 + bl ov65_02235E1C + cmp r0, #1 + bne _0223609E + ldr r0, [sp] + mov r1, #4 + ldr r0, [r0, #0] + bl ov63_0222BF90 + strb r0, [r6, #0xa] + b _022360A8 +_0223609E: + mov r0, #0 + strb r0, [r6, #0xa] + b _022360A8 +_022360A4: + mov r0, #0 + strb r0, [r6, #0xa] +_022360A8: + ldr r0, [r5, #0xc] + cmp r0, #1 + bne _022360B2 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022360B2: + ldr r0, _02236154 ; =0x021BF67C + mov r1, #2 + ldr r0, [r0, #0x44] + add r2, r0, #0 + tst r2, r1 + beq _022360C0 + mov r1, #3 +_022360C0: + mov r2, #0x40 + tst r2, r0 + beq _022360E4 + cmp r4, #0 + bne _022360D6 + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_022360D6: + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_022360E4: + mov r2, #0x80 + tst r2, r0 + beq _02236108 + cmp r4, #1 + bne _022360FA + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_022360FA: + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_02236108: + mov r2, #0x20 + tst r2, r0 + beq _0223612C + cmp r4, #2 + bne _0223611E + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_0223611E: + add r0, r5, #0 + mov r1, #1 + mov r2, #2 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_0223612C: + mov r2, #0x10 + tst r0, r2 + beq _0223614E + cmp r4, #3 + bne _02236142 + add r0, r5, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov65_02236230 + b _0223614E +_02236142: + add r0, r5, #0 + mov r1, #1 + mov r2, #3 + add r3, r7, #0 + bl ov65_02236230 +_0223614E: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02236154: .word 0x021BF67C + thumb_func_end ov65_02236044 + + thumb_func_start ov65_02236158 +ov65_02236158: ; 0x02236158 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r0, #8 + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, #8] + ldrsh r0, [r4, r0] + cmp r0, #0 + bgt _022361A8 + ldr r0, [r4, #4] + bl ov63_0222CFC0 + ldr r0, [r4, #4] + mov r1, #1 + bl ov63_0222CFA4 + ldr r0, _022361AC ; =0x000006CC + mov r1, #4 + ldr r0, [r5, r0] + ldr r0, [r0, #0] + bl ov63_0222BF90 + add r6, r0, #0 + ldr r0, [r4, #0] + mov r1, #4 + bl ov63_0222BF90 + cmp r0, r6 + bne _0223619E + add r0, r5, #0 + add r1, r4, #0 + bl ov65_02235E48 + b _022361A8 +_0223619E: + ldrb r2, [r4, #0xb] + add r0, r5, #0 + add r1, r4, #0 + bl ov65_0223628C +_022361A8: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022361AC: .word 0x000006CC + thumb_func_end ov65_02236158 + + thumb_func_start ov65_022361B0 +ov65_022361B0: ; 0x022361B0 + mov r0, #8 + ldrsh r2, [r1, r0] + add r2, r2, #1 + strh r2, [r1, #8] + ldrsh r0, [r1, r0] + cmp r0, #0x2d + ble _022361C2 + mov r0, #1 + bx lr +_022361C2: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov65_022361B0 + + thumb_func_start ov65_022361C8 +ov65_022361C8: ; 0x022361C8 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #8 + ldrsh r1, [r5, r0] + sub r1, r1, #1 + strh r1, [r5, #8] + ldrsh r0, [r5, r0] + cmp r0, #0 + bgt _0223620A + bl sub_0201D35C + ldr r1, _02236210 ; =0x000003FF + and r1, r0 + mov r0, #1 + lsl r0, r0, #8 + add r0, r1, r0 + strh r0, [r5, #8] + bl sub_0201D35C + add r4, r0, #0 + mov r1, #3 + and r4, r1 + ldr r0, [r5, #0] + mov r1, #4 + bl ov63_0222BF90 + add r3, r0, #0 + add r0, r6, #0 + mov r1, #0 + add r2, r4, #0 + bl ov65_02236230 +_0223620A: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02236210: .word 0x000003FF + thumb_func_end ov65_022361C8 + + thumb_func_start ov65_02236214 +ov65_02236214: ; 0x02236214 + mov r0, #8 + ldrsh r2, [r1, r0] + sub r2, r2, #1 + strh r2, [r1, #8] + ldrsh r0, [r1, r0] + cmp r0, #0 + bge _02236226 + mov r0, #0x1c + strh r0, [r1, #8] +_02236226: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov65_02236214 + + thumb_func_start ov65_0223622C +ov65_0223622C: ; 0x0223622C + mov r0, #0 + bx lr + thumb_func_end ov65_0223622C + + thumb_func_start ov65_02236230 +ov65_02236230: ; 0x02236230 + push {r3, r4, lr} + sub sp, #4 + add r4, sp, #0 + strh r1, [r4] + strb r2, [r4, #2] + ldr r1, _0223624C ; =0x000006F8 + strb r3, [r4, #3] + ldr r0, [r0, r1] + add r1, sp, #0 + bl ov63_0222D894 + add sp, #4 + pop {r3, r4, pc} + nop +_0223624C: .word 0x000006F8 + thumb_func_end ov65_02236230 + + thumb_func_start ov65_02236250 +ov65_02236250: ; 0x02236250 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + ldr r0, [r4, #0] + mov r1, #6 + bl ov63_0222BF90 + add r7, r0, #0 + ldr r0, [r4, #0] + mov r1, #4 + bl ov63_0222BF90 + add r3, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov65_02236230 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_02236250 + + thumb_func_start ov65_02236278 +ov65_02236278: ; 0x02236278 + ldr r1, [r0, #0x18] + ldr r0, _02236288 ; =ov65_02235EF8 + cmp r1, r0 + beq _02236284 + mov r0, #1 + bx lr +_02236284: + mov r0, #0 + bx lr + ; .align 2, 0 +_02236288: .word ov65_02235EF8 + thumb_func_end ov65_02236278 + + thumb_func_start ov65_0223628C +ov65_0223628C: ; 0x0223628C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + beq _0223629A + cmp r4, #1 + beq _022362A0 + b _022362A6 +_0223629A: + bl ov65_02235E84 + b _022362AA +_022362A0: + bl ov65_02235EC8 + b _022362AA +_022362A6: + bl sub_02022974 +_022362AA: + strb r4, [r5, #0xb] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_0223628C + + thumb_func_start ov65_022362B0 +ov65_022362B0: ; 0x022362B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r3, r0, #0 + add r5, r4, #0 + mov r1, #0x14 + mov r0, #0 +_022362BC: + strb r0, [r5] + add r5, r5, #1 + sub r1, r1, #1 + bne _022362BC + ldr r3, [r3, #4] + add r0, r2, #0 + mov r1, #0x1f + add r2, r4, #4 + bl sub_020071EC + str r0, [r4, #0] + mov r0, #0xf + strb r0, [r4, #8] + mov r0, #0 + strb r0, [r4, #9] + ldrb r0, [r4, #9] + lsl r1, r0, #1 + ldr r0, _022362E8 ; =0x02238BC8 + ldrh r0, [r0, r1] + strh r0, [r4, #0xa] + pop {r3, r4, r5, pc} + nop +_022362E8: .word 0x02238BC8 + thumb_func_end ov65_022362B0 + + thumb_func_start ov65_022362EC +ov65_022362EC: ; 0x022362EC + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + mov r1, #0x14 + mov r0, #0 +_022362FA: + strb r0, [r4] + add r4, r4, #1 + sub r1, r1, #1 + bne _022362FA + pop {r4, pc} + thumb_func_end ov65_022362EC + + thumb_func_start ov65_02236304 +ov65_02236304: ; 0x02236304 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov65_02236318 + add r0, r4, #0 + bl ov65_02236384 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02236304 + + thumb_func_start ov65_02236318 +ov65_02236318: ; 0x02236318 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0xa + ldrsh r1, [r5, r0] + sub r1, r1, #1 + strh r1, [r5, #0xa] + ldrsh r0, [r5, r0] + cmp r0, #0 + bgt _0223637E + ldrb r0, [r5, #9] + add r0, r0, #1 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + strb r0, [r5, #9] + ldrb r0, [r5, #9] + lsl r1, r0, #1 + ldr r0, _02236380 ; =0x02238BC8 + ldrh r0, [r0, r1] + strh r0, [r5, #0xa] + ldrb r0, [r5, #9] + cmp r0, #1 + bne _02236350 + mov r6, #2 + b _02236352 +_02236350: + mov r6, #1 +_02236352: + mov r4, #0 + mov r7, #1 +_02236356: + add r0, r7, #0 + ldrb r1, [r5, #8] + lsl r0, r4 + tst r0, r1 + beq _02236378 + add r0, r5, #0 + add r1, r6, #0 + bl ov65_02236410 + add r1, r4, #1 + lsl r1, r1, #1 + add r2, r0, #0 + mov r0, #0xf + add r1, #0xe0 + mov r3, #2 + bl sub_0201DC68 +_02236378: + add r4, r4, #1 + cmp r4, #4 + blt _02236356 +_0223637E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02236380: .word 0x02238BC8 + thumb_func_end ov65_02236318 + + thumb_func_start ov65_02236384 +ov65_02236384: ; 0x02236384 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r3, [r4, #0xd] + mov r0, #0 + add r1, r0, #0 + lsl r5, r3, #2 + ldr r3, _02236400 ; =0x02238BD7 + add r2, r0, #0 + ldrb r3, [r3, r5] + cmp r3, #1 + bne _022363AC + mov r3, #0xe + ldrsh r5, [r4, r3] + sub r5, r5, #1 + strh r5, [r4, #0xe] + ldrsh r3, [r4, r3] + cmp r3, #0 + bgt _022363B6 + mov r2, #1 + b _022363B6 +_022363AC: + ldrb r3, [r4, #0x10] + cmp r3, #0 + beq _022363B6 + strb r0, [r4, #0x10] + mov r2, #1 +_022363B6: + cmp r2, #0 + beq _022363E2 + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r0, [r4, #0xd] + cmp r0, #8 + blo _022363CE + add r0, r4, #0 + bl ov65_0223641C + pop {r3, r4, r5, pc} +_022363CE: + lsl r1, r0, #2 + ldr r0, _02236404 ; =0x02238BD8 + ldrb r0, [r0, r1] + ldr r1, _02236408 ; =0x02238BDA + strh r0, [r4, #0xe] + ldrb r0, [r4, #0xd] + lsl r2, r0, #2 + ldr r0, _0223640C ; =0x02238BD9 + ldrb r1, [r1, r2] + ldrb r0, [r0, r2] +_022363E2: + cmp r0, #0 + beq _022363FE + add r0, r4, #0 + bl ov65_02236410 + ldrb r1, [r4, #0xc] + add r2, r0, #0 + mov r0, #0xf + add r1, r1, #1 + lsl r1, r1, #1 + add r1, #0xe0 + mov r3, #2 + bl sub_0201DC68 +_022363FE: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02236400: .word 0x02238BD7 +_02236404: .word 0x02238BD8 +_02236408: .word 0x02238BDA +_0223640C: .word 0x02238BD9 + thumb_func_end ov65_02236384 + + thumb_func_start ov65_02236410 +ov65_02236410: ; 0x02236410 + ldr r0, [r0, #4] + ldr r2, [r0, #0xc] + add r0, r1, #1 + lsl r0, r0, #1 + add r0, r2, r0 + bx lr + thumb_func_end ov65_02236410 + + thumb_func_start ov65_0223641C +ov65_0223641C: ; 0x0223641C + ldrb r1, [r0, #0xc] + ldrb r3, [r0, #8] + mov r2, #1 + lsl r2, r1 + add r1, r3, #0 + orr r1, r2 + strb r1, [r0, #8] + mov r1, #0 + strb r1, [r0, #0xc] + strb r1, [r0, #0xd] + strh r1, [r0, #0xe] + strb r1, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov65_0223641C + + thumb_func_start ov65_02236438 +ov65_02236438: ; 0x02236438 + mov r1, #1 + strb r1, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov65_02236438 + + thumb_func_start ov65_02236440 +ov65_02236440: ; 0x02236440 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldrb r1, [r5, #0xd] + cmp r1, #0 + beq _02236450 + bl ov65_0223641C +_02236450: + mov r0, #1 + ldrb r1, [r5, #8] + lsl r0, r4 + eor r0, r1 + strb r0, [r5, #8] + add r0, r5, #0 + strb r4, [r5, #0xc] + bl ov65_02236438 + pop {r3, r4, r5, pc} + thumb_func_end ov65_02236440 + + thumb_func_start ov65_02236464 +ov65_02236464: ; 0x02236464 + push {r3, lr} + ldrb r1, [r0, #0xd] + cmp r1, #0 + beq _02236470 + bl ov65_02236438 +_02236470: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov65_02236464 + + .rodata + + + .global Unk_ov65_02238BC8 +Unk_ov65_02238BC8: ; 0x02238BC8 + .incbin "incbin/overlay65_rodata.bin", 0x29C, 0x2A0 - 0x29C + + .global Unk_ov65_02238BCC +Unk_ov65_02238BCC: ; 0x02238BCC + .incbin "incbin/overlay65_rodata.bin", 0x2A0, 0x2AB - 0x2A0 + + .global Unk_ov65_02238BD7 +Unk_ov65_02238BD7: ; 0x02238BD7 + .incbin "incbin/overlay65_rodata.bin", 0x2AB, 0x20 + diff --git a/asm/ov65_02236474.s b/asm/ov65_02236474.s new file mode 100644 index 000000000..df17fb360 --- /dev/null +++ b/asm/ov65_02236474.s @@ -0,0 +1,59 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov65_02236474 +ov65_02236474: ; 0x02236474 + lsl r1, r0, #2 + ldr r0, _0223647C ; =0x02238BF8 + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_0223647C: .word 0x02238BF8 + thumb_func_end ov65_02236474 + + thumb_func_start ov65_02236480 +ov65_02236480: ; 0x02236480 + lsl r1, r0, #2 + ldr r0, _02236488 ; =0x02239E4C + ldr r0, [r0, r1] + bx lr + ; .align 2, 0 +_02236488: .word 0x02239E4C + thumb_func_end ov65_02236480 + + .rodata + + + .global Unk_ov65_02238BF8 +Unk_ov65_02238BF8: ; 0x02238BF8 + .incbin "incbin/overlay65_rodata.bin", 0x2CC, 0x2DC - 0x2CC + + .global Unk_ov65_02238C08 +Unk_ov65_02238C08: ; 0x02238C08 + .incbin "incbin/overlay65_rodata.bin", 0x2DC, 0x59C - 0x2DC + + .global Unk_ov65_02238EC8 +Unk_ov65_02238EC8: ; 0x02238EC8 + .incbin "incbin/overlay65_rodata.bin", 0x59C, 0x85C - 0x59C + + .global Unk_ov65_02239188 +Unk_ov65_02239188: ; 0x02239188 + .incbin "incbin/overlay65_rodata.bin", 0x85C, 0xC24 - 0x85C + + .global Unk_ov65_02239550 +Unk_ov65_02239550: ; 0x02239550 + .incbin "incbin/overlay65_rodata.bin", 0xC24, 0x4D0 + + + .data + + + .global Unk_ov65_02239E4C +Unk_ov65_02239E4C: ; 0x02239E4C + .incbin "incbin/overlay65_data.bin", 0x22C, 0x10 + diff --git a/asm/ov65_0223648C.s b/asm/ov65_0223648C.s new file mode 100644 index 000000000..c86965dcb --- /dev/null +++ b/asm/ov65_0223648C.s @@ -0,0 +1,4952 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov65_0223648C +ov65_0223648C: ; 0x0223648C + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02006840 + add r5, r0, #0 + ldr r0, _02236540 ; =0x0000003F + mov r1, #2 + bl sub_02006590 + bl sub_020389B8 + cmp r0, #1 + beq _022364AA + bl sub_02022974 +_022364AA: + mov r1, #0x60 + mov r0, #3 + lsl r2, r1, #0xa + bl sub_02017FC8 + mov r2, #0xa + mov r0, #3 + mov r1, #0x61 + lsl r2, r2, #0xc + bl sub_02017FC8 + mov r1, #0x8a + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #0x60 + bl sub_0200681C + mov r2, #0x8a + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + add r0, r4, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #4 + bl sub_020C4CF4 + add r0, r4, #0 + add r0, #0x20 + mov r1, #1 + mov r2, #4 + bl sub_020C4CF4 + mov r0, #0x10 + mov r1, #0x60 + bl sub_0201DBEC + bl sub_020388E8 + add r1, r0, #0 + str r0, [r4, #0] + add r1, #0x22 + ldrb r1, [r1] + add r0, #0x21 + strb r1, [r0] + add r0, r4, #0 + bl ov65_02236794 + strb r0, [r4, #4] + mov r0, #0xff + strb r0, [r4, #6] + add r0, r4, #0 + bl sub_0209C390 + add r0, r4, #0 + bl ov65_0223760C + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0x60 + bl ov65_022367A8 + ldr r0, _02236544 ; =ov65_02236780 + add r1, r4, #0 + bl sub_02017798 + bl sub_02039734 + mov r0, #1 + add r4, #0x27 + strb r0, [r4] + pop {r3, r4, r5, pc} + nop +_02236540: .word 0x0000003F +_02236544: .word ov65_02236780 + thumb_func_end ov65_0223648C + + thumb_func_start ov65_02236548 +ov65_02236548: ; 0x02236548 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r6, #0 + bl sub_02006840 + add r7, r0, #0 + ldr r0, [r5, #0] + cmp r0, #4 + bls _02236566 + b _0223666E +_02236566: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02236572: ; jump table + .short _0223657C - _02236572 - 2 ; case 0 + .short _0223659A - _02236572 - 2 ; case 1 + .short _022365AA - _02236572 - 2 ; case 2 + .short _02236640 - _02236572 - 2 ; case 3 + .short _02236660 - _02236572 - 2 ; case 4 +_0223657C: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x60 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223666E +_0223659A: + bl sub_0200F2AC + cmp r0, #0 + beq _0223666E + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223666E +_022365AA: + add r0, r4, #0 + add r0, #0x27 + ldrb r0, [r0] + cmp r0, #0 + beq _022365BE + add r0, r4, #0 + add r1, r7, #0 + mov r2, #0x60 + bl ov65_02237370 +_022365BE: + ldrb r0, [r4, #4] + cmp r0, #0 + beq _022365F0 + bl sub_02032AAC + cmp r0, #1 + bne _022365DC + add r0, r4, #0 + bl ov65_02237970 + bl sub_02032CE8 + add r0, r4, #0 + bl ov65_0223782C +_022365DC: + ldrb r3, [r4, #5] + add r0, r4, #0 + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _02236684 ; =0x02239B80 + mov r2, #0x60 + ldr r3, [r3, r6] + blx r3 + add r6, r0, #0 + b _02236612 +_022365F0: + ldrb r3, [r4, #5] + add r0, r4, #0 + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _02236688 ; =0x02239B08 + mov r2, #0x60 + ldr r3, [r3, r6] + blx r3 + add r6, r0, #0 + bl sub_02032AAC + cmp r0, #1 + bne _02236612 + add r0, r4, #0 + mov r1, #0x60 + bl ov65_02237860 +_02236612: + add r0, r4, #0 + bl ov65_02237660 + cmp r0, #0 + beq _02236626 + add r0, r4, #0 + add r1, r7, #0 + mov r2, #0x60 + bl ov65_02237034 +_02236626: + add r0, r4, #0 + bl ov65_022377A4 + cmp r6, #1 + bne _0223666E + ldrb r0, [r4, #7] + strb r0, [r7, #3] + ldrb r0, [r4, #0x11] + strb r0, [r7, #4] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223666E +_02236640: + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x60 + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223666E +_02236660: + bl sub_0200F2AC + cmp r0, #0 + beq _0223666E + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223666E: + add r0, r4, #0 + add r0, #0x30 + bl ov65_022372B0 + ldr r0, [r4, #0x48] + bl sub_020219F8 + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02236684: .word 0x02239B80 +_02236688: .word 0x02239B08 + thumb_func_end ov65_02236548 + + thumb_func_start ov65_0223668C +ov65_0223668C: ; 0x0223668C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + add r0, r4, #0 + bl ov65_0223761C + add r0, r4, #0 + bl ov65_022377E8 + add r0, r4, #0 + bl ov65_02237504 + add r0, r4, #0 + mov r1, #0x60 + bl ov65_022367F8 + bl sub_0201DC3C + add r0, r5, #0 + bl sub_02006830 + mov r0, #0x61 + bl sub_0201807C + mov r0, #0x60 + bl sub_0201807C + ldr r0, _022366E0 ; =0x0000003F + bl sub_02006514 + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_022366E0: .word 0x0000003F + thumb_func_end ov65_0223668C + + thumb_func_start ov65_022366E4 +ov65_022366E4: ; 0x022366E4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrb r0, [r5, #4] + add r4, r1, #0 + cmp r0, #0 + bne _02236742 + ldrh r6, [r4] + bl sub_0203608C + cmp r6, r0 + ldr r0, [r4, #4] + bne _0223671C + cmp r0, #0 + beq _02236710 + cmp r0, #1 + beq _0223670A + cmp r0, #2 + beq _02236716 + pop {r4, r5, r6, pc} +_0223670A: + mov r0, #1 + strb r0, [r5, #0x13] + pop {r4, r5, r6, pc} +_02236710: + mov r0, #2 + strb r0, [r5, #0x13] + pop {r4, r5, r6, pc} +_02236716: + mov r0, #3 + strb r0, [r5, #0x13] + pop {r4, r5, r6, pc} +_0223671C: + cmp r0, #0 + beq _02236734 + cmp r0, #1 + beq _0223672A + cmp r0, #2 + beq _02236734 + pop {r4, r5, r6, pc} +_0223672A: + add r0, r5, r6 + mov r1, #1 + add r0, #0x28 + strb r1, [r0] + pop {r4, r5, r6, pc} +_02236734: + bl sub_02032AAC + cmp r0, #1 + bne _02236742 + ldrh r0, [r4] + bl sub_02032D98 +_02236742: + pop {r4, r5, r6, pc} + thumb_func_end ov65_022366E4 + + thumb_func_start ov65_02236744 +ov65_02236744: ; 0x02236744 + push {r3, lr} + add r1, r0, #0 + add r1, #0x2c + ldrb r1, [r1] + cmp r1, #0 + bne _0223675C + mov r1, #1 + add r0, #0x2c + strb r1, [r0] + mov r0, #0xd + bl sub_020364F0 +_0223675C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov65_02236744 + + thumb_func_start ov65_02236760 +ov65_02236760: ; 0x02236760 + ldrb r2, [r0, #4] + cmp r2, #1 + beq _0223677C + ldrb r2, [r1] + add r3, r0, #0 + add r0, #0x20 + strb r2, [r0] + ldrb r0, [r1, #1] + add r3, #0x20 + strb r0, [r3, #1] + ldrb r0, [r1, #2] + strb r0, [r3, #2] + ldrb r0, [r1, #3] + strb r0, [r3, #3] +_0223677C: + bx lr + ; .align 2, 0 + thumb_func_end ov65_02236760 + + thumb_func_start ov65_02236780 +ov65_02236780: ; 0x02236780 + push {r3, lr} + ldr r0, [r0, #0x30] + bl sub_0201C2B8 + bl sub_0201DCAC + bl sub_0200A858 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov65_02236780 + + thumb_func_start ov65_02236794 +ov65_02236794: ; 0x02236794 + push {r3, lr} + bl sub_0203608C + cmp r0, #0 + bne _022367A2 + mov r0, #1 + pop {r3, pc} +_022367A2: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov65_02236794 + + thumb_func_start ov65_022367A8 +ov65_022367A8: ; 0x022367A8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov65_02236820 + add r0, r5, #0 + add r0, #0x30 + add r1, r6, #0 + bl ov65_02236840 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_02236A28 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_02236C10 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_02236C7C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_02237034 + add r5, #0x30 + add r0, r5, #0 + add r1, r6, #0 + bl ov65_02236D50 + pop {r4, r5, r6, pc} + thumb_func_end ov65_022367A8 + + thumb_func_start ov65_022367F8 +ov65_022367F8: ; 0x022367F8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x30 + add r4, r1, #0 + bl ov65_02236E04 + add r0, r5, #0 + add r0, #0x30 + bl ov65_02236C5C + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + bl ov65_02236B90 + add r5, #0x30 + add r0, r5, #0 + bl ov65_022369F0 + pop {r3, r4, r5, pc} + thumb_func_end ov65_022367F8 + + thumb_func_start ov65_02236820 +ov65_02236820: ; 0x02236820 + push {r4, lr} + sub sp, #0x28 + ldr r4, _0223683C ; =0x02239AB0 + add r3, sp, #0 + mov r2, #5 +_0223682A: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223682A + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_0223683C: .word 0x02239AB0 + thumb_func_end ov65_02236820 + + thumb_func_start ov65_02236840 +ov65_02236840: ; 0x02236840 + push {r3, r4, r5, r6, lr} + sub sp, #0x74 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02018340 + add r3, sp, #0x64 + ldr r6, _022369E0 ; =0x02239A3C + str r0, [r5, #0] + add r2, r3, #0 + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r6, _022369E4 ; =0x02239A78 + add r3, sp, #0x48 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #0 + str r0, [r3, #0] + ldr r0, [r5, #0] + add r3, r1, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + add r3, r4, #0 + bl sub_02019690 + ldr r0, [r5, #0] + mov r1, #0 + bl sub_02019EBC + ldr r6, _022369E8 ; =0x02239A5C + add r3, sp, #0x2c + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r5, #0] + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02019EBC + ldr r6, _022369EC ; =0x02239A94 + add r3, sp, #0x10 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r5, #0] + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + ldr r0, [r5, #0] + mov r1, #2 + bl sub_02019EBC + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0x5c + add r1, r4, #0 + bl sub_02006C24 + mov r1, #0x20 + str r1, [sp] + mov r1, #0xd + mov r2, #0 + mov r3, #0xa0 + add r6, r0, #0 + str r4, [sp, #4] + bl sub_02007130 + mov r1, #0 + mov r0, #6 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r6, #0 + mov r1, #0xc + mov r3, #2 + bl sub_020070E8 + mov r3, #0x79 + lsl r3, r3, #2 + add r0, r6, #0 + mov r1, #0xe + mov r2, #0 + add r3, r5, r3 + str r4, [sp] + bl sub_020071D0 + mov r2, #0x1e + lsl r2, r2, #4 + str r0, [r5, r2] + add r2, #0x10 + add r0, r6, #0 + mov r1, #0x2c + add r2, r5, r2 + add r3, r4, #0 + bl sub_020071EC + mov r1, #0x7b + lsl r1, r1, #2 + str r0, [r5, r1] + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r6, #0 + mov r1, #0x2d + bl sub_020070E8 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r6, #0 + mov r1, #0x2e + bl sub_0200710C + add r0, r5, #0 + mov r1, #0 + bl ov65_022372EC + mov r0, #0x7d + mov r1, #3 + lsl r0, r0, #2 + strh r1, [r5, r0] + mov r1, #1 + add r0, r0, #2 + strh r1, [r5, r0] + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0x74 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022369E0: .word 0x02239A3C +_022369E4: .word 0x02239A78 +_022369E8: .word 0x02239A5C +_022369EC: .word 0x02239A94 + thumb_func_end ov65_02236840 + + thumb_func_start ov65_022369F0 +ov65_022369F0: ; 0x022369F0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r0, [r4, #0] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02019044 + ldr r0, [r4, #0] + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov65_022369F0 + + thumb_func_start ov65_02236A28 +ov65_02236A28: ; 0x02236A28 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0 + mov r1, #0x20 + add r4, r2, #0 + bl sub_02002E98 + ldr r0, [r6, #8] + bl sub_02025E44 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + str r4, [sp, #4] + mov r1, #1 + ldr r0, [r5, #0] + add r2, r1, #0 + mov r3, #2 + bl sub_0200DD0C + mov r0, #0 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0] + mov r1, #1 + mov r2, #0x1f + mov r3, #3 + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0] + mov r1, #2 + mov r2, #0x30 + mov r3, #4 + bl sub_0200DAA4 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r2, #1 + mov r1, #0x63 + lsl r1, r1, #2 + str r2, [sp, #0xc] + mov r0, #0x28 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, r5, r1 + mov r3, #2 + bl sub_0201A7E8 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x63 + lsl r0, r0, #2 + mov r1, #1 + add r0, r5, r0 + add r2, r1, #0 + mov r3, #2 + bl sub_0200E060 + mov r2, #1 + mov r1, #0x67 + lsl r1, r1, #2 + str r2, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + str r2, [sp, #0xc] + mov r0, #0x94 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, r5, r1 + add r3, r2, #0 + bl sub_0201A7E8 + mov r0, #0x67 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x67 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + mov r2, #0x1f + mov r3, #3 + bl sub_0200DC48 + mov r0, #0x10 + str r0, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r3, #2 + str r3, [sp, #8] + mov r2, #1 + str r2, [sp, #0xc] + mov r1, #0xca + str r1, [sp, #0x10] + add r1, #0xe2 + ldr r0, [r5, #0] + add r1, r5, r1 + bl sub_0201A7E8 + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #5 + str r0, [sp] + mov r0, #0x14 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r2, #1 + mov r1, #0x6f + lsl r1, r1, #2 + str r2, [sp, #0xc] + add r0, #0xfa + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, r5, r1 + add r3, r2, #0 + bl sub_0201A7E8 + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + mov r2, #0x1f + mov r3, #3 + bl sub_0200DC48 + mov r1, #5 + str r1, [sp] + mov r0, #7 + str r0, [sp, #4] + str r1, [sp, #8] + mov r2, #1 + ldr r1, _02236B8C ; =0x000001A2 + str r2, [sp, #0xc] + str r1, [sp, #0x10] + add r1, #0x2a + ldr r0, [r5, #0] + add r1, r5, r1 + mov r3, #0x17 + bl sub_0201A7E8 + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0xf + bl sub_0201ADA4 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02236B8C: .word 0x000001A2 + thumb_func_end ov65_02236A28 + + thumb_func_start ov65_02236B90 +ov65_02236B90: ; 0x02236B90 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov65_02236F38 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_0200E084 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A8FC + mov r0, #0x67 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_0200DC9C + mov r0, #0x67 + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A8FC + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A8FC + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_0200DC9C + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A8FC + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_0200DC9C + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A8FC + mov r0, #0x77 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02236C0C + add r1, r4, #0 + bl sub_02002154 +_02236C0C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02236B90 + + thumb_func_start ov65_02236C10 +ov65_02236C10: ; 0x02236C10 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r1, #0 + bl sub_0200B358 + str r0, [r5, #4] + ldr r2, _02236C58 ; =0x000002A2 + mov r0, #0 + mov r1, #0x1a + add r3, r6, #0 + bl sub_0200B144 + str r0, [r5, #8] + mov r0, #1 + lsl r0, r0, #8 + add r1, r6, #0 + bl sub_02023790 + str r0, [r5, #0xc] + mov r0, #1 + lsl r0, r0, #8 + add r1, r6, #0 + bl sub_02023790 + str r0, [r5, #0x10] + mov r0, #0xff + strb r0, [r5, #0x14] + ldr r0, [r4, #8] + bl sub_02025E44 + bl sub_02027AC0 + strh r0, [r5, #0x16] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02236C58: .word 0x000002A2 + thumb_func_end ov65_02236C10 + + thumb_func_start ov65_02236C5C +ov65_02236C5C: ; 0x02236C5C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + bl sub_020237BC + ldr r0, [r4, #0xc] + bl sub_020237BC + ldr r0, [r4, #8] + bl sub_0200B190 + ldr r0, [r4, #4] + bl sub_0200B3F0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02236C5C + + thumb_func_start ov65_02236C7C +ov65_02236C7C: ; 0x02236C7C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r4, r0, #0 + ldrb r0, [r5] + cmp r0, #3 + bhi _02236CC0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02236C96: ; jump table + .short _02236CC0 - _02236C96 - 2 ; case 0 + .short _02236C9E - _02236C96 - 2 ; case 1 + .short _02236CAA - _02236C96 - 2 ; case 2 + .short _02236CB6 - _02236C96 - 2 ; case 3 +_02236C9E: + mov r1, #0 + ldr r0, [r4, #4] + add r2, r1, #0 + bl sub_0200C0B0 + b _02236CC0 +_02236CAA: + ldr r0, [r4, #4] + mov r1, #0 + mov r2, #1 + bl sub_0200C0B0 + b _02236CC0 +_02236CB6: + ldr r0, [r4, #4] + mov r1, #0 + mov r2, #2 + bl sub_0200C0B0 +_02236CC0: + ldrb r2, [r5] + ldr r1, _02236D44 ; =0x02239E5C + ldr r0, [r4, #8] + ldrb r1, [r1, r2] + ldr r2, [r4, #0x10] + bl sub_0200B1B8 + ldr r0, [r4, #4] + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x10] + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r2, #0xff + str r2, [sp, #4] + ldr r0, _02236D48 ; =0x0001020F + add r2, #0x9d + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r4, r2 + ldr r2, [r4, #0xc] + add r3, r1, #0 + bl sub_0201D78C + mov r0, #0x67 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A9A4 + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A9A4 + ldr r0, [r4, #8] + ldr r2, [r4, #0xc] + mov r1, #0x80 + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + mov r2, #0xff + str r2, [sp, #4] + ldr r0, _02236D4C ; =0x00010200 + add r2, #0xad + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r4, r2 + ldr r2, [r4, #0xc] + add r3, r1, #0 + bl sub_0201D78C + mov r0, #0x6b + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A9A4 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02236D44: .word 0x02239E5C +_02236D48: .word 0x0001020F +_02236D4C: .word 0x00010200 + thumb_func_end ov65_02236C7C + + thumb_func_start ov65_02236D50 +ov65_02236D50: ; 0x02236D50 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r0, #0 + add r6, r1, #0 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7e + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x1f + str r3, [sp, #0xc] + add r2, r0, #0 + str r6, [sp, #0x10] + bl sub_0200A784 + ldr r4, _02236DFC ; =0x02239A4C + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + ldr r1, _02236E00 ; =0x00200010 + mov r2, #0x10 + str r6, [sp, #0x20] + bl sub_0201E88C + mov r0, #4 + add r1, r6, #0 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + ldr r1, _02236E00 ; =0x00200010 + mov r0, #1 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + add r1, r7, #0 + mov r0, #4 + add r1, #0x1c + add r2, r6, #0 + bl sub_020095C4 + str r0, [r7, #0x18] + mov r4, #0 + add r5, r7, #0 +_02236DBC: + mov r0, #4 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02009714 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r5, r1] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02236DBC + mov r0, #4 + add r1, r6, #0 + bl ov63_0222BE18 + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [r7, r1] + str r6, [sp] + ldr r0, [r7, #0x18] + mov r1, #0 + mov r2, #4 + mov r3, #1 + bl ov63_0222CCE4 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r7, r1] + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02236DFC: .word 0x02239A4C +_02236E00: .word 0x00200010 + thumb_func_end ov65_02236D50 + + thumb_func_start ov65_02236E04 +ov65_02236E04: ; 0x02236E04 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov63_0222CD9C + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl ov63_0222BE58 + ldr r0, [r5, #0x18] + bl sub_02021964 + mov r6, #0x51 + mov r4, #0 + lsl r6, r6, #2 +_02236E28: + ldr r0, [r5, r6] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02236E28 + bl sub_0201E958 + bl sub_0201F8B4 + bl sub_0200A878 + pop {r4, r5, r6, pc} + thumb_func_end ov65_02236E04 + + thumb_func_start ov65_02236E44 +ov65_02236E44: ; 0x02236E44 + push {r3, lr} + str r3, [sp] + mov r3, #0 + bl ov65_02236E50 + pop {r3, pc} + thumb_func_end ov65_02236E44 + + thumb_func_start ov65_02236E50 +ov65_02236E50: ; 0x02236E50 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldrb r0, [r5, #0x14] + add r4, r1, #0 + add r6, r3, #0 + str r2, [sp, #0x10] + cmp r0, #0xff + beq _02236E74 + bl sub_0201D724 + cmp r0, #0 + beq _02236E74 + ldrb r0, [r5, #0x14] + bl sub_0201D730 + mov r0, #0xff + strb r0, [r5, #0x14] +_02236E74: + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #1 + ldr r1, [sp, #0x28] + lsl r0, r0, #8 + bl sub_02023790 + add r7, r0, #0 + ldr r0, [r5, #8] + ldr r1, [sp, #0x10] + add r2, r7, #0 + bl sub_0200B1B8 + ldr r0, [r5, #4] + ldr r1, [r5, #0xc] + add r2, r7, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + ldrh r0, [r5, #0x16] + mov r1, #1 + str r0, [sp, #4] + ldr r0, _02236EF4 ; =0x0001020F + str r0, [sp, #8] + str r3, [sp, #0xc] + mov r0, #0x63 + lsl r0, r0, #2 + ldr r2, [r5, #0xc] + add r0, r5, r0 + bl sub_0201D78C + strb r0, [r5, #0x14] + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [r4, #8] + bl sub_02025E44 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x28] + mov r1, #1 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r2, r1, #0 + mov r3, #2 + bl sub_0200DD0C + strb r6, [r5, #0x15] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02236EF4: .word 0x0001020F + thumb_func_end ov65_02236E50 + + thumb_func_start ov65_02236EF8 +ov65_02236EF8: ; 0x02236EF8 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #0x14] + cmp r0, #0xff + bne _02236F10 + ldrb r0, [r4, #0x15] + cmp r0, #0 + beq _02236F22 + sub r0, r0, #1 + strb r0, [r4, #0x15] + mov r0, #0 + pop {r4, pc} +_02236F10: + bl sub_0201D724 + cmp r0, #0 + bne _02236F22 + ldrb r0, [r4, #0x14] + cmp r0, #0xff + beq _02236F22 + mov r0, #0xff + strb r0, [r4, #0x14] +_02236F22: + ldrb r0, [r4, #0x14] + cmp r0, #0xff + bne _02236F32 + ldrb r0, [r4, #0x15] + cmp r0, #0 + bne _02236F32 + mov r0, #1 + pop {r4, pc} +_02236F32: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02236EF8 + + thumb_func_start ov65_02236F38 +ov65_02236F38: ; 0x02236F38 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #0x14] + cmp r0, #0xff + beq _02236F54 + bl sub_0201D724 + cmp r0, #0 + beq _02236F50 + ldrb r0, [r4, #0x14] + bl sub_0201D730 +_02236F50: + mov r0, #0xff + strb r0, [r4, #0x14] +_02236F54: + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A9A4 + mov r0, #0 + strb r0, [r4, #0x15] + pop {r4, pc} + thumb_func_end ov65_02236F38 + + thumb_func_start ov65_02236F70 +ov65_02236F70: ; 0x02236F70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #1 + add r4, r3, #0 + str r1, [sp, #0x10] + lsl r0, r0, #8 + add r1, r4, #0 + str r2, [sp, #0x14] + bl sub_02023790 + add r6, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + add r1, r4, #0 + bl sub_02023790 + add r7, r0, #0 + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + add r0, r5, #0 + mov r3, #0 + str r4, [sp] + bl ov65_0223726C + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + str r4, [sp] + add r0, r5, #0 + mov r3, #1 + bl ov65_02237284 + ldr r0, [r5, #8] + mov r1, #0x83 + add r2, r6, #0 + bl sub_0200B1B8 + ldr r0, [r5, #4] + add r1, r7, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0xf + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + mov r2, #0xff + str r2, [sp, #4] + ldr r0, _02237014 ; =0x0001020F + add r2, #0xcd + str r0, [sp, #8] + add r0, r5, r2 + add r2, r7, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + mov r2, #0x1f + mov r3, #3 + bl sub_0200DC48 + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02237014: .word 0x0001020F + thumb_func_end ov65_02236F70 + + thumb_func_start ov65_02237018 +ov65_02237018: ; 0x02237018 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl sub_0200DC9C + mov r0, #0x73 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201AD10 + pop {r4, pc} + thumb_func_end ov65_02237018 + + thumb_func_start ov65_02237034 +ov65_02237034: ; 0x02237034 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp, #4] + add r7, r1, #0 + add r5, r2, #0 + bl sub_02032AAC + cmp r0, #0 + beq _02237096 + ldr r6, [sp, #4] + mov r4, #0 + add r6, #0x30 +_0223704C: + cmp r4, #0 + bne _0223706A + add r0, r4, #0 + bl sub_02032DE0 + cmp r0, #1 + bne _0223706A + ldr r0, [sp, #4] + add r1, r6, #0 + add r2, r7, #0 + add r3, r4, #0 + str r5, [sp] + bl ov65_0223709C + b _02237090 +_0223706A: + add r0, r4, #0 + bl sub_02032E00 + cmp r0, #1 + bne _02237084 + ldr r0, [sp, #4] + add r1, r6, #0 + add r2, r7, #0 + add r3, r4, #0 + str r5, [sp] + bl ov65_0223709C + b _02237090 +_02237084: + add r0, r6, #0 + add r1, r7, #0 + add r2, r4, #0 + add r3, r5, #0 + bl ov65_022371FC +_02237090: + add r4, r4, #1 + cmp r4, #4 + blt _0223704C +_02237096: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_02237034 + + thumb_func_start ov65_0223709C +ov65_0223709C: ; 0x0223709C + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + ldr r7, [sp, #0x40] + str r0, [sp, #0x1c] + mov r0, #1 + add r5, r1, #0 + lsl r0, r0, #8 + add r1, r7, #0 + str r2, [sp, #0x20] + add r4, r3, #0 + bl sub_02023790 + str r0, [sp, #0x28] + mov r0, #1 + lsl r0, r0, #8 + add r1, r7, #0 + bl sub_02023790 + str r0, [sp, #0x24] + ldr r1, [sp, #0x20] + str r7, [sp] + add r0, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov65_0223726C + ldr r0, [r5, #8] + ldr r2, [sp, #0x28] + mov r1, #0x81 + bl sub_0200B1B8 + ldr r0, [r5, #4] + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x28] + bl sub_0200C388 + mov r0, #0xa0 + str r0, [sp] + mov r0, #0x10 + lsl r6, r4, #4 + str r0, [sp, #4] + mov r0, #0x6f + lsl r0, r0, #2 + lsl r3, r6, #0x10 + add r0, r5, r0 + mov r1, #0xf + mov r2, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + mov r1, #0 + str r6, [sp] + mov r2, #0xff + str r2, [sp, #4] + ldr r0, _022371F8 ; =0x0001020F + add r2, #0xbd + str r0, [sp, #8] + add r0, r5, r2 + ldr r2, [sp, #0x24] + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r1, [sp, #0x20] + str r7, [sp] + add r0, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov65_02237284 + ldr r0, [r5, #8] + ldr r2, [sp, #0x28] + mov r1, #0x82 + bl sub_0200B1B8 + ldr r0, [r5, #4] + ldr r1, [sp, #0x24] + ldr r2, [sp, #0x28] + bl sub_0200C388 + str r6, [sp] + mov r2, #0xff + str r2, [sp, #4] + ldr r0, _022371F8 ; =0x0001020F + add r2, #0xbd + str r0, [sp, #8] + add r0, r5, r2 + mov r1, #0 + ldr r2, [sp, #0x24] + mov r3, #0x48 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A9A4 + bl sub_0203608C + cmp r4, r0 + bne _0223717C + ldr r0, [sp, #0x1c] + ldr r0, [r0, #0] + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #0 + beq _02237178 + mov r2, #2 + b _0223718E +_02237178: + mov r2, #1 + b _0223718E +_0223717C: + ldr r0, [sp, #0x1c] + add r0, r0, r4 + add r0, #0x20 + ldrb r0, [r0] + cmp r0, #0 + beq _0223718C + mov r2, #2 + b _0223718E +_0223718C: + mov r2, #1 +_0223718E: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + lsl r1, r4, #1 + add r4, r1, #5 + mov r1, #2 + str r1, [sp] + add r3, r0, #0 + lsl r2, r2, #0x19 + str r1, [sp, #4] + add r3, #0xc + str r3, [sp, #8] + lsr r2, r2, #0x18 + str r2, [sp, #0xc] + mov r2, #0 + str r2, [sp, #0x10] + ldrh r2, [r0] + lsl r3, r4, #0x18 + lsr r3, r3, #0x18 + lsl r2, r2, #0x15 + lsr r2, r2, #0x18 + str r2, [sp, #0x14] + ldrh r0, [r0, #2] + mov r2, #0x12 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] + ldr r0, [r5, #0] + bl sub_020198E8 + mov r1, #2 + str r1, [sp] + lsl r3, r4, #0x18 + str r1, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + ldr r0, [r5, #0] + mov r2, #0x12 + lsr r3, r3, #0x18 + bl sub_02019E2C + ldr r0, [r5, #0] + mov r1, #2 + bl sub_0201C3C0 + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x24] + bl sub_020237BC + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022371F8: .word 0x0001020F + thumb_func_end ov65_0223709C + + thumb_func_start ov65_022371FC +ov65_022371FC: ; 0x022371FC + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0xa0 + add r4, r2, #0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x6f + lsl r0, r0, #2 + lsl r3, r4, #0x14 + add r0, r5, r0 + mov r1, #0xf + mov r2, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #2 + str r1, [sp] + add r2, r0, #0 + lsl r3, r4, #1 + add r3, r3, #5 + lsl r3, r3, #0x18 + str r1, [sp, #4] + add r2, #0xc + str r2, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + str r2, [sp, #0x10] + ldrh r2, [r0] + lsr r3, r3, #0x18 + lsl r2, r2, #0x15 + lsr r2, r2, #0x18 + str r2, [sp, #0x14] + ldrh r0, [r0, #2] + mov r2, #0x12 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] + ldr r0, [r5, #0] + bl sub_020198E8 + ldr r0, [r5, #0] + mov r1, #2 + bl sub_0201C3C0 + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r5, r0 + bl sub_0201A9A4 + add sp, #0x1c + pop {r4, r5, pc} + thumb_func_end ov65_022371FC + + thumb_func_start ov65_0223726C +ov65_0223726C: ; 0x0223726C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r2, #0 + add r4, r3, #0 + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, [r5, #4] + add r1, r4, #0 + bl sub_0200B498 + pop {r3, r4, r5, pc} + thumb_func_end ov65_0223726C + + thumb_func_start ov65_02237284 +ov65_02237284: ; 0x02237284 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r0, r2, #0 + add r4, r3, #0 + bl sub_02032EE8 + bl sub_02025F24 + add r2, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #4] + add r1, r4, #0 + mov r3, #5 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02237284 + + thumb_func_start ov65_022372B0 +ov65_022372B0: ; 0x022372B0 + push {r4, lr} + mov r1, #0x7d + add r4, r0, #0 + lsl r1, r1, #2 + ldrsh r2, [r4, r1] + cmp r2, #0 + bgt _022372E0 + add r1, r1, #2 + ldrsh r1, [r4, r1] + bl ov65_022372EC + mov r0, #0x7d + mov r1, #3 + lsl r0, r0, #2 + strh r1, [r4, r0] + add r0, r0, #2 + ldrsh r0, [r4, r0] + mov r1, #0x12 + add r0, r0, #1 + bl sub_020E1F6C + ldr r0, _022372E8 ; =0x000001F6 + strh r1, [r4, r0] + pop {r4, pc} +_022372E0: + sub r0, r2, #1 + strh r0, [r4, r1] + pop {r4, pc} + nop +_022372E8: .word 0x000001F6 + thumb_func_end ov65_022372B0 + + thumb_func_start ov65_022372EC +ov65_022372EC: ; 0x022372EC + push {r4, lr} + mov r2, #0x1f + add r3, r0, #0 + lsl r2, r2, #4 + ldr r2, [r3, r2] + add r4, r1, #0 + ldr r3, [r2, #0xc] + ldr r2, _02237318 ; =0x02239C04 + mov r0, #0xf + ldrb r2, [r2, r4] + mov r1, #0 + lsl r2, r2, #5 + add r2, r3, r2 + mov r3, #0x20 + bl sub_0201DC68 + cmp r0, #0 + bne _02237314 + bl sub_02022974 +_02237314: + pop {r4, pc} + nop +_02237318: .word 0x02239C04 + thumb_func_end ov65_022372EC + + thumb_func_start ov65_0223731C +ov65_0223731C: ; 0x0223731C + push {r4, lr} + add r4, r0, #0 + ldr r2, [r4, #0] + add r0, r2, #0 + add r0, #0x22 + ldrb r1, [r0] + mov r0, #1 + add r2, #0x22 + sub r0, r0, r1 + strb r0, [r2] + ldr r1, [r4, #0] + add r0, r1, #0 + add r0, #0x22 + ldrb r0, [r0] + add r1, #0x21 + strb r0, [r1] + ldr r0, [r4, #0] + add r0, #0x21 + ldrb r0, [r0] + bl ov4_021D2584 + ldr r0, [r4, #0] + mov r1, #0x24 + bl ov4_021D222C + ldr r0, [r4, #0] + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #1 + bne _02237360 + add r0, r4, #0 + bl ov65_02237520 + b _02237366 +_02237360: + add r0, r4, #0 + bl ov65_02237534 +_02237366: + ldr r0, [r4, #0] + add r0, #0x22 + ldrb r0, [r0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_0223731C + + thumb_func_start ov65_02237370 +ov65_02237370: ; 0x02237370 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldrb r0, [r4, #4] + cmp r0, #0 + ldrb r0, [r4, #5] + beq _022373A4 + add r0, #0xe5 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #2 + bls _02237428 + bl sub_020380E4 + cmp r0, #2 + bgt _022373BA + add r0, r4, #0 + bl ov65_02237548 + cmp r0, #1 + bgt _022373BA + add r0, r4, #0 + bl ov65_02237450 + cmp r0, #0 + bne _022373BA + pop {r3, r4, r5, r6, r7, pc} +_022373A4: + cmp r0, #0xf + beq _02237428 + cmp r0, #0x10 + beq _02237428 + cmp r0, #0x11 + beq _02237428 + add r0, #0xfa + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bls _02237428 +_022373BA: + add r0, r4, #0 + bl ov65_02237A54 + add r6, r0, #0 + add r0, r4, #0 + bl ov65_02237628 + add r7, r0, #0 + add r0, r4, #0 + bl ov65_02237548 + add r5, r0, #0 + bl sub_02035E18 + cmp r5, r0 + ble _022373DE + mov r5, #1 + b _022373E0 +_022373DE: + mov r5, #0 +_022373E0: + bl sub_020380E4 + cmp r0, #3 + bge _02237418 + bl sub_020383E8 + cmp r0, #0 + bne _02237418 + bl sub_02038284 + cmp r0, #0 + bne _02237418 + mov r0, #0 + bl sub_02035D78 + cmp r0, #0 + beq _02237418 + add r0, r4, #0 + bl ov65_02237450 + cmp r0, #0 + beq _02237418 + cmp r5, #1 + beq _02237418 + cmp r6, #1 + beq _02237418 + cmp r7, #1 + bne _02237428 +_02237418: + ldrb r0, [r4, #4] + cmp r0, #0 + beq _02237424 + mov r0, #0x1b + strb r0, [r4, #5] + pop {r3, r4, r5, r6, r7, pc} +_02237424: + mov r0, #0xf + strb r0, [r4, #5] +_02237428: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_02237370 + + thumb_func_start ov65_0223742C +ov65_0223742C: ; 0x0223742C + push {r4, lr} + add r4, r0, #0 + bl sub_020380E4 + cmp r0, #3 + bgt _02237448 + bl sub_02038284 + cmp r0, #0 + bne _02237448 + bl sub_020383E8 + cmp r0, #0 + beq _0223744C +_02237448: + mov r0, #0xf + strb r0, [r4, #5] +_0223744C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_0223742C + + thumb_func_start ov65_02237450 +ov65_02237450: ; 0x02237450 + push {r3, lr} + bl sub_02035E18 + cmp r0, #0 + ble _0223745E + mov r0, #1 + pop {r3, pc} +_0223745E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov65_02237450 + + thumb_func_start ov65_02237464 +ov65_02237464: ; 0x02237464 + push {r3, r4, r5, lr} + add r4, r1, #0 + bl sub_020380A0 + add r5, r0, #0 + cmp r5, #1 + bne _02237494 + cmp r4, #3 + bhi _02237494 + add r0, r4, r4 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02237482: ; jump table + .short _0223748A - _02237482 - 2 ; case 0 + .short _02237490 - _02237482 - 2 ; case 1 + .short _02237490 - _02237482 - 2 ; case 2 + .short _02237490 - _02237482 - 2 ; case 3 +_0223748A: + bl sub_02038B00 + b _02237494 +_02237490: + bl sub_02038B20 +_02237494: + add r0, r5, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov65_02237464 + + thumb_func_start ov65_02237498 +ov65_02237498: ; 0x02237498 + ldrb r1, [r1] + cmp r1, #3 + bhi _022374D0 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022374AA: ; jump table + .short _022374B2 - _022374AA - 2 ; case 0 + .short _022374BA - _022374AA - 2 ; case 1 + .short _022374C2 - _022374AA - 2 ; case 2 + .short _022374CA - _022374AA - 2 ; case 3 +_022374B2: + ldr r1, [r0, #0] + mov r2, #0x12 + strb r2, [r1, #0x1b] + b _022374D0 +_022374BA: + ldr r1, [r0, #0] + mov r2, #0x16 + strb r2, [r1, #0x1b] + b _022374D0 +_022374C2: + ldr r1, [r0, #0] + mov r2, #0x18 + strb r2, [r1, #0x1b] + b _022374D0 +_022374CA: + ldr r1, [r0, #0] + mov r2, #0x1a + strb r2, [r1, #0x1b] +_022374D0: + ldr r3, _022374D8 ; =ov4_021D222C + ldr r0, [r0, #0] + mov r1, #0x24 + bx r3 + ; .align 2, 0 +_022374D8: .word ov4_021D222C + thumb_func_end ov65_02237498 + + thumb_func_start ov65_022374DC +ov65_022374DC: ; 0x022374DC + push {r4, lr} + add r4, r0, #0 + ldrb r1, [r4, #0x11] + cmp r1, #1 + bne _022374EA + mov r0, #0 + pop {r4, pc} +_022374EA: + bl ov65_02237450 + cmp r0, #1 + bne _022374FE + mov r0, #0x61 + bl ov4_021D1E74 + mov r0, #1 + strb r0, [r4, #0x11] + pop {r4, pc} +_022374FE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_022374DC + + thumb_func_start ov65_02237504 +ov65_02237504: ; 0x02237504 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #0x11] + cmp r0, #0 + bne _02237512 + mov r0, #0 + pop {r4, pc} +_02237512: + bl ov4_021D1F18 + mov r0, #0 + strb r0, [r4, #0x11] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237504 + + thumb_func_start ov65_02237520 +ov65_02237520: ; 0x02237520 + push {r3, lr} + bl ov65_022374DC + cmp r0, #0 + beq _02237532 + bl sub_020041FC + bl sub_02004A84 +_02237532: + pop {r3, pc} + thumb_func_end ov65_02237520 + + thumb_func_start ov65_02237534 +ov65_02237534: ; 0x02237534 + push {r3, lr} + bl ov65_02237504 + cmp r0, #0 + beq _02237546 + mov r0, #0 + mov r1, #0x78 + bl sub_02004A68 +_02237546: + pop {r3, pc} + thumb_func_end ov65_02237534 + + thumb_func_start ov65_02237548 +ov65_02237548: ; 0x02237548 + ldr r3, _0223754C ; =sub_02032E64 + bx r3 + ; .align 2, 0 +_0223754C: .word sub_02032E64 + thumb_func_end ov65_02237548 + + thumb_func_start ov65_02237550 +ov65_02237550: ; 0x02237550 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r7, #1 + bl sub_0203608C + sub r4, r0, #1 + bmi _02237586 +_02237560: + add r0, r4, #0 + bl sub_02032DC4 + cmp r0, #1 + bne _02237576 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022376A0 + b _02237582 +_02237576: + add r0, r4, #0 + bl sub_02032E00 + cmp r0, #0 + bne _02237582 + mov r7, #0 +_02237582: + sub r4, r4, #1 + bpl _02237560 +_02237586: + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_02237550 + + thumb_func_start ov65_0223758C +ov65_0223758C: ; 0x0223758C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r0, #0 + str r0, [sp, #4] + mov r5, #1 + mov r6, #0x16 + add r7, sp, #0 + add r4, sp, #0 +_0223759C: + add r0, r5, #0 + bl sub_02032DC4 + cmp r0, #1 + bne _022375C0 + add r0, r6, #0 + add r1, r7, #0 + mov r2, #8 + strh r5, [r4] + bl sub_020359DC + cmp r0, #1 + beq _022375BA + bl sub_02022974 +_022375BA: + add r0, r5, #0 + bl sub_02032D98 +_022375C0: + add r5, r5, #1 + cmp r5, #4 + blt _0223759C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_0223758C + + thumb_func_start ov65_022375CC +ov65_022375CC: ; 0x022375CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r0, #0 + str r0, [sp, #4] + mov r5, #1 + mov r6, #0x16 + add r7, sp, #0 + add r4, sp, #0 +_022375DC: + add r0, r5, #0 + bl sub_02032DE0 + cmp r0, #1 + bne _02237600 + add r0, r6, #0 + add r1, r7, #0 + mov r2, #8 + strh r5, [r4] + bl sub_020359DC + cmp r0, #1 + beq _022375FA + bl sub_02022974 +_022375FA: + add r0, r5, #0 + bl sub_02032D98 +_02237600: + add r5, r5, #1 + cmp r5, #4 + blt _022375DC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_022375CC + + thumb_func_start ov65_0223760C +ov65_0223760C: ; 0x0223760C + ldr r3, _02237614 ; =ov4_021D1120 + add r1, r0, #0 + ldr r0, _02237618 ; =ov65_02237654 + bx r3 + ; .align 2, 0 +_02237614: .word ov4_021D1120 +_02237618: .word ov65_02237654 + thumb_func_end ov65_0223760C + + thumb_func_start ov65_0223761C +ov65_0223761C: ; 0x0223761C + ldr r3, _02237624 ; =ov4_021D1120 + mov r0, #0 + add r1, r0, #0 + bx r3 + ; .align 2, 0 +_02237624: .word ov4_021D1120 + thumb_func_end ov65_0223761C + + thumb_func_start ov65_02237628 +ov65_02237628: ; 0x02237628 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0 + add r6, r0, #0 + add r4, r7, #0 +_02237630: + add r5, r6, r4 + ldrb r0, [r5, #0x14] + cmp r0, #1 + bne _0223764A + ldrb r0, [r5, #0x18] + bl sub_02032E00 + cmp r0, #1 + bne _02237644 + mov r7, #1 +_02237644: + mov r0, #0 + strb r0, [r5, #0x14] + strb r0, [r5, #0x18] +_0223764A: + add r4, r4, #1 + cmp r4, #4 + blt _02237630 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_02237628 + + thumb_func_start ov65_02237654 +ov65_02237654: ; 0x02237654 + mov r2, #1 + add r1, r1, r0 + strb r2, [r1, #0x14] + strb r0, [r1, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov65_02237654 + + thumb_func_start ov65_02237660 +ov65_02237660: ; 0x02237660 + push {r3, r4, r5, r6} + mov r4, #0 + add r3, r4, #0 + mov r2, #1 +_02237668: + add r6, r0, r3 + add r1, r6, #0 + add r1, #0x20 + ldrb r5, [r1] + ldrb r1, [r6, #0x1c] + cmp r1, r5 + beq _02237678 + add r4, r2, #0 +_02237678: + add r3, r3, #1 + strb r5, [r6, #0x1c] + cmp r3, #4 + blt _02237668 + add r1, r0, #0 + add r1, #0x24 + ldrb r1, [r1] + cmp r1, #0 + beq _02237692 + mov r1, #0 + add r0, #0x24 + strb r1, [r0] + mov r4, #1 +_02237692: + add r0, r4, #0 + pop {r3, r4, r5, r6} + bx lr + thumb_func_end ov65_02237660 + + thumb_func_start ov65_02237698 +ov65_02237698: ; 0x02237698 + mov r1, #1 + add r0, #0x24 + strb r1, [r0] + bx lr + thumb_func_end ov65_02237698 + + thumb_func_start ov65_022376A0 +ov65_022376A0: ; 0x022376A0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r6, r2, #0 + bl sub_02032E00 + cmp r0, #0 + bne _022376CE + add r0, r4, #0 + bl sub_02032E1C + add r0, r5, #0 + add r0, #0x25 + strb r4, [r0] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022376D0 + add r0, r5, #0 + bl ov65_02237698 +_022376CE: + pop {r4, r5, r6, pc} + thumb_func_end ov65_022376A0 + + thumb_func_start ov65_022376D0 +ov65_022376D0: ; 0x022376D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + add r5, r0, #0 + mov r0, #0xc + add r4, r6, #0 + mul r4, r0 + mov r0, #0x63 + lsl r0, r0, #2 + add r7, r5, r0 + ldr r0, [r7, r4] + str r2, [sp] + cmp r0, #0 + bne _0223779C + ldr r1, _022377A0 ; =0x02239AD8 + ldrh r2, [r1, r4] + add r0, r1, r4 + add r1, sp, #4 + strh r2, [r1] + ldrh r2, [r0, #2] + strh r2, [r1, #2] + ldrh r2, [r0, #4] + strh r2, [r1, #4] + ldrh r2, [r0, #6] + strh r2, [r1, #6] + ldrh r2, [r0, #8] + strh r2, [r1, #8] + ldrh r0, [r0, #0xa] + strh r0, [r1, #0xa] + bl sub_0203608C + cmp r6, r0 + beq _0223772C + add r0, r6, #0 + bl sub_02032EE8 + add r6, r0, #0 + bne _02237720 + bl sub_02022974 +_02237720: + add r0, r6, #0 + bl sub_02025F8C + add r1, sp, #4 + strh r0, [r1, #0xa] + b _02237740 +_0223772C: + ldr r0, [r5, #0] + ldrb r0, [r0, #0x1e] + cmp r0, #0 + add r0, sp, #4 + bne _0223773C + mov r1, #0 + strh r1, [r0, #0xa] + b _02237740 +_0223773C: + mov r1, #0x61 + strh r1, [r0, #0xa] +_02237740: + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, sp, #4 + bl ov63_0222BEC0 + str r0, [r7, r4] + mov r0, #0x62 + add r1, sp, #4 + lsl r0, r0, #2 + ldrh r1, [r1, #0xa] + ldr r0, [r5, r0] + bl ov63_0222CE18 + cmp r0, #0 + bne _02237772 + mov r0, #0x62 + add r1, sp, #4 + lsl r0, r0, #2 + ldrh r1, [r1, #0xa] + ldr r0, [r5, r0] + ldr r3, [sp] + mov r2, #2 + bl ov63_0222CDE8 +_02237772: + mov r0, #0x19 + lsl r0, r0, #4 + add r6, r5, r0 + sub r0, #8 + ldr r0, [r5, r0] + ldr r1, [r7, r4] + ldr r3, [sp] + mov r2, #0 + bl ov63_0222CE44 + str r0, [r6, r4] + ldr r0, [r6, r4] + mov r1, #0 + bl ov63_0222D008 + mov r0, #0x65 + lsl r0, r0, #2 + add r1, r5, r0 + ldrh r0, [r1, r4] + add r0, r0, #1 + strh r0, [r1, r4] +_0223779C: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022377A0: .word 0x02239AD8 + thumb_func_end ov65_022376D0 + + thumb_func_start ov65_022377A4 +ov65_022377A4: ; 0x022377A4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0x63 + lsl r0, r0, #2 + mov r6, #0 + add r4, r7, r0 + add r5, r7, #0 +_022377B2: + mov r2, #0x65 + lsl r2, r2, #2 + ldrh r2, [r5, r2] + add r0, r7, #0 + add r1, r4, #0 + lsl r3, r2, #2 + ldr r2, _022377E4 ; =0x02239A2C + ldr r2, [r2, r3] + blx r2 + add r6, r6, #1 + add r4, #0xc + add r5, #0xc + cmp r6, #4 + blt _022377B2 + mov r0, #0x61 + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl ov63_0222BE84 + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl ov63_0222CEE4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022377E4: .word 0x02239A2C + thumb_func_end ov65_022377A4 + + thumb_func_start ov65_022377E8 +ov65_022377E8: ; 0x022377E8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x62 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov63_0222CE24 + mov r0, #0x63 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + mov r2, #0x30 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_022377E8 + + thumb_func_start ov65_02237808 +ov65_02237808: ; 0x02237808 + push {r3, lr} + sub sp, #8 + add r0, sp, #0 + strh r1, [r0] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x16 + add r1, sp, #0 + mov r2, #8 + bl sub_020359DC + cmp r0, #1 + beq _02237826 + bl sub_02022974 +_02237826: + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov65_02237808 + + thumb_func_start ov65_0223782C +ov65_0223782C: ; 0x0223782C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_02237832: + add r0, r5, #0 + add r0, #0x25 + ldrb r0, [r0] + add r0, r0, #1 + cmp r0, r4 + bge _02237856 + add r0, r4, #0 + bl sub_02032DC4 + cmp r0, #1 + bne _02237856 + add r0, r5, #0 + add r1, r4, #0 + bl ov65_02237808 + add r0, r4, #0 + bl sub_02032D98 +_02237856: + add r4, r4, #1 + cmp r4, #4 + blt _02237832 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_0223782C + + thumb_func_start ov65_02237860 +ov65_02237860: ; 0x02237860 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r5, r0, #0 + add r6, r1, #0 + add r7, r4, #0 +_0223786A: + add r0, r5, r4 + add r0, #0x28 + ldrb r0, [r0] + cmp r0, #1 + bne _02237892 + add r0, r4, #0 + bl sub_02032DE0 + cmp r0, #1 + bne _02237892 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022376A0 + add r0, r5, r4 + add r0, #0x28 + strb r7, [r0] + mov r0, #1 + strb r0, [r5, #0x12] +_02237892: + add r4, r4, #1 + cmp r4, #4 + blt _0223786A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov65_02237860 + + thumb_func_start ov65_0223789C +ov65_0223789C: ; 0x0223789C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022378AE + bl sub_02022974 +_022378AE: + mov r0, #0x6f + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl sub_0200E7FC + mov r1, #0x86 + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_0223789C + + thumb_func_start ov65_022378C4 +ov65_022378C4: ; 0x022378C4 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r4, r1, #0 + add r6, r2, #0 + cmp r0, #0 + beq _02237902 + bl sub_0200EBA0 + mov r0, #0x86 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r0, [r4, #8] + bl sub_02025E44 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + str r6, [sp, #4] + mov r1, #1 + ldr r0, [r5, #0x30] + add r2, r1, #0 + mov r3, #2 + bl sub_0200DD0C +_02237902: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_022378C4 + + thumb_func_start ov65_02237908 +ov65_02237908: ; 0x02237908 + bx lr + ; .align 2, 0 + thumb_func_end ov65_02237908 + + thumb_func_start ov65_0223790C +ov65_0223790C: ; 0x0223790C + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + mov r1, #0 + bl ov63_0222CFA4 + ldr r0, [r4, #4] + bl ov63_0222CFA8 + ldr r0, [r4, #4] + mov r1, #1 + bl ov63_0222D008 + mov r0, #2 + strh r0, [r4, #8] + ldr r0, [r4, #0] + mov r1, #6 + bl ov63_0222BF90 + ldr r1, _0223793C ; =0x02239A20 + ldrb r0, [r1, r0] + add r0, #0x10 + strh r0, [r4, #0xa] + pop {r4, pc} + ; .align 2, 0 +_0223793C: .word 0x02239A20 + thumb_func_end ov65_0223790C + + thumb_func_start ov65_02237940 +ov65_02237940: ; 0x02237940 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + bl ov63_0222CFB4 + mov r0, #0xa + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, #0xa] + ldrsh r0, [r4, r0] + cmp r0, #0 + bgt _0223796A + ldr r0, [r4, #4] + bl ov63_0222CFC0 + ldr r0, [r4, #4] + mov r1, #1 + bl ov63_0222CFA4 + mov r0, #3 + strh r0, [r4, #8] +_0223796A: + pop {r4, pc} + thumb_func_end ov65_02237940 + + thumb_func_start ov65_0223796C +ov65_0223796C: ; 0x0223796C + bx lr + ; .align 2, 0 + thumb_func_end ov65_0223796C + + thumb_func_start ov65_02237970 +ov65_02237970: ; 0x02237970 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + bl sub_02032AAC + cmp r0, #0 + beq _02237A0C + bl sub_02032E64 + add r7, r0, #0 + bl sub_02032D84 + cmp r0, #0 + beq _0223799E + mov r0, #5 + bl sub_02036254 + cmp r0, #0 + bne _0223799E + mov r0, #1 + str r0, [sp] +_0223799E: + mov r4, #0 + cmp r7, #0 + ble _022379E6 +_022379A4: + cmp r4, #0 + bne _022379B0 + ldr r0, [r5, #0] + add r0, #0x21 + ldrb r0, [r0] + b _022379CC +_022379B0: + add r0, r4, #0 + bl sub_02032F40 + add r6, r0, #0 + cmp r6, #0x20 + bne _022379C0 + bl sub_02022974 +_022379C0: + mov r0, #0x24 + ldr r1, [r5, #0] + mul r0, r6 + add r0, r1, r0 + add r0, #0x45 + ldrb r0, [r0] +_022379CC: + add r1, r5, r4 + add r1, #0x20 + ldrb r1, [r1] + cmp r0, r1 + beq _022379DA + mov r1, #1 + str r1, [sp] +_022379DA: + add r1, r5, r4 + add r1, #0x20 + add r4, r4, #1 + strb r0, [r1] + cmp r4, r7 + blt _022379A4 +_022379E6: + ldr r0, [sp] + cmp r0, #1 + bne _02237A0C + add r2, r5, #0 + add r5, #0x20 + ldrb r0, [r5] + add r1, sp, #4 + add r2, #0x20 + strb r0, [r1] + ldrb r0, [r2, #1] + strb r0, [r1, #1] + ldrb r0, [r2, #2] + strb r0, [r1, #2] + ldrb r0, [r2, #3] + mov r2, #4 + strb r0, [r1, #3] + mov r0, #0x18 + bl sub_020359DC +_02237A0C: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_02237970 + + thumb_func_start ov65_02237A10 +ov65_02237A10: ; 0x02237A10 + push {r3, lr} + mov r0, #0xd + bl sub_02036540 + cmp r0, #0 + beq _02237A20 + mov r0, #1 + pop {r3, pc} +_02237A20: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov65_02237A10 + + thumb_func_start ov65_02237A24 +ov65_02237A24: ; 0x02237A24 + push {r3, r4, r5, lr} + ldr r0, [r0, #8] + add r5, r1, #0 + bl sub_0202B628 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x1d + bl sub_0202C244 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #4 + bl sub_0202B758 + pop {r3, r4, r5, pc} + thumb_func_end ov65_02237A24 + + thumb_func_start ov65_02237A44 +ov65_02237A44: ; 0x02237A44 + mov r1, #1 + strb r1, [r0, #0x10] + ldr r1, _02237A50 ; =0x00000708 + str r1, [r0, #0xc] + bx lr + nop +_02237A50: .word 0x00000708 + thumb_func_end ov65_02237A44 + + thumb_func_start ov65_02237A54 +ov65_02237A54: ; 0x02237A54 + ldrb r1, [r0, #0x10] + cmp r1, #0 + bne _02237A5E + mov r0, #0 + bx lr +_02237A5E: + ldr r1, [r0, #0xc] + cmp r1, #0 + ble _02237A6C + sub r1, r1, #1 + str r1, [r0, #0xc] + mov r0, #0 + bx lr +_02237A6C: + mov r0, #1 + bx lr + thumb_func_end ov65_02237A54 + + thumb_func_start ov65_02237A70 +ov65_02237A70: ; 0x02237A70 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + add r4, r2, #0 + add r1, #0x21 + ldrb r1, [r1] + cmp r1, #1 + bne _02237A84 + bl ov65_02237520 +_02237A84: + mov r0, #0 + bl ov4_021D26EC + mov r0, #0 + mov r1, #1 + bl sub_020388F4 + bl sub_0203608C + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov65_022376D0 + mov r0, #1 + strb r0, [r5, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov65_02237A70 + + thumb_func_start ov65_02237AA8 +ov65_02237AA8: ; 0x02237AA8 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x6b + bl ov65_02236E44 + mov r0, #2 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237AA8 + + thumb_func_start ov65_02237AC0 +ov65_02237AC0: ; 0x02237AC0 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r0, #0x30 + add r6, r1, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _02237AD8 + add sp, #8 + mov r0, #0 + pop {r4, r5, r6, pc} +_02237AD8: + add r0, r5, #0 + bl ov65_02237450 + cmp r0, #1 + bne _02237B1E + bl sub_02032E44 + add r4, r0, #0 + cmp r4, #0xff + beq _02237B1E + ldrb r1, [r5, #6] + cmp r1, #0 + beq _02237B1E + bl sub_02032F40 + cmp r0, #0x20 + bne _02237B1C + add r0, sp, #0 + strh r4, [r0] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + bl sub_02032D98 + mov r0, #0x16 + add r1, sp, #0 + mov r2, #8 + bl sub_020359DC + cmp r0, #1 + beq _02237B1E + bl sub_02022974 + b _02237B1E +_02237B1C: + strb r4, [r5, #6] +_02237B1E: + ldr r0, _02237B94 ; =0x021BF67C + mov r1, #1 + ldr r0, [r0, #0x48] + tst r1, r0 + beq _02237B56 + ldr r0, _02237B98 ; =0x000005DD + bl sub_02005748 + add r0, r5, #0 + bl ov65_02237450 + cmp r0, #0 + bne _02237B3E + mov r0, #6 + strb r0, [r5, #5] + b _02237B8C +_02237B3E: + add r0, r5, #0 + bl ov65_02237548 + ldrb r1, [r6, #1] + cmp r1, r0 + bgt _02237B50 + mov r0, #8 + strb r0, [r5, #5] + b _02237B8C +_02237B50: + mov r0, #6 + strb r0, [r5, #5] + b _02237B8C +_02237B56: + mov r1, #2 + add r2, r0, #0 + tst r2, r1 + beq _02237B6A + ldr r0, _02237B98 ; =0x000005DD + bl sub_02005748 + mov r0, #0x16 + strb r0, [r5, #5] + b _02237B8C +_02237B6A: + ldrb r2, [r5, #6] + cmp r2, #0xff + beq _02237B7C + ldr r0, _02237B98 ; =0x000005DD + bl sub_02005748 + mov r0, #3 + strb r0, [r5, #5] + b _02237B8C +_02237B7C: + lsl r1, r1, #9 + tst r0, r1 + beq _02237B8C + mov r0, #0x1e + strb r0, [r5, #5] + ldr r0, _02237B98 ; =0x000005DD + bl sub_02005748 +_02237B8C: + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_02237B94: .word 0x021BF67C +_02237B98: .word 0x000005DD + thumb_func_end ov65_02237AC0 + + thumb_func_start ov65_02237B9C +ov65_02237B9C: ; 0x02237B9C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r2, #0 + ldrb r2, [r5, #6] + add r0, #0x30 + add r3, r6, #0 + add r4, r1, #0 + bl ov65_02236F70 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + mov r2, #0x6c + add r3, r6, #0 + bl ov65_02236E44 + mov r0, #4 + strb r0, [r5, #5] + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov65_02237B9C + + thumb_func_start ov65_02237BC4 +ov65_02237BC4: ; 0x02237BC4 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0x30 + add r5, r2, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _02237BD8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02237BD8: + str r5, [sp] + ldr r0, [r4, #0x30] + ldr r1, _02237BF4 ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002100 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #5 + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02237BF4: .word 0x02239A24 + thumb_func_end ov65_02237BC4 + + thumb_func_start ov65_02237BF8 +ov65_02237BF8: ; 0x02237BF8 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + add r6, r2, #0 + add r4, r1, #0 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02237C90 + ldrb r2, [r5, #6] + add r1, sp, #0 + cmp r0, #0 + strh r2, [r1] + bne _02237C5C + mov r0, #1 + str r0, [sp, #4] + ldrb r1, [r5, #6] + add r0, r5, #0 + add r2, r6, #0 + bl ov65_022376A0 + ldr r0, [r5, #0] + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #1 + bne _02237C44 + add r0, r5, #0 + bl ov65_02237504 + add r0, r5, #0 + bl ov65_02237520 +_02237C44: + add r0, r5, #0 + bl ov65_02237548 + ldrb r1, [r4, #2] + cmp r1, r0 + bgt _02237C56 + mov r0, #8 + strb r0, [r5, #5] + b _02237C6A +_02237C56: + mov r0, #1 + strb r0, [r5, #5] + b _02237C6A +_02237C5C: + mov r0, #0 + str r0, [sp, #4] + ldrb r0, [r5, #6] + bl sub_02032D98 + mov r0, #1 + strb r0, [r5, #5] +_02237C6A: + mov r0, #0x16 + add r1, sp, #0 + mov r2, #8 + bl sub_020359DC + cmp r0, #1 + beq _02237C7C + bl sub_02022974 +_02237C7C: + mov r0, #0xff + strb r0, [r5, #6] + add r0, r5, #0 + add r0, #0x30 + bl ov65_02237018 + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_02237C90: + mov r0, #0 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02237BF8 + + thumb_func_start ov65_02237C98 +ov65_02237C98: ; 0x02237C98 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x77 + bl ov65_02236E44 + mov r0, #7 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237C98 + + thumb_func_start ov65_02237CB0 +ov65_02237CB0: ; 0x02237CB0 + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _02237CC2 + mov r0, #0 + pop {r4, pc} +_02237CC2: + mov r0, #0x13 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237CB0 + + thumb_func_start ov65_02237CCC +ov65_02237CCC: ; 0x02237CCC + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x6f + bl ov65_02236E44 + mov r0, #9 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237CCC + + thumb_func_start ov65_02237CE4 +ov65_02237CE4: ; 0x02237CE4 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0x30 + add r5, r2, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _02237CF8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02237CF8: + str r5, [sp] + ldr r0, [r4, #0x30] + ldr r1, _02237D14 ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002100 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xa + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02237D14: .word 0x02239A24 + thumb_func_end ov65_02237CE4 + + thumb_func_start ov65_02237D18 +ov65_02237D18: ; 0x02237D18 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + add r1, r2, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02237D5A + cmp r0, #0 + bne _02237D3C + mov r0, #0xb + strb r0, [r5, #5] + b _02237D52 +_02237D3C: + add r0, r5, #0 + bl ov65_02237548 + ldrb r1, [r4, #2] + cmp r1, r0 + bgt _02237D4E + mov r0, #0x13 + strb r0, [r5, #5] + b _02237D52 +_02237D4E: + mov r0, #1 + strb r0, [r5, #5] +_02237D52: + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_02237D5A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02237D18 + + thumb_func_start ov65_02237D60 +ov65_02237D60: ; 0x02237D60 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0x1e + add r6, r2, #0 + str r1, [r5, #8] + bl ov65_0223758C + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + mov r2, #0x66 + add r3, r6, #0 + bl ov65_02236E44 + add r0, r5, #0 + bl ov65_0223789C + add r0, r5, #0 + bl ov65_02237A44 + mov r0, #0xc + strb r0, [r5, #5] + bl ov4_021D25FC + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02237D60 + + thumb_func_start ov65_02237D98 +ov65_02237D98: ; 0x02237D98 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02035E18 + add r5, r0, #0 + bl sub_02032E64 + cmp r5, r0 + beq _02237DB4 + add r0, r4, #0 + bl ov65_0223758C + mov r0, #0 + pop {r3, r4, r5, pc} +_02237DB4: + bl ov4_021D25C0 + cmp r0, #0 + bne _02237DC0 + mov r0, #0 + pop {r3, r4, r5, pc} +_02237DC0: + mov r0, #1 + bl ov4_021D26EC + mov r0, #0xd + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02237D98 + + thumb_func_start ov65_02237DD0 +ov65_02237DD0: ; 0x02237DD0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + bne _02237DEE + mov r1, #0 + mov r0, #0x17 + add r2, r1, #0 + bl sub_020359DC + cmp r0, #0 + beq _02237DF2 + mov r0, #0xe + strb r0, [r4, #5] + b _02237DF2 +_02237DEE: + sub r0, r0, #1 + str r0, [r4, #8] +_02237DF2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237DD0 + + thumb_func_start ov65_02237DF8 +ov65_02237DF8: ; 0x02237DF8 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0xd + add r5, r1, #0 + bl sub_02036540 + cmp r0, #0 + beq _02237E1E + add r0, r4, #0 + add r1, r5, #0 + bl ov65_02237498 + bl sub_020365F4 + mov r0, #0xe + bl sub_020364F0 + mov r0, #0xf + strb r0, [r4, #5] +_02237E1E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02237DF8 + + thumb_func_start ov65_02237E24 +ov65_02237E24: ; 0x02237E24 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0xe + bl sub_02036540 + cmp r0, #0 + beq _02237E4E + ldr r0, [r4, #0] + ldrb r1, [r0, #0x1b] + add r0, sp, #0 + strh r1, [r0] + bl sub_0203608C + add r1, sp, #0 + bl sub_02036614 + cmp r0, #1 + bne _02237E4E + mov r0, #0x10 + strb r0, [r4, #5] +_02237E4E: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov65_02237E24 + + thumb_func_start ov65_02237E54 +ov65_02237E54: ; 0x02237E54 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl ov65_02237548 + add r7, r0, #0 + bl sub_0203608C + mov r5, #0 + add r4, r5, #0 + str r0, [sp] + cmp r7, #0 + ble _02237E98 +_02237E6C: + ldr r0, [sp] + cmp r0, r4 + beq _02237E90 + add r0, r4, #0 + bl sub_0203664C + cmp r0, #0 + beq _02237E92 + ldrh r1, [r0] + ldr r0, [r6, #0] + ldrb r0, [r0, #0x1b] + cmp r1, r0 + bne _02237E8A + add r5, r5, #1 + b _02237E92 +_02237E8A: + mov r0, #0x1b + strb r0, [r6, #5] + b _02237E92 +_02237E90: + add r5, r5, #1 +_02237E92: + add r4, r4, #1 + cmp r4, r7 + blt _02237E6C +_02237E98: + cmp r5, r7 + bne _02237EA0 + mov r0, #0x11 + strb r0, [r6, #5] +_02237EA0: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_02237E54 + + thumb_func_start ov65_02237EA4 +ov65_02237EA4: ; 0x02237EA4 + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + add r1, r0, #0 + bl sub_020388F4 + mov r0, #0x12 + bl sub_020364F0 + mov r0, #0x12 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237EA4 + + thumb_func_start ov65_02237EC0 +ov65_02237EC0: ; 0x02237EC0 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x12 + add r4, r1, #0 + add r6, r2, #0 + bl sub_02036540 + cmp r0, #0 + beq _02237EEC + mov r0, #1 + strb r0, [r5, #7] + add r0, r4, #0 + add r1, r6, #0 + bl ov65_02237A24 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022378C4 + mov r0, #1 + pop {r4, r5, r6, pc} +_02237EEC: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov65_02237EC0 + + thumb_func_start ov65_02237EF0 +ov65_02237EF0: ; 0x02237EF0 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x78 + bl ov65_02236E44 + mov r0, #0x14 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237EF0 + + thumb_func_start ov65_02237F08 +ov65_02237F08: ; 0x02237F08 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r0, #0x30 + add r4, r2, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _02237F20 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02237F20: + mov r0, #1 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0x30] + ldr r1, _02237F44 ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002054 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x15 + strb r0, [r5, #5] + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02237F44: .word 0x02239A24 + thumb_func_end ov65_02237F08 + + thumb_func_start ov65_02237F48 +ov65_02237F48: ; 0x02237F48 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + add r1, r2, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02237F9A + cmp r0, #0 + bne _02237F6C + mov r0, #0x16 + strb r0, [r5, #5] + b _02237F92 +_02237F6C: + add r0, r5, #0 + bl ov65_02237450 + cmp r0, #0 + beq _02237F8E + add r0, r5, #0 + bl ov65_02237548 + ldrb r1, [r4, #2] + cmp r1, r0 + bgt _02237F88 + mov r0, #8 + strb r0, [r5, #5] + b _02237F92 +_02237F88: + mov r0, #1 + strb r0, [r5, #5] + b _02237F92 +_02237F8E: + mov r0, #1 + strb r0, [r5, #5] +_02237F92: + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_02237F9A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02237F48 + + thumb_func_start ov65_02237FA0 +ov65_02237FA0: ; 0x02237FA0 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x79 + bl ov65_02236E44 + mov r0, #0x17 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02237FA0 + + thumb_func_start ov65_02237FB8 +ov65_02237FB8: ; 0x02237FB8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + add r0, #0x30 + add r4, r2, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _02237FD0 + add sp, #8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02237FD0: + mov r0, #1 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #0x30] + ldr r1, _02237FF4 ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002054 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x18 + strb r0, [r5, #5] + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02237FF4: .word 0x02239A24 + thumb_func_end ov65_02237FB8 + + thumb_func_start ov65_02237FF8 +ov65_02237FF8: ; 0x02237FF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + add r1, r2, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0223804A + cmp r0, #0 + bne _0223801C + mov r0, #0x19 + strb r0, [r5, #5] + b _02238042 +_0223801C: + add r0, r5, #0 + bl ov65_02237450 + cmp r0, #0 + beq _0223803E + add r0, r5, #0 + bl ov65_02237548 + ldrb r1, [r4, #2] + cmp r1, r0 + bgt _02238038 + mov r0, #8 + strb r0, [r5, #5] + b _02238042 +_02238038: + mov r0, #1 + strb r0, [r5, #5] + b _02238042 +_0223803E: + mov r0, #1 + strb r0, [r5, #5] +_02238042: + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_0223804A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02237FF8 + + thumb_func_start ov65_02238050 +ov65_02238050: ; 0x02238050 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x7a + bl ov65_02236E44 + mov r0, #0x1e + str r0, [r4, #8] + mov r0, #0x1a + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02238050 + + thumb_func_start ov65_0223806C +ov65_0223806C: ; 0x0223806C + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _0223807E + mov r0, #0 + pop {r4, pc} +_0223807E: + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0 + ble _0223808C + mov r0, #0 + pop {r4, pc} +_0223808C: + mov r0, #0 + strb r0, [r4, #7] + bl sub_02038378 + add r0, r4, #0 + bl ov65_022375CC + bl sub_02038B60 + mov r0, #0 + mov r1, #1 + bl sub_020388F4 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_0223806C + + thumb_func_start ov65_022380AC +ov65_022380AC: ; 0x022380AC + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r6, r1, #0 + add r4, r2, #0 + cmp r0, #0 + beq _022380CC + add r1, r4, #0 + bl sub_02002154 + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_022380CC: + add r0, r5, #0 + add r0, #0x30 + bl ov65_02237018 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov65_022378C4 + mov r0, #0x1c + strb r0, [r5, #5] + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_022380AC + + thumb_func_start ov65_022380E8 +ov65_022380E8: ; 0x022380E8 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x76 + bl ov65_02236E44 + mov r0, #0x1d + strb r0, [r4, #5] + add r0, r4, #0 + bl ov65_022375CC + mov r0, #0 + pop {r4, pc} + thumb_func_end ov65_022380E8 + + thumb_func_start ov65_02238104 +ov65_02238104: ; 0x02238104 + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _02238116 + mov r0, #0 + pop {r4, pc} +_02238116: + bl sub_02038378 + bl sub_02038B60 + add r0, r4, #0 + bl ov65_022375CC + mov r0, #0 + mov r1, #1 + strb r0, [r4, #7] + bl sub_020388F4 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02238104 + + thumb_func_start ov65_02238134 +ov65_02238134: ; 0x02238134 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + add r3, r2, #0 + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #1 + bne _02238148 + mov r2, #0x7d + b _0223814A +_02238148: + mov r2, #0x7c +_0223814A: + add r0, r4, #0 + add r0, #0x30 + bl ov65_02236E44 + mov r0, #0x1f + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02238134 + + thumb_func_start ov65_0223815C +ov65_0223815C: ; 0x0223815C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0x30 + add r5, r2, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _02238170 + mov r0, #0 + pop {r3, r4, r5, pc} +_02238170: + str r5, [sp] + ldr r0, [r4, #0x30] + ldr r1, _0223818C ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002100 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x20 + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223818C: .word 0x02239A24 + thumb_func_end ov65_0223815C + + thumb_func_start ov65_02238190 +ov65_02238190: ; 0x02238190 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + add r4, r2, #0 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _022381C8 + cmp r0, #0 + bne _022381BC + add r0, r5, #0 + add r1, r4, #0 + bl ov65_0223731C + add r0, r5, #0 + bl ov65_02237698 +_022381BC: + mov r0, #1 + strb r0, [r5, #5] + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_022381C8: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov65_02238190 + + thumb_func_start ov65_022381CC +ov65_022381CC: ; 0x022381CC + push {r4, lr} + add r4, r0, #0 + bl sub_02032AC0 + mov r0, #0 + mov r1, #1 + bl sub_020388F4 + mov r0, #1 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov65_022381CC + + thumb_func_start ov65_022381E4 +ov65_022381E4: ; 0x022381E4 + push {r4, lr} + add r1, r2, #0 + add r4, r0, #0 + bl ov65_02237550 + mov r0, #0 + bl sub_02035D78 + cmp r0, #0 + bne _022381FE + mov r0, #0xf + strb r0, [r4, #5] + b _0223820C +_022381FE: + mov r0, #0 + bl sub_02032E00 + cmp r0, #0 + beq _0223820C + mov r0, #2 + strb r0, [r4, #5] +_0223820C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov65_022381E4 + + thumb_func_start ov65_02238210 +ov65_02238210: ; 0x02238210 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r6, #0 + bl ov65_02237550 + add r0, r5, #0 + mov r2, #0 + add r0, #0x30 + add r1, r4, #0 + add r3, r2, #0 + str r6, [sp] + bl ov65_0223726C + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + mov r2, #0x72 + add r3, r6, #0 + bl ov65_02236E44 + add r0, r5, #0 + bl ov65_0223789C + mov r0, #3 + strb r0, [r5, #5] + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02238210 + + thumb_func_start ov65_02238250 +ov65_02238250: ; 0x02238250 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r6, #0 + bl ov65_02237550 + add r0, r5, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _0223826E + mov r0, #0 + pop {r4, r5, r6, pc} +_0223826E: + ldrb r0, [r5, #0x13] + cmp r0, #0 + beq _022382AA + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022378C4 + ldrb r0, [r5, #0x13] + cmp r0, #1 + beq _0223828E + cmp r0, #2 + beq _02238294 + cmp r0, #3 + beq _022382A0 + b _022382AA +_0223828E: + mov r0, #4 + strb r0, [r5, #5] + b _022382AA +_02238294: + mov r0, #6 + strb r0, [r5, #5] + mov r0, #0x74 + add r5, #0x2d + strb r0, [r5] + b _022382AA +_022382A0: + mov r0, #6 + strb r0, [r5, #5] + mov r0, #0x84 + add r5, #0x2d + strb r0, [r5] +_022382AA: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02238250 + + thumb_func_start ov65_022382B0 +ov65_022382B0: ; 0x022382B0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r2, #0 + mov r2, #0 + add r5, r0, #0 + add r0, #0x30 + add r3, r2, #0 + add r6, r1, #0 + str r4, [sp] + bl ov65_0223726C + add r0, r5, #0 + add r0, #0x30 + add r1, r6, #0 + mov r2, #0x73 + mov r3, #0x1e + str r4, [sp] + bl ov65_02236E50 + mov r0, #5 + strb r0, [r5, #5] + bl sub_0203608C + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0x60 + bl ov65_022376A0 + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_022382B0 + + thumb_func_start ov65_022382F0 +ov65_022382F0: ; 0x022382F0 + push {r4, lr} + add r4, r0, #0 + add r1, r2, #0 + bl ov65_02237550 + add r0, r4, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _0223830A + mov r0, #0 + pop {r4, pc} +_0223830A: + mov r0, #8 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_022382F0 + + thumb_func_start ov65_02238314 +ov65_02238314: ; 0x02238314 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r6, r2, #0 + mov r2, #0 + add r5, r0, #0 + add r0, #0x30 + add r3, r2, #0 + add r4, r1, #0 + str r6, [sp] + bl ov65_0223726C + add r2, r5, #0 + add r2, #0x2d + add r0, r5, #0 + ldrb r2, [r2] + add r0, #0x30 + add r1, r4, #0 + add r3, r6, #0 + bl ov65_02236E44 + mov r0, #7 + strb r0, [r5, #5] + bl sub_02038378 + bl sub_02038B60 + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02238314 + + thumb_func_start ov65_02238350 +ov65_02238350: ; 0x02238350 + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _02238362 + mov r0, #0 + pop {r4, pc} +_02238362: + mov r0, #0 + mov r1, #1 + strb r0, [r4, #7] + bl sub_020388F4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov65_02238350 + + thumb_func_start ov65_02238370 +ov65_02238370: ; 0x02238370 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r6, #0 + bl ov65_02237550 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + mov r2, #0x7b + add r3, r6, #0 + bl ov65_02236E44 + add r0, r5, #0 + bl ov65_0223789C + mov r0, #9 + strb r0, [r5, #5] + ldr r0, [r5, #0] + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #1 + bne _022383A6 + add r0, r5, #0 + bl ov65_02237520 +_022383A6: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02238370 + + thumb_func_start ov65_022383AC +ov65_022383AC: ; 0x022383AC + push {r4, lr} + add r4, r0, #0 + add r1, r2, #0 + bl ov65_02237550 + add r0, r4, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _022383C6 + mov r0, #0 + pop {r4, pc} +_022383C6: + mov r0, #0xa + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_022383AC + + thumb_func_start ov65_022383D0 +ov65_022383D0: ; 0x022383D0 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r6, #0 + bl ov65_02237550 + ldrb r0, [r5, #0x12] + cmp r0, #0 + beq _02238404 + mov r0, #0 + strb r0, [r5, #0x12] + ldr r0, [r5, #0] + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #1 + bne _022383FE + add r0, r5, #0 + bl ov65_02237504 + add r0, r5, #0 + bl ov65_02237520 +_022383FE: + add r0, r5, #0 + bl ov65_02237698 +_02238404: + add r0, r5, #0 + bl ov65_02237A10 + cmp r0, #1 + bne _02238448 + bl sub_020365F4 + mov r0, #0xe + bl sub_020364F0 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022378C4 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + mov r2, #0x66 + add r3, r6, #0 + bl ov65_02236E44 + add r0, r5, #0 + bl ov65_02237A44 + mov r0, #0x4b + lsl r0, r0, #2 + str r0, [r5, #8] + add r0, r5, #0 + bl ov65_0223789C + mov r0, #0xb + strb r0, [r5, #5] + b _02238462 +_02238448: + ldr r0, _02238468 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + lsl r0, r0, #0xa + tst r0, r1 + beq _02238462 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022378C4 + mov r0, #0x12 + strb r0, [r5, #5] +_02238462: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02238468: .word 0x021BF67C + thumb_func_end ov65_022383D0 + + thumb_func_start ov65_0223846C +ov65_0223846C: ; 0x0223846C + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0xe + bl sub_02036540 + cmp r0, #0 + beq _022384B6 + ldr r0, [r4, #0] + ldrb r1, [r0, #0x1b] + add r0, sp, #0 + strh r1, [r0] + add r0, r4, #0 + bl ov65_02237548 + add r5, r0, #0 + bl sub_02035E18 + cmp r5, r0 + beq _022384A4 + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0 + bgt _022384A0 + mov r0, #0xf + strb r0, [r4, #5] +_022384A0: + mov r0, #0 + pop {r3, r4, r5, pc} +_022384A4: + bl sub_0203608C + add r1, sp, #0 + bl sub_02036614 + cmp r0, #1 + bne _022384B6 + mov r0, #0xc + strb r0, [r4, #5] +_022384B6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_0223846C + + thumb_func_start ov65_022384BC +ov65_022384BC: ; 0x022384BC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl ov65_02237548 + add r7, r0, #0 + bl sub_0203608C + mov r5, #0 + add r4, r5, #0 + str r0, [sp] + cmp r7, #0 + ble _02238500 +_022384D4: + ldr r0, [sp] + cmp r0, r4 + beq _022384F8 + add r0, r4, #0 + bl sub_0203664C + cmp r0, #0 + beq _022384FA + ldrh r1, [r0] + ldr r0, [r6, #0] + ldrb r0, [r0, #0x1b] + cmp r1, r0 + bne _022384F2 + add r5, r5, #1 + b _022384FA +_022384F2: + mov r0, #0xf + strb r0, [r6, #5] + b _022384FA +_022384F8: + add r5, r5, #1 +_022384FA: + add r4, r4, #1 + cmp r4, r7 + blt _022384D4 +_02238500: + cmp r5, r7 + bne _02238508 + mov r0, #0xd + strb r0, [r6, #5] +_02238508: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov65_022384BC + + thumb_func_start ov65_0223850C +ov65_0223850C: ; 0x0223850C + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + add r1, r0, #0 + bl sub_020388F4 + mov r0, #0x12 + bl sub_020364F0 + mov r0, #0xe + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_0223850C + + thumb_func_start ov65_02238528 +ov65_02238528: ; 0x02238528 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x12 + add r4, r1, #0 + add r6, r2, #0 + bl sub_02036540 + cmp r0, #0 + beq _02238554 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov65_022378C4 + mov r0, #1 + strb r0, [r5, #7] + add r0, r4, #0 + add r1, r6, #0 + bl ov65_02237A24 + mov r0, #1 + pop {r4, r5, r6, pc} +_02238554: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov65_02238528 + + thumb_func_start ov65_02238558 +ov65_02238558: ; 0x02238558 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r6, r1, #0 + add r4, r2, #0 + cmp r0, #0 + beq _02238578 + add r1, r4, #0 + bl sub_02002154 + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_02238578: + add r0, r5, #0 + add r0, #0x30 + bl ov65_02237018 + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov65_022378C4 + mov r0, #0x10 + strb r0, [r5, #5] + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02238558 + + thumb_func_start ov65_02238594 +ov65_02238594: ; 0x02238594 + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x76 + bl ov65_02236E44 + mov r0, #0x11 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02238594 + + thumb_func_start ov65_022385AC +ov65_022385AC: ; 0x022385AC + push {r4, lr} + add r4, r0, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _022385BE + mov r0, #0 + pop {r4, pc} +_022385BE: + bl sub_02038378 + bl sub_02038B60 + mov r0, #0 + mov r1, #1 + strb r0, [r4, #7] + bl sub_020388F4 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov65_022385AC + + thumb_func_start ov65_022385D4 +ov65_022385D4: ; 0x022385D4 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r4, r1, #0 + add r5, r0, #0 + add r1, r6, #0 + bl ov65_02237550 + ldr r0, [r5, #0] + add r0, #0x21 + ldrb r0, [r0] + cmp r0, #1 + bne _022385F0 + mov r2, #0x7d + b _022385F2 +_022385F0: + mov r2, #0x7c +_022385F2: + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + add r3, r6, #0 + bl ov65_02236E44 + mov r0, #0x13 + strb r0, [r5, #5] + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_022385D4 + + thumb_func_start ov65_02238608 +ov65_02238608: ; 0x02238608 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r0, #0 + add r1, r5, #0 + bl ov65_02237550 + add r0, r4, #0 + bl ov65_02237A10 + cmp r0, #1 + bne _0223862E + mov r0, #0xa + strb r0, [r4, #5] + add r4, #0x30 + add r0, r4, #0 + bl ov65_02236F38 + mov r0, #0 + pop {r3, r4, r5, pc} +_0223862E: + add r0, r4, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _0223863E + mov r0, #0 + pop {r3, r4, r5, pc} +_0223863E: + str r5, [sp] + ldr r0, [r4, #0x30] + ldr r1, _0223865C ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002100 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x14 + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0223865C: .word 0x02239A24 + thumb_func_end ov65_02238608 + + thumb_func_start ov65_02238660 +ov65_02238660: ; 0x02238660 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r0, #0 + add r1, r4, #0 + bl ov65_02237550 + add r0, r5, #0 + bl ov65_02237A10 + cmp r0, #1 + bne _02238698 + mov r0, #0xa + strb r0, [r5, #5] + add r0, r5, #0 + add r0, #0x30 + bl ov65_02236F38 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02002154 + mov r1, #0x83 + mov r0, #0 + lsl r1, r1, #2 + str r0, [r5, r1] + pop {r3, r4, r5, pc} +_02238698: + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _022386CA + cmp r0, #0 + bne _022386BE + add r0, r5, #0 + add r1, r4, #0 + bl ov65_0223731C + add r0, r5, #0 + bl ov65_02237698 +_022386BE: + mov r0, #8 + strb r0, [r5, #5] + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_022386CA: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov65_02238660 + + thumb_func_start ov65_022386D0 +ov65_022386D0: ; 0x022386D0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + mov r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl sub_02032F40 + add r1, r5, #0 + add r1, #0x26 + strb r0, [r1] + add r0, r5, #0 + add r0, #0x26 + ldrb r0, [r0] + cmp r0, #0x20 + bne _022386F4 + bl sub_02022974 +_022386F4: + add r0, r5, #0 + mov r2, #0 + add r0, #0x30 + add r1, r6, #0 + add r3, r2, #0 + str r4, [sp] + bl ov65_0223726C + bl sub_02038378 + add r0, r5, #0 + mov r1, #0 + add r0, #0x27 + strb r1, [r0] + add r0, r5, #0 + add r0, #0x30 + add r1, r6, #0 + mov r2, #0x84 + add r3, r4, #0 + bl ov65_02236E44 + mov r0, #0x16 + strb r0, [r5, #5] + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov65_022386D0 + + thumb_func_start ov65_02238728 +ov65_02238728: ; 0x02238728 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0x30 + add r5, r2, #0 + bl ov65_02236EF8 + cmp r0, #0 + bne _0223873C + mov r0, #0 + pop {r3, r4, r5, pc} +_0223873C: + str r5, [sp] + ldr r0, [r4, #0x30] + ldr r1, _02238758 ; =0x02239A24 + mov r2, #0x30 + mov r3, #4 + bl sub_02002100 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x17 + strb r0, [r4, #5] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02238758: .word 0x02239A24 + thumb_func_end ov65_02238728 + + thumb_func_start ov65_0223875C +ov65_0223875C: ; 0x0223875C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02238788 + cmp r0, #0 + bne _0223877C + mov r0, #0x18 + b _0223877E +_0223877C: + mov r0, #0x1d +_0223877E: + strb r0, [r4, #5] + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_02238788: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov65_0223875C + + thumb_func_start ov65_0223878C +ov65_0223878C: ; 0x0223878C + push {r4, lr} + add r4, r0, #0 + add r3, r2, #0 + add r0, #0x30 + mov r2, #0x11 + bl ov65_02236E44 + add r0, r4, #0 + bl ov65_0223789C + mov r0, #0x5a + str r0, [r4, #8] + mov r0, #0x19 + strb r0, [r4, #5] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov65_0223878C + + thumb_func_start ov65_022387AC +ov65_022387AC: ; 0x022387AC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + add r4, r1, #0 + cmp r0, #0 + ble _022387C0 + sub r0, r0, #1 + str r0, [r5, #8] + mov r0, #0 + pop {r3, r4, r5, pc} +_022387C0: + add r0, r5, #0 + add r0, #0x30 + bl ov65_02236EF8 + cmp r0, #0 + bne _022387D0 + mov r0, #0 + pop {r3, r4, r5, pc} +_022387D0: + add r0, r5, #0 + add r0, #0x26 + ldrb r0, [r0] + ldrb r1, [r4] + bl ov65_02237464 + cmp r0, #0 + beq _022387E4 + mov r0, #0x1a + strb r0, [r5, #5] +_022387E4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov65_022387AC + + thumb_func_start ov65_022387E8 +ov65_022387E8: ; 0x022387E8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov65_0223742C + bl sub_020380E4 + cmp r0, #1 + bne _02238832 + mov r0, #0 + bl sub_02035D78 + cmp r0, #1 + bne _02238832 + mov r0, #0 + bl sub_0203632C + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov65_022378C4 + mov r1, #0 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + str r4, [sp, #8] + bl sub_0200F174 + mov r0, #0x1b + strb r0, [r5, #5] +_02238832: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov65_022387E8 + + thumb_func_start ov65_02238838 +ov65_02238838: ; 0x02238838 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _022388F4 + ldr r0, [r6, #8] + mov r1, #0 + bl sub_020329E0 + add r0, r5, #0 + mov r1, #1 + add r0, #0x27 + strb r1, [r0] + add r0, r5, #0 + bl ov65_022377E8 + add r0, r5, #0 + add r1, r4, #0 + bl ov65_022367F8 + add r0, r5, #0 + mov r2, #0x7e + add r0, #0x30 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + add r0, r5, #0 + bl ov65_0223760C + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov65_022367A8 + bl sub_02039734 + mov r1, #0 + strb r1, [r5, #0x12] + strb r1, [r5, #0x13] + add r0, r5, #0 + add r0, #0x14 + strb r1, [r5, #0x14] + strb r1, [r0, #1] + strb r1, [r0, #2] + strb r1, [r0, #3] + add r0, r5, #0 + add r0, #0x18 + strb r1, [r5, #0x18] + strb r1, [r0, #1] + strb r1, [r0, #2] + strb r1, [r0, #3] + add r0, r5, #0 + add r0, #0x1c + mov r1, #1 + mov r2, #4 + bl sub_020C4CF4 + add r0, r5, #0 + add r0, #0x20 + mov r1, #1 + mov r2, #4 + bl sub_020C4CF4 + add r0, r5, #0 + add r1, r5, #0 + mov r3, #0 + add r0, #0x24 + strb r3, [r0] + add r0, r5, #0 + add r0, #0x26 + strb r3, [r0] + add r0, r5, #0 + add r0, #0x28 + strb r3, [r0] + add r1, #0x28 + strb r3, [r1, #1] + strb r3, [r1, #2] + strb r3, [r1, #3] + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #3 + add r2, r1, #0 + str r4, [sp, #8] + bl sub_0200F174 + mov r0, #0x1c + strb r0, [r5, #5] +_022388F4: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov65_02238838 + + thumb_func_start ov65_022388FC +ov65_022388FC: ; 0x022388FC + push {r4, lr} + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _0223890C + mov r0, #0 + strb r0, [r4, #5] +_0223890C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov65_022388FC + + thumb_func_start ov65_02238910 +ov65_02238910: ; 0x02238910 + push {r4, lr} + add r4, r0, #0 + bl sub_02038378 + bl sub_02038B60 + mov r0, #0 + mov r1, #1 + strb r0, [r4, #7] + bl sub_020388F4 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov65_02238910 + + .rodata + + + .global Unk_ov65_02239A20 +Unk_ov65_02239A20: ; 0x02239A20 + .incbin "incbin/overlay65_rodata.bin", 0x10F4, 0x10F8 - 0x10F4 + + .global Unk_ov65_02239A24 +Unk_ov65_02239A24: ; 0x02239A24 + .incbin "incbin/overlay65_rodata.bin", 0x10F8, 0x1100 - 0x10F8 + + .global Unk_ov65_02239A2C +Unk_ov65_02239A2C: ; 0x02239A2C + .incbin "incbin/overlay65_rodata.bin", 0x1100, 0x1110 - 0x1100 + + .global Unk_ov65_02239A3C +Unk_ov65_02239A3C: ; 0x02239A3C + .incbin "incbin/overlay65_rodata.bin", 0x1110, 0x1120 - 0x1110 + + .global Unk_ov65_02239A4C +Unk_ov65_02239A4C: ; 0x02239A4C + .incbin "incbin/overlay65_rodata.bin", 0x1120, 0x1130 - 0x1120 + + .global Unk_ov65_02239A5C +Unk_ov65_02239A5C: ; 0x02239A5C + .incbin "incbin/overlay65_rodata.bin", 0x1130, 0x114C - 0x1130 + + .global Unk_ov65_02239A78 +Unk_ov65_02239A78: ; 0x02239A78 + .incbin "incbin/overlay65_rodata.bin", 0x114C, 0x1168 - 0x114C + + .global Unk_ov65_02239A94 +Unk_ov65_02239A94: ; 0x02239A94 + .incbin "incbin/overlay65_rodata.bin", 0x1168, 0x1184 - 0x1168 + + .global Unk_ov65_02239AB0 +Unk_ov65_02239AB0: ; 0x02239AB0 + .incbin "incbin/overlay65_rodata.bin", 0x1184, 0x11AC - 0x1184 + + .global Unk_ov65_02239AD8 +Unk_ov65_02239AD8: ; 0x02239AD8 + .incbin "incbin/overlay65_rodata.bin", 0x11AC, 0x11DC - 0x11AC + + .global Unk_ov65_02239B08 +Unk_ov65_02239B08: ; 0x02239B08 + .incbin "incbin/overlay65_rodata.bin", 0x11DC, 0x1254 - 0x11DC + + .global Unk_ov65_02239B80 +Unk_ov65_02239B80: ; 0x02239B80 + .incbin "incbin/overlay65_rodata.bin", 0x1254, 0x12D8 - 0x1254 + + .global Unk_ov65_02239C04 +Unk_ov65_02239C04: ; 0x02239C04 + .incbin "incbin/overlay65_rodata.bin", 0x12D8, 0x12 + + + .data + + + .global Unk_ov65_02239E5C +Unk_ov65_02239E5C: ; 0x02239E5C + .incbin "incbin/overlay65_data.bin", 0x23C, 0x4 + diff --git a/asm/overlay67.s b/asm/ov67_0225C700.s similarity index 97% rename from asm/overlay67.s rename to asm/ov67_0225C700.s index 3cac59d32..fd8301608 100644 --- a/asm/overlay67.s +++ b/asm/ov67_0225C700.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov67_0225C700 ov67_0225C700: ; 0x0225C700 push {r4, r5, lr} @@ -1596,12 +1599,27 @@ ov67_0225D3D0: ; 0x0225D3D0 add sp, #8 pop {r3, pc} thumb_func_end ov67_0225D3D0 - ; 0x0225D3EC - .rodata - .incbin "incbin/overlay67_rodata.bin" - .bss - .space 0x0 + .global Unk_ov67_0225D3EC +Unk_ov67_0225D3EC: ; 0x0225D3EC + .incbin "incbin/overlay67_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov67_0225D3F4 +Unk_ov67_0225D3F4: ; 0x0225D3F4 + .incbin "incbin/overlay67_rodata.bin", 0x8, 0x14 - 0x8 + + .global Unk_ov67_0225D400 +Unk_ov67_0225D400: ; 0x0225D400 + .incbin "incbin/overlay67_rodata.bin", 0x14, 0x24 - 0x14 + + .global Unk_ov67_0225D410 +Unk_ov67_0225D410: ; 0x0225D410 + .incbin "incbin/overlay67_rodata.bin", 0x24, 0x4C - 0x24 + + .global Unk_ov67_0225D438 +Unk_ov67_0225D438: ; 0x0225D438 + .incbin "incbin/overlay67_rodata.bin", 0x4C, 0x54 + diff --git a/asm/overlay68.s b/asm/ov68_0225C700.s similarity index 97% rename from asm/overlay68.s rename to asm/ov68_0225C700.s index 3824f79bd..af10a3d9c 100644 --- a/asm/overlay68.s +++ b/asm/ov68_0225C700.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov68_0225C700 ov68_0225C700: ; 0x0225C700 push {r3, r4, r5, r6, lr} @@ -2856,14 +2859,63 @@ _0225DD2A: ; .align 2, 0 _0225DD34: .word 0x00000000 thumb_func_end ov68_0225DCCC - ; 0x0225DD38 - .rodata - .incbin "incbin/overlay68_rodata.bin" + + + .global Unk_ov68_0225DD38 +Unk_ov68_0225DD38: ; 0x0225DD38 + .incbin "incbin/overlay68_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov68_0225DD40 +Unk_ov68_0225DD40: ; 0x0225DD40 + .incbin "incbin/overlay68_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov68_0225DD48 +Unk_ov68_0225DD48: ; 0x0225DD48 + .incbin "incbin/overlay68_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov68_0225DD58 +Unk_ov68_0225DD58: ; 0x0225DD58 + .incbin "incbin/overlay68_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov68_0225DD68 +Unk_ov68_0225DD68: ; 0x0225DD68 + .incbin "incbin/overlay68_rodata.bin", 0x30, 0x40 - 0x30 + + .global Unk_ov68_0225DD78 +Unk_ov68_0225DD78: ; 0x0225DD78 + .incbin "incbin/overlay68_rodata.bin", 0x40, 0x64 - 0x40 + + .global Unk_ov68_0225DD9C +Unk_ov68_0225DD9C: ; 0x0225DD9C + .incbin "incbin/overlay68_rodata.bin", 0x64, 0x88 - 0x64 + + .global Unk_ov68_0225DDC0 +Unk_ov68_0225DDC0: ; 0x0225DDC0 + .incbin "incbin/overlay68_rodata.bin", 0x88, 0xB0 - 0x88 + + .global Unk_ov68_0225DDE8 +Unk_ov68_0225DDE8: ; 0x0225DDE8 + .incbin "incbin/overlay68_rodata.bin", 0xB0, 0xE0 - 0xB0 + + .global Unk_ov68_0225DE18 +Unk_ov68_0225DE18: ; 0x0225DE18 + .incbin "incbin/overlay68_rodata.bin", 0xE0, 0x70 + .data - .incbin "incbin/overlay68_data.bin" - .bss - .space 0x0 + + .global Unk_ov68_0225DEA0 +Unk_ov68_0225DEA0: ; 0x0225DEA0 + .incbin "incbin/overlay68_data.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov68_0225DEA8 +Unk_ov68_0225DEA8: ; 0x0225DEA8 + .incbin "incbin/overlay68_data.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov68_0225DEB0 +Unk_ov68_0225DEB0: ; 0x0225DEB0 + .incbin "incbin/overlay68_data.bin", 0x10, 0x8 + diff --git a/asm/overlay69.s b/asm/ov69_0225C700.s similarity index 98% rename from asm/overlay69.s rename to asm/ov69_0225C700.s index 0431a9730..3a4fb5c5b 100644 --- a/asm/overlay69.s +++ b/asm/ov69_0225C700.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov69_0225C700 ov69_0225C700: ; 0x0225C700 push {r3, r4, r5, lr} @@ -5488,12 +5491,67 @@ _0225F008: pop {r3, r4, r5, pc} ; .align 2, 0 thumb_func_end ov69_0225EFEC - ; 0x0225F014 - .rodata - .incbin "incbin/overlay69_rodata.bin" - .bss - .space 0x0 + .global Unk_ov69_0225F014 +Unk_ov69_0225F014: ; 0x0225F014 + .incbin "incbin/overlay69_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov69_0225F01C +Unk_ov69_0225F01C: ; 0x0225F01C + .incbin "incbin/overlay69_rodata.bin", 0x8, 0x14 - 0x8 + + .global Unk_ov69_0225F028 +Unk_ov69_0225F028: ; 0x0225F028 + .incbin "incbin/overlay69_rodata.bin", 0x14, 0x20 - 0x14 + + .global Unk_ov69_0225F034 +Unk_ov69_0225F034: ; 0x0225F034 + .incbin "incbin/overlay69_rodata.bin", 0x20, 0x2C - 0x20 + + .global Unk_ov69_0225F040 +Unk_ov69_0225F040: ; 0x0225F040 + .incbin "incbin/overlay69_rodata.bin", 0x2C, 0x3C - 0x2C + + .global Unk_ov69_0225F050 +Unk_ov69_0225F050: ; 0x0225F050 + .incbin "incbin/overlay69_rodata.bin", 0x3C, 0x4C - 0x3C + + .global Unk_ov69_0225F060 +Unk_ov69_0225F060: ; 0x0225F060 + .incbin "incbin/overlay69_rodata.bin", 0x4C, 0x60 - 0x4C + + .global Unk_ov69_0225F074 +Unk_ov69_0225F074: ; 0x0225F074 + .incbin "incbin/overlay69_rodata.bin", 0x60, 0x74 - 0x60 + + .global Unk_ov69_0225F088 +Unk_ov69_0225F088: ; 0x0225F088 + .incbin "incbin/overlay69_rodata.bin", 0x74, 0x88 - 0x74 + + .global Unk_ov69_0225F09C +Unk_ov69_0225F09C: ; 0x0225F09C + .incbin "incbin/overlay69_rodata.bin", 0x88, 0xAC - 0x88 + + .global Unk_ov69_0225F0C0 +Unk_ov69_0225F0C0: ; 0x0225F0C0 + .incbin "incbin/overlay69_rodata.bin", 0xAC, 0xD4 - 0xAC + + .global Unk_ov69_0225F0E8 +Unk_ov69_0225F0E8: ; 0x0225F0E8 + .incbin "incbin/overlay69_rodata.bin", 0xD4, 0x104 - 0xD4 + + .global Unk_ov69_0225F118 +Unk_ov69_0225F118: ; 0x0225F118 + .incbin "incbin/overlay69_rodata.bin", 0x104, 0x140 - 0x104 + + .global Unk_ov69_0225F154 +Unk_ov69_0225F154: ; 0x0225F154 + .incbin "incbin/overlay69_rodata.bin", 0x140, 0x1CC - 0x140 + + .global Unk_ov69_0225F1E0 +Unk_ov69_0225F1E0: ; 0x0225F1E0 + .incbin "incbin/overlay69_rodata.bin", 0x1CC, 0x240 + diff --git a/asm/ov6_0223E140.s b/asm/ov6_0223E140.s new file mode 100644 index 000000000..c9b76ebe3 --- /dev/null +++ b/asm/ov6_0223E140.s @@ -0,0 +1,5890 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_0223E140 +ov6_0223E140: ; 0x0223E140 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x38] + cmp r1, #5 + bhi _0223E196 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E156: ; jump table + .short _0223E162 - _0223E156 - 2 ; case 0 + .short _0223E16E - _0223E156 - 2 ; case 1 + .short _0223E196 - _0223E156 - 2 ; case 2 + .short _0223E180 - _0223E156 - 2 ; case 3 + .short _0223E18C - _0223E156 - 2 ; case 4 + .short _0223E196 - _0223E156 - 2 ; case 5 +_0223E162: + bl ov6_0223E234 + ldr r0, [r4, #0x38] + add r0, r0, #1 + str r0, [r4, #0x38] + pop {r4, pc} +_0223E16E: + ldr r0, [r4, #0x30] + ldr r1, [r4, #0x34] + bl ov6_0223E2BC + str r0, [r4, #0x2c] + ldr r0, [r4, #0x38] + add r0, r0, #1 + str r0, [r4, #0x38] + pop {r4, pc} +_0223E180: + bl ov6_0223E2E8 + ldr r0, [r4, #0x38] + add r0, r0, #1 + str r0, [r4, #0x38] + pop {r4, pc} +_0223E18C: + bl ov6_0223E248 + ldr r0, [r4, #0x38] + add r0, r0, #1 + str r0, [r4, #0x38] +_0223E196: + pop {r4, pc} + thumb_func_end ov6_0223E140 + + thumb_func_start ov6_0223E198 +ov6_0223E198: ; 0x0223E198 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x38] + cmp r0, #2 + beq _0223E1A6 + bl sub_02022974 +_0223E1A6: + mov r0, #3 + str r0, [r4, #0x38] + pop {r4, pc} + thumb_func_end ov6_0223E198 + + thumb_func_start ov6_0223E1AC +ov6_0223E1AC: ; 0x0223E1AC + ldr r0, [r0, #0x38] + bx lr + thumb_func_end ov6_0223E1AC + + thumb_func_start ov6_0223E1B0 +ov6_0223E1B0: ; 0x0223E1B0 + push {r4, lr} + sub sp, #0x28 + ldr r4, _0223E1CC ; =0x02248EDC + add r3, sp, #0 + mov r2, #5 +_0223E1BA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223E1BA + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_0223E1CC: .word 0x02248EDC + thumb_func_end ov6_0223E1B0 + + thumb_func_start ov6_0223E1D0 +ov6_0223E1D0: ; 0x0223E1D0 + push {r4, r5, lr} + sub sp, #0x2c + ldr r5, _0223E22C ; =0x02248E38 + add r3, sp, #0x1c + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r5, _0223E230 ; =0x02248EC0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #4 + bl sub_02019690 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + add sp, #0x2c + pop {r4, r5, pc} + nop +_0223E22C: .word 0x02248E38 +_0223E230: .word 0x02248EC0 + thumb_func_end ov6_0223E1D0 + + thumb_func_start ov6_0223E234 +ov6_0223E234: ; 0x0223E234 + ldr r3, _0223E240 ; =sub_0200DA3C + mov r2, #1 + add r1, r0, #0 + ldr r0, _0223E244 ; =ov6_0223E25C + lsl r2, r2, #0xa + bx r3 + ; .align 2, 0 +_0223E240: .word sub_0200DA3C +_0223E244: .word ov6_0223E25C + thumb_func_end ov6_0223E234 + + thumb_func_start ov6_0223E248 +ov6_0223E248: ; 0x0223E248 + ldr r3, _0223E254 ; =sub_0200DA3C + mov r2, #1 + add r1, r0, #0 + ldr r0, _0223E258 ; =ov6_0223E280 + lsl r2, r2, #0xa + bx r3 + ; .align 2, 0 +_0223E254: .word sub_0200DA3C +_0223E258: .word ov6_0223E280 + thumb_func_end ov6_0223E248 + + thumb_func_start ov6_0223E25C +ov6_0223E25C: ; 0x0223E25C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl ov6_0223E1B0 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl ov6_0223E2A4 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl ov6_0223E1D0 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_0223E25C + + thumb_func_start ov6_0223E280 +ov6_0223E280: ; 0x0223E280 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #4 + bl sub_0201FE94 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl ov6_0223E2A4 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl ov6_0223E2AC + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + thumb_func_end ov6_0223E280 + + thumb_func_start ov6_0223E2A4 +ov6_0223E2A4: ; 0x0223E2A4 + ldr r3, _0223E2A8 ; =ov5_021D143C + bx r3 + ; .align 2, 0 +_0223E2A8: .word ov5_021D143C + thumb_func_end ov6_0223E2A4 + + thumb_func_start ov6_0223E2AC +ov6_0223E2AC: ; 0x0223E2AC + push {r3, lr} + bl ov5_021D1434 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + pop {r3, pc} + thumb_func_end ov6_0223E2AC + + thumb_func_start ov6_0223E2BC +ov6_0223E2BC: ; 0x0223E2BC + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + ldr r6, _0223E2E4 ; =0x02248F04 + add r3, r0, #0 + add r2, r1, #0 + add r5, sp, #0 + mov r4, #5 +_0223E2CA: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r4, r4, #1 + bne _0223E2CA + ldr r0, [r6, #0] + str r0, [r5, #0] + add r0, sp, #0 + str r3, [sp, #0x20] + str r2, [sp, #0x24] + bl ov5_021E2098 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223E2E4: .word 0x02248F04 + thumb_func_end ov6_0223E2BC + + thumb_func_start ov6_0223E2E8 +ov6_0223E2E8: ; 0x0223E2E8 + ldr r3, _0223E2F4 ; =sub_0200DA3C + mov r2, #1 + add r1, r0, #0 + ldr r0, _0223E2F8 ; =ov6_0223E2FC + lsl r2, r2, #0xa + bx r3 + ; .align 2, 0 +_0223E2F4: .word sub_0200DA3C +_0223E2F8: .word ov6_0223E2FC + thumb_func_end ov6_0223E2E8 + + thumb_func_start ov6_0223E2FC +ov6_0223E2FC: ; 0x0223E2FC + push {r4, lr} + add r1, #0x2c + add r4, r0, #0 + add r0, r1, #0 + mov r1, #1 + mov r2, #0 + add r3, r1, #0 + bl ov5_021E20E8 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223E2FC + + thumb_func_start ov6_0223E318 +ov6_0223E318: ; 0x0223E318 + push {r4, lr} + ldr r0, [r0, #0x38] + add r4, r2, #0 + bl sub_0206251C + cmp r4, #1 + bne _0223E330 + mov r1, #1 + lsl r1, r1, #0x14 + bl sub_020628BC + pop {r4, pc} +_0223E330: + mov r1, #1 + lsl r1, r1, #0x14 + bl sub_020628C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223E318 + + thumb_func_start ov6_0223E33C +ov6_0223E33C: ; 0x0223E33C + push {r4, lr} + add r4, r0, #0 + bl sub_02050A60 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0223E358 + cmp r0, #1 + beq _0223E370 + b _0223E380 +_0223E358: + ldr r0, [r4, #0] + bl ov6_0223FE9C + ldr r0, [r4, #0] + bl ov6_0223FF6C + cmp r0, #1 + bne _0223E380 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223E380 +_0223E370: + ldr r0, [r4, #0] + bl ov6_0223FE08 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} +_0223E380: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_0223E33C + + thumb_func_start ov6_0223E384 +ov6_0223E384: ; 0x0223E384 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + bl sub_02050A60 + add r4, r0, #0 + mov r0, #4 + mov r1, #0x10 + bl sub_02018144 + add r5, r0, #0 + add r2, r5, #0 + mov r1, #0x10 + mov r0, #0 +_0223E3A0: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0223E3A0 + mov r0, #4 + bl ov6_0223FDE4 + str r0, [r5, #0] + mov r1, #0x10 + str r1, [sp] + ldr r0, [r4, #0x24] + lsl r1, r1, #9 + str r0, [sp, #4] + ldr r0, [r5, #0] + mov r2, #0 + mov r3, #1 + bl ov6_0223FE1C + ldr r1, _0223E3D4 ; =ov6_0223E33C + add r0, r6, #0 + add r2, r5, #0 + bl sub_02050944 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0223E3D4: .word ov6_0223E33C + thumb_func_end ov6_0223E384 + + thumb_func_start ov6_0223E3D8 +ov6_0223E3D8: ; 0x0223E3D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov6_0223FFF8 + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov6_0223FFF4 + ldr r1, [r5, #8] + cmp r1, r0 + beq _0223E404 + mov r1, #2 + str r0, [r5, #8] + add r0, r4, #0 + lsl r1, r1, #0xe + bl sub_020BCFD0 + sub r1, r4, r0 + ldr r0, [r5, #0] + bl ov6_0223FFFC +_0223E404: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_0223E3D8 + + thumb_func_start ov6_0223E408 +ov6_0223E408: ; 0x0223E408 + push {r4, lr} + add r4, r0, #0 + bl sub_02050A60 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #7 + bhi _0223E4E4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223E42A: ; jump table + .short _0223E43A - _0223E42A - 2 ; case 0 + .short _0223E44A - _0223E42A - 2 ; case 1 + .short _0223E45E - _0223E42A - 2 ; case 2 + .short _0223E476 - _0223E42A - 2 ; case 3 + .short _0223E4A0 - _0223E42A - 2 ; case 4 + .short _0223E4B2 - _0223E42A - 2 ; case 5 + .short _0223E4C4 - _0223E42A - 2 ; case 6 + .short _0223E4D4 - _0223E42A - 2 ; case 7 +_0223E43A: + mov r0, #0 + mov r1, #1 + bl sub_0200564C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223E4E4 +_0223E44A: + bl sub_02005684 + cmp r0, #0 + bne _0223E4E4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0x10 + str r0, [r4, #4] + b _0223E4E4 +_0223E45E: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0 + bgt _0223E4E4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + ldr r0, _0223E4E8 ; =0x0000065C + bl sub_02005748 + b _0223E4E4 +_0223E476: + ldr r0, [r4, #0] + bl ov6_0223FE9C + add r0, r4, #0 + bl ov6_0223E3D8 + ldr r0, [r4, #0] + bl ov6_0223FF6C + cmp r0, #1 + bne _0223E4E4 + ldr r0, _0223E4E8 ; =0x0000065C + mov r1, #0 + bl sub_020057A4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0x10 + str r0, [r4, #4] + b _0223E4E4 +_0223E4A0: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0 + bgt _0223E4E4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223E4E4 +_0223E4B2: + mov r0, #0x7f + mov r1, #0x10 + mov r2, #0 + bl sub_0200560C + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223E4E4 +_0223E4C4: + bl sub_02005684 + cmp r0, #0 + bne _0223E4E4 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + b _0223E4E4 +_0223E4D4: + ldr r0, [r4, #0] + bl ov6_0223FE08 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} +_0223E4E4: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0223E4E8: .word 0x0000065C + thumb_func_end ov6_0223E408 + + thumb_func_start ov6_0223E4EC +ov6_0223E4EC: ; 0x0223E4EC + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + bl sub_02050A60 + add r4, r0, #0 + mov r0, #4 + mov r1, #0x10 + bl sub_02018144 + add r5, r0, #0 + add r2, r5, #0 + mov r1, #0x10 + mov r0, #0 +_0223E508: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0223E508 + mov r0, #4 + bl ov6_0223FDE4 + str r0, [r5, #0] + mov r0, #0x18 + str r0, [sp] + ldr r0, [r4, #0x24] + mov r1, #1 + str r0, [sp, #4] + ldr r0, [r5, #0] + lsl r1, r1, #0xe + mov r2, #0 + mov r3, #1 + bl ov6_0223FE1C + ldr r0, [r5, #0] + bl ov6_0223FFF4 + str r0, [r5, #8] + ldr r1, _0223E544 ; =ov6_0223E408 + add r0, r6, #0 + add r2, r5, #0 + bl sub_02050944 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223E544: .word ov6_0223E408 + thumb_func_end ov6_0223E4EC + + thumb_func_start ov6_0223E548 +ov6_0223E548: ; 0x0223E548 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x78 + bl sub_020D5124 + mov r0, #4 + add r1, r5, #0 + bl ov6_02240104 + str r0, [r4, #0x48] + mov r0, #0 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov6_0223E548 + + thumb_func_start ov6_0223E568 +ov6_0223E568: ; 0x0223E568 + ldr r3, _0223E570 ; =ov6_022401B8 + ldr r0, [r2, #0x48] + bx r3 + nop +_0223E570: .word ov6_022401B8 + thumb_func_end ov6_0223E568 + + thumb_func_start ov6_0223E574 +ov6_0223E574: ; 0x0223E574 + push {r4, r5, r6, lr} + add r4, r2, #0 + ldr r0, [r4, #0] + add r5, r1, #0 + cmp r0, #0xb + bls _0223E582 + b _0223E6D2 +_0223E582: + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E58E: ; jump table + .short _0223E5A6 - _0223E58E - 2 ; case 0 + .short _0223E5AA - _0223E58E - 2 ; case 1 + .short _0223E5B0 - _0223E58E - 2 ; case 2 + .short _0223E5C6 - _0223E58E - 2 ; case 3 + .short _0223E616 - _0223E58E - 2 ; case 4 + .short _0223E62E - _0223E58E - 2 ; case 5 + .short _0223E65E - _0223E58E - 2 ; case 6 + .short _0223E66E - _0223E58E - 2 ; case 7 + .short _0223E68A - _0223E58E - 2 ; case 8 + .short _0223E69E - _0223E58E - 2 ; case 9 + .short _0223E6B8 - _0223E58E - 2 ; case 10 + .short _0223E6D2 - _0223E58E - 2 ; case 11 +_0223E5A6: + add r0, r0, #1 + str r0, [r4, #0] +_0223E5AA: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_0223E5B0: + ldr r0, [r4, #0x48] + mov r1, #0 + bl ov6_022401D0 + mov r0, #0 + str r0, [r4, #4] + str r0, [r4, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E5C6: + ldr r0, [r4, #4] + mov r5, #0 + cmp r0, #0xc + beq _0223E5FC + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #8 + blt _0223E5FE + ldr r2, [r4, #4] + mov r1, #0x1f + lsr r5, r2, #0x1f + lsl r3, r2, #0x1f + sub r3, r3, r5 + ror r3, r1 + ldr r0, [r4, #0x48] + add r1, r5, r3 + bl ov6_02240364 + add r5, r0, #0 + beq _0223E5FE + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _0223E5FE +_0223E5FC: + mov r5, #1 +_0223E5FE: + ldr r0, [r4, #0x48] + bl ov6_022405D0 + cmp r0, #0 + beq _0223E6D2 + cmp r5, #0 + beq _0223E6D2 + mov r0, #0 + str r0, [r4, #8] + mov r0, #4 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E616: + ldr r0, [r4, #0x48] + mov r1, #0 + mov r2, #0x3c + bl ov6_02240364 + cmp r0, #0 + beq _0223E6D2 + mov r0, #0 + str r0, [r4, #8] + mov r0, #0xb + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E62E: + add r0, r4, #0 + add r0, #0x6c + bl ov6_0223E71C + add r6, r0, #0 + ldr r0, [r4, #0x6c] + cmp r0, #3 + bne _0223E652 + ldr r0, [r4, #0x74] + bl ov6_02240060 + cmp r0, #0xd + bne _0223E652 + mov r0, #4 + add r1, r5, #0 + bl ov6_02240B9C + str r0, [r4, #0x54] +_0223E652: + cmp r6, #1 + bne _0223E6D2 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E65E: + add r0, r4, #0 + add r0, #0xc + bl ov6_0223E198 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E66E: + add r0, r4, #0 + add r0, #0xc + bl ov6_0223E140 + add r0, r4, #0 + add r0, #0xc + bl ov6_0223E1AC + cmp r0, #5 + bne _0223E6D2 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E68A: + ldr r0, [r4, #0x54] + mov r1, #0 + bl ov6_02240C44 + mov r0, #0x48 + str r0, [r4, #4] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0223E69E: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0 + bgt _0223E6B8 + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + bl ov6_0223E318 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_0223E6B8: + ldr r0, [r4, #0x54] + bl ov6_02240C7C + cmp r0, #1 + bne _0223E6D2 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov6_0223E318 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_0223E6D2: + pop {r4, r5, r6, pc} + thumb_func_end ov6_0223E574 + + thumb_func_start ov6_0223E6D4 +ov6_0223E6D4: ; 0x0223E6D4 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0x48] + bl ov6_02240228 + ldr r0, [r4, #0x54] + cmp r0, #0 + beq _0223E6E8 + bl ov6_02240C94 +_0223E6E8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223E6D4 + + thumb_func_start ov6_0223E6EC +ov6_0223E6EC: ; 0x0223E6EC + ldr r0, [r0, #4] + ldr r3, _0223E6F8 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _0223E6FC ; =0x02248E90 + bx r3 + nop +_0223E6F8: .word ov5_021D1B6C +_0223E6FC: .word 0x02248E90 + thumb_func_end ov6_0223E6EC + + thumb_func_start ov6_0223E700 +ov6_0223E700: ; 0x0223E700 + ldr r3, _0223E704 ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_0223E704: .word ov5_021D1BEC + thumb_func_end ov6_0223E700 + + thumb_func_start ov6_0223E708 +ov6_0223E708: ; 0x0223E708 + push {r3, lr} + bl ov5_021D1C2C + ldr r0, [r0, #0] + cmp r0, #0xb + bne _0223E718 + mov r0, #1 + pop {r3, pc} +_0223E718: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov6_0223E708 + + thumb_func_start ov6_0223E71C +ov6_0223E71C: ; 0x0223E71C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #4 + bhi _0223E7B0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223E732: ; jump table + .short _0223E73C - _0223E732 - 2 ; case 0 + .short _0223E74C - _0223E732 - 2 ; case 1 + .short _0223E764 - _0223E732 - 2 ; case 2 + .short _0223E784 - _0223E732 - 2 ; case 3 + .short _0223E7A4 - _0223E732 - 2 ; case 4 +_0223E73C: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + bpl _0223E7B0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223E7B0 +_0223E74C: + ldr r0, [r4, #8] + mov r1, #0xd + mov r2, #4 + mov r3, #8 + bl ov6_02240000 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0x10 + str r0, [r4, #4] + b _0223E7B0 +_0223E764: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + bpl _0223E7B0 + ldr r0, [r4, #8] + mov r1, #0xd + mov r2, #4 + mov r3, #8 + bl ov6_02240000 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0x10 + str r0, [r4, #4] + b _0223E7B0 +_0223E784: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + bpl _0223E7B0 + ldr r0, [r4, #8] + mov r1, #0xd + mov r2, #4 + mov r3, #0x20 + bl ov6_02240000 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0x28 + str r0, [r4, #4] + b _0223E7B0 +_0223E7A4: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + bpl _0223E7B0 + mov r0, #1 + pop {r4, pc} +_0223E7B0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_0223E71C + + thumb_func_start ov6_0223E7B4 +ov6_0223E7B4: ; 0x0223E7B4 + push {r4, r5, r6, lr} + ldr r0, [r1, #0x38] + mov r1, #0 + add r4, r2, #0 + bl sub_0206251C + add r5, r0, #0 + bne _0223E7C8 + bl sub_02022974 +_0223E7C8: + add r0, r5, #0 + bl sub_02063020 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r5, #0 + bl sub_02063040 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + mov r0, #4 + bl ov6_02240768 + add r1, r6, #0 + mov r2, #0 + add r3, r5, #0 + str r0, [r4, #0] + bl ov6_0224077C + pop {r4, r5, r6, pc} + thumb_func_end ov6_0223E7B4 + + thumb_func_start ov6_0223E7F0 +ov6_0223E7F0: ; 0x0223E7F0 + ldr r3, _0223E7F8 ; =ov6_02240774 + ldr r0, [r2, #0] + bx r3 + nop +_0223E7F8: .word ov6_02240774 + thumb_func_end ov6_0223E7F0 + + thumb_func_start ov6_0223E7FC +ov6_0223E7FC: ; 0x0223E7FC + ldr r3, _0223E804 ; =ov6_022407A8 + ldr r0, [r2, #0] + bx r3 + nop +_0223E804: .word ov6_022407A8 + thumb_func_end ov6_0223E7FC + + thumb_func_start ov6_0223E808 +ov6_0223E808: ; 0x0223E808 + ldr r3, _0223E810 ; =ov6_022407B0 + ldr r0, [r2, #0] + bx r3 + nop +_0223E810: .word ov6_022407B0 + thumb_func_end ov6_0223E808 + + thumb_func_start ov6_0223E814 +ov6_0223E814: ; 0x0223E814 + ldr r0, [r0, #4] + ldr r3, _0223E820 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _0223E824 ; =0x02248E78 + bx r3 + nop +_0223E820: .word ov5_021D1B6C +_0223E824: .word 0x02248E78 + thumb_func_end ov6_0223E814 + + thumb_func_start ov6_0223E828 +ov6_0223E828: ; 0x0223E828 + ldr r3, _0223E82C ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_0223E82C: .word ov5_021D1BEC + thumb_func_end ov6_0223E828 + + thumb_func_start ov6_0223E830 +ov6_0223E830: ; 0x0223E830 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r1, #0 + ldr r0, _0223E8B8 ; =0x00001701 + ldr r1, [r5, #0x24] + add r4, r2, #0 + bl sub_02020910 + ldr r0, _0223E8BC ; =0x000C8A55 + ldr r1, [r5, #0x24] + bl sub_02020A50 + ldr r0, _0223E8C0 ; =0x002280EF + str r0, [sp, #8] + ldr r0, _0223E8C4 ; =0x000CA424 + str r0, [sp, #0xc] + ldr r0, _0223E8C8 ; =0x00268C50 + str r0, [sp, #0x10] + ldr r1, [r5, #0x24] + add r0, sp, #8 + bl sub_02020ACC + ldr r1, _0223E8CC ; =0x000022A2 + add r0, sp, #0 + strh r1, [r0] + mov r1, #0x3e + lsl r1, r1, #0xa + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + ldr r1, [r5, #0x24] + add r0, sp, #0 + bl sub_020209D4 + mov r0, #2 + mov r1, #0x7d + ldr r2, [r5, #0x24] + lsl r0, r0, #0xc + lsl r1, r1, #0x10 + bl sub_020206BC + mov r0, #4 + bl ov6_022409F4 + str r0, [r4, #4] + mov r0, #4 + bl ov6_02240AC8 + str r0, [r4, #8] + ldr r1, [r5, #0x24] + add r0, sp, #8 + bl sub_02020AAC + ldr r0, [r4, #4] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl ov6_02240A18 + ldr r0, [r4, #8] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl ov6_02240AEC + add sp, #0x14 + pop {r4, r5, pc} + nop +_0223E8B8: .word 0x00001701 +_0223E8BC: .word 0x000C8A55 +_0223E8C0: .word 0x002280EF +_0223E8C4: .word 0x000CA424 +_0223E8C8: .word 0x00268C50 +_0223E8CC: .word 0x000022A2 + thumb_func_end ov6_0223E830 + + thumb_func_start ov6_0223E8D0 +ov6_0223E8D0: ; 0x0223E8D0 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r1, #0 + ldr r0, _0223E968 ; =0x00000F81 + ldr r1, [r5, #0x24] + add r4, r2, #0 + bl sub_02020910 + ldr r0, _0223E96C ; =0x0017E532 + ldr r1, [r5, #0x24] + bl sub_02020A50 + ldr r0, _0223E970 ; =0x00F99D58 + str r0, [sp, #8] + ldr r0, _0223E974 ; =0x000C5502 + str r0, [sp, #0xc] + ldr r0, _0223E978 ; =0x028CF549 + str r0, [sp, #0x10] + ldr r1, [r5, #0x24] + add r0, sp, #8 + bl sub_02020ACC + ldr r1, _0223E97C ; =0x00000642 + add r0, sp, #0 + strh r1, [r0] + ldr r1, _0223E980 ; =0x0000EDA0 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + ldr r1, [r5, #0x24] + add r0, sp, #0 + bl sub_020209D4 + mov r0, #0x16 + mov r1, #0x7d + ldr r2, [r5, #0x24] + lsl r0, r0, #0xe + lsl r1, r1, #0x10 + bl sub_020206BC + add r0, r5, #0 + add r0, #0x4c + bl ov5_021D5278 + ldr r0, [r5, #0x44] + mov r1, #3 + bl ov5_021D521C + str r0, [r5, #0x4c] + mov r0, #4 + bl ov6_022409F4 + str r0, [r4, #4] + mov r0, #4 + bl ov6_02240AC8 + str r0, [r4, #8] + ldr r1, [r5, #0x24] + add r0, sp, #8 + bl sub_02020AAC + ldr r0, [r4, #4] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl ov6_02240A50 + ldr r0, [r4, #8] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl ov6_02240B24 + add sp, #0x14 + pop {r4, r5, pc} + nop +_0223E968: .word 0x00000F81 +_0223E96C: .word 0x0017E532 +_0223E970: .word 0x00F99D58 +_0223E974: .word 0x000C5502 +_0223E978: .word 0x028CF549 +_0223E97C: .word 0x00000642 +_0223E980: .word 0x0000EDA0 + thumb_func_end ov6_0223E8D0 + + thumb_func_start ov6_0223E984 +ov6_0223E984: ; 0x0223E984 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r1, #0 + ldr r0, _0223EA1C ; =0x000004C1 + ldr r1, [r5, #0x24] + add r4, r2, #0 + bl sub_02020910 + ldr r0, _0223EA20 ; =0x0026BEC1 + ldr r1, [r5, #0x24] + bl sub_02020A50 + ldr r0, _0223EA24 ; =0x01DF5DFD + str r0, [sp, #8] + ldr r0, _0223EA28 ; =0x00073A0C + str r0, [sp, #0xc] + ldr r0, _0223EA2C ; =0x02B9F4A2 + str r0, [sp, #0x10] + ldr r1, [r5, #0x24] + add r0, sp, #8 + bl sub_02020ACC + ldr r1, _0223EA30 ; =0x000004C2 + add r0, sp, #0 + strh r1, [r0] + mov r1, #0x29 + lsl r1, r1, #6 + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + ldr r1, [r5, #0x24] + add r0, sp, #0 + bl sub_020209D4 + mov r0, #0xb + ldr r1, _0223EA34 ; =0x005C8000 + ldr r2, [r5, #0x24] + lsl r0, r0, #0x10 + bl sub_020206BC + add r0, r5, #0 + add r0, #0x4c + bl ov5_021D5278 + ldr r0, [r5, #0x44] + mov r1, #3 + bl ov5_021D521C + str r0, [r5, #0x4c] + mov r0, #4 + bl ov6_022409F4 + str r0, [r4, #4] + mov r0, #4 + bl ov6_02240AC8 + str r0, [r4, #8] + ldr r1, [r5, #0x24] + add r0, sp, #8 + bl sub_02020AAC + ldr r0, [r4, #4] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl ov6_02240A8C + ldr r0, [r4, #8] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + bl ov6_02240B60 + add sp, #0x14 + pop {r4, r5, pc} + nop +_0223EA1C: .word 0x000004C1 +_0223EA20: .word 0x0026BEC1 +_0223EA24: .word 0x01DF5DFD +_0223EA28: .word 0x00073A0C +_0223EA2C: .word 0x02B9F4A2 +_0223EA30: .word 0x000004C2 +_0223EA34: .word 0x005C8000 + thumb_func_end ov6_0223E984 + + thumb_func_start ov6_0223EA38 +ov6_0223EA38: ; 0x0223EA38 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #4] + bl ov6_02240A00 + ldr r0, [r4, #8] + bl ov6_02240AD4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223EA38 + + thumb_func_start ov6_0223EA4C +ov6_0223EA4C: ; 0x0223EA4C + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #4] + bl ov6_02240A08 + ldr r0, [r4, #8] + bl ov6_02240ADC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223EA4C + + thumb_func_start ov6_0223EA60 +ov6_0223EA60: ; 0x0223EA60 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #4] + bl ov6_02240A10 + ldr r0, [r4, #8] + bl ov6_02240AE4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223EA60 + + thumb_func_start ov6_0223EA74 +ov6_0223EA74: ; 0x0223EA74 + lsl r2, r1, #2 + ldr r1, _0223EA88 ; =0x02248E2C + ldr r3, _0223EA8C ; =ov5_021D1B6C + ldr r2, [r1, r2] + ldr r1, _0223EA90 ; =0x02249860 + str r2, [r1, #8] + ldr r0, [r0, #4] + ldr r1, _0223EA94 ; =0x02249860 + ldr r0, [r0, #4] + bx r3 + ; .align 2, 0 +_0223EA88: .word 0x02248E2C +_0223EA8C: .word ov5_021D1B6C +_0223EA90: .word 0x02249860 +_0223EA94: .word 0x02249860 + thumb_func_end ov6_0223EA74 + + thumb_func_start ov6_0223EA98 +ov6_0223EA98: ; 0x0223EA98 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0xac + mov r1, #4 + bl sub_02006C24 + add r6, r0, #0 + ldr r0, [r5, #0x10] + ldr r2, _0223EB2C ; =0x02248E48 + lsl r4, r0, #3 + add r0, r5, #0 + ldr r2, [r2, r4] + add r0, #0x9c + add r1, r6, #0 + mov r3, #4 + bl sub_020170D8 + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x24 + add r1, #0x9c + bl sub_02017258 + mov r1, #0 + add r0, r5, #0 + add r0, #0x24 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02017350 + mov r1, #1 + lsl r1, r1, #0xc + add r0, r5, #0 + add r0, #0x24 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201736C + add r0, r5, #0 + add r0, #0x24 + mov r1, #1 + bl sub_02017348 + mov r0, #4 + str r0, [sp] + add r0, r5, #0 + ldr r3, _0223EB30 ; =0x02248E4C + add r0, #0xc0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r5, #0 + ldr r3, [r3, r4] + add r0, #0xac + add r1, #0x9c + add r2, r6, #0 + bl sub_02017164 + add r0, r5, #0 + add r0, #0xac + mov r1, #0 + bl sub_02017240 + add r0, r5, #0 + add r5, #0xac + add r0, #0x24 + add r1, r5, #0 + bl sub_0201727C + add r0, r6, #0 + bl sub_02006CA8 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223EB2C: .word 0x02248E48 +_0223EB30: .word 0x02248E4C + thumb_func_end ov6_0223EA98 + + thumb_func_start ov6_0223EB34 +ov6_0223EB34: ; 0x0223EB34 + push {r4, lr} + add r4, r0, #0 + add r0, #0x9c + bl sub_02017110 + add r0, r4, #0 + add r4, #0xc0 + add r0, #0xac + add r1, r4, #0 + bl sub_020171A0 + pop {r4, pc} + thumb_func_end ov6_0223EB34 + + thumb_func_start ov6_0223EB4C +ov6_0223EB4C: ; 0x0223EB4C + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + add r0, r5, #0 + bl ov6_02240074 + str r0, [r4, #8] + mov r0, #0 + strh r0, [r4, #0xc] + str r0, [r4, #0x10] + str r0, [r4, #0x1c] + str r0, [r4, #0x14] + str r0, [r4, #0x18] + add r0, r4, #0 + mov r1, #0x1e + add r0, #0xd0 + str r1, [r0, #0] + add r0, r1, #0 + add r0, #0xe6 + add r1, #0xe6 + str r5, [r4, r0] + ldr r0, [r4, r1] + mov r1, #1 + ldr r0, [r0, #0x38] + bl sub_0206251C + mov r1, #0x42 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + mov r1, #0 + ldr r0, [r0, #0x38] + bl sub_0206251C + mov r1, #0x43 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #8 + ldr r0, [r4, r1] + bl sub_0205EF3C + bl sub_0205EB3C + mov r1, #0x11 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + add r0, #0xc0 + mov r1, #4 + mov r2, #0x20 + bl sub_020182CC + add r0, r4, #0 + bl ov6_0223EA98 + mov r1, #0xc + ldrsh r1, [r4, r1] + ldr r0, _0223EBCC ; =0x0400006C + bl sub_020BDEC4 + mov r0, #0 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223EBCC: .word 0x0400006C + thumb_func_end ov6_0223EB4C + + thumb_func_start ov6_0223EBD0 +ov6_0223EBD0: ; 0x0223EBD0 + ldr r3, _0223EBD8 ; =ov6_022400A8 + ldr r0, [r2, #8] + bx r3 + nop +_0223EBD8: .word ov6_022400A8 + thumb_func_end ov6_0223EBD0 + + thumb_func_start ov6_0223EBDC +ov6_0223EBDC: ; 0x0223EBDC + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r1, [r4, #0x18] + cmp r1, #5 + bgt _0223EC04 + cmp r1, #0 + blt _0223EC0A + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223EBF8: ; jump table + .short _0223EC0C - _0223EBF8 - 2 ; case 0 + .short _0223EC60 - _0223EBF8 - 2 ; case 1 + .short _0223ECD8 - _0223EBF8 - 2 ; case 2 + .short _0223ED1C - _0223EBF8 - 2 ; case 3 + .short _0223ED8E - _0223EBF8 - 2 ; case 4 + .short _0223EDD0 - _0223EBF8 - 2 ; case 5 +_0223EC04: + cmp r1, #0x63 + bne _0223EC0A + b _0223EE3C +_0223EC0A: + b _0223EE42 +_0223EC0C: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223EE54 ; =0x0023D000 + add r0, #0xd4 + str r1, [r0, #0] + mov r1, #0x5a + add r0, r4, #0 + lsl r1, r1, #0xe + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x14 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #0x14 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223EE4C +_0223EC60: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r2, sp, #0xc + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r1, r4, #0 + add r3, r4, #0 + add r1, #0xe4 + add r3, #0xf4 + add r6, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223ECBA + cmp r6, #0 + bne _0223ECBC +_0223ECBA: + b _0223EE4C +_0223ECBC: + mov r0, #4 + str r0, [sp] + mov r0, #0 + mov r1, #0x1e + str r0, [sp, #4] + lsl r1, r1, #4 + add r2, r0, #0 + mov r3, #0x64 + bl sub_020059D0 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223EE4C +_0223ECD8: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + mov r1, #0x6f + add r0, r4, #0 + lsl r1, r1, #0xe + add r0, #0xd4 + str r1, [r0, #0] + mov r1, #0x5a + add r0, r4, #0 + lsl r1, r1, #0xe + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x14 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223EE4C +_0223ED1C: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r1, [r0, #0] + lsl r0, r1, #3 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xd8 + ldr r2, [r1, #0] + lsl r1, r0, #1 + add r0, r0, r1 + add r1, r2, r0 + add r0, r4, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, r4, #0 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0xe4 + add r3, #0xd8 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223EE4C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223EE4C +_0223ED8E: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223EE58 ; =0x001FB000 + add r0, #0xd4 + str r1, [r0, #0] + mov r1, #0x5a + add r0, r4, #0 + lsl r1, r1, #0xe + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x14 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223EE4C +_0223EDD0: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + lsl r0, r0, #0x12 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xd8 + ldr r2, [r1, #0] + lsl r1, r0, #1 + add r0, r0, r1 + sub r1, r2, r0 + add r0, r4, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, r4, #0 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0xe4 + add r3, #0xd8 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223EE4C + mov r0, #0x63 + str r0, [r4, #0x18] + b _0223EE4C +_0223EE3C: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] +_0223EE42: + mov r0, #0 + str r0, [r4, #0x18] + add sp, #0x14 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0223EE4C: + mov r0, #0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_0223EE54: .word 0x0023D000 +_0223EE58: .word 0x001FB000 + thumb_func_end ov6_0223EBDC + + thumb_func_start ov6_0223EE5C +ov6_0223EE5C: ; 0x0223EE5C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r1, [r4, #0x18] + cmp r1, #0x63 + bgt _0223EEAA + blt _0223EE6C + b _0223F5A2 +_0223EE6C: + cmp r1, #0x14 + bls _0223EE74 + bl _0223F6CA +_0223EE74: + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223EE80: ; jump table + .short _0223EEB4 - _0223EE80 - 2 ; case 0 + .short _0223EF0C - _0223EE80 - 2 ; case 1 + .short _0223EF76 - _0223EE80 - 2 ; case 2 + .short _0223EFB6 - _0223EE80 - 2 ; case 3 + .short _0223F02A - _0223EE80 - 2 ; case 4 + .short _0223F048 - _0223EE80 - 2 ; case 5 + .short _0223F0B2 - _0223EE80 - 2 ; case 6 + .short _0223F10A - _0223EE80 - 2 ; case 7 + .short _0223F1B0 - _0223EE80 - 2 ; case 8 + .short _0223F1E6 - _0223EE80 - 2 ; case 9 + .short _0223F252 - _0223EE80 - 2 ; case 10 + .short _0223F2AA - _0223EE80 - 2 ; case 11 + .short _0223F338 - _0223EE80 - 2 ; case 12 + .short _0223F38C - _0223EE80 - 2 ; case 13 + .short _0223F40C - _0223EE80 - 2 ; case 14 + .short _0223F43E - _0223EE80 - 2 ; case 15 + .short _0223F474 - _0223EE80 - 2 ; case 16 + .short _0223F496 - _0223EE80 - 2 ; case 17 + .short _0223F4C6 - _0223EE80 - 2 ; case 18 + .short _0223F4CE - _0223EE80 - 2 ; case 19 + .short _0223F514 - _0223EE80 - 2 ; case 20 +_0223EEAA: + cmp r1, #0x64 + bne _0223EEB0 + b _0223F668 +_0223EEB0: + bl _0223F6CA +_0223EEB4: + add r1, r4, #0 + mov r0, #0 + add r1, #0xd0 + str r0, [r1, #0] + add r1, r4, #0 + ldr r2, _0223F19C ; =0x0022B000 + add r1, #0xd4 + str r2, [r1, #0] + add r1, r4, #0 + ldr r2, _0223F1A0 ; =0x0015B000 + add r1, #0xd8 + str r2, [r1, #0] + add r1, r4, #0 + add r1, #0xe0 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x20 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #0x20 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223EF0C: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r7, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, r4, #0 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r6, r4, #0 + add r1, r4, #0 + add r3, #0xf4 + add r6, #0xe0 + add r1, #0xe4 + add r0, r4, #0 + ldr r3, [r3, #0] + ldr r6, [r6, #0] + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + add r0, #0x24 + add r3, r3, r6 + bl sub_02017350 + cmp r5, #0 + beq _0223F020 + cmp r7, #0 + beq _0223F020 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223EF76: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F1A4 ; =0x001FB000 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F1A0 ; =0x0015B000 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x20 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223EFB6: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r1, [r0, #0] + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xd8 + ldr r2, [r1, #0] + lsl r1, r0, #1 + add r0, r0, r1 + add r1, r2, r0 + add r0, r4, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, r4, #0 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0xe4 + add r3, #0xd8 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + bne _0223F022 +_0223F020: + b _0223F6D4 +_0223F022: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F02A: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r3, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, #0xd8 + bl sub_02017358 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] +_0223F048: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r0, r4, #0 + add r0, #0xd0 + ldr r1, [r0, #0] + mov r0, #0xb + mul r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xd8 + add r3, r4, #0 + ldr r1, [r1, #0] + lsl r0, r0, #1 + sub r1, r1, r0 + add r0, r4, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, #0xd8 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0x40 + blt _0223F190 + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F0B2: + add r1, r4, #0 + mov r0, #0 + add r1, #0xd0 + str r0, [r1, #0] + add r1, r4, #0 + ldr r2, _0223F1A8 ; =0x001D1000 + add r1, #0xd4 + str r2, [r1, #0] + add r1, r4, #0 + ldr r2, _0223F1AC ; =0x001F2000 + add r1, #0xd8 + str r2, [r1, #0] + add r1, r4, #0 + add r1, #0xdc + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x20 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #0x20 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F10A: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xdc + add r3, r4, #0 + ldr r1, [r1, #0] + lsl r0, r0, #2 + sub r1, r1, r0 + add r0, r4, #0 + add r0, #0xdc + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0xe4 + ldr r2, [r1, #0] + add r1, r4, #0 + add r1, #0xdc + ldr r1, [r1, #0] + add r3, #0xf4 + add r0, r4, #0 + add r1, r2, r1 + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223F190 + cmp r6, #0 + bne _0223F192 +_0223F190: + b _0223F6D4 +_0223F192: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 + nop +_0223F19C: .word 0x0022B000 +_0223F1A0: .word 0x0015B000 +_0223F1A4: .word 0x001FB000 +_0223F1A8: .word 0x001D1000 +_0223F1AC: .word 0x001F2000 +_0223F1B0: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_0206296C + mov r0, #0x11 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02065638 + add r0, r4, #0 + add r3, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, #0xd8 + bl sub_02017358 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] +_0223F1E6: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r0, r4, #0 + add r0, #0xd0 + ldr r1, [r0, #0] + mov r0, #0xb + mul r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xd8 + ldr r1, [r1, #0] + add r3, r4, #0 + add r1, r1, r0 + add r0, r4, #0 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, #0xd8 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0x20 + blt _0223F32E + mov r0, #1 + str r0, [r4, #0x1c] + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F252: + add r1, r4, #0 + mov r0, #0 + add r1, #0xd0 + str r0, [r1, #0] + add r1, r4, #0 + ldr r2, _0223F5B0 ; =0x001F7000 + add r1, #0xd4 + str r2, [r1, #0] + add r1, r4, #0 + ldr r2, _0223F5B4 ; =0x001F9000 + add r1, #0xd8 + str r2, [r1, #0] + add r1, r4, #0 + add r1, #0xe0 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x20 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #0x20 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F2AA: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r7, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r1, [r0, #0] + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xe0 + add r3, r4, #0 + add r6, r4, #0 + ldr r1, [r1, #0] + lsl r0, r0, #1 + add r1, r1, r0 + add r0, r4, #0 + add r0, #0xe0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, #0xf4 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r1, r4, #0 + add r6, #0xe0 + add r1, #0xe4 + add r0, r4, #0 + ldr r3, [r3, #0] + ldr r6, [r6, #0] + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + add r0, #0x24 + add r3, r3, r6 + bl sub_02017350 + cmp r5, #0 + beq _0223F32E + cmp r7, #0 + bne _0223F330 +_0223F32E: + b _0223F6D4 +_0223F330: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F338: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F5B0 ; =0x001F7000 + add r0, #0xd4 + str r1, [r0, #0] + mov r1, #0x79 + add r0, r4, #0 + lsl r1, r1, #0xe + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #8 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #8 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F38C: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r6, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #4 + blt _0223F3E6 + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0x10 + bge _0223F3E6 + add r0, r0, #2 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223F5B8 ; =0x0400006C + bl sub_020BDEC4 +_0223F3E6: + add r1, r4, #0 + add r3, r4, #0 + add r1, #0xe4 + add r3, #0xf4 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r6, #0 + beq _0223F48C + cmp r5, #0 + beq _0223F48C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F40C: + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0x10 + bge _0223F422 + add r0, r0, #2 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223F5B8 ; =0x0400006C + bl sub_020BDEC4 + b _0223F6D4 +_0223F422: + add r1, #0xfc + ldr r0, [r4, r1] + mov r1, #0 + bl sub_02062D64 + add r0, r4, #0 + add r0, #0x24 + mov r1, #0 + bl sub_02017348 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F43E: + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0 + ble _0223F454 + sub r0, r0, #1 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223F5B8 ; =0x0400006C + bl sub_020BDEC4 + b _0223F6D4 +_0223F454: + add r1, r4, #0 + mov r0, #0 + add r1, #0xd0 + str r0, [r1, #0] + mov r1, #4 + str r1, [sp] + ldr r1, _0223F5BC ; =0x000001E1 + str r0, [sp, #4] + add r2, r0, #0 + mov r3, #0x64 + bl sub_020059D0 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F474: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0x3c + bge _0223F48E +_0223F48C: + b _0223F6D4 +_0223F48E: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F496: + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0x10 + bge _0223F4AC + add r0, r0, #2 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223F5B8 ; =0x0400006C + bl sub_020BDEC4 + b _0223F6D4 +_0223F4AC: + add r1, #0xfc + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02062D64 + add r0, r4, #0 + add r0, #0x24 + mov r1, #1 + bl sub_02017348 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] +_0223F4C6: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F4CE: + add r0, r4, #0 + mov r2, #0 + add r0, #0xd0 + str r2, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F5C0 ; =0x0015D000 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xdc + str r2, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r0, r4, #0 + add r2, r4, #0 + ldr r1, [sp, #0x10] + add r0, #0xd4 + str r1, [r0, #0] + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #0x20 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F514: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0 + ble _0223F554 + sub r0, r0, #1 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223F5B8 ; =0x0400006C + bl sub_020BDEC4 +_0223F554: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + lsl r0, r1, #2 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D264 + add r1, r4, #0 + add r1, #0xdc + ldr r1, [r1, #0] + lsl r0, r0, #3 + add r1, r1, r0 + add r0, r4, #0 + add r0, #0xdc + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0xd4 + ldr r2, [r1, #0] + add r1, r4, #0 + add r1, #0xdc + ldr r1, [r1, #0] + add r3, r4, #0 + add r3, #0xf4 + add r0, r4, #0 + add r1, r2, r1 + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + bne _0223F59C + b _0223F6D4 +_0223F59C: + mov r0, #0x63 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F5A2: + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + ldr r0, [r4, #0x10] + lsl r1, r0, #3 + ldr r0, _0223F5C4 ; =0x02248EA8 + b _0223F5C8 + ; .align 2, 0 +_0223F5B0: .word 0x001F7000 +_0223F5B4: .word 0x001F9000 +_0223F5B8: .word 0x0400006C +_0223F5BC: .word 0x000001E1 +_0223F5C0: .word 0x0015D000 +_0223F5C4: .word 0x02248EA8 +_0223F5C8: + ldr r0, [r0, r1] + cmp r0, #0 + ble _0223F5E0 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0223F5EE +_0223F5E0: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0223F5EE: + bl sub_020E1740 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] + ldr r0, [r4, #0x10] + lsl r1, r0, #3 + ldr r0, _0223F740 ; =0x02248EAC + ldr r0, [r0, r1] + cmp r0, #0 + ble _0223F616 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0223F624 +_0223F616: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0223F624: + bl sub_020E1740 + add r1, r4, #0 + add r1, #0xd8 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #0x14 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #0x14 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F668: + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r6, r0, #0 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, r4, #0 + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0xe4 + add r3, #0xf4 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223F6D4 + cmp r6, #0 + beq _0223F6D4 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F6D4 +_0223F6CA: + mov r0, #0 + str r0, [r4, #0x18] + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223F6D4: + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0223F738 + cmp r0, #0x14 + bne _0223F6F6 + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0206296C + mov r0, #0x11 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02065638 +_0223F6F6: + ldr r0, [r4, #0x1c] + cmp r0, #0x28 + bne _0223F714 + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_0206296C + mov r0, #0x11 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #3 + bl sub_02065638 +_0223F714: + ldr r0, [r4, #0x1c] + cmp r0, #0x32 + bne _0223F732 + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0206296C + mov r0, #0x11 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02065638 +_0223F732: + ldr r0, [r4, #0x1c] + add r0, r0, #1 + str r0, [r4, #0x1c] +_0223F738: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223F740: .word 0x02248EAC + thumb_func_end ov6_0223EE5C + + thumb_func_start ov6_0223F744 +ov6_0223F744: ; 0x0223F744 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r1, [r4, #0x18] + cmp r1, #6 + bgt _0223F76E + cmp r1, #0 + blt _0223F774 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223F760: ; jump table + .short _0223F776 - _0223F760 - 2 ; case 0 + .short _0223F7C8 - _0223F760 - 2 ; case 1 + .short _0223F82A - _0223F760 - 2 ; case 2 + .short _0223F87C - _0223F760 - 2 ; case 3 + .short _0223F8F2 - _0223F760 - 2 ; case 4 + .short _0223F946 - _0223F760 - 2 ; case 5 + .short _0223F9A8 - _0223F760 - 2 ; case 6 +_0223F76E: + cmp r1, #0x63 + bne _0223F774 + b _0223F9C6 +_0223F774: + b _0223F9CC +_0223F776: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F9DC ; =0x0025E000 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F9E0 ; =0x00172000 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #8 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #8 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F7C8: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r2, sp, #0xc + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r1, r4, #0 + add r3, r4, #0 + add r1, #0xe4 + add r3, #0xf4 + add r6, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223F8D2 + cmp r6, #0 + beq _0223F8D2 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F82A: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F9E4 ; =0x001B6000 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F9E8 ; =0x001BA000 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #8 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #8 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F87C: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r2, sp, #0xc + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r1, r4, #0 + add r3, r4, #0 + add r1, #0xe4 + add r3, #0xf4 + add r6, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + bne _0223F8D4 +_0223F8D2: + b _0223F9D6 +_0223F8D4: + cmp r6, #0 + beq _0223F9D6 + mov r0, #4 + str r0, [sp] + mov r0, #0 + ldr r1, _0223F9EC ; =0x000001E2 + str r0, [sp, #4] + add r2, r0, #0 + mov r3, #0x64 + bl sub_020059D0 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F8F2: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + mov r1, #0x7e + add r0, r4, #0 + lsl r1, r1, #0xe + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223F9F0 ; =0x00151000 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r2, sp, #0xc + add r3, sp, #8 + bl sub_02017358 + add r2, r4, #0 + add r2, #0xd4 + add r0, r4, #0 + ldr r1, [sp, #0x10] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #8 + bl ov6_0223FD0C + add r2, r4, #0 + add r2, #0xd8 + add r0, r4, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #8 + bl ov6_0223FD0C + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F946: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r2, sp, #0xc + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x24 + add r1, sp, #0x10 + add r3, sp, #8 + bl sub_02017358 + add r1, r4, #0 + add r1, #0xd0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r4, #0 + add r1, #0xd0 + add r5, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r1, r4, #0 + add r3, r4, #0 + add r1, #0xe4 + add r3, #0xf4 + add r6, r0, #0 + add r0, r4, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #0xc] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r5, #0 + beq _0223F9D6 + cmp r6, #0 + beq _0223F9D6 + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F9A8: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0xf + ble _0223F9D6 + mov r0, #0x63 + str r0, [r4, #0x18] + b _0223F9D6 +_0223F9C6: + ldr r0, [r4, #0x18] + add r0, r0, #1 + str r0, [r4, #0x18] +_0223F9CC: + mov r0, #0 + str r0, [r4, #0x18] + add sp, #0x14 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0223F9D6: + mov r0, #0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223F9DC: .word 0x0025E000 +_0223F9E0: .word 0x00172000 +_0223F9E4: .word 0x001B6000 +_0223F9E8: .word 0x001BA000 +_0223F9EC: .word 0x000001E2 +_0223F9F0: .word 0x00151000 + thumb_func_end ov6_0223F744 + + thumb_func_start ov6_0223F9F4 +ov6_0223F9F4: ; 0x0223F9F4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r1, [r5, #0x14] + cmp r1, #0 + beq _0223FA0A + cmp r1, #1 + beq _0223FA36 + cmp r1, #2 + beq _0223FA88 + b _0223FAE8 +_0223FA0A: + ldr r1, [r5, #0x10] + cmp r1, #0 + beq _0223FA1A + cmp r1, #1 + beq _0223FA20 + cmp r1, #2 + beq _0223FA26 + b _0223FA2A +_0223FA1A: + bl ov6_0223EBDC + b _0223FA2A +_0223FA20: + bl ov6_0223F744 + b _0223FA2A +_0223FA26: + bl ov6_0223EE5C +_0223FA2A: + cmp r0, #0 + beq _0223FAEE + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + b _0223FAEE +_0223FA36: + mov r1, #0x7e + lsl r1, r1, #0xe + add r0, #0xd4 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, _0223FAF4 ; =0x001B7000 + add r0, #0xd8 + str r1, [r0, #0] + add r0, r5, #0 + mov r1, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0x24 + add r1, sp, #8 + add r2, sp, #4 + add r3, sp, #0 + bl sub_02017358 + add r2, r5, #0 + add r2, #0xd4 + add r0, r5, #0 + ldr r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0xe4 + mov r3, #6 + bl ov6_0223FD0C + add r2, r5, #0 + add r2, #0xd8 + add r0, r5, #0 + ldr r1, [sp] + ldr r2, [r2, #0] + add r0, #0xf4 + mov r3, #6 + bl ov6_0223FD0C + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + b _0223FAEE +_0223FA88: + add r0, #0x24 + add r1, sp, #8 + add r2, sp, #4 + add r3, sp, #0 + bl sub_02017358 + add r1, r5, #0 + add r1, #0xd0 + add r0, r5, #0 + ldr r1, [r1, #0] + add r0, #0xe4 + bl ov6_0223FD18 + add r1, r5, #0 + add r1, #0xd0 + add r4, r0, #0 + add r0, r5, #0 + ldr r1, [r1, #0] + add r0, #0xf4 + bl ov6_0223FD18 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r3, r5, #0 + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r1, r5, #0 + add r1, #0xe4 + add r3, #0xf4 + add r0, r5, #0 + ldr r1, [r1, #0] + ldr r2, [sp, #4] + ldr r3, [r3, #0] + add r0, #0x24 + bl sub_02017350 + cmp r4, #0 + beq _0223FAEE + cmp r6, #0 + beq _0223FAEE + ldr r0, [r5, #0x14] + add r0, r0, #1 + str r0, [r5, #0x14] + b _0223FAEE +_0223FAE8: + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0223FAEE: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223FAF4: .word 0x001B7000 + thumb_func_end ov6_0223F9F4 + + thumb_func_start ov6_0223FAF8 +ov6_0223FAF8: ; 0x0223FAF8 + push {r3, r4, r5, lr} + sub sp, #0x28 + ldr r5, _0223FCAC ; =0x02248E20 + add r3, r1, #0 + ldmia r5!, {r0, r1} + add r4, r2, #0 + add r2, sp, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r2, #0] + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223FB1C + cmp r0, #1 + beq _0223FBAE + cmp r0, #2 + beq _0223FBF8 + b _0223FC40 +_0223FB1C: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223FB36 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + b _0223FC74 +_0223FB36: + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0 + ble _0223FB4C + sub r0, r0, #1 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223FCB0 ; =0x0400006C + bl sub_020BDEC4 + b _0223FC74 +_0223FB4C: + ldr r1, [r3, #0x24] + add r0, sp, #0x1c + bl sub_02020AAC + ldr r5, _0223FCB4 ; =0x02248E14 + add r3, sp, #4 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r0, [r4, #0x10] + lsl r0, r0, #2 + ldr r0, [r2, r0] + cmp r0, #0 + ble _0223FB7E + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0223FB8C +_0223FB7E: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0223FB8C: + bl sub_020E1740 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0x63 + mov r3, #5 + add r0, #0x24 + lsl r2, r2, #0xc + lsl r3, r3, #0x12 + bl sub_02017350 + mov r0, #0 + str r0, [r4, #0x20] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223FC74 +_0223FBAE: + add r0, r4, #0 + bl ov6_0223F9F4 + cmp r0, #0 + beq _0223FBCA + ldr r0, _0223FCB8 ; =0x000006D6 + bl sub_02005748 + mov r0, #0 + str r0, [r4, #0x20] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223FBF8 +_0223FBCA: + ldr r0, [r4, #0x20] + add r2, r0, #1 + str r2, [r4, #0x20] + ldr r0, [r4, #0x10] + lsl r1, r0, #2 + add r0, sp, #0x10 + ldr r0, [r0, r1] + cmp r0, r2 + bge _0223FC74 + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0x10 + beq _0223FBF2 + add r0, r0, #2 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223FCB0 ; =0x0400006C + bl sub_020BDEC4 + b _0223FC74 +_0223FBF2: + mov r0, #0 + str r0, [r4, #0x20] + b _0223FC74 +_0223FBF8: + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0x10 + beq _0223FC0E + add r0, r0, #2 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223FCB0 ; =0x0400006C + bl sub_020BDEC4 + b _0223FC74 +_0223FC0E: + ldr r0, [r4, #0x10] + mov r1, #0x1e + add r0, r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + bl ov6_0223EB34 + ldr r0, [r4, #0x10] + cmp r0, #3 + beq _0223FC38 + add r0, r4, #0 + bl ov6_0223EA98 + mov r0, #0 + str r0, [r4, #0] + b _0223FC74 +_0223FC38: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223FC74 +_0223FC40: + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223FC5A + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xd0 + str r1, [r0, #0] + b _0223FC74 +_0223FC5A: + mov r1, #0xc + ldrsh r0, [r4, r1] + cmp r0, #0 + ble _0223FC70 + sub r0, r0, #1 + strh r0, [r4, #0xc] + ldrsh r1, [r4, r1] + ldr r0, _0223FCB0 ; =0x0400006C + bl sub_020BDEC4 + b _0223FC74 +_0223FC70: + mov r0, #6 + str r0, [r4, #0] +_0223FC74: + ldr r0, [r4, #0x10] + cmp r0, #3 + beq _0223FCA8 + ldr r1, _0223FCBC ; =0x04000454 + mov r0, #0 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xac + lsr r1, r1, #0xe + bl sub_020171CC + mov r1, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + add r4, #0x24 + add r0, r4, #0 + bl sub_02017294 + mov r2, #1 + mov r0, #0x12 + add r1, sp, #0 + str r2, [sp] + bl sub_020B275C +_0223FCA8: + add sp, #0x28 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223FCAC: .word 0x02248E20 +_0223FCB0: .word 0x0400006C +_0223FCB4: .word 0x02248E14 +_0223FCB8: .word 0x000006D6 +_0223FCBC: .word 0x04000454 + thumb_func_end ov6_0223FAF8 + + thumb_func_start ov6_0223FCC0 +ov6_0223FCC0: ; 0x0223FCC0 + ldr r3, _0223FCC8 ; =ov6_022400C4 + ldr r0, [r2, #8] + bx r3 + nop +_0223FCC8: .word ov6_022400C4 + thumb_func_end ov6_0223FCC0 + + thumb_func_start ov6_0223FCCC +ov6_0223FCCC: ; 0x0223FCCC + ldr r0, [r0, #4] + ldr r3, _0223FCD8 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _0223FCDC ; =0x02248E60 + bx r3 + nop +_0223FCD8: .word ov5_021D1B6C +_0223FCDC: .word 0x02248E60 + thumb_func_end ov6_0223FCCC + + thumb_func_start ov6_0223FCE0 +ov6_0223FCE0: ; 0x0223FCE0 + ldr r3, _0223FCE4 ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_0223FCE4: .word ov5_021D1BEC + thumb_func_end ov6_0223FCE0 + + thumb_func_start ov6_0223FCE8 +ov6_0223FCE8: ; 0x0223FCE8 + push {r3, lr} + bl ov5_021D1C2C + mov r1, #3 + str r1, [r0, #0] + pop {r3, pc} + thumb_func_end ov6_0223FCE8 + + thumb_func_start ov6_0223FCF4 +ov6_0223FCF4: ; 0x0223FCF4 + push {r3, lr} + bl ov5_021D1C2C + ldr r0, [r0, #0] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_0223FCF4 + + thumb_func_start ov6_0223FD00 +ov6_0223FD00: ; 0x0223FD00 + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0xc] + bx lr + thumb_func_end ov6_0223FD00 + + thumb_func_start ov6_0223FD0C +ov6_0223FD0C: ; 0x0223FD0C + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0xc] + bx lr + thumb_func_end ov6_0223FD0C + + thumb_func_start ov6_0223FD18 +ov6_0223FD18: ; 0x0223FD18 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r4, [r5, #0xc] + add r2, r1, #0 + cmp r2, r4 + blt _0223FD2A + add r2, r4, #0 + mov r6, #1 + b _0223FD2C +_0223FD2A: + mov r6, #0 +_0223FD2C: + ldr r0, [r5, #8] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + lsl r1, r4, #0xc + bl sub_020BCFD0 + ldr r1, [r5, #4] + add r0, r0, r1 + str r0, [r5, #0] + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_0223FD18 + + thumb_func_start ov6_0223FD58 +ov6_0223FD58: ; 0x0223FD58 + push {r3, lr} + bl sub_020170BC + pop {r3, pc} + thumb_func_end ov6_0223FD58 + + thumb_func_start ov6_0223FD60 +ov6_0223FD60: ; 0x0223FD60 + push {r3, lr} + bl sub_020170D8 + pop {r3, pc} + thumb_func_end ov6_0223FD60 + + thumb_func_start ov6_0223FD68 +ov6_0223FD68: ; 0x0223FD68 + ldr r3, _0223FD6C ; =sub_02017110 + bx r3 + ; .align 2, 0 +_0223FD6C: .word sub_02017110 + thumb_func_end ov6_0223FD68 + + thumb_func_start ov6_0223FD70 +ov6_0223FD70: ; 0x0223FD70 + push {r4, lr} + sub sp, #8 + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r4, [sp, #0x14] + str r4, [sp, #4] + bl sub_02017164 + add sp, #8 + pop {r4, pc} + thumb_func_end ov6_0223FD70 + + thumb_func_start ov6_0223FD84 +ov6_0223FD84: ; 0x0223FD84 + ldr r3, _0223FD88 ; =sub_020171A0 + bx r3 + ; .align 2, 0 +_0223FD88: .word sub_020171A0 + thumb_func_end ov6_0223FD84 + + thumb_func_start ov6_0223FD8C +ov6_0223FD8C: ; 0x0223FD8C + ldr r3, _0223FD94 ; =sub_020171CC + mov r1, #1 + lsl r1, r1, #0xc + bx r3 + ; .align 2, 0 +_0223FD94: .word sub_020171CC + thumb_func_end ov6_0223FD8C + + thumb_func_start ov6_0223FD98 +ov6_0223FD98: ; 0x0223FD98 + ldr r3, _0223FDA0 ; =sub_02017204 + mov r1, #1 + lsl r1, r1, #0xc + bx r3 + ; .align 2, 0 +_0223FDA0: .word sub_02017204 + thumb_func_end ov6_0223FD98 + + thumb_func_start ov6_0223FDA4 +ov6_0223FDA4: ; 0x0223FDA4 + ldr r3, _0223FDA8 ; =sub_02017240 + bx r3 + ; .align 2, 0 +_0223FDA8: .word sub_02017240 + thumb_func_end ov6_0223FDA4 + + thumb_func_start ov6_0223FDAC +ov6_0223FDAC: ; 0x0223FDAC + ldr r3, _0223FDB0 ; =sub_02017258 + bx r3 + ; .align 2, 0 +_0223FDB0: .word sub_02017258 + thumb_func_end ov6_0223FDAC + + thumb_func_start ov6_0223FDB4 +ov6_0223FDB4: ; 0x0223FDB4 + ldr r3, _0223FDB8 ; =sub_0201727C + bx r3 + ; .align 2, 0 +_0223FDB8: .word sub_0201727C + thumb_func_end ov6_0223FDB4 + + thumb_func_start ov6_0223FDBC +ov6_0223FDBC: ; 0x0223FDBC + ldr r3, _0223FDC0 ; =sub_02017294 + bx r3 + ; .align 2, 0 +_0223FDC0: .word sub_02017294 + thumb_func_end ov6_0223FDBC + + thumb_func_start ov6_0223FDC4 +ov6_0223FDC4: ; 0x0223FDC4 + ldr r3, _0223FDC8 ; =sub_02017348 + bx r3 + ; .align 2, 0 +_0223FDC8: .word sub_02017348 + thumb_func_end ov6_0223FDC4 + + thumb_func_start ov6_0223FDCC +ov6_0223FDCC: ; 0x0223FDCC + push {r3, lr} + bl sub_02017350 + pop {r3, pc} + thumb_func_end ov6_0223FDCC + + thumb_func_start ov6_0223FDD4 +ov6_0223FDD4: ; 0x0223FDD4 + push {r3, lr} + bl sub_0201736C + pop {r3, pc} + thumb_func_end ov6_0223FDD4 + + thumb_func_start ov6_0223FDDC +ov6_0223FDDC: ; 0x0223FDDC + ldr r3, _0223FDE0 ; =sub_02017388 + bx r3 + ; .align 2, 0 +_0223FDE0: .word sub_02017388 + thumb_func_end ov6_0223FDDC + + thumb_func_start ov6_0223FDE4 +ov6_0223FDE4: ; 0x0223FDE4 + push {r3, r4, r5, lr} + mov r1, #0x4c + add r5, r0, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x4c + add r4, r0, #0 + bl sub_020D5124 + add r0, r5, #0 + bl sub_020203AC + str r0, [r4, #0] + mov r0, #5 + str r0, [r4, #0x40] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov6_0223FDE4 + + thumb_func_start ov6_0223FE08 +ov6_0223FE08: ; 0x0223FE08 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020203B8 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0223FE08 + + thumb_func_start ov6_0223FE1C +ov6_0223FE1C: ; 0x0223FE1C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp] + add r4, r3, #0 + bl ov6_0223FF7C + ldr r0, [sp, #0x2c] + ldr r1, [r5, #0] + bl sub_020203C0 + ldr r1, [sp, #0x2c] + add r0, sp, #4 + bl sub_02020AAC + add r3, sp, #4 + add r2, r5, #0 + add r2, #0x28 + ldmia r3!, {r0, r1} + add r6, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, r6, #0 + str r0, [r2, #0] + add r2, r5, #0 + ldmia r3!, {r0, r1} + add r2, #0x34 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [r5, #0] + add r0, r6, #0 + bl sub_02020690 + ldr r0, [r5, #0] + bl sub_020203D4 + ldr r0, [sp, #0x2c] + mov r1, #0 + str r0, [r5, #4] + add r0, r5, #0 + add r0, #8 + add r2, r7, #0 + add r3, r4, #0 + bl ov6_0223FD0C + add r0, r5, #0 + ldr r2, [sp] + add r0, #0x18 + mov r1, #0 + add r3, r4, #0 + bl ov6_0223FD0C + ldr r0, [sp, #0x28] + str r0, [r5, #0x48] + ldr r0, _0223FE98 ; =0x000006D5 + bl sub_02005748 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FE98: .word 0x000006D5 + thumb_func_end ov6_0223FE1C + + thumb_func_start ov6_0223FE9C +ov6_0223FE9C: ; 0x0223FE9C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r1, [r4, #0x40] + cmp r1, #5 + bhi _0223FF68 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223FEB2: ; jump table + .short _0223FEBE - _0223FEB2 - 2 ; case 0 + .short _0223FEE0 - _0223FEB2 - 2 ; case 1 + .short _0223FF02 - _0223FEB2 - 2 ; case 2 + .short _0223FF28 - _0223FEB2 - 2 ; case 3 + .short _0223FF5C - _0223FEB2 - 2 ; case 4 + .short _0223FF68 - _0223FEB2 - 2 ; case 5 +_0223FEBE: + ldr r1, [r4, #0x44] + add r1, r1, #1 + str r1, [r4, #0x44] + bl ov6_0223FFC8 + add r5, r0, #0 + ldr r1, [r4, #8] + ldr r2, [r4, #0x18] + add r0, r4, #0 + bl ov6_0223FFE4 + cmp r5, #1 + bne _0223FF68 + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + pop {r3, r4, r5, pc} +_0223FEE0: + ldr r1, [r4, #0x44] + sub r1, r1, #1 + str r1, [r4, #0x44] + bl ov6_0223FFC8 + ldr r1, [r4, #8] + ldr r2, [r4, #0x18] + add r0, r4, #0 + bl ov6_0223FFE4 + ldr r0, [r4, #0x44] + cmp r0, #0 + bne _0223FF68 + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + pop {r3, r4, r5, pc} +_0223FF02: + ldr r1, [r4, #0x44] + add r1, r1, #1 + str r1, [r4, #0x44] + bl ov6_0223FFC8 + ldr r1, [r4, #8] + ldr r2, [r4, #0x18] + add r5, r0, #0 + add r0, r4, #0 + neg r1, r1 + neg r2, r2 + bl ov6_0223FFE4 + cmp r5, #1 + bne _0223FF68 + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + pop {r3, r4, r5, pc} +_0223FF28: + ldr r1, [r4, #0x44] + sub r1, r1, #1 + str r1, [r4, #0x44] + bl ov6_0223FFC8 + ldr r1, [r4, #8] + ldr r2, [r4, #0x18] + add r0, r4, #0 + neg r1, r1 + neg r2, r2 + bl ov6_0223FFE4 + ldr r0, [r4, #0x44] + cmp r0, #0 + bne _0223FF68 + ldr r0, [r4, #0x48] + sub r0, r0, #1 + str r0, [r4, #0x48] + beq _0223FF54 + mov r0, #0 + str r0, [r4, #0x40] + pop {r3, r4, r5, pc} +_0223FF54: + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] + pop {r3, r4, r5, pc} +_0223FF5C: + ldr r0, [r4, #4] + bl sub_020203D4 + ldr r0, [r4, #0x40] + add r0, r0, #1 + str r0, [r4, #0x40] +_0223FF68: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_0223FE9C + + thumb_func_start ov6_0223FF6C +ov6_0223FF6C: ; 0x0223FF6C + ldr r0, [r0, #0x40] + cmp r0, #5 + bne _0223FF76 + mov r0, #1 + bx lr +_0223FF76: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov6_0223FF6C + + thumb_func_start ov6_0223FF7C +ov6_0223FF7C: ; 0x0223FF7C + add r3, r0, #0 + add r3, #8 + mov r2, #0x10 + mov r1, #0 +_0223FF84: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _0223FF84 + add r3, r0, #0 + add r3, #0x18 + mov r2, #0x10 + mov r1, #0 +_0223FF94: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _0223FF94 + add r1, r0, #0 + add r3, r0, #0 + mov r2, #0 + add r1, #0x28 + add r3, #0x28 + strb r2, [r1] + strb r2, [r3, #1] + strb r2, [r3, #2] + strb r2, [r3, #3] + strb r2, [r3, #4] + strb r2, [r3, #5] + strb r2, [r3, #6] + strb r2, [r3, #7] + strb r2, [r3, #8] + strb r2, [r3, #9] + strb r2, [r3, #0xa] + strb r2, [r3, #0xb] + str r2, [r0, #0x40] + str r2, [r0, #0x44] + str r2, [r0, #0x48] + bx lr + ; .align 2, 0 + thumb_func_end ov6_0223FF7C + + thumb_func_start ov6_0223FFC8 +ov6_0223FFC8: ; 0x0223FFC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0x44] + add r0, #8 + bl ov6_0223FD18 + add r4, r0, #0 + add r0, r5, #0 + ldr r1, [r5, #0x44] + add r0, #0x18 + bl ov6_0223FD18 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov6_0223FFC8 + + thumb_func_start ov6_0223FFE4 +ov6_0223FFE4: ; 0x0223FFE4 + ldr r3, [r0, #0x34] + add r1, r3, r1 + str r1, [r0, #0x28] + ldr r1, [r0, #0x38] + add r1, r1, r2 + str r1, [r0, #0x2c] + bx lr + ; .align 2, 0 + thumb_func_end ov6_0223FFE4 + + thumb_func_start ov6_0223FFF4 +ov6_0223FFF4: ; 0x0223FFF4 + ldr r0, [r0, #0x48] + bx lr + thumb_func_end ov6_0223FFF4 + + thumb_func_start ov6_0223FFF8 +ov6_0223FFF8: ; 0x0223FFF8 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov6_0223FFF8 + + thumb_func_start ov6_0223FFFC +ov6_0223FFFC: ; 0x0223FFFC + str r1, [r0, #0x10] + bx lr + thumb_func_end ov6_0223FFFC + + thumb_func_start ov6_02240000 +ov6_02240000: ; 0x02240000 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x1c] + add r4, r1, #0 + add r7, r2, #0 + add r6, r3, #0 + cmp r0, #3 + beq _0224001E + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _0224001E + bl sub_0200DA58 + mov r0, #0 + str r0, [r5, #0x20] +_0224001E: + add r0, r5, #0 + mov r1, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov6_0223FD00 + mov r0, #0 + str r0, [r5, #0x10] + str r0, [r5, #0x1c] + str r6, [r5, #0x18] + str r4, [r5, #0x14] + ldr r0, _02240054 ; =0x0400006C + ldr r1, [r5, #0] + bl sub_020BDEC4 + mov r2, #1 + ldr r0, _02240058 ; =ov6_02240064 + add r1, r5, #0 + lsl r2, r2, #0xa + bl sub_0200DA3C + str r0, [r5, #0x20] + ldr r0, _0224005C ; =0x000006D4 + bl sub_02005748 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240054: .word 0x0400006C +_02240058: .word ov6_02240064 +_0224005C: .word 0x000006D4 + thumb_func_end ov6_02240000 + + thumb_func_start ov6_02240060 +ov6_02240060: ; 0x02240060 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov6_02240060 + + thumb_func_start ov6_02240064 +ov6_02240064: ; 0x02240064 + ldr r3, _0224006C ; =sub_020BDEC4 + ldr r0, _02240070 ; =0x0400006C + ldr r1, [r1, #0] + bx r3 + ; .align 2, 0 +_0224006C: .word sub_020BDEC4 +_02240070: .word 0x0400006C + thumb_func_end ov6_02240064 + + thumb_func_start ov6_02240074 +ov6_02240074: ; 0x02240074 + push {r3, r4, r5, lr} + mov r1, #5 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #6 + bl sub_02018144 + mov r2, #5 + mov r1, #0 + lsl r2, r2, #6 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x4b + str r5, [r4, #0] + mov r1, #5 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, #0x10 + add r0, r4, r0 + mov r1, #4 + mov r2, #0x20 + bl sub_020182CC + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02240074 + + thumb_func_start ov6_022400A8 +ov6_022400A8: ; 0x022400A8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x4b + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #5 + beq _022400BA + bl sub_02022974 +_022400BA: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022400A8 + + thumb_func_start ov6_022400C4 +ov6_022400C4: ; 0x022400C4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x4b + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022400FC + sub r0, r0, #4 + cmp r0, #1 + bls _022400FC + ldr r0, _02240100 ; =0x04000454 + mov r1, #0 + str r1, [r0, #0] + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + add r4, #0x40 + add r0, r4, #0 + bl ov6_0223FDBC + mov r2, #1 + mov r0, #0x12 + add r1, sp, #0 + str r2, [sp] + bl sub_020B275C +_022400FC: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02240100: .word 0x04000454 + thumb_func_end ov6_022400C4 + + thumb_func_start ov6_02240104 +ov6_02240104: ; 0x02240104 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r1, #0 + mov r1, #0x12 + lsl r1, r1, #4 + add r5, r0, #0 + bl sub_02018144 + mov r2, #0x12 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + str r6, [r4, #4] + mov r0, #0 + str r0, [r4, #0] + mov r0, #0x47 + lsl r0, r0, #2 + str r5, [r4, r0] + sub r0, #0x10 + add r0, r4, r0 + add r1, r5, #0 + mov r2, #0x20 + bl sub_020182CC + mov r2, #0x47 + lsl r2, r2, #2 + add r0, r4, #0 + ldr r1, [r4, r2] + sub r2, #0x10 + add r0, #0x34 + add r2, r4, r2 + bl ov6_02240260 + ldr r0, [r4, #4] + bl sub_0203D170 + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xac + mov r1, #0x4a + add r2, r6, #0 + mov r3, #2 + str r5, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xac + mov r1, #0x4c + add r2, r6, #0 + mov r3, #2 + str r5, [sp, #0xc] + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0xac + mov r1, #0x4b + mov r2, #0 + mov r3, #0xc0 + str r5, [sp, #4] + bl sub_02006E84 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + mov r0, #0 + str r0, [r4, #0x34] + mov r0, #0x1f + str r0, [r4, #0x38] + str r0, [sp] + ldr r0, _022401B4 ; =0x04000050 + ldr r3, [r4, #0x34] + mov r1, #4 + mov r2, #1 + bl sub_020BF55C + add r0, r4, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022401B4: .word 0x04000050 + thumb_func_end ov6_02240104 + + thumb_func_start ov6_022401B8 +ov6_022401B8: ; 0x022401B8 + push {r4, lr} + mov r1, #0x43 + add r4, r0, #0 + lsl r1, r1, #2 + add r1, r4, r1 + add r0, #0x34 + bl ov6_02240340 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov6_022401B8 + + thumb_func_start ov6_022401D0 +ov6_022401D0: ; 0x022401D0 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + add r5, r1, #0 + ldr r1, [r4, #4] + add r0, #8 + mov r2, #1 + bl ov6_02240240 + ldr r0, [r4, #8] + add r1, sp, #0 + bl sub_02063050 + add r0, r4, #0 + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, #0x34 + bl ov6_022402E4 + add r0, r4, #0 + ldr r1, [r4, #4] + add r0, #8 + add r2, r5, #0 + bl ov6_02240240 + ldr r0, [r4, #8] + add r1, sp, #0 + bl sub_02063050 + mov r0, #1 + str r0, [r4, #0] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_022401D0 + + thumb_func_start ov6_02240214 +ov6_02240214: ; 0x02240214 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224021E + cmp r0, #5 + bne _02240222 +_0224021E: + mov r0, #1 + bx lr +_02240222: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov6_02240214 + + thumb_func_start ov6_02240228 +ov6_02240228: ; 0x02240228 + push {r4, lr} + add r4, r0, #0 + bl ov6_02240214 + cmp r0, #1 + beq _0224023C + add r4, #0x34 + add r0, r4, #0 + bl ov6_02240600 +_0224023C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02240228 + + thumb_func_start ov6_02240240 +ov6_02240240: ; 0x02240240 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0x38] + add r1, r2, #0 + bl sub_0206251C + str r0, [r4, #0] + cmp r0, #0 + bne _02240256 + bl sub_02022974 +_02240256: + mov r0, #0 + str r0, [r4, #0x24] + str r0, [r4, #0x28] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02240240 + + thumb_func_start ov6_02240260 +ov6_02240260: ; 0x02240260 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #8] + mov r0, #0xac + add r6, r1, #0 + add r7, r2, #0 + bl sub_02006C24 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + add r0, #0x80 + mov r2, #6 + add r3, r6, #0 + bl ov6_0223FD60 + ldr r0, [sp, #8] + ldr r5, [sp, #8] + str r0, [sp, #0x10] + add r0, #0x80 + mov r4, #0 + add r5, #0x90 + str r0, [sp, #0x10] +_0224028E: + ldr r1, [sp, #0x10] + str r6, [sp] + ldr r2, [sp, #0xc] + add r0, r5, #0 + add r3, r4, #4 + str r7, [sp, #4] + bl ov6_0223FD70 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #2 + blt _0224028E + ldr r0, [sp, #8] + ldr r1, [sp, #8] + add r0, #8 + add r1, #0x80 + bl ov6_0223FDAC + ldr r4, [sp, #8] + ldr r6, [sp, #8] + mov r5, #0 + add r4, #0x90 + add r6, #8 +_022402BC: + add r0, r6, #0 + add r1, r4, #0 + bl ov6_0223FDB4 + add r5, r5, #1 + add r4, #0x14 + cmp r5, #2 + blt _022402BC + ldr r0, [sp, #8] + mov r1, #0 + add r0, #8 + str r0, [sp, #8] + bl ov6_0223FDC4 + ldr r0, [sp, #0xc] + bl sub_02006CA8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02240260 + + thumb_func_start ov6_022402E4 +ov6_022402E4: ; 0x022402E4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r0, #8 + bl ov6_0223FDCC + mov r1, #1 + lsl r1, r1, #0xc + add r0, r6, #0 + add r0, #8 + add r2, r1, #0 + add r3, r1, #0 + bl ov6_0223FDD4 + mov r4, #0 + add r5, r6, #0 + add r5, #0x90 + add r7, r4, #0 +_02240306: + add r0, r5, #0 + add r1, r7, #0 + bl ov6_0223FDA4 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #2 + blt _02240306 + add r0, r6, #0 + mov r2, #0 + add r0, #0xcc + str r2, [r0, #0] + add r0, r6, #0 + add r0, #0xb8 + str r2, [r0, #0] + add r0, r6, #0 + mov r1, #0x52 + add r0, #0xd0 + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xd4 + add r6, #8 + str r2, [r0, #0] + add r0, r6, #0 + mov r1, #1 + bl ov6_0223FDC4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022402E4 + + thumb_func_start ov6_02240340 +ov6_02240340: ; 0x02240340 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x80 + add r6, r1, #0 + bl ov6_0223FD68 + mov r4, #0 + add r5, #0x90 +_02240350: + add r0, r5, #0 + add r1, r6, #0 + bl ov6_0223FD84 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #2 + blt _02240350 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02240340 + + thumb_func_start ov6_02240364 +ov6_02240364: ; 0x02240364 + push {r3, r4, r5, r6} + sub sp, #8 + add r3, r1, #0 + add r1, r2, #0 + mov r6, #0 + add r2, sp, #0 + str r6, [r2, #0] + str r6, [r2, #4] + ldr r2, _022405C8 ; =0x021BF67C + add r0, #0x34 + ldr r4, [r2, #0x48] + mov r2, #0x40 + tst r2, r4 + beq _02240392 + ldr r2, [r0, #0] + add r2, r2, #1 + lsr r5, r2, #0x1f + lsl r4, r2, #0x1b + sub r4, r4, r5 + mov r2, #0x1b + ror r4, r2 + add r2, r5, r4 + str r2, [r0, #0] +_02240392: + ldr r2, _022405C8 ; =0x021BF67C + ldr r4, [r2, #0x48] + mov r2, #0x80 + tst r2, r4 + beq _022403AC + ldr r2, [r0, #0] + cmp r2, #0 + beq _022403A8 + sub r2, r2, #1 + str r2, [r0, #0] + b _022403AC +_022403A8: + mov r2, #0x1f + str r2, [r0, #0] +_022403AC: + ldr r2, _022405C8 ; =0x021BF67C + ldr r4, [r2, #0x48] + mov r2, #0x10 + tst r2, r4 + beq _022403C8 + ldr r2, [r0, #4] + add r2, r2, #1 + lsr r5, r2, #0x1f + lsl r4, r2, #0x1b + sub r4, r4, r5 + mov r2, #0x1b + ror r4, r2 + add r2, r5, r4 + str r2, [r0, #4] +_022403C8: + ldr r2, _022405C8 ; =0x021BF67C + ldr r4, [r2, #0x48] + mov r2, #0x20 + tst r2, r4 + beq _022403E2 + ldr r2, [r0, #4] + cmp r2, #0 + beq _022403DE + sub r2, r2, #1 + str r2, [r0, #4] + b _022403E2 +_022403DE: + mov r2, #0x1f + str r2, [r0, #4] +_022403E2: + cmp r1, #0xe + bls _022403E8 + b _02240584 +_022403E8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022403F4: ; jump table + .short _02240412 - _022403F4 - 2 ; case 0 + .short _02240426 - _022403F4 - 2 ; case 1 + .short _02240426 - _022403F4 - 2 ; case 2 + .short _02240426 - _022403F4 - 2 ; case 3 + .short _02240426 - _022403F4 - 2 ; case 4 + .short _0224046C - _022403F4 - 2 ; case 5 + .short _0224046C - _022403F4 - 2 ; case 6 + .short _0224046C - _022403F4 - 2 ; case 7 + .short _0224046C - _022403F4 - 2 ; case 8 + .short _022404B2 - _022403F4 - 2 ; case 9 + .short _022404B2 - _022403F4 - 2 ; case 10 + .short _022404F8 - _022403F4 - 2 ; case 11 + .short _022404F8 - _022403F4 - 2 ; case 12 + .short _0224053E - _022403F4 - 2 ; case 13 + .short _0224053E - _022403F4 - 2 ; case 14 +_02240412: + ldr r1, [r0, #4] + cmp r1, #0x10 + ble _0224041E + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_0224041E: + mov r1, #1 + str r1, [sp, #4] + str r1, [sp] + b _022405A4 +_02240426: + cmp r3, #0 + ldr r1, [r0, #0] + beq _0224044C + cmp r1, #8 + bge _02240436 + add r1, r1, #1 + str r1, [r0, #0] + b _0224043A +_02240436: + mov r1, #1 + str r1, [sp] +_0224043A: + ldr r1, [r0, #4] + cmp r1, #8 + ble _02240446 + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_02240446: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_0224044C: + cmp r1, #2 + ble _02240456 + sub r1, r1, #1 + str r1, [r0, #0] + b _0224045A +_02240456: + mov r1, #1 + str r1, [sp] +_0224045A: + ldr r1, [r0, #4] + cmp r1, #0xe + bge _02240466 + add r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_02240466: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_0224046C: + cmp r3, #0 + ldr r1, [r0, #0] + beq _02240492 + cmp r1, #8 + bge _0224047C + add r1, r1, #1 + str r1, [r0, #0] + b _02240480 +_0224047C: + mov r1, #1 + str r1, [sp] +_02240480: + ldr r1, [r0, #4] + cmp r1, #8 + ble _0224048C + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_0224048C: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_02240492: + cmp r1, #3 + ble _0224049C + sub r1, r1, #1 + str r1, [r0, #0] + b _022404A0 +_0224049C: + mov r1, #1 + str r1, [sp] +_022404A0: + ldr r1, [r0, #4] + cmp r1, #0xd + bge _022404AC + add r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_022404AC: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_022404B2: + cmp r3, #0 + ldr r1, [r0, #0] + beq _022404D8 + cmp r1, #8 + bge _022404C2 + add r1, r1, #1 + str r1, [r0, #0] + b _022404C6 +_022404C2: + mov r1, #1 + str r1, [sp] +_022404C6: + ldr r1, [r0, #4] + cmp r1, #8 + ble _022404D2 + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_022404D2: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_022404D8: + cmp r1, #4 + ble _022404E2 + sub r1, r1, #1 + str r1, [r0, #0] + b _022404E6 +_022404E2: + mov r1, #1 + str r1, [sp] +_022404E6: + ldr r1, [r0, #4] + cmp r1, #0xc + bge _022404F2 + add r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_022404F2: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_022404F8: + cmp r3, #0 + ldr r1, [r0, #0] + beq _0224051E + cmp r1, #8 + bge _02240508 + add r1, r1, #1 + str r1, [r0, #0] + b _0224050C +_02240508: + mov r1, #1 + str r1, [sp] +_0224050C: + ldr r1, [r0, #4] + cmp r1, #8 + ble _02240518 + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_02240518: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_0224051E: + cmp r1, #5 + ble _02240528 + sub r1, r1, #1 + str r1, [r0, #0] + b _0224052C +_02240528: + mov r1, #1 + str r1, [sp] +_0224052C: + ldr r1, [r0, #4] + cmp r1, #0xb + bge _02240538 + add r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_02240538: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_0224053E: + cmp r3, #0 + ldr r1, [r0, #0] + beq _02240564 + cmp r1, #8 + bge _0224054E + add r1, r1, #1 + str r1, [r0, #0] + b _02240552 +_0224054E: + mov r1, #1 + str r1, [sp] +_02240552: + ldr r1, [r0, #4] + cmp r1, #8 + ble _0224055E + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_0224055E: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_02240564: + cmp r1, #6 + ble _0224056E + sub r1, r1, #1 + str r1, [r0, #0] + b _02240572 +_0224056E: + mov r1, #1 + str r1, [sp] +_02240572: + ldr r1, [r0, #4] + cmp r1, #0xa + bge _0224057E + add r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_0224057E: + mov r1, #1 + str r1, [sp, #4] + b _022405A4 +_02240584: + ldr r1, [r0, #0] + cmp r1, #0 + ble _02240590 + sub r1, r1, #1 + str r1, [r0, #0] + b _02240594 +_02240590: + mov r1, #1 + str r1, [sp] +_02240594: + ldr r1, [r0, #4] + cmp r1, #0 + ble _022405A0 + sub r1, r1, #1 + str r1, [r0, #4] + b _022405A4 +_022405A0: + mov r1, #1 + str r1, [sp, #4] +_022405A4: + ldr r1, [r0, #0] + ldr r0, [r0, #4] + lsl r0, r0, #8 + orr r1, r0 + ldr r0, _022405CC ; =0x04000052 + strh r1, [r0] + ldr r0, [sp] + cmp r0, #0 + beq _022405BE + ldr r0, [sp, #4] + cmp r0, #0 + beq _022405BE + mov r6, #1 +_022405BE: + add r0, r6, #0 + add sp, #8 + pop {r3, r4, r5, r6} + bx lr + nop +_022405C8: .word 0x021BF67C +_022405CC: .word 0x04000052 + thumb_func_end ov6_02240364 + + thumb_func_start ov6_022405D0 +ov6_022405D0: ; 0x022405D0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r7, #0x34 + add r5, r7, #0 + mov r4, #0 + add r5, #0x90 +_022405DC: + add r0, r5, #0 + bl ov6_0223FD98 + add r4, r4, #1 + add r6, r0, #0 + add r5, #0x14 + cmp r4, #2 + blt _022405DC + cmp r6, #0 + beq _022405FA + add r7, #8 + add r0, r7, #0 + mov r1, #0 + bl ov6_0223FDC4 +_022405FA: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022405D0 + + thumb_func_start ov6_02240600 +ov6_02240600: ; 0x02240600 + ldr r3, _02240608 ; =ov6_0223FDBC + add r0, #8 + bx r3 + nop +_02240608: .word ov6_0223FDBC + thumb_func_end ov6_02240600 + + thumb_func_start ov6_0224060C +ov6_0224060C: ; 0x0224060C + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x1e + lsl r1, r1, #4 + add r4, r0, #0 + bl sub_02018144 + mov r2, #0x1e + add r6, r0, #0 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + add r0, r6, #0 + mov r1, #0x62 + add r2, r5, #0 + add r3, r4, #0 + bl ov6_0223FD58 + add r5, r6, #0 + mov r4, #0 + add r5, #0x10 +_02240638: + add r0, r5, #0 + add r1, r6, #0 + bl ov6_022407B8 + add r4, r4, #1 + add r5, #0x90 + cmp r4, #3 + blt _02240638 + mov r0, #7 + mov r1, #0 + lsl r0, r0, #6 + str r1, [r6, r0] + add r0, r6, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_0224060C + + thumb_func_start ov6_02240654 +ov6_02240654: ; 0x02240654 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r6, #0 + mov r4, #0 + add r5, #0x10 +_0224065E: + add r0, r5, #0 + bl ov6_022407DC + add r4, r4, #1 + add r5, #0x90 + cmp r4, #3 + blt _0224065E + add r0, r6, #0 + bl ov6_0223FD68 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02240654 + + thumb_func_start ov6_0224067C +ov6_0224067C: ; 0x0224067C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _02240694 + bl sub_02022974 +_02240694: + mov r0, #0x71 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + add r1, r0, #0 + add r1, #8 + str r4, [r5, r1] + add r1, r0, #0 + add r1, #0xc + str r6, [r5, r1] + add r1, r0, #0 + add r1, #0x10 + str r7, [r5, r1] + add r2, sp, #8 + add r1, r0, #0 + ldrh r3, [r2, #0x14] + add r1, #0x14 + strh r3, [r5, r1] + add r1, r0, #0 + ldrh r3, [r2, #0x18] + add r1, #0x16 + strh r3, [r5, r1] + add r1, r0, #0 + ldrh r2, [r2, #0x1c] + add r1, #0x18 + strh r2, [r5, r1] + add r1, r0, #4 + ldr r2, [sp, #0x18] + sub r0, r0, #4 + str r2, [r5, r1] + mov r1, #1 + str r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_0224067C + + thumb_func_start ov6_022406D8 +ov6_022406D8: ; 0x022406D8 + push {r3, r4, r5, lr} + sub sp, #0x18 + mov r2, #0x71 + add r5, r0, #0 + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r1, r1, #1 + str r1, [r5, r2] + ldr r1, [r5, r2] + cmp r1, #0 + bge _0224073A + add r1, r2, #4 + ldr r1, [r5, r1] + str r1, [r5, r2] + bl ov6_022408A8 + add r4, r0, #0 + bne _02240700 + bl sub_02022974 +_02240700: + mov r1, #0x73 + lsl r1, r1, #2 + ldr r0, [r5, r1] + mov r2, #1 + str r0, [sp] + add r0, r1, #4 + ldr r0, [r5, r0] + lsl r2, r2, #0x10 + str r0, [sp, #4] + add r0, r1, #0 + add r0, #8 + ldr r0, [r5, r0] + mov r3, #0x60 + str r0, [sp, #8] + add r0, r1, #0 + add r0, #0xc + ldrh r0, [r5, r0] + str r0, [sp, #0xc] + add r0, r1, #0 + add r0, #0xe + ldrh r0, [r5, r0] + add r1, #0x10 + str r0, [sp, #0x10] + ldrh r0, [r5, r1] + mov r1, #0 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov6_022407E8 +_0224073A: + mov r4, #0 + add r5, #0x10 +_0224073E: + add r0, r5, #0 + bl ov6_0224085C + add r4, r4, #1 + add r5, #0x90 + cmp r4, #3 + blt _0224073E + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov6_022406D8 + + thumb_func_start ov6_02240750 +ov6_02240750: ; 0x02240750 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x10 +_02240758: + add r0, r5, #0 + bl ov6_0224089C + add r4, r4, #1 + add r5, #0x90 + cmp r4, #3 + blt _02240758 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02240750 + + thumb_func_start ov6_02240768 +ov6_02240768: ; 0x02240768 + ldr r3, _02240770 ; =ov6_0224060C + mov r1, #6 + bx r3 + nop +_02240770: .word ov6_0224060C + thumb_func_end ov6_02240768 + + thumb_func_start ov6_02240774 +ov6_02240774: ; 0x02240774 + ldr r3, _02240778 ; =ov6_02240654 + bx r3 + ; .align 2, 0 +_02240778: .word ov6_02240654 + thumb_func_end ov6_02240774 + + thumb_func_start ov6_0224077C +ov6_0224077C: ; 0x0224077C + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r4, #0x40 + str r4, [sp] + mov r5, #0 + str r5, [sp, #4] + str r5, [sp, #8] + str r5, [sp, #0xc] + lsl r5, r1, #0x10 + lsl r1, r4, #9 + add r1, r5, r1 + lsl r5, r2, #0x10 + mov r2, #0xa + lsl r2, r2, #0x10 + add r2, r5, r2 + lsl r5, r3, #0x10 + lsl r3, r4, #0xa + add r3, r5, r3 + bl ov6_0224067C + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov6_0224077C + + thumb_func_start ov6_022407A8 +ov6_022407A8: ; 0x022407A8 + ldr r3, _022407AC ; =ov6_022406D8 + bx r3 + ; .align 2, 0 +_022407AC: .word ov6_022406D8 + thumb_func_end ov6_022407A8 + + thumb_func_start ov6_022407B0 +ov6_022407B0: ; 0x022407B0 + ldr r3, _022407B4 ; =ov6_02240750 + bx r3 + ; .align 2, 0 +_022407B4: .word ov6_02240750 + thumb_func_end ov6_022407B0 + + thumb_func_start ov6_022407B8 +ov6_022407B8: ; 0x022407B8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + mov r1, #0 + mov r2, #0x90 + bl sub_020D5124 + add r0, r4, #4 + add r1, r5, #0 + bl ov6_0223FDAC + add r0, r4, #4 + mov r1, #0 + bl ov6_0223FDC4 + mov r0, #0 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov6_022407B8 + + thumb_func_start ov6_022407DC +ov6_022407DC: ; 0x022407DC + ldr r3, _022407E4 ; =sub_020D5124 + mov r1, #0 + mov r2, #0x90 + bx r3 + ; .align 2, 0 +_022407E4: .word sub_020D5124 + thumb_func_end ov6_022407DC + + thumb_func_start ov6_022407E8 +ov6_022407E8: ; 0x022407E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _022407FC + bl sub_02022974 +_022407FC: + add r0, r5, #0 + add r0, #0x7c + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov6_0223FD0C + add r0, r5, #4 + mov r1, #1 + bl ov6_0223FDC4 + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + add r0, r5, #4 + bl ov6_0223FDCC + mov r2, #1 + add r0, r5, #4 + add r1, r4, #0 + lsl r2, r2, #0xc + add r3, r4, #0 + bl ov6_0223FDD4 + add r1, sp, #8 + ldrh r1, [r1, #0x1c] + add r0, r5, #4 + mov r2, #0 + bl ov6_0223FDDC + add r1, sp, #8 + ldrh r1, [r1, #0x20] + add r0, r5, #4 + mov r2, #1 + bl ov6_0223FDDC + add r1, sp, #8 + ldrh r1, [r1, #0x24] + add r0, r5, #4 + mov r2, #2 + bl ov6_0223FDDC + mov r0, #1 + str r0, [r5, #0] + mov r0, #0 + add r5, #0x8c + str r0, [r5, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022407E8 + + thumb_func_start ov6_0224085C +ov6_0224085C: ; 0x0224085C + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0224089A + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x8c + str r1, [r0, #0] + add r1, r4, #0 + add r1, #0x8c + add r0, r4, #0 + ldr r1, [r1, #0] + add r0, #0x7c + bl ov6_0223FD18 + ldr r1, [r4, #0x7c] + mov r2, #1 + add r5, r0, #0 + add r0, r4, #4 + lsl r2, r2, #0xc + add r3, r1, #0 + bl ov6_0223FDD4 + cmp r5, #1 + bne _0224089A + mov r0, #0 + str r0, [r4, #0] +_0224089A: + pop {r3, r4, r5, pc} + thumb_func_end ov6_0224085C + + thumb_func_start ov6_0224089C +ov6_0224089C: ; 0x0224089C + ldr r3, _022408A4 ; =ov6_0223FDBC + add r0, r0, #4 + bx r3 + nop +_022408A4: .word ov6_0223FDBC + thumb_func_end ov6_0224089C + + thumb_func_start ov6_022408A8 +ov6_022408A8: ; 0x022408A8 + mov r2, #0 + add r3, r0, #0 +_022408AC: + ldr r1, [r3, #0x10] + cmp r1, #0 + bne _022408BC + mov r1, #0x90 + add r0, #0x10 + mul r1, r2 + add r0, r0, r1 + bx lr +_022408BC: + add r2, r2, #1 + add r3, #0x90 + cmp r2, #3 + blt _022408AC + mov r0, #0 + bx lr + thumb_func_end ov6_022408A8 + + thumb_func_start ov6_022408C8 +ov6_022408C8: ; 0x022408C8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + mov r1, #0xd4 + add r6, r0, #0 + bl sub_02018144 + add r7, r0, #0 + mov r1, #0 + mov r2, #0xd4 + bl sub_020D5124 + add r0, r7, #0 + add r0, #0xc4 + add r1, r6, #0 + mov r2, #0x20 + bl sub_020182CC + mov r0, #0x62 + add r1, r6, #0 + bl sub_02006C24 + str r0, [sp, #8] + add r0, r7, #0 + ldr r1, [sp, #8] + add r0, #0x78 + add r2, r4, #0 + add r3, r6, #0 + bl ov6_0223FD60 + add r0, r7, #0 + str r0, [sp, #0xc] + add r0, #0xc4 + str r0, [sp, #0xc] + add r0, r7, #0 + add r5, r7, #0 + str r0, [sp, #0x10] + add r0, #0x78 + mov r4, #0 + add r5, #0x88 + str r0, [sp, #0x10] +_0224091A: + ldr r0, [sp, #0xc] + str r6, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x10] + ldr r2, [sp, #8] + add r0, r5, #0 + add r3, r4, #1 + bl ov6_0223FD70 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _0224091A + add r1, r7, #0 + add r0, r7, #0 + add r1, #0x78 + bl ov6_0223FDAC + add r4, r7, #0 + mov r5, #0 + add r4, #0x88 +_02240944: + add r0, r7, #0 + add r1, r4, #0 + bl ov6_0223FDB4 + add r5, r5, #1 + add r4, #0x14 + cmp r5, #3 + blt _02240944 + add r0, r7, #0 + mov r1, #0 + bl ov6_0223FDC4 + ldr r0, [sp, #8] + bl sub_02006CA8 + add r0, r7, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_022408C8 + + thumb_func_start ov6_02240968 +ov6_02240968: ; 0x02240968 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, #0x78 + bl ov6_0223FD68 + add r5, r7, #0 + add r6, r7, #0 + mov r4, #0 + add r5, #0x88 + add r6, #0xc4 +_0224097C: + add r0, r5, #0 + add r1, r6, #0 + bl ov6_0223FD84 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _0224097C + add r0, r7, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02240968 + + thumb_func_start ov6_02240994 +ov6_02240994: ; 0x02240994 + push {r4, lr} + add r4, r0, #0 + bl ov6_0223FDCC + ldr r1, _022409D0 ; =0xFFFFFFF8 + add r0, r4, #0 + add r1, sp + ldrh r1, [r1, #0x10] + mov r2, #0 + bl ov6_0223FDDC + ldr r1, _022409D0 ; =0xFFFFFFF8 + add r0, r4, #0 + add r1, sp + ldrh r1, [r1, #0x18] + mov r2, #2 + bl ov6_0223FDDC + ldr r1, _022409D0 ; =0xFFFFFFF8 + add r0, r4, #0 + add r1, sp + ldrh r1, [r1, #0x14] + mov r2, #1 + bl ov6_0223FDDC + add r0, r4, #0 + mov r1, #1 + bl ov6_0223FDC4 + pop {r4, pc} + ; .align 2, 0 +_022409D0: .word 0xFFFFFFF8 + thumb_func_end ov6_02240994 + + thumb_func_start ov6_022409D4 +ov6_022409D4: ; 0x022409D4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x88 +_022409DC: + add r0, r5, #0 + bl ov6_0223FD8C + add r4, r4, #1 + add r5, #0x14 + cmp r4, #3 + blt _022409DC + pop {r3, r4, r5, pc} + thumb_func_end ov6_022409D4 + + thumb_func_start ov6_022409EC +ov6_022409EC: ; 0x022409EC + ldr r3, _022409F0 ; =ov6_0223FDBC + bx r3 + ; .align 2, 0 +_022409F0: .word ov6_0223FDBC + thumb_func_end ov6_022409EC + + thumb_func_start ov6_022409F4 +ov6_022409F4: ; 0x022409F4 + ldr r3, _022409FC ; =ov6_022408C8 + mov r1, #0 + bx r3 + nop +_022409FC: .word ov6_022408C8 + thumb_func_end ov6_022409F4 + + thumb_func_start ov6_02240A00 +ov6_02240A00: ; 0x02240A00 + ldr r3, _02240A04 ; =ov6_02240968 + bx r3 + ; .align 2, 0 +_02240A04: .word ov6_02240968 + thumb_func_end ov6_02240A00 + + thumb_func_start ov6_02240A08 +ov6_02240A08: ; 0x02240A08 + ldr r3, _02240A0C ; =ov6_022409D4 + bx r3 + ; .align 2, 0 +_02240A0C: .word ov6_022409D4 + thumb_func_end ov6_02240A08 + + thumb_func_start ov6_02240A10 +ov6_02240A10: ; 0x02240A10 + ldr r3, _02240A14 ; =ov6_022409EC + bx r3 + ; .align 2, 0 +_02240A14: .word ov6_022409EC + thumb_func_end ov6_02240A10 + + thumb_func_start ov6_02240A18 +ov6_02240A18: ; 0x02240A18 + push {r3, r4, lr} + sub sp, #0xc + ldr r4, _02240A3C ; =0x0000F49F + str r4, [sp] + ldr r4, _02240A40 ; =0x000080B5 + str r4, [sp, #4] + sub r4, r4, #7 + str r4, [sp, #8] + ldr r4, _02240A44 ; =0x00029BA8 + add r1, r1, r4 + ldr r4, _02240A48 ; =0x00037294 + sub r2, r2, r4 + ldr r4, _02240A4C ; =0x000B6876 + sub r3, r3, r4 + bl ov6_02240994 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02240A3C: .word 0x0000F49F +_02240A40: .word 0x000080B5 +_02240A44: .word 0x00029BA8 +_02240A48: .word 0x00037294 +_02240A4C: .word 0x000B6876 + thumb_func_end ov6_02240A18 + + thumb_func_start ov6_02240A50 +ov6_02240A50: ; 0x02240A50 + push {r3, r4, lr} + sub sp, #0xc + ldr r4, _02240A74 ; =0x0000E5B1 + str r4, [sp] + ldr r4, _02240A78 ; =0x0000C163 + str r4, [sp, #4] + ldr r4, _02240A7C ; =0x00007FF8 + str r4, [sp, #8] + ldr r4, _02240A80 ; =0x00116A4F + add r1, r1, r4 + ldr r4, _02240A84 ; =0x0004F16B + add r2, r2, r4 + ldr r4, _02240A88 ; =0x00092118 + sub r3, r3, r4 + bl ov6_02240994 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02240A74: .word 0x0000E5B1 +_02240A78: .word 0x0000C163 +_02240A7C: .word 0x00007FF8 +_02240A80: .word 0x00116A4F +_02240A84: .word 0x0004F16B +_02240A88: .word 0x00092118 + thumb_func_end ov6_02240A50 + + thumb_func_start ov6_02240A8C +ov6_02240A8C: ; 0x02240A8C + push {r3, r4, lr} + sub sp, #0xc + ldr r4, _02240AB4 ; =0x0000E71D + str r4, [sp] + ldr r4, _02240AB8 ; =0x00005335 + str r4, [sp, #4] + ldr r4, _02240ABC ; =0x00007992 + str r4, [sp, #8] + mov r4, #0xc6 + lsl r4, r4, #0xc + sub r1, r1, r4 + ldr r4, _02240AC0 ; =0x00056FFF + add r2, r2, r4 + ldr r4, _02240AC4 ; =0x00210008 + sub r3, r3, r4 + bl ov6_02240994 + add sp, #0xc + pop {r3, r4, pc} + nop +_02240AB4: .word 0x0000E71D +_02240AB8: .word 0x00005335 +_02240ABC: .word 0x00007992 +_02240AC0: .word 0x00056FFF +_02240AC4: .word 0x00210008 + thumb_func_end ov6_02240A8C + + thumb_func_start ov6_02240AC8 +ov6_02240AC8: ; 0x02240AC8 + ldr r3, _02240AD0 ; =ov6_0224060C + mov r1, #6 + bx r3 + nop +_02240AD0: .word ov6_0224060C + thumb_func_end ov6_02240AC8 + + thumb_func_start ov6_02240AD4 +ov6_02240AD4: ; 0x02240AD4 + ldr r3, _02240AD8 ; =ov6_02240654 + bx r3 + ; .align 2, 0 +_02240AD8: .word ov6_02240654 + thumb_func_end ov6_02240AD4 + + thumb_func_start ov6_02240ADC +ov6_02240ADC: ; 0x02240ADC + ldr r3, _02240AE0 ; =ov6_022406D8 + bx r3 + ; .align 2, 0 +_02240AE0: .word ov6_022406D8 + thumb_func_end ov6_02240ADC + + thumb_func_start ov6_02240AE4 +ov6_02240AE4: ; 0x02240AE4 + ldr r3, _02240AE8 ; =ov6_02240750 + bx r3 + ; .align 2, 0 +_02240AE8: .word ov6_02240750 + thumb_func_end ov6_02240AE4 + + thumb_func_start ov6_02240AEC +ov6_02240AEC: ; 0x02240AEC + push {r4, lr} + sub sp, #0x10 + mov r4, #0x40 + str r4, [sp] + ldr r4, _02240B1C ; =0x0000F49F + str r4, [sp, #4] + ldr r4, _02240B20 ; =0x000080B5 + str r4, [sp, #8] + sub r4, r4, #7 + str r4, [sp, #0xc] + mov r4, #0x11 + lsl r4, r4, #0xc + add r1, r1, r4 + mov r4, #0x6f + lsl r4, r4, #0xc + sub r2, r2, r4 + mov r4, #0xcb + lsl r4, r4, #0xc + sub r3, r3, r4 + bl ov6_0224067C + add sp, #0x10 + pop {r4, pc} + nop +_02240B1C: .word 0x0000F49F +_02240B20: .word 0x000080B5 + thumb_func_end ov6_02240AEC + + thumb_func_start ov6_02240B24 +ov6_02240B24: ; 0x02240B24 + push {r4, lr} + sub sp, #0x10 + mov r4, #0x40 + str r4, [sp] + ldr r4, _02240B50 ; =0x0000E5B1 + str r4, [sp, #4] + ldr r4, _02240B54 ; =0x0000C163 + str r4, [sp, #8] + ldr r4, _02240B58 ; =0x00007FF8 + str r4, [sp, #0xc] + ldr r4, _02240B5C ; =0x00252000 + add r1, r1, r4 + mov r4, #0x43 + lsl r4, r4, #0xc + add r2, r2, r4 + mov r4, #0xe + lsl r4, r4, #0xe + sub r3, r3, r4 + bl ov6_0224067C + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_02240B50: .word 0x0000E5B1 +_02240B54: .word 0x0000C163 +_02240B58: .word 0x00007FF8 +_02240B5C: .word 0x00252000 + thumb_func_end ov6_02240B24 + + thumb_func_start ov6_02240B60 +ov6_02240B60: ; 0x02240B60 + push {r4, lr} + sub sp, #0x10 + mov r4, #0x40 + str r4, [sp] + ldr r4, _02240B90 ; =0x0000E71D + str r4, [sp, #4] + ldr r4, _02240B94 ; =0x00005335 + str r4, [sp, #8] + ldr r4, _02240B98 ; =0x00007992 + str r4, [sp, #0xc] + mov r4, #0x53 + lsl r4, r4, #0xe + sub r1, r1, r4 + mov r4, #0xd + lsl r4, r4, #0xc + sub r2, r2, r4 + mov r4, #0x71 + lsl r4, r4, #0xe + sub r3, r3, r4 + bl ov6_0224067C + add sp, #0x10 + pop {r4, pc} + nop +_02240B90: .word 0x0000E71D +_02240B94: .word 0x00005335 +_02240B98: .word 0x00007992 + thumb_func_end ov6_02240B60 + + thumb_func_start ov6_02240B9C +ov6_02240B9C: ; 0x02240B9C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + mov r1, #0xec + add r7, r0, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0xec + add r6, r0, #0 + bl sub_020D5124 + mov r0, #0x62 + add r1, r7, #0 + bl sub_02006C24 + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0xd8 + str r4, [r0, #0] + add r0, r6, #0 + add r0, #0xdc + add r1, r7, #0 + mov r2, #0x20 + bl sub_020182CC + add r0, r6, #0 + ldr r1, [sp, #8] + add r0, #0x78 + mov r2, #0xf + add r3, r7, #0 + bl ov6_0223FD60 + add r0, r6, #0 + str r0, [sp, #0xc] + add r0, #0xdc + str r0, [sp, #0xc] + add r0, r6, #0 + add r5, r6, #0 + str r0, [sp, #0x10] + add r0, #0x78 + mov r4, #0 + add r5, #0x88 + str r0, [sp, #0x10] +_02240BF4: + ldr r0, [sp, #0xc] + str r7, [sp] + add r3, r4, #0 + str r0, [sp, #4] + ldr r1, [sp, #0x10] + ldr r2, [sp, #8] + add r0, r5, #0 + add r3, #0x10 + bl ov6_0223FD70 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #4 + blt _02240BF4 + add r1, r6, #0 + add r0, r6, #0 + add r1, #0x78 + bl ov6_0223FDAC + add r4, r6, #0 + mov r5, #0 + add r4, #0x88 +_02240C20: + add r0, r6, #0 + add r1, r4, #0 + bl ov6_0223FDB4 + add r5, r5, #1 + add r4, #0x14 + cmp r5, #4 + blt _02240C20 + add r0, r6, #0 + mov r1, #0 + bl ov6_0223FDC4 + ldr r0, [sp, #8] + bl sub_02006CA8 + add r0, r6, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02240B9C + + thumb_func_start ov6_02240C44 +ov6_02240C44: ; 0x02240C44 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r0, [r0, #0x38] + bl sub_0206251C + add r1, sp, #0 + bl sub_02063050 + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov6_0223FDCC + add r0, r4, #0 + mov r1, #1 + bl ov6_0223FDC4 + ldr r0, _02240C78 ; =0x000006D8 + bl sub_02005748 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02240C78: .word 0x000006D8 + thumb_func_end ov6_02240C44 + + thumb_func_start ov6_02240C7C +ov6_02240C7C: ; 0x02240C7C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x88 +_02240C84: + add r0, r5, #0 + bl ov6_0223FD98 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #4 + blt _02240C84 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02240C7C + + thumb_func_start ov6_02240C94 +ov6_02240C94: ; 0x02240C94 + ldr r3, _02240C98 ; =ov6_0223FDBC + bx r3 + ; .align 2, 0 +_02240C98: .word ov6_0223FDBC + thumb_func_end ov6_02240C94 + + .rodata + + + .global Unk_ov6_02248E14 +Unk_ov6_02248E14: ; 0x02248E14 + .incbin "incbin/overlay6_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov6_02248E20 +Unk_ov6_02248E20: ; 0x02248E20 + .incbin "incbin/overlay6_rodata.bin", 0xC, 0x18 - 0xC + + .global Unk_ov6_02248E2C +Unk_ov6_02248E2C: ; 0x02248E2C + .incbin "incbin/overlay6_rodata.bin", 0x18, 0x24 - 0x18 + + .global Unk_ov6_02248E38 +Unk_ov6_02248E38: ; 0x02248E38 + .incbin "incbin/overlay6_rodata.bin", 0x24, 0x34 - 0x24 + + .global Unk_ov6_02248E48 +Unk_ov6_02248E48: ; 0x02248E48 + .incbin "incbin/overlay6_rodata.bin", 0x34, 0x4C - 0x34 + + .global Unk_ov6_02248E60 +Unk_ov6_02248E60: ; 0x02248E60 + .incbin "incbin/overlay6_rodata.bin", 0x4C, 0x64 - 0x4C + + .global Unk_ov6_02248E78 +Unk_ov6_02248E78: ; 0x02248E78 + .incbin "incbin/overlay6_rodata.bin", 0x64, 0x7C - 0x64 + + .global Unk_ov6_02248E90 +Unk_ov6_02248E90: ; 0x02248E90 + .incbin "incbin/overlay6_rodata.bin", 0x7C, 0x94 - 0x7C + + .global Unk_ov6_02248EA8 +Unk_ov6_02248EA8: ; 0x02248EA8 + .incbin "incbin/overlay6_rodata.bin", 0x94, 0xAC - 0x94 + + .global Unk_ov6_02248EC0 +Unk_ov6_02248EC0: ; 0x02248EC0 + .incbin "incbin/overlay6_rodata.bin", 0xAC, 0xC8 - 0xAC + + .global Unk_ov6_02248EDC +Unk_ov6_02248EDC: ; 0x02248EDC + .incbin "incbin/overlay6_rodata.bin", 0xC8, 0xF0 - 0xC8 + + .global Unk_ov6_02248F04 +Unk_ov6_02248F04: ; 0x02248F04 + .incbin "incbin/overlay6_rodata.bin", 0xF0, 0x11C - 0xF0 + + .global Unk_ov6_02248F30 +Unk_ov6_02248F30: ; 0x02248F30 + .incbin "incbin/overlay6_rodata.bin", 0x11C, 0x90 + + + .data + + + .global Unk_ov6_02249860 +Unk_ov6_02249860: ; 0x02249860 + .incbin "incbin/overlay6_data.bin", 0x0, 0x18 + diff --git a/asm/ov6_02240C9C.s b/asm/ov6_02240C9C.s new file mode 100644 index 000000000..43046bb85 --- /dev/null +++ b/asm/ov6_02240C9C.s @@ -0,0 +1,3418 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02240C9C +ov6_02240C9C: ; 0x02240C9C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl sub_02013960 + sub r1, r0, #1 + cmp r1, #1 + bhi _02240CB8 + ldr r0, [r5, #0x6c] + str r0, [r4, #0] + ldr r0, [r5, #0x70] + str r0, [r6, #0] + pop {r4, r5, r6, pc} +_02240CB8: + sub r0, r0, #3 + cmp r0, #1 + bhi _02240CC6 + ldr r0, [r5, #0x74] + str r0, [r4, #0] + ldr r0, [r5, #0x78] + str r0, [r6, #0] +_02240CC6: + pop {r4, r5, r6, pc} + thumb_func_end ov6_02240C9C + + thumb_func_start ov6_02240CC8 +ov6_02240CC8: ; 0x02240CC8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_0202D834 + str r0, [sp] + bl sub_0202D898 + cmp r0, #0 + beq _02240CFE + ldr r0, [sp] + mov r1, #2 + bl sub_0202D814 + bl ov6_02243218 + ldr r1, [r5, #0x1c] + ldr r1, [r1, #0] + cmp r1, r0 + bne _02240CFE + ldr r0, [r4, #0x64] + str r0, [r6, #0] + ldr r0, [r4, #0x68] + str r0, [r7, #0] +_02240CFE: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02240CC8 + + thumb_func_start ov6_02240D00 +ov6_02240D00: ; 0x02240D00 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x1c] + add r4, r1, #0 + ldr r0, [r0, #0] + add r6, r2, #0 + add r7, r3, #0 + bl sub_0203A2FC + cmp r0, #0 + beq _02240D54 + add r1, sp, #0 + ldr r0, [r5, #0xc] + add r1, #2 + add r2, sp, #0 + bl sub_0202DA10 + cmp r4, #0 + beq _02240D54 + mov r0, #0x6a + mov r1, #8 + mov r2, #4 + bl sub_02006ADC + add r1, sp, #0 + ldrh r2, [r1, #2] + ldr r1, _02240D58 ; =0x0000FFFF + cmp r2, r1 + beq _02240D40 + lsl r1, r2, #2 + ldr r1, [r0, r1] + str r1, [r6, #0] +_02240D40: + add r1, sp, #0 + ldrh r2, [r1] + ldr r1, _02240D58 ; =0x0000FFFF + cmp r2, r1 + beq _02240D50 + lsl r1, r2, #2 + ldr r1, [r0, r1] + str r1, [r7, #0] +_02240D50: + bl sub_020181C4 +_02240D54: + pop {r3, r4, r5, r6, r7, pc} + nop +_02240D58: .word 0x0000FFFF + thumb_func_end ov6_02240D00 + + thumb_func_start ov6_02240D5C +ov6_02240D5C: ; 0x02240D5C + push {r4, r5, r6, r7, lr} + sub sp, #0xb4 + add r5, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + str r0, [sp, #0x14] + ldr r2, [sp, #0x14] + add r0, r5, #0 + add r1, r6, #0 + bl sub_02054F94 + str r0, [sp, #0x1c] + add r2, sp, #0x24 + ldr r1, [sp, #0x1c] + add r0, r5, #0 + add r2, #1 + bl ov6_02241874 + add r1, sp, #0x24 + strb r0, [r1] + ldrb r0, [r1] + cmp r0, #0 + bne _02240D9A + add sp, #0xb4 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02240D9A: + ldr r0, [r5, #0xc] + bl sub_0207A268 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0203A640 + add r4, r0, #0 + add r0, r7, #0 + mov r1, #0 + bl sub_0207A0FC + str r0, [sp, #0x20] + ldr r1, [sp, #0x20] + add r0, r5, #0 + add r2, r4, #0 + add r3, sp, #0x30 + bl ov6_02242634 + ldr r0, [r5, #0xc] + bl sub_0202D834 + bl sub_0202D9D8 + cmp r0, #0 + bne _02240DE4 + add r0, r7, #0 + bl sub_02054A40 + mov r1, #1 + str r1, [sp, #0x34] + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x24 + strb r0, [r1, #0x18] +_02240DE4: + ldr r0, [r5, #0xc] + bl sub_0203A790 + bl sub_0203A74C + add r3, r0, #0 + ldr r0, [sp, #0x20] + add r1, sp, #0x24 + str r0, [sp] + ldrb r1, [r1] + mov r0, #0 + add r2, sp, #0x30 + bl ov6_0224226C + add r1, sp, #0x24 + strb r0, [r1] + add r0, r5, #0 + add r1, sp, #0x24 + bl ov6_02241ABC + ldr r0, [sp, #0x20] + add r1, sp, #0x24 + bl ov6_02241A90 + add r1, sp, #0x24 + ldrb r1, [r1] + ldr r2, [sp, #0x1c] + add r0, r5, #0 + bl ov6_022417C8 + cmp r0, #0 + beq _02240E2A + mov r0, #1 + str r0, [sp, #0x10] + b _02240E2E +_02240E2A: + mov r0, #0 + str r0, [sp, #0x10] +_02240E2E: + add r1, sp, #0x44 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + str r0, [r1, #0xc] + str r1, [sp] + add r0, sp, #0x48 + str r0, [sp, #4] + add r0, sp, #0x4c + add r3, r5, #0 + str r0, [sp, #8] + add r3, #0x94 + ldr r1, [sp, #0x14] + ldr r3, [r3, #0] + add r0, r6, #0 + add r2, r5, #0 + bl sub_020696DC + cmp r0, #0 + bne _02240E5E + mov r0, #0 + str r0, [sp, #0x50] + b _02240E64 +_02240E5E: + mov r0, #1 + str r0, [sp, #0x10] + str r0, [sp, #0x50] +_02240E64: + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02240E70 + add sp, #0xb4 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02240E70: + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206A984 + cmp r0, #0 + beq _02240E84 + mov r0, #1 + str r0, [sp, #0xc] + b _02240E88 +_02240E84: + mov r0, #0 + str r0, [sp, #0xc] +_02240E88: + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _02240EF0 + ldr r0, [sp, #0x50] + cmp r0, #0 + bne _02240EF0 + add r0, r5, #0 + add r1, sp, #0x28 + bl ov6_02242440 + cmp r0, #0 + beq _02240EF0 + ldr r0, [sp, #0x28] + mov r1, #6 + bl sub_0202D93C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, sp, #0x30 + bl ov6_02242388 + cmp r0, #0 + bne _02240EEA + mov r0, #0xb + add r1, r0, #0 + add r1, #0xf5 + bl sub_02051D8C + str r0, [sp, #0x2c] + add r1, r5, #0 + bl sub_02052314 + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x2c] + bl ov6_0224239C + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + bl sub_02069434 + ldr r1, [sp, #0x2c] + add r0, r5, #0 + bl sub_02050E10 + add sp, #0xb4 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02240EEA: + add sp, #0xb4 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02240EF0: + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _02240F0E + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206AE5C + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + add r2, sp, #0x2c + bl ov6_02242328 + b _02240F18 +_02240F0E: + mov r0, #0xb + mov r1, #0x4a + bl sub_02051D8C + str r0, [sp, #0x2c] +_02240F18: + ldr r0, [sp, #0x2c] + add r1, r5, #0 + bl sub_02052314 + add r0, sp, #0x24 + ldrb r0, [r0, #1] + cmp r0, #0 + bne _02240FDC + mov r7, #4 + mov r0, #0 + add r1, r4, #0 + add r2, sp, #0x54 + add r3, r7, #0 +_02240F32: + ldr r6, [r1, #8] + add r0, r0, #1 + str r6, [r2, #0] + ldrsb r6, [r1, r7] + strh r6, [r2, #4] + ldrsb r6, [r1, r3] + add r1, #8 + strh r6, [r2, #6] + add r2, #8 + cmp r0, #0xc + blt _02240F32 + add r0, r5, #0 + bl sub_0203D174 + bl sub_02027560 + bl sub_02027474 + add r6, r0, #0 + add r0, r4, #0 + add r1, sp, #0x64 + add r2, sp, #0x6c + bl ov6_02240C9C + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x54 + add r3, sp, #0x5c + bl ov6_02240CC8 + add r0, r5, #0 + add r1, r6, #0 + add r2, sp, #0x84 + add r3, sp, #0x8c + bl ov6_02240D00 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0x94 + add r3, sp, #0x9c + bl ov6_022477B8 + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _02240FB2 + ldr r1, [sp, #0x18] + add r0, r5, #0 + add r2, r6, #0 + add r3, sp, #0x54 + bl ov6_02242354 + add r0, sp, #0x54 + str r0, [sp] + add r0, sp, #0x30 + str r0, [sp, #4] + add r0, sp, #0x44 + str r0, [sp, #8] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x2c] + add r0, r5, #0 + add r3, r4, #0 + bl ov6_02241674 + b _02241024 +_02240FB2: + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206B034 + ldr r1, [sp, #0x2c] + mov r2, #0xb + str r0, [r1, #0x20] + ldr r0, [sp, #0x2c] + ldr r1, [r5, #0xc] + bl sub_02079170 + add r0, sp, #0x30 + str r0, [sp] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x2c] + add r0, r5, #0 + add r3, sp, #0x54 + bl ov6_0224174C + b _02241024 +_02240FDC: + cmp r0, #1 + bne _02241014 + mov r0, #0 + add r1, sp, #0x54 + mov r3, #0xd0 + mov r6, #0xd1 +_02240FE8: + add r2, r4, #0 + add r2, #0xd4 + ldr r2, [r2, #0] + add r0, r0, #1 + str r2, [r1, #0] + ldrsb r2, [r4, r3] + strh r2, [r1, #4] + ldrsb r2, [r4, r6] + add r4, #8 + strh r2, [r1, #6] + add r1, #8 + cmp r0, #5 + blt _02240FE8 + add r0, sp, #0x30 + str r0, [sp] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x2c] + add r0, r5, #0 + add r3, sp, #0x54 + bl ov6_02241790 + b _02241024 +_02241014: + bl sub_02022974 + ldr r0, [sp, #0x2c] + bl sub_020520A4 + add sp, #0xb4 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241024: + cmp r0, #0 + beq _02241032 + ldr r1, [sp, #0x2c] + add r0, r5, #0 + bl sub_02050E10 + b _02241036 +_02241032: + mov r0, #0 + str r0, [sp, #0x10] +_02241036: + mov r0, #4 + bl sub_0201833C + cmp r0, #0 + bne _02241044 + bl sub_02022974 +_02241044: + mov r0, #0xb + bl sub_0201833C + cmp r0, #0 + bne _02241052 + bl sub_02022974 +_02241052: + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _0224105E + ldr r0, [sp, #0x2c] + bl sub_020520A4 +_0224105E: + mov r0, #0 + add r5, #0x78 + strh r0, [r5] + ldr r0, [sp, #0x10] + add sp, #0xb4 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02240D5C + + thumb_func_start ov6_0224106C +ov6_0224106C: ; 0x0224106C + push {r4, r5, r6, r7, lr} + sub sp, #0x94 + str r0, [sp, #8] + str r1, [sp, #0xc] + str r2, [sp, #0x10] + bl ov6_02242164 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + bne _02241086 + add sp, #0x94 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241086: + ldr r0, [sp, #8] + ldr r0, [r0, #0xc] + bl sub_0207A268 + mov r1, #0 + bl sub_0207A0FC + str r0, [sp, #0x14] + ldr r0, [sp, #8] + ldr r1, [sp, #0x14] + mov r2, #0 + add r3, sp, #0x20 + bl ov6_02242634 + ldr r0, [sp, #8] + ldr r0, [r0, #0xc] + bl sub_0203A790 + bl sub_0203A74C + add r3, r0, #0 + ldr r0, [sp, #0x14] + add r1, r5, #0 + str r0, [sp] + mov r0, #1 + add r2, sp, #0x20 + bl ov6_0224226C + add r6, r0, #0 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #0x64 + blo _022410D8 + bl sub_02022974 +_022410D8: + cmp r5, r6 + blt _022410E2 + add sp, #0x94 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022410E2: + ldr r0, [sp, #8] + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206AE5C + add r1, r0, #0 + ldr r0, [sp, #8] + ldr r2, [sp, #0x10] + bl ov6_02242328 + ldr r0, [sp, #0x10] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + bl sub_02052314 + ldr r0, [sp, #0x10] + ldr r0, [r0, #0] + bl sub_0205285C + ldr r0, [sp, #8] + ldr r0, [r0, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A2F0 + cmp r0, #0 + beq _02241154 + ldr r0, [sp, #8] + bl ov6_02247660 + cmp r0, #0 + beq _02241154 + add r0, sp, #0x18 + add r0, #1 + add r1, sp, #0x18 + bl ov6_02247794 + add r0, sp, #0x1c + bl ov6_022477A0 + add r0, sp, #0x18 + ldrb r3, [r0, #1] + ldrb r4, [r0] + ldr r2, [sp, #0x1c] + mov r1, #0 + add r0, sp, #0x34 +_0224113E: + lsl r5, r1, #3 + add r1, r1, #1 + lsl r1, r1, #0x18 + add r6, r0, r5 + str r2, [r0, r5] + strh r3, [r6, #4] + lsr r1, r1, #0x18 + strh r4, [r6, #6] + cmp r1, #5 + blo _0224113E + b _022411A2 +_02241154: + ldr r0, [sp, #8] + bl sub_0203A640 + ldr r1, [sp, #0xc] + cmp r1, #0 + beq _0224116A + cmp r1, #1 + beq _02241172 + cmp r1, #2 + beq _0224117A + b _02241180 +_0224116A: + mov r1, #0x4a + lsl r1, r1, #2 + add r4, r0, r1 + b _02241180 +_02241172: + mov r1, #0x55 + lsl r1, r1, #2 + add r4, r0, r1 + b _02241180 +_0224117A: + mov r1, #6 + lsl r1, r1, #6 + add r4, r0, r1 +_02241180: + mov r6, #0 + add r1, sp, #0x34 + mov r7, #1 +_02241186: + lsl r5, r6, #3 + add r3, r4, r5 + ldr r0, [r3, #4] + add r2, r1, r5 + str r0, [r1, r5] + ldrsb r0, [r4, r5] + strh r0, [r2, #4] + ldrsb r0, [r3, r7] + strh r0, [r2, #6] + add r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #5 + blo _02241186 +_022411A2: + add r0, sp, #0x20 + str r0, [sp] + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x10] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [sp, #0x14] + ldr r2, [r2, #0] + add r3, sp, #0x34 + bl ov6_022417AC + cmp r0, #0 + bne _022411C2 + add sp, #0x94 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022411C2: + mov r0, #1 + add sp, #0x94 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_0224106C + + thumb_func_start ov6_022411C8 +ov6_022411C8: ; 0x022411C8 + push {r4, r5, r6, r7, lr} + sub sp, #0xac + add r5, r0, #0 + ldr r0, [r5, #0x3c] + str r1, [sp, #0xc] + bl sub_0205EABC + add r4, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r2, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + bl sub_02054F94 + add r1, r0, #0 + add r0, r5, #0 + add r2, sp, #0x1c + bl ov6_02241874 + cmp r0, #0 + bne _022411FC + add sp, #0xac + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022411FC: + ldr r0, [r5, #0xc] + bl sub_0207A268 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203A640 + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0 + bl sub_0207A0FC + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + add r2, r4, #0 + add r3, sp, #0x28 + bl ov6_02242634 + mov r0, #1 + mov r1, #0 + str r0, [sp, #0x30] + add r0, sp, #0x3c + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [sp, #0x2c] + str r1, [r0, #0xc] + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206A984 + cmp r0, #0 + beq _02241248 + mov r0, #1 + str r0, [sp, #0x10] + b _0224124C +_02241248: + mov r0, #0 + str r0, [sp, #0x10] +_0224124C: + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02241294 + add r0, r5, #0 + add r1, sp, #0x20 + bl ov6_02242440 + cmp r0, #0 + beq _02241294 + mov r0, #0xb + add r1, r0, #0 + add r1, #0xf5 + bl sub_02051D8C + str r0, [sp, #0x24] + add r1, r5, #0 + bl sub_02052314 + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x24] + bl ov6_0224239C + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + bl sub_02069434 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x24] + add r0, r5, #0 + bl sub_02050E78 + add sp, #0xac + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02241294: + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _022412B2 + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206AE5C + str r0, [sp, #0x14] + ldr r1, [sp, #0x14] + add r0, r5, #0 + add r2, sp, #0x24 + bl ov6_02242328 + b _022412BC +_022412B2: + mov r0, #0xb + mov r1, #0x4a + bl sub_02051D8C + str r0, [sp, #0x24] +_022412BC: + ldr r0, [sp, #0x24] + add r1, r5, #0 + bl sub_02052314 + add r0, sp, #0x1c + ldrb r0, [r0] + cmp r0, #0 + bne _02241380 + mov r7, #4 + mov r0, #0 + add r1, r4, #0 + add r2, sp, #0x4c + add r3, r7, #0 +_022412D6: + ldr r6, [r1, #8] + add r0, r0, #1 + str r6, [r2, #0] + ldrsb r6, [r1, r7] + strh r6, [r2, #4] + ldrsb r6, [r1, r3] + add r1, #8 + strh r6, [r2, #6] + add r2, #8 + cmp r0, #0xc + blt _022412D6 + add r0, r5, #0 + bl sub_0203D174 + bl sub_02027560 + bl sub_02027474 + add r6, r0, #0 + add r0, r4, #0 + add r1, sp, #0x5c + add r2, sp, #0x64 + bl ov6_02240C9C + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x4c + add r3, sp, #0x54 + bl ov6_02240CC8 + add r0, r5, #0 + add r1, r6, #0 + add r2, sp, #0x7c + add r3, sp, #0x84 + bl ov6_02240D00 + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0x8c + add r3, sp, #0x94 + bl ov6_022477B8 + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02241356 + ldr r1, [sp, #0x14] + add r0, r5, #0 + add r2, r6, #0 + add r3, sp, #0x4c + bl ov6_02242354 + add r0, sp, #0x4c + str r0, [sp] + add r0, sp, #0x28 + str r0, [sp, #4] + add r0, sp, #0x3c + str r0, [sp, #8] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x24] + add r0, r5, #0 + add r3, r4, #0 + bl ov6_02241674 + b _022413C2 +_02241356: + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206B034 + ldr r1, [sp, #0x24] + mov r2, #0xb + str r0, [r1, #0x20] + ldr r0, [sp, #0x24] + ldr r1, [r5, #0xc] + bl sub_02079170 + add r0, sp, #0x28 + str r0, [sp] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x24] + add r0, r5, #0 + add r3, sp, #0x4c + bl ov6_0224174C + b _022413C2 +_02241380: + cmp r0, #1 + bne _022413B8 + mov r0, #0 + add r1, sp, #0x4c + mov r3, #0xd0 + mov r6, #0xd1 +_0224138C: + add r2, r4, #0 + add r2, #0xd4 + ldr r2, [r2, #0] + add r0, r0, #1 + str r2, [r1, #0] + ldrsb r2, [r4, r3] + strh r2, [r1, #4] + ldrsb r2, [r4, r6] + add r4, #8 + strh r2, [r1, #6] + add r1, #8 + cmp r0, #5 + blt _0224138C + add r0, sp, #0x28 + str r0, [sp] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x24] + add r0, r5, #0 + add r3, sp, #0x4c + bl ov6_02241790 + b _022413C2 +_022413B8: + bl sub_02022974 + add sp, #0xac + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_022413C2: + cmp r0, #0 + beq _022413D2 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x24] + add r0, r5, #0 + bl sub_02050E78 + b _022413D6 +_022413D2: + bl sub_02022974 +_022413D6: + mov r0, #0 + add r5, #0x78 + strh r0, [r5] + mov r0, #1 + add sp, #0xac + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022411C8 + + thumb_func_start ov6_022413E4 +ov6_022413E4: ; 0x022413E4 + push {r4, r5, r6, r7, lr} + sub sp, #0xac + add r5, r0, #0 + add r4, r1, #0 + mov r0, #0 + str r0, [r4, #0] + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r2, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_02054F94 + add r7, r0, #0 + add r2, sp, #0x20 + add r0, r5, #0 + add r1, r7, #0 + add r2, #1 + bl ov6_02241874 + add r1, sp, #0x20 + strb r0, [r1] + ldrb r0, [r1] + cmp r0, #0 + bne _02241426 + add sp, #0xac + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241426: + ldr r0, [r5, #0xc] + bl sub_0207A268 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0203A640 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r1, #0 + bl sub_0207A0FC + str r0, [sp, #0x1c] + ldr r1, [sp, #0x1c] + ldr r2, [sp, #0x14] + add r0, r5, #0 + add r3, sp, #0x28 + bl ov6_02242634 + ldr r0, [r5, #0xc] + bl sub_0202D834 + bl sub_0202D9D8 + cmp r0, #0 + bne _02241470 + add r0, r6, #0 + bl sub_02054A40 + mov r1, #1 + str r1, [sp, #0x2c] + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + add r1, sp, #0x20 + strb r0, [r1, #0x14] +_02241470: + ldr r0, [r5, #0xc] + bl sub_0203A790 + bl sub_0203A74C + add r3, r0, #0 + ldr r0, [sp, #0x1c] + add r1, sp, #0x20 + str r0, [sp] + ldrb r1, [r1] + mov r0, #0 + add r2, sp, #0x28 + bl ov6_0224226C + add r1, sp, #0x20 + strb r0, [r1] + add r0, r5, #0 + add r1, sp, #0x20 + bl ov6_02241ABC + ldr r0, [sp, #0x1c] + add r1, sp, #0x20 + bl ov6_02241A90 + add r1, sp, #0x20 + ldrb r1, [r1] + add r0, r5, #0 + add r2, r7, #0 + bl ov6_022417C8 + cmp r0, #0 + beq _022414B6 + mov r0, #1 + str r0, [sp, #0x10] + b _022414BA +_022414B6: + mov r0, #0 + str r0, [sp, #0x10] +_022414BA: + add r1, sp, #0x3c + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + str r0, [r1, #0xc] + str r0, [sp, #0x48] + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206A984 + cmp r0, #0 + beq _022414DC + mov r0, #1 + str r0, [sp, #0xc] + b _022414E0 +_022414DC: + mov r0, #0 + str r0, [sp, #0xc] +_022414E0: + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _02241538 + add r0, r5, #0 + add r1, sp, #0x24 + bl ov6_02242440 + cmp r0, #0 + beq _02241538 + ldr r0, [sp, #0x24] + mov r1, #6 + bl sub_0202D93C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + add r1, sp, #0x28 + bl ov6_02242388 + cmp r0, #0 + bne _02241532 + mov r0, #0xb + add r1, r0, #0 + add r1, #0xf5 + bl sub_02051D8C + str r0, [r4, #0] + add r1, r5, #0 + bl sub_02052314 + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x24] + ldr r2, [r4, #0] + bl ov6_0224239C + add r5, #0x94 + ldr r0, [r5, #0] + bl sub_02069434 + add sp, #0xac + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02241532: + add sp, #0xac + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241538: + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _02241556 + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206AE5C + str r0, [sp, #0x18] + ldr r1, [sp, #0x18] + add r0, r5, #0 + add r2, r4, #0 + bl ov6_02242328 + b _02241560 +_02241556: + mov r0, #0xb + mov r1, #0x4a + bl sub_02051D8C + str r0, [r4, #0] +_02241560: + ldr r0, [r4, #0] + add r1, r5, #0 + bl sub_02052314 + add r0, sp, #0x20 + ldrb r0, [r0, #1] + cmp r0, #0 + bne _02241624 + mov r7, #4 + ldr r1, [sp, #0x14] + mov r0, #0 + add r2, sp, #0x4c + add r3, r7, #0 +_0224157A: + ldr r6, [r1, #8] + add r0, r0, #1 + str r6, [r2, #0] + ldrsb r6, [r1, r7] + strh r6, [r2, #4] + ldrsb r6, [r1, r3] + add r1, #8 + strh r6, [r2, #6] + add r2, #8 + cmp r0, #0xc + blt _0224157A + add r0, r5, #0 + bl sub_0203D174 + bl sub_02027560 + bl sub_02027474 + add r6, r0, #0 + ldr r0, [sp, #0x14] + add r1, sp, #0x5c + add r2, sp, #0x64 + bl ov6_02240C9C + ldr r1, [sp, #0x14] + add r0, r5, #0 + add r2, sp, #0x4c + add r3, sp, #0x54 + bl ov6_02240CC8 + add r0, r5, #0 + add r1, r6, #0 + add r2, sp, #0x7c + add r3, sp, #0x84 + bl ov6_02240D00 + ldr r0, [sp, #0x14] + add r1, r6, #0 + add r2, sp, #0x8c + add r3, sp, #0x94 + bl ov6_022477B8 + ldr r0, [sp, #0xc] + cmp r0, #0 + bne _022415FA + ldr r1, [sp, #0x18] + add r0, r5, #0 + add r2, r6, #0 + add r3, sp, #0x4c + bl ov6_02242354 + add r0, sp, #0x4c + str r0, [sp] + add r0, sp, #0x28 + str r0, [sp, #4] + add r0, sp, #0x3c + str r0, [sp, #8] + ldr r1, [sp, #0x1c] + ldr r2, [r4, #0] + ldr r3, [sp, #0x14] + add r0, r5, #0 + bl ov6_02241674 + b _02241634 +_022415FA: + ldr r0, [r5, #0xc] + bl sub_020507E4 + bl sub_0206B034 + ldr r1, [r4, #0] + mov r2, #0xb + str r0, [r1, #0x20] + ldr r0, [r4, #0] + ldr r1, [r5, #0xc] + bl sub_02079170 + add r0, sp, #0x28 + str r0, [sp] + ldr r1, [sp, #0x1c] + ldr r2, [r4, #0] + add r0, r5, #0 + add r3, sp, #0x4c + bl ov6_0224174C + b _02241634 +_02241624: + bl sub_02022974 + ldr r0, [r4, #0] + bl sub_020520A4 + add sp, #0xac + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241634: + cmp r0, #0 + bne _0224163C + mov r0, #0 + str r0, [sp, #0x10] +_0224163C: + mov r0, #4 + bl sub_0201833C + cmp r0, #0 + bne _0224164A + bl sub_02022974 +_0224164A: + mov r0, #0xb + bl sub_0201833C + cmp r0, #0 + bne _02241658 + bl sub_02022974 +_02241658: + ldr r0, [sp, #0x10] + cmp r0, #0 + bne _02241666 + ldr r0, [r4, #0] + bl sub_020520A4 + b _0224166C +_02241666: + mov r0, #0 + add r5, #0x78 + strh r0, [r5] +_0224166C: + ldr r0, [sp, #0x10] + add sp, #0xac + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022413E4 + + thumb_func_start ov6_02241674 +ov6_02241674: ; 0x02241674 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + ldr r6, [sp, #0x38] + add r5, r0, #0 + ldr r0, [r6, #0xc] + add r7, r2, #0 + str r1, [sp, #0x10] + ldr r4, [sp, #0x30] + cmp r0, #0 + beq _02241722 + ldr r0, [r6, #0] + cmp r0, #1 + bne _022416A8 + ldr r0, [r3, #0x7c] + str r0, [r4, #0x20] + add r0, r3, #0 + add r0, #0x80 + ldr r0, [r0, #0] + str r0, [r4, #0x28] + add r0, r3, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r3, #0x88 + str r0, [r4, #0x50] + ldr r0, [r3, #0] + str r0, [r4, #0x58] +_022416A8: + add r0, r5, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, sp, #0x18 + add r2, sp, #0x14 + bl sub_0206978C + ldr r0, [r6, #4] + cmp r0, #1 + bne _022416E4 + add r0, r5, #0 + bl sub_0203D174 + bl sub_02025E38 + bl sub_02025F20 + str r0, [sp] + ldr r0, [sp, #0x34] + mov r2, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + str r0, [sp, #8] + str r7, [sp, #0xc] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x14] + ldr r3, [r6, #8] + bl ov6_02241F2C + b _022416FE +_022416E4: + mov r0, #1 + str r0, [sp] + str r7, [sp, #4] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + str r0, [sp, #8] + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x34] + str r0, [sp, #0xc] + add r0, r5, #0 + add r3, r4, #0 + bl ov6_02241F7C +_022416FE: + add r4, r0, #0 + cmp r4, #0 + beq _02241744 + ldr r0, [r5, #0x3c] + bl sub_0205EABC + add r6, r0, #0 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + add r2, r0, #0 + add r0, r5, #0 + add r5, #0x94 + ldr r3, [r5, #0] + add r1, r6, #0 + bl sub_02069474 + b _02241744 +_02241722: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r1, #0 + ldr r2, [sp, #0x34] + mov r1, #0xff + add r3, r4, #0 + str r7, [sp, #8] + bl ov6_02241DC4 + add r4, r0, #0 + beq _02241744 + add r5, #0x94 + ldr r0, [r5, #0] + bl sub_02069434 +_02241744: + add r0, r4, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02241674 + + thumb_func_start ov6_0224174C +ov6_0224174C: ; 0x0224174C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + mov r0, #0 + add r5, r1, #0 + add r4, r2, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r1, #0xff + add r6, r3, #0 + str r4, [sp, #8] + bl ov6_02241DC4 + cmp r0, #0 + bne _02241774 + add sp, #0xc + mov r0, #0 + pop {r3, r4, r5, r6, pc} +_02241774: + mov r0, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r1, #0xff + add r3, r6, #0 + str r4, [sp, #8] + bl ov6_02241DC4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_0224174C + + thumb_func_start ov6_02241790 +ov6_02241790: ; 0x02241790 + push {lr} + sub sp, #0xc + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + str r2, [sp, #8] + add r0, r1, #0 + ldr r2, [sp, #0x10] + mov r1, #0xff + bl ov6_02241DC4 + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov6_02241790 + + thumb_func_start ov6_022417AC +ov6_022417AC: ; 0x022417AC + push {lr} + sub sp, #0xc + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r2, [sp, #8] + add r0, r1, #0 + ldr r1, [sp, #0x14] + ldr r2, [sp, #0x10] + bl ov6_02241DC4 + add sp, #0xc + pop {pc} + thumb_func_end ov6_022417AC + + thumb_func_start ov6_022417C8 +ov6_022417C8: ; 0x022417C8 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + lsl r1, r7, #8 + add r5, r0, #0 + add r6, r2, #0 + bl ov6_022418B4 + cmp r0, #0 + bne _02241808 + add r0, r5, #0 + add r0, #0x78 + ldrh r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x78 + strh r1, [r0] + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x64 + blo _02241800 + bl sub_02022974 +_02241800: + cmp r4, #5 + blo _02241808 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02241808: + add r0, r6, #0 + mov r4, #0x28 + bl sub_0205DAD4 + cmp r0, #0 + beq _0224181C + add r4, #0x1e + lsl r0, r4, #0x18 + lsr r4, r0, #0x18 + b _0224182C +_0224181C: + ldr r0, [r5, #0x3c] + bl sub_0205EB74 + cmp r0, #1 + bne _0224182C + add r4, #0x1e + lsl r0, r4, #0x18 + lsr r4, r0, #0x18 +_0224182C: + add r0, r5, #0 + bl sub_02055C40 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246B74 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0x64 + bls _02241844 + mov r4, #0x64 +_02241844: + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #0x64 + blo _0224185C + bl sub_02022974 +_0224185C: + cmp r6, r4 + bge _02241870 + add r0, r5, #0 + add r1, r7, #0 + bl ov6_022418DC + cmp r0, #0 + beq _02241870 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02241870: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022417C8 + + thumb_func_start ov6_02241874 +ov6_02241874: ; 0x02241874 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl sub_0205DE6C + cmp r0, #0 + beq _022418B0 + add r0, r6, #0 + bl sub_0205DB58 + cmp r0, #0 + beq _022418A0 + mov r0, #1 + strb r0, [r4] + add r0, r5, #0 + bl ov6_02242158 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r4, r5, r6, pc} +_022418A0: + mov r0, #0 + strb r0, [r4] + add r0, r5, #0 + bl ov6_0224214C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r4, r5, r6, pc} +_022418B0: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02241874 + + thumb_func_start ov6_022418B4 +ov6_022418B4: ; 0x022418B4 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #0xa + bl sub_020E2178 + lsr r1, r0, #8 + cmp r1, #8 + bls _022418C8 + mov r1, #8 +_022418C8: + mov r0, #8 + add r4, #0x78 + sub r1, r0, r1 + ldrh r0, [r4] + cmp r0, r1 + blo _022418D8 + mov r0, #1 + pop {r4, pc} +_022418D8: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_022418B4 + + thumb_func_start ov6_022418DC +ov6_022418DC: ; 0x022418DC + push {r3, r4, r5, lr} + add r4, r1, #0 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #0x64 + blo _022418F8 + bl sub_02022974 +_022418F8: + cmp r5, r4 + blo _02241900 + mov r0, #0 + pop {r3, r4, r5, pc} +_02241900: + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov6_022418DC + + thumb_func_start ov6_02241904 +ov6_02241904: ; 0x02241904 + push {r4, lr} + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x64 + blo _0224191E + bl sub_02022974 +_0224191E: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x14 + bhs _0224192A + mov r0, #0 + pop {r4, pc} +_0224192A: + blo _02241934 + cmp r0, #0x28 + bhs _02241934 + mov r0, #1 + pop {r4, pc} +_02241934: + cmp r0, #0x28 + blo _02241940 + cmp r0, #0x32 + bhs _02241940 + mov r0, #2 + pop {r4, pc} +_02241940: + cmp r0, #0x32 + blo _0224194C + cmp r0, #0x3c + bhs _0224194C + mov r0, #3 + pop {r4, pc} +_0224194C: + cmp r0, #0x3c + blo _02241958 + cmp r0, #0x46 + bhs _02241958 + mov r0, #4 + pop {r4, pc} +_02241958: + cmp r0, #0x46 + blo _02241964 + cmp r0, #0x50 + bhs _02241964 + mov r0, #5 + pop {r4, pc} +_02241964: + cmp r0, #0x50 + blo _02241970 + cmp r0, #0x55 + bhs _02241970 + mov r0, #6 + pop {r4, pc} +_02241970: + cmp r0, #0x55 + blo _0224197C + cmp r0, #0x5a + bhs _0224197C + mov r0, #7 + pop {r4, pc} +_0224197C: + cmp r0, #0x5a + blo _02241988 + cmp r0, #0x5e + bhs _02241988 + mov r0, #8 + pop {r4, pc} +_02241988: + cmp r0, #0x5e + blo _02241994 + cmp r0, #0x62 + bhs _02241994 + mov r0, #9 + pop {r4, pc} +_02241994: + cmp r0, #0x62 + bne _0224199C + mov r0, #0xa + pop {r4, pc} +_0224199C: + mov r0, #0xb + pop {r4, pc} + thumb_func_end ov6_02241904 + + thumb_func_start ov6_022419A0 +ov6_022419A0: ; 0x022419A0 + push {r4, lr} + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x64 + blo _022419BA + bl sub_02022974 +_022419BA: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0x3c + bhs _022419C6 + mov r0, #0 + pop {r4, pc} +_022419C6: + blo _022419D0 + cmp r0, #0x5a + bhs _022419D0 + mov r0, #1 + pop {r4, pc} +_022419D0: + cmp r0, #0x5a + blo _022419DC + cmp r0, #0x5f + bhs _022419DC + mov r0, #2 + pop {r4, pc} +_022419DC: + cmp r0, #0x5f + blo _022419E8 + cmp r0, #0x63 + bhs _022419E8 + mov r0, #3 + pop {r4, pc} +_022419E8: + mov r0, #4 + pop {r4, pc} + thumb_func_end ov6_022419A0 + + thumb_func_start ov6_022419EC +ov6_022419EC: ; 0x022419EC + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r4, #0 + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #0x64 + blo _02241A0A + bl sub_02022974 +_02241A0A: + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + cmp r5, #0 + beq _02241A1C + cmp r5, #1 + beq _02241A40 + cmp r5, #2 + beq _02241A64 + b _02241A88 +_02241A1C: + cmp r0, #0x3c + bhs _02241A24 + mov r4, #0 + b _02241A8C +_02241A24: + cmp r0, #0x5a + bhs _02241A2C + mov r4, #1 + b _02241A8C +_02241A2C: + cmp r0, #0x5f + bhs _02241A34 + mov r4, #2 + b _02241A8C +_02241A34: + cmp r0, #0x63 + bhs _02241A3C + mov r4, #3 + b _02241A8C +_02241A3C: + mov r4, #4 + b _02241A8C +_02241A40: + cmp r0, #0x28 + bhs _02241A48 + mov r4, #0 + b _02241A8C +_02241A48: + cmp r0, #0x50 + bhs _02241A50 + mov r4, #1 + b _02241A8C +_02241A50: + cmp r0, #0x5f + bhs _02241A58 + mov r4, #2 + b _02241A8C +_02241A58: + cmp r0, #0x63 + bhs _02241A60 + mov r4, #3 + b _02241A8C +_02241A60: + mov r4, #4 + b _02241A8C +_02241A64: + cmp r0, #0x28 + bhs _02241A6C + mov r4, #0 + b _02241A8C +_02241A6C: + cmp r0, #0x50 + bhs _02241A74 + mov r4, #1 + b _02241A8C +_02241A74: + cmp r0, #0x5f + bhs _02241A7C + mov r4, #2 + b _02241A8C +_02241A7C: + cmp r0, #0x63 + bhs _02241A84 + mov r4, #3 + b _02241A8C +_02241A84: + mov r4, #4 + b _02241A8C +_02241A88: + bl sub_02022974 +_02241A8C: + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_022419EC + + thumb_func_start ov6_02241A90 +ov6_02241A90: ; 0x02241A90 + push {r4, lr} + add r4, r1, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + cmp r1, #0xe0 + beq _02241AAC + mov r0, #5 + lsl r0, r0, #6 + cmp r1, r0 + bne _02241AB8 +_02241AAC: + ldrb r0, [r4] + mov r1, #3 + lsl r0, r0, #1 + bl sub_020E1F6C + strb r0, [r4] +_02241AB8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02241A90 + + thumb_func_start ov6_02241ABC +ov6_02241ABC: ; 0x02241ABC + push {r4, lr} + ldr r0, [r0, #0xc] + add r4, r1, #0 + bl sub_0202D834 + bl sub_0202DA04 + cmp r0, #1 + bne _02241AD6 + ldrb r0, [r4] + asr r0, r0, #1 + strb r0, [r4] + pop {r4, pc} +_02241AD6: + cmp r0, #2 + bne _02241AE2 + ldrb r1, [r4] + lsr r0, r1, #1 + add r0, r1, r0 + strb r0, [r4] +_02241AE2: + pop {r4, pc} + thumb_func_end ov6_02241ABC + + thumb_func_start ov6_02241AE4 +ov6_02241AE4: ; 0x02241AE4 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrb r0, [r1, #0xd] + cmp r0, #0 + bne _02241B1E + ldrb r0, [r1, #0xe] + cmp r0, #0x1c + bne _02241B1E + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r5, r0, #0x10 + cmp r5, #2 + blo _02241B04 + bl sub_02022974 +_02241B04: + cmp r5, #0 + bne _02241B1E + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_02074470 + mov r1, #0x19 + bl sub_020E2178 + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} +_02241B1E: + bl sub_0201D2E8 + ldr r1, _02241B3C ; =0x00000A3E + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x19 + blo _02241B34 + bl sub_02022974 +_02241B34: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, pc} + nop +_02241B3C: .word 0x00000A3E + thumb_func_end ov6_02241AE4 + + thumb_func_start ov6_02241B40 +ov6_02241B40: ; 0x02241B40 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + ldrh r2, [r0, #6] + ldrh r1, [r0, #4] + cmp r1, r2 + blo _02241B54 + lsl r0, r2, #0x18 + lsr r5, r0, #0x18 + lsl r0, r1, #0x18 + b _02241B5A +_02241B54: + lsl r0, r1, #0x18 + lsr r5, r0, #0x18 + lsl r0, r2, #0x18 +_02241B5A: + lsr r4, r0, #0x18 + bl sub_0201D2E8 + sub r1, r4, r5 + add r1, r1, #1 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_020E1F6C + lsl r0, r1, #0x18 + lsr r6, r0, #0x18 + ldrb r0, [r7, #0xd] + cmp r0, #0 + bne _02241BA4 + ldrb r0, [r7, #0xe] + cmp r0, #0x37 + beq _02241B84 + cmp r0, #0x48 + beq _02241B84 + cmp r0, #0x2e + bne _02241BA4 +_02241B84: + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r7, r0, #0x10 + cmp r7, #2 + blo _02241B94 + bl sub_02022974 +_02241B94: + cmp r7, #0 + bne _02241BA0 + add r0, r5, r6 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, r6, r7, pc} +_02241BA0: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_02241BA4: + add r0, r5, r6 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02241B40 + + thumb_func_start ov6_02241BAC +ov6_02241BAC: ; 0x02241BAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #0x10] + ldr r6, [sp, #0x40] + str r1, [sp, #0x14] + mov r0, #0xb + str r2, [sp, #0x18] + add r5, r3, #0 + bl sub_02073C74 + str r0, [sp, #0x1c] + bl sub_02073C2C + ldrb r0, [r6, #0xd] + mov r7, #0 + cmp r0, #0 + bne _02241C38 + ldrb r0, [r6, #0xe] + cmp r0, #0x38 + bne _02241C16 + ldr r0, [sp, #0x10] + mov r1, #0x12 + bl sub_020759F0 + cmp r0, #0 + beq _02241C38 + cmp r0, #0xfe + beq _02241C38 + cmp r0, #0xff + beq _02241C38 + bl sub_0201D2E8 + ldr r1, _02241CBC ; =0x00005556 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #3 + blo _02241BFE + bl sub_02022974 +_02241BFE: + cmp r4, #0 + beq _02241C38 + ldr r0, [sp, #0x44] + mov r1, #0x6f + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x24] + mov r7, #1 + b _02241C38 +_02241C16: + cmp r0, #0x1c + bne _02241C38 + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r4, r0, #0x10 + cmp r4, #2 + blo _02241C2A + bl sub_02022974 +_02241C2A: + cmp r4, #0 + bne _02241C38 + ldr r0, [sp, #0x44] + bl sub_02075BCC + str r0, [sp, #0x20] + mov r7, #1 +_02241C38: + add r0, r5, #0 + bl sub_02075E64 + add r4, r0, #0 + cmp r7, #0 + beq _02241C86 +_02241C44: + ldrb r0, [r6, #0xe] + cmp r0, #0x38 + bne _02241C6C + ldr r0, [sp, #0x10] + add r1, r4, #0 + bl sub_02075DAC + add r7, r0, #0 + cmp r7, #2 + bne _02241C5C + bl sub_02022974 +_02241C5C: + ldr r0, [sp, #0x24] + cmp r7, r0 + bne _02241C86 + add r0, r5, #0 + bl sub_02075E64 + add r4, r0, #0 + b _02241C44 +_02241C6C: + cmp r0, #0x1c + bne _02241C44 + add r0, r4, #0 + bl sub_02075BFC + ldr r1, [sp, #0x20] + cmp r0, r1 + beq _02241C86 + add r0, r5, #0 + bl sub_02075E64 + add r4, r0, #0 + b _02241C44 +_02241C86: + mov r0, #1 + str r0, [sp] + str r4, [sp, #4] + str r0, [sp, #8] + ldr r0, [r6, #0] + mov r3, #0x20 + str r0, [sp, #0xc] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + bl sub_02073D80 + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x48] + add r1, r6, #0 + bl ov6_02242514 + cmp r0, #0 + bne _02241CB2 + bl sub_02022974 +_02241CB2: + ldr r0, [sp, #0x1c] + bl sub_020181C4 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241CBC: .word 0x00005556 + thumb_func_end ov6_02241BAC + + thumb_func_start ov6_02241CC0 +ov6_02241CC0: ; 0x02241CC0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + mov r0, #0xb + str r1, [sp, #0xc] + str r2, [sp, #0x10] + add r5, r3, #0 + bl sub_02073C74 + add r4, r0, #0 + bl sub_02073C2C + add r0, r7, #0 + mov r1, #0x12 + mov r6, #1 + bl sub_020759F0 + cmp r0, #0 + beq _02241CEE + cmp r0, #0xfe + beq _02241CEE + cmp r0, #0xff + bne _02241CF0 +_02241CEE: + mov r6, #0 +_02241CF0: + cmp r6, #0 + beq _02241D80 + ldrb r0, [r5, #0xd] + cmp r0, #0 + bne _02241D80 + ldrb r0, [r5, #0xe] + cmp r0, #0x38 + bne _02241D80 + bl sub_0201D2E8 + ldr r1, _02241DC0 ; =0x00005556 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #3 + blo _02241D16 + bl sub_02022974 +_02241D16: + cmp r6, #0 + beq _02241D80 + ldr r0, [sp, #0x28] + mov r1, #0x6f + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + cmp r6, #1 + bne _02241D30 + mov r6, #0 + b _02241D3C +_02241D30: + cmp r6, #0 + bne _02241D38 + mov r6, #1 + b _02241D3C +_02241D38: + bl sub_02022974 +_02241D3C: + ldr r0, [sp, #0x28] + add r1, r5, #0 + bl ov6_02241AE4 + str r6, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r2, [sp, #0xc] + add r0, r4, #0 + add r1, r7, #0 + mov r3, #0x20 + bl sub_02074088 + add r0, r4, #0 + mov r1, #7 + add r2, r5, #0 + bl sub_02074B30 + ldr r0, [sp, #0x10] + ldr r3, [sp, #0x2c] + add r1, r5, #0 + add r2, r4, #0 + bl ov6_02242514 + cmp r0, #0 + bne _02241D76 + bl sub_02022974 +_02241D76: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_02241D80: + ldr r0, [sp, #0x28] + add r1, r5, #0 + bl ov6_02241AE4 + str r0, [sp] + ldr r2, [sp, #0xc] + add r0, r4, #0 + add r1, r7, #0 + mov r3, #0x20 + bl sub_02074044 + add r0, r4, #0 + mov r1, #7 + add r2, r5, #0 + bl sub_02074B30 + ldr r0, [sp, #0x10] + ldr r3, [sp, #0x2c] + add r1, r5, #0 + add r2, r4, #0 + bl ov6_02242514 + cmp r0, #0 + bne _02241DB4 + bl sub_02022974 +_02241DB4: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02241DC0: .word 0x00005556 + thumb_func_end ov6_02241CC0 + + thumb_func_start ov6_02241DC4 +ov6_02241DC4: ; 0x02241DC4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #0xc] + mov r7, #0 + add r1, sp, #0x10 + strb r7, [r1] + add r1, sp, #0x18 + ldrb r1, [r1, #0x10] + add r6, r0, #0 + add r5, r2, #0 + add r4, r3, #0 + cmp r1, #0 + beq _02241DE8 + cmp r1, #1 + beq _02241E44 + cmp r1, #2 + beq _02241E90 + b _02241EDE +_02241DE8: + mov r1, #8 + str r1, [sp] + mov r1, #0x2a + str r1, [sp, #4] + add r1, sp, #0x10 + str r1, [sp, #8] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0xc + bl ov6_0224222C + cmp r0, #0 + bne _02241E26 + mov r0, #0xd + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + add r0, sp, #0x10 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0xc + bl ov6_0224222C + cmp r0, #0 + bne _02241E26 + bl ov6_02241904 + add r1, sp, #0x10 + strb r0, [r1] +_02241E26: + add r2, sp, #0x10 + ldrb r2, [r2] + add r0, r4, #0 + add r1, r5, #0 + bl ov6_022425D4 + add r1, sp, #0x10 + strb r0, [r1] + ldrb r0, [r1] + lsl r0, r0, #3 + add r0, r4, r0 + ldrh r0, [r0, #4] + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + b _02241EE2 +_02241E44: + mov r1, #8 + str r1, [sp] + mov r1, #0x2a + str r1, [sp, #4] + add r1, sp, #0x10 + str r1, [sp, #8] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #5 + bl ov6_0224222C + mov r0, #0xd + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + add r0, sp, #0x10 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #5 + bl ov6_0224222C + cmp r0, #0 + bne _02241E7E + bl ov6_022419A0 + add r1, sp, #0x10 + strb r0, [r1] +_02241E7E: + add r0, sp, #0x10 + ldrb r0, [r0] + add r1, r5, #0 + lsl r0, r0, #3 + add r0, r4, r0 + bl ov6_02241B40 + add r7, r0, #0 + b _02241EE2 +_02241E90: + mov r1, #8 + str r1, [sp] + mov r1, #0x2a + str r1, [sp, #4] + add r1, sp, #0x10 + str r1, [sp, #8] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #5 + bl ov6_0224222C + mov r0, #0xd + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + add r0, sp, #0x10 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #5 + bl ov6_0224222C + cmp r0, #0 + bne _02241ECC + ldr r0, [sp, #0xc] + bl ov6_022419EC + add r1, sp, #0x10 + strb r0, [r1] +_02241ECC: + add r0, sp, #0x10 + ldrb r0, [r0] + add r1, r5, #0 + lsl r0, r0, #3 + add r0, r4, r0 + bl ov6_02241B40 + add r7, r0, #0 + b _02241EE2 +_02241EDE: + bl sub_02022974 +_02241EE2: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov6_022422D0 + cmp r0, #0 + beq _02241EF6 + add sp, #0x14 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241EF6: + add r0, r7, #0 + add r1, r5, #0 + bl ov6_02242388 + cmp r0, #1 + bne _02241F08 + add sp, #0x14 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02241F08: + ldr r0, [sp, #0x30] + str r6, [sp] + str r0, [sp, #4] + add r0, sp, #0x10 + ldrb r0, [r0] + ldr r2, [sp, #0x2c] + add r1, r7, #0 + lsl r0, r0, #3 + ldr r0, [r4, r0] + add r3, r5, #0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl ov6_02241CC0 + mov r0, #1 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02241DC4 + + thumb_func_start ov6_02241F2C +ov6_02241F2C: ; 0x02241F2C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _02241F40 + bl sub_02022974 +_02241F40: + lsl r0, r4, #0x18 + lsr r1, r0, #0x18 + cmp r7, #0 + beq _02241F62 + ldr r0, [sp, #0x24] + ldr r3, [sp, #0x20] + str r0, [sp] + ldr r0, [sp, #0x28] + add r2, r6, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + str r0, [sp, #8] + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + bl ov6_02241BAC + b _02241F76 +_02241F62: + ldr r0, [sp, #0x28] + ldr r3, [sp, #0x24] + str r0, [sp] + ldr r0, [sp, #0x2c] + add r2, r6, #0 + str r0, [sp, #4] + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + bl ov6_02241CC0 +_02241F76: + mov r0, #1 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02241F2C + + thumb_func_start ov6_02241F7C +ov6_02241F7C: ; 0x02241F7C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + add r6, r1, #0 + mov r1, #0 + add r0, sp, #0x10 + strb r1, [r0] + mov r0, #8 + str r0, [sp] + mov r0, #0x2a + add r5, r3, #0 + str r0, [sp, #4] + add r0, sp, #0x10 + str r0, [sp, #8] + str r2, [sp, #0xc] + add r1, r2, #0 + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0xc + bl ov6_0224222C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bne _02241FD2 + mov r0, #0xd + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + add r0, sp, #0x10 + str r0, [sp, #8] + ldr r1, [sp, #0xc] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0xc + bl ov6_0224222C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bne _02241FD2 + bl ov6_02241904 + add r1, sp, #0x10 + strb r0, [r1] +_02241FD2: + add r0, sp, #0x10 + ldrb r0, [r0] + lsl r0, r0, #3 + add r1, r5, r0 + ldrh r1, [r1, #4] + ldr r5, [r5, r0] + ldr r0, [sp, #0x30] + lsl r1, r1, #0x18 + lsr r7, r1, #0x18 + cmp r0, #0 + bne _02241FFE + add r0, r4, #0 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, r5, #0 + add r2, r7, #0 + bl sub_02069774 + add r0, r4, #0 + bl sub_02069B74 + b _0224201A +_02241FFE: + cmp r5, r0 + bne _02242012 + add r5, r0, #0 + ldr r0, [sp, #0x34] + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r4, #0 + bl sub_02069B74 + b _0224201A +_02242012: + add r4, #0x94 + ldr r0, [r4, #0] + bl sub_02069434 +_0224201A: + ldr r0, [sp, #0x2c] + str r6, [sp] + str r0, [sp, #4] + lsl r0, r5, #0x10 + ldr r2, [sp, #0x28] + ldr r3, [sp, #0xc] + lsr r0, r0, #0x10 + add r1, r7, #0 + bl ov6_02241CC0 + mov r0, #1 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02241F7C + + thumb_func_start ov6_02242034 +ov6_02242034: ; 0x02242034 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + add r4, r1, #0 + bl ov5_021EFFE4 + str r0, [sp, #8] + ldr r0, [r5, #0xc] + bl sub_0207A268 + mov r1, #0 + bl sub_0207A0FC + str r0, [sp, #0xc] + ldr r1, [sp, #0xc] + add r0, r5, #0 + mov r2, #0 + add r3, sp, #0x10 + bl ov6_02242634 + bl sub_0201D2E8 + ldr r1, _022420D0 ; =0x00001746 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #0xb + blo _02242072 + bl sub_02022974 +_02242072: + add r0, r6, #5 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, sp, #0x10 + ldrb r1, [r0, #0xd] + cmp r1, #0 + bne _022420A4 + ldrb r0, [r0, #0xe] + cmp r0, #0x37 + beq _0224208E + cmp r0, #0x48 + beq _0224208E + cmp r0, #0x2e + bne _022420A4 +_0224208E: + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r6, r0, #0x10 + cmp r6, #2 + blo _0224209E + bl sub_02022974 +_0224209E: + cmp r6, #0 + beq _022420A4 + mov r7, #0xf +_022420A4: + add r0, r5, #0 + bl ov5_021F0040 + mov r1, #0x63 + lsl r1, r1, #2 + ldr r2, [r4, r1] + mov r0, #2 + orr r0, r2 + str r0, [r4, r1] + ldr r0, [sp, #0xc] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #8] + mov r2, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add r3, sp, #0x10 + str r4, [sp, #4] + bl ov6_02241CC0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022420D0: .word 0x00001746 + thumb_func_end ov6_02242034 + + thumb_func_start ov6_022420D4 +ov6_022420D4: ; 0x022420D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + str r2, [sp, #8] + ldr r0, [r5, #0xc] + add r7, r1, #0 + add r6, r3, #0 + bl sub_0207A268 + mov r1, #0 + bl sub_0207A0FC + add r4, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + add r3, sp, #0xc + bl ov6_02242634 + str r4, [sp] + str r6, [sp, #4] + ldr r1, [sp, #8] + add r0, r7, #0 + mov r2, #1 + add r3, sp, #0xc + bl ov6_02241CC0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022420D4 + + thumb_func_start ov6_02242110 +ov6_02242110: ; 0x02242110 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + mov r4, #0 + bl sub_0205DE6C + cmp r0, #0 + beq _0224213E + add r0, r6, #0 + bl sub_0205DB58 + cmp r0, #0 + beq _02242136 + add r0, r5, #0 + bl ov6_02242158 + add r4, r0, #0 + b _0224213E +_02242136: + add r0, r5, #0 + bl ov6_0224214C + add r4, r0, #0 +_0224213E: + cmp r4, #0 + beq _02242146 + mov r0, #1 + pop {r4, r5, r6, pc} +_02242146: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02242110 + + thumb_func_start ov6_0224214C +ov6_0224214C: ; 0x0224214C + push {r3, lr} + bl sub_0203A640 + ldr r0, [r0, #0] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_0224214C + + thumb_func_start ov6_02242158 +ov6_02242158: ; 0x02242158 + push {r3, lr} + bl sub_0203A640 + add r0, #0xcc + ldr r0, [r0, #0] + pop {r3, pc} + thumb_func_end ov6_02242158 + + thumb_func_start ov6_02242164 +ov6_02242164: ; 0x02242164 + push {r4, lr} + add r4, r1, #0 + bl sub_0203A640 + cmp r4, #0 + beq _0224217A + cmp r4, #1 + beq _02242182 + cmp r4, #2 + beq _0224218A + b _02242192 +_0224217A: + mov r1, #0x49 + lsl r1, r1, #2 + ldr r0, [r0, r1] + pop {r4, pc} +_02242182: + mov r1, #0x15 + lsl r1, r1, #4 + ldr r0, [r0, r1] + pop {r4, pc} +_0224218A: + mov r1, #0x5f + lsl r1, r1, #2 + ldr r0, [r0, r1] + pop {r4, pc} +_02242192: + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02242164 + + thumb_func_start ov6_0224219C +ov6_0224219C: ; 0x0224219C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + mov r0, #0 + str r1, [sp] + add r7, r2, #0 + str r3, [sp, #4] + add r4, r0, #0 + add r1, sp, #0x10 +_022421AE: + strb r4, [r1, r0] + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #0xc + blo _022421AE + ldr r0, [sp] + add r5, r4, #0 + cmp r0, #0 + bls _02242204 +_022421C2: + lsl r0, r5, #3 + str r0, [sp, #0xc] + ldr r0, [r6, r0] + mov r1, #6 + bl sub_020759F0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + mov r1, #7 + ldr r0, [r6, r0] + bl sub_020759F0 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + ldr r0, [sp, #8] + cmp r0, r7 + beq _022421EC + cmp r1, r7 + bne _022421F8 +_022421EC: + add r1, r4, #1 + lsl r1, r1, #0x18 + add r0, r4, #0 + lsr r4, r1, #0x18 + add r1, sp, #0x10 + strb r5, [r1, r0] +_022421F8: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldr r0, [sp] + cmp r5, r0 + blo _022421C2 +_02242204: + cmp r4, #0 + beq _0224220E + ldr r0, [sp] + cmp r4, r0 + bne _02242214 +_0224220E: + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02242214: + bl sub_0201D2E8 + add r1, r4, #0 + bl sub_020E1F6C + add r0, sp, #0x10 + ldrb r1, [r0, r1] + ldr r0, [sp, #4] + strb r1, [r0] + mov r0, #1 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_0224219C + + thumb_func_start ov6_0224222C +ov6_0224222C: ; 0x0224222C + push {r4, r5, r6, lr} + ldrb r0, [r1, #0xd] + add r5, r2, #0 + add r6, r3, #0 + cmp r0, #0 + bne _02242266 + add r0, sp, #0 + ldrb r1, [r1, #0xe] + ldrb r0, [r0, #0x14] + cmp r1, r0 + bne _02242266 + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r4, r0, #0x10 + cmp r4, #2 + blo _02242252 + bl sub_02022974 +_02242252: + cmp r4, #0 + bne _02242266 + add r2, sp, #0 + ldrb r2, [r2, #0x10] + ldr r3, [sp, #0x18] + add r0, r5, #0 + add r1, r6, #0 + bl ov6_0224219C + pop {r4, r5, r6, pc} +_02242266: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_0224222C + + thumb_func_start ov6_0224226C +ov6_0224226C: ; 0x0224226C + push {r3, r4} + ldrb r4, [r2, #0xd] + cmp r4, #0 + bne _022422C8 + cmp r0, #0 + ldrb r0, [r2, #0xe] + beq _0224227E + cmp r0, #0x3c + b _022422C2 +_0224227E: + cmp r0, #0x47 + beq _0224228A + cmp r0, #0x63 + beq _0224228A + cmp r0, #0x23 + bne _0224228E +_0224228A: + lsl r1, r1, #1 + b _022422C2 +_0224228E: + cmp r0, #8 + bne _0224229E + cmp r3, #0xa + bne _022422C2 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + b _022422C2 +_0224229E: + cmp r0, #0x51 + bne _022422B0 + sub r0, r3, #5 + cmp r0, #2 + bhi _022422C2 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + b _022422C2 +_022422B0: + cmp r0, #0x49 + beq _022422BC + cmp r0, #0x5f + beq _022422BC + cmp r0, #1 + bne _022422C2 +_022422BC: + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 +_022422C2: + cmp r1, #0x64 + ble _022422C8 + mov r1, #0x64 +_022422C8: + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + pop {r3, r4} + bx lr + thumb_func_end ov6_0224226C + + thumb_func_start ov6_022422D0 +ov6_022422D0: ; 0x022422D0 + push {r4, lr} + add r4, r2, #0 + ldr r2, [r0, #8] + cmp r2, #0 + beq _022422DE + mov r0, #0 + pop {r4, pc} +_022422DE: + ldrb r2, [r0, #0xd] + cmp r2, #0 + bne _02242322 + ldrb r0, [r0, #0xe] + cmp r0, #0x33 + beq _022422EE + cmp r0, #0x16 + bne _02242322 +_022422EE: + add r0, r1, #0 + mov r1, #0xa1 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #5 + bhi _02242304 + mov r0, #0 + pop {r4, pc} +_02242304: + sub r0, r0, #5 + cmp r4, r0 + bgt _02242322 + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r4, r0, #0x10 + cmp r4, #2 + blo _0224231A + bl sub_02022974 +_0224231A: + cmp r4, #0 + bne _02242322 + mov r0, #1 + pop {r4, pc} +_02242322: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022422D0 + + thumb_func_start ov6_02242328 +ov6_02242328: ; 0x02242328 + push {r4, lr} + add r4, r2, #0 + cmp r1, #0 + bne _0224233C + mov r0, #0xb + mov r1, #0 + bl sub_02051D8C + str r0, [r4, #0] + pop {r4, pc} +_0224233C: + ldr r0, [r0, #0xc] + bl sub_0203A790 + bl sub_0203A784 + add r1, r0, #0 + ldrh r1, [r1] + mov r0, #0xb + bl sub_02051F24 + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov6_02242328 + + thumb_func_start ov6_02242354 +ov6_02242354: ; 0x02242354 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r6, r2, #0 + add r4, r3, #0 + cmp r1, #0 + beq _02242382 + ldr r0, [r5, #0xc] + bl sub_0202D834 + mov r1, #1 + bl sub_0202D814 + add r1, r4, #0 + add r1, #0x38 + str r1, [sp] + ldr r2, [r5, #0x1c] + add r4, #0x30 + ldr r2, [r2, #0] + add r1, r6, #0 + add r3, r4, #0 + bl ov6_02242F74 +_02242382: + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02242354 + + thumb_func_start ov6_02242388 +ov6_02242388: ; 0x02242388 + ldr r2, [r1, #4] + cmp r2, #0 + beq _02242398 + ldrb r1, [r1, #0xc] + cmp r1, r0 + bls _02242398 + mov r0, #1 + bx lr +_02242398: + mov r0, #0 + bx lr + thumb_func_end ov6_02242388 + + thumb_func_start ov6_0224239C +ov6_0224239C: ; 0x0224239C + push {r0, r1, r2, r3} + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + mov r0, #4 + add r6, r2, #0 + bl sub_02073C74 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #4 + bl sub_0202D93C + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #6 + bl sub_0202D93C + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + add r0, r5, #0 + mov r1, #2 + bl sub_0202D93C + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #3 + bl sub_0202D93C + str r0, [sp, #0xc] + add r0, r5, #0 + mov r1, #7 + bl sub_0202D93C + str r0, [sp, #0x14] + add r0, r5, #0 + mov r1, #5 + bl sub_0202D93C + add r1, sp, #0x10 + strh r0, [r1] + ldr r1, [sp, #4] + ldr r0, [sp, #0xc] + lsl r1, r1, #0x10 + str r0, [sp] + ldr r3, [sp, #8] + add r0, r4, #0 + lsr r1, r1, #0x10 + add r2, r7, #0 + bl sub_02074158 + add r0, r4, #0 + mov r1, #7 + add r2, sp, #0x30 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0xa0 + add r2, sp, #0x14 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0xa3 + add r2, sp, #0x10 + bl sub_02074B30 + ldr r0, [r6, #8] + add r1, r4, #0 + bl sub_0207A048 + cmp r0, #0 + bne _02242430 + bl sub_02022974 +_02242430: + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7} + pop {r3} + add sp, #0x10 + bx r3 + thumb_func_end ov6_0224239C + + thumb_func_start ov6_02242440 +ov6_02242440: ; 0x02242440 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp] + ldr r0, [r0, #0xc] + str r1, [sp, #4] + mov r5, #0 + bl sub_0202D834 + add r6, r0, #0 + add r4, r5, #0 +_02242454: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202D8C4 + bl sub_0206C3C8 + add r7, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202D8F8 + cmp r0, #0 + beq _0224248C + ldr r0, [sp] + ldr r0, [r0, #0x1c] + ldr r0, [r0, #0] + cmp r7, r0 + bne _0224248C + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202D924 + lsl r2, r5, #2 + add r1, sp, #8 + str r0, [r1, r2] + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 +_0224248C: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #6 + blo _02242454 + cmp r5, #0 + bne _022424A0 + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022424A0: + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r4, r0, #0x10 + cmp r4, #2 + blo _022424B0 + bl sub_02022974 +_022424B0: + cmp r4, #0 + bne _022424BA + add sp, #0x20 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022424BA: + cmp r5, #1 + bls _02242502 + cmp r5, #0 + bne _022424C6 + bl sub_02022974 +_022424C6: + cmp r5, #1 + bhi _022424CE + mov r4, #0 + b _022424F6 +_022424CE: + bl sub_0201D2E8 + add r4, r0, #0 + ldr r0, _02242510 ; =0x0000FFFF + add r1, r5, #0 + bl sub_020E1F6C + add r1, r0, #0 + add r1, r1, #1 + lsl r1, r1, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, r5 + blo _022424F6 + bl sub_02022974 +_022424F6: + lsl r1, r4, #2 + add r0, sp, #8 + ldr r1, [r0, r1] + ldr r0, [sp, #4] + str r1, [r0, #0] + b _02242508 +_02242502: + ldr r1, [sp, #8] + ldr r0, [sp, #4] + str r1, [r0, #0] +_02242508: + mov r0, #1 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02242510: .word 0x0000FFFF + thumb_func_end ov6_02242440 + + thumb_func_start ov6_02242514 +ov6_02242514: ; 0x02242514 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + str r0, [sp] + ldrb r0, [r5, #0xd] + add r7, r2, #0 + str r3, [sp, #4] + cmp r0, #0 + bne _02242530 + ldrb r0, [r5, #0xe] + cmp r0, #0xe + bne _02242530 + mov r2, #1 + b _02242532 +_02242530: + mov r2, #0 +_02242532: + ldr r1, [sp, #4] + add r0, r7, #0 + ldr r1, [r1, #0] + bl sub_02077F0C + mov r6, #0 + add r0, r7, #0 + mov r1, #5 + add r2, r6, #0 + bl sub_02074470 + ldr r1, _022425C8 ; =0x000001A6 + cmp r0, r1 + bne _02242562 + ldrb r0, [r5, #0xf] + mov r6, #1 + cmp r0, #0 + add r0, sp, #8 + bne _0224255E + mov r1, #0 + strb r1, [r0] + b _022425A6 +_0224255E: + strb r6, [r0] + b _022425A6 +_02242562: + add r1, r1, #1 + cmp r0, r1 + bne _0224257C + ldrb r0, [r5, #0x10] + mov r6, #1 + cmp r0, #0 + add r0, sp, #8 + bne _02242578 + mov r1, #0 + strb r1, [r0] + b _022425A6 +_02242578: + strb r6, [r0] + b _022425A6 +_0224257C: + cmp r0, #0xc9 + bne _022425A6 + ldrb r0, [r5, #0x11] + mov r6, #1 + lsl r1, r0, #3 + ldr r0, _022425CC ; =0x02248FF0 + ldr r0, [r0, r1] + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + bl sub_0201D2E8 + add r1, r4, #0 + bl sub_020E1F6C + ldrb r0, [r5, #0x11] + lsl r2, r0, #3 + ldr r0, _022425D0 ; =0x02248FF4 + ldr r0, [r0, r2] + ldrb r1, [r0, r1] + add r0, sp, #8 + strb r1, [r0] +_022425A6: + cmp r6, #0 + beq _022425B4 + add r0, r7, #0 + mov r1, #0x70 + add r2, sp, #8 + bl sub_02074B30 +_022425B4: + ldr r0, [sp] + lsl r1, r0, #2 + ldr r0, [sp, #4] + add r0, r0, r1 + ldr r0, [r0, #4] + add r1, r7, #0 + bl sub_0207A048 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022425C8: .word 0x000001A6 +_022425CC: .word 0x02248FF0 +_022425D0: .word 0x02248FF4 + thumb_func_end ov6_02242514 + + thumb_func_start ov6_022425D4 +ov6_022425D4: ; 0x022425D4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrb r0, [r1, #0xd] + add r4, r2, #0 + cmp r0, #0 + bne _02242630 + ldrb r0, [r1, #0xe] + cmp r0, #0x48 + beq _022425EE + cmp r0, #0x37 + beq _022425EE + cmp r0, #0x2e + bne _02242630 +_022425EE: + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r6, r0, #0x10 + cmp r6, #2 + blo _022425FE + bl sub_02022974 +_022425FE: + cmp r6, #0 + bne _02242606 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242606: + mov r1, #0 +_02242608: + lsl r2, r1, #3 + lsl r7, r4, #3 + add r6, r5, r2 + ldr r3, [r5, r2] + ldr r2, [r5, r7] + add r0, r5, r7 + cmp r3, r2 + bne _02242622 + ldrh r2, [r6, #4] + ldrh r0, [r0, #4] + cmp r2, r0 + bls _02242622 + add r4, r1, #0 +_02242622: + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, #0xc + blo _02242608 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_02242630: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022425D4 + + thumb_func_start ov6_02242634 +ov6_02242634: ; 0x02242634 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r6, r0, #0 + add r5, r2, #0 + add r0, r7, #0 + mov r1, #0x4c + mov r2, #0 + add r4, r3, #0 + bl sub_02074470 + cmp r0, #0 + bne _0224265A + mov r2, #0 + add r0, r7, #0 + mov r1, #0xa + strb r2, [r4, #0xd] + bl sub_02074470 + b _02242660 +_0224265A: + mov r0, #1 + strb r0, [r4, #0xd] + mov r0, #0x7b +_02242660: + strb r0, [r4, #0xe] + mov r0, #0 + strb r0, [r4, #0xc] + str r0, [r4, #4] + str r0, [r4, #8] + cmp r5, #0 + beq _0224269C + add r1, r5, #0 + add r1, #0x8c + ldr r1, [r1, #0] + strb r1, [r4, #0xf] + add r1, r5, #0 + add r1, #0x90 + ldr r1, [r1, #0] + strb r1, [r4, #0x10] + add r1, r5, #0 + add r1, #0xa0 + ldr r1, [r1, #0] + cmp r1, #0 + beq _0224269A + cmp r1, #8 + ble _02242690 + bl sub_02022974 +_02242690: + add r5, #0xa0 + ldr r0, [r5, #0] + sub r0, r0, #1 + strb r0, [r4, #0x11] + b _0224269C +_0224269A: + strb r0, [r4, #0x11] +_0224269C: + ldr r0, [r6, #0xc] + bl sub_02025E38 + bl sub_02025F20 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02242634 + + .rodata + + + .global Unk_ov6_02248FC0 +Unk_ov6_02248FC0: ; 0x02248FC0 + .incbin "incbin/overlay6_rodata.bin", 0x1AC, 0x1B0 - 0x1AC + + .global Unk_ov6_02248FC4 +Unk_ov6_02248FC4: ; 0x02248FC4 + .incbin "incbin/overlay6_rodata.bin", 0x1B0, 0x1B4 - 0x1B0 + + .global Unk_ov6_02248FC8 +Unk_ov6_02248FC8: ; 0x02248FC8 + .incbin "incbin/overlay6_rodata.bin", 0x1B4, 0x1B8 - 0x1B4 + + .global Unk_ov6_02248FCC +Unk_ov6_02248FCC: ; 0x02248FCC + .incbin "incbin/overlay6_rodata.bin", 0x1B8, 0x1BC - 0x1B8 + + .global Unk_ov6_02248FD0 +Unk_ov6_02248FD0: ; 0x02248FD0 + .incbin "incbin/overlay6_rodata.bin", 0x1BC, 0x1C0 - 0x1BC + + .global Unk_ov6_02248FD4 +Unk_ov6_02248FD4: ; 0x02248FD4 + .incbin "incbin/overlay6_rodata.bin", 0x1C0, 0x1C4 - 0x1C0 + + .global Unk_ov6_02248FD8 +Unk_ov6_02248FD8: ; 0x02248FD8 + .incbin "incbin/overlay6_rodata.bin", 0x1C4, 0x1C8 - 0x1C4 + + .global Unk_ov6_02248FDC +Unk_ov6_02248FDC: ; 0x02248FDC + .incbin "incbin/overlay6_rodata.bin", 0x1C8, 0x1DC - 0x1C8 + + .global Unk_ov6_02248FF0 +Unk_ov6_02248FF0: ; 0x02248FF0 + .incbin "incbin/overlay6_rodata.bin", 0x1DC, 0x40 + diff --git a/asm/ov6_022426AC.s b/asm/ov6_022426AC.s new file mode 100644 index 000000000..1e5557f1a --- /dev/null +++ b/asm/ov6_022426AC.s @@ -0,0 +1,386 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_022426AC +ov6_022426AC: ; 0x022426AC + ldr r3, _022426B4 ; =sub_02018184 + mov r1, #0x17 + lsl r1, r1, #4 + bx r3 + ; .align 2, 0 +_022426B4: .word sub_02018184 + thumb_func_end ov6_022426AC + + thumb_func_start ov6_022426B8 +ov6_022426B8: ; 0x022426B8 + ldr r3, _022426BC ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_022426BC: .word sub_020181C4 + thumb_func_end ov6_022426B8 + + thumb_func_start ov6_022426C0 +ov6_022426C0: ; 0x022426C0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + mov r0, #0x5a + add r4, r1, #0 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r7, r0] + add r0, r4, #0 + mov r1, #0x12 + bl sub_020759F0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + beq _022426E8 + cmp r0, #0xfe + beq _022426EC + cmp r0, #0xff + beq _022426F0 + b _022426F4 +_022426E8: + mov r2, #0 + b _0224270C +_022426EC: + mov r2, #1 + b _0224270C +_022426F0: + mov r2, #2 + b _0224270C +_022426F4: + bl sub_0201D2E8 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r0, r2, r1 + beq _0224270A + mov r2, #0 + b _0224270C +_0224270A: + mov r2, #1 +_0224270C: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + add r0, r7, #0 + lsl r1, r4, #0x10 + lsl r2, r2, #0x18 + add r0, #0x28 + lsr r1, r1, #0x10 + lsr r2, r2, #0x18 + mov r3, #2 + bl sub_02075FB4 + add r1, r7, #0 + mov r0, #1 + add r1, #0x3c + mov r2, #4 + bl sub_020095C4 + str r0, [r7, #0x38] + mov r0, #0x61 + mov r1, #4 + bl sub_02006C24 + ldr r4, _022427F0 ; =0x02249030 + str r0, [sp, #0x10] + mov r6, #0 + add r5, r7, #0 +_02242744: + ldrb r0, [r4] + add r1, r6, #0 + mov r2, #4 + bl sub_02009714 + add r6, r6, #1 + add r4, r4, #1 + stmia r5!, {r0} + cmp r6, #4 + blt _02242744 + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [r7, #0] + ldr r1, [sp, #0x10] + mov r2, #5 + bl sub_02009A4C + str r0, [r7, #0x10] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + ldr r0, [r7, #4] + ldr r1, [sp, #0x10] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + str r0, [r7, #0x14] + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [r7, #8] + ldr r1, [sp, #0x10] + mov r2, #6 + mov r3, #0 + bl sub_02009BC4 + str r0, [r7, #0x18] + mov r0, #3 + str r0, [sp] + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [r7, #0xc] + ldr r1, [sp, #0x10] + mov r2, #0xc + mov r3, #0 + bl sub_02009BC4 + str r0, [r7, #0x1c] + ldrh r0, [r7, #0x28] + ldrh r1, [r7, #0x2a] + mov r2, #4 + bl sub_0201363C + str r0, [r7, #0x20] + ldrh r0, [r7, #0x28] + ldrh r1, [r7, #0x2c] + mov r2, #4 + bl sub_02013660 + str r0, [r7, #0x24] + ldr r0, [r7, #0] + ldr r1, [r7, #4] + ldr r2, [r7, #0x20] + ldr r3, [r7, #0x24] + bl ov6_02242880 + ldr r0, [sp, #0x10] + bl sub_02006CA8 + add r0, r7, #0 + bl ov6_022428F8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_022427F0: .word 0x02249030 + thumb_func_end ov6_022426C0 + + thumb_func_start ov6_022427F4 +ov6_022427F4: ; 0x022427F4 + add r1, r0, #0 + mov r0, #0x5a + mov r2, #1 + lsl r0, r0, #2 + str r2, [r1, r0] + ldr r3, _0224280C ; =sub_0200D9E8 + mov r2, #0 + add r0, r0, #4 + str r2, [r1, r0] + ldr r0, _02242810 ; =ov6_02242860 + bx r3 + nop +_0224280C: .word sub_0200D9E8 +_02242810: .word ov6_02242860 + thumb_func_end ov6_022427F4 + + thumb_func_start ov6_02242814 +ov6_02242814: ; 0x02242814 + mov r1, #0x5a + mov r2, #0 + lsl r1, r1, #2 + str r2, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02242814 + + thumb_func_start ov6_02242820 +ov6_02242820: ; 0x02242820 + mov r1, #0x5b + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov6_02242820 + + thumb_func_start ov6_02242828 +ov6_02242828: ; 0x02242828 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x10] + bl sub_0200A4E4 + ldr r0, [r5, #0x14] + bl sub_0200A6DC + mov r4, #0 +_0224283A: + lsl r0, r4, #2 + ldr r0, [r5, r0] + bl sub_02009754 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _0224283A + ldr r0, [r5, #0x38] + bl sub_02021964 + ldr r0, [r5, #0x20] + bl sub_020181C4 + ldr r0, [r5, #0x24] + bl sub_020181C4 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02242828 + + thumb_func_start ov6_02242860 +ov6_02242860: ; 0x02242860 + push {r3, lr} + mov r2, #0x5a + lsl r2, r2, #2 + ldr r3, [r1, r2] + cmp r3, #0 + beq _02242874 + ldr r0, [r1, #0x38] + bl sub_020219F8 + pop {r3, pc} +_02242874: + mov r3, #1 + add r2, r2, #4 + str r3, [r1, r2] + bl sub_0200DA58 + pop {r3, pc} + thumb_func_end ov6_02242860 + + thumb_func_start ov6_02242880 +ov6_02242880: ; 0x02242880 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + mov r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_02009DC8 + add r5, r0, #0 + add r0, r7, #0 + mov r1, #1 + bl sub_02009DC8 + add r7, r0, #0 + add r0, r5, #0 + bl sub_0200A3DC + add r0, r7, #0 + bl sub_0200A640 + add r0, r5, #0 + bl sub_0200A534 + add r5, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + bl sub_0200A72C + add r7, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl sub_020A81B0 + str r0, [sp] + add r0, r7, #0 + mov r1, #1 + bl sub_020A81FC + mov r1, #0x32 + add r5, r0, #0 + add r0, r4, #0 + lsl r1, r1, #6 + bl sub_020C2C54 + mov r2, #0x32 + ldr r1, [sp] + add r0, r4, #0 + lsl r2, r2, #6 + bl sub_020C02BC + add r0, r6, #0 + mov r1, #0x20 + bl sub_020C2C54 + add r0, r6, #0 + add r1, r5, #0 + mov r2, #0x20 + bl sub_020C0160 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02242880 + + thumb_func_start ov6_022428F8 +ov6_022428F8: ; 0x022428F8 + push {r4, lr} + sub sp, #0x80 + add r4, r0, #0 + mov r0, #3 + str r0, [sp] + sub r0, r0, #4 + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + str r1, [sp, #0x10] + ldr r0, [r4, #0] + mov r2, #1 + str r0, [sp, #0x14] + ldr r0, [r4, #4] + mov r3, #2 + str r0, [sp, #0x18] + ldr r0, [r4, #8] + str r0, [sp, #0x1c] + ldr r0, [r4, #0xc] + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r0, sp, #0x5c + bl sub_020093B4 + ldr r0, [r4, #0x38] + mov r1, #0 + str r0, [sp, #0x2c] + add r0, sp, #0x5c + str r0, [sp, #0x30] + mov r0, #1 + lsl r0, r0, #0xc + str r1, [sp, #0x34] + str r1, [sp, #0x38] + str r1, [sp, #0x3c] + str r0, [sp, #0x40] + str r0, [sp, #0x44] + str r0, [sp, #0x48] + add r0, sp, #0x2c + strh r1, [r0, #0x20] + mov r0, #1 + str r0, [sp, #0x54] + mov r0, #4 + str r0, [sp, #0x58] + lsl r0, r0, #0x11 + str r0, [sp, #0x34] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x38] + add r0, sp, #0x2c + str r1, [sp, #0x50] + bl sub_02021AA0 + mov r1, #0x59 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x59 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021D6C + add sp, #0x80 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022428F8 + + .rodata + + + .global Unk_ov6_02249030 +Unk_ov6_02249030: ; 0x02249030 + .incbin "incbin/overlay6_rodata.bin", 0x21C, 0x4 + diff --git a/asm/ov6_02242984.s b/asm/ov6_02242984.s new file mode 100644 index 000000000..768e7a21d --- /dev/null +++ b/asm/ov6_02242984.s @@ -0,0 +1,192 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02242984 +ov6_02242984: ; 0x02242984 + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r5, r0, #0 + bl sub_0203A640 + add r4, r0, #0 + mov r0, #0 + add r1, sp, #4 +_02242994: + lsl r2, r0, #3 + add r2, r4, r2 + ldr r3, [r2, #8] + lsl r2, r0, #2 + add r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r3, [r1, r2] + cmp r0, #0xc + blo _02242994 + add r0, r5, #0 + bl sub_0203D174 + bl sub_02027560 + bl sub_02027474 + add r6, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0202D834 + mov r1, #1 + bl sub_0202D814 + add r1, sp, #0x20 + str r1, [sp] + ldr r2, [r5, #0x1c] + add r1, r6, #0 + ldr r2, [r2, #0] + add r3, sp, #0x1c + bl ov6_02242F74 + add r0, r4, #0 + add r1, sp, #0xc + add r2, sp, #0x10 + bl ov6_02240C9C + add r0, r4, #0 + add r1, r6, #0 + add r2, sp, #0x24 + add r3, sp, #0x28 + bl ov6_022477B8 + bl sub_0201D2E8 + ldr r1, _02242A0C ; =0x00001556 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0xc + blo _02242A00 + bl sub_02022974 +_02242A00: + lsl r1, r4, #2 + add r0, sp, #4 + ldr r0, [r0, r1] + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + nop +_02242A0C: .word 0x00001556 + thumb_func_end ov6_02242984 + + thumb_func_start ov6_02242A10 +ov6_02242A10: ; 0x02242A10 + push {r3, r4, r5, r6, r7, lr} + str r1, [sp] + mov r1, #0x34 + bl sub_02018184 + add r5, r0, #0 + ldr r0, [sp] + mov r1, #0xb + str r0, [r5, #0x2c] + mov r0, #0x6a + mov r2, #4 + bl sub_02006ADC + add r7, r0, #0 + mov r4, #0 +_02242A2E: + bl sub_0201D2E8 + ldr r1, _02242A88 ; =0x0000071D + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + cmp r6, #0x24 + blo _02242A44 + bl sub_02022974 +_02242A44: + lsl r0, r6, #0x18 + lsr r2, r0, #0x16 + add r1, r7, r2 + ldrh r2, [r7, r2] + lsl r3, r4, #2 + add r0, r5, r3 + strh r2, [r5, r3] + ldrh r1, [r1, #2] + strh r1, [r0, #2] + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #5 + blo _02242A2E + ldr r0, [sp] + ldr r0, [r0, #0x3c] + bl sub_0205EABC + strh r0, [r5, #0x14] + ldr r0, [sp] + ldr r0, [r0, #0x3c] + bl sub_0205EAC8 + strh r0, [r5, #0x16] + ldr r0, [sp] + ldr r0, [r0, #0x1c] + ldr r0, [r0, #0] + str r0, [r5, #0x30] + add r0, r7, #0 + bl sub_020181C4 + add r0, r5, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02242A88: .word 0x0000071D + thumb_func_end ov6_02242A10 + + thumb_func_start ov6_02242A8C +ov6_02242A8C: ; 0x02242A8C + ldr r3, _02242A90 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_02242A90: .word sub_020181C4 + thumb_func_end ov6_02242A8C + + thumb_func_start ov6_02242A94 +ov6_02242A94: ; 0x02242A94 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + bne _02242AB6 + lsl r2, r5, #2 + ldrh r1, [r4, r2] + add r2, r4, r2 + ldrh r2, [r2, #2] + lsl r1, r1, #0xb + mov r0, #0xf0 + lsl r2, r2, #0xb + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl sub_02039F10 + b _02242AD2 +_02242AB6: + cmp r5, #5 + bne _02242ABE + ldr r0, [r4, #0x30] + b _02242AD2 +_02242ABE: + lsl r2, r5, #2 + ldrh r1, [r4, r2] + add r2, r4, r2 + ldr r0, [r4, #0x2c] + ldrh r2, [r2, #2] + ldr r0, [r0, #0x2c] + lsr r1, r1, #5 + lsr r2, r2, #5 + bl sub_02039E30 +_02242AD2: + lsl r3, r5, #2 + add r1, r4, r3 + ldrh r2, [r1, #2] + ldrh r1, [r4, r3] + str r0, [r4, #0x18] + mov r0, #0 + mvn r0, r0 + str r0, [r4, #0x1c] + str r1, [r4, #0x20] + str r2, [r4, #0x24] + mov r0, #0 + str r0, [r4, #0x28] + pop {r3, r4, r5, pc} + thumb_func_end ov6_02242A94 + + thumb_func_start ov6_02242AEC +ov6_02242AEC: ; 0x02242AEC + add r0, #0x18 + bx lr + thumb_func_end ov6_02242AEC \ No newline at end of file diff --git a/asm/ov6_02242AF0.s b/asm/ov6_02242AF0.s new file mode 100644 index 000000000..7a7f5d2bf --- /dev/null +++ b/asm/ov6_02242AF0.s @@ -0,0 +1,617 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02242AF0 +ov6_02242AF0: ; 0x02242AF0 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + bl sub_0203D174 + bl sub_02027860 + mov r1, #6 + bl sub_02027F6C + mov r1, #0x42 + lsl r1, r1, #0x10 + str r1, [sp, #8] + mov r1, #1 + lsl r1, r1, #0x10 + str r1, [sp, #0xc] + ldrh r0, [r0] + cmp r0, #0 + beq _02242B20 + cmp r0, #1 + beq _02242B28 + cmp r0, #2 + beq _02242B30 + b _02242B36 +_02242B20: + mov r0, #0xa + lsl r0, r0, #0x12 + str r0, [sp, #0x10] + b _02242B36 +_02242B28: + mov r0, #0x52 + lsl r0, r0, #0x10 + str r0, [sp, #0x10] + b _02242B36 +_02242B30: + mov r0, #0x1b + lsl r0, r0, #0x12 + str r0, [sp, #0x10] +_02242B36: + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0x50] + ldr r2, _02242B54 ; =0x000001DB + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r4, #0x30] + add r3, sp, #8 + bl ov5_021E19CC + add sp, #0x14 + pop {r3, r4, pc} + nop +_02242B54: .word 0x000001DB + thumb_func_end ov6_02242AF0 + + thumb_func_start ov6_02242B58 +ov6_02242B58: ; 0x02242B58 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + str r2, [sp] + bl sub_0203D174 + bl sub_02027860 + mov r1, #6 + bl sub_02027F6C + add r4, r0, #0 + mov r0, #4 + mov r1, #0x14 + bl sub_02018184 + add r5, r0, #0 + add r2, r5, #0 + mov r1, #0x14 + mov r0, #0 +_02242B80: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _02242B80 + mov r0, #0 + strb r0, [r5, #5] + ldrh r1, [r4] + cmp r1, #0 + beq _02242B9C + cmp r1, #1 + beq _02242BC2 + cmp r1, #2 + beq _02242BEA + b _02242C0E +_02242B9C: + mov r1, #1 + strb r1, [r5, #4] + cmp r6, #1 + bne _02242BB2 + mov r0, #0x52 + lsl r0, r0, #0x10 + str r0, [r5, #0xc] + strh r1, [r4] + mov r0, #0x4a + str r0, [r5, #0x10] + b _02242C12 +_02242BB2: + mov r0, #0x1b + lsl r0, r0, #0x12 + str r0, [r5, #0xc] + mov r0, #2 + strh r0, [r4] + mov r0, #0x64 + str r0, [r5, #0x10] + b _02242C12 +_02242BC2: + cmp r6, #0 + bne _02242BD6 + mov r1, #0xa + strb r0, [r5, #4] + lsl r1, r1, #0x12 + str r1, [r5, #0xc] + strh r0, [r4] + mov r0, #0x2e + str r0, [r5, #0x10] + b _02242C12 +_02242BD6: + mov r0, #1 + strb r0, [r5, #4] + mov r0, #0x1b + lsl r0, r0, #0x12 + str r0, [r5, #0xc] + mov r0, #2 + strh r0, [r4] + mov r0, #0x64 + str r0, [r5, #0x10] + b _02242C12 +_02242BEA: + strb r0, [r5, #4] + cmp r6, #0 + bne _02242BFE + mov r1, #0xa + lsl r1, r1, #0x12 + str r1, [r5, #0xc] + strh r0, [r4] + mov r0, #0x2e + str r0, [r5, #0x10] + b _02242C12 +_02242BFE: + mov r0, #0x52 + lsl r0, r0, #0x10 + str r0, [r5, #0xc] + mov r0, #1 + strh r0, [r4] + mov r0, #0x58 + str r0, [r5, #0x10] + b _02242C12 +_02242C0E: + bl sub_02022974 +_02242C12: + ldr r0, [sp] + str r0, [r5, #8] + ldr r0, [sp] + cmp r0, #3 + bne _02242C20 + ldr r0, _02242C30 ; =ov6_02242D94 + b _02242C22 +_02242C20: + ldr r0, _02242C34 ; =ov6_02242E60 +_02242C22: + str r0, [r5, #0] + ldr r0, [r7, #0x10] + ldr r1, _02242C38 ; =ov6_02242C5C + add r2, r5, #0 + bl sub_02050944 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242C30: .word ov6_02242D94 +_02242C34: .word ov6_02242E60 +_02242C38: .word ov6_02242C5C + thumb_func_end ov6_02242B58 + + thumb_func_start ov6_02242C3C +ov6_02242C3C: ; 0x02242C3C + push {r4, lr} + add r4, r1, #0 + bl sub_0203D174 + bl sub_02027860 + mov r1, #6 + bl sub_02027F6C + ldrh r0, [r0] + cmp r0, r4 + bne _02242C58 + mov r0, #5 + pop {r4, pc} +_02242C58: + mov r0, #6 + pop {r4, pc} + thumb_func_end ov6_02242C3C + + thumb_func_start ov6_02242C5C +ov6_02242C5C: ; 0x02242C5C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldrb r1, [r4, #5] + cmp r1, #5 + bls _02242C78 + b _02242D84 +_02242C78: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242C84: ; jump table + .short _02242C90 - _02242C84 - 2 ; case 0 + .short _02242D0C - _02242C84 - 2 ; case 1 + .short _02242D1E - _02242C84 - 2 ; case 2 + .short _02242D30 - _02242C84 - 2 ; case 3 + .short _02242D68 - _02242C84 - 2 ; case 4 + .short _02242D7A - _02242C84 - 2 ; case 5 +_02242C90: + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, _02242D8C ; =0x000001DB + bl ov5_021E18CC + bl ov5_021E18BC + add r7, r0, #0 + ldr r0, _02242D8C ; =0x000001DB + ldr r1, [r5, #0x30] + bl ov5_021EF9E8 + ldr r0, [r0, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _02242CD4 + add r2, r0, #0 + add r2, #8 + beq _02242CC8 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _02242CC8 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _02242CCA +_02242CC8: + mov r1, #0 +_02242CCA: + cmp r1, #0 + beq _02242CD4 + ldr r1, [r1, #0] + add r6, r0, r1 + b _02242CD6 +_02242CD4: + mov r6, #0 +_02242CD6: + ldr r0, [r5, #0x30] + bl ov5_021EFAA0 + str r7, [sp] + str r6, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r3, #0xff + str r3, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r5, #0x50] + ldr r1, [r5, #0x54] + mov r2, #0x10 + add r3, #0xdc + bl ov5_021D41C8 + ldr r0, [r5, #0x54] + mov r1, #0x10 + mov r2, #0 + bl ov5_021D4250 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + b _02242D84 +_02242D0C: + ldr r0, [r4, #8] + cmp r0, #4 + bne _02242D18 + ldr r0, _02242D90 ; =0x000006DB + bl sub_02005748 +_02242D18: + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02242D1E: + ldr r0, _02242D90 ; =0x000006DB + bl sub_020057D4 + cmp r0, #0 + bne _02242D84 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + b _02242D84 +_02242D30: + add r0, r5, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, _02242D8C ; =0x000001DB + bl ov5_021E18CC + add r6, r0, #0 + add r0, sp, #0x18 + add r1, r6, #0 + bl ov5_021E1894 + add r0, r5, #0 + add r2, r4, #0 + ldr r5, [r4, #0] + add r1, r4, #0 + add r2, #0xc + add r3, sp, #0x18 + blx r5 + cmp r0, #0 + beq _02242D5E + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] +_02242D5E: + add r0, r6, #0 + add r1, sp, #0x18 + bl ov5_021E18A4 + b _02242D84 +_02242D68: + ldr r0, [r5, #0x50] + ldr r1, [r5, #0x54] + mov r2, #0x10 + bl ov5_021D42B0 + ldrb r0, [r4, #5] + add r0, r0, #1 + strb r0, [r4, #5] + b _02242D84 +_02242D7A: + bl sub_020181C4 + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02242D84: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02242D8C: .word 0x000001DB +_02242D90: .word 0x000006DB + thumb_func_end ov6_02242C5C + + thumb_func_start ov6_02242D94 +ov6_02242D94: ; 0x02242D94 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldrb r0, [r5, #4] + add r4, r3, #0 + add r6, r2, #0 + cmp r0, #0 + ldr r0, [r4, #8] + bne _02242DF4 + ldrb r1, [r5, #6] + lsl r2, r1, #2 + ldr r1, _02242E54 ; =0x02249074 + ldr r1, [r1, r2] + sub r0, r0, r1 + str r0, [r4, #8] + ldrb r0, [r5, #6] + cmp r0, #6 + bhs _02242E42 + mov r0, #2 + ldr r1, [r4, #8] + lsl r0, r0, #0xe + sub r1, r1, r0 + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + asr r1, r0, #0x10 + ldr r0, [r5, #0x10] + cmp r1, r0 + bgt _02242E42 + ldrb r0, [r5, #7] + add r0, r0, #1 + strb r0, [r5, #7] + ldrb r2, [r5, #6] + ldr r0, _02242E58 ; =0x02249034 + ldrb r1, [r5, #7] + ldrb r0, [r0, r2] + cmp r1, r0 + blo _02242E42 + cmp r2, #0 + bne _02242DE8 + ldr r0, _02242E5C ; =0x000006DA + bl sub_02005748 +_02242DE8: + ldrb r0, [r5, #6] + add r0, r0, #1 + strb r0, [r5, #6] + mov r0, #0 + strb r0, [r5, #7] + b _02242E42 +_02242DF4: + ldrb r1, [r5, #6] + lsl r2, r1, #2 + ldr r1, _02242E54 ; =0x02249074 + ldr r1, [r1, r2] + add r0, r0, r1 + str r0, [r4, #8] + ldrb r0, [r5, #6] + cmp r0, #6 + bhs _02242E42 + mov r0, #2 + ldr r1, [r4, #8] + lsl r0, r0, #0xe + sub r1, r1, r0 + asr r0, r1, #0xf + lsr r0, r0, #0x10 + add r0, r1, r0 + asr r1, r0, #0x10 + ldr r0, [r5, #0x10] + cmp r1, r0 + blt _02242E42 + ldrb r0, [r5, #7] + add r0, r0, #1 + strb r0, [r5, #7] + ldrb r2, [r5, #6] + ldr r0, _02242E58 ; =0x02249034 + ldrb r1, [r5, #7] + ldrb r0, [r0, r2] + cmp r1, r0 + blo _02242E42 + cmp r2, #0 + bne _02242E38 + ldr r0, _02242E5C ; =0x000006DA + bl sub_02005748 +_02242E38: + ldrb r0, [r5, #6] + add r0, r0, #1 + strb r0, [r5, #6] + mov r0, #0 + strb r0, [r5, #7] +_02242E42: + ldr r1, [r4, #8] + ldr r0, [r6, #0] + cmp r1, r0 + bne _02242E4E + mov r0, #1 + pop {r4, r5, r6, pc} +_02242E4E: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02242E54: .word 0x02249074 +_02242E58: .word 0x02249034 +_02242E5C: .word 0x000006DA + thumb_func_end ov6_02242D94 + + thumb_func_start ov6_02242E60 +ov6_02242E60: ; 0x02242E60 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x3c] + add r4, r1, #0 + add r7, r2, #0 + str r3, [sp] + bl sub_0205EB3C + add r6, r0, #0 + ldr r0, [r5, #0x3c] + add r1, sp, #4 + bl sub_0205EAEC + mov r0, #2 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xe + add r1, r1, r0 + ldr r0, [sp] + str r1, [r0, #8] + ldr r0, [r7, #0] + cmp r1, r0 + bne _02242E94 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02242E94: + ldrb r0, [r4, #4] + cmp r0, #0 + bne _02242EFC + add r0, r6, #0 + bl sub_020655F4 + cmp r0, #1 + bne _02242F5C + ldrb r1, [r4, #6] + add r0, r6, #0 + lsl r2, r1, #2 + ldr r1, _02242F64 ; =0x02249058 + ldr r1, [r1, r2] + bl sub_02065638 + ldrb r0, [r4, #6] + cmp r0, #6 + bhs _02242ED8 + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + ldr r1, [r4, #0x10] + cmp r0, r1 + ble _02242ED8 + ldrb r0, [r4, #6] + cmp r0, #0 + bne _02242ED0 + ldr r0, _02242F68 ; =0x000006D9 + bl sub_02005748 +_02242ED0: + ldrb r0, [r4, #6] + add r0, r0, #1 + strb r0, [r4, #6] + b _02242F5C +_02242ED8: + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + ldr r1, [r4, #0x10] + cmp r0, r1 + bgt _02242F5C + ldrb r0, [r4, #6] + cmp r0, #0 + beq _02242F5C + cmp r0, #6 + bne _02242EF4 + ldr r0, _02242F6C ; =0x000006DA + bl sub_02005748 +_02242EF4: + ldrb r0, [r4, #6] + sub r0, r0, #1 + strb r0, [r4, #6] + b _02242F5C +_02242EFC: + add r0, r6, #0 + bl sub_020655F4 + cmp r0, #1 + bne _02242F5C + ldrb r1, [r4, #6] + add r0, r6, #0 + lsl r2, r1, #2 + ldr r1, _02242F70 ; =0x0224903C + ldr r1, [r1, r2] + bl sub_02065638 + ldrb r0, [r4, #6] + cmp r0, #6 + bhs _02242F3A + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + ldr r1, [r4, #0x10] + cmp r0, r1 + bge _02242F3A + ldrb r0, [r4, #6] + cmp r0, #0 + bne _02242F32 + ldr r0, _02242F68 ; =0x000006D9 + bl sub_02005748 +_02242F32: + ldrb r0, [r4, #6] + add r0, r0, #1 + strb r0, [r4, #6] + b _02242F5C +_02242F3A: + ldr r0, [r5, #0x3c] + bl sub_0205EAC8 + ldr r1, [r4, #0x10] + cmp r0, r1 + blt _02242F5C + ldrb r0, [r4, #6] + cmp r0, #0 + beq _02242F5C + cmp r0, #6 + bne _02242F56 + ldr r0, _02242F6C ; =0x000006DA + bl sub_02005748 +_02242F56: + ldrb r0, [r4, #6] + sub r0, r0, #1 + strb r0, [r4, #6] +_02242F5C: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02242F64: .word 0x02249058 +_02242F68: .word 0x000006D9 +_02242F6C: .word 0x000006DA +_02242F70: .word 0x0224903C + thumb_func_end ov6_02242E60 + + .rodata + + + .global Unk_ov6_02249034 +Unk_ov6_02249034: ; 0x02249034 + .incbin "incbin/overlay6_rodata.bin", 0x220, 0x228 - 0x220 + + .global Unk_ov6_0224903C +Unk_ov6_0224903C: ; 0x0224903C + .incbin "incbin/overlay6_rodata.bin", 0x228, 0x244 - 0x228 + + .global Unk_ov6_02249058 +Unk_ov6_02249058: ; 0x02249058 + .incbin "incbin/overlay6_rodata.bin", 0x244, 0x260 - 0x244 + + .global Unk_ov6_02249074 +Unk_ov6_02249074: ; 0x02249074 + .incbin "incbin/overlay6_rodata.bin", 0x260, 0x1C + diff --git a/asm/ov6_02242F74.s b/asm/ov6_02242F74.s new file mode 100644 index 000000000..7bd6e0c35 --- /dev/null +++ b/asm/ov6_02242F74.s @@ -0,0 +1,94 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02242F74 +ov6_02242F74: ; 0x02242F74 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, r2, #0 + add r4, r1, #0 + add r6, r3, #0 + bl ov6_02242FC0 + add r7, r0, #0 + cmp r4, #0 + beq _02242F8C + mov r1, #9 + b _02242F8E +_02242F8C: + mov r1, #0xa +_02242F8E: + mov r0, #0x6a + mov r2, #4 + bl sub_02006ADC + lsl r1, r7, #2 + add r1, r7, r1 + add r3, r5, #0 + asr r3, r1 + mov r2, #0x1f + add r1, r3, #0 + and r1, r2 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + and r1, r2 + lsl r1, r1, #0x18 + lsr r2, r1, #0x16 + ldr r1, [r0, r2] + str r1, [r6, #0] + ldr r2, [r0, r2] + ldr r1, [sp, #0x18] + str r2, [r1, #0] + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02242F74 + + thumb_func_start ov6_02242FC0 +ov6_02242FC0: ; 0x02242FC0 + push {r4, lr} + mov r1, #0x7e + lsl r1, r1, #2 + sub r0, r0, r1 + mov r4, #0 + cmp r0, #5 + bhi _02242FFC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02242FDA: ; jump table + .short _02242FE6 - _02242FDA - 2 ; case 0 + .short _02242FE8 - _02242FDA - 2 ; case 1 + .short _02242FEC - _02242FDA - 2 ; case 2 + .short _02242FF0 - _02242FDA - 2 ; case 3 + .short _02242FF4 - _02242FDA - 2 ; case 4 + .short _02242FF8 - _02242FDA - 2 ; case 5 +_02242FE6: + b _02243000 +_02242FE8: + mov r4, #1 + b _02243000 +_02242FEC: + mov r4, #2 + b _02243000 +_02242FF0: + mov r4, #3 + b _02243000 +_02242FF4: + mov r4, #4 + b _02243000 +_02242FF8: + mov r4, #5 + b _02243000 +_02242FFC: + bl sub_02022974 +_02243000: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov6_02242FC0 \ No newline at end of file diff --git a/asm/ov6_02243004.s b/asm/ov6_02243004.s new file mode 100644 index 000000000..e48435eff --- /dev/null +++ b/asm/ov6_02243004.s @@ -0,0 +1,116 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02243004 +ov6_02243004: ; 0x02243004 + push {r3, lr} + cmp r1, #9 + bhi _022430B8 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02243016: ; jump table + .short _0224302A - _02243016 - 2 ; case 0 + .short _02243034 - _02243016 - 2 ; case 1 + .short _02243050 - _02243016 - 2 ; case 2 + .short _0224305A - _02243016 - 2 ; case 3 + .short _02243064 - _02243016 - 2 ; case 4 + .short _0224306E - _02243016 - 2 ; case 5 + .short _02243078 - _02243016 - 2 ; case 6 + .short _02243094 - _02243016 - 2 ; case 7 + .short _022430A0 - _02243016 - 2 ; case 8 + .short _022430AC - _02243016 - 2 ; case 9 +_0224302A: + bl ov6_0223E6EC + ldr r1, _022430C0 ; =0x02249940 + str r0, [r1, #0] + b _022430BC +_02243034: + ldr r0, _022430C0 ; =0x02249940 + ldr r0, [r0, #0] + bl ov6_0223E708 + cmp r0, #0 + beq _0224304C + ldr r0, _022430C0 ; =0x02249940 + ldr r0, [r0, #0] + bl ov6_0223E700 + mov r0, #1 + pop {r3, pc} +_0224304C: + mov r0, #0 + pop {r3, pc} +_02243050: + bl ov6_0223E814 + ldr r1, _022430C0 ; =0x02249940 + str r0, [r1, #0] + b _022430BC +_0224305A: + ldr r0, _022430C0 ; =0x02249940 + ldr r0, [r0, #0] + bl ov6_0223E828 + b _022430BC +_02243064: + bl ov6_0223FCCC + ldr r1, _022430C0 ; =0x02249940 + str r0, [r1, #0] + b _022430BC +_0224306E: + ldr r0, _022430C0 ; =0x02249940 + ldr r0, [r0, #0] + bl ov6_0223FCE8 + b _022430BC +_02243078: + ldr r0, _022430C0 ; =0x02249940 + ldr r0, [r0, #0] + bl ov6_0223FCF4 + cmp r0, #6 + bne _02243090 + ldr r0, _022430C0 ; =0x02249940 + ldr r0, [r0, #0] + bl ov6_0223FCE0 + mov r0, #1 + pop {r3, pc} +_02243090: + mov r0, #0 + pop {r3, pc} +_02243094: + mov r1, #0 + bl ov6_0223EA74 + ldr r1, _022430C0 ; =0x02249940 + str r0, [r1, #0] + b _022430BC +_022430A0: + mov r1, #1 + bl ov6_0223EA74 + ldr r1, _022430C0 ; =0x02249940 + str r0, [r1, #0] + b _022430BC +_022430AC: + mov r1, #2 + bl ov6_0223EA74 + ldr r1, _022430C0 ; =0x02249940 + str r0, [r1, #0] + b _022430BC +_022430B8: + bl sub_02022974 +_022430BC: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_022430C0: .word 0x02249940 + thumb_func_end ov6_02243004 + .bss + + + .global Unk_ov6_02249940 +Unk_ov6_02249940: ; 0x02249940 + .space 0x4 + diff --git a/asm/ov6_022430C4.s b/asm/ov6_022430C4.s new file mode 100644 index 000000000..927d68531 --- /dev/null +++ b/asm/ov6_022430C4.s @@ -0,0 +1,204 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_022430C4 +ov6_022430C4: ; 0x022430C4 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0202D834 + bl sub_0202D830 + mov r2, #0 + ldrh r0, [r0, #2] + add r1, r2, #0 +_022430D6: + cmp r0, #0 + beq _022430DC + add r2, r2, #1 +_022430DC: + add r1, r1, #1 + cmp r1, #3 + blt _022430D6 + add r0, r2, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_022430C4 + + thumb_func_start ov6_022430E8 +ov6_022430E8: ; 0x022430E8 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #3 + blo _022430F8 + bl sub_02022974 +_022430F8: + ldr r0, [r5, #0xc] + bl sub_0202D834 + bl sub_0202D830 + add r1, sp, #0 + bl ov6_022431A0 + lsl r1, r4, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + ldrh r0, [r0] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_022430E8 + + thumb_func_start ov6_02243114 +ov6_02243114: ; 0x02243114 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #3 + blo _02243124 + bl sub_02022974 +_02243124: + ldr r0, [r5, #0xc] + bl sub_0202D834 + bl sub_0202D830 + add r1, sp, #0 + bl ov6_022431A0 + lsl r1, r4, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + ldrh r0, [r0, #2] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_02243114 + + thumb_func_start ov6_02243140 +ov6_02243140: ; 0x02243140 + ldr r3, _02243144 ; =sub_02069B90 + bx r3 + ; .align 2, 0 +_02243144: .word sub_02069B90 + thumb_func_end ov6_02243140 + + thumb_func_start ov6_02243148 +ov6_02243148: ; 0x02243148 + push {r3, lr} + sub sp, #8 + add r0, #0x94 + ldr r0, [r0, #0] + add r1, sp, #4 + add r2, sp, #0 + bl sub_0206978C + ldr r0, [sp, #4] + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02243148 + + thumb_func_start ov6_02243160 +ov6_02243160: ; 0x02243160 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r1, sp, #0 + add r4, r0, #0 + bl ov6_022431A0 + mov r2, #0 + add r3, sp, #0 + add r5, sp, #0xc +_02243172: + ldr r1, [r3, #0] + add r2, r2, #1 + ldrh r0, [r1] + add r3, r3, #4 + strh r0, [r5] + ldrh r0, [r1, #2] + strh r0, [r5, #2] + add r5, r5, #4 + cmp r2, #3 + blt _02243172 + mov r2, #0 + add r1, sp, #0xc +_0224318A: + ldrh r0, [r1] + add r2, r2, #1 + strh r0, [r4] + ldrh r0, [r1, #2] + add r1, r1, #4 + strh r0, [r4, #2] + add r4, r4, #4 + cmp r2, #3 + blt _0224318A + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02243160 + + thumb_func_start ov6_022431A0 +ov6_022431A0: ; 0x022431A0 + push {r3, r4} + ldrh r4, [r0, #6] + ldrh r3, [r0, #2] + cmp r3, r4 + ldrh r2, [r0, #0xa] + bhs _022431E2 + cmp r4, r2 + bhs _022431C0 + add r2, r0, #0 + add r2, #8 + str r2, [r1, #0] + add r2, r0, #4 + str r2, [r1, #4] + str r0, [r1, #8] + pop {r3, r4} + bx lr +_022431C0: + cmp r3, r2 + bhs _022431D4 + add r2, r0, #4 + str r2, [r1, #0] + add r2, r0, #0 + add r2, #8 + str r2, [r1, #4] + str r0, [r1, #8] + pop {r3, r4} + bx lr +_022431D4: + add r2, r0, #4 + str r2, [r1, #0] + str r0, [r1, #4] + add r0, #8 + str r0, [r1, #8] + pop {r3, r4} + bx lr +_022431E2: + cmp r3, r2 + bhs _022431F6 + add r2, r0, #0 + add r2, #8 + str r2, [r1, #0] + str r0, [r1, #4] + add r0, r0, #4 + str r0, [r1, #8] + pop {r3, r4} + bx lr +_022431F6: + cmp r4, r2 + str r0, [r1, #0] + bhs _0224320A + add r2, r0, #0 + add r2, #8 + str r2, [r1, #4] + add r0, r0, #4 + str r0, [r1, #8] + pop {r3, r4} + bx lr +_0224320A: + add r2, r0, #4 + str r2, [r1, #4] + add r0, #8 + str r0, [r1, #8] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov6_022431A0 \ No newline at end of file diff --git a/asm/ov6_02243218.s b/asm/ov6_02243218.s new file mode 100644 index 000000000..e8d2d0c1f --- /dev/null +++ b/asm/ov6_02243218.s @@ -0,0 +1,51 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02243218 +ov6_02243218: ; 0x02243218 + push {r3, lr} + mov r1, #0x16 + bl sub_020E2178 + ldr r0, _02243228 ; =0x02249090 + lsl r1, r1, #2 + ldr r0, [r0, r1] + pop {r3, pc} + ; .align 2, 0 +_02243228: .word 0x02249090 + thumb_func_end ov6_02243218 + + thumb_func_start ov6_0224322C +ov6_0224322C: ; 0x0224322C + push {r4, r5, r6, lr} + sub sp, #0x1a8 + add r5, r1, #0 + mov r1, #0x16 + add r4, r2, #0 + bl sub_020E2178 + ldr r0, _02243254 ; =0x02249090 + lsl r1, r1, #2 + ldr r6, [r0, r1] + add r0, sp, #0 + add r1, r6, #0 + bl sub_0203A614 + ldr r0, [sp, #0x64] + strh r0, [r4] + strh r6, [r5] + add sp, #0x1a8 + pop {r4, r5, r6, pc} + nop +_02243254: .word 0x02249090 + thumb_func_end ov6_0224322C + + .rodata + + + .global Unk_ov6_02249090 +Unk_ov6_02249090: ; 0x02249090 + .incbin "incbin/overlay6_rodata.bin", 0x27C, 0x58 + diff --git a/asm/ov6_02243258.s b/asm/ov6_02243258.s new file mode 100644 index 000000000..e798be2c0 --- /dev/null +++ b/asm/ov6_02243258.s @@ -0,0 +1,6345 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02243258 +ov6_02243258: ; 0x02243258 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r2, #0 + ldr r0, [sp, #0x1c] + add r7, r3, #0 + strb r6, [r5] + ldr r4, [sp, #0x18] + strb r7, [r5, #1] + strb r4, [r5, #2] + str r0, [sp, #0x1c] + strb r0, [r5, #3] + ldr r0, [sp, #0x20] + mov r2, #4 + strb r0, [r5, #4] + ldr r0, [sp, #0x24] + strb r0, [r5, #5] + ldr r0, [sp, #0x28] + strb r0, [r5, #6] + ldr r0, [sp, #0x2c] + strb r0, [r5, #7] + add r0, r1, #0 + add r1, r5, #0 + add r1, #0xc + bl sub_020095C4 + str r0, [r5, #8] + add r0, r5, #0 + mov r2, #2 + add r0, #0xc + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + add r0, r6, #0 + mov r1, #0 + mov r2, #4 + bl sub_02009714 + mov r1, #0x4d + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r7, #0 + mov r1, #1 + mov r2, #4 + bl sub_02009714 + mov r1, #0x4e + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r4, #0 + mov r1, #2 + mov r2, #4 + bl sub_02009714 + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [sp, #0x1c] + mov r1, #3 + mov r2, #4 + bl sub_02009714 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r0, #4 + lsl r1, r6, #3 + bl ov6_02245F44 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #4 + lsl r1, r7, #3 + bl ov6_02245F44 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #4 + lsl r1, r4, #3 + bl ov6_02245F44 + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r1, [sp, #0x1c] + mov r0, #4 + lsl r1, r1, #3 + bl ov6_02245F44 + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r1, #0 + cmp r6, #0 + ble _02243334 + ble _02243334 + ldr r0, [sp, #0x20] + add r2, r1, #0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 +_02243324: + mov r3, #0x51 + lsl r3, r3, #2 + ldr r3, [r5, r3] + add r1, r1, #1 + strh r0, [r3, r2] + add r2, #8 + cmp r1, r6 + blt _02243324 +_02243334: + mov r3, #0 + cmp r7, #0 + ble _02243354 + ble _02243354 + ldr r0, [sp, #0x24] + mov r6, #0x52 + lsl r0, r0, #0x10 + add r2, r3, #0 + asr r1, r0, #0x10 + lsl r6, r6, #2 +_02243348: + ldr r0, [r5, r6] + add r3, r3, #1 + strh r1, [r0, r2] + add r2, #8 + cmp r3, r7 + blt _02243348 +_02243354: + mov r1, #0 + cmp r4, #0 + ble _02243374 + ble _02243374 + ldr r2, [sp, #0x28] + add r0, r1, #0 + lsl r2, r2, #0x10 + asr r6, r2, #0x10 + mov r2, #0x53 + lsl r2, r2, #2 +_02243368: + ldr r3, [r5, r2] + add r1, r1, #1 + strh r6, [r3, r0] + add r0, #8 + cmp r1, r4 + blt _02243368 +_02243374: + ldr r0, [sp, #0x1c] + mov r1, #0 + cmp r0, #0 + ble _02243398 + ble _02243398 + ldr r2, [sp, #0x2c] + mov r3, #0x15 + lsl r2, r2, #0x10 + add r0, r1, #0 + asr r4, r2, #0x10 + lsl r3, r3, #4 +_0224338A: + ldr r2, [r5, r3] + add r1, r1, #1 + strh r4, [r2, r0] + ldr r2, [sp, #0x1c] + add r0, #8 + cmp r1, r2 + blt _0224338A +_02243398: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02243258 + + thumb_func_start ov6_0224339C +ov6_0224339C: ; 0x0224339C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrb r0, [r5] + mov r6, #0 + cmp r0, #0 + ble _022433CC + add r4, r6, #0 + mov r7, #4 +_022433AC: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r1, [r5, r0] + ldrsb r2, [r5, r7] + add r0, r1, r4 + ldrsh r1, [r1, r4] + cmp r2, r1 + beq _022433C2 + ldr r0, [r0, #4] + bl sub_0200A4E4 +_022433C2: + ldrb r0, [r5] + add r6, r6, #1 + add r4, #8 + cmp r6, r0 + blt _022433AC +_022433CC: + ldrb r0, [r5, #1] + mov r6, #0 + cmp r0, #0 + ble _022433F8 + add r4, r6, #0 + mov r7, #5 +_022433D8: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r1, [r5, r0] + ldrsb r2, [r5, r7] + add r0, r1, r4 + ldrsh r1, [r1, r4] + cmp r2, r1 + beq _022433EE + ldr r0, [r0, #4] + bl sub_0200A6DC +_022433EE: + ldrb r0, [r5, #1] + add r6, r6, #1 + add r4, #8 + cmp r6, r0 + blt _022433D8 +_022433F8: + ldrb r0, [r5, #2] + mov r6, #0 + cmp r0, #0 + ble _02243424 + add r4, r6, #0 + mov r7, #6 +_02243404: + mov r0, #0x53 + lsl r0, r0, #2 + ldr r1, [r5, r0] + ldrsb r2, [r5, r7] + add r0, r1, r4 + ldrsh r1, [r1, r4] + cmp r2, r1 + beq _0224341A + ldr r0, [r0, #4] + bl sub_02009D4C +_0224341A: + ldrb r0, [r5, #2] + add r6, r6, #1 + add r4, #8 + cmp r6, r0 + blt _02243404 +_02243424: + ldrb r0, [r5, #3] + mov r6, #0 + cmp r0, #0 + ble _02243450 + add r4, r6, #0 + mov r7, #7 +_02243430: + mov r0, #0x15 + lsl r0, r0, #4 + ldr r1, [r5, r0] + ldrsb r2, [r5, r7] + add r0, r1, r4 + ldrsh r1, [r1, r4] + cmp r2, r1 + beq _02243446 + ldr r0, [r0, #4] + bl sub_02009D4C +_02243446: + ldrb r0, [r5, #3] + add r6, r6, #1 + add r4, #8 + cmp r6, r0 + blt _02243430 +_02243450: + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009754 + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009754 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02009754 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_02009754 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020181C4 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020181C4 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020181C4 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_020181C4 + ldr r0, [r5, #8] + bl sub_020219C0 + ldr r0, [r5, #8] + bl sub_02021964 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_0224339C + + thumb_func_start ov6_022434B0 +ov6_022434B0: ; 0x022434B0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldrb r5, [r6] + str r2, [sp, #0x10] + str r1, [sp, #0xc] + add r7, r3, #0 + mov r2, #0 + cmp r5, #0 + ble _02243516 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r3, [r6, r0] + mov r0, #4 + ldrsb r4, [r6, r0] + mov ip, r3 + add r0, r2, #0 +_022434D2: + ldrsh r1, [r3, r0] + cmp r4, r1 + bne _0224350E + lsl r4, r2, #3 + mov r0, ip + strh r7, [r0, r4] + mov r0, #0x51 + lsl r0, r0, #2 + ldr r1, [r6, r0] + mov r3, #0 + add r1, r1, r4 + strh r3, [r1, #2] + str r7, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + sub r0, #0x10 + ldr r0, [r6, r0] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + bl sub_02009A4C + mov r1, #0x51 + lsl r1, r1, #2 + ldr r1, [r6, r1] + add sp, #0x14 + add r1, r1, r4 + str r0, [r1, #4] + pop {r4, r5, r6, r7, pc} +_0224350E: + add r2, r2, #1 + add r3, #8 + cmp r2, r5 + blt _022434D2 +_02243516: + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022434B0 + + thumb_func_start ov6_02243520 +ov6_02243520: ; 0x02243520 + push {r4, r5, r6, lr} + ldrb r3, [r0] + mov r2, #0 + cmp r3, #0 + ble _0224354E + mov r4, #0x51 + lsl r4, r4, #2 + ldr r0, [r0, r4] + add r4, r2, #0 + add r6, r0, #0 +_02243534: + ldrsh r5, [r6, r4] + cmp r1, r5 + bne _02243546 + lsl r1, r2, #3 + add r0, r0, r1 + ldr r0, [r0, #4] + bl sub_0200A3DC + pop {r4, r5, r6, pc} +_02243546: + add r2, r2, #1 + add r6, #8 + cmp r2, r3 + blt _02243534 +_0224354E: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02243520 + + thumb_func_start ov6_02243554 +ov6_02243554: ; 0x02243554 + push {r4, r5, r6, lr} + ldrb r3, [r0] + mov r2, #0 + cmp r3, #0 + ble _02243582 + mov r4, #0x51 + lsl r4, r4, #2 + ldr r0, [r0, r4] + add r4, r2, #0 + add r6, r0, #0 +_02243568: + ldrsh r5, [r6, r4] + cmp r1, r5 + bne _0224357A + lsl r1, r2, #3 + add r0, r0, r1 + ldr r0, [r0, #4] + bl sub_02009D4C + pop {r4, r5, r6, pc} +_0224357A: + add r2, r2, #1 + add r6, #8 + cmp r2, r3 + blt _02243568 +_02243582: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02243554 + + thumb_func_start ov6_02243588 +ov6_02243588: ; 0x02243588 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + ldrb r5, [r6] + str r2, [sp, #0x14] + str r1, [sp, #0x10] + add r7, r3, #0 + mov r2, #0 + cmp r5, #0 + ble _022435F0 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r3, [r6, r0] + mov r0, #5 + ldrsb r4, [r6, r0] + mov ip, r3 + add r0, r2, #0 +_022435AA: + ldrsh r1, [r3, r0] + cmp r4, r1 + bne _022435E8 + lsl r4, r2, #3 + mov r0, ip + strh r7, [r0, r4] + mov r0, #0x52 + lsl r0, r0, #2 + ldr r1, [r6, r0] + mov r3, #0 + add r1, r1, r4 + strh r3, [r1, #2] + str r7, [sp] + mov r1, #1 + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #4 + str r1, [sp, #0xc] + sub r0, #0x10 + ldr r0, [r6, r0] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + bl sub_02009B04 + mov r1, #0x52 + lsl r1, r1, #2 + ldr r1, [r6, r1] + add sp, #0x18 + add r1, r1, r4 + str r0, [r1, #4] + pop {r3, r4, r5, r6, r7, pc} +_022435E8: + add r2, r2, #1 + add r3, #8 + cmp r2, r5 + blt _022435AA +_022435F0: + bl sub_02022974 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02243588 + + thumb_func_start ov6_022435F8 +ov6_022435F8: ; 0x022435F8 + push {r4, r5, r6, lr} + ldrb r3, [r0, #1] + mov r2, #0 + cmp r3, #0 + ble _02243626 + mov r4, #0x52 + lsl r4, r4, #2 + ldr r0, [r0, r4] + add r4, r2, #0 + add r6, r0, #0 +_0224360C: + ldrsh r5, [r6, r4] + cmp r1, r5 + bne _0224361E + lsl r1, r2, #3 + add r0, r0, r1 + ldr r0, [r0, #4] + bl sub_0200A640 + pop {r4, r5, r6, pc} +_0224361E: + add r2, r2, #1 + add r6, #8 + cmp r2, r3 + blt _0224360C +_02243626: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov6_022435F8 + + thumb_func_start ov6_0224362C +ov6_0224362C: ; 0x0224362C + push {r4, r5, r6, lr} + ldrb r3, [r0, #1] + mov r2, #0 + cmp r3, #0 + ble _0224365A + mov r4, #0x52 + lsl r4, r4, #2 + ldr r0, [r0, r4] + add r4, r2, #0 + add r6, r0, #0 +_02243640: + ldrsh r5, [r6, r4] + cmp r1, r5 + bne _02243652 + lsl r1, r2, #3 + add r0, r0, r1 + ldr r0, [r0, #4] + bl sub_02009D4C + pop {r4, r5, r6, pc} +_02243652: + add r2, r2, #1 + add r6, #8 + cmp r2, r3 + blt _02243640 +_0224365A: + bl sub_02022974 + pop {r4, r5, r6, pc} + thumb_func_end ov6_0224362C + + thumb_func_start ov6_02243660 +ov6_02243660: ; 0x02243660 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldrb r5, [r6] + str r2, [sp, #0x10] + str r1, [sp, #0xc] + add r7, r3, #0 + mov r2, #0 + cmp r5, #0 + ble _022436C6 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r3, [r6, r0] + mov r0, #6 + ldrsb r4, [r6, r0] + mov ip, r3 + add r0, r2, #0 +_02243682: + ldrsh r1, [r3, r0] + cmp r4, r1 + bne _022436BE + lsl r4, r2, #3 + mov r0, ip + strh r7, [r0, r4] + mov r0, #0x53 + lsl r0, r0, #2 + ldr r1, [r6, r0] + mov r3, #0 + add r1, r1, r4 + strh r3, [r1, #2] + str r7, [sp] + mov r1, #2 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + sub r0, #0x10 + ldr r0, [r6, r0] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + bl sub_02009BC4 + mov r1, #0x53 + lsl r1, r1, #2 + ldr r1, [r6, r1] + add sp, #0x14 + add r1, r1, r4 + str r0, [r1, #4] + pop {r4, r5, r6, r7, pc} +_022436BE: + add r2, r2, #1 + add r3, #8 + cmp r2, r5 + blt _02243682 +_022436C6: + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02243660 + + thumb_func_start ov6_022436D0 +ov6_022436D0: ; 0x022436D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldrb r5, [r6] + str r2, [sp, #0x10] + str r1, [sp, #0xc] + add r7, r3, #0 + mov r2, #0 + cmp r5, #0 + ble _02243736 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r3, [r6, r0] + mov r0, #7 + ldrsb r4, [r6, r0] + mov ip, r3 + add r0, r2, #0 +_022436F2: + ldrsh r1, [r3, r0] + cmp r4, r1 + bne _0224372E + lsl r4, r2, #3 + mov r0, ip + strh r7, [r0, r4] + mov r0, #0x15 + lsl r0, r0, #4 + ldr r1, [r6, r0] + mov r3, #0 + add r1, r1, r4 + strh r3, [r1, #2] + str r7, [sp] + mov r1, #3 + str r1, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + sub r0, #0x10 + ldr r0, [r6, r0] + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + bl sub_02009BC4 + mov r1, #0x15 + lsl r1, r1, #4 + ldr r1, [r6, r1] + add sp, #0x14 + add r1, r1, r4 + str r0, [r1, #4] + pop {r4, r5, r6, r7, pc} +_0224372E: + add r2, r2, #1 + add r3, #8 + cmp r2, r5 + blt _022436F2 +_02243736: + bl sub_02022974 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022436D0 + + thumb_func_start ov6_02243740 +ov6_02243740: ; 0x02243740 + push {r4, r5, r6, lr} + sub sp, #0x70 + add r5, r0, #0 + add r4, r1, #0 + add r1, r2, #0 + mov r0, #7 + add r2, r3, #0 + ldrsb r3, [r5, r0] + ldr r6, [sp, #0x84] + cmp r6, r3 + bne _0224375A + sub r0, #8 + str r0, [sp, #0x84] +_0224375A: + ldr r0, [sp, #0x84] + mov r3, #0 + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x88] + str r3, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0x4d + lsl r0, r0, #2 + ldr r6, [r5, r0] + str r6, [sp, #0x14] + add r6, r0, #4 + ldr r6, [r5, r6] + str r6, [sp, #0x18] + add r6, r0, #0 + add r6, #8 + ldr r6, [r5, r6] + add r0, #0xc + str r6, [sp, #0x1c] + ldr r0, [r5, r0] + str r0, [sp, #0x20] + str r3, [sp, #0x24] + str r3, [sp, #0x28] + ldr r3, [sp, #0x80] + add r0, sp, #0x4c + bl sub_020093B4 + ldr r0, [r5, #8] + add r2, sp, #0x34 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + ldmia r4!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r2, #0] + ldr r0, [sp, #0x8c] + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x44] + mov r0, #4 + str r0, [sp, #0x48] + add r0, sp, #0x2c + bl sub_02021B90 + add r4, r0, #0 + bne _022437C2 + bl sub_02022974 +_022437C2: + add r0, r4, #0 + add sp, #0x70 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02243740 + + thumb_func_start ov6_022437C8 +ov6_022437C8: ; 0x022437C8 + push {r4, lr} + add r4, r1, #0 + bl sub_02021D28 + add r2, r0, #0 + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + pop {r4, pc} + thumb_func_end ov6_022437C8 + + thumb_func_start ov6_022437DC +ov6_022437DC: ; 0x022437DC + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r4, r0, #0 + mov r2, #0 + add r0, sp, #0x1c + str r2, [r0, #0] + str r2, [r0, #4] + add r3, sp, #0x28 + str r2, [r3, #0] + str r2, [r3, #4] + ldr r6, _02243844 ; =0x0224918C + str r2, [r0, #8] + ldmia r6!, {r0, r1} + add r5, sp, #0x10 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + str r2, [r3, #8] + str r0, [r5, #0] + add r1, r3, #0 + str r2, [sp] + mov r0, #2 + str r0, [sp, #4] + str r2, [sp, #8] + mov r0, #0x84 + str r0, [sp, #0xc] + add r0, r4, #0 + add r3, r2, #0 + bl ov6_02243740 + add r4, r0, #0 + mov r1, #2 + bl sub_02021CF8 + add r0, r4, #0 + add r1, sp, #0x1c + bl sub_02021C60 + add r0, r4, #0 + add r1, sp, #0x10 + bl sub_02021C70 + mov r0, #0 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + add r0, r4, #0 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + nop +_02243844: .word 0x0224918C + thumb_func_end ov6_022437DC + + thumb_func_start ov6_02243848 +ov6_02243848: ; 0x02243848 + push {r3, r4, lr} + sub sp, #0x1c + mov r3, #0 + add r2, sp, #0x10 + str r3, [r2, #0] + str r3, [r2, #4] + str r3, [r2, #8] + cmp r1, #1 + bne _0224385C + mov r3, #1 +_0224385C: + mov r2, #2 + str r2, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #0x83 + str r1, [sp, #0xc] + add r1, sp, #0x10 + bl ov6_02243740 + add r4, r0, #0 + mov r1, #0 + bl sub_02021CAC + add r0, r4, #0 + mov r1, #6 + bl sub_02021D6C + add r0, r4, #0 + add sp, #0x1c + pop {r3, r4, pc} + thumb_func_end ov6_02243848 + + thumb_func_start ov6_02243888 +ov6_02243888: ; 0x02243888 + push {r4, r5, lr} + sub sp, #0x24 + add r5, sp, #0x18 + mov r4, #0 + str r4, [r5, #0] + str r4, [r5, #4] + str r0, [sp, #0xc] + str r2, [sp, #0x14] + str r3, [sp, #0x10] + str r4, [r5, #8] + str r1, [sp, #8] + add r0, sp, #8 + str r0, [sp] + mov r0, #0x82 + str r0, [sp, #4] + add r0, r1, #0 + ldr r1, _022438B8 ; =0x0224925C + add r2, r5, #0 + add r3, r4, #0 + bl sub_02071330 + add sp, #0x24 + pop {r4, r5, pc} + nop +_022438B8: .word 0x0224925C + thumb_func_end ov6_02243888 + + thumb_func_start ov6_022438BC +ov6_022438BC: ; 0x022438BC + push {r3, lr} + bl sub_02071598 + ldrb r0, [r0, #2] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_022438BC + + thumb_func_start ov6_022438C8 +ov6_022438C8: ; 0x022438C8 + push {r4, lr} + add r4, r1, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0x58 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0x64] + bl ov6_022437DC + str r0, [r4, #0x68] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022438C8 + + thumb_func_start ov6_022438EC +ov6_022438EC: ; 0x022438EC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02071598 + add r4, r0, #0 + ldr r0, [r4, #0x6c] + cmp r0, #0 + beq _02243900 + bl sub_0207136C +_02243900: + ldr r0, [r4, #0x70] + cmp r0, #0 + beq _0224390A + bl ov5_021F0EFC +_0224390A: + add r0, r5, #0 + bl sub_0207136C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_022438EC + + thumb_func_start ov6_02243914 +ov6_02243914: ; 0x02243914 + ldr r3, _0224391C ; =sub_02021BD4 + ldr r0, [r1, #0x68] + bx r3 + nop +_0224391C: .word sub_02021BD4 + thumb_func_end ov6_02243914 + + thumb_func_start ov6_02243920 +ov6_02243920: ; 0x02243920 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrb r0, [r5] + lsl r1, r0, #2 + ldr r0, _0224393C ; =0x02249110 + ldr r4, [r0, r1] +_0224392C: + ldrb r1, [r5, #1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + blx r1 + cmp r0, #1 + beq _0224392C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224393C: .word 0x02249110 + thumb_func_end ov6_02243920 + + thumb_func_start ov6_02243940 +ov6_02243940: ; 0x02243940 + push {r3, lr} + mov r1, #0 + strb r1, [r0, #2] + ldr r0, [r0, #0x68] + bl sub_02021CAC + mov r0, #0 + pop {r3, pc} + thumb_func_end ov6_02243940 + + thumb_func_start ov6_02243950 +ov6_02243950: ; 0x02243950 + push {r4, r5, r6, lr} + sub sp, #0x30 + ldr r4, _02243AA4 ; =0x02249150 + add r2, r0, #0 + ldmia r4!, {r0, r1} + add r3, sp, #0x24 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r4, _02243AA8 ; =0x022491A4 + str r0, [r3, #0] + ldmia r4!, {r0, r1} + add r3, sp, #0x18 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + add r0, r2, #0 + bl sub_02071598 + add r4, r0, #0 + mov r3, #1 + add r5, r4, #0 + strb r3, [r4] + mov r2, #0 + strb r2, [r4, #2] + strb r2, [r4, #1] + str r2, [r4, #4] + add r6, sp, #0x24 + ldmia r6!, {r0, r1} + add r5, #8 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r5, #0] + str r2, [r4, #0x14] + str r2, [r4, #0x18] + str r2, [r4, #0x1c] + ldr r0, _02243AAC ; =0x0015E000 + add r2, r4, #0 + add r5, sp, #0x18 + str r0, [r4, #0x38] + ldmia r5!, {r0, r1} + add r2, #0x2c + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r2, #0] + lsl r0, r3, #0xa + str r0, [r4, #0x50] + mov r0, #0x2d + lsl r0, r0, #0xc + str r0, [r4, #0x40] + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [r4, #0x48] + lsl r0, r3, #0x11 + str r0, [r4, #0x4c] + mov r0, #0x2d + bl sub_0201D264 + ldr r2, [r4, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r4, #0x14] + ldr r1, [r4, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, [r4, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r4, #0x18] + ldr r1, [r4, #8] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [sp, #0x24] + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [sp, #0x28] + ldr r0, [r4, #0x68] + add r1, sp, #0x24 + bl sub_02021C50 + ldr r0, [r4, #0x68] + add r1, sp, #0x18 + bl sub_02021C70 + ldr r1, [r4, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + ldr r0, [r4, #0x68] + bl sub_02021C94 + ldr r0, [r4, #0x68] + mov r1, #0x84 + bl sub_02021F58 + ldr r0, [r4, #0x68] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0x58] + ldr r1, [r4, #0x60] + bl ov6_02245B4C + str r0, [r4, #0x6c] + ldr r0, [r4, #0x5c] + mov r1, #4 + bl ov5_021F0EB0 + ldr r2, _02243AB0 ; =0xFFF88000 + mov r1, #1 + mov r3, #0xc + str r0, [r4, #0x70] + bl ov5_021F0F10 + add r1, sp, #0xc + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + ldr r3, _02243AB4 ; =0x022491C8 + str r0, [r1, #8] + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r1, #2 + str r0, [r2, #0] + ldr r4, [r4, #0x60] + add r0, r4, #0 + bl sub_02021CF8 + add r0, r4, #0 + add r1, sp, #0xc + bl sub_02021C60 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C70 + mov r0, #0 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + add r0, r4, #0 + mov r1, #2 + bl sub_02021D6C + bl ov6_02243F2C + add sp, #0x30 + pop {r4, r5, r6, pc} + nop +_02243AA4: .word 0x02249150 +_02243AA8: .word 0x022491A4 +_02243AAC: .word 0x0015E000 +_02243AB0: .word 0xFFF88000 +_02243AB4: .word 0x022491C8 + thumb_func_end ov6_02243950 + + thumb_func_start ov6_02243AB8 +ov6_02243AB8: ; 0x02243AB8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x4c] + ldr r6, [r5, #0x68] + ldr r4, [r5, #0x60] + sub r0, r1, r0 + str r0, [r5, #0x48] + bpl _02243AD0 + mov r0, #0 + str r0, [r5, #0x48] +_02243AD0: + mov r0, #2 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0xa + cmp r1, r0 + ble _02243AE2 + mov r0, #7 + lsl r0, r0, #0xa + sub r0, r1, r0 + str r0, [r5, #0x4c] +_02243AE2: + mov r0, #1 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0xc + cmp r1, r0 + bge _02243AEE + str r0, [r5, #0x4c] +_02243AEE: + mov r0, #0x2d + bl sub_0201D264 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x14] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x18] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + cmp r0, #0x5a + bge _02243B36 + mov r0, #1 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [r5, #0x40] +_02243B36: + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x50] + sub r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [r5, #0x2c] + cmp r1, r0 + bge _02243B48 + str r0, [r5, #0x2c] +_02243B48: + ldr r1, [r5, #0x30] + ldr r0, [r5, #0x50] + sub r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [r5, #0x30] + cmp r1, r0 + bge _02243B5A + str r0, [r5, #0x30] +_02243B5A: + add r1, r5, #0 + add r0, r6, #0 + add r1, #0x2c + bl sub_02021C70 + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x2c + bl sub_02021C70 + ldr r1, [r5, #8] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp] + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r6, #0 + add r1, sp, #0 + bl sub_02021C50 + mov r0, #0x12 + ldr r1, [sp, #4] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r5, #0x48] + cmp r0, #0 + bne _02243BAA + mov r0, #0 + str r0, [r5, #4] + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] + b _02243BB0 +_02243BAA: + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] +_02243BB0: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02243AB8 + + thumb_func_start ov6_02243BB8 +ov6_02243BB8: ; 0x02243BB8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x6c] + bl ov6_02245BC8 + ldr r0, [r4, #0x70] + mov r1, #2 + mov r2, #0 + mov r3, #0xc + bl ov5_021F0F10 + mov r0, #1 + lsl r0, r0, #0xa + str r0, [r4, #0x50] + lsl r0, r0, #9 + str r0, [r4, #0x40] + mov r0, #0 + str r0, [r4, #0x48] + mov r0, #6 + lsl r0, r0, #0xa + str r0, [r4, #0x4c] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov6_02243BB8 + + thumb_func_start ov6_02243BEC +ov6_02243BEC: ; 0x02243BEC + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x4c] + ldr r4, [r5, #0x68] + add r0, r1, r0 + str r0, [r5, #0x48] + mov r0, #1 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0xc + add r2, r1, r0 + lsl r1, r0, #4 + str r2, [r5, #0x4c] + cmp r2, r1 + ble _02243C10 + lsl r0, r0, #4 + str r0, [r5, #0x4c] +_02243C10: + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D264 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x14] + mov r0, #0x80 + bl sub_0201D250 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x18] + mov r0, #0xa + ldr r1, [r5, #0x40] + lsl r0, r0, #0x10 + cmp r1, r0 + bge _02243C54 + mov r0, #1 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r5, #0x40] +_02243C54: + mov r0, #2 + ldr r1, [r5, #0x38] + lsl r0, r0, #0xc + add r1, r1, r0 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + str r1, [r5, #0x38] + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [r5, #0x2c] + cmp r1, r0 + ble _02243C86 + str r0, [r5, #0x2c] +_02243C86: + ldr r1, [r5, #0x30] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [r5, #0x30] + cmp r1, r0 + ble _02243C98 + str r0, [r5, #0x30] +_02243C98: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x2c + bl sub_02021C70 + ldr r1, [r5, #8] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp] + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x18] + sub r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C50 + ldr r1, [sp, #4] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r1, r0, #0xc + mov r0, #0xf + mvn r0, r0 + cmp r1, r0 + bgt _02243CD2 + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] +_02243CD2: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_02243BEC + + thumb_func_start ov6_02243CD8 +ov6_02243CD8: ; 0x02243CD8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x68] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x60] + mov r1, #1 + bl sub_02021D6C + mov r0, #0 + str r0, [r4, #4] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02243CD8 + + thumb_func_start ov6_02243CFC +ov6_02243CFC: ; 0x02243CFC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r0, #0 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #0x14 + bge _02243D12 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02243D12: + ldr r3, _02243DB4 ; =0x02249174 + add r2, sp, #0xc + ldmia r3!, {r0, r1} + add r6, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r3, _02243DB8 ; =0x02249180 + str r0, [r2, #0] + add r2, sp, #0 + ldmia r3!, {r0, r1} + add r5, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + mov r7, #0 + str r0, [r2, #0] + add r2, r4, #0 + str r7, [r4, #4] + add r3, r6, #0 + ldmia r3!, {r0, r1} + add r2, #8 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + str r7, [r4, #0x14] + str r7, [r4, #0x18] + str r7, [r4, #0x1c] + str r7, [r4, #0x38] + add r2, r4, #0 + ldmia r5!, {r0, r1} + add r2, #0x2c + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r2, #0] + lsl r1, r1, #8 + ldr r0, _02243DBC ; =0x0013B000 + str r1, [r4, #0x50] + str r0, [r4, #0x40] + lsl r0, r1, #0xa + str r0, [r4, #0x48] + lsl r0, r1, #4 + str r0, [r4, #0x4c] + ldr r0, [r4, #0x68] + add r1, r6, #0 + bl sub_02021C50 + ldr r0, [r4, #0x68] + add r1, sp, #0 + bl sub_02021C70 + ldr r1, [r4, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + ldr r0, [r4, #0x68] + bl sub_02021C94 + ldr r0, [r4, #0x68] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0x60] + mov r1, #6 + bl sub_02021D6C + ldr r0, [r4, #0x60] + mov r1, #1 + bl sub_02021CC8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243DB4: .word 0x02249174 +_02243DB8: .word 0x02249180 +_02243DBC: .word 0x0013B000 + thumb_func_end ov6_02243CFC + + thumb_func_start ov6_02243DC0 +ov6_02243DC0: ; 0x02243DC0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x4c] + ldr r4, [r5, #0x68] + sub r0, r1, r0 + str r0, [r5, #0x48] + mov r0, #1 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0x10 + cmp r1, r0 + bge _02243DE0 + lsr r0, r0, #3 + add r0, r1, r0 + str r0, [r5, #0x4c] +_02243DE0: + ldr r0, [r5, #0x48] + cmp r0, #0 + bge _02243DEA + mov r0, #0 + str r0, [r5, #0x48] +_02243DEA: + ldr r0, _02243EC8 ; =0x0000013B + bl sub_0201D264 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x14] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x18] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + cmp r0, #0xb4 + bge _02243E32 + mov r0, #1 + lsl r0, r0, #0xe + sub r0, r1, r0 + str r0, [r5, #0x40] +_02243E32: + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x50] + sub r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xa + str r1, [r5, #0x2c] + cmp r1, r0 + bge _02243E44 + str r0, [r5, #0x2c] +_02243E44: + ldr r1, [r5, #0x30] + ldr r0, [r5, #0x50] + sub r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xa + str r1, [r5, #0x30] + cmp r1, r0 + bge _02243E56 + str r0, [r5, #0x30] +_02243E56: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x2c + bl sub_02021C70 + mov r0, #6 + ldr r1, [r5, #0x38] + lsl r0, r0, #0xc + add r1, r1, r0 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + str r1, [r5, #0x38] + cmp r0, #0x3c + ble _02243E7C + mov r0, #0xf + lsl r0, r0, #0xe + str r0, [r5, #0x38] +_02243E7C: + ldr r1, [r5, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + ldr r1, [r5, #8] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp] + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r5, #0x48] + cmp r0, #0 + bgt _02243EC0 + add r0, r4, #0 + mov r1, #0 + bl sub_02021CAC + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] +_02243EC0: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_02243EC8: .word 0x0000013B + thumb_func_end ov6_02243DC0 + + thumb_func_start ov6_02243ECC +ov6_02243ECC: ; 0x02243ECC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #8 + bne _02243EEA + ldr r0, [r4, #0x60] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r4, #0x5c] + mov r1, #0 + bl ov6_02243F74 +_02243EEA: + ldr r0, [r4, #4] + cmp r0, #0xa + bne _02243EF8 + ldr r0, [r4, #0x60] + mov r1, #0 + bl sub_02021CAC +_02243EF8: + ldr r0, [r4, #4] + cmp r0, #0xf + ble _02243F16 + ldr r0, [r4, #0x70] + bl ov5_021F0EF0 + cmp r0, #1 + bne _02243F16 + mov r0, #0 + str r0, [r4, #4] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + mov r0, #2 + strb r0, [r4, #2] +_02243F16: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02243ECC + + thumb_func_start ov6_02243F1C +ov6_02243F1C: ; 0x02243F1C + mov r0, #0 + bx lr + thumb_func_end ov6_02243F1C + + thumb_func_start ov6_02243F20 +ov6_02243F20: ; 0x02243F20 + ldr r3, _02243F28 ; =sub_02006C24 + mov r0, #0x61 + mov r1, #4 + bx r3 + ; .align 2, 0 +_02243F28: .word sub_02006C24 + thumb_func_end ov6_02243F20 + + thumb_func_start ov6_02243F2C +ov6_02243F2C: ; 0x02243F2C + push {lr} + sub sp, #0xc + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r3, _02243F4C ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} + nop +_02243F4C: .word 0x00007FFF + thumb_func_end ov6_02243F2C + + thumb_func_start ov6_02243F50 +ov6_02243F50: ; 0x02243F50 + push {lr} + sub sp, #0xc + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0 + ldr r3, _02243F70 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} + ; .align 2, 0 +_02243F70: .word 0x00007FFF + thumb_func_end ov6_02243F50 + + thumb_func_start ov6_02243F74 +ov6_02243F74: ; 0x02243F74 + push {r4, lr} + ldr r0, [r0, #0x3c] + add r4, r1, #0 + bl sub_0205EB3C + add r1, r4, #0 + bl sub_02062D64 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02243F74 + + thumb_func_start ov6_02243F88 +ov6_02243F88: ; 0x02243F88 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + bl ov6_02243FDC + add r1, r0, #0 + str r4, [r1, #0x5c] + str r6, [r1, #0xc] + str r5, [r1, #0x20] + cmp r5, #0 + bne _02243FAA + ldr r0, _02243FB4 ; =ov6_02244004 + mov r2, #0x85 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} +_02243FAA: + ldr r0, _02243FB8 ; =ov6_022443B8 + mov r2, #0x85 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02243FB4: .word ov6_02244004 +_02243FB8: .word ov6_022443B8 + thumb_func_end ov6_02243F88 + + thumb_func_start ov6_02243FBC +ov6_02243FBC: ; 0x02243FBC + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #4] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02243FBC + + thumb_func_start ov6_02243FC8 +ov6_02243FC8: ; 0x02243FC8 + push {r4, lr} + add r4, r0, #0 + bl sub_0201CED0 + bl ov6_02243FFC + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov6_02243FC8 + + thumb_func_start ov6_02243FDC +ov6_02243FDC: ; 0x02243FDC + push {r3, r4, r5, lr} + mov r1, #0x87 + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + bl sub_02018184 + mov r2, #0x87 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + str r5, [r4, #0x60] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02243FDC + + thumb_func_start ov6_02243FFC +ov6_02243FFC: ; 0x02243FFC + ldr r3, _02244000 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_02244000: .word sub_020181C4 + thumb_func_end ov6_02243FFC + + thumb_func_start ov6_02244004 +ov6_02244004: ; 0x02244004 + push {r3, r4, r5, lr} + ldr r4, _02244034 ; =0x022492D8 + add r5, r1, #0 +_0224400A: + ldr r1, [r5, #0] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + blx r1 + cmp r0, #1 + beq _0224400A + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _02244032 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0224402C + bl sub_020713D0 +_0224402C: + add r0, r5, #0 + bl ov6_02244C10 +_02244032: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244034: .word 0x022492D8 + thumb_func_end ov6_02244004 + + thumb_func_start ov6_02244038 +ov6_02244038: ; 0x02244038 + push {r4, lr} + add r4, r0, #0 + bl ov6_0224481C + add r0, r4, #0 + bl ov6_0224464C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_02244038 + + thumb_func_start ov6_02244050 +ov6_02244050: ; 0x02244050 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r0, #0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02244066 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, pc} +_02244066: + ldr r5, _022440B8 ; =0x02249120 + add r3, sp, #0xc + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + ldr r5, _022440BC ; =0x022491E0 + str r0, [r3, #0] + ldmia r5!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, r2, #0 + str r0, [r3, #0] + add r0, r4, #0 + bl ov6_02244CFC + mov r1, #0x79 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + add r1, sp, #0 + bl ov6_0224529C + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov6_022452BC + add r0, r4, #0 + bl ov6_0224469C + mov r0, #1 + str r0, [r4, #0x10] + ldr r1, [r4, #0] + add r1, r1, #1 + str r1, [r4, #0] + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022440B8: .word 0x02249120 +_022440BC: .word 0x022491E0 + thumb_func_end ov6_02244050 + + thumb_func_start ov6_022440C0 +ov6_022440C0: ; 0x022440C0 + push {r4, lr} + add r4, r0, #0 + bl ov6_02245FDC + mov r0, #0 + ldr r1, _022440F4 ; =0xFFFC0000 + str r0, [r4, #0x2c] + str r1, [r4, #0x54] + mov r1, #0xfe + lsl r1, r1, #0xc + str r1, [r4, #0x44] + mov r1, #0xff + lsl r1, r1, #0xc + str r1, [r4, #0x48] + mov r1, #0x5f + lsl r1, r1, #0xc + str r1, [r4, #0x4c] + mov r1, #0x61 + lsl r1, r1, #0xc + str r1, [r4, #0x50] + mov r1, #1 + str r1, [r4, #0x2c] + ldr r1, [r4, #0] + add r1, r1, #1 + str r1, [r4, #0] + pop {r4, pc} + ; .align 2, 0 +_022440F4: .word 0xFFFC0000 + thumb_func_end ov6_022440C0 + + thumb_func_start ov6_022440F8 +ov6_022440F8: ; 0x022440F8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r2, #0 + str r2, [r4, #0x2c] + ldr r1, [r4, #0x44] + ldr r0, [r4, #0x54] + add r0, r1, r0 + str r0, [r4, #0x44] + cmp r0, #0 + bgt _0224411C + mov r0, #2 + str r2, [r4, #0x44] + lsl r0, r0, #0xc + str r0, [r4, #0x54] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_0224411C: + ldr r0, [r4, #0x50] + str r0, [sp] + ldr r1, [r4, #0x44] + ldr r2, [r4, #0x4c] + ldr r3, [r4, #0x48] + add r0, r4, #0 + bl ov6_02244F80 + mov r0, #1 + str r0, [r4, #0x2c] + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022440F8 + + thumb_func_start ov6_02244138 +ov6_02244138: ; 0x02244138 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0x2c] + ldr r1, [r4, #0x4c] + ldr r0, [r4, #0x54] + sub r0, r1, r0 + str r0, [r4, #0x4c] + ldr r1, [r4, #0x50] + ldr r0, [r4, #0x54] + add r0, r1, r0 + str r0, [r4, #0x50] + mov r0, #2 + ldr r1, [r4, #0x54] + lsl r0, r0, #0xc + add r2, r1, r0 + lsl r1, r0, #4 + str r2, [r4, #0x54] + cmp r2, r1 + ble _02244166 + lsl r0, r0, #4 + str r0, [r4, #0x54] +_02244166: + mov r0, #0xe + ldr r1, [r4, #0x4c] + lsl r0, r0, #0xe + cmp r1, r0 + bge _02244172 + str r0, [r4, #0x4c] +_02244172: + mov r0, #0x22 + ldr r1, [r4, #0x50] + lsl r0, r0, #0xe + cmp r1, r0 + ble _0224417E + str r0, [r4, #0x50] +_0224417E: + ldr r0, [r4, #0x50] + str r0, [sp] + ldr r1, [r4, #0x44] + ldr r2, [r4, #0x4c] + ldr r3, [r4, #0x48] + add r0, r4, #0 + bl ov6_02244F80 + mov r0, #1 + str r0, [r4, #0x2c] + mov r0, #0xe + ldr r1, [r4, #0x4c] + lsl r0, r0, #0xe + cmp r1, r0 + bne _022441B6 + mov r0, #0x22 + ldr r1, [r4, #0x50] + lsl r0, r0, #0xe + cmp r1, r0 + bne _022441B6 + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov6_02244D34 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_022441B6: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov6_02244138 + + thumb_func_start ov6_022441BC +ov6_022441BC: ; 0x022441BC + ldr r1, [r0, #8] + add r1, r1, #1 + str r1, [r0, #8] + cmp r1, #0xf + blt _022441D4 + mov r1, #0 + str r1, [r0, #8] + ldr r1, _022441D8 ; =0xFFFC0000 + str r1, [r0, #0x58] + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] +_022441D4: + mov r0, #0 + bx lr + ; .align 2, 0 +_022441D8: .word 0xFFFC0000 + thumb_func_end ov6_022441BC + + thumb_func_start ov6_022441DC +ov6_022441DC: ; 0x022441DC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [sp] + ldr r0, [r4, #0x58] + add r1, r1, r0 + mov r0, #0xa + lsl r0, r0, #0x10 + str r1, [sp] + cmp r1, r0 + bgt _02244214 + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [sp] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02244214: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, sp, #0 + bl sub_02021C50 + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022441DC + + thumb_func_start ov6_02244228 +ov6_02244228: ; 0x02244228 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r1, [r4, #0x58] + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + ldr r0, _02244280 ; =0xFFFFE000 + str r1, [r4, #0x58] + cmp r1, r0 + ble _0224424C + str r0, [r4, #0x58] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, [r4, #0x5c] + bl sub_02077E3C +_0224424C: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r1, [sp] + ldr r0, [r4, #0x58] + add r0, r1, r0 + str r0, [sp] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_02244280: .word 0xFFFFE000 + thumb_func_end ov6_02244228 + + thumb_func_start ov6_02244284 +ov6_02244284: ; 0x02244284 + ldr r1, [r0, #8] + add r1, r1, #1 + str r1, [r0, #8] + cmp r1, #8 + blt _0224429C + mov r1, #0 + str r1, [r0, #8] + ldr r1, _022442A0 ; =0xFFFFF000 + str r1, [r0, #0x58] + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] +_0224429C: + mov r0, #0 + bx lr + ; .align 2, 0 +_022442A0: .word 0xFFFFF000 + thumb_func_end ov6_02244284 + + thumb_func_start ov6_022442A4 +ov6_022442A4: ; 0x022442A4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x58] + lsl r1, r0, #1 + ldr r0, _02244300 ; =0xFFFC0000 + str r1, [r4, #0x58] + cmp r1, r0 + bge _022442B8 + str r0, [r4, #0x58] +_022442B8: + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r1, [sp] + ldr r0, [r4, #0x58] + add r0, r1, r0 + str r0, [sp] + mov r0, #0x7a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + ldr r1, [sp] + ldr r0, _02244304 ; =0xFFFD8000 + cmp r1, r0 + bgt _022442F8 + mov r0, #1 + lsl r0, r0, #0xc + str r0, [r4, #0x54] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_022442F8: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_02244300: .word 0xFFFC0000 +_02244304: .word 0xFFFD8000 + thumb_func_end ov6_022442A4 + + thumb_func_start ov6_02244308 +ov6_02244308: ; 0x02244308 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0x2c] + ldr r1, [r4, #0x4c] + ldr r0, [r4, #0x54] + add r0, r1, r0 + str r0, [r4, #0x4c] + ldr r1, [r4, #0x50] + ldr r0, [r4, #0x54] + sub r0, r1, r0 + str r0, [r4, #0x50] + mov r0, #1 + ldr r1, [r4, #0x54] + lsl r0, r0, #0xe + add r2, r1, r0 + lsl r1, r0, #3 + str r2, [r4, #0x54] + cmp r2, r1 + ble _02244336 + lsl r0, r0, #3 + str r0, [r4, #0x54] +_02244336: + mov r0, #0x16 + ldr r1, [r4, #0x4c] + lsl r0, r0, #0xe + cmp r1, r0 + blt _02244342 + str r0, [r4, #0x4c] +_02244342: + mov r0, #0x1a + ldr r1, [r4, #0x50] + lsl r0, r0, #0xe + cmp r1, r0 + bgt _0224434E + str r0, [r4, #0x50] +_0224434E: + ldr r0, [r4, #0x50] + str r0, [sp] + ldr r1, [r4, #0x44] + ldr r2, [r4, #0x4c] + ldr r3, [r4, #0x48] + add r0, r4, #0 + bl ov6_02244F80 + mov r0, #1 + str r0, [r4, #0x2c] + mov r0, #0x16 + ldr r1, [r4, #0x4c] + lsl r0, r0, #0xe + cmp r1, r0 + bne _02244382 + mov r0, #0x1a + ldr r1, [r4, #0x50] + lsl r0, r0, #0xe + cmp r1, r0 + bne _02244382 + add r0, r4, #0 + bl ov6_02246018 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02244382: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov6_02244308 + + thumb_func_start ov6_02244388 +ov6_02244388: ; 0x02244388 + push {r4, lr} + add r4, r0, #0 + bl ov6_022448C8 + mov r0, #0 + str r0, [r4, #0x10] + ldr r1, [r4, #0] + add r1, r1, #1 + str r1, [r4, #0] + pop {r4, pc} + thumb_func_end ov6_02244388 + + thumb_func_start ov6_0224439C +ov6_0224439C: ; 0x0224439C + push {r4, lr} + add r4, r0, #0 + bl ov6_02244FB4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0224439C + + thumb_func_start ov6_022443B0 +ov6_022443B0: ; 0x022443B0 + mov r1, #1 + str r1, [r0, #4] + mov r0, #0 + bx lr + thumb_func_end ov6_022443B0 + + thumb_func_start ov6_022443B8 +ov6_022443B8: ; 0x022443B8 + push {r3, r4, r5, lr} + ldr r4, _022443E8 ; =0x02249310 + add r5, r1, #0 +_022443BE: + ldr r1, [r5, #0] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + blx r1 + cmp r0, #1 + beq _022443BE + ldr r0, [r5, #0x10] + cmp r0, #1 + bne _022443E6 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _022443E0 + bl sub_020713D0 +_022443E0: + add r0, r5, #0 + bl ov6_02244C10 +_022443E6: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022443E8: .word 0x02249310 + thumb_func_end ov6_022443B8 + + thumb_func_start ov6_022443EC +ov6_022443EC: ; 0x022443EC + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r0, #0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02244402 + add sp, #0x18 + mov r0, #0 + pop {r3, r4, r5, pc} +_02244402: + ldr r5, _02244454 ; =0x022491D4 + add r3, sp, #0xc + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + ldr r5, _02244458 ; =0x0224912C + str r0, [r3, #0] + ldmia r5!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, r2, #0 + str r0, [r3, #0] + add r0, r4, #0 + bl ov6_02244CFC + mov r1, #0x79 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + add r1, sp, #0 + bl ov6_0224529C + mov r1, #0x7a + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + mov r1, #1 + bl ov6_022452BC + add r0, r4, #0 + bl ov6_0224469C + mov r0, #1 + str r0, [r4, #0x10] + ldr r1, [r4, #0] + add r1, r1, #1 + str r1, [r4, #0] + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244454: .word 0x022491D4 +_02244458: .word 0x0224912C + thumb_func_end ov6_022443EC + + thumb_func_start ov6_0224445C +ov6_0224445C: ; 0x0224445C + push {r4, lr} + add r4, r0, #0 + bl ov6_022451B8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0224445C + + thumb_func_start ov6_02244470 +ov6_02244470: ; 0x02244470 + push {r4, lr} + add r4, r0, #0 + bl ov6_02244DB4 + add r0, r4, #0 + bl ov6_02244674 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_02244470 + + thumb_func_start ov6_02244488 +ov6_02244488: ; 0x02244488 + push {r4, lr} + mov r1, #0x82 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + bne _0224449A + mov r0, #0 + pop {r4, pc} +_0224449A: + bl ov6_0224469C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov6_02244488 + + thumb_func_start ov6_022444A8 +ov6_022444A8: ; 0x022444A8 + push {r4, lr} + add r4, r0, #0 + bl ov6_0224543C + add r0, r4, #0 + bl ov6_0224551C + add r0, r4, #0 + bl ov6_02244F74 + add r0, r4, #0 + mov r1, #1 + bl ov6_02245F64 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022444A8 + + thumb_func_start ov6_022444D0 +ov6_022444D0: ; 0x022444D0 + push {r4, lr} + add r4, r0, #0 + bl ov6_02245470 + cmp r0, #2 + beq _022444E0 + mov r0, #0 + pop {r4, pc} +_022444E0: + mov r0, #0x79 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022444D0 + + thumb_func_start ov6_022444F8 +ov6_022444F8: ; 0x022444F8 + push {r3, lr} + ldr r1, [r0, #8] + add r1, r1, #1 + str r1, [r0, #8] + cmp r1, #0x14 + blt _02244512 + mov r1, #0 + str r1, [r0, #8] + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] + bl ov6_022456D4 +_02244512: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_022444F8 + + thumb_func_start ov6_02244518 +ov6_02244518: ; 0x02244518 + push {r4, lr} + add r4, r0, #0 + bl ov6_02245470 + cmp r0, #3 + beq _02244528 + mov r0, #0 + pop {r4, pc} +_02244528: + ldr r0, _02244544 ; =0x00000649 + bl sub_02005748 + mov r0, #2 + lsl r0, r0, #0xa + str r0, [r4, #0x54] + mov r0, #2 + str r0, [r4, #0x14] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} + nop +_02244544: .word 0x00000649 + thumb_func_end ov6_02244518 + + thumb_func_start ov6_02244548 +ov6_02244548: ; 0x02244548 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0x2c] + ldr r1, [r4, #0x4c] + ldr r0, [r4, #0x54] + add r0, r1, r0 + str r0, [r4, #0x4c] + ldr r1, [r4, #0x50] + ldr r0, [r4, #0x54] + sub r0, r1, r0 + str r0, [r4, #0x50] + mov r0, #2 + ldr r1, [r4, #0x54] + lsl r0, r0, #0xa + add r2, r1, r0 + lsl r1, r0, #5 + str r2, [r4, #0x54] + cmp r2, r1 + ble _02244576 + lsl r0, r0, #5 + str r0, [r4, #0x54] +_02244576: + mov r0, #0x5f + ldr r1, [r4, #0x4c] + lsl r0, r0, #0xc + cmp r1, r0 + blt _02244582 + str r0, [r4, #0x4c] +_02244582: + mov r0, #0x61 + ldr r1, [r4, #0x50] + lsl r0, r0, #0xc + cmp r1, r0 + bgt _0224458E + str r0, [r4, #0x50] +_0224458E: + ldr r0, [r4, #0x50] + str r0, [sp] + ldr r1, [r4, #0x44] + ldr r2, [r4, #0x4c] + ldr r3, [r4, #0x48] + add r0, r4, #0 + bl ov6_02244F80 + mov r0, #1 + str r0, [r4, #0x2c] + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _022445BA + add r0, r4, #0 + bl ov6_02245470 + cmp r0, #4 + bne _022445BA + mov r0, #1 + str r0, [r4, #0x18] + bl ov6_02243F50 +_022445BA: + mov r0, #0x5f + ldr r1, [r4, #0x4c] + lsl r0, r0, #0xc + cmp r1, r0 + bne _022445E6 + mov r0, #0x61 + ldr r1, [r4, #0x50] + lsl r0, r0, #0xc + cmp r1, r0 + bne _022445E6 + ldr r0, [r4, #0x60] + ldr r0, [r0, #8] + bl ov6_02244F20 + mov r0, #1 + str r0, [r4, #0x14] + add r0, r4, #0 + bl ov6_02244F58 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_022445E6: + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov6_02244548 + + thumb_func_start ov6_022445EC +ov6_022445EC: ; 0x022445EC + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x18] + cmp r1, #0 + bne _02244606 + bl ov6_02245470 + cmp r0, #4 + bne _02244606 + mov r0, #1 + str r0, [r4, #0x18] + bl ov6_02243F50 +_02244606: + add r0, r4, #0 + bl ov6_02245470 + cmp r0, #2 + beq _02244614 + mov r0, #0 + pop {r4, pc} +_02244614: + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _02244622 + mov r0, #1 + str r0, [r4, #0x18] + bl ov6_02243F50 +_02244622: + add r0, r4, #0 + bl ov6_02245480 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022445EC + + thumb_func_start ov6_02244634 +ov6_02244634: ; 0x02244634 + push {r4, lr} + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _02244646 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] +_02244646: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02244634 + + thumb_func_start ov6_0224464C +ov6_0224464C: ; 0x0224464C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x81 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02244670 ; =ov6_022446B8 + add r1, r4, #0 + mov r2, #0x80 + bl sub_0200DA04 + mov r1, #0x85 + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r4, pc} + nop +_02244670: .word ov6_022446B8 + thumb_func_end ov6_0224464C + + thumb_func_start ov6_02244674 +ov6_02244674: ; 0x02244674 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x81 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] + ldr r0, _02244698 ; =ov6_022447B4 + add r1, r4, #0 + mov r2, #0x80 + bl sub_0200DA04 + mov r1, #0x85 + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r4, pc} + nop +_02244698: .word ov6_022447B4 + thumb_func_end ov6_02244674 + + thumb_func_start ov6_0224469C +ov6_0224469C: ; 0x0224469C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _022446B6 + bl sub_0200DA58 + mov r0, #0x85 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_022446B6: + pop {r4, pc} + thumb_func_end ov6_0224469C + + thumb_func_start ov6_022446B8 +ov6_022446B8: ; 0x022446B8 + push {r3, r4, r5, r6, r7, lr} + mov r0, #0x81 + add r6, r1, #0 + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r0, #0 + bne _0224472E + mov r7, #0x6b + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_022446CE: + ldr r0, [r5, r7] + cmp r0, #0 + beq _022446D8 + bl sub_0200A3DC +_022446D8: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022446CE + mov r7, #0x6f + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_022446E8: + ldr r0, [r4, r7] + cmp r0, #0 + beq _022446F2 + bl sub_0200A640 +_022446F2: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #3 + blt _022446E8 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r1, [r6, r0] + cmp r1, #0 + beq _0224470A + add r0, r6, #0 + bl ov6_02245118 +_0224470A: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r1, [r6, r0] + cmp r1, #0 + beq _0224471A + add r0, r6, #0 + bl ov6_02245170 +_0224471A: + mov r0, #0x81 + lsl r0, r0, #2 + ldr r1, [r6, r0] + mov r2, #0x80 + add r1, r1, #1 + str r1, [r6, r0] + ldr r0, _02244730 ; =ov6_02244734 + add r1, r6, #0 + bl sub_0200DA3C +_0224472E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244730: .word ov6_02244734 + thumb_func_end ov6_022446B8 + + thumb_func_start ov6_02244734 +ov6_02244734: ; 0x02244734 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + mov r0, #0x81 + add r6, r1, #0 + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r0, #1 + bne _022447B2 + mov r7, #0x6b + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_0224474C: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02244756 + bl sub_02009D4C +_02244756: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0224474C + mov r7, #0x6f + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_02244766: + ldr r0, [r4, r7] + cmp r0, #0 + beq _02244770 + bl sub_02009D4C +_02244770: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #3 + blt _02244766 + mov r0, #0x83 + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r0, #0 + beq _0224478E + bl sub_020181C4 + mov r0, #0x83 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r6, r0] +_0224478E: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r6, r0] + cmp r0, #0 + beq _022447A4 + bl sub_020181C4 + mov r0, #0x21 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r6, r0] +_022447A4: + mov r0, #0x82 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r6, r0] + ldr r0, [sp] + bl sub_0200DA58 +_022447B2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02244734 + + thumb_func_start ov6_022447B4 +ov6_022447B4: ; 0x022447B4 + push {r4, lr} + mov r0, #0x67 + add r4, r1, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02009DC8 + mov r1, #0x81 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + bne _022447E6 + bl sub_0200A3DC + ldr r0, _022447E8 ; =ov6_022447EC + add r1, r4, #0 + mov r2, #0x80 + bl sub_0200DA3C + mov r0, #0x81 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_022447E6: + pop {r4, pc} + ; .align 2, 0 +_022447E8: .word ov6_022447EC + thumb_func_end ov6_022447B4 + + thumb_func_start ov6_022447EC +ov6_022447EC: ; 0x022447EC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x67 + add r4, r1, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02009DC8 + mov r1, #0x81 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #1 + bne _0224481A + bl sub_02009D4C + mov r0, #0x82 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + add r0, r5, #0 + bl sub_0200DA58 +_0224481A: + pop {r3, r4, r5, pc} + thumb_func_end ov6_022447EC + + thumb_func_start ov6_0224481C +ov6_0224481C: ; 0x0224481C + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov6_0224491C + mov r2, #3 + mov r3, #1 + add r4, r0, #0 + lsl r2, r2, #0x12 + add r0, r5, #0 + mov r1, #0 + lsl r3, r3, #0xc + str r2, [sp] + bl ov6_02244F80 + add r0, r5, #0 + bl ov6_02244F2C + ldr r0, [r5, #0x60] + mov r1, #0 + ldr r0, [r0, #8] + bl sub_0201A008 + strh r0, [r5, #0x24] + ldr r0, [r5, #0x60] + mov r1, #3 + ldr r0, [r0, #8] + bl sub_0201A008 + strh r0, [r5, #0x26] + ldr r2, _022448C4 ; =0x0400000A + mov r1, #3 + ldrh r3, [r2] + mov r0, #1 + bic r3, r1 + orr r0, r3 + strh r0, [r2] + ldrh r0, [r2, #4] + bic r0, r1 + strh r0, [r2, #4] + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + add r2, r5, #0 + add r0, r4, #0 + mov r1, #2 + add r2, #0x6c + bl ov6_02244E54 + ldr r0, [r5, #0x60] + add r3, r5, #0 + ldr r0, [r0, #8] + add r1, r4, #0 + mov r2, #0 + add r3, #0x68 + bl ov6_02244E7C + ldr r0, [r5, #0x60] + add r3, r5, #0 + ldr r0, [r0, #8] + add r1, r4, #0 + mov r2, #1 + add r3, #0x64 + bl ov6_02244EB4 + add r0, r5, #0 + add r1, r4, #0 + bl ov6_02244928 + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #4 + mov r1, #0x20 + bl sub_020711EC + mov r1, #0x1e + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022448C4: .word 0x0400000A + thumb_func_end ov6_0224481C + + thumb_func_start ov6_022448C8 +ov6_022448C8: ; 0x022448C8 + push {r4, lr} + add r4, r0, #0 + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0207121C + ldr r0, [r4, #0x60] + ldr r0, [r0, #8] + bl ov6_02244F20 + add r0, r4, #0 + bl ov6_02244B6C + ldr r2, _02244918 ; =0x04000008 + ldrh r1, [r4, #0x24] + ldrh r3, [r2] + mov r0, #3 + bic r3, r0 + orr r1, r3 + strh r1, [r2] + ldrh r1, [r2, #6] + bic r1, r0 + ldrh r0, [r4, #0x26] + orr r0, r1 + strh r0, [r2, #6] + mov r0, #0 + mov r1, #1 + bl sub_0205D8CC + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + pop {r4, pc} + nop +_02244918: .word 0x04000008 + thumb_func_end ov6_022448C8 + + thumb_func_start ov6_0224491C +ov6_0224491C: ; 0x0224491C + ldr r3, _02244924 ; =sub_02006C24 + mov r0, #0x61 + mov r1, #4 + bx r3 + ; .align 2, 0 +_02244924: .word sub_02006C24 + thumb_func_end ov6_0224491C + + thumb_func_start ov6_02244928 +ov6_02244928: ; 0x02244928 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r1, #0 + mov r1, #0x7d + add r5, r0, #0 + lsl r1, r1, #2 + add r1, r5, r1 + bl ov6_0224508C + add r1, r5, #0 + mov r0, #0x20 + add r1, #0x74 + mov r2, #4 + bl sub_020095C4 + str r0, [r5, #0x70] + add r0, r5, #0 + mov r2, #2 + add r0, #0x74 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + mov r0, #4 + mov r1, #0 + add r2, r0, #0 + bl sub_02009714 + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #3 + mov r1, #1 + mov r2, #4 + bl sub_02009714 + mov r1, #0x1a + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #4 + mov r1, #2 + add r2, r0, #0 + bl sub_02009714 + mov r1, #0x69 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #2 + mov r1, #3 + mov r2, #4 + bl sub_02009714 + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #4 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0xa + mov r3, #0 + bl sub_02009A4C + mov r1, #0x6b + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _022449D6 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x10 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0xd + mov r3, #0 + bl sub_02009A4C + b _022449F0 +_022449D6: + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x10 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0x10 + mov r3, #0 + bl sub_02009A4C +_022449F0: + mov r1, #0x1b + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r5, #0 + add r1, r4, #0 + bl ov6_022450F4 + mov r1, #0x6d + lsl r1, r1, #2 + str r0, [r5, r1] + mov r6, #0 + str r6, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #4 + sub r1, #0x14 + str r0, [sp, #0xc] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #3 + add r3, r6, #0 + bl sub_02009B04 + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, #0xc] + add r6, r6, #1 + cmp r0, #0 + beq _02244A52 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #4 + str r2, [sp, #0xc] + sub r1, #0x1c + ldr r0, [r5, r1] + add r1, r4, #0 + mov r3, #0 + bl sub_02009B04 + lsl r1, r6, #2 + add r2, r5, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r2, r1] + add r6, r6, #1 +_02244A52: + add r0, r5, #0 + add r1, r4, #0 + bl ov6_0224514C + lsl r1, r6, #2 + add r2, r5, r1 + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r2, r1] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x18 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0xb + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x72 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _02244AA4 + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x24 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0xe + mov r3, #0 + bl sub_02009BC4 + b _02244ABC +_02244AA4: + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x24 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0x11 + mov r3, #0 + bl sub_02009BC4 +_02244ABC: + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #3 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + mov r2, #6 + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x1d + lsl r1, r1, #4 + str r0, [r5, r1] + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x28 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0xc + bl sub_02009BC4 + mov r1, #0x76 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _02244B24 + mov r0, #1 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x30 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0xf + mov r3, #0 + bl sub_02009BC4 + b _02244B3E +_02244B24: + mov r0, #1 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #4 + sub r1, #0x30 + str r0, [sp, #8] + ldr r0, [r5, r1] + add r1, r4, #0 + mov r2, #0x12 + mov r3, #0 + bl sub_02009BC4 +_02244B3E: + mov r1, #0x77 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r1, #0x7d + lsl r1, r1, #2 + ldr r0, [r5, #0x5c] + add r1, r5, r1 + mov r2, #4 + bl ov6_0224509C + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r5, r1] + sub r1, #0x18 + add r0, r5, r1 + mov r1, #4 + bl ov6_022450E4 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r5, r1] + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02244928 + + thumb_func_start ov6_02244B6C +ov6_02244B6C: ; 0x02244B6C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r7, #0x6b + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_02244B78: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02244B82 + bl sub_0200A4E4 +_02244B82: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _02244B78 + mov r7, #0x6f + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_02244B92: + ldr r0, [r4, r7] + cmp r0, #0 + beq _02244B9C + bl sub_0200A6DC +_02244B9C: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #3 + blt _02244B92 + mov r7, #0x72 + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_02244BAC: + ldr r0, [r4, r7] + cmp r0, #0 + beq _02244BB6 + bl sub_02009D4C +_02244BB6: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #4 + blt _02244BAC + mov r7, #0x76 + mov r5, #0 + add r4, r6, #0 + lsl r7, r7, #2 +_02244BC6: + ldr r0, [r4, r7] + cmp r0, #0 + beq _02244BD0 + bl sub_02009D4C +_02244BD0: + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #2 + blt _02244BC6 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_02009754 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r6, r0] + bl sub_02009754 + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_02009754 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_02009754 + ldr r0, [r6, #0x70] + bl sub_020219C0 + ldr r0, [r6, #0x70] + bl sub_02021964 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02244B6C + + thumb_func_start ov6_02244C10 +ov6_02244C10: ; 0x02244C10 + push {r3, lr} + ldr r0, [r0, #0x70] + cmp r0, #0 + beq _02244C1C + bl sub_020219F8 +_02244C1C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02244C10 + + thumb_func_start ov6_02244C20 +ov6_02244C20: ; 0x02244C20 + push {r4, r5, r6, lr} + sub sp, #0x70 + add r5, r0, #0 + ldr r0, [sp, #0x84] + add r4, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + cmp r0, #4 + bne _02244C68 + mov r0, #0 + mvn r0, r0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + mov r6, #0x67 + ldr r3, [sp, #0x88] + str r0, [sp, #0xc] + lsl r6, r6, #2 + str r3, [sp, #0x10] + ldr r3, [r5, r6] + str r3, [sp, #0x14] + add r3, r6, #4 + ldr r3, [r5, r3] + add r6, #8 + str r3, [sp, #0x18] + ldr r3, [r5, r6] + str r3, [sp, #0x1c] + str r0, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r3, [sp, #0x80] + add r0, sp, #0x4c + bl sub_020093B4 + b _02244CA2 +_02244C68: + str r0, [sp] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r3, #0 + ldr r0, [sp, #0x88] + str r3, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r6, [r5, r0] + str r6, [sp, #0x14] + add r6, r0, #4 + ldr r6, [r5, r6] + str r6, [sp, #0x18] + add r6, r0, #0 + add r6, #8 + ldr r6, [r5, r6] + add r0, #0xc + str r6, [sp, #0x1c] + ldr r0, [r5, r0] + str r0, [sp, #0x20] + str r3, [sp, #0x24] + str r3, [sp, #0x28] + ldr r3, [sp, #0x80] + add r0, sp, #0x4c + bl sub_020093B4 +_02244CA2: + ldr r0, [r5, #0x70] + add r2, sp, #0x34 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + ldmia r4!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r2, #0] + ldr r0, [sp, #0x8c] + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x44] + mov r0, #4 + str r0, [sp, #0x48] + add r0, sp, #0x2c + bl sub_02021B90 + add r4, r0, #0 + bne _02244CCE + bl sub_02022974 +_02244CCE: + add r0, r4, #0 + add sp, #0x70 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02244C20 + + thumb_func_start ov6_02244CD4 +ov6_02244CD4: ; 0x02244CD4 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r5, #1 + add r4, r3, #0 + str r5, [sp] + mov r3, #0 + str r3, [sp, #4] + str r3, [sp, #8] + str r2, [sp, #0xc] + add r2, r5, #0 + bl ov6_02244C20 + add r1, r4, #0 + add r5, r0, #0 + bl sub_02021D6C + add r0, r5, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02244CD4 + + thumb_func_start ov6_02244CFC +ov6_02244CFC: ; 0x02244CFC + push {r4, lr} + sub sp, #0x10 + ldr r2, [r0, #0xc] + mov r3, #0 + cmp r2, #1 + bne _02244D0A + mov r3, #1 +_02244D0A: + mov r2, #2 + str r2, [sp] + mov r4, #1 + str r4, [sp, #4] + mov r4, #0 + str r4, [sp, #8] + mov r4, #0x83 + str r4, [sp, #0xc] + bl ov6_02244C20 + add r4, r0, #0 + mov r1, #0 + bl sub_02021CAC + add r0, r4, #0 + mov r1, #6 + bl sub_02021D6C + add r0, r4, #0 + add sp, #0x10 + pop {r4, pc} + thumb_func_end ov6_02244CFC + + thumb_func_start ov6_02244D34 +ov6_02244D34: ; 0x02244D34 + push {r4, lr} + mov r1, #1 + add r4, r0, #0 + bl sub_02021CC8 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02244D34 + + thumb_func_start ov6_02244D4C +ov6_02244D4C: ; 0x02244D4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r4, r0, #0 + add r0, sp, #0x1c + mov r7, #0 + str r7, [r0, #0] + str r7, [r0, #4] + add r6, r2, #0 + ldr r5, _02244DB0 ; =0x02249168 + add r3, r1, #0 + str r7, [r0, #8] + ldmia r5!, {r0, r1} + add r2, sp, #0x10 + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + add r1, r3, #0 + str r0, [r2, #0] + str r7, [sp] + sub r0, r7, #1 + str r0, [sp, #4] + str r7, [sp, #8] + add r0, r4, #0 + add r2, r7, #0 + add r3, r7, #0 + str r6, [sp, #0xc] + bl ov6_02244C20 + add r4, r0, #0 + mov r1, #2 + bl sub_02021CF8 + add r0, r4, #0 + add r1, sp, #0x1c + bl sub_02021C60 + add r0, r4, #0 + add r1, sp, #0x10 + bl sub_02021C70 + add r0, r7, #0 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + add r0, r4, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_02244DB0: .word 0x02249168 + thumb_func_end ov6_02244D4C + + thumb_func_start ov6_02244DB4 +ov6_02244DB4: ; 0x02244DB4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov6_0224491C + add r6, r0, #0 + mov r0, #0x6b + mov r5, #0 + add r2, r4, #0 + lsl r0, r0, #2 +_02244DC8: + ldr r1, [r2, r0] + cmp r1, #0 + bne _02244DF4 + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r6, #0 + mov r2, #7 + bl sub_02009A4C + lsl r1, r5, #2 + add r2, r4, r1 + mov r1, #0x6b + lsl r1, r1, #2 + str r0, [r2, r1] + b _02244DFC +_02244DF4: + add r5, r5, #1 + add r2, r2, #4 + cmp r5, #4 + blt _02244DC8 +_02244DFC: + cmp r5, #4 + blt _02244E04 + bl sub_02022974 +_02244E04: + mov r0, #0x72 + mov r5, #0 + add r2, r4, #0 + lsl r0, r0, #2 +_02244E0C: + ldr r1, [r2, r0] + cmp r1, #0 + bne _02244E38 + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r6, #0 + mov r2, #8 + bl sub_02009BC4 + lsl r1, r5, #2 + add r2, r4, r1 + mov r1, #0x72 + lsl r1, r1, #2 + str r0, [r2, r1] + b _02244E40 +_02244E38: + add r5, r5, #1 + add r2, r2, #4 + cmp r5, #4 + blt _02244E0C +_02244E40: + cmp r5, #4 + blt _02244E48 + bl sub_02022974 +_02244E48: + add r0, r6, #0 + bl sub_02006CA8 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02244DB4 + + thumb_func_start ov6_02244E54 +ov6_02244E54: ; 0x02244E54 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r2, #4 + bl sub_02006CB8 + add r1, r5, #0 + add r4, r0, #0 + bl sub_020A71B0 + ldr r1, [r5, #0] + mov r0, #3 + ldr r1, [r1, #0xc] + mov r2, #0x20 + lsl r3, r0, #7 + bl sub_0201972C + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02244E54 + + thumb_func_start ov6_02244E7C +ov6_02244E7C: ; 0x02244E7C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + add r4, r3, #0 + mov r2, #4 + bl sub_02006CB8 + add r1, r4, #0 + add r6, r0, #0 + bl sub_020A7118 + ldr r3, [r4, #0] + mov r0, #0 + str r0, [sp] + ldr r2, [r3, #0x14] + ldr r3, [r3, #0x10] + add r0, r5, #0 + mov r1, #3 + bl sub_0201958C + add r0, r6, #0 + bl sub_020181C4 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02244E7C + + thumb_func_start ov6_02244EB4 +ov6_02244EB4: ; 0x02244EB4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r2, #0 + add r6, r1, #0 + mov r2, #0 + add r4, r3, #0 + mov r1, #3 + add r3, r2, #0 + add r5, r0, #0 + bl sub_02019184 + mov r1, #3 + add r0, r5, #0 + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + add r0, r6, #0 + add r1, r7, #0 + mov r2, #4 + bl sub_02006CB8 + add r1, r4, #0 + add r6, r0, #0 + bl sub_020A7248 + ldr r3, [r4, #0] + add r0, r5, #0 + add r2, r3, #0 + ldr r3, [r3, #8] + mov r1, #3 + add r2, #0xc + bl sub_02019574 + mov r0, #0x20 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0xc + mov r2, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r1, #3 + add r3, r2, #0 + bl sub_02019E2C + add r0, r5, #0 + mov r1, #3 + bl sub_02019448 + add r0, r6, #0 + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02244EB4 + + thumb_func_start ov6_02244F20 +ov6_02244F20: ; 0x02244F20 + ldr r3, _02244F28 ; =sub_02019EBC + mov r1, #3 + bx r3 + nop +_02244F28: .word sub_02019EBC + thumb_func_end ov6_02244F20 + + thumb_func_start ov6_02244F2C +ov6_02244F2C: ; 0x02244F2C + push {r4, lr} + add r4, r0, #0 + bl ov6_02244F8C + mov r0, #0 + str r0, [r4, #0x2c] + add r0, r4, #0 + bl ov6_02244F58 + add r0, r4, #0 + bl ov6_02244F60 + add r0, r4, #0 + bl ov6_02244F50 + mov r0, #1 + str r0, [r4, #0x2c] + pop {r4, pc} + thumb_func_end ov6_02244F2C + + thumb_func_start ov6_02244F50 +ov6_02244F50: ; 0x02244F50 + mov r1, #1 + str r1, [r0, #0x30] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02244F50 + + thumb_func_start ov6_02244F58 +ov6_02244F58: ; 0x02244F58 + mov r1, #0 + str r1, [r0, #0x30] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02244F58 + + thumb_func_start ov6_02244F60 +ov6_02244F60: ; 0x02244F60 + mov r1, #0x18 + str r1, [r0, #0x34] + mov r1, #0 + str r1, [r0, #0x38] + mov r1, #0x17 + str r1, [r0, #0x3c] + mov r1, #1 + str r1, [r0, #0x40] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02244F60 + + thumb_func_start ov6_02244F74 +ov6_02244F74: ; 0x02244F74 + mov r1, #0x17 + str r1, [r0, #0x3c] + mov r1, #1 + str r1, [r0, #0x40] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02244F74 + + thumb_func_start ov6_02244F80 +ov6_02244F80: ; 0x02244F80 + str r1, [r0, #0x44] + str r3, [r0, #0x48] + ldr r1, [sp] + str r2, [r0, #0x4c] + str r1, [r0, #0x50] + bx lr + thumb_func_end ov6_02244F80 + + thumb_func_start ov6_02244F8C +ov6_02244F8C: ; 0x02244F8C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02244F9E + bl sub_02022974 +_02244F9E: + ldr r0, _02244FB0 ; =ov6_02244FE4 + add r1, r4, #0 + mov r2, #0x81 + bl sub_0200DA04 + mov r1, #0x86 + lsl r1, r1, #2 + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 +_02244FB0: .word ov6_02244FE4 + thumb_func_end ov6_02244F8C + + thumb_func_start ov6_02244FB4 +ov6_02244FB4: ; 0x02244FB4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + bne _02244FC6 + bl sub_02022974 +_02244FC6: + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200DA58 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02244FE0 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + pop {r4, pc} + nop +_02244FE0: .word 0xFFFF1FFF + thumb_func_end ov6_02244FB4 + + thumb_func_start ov6_02244FE4 +ov6_02244FE4: ; 0x02244FE4 + push {r3, r4, r5, r6} + ldr r0, [r1, #0x2c] + cmp r0, #0 + beq _0224507A + mov r3, #1 + lsl r3, r3, #0x1a + ldr r2, [r3, #0] + ldr r0, _02245080 ; =0xFFFF1FFF + and r2, r0 + ldr r0, [r1, #0x30] + lsl r0, r0, #0xd + orr r0, r2 + str r0, [r3, #0] + add r3, #0x48 + ldrh r2, [r3] + mov r0, #0x3f + bic r2, r0 + ldr r0, [r1, #0x34] + orr r2, r0 + ldr r0, [r1, #0x38] + cmp r0, #0 + beq _02245014 + mov r0, #0x20 + orr r2, r0 +_02245014: + ldr r0, _02245084 ; =0x04000048 + strh r2, [r0] + ldrh r2, [r0, #2] + mov r0, #0x3f + bic r2, r0 + ldr r0, [r1, #0x3c] + orr r2, r0 + ldr r0, [r1, #0x40] + cmp r0, #0 + beq _0224502C + mov r0, #0x20 + orr r2, r0 +_0224502C: + ldr r5, _02245088 ; =0x0400004A + strh r2, [r5] + ldr r2, [r1, #0x50] + ldr r6, [r1, #0x48] + asr r0, r2, #0xb + lsr r0, r0, #0x14 + add r0, r2, r0 + ldr r2, [r1, #0x4c] + asr r4, r0, #0xc + asr r0, r2, #0xb + lsr r0, r0, #0x14 + add r0, r2, r0 + ldr r2, [r1, #0x44] + asr r3, r0, #0xc + asr r0, r2, #0xb + lsr r0, r0, #0x14 + asr r1, r6, #0xb + add r0, r2, r0 + lsr r1, r1, #0x14 + asr r0, r0, #0xc + add r1, r6, r1 + lsl r2, r0, #8 + mov r0, #0xff + asr r1, r1, #0xc + lsl r0, r0, #8 + lsl r1, r1, #0x18 + and r2, r0 + lsr r1, r1, #0x18 + orr r2, r1 + add r1, r5, #0 + sub r1, #0xa + strh r2, [r1] + lsl r1, r3, #8 + and r1, r0 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + orr r1, r0 + sub r0, r5, #6 + strh r1, [r0] +_0224507A: + pop {r3, r4, r5, r6} + bx lr + nop +_02245080: .word 0xFFFF1FFF +_02245084: .word 0x04000048 +_02245088: .word 0x0400004A + thumb_func_end ov6_02244FE4 + + thumb_func_start ov6_0224508C +ov6_0224508C: ; 0x0224508C + ldr r3, _02245098 ; =sub_02075EF4 + add r2, r0, #0 + add r0, r1, #0 + ldr r1, [r2, #0x5c] + mov r2, #2 + bx r3 + ; .align 2, 0 +_02245098: .word sub_02075EF4 + thumb_func_end ov6_0224508C + + thumb_func_start ov6_0224509C +ov6_0224509C: ; 0x0224509C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + mov r1, #0x32 + add r6, r0, #0 + mov r0, #4 + lsl r1, r1, #6 + add r7, r2, #0 + bl sub_02018144 + add r4, r0, #0 + bne _022450B8 + bl sub_02022974 +_022450B8: + mov r1, #0 + add r0, r6, #0 + add r2, r1, #0 + bl sub_02074470 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldrh r0, [r5, #6] + add r2, r7, #0 + add r3, r4, #0 + str r0, [sp, #0xc] + ldrh r0, [r5] + ldrh r1, [r5, #2] + bl sub_02013750 + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_0224509C + + thumb_func_start ov6_022450E4 +ov6_022450E4: ; 0x022450E4 + add r3, r0, #0 + add r2, r1, #0 + ldrh r0, [r3] + ldrh r1, [r3, #4] + ldr r3, _022450F0 ; =sub_02013660 + bx r3 + ; .align 2, 0 +_022450F0: .word sub_02013660 + thumb_func_end ov6_022450E4 + + thumb_func_start ov6_022450F4 +ov6_022450F4: ; 0x022450F4 + push {lr} + sub sp, #0xc + mov r2, #3 + str r2, [sp] + mov r2, #1 + str r2, [sp, #4] + mov r2, #4 + str r2, [sp, #8] + mov r2, #0x67 + lsl r2, r2, #2 + ldr r0, [r0, r2] + mov r2, #5 + mov r3, #0 + bl sub_02009A4C + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov6_022450F4 + + thumb_func_start ov6_02245118 +ov6_02245118: ; 0x02245118 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x67 + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #3 + bl sub_02009DC8 + bl sub_0200A534 + mov r1, #1 + bl sub_020A81B0 + mov r1, #0x32 + add r5, r0, #0 + add r0, r4, #0 + lsl r1, r1, #6 + bl sub_020C2C54 + mov r2, #0x32 + add r0, r4, #0 + add r1, r5, #0 + lsl r2, r2, #6 + bl sub_020C02BC + pop {r3, r4, r5, pc} + thumb_func_end ov6_02245118 + + thumb_func_start ov6_0224514C +ov6_0224514C: ; 0x0224514C + push {r3, lr} + sub sp, #0x10 + mov r2, #2 + str r2, [sp] + mov r2, #1 + str r2, [sp, #4] + str r2, [sp, #8] + mov r2, #4 + str r2, [sp, #0xc] + mov r2, #0x1a + lsl r2, r2, #4 + ldr r0, [r0, r2] + mov r2, #3 + mov r3, #0 + bl sub_02009B04 + add sp, #0x10 + pop {r3, pc} + thumb_func_end ov6_0224514C + + thumb_func_start ov6_02245170 +ov6_02245170: ; 0x02245170 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_02009DC8 + bl sub_0200A534 + add r6, r0, #0 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02009DC8 + add r1, r6, #0 + bl sub_0200A72C + mov r1, #1 + bl sub_020A81FC + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0x20 + bl sub_020C2C54 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0x20 + bl sub_020C0160 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02245170 + + thumb_func_start ov6_022451B8 +ov6_022451B8: ; 0x022451B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_02009DC8 + add r4, r0, #0 + bl sub_0200A4E4 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02009D68 + mov r1, #0x6b + mov r0, #0 + add r3, r5, #0 + lsl r1, r1, #2 +_022451E2: + ldr r2, [r3, r1] + cmp r2, r4 + bne _022451F6 + lsl r1, r0, #2 + add r2, r5, r1 + mov r1, #0x6b + mov r3, #0 + lsl r1, r1, #2 + str r3, [r2, r1] + b _022451FE +_022451F6: + add r0, r0, #1 + add r3, r3, #4 + cmp r0, #4 + blt _022451E2 +_022451FE: + cmp r0, #4 + blt _02245206 + bl sub_02022974 +_02245206: + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #2 + bl sub_02009DC8 + add r4, r0, #0 + bl sub_0200A6DC + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02009D68 + mov r1, #0x6f + mov r0, #0 + add r3, r5, #0 + lsl r1, r1, #2 +_0224522C: + ldr r2, [r3, r1] + cmp r2, r4 + bne _02245240 + lsl r1, r0, #2 + add r2, r5, r1 + mov r1, #0x6f + mov r3, #0 + lsl r1, r1, #2 + str r3, [r2, r1] + b _02245248 +_02245240: + add r0, r0, #1 + add r3, r3, #4 + cmp r0, #3 + blt _0224522C +_02245248: + cmp r0, #3 + blt _02245250 + bl sub_02022974 +_02245250: + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #3 + bl sub_02009DC8 + add r4, r0, #0 + bl sub_02009D4C + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02009D68 + mov r1, #0x72 + mov r0, #0 + add r3, r5, #0 + lsl r1, r1, #2 +_02245276: + ldr r2, [r3, r1] + cmp r2, r4 + bne _0224528A + lsl r1, r0, #2 + add r2, r5, r1 + mov r1, #0x72 + mov r3, #0 + lsl r1, r1, #2 + str r3, [r2, r1] + b _02245292 +_0224528A: + add r0, r0, #1 + add r3, r3, #4 + cmp r0, #4 + blt _02245276 +_02245292: + cmp r0, #4 + blt _0224529A + bl sub_02022974 +_0224529A: + pop {r3, r4, r5, pc} + thumb_func_end ov6_022451B8 + + thumb_func_start ov6_0224529C +ov6_0224529C: ; 0x0224529C + push {r3, lr} + sub sp, #0x10 + mov r2, #3 + str r2, [sp] + sub r3, r2, #4 + str r3, [sp, #4] + mov r3, #0 + str r3, [sp, #8] + mov r3, #0x81 + str r3, [sp, #0xc] + mov r3, #2 + bl ov6_02244C20 + add sp, #0x10 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_0224529C + + thumb_func_start ov6_022452BC +ov6_022452BC: ; 0x022452BC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + mov r0, #2 + ldr r4, _02245324 ; =0x0224936C + add r6, r1, #0 + str r0, [r5, #0x14] + mov r7, #0 +_022452CC: + ldr r0, [r4, #0] + add r1, sp, #0x1c + str r0, [sp, #0x1c] + ldr r0, [r4, #4] + add r2, sp, #0x10 + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x24] + ldr r0, [r4, #8] + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + str r0, [sp, #0x18] + ldr r0, [r4, #0xc] + str r0, [sp, #8] + ldr r0, [r4, #0x10] + ldr r3, [sp, #8] + str r0, [sp] + str r0, [sp, #0xc] + str r6, [sp, #4] + add r0, r5, #0 + bl ov6_02245328 + mov r0, #1 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0x14 + add r0, r1, r0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0xc] + ldr r3, [sp, #8] + str r0, [sp] + add r0, r5, #0 + add r1, sp, #0x1c + add r2, sp, #0x10 + str r6, [sp, #4] + bl ov6_02245328 + add r7, r7, #1 + add r4, #0x14 + cmp r7, #0xd + blt _022452CC + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_02245324: .word 0x0224936C + thumb_func_end ov6_022452BC + + thumb_func_start ov6_02245328 +ov6_02245328: ; 0x02245328 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [sp, #0x34] + str r3, [sp, #8] + str r5, [sp, #0x10] + add r4, r1, #0 + str r0, [sp, #0xc] + ldmia r2!, {r0, r1} + add r3, sp, #0x14 + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + ldr r1, _02245360 ; =0x02249220 + str r0, [r3, #0] + add r0, sp, #8 + str r0, [sp] + mov r0, #0x84 + str r0, [sp, #4] + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r3, [sp, #0x30] + add r2, r4, #0 + bl sub_02071330 + add sp, #0x20 + pop {r3, r4, r5, pc} + nop +_02245360: .word 0x02249220 + thumb_func_end ov6_02245328 + + thumb_func_start ov6_02245364 +ov6_02245364: ; 0x02245364 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + bl sub_020715BC + add r2, r4, #0 + add r3, r0, #0 + add r2, #0xc + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + bl sub_020715B4 + str r0, [r4, #4] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715E4 + ldr r0, [r4, #0x14] + ldr r2, [r4, #0xc] + ldr r3, [r4, #4] + add r1, sp, #0 + bl ov6_02244CD4 + mov r1, #0 + str r0, [r4, #8] + bl sub_02021CAC + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_02245364 + + thumb_func_start ov6_022453AC +ov6_022453AC: ; 0x022453AC + ldr r3, _022453B4 ; =sub_02021BD4 + ldr r0, [r1, #8] + bx r3 + nop +_022453B4: .word sub_02021BD4 + thumb_func_end ov6_022453AC + + thumb_func_start ov6_022453B8 +ov6_022453B8: ; 0x022453B8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + add r5, r0, #0 + bl sub_020715E4 + ldr r1, [sp] + ldr r0, [r4, #0x18] + add r0, r1, r0 + lsr r2, r0, #0x1f + lsl r1, r0, #0xb + str r0, [sp] + sub r1, r1, r2 + mov r0, #0xb + ror r1, r0 + add r0, r2, r1 + str r0, [sp] + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #8] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0x10] + cmp r0, #1 + bne _02245432 + ldr r3, [r4, #0x14] + ldr r0, [r3, #0x14] + cmp r0, #2 + bne _02245426 + ldr r2, [r3, #0x4c] + ldr r0, [r3, #0x50] + mov r3, #2 + ldr r6, [sp, #4] + lsl r3, r3, #0xc + sub r5, r6, r3 + mov r1, #0 + cmp r5, r2 + blt _0224541C + cmp r5, r0 + bgt _0224541C + add r3, r6, r3 + cmp r3, r2 + blt _0224541C + cmp r3, r0 + bgt _0224541C + mov r1, #1 +_0224541C: + ldr r0, [r4, #8] + bl sub_02021CAC + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_02245426: + cmp r0, #1 + bne _02245432 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02021CAC +_02245432: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_022453B8 + + thumb_func_start ov6_02245438 +ov6_02245438: ; 0x02245438 + bx lr + ; .align 2, 0 + thumb_func_end ov6_02245438 + + thumb_func_start ov6_0224543C +ov6_0224543C: ; 0x0224543C + push {r4, lr} + sub sp, #0x18 + add r2, sp, #0xc + mov r3, #0 + add r4, r0, #0 + str r3, [r2, #0] + str r3, [r2, #4] + str r3, [r2, #8] + str r4, [sp, #8] + add r0, sp, #8 + str r0, [sp] + mov r0, #0x82 + str r0, [sp, #4] + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, _0224546C ; =0x02249248 + bl sub_02071330 + mov r1, #0x7b + lsl r1, r1, #2 + str r0, [r4, r1] + add sp, #0x18 + pop {r4, pc} + ; .align 2, 0 +_0224546C: .word 0x02249248 + thumb_func_end ov6_0224543C + + thumb_func_start ov6_02245470 +ov6_02245470: ; 0x02245470 + push {r3, lr} + mov r1, #0x7b + lsl r1, r1, #2 + ldr r0, [r0, r1] + bl sub_02071598 + ldrb r0, [r0, #2] + pop {r3, pc} + thumb_func_end ov6_02245470 + + thumb_func_start ov6_02245480 +ov6_02245480: ; 0x02245480 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02071598 + add r5, r0, #0 + ldr r0, [r5, #0x60] + cmp r0, #0 + beq _0224549A + bl sub_0207136C +_0224549A: + ldr r0, [r5, #0x64] + cmp r0, #0 + beq _022454A4 + bl ov5_021F0EFC +_022454A4: + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207136C + pop {r3, r4, r5, pc} + thumb_func_end ov6_02245480 + + thumb_func_start ov6_022454B0 +ov6_022454B0: ; 0x022454B0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020715BC + ldr r0, [r0, #0] + add r1, sp, #0 + str r0, [r4, #0x5c] + add r0, r5, #0 + bl sub_020715E4 + mov r2, #0 + ldr r0, [r4, #0x5c] + add r1, sp, #0 + add r3, r2, #0 + bl ov6_02244D4C + str r0, [r4, #0x58] + mov r0, #1 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_022454B0 + + thumb_func_start ov6_022454DC +ov6_022454DC: ; 0x022454DC + ldr r3, _022454E4 ; =sub_02021BD4 + ldr r0, [r1, #0x58] + bx r3 + nop +_022454E4: .word sub_02021BD4 + thumb_func_end ov6_022454DC + + thumb_func_start ov6_022454E8 +ov6_022454E8: ; 0x022454E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldrb r0, [r5] + lsl r1, r0, #2 + ldr r0, _02245504 ; =0x02249198 + ldr r4, [r0, r1] +_022454F4: + ldrb r1, [r5, #1] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + blx r1 + cmp r0, #1 + beq _022454F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245504: .word 0x02249198 + thumb_func_end ov6_022454E8 + + thumb_func_start ov6_02245508 +ov6_02245508: ; 0x02245508 + bx lr + ; .align 2, 0 + thumb_func_end ov6_02245508 + + thumb_func_start ov6_0224550C +ov6_0224550C: ; 0x0224550C + push {r3, lr} + mov r1, #0 + strb r1, [r0, #2] + ldr r0, [r0, #0x58] + bl sub_02021CAC + mov r0, #0 + pop {r3, pc} + thumb_func_end ov6_0224550C + + thumb_func_start ov6_0224551C +ov6_0224551C: ; 0x0224551C + push {r4, r5, r6, lr} + sub sp, #0x18 + ldr r4, _022455BC ; =0x022491B0 + add r2, r0, #0 + ldmia r4!, {r0, r1} + add r3, sp, #0xc + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r4, _022455C0 ; =0x0224915C + str r0, [r3, #0] + ldmia r4!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r2, r0] + bl sub_02071598 + add r4, r0, #0 + mov r3, #1 + add r5, r4, #0 + strb r3, [r4] + mov r2, #0 + strb r2, [r4, #1] + strb r2, [r4, #2] + add r6, sp, #0xc + ldmia r6!, {r0, r1} + add r5, #8 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r6, sp, #0 + str r0, [r5, #0] + str r2, [r4, #0x14] + str r2, [r4, #0x18] + mov r0, #0xf + add r5, r4, #0 + str r2, [r4, #0x1c] + lsl r0, r0, #0xe + str r0, [r4, #0x38] + ldmia r6!, {r0, r1} + add r5, #0x2c + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r1, sp, #0xc + str r0, [r5, #0] + lsl r0, r3, #9 + str r0, [r4, #0x50] + mov r0, #0x2d + lsl r0, r0, #0xe + str r0, [r4, #0x40] + str r2, [r4, #0x48] + lsl r0, r3, #0xd + str r0, [r4, #0x4c] + ldr r0, [r4, #0x58] + bl sub_02021C50 + ldr r0, [r4, #0x58] + add r1, sp, #0 + bl sub_02021C70 + ldr r1, [r4, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + ldr r0, [r4, #0x58] + bl sub_02021C94 + ldr r0, [r4, #0x58] + mov r1, #1 + bl sub_02021CAC + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022455BC: .word 0x022491B0 +_022455C0: .word 0x0224915C + thumb_func_end ov6_0224551C + + thumb_func_start ov6_022455C4 +ov6_022455C4: ; 0x022455C4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x4c] + ldr r4, [r5, #0x58] + add r0, r1, r0 + str r0, [r5, #0x48] + mov r0, #1 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0x10 + cmp r1, r0 + bge _022455E4 + lsr r0, r0, #2 + add r0, r1, r0 + str r0, [r5, #0x4c] +_022455E4: + ldr r0, _022456C4 ; =0x0000013B + bl sub_0201D264 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x14] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x18] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r2, r0, #0xc + ldr r0, _022456C8 ; =0x0000010E + cmp r2, r0 + bge _0224562E + mov r0, #1 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [r5, #0x40] +_0224562E: + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [r5, #0x2c] + cmp r1, r0 + ble _02245640 + str r0, [r5, #0x2c] +_02245640: + ldr r1, [r5, #0x30] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [r5, #0x30] + cmp r1, r0 + ble _02245652 + str r0, [r5, #0x30] +_02245652: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x2c + bl sub_02021C70 + mov r0, #6 + ldr r1, [r5, #0x38] + lsl r0, r0, #0xc + sub r1, r1, r0 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + str r1, [r5, #0x38] + asr r0, r0, #0xc + bpl _02245674 + mov r0, #0 + str r0, [r5, #0x38] +_02245674: + ldr r1, [r5, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + ldr r1, [r5, #8] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp] + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C50 + ldr r1, [sp, #4] + ldr r0, _022456CC ; =0xFFFC0000 + cmp r1, r0 + bge _022456BE + add r0, r4, #0 + mov r1, #0 + bl sub_02021CAC + mov r0, #2 + strb r0, [r5, #2] + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] +_022456BE: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_022456C4: .word 0x0000013B +_022456C8: .word 0x0000010E +_022456CC: .word 0xFFFC0000 + thumb_func_end ov6_022455C4 + + thumb_func_start ov6_022456D0 +ov6_022456D0: ; 0x022456D0 + mov r0, #0 + bx lr + thumb_func_end ov6_022456D0 + + thumb_func_start ov6_022456D4 +ov6_022456D4: ; 0x022456D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r3, _0224582C ; =0x02249144 + add r5, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x24 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r3, _02245830 ; =0x02249138 + str r0, [r2, #0] + ldmia r3!, {r0, r1} + add r2, sp, #0x18 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02071598 + add r4, r0, #0 + mov r0, #2 + add r2, r4, #0 + strb r0, [r4] + mov r6, #0 + strb r6, [r4, #1] + mov r7, #1 + strb r7, [r4, #2] + str r6, [r4, #4] + add r3, sp, #0x24 + ldmia r3!, {r0, r1} + add r2, #8 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r3, sp, #0x18 + str r0, [r2, #0] + str r6, [r4, #0x14] + str r6, [r4, #0x18] + str r6, [r4, #0x1c] + ldr r6, _02245834 ; =0x0013B000 + add r2, r4, #0 + str r6, [r4, #0x38] + ldmia r3!, {r0, r1} + add r2, #0x2c + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r7, #0 + add r0, #0xff + str r0, [r4, #0x50] + mov r0, #0xe1 + lsl r0, r0, #0xc + str r0, [r4, #0x40] + mov r0, #3 + lsl r0, r0, #0x12 + str r0, [r4, #0x48] + lsl r0, r7, #0x11 + str r0, [r4, #0x4c] + lsr r0, r6, #0xc + bl sub_0201D264 + ldr r2, [r4, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r4, #0x14] + ldr r1, [r4, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, [r4, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r4, #0x18] + ldr r1, [r4, #8] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [sp, #0x24] + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [sp, #0x28] + ldr r0, [r4, #0x58] + add r1, sp, #0x24 + bl sub_02021C50 + ldr r0, [r4, #0x58] + add r1, sp, #0x18 + bl sub_02021C70 + ldr r1, [r4, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + ldr r0, [r4, #0x58] + bl sub_02021C94 + ldr r0, [r4, #0x58] + add r1, r7, #0 + bl sub_02021CAC + mov r1, #0x1e + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl ov6_02245B4C + str r0, [r4, #0x60] + add r0, r7, #0 + str r0, [r5, #0x1c] + ldr r0, [r5, #0x60] + mov r1, #4 + bl ov5_021F0EB0 + ldr r2, _02245838 ; =0xFFF88000 + add r1, r7, #0 + mov r3, #0xc + str r0, [r4, #0x64] + bl ov5_021F0F10 + add r1, sp, #0xc + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + ldr r3, _0224583C ; =0x022491BC + str r0, [r1, #8] + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + mov r0, #0x79 + ldr r1, [r4, #0x5c] + lsl r0, r0, #2 + ldr r4, [r1, r0] + mov r1, #2 + add r0, r4, #0 + bl sub_02021CF8 + add r0, r4, #0 + add r1, sp, #0xc + bl sub_02021C60 + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C70 + mov r0, #0 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224582C: .word 0x02249144 +_02245830: .word 0x02249138 +_02245834: .word 0x0013B000 +_02245838: .word 0xFFF88000 +_0224583C: .word 0x022491BC + thumb_func_end ov6_022456D4 + + thumb_func_start ov6_02245840 +ov6_02245840: ; 0x02245840 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x4c] + ldr r4, [r5, #0x58] + sub r0, r1, r0 + str r0, [r5, #0x48] + bpl _02245856 + mov r0, #0 + str r0, [r5, #0x48] +_02245856: + mov r0, #2 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0xa + cmp r1, r0 + ble _02245868 + mov r0, #6 + lsl r0, r0, #0xa + sub r0, r1, r0 + str r0, [r5, #0x4c] +_02245868: + mov r0, #1 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0xc + cmp r1, r0 + bge _02245874 + str r0, [r5, #0x4c] +_02245874: + ldr r0, _022459A8 ; =0x0000013B + bl sub_0201D264 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x14] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x18] + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r2, r0, #0xc + ldr r0, _022459AC ; =0x0000010E + cmp r2, r0 + bge _022458BE + mov r0, #1 + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [r5, #0x40] +_022458BE: + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #6 + lsl r0, r0, #0xa + str r1, [r5, #0x2c] + cmp r1, r0 + ble _022458D0 + str r0, [r5, #0x2c] +_022458D0: + ldr r1, [r5, #0x30] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #6 + lsl r0, r0, #0xa + str r1, [r5, #0x30] + cmp r1, r0 + ble _022458E2 + str r0, [r5, #0x30] +_022458E2: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x2c + bl sub_02021C70 + mov r0, #2 + ldr r1, [r5, #0x38] + lsl r0, r0, #0xe + add r1, r1, r0 + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + str r1, [r5, #0x38] + asr r1, r0, #0xc + mov r0, #0x5a + lsl r0, r0, #2 + cmp r1, r0 + ble _0224590A + lsl r0, r0, #0xc + str r0, [r5, #0x38] +_0224590A: + ldr r1, [r5, #0x38] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D2A4 + add r1, r0, #0 + add r0, r4, #0 + bl sub_02021C94 + ldr r1, [r5, #8] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [sp, #0x10] + add r0, r4, #0 + add r1, sp, #0xc + bl sub_02021C50 + ldr r0, [r5, #0x48] + cmp r0, #0 + bne _0224594C + mov r0, #0 + str r0, [r5, #4] + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] + b _02245952 +_0224594C: + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] +_02245952: + ldr r0, [r5, #4] + cmp r0, #0xc + bne _0224595E + ldr r0, [r5, #0x60] + bl ov6_02245B80 +_0224595E: + mov r0, #0x79 + ldr r1, [r5, #0x5c] + lsl r0, r0, #2 + ldr r4, [r1, r0] + add r0, r4, #0 + bl sub_02021D2C + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [sp] + mov r0, #5 + add r1, #0x80 + lsl r0, r0, #0xa + str r1, [sp] + cmp r1, r0 + ble _02245988 + str r0, [sp] +_02245988: + ldr r1, [sp, #4] + mov r0, #5 + add r1, #0x80 + lsl r0, r0, #0xa + str r1, [sp, #4] + cmp r1, r0 + ble _02245998 + str r0, [sp, #4] +_02245998: + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C70 + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_022459A8: .word 0x0000013B +_022459AC: .word 0x0000010E + thumb_func_end ov6_02245840 + + thumb_func_start ov6_022459B0 +ov6_022459B0: ; 0x022459B0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x79 + ldr r1, [r5, #0x5c] + lsl r0, r0, #2 + ldr r4, [r1, r0] + mov r1, #3 + add r0, r4, #0 + bl sub_02021D6C + add r0, r4, #0 + bl sub_02021D28 + ldr r4, [r0, #4] + ldr r0, [r5, #0x58] + bl sub_02021D28 + ldr r0, [r0, #4] + sub r0, r4, r0 + str r0, [r5, #0x54] + ldr r0, [r5, #0x60] + bl ov6_02245B74 + ldr r0, [r5, #0x64] + mov r1, #2 + mov r2, #0 + mov r3, #0xc + bl ov5_021F0F10 + mov r1, #1 + lsl r1, r1, #8 + str r1, [r5, #0x50] + lsl r0, r1, #0xb + str r0, [r5, #0x40] + mov r0, #0 + str r0, [r5, #0x48] + lsl r0, r1, #3 + str r0, [r5, #0x4c] + mov r0, #3 + strb r0, [r5, #2] + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_022459B0 + + thumb_func_start ov6_02245A0C +ov6_02245A0C: ; 0x02245A0C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x4c] + ldr r4, [r5, #0x58] + add r0, r1, r0 + str r0, [r5, #0x48] + mov r0, #1 + ldr r1, [r5, #0x4c] + lsl r0, r0, #0xc + add r2, r1, r0 + lsl r1, r0, #4 + str r2, [r5, #0x4c] + cmp r2, r1 + ble _02245A30 + lsl r0, r0, #4 + str r0, [r5, #0x4c] +_02245A30: + ldr r1, [r5, #0x40] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + lsl r0, r0, #4 + lsr r0, r0, #0x10 + bl sub_0201D264 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x14] + mov r0, #0x80 + bl sub_0201D250 + ldr r2, [r5, #0x48] + asr r1, r2, #0xb + lsr r1, r1, #0x14 + add r1, r2, r1 + asr r1, r1, #0xc + mul r0, r1 + str r0, [r5, #0x18] + mov r0, #0x87 + ldr r1, [r5, #0x40] + lsl r0, r0, #0xc + cmp r1, r0 + bge _02245A74 + mov r0, #1 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r5, #0x40] +_02245A74: + ldr r1, [r5, #0x2c] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #2 + lsl r0, r0, #0xc + str r1, [r5, #0x2c] + cmp r1, r0 + ble _02245A86 + str r0, [r5, #0x2c] +_02245A86: + ldr r1, [r5, #0x30] + ldr r0, [r5, #0x50] + add r1, r1, r0 + mov r0, #2 + lsl r0, r0, #0xc + str r1, [r5, #0x30] + cmp r1, r0 + ble _02245A98 + str r0, [r5, #0x30] +_02245A98: + add r1, r5, #0 + add r0, r4, #0 + add r1, #0x2c + bl sub_02021C70 + ldr r1, [r5, #8] + ldr r0, [r5, #0x14] + add r0, r1, r0 + str r0, [sp, #0x18] + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x18] + add r0, r1, r0 + str r0, [sp, #0x1c] + add r0, r4, #0 + add r1, sp, #0x18 + bl sub_02021C50 + mov r0, #0x79 + ldr r1, [r5, #0x5c] + lsl r0, r0, #2 + ldr r4, [r1, r0] + add r0, r4, #0 + bl sub_02021D2C + add r2, sp, #0xc + add r3, sp, #0x18 + add r6, r0, #0 + ldmia r3!, {r0, r1} + add r7, r2, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldmia r6!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r2, #0] + mov r0, #1 + ldr r1, [r5, #0x54] + lsl r0, r0, #0xc + sub r1, r1, r0 + str r1, [r5, #0x54] + ldr r0, [sp, #0x10] + add r0, r0, r1 + str r0, [sp, #0x10] + add r0, r4, #0 + add r1, r7, #0 + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp] + lsl r0, r0, #8 + add r2, r1, r0 + lsl r1, r0, #5 + str r2, [sp] + cmp r2, r1 + ble _02245B0E + lsl r0, r0, #5 + str r0, [sp] +_02245B0E: + mov r0, #1 + ldr r1, [sp, #4] + lsl r0, r0, #8 + add r2, r1, r0 + lsl r1, r0, #5 + str r2, [sp, #4] + cmp r2, r1 + ble _02245B22 + lsl r0, r0, #5 + str r0, [sp, #4] +_02245B22: + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C70 + ldr r1, [sp, #0x1c] + asr r0, r1, #0xb + lsr r0, r0, #0x14 + add r0, r1, r0 + asr r0, r0, #0xc + cmp r0, #0xf0 + blt _02245B42 + mov r0, #2 + strb r0, [r5, #2] + ldrb r0, [r5, #1] + add r0, r0, #1 + strb r0, [r5, #1] +_02245B42: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02245A0C + + thumb_func_start ov6_02245B48 +ov6_02245B48: ; 0x02245B48 + mov r0, #0 + bx lr + thumb_func_end ov6_02245B48 + + thumb_func_start ov6_02245B4C +ov6_02245B4C: ; 0x02245B4C + push {lr} + sub sp, #0x1c + add r2, sp, #0x10 + mov r3, #0 + str r3, [r2, #0] + str r3, [r2, #4] + str r1, [sp, #0xc] + str r3, [r2, #8] + add r1, sp, #8 + str r1, [sp] + mov r1, #0x81 + str r1, [sp, #4] + ldr r1, _02245B70 ; =0x0224920C + bl sub_02071330 + add sp, #0x1c + pop {pc} + nop +_02245B70: .word 0x0224920C + thumb_func_end ov6_02245B4C + + thumb_func_start ov6_02245B74 +ov6_02245B74: ; 0x02245B74 + push {r3, lr} + bl sub_02071598 + mov r1, #0 + str r1, [r0, #0] + pop {r3, pc} + thumb_func_end ov6_02245B74 + + thumb_func_start ov6_02245B80 +ov6_02245B80: ; 0x02245B80 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02071598 + add r4, r0, #0 + mov r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + str r0, [r4, #0xc] + str r0, [r4, #8] + str r0, [r4, #0x10] + str r0, [r4, #0x14] + str r0, [r4, #0x18] + ldr r0, [r4, #0x20] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + add r1, r2, #0 + str r0, [r3, #0] + add r0, r5, #0 + bl sub_020715D4 + ldr r0, [r4, #0x20] + mov r1, #5 + bl sub_02021D6C + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02245B80 + + thumb_func_start ov6_02245BC8 +ov6_02245BC8: ; 0x02245BC8 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02071598 + add r4, r0, #0 + mov r0, #2 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + str r0, [r4, #0xc] + str r0, [r4, #8] + str r0, [r4, #0x10] + str r0, [r4, #0x14] + str r0, [r4, #0x18] + ldr r0, [r4, #0x20] + add r1, sp, #0 + bl ov6_022437C8 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020715D4 + ldr r0, [r4, #0x20] + mov r1, #4 + bl sub_02021D6C + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02245BC8 + + thumb_func_start ov6_02245C04 +ov6_02245C04: ; 0x02245C04 + push {r4, lr} + add r4, r1, #0 + bl sub_020715BC + ldr r1, [r0, #0] + str r1, [r4, #0x1c] + ldr r0, [r0, #4] + str r0, [r4, #0x20] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov6_02245C04 + + thumb_func_start ov6_02245C18 +ov6_02245C18: ; 0x02245C18 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _02245C5C + ldr r1, [r4, #0xc] + lsl r2, r1, #2 + ldr r1, _02245C60 ; =0x022492A8 + ldr r1, [r1, r2] + str r1, [r4, #0x14] + add r1, sp, #0 + bl sub_020715E4 + ldr r1, [sp, #4] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #0x20] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0xc + blt _02245C5C + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #1 + str r0, [r4, #8] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] +_02245C5C: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02245C60: .word 0x022492A8 + thumb_func_end ov6_02245C18 + + thumb_func_start ov6_02245C64 +ov6_02245C64: ; 0x02245C64 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #4] + cmp r1, #0 + bne _02245CA8 + ldr r1, [r4, #0xc] + lsl r2, r1, #2 + ldr r1, _02245CAC ; =0x022491FC + ldr r1, [r1, r2] + str r1, [r4, #0x14] + add r1, sp, #0 + bl sub_020715E4 + ldr r1, [sp, #4] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #0x20] + add r1, sp, #0 + bl sub_02021C50 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #4 + blt _02245CA8 + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #1 + str r0, [r4, #8] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] +_02245CA8: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02245CAC: .word 0x022491FC + thumb_func_end ov6_02245C64 + + thumb_func_start ov6_02245CB0 +ov6_02245CB0: ; 0x02245CB0 + push {r3, lr} + ldr r2, [r1, #0] + cmp r2, #1 + beq _02245CBE + cmp r2, #2 + beq _02245CC4 + pop {r3, pc} +_02245CBE: + bl ov6_02245C18 + pop {r3, pc} +_02245CC4: + bl ov6_02245C64 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02245CB0 + + thumb_func_start ov6_02245CCC +ov6_02245CCC: ; 0x02245CCC + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #0x5f + add r5, r0, #0 + mov r0, #4 + lsl r1, r1, #2 + bl ov6_02245F44 + add r1, r0, #0 + str r4, [r1, #0xc] + ldr r0, _02245CEC ; =ov6_02245D10 + mov r2, #0x85 + str r5, [r1, #0x14] + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245CEC: .word ov6_02245D10 + thumb_func_end ov6_02245CCC + + thumb_func_start ov6_02245CF0 +ov6_02245CF0: ; 0x02245CF0 + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #4] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02245CF0 + + thumb_func_start ov6_02245CFC +ov6_02245CFC: ; 0x02245CFC + push {r4, lr} + add r4, r0, #0 + bl sub_0201CED0 + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 + pop {r4, pc} + thumb_func_end ov6_02245CFC + + thumb_func_start ov6_02245D10 +ov6_02245D10: ; 0x02245D10 + push {r3, r4, r5, lr} + ldr r4, _02245D44 ; =0x02249270 + add r5, r1, #0 +_02245D16: + ldr r1, [r5, #0] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + blx r1 + cmp r0, #1 + beq _02245D16 + ldr r0, [r5, #0x10] + cmp r0, #0 + beq _02245D42 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02245D38 + bl sub_020713D0 +_02245D38: + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _02245D42 + bl sub_020219F8 +_02245D42: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245D44: .word 0x02249270 + thumb_func_end ov6_02245D10 + + thumb_func_start ov6_02245D48 +ov6_02245D48: ; 0x02245D48 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + mov r1, #1 + bl ov6_02243F74 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02245D48 + + thumb_func_start ov6_02245D60 +ov6_02245D60: ; 0x02245D60 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #4 + mov r1, #0x20 + bl sub_020711EC + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r2, #2 + str r2, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #4 + str r1, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + add r0, r5, #0 + add r0, #0x18 + mov r1, #0x20 + add r3, r2, #0 + str r2, [sp, #0x14] + bl ov6_02243258 + bl ov6_02243F20 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #7 + mov r3, #0 + bl ov6_022434B0 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #3 + mov r3, #0 + bl ov6_02243588 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #8 + mov r3, #0 + bl ov6_02243660 + add r0, r5, #0 + add r0, #0x18 + mov r1, #0 + bl ov6_02243520 + add r0, r5, #0 + add r0, #0x18 + mov r1, #0 + bl ov6_022435F8 + add r0, r5, #0 + add r0, #0x18 + mov r1, #0 + bl ov6_02243554 + add r0, r5, #0 + add r0, #0x18 + mov r1, #0 + bl ov6_0224362C + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _02245E32 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #0xd + mov r3, #2 + bl ov6_022434B0 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #0xe + mov r3, #2 + bl ov6_02243660 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #0xf + mov r3, #1 + bl ov6_022436D0 + add r0, r5, #0 + add r0, #0x18 + mov r1, #2 + bl ov6_02243520 + add r0, r5, #0 + add r0, #0x18 + mov r1, #2 + bl ov6_02243554 + b _02245E92 +_02245E32: + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #0x10 + mov r3, #2 + bl ov6_022434B0 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #4 + mov r3, #1 + bl ov6_02243588 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #0x11 + mov r3, #2 + bl ov6_02243660 + add r0, r5, #0 + add r0, #0x18 + add r1, r4, #0 + mov r2, #0x12 + mov r3, #1 + bl ov6_022436D0 + add r0, r5, #0 + add r0, #0x18 + mov r1, #2 + bl ov6_02243520 + add r0, r5, #0 + add r0, #0x18 + mov r1, #1 + bl ov6_022435F8 + add r0, r5, #0 + add r0, #0x18 + mov r1, #2 + bl ov6_02243554 + add r0, r5, #0 + add r0, #0x18 + mov r1, #1 + bl ov6_0224362C +_02245E92: + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02245D60 + + thumb_func_start ov6_02245EA4 +ov6_02245EA4: ; 0x02245EA4 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0xc] + add r0, #0x18 + bl ov6_02243848 + mov r1, #0x5b + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02021CAC + mov r3, #0x17 + lsl r3, r3, #4 + ldr r1, [r4, r3] + sub r3, r3, #4 + add r2, r4, #0 + ldr r0, [r4, #0x14] + ldr r3, [r4, r3] + add r2, #0x18 + bl ov6_02243888 + mov r1, #0x5d + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + bl ov6_02243950 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #1 + str r0, [r4, #0x10] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_02245EA4 + + thumb_func_start ov6_02245EEC +ov6_02245EEC: ; 0x02245EEC + push {r4, lr} + add r4, r0, #0 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov6_022438BC + cmp r0, #2 + beq _02245F02 + mov r0, #0 + pop {r4, pc} +_02245F02: + mov r0, #0x5d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov6_022438EC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02245EEC + + thumb_func_start ov6_02245F18 +ov6_02245F18: ; 0x02245F18 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x17 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0207121C + add r0, r4, #0 + add r0, #0x18 + bl ov6_0224339C + mov r0, #0 + str r0, [r4, #0x10] + mov r1, #1 + str r1, [r4, #4] + ldr r1, [r4, #0] + add r1, r1, #1 + str r1, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02245F18 + + thumb_func_start ov6_02245F40 +ov6_02245F40: ; 0x02245F40 + mov r0, #0 + bx lr + thumb_func_end ov6_02245F40 + + thumb_func_start ov6_02245F44 +ov6_02245F44: ; 0x02245F44 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_02018184 + add r4, r0, #0 + bne _02245F54 + bl sub_02022974 +_02245F54: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02245F44 + + thumb_func_start ov6_02245F64 +ov6_02245F64: ; 0x02245F64 + push {r3, r4, r5, lr} + ldr r0, [r0, #0x60] + add r4, r1, #0 + ldr r0, [r0, #0x3c] + bl sub_0205EB3C + add r5, r0, #0 + bl sub_02062DDC + add r0, r5, #0 + add r1, r4, #0 + bl sub_02062D64 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02245F64 + + thumb_func_start ov6_02245F80 +ov6_02245F80: ; 0x02245F80 + push {r4, lr} + add r4, r1, #0 + bl sub_020715BC + ldr r1, [r0, #0] + ldr r0, [r0, #4] + str r1, [r4, #0] + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov6_02245F80 + + thumb_func_start ov6_02245F94 +ov6_02245F94: ; 0x02245F94 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + bl sub_02021D28 + ldr r1, [r4, #4] + ldr r0, [r0, #4] + ldr r5, [r1, #0x4c] + ldr r3, [r1, #0x50] + ldr r1, [r1, #0x1c] + cmp r1, #0 + bne _02245FD0 + mov r1, #2 + lsl r1, r1, #0xe + sub r2, r0, r1 + cmp r2, r5 + blt _02245FC6 + add r0, r0, r1 + cmp r0, r3 + bgt _02245FC6 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021CAC + pop {r3, r4, r5, pc} +_02245FC6: + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021CAC + pop {r3, r4, r5, pc} +_02245FD0: + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021CAC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02245F94 + + thumb_func_start ov6_02245FDC +ov6_02245FDC: ; 0x02245FDC + push {r3, r4, lr} + sub sp, #0x1c + add r2, sp, #0x10 + mov r3, #0 + str r3, [r2, #0] + add r4, r0, #0 + str r3, [r2, #4] + mov r0, #0x79 + str r3, [r2, #8] + lsl r0, r0, #2 + ldr r1, [r4, r0] + sub r0, r0, #4 + str r1, [sp, #8] + str r4, [sp, #0xc] + add r1, sp, #8 + str r1, [sp] + mov r1, #0x86 + str r1, [sp, #4] + ldr r0, [r4, r0] + ldr r1, _02246014 ; =0x02249234 + bl sub_02071330 + mov r1, #0x1f + lsl r1, r1, #4 + str r0, [r4, r1] + add sp, #0x1c + pop {r3, r4, pc} + nop +_02246014: .word 0x02249234 + thumb_func_end ov6_02245FDC + + thumb_func_start ov6_02246018 +ov6_02246018: ; 0x02246018 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02246032 + bl sub_0207136C + mov r0, #0x1f + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] +_02246032: + pop {r4, pc} + thumb_func_end ov6_02246018 + + .rodata + + + .global Unk_ov6_022490E8 +Unk_ov6_022490E8: ; 0x022490E8 + .incbin "incbin/overlay6_rodata.bin", 0x2D4, 0x2D8 - 0x2D4 + + .global Unk_ov6_022490EC +Unk_ov6_022490EC: ; 0x022490EC + .incbin "incbin/overlay6_rodata.bin", 0x2D8, 0x2DC - 0x2D8 + + .global Unk_ov6_022490F0 +Unk_ov6_022490F0: ; 0x022490F0 + .incbin "incbin/overlay6_rodata.bin", 0x2DC, 0x2E4 - 0x2DC + + .global Unk_ov6_022490F8 +Unk_ov6_022490F8: ; 0x022490F8 + .incbin "incbin/overlay6_rodata.bin", 0x2E4, 0x2EC - 0x2E4 + + .global Unk_ov6_02249100 +Unk_ov6_02249100: ; 0x02249100 + .incbin "incbin/overlay6_rodata.bin", 0x2EC, 0x2F4 - 0x2EC + + .global Unk_ov6_02249108 +Unk_ov6_02249108: ; 0x02249108 + .incbin "incbin/overlay6_rodata.bin", 0x2F4, 0x2FC - 0x2F4 + + .global Unk_ov6_02249110 +Unk_ov6_02249110: ; 0x02249110 + .incbin "incbin/overlay6_rodata.bin", 0x2FC, 0x304 - 0x2FC + + .global Unk_ov6_02249118 +Unk_ov6_02249118: ; 0x02249118 + .incbin "incbin/overlay6_rodata.bin", 0x304, 0x30C - 0x304 + + .global Unk_ov6_02249120 +Unk_ov6_02249120: ; 0x02249120 + .incbin "incbin/overlay6_rodata.bin", 0x30C, 0x318 - 0x30C + + .global Unk_ov6_0224912C +Unk_ov6_0224912C: ; 0x0224912C + .incbin "incbin/overlay6_rodata.bin", 0x318, 0x324 - 0x318 + + .global Unk_ov6_02249138 +Unk_ov6_02249138: ; 0x02249138 + .incbin "incbin/overlay6_rodata.bin", 0x324, 0x330 - 0x324 + + .global Unk_ov6_02249144 +Unk_ov6_02249144: ; 0x02249144 + .incbin "incbin/overlay6_rodata.bin", 0x330, 0x33C - 0x330 + + .global Unk_ov6_02249150 +Unk_ov6_02249150: ; 0x02249150 + .incbin "incbin/overlay6_rodata.bin", 0x33C, 0x348 - 0x33C + + .global Unk_ov6_0224915C +Unk_ov6_0224915C: ; 0x0224915C + .incbin "incbin/overlay6_rodata.bin", 0x348, 0x354 - 0x348 + + .global Unk_ov6_02249168 +Unk_ov6_02249168: ; 0x02249168 + .incbin "incbin/overlay6_rodata.bin", 0x354, 0x360 - 0x354 + + .global Unk_ov6_02249174 +Unk_ov6_02249174: ; 0x02249174 + .incbin "incbin/overlay6_rodata.bin", 0x360, 0x36C - 0x360 + + .global Unk_ov6_02249180 +Unk_ov6_02249180: ; 0x02249180 + .incbin "incbin/overlay6_rodata.bin", 0x36C, 0x378 - 0x36C + + .global Unk_ov6_0224918C +Unk_ov6_0224918C: ; 0x0224918C + .incbin "incbin/overlay6_rodata.bin", 0x378, 0x384 - 0x378 + + .global Unk_ov6_02249198 +Unk_ov6_02249198: ; 0x02249198 + .incbin "incbin/overlay6_rodata.bin", 0x384, 0x390 - 0x384 + + .global Unk_ov6_022491A4 +Unk_ov6_022491A4: ; 0x022491A4 + .incbin "incbin/overlay6_rodata.bin", 0x390, 0x39C - 0x390 + + .global Unk_ov6_022491B0 +Unk_ov6_022491B0: ; 0x022491B0 + .incbin "incbin/overlay6_rodata.bin", 0x39C, 0x3A8 - 0x39C + + .global Unk_ov6_022491BC +Unk_ov6_022491BC: ; 0x022491BC + .incbin "incbin/overlay6_rodata.bin", 0x3A8, 0x3B4 - 0x3A8 + + .global Unk_ov6_022491C8 +Unk_ov6_022491C8: ; 0x022491C8 + .incbin "incbin/overlay6_rodata.bin", 0x3B4, 0x3C0 - 0x3B4 + + .global Unk_ov6_022491D4 +Unk_ov6_022491D4: ; 0x022491D4 + .incbin "incbin/overlay6_rodata.bin", 0x3C0, 0x3CC - 0x3C0 + + .global Unk_ov6_022491E0 +Unk_ov6_022491E0: ; 0x022491E0 + .incbin "incbin/overlay6_rodata.bin", 0x3CC, 0x3D8 - 0x3CC + + .global Unk_ov6_022491EC +Unk_ov6_022491EC: ; 0x022491EC + .incbin "incbin/overlay6_rodata.bin", 0x3D8, 0x3E8 - 0x3D8 + + .global Unk_ov6_022491FC +Unk_ov6_022491FC: ; 0x022491FC + .incbin "incbin/overlay6_rodata.bin", 0x3E8, 0x3F8 - 0x3E8 + + .global Unk_ov6_0224920C +Unk_ov6_0224920C: ; 0x0224920C + .incbin "incbin/overlay6_rodata.bin", 0x3F8, 0x40C - 0x3F8 + + .global Unk_ov6_02249220 +Unk_ov6_02249220: ; 0x02249220 + .incbin "incbin/overlay6_rodata.bin", 0x40C, 0x420 - 0x40C + + .global Unk_ov6_02249234 +Unk_ov6_02249234: ; 0x02249234 + .incbin "incbin/overlay6_rodata.bin", 0x420, 0x434 - 0x420 + + .global Unk_ov6_02249248 +Unk_ov6_02249248: ; 0x02249248 + .incbin "incbin/overlay6_rodata.bin", 0x434, 0x448 - 0x434 + + .global Unk_ov6_0224925C +Unk_ov6_0224925C: ; 0x0224925C + .incbin "incbin/overlay6_rodata.bin", 0x448, 0x45C - 0x448 + + .global Unk_ov6_02249270 +Unk_ov6_02249270: ; 0x02249270 + .incbin "incbin/overlay6_rodata.bin", 0x45C, 0x474 - 0x45C + + .global Unk_ov6_02249288 +Unk_ov6_02249288: ; 0x02249288 + .incbin "incbin/overlay6_rodata.bin", 0x474, 0x494 - 0x474 + + .global Unk_ov6_022492A8 +Unk_ov6_022492A8: ; 0x022492A8 + .incbin "incbin/overlay6_rodata.bin", 0x494, 0x4C4 - 0x494 + + .global Unk_ov6_022492D8 +Unk_ov6_022492D8: ; 0x022492D8 + .incbin "incbin/overlay6_rodata.bin", 0x4C4, 0x4FC - 0x4C4 + + .global Unk_ov6_02249310 +Unk_ov6_02249310: ; 0x02249310 + .incbin "incbin/overlay6_rodata.bin", 0x4FC, 0x558 - 0x4FC + + .global Unk_ov6_0224936C +Unk_ov6_0224936C: ; 0x0224936C + .incbin "incbin/overlay6_rodata.bin", 0x558, 0x104 + diff --git a/asm/ov6_02246034.s b/asm/ov6_02246034.s new file mode 100644 index 000000000..e09fcc088 --- /dev/null +++ b/asm/ov6_02246034.s @@ -0,0 +1,171 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246034 +ov6_02246034: ; 0x02246034 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r1, #8] + str r1, [sp] + mov r1, #0 + bl sub_0207A0FC + add r7, r0, #0 + ldr r0, [r5, #0xc] + bl sub_0202D834 + str r0, [sp, #4] + add r0, r7, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r6, r0, #0 + ldr r0, [sp, #4] + add r1, r6, #0 + bl ov6_02246148 + str r0, [sp, #8] + cmp r0, #0 + beq _022460E6 + add r0, r7, #0 + mov r1, #0xa3 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + add r0, r7, #0 + mov r1, #0xa0 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, [sp] + ldr r0, [r0, #0x14] + cmp r0, #1 + bne _022460A8 + cmp r4, #0 + bne _022460A8 + add r0, sp, #8 + bl sub_0202D914 + ldr r0, [r5, #0xc] + bl sub_020507E4 + lsl r1, r6, #0x10 + lsr r1, r1, #0x10 + mov r2, #2 + bl sub_0206B688 + b _022460D8 +_022460A8: + cmp r0, #4 + bne _022460C4 + add r0, sp, #8 + bl sub_0202D914 + ldr r0, [r5, #0xc] + bl sub_020507E4 + lsl r1, r6, #0x10 + lsr r1, r1, #0x10 + mov r2, #1 + bl sub_0206B688 + b _022460D8 +_022460C4: + ldr r0, [sp, #8] + mov r1, #5 + add r2, r4, #0 + bl sub_0202D980 + ldr r0, [sp, #8] + mov r1, #7 + add r2, r7, #0 + bl sub_0202D980 +_022460D8: + ldr r1, [r5, #0x1c] + ldr r0, [sp, #4] + ldr r1, [r1, #0] + bl ov6_02246110 + add sp, #0xc + pop {r4, r5, r6, r7, pc} +_022460E6: + bl sub_0201D2E8 + mov r1, #0x29 + lsl r1, r1, #4 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x64 + blo _022460FE + bl sub_02022974 +_022460FE: + cmp r4, #0x1e + bhs _0224610C + ldr r1, [r5, #0x1c] + ldr r0, [sp, #4] + ldr r1, [r1, #0] + bl ov6_02246110 +_0224610C: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02246034 + + thumb_func_start ov6_02246110 +ov6_02246110: ; 0x02246110 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_02246118: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202D8F8 + cmp r0, #0 + beq _0224613C + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202D8C4 + bl sub_0206C3C8 + cmp r6, r0 + bne _0224613C + add r0, r5, #0 + add r1, r4, #0 + bl sub_0206C33C +_0224613C: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #6 + blo _02246118 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02246110 + + thumb_func_start ov6_02246148 +ov6_02246148: ; 0x02246148 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_02246150: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202D8F8 + cmp r0, #0 + beq _02246174 + add r0, r5, #0 + add r1, r4, #0 + bl sub_0202D924 + mov r1, #4 + add r7, r0, #0 + bl sub_0202D93C + cmp r6, r0 + bne _02246174 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} +_02246174: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #6 + blo _02246150 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02246148 \ No newline at end of file diff --git a/asm/ov6_02246184.s b/asm/ov6_02246184.s new file mode 100644 index 000000000..809f99bc0 --- /dev/null +++ b/asm/ov6_02246184.s @@ -0,0 +1,338 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246184 +ov6_02246184: ; 0x02246184 + push {r3, r4, r5, r6, lr} + sub sp, #0x104 + add r6, r1, #0 + add r5, r0, #0 + cmp r6, #4 + blo _02246194 + bl sub_02022974 +_02246194: + add r0, r5, #0 + mov r1, #0x14 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_022461A4: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _022461A4 + mov r2, #0 + str r2, [sp] + mov r0, #0x73 + add r1, r6, #0 + add r3, r5, #0 + bl sub_02006FE8 + str r0, [r4, #0] + str r5, [r4, #0x10] + str r6, [r4, #0xc] + add r0, r5, #0 + bl sub_02073C74 + str r0, [r4, #4] + add r0, r5, #0 + bl sub_02025E6C + str r0, [r4, #8] + bl sub_02025E8C + add r0, r5, #0 + add r1, r6, #4 + bl ov6_022462E4 + add r5, r0, #0 + add r1, sp, #4 + mov r2, #0x80 + bl sub_02023DF0 + add r0, r5, #0 + bl sub_020237BC + ldr r0, [r4, #8] + add r1, sp, #4 + bl sub_02025EC0 + ldr r1, [r4, #0] + ldr r0, [r4, #8] + ldr r1, [r1, #0x40] + bl sub_02025F2C + add r0, r4, #0 + add sp, #0x104 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov6_02246184 + + thumb_func_start ov6_02246204 +ov6_02246204: ; 0x02246204 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020181C4 + ldr r0, [r4, #4] + bl sub_020181C4 + ldr r0, [r4, #8] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02246204 + + thumb_func_start ov6_02246224 +ov6_02246224: ; 0x02246224 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02246224 + + thumb_func_start ov6_0224622C +ov6_0224622C: ; 0x0224622C + ldr r0, [r0, #0] + ldr r0, [r0, #0x4c] + bx lr + ; .align 2, 0 + thumb_func_end ov6_0224622C + + thumb_func_start ov6_02246234 +ov6_02246234: ; 0x02246234 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r6, r1, #0 + add r4, r2, #0 + bl sub_0207A268 + ldr r2, [r6, #4] + add r1, r4, #0 + bl sub_0207A128 + ldr r0, [r5, #0xc] + ldr r1, [r6, #4] + bl sub_0202F180 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02246234 + + thumb_func_start ov6_02246254 +ov6_02246254: ; 0x02246254 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + ldr r0, [r6, #0xc] + add r7, r2, #0 + add r5, r1, #0 + add r4, r3, #0 + bl sub_0207A268 + add r1, r7, #0 + bl sub_0207A0FC + mov r1, #0xa1 + mov r2, #0 + add r7, r0, #0 + bl sub_02074470 + add r2, r0, #0 + ldr r0, [r5, #0x10] + str r0, [sp] + ldr r0, [r6, #0x1c] + ldr r0, [r0, #0] + str r0, [sp, #4] + ldr r0, [r5, #4] + ldr r1, [r5, #0] + ldr r3, [r5, #0xc] + bl ov6_0224630C + ldr r1, [sp, #0x20] + add r0, r7, #0 + bl sub_020775EC + ldr r0, [r5, #4] + ldr r1, [sp, #0x24] + bl sub_020775EC + ldr r0, [sp, #0x20] + bl sub_02076B10 + str r0, [r4, #0] + ldr r0, [sp, #0x24] + bl sub_02076B10 + str r0, [r4, #4] + ldr r0, [r5, #8] + str r0, [r4, #8] + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, [r6, #0xc] + bl sub_02025E44 + str r0, [r4, #0x14] + add r0, r6, #0 + bl sub_02055BA8 + cmp r0, #1 + bhi _022462CE + mov r0, #0 + add sp, #8 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022462CE: + cmp r0, #2 + bne _022462DA + mov r0, #1 + add sp, #8 + str r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_022462DA: + mov r0, #2 + str r0, [r4, #0xc] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02246254 + + thumb_func_start ov6_022462E4 +ov6_022462E4: ; 0x022462E4 + push {r3, r4, r5, lr} + ldr r2, _02246308 ; =0x00000172 + add r3, r0, #0 + add r4, r1, #0 + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + add r5, r0, #0 + add r1, r4, #0 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + bl sub_0200B190 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02246308: .word 0x00000172 + thumb_func_end ov6_022462E4 + + thumb_func_start ov6_0224630C +ov6_0224630C: ; 0x0224630C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r3, #0 + mov r3, #1 + add r4, r1, #0 + str r3, [sp] + ldr r1, [r4, #0x38] + add r5, r0, #0 + str r1, [sp, #4] + str r3, [sp, #8] + ldr r1, [r4, #0x20] + mov r3, #0x20 + str r1, [sp, #0xc] + ldr r1, [r4, #0] + bl sub_02073D80 + ldr r0, [sp, #0x28] + add r1, r6, #0 + bl ov6_022462E4 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #0x77 + add r2, r7, #0 + bl sub_02074B30 + add r0, r7, #0 + bl sub_020237BC + mov r1, #1 + add r0, sp, #0x10 + strb r1, [r0] + add r0, r5, #0 + mov r1, #0x4d + add r2, sp, #0x10 + bl sub_02074B30 + add r0, r5, #0 + mov r1, #0x46 + add r2, r4, #4 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x47 + add r2, #8 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x48 + add r2, #0xc + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x49 + add r2, #0x10 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x4a + add r2, #0x14 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x4b + add r2, #0x18 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x13 + add r2, #0x24 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x14 + add r2, #0x28 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x15 + add r2, #0x2c + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x16 + add r2, #0x30 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x17 + add r2, #0x34 + bl sub_02074B30 + add r2, r4, #0 + add r0, r5, #0 + mov r1, #6 + add r2, #0x3c + bl sub_02074B30 + ldr r0, [sp, #0x28] + add r1, r6, #4 + bl ov6_022462E4 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #0x91 + add r2, r6, #0 + bl sub_02074B30 + add r0, r6, #0 + bl sub_020237BC + add r2, r4, #0 + add r0, r5, #0 + mov r1, #0x9d + add r2, #0x40 + bl sub_02074B30 + add r4, #0x48 + add r0, r5, #0 + mov r1, #0xc + add r2, r4, #0 + bl sub_02074B30 + ldr r0, [sp, #0x2c] + bl sub_0203A138 + add r3, r0, #0 + ldr r0, [sp, #0x28] + mov r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r2, #1 + bl sub_0209304C + add r0, r5, #0 + bl sub_0207418C + add r0, r5, #0 + bl sub_02075E0C + cmp r0, #0 + beq _02246440 + bl sub_02022974 +_02246440: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_0224630C \ No newline at end of file diff --git a/asm/ov6_02246444.s b/asm/ov6_02246444.s new file mode 100644 index 000000000..05e244cc9 --- /dev/null +++ b/asm/ov6_02246444.s @@ -0,0 +1,258 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246444 +ov6_02246444: ; 0x02246444 + ldr r3, _0224644C ; =sub_020C4CF4 + mov r1, #0 + mov r2, #0x18 + bx r3 + ; .align 2, 0 +_0224644C: .word sub_020C4CF4 + thumb_func_end ov6_02246444 + + thumb_func_start ov6_02246450 +ov6_02246450: ; 0x02246450 + strb r1, [r0, #3] + bx lr + thumb_func_end ov6_02246450 + + thumb_func_start ov6_02246454 +ov6_02246454: ; 0x02246454 + strb r1, [r0, #2] + bx lr + thumb_func_end ov6_02246454 + + thumb_func_start ov6_02246458 +ov6_02246458: ; 0x02246458 + strb r1, [r0, #1] + bx lr + thumb_func_end ov6_02246458 + + thumb_func_start ov6_0224645C +ov6_0224645C: ; 0x0224645C + ldr r3, _02246464 ; =sub_020021D0 + add r0, r0, #4 + mov r2, #8 + bx r3 + ; .align 2, 0 +_02246464: .word sub_020021D0 + thumb_func_end ov6_0224645C + + thumb_func_start ov6_02246468 +ov6_02246468: ; 0x02246468 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl sub_0202E55C + strb r0, [r5] + str r4, [r5, #0x14] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02246468 + + thumb_func_start ov6_0224647C +ov6_0224647C: ; 0x0224647C + push {r3, lr} + ldr r0, [r0, #0x14] + cmp r0, #0 + beq _02246488 + bl sub_0202E560 +_02246488: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_0224647C + + thumb_func_start ov6_0224648C +ov6_0224648C: ; 0x0224648C + ldrb r0, [r0, #3] + bx lr + thumb_func_end ov6_0224648C + + thumb_func_start ov6_02246490 +ov6_02246490: ; 0x02246490 + ldrb r0, [r0, #2] + bx lr + thumb_func_end ov6_02246490 + + thumb_func_start ov6_02246494 +ov6_02246494: ; 0x02246494 + add r0, r0, #4 + bx lr + thumb_func_end ov6_02246494 + + thumb_func_start ov6_02246498 +ov6_02246498: ; 0x02246498 + ldr r3, _022464A0 ; =sub_0202E574 + ldr r0, [r0, #0x14] + bx r3 + nop +_022464A0: .word sub_0202E574 + thumb_func_end ov6_02246498 + + thumb_func_start ov6_022464A4 +ov6_022464A4: ; 0x022464A4 + ldrb r0, [r0] + bx lr + thumb_func_end ov6_022464A4 + + thumb_func_start ov6_022464A8 +ov6_022464A8: ; 0x022464A8 + push {r3, r4, r5, lr} + add r5, r1, #0 + mov r0, #4 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bl ov6_02246444 + add r0, r5, #0 + bl sub_0202E4C8 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_0224645C + add r0, r5, #0 + bl sub_0202E4CC + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246454 + add r0, r5, #0 + bl sub_0202E4D0 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246458 + add r0, r5, #0 + bl sub_0202E4D4 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246468 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_022464A8 + + thumb_func_start ov6_022464F8 +ov6_022464F8: ; 0x022464F8 + push {r4, r5, r6, lr} + ldr r0, [r0, #0xc] + add r6, r1, #0 + bl sub_02025E38 + add r5, r0, #0 + mov r0, #4 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bl ov6_02246444 + add r0, r5, #0 + bl sub_02025EF0 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_0224645C + add r0, r5, #0 + bl sub_02025F30 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246450 + add r0, r4, #0 + mov r1, #2 + bl ov6_02246454 + add r0, r4, #0 + mov r1, #0xc + bl ov6_02246458 + add r0, r6, #0 + bl sub_0202E4D8 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246468 + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_022464F8 + + thumb_func_start ov6_02246550 +ov6_02246550: ; 0x02246550 + push {r4, r5, r6, lr} + ldr r0, [r0, #0xc] + add r5, r1, #0 + bl sub_02025E38 + add r6, r0, #0 + mov r0, #4 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + bl ov6_02246444 + add r0, r6, #0 + strb r5, [r4] + bl sub_02025EF0 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_0224645C + add r0, r6, #0 + bl sub_02025F30 + add r1, r0, #0 + add r0, r4, #0 + bl ov6_02246450 + add r0, r4, #0 + mov r1, #2 + bl ov6_02246454 + add r0, r4, #0 + mov r1, #0xc + bl ov6_02246458 + mov r0, #0 + str r0, [r4, #0x14] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02246550 + + thumb_func_start ov6_022465A0 +ov6_022465A0: ; 0x022465A0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + add r6, r2, #0 + bl sub_0202440C + add r7, r0, #0 + sub r0, r4, #4 + cmp r0, #1 + bhi _022465C0 + add r0, r5, #0 + add r1, r6, #0 + bl ov6_02246550 + pop {r3, r4, r5, r6, r7, pc} +_022465C0: + add r0, r6, #0 + bl sub_0202E7C0 + cmp r0, #0 + bne _022465DE + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0202E794 + add r1, r0, #0 + add r0, r5, #0 + bl ov6_022464A8 + pop {r3, r4, r5, r6, r7, pc} +_022465DE: + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_0202E768 + add r1, r0, #0 + add r0, r5, #0 + bl ov6_022464F8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022465A0 + + thumb_func_start ov6_022465F4 +ov6_022465F4: ; 0x022465F4 + ldr r3, _022465F8 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_022465F8: .word sub_020181C4 + thumb_func_end ov6_022465F4 \ No newline at end of file diff --git a/asm/ov6_022465FC.s b/asm/ov6_022465FC.s new file mode 100644 index 000000000..8c0d4de20 --- /dev/null +++ b/asm/ov6_022465FC.s @@ -0,0 +1,602 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_022465FC +ov6_022465FC: ; 0x022465FC + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_0202440C + mov r1, #1 + bl sub_0202E374 + pop {r3, pc} + thumb_func_end ov6_022465FC + + thumb_func_start ov6_0224660C +ov6_0224660C: ; 0x0224660C + push {r4, lr} + ldr r0, [r0, #0xc] + bl sub_0202440C + add r4, r0, #0 + bl sub_0202E380 + cmp r0, #1 + bne _02246622 + mov r0, #0 + pop {r4, pc} +_02246622: + add r0, r4, #0 + bl sub_0202E3DC + cmp r0, #0 + bne _02246630 + mov r0, #2 + pop {r4, pc} +_02246630: + cmp r0, #4 + bne _02246638 + mov r0, #1 + pop {r4, pc} +_02246638: + mov r0, #3 + pop {r4, pc} + thumb_func_end ov6_0224660C + + thumb_func_start ov6_0224663C +ov6_0224663C: ; 0x0224663C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r0, #0 + bl sub_02055BD0 + add r0, r0, #6 + mov r1, #7 + bl sub_020E1F6C + add r0, r4, #0 + add r5, r1, #0 + bl sub_02055BDC + add r6, r0, #0 + add r0, r4, #0 + bl sub_02055BE8 + mov r1, #0xf + bl sub_020E1F6C + add r6, #0x13 + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0x18 + bl sub_020E1F6C + add r6, r1, #0 + lsl r6, r6, #2 + mov r3, #7 + add r4, r4, r6 + str r3, [sp] + add r0, sp, #4 + mov r1, #0x7e + mov r2, #0 + mul r3, r4 + bl sub_02006AFC + add r0, sp, #4 + ldrb r4, [r0, r5] + cmp r4, #0 + beq _02246692 + cmp r4, #0xa + blo _02246696 +_02246692: + bl sub_02022974 +_02246696: + add r0, r4, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov6_0224663C + + thumb_func_start ov6_0224669C +ov6_0224669C: ; 0x0224669C + push {r4, lr} + sub sp, #8 + add r3, r0, #0 + sub r4, r3, #1 + mov r3, #0xc + mov r2, #1 + add r0, sp, #4 + mov r1, #0x7e + mul r3, r4 + str r2, [sp] + bl sub_02006AFC + add r0, sp, #4 + ldrb r0, [r0] + cmp r0, #6 + blo _022466C0 + bl sub_02022974 +_022466C0: + add r0, sp, #4 + ldrb r0, [r0] + add sp, #8 + pop {r4, pc} + thumb_func_end ov6_0224669C + + thumb_func_start ov6_022466C8 +ov6_022466C8: ; 0x022466C8 + push {r3, r4, lr} + sub sp, #4 + add r3, r0, #0 + sub r4, r3, #1 + mov r3, #0xc + mov r0, #0xb + mul r3, r4 + str r0, [sp] + add r0, r1, #0 + mov r1, #0x7e + mov r2, #1 + add r3, r3, #1 + bl sub_02006AFC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov6_022466C8 + + thumb_func_start ov6_022466E8 +ov6_022466E8: ; 0x022466E8 + mov r0, #1 + bx lr + thumb_func_end ov6_022466E8 + + thumb_func_start ov6_022466EC +ov6_022466EC: ; 0x022466EC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r1, #0 + str r0, [sp] + ldr r0, [r7, #0xc] + str r2, [sp, #4] + bl sub_0202440C + ldr r0, [sp] + add r1, sp, #8 + bl ov6_022466C8 + ldr r0, [sp, #4] + mov r1, #0 + mov r2, #0xb + bl sub_020C4CF4 + mov r6, #0 + add r4, r6, #0 + add r5, sp, #8 +_02246714: + ldrb r2, [r5] + cmp r2, #0 + beq _02246736 + ldr r1, [sp] + add r0, r7, #0 + bl ov6_022466E8 + cmp r0, #1 + bne _0224672E + ldrb r1, [r5] + ldr r0, [sp, #4] + strb r1, [r0, r4] + add r4, r4, #1 +_0224672E: + add r6, r6, #1 + add r5, r5, #1 + cmp r6, #0xb + blt _02246714 +_02246736: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022466EC + + thumb_func_start ov6_0224673C +ov6_0224673C: ; 0x0224673C + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + add r0, sp, #0 + mov r1, #0 + mov r2, #0xb + bl sub_020C4CF4 + mov r1, #0 + add r4, r1, #0 + add r2, sp, #0 +_02246752: + ldrb r0, [r5, r1] + cmp r0, #0 + beq _0224675E + strb r0, [r2] + add r2, r2, #1 + add r4, r4, #1 +_0224675E: + add r1, r1, #1 + cmp r1, #0xb + blt _02246752 + cmp r4, #0 + bne _0224676E + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_0224676E: + cmp r4, #1 + bne _0224677A + add r0, sp, #0 + add sp, #0xc + ldrb r0, [r0] + pop {r4, r5, pc} +_0224677A: + bl sub_0201D35C + add r1, r4, #0 + bl sub_020E2178 + add r0, sp, #0 + ldrb r0, [r0, r1] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov6_0224673C + + thumb_func_start ov6_0224678C +ov6_0224678C: ; 0x0224678C + push {r4, lr} + sub sp, #8 + add r4, r2, #0 + cmp r1, #4 + beq _022467AA + cmp r1, #5 + beq _022467AA + ldr r4, [sp, #0x10] + str r4, [sp] + ldr r4, [sp, #0x14] + str r4, [sp, #4] + bl sub_0202E614 + add sp, #8 + pop {r4, pc} +_022467AA: + ldr r1, [sp, #0x10] + cmp r1, #0 + beq _022467B6 + add sp, #8 + mov r0, #0 + pop {r4, pc} +_022467B6: + cmp r3, #0 + bne _022467C0 + add sp, #8 + mov r0, #0 + pop {r4, pc} +_022467C0: + add r1, r4, #0 + bl sub_0202E3C4 + cmp r0, #0 + bne _022467D4 + ldr r0, [sp, #0x14] + add sp, #8 + strb r4, [r0] + mov r0, #1 + pop {r4, pc} +_022467D4: + mov r0, #0 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0224678C + + thumb_func_start ov6_022467DC +ov6_022467DC: ; 0x022467DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #8] + ldr r6, [sp, #0x40] + ldr r0, [r1, #0xc] + str r2, [sp, #0xc] + str r3, [sp, #0x10] + ldr r5, [sp, #0x44] + bl sub_0202440C + str r0, [sp, #0x14] + ldrb r0, [r6] + mov r4, #0 + cmp r0, #0 + beq _0224683C + add r7, sp, #0x18 +_022467FC: + add r0, r7, #0 + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + ldr r0, [sp, #0x10] + ldr r1, [sp, #8] + str r0, [sp] + str r7, [sp, #4] + ldrb r2, [r6] + ldr r0, [sp, #0x14] + ldr r3, [sp, #0xc] + bl ov6_0224678C + cmp r0, #0 + beq _02246834 + mov r0, #0 + add r1, r7, #0 + b _0224682A +_02246822: + strb r2, [r5, r4] + add r4, r4, #1 + add r1, r1, #1 + add r0, r0, #1 +_0224682A: + ldrb r2, [r1] + cmp r2, #0 + beq _02246834 + cmp r0, #0x10 + blt _02246822 +_02246834: + add r6, r6, #1 + ldrb r0, [r6] + cmp r0, #0 + bne _022467FC +_0224683C: + add r0, r4, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022467DC + + thumb_func_start ov6_02246844 +ov6_02246844: ; 0x02246844 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + mov r4, #0 + b _02246876 +_02246850: + add r0, r6, #0 + add r1, r7, #0 + bl ov6_022465A0 + str r0, [sp] + ldr r2, [sp] + add r0, r7, #0 + add r1, r6, #0 + bl sub_0206CD2C + cmp r0, #0 + bne _0224686C + mov r0, #0 + strb r0, [r5] +_0224686C: + ldr r0, [sp] + bl ov6_022465F4 + add r5, r5, #1 + add r4, r4, #1 +_02246876: + ldrb r2, [r5] + cmp r2, #0 + beq _02246880 + cmp r4, #0x10 + blt _02246850 +_02246880: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02246844 + + thumb_func_start ov6_02246884 +ov6_02246884: ; 0x02246884 + push {r4, r5, r6, lr} + ldr r0, [r0, #0xc] + add r5, r1, #0 + bl sub_0202440C + ldrb r1, [r5] + add r4, r0, #0 + cmp r1, #0 + beq _022468AC + mov r6, #0 +_02246898: + add r0, r4, #0 + bl sub_0202E3C4 + cmp r0, #0 + beq _022468A4 + strb r6, [r5] +_022468A4: + add r5, r5, #1 + ldrb r1, [r5] + cmp r1, #0 + bne _02246898 +_022468AC: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02246884 + + thumb_func_start ov6_022468B0 +ov6_022468B0: ; 0x022468B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + bl ov6_0224663C + str r0, [sp, #8] + bl ov6_0224669C + add r4, r0, #0 + add r0, sp, #0x1c + mov r1, #0 + mov r2, #0xb + bl sub_020C4CF4 + add r0, sp, #0xc + mov r1, #0 + mov r2, #0x10 + bl sub_020C4CF4 + ldr r0, [sp, #8] + add r1, r5, #0 + add r2, sp, #0x1c + bl ov6_022466EC + add r0, sp, #0x1c + str r0, [sp] + add r0, sp, #0xc + str r0, [sp, #4] + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov6_022467DC + cmp r0, #0 + bne _02246902 + add sp, #0x28 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02246902: + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0xc + bl ov6_02246844 + add r0, r5, #0 + add r1, sp, #0xc + bl ov6_02246884 + add r0, r5, #0 + add r1, sp, #0xc + bl ov6_0224673C + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022468B0 + + thumb_func_start ov6_02246920 +ov6_02246920: ; 0x02246920 + push {r4, lr} + mov r1, #0 + add r2, r1, #0 + add r4, r0, #0 + bl ov6_022468B0 + cmp r0, #0 + bne _02246956 + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov6_022468B0 + cmp r0, #0 + bne _02246956 + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + bl ov6_022468B0 + cmp r0, #0 + bne _02246956 + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov6_022468B0 +_02246956: + pop {r4, pc} + thumb_func_end ov6_02246920 + + thumb_func_start ov6_02246958 +ov6_02246958: ; 0x02246958 + push {r4, lr} + bl ov6_0224663C + add r4, r0, #0 + cmp r4, #9 + bls _02246968 + bl sub_02022974 +_02246968: + ldr r2, _02246974 ; =0x02249470 + sub r1, r4, #1 + mov r0, #7 + mul r0, r1 + add r0, r2, r0 + pop {r4, pc} + ; .align 2, 0 +_02246974: .word 0x02249470 + thumb_func_end ov6_02246958 + + thumb_func_start ov6_02246978 +ov6_02246978: ; 0x02246978 + push {r4, r5, r6, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + add r5, r1, #0 + bl sub_0202440C + add r6, r0, #0 + add r0, r4, #0 + bl ov6_02246958 + add r4, r0, #0 + cmp r5, #3 + bhi _022469A6 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224699E: ; jump table + .short _022469AA - _0224699E - 2 ; case 0 + .short _022469C4 - _0224699E - 2 ; case 1 + .short _022469D6 - _0224699E - 2 ; case 2 + .short _022469DA - _0224699E - 2 ; case 3 +_022469A6: + bl sub_02022974 +_022469AA: + bl sub_02013960 + cmp r0, #0 + beq _022469B8 + cmp r0, #1 + beq _022469BC + b _022469C0 +_022469B8: + ldrb r0, [r4] + pop {r4, r5, r6, pc} +_022469BC: + ldrb r0, [r4, #1] + pop {r4, r5, r6, pc} +_022469C0: + ldrb r0, [r4, #2] + pop {r4, r5, r6, pc} +_022469C4: + add r0, r6, #0 + bl sub_0202E3DC + cmp r0, #0 + bne _022469D2 + ldrb r0, [r4, #3] + pop {r4, r5, r6, pc} +_022469D2: + ldrb r0, [r4, #4] + pop {r4, r5, r6, pc} +_022469D6: + ldrb r0, [r4, #5] + pop {r4, r5, r6, pc} +_022469DA: + ldrb r0, [r4, #6] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02246978 + + thumb_func_start ov6_022469E0 +ov6_022469E0: ; 0x022469E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + str r1, [sp, #4] + add r5, r2, #0 + add r6, r3, #0 + bl ov6_0224663C + bl ov6_0224669C + add r7, r0, #0 + ldr r0, [r4, #0xc] + bl sub_0202440C + add r1, r5, #0 + bl sub_0202E384 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov6_022465A0 + add r5, r0, #0 + bl ov6_0224647C + ldr r2, [sp, #4] + add r0, r7, #0 + add r1, r4, #0 + add r3, r5, #0 + str r6, [sp] + bl sub_0206CD00 + ldr r1, [sp, #0x20] + strh r0, [r1] + add r0, r5, #0 + bl ov6_022465F4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022469E0 + + .rodata + + + .global Unk_ov6_02249470 +Unk_ov6_02249470: ; 0x02249470 + .incbin "incbin/overlay6_rodata.bin", 0x65C, 0x3F + diff --git a/asm/ov6_02246A30.s b/asm/ov6_02246A30.s new file mode 100644 index 000000000..1ca0796f2 --- /dev/null +++ b/asm/ov6_02246A30.s @@ -0,0 +1,221 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246A30 +ov6_02246A30: ; 0x02246A30 + mov r0, #1 + bx lr + thumb_func_end ov6_02246A30 + + thumb_func_start ov6_02246A34 +ov6_02246A34: ; 0x02246A34 + mov r0, #0 + bx lr + thumb_func_end ov6_02246A34 + + thumb_func_start ov6_02246A38 +ov6_02246A38: ; 0x02246A38 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + mov r1, #2 + mov r2, #7 + bl sub_0206AF3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246A38 + + thumb_func_start ov6_02246A4C +ov6_02246A4C: ; 0x02246A4C + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + mov r1, #2 + add r2, r1, #0 + bl sub_0206AF3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246A4C + + thumb_func_start ov6_02246A60 +ov6_02246A60: ; 0x02246A60 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + mov r1, #2 + mov r2, #9 + bl sub_0206AF3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246A60 + + thumb_func_start ov6_02246A74 +ov6_02246A74: ; 0x02246A74 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + mov r1, #2 + mov r2, #0xa + bl sub_0206AF3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246A74 + + thumb_func_start ov6_02246A88 +ov6_02246A88: ; 0x02246A88 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + mov r1, #2 + mov r2, #0xb + bl sub_0206AF3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246A88 + + thumb_func_start ov6_02246A9C +ov6_02246A9C: ; 0x02246A9C + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + mov r1, #2 + mov r2, #0x11 + bl sub_0206AF3C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246A9C + + thumb_func_start ov6_02246AB0 +ov6_02246AB0: ; 0x02246AB0 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_02025E38 + bl sub_02025F58 + cmp r0, #5 + blt _02246AC4 + mov r0, #1 + pop {r3, pc} +_02246AC4: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov6_02246AB0 + + thumb_func_start ov6_02246AC8 +ov6_02246AC8: ; 0x02246AC8 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_02027560 + bl sub_02026F0C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246AC8 + + thumb_func_start ov6_02246AD8 +ov6_02246AD8: ; 0x02246AD8 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_02027560 + bl sub_02027520 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246AD8 + + thumb_func_start ov6_02246AE8 +ov6_02246AE8: ; 0x02246AE8 + push {r3, lr} + ldr r0, [r0, #0xc] + bl sub_020507E4 + bl sub_0206A954 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02246AE8 + + thumb_func_start ov6_02246AF8 +ov6_02246AF8: ; 0x02246AF8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + ldr r4, _02246B38 ; =0x022494B0 + str r0, [sp] + add r7, r1, #0 + mov r6, #0 + add r5, sp, #4 +_02246B06: + ldr r0, [sp] + ldr r1, [r4, #0] + blx r1 + add r6, r6, #1 + add r4, r4, #4 + stmia r5!, {r0} + cmp r6, #0xc + blo _02246B06 + mov r4, #0 + ldr r3, _02246B3C ; =0x02249878 + add r0, r4, #0 + add r2, sp, #4 +_02246B1E: + ldrb r1, [r3] + lsl r1, r1, #2 + ldr r1, [r2, r1] + cmp r1, #0 + beq _02246B2C + strb r4, [r7, r0] + add r0, r0, #1 +_02246B2C: + add r4, r4, #1 + add r3, r3, #1 + cmp r4, #0x23 + blo _02246B1E + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246B38: .word 0x022494B0 +_02246B3C: .word 0x02249878 + thumb_func_end ov6_02246AF8 + + thumb_func_start ov6_02246B40 +ov6_02246B40: ; 0x02246B40 + push {r3, r4, lr} + sub sp, #0x24 + add r4, r0, #0 + add r0, sp, #0 + mov r1, #0 + mov r2, #0x24 + bl sub_020C4CF4 + add r0, r4, #0 + add r1, sp, #0 + bl ov6_02246AF8 + add r4, r0, #0 + bne _02246B62 + add sp, #0x24 + mov r0, #0 + pop {r3, r4, pc} +_02246B62: + bl sub_0201D35C + add r1, r4, #0 + bl sub_020E2178 + add r0, sp, #0 + ldrb r0, [r0, r1] + add sp, #0x24 + pop {r3, r4, pc} + thumb_func_end ov6_02246B40 + + .rodata + + + .global Unk_ov6_022494B0 +Unk_ov6_022494B0: ; 0x022494B0 + .incbin "incbin/overlay6_rodata.bin", 0x69C, 0x30 + + + .data + + + .global Unk_ov6_02249878 +Unk_ov6_02249878: ; 0x02249878 + .incbin "incbin/overlay6_data.bin", 0x18, 0x23 + diff --git a/asm/ov6_02246B74.s b/asm/ov6_02246B74.s new file mode 100644 index 000000000..de9340a07 --- /dev/null +++ b/asm/ov6_02246B74.s @@ -0,0 +1,138 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246B74 +ov6_02246B74: ; 0x02246B74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r0, #0 + cmp r1, #0 + bne _02246BE8 + cmp r4, #0 + bne _02246B88 + add sp, #0x10 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02246B88: + add r0, sp, #0 + bl sub_020138A4 + ldr r0, [sp, #4] + cmp r0, #0 + bne _02246B98 + bl sub_02022974 +_02246B98: + ldr r0, [sp, #4] + cmp r0, #0xc + bls _02246BA2 + bl sub_02022974 +_02246BA2: + ldr r0, [sp, #4] + ldr r3, _02246BEC ; =0x0224954C + sub r0, r0, #1 + lsl r0, r0, #3 + ldr r6, [r3, r0] + add r2, r3, r0 + mov r1, #0 + cmp r6, #0 + ble _02246BE6 + ldr r3, [r2, #4] + ldr r5, [sp, #8] +_02246BB8: + lsl r0, r1, #1 + ldrh r7, [r3, r0] + asr r7, r7, #8 + lsl r7, r7, #0x18 + lsr r7, r7, #0x18 + cmp r5, r7 + bne _02246BDC + ldr r1, [r2, #4] + ldrh r0, [r1, r0] + lsl r0, r0, #0x18 + lsr r1, r0, #0x16 + ldr r0, _02246BF0 ; =0x02249538 + ldr r0, [r0, r1] + add r0, r4, r0 + bpl _02246BE8 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02246BDC: + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, r6 + blt _02246BB8 +_02246BE6: + add r0, r4, #0 +_02246BE8: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246BEC: .word 0x0224954C +_02246BF0: .word 0x02249538 + thumb_func_end ov6_02246B74 + + .rodata + + + .global Unk_ov6_022494E0 +Unk_ov6_022494E0: ; 0x022494E0 + .incbin "incbin/overlay6_rodata.bin", 0x6CC, 0x6CE - 0x6CC + + .global Unk_ov6_022494E2 +Unk_ov6_022494E2: ; 0x022494E2 + .incbin "incbin/overlay6_rodata.bin", 0x6CE, 0x6D4 - 0x6CE + + .global Unk_ov6_022494E8 +Unk_ov6_022494E8: ; 0x022494E8 + .incbin "incbin/overlay6_rodata.bin", 0x6D4, 0x6DA - 0x6D4 + + .global Unk_ov6_022494EE +Unk_ov6_022494EE: ; 0x022494EE + .incbin "incbin/overlay6_rodata.bin", 0x6DA, 0x6E0 - 0x6DA + + .global Unk_ov6_022494F4 +Unk_ov6_022494F4: ; 0x022494F4 + .incbin "incbin/overlay6_rodata.bin", 0x6E0, 0x6E6 - 0x6E0 + + .global Unk_ov6_022494FA +Unk_ov6_022494FA: ; 0x022494FA + .incbin "incbin/overlay6_rodata.bin", 0x6E6, 0x6EE - 0x6E6 + + .global Unk_ov6_02249502 +Unk_ov6_02249502: ; 0x02249502 + .incbin "incbin/overlay6_rodata.bin", 0x6EE, 0x6F6 - 0x6EE + + .global Unk_ov6_0224950A +Unk_ov6_0224950A: ; 0x0224950A + .incbin "incbin/overlay6_rodata.bin", 0x6F6, 0x6FE - 0x6F6 + + .global Unk_ov6_02249512 +Unk_ov6_02249512: ; 0x02249512 + .incbin "incbin/overlay6_rodata.bin", 0x6FE, 0x706 - 0x6FE + + .global Unk_ov6_0224951A +Unk_ov6_0224951A: ; 0x0224951A + .incbin "incbin/overlay6_rodata.bin", 0x706, 0x70E - 0x706 + + .global Unk_ov6_02249522 +Unk_ov6_02249522: ; 0x02249522 + .incbin "incbin/overlay6_rodata.bin", 0x70E, 0x716 - 0x70E + + .global Unk_ov6_0224952A +Unk_ov6_0224952A: ; 0x0224952A + .incbin "incbin/overlay6_rodata.bin", 0x716, 0x724 - 0x716 + + .global Unk_ov6_02249538 +Unk_ov6_02249538: ; 0x02249538 + .incbin "incbin/overlay6_rodata.bin", 0x724, 0x738 - 0x724 + + .global Unk_ov6_0224954C +Unk_ov6_0224954C: ; 0x0224954C + .incbin "incbin/overlay6_rodata.bin", 0x738, 0x60 + diff --git a/asm/ov6_02246BF4.s b/asm/ov6_02246BF4.s new file mode 100644 index 000000000..92f5734c7 --- /dev/null +++ b/asm/ov6_02246BF4.s @@ -0,0 +1,33 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246BF4 +ov6_02246BF4: ; 0x02246BF4 + push {r4, lr} + add r4, r1, #0 + bl sub_0202D834 + bl sub_0202D9CC + ldrb r1, [r0] + cmp r1, #0 + beq _02246C20 + sub r1, r1, #1 + strb r1, [r0] + ldrb r0, [r0] + cmp r0, #0 + bne _02246C20 + mov r1, #0x7f + add r0, r4, #0 + lsl r1, r1, #4 + mov r2, #0 + bl sub_0203E880 + mov r0, #1 + pop {r4, pc} +_02246C20: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov6_02246BF4 \ No newline at end of file diff --git a/asm/ov6_02246C24.s b/asm/ov6_02246C24.s new file mode 100644 index 000000000..2bfc5bc59 --- /dev/null +++ b/asm/ov6_02246C24.s @@ -0,0 +1,371 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246C24 +ov6_02246C24: ; 0x02246C24 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r6, r1, #0 + mov r1, #0x7b + add r2, sp, #4 + add r3, sp, #0 + add r5, r0, #0 + bl sub_020552B4 + cmp r0, #0 + beq _02246C90 + mov r0, #4 + mov r1, #0x18 + bl sub_02018184 + add r4, r0, #0 + strb r6, [r4, #0xc] + mov r0, #0 + strb r0, [r4, #0xd] + strb r0, [r4, #0xe] + strb r0, [r4, #0xf] + ldr r0, [r5, #0x2c] + bl sub_02039E10 + add r1, r0, #0 + ldr r0, [sp] + add r2, sp, #0x14 + bl sub_020553A4 + ldr r1, [sp, #4] + add r0, sp, #8 + bl ov5_021E1894 + add r3, sp, #8 + ldmia r3!, {r0, r1} + add r2, r4, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [r4, #0] + ldr r0, [sp, #0x14] + add r2, r4, #0 + add r0, r1, r0 + str r0, [r4, #0] + ldr r1, [r4, #8] + ldr r0, [sp, #0x1c] + add r0, r1, r0 + str r0, [r4, #8] + ldr r0, [r5, #0x10] + ldr r1, _02246C98 ; =ov6_02246C9C + bl sub_02050944 + add sp, #0x20 + pop {r4, r5, r6, pc} +_02246C90: + bl sub_02022974 + add sp, #0x20 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02246C98: .word ov6_02246C9C + thumb_func_end ov6_02246C24 + + thumb_func_start ov6_02246C9C +ov6_02246C9C: ; 0x02246C9C + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r4, r0, #0 + bl sub_02050A60 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldrb r1, [r4, #0xf] + cmp r1, #5 + bls _02246CB8 + b _02246EE2 +_02246CB8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246CC4: ; jump table + .short _02246CD0 - _02246CC4 - 2 ; case 0 + .short _02246DA4 - _02246CC4 - 2 ; case 1 + .short _02246E2C - _02246CC4 - 2 ; case 2 + .short _02246E58 - _02246CC4 - 2 ; case 3 + .short _02246E7A - _02246CC4 - 2 ; case 4 + .short _02246ED8 - _02246CC4 - 2 ; case 5 +_02246CD0: + ldr r0, _02246EE8 ; =0x00000205 + ldr r1, [r6, #0x30] + bl ov5_021EF9E8 + add r5, r0, #0 + ldr r1, [r6, #0x30] + mov r0, #0x7c + bl ov5_021EF9E8 + add r7, r0, #0 + ldr r0, [r5, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _02246D0E + add r2, r0, #0 + add r2, #8 + beq _02246D02 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _02246D02 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _02246D04 +_02246D02: + mov r1, #0 +_02246D04: + cmp r1, #0 + beq _02246D0E + ldr r1, [r1, #0] + add r5, r0, r1 + b _02246D10 +_02246D0E: + mov r5, #0 +_02246D10: + ldr r0, [r7, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _02246D3A + add r2, r0, #0 + add r2, #8 + beq _02246D2E + ldrb r1, [r0, #9] + cmp r1, #0 + bls _02246D2E + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _02246D30 +_02246D2E: + mov r1, #0 +_02246D30: + cmp r1, #0 + beq _02246D3A + ldr r1, [r1, #0] + add r7, r0, r1 + b _02246D3C +_02246D3A: + mov r7, #0 +_02246D3C: + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + mov r1, #0 + str r1, [sp] + str r5, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r1, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + ldr r3, _02246EE8 ; =0x00000205 + mov r2, #0x10 + bl ov5_021D41C8 + add r0, r6, #0 + mov r1, #0x7c + add r2, sp, #0x18 + mov r3, #0 + bl sub_020552B4 + cmp r0, #0 + bne _02246D72 + bl sub_02022974 +_02246D72: + ldr r0, [sp, #0x18] + bl ov5_021E18BC + add r5, r0, #0 + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + str r5, [sp] + str r7, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #0x20 + mov r3, #0x7c + bl ov5_021D41C8 + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02246EE2 +_02246DA4: + add r1, sp, #0x1c + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + ldrb r2, [r4, #0xd] + mov r1, #0xc + ldr r0, [r4, #0] + add r3, r2, #0 + ldr r2, _02246EEC ; =0x0224989C + mul r3, r1 + ldr r2, [r2, r3] + add r0, r0, r2 + str r0, [sp, #0x28] + ldrb r2, [r4, #0xd] + ldr r0, [r4, #4] + add r3, r2, #0 + ldr r2, _02246EF0 ; =0x022498A0 + mul r3, r1 + ldr r2, [r2, r3] + add r0, r0, r2 + str r0, [sp, #0x2c] + ldrb r2, [r4, #0xd] + ldr r0, [r4, #8] + add r3, r2, #0 + mul r3, r1 + ldr r1, _02246EF4 ; =0x022498A4 + ldr r1, [r1, r3] + add r0, r0, r1 + str r0, [sp, #0x30] + ldr r0, _02246EF8 ; =0x000005FE + bl sub_02005748 + add r0, sp, #0x1c + str r0, [sp] + ldr r0, [r6, #0x50] + ldr r2, _02246EE8 ; =0x00000205 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r6, #0x30] + add r3, sp, #0x28 + bl ov5_021E19CC + ldrb r1, [r4, #0xd] + add r1, r4, r1 + strb r0, [r1, #0x10] + ldrb r1, [r4, #0xd] + add r0, r6, #0 + add r0, #0xa4 + add r1, r4, r1 + ldrb r1, [r1, #0x10] + ldr r0, [r0, #0] + bl ov5_021E18E0 + bl ov5_021E18BC + add r3, r0, #0 + ldrb r2, [r4, #0xd] + ldr r0, [r6, #0x54] + mov r1, #0x10 + bl ov5_021D4220 + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02246EE2 +_02246E2C: + ldrb r0, [r4, #0xe] + cmp r0, #0xf + bhs _02246E38 + add r0, r0, #1 + strb r0, [r4, #0xe] + b _02246EE2 +_02246E38: + mov r0, #0 + strb r0, [r4, #0xe] + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r1, [r4, #0xd] + ldrb r0, [r4, #0xc] + cmp r1, r0 + bhs _02246E50 + mov r0, #1 + strb r0, [r4, #0xf] + b _02246EE2 +_02246E50: + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02246EE2 +_02246E58: + ldr r0, [r6, #0x54] + mov r1, #0x10 + mov r2, #0 + bl ov5_021D4250 + ldr r0, [r6, #0x54] + mov r1, #0x20 + mov r2, #0 + bl ov5_021D4250 + ldr r0, _02246EFC ; =0x0000048E + bl sub_02006150 + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02246EE2 +_02246E7A: + ldr r0, [r6, #0x54] + mov r1, #0x10 + bl ov5_021D42F0 + cmp r0, #0 + beq _02246EE2 + ldr r0, [r6, #0x54] + mov r1, #0x20 + bl ov5_021D42F0 + cmp r0, #0 + beq _02246EE2 + bl sub_020061E4 + cmp r0, #0 + bne _02246EE2 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #0x20 + bl ov5_021D42B0 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #0x10 + bl ov5_021D42B0 + ldrb r0, [r4, #0xc] + mov r5, #0 + cmp r0, #0 + bls _02246ED0 +_02246EB6: + add r0, r4, r5 + add r1, r6, #0 + add r1, #0xa4 + ldrb r0, [r0, #0x10] + ldr r1, [r1, #0] + bl ov5_021E1674 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldrb r0, [r4, #0xc] + cmp r5, r0 + blo _02246EB6 +_02246ED0: + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02246EE2 +_02246ED8: + bl sub_020181C4 + add sp, #0x34 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02246EE2: + mov r0, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02246EE8: .word 0x00000205 +_02246EEC: .word 0x0224989C +_02246EF0: .word 0x022498A0 +_02246EF4: .word 0x022498A4 +_02246EF8: .word 0x000005FE +_02246EFC: .word 0x0000048E + thumb_func_end ov6_02246C9C + .data + + + .global Unk_ov6_0224989C +Unk_ov6_0224989C: ; 0x0224989C + .incbin "incbin/overlay6_data.bin", 0x3C, 0x48 + diff --git a/asm/ov6_02246F00.s b/asm/ov6_02246F00.s new file mode 100644 index 000000000..1a47ea53f --- /dev/null +++ b/asm/ov6_02246F00.s @@ -0,0 +1,193 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02246F00 +ov6_02246F00: ; 0x02246F00 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + mov r2, #0 + ldr r1, _02246F38 ; =0x000001F2 + add r3, r2, #0 + add r5, r0, #0 + bl sub_020552B4 + cmp r0, #0 + beq _02246F32 + mov r0, #4 + add r1, r0, #0 + bl sub_02018184 + add r2, r0, #0 + strb r6, [r2] + strb r4, [r2, #1] + mov r0, #0 + strb r0, [r2, #2] + ldr r0, [r5, #0x10] + ldr r1, _02246F3C ; =ov6_02246F40 + bl sub_02050944 + pop {r4, r5, r6, pc} +_02246F32: + bl sub_02022974 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02246F38: .word 0x000001F2 +_02246F3C: .word ov6_02246F40 + thumb_func_end ov6_02246F00 + + thumb_func_start ov6_02246F40 +ov6_02246F40: ; 0x02246F40 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r0, #0 + bl sub_02050A60 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldrb r1, [r4, #2] + cmp r1, #4 + bls _02246F5C + b _02247064 +_02246F5C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02246F68: ; jump table + .short _02246F72 - _02246F68 - 2 ; case 0 + .short _02246FEE - _02246F68 - 2 ; case 1 + .short _0224701C - _02246F68 - 2 ; case 2 + .short _02247048 - _02246F68 - 2 ; case 3 + .short _0224705A - _02246F68 - 2 ; case 4 +_02246F72: + ldr r0, _0224706C ; =0x000001F2 + ldr r1, [r6, #0x30] + bl ov5_021EF9E8 + ldr r0, [r0, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _02246FA4 + add r2, r0, #0 + add r2, #8 + beq _02246F98 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _02246F98 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _02246F9A +_02246F98: + mov r1, #0 +_02246F9A: + cmp r1, #0 + beq _02246FA4 + ldr r1, [r1, #0] + add r7, r0, r1 + b _02246FA6 +_02246FA4: + mov r7, #0 +_02246FA6: + ldr r1, _0224706C ; =0x000001F2 + add r0, r6, #0 + add r2, sp, #0x18 + mov r3, #0 + bl sub_020552B4 + cmp r0, #0 + bne _02246FBA + bl sub_02022974 +_02246FBA: + ldr r0, [sp, #0x18] + bl ov5_021E18BC + add r5, r0, #0 + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + str r5, [sp] + str r7, [sp, #4] + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + ldrb r0, [r4] + ldr r3, _0224706C ; =0x000001F2 + mov r2, #1 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + bl ov5_021D41C8 + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] + b _02247064 +_02246FEE: + ldrb r0, [r4, #1] + mov r1, #1 + cmp r0, #0 + beq _02246FFC + cmp r0, #1 + beq _02246FFC + mov r1, #0 +_02246FFC: + cmp r1, #0 + bne _02247004 + bl sub_02022974 +_02247004: + ldrb r2, [r4, #1] + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D4250 + ldr r0, _02247070 ; =0x00000612 + bl sub_02005748 + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] + b _02247064 +_0224701C: + ldr r0, [r6, #0x54] + mov r1, #1 + bl ov5_021D42F0 + cmp r0, #0 + beq _02247064 + ldr r0, _02247070 ; =0x00000612 + mov r1, #0 + bl sub_020057A4 + ldr r0, _02247074 ; =0x000005F1 + bl sub_02005748 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #1 + bl ov5_021D42B0 + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] + b _02247064 +_02247048: + ldr r0, _02247074 ; =0x000005F1 + bl sub_020057D4 + cmp r0, #0 + bne _02247064 + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] + b _02247064 +_0224705A: + bl sub_020181C4 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02247064: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0224706C: .word 0x000001F2 +_02247070: .word 0x00000612 +_02247074: .word 0x000005F1 + thumb_func_end ov6_02246F40 \ No newline at end of file diff --git a/asm/ov6_02247078.s b/asm/ov6_02247078.s new file mode 100644 index 000000000..6261d5d84 --- /dev/null +++ b/asm/ov6_02247078.s @@ -0,0 +1,89 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247078 +ov6_02247078: ; 0x02247078 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r4, _022470E4 ; =0x022495AC + add r3, sp, #0x20 + add r5, r0, #0 + add r7, r1, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, sp, #0x18 + str r0, [sp] + add r1, r2, #0 + add r0, r5, #0 + mov r2, #4 + add r3, sp, #0x1c + bl sub_02055324 + cmp r0, #0 + beq _022470DA + ldr r0, [r5, #0x30] + bl ov5_021EFAA0 + add r6, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021E18BC + add r4, r0, #0 + ldr r0, [sp, #0x1c] + bl ov5_021E18C0 + str r4, [sp] + str r0, [sp, #4] + str r6, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [r5, #0x50] + ldr r1, [r5, #0x54] + ldr r3, [sp, #0x18] + add r2, r7, #0 + bl ov5_021D41C8 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} +_022470DA: + bl sub_02022974 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_022470E4: .word 0x022495AC + thumb_func_end ov6_02247078 + + thumb_func_start ov6_022470E8 +ov6_022470E8: ; 0x022470E8 + ldr r3, _022470F0 ; =ov5_021D4250 + ldr r0, [r0, #0x54] + mov r2, #0 + bx r3 + ; .align 2, 0 +_022470F0: .word ov5_021D4250 + thumb_func_end ov6_022470E8 + + thumb_func_start ov6_022470F4 +ov6_022470F4: ; 0x022470F4 + ldr r3, _022470FC ; =ov5_021D4250 + ldr r0, [r0, #0x54] + mov r2, #1 + bx r3 + ; .align 2, 0 +_022470FC: .word ov5_021D4250 + thumb_func_end ov6_022470F4 + + .rodata + + + .global Unk_ov6_022495AC +Unk_ov6_022495AC: ; 0x022495AC + .incbin "incbin/overlay6_rodata.bin", 0x798, 0x10 + diff --git a/asm/ov6_02247100.s b/asm/ov6_02247100.s new file mode 100644 index 000000000..280d9efbe --- /dev/null +++ b/asm/ov6_02247100.s @@ -0,0 +1,661 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247100 +ov6_02247100: ; 0x02247100 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + mov r1, #0x24 + bl ov6_02247590 + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #8] + str r5, [r4, #0x1c] + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + str r0, [r4, #0x18] + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02247100 + + thumb_func_start ov6_02247120 +ov6_02247120: ; 0x02247120 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_02050A60 + add r7, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r5, r0, #0 +_02247132: + ldr r3, [r5, #0] + add r0, r6, #0 + lsl r4, r3, #2 + ldr r3, _02247158 ; =0x022495CC + add r1, r7, #0 + ldr r3, [r3, r4] + add r2, r5, #0 + blx r3 + add r4, r0, #0 + cmp r4, #2 + bne _0224714E + add r0, r5, #0 + bl sub_020181C4 +_0224714E: + cmp r4, #1 + beq _02247132 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247158: .word 0x022495CC + thumb_func_end ov6_02247120 + + thumb_func_start ov6_0224715C +ov6_0224715C: ; 0x0224715C + push {r4, lr} + add r0, r1, #0 + mov r1, #4 + add r4, r2, #0 + bl ov5_021F0EB0 + ldr r2, _022471B0 ; =0xFFF6A000 + str r0, [r4, #0x14] + mov r1, #1 + mov r3, #0xf + bl ov5_021F0F10 + ldr r0, [r4, #0x18] + ldr r1, _022471B4 ; =0x02249608 + bl sub_02065700 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + ldr r0, [r4, #8] + cmp r0, #0 + beq _02247194 + cmp r0, #1 + beq _0224719C + cmp r0, #2 + beq _022471A4 + b _022471AA +_02247194: + ldr r0, _022471B8 ; =0x00000603 + bl sub_02005748 + b _022471AA +_0224719C: + ldr r0, _022471B8 ; =0x00000603 + bl sub_02005748 + b _022471AA +_022471A4: + ldr r0, _022471BC ; =0x0000064E + bl sub_02005748 +_022471AA: + mov r0, #0 + pop {r4, pc} + nop +_022471B0: .word 0xFFF6A000 +_022471B4: .word 0x02249608 +_022471B8: .word 0x00000603 +_022471BC: .word 0x0000064E + thumb_func_end ov6_0224715C + + thumb_func_start ov6_022471C0 +ov6_022471C0: ; 0x022471C0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r0, [r4, #0xc] + bl sub_0206574C + cmp r0, #0 + bne _022471D6 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_022471D6: + ldr r0, [r4, #0xc] + bl sub_02065758 + ldr r0, [r4, #0x18] + ldr r1, _0224723C ; =0x022495DC + bl sub_02065700 + str r0, [r4, #0xc] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #8 + bge _022471F6 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_022471F6: + ldr r0, [r4, #8] + cmp r0, #2 + bne _02247216 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + b _0224722E +_02247216: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0 + ldr r3, _02247240 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 +_0224722E: + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + nop +_0224723C: .word 0x022495DC +_02247240: .word 0x00007FFF + thumb_func_end ov6_022471C0 + + thumb_func_start ov6_02247244 +ov6_02247244: ; 0x02247244 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0xc] + bl sub_0206574C + cmp r0, #1 + bne _02247262 + ldr r0, [r4, #0xc] + bl sub_02065758 + ldr r0, [r4, #0x18] + ldr r1, _02247284 ; =0x022495DC + bl sub_02065700 + str r0, [r4, #0xc] +_02247262: + bl sub_0200F2AC + cmp r0, #0 + bne _0224726E + mov r0, #0 + pop {r4, pc} +_0224726E: + ldr r0, [r4, #0xc] + bl sub_02065758 + ldr r0, [r4, #0x14] + bl ov5_021F0EFC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_02247284: .word 0x022495DC + thumb_func_end ov6_02247244 + + thumb_func_start ov6_02247288 +ov6_02247288: ; 0x02247288 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r1, #0xc] + add r4, r2, #0 + bl sub_0203A790 + ldr r1, [r4, #8] + cmp r1, #2 + bne _022472B2 + bl sub_0203A75C + add r1, sp, #0 + bl sub_0203A7F0 + ldr r2, [r4, #8] + add r0, r5, #0 + add r1, sp, #0 + bl sub_02053CD4 + b _022472C0 +_022472B2: + bl sub_0203A72C + add r1, r0, #0 + ldr r2, [r4, #8] + add r0, r5, #0 + bl sub_02053CD4 +_022472C0: + mov r0, #2 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02247288 + + thumb_func_start ov6_022472C8 +ov6_022472C8: ; 0x022472C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, r1, #0 + mov r1, #0x24 + add r6, r2, #0 + bl ov6_02247590 + add r4, r0, #0 + str r6, [r4, #8] + str r5, [r4, #0x1c] + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + str r0, [r4, #0x18] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_022472C8 + + thumb_func_start ov6_022472E8 +ov6_022472E8: ; 0x022472E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02050A60 + add r6, r0, #0 + add r0, r5, #0 + bl sub_02050A64 + ldr r7, _02247328 ; =0x022495BC + add r4, r0, #0 +_022472FC: + ldr r3, [r4, #0] + add r0, r5, #0 + lsl r3, r3, #2 + ldr r3, [r7, r3] + add r1, r6, #0 + add r2, r4, #0 + blx r3 + cmp r0, #2 + bne _02247320 + add r0, r6, #0 + add r1, r4, #0 + bl ov6_0224732C + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02247320: + cmp r0, #1 + beq _022472FC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247328: .word 0x022495BC + thumb_func_end ov6_022472E8 + + thumb_func_start ov6_0224732C +ov6_0224732C: ; 0x0224732C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #8] + cmp r0, #2 + bne _02247352 + ldr r1, [r4, #0x1c] + mov r0, #9 + ldr r1, [r1, #0] + mov r2, #4 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0202BE00 + add r4, #0x9c + add r1, r0, #0 + ldr r0, [r4, #0] + mov r2, #1 + bl sub_0202B758 +_02247352: + pop {r4, pc} + thumb_func_end ov6_0224732C + + thumb_func_start ov6_02247354 +ov6_02247354: ; 0x02247354 + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r0, [r4, #8] + add r5, r1, #0 + cmp r0, #2 + bne _0224737A + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + b _02247390 +_0224737A: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r3, _022473BC ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 +_02247390: + add r0, r5, #0 + mov r1, #4 + bl ov5_021F0EB0 + mov r1, #1 + ldr r2, _022473C0 ; =0xFFF6A000 + str r0, [r4, #0x14] + add r3, r1, #0 + bl ov5_021F0F10 + ldr r0, [r4, #0x18] + ldr r1, _022473C4 ; =0x022495DC + bl sub_02065700 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_022473BC: .word 0x00007FFF +_022473C0: .word 0xFFF6A000 +_022473C4: .word 0x022495DC + thumb_func_end ov6_02247354 + + thumb_func_start ov6_022473C8 +ov6_022473C8: ; 0x022473C8 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0xc] + bl sub_0206574C + cmp r0, #1 + bne _022473E6 + ldr r0, [r4, #0xc] + bl sub_02065758 + ldr r0, [r4, #0x18] + ldr r1, _02247408 ; =0x022495DC + bl sub_02065700 + str r0, [r4, #0xc] +_022473E6: + bl sub_0200F2AC + cmp r0, #0 + bne _022473F2 + mov r0, #0 + pop {r4, pc} +_022473F2: + ldr r0, [r4, #0x14] + mov r1, #2 + mov r2, #0 + mov r3, #0x3c + bl ov5_021F0F10 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_02247408: .word 0x022495DC + thumb_func_end ov6_022473C8 + + thumb_func_start ov6_0224740C +ov6_0224740C: ; 0x0224740C + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0xc] + bl sub_0206574C + cmp r0, #0 + bne _0224741E + mov r0, #0 + pop {r4, pc} +_0224741E: + ldr r0, [r4, #0xc] + bl sub_02065758 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + cmp r0, #4 + ldr r0, [r4, #0x18] + bge _0224743C + ldr r1, _02247450 ; =0x022495DC + bl sub_02065700 + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_0224743C: + ldr r1, _02247454 ; =0x0224966C + bl sub_02065700 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r4, pc} + nop +_02247450: .word 0x022495DC +_02247454: .word 0x0224966C + thumb_func_end ov6_0224740C + + thumb_func_start ov6_02247458 +ov6_02247458: ; 0x02247458 + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0xc] + bl sub_0206574C + cmp r0, #0 + bne _0224746A + mov r0, #0 + pop {r4, pc} +_0224746A: + ldr r0, [r4, #0x14] + bl ov5_021F0EF0 + cmp r0, #0 + bne _02247478 + mov r0, #0 + pop {r4, pc} +_02247478: + ldr r0, [r4, #0x14] + bl ov5_021F0EFC + ldr r0, [r4, #0xc] + bl sub_02065758 + mov r0, #2 + pop {r4, pc} + thumb_func_end ov6_02247458 + + thumb_func_start ov6_02247488 +ov6_02247488: ; 0x02247488 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r0, r2, #0 + mov r1, #0x24 + bl ov6_02247590 + add r4, r0, #0 + mov r0, #1 + str r0, [r4, #8] + str r5, [r4, #0x1c] + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + str r0, [r4, #0x18] + str r6, [r4, #0x20] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02247488 + + thumb_func_start ov6_022474AC +ov6_022474AC: ; 0x022474AC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_02050A60 + add r7, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r5, r0, #0 +_022474BE: + ldr r3, [r5, #0] + add r0, r6, #0 + lsl r4, r3, #2 + ldr r3, _022474E4 ; =0x022495F0 + add r1, r7, #0 + ldr r3, [r3, r4] + add r2, r5, #0 + blx r3 + add r4, r0, #0 + cmp r4, #2 + bne _022474DA + add r0, r5, #0 + bl sub_020181C4 +_022474DA: + cmp r4, #1 + beq _022474BE + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022474E4: .word 0x022495F0 + thumb_func_end ov6_022474AC + + thumb_func_start ov6_022474E8 +ov6_022474E8: ; 0x022474E8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r0, [r5, #0x3c] + add r4, r2, #0 + bl sub_0205EB98 + add r3, r0, #0 + ldr r2, [r4, #0x20] + add r0, r5, #0 + mov r1, #0 + bl ov6_02243F88 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov6_022474E8 + + thumb_func_start ov6_0224750C +ov6_0224750C: ; 0x0224750C + push {r4, lr} + add r4, r2, #0 + ldr r0, [r4, #0x10] + bl ov6_02243FBC + cmp r0, #0 + bne _0224751E + mov r0, #0 + pop {r4, pc} +_0224751E: + ldr r0, [r4, #0x10] + bl ov6_02243FC8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_0224750C + + thumb_func_start ov6_02247530 +ov6_02247530: ; 0x02247530 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + add r0, r2, #0 + mov r1, #0x24 + bl ov6_02247590 + add r4, r0, #0 + mov r0, #2 + str r0, [r4, #8] + str r5, [r4, #0x1c] + ldr r0, [r5, #0x3c] + bl sub_0205EB3C + str r0, [r4, #0x18] + str r6, [r4, #0x20] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov6_02247530 + + thumb_func_start ov6_02247554 +ov6_02247554: ; 0x02247554 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_02050A60 + add r7, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r5, r0, #0 +_02247566: + ldr r3, [r5, #0] + add r0, r6, #0 + lsl r4, r3, #2 + ldr r3, _0224758C ; =0x022495F0 + add r1, r7, #0 + ldr r3, [r3, r4] + add r2, r5, #0 + blx r3 + add r4, r0, #0 + cmp r4, #2 + bne _02247582 + add r0, r5, #0 + bl sub_020181C4 +_02247582: + cmp r4, #1 + beq _02247566 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224758C: .word 0x022495F0 + thumb_func_end ov6_02247554 + + thumb_func_start ov6_02247590 +ov6_02247590: ; 0x02247590 + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_02018184 + add r4, r0, #0 + bne _022475A0 + bl sub_02022974 +_022475A0: + add r0, r4, #0 + mov r1, #0 + add r2, r5, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02247590 + + .rodata + + + .global Unk_ov6_022495BC +Unk_ov6_022495BC: ; 0x022495BC + .incbin "incbin/overlay6_rodata.bin", 0x7A8, 0x7B8 - 0x7A8 + + .global Unk_ov6_022495CC +Unk_ov6_022495CC: ; 0x022495CC + .incbin "incbin/overlay6_rodata.bin", 0x7B8, 0x7C8 - 0x7B8 + + .global Unk_ov6_022495DC +Unk_ov6_022495DC: ; 0x022495DC + .incbin "incbin/overlay6_rodata.bin", 0x7C8, 0x7DC - 0x7C8 + + .global Unk_ov6_022495F0 +Unk_ov6_022495F0: ; 0x022495F0 + .incbin "incbin/overlay6_rodata.bin", 0x7DC, 0x7F4 - 0x7DC + + .global Unk_ov6_02249608 +Unk_ov6_02249608: ; 0x02249608 + .incbin "incbin/overlay6_rodata.bin", 0x7F4, 0x858 - 0x7F4 + + .global Unk_ov6_0224966C +Unk_ov6_0224966C: ; 0x0224966C + .incbin "incbin/overlay6_rodata.bin", 0x858, 0x68 + diff --git a/asm/ov6_022475B0.s b/asm/ov6_022475B0.s new file mode 100644 index 000000000..fdb94470b --- /dev/null +++ b/asm/ov6_022475B0.s @@ -0,0 +1,99 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_022475B0 +ov6_022475B0: ; 0x022475B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + mov r0, #0x6a + mov r1, #8 + mov r2, #4 + bl sub_02006ADC + add r4, r0, #0 + add r1, sp, #4 + ldr r0, [sp] + add r1, #2 + add r2, sp, #4 + bl sub_0202DA10 + add r0, sp, #4 + ldrh r1, [r0, #2] + ldr r0, _02247620 ; =0x0000FFFF + cmp r1, r0 + beq _022475DE + lsl r0, r1, #2 + ldr r6, [r4, r0] + b _022475E0 +_022475DE: + mov r6, #0 +_022475E0: + add r0, sp, #4 + ldrh r1, [r0] + ldr r0, _02247620 ; =0x0000FFFF + cmp r1, r0 + beq _022475F0 + lsl r0, r1, #2 + ldr r7, [r4, r0] + b _022475F2 +_022475F0: + mov r7, #0 +_022475F2: + bl sub_0201D2E8 + lsl r0, r0, #4 + lsr r5, r0, #0x10 + cmp r5, #0x10 + blo _02247602 + bl sub_02022974 +_02247602: + lsl r0, r5, #2 + ldr r0, [r4, r0] + cmp r6, r0 + beq _022475F2 + cmp r7, r0 + beq _022475F2 + ldr r0, [sp] + add r1, r5, #0 + bl sub_0202DA24 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02247620: .word 0x0000FFFF + thumb_func_end ov6_022475B0 + + thumb_func_start ov6_02247624 +ov6_02247624: ; 0x02247624 + push {r3, r4, lr} + sub sp, #4 + add r1, sp, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0202DA10 + add r0, sp, #0 + ldrh r1, [r0, #2] + ldr r0, _0224765C ; =0x0000FFFF + cmp r1, r0 + bne _02247640 + bl sub_02022974 +_02247640: + mov r0, #0x6a + mov r1, #8 + mov r2, #4 + bl sub_02006ADC + add r1, sp, #0 + ldrh r1, [r1, #2] + lsl r1, r1, #2 + ldr r4, [r0, r1] + bl sub_020181C4 + add r0, r4, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0224765C: .word 0x0000FFFF + thumb_func_end ov6_02247624 \ No newline at end of file diff --git a/asm/ov6_02247660.s b/asm/ov6_02247660.s new file mode 100644 index 000000000..7ae2e917b --- /dev/null +++ b/asm/ov6_02247660.s @@ -0,0 +1,189 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247660 +ov6_02247660: ; 0x02247660 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r0, #0 + bl sub_0201D2E8 + lsl r0, r0, #1 + lsr r4, r0, #0x10 + cmp r4, #2 + blo _02247676 + bl sub_02022974 +_02247676: + cmp r4, #0 + bne _02247680 + add sp, #0x4c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_02247680: + ldr r0, [r5, #0xc] + bl sub_0202B4A0 + bl sub_0202B428 + add r4, r0, #0 + ldr r0, [r5, #0x3c] + add r1, sp, #0x18 + add r2, sp, #0x14 + bl sub_020615AC + ldr r0, [r5, #0x2c] + bl sub_02039E10 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + lsr r0, r4, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x3c] + lsr r0, r4, #0x10 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x40] + lsr r0, r4, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x44] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x48] + mov r0, #0x6a + mov r1, #1 + mov r2, #4 + bl sub_02006ADC + str r0, [sp, #0xc] + mov r4, #0 + ldr r0, [r0, #0] + add r3, r4, #0 + cmp r0, #0 + ble _022476EA +_022476D6: + ldr r1, [sp, #0xc] + lsl r2, r3, #2 + add r1, r1, r2 + ldr r1, [r1, #4] + add r4, r4, r1 + add r1, r3, #1 + lsl r1, r1, #0x18 + lsr r3, r1, #0x18 + cmp r3, r0 + blt _022476D6 +_022476EA: + lsl r0, r0, #1 + add r0, r0, #2 + lsl r1, r0, #1 + ldr r0, [sp, #0xc] + add r0, r0, r1 + str r0, [sp, #8] + asr r0, r4, #1 + lsr r0, r0, #0x1e + add r0, r4, r0 + mov r1, #1 + asr r0, r0, #2 + lsl r1, r1, #8 + str r0, [sp, #0x10] + cmp r0, r1 + blt _0224770C + bl sub_02022974 +_0224770C: + lsr r2, r4, #0x1f + lsl r1, r4, #0x1e + sub r1, r1, r2 + mov r0, #0x1e + ror r1, r0 + add r0, r2, r1 + lsl r0, r0, #0x18 + mov r7, #0 + lsr r6, r0, #0x18 + add r5, r7, #0 +_02247720: + lsl r4, r5, #2 + add r0, sp, #0x3c + ldr r0, [r0, r4] + ldr r1, [sp, #0x10] + bl sub_020E1F6C + ldr r0, [sp, #0x10] + add r2, r0, #0 + mul r2, r5 + add r0, r1, r2 + add r1, r7, r0 + add r0, sp, #0x2c + str r1, [r0, r4] + ldr r0, [r0, r4] + lsl r1, r0, #1 + ldr r0, [sp, #8] + cmp r6, #0 + ldrh r1, [r0, r1] + add r0, sp, #0x1c + str r1, [r0, r4] + beq _02247756 + add r0, r7, #1 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + sub r0, r6, #1 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 +_02247756: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #4 + blo _02247720 + ldr r0, [sp] + ldr r1, [sp, #0x14] + lsl r0, r0, #5 + mul r0, r1 + ldr r2, [sp, #0x18] + mov r3, #0 + add r2, r2, r0 + add r1, sp, #0x1c +_02247770: + lsl r0, r3, #2 + ldr r0, [r1, r0] + cmp r2, r0 + bne _0224777E + mov r0, #1 + str r0, [sp, #4] + b _02247788 +_0224777E: + add r0, r3, #1 + lsl r0, r0, #0x18 + lsr r3, r0, #0x18 + cmp r3, #4 + blo _02247770 +_02247788: + ldr r0, [sp, #0xc] + bl sub_020181C4 + ldr r0, [sp, #4] + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02247660 + + thumb_func_start ov6_02247794 +ov6_02247794: ; 0x02247794 + mov r2, #0x14 + strb r2, [r0] + mov r0, #0xa + strb r0, [r1] + bx lr + ; .align 2, 0 + thumb_func_end ov6_02247794 + + thumb_func_start ov6_022477A0 +ov6_022477A0: ; 0x022477A0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6a + mov r1, #0 + mov r2, #4 + bl sub_02006ADC + ldr r1, [r0, #0] + str r1, [r4, #0] + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov6_022477A0 \ No newline at end of file diff --git a/asm/ov6_022477B8.s b/asm/ov6_022477B8.s new file mode 100644 index 000000000..1f1808fa1 --- /dev/null +++ b/asm/ov6_022477B8.s @@ -0,0 +1,78 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_022477B8 +ov6_022477B8: ; 0x022477B8 + cmp r1, #0 + beq _0224782A + ldr r1, _0224782C ; =0x021BF6DC + ldrb r1, [r1, #6] + cmp r1, #5 + bhi _0224782A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022477D0: ; jump table + .short _0224782A - _022477D0 - 2 ; case 0 + .short _022477DC - _022477D0 - 2 ; case 1 + .short _022477EC - _022477D0 - 2 ; case 2 + .short _022477FC - _022477D0 - 2 ; case 3 + .short _0224780C - _022477D0 - 2 ; case 4 + .short _0224781C - _022477D0 - 2 ; case 5 +_022477DC: + add r1, r0, #0 + add r1, #0xac + ldr r1, [r1, #0] + add r0, #0xb0 + str r1, [r2, #0] + ldr r0, [r0, #0] + str r0, [r3, #0] + bx lr +_022477EC: + add r1, r0, #0 + add r1, #0xa4 + ldr r1, [r1, #0] + add r0, #0xa8 + str r1, [r2, #0] + ldr r0, [r0, #0] + str r0, [r3, #0] + bx lr +_022477FC: + add r1, r0, #0 + add r1, #0xb4 + ldr r1, [r1, #0] + add r0, #0xb8 + str r1, [r2, #0] + ldr r0, [r0, #0] + str r0, [r3, #0] + bx lr +_0224780C: + add r1, r0, #0 + add r1, #0xbc + ldr r1, [r1, #0] + add r0, #0xc0 + str r1, [r2, #0] + ldr r0, [r0, #0] + str r0, [r3, #0] + bx lr +_0224781C: + add r1, r0, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r0, #0xc8 + str r1, [r2, #0] + ldr r0, [r0, #0] + str r0, [r3, #0] +_0224782A: + bx lr + ; .align 2, 0 +_0224782C: .word 0x021BF6DC + thumb_func_end ov6_022477B8 \ No newline at end of file diff --git a/asm/ov6_02247830.s b/asm/ov6_02247830.s new file mode 100644 index 000000000..995b166bc --- /dev/null +++ b/asm/ov6_02247830.s @@ -0,0 +1,261 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247830 +ov6_02247830: ; 0x02247830 + push {r4, r5, r6, r7} + add r3, r0, #0 + add r0, r2, #0 + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r2, #0 + beq _0224788C + add r6, r3, r1 + sub r7, r1, #1 +_02247844: + sub r1, r6, #1 + ldrb r2, [r1] + mov r1, #1 + add r5, r7, #0 + and r1, r2 + lsl r1, r1, #0x18 + lsr r4, r1, #0x18 + cmp r7, #0 + ble _02247872 +_02247856: + ldrb r1, [r3, r5] + add r2, r3, r5 + sub r2, r2, #1 + asr r1, r1, #1 + strb r1, [r3, r5] + ldrb r2, [r2] + ldrb r1, [r3, r5] + lsl r2, r2, #0x1f + lsr r2, r2, #0x18 + orr r1, r2 + strb r1, [r3, r5] + sub r5, r5, #1 + cmp r5, #0 + bgt _02247856 +_02247872: + ldrb r1, [r3, r5] + asr r1, r1, #1 + strb r1, [r3, r5] + ldrb r2, [r3, r5] + lsl r1, r4, #7 + orr r1, r2 + strb r1, [r3, r5] + add r1, r0, #0 + sub r0, r0, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r1, #0 + bne _02247844 +_0224788C: + pop {r4, r5, r6, r7} + bx lr + thumb_func_end ov6_02247830 + + thumb_func_start ov6_02247890 +ov6_02247890: ; 0x02247890 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r2, #0 + str r1, [sp] + add r7, r3, #0 + bl sub_02015004 + add r4, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_02015030 + add r1, sp, #4 + strh r0, [r1, #4] + add r0, r5, #0 + add r1, r7, #0 + bl sub_02015030 + add r1, sp, #4 + strh r0, [r1, #6] + add r1, sp, #0x18 + ldrh r1, [r1, #0x10] + add r0, r5, #0 + bl sub_02015030 + add r1, sp, #4 + strh r0, [r1, #8] + add r1, sp, #0x18 + ldrh r1, [r1, #0x14] + add r0, r5, #0 + bl sub_02015030 + add r1, sp, #4 + mov r2, #0 + strh r0, [r1, #0xa] + add r3, sp, #8 + add r5, sp, #4 + add r7, r2, #0 +_022478DE: + ldrsh r0, [r3, r7] + cmp r0, #0 + bge _022478EC + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_022478EC: + cmp r2, #0 + ble _02247920 + mov r6, #1 + mvn r6, r6 + ldrsh r6, [r3, r6] + cmp r0, r6 + blt _0224790C + sub r0, r0, r6 + cmp r0, #0xff + ble _02247908 + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02247908: + strb r0, [r5] + b _02247932 +_0224790C: + sub r0, r6, r0 + sub r0, r4, r0 + cmp r0, #0xff + ble _0224791C + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_0224791C: + strb r0, [r5] + b _02247932 +_02247920: + mov r0, #4 + ldrsh r0, [r1, r0] + cmp r0, #0xff + ble _02247930 + mov r0, #0 + add sp, #0x10 + mvn r0, r0 + pop {r3, r4, r5, r6, r7, pc} +_02247930: + strb r0, [r1] +_02247932: + add r2, r2, #1 + add r3, r3, #2 + add r5, r5, #1 + cmp r2, #4 + blt _022478DE + add r0, sp, #4 + mov r1, #4 + mov r2, #5 + bl ov6_02247830 + mov r2, #0 + add r1, sp, #4 + add r4, sp, #4 + mov r3, #0xf0 +_0224794E: + ldrb r5, [r4, #3] + ldrb r0, [r1] + add r2, r2, #1 + asr r6, r5, #4 + and r5, r3 + orr r5, r6 + eor r0, r5 + strb r0, [r1] + add r1, r1, #1 + cmp r2, #3 + blt _0224794E + add r2, sp, #4 + ldrb r3, [r2, #3] + mov r2, #0xf + add r0, sp, #4 + and r2, r3 + lsl r2, r2, #0x18 + mov r1, #3 + lsr r2, r2, #0x18 + bl ov6_02247830 + add r1, sp, #4 + ldrb r5, [r1] + mov r0, #0xf + add r4, r5, #0 + and r4, r0 + cmp r4, #8 + blt _0224798C + add sp, #0x10 + sub r0, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_0224798C: + ldrb r0, [r1, #1] + eor r0, r5 + strb r0, [r1, #1] + ldrb r0, [r1, #2] + eor r0, r5 + strb r0, [r1, #2] + ldrb r2, [r1, #1] + ldrb r3, [r1, #2] + lsl r0, r2, #8 + add r6, r0, #0 + ldr r0, [sp] + orr r6, r3 + cmp r0, r6 + bne _022479C6 + mov r0, #0xf0 + and r0, r5 + asr r0, r0, #4 + cmp r0, #6 + bne _022479C6 + ldrb r0, [r1, #3] + add r1, r5, r2 + mul r1, r3 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + cmp r0, r1 + bne _022479C6 + add sp, #0x10 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} +_022479C6: + mov r0, #0 + mvn r0, r0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02247890 + + thumb_func_start ov6_022479D0 +ov6_022479D0: ; 0x022479D0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + ldr r0, [sp, #0x24] + add r7, r1, #0 + str r2, [sp, #8] + add r5, r3, #0 + bl sub_02014FB0 + add r4, r0, #0 + add r0, r6, #0 + bl sub_02025F24 + add r1, r0, #0 + str r5, [sp] + add r0, sp, #0x10 + ldrh r0, [r0, #0x10] + add r2, r7, #0 + str r0, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov6_02247890 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02014FF0 + add r0, r5, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_022479D0 \ No newline at end of file diff --git a/asm/ov6_02247A0C.s b/asm/ov6_02247A0C.s new file mode 100644 index 000000000..f11cc83de --- /dev/null +++ b/asm/ov6_02247A0C.s @@ -0,0 +1,397 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247A0C +ov6_02247A0C: ; 0x02247A0C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xb + mov r1, #8 + bl sub_02018184 + mov r1, #0 + mov r2, #8 + add r4, r0, #0 + bl sub_020C4CF4 + ldr r1, _02247A30 ; =ov6_02247A34 + add r0, r5, #0 + add r2, r4, #0 + bl sub_02050944 + pop {r3, r4, r5, pc} + nop +_02247A30: .word ov6_02247A34 + thumb_func_end ov6_02247A0C + + thumb_func_start ov6_02247A34 +ov6_02247A34: ; 0x02247A34 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + beq _02247A56 + cmp r1, #1 + beq _02247A66 + cmp r1, #2 + beq _02247A7E + b _02247A86 +_02247A56: + add r0, r5, #0 + bl ov6_02247A90 + str r0, [r4, #0] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _02247A86 +_02247A66: + ldr r0, _02247A8C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _02247A86 + ldr r0, [r4, #0] + bl ov6_02247CC8 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _02247A86 +_02247A7E: + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, pc} +_02247A86: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_02247A8C: .word 0x021BF67C + thumb_func_end ov6_02247A34 + + thumb_func_start ov6_02247A90 +ov6_02247A90: ; 0x02247A90 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r4, r0, #0 + bl sub_0203D170 + add r5, r0, #0 + add r0, r4, #0 + bl sub_0203D174 + str r0, [sp, #0x1c] + mov r0, #0xb + mov r1, #0x18 + bl sub_02018144 + mov r1, #0 + mov r2, #0x18 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + mov r1, #0x1a + mov r2, #0xd0 + mov r3, #0xb + bl sub_0200B144 + str r0, [r4, #0x10] + mov r0, #0xb + bl sub_0200B358 + str r0, [r4, #0x14] + mov r2, #3 + str r2, [sp] + mov r0, #0x1e + str r0, [sp, #4] + mov r0, #0x11 + str r0, [sp, #8] + mov r0, #0xc + str r0, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #1 + bl sub_0201A7E8 + mov r0, #0 + str r0, [sp] + mov r3, #0xb + add r0, r5, #0 + mov r1, #3 + mov r2, #1 + str r3, [sp, #4] + bl sub_0200DAA4 + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x64 + mov r1, #0xb + bl sub_02023790 + add r6, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #0 + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, [sp, #0x1c] + bl sub_02025E38 + add r2, r0, #0 + ldr r0, [r4, #0x14] + mov r1, #0 + bl sub_0200B498 + ldr r0, [r4, #0x14] + add r1, r6, #0 + add r2, r5, #0 + bl sub_0200C388 + add r0, r6, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0x78 + bl ov6_02247CF4 + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r5, #0 + bl sub_020237BC + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_0200B1EC + mov r1, #0 + mov r2, #1 + mov r3, #0x78 + add r5, r0, #0 + bl ov6_02247CF4 + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r4, #0 + add r2, r5, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0 + ldr r5, _02247CBC ; =0x022496F4 + str r0, [sp, #0x24] +_02247B9A: + ldr r0, [r4, #0x10] + ldr r1, [r5, #0] + bl sub_0200B1EC + mov r3, #4 + mov r1, #0 + ldrsh r3, [r5, r3] + add r2, r1, #0 + add r7, r0, #0 + bl ov6_02247CF4 + add r3, r0, #0 + mov r0, #6 + ldrsh r0, [r5, r0] + mov r1, #0 + add r2, r7, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + bl sub_0201D738 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x24] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, #5 + blt _02247B9A + mov r0, #0 + ldr r5, _02247CC0 ; =0x022496D4 + str r0, [sp, #0x14] +_02247BE2: + ldr r0, [r4, #0x10] + ldr r1, [r5, #0] + bl sub_0200B1EC + mov r3, #4 + ldrsh r3, [r5, r3] + mov r1, #0 + mov r2, #2 + add r7, r0, #0 + bl ov6_02247CF4 + add r3, r0, #0 + mov r0, #6 + ldrsh r0, [r5, r0] + mov r1, #0 + add r2, r7, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + bl sub_0201D738 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + add r5, #8 + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #4 + blt _02247BE2 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, _02247CC4 ; =0x0224971C + str r0, [sp, #0x18] +_02247C2C: + ldr r5, [sp, #0x18] + mov r7, #0 +_02247C30: + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x20] + add r2, r7, #0 + bl sub_0202F160 + str r0, [sp, #0x28] + ldr r0, [r4, #0x10] + ldr r1, [r5, #0] + bl sub_0200B1EC + str r0, [sp, #0x2c] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0x14] + ldr r2, [sp, #0x28] + mov r1, #0 + mov r3, #4 + bl sub_0200B60C + ldr r0, [r4, #0x14] + ldr r2, [sp, #0x2c] + add r1, r6, #0 + bl sub_0200C388 + mov r3, #4 + ldrsh r3, [r5, r3] + add r0, r6, #0 + mov r1, #0 + mov r2, #2 + bl ov6_02247CF4 + add r3, r0, #0 + mov r0, #6 + ldrsh r0, [r5, r0] + mov r1, #0 + add r2, r6, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + bl sub_0201D738 + ldr r0, [sp, #0x2c] + bl sub_020237BC + add r7, r7, #1 + add r5, #8 + cmp r7, #4 + blt _02247C30 + ldr r0, [sp, #0x18] + add r0, #0x20 + str r0, [sp, #0x18] + ldr r0, [sp, #0x20] + add r0, r0, #1 + str r0, [sp, #0x20] + cmp r0, #5 + blt _02247C2C + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A954 + add r0, r4, #0 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247CBC: .word 0x022496F4 +_02247CC0: .word 0x022496D4 +_02247CC4: .word 0x0224971C + thumb_func_end ov6_02247A90 + + thumb_func_start ov6_02247CC8 +ov6_02247CC8: ; 0x02247CC8 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + bl sub_0201ACF4 + add r0, r4, #0 + bl sub_0201A8FC + ldr r0, [r4, #0x10] + bl sub_0200B190 + ldr r0, [r4, #0x14] + bl sub_0200B3F0 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02247CC8 + + thumb_func_start ov6_02247CF4 +ov6_02247CF4: ; 0x02247CF4 + push {r4, r5, r6, lr} + add r5, r2, #0 + add r6, r0, #0 + add r4, r3, #0 + cmp r5, #0 + bne _02247D04 + add r0, r4, #0 + pop {r4, r5, r6, pc} +_02247D04: + add r0, r1, #0 + add r1, r6, #0 + mov r2, #0 + bl sub_02002D7C + cmp r5, #1 + beq _02247D18 + cmp r5, #2 + beq _02247D22 + b _02247D26 +_02247D18: + lsr r1, r0, #0x1f + add r1, r0, r1 + asr r0, r1, #1 + sub r0, r4, r0 + pop {r4, r5, r6, pc} +_02247D22: + sub r0, r4, r0 + pop {r4, r5, r6, pc} +_02247D26: + bl sub_02022974 + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02247CF4 + + .rodata + + + .global Unk_ov6_022496D4 +Unk_ov6_022496D4: ; 0x022496D4 + .incbin "incbin/overlay6_rodata.bin", 0x8C0, 0x8E0 - 0x8C0 + + .global Unk_ov6_022496F4 +Unk_ov6_022496F4: ; 0x022496F4 + .incbin "incbin/overlay6_rodata.bin", 0x8E0, 0x908 - 0x8E0 + + .global Unk_ov6_0224971C +Unk_ov6_0224971C: ; 0x0224971C + .incbin "incbin/overlay6_rodata.bin", 0x908, 0xA0 + diff --git a/asm/ov6_02247D30.s b/asm/ov6_02247D30.s new file mode 100644 index 000000000..5616089ee --- /dev/null +++ b/asm/ov6_02247D30.s @@ -0,0 +1,292 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247D30 +ov6_02247D30: ; 0x02247D30 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r6, r1, #0 + ldr r1, _02247DA4 ; =0x000001FB + add r2, sp, #4 + add r3, sp, #0 + add r5, r0, #0 + bl sub_020552B4 + cmp r0, #0 + beq _02247D9C + mov r0, #4 + mov r1, #0x18 + bl sub_02018184 + add r4, r0, #0 + strb r6, [r4, #0xc] + mov r0, #0 + strb r0, [r4, #0xd] + strb r0, [r4, #0xe] + strb r0, [r4, #0xf] + ldr r0, [r5, #0x2c] + bl sub_02039E10 + add r1, r0, #0 + ldr r0, [sp] + add r2, sp, #0x14 + bl sub_020553A4 + ldr r1, [sp, #4] + add r0, sp, #8 + bl ov5_021E1894 + add r3, sp, #8 + ldmia r3!, {r0, r1} + add r2, r4, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r1, [r4, #0] + ldr r0, [sp, #0x14] + add r2, r4, #0 + add r0, r1, r0 + str r0, [r4, #0] + ldr r1, [r4, #8] + ldr r0, [sp, #0x1c] + add r0, r1, r0 + str r0, [r4, #8] + ldr r0, [r5, #0x10] + ldr r1, _02247DA8 ; =ov6_02247DAC + bl sub_02050944 + add sp, #0x20 + pop {r4, r5, r6, pc} +_02247D9C: + bl sub_02022974 + add sp, #0x20 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02247DA4: .word 0x000001FB +_02247DA8: .word ov6_02247DAC + thumb_func_end ov6_02247D30 + + thumb_func_start ov6_02247DAC +ov6_02247DAC: ; 0x02247DAC + push {r4, r5, r6, lr} + sub sp, #0x30 + add r4, r0, #0 + bl sub_02050A60 + add r6, r0, #0 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldrb r1, [r4, #0xf] + cmp r1, #5 + bls _02247DC8 + b _02247F46 +_02247DC8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02247DD4: ; jump table + .short _02247DE0 - _02247DD4 - 2 ; case 0 + .short _02247E3E - _02247DD4 - 2 ; case 1 + .short _02247EBE - _02247DD4 - 2 ; case 2 + .short _02247EEA - _02247DD4 - 2 ; case 3 + .short _02247EFC - _02247DD4 - 2 ; case 4 + .short _02247F3C - _02247DD4 - 2 ; case 5 +_02247DE0: + ldr r0, _02247F4C ; =0x00000205 + ldr r1, [r6, #0x30] + bl ov5_021EF9E8 + ldr r0, [r0, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _02247E12 + add r2, r0, #0 + add r2, #8 + beq _02247E06 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _02247E06 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _02247E08 +_02247E06: + mov r1, #0 +_02247E08: + cmp r1, #0 + beq _02247E12 + ldr r1, [r1, #0] + add r5, r0, r1 + b _02247E14 +_02247E12: + mov r5, #0 +_02247E14: + ldr r0, [r6, #0x30] + bl ov5_021EFAA0 + mov r1, #0 + str r1, [sp] + str r5, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + str r1, [sp, #0x14] + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + ldr r3, _02247F4C ; =0x00000205 + mov r2, #0x10 + bl ov5_021D41C8 + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02247F46 +_02247E3E: + add r0, sp, #0x18 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + ldrb r5, [r4, #0xd] + mov r1, #0xc + ldr r3, [r4, #0] + add r2, r5, #0 + ldr r5, _02247F50 ; =0x022498E4 + mul r2, r1 + ldr r2, [r5, r2] + add r2, r3, r2 + str r2, [sp, #0x24] + ldrb r5, [r4, #0xd] + ldr r3, [r4, #4] + add r2, r5, #0 + ldr r5, _02247F54 ; =0x022498E8 + mul r2, r1 + ldr r2, [r5, r2] + add r2, r3, r2 + str r2, [sp, #0x28] + ldrb r3, [r4, #0xd] + ldr r2, [r4, #8] + add r5, r3, #0 + mul r5, r1 + ldr r1, _02247F58 ; =0x022498EC + add r3, sp, #0x24 + ldr r1, [r1, r5] + add r1, r2, r1 + str r1, [sp, #0x2c] + str r0, [sp] + ldr r0, [r6, #0x50] + ldr r2, _02247F4C ; =0x00000205 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + ldr r1, [r6, #0x30] + bl ov5_021E19CC + ldrb r1, [r4, #0xd] + add r1, r4, r1 + strb r0, [r1, #0x10] + ldrb r1, [r4, #0xd] + add r0, r6, #0 + add r0, #0xa4 + add r1, r4, r1 + ldrb r1, [r1, #0x10] + ldr r0, [r0, #0] + bl ov5_021E18E0 + bl ov5_021E18BC + add r3, r0, #0 + ldrb r2, [r4, #0xd] + ldr r0, [r6, #0x54] + mov r1, #0x10 + bl ov5_021D4220 + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02247F46 +_02247EBE: + ldrb r0, [r4, #0xe] + cmp r0, #0xf + bhs _02247ECA + add r0, r0, #1 + strb r0, [r4, #0xe] + b _02247F46 +_02247ECA: + mov r0, #0 + strb r0, [r4, #0xe] + ldrb r0, [r4, #0xd] + add r0, r0, #1 + strb r0, [r4, #0xd] + ldrb r1, [r4, #0xd] + ldrb r0, [r4, #0xc] + cmp r1, r0 + bhs _02247EE2 + mov r0, #1 + strb r0, [r4, #0xf] + b _02247F46 +_02247EE2: + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02247F46 +_02247EEA: + ldr r0, [r6, #0x54] + mov r1, #0x10 + mov r2, #0 + bl ov5_021D4250 + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02247F46 +_02247EFC: + ldr r0, [r6, #0x54] + mov r1, #0x10 + bl ov5_021D42F0 + cmp r0, #0 + beq _02247F46 + ldr r0, [r6, #0x50] + ldr r1, [r6, #0x54] + mov r2, #0x10 + bl ov5_021D42B0 + ldrb r0, [r4, #0xc] + mov r5, #0 + cmp r0, #0 + bls _02247F34 +_02247F1A: + add r0, r4, r5 + add r1, r6, #0 + add r1, #0xa4 + ldrb r0, [r0, #0x10] + ldr r1, [r1, #0] + bl ov5_021E1674 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + ldrb r0, [r4, #0xc] + cmp r5, r0 + blo _02247F1A +_02247F34: + ldrb r0, [r4, #0xf] + add r0, r0, #1 + strb r0, [r4, #0xf] + b _02247F46 +_02247F3C: + bl sub_020181C4 + add sp, #0x30 + mov r0, #1 + pop {r4, r5, r6, pc} +_02247F46: + mov r0, #0 + add sp, #0x30 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02247F4C: .word 0x00000205 +_02247F50: .word 0x022498E4 +_02247F54: .word 0x022498E8 +_02247F58: .word 0x022498EC + thumb_func_end ov6_02247DAC + .data + + + .global Unk_ov6_022498E4 +Unk_ov6_022498E4: ; 0x022498E4 + .incbin "incbin/overlay6_data.bin", 0x84, 0x48 + diff --git a/asm/ov6_02247F5C.s b/asm/ov6_02247F5C.s new file mode 100644 index 000000000..31c7d9509 --- /dev/null +++ b/asm/ov6_02247F5C.s @@ -0,0 +1,125 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02247F5C +ov6_02247F5C: ; 0x02247F5C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + bl sub_020507E4 + bl sub_0206ADEC + cmp r0, #0 + bne _02247F8C + mov r0, #0x1f + ldr r2, [r4, #0x50] + lsl r0, r0, #4 + mov r1, #1 + bl ov5_021D3DE4 + add r4, r0, #0 + mov r1, #1 + bl ov5_021D3F08 + add r0, r4, #0 + mov r1, #1 + bl ov5_021D3E40 + pop {r4, pc} +_02247F8C: + mov r0, #0x1f + ldr r2, [r4, #0x50] + lsl r0, r0, #4 + mov r1, #0 + bl ov5_021D3DE4 + mov r1, #1 + bl ov5_021D3E40 + mov r0, #0x1f + ldr r2, [r4, #0x50] + lsl r0, r0, #4 + mov r1, #1 + bl ov5_021D3DE4 + add r4, r0, #0 + bl ov5_021D3E9C + add r0, r4, #0 + mov r1, #1 + bl ov5_021D3E40 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02247F5C + + thumb_func_start ov6_02247FBC +ov6_02247FBC: ; 0x02247FBC + ldr r3, _02247FC8 ; =sub_02050944 + ldr r0, [r0, #0x10] + ldr r1, _02247FCC ; =ov6_02247FD0 + mov r2, #0 + bx r3 + nop +_02247FC8: .word sub_02050944 +_02247FCC: .word ov6_02247FD0 + thumb_func_end ov6_02247FBC + + thumb_func_start ov6_02247FD0 +ov6_02247FD0: ; 0x02247FD0 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r4, #0 + bl sub_02050A68 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _02247FF2 + cmp r0, #1 + beq _02248018 + cmp r0, #2 + beq _02248032 + b _0224804A +_02247FF2: + mov r0, #0x1f + ldr r2, [r5, #0x50] + lsl r0, r0, #4 + mov r1, #0 + bl ov5_021D3DE4 + add r5, r0, #0 + bl ov5_021D3E4C + cmp r0, #0 + beq _0224804A + add r0, r5, #0 + mov r1, #1 + bl ov5_021D3E40 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224804A +_02248018: + mov r0, #0x1f + ldr r2, [r5, #0x50] + lsl r0, r0, #4 + mov r1, #1 + bl ov5_021D3DE4 + mov r1, #0 + bl ov5_021D3E40 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224804A +_02248032: + mov r0, #0x1f + ldr r2, [r5, #0x50] + lsl r0, r0, #4 + mov r1, #1 + bl ov5_021D3DE4 + bl ov5_021D3F70 + cmp r0, #0 + beq _0224804A + mov r0, #1 + pop {r3, r4, r5, pc} +_0224804A: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_02247FD0 \ No newline at end of file diff --git a/asm/ov6_02248050.s b/asm/ov6_02248050.s new file mode 100644 index 000000000..980a2ce7e --- /dev/null +++ b/asm/ov6_02248050.s @@ -0,0 +1,1278 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02248050 +ov6_02248050: ; 0x02248050 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r2, #0 + bl sub_0206251C + add r6, r0, #0 + add r1, sp, #0 + bl sub_02063050 + add r0, r6, #0 + bl sub_02063020 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02063040 + add r4, r0, #0 + add r0, r6, #0 + bl sub_0206298C + cmp r0, #3 + bhi _022480A0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02248088: ; jump table + .short _02248090 - _02248088 - 2 ; case 0 + .short _02248094 - _02248088 - 2 ; case 1 + .short _02248098 - _02248088 - 2 ; case 2 + .short _0224809C - _02248088 - 2 ; case 3 +_02248090: + sub r4, r4, #1 + b _022480A4 +_02248094: + add r4, r4, #1 + b _022480A4 +_02248098: + sub r5, r5, #1 + b _022480A4 +_0224809C: + add r5, r5, #1 + b _022480A4 +_022480A0: + bl sub_02022974 +_022480A4: + mov r3, #2 + lsl r1, r5, #0x10 + lsl r3, r3, #0xe + ldr r2, [sp, #4] + lsl r4, r4, #0x10 + add r1, r1, r3 + add r0, r7, #0 + add r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02248050 + + thumb_func_start ov6_022480BC +ov6_022480BC: ; 0x022480BC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r1, #0 + add r6, r0, #0 + add r1, sp, #0 + bl sub_0205EAEC + add r0, r6, #0 + bl sub_0205EABC + add r5, r0, #0 + add r0, r6, #0 + bl sub_0205EAC8 + add r4, r0, #0 + add r0, r6, #0 + bl sub_0205EA78 + cmp r0, #3 + bhi _02248108 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022480F0: ; jump table + .short _022480F8 - _022480F0 - 2 ; case 0 + .short _022480FC - _022480F0 - 2 ; case 1 + .short _02248100 - _022480F0 - 2 ; case 2 + .short _02248104 - _022480F0 - 2 ; case 3 +_022480F8: + sub r4, r4, #1 + b _0224810C +_022480FC: + add r4, r4, #1 + b _0224810C +_02248100: + sub r5, r5, #1 + b _0224810C +_02248104: + add r5, r5, #1 + b _0224810C +_02248108: + bl sub_02022974 +_0224810C: + mov r3, #2 + lsl r1, r5, #0x10 + lsl r3, r3, #0xe + ldr r2, [sp, #4] + lsl r4, r4, #0x10 + add r1, r1, r3 + add r0, r7, #0 + add r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_022480BC + + thumb_func_start ov6_02248124 +ov6_02248124: ; 0x02248124 + push {r3, r4, lr} + sub sp, #0xc + add r4, r1, #0 + add r1, sp, #0 + bl sub_0205EAEC + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov6_02248124 + + thumb_func_start ov6_02248140 +ov6_02248140: ; 0x02248140 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r1, [sp, #8] + add r4, r2, #0 + add r6, r0, #0 + mov r1, #0 + mov r2, #0xdc + str r3, [sp, #0xc] + ldr r7, [sp, #0x2c] + bl sub_020D5124 + add r0, r6, #0 + ldr r1, [sp, #8] + add r0, #0x78 + add r2, r4, #0 + mov r3, #4 + bl sub_020170D8 + add r1, r6, #0 + add r0, r6, #0 + add r1, #0x78 + bl sub_02017258 + add r0, r6, #0 + ldr r1, [sp, #0x28] + add r0, #0xd8 + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + bls _022481B8 + add r0, r6, #0 + add r5, r6, #0 + str r0, [sp, #0x10] + add r0, #0x78 + add r5, #0x88 + str r0, [sp, #0x10] +_0224818E: + ldr r3, [sp, #0xc] + mov r0, #4 + str r0, [sp] + ldr r1, [sp, #0x10] + ldr r2, [sp, #8] + add r0, r5, #0 + add r3, r3, r4 + str r7, [sp, #4] + bl sub_02017164 + add r0, r6, #0 + add r1, r5, #0 + bl sub_0201727C + add r0, r6, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, #0x14 + cmp r4, r0 + blo _0224818E +_022481B8: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov6_02248140 + + thumb_func_start ov6_022481BC +ov6_022481BC: ; 0x022481BC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r0, #0x78 + add r7, r1, #0 + bl sub_02017110 + add r0, r6, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + bls _022481EE + add r5, r6, #0 + add r5, #0x88 +_022481D8: + add r0, r5, #0 + add r1, r7, #0 + bl sub_020171A0 + add r0, r6, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, #0x14 + cmp r4, r0 + blo _022481D8 +_022481EE: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022481BC + + thumb_func_start ov6_022481F0 +ov6_022481F0: ; 0x022481F0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r6, #1 + mov r4, #0 + cmp r0, #0 + bls _0224821E + add r5, r7, #0 + add r5, #0x88 +_02248204: + mov r1, #1 + add r0, r5, #0 + lsl r1, r1, #0xc + bl sub_02017204 + and r6, r0 + add r0, r7, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, #0x14 + cmp r4, r0 + blo _02248204 +_0224821E: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_022481F0 + + thumb_func_start ov6_02248224 +ov6_02248224: ; 0x02248224 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r4, #0 + cmp r0, #0 + bls _02248250 + add r5, r6, #0 + mov r7, #1 + add r5, #0x88 + lsl r7, r7, #0xc +_0224823A: + add r0, r5, #0 + add r1, r7, #0 + bl sub_020171CC + add r0, r6, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r4, r4, #1 + add r5, #0x14 + cmp r4, r0 + blo _0224823A +_02248250: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov6_02248224 + + thumb_func_start ov6_02248254 +ov6_02248254: ; 0x02248254 + ldr r3, _02248258 ; =sub_02017294 + bx r3 + ; .align 2, 0 +_02248258: .word sub_02017294 + thumb_func_end ov6_02248254 + + thumb_func_start ov6_0224825C +ov6_0224825C: ; 0x0224825C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r1, #0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf0 + bl sub_020D5124 + add r0, r4, #0 + add r0, #0xdc + mov r1, #4 + mov r2, #0x20 + bl sub_020182CC + mov r0, #0x8d + mov r1, #4 + bl sub_02006C24 + add r6, r0, #0 + mov r2, #3 + add r0, r4, #0 + str r2, [sp] + add r0, #0xdc + str r0, [sp, #4] + add r0, r4, #0 + add r1, r6, #0 + mov r3, #0 + bl ov6_02248140 + add r0, r6, #0 + bl sub_02006CA8 + ldr r0, [r5, #0x3c] + add r1, r4, #0 + bl ov6_022480BC + ldr r0, _022482B8 ; =0x0000064B + bl sub_02005748 + mov r0, #0 + add r4, #0xec + str r0, [r4, #0] + add sp, #8 + pop {r4, r5, r6, pc} + nop +_022482B8: .word 0x0000064B + thumb_func_end ov6_0224825C + + thumb_func_start ov6_022482BC +ov6_022482BC: ; 0x022482BC + ldr r3, _022482C8 ; =ov6_022481BC + add r0, r2, #0 + add r2, #0xdc + add r1, r2, #0 + bx r3 + nop +_022482C8: .word ov6_022481BC + thumb_func_end ov6_022482BC + + thumb_func_start ov6_022482CC +ov6_022482CC: ; 0x022482CC + push {r4, lr} + add r4, r2, #0 + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #0 + beq _022482DE + cmp r0, #1 + pop {r4, pc} +_022482DE: + add r0, r4, #0 + bl ov6_022481F0 + cmp r0, #1 + bne _022482FC + add r0, r4, #0 + mov r1, #0 + bl sub_02017348 + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + add r4, #0xec + add r0, r0, #1 + str r0, [r4, #0] +_022482FC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_022482CC + + thumb_func_start ov6_02248300 +ov6_02248300: ; 0x02248300 + ldr r3, _02248308 ; =ov6_02248254 + add r0, r2, #0 + bx r3 + nop +_02248308: .word ov6_02248254 + thumb_func_end ov6_02248300 + + thumb_func_start ov6_0224830C +ov6_0224830C: ; 0x0224830C + ldr r0, [r0, #4] + ldr r3, _02248318 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _0224831C ; =0x02249804 + bx r3 + nop +_02248318: .word ov5_021D1B6C +_0224831C: .word 0x02249804 + thumb_func_end ov6_0224830C + + thumb_func_start ov6_02248320 +ov6_02248320: ; 0x02248320 + ldr r3, _02248324 ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_02248324: .word ov5_021D1BEC + thumb_func_end ov6_02248320 + + thumb_func_start ov6_02248328 +ov6_02248328: ; 0x02248328 + push {r3, lr} + bl ov5_021D1C2C + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #1 + bne _0224833A + mov r0, #1 + pop {r3, pc} +_0224833A: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02248328 + + thumb_func_start ov6_02248340 +ov6_02248340: ; 0x02248340 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r1, #0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf0 + bl sub_020D5124 + add r0, r4, #0 + add r0, #0xdc + mov r1, #4 + mov r2, #0x20 + bl sub_020182CC + mov r0, #0x8d + mov r1, #4 + bl sub_02006C24 + add r6, r0, #0 + mov r3, #4 + add r0, r4, #0 + str r3, [sp] + add r0, #0xdc + str r0, [sp, #4] + add r0, r4, #0 + add r1, r6, #0 + mov r2, #8 + bl ov6_02248140 + add r0, r6, #0 + bl sub_02006CA8 + ldr r0, [r5, #0x3c] + add r1, r4, #0 + bl ov6_022480BC + ldr r0, _0224839C ; =0x0000064A + bl sub_02005748 + mov r0, #0 + add r4, #0xec + str r0, [r4, #0] + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0224839C: .word 0x0000064A + thumb_func_end ov6_02248340 + + thumb_func_start ov6_022483A0 +ov6_022483A0: ; 0x022483A0 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r1, #0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf0 + bl sub_020D5124 + add r0, r4, #0 + add r0, #0xdc + mov r1, #4 + mov r2, #0x20 + bl sub_020182CC + mov r0, #0x8d + mov r1, #4 + bl sub_02006C24 + add r6, r0, #0 + mov r3, #4 + add r0, r4, #0 + str r3, [sp] + add r0, #0xdc + str r0, [sp, #4] + add r0, r4, #0 + add r1, r6, #0 + mov r2, #8 + bl ov6_02248140 + ldr r0, [r5, #0x38] + mov r1, #0 + add r2, r4, #0 + bl ov6_02248050 + ldr r0, _022483FC ; =0x0000064A + bl sub_02005748 + add r0, r6, #0 + bl sub_02006CA8 + mov r0, #0 + add r4, #0xec + str r0, [r4, #0] + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022483FC: .word 0x0000064A + thumb_func_end ov6_022483A0 + + thumb_func_start ov6_02248400 +ov6_02248400: ; 0x02248400 + ldr r3, _0224840C ; =ov6_022481BC + add r0, r2, #0 + add r2, #0xdc + add r1, r2, #0 + bx r3 + nop +_0224840C: .word ov6_022481BC + thumb_func_end ov6_02248400 + + thumb_func_start ov6_02248410 +ov6_02248410: ; 0x02248410 + push {r4, lr} + add r4, r2, #0 + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #0 + beq _02248422 + cmp r0, #1 + pop {r4, pc} +_02248422: + add r0, r4, #0 + bl ov6_022481F0 + cmp r0, #1 + bne _02248440 + add r0, r4, #0 + mov r1, #0 + bl sub_02017348 + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + add r4, #0xec + add r0, r0, #1 + str r0, [r4, #0] +_02248440: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02248410 + + thumb_func_start ov6_02248444 +ov6_02248444: ; 0x02248444 + ldr r3, _0224844C ; =ov6_02248254 + add r0, r2, #0 + bx r3 + nop +_0224844C: .word ov6_02248254 + thumb_func_end ov6_02248444 + + thumb_func_start ov6_02248450 +ov6_02248450: ; 0x02248450 + ldr r0, [r0, #4] + ldr r3, _0224845C ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _02248460 ; =0x022497EC + bx r3 + nop +_0224845C: .word ov5_021D1B6C +_02248460: .word 0x022497EC + thumb_func_end ov6_02248450 + + thumb_func_start ov6_02248464 +ov6_02248464: ; 0x02248464 + ldr r0, [r0, #4] + ldr r3, _02248470 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _02248474 ; =0x022497D4 + bx r3 + nop +_02248470: .word ov5_021D1B6C +_02248474: .word 0x022497D4 + thumb_func_end ov6_02248464 + + thumb_func_start ov6_02248478 +ov6_02248478: ; 0x02248478 + ldr r3, _0224847C ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_0224847C: .word ov5_021D1BEC + thumb_func_end ov6_02248478 + + thumb_func_start ov6_02248480 +ov6_02248480: ; 0x02248480 + push {r3, lr} + bl ov5_021D1C2C + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #1 + bne _02248492 + mov r0, #1 + pop {r3, pc} +_02248492: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov6_02248480 + + thumb_func_start ov6_02248498 +ov6_02248498: ; 0x02248498 + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r2, #0 + mov r2, #0x73 + add r5, r1, #0 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + mov r0, #0x6e + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #4 + mov r2, #0x20 + bl sub_020182CC + mov r0, #0x8d + mov r1, #4 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x6e + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r1, r6, #0 + mov r2, #0xe + mov r3, #0xc + bl ov6_02248140 + ldr r0, [r5, #0x3c] + add r1, r4, #0 + bl ov6_02248124 + add r0, r6, #0 + bl sub_02006CA8 + ldr r0, _022484FC ; =0x0000064D + bl sub_02005748 + mov r0, #0x72 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022484FC: .word 0x0000064D + thumb_func_end ov6_02248498 + + thumb_func_start ov6_02248500 +ov6_02248500: ; 0x02248500 + push {r4, r5, r6, lr} + mov r0, #0x6e + add r5, r2, #0 + lsl r0, r0, #2 + mov r4, #0 + add r6, r5, r0 +_0224850C: + add r0, r5, #0 + add r1, r6, #0 + bl ov6_022481BC + add r4, r4, #1 + add r5, #0xdc + cmp r4, #2 + blt _0224850C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02248500 + + thumb_func_start ov6_02248520 +ov6_02248520: ; 0x02248520 + push {r4, r5, r6, lr} + sub sp, #8 + mov r0, #0x72 + add r4, r2, #0 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r5, r1, #0 + cmp r0, #0 + beq _0224853E + cmp r0, #1 + beq _02248586 + cmp r0, #2 + beq _022485C4 + add sp, #8 + pop {r4, r5, r6, pc} +_0224853E: + mov r0, #0x8d + mov r1, #4 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0x6e + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xdc + add r1, r6, #0 + mov r2, #0xb + mov r3, #9 + bl ov6_02248140 + add r0, r6, #0 + bl sub_02006CA8 + add r1, r4, #0 + ldr r0, [r5, #0x3c] + add r1, #0xdc + bl ov6_02248124 + add r0, r4, #0 + add r0, #0xdc + mov r1, #0 + bl sub_02017348 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_02248586: + add r0, r4, #0 + bl ov6_022481F0 + add r6, r0, #0 + ldr r0, [r5, #0x3c] + add r1, r4, #0 + bl ov6_02248124 + cmp r6, #1 + bne _022485D6 + add r0, r4, #0 + add r0, #0xdc + mov r1, #1 + bl sub_02017348 + add r0, r4, #0 + mov r1, #0 + bl sub_02017348 + add r1, r4, #0 + ldr r0, [r5, #0x3c] + add r1, #0xdc + bl ov6_02248124 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add sp, #8 + add r1, r1, #1 + str r1, [r4, r0] + pop {r4, r5, r6, pc} +_022485C4: + add r0, r4, #0 + add r0, #0xdc + bl ov6_02248224 + add r4, #0xdc + ldr r0, [r5, #0x3c] + add r1, r4, #0 + bl ov6_02248124 +_022485D6: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02248520 + + thumb_func_start ov6_022485DC +ov6_022485DC: ; 0x022485DC + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r4, #0 +_022485E2: + add r0, r5, #0 + bl ov6_02248254 + add r4, r4, #1 + add r5, #0xdc + cmp r4, #2 + blt _022485E2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov6_022485DC + + thumb_func_start ov6_022485F4 +ov6_022485F4: ; 0x022485F4 + ldr r0, [r0, #4] + ldr r3, _02248600 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _02248604 ; =0x022497BC + bx r3 + nop +_02248600: .word ov5_021D1B6C +_02248604: .word 0x022497BC + thumb_func_end ov6_022485F4 + + thumb_func_start ov6_02248608 +ov6_02248608: ; 0x02248608 + ldr r3, _0224860C ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_0224860C: .word ov5_021D1BEC + thumb_func_end ov6_02248608 + + thumb_func_start ov6_02248610 +ov6_02248610: ; 0x02248610 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + add r6, r1, #0 + add r4, r2, #0 + add r5, r3, #0 + cmp r0, #0 + beq _02248628 + bl sub_02022974 +_02248628: + add r0, r6, #0 + add r1, sp, #0 + bl sub_0205EAEC + ldr r2, [sp, #4] + ldr r3, [sp, #8] + ldr r1, [sp] + add r0, r7, #0 + add r2, r2, r4 + add r3, r3, r5 + bl sub_02017350 + add r0, r7, #0 + mov r4, #0 + add r5, r7, #0 + mov r1, #1 + add r0, #0xc8 + str r1, [r0, #0] + add r5, #0x78 + add r6, r4, #0 +_02248650: + add r0, r5, #0 + add r1, r6, #0 + bl sub_02017240 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #4 + blt _02248650 + add r0, r7, #0 + mov r1, #1 + bl sub_02017348 + ldr r0, _02248674 ; =0x00000627 + bl sub_02005748 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02248674: .word 0x00000627 + thumb_func_end ov6_02248610 + + thumb_func_start ov6_02248678 +ov6_02248678: ; 0x02248678 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r0, #0xc8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022486B2 + ldr r5, [sp] + mov r4, #1 + mov r6, #0 + add r5, #0x78 + lsl r7, r4, #0xc +_0224868E: + add r0, r5, #0 + add r1, r7, #0 + bl sub_02017204 + add r6, r6, #1 + and r4, r0 + add r5, #0x14 + cmp r6, #4 + blt _0224868E + cmp r4, #1 + bne _022486B2 + ldr r0, [sp] + mov r1, #0 + add r0, #0xc8 + str r1, [r0, #0] + ldr r0, [sp] + bl sub_02017348 +_022486B2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02248678 + + thumb_func_start ov6_022486B4 +ov6_022486B4: ; 0x022486B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r1, [sp] + str r2, [sp, #4] + mov r1, #0 + mov r2, #0xcc + add r7, r0, #0 + add r5, r3, #0 + bl sub_020D5124 + ldr r1, [sp] + add r0, r7, #0 + bl sub_02017258 + add r4, r7, #0 + mov r6, #0 + add r4, #0x78 +_022486D6: + ldr r1, [sp] + ldr r2, [r5, #0] + ldr r3, [sp, #4] + add r0, r4, #0 + bl sub_02017190 + add r0, r7, #0 + add r1, r4, #0 + bl sub_0201727C + add r6, r6, #1 + add r5, r5, #4 + add r4, #0x14 + cmp r6, #4 + blt _022486D6 + add r0, r7, #0 + mov r1, #0 + bl sub_02017348 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_022486B4 + + thumb_func_start ov6_02248700 +ov6_02248700: ; 0x02248700 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r7, #0 + add r6, r1, #0 + mov r4, #0 + add r5, #0x78 +_0224870C: + add r0, r5, #0 + add r1, r6, #0 + bl sub_020171A0 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #4 + blt _0224870C + add r0, r7, #0 + mov r1, #0 + mov r2, #0xcc + bl sub_020D5124 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02248700 + + thumb_func_start ov6_02248728 +ov6_02248728: ; 0x02248728 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0xce + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, sp, #0 + ldr r0, [r0, #0x3c] + bl sub_0205EAEC + mov r1, #0xcf + lsl r1, r1, #4 + ldr r2, [sp] + ldr r0, [r4, r1] + sub r0, r2, r0 + bne _02248770 + add r0, r1, #4 + ldr r2, [sp, #4] + ldr r0, [r4, r0] + cmp r2, r0 + bge _02248770 + add r0, r1, #0 + add r0, #8 + ldr r2, [sp, #8] + ldr r0, [r4, r0] + cmp r2, r0 + ble _02248770 + add r0, r1, #0 + mov r2, #0 + sub r0, #8 + str r2, [r4, r0] + mov r2, #2 + lsl r2, r2, #0x10 + sub r0, r1, #4 + str r2, [r4, r0] + b _0224877E +_02248770: + mov r1, #2 + ldr r0, _02248794 ; =0x00000CE8 + lsl r1, r1, #0x10 + str r1, [r4, r0] + lsr r1, r1, #1 + add r0, r0, #4 + str r1, [r4, r0] +_0224877E: + mov r0, #0xcf + lsl r0, r0, #4 + add r3, sp, #0 + add r2, r4, r0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add sp, #0xc + pop {r3, r4, pc} + nop +_02248794: .word 0x00000CE8 + thumb_func_end ov6_02248728 + + thumb_func_start ov6_02248798 +ov6_02248798: ; 0x02248798 + push {r4, lr} + add r4, r0, #0 + bl ov6_02248728 + mov r2, #0 + add r1, r4, #0 +_022487A4: + add r0, r1, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _022487D0 + add r1, r4, #0 + mov r0, #0xcc + mov r3, #0xce + add r1, #0x10 + mul r0, r2 + lsl r3, r3, #4 + add r0, r1, r0 + ldr r1, [r4, r3] + add r2, r3, #0 + add r2, #8 + add r3, #0xc + ldr r1, [r1, #0x3c] + ldr r2, [r4, r2] + ldr r3, [r4, r3] + bl ov6_02248610 + pop {r4, pc} +_022487D0: + add r2, r2, #1 + add r1, #0xcc + cmp r2, #0x10 + blt _022487A4 + bl sub_02022974 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov6_02248798 + + thumb_func_start ov6_022487E0 +ov6_022487E0: ; 0x022487E0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x10 +_022487E8: + add r0, r5, #0 + bl ov6_02248678 + add r4, r4, #1 + add r5, #0xcc + cmp r4, #0x10 + blt _022487E8 + pop {r3, r4, r5, pc} + thumb_func_end ov6_022487E0 + + thumb_func_start ov6_022487F8 +ov6_022487F8: ; 0x022487F8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r2, #0 + mov r2, #0xd1 + str r1, [sp, #4] + add r0, r5, #0 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + ldr r0, _02248894 ; =0x00000CFC + mov r1, #4 + add r0, r5, r0 + mov r2, #0x20 + bl sub_020182CC + mov r0, #0x8d + mov r1, #4 + bl sub_02006C24 + add r7, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + mov r2, #8 + mov r3, #4 + bl sub_020170D8 + mov r4, #0 + add r6, r5, #0 +_02248832: + mov r0, #0 + str r0, [sp] + add r0, r7, #0 + add r1, r4, #4 + mov r2, #0 + mov r3, #4 + bl sub_0200723C + mov r1, #0xcd + lsl r1, r1, #4 + str r0, [r6, r1] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #4 + blt _02248832 + add r4, r5, #0 + mov r6, #0 + add r4, #0x10 +_02248856: + ldr r2, _02248894 ; =0x00000CFC + mov r3, #0xcd + lsl r3, r3, #4 + add r0, r4, #0 + add r1, r5, #0 + add r2, r5, r2 + add r3, r5, r3 + bl ov6_022486B4 + add r6, r6, #1 + add r4, #0xcc + cmp r6, #0x10 + blt _02248856 + mov r1, #0xce + ldr r0, [sp, #4] + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r5, r1] + add r1, #0x10 + ldr r0, [r0, #0x3c] + add r1, r5, r1 + bl sub_0205EAEC + ldr r0, _02248898 ; =0x00000D0C + mov r1, #0 + str r1, [r5, r0] + add r0, r7, #0 + bl sub_02006CA8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248894: .word 0x00000CFC +_02248898: .word 0x00000D0C + thumb_func_end ov6_022487F8 + + thumb_func_start ov6_0224889C +ov6_0224889C: ; 0x0224889C + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + add r4, r5, #0 + ldr r7, _022488D4 ; =0x00000CFC + mov r6, #0 + add r4, #0x10 +_022488A8: + add r0, r4, #0 + add r1, r5, r7 + bl ov6_02248700 + add r6, r6, #1 + add r4, #0xcc + cmp r6, #0x10 + blt _022488A8 + add r0, r5, #0 + bl sub_02017110 + mov r6, #0xcd + mov r4, #0 + lsl r6, r6, #4 +_022488C4: + ldr r0, [r5, r6] + bl sub_020181C4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022488C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022488D4: .word 0x00000CFC + thumb_func_end ov6_0224889C + + thumb_func_start ov6_022488D8 +ov6_022488D8: ; 0x022488D8 + push {r4, lr} + ldr r1, _02248910 ; =0x00000D0C + add r4, r2, #0 + ldr r0, [r4, r1] + cmp r0, #0 + bne _0224890E + add r0, r1, #0 + sub r0, #0x28 + ldr r0, [r4, r0] + sub r2, r0, #1 + add r0, r1, #0 + sub r0, #0x28 + str r2, [r4, r0] + add r0, r1, #0 + sub r0, #0x28 + ldr r0, [r4, r0] + cmp r0, #0 + bge _02248908 + mov r0, #4 + sub r1, #0x28 + str r0, [r4, r1] + add r0, r4, #0 + bl ov6_02248798 +_02248908: + add r0, r4, #0 + bl ov6_022487E0 +_0224890E: + pop {r4, pc} + ; .align 2, 0 +_02248910: .word 0x00000D0C + thumb_func_end ov6_022488D8 + + thumb_func_start ov6_02248914 +ov6_02248914: ; 0x02248914 + push {r3, r4, r5, lr} + add r5, r2, #0 + mov r4, #0 + add r5, #0x10 +_0224891C: + add r0, r5, #0 + bl sub_02017294 + add r4, r4, #1 + add r5, #0xcc + cmp r4, #0x10 + blt _0224891C + pop {r3, r4, r5, pc} + thumb_func_end ov6_02248914 + + thumb_func_start ov6_0224892C +ov6_0224892C: ; 0x0224892C + ldr r0, [r0, #4] + ldr r3, _02248938 ; =ov5_021D1B6C + ldr r0, [r0, #4] + ldr r1, _0224893C ; =0x0224981C + bx r3 + nop +_02248938: .word ov5_021D1B6C +_0224893C: .word 0x0224981C + thumb_func_end ov6_0224892C + + thumb_func_start ov6_02248940 +ov6_02248940: ; 0x02248940 + ldr r3, _02248944 ; =ov5_021D1BEC + bx r3 + ; .align 2, 0 +_02248944: .word ov5_021D1BEC + thumb_func_end ov6_02248940 + + .rodata + + + .global Unk_ov6_022497BC +Unk_ov6_022497BC: ; 0x022497BC + .incbin "incbin/overlay6_rodata.bin", 0x9A8, 0x9C0 - 0x9A8 + + .global Unk_ov6_022497D4 +Unk_ov6_022497D4: ; 0x022497D4 + .incbin "incbin/overlay6_rodata.bin", 0x9C0, 0x9D8 - 0x9C0 + + .global Unk_ov6_022497EC +Unk_ov6_022497EC: ; 0x022497EC + .incbin "incbin/overlay6_rodata.bin", 0x9D8, 0x9F0 - 0x9D8 + + .global Unk_ov6_02249804 +Unk_ov6_02249804: ; 0x02249804 + .incbin "incbin/overlay6_rodata.bin", 0x9F0, 0xA08 - 0x9F0 + + .global Unk_ov6_0224981C +Unk_ov6_0224981C: ; 0x0224981C + .incbin "incbin/overlay6_rodata.bin", 0xA08, 0x18 + diff --git a/asm/ov6_02248948.s b/asm/ov6_02248948.s new file mode 100644 index 000000000..1e7d577b3 --- /dev/null +++ b/asm/ov6_02248948.s @@ -0,0 +1,105 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_02248948 +ov6_02248948: ; 0x02248948 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _0224895A + cmp r0, #1 + beq _02248972 + pop {r3, r4, r5, pc} +_0224895A: + ldr r1, [r4, #0xc] + ldr r0, [r4, #0] + lsl r2, r1, #2 + ldr r1, _02248994 ; =0x0224984C + ldr r1, [r1, r2] + blx r1 + cmp r0, #1 + bne _02248990 + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_02248972: + ldr r1, [r4, #0xc] + ldr r0, [r4, #0] + lsl r2, r1, #2 + ldr r1, _02248998 ; =0x02249834 + ldr r1, [r1, r2] + blx r1 + ldr r0, [r4, #4] + mov r1, #1 + strh r1, [r0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02248990: + pop {r3, r4, r5, pc} + nop +_02248994: .word 0x0224984C +_02248998: .word 0x02249834 + thumb_func_end ov6_02248948 + + thumb_func_start ov6_0224899C +ov6_0224899C: ; 0x0224899C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + add r0, r3, #0 + mov r1, #0x10 + add r4, r2, #0 + bl sub_02018144 + add r6, r0, #0 + add r2, r6, #0 + mov r1, #0x10 + mov r0, #0 +_022489B4: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _022489B4 + ldr r1, _022489DC ; =0x02249840 + lsl r2, r4, #2 + ldr r1, [r1, r2] + add r0, r7, #0 + blx r1 + str r0, [r6, #0] + str r5, [r6, #4] + ldr r0, _022489E0 ; =ov6_02248948 + str r4, [r6, #0xc] + mov r2, #0 + add r1, r6, #0 + strh r2, [r5] + bl sub_0200D9E8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022489DC: .word 0x02249840 +_022489E0: .word ov6_02248948 + thumb_func_end ov6_0224899C + + .rodata + + + .global Unk_ov6_02249834 +Unk_ov6_02249834: ; 0x02249834 + .incbin "incbin/overlay6_rodata.bin", 0xA20, 0xA2C - 0xA20 + + .global Unk_ov6_02249840 +Unk_ov6_02249840: ; 0x02249840 + .incbin "incbin/overlay6_rodata.bin", 0xA2C, 0xA38 - 0xA2C + + .global Unk_ov6_0224984C +Unk_ov6_0224984C: ; 0x0224984C + .incbin "incbin/overlay6_rodata.bin", 0xA38, 0xC + diff --git a/asm/ov6_022489E4.s b/asm/ov6_022489E4.s new file mode 100644 index 000000000..80e873eff --- /dev/null +++ b/asm/ov6_022489E4.s @@ -0,0 +1,585 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov6_022489E4 +ov6_022489E4: ; 0x022489E4 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r1, #0 + mov r1, #0x61 + add r6, r0, #0 + add r4, r3, #0 + lsl r1, r1, #2 + add r0, r2, #0 + add r2, r4, r1 + lsl r1, r6, #8 + add r1, r2, r1 + add r2, r5, #0 + bl sub_020C4DB0 + ldr r2, _02248A5C ; =0x00000584 + ldrb r0, [r4, r2] + add r0, r0, #1 + strb r0, [r4, r2] + ldr r0, _02248A60 ; =0x00000127 + ldrb r2, [r4, r2] + ldrb r1, [r4, r0] + cmp r2, r1 + blo _02248A56 + mov r3, #0 + cmp r1, #0 + ble _02248A32 + add r0, #0x5d + add r5, r4, r0 + mov r0, #1 + lsl r0, r0, #8 + add r2, r0, #0 + add r6, sp, #4 + add r2, #0x27 +_02248A26: + stmia r6!, {r5} + ldrb r1, [r4, r2] + add r3, r3, #1 + add r5, r5, r0 + cmp r3, r1 + blt _02248A26 +_02248A32: + add r0, sp, #4 + add r2, sp, #0 + bl ov6_02248A94 + mov r1, #0x47 + lsl r1, r1, #2 + strb r0, [r4, r1] + add r0, sp, #0 + ldrb r2, [r0] + add r0, r1, #1 + strb r2, [r4, r0] + ldrb r0, [r4, r1] + lsl r2, r0, #2 + add r0, sp, #4 + ldr r0, [r0, r2] + ldrb r2, [r0, #2] + add r0, r1, #6 + strb r2, [r4, r0] +_02248A56: + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + nop +_02248A5C: .word 0x00000584 +_02248A60: .word 0x00000127 + thumb_func_end ov6_022489E4 + + thumb_func_start ov6_02248A64 +ov6_02248A64: ; 0x02248A64 + push {r3, lr} + ldr r1, _02248A90 ; =0x00000125 + add r3, sp, #0 + ldrb r2, [r0, r1] + strb r2, [r3] + sub r2, r1, #2 + ldrb r2, [r0, r2] + sub r1, r1, #3 + strb r2, [r3, #1] + ldrb r0, [r0, r1] + add r1, sp, #0 + mov r2, #4 + strb r0, [r3, #2] + mov r0, #0x1a + bl sub_020359DC + cmp r0, #1 + bne _02248A8C + mov r0, #1 + pop {r3, pc} +_02248A8C: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_02248A90: .word 0x00000125 + thumb_func_end ov6_02248A64 + + thumb_func_start ov6_02248A94 +ov6_02248A94: ; 0x02248A94 + push {r4, r5, r6, r7} + mov r5, #0 + add r4, r5, #0 + cmp r1, #0 + ble _02248AB8 + add r6, r0, #0 +_02248AA0: + lsl r3, r5, #2 + ldr r3, [r0, r3] + ldr r7, [r6, #0] + ldrb r3, [r3] + ldrb r7, [r7] + cmp r3, r7 + bhs _02248AB0 + add r5, r4, #0 +_02248AB0: + add r4, r4, #1 + add r6, r6, #4 + cmp r4, r1 + blt _02248AA0 +_02248AB8: + lsl r1, r5, #2 + ldr r0, [r0, r1] + ldrb r0, [r0] + strb r0, [r2] + add r0, r5, #0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 + thumb_func_end ov6_02248A94 + + thumb_func_start ov6_02248AC8 +ov6_02248AC8: ; 0x02248AC8 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + bl sub_02073C70 + add r2, r0, #0 + ldrb r1, [r5, r2] + add r0, r5, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + bl sub_020C4DB0 + ldr r0, _02248AEC ; =0x00000584 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} + nop +_02248AEC: .word 0x00000584 + thumb_func_end ov6_02248AC8 + + thumb_func_start ov6_02248AF0 +ov6_02248AF0: ; 0x02248AF0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r2, #0 + bl sub_02073C70 + add r4, r0, #0 + mov r0, #0x14 + add r1, r4, #1 + bl sub_02018144 + add r5, r0, #0 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + bl sub_020C4DB0 + mov r0, #0x1b + add r1, r5, #0 + add r2, r4, #1 + strb r6, [r5, r4] + bl sub_020359DC + cmp r0, #1 + bne _02248B24 + mov r4, #1 + b _02248B26 +_02248B24: + mov r4, #0 +_02248B26: + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov6_02248AF0 + + thumb_func_start ov6_02248B30 +ov6_02248B30: ; 0x02248B30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r2, [sp] + str r3, [sp, #4] + bl sub_02073C70 + mov r7, #0 + ldr r4, [sp, #4] + add r6, r0, #0 + add r5, r7, #0 +_02248B44: + ldr r0, [sp] + ldr r1, [r4, #0] + add r0, r0, r5 + add r2, r6, #0 + bl sub_020C4DB0 + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, r6 + cmp r7, #4 + blt _02248B44 + ldr r1, _02248B6C ; =0x00000584 + ldr r0, [sp, #4] + ldrb r0, [r0, r1] + add r2, r0, #1 + ldr r0, [sp, #4] + strb r2, [r0, r1] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248B6C: .word 0x00000584 + thumb_func_end ov6_02248B30 + + thumb_func_start ov6_02248B70 +ov6_02248B70: ; 0x02248B70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + add r5, r1, #0 + bl sub_02073C70 + add r6, r0, #0 + lsl r0, r6, #2 + str r0, [sp] + ldr r0, _02248BBC ; =0x00000585 + mov r7, #0 + add r0, r4, r0 + str r0, [sp, #4] + add r4, r7, #0 +_02248B8C: + ldr r1, [sp, #4] + ldr r0, [r5, #0] + add r1, r1, r4 + add r2, r6, #0 + bl sub_020C4DB0 + add r7, r7, #1 + add r4, r4, r6 + add r5, r5, #4 + cmp r7, #4 + blt _02248B8C + ldr r1, [sp, #4] + ldr r2, [sp] + mov r0, #0x1c + bl sub_0203597C + cmp r0, #1 + bne _02248BB6 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02248BB6: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248BBC: .word 0x00000585 + thumb_func_end ov6_02248B70 + + thumb_func_start ov6_02248BC0 +ov6_02248BC0: ; 0x02248BC0 + push {r3, r4, r5, lr} + add r0, r2, #0 + add r2, #0x30 + ldrb r1, [r2] + add r4, r3, #0 + add r5, r4, #0 + mov r2, #0x30 + add r3, r1, #0 + add r5, #0x10 + mul r3, r2 + add r1, r5, r3 + bl sub_020C4DB0 + ldr r0, _02248BE4 ; =0x00000584 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02248BE4: .word 0x00000584 + thumb_func_end ov6_02248BC0 + + thumb_func_start ov6_02248BE8 +ov6_02248BE8: ; 0x02248BE8 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r0, #0x14 + mov r1, #0x31 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0x30 + bl sub_020C4DB0 + add r0, r4, #0 + add r0, #0x30 + strb r5, [r0] + mov r0, #0x1d + add r1, r4, #0 + mov r2, #0x31 + bl sub_020359DC + cmp r0, #1 + bne _02248C1A + mov r5, #1 + b _02248C1C +_02248C1A: + mov r5, #0 +_02248C1C: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02248BE8 + + thumb_func_start ov6_02248C28 +ov6_02248C28: ; 0x02248C28 + push {r3, r4, r5, r6, r7, lr} + add r5, r3, #0 + add r6, r2, #0 + str r3, [sp] + mov r4, #0 + add r5, #0xd0 + mov r7, #8 +_02248C36: + lsl r0, r4, #3 + add r0, r6, r0 + add r1, r5, #0 + add r2, r7, #0 + bl sub_020C4DB0 + add r4, r4, #1 + add r5, #8 + cmp r4, #3 + blt _02248C36 + ldrb r2, [r6, #0x18] + ldr r1, _02248C60 ; =0x0000011E + ldr r0, [sp] + strb r2, [r0, r1] + ldr r1, _02248C64 ; =0x00000584 + ldrb r0, [r0, r1] + add r2, r0, #1 + ldr r0, [sp] + strb r2, [r0, r1] + pop {r3, r4, r5, r6, r7, pc} + nop +_02248C60: .word 0x0000011E +_02248C64: .word 0x00000584 + thumb_func_end ov6_02248C28 + + thumb_func_start ov6_02248C68 +ov6_02248C68: ; 0x02248C68 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + mov r0, #0x14 + mov r1, #0x19 + add r5, r2, #0 + bl sub_02018144 + add r6, r0, #0 + mov r4, #0 + mov r7, #8 +_02248C7C: + lsl r1, r4, #3 + add r0, r5, #0 + add r1, r6, r1 + add r2, r7, #0 + bl sub_020C4DB0 + add r4, r4, #1 + add r5, #8 + cmp r4, #3 + blt _02248C7C + ldr r1, _02248CB8 ; =0x0000011E + ldr r0, [sp] + mov r2, #0x19 + ldrb r0, [r0, r1] + add r1, r6, #0 + strb r0, [r6, #0x18] + mov r0, #0x1e + bl sub_020359DC + cmp r0, #1 + bne _02248CAA + mov r4, #1 + b _02248CAC +_02248CAA: + mov r4, #0 +_02248CAC: + add r0, r6, #0 + bl sub_020181C4 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_02248CB8: .word 0x0000011E + thumb_func_end ov6_02248C68 + + thumb_func_start ov6_02248CBC +ov6_02248CBC: ; 0x02248CBC + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + ldrb r0, [r5] + add r6, r3, #0 + add r4, r6, #0 + add r4, #0xe8 + lsl r7, r0, #2 + ldr r0, [r4, r7] + bl sub_020237E8 + ldr r0, [r4, r7] + add r1, r5, #4 + bl sub_02023D28 + ldr r0, _02248CE4 ; =0x00000584 + ldrb r1, [r6, r0] + add r1, r1, #1 + strb r1, [r6, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_02248CE4: .word 0x00000584 + thumb_func_end ov6_02248CBC + + thumb_func_start ov6_02248CE8 +ov6_02248CE8: ; 0x02248CE8 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r0, r2, #0 + add r1, sp, #0 + mov r2, #8 + bl sub_02023DF0 + mov r0, #0x14 + add r1, r0, #0 + bl sub_02018144 + add r4, r0, #0 + add r0, sp, #0 + add r1, r4, #4 + mov r2, #0x10 + bl sub_020C4DB0 + strb r5, [r4] + mov r0, #0x10 + strb r0, [r4, #1] + mov r0, #0 + strb r0, [r4, #2] + strb r0, [r4, #3] + mov r0, #0x1f + add r1, r4, #0 + mov r2, #0x14 + bl sub_020359DC + cmp r0, #1 + bne _02248D2A + mov r5, #1 + b _02248D2C +_02248D2A: + mov r5, #0 +_02248D2C: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov6_02248CE8 + + thumb_func_start ov6_02248D38 +ov6_02248D38: ; 0x02248D38 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + bl sub_0202CC64 + add r2, r0, #0 + ldrb r1, [r5, r2] + add r0, r5, #0 + lsl r1, r1, #2 + add r3, r4, r1 + mov r1, #0x57 + lsl r1, r1, #2 + ldr r1, [r3, r1] + bl sub_020C4DB0 + ldr r0, _02248D60 ; =0x00000584 + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02248D60: .word 0x00000584 + thumb_func_end ov6_02248D38 + + thumb_func_start ov6_02248D64 +ov6_02248D64: ; 0x02248D64 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + bl sub_0202CC64 + add r5, r0, #0 + ldr r0, _02248D9C ; =0x00000585 + add r4, r4, r0 + cmp r6, #0 + beq _02248D84 + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl sub_020C4DB0 +_02248D84: + mov r0, #0x24 + add r1, r4, #0 + add r2, r5, #1 + strb r7, [r4, r5] + bl sub_0203597C + cmp r0, #1 + bne _02248D98 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02248D98: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02248D9C: .word 0x00000585 + thumb_func_end ov6_02248D64 + + thumb_func_start ov6_02248DA0 +ov6_02248DA0: ; 0x02248DA0 + push {r3, r4, r5, r6} + ldrb r1, [r2, #6] + ldrb r4, [r2] + mov r5, #0x42 + add r0, r3, r1 + lsl r5, r5, #2 + strb r4, [r0, r5] + ldrb r6, [r2, #1] + add r4, r5, #4 + strb r6, [r0, r4] + add r4, r5, #0 + ldrb r6, [r2, #2] + add r4, #8 + add r5, #0xc + strb r6, [r0, r4] + lsl r0, r1, #1 + ldrh r2, [r2, #4] + add r0, r3, r0 + strh r2, [r0, r5] + ldr r0, _02248DD4 ; =0x00000584 + ldrb r1, [r3, r0] + add r1, r1, #1 + strb r1, [r3, r0] + pop {r3, r4, r5, r6} + bx lr + nop +_02248DD4: .word 0x00000584 + thumb_func_end ov6_02248DA0 + + thumb_func_start ov6_02248DD8 +ov6_02248DD8: ; 0x02248DD8 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r0, #0x14 + mov r1, #7 + add r6, r2, #0 + bl sub_02018144 + add r4, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + mov r2, #6 + bl sub_020C4DB0 + mov r0, #0x25 + add r1, r4, #0 + mov r2, #7 + strb r5, [r4, #6] + bl sub_020359DC + cmp r0, #1 + bne _02248E06 + mov r5, #1 + b _02248E08 +_02248E06: + mov r5, #0 +_02248E08: + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov6_02248DD8 \ No newline at end of file diff --git a/asm/ov70_0225C700.s b/asm/ov70_0225C700.s new file mode 100644 index 000000000..4c6386b96 --- /dev/null +++ b/asm/ov70_0225C700.s @@ -0,0 +1,170 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0225C700 +ov70_0225C700: ; 0x0225C700 + mov r3, #0 + ldrsh r2, [r0, r3] + lsl r2, r2, #0xc + str r2, [r1, #0] + mov r2, #2 + ldrsh r0, [r0, r2] + lsl r0, r0, #0xc + str r0, [r1, #8] + str r3, [r1, #4] + bx lr + thumb_func_end ov70_0225C700 + + thumb_func_start ov70_0225C714 +ov70_0225C714: ; 0x0225C714 + ldr r3, [r0, #0] + asr r2, r3, #0xb + lsr r2, r2, #0x14 + add r2, r3, r2 + asr r2, r2, #0xc + strh r2, [r1] + ldr r2, [r0, #8] + asr r0, r2, #0xb + lsr r0, r0, #0x14 + add r0, r2, r0 + asr r0, r0, #0xc + strh r0, [r1, #2] + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225C714 + + thumb_func_start ov70_0225C730 +ov70_0225C730: ; 0x0225C730 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + add r0, r1, #0 + add r1, r2, #0 + mov r2, #0 + add r7, r3, #0 + bl sub_0200723C + add r4, r0, #0 + bl sub_020B3C1C + add r6, r0, #0 + bl sub_0201CBCC + add r0, r6, #0 + add r1, sp, #0xc + add r2, sp, #8 + bl sub_020AE9B8 + add r0, r6, #0 + bl sub_020AEA70 + str r0, [sp, #4] + add r0, r4, #0 + bl sub_02022F24 + add r6, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl sub_02018144 + str r0, [r5, #0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_020D50B8 + ldr r0, [r5, #0] + bl sub_020B3C1C + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + add r5, r0, #0 + bl sub_020AE8EC + ldr r1, [sp, #4] + add r0, r5, #0 + bl sub_020AEA18 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225C730 + + thumb_func_start ov70_0225C7A0 +ov70_0225C7A0: ; 0x0225C7A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + add r1, sp, #0x54 + add r2, sp, #0x58 + add r3, sp, #0x5c + bl sub_02017358 + add r0, r5, #0 + add r1, sp, #0x48 + add r2, sp, #0x4c + add r3, sp, #0x50 + bl sub_02017374 + add r0, r5, #0 + mov r1, #0 + bl sub_02017394 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #1 + bl sub_02017394 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #2 + bl sub_02017394 + add r5, r0, #0 + add r0, sp, #0x24 + bl sub_020BB4C8 + asr r0, r6, #4 + lsl r3, r0, #1 + lsl r1, r3, #1 + ldr r2, _0225C854 ; =0x020F983C + add r3, r3, #1 + lsl r3, r3, #1 + ldrsh r1, [r2, r1] + ldrsh r2, [r2, r3] + add r0, sp, #0 + bl sub_020BB5AC + add r1, sp, #0x24 + add r0, sp, #0 + add r2, r1, #0 + bl sub_020BB8EC + asr r0, r5, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + ldr r3, _0225C854 ; =0x020F983C + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #0 + bl sub_020BB5E4 + add r1, sp, #0x24 + add r0, sp, #0 + add r2, r1, #0 + bl sub_020BB8EC + asr r0, r7, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + ldr r3, _0225C854 ; =0x020F983C + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #0 + bl sub_020BB5C8 + add r1, sp, #0x24 + add r0, sp, #0 + add r2, r1, #0 + bl sub_020BB8EC + ldr r0, [r4, #8] + add r1, sp, #0x54 + add r2, sp, #0x24 + add r3, sp, #0x48 + bl sub_0201CED8 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225C854: .word 0x020F983C + thumb_func_end ov70_0225C7A0 \ No newline at end of file diff --git a/asm/ov70_0225C858.s b/asm/ov70_0225C858.s new file mode 100644 index 000000000..a3f0bc047 --- /dev/null +++ b/asm/ov70_0225C858.s @@ -0,0 +1,245 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0225C858 +ov70_0225C858: ; 0x0225C858 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #4 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0x23 + mov r1, #0x2a + add r2, r5, #0 + bl ov63_0222BCE8 + str r0, [r4, #0] + mov r0, #1 + mov r1, #0 + str r0, [sp] + mov r0, #0xae + add r2, r1, #0 + add r3, r5, #0 + bl sub_02006FE8 + add r5, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + bl ov63_0222BD50 + add r0, r5, #0 + bl sub_020181C4 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225C858 + + thumb_func_start ov70_0225C894 +ov70_0225C894: ; 0x0225C894 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov63_0222BD30 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225C894 + + thumb_func_start ov70_0225C8A8 +ov70_0225C8A8: ; 0x0225C8A8 + mov r0, #0x23 + bx lr + thumb_func_end ov70_0225C8A8 + + thumb_func_start ov70_0225C8AC +ov70_0225C8AC: ; 0x0225C8AC + ldr r3, _0225C8B4 ; =ov63_0222BDAC + ldr r0, [r0, #0] + bx r3 + nop +_0225C8B4: .word ov63_0222BDAC + thumb_func_end ov70_0225C8AC + + thumb_func_start ov70_0225C8B8 +ov70_0225C8B8: ; 0x0225C8B8 + push {r3, lr} + ldr r0, [r0, #0] + bl ov63_0222BDE4 + lsr r0, r0, #0xf + pop {r3, pc} + thumb_func_end ov70_0225C8B8 + + thumb_func_start ov70_0225C8C4 +ov70_0225C8C4: ; 0x0225C8C4 + push {r3, lr} + ldr r0, [r0, #0] + bl ov63_0222BDE4 + ldr r1, _0225C8D4 ; =0x00007FFF + and r0, r1 + pop {r3, pc} + nop +_0225C8D4: .word 0x00007FFF + thumb_func_end ov70_0225C8C4 + + thumb_func_start ov70_0225C8D8 +ov70_0225C8D8: ; 0x0225C8D8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r5, #0 + ldr r7, [sp, #0x28] + str r0, [sp] + str r1, [sp, #4] + str r2, [sp, #8] + str r3, [sp, #0xc] + str r5, [sp, #0x10] +_0225C8EA: + ldr r0, [sp, #0x10] + mov r4, #0 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 +_0225C8F2: + lsl r1, r4, #0x10 + ldr r0, [sp] + lsr r1, r1, #0x10 + add r2, r6, #0 + bl ov70_0225C8B8 + ldr r1, [sp, #4] + cmp r0, r1 + bne _0225C91A + cmp r5, r7 + blo _0225C918 + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + strh r4, [r0] + ldr r0, [sp, #0xc] + add sp, #0x14 + strh r1, [r0] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0225C918: + add r5, r5, #1 +_0225C91A: + add r4, r4, #1 + cmp r4, #0x23 + blt _0225C8F2 + ldr r0, [sp, #0x10] + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #0x2a + blt _0225C8EA + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_0225C8D8 + + thumb_func_start ov70_0225C930 +ov70_0225C930: ; 0x0225C930 + ldr r3, _0225C94C ; =0x0226D4DC + mov r2, #0 +_0225C934: + ldrb r1, [r3] + cmp r0, r1 + bne _0225C93E + mov r0, #1 + bx lr +_0225C93E: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #0x20 + blo _0225C934 + mov r0, #0 + bx lr + nop +_0225C94C: .word 0x0226D4DC + thumb_func_end ov70_0225C930 + + thumb_func_start ov70_0225C950 +ov70_0225C950: ; 0x0225C950 + ldr r3, _0225C96C ; =0x0226D4CC + mov r2, #0 +_0225C954: + ldrb r1, [r3] + cmp r0, r1 + bne _0225C95E + mov r0, #1 + bx lr +_0225C95E: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #3 + blo _0225C954 + mov r0, #0 + bx lr + nop +_0225C96C: .word 0x0226D4CC + thumb_func_end ov70_0225C950 + + thumb_func_start ov70_0225C970 +ov70_0225C970: ; 0x0225C970 + ldr r3, _0225C98C ; =0x0226D4D4 + mov r2, #0 +_0225C974: + ldrb r1, [r3] + cmp r0, r1 + bne _0225C97E + mov r0, #1 + bx lr +_0225C97E: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #7 + blo _0225C974 + mov r0, #0 + bx lr + nop +_0225C98C: .word 0x0226D4D4 + thumb_func_end ov70_0225C970 + + thumb_func_start ov70_0225C990 +ov70_0225C990: ; 0x0225C990 + ldr r3, _0225C9AC ; =0x0226D4D0 + mov r2, #0 +_0225C994: + ldrb r1, [r3] + cmp r0, r1 + bne _0225C99E + mov r0, #1 + bx lr +_0225C99E: + add r2, r2, #1 + add r3, r3, #1 + cmp r2, #4 + blo _0225C994 + mov r0, #0 + bx lr + nop +_0225C9AC: .word 0x0226D4D0 + thumb_func_end ov70_0225C990 + + thumb_func_start ov70_0225C9B0 +ov70_0225C9B0: ; 0x0225C9B0 + ldr r0, [r0, #0] + bx lr + thumb_func_end ov70_0225C9B0 + + .rodata + + + .global Unk_ov70_0226D4CC +Unk_ov70_0226D4CC: ; 0x0226D4CC + .incbin "incbin/overlay70_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov70_0226D4D0 +Unk_ov70_0226D4D0: ; 0x0226D4D0 + .incbin "incbin/overlay70_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov70_0226D4D4 +Unk_ov70_0226D4D4: ; 0x0226D4D4 + .incbin "incbin/overlay70_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov70_0226D4DC +Unk_ov70_0226D4DC: ; 0x0226D4DC + .incbin "incbin/overlay70_rodata.bin", 0x10, 0x20 + diff --git a/asm/ov70_0225C9B4.s b/asm/ov70_0225C9B4.s new file mode 100644 index 000000000..c19716a35 --- /dev/null +++ b/asm/ov70_0225C9B4.s @@ -0,0 +1,2237 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0225C9B4 +ov70_0225C9B4: ; 0x0225C9B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + add r0, r3, #0 + mov r1, #0x28 + str r2, [sp] + str r3, [sp, #4] + bl sub_02018144 + mov r1, #0 + mov r2, #0x28 + add r4, r0, #0 + bl sub_020D5124 + ldr r1, [sp, #4] + add r0, r5, #0 + bl ov63_0222BE18 + str r0, [r4, #0] + ldr r2, [sp, #4] + ldr r3, [sp, #0x20] + add r0, r5, #0 + add r1, r6, #0 + bl ov66_022343A8 + str r0, [r4, #4] + ldr r1, [sp, #4] + mov r0, #0x20 + bl ov63_0222D848 + str r0, [r4, #0x10] + mov r0, #0x28 + add r7, r5, #0 + mul r7, r0 + ldr r0, [sp, #4] + add r1, r7, #0 + strh r5, [r4, #0xc] + bl sub_02018144 + mov r1, #0 + add r2, r7, #0 + str r0, [r4, #8] + bl sub_020D5124 + ldr r0, [sp] + str r0, [r4, #0x14] + add r0, r4, #0 + strh r6, [r4, #0xe] + bl ov70_0225D0D8 + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225C9B4 + + thumb_func_start ov70_0225CA20 +ov70_0225CA20: ; 0x0225CA20 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_020181C4 + ldr r0, [r4, #0x10] + bl ov63_0222D880 + ldr r0, [r4, #4] + bl ov66_02234548 + ldr r0, [r4, #0] + bl ov63_0222BE58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov70_0225CA20 + + thumb_func_start ov70_0225CA44 +ov70_0225CA44: ; 0x0225CA44 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl ov63_0222BE84 + add r0, r4, #0 + ldr r1, [r4, #4] + add r0, #0x18 + bl ov70_0225D954 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CA44 + + thumb_func_start ov70_0225CA5C +ov70_0225CA5C: ; 0x0225CA5C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldrh r0, [r5, #0xc] + mov r6, #0 + cmp r0, #0 + ble _0225CA8C + add r4, r6, #0 +_0225CA6C: + ldr r0, [r5, #8] + add r0, r0, r4 + bl ov70_0225D2FC + cmp r0, #0 + bne _0225CA82 + ldr r0, [r5, #8] + add r1, r5, #0 + add r0, r0, r4 + ldr r2, [r0, #0x24] + blx r2 +_0225CA82: + ldrh r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0x28 + cmp r6, r0 + blt _0225CA6C +_0225CA8C: + ldr r0, [r5, #0x14] + bl ov70_0225C9B0 + add r4, r0, #0 + ldr r0, [r5, #0x10] + add r1, sp, #8 + bl ov63_0222D8D0 + cmp r0, #1 + bne _0225CAC8 + add r7, sp, #0 + add r6, sp, #8 +_0225CAA4: + ldr r1, [r5, #0] + add r0, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov63_0222CA88 + cmp r0, #1 + bne _0225CABC + ldr r0, [r5, #0] + add r1, r7, #0 + bl ov63_0222BE70 +_0225CABC: + ldr r0, [r5, #0x10] + add r1, r6, #0 + bl ov63_0222D8D0 + cmp r0, #1 + beq _0225CAA4 +_0225CAC8: + ldr r0, [r5, #4] + bl ov66_02234590 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CA5C + + thumb_func_start ov70_0225CAD4 +ov70_0225CAD4: ; 0x0225CAD4 + ldr r3, _0225CADC ; =ov66_022345C4 + ldr r0, [r0, #4] + bx r3 + nop +_0225CADC: .word ov66_022345C4 + thumb_func_end ov70_0225CAD4 + + thumb_func_start ov70_0225CAE0 +ov70_0225CAE0: ; 0x0225CAE0 + ldr r3, _0225CAE8 ; =ov66_02234604 + ldr r0, [r0, #4] + bx r3 + nop +_0225CAE8: .word ov66_02234604 + thumb_func_end ov70_0225CAE0 + + thumb_func_start ov70_0225CAEC +ov70_0225CAEC: ; 0x0225CAEC + add r3, r0, #0 + add r2, r1, #0 + ldr r1, [r3, #4] + lsl r3, r2, #2 + ldr r2, _0225CB00 ; =0x0226D518 + add r0, #0x18 + ldr r2, [r2, r3] + ldr r3, _0225CB04 ; =ov70_0225D920 + bx r3 + nop +_0225CB00: .word 0x0226D518 +_0225CB04: .word ov70_0225D920 + thumb_func_end ov70_0225CAEC + + thumb_func_start ov70_0225CB08 +ov70_0225CB08: ; 0x0225CB08 + lsl r2, r1, #2 + ldr r1, _0225CB14 ; =0x0226D518 + ldr r3, _0225CB18 ; =ov70_0225D93C + add r0, #0x18 + ldr r1, [r1, r2] + bx r3 + ; .align 2, 0 +_0225CB14: .word 0x0226D518 +_0225CB18: .word ov70_0225D93C + thumb_func_end ov70_0225CB08 + + thumb_func_start ov70_0225CB1C +ov70_0225CB1C: ; 0x0225CB1C + ldr r3, _0225CB24 ; =ov63_0222D894 + ldr r0, [r0, #0x10] + bx r3 + nop +_0225CB24: .word ov63_0222D894 + thumb_func_end ov70_0225CB1C + + thumb_func_start ov70_0225CB28 +ov70_0225CB28: ; 0x0225CB28 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + add r2, sp, #4 + add r4, r1, #0 + ldr r0, [r5, #0x14] + mov r1, #3 + add r2, #2 + add r3, sp, #4 + bl ov70_0225C8D8 + cmp r0, #0 + bne _0225CB4A + bl sub_02022974 +_0225CB4A: + add r3, sp, #4 + ldrh r2, [r3, #2] + ldrh r3, [r3] + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0225CB5C + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225CB28 + + thumb_func_start ov70_0225CB5C +ov70_0225CB5C: ; 0x0225CB5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + str r3, [sp] + bl ov70_0225D2C0 + add r4, r0, #0 + lsl r0, r7, #4 + add r1, sp, #4 + strh r0, [r1] + ldr r0, [sp] + mov r2, #0 + lsl r0, r0, #4 + strh r0, [r1, #2] + strh r6, [r1, #4] + strh r2, [r1, #6] + strh r2, [r1, #8] + ldrh r0, [r5, #0xe] + cmp r0, #0 + bne _0225CB8C + strh r2, [r1, #0xa] + b _0225CB90 +_0225CB8C: + mov r0, #0x61 + strh r0, [r1, #0xa] +_0225CB90: + ldr r0, [r5, #0] + add r1, sp, #4 + bl ov63_0222BEC0 + str r0, [r4, #0] + ldr r0, [r5, #4] + ldr r1, [r4, #0] + bl ov66_0223461C + str r0, [r4, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + str r4, [r5, #0x20] + bl ov70_0225CDEC + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CB5C + + thumb_func_start ov70_0225CBB8 +ov70_0225CBB8: ; 0x0225CBB8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r7, r1, #0 + str r2, [sp, #4] + bl ov70_0225D2C0 + mov r6, #0 + str r0, [sp, #8] + add r4, r6, #0 +_0225CBCC: + str r4, [sp] + add r2, sp, #0xc + ldr r0, [r5, #0x14] + add r1, r7, #4 + add r2, #2 + add r3, sp, #0xc + bl ov70_0225C8D8 + cmp r0, #0 + bne _0225CBE6 + add sp, #0x1c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0225CBE6: + add r0, r5, #0 + bl ov70_0225CCAC + cmp r0, #0 + bne _0225CBF4 + mov r6, #1 + b _0225CC06 +_0225CBF4: + add r1, sp, #0xc + add r2, sp, #0xc + ldrh r1, [r1, #2] + ldrh r2, [r2] + bl ov70_0225CEDC + cmp r0, #0 + bne _0225CC06 + mov r6, #1 +_0225CC06: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r6, #0 + beq _0225CBCC + add r1, sp, #0xc + ldrh r0, [r1, #2] + lsl r0, r0, #4 + strh r0, [r1, #4] + ldrh r0, [r1] + lsl r0, r0, #4 + strh r0, [r1, #6] + strh r7, [r1, #8] + mov r0, #0 + strh r0, [r1, #0xa] + mov r0, #1 + strh r0, [r1, #0xc] + ldr r0, [sp, #4] + strh r0, [r1, #0xe] + ldr r0, [r5, #0] + add r1, sp, #0x10 + bl ov63_0222BEC0 + ldr r1, [sp, #8] + str r0, [r1, #0] + ldr r0, [r5, #4] + ldr r1, [r1, #0] + bl ov66_0223461C + ldr r1, [sp, #8] + mov r2, #0 + str r0, [r1, #4] + add r0, r5, #0 + bl ov70_0225CDEC + ldr r0, [sp, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CBB8 + + thumb_func_start ov70_0225CC54 +ov70_0225CC54: ; 0x0225CC54 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl ov66_02234798 + ldr r0, [r4, #0] + bl ov63_0222BF08 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x28 + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov70_0225CC54 + + thumb_func_start ov70_0225CC70 +ov70_0225CC70: ; 0x0225CC70 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrh r0, [r5, #0xc] + add r7, r1, #0 + mov r6, #0 + cmp r0, #0 + ble _0225CCA6 + add r4, r6, #0 +_0225CC80: + ldr r0, [r5, #8] + ldr r0, [r0, r4] + cmp r0, #0 + beq _0225CC9C + mov r1, #4 + bl ov63_0222BF90 + cmp r0, r7 + bne _0225CC9C + mov r0, #0x28 + ldr r1, [r5, #8] + mul r0, r6 + add r0, r1, r0 + pop {r3, r4, r5, r6, r7, pc} +_0225CC9C: + ldrh r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0x28 + cmp r6, r0 + blt _0225CC80 +_0225CCA6: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CC70 + + thumb_func_start ov70_0225CCAC +ov70_0225CCAC: ; 0x0225CCAC + ldr r0, [r0, #0x20] + bx lr + thumb_func_end ov70_0225CCAC + + thumb_func_start ov70_0225CCB0 +ov70_0225CCB0: ; 0x0225CCB0 + ldr r0, [r0, #0x24] + bx lr + thumb_func_end ov70_0225CCB0 + + thumb_func_start ov70_0225CCB4 +ov70_0225CCB4: ; 0x0225CCB4 + push {r0, r1, r2, r3} + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0225CCC4 + bl sub_02022974 +_0225CCC4: + add r1, sp, #8 + ldrh r2, [r1, #4] + mov r3, sp + ldr r0, [r4, #0] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1A4 + add r1, sp, #8 + mov r3, sp + ldrh r2, [r1, #4] + ldr r0, [r4, #0] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C1B4 + ldr r0, [r4, #0] + mov r1, #5 + mov r2, #0 + bl ov63_0222C000 + pop {r4} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov70_0225CCB4 + + thumb_func_start ov70_0225CD04 +ov70_0225CD04: ; 0x0225CD04 + push {r0, r1, r2, r3} + push {r3, r4, r5, lr} + add r1, sp, #0x10 + add r4, r2, #0 + mov r3, sp + ldrh r2, [r1, #4] + sub r3, r3, #4 + add r5, r0, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov70_0225CCB4 + ldr r0, [r5, #0] + mov r1, #6 + add r2, r4, #0 + bl ov63_0222C000 + pop {r3, r4, r5} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov70_0225CD04 + + thumb_func_start ov70_0225CD34 +ov70_0225CD34: ; 0x0225CD34 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0225CD44 + bl sub_02022974 +_0225CD44: + ldr r0, [r4, #0] + bl ov63_0222C0FC + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r2, [r1, #2] + ldrh r0, [r1] + lsl r1, r2, #0x10 + orr r0, r1 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CD34 + + thumb_func_start ov70_0225CD60 +ov70_0225CD60: ; 0x0225CD60 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #0 + bne _0225CD70 + bl sub_02022974 +_0225CD70: + ldr r0, [r5, #0] + add r1, r4, #0 + bl ov63_0222BF90 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CD60 + + thumb_func_start ov70_0225CD7C +ov70_0225CD7C: ; 0x0225CD7C + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #5 + add r6, r2, #0 + add r7, r3, #0 + bl ov63_0222BF90 + cmp r0, #0 + beq _0225CD96 + bl sub_02022974 +_0225CD96: + ldr r0, [r4, #0] + mov r1, #4 + bl ov63_0222BF90 + add r3, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225CD7C + + thumb_func_start ov70_0225CDAC +ov70_0225CDAC: ; 0x0225CDAC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + add r6, r2, #0 + add r7, r3, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + strh r6, [r1, #8] + strb r7, [r1, #0xa] + ldr r0, [r4, #0] + mov r1, #4 + bl ov63_0222BF90 + add r1, sp, #0 + strb r0, [r1, #0xb] + ldr r0, [r5, #0] + add r1, sp, #4 + bl ov63_0222BE70 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CDAC + + thumb_func_start ov70_0225CDEC +ov70_0225CDEC: ; 0x0225CDEC + push {r4, r5, r6, lr} + add r4, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + cmp r4, #0xa + blt _0225CDFC + bl sub_02022974 +_0225CDFC: + ldrb r0, [r5, #0xb] + lsl r1, r0, #2 + ldr r0, _0225CE30 ; =0x0226D530 + ldr r2, [r0, r1] + cmp r2, #0 + beq _0225CE0E + add r0, r5, #0 + add r1, r6, #0 + blx r2 +_0225CE0E: + mov r2, #0 + strh r2, [r5, #8] + strb r2, [r5, #0xa] + add r1, r5, #0 + strb r4, [r5, #0xb] + add r1, #0xc + mov r0, #0x18 +_0225CE1C: + strb r2, [r1] + add r1, r1, #1 + sub r0, r0, #1 + bne _0225CE1C + ldr r0, _0225CE34 ; =0x0226D558 + lsl r1, r4, #2 + ldr r0, [r0, r1] + str r0, [r5, #0x24] + pop {r4, r5, r6, pc} + nop +_0225CE30: .word 0x0226D530 +_0225CE34: .word 0x0226D558 + thumb_func_end ov70_0225CDEC + + thumb_func_start ov70_0225CE38 +ov70_0225CE38: ; 0x0225CE38 + ldrb r0, [r0, #0xa] + bx lr + thumb_func_end ov70_0225CE38 + + thumb_func_start ov70_0225CE3C +ov70_0225CE3C: ; 0x0225CE3C + ldrb r0, [r0, #0xb] + bx lr + thumb_func_end ov70_0225CE3C + + thumb_func_start ov70_0225CE40 +ov70_0225CE40: ; 0x0225CE40 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + mov r1, #6 + bl ov63_0222BF90 + add r2, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r5, #0] + bl ov63_0222C1C4 + cmp r0, #0 + bne _0225CE60 + mov r0, #0 + pop {r3, r4, r5, pc} +_0225CE60: + mov r1, #4 + bl ov63_0222BF90 + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225CC70 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225CE40 + + thumb_func_start ov70_0225CE70 +ov70_0225CE70: ; 0x0225CE70 + ldr r3, _0225CE78 ; =ov66_022347CC + ldr r0, [r0, #4] + bx r3 + nop +_0225CE78: .word ov66_022347CC + thumb_func_end ov70_0225CE70 + + thumb_func_start ov70_0225CE7C +ov70_0225CE7C: ; 0x0225CE7C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + lsl r0, r1, #4 + add r1, sp, #0 + strh r0, [r1] + lsl r0, r2, #4 + strh r0, [r1, #2] + mov r3, sp + ldrh r2, [r1] + ldr r0, [r4, #0] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #2] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov63_0222C2AC + cmp r0, #0 + bne _0225CEAA + add sp, #4 + mov r0, #0 + pop {r3, r4, pc} +_0225CEAA: + ldrh r2, [r4, #0xc] + mov r1, #0 + cmp r2, #0 + ble _0225CED0 + ldr r3, [r4, #8] +_0225CEB4: + ldr r2, [r3, #0] + cmp r2, r0 + bne _0225CEC6 + mov r0, #0x28 + ldr r2, [r4, #8] + mul r0, r1 + add sp, #4 + add r0, r2, r0 + pop {r3, r4, pc} +_0225CEC6: + ldrh r2, [r4, #0xc] + add r1, r1, #1 + add r3, #0x28 + cmp r1, r2 + blt _0225CEB4 +_0225CED0: + bl sub_02022974 + mov r0, #0 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225CE7C + + thumb_func_start ov70_0225CEDC +ov70_0225CEDC: ; 0x0225CEDC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r4, r2, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldr r0, [r5, #0] + bl ov63_0222C0F0 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #0xc + strh r0, [r2, #8] + ldrh r0, [r2, #2] + strh r0, [r2, #0xa] + ldrsh r1, [r2, r1] + lsl r0, r6, #4 + cmp r1, r0 + bne _0225CF2C + mov r1, #0xe + ldrsh r2, [r2, r1] + lsl r1, r4, #4 + cmp r2, r1 + bne _0225CF2C + add sp, #0x10 + mov r0, #1 + pop {r4, r5, r6, pc} +_0225CF2C: + add r2, sp, #0 + mov r1, #8 + ldrsh r1, [r2, r1] + cmp r1, r0 + bne _0225CF46 + mov r0, #0xa + ldrsh r1, [r2, r0] + lsl r0, r4, #4 + cmp r1, r0 + bne _0225CF46 + add sp, #0x10 + mov r0, #1 + pop {r4, r5, r6, pc} +_0225CF46: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225CEDC + + thumb_func_start ov70_0225CF4C +ov70_0225CF4C: ; 0x0225CF4C + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r6, r0, #0 + ldr r0, [r1, #0] + str r2, [sp] + str r3, [sp, #4] + bl ov63_0222C0E4 + add r4, sp, #0x1c + strh r0, [r4, #4] + lsr r0, r0, #0x10 + strh r0, [r4, #6] + ldrh r0, [r4, #4] + mov r5, sp + ldr r7, _0225D02C ; =0x0226D504 + strh r0, [r4, #0xc] + ldrh r0, [r4, #6] + sub r5, r5, #4 + strh r0, [r4, #0xe] + mov r0, #0 + str r0, [sp, #0x10] + ldrh r0, [r4, #0xc] + str r0, [sp, #0x14] + ldrh r0, [r4, #0xe] + str r0, [sp, #0x18] +_0225CF7E: + ldr r0, [sp, #0x14] + strh r0, [r5] + ldr r0, [sp, #0x18] + strh r0, [r5, #2] + ldrb r1, [r7] + ldr r0, [r5, #0] + bl ov63_0222C078 + strh r0, [r4] + lsr r0, r0, #0x10 + strh r0, [r4, #2] + ldrh r0, [r4] + strh r0, [r4, #8] + ldrh r0, [r4, #2] + strh r0, [r4, #0xa] + mov r0, #0xa + ldrsh r1, [r4, r0] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + str r0, [sp, #0xc] + mov r0, #8 + ldrsh r1, [r4, r0] + ldr r2, [sp, #0xc] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + str r0, [sp, #8] + ldr r1, [sp, #8] + lsl r2, r2, #0x10 + lsl r1, r1, #0x10 + ldr r0, [r6, #0x14] + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov70_0225C8AC + cmp r0, #1 + beq _0225D018 + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r6, #0x14] + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov70_0225C8C4 + cmp r0, #0 + beq _0225CFE8 + cmp r0, #0x2a + bne _0225D018 +_0225CFE8: + ldrh r1, [r4, #8] + ldr r0, [r6, #0] + strh r1, [r5] + ldrh r1, [r4, #0xa] + strh r1, [r5, #2] + ldr r1, [r5, #0] + bl ov63_0222C2AC + cmp r0, #0 + bne _0225D018 + ldr r1, _0225D02C ; =0x0226D504 + ldr r0, [sp, #0x10] + ldrb r1, [r1, r0] + ldr r0, [sp] + str r1, [r0, #0] + add r1, sp, #0x1c + ldr r0, [sp, #4] + ldrh r2, [r1, #8] + add sp, #0x2c + strh r2, [r0] + ldrh r1, [r1, #0xa] + strh r1, [r0, #2] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0225D018: + ldr r0, [sp, #0x10] + add r7, r7, #1 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #4 + blt _0225CF7E + mov r0, #0 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_0225D02C: .word 0x0226D504 + thumb_func_end ov70_0225CF4C + + thumb_func_start ov70_0225D030 +ov70_0225D030: ; 0x0225D030 + ldr r3, _0225D038 ; =ov66_022347B0 + ldr r0, [r0, #4] + bx r3 + nop +_0225D038: .word ov66_022347B0 + thumb_func_end ov70_0225D030 + + thumb_func_start ov70_0225D03C +ov70_0225D03C: ; 0x0225D03C + ldr r3, _0225D044 ; =ov66_022347D4 + ldr r0, [r0, #4] + bx r3 + nop +_0225D044: .word ov66_022347D4 + thumb_func_end ov70_0225D03C + + thumb_func_start ov70_0225D048 +ov70_0225D048: ; 0x0225D048 + ldr r3, _0225D050 ; =ov66_022347F8 + ldr r0, [r0, #4] + bx r3 + nop +_0225D050: .word ov66_022347F8 + thumb_func_end ov70_0225D048 + + thumb_func_start ov70_0225D054 +ov70_0225D054: ; 0x0225D054 + ldr r3, _0225D05C ; =ov66_0223481C + ldr r0, [r0, #4] + bx r3 + nop +_0225D05C: .word ov66_0223481C + thumb_func_end ov70_0225D054 + + thumb_func_start ov70_0225D060 +ov70_0225D060: ; 0x0225D060 + ldr r3, _0225D068 ; =ov66_02234834 + ldr r0, [r0, #4] + bx r3 + nop +_0225D068: .word ov66_02234834 + thumb_func_end ov70_0225D060 + + thumb_func_start ov70_0225D06C +ov70_0225D06C: ; 0x0225D06C + push {r3, lr} + cmp r1, #0 + ldr r0, [r0, #4] + beq _0225D07C + mov r1, #1 + bl ov66_02234850 + pop {r3, pc} +_0225D07C: + bl ov66_0223487C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D06C + + thumb_func_start ov70_0225D084 +ov70_0225D084: ; 0x0225D084 + push {r3, lr} + cmp r1, #0 + ldr r0, [r0, #4] + beq _0225D094 + mov r1, #0 + bl ov66_02234850 + pop {r3, pc} +_0225D094: + bl ov66_0223487C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D084 + + thumb_func_start ov70_0225D09C +ov70_0225D09C: ; 0x0225D09C + push {r3, lr} + cmp r1, #0 + ldr r0, [r0, #4] + beq _0225D0AC + mov r1, #2 + bl ov66_02234850 + pop {r3, pc} +_0225D0AC: + bl ov66_0223487C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D09C + + thumb_func_start ov70_0225D0B4 +ov70_0225D0B4: ; 0x0225D0B4 + ldr r3, _0225D0BC ; =ov66_022347C4 + ldr r0, [r0, #4] + bx r3 + nop +_0225D0BC: .word ov66_022347C4 + thumb_func_end ov70_0225D0B4 + + thumb_func_start ov70_0225D0C0 +ov70_0225D0C0: ; 0x0225D0C0 + ldr r3, _0225D0C8 ; =ov66_0223488C + ldr r0, [r0, #4] + bx r3 + nop +_0225D0C8: .word ov66_0223488C + thumb_func_end ov70_0225D0C0 + + thumb_func_start ov70_0225D0CC +ov70_0225D0CC: ; 0x0225D0CC + ldr r3, _0225D0D4 ; =ov66_022348A8 + ldr r0, [r0, #4] + bx r3 + nop +_0225D0D4: .word ov66_022348A8 + thumb_func_end ov70_0225D0CC + + thumb_func_start ov70_0225D0D8 +ov70_0225D0D8: ; 0x0225D0D8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0 + ldr r4, _0225D178 ; =0x0226D508 + str r0, [sp, #8] +_0225D0E4: + mov r0, #0 + str r0, [sp, #4] + str r0, [sp] + ldrb r1, [r4] + add r2, sp, #0xc + ldr r0, [r5, #0x14] + add r2, #2 + add r3, sp, #0xc + bl ov70_0225C8D8 + cmp r0, #1 + bne _0225D166 + add r7, sp, #0xc +_0225D0FE: + add r0, r5, #0 + bl ov70_0225D2C0 + add r6, r0, #0 + ldrh r0, [r7, #2] + add r1, sp, #0x10 + lsl r0, r0, #4 + strh r0, [r7, #4] + ldrh r0, [r7] + lsl r0, r0, #4 + strh r0, [r7, #6] + ldrb r0, [r4, #3] + strh r0, [r7, #8] + mov r0, #0 + strh r0, [r7, #0xa] + ldrb r0, [r4, #1] + strh r0, [r7, #0xc] + ldrb r0, [r4, #2] + strh r0, [r7, #0xe] + ldr r0, [r5, #0] + bl ov63_0222BEC0 + add r1, r0, #0 + str r1, [r6, #0] + ldr r0, [r5, #4] + bl ov66_0223461C + str r0, [r6, #4] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov70_0225CDEC + ldrb r0, [r4] + cmp r0, #0x61 + bne _0225D148 + str r6, [r5, #0x24] +_0225D148: + ldr r0, [sp, #4] + add r2, sp, #0xc + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + str r0, [sp] + ldrb r1, [r4] + ldr r0, [r5, #0x14] + add r2, #2 + add r3, sp, #0xc + bl ov70_0225C8D8 + cmp r0, #1 + beq _0225D0FE +_0225D166: + ldr r0, [sp, #8] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #4 + blo _0225D0E4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0225D178: .word 0x0226D508 + thumb_func_end ov70_0225D0D8 + + thumb_func_start ov70_0225D17C +ov70_0225D17C: ; 0x0225D17C + push {r3, r4, lr} + sub sp, #4 + add r4, sp, #0 + strh r1, [r4] + strb r2, [r4, #2] + add r1, sp, #0 + strb r3, [r4, #3] + bl ov70_0225CB1C + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D17C + + thumb_func_start ov70_0225D194 +ov70_0225D194: ; 0x0225D194 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + bl sub_0201D35C + add r1, r4, #0 + bl sub_020E2178 + ldrb r0, [r5, r1] + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225D194 + + thumb_func_start ov70_0225D1A8 +ov70_0225D1A8: ; 0x0225D1A8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r1, #0] + add r6, r2, #0 + add r4, r3, #0 + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + mov r2, sp + sub r2, r2, #4 + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldrh r0, [r1, #0xc] + strh r0, [r2] + ldrh r0, [r1, #0xe] + add r1, r6, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C078 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #8 + strh r0, [r2, #8] + ldrh r0, [r2, #2] + strh r0, [r2, #0xa] + ldrsh r3, [r2, r1] + ldr r0, [r5, #0x14] + asr r1, r3, #3 + lsr r1, r1, #0x1c + add r1, r3, r1 + mov r3, #0xa + ldrsh r3, [r2, r3] + lsl r1, r1, #0xc + lsr r1, r1, #0x10 + asr r2, r3, #3 + lsr r2, r2, #0x1c + add r2, r3, r2 + lsl r2, r2, #0xc + lsr r2, r2, #0x10 + bl ov70_0225C8B8 + cmp r0, r4 + bne _0225D218 + add sp, #0x10 + mov r0, #1 + pop {r4, r5, r6, pc} +_0225D218: + mov r0, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D1A8 + + thumb_func_start ov70_0225D220 +ov70_0225D220: ; 0x0225D220 + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0xc] + bx lr + thumb_func_end ov70_0225D220 + + thumb_func_start ov70_0225D22C +ov70_0225D22C: ; 0x0225D22C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r6, [r5, #8] + beq _0225D248 + lsl r0, r4, #0xc + bl sub_020E17FC + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0225D256 +_0225D248: + lsl r0, r4, #0xc + bl sub_020E17FC + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0225D256: + bl sub_020E1740 + add r2, r0, #0 + asr r1, r6, #0x1f + add r0, r6, #0 + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r6, r2, #0xc + orr r6, r0 + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _0225D28E + lsl r0, r0, #0xc + bl sub_020E17FC + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0225D29C +_0225D28E: + lsl r0, r0, #0xc + bl sub_020E17FC + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0225D29C: + bl sub_020E1740 + add r1, r0, #0 + add r0, r6, #0 + bl sub_020BCFD0 + ldr r1, [r5, #4] + add r0, r0, r1 + str r0, [r5, #0] + ldr r0, [r5, #0xc] + cmp r4, r0 + blo _0225D2B8 + mov r0, #1 + pop {r4, r5, r6, pc} +_0225D2B8: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225D22C + + thumb_func_start ov70_0225D2BC +ov70_0225D2BC: ; 0x0225D2BC + ldr r0, [r0, #0] + bx lr + thumb_func_end ov70_0225D2BC + + thumb_func_start ov70_0225D2C0 +ov70_0225D2C0: ; 0x0225D2C0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldrh r0, [r5, #0xc] + mov r6, #0 + cmp r0, #0 + ble _0225D2EE + add r4, r6, #0 +_0225D2CE: + ldr r0, [r5, #8] + add r0, r0, r4 + bl ov70_0225D2FC + cmp r0, #0 + beq _0225D2E4 + mov r0, #0x28 + ldr r1, [r5, #8] + mul r0, r6 + add r0, r1, r0 + pop {r4, r5, r6, pc} +_0225D2E4: + ldrh r0, [r5, #0xc] + add r6, r6, #1 + add r4, #0x28 + cmp r6, r0 + blt _0225D2CE +_0225D2EE: + bl sub_02022974 + mov r0, #0x28 + ldr r1, [r5, #8] + mul r0, r6 + add r0, r1, r0 + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225D2C0 + + thumb_func_start ov70_0225D2FC +ov70_0225D2FC: ; 0x0225D2FC + ldr r0, [r0, #0] + cmp r0, #0 + bne _0225D306 + mov r0, #1 + bx lr +_0225D306: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225D2FC + + thumb_func_start ov70_0225D30C +ov70_0225D30C: ; 0x0225D30C + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225D30C + + thumb_func_start ov70_0225D310 +ov70_0225D310: ; 0x0225D310 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0] + add r5, r1, #0 + mov r1, #6 + bl ov63_0222BF90 + add r4, r0, #0 + ldr r0, [r7, #0] + mov r1, #4 + bl ov63_0222BF90 + add r6, r0, #0 + ldr r0, [r7, #0] + mov r1, #5 + bl ov63_0222BF90 + cmp r0, #0 + bne _0225D3D2 + ldr r0, _0225D3D4 ; =0x021BF67C + mov r1, #2 + ldr r0, [r0, #0x44] + add r2, r0, #0 + tst r2, r1 + beq _0225D344 + mov r1, #3 +_0225D344: + mov r2, #0x40 + tst r2, r0 + beq _0225D368 + cmp r4, #0 + bne _0225D35A + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D35A: + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D368: + mov r2, #0x80 + tst r2, r0 + beq _0225D38C + cmp r4, #1 + bne _0225D37E + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D37E: + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D38C: + mov r2, #0x20 + tst r2, r0 + beq _0225D3B0 + cmp r4, #2 + bne _0225D3A2 + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D3A2: + add r0, r5, #0 + mov r1, #1 + mov r2, #2 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D3B0: + mov r2, #0x10 + tst r0, r2 + beq _0225D3D2 + cmp r4, #3 + bne _0225D3C6 + add r0, r5, #0 + add r2, r4, #0 + add r3, r6, #0 + bl ov70_0225D17C + pop {r3, r4, r5, r6, r7, pc} +_0225D3C6: + add r0, r5, #0 + mov r1, #1 + mov r2, #3 + add r3, r6, #0 + bl ov70_0225D17C +_0225D3D2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225D3D4: .word 0x021BF67C + thumb_func_end ov70_0225D310 + + thumb_func_start ov70_0225D3D8 +ov70_0225D3D8: ; 0x0225D3D8 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldrh r0, [r4, #8] + add r5, r1, #0 + cmp r0, #4 + bhi _0225D4C0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D3F0: ; jump table + .short _0225D3FA - _0225D3F0 - 2 ; case 0 + .short _0225D40C - _0225D3F0 - 2 ; case 1 + .short _0225D422 - _0225D3F0 - 2 ; case 2 + .short _0225D48E - _0225D3F0 - 2 ; case 3 + .short _0225D4B0 - _0225D3F0 - 2 ; case 4 +_0225D3FA: + ldr r0, _0225D4C4 ; =0x0226D500 + mov r1, #4 + bl ov70_0225D194 + strh r0, [r4, #0xc] + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225D40C: + mov r0, #0xc + ldrsh r1, [r4, r0] + sub r1, r1, #1 + strh r1, [r4, #0xc] + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _0225D4C0 + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225D422: + ldr r0, [r4, #0] + mov r1, #4 + bl ov63_0222BF90 + add r6, r0, #0 + ldr r0, [r4, #0] + mov r1, #6 + bl ov63_0222BF90 + add r7, r0, #0 + ldr r0, _0225D4C8 ; =0x0226D4FC + mov r1, #4 + bl ov70_0225D194 + strh r0, [r4, #0xe] + mov r2, #0xe + ldrsh r2, [r4, r2] + add r0, r5, #0 + add r1, r4, #0 + add r3, r6, #4 + bl ov70_0225D1A8 + cmp r0, #1 + bne _0225D47A + mov r0, #0xe + ldrsh r3, [r4, r0] + cmp r7, r3 + bne _0225D46A + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov70_0225CD7C + mov r0, #4 + strh r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225D46A: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov70_0225CD7C + mov r0, #3 + strh r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225D47A: + mov r3, #0xe + ldrsh r3, [r4, r3] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov70_0225CD7C + mov r0, #4 + strh r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225D48E: + ldr r0, [r4, #0] + mov r1, #5 + bl ov63_0222BF90 + cmp r0, #0 + bne _0225D4C0 + mov r3, #0xe + ldrsh r3, [r4, r3] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov70_0225CD7C + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + pop {r3, r4, r5, r6, r7, pc} +_0225D4B0: + ldr r0, [r4, #0] + mov r1, #5 + bl ov63_0222BF90 + cmp r0, #0 + bne _0225D4C0 + mov r0, #0 + strh r0, [r4, #8] +_0225D4C0: + pop {r3, r4, r5, r6, r7, pc} + nop +_0225D4C4: .word 0x0226D500 +_0225D4C8: .word 0x0226D4FC + thumb_func_end ov70_0225D3D8 + + thumb_func_start ov70_0225D4CC +ov70_0225D4CC: ; 0x0225D4CC + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldrh r0, [r4, #8] + cmp r0, #3 + bhi _0225D572 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D4E4: ; jump table + .short _0225D4EC - _0225D4E4 - 2 ; case 0 + .short _0225D516 - _0225D4E4 - 2 ; case 1 + .short _0225D532 - _0225D4E4 - 2 ; case 2 + .short _0225D572 - _0225D4E4 - 2 ; case 3 +_0225D4EC: + ldr r0, [r4, #4] + mov r1, #0 + bl ov66_022347B0 + ldr r0, [r4, #4] + mov r1, #0 + bl ov66_02234850 + add r0, r4, #0 + mov r2, #0x7d + add r0, #0xc + mov r1, #0 + lsl r2, r2, #0xe + mov r3, #0x18 + bl ov70_0225D220 + mov r0, #0x20 + str r0, [r4, #0x1c] + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] +_0225D516: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bne _0225D572 + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0x1c] + ldr r0, _0225D578 ; =0x0000064F + bl sub_02005748 + add sp, #0xc + pop {r4, r5, pc} +_0225D532: + add r0, r4, #0 + ldr r1, [r4, #0x1c] + add r0, #0xc + bl ov70_0225D22C + add r5, r0, #0 + ldr r0, [r4, #0x1c] + add r1, sp, #0 + add r0, r0, #1 + str r0, [r4, #0x1c] + ldr r0, [r4, #4] + bl ov66_0223481C + add r0, r4, #0 + add r0, #0xc + bl ov70_0225D2BC + str r0, [sp, #4] + ldr r0, [r4, #4] + add r1, sp, #0 + bl ov66_022347F8 + cmp r5, #1 + bne _0225D572 + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldr r0, [r4, #4] + bl ov66_0223487C + mov r0, #1 + strb r0, [r4, #0xa] +_0225D572: + add sp, #0xc + pop {r4, r5, pc} + nop +_0225D578: .word 0x0000064F + thumb_func_end ov70_0225D4CC + + thumb_func_start ov70_0225D57C +ov70_0225D57C: ; 0x0225D57C + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldrh r0, [r4, #8] + cmp r0, #3 + bhi _0225D62A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D594: ; jump table + .short _0225D59C - _0225D594 - 2 ; case 0 + .short _0225D5CC - _0225D594 - 2 ; case 1 + .short _0225D60A - _0225D594 - 2 ; case 2 + .short _0225D62A - _0225D594 - 2 ; case 3 +_0225D59C: + ldr r0, [r4, #4] + mov r1, #0 + bl ov66_022347B0 + ldr r0, [r4, #4] + mov r1, #0 + bl ov66_02234850 + add r0, r4, #0 + mov r1, #0x7d + add r0, #0xc + lsl r1, r1, #0xe + mov r2, #0 + mov r3, #0x18 + bl ov70_0225D220 + mov r0, #0 + str r0, [r4, #0x1c] + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldr r0, _0225D630 ; =0x0000064F + bl sub_02005748 +_0225D5CC: + add r0, r4, #0 + ldr r1, [r4, #0x1c] + add r0, #0xc + bl ov70_0225D22C + add r5, r0, #0 + ldr r0, [r4, #0x1c] + add r1, sp, #0 + add r0, r0, #1 + str r0, [r4, #0x1c] + ldr r0, [r4, #4] + bl ov66_0223481C + add r0, r4, #0 + add r0, #0xc + bl ov70_0225D2BC + str r0, [sp, #4] + ldr r0, [r4, #4] + add r1, sp, #0 + bl ov66_022347F8 + cmp r5, #1 + bne _0225D62A + mov r0, #0x20 + str r0, [r4, #0x1c] + ldrh r0, [r4, #8] + add sp, #0xc + add r0, r0, #1 + strh r0, [r4, #8] + pop {r4, r5, pc} +_0225D60A: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bne _0225D62A + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldr r0, [r4, #4] + bl ov66_0223487C + ldr r0, [r4, #4] + mov r1, #1 + bl ov66_022347B0 + mov r0, #1 + strb r0, [r4, #0xa] +_0225D62A: + add sp, #0xc + pop {r4, r5, pc} + nop +_0225D630: .word 0x0000064F + thumb_func_end ov70_0225D57C + + thumb_func_start ov70_0225D634 +ov70_0225D634: ; 0x0225D634 + ldr r3, _0225D63C ; =ov70_0225D664 + mov r2, #2 + bx r3 + nop +_0225D63C: .word ov70_0225D664 + thumb_func_end ov70_0225D634 + + thumb_func_start ov70_0225D640 +ov70_0225D640: ; 0x0225D640 + ldr r3, _0225D648 ; =ov70_0225D664 + mov r2, #3 + bx r3 + nop +_0225D648: .word ov70_0225D664 + thumb_func_end ov70_0225D640 + + thumb_func_start ov70_0225D64C +ov70_0225D64C: ; 0x0225D64C + ldr r3, _0225D654 ; =ov70_0225D664 + mov r2, #0 + bx r3 + nop +_0225D654: .word ov70_0225D664 + thumb_func_end ov70_0225D64C + + thumb_func_start ov70_0225D658 +ov70_0225D658: ; 0x0225D658 + ldr r3, _0225D660 ; =ov70_0225D664 + mov r2, #1 + bx r3 + nop +_0225D660: .word ov70_0225D664 + thumb_func_end ov70_0225D658 + + thumb_func_start ov70_0225D664 +ov70_0225D664: ; 0x0225D664 + push {r4, r5, r6, lr} + sub sp, #0x28 + add r4, r0, #0 + ldrh r0, [r4, #8] + add r5, r2, #0 + cmp r0, #3 + bls _0225D674 + b _0225D816 +_0225D674: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D680: ; jump table + .short _0225D688 - _0225D680 - 2 ; case 0 + .short _0225D6E4 - _0225D680 - 2 ; case 1 + .short _0225D79E - _0225D680 - 2 ; case 2 + .short _0225D816 - _0225D680 - 2 ; case 3 +_0225D688: + ldr r0, [r4, #4] + mov r1, #0 + bl ov66_022347B0 + ldr r0, [r4, #4] + mov r1, #0 + bl ov66_02234850 + ldr r0, [r4, #4] + mov r1, #2 + bl ov66_02234888 + add r0, r4, #0 + mov r2, #1 + add r0, #0xc + mov r1, #0 + lsl r2, r2, #0x10 + mov r3, #4 + bl ov70_0225D220 + ldr r0, [r4, #4] + add r1, sp, #0x1c + bl ov66_0223481C + cmp r5, #3 + bhi _0225D6DA + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D6C8: ; jump table + .short _0225D6D0 - _0225D6C8 - 2 ; case 0 + .short _0225D6D0 - _0225D6C8 - 2 ; case 1 + .short _0225D6D6 - _0225D6C8 - 2 ; case 2 + .short _0225D6D6 - _0225D6C8 - 2 ; case 3 +_0225D6D0: + ldr r0, [sp, #0x24] + str r0, [r4, #0x20] + b _0225D6DA +_0225D6D6: + ldr r0, [sp, #0x1c] + str r0, [r4, #0x20] +_0225D6DA: + mov r0, #0 + str r0, [r4, #0x1c] + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] +_0225D6E4: + add r0, r4, #0 + ldr r1, [r4, #0x1c] + add r0, #0xc + bl ov70_0225D22C + add r6, r0, #0 + ldr r0, [r4, #0x1c] + add r1, sp, #0x10 + add r0, r0, #1 + str r0, [r4, #0x1c] + ldr r0, [r4, #4] + bl ov66_0223481C + cmp r5, #3 + bhi _0225D754 + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D70E: ; jump table + .short _0225D716 - _0225D70E - 2 ; case 0 + .short _0225D726 - _0225D70E - 2 ; case 1 + .short _0225D736 - _0225D70E - 2 ; case 2 + .short _0225D746 - _0225D70E - 2 ; case 3 +_0225D716: + add r0, r4, #0 + add r0, #0xc + bl ov70_0225D2BC + ldr r1, [r4, #0x20] + sub r0, r1, r0 + str r0, [sp, #0x18] + b _0225D754 +_0225D726: + add r0, r4, #0 + add r0, #0xc + bl ov70_0225D2BC + ldr r1, [r4, #0x20] + add r0, r1, r0 + str r0, [sp, #0x18] + b _0225D754 +_0225D736: + add r0, r4, #0 + add r0, #0xc + bl ov70_0225D2BC + ldr r1, [r4, #0x20] + sub r0, r1, r0 + str r0, [sp, #0x10] + b _0225D754 +_0225D746: + add r0, r4, #0 + add r0, #0xc + bl ov70_0225D2BC + ldr r1, [r4, #0x20] + add r0, r1, r0 + str r0, [sp, #0x10] +_0225D754: + ldr r0, [r4, #4] + add r1, sp, #0x10 + bl ov66_022347F8 + cmp r6, #1 + bne _0225D816 + add r0, r5, #0 + bl ov63_0222C0AC + mov r1, #4 + str r1, [r4, #0x1c] + cmp r0, #3 + bhi _0225D794 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225D77A: ; jump table + .short _0225D788 - _0225D77A - 2 ; case 0 + .short _0225D794 - _0225D77A - 2 ; case 1 + .short _0225D78E - _0225D77A - 2 ; case 2 + .short _0225D782 - _0225D77A - 2 ; case 3 +_0225D782: + ldr r0, [r4, #0x1c] + add r0, r0, #2 + str r0, [r4, #0x1c] +_0225D788: + ldr r0, [r4, #0x1c] + add r0, r0, #2 + str r0, [r4, #0x1c] +_0225D78E: + ldr r0, [r4, #0x1c] + add r0, r0, #2 + str r0, [r4, #0x1c] +_0225D794: + ldrh r0, [r4, #8] + add sp, #0x28 + add r0, r0, #1 + strh r0, [r4, #8] + pop {r4, r5, r6, pc} +_0225D79E: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bne _0225D816 + ldrh r0, [r4, #8] + add r0, r0, #1 + strh r0, [r4, #8] + ldr r0, [r4, #0] + bl ov63_0222C0E4 + add r1, sp, #0 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + mov r2, sp + sub r2, r2, #4 + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldrh r0, [r1, #0xc] + strh r0, [r2] + ldrh r0, [r1, #0xe] + add r1, r5, #0 + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C078 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #8] + ldrh r0, [r1, #2] + strh r0, [r1, #0xa] + add r0, r5, #0 + bl ov63_0222C0AC + add r1, sp, #0 + mov r5, sp + add r2, r0, #0 + ldrh r3, [r1, #8] + sub r5, r5, #4 + add r0, r4, #0 + strh r3, [r5] + ldrh r1, [r1, #0xa] + strh r1, [r5, #2] + ldr r1, [r5, #0] + bl ov70_0225CD04 + ldr r0, [r4, #4] + bl ov66_0223487C + ldr r0, [r4, #4] + mov r1, #1 + bl ov66_022347B0 + mov r0, #1 + strb r0, [r4, #0xa] +_0225D816: + add sp, #0x28 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D664 + + thumb_func_start ov70_0225D81C +ov70_0225D81C: ; 0x0225D81C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldrh r0, [r5, #8] + cmp r0, #0 + beq _0225D830 + cmp r0, #1 + beq _0225D850 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0225D830: + ldr r0, [r5, #4] + mov r1, #0 + bl ov66_022347B0 + add r1, r5, #0 + ldr r0, [r5, #4] + add r1, #0x10 + bl ov66_0223481C + mov r0, #0x1c + str r0, [r5, #0xc] + ldrh r0, [r5, #8] + add sp, #0xc + add r0, r0, #1 + strh r0, [r5, #8] + pop {r3, r4, r5, r6, pc} +_0225D850: + ldr r0, [r5, #0xc] + sub r0, r0, #1 + str r0, [r5, #0xc] + bpl _0225D85C + mov r0, #0x1c + str r0, [r5, #0xc] +_0225D85C: + add r3, r5, #0 + add r3, #0x10 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [r5, #0xc] + sub r0, #0x10 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + cmp r0, #0 + ble _0225D8DE + mov r1, #6 + bl sub_020E1F6C + lsl r0, r1, #0x10 + asr r1, r0, #0x10 + mov r0, #0xb4 + mul r0, r1 + mov r1, #6 + bl sub_020E1F6C + add r4, r0, #0 + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + ldr r2, _0225D8F4 ; =0xFFFFE000 + asr r1, r0, #0x1f + asr r3, r2, #0xd + bl sub_020E1F1C + mov r3, #2 + mov r6, #0 + lsl r3, r3, #0xa + add r3, r0, r3 + adc r1, r6 + lsl r0, r1, #0x14 + lsr r1, r3, #0xc + ldr r2, [sp, #8] + orr r1, r0 + add r0, r2, r1 + str r0, [sp, #8] + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D15C + mov r2, #0xa + asr r1, r0, #0x1f + lsl r2, r2, #0xc + add r3, r6, #0 + bl sub_020E1F1C + mov r3, #2 + add r4, r6, #0 + lsl r3, r3, #0xa + add r3, r0, r3 + adc r1, r4 + lsl r0, r1, #0x14 + lsr r1, r3, #0xc + ldr r2, [sp, #4] + orr r1, r0 + add r0, r2, r1 + str r0, [sp, #4] +_0225D8DE: + ldr r0, [r5, #4] + add r1, sp, #0 + bl ov66_022347F8 + ldr r0, [r5, #4] + mov r1, #1 + bl ov66_02234834 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0225D8F4: .word 0xFFFFE000 + thumb_func_end ov70_0225D81C + + thumb_func_start ov70_0225D8F8 +ov70_0225D8F8: ; 0x0225D8F8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #1 + bl ov66_022347B0 + ldr r0, [r4, #4] + add r1, sp, #0 + bl ov66_0223481C + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r4, #4] + add r1, sp, #0 + bl ov66_022347F8 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225D8F8 + + thumb_func_start ov70_0225D920 +ov70_0225D920: ; 0x0225D920 + strb r2, [r0, #1] + strb r2, [r0, #2] + mov r3, #0 + strb r3, [r0, #3] + strh r3, [r0, #4] + strh r3, [r0, #6] + strb r3, [r0] + add r0, r1, #0 + ldr r3, _0225D938 ; =ov66_02234610 + add r1, r2, #0 + bx r3 + nop +_0225D938: .word ov66_02234610 + thumb_func_end ov70_0225D920 + + thumb_func_start ov70_0225D93C +ov70_0225D93C: ; 0x0225D93C + mov r2, #1 + strb r2, [r0] + ldrb r2, [r0, #1] + strb r2, [r0, #2] + ldrb r2, [r0, #1] + sub r1, r1, r2 + strb r1, [r0, #3] + mov r1, #0 + strh r1, [r0, #4] + mov r1, #0x3c + strh r1, [r0, #6] + bx lr + thumb_func_end ov70_0225D93C + + thumb_func_start ov70_0225D954 +ov70_0225D954: ; 0x0225D954 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r0, [r5] + add r4, r1, #0 + cmp r0, #0 + bne _0225D964 + mov r0, #1 + pop {r3, r4, r5, pc} +_0225D964: + mov r0, #4 + ldrsh r1, [r5, r0] + add r1, r1, #1 + strh r1, [r5, #4] + ldrsh r1, [r5, r0] + mov r0, #6 + ldrsh r0, [r5, r0] + cmp r1, r0 + blt _0225D97A + mov r0, #0 + strb r0, [r5] +_0225D97A: + mov r0, #4 + ldrsh r1, [r5, r0] + mov r0, #3 + ldrsb r0, [r5, r0] + mul r0, r1 + mov r1, #6 + ldrsh r1, [r5, r1] + bl sub_020E1F6C + strb r0, [r5, #1] + mov r0, #2 + ldrb r1, [r5, #1] + ldrsb r0, [r5, r0] + add r0, r1, r0 + strb r0, [r5, #1] + ldrb r1, [r5, #1] + add r0, r4, #0 + bl ov66_02234610 + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225D954 + + .rodata + + + .global Unk_ov70_0226D4FC +Unk_ov70_0226D4FC: ; 0x0226D4FC + .incbin "incbin/overlay70_rodata.bin", 0x30, 0x34 - 0x30 + + .global Unk_ov70_0226D500 +Unk_ov70_0226D500: ; 0x0226D500 + .incbin "incbin/overlay70_rodata.bin", 0x34, 0x38 - 0x34 + + .global Unk_ov70_0226D504 +Unk_ov70_0226D504: ; 0x0226D504 + .incbin "incbin/overlay70_rodata.bin", 0x38, 0x3C - 0x38 + + .global Unk_ov70_0226D508 +Unk_ov70_0226D508: ; 0x0226D508 + .incbin "incbin/overlay70_rodata.bin", 0x3C, 0x4C - 0x3C + + .global Unk_ov70_0226D518 +Unk_ov70_0226D518: ; 0x0226D518 + .incbin "incbin/overlay70_rodata.bin", 0x4C, 0x64 - 0x4C + + .global Unk_ov70_0226D530 +Unk_ov70_0226D530: ; 0x0226D530 + .incbin "incbin/overlay70_rodata.bin", 0x64, 0x8C - 0x64 + + .global Unk_ov70_0226D558 +Unk_ov70_0226D558: ; 0x0226D558 + .incbin "incbin/overlay70_rodata.bin", 0x8C, 0x28 + diff --git a/asm/ov70_0225D9A4.s b/asm/ov70_0225D9A4.s new file mode 100644 index 000000000..2814d0b5d --- /dev/null +++ b/asm/ov70_0225D9A4.s @@ -0,0 +1,6629 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0225D9A4 +ov70_0225D9A4: ; 0x0225D9A4 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + bl sub_02006840 + mov r2, #0x3a + add r5, r0, #0 + mov r0, #3 + mov r1, #0x70 + lsl r2, r2, #0xc + bl sub_02017FC8 + mov r2, #0x3d + mov r0, #3 + mov r1, #0x71 + lsl r2, r2, #0xc + bl sub_02017FC8 + mov r1, #0xfe + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #0x70 + bl sub_0200681C + mov r2, #0xfe + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + add r0, r5, #0 + add r0, #0xc + str r0, [r4, #0x38] + ldr r0, [r5, #0x1c] + str r0, [r4, #0x34] + bl ov66_0222E338 + strb r0, [r4, #2] + ldr r0, [r4, #0x34] + bl ov66_0222E338 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0225DA02 + bl sub_02022974 +_0225DA02: + mov r0, #1 + bl sub_02002AC8 + mov r0, #0 + bl sub_02002AE4 + mov r0, #0 + bl sub_02002B20 + ldr r0, [r5, #0] + bl sub_02025E38 + mov r1, #0xfd + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r5, #0] + add r0, #0x3c + mov r2, #0x70 + bl ov70_0225E4EC + mov r0, #0x70 + bl ov70_0225C858 + mov r1, #0xfa + lsl r1, r1, #2 + str r0, [r4, r1] + add r1, #0xc + ldr r0, [r4, r1] + bl sub_02025F30 + add r1, r0, #0 + mov r0, #0x71 + mov r2, #0xfa + str r0, [sp] + lsl r2, r2, #2 + ldr r2, [r4, r2] + mov r0, #0x18 + mov r3, #0x70 + bl ov70_0225C9B4 + mov r2, #0x3e + lsl r2, r2, #4 + str r0, [r4, r2] + mov r0, #0x71 + str r0, [sp] + add r2, #8 + ldr r0, [r5, #4] + ldr r1, [r5, #8] + ldr r2, [r4, r2] + mov r3, #0x70 + bl ov70_02261E10 + mov r1, #0xf9 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x70 + bl ov70_02260A70 + mov r1, #0xfb + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0xf4 + add r0, r4, r1 + add r1, r4, #0 + ldr r2, [r5, #0] + add r1, #0x3c + mov r3, #0x70 + bl ov70_0225E9C8 + mov r0, #0xc6 + lsl r0, r0, #2 + add r1, r4, #0 + ldr r2, [r5, #0] + add r0, r4, r0 + add r1, #0x3c + mov r3, #0x70 + bl ov70_0225EBA8 + mov r0, #0xce + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x3c + mov r2, #0x70 + bl ov70_0225EC20 + mov r0, #0x39 + lsl r0, r0, #4 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x3c + mov r2, #0x70 + bl ov70_0225F114 + mov r0, #0xf1 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x3c + mov r2, #0x70 + bl ov70_0225EFD4 + mov r0, #0xb7 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0x70 + bl ov70_0225F208 + mov r1, #0x3a + lsl r1, r1, #4 + add r0, r4, r1 + sub r1, #0xc4 + add r1, r4, r1 + mov r2, #0x70 + bl ov70_0225F098 + mov r0, #0x70 + str r0, [sp] + mov r3, #0xfd + mov r0, #0x61 + lsl r3, r3, #2 + lsl r0, r0, #2 + add r2, r4, #0 + ldr r1, [r4, #0x38] + ldr r3, [r4, r3] + add r0, r4, r0 + add r2, #0x3c + bl ov70_0225F350 + ldr r0, [r4, #0x34] + bl ov66_0222E3BC + add r5, r0, #0 + bl ov66_0222E8D8 + cmp r0, #1 + bne _0225DB2E + mov r0, #0x61 + mov r2, #0xb7 + lsl r0, r0, #2 + add r1, r4, #0 + lsl r2, r2, #2 + add r0, r4, r0 + add r1, #0x3c + add r2, r4, r2 + mov r3, #0x70 + str r5, [sp] + bl ov70_0225F8AC +_0225DB2E: + add r0, r4, #0 + mov r1, #0x70 + bl ov70_02262DA8 + mov r1, #0x3f + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + bl ov70_022630A4 + add r0, r4, #0 + bl ov70_022630EC + mov r0, #0x70 + str r0, [sp] + mov r0, #0x71 + mov r3, #0xfa + str r0, [sp, #4] + lsl r3, r3, #2 + add r2, r3, #4 + ldr r1, [r4, r3] + sub r3, #8 + ldr r0, [r4, #0x34] + ldr r2, [r4, r2] + ldr r3, [r4, r3] + bl ov70_02269190 + mov r1, #0xf5 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x70 + add r1, r4, #0 + bl ov70_0226C60C + mov r1, #0xf7 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, _0225DB8C ; =ov70_0225E4C8 + add r1, r4, #0 + bl sub_02017798 + bl sub_020177A4 + mov r0, #1 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0225DB8C: .word ov70_0225E4C8 + thumb_func_end ov70_0225D9A4 + + thumb_func_start ov70_0225DB90 +ov70_0225DB90: ; 0x0225DB90 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r0, #0 + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r6, #0 + bl sub_02006840 + ldr r0, [r5, #0] + cmp r0, #8 + bhi _0225DC58 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225DBB6: ; jump table + .short _0225DBC8 - _0225DBB6 - 2 ; case 0 + .short _0225DBEA - _0225DBB6 - 2 ; case 1 + .short _0225DBFE - _0225DBB6 - 2 ; case 2 + .short _0225DC7A - _0225DBB6 - 2 ; case 3 + .short _0225DCF8 - _0225DBB6 - 2 ; case 4 + .short _0225DD08 - _0225DBB6 - 2 ; case 5 + .short _0225DD58 - _0225DBB6 - 2 ; case 6 + .short _0225DD76 - _0225DBB6 - 2 ; case 7 + .short _0225DDD0 - _0225DBB6 - 2 ; case 8 +_0225DBC8: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x70 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #1 + strb r0, [r4, #3] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225DDE2 +_0225DBEA: + bl sub_0200F2AC + cmp r0, #1 + bne _0225DC58 + mov r0, #0 + strb r0, [r4, #3] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225DDE2 +_0225DBFE: + ldrb r0, [r4, #4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1c + cmp r0, #1 + bne _0225DC26 + bl ov66_02231760 + cmp r0, #1 + beq _0225DC1A + ldr r0, [r4, #0x34] + bl ov66_0222DFF8 + cmp r0, #0 + beq _0225DC26 +_0225DC1A: + ldrb r1, [r4, #4] + mov r0, #0xf0 + bic r1, r0 + mov r0, #0x10 + orr r0, r1 + strb r0, [r4, #4] +_0225DC26: + ldrb r0, [r4, #7] + cmp r0, #0 + bne _0225DC42 + ldr r0, [r4, #0x34] + bl ov66_0222E138 + cmp r0, #1 + bne _0225DC42 + mov r0, #1 + strb r0, [r4, #6] + add r0, r4, #0 + mov r1, #8 + bl ov70_0225DF38 +_0225DC42: + ldrb r0, [r4] + cmp r0, #1 + beq _0225DC5A + ldrb r0, [r4, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + cmp r0, #1 + beq _0225DC5A + ldrb r0, [r4, #6] + cmp r0, #1 + beq _0225DC5A +_0225DC58: + b _0225DDE2 +_0225DC5A: + ldrb r0, [r4, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + beq _0225DC68 + mov r0, #3 + str r0, [r5, #0] + b _0225DDE2 +_0225DC68: + ldrb r0, [r4, #6] + cmp r0, #1 + bne _0225DC74 + mov r0, #5 + str r0, [r5, #0] + b _0225DDE2 +_0225DC74: + mov r0, #7 + str r0, [r5, #0] + b _0225DDE2 +_0225DC7A: + mov r0, #0xbe + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EB74 + mov r0, #0xce + lsl r0, r0, #2 + mov r1, #0 + add r0, r4, r0 + add r2, r1, #0 + bl ov70_0225EF14 + mov r0, #0xf1 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225F024 + mov r0, #0x3a + lsl r0, r0, #4 + add r0, r4, r0 + bl ov70_0225F100 + bl sub_020383E8 + cmp r0, #0 + beq _0225DCBE + mov r1, #0x39 + lsl r1, r1, #4 + add r0, r4, r1 + sub r1, #0xb4 + add r1, r4, r1 + bl ov70_0225F184 + b _0225DCF2 +_0225DCBE: + bl sub_0203881C + cmp r0, #0 + beq _0225DCDC + bl ov66_022326DC + mov r1, #0x39 + lsl r1, r1, #4 + add r2, r0, #0 + add r0, r4, r1 + sub r1, #0xb4 + add r1, r4, r1 + bl ov70_0225F1C0 + b _0225DCF2 +_0225DCDC: + ldr r0, [r4, #0x34] + bl ov66_0222DFF8 + mov r1, #0x39 + lsl r1, r1, #4 + add r2, r0, #0 + add r0, r4, r1 + sub r1, #0xb4 + add r1, r4, r1 + bl ov70_0225F1F0 +_0225DCF2: + mov r0, #4 + str r0, [r5, #0] + b _0225DDE2 +_0225DCF8: + ldr r0, _0225DDF4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0225DDE2 + mov r0, #7 + str r0, [r5, #0] + b _0225DDE2 +_0225DD08: + mov r0, #0xbe + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EB74 + mov r0, #0xce + lsl r0, r0, #2 + mov r1, #0 + add r0, r4, r0 + add r2, r1, #0 + bl ov70_0225EF14 + mov r0, #0xf1 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225F024 + mov r0, #0x3a + lsl r0, r0, #4 + add r0, r4, r0 + bl ov70_0225F100 + mov r0, #0xb7 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + mov r2, #0x46 + bl ov70_0225F288 + add r1, r0, #0 + mov r0, #0xbe + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EA44 + mov r0, #6 + str r0, [r5, #0] + mov r0, #0x3c + str r0, [r4, #8] + b _0225DDE2 +_0225DD58: + mov r0, #0xbe + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EB5C + cmp r0, #0 + beq _0225DDE2 + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0 + bgt _0225DDE2 + mov r0, #7 + str r0, [r5, #0] + b _0225DDE2 +_0225DD76: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225F798 + cmp r0, #5 + bne _0225DDA8 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x70 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #1 + strb r0, [r4, #3] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225DDE2 +_0225DDA8: + cmp r0, #0 + bne _0225DDE2 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x70 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #1 + strb r0, [r4, #3] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0225DDE2 +_0225DDD0: + bl sub_0200F2AC + cmp r0, #1 + bne _0225DDE2 + mov r0, #0 + strb r0, [r4, #3] + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0225DDE2: + add r0, r4, #0 + bl ov70_0225E88C + add r0, r4, #0 + bl ov70_0225E92C + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0225DDF4: .word 0x021BF67C + thumb_func_end ov70_0225DB90 + + thumb_func_start ov70_0225DDF8 +ov70_0225DDF8: ; 0x0225DDF8 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006840 + ldrb r1, [r4, #1] + str r1, [r0, #0x18] + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_0226C6F8 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02269204 + mov r0, #0x3f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_02262DF4 + mov r0, #0x61 + mov r1, #0xc6 + lsl r0, r0, #2 + lsl r1, r1, #2 + add r2, r4, #0 + add r0, r4, r0 + add r1, r4, r1 + add r2, #0x3c + bl ov70_0225F3E4 + mov r0, #0xb7 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225F25C + mov r0, #0xbe + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EA14 + mov r0, #0xc6 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EBBC + mov r0, #0xce + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x3c + bl ov70_0225ED4C + mov r0, #0x39 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov70_0225F144 + mov r0, #0x3a + lsl r0, r0, #4 + add r0, r4, r0 + bl ov70_0225F100 + mov r0, #0xf1 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225EFD8 + mov r0, #0xfb + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02260AD4 + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_022621AC + mov r0, #0x3e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_0225CA20 + mov r0, #0xfa + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_0225C894 + add r0, r4, #0 + add r0, #0x3c + bl ov70_0225E6D0 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #0x70 + bl sub_0201807C + mov r0, #0x71 + bl sub_0201807C + mov r0, #0 + bl sub_020057BC + mov r0, #0 + bl sub_0200592C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225DDF8 + + thumb_func_start ov70_0225DEE8 +ov70_0225DEE8: ; 0x0225DEE8 + ldr r0, [r0, #0x34] + bx lr + thumb_func_end ov70_0225DEE8 + + thumb_func_start ov70_0225DEEC +ov70_0225DEEC: ; 0x0225DEEC + ldr r0, [r0, #0x38] + bx lr + thumb_func_end ov70_0225DEEC + + thumb_func_start ov70_0225DEF0 +ov70_0225DEF0: ; 0x0225DEF0 + mov r1, #0x3e + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov70_0225DEF0 + + thumb_func_start ov70_0225DEF8 +ov70_0225DEF8: ; 0x0225DEF8 + mov r1, #0xf9 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov70_0225DEF8 + + thumb_func_start ov70_0225DF00 +ov70_0225DF00: ; 0x0225DF00 + mov r1, #0xfa + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov70_0225DF00 + + thumb_func_start ov70_0225DF08 +ov70_0225DF08: ; 0x0225DF08 + mov r1, #0xfb + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov70_0225DF08 + + thumb_func_start ov70_0225DF10 +ov70_0225DF10: ; 0x0225DF10 + mov r1, #0x3f + lsl r1, r1, #4 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov70_0225DF10 + + thumb_func_start ov70_0225DF18 +ov70_0225DF18: ; 0x0225DF18 + ldrb r3, [r0, #4] + mov r2, #0xf + lsl r1, r1, #0x18 + bic r3, r2 + lsr r2, r1, #0x18 + mov r1, #0xf + and r1, r2 + orr r1, r3 + strb r1, [r0, #4] + bx lr + thumb_func_end ov70_0225DF18 + + thumb_func_start ov70_0225DF2C +ov70_0225DF2C: ; 0x0225DF2C + ldrb r0, [r0, #2] + bx lr + thumb_func_end ov70_0225DF2C + + thumb_func_start ov70_0225DF30 +ov70_0225DF30: ; 0x0225DF30 + ldrb r0, [r0, #3] + bx lr + thumb_func_end ov70_0225DF30 + + thumb_func_start ov70_0225DF34 +ov70_0225DF34: ; 0x0225DF34 + strb r1, [r0] + bx lr + thumb_func_end ov70_0225DF34 + + thumb_func_start ov70_0225DF38 +ov70_0225DF38: ; 0x0225DF38 + strb r1, [r0, #1] + bx lr + thumb_func_end ov70_0225DF38 + + thumb_func_start ov70_0225DF3C +ov70_0225DF3C: ; 0x0225DF3C + strb r1, [r0, #5] + bx lr + thumb_func_end ov70_0225DF3C + + thumb_func_start ov70_0225DF40 +ov70_0225DF40: ; 0x0225DF40 + ldrb r0, [r0, #5] + bx lr + thumb_func_end ov70_0225DF40 + + thumb_func_start ov70_0225DF44 +ov70_0225DF44: ; 0x0225DF44 + mov r1, #1 + strb r1, [r0, #7] + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225DF44 + + thumb_func_start ov70_0225DF4C +ov70_0225DF4C: ; 0x0225DF4C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0x14 + blo _0225DF5C + bl sub_02022974 +_0225DF5C: + add r0, r5, r4 + strb r6, [r0, #0xc] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0225DF4C + + thumb_func_start ov70_0225DF64 +ov70_0225DF64: ; 0x0225DF64 + add r0, r0, r1 + ldrb r0, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225DF64 + + thumb_func_start ov70_0225DF6C +ov70_0225DF6C: ; 0x0225DF6C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0x14 + blo _0225DF7C + bl sub_02022974 +_0225DF7C: + add r0, r5, r4 + add r0, #0x20 + strb r6, [r0] + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225DF6C + + thumb_func_start ov70_0225DF84 +ov70_0225DF84: ; 0x0225DF84 + add r0, r0, r1 + add r0, #0x20 + ldrb r0, [r0] + bx lr + thumb_func_end ov70_0225DF84 + + thumb_func_start ov70_0225DF8C +ov70_0225DF8C: ; 0x0225DF8C + mov r2, #0xbe + lsl r2, r2, #2 + ldr r3, _0225DF98 ; =ov70_0225EA44 + add r0, r0, r2 + bx r3 + nop +_0225DF98: .word ov70_0225EA44 + thumb_func_end ov70_0225DF8C + + thumb_func_start ov70_0225DF9C +ov70_0225DF9C: ; 0x0225DF9C + mov r2, #0xbe + lsl r2, r2, #2 + ldr r3, _0225DFA8 ; =ov70_0225EAA4 + add r0, r0, r2 + bx r3 + nop +_0225DFA8: .word ov70_0225EAA4 + thumb_func_end ov70_0225DF9C + + thumb_func_start ov70_0225DFAC +ov70_0225DFAC: ; 0x0225DFAC + mov r1, #0xbe + lsl r1, r1, #2 + ldr r3, _0225DFB8 ; =ov70_0225EB5C + add r0, r0, r1 + bx r3 + nop +_0225DFB8: .word ov70_0225EB5C + thumb_func_end ov70_0225DFAC + + thumb_func_start ov70_0225DFBC +ov70_0225DFBC: ; 0x0225DFBC + mov r1, #0xbe + lsl r1, r1, #2 + ldr r3, _0225DFC8 ; =ov70_0225EB08 + add r0, r0, r1 + bx r3 + nop +_0225DFC8: .word ov70_0225EB08 + thumb_func_end ov70_0225DFBC + + thumb_func_start ov70_0225DFCC +ov70_0225DFCC: ; 0x0225DFCC + mov r1, #0xbe + lsl r1, r1, #2 + ldr r3, _0225DFD8 ; =ov70_0225EB24 + add r0, r0, r1 + bx r3 + nop +_0225DFD8: .word ov70_0225EB24 + thumb_func_end ov70_0225DFCC + + thumb_func_start ov70_0225DFDC +ov70_0225DFDC: ; 0x0225DFDC + mov r1, #0xbe + lsl r1, r1, #2 + ldr r3, _0225DFE8 ; =ov70_0225EB4C + add r0, r0, r1 + bx r3 + nop +_0225DFE8: .word ov70_0225EB4C + thumb_func_end ov70_0225DFDC + + thumb_func_start ov70_0225DFEC +ov70_0225DFEC: ; 0x0225DFEC + mov r1, #0xbe + lsl r1, r1, #2 + ldr r3, _0225DFF8 ; =ov70_0225EB74 + add r0, r0, r1 + bx r3 + nop +_0225DFF8: .word ov70_0225EB74 + thumb_func_end ov70_0225DFEC + + thumb_func_start ov70_0225DFFC +ov70_0225DFFC: ; 0x0225DFFC + mov r2, #0xc6 + lsl r2, r2, #2 + ldr r3, _0225E008 ; =ov70_0225EBC4 + add r0, r0, r2 + bx r3 + nop +_0225E008: .word ov70_0225EBC4 + thumb_func_end ov70_0225DFFC + + thumb_func_start ov70_0225E00C +ov70_0225E00C: ; 0x0225E00C + push {r3, lr} + mov r2, #0xce + lsl r2, r2, #2 + add r0, r0, r2 + mov r2, #0x71 + mov r3, #0 + bl ov70_0225EDA8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E00C + + thumb_func_start ov70_0225E020 +ov70_0225E020: ; 0x0225E020 + push {r3, lr} + add r3, r2, #0 + mov r2, #0xce + lsl r2, r2, #2 + add r0, r0, r2 + mov r2, #0x71 + bl ov70_0225EDA8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E020 + + thumb_func_start ov70_0225E034 +ov70_0225E034: ; 0x0225E034 + mov r1, #0xce + lsl r1, r1, #2 + ldr r3, _0225E040 ; =ov70_0225EDE0 + add r0, r0, r1 + bx r3 + nop +_0225E040: .word ov70_0225EDE0 + thumb_func_end ov70_0225E034 + + thumb_func_start ov70_0225E044 +ov70_0225E044: ; 0x0225E044 + mov r3, #0xce + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _0225E050 ; =ov70_0225EDF8 + bx r3 + nop +_0225E050: .word ov70_0225EDF8 + thumb_func_end ov70_0225E044 + + thumb_func_start ov70_0225E054 +ov70_0225E054: ; 0x0225E054 + mov r1, #0xce + lsl r1, r1, #2 + ldr r3, _0225E060 ; =ov70_0225EE04 + add r0, r0, r1 + bx r3 + nop +_0225E060: .word ov70_0225EE04 + thumb_func_end ov70_0225E054 + + thumb_func_start ov70_0225E064 +ov70_0225E064: ; 0x0225E064 + mov r2, #0xce + lsl r2, r2, #2 + ldr r3, _0225E070 ; =ov70_0225EE08 + add r0, r0, r2 + bx r3 + nop +_0225E070: .word ov70_0225EE08 + thumb_func_end ov70_0225E064 + + thumb_func_start ov70_0225E074 +ov70_0225E074: ; 0x0225E074 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + str r3, [sp] + mov r0, #0x70 + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #0xf + str r0, [sp, #0x10] + mov r0, #0xce + lsl r0, r0, #2 + add r4, r2, #0 + add r0, r5, r0 + add r5, #0x3c + add r2, r5, #0 + add r3, r4, #0 + bl ov70_0225EE30 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E074 + + thumb_func_start ov70_0225E0A4 +ov70_0225E0A4: ; 0x0225E0A4 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + str r3, [sp] + mov r0, #0x70 + str r0, [sp, #4] + add r4, r2, #0 + add r0, sp, #0x10 + ldrb r2, [r0, #0x10] + add r3, r4, #0 + str r2, [sp, #8] + ldrb r2, [r0, #0x14] + str r2, [sp, #0xc] + ldrb r0, [r0, #0x18] + str r0, [sp, #0x10] + mov r0, #0xce + lsl r0, r0, #2 + add r0, r5, r0 + add r5, #0x3c + add r2, r5, #0 + bl ov70_0225EE30 + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov70_0225E0A4 + + thumb_func_start ov70_0225E0D4 +ov70_0225E0D4: ; 0x0225E0D4 + mov r1, #0xce + lsl r1, r1, #2 + ldr r3, _0225E0E0 ; =ov70_0225EED8 + add r0, r0, r1 + bx r3 + nop +_0225E0E0: .word ov70_0225EED8 + thumb_func_end ov70_0225E0D4 + + thumb_func_start ov70_0225E0E4 +ov70_0225E0E4: ; 0x0225E0E4 + mov r3, #0xce + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _0225E0F0 ; =ov70_0225EF14 + bx r3 + nop +_0225E0F0: .word ov70_0225EF14 + thumb_func_end ov70_0225E0E4 + + thumb_func_start ov70_0225E0F4 +ov70_0225E0F4: ; 0x0225E0F4 + mov r2, #0xce + lsl r2, r2, #2 + ldr r3, _0225E100 ; =ov70_0225EF6C + add r0, r0, r2 + bx r3 + nop +_0225E100: .word ov70_0225EF6C + thumb_func_end ov70_0225E0F4 + + thumb_func_start ov70_0225E104 +ov70_0225E104: ; 0x0225E104 + push {r4, r5, lr} + sub sp, #0xc + str r2, [sp] + add r5, r0, #0 + str r3, [sp, #4] + add r0, sp, #8 + ldrb r0, [r0, #0x10] + add r4, r1, #0 + mov r2, #0x70 + str r0, [sp, #8] + mov r0, #0xf1 + lsl r0, r0, #2 + add r0, r5, r0 + add r5, #0x3c + add r1, r5, #0 + add r3, r4, #0 + bl ov70_0225EFE0 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov70_0225E104 + + thumb_func_start ov70_0225E12C +ov70_0225E12C: ; 0x0225E12C + mov r1, #0xf1 + lsl r1, r1, #2 + ldr r3, _0225E138 ; =ov70_0225F024 + add r0, r0, r1 + bx r3 + nop +_0225E138: .word ov70_0225F024 + thumb_func_end ov70_0225E12C + + thumb_func_start ov70_0225E13C +ov70_0225E13C: ; 0x0225E13C + push {r4, lr} + mov r4, #0xf1 + lsl r4, r4, #2 + add r0, r0, r4 + bl ov70_0225F048 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E13C + + thumb_func_start ov70_0225E14C +ov70_0225E14C: ; 0x0225E14C + push {r3, r4, lr} + sub sp, #4 + add r4, sp, #0 + ldrh r4, [r4, #0x10] + str r4, [sp] + mov r4, #0xf1 + lsl r4, r4, #2 + add r0, r0, r4 + bl ov70_0225F078 + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov70_0225E14C + + thumb_func_start ov70_0225E164 +ov70_0225E164: ; 0x0225E164 + push {lr} + sub sp, #0x14 + mov r3, #0 + add r2, r0, #0 + str r3, [sp] + mov r0, #0x70 + str r0, [sp, #4] + mov r0, #0x19 + str r0, [sp, #8] + mov r0, #0xd + mov r1, #0xce + str r0, [sp, #0xc] + mov r0, #6 + lsl r1, r1, #2 + str r0, [sp, #0x10] + add r0, r2, r1 + add r1, #0x6c + add r1, r2, r1 + add r2, #0x3c + bl ov70_0225EE30 + add sp, #0x14 + pop {pc} + ; .align 2, 0 + thumb_func_end ov70_0225E164 + + thumb_func_start ov70_0225E194 +ov70_0225E194: ; 0x0225E194 + push {lr} + sub sp, #0x14 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x70 + str r0, [sp, #4] + mov r0, #0x19 + str r0, [sp, #8] + mov r0, #0xd + mov r1, #0xce + str r0, [sp, #0xc] + mov r0, #6 + lsl r1, r1, #2 + str r0, [sp, #0x10] + add r0, r2, r1 + add r1, #0x6c + add r1, r2, r1 + add r2, #0x3c + mov r3, #0 + bl ov70_0225EE30 + add sp, #0x14 + pop {pc} + thumb_func_end ov70_0225E194 + + thumb_func_start ov70_0225E1C4 +ov70_0225E1C4: ; 0x0225E1C4 + push {r3, lr} + mov r1, #0xce + lsl r1, r1, #2 + add r0, r0, r1 + bl ov70_0225EED8 + cmp r0, #0 + beq _0225E1EA + cmp r0, #1 + beq _0225E1E6 + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + bne _0225E1EE + ldr r0, _0225E1F4 ; =0x000005DC + bl sub_02005748 +_0225E1E6: + mov r0, #1 + pop {r3, pc} +_0225E1EA: + mov r0, #0 + pop {r3, pc} +_0225E1EE: + mov r0, #2 + pop {r3, pc} + nop +_0225E1F4: .word 0x000005DC + thumb_func_end ov70_0225E1C4 + + thumb_func_start ov70_0225E1F8 +ov70_0225E1F8: ; 0x0225E1F8 + mov r1, #0xce + lsl r1, r1, #2 + add r0, r0, r1 + mov r1, #0 + ldr r3, _0225E208 ; =ov70_0225EF14 + add r2, r1, #0 + bx r3 + nop +_0225E208: .word ov70_0225EF14 + thumb_func_end ov70_0225E1F8 + + thumb_func_start ov70_0225E20C +ov70_0225E20C: ; 0x0225E20C + mov r3, #0xb7 + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _0225E218 ; =ov70_0225F288 + bx r3 + nop +_0225E218: .word ov70_0225F288 + thumb_func_end ov70_0225E20C + + thumb_func_start ov70_0225E21C +ov70_0225E21C: ; 0x0225E21C + push {r3, r4, lr} + sub sp, #4 + ldr r4, [sp, #0x10] + str r4, [sp] + mov r4, #0xb7 + lsl r4, r4, #2 + add r0, r0, r4 + bl ov70_0225F2A8 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E21C + + thumb_func_start ov70_0225E234 +ov70_0225E234: ; 0x0225E234 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x70 + add r4, r1, #0 + add r7, r2, #0 + bl sub_02025E6C + add r6, r0, #0 + ldr r0, [r5, #0x34] + bl ov66_0222E338 + cmp r4, r0 + ldr r0, [r5, #0x34] + bne _0225E256 + bl ov66_0222E3BC + b _0225E25C +_0225E256: + add r1, r4, #0 + bl ov66_0222E374 +_0225E25C: + add r1, r6, #0 + mov r2, #0x70 + bl ov66_0222E640 + mov r0, #0xb7 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r6, #0 + add r2, r7, #0 + bl ov70_0225F2C8 + add r0, r6, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E234 + + thumb_func_start ov70_0225E27C +ov70_0225E27C: ; 0x0225E27C + mov r3, #0xb7 + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _0225E288 ; =ov70_0225F2D8 + bx r3 + nop +_0225E288: .word ov70_0225F2D8 + thumb_func_end ov70_0225E27C + + thumb_func_start ov70_0225E28C +ov70_0225E28C: ; 0x0225E28C + mov r3, #0xb7 + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _0225E298 ; =ov70_0225F2E8 + bx r3 + nop +_0225E298: .word ov70_0225F2E8 + thumb_func_end ov70_0225E28C + + thumb_func_start ov70_0225E29C +ov70_0225E29C: ; 0x0225E29C + mov r3, #0xb7 + lsl r3, r3, #2 + add r0, r0, r3 + ldr r3, _0225E2A8 ; =ov70_0225F2F8 + bx r3 + nop +_0225E2A8: .word ov70_0225F2F8 + thumb_func_end ov70_0225E29C + + thumb_func_start ov70_0225E2AC +ov70_0225E2AC: ; 0x0225E2AC + mov r3, #0xb7 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _0225E2B8 ; =sub_0200C158 + bx r3 + nop +_0225E2B8: .word sub_0200C158 + thumb_func_end ov70_0225E2AC + + thumb_func_start ov70_0225E2BC +ov70_0225E2BC: ; 0x0225E2BC + mov r3, #0xb7 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _0225E2C8 ; =sub_0200C190 + bx r3 + nop +_0225E2C8: .word sub_0200C190 + thumb_func_end ov70_0225E2BC + + thumb_func_start ov70_0225E2CC +ov70_0225E2CC: ; 0x0225E2CC + mov r3, #0xb7 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _0225E2D8 ; =sub_0200C1C8 + bx r3 + nop +_0225E2D8: .word sub_0200C1C8 + thumb_func_end ov70_0225E2CC + + thumb_func_start ov70_0225E2DC +ov70_0225E2DC: ; 0x0225E2DC + mov r3, #0xb7 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _0225E2E8 ; =sub_0200C200 + bx r3 + nop +_0225E2E8: .word sub_0200C200 + thumb_func_end ov70_0225E2DC + + thumb_func_start ov70_0225E2EC +ov70_0225E2EC: ; 0x0225E2EC + mov r3, #0xb7 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _0225E2F8 ; =sub_0200C238 + bx r3 + nop +_0225E2F8: .word sub_0200C238 + thumb_func_end ov70_0225E2EC + + thumb_func_start ov70_0225E2FC +ov70_0225E2FC: ; 0x0225E2FC + mov r3, #0xb7 + lsl r3, r3, #2 + ldr r0, [r0, r3] + ldr r3, _0225E308 ; =sub_0200C270 + bx r3 + nop +_0225E308: .word sub_0200C270 + thumb_func_end ov70_0225E2FC + + thumb_func_start ov70_0225E30C +ov70_0225E30C: ; 0x0225E30C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r2, #0 + add r4, r1, #0 + bl ov66_022316E8 + add r2, r0, #0 + mov r0, #0xb7 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200B7EC + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225E30C + + thumb_func_start ov70_0225E328 +ov70_0225E328: ; 0x0225E328 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + add r4, r1, #0 + add r6, r2, #0 + bl ov70_0225F7F8 + cmp r4, r0 + bne _0225E368 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov70_0225F7FC + cmp r0, #1 + bne _0225E368 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov70_0225F834 + cmp r0, #0 + bne _0225E368 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + bl ov70_0225F828 + cmp r6, r0 + beq _0225E376 +_0225E368: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r4, #0 + add r2, r6, #0 + bl ov70_0225F79C +_0225E376: + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225E328 + + thumb_func_start ov70_0225E378 +ov70_0225E378: ; 0x0225E378 + push {r3, lr} + add r3, r0, #0 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r3, r0 + add r3, #0x3c + add r2, r1, #0 + add r1, r3, #0 + mov r3, #0x70 + bl ov70_0225F7A8 + pop {r3, pc} + thumb_func_end ov70_0225E378 + + thumb_func_start ov70_0225E390 +ov70_0225E390: ; 0x0225E390 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225F7FC + cmp r0, #0 + beq _0225E3CC + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_0225F7F8 + add r1, r0, #0 + ldr r0, [r4, #0x34] + bl ov66_0222E374 + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [sp] + add r0, r4, r1 + add r1, #8 + add r1, r4, r1 + add r4, #0x3c + add r2, r4, #0 + mov r3, #0x70 + bl ov70_0225FDA0 +_0225E3CC: + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov70_0225E390 + + thumb_func_start ov70_0225E3D0 +ov70_0225E3D0: ; 0x0225E3D0 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r3, _0225E3DC ; =ov70_0225F7E0 + add r0, r0, r1 + bx r3 + nop +_0225E3DC: .word ov70_0225F7E0 + thumb_func_end ov70_0225E3D0 + + thumb_func_start ov70_0225E3E0 +ov70_0225E3E0: ; 0x0225E3E0 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r3, _0225E3EC ; =ov70_0225F7F8 + add r0, r0, r1 + bx r3 + nop +_0225E3EC: .word ov70_0225F7F8 + thumb_func_end ov70_0225E3E0 + + thumb_func_start ov70_0225E3F0 +ov70_0225E3F0: ; 0x0225E3F0 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r3, _0225E3FC ; =ov70_0225F7FC + add r0, r0, r1 + bx r3 + nop +_0225E3FC: .word ov70_0225F7FC + thumb_func_end ov70_0225E3F0 + + thumb_func_start ov70_0225E400 +ov70_0225E400: ; 0x0225E400 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r3, _0225E40C ; =ov70_0225F814 + add r0, r0, r1 + bx r3 + nop +_0225E40C: .word ov70_0225F814 + thumb_func_end ov70_0225E400 + + thumb_func_start ov70_0225E410 +ov70_0225E410: ; 0x0225E410 + mov r1, #0x61 + lsl r1, r1, #2 + ldr r3, _0225E41C ; =ov70_0225F7EC + add r0, r0, r1 + bx r3 + nop +_0225E41C: .word ov70_0225F7EC + thumb_func_end ov70_0225E410 + + thumb_func_start ov70_0225E420 +ov70_0225E420: ; 0x0225E420 + mov r2, #0xf7 + lsl r2, r2, #2 + ldr r0, [r0, r2] + ldr r3, _0225E42C ; =ov70_0226C810 + mov r2, #1 + bx r3 + ; .align 2, 0 +_0225E42C: .word ov70_0226C810 + thumb_func_end ov70_0225E420 + + thumb_func_start ov70_0225E430 +ov70_0225E430: ; 0x0225E430 + ldr r1, _0225E438 ; =0x0000018A + mov r2, #1 + strh r2, [r0, r1] + bx lr + ; .align 2, 0 +_0225E438: .word 0x0000018A + thumb_func_end ov70_0225E430 + + thumb_func_start ov70_0225E43C +ov70_0225E43C: ; 0x0225E43C + mov r2, #0x61 + lsl r2, r2, #2 + ldr r3, _0225E448 ; =ov70_0225F934 + add r0, r0, r2 + bx r3 + nop +_0225E448: .word ov70_0225F934 + thumb_func_end ov70_0225E43C + + thumb_func_start ov70_0225E44C +ov70_0225E44C: ; 0x0225E44C + mov r1, #0xa6 + lsl r1, r1, #2 + ldr r3, _0225E458 ; =ov70_02260A68 + add r0, r0, r1 + bx r3 + nop +_0225E458: .word ov70_02260A68 + thumb_func_end ov70_0225E44C + + thumb_func_start ov70_0225E45C +ov70_0225E45C: ; 0x0225E45C + mov r1, #0xf6 + lsl r1, r1, #2 + ldr r3, [r0, r1] + mov r2, #0 + str r2, [r0, r1] + add r0, r3, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225E45C + + thumb_func_start ov70_0225E46C +ov70_0225E46C: ; 0x0225E46C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0x14 + blo _0225E47A + bl sub_02022974 +_0225E47A: + ldr r0, [r5, #0x34] + add r1, r4, #0 + bl ov66_0222E374 + bl ov66_0222E8C4 + add r6, r0, #0 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, r6, #0 + bl ov70_02269268 + ldr r0, [r5, #0x34] + bl ov66_0222E338 + cmp r4, r0 + bne _0225E4A8 + ldr r0, [r5, #0x34] + add r1, r6, #0 + bl ov66_0222EB6C +_0225E4A8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E46C + + thumb_func_start ov70_0225E4AC +ov70_0225E4AC: ; 0x0225E4AC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0x14 + blo _0225E4BA + bl sub_02022974 +_0225E4BA: + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl ov70_02269298 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225E4AC + + thumb_func_start ov70_0225E4C8 +ov70_0225E4C8: ; 0x0225E4C8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_022622A4 + mov r0, #0x3e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_0225CAE0 + add r4, #0x3c + add r0, r4, #0 + bl ov70_0225E740 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E4C8 + + thumb_func_start ov70_0225E4EC +ov70_0225E4EC: ; 0x0225E4EC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + str r1, [sp, #0x14] + ldr r0, _0225E698 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, _0225E69C ; =0x04001050 + add r6, r2, #0 + strh r1, [r0] + mov r0, #0x20 + add r1, r6, #0 + bl sub_0201DBEC + ldr r0, _0225E6A0 ; =0x0226D664 + bl sub_0201FE94 + ldr r0, _0225E6A4 ; =0x021BF6DC + mov r1, #0 + strb r1, [r0, #5] + bl sub_0201FFE8 + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + ldr r0, _0225E6A8 ; =0x0226D5BC + bl sub_02018368 + add r0, r6, #0 + bl sub_02018340 + str r0, [r5, #0] + mov r0, #0 + ldr r7, _0225E6AC ; =0x0226D6B4 + ldr r4, _0225E6B0 ; =0x0226D5CC + str r0, [sp, #0x18] +_0225E536: + ldr r1, [r4, #0] + ldr r0, [r5, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + add r2, r7, #0 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0] + mov r1, #0x20 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + mov r2, #0 + add r3, r6, #0 + bl sub_02019690 + ldr r1, [r4, #0] + ldr r0, [r5, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_02019EBC + ldr r0, [sp, #0x18] + add r7, #0x1c + add r0, r0, #1 + add r4, r4, #4 + str r0, [sp, #0x18] + cmp r0, #4 + blt _0225E536 + ldr r0, [sp, #0x14] + bl sub_02025E44 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + mov r0, #0 + mov r1, #0xa0 + add r2, r6, #0 + bl sub_02002E7C + mov r0, #0 + mov r1, #0x80 + add r2, r6, #0 + bl sub_02002E98 + mov r0, #0 + str r0, [sp] + str r6, [sp, #4] + ldr r0, [r5, #0] + mov r1, #1 + mov r2, #0x55 + mov r3, #3 + bl sub_0200DAA4 + mov r1, #1 + str r4, [sp] + str r6, [sp, #4] + ldr r0, [r5, #0] + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200DD0C + mov r0, #3 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r6, [sp, #8] + ldr r0, [r5, #0] + mov r1, #1 + mov r2, #0x1f + mov r3, #2 + bl sub_0200E2A4 + mov r0, #0x20 + str r0, [sp] + mov r0, #0xba + mov r1, #0x5a + mov r2, #0 + mov r3, #0x40 + str r6, [sp, #4] + bl sub_02006E84 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7e + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x1f + str r3, [sp, #0xc] + add r2, r0, #0 + str r6, [sp, #0x10] + bl sub_0200A784 + ldr r0, _0225E6B4 ; =0x0226D5DC + ldr r2, _0225E6B8 ; =0x00100010 + mov r1, #0x10 + bl sub_0201E88C + mov r0, #0x18 + add r1, r6, #0 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + mov r0, #1 + mov r1, #0x10 + bl sub_0200966C + mov r0, #1 + bl sub_02009704 + bl sub_02039734 + add r1, r5, #0 + mov r0, #0x18 + add r1, #8 + add r2, r6, #0 + bl sub_020095C4 + str r0, [r5, #4] + add r0, r5, #0 + mov r2, #1 + add r0, #8 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + mov r7, #0 + add r4, r5, #0 +_0225E642: + mov r0, #0x18 + add r1, r7, #0 + add r2, r6, #0 + bl sub_02009714 + mov r1, #0x13 + lsl r1, r1, #4 + str r0, [r4, r1] + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #4 + blt _0225E642 + mov r0, #0x18 + add r1, r6, #0 + bl sub_0201DCC8 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + str r0, [sp] + ldr r0, _0225E6BC ; =ov70_0225E754 + mov r1, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #2 + add r3, r1, #0 + bl sub_02024220 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r5, r1] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0225E698: .word 0x04000050 +_0225E69C: .word 0x04001050 +_0225E6A0: .word 0x0226D664 +_0225E6A4: .word 0x021BF6DC +_0225E6A8: .word 0x0226D5BC +_0225E6AC: .word 0x0226D6B4 +_0225E6B0: .word 0x0226D5CC +_0225E6B4: .word 0x0226D5DC +_0225E6B8: .word 0x00100010 +_0225E6BC: .word ov70_0225E754 + thumb_func_end ov70_0225E4EC + + thumb_func_start ov70_0225E6C0 +ov70_0225E6C0: ; 0x0225E6C0 + push {r3, lr} + ldr r0, [r0, #4] + bl sub_020219F8 + bl sub_0201DCE8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E6C0 + + thumb_func_start ov70_0225E6D0 +ov70_0225E6D0: ; 0x0225E6D0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl sub_0201DC3C + ldr r5, _0225E73C ; =0x0226D5CC + mov r4, #0 +_0225E6DC: + ldr r1, [r5, #0] + ldr r0, [r6, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0225E6DC + ldr r0, [r6, #0] + bl sub_020181C4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r6, r0] + bl sub_0201DCF0 + mov r0, #5 + lsl r0, r0, #6 + mov r4, #0 + add r7, r0, #0 + str r4, [r6, r0] + add r5, r6, #0 + sub r7, #0x10 +_0225E70E: + ldr r0, [r5, r7] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0225E70E + ldr r0, [r6, #4] + bl sub_02021964 + bl sub_0201E958 + bl sub_0201F8B4 + bl sub_0200A878 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_020242C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_0225E73C: .word 0x0226D5CC + thumb_func_end ov70_0225E6D0 + + thumb_func_start ov70_0225E740 +ov70_0225E740: ; 0x0225E740 + push {r3, lr} + ldr r0, [r0, #0] + bl sub_0201C2B8 + bl sub_0200A858 + bl sub_0201DCAC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E740 + + thumb_func_start ov70_0225E754 +ov70_0225E754: ; 0x0225E754 + push {r3, r4, lr} + sub sp, #0xc + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _0225E864 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r2, [r0] + ldr r1, _0225E868 ; =0xFFFFCFFD + and r2, r1 + strh r2, [r0] + ldrh r3, [r0] + add r2, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0225E86C ; =0x0000CFFB + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #8 + orr r2, r3 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldr r0, _0225E870 ; =0x0226D5EC + bl sub_020BFD2C + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r1, #0 + ldr r0, _0225E874 ; =0x00006B5A + ldr r2, _0225E878 ; =0x00007FFF + mov r3, #0x3f + str r1, [sp] + bl sub_020BFD58 + ldr r1, _0225E87C ; =0xBFFF0000 + ldr r0, _0225E880 ; =0x04000580 + ldr r2, _0225E884 ; =0xFFFFF224 + str r1, [r0, #0] + ldr r1, _0225E888 ; =0xFFFFF805 + mov r0, #0 + mov r3, #0x6e + bl sub_020AF51C + mov r1, #0 + add r0, sp, #4 + strh r1, [r0] + strh r1, [r0, #2] + mov r1, #1 + lsl r1, r1, #0xc + strh r1, [r0, #4] + add r0, sp, #4 + add r1, r0, #0 + bl sub_020BD4FC + add r4, sp, #4 + mov r1, #0 + mov r2, #2 + mov r3, #4 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + mov r0, #1 + bl sub_020AF51C + mov r1, #0 + add r0, r4, #0 + strh r1, [r0] + strh r1, [r0, #2] + mov r1, #1 + lsl r1, r1, #0xc + strh r1, [r0, #4] + add r0, sp, #4 + add r1, r0, #0 + bl sub_020BD4FC + mov r0, #2 + mov r1, #0 + mov r3, #4 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r0] + ldrsh r3, [r4, r3] + bl sub_020AF51C + ldr r1, _0225E878 ; =0x00007FFF + mov r0, #2 + bl sub_020AF558 + mov r1, #0 + add r0, r4, #0 + strh r1, [r0] + strh r1, [r0, #2] + mov r1, #1 + lsl r1, r1, #0xc + strh r1, [r0, #4] + add r0, sp, #4 + add r1, r0, #0 + bl sub_020BD4FC + mov r1, #0 + mov r2, #2 + mov r3, #4 + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldrsh r3, [r4, r3] + mov r0, #3 + bl sub_020AF51C + ldr r1, _0225E878 ; =0x00007FFF + mov r0, #3 + bl sub_020AF558 + add sp, #0xc + pop {r3, r4, pc} + nop +_0225E864: .word 0x04000008 +_0225E868: .word 0xFFFFCFFD +_0225E86C: .word 0x0000CFFB +_0225E870: .word 0x0226D5EC +_0225E874: .word 0x00006B5A +_0225E878: .word 0x00007FFF +_0225E87C: .word 0xBFFF0000 +_0225E880: .word 0x04000580 +_0225E884: .word 0xFFFFF224 +_0225E888: .word 0xFFFFF805 + thumb_func_end ov70_0225E754 + + thumb_func_start ov70_0225E88C +ov70_0225E88C: ; 0x0225E88C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x3e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_0225CA44 + ldrb r0, [r4, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + bne _0225E8B2 + ldrb r0, [r4, #6] + cmp r0, #0 + bne _0225E8B2 + mov r0, #0x3f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_02262E20 +_0225E8B2: + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02262210 + ldrb r0, [r4, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + bne _0225E8E8 + ldrb r0, [r4, #6] + cmp r0, #0 + bne _0225E8E8 + mov r0, #0x3e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_0225CA5C + mov r0, #0x3f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_02262E2C + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_0226C718 +_0225E8E8: + add r0, r4, #0 + bl ov70_0225E970 + ldrb r0, [r4, #3] + cmp r0, #0 + bne _0225E91E + ldrb r0, [r4, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x1c + cmp r0, #1 + beq _0225E90A + ldrb r0, [r4, #6] + cmp r0, #1 + beq _0225E90A + ldrb r0, [r4] + cmp r0, #1 + bne _0225E90E +_0225E90A: + mov r2, #1 + b _0225E910 +_0225E90E: + mov r2, #0 +_0225E910: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, #0 + mov r3, #0x70 + bl ov70_0225F418 +_0225E91E: + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02269220 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E88C + + thumb_func_start ov70_0225E92C +ov70_0225E92C: ; 0x0225E92C + push {r4, lr} + add r4, r0, #0 + bl sub_020241B4 + mov r0, #0xfb + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02260AEC + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02262298 + mov r0, #0x3e + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov70_0225CAD4 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02269240 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + add r4, #0x3c + add r0, r4, #0 + bl ov70_0225E6C0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E92C + + thumb_func_start ov70_0225E970 +ov70_0225E970: ; 0x0225E970 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + ldr r0, [r7, #0x34] + bl ov66_0222E190 + str r0, [sp, #8] + mov r4, #0 +_0225E980: + add r0, r4, #0 + bl ov66_02233184 + add r6, r0, #0 + cmp r6, #1 + bne _0225E99E + add r0, r4, #0 + bl ov66_022331A4 + cmp r0, #0 + bne _0225E99A + mov r5, #1 + b _0225E9A0 +_0225E99A: + mov r5, #0 + b _0225E9A0 +_0225E99E: + mov r5, #0 +_0225E9A0: + add r0, r4, #0 + bl ov66_02233224 + add r2, r0, #0 + ldr r0, [sp, #8] + str r5, [sp] + str r0, [sp, #4] + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r7, r0] + add r1, r4, #0 + add r3, r6, #0 + bl ov70_022627BC + add r4, r4, #1 + cmp r4, #3 + blt _0225E980 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225E970 + + thumb_func_start ov70_0225E9C8 +ov70_0225E9C8: ; 0x0225E9C8 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0x5e + str r0, [sp, #0x10] + ldr r0, [r1, #0] + add r4, r2, #0 + add r6, r3, #0 + add r1, r5, #0 + mov r2, #1 + mov r3, #2 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #6 + lsl r0, r0, #6 + add r1, r6, #0 + bl sub_02023790 + str r0, [r5, #0x18] + add r0, r4, #0 + bl sub_02025E44 + bl sub_02027AC0 + str r0, [r5, #0x14] + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov70_0225E9C8 + + thumb_func_start ov70_0225EA14 +ov70_0225EA14: ; 0x0225EA14 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _0225EA30 + ldr r0, [r4, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 +_0225EA30: + add r0, r4, #0 + bl ov70_0225EB38 + ldr r0, [r4, #0x18] + bl sub_020237BC + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + thumb_func_end ov70_0225EA14 + + thumb_func_start ov70_0225EA44 +ov70_0225EA44: ; 0x0225EA44 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _0225EA64 + ldr r0, [r5, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 +_0225EA64: + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r5, #0x18] + add r1, r4, #0 + bl sub_02023810 + mov r3, #0 + str r3, [sp] + ldr r0, [r5, #0x14] + mov r1, #1 + str r0, [sp, #4] + ldr r0, _0225EAA0 ; =0x0001020F + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r2, [r5, #0x18] + add r0, r5, #0 + bl sub_0201D78C + mov r1, #1 + str r0, [r5, #0x10] + add r0, r5, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200E060 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0225EAA0: .word 0x0001020F + thumb_func_end ov70_0225EA44 + + thumb_func_start ov70_0225EAA4 +ov70_0225EAA4: ; 0x0225EAA4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _0225EAC4 + ldr r0, [r5, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 +_0225EAC4: + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r5, #0x18] + add r1, r4, #0 + bl sub_02023810 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0225EB04 ; =0x0001020F + mov r1, #1 + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r2, [r5, #0x18] + add r0, r5, #0 + bl sub_0201D78C + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200E060 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0225EB04: .word 0x0001020F + thumb_func_end ov70_0225EAA4 + + thumb_func_start ov70_0225EB08 +ov70_0225EB08: ; 0x0225EB08 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0225EB16 + bl sub_02022974 +_0225EB16: + add r0, r4, #0 + mov r1, #1 + bl sub_0200E7FC + str r0, [r4, #0x1c] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225EB08 + + thumb_func_start ov70_0225EB24 +ov70_0225EB24: ; 0x0225EB24 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0225EB36 + bl sub_0200EBA0 + mov r0, #0 + str r0, [r4, #0x1c] +_0225EB36: + pop {r4, pc} + thumb_func_end ov70_0225EB24 + + thumb_func_start ov70_0225EB38 +ov70_0225EB38: ; 0x0225EB38 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x1c] + cmp r0, #0 + beq _0225EB4A + bl sub_0200EBC8 + mov r0, #0 + str r0, [r4, #0x1c] +_0225EB4A: + pop {r4, pc} + thumb_func_end ov70_0225EB38 + + thumb_func_start ov70_0225EB4C +ov70_0225EB4C: ; 0x0225EB4C + ldr r0, [r0, #0x1c] + cmp r0, #0 + beq _0225EB56 + mov r0, #1 + bx lr +_0225EB56: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225EB4C + + thumb_func_start ov70_0225EB5C +ov70_0225EB5C: ; 0x0225EB5C + push {r3, lr} + ldr r0, [r0, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0225EB70 + mov r0, #1 + pop {r3, pc} +_0225EB70: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov70_0225EB5C + + thumb_func_start ov70_0225EB74 +ov70_0225EB74: ; 0x0225EB74 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _0225EB90 + ldr r0, [r4, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 +_0225EB90: + add r0, r4, #0 + bl ov70_0225EB38 + add r0, r4, #0 + mov r1, #1 + bl sub_0200E084 + add r0, r4, #0 + bl sub_0201AD10 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225EB74 + + thumb_func_start ov70_0225EBA8 +ov70_0225EBA8: ; 0x0225EBA8 + push {r4, lr} + add r4, r0, #0 + bl ov70_0225E9C8 + add r0, r4, #0 + mov r1, #2 + bl sub_0201C2B4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225EBA8 + + thumb_func_start ov70_0225EBBC +ov70_0225EBBC: ; 0x0225EBBC + ldr r3, _0225EBC0 ; =ov70_0225EA14 + bx r3 + ; .align 2, 0 +_0225EBC0: .word ov70_0225EA14 + thumb_func_end ov70_0225EBBC + + thumb_func_start ov70_0225EBC4 +ov70_0225EBC4: ; 0x0225EBC4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _0225EBE4 + ldr r0, [r5, #0x10] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D730 +_0225EBE4: + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r5, #0x18] + add r1, r4, #0 + bl sub_02023810 + mov r3, #0 + str r3, [sp] + ldr r0, [r5, #0x14] + mov r1, #1 + str r0, [sp, #4] + str r3, [sp, #8] + ldr r2, [r5, #0x18] + add r0, r5, #0 + bl sub_0201D738 + str r0, [r5, #0x10] + mov r0, #3 + str r0, [sp] + add r0, r5, #0 + mov r1, #1 + mov r2, #0x1f + mov r3, #2 + bl sub_0200E69C + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225EBC4 + + thumb_func_start ov70_0225EC20 +ov70_0225EC20: ; 0x0225EC20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x70 + add r5, r2, #0 + add r7, r0, #0 + add r4, r1, #0 + mov r0, #0x3e + add r1, r5, #0 + bl sub_02006C24 + add r6, r0, #0 + ldr r0, _0225ED44 ; =0x00001388 + add r1, r6, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x13 + str r5, [sp, #8] + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r2, #4 + mov r3, #0 + bl sub_02009A4C + str r0, [r7, #0x40] + ldr r0, _0225ED44 ; =0x00001388 + add r1, r6, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4d + str r5, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #0xa + mov r3, #0 + bl sub_02009B04 + str r0, [r7, #0x44] + ldr r1, _0225ED44 ; =0x00001388 + mov r0, #2 + str r1, [sp] + str r0, [sp, #4] + lsr r0, r1, #4 + str r5, [sp, #8] + ldr r0, [r4, r0] + add r1, r6, #0 + mov r2, #5 + mov r3, #0 + bl sub_02009BC4 + str r0, [r7, #0x48] + ldr r0, _0225ED44 ; =0x00001388 + add r1, r6, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4f + str r5, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #6 + mov r3, #0 + bl sub_02009BC4 + str r0, [r7, #0x4c] + add r0, r6, #0 + bl sub_02006CA8 + ldr r0, [r7, #0x40] + bl sub_0200A3DC + ldr r0, [r7, #0x44] + bl sub_0200A640 + ldr r1, _0225ED44 ; =0x00001388 + mov r0, #0 + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #0x13 + str r2, [sp, #0x10] + lsl r0, r0, #4 + ldr r3, [r4, r0] + str r3, [sp, #0x14] + add r3, r0, #4 + ldr r3, [r4, r3] + str r3, [sp, #0x18] + add r3, r0, #0 + add r3, #8 + ldr r3, [r4, r3] + add r0, #0xc + str r3, [sp, #0x1c] + ldr r0, [r4, r0] + add r3, r1, #0 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r0, sp, #0x4c + add r2, r1, #0 + bl sub_020093B4 + ldr r0, [r4, #4] + mov r6, #0 + str r0, [sp, #0x2c] + add r0, sp, #0x4c + str r0, [sp, #0x30] + mov r0, #1 + str r0, [sp, #0x44] + mov r0, #3 + lsl r0, r0, #0x12 + str r5, [sp, #0x48] + ldr r4, _0225ED48 ; =0x0226D580 + str r6, [sp, #0x40] + str r0, [sp, #0x34] + add r5, r7, #0 +_0225ED0E: + ldrb r0, [r4] + lsl r0, r0, #0xc + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021B90 + str r0, [r5, #0x50] + add r1, r6, #0 + bl sub_02021D6C + ldr r0, [r5, #0x50] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r5, #0x50] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r4, r4, #1 + add r5, r5, #4 + cmp r6, #2 + blt _0225ED0E + mov r0, #0 + str r0, [r7, #0x3c] + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225ED44: .word 0x00001388 +_0225ED48: .word 0x0226D580 + thumb_func_end ov70_0225EC20 + + thumb_func_start ov70_0225ED4C +ov70_0225ED4C: ; 0x0225ED4C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + ldr r1, [r5, #0x34] + cmp r1, #0 + beq _0225ED5C + bl ov70_0225EDE0 +_0225ED5C: + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _0225ED6C + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225EF14 +_0225ED6C: + mov r7, #0 + add r4, r5, #0 +_0225ED70: + ldr r0, [r4, #0x50] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0x50] + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #2 + blt _0225ED70 + ldr r0, [r5, #0x40] + bl sub_0200A4E4 + ldr r0, [r5, #0x44] + bl sub_0200A6DC + mov r7, #0x13 + mov r4, #0 + lsl r7, r7, #4 +_0225ED94: + ldr r0, [r6, r7] + ldr r1, [r5, #0x40] + bl sub_02009D68 + add r4, r4, #1 + add r5, r5, #4 + add r6, r6, #4 + cmp r4, #4 + blt _0225ED94 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225ED4C + + thumb_func_start ov70_0225EDA8 +ov70_0225EDA8: ; 0x0225EDA8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x34] + add r4, r1, #0 + add r7, r2, #0 + add r6, r3, #0 + cmp r0, #0 + beq _0225EDBC + bl sub_02022974 +_0225EDBC: + add r0, r4, #0 + add r1, r7, #0 + bl sub_02013A04 + str r0, [r5, #0x34] + mov r1, #0 + strh r4, [r5, #0x38] + cmp r4, #0 + bls _0225EDDE + add r2, r1, #0 +_0225EDD0: + ldr r0, [r5, #0x34] + add r1, r1, #1 + add r0, r0, r2 + str r6, [r0, #4] + add r2, #8 + cmp r1, r4 + blo _0225EDD0 +_0225EDDE: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225EDA8 + + thumb_func_start ov70_0225EDE0 +ov70_0225EDE0: ; 0x0225EDE0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _0225EDF4 + bl sub_02013A3C + mov r0, #0 + str r0, [r4, #0x34] + strh r0, [r4, #0x38] +_0225EDF4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225EDE0 + + thumb_func_start ov70_0225EDF8 +ov70_0225EDF8: ; 0x0225EDF8 + ldr r3, _0225EE00 ; =sub_02013A6C + ldr r0, [r0, #0x34] + bx r3 + nop +_0225EE00: .word sub_02013A6C + thumb_func_end ov70_0225EDF8 + + thumb_func_start ov70_0225EE04 +ov70_0225EE04: ; 0x0225EE04 + ldr r0, [r0, #0x34] + bx lr + thumb_func_end ov70_0225EE04 + + thumb_func_start ov70_0225EE08 +ov70_0225EE08: ; 0x0225EE08 + push {r3, r4} + ldrh r2, [r0, #0x38] + mov r3, #0 + cmp r2, #0 + ble _0225EE2A + ldr r4, [r0, #0x34] +_0225EE14: + ldr r2, [r4, #4] + cmp r1, r2 + bne _0225EE20 + mov r0, #1 + pop {r3, r4} + bx lr +_0225EE20: + ldrh r2, [r0, #0x38] + add r3, r3, #1 + add r4, #8 + cmp r3, r2 + blt _0225EE14 +_0225EE2A: + mov r0, #0 + pop {r3, r4} + bx lr + thumb_func_end ov70_0225EE08 + + thumb_func_start ov70_0225EE30 +ov70_0225EE30: ; 0x0225EE30 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0x30] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _0225EE46 + bl sub_02022974 +_0225EE46: + ldrh r0, [r4, #0x12] + lsl r0, r0, #1 + cmp r0, #0x12 + blt _0225EE52 + bl sub_02022974 +_0225EE52: + add r3, r4, #0 + add r2, r5, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r1, r5, #0 + add r1, #0x20 + str r1, [r5, #0xc] + ldrh r0, [r4, #0x10] + add r3, sp, #0x18 + mov r2, #1 + strh r0, [r5, #0x3a] + ldr r0, _0225EED4 ; =ov70_0225EF58 + str r0, [r5, #4] + ldrb r0, [r3, #0x1c] + str r0, [sp] + add r0, sp, #0x38 + ldrb r0, [r0] + str r0, [sp, #4] + ldrh r0, [r4, #0x12] + lsl r0, r0, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #0xca + str r0, [sp, #0x10] + ldrb r3, [r3, #0x18] + ldr r0, [r6, #0] + bl sub_0201A7E8 + add r0, r5, #0 + add r0, #0x20 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x20 + mov r1, #1 + mov r2, #0x55 + mov r3, #3 + bl sub_0200DC48 + add r2, sp, #0x18 + ldr r3, [sp, #0x2c] + ldrh r2, [r2, #0x10] + lsl r3, r3, #0x18 + add r0, r5, #0 + add r1, r7, #0 + lsr r3, r3, #0x18 + bl sub_0200112C + str r0, [r5, #0x30] + add r5, #0x20 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0225EED4: .word ov70_0225EF58 + thumb_func_end ov70_0225EE30 + + thumb_func_start ov70_0225EED8 +ov70_0225EED8: ; 0x0225EED8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x30] + cmp r0, #0 + bne _0225EEE8 + mov r0, #1 + mvn r0, r0 + pop {r3, r4, r5, pc} +_0225EEE8: + bl sub_02001288 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0225EEFC + add r0, r0, #1 + cmp r4, r0 + bne _0225EF04 +_0225EEFC: + add r0, r5, #0 + bl ov70_0225EF70 + b _0225EF0A +_0225EF04: + ldr r0, _0225EF10 ; =0x000005DC + bl sub_02005748 +_0225EF0A: + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_0225EF10: .word 0x000005DC + thumb_func_end ov70_0225EED8 + + thumb_func_start ov70_0225EF14 +ov70_0225EF14: ; 0x0225EF14 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x30] + cmp r0, #0 + beq _0225EF56 + bl sub_02001384 + mov r0, #0 + str r0, [r5, #0x30] + add r0, r5, #0 + add r0, #0x20 + mov r1, #1 + bl sub_0200DC9C + add r0, r5, #0 + add r0, #0x20 + bl sub_0201AD10 + add r0, r5, #0 + add r0, #0x20 + bl sub_0201A8FC + mov r4, #0 + str r4, [r5, #0x3c] + add r6, r4, #0 +_0225EF46: + ldr r0, [r5, #0x50] + add r1, r6, #0 + bl sub_02021CAC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0225EF46 +_0225EF56: + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225EF14 + + thumb_func_start ov70_0225EF58 +ov70_0225EF58: ; 0x0225EF58 + push {r3, lr} + cmp r2, #0 + bne _0225EF64 + ldr r0, _0225EF68 ; =0x000005DC + bl sub_02005748 +_0225EF64: + pop {r3, pc} + nop +_0225EF68: .word 0x000005DC + thumb_func_end ov70_0225EF58 + + thumb_func_start ov70_0225EF6C +ov70_0225EF6C: ; 0x0225EF6C + str r1, [r0, #0x3c] + bx lr + thumb_func_end ov70_0225EF6C + + thumb_func_start ov70_0225EF70 +ov70_0225EF70: ; 0x0225EF70 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0x3c] + cmp r0, #0 + bne _0225EF90 + ldr r0, [r4, #0x50] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x54] + mov r1, #0 + bl sub_02021CAC + add sp, #4 + pop {r3, r4, pc} +_0225EF90: + ldr r0, [r4, #0x30] + add r1, sp, #0 + mov r2, #0 + bl sub_020014DC + add r0, sp, #0 + ldrh r0, [r0] + cmp r0, #0 + ldr r0, [r4, #0x50] + bne _0225EFAC + mov r1, #0 + bl sub_02021CAC + b _0225EFB2 +_0225EFAC: + mov r1, #1 + bl sub_02021CAC +_0225EFB2: + add r0, sp, #0 + ldrh r1, [r0] + ldrh r0, [r4, #0x3a] + sub r0, r0, #7 + cmp r1, r0 + ldr r0, [r4, #0x54] + blt _0225EFCA + mov r1, #0 + bl sub_02021CAC + add sp, #4 + pop {r3, r4, pc} +_0225EFCA: + mov r1, #1 + bl sub_02021CAC + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov70_0225EF70 + + thumb_func_start ov70_0225EFD4 +ov70_0225EFD4: ; 0x0225EFD4 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225EFD4 + + thumb_func_start ov70_0225EFD8 +ov70_0225EFD8: ; 0x0225EFD8 + ldr r3, _0225EFDC ; =ov70_0225F024 + bx r3 + ; .align 2, 0 +_0225EFDC: .word ov70_0225F024 + thumb_func_end ov70_0225EFD8 + + thumb_func_start ov70_0225EFE0 +ov70_0225EFE0: ; 0x0225EFE0 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + add r0, sp, #0x10 + ldrb r2, [r0, #0x10] + str r2, [sp] + ldrb r2, [r0, #0x14] + str r2, [sp, #4] + ldrb r0, [r0, #0x18] + mov r2, #1 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #0xca + str r0, [sp, #0x10] + ldr r0, [r1, #0] + add r1, r4, #0 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x55 + mov r3, #3 + bl sub_0200DC48 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov70_0225EFE0 + + thumb_func_start ov70_0225F024 +ov70_0225F024: ; 0x0225F024 + push {r4, lr} + add r4, r0, #0 + bl sub_0201A7CC + cmp r0, #1 + bne _0225F044 + add r0, r4, #0 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + bl sub_0201AD10 + add r0, r4, #0 + bl sub_0201A8FC +_0225F044: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F024 + + thumb_func_start ov70_0225F048 +ov70_0225F048: ; 0x0225F048 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r1, #0 + str r3, [sp] + add r5, r2, #0 + mov r1, #0xff + str r1, [sp, #4] + ldr r1, _0225F074 ; =0x0001020F + add r4, r0, #0 + str r1, [sp, #8] + mov r1, #0 + add r2, r6, #0 + add r3, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0225F074: .word 0x0001020F + thumb_func_end ov70_0225F048 + + thumb_func_start ov70_0225F078 +ov70_0225F078: ; 0x0225F078 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + str r3, [sp] + add r1, sp, #8 + add r4, r2, #0 + ldrh r1, [r1, #0x10] + add r2, r5, #0 + add r3, r4, #0 + str r1, [sp, #4] + mov r1, #0xf + bl sub_0201AE78 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F078 + + thumb_func_start ov70_0225F098 +ov70_0225F098: ; 0x0225F098 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r6, r2, #0 + cmp r0, #0 + beq _0225F0AA + bl sub_02022974 +_0225F0AA: + mov r0, #2 + add r1, r6, #0 + bl sub_02013A04 + str r0, [r5, #0] + add r0, r4, #0 + mov r1, #1 + mov r2, #0x43 + bl ov70_0225F288 + add r1, r0, #0 + ldr r0, [r5, #0] + mov r2, #0 + bl sub_02013A6C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x42 + bl ov70_0225F288 + add r1, r0, #0 + ldr r0, [r5, #0] + mov r2, #1 + bl sub_02013A6C + ldr r3, _0225F0FC ; =0x0226D644 + add r2, r5, #4 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #2 + strh r0, [r5, #0x14] + ldr r0, [r5, #0] + str r0, [r5, #4] + pop {r4, r5, r6, pc} + nop +_0225F0FC: .word 0x0226D644 + thumb_func_end ov70_0225F098 + + thumb_func_start ov70_0225F100 +ov70_0225F100: ; 0x0225F100 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0225F112 + bl sub_02013A3C + mov r0, #0 + str r0, [r4, #0] +_0225F112: + pop {r4, pc} + thumb_func_end ov70_0225F100 + + thumb_func_start ov70_0225F114 +ov70_0225F114: ; 0x0225F114 + push {r3, r4, lr} + sub sp, #0x14 + mov r3, #4 + add r4, r0, #0 + str r3, [sp] + mov r0, #0x17 + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #5 + str r0, [sp, #0xc] + mov r0, #0x5e + str r0, [sp, #0x10] + ldr r0, [r1, #0] + add r1, r4, #0 + mov r2, #1 + bl sub_0201A7E8 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + add sp, #0x14 + pop {r3, r4, pc} + thumb_func_end ov70_0225F114 + + thumb_func_start ov70_0225F144 +ov70_0225F144: ; 0x0225F144 + ldr r3, _0225F148 ; =sub_0201A8FC + bx r3 + ; .align 2, 0 +_0225F148: .word sub_0201A8FC + thumb_func_end ov70_0225F144 + + thumb_func_start ov70_0225F14C +ov70_0225F14C: ; 0x0225F14C + push {r4, lr} + sub sp, #0x10 + add r2, r1, #0 + mov r1, #0 + str r1, [sp] + mov r3, #0xff + str r3, [sp, #4] + ldr r3, _0225F180 ; =0x0001020F + add r4, r0, #0 + str r3, [sp, #8] + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x55 + mov r3, #3 + bl sub_0200DC48 + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, pc} + nop +_0225F180: .word 0x0001020F + thumb_func_end ov70_0225F14C + + thumb_func_start ov70_0225F184 +ov70_0225F184: ; 0x0225F184 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + bl sub_020382F8 + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl ov66_022316F4 + add r7, r0, #0 + mov r0, #2 + str r0, [sp] + ldr r1, [r4, #0] + add r0, r5, #0 + mov r2, #5 + mov r3, #0 + bl ov70_0225F2A8 + add r0, r5, #0 + mov r1, #2 + add r2, r7, #0 + bl ov70_0225F288 + add r1, r0, #0 + add r0, r6, #0 + bl ov70_0225F14C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F184 + + thumb_func_start ov70_0225F1C0 +ov70_0225F1C0: ; 0x0225F1C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r2, #0 + add r4, r1, #0 + bl ov66_0223270C + add r1, r0, #0 + mov r0, #2 + str r0, [sp] + add r0, r4, #0 + mov r2, #5 + mov r3, #0 + bl ov70_0225F2A8 + add r0, r4, #0 + mov r1, #2 + mov r2, #0x20 + bl ov70_0225F288 + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225F14C + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225F1C0 + + thumb_func_start ov70_0225F1F0 +ov70_0225F1F0: ; 0x0225F1F0 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #2 + mov r2, #0xe + bl ov70_0225F288 + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225F14C + pop {r4, pc} + thumb_func_end ov70_0225F1F0 + + thumb_func_start ov70_0225F208 +ov70_0225F208: ; 0x0225F208 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + str r0, [sp] + mov r0, #8 + mov r1, #0x40 + add r2, r7, #0 + bl sub_0200B368 + ldr r1, [sp] + ldr r4, _0225F258 ; =0x0226D5AC + str r0, [r1, #0] + mov r6, #0 + add r5, r1, #0 +_0225F222: + ldr r2, [r4, #0] + mov r0, #1 + mov r1, #0x1a + add r3, r7, #0 + bl sub_0200B144 + str r0, [r5, #4] + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #4 + blt _0225F222 + mov r0, #0x1e + lsl r0, r0, #4 + add r1, r7, #0 + bl sub_02023790 + ldr r1, [sp] + str r0, [r1, #0x14] + mov r0, #0x1e + lsl r0, r0, #4 + add r1, r7, #0 + bl sub_02023790 + ldr r1, [sp] + str r0, [r1, #0x18] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225F258: .word 0x0226D5AC + thumb_func_end ov70_0225F208 + + thumb_func_start ov70_0225F25C +ov70_0225F25C: ; 0x0225F25C + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + bl sub_0200B3F0 + mov r4, #0 + add r5, r6, #0 +_0225F26A: + ldr r0, [r5, #4] + bl sub_0200B190 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0225F26A + ldr r0, [r6, #0x14] + bl sub_020237BC + ldr r0, [r6, #0x18] + bl sub_020237BC + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F25C + + thumb_func_start ov70_0225F288 +ov70_0225F288: ; 0x0225F288 + push {r4, lr} + add r4, r0, #0 + lsl r0, r1, #2 + add r0, r4, r0 + add r1, r2, #0 + ldr r0, [r0, #4] + ldr r2, [r4, #0x18] + bl sub_0200B1B8 + ldr r0, [r4, #0] + ldr r1, [r4, #0x14] + ldr r2, [r4, #0x18] + bl sub_0200C388 + ldr r0, [r4, #0x14] + pop {r4, pc} + thumb_func_end ov70_0225F288 + + thumb_func_start ov70_0225F2A8 +ov70_0225F2A8: ; 0x0225F2A8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, [sp, #0x18] + add r4, r2, #0 + str r1, [sp] + mov r1, #1 + str r1, [sp, #4] + add r1, r3, #0 + ldr r0, [r0, #0] + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200B60C + add sp, #8 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225F2A8 + + thumb_func_start ov70_0225F2C8 +ov70_0225F2C8: ; 0x0225F2C8 + add r3, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, _0225F2D4 ; =sub_0200B498 + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0225F2D4: .word sub_0200B498 + thumb_func_end ov70_0225F2C8 + + thumb_func_start ov70_0225F2D8 +ov70_0225F2D8: ; 0x0225F2D8 + add r3, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, _0225F2E4 ; =sub_0200C0B0 + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0225F2E4: .word sub_0200C0B0 + thumb_func_end ov70_0225F2D8 + + thumb_func_start ov70_0225F2E8 +ov70_0225F2E8: ; 0x0225F2E8 + add r3, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, _0225F2F4 ; =sub_0200C0E8 + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0225F2F4: .word sub_0200C0E8 + thumb_func_end ov70_0225F2E8 + + thumb_func_start ov70_0225F2F8 +ov70_0225F2F8: ; 0x0225F2F8 + add r3, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, _0225F304 ; =sub_0200C120 + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0225F304: .word sub_0200C120 + thumb_func_end ov70_0225F2F8 + + thumb_func_start ov70_0225F308 +ov70_0225F308: ; 0x0225F308 + add r3, r1, #0 + add r1, r2, #0 + add r2, r3, #0 + ldr r3, _0225F314 ; =sub_0200BDD0 + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0225F314: .word sub_0200BDD0 + thumb_func_end ov70_0225F308 + + thumb_func_start ov70_0225F318 +ov70_0225F318: ; 0x0225F318 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + add r1, r3, #0 + ldr r0, [r0, #0] + add r2, r5, #0 + add r3, r4, #0 + bl sub_0200BE08 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0225F318 + + thumb_func_start ov70_0225F32C +ov70_0225F32C: ; 0x0225F32C + ldr r3, _0225F334 ; =sub_0200BE48 + ldr r0, [r0, #0] + bx r3 + nop +_0225F334: .word sub_0200BE48 + thumb_func_end ov70_0225F32C + + thumb_func_start ov70_0225F338 +ov70_0225F338: ; 0x0225F338 + ldr r3, _0225F340 ; =sub_0200C41C + ldr r0, [r0, #0] + bx r3 + nop +_0225F340: .word sub_0200C41C + thumb_func_end ov70_0225F338 + + thumb_func_start ov70_0225F344 +ov70_0225F344: ; 0x0225F344 + mov r1, #0xf6 + mov r2, #1 + lsl r1, r1, #2 + str r2, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225F344 + + thumb_func_start ov70_0225F350 +ov70_0225F350: ; 0x0225F350 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r4, [sp, #0x20] + add r5, r0, #0 + add r0, r3, #0 + add r7, r1, #0 + add r6, r2, #0 + bl sub_02025F30 + str r0, [sp, #4] + mov r0, #0xba + add r1, r4, #0 + bl sub_02006C24 + mov r2, #0x53 + lsl r2, r2, #2 + str r0, [r5, r2] + str r4, [sp] + ldr r2, [r5, r2] + ldr r3, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + bl ov70_0225F9BC + mov r2, #0x53 + lsl r2, r2, #2 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #8 + add r1, r6, #0 + add r3, r4, #0 + bl ov70_0225FA84 + mov r2, #0x45 + lsl r2, r2, #2 + add r0, r5, r2 + add r2, #0x38 + ldr r2, [r5, r2] + add r1, r6, #0 + add r3, r4, #0 + bl ov70_02260744 + mov r1, #0 + strb r1, [r5, #2] + strb r1, [r5, #1] + ldrh r0, [r7, #6] + cmp r0, #0 + bne _0225F3DC + mov r0, #4 + strb r1, [r5] + bl sub_0201975C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0225F3DC: + mov r0, #5 + strb r0, [r5] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225F350 + + thumb_func_start ov70_0225F3E4 +ov70_0225F3E4: ; 0x0225F3E4 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r5, r0 + add r6, r1, #0 + add r4, r2, #0 + bl ov70_022607A8 + add r0, r5, #0 + add r0, #8 + add r1, r6, #0 + add r2, r4, #0 + bl ov70_0225FAA8 + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0225FA10 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02006CA8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F3E4 + + thumb_func_start ov70_0225F418 +ov70_0225F418: ; 0x0225F418 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + add r5, r1, #0 + add r4, r0, #0 + add r0, r5, #0 + str r0, [sp, #0x38] + add r0, #0x3c + str r0, [sp, #0x38] + mov r0, #0xb7 + lsl r0, r0, #2 + ldrb r1, [r4] + add r7, r3, #0 + ldr r6, [r5, #0x34] + str r0, [sp, #0x3c] + cmp r1, #0xa + bhi _0225F4FA + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225F444: ; jump table + .short _0225F45A - _0225F444 - 2 ; case 0 + .short _0225F468 - _0225F444 - 2 ; case 1 + .short _0225F486 - _0225F444 - 2 ; case 2 + .short _0225F4D4 - _0225F444 - 2 ; case 3 + .short _0225F4F2 - _0225F444 - 2 ; case 4 + .short _0225F506 - _0225F444 - 2 ; case 5 + .short _0225F5E2 - _0225F444 - 2 ; case 6 + .short _0225F600 - _0225F444 - 2 ; case 7 + .short _0225F648 - _0225F444 - 2 ; case 8 + .short _0225F74E - _0225F444 - 2 ; case 9 + .short _0225F780 - _0225F444 - 2 ; case 10 +_0225F45A: + ldrh r0, [r4, #6] + cmp r0, #1 + bne _0225F4FA + add r0, r1, #1 + add sp, #0x50 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F468: + mov r0, #4 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r1, #0 + ldr r3, _0225F790 ; =0x00007FFF + str r7, [sp, #8] + add r2, r1, #0 + bl sub_0200F174 + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F486: + bl sub_0200F2AC + cmp r0, #1 + bne _0225F4FA + add r0, r6, #0 + bl ov66_0222E3BC + mov r2, #0xb7 + lsl r2, r2, #2 + str r0, [sp] + ldr r1, [sp, #0x38] + add r0, r4, #0 + add r2, r5, r2 + add r3, r7, #0 + bl ov70_0225F8AC + mov r0, #4 + strb r0, [r4, #1] + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F4D4: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r3, _0225F790 ; =0x00007FFF + str r7, [sp, #8] + mov r0, #4 + add r2, r1, #0 + bl sub_0200F174 + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F4F2: + bl sub_0200F2AC + cmp r0, #1 + beq _0225F4FC +_0225F4FA: + b _0225F78C +_0225F4FC: + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F506: + cmp r2, #1 + beq _0225F608 + ldrb r0, [r4, #1] + cmp r0, #4 + bhi _0225F5D2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225F51C: ; jump table + .short _0225F5D2 - _0225F51C - 2 ; case 0 + .short _0225F526 - _0225F51C - 2 ; case 1 + .short _0225F5C2 - _0225F51C - 2 ; case 2 + .short _0225F542 - _0225F51C - 2 ; case 3 + .short _0225F5D2 - _0225F51C - 2 ; case 4 +_0225F526: + mov r2, #0x45 + lsl r2, r2, #2 + add r0, r4, r2 + add r2, #0x38 + ldr r1, [sp, #0x38] + ldr r2, [r4, r2] + bl ov70_022607D4 + cmp r0, #1 + bne _0225F5D2 + add r0, r5, #0 + bl ov70_0225F344 + b _0225F5D2 +_0225F542: + ldr r2, _0225F794 ; =0x00000153 + ldrb r0, [r4, r2] + cmp r0, #0 + beq _0225F56E + sub r1, r2, #3 + mov r0, #0xf7 + sub r2, r2, #1 + lsl r0, r0, #2 + ldrh r1, [r4, r1] + ldrb r2, [r4, r2] + ldr r0, [r5, r0] + bl ov70_0226C810 + cmp r0, #0 + bne _0225F56E + ldr r0, _0225F794 ; =0x00000153 + mov r1, #0 + strb r1, [r4, r0] + sub r0, #0x3f + add r0, r4, r0 + bl ov70_02260A68 +_0225F56E: + mov r2, #0x45 + lsl r2, r2, #2 + add r0, r4, r2 + add r2, #0x38 + ldr r1, [sp, #0x38] + ldr r2, [r4, r2] + add r3, r7, #0 + bl ov70_022607D4 + cmp r0, #1 + bne _0225F5D2 + add r0, r6, #0 + bl ov66_0222E338 + add r1, r0, #0 + add r0, r6, #0 + bl ov66_0222EBD4 + add r0, r6, #0 + bl ov66_0222EC50 + add r0, r6, #0 + bl ov66_0222E338 + add r1, r0, #0 + add r0, r6, #0 + bl ov66_0222EBA4 + add r1, sp, #0x4c + add r2, sp, #0x48 + bl ov66_0222EC04 + ldr r0, _0225F794 ; =0x00000153 + mov r1, #1 + strb r1, [r4, r0] + sub r1, r0, #3 + ldr r2, [sp, #0x4c] + sub r0, r0, #1 + strh r2, [r4, r1] + ldr r1, [sp, #0x48] + strb r1, [r4, r0] + b _0225F5D2 +_0225F5C2: + ldr r1, [sp, #0x3c] + add r0, r4, #0 + add r1, #0x3c + str r1, [sp, #0x3c] + add r0, #8 + add r1, r5, r1 + bl ov70_0225FACC +_0225F5D2: + ldrb r0, [r4, #2] + cmp r0, #0 + beq _0225F608 + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F5E2: + mov r0, #3 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r2, #0 + str r7, [sp, #8] + mov r0, #4 + add r3, r2, #0 + bl sub_0200F174 + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F600: + bl sub_0200F2AC + cmp r0, #1 + beq _0225F60A +_0225F608: + b _0225F78C +_0225F60A: + ldrb r0, [r4, #1] + cmp r0, #4 + bhi _0225F63E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225F61C: ; jump table + .short _0225F63E - _0225F61C - 2 ; case 0 + .short _0225F626 - _0225F61C - 2 ; case 1 + .short _0225F630 - _0225F61C - 2 ; case 2 + .short _0225F626 - _0225F61C - 2 ; case 3 + .short _0225F626 - _0225F61C - 2 ; case 4 +_0225F626: + ldr r1, [sp, #0x38] + add r0, r4, #0 + bl ov70_0225F920 + b _0225F63E +_0225F630: + mov r1, #0xc6 + lsl r1, r1, #2 + ldr r2, [sp, #0x38] + add r0, r4, #0 + add r1, r5, r1 + bl ov70_0225F89C +_0225F63E: + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F648: + ldrb r0, [r4, #2] + cmp r0, #4 + bhi _0225F740 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0225F65A: ; jump table + .short _0225F740 - _0225F65A - 2 ; case 0 + .short _0225F664 - _0225F65A - 2 ; case 1 + .short _0225F67E - _0225F65A - 2 ; case 2 + .short _0225F710 - _0225F65A - 2 ; case 3 + .short _0225F664 - _0225F65A - 2 ; case 4 +_0225F664: + add r0, r6, #0 + bl ov66_0222E3BC + mov r2, #0xb7 + lsl r2, r2, #2 + str r0, [sp] + ldr r1, [sp, #0x38] + add r0, r4, #0 + add r2, r5, r2 + add r3, r7, #0 + bl ov70_0225F8AC + b _0225F740 +_0225F67E: + add r0, r6, #0 + bl ov66_0222E3BC + str r0, [sp, #0x28] + ldrb r0, [r4, #3] + str r0, [sp, #0x24] + add r0, r6, #0 + bl ov66_0222E338 + ldr r1, [sp, #0x24] + cmp r1, r0 + bne _0225F6A4 + add r0, r6, #0 + bl ov66_0222E3BC + str r0, [sp, #0x20] + mov r0, #1 + str r0, [sp, #0x2c] + b _0225F6B0 +_0225F6A4: + add r0, r6, #0 + bl ov66_0222E374 + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x2c] +_0225F6B0: + ldrb r1, [r4, #3] + add r0, r6, #0 + bl ov66_0222E924 + str r0, [sp, #0x34] + ldrh r0, [r4, #4] + cmp r0, #1 + bne _0225F6DC + ldrb r1, [r4, #3] + add r0, r6, #0 + bl ov66_0222E944 + str r0, [sp, #0x30] + ldrb r1, [r4, #3] + add r0, r6, #0 + bl ov66_0222E954 + cmp r0, #0 + bne _0225F6E0 + mov r1, #0 + str r1, [sp, #0x30] + b _0225F6E0 +_0225F6DC: + mov r0, #0 + str r0, [sp, #0x30] +_0225F6E0: + ldr r1, [sp, #0x2c] + ldr r3, [sp, #0x3c] + str r1, [sp] + ldr r1, [sp, #0x20] + str r7, [sp, #4] + str r1, [sp, #8] + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x38] + str r1, [sp, #0xc] + ldr r1, [sp, #0x34] + add r3, r5, r3 + str r1, [sp, #0x10] + ldr r1, [sp, #0x30] + str r1, [sp, #0x14] + mov r1, #0xc6 + str r0, [sp, #0x18] + mov r0, #1 + lsl r1, r1, #2 + str r0, [sp, #0x1c] + add r0, r4, #0 + add r1, r5, r1 + bl ov70_0225F844 + b _0225F740 +_0225F710: + add r0, r6, #0 + bl ov66_0222E338 + add r1, r0, #0 + add r0, r6, #0 + bl ov66_0222EBA4 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0225F72C + bl sub_02022974 + mov r0, #0 +_0225F72C: + add r1, sp, #0x44 + add r2, sp, #0x40 + bl ov66_0222EC04 + ldr r1, [sp, #0x38] + ldr r3, [sp, #0x40] + add r0, r4, #0 + add r2, r7, #0 + bl ov70_0225F8F0 +_0225F740: + mov r0, #0 + strb r0, [r4, #2] + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F74E: + mov r0, #3 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + str r7, [sp, #8] + mov r0, #4 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + cmp r0, #2 + bne _0225F776 + mov r1, #0xc6 + add r0, r4, #0 + lsl r1, r1, #2 + add r0, #8 + add r1, r5, r1 + bl ov70_0225FACC +_0225F776: + ldrb r0, [r4] + add sp, #0x50 + add r0, r0, #1 + strb r0, [r4] + pop {r3, r4, r5, r6, r7, pc} +_0225F780: + bl sub_0200F2AC + cmp r0, #1 + bne _0225F78C + mov r0, #5 + strb r0, [r4] +_0225F78C: + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225F790: .word 0x00007FFF +_0225F794: .word 0x00000153 + thumb_func_end ov70_0225F418 + + thumb_func_start ov70_0225F798 +ov70_0225F798: ; 0x0225F798 + ldrb r0, [r0] + bx lr + thumb_func_end ov70_0225F798 + + thumb_func_start ov70_0225F79C +ov70_0225F79C: ; 0x0225F79C + mov r3, #2 + strb r3, [r0, #2] + strb r1, [r0, #3] + strh r2, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225F79C + + thumb_func_start ov70_0225F7A8 +ov70_0225F7A8: ; 0x0225F7A8 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + add r7, r3, #0 + cmp r4, #0x1b + blo _0225F7BA + bl sub_02022974 +_0225F7BA: + ldrb r0, [r5, #1] + cmp r0, #2 + beq _0225F7C4 + bl sub_02022974 +_0225F7C4: + ldrb r0, [r5, #1] + cmp r0, #2 + bne _0225F7DE + mov r2, #0x53 + str r4, [sp] + lsl r2, r2, #2 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #8 + add r1, r6, #0 + add r3, r7, #0 + bl ov70_0225FEC4 +_0225F7DE: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225F7A8 + + thumb_func_start ov70_0225F7E0 +ov70_0225F7E0: ; 0x0225F7E0 + ldrb r1, [r0, #1] + cmp r1, #1 + beq _0225F7EA + mov r1, #1 + strb r1, [r0, #2] +_0225F7EA: + bx lr + thumb_func_end ov70_0225F7E0 + + thumb_func_start ov70_0225F7EC +ov70_0225F7EC: ; 0x0225F7EC + ldrb r1, [r0, #1] + cmp r1, #3 + beq _0225F7F6 + mov r1, #3 + strb r1, [r0, #2] +_0225F7F6: + bx lr + thumb_func_end ov70_0225F7EC + + thumb_func_start ov70_0225F7F8 +ov70_0225F7F8: ; 0x0225F7F8 + ldrb r0, [r0, #3] + bx lr + thumb_func_end ov70_0225F7F8 + + thumb_func_start ov70_0225F7FC +ov70_0225F7FC: ; 0x0225F7FC + ldrb r1, [r0, #2] + cmp r1, #2 + bne _0225F806 + mov r0, #1 + bx lr +_0225F806: + ldrb r0, [r0, #1] + cmp r0, #2 + bne _0225F810 + mov r0, #1 + bx lr +_0225F810: + mov r0, #0 + bx lr + thumb_func_end ov70_0225F7FC + + thumb_func_start ov70_0225F814 +ov70_0225F814: ; 0x0225F814 + ldrb r1, [r0, #2] + cmp r1, #0 + bne _0225F824 + ldrb r0, [r0, #1] + cmp r0, #2 + bne _0225F824 + mov r0, #1 + bx lr +_0225F824: + mov r0, #0 + bx lr + thumb_func_end ov70_0225F814 + + thumb_func_start ov70_0225F828 +ov70_0225F828: ; 0x0225F828 + ldr r3, _0225F830 ; =ov70_0225FEEC + add r0, #8 + bx r3 + nop +_0225F830: .word ov70_0225FEEC + thumb_func_end ov70_0225F828 + + thumb_func_start ov70_0225F834 +ov70_0225F834: ; 0x0225F834 + ldrb r0, [r0, #2] + cmp r0, #0 + beq _0225F83E + mov r0, #1 + bx lr +_0225F83E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225F834 + + thumb_func_start ov70_0225F844 +ov70_0225F844: ; 0x0225F844 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r4, r3, #0 + ldrb r3, [r5, #1] + add r6, r1, #0 + add r7, r2, #0 + cmp r3, #2 + bne _0225F85A + bl ov70_0225F89C +_0225F85A: + ldr r0, [sp, #0x40] + str r4, [sp] + str r0, [sp, #4] + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r5, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x44] + add r1, r6, #0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x48] + add r2, #8 + str r0, [sp, #0x10] + ldr r0, [sp, #0x4c] + add r3, r7, #0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x50] + str r0, [sp, #0x18] + ldr r0, [sp, #0x54] + str r0, [sp, #0x1c] + ldr r0, [sp, #0x58] + str r0, [sp, #0x20] + ldr r0, [sp, #0x5c] + str r0, [sp, #0x24] + add r0, r5, #0 + bl ov70_0225FAD0 + mov r0, #2 + strb r0, [r5, #1] + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F844 + + thumb_func_start ov70_0225F89C +ov70_0225F89C: ; 0x0225F89C + push {r4, lr} + add r4, r0, #0 + add r0, #8 + bl ov70_0225FE80 + mov r0, #0 + strb r0, [r4, #1] + pop {r4, pc} + thumb_func_end ov70_0225F89C + + thumb_func_start ov70_0225F8AC +ov70_0225F8AC: ; 0x0225F8AC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldrb r0, [r5, #1] + add r4, r1, #0 + add r7, r2, #0 + add r6, r3, #0 + cmp r0, #1 + beq _0225F8C8 + add r0, #0xfd + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bhi _0225F8D0 +_0225F8C8: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0225F920 +_0225F8D0: + mov r0, #0x53 + lsl r0, r0, #2 + ldr r1, [r5, r0] + sub r0, #0x38 + str r1, [sp] + ldr r3, [sp, #0x20] + add r0, r5, r0 + add r1, r4, #0 + add r2, r7, #0 + str r6, [sp, #4] + bl ov70_02260870 + mov r0, #1 + strb r0, [r5, #1] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225F8AC + + thumb_func_start ov70_0225F8F0 +ov70_0225F8F0: ; 0x0225F8F0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r2, #0 + ldrb r2, [r5, #1] + add r6, r1, #0 + add r7, r3, #0 + cmp r2, #3 + bne _0225F904 + bl ov70_0225F920 +_0225F904: + mov r3, #0x45 + lsl r3, r3, #2 + add r0, r5, r3 + str r4, [sp] + add r3, #0x38 + ldr r3, [r5, r3] + add r1, r6, #0 + add r2, r7, #0 + bl ov70_02260930 + mov r0, #3 + strb r0, [r5, #1] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225F8F0 + + thumb_func_start ov70_0225F920 +ov70_0225F920: ; 0x0225F920 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x45 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov70_022609A8 + mov r0, #0 + strb r0, [r4, #1] + pop {r4, pc} + thumb_func_end ov70_0225F920 + + thumb_func_start ov70_0225F934 +ov70_0225F934: ; 0x0225F934 + ldr r2, _0225F93C ; =0x0000011A + strh r1, [r0, r2] + bx lr + nop +_0225F93C: .word 0x0000011A + thumb_func_end ov70_0225F934 + + thumb_func_start ov70_0225F940 +ov70_0225F940: ; 0x0225F940 + add r1, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + strh r2, [r1, r0] + add r0, r0, #2 + strh r3, [r1, r0] + ldr r3, _0225F954 ; =sub_0200DA3C + ldr r0, _0225F958 ; =ov70_0225F95C + mov r2, #0 + bx r3 + ; .align 2, 0 +_0225F954: .word sub_0200DA3C +_0225F958: .word ov70_0225F95C + thumb_func_end ov70_0225F940 + + thumb_func_start ov70_0225F95C +ov70_0225F95C: ; 0x0225F95C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + mov r3, #0 + ldr r1, _0225F9B8 ; =0x00000156 + str r3, [sp] + add r5, r0, #0 + ldrh r0, [r4, r1] + mov r2, #4 + str r0, [sp, #4] + add r0, r1, #0 + sub r1, r1, #2 + sub r0, #0xa + ldrh r1, [r4, r1] + ldr r0, [r4, r0] + bl sub_02007130 + mov r1, #0xa0 + add r2, r1, #0 + add r2, #0xb6 + ldrh r2, [r4, r2] + mov r0, #4 + bl sub_02002E7C + bl sub_0207C944 + add r6, r0, #0 + bl sub_0207C920 + add r1, r0, #0 + mov r0, #0x60 + str r0, [sp] + add r0, #0xf6 + ldrh r0, [r4, r0] + mov r3, #0x16 + mov r2, #4 + str r0, [sp, #4] + add r0, r6, #0 + lsl r3, r3, #4 + bl sub_02006E84 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0225F9B8: .word 0x00000156 + thumb_func_end ov70_0225F95C + + thumb_func_start ov70_0225F9BC +ov70_0225F9BC: ; 0x0225F9BC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r1, #0 + add r5, r2, #0 + ldr r4, [sp, #0x20] + cmp r3, #0 + bne _0225F9DC + mov r3, #0 + str r3, [sp] + add r0, r5, #0 + mov r1, #0x56 + mov r2, #4 + str r4, [sp, #4] + bl sub_02007130 + b _0225F9EC +_0225F9DC: + mov r3, #0 + str r3, [sp] + add r0, r5, #0 + mov r1, #0x57 + mov r2, #4 + str r4, [sp, #4] + bl sub_02007130 +_0225F9EC: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r6, #0] + add r0, r5, #0 + mov r1, #0x36 + mov r3, #4 + bl sub_020070E8 + mov r0, #4 + mov r1, #0xa0 + add r2, r4, #0 + bl sub_02002E7C + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov70_0225F9BC + + thumb_func_start ov70_0225FA10 +ov70_0225FA10: ; 0x0225FA10 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225FA10 + + thumb_func_start ov70_0225FA14 +ov70_0225FA14: ; 0x0225FA14 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [sp, #0x2c] + add r6, r3, #0 + str r0, [sp] + add r0, r1, #0 + add r1, r2, #0 + mov r2, #0 + add r3, sp, #0xc + ldr r4, [sp, #0x28] + bl sub_020071D0 + ldr r2, [sp, #0xc] + add r7, r0, #0 + ldr r0, [r2, #8] + add r2, #0xc + lsr r1, r0, #1 + mov r0, #0 + cmp r1, #0 + ble _0225FA4C +_0225FA3E: + ldrh r3, [r2] + add r0, r0, #1 + add r3, r3, r4 + strh r3, [r2] + add r2, r2, #2 + cmp r0, r1 + blt _0225FA3E +_0225FA4C: + ldr r2, [sp, #0xc] + mov r3, #0 + str r3, [sp] + ldrh r0, [r2] + lsl r1, r6, #0x18 + lsr r1, r1, #0x18 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #0] + bl sub_020198C0 + lsl r1, r6, #0x18 + ldr r0, [r5, #0] + lsr r1, r1, #0x18 + bl sub_0201C3C0 + add r0, r7, #0 + bl sub_020181C4 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0225FA14 + + thumb_func_start ov70_0225FA84 +ov70_0225FA84: ; 0x0225FA84 + push {r3, r4, r5, r6, r7, lr} + ldr r4, _0225FAA4 ; =0x0226D68C + add r7, r1, #0 + mov r6, #0 + add r5, r0, #4 +_0225FA8E: + ldr r0, [r7, #0] + add r1, r5, #0 + add r2, r4, #0 + bl sub_0201A8D4 + add r6, r6, #1 + add r4, #8 + add r5, #0x10 + cmp r6, #5 + blt _0225FA8E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225FAA4: .word 0x0226D68C + thumb_func_end ov70_0225FA84 + + thumb_func_start ov70_0225FAA8 +ov70_0225FAA8: ; 0x0225FAA8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r3, [r4, #0x54] + cmp r3, #0 + beq _0225FAB6 + bl ov70_0225FE80 +_0225FAB6: + mov r5, #0 + add r4, r4, #4 +_0225FABA: + add r0, r4, #0 + bl sub_0201A8FC + add r5, r5, #1 + add r4, #0x10 + cmp r5, #5 + blt _0225FABA + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225FAA8 + + thumb_func_start ov70_0225FACC +ov70_0225FACC: ; 0x0225FACC + bx lr + ; .align 2, 0 + thumb_func_end ov70_0225FACC + + thumb_func_start ov70_0225FAD0 +ov70_0225FAD0: ; 0x0225FAD0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #0xc] + ldr r0, [sp, #0x30] + ldr r4, [sp, #0x28] + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + add r5, r2, #0 + str r0, [sp, #0x34] + ldr r0, [sp, #0x38] + add r6, r3, #0 + str r0, [sp, #0x38] + add r0, r4, #0 + bl ov70_0225F338 + ldr r0, [sp, #0x38] + bl ov66_0222E7C8 + cmp r0, #0 + bne _0225FB1C + ldr r0, [sp, #0x40] + ldr r7, _0225FD98 ; =0x00070800 + cmp r0, #0 + bne _0225FB0E + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x34] + add r1, r6, #0 + mov r2, #0x56 + bl ov70_0225F940 + b _0225FB40 +_0225FB0E: + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x34] + add r1, r6, #0 + mov r2, #0x58 + bl ov70_0225F940 + b _0225FB40 +_0225FB1C: + ldr r0, [sp, #0x40] + mov r7, #0xc1 + lsl r7, r7, #0xa + cmp r0, #0 + bne _0225FB34 + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x34] + add r1, r6, #0 + mov r2, #0x57 + bl ov70_0225F940 + b _0225FB40 +_0225FB34: + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x34] + add r1, r6, #0 + mov r2, #0x58 + bl ov70_0225F940 +_0225FB40: + ldr r0, [r6, #0] + mov r1, #4 + mov r2, #0 + bl sub_02019F04 + ldr r0, [r6, #0] + mov r1, #5 + mov r2, #0 + bl sub_02019F04 + ldr r0, [r6, #0] + mov r1, #6 + mov r2, #0 + bl sub_02019F04 + add r0, r5, #0 + bl ov70_022602C0 + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r1, [sp, #0x30] + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x5c + mov r3, #4 + bl ov70_0225FA14 + ldr r0, [sp, #0x34] + bl sub_02025E6C + str r0, [sp, #0x10] + ldr r0, [sp, #0x38] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x34] + bl ov66_0222E640 + mov r2, #0 + str r2, [sp] + str r2, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #0x2c + str r7, [sp, #8] + bl ov70_022602DC + ldr r0, [sp, #0x10] + bl sub_02025F24 + add r1, r0, #0 + mov r0, #2 + str r0, [sp] + add r0, r4, #0 + mov r2, #5 + mov r3, #0 + bl ov70_0225F2A8 + mov r0, #0x7a + str r0, [sp] + mov r2, #0 + ldr r0, _0225FD9C ; =0x00010200 + str r2, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #0x31 + bl ov70_02260314 + mov r2, #0 + str r2, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #0x2d + str r7, [sp, #8] + bl ov70_022602DC + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02260370 + mov r0, #0x7a + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #0 + mov r3, #0x32 + bl ov70_02260314 + add r0, r5, #0 + mov r1, #0 + bl ov70_02260360 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + mov r3, #0x2e + str r7, [sp, #8] + bl ov70_022602DC + ldr r0, [sp, #0x38] + bl ov66_0222E880 + cmp r0, #0 + bne _0225FC3E + mov r0, #0x20 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #1 + mov r3, #0x37 + bl ov70_022602DC + b _0225FC60 +_0225FC3E: + ldr r2, [sp, #0x38] + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02260380 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #1 + mov r3, #0x33 + bl ov70_022602DC +_0225FC60: + add r0, r5, #0 + mov r1, #1 + bl ov70_02260360 + ldr r0, [sp, #0x44] + cmp r0, #0 + beq _0225FD06 + mov r0, #1 + str r0, [r5, #0] + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02260370 + mov r0, #8 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #4 + mov r3, #0x38 + str r7, [sp, #8] + bl ov70_022602DC + ldr r2, [sp, #0x48] + add r0, r5, #0 + add r1, r4, #0 + bl ov70_022603B0 + mov r0, #6 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #4 + mov r3, #0x3b + bl ov70_022602DC + mov r0, #0x5a + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #4 + mov r3, #0x3c + bl ov70_022602DC + mov r0, #6 + str r0, [sp] + mov r0, #0x2c + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #4 + mov r3, #0x3d + bl ov70_022602DC + mov r0, #0x5a + str r0, [sp] + mov r0, #0x2c + str r0, [sp, #4] + ldr r0, _0225FD9C ; =0x00010200 + add r1, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + mov r2, #4 + mov r3, #0x3e + bl ov70_022602DC + add r0, r5, #0 + mov r1, #4 + bl ov70_02260360 + b _0225FD3A +_0225FD06: + mov r1, #0 + str r1, [r5, #0] + mov r0, #8 + str r0, [sp] + str r1, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r2, #4 + mov r3, #0x30 + str r7, [sp, #8] + bl ov70_022602DC + add r0, r5, #0 + mov r1, #4 + bl ov70_02260360 + ldr r0, [sp, #0x38] + ldr r2, [sp, #0x30] + str r0, [sp] + ldr r0, [sp, #0x3c] + ldr r3, [sp, #0x34] + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + bl ov70_022603CC +_0225FD3A: + ldr r0, [sp, #0x38] + bl ov66_0222E8C4 + str r0, [sp] + ldr r0, [sp, #0x4c] + ldr r2, [sp, #0x30] + str r0, [sp, #4] + ldr r3, [sp, #0x34] + add r0, r5, #0 + add r1, r6, #0 + bl ov70_0225FEF0 + ldr r0, [sp, #0x2c] + cmp r0, #1 + bne _0225FD6A + ldr r0, [sp, #0x38] + bl ov66_0222E7C8 + cmp r0, #1 + bne _0225FD66 + mov r0, #0x61 + b _0225FD70 +_0225FD66: + mov r0, #0 + b _0225FD70 +_0225FD6A: + ldr r0, [sp, #0x38] + bl ov66_0222E858 +_0225FD70: + ldr r2, [sp, #0x30] + str r0, [sp] + ldr r3, [sp, #0x34] + add r0, r5, #0 + add r1, r6, #0 + bl ov70_02260080 + ldr r0, [sp, #0x38] + ldr r3, [sp, #0x34] + str r0, [sp] + ldr r0, [sp, #0xc] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225FDA0 + ldr r0, [sp, #0x10] + bl sub_020181C4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225FD98: .word 0x00070800 +_0225FD9C: .word 0x00010200 + thumb_func_end ov70_0225FAD0 + + thumb_func_start ov70_0225FDA0 +ov70_0225FDA0: ; 0x0225FDA0 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + ldr r0, [sp, #0x48] + ldr r6, _0225FE78 ; =0x0226D624 + str r0, [sp, #0x48] + mov r0, #0 + str r0, [sp, #0x24] + ldr r0, _0225FE7C ; =0x0226D590 + add r5, r2, #0 + str r3, [sp, #0x1c] + str r0, [sp, #0x20] + mov r4, #2 +_0225FDB8: + ldr r0, [sp, #0x48] + ldr r1, [sp, #0x24] + bl ov66_0222E8E8 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + beq _0225FE60 + bl ov66_022316E8 + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + bl sub_0207C944 + str r0, [sp, #0x28] + add r0, r7, #0 + bl sub_0207C908 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, [sp, #0x28] + ldr r3, [sp, #0x1c] + mov r2, #1 + bl sub_02006FE8 + add r1, sp, #0x30 + str r0, [sp, #0x2c] + bl sub_020A7118 + ldr r0, [sp, #0x20] + mov r1, #6 + ldrh r0, [r0] + add r3, r1, #0 + add r3, #0xfa + str r0, [sp] + ldr r2, [sp, #0x30] + ldr r0, [r5, #0] + ldr r2, [r2, #0x14] + bl sub_0201958C + ldr r0, [sp, #0x2c] + bl sub_020181C4 + mov r0, #4 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + lsl r3, r4, #0x18 + str r6, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #4 + str r0, [sp, #0x14] + mov r0, #2 + str r0, [sp, #0x18] + ldr r0, [r5, #0] + mov r1, #6 + mov r2, #0x1a + lsr r3, r3, #0x18 + bl sub_020198E8 + add r0, r7, #0 + bl sub_0207C92C + mov r1, #4 + add r0, #0xb + str r1, [sp] + mov r1, #2 + lsl r0, r0, #0x18 + str r1, [sp, #4] + lsr r0, r0, #0x18 + str r0, [sp, #8] + lsl r3, r4, #0x18 + ldr r0, [r5, #0] + mov r1, #6 + mov r2, #0x1a + lsr r3, r3, #0x18 + bl sub_02019E2C + ldr r0, [r5, #0] + mov r1, #6 + bl sub_0201C3C0 +_0225FE60: + ldr r0, [sp, #0x20] + add r6, #0x10 + add r0, r0, #2 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + add r4, r4, #2 + add r0, r0, #1 + str r0, [sp, #0x24] + cmp r0, #2 + blt _0225FDB8 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0225FE78: .word 0x0226D624 +_0225FE7C: .word 0x0226D590 + thumb_func_end ov70_0225FDA0 + + thumb_func_start ov70_0225FE80 +ov70_0225FE80: ; 0x0225FE80 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + add r4, r2, #0 + cmp r1, #1 + bne _0225FE92 + mov r0, #0 + str r0, [r5, #0] + b _0225FE98 +_0225FE92: + add r1, r4, #0 + bl ov70_0226068C +_0225FE98: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02260048 + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02260228 + ldr r0, [r4, #0] + mov r1, #4 + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #5 + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #6 + bl sub_02019EBC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_0225FE80 + + thumb_func_start ov70_0225FEC4 +ov70_0225FEC4: ; 0x0225FEC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov70_02260048 + ldr r0, [sp, #0x20] + add r1, r4, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov70_0225FEF0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0225FEC4 + + thumb_func_start ov70_0225FEEC +ov70_0225FEEC: ; 0x0225FEEC + ldr r0, [r0, #0] + bx lr + thumb_func_end ov70_0225FEEC + + thumb_func_start ov70_0225FEF0 +ov70_0225FEF0: ; 0x0225FEF0 + push {r4, r5, r6, r7, lr} + sub sp, #0x7c + add r5, r0, #0 + ldr r0, [sp, #0x90] + add r4, r1, #0 + add r6, r3, #0 + str r2, [sp, #0x2c] + cmp r0, #0x1b + blo _0225FF06 + bl sub_02022974 +_0225FF06: + ldr r0, [r5, #0x54] + cmp r0, #0 + beq _0225FF10 + bl sub_02022974 +_0225FF10: + ldr r0, [sp, #0x90] + mov r1, #3 + bl sub_020E2178 + add r7, r0, #0 + ldr r0, [sp, #0x90] + mov r1, #3 + bl sub_020E2178 + str r1, [sp, #0x30] + lsl r0, r7, #1 + str r0, [sp, #0x34] + mov r1, #0x64 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x34] + str r6, [sp, #8] + add r1, #0xcc + ldr r0, [r4, r1] + add r2, r7, r2 + ldr r1, [sp, #0x2c] + add r2, #0x3d + mov r3, #0 + bl sub_02009A4C + str r0, [r5, #0x58] + bl sub_0200A3DC + cmp r0, #0 + bne _0225FF52 + bl sub_02022974 +_0225FF52: + ldr r0, [r5, #0x58] + bl sub_02009D4C + mov r1, #0x64 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + str r6, [sp, #0xc] + add r1, #0xd0 + ldr r0, [r4, r1] + ldr r1, [sp, #0x2c] + mov r2, #0x59 + mov r3, #0 + bl sub_02009B04 + str r0, [r5, #0x5c] + bl sub_0200A640 + cmp r0, #0 + bne _0225FF82 + bl sub_02022974 +_0225FF82: + ldr r0, [r5, #0x5c] + bl sub_02009D4C + mov r1, #0x64 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x34] + str r6, [sp, #8] + add r1, #0xd4 + ldr r0, [r4, r1] + add r2, r7, r2 + ldr r1, [sp, #0x2c] + add r2, #0x3c + mov r3, #0 + bl sub_02009BC4 + str r0, [r5, #0x60] + mov r1, #0x64 + str r1, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r2, [sp, #0x34] + str r6, [sp, #8] + add r1, #0xd8 + ldr r0, [r4, r1] + add r2, r7, r2 + ldr r1, [sp, #0x2c] + add r2, #0x3b + mov r3, #0 + bl sub_02009BC4 + str r0, [r5, #0x64] + mov r0, #0 + add r2, sp, #0x38 + add r1, r0, #0 + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + mov r1, #0x64 + add r2, r1, #0 + str r1, [sp] + sub r2, #0x65 + str r2, [sp, #4] + str r2, [sp, #8] + str r0, [sp, #0xc] + add r2, r1, #0 + str r0, [sp, #0x10] + add r2, #0xcc + ldr r2, [r4, r2] + add r3, r1, #0 + str r2, [sp, #0x14] + add r2, r1, #0 + add r2, #0xd0 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r1, #0 + add r2, #0xd4 + ldr r2, [r4, r2] + str r2, [sp, #0x1c] + add r2, r1, #0 + add r2, #0xd8 + ldr r2, [r4, r2] + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x58 + add r2, r1, #0 + bl sub_020093B4 + ldr r0, [r4, #4] + str r0, [sp, #0x38] + add r0, sp, #0x58 + str r0, [sp, #0x3c] + mov r0, #0x10 + str r0, [sp, #0x4c] + mov r0, #2 + str r0, [sp, #0x50] + mov r0, #0xd + lsl r0, r0, #0x10 + str r0, [sp, #0x40] + mov r0, #0x66 + lsl r0, r0, #0xe + str r0, [sp, #0x44] + add r0, sp, #0x38 + str r6, [sp, #0x54] + bl sub_02021B90 + ldr r1, [sp, #0x30] + str r0, [r5, #0x54] + bl sub_02021D6C + ldr r0, [r5, #0x54] + ldr r1, [sp, #0x94] + bl sub_02021CAC + add sp, #0x7c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_0225FEF0 + + thumb_func_start ov70_02260048 +ov70_02260048: ; 0x02260048 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x54] + add r4, r1, #0 + bl sub_02021BD4 + mov r0, #0 + str r0, [r5, #0x54] + ldr r0, [r5, #0x58] + bl sub_0200A4E4 + ldr r0, [r5, #0x5c] + bl sub_0200A6DC + mov r7, #0x13 + mov r6, #0 + lsl r7, r7, #4 +_0226006A: + ldr r0, [r4, r7] + ldr r1, [r5, #0x58] + bl sub_02009D68 + add r6, r6, #1 + add r5, r5, #4 + add r4, r4, #4 + cmp r6, #4 + blt _0226006A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02260048 + + thumb_func_start ov70_02260080 +ov70_02260080: ; 0x02260080 + push {r4, r5, r6, r7, lr} + sub sp, #0x94 + add r6, r0, #0 + ldr r0, [r6, #0x68] + add r5, r1, #0 + str r3, [sp, #0x2c] + ldr r4, [sp, #0xa8] + cmp r0, #0 + beq _02260096 + bl sub_02022974 +_02260096: + ldr r1, _02260224 ; =0x0226D724 + mov r0, #0 +_0226009A: + ldrh r2, [r1] + cmp r4, r2 + bne _022600AA + ldrh r2, [r1, #2] + str r2, [sp, #0x34] + ldrh r2, [r1, #4] + str r2, [sp, #0x30] + ldrh r7, [r1, #6] +_022600AA: + add r0, r0, #1 + add r1, #8 + cmp r0, #0x12 + blo _0226009A + ldr r0, [sp, #0x34] + mov r1, #2 + add r2, sp, #0x7c + bl sub_02076AAC + mov r1, #0x65 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + add r1, #0xcb + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x7c] + ldr r2, [sp, #0x80] + mov r3, #0 + bl sub_0200985C + str r0, [r6, #0x6c] + bl sub_0200A3DC + cmp r0, #0 + bne _022600E4 + bl sub_02022974 +_022600E4: + mov r1, #0x65 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, [sp, #0x2c] + add r1, #0xcf + str r0, [sp, #0xc] + ldr r0, [r5, r1] + ldr r1, [sp, #0x7c] + ldr r2, [sp, #0x84] + mov r3, #0 + bl sub_020098B8 + str r0, [r6, #0x70] + bl sub_02009E34 + bl ov70_02260268 + ldr r0, [r6, #0x70] + bl sub_0200A640 + cmp r0, #0 + bne _0226011A + bl sub_02022974 +_0226011A: + ldr r0, [r6, #0x70] + bl sub_02009D4C + mov r1, #0x65 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + add r1, #0xd3 + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x7c] + ldr r2, [sp, #0x88] + mov r3, #0 + bl sub_02009918 + str r0, [r6, #0x74] + mov r1, #0x65 + str r1, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + add r1, #0xd7 + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x7c] + ldr r2, [sp, #0x8c] + mov r3, #0 + bl sub_02009918 + str r0, [r6, #0x78] + mov r0, #0 + add r2, sp, #0x38 + add r1, r0, #0 + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + stmia r2!, {r0, r1} + mov r1, #0x65 + add r2, r1, #0 + str r1, [sp] + sub r2, #0x66 + str r2, [sp, #4] + str r2, [sp, #8] + mov r2, #1 + str r2, [sp, #0xc] + mov r2, #3 + str r2, [sp, #0x10] + add r2, r1, #0 + add r2, #0xcb + ldr r2, [r5, r2] + add r3, r1, #0 + str r2, [sp, #0x14] + add r2, r1, #0 + add r2, #0xcf + ldr r2, [r5, r2] + str r2, [sp, #0x18] + add r2, r1, #0 + add r2, #0xd3 + ldr r2, [r5, r2] + str r2, [sp, #0x1c] + add r2, r1, #0 + add r2, #0xd7 + ldr r2, [r5, r2] + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x58 + add r2, r1, #0 + bl sub_020093B4 + ldr r0, [r5, #4] + str r0, [sp, #0x38] + add r0, sp, #0x58 + str r0, [sp, #0x3c] + mov r0, #0x20 + str r0, [sp, #0x4c] + mov r0, #2 + str r0, [sp, #0x50] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x54] + ldr r0, [sp, #0x30] + cmp r0, #0 + beq _022601D4 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _022601E2 +_022601D4: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_022601E2: + bl sub_020E1740 + str r0, [sp, #0x40] + cmp r7, #0 + beq _022601FE + lsl r0, r7, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226020C +_022601FE: + lsl r0, r7, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226020C: + bl sub_020E1740 + mov r1, #1 + lsl r1, r1, #0x14 + add r0, r0, r1 + str r0, [sp, #0x44] + add r0, sp, #0x38 + bl sub_02021B90 + str r0, [r6, #0x68] + add sp, #0x94 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02260224: .word 0x0226D724 + thumb_func_end ov70_02260080 + + thumb_func_start ov70_02260228 +ov70_02260228: ; 0x02260228 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x68] + add r4, r1, #0 + bl sub_02021F98 + bl sub_0201ED1C + ldr r0, [r5, #0x68] + bl sub_02021BD4 + mov r0, #0 + str r0, [r5, #0x68] + ldr r0, [r5, #0x6c] + bl sub_0200A4E4 + ldr r0, [r5, #0x70] + bl sub_0200A6DC + mov r7, #0x13 + mov r6, #0 + lsl r7, r7, #4 +_02260254: + ldr r0, [r4, r7] + ldr r1, [r5, #0x6c] + bl sub_02009D68 + add r6, r6, #1 + add r5, r5, #4 + add r4, r4, #4 + cmp r6, #4 + blt _02260254 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02260228 + + thumb_func_start ov70_02260268 +ov70_02260268: ; 0x02260268 + push {r4, r5, r6, r7} + ldr r1, [r0, #8] + ldr r4, [r0, #0xc] + lsr r3, r1, #1 + mov r2, #0 + cmp r3, #0 + ble _022602BC + mov r5, #0xc8 +_02260278: + ldrh r6, [r4] + mov r0, #0x1f + add r2, r2, #1 + add r1, r6, #0 + asr r7, r6, #5 + and r1, r0 + and r0, r7 + asr r7, r6, #0xa + mov r6, #0x1f + and r6, r7 + mov r7, #0x1d + mul r7, r6 + mov r6, #0x4c + mul r6, r1 + mov r1, #0x97 + mul r1, r0 + add r0, r6, r1 + add r0, r7, r0 + asr r6, r0, #8 + lsl r0, r6, #8 + add r7, r6, #0 + asr r1, r0, #8 + lsl r0, r6, #7 + mul r7, r5 + asr r0, r0, #8 + asr r6, r7, #8 + lsl r0, r0, #0xa + lsl r6, r6, #5 + orr r0, r6 + orr r0, r1 + strh r0, [r4] + add r4, r4, #2 + cmp r2, r3 + blt _02260278 +_022602BC: + pop {r4, r5, r6, r7} + bx lr + thumb_func_end ov70_02260268 + + thumb_func_start ov70_022602C0 +ov70_022602C0: ; 0x022602C0 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r0, #4 + add r6, r4, #0 +_022602C8: + add r0, r5, #0 + add r1, r6, #0 + bl sub_0201ADA4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #5 + blt _022602C8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_022602C0 + + thumb_func_start ov70_022602DC +ov70_022602DC: ; 0x022602DC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r2, #0 + add r0, r1, #0 + mov r1, #1 + add r2, r3, #0 + bl ov70_0225F288 + add r3, sp, #0x10 + add r2, r0, #0 + ldrb r0, [r3, #0x14] + mov r1, #0 + add r5, r5, #4 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x28] + str r0, [sp, #8] + str r1, [sp, #0xc] + lsl r0, r4, #4 + ldrb r3, [r3, #0x10] + add r0, r5, r0 + bl sub_0201D78C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_022602DC + + thumb_func_start ov70_02260314 +ov70_02260314: ; 0x02260314 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r4, r2, #0 + add r0, r1, #0 + mov r1, #1 + add r2, r3, #0 + bl ov70_0225F288 + add r6, r0, #0 + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + bl sub_02002D7C + add r1, sp, #0x10 + ldrb r1, [r1, #0x10] + sub r3, r1, r0 + bpl _0226033C + mov r3, #0 +_0226033C: + add r0, sp, #0x10 + ldrb r0, [r0, #0x14] + add r2, r5, #4 + mov r1, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x28] + str r0, [sp, #8] + lsl r0, r4, #4 + add r0, r2, r0 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02260314 + + thumb_func_start ov70_02260360 +ov70_02260360: ; 0x02260360 + ldr r3, _0226036C ; =sub_0201A9A4 + add r2, r0, #4 + lsl r0, r1, #4 + add r0, r2, r0 + bx r3 + nop +_0226036C: .word sub_0201A9A4 + thumb_func_end ov70_02260360 + + thumb_func_start ov70_02260370 +ov70_02260370: ; 0x02260370 + ldr r3, _0226037C ; =ov70_0225F2C8 + add r0, r1, #0 + add r1, r2, #0 + mov r2, #0 + bx r3 + nop +_0226037C: .word ov70_0225F2C8 + thumb_func_end ov70_02260370 + + thumb_func_start ov70_02260380 +ov70_02260380: ; 0x02260380 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r0, r6, #0 + add r5, r1, #0 + bl ov66_0222E880 + add r4, r0, #0 + add r0, r6, #0 + bl ov66_0222E8A4 + add r6, r0, #0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_0225F308 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + mov r3, #1 + bl ov70_0225F318 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02260380 + + thumb_func_start ov70_022603B0 +ov70_022603B0: ; 0x022603B0 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r2, #0 + mov r4, #0 +_022603B8: + ldrh r2, [r5] + add r0, r6, #0 + add r1, r4, #0 + bl ov70_0225F32C + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _022603B8 + pop {r4, r5, r6, pc} + thumb_func_end ov70_022603B0 + + thumb_func_start ov70_022603CC +ov70_022603CC: ; 0x022603CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x98 + add r7, r0, #0 + ldr r0, [sp, #0xb0] + add r5, r1, #0 + str r0, [sp, #0xb0] + mov r0, #0xc0 + add r1, r3, #0 + str r2, [sp, #0x2c] + str r3, [sp, #0x30] + bl sub_02006C24 + str r0, [sp, #0x50] + ldr r0, [sp, #0xb4] + bl ov66_0222E798 + str r0, [sp, #0x44] + ldr r0, [sp, #0xb4] + bl ov66_0222E7C8 + str r0, [sp, #0x4c] + ldr r0, _0226067C ; =0x0226D60C + mov r6, #0 + str r0, [sp, #0x40] + ldr r0, _02260680 ; =0x0226D59C + add r4, r7, #0 + str r0, [sp, #0x3c] + ldr r0, _02260684 ; =0x0226D594 + str r0, [sp, #0x38] +_02260406: + cmp r6, #2 + bne _02260426 + ldr r0, [sp, #0x4c] + cmp r0, #1 + bne _02260446 + add r1, r4, #0 + add r1, #0xac + mov r0, #0 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xfc + str r0, [r1, #0] + b _022604EC +_02260426: + cmp r6, #3 + bne _02260446 + ldr r0, [sp, #0x4c] + cmp r0, #0 + bne _02260446 + add r1, r4, #0 + add r1, #0xac + mov r0, #0 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xfc + str r0, [r1, #0] + b _022604EC +_02260446: + ldr r0, [sp, #0x40] + ldrh r0, [r0] + cmp r0, #0xc0 + bne _02260454 + ldr r0, [sp, #0x50] + str r0, [sp, #0x34] + b _02260458 +_02260454: + ldr r0, [sp, #0x2c] + str r0, [sp, #0x34] +_02260458: + add r0, r6, #0 + add r0, #0x96 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x40] + ldr r2, [sp, #0x40] + ldrh r0, [r0, #4] + ldr r1, [sp, #0x34] + mov r3, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x30] + str r0, [sp, #0xc] + mov r0, #0x4d + lsl r0, r0, #2 + ldrh r2, [r2, #2] + ldr r0, [r5, r0] + bl sub_02009B04 + add r1, r4, #0 + add r1, #0xac + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_0200A640 + cmp r0, #0 + bne _02260496 + bl sub_02022974 +_02260496: + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_02009D4C + add r0, r6, #0 + add r0, #0x96 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x3c] + str r0, [sp, #8] + mov r0, #0x4e + lsl r0, r0, #2 + ldrh r2, [r2] + ldr r0, [r5, r0] + ldr r1, [sp, #0x34] + mov r3, #0 + bl sub_02009BC4 + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + add r0, r6, #0 + add r0, #0x96 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x38] + str r0, [sp, #8] + mov r0, #0x4f + lsl r0, r0, #2 + ldrh r2, [r2] + ldr r0, [r5, r0] + ldr r1, [sp, #0x34] + mov r3, #0 + bl sub_02009BC4 + add r1, r4, #0 + add r1, #0xfc + str r0, [r1, #0] +_022604EC: + ldr r0, [sp, #0x40] + add r6, r6, #1 + add r0, r0, #6 + str r0, [sp, #0x40] + ldr r0, [sp, #0x3c] + add r4, r4, #4 + add r0, r0, #2 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x38] + add r0, r0, #2 + str r0, [sp, #0x38] + cmp r6, #4 + bge _02260508 + b _02260406 +_02260508: + ldr r0, _02260688 ; =0x0226D7B4 + mov r6, #0 + str r0, [sp, #0x48] +_0226050E: + ldr r0, [sp, #0xb0] + add r1, r6, #0 + bl ov66_0222E728 + add r4, r0, #0 + ldr r0, [sp, #0xb0] + add r1, r6, #0 + bl ov66_0222E760 + add r1, r0, #0 + cmp r4, #0x18 + bne _02260532 + add r1, r7, #0 + add r1, #0xbc + mov r0, #0 + str r0, [r1, #0] + str r0, [r7, #0x7c] + b _02260660 +_02260532: + ldr r2, [sp, #0x44] + ldr r3, [sp, #0x4c] + add r0, r4, #0 + bl ov70_02260728 + add r4, r0, #0 + ldrb r0, [r4] + cmp r0, #1 + bne _02260548 + ldr r1, [sp, #0x2c] + b _0226054A +_02260548: + ldr r1, [sp, #0x50] +_0226054A: + add r0, r6, #0 + add r0, #0x96 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + mov r3, #0 + str r0, [sp, #8] + mov r0, #0x13 + lsl r0, r0, #4 + ldrh r2, [r4, #2] + ldr r0, [r5, r0] + bl sub_02009A4C + add r1, r7, #0 + add r1, #0xbc + str r0, [r1, #0] + add r0, r7, #0 + add r0, #0xbc + ldr r0, [r0, #0] + bl sub_0200A3DC + cmp r0, #0 + bne _0226057E + bl sub_02022974 +_0226057E: + add r0, r7, #0 + add r0, #0xbc + ldr r0, [r0, #0] + bl sub_02009D4C + ldrb r2, [r4] + mov r0, #0 + mvn r0, r0 + add r2, #0x96 + str r2, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0x13 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r6, #0 + str r0, [sp, #0x14] + mov r0, #0x4d + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, #0x96 + str r0, [sp, #0x18] + mov r0, #0x4e + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r3, r2, #0 + str r0, [sp, #0x1c] + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0x54 + bl sub_020093B4 + ldr r0, [r5, #4] + ldr r2, [sp, #0x48] + str r0, [sp, #0x78] + add r0, sp, #0x54 + str r0, [sp, #0x7c] + mov r0, #0 + str r0, [sp, #0x8c] + mov r0, #2 + str r0, [sp, #0x90] + ldr r0, [sp, #0x30] + add r3, sp, #0x80 + str r0, [sp, #0x94] + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + mov r0, #4 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _02260608 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _02260616 +_02260608: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_02260616: + bl sub_020E1740 + ldr r1, [sp, #0x80] + add r0, r1, r0 + str r0, [sp, #0x80] + mov r0, #6 + ldrsh r0, [r4, r0] + cmp r0, #0 + ble _0226063A + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _02260648 +_0226063A: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_02260648: + bl sub_020E1740 + ldr r1, [sp, #0x84] + add r0, r1, r0 + str r0, [sp, #0x84] + add r0, sp, #0x78 + bl sub_02021B90 + str r0, [r7, #0x7c] + ldrb r1, [r4, #1] + bl sub_02021F24 +_02260660: + ldr r0, [sp, #0x48] + add r6, r6, #1 + add r0, #0xc + add r7, r7, #4 + str r0, [sp, #0x48] + cmp r6, #0xc + bge _02260670 + b _0226050E +_02260670: + ldr r0, [sp, #0x50] + bl sub_02006CA8 + add sp, #0x98 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226067C: .word 0x0226D60C +_02260680: .word 0x0226D59C +_02260684: .word 0x0226D594 +_02260688: .word 0x0226D7B4 + thumb_func_end ov70_022603CC + + thumb_func_start ov70_0226068C +ov70_0226068C: ; 0x0226068C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r7, #0 + add r4, r5, #0 +_02260696: + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + cmp r0, #0 + beq _022606CC + ldr r0, [r4, #0x7c] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0x7c] + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + bl sub_0200A4E4 + mov r0, #0x13 + add r1, r4, #0 + lsl r0, r0, #4 + add r1, #0xbc + ldr r0, [r6, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + add r1, r4, #0 + add r1, #0xbc + mov r0, #0 + str r0, [r1, #0] +_022606CC: + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #0xc + blt _02260696 + mov r4, #0 + add r7, r4, #0 +_022606D8: + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r0, #0 + beq _0226071C + bl sub_0200A6DC + mov r0, #0x4d + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xac + ldr r0, [r6, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x4e + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xec + ldr r0, [r6, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + mov r0, #0x4f + add r1, r5, #0 + lsl r0, r0, #2 + add r1, #0xfc + ldr r0, [r6, r0] + ldr r1, [r1, #0] + bl sub_02009D68 + add r0, r5, #0 + add r0, #0xac + str r7, [r0, #0] +_0226071C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _022606D8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226068C + + thumb_func_start ov70_02260728 +ov70_02260728: ; 0x02260728 + cmp r1, r2 + bne _02260734 + ldr r1, _0226073C ; =0x0226D5FC + lsl r0, r3, #3 + add r0, r1, r0 + bx lr +_02260734: + ldr r1, _02260740 ; =0x0226D844 + lsl r0, r0, #3 + add r0, r1, r0 + bx lr + ; .align 2, 0 +_0226073C: .word 0x0226D5FC +_02260740: .word 0x0226D844 + thumb_func_end ov70_02260728 + + thumb_func_start ov70_02260744 +ov70_02260744: ; 0x02260744 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #4] + ldr r0, [r1, #0] + ldr r1, [sp, #4] + str r2, [sp, #8] + ldr r2, _0226079C ; =0x0226D5A4 + add r1, #0xc + add r7, r3, #0 + bl sub_0201A8D4 + ldr r4, [sp, #4] + ldr r5, [sp, #4] + mov r6, #0 + add r4, #0x2c +_02260762: + add r1, r6, #0 + ldr r0, [sp, #8] + add r1, #0x38 + mov r2, #0 + add r3, r4, #0 + str r7, [sp] + bl sub_020071D0 + str r0, [r5, #0x20] + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #3 + blt _02260762 + ldr r0, _022607A0 ; =0x0226D58C + ldr r2, _022607A4 ; =ov70_02260A50 + ldr r3, [sp, #4] + mov r1, #1 + str r7, [sp] + bl sub_02023FCC + ldr r1, [sp, #4] + str r0, [r1, #0x1c] + ldr r0, [sp, #4] + mov r1, #1 + strh r1, [r0, #6] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226079C: .word 0x0226D5A4 +_022607A0: .word 0x0226D58C +_022607A4: .word ov70_02260A50 + thumb_func_end ov70_02260744 + + thumb_func_start ov70_022607A8 +ov70_022607A8: ; 0x022607A8 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0x1c] + bl sub_02024034 + add r0, r6, #0 + add r0, #0xc + bl sub_0201A8FC + mov r4, #0 + add r5, r6, #0 +_022607BE: + ldr r0, [r5, #0x20] + bl sub_020181C4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _022607BE + mov r0, #0 + strb r0, [r6, #2] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_022607A8 + + thumb_func_start ov70_022607D4 +ov70_022607D4: ; 0x022607D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #4] + ldrh r0, [r5, #6] + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + cmp r0, #0 + bne _022607F2 + ldr r0, [r5, #0x1c] + bl sub_0202404C + b _022607F6 +_022607F2: + mov r0, #1 + strb r0, [r5, #3] +_022607F6: + ldrb r0, [r5, #2] + cmp r0, #1 + bne _02260812 + mov r2, #0 + ldrsh r0, [r5, r2] + cmp r0, #0 + bne _02260812 + strb r2, [r5, #2] + add r0, r5, #0 + add r1, r6, #0 + add r3, r7, #0 + str r4, [sp] + bl ov70_022609D4 +_02260812: + ldrb r1, [r5, #3] + ldrh r0, [r5, #4] + cmp r1, r0 + beq _02260868 + strh r1, [r5, #4] + ldrb r0, [r5, #3] + cmp r0, #2 + bne _02260832 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + add r3, r7, #0 + str r4, [sp] + bl ov70_022609D4 + b _02260854 +_02260832: + ldrb r0, [r5, #2] + cmp r0, #0 + str r4, [sp] + bne _02260848 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + add r3, r7, #0 + bl ov70_022609D4 + b _02260854 +_02260848: + add r0, r5, #0 + add r1, r6, #0 + mov r2, #2 + add r3, r7, #0 + bl ov70_022609D4 +_02260854: + ldrb r0, [r5, #2] + cmp r0, #0 + bne _02260868 + ldrb r0, [r5, #3] + cmp r0, #2 + bne _02260868 + mov r0, #1 + strb r0, [r5, #2] + str r0, [sp, #4] + strh r0, [r5] +_02260868: + ldr r0, [sp, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_022607D4 + + thumb_func_start ov70_02260870 +ov70_02260870: ; 0x02260870 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r6, r1, #0 + ldr r4, [sp, #0x34] + str r0, [sp, #8] + ldr r7, [sp, #0x30] + str r3, [sp, #0x14] + str r4, [sp, #0xc] + str r2, [sp, #0x10] + ldr r2, [r6, #0] + add r0, r7, #0 + mov r1, #0x37 + mov r3, #4 + bl sub_0200710C + mov r0, #0 + strh r0, [r5, #8] + ldr r0, [sp, #0x14] + bl ov66_0222E8C4 + strh r0, [r5, #0xa] + mov r0, #5 + lsl r0, r0, #6 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldrh r1, [r5, #0xa] + ldr r2, [r6, #0] + add r0, r7, #0 + mov r3, #6 + bl sub_020070E8 + mov r0, #5 + lsl r0, r0, #6 + str r0, [sp] + str r4, [sp, #4] + ldrh r2, [r5, #0xa] + add r0, r6, #0 + add r1, r7, #0 + add r2, #0x1b + mov r3, #6 + bl ov70_0225FA14 + ldr r0, [sp, #0x10] + mov r1, #1 + mov r2, #0x3f + bl ov70_0225F288 + str r0, [sp, #0x18] + add r0, r5, #0 + add r0, #0xc + mov r1, #0 + bl sub_0201ADA4 + mov r0, #4 + str r0, [sp] + mov r1, #0 + ldr r0, _0226092C ; =0x000F0E00 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + ldr r2, [sp, #0x18] + str r1, [sp, #0xc] + add r0, #0xc + add r3, r1, #0 + bl sub_0201D78C + ldrb r0, [r5, #2] + cmp r0, #0 + str r4, [sp] + bne _0226091A + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + add r3, r7, #0 + bl ov70_022609D4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} +_0226091A: + add r0, r5, #0 + add r1, r6, #0 + mov r2, #2 + add r3, r7, #0 + bl ov70_022609D4 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0226092C: .word 0x000F0E00 + thumb_func_end ov70_02260870 + + thumb_func_start ov70_02260930 +ov70_02260930: ; 0x02260930 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r2, #0 + add r5, r0, #0 + add r6, r1, #0 + str r3, [sp, #0x10] + ldr r4, [sp, #0x28] + cmp r7, #3 + blo _02260946 + bl sub_02022974 +_02260946: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldr r0, [sp, #0x10] + ldr r2, [r6, #0] + mov r1, #0x37 + mov r3, #4 + bl sub_0200710C + mov r0, #1 + strh r0, [r5, #8] + mov r0, #5 + strh r7, [r5, #0xa] + lsl r0, r0, #6 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldrh r1, [r5, #0xa] + ldr r0, [sp, #0x10] + ldr r2, [r6, #0] + add r1, #0x5d + mov r3, #6 + bl sub_020070E8 + ldrb r0, [r5, #2] + cmp r0, #0 + str r4, [sp] + bne _02260996 + ldr r3, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + bl ov70_022609D4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_02260996: + ldr r3, [sp, #0x10] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #2 + bl ov70_022609D4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02260930 + + thumb_func_start ov70_022609A8 +ov70_022609A8: ; 0x022609A8 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0] + mov r1, #4 + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #5 + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #6 + bl sub_02019EBC + ldr r0, [r4, #0] + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_022609A8 + + thumb_func_start ov70_022609D4 +ov70_022609D4: ; 0x022609D4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0x20 + add r4, r1, #0 + add r6, r2, #0 + str r0, [sp] + mov r1, #0x15 + str r1, [sp, #4] + lsl r1, r6, #2 + add r1, r5, r1 + ldr r1, [r1, #0x2c] + add r7, r3, #0 + add r1, #0xc + str r1, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r3, #3 + str r3, [sp, #0x10] + str r0, [sp, #0x14] + str r0, [sp, #0x18] + ldr r0, [r4, #0] + mov r1, #5 + bl sub_020198E8 + ldr r0, [r4, #0] + mov r1, #5 + bl sub_0201C3C0 + ldrh r0, [r5, #8] + cmp r0, #1 + bne _02260A34 + mov r0, #5 + lsl r0, r0, #6 + str r0, [sp] + ldr r0, [sp, #0x30] + ldr r2, _02260A48 ; =0x0226D584 + str r0, [sp, #4] + ldrh r3, [r5, #0xa] + ldrb r2, [r2, r6] + add r0, r4, #0 + lsl r3, r3, #1 + add r2, r2, r3 + add r1, r7, #0 + add r2, #0x60 + mov r3, #6 + bl ov70_0225FA14 +_02260A34: + ldr r3, _02260A4C ; =0x0226D588 + ldr r0, [r4, #0] + ldrsb r3, [r3, r6] + mov r1, #6 + mov r2, #3 + bl sub_0201C63C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_02260A48: .word 0x0226D584 +_02260A4C: .word 0x0226D588 + thumb_func_end ov70_022609D4 + + thumb_func_start ov70_02260A50 +ov70_02260A50: ; 0x02260A50 + strb r1, [r2, #3] + ldrb r0, [r2, #3] + cmp r0, #0 + bne _02260A5E + mov r0, #2 + strb r0, [r2, #3] + bx lr +_02260A5E: + cmp r0, #3 + bne _02260A66 + mov r0, #1 + strb r0, [r2, #3] +_02260A66: + bx lr + thumb_func_end ov70_02260A50 + + thumb_func_start ov70_02260A68 +ov70_02260A68: ; 0x02260A68 + mov r1, #0 + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02260A68 + + .rodata + + + .global Unk_ov70_0226D580 +Unk_ov70_0226D580: ; 0x0226D580 + .incbin "incbin/overlay70_rodata.bin", 0xB4, 0xB8 - 0xB4 + + .global Unk_ov70_0226D584 +Unk_ov70_0226D584: ; 0x0226D584 + .incbin "incbin/overlay70_rodata.bin", 0xB8, 0xBC - 0xB8 + + .global Unk_ov70_0226D588 +Unk_ov70_0226D588: ; 0x0226D588 + .incbin "incbin/overlay70_rodata.bin", 0xBC, 0xC0 - 0xBC + + .global Unk_ov70_0226D58C +Unk_ov70_0226D58C: ; 0x0226D58C + .incbin "incbin/overlay70_rodata.bin", 0xC0, 0xC4 - 0xC0 + + .global Unk_ov70_0226D590 +Unk_ov70_0226D590: ; 0x0226D590 + .incbin "incbin/overlay70_rodata.bin", 0xC4, 0xC8 - 0xC4 + + .global Unk_ov70_0226D594 +Unk_ov70_0226D594: ; 0x0226D594 + .incbin "incbin/overlay70_rodata.bin", 0xC8, 0xD0 - 0xC8 + + .global Unk_ov70_0226D59C +Unk_ov70_0226D59C: ; 0x0226D59C + .incbin "incbin/overlay70_rodata.bin", 0xD0, 0xD8 - 0xD0 + + .global Unk_ov70_0226D5A4 +Unk_ov70_0226D5A4: ; 0x0226D5A4 + .incbin "incbin/overlay70_rodata.bin", 0xD8, 0xE0 - 0xD8 + + .global Unk_ov70_0226D5AC +Unk_ov70_0226D5AC: ; 0x0226D5AC + .incbin "incbin/overlay70_rodata.bin", 0xE0, 0xF0 - 0xE0 + + .global Unk_ov70_0226D5BC +Unk_ov70_0226D5BC: ; 0x0226D5BC + .incbin "incbin/overlay70_rodata.bin", 0xF0, 0x100 - 0xF0 + + .global Unk_ov70_0226D5CC +Unk_ov70_0226D5CC: ; 0x0226D5CC + .incbin "incbin/overlay70_rodata.bin", 0x100, 0x110 - 0x100 + + .global Unk_ov70_0226D5DC +Unk_ov70_0226D5DC: ; 0x0226D5DC + .incbin "incbin/overlay70_rodata.bin", 0x110, 0x120 - 0x110 + + .global Unk_ov70_0226D5EC +Unk_ov70_0226D5EC: ; 0x0226D5EC + .incbin "incbin/overlay70_rodata.bin", 0x120, 0x130 - 0x120 + + .global Unk_ov70_0226D5FC +Unk_ov70_0226D5FC: ; 0x0226D5FC + .incbin "incbin/overlay70_rodata.bin", 0x130, 0x140 - 0x130 + + .global Unk_ov70_0226D60C +Unk_ov70_0226D60C: ; 0x0226D60C + .incbin "incbin/overlay70_rodata.bin", 0x140, 0x158 - 0x140 + + .global Unk_ov70_0226D624 +Unk_ov70_0226D624: ; 0x0226D624 + .incbin "incbin/overlay70_rodata.bin", 0x158, 0x178 - 0x158 + + .global Unk_ov70_0226D644 +Unk_ov70_0226D644: ; 0x0226D644 + .incbin "incbin/overlay70_rodata.bin", 0x178, 0x198 - 0x178 + + .global Unk_ov70_0226D664 +Unk_ov70_0226D664: ; 0x0226D664 + .incbin "incbin/overlay70_rodata.bin", 0x198, 0x1C0 - 0x198 + + .global Unk_ov70_0226D68C +Unk_ov70_0226D68C: ; 0x0226D68C + .incbin "incbin/overlay70_rodata.bin", 0x1C0, 0x1E8 - 0x1C0 + + .global Unk_ov70_0226D6B4 +Unk_ov70_0226D6B4: ; 0x0226D6B4 + .incbin "incbin/overlay70_rodata.bin", 0x1E8, 0x258 - 0x1E8 + + .global Unk_ov70_0226D724 +Unk_ov70_0226D724: ; 0x0226D724 + .incbin "incbin/overlay70_rodata.bin", 0x258, 0x2E8 - 0x258 + + .global Unk_ov70_0226D7B4 +Unk_ov70_0226D7B4: ; 0x0226D7B4 + .incbin "incbin/overlay70_rodata.bin", 0x2E8, 0x378 - 0x2E8 + + .global Unk_ov70_0226D844 +Unk_ov70_0226D844: ; 0x0226D844 + .incbin "incbin/overlay70_rodata.bin", 0x378, 0xC0 + diff --git a/asm/ov70_02260A70.s b/asm/ov70_02260A70.s new file mode 100644 index 000000000..4982945cc --- /dev/null +++ b/asm/ov70_02260A70.s @@ -0,0 +1,139 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02260A70 +ov70_02260A70: ; 0x02260A70 + push {r4, r5, lr} + sub sp, #0xc + mov r1, #0x14 + add r5, r0, #0 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x14 + mov r0, #0 +_02260A84: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _02260A84 + add r0, r5, #0 + bl sub_020203AC + str r0, [r4, #0] + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r1, _02260AC8 ; =0x0029AEC1 + str r0, [sp, #8] + add r0, r4, #0 + ldr r2, _02260ACC ; =0x0226D904 + ldr r3, _02260AD0 ; =0x000005C1 + add r0, #8 + bl sub_020206D0 + ldr r0, [r4, #0] + bl sub_020203D4 + mov r0, #0x96 + mov r1, #0xe1 + ldr r2, [r4, #0] + lsl r0, r0, #0xc + lsl r1, r1, #0xe + bl sub_020206BC + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02260AC8: .word 0x0029AEC1 +_02260ACC: .word 0x0226D904 +_02260AD0: .word 0x000005C1 + thumb_func_end ov70_02260A70 + + thumb_func_start ov70_02260AD4 +ov70_02260AD4: ; 0x02260AD4 + push {r4, lr} + add r4, r0, #0 + bl sub_020203E0 + ldr r0, [r4, #0] + bl sub_020203B8 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02260AD4 + + thumb_func_start ov70_02260AEC +ov70_02260AEC: ; 0x02260AEC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _02260B10 + add r1, r4, #0 + add r1, #8 + bl ov70_0225D054 + mov r0, #2 + ldr r1, [r4, #8] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [r4, #8] + ldr r1, [r4, #0x10] + lsl r0, r0, #2 + sub r0, r1, r0 + str r0, [r4, #0x10] +_02260B10: + bl sub_020203EC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02260AEC + + thumb_func_start ov70_02260B18 +ov70_02260B18: ; 0x02260B18 + str r1, [r0, #8] + str r2, [r0, #0xc] + str r3, [r0, #0x10] + bx lr + thumb_func_end ov70_02260B18 + + thumb_func_start ov70_02260B20 +ov70_02260B20: ; 0x02260B20 + push {r3, r4} + mov r4, #2 + lsl r4, r4, #0xe + add r1, r1, r4 + str r1, [r0, #8] + lsl r1, r4, #2 + str r2, [r0, #0xc] + sub r1, r3, r1 + str r1, [r0, #0x10] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov70_02260B20 + + thumb_func_start ov70_02260B38 +ov70_02260B38: ; 0x02260B38 + str r1, [r0, #4] + bx lr + thumb_func_end ov70_02260B38 + + thumb_func_start ov70_02260B3C +ov70_02260B3C: ; 0x02260B3C + mov r1, #0 + str r1, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02260B3C + + .rodata + + + .global Unk_ov70_0226D904 +Unk_ov70_0226D904: ; 0x0226D904 + .incbin "incbin/overlay70_rodata.bin", 0x438, 0x8 + diff --git a/asm/ov70_02260B44.s b/asm/ov70_02260B44.s new file mode 100644 index 000000000..80af79d82 --- /dev/null +++ b/asm/ov70_02260B44.s @@ -0,0 +1,2633 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02260B44 +ov70_02260B44: ; 0x02260B44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r1, #0 + add r5, r0, #0 + ldr r1, _02260BB4 ; =0x000004A4 + add r0, r2, #0 + str r2, [sp] + bl sub_02018144 + ldr r2, _02260BB4 ; =0x000004A4 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0xb4 + mul r0, r5 + str r0, [sp, #4] + ldr r0, [sp] + ldr r1, [sp, #4] + bl sub_02018144 + mov r1, #0x47 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xe4 + add r7, r6, #0 + mul r7, r0 + ldr r0, [sp] + add r1, r7, #0 + bl sub_02018144 + mov r1, #0x12 + lsl r1, r1, #4 + str r0, [r4, r1] + sub r0, r1, #4 + ldr r0, [r4, r0] + ldr r2, [sp, #4] + mov r1, #0 + bl sub_020D5124 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + add r2, r7, #0 + bl sub_020D5124 + mov r0, #0x49 + lsl r0, r0, #2 + strb r5, [r4, r0] + add r0, r0, #1 + strb r6, [r4, r0] + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02260BB4: .word 0x000004A4 + thumb_func_end ov70_02260B44 + + thumb_func_start ov70_02260BB8 +ov70_02260BB8: ; 0x02260BB8 + push {r4, lr} + mov r1, #0x4a + add r4, r0, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + beq _02260BCA + bl ov70_02260D80 +_02260BCA: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02260BB8 + + thumb_func_start ov70_02260BE8 +ov70_02260BE8: ; 0x02260BE8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x4b + add r5, r0, #0 + lsl r1, r1, #2 + add r1, r5, r1 + bl ov70_022616B0 + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + ble _02260C24 + mov r7, #0x71 + add r6, r4, #0 + lsl r7, r7, #2 +_02260C08: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r5, r7 + add r0, r0, r6 + bl ov70_02261968 + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + add r4, r4, #1 + add r6, #0xb4 + cmp r4, r0 + blt _02260C08 +_02260C24: + ldr r0, _02260C4C ; =0x00000125 + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _02260C4A + ldr r7, _02260C4C ; =0x00000125 + add r4, r6, #0 +_02260C32: + mov r1, #0x12 + lsl r1, r1, #4 + ldr r1, [r5, r1] + add r0, r5, #0 + add r1, r1, r4 + bl ov70_02261C60 + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, #0xe4 + cmp r6, r0 + blt _02260C32 +_02260C4A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02260C4C: .word 0x00000125 + thumb_func_end ov70_02260BE8 + + thumb_func_start ov70_02260C50 +ov70_02260C50: ; 0x02260C50 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bne _02260C5A + bl sub_02022974 +_02260C5A: + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + bne _02260C68 + bl sub_02022974 +_02260C68: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _02260C76 + bl sub_02022974 +_02260C76: + mov r1, #0x4b + lsl r1, r1, #2 + add r0, r5, #0 + add r1, r5, r1 + bl ov70_022616FC + ldr r0, _02260CDC ; =0x00000125 + mov r4, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _02260CAC + mov r7, #0xa7 + add r6, r4, #0 + lsl r7, r7, #2 +_02260C92: + mov r1, #0x12 + lsl r1, r1, #4 + ldr r1, [r5, r1] + add r0, r5, r7 + add r1, r1, r6 + bl ov70_02261C04 + ldr r0, _02260CDC ; =0x00000125 + add r4, r4, #1 + ldrb r0, [r5, r0] + add r6, #0xe4 + cmp r4, r0 + blt _02260C92 +_02260CAC: + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + ble _02260CDA + mov r7, #0x71 + add r6, r4, #0 + lsl r7, r7, #2 +_02260CBE: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r5, r7 + add r0, r0, r6 + bl ov70_022619F4 + mov r0, #0x49 + lsl r0, r0, #2 + ldrb r0, [r5, r0] + add r4, r4, #1 + add r6, #0xb4 + cmp r4, r0 + blt _02260CBE +_02260CDA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02260CDC: .word 0x00000125 + thumb_func_end ov70_02260C50 + + thumb_func_start ov70_02260CE0 +ov70_02260CE0: ; 0x02260CE0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_02260CE0 + + thumb_func_start ov70_02260CE4 +ov70_02260CE4: ; 0x02260CE4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02260D78 ; =0x00000127 + add r7, r3, #0 + strb r2, [r5, r0] + sub r0, r0, #1 + strb r1, [r5, r0] + add r0, r1, #0 + add r1, r2, #0 + add r2, r7, #0 + ldr r4, [sp, #0x18] + bl ov70_022613F4 + add r6, r0, #0 + mov r0, #0xaf + add r1, r7, #0 + bl sub_02006C24 + add r7, r0, #0 + ldr r0, _02260D7C ; =0x00000494 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #4 + bl sub_020182CC + ldr r0, _02260D7C ; =0x00000494 + add r1, r7, #0 + add r0, r5, r0 + str r0, [sp] + mov r0, #0x4b + lsl r0, r0, #2 + add r0, r5, r0 + add r2, r6, #0 + add r3, r4, #0 + bl ov70_022614F4 + mov r0, #0xa7 + ldr r2, _02260D7C ; =0x00000494 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r7, #0 + add r2, r5, r2 + add r3, r6, #0 + str r4, [sp] + bl ov70_02261B24 + mov r0, #0x71 + ldr r2, _02260D7C ; =0x00000494 + lsl r0, r0, #2 + add r0, r5, r0 + add r1, r7, #0 + add r2, r5, r2 + add r3, r6, #0 + str r4, [sp] + bl ov70_0226174C + add r0, r7, #0 + bl sub_02006CA8 + add r0, r6, #0 + bl ov70_02261418 + mov r1, #0x4b + lsl r1, r1, #2 + add r0, r5, #0 + add r1, r5, r1 + bl ov70_022615E8 + mov r0, #0x4a + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + pop {r3, r4, r5, r6, r7, pc} + nop +_02260D78: .word 0x00000127 +_02260D7C: .word 0x00000494 + thumb_func_end ov70_02260CE4 + + thumb_func_start ov70_02260D80 +ov70_02260D80: ; 0x02260D80 + push {r4, lr} + mov r1, #0x4b + add r4, r0, #0 + lsl r1, r1, #2 + add r1, r4, r1 + bl ov70_02261664 + mov r0, #0x4b + ldr r1, _02260DC4 ; =0x00000494 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, r1 + bl ov70_022615A4 + mov r0, #0xa7 + ldr r1, _02260DC4 ; =0x00000494 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, r1 + bl ov70_02261BB4 + mov r0, #0x71 + ldr r1, _02260DC4 ; =0x00000494 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, r1 + bl ov70_022618C8 + mov r0, #0x4a + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} + nop +_02260DC4: .word 0x00000494 + thumb_func_end ov70_02260D80 + + thumb_func_start ov70_02260DC8 +ov70_02260DC8: ; 0x02260DC8 + push {r3, lr} + mov r2, #7 + add r1, r0, #0 + lsl r2, r2, #6 + ldr r0, [r1, r2] + cmp r0, #1 + bne _02260DF2 + add r0, r2, #0 + sub r0, #0xbc + ldr r0, [r1, r0] + cmp r0, #0 + bne _02260DF2 + add r0, r2, #0 + mov r3, #1 + sub r0, #0xbc + str r3, [r1, r0] + sub r2, #0x24 + add r0, r1, #4 + add r1, r1, r2 + bl sub_0201727C +_02260DF2: + pop {r3, pc} + thumb_func_end ov70_02260DC8 + + thumb_func_start ov70_02260DF4 +ov70_02260DF4: ; 0x02260DF4 + push {r4, lr} + mov r1, #7 + add r4, r0, #0 + lsl r1, r1, #6 + ldr r0, [r4, r1] + cmp r0, #1 + bne _02260E1E + add r0, r1, #0 + sub r0, #0xbc + ldr r0, [r4, r0] + cmp r0, #1 + bne _02260E1E + sub r1, #0x24 + add r0, r4, #4 + add r1, r4, r1 + bl sub_02017288 + mov r0, #0x41 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_02260E1E: + pop {r4, pc} + thumb_func_end ov70_02260DF4 + + thumb_func_start ov70_02260E20 +ov70_02260E20: ; 0x02260E20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r7, r0, #0 + add r6, r2, #0 + str r3, [sp] + cmp r5, #2 + ble _02260E34 + bl sub_02022974 +_02260E34: + cmp r6, #3 + ble _02260E3C + bl sub_02022974 +_02260E3C: + add r0, r7, #0 + bl ov70_02261718 + mov r1, #0x71 + lsl r1, r1, #2 + add r4, r0, #0 + add r2, r7, r1 + lsl r1, r5, #4 + add r0, r4, #4 + add r1, r2, r1 + bl sub_02017258 + add r0, r4, #4 + mov r1, #1 + bl sub_02017348 + ldr r1, [sp] + add r0, r4, #0 + bl ov70_02260EA0 + add r1, sp, #4 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + bl ov70_02260EE4 + strb r6, [r4, #1] + add r0, r4, #0 + strb r5, [r4, #2] + mov r1, #1 + strb r1, [r4] + str r1, [r4, #0x7c] + add r0, #0x84 + str r1, [r0, #0] + add r0, r4, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02260E20 + + thumb_func_start ov70_02260E8C +ov70_02260E8C: ; 0x02260E8C + push {r4, lr} + add r4, r0, #0 + add r0, r4, #4 + mov r1, #0 + bl sub_02017348 + mov r0, #0 + strb r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02260E8C + + thumb_func_start ov70_02260EA0 +ov70_02260EA0: ; 0x02260EA0 + push {r4, lr} + add r3, r0, #0 + add r4, r1, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + add r2, #0x9c + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + add r1, r3, #0 + str r0, [r2, #0] + add r1, #0x9c + ldr r2, [r1, #0] + add r1, r3, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + add r0, r3, #4 + add r1, r2, r1 + add r2, r3, #0 + add r2, #0xa0 + ldr r4, [r2, #0] + add r2, r3, #0 + add r2, #0xac + ldr r2, [r2, #0] + add r2, r4, r2 + add r4, r3, #0 + add r4, #0xa4 + add r3, #0xb0 + ldr r4, [r4, #0] + ldr r3, [r3, #0] + add r3, r4, r3 + bl sub_02017350 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02260EA0 + + thumb_func_start ov70_02260EE4 +ov70_02260EE4: ; 0x02260EE4 + push {r4, lr} + add r3, r0, #0 + add r4, r1, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + add r2, #0xa8 + stmia r2!, {r0, r1} + ldr r0, [r4, #0] + add r1, r3, #0 + str r0, [r2, #0] + add r1, #0x9c + ldr r2, [r1, #0] + add r1, r3, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + add r0, r3, #4 + add r1, r2, r1 + add r2, r3, #0 + add r2, #0xa0 + ldr r4, [r2, #0] + add r2, r3, #0 + add r2, #0xac + ldr r2, [r2, #0] + add r2, r4, r2 + add r4, r3, #0 + add r4, #0xa4 + add r3, #0xb0 + ldr r4, [r4, #0] + ldr r3, [r3, #0] + add r3, r4, r3 + bl sub_02017350 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02260EE4 + + thumb_func_start ov70_02260F28 +ov70_02260F28: ; 0x02260F28 + push {r3, lr} + add r3, r1, #0 + add r0, r0, #4 + add r2, r1, #4 + add r3, #8 + bl sub_02017358 + pop {r3, pc} + thumb_func_end ov70_02260F28 + + thumb_func_start ov70_02260F38 +ov70_02260F38: ; 0x02260F38 + ldr r3, _02260F40 ; =sub_02017348 + add r0, r0, #4 + bx r3 + nop +_02260F40: .word sub_02017348 + thumb_func_end ov70_02260F38 + + thumb_func_start ov70_02260F44 +ov70_02260F44: ; 0x02260F44 + add r1, r0, #0 + add r1, #0x80 + ldr r1, [r1, #0] + cmp r1, #0 + bne _02260F58 + mov r1, #1 + add r0, #0x80 + str r1, [r0, #0] + add r0, r1, #0 + bx lr +_02260F58: + mov r0, #0 + bx lr + thumb_func_end ov70_02260F44 + + thumb_func_start ov70_02260F5C +ov70_02260F5C: ; 0x02260F5C + add r1, r0, #0 + add r1, #0x88 + ldr r1, [r1, #0] + cmp r1, #0 + bne _02260F70 + mov r1, #1 + add r0, #0x88 + str r1, [r0, #0] + add r0, r1, #0 + bx lr +_02260F70: + mov r0, #0 + bx lr + thumb_func_end ov70_02260F5C + + thumb_func_start ov70_02260F74 +ov70_02260F74: ; 0x02260F74 + ldr r3, _02260F7C ; =sub_02017388 + add r0, r0, #4 + mov r2, #0 + bx r3 + ; .align 2, 0 +_02260F7C: .word sub_02017388 + thumb_func_end ov70_02260F74 + + thumb_func_start ov70_02260F80 +ov70_02260F80: ; 0x02260F80 + add r0, #0x80 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02260F80 + + thumb_func_start ov70_02260F88 +ov70_02260F88: ; 0x02260F88 + add r0, #0x88 + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02260F88 + + thumb_func_start ov70_02260F90 +ov70_02260F90: ; 0x02260F90 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + str r1, [sp] + str r2, [sp, #4] + str r3, [sp, #8] + bl ov70_02261AF0 + mov r1, #0xa7 + lsl r1, r1, #2 + add r2, r7, r1 + ldr r1, [sp] + str r0, [sp, #0xc] + lsl r1, r1, #4 + add r0, r0, #4 + add r1, r2, r1 + bl sub_02017258 + ldr r5, [sp, #0xc] + ldr r0, [sp] + mov r1, #0xc + mul r1, r0 + mov r0, #0xa7 + lsl r0, r0, #2 + add r0, r7, r0 + str r0, [sp, #0x10] + ldr r0, [sp] + mov r6, #0 + lsl r0, r0, #4 + add r4, r7, r1 + add r5, #0x7c + str r0, [sp, #0x14] +_02260FD0: + mov r0, #0xef + lsl r0, r0, #2 + ldr r2, [r4, r0] + cmp r2, #0 + beq _02260FEA + ldr r3, [sp, #0x10] + ldr r1, [sp, #0x14] + add r0, r5, #0 + add r1, r3, r1 + ldr r3, _02261054 ; =0x00000494 + add r3, r7, r3 + bl sub_02017190 +_02260FEA: + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x14 + cmp r6, #3 + blt _02260FD0 + ldr r0, [sp, #0xc] + mov r1, #1 + add r0, r0, #4 + bl sub_02017348 + ldr r0, [sp, #4] + add r1, sp, #0x18 + lsl r0, r0, #4 + strh r0, [r1] + ldr r0, [sp, #8] + mov r3, sp + lsl r0, r0, #4 + strh r0, [r1, #2] + ldrh r2, [r1] + sub r3, r3, #4 + ldr r0, [sp, #0xc] + strh r2, [r3] + ldrh r1, [r1, #2] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov70_022610BC + ldr r0, [sp, #0xc] + mov r2, #1 + ldr r1, [sp] + strh r2, [r0] + strh r1, [r0, #2] + mov r1, #0x14 + add r0, #0xcc + strb r1, [r0] + ldr r0, [sp, #0xc] + lsl r1, r2, #0xc + add r0, #0xdc + str r1, [r0, #0] + ldr r0, [sp, #0xc] + mov r1, #0 + add r0, #0xe0 + strb r1, [r0] + ldr r0, [sp, #0xc] + mov r1, #0x1f + add r0, #0xe1 + strb r1, [r0] + ldr r0, [sp, #0xc] + add r0, #0xe2 + strb r1, [r0] + ldr r0, [sp, #0xc] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02261054: .word 0x00000494 + thumb_func_end ov70_02260F90 + + thumb_func_start ov70_02261058 +ov70_02261058: ; 0x02261058 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + str r1, [sp] + add r0, r1, #4 + mov r1, #0 + bl sub_02017348 + mov r0, #0xa7 + ldr r5, [sp] + lsl r0, r0, #2 + mov r7, #0 + add r0, r6, r0 + add r4, r7, #0 + add r5, #0x7c + str r0, [sp, #4] +_02261078: + ldr r0, [sp] + ldrh r1, [r0, #2] + mov r0, #0xc + mul r0, r1 + add r0, r6, r0 + add r2, r4, r0 + mov r0, #0xef + lsl r0, r0, #2 + ldr r2, [r2, r0] + cmp r2, #0 + beq _0226109E + lsl r3, r1, #4 + ldr r1, [sp, #4] + add r0, r5, #0 + add r1, r1, r3 + ldr r3, _022610B4 ; =0x00000494 + add r3, r6, r3 + bl sub_02017190 +_0226109E: + add r7, r7, #1 + add r4, r4, #4 + add r5, #0x14 + cmp r7, #3 + blt _02261078 + ldr r0, [sp] + mov r1, #0 + strh r1, [r0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_022610B4: .word 0x00000494 + thumb_func_end ov70_02261058 + + thumb_func_start ov70_022610B8 +ov70_022610B8: ; 0x022610B8 + ldrh r0, [r0, #2] + bx lr + thumb_func_end ov70_022610B8 + + thumb_func_start ov70_022610BC +ov70_022610BC: ; 0x022610BC + push {r0, r1, r2, r3} + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, sp, #0x1c + add r1, sp, #0 + bl ov70_0225C700 + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #4 + bl sub_02017350 + add sp, #0xc + pop {r3, r4} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 + thumb_func_end ov70_022610BC + + thumb_func_start ov70_022610E4 +ov70_022610E4: ; 0x022610E4 + push {r3, lr} + sub sp, #0x10 + add r0, r0, #4 + add r1, sp, #4 + add r2, sp, #8 + add r3, sp, #0xc + bl sub_02017358 + add r0, sp, #4 + add r1, sp, #0 + bl ov70_0225C714 + add r0, sp, #0 + ldrh r1, [r0, #2] + ldrh r0, [r0] + lsl r1, r1, #0x10 + orr r0, r1 + add sp, #0x10 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_022610E4 + + thumb_func_start ov70_0226110C +ov70_0226110C: ; 0x0226110C + push {r3, r4, lr} + sub sp, #4 + mov r4, #0 + str r4, [sp] + bl ov70_0226111C + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov70_0226110C + + thumb_func_start ov70_0226111C +ov70_0226111C: ; 0x0226111C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r2, #0 + str r0, [sp] + add r4, r1, #0 + add r7, r3, #0 + cmp r5, #3 + blt _02261130 + bl sub_02022974 +_02261130: + cmp r7, #7 + blt _02261138 + bl sub_02022974 +_02261138: + ldrh r0, [r4, #2] + cmp r0, #0x12 + blo _02261142 + bl sub_02022974 +_02261142: + ldrh r0, [r4, #2] + mov r1, #0xc + lsl r6, r5, #2 + mul r1, r0 + ldr r0, [sp] + add r0, r0, r1 + add r1, r0, r6 + mov r0, #0xef + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0226121C + add r0, r4, #0 + str r0, [sp, #4] + add r0, #0xb8 + str r0, [sp, #4] + ldrb r0, [r0, r5] + cmp r0, #0 + bne _02261178 + add r2, r4, #0 + mov r1, #0x14 + add r2, #0x7c + mul r1, r5 + add r0, r4, #4 + add r1, r2, r1 + bl sub_0201727C +_02261178: + ldr r0, [sp, #4] + mov r1, #1 + strb r1, [r0, r5] + add r0, r4, r5 + add r0, #0xbc + strb r7, [r0] + add r0, r4, r6 + ldr r1, [sp, #0x20] + add r0, #0xd0 + str r1, [r0, #0] + add r0, r4, #0 + str r0, [sp, #8] + add r0, #0xcd + str r0, [sp, #8] + mov r0, #0 + ldr r1, [sp, #8] + cmp r7, #6 + strb r0, [r1, r5] + bhi _02261208 + add r1, r7, r7 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022611AA: ; jump table + .short _022611B8 - _022611AA - 2 ; case 0 + .short _022611B8 - _022611AA - 2 ; case 1 + .short _022611B8 - _022611AA - 2 ; case 2 + .short _022611C0 - _022611AA - 2 ; case 3 + .short _022611C0 - _022611AA - 2 ; case 4 + .short _022611D6 - _022611AA - 2 ; case 5 + .short _022611F0 - _022611AA - 2 ; case 6 +_022611B8: + add r1, r4, r6 + add r1, #0xc0 + str r0, [r1, #0] + b _02261208 +_022611C0: + add r1, r4, #0 + mov r0, #0x14 + add r1, #0x7c + mul r0, r5 + add r0, r1, r0 + bl sub_0201724C + add r1, r4, r6 + add r1, #0xc0 + str r0, [r1, #0] + b _02261208 +_022611D6: + add r1, r4, r6 + add r1, #0xc0 + str r0, [r1, #0] + bl sub_0201D35C + add r1, r4, #0 + add r1, #0xcc + ldrb r1, [r1] + bl sub_020E2178 + ldr r0, [sp, #8] + strb r1, [r0, r5] + b _02261208 +_022611F0: + add r1, r4, r6 + add r1, #0xc0 + str r0, [r1, #0] + bl sub_0201D35C + add r1, r4, #0 + add r1, #0xcc + ldrb r1, [r1] + bl sub_020E2178 + ldr r0, [sp, #8] + strb r1, [r0, r5] +_02261208: + add r1, r4, #0 + mov r0, #0x14 + add r1, #0x7c + mul r0, r5 + add r0, r1, r0 + add r1, r4, r6 + add r1, #0xc0 + ldr r1, [r1, #0] + bl sub_02017240 +_0226121C: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_0226111C + + thumb_func_start ov70_02261220 +ov70_02261220: ; 0x02261220 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + cmp r4, #3 + blt _02261230 + bl sub_02022974 +_02261230: + ldrh r0, [r5, #2] + cmp r0, #0x12 + blo _0226123A + bl sub_02022974 +_0226123A: + ldrh r1, [r5, #2] + mov r0, #0xc + mul r0, r1 + add r1, r6, r0 + lsl r0, r4, #2 + add r1, r1, r0 + mov r0, #0xef + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _02261288 + add r6, r5, #0 + add r6, #0xb8 + ldrb r0, [r6, r4] + cmp r0, #1 + bne _02261288 + add r2, r5, #0 + mov r1, #0x14 + add r2, #0x7c + mul r1, r4 + add r0, r5, #4 + add r1, r2, r1 + bl sub_02017288 + lsl r2, r4, #2 + mov r0, #0 + add r1, r5, r2 + strb r0, [r6, r4] + add r1, #0xc0 + str r0, [r1, #0] + add r1, r5, r4 + add r1, #0xbc + strb r0, [r1] + add r1, r5, r4 + add r1, #0xcd + strb r0, [r1] + add r1, r5, r2 + add r1, #0xd0 + str r0, [r1, #0] +_02261288: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02261220 + + thumb_func_start ov70_0226128C +ov70_0226128C: ; 0x0226128C + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r4, #0 +_02261294: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02261348 + cmp r0, #1 + bne _022612AA + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov70_02261220 +_022612AA: + add r4, r4, #1 + cmp r4, #3 + blt _02261294 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0226128C + + thumb_func_start ov70_022612B4 +ov70_022612B4: ; 0x022612B4 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + cmp r4, #3 + blt _022612C4 + bl sub_02022974 +_022612C4: + ldrh r0, [r5, #2] + cmp r0, #0x12 + blo _022612CE + bl sub_02022974 +_022612CE: + ldrh r1, [r5, #2] + mov r0, #0xc + mul r0, r1 + add r1, r6, r0 + lsl r0, r4, #2 + add r1, r1, r0 + mov r0, #0xef + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _022612EC + add r0, r5, r4 + add r0, #0xb8 + ldrb r0, [r0] + pop {r4, r5, r6, pc} +_022612EC: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov70_022612B4 + + thumb_func_start ov70_022612F0 +ov70_022612F0: ; 0x022612F0 + push {r3, r4, r5, r6, r7, lr} + add r4, r2, #0 + add r6, r0, #0 + add r5, r1, #0 + add r7, r3, #0 + cmp r4, #3 + blt _02261302 + bl sub_02022974 +_02261302: + ldrh r0, [r5, #2] + cmp r0, #0x12 + blo _0226130C + bl sub_02022974 +_0226130C: + ldrh r1, [r5, #2] + mov r0, #0xc + mul r0, r1 + add r1, r6, r0 + lsl r0, r4, #2 + add r1, r1, r0 + mov r0, #0xef + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + bne _02261326 + bl sub_02022974 +_02261326: + add r0, r5, r4 + add r0, #0xbc + ldrb r0, [r0] + cmp r0, #2 + bne _02261346 + add r2, r5, #0 + mov r0, #0x14 + add r2, #0xc0 + lsl r1, r4, #2 + str r7, [r2, r1] + add r5, #0x7c + mul r0, r4 + ldr r1, [r2, r1] + add r0, r5, r0 + bl sub_02017240 +_02261346: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_022612F0 + + thumb_func_start ov70_02261348 +ov70_02261348: ; 0x02261348 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #3 + blt _02261356 + bl sub_02022974 +_02261356: + ldrh r0, [r5, #2] + cmp r0, #0x12 + blo _02261360 + bl sub_02022974 +_02261360: + add r0, r5, r4 + add r0, #0xb8 + ldrb r0, [r0] + pop {r3, r4, r5, pc} + thumb_func_end ov70_02261348 + + thumb_func_start ov70_02261368 +ov70_02261368: ; 0x02261368 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #3 + blt _02261376 + bl sub_02022974 +_02261376: + ldrh r0, [r5, #2] + cmp r0, #0x12 + blo _02261380 + bl sub_02022974 +_02261380: + lsl r0, r4, #2 + add r0, r5, r0 + add r0, #0xc0 + ldr r0, [r0, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02261368 + + thumb_func_start ov70_0226138C +ov70_0226138C: ; 0x0226138C + ldr r3, _02261394 ; =sub_02017348 + add r0, r0, #4 + bx r3 + nop +_02261394: .word sub_02017348 + thumb_func_end ov70_0226138C + + thumb_func_start ov70_02261398 +ov70_02261398: ; 0x02261398 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4, #2] + add r6, r2, #0 + cmp r0, #0x12 + blo _022613AA + bl sub_02022974 +_022613AA: + ldrh r0, [r4, #2] + lsl r0, r0, #4 + add r1, r5, r0 + mov r0, #0xa9 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + bl sub_020B3664 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02261398 + + thumb_func_start ov70_022613C0 +ov70_022613C0: ; 0x022613C0 + add r0, #0xdc + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov70_022613C0 + + thumb_func_start ov70_022613C8 +ov70_022613C8: ; 0x022613C8 + push {r3, r4} + add r3, r0, #0 + mov r4, #1 + add r3, #0xe0 + strb r4, [r3] + add r3, r0, #0 + add r3, #0xe1 + strb r1, [r3] + add r0, #0xe2 + strb r2, [r0] + pop {r3, r4} + bx lr + thumb_func_end ov70_022613C8 + + thumb_func_start ov70_022613E0 +ov70_022613E0: ; 0x022613E0 + mov r1, #0 + add r0, #0xe0 + strb r1, [r0] + bx lr + thumb_func_end ov70_022613E0 + + thumb_func_start ov70_022613E8 +ov70_022613E8: ; 0x022613E8 + push {r3, lr} + add r0, r0, #4 + bl sub_0201736C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_022613E8 + + thumb_func_start ov70_022613F4 +ov70_022613F4: ; 0x022613F4 + push {r3, r4, r5, lr} + add r5, r2, #0 + lsl r2, r1, #2 + add r1, r1, r2 + add r4, r0, r1 + cmp r4, #0x19 + blo _02261406 + bl sub_02022974 +_02261406: + mov r0, #1 + str r0, [sp] + mov r0, #0xae + add r1, r4, #1 + mov r2, #0 + add r3, r5, #0 + bl sub_02006FE8 + pop {r3, r4, r5, pc} + thumb_func_end ov70_022613F4 + + thumb_func_start ov70_02261418 +ov70_02261418: ; 0x02261418 + ldr r3, _0226141C ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_0226141C: .word sub_020181C4 + thumb_func_end ov70_02261418 + + thumb_func_start ov70_02261420 +ov70_02261420: ; 0x02261420 + push {r4, lr} + add r4, r0, #0 + bl ov70_0225C730 + ldr r0, [r4, #0] + bl sub_020B3C0C + str r0, [r4, #4] + cmp r0, #0 + beq _02261454 + add r2, r0, #0 + add r2, #8 + beq _02261448 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _02261448 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _0226144A +_02261448: + mov r1, #0 +_0226144A: + cmp r1, #0 + beq _02261454 + ldr r1, [r1, #0] + add r0, r0, r1 + b _02261456 +_02261454: + mov r0, #0 +_02261456: + str r0, [r4, #8] + ldr r0, [r4, #0] + bl sub_020B3C1C + str r0, [r4, #0xc] + ldr r0, [r4, #0] + ldr r1, [r4, #0xc] + bl sub_0201CBB0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02261420 + + thumb_func_start ov70_0226146C +ov70_0226146C: ; 0x0226146C + ldr r3, _02261470 ; =sub_02017110 + bx r3 + ; .align 2, 0 +_02261470: .word sub_02017110 + thumb_func_end ov70_0226146C + + thumb_func_start ov70_02261474 +ov70_02261474: ; 0x02261474 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + bl sub_0201724C + add r1, r0, #0 + ldr r0, [r5, #0] + add r0, r0, r4 + cmp r0, r1 + bge _0226148E + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_0226148E: + bl sub_020E1F6C + str r1, [r5, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02261474 + + thumb_func_start ov70_02261498 +ov70_02261498: ; 0x02261498 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + bl sub_0201724C + ldr r1, [r5, #0] + add r1, r1, r4 + cmp r1, r0 + bge _022614B2 + str r1, [r5, #0] + mov r0, #0 + pop {r3, r4, r5, pc} +_022614B2: + mov r1, #2 + lsl r1, r1, #0xa + sub r0, r0, r1 + str r0, [r5, #0] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02261498 + + thumb_func_start ov70_022614C0 +ov70_022614C0: ; 0x022614C0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + bl sub_0201724C + ldr r1, [r5, #0] + sub r1, r1, r4 + bmi _022614D6 + str r1, [r5, #0] + pop {r3, r4, r5, pc} +_022614D6: + add r0, r0, r1 + str r0, [r5, #0] + pop {r3, r4, r5, pc} + thumb_func_end ov70_022614C0 + + thumb_func_start ov70_022614DC +ov70_022614DC: ; 0x022614DC + ldr r1, [r0, #0] + sub r1, r1, r2 + cmp r1, #0 + ble _022614EA + str r1, [r0, #0] + mov r0, #0 + bx lr +_022614EA: + mov r1, #0 + str r1, [r0, #0] + mov r0, #1 + bx lr + ; .align 2, 0 + thumb_func_end ov70_022614DC + + thumb_func_start ov70_022614F4 +ov70_022614F4: ; 0x022614F4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #8] + ldr r0, [sp, #0x30] + mov r7, #6 + ldr r5, [sp, #8] + str r1, [sp, #0xc] + str r2, [sp, #0x10] + str r3, [sp, #0x14] + str r0, [sp, #0x30] + mov r6, #0 + add r4, r2, #0 + lsl r7, r7, #6 +_0226150E: + ldr r1, [sp, #0xc] + ldr r2, [r4, r7] + ldr r3, [sp, #0x14] + add r0, r5, #0 + bl ov70_02261420 + ldr r0, [r5, #0] + bl ov66_02231668 + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x10 + cmp r6, #2 + blt _0226150E + ldr r6, [sp, #8] + ldr r4, [sp, #0x10] + add r0, r6, #0 + add r5, r6, #0 + str r0, [sp, #0x18] + add r0, #0x10 + mov r7, #0 + add r5, #0x20 + str r0, [sp, #0x18] +_0226153C: + mov r0, #6 + ldr r1, [sp, #0x10] + lsl r0, r0, #6 + ldr r1, [r1, r0] + add r0, #0xc + ldr r0, [r4, r0] + cmp r1, r0 + bne _02261556 + add r1, r6, #0 + add r1, #0x84 + mov r0, #0 + str r0, [r1, #0] + b _02261594 +_02261556: + add r1, r6, #0 + add r1, #0x84 + mov r0, #1 + str r0, [r1, #0] + cmp r7, #3 + beq _0226157C + ldr r0, [sp, #0x14] + mov r3, #0x63 + str r0, [sp] + ldr r0, [sp, #0x30] + lsl r3, r3, #2 + str r0, [sp, #4] + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [r4, r3] + add r0, r5, #0 + bl sub_02017164 + b _02261594 +_0226157C: + ldr r0, [sp, #0x14] + mov r3, #0x63 + str r0, [sp] + ldr r0, [sp, #0x30] + lsl r3, r3, #2 + str r0, [sp, #4] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0xc] + ldr r3, [r4, r3] + add r0, r5, #0 + bl sub_02017164 +_02261594: + add r7, r7, #1 + add r4, r4, #4 + add r6, r6, #4 + add r5, #0x14 + cmp r7, #5 + blt _0226153C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_022614F4 + + thumb_func_start ov70_022615A4 +ov70_022615A4: ; 0x022615A4 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r6, #0 + str r1, [sp] + mov r7, #0 + add r4, r6, #0 + add r5, #0x20 +_022615B2: + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022615CC + ldr r1, [sp] + add r0, r5, #0 + bl sub_020171A0 + add r1, r4, #0 + add r1, #0x84 + mov r0, #0 + str r0, [r1, #0] +_022615CC: + add r7, r7, #1 + add r4, r4, #4 + add r5, #0x14 + cmp r7, #5 + blt _022615B2 + mov r4, #0 +_022615D8: + add r0, r6, #0 + bl ov70_0226146C + add r4, r4, #1 + add r6, #0x10 + cmp r4, #2 + blt _022615D8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_022615A4 + + thumb_func_start ov70_022615E8 +ov70_022615E8: ; 0x022615E8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + mov r0, #1 + add r7, r1, #0 + str r0, [r6, #0] + mov r0, #0 + str r0, [sp] + add r4, r7, #0 + add r5, r6, #4 +_022615FC: + add r0, r5, #0 + add r1, r4, #0 + bl sub_02017258 + add r0, r5, #0 + mov r1, #1 + bl sub_02017348 + ldr r0, [sp] + add r4, #0x10 + add r0, r0, #1 + add r5, #0x78 + str r0, [sp] + cmp r0, #2 + blt _022615FC + add r0, r6, #0 + str r0, [sp, #8] + add r0, #0x7c + add r4, r7, #0 + str r0, [sp, #8] + add r0, r6, #4 + mov r5, #0 + add r4, #0x20 + str r0, [sp, #4] +_0226162C: + add r0, r7, #0 + add r0, #0x84 + ldr r0, [r0, #0] + cmp r0, #1 + bne _02261654 + add r1, r6, #0 + add r1, #0xf4 + mov r0, #1 + str r0, [r1, #0] + cmp r5, #3 + beq _0226164C + ldr r0, [sp, #4] + add r1, r4, #0 + bl sub_0201727C + b _02261654 +_0226164C: + ldr r0, [sp, #8] + add r1, r4, #0 + bl sub_0201727C +_02261654: + add r5, r5, #1 + add r7, r7, #4 + add r6, r6, #4 + add r4, #0x14 + cmp r5, #4 + blt _0226162C + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_022615E8 + + thumb_func_start ov70_02261664 +ov70_02261664: ; 0x02261664 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + str r0, [sp] + add r0, #0x7c + mov r6, #0 + add r4, r7, #0 + add r5, #0x20 + str r0, [sp] +_02261676: + add r0, r4, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + cmp r0, #1 + bne _0226169E + add r1, r4, #0 + add r1, #0xf4 + mov r0, #0 + str r0, [r1, #0] + cmp r6, #3 + beq _02261696 + add r0, r7, #4 + add r1, r5, #0 + bl sub_02017288 + b _0226169E +_02261696: + ldr r0, [sp] + add r1, r5, #0 + bl sub_02017288 +_0226169E: + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x14 + cmp r6, #4 + blt _02261676 + mov r0, #0 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02261664 + + thumb_func_start ov70_022616B0 +ov70_022616B0: ; 0x022616B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + add r4, r1, #0 + mov r0, #0x42 + add r4, #0x20 + lsl r0, r0, #2 + add r6, r5, r0 + add r7, r4, #0 +_022616C4: + add r0, r5, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022616E6 + mov r2, #1 + add r0, r6, #0 + add r1, r4, #0 + lsl r2, r2, #0xc + bl ov70_02261474 + mov r1, #0x42 + lsl r1, r1, #2 + ldr r1, [r5, r1] + add r0, r7, #0 + bl sub_02017240 +_022616E6: + ldr r0, [sp] + add r5, r5, #4 + add r0, r0, #1 + add r4, #0x14 + add r6, r6, #4 + add r7, #0x14 + str r0, [sp] + cmp r0, #5 + blt _022616C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_022616B0 + + thumb_func_start ov70_022616FC +ov70_022616FC: ; 0x022616FC + push {r3, r4, r5, lr} + ldr r1, [r0, #0] + cmp r1, #0 + beq _02261716 + mov r4, #0 + add r5, r0, #4 +_02261708: + add r0, r5, #0 + bl sub_02017294 + add r4, r4, #1 + add r5, #0x78 + cmp r4, #2 + blt _02261708 +_02261716: + pop {r3, r4, r5, pc} + thumb_func_end ov70_022616FC + + thumb_func_start ov70_02261718 +ov70_02261718: ; 0x02261718 + push {r4, lr} + mov r1, #0x49 + lsl r1, r1, #2 + ldrb r4, [r0, r1] + mov r2, #0 + cmp r4, #0 + ble _02261742 + sub r1, #8 + ldr r3, [r0, r1] + add r1, r3, #0 +_0226172C: + ldrb r0, [r1] + cmp r0, #0 + bne _0226173A + mov r0, #0xb4 + mul r0, r2 + add r0, r3, r0 + pop {r4, pc} +_0226173A: + add r2, r2, #1 + add r1, #0xb4 + cmp r2, r4 + blt _0226172C +_02261742: + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02261718 + + thumb_func_start ov70_0226174C +ov70_0226174C: ; 0x0226174C + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + str r0, [sp, #8] + ldr r0, [sp, #0x58] + mov r7, #0x4a + str r0, [sp, #0x58] + mov r0, #0 + str r0, [sp, #0x40] + add r0, r3, #0 + str r0, [sp, #0x24] + ldr r0, [sp, #8] + str r1, [sp, #0xc] + str r0, [sp, #0x20] + add r0, #0x20 + str r2, [sp, #0x10] + str r3, [sp, #0x14] + str r0, [sp, #0x20] + lsl r7, r7, #2 +_02261770: + ldr r4, [sp, #0x24] + ldr r5, [sp, #0x20] + mov r6, #0 +_02261776: + ldr r1, [sp, #0xc] + ldr r2, [r4, r7] + ldr r3, [sp, #0x58] + add r0, r5, #0 + bl ov70_0225C730 + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #3 + blt _02261776 + ldr r0, [sp, #0x24] + add r0, #0xc + str r0, [sp, #0x24] + ldr r0, [sp, #0x20] + add r0, #0xc + str r0, [sp, #0x20] + ldr r0, [sp, #0x40] + add r0, r0, #1 + str r0, [sp, #0x40] + cmp r0, #2 + blt _02261770 + ldr r4, [sp, #8] + ldr r6, [sp, #0x14] + mov r7, #0 + add r5, r4, #0 +_022617AA: + mov r0, #0 + mov r1, #0x12 + str r0, [sp] + lsl r1, r1, #4 + ldr r0, [sp, #0xc] + ldr r1, [r6, r1] + ldr r3, [sp, #0x58] + mov r2, #0 + bl sub_0200723C + str r0, [r4, #0] + bl sub_020B3C0C + str r0, [r4, #4] + cmp r0, #0 + beq _022617EA + add r1, r0, #0 + add r1, #8 + beq _022617DE + ldrb r2, [r0, #9] + cmp r2, #0 + bls _022617DE + ldrh r2, [r0, #0xe] + add r1, r1, r2 + add r1, r1, #4 + b _022617E0 +_022617DE: + mov r1, #0 +_022617E0: + cmp r1, #0 + beq _022617EA + ldr r1, [r1, #0] + add r0, r0, r1 + b _022617EC +_022617EA: + mov r0, #0 +_022617EC: + str r0, [r4, #8] + ldr r0, [r5, #0x20] + bl sub_020B3C1C + str r0, [r4, #0xc] + add r7, r7, #1 + add r6, r6, #4 + add r4, #0x10 + add r5, #0xc + cmp r7, #2 + blt _022617AA + mov r0, #0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x14] + ldr r7, [sp, #0x14] + str r0, [sp, #0x3c] + ldr r0, [sp, #8] + str r0, [sp, #0x38] + add r0, #0x38 + str r0, [sp, #0x38] + ldr r0, [sp, #0x14] + str r0, [sp, #0x34] + ldr r0, [sp, #8] + str r0, [sp, #0x30] +_0226181C: + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x3c] + ldr r6, [sp, #0x34] + str r0, [sp, #0x2c] + ldr r0, [sp, #0x38] + ldr r5, [sp, #0x30] + str r0, [sp, #0x28] +_0226182C: + mov r0, #5 + ldr r1, [sp, #0x2c] + lsl r0, r0, #6 + ldr r3, [r1, r0] + ldr r1, [sp, #0x14] + sub r0, #0x20 + ldr r0, [r1, r0] + cmp r0, r3 + beq _02261880 + ldr r0, [sp, #0x58] + ldr r1, [sp, #8] + str r0, [sp] + ldr r0, [sp, #0x10] + ldr r2, [sp, #0xc] + str r0, [sp, #4] + ldr r0, [sp, #0x28] + bl sub_02017164 + ldr r0, [sp, #0x18] + cmp r0, #1 + blt _02261880 + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r7, r0] + mov r4, #0 + cmp r0, #0 + bls _02261880 +_02261862: + mov r0, #0x59 + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r4, r0 + beq _02261874 + ldr r0, [r5, #0x40] + add r1, r4, #0 + bl sub_020AE5CC +_02261874: + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r7, r0] + add r4, r4, #1 + cmp r4, r0 + blo _02261862 +_02261880: + ldr r0, [sp, #0x2c] + add r6, r6, #4 + add r0, r0, #4 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + add r5, #0x14 + add r0, #0x14 + str r0, [sp, #0x28] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #4 + blt _0226182C + ldr r0, [sp, #0x3c] + add r7, r7, #4 + add r0, #0x10 + str r0, [sp, #0x3c] + ldr r0, [sp, #8] + add r0, #0x10 + str r0, [sp, #8] + ldr r0, [sp, #0x38] + add r0, #0x50 + str r0, [sp, #0x38] + ldr r0, [sp, #0x34] + add r0, #0xc + str r0, [sp, #0x34] + ldr r0, [sp, #0x30] + add r0, #0x50 + str r0, [sp, #0x30] + ldr r0, [sp, #0x1c] + add r0, r0, #1 + str r0, [sp, #0x1c] + cmp r0, #2 + blt _0226181C + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_0226174C + + thumb_func_start ov70_022618C8 +ov70_022618C8: ; 0x022618C8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + ldr r7, [sp] + mov r0, #0 + add r6, r1, #0 + str r0, [sp, #8] + add r7, #0x38 +_022618D8: + mov r4, #0 + add r5, r7, #0 +_022618DC: + add r0, r5, #0 + add r1, r6, #0 + bl sub_020171A0 + add r4, r4, #1 + add r5, #0x14 + cmp r4, #4 + blt _022618DC + ldr r0, [sp, #8] + add r7, #0x50 + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #2 + blt _022618D8 + ldr r4, [sp] + mov r5, #0 +_022618FC: + ldr r0, [r4, #0] + bl sub_020181C4 + add r5, r5, #1 + add r4, #0x10 + cmp r5, #2 + blt _022618FC + mov r0, #0 + ldr r7, _02261960 ; =0x02100DF0 + str r0, [sp, #4] +_02261910: + ldr r4, [sp] + mov r5, #0 +_02261914: + ldr r0, [r4, #0x20] + bl sub_020B3C1C + add r1, sp, #0x10 + add r2, sp, #0xc + add r6, r0, #0 + bl sub_020AE9B8 + ldr r0, [sp, #0x10] + ldr r1, [r7, #0] + blx r1 + ldr r0, [sp, #0xc] + ldr r1, [r7, #0] + blx r1 + add r0, r6, #0 + bl sub_020AEA70 + ldr r1, _02261964 ; =0x02100DF8 + ldr r1, [r1, #0] + blx r1 + ldr r0, [r4, #0x20] + bl sub_020181C4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #3 + blt _02261914 + ldr r0, [sp] + add r0, #0xc + str r0, [sp] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #2 + blt _02261910 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_02261960: .word 0x02100DF0 +_02261964: .word 0x02100DF8 + thumb_func_end ov70_022618C8 + + thumb_func_start ov70_02261968 +ov70_02261968: ; 0x02261968 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r7, #0 + str r0, [sp] + add r4, r0, #0 + add r0, r1, #0 + str r1, [sp, #4] + add r0, #0x38 + add r6, r7, #0 + add r5, #0x8c + str r0, [sp, #4] +_02261980: + ldr r0, [r4, #0x7c] + cmp r0, #0 + beq _022619E4 + cmp r7, #3 + bhi _022619E0 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02261996: ; jump table + .short _0226199E - _02261996 - 2 ; case 0 + .short _022619B8 - _02261996 - 2 ; case 1 + .short _0226199E - _02261996 - 2 ; case 2 + .short _022619B8 - _02261996 - 2 ; case 3 +_0226199E: + ldr r1, [sp] + mov r2, #0x50 + ldrb r1, [r1, #2] + add r0, r5, #0 + mul r2, r1 + ldr r1, [sp, #4] + add r1, r1, r2 + mov r2, #1 + add r1, r1, r6 + lsl r2, r2, #0xc + bl ov70_02261474 + b _022619E4 +_022619B8: + ldr r1, [sp] + mov r2, #0x50 + ldrb r1, [r1, #2] + add r0, r5, #0 + mul r2, r1 + ldr r1, [sp, #4] + add r1, r1, r2 + mov r2, #1 + add r1, r1, r6 + lsl r2, r2, #0xc + bl ov70_02261498 + cmp r0, #1 + bne _022619E4 + mov r0, #0 + add r1, r4, #0 + str r0, [r4, #0x7c] + add r1, #0x8c + str r0, [r1, #0] + b _022619E4 +_022619E0: + bl sub_02022974 +_022619E4: + add r7, r7, #1 + add r4, r4, #4 + add r6, #0x14 + add r5, r5, #4 + cmp r7, #4 + blt _02261980 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02261968 + + thumb_func_start ov70_022619F4 +ov70_022619F4: ; 0x022619F4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldrb r0, [r5] + str r1, [sp] + cmp r0, #0 + beq _02261AEA + ldrb r0, [r5, #2] + lsl r1, r0, #4 + ldr r0, [sp] + add r0, r0, r1 + add r1, r5, #4 + bl ov70_0225C7A0 + cmp r0, #0 + beq _02261AEA + ldrb r0, [r5, #1] + cmp r0, #3 + blo _02261A1E + bl sub_02022974 +_02261A1E: + ldrb r0, [r5, #2] + cmp r0, #2 + blo _02261A28 + bl sub_02022974 +_02261A28: + ldrb r1, [r5, #2] + mov r0, #0xc + add r2, r1, #0 + mul r2, r0 + ldr r0, [sp] + add r1, r0, r2 + ldrb r0, [r5, #1] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #0x20] + bl sub_020B3C1C + ldrb r1, [r5, #2] + lsl r2, r1, #4 + ldr r1, [sp] + add r1, r1, r2 + str r0, [r1, #0xc] + ldrb r0, [r5, #2] + lsl r1, r0, #4 + ldr r0, [sp] + add r1, r0, r1 + ldr r0, [r1, #4] + ldr r1, [r1, #0xc] + bl sub_020AF1E8 + cmp r0, #0 + bne _02261A62 + bl sub_02022974 +_02261A62: + ldr r7, [sp] + mov r0, #0 + str r0, [sp, #4] + add r6, r5, #0 + add r4, r0, #0 + add r7, #0x38 +_02261A6E: + ldr r0, [r6, #0x7c] + cmp r0, #0 + beq _02261A98 + ldrb r2, [r5, #2] + mov r1, #0x50 + add r0, r5, #4 + mul r1, r2 + add r1, r7, r1 + add r1, r1, r4 + bl sub_0201727C + ldrb r1, [r5, #2] + mov r0, #0x50 + mul r0, r1 + add r1, r6, #0 + add r1, #0x8c + add r0, r7, r0 + ldr r1, [r1, #0] + add r0, r0, r4 + bl sub_02017240 +_02261A98: + ldr r0, [sp, #4] + add r6, r6, #4 + add r0, r0, #1 + add r4, #0x14 + str r0, [sp, #4] + cmp r0, #4 + blt _02261A6E + add r0, r5, #4 + bl sub_02017294 + ldr r0, [sp] + mov r7, #0 + str r0, [sp, #8] + add r0, #0x38 + add r6, r5, #0 + add r4, r7, #0 + str r0, [sp, #8] +_02261ABA: + ldr r0, [r6, #0x7c] + cmp r0, #0 + beq _02261AD2 + ldrb r1, [r5, #2] + mov r2, #0x50 + add r0, r5, #4 + mul r2, r1 + ldr r1, [sp, #8] + add r1, r1, r2 + add r1, r1, r4 + bl sub_02017288 +_02261AD2: + add r7, r7, #1 + add r6, r6, #4 + add r4, #0x14 + cmp r7, #4 + blt _02261ABA + ldrb r0, [r5, #2] + lsl r1, r0, #4 + ldr r0, [sp] + add r0, r0, r1 + ldr r0, [r0, #4] + bl sub_020AF298 +_02261AEA: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_022619F4 + + thumb_func_start ov70_02261AF0 +ov70_02261AF0: ; 0x02261AF0 + push {r4, lr} + ldr r3, _02261B20 ; =0x00000125 + mov r1, #0 + ldrb r2, [r0, r3] + cmp r2, #0 + ble _02261B18 + sub r3, r3, #5 + ldr r4, [r0, r3] + add r3, r4, #0 +_02261B02: + ldrh r0, [r3] + cmp r0, #0 + bne _02261B10 + mov r0, #0xe4 + mul r0, r1 + add r0, r4, r0 + pop {r4, pc} +_02261B10: + add r1, r1, #1 + add r3, #0xe4 + cmp r1, r2 + blt _02261B02 +_02261B18: + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_02261B20: .word 0x00000125 + thumb_func_end ov70_02261AF0 + + thumb_func_start ov70_02261B24 +ov70_02261B24: ; 0x02261B24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + add r7, r3, #0 + str r0, [sp, #0x30] + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, [sp, #4] + str r1, [sp, #8] + str r7, [sp, #0x10] + str r0, [sp, #0xc] +_02261B3C: + ldr r0, [sp, #4] + ldr r1, [sp, #8] + ldr r2, [r7, #0] + ldr r3, [sp, #0x30] + bl ov70_02261420 + ldr r0, [sp, #0x14] + cmp r0, #0xb + beq _02261B5A + cmp r0, #0xc + beq _02261B5A + ldr r0, [sp, #4] + ldr r0, [r0, #0] + bl ov66_02231668 +_02261B5A: + ldr r4, [sp, #0x10] + ldr r5, [sp, #0xc] + mov r6, #0 +_02261B60: + ldr r1, [r4, #0x48] + ldr r0, [r7, #0] + cmp r0, r1 + beq _02261B7E + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #8] + ldr r3, [sp, #0x30] + mov r2, #0 + bl sub_0200723C + mov r1, #0x12 + lsl r1, r1, #4 + str r0, [r5, r1] + b _02261B86 +_02261B7E: + mov r0, #0x12 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] +_02261B86: + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #3 + blt _02261B60 + ldr r0, [sp, #4] + add r7, r7, #4 + add r0, #0x10 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + add r0, #0xc + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r0, #0xc + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #0x12 + blt _02261B3C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02261B24 + + thumb_func_start ov70_02261BB4 +ov70_02261BB4: ; 0x02261BB4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp] + mov r7, #0x12 + str r0, [sp, #4] + mov r6, #0 + lsl r7, r7, #4 +_02261BC8: + ldr r5, [sp] + mov r4, #0 +_02261BCC: + ldr r0, [r5, r7] + cmp r0, #0 + beq _02261BDC + bl sub_020181C4 + mov r0, #0x12 + lsl r0, r0, #4 + str r6, [r5, r0] +_02261BDC: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _02261BCC + ldr r0, [sp, #4] + bl ov70_0226146C + ldr r0, [sp] + add r0, #0xc + str r0, [sp] + ldr r0, [sp, #4] + add r0, #0x10 + str r0, [sp, #4] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp, #8] + cmp r0, #0x12 + blt _02261BC8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_02261BB4 + + thumb_func_start ov70_02261C04 +ov70_02261C04: ; 0x02261C04 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + cmp r0, #0 + beq _02261C5C + ldrh r0, [r4, #2] + add r1, r4, #4 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov70_0225C7A0 + cmp r0, #0 + beq _02261C5C + add r0, r4, #0 + add r0, #0xe0 + ldrb r0, [r0] + cmp r0, #1 + bne _02261C3C + ldrh r0, [r4, #2] + add r1, r4, #0 + add r1, #0xe1 + lsl r0, r0, #4 + add r0, r5, r0 + ldrb r1, [r1] + ldr r0, [r0, #8] + bl sub_020B3764 +_02261C3C: + add r0, r4, #4 + bl sub_02017294 + add r0, r4, #0 + add r0, #0xe0 + ldrb r0, [r0] + cmp r0, #1 + bne _02261C5C + ldrh r0, [r4, #2] + add r4, #0xe2 + ldrb r1, [r4] + lsl r0, r0, #4 + add r0, r5, r0 + ldr r0, [r0, #8] + bl sub_020B3764 +_02261C5C: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02261C04 + + thumb_func_start ov70_02261C60 +ov70_02261C60: ; 0x02261C60 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + str r0, [sp] + add r0, r4, #0 + str r0, [sp, #0xc] + add r0, #0x7c + add r7, r4, #0 + mov r5, #0 + str r0, [sp, #0xc] + add r7, #0xc0 + add r6, r4, #0 + str r0, [sp, #8] +_02261C7A: + add r0, r4, r5 + add r0, #0xb8 + ldrb r0, [r0] + cmp r0, #0 + beq _02261CE6 + add r0, r4, r5 + add r0, #0xbc + ldrb r0, [r0] + cmp r0, #6 + bhi _02261CE6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02261C9A: ; jump table + .short _02261CA8 - _02261C9A - 2 ; case 0 + .short _02261CC4 - _02261C9A - 2 ; case 1 + .short _02261DF4 - _02261C9A - 2 ; case 2 + .short _02261D0A - _02261C9A - 2 ; case 3 + .short _02261D26 - _02261C9A - 2 ; case 4 + .short _02261D6A - _02261C9A - 2 ; case 5 + .short _02261DC0 - _02261C9A - 2 ; case 6 +_02261CA8: + add r2, r4, #0 + add r2, #0xdc + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r7, #0 + bl ov70_02261474 + add r1, r6, #0 + add r1, #0xc0 + ldr r0, [sp, #8] + ldr r1, [r1, #0] + bl sub_02017240 + b _02261DF4 +_02261CC4: + add r2, r4, #0 + add r2, #0xdc + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r7, #0 + bl ov70_02261498 + add r1, r6, #0 + add r1, #0xc0 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + ldr r1, [r1, #0] + bl sub_02017240 + ldr r0, [sp, #0x14] + cmp r0, #1 + beq _02261CE8 +_02261CE6: + b _02261DF4 +_02261CE8: + add r0, r6, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [sp] + add r2, r5, #0 + bl ov70_02261220 + ldr r0, [sp, #0x10] + cmp r0, #0 + beq _02261DF4 + ldr r0, [sp] + ldr r2, [sp, #0x10] + add r1, r4, #0 + blx r2 + b _02261DF4 +_02261D0A: + add r2, r4, #0 + add r2, #0xdc + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r7, #0 + bl ov70_022614C0 + add r1, r6, #0 + add r1, #0xc0 + ldr r0, [sp, #8] + ldr r1, [r1, #0] + bl sub_02017240 + b _02261DF4 +_02261D26: + add r2, r4, #0 + add r2, #0xdc + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r7, #0 + bl ov70_022614DC + add r1, r6, #0 + add r1, #0xc0 + str r0, [sp, #0x18] + ldr r0, [sp, #8] + ldr r1, [r1, #0] + bl sub_02017240 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _02261DF4 + add r0, r6, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + add r1, r4, #0 + str r0, [sp, #4] + ldr r0, [sp] + add r2, r5, #0 + bl ov70_02261220 + ldr r0, [sp, #4] + cmp r0, #0 + beq _02261DF4 + ldr r0, [sp] + ldr r2, [sp, #4] + add r1, r4, #0 + blx r2 + b _02261DF4 +_02261D6A: + add r0, r4, r5 + add r0, #0xcd + ldrb r0, [r0] + cmp r0, #0 + beq _02261D84 + add r0, r4, r5 + add r0, #0xcd + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r4, r5 + add r0, #0xcd + strb r1, [r0] + b _02261DF4 +_02261D84: + add r2, r4, #0 + add r2, #0xdc + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r7, #0 + bl ov70_02261498 + cmp r0, #1 + bne _02261DB2 + bl sub_0201D35C + add r1, r4, #0 + add r1, #0xcc + ldrb r1, [r1] + bl sub_020E2178 + add r0, r4, r5 + add r0, #0xcd + strb r1, [r0] + add r1, r6, #0 + add r1, #0xc0 + mov r0, #0 + str r0, [r1, #0] +_02261DB2: + add r1, r6, #0 + add r1, #0xc0 + ldr r0, [sp, #8] + ldr r1, [r1, #0] + bl sub_02017240 + b _02261DF4 +_02261DC0: + add r0, r4, r5 + add r0, #0xcd + ldrb r0, [r0] + cmp r0, #0 + beq _02261DDA + add r0, r4, r5 + add r0, #0xcd + ldrb r0, [r0] + sub r1, r0, #1 + add r0, r4, r5 + add r0, #0xcd + strb r1, [r0] + b _02261DF4 +_02261DDA: + add r2, r4, #0 + add r2, #0xdc + ldr r1, [sp, #0xc] + ldr r2, [r2, #0] + add r0, r7, #0 + bl ov70_02261474 + add r1, r6, #0 + add r1, #0xc0 + ldr r0, [sp, #8] + ldr r1, [r1, #0] + bl sub_02017240 +_02261DF4: + ldr r0, [sp, #0xc] + add r5, r5, #1 + add r0, #0x14 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r7, r7, #4 + add r0, #0x14 + add r6, r6, #4 + str r0, [sp, #8] + cmp r5, #3 + bge _02261E0C + b _02261C7A +_02261E0C: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_02261C60 \ No newline at end of file diff --git a/asm/ov70_02261E10.s b/asm/ov70_02261E10.s new file mode 100644 index 000000000..02ad715ce --- /dev/null +++ b/asm/ov70_02261E10.s @@ -0,0 +1,2114 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02261E10 +ov70_02261E10: ; 0x02261E10 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r6, r1, #0 + add r5, r0, #0 + ldr r1, _0226217C ; =0x00000614 + add r0, r3, #0 + add r7, r2, #0 + str r3, [sp, #4] + bl sub_02018144 + ldr r2, _0226217C ; =0x00000614 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x61 + str r7, [r4, #0] + lsl r0, r0, #4 + strb r5, [r4, r0] + add r0, r0, #1 + strb r6, [r4, r0] + ldr r2, [sp, #4] + ldr r3, [sp, #0x48] + mov r0, #9 + mov r1, #0x80 + bl ov70_02260B44 + str r0, [r4, #4] + ldr r0, [sp, #0x48] + ldr r3, [sp, #4] + str r0, [sp] + ldr r0, [r4, #4] + add r1, r6, #0 + add r2, r5, #0 + bl ov70_02260CE4 + mov r0, #0 + ldr r5, _02262180 ; =0x0226D944 + str r0, [sp, #0xc] +_02261E5E: + mov r0, #0 + str r0, [sp] + ldrh r1, [r5] + str r0, [sp, #8] + add r2, sp, #0x1c + ldr r0, [r4, #0] + add r2, #2 + add r3, sp, #0x1c + bl ov70_0225C8D8 + cmp r0, #1 + beq _02261E78 + b _0226212C +_02261E78: + mov r0, #0x92 + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #0x10] + mov r0, #0xda + lsl r0, r0, #2 + add r0, r4, r0 + str r0, [sp, #0x14] + ldr r0, _02262184 ; =0x000004E8 + mov r7, sp + add r0, r4, r0 + str r0, [sp, #0x18] + sub r7, r7, #4 + add r6, sp, #0x1c +_02261E94: + ldrh r1, [r5, #2] + ldrh r2, [r6, #2] + ldrh r3, [r6] + ldr r0, [r4, #4] + bl ov70_02260F90 + ldr r1, _02262188 ; =0x00000612 + ldrb r1, [r4, r1] + lsl r1, r1, #2 + add r1, r4, r1 + str r0, [r1, #8] + ldrh r0, [r5, #2] + cmp r0, #0x10 + bls _02261EB2 + b _02262106 +_02261EB2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02261EBE: ; jump table + .short _02261F0C - _02261EBE - 2 ; case 0 + .short _02262106 - _02261EBE - 2 ; case 1 + .short _02262106 - _02261EBE - 2 ; case 2 + .short _02262106 - _02261EBE - 2 ; case 3 + .short _02262106 - _02261EBE - 2 ; case 4 + .short _02262106 - _02261EBE - 2 ; case 5 + .short _02261EE0 - _02261EBE - 2 ; case 6 + .short _02261EE0 - _02261EBE - 2 ; case 7 + .short _02261EE0 - _02261EBE - 2 ; case 8 + .short _02262106 - _02261EBE - 2 ; case 9 + .short _02261F4A - _02261EBE - 2 ; case 10 + .short _02261F76 - _02261EBE - 2 ; case 11 + .short _02261F76 - _02261EBE - 2 ; case 12 + .short _02261F8C - _02261EBE - 2 ; case 13 + .short _02261FEA - _02261EBE - 2 ; case 14 + .short _02262048 - _02261EBE - 2 ; case 15 + .short _02262084 - _02261EBE - 2 ; case 16 +_02261EE0: + ldr r1, _02262188 ; =0x00000612 + mov r2, #0 + ldrb r1, [r4, r1] + ldr r0, [r4, #4] + add r3, r2, #0 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_0226110C + ldr r0, _02262188 ; =0x00000612 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r2, [r0, #8] + ldrh r0, [r5, #2] + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x85 + lsl r0, r0, #2 + str r2, [r1, r0] + b _02262106 +_02261F0C: + ldr r1, _02262188 ; =0x00000612 + mov r2, #0 + ldrb r1, [r4, r1] + ldr r0, [r4, #4] + add r3, r2, #0 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_0226110C + ldr r1, _02262188 ; =0x00000612 + ldr r0, [r4, #4] + ldrb r1, [r4, r1] + mov r2, #1 + mov r3, #0 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_0226110C + ldr r1, _02262188 ; =0x00000612 + ldr r0, [r4, #4] + ldrb r1, [r4, r1] + mov r2, #2 + mov r3, #0 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_0226110C + b _02262106 +_02261F4A: + ldr r1, _02262188 ; =0x00000612 + ldr r0, [r4, #4] + ldrb r1, [r4, r1] + mov r2, #0 + mov r3, #2 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_0226110C + ldr r0, _02262188 ; =0x00000612 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r2, [r0, #8] + ldrh r0, [r5] + lsl r0, r0, #2 + add r1, r4, r0 + mov r0, #0x45 + lsl r0, r0, #2 + str r2, [r1, r0] + b _02262106 +_02261F76: + ldr r1, _02262188 ; =0x00000612 + ldr r0, [r4, #4] + ldrb r1, [r4, r1] + mov r2, #0 + mov r3, #2 + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_0226110C + b _02262106 +_02261F8C: + ldr r0, _0226218C ; =0x00000608 + mov r1, #0xc + ldrb r0, [r4, r0] + mul r1, r0 + ldr r0, [sp, #0x10] + add r0, r0, r1 + ldr r1, _02262188 ; =0x00000612 + ldrb r1, [r4, r1] + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_022629FC + ldr r0, _0226218C ; =0x00000608 + ldrb r0, [r4, r0] + add r1, r0, #1 + ldr r0, _0226218C ; =0x00000608 + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #0x18 + bls _02261FBA + bl sub_02022974 +_02261FBA: + ldr r0, _02262188 ; =0x00000612 + mov r1, #0 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_0226138C + ldrh r1, [r5] + ldr r0, _02262190 ; =0x0000FFA4 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bls _02261FDA + b _02262106 +_02261FDA: + ldr r0, _02262188 ; =0x00000612 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_02262D48 + b _02262106 +_02261FEA: + ldr r0, _02262194 ; =0x00000609 + mov r1, #0xc + ldrb r0, [r4, r0] + mul r1, r0 + ldr r0, [sp, #0x14] + add r0, r0, r1 + ldr r1, _02262188 ; =0x00000612 + ldrb r1, [r4, r1] + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_022629FC + ldr r0, _02262194 ; =0x00000609 + ldrb r0, [r4, r0] + add r1, r0, #1 + ldr r0, _02262194 ; =0x00000609 + strb r1, [r4, r0] + sub r0, r0, #1 + ldrb r0, [r4, r0] + cmp r0, #0x18 + bls _0226201A + bl sub_02022974 +_0226201A: + ldr r0, _02262188 ; =0x00000612 + mov r1, #0 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_0226138C + ldrh r1, [r5] + ldr r0, _02262190 ; =0x0000FFA4 + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _02262106 + ldr r0, _02262188 ; =0x00000612 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_02262D48 + b _02262106 +_02262048: + ldr r0, _02262188 ; =0x00000612 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r2, [r0, #8] + ldr r0, _02262198 ; =0x0000060A + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _0226219C ; =0x00000488 + str r2, [r1, r0] + ldr r0, _02262198 ; =0x0000060A + ldrb r0, [r4, r0] + add r1, r0, #1 + ldr r0, _02262198 ; =0x0000060A + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #0x18 + bls _02262072 + bl sub_02022974 +_02262072: + ldr r0, _02262188 ; =0x00000612 + mov r1, #0 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_0226138C + b _02262106 +_02262084: + ldr r0, _022621A0 ; =0x0000060B + mov r1, #0xc + ldrb r0, [r4, r0] + mul r1, r0 + ldr r0, [sp, #0x18] + add r0, r0, r1 + ldr r1, _02262188 ; =0x00000612 + ldrb r1, [r4, r1] + lsl r1, r1, #2 + add r1, r4, r1 + ldr r1, [r1, #8] + bl ov70_022629FC + ldr r0, _022621A0 ; =0x0000060B + ldrb r0, [r4, r0] + add r1, r0, #1 + ldr r0, _022621A0 ; =0x0000060B + strb r1, [r4, r0] + ldrb r0, [r4, r0] + cmp r0, #0x18 + bls _022620B2 + bl sub_02022974 +_022620B2: + ldr r0, _02262188 ; =0x00000612 + mov r1, #0 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_0226138C + ldr r0, _02262188 ; =0x00000612 + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + bl ov70_022610E4 + strh r0, [r6, #4] + lsr r0, r0, #0x10 + strh r0, [r6, #6] + ldrh r0, [r6, #4] + strh r0, [r6, #8] + ldrh r0, [r6, #6] + strh r0, [r6, #0xa] + mov r0, #8 + ldrsh r0, [r6, r0] + add r0, #8 + strh r0, [r6, #8] + mov r0, #0xa + ldrsh r0, [r6, r0] + add r0, #0x14 + strh r0, [r6, #0xa] + ldr r0, _02262188 ; =0x00000612 + ldrh r1, [r6, #8] + ldrb r0, [r4, r0] + lsl r0, r0, #2 + add r0, r4, r0 + ldr r0, [r0, #8] + strh r1, [r7] + ldrh r1, [r6, #0xa] + strh r1, [r7, #2] + ldr r1, [r7, #0] + bl ov70_022610BC +_02262106: + ldr r0, _02262188 ; =0x00000612 + add r2, sp, #0x1c + ldrb r0, [r4, r0] + add r2, #2 + add r3, sp, #0x1c + add r1, r0, #1 + ldr r0, _02262188 ; =0x00000612 + strb r1, [r4, r0] + ldr r0, [sp, #8] + add r0, r0, #1 + str r0, [sp] + str r0, [sp, #8] + ldrh r1, [r5] + ldr r0, [r4, #0] + bl ov70_0225C8D8 + cmp r0, #1 + bne _0226212C + b _02261E94 +_0226212C: + ldr r0, [sp, #0xc] + add r5, r5, #4 + add r0, r0, #1 + str r0, [sp, #0xc] + cmp r0, #0x23 + bhs _0226213A + b _02261E5E +_0226213A: + mov r0, #0xa + mov r7, #0 + lsl r0, r0, #0xe + ldr r6, _022621A4 ; =0x0226D920 + str r7, [sp, #0x28] + str r0, [sp, #0x30] + str r7, [sp, #0x2c] + add r5, r4, #0 +_0226214A: + ldrh r1, [r6] + ldrh r2, [r6, #2] + ldr r0, [r4, #4] + add r3, sp, #0x28 + bl ov70_02260E20 + mov r1, #0x82 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl ov70_02260F38 + add r7, r7, #1 + add r6, r6, #4 + add r5, r5, #4 + cmp r7, #9 + blt _0226214A + ldr r0, _022621A8 ; =0x00000613 + mov r1, #9 + strb r1, [r4, r0] + add r0, r4, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226217C: .word 0x00000614 +_02262180: .word 0x0226D944 +_02262184: .word 0x000004E8 +_02262188: .word 0x00000612 +_0226218C: .word 0x00000608 +_02262190: .word 0x0000FFA4 +_02262194: .word 0x00000609 +_02262198: .word 0x0000060A +_0226219C: .word 0x00000488 +_022621A0: .word 0x0000060B +_022621A4: .word 0x0226D920 +_022621A8: .word 0x00000613 + thumb_func_end ov70_02261E10 + + thumb_func_start ov70_022621AC +ov70_022621AC: ; 0x022621AC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02262208 ; =0x00000613 + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _022621D2 + ldr r7, _02262208 ; =0x00000613 + add r4, r5, #0 +_022621BE: + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov70_02260E8C + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _022621BE +_022621D2: + ldr r0, _0226220C ; =0x00000612 + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _022621F2 + ldr r7, _0226220C ; =0x00000612 + add r4, r5, #0 +_022621E0: + ldr r0, [r5, #4] + ldr r1, [r4, #8] + bl ov70_02261058 + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _022621E0 +_022621F2: + ldr r0, [r5, #4] + bl ov70_02260D80 + ldr r0, [r5, #4] + bl ov70_02260BB8 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_02262208: .word 0x00000613 +_0226220C: .word 0x00000612 + thumb_func_end ov70_022621AC + + thumb_func_start ov70_02262210 +ov70_02262210: ; 0x02262210 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02262288 ; =0x00000608 + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _02262238 + mov r0, #0x92 + lsl r0, r0, #2 + ldr r7, _02262288 ; =0x00000608 + add r4, r5, r0 +_02262226: + ldr r1, [r5, #4] + add r0, r4, #0 + bl ov70_02262A04 + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, #0xc + cmp r6, r0 + blt _02262226 +_02262238: + ldr r0, _0226228C ; =0x00000609 + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _0226225C + mov r0, #0xda + lsl r0, r0, #2 + ldr r7, _0226228C ; =0x00000609 + add r4, r5, r0 +_0226224A: + ldr r1, [r5, #4] + add r0, r4, #0 + bl ov70_02262BEC + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, #0xc + cmp r6, r0 + blt _0226224A +_0226225C: + ldr r0, _02262290 ; =0x0000060B + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _0226227E + ldr r0, _02262294 ; =0x000004E8 + ldr r7, _02262290 ; =0x0000060B + add r4, r5, r0 +_0226226C: + ldr r1, [r5, #4] + add r0, r4, #0 + bl ov70_02262C94 + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, #0xc + cmp r6, r0 + blt _0226226C +_0226227E: + ldr r0, [r5, #4] + bl ov70_02260BE8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02262288: .word 0x00000608 +_0226228C: .word 0x00000609 +_02262290: .word 0x0000060B +_02262294: .word 0x000004E8 + thumb_func_end ov70_02262210 + + thumb_func_start ov70_02262298 +ov70_02262298: ; 0x02262298 + ldr r3, _022622A0 ; =ov70_02260C50 + ldr r0, [r0, #4] + bx r3 + nop +_022622A0: .word ov70_02260C50 + thumb_func_end ov70_02262298 + + thumb_func_start ov70_022622A4 +ov70_022622A4: ; 0x022622A4 + ldr r3, _022622AC ; =ov70_02260CE0 + ldr r0, [r0, #4] + bx r3 + nop +_022622AC: .word ov70_02260CE0 + thumb_func_end ov70_022622A4 + + thumb_func_start ov70_022622B0 +ov70_022622B0: ; 0x022622B0 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _022622E8 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + add r6, r2, #0 + cmp r0, r4 + bhi _022622C6 + bl sub_02022974 +_022622C6: + mov r0, #0xa + lsl r0, r0, #0xe + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #4] + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + str r6, [sp] + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + bl ov70_02260EA0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_022622E8: .word 0x00000613 + thumb_func_end ov70_022622B0 + + thumb_func_start ov70_022622EC +ov70_022622EC: ; 0x022622EC + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _02262314 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + add r6, r2, #0 + cmp r0, r4 + bhi _02262300 + bl sub_02022974 +_02262300: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + bl ov70_02260EE4 + pop {r4, r5, r6, pc} + nop +_02262314: .word 0x00000613 + thumb_func_end ov70_022622EC + + thumb_func_start ov70_02262318 +ov70_02262318: ; 0x02262318 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02262368 ; =0x00000613 + add r6, r1, #0 + ldrb r0, [r5, r0] + add r7, r2, #0 + add r4, r3, #0 + cmp r0, r6 + bhi _0226232E + bl sub_02022974 +_0226232E: + cmp r7, #3 + blo _02262336 + bl sub_02022974 +_02262336: + lsl r0, r6, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r4, #0 + bl ov70_02260F28 + ldr r1, _0226236C ; =0x0226D914 + lsl r0, r7, #2 + ldrsh r1, [r1, r0] + ldr r2, [r4, #0] + lsl r1, r1, #0xc + add r1, r2, r1 + str r1, [r4, #0] + ldr r1, _02262370 ; =0x0226D916 + ldr r2, [r4, #8] + ldrsh r0, [r1, r0] + lsl r0, r0, #0xc + add r0, r2, r0 + str r0, [r4, #8] + mov r0, #0xa + lsl r0, r0, #0xe + str r0, [r4, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02262368: .word 0x00000613 +_0226236C: .word 0x0226D914 +_02262370: .word 0x0226D916 + thumb_func_end ov70_02262318 + + thumb_func_start ov70_02262374 +ov70_02262374: ; 0x02262374 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _02262398 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + cmp r0, r4 + bhi _02262386 + bl sub_02022974 +_02262386: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov70_02260F44 + pop {r3, r4, r5, pc} + nop +_02262398: .word 0x00000613 + thumb_func_end ov70_02262374 + + thumb_func_start ov70_0226239C +ov70_0226239C: ; 0x0226239C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _022623C0 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + cmp r0, r4 + bhi _022623AE + bl sub_02022974 +_022623AE: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov70_02260F5C + pop {r3, r4, r5, pc} + nop +_022623C0: .word 0x00000613 + thumb_func_end ov70_0226239C + + thumb_func_start ov70_022623C4 +ov70_022623C4: ; 0x022623C4 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _022623EC ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + add r6, r2, #0 + cmp r0, r4 + bhi _022623D8 + bl sub_02022974 +_022623D8: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + bl ov70_02260F38 + pop {r4, r5, r6, pc} + nop +_022623EC: .word 0x00000613 + thumb_func_end ov70_022623C4 + + thumb_func_start ov70_022623F0 +ov70_022623F0: ; 0x022623F0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _02262418 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + add r6, r2, #0 + cmp r0, r4 + bhi _02262404 + bl sub_02022974 +_02262404: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, r6, #0 + bl ov70_02260F74 + pop {r4, r5, r6, pc} + nop +_02262418: .word 0x00000613 + thumb_func_end ov70_022623F0 + + thumb_func_start ov70_0226241C +ov70_0226241C: ; 0x0226241C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _02262440 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + cmp r0, r4 + bhi _0226242E + bl sub_02022974 +_0226242E: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov70_02260F80 + pop {r3, r4, r5, pc} + nop +_02262440: .word 0x00000613 + thumb_func_end ov70_0226241C + + thumb_func_start ov70_02262444 +ov70_02262444: ; 0x02262444 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _02262468 ; =0x00000613 + add r4, r1, #0 + ldrb r0, [r5, r0] + cmp r0, r4 + bhi _02262456 + bl sub_02022974 +_02262456: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x82 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl ov70_02260F88 + pop {r3, r4, r5, pc} + nop +_02262468: .word 0x00000613 + thumb_func_end ov70_02262444 + + thumb_func_start ov70_0226246C +ov70_0226246C: ; 0x0226246C + ldr r3, _02262474 ; =ov70_02260DC8 + ldr r0, [r0, #4] + bx r3 + nop +_02262474: .word ov70_02260DC8 + thumb_func_end ov70_0226246C + + thumb_func_start ov70_02262478 +ov70_02262478: ; 0x02262478 + ldr r3, _02262480 ; =ov70_02260DF4 + ldr r0, [r0, #4] + bx r3 + nop +_02262480: .word ov70_02260DF4 + thumb_func_end ov70_02262478 + + thumb_func_start ov70_02262484 +ov70_02262484: ; 0x02262484 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _02262514 ; =0x00000612 + str r1, [sp] + ldrb r0, [r5, r0] + mov r6, #0 + cmp r0, #0 + ble _0226250E + ldr r1, [sp] + sub r0, r2, #1 + sub r1, r1, #1 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + lsl r0, r0, #0x18 + add r4, r5, #0 + str r1, [sp, #4] + lsr r7, r0, #0x18 +_022624A8: + ldr r0, [r4, #8] + ldr r1, [sp, #4] + add r2, r7, #0 + bl ov70_022628C8 + str r0, [sp, #8] + ldr r0, [r4, #8] + ldr r1, [sp] + add r2, r7, #0 + bl ov70_022628C8 + ldr r1, [sp, #8] + cmp r1, #1 + beq _022624C8 + cmp r0, #1 + bne _02262502 +_022624C8: + ldr r0, [r4, #8] + bl ov70_022610B8 + cmp r0, #4 + bhi _02262502 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022624DE: ; jump table + .short _02262502 - _022624DE - 2 ; case 0 + .short _022624E8 - _022624DE - 2 ; case 1 + .short _022624E8 - _022624DE - 2 ; case 2 + .short _022624E8 - _022624DE - 2 ; case 3 + .short _022624E8 - _022624DE - 2 ; case 4 +_022624E8: + ldr r0, _02262518 ; =0x00000611 + ldrb r0, [r5, r0] + cmp r0, #4 + bne _022624FA + ldr r1, [r4, #8] + add r0, r5, #0 + bl ov70_022629AC + b _02262502 +_022624FA: + ldr r1, [r4, #8] + add r0, r5, #0 + bl ov70_02262968 +_02262502: + ldr r0, _02262514 ; =0x00000612 + add r6, r6, #1 + ldrb r0, [r5, r0] + add r4, r4, #4 + cmp r6, r0 + blt _022624A8 +_0226250E: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02262514: .word 0x00000612 +_02262518: .word 0x00000611 + thumb_func_end ov70_02262484 + + thumb_func_start ov70_0226251C +ov70_0226251C: ; 0x0226251C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _022625D4 ; =0x00000612 + add r7, r1, #0 + ldrb r0, [r5, r0] + mov r6, #0 + cmp r0, #0 + ble _022625D2 + add r4, r5, #0 +_0226252E: + ldr r0, [r4, #8] + bl ov70_022610B8 + cmp r0, #4 + bhi _0226254E + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02262544: ; jump table + .short _022625C6 - _02262544 - 2 ; case 0 + .short _02262554 - _02262544 - 2 ; case 1 + .short _02262554 - _02262544 - 2 ; case 2 + .short _02262554 - _02262544 - 2 ; case 3 + .short _02262554 - _02262544 - 2 ; case 4 +_0226254E: + cmp r0, #0xf + beq _02262564 + b _022625C6 +_02262554: + cmp r7, #1 + bne _022625C6 + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #1 + bl ov70_02261398 + b _022625C6 +_02262564: + cmp r7, #1 + bne _022625A0 + mov r1, #2 + ldr r0, [r4, #8] + lsl r1, r1, #0xa + bl ov70_022613C0 + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #0 + mov r3, #6 + bl ov70_0226110C + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #1 + mov r3, #6 + bl ov70_0226110C + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #2 + mov r3, #6 + bl ov70_0226110C + ldr r0, [r4, #8] + mov r1, #1 + bl ov70_0226138C + b _022625C6 +_022625A0: + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #0 + bl ov70_02261220 + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #1 + bl ov70_02261220 + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #2 + bl ov70_02261220 + ldr r0, [r4, #8] + mov r1, #0 + bl ov70_0226138C +_022625C6: + ldr r0, _022625D4 ; =0x00000612 + add r6, r6, #1 + ldrb r0, [r5, r0] + add r4, r4, #4 + cmp r6, r0 + blt _0226252E +_022625D2: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022625D4: .word 0x00000612 + thumb_func_end ov70_0226251C + + thumb_func_start ov70_022625D8 +ov70_022625D8: ; 0x022625D8 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _02262604 ; =0x0000060B + add r7, r1, #0 + ldrb r0, [r6, r0] + mov r4, #0 + cmp r0, #0 + ble _02262600 + ldr r0, _02262608 ; =0x000004E8 + add r5, r6, r0 +_022625EC: + add r0, r5, #0 + add r1, r7, #0 + bl ov70_02262BD0 + ldr r0, _02262604 ; =0x0000060B + add r4, r4, #1 + ldrb r0, [r6, r0] + add r5, #0xc + cmp r4, r0 + blt _022625EC +_02262600: + pop {r3, r4, r5, r6, r7, pc} + nop +_02262604: .word 0x0000060B +_02262608: .word 0x000004E8 + thumb_func_end ov70_022625D8 + + thumb_func_start ov70_0226260C +ov70_0226260C: ; 0x0226260C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02262654 ; =0x00000612 + mov r6, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _02262652 + ldr r7, _02262654 ; =0x00000612 + add r4, r5, #0 +_0226261E: + ldr r0, [r4, #8] + bl ov70_022610B8 + cmp r0, #4 + bhi _02262648 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02262634: ; jump table + .short _02262648 - _02262634 - 2 ; case 0 + .short _0226263E - _02262634 - 2 ; case 1 + .short _0226263E - _02262634 - 2 ; case 2 + .short _0226263E - _02262634 - 2 ; case 3 + .short _0226263E - _02262634 - 2 ; case 4 +_0226263E: + ldr r0, [r5, #4] + ldr r1, [r4, #8] + mov r2, #1 + bl ov70_02261398 +_02262648: + ldrb r0, [r5, r7] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _0226261E +_02262652: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02262654: .word 0x00000612 + thumb_func_end ov70_0226260C + + thumb_func_start ov70_02262658 +ov70_02262658: ; 0x02262658 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, _02262710 ; =0x00000612 + add r7, r1, #0 + ldrb r0, [r4, r0] + mov r6, #0 + cmp r0, #0 + ble _0226270E + add r5, r4, #0 +_0226266A: + ldr r0, [r5, #8] + bl ov70_022610B8 + cmp r0, #0xb + beq _02262678 + cmp r0, #0xc + bne _02262702 +_02262678: + cmp r7, #3 + bhi _02262702 + add r0, r7, r7 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02262688: ; jump table + .short _02262690 - _02262688 - 2 ; case 0 + .short _022626A6 - _02262688 - 2 ; case 1 + .short _022626C0 - _02262688 - 2 ; case 2 + .short _022626E4 - _02262688 - 2 ; case 3 +_02262690: + ldr r0, [r4, #4] + ldr r1, [r5, #8] + mov r2, #0 + mov r3, #2 + bl ov70_0226110C + mov r0, #0x91 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _02262702 +_022626A6: + ldr r0, _02262714 ; =ov70_02262908 + mov r2, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r1, [r5, #8] + mov r3, #1 + bl ov70_0226111C + mov r0, #0x91 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + b _02262702 +_022626C0: + ldr r0, _02262718 ; =ov70_02262938 + mov r2, #0 + str r0, [sp] + ldr r0, [r4, #4] + ldr r1, [r5, #8] + mov r3, #4 + bl ov70_0226111C + ldr r0, [r4, #4] + ldr r1, [r5, #8] + mov r2, #1 + bl ov70_02261220 + mov r0, #0x91 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _02262702 +_022626E4: + ldr r0, [r4, #4] + ldr r1, [r5, #8] + mov r2, #1 + mov r3, #0 + bl ov70_0226110C + ldr r0, [r4, #4] + ldr r1, [r5, #8] + mov r2, #0 + bl ov70_02261220 + mov r0, #0x91 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] +_02262702: + ldr r0, _02262710 ; =0x00000612 + add r6, r6, #1 + ldrb r0, [r4, r0] + add r5, r5, #4 + cmp r6, r0 + blt _0226266A +_0226270E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02262710: .word 0x00000612 +_02262714: .word ov70_02262908 +_02262718: .word ov70_02262938 + thumb_func_end ov70_02262658 + + thumb_func_start ov70_0226271C +ov70_0226271C: ; 0x0226271C + mov r1, #0x91 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov70_0226271C + + thumb_func_start ov70_02262724 +ov70_02262724: ; 0x02262724 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02262750 ; =0x00000608 + add r6, r1, #0 + ldrb r0, [r5, r0] + add r7, r2, #0 + mov r4, #0 + cmp r0, #0 + ble _0226274C +_02262736: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov70_02262754 + ldr r0, _02262750 ; =0x00000608 + add r4, r4, #1 + ldrb r0, [r5, r0] + cmp r4, r0 + blt _02262736 +_0226274C: + pop {r3, r4, r5, r6, r7, pc} + nop +_02262750: .word 0x00000608 + thumb_func_end ov70_02262724 + + thumb_func_start ov70_02262754 +ov70_02262754: ; 0x02262754 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, _02262788 ; =0x00000608 + ldrb r0, [r4, r0] + cmp r1, r0 + bhs _02262784 + mov r0, #0x92 + lsl r0, r0, #2 + add r5, r4, r0 + mov r0, #0xc + mul r0, r1 + cmp r2, #0 + beq _0226277A + ldr r1, [r4, #4] + add r0, r5, r0 + add r2, r3, #0 + bl ov70_02262A50 + b _02262780 +_0226277A: + add r0, r5, r0 + bl ov70_02262A80 +_02262780: + mov r0, #1 + pop {r3, r4, r5, pc} +_02262784: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02262788: .word 0x00000608 + thumb_func_end ov70_02262754 + + thumb_func_start ov70_0226278C +ov70_0226278C: ; 0x0226278C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _022627B8 ; =0x00000609 + add r7, r1, #0 + ldrb r0, [r6, r0] + mov r4, #0 + cmp r0, #0 + ble _022627B6 + mov r0, #0xda + lsl r0, r0, #2 + add r5, r6, r0 +_022627A2: + add r0, r5, #0 + add r1, r7, #0 + bl ov70_02262BD0 + ldr r0, _022627B8 ; =0x00000609 + add r4, r4, #1 + ldrb r0, [r6, r0] + add r5, #0xc + cmp r4, r0 + blt _022627A2 +_022627B6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022627B8: .word 0x00000609 + thumb_func_end ov70_0226278C + + thumb_func_start ov70_022627BC +ov70_022627BC: ; 0x022627BC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r1, r5, r0 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r6, [r1, r0] + add r0, #0xc + ldr r7, [r1, r0] + ldr r0, [sp, #0x18] + add r4, r2, #0 + cmp r0, #1 + beq _022627DA + cmp r3, #1 + bne _0226288A +_022627DA: + add r0, r6, #0 + mov r1, #1 + bl ov70_02261348 + cmp r0, #0 + bne _022627F2 + ldr r0, [r5, #4] + add r1, r6, #0 + mov r2, #1 + mov r3, #0 + bl ov70_0226110C +_022627F2: + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _02262830 + add r0, r4, #4 + lsl r1, r0, #2 + beq _02262810 + lsl r0, r0, #0xe + bl sub_020E17FC + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226281E +_02262810: + lsl r0, r0, #0xe + bl sub_020E17FC + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226281E: + bl sub_020E1740 + add r3, r0, #0 + ldr r0, [r5, #4] + add r1, r7, #0 + mov r2, #0 + bl ov70_022612F0 + pop {r3, r4, r5, r6, r7, pc} +_02262830: + ldr r0, _022628C4 ; =0x0000060C + mov r1, #0x1c + ldr r0, [r5, r0] + add r0, r0, #1 + bl sub_020E2178 + ldr r0, _022628C4 ; =0x0000060C + str r1, [r5, r0] + ldr r0, [r5, r0] + cmp r0, #0xe + bhs _0226287C + lsl r0, r4, #2 + beq _0226285C + lsl r0, r4, #0xe + bl sub_020E17FC + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226286A +_0226285C: + lsl r0, r4, #0xe + bl sub_020E17FC + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226286A: + bl sub_020E1740 + add r3, r0, #0 + ldr r0, [r5, #4] + add r1, r7, #0 + mov r2, #0 + bl ov70_022612F0 + pop {r3, r4, r5, r6, r7, pc} +_0226287C: + mov r2, #0 + ldr r0, [r5, #4] + add r1, r7, #0 + add r3, r2, #0 + bl ov70_022612F0 + pop {r3, r4, r5, r6, r7, pc} +_0226288A: + ldr r0, [sp, #0x1c] + cmp r0, #0 + ldr r0, [r5, #4] + beq _022628AC + add r1, r6, #0 + bl ov70_0226128C + ldr r0, [r5, #4] + add r1, r7, #0 + bl ov70_0226128C + ldr r0, [r5, #4] + add r1, r6, #0 + mov r2, #1 + bl ov70_02261398 + pop {r3, r4, r5, r6, r7, pc} +_022628AC: + add r1, r6, #0 + mov r2, #1 + bl ov70_02261220 + mov r2, #0 + ldr r0, [r5, #4] + add r1, r7, #0 + add r3, r2, #0 + bl ov70_022612F0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022628C4: .word 0x0000060C + thumb_func_end ov70_022627BC + + thumb_func_start ov70_022628C8 +ov70_022628C8: ; 0x022628C8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + lsl r1, r2, #0x14 + asr r4, r1, #0x10 + bl ov70_022610E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #4 + ldrsh r2, [r1, r0] + lsl r0, r5, #0x14 + asr r0, r0, #0x10 + cmp r2, r0 + bne _02262900 + mov r0, #6 + ldrsh r0, [r1, r0] + cmp r0, r4 + bne _02262900 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_02262900: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_022628C8 + + thumb_func_start ov70_02262908 +ov70_02262908: ; 0x02262908 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + bl ov70_022610B8 + add r4, r0, #0 + cmp r4, #0xb + beq _02262922 + cmp r4, #0xc + beq _02262922 + bl sub_02022974 +_02262922: + sub r4, #0xb + cmp r4, #1 + bhi _02262934 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + mov r3, #0 + bl ov70_0226110C +_02262934: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02262908 + + thumb_func_start ov70_02262938 +ov70_02262938: ; 0x02262938 + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + bl ov70_022610B8 + add r4, r0, #0 + cmp r4, #0xb + beq _02262952 + cmp r4, #0xc + beq _02262952 + bl sub_02022974 +_02262952: + sub r4, #0xb + cmp r4, #1 + bhi _02262964 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + mov r3, #2 + bl ov70_0226110C +_02262964: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02262938 + + thumb_func_start ov70_02262968 +ov70_02262968: ; 0x02262968 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + ldr r0, [r6, #4] + add r2, r4, #0 + add r5, r1, #0 + bl ov70_022612B4 + cmp r0, #0 + bne _02262980 + mov r4, #1 + b _02262992 +_02262980: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02261368 + mov r1, #2 + lsl r1, r1, #0xc + cmp r0, r1 + ble _02262992 + mov r4, #1 +_02262992: + cmp r4, #1 + bne _022629A4 + add r0, r6, #0 + add r1, r5, #0 + bl ov70_022629DC + ldr r0, _022629A8 ; =0x000005A5 + bl sub_02005748 +_022629A4: + pop {r4, r5, r6, pc} + nop +_022629A8: .word 0x000005A5 + thumb_func_end ov70_02262968 + + thumb_func_start ov70_022629AC +ov70_022629AC: ; 0x022629AC + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r4, #0 + ldr r0, [r5, #4] + add r2, r4, #0 + add r6, r1, #0 + bl ov70_022612B4 + cmp r0, #0 + bne _022629C2 + mov r4, #1 +_022629C2: + cmp r4, #1 + bne _022629D4 + add r0, r5, #0 + add r1, r6, #0 + bl ov70_022629DC + ldr r0, _022629D8 ; =0x000005A9 + bl sub_02005748 +_022629D4: + pop {r4, r5, r6, pc} + nop +_022629D8: .word 0x000005A9 + thumb_func_end ov70_022629AC + + thumb_func_start ov70_022629DC +ov70_022629DC: ; 0x022629DC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + mov r7, #1 +_022629E6: + ldr r0, [r5, #4] + add r1, r6, #0 + add r2, r4, #0 + add r3, r7, #0 + bl ov70_0226110C + add r4, r4, #1 + cmp r4, #3 + blt _022629E6 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_022629DC + + thumb_func_start ov70_022629FC +ov70_022629FC: ; 0x022629FC + str r1, [r0, #0] + mov r1, #0 + strh r1, [r0, #4] + bx lr + thumb_func_end ov70_022629FC + + thumb_func_start ov70_02262A04 +ov70_02262A04: ; 0x02262A04 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrh r2, [r4, #4] + add r5, r1, #0 + cmp r2, #4 + bhi _02262A4E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_02262A1C: ; jump table + .short _02262A4E - _02262A1C - 2 ; case 0 + .short _02262A26 - _02262A1C - 2 ; case 1 + .short _02262A4E - _02262A1C - 2 ; case 2 + .short _02262A30 - _02262A1C - 2 ; case 3 + .short _02262A3A - _02262A1C - 2 ; case 4 +_02262A26: + bl ov70_02262AA4 + mov r0, #2 + strh r0, [r4, #4] + pop {r3, r4, r5, pc} +_02262A30: + bl ov70_02262B24 + mov r0, #4 + strh r0, [r4, #4] + pop {r3, r4, r5, pc} +_02262A3A: + bl ov70_02262B2C + cmp r0, #1 + bne _02262A4E + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02262AE0 + mov r0, #0 + strh r0, [r4, #4] +_02262A4E: + pop {r3, r4, r5, pc} + thumb_func_end ov70_02262A04 + + thumb_func_start ov70_02262A50 +ov70_02262A50: ; 0x02262A50 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r2, #0 + ldrh r2, [r5, #4] + ldr r3, _02262A7C ; =0x0000FFFF + add r6, r2, r3 + lsl r6, r6, #0x10 + lsr r6, r6, #0x10 + cmp r6, #1 + bls _02262A7A + sub r3, r3, #2 + add r2, r2, r3 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + cmp r2, #1 + bhi _02262A74 + bl ov70_02262AE0 +_02262A74: + mov r0, #1 + strh r0, [r5, #4] + str r4, [r5, #8] +_02262A7A: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02262A7C: .word 0x0000FFFF + thumb_func_end ov70_02262A50 + + thumb_func_start ov70_02262A80 +ov70_02262A80: ; 0x02262A80 + ldrh r2, [r0, #4] + ldr r1, _02262AA0 ; =0x0000FFFD + add r1, r2, r1 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + cmp r1, #1 + bls _02262A9C + cmp r2, #1 + bhi _02262A98 + mov r1, #0 + strh r1, [r0, #4] + bx lr +_02262A98: + mov r1, #3 + strh r1, [r0, #4] +_02262A9C: + bx lr + nop +_02262AA0: .word 0x0000FFFD + thumb_func_end ov70_02262A80 + + thumb_func_start ov70_02262AA4 +ov70_02262AA4: ; 0x02262AA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + bl ov70_022613C0 + mov r2, #0 + ldr r1, [r5, #0] + add r0, r4, #0 + add r3, r2, #0 + bl ov70_0226110C + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #1 + mov r3, #0 + bl ov70_0226110C + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #2 + mov r3, #0 + bl ov70_0226110C + ldr r0, [r5, #0] + mov r1, #1 + bl ov70_0226138C + pop {r3, r4, r5, pc} + thumb_func_end ov70_02262AA4 + + thumb_func_start ov70_02262AE0 +ov70_02262AE0: ; 0x02262AE0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #0 + bl ov70_02261220 + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #1 + bl ov70_02261220 + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #2 + bl ov70_02261220 + ldr r0, [r5, #0] + mov r1, #0 + bl ov70_0226138C + ldr r0, [r5, #0] + bl ov70_022613E0 + mov r1, #1 + lsl r1, r1, #0xc + ldr r0, [r5, #0] + add r2, r1, #0 + add r3, r1, #0 + bl ov70_022613E8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02262AE0 + + thumb_func_start ov70_02262B24 +ov70_02262B24: ; 0x02262B24 + mov r1, #0 + strh r1, [r0, #6] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02262B24 + + thumb_func_start ov70_02262B2C +ov70_02262B2C: ; 0x02262B2C + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #6 + ldrsh r1, [r4, r0] + cmp r1, #0xa + bge _02262BC8 + add r1, r1, #1 + strh r1, [r4, #6] + ldrsh r0, [r4, r0] + ldr r2, [r4, #8] + lsl r0, r0, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #0xa + lsl r1, r1, #0xc + bl sub_020BCFD0 + add r2, r0, #0 + ldr r1, [r4, #8] + ldr r0, [r4, #0] + add r1, r2, r1 + bl ov70_022613C0 + mov r0, #6 + ldrsh r1, [r4, r0] + mov r0, #0x1f + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + mov r2, #0x1f + sub r1, r2, r0 + lsl r1, r1, #0x18 + ldr r0, [r4, #0] + lsr r1, r1, #0x18 + bl ov70_022613C8 + mov r0, #6 + ldrsh r0, [r4, r0] + ldr r2, _02262BCC ; =0x000002E1 + mov r3, #0 + lsl r0, r0, #0xc + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #0xa + lsl r1, r1, #0xc + bl sub_020BCFD0 + mov r3, #1 + add r5, r0, #0 + lsl r3, r3, #0xc + add r1, r5, r3 + ldr r0, [r4, #0] + add r2, r1, #0 + add r3, r5, r3 + bl ov70_022613E8 + mov r0, #0 + pop {r3, r4, r5, pc} +_02262BC8: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02262BCC: .word 0x000002E1 + thumb_func_end ov70_02262B2C + + thumb_func_start ov70_02262BD0 +ov70_02262BD0: ; 0x02262BD0 + ldrh r3, [r0, #4] + ldr r2, _02262BE8 ; =0x0000FFFF + add r2, r3, r2 + lsl r2, r2, #0x10 + lsr r2, r2, #0x10 + cmp r2, #1 + bls _02262BE4 + mov r2, #1 + strh r2, [r0, #4] + str r1, [r0, #8] +_02262BE4: + bx lr + nop +_02262BE8: .word 0x0000FFFF + thumb_func_end ov70_02262BD0 + + thumb_func_start ov70_02262BEC +ov70_02262BEC: ; 0x02262BEC + push {r4, lr} + add r4, r0, #0 + ldrh r2, [r4, #4] + cmp r2, #4 + bhi _02262C5E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_02262C02: ; jump table + .short _02262C62 - _02262C02 - 2 ; case 0 + .short _02262C0C - _02262C02 - 2 ; case 1 + .short _02262C16 - _02262C02 - 2 ; case 2 + .short _02262C2A - _02262C02 - 2 ; case 3 + .short _02262C34 - _02262C02 - 2 ; case 4 +_02262C0C: + bl ov70_02262C64 + mov r0, #2 + strh r0, [r4, #4] + pop {r4, pc} +_02262C16: + add r0, r1, #0 + ldr r1, [r4, #0] + mov r2, #0 + bl ov70_022612B4 + cmp r0, #0 + bne _02262C62 + mov r0, #3 + strh r0, [r4, #4] + pop {r4, pc} +_02262C2A: + bl ov70_02262B24 + mov r0, #4 + strh r0, [r4, #4] + pop {r4, pc} +_02262C34: + bl ov70_02262B2C + cmp r0, #1 + bne _02262C62 + ldr r0, [r4, #0] + mov r1, #0 + bl ov70_0226138C + ldr r0, [r4, #0] + bl ov70_022613E0 + mov r1, #1 + lsl r1, r1, #0xc + ldr r0, [r4, #0] + add r2, r1, #0 + add r3, r1, #0 + bl ov70_022613E8 + mov r0, #0 + strh r0, [r4, #4] + pop {r4, pc} +_02262C5E: + bl sub_02022974 +_02262C62: + pop {r4, pc} + thumb_func_end ov70_02262BEC + + thumb_func_start ov70_02262C64 +ov70_02262C64: ; 0x02262C64 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + bl ov70_022613C0 + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #0 + mov r3, #1 + bl ov70_0226110C + mov r2, #1 + ldr r1, [r5, #0] + add r0, r4, #0 + add r3, r2, #0 + bl ov70_0226110C + ldr r0, [r5, #0] + mov r1, #1 + bl ov70_0226138C + pop {r3, r4, r5, pc} + thumb_func_end ov70_02262C64 + + thumb_func_start ov70_02262C94 +ov70_02262C94: ; 0x02262C94 + push {r4, lr} + add r4, r0, #0 + ldrh r2, [r4, #4] + cmp r2, #4 + bhi _02262D06 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_02262CAA: ; jump table + .short _02262D0A - _02262CAA - 2 ; case 0 + .short _02262CB4 - _02262CAA - 2 ; case 1 + .short _02262CBE - _02262CAA - 2 ; case 2 + .short _02262CD2 - _02262CAA - 2 ; case 3 + .short _02262CDC - _02262CAA - 2 ; case 4 +_02262CB4: + bl ov70_02262D0C + mov r0, #2 + strh r0, [r4, #4] + pop {r4, pc} +_02262CBE: + add r0, r1, #0 + ldr r1, [r4, #0] + mov r2, #0 + bl ov70_022612B4 + cmp r0, #0 + bne _02262D0A + mov r0, #3 + strh r0, [r4, #4] + pop {r4, pc} +_02262CD2: + bl ov70_02262B24 + mov r0, #4 + strh r0, [r4, #4] + pop {r4, pc} +_02262CDC: + bl ov70_02262B2C + cmp r0, #1 + bne _02262D0A + ldr r0, [r4, #0] + mov r1, #0 + bl ov70_0226138C + ldr r0, [r4, #0] + bl ov70_022613E0 + mov r1, #1 + lsl r1, r1, #0xc + ldr r0, [r4, #0] + add r2, r1, #0 + add r3, r1, #0 + bl ov70_022613E8 + mov r0, #0 + strh r0, [r4, #4] + pop {r4, pc} +_02262D06: + bl sub_02022974 +_02262D0A: + pop {r4, pc} + thumb_func_end ov70_02262C94 + + thumb_func_start ov70_02262D0C +ov70_02262D0C: ; 0x02262D0C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, [r5, #0] + ldr r1, [r5, #8] + bl ov70_022613C0 + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #0 + mov r3, #1 + bl ov70_0226110C + mov r2, #1 + ldr r1, [r5, #0] + add r0, r4, #0 + add r3, r2, #0 + bl ov70_0226110C + ldr r1, [r5, #0] + add r0, r4, #0 + mov r2, #2 + mov r3, #1 + bl ov70_0226110C + ldr r0, [r5, #0] + mov r1, #1 + bl ov70_0226138C + pop {r3, r4, r5, pc} + thumb_func_end ov70_02262D0C + + thumb_func_start ov70_02262D48 +ov70_02262D48: ; 0x02262D48 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + cmp r4, #0x5c + beq _02262D5C + cmp r4, #0x5d + beq _02262D5C + bl sub_02022974 +_02262D5C: + add r0, r5, #0 + bl ov70_022610E4 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + sub r4, #0x5c + lsl r2, r4, #2 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #4 + ldrsh r3, [r1, r0] + ldr r0, _02262DA4 ; =0x0226D90C + ldr r0, [r0, r2] + add r0, r3, r0 + strh r0, [r1, #4] + mov r0, #6 + ldrsh r0, [r1, r0] + mov r3, sp + sub r3, r3, #4 + sub r0, #0xa + strh r0, [r1, #6] + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov70_022610BC + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02262DA4: .word 0x0226D90C + thumb_func_end ov70_02262D48 + + .rodata + + + .global Unk_ov70_0226D90C +Unk_ov70_0226D90C: ; 0x0226D90C + .incbin "incbin/overlay70_rodata.bin", 0x440, 0x448 - 0x440 + + .global Unk_ov70_0226D914 +Unk_ov70_0226D914: ; 0x0226D914 + .incbin "incbin/overlay70_rodata.bin", 0x448, 0x454 - 0x448 + + .global Unk_ov70_0226D920 +Unk_ov70_0226D920: ; 0x0226D920 + .incbin "incbin/overlay70_rodata.bin", 0x454, 0x478 - 0x454 + + .global Unk_ov70_0226D944 +Unk_ov70_0226D944: ; 0x0226D944 + .incbin "incbin/overlay70_rodata.bin", 0x478, 0x8C + diff --git a/asm/ov70_02262DA8.s b/asm/ov70_02262DA8.s new file mode 100644 index 000000000..a67924e88 --- /dev/null +++ b/asm/ov70_02262DA8.s @@ -0,0 +1,478 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02262DA8 +ov70_02262DA8: ; 0x02262DA8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0xbf + add r4, r0, #0 + add r0, r6, #0 + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0xbf + mov r1, #0 + lsl r2, r2, #2 + add r7, r0, #0 + bl sub_020D5124 + str r6, [r7, #0] + add r5, r7, #0 + str r4, [r7, #4] + mov r4, #0 + add r5, #8 +_02262DCE: + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov70_02262F64 + add r4, r4, #1 + add r5, #0x24 + cmp r4, #0x14 + blt _02262DCE + mov r0, #0xb6 + lsl r0, r0, #2 + add r0, r7, r0 + mov r1, #0 + add r2, r6, #0 + bl ov70_02262F64 + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02262DA8 + + thumb_func_start ov70_02262DF4 +ov70_02262DF4: ; 0x02262DF4 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r6, #0 + mov r4, #0 + add r5, #8 +_02262DFE: + add r0, r5, #0 + bl ov70_02262F70 + add r4, r4, #1 + add r5, #0x24 + cmp r4, #0x14 + blt _02262DFE + mov r0, #0xb6 + lsl r0, r0, #2 + add r0, r6, r0 + bl ov70_02262F70 + add r0, r6, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02262DF4 + + thumb_func_start ov70_02262E20 +ov70_02262E20: ; 0x02262E20 + ldr r3, _02262E28 ; =ov70_02262F14 + mov r1, #0 + bx r3 + nop +_02262E28: .word ov70_02262F14 + thumb_func_end ov70_02262E20 + + thumb_func_start ov70_02262E2C +ov70_02262E2C: ; 0x02262E2C + ldr r3, _02262E34 ; =ov70_02262F14 + mov r1, #1 + bx r3 + nop +_02262E34: .word ov70_02262F14 + thumb_func_end ov70_02262E2C + + thumb_func_start ov70_02262E38 +ov70_02262E38: ; 0x02262E38 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov70_02262E38 + + thumb_func_start ov70_02262E3C +ov70_02262E3C: ; 0x02262E3C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + add r4, r1, #0 + cmp r0, #0 + beq _02262E4C + bl sub_02022974 +_02262E4C: + ldrh r0, [r5] + add r1, r4, #0 + bl sub_02018144 + mov r1, #0 + add r2, r4, #0 + str r0, [r5, #8] + bl sub_020D5124 + ldr r0, [r5, #8] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02262E3C + + thumb_func_start ov70_02262E64 +ov70_02262E64: ; 0x02262E64 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + bne _02262E72 + bl sub_02022974 +_02262E72: + ldr r0, [r4, #8] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02262E64 + + thumb_func_start ov70_02262E80 +ov70_02262E80: ; 0x02262E80 + ldr r0, [r0, #8] + bx lr + thumb_func_end ov70_02262E80 + + thumb_func_start ov70_02262E84 +ov70_02262E84: ; 0x02262E84 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov70_02262E84 + + thumb_func_start ov70_02262E88 +ov70_02262E88: ; 0x02262E88 + str r1, [r0, #0x10] + bx lr + thumb_func_end ov70_02262E88 + + thumb_func_start ov70_02262E8C +ov70_02262E8C: ; 0x02262E8C + ldr r1, [r0, #0x10] + add r1, r1, #1 + str r1, [r0, #0x10] + bx lr + thumb_func_end ov70_02262E8C + + thumb_func_start ov70_02262E94 +ov70_02262E94: ; 0x02262E94 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _02262EA6 + bl sub_02022974 +_02262EA6: + cmp r4, #0x14 + blo _02262EAE + bl sub_02022974 +_02262EAE: + mov r0, #0x24 + add r5, #8 + mul r0, r4 + add r0, r5, r0 + add r1, r6, #0 + add r2, r7, #0 + bl ov70_02262FD4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02262E94 + + thumb_func_start ov70_02262EC0 +ov70_02262EC0: ; 0x02262EC0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r5, #0 + bne _02262ED2 + bl sub_02022974 +_02262ED2: + cmp r4, #0x14 + blo _02262EDA + bl sub_02022974 +_02262EDA: + mov r0, #0x24 + add r5, #8 + mul r0, r4 + add r0, r5, r0 + add r1, r6, #0 + add r2, r7, #0 + bl ov70_0226300C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02262EC0 + + thumb_func_start ov70_02262EEC +ov70_02262EEC: ; 0x02262EEC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0 + bne _02262EFC + bl sub_02022974 +_02262EFC: + cmp r4, #0x14 + blo _02262F04 + bl sub_02022974 +_02262F04: + mov r0, #0x24 + add r5, #8 + mul r0, r4 + add r0, r5, r0 + add r1, r6, #0 + bl ov70_02263008 + pop {r4, r5, r6, pc} + thumb_func_end ov70_02262EEC + + thumb_func_start ov70_02262F14 +ov70_02262F14: ; 0x02262F14 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0xb6 + lsl r0, r0, #2 + add r0, r7, r0 + str r1, [sp] + bl ov70_0226307C + cmp r0, #1 + bne _02262F3A + mov r0, #0xb6 + lsl r0, r0, #2 + ldr r2, [sp] + add r0, r7, r0 + add r1, r7, #0 + mov r3, #0 + bl ov70_02262F94 + pop {r3, r4, r5, r6, r7, pc} +_02262F3A: + add r6, r7, #0 + add r6, #8 + mov r4, #0 + add r5, r6, #0 +_02262F42: + add r0, r6, #0 + bl ov70_0226307C + cmp r0, #1 + bne _02262F58 + ldr r2, [sp] + add r0, r5, #0 + add r1, r7, #0 + add r3, r4, #0 + bl ov70_02262F94 +_02262F58: + add r4, r4, #1 + add r6, #0x24 + add r5, #0x24 + cmp r4, #0x14 + blt _02262F42 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02262F14 + + thumb_func_start ov70_02262F64 +ov70_02262F64: ; 0x02262F64 + strh r2, [r0] + mov r2, #1 + strb r2, [r0, #2] + strb r1, [r0, #3] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02262F64 + + thumb_func_start ov70_02262F70 +ov70_02262F70: ; 0x02262F70 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02262F7E + bl sub_020181C4 +_02262F7E: + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _02262F88 + bl sub_020181C4 +_02262F88: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x24 + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov70_02262F70 + + thumb_func_start ov70_02262F94 +ov70_02262F94: ; 0x02262F94 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrb r0, [r5, #2] + add r6, r1, #0 + add r7, r3, #0 + cmp r0, #0 + beq _02262FD2 + cmp r2, #0 + beq _02262FAC + cmp r2, #1 + beq _02262FB2 + b _02262FB8 +_02262FAC: + ldr r0, [r5, #4] + ldr r4, [r0, #0] + b _02262FBC +_02262FB2: + ldr r0, [r5, #4] + ldr r4, [r0, #4] + b _02262FBC +_02262FB8: + bl sub_02022974 +_02262FBC: + cmp r4, #0 + beq _02262FD2 + ldr r1, [r6, #4] + add r0, r5, #0 + add r2, r7, #0 + blx r4 + cmp r0, #1 + bne _02262FD2 + add r0, r5, #0 + bl ov70_02263044 +_02262FD2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02262F94 + + thumb_func_start ov70_02262FD4 +ov70_02262FD4: ; 0x02262FD4 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov70_0226306C + cmp r0, #1 + beq _02262FEA + bl sub_02022974 +_02262FEA: + ldr r0, [r5, #8] + cmp r0, #0 + beq _02262FF4 + bl sub_02022974 +_02262FF4: + mov r3, #0 + add r0, r5, #4 + add r1, r4, #0 + add r2, r6, #0 + str r3, [sp] + bl ov70_0226308C + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02262FD4 + + thumb_func_start ov70_02263008 +ov70_02263008: ; 0x02263008 + strb r1, [r0, #2] + bx lr + thumb_func_end ov70_02263008 + + thumb_func_start ov70_0226300C +ov70_0226300C: ; 0x0226300C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov70_0226306C + cmp r0, #1 + beq _02263022 + bl sub_02022974 +_02263022: + add r2, r5, #0 + add r3, r5, #4 + add r2, #0x14 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r3, #0 + add r0, r5, #4 + add r1, r4, #0 + add r2, r6, #0 + str r3, [sp] + bl ov70_0226308C + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0226300C + + thumb_func_start ov70_02263044 +ov70_02263044: ; 0x02263044 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _02263052 + bl sub_02022974 +_02263052: + add r3, r4, #0 + add r3, #0x14 + add r2, r4, #4 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r4, #0x14 + add r0, r4, #0 + bl ov70_02263098 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02263044 + + thumb_func_start ov70_0226306C +ov70_0226306C: ; 0x0226306C + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _02263076 + mov r0, #1 + bx lr +_02263076: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226306C + + thumb_func_start ov70_0226307C +ov70_0226307C: ; 0x0226307C + ldr r0, [r0, #4] + cmp r0, #0 + beq _02263086 + mov r0, #1 + bx lr +_02263086: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226307C + + thumb_func_start ov70_0226308C +ov70_0226308C: ; 0x0226308C + str r1, [r0, #0] + ldr r1, [sp] + str r3, [r0, #0xc] + str r1, [r0, #4] + str r2, [r0, #8] + bx lr + thumb_func_end ov70_0226308C + + thumb_func_start ov70_02263098 +ov70_02263098: ; 0x02263098 + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #0xc] + str r1, [r0, #4] + str r1, [r0, #8] + bx lr + thumb_func_end ov70_02263098 \ No newline at end of file diff --git a/asm/ov70_022630A4.s b/asm/ov70_022630A4.s new file mode 100644 index 000000000..5787ac0d7 --- /dev/null +++ b/asm/ov70_022630A4.s @@ -0,0 +1,5674 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_022630A4 +ov70_022630A4: ; 0x022630A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov70_0225DEEC + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225DF10 + add r7, r0, #0 + add r0, r5, #0 + bl ov70_0225DF2C + add r6, r0, #0 + add r0, r5, #0 + bl ov70_0225DEE8 + mov r1, #1 + bl ov66_0222E3E4 + ldrh r0, [r4, #6] + cmp r0, #4 + blo _022630D4 + bl sub_02022974 +_022630D4: + ldrh r2, [r4, #6] + ldr r3, _022630E8 ; =0x0226DA78 + add r0, r7, #0 + lsl r2, r2, #3 + add r2, r3, r2 + add r1, r6, #0 + mov r3, #0 + bl ov70_02262E94 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022630E8: .word 0x0226DA78 + thumb_func_end ov70_022630A4 + + thumb_func_start ov70_022630EC +ov70_022630EC: ; 0x022630EC + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + bl ov70_0225DF2C + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DF10 + ldr r7, _0226311C ; =0x0226DA10 + add r6, r0, #0 + mov r4, #0 +_02263102: + cmp r5, r4 + beq _02263112 + add r0, r6, #0 + add r1, r4, #0 + add r2, r7, #0 + mov r3, #0 + bl ov70_02262E94 +_02263112: + add r4, r4, #1 + cmp r4, #0x14 + blt _02263102 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226311C: .word 0x0226DA10 + thumb_func_end ov70_022630EC + + thumb_func_start ov70_02263120 +ov70_02263120: ; 0x02263120 + cmp r0, #3 + bhi _02263146 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02263130: ; jump table + .short _02263138 - _02263130 - 2 ; case 0 + .short _0226313C - _02263130 - 2 ; case 1 + .short _02263140 - _02263130 - 2 ; case 2 + .short _02263144 - _02263130 - 2 ; case 3 +_02263138: + mov r1, #0x40 + b _02263146 +_0226313C: + mov r1, #0x80 + b _02263146 +_02263140: + mov r1, #0x20 + b _02263146 +_02263144: + mov r1, #0x10 +_02263146: + ldr r0, _02263158 ; =0x021BF67C + ldr r0, [r0, #0x44] + tst r0, r1 + beq _02263152 + mov r0, #1 + bx lr +_02263152: + mov r0, #0 + bx lr + nop +_02263158: .word 0x021BF67C + thumb_func_end ov70_02263120 + + thumb_func_start ov70_0226315C +ov70_0226315C: ; 0x0226315C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r1, [sp] + add r7, r0, #0 + str r2, [sp, #4] + add r4, r3, #0 + ldr r5, [sp, #0x28] + bl ov70_02262E80 + str r0, [sp, #0xc] + ldr r0, [sp] + bl ov70_0225DF10 + str r0, [sp, #8] + ldr r0, [r4, #8] + mov r2, #0 + cmp r0, #3 + beq _022631F0 + add r6, r4, #0 + add r1, r2, #0 +_02263184: + add r3, r1, #0 +_02263186: + ldrb r0, [r6, r3] + cmp r0, #0xff + beq _022631E6 + cmp r5, r0 + bne _022631E0 + mov r0, #0x18 + add r5, r2, #0 + mul r5, r0 + add r6, r4, r5 + ldr r0, [r6, #8] + cmp r0, #0 + beq _022631A6 + cmp r0, #1 + beq _022631BE + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_022631A6: + add r0, r7, #0 + bl ov70_02262E64 + add r2, r6, #0 + ldr r0, [sp, #8] + ldr r1, [sp, #4] + add r2, #0xc + mov r3, #0 + bl ov70_02262E94 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_022631BE: + ldr r7, [r6, #0x14] + cmp r7, #0 + beq _022631CE + ldrb r3, [r3, r6] + ldr r0, [sp, #0xc] + ldr r1, [sp] + ldr r2, [sp, #4] + blx r7 +_022631CE: + add r2, r4, r5 + ldr r0, [sp, #8] + ldr r1, [sp, #4] + add r2, #0xc + mov r3, #0 + bl ov70_02262EC0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} +_022631E0: + add r3, r3, #1 + cmp r3, #8 + blt _02263186 +_022631E6: + add r6, #0x18 + ldr r0, [r6, #8] + add r2, r2, #1 + cmp r0, #3 + bne _02263184 +_022631F0: + bl sub_02022974 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0226315C + + thumb_func_start ov70_022631F8 +ov70_022631F8: ; 0x022631F8 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + bl ov70_0225DEF0 + add r1, r4, #0 + bl ov70_0225CB28 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225DF08 + add r5, r0, #0 + add r0, r4, #0 + add r1, sp, #0 + bl ov70_0225D054 + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r5, #0 + bl ov70_02260B20 + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_022631F8 + + thumb_func_start ov70_02263230 +ov70_02263230: ; 0x02263230 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + str r3, [sp] + bl ov70_0225DEF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225DF08 + str r0, [sp, #4] + ldr r3, [sp] + add r0, r4, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov70_0225CB5C + add r5, r0, #0 + ldr r3, [sp, #0x20] + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov70_0225CD7C + ldr r0, [sp, #4] + add r1, r5, #0 + bl ov70_02260B38 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02263230 + + thumb_func_start ov70_02263270 +ov70_02263270: ; 0x02263270 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + str r0, [r4, #0] + strb r0, [r4, #4] + mov r0, #1 + strb r0, [r4, #5] + bl sub_0201D35C + mov r1, #3 + and r0, r1 + strb r0, [r4, #6] + mov r0, #1 + strb r0, [r4, #7] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_02263270 + + thumb_func_start ov70_02263290 +ov70_02263290: ; 0x02263290 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #5] + cmp r0, #0 + beq _022632A4 + cmp r0, #1 + beq _022632AA + cmp r0, #2 + beq _022632BC + b _0226331E +_022632A4: + mov r0, #0 + str r0, [r4, #0] + b _0226331E +_022632AA: + ldrb r0, [r4, #6] + sub r0, r0, #1 + cmp r0, #0 + ble _022632B6 + strb r0, [r4, #6] + b _0226331E +_022632B6: + mov r0, #2 + strb r0, [r4, #5] + b _0226331E +_022632BC: + mov r0, #4 + ldrsb r1, [r4, r0] + mov r3, #0 + add r1, r1, #1 + strb r1, [r4, #4] + ldrsb r1, [r4, r0] + ldr r0, _02263324 ; =0x00007FFF + add r2, r1, #0 + mul r2, r0 + asr r0, r2, #1 + lsr r0, r0, #0x1e + add r0, r2, r0 + lsl r0, r0, #0xe + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02263328 ; =0x020F983C + mov r2, #6 + ldrsh r0, [r0, r1] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r4, #0] + mov r0, #4 + ldrsb r0, [r4, r0] + cmp r0, #4 + blt _0226331E + ldrb r0, [r4, #7] + cmp r0, #1 + bne _0226331C + strb r3, [r4, #4] + mov r0, #1 + strb r0, [r4, #5] + bl sub_0201D35C + mov r1, #3 + and r0, r1 + strb r0, [r4, #6] + b _0226331E +_0226331C: + strb r3, [r4, #5] +_0226331E: + ldr r0, [r4, #0] + pop {r4, pc} + nop +_02263324: .word 0x00007FFF +_02263328: .word 0x020F983C + thumb_func_end ov70_02263290 + + thumb_func_start ov70_0226332C +ov70_0226332C: ; 0x0226332C + mov r1, #0 + strb r1, [r0, #7] + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226332C + + thumb_func_start ov70_02263334 +ov70_02263334: ; 0x02263334 + ldrb r0, [r0, #5] + cmp r0, #0 + beq _0226333E + mov r0, #1 + bx lr +_0226333E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_02263334 + + thumb_func_start ov70_02263344 +ov70_02263344: ; 0x02263344 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + add r0, r5, #0 + bl ov70_0225DEF0 + add r1, r4, #0 + add r7, r0, #0 + bl ov70_0225CC70 + str r0, [sp] + add r0, r5, #0 + bl ov70_0225DEE8 + str r0, [sp, #4] + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _0226337A + cmp r0, #1 + beq _0226339E + cmp r0, #2 + beq _022633B4 + b _0226340C +_0226337A: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0225E46C + add r0, r6, #0 + mov r1, #1 + bl ov70_02262E88 + ldr r0, [sp, #4] + bl ov66_0222E338 + cmp r4, r0 + bne _0226340C + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E43C + b _0226340C +_0226339E: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0225E4AC + cmp r0, #1 + bne _0226340C + add r0, r6, #0 + mov r1, #2 + bl ov70_02262E88 + b _0226340C +_022633B4: + ldr r0, [sp, #4] + bl ov66_0222E338 + cmp r4, r0 + bne _022633CA + ldr r1, [sp] + add r0, r7, #0 + mov r2, #1 + bl ov70_0225CDEC + b _02263400 +_022633CA: + add r0, r5, #0 + bl ov70_0225E3F0 + cmp r0, #1 + bne _022633EA + add r0, r5, #0 + bl ov70_0225E3E0 + cmp r4, r0 + beq _022633F4 + ldr r1, [sp] + add r0, r7, #0 + mov r2, #2 + bl ov70_0225CDEC + b _022633F4 +_022633EA: + ldr r1, [sp] + add r0, r7, #0 + mov r2, #2 + bl ov70_0225CDEC +_022633F4: + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF4C +_02263400: + add r0, r5, #0 + bl ov70_0225E44C + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0226340C: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02263344 + + thumb_func_start ov70_02263414 +ov70_02263414: ; 0x02263414 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + str r2, [sp] + bl ov70_0225DEE8 + str r0, [sp, #4] + add r0, r5, #0 + bl ov70_0225DEF0 + str r0, [sp, #8] + bl ov70_0225CCAC + add r7, r0, #0 + add r0, r6, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0x16 + bhi _022634FE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02263452: ; jump table + .short _02263480 - _02263452 - 2 ; case 0 + .short _022634C0 - _02263452 - 2 ; case 1 + .short _022634F6 - _02263452 - 2 ; case 2 + .short _02263510 - _02263452 - 2 ; case 3 + .short _0226352A - _02263452 - 2 ; case 4 + .short _02263544 - _02263452 - 2 ; case 5 + .short _0226355E - _02263452 - 2 ; case 6 + .short _02263578 - _02263452 - 2 ; case 7 + .short _0226358E - _02263452 - 2 ; case 8 + .short _022635AE - _02263452 - 2 ; case 9 + .short _022635E0 - _02263452 - 2 ; case 10 + .short _02263654 - _02263452 - 2 ; case 11 + .short _0226369A - _02263452 - 2 ; case 12 + .short _022636CC - _02263452 - 2 ; case 13 + .short _022638F6 - _02263452 - 2 ; case 14 + .short _02263740 - _02263452 - 2 ; case 15 + .short _02263786 - _02263452 - 2 ; case 16 + .short _022637DE - _02263452 - 2 ; case 17 + .short _022637FE - _02263452 - 2 ; case 18 + .short _0226384C - _02263452 - 2 ; case 19 + .short _02263876 - _02263452 - 2 ; case 20 + .short _022638AA - _02263452 - 2 ; case 21 + .short _022638BE - _02263452 - 2 ; case 22 +_02263480: + add r0, r6, #0 + mov r1, #0x2c + bl ov70_02262E3C + add r1, r5, #0 + add r4, r0, #0 + bl ov70_022653DC + ldr r0, [sp, #4] + bl ov66_0222E2CC + ldr r0, [sp, #4] + bl ov66_0222F0DC + strh r0, [r4, #2] + ldrh r1, [r4, #2] + ldr r0, [sp, #4] + bl ov66_0222E528 + ldr r1, [sp] + add r0, r5, #0 + bl ov70_022631F8 + add r1, r0, #0 + ldr r0, [sp, #8] + mov r2, #4 + bl ov70_0225CDEC + add r0, r6, #0 + bl ov70_02262E8C + b _022638F6 +_022634C0: + add r0, r5, #0 + bl ov70_0225DF30 + cmp r0, #0 + bne _022634FE + add r0, r7, #0 + bl ov70_0225CE38 + cmp r0, #1 + bne _022634FE + ldr r0, [sp, #8] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + add r0, r5, #0 + bl ov70_0225DF08 + add r1, r7, #0 + bl ov70_02260B38 + mov r0, #0x10 + str r0, [r4, #4] + add r0, r6, #0 + bl ov70_02262E8C + b _022638F6 +_022634F6: + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + beq _02263500 +_022634FE: + b _022638F6 +_02263500: + add r0, r5, #0 + mov r1, #1 + bl ov70_0225DF18 + add r0, r6, #0 + bl ov70_02262E8C + b _022638F6 +_02263510: + ldr r0, [sp, #8] + add r1, r7, #0 + mov r2, #2 + mov r3, #0 + bl ov70_0225CD7C + mov r0, #4 + strh r0, [r4] + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + b _022638F6 +_0226352A: + ldr r0, [sp, #8] + add r1, r7, #0 + mov r2, #2 + mov r3, #0 + bl ov70_0225CD7C + mov r0, #5 + strh r0, [r4] + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + b _022638F6 +_02263544: + ldr r0, [sp, #8] + add r1, r7, #0 + mov r2, #1 + mov r3, #3 + bl ov70_0225CD7C + mov r0, #6 + strh r0, [r4] + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + b _022638F6 +_0226355E: + ldr r0, [sp, #8] + add r1, r7, #0 + mov r2, #2 + mov r3, #3 + bl ov70_0225CD7C + mov r0, #8 + strh r0, [r4] + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + b _022638F6 +_02263578: + add r0, r7, #0 + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _02263662 + ldrh r1, [r4] + add r0, r6, #0 + bl ov70_02262E88 + b _022638F6 +_0226358E: + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x10 + strh r0, [r4] + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + b _022638F6 +_022635AE: + add r0, r5, #0 + mov r1, #1 + mov r2, #5 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r4, #8 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E0F4 + add r0, r6, #0 + mov r1, #0xa + bl ov70_02262E88 + b _022638F6 +_022635E0: + add r0, r5, #0 + mov r7, #0 + bl ov70_0225E0D4 + add r2, r0, #0 + beq _02263600 + sub r0, r7, #2 + cmp r2, r0 + beq _022635FA + add r0, r0, #1 + cmp r2, r0 + beq _02263614 + b _02263608 +_022635FA: + ldr r0, _022638FC ; =0x000005DC + bl sub_02005748 +_02263600: + mov r0, #0 + strh r0, [r4, #0x28] + mov r7, #1 + b _02263614 +_02263608: + add r0, r5, #0 + mov r1, #0 + strh r2, [r4, #0x28] + mov r7, #1 + bl ov70_0225E30C +_02263614: + cmp r7, #1 + bne _02263662 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + ldrh r0, [r4, #0x28] + cmp r0, #0 + beq _0226364A + add r0, r5, #0 + mov r1, #1 + mov r2, #8 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225E164 + add r0, r6, #0 + mov r1, #0xb + bl ov70_02262E88 + b _022638F6 +_0226364A: + add r0, r6, #0 + mov r1, #0x11 + bl ov70_02262E88 + b _022638F6 +_02263654: + add r0, r5, #0 + bl ov70_0225E1C4 + cmp r0, #0 + beq _02263664 + cmp r0, #1 + beq _0226368A +_02263662: + b _022638F6 +_02263664: + add r0, r5, #0 + bl ov70_0225E1F8 + add r0, r6, #0 + mov r1, #0xc + bl ov70_02262E88 + ldrh r1, [r4, #0x28] + ldrh r2, [r4, #0x2a] + ldr r0, [sp, #4] + bl ov66_0222E56C + add r0, r5, #0 + bl ov70_0225E390 + ldr r0, _02263900 ; =0x000005E5 + bl sub_02005748 + b _022638F6 +_0226368A: + add r0, r5, #0 + bl ov70_0225E1F8 + add r0, r6, #0 + mov r1, #9 + bl ov70_02262E88 + b _022638F6 +_0226369A: + add r0, r5, #0 + mov r1, #1 + mov r2, #0xa + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r4, #8 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E0F4 + add r0, r6, #0 + mov r1, #0xd + bl ov70_02262E88 + b _022638F6 +_022636CC: + add r0, r5, #0 + mov r7, #0 + bl ov70_0225E0D4 + add r2, r0, #0 + beq _022636EC + sub r0, r7, #2 + cmp r2, r0 + beq _022636E6 + add r0, r0, #1 + cmp r2, r0 + beq _02263700 + b _022636F4 +_022636E6: + ldr r0, _022638FC ; =0x000005DC + bl sub_02005748 +_022636EC: + mov r0, #0 + strh r0, [r4, #0x2a] + mov r7, #1 + b _02263700 +_022636F4: + add r0, r5, #0 + mov r1, #0 + strh r2, [r4, #0x2a] + mov r7, #1 + bl ov70_0225E30C +_02263700: + cmp r7, #1 + bne _0226374E + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + ldrh r0, [r4, #0x2a] + cmp r0, #0 + beq _02263736 + add r0, r5, #0 + mov r1, #1 + mov r2, #8 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225E164 + add r0, r6, #0 + mov r1, #0xf + bl ov70_02262E88 + b _022638F6 +_02263736: + add r0, r6, #0 + mov r1, #0x13 + bl ov70_02262E88 + b _022638F6 +_02263740: + add r0, r5, #0 + bl ov70_0225E1C4 + cmp r0, #0 + beq _02263750 + cmp r0, #1 + beq _02263776 +_0226374E: + b _022638F6 +_02263750: + add r0, r5, #0 + bl ov70_0225E1F8 + add r0, r6, #0 + mov r1, #0x14 + bl ov70_02262E88 + ldrh r1, [r4, #0x28] + ldrh r2, [r4, #0x2a] + ldr r0, [sp, #4] + bl ov66_0222E56C + add r0, r5, #0 + bl ov70_0225E390 + ldr r0, _02263900 ; =0x000005E5 + bl sub_02005748 + b _022638F6 +_02263776: + add r0, r5, #0 + bl ov70_0225E1F8 + add r0, r6, #0 + mov r1, #0xc + bl ov70_02262E88 + b _022638F6 +_02263786: + ldr r0, _02263904 ; =0x000005A8 + bl sub_02005748 + add r0, r5, #0 + bl ov70_0225E430 + ldr r1, [sp] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrh r1, [r4, #2] + add r0, r5, #0 + mov r2, #1 + bl ov70_0225E29C + ldr r0, [sp, #4] + ldr r1, [sp] + bl ov66_0222E924 + cmp r0, #0 + bne _022637BE + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E20C + b _022637C8 +_022637BE: + add r0, r5, #0 + mov r1, #1 + mov r2, #0x7c + bl ov70_0225E20C +_022637C8: + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x12 + strh r0, [r4] + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + b _022638F6 +_022637DE: + add r0, r5, #0 + mov r1, #1 + mov r2, #2 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x16 + strh r0, [r4] + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + b _022638F6 +_022637FE: + ldr r0, _02263904 ; =0x000005A8 + bl sub_020057D4 + cmp r0, #0 + bne _022638F6 + ldr r0, _02263908 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _022638F6 + ldr r0, _022638FC ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #1 + mov r2, #4 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #9 + strh r0, [r4] + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + ldrh r1, [r4, #0x28] + ldrh r2, [r4, #0x2a] + ldr r0, [sp, #4] + bl ov66_0222E56C + ldr r1, [sp] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E328 + b _022638F6 +_0226384C: + ldrh r2, [r4, #0x28] + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E30C + add r0, r5, #0 + mov r1, #1 + mov r2, #0xc + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x11 + strh r0, [r4] + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + b _022638F6 +_02263876: + ldrh r2, [r4, #0x28] + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E30C + ldrh r2, [r4, #0x2a] + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E30C + add r0, r5, #0 + mov r1, #1 + mov r2, #0xb + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x11 + strh r0, [r4] + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + b _022638F6 +_022638AA: + add r0, r5, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _022638F6 + ldrh r1, [r4] + add r0, r6, #0 + bl ov70_02262E88 + b _022638F6 +_022638BE: + ldr r0, [sp, #8] + add r1, r7, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r5, #0 + bl ov70_0225DFEC + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02265450 + add r0, r6, #0 + bl ov70_02262E64 + add r0, r5, #0 + bl ov70_0225DF10 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225DF2C + add r1, r0, #0 + ldr r2, _0226390C ; =0x0226D9D0 + add r0, r4, #0 + mov r3, #0 + bl ov70_02262E94 +_022638F6: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022638FC: .word 0x000005DC +_02263900: .word 0x000005E5 +_02263904: .word 0x000005A8 +_02263908: .word 0x021BF67C +_0226390C: .word 0x0226D9D0 + thumb_func_end ov70_02263414 + + thumb_func_start ov70_02263910 +ov70_02263910: ; 0x02263910 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + str r2, [sp, #4] + bl ov70_0225DEE8 + str r0, [sp, #8] + add r0, r4, #0 + bl ov70_0225DEEC + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DEF0 + str r0, [sp, #0xc] + bl ov70_0225CCAC + add r7, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #5 + bls _02263944 + b _02263A4E +_02263944: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02263950: ; jump table + .short _0226395C - _02263950 - 2 ; case 0 + .short _02263988 - _02263950 - 2 ; case 1 + .short _022639BE - _02263950 - 2 ; case 2 + .short _022639EE - _02263950 - 2 ; case 3 + .short _02263A12 - _02263950 - 2 ; case 4 + .short _02263A2A - _02263950 - 2 ; case 5 +_0226395C: + mov r0, #1 + str r0, [sp] + ldrh r2, [r6] + ldrh r3, [r6, #2] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov70_02263230 + bl ov66_02231760 + cmp r0, #0 + bne _02263978 + bl ov66_02232AA4 +_02263978: + ldr r0, [sp, #8] + mov r1, #0 + bl ov66_0222E31C + add r0, r5, #0 + bl ov70_02262E8C + b _02263A4E +_02263988: + bl ov66_02231760 + cmp r0, #0 + bne _02263998 + bl ov66_02232AD4 + cmp r0, #0 + beq _02263A4E +_02263998: + add r0, r4, #0 + bl ov70_0225DEEC + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DF30 + cmp r0, #0 + bne _02263A4E + add r0, r5, #0 + bl ov70_02262E8C + ldrh r3, [r6, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #2 + bl ov70_0225CDAC + b _02263A4E +_022639BE: + add r0, r7, #0 + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _02263A4E + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF18 + ldr r0, [sp, #8] + bl ov66_0222E2B4 + cmp r0, #1 + bne _022639E4 + add r0, r5, #0 + bl ov70_02262E8C + b _02263A4E +_022639E4: + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _02263A4E +_022639EE: + ldrh r1, [r6, #8] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #0 + mov r2, #0x15 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _02263A4E +_02263A12: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _02263A4E + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r5, #0 + bl ov70_02262E8C + b _02263A4E +_02263A2A: + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DF10 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DF2C + add r1, r0, #0 + ldr r2, _02263A54 ; =0x0226D9D0 + add r0, r5, #0 + mov r3, #0 + bl ov70_02262E94 +_02263A4E: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02263A54: .word 0x0226D9D0 + thumb_func_end ov70_02263910 + + thumb_func_start ov70_02263A58 +ov70_02263A58: ; 0x02263A58 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + str r2, [sp, #4] + bl ov70_0225DF10 + str r0, [sp, #8] + add r0, r4, #0 + bl ov70_0225DEF0 + str r0, [sp, #0xc] + bl ov70_0225CCAC + add r7, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + str r0, [sp, #0x10] + add r0, r4, #0 + bl ov70_0225DEEC + add r6, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #5 + bls _02263A94 + b _02263B96 +_02263A94: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02263AA0: ; jump table + .short _02263AAC - _02263AA0 - 2 ; case 0 + .short _02263ADE - _02263AA0 - 2 ; case 1 + .short _02263B04 - _02263AA0 - 2 ; case 2 + .short _02263B36 - _02263AA0 - 2 ; case 3 + .short _02263B5A - _02263AA0 - 2 ; case 4 + .short _02263B72 - _02263AA0 - 2 ; case 5 +_02263AAC: + mov r0, #1 + str r0, [sp] + ldrh r2, [r6] + ldrh r3, [r6, #2] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov70_02263230 + add r0, r5, #0 + bl ov70_02262E8C + ldr r0, [sp, #8] + ldr r1, [sp, #4] + ldr r2, _02263B9C ; =0x0226DA00 + mov r3, #0 + bl ov70_02262EC0 + ldr r0, [sp, #0x10] + mov r1, #0 + bl ov66_0222E2C4 + ldr r0, [sp, #0x10] + bl ov66_0222E2CC + b _02263B96 +_02263ADE: + add r0, r4, #0 + bl ov70_0225DEEC + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DF30 + cmp r0, #0 + bne _02263B96 + add r0, r5, #0 + bl ov70_02262E8C + ldrh r3, [r6, #4] + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #2 + bl ov70_0225CDAC + b _02263B96 +_02263B04: + add r0, r7, #0 + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _02263B96 + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF18 + ldr r0, [sp, #0x10] + bl ov66_0222E220 + cmp r0, #1 + bne _02263B2C + add r0, r5, #0 + mov r1, #3 + bl ov70_02262E88 + b _02263B96 +_02263B2C: + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _02263B96 +_02263B36: + ldrh r1, [r6, #8] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #0 + mov r2, #8 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _02263B96 +_02263B5A: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _02263B96 + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r5, #0 + bl ov70_02262E8C + b _02263B96 +_02263B72: + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DF10 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DF2C + add r1, r0, #0 + ldr r2, _02263BA0 ; =0x0226D9D0 + add r0, r5, #0 + mov r3, #0 + bl ov70_02262E94 +_02263B96: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02263B9C: .word 0x0226DA00 +_02263BA0: .word 0x0226D9D0 + thumb_func_end ov70_02263A58 + + thumb_func_start ov70_02263BA4 +ov70_02263BA4: ; 0x02263BA4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + str r2, [sp, #4] + bl ov70_0225DEE8 + add r7, r0, #0 + add r0, r4, #0 + bl ov70_0225DEEC + str r0, [sp, #8] + add r0, r4, #0 + bl ov70_0225DEF0 + str r0, [sp, #0xc] + bl ov70_0225CCAC + add r6, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #5 + bhi _02263CBE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02263BE2: ; jump table + .short _02263BEE - _02263BE2 - 2 ; case 0 + .short _02263C12 - _02263BE2 - 2 ; case 1 + .short _02263C38 - _02263BE2 - 2 ; case 2 + .short _02263C68 - _02263BE2 - 2 ; case 3 + .short _02263C82 - _02263BE2 - 2 ; case 4 + .short _02263C9A - _02263BE2 - 2 ; case 5 +_02263BEE: + mov r0, #1 + str r0, [sp] + ldr r2, [sp, #8] + ldr r3, [sp, #8] + ldrh r2, [r2] + ldrh r3, [r3, #2] + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov70_02263230 + add r0, r7, #0 + mov r1, #0 + bl ov66_0222E31C + add r0, r5, #0 + bl ov70_02262E8C + b _02263CBE +_02263C12: + add r0, r4, #0 + bl ov70_0225DEEC + add r7, r0, #0 + add r0, r4, #0 + bl ov70_0225DF30 + cmp r0, #0 + bne _02263CBE + add r0, r5, #0 + bl ov70_02262E8C + ldrh r3, [r7, #4] + ldr r0, [sp, #0xc] + add r1, r6, #0 + mov r2, #2 + bl ov70_0225CDAC + b _02263CBE +_02263C38: + add r0, r6, #0 + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _02263CBE + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF18 + add r0, r7, #0 + bl ov66_0222E2B4 + cmp r0, #1 + bne _02263C5E + add r0, r5, #0 + bl ov70_02262E8C + b _02263CBE +_02263C5E: + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _02263CBE +_02263C68: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x5b + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _02263CBE +_02263C82: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _02263CBE + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r5, #0 + bl ov70_02262E8C + b _02263CBE +_02263C9A: + ldr r0, [sp, #0xc] + add r1, r6, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DF10 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DF2C + add r1, r0, #0 + ldr r2, _02263CC4 ; =0x0226D9D0 + add r0, r5, #0 + mov r3, #0 + bl ov70_02262E94 +_02263CBE: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02263CC4: .word 0x0226D9D0 + thumb_func_end ov70_02263BA4 + + thumb_func_start ov70_02263CC8 +ov70_02263CC8: ; 0x02263CC8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x50 + str r0, [sp, #4] + add r5, r1, #0 + add r7, r2, #0 + bl ov70_02262E80 + str r0, [sp, #0x30] + ldr r0, [sp, #4] + bl ov70_02262E84 + cmp r0, #0 + beq _02263CE8 + cmp r0, #1 + beq _02263CF8 + b _02264106 +_02263CE8: + ldr r0, [sp, #4] + mov r1, #4 + bl ov70_02262E3C + ldr r0, [sp, #4] + bl ov70_02262E8C + b _02264106 +_02263CF8: + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E43C + add r0, r5, #0 + bl ov70_0225DF10 + str r0, [sp, #0x14] + add r0, r5, #0 + bl ov70_0225DEE8 + str r0, [sp, #0x18] + add r0, r5, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225DF00 + str r0, [sp, #0x1c] + add r0, r5, #0 + bl ov70_0225DEF8 + str r0, [sp, #0x20] + add r0, r4, #0 + bl ov70_0225CCB0 + add r6, r0, #0 + beq _02263D7A + ldr r0, [sp, #0x18] + bl ov66_0222E12C + cmp r0, #0 + bne _02263D66 + ldr r0, [sp, #0x18] + bl ov66_0222E19C + cmp r0, #1 + bne _02263D66 + ldr r0, [sp, #0x18] + bl ov66_0222E0F4 + cmp r0, #0 + bne _02263D66 + add r0, r6, #0 + bl ov70_0225CE3C + cmp r0, #9 + beq _02263D7A + add r0, r4, #0 + add r1, r6, #0 + mov r2, #9 + bl ov70_0225CDEC + b _02263D7A +_02263D66: + add r0, r6, #0 + bl ov70_0225CE3C + cmp r0, #0 + beq _02263D7A + add r0, r4, #0 + add r1, r6, #0 + mov r2, #0 + bl ov70_0225CDEC +_02263D7A: + add r0, r4, #0 + bl ov70_0225CCAC + str r0, [sp, #0x28] + mov r1, #5 + bl ov70_0225CD60 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + mov r1, #6 + bl ov70_0225CD60 + str r0, [sp, #8] + ldr r0, [sp, #0x28] + bl ov70_0225CD34 + add r1, sp, #0x40 + strh r0, [r1, #4] + lsr r0, r0, #0x10 + strh r0, [r1, #6] + ldrh r0, [r1, #4] + mov r2, sp + sub r2, r2, #4 + strh r0, [r1, #0xc] + ldrh r0, [r1, #6] + strh r0, [r1, #0xe] + ldrh r0, [r1, #0xc] + strh r0, [r2] + ldrh r0, [r1, #0xe] + ldr r1, [sp, #8] + strh r0, [r2, #2] + ldr r0, [r2, #0] + bl ov63_0222C078 + add r2, sp, #0x40 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #0xc + strh r0, [r2, #8] + ldrh r0, [r2, #2] + strh r0, [r2, #0xa] + ldrsh r1, [r2, r1] + ldr r0, [sp, #0x1c] + asr r3, r1, #3 + lsr r3, r3, #0x1c + add r3, r1, r3 + lsl r1, r3, #0xc + mov r3, #0xe + ldrsh r2, [r2, r3] + lsr r1, r1, #0x10 + asr r3, r2, #3 + lsr r3, r3, #0x1c + add r3, r2, r3 + lsl r2, r3, #0xc + lsr r2, r2, #0x10 + bl ov70_0225C8C4 + str r0, [sp, #0x24] + add r0, sp, #0x40 + mov r1, #0xa + ldrsh r2, [r0, r1] + asr r1, r2, #3 + lsr r1, r1, #0x1c + add r1, r2, r1 + asr r1, r1, #4 + str r1, [sp, #0x10] + mov r1, #8 + ldrsh r1, [r0, r1] + ldr r2, [sp, #0x10] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + str r0, [sp, #0xc] + ldr r1, [sp, #0xc] + lsl r2, r2, #0x10 + lsl r1, r1, #0x10 + ldr r0, [sp, #0x1c] + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl ov70_0225C8C4 + add r6, r0, #0 + add r0, r5, #0 + bl ov70_0225E3E0 + add r1, r0, #0 + cmp r1, r7 + beq _02263E44 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF84 + cmp r0, #0 + beq _02263E44 + add r0, r5, #0 + bl ov70_0225E3D0 +_02263E44: + ldr r0, [sp, #0x2c] + cmp r0, #0 + beq _02263E90 + add r0, r5, #0 + bl ov70_0225E400 + cmp r0, #1 + bne _02263E5C + ldr r0, [sp, #0x2c] + sub r0, r0, #1 + cmp r0, #2 + bls _02263E5E +_02263E5C: + b _02264106 +_02263E5E: + add r0, r5, #0 + bl ov70_0225E3E0 + add r1, r0, #0 + cmp r1, r7 + beq _02263E88 + add r0, r4, #0 + bl ov70_0225CC70 + add r6, r0, #0 + beq _02263E88 + bl ov70_0225CE3C + cmp r0, #0 + bne _02263E88 + ldr r2, [sp, #0x30] + add r0, r4, #0 + ldr r2, [r2, #0] + add r1, r6, #0 + bl ov70_0225CDEC +_02263E88: + add r0, r5, #0 + bl ov70_0225E3D0 + b _02264106 +_02263E90: + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E43C + ldr r0, [sp, #0x24] + bl ov70_0225C930 + cmp r0, #1 + bne _02263ED6 + ldr r0, [sp, #0x24] + ldr r3, _0226410C ; =0x0226DBB8 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r7, #0 + bl ov70_0226315C + ldr r1, [sp, #0x28] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + ldr r1, [sp, #0x24] + add r0, r5, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov70_0225DF3C + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02263ED6: + add r0, r5, #0 + bl ov70_0225E45C + cmp r0, #1 + bne _02263F04 + ldr r1, [sp, #0x28] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + ldr r0, [sp, #0x14] + ldr r2, _02264110 ; =0x0226DA18 + add r1, r7, #0 + mov r3, #0 + bl ov70_02262EC0 + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02263F04: + ldr r0, [sp, #0x18] + bl ov66_0222EE08 + cmp r0, #0 + beq _02263F32 + ldr r0, [sp, #0x14] + ldr r2, _02264114 ; =0x0226DA08 + add r1, r7, #0 + mov r3, #0 + bl ov70_02262EC0 + ldr r1, [sp, #0x28] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02263F32: + ldr r0, _02264118 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0226401C + ldr r1, [sp, #0x28] + add r0, r4, #0 + bl ov70_0225CE40 + str r0, [sp, #0x34] + cmp r0, #0 + beq _02263FA2 + mov r1, #5 + bl ov70_0225CD60 + str r0, [sp, #0x38] + ldr r0, [sp, #0x34] + mov r1, #4 + bl ov70_0225CD60 + add r1, r0, #0 + cmp r1, #0xfe + beq _02263FA2 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF64 + ldr r1, [sp, #0x38] + cmp r1, #0 + bne _02263FA2 + cmp r0, #0 + bne _02263FA2 + ldr r0, [sp, #0x14] + ldr r2, _0226411C ; =0x0226D9F8 + add r1, r7, #0 + mov r3, #0 + bl ov70_02262EC0 + ldr r1, [sp, #0x28] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + ldr r1, [sp, #0x34] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02263FA2: + add r0, r6, #0 + bl ov70_0225C990 + cmp r0, #1 + bne _02263FE2 + ldr r0, [sp, #0x28] + mov r1, #6 + bl ov70_0225CD60 + cmp r0, #0 + bne _02263FE2 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + ldr r0, [sp, #0x20] + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl ov70_02262484 + lsl r1, r6, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF3C + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02263FE2: + add r0, r6, #0 + bl ov70_0225C970 + cmp r0, #1 + bne _0226401C + ldr r0, [sp, #4] + ldr r3, _02264120 ; =0x0226DB28 + add r1, r5, #0 + add r2, r7, #0 + str r6, [sp] + bl ov70_0226315C + ldr r1, [sp, #0x28] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r6, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF3C + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226401C: + ldr r0, [sp, #8] + bl ov70_02263120 + cmp r0, #1 + bne _022640BC + ldr r0, [sp, #8] + cmp r0, #0 + bne _02264066 + add r0, r6, #0 + bl ov70_0225C950 + cmp r0, #1 + bne _02264066 + ldr r0, [sp, #4] + ldr r3, _02264124 ; =0x0226DAF8 + add r1, r5, #0 + add r2, r7, #0 + str r6, [sp] + bl ov70_0226315C + ldr r1, [sp, #0x28] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r6, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF3C + add r0, r5, #0 + mov r1, #1 + bl ov70_0225E43C + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02264066: + ldr r1, [sp, #0x28] + add r0, r4, #0 + bl ov70_0225CE40 + str r0, [sp, #0x3c] + cmp r0, #0 + beq _022640BC + mov r1, #4 + bl ov70_0225CD60 + add r6, r0, #0 + cmp r6, #0xfe + beq _022640BC + add r0, r5, #0 + bl ov70_0225E3F0 + cmp r0, #0 + bne _022640BC + lsl r1, r6, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF84 + cmp r0, #0 + bne _022640BC + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + bl ov70_0225E328 + ldr r0, [sp, #0x3c] + bl ov70_0225CE3C + ldr r1, [sp, #0x30] + mov r2, #0 + str r0, [r1, #0] + ldr r1, [sp, #0x3c] + add r0, r4, #0 + bl ov70_0225CDEC + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_022640BC: + ldr r0, _02264118 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + lsl r0, r0, #0xa + tst r0, r1 + beq _02264106 + add r0, r5, #0 + bl ov70_0225E3F0 + cmp r0, #0 + bne _022640EA + ldr r0, [sp, #0x18] + bl ov66_0222E338 + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E328 + ldr r0, _02264128 ; =0x000005DC + bl sub_02005748 + b _02264100 +_022640EA: + add r0, r5, #0 + bl ov70_0225E3E0 + cmp r0, r7 + bne _02264100 + add r0, r5, #0 + bl ov70_0225E3D0 + ldr r0, _02264128 ; =0x000005DC + bl sub_02005748 +_02264100: + add sp, #0x50 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02264106: + mov r0, #0 + add sp, #0x50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226410C: .word 0x0226DBB8 +_02264110: .word 0x0226DA18 +_02264114: .word 0x0226DA08 +_02264118: .word 0x021BF67C +_0226411C: .word 0x0226D9F8 +_02264120: .word 0x0226DB28 +_02264124: .word 0x0226DAF8 +_02264128: .word 0x000005DC + thumb_func_end ov70_02263CC8 + + thumb_func_start ov70_0226412C +ov70_0226412C: ; 0x0226412C + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + bl ov70_0225DEF0 + bl ov70_0225CCAC + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + beq _0226414C + add r0, r4, #0 + mov r1, #1 + bl ov70_0225E43C +_0226414C: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov70_0226412C + + thumb_func_start ov70_02264150 +ov70_02264150: ; 0x02264150 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r7, r2, #0 + bl ov70_02262E84 + cmp r0, #9 + bhi _022641F8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226416C: ; jump table + .short _02264180 - _0226416C - 2 ; case 0 + .short _022641C2 - _0226416C - 2 ; case 1 + .short _022641D4 - _0226416C - 2 ; case 2 + .short _022641EE - _0226416C - 2 ; case 3 + .short _02264202 - _0226416C - 2 ; case 4 + .short _02264210 - _0226416C - 2 ; case 5 + .short _0226424C - _0226416C - 2 ; case 6 + .short _02264280 - _0226416C - 2 ; case 7 + .short _022642B2 - _0226416C - 2 ; case 8 + .short _022642D2 - _0226416C - 2 ; case 9 +_02264180: + add r0, r4, #0 + bl ov70_0225DEF0 + add r6, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r6, #0 + mov r2, #0 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #0xb + bl ov66_0222E3E4 + ldr r0, _0226431C ; =0x000005DD + bl sub_02005748 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x41 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _02264316 +_022641C2: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _022641F8 + add r0, r5, #0 + bl ov70_02262E8C + b _02264316 +_022641D4: + add r0, r4, #0 + mov r1, #2 + mov r2, #0x19 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _02264316 +_022641EE: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + beq _022641FA +_022641F8: + b _02264316 +_022641FA: + add r0, r5, #0 + bl ov70_02262E8C + b _02264316 +_02264202: + add r0, r4, #0 + bl ov70_0225E194 + add r0, r5, #0 + bl ov70_02262E8C + b _02264316 +_02264210: + add r0, r4, #0 + mov r6, #0 + bl ov70_0225E1C4 + cmp r0, #0 + beq _02264224 + cmp r0, #1 + beq _02264230 + cmp r0, #2 + b _0226423A +_02264224: + add r0, r5, #0 + mov r1, #6 + bl ov70_02262E88 + mov r6, #1 + b _0226423A +_02264230: + add r0, r5, #0 + mov r1, #8 + bl ov70_02262E88 + mov r6, #1 +_0226423A: + cmp r6, #1 + bne _02264316 + add r0, r4, #0 + bl ov70_0225E1F8 + add r0, r4, #0 + bl ov70_0225DFEC + b _02264316 +_0226424C: + add r0, r4, #0 + mov r1, #0 + bl ov70_0225DF18 + add r0, r4, #0 + bl ov70_0225DEF0 + add r6, r0, #0 + bl ov70_0225CCAC + add r7, r0, #0 + add r0, r4, #0 + bl ov70_0225DF08 + bl ov70_02260B3C + add r0, r6, #0 + add r1, r7, #0 + mov r2, #3 + bl ov70_0225CDEC + add r0, r5, #0 + mov r1, #7 + bl ov70_02262E88 + b _02264316 +_02264280: + add r0, r4, #0 + bl ov70_0225DEF0 + bl ov70_0225CCAC + bl ov70_0225CE38 + cmp r0, #1 + bne _02264316 + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF34 + add r0, r4, #0 + mov r1, #0 + bl ov70_0225DF38 + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #0xb + bl ov66_0222E3E4 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022642B2: + add r0, r4, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #2 + mov r3, #0 + bl ov70_0225CDAC + add r0, r5, #0 + bl ov70_02262E8C + b _02264316 +_022642D2: + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #1 + bl ov66_0222E3E4 + add r0, r4, #0 + bl ov70_0225DEF0 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DF10 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225CCAC + mov r1, #5 + add r6, r0, #0 + bl ov70_0225CD60 + cmp r0, #0 + bne _02264316 + add r0, r5, #0 + add r1, r6, #0 + mov r2, #1 + bl ov70_0225CDEC + ldr r2, _02264320 ; =0x0226D9D0 + add r0, r4, #0 + add r1, r7, #0 + mov r3, #0 + bl ov70_02262E94 +_02264316: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226431C: .word 0x000005DD +_02264320: .word 0x0226D9D0 + thumb_func_end ov70_02264150 + + thumb_func_start ov70_02264324 +ov70_02264324: ; 0x02264324 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r4, r1, #0 + add r5, r0, #0 + str r2, [sp, #0x10] + add r0, r4, #0 + bl ov70_0225DEF0 + ldr r1, [sp, #0x10] + str r0, [sp, #0x28] + bl ov70_0225CC70 + add r7, r0, #0 + add r0, r4, #0 + bl ov70_0225DF40 + str r0, [sp, #0x20] + add r0, r5, #0 + bl ov70_02262E80 + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + str r0, [sp, #0x24] + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #8 + bls _02264362 + b _022646BC +_02264362: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226436E: ; jump table + .short _02264380 - _0226436E - 2 ; case 0 + .short _02264440 - _0226436E - 2 ; case 1 + .short _022644DE - _0226436E - 2 ; case 2 + .short _022645B4 - _0226436E - 2 ; case 3 + .short _02264606 - _0226436E - 2 ; case 4 + .short _0226461E - _0226436E - 2 ; case 5 + .short _02264644 - _0226436E - 2 ; case 6 + .short _0226465E - _0226436E - 2 ; case 7 + .short _0226468C - _0226436E - 2 ; case 8 +_02264380: + add r0, r5, #0 + mov r1, #0xc + bl ov70_02262E3C + add r4, r0, #0 + ldr r0, [sp, #0x20] + bl ov70_02264B64 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #3 + bhi _022643C4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022643A4: ; jump table + .short _022643AC - _022643A4 - 2 ; case 0 + .short _022643B2 - _022643A4 - 2 ; case 1 + .short _022643B8 - _022643A4 - 2 ; case 2 + .short _022643BE - _022643A4 - 2 ; case 3 +_022643AC: + mov r0, #3 + str r0, [r4, #8] + b _022643CC +_022643B2: + mov r0, #4 + str r0, [r4, #8] + b _022643CC +_022643B8: + mov r0, #5 + str r0, [r4, #8] + b _022643CC +_022643BE: + mov r0, #6 + str r0, [r4, #8] + b _022643CC +_022643C4: + bl sub_02022974 + mov r0, #5 + str r0, [r4, #8] +_022643CC: + ldr r0, [sp, #0x24] + bl ov66_0222E12C + cmp r0, #1 + bne _022643E8 + mov r0, #0x16 + strh r0, [r4, #4] + mov r0, #0 + strh r0, [r4, #6] + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _022646BC +_022643E8: + ldr r0, [sp, #0x24] + bl ov66_0222E004 + cmp r0, #1 + bne _02264404 + mov r0, #0x48 + strh r0, [r4, #4] + mov r0, #1 + strh r0, [r4, #6] + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _022646BC +_02264404: + ldr r0, [sp, #0x20] + bl ov70_02264B64 + lsl r0, r0, #0x18 + lsr r6, r0, #0x18 + add r0, r6, #0 + bl ov66_02232B00 + cmp r0, #0 + bne _0226442A + mov r0, #0x14 + strh r0, [r4, #4] + mov r0, #0 + strh r0, [r4, #6] + add r0, r5, #0 + mov r1, #3 + bl ov70_02262E88 + b _022646BC +_0226442A: + add r0, r6, #0 + bl ov66_02232A48 + cmp r0, #0 + bne _02264438 + bl sub_02022974 +_02264438: + add r0, r5, #0 + bl ov70_02262E8C + b _022646BC +_02264440: + bl ov66_02232A84 + cmp r0, #1 + bne _022644C6 + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + add r1, sp, #0x40 + mov r0, #0 + strb r0, [r1] + strb r0, [r1, #1] + strb r0, [r1, #2] + strb r0, [r1, #3] + add r0, r4, #0 + bl ov70_0225DEE8 + add r7, r0, #0 + bl ov66_0222E964 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x1c] + ldr r0, [r6, #8] + sub r0, r0, #5 + cmp r0, #1 + bhi _022644A0 + mov r5, #0 + add r4, r5, #0 +_0226447A: + add r0, r7, #0 + add r1, r4, #0 + bl ov66_0222E974 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02264498 + cmp r5, #4 + bhs _02264492 + add r1, sp, #0x40 + strb r0, [r1, r5] +_02264492: + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 +_02264498: + add r4, r4, #1 + cmp r4, #4 + blt _0226447A + b _022644A6 +_022644A0: + ldr r0, [sp, #0x10] + add r1, sp, #0x38 + strb r0, [r1, #8] +_022644A6: + add r3, sp, #0x38 + ldrb r0, [r3, #9] + str r0, [sp] + ldrb r0, [r3, #0xa] + str r0, [sp, #4] + ldrb r0, [r3, #0xb] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldrb r3, [r3, #8] + ldr r1, [r6, #8] + ldr r2, [sp, #0x1c] + add r0, r7, #0 + bl ov66_0222EA10 + b _022646BC +_022644C6: + cmp r0, #2 + beq _022644CC + b _022646BC +_022644CC: + mov r0, #0x14 + strh r0, [r6, #4] + mov r0, #0 + strh r0, [r6, #6] + add r0, r5, #0 + mov r1, #3 + bl ov70_02262E88 + b _022646BC +_022644DE: + ldr r0, [sp, #0x20] + bl ov70_02264BCC + str r0, [sp, #0x2c] + ldr r0, [sp, #0x20] + bl ov70_02264C34 + str r0, [sp, #0x30] + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF34 + ldr r1, [sp, #0x2c] + add r0, r4, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov70_0225DF38 + add r0, r4, #0 + bl ov70_0225DEE8 + ldr r1, [sp, #0x30] + bl ov66_0222E3E4 + ldr r0, [sp, #0x24] + ldr r1, [r6, #8] + bl ov66_0222EF94 + ldr r0, [r6, #8] + cmp r0, #6 + bhi _02264548 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02264528: ; jump table + .short _02264548 - _02264528 - 2 ; case 0 + .short _02264548 - _02264528 - 2 ; case 1 + .short _02264548 - _02264528 - 2 ; case 2 + .short _02264536 - _02264528 - 2 ; case 3 + .short _02264536 - _02264528 - 2 ; case 4 + .short _0226453C - _02264528 - 2 ; case 5 + .short _02264542 - _02264528 - 2 ; case 6 +_02264536: + mov r0, #5 + str r0, [sp, #0x18] + b _0226454C +_0226453C: + mov r0, #3 + str r0, [sp, #0x18] + b _0226454C +_02264542: + mov r0, #4 + str r0, [sp, #0x18] + b _0226454C +_02264548: + bl sub_02022974 +_0226454C: + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x18] + bl ov66_0222F040 + add r0, r7, #0 + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + str r0, [sp, #0x34] + add r0, r4, #0 + bl ov70_0225DEEC + add r4, r0, #0 + add r0, r7, #0 + bl ov70_0225CD34 + add r1, sp, #0x38 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #1 + strh r0, [r4, #6] + mov r0, #4 + ldrsh r2, [r1, r0] + asr r0, r2, #3 + lsr r0, r0, #0x1c + add r0, r2, r0 + asr r0, r0, #4 + strh r0, [r4] + mov r0, #6 + ldrsh r1, [r1, r0] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + strh r0, [r4, #2] + ldr r0, [sp, #0x34] + strh r0, [r4, #4] + ldr r0, [r6, #8] + strh r0, [r4, #8] + add r0, r5, #0 + bl ov70_02262E64 + add sp, #0x44 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_022645B4: + add r0, r7, #0 + mov r1, #6 + bl ov70_0225CD60 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #3 + bhi _022645F0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022645D0: ; jump table + .short _022645D8 - _022645D0 - 2 ; case 0 + .short _022645DE - _022645D0 - 2 ; case 1 + .short _022645E4 - _022645D0 - 2 ; case 2 + .short _022645EA - _022645D0 - 2 ; case 3 +_022645D8: + mov r0, #6 + str r0, [sp, #0x14] + b _022645F4 +_022645DE: + mov r0, #5 + str r0, [sp, #0x14] + b _022645F4 +_022645E4: + mov r0, #8 + str r0, [sp, #0x14] + b _022645F4 +_022645EA: + mov r0, #7 + str r0, [sp, #0x14] + b _022645F4 +_022645F0: + bl sub_02022974 +_022645F4: + ldr r0, [sp, #0x28] + ldr r2, [sp, #0x14] + add r1, r7, #0 + bl ov70_0225CDEC + add r0, r5, #0 + bl ov70_02262E8C + b _022646BC +_02264606: + add r0, r7, #0 + bl ov70_0225CE38 + cmp r0, #1 + bne _022646BC + mov r0, #8 + str r0, [r6, #0] + add r0, r5, #0 + mov r1, #7 + bl ov70_02262E88 + b _022646BC +_0226461E: + add r0, r7, #0 + mov r1, #6 + bl ov70_0225CD60 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl ov63_0222C0AC + lsl r0, r0, #0x18 + lsr r3, r0, #0x18 + ldr r0, [sp, #0x28] + add r1, r7, #0 + mov r2, #2 + bl ov70_0225CDAC + add r0, r5, #0 + bl ov70_02262E8C + b _022646BC +_02264644: + add r0, r7, #0 + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _022646BC + mov r0, #8 + str r0, [r6, #0] + add r0, r5, #0 + mov r1, #7 + bl ov70_02262E88 + b _022646BC +_0226465E: + ldr r0, [r6, #0] + sub r0, r0, #1 + str r0, [r6, #0] + cmp r0, #0 + bgt _022646BC + ldr r1, [r6, #8] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E27C + ldrh r1, [r6, #6] + ldrh r2, [r6, #4] + add r0, r4, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _022646BC +_0226468C: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #0 + beq _022646BC + add r0, r5, #0 + bl ov70_02262E64 + ldr r0, [sp, #0x28] + add r1, r7, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r4, #0 + bl ov70_0225DF10 + ldr r1, [sp, #0x10] + ldr r2, _022646C4 ; =0x0226D9D0 + mov r3, #0 + bl ov70_02262E94 +_022646BC: + mov r0, #0 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + nop +_022646C4: .word 0x0226D9D0 + thumb_func_end ov70_02264324 + + thumb_func_start ov70_022646C8 +ov70_022646C8: ; 0x022646C8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r4, r1, #0 + add r7, r0, #0 + str r2, [sp] + bl ov70_02262E80 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DF10 + str r0, [sp, #0x14] + add r0, r4, #0 + bl ov70_0225DEF0 + str r0, [sp, #0x18] + bl ov70_0225CCAC + str r0, [sp, #0x10] + add r0, r4, #0 + bl ov70_0225DEE8 + str r0, [sp, #0xc] + add r0, r7, #0 + bl ov70_02262E84 + cmp r0, #7 + bls _02264702 + b _02264966 +_02264702: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226470E: ; jump table + .short _0226471E - _0226470E - 2 ; case 0 + .short _02264792 - _0226470E - 2 ; case 1 + .short _022647AC - _0226470E - 2 ; case 2 + .short _0226486A - _0226470E - 2 ; case 3 + .short _0226488A - _0226470E - 2 ; case 4 + .short _0226489E - _0226470E - 2 ; case 5 + .short _02264922 - _0226470E - 2 ; case 6 + .short _0226493A - _0226470E - 2 ; case 7 +_0226471E: + add r0, r7, #0 + mov r1, #4 + bl ov70_02262E3C + add r5, r0, #0 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + mov r2, #0 + bl ov70_0225CDEC + add r0, r7, #0 + bl ov70_02262E8C + mov r0, #0 + strb r0, [r5] + add r0, r4, #0 + bl ov70_0225DF40 + cmp r0, #0x1e + beq _02264750 + cmp r0, #0x1f + beq _0226475C + cmp r0, #0x20 + beq _02264768 + b _02264774 +_02264750: + mov r0, #0 + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #2 + strb r0, [r5, #3] + b _02264778 +_0226475C: + mov r0, #1 + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #3 + strb r0, [r5, #3] + b _02264778 +_02264768: + mov r0, #2 + strb r0, [r5, #1] + strb r0, [r5, #2] + mov r0, #4 + strb r0, [r5, #3] + b _02264778 +_02264774: + bl sub_02022974 +_02264778: + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #0xc + bl ov66_0222E3E4 + ldr r0, [sp, #0x14] + ldr r1, [sp] + ldr r2, _0226496C ; =0x0226DA20 + add r3, r5, #0 + bl ov70_02262EC0 + b _02264966 +_02264792: + ldrb r0, [r5] + cmp r0, #8 + bne _022647A2 + add r0, r7, #0 + mov r1, #2 + bl ov70_02262E88 + b _02264966 +_022647A2: + add r0, r7, #0 + mov r1, #3 + bl ov70_02262E88 + b _02264966 +_022647AC: + add r0, r4, #0 + bl ov70_0225DF40 + cmp r0, #0x1e + beq _022647C0 + cmp r0, #0x1f + beq _022647C8 + cmp r0, #0x20 + beq _022647D0 + b _022647D6 +_022647C0: + mov r0, #0 + mov r6, #3 + str r0, [sp, #8] + b _022647D6 +_022647C8: + mov r0, #1 + mov r6, #4 + str r0, [sp, #8] + b _022647D6 +_022647D0: + mov r0, #2 + mov r6, #5 + str r0, [sp, #8] +_022647D6: + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF34 + lsl r1, r6, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl ov70_0225DF38 + ldrb r1, [r5, #2] + ldr r0, [sp, #0xc] + bl ov66_0222EF94 + ldr r0, [sp, #0xc] + bl ov66_0222F030 + ldr r0, [sp, #0xc] + ldr r1, [sp, #8] + bl ov66_0222F040 + ldr r0, [sp, #0x10] + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + str r0, [sp, #0x1c] + add r0, r4, #0 + bl ov70_0225DEEC + add r6, r0, #0 + ldr r0, [sp, #0x10] + bl ov70_0225CD34 + add r1, sp, #0x20 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #2 + strh r0, [r6, #6] + mov r0, #4 + ldrsh r0, [r1, r0] + asr r2, r0, #3 + lsr r2, r2, #0x1c + add r2, r0, r2 + asr r0, r2, #4 + strh r0, [r6] + mov r0, #6 + ldrsh r1, [r1, r0] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + strh r0, [r6, #2] + ldr r0, [sp, #0x1c] + strh r0, [r6, #4] + ldrb r0, [r5, #2] + strh r0, [r6, #8] + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #1 + bl ov66_0222E2C4 + add r0, r7, #0 + bl ov70_02262E64 + add sp, #0x28 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0226486A: + ldr r0, [sp, #0x10] + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + add r3, r0, #0 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + mov r2, #2 + bl ov70_0225CDAC + add r0, r7, #0 + bl ov70_02262E8C + b _02264966 +_0226488A: + ldr r0, [sp, #0x10] + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _02264966 + add r0, r7, #0 + bl ov70_02262E8C + b _02264966 +_0226489E: + mov r0, #1 + str r0, [sp, #4] + ldrb r0, [r5] + cmp r0, #7 + bhi _022648F4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022648B4: ; jump table + .short _022648C4 - _022648B4 - 2 ; case 0 + .short _022648D2 - _022648B4 - 2 ; case 1 + .short _022648D6 - _022648B4 - 2 ; case 2 + .short _022648E4 - _022648B4 - 2 ; case 3 + .short _022648E8 - _022648B4 - 2 ; case 4 + .short _022648F4 - _022648B4 - 2 ; case 5 + .short _022648EC - _022648B4 - 2 ; case 6 + .short _022648F0 - _022648B4 - 2 ; case 7 +_022648C4: + ldrb r1, [r5, #2] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E27C + mov r6, #4 + b _022648F8 +_022648D2: + mov r6, #5 + b _022648F8 +_022648D6: + ldrb r1, [r5, #2] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E27C + mov r6, #6 + b _022648F8 +_022648E4: + mov r6, #0x13 + b _022648F8 +_022648E8: + mov r6, #0x11 + b _022648F8 +_022648EC: + mov r6, #0x1d + b _022648F8 +_022648F0: + mov r6, #7 + b _022648F8 +_022648F4: + mov r0, #0 + str r0, [sp, #4] +_022648F8: + ldr r0, [sp, #4] + cmp r0, #0 + beq _02264918 + add r0, r4, #0 + mov r1, #0 + add r2, r6, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r7, #0 + bl ov70_02262E8C + b _02264966 +_02264918: + add r0, r7, #0 + mov r1, #7 + bl ov70_02262E88 + b _02264966 +_02264922: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _02264966 + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r7, #0 + bl ov70_02262E8C + b _02264966 +_0226493A: + add r0, r7, #0 + bl ov70_02262E64 + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #1 + bl ov66_0222E3E4 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x10] + mov r2, #1 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DF10 + ldr r1, [sp] + ldr r2, _02264970 ; =0x0226D9D0 + mov r3, #0 + bl ov70_02262E94 +_02264966: + mov r0, #0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226496C: .word 0x0226DA20 +_02264970: .word 0x0226D9D0 + thumb_func_end ov70_022646C8 + + thumb_func_start ov70_02264974 +ov70_02264974: ; 0x02264974 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r4, r1, #0 + add r5, r0, #0 + str r2, [sp] + bl ov70_02262E80 + str r0, [sp, #8] + add r0, r4, #0 + bl ov70_0225DF10 + add r0, r4, #0 + bl ov70_0225DEF0 + str r0, [sp, #0xc] + bl ov70_0225CCAC + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + add r7, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #6 + bls _022649AC + b _02264B56 +_022649AC: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022649B8: ; jump table + .short _022649C6 - _022649B8 - 2 ; case 0 + .short _02264A2A - _022649B8 - 2 ; case 1 + .short _02264AC0 - _022649B8 - 2 ; case 2 + .short _02264AE0 - _022649B8 - 2 ; case 3 + .short _02264AF4 - _022649B8 - 2 ; case 4 + .short _02264B10 - _022649B8 - 2 ; case 5 + .short _02264B28 - _022649B8 - 2 ; case 6 +_022649C6: + add r0, r5, #0 + mov r1, #0xc + bl ov70_02262E3C + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #0xd + bl ov66_0222E3E4 + add r0, r7, #0 + bl ov66_0222E12C + cmp r0, #1 + bne _022649F4 + mov r0, #0x7a + strh r0, [r6] + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + b _02264B5A +_022649F4: + add r0, r7, #0 + bl ov66_0222E19C + cmp r0, #1 + bne _02264A04 + mov r0, #0xa + strh r0, [r6, #2] + b _02264A20 +_02264A04: + add r0, r7, #0 + bl ov66_0222E0DC + cmp r0, #1 + bne _02264A1C + mov r0, #0x62 + strh r0, [r6] + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + b _02264B5A +_02264A1C: + mov r0, #9 + strh r0, [r6, #2] +_02264A20: + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02264B5A +_02264A2A: + ldr r0, [sp, #8] + ldrh r0, [r0, #2] + cmp r0, #9 + bne _02264A38 + mov r0, #9 + str r0, [sp, #4] + b _02264A42 +_02264A38: + mov r0, #0xa + str r0, [sp, #4] + add r0, r7, #0 + bl ov66_0222E10C +_02264A42: + add r0, r4, #0 + mov r1, #1 + bl ov70_0225DF34 + ldr r1, [sp, #4] + add r0, r4, #0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov70_0225DF38 + mov r1, #0x17 + add r2, r1, #0 + add r0, r7, #0 + sub r2, #0x18 + bl ov66_0222E500 + add r0, r6, #0 + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + add r7, r0, #0 + add r0, r4, #0 + bl ov70_0225DEEC + add r4, r0, #0 + add r0, r6, #0 + bl ov70_0225CD34 + add r1, sp, #0x10 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + mov r0, #3 + strh r0, [r4, #6] + mov r0, #4 + ldrsh r2, [r1, r0] + asr r0, r2, #3 + lsr r0, r0, #0x1c + add r0, r2, r0 + asr r0, r0, #4 + strh r0, [r4] + mov r0, #6 + ldrsh r1, [r1, r0] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + strh r0, [r4, #2] + strh r7, [r4, #4] + mov r0, #0 + strh r0, [r4, #8] + add r0, r5, #0 + bl ov70_02262E64 + add sp, #0x18 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02264AC0: + add r0, r6, #0 + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + add r3, r0, #0 + ldr r0, [sp, #0xc] + add r1, r6, #0 + mov r2, #2 + bl ov70_0225CDAC + add r0, r5, #0 + bl ov70_02262E8C + b _02264B5A +_02264AE0: + add r0, r6, #0 + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + bne _02264B5A + add r0, r5, #0 + bl ov70_02262E8C + b _02264B5A +_02264AF4: + ldr r2, [sp, #8] + add r0, r4, #0 + ldrh r2, [r2] + mov r1, #1 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + bl ov70_02262E8C + b _02264B5A +_02264B10: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _02264B5A + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r5, #0 + bl ov70_02262E8C + b _02264B5A +_02264B28: + add r0, r5, #0 + bl ov70_02262E64 + add r0, r4, #0 + bl ov70_0225DEE8 + mov r1, #1 + bl ov66_0222E3E4 + ldr r0, [sp, #0xc] + add r1, r6, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r4, #0 + bl ov70_0225DF10 + ldr r1, [sp] + ldr r2, _02264B60 ; =0x0226D9D0 + mov r3, #0 + bl ov70_02262E94 + b _02264B5A +_02264B56: + bl sub_02022974 +_02264B5A: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02264B60: .word 0x0226D9D0 + thumb_func_end ov70_02264974 + + thumb_func_start ov70_02264B64 +ov70_02264B64: ; 0x02264B64 + push {r3, lr} + cmp r0, #0x1d + bhi _02264BC2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02264B76: ; jump table + .short _02264BC2 - _02264B76 - 2 ; case 0 + .short _02264BC2 - _02264B76 - 2 ; case 1 + .short _02264BC2 - _02264B76 - 2 ; case 2 + .short _02264BC2 - _02264B76 - 2 ; case 3 + .short _02264BC2 - _02264B76 - 2 ; case 4 + .short _02264BC2 - _02264B76 - 2 ; case 5 + .short _02264BBA - _02264B76 - 2 ; case 6 + .short _02264BBA - _02264B76 - 2 ; case 7 + .short _02264BBA - _02264B76 - 2 ; case 8 + .short _02264BBA - _02264B76 - 2 ; case 9 + .short _02264BBA - _02264B76 - 2 ; case 10 + .short _02264BBA - _02264B76 - 2 ; case 11 + .short _02264BBA - _02264B76 - 2 ; case 12 + .short _02264BBA - _02264B76 - 2 ; case 13 + .short _02264BBE - _02264B76 - 2 ; case 14 + .short _02264BBE - _02264B76 - 2 ; case 15 + .short _02264BBE - _02264B76 - 2 ; case 16 + .short _02264BBE - _02264B76 - 2 ; case 17 + .short _02264BBE - _02264B76 - 2 ; case 18 + .short _02264BBE - _02264B76 - 2 ; case 19 + .short _02264BBE - _02264B76 - 2 ; case 20 + .short _02264BBE - _02264B76 - 2 ; case 21 + .short _02264BB2 - _02264B76 - 2 ; case 22 + .short _02264BB2 - _02264B76 - 2 ; case 23 + .short _02264BB2 - _02264B76 - 2 ; case 24 + .short _02264BB2 - _02264B76 - 2 ; case 25 + .short _02264BB6 - _02264B76 - 2 ; case 26 + .short _02264BB6 - _02264B76 - 2 ; case 27 + .short _02264BB6 - _02264B76 - 2 ; case 28 + .short _02264BB6 - _02264B76 - 2 ; case 29 +_02264BB2: + mov r0, #2 + pop {r3, pc} +_02264BB6: + mov r0, #3 + pop {r3, pc} +_02264BBA: + mov r0, #0 + pop {r3, pc} +_02264BBE: + mov r0, #1 + pop {r3, pc} +_02264BC2: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02264B64 + + thumb_func_start ov70_02264BCC +ov70_02264BCC: ; 0x02264BCC + push {r3, lr} + cmp r0, #0x1d + bhi _02264C2A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02264BDE: ; jump table + .short _02264C2A - _02264BDE - 2 ; case 0 + .short _02264C2A - _02264BDE - 2 ; case 1 + .short _02264C2A - _02264BDE - 2 ; case 2 + .short _02264C2A - _02264BDE - 2 ; case 3 + .short _02264C2A - _02264BDE - 2 ; case 4 + .short _02264C2A - _02264BDE - 2 ; case 5 + .short _02264C22 - _02264BDE - 2 ; case 6 + .short _02264C22 - _02264BDE - 2 ; case 7 + .short _02264C22 - _02264BDE - 2 ; case 8 + .short _02264C22 - _02264BDE - 2 ; case 9 + .short _02264C22 - _02264BDE - 2 ; case 10 + .short _02264C22 - _02264BDE - 2 ; case 11 + .short _02264C22 - _02264BDE - 2 ; case 12 + .short _02264C22 - _02264BDE - 2 ; case 13 + .short _02264C26 - _02264BDE - 2 ; case 14 + .short _02264C26 - _02264BDE - 2 ; case 15 + .short _02264C26 - _02264BDE - 2 ; case 16 + .short _02264C26 - _02264BDE - 2 ; case 17 + .short _02264C26 - _02264BDE - 2 ; case 18 + .short _02264C26 - _02264BDE - 2 ; case 19 + .short _02264C26 - _02264BDE - 2 ; case 20 + .short _02264C26 - _02264BDE - 2 ; case 21 + .short _02264C1A - _02264BDE - 2 ; case 22 + .short _02264C1A - _02264BDE - 2 ; case 23 + .short _02264C1A - _02264BDE - 2 ; case 24 + .short _02264C1A - _02264BDE - 2 ; case 25 + .short _02264C1E - _02264BDE - 2 ; case 26 + .short _02264C1E - _02264BDE - 2 ; case 27 + .short _02264C1E - _02264BDE - 2 ; case 28 + .short _02264C1E - _02264BDE - 2 ; case 29 +_02264C1A: + mov r0, #1 + pop {r3, pc} +_02264C1E: + mov r0, #2 + pop {r3, pc} +_02264C22: + mov r0, #6 + pop {r3, pc} +_02264C26: + mov r0, #7 + pop {r3, pc} +_02264C2A: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02264BCC + + thumb_func_start ov70_02264C34 +ov70_02264C34: ; 0x02264C34 + push {r3, lr} + cmp r0, #0x1d + bhi _02264C92 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02264C46: ; jump table + .short _02264C92 - _02264C46 - 2 ; case 0 + .short _02264C92 - _02264C46 - 2 ; case 1 + .short _02264C92 - _02264C46 - 2 ; case 2 + .short _02264C92 - _02264C46 - 2 ; case 3 + .short _02264C92 - _02264C46 - 2 ; case 4 + .short _02264C92 - _02264C46 - 2 ; case 5 + .short _02264C8A - _02264C46 - 2 ; case 6 + .short _02264C8A - _02264C46 - 2 ; case 7 + .short _02264C8A - _02264C46 - 2 ; case 8 + .short _02264C8A - _02264C46 - 2 ; case 9 + .short _02264C8A - _02264C46 - 2 ; case 10 + .short _02264C8A - _02264C46 - 2 ; case 11 + .short _02264C8A - _02264C46 - 2 ; case 12 + .short _02264C8A - _02264C46 - 2 ; case 13 + .short _02264C8E - _02264C46 - 2 ; case 14 + .short _02264C8E - _02264C46 - 2 ; case 15 + .short _02264C8E - _02264C46 - 2 ; case 16 + .short _02264C8E - _02264C46 - 2 ; case 17 + .short _02264C8E - _02264C46 - 2 ; case 18 + .short _02264C8E - _02264C46 - 2 ; case 19 + .short _02264C8E - _02264C46 - 2 ; case 20 + .short _02264C8E - _02264C46 - 2 ; case 21 + .short _02264C82 - _02264C46 - 2 ; case 22 + .short _02264C82 - _02264C46 - 2 ; case 23 + .short _02264C82 - _02264C46 - 2 ; case 24 + .short _02264C82 - _02264C46 - 2 ; case 25 + .short _02264C86 - _02264C46 - 2 ; case 26 + .short _02264C86 - _02264C46 - 2 ; case 27 + .short _02264C86 - _02264C46 - 2 ; case 28 + .short _02264C86 - _02264C46 - 2 ; case 29 +_02264C82: + mov r0, #7 + pop {r3, pc} +_02264C86: + mov r0, #8 + pop {r3, pc} +_02264C8A: + mov r0, #5 + pop {r3, pc} +_02264C8E: + mov r0, #6 + pop {r3, pc} +_02264C92: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02264C34 + + thumb_func_start ov70_02264C9C +ov70_02264C9C: ; 0x02264C9C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _02264CB0 + cmp r0, #1 + beq _02264D06 + b _02264D30 +_02264CB0: + add r0, r4, #0 + bl ov70_0225DEE8 + add r6, r0, #0 + bl ov66_0222E12C + cmp r0, #1 + bne _02264CCE + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + bl ov70_0225E20C + add r1, r0, #0 + b _02264CF2 +_02264CCE: + add r0, r6, #0 + bl ov66_0222E170 + cmp r0, #1 + bne _02264CE6 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4e + bl ov70_0225E20C + add r1, r0, #0 + b _02264CF2 +_02264CE6: + add r0, r4, #0 + mov r1, #1 + mov r2, #2 + bl ov70_0225E20C + add r1, r0, #0 +_02264CF2: + add r0, r4, #0 + bl ov70_0225DF8C + ldr r0, _02264D34 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov70_02262E8C + b _02264D30 +_02264D06: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #0 + beq _02264D30 + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r4, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov70_0225CDEC + mov r0, #1 + pop {r4, r5, r6, pc} +_02264D30: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02264D34: .word 0x000005DC + thumb_func_end ov70_02264C9C + + thumb_func_start ov70_02264D38 +ov70_02264D38: ; 0x02264D38 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + str r2, [sp] + bl ov70_0225DEF0 + str r0, [sp, #8] + add r0, r5, #0 + bl ov70_0225DEF8 + add r7, r0, #0 + add r0, r5, #0 + bl ov70_0225DF08 + str r0, [sp, #0xc] + add r0, r5, #0 + bl ov70_0225DEE8 + str r0, [sp, #4] + add r0, r6, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0xf + bls _02264D76 + b _022650D2 +_02264D76: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02264D82: ; jump table + .short _02264DA2 - _02264D82 - 2 ; case 0 + .short _02264DEA - _02264D82 - 2 ; case 1 + .short _02264E5E - _02264D82 - 2 ; case 2 + .short _02264EF4 - _02264D82 - 2 ; case 3 + .short _02264F28 - _02264D82 - 2 ; case 4 + .short _02264F58 - _02264D82 - 2 ; case 5 + .short _02264F94 - _02264D82 - 2 ; case 6 + .short _02264FAA - _02264D82 - 2 ; case 7 + .short _02264FC2 - _02264D82 - 2 ; case 8 + .short _02264FE2 - _02264D82 - 2 ; case 9 + .short _02265002 - _02264D82 - 2 ; case 10 + .short _02265022 - _02264D82 - 2 ; case 11 + .short _02265036 - _02264D82 - 2 ; case 12 + .short _02265046 - _02264D82 - 2 ; case 13 + .short _02265092 - _02264D82 - 2 ; case 14 + .short _022650A8 - _02264D82 - 2 ; case 15 +_02264DA2: + add r0, r6, #0 + mov r1, #0x18 + bl ov70_02262E3C + add r4, r0, #0 + ldr r0, [sp, #8] + ldr r1, [sp] + bl ov70_0225CC70 + str r0, [r4, #0xc] + add r0, r5, #0 + bl ov70_0225DF40 + cmp r0, #0x21 + beq _02264DCA + cmp r0, #0x22 + beq _02264DD0 + cmp r0, #0x23 + beq _02264DD6 + b _02264DDC +_02264DCA: + mov r0, #2 + strh r0, [r4, #6] + b _02264DE0 +_02264DD0: + mov r0, #1 + strh r0, [r4, #6] + b _02264DE0 +_02264DD6: + mov r0, #0 + strh r0, [r4, #6] + b _02264DE0 +_02264DDC: + bl sub_02022974 +_02264DE0: + add r0, r6, #0 + mov r1, #1 + bl ov70_02262E88 + b _022650D2 +_02264DEA: + ldr r0, [sp, #4] + bl ov66_0222E170 + cmp r0, #0 + bne _02264E02 + mov r0, #8 + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #6 + bl ov70_02262E88 + b _022650D2 +_02264E02: + ldr r0, [sp, #4] + bl ov66_0222E12C + cmp r0, #1 + bne _02264E1A + mov r0, #0xa + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #6 + bl ov70_02262E88 + b _022650D2 +_02264E1A: + ldrh r2, [r4, #6] + ldr r0, [sp, #4] + ldr r1, [sp] + bl ov66_0222EBB4 + mov r1, #0 + mvn r1, r1 + str r0, [r4, #0] + cmp r0, r1 + beq _02264E50 + add r0, r6, #0 + mov r1, #2 + bl ov70_02262E88 + add r0, r5, #0 + mov r1, #0 + mov r2, #0x1f + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + b _022650D2 +_02264E50: + mov r0, #9 + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #6 + bl ov70_02262E88 + b _022650D2 +_02264E5E: + ldr r0, _022650D8 ; =0x021BF67C + mov r1, #2 + ldr r0, [r0, #0x48] + tst r1, r0 + bne _02264E6E + mov r1, #0x80 + tst r0, r1 + beq _02264E8E +_02264E6E: + ldr r0, [sp, #4] + ldr r1, [sp] + bl ov66_0222EBC4 + add r0, r5, #0 + bl ov70_0225DFCC + mov r0, #6 + strb r0, [r4, #0xa] + mov r0, #0xf + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #0xc + bl ov70_02262E88 + b _022650D2 +_02264E8E: + add r0, r4, #0 + add r1, r7, #0 + bl ov70_02265104 + cmp r0, #1 + beq _02264E9C + b _022650D2 +_02264E9C: + add r0, r5, #0 + bl ov70_0225DFCC + ldr r0, [sp, #4] + bl ov66_0222EC40 + mov r0, #0 + strh r0, [r4, #8] + add r0, r5, #0 + bl ov70_0225DEE8 + mov r1, #0xa + bl ov66_0222E3E4 + add r0, r5, #0 + bl ov70_0225DF44 + ldr r0, [sp, #0xc] + bl ov70_02260B3C + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov70_0225D030 + ldr r0, [r4, #0xc] + mov r1, #1 + bl ov70_0225D06C + ldr r0, _022650DC ; =0x000005AA + bl sub_02005748 + add r0, r5, #0 + bl ov70_0225E410 + mov r0, #3 + strb r0, [r4, #0xa] + add r0, r6, #0 + mov r1, #0xc + bl ov70_02262E88 + ldr r0, [sp, #4] + bl ov66_0222F000 + b _022650D2 +_02264EF4: + ldr r2, [sp, #0xc] + add r0, r4, #0 + add r1, r7, #0 + bl ov70_02265144 + cmp r0, #1 + bne _02264FB6 + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov70_0225D06C + ldr r0, [r4, #0xc] + mov r1, #2 + bl ov70_0225D060 + ldr r0, [r4, #0xc] + mov r1, #8 + bl ov70_0225D0B4 + add r0, r6, #0 + mov r1, #4 + bl ov70_02262E88 + mov r0, #0 + strh r0, [r4, #8] + b _022650D2 +_02264F28: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265344 + ldr r1, [sp, #0xc] + add r0, r4, #0 + bl ov70_022650E4 + add r0, r4, #0 + add r1, r7, #0 + bl ov70_022652BC + cmp r0, #1 + bne _02264FB6 + add r0, r6, #0 + mov r1, #5 + bl ov70_02262E88 + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E43C + b _022650D2 +_02264F58: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265344 + ldr r1, [sp, #0xc] + add r0, r4, #0 + bl ov70_022650E4 + ldr r0, [r4, #0xc] + add r1, sp, #0x10 + bl ov70_0225D054 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265370 + mov r0, #6 + ldr r1, [sp, #0x10] + lsl r0, r0, #0x10 + cmp r1, r0 + bge _02264FB6 + mov r0, #0 + strb r0, [r4, #0xb] + add r0, r6, #0 + mov r1, #0xd + bl ov70_02262E88 + b _022650D2 +_02264F94: + ldr r0, [sp, #8] + ldr r1, [r4, #0xc] + mov r2, #2 + mov r3, #1 + bl ov70_0225CDAC + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + b _022650D2 +_02264FAA: + ldr r0, [r4, #0xc] + mov r1, #5 + bl ov70_0225CD60 + cmp r0, #0 + beq _02264FB8 +_02264FB6: + b _022650D2 +_02264FB8: + ldrh r1, [r4, #4] + add r0, r6, #0 + bl ov70_02262E88 + b _022650D2 +_02264FC2: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x1e + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0xf + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #0xb + bl ov70_02262E88 + b _022650D2 +_02264FE2: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x20 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0xf + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #0xb + bl ov70_02262E88 + b _022650D2 +_02265002: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x21 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0xf + strh r0, [r4, #4] + add r0, r6, #0 + mov r1, #0xb + bl ov70_02262E88 + b _022650D2 +_02265022: + add r0, r5, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _022650D2 + ldrh r1, [r4, #4] + add r0, r6, #0 + bl ov70_02262E88 + b _022650D2 +_02265036: + add r0, r5, #0 + bl ov70_0225DFEC + ldrb r1, [r4, #0xa] + add r0, r6, #0 + bl ov70_02262E88 + b _022650D2 +_02265046: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265344 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265370 + ldrb r0, [r4, #0xb] + add r0, r0, #1 + strb r0, [r4, #0xb] + ldrb r0, [r4, #0xb] + cmp r0, #0x78 + bls _022650D2 + add r0, r5, #0 + mov r1, #1 + bl ov70_0225DF34 + add r0, r5, #0 + mov r1, #0 + bl ov70_0225DF38 + add r0, r5, #0 + bl ov70_0225DFEC + add r0, r5, #0 + bl ov70_0225DEE8 + mov r1, #0xb + bl ov66_0222E3E4 + add r0, r6, #0 + mov r1, #0xe + bl ov70_02262E88 + b _022650D2 +_02265092: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265344 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02265370 + b _022650D2 +_022650A8: + add r0, r5, #0 + bl ov70_0225DF10 + add r7, r0, #0 + add r0, r5, #0 + bl ov70_0225DFEC + ldr r0, [sp, #8] + ldr r1, [r4, #0xc] + mov r2, #1 + bl ov70_0225CDEC + add r0, r6, #0 + bl ov70_02262E64 + ldr r1, [sp] + ldr r2, _022650E0 ; =0x0226D9D0 + add r0, r7, #0 + mov r3, #0 + bl ov70_02262E94 +_022650D2: + mov r0, #0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022650D8: .word 0x021BF67C +_022650DC: .word 0x000005AA +_022650E0: .word 0x0226D9D0 + thumb_func_end ov70_02264D38 + + thumb_func_start ov70_022650E4 +ov70_022650E4: ; 0x022650E4 + push {r3, r4, lr} + sub sp, #0xc + ldr r0, [r0, #0xc] + add r4, r1, #0 + add r1, sp, #0 + bl ov70_0225D054 + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl ov70_02260B18 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_022650E4 + + thumb_func_start ov70_02265104 +ov70_02265104: ; 0x02265104 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov66_0222EC04 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r4, #0 + add r3, sp, #8 + bl ov70_02262318 + ldr r0, [r5, #0xc] + add r1, sp, #0x14 + bl ov70_0225D054 + mov r0, #1 + ldr r1, [sp, #0x14] + lsl r0, r0, #0x10 + add r1, r1, r0 + ldr r0, [sp, #8] + cmp r1, r0 + blt _0226513E + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, pc} +_0226513E: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov70_02265104 + + thumb_func_start ov70_02265144 +ov70_02265144: ; 0x02265144 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #8 + add r6, r1, #0 + ldrsh r1, [r5, r0] + add r7, r2, #0 + add r1, r1, #1 + strh r1, [r5, #8] + ldrsh r0, [r5, r0] + cmp r0, #0x18 + bge _02265160 + mov r4, #0 + b _02265166 +_02265160: + mov r0, #0x18 + strh r0, [r5, #8] + mov r4, #1 +_02265166: + ldr r0, [r5, #0] + add r1, sp, #0xc + add r2, sp, #8 + bl ov66_0222EC04 + ldr r1, [sp, #0xc] + ldr r2, [sp, #8] + add r0, r6, #0 + add r3, sp, #0x1c + bl ov70_02262318 + ldr r0, [r5, #0xc] + bl ov70_0225CD34 + add r1, sp, #0 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r2, [r1] + add r0, sp, #4 + strh r2, [r1, #4] + ldrh r2, [r1, #2] + strh r2, [r1, #6] + add r1, sp, #0x28 + bl ov70_0225C700 + mov r0, #0 + str r0, [sp, #0x10] + ldr r1, [sp, #0x20] + ldr r0, [sp, #0x2c] + sub r6, r1, r0 + mov r0, #8 + ldrsh r0, [r5, r0] + cmp r0, #0 + ble _022651BE + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _022651CC +_022651BE: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_022651CC: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #6 + lsl r1, r1, #0xe + bl sub_020BCFD0 + str r0, [sp, #0x14] + mov r0, #8 + ldrsh r2, [r5, r0] + cmp r2, #4 + blt _02265252 + ldr r1, [sp, #0x24] + ldr r0, [sp, #0x30] + sub r6, r1, r0 + sub r0, r2, #4 + cmp r0, #0 + ble _0226521A + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _02265228 +_0226521A: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_02265228: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #5 + lsl r1, r1, #0xe + bl sub_020BCFD0 + str r0, [sp, #0x18] + b _02265256 +_02265252: + mov r0, #0 + str r0, [sp, #0x18] +_02265256: + add r0, sp, #0x10 + add r1, sp, #0x28 + add r2, r0, #0 + bl sub_020BD17C + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + ldr r3, [sp, #0x18] + add r0, r7, #0 + bl ov70_02260B18 + mov r0, #8 + ldrsh r1, [r5, r0] + ldr r0, _022652B4 ; =0x00007FFF + mul r0, r1 + mov r1, #0x18 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r2, r0, #2 + ldr r0, _022652B8 ; =0x020F983C + ldr r1, [sp, #0x14] + ldrsh r3, [r0, r2] + asr r0, r3, #0x1f + lsr r2, r3, #0x10 + lsl r0, r0, #0x10 + orr r0, r2 + mov r2, #2 + lsl r6, r3, #0x10 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r6, r2 + adc r0, r3 + lsl r0, r0, #0x14 + lsr r2, r2, #0xc + orr r2, r0 + add r0, r1, r2 + str r0, [sp, #0x14] + ldr r0, [r5, #0xc] + add r1, sp, #0x10 + bl ov70_0225D048 + add r0, r4, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022652B4: .word 0x00007FFF +_022652B8: .word 0x020F983C + thumb_func_end ov70_02265144 + + thumb_func_start ov70_022652BC +ov70_022652BC: ; 0x022652BC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #8 + ldrsh r1, [r5, r0] + add r1, r1, #1 + strh r1, [r5, #8] + ldrsh r0, [r5, r0] + cmp r0, #0x10 + bge _022652D4 + mov r6, #0 + b _022652DA +_022652D4: + mov r0, #0x10 + strh r0, [r5, #8] + mov r6, #1 +_022652DA: + mov r0, #8 + ldrsh r0, [r5, r0] + mov r3, #0 + lsr r2, r0, #0x1f + lsl r1, r0, #0x1d + sub r1, r1, r2 + mov r0, #0x1d + ror r1, r0 + add r1, r2, r1 + ldr r0, _0226533C ; =0x00007FFF + add r2, r1, #0 + mul r2, r0 + asr r0, r2, #2 + lsr r0, r0, #0x1d + add r0, r2, r0 + lsl r0, r0, #0xd + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02265340 ; =0x020F983C + mov r2, #3 + ldrsh r0, [r0, r1] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r4, r2, #0xc + orr r4, r0 + ldr r0, [r5, #0xc] + add r1, sp, #0 + bl ov70_0225D054 + ldr r0, [sp, #4] + add r1, sp, #0 + add r0, r0, r4 + str r0, [sp, #4] + ldr r0, [r5, #0xc] + bl ov70_0225D048 + add r0, r6, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0226533C: .word 0x00007FFF +_02265340: .word 0x020F983C + thumb_func_end ov70_022652BC + + thumb_func_start ov70_02265344 +ov70_02265344: ; 0x02265344 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + add r1, sp, #0 + add r2, sp, #4 + bl ov66_0222EC04 + ldr r1, [sp] + ldr r2, [sp, #4] + add r0, r4, #0 + add r3, sp, #8 + bl ov70_02262318 + ldr r0, [r5, #0xc] + add r1, sp, #8 + bl ov70_0225D048 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02265344 + + thumb_func_start ov70_02265370 +ov70_02265370: ; 0x02265370 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r2, #0 + add r1, sp, #4 + add r2, sp, #0 + bl ov66_0222EC04 + ldr r1, [sp, #4] + add r0, r4, #0 + bl ov70_0225E420 + cmp r0, #1 + bne _022653A4 + add r0, r5, #0 + add r0, #0x10 + bl ov70_02263334 + cmp r0, #0 + bne _022653B8 + add r0, r5, #0 + add r0, #0x10 + bl ov70_02263270 + b _022653B8 +_022653A4: + add r0, r5, #0 + add r0, #0x10 + bl ov70_02263334 + cmp r0, #1 + bne _022653B8 + add r0, r5, #0 + add r0, #0x10 + bl ov70_0226332C +_022653B8: + add r0, r5, #0 + add r0, #0x10 + bl ov70_02263290 + add r4, r0, #0 + ldr r0, [r5, #0xc] + add r1, sp, #8 + bl ov70_0225D054 + ldr r0, [sp, #0xc] + add r1, sp, #8 + add r0, r0, r4 + str r0, [sp, #0xc] + ldr r0, [r5, #0xc] + bl ov70_0225D048 + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov70_02265370 + + thumb_func_start ov70_022653DC +ov70_022653DC: ; 0x022653DC + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x12 + bl ov70_0225E00C + mov r4, #1 + mov r6, #0 + add r7, r4, #0 +_022653F0: + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov70_0225E30C + add r0, r5, #0 + add r1, r7, #0 + mov r2, #6 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov70_0225E044 + add r4, r4, #1 + cmp r4, #0x12 + blt _022653F0 + add r0, r5, #0 + mov r1, #1 + mov r2, #7 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E044 + ldr r2, [sp] + ldr r3, _0226544C ; =0x0226DA98 + add r2, #8 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r5, #0 + bl ov70_0225E054 + ldr r1, [sp] + str r0, [r1, #8] + pop {r3, r4, r5, r6, r7, pc} + nop +_0226544C: .word 0x0226DA98 + thumb_func_end ov70_022653DC + + thumb_func_start ov70_02265450 +ov70_02265450: ; 0x02265450 + ldr r3, _02265458 ; =ov70_0225E034 + add r0, r1, #0 + bx r3 + nop +_02265458: .word ov70_0225E034 + thumb_func_end ov70_02265450 + + thumb_func_start ov70_0226545C +ov70_0226545C: ; 0x0226545C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + add r4, r2, #0 + bl ov70_0225DEE8 + str r0, [sp, #8] + add r0, r6, #0 + bl ov70_0225DEF0 + add r1, r4, #0 + str r0, [sp, #0xc] + bl ov70_0225CC70 + add r7, r0, #0 + add r0, r5, #0 + bl ov70_02262E80 + str r0, [sp, #0x10] + add r0, r6, #0 + bl ov70_0225DF10 + str r0, [sp, #0x14] + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #5 + bhi _02265516 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022654A4: ; jump table + .short _022654B0 - _022654A4 - 2 ; case 0 + .short _022654C0 - _022654A4 - 2 ; case 1 + .short _022654E4 - _022654A4 - 2 ; case 2 + .short _02265528 - _022654A4 - 2 ; case 3 + .short _022655DA - _022654A4 - 2 ; case 4 + .short _022655EC - _022654A4 - 2 ; case 5 +_022654B0: + add r0, r5, #0 + mov r1, #8 + bl ov70_02262E3C + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 +_022654C0: + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov66_0222E02C + add r6, r0, #0 + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov66_0222E34C + cmp r6, #1 + beq _022654DA + cmp r0, #1 + bne _02265516 +_022654DA: + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + b _02265620 +_022654E4: + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov66_0222E374 + add r6, r0, #0 + bne _022654FA + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02265620 +_022654FA: + bl ov66_0222E8D8 + cmp r0, #1 + bne _02265516 + add r0, r6, #0 + bl ov66_0222E858 + add r2, r0, #0 + ldr r0, [sp, #0xc] + add r1, r4, #0 + bl ov70_0225CBB8 + cmp r0, #0 + bne _02265518 +_02265516: + b _02265620 +_02265518: + mov r1, #0 + bl ov70_0225D0C0 + add r0, r5, #0 + mov r1, #3 + bl ov70_02262E88 + b _02265620 +_02265528: + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov66_0222E374 + cmp r0, #0 + bne _02265548 + cmp r7, #0 + beq _0226553E + add r0, r7, #0 + bl ov70_0225CC54 +_0226553E: + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02265620 +_02265548: + bl ov66_0222E71C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + ldr r1, [sp, #8] + add r2, r6, #0 + add r3, r7, #0 + bl ov70_02265CCC + cmp r0, #0 + beq _022655A6 + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF6C + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + add r0, r7, #0 + mov r1, #0 + bl ov70_0225D030 + ldr r0, [sp, #0x14] + ldr r2, _02265628 ; =0x0226D9F0 + ldr r3, [sp, #0x10] + add r1, r4, #0 + bl ov70_02262EC0 + b _02265620 +_022655A6: + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #4 + bl ov70_0225CDEC + add r0, r5, #0 + mov r1, #4 + bl ov70_02262E88 + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF6C + add r0, r7, #0 + mov r1, #1 + bl ov70_0225D0C0 + b _02265620 +_022655DA: + add r0, r7, #0 + bl ov70_0225CE38 + cmp r0, #1 + bne _02265620 + add r0, r5, #0 + bl ov70_02262E8C + b _02265620 +_022655EC: + add r0, r5, #0 + bl ov70_02262E64 + ldr r0, [sp, #0xc] + add r1, r7, #0 + mov r2, #2 + bl ov70_0225CDEC + ldr r0, [sp, #0x14] + ldr r2, _0226562C ; =0x0226D9D8 + add r1, r4, #0 + mov r3, #0 + bl ov70_02262E94 + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF4C + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF6C +_02265620: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02265628: .word 0x0226D9F0 +_0226562C: .word 0x0226D9D8 + thumb_func_end ov70_0226545C + + thumb_func_start ov70_02265630 +ov70_02265630: ; 0x02265630 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r4, r2, #0 + bl ov70_0225DEE8 + add r6, r0, #0 + add r0, r5, #0 + bl ov70_0225DEF0 + str r0, [sp, #0x10] + add r0, r5, #0 + bl ov70_0225DF10 + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + add r1, r4, #0 + bl ov70_0225CC70 + add r7, r0, #0 + ldr r0, [sp, #0x10] + bl ov70_0225CCAC + ldr r0, [sp, #8] + bl ov70_02262E80 + str r0, [sp, #0x14] + ldr r0, [sp, #8] + bl ov70_02262E84 + cmp r0, #0 + beq _0226567A + cmp r0, #1 + beq _0226568C + b _022657BA +_0226567A: + ldr r0, [sp, #8] + mov r1, #8 + bl ov70_02262E3C + str r0, [sp, #0x14] + ldr r0, [sp, #8] + mov r1, #1 + bl ov70_02262E88 +_0226568C: + add r0, r6, #0 + add r1, r4, #0 + bl ov66_0222E058 + cmp r0, #0 + beq _022656CE + ldr r0, [sp, #8] + bl ov70_02262E64 + ldr r0, [sp, #0x10] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF6C + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + ldr r0, [sp, #0xc] + ldr r2, _022657C0 ; =0x0226D9E0 + add r1, r4, #0 + mov r3, #0 + bl ov70_02262E94 + b _022657BA +_022656CE: + add r0, r6, #0 + add r1, r4, #0 + bl ov66_0222E09C + add r0, r6, #0 + bl ov66_0222E170 + cmp r0, #1 + bne _0226572E + add r0, r6, #0 + add r1, r4, #0 + bl ov66_0222EBA4 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0226572E + ldr r0, [sp, #0x10] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF6C + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + add r0, r7, #0 + mov r1, #0 + bl ov70_0225D030 + ldr r0, [sp, #8] + bl ov70_02262E64 + ldr r0, [sp, #0xc] + ldr r2, _022657C4 ; =0x0226D9E8 + ldr r3, [sp, #0x14] + add r1, r4, #0 + bl ov70_02262E94 + b _022657BA +_0226572E: + add r0, r6, #0 + add r1, r4, #0 + bl ov66_0222E374 + bl ov66_0222E71C + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x14] + add r1, r6, #0 + add r2, r5, #0 + add r3, r7, #0 + bl ov70_02265CCC + cmp r0, #0 + beq _0226578C + ldr r0, [sp, #0x10] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF6C + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + add r0, r7, #0 + mov r1, #0 + bl ov70_0225D030 + ldr r0, [sp, #0xc] + ldr r2, _022657C8 ; =0x0226D9F0 + ldr r3, [sp, #0x14] + add r1, r4, #0 + bl ov70_02262EC0 + b _022657BA +_0226578C: + add r0, r6, #0 + add r1, r4, #0 + bl ov66_0222EB54 + cmp r0, #1 + bne _022657BA + ldr r0, [sp, #0x10] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + ldr r0, [sp, #0xc] + ldr r2, _022657CC ; =0x0226DA18 + add r1, r4, #0 + mov r3, #0 + bl ov70_02262EC0 +_022657BA: + mov r0, #0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022657C0: .word 0x0226D9E0 +_022657C4: .word 0x0226D9E8 +_022657C8: .word 0x0226D9F0 +_022657CC: .word 0x0226DA18 + thumb_func_end ov70_02265630 + + thumb_func_start ov70_022657D0 +ov70_022657D0: ; 0x022657D0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + str r2, [sp] + add r0, r6, #0 + bl ov70_0225DEF0 + ldr r1, [sp] + add r7, r0, #0 + bl ov70_0225CC70 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _022657FC + cmp r0, #1 + beq _0226580E + cmp r0, #2 + beq _02265820 + b _02265836 +_022657FC: + add r0, r7, #0 + add r1, r4, #0 + mov r2, #3 + bl ov70_0225CDEC + add r0, r5, #0 + bl ov70_02262E8C + b _02265836 +_0226580E: + add r0, r4, #0 + bl ov70_0225CE38 + cmp r0, #0 + beq _02265836 + add r0, r5, #0 + bl ov70_02262E8C + b _02265836 +_02265820: + add r0, r4, #0 + bl ov70_0225CC54 + add r0, r6, #0 + bl ov70_0225DF10 + ldr r1, [sp] + ldr r2, _0226583C ; =0x0226DA10 + mov r3, #0 + bl ov70_02262E94 +_02265836: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226583C: .word 0x0226DA10 + thumb_func_end ov70_022657D0 + + thumb_func_start ov70_02265840 +ov70_02265840: ; 0x02265840 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + add r7, r2, #0 + bl ov70_0225DEE8 + str r0, [sp] + add r0, r6, #0 + bl ov70_0225DEF0 + str r0, [sp, #8] + add r0, r6, #0 + bl ov70_0225DEF8 + str r0, [sp, #4] + add r0, r5, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #4 + bhi _022658DE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02265880: ; jump table + .short _0226588A - _02265880 - 2 ; case 0 + .short _022658D4 - _02265880 - 2 ; case 1 + .short _0226593A - _02265880 - 2 ; case 2 + .short _022659E8 - _02265880 - 2 ; case 3 + .short _02265A58 - _02265880 - 2 ; case 4 +_0226588A: + add r0, r5, #0 + mov r1, #0x20 + bl ov70_02262E3C + add r4, r0, #0 + ldr r0, [sp, #8] + add r1, r7, #0 + bl ov70_0225CC70 + str r0, [r4, #0] + ldr r0, [sp] + add r1, r7, #0 + bl ov66_0222EBA4 + mov r1, #0 + mvn r1, r1 + str r0, [r4, #4] + cmp r0, r1 + bne _022658B4 + bl sub_02022974 +_022658B4: + add r2, r4, #0 + ldr r0, [r4, #4] + add r1, r4, #4 + add r2, #8 + bl ov66_0222EC04 + ldr r0, [sp, #8] + ldr r1, [r4, #0] + mov r2, #3 + bl ov70_0225CDEC + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02265A74 +_022658D4: + ldr r0, [r4, #0] + bl ov70_0225CE38 + cmp r0, #0 + bne _022658E0 +_022658DE: + b _02265A74 +_022658E0: + ldr r0, [sp, #4] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + add r3, sp, #0x34 + bl ov70_02262318 + mov r0, #1 + ldr r1, [sp, #0x34] + lsl r0, r0, #0x10 + sub r0, r1, r0 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + add r1, sp, #0x34 + bl ov70_0225D054 + ldr r0, [sp, #0x38] + mov r3, sp + str r0, [r4, #0xc] + mov r1, #0 + str r1, [r4, #0x14] + add r0, sp, #0xc + strh r1, [r0] + strh r1, [r0, #2] + add r1, sp, #0xc + ldrh r2, [r1] + ldr r0, [r4, #0] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #2] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov70_0225CCB4 + ldr r0, _02265A7C ; =0x0000064F + bl sub_02005748 + ldr r0, [r4, #0] + mov r1, #1 + bl ov70_0225D084 + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + b _02265A74 +_0226593A: + ldr r0, [r4, #0x14] + mov r6, #0 + add r0, r0, #1 + str r0, [r4, #0x14] + cmp r0, #0x18 + blt _0226594C + mov r0, #0x18 + str r0, [r4, #0x14] + mov r6, #1 +_0226594C: + ldr r0, [sp, #4] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + add r3, sp, #0x28 + bl ov70_02262318 + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x2c] + str r0, [sp, #0x24] + ldr r0, [r4, #0x10] + str r0, [sp, #0x1c] + ldr r0, [r4, #0xc] + sub r7, r1, r0 + ldr r0, [r4, #0x14] + cmp r0, #0 + ble _0226597E + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226598C +_0226597E: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226598C: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r7, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + mov r1, #6 + lsl r1, r1, #0xe + bl sub_020BCFD0 + str r0, [sp, #0x20] + ldr r1, [r4, #0xc] + add r0, r0, r1 + str r0, [sp, #0x20] + ldr r0, [r4, #0] + add r1, sp, #0x1c + bl ov70_0225D048 + cmp r6, #1 + bne _02265A74 + ldr r0, [r4, #0] + mov r1, #0 + bl ov70_0225D084 + ldr r0, [r4, #0] + mov r1, #8 + bl ov70_0225D0B4 + ldr r0, [r4, #0] + mov r1, #2 + bl ov70_0225D060 + add r0, r5, #0 + mov r1, #3 + bl ov70_02262E88 + b _02265A74 +_022659E8: + ldr r1, [r4, #4] + add r0, r6, #0 + bl ov70_0225E420 + cmp r0, #1 + bne _02265A0A + add r0, r4, #0 + add r0, #0x18 + bl ov70_02263334 + cmp r0, #0 + bne _02265A1E + add r0, r4, #0 + add r0, #0x18 + bl ov70_02263270 + b _02265A1E +_02265A0A: + add r0, r4, #0 + add r0, #0x18 + bl ov70_02263334 + cmp r0, #1 + bne _02265A1E + add r0, r4, #0 + add r0, #0x18 + bl ov70_0226332C +_02265A1E: + add r0, r4, #0 + add r0, #0x18 + bl ov70_02263290 + add r6, r0, #0 + ldr r0, [sp, #4] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + add r3, sp, #0x10 + bl ov70_02262318 + ldr r0, [sp, #0x14] + add r1, sp, #0x10 + add r0, r0, r6 + str r0, [sp, #0x14] + ldr r0, [r4, #0] + bl ov70_0225D048 + ldr r0, [sp] + ldr r1, [r4, #4] + bl ov66_0222EB7C + cmp r0, #2 + bne _02265A74 + add r0, r5, #0 + mov r1, #4 + bl ov70_02262E88 + b _02265A74 +_02265A58: + ldr r0, [r4, #0] + bl ov70_0225CC54 + add r0, r5, #0 + bl ov70_02262E64 + add r0, r6, #0 + bl ov70_0225DF10 + ldr r2, _02265A80 ; =0x0226DA10 + add r1, r7, #0 + mov r3, #0 + bl ov70_02262E94 +_02265A74: + mov r0, #0 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_02265A7C: .word 0x0000064F +_02265A80: .word 0x0226DA10 + thumb_func_end ov70_02265840 + + thumb_func_start ov70_02265A84 +ov70_02265A84: ; 0x02265A84 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r1, [sp] + add r7, r0, #0 + add r4, r2, #0 + bl ov70_02262E38 + add r6, r0, #0 + ldr r0, [sp] + bl ov70_0225DEE8 + str r0, [sp, #8] + ldr r0, [sp] + bl ov70_0225DEF0 + str r0, [sp, #0xc] + add r1, r4, #0 + bl ov70_0225CC70 + add r5, r0, #0 + ldr r0, [sp, #0xc] + bl ov70_0225CCAC + str r0, [sp, #0x10] + add r0, r7, #0 + bl ov70_02262E84 + cmp r0, #0xa + bhi _02265B68 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02265ACA: ; jump table + .short _02265AE0 - _02265ACA - 2 ; case 0 + .short _02265AF8 - _02265ACA - 2 ; case 1 + .short _02265B0A - _02265ACA - 2 ; case 2 + .short _02265B1C - _02265ACA - 2 ; case 3 + .short _02265B5E - _02265ACA - 2 ; case 4 + .short _02265B94 - _02265ACA - 2 ; case 5 + .short _02265C3E - _02265ACA - 2 ; case 6 + .short _02265B0A - _02265ACA - 2 ; case 7 + .short _02265C50 - _02265ACA - 2 ; case 8 + .short _02265B0A - _02265ACA - 2 ; case 9 + .short _02265C9E - _02265ACA - 2 ; case 10 +_02265AE0: + ldrb r0, [r6, #4] + cmp r0, #0 + bne _02265AEE + add r0, r7, #0 + bl ov70_02262E8C + b _02265CC6 +_02265AEE: + add r0, r7, #0 + mov r1, #3 + bl ov70_02262E88 + b _02265CC6 +_02265AF8: + ldr r0, [sp, #0xc] + add r1, r5, #0 + mov r2, #3 + bl ov70_0225CDEC + add r0, r7, #0 + bl ov70_02262E8C + b _02265CC6 +_02265B0A: + add r0, r5, #0 + bl ov70_0225CE38 + cmp r0, #1 + bne _02265B68 + add r0, r7, #0 + bl ov70_02262E8C + b _02265CC6 +_02265B1C: + add r0, r5, #0 + bl ov70_0225CD34 + add r2, sp, #0x14 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + add r1, sp, #0x1c + strh r0, [r2, #8] + ldrh r0, [r2, #2] + strh r0, [r2, #0xa] + add r0, r5, #0 + bl ov70_0225D03C + add r0, r5, #0 + bl ov70_0225D0CC + cmp r0, #0 + bne _02265B4C + add r0, r5, #0 + mov r1, #1 + bl ov70_0225D0C0 +_02265B4C: + ldr r0, [sp, #0xc] + add r1, r5, #0 + mov r2, #4 + bl ov70_0225CDEC + add r0, r7, #0 + bl ov70_02262E8C + b _02265CC6 +_02265B5E: + add r0, r5, #0 + bl ov70_0225CE38 + cmp r0, #1 + beq _02265B6A +_02265B68: + b _02265CC6 +_02265B6A: + add r0, r7, #0 + bl ov70_02262E8C + ldr r0, [sp, #0xc] + add r1, r5, #0 + mov r2, #0 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF4C + lsl r1, r4, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF6C + b _02265CC6 +_02265B94: + mov r0, #0 + str r0, [sp, #4] + ldrb r0, [r6, #3] + cmp r0, #1 + bne _02265BD4 + ldr r0, [sp, #8] + bl ov66_0222EEAC + cmp r0, #0 + bne _02265BD4 + ldr r0, [sp, #8] + bl ov66_0222E3BC + bl ov66_0222E71C + cmp r0, #9 + bne _02265BD4 + ldr r0, [sp, #8] + bl ov66_0222EEA0 + add r0, r5, #0 + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + add r3, r0, #0 + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x10] + mov r2, #0 + bl ov70_0225CDAC +_02265BD4: + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov66_0222E374 + add r5, r0, #0 + bne _02265BE6 + mov r0, #1 + str r0, [sp, #4] + b _02265C18 +_02265BE6: + ldrb r0, [r6, #3] + cmp r0, #1 + bne _02265BFC + ldr r0, [sp, #8] + bl ov66_0222EDF4 + cmp r0, #0 + bne _02265BFC + mov r0, #1 + str r0, [sp, #4] + b _02265C18 +_02265BFC: + ldr r0, [sp, #8] + add r1, r4, #0 + bl ov66_0222E09C + cmp r0, #0 + beq _02265C18 + add r0, r5, #0 + bl ov66_0222E71C + ldrb r1, [r6, #2] + cmp r0, r1 + beq _02265C18 + mov r0, #1 + str r0, [sp, #4] +_02265C18: + ldr r0, [sp, #4] + cmp r0, #1 + bne _02265CC6 + add r0, r7, #0 + bl ov70_02262E8C + lsl r1, r4, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF4C + lsl r1, r4, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + mov r2, #1 + bl ov70_0225DF6C + b _02265CC6 +_02265C3E: + ldr r0, [sp, #0xc] + add r1, r5, #0 + mov r2, #3 + bl ov70_0225CDEC + add r0, r7, #0 + bl ov70_02262E8C + b _02265CC6 +_02265C50: + ldr r0, [sp, #0xc] + bl ov70_0225CCAC + ldrb r1, [r6] + ldrb r2, [r6, #1] + bl ov70_0225CEDC + cmp r0, #0 + bne _02265CC6 + ldrb r0, [r6] + mov r3, sp + add r1, sp, #0x14 + lsl r0, r0, #4 + strh r0, [r1, #4] + ldrb r0, [r6, #1] + sub r3, r3, #4 + lsl r0, r0, #4 + strh r0, [r1, #6] + ldrh r2, [r1, #4] + add r0, r5, #0 + strh r2, [r3] + ldrh r1, [r1, #6] + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov70_0225CCB4 + add r0, r5, #0 + add r1, sp, #0x18 + bl ov70_0225D03C + ldr r0, [sp, #0xc] + add r1, r5, #0 + mov r2, #4 + bl ov70_0225CDEC + add r0, r7, #0 + bl ov70_02262E8C + b _02265CC6 +_02265C9E: + ldr r0, [sp, #0xc] + add r1, r5, #0 + mov r2, #2 + bl ov70_0225CDEC + lsl r1, r4, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF4C + lsl r1, r4, #0x18 + ldr r0, [sp] + lsr r1, r1, #0x18 + mov r2, #0 + bl ov70_0225DF6C + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02265CC6: + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02265A84 + + thumb_func_start ov70_02265CCC +ov70_02265CCC: ; 0x02265CCC + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r6, r2, #0 + add r4, r0, #0 + add r0, r6, #0 + str r1, [sp, #4] + str r3, [sp, #8] + mov r7, #0 + bl ov70_0225DEF0 + add r5, r0, #0 + bl ov70_0225CCAC + str r0, [sp, #0xc] + add r0, r6, #0 + bl ov70_0225DF00 + add r6, r0, #0 + ldr r0, [sp, #8] + mov r1, #4 + bl ov70_0225CD60 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x20] + add r0, sp, #0x28 + ldrb r0, [r0, #0x10] + cmp r0, #0xe + bhi _02265D44 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02265D12: ; jump table + .short _02265E50 - _02265D12 - 2 ; case 0 + .short _02265E50 - _02265D12 - 2 ; case 1 + .short _02265D30 - _02265D12 - 2 ; case 2 + .short _02265D4C - _02265D12 - 2 ; case 3 + .short _02265D66 - _02265D12 - 2 ; case 4 + .short _02265D80 - _02265D12 - 2 ; case 5 + .short _02265D9E - _02265D12 - 2 ; case 6 + .short _02265DBC - _02265D12 - 2 ; case 7 + .short _02265DDA - _02265D12 - 2 ; case 8 + .short _02265DFE - _02265D12 - 2 ; case 9 + .short _02265DF8 - _02265D12 - 2 ; case 10 + .short _02265E50 - _02265D12 - 2 ; case 11 + .short _02265E50 - _02265D12 - 2 ; case 12 + .short _02265E50 - _02265D12 - 2 ; case 13 + .short _02265E50 - _02265D12 - 2 ; case 14 +_02265D30: + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265EB4 ; =0x0226DA28 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #4 + bl ov70_02265ED0 + cmp r0, #0 + beq _02265D46 +_02265D44: + b _02265E56 +_02265D46: + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265D4C: + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265EB8 ; =0x0226DA58 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #4 + bl ov70_02265ED0 + cmp r0, #0 + bne _02265E56 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265D66: + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265EBC ; =0x0226DA38 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #4 + bl ov70_02265ED0 + cmp r0, #0 + bne _02265E56 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265D80: + add r0, r7, #0 + str r0, [sp, #0x20] + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265EC0 ; =0x0226DAB8 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #8 + bl ov70_02265ED0 + cmp r0, #0 + bne _02265E56 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265D9E: + add r0, r7, #0 + str r0, [sp, #0x20] + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265EC4 ; =0x0226DAD8 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #8 + bl ov70_02265ED0 + cmp r0, #0 + bne _02265E56 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265DBC: + mov r0, #3 + str r0, [sp, #0x20] + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265EC8 ; =0x0226DA48 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #4 + bl ov70_02265ED0 + cmp r0, #0 + bne _02265E56 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265DDA: + add r0, r7, #0 + str r0, [sp, #0x20] + add r0, sp, #0x1c + str r0, [sp] + ldr r2, _02265ECC ; =0x0226DA68 + add r0, r6, #0 + add r1, r5, #0 + mov r3, #4 + bl ov70_02265ED0 + cmp r0, #0 + bne _02265E56 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265DF8: + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265DFE: + ldr r0, [sp, #4] + bl ov66_0222EDF4 + cmp r0, #0 + bne _02265E0E + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265E0E: + ldr r0, [sp, #4] + bl ov66_0222EE08 + cmp r0, #0 + bne _02265E1E + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265E1E: + ldr r0, [sp, #4] + bl ov66_0222EE1C + ldr r1, [sp, #0x10] + cmp r1, r0 + beq _02265E30 + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265E30: + ldr r1, [sp, #0xc] + add r0, r5, #0 + add r2, sp, #0x20 + add r3, sp, #0x1c + bl ov70_0225CF4C + cmp r0, #1 + beq _02265E44 + bl sub_02022974 +_02265E44: + ldr r0, [sp, #0x20] + bl ov63_0222C0AC + str r0, [sp, #0x20] + mov r7, #1 + b _02265E56 +_02265E50: + add sp, #0x24 + add r0, r7, #0 + pop {r4, r5, r6, r7, pc} +_02265E56: + ldr r0, [sp, #8] + bl ov70_0225CD34 + add r1, sp, #0x14 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + ldrh r0, [r1] + mov r3, sp + sub r3, r3, #4 + strh r0, [r1, #4] + ldrh r0, [r1, #2] + strh r0, [r1, #6] + ldrh r2, [r1, #8] + ldr r0, [sp, #8] + strh r2, [r3] + ldrh r1, [r1, #0xa] + strh r1, [r3, #2] + ldr r1, [r3, #0] + ldr r2, [sp, #0x20] + bl ov70_0225CD04 + add r1, sp, #0x14 + mov r0, #4 + ldrsh r2, [r1, r0] + asr r0, r2, #3 + lsr r0, r0, #0x1c + add r0, r2, r0 + asr r0, r0, #4 + strb r0, [r4] + mov r0, #6 + ldrsh r1, [r1, r0] + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + strb r0, [r4, #1] + add r0, sp, #0x28 + ldrb r0, [r0, #0x10] + strb r0, [r4, #2] + ldr r0, [sp, #0x3c] + strb r7, [r4, #3] + strb r0, [r4, #4] + mov r0, #1 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02265EB4: .word 0x0226DA28 +_02265EB8: .word 0x0226DA58 +_02265EBC: .word 0x0226DA38 +_02265EC0: .word 0x0226DAB8 +_02265EC4: .word 0x0226DAD8 +_02265EC8: .word 0x0226DA48 +_02265ECC: .word 0x0226DA68 + thumb_func_end ov70_02265CCC + + thumb_func_start ov70_02265ED0 +ov70_02265ED0: ; 0x02265ED0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + ldr r0, [sp, #0x20] + add r5, r2, #0 + str r1, [sp, #4] + add r6, r3, #0 + str r0, [sp, #0x20] + ldr r4, _02265F34 ; =0x00000000 + beq _02265F2C +_02265EE4: + mov r0, #0 + str r0, [sp] + add r2, sp, #8 + ldr r1, [r5, #0] + add r0, r7, #0 + add r2, #2 + add r3, sp, #8 + bl ov70_0225C8D8 + cmp r0, #1 + bne _02265F24 + add r1, sp, #8 + add r2, sp, #8 + ldrh r1, [r1, #2] + ldrh r2, [r2] + ldr r0, [sp, #4] + bl ov70_0225CE7C + cmp r0, #0 + bne _02265F24 + add r1, sp, #8 + ldrh r0, [r1, #2] + lsl r2, r0, #4 + ldr r0, [sp, #0x20] + strh r2, [r0] + ldrh r0, [r1] + lsl r1, r0, #4 + ldr r0, [sp, #0x20] + add sp, #0xc + strh r1, [r0, #2] + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02265F24: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r6 + blo _02265EE4 +_02265F2C: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02265F34: .word 0x00000000 + thumb_func_end ov70_02265ED0 + + .rodata + + + .global Unk_ov70_0226D9D0 +Unk_ov70_0226D9D0: ; 0x0226D9D0 + .incbin "incbin/overlay70_rodata.bin", 0x504, 0x50C - 0x504 + + .global Unk_ov70_0226D9D8 +Unk_ov70_0226D9D8: ; 0x0226D9D8 + .incbin "incbin/overlay70_rodata.bin", 0x50C, 0x514 - 0x50C + + .global Unk_ov70_0226D9E0 +Unk_ov70_0226D9E0: ; 0x0226D9E0 + .incbin "incbin/overlay70_rodata.bin", 0x514, 0x51C - 0x514 + + .global Unk_ov70_0226D9E8 +Unk_ov70_0226D9E8: ; 0x0226D9E8 + .incbin "incbin/overlay70_rodata.bin", 0x51C, 0x524 - 0x51C + + .global Unk_ov70_0226D9F0 +Unk_ov70_0226D9F0: ; 0x0226D9F0 + .incbin "incbin/overlay70_rodata.bin", 0x524, 0x52C - 0x524 + + .global Unk_ov70_0226D9F8 +Unk_ov70_0226D9F8: ; 0x0226D9F8 + .incbin "incbin/overlay70_rodata.bin", 0x52C, 0x534 - 0x52C + + .global Unk_ov70_0226DA00 +Unk_ov70_0226DA00: ; 0x0226DA00 + .incbin "incbin/overlay70_rodata.bin", 0x534, 0x53C - 0x534 + + .global Unk_ov70_0226DA08 +Unk_ov70_0226DA08: ; 0x0226DA08 + .incbin "incbin/overlay70_rodata.bin", 0x53C, 0x544 - 0x53C + + .global Unk_ov70_0226DA10 +Unk_ov70_0226DA10: ; 0x0226DA10 + .incbin "incbin/overlay70_rodata.bin", 0x544, 0x54C - 0x544 + + .global Unk_ov70_0226DA18 +Unk_ov70_0226DA18: ; 0x0226DA18 + .incbin "incbin/overlay70_rodata.bin", 0x54C, 0x554 - 0x54C + + .global Unk_ov70_0226DA20 +Unk_ov70_0226DA20: ; 0x0226DA20 + .incbin "incbin/overlay70_rodata.bin", 0x554, 0x55C - 0x554 + + .global Unk_ov70_0226DA28 +Unk_ov70_0226DA28: ; 0x0226DA28 + .incbin "incbin/overlay70_rodata.bin", 0x55C, 0x56C - 0x55C + + .global Unk_ov70_0226DA38 +Unk_ov70_0226DA38: ; 0x0226DA38 + .incbin "incbin/overlay70_rodata.bin", 0x56C, 0x57C - 0x56C + + .global Unk_ov70_0226DA48 +Unk_ov70_0226DA48: ; 0x0226DA48 + .incbin "incbin/overlay70_rodata.bin", 0x57C, 0x58C - 0x57C + + .global Unk_ov70_0226DA58 +Unk_ov70_0226DA58: ; 0x0226DA58 + .incbin "incbin/overlay70_rodata.bin", 0x58C, 0x59C - 0x58C + + .global Unk_ov70_0226DA68 +Unk_ov70_0226DA68: ; 0x0226DA68 + .incbin "incbin/overlay70_rodata.bin", 0x59C, 0x5AC - 0x59C + + .global Unk_ov70_0226DA78 +Unk_ov70_0226DA78: ; 0x0226DA78 + .incbin "incbin/overlay70_rodata.bin", 0x5AC, 0x5CC - 0x5AC + + .global Unk_ov70_0226DA98 +Unk_ov70_0226DA98: ; 0x0226DA98 + .incbin "incbin/overlay70_rodata.bin", 0x5CC, 0x5EC - 0x5CC + + .global Unk_ov70_0226DAB8 +Unk_ov70_0226DAB8: ; 0x0226DAB8 + .incbin "incbin/overlay70_rodata.bin", 0x5EC, 0x60C - 0x5EC + + .global Unk_ov70_0226DAD8 +Unk_ov70_0226DAD8: ; 0x0226DAD8 + .incbin "incbin/overlay70_rodata.bin", 0x60C, 0x62C - 0x60C + + .global Unk_ov70_0226DAF8 +Unk_ov70_0226DAF8: ; 0x0226DAF8 + .incbin "incbin/overlay70_rodata.bin", 0x62C, 0x65C - 0x62C + + .global Unk_ov70_0226DB28 +Unk_ov70_0226DB28: ; 0x0226DB28 + .incbin "incbin/overlay70_rodata.bin", 0x65C, 0x6EC - 0x65C + + .global Unk_ov70_0226DBB8 +Unk_ov70_0226DBB8: ; 0x0226DBB8 + .incbin "incbin/overlay70_rodata.bin", 0x6EC, 0xD8 + diff --git a/asm/ov70_02265F38.s b/asm/ov70_02265F38.s new file mode 100644 index 000000000..ce1d5c810 --- /dev/null +++ b/asm/ov70_02265F38.s @@ -0,0 +1,1881 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02265F38 +ov70_02265F38: ; 0x02265F38 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r7, r0, #0 + add r5, r1, #0 + str r2, [sp, #0x10] + bl ov70_02262E38 + add r6, r0, #0 + add r0, r7, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r5, #0 + bl ov70_0225DEE8 + str r0, [sp, #0x34] + add r0, r7, #0 + bl ov70_02262E84 + cmp r0, #0x1b + bhi _02266050 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02265F6E: ; jump table + .short _02266050 - _02265F6E - 2 ; case 0 + .short _02266050 - _02265F6E - 2 ; case 1 + .short _02266050 - _02265F6E - 2 ; case 2 + .short _02266050 - _02265F6E - 2 ; case 3 + .short _02266050 - _02265F6E - 2 ; case 4 + .short _02266050 - _02265F6E - 2 ; case 5 + .short _02266050 - _02265F6E - 2 ; case 6 + .short _02266024 - _02265F6E - 2 ; case 7 + .short _02265FEE - _02265F6E - 2 ; case 8 + .short _02265FA6 - _02265F6E - 2 ; case 9 + .short _02265FA6 - _02265F6E - 2 ; case 10 + .short _02265FA6 - _02265F6E - 2 ; case 11 + .short _02265FA6 - _02265F6E - 2 ; case 12 + .short _02265FA6 - _02265F6E - 2 ; case 13 + .short _02265FA6 - _02265F6E - 2 ; case 14 + .short _02266050 - _02265F6E - 2 ; case 15 + .short _02266050 - _02265F6E - 2 ; case 16 + .short _02266024 - _02265F6E - 2 ; case 17 + .short _02266024 - _02265F6E - 2 ; case 18 + .short _02266024 - _02265F6E - 2 ; case 19 + .short _02266024 - _02265F6E - 2 ; case 20 + .short _02266024 - _02265F6E - 2 ; case 21 + .short _02266024 - _02265F6E - 2 ; case 22 + .short _02266050 - _02265F6E - 2 ; case 23 + .short _02266050 - _02265F6E - 2 ; case 24 + .short _02266050 - _02265F6E - 2 ; case 25 + .short _02265FA6 - _02265F6E - 2 ; case 26 + .short _02265FA6 - _02265F6E - 2 ; case 27 +_02265FA6: + ldrb r0, [r6, #1] + bl ov66_02233224 + ldrh r1, [r4, #8] + cmp r1, r0 + bls _02265FC0 + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02266050 +_02265FC0: + bl sub_02035E18 + ldrh r1, [r4, #8] + cmp r1, r0 + ble _02265FD8 + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02266050 +_02265FD8: + bl sub_020388AC + cmp r0, #0 + bne _02265FEE + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02266050 +_02265FEE: + bl ov66_02233374 + cmp r0, #1 + bne _0226600E + ldrb r0, [r6, #1] + bl ov66_02233224 + cmp r0, #1 + bhi _0226600E + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02266050 +_0226600E: + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + bpl _02266024 + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02266050 +_02266024: + bl sub_020380E4 + cmp r0, #5 + bhi _02266050 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02266038: ; jump table + .short _02266050 - _02266038 - 2 ; case 0 + .short _02266050 - _02266038 - 2 ; case 1 + .short _02266044 - _02266038 - 2 ; case 2 + .short _02266044 - _02266038 - 2 ; case 3 + .short _02266044 - _02266038 - 2 ; case 4 + .short _02266044 - _02266038 - 2 ; case 5 +_02266044: + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 +_02266050: + add r0, r7, #0 + bl ov70_02262E84 + cmp r0, #0x1c + bls _0226605E + bl _022669AC +_0226605E: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226606A: ; jump table + .short _022660A4 - _0226606A - 2 ; case 0 + .short _022660B6 - _0226606A - 2 ; case 1 + .short _022660FA - _0226606A - 2 ; case 2 + .short _02266118 - _0226606A - 2 ; case 3 + .short _0226613E - _0226606A - 2 ; case 4 + .short _022661AC - _0226606A - 2 ; case 5 + .short _022661CA - _0226606A - 2 ; case 6 + .short _022662B4 - _0226606A - 2 ; case 7 + .short _02266472 - _0226606A - 2 ; case 8 + .short _022664FA - _0226606A - 2 ; case 9 + .short _0226654E - _0226606A - 2 ; case 10 + .short _0226657A - _0226606A - 2 ; case 11 + .short _022665F2 - _0226606A - 2 ; case 12 + .short _02266620 - _0226606A - 2 ; case 13 + .short _0226665A - _0226606A - 2 ; case 14 + .short _02266700 - _0226606A - 2 ; case 15 + .short _02266750 - _0226606A - 2 ; case 16 + .short _02266776 - _0226606A - 2 ; case 17 + .short _0226679E - _0226606A - 2 ; case 18 + .short _022667AE - _0226606A - 2 ; case 19 + .short _02266806 - _0226606A - 2 ; case 20 + .short _02266866 - _0226606A - 2 ; case 21 + .short _022668B8 - _0226606A - 2 ; case 22 + .short _02266902 - _0226606A - 2 ; case 23 + .short _02266914 - _0226606A - 2 ; case 24 + .short _02266926 - _0226606A - 2 ; case 25 + .short _0226693A - _0226606A - 2 ; case 26 + .short _0226695E - _0226606A - 2 ; case 27 + .short _02266988 - _0226606A - 2 ; case 28 +_022660A4: + add r0, r7, #0 + mov r1, #0x44 + bl ov70_02262E3C + add r0, r7, #0 + bl ov70_02262E8C + bl _022669AC +_022660B6: + ldr r0, [sp, #0x34] + bl ov66_0222E210 + cmp r0, #0 + beq _022660D0 + mov r0, #7 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + bl _022669AC +_022660D0: + ldr r0, [sp, #0x34] + bl ov66_0222E190 + cmp r0, #0 + beq _022660EA + mov r0, #2 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + bl _022669AC +_022660EA: + ldr r0, _022663C4 ; =0x000005DD + bl sub_02005748 + add r0, r7, #0 + bl ov70_02262E8C + bl _022669AC +_022660FA: + ldrb r1, [r6, #2] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E27C + mov r0, #3 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #0 + bl ov70_02266AF0 + bl _022669AC +_02266118: + add r0, r4, #0 + add r1, r5, #0 + mov r2, #3 + mov r3, #1 + bl ov70_02266B30 + add r4, #0x18 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r7, #0 + mov r1, #4 + bl ov70_02262E88 + bl _022669AC +_0226613E: + mov r0, #0 + str r0, [sp, #0x30] + add r0, r5, #0 + bl ov70_0225E0D4 + cmp r0, #2 + bhi _0226615A + cmp r0, #0 + beq _02266182 + cmp r0, #1 + beq _02266174 + cmp r0, #2 + beq _02266162 + b _0226618E +_0226615A: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + bne _0226618E +_02266162: + mov r0, #5 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + mov r0, #1 + str r0, [sp, #0x30] + b _0226618E +_02266174: + add r0, r7, #0 + mov r1, #5 + bl ov70_02262E88 + mov r0, #1 + str r0, [sp, #0x30] + b _0226618E +_02266182: + add r0, r7, #0 + mov r1, #6 + bl ov70_02262E88 + mov r0, #1 + str r0, [sp, #0x30] +_0226618E: + ldr r0, [sp, #0x30] + cmp r0, #1 + beq _02266198 + bl _022669AC +_02266198: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02266BA0 + b _022669AC +_022661AC: + ldrb r1, [r6, #2] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E27C + mov r0, #2 + str r0, [sp] + ldrb r3, [r6, #2] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + add r3, #0x22 + bl ov70_02266AF0 + b _022669AC +_022661CA: + ldr r0, [sp, #0x34] + bl ov66_0222E190 + cmp r0, #0 + beq _022661E2 + mov r0, #2 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + b _022669AC +_022661E2: + ldrb r0, [r6, #1] + bl ov66_02233184 + cmp r0, #1 + bne _02266226 + ldrb r0, [r6, #1] + bl ov66_022331E4 + cmp r0, #0 + beq _02266200 + ldrb r0, [r6, #1] + bl ov66_022331A4 + cmp r0, #0 + bne _0226620E +_02266200: + mov r0, #1 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + b _022669AC +_0226620E: + ldrb r0, [r6, #1] + bl ov66_022332F8 + cmp r0, #0 + bne _02266226 + mov r0, #7 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + b _022669AC +_02266226: + ldrb r0, [r6, #1] + bl ov66_022332F8 + strh r0, [r4] + mov r0, #0xe1 + lsl r0, r0, #2 + str r0, [r4, #0x10] + mov r1, #0 + ldrsh r2, [r4, r1] + ldr r0, _022663C8 ; =0x0000014A + cmp r2, r0 + ble _02266248 + add r0, r5, #0 + mov r2, #0xa + bl ov70_0225E20C + b _02266254 +_02266248: + mov r0, #1 + str r0, [r4, #0x14] + add r0, r5, #0 + mov r2, #0xb + bl ov70_0225E20C +_02266254: + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + ldrb r0, [r6, #1] + bl sub_0203883C + bl ov66_02233374 + cmp r0, #1 + bne _0226628A + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldrb r1, [r6, #2] + ldr r0, [sp, #0x34] + ldr r3, [sp, #0x10] + mov r2, #1 + bl ov66_0222EA10 + mov r0, #1 + strb r0, [r4, #7] +_0226628A: + mov r0, #0 + ldrsh r0, [r4, r0] + add r1, r5, #0 + mov r3, #1 + str r0, [sp] + ldrb r2, [r6, #2] + add r0, r4, #0 + add r0, #0x3c + bl ov70_02266C68 + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov70_02266CFC + add r0, r7, #0 + mov r1, #7 + bl ov70_02262E88 + b _022669AC +_022662B4: + bl sub_020388AC + str r0, [sp, #0x2c] + ldrb r0, [r6, #1] + bl ov66_02233224 + str r0, [sp, #0x28] + ldrb r0, [r6, #1] + bl ov66_022332F8 + strh r0, [r4] + mov r1, #0 + add r0, r4, #0 + ldrsh r1, [r4, r1] + add r0, #0x3c + bl ov70_02266CCC + mov r0, #0 + ldrsh r1, [r4, r0] + ldr r0, _022663C8 ; =0x0000014A + cmp r1, r0 + bgt _02266308 + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _02266308 + add r0, r5, #0 + bl ov70_0225DFCC + mov r0, #1 + str r0, [r4, #0x14] + add r0, r5, #0 + mov r1, #0 + mov r2, #0xb + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC +_02266308: + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + ldr r0, [sp, #0x2c] + cmp r0, #0 + bne _02266328 + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_02266328: + cmp r0, #2 + bne _0226637E + mov r0, #8 + strb r0, [r6] + ldr r0, [sp, #0x28] + cmp r0, #4 + bne _0226633A + mov r6, #0x10 + b _0226633C +_0226633A: + mov r6, #0x12 +_0226633C: + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r5, #0 + mov r1, #0 + add r2, r6, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + add r0, r7, #0 + mov r1, #9 + bl ov70_02262E88 + ldr r0, [sp, #0x28] + mov r1, #0 + strh r0, [r4, #8] + add r0, r4, #0 + add r0, #0x3c + bl ov70_02266CCC + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + b _022669AC +_0226637E: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _022663D4 + ldr r0, _022663CC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _022663D4 + ldr r0, _022663D0 ; =0x000005DC + bl sub_02005748 + bl ov66_02233374 + cmp r0, #0 + bne _022663B0 + mov r0, #6 + strb r0, [r6] + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_022663B0: + mov r0, #6 + strb r0, [r6] + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r7, #0 + mov r1, #0x10 + bl ov70_02262E88 + b _022669AC + ; .align 2, 0 +_022663C4: .word 0x000005DD +_022663C8: .word 0x0000014A +_022663CC: .word 0x021BF67C +_022663D0: .word 0x000005DC +_022663D4: + bl ov66_02233374 + cmp r0, #1 + bne _02266420 + ldrb r1, [r4, #7] + ldr r0, [sp, #0x28] + cmp r1, r0 + beq _02266400 + strb r0, [r4, #7] + cmp r0, #4 + beq _02266400 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldrb r1, [r6, #2] + ldr r0, [sp, #0x34] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x10] + bl ov66_0222EA10 +_02266400: + mov r0, #0 + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _02266420 + ldrb r0, [r6, #1] + bl ov66_02233224 + cmp r0, #1 + bhi _02266420 + mov r0, #3 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_02266420: + ldrb r0, [r6, #1] + bl ov66_02233184 + cmp r0, #1 + bne _02266442 + ldrb r0, [r6, #1] + bl ov66_022331A4 + cmp r0, #0 + bne _02266442 + mov r0, #0 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_02266442: + mov r0, #0 + ldrsh r0, [r4, r0] + cmp r0, #0 + bne _022664EA + add r0, r7, #0 + mov r1, #8 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r5, #0 + mov r1, #0 + mov r2, #0x12 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + b _022669AC +_02266472: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + bl sub_020388AC + add r5, r0, #0 + ldrb r0, [r6, #1] + bl ov66_02233224 + str r0, [sp, #0x24] + bl sub_020380E4 + cmp r0, #3 + beq _022664A2 + cmp r0, #4 + bne _022664AE +_022664A2: + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 +_022664AE: + cmp r5, #0 + bne _022664C0 + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_022664C0: + cmp r5, #2 + bne _022664D6 + mov r0, #8 + strb r0, [r6] + add r0, r7, #0 + mov r1, #9 + bl ov70_02262E88 + ldr r0, [sp, #0x24] + strh r0, [r4, #8] + b _022669AC +_022664D6: + ldrb r0, [r6, #1] + bl ov66_02233184 + cmp r0, #1 + bne _022664EA + ldrb r0, [r6, #1] + bl ov66_022331A4 + cmp r0, #0 + beq _022664EC +_022664EA: + b _022669AC +_022664EC: + mov r0, #0 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_022664FA: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + add r0, r5, #0 + bl ov70_0225DEE8 + ldrb r1, [r6, #3] + bl ov66_0222E3E4 + bl sub_02038B40 + add r0, r5, #0 + bl ov70_0225DEE8 + bl ov66_0222E0C4 + mov r1, #0 + bl sub_020329E0 + ldr r0, [sp, #0x34] + bl ov66_0222E918 + bl sub_020331F4 + mov r0, #0 + bl sub_0203632C + add r0, r4, #0 + add r1, r7, #0 + mov r2, #0xa + mov r3, #0x11 + bl ov70_02266B18 + b _022669AC +_0226654E: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + bl sub_02032AC0 + bl sub_0203608C + bl sub_02032E1C + add r0, r7, #0 + mov r1, #0xb + bl ov70_02262E88 + b _022669AC +_0226657A: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + bl sub_02032E44 + cmp r0, #0xff + beq _022665A4 +_02266598: + bl sub_02032E1C + bl sub_02032E44 + cmp r0, #0xff + bne _02266598 +_022665A4: + bl sub_02032E64 + add r5, r0, #0 + ldrb r0, [r6, #1] + bl ov66_02233224 + cmp r5, r0 + blo _022665DC + bl ov66_02233374 + cmp r0, #1 + bne _022665CA + ldrh r0, [r4, #2] + cmp r0, #0 + bne _022665CA + bl ov66_022330CC + mov r0, #1 + strh r0, [r4, #2] +_022665CA: + bl ov66_02233128 + cmp r0, #1 + bne _0226664E + add r0, r7, #0 + mov r1, #0xc + bl ov70_02262E88 + b _022669AC +_022665DC: + bl ov66_02233128 + cmp r0, #1 + bne _0226664E + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_022665F2: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + bl sub_020365F4 + ldr r0, [sp, #0x34] + bl ov66_0222E238 + add r0, r4, #0 + add r1, r7, #0 + mov r2, #0xd + mov r3, #0xe + bl ov70_02266B18 + b _022669AC +_02266620: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + ldr r0, [sp, #0x34] + bl ov66_0222E344 + str r0, [r4, #0xc] + bl sub_0203608C + add r4, #0xc + add r1, r4, #0 + bl sub_02036614 + cmp r0, #1 + beq _02266650 +_0226664E: + b _022669AC +_02266650: + add r0, r7, #0 + mov r1, #0xe + bl ov70_02262E88 + b _022669AC +_0226665A: + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CF0 + bl sub_02032E64 + str r0, [sp, #0x20] + bl sub_0203608C + mov r5, #0 + str r0, [sp, #0x1c] + str r5, [sp, #0x18] + bl ov66_02233340 + str r0, [sp, #0x14] + ldr r0, [sp, #0x20] + add r4, r5, #0 + cmp r0, #0 + ble _022666DC +_0226668E: + ldr r0, [sp, #0x1c] + cmp r0, r4 + beq _022666BE + add r0, r4, #0 + bl sub_0203664C + str r0, [sp, #0x38] + cmp r0, #0 + beq _022666D4 + ldr r1, [sp, #0x38] + ldr r0, [sp, #0x34] + ldr r1, [r1, #0] + add r2, r4, #0 + bl ov66_0222E24C + ldr r0, [sp, #0x38] + ldr r1, [r0, #0] + ldr r0, [sp, #0x14] + cmp r1, r0 + bne _022666BA + mov r0, #1 + str r0, [sp, #0x18] +_022666BA: + add r5, r5, #1 + b _022666D4 +_022666BE: + ldr r0, [sp, #0x34] + add r1, r4, #0 + bl ov66_0222E27C + bl ov66_02233374 + cmp r0, #1 + bne _022666D2 + mov r0, #1 + str r0, [sp, #0x18] +_022666D2: + add r5, r5, #1 +_022666D4: + ldr r0, [sp, #0x20] + add r4, r4, #1 + cmp r4, r0 + blt _0226668E +_022666DC: + ldr r0, [sp, #0x20] + cmp r5, r0 + bne _022667C0 + ldr r0, [sp, #0x18] + cmp r0, #1 + bne _022666F2 + add r0, r7, #0 + mov r1, #0xf + bl ov70_02262E88 + b _022669AC +_022666F2: + mov r0, #4 + strb r0, [r6] + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _022669AC +_02266700: + mov r0, #0 + mov r1, #1 + bl sub_020388F4 + bl ov66_02233374 + cmp r0, #1 + bne _0226673C + ldr r0, [sp, #0x34] + add r1, sp, #0x3c + bl ov66_0222E294 + ldrb r0, [r6, #1] + bl ov66_02233224 + add r3, sp, #0x3c + add r2, r0, #0 + ldrb r0, [r3, #1] + str r0, [sp] + ldrb r0, [r3, #2] + str r0, [sp, #4] + ldrb r0, [r3, #3] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + ldrb r1, [r6, #2] + ldrb r3, [r3] + ldr r0, [sp, #0x34] + bl ov66_0222EA10 +_0226673C: + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r4, #0 + add r1, r7, #0 + mov r2, #0x1c + mov r3, #0x12 + bl ov70_02266B18 + b _022669AC +_02266750: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x1a + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + add r0, r7, #0 + mov r1, #0x11 + bl ov70_02262E88 + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02266CB0 + b _022669AC +_02266776: + ldr r0, [sp, #0x10] + add r1, r5, #0 + str r0, [sp] + add r0, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov70_02266BAC + cmp r0, #0 + bne _022667C0 + add r0, r5, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _022667C0 + add r0, r7, #0 + mov r1, #0x12 + bl ov70_02262E88 + b _022669AC +_0226679E: + add r0, r5, #0 + bl ov70_0225E194 + add r0, r7, #0 + mov r1, #0x13 + bl ov70_02262E88 + b _022669AC +_022667AE: + add r0, r5, #0 + bl ov70_0225E1C4 + cmp r0, #0 + beq _022667C2 + cmp r0, #1 + beq _022667D8 + cmp r0, #2 + beq _022667E8 +_022667C0: + b _022669AC +_022667C2: + add r0, r5, #0 + bl ov70_0225E1F8 + add r0, r7, #0 + mov r1, #0x17 + bl ov70_02262E88 + ldr r0, [sp, #0x34] + bl ov66_0222E200 + b _022669AC +_022667D8: + add r0, r5, #0 + bl ov70_0225E1F8 + add r0, r7, #0 + mov r1, #0x14 + bl ov70_02262E88 + b _022669AC +_022667E8: + ldr r0, [sp, #0x10] + add r1, r5, #0 + str r0, [sp] + add r0, r4, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov70_02266BAC + cmp r0, #1 + beq _022667FE + b _022669AC +_022667FE: + add r0, r5, #0 + bl ov70_0225E1F8 + b _022669AC +_02266806: + ldrb r0, [r6, #1] + bl ov66_022332F8 + strh r0, [r4] + mov r0, #0 + ldrsh r0, [r4, r0] + add r1, r5, #0 + mov r3, #1 + str r0, [sp] + add r0, r4, #0 + ldrb r2, [r6, #2] + add r0, #0x3c + bl ov70_02266C68 + add r0, r4, #0 + add r0, #0x3c + add r1, r5, #0 + mov r2, #1 + bl ov70_02266CFC + mov r1, #0 + ldrsh r2, [r4, r1] + ldr r0, _022669B4 ; =0x0000014A + cmp r2, r0 + ble _02266842 + add r0, r5, #0 + mov r2, #0xa + bl ov70_0225E20C + b _0226684E +_02266842: + mov r0, #1 + str r0, [r4, #0x14] + add r0, r5, #0 + mov r2, #0xb + bl ov70_0225E20C +_0226684E: + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + add r0, r7, #0 + mov r1, #7 + bl ov70_02262E88 + b _022669AC +_02266866: + ldrb r0, [r6, #1] + bl ov66_02233224 + mov r1, #8 + strb r1, [r6] + cmp r0, #4 + bne _02266878 + mov r2, #0x10 + b _0226687A +_02266878: + mov r2, #0x12 +_0226687A: + add r0, r5, #0 + mov r1, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + add r0, r7, #0 + mov r1, #9 + bl ov70_02262E88 + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + ldrb r2, [r6, #2] + add r0, #0x3c + add r1, r5, #0 + mov r3, #1 + bl ov70_02266C68 + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov70_02266CFC + b _022669AC +_022668B8: + add r0, r5, #0 + mov r1, #0 + mov r2, #0x12 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF9C + add r0, r5, #0 + bl ov70_0225DFBC + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + ldrb r2, [r6, #2] + add r0, #0x3c + add r1, r5, #0 + mov r3, #1 + bl ov70_02266C68 + add r0, r4, #0 + add r0, #0x3c + mov r1, #0 + bl ov70_02266CCC + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov70_02266CF0 + add r0, r7, #0 + mov r1, #8 + bl ov70_02262E88 + b _022669AC +_02266902: + bl sub_02032A70 + bl sub_0203888C + add r0, r7, #0 + mov r1, #0x18 + bl ov70_02262E88 + b _022669AC +_02266914: + bl sub_020388AC + cmp r0, #0 + bne _022669AC + add r0, r7, #0 + mov r1, #0x1c + bl ov70_02262E88 + b _022669AC +_02266926: + add r0, r5, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _022669AC + ldrb r1, [r4, #4] + add r0, r7, #0 + bl ov70_02262E88 + b _022669AC +_0226693A: + mov r0, #5 + ldrsb r0, [r4, r0] + cmp r0, #0 + ble _02266946 + sub r0, r0, #1 + strb r0, [r4, #5] +_02266946: + mov r0, #5 + ldrsb r0, [r4, r0] + cmp r0, #0 + bne _022669AC + ldrb r0, [r4, #6] + bl sub_020364F0 + add r0, r7, #0 + mov r1, #0x1b + bl ov70_02262E88 + b _022669AC +_0226695E: + ldrh r0, [r4, #0xa] + add r0, r0, #1 + strh r0, [r4, #0xa] + ldrh r0, [r4, #0xa] + cmp r0, #0x96 + blo _02266974 + ldrb r0, [r4, #6] + bl sub_020364F0 + mov r0, #0 + strh r0, [r4, #0xa] +_02266974: + ldrb r0, [r4, #6] + bl sub_02036540 + cmp r0, #0 + beq _022669AC + ldrb r1, [r4, #4] + add r0, r7, #0 + bl ov70_02262E88 + b _022669AC +_02266988: + add r0, r5, #0 + bl ov70_0225DFEC + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02266BA0 + add r4, #0x3c + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02266CB0 + add r0, r7, #0 + bl ov70_02262E64 + add sp, #0x40 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022669AC: + mov r0, #0 + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_022669B4: .word 0x0000014A + thumb_func_end ov70_02265F38 + + thumb_func_start ov70_022669B8 +ov70_022669B8: ; 0x022669B8 + push {r4, lr} + add r4, r0, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _022669CA + cmp r0, #1 + beq _022669EC + b _022669F8 +_022669CA: + mov r0, #0 + add r1, r0, #0 + bl sub_020388F4 + bl sub_020382C0 + cmp r0, #0 + bne _022669E2 + bl sub_02032A70 + bl sub_0203888C +_022669E2: + add r0, r4, #0 + mov r1, #1 + bl ov70_02262E88 + b _022669F8 +_022669EC: + bl sub_020382C0 + cmp r0, #1 + bne _022669F8 + mov r0, #1 + pop {r4, pc} +_022669F8: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov70_022669B8 + + thumb_func_start ov70_022669FC +ov70_022669FC: ; 0x022669FC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r5, r1, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _02266A1A + cmp r0, #1 + beq _02266A90 + b _02266AE6 +_02266A1A: + add r0, r6, #0 + mov r1, #8 + bl ov70_02262E3C + str r0, [sp, #4] + add r0, r5, #0 + bl ov70_0225DF40 + cmp r0, #0x27 + beq _02266A38 + cmp r0, #0x28 + beq _02266A3E + cmp r0, #0x29 + beq _02266A44 + b _02266A4A +_02266A38: + mov r7, #0x2a + mov r4, #0 + b _02266A54 +_02266A3E: + mov r7, #0x29 + mov r4, #1 + b _02266A54 +_02266A44: + mov r7, #0x2b + mov r4, #2 + b _02266A54 +_02266A4A: + bl sub_02022974 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02266A54: + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_0225E27C + add r0, r5, #0 + mov r1, #1 + add r2, r7, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DFFC + mov r3, #0 + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r4, #0 + str r3, [sp] + bl ov70_02266C68 + ldr r0, [sp, #4] + add r1, r5, #0 + mov r2, #1 + bl ov70_02266CFC + add r0, r6, #0 + bl ov70_02262E8C + b _02266AE6 +_02266A90: + ldr r0, _02266AEC ; =0x021BF67C + mov r1, #1 + ldr r0, [r0, #0x48] + tst r1, r0 + bne _02266AAC + mov r1, #0x10 + tst r1, r0 + bne _02266AAC + mov r1, #0x20 + tst r1, r0 + bne _02266AAC + mov r1, #0x80 + tst r0, r1 + beq _02266ADC +_02266AAC: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02266CB0 + add r0, r5, #0 + bl ov70_0225DFEC + add r0, r5, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r6, #0 + bl ov70_02262E64 + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02266ADC: + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + bl ov70_02266CFC +_02266AE6: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02266AEC: .word 0x021BF67C + thumb_func_end ov70_022669FC + + thumb_func_start ov70_02266AF0 +ov70_02266AF0: ; 0x02266AF0 + push {r4, r5, r6, lr} + add r6, r2, #0 + add r5, r0, #0 + add r4, r1, #0 + add r0, r6, #0 + mov r1, #0 + add r2, r3, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r6, #0 + bl ov70_0225DF8C + ldr r0, [sp, #0x10] + mov r1, #0x19 + strb r0, [r5, #4] + add r0, r4, #0 + bl ov70_02262E88 + pop {r4, r5, r6, pc} + thumb_func_end ov70_02266AF0 + + thumb_func_start ov70_02266B18 +ov70_02266B18: ; 0x02266B18 + strb r2, [r0, #4] + strb r3, [r0, #6] + mov r2, #0 + strb r2, [r0, #5] + strh r2, [r0, #0xa] + add r0, r1, #0 + ldr r3, _02266B2C ; =ov70_02262E88 + mov r1, #0x1a + bx r3 + nop +_02266B2C: .word ov70_02262E88 + thumb_func_end ov70_02266B18 + + thumb_func_start ov70_02266B30 +ov70_02266B30: ; 0x02266B30 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r2, #0 + str r0, [sp] + add r0, r5, #0 + add r1, r6, #0 + add r7, r3, #0 + bl ov70_0225E00C + ldr r0, [sp] + mov r4, #0 + str r6, [r0, #0x38] + cmp r6, #0 + bls _02266B66 +_02266B4C: + add r0, r5, #0 + mov r1, #0 + add r2, r7, r4 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov70_0225E044 + add r4, r4, #1 + cmp r4, r6 + blo _02266B4C +_02266B66: + ldr r2, [sp] + ldr r3, _02266B9C ; =0x0226DC94 + add r2, #0x18 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp] + ldr r1, [r0, #0x38] + strh r1, [r0, #0x28] + ldr r1, [r0, #0x38] + ldrh r0, [r0, #0x2a] + cmp r0, r1 + bls _02266B8E + ldr r0, [sp] + strh r1, [r0, #0x2a] +_02266B8E: + add r0, r5, #0 + bl ov70_0225E054 + ldr r1, [sp] + str r0, [r1, #0x18] + pop {r3, r4, r5, r6, r7, pc} + nop +_02266B9C: .word 0x0226DC94 + thumb_func_end ov70_02266B30 + + thumb_func_start ov70_02266BA0 +ov70_02266BA0: ; 0x02266BA0 + ldr r3, _02266BA8 ; =ov70_0225E034 + add r0, r1, #0 + bx r3 + nop +_02266BA8: .word ov70_0225E034 + thumb_func_end ov70_02266BA0 + + thumb_func_start ov70_02266BAC +ov70_02266BAC: ; 0x02266BAC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r2, #0 + add r0, r1, #0 + add r6, r3, #0 + bl ov70_0225DEE8 + str r0, [sp, #0x10] + bl sub_020388AC + add r7, r0, #0 + ldrb r0, [r4, #1] + bl ov66_02233224 + add r2, r0, #0 + cmp r7, #0 + bne _02266BE2 + mov r0, #4 + strb r0, [r4] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02266BE2: + cmp r7, #2 + bne _02266BF6 + add r0, r6, #0 + mov r1, #0x15 + strh r2, [r5, #8] + bl ov70_02262E88 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02266BF6: + ldrb r0, [r5, #7] + cmp r0, r2 + beq _02266C16 + strb r2, [r5, #7] + cmp r2, #4 + beq _02266C16 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldrb r1, [r4, #2] + ldr r0, [sp, #0x10] + ldr r3, [sp, #0x28] + bl ov66_0222EA10 +_02266C16: + ldrb r0, [r4, #1] + bl ov66_022332F8 + strh r0, [r5] + mov r0, #0 + ldrsh r2, [r5, r0] + cmp r2, #0 + bne _02266C50 + ldrb r0, [r4, #1] + bl ov66_02233224 + cmp r0, #1 + bhi _02266C42 + mov r0, #3 + strb r0, [r4] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02266C42: + add r0, r6, #0 + mov r1, #0x16 + bl ov70_02262E88 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02266C50: + ldr r1, _02266C64 ; =0x0000014A + cmp r2, r1 + bgt _02266C60 + add r0, r6, #0 + mov r1, #0x14 + bl ov70_02262E88 + mov r0, #1 +_02266C60: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02266C64: .word 0x0000014A + thumb_func_end ov70_02266BAC + + thumb_func_start ov70_02266C68 +ov70_02266C68: ; 0x02266C68 + push {r3, r4, r5, r6, r7, lr} + add r4, r3, #0 + add r5, r0, #0 + add r7, r1, #0 + add r6, r2, #0 + cmp r4, #2 + blo _02266C7A + bl sub_02022974 +_02266C7A: + mov r0, #0 + strb r0, [r5] + strb r0, [r5, #1] + strb r0, [r5, #2] + strb r0, [r5, #3] + strb r0, [r5, #4] + strb r0, [r5, #5] + strb r0, [r5, #6] + strb r0, [r5, #7] + strb r4, [r5, #6] + ldr r1, [sp, #0x18] + add r0, r5, #0 + strb r6, [r5, #3] + bl ov70_02266CCC + ldr r0, _02266CAC ; =0x0226DC90 + mov r1, #0x12 + ldrb r0, [r0, r4] + mov r2, #3 + mov r3, #0xd + str r0, [sp] + add r0, r7, #0 + bl ov70_0225E104 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02266CAC: .word 0x0226DC90 + thumb_func_end ov70_02266C68 + + thumb_func_start ov70_02266CB0 +ov70_02266CB0: ; 0x02266CB0 + mov r2, #0 + strb r2, [r0] + strb r2, [r0, #1] + strb r2, [r0, #2] + strb r2, [r0, #3] + strb r2, [r0, #4] + strb r2, [r0, #5] + strb r2, [r0, #6] + strb r2, [r0, #7] + ldr r3, _02266CC8 ; =ov70_0225E12C + add r0, r1, #0 + bx r3 + ; .align 2, 0 +_02266CC8: .word ov70_0225E12C + thumb_func_end ov70_02266CB0 + + thumb_func_start ov70_02266CCC +ov70_02266CCC: ; 0x02266CCC + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + mov r1, #0x1e + bl sub_020E1F6C + lsl r0, r0, #0x10 + asr r1, r0, #0x10 + mov r0, #4 + ldrsh r0, [r4, r0] + cmp r1, r0 + beq _02266CEE + strh r1, [r4, #4] + ldrb r1, [r4, #7] + mov r0, #8 + orr r0, r1 + strb r0, [r4, #7] +_02266CEE: + pop {r4, pc} + thumb_func_end ov70_02266CCC + + thumb_func_start ov70_02266CF0 +ov70_02266CF0: ; 0x02266CF0 + push {r3, lr} + mov r3, #0 + bl ov70_02266D08 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02266CF0 + + thumb_func_start ov70_02266CFC +ov70_02266CFC: ; 0x02266CFC + push {r3, lr} + mov r3, #1 + bl ov70_02266D08 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02266CFC + + thumb_func_start ov70_02266D08 +ov70_02266D08: ; 0x02266D08 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + str r3, [sp, #4] + cmp r2, #0 + beq _02266D1A + mov r0, #0xff + strb r0, [r5, #7] +_02266D1A: + ldrb r0, [r5, #3] + cmp r0, #0 + beq _02266D2A + cmp r0, #1 + beq _02266D2E + cmp r0, #2 + beq _02266D32 + b _02266D36 +_02266D2A: + mov r6, #0 + b _02266D3C +_02266D2E: + mov r6, #1 + b _02266D3C +_02266D32: + mov r6, #2 + b _02266D3C +_02266D36: + bl sub_02022974 + mov r6, #2 +_02266D3C: + add r0, r6, #0 + bl ov66_02233184 + add r7, r0, #0 + ldrb r0, [r5] + cmp r0, r7 + beq _02266D52 + ldrb r1, [r5, #7] + mov r0, #4 + orr r0, r1 + strb r0, [r5, #7] +_02266D52: + strb r7, [r5] + add r0, r6, #0 + bl ov66_022331A4 + ldrb r1, [r5, #2] + cmp r1, r0 + beq _02266D68 + ldrb r2, [r5, #7] + mov r1, #4 + orr r1, r2 + strb r1, [r5, #7] +_02266D68: + strb r0, [r5, #2] + cmp r7, #1 + bne _02266D76 + add r0, r6, #0 + bl ov66_022331E4 + b _02266D78 +_02266D76: + mov r0, #4 +_02266D78: + ldrb r1, [r5, #1] + cmp r1, r0 + beq _02266D86 + ldrb r2, [r5, #7] + mov r1, #2 + orr r1, r2 + strb r1, [r5, #7] +_02266D86: + strb r0, [r5, #1] + ldrb r1, [r5, #7] + mov r0, #1 + tst r0, r1 + beq _02266DC0 + mov r0, #0x10 + mov r1, #0 + str r0, [sp] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0x68 + bl ov70_0225E14C + ldrb r1, [r5, #3] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x36 + bl ov70_0225E20C + mov r2, #0 + add r1, r0, #0 + add r0, r4, #0 + add r3, r2, #0 + bl ov70_0225E13C +_02266DC0: + ldrb r1, [r5, #7] + mov r0, #4 + tst r0, r1 + beq _02266DFE + mov r2, #0x10 + add r0, r4, #0 + mov r1, #0x24 + mov r3, #0x68 + str r2, [sp] + bl ov70_0225E14C + ldr r0, [sp, #4] + cmp r0, #1 + bne _02266DFE + ldrb r0, [r5, #2] + cmp r0, #0 + bne _02266DFE + ldrb r0, [r5] + cmp r0, #1 + bne _02266DFE + add r0, r4, #0 + mov r1, #1 + mov r2, #0x45 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0x24 + mov r3, #0x10 + bl ov70_0225E13C +_02266DFE: + ldrb r1, [r5, #7] + mov r0, #2 + tst r0, r1 + beq _02266E4E + mov r2, #0x20 + add r0, r4, #0 + mov r1, #0 + mov r3, #0x68 + str r2, [sp] + bl ov70_0225E14C + mov r0, #2 + str r0, [sp] + mov r2, #1 + ldrb r1, [r5, #1] + add r0, r4, #0 + add r3, r2, #0 + bl ov70_0225E21C + mov r0, #2 + str r0, [sp] + ldrb r2, [r5, #1] + mov r1, #4 + add r0, r4, #0 + sub r1, r1, r2 + mov r2, #1 + mov r3, #0 + bl ov70_0225E21C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x44 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x20 + bl ov70_0225E13C +_02266E4E: + ldrb r0, [r5, #6] + cmp r0, #1 + bne _02266E92 + ldrb r1, [r5, #7] + mov r0, #8 + tst r0, r1 + beq _02266E92 + mov r0, #0x10 + str r0, [sp] + add r0, r4, #0 + mov r1, #0 + mov r2, #0x40 + mov r3, #0x68 + bl ov70_0225E14C + mov r2, #2 + str r2, [sp] + mov r1, #4 + ldrsh r1, [r5, r1] + add r0, r4, #0 + mov r3, #0 + bl ov70_0225E21C + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0 + mov r3, #0x40 + bl ov70_0225E13C +_02266E92: + mov r0, #0 + strb r0, [r5, #7] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02266D08 + + .rodata + + + .global Unk_ov70_0226DC90 +Unk_ov70_0226DC90: ; 0x0226DC90 + .incbin "incbin/overlay70_rodata.bin", 0x7C4, 0x7C8 - 0x7C4 + + .global Unk_ov70_0226DC94 +Unk_ov70_0226DC94: ; 0x0226DC94 + .incbin "incbin/overlay70_rodata.bin", 0x7C8, 0x20 + diff --git a/asm/ov70_02266E9C.s b/asm/ov70_02266E9C.s new file mode 100644 index 000000000..f0a356853 --- /dev/null +++ b/asm/ov70_02266E9C.s @@ -0,0 +1,4229 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02266E9C +ov70_02266E9C: ; 0x02266E9C + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + str r2, [sp, #0xc] + bl ov70_0225DEE8 + add r7, r0, #0 + add r0, r5, #0 + bl ov70_0225DF10 + str r0, [sp, #0x24] + add r0, r6, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r7, #0 + bl ov66_0222EE30 + str r0, [sp, #0x20] + add r0, r7, #0 + bl ov66_0222EE3C + str r0, [sp, #0x1c] + add r0, r7, #0 + bl ov66_0222EE68 + cmp r0, #0 + beq _02266EF4 + cmp r4, #0 + beq _02266EF4 + ldrh r0, [r4, #0xa] + cmp r0, #0 + beq _02266EF4 + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + mov r0, #0 + strh r0, [r4, #0xa] +_02266EF4: + cmp r4, #0 + beq _02266F16 + add r0, r7, #0 + bl ov66_0222E3BC + str r0, [sp, #0x18] + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02266F12 + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222E374 + str r0, [sp, #0x14] + b _02266F16 +_02266F12: + mov r0, #0 + str r0, [sp, #0x14] +_02266F16: + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _02266F3E + ldrh r0, [r4, #0xa] + cmp r0, #0 + beq _02266F3E + ldr r0, [sp, #0x14] + cmp r0, #0 + bne _02266F3E + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + mov r0, #0 + strh r0, [r4, #0xa] +_02266F3E: + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0x26 + bls _02266F4C + bl _02267A2E +_02266F4C: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02266F58: ; jump table + .short _02266FA6 - _02266F58 - 2 ; case 0 + .short _0226706C - _02266F58 - 2 ; case 1 + .short _02267090 - _02266F58 - 2 ; case 2 + .short _022670D8 - _02266F58 - 2 ; case 3 + .short _02267116 - _02266F58 - 2 ; case 4 + .short _02267146 - _02266F58 - 2 ; case 5 + .short _022671B8 - _02266F58 - 2 ; case 6 + .short _022671E6 - _02266F58 - 2 ; case 7 + .short _02267216 - _02266F58 - 2 ; case 8 + .short _0226724E - _02266F58 - 2 ; case 9 + .short _0226727C - _02266F58 - 2 ; case 10 + .short _022672AA - _02266F58 - 2 ; case 11 + .short _022672DA - _02266F58 - 2 ; case 12 + .short _02267356 - _02266F58 - 2 ; case 13 + .short _02267414 - _02266F58 - 2 ; case 14 + .short _02267444 - _02266F58 - 2 ; case 15 + .short _022674C4 - _02266F58 - 2 ; case 16 + .short _02267510 - _02266F58 - 2 ; case 17 + .short _02267520 - _02266F58 - 2 ; case 18 + .short _0226758E - _02266F58 - 2 ; case 19 + .short _022675A0 - _02266F58 - 2 ; case 20 + .short _022675E0 - _02266F58 - 2 ; case 21 + .short _02267622 - _02266F58 - 2 ; case 22 + .short _02267654 - _02266F58 - 2 ; case 23 + .short _02267682 - _02266F58 - 2 ; case 24 + .short _022676DA - _02266F58 - 2 ; case 25 + .short _02267720 - _02266F58 - 2 ; case 26 + .short _02267768 - _02266F58 - 2 ; case 27 + .short _022677AE - _02266F58 - 2 ; case 28 + .short _0226780C - _02266F58 - 2 ; case 29 + .short _02267874 - _02266F58 - 2 ; case 30 + .short _022678A2 - _02266F58 - 2 ; case 31 + .short _022678D0 - _02266F58 - 2 ; case 32 + .short _02267912 - _02266F58 - 2 ; case 33 + .short _02267944 - _02266F58 - 2 ; case 34 + .short _0226796C - _02266F58 - 2 ; case 35 + .short _022679A0 - _02266F58 - 2 ; case 36 + .short _022679AA - _02266F58 - 2 ; case 37 + .short _022679B6 - _02266F58 - 2 ; case 38 +_02266FA6: + add r0, r6, #0 + mov r1, #0x50 + bl ov70_02262E3C + add r4, r0, #0 + mov r1, #0 + add r0, #0x44 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x46 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x38 + str r1, [r4, #0x48] + bl ov70_02269114 + add r0, r5, #0 + bl ov70_0225DEF0 + str r0, [sp, #0x28] + bl ov70_0225CCAC + str r0, [sp, #0x2c] + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x2c] + bl ov70_0225CE40 + str r0, [sp, #0x30] + cmp r0, #0 + bne _02266FF2 + mov r0, #0 + strh r0, [r4, #0xa] + add r0, r6, #0 + mov r1, #0x26 + bl ov70_02262E88 + bl _02267A2E +_02266FF2: + mov r1, #4 + bl ov70_0225CD60 + str r0, [sp, #0x34] + ldr r0, [sp, #0x2c] + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + str r0, [sp, #0x38] + add r0, r7, #0 + bl ov66_0222EC60 + ldr r2, [sp, #0x34] + add r0, r4, #0 + add r1, r7, #0 + bl ov70_02268B50 + str r0, [sp, #0x3c] + ldr r0, [sp, #0x30] + mov r1, #0 + str r0, [r4, #0x10] + bl ov70_0225D030 + ldr r0, [sp, #0x30] + ldr r1, [sp, #0x38] + bl ov70_0225D060 + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x34] + mov r2, #0 + bl ov70_02262EEC + ldr r0, _02267390 ; =0x000005E4 + bl sub_02005748 + add r0, r7, #0 + mov r1, #9 + bl ov66_0222E3E4 + ldr r0, [sp, #0x3c] + cmp r0, #1 + bne _02267060 + ldr r1, [sp, #0x34] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E328 + add r0, r6, #0 + mov r1, #1 + bl ov70_02262E88 + bl _02267A2E +_02267060: + add r0, r6, #0 + mov r1, #0x22 + bl ov70_02262E88 + bl _02267A2E +_0226706C: + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222EC70 + cmp r0, #1 + bne _02267084 + add r0, r6, #0 + mov r1, #2 + bl ov70_02262E88 + bl _02267A2E +_02267084: + add r0, r6, #0 + mov r1, #0x22 + bl ov70_02262E88 + bl _02267A2E +_02267090: + ldr r0, [sp, #0x20] + cmp r0, #4 + bhi _022670CC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022670A2: ; jump table + .short _022670C0 - _022670A2 - 2 ; case 0 + .short _02267A2E - _022670A2 - 2 ; case 1 + .short _022670AC - _022670A2 - 2 ; case 2 + .short _022670CC - _022670A2 - 2 ; case 3 + .short _022670CC - _022670A2 - 2 ; case 4 +_022670AC: + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222EEE4 + add r0, r6, #0 + mov r1, #3 + bl ov70_02262E88 + bl _02267A2E +_022670C0: + add r0, r6, #0 + mov r1, #0x22 + bl ov70_02262E88 + bl _02267A2E +_022670CC: + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + bl _02267A2E +_022670D8: + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222EEF4 + add r0, r7, #0 + bl ov66_0222F020 + add r0, r7, #0 + mov r1, #7 + bl ov66_0222F040 + ldr r0, [sp, #0x18] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #0x14] + add r2, r5, #0 + str r0, [sp, #4] + ldrb r3, [r4, #4] + add r0, r4, #0 + bl ov70_02268BF4 + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #4 + add r3, r6, #0 + bl ov70_02268BA4 + bl _02267A2E +_02267116: + ldr r0, [sp, #0x14] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #0x18] + add r2, r5, #0 + str r0, [sp, #4] + ldrb r3, [r4, #5] + add r0, r4, #0 + bl ov70_02268BF4 + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #5 + add r3, r6, #0 + bl ov70_02268BA4 + add r0, r7, #0 + mov r1, #0 + bl ov66_0222ECD4 + bl _02267A2E +_02267146: + ldr r0, [sp, #0x20] + cmp r0, #4 + bhi _022671A6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267158: ; jump table + .short _022671A6 - _02267158 - 2 ; case 0 + .short _022671A6 - _02267158 - 2 ; case 1 + .short _02267162 - _02267158 - 2 ; case 2 + .short _0226718A - _02267158 - 2 ; case 3 + .short _022671A6 - _02267158 - 2 ; case 4 +_02267162: + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r7, #0 + bl ov66_0222EE24 + cmp r0, #0 + beq _0226717E + add r0, r6, #0 + mov r1, #6 + bl ov70_02262E88 + bl _02267A2E +_0226717E: + add r0, r6, #0 + mov r1, #8 + bl ov70_02262E88 + bl _02267A2E +_0226718A: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + bne _0226719A + add r0, r5, #0 + bl ov70_0225DFBC +_0226719A: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268D70 + bl _02267A2E +_022671A6: + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + bl _02267A2E +_022671B8: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02268CC8 + cmp r0, #1 + bne _022671DA + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #7 + add r3, r6, #0 + bl ov70_02268BA4 + bl _02267A2E +_022671DA: + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + bl _02267A2E +_022671E6: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x28 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #9 + add r3, r6, #0 + bl ov70_02268BA4 + bl _02267A2E +_02267216: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrh r1, [r4, #8] + add r0, r5, #0 + mov r2, #1 + bl ov70_0225E234 + ldrb r1, [r4, #3] + ldrh r2, [r4, #8] + add r0, r5, #0 + bl ov70_02268AF8 + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #9 + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_0226724E: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2e + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xb + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_0226727C: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x36 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xb + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_022672AA: + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + ldr r3, _02267394 ; =0x00000203 + add r0, #0x14 + add r1, r5, #0 + mov r2, #3 + bl ov70_02268E44 + add r1, r4, #0 + mov r2, #0 + add r0, r5, #0 + add r1, #0x14 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r4, #0 + bl ov70_02268DB8 + add r0, r6, #0 + mov r1, #0xc + bl ov70_02262E88 + b _02267A2E +_022672DA: + add r0, r5, #0 + bl ov70_0225E0D4 + cmp r0, #0 + beq _022672EE + cmp r0, #1 + beq _022672FA + cmp r0, #2 + beq _02267318 + b _0226732A +_022672EE: + add r0, r6, #0 + mov r1, #0xd + bl ov70_02262E88 + mov r0, #1 + b _02267334 +_022672FA: + add r0, r6, #0 + mov r1, #0x13 + bl ov70_02262E88 + ldr r0, [r4, #0x10] + mov r1, #4 + bl ov70_0225CD60 + add r2, r0, #0 + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov66_0222E990 + mov r0, #1 + b _02267334 +_02267318: + add r0, r7, #0 + bl ov66_0222ED7C + add r0, r6, #0 + mov r1, #0x21 + bl ov70_02262E88 + mov r0, #1 + b _02267334 +_0226732A: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268DCC + mov r0, #0 +_02267334: + cmp r0, #1 + beq _0226733A + b _02267A2E +_0226733A: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + add r0, r4, #0 + bl ov70_02268DC4 + b _02267A2E +_02267356: + ldr r0, [sp, #0x18] + bl ov66_0222E8C4 + str r0, [sp, #0x40] + ldr r0, [sp, #0x14] + bl ov66_0222E8C4 + ldr r1, [sp, #0x40] + cmp r1, r0 + bne _022673C4 + mov r0, #1 + strb r0, [r4, #0xc] + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #1 + bl ov70_02268D38 + ldrb r1, [r4, #3] + ldr r2, _02267398 ; =0x000001FB + b _0226739C + nop +_02267390: .word 0x000005E4 +_02267394: .word 0x00000203 +_02267398: .word 0x000001FB +_0226739C: + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x12 + add r3, r6, #0 + bl ov70_02268BA4 + add r0, r7, #0 + mov r1, #4 + bl ov66_0222ECD4 + b _02267A2E +_022673C4: + mov r2, #0 + strb r2, [r4, #0xc] + ldrb r1, [r4, #3] + add r0, r5, #0 + bl ov70_0225E234 + mov r3, #1 + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + str r3, [sp] + bl ov70_02268D38 + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #2 + bl ov70_02268D38 + mov r2, #0x7f + ldrb r1, [r4, #3] + add r0, r5, #0 + lsl r2, r2, #2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xe + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_02267414: + mov r0, #1 + str r0, [sp] + add r0, r4, #0 + ldr r3, _02267750 ; =0x00000206 + add r0, #0x14 + add r1, r5, #0 + mov r2, #2 + bl ov70_02268E44 + add r1, r4, #0 + mov r2, #0 + add r0, r5, #0 + add r1, #0x14 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r4, #0 + bl ov70_02268DB8 + add r0, r6, #0 + mov r1, #0xf + bl ov70_02262E88 + b _02267A2E +_02267444: + add r0, r5, #0 + bl ov70_0225E0D4 + cmp r0, #0 + beq _02267454 + cmp r0, #1 + beq _0226748C + b _02267498 +_02267454: + add r0, r7, #0 + mov r1, #3 + bl ov66_0222ECD4 + add r0, r6, #0 + mov r1, #0x10 + bl ov70_02262E88 + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222EF44 + ldr r0, [r4, #0x10] + mov r1, #4 + bl ov70_0225CD60 + add r6, r0, #0 + ldr r0, [sp, #0x14] + bl ov66_0222E8C4 + add r3, r0, #0 + ldr r1, [sp, #0xc] + add r0, r7, #0 + add r2, r6, #0 + bl ov66_0222E9CC + mov r0, #1 + b _022674A2 +_0226748C: + add r0, r6, #0 + mov r1, #0xa + bl ov70_02262E88 + mov r0, #1 + b _022674A2 +_02267498: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268DCC + mov r0, #0 +_022674A2: + cmp r0, #1 + beq _022674A8 + b _02267A2E +_022674A8: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + add r0, r4, #0 + bl ov70_02268DC4 + b _02267A2E +_022674C4: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + mov r3, #1 + bl ov70_02268D38 + ldrb r1, [r4, #3] + ldr r2, _02267754 ; =0x000001FE + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x11 + add r3, r6, #0 + bl ov70_02268BA4 + ldr r0, [sp, #0x14] + bl ov66_0222E8C4 + add r1, r0, #0 + add r0, r7, #0 + bl ov66_0222E528 + b _02267A2E +_02267510: + ldr r0, _02267758 ; =0x000005A8 + bl sub_02005748 + add r0, r6, #0 + mov r1, #0x12 + bl ov70_02262E88 + b _02267A2E +_02267520: + ldr r0, [sp, #0x20] + cmp r0, #4 + bhi _0226757E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267532: ; jump table + .short _0226757E - _02267532 - 2 ; case 0 + .short _0226757E - _02267532 - 2 ; case 1 + .short _0226753C - _02267532 - 2 ; case 2 + .short _02267564 - _02267532 - 2 ; case 3 + .short _0226757E - _02267532 - 2 ; case 4 +_0226753C: + ldr r1, [sp, #0x14] + add r0, r4, #0 + bl ov70_02268E20 + ldrb r0, [r4, #0xc] + cmp r0, #1 + bne _02267554 + add r0, r6, #0 + mov r1, #0x21 + bl ov70_02262E88 + b _0226755C +_02267554: + add r0, r6, #0 + mov r1, #0xa + bl ov70_02262E88 +_0226755C: + add r0, r5, #0 + bl ov70_0225DFCC + b _02267A2E +_02267564: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + bne _02267574 + add r0, r5, #0 + bl ov70_0225DFBC +_02267574: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268D70 + b _02267A2E +_0226757E: + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02267A2E +_0226758E: + add r0, r7, #0 + mov r1, #5 + bl ov66_0222ECD4 + add r0, r6, #0 + mov r1, #0x14 + bl ov70_02262E88 + b _02267A2E +_022675A0: + ldr r0, _0226775C ; =0x00000207 + add r1, r5, #0 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x14 + mov r2, #0x1e + mov r3, #4 + bl ov70_02268EEC + mov r0, #8 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x17 + add r1, r4, #0 + mov r2, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r1, #0x14 + add r3, r2, #0 + bl ov70_0225E0A4 + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + add r0, r4, #0 + bl ov70_02268DB8 + b _02267A2E +_022675E0: + add r0, r5, #0 + bl ov70_0225E0D4 + mov r1, #1 + mvn r1, r1 + str r0, [sp, #0x44] + cmp r0, r1 + beq _022675F6 + add r1, r1, #1 + cmp r0, r1 + bne _02267600 +_022675F6: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268DCC + b _02267A2E +_02267600: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + ldr r0, [sp, #0x44] + mov r1, #0x16 + strb r0, [r4] + add r0, r6, #0 + bl ov70_02262E88 + b _02267A2E +_02267622: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r3, [r4] + ldr r2, _02267760 ; =0x000001DD + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, r3, r2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x17 + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_02267654: + mov r0, #0 + str r0, [sp] + ldrb r3, [r4] + add r0, r4, #0 + add r0, #0x14 + lsl r3, r3, #2 + add r1, r5, #0 + mov r2, #4 + add r3, #0x73 + bl ov70_02268E44 + add r1, r4, #0 + mov r2, #0 + add r0, r5, #0 + add r1, #0x14 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r6, #0 + mov r1, #0x18 + bl ov70_02262E88 + b _02267A2E +_02267682: + add r0, r5, #0 + bl ov70_0225E0D4 + str r0, [sp, #0x48] + cmp r0, #3 + bhi _022676D0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226769A: ; jump table + .short _022676A2 - _0226769A - 2 ; case 0 + .short _022676A2 - _0226769A - 2 ; case 1 + .short _022676A2 - _0226769A - 2 ; case 2 + .short _022676A2 - _0226769A - 2 ; case 3 +_022676A2: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + add r0, r4, #0 + bl ov70_02268DC4 + ldrb r0, [r4] + lsl r1, r0, #2 + ldr r0, [sp, #0x48] + add r0, r0, r1 + strb r0, [r4, #1] + add r0, r6, #0 + mov r1, #0x19 + bl ov70_02262E88 + b _02267A2E +_022676D0: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268DCC + b _02267A2E +_022676DA: + ldrb r2, [r4, #1] + add r0, r4, #0 + add r0, #0x38 + add r2, r2, #6 + lsl r2, r2, #0x10 + add r1, r7, #0 + lsr r2, r2, #0x10 + mov r3, #2 + bl ov70_0226911C + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r3, [r4, #1] + ldr r2, _02267764 ; =0x00000165 + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, r3, r2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1a + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_02267720: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r2, [r4] + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, #0x55 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1b + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E + ; .align 2, 0 +_02267750: .word 0x00000206 +_02267754: .word 0x000001FE +_02267758: .word 0x000005A8 +_0226775C: .word 0x00000207 +_02267760: .word 0x000001DD +_02267764: .word 0x00000165 +_02267768: + add r0, r4, #0 + add r0, #0x38 + bl ov70_02269178 + cmp r0, #1 + bne _0226779A + add r0, r4, #0 + add r0, #0x38 + bl ov70_02269188 + cmp r0, #2 + bne _0226778A + add r0, r6, #0 + mov r1, #0x1c + bl ov70_02262E88 + b _02267A2E +_0226778A: + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02267A2E +_0226779A: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + beq _022677A6 + b _02267A2E +_022677A6: + add r0, r5, #0 + bl ov70_0225DFBC + b _02267A2E +_022677AE: + ldr r0, [sp, #0x20] + cmp r0, #4 + bhi _022677FC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022677C0: ; jump table + .short _022677FC - _022677C0 - 2 ; case 0 + .short _022677FC - _022677C0 - 2 ; case 1 + .short _022677CA - _022677C0 - 2 ; case 2 + .short _022677E2 - _022677C0 - 2 ; case 3 + .short _022677FC - _022677C0 - 2 ; case 4 +_022677CA: + ldr r1, [sp, #0x14] + add r0, r4, #0 + bl ov70_02268E20 + add r0, r6, #0 + mov r1, #0x1d + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02267A2E +_022677E2: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + bne _022677F2 + add r0, r5, #0 + bl ov70_0225DFBC +_022677F2: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268D70 + b _02267A2E +_022677FC: + add r0, r6, #0 + mov r1, #0x20 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02267A2E +_0226780C: + ldr r0, [sp, #0x1c] + sub r0, r0, #6 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x1c] + cmp r0, #0x7e + bhs _02267820 + cmp r0, #6 + bhs _0226782A +_02267820: + add r0, r6, #0 + mov r1, #0x23 + bl ov70_02262E88 + b _02267A2E +_0226782A: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldr r2, [sp, #0x10] + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, #0xec + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + ldrb r1, [r4, #1] + ldr r0, [sp, #0x10] + cmp r0, r1 + bne _02267862 + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1e + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_02267862: + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1f + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_02267874: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x33 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xa + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_022678A2: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x32 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x25 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xa + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_022678D0: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2d + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0 + strh r0, [r4, #0xa] + mov r0, #0x24 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x26 + add r3, r6, #0 + bl ov70_02268BA4 + add r0, r7, #0 + bl ov66_0222EDC0 + b _02267A2E +_02267912: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2b + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0 + strh r0, [r4, #0xa] + mov r0, #0x24 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x26 + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_02267944: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2a + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0 + strh r0, [r4, #0xa] + mov r0, #0x24 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x26 + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_0226796C: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r2, #0x59 + ldrb r1, [r4, #3] + add r0, r5, #0 + lsl r2, r2, #2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0 + strh r0, [r4, #0xa] + mov r0, #0x24 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x26 + add r3, r6, #0 + bl ov70_02268BA4 + b _02267A2E +_022679A0: + add r0, r4, #0 + add r1, r6, #0 + bl ov70_02268BBC + b _02267A2E +_022679AA: + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov70_02268BD8 + b _02267A2E +_022679B6: + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + cmp r0, #1 + bne _022679CE + add r1, r4, #0 + add r1, #0x46 + ldrh r1, [r1] + ldr r2, [r4, #0x48] + add r0, r7, #0 + bl ov66_0222E500 +_022679CE: + add r0, r7, #0 + bl ov66_0222EC60 + add r0, r5, #0 + bl ov70_0225DFEC + add r0, r7, #0 + mov r1, #1 + bl ov66_0222E3E4 + add r0, r5, #0 + bl ov70_0225DEF0 + add r7, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r7, #0 + mov r2, #1 + bl ov70_0225CDEC + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02267A1C + mov r1, #1 + bl ov70_0225D030 + ldr r0, [r4, #0x10] + mov r1, #4 + bl ov70_0225CD60 + add r1, r0, #0 + ldr r0, [sp, #0x24] + mov r2, #1 + bl ov70_02262EEC + add r0, r5, #0 + bl ov70_0225E3D0 +_02267A1C: + add r0, r4, #0 + bl ov70_02268BA0 + add r0, r6, #0 + bl ov70_02262E64 + add sp, #0x4c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02267A2E: + add r0, r4, #0 + bl ov70_02268E08 + add r4, #0x38 + add r0, r4, #0 + add r1, r7, #0 + bl ov70_02269144 + mov r0, #0 + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_02266E9C + + thumb_func_start ov70_02267A44 +ov70_02267A44: ; 0x02267A44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + bl ov70_0225DEE8 + add r7, r0, #0 + add r0, r6, #0 + bl ov70_02262E80 + add r4, r0, #0 + add r0, r7, #0 + bl ov66_0222EE30 + str r0, [sp, #0x14] + add r0, r7, #0 + bl ov66_0222EE3C + str r0, [sp, #0x10] + add r0, r7, #0 + bl ov66_0222EE68 + cmp r0, #0 + beq _02267A92 + cmp r4, #0 + beq _02267A92 + ldrh r0, [r4, #0xa] + cmp r0, #1 + bne _02267A92 + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + mov r0, #0 + strh r0, [r4, #0xa] +_02267A92: + cmp r4, #0 + beq _02267AA8 + add r0, r7, #0 + bl ov66_0222E3BC + str r0, [sp, #0xc] + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222E374 + str r0, [sp, #8] +_02267AA8: + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _02267AD0 + ldrh r0, [r4, #0xa] + cmp r0, #1 + bne _02267AD0 + ldr r0, [sp, #8] + cmp r0, #0 + bne _02267AD0 + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + mov r0, #0 + strh r0, [r4, #0xa] +_02267AD0: + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0x1f + bhi _02267B96 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267AE6: ; jump table + .short _02267B26 - _02267AE6 - 2 ; case 0 + .short _02267B8C - _02267AE6 - 2 ; case 1 + .short _02267BBE - _02267AE6 - 2 ; case 2 + .short _02267BFA - _02267AE6 - 2 ; case 3 + .short _02267C6C - _02267AE6 - 2 ; case 4 + .short _02267C96 - _02267AE6 - 2 ; case 5 + .short _02267CC4 - _02267AE6 - 2 ; case 6 + .short _02267CFC - _02267AE6 - 2 ; case 7 + .short _02267D2A - _02267AE6 - 2 ; case 8 + .short _02267D58 - _02267AE6 - 2 ; case 9 + .short _02267E1E - _02267AE6 - 2 ; case 10 + .short _02267E5A - _02267AE6 - 2 ; case 11 + .short _02267EA0 - _02267AE6 - 2 ; case 12 + .short _02267EDC - _02267AE6 - 2 ; case 13 + .short _02267F2A - _02267AE6 - 2 ; case 14 + .short _02267F6E - _02267AE6 - 2 ; case 15 + .short _02267F9C - _02267AE6 - 2 ; case 16 + .short _02267FFC - _02267AE6 - 2 ; case 17 + .short _0226804A - _02267AE6 - 2 ; case 18 + .short _0226807A - _02267AE6 - 2 ; case 19 + .short _022680AA - _02267AE6 - 2 ; case 20 + .short _022680DC - _02267AE6 - 2 ; case 21 + .short _02268110 - _02267AE6 - 2 ; case 22 + .short _0226819E - _02267AE6 - 2 ; case 23 + .short _022681EA - _02267AE6 - 2 ; case 24 + .short _02268234 - _02267AE6 - 2 ; case 25 + .short _02268262 - _02267AE6 - 2 ; case 26 + .short _022682A4 - _02267AE6 - 2 ; case 27 + .short _022682D6 - _02267AE6 - 2 ; case 28 + .short _02268304 - _02267AE6 - 2 ; case 29 + .short _0226830E - _02267AE6 - 2 ; case 30 + .short _0226831A - _02267AE6 - 2 ; case 31 +_02267B26: + add r0, r6, #0 + mov r1, #0x50 + bl ov70_02262E3C + add r4, r0, #0 + mov r1, #0 + add r0, #0x44 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x46 + strh r1, [r0] + add r0, r7, #0 + str r1, [r4, #0x48] + bl ov66_0222EE1C + str r0, [sp, #0x18] + ldr r2, [sp, #0x18] + add r0, r4, #0 + add r1, r7, #0 + bl ov70_02268B50 + str r0, [sp, #0x1c] + ldr r0, _02267E98 ; =0x000005E4 + bl sub_02005748 + add r0, r7, #0 + mov r1, #9 + bl ov66_0222E3E4 + ldr r0, [sp, #0x1c] + cmp r0, #1 + bne _02267B82 + ldr r1, [sp, #0x18] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E328 + ldr r1, [sp, #0x18] + add r0, r7, #0 + bl ov66_0222EEE4 + add r0, r6, #0 + mov r1, #1 + bl ov70_02262E88 + b _02268382 +_02267B82: + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + b _02268382 +_02267B8C: + add r0, r7, #0 + bl ov66_0222EEAC + cmp r0, #0 + bne _02267B98 +_02267B96: + b _02268382 +_02267B98: + ldr r0, [sp, #8] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #0xc] + add r2, r5, #0 + str r0, [sp, #4] + ldrb r3, [r4, #5] + add r0, r4, #0 + bl ov70_02268BF4 + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #2 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267BBE: + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222EEF4 + add r0, r7, #0 + bl ov66_0222F020 + add r0, r7, #0 + mov r1, #7 + bl ov66_0222F040 + ldr r0, [sp, #0xc] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #8] + add r2, r5, #0 + str r0, [sp, #4] + ldrb r3, [r4, #4] + add r0, r4, #0 + bl ov70_02268BF4 + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #3 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267BFA: + ldr r0, [sp, #0x14] + cmp r0, #4 + bhi _02267C5C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267C0C: ; jump table + .short _02267C5C - _02267C0C - 2 ; case 0 + .short _02267C5C - _02267C0C - 2 ; case 1 + .short _02267C42 - _02267C0C - 2 ; case 2 + .short _02267C16 - _02267C0C - 2 ; case 3 + .short _02267C5C - _02267C0C - 2 ; case 4 +_02267C16: + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r7, #0 + mov r1, #0 + bl ov66_0222ECD4 + add r0, r7, #0 + bl ov66_0222EE24 + cmp r0, #0 + beq _02267C38 + add r0, r6, #0 + mov r1, #4 + bl ov70_02262E88 + b _02268382 +_02267C38: + add r0, r6, #0 + mov r1, #6 + bl ov70_02262E88 + b _02268382 +_02267C42: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + bne _02267C52 + add r0, r5, #0 + bl ov70_0225DFBC +_02267C52: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268D70 + b _02268382 +_02267C5C: + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02268382 +_02267C6C: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02268CC8 + cmp r0, #1 + bne _02267C8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #5 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267C8C: + add r0, r6, #0 + mov r1, #5 + bl ov70_02262E88 + b _02268382 +_02267C96: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x28 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #7 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267CC4: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrh r1, [r4, #8] + add r0, r5, #0 + mov r2, #1 + bl ov70_0225E234 + ldrb r1, [r4, #3] + ldrh r2, [r4, #8] + add r0, r5, #0 + bl ov70_02268AF8 + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #7 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267CFC: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2f + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #9 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267D2A: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x35 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #9 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267D58: + ldr r0, [sp, #0x14] + cmp r0, #4 + bhi _02267E0E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267D6A: ; jump table + .short _02267DFE - _02267D6A - 2 ; case 0 + .short _02267E0E - _02267D6A - 2 ; case 1 + .short _02267DE4 - _02267D6A - 2 ; case 2 + .short _02267D74 - _02267D6A - 2 ; case 3 + .short _02267E0E - _02267D6A - 2 ; case 4 +_02267D74: + ldr r0, [sp, #0x10] + cmp r0, #3 + beq _02267D84 + cmp r0, #4 + beq _02267DA0 + cmp r0, #5 + beq _02267DBC + b _02267DCE +_02267D84: + add r0, r6, #0 + mov r1, #0xa + bl ov70_02262E88 + add r0, r7, #0 + bl ov66_0222EEB8 + mov r0, #1 + str r0, [r4, #0x4c] + ldr r1, [sp, #8] + add r0, r4, #0 + bl ov70_02268E20 + b _02267DDC +_02267DA0: + add r0, r6, #0 + mov r1, #0xe + bl ov70_02262E88 + add r0, r7, #0 + bl ov66_0222EEB8 + mov r0, #1 + str r0, [r4, #0x4c] + ldr r1, [sp, #8] + add r0, r4, #0 + bl ov70_02268E20 + b _02267DDC +_02267DBC: + add r0, r7, #0 + mov r1, #1 + bl ov66_0222ECD4 + add r0, r6, #0 + mov r1, #0xf + bl ov70_02262E88 + b _02267DDC +_02267DCE: + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC +_02267DDC: + add r0, r5, #0 + bl ov70_0225DFCC + b _02268382 +_02267DE4: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + bne _02267DF4 + add r0, r5, #0 + bl ov70_0225DFBC +_02267DF4: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268D70 + b _02268382 +_02267DFE: + add r0, r6, #0 + mov r1, #0x1b + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02268382 +_02267E0E: + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02268382 +_02267E1E: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r3, #1 + str r3, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02268D38 + ldrb r1, [r4, #3] + ldr r2, _02267E9C ; =0x000001FF + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xb + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267E5A: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r3, #1 + str r3, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02268D38 + mov r2, #2 + ldrb r1, [r4, #3] + add r0, r5, #0 + lsl r2, r2, #8 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xc + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 + ; .align 2, 0 +_02267E98: .word 0x000005E4 +_02267E9C: .word 0x000001FF +_02267EA0: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r3, #1 + str r3, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02268D38 + ldrb r1, [r4, #3] + ldr r2, _02268218 ; =0x00000201 + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0xd + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267EDC: + ldr r0, _0226821C ; =0x000005A8 + bl sub_02005748 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + ldr r2, _02268220 ; =0x00000202 + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #8 + add r3, r6, #0 + bl ov70_02268BA4 + add r0, r7, #0 + mov r1, #2 + bl ov66_0222ECD4 + add r0, r7, #0 + bl ov66_0222E3BC + bl ov66_0222E8C4 + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225E378 + b _02268382 +_02267F2A: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + mov r3, #1 + str r3, [sp] + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov70_02268D38 + ldrb r1, [r4, #3] + ldr r2, _02268224 ; =0x000001FB + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1b + add r3, r6, #0 + bl ov70_02268BA4 + add r0, r7, #0 + mov r1, #2 + bl ov66_0222ECD4 + b _02268382 +_02267F6E: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + ldr r2, _02268228 ; =0x000002AF + add r0, r5, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x10 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02267F9C: + ldr r0, [sp, #0x14] + cmp r0, #4 + bhi _02267FEC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02267FAE: ; jump table + .short _02267FEC - _02267FAE - 2 ; case 0 + .short _02267FEC - _02267FAE - 2 ; case 1 + .short _02267FD2 - _02267FAE - 2 ; case 2 + .short _02267FB8 - _02267FAE - 2 ; case 3 + .short _02267FEC - _02267FAE - 2 ; case 4 +_02267FB8: + add r0, r6, #0 + mov r1, #0x11 + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + add r0, r7, #0 + bl ov66_0222EEB8 + mov r0, #1 + str r0, [r4, #0x4c] + b _02268382 +_02267FD2: + add r0, r5, #0 + bl ov70_0225DFDC + cmp r0, #0 + bne _02267FE2 + add r0, r5, #0 + bl ov70_0225DFBC +_02267FE2: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268D70 + b _02268382 +_02267FEC: + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + add r0, r5, #0 + bl ov70_0225DFCC + b _02268382 +_02267FFC: + ldr r0, [sp, #0x10] + cmp r0, #6 + blo _02268006 + cmp r0, #0x7e + blo _02268010 +_02268006: + add r0, r6, #0 + mov r1, #0x1a + bl ov70_02262E88 + b _02268382 +_02268010: + sub r0, r0, #6 + strb r0, [r4, #2] + ldrb r0, [r4, #2] + mov r2, #0 + lsr r0, r0, #2 + strb r0, [r4] + ldrb r1, [r4, #3] + add r0, r5, #0 + bl ov70_0225E234 + ldrb r2, [r4] + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, #0x37 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x12 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_0226804A: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r2, [r4] + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, #0x55 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x13 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_0226807A: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r2, [r4, #2] + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, #0xec + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x14 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_022680AA: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r3, [r4] + ldr r2, _0226822C ; =0x000001DD + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, r3, r2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x15 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_022680DC: + mov r0, #2 + str r0, [sp] + ldrb r3, [r4] + add r0, r4, #0 + add r0, #0x14 + lsl r3, r3, #2 + add r1, r5, #0 + mov r2, #5 + add r3, #0x73 + bl ov70_02268E44 + add r1, r4, #0 + mov r2, #0 + add r0, r5, #0 + add r1, #0x14 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r4, #0 + bl ov70_02268DB8 + add r0, r6, #0 + mov r1, #0x16 + bl ov70_02262E88 + b _02268382 +_02268110: + add r0, r5, #0 + bl ov70_0225E0D4 + cmp r0, #4 + bhi _0226816A + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02268126: ; jump table + .short _02268130 - _02268126 - 2 ; case 0 + .short _02268130 - _02268126 - 2 ; case 1 + .short _02268130 - _02268126 - 2 ; case 2 + .short _02268130 - _02268126 - 2 ; case 3 + .short _02268152 - _02268126 - 2 ; case 4 +_02268130: + ldrb r1, [r4] + lsl r1, r1, #2 + add r0, r0, r1 + strb r0, [r4, #1] + ldrb r1, [r4, #1] + add r0, r7, #0 + add r1, r1, #6 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl ov66_0222ECD4 + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + mov r0, #1 + b _02268174 +_02268152: + mov r0, #0x7e + strb r0, [r4, #1] + ldrb r1, [r4, #1] + add r0, r7, #0 + bl ov66_0222ECD4 + add r0, r6, #0 + mov r1, #0x1c + bl ov70_02262E88 + mov r0, #1 + b _02268174 +_0226816A: + add r0, r4, #0 + add r1, r5, #0 + bl ov70_02268DCC + mov r0, #0 +_02268174: + cmp r0, #0 + bne _0226817A + b _02268382 +_0226817A: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + add r0, r4, #0 + bl ov70_02268DC4 + ldr r1, [sp, #8] + add r0, r4, #0 + bl ov70_02268E20 + b _02268382 +_0226819E: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r3, [r4, #1] + ldr r2, _02268230 ; =0x00000165 + ldrb r1, [r4, #3] + add r0, r5, #0 + add r2, r3, r2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + ldrb r1, [r4, #2] + ldrb r0, [r4, #1] + cmp r1, r0 + bne _022681D8 + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x18 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_022681D8: + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x19 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_022681EA: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x33 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x19 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 + ; .align 2, 0 +_02268218: .word 0x00000201 +_0226821C: .word 0x000005A8 +_02268220: .word 0x00000202 +_02268224: .word 0x000001FB +_02268228: .word 0x000002AF +_0226822C: .word 0x000001DD +_02268230: .word 0x00000165 +_02268234: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x34 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #8 + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02268262: + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r4, #0 + add r0, #0x14 + add r1, r5, #0 + bl ov70_02269108 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2d + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0 + strh r0, [r4, #0xa] + mov r0, #0x1d + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1f + add r3, r6, #0 + bl ov70_02268BA4 + add r0, r7, #0 + bl ov66_0222EDC0 + b _02268382 +_022682A4: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x2b + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0 + strh r0, [r4, #0xa] + mov r0, #0x1d + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1f + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_022682D6: + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r4, #3] + add r0, r5, #0 + mov r2, #0x31 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + mov r0, #0x1e + str r0, [sp] + add r0, r4, #0 + mov r1, #0x80 + mov r2, #0x1b + add r3, r6, #0 + bl ov70_02268BA4 + b _02268382 +_02268304: + add r0, r4, #0 + add r1, r6, #0 + bl ov70_02268BBC + b _02268382 +_0226830E: + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov70_02268BD8 + b _02268382 +_0226831A: + add r0, r4, #0 + add r0, #0x44 + ldrh r0, [r0] + cmp r0, #1 + bne _02268332 + add r1, r4, #0 + add r1, #0x46 + ldrh r1, [r1] + ldr r2, [r4, #0x48] + add r0, r7, #0 + bl ov66_0222E500 +_02268332: + ldr r0, [r4, #0x4c] + cmp r0, #0 + bne _02268340 + ldrb r1, [r4, #3] + add r0, r7, #0 + bl ov66_0222EED4 +_02268340: + add r0, r7, #0 + bl ov66_0222EC60 + add r0, r5, #0 + bl ov70_0225DFEC + add r0, r4, #0 + bl ov70_02268BA0 + add r0, r6, #0 + bl ov70_02262E64 + add r0, r7, #0 + mov r1, #1 + bl ov66_0222E3E4 + add r0, r5, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov70_0225CDEC + add r0, r5, #0 + bl ov70_0225E3D0 + add sp, #0x20 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02268382: + add r0, r4, #0 + bl ov70_02268E08 + mov r0, #0 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02267A44 + + thumb_func_start ov70_02268390 +ov70_02268390: ; 0x02268390 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + bl ov70_02262E80 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + add r7, r0, #0 + add r0, r6, #0 + bl ov70_02262E84 + cmp r0, #0x18 + bls _022683B2 + b _02268892 +_022683B2: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022683BE: ; jump table + .short _022683F0 - _022683BE - 2 ; case 0 + .short _02268430 - _022683BE - 2 ; case 1 + .short _02268450 - _022683BE - 2 ; case 2 + .short _02268470 - _022683BE - 2 ; case 3 + .short _02268490 - _022683BE - 2 ; case 4 + .short _022684B0 - _022683BE - 2 ; case 5 + .short _022684DA - _022683BE - 2 ; case 6 + .short _02268588 - _022683BE - 2 ; case 7 + .short _022685A8 - _022683BE - 2 ; case 8 + .short _022685C6 - _022683BE - 2 ; case 9 + .short _0226863E - _022683BE - 2 ; case 10 + .short _02268668 - _022683BE - 2 ; case 11 + .short _02268692 - _022683BE - 2 ; case 12 + .short _022686BC - _022683BE - 2 ; case 13 + .short _022686DC - _022683BE - 2 ; case 14 + .short _022686FC - _022683BE - 2 ; case 15 + .short _0226871C - _022683BE - 2 ; case 16 + .short _02268740 - _022683BE - 2 ; case 17 + .short _022687B6 - _022683BE - 2 ; case 18 + .short _022687D6 - _022683BE - 2 ; case 19 + .short _022687F6 - _022683BE - 2 ; case 20 + .short _02268816 - _022683BE - 2 ; case 21 + .short _02268836 - _022683BE - 2 ; case 22 + .short _02268856 - _022683BE - 2 ; case 23 + .short _0226886A - _022683BE - 2 ; case 24 +_022683F0: + add r0, r6, #0 + mov r1, #0x28 + bl ov70_02262E3C + ldr r0, _0226873C ; =0x000005DC + bl sub_02005748 + add r0, r7, #0 + bl ov66_0222E12C + cmp r0, #1 + bne _02268412 + add r0, r6, #0 + mov r1, #2 + bl ov70_02262E88 + b _02268892 +_02268412: + add r0, r7, #0 + bl ov66_0222E170 + cmp r0, #1 + bne _02268426 + add r0, r6, #0 + mov r1, #1 + bl ov70_02262E88 + b _02268892 +_02268426: + add r0, r6, #0 + mov r1, #3 + bl ov70_02262E88 + b _02268892 +_02268430: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4e + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #0x18 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268450: + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #0x18 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268470: + add r0, r4, #0 + mov r1, #1 + mov r2, #0xf + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268490: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x10 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #5 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022684B0: + add r0, r5, #4 + add r1, r4, #0 + bl ov70_02268FB8 + mov r0, #0x10 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xf + mov r2, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov70_0225E0A4 + add r0, r6, #0 + mov r1, #6 + bl ov70_02262E88 + b _02268892 +_022684DA: + add r0, r4, #0 + mov r7, #0 + bl ov70_0225E0D4 + cmp r0, #7 + bhi _02268502 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022684F2: ; jump table + .short _0226850C - _022684F2 - 2 ; case 0 + .short _02268518 - _022684F2 - 2 ; case 1 + .short _02268524 - _022684F2 - 2 ; case 2 + .short _02268530 - _022684F2 - 2 ; case 3 + .short _0226853C - _022684F2 - 2 ; case 4 + .short _02268548 - _022684F2 - 2 ; case 5 + .short _02268554 - _022684F2 - 2 ; case 6 + .short _02268566 - _022684F2 - 2 ; case 7 +_02268502: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _02268560 + b _02268570 +_0226850C: + add r0, r6, #0 + mov r1, #7 + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_02268518: + add r0, r6, #0 + mov r1, #8 + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_02268524: + add r0, r6, #0 + mov r1, #0xd + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_02268530: + add r0, r6, #0 + mov r1, #0xe + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_0226853C: + add r0, r6, #0 + mov r1, #0xf + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_02268548: + add r0, r6, #0 + mov r1, #0x15 + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_02268554: + add r0, r6, #0 + mov r1, #0x10 + bl ov70_02262E88 + mov r7, #1 + b _02268570 +_02268560: + ldr r0, _0226873C ; =0x000005DC + bl sub_02005748 +_02268566: + add r0, r6, #0 + mov r1, #0x16 + bl ov70_02262E88 + mov r7, #1 +_02268570: + cmp r7, #1 + bne _02268628 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r5, #4 + add r1, r4, #0 + bl ov70_02269108 + b _02268892 +_02268588: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x17 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022685A8: + add r0, r5, #4 + add r1, r4, #0 + bl ov70_02269090 + mov r2, #0 + add r0, r4, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r6, #0 + mov r1, #9 + bl ov70_02262E88 + b _02268892 +_022685C6: + add r0, r4, #0 + mov r7, #0 + bl ov70_0225E0D4 + cmp r0, #3 + bhi _022685E6 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022685DE: ; jump table + .short _022685F0 - _022685DE - 2 ; case 0 + .short _022685FC - _022685DE - 2 ; case 1 + .short _02268608 - _022685DE - 2 ; case 2 + .short _0226861A - _022685DE - 2 ; case 3 +_022685E6: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _02268614 + b _02268624 +_022685F0: + add r0, r6, #0 + mov r1, #0xa + bl ov70_02262E88 + mov r7, #1 + b _02268624 +_022685FC: + add r0, r6, #0 + mov r1, #0xb + bl ov70_02262E88 + mov r7, #1 + b _02268624 +_02268608: + add r0, r6, #0 + mov r1, #0xc + bl ov70_02262E88 + mov r7, #1 + b _02268624 +_02268614: + ldr r0, _0226873C ; =0x000005DC + bl sub_02005748 +_0226861A: + add r0, r6, #0 + mov r1, #4 + bl ov70_02262E88 + mov r7, #1 +_02268624: + cmp r7, #1 + beq _0226862A +_02268628: + b _02268892 +_0226862A: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r5, #4 + add r1, r4, #0 + bl ov70_02269108 + b _02268892 +_0226863E: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x18 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268668: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x19 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268692: + add r0, r4, #0 + mov r1, #2 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1a + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022686BC: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x12 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022686DC: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x13 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022686FC: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x14 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_0226871C: + add r0, r5, #4 + add r1, r4, #0 + bl ov70_02269018 + mov r2, #0 + add r0, r4, #0 + add r1, r5, #4 + add r3, r2, #0 + bl ov70_0225E074 + add r0, r6, #0 + mov r1, #0x11 + bl ov70_02262E88 + b _02268892 + nop +_0226873C: .word 0x000005DC +_02268740: + add r0, r4, #0 + mov r7, #0 + bl ov70_0225E0D4 + cmp r0, #3 + bhi _02268760 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02268758: ; jump table + .short _0226876A - _02268758 - 2 ; case 0 + .short _02268776 - _02268758 - 2 ; case 1 + .short _02268782 - _02268758 - 2 ; case 2 + .short _02268794 - _02268758 - 2 ; case 3 +_02268760: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0226878E + b _0226879E +_0226876A: + add r0, r6, #0 + mov r1, #0x12 + bl ov70_02262E88 + mov r7, #1 + b _0226879E +_02268776: + add r0, r6, #0 + mov r1, #0x13 + bl ov70_02262E88 + mov r7, #1 + b _0226879E +_02268782: + add r0, r6, #0 + mov r1, #0x14 + bl ov70_02262E88 + mov r7, #1 + b _0226879E +_0226878E: + ldr r0, _02268898 ; =0x000005DC + bl sub_02005748 +_02268794: + add r0, r6, #0 + mov r1, #4 + bl ov70_02262E88 + mov r7, #1 +_0226879E: + cmp r7, #1 + bne _02268892 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov70_0225E0E4 + add r0, r5, #4 + add r1, r4, #0 + bl ov70_02269108 + b _02268892 +_022687B6: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1b + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022687D6: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1c + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_022687F6: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1d + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268816: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x1e + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #4 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268836: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x16 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + mov r0, #0x18 + str r0, [r5, #0] + add r0, r6, #0 + mov r1, #0x17 + bl ov70_02262E88 + b _02268892 +_02268856: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #0 + beq _02268892 + ldr r1, [r5, #0] + add r0, r6, #0 + bl ov70_02262E88 + b _02268892 +_0226886A: + add r0, r6, #0 + bl ov70_02262E64 + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r4, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov70_0225CDEC + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02268892: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268898: .word 0x000005DC + thumb_func_end ov70_02268390 + + thumb_func_start ov70_0226889C +ov70_0226889C: ; 0x0226889C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + bl ov70_02262E80 + add r0, r4, #0 + bl ov70_0225DEE8 + add r6, r0, #0 + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #0 + beq _022688C6 + cmp r0, #1 + bne _022688BE + b _022689FE +_022688BE: + cmp r0, #2 + bne _022688C4 + b _02268A12 +_022688C4: + b _02268A32 +_022688C6: + ldr r0, _02268A38 ; =0x000005DC + bl sub_02005748 + add r0, r6, #0 + bl ov66_0222E12C + cmp r0, #0 + bne _022688FC + add r0, r6, #0 + bl ov66_0222E170 + cmp r0, #1 + bne _02268918 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4e + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02268A32 +_022688FC: + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02268A32 +_02268918: + add r0, r6, #0 + bl ov66_0222F05C + cmp r0, #8 + bhi _022689E2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226892E: ; jump table + .short _02268940 - _0226892E - 2 ; case 0 + .short _02268958 - _0226892E - 2 ; case 1 + .short _02268970 - _0226892E - 2 ; case 2 + .short _02268988 - _0226892E - 2 ; case 3 + .short _022689A0 - _0226892E - 2 ; case 4 + .short _022689B8 - _0226892E - 2 ; case 5 + .short _022689C6 - _0226892E - 2 ; case 6 + .short _022689D4 - _0226892E - 2 ; case 7 + .short _022689E2 - _0226892E - 2 ; case 8 +_02268940: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x49 + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_02268958: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x49 + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_02268970: + add r0, r4, #0 + mov r1, #2 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x49 + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_02268988: + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4d + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_022689A0: + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl ov70_0225E27C + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4d + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_022689B8: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4a + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_022689C6: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4f + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_022689D4: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4b + bl ov70_0225E20C + add r1, r0, #0 + b _022689EE +_022689E2: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x4c + bl ov70_0225E20C + add r1, r0, #0 +_022689EE: + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #1 + bl ov70_02262E88 + b _02268A32 +_022689FE: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #0 + beq _02268A32 + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + b _02268A32 +_02268A12: + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r4, #0 + bl ov70_0225DEF0 + add r4, r0, #0 + bl ov70_0225CCAC + add r1, r0, #0 + add r0, r4, #0 + mov r2, #1 + bl ov70_0225CDEC + mov r0, #1 + pop {r4, r5, r6, pc} +_02268A32: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_02268A38: .word 0x000005DC + thumb_func_end ov70_0226889C + + thumb_func_start ov70_02268A3C +ov70_02268A3C: ; 0x02268A3C + push {r3, lr} + sub sp, #8 + bl ov66_0222E7C4 + str r0, [sp] + str r0, [sp, #4] + add r0, sp, #0 + ldrb r0, [r0, #4] + cmp r0, #0x18 + bhi _02268AA0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02268A5C: ; jump table + .short _02268A9A - _02268A5C - 2 ; case 0 + .short _02268A9A - _02268A5C - 2 ; case 1 + .short _02268A9A - _02268A5C - 2 ; case 2 + .short _02268A9A - _02268A5C - 2 ; case 3 + .short _02268A8E - _02268A5C - 2 ; case 4 + .short _02268A8E - _02268A5C - 2 ; case 5 + .short _02268A8E - _02268A5C - 2 ; case 6 + .short _02268A8E - _02268A5C - 2 ; case 7 + .short _02268A8E - _02268A5C - 2 ; case 8 + .short _02268A8E - _02268A5C - 2 ; case 9 + .short _02268A8E - _02268A5C - 2 ; case 10 + .short _02268A94 - _02268A5C - 2 ; case 11 + .short _02268A94 - _02268A5C - 2 ; case 12 + .short _02268A94 - _02268A5C - 2 ; case 13 + .short _02268A94 - _02268A5C - 2 ; case 14 + .short _02268A94 - _02268A5C - 2 ; case 15 + .short _02268A94 - _02268A5C - 2 ; case 16 + .short _02268A94 - _02268A5C - 2 ; case 17 + .short _02268A94 - _02268A5C - 2 ; case 18 + .short _02268A9A - _02268A5C - 2 ; case 19 + .short _02268A9A - _02268A5C - 2 ; case 20 + .short _02268A9A - _02268A5C - 2 ; case 21 + .short _02268A9A - _02268A5C - 2 ; case 22 + .short _02268A9A - _02268A5C - 2 ; case 23 + .short _02268A9A - _02268A5C - 2 ; case 24 +_02268A8E: + add sp, #8 + mov r0, #0 + pop {r3, pc} +_02268A94: + add sp, #8 + mov r0, #1 + pop {r3, pc} +_02268A9A: + add sp, #8 + mov r0, #2 + pop {r3, pc} +_02268AA0: + bl sub_02022974 + mov r0, #1 + add sp, #8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02268A3C + + thumb_func_start ov70_02268AAC +ov70_02268AAC: ; 0x02268AAC + push {r4, r5, r6, lr} + add r6, r1, #0 + add r5, r0, #0 + add r4, r2, #0 + bl ov70_0225DEE8 + add r1, r6, #0 + bl ov66_0222E924 + cmp r0, #1 + bne _02268ADE + ldr r3, _02268AEC ; =0x0226DD5C + ldr r0, _02268AF0 ; =0x00000163 + mov r2, #0 +_02268AC8: + ldrh r1, [r3] + cmp r4, r1 + bne _02268AD6 + ldr r0, _02268AF4 ; =0x0226DD5E + lsl r1, r2, #2 + ldrh r4, [r0, r1] + b _02268ADE +_02268AD6: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, r0 + blo _02268AC8 +_02268ADE: + add r0, r5, #0 + mov r1, #3 + add r2, r4, #0 + bl ov70_0225E20C + pop {r4, r5, r6, pc} + nop +_02268AEC: .word 0x0226DD5C +_02268AF0: .word 0x00000163 +_02268AF4: .word 0x0226DD5E + thumb_func_end ov70_02268AAC + + thumb_func_start ov70_02268AF8 +ov70_02268AF8: ; 0x02268AF8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r4, r0, #0 + add r6, r2, #0 + bl ov70_0225DEE8 + add r7, r0, #0 + add r1, r5, #0 + bl ov66_0222E924 + add r5, r0, #0 + add r0, r7, #0 + add r1, r6, #0 + bl ov66_0222E924 + mov r2, #0x29 + cmp r5, #1 + bne _02268B24 + cmp r0, #1 + bne _02268B24 + ldr r2, _02268B44 ; =0x000002AA + b _02268B3A +_02268B24: + cmp r5, #1 + bne _02268B30 + cmp r0, #0 + bne _02268B30 + ldr r2, _02268B48 ; =0x00000226 + b _02268B3A +_02268B30: + cmp r5, #0 + bne _02268B3A + cmp r0, #1 + bne _02268B3A + ldr r2, _02268B4C ; =0x000002A9 +_02268B3A: + add r0, r4, #0 + mov r1, #3 + bl ov70_0225E20C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268B44: .word 0x000002AA +_02268B48: .word 0x00000226 +_02268B4C: .word 0x000002A9 + thumb_func_end ov70_02268AF8 + + thumb_func_start ov70_02268B50 +ov70_02268B50: ; 0x02268B50 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0 + add r6, r2, #0 + mvn r0, r0 + add r4, r1, #0 + cmp r6, r0 + bne _02268B64 + bl sub_02022974 +_02268B64: + strb r6, [r5, #3] + add r0, r4, #0 + bl ov66_0222E338 + strh r0, [r5, #8] + mov r0, #1 + strh r0, [r5, #0xa] + add r0, r4, #0 + bl ov66_0222E3BC + add r6, r0, #0 + ldrb r1, [r5, #3] + add r0, r4, #0 + bl ov66_0222E374 + add r4, r0, #0 + bne _02268B8A + mov r0, #0 + pop {r4, r5, r6, pc} +_02268B8A: + add r0, r6, #0 + bl ov70_02268A3C + strb r0, [r5, #4] + add r0, r4, #0 + bl ov70_02268A3C + strb r0, [r5, #5] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02268B50 + + thumb_func_start ov70_02268BA0 +ov70_02268BA0: ; 0x02268BA0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_02268BA0 + + thumb_func_start ov70_02268BA4 +ov70_02268BA4: ; 0x02268BA4 + strb r1, [r0, #6] + ldr r1, _02268BB4 ; =0xFFFFFFF0 + strb r2, [r0, #7] + add r0, r3, #0 + add r1, sp + ldr r3, _02268BB8 ; =ov70_02262E88 + ldrb r1, [r1, #0x10] + bx r3 + ; .align 2, 0 +_02268BB4: .word 0xFFFFFFF0 +_02268BB8: .word ov70_02262E88 + thumb_func_end ov70_02268BA4 + + thumb_func_start ov70_02268BBC +ov70_02268BBC: ; 0x02268BBC + push {r3, lr} + add r2, r0, #0 + ldrb r0, [r2, #6] + cmp r0, #0 + beq _02268BCC + sub r0, r0, #1 + strb r0, [r2, #6] + pop {r3, pc} +_02268BCC: + add r0, r1, #0 + ldrb r1, [r2, #7] + bl ov70_02262E88 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_02268BBC + + thumb_func_start ov70_02268BD8 +ov70_02268BD8: ; 0x02268BD8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r2, #0 + add r4, r1, #0 + bl ov70_0225DFAC + cmp r0, #0 + beq _02268BF0 + ldrb r1, [r5, #7] + add r0, r4, #0 + bl ov70_02262E88 +_02268BF0: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov70_02268BD8 + + thumb_func_start ov70_02268BF4 +ov70_02268BF4: ; 0x02268BF4 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r4, r3, #0 + ldr r3, [sp, #0x10] + add r0, r5, #0 + mov r1, #0 + add r2, r4, #0 + bl ov70_02268C44 + ldr r3, [sp, #0x14] + add r0, r5, #0 + mov r1, #1 + add r2, r4, #0 + bl ov70_02268C44 + ldr r0, [sp, #0x10] + bl ov66_0222E80C + add r4, r0, #0 + ldr r0, [sp, #0x14] + bl ov66_0222E80C + add r3, r0, #0 + ldr r2, _02268C40 ; =0x0226DCDC + lsl r4, r4, #4 + lsl r3, r3, #1 + add r2, r2, r4 + ldrh r2, [r3, r2] + add r0, r5, #0 + mov r1, #3 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + bl ov70_0225DF8C + pop {r3, r4, r5, pc} + nop +_02268C40: .word 0x0226DCDC + thumb_func_end ov70_02268BF4 + + thumb_func_start ov70_02268C44 +ov70_02268C44: ; 0x02268C44 + push {r4, r5, r6, lr} + add r4, r0, #0 + add r0, r3, #0 + add r5, r1, #0 + add r6, r2, #0 + bl ov66_0222E80C + cmp r0, #7 + bhi _02268CBA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02268C62: ; jump table + .short _02268CBA - _02268C62 - 2 ; case 0 + .short _02268C72 - _02268C62 - 2 ; case 1 + .short _02268C7E - _02268C62 - 2 ; case 2 + .short _02268C8A - _02268C62 - 2 ; case 3 + .short _02268C96 - _02268C62 - 2 ; case 4 + .short _02268CA2 - _02268C62 - 2 ; case 5 + .short _02268CBA - _02268C62 - 2 ; case 6 + .short _02268CAE - _02268C62 - 2 ; case 7 +_02268C72: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2AC + pop {r4, r5, r6, pc} +_02268C7E: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2BC + pop {r4, r5, r6, pc} +_02268C8A: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2CC + pop {r4, r5, r6, pc} +_02268C96: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2DC + pop {r4, r5, r6, pc} +_02268CA2: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2EC + pop {r4, r5, r6, pc} +_02268CAE: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2FC + pop {r4, r5, r6, pc} +_02268CBA: + add r0, r4, #0 + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0225E2BC + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_02268C44 + + thumb_func_start ov70_02268CC8 +ov70_02268CC8: ; 0x02268CC8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r5, r0, #0 + add r0, r6, #0 + add r7, r2, #0 + bl ov66_0222E3BC + str r0, [sp] + ldrb r1, [r5, #3] + add r0, r6, #0 + bl ov66_0222E374 + add r6, r0, #0 + ldr r0, [sp] + bl ov66_0222E824 + cmp r0, #0 + bne _02268CF0 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02268CF0: + add r0, r6, #0 + bl ov66_0222E824 + cmp r0, #0 + bne _02268CFE + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02268CFE: + ldrb r1, [r5, #5] + ldrb r0, [r5, #4] + cmp r0, r1 + beq _02268D34 + cmp r1, #0 + beq _02268D14 + cmp r1, #1 + beq _02268D18 + cmp r1, #2 + beq _02268D1C + b _02268D1E +_02268D14: + mov r4, #0x27 + b _02268D1E +_02268D18: + mov r4, #0x25 + b _02268D1E +_02268D1C: + mov r4, #0x26 +_02268D1E: + add r0, r7, #0 + mov r1, #3 + add r2, r4, #0 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r7, #0 + bl ov70_0225DF8C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02268D34: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02268CC8 + + thumb_func_start ov70_02268D38 +ov70_02268D38: ; 0x02268D38 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov66_0222E3BC + str r0, [sp] + ldrb r1, [r5, #3] + add r0, r4, #0 + bl ov66_0222E374 + ldr r1, [sp, #0x18] + cmp r1, #0 + bne _02268D5E + bl ov66_0222E8C4 + b _02268D64 +_02268D5E: + ldr r0, [sp] + bl ov66_0222E8C4 +_02268D64: + add r1, r0, #0 + add r0, r6, #0 + add r2, r7, #0 + bl ov70_0225E29C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02268D38 + + thumb_func_start ov70_02268D70 +ov70_02268D70: ; 0x02268D70 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + bl ov66_0222EE90 + ldr r1, _02268DB4 ; =0x000001C2 + cmp r0, r1 + bne _02268DB0 + add r0, r4, #0 + bl ov70_0225DFCC + ldrb r1, [r5, #3] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E234 + mov r2, #0xab + ldrb r1, [r5, #3] + add r0, r4, #0 + lsl r2, r2, #2 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r4, #0 + bl ov70_0225DFBC +_02268DB0: + pop {r3, r4, r5, pc} + nop +_02268DB4: .word 0x000001C2 + thumb_func_end ov70_02268D70 + + thumb_func_start ov70_02268DB8 +ov70_02268DB8: ; 0x02268DB8 + mov r1, #0 + strh r1, [r0, #0xe] + mov r1, #1 + strb r1, [r0, #0xd] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02268DB8 + + thumb_func_start ov70_02268DC4 +ov70_02268DC4: ; 0x02268DC4 + mov r1, #0 + strh r1, [r0, #0xe] + strb r1, [r0, #0xd] + bx lr + thumb_func_end ov70_02268DC4 + + thumb_func_start ov70_02268DCC +ov70_02268DCC: ; 0x02268DCC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r0, [r5, #0xd] + add r4, r1, #0 + cmp r0, #1 + bne _02268DFE + mov r0, #0xe + ldrsh r1, [r5, r0] + ldr r0, _02268E00 ; =0x000001C2 + cmp r1, r0 + bne _02268DFE + ldrb r1, [r5, #3] + add r0, r4, #0 + mov r2, #0 + bl ov70_0225E234 + ldrb r1, [r5, #3] + ldr r2, _02268E04 ; =0x000002AB + add r0, r4, #0 + bl ov70_02268AAC + add r1, r0, #0 + add r0, r4, #0 + bl ov70_0225DF8C +_02268DFE: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02268E00: .word 0x000001C2 +_02268E04: .word 0x000002AB + thumb_func_end ov70_02268DCC + + thumb_func_start ov70_02268E08 +ov70_02268E08: ; 0x02268E08 + ldrb r1, [r0, #0xd] + cmp r1, #1 + bne _02268E1E + mov r1, #0xe + ldrsh r2, [r0, r1] + mov r1, #0xe1 + lsl r1, r1, #2 + cmp r2, r1 + bgt _02268E1E + add r1, r2, #1 + strh r1, [r0, #0xe] +_02268E1E: + bx lr + thumb_func_end ov70_02268E08 + + thumb_func_start ov70_02268E20 +ov70_02268E20: ; 0x02268E20 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov66_0222E7A0 + add r1, r5, #0 + mov r2, #1 + add r1, #0x44 + strh r2, [r1] + add r1, r5, #0 + add r1, #0x46 + strh r0, [r1] + add r0, r4, #0 + bl ov66_0222E798 + str r0, [r5, #0x48] + pop {r3, r4, r5, pc} + thumb_func_end ov70_02268E20 + + thumb_func_start ov70_02268E44 +ov70_02268E44: ; 0x02268E44 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r7, r2, #0 + str r0, [sp] + add r0, r5, #0 + add r1, r7, #0 + str r3, [sp, #4] + ldr r6, [sp, #0x20] + bl ov70_0225E00C + ldr r0, [sp] + mov r4, #0 + str r7, [r0, #0x20] + cmp r7, #0 + bls _02268EAE + sub r0, r7, #1 + str r0, [sp, #8] +_02268E68: + cmp r6, #0 + beq _02268E92 + ldr r0, [sp, #8] + cmp r4, r0 + bne _02268E92 + cmp r6, #1 + bne _02268E84 + ldr r2, _02268EE4 ; =0x00000205 + add r0, r5, #0 + mov r1, #3 + bl ov70_0225E20C + add r1, r0, #0 + b _02268EA0 +_02268E84: + add r0, r5, #0 + mov r1, #3 + mov r2, #0xeb + bl ov70_0225E20C + add r1, r0, #0 + b _02268EA0 +_02268E92: + ldr r2, [sp, #4] + add r0, r5, #0 + mov r1, #3 + add r2, r2, r4 + bl ov70_0225E20C + add r1, r0, #0 +_02268EA0: + add r0, r5, #0 + add r2, r4, #0 + bl ov70_0225E044 + add r4, r4, #1 + cmp r4, r7 + blo _02268E68 +_02268EAE: + ldr r3, _02268EE8 ; =0x0226DCBC + ldr r2, [sp] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp] + ldr r1, [r0, #0x20] + strh r1, [r0, #0x10] + ldr r1, [r0, #0x20] + ldrh r0, [r0, #0x12] + cmp r0, r1 + bls _02268ED4 + ldr r0, [sp] + strh r1, [r0, #0x12] +_02268ED4: + add r0, r5, #0 + bl ov70_0225E054 + ldr r1, [sp] + str r0, [r1, #0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_02268EE4: .word 0x00000205 +_02268EE8: .word 0x0226DCBC + thumb_func_end ov70_02268E44 + + thumb_func_start ov70_02268EEC +ov70_02268EEC: ; 0x02268EEC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + ldr r0, [sp, #0x20] + add r5, r1, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x24] + str r3, [sp, #4] + str r0, [sp, #0x24] + add r0, r5, #0 + add r1, r3, #0 + add r4, r2, #0 + bl ov70_0225E020 + ldr r1, [sp, #4] + ldr r0, [sp] + mov r7, #0 + str r1, [r0, #0x20] + add r0, r1, #0 + beq _02268F7C + sub r0, r0, #1 + str r0, [sp, #8] +_02268F18: + ldr r0, [sp, #0x24] + cmp r0, #0 + beq _02268F48 + ldr r0, [sp, #8] + cmp r7, r0 + bne _02268F48 + ldr r0, [sp, #0x24] + add r6, r4, #0 + cmp r0, #1 + bne _02268F3A + ldr r2, _02268FB0 ; =0x00000205 + add r0, r5, #0 + mov r1, #3 + bl ov70_0225E20C + add r1, r0, #0 + b _02268F6C +_02268F3A: + add r0, r5, #0 + mov r1, #3 + mov r2, #0xeb + bl ov70_0225E20C + add r1, r0, #0 + b _02268F6C +_02268F48: + bl sub_0201D35C + add r1, r4, #0 + bl sub_020E2178 + add r0, r5, #0 + add r6, r1, #0 + bl ov70_0225E064 + cmp r0, #1 + beq _02268F48 + ldr r2, [sp, #0x20] + add r0, r5, #0 + mov r1, #3 + add r2, r2, r6 + bl ov70_0225E20C + add r1, r0, #0 +_02268F6C: + add r0, r5, #0 + add r2, r6, #0 + bl ov70_0225E044 + ldr r0, [sp, #4] + add r7, r7, #1 + cmp r7, r0 + blo _02268F18 +_02268F7C: + ldr r3, _02268FB4 ; =0x0226DCBC + ldr r2, [sp] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [sp] + ldr r1, [r0, #0x20] + strh r1, [r0, #0x10] + ldr r1, [r0, #0x20] + ldrh r0, [r0, #0x12] + cmp r0, r1 + bls _02268FA2 + ldr r0, [sp] + strh r1, [r0, #0x12] +_02268FA2: + add r0, r5, #0 + bl ov70_0225E054 + ldr r1, [sp] + str r0, [r1, #0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02268FB0: .word 0x00000205 +_02268FB4: .word 0x0226DCBC + thumb_func_end ov70_02268EEC + + thumb_func_start ov70_02268FB8 +ov70_02268FB8: ; 0x02268FB8 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + add r7, r0, #0 + add r0, r6, #0 + mov r1, #8 + bl ov70_0225E00C + mov r0, #8 + ldr r5, _02269010 ; =0x0226DCB4 + str r0, [r7, #0x20] + mov r4, #0 +_02268FCE: + ldrb r2, [r5] + add r0, r6, #0 + mov r1, #1 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r6, #0 + add r2, r4, #0 + bl ov70_0225E044 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #8 + blt _02268FCE + ldr r3, _02269014 ; =0x0226DCBC + add r2, r7, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r7, #0x20] + strh r0, [r7, #0x10] + ldr r0, [r7, #0x20] + strh r0, [r7, #0x12] + add r0, r6, #0 + bl ov70_0225E054 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269010: .word 0x0226DCB4 +_02269014: .word 0x0226DCBC + thumb_func_end ov70_02268FB8 + + thumb_func_start ov70_02269018 +ov70_02269018: ; 0x02269018 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #4 + bl ov70_0225E00C + mov r0, #4 + mov r4, #0 + str r0, [r6, #0x20] + add r7, r4, #0 +_0226902E: + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov70_0225E28C + add r0, r5, #0 + mov r1, #1 + mov r2, #0x27 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov70_0225E044 + add r4, r4, #1 + cmp r4, #3 + blt _0226902E + add r0, r5, #0 + mov r1, #1 + mov r2, #0x25 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + mov r2, #3 + bl ov70_0225E044 + ldr r3, _0226908C ; =0x0226DCBC + add r2, r6, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r6, #0x20] + strh r0, [r6, #0x10] + ldr r0, [r6, #0x20] + strh r0, [r6, #0x12] + add r0, r5, #0 + bl ov70_0225E054 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226908C: .word 0x0226DCBC + thumb_func_end ov70_02269018 + + thumb_func_start ov70_02269090 +ov70_02269090: ; 0x02269090 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #4 + bl ov70_0225E00C + mov r0, #4 + mov r4, #0 + str r0, [r6, #0x20] + add r7, r4, #0 +_022690A6: + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov70_0225E27C + add r0, r5, #0 + mov r1, #1 + mov r2, #0x26 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + add r2, r4, #0 + bl ov70_0225E044 + add r4, r4, #1 + cmp r4, #3 + blt _022690A6 + add r0, r5, #0 + mov r1, #1 + mov r2, #0x25 + bl ov70_0225E20C + add r1, r0, #0 + add r0, r5, #0 + mov r2, #3 + bl ov70_0225E044 + ldr r3, _02269104 ; =0x0226DCBC + add r2, r6, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r6, #0x20] + strh r0, [r6, #0x10] + ldr r0, [r6, #0x20] + strh r0, [r6, #0x12] + add r0, r5, #0 + bl ov70_0225E054 + str r0, [r6, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269104: .word 0x0226DCBC + thumb_func_end ov70_02269090 + + thumb_func_start ov70_02269108 +ov70_02269108: ; 0x02269108 + ldr r3, _02269110 ; =ov70_0225E034 + add r0, r1, #0 + bx r3 + nop +_02269110: .word ov70_0225E034 + thumb_func_end ov70_02269108 + + thumb_func_start ov70_02269114 +ov70_02269114: ; 0x02269114 + mov r1, #0 + strh r1, [r0] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02269114 + + thumb_func_start ov70_0226911C +ov70_0226911C: ; 0x0226911C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrh r0, [r5] + add r7, r1, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r0, #0 + beq _02269130 + bl sub_02022974 +_02269130: + mov r0, #1 + strh r0, [r5] + strh r4, [r5, #2] + add r0, r7, #0 + strh r6, [r5, #4] + bl ov66_0222EE30 + strh r0, [r5, #6] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226911C + + thumb_func_start ov70_02269144 +ov70_02269144: ; 0x02269144 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrh r0, [r5] + add r4, r1, #0 + cmp r0, #0 + beq _02269176 + add r0, r4, #0 + bl ov66_0222EE30 + str r0, [r5, #8] + ldrh r1, [r5, #4] + cmp r0, r1 + bne _0226916C + ldrh r1, [r5, #2] + add r0, r4, #0 + bl ov66_0222ECD4 + mov r0, #0 + strh r0, [r5] + pop {r3, r4, r5, pc} +_0226916C: + ldrh r1, [r5, #6] + cmp r0, r1 + beq _02269176 + mov r0, #0 + strh r0, [r5] +_02269176: + pop {r3, r4, r5, pc} + thumb_func_end ov70_02269144 + + thumb_func_start ov70_02269178 +ov70_02269178: ; 0x02269178 + ldrh r0, [r0] + cmp r0, #1 + beq _02269182 + mov r0, #1 + bx lr +_02269182: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_02269178 + + thumb_func_start ov70_02269188 +ov70_02269188: ; 0x02269188 + ldr r0, [r0, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bx lr + thumb_func_end ov70_02269188 + + .rodata + + + .global Unk_ov70_0226DCB4 +Unk_ov70_0226DCB4: ; 0x0226DCB4 + .incbin "incbin/overlay70_rodata.bin", 0x7E8, 0x7F0 - 0x7E8 + + .global Unk_ov70_0226DCBC +Unk_ov70_0226DCBC: ; 0x0226DCBC + .incbin "incbin/overlay70_rodata.bin", 0x7F0, 0x810 - 0x7F0 + + .global Unk_ov70_0226DCDC +Unk_ov70_0226DCDC: ; 0x0226DCDC + .incbin "incbin/overlay70_rodata.bin", 0x810, 0x890 - 0x810 + + .global Unk_ov70_0226DD5C +Unk_ov70_0226DD5C: ; 0x0226DD5C + .incbin "incbin/overlay70_rodata.bin", 0x890, 0x58C + diff --git a/asm/ov70_02269190.s b/asm/ov70_02269190.s new file mode 100644 index 000000000..57d9ee1cf --- /dev/null +++ b/asm/ov70_02269190.s @@ -0,0 +1,6456 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_02269190 +ov70_02269190: ; 0x02269190 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + add r7, r1, #0 + ldr r0, [sp, #0x20] + ldr r1, _022691FC ; =0x0001082C + str r2, [sp] + str r3, [sp, #4] + ldr r5, [sp, #0x24] + bl sub_02018144 + ldr r2, _022691FC ; =0x0001082C + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, [sp, #4] + str r6, [r4, #0] + str r0, [r4, #4] + ldr r0, [sp] + ldr r1, [sp, #0x20] + str r0, [r4, #8] + mov r0, #0xba + str r7, [r4, #0xc] + bl sub_02006C24 + add r6, r0, #0 + ldr r0, _02269200 ; =0x0001081C + add r1, r5, #0 + add r0, r4, r0 + mov r2, #4 + bl sub_020182CC + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov70_02269540 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov70_022695E0 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov70_0226965C + add r0, r6, #0 + bl sub_02006CA8 + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022691FC: .word 0x0001082C +_02269200: .word 0x0001081C + thumb_func_end ov70_02269190 + + thumb_func_start ov70_02269204 +ov70_02269204: ; 0x02269204 + push {r4, lr} + add r4, r0, #0 + bl ov70_022695C4 + add r0, r4, #0 + bl ov70_02269608 + add r0, r4, #0 + bl ov70_02269700 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov70_02269204 + + thumb_func_start ov70_02269220 +ov70_02269220: ; 0x02269220 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r6, #0 + mov r7, #0xd1 + mov r4, #0 + add r5, #0x10 + lsl r7, r7, #4 +_0226922E: + add r0, r6, #0 + add r1, r5, #0 + bl ov70_0226978C + add r4, r4, #1 + add r5, r5, r7 + cmp r4, #0x14 + blt _0226922E + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_02269220 + + thumb_func_start ov70_02269240 +ov70_02269240: ; 0x02269240 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #4] + bl ov70_0225CCAC + add r5, r6, #0 + mov r7, #0xd1 + mov r4, #0 + add r5, #0x10 + lsl r7, r7, #4 +_02269254: + add r0, r6, #0 + add r1, r5, #0 + bl ov70_022697C8 + add r4, r4, #1 + add r5, r5, r7 + cmp r4, #0x14 + blt _02269254 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_02269240 + + thumb_func_start ov70_02269268 +ov70_02269268: ; 0x02269268 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #0x14 + blo _02269278 + bl sub_02022974 +_02269278: + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov70_0225CC70 + add r2, r0, #0 + beq _02269296 + mov r1, #0xd1 + lsl r1, r1, #4 + add r0, r5, #0 + add r5, #0x10 + mul r1, r4 + add r1, r5, r1 + add r3, r6, #0 + bl ov70_02269738 +_02269296: + pop {r4, r5, r6, pc} + thumb_func_end ov70_02269268 + + thumb_func_start ov70_02269298 +ov70_02269298: ; 0x02269298 + push {r3, lr} + mov r2, #0xd1 + lsl r2, r2, #4 + add r0, #0x10 + mul r2, r1 + add r0, r0, r2 + bl ov70_02269800 + cmp r0, #1 + beq _022692B0 + mov r0, #1 + pop {r3, pc} +_022692B0: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov70_02269298 + + thumb_func_start ov70_022692B4 +ov70_022692B4: ; 0x022692B4 + push {r3, r4} + ldr r4, [sp, #0x14] + sub r2, r2, r1 + str r4, [r0, #0] + str r1, [r0, #4] + str r2, [r0, #0x10] + str r1, [r0, #0x14] + ldr r1, [sp, #8] + str r3, [r0, #8] + sub r1, r1, r3 + str r1, [r0, #0x18] + ldr r2, [sp, #0xc] + ldr r1, [sp, #0x10] + str r3, [r0, #0x1c] + str r2, [r0, #0xc] + sub r1, r1, r2 + str r1, [r0, #0x20] + str r2, [r0, #0x24] + pop {r3, r4} + bx lr + thumb_func_end ov70_022692B4 + + thumb_func_start ov70_022692DC +ov70_022692DC: ; 0x022692DC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + mov r7, #0 + cmp r4, r0 + ble _022692F0 + add r4, r0, #0 + mov r7, #1 +_022692F0: + ldr r6, [r5, #0x10] + cmp r6, #0 + beq _02269374 + cmp r0, #0 + ble _0226930E + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + str r0, [sp, #8] + b _0226931E +_0226930E: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C + str r0, [sp, #8] +_0226931E: + cmp r4, #0 + ble _02269334 + lsl r0, r4, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _02269342 +_02269334: + lsl r0, r4, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_02269342: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r6, r2, #0xc + orr r6, r0 + ldr r0, [sp, #8] + bl sub_020E1740 + add r1, r0, #0 + add r0, r6, #0 + bl sub_020BCFD0 + ldr r1, [r5, #0x14] + add r0, r1, r0 + str r0, [r5, #4] +_02269374: + ldr r6, [r5, #0x18] + cmp r6, #0 + beq _022693FA + ldr r0, [r5, #0] + cmp r0, #0 + ble _02269394 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + str r0, [sp, #4] + b _022693A4 +_02269394: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C + str r0, [sp, #4] +_022693A4: + cmp r4, #0 + ble _022693BA + lsl r0, r4, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _022693C8 +_022693BA: + lsl r0, r4, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_022693C8: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r6, r2, #0xc + orr r6, r0 + ldr r0, [sp, #4] + bl sub_020E1740 + add r1, r0, #0 + add r0, r6, #0 + bl sub_020BCFD0 + ldr r1, [r5, #0x1c] + add r0, r1, r0 + str r0, [r5, #8] +_022693FA: + ldr r6, [r5, #0x20] + cmp r6, #0 + beq _02269480 + ldr r0, [r5, #0] + cmp r0, #0 + ble _0226941A + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + str r0, [sp] + b _0226942A +_0226941A: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C + str r0, [sp] +_0226942A: + cmp r4, #0 + ble _02269440 + lsl r0, r4, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226944E +_02269440: + lsl r0, r4, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226944E: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r4, r2, #0xc + orr r4, r0 + ldr r0, [sp] + bl sub_020E1740 + add r1, r0, #0 + add r0, r4, #0 + bl sub_020BCFD0 + ldr r1, [r5, #0x24] + add r0, r1, r0 + str r0, [r5, #0xc] +_02269480: + add r0, r7, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_022692DC + + thumb_func_start ov70_02269488 +ov70_02269488: ; 0x02269488 + push {r3, r4} + ldr r4, [r0, #4] + str r4, [r1, #0] + ldr r1, [r0, #8] + str r1, [r2, #0] + ldr r0, [r0, #0xc] + str r0, [r3, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov70_02269488 + + thumb_func_start ov70_0226949C +ov70_0226949C: ; 0x0226949C + push {r4, lr} + add r4, r0, #0 + strh r1, [r4] + asr r0, r1, #4 + lsl r1, r0, #2 + ldr r0, _022694CC ; =0x020F983C + strh r2, [r4, #2] + ldrsh r0, [r0, r1] + add r2, r3, #0 + str r3, [r4, #4] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_022694CC: .word 0x020F983C + thumb_func_end ov70_0226949C + + thumb_func_start ov70_022694D0 +ov70_022694D0: ; 0x022694D0 + push {r4, lr} + add r4, r0, #0 + ldrh r1, [r4] + ldrh r0, [r4, #2] + add r0, r1, r0 + strh r0, [r4] + ldrh r0, [r4] + ldr r2, [r4, #4] + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _02269504 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_02269504: .word 0x020F983C + thumb_func_end ov70_022694D0 + + thumb_func_start ov70_02269508 +ov70_02269508: ; 0x02269508 + ldr r0, [r0, #8] + str r0, [r1, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov70_02269508 + + thumb_func_start ov70_02269510 +ov70_02269510: ; 0x02269510 + push {r3, r4, r5, lr} + ldr r0, [r0, #4] + ldr r4, [r1, #8] + add r5, r2, #0 + bl ov70_0225CCAC + cmp r4, r0 + bne _0226952C + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + mov r1, #5 + bl sub_02005770 + pop {r3, r4, r5, pc} +_0226952C: + add r0, r4, #0 + bl ov70_0225CE70 + cmp r0, #0 + bne _0226953E + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_0226953E: + pop {r3, r4, r5, pc} + thumb_func_end ov70_02269510 + + thumb_func_start ov70_02269540 +ov70_02269540: ; 0x02269540 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + mov r4, #0 +_0226954A: + mov r0, #0 + add r1, r4, #0 + str r0, [sp] + add r0, r6, #0 + add r1, #0x81 + mov r2, #0 + add r3, r7, #0 + bl sub_0200723C + ldr r1, _022695B4 ; =0x00010550 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + bl sub_020B3C0C + ldr r1, _022695B8 ; =0x00010554 + str r0, [r5, r1] + add r0, r1, #0 + ldr r1, [r5, r0] + cmp r1, #0 + beq _02269594 + add r0, r1, #0 + add r0, #8 + beq _02269588 + ldrb r2, [r1, #9] + cmp r2, #0 + bls _02269588 + ldrh r2, [r1, #0xe] + add r0, r0, r2 + add r0, r0, #4 + b _0226958A +_02269588: + mov r0, #0 +_0226958A: + cmp r0, #0 + beq _02269594 + ldr r0, [r0, #0] + add r1, r1, r0 + b _02269596 +_02269594: + mov r1, #0 +_02269596: + ldr r0, _022695BC ; =0x00010558 + str r1, [r5, r0] + mov r1, #0 + add r0, r0, #4 + str r1, [r5, r0] + ldr r0, _022695BC ; =0x00010558 + ldr r1, _022695C0 ; =0x00007FFF + ldr r0, [r5, r0] + bl sub_020B3624 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xf + blt _0226954A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022695B4: .word 0x00010550 +_022695B8: .word 0x00010554 +_022695BC: .word 0x00010558 +_022695C0: .word 0x00007FFF + thumb_func_end ov70_02269540 + + thumb_func_start ov70_022695C4 +ov70_022695C4: ; 0x022695C4 + push {r4, r5, r6, lr} + ldr r6, _022695DC ; =0x00010550 + add r5, r0, #0 + mov r4, #0 +_022695CC: + ldr r0, [r5, r6] + bl sub_020181C4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xf + blt _022695CC + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022695DC: .word 0x00010550 + thumb_func_end ov70_022695C4 + + thumb_func_start ov70_022695E0 +ov70_022695E0: ; 0x022695E0 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + ldr r1, _02269604 ; =0x00010640 + add r7, r2, #0 + mov r4, #0 + add r5, r0, r1 +_022695EC: + add r2, r4, #0 + add r0, r5, #0 + add r1, r6, #0 + add r2, #0x90 + add r3, r7, #0 + bl ov70_0225C730 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x27 + blt _022695EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269604: .word 0x00010640 + thumb_func_end ov70_022695E0 + + thumb_func_start ov70_02269608 +ov70_02269608: ; 0x02269608 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r7, _02269650 ; =0x02100DF0 + add r5, r0, #0 + mov r4, #0 +_02269612: + ldr r0, _02269654 ; =0x00010640 + ldr r0, [r5, r0] + bl sub_020B3C1C + add r1, sp, #4 + add r2, sp, #0 + add r6, r0, #0 + bl sub_020AE9B8 + ldr r0, [sp, #4] + ldr r1, [r7, #0] + blx r1 + ldr r0, [sp] + ldr r1, [r7, #0] + blx r1 + add r0, r6, #0 + bl sub_020AEA70 + ldr r1, _02269658 ; =0x02100DF8 + ldr r1, [r1, #0] + blx r1 + ldr r0, _02269654 ; =0x00010640 + ldr r0, [r5, r0] + bl sub_020181C4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0x27 + blt _02269612 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269650: .word 0x02100DF0 +_02269654: .word 0x00010640 +_02269658: .word 0x02100DF8 + thumb_func_end ov70_02269608 + + thumb_func_start ov70_0226965C +ov70_0226965C: ; 0x0226965C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0 + ldr r4, _022696E8 ; =0x0226E5A4 + str r1, [sp, #8] + str r2, [sp, #0xc] + str r0, [sp, #0x10] +_0226966C: + ldr r0, _022696EC ; =0x0001081C + mov r6, #0 + add r0, r5, r0 + str r0, [sp, #0x14] + ldr r0, _022696F0 ; =0x000106DC + add r0, r5, r0 + str r0, [sp, #0x18] + ldr r0, _022696F4 ; =0x00010550 + add r0, r5, r0 + str r0, [sp, #0x1c] +_02269680: + add r7, r4, r6 + ldrb r1, [r7, #2] + cmp r1, #0x11 + beq _022696D2 + mov r0, #0x14 + mul r0, r1 + add r1, r5, r0 + ldr r0, _022696F0 ; =0x000106DC + ldr r0, [r1, r0] + cmp r0, #0 + bne _022696D2 + ldrb r0, [r4, #1] + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _022696F8 ; =0x00010640 + ldr r0, [r1, r0] + bl sub_020B3C1C + ldrb r1, [r4] + lsl r1, r1, #4 + add r2, r5, r1 + ldr r1, _022696FC ; =0x0001055C + str r0, [r2, r1] + ldrb r3, [r7, #2] + ldr r0, [sp, #0xc] + str r0, [sp] + ldr r0, [sp, #0x14] + add r1, r3, #0 + str r0, [sp, #4] + mov r0, #0x14 + mul r1, r0 + ldr r0, [sp, #0x18] + add r3, #0xb7 + add r0, r0, r1 + ldrb r1, [r4] + lsl r2, r1, #4 + ldr r1, [sp, #0x1c] + add r1, r1, r2 + ldr r2, [sp, #8] + bl sub_02017164 +_022696D2: + add r6, r6, #1 + cmp r6, #2 + blt _02269680 + ldr r0, [sp, #0x10] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, #0x27 + blt _0226966C + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022696E8: .word 0x0226E5A4 +_022696EC: .word 0x0001081C +_022696F0: .word 0x000106DC +_022696F4: .word 0x00010550 +_022696F8: .word 0x00010640 +_022696FC: .word 0x0001055C + thumb_func_end ov70_0226965C + + thumb_func_start ov70_02269700 +ov70_02269700: ; 0x02269700 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _02269730 ; =0x000106DC + mov r6, #0 + add r4, r5, r0 + ldr r0, _02269734 ; =0x0001081C + add r7, r5, r0 +_0226970E: + ldr r0, _02269730 ; =0x000106DC + ldr r0, [r5, r0] + cmp r0, #0 + beq _02269724 + add r0, r4, #0 + add r1, r7, #0 + bl sub_020171A0 + ldr r0, _02269730 ; =0x000106DC + mov r1, #0 + str r1, [r5, r0] +_02269724: + add r6, r6, #1 + add r5, #0x14 + add r4, #0x14 + cmp r6, #0x10 + blt _0226970E + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02269730: .word 0x000106DC +_02269734: .word 0x0001081C + thumb_func_end ov70_02269700 + + thumb_func_start ov70_02269738 +ov70_02269738: ; 0x02269738 + push {r3, r4, r5, r6, r7, lr} + add r7, r3, #0 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r7, #0x1b + blo _0226974A + bl sub_02022974 +_0226974A: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_022697F0 + str r6, [r4, #8] + add r0, r6, #0 + mov r1, #5 + strb r7, [r4] + bl ov70_0225CD60 + add r0, #0x28 + str r0, [r4, #4] + ldrb r2, [r4] + add r0, r5, #0 + add r1, r4, #0 + lsl r3, r2, #2 + ldr r2, _02269784 ; =0x0226E43C + ldr r2, [r2, r3] + blx r2 + ldrb r2, [r4] + add r0, r5, #0 + add r1, r4, #0 + lsl r3, r2, #2 + ldr r2, _02269788 ; =0x0226E4A8 + ldr r2, [r2, r3] + bl ov70_02269510 + pop {r3, r4, r5, r6, r7, pc} + nop +_02269784: .word 0x0226E43C +_02269788: .word 0x0226E4A8 + thumb_func_end ov70_02269738 + + thumb_func_start ov70_0226978C +ov70_0226978C: ; 0x0226978C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_02269800 + cmp r0, #0 + beq _022697C0 + ldrb r0, [r4] + cmp r0, #0x1b + blo _022697A6 + bl sub_02022974 +_022697A6: + ldrb r2, [r4] + add r0, r5, #0 + add r1, r4, #0 + lsl r3, r2, #2 + ldr r2, _022697C4 ; =0x0226E3D0 + ldr r2, [r2, r3] + blx r2 + cmp r0, #1 + bne _022697C0 + add r0, r5, #0 + add r1, r4, #0 + bl ov70_022697F0 +_022697C0: + pop {r3, r4, r5, pc} + nop +_022697C4: .word 0x0226E3D0 + thumb_func_end ov70_0226978C + + thumb_func_start ov70_022697C8 +ov70_022697C8: ; 0x022697C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov70_02269800 + cmp r0, #0 + bne _022697DC + mov r0, #0 + pop {r3, r4, r5, pc} +_022697DC: + ldrb r0, [r4] + cmp r0, #0x1b + blo _022697E6 + bl sub_02022974 +_022697E6: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226A998 + pop {r3, r4, r5, pc} + thumb_func_end ov70_022697C8 + + thumb_func_start ov70_022697F0 +ov70_022697F0: ; 0x022697F0 + ldr r3, _022697FC ; =sub_020D5124 + mov r2, #0xd1 + add r0, r1, #0 + mov r1, #0 + lsl r2, r2, #4 + bx r3 + ; .align 2, 0 +_022697FC: .word sub_020D5124 + thumb_func_end ov70_022697F0 + + thumb_func_start ov70_02269800 +ov70_02269800: ; 0x02269800 + ldr r0, [r0, #8] + cmp r0, #0 + beq _0226980A + mov r0, #1 + bx lr +_0226980A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_02269800 + + thumb_func_start ov70_02269810 +ov70_02269810: ; 0x02269810 + lsl r1, r1, #2 + add r1, r0, r1 + ldr r0, _02269824 ; =0x0000087C + ldr r0, [r1, r0] + cmp r0, #0 + beq _02269820 + mov r0, #1 + bx lr +_02269820: + mov r0, #0 + bx lr + ; .align 2, 0 +_02269824: .word 0x0000087C + thumb_func_end ov70_02269810 + + thumb_func_start ov70_02269828 +ov70_02269828: ; 0x02269828 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + str r0, [sp] + add r5, r1, #0 + add r6, r3, #0 + cmp r4, #0x12 + blo _0226983C + bl sub_02022974 +_0226983C: + ldr r0, _02269870 ; =0x0000087C + add r7, r5, r0 + lsl r0, r4, #2 + str r0, [sp, #4] + ldr r0, [r7, r0] + cmp r0, #0 + beq _0226984E + bl sub_02022974 +_0226984E: + ldr r0, [sp, #4] + ldr r2, _02269874 ; =0x00010550 + ldr r1, [sp] + str r6, [r7, r0] + add r2, r1, r2 + ldrb r1, [r6] + mov r0, #0x78 + add r5, #0xc + mul r0, r4 + lsl r1, r1, #4 + add r0, r5, r0 + add r1, r2, r1 + bl sub_02017258 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02269870: .word 0x0000087C +_02269874: .word 0x00010550 + thumb_func_end ov70_02269828 + + thumb_func_start ov70_02269878 +ov70_02269878: ; 0x02269878 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r2, #0 + str r0, [sp] + lsl r7, r5, #2 + add r0, r1, #0 + str r1, [sp, #4] + add r1, r0, r7 + ldr r0, _022699AC ; =0x0000087C + ldr r0, [r1, r0] + cmp r0, #0 + bne _02269894 + bl sub_02022974 +_02269894: + mov r0, #0x78 + add r6, r5, #0 + mul r6, r0 + ldr r0, [sp, #4] + add r0, #0xc + add r0, r0, r6 + bl sub_0201734C + cmp r0, #0 + beq _022699A6 + ldr r0, [sp, #4] + add r1, r0, r7 + ldr r0, _022699AC ; =0x0000087C + ldr r2, [r1, r0] + ldr r0, _022699B0 ; =0x00010550 + ldrb r3, [r2] + ldr r1, [sp] + add r1, r1, r0 + lsl r3, r3, #4 + add r1, r1, r3 + str r1, [sp, #0xc] + ldrb r1, [r2, #1] + add r0, #0xf0 + lsl r2, r1, #2 + ldr r1, [sp] + add r1, r1, r2 + ldr r0, [r1, r0] + bl sub_020B3C1C + ldr r1, [sp, #0xc] + mov r2, #0 + str r0, [r1, #0xc] + add r0, r1, #0 + ldr r0, [r0, #8] + ldr r1, [r1, #0xc] + add r3, r2, #0 + bl sub_020AED78 + cmp r0, #0 + bne _022698E8 + bl sub_02022974 +_022698E8: + ldr r0, [sp, #0xc] + ldr r1, [sp, #0xc] + mov r2, #0 + ldr r0, [r0, #8] + ldr r1, [r1, #0xc] + add r3, r2, #0 + bl sub_020AF09C + cmp r0, #0 + bne _02269900 + bl sub_02022974 +_02269900: + ldr r0, [sp, #4] + lsl r1, r5, #3 + add r5, r0, r1 + add r0, r0, r7 + str r0, [sp, #8] + ldr r0, [sp, #4] + ldr r1, _022699B4 ; =0x000106DC + str r0, [sp, #0x10] + add r0, #0xc + str r0, [sp, #0x10] + ldr r0, [sp] + mov r4, #0 + add r7, r0, r1 +_0226991A: + ldr r1, [sp, #8] + ldr r0, _022699AC ; =0x0000087C + ldr r0, [r1, r0] + add r0, r0, r4 + ldrb r1, [r0, #2] + cmp r1, #0x11 + beq _0226994E + mov r0, #0x14 + mul r0, r1 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x14] + add r0, r0, r6 + add r1, r7, r1 + bl sub_0201727C + ldr r1, _022699B8 ; =0x000008C4 + ldr r0, [sp, #0x14] + ldr r1, [r5, r1] + add r0, r7, r0 + bl sub_02017240 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0226991A +_0226994E: + ldr r0, [sp, #0xc] + ldr r1, [sp, #4] + ldr r0, [r0, #8] + ldr r1, [r1, #4] + bl sub_020B3724 + ldr r0, [sp, #4] + add r0, #0xc + str r0, [sp, #4] + add r0, r0, r6 + bl sub_02017294 + ldr r1, _022699B4 ; =0x000106DC + ldr r0, [sp] + ldr r7, _022699AC ; =0x0000087C + mov r4, #0 + add r5, r0, r1 +_02269970: + ldr r0, [sp, #8] + ldr r0, [r0, r7] + add r0, r0, r4 + ldrb r1, [r0, #2] + cmp r1, #0x11 + beq _02269990 + ldr r0, [sp, #4] + mov r2, #0x14 + mul r2, r1 + add r0, r0, r6 + add r1, r5, r2 + bl sub_02017288 + add r4, r4, #1 + cmp r4, #2 + blt _02269970 +_02269990: + ldr r0, [sp, #0xc] + ldr r0, [r0, #8] + bl sub_020AEE28 + ldr r0, [sp, #0xc] + ldr r0, [r0, #8] + bl sub_020AF164 + ldr r0, [sp, #0xc] + mov r1, #0 + str r1, [r0, #0xc] +_022699A6: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_022699AC: .word 0x0000087C +_022699B0: .word 0x00010550 +_022699B4: .word 0x000106DC +_022699B8: .word 0x000008C4 + thumb_func_end ov70_02269878 + + thumb_func_start ov70_022699BC +ov70_022699BC: ; 0x022699BC + push {r3, r4, lr} + sub sp, #4 + mov r4, #2 + lsl r4, r4, #0xc + str r4, [sp] + bl ov70_022699E4 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_022699BC + + thumb_func_start ov70_022699D0 +ov70_022699D0: ; 0x022699D0 + push {r3, r4, lr} + sub sp, #4 + mov r4, #2 + lsl r4, r4, #0xc + str r4, [sp] + bl ov70_02269A3C + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov70_022699D0 + + thumb_func_start ov70_022699E4 +ov70_022699E4: ; 0x022699E4 + push {r4, r5, r6, lr} + add r4, r1, #0 + ldr r1, _02269A30 ; =0x000106DC + add r6, r2, #0 + add r0, r0, r1 + lsl r1, r6, #2 + add r2, r4, r1 + ldr r1, _02269A34 ; =0x0000087C + add r5, r3, #0 + ldr r1, [r2, r1] + add r1, r1, r5 + ldrb r2, [r1, #2] + mov r1, #0x14 + mul r1, r2 + add r0, r0, r1 + bl sub_0201724C + add r1, r0, #0 + ldr r0, _02269A38 ; =0x000008C4 + lsl r2, r6, #3 + add r0, r4, r0 + add r4, r0, r2 + lsl r5, r5, #2 + ldr r2, [r4, r5] + ldr r0, [sp, #0x10] + add r0, r0, r2 + cmp r0, r1 + bge _02269A20 + str r0, [r4, r5] + pop {r4, r5, r6, pc} +_02269A20: + mov r0, #2 + lsl r0, r0, #0xc + add r0, r2, r0 + bl sub_020E1F6C + str r1, [r4, r5] + pop {r4, r5, r6, pc} + nop +_02269A30: .word 0x000106DC +_02269A34: .word 0x0000087C +_02269A38: .word 0x000008C4 + thumb_func_end ov70_022699E4 + + thumb_func_start ov70_02269A3C +ov70_02269A3C: ; 0x02269A3C + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _02269A84 ; =0x000106DC + add r4, r2, #0 + add r0, r0, r1 + lsl r1, r4, #2 + add r2, r5, r1 + ldr r1, _02269A88 ; =0x0000087C + add r6, r3, #0 + ldr r1, [r2, r1] + add r1, r1, r6 + ldrb r2, [r1, #2] + mov r1, #0x14 + mul r1, r2 + add r0, r0, r1 + bl sub_0201724C + ldr r3, _02269A8C ; =0x000008C4 + lsl r1, r4, #3 + add r2, r5, r3 + add r2, r2, r1 + lsl r1, r6, #2 + ldr r5, [sp, #0x10] + ldr r4, [r2, r1] + add r4, r5, r4 + cmp r4, r0 + bge _02269A78 + str r4, [r2, r1] + mov r0, #0 + pop {r4, r5, r6, pc} +_02269A78: + sub r3, #0xc4 + sub r0, r0, r3 + str r0, [r2, r1] + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_02269A84: .word 0x000106DC +_02269A88: .word 0x0000087C +_02269A8C: .word 0x000008C4 + thumb_func_end ov70_02269A3C + + thumb_func_start ov70_02269A90 +ov70_02269A90: ; 0x02269A90 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r1, _02269ADC ; =0x000106DC + add r4, r2, #0 + add r0, r0, r1 + lsl r1, r4, #2 + add r2, r5, r1 + ldr r1, _02269AE0 ; =0x0000087C + add r6, r3, #0 + ldr r1, [r2, r1] + add r1, r1, r6 + ldrb r2, [r1, #2] + mov r1, #0x14 + mul r1, r2 + add r0, r0, r1 + bl sub_0201724C + ldr r1, [sp, #0x10] + cmp r0, r1 + bge _02269ACC + mov r1, #2 + lsl r2, r4, #3 + lsl r1, r1, #0xa + add r3, r5, r2 + lsl r2, r6, #2 + sub r0, r0, r1 + add r2, r3, r2 + add r1, #0xc4 + str r0, [r2, r1] + pop {r4, r5, r6, pc} +_02269ACC: + lsl r0, r4, #3 + add r2, r5, r0 + lsl r0, r6, #2 + add r2, r2, r0 + ldr r0, _02269AE4 ; =0x000008C4 + str r1, [r2, r0] + pop {r4, r5, r6, pc} + nop +_02269ADC: .word 0x000106DC +_02269AE0: .word 0x0000087C +_02269AE4: .word 0x000008C4 + thumb_func_end ov70_02269A90 + + thumb_func_start ov70_02269AE8 +ov70_02269AE8: ; 0x02269AE8 + push {r4, lr} + lsl r2, r2, #2 + add r2, r1, r2 + ldr r1, _02269B08 ; =0x0000087C + ldr r4, _02269B0C ; =0x000106DC + ldr r1, [r2, r1] + add r0, r0, r4 + add r1, r1, r3 + ldrb r2, [r1, #2] + mov r1, #0x14 + mul r1, r2 + add r0, r0, r1 + bl sub_02017248 + pop {r4, pc} + nop +_02269B08: .word 0x0000087C +_02269B0C: .word 0x000106DC + thumb_func_end ov70_02269AE8 + + thumb_func_start ov70_02269B10 +ov70_02269B10: ; 0x02269B10 + ldr r3, _02269B18 ; =ov70_0226B92C + mov r2, #1 + bx r3 + nop +_02269B18: .word ov70_0226B92C + thumb_func_end ov70_02269B10 + + thumb_func_start ov70_02269B1C +ov70_02269B1C: ; 0x02269B1C + ldr r3, _02269B24 ; =ov70_0226B92C + mov r2, #2 + bx r3 + nop +_02269B24: .word ov70_0226B92C + thumb_func_end ov70_02269B1C + + thumb_func_start ov70_02269B28 +ov70_02269B28: ; 0x02269B28 + ldr r3, _02269B30 ; =ov70_0226B92C + mov r2, #3 + bx r3 + nop +_02269B30: .word ov70_0226B92C + thumb_func_end ov70_02269B28 + + thumb_func_start ov70_02269B34 +ov70_02269B34: ; 0x02269B34 + ldr r3, _02269B3C ; =ov70_0226BAC8 + mov r2, #1 + bx r3 + nop +_02269B3C: .word ov70_0226BAC8 + thumb_func_end ov70_02269B34 + + thumb_func_start ov70_02269B40 +ov70_02269B40: ; 0x02269B40 + ldr r3, _02269B48 ; =ov70_0226BAC8 + mov r2, #2 + bx r3 + nop +_02269B48: .word ov70_0226BAC8 + thumb_func_end ov70_02269B40 + + thumb_func_start ov70_02269B4C +ov70_02269B4C: ; 0x02269B4C + ldr r3, _02269B54 ; =ov70_0226BAC8 + mov r2, #3 + bx r3 + nop +_02269B54: .word ov70_0226BAC8 + thumb_func_end ov70_02269B4C + + thumb_func_start ov70_02269B58 +ov70_02269B58: ; 0x02269B58 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r1, #0 + add r5, r7, #0 + str r0, [sp] + mov r4, #0 + add r5, #0xc +_02269B66: + add r3, r4, #3 + lsl r6, r3, #2 + ldr r3, _02269BB0 ; =0x0226E5A4 + ldr r0, [sp] + add r1, r7, #0 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + ldr r0, [r7, #8] + add r1, sp, #4 + bl ov70_0225D054 + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r2, r1, r0 + ldr r1, [sp, #4] + ldr r3, [sp, #0xc] + add r0, r5, #0 + str r2, [sp, #8] + bl sub_02017350 + add r0, r5, #0 + mov r1, #0 + bl sub_02017348 + add r4, r4, #1 + add r5, #0x78 + cmp r4, #3 + blt _02269B66 + ldr r0, _02269BB4 ; =0x00000954 + mov r1, #0xff + str r1, [r7, r0] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_02269BB0: .word 0x0226E5A4 +_02269BB4: .word 0x00000954 + thumb_func_end ov70_02269B58 + + thumb_func_start ov70_02269BB8 +ov70_02269BB8: ; 0x02269BB8 + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _02269CE8 ; =0x0226E5C8 + mov r2, #1 + add r5, r0, #0 + add r4, r1, #0 + bl ov70_02269828 + ldr r3, _02269CEC ; =0x0226E5D4 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_02269828 + add r0, r4, #0 + add r0, #0x84 + mov r1, #0 + bl sub_02017348 + ldr r0, [r4, #8] + add r1, sp, #0xc + bl ov70_0225D054 + mov r2, #1 + ldr r0, [sp, #0x10] + lsl r2, r2, #0x10 + add r0, r0, r2 + str r0, [sp, #0x10] + ldr r1, [sp, #0xc] + lsr r0, r2, #1 + add r0, r1, r0 + add r5, sp, #0xc + str r0, [sp, #0xc] + ldmia r5!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #8 + str r0, [r3, #0] + ldr r0, [sp, #4] + add r0, r0, r2 + str r0, [sp, #4] + ldr r0, _02269CF0 ; =0x00000958 + str r1, [r4, r0] + ldr r0, [r4, #8] + mov r1, #6 + bl ov70_0225CD60 + cmp r0, #3 + bhi _02269CC8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02269C28: ; jump table + .short _02269C30 - _02269C28 - 2 ; case 0 + .short _02269C50 - _02269C28 - 2 ; case 1 + .short _02269C72 - _02269C28 - 2 ; case 2 + .short _02269C9E - _02269C28 - 2 ; case 3 +_02269C30: + mov r0, #7 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + sub r1, r1, r0 + str r1, [sp, #0x14] + ldr r1, [sp, #8] + lsr r0, r0, #1 + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _02269CF4 ; =0x0000BFFF + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + b _02269CC8 +_02269C50: + mov r0, #6 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x14] + mov r0, #0xb + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _02269CF8 ; =0x00003FFF + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + b _02269CC8 +_02269C72: + mov r0, #0x17 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp] + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x84 + mov r1, #0 + mov r2, #1 + bl sub_02017388 + b _02269CC8 +_02269C9E: + mov r0, #0x17 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [sp] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + mov r1, #2 + ldr r0, [sp, #8] + lsl r1, r1, #0xe + add r0, r0, r1 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x84 + sub r1, r1, #1 + mov r2, #1 + bl sub_02017388 +_02269CC8: + add r0, r4, #0 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0x84 + bl sub_02017350 + add r4, #0xc + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl sub_02017350 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02269CE8: .word 0x0226E5C8 +_02269CEC: .word 0x0226E5D4 +_02269CF0: .word 0x00000958 +_02269CF4: .word 0x0000BFFF +_02269CF8: .word 0x00003FFF + thumb_func_end ov70_02269BB8 + + thumb_func_start ov70_02269CFC +ov70_02269CFC: ; 0x02269CFC + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _02269F00 ; =0x0226E5C8 + mov r2, #1 + add r5, r0, #0 + add r4, r1, #0 + bl ov70_02269828 + ldr r3, _02269F04 ; =0x0226E5D4 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_02269828 + ldr r3, _02269F08 ; =0x0226E5CC + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov70_02269828 + add r0, r4, #0 + add r0, #0x84 + mov r1, #0 + bl sub_02017348 + ldr r0, [r4, #8] + add r1, sp, #0xc + bl ov70_0225D054 + mov r2, #1 + ldr r0, [sp, #0x10] + lsl r2, r2, #0x10 + add r0, r0, r2 + str r0, [sp, #0x10] + ldr r1, [sp, #0xc] + lsr r0, r2, #1 + add r0, r1, r0 + add r5, sp, #0xc + str r0, [sp, #0xc] + ldmia r5!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #8 + str r0, [r3, #0] + ldr r0, [sp, #4] + add r0, r0, r2 + str r0, [sp, #4] + ldr r0, _02269F0C ; =0x00000958 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] + ldr r0, [r4, #8] + mov r1, #6 + bl ov70_0225CD60 + cmp r0, #3 + bls _02269D72 + b _02269EEE +_02269D72: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02269D7E: ; jump table + .short _02269D86 - _02269D7E - 2 ; case 0 + .short _02269DDA - _02269D7E - 2 ; case 1 + .short _02269E30 - _02269D7E - 2 ; case 2 + .short _02269E90 - _02269D7E - 2 ; case 3 +_02269D86: + mov r0, #7 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + sub r1, r1, r0 + str r1, [sp, #0x14] + ldr r1, [sp, #8] + lsr r0, r0, #1 + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _02269F10 ; =0x0000A38D + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _02269F14 ; =0x0000DC70 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + add r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0x84 + bl sub_02017350 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + sub r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0xfc + bl sub_02017350 + b _02269EEE +_02269DDA: + mov r0, #6 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x14] + mov r0, #0xb + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _02269F18 ; =0x0000238E + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _02269F1C ; =0x00005C71 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + sub r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0x84 + bl sub_02017350 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + add r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0xfc + bl sub_02017350 + b _02269EEE +_02269E30: + mov r0, #0x17 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp] + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _02269F20 ; =0x0000E38F + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _02269F24 ; =0x00001C71 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0x84 + sub r3, r5, r3 + bl sub_02017350 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0xfc + add r3, r5, r3 + bl sub_02017350 + b _02269EEE +_02269E90: + mov r0, #0x17 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [sp] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _02269F28 ; =0x0000638D + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _02269F2C ; =0x00009C71 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0x84 + add r3, r5, r3 + bl sub_02017350 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0xfc + sub r3, r5, r3 + bl sub_02017350 +_02269EEE: + add r4, #0xc + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl sub_02017350 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02269F00: .word 0x0226E5C8 +_02269F04: .word 0x0226E5D4 +_02269F08: .word 0x0226E5CC +_02269F0C: .word 0x00000958 +_02269F10: .word 0x0000A38D +_02269F14: .word 0x0000DC70 +_02269F18: .word 0x0000238E +_02269F1C: .word 0x00005C71 +_02269F20: .word 0x0000E38F +_02269F24: .word 0x00001C71 +_02269F28: .word 0x0000638D +_02269F2C: .word 0x00009C71 + thumb_func_end ov70_02269CFC + + thumb_func_start ov70_02269F30 +ov70_02269F30: ; 0x02269F30 + push {r3, r4, r5, lr} + sub sp, #0x18 + ldr r3, _0226A1BC ; =0x0226E5C8 + mov r2, #1 + add r5, r0, #0 + add r4, r1, #0 + bl ov70_02269828 + ldr r3, _0226A1C0 ; =0x0226E5D4 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_02269828 + ldr r3, _0226A1C4 ; =0x0226E5CC + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov70_02269828 + ldr r3, _0226A1C8 ; =0x0226E5D0 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #3 + bl ov70_02269828 + add r0, r4, #0 + add r0, #0x84 + mov r1, #0 + bl sub_02017348 + ldr r1, _0226A1CC ; =0x00000958 + mov r2, #8 + str r2, [r4, r1] + add r0, r1, #4 + str r2, [r4, r0] + add r1, #8 + str r2, [r4, r1] + ldr r0, [r4, #8] + add r1, sp, #0xc + bl ov70_0225D054 + mov r2, #1 + ldr r0, [sp, #0x10] + lsl r2, r2, #0x10 + add r0, r0, r2 + str r0, [sp, #0x10] + ldr r1, [sp, #0xc] + lsr r0, r2, #1 + add r0, r1, r0 + add r5, sp, #0xc + str r0, [sp, #0xc] + ldmia r5!, {r0, r1} + add r3, sp, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #6 + str r0, [r3, #0] + ldr r0, [sp, #4] + add r0, r0, r2 + str r0, [sp, #4] + ldr r0, [r4, #8] + bl ov70_0225CD60 + cmp r0, #3 + bls _02269FB6 + b _0226A1AA +_02269FB6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02269FC2: ; jump table + .short _02269FCA - _02269FC2 - 2 ; case 0 + .short _0226A03C - _02269FC2 - 2 ; case 1 + .short _0226A0B0 - _02269FC2 - 2 ; case 2 + .short _0226A12E - _02269FC2 - 2 ; case 3 +_02269FCA: + mov r0, #7 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + sub r1, r1, r0 + str r1, [sp, #0x14] + ldr r1, [sp, #8] + lsr r0, r0, #1 + sub r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _0226A1D0 ; =0x0000A38D + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _0226A1D4 ; =0x0000DC70 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, _0226A1D8 ; =0x0000BFFF + add r0, r4, r0 + mov r2, #1 + bl sub_02017388 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + add r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0x84 + bl sub_02017350 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + sub r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0xfc + bl sub_02017350 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, r4, r0 + bl sub_02017350 + b _0226A1AA +_0226A03C: + mov r0, #6 + ldr r1, [sp, #0x14] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0x14] + mov r0, #0xb + ldr r1, [sp, #8] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _0226A1DC ; =0x0000238E + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _0226A1E0 ; =0x00005C71 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, _0226A1E4 ; =0x00003FFF + add r0, r4, r0 + mov r2, #1 + bl sub_02017388 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + sub r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0x84 + bl sub_02017350 + mov r1, #2 + add r0, r4, #0 + ldr r2, [sp, #0xc] + lsl r1, r1, #0xe + add r1, r2, r1 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, #0xfc + bl sub_02017350 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, r4, r0 + bl sub_02017350 + b _0226A1AA +_0226A0B0: + mov r0, #0x17 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp] + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _0226A1E8 ; =0x0000E38F + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _0226A1EC ; =0x00001C71 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r0, #0x5d + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + mov r2, #1 + bl sub_02017388 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0x84 + sub r3, r5, r3 + bl sub_02017350 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0xfc + add r3, r5, r3 + bl sub_02017350 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, r4, r0 + bl sub_02017350 + b _0226A1AA +_0226A12E: + mov r0, #0x17 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #0xc] + mov r0, #7 + ldr r1, [sp] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + mov r0, #2 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #8] + add r0, r4, #0 + ldr r1, _0226A1F0 ; =0x0000638D + add r0, #0x84 + mov r2, #1 + bl sub_02017388 + add r0, r4, #0 + ldr r1, _0226A1F4 ; =0x00009C71 + add r0, #0xfc + mov r2, #1 + bl sub_02017388 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, _0226A1F8 ; =0x00007FFF + add r0, r4, r0 + mov r2, #1 + bl sub_02017388 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0x84 + add r3, r5, r3 + bl sub_02017350 + mov r3, #2 + add r0, r4, #0 + ldr r5, [sp, #0x14] + lsl r3, r3, #0xe + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + add r0, #0xfc + sub r3, r5, r3 + bl sub_02017350 + mov r0, #0x5d + lsl r0, r0, #2 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + add r0, r4, r0 + bl sub_02017350 +_0226A1AA: + add r4, #0xc + ldr r1, [sp] + ldr r2, [sp, #4] + ldr r3, [sp, #8] + add r0, r4, #0 + bl sub_02017350 + add sp, #0x18 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0226A1BC: .word 0x0226E5C8 +_0226A1C0: .word 0x0226E5D4 +_0226A1C4: .word 0x0226E5CC +_0226A1C8: .word 0x0226E5D0 +_0226A1CC: .word 0x00000958 +_0226A1D0: .word 0x0000A38D +_0226A1D4: .word 0x0000DC70 +_0226A1D8: .word 0x0000BFFF +_0226A1DC: .word 0x0000238E +_0226A1E0: .word 0x00005C71 +_0226A1E4: .word 0x00003FFF +_0226A1E8: .word 0x0000E38F +_0226A1EC: .word 0x00001C71 +_0226A1F0: .word 0x0000638D +_0226A1F4: .word 0x00009C71 +_0226A1F8: .word 0x00007FFF + thumb_func_end ov70_02269F30 + + thumb_func_start ov70_0226A1FC +ov70_0226A1FC: ; 0x0226A1FC + ldr r3, _0226A204 ; =ov70_0226A9D0 + mov r2, #1 + bx r3 + nop +_0226A204: .word ov70_0226A9D0 + thumb_func_end ov70_0226A1FC + + thumb_func_start ov70_0226A208 +ov70_0226A208: ; 0x0226A208 + ldr r3, _0226A210 ; =ov70_0226A9D0 + mov r2, #2 + bx r3 + nop +_0226A210: .word ov70_0226A9D0 + thumb_func_end ov70_0226A208 + + thumb_func_start ov70_0226A214 +ov70_0226A214: ; 0x0226A214 + ldr r3, _0226A21C ; =ov70_0226A9D0 + mov r2, #3 + bx r3 + nop +_0226A21C: .word ov70_0226A9D0 + thumb_func_end ov70_0226A214 + + thumb_func_start ov70_0226A220 +ov70_0226A220: ; 0x0226A220 + ldr r3, _0226A228 ; =ov70_0226B7B0 + mov r2, #1 + bx r3 + nop +_0226A228: .word ov70_0226B7B0 + thumb_func_end ov70_0226A220 + + thumb_func_start ov70_0226A22C +ov70_0226A22C: ; 0x0226A22C + ldr r3, _0226A234 ; =ov70_0226B7B0 + mov r2, #2 + bx r3 + nop +_0226A234: .word ov70_0226B7B0 + thumb_func_end ov70_0226A22C + + thumb_func_start ov70_0226A238 +ov70_0226A238: ; 0x0226A238 + ldr r3, _0226A240 ; =ov70_0226B7B0 + mov r2, #4 + bx r3 + nop +_0226A240: .word ov70_0226B7B0 + thumb_func_end ov70_0226A238 + + thumb_func_start ov70_0226A244 +ov70_0226A244: ; 0x0226A244 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A284 ; =0x0226E640 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A250: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A288 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A250 + mov r0, #0 + str r0, [sp] + ldr r0, _0226A28C ; =0x00000954 + ldr r1, _0226A290 ; =0x0226E2EC + add r0, r7, r0 + mov r2, #2 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A284: .word 0x0226E640 +_0226A288: .word 0x0226E5A4 +_0226A28C: .word 0x00000954 +_0226A290: .word 0x0226E2EC + thumb_func_end ov70_0226A244 + + thumb_func_start ov70_0226A294 +ov70_0226A294: ; 0x0226A294 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A2D4 ; =0x0226E650 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A2A0: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A2D8 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A2A0 + mov r0, #0 + str r0, [sp] + ldr r0, _0226A2DC ; =0x00000954 + ldr r1, _0226A2E0 ; =0x0226E304 + add r0, r7, r0 + mov r2, #2 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A2D4: .word 0x0226E650 +_0226A2D8: .word 0x0226E5A4 +_0226A2DC: .word 0x00000954 +_0226A2E0: .word 0x0226E304 + thumb_func_end ov70_0226A294 + + thumb_func_start ov70_0226A2E4 +ov70_0226A2E4: ; 0x0226A2E4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A324 ; =0x0226E660 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A2F0: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A328 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A2F0 + mov r0, #0 + str r0, [sp] + ldr r0, _0226A32C ; =0x00000954 + ldr r1, _0226A330 ; =0x0226E34C + add r0, r7, r0 + mov r2, #3 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A324: .word 0x0226E660 +_0226A328: .word 0x0226E5A4 +_0226A32C: .word 0x00000954 +_0226A330: .word 0x0226E34C + thumb_func_end ov70_0226A2E4 + + thumb_func_start ov70_0226A334 +ov70_0226A334: ; 0x0226A334 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A374 ; =0x0226E640 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A340: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A378 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A340 + mov r0, #1 + str r0, [sp] + ldr r0, _0226A37C ; =0x00000954 + ldr r1, _0226A380 ; =0x0226E2FC + add r0, r7, r0 + mov r2, #2 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A374: .word 0x0226E640 +_0226A378: .word 0x0226E5A4 +_0226A37C: .word 0x00000954 +_0226A380: .word 0x0226E2FC + thumb_func_end ov70_0226A334 + + thumb_func_start ov70_0226A384 +ov70_0226A384: ; 0x0226A384 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A3C4 ; =0x0226E650 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A390: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A3C8 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A390 + mov r0, #1 + str r0, [sp] + ldr r0, _0226A3CC ; =0x00000954 + ldr r1, _0226A3D0 ; =0x0226E334 + add r0, r7, r0 + mov r2, #3 + mov r3, #0x29 + str r7, [sp, #4] + bl ov70_0226BC40 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A3C4: .word 0x0226E650 +_0226A3C8: .word 0x0226E5A4 +_0226A3CC: .word 0x00000954 +_0226A3D0: .word 0x0226E334 + thumb_func_end ov70_0226A384 + + thumb_func_start ov70_0226A3D4 +ov70_0226A3D4: ; 0x0226A3D4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A414 ; =0x0226E660 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A3E0: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A418 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A3E0 + mov r0, #1 + str r0, [sp] + ldr r0, _0226A41C ; =0x00000954 + ldr r1, _0226A420 ; =0x0226E358 + add r0, r7, r0 + mov r2, #3 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A414: .word 0x0226E660 +_0226A418: .word 0x0226E5A4 +_0226A41C: .word 0x00000954 +_0226A420: .word 0x0226E358 + thumb_func_end ov70_0226A3D4 + + thumb_func_start ov70_0226A424 +ov70_0226A424: ; 0x0226A424 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A468 ; =0x0226E640 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A430: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A46C ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A430 + ldr r0, _0226A470 ; =0x00000954 + mov r2, #2 + str r2, [sp] + ldr r1, _0226A474 ; =0x0226E314 + add r0, r7, r0 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + ldr r0, [sp, #8] + add r1, r7, #0 + bl ov70_0226BB34 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A468: .word 0x0226E640 +_0226A46C: .word 0x0226E5A4 +_0226A470: .word 0x00000954 +_0226A474: .word 0x0226E314 + thumb_func_end ov70_0226A424 + + thumb_func_start ov70_0226A478 +ov70_0226A478: ; 0x0226A478 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A4BC ; =0x0226E650 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A484: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A4C0 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A484 + ldr r0, _0226A4C4 ; =0x00000954 + mov r2, #2 + str r2, [sp] + ldr r1, _0226A4C8 ; =0x0226E2F4 + add r0, r7, r0 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + ldr r0, [sp, #8] + add r1, r7, #0 + bl ov70_0226BB34 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A4BC: .word 0x0226E650 +_0226A4C0: .word 0x0226E5A4 +_0226A4C4: .word 0x00000954 +_0226A4C8: .word 0x0226E2F4 + thumb_func_end ov70_0226A478 + + thumb_func_start ov70_0226A4CC +ov70_0226A4CC: ; 0x0226A4CC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r5, _0226A510 ; =0x0226E660 + str r0, [sp, #8] + add r7, r1, #0 + mov r4, #0 +_0226A4D8: + ldrb r3, [r5] + ldr r0, [sp, #8] + add r1, r7, #0 + lsl r6, r3, #2 + ldr r3, _0226A514 ; =0x0226E5A4 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + add r4, r4, #1 + add r5, r5, #1 + cmp r4, #0x10 + blt _0226A4D8 + ldr r0, _0226A518 ; =0x00000954 + mov r2, #2 + str r2, [sp] + ldr r1, _0226A51C ; =0x0226E30C + add r0, r7, r0 + mov r3, #0x21 + str r7, [sp, #4] + bl ov70_0226BC40 + ldr r0, [sp, #8] + add r1, r7, #0 + bl ov70_0226BB34 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226A510: .word 0x0226E660 +_0226A514: .word 0x0226E5A4 +_0226A518: .word 0x00000954 +_0226A51C: .word 0x0226E30C + thumb_func_end ov70_0226A4CC + + thumb_func_start ov70_0226A520 +ov70_0226A520: ; 0x0226A520 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #4] + add r5, r1, #0 + mov r0, #2 + ldrsh r0, [r5, r0] + add r0, r0, #1 + cmp r0, #0x36 + bgt _0226A534 + strh r0, [r5, #2] +_0226A534: + mov r0, #2 + ldrsh r1, [r5, r0] + mov r0, #6 + mul r0, r1 + mov r1, #0x36 + bl sub_020E1F6C + add r6, r0, #0 + ldr r0, _0226A5E8 ; =0x00000955 + ldrsb r4, [r5, r0] + cmp r4, r6 + bhs _0226A572 + add r7, r5, #0 + add r7, #0xc +_0226A550: + add r0, r4, #0 + mov r1, #3 + bl sub_020E1F6C + ldr r0, _0226A5EC ; =0x00000954 + ldrsb r0, [r5, r0] + cmp r1, r0 + bhs _0226A56C + mov r0, #0x78 + mul r0, r1 + add r0, r7, r0 + mov r1, #1 + bl sub_02017348 +_0226A56C: + add r4, r4, #1 + cmp r4, r6 + blo _0226A550 +_0226A572: + ldr r1, _0226A5E8 ; =0x00000955 + mov r0, #1 + str r0, [sp, #8] + strb r6, [r5, r1] + sub r0, r1, #1 + ldrsb r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + ble _0226A5CC + add r7, r5, #0 + add r7, #0xc + add r6, r7, #0 +_0226A58A: + add r0, r7, #0 + bl sub_0201734C + cmp r0, #1 + bne _0226A5BE + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov70_022699D0 + str r0, [sp, #8] + cmp r0, #0 + beq _0226A5BE + add r0, r6, #0 + mov r1, #0 + bl sub_02017348 + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov70_02269A90 +_0226A5BE: + ldr r0, _0226A5EC ; =0x00000954 + add r4, r4, #1 + ldrsb r0, [r5, r0] + add r7, #0x78 + add r6, #0x78 + cmp r4, r0 + blt _0226A58A +_0226A5CC: + ldr r0, _0226A5E8 ; =0x00000955 + ldrsb r0, [r5, r0] + cmp r0, #6 + blt _0226A5E0 + ldr r0, [sp, #8] + cmp r0, #1 + bne _0226A5E0 + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0226A5E0: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A5E8: .word 0x00000955 +_0226A5EC: .word 0x00000954 + thumb_func_end ov70_0226A520 + + thumb_func_start ov70_0226A5F0 +ov70_0226A5F0: ; 0x0226A5F0 + ldr r3, _0226A5F8 ; =ov70_0226B998 + mov r2, #0 + bx r3 + nop +_0226A5F8: .word ov70_0226B998 + thumb_func_end ov70_0226A5F0 + + thumb_func_start ov70_0226A5FC +ov70_0226A5FC: ; 0x0226A5FC + ldr r3, _0226A604 ; =ov70_0226B998 + mov r2, #1 + bx r3 + nop +_0226A604: .word ov70_0226B998 + thumb_func_end ov70_0226A5FC + + thumb_func_start ov70_0226A608 +ov70_0226A608: ; 0x0226A608 + ldr r3, _0226A610 ; =ov70_0226B998 + mov r2, #2 + bx r3 + nop +_0226A610: .word ov70_0226B998 + thumb_func_end ov70_0226A608 + + thumb_func_start ov70_0226A614 +ov70_0226A614: ; 0x0226A614 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + mov r0, #2 + ldrsh r1, [r5, r0] + lsl r0, r1, #1 + add r1, r1, r0 + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r4, r0, #5 + ldr r0, _0226A6C0 ; =0x00000954 + ldrsh r1, [r5, r0] + cmp r4, r1 + beq _0226A662 + strh r4, [r5, r0] + add r0, r0, #2 + ldrsh r0, [r5, r0] + cmp r0, r4 + bls _0226A662 + cmp r4, #0 + beq _0226A652 + add r2, r5, #0 + sub r1, r4, #1 + mov r0, #0x78 + mul r0, r1 + add r2, #0xc + add r0, r2, r0 + mov r1, #0 + bl sub_02017348 +_0226A652: + add r1, r5, #0 + mov r0, #0x78 + add r1, #0xc + mul r0, r4 + add r0, r1, r0 + mov r1, #1 + bl sub_02017348 +_0226A662: + mov r0, #2 + ldrsh r0, [r5, r0] + cmp r0, #0x20 + bge _0226A66E + add r0, r0, #1 + strh r0, [r5, #2] +_0226A66E: + ldr r0, _0226A6C4 ; =0x00000956 + mov r4, #0 + ldrsh r0, [r5, r0] + str r4, [sp] + cmp r0, #0 + ble _0226A6BA + add r6, r5, #0 + add r6, #0xc +_0226A67E: + add r0, r6, #0 + bl sub_0201734C + cmp r0, #0 + beq _0226A6AE + ldr r0, _0226A6C4 ; =0x00000956 + ldrsh r0, [r5, r0] + sub r0, r0, #1 + cmp r4, r0 + bne _0226A6A2 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov70_022699D0 + str r0, [sp] + b _0226A6AE +_0226A6A2: + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov70_022699BC +_0226A6AE: + ldr r0, _0226A6C4 ; =0x00000956 + add r4, r4, #1 + ldrsh r0, [r5, r0] + add r6, #0x78 + cmp r4, r0 + blt _0226A67E +_0226A6BA: + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + nop +_0226A6C0: .word 0x00000954 +_0226A6C4: .word 0x00000956 + thumb_func_end ov70_0226A614 + + thumb_func_start ov70_0226A6C8 +ov70_0226A6C8: ; 0x0226A6C8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #4] + ldr r0, _0226A810 ; =0x0000087C + add r5, r1, #0 + ldr r0, [r5, r0] + ldrb r0, [r0, #2] + cmp r0, #0x11 + bne _0226A6DE + bl sub_02022974 +_0226A6DE: + ldr r0, _0226A814 ; =0x00000954 + ldr r1, [r5, r0] + cmp r1, #0 + ble _0226A6F6 + sub r1, r1, #1 + str r1, [r5, r0] + add r0, r5, #0 + add r0, #0xc + mov r1, #0 + bl sub_02017348 + b _0226A752 +_0226A6F6: + mov r0, #2 + ldrsh r1, [r5, r0] + cmp r1, #3 + bge _0226A752 + add r0, r5, #0 + add r1, r1, #1 + bl ov70_02269810 + cmp r0, #1 + bne _0226A752 + add r0, r5, #0 + add r0, #0xc + mov r1, #1 + bl sub_02017348 + mov r2, #0 + ldr r0, [sp, #4] + add r1, r5, #0 + add r3, r2, #0 + bl ov70_022699D0 + cmp r0, #1 + bne _0226A752 + mov r1, #2 + ldrsh r0, [r5, r1] + mov r2, #3 + add r0, r0, #1 + strh r0, [r5, #2] + ldr r0, _0226A814 ; =0x00000954 + str r2, [r5, r0] + ldrsh r0, [r5, r1] + cmp r0, #3 + bge _0226A748 + mov r2, #0 + ldr r0, [sp, #4] + add r1, r5, #0 + add r3, r2, #0 + str r2, [sp] + bl ov70_02269A90 + b _0226A752 +_0226A748: + add r0, r5, #0 + add r0, #0xc + mov r1, #0 + bl sub_02017348 +_0226A752: + add r7, r5, #0 + mov r4, #1 + add r7, #0xc + str r4, [sp, #8] + add r7, #0x78 + add r6, r5, #4 +_0226A75E: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02269810 + cmp r0, #1 + bne _0226A7FE + mov r0, #2 + ldrsh r1, [r5, r0] + sub r0, r4, #1 + cmp r1, r0 + ble _0226A7FA + add r0, r7, #0 + mov r1, #1 + bl sub_02017348 + mov r0, #0xa + lsl r0, r0, #0xa + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov70_02269A3C + cmp r0, #0 + bne _0226A798 + mov r0, #0 + str r0, [sp, #8] + b _0226A7FE +_0226A798: + sub r0, r4, #1 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, _0226A818 ; =0x00000958 + ldr r0, [r1, r0] + cmp r0, #0 + bne _0226A7C6 + add r0, r7, #0 + mov r1, #0 + bl sub_02017348 + ldr r0, _0226A810 ; =0x0000087C + ldr r0, [r6, r0] + ldrb r0, [r0] + lsl r1, r0, #4 + ldr r0, [sp, #4] + add r1, r0, r1 + ldr r0, _0226A81C ; =0x00010558 + ldr r0, [r1, r0] + mov r1, #0x1f + bl sub_020B3764 + b _0226A7FE +_0226A7C6: + ldr r0, _0226A818 ; =0x00000958 + ldr r0, [r1, r0] + sub r2, r0, #1 + ldr r0, _0226A818 ; =0x00000958 + str r2, [r1, r0] + sub r0, #0xdc + ldr r0, [r6, r0] + ldrb r0, [r0] + lsl r2, r0, #4 + ldr r0, [sp, #4] + add r2, r0, r2 + ldr r0, _0226A81C ; =0x00010558 + ldr r0, [r2, r0] + ldr r2, _0226A818 ; =0x00000958 + ldr r1, [r1, r2] + mov r2, #0x14 + mul r2, r1 + asr r1, r2, #2 + lsr r1, r1, #0x1d + add r1, r2, r1 + asr r1, r1, #3 + bl sub_020B3764 + mov r0, #0 + str r0, [sp, #8] + b _0226A7FE +_0226A7FA: + mov r0, #0 + str r0, [sp, #8] +_0226A7FE: + add r4, r4, #1 + add r7, #0x78 + add r6, r6, #4 + cmp r4, #3 + ble _0226A75E + ldr r0, [sp, #8] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226A810: .word 0x0000087C +_0226A814: .word 0x00000954 +_0226A818: .word 0x00000958 +_0226A81C: .word 0x00010558 + thumb_func_end ov70_0226A6C8 + + thumb_func_start ov70_0226A820 +ov70_0226A820: ; 0x0226A820 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r2, [r4, #1] + add r5, r0, #0 + cmp r2, #0 + beq _0226A832 + cmp r2, #1 + beq _0226A848 + b _0226A854 +_0226A832: + bl ov70_0226AC08 + cmp r0, #0 + beq _0226A854 + mov r0, #1 + strb r0, [r4, #1] + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226ADA0 + b _0226A854 +_0226A848: + bl ov70_0226AF60 + cmp r0, #0 + beq _0226A854 + mov r0, #1 + pop {r3, r4, r5, pc} +_0226A854: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0226A820 + + thumb_func_start ov70_0226A858 +ov70_0226A858: ; 0x0226A858 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, _0226A924 ; =0x00000955 + str r0, [sp] + add r0, r1, #1 + ldrsb r2, [r5, r1] + ldrb r0, [r5, r0] + cmp r2, r0 + bge _0226A8C4 + sub r0, r1, #1 + ldrsb r0, [r5, r0] + add r2, r0, #1 + sub r0, r1, #1 + strb r2, [r5, r0] + ldrsb r0, [r5, r0] + cmp r0, #8 + blt _0226A888 + mov r2, #0 + sub r0, r1, #1 + strb r2, [r5, r0] + ldrsb r0, [r5, r1] + add r0, r0, #1 + strb r0, [r5, r1] +_0226A888: + ldr r0, _0226A928 ; =0x00000954 + ldrsb r1, [r5, r0] + lsl r2, r1, #2 + asr r1, r2, #2 + lsr r1, r1, #0x1d + add r1, r2, r1 + asr r2, r1, #3 + add r1, r0, #1 + ldrsb r1, [r5, r1] + add r0, r0, #3 + ldrb r6, [r5, r0] + lsl r1, r1, #2 + add r7, r2, r1 + cmp r6, r7 + bhs _0226A8C0 + add r1, r5, #0 + mov r0, #0x78 + add r1, #0xc + mul r0, r6 + add r4, r1, r0 +_0226A8B0: + add r0, r4, #0 + mov r1, #1 + bl sub_02017348 + add r6, r6, #1 + add r4, #0x78 + cmp r6, r7 + blo _0226A8B0 +_0226A8C0: + ldr r0, _0226A92C ; =0x00000957 + strb r7, [r5, r0] +_0226A8C4: + ldr r0, _0226A92C ; =0x00000957 + mov r4, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + ble _0226A904 + add r7, r5, #0 + add r7, #0xc + add r6, r7, #0 +_0226A8D4: + add r0, r7, #0 + bl sub_0201734C + cmp r0, #1 + bne _0226A8F6 + ldr r0, [sp] + add r1, r5, #0 + add r2, r4, #0 + bl ov70_0226B8C4 + str r0, [sp, #4] + cmp r0, #1 + bne _0226A8F6 + add r0, r6, #0 + mov r1, #0 + bl sub_02017348 +_0226A8F6: + ldr r0, _0226A92C ; =0x00000957 + add r4, r4, #1 + ldrb r0, [r5, r0] + add r7, #0x78 + add r6, #0x78 + cmp r4, r0 + blt _0226A8D4 +_0226A904: + ldr r0, _0226A924 ; =0x00000955 + ldrsb r1, [r5, r0] + add r0, r0, #1 + ldrb r0, [r5, r0] + cmp r1, r0 + bne _0226A91C + ldr r0, [sp, #4] + cmp r0, #1 + bne _0226A91C + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0226A91C: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226A924: .word 0x00000955 +_0226A928: .word 0x00000954 +_0226A92C: .word 0x00000957 + thumb_func_end ov70_0226A858 + + thumb_func_start ov70_0226A930 +ov70_0226A930: ; 0x0226A930 + push {r4, lr} + add r4, r1, #0 + mov r1, #2 + ldr r0, _0226A954 ; =0x00000954 + ldrsh r1, [r4, r1] + add r0, r4, r0 + bl ov70_0226BCC0 + mov r1, #2 + ldrsh r1, [r4, r1] + add r1, r1, #1 + strh r1, [r4, #2] + cmp r0, #2 + bne _0226A950 + mov r0, #1 + pop {r4, pc} +_0226A950: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_0226A954: .word 0x00000954 + thumb_func_end ov70_0226A930 + + thumb_func_start ov70_0226A958 +ov70_0226A958: ; 0x0226A958 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #2 + add r6, r0, #0 + ldr r0, _0226A994 ; =0x00000954 + ldrsh r1, [r5, r1] + add r0, r5, r0 + bl ov70_0226BCC0 + add r4, r0, #0 + mov r0, #2 + ldrsh r0, [r5, r0] + add r0, r0, #1 + strh r0, [r5, #2] + cmp r4, #1 + bne _0226A980 + add r0, r6, #0 + add r1, r5, #0 + bl ov70_0226BBA8 +_0226A980: + add r0, r6, #0 + add r1, r5, #0 + bl ov70_0226BBDC + cmp r4, #2 + bne _0226A990 + mov r0, #1 + pop {r4, r5, r6, pc} +_0226A990: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0226A994: .word 0x00000954 + thumb_func_end ov70_0226A958 + + thumb_func_start ov70_0226A998 +ov70_0226A998: ; 0x0226A998 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #8] + bl ov70_0225CE70 + cmp r0, #1 + bne _0226A9AC + mov r0, #0 + pop {r4, r5, r6, pc} +_0226A9AC: + mov r4, #0 +_0226A9AE: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_02269810 + cmp r0, #1 + bne _0226A9C4 + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov70_02269878 +_0226A9C4: + add r4, r4, #1 + cmp r4, #0x12 + blt _0226A9AE + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov70_0226A998 + + thumb_func_start ov70_0226A9D0 +ov70_0226A9D0: ; 0x0226A9D0 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #4] + add r4, r1, #0 + add r6, r2, #0 + bl ov70_0225CCAC + ldr r1, [r4, #8] + cmp r1, r0 + bne _0226A9EC + ldr r0, [r5, #8] + bl ov70_02260B3C +_0226A9EC: + ldr r0, [r4, #8] + bl ov70_0225CD34 + add r2, sp, #0 + strh r0, [r2] + lsr r0, r0, #0x10 + strh r0, [r2, #2] + ldrh r0, [r2] + mov r1, #4 + strh r0, [r2, #4] + ldrh r0, [r2, #2] + strh r0, [r2, #6] + ldrsh r1, [r2, r1] + ldr r0, [r5, #0xc] + asr r3, r1, #3 + lsr r3, r3, #0x1c + add r3, r1, r3 + lsl r1, r3, #0xc + mov r3, #6 + ldrsh r2, [r2, r3] + lsr r1, r1, #0x10 + asr r3, r2, #3 + lsr r3, r3, #0x1c + add r3, r2, r3 + lsl r2, r3, #0xc + lsr r2, r2, #0x10 + bl ov70_0225C8C4 + cmp r0, #0x2a + bne _0226AA2C + mov r1, #1 + b _0226AA2E +_0226AA2C: + mov r1, #0 +_0226AA2E: + ldr r0, _0226AB00 ; =0x00000965 + cmp r6, #1 + strb r1, [r4, r0] + beq _0226AA3E + cmp r6, #2 + beq _0226AA58 + cmp r6, #3 + b _0226AA8A +_0226AA3E: + ldr r3, _0226AB04 ; =0x0226E5E4 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_02269828 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov70_0226B714 + b _0226AAD2 +_0226AA58: + ldr r3, _0226AB04 ; =0x0226E5E4 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_02269828 + ldr r3, _0226AB08 ; =0x0226E5E8 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov70_02269828 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + mov r3, #2 + bl ov70_0226B714 + mov r2, #1 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov70_0226B714 + b _0226AAD2 +_0226AA8A: + ldr r3, _0226AB04 ; =0x0226E5E4 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0 + bl ov70_02269828 + ldr r3, _0226AB08 ; =0x0226E5E8 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + bl ov70_02269828 + ldr r3, _0226AB0C ; =0x0226E5EC + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + bl ov70_02269828 + mov r2, #0 + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov70_0226B714 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #1 + mov r3, #2 + bl ov70_0226B714 + add r0, r5, #0 + add r1, r4, #0 + mov r2, #2 + mov r3, #1 + bl ov70_0226B714 +_0226AAD2: + ldr r0, _0226AB10 ; =0x00000955 + mov r1, #0 + strb r6, [r4, r0] + ldr r0, [r4, #8] + bl ov70_0225D030 + ldr r0, _0226AB00 ; =0x00000965 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0226AAF2 + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226AB14 + add sp, #8 + pop {r4, r5, r6, pc} +_0226AAF2: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226ABAC + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0226AB00: .word 0x00000965 +_0226AB04: .word 0x0226E5E4 +_0226AB08: .word 0x0226E5E8 +_0226AB0C: .word 0x0226E5EC +_0226AB10: .word 0x00000955 + thumb_func_end ov70_0226A9D0 + + thumb_func_start ov70_0226AB14 +ov70_0226AB14: ; 0x0226AB14 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r1, #0 + ldr r0, [r5, #8] + add r1, sp, #0x10 + bl ov70_0225D054 + ldr r0, _0226AB94 ; =0x00000955 + ldrsb r0, [r5, r0] + sub r1, r0, #1 + ldr r0, _0226AB98 ; =0x0226E2E8 + ldrb r0, [r0, r1] + cmp r0, #0 + beq _0226AB42 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226AB50 +_0226AB42: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226AB50: + ldr r6, [sp, #0x14] + ldr r4, [sp, #0x18] + ldr r7, [sp, #0x10] + bl sub_020E1740 + add r0, r6, r0 + str r0, [sp] + str r4, [sp, #4] + str r4, [sp, #8] + mov r0, #0x6c + str r0, [sp, #0xc] + ldr r0, _0226AB9C ; =0x00000A04 + add r1, r7, #0 + add r0, r5, r0 + add r2, r7, #0 + add r3, r6, #0 + bl ov70_022692B4 + ldr r0, _0226ABA0 ; =0x00000A2C + mov r3, #2 + ldr r2, _0226ABA4 ; =0x0000071C + add r0, r5, r0 + mov r1, #0 + lsl r3, r3, #0xe + bl ov70_0226949C + add r0, r5, #0 + bl ov70_0226B324 + ldr r0, _0226ABA8 ; =0x00000956 + mov r1, #0 + strh r1, [r5, r0] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226AB94: .word 0x00000955 +_0226AB98: .word 0x0226E2E8 +_0226AB9C: .word 0x00000A04 +_0226ABA0: .word 0x00000A2C +_0226ABA4: .word 0x0000071C +_0226ABA8: .word 0x00000956 + thumb_func_end ov70_0226AB14 + + thumb_func_start ov70_0226ABAC +ov70_0226ABAC: ; 0x0226ABAC + push {r3, r4, lr} + sub sp, #0x1c + add r4, r1, #0 + ldr r0, [r4, #8] + add r1, sp, #0x10 + bl ov70_0225D054 + mov r0, #2 + ldr r3, [sp, #0x14] + lsl r0, r0, #0xc + ldr r2, [sp, #0x18] + ldr r1, [sp, #0x10] + add r0, r3, r0 + str r0, [sp] + str r2, [sp, #4] + str r2, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + ldr r0, _0226ABF8 ; =0x00000A04 + add r2, r1, #0 + add r0, r4, r0 + bl ov70_022692B4 + ldr r0, _0226ABFC ; =0x00000A2C + mov r1, #0 + ldr r2, _0226AC00 ; =0x0000071C + add r0, r4, r0 + add r3, r1, #0 + bl ov70_0226949C + add r0, r4, #0 + bl ov70_0226B51C + ldr r0, _0226AC04 ; =0x00000956 + mov r1, #0 + strh r1, [r4, r0] + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_0226ABF8: .word 0x00000A04 +_0226ABFC: .word 0x00000A2C +_0226AC00: .word 0x0000071C +_0226AC04: .word 0x00000956 + thumb_func_end ov70_0226ABAC + + thumb_func_start ov70_0226AC08 +ov70_0226AC08: ; 0x0226AC08 + push {r3, lr} + ldr r2, _0226AC20 ; =0x00000965 + ldrb r2, [r1, r2] + cmp r2, #0 + bne _0226AC18 + bl ov70_0226AC24 + pop {r3, pc} +_0226AC18: + bl ov70_0226AD20 + pop {r3, pc} + nop +_0226AC20: .word 0x00000965 + thumb_func_end ov70_0226AC08 + + thumb_func_start ov70_0226AC24 +ov70_0226AC24: ; 0x0226AC24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + ldr r1, _0226AD0C ; =0x00000A04 + add r6, r0, #0 + add r0, r5, r1 + sub r1, #0xae + ldrsh r1, [r5, r1] + bl ov70_022692DC + str r0, [sp] + ldr r0, _0226AD10 ; =0x00000A2C + add r0, r5, r0 + bl ov70_022694D0 + ldr r0, _0226AD14 ; =0x00000956 + ldrsh r1, [r5, r0] + add r1, r1, #1 + strh r1, [r5, r0] + ldr r0, [r5, #8] + add r1, sp, #0xc + bl ov70_0225D054 + ldr r0, _0226AD0C ; =0x00000A04 + add r1, sp, #0xc + add r0, r5, r0 + add r2, sp, #0x10 + add r3, sp, #0x14 + bl ov70_02269488 + ldr r0, _0226AD10 ; =0x00000A2C + add r1, sp, #8 + add r0, r5, r0 + bl ov70_02269508 + ldr r0, [sp] + cmp r0, #0 + bne _0226AC78 + ldr r1, [sp, #0xc] + ldr r0, [sp, #8] + add r0, r1, r0 + str r0, [sp, #0xc] +_0226AC78: + ldr r0, [r5, #8] + add r1, sp, #0xc + bl ov70_0225D048 + add r0, r5, #0 + bl ov70_0226B324 + ldr r0, _0226AD18 ; =0x00000955 + mov r4, #0 + ldrsb r0, [r5, r0] + cmp r0, #0 + ble _0226ACA4 + ldr r7, _0226AD18 ; =0x00000955 +_0226AC92: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov70_0226B744 + ldrsb r0, [r5, r7] + add r4, r4, #1 + cmp r4, r0 + blt _0226AC92 +_0226ACA4: + ldr r0, [r6, #4] + ldr r7, [r5, #8] + bl ov70_0225CCAC + cmp r7, r0 + bne _0226AD06 + ldr r0, _0226AD1C ; =0x021BF67C + mov r1, #0x40 + ldr r0, [r0, #0x48] + mov r4, #4 + tst r1, r0 + beq _0226ACBE + mov r4, #0 +_0226ACBE: + mov r1, #0x80 + tst r1, r0 + beq _0226ACC6 + mov r4, #1 +_0226ACC6: + mov r1, #0x10 + tst r1, r0 + beq _0226ACCE + mov r4, #3 +_0226ACCE: + mov r1, #0x20 + tst r0, r1 + beq _0226ACD6 + mov r4, #2 +_0226ACD6: + cmp r4, #4 + beq _0226AD06 + add r0, r7, #0 + add r1, r4, #0 + bl ov70_0225D060 + ldr r0, [r5, #8] + bl ov70_0225CD34 + add r1, sp, #4 + strh r0, [r1] + lsr r0, r0, #0x10 + strh r0, [r1, #2] + mov r3, sp + ldrh r2, [r1] + ldr r0, [r5, #8] + sub r3, r3, #4 + strh r2, [r3] + ldrh r1, [r1, #2] + add r2, r4, #0 + strh r1, [r3, #2] + ldr r1, [r3, #0] + bl ov70_0225CD04 +_0226AD06: + ldr r0, [sp] + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226AD0C: .word 0x00000A04 +_0226AD10: .word 0x00000A2C +_0226AD14: .word 0x00000956 +_0226AD18: .word 0x00000955 +_0226AD1C: .word 0x021BF67C + thumb_func_end ov70_0226AC24 + + thumb_func_start ov70_0226AD20 +ov70_0226AD20: ; 0x0226AD20 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + ldr r1, _0226AD90 ; =0x00000A04 + add r6, r0, #0 + add r0, r5, r1 + sub r1, #0xae + ldrsh r1, [r5, r1] + bl ov70_022692DC + str r0, [sp] + ldr r0, _0226AD94 ; =0x00000A2C + add r0, r5, r0 + bl ov70_022694D0 + ldr r0, _0226AD98 ; =0x00000956 + ldrsh r1, [r5, r0] + add r1, r1, #1 + strh r1, [r5, r0] + ldr r0, [r5, #8] + add r1, sp, #4 + bl ov70_0225D054 + ldr r0, _0226AD90 ; =0x00000A04 + add r1, sp, #4 + add r0, r5, r0 + add r2, sp, #8 + add r3, sp, #0xc + bl ov70_02269488 + ldr r0, [r5, #8] + add r1, sp, #4 + bl ov70_0225D048 + add r0, r5, #0 + bl ov70_0226B51C + ldr r0, _0226AD9C ; =0x00000955 + mov r4, #0 + ldrsb r0, [r5, r0] + cmp r0, #0 + ble _0226AD88 + ldr r7, _0226AD9C ; =0x00000955 +_0226AD76: + add r0, r6, #0 + add r1, r5, #0 + add r2, r4, #0 + bl ov70_0226B744 + ldrsb r0, [r5, r7] + add r4, r4, #1 + cmp r4, r0 + blt _0226AD76 +_0226AD88: + ldr r0, [sp] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226AD90: .word 0x00000A04 +_0226AD94: .word 0x00000A2C +_0226AD98: .word 0x00000956 +_0226AD9C: .word 0x00000955 + thumb_func_end ov70_0226AD20 + + thumb_func_start ov70_0226ADA0 +ov70_0226ADA0: ; 0x0226ADA0 + push {r3, lr} + ldr r2, _0226ADB8 ; =0x00000965 + ldrb r2, [r1, r2] + cmp r2, #0 + bne _0226ADB0 + bl ov70_0226ADBC + pop {r3, pc} +_0226ADB0: + bl ov70_0226AF1C + pop {r3, pc} + nop +_0226ADB8: .word 0x00000965 + thumb_func_end ov70_0226ADA0 + + thumb_func_start ov70_0226ADBC +ov70_0226ADBC: ; 0x0226ADBC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r1, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #8] + add r1, sp, #0x24 + bl ov70_0225D054 + ldr r0, _0226AF04 ; =0x00000955 + ldrsb r0, [r5, r0] + sub r1, r0, #1 + ldr r0, _0226AF08 ; =0x0226E2E8 + ldrb r0, [r0, r1] + cmp r0, #0 + beq _0226ADEC + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226ADFA +_0226ADEC: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226ADFA: + ldr r6, [sp, #0x28] + ldr r4, [sp, #0x2c] + ldr r7, [sp, #0x24] + bl sub_020E1740 + sub r0, r6, r0 + str r0, [sp] + str r4, [sp, #4] + str r4, [sp, #8] + mov r0, #0xa + str r0, [sp, #0xc] + ldr r0, _0226AF0C ; =0x00000A04 + add r1, r7, #0 + add r0, r5, r0 + add r2, r7, #0 + add r3, r6, #0 + bl ov70_022692B4 + ldr r1, _0226AF10 ; =0x00000956 + mov r4, #0 + strh r4, [r5, r1] + sub r0, r1, #2 + strb r4, [r5, r0] + sub r0, r1, #1 + ldrsb r0, [r5, r0] + cmp r0, #0 + ble _0226AEFA + add r0, r5, #0 + str r0, [sp, #0x14] + add r0, #0xc + str r0, [sp, #0x14] + add r0, r1, #0 + add r0, #0x36 + add r1, #0x12 + add r7, r5, r0 + add r6, r5, r1 +_0226AE42: + ldr r0, [sp, #0x14] + add r1, sp, #0x24 + add r2, sp, #0x28 + add r3, sp, #0x2c + bl sub_02017358 + mov r0, #0x96 + add r1, r5, r4 + lsl r0, r0, #4 + ldrb r0, [r1, r0] + cmp r0, #0 + beq _0226AE64 + cmp r0, #1 + beq _0226AE7E + cmp r0, #2 + beq _0226AE98 + b _0226AEB0 +_0226AE64: + ldr r0, [sp, #0x24] + ldr r1, [sp, #0x28] + str r0, [sp, #0x20] + mov r0, #1 + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x1c] + mov r0, #1 + ldr r1, [sp, #0x2c] + lsl r0, r0, #0x12 + sub r0, r1, r0 + str r0, [sp, #0x18] + b _0226AEB0 +_0226AE7E: + mov r0, #1 + ldr r1, [sp, #0x24] + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x20] + mov r0, #1 + ldr r1, [sp, #0x28] + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x18] + b _0226AEB0 +_0226AE98: + mov r0, #1 + ldr r1, [sp, #0x24] + lsl r0, r0, #0x12 + sub r0, r1, r0 + str r0, [sp, #0x20] + mov r0, #1 + ldr r1, [sp, #0x28] + lsl r0, r0, #0x12 + add r0, r1, r0 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x18] +_0226AEB0: + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x20] + str r0, [sp] + ldr r0, [sp, #0x2c] + str r0, [sp, #4] + ldr r0, [sp, #0x18] + str r0, [sp, #8] + mov r0, #0x1a + str r0, [sp, #0xc] + ldr r1, [sp, #0x24] + ldr r3, [sp, #0x28] + add r0, r7, #0 + bl ov70_022692B4 + mov r3, #6 + ldr r2, _0226AF14 ; =0x00000AAA + add r0, r6, #0 + mov r1, #0 + lsl r3, r3, #0xc + bl ov70_0226949C + ldr r0, [sp, #0x10] + add r1, r5, #0 + add r2, r4, #0 + mov r3, #3 + bl ov70_0226B714 + ldr r0, [sp, #0x14] + add r4, r4, #1 + add r0, #0x78 + str r0, [sp, #0x14] + ldr r0, _0226AF04 ; =0x00000955 + add r7, #0x28 + ldrsb r0, [r5, r0] + add r6, #0xc + cmp r4, r0 + blt _0226AE42 +_0226AEFA: + ldr r0, _0226AF18 ; =0x00000964 + mov r1, #0 + strb r1, [r5, r0] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226AF04: .word 0x00000955 +_0226AF08: .word 0x0226E2E8 +_0226AF0C: .word 0x00000A04 +_0226AF10: .word 0x00000956 +_0226AF14: .word 0x00000AAA +_0226AF18: .word 0x00000964 + thumb_func_end ov70_0226ADBC + + thumb_func_start ov70_0226AF1C +ov70_0226AF1C: ; 0x0226AF1C + push {r3, r4, lr} + sub sp, #0x1c + add r4, r1, #0 + ldr r0, [r4, #8] + add r1, sp, #0x10 + bl ov70_0225D054 + mov r0, #2 + ldr r3, [sp, #0x14] + lsl r0, r0, #0xc + ldr r2, [sp, #0x18] + ldr r1, [sp, #0x10] + sub r0, r3, r0 + str r0, [sp] + str r2, [sp, #4] + str r2, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + ldr r0, _0226AF58 ; =0x00000A04 + add r2, r1, #0 + add r0, r4, r0 + bl ov70_022692B4 + ldr r0, _0226AF5C ; =0x00000956 + mov r1, #0 + strh r1, [r4, r0] + sub r0, r0, #2 + strb r1, [r4, r0] + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_0226AF58: .word 0x00000A04 +_0226AF5C: .word 0x00000956 + thumb_func_end ov70_0226AF1C + + thumb_func_start ov70_0226AF60 +ov70_0226AF60: ; 0x0226AF60 + push {r3, lr} + ldr r2, _0226AF78 ; =0x00000965 + ldrb r2, [r1, r2] + cmp r2, #0 + bne _0226AF70 + bl ov70_0226AF7C + pop {r3, pc} +_0226AF70: + bl ov70_0226B1D0 + pop {r3, pc} + nop +_0226AF78: .word 0x00000965 + thumb_func_end ov70_0226AF60 + + thumb_func_start ov70_0226AF7C +ov70_0226AF7C: ; 0x0226AF7C + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + add r4, r1, #0 + ldr r1, _0226B1A8 ; =0x00000954 + add r6, r0, #0 + ldrsb r0, [r4, r1] + cmp r0, #4 + bhi _0226AFB2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226AF98: ; jump table + .short _0226AFA2 - _0226AF98 - 2 ; case 0 + .short _0226AFBA - _0226AF98 - 2 ; case 1 + .short _0226AFD0 - _0226AF98 - 2 ; case 2 + .short _0226B006 - _0226AF98 - 2 ; case 3 + .short _0226B05E - _0226AF98 - 2 ; case 4 +_0226AFA2: + add r0, r1, #2 + ldrsh r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #8 + bge _0226AFB4 +_0226AFB2: + b _0226B0D8 +_0226AFB4: + mov r0, #1 + strb r0, [r4, r1] + b _0226B0D8 +_0226AFBA: + ldr r0, [r4, #8] + mov r1, #1 + bl ov70_0225D09C + ldr r0, _0226B1AC ; =0x00000956 + mov r1, #0x10 + strh r1, [r4, r0] + mov r1, #2 + sub r0, r0, #2 + strb r1, [r4, r0] + b _0226B0D8 +_0226AFD0: + add r0, r1, #2 + ldrsh r0, [r4, r0] + sub r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + bgt _0226B0D8 + ldr r0, [r4, #8] + mov r1, #0 + bl ov70_0225D09C + ldr r0, _0226B1A8 ; =0x00000954 + mov r1, #3 + strb r1, [r4, r0] + mov r1, #0 + add r0, r0, #2 + strh r1, [r4, r0] + ldr r0, [r4, #8] + mov r1, #6 + bl ov70_0225CD60 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov70_0225D060 + b _0226B0D8 +_0226B006: + add r0, r1, #0 + add r1, r1, #2 + add r0, #0xb0 + ldrsh r1, [r4, r1] + add r0, r4, r0 + bl ov70_022692DC + add r5, r0, #0 + ldr r0, _0226B1AC ; =0x00000956 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + ldr r0, [r4, #8] + add r1, sp, #0x30 + bl ov70_0225D054 + ldr r0, _0226B1B0 ; =0x00000A04 + add r1, sp, #0x30 + add r0, r4, r0 + add r2, sp, #0x34 + add r3, sp, #0x38 + bl ov70_02269488 + ldr r0, [r4, #8] + add r1, sp, #0x30 + bl ov70_0225D048 + cmp r5, #1 + bne _0226B0D8 + ldr r0, _0226B1A8 ; =0x00000954 + mov r1, #4 + strb r1, [r4, r0] + add r1, r0, #2 + mov r2, #0 + strh r2, [r4, r1] + ldr r1, [sp, #0x34] + add r0, r0, #4 + str r1, [r4, r0] + ldr r2, _0226B1B4 ; =0x000005AB + add r0, r6, #0 + add r1, r4, #0 + bl ov70_02269510 + b _0226B0D8 +_0226B05E: + add r0, r1, #2 + ldrsh r1, [r4, r0] + ldr r0, _0226B1B8 ; =0x00007FFF + mul r0, r1 + mov r1, #0xa + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r1, r0, #2 + ldr r0, _0226B1BC ; =0x020F983C + ldrsh r2, [r0, r1] + asr r0, r2, #0x1f + lsr r1, r2, #0x11 + lsl r0, r0, #0xf + orr r0, r1 + mov r1, #2 + lsl r3, r2, #0xf + mov r2, #0 + lsl r1, r1, #0xa + add r1, r3, r1 + adc r0, r2 + lsr r5, r1, #0xc + lsl r0, r0, #0x14 + orr r5, r0 + ldr r0, [r4, #8] + add r1, sp, #0x24 + bl ov70_0225D054 + ldr r0, _0226B1C0 ; =0x00000958 + add r1, sp, #0x24 + ldr r0, [r4, r0] + add r0, r0, r5 + str r0, [sp, #0x28] + ldr r0, [r4, #8] + bl ov70_0225D048 + ldr r0, _0226B1AC ; =0x00000956 + ldrsh r1, [r4, r0] + add r1, r1, #1 + cmp r1, #0xa + ble _0226B0D6 + ldr r0, [r4, #8] + mov r1, #1 + bl ov70_0225D030 + ldr r0, [r6, #4] + ldr r4, [r4, #8] + bl ov70_0225CCAC + cmp r4, r0 + bne _0226B0D0 + ldr r0, [r6, #8] + add r1, r4, #0 + bl ov70_02260B38 +_0226B0D0: + add sp, #0x3c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0226B0D6: + strh r1, [r4, r0] +_0226B0D8: + ldr r1, _0226B1C4 ; =0x00000964 + mov r5, #0 + ldrb r0, [r4, r1] + add r0, r0, #1 + strb r0, [r4, r1] + add r0, r1, #0 + sub r0, #0xf + ldrsb r0, [r4, r0] + cmp r0, #0 + ble _0226B1A0 + add r0, r1, #0 + add r0, #0x28 + add r7, r4, r0 + add r0, r1, #4 + add r0, r4, r0 + str r0, [sp, #0x10] + add r0, r4, #0 + str r0, [sp, #0xc] + add r0, #0xc + str r0, [sp, #0xc] + ldr r0, [sp, #0x10] + str r7, [sp, #8] + str r0, [sp, #4] + ldr r0, [sp, #0xc] + str r0, [sp] +_0226B10A: + ldr r1, _0226B1C4 ; =0x00000964 + add r0, r7, #0 + ldrb r1, [r4, r1] + bl ov70_022692DC + cmp r0, #0 + bne _0226B152 + ldr r0, [sp, #0x10] + bl ov70_022694D0 + ldr r0, [sp, #0xc] + add r1, sp, #0x18 + add r2, sp, #0x1c + add r3, sp, #0x20 + bl sub_02017358 + ldr r0, [sp, #8] + add r1, sp, #0x18 + add r2, sp, #0x1c + add r3, sp, #0x20 + bl ov70_02269488 + ldr r0, [sp, #4] + add r1, sp, #0x14 + bl ov70_02269508 + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x1c] + add r1, r1, r0 + ldr r0, [sp] + ldr r3, [sp, #0x20] + str r1, [sp, #0x18] + bl sub_02017350 + b _0226B16C +_0226B152: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + mov r3, #4 + bl ov70_0226B714 + cmp r0, #1 + bne _0226B16C + ldr r2, _0226B1C8 ; =0x00000591 + add r0, r6, #0 + add r1, r4, #0 + bl ov70_02269510 +_0226B16C: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov70_0226B744 + ldr r0, [sp, #0x10] + add r5, r5, #1 + add r0, #0xc + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r7, #0x28 + add r0, #0x78 + str r0, [sp, #0xc] + ldr r0, [sp, #8] + add r0, #0x28 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r0, #0xc + str r0, [sp, #4] + ldr r0, [sp] + add r0, #0x78 + str r0, [sp] + ldr r0, _0226B1CC ; =0x00000955 + ldrsb r0, [r4, r0] + cmp r5, r0 + blt _0226B10A +_0226B1A0: + mov r0, #0 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_0226B1A8: .word 0x00000954 +_0226B1AC: .word 0x00000956 +_0226B1B0: .word 0x00000A04 +_0226B1B4: .word 0x000005AB +_0226B1B8: .word 0x00007FFF +_0226B1BC: .word 0x020F983C +_0226B1C0: .word 0x00000958 +_0226B1C4: .word 0x00000964 +_0226B1C8: .word 0x00000591 +_0226B1CC: .word 0x00000955 + thumb_func_end ov70_0226AF7C + + thumb_func_start ov70_0226B1D0 +ov70_0226B1D0: ; 0x0226B1D0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + ldr r0, _0226B30C ; =0x00000955 + add r4, r1, #0 + ldrsb r0, [r4, r0] + mov r5, #0 + cmp r0, #0 + ble _0226B1F6 + ldr r7, _0226B30C ; =0x00000955 +_0226B1E4: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov70_0226B744 + ldrsb r0, [r4, r7] + add r5, r5, #1 + cmp r5, r0 + blt _0226B1E4 +_0226B1F6: + ldr r1, _0226B310 ; =0x00000954 + ldrsb r0, [r4, r1] + cmp r0, #3 + bls _0226B200 + b _0226B304 +_0226B200: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226B20C: ; jump table + .short _0226B214 - _0226B20C - 2 ; case 0 + .short _0226B246 - _0226B20C - 2 ; case 1 + .short _0226B25C - _0226B20C - 2 ; case 2 + .short _0226B292 - _0226B20C - 2 ; case 3 +_0226B214: + ldr r2, _0226B314 ; =0x00000591 + add r0, r6, #0 + add r1, r4, #0 + bl ov70_02269510 + ldr r0, _0226B30C ; =0x00000955 + mov r5, #0 + ldrsb r0, [r4, r0] + cmp r0, #0 + ble _0226B23E + ldr r7, _0226B30C ; =0x00000955 +_0226B22A: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + mov r3, #4 + bl ov70_0226B714 + ldrsb r0, [r4, r7] + add r5, r5, #1 + cmp r5, r0 + blt _0226B22A +_0226B23E: + ldr r0, _0226B310 ; =0x00000954 + mov r1, #1 + strb r1, [r4, r0] + b _0226B304 +_0226B246: + ldr r0, [r4, #8] + mov r1, #1 + bl ov70_0225D09C + ldr r0, _0226B318 ; =0x00000956 + mov r1, #8 + strh r1, [r4, r0] + mov r1, #2 + sub r0, r0, #2 + strb r1, [r4, r0] + b _0226B304 +_0226B25C: + add r0, r1, #2 + ldrsh r0, [r4, r0] + sub r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0 + bgt _0226B304 + ldr r0, [r4, #8] + mov r1, #0 + bl ov70_0225D09C + ldr r0, _0226B310 ; =0x00000954 + mov r1, #3 + strb r1, [r4, r0] + mov r1, #0 + add r0, r0, #2 + strh r1, [r4, r0] + ldr r0, [r4, #8] + mov r1, #6 + bl ov70_0225CD60 + add r1, r0, #0 + ldr r0, [r4, #8] + bl ov70_0225D060 + b _0226B304 +_0226B292: + add r0, r1, #0 + add r1, r1, #2 + add r0, #0xb0 + ldrsh r1, [r4, r1] + add r0, r4, r0 + bl ov70_022692DC + add r5, r0, #0 + ldr r0, _0226B318 ; =0x00000956 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + ldr r0, [r4, #8] + add r1, sp, #0 + bl ov70_0225D054 + ldr r0, _0226B31C ; =0x00000A04 + add r1, sp, #0 + add r0, r4, r0 + add r2, sp, #4 + add r3, sp, #8 + bl ov70_02269488 + ldr r0, [r4, #8] + add r1, sp, #0 + bl ov70_0225D048 + cmp r5, #1 + bne _0226B304 + ldr r0, _0226B318 ; =0x00000956 + mov r1, #0 + strh r1, [r4, r0] + ldr r1, [sp, #4] + add r0, r0, #2 + str r1, [r4, r0] + ldr r2, _0226B320 ; =0x000005AB + add r0, r6, #0 + add r1, r4, #0 + bl ov70_02269510 + ldr r0, [r4, #8] + mov r1, #1 + bl ov70_0225D030 + ldr r0, [r6, #4] + ldr r4, [r4, #8] + bl ov70_0225CCAC + cmp r4, r0 + bne _0226B2FE + ldr r0, [r6, #8] + add r1, r4, #0 + bl ov70_02260B38 +_0226B2FE: + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0226B304: + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0226B30C: .word 0x00000955 +_0226B310: .word 0x00000954 +_0226B314: .word 0x00000591 +_0226B318: .word 0x00000956 +_0226B31C: .word 0x00000A04 +_0226B320: .word 0x000005AB + thumb_func_end ov70_0226B1D0 + + thumb_func_start ov70_0226B324 +ov70_0226B324: ; 0x0226B324 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #8] + add r1, sp, #0 + bl ov70_0225D054 + ldr r0, _0226B518 ; =0x00000955 + ldrsb r0, [r5, r0] + cmp r0, #1 + beq _0226B342 + cmp r0, #2 + beq _0226B392 + cmp r0, #3 + b _0226B42E +_0226B342: + mov r0, #0xf + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + ldr r2, [sp, #4] + add r3, r0, #0 + add r1, r1, r4 + add r2, r2, r3 + mov r3, #1 + add r5, #0xc + ldr r4, [sp, #8] + lsl r3, r3, #0xc + add r0, r5, #0 + add r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0226B392: + mov r0, #0xe + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + add r3, r0, #0 + ldr r2, [sp, #4] + add r1, r1, r4 + add r2, r2, r3 + mov r3, #1 + add r0, r5, #0 + ldr r4, [sp, #8] + lsl r3, r3, #0xc + add r0, #0xc + add r3, r4, r3 + bl sub_02017350 + mov r0, #0xe + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #0xe + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + ldr r2, [sp, #4] + add r3, r0, #0 + add r1, r1, r4 + add r2, r2, r3 + mov r3, #1 + add r5, #0x84 + ldr r4, [sp, #8] + lsl r3, r3, #0xc + add r0, r5, #0 + add r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0226B42E: + mov r0, #0xf + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + add r3, r0, #0 + ldr r2, [sp, #4] + add r1, r1, r4 + add r2, r2, r3 + mov r3, #1 + add r0, r5, #0 + ldr r4, [sp, #8] + lsl r3, r3, #0xc + add r0, #0xc + add r3, r4, r3 + bl sub_02017350 + mov r0, #0xe + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + add r3, r0, #0 + ldr r2, [sp, #4] + add r1, r1, r4 + add r2, r2, r3 + mov r3, #1 + add r0, r5, #0 + ldr r4, [sp, #8] + lsl r3, r3, #0xc + add r0, #0x84 + add r3, r4, r3 + bl sub_02017350 + mov r0, #0xe + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #0xe + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + ldr r2, [sp, #4] + add r3, r0, #0 + add r1, r1, r4 + add r2, r2, r3 + mov r3, #1 + add r5, #0xfc + ldr r4, [sp, #8] + lsl r3, r3, #0xc + add r0, r5, #0 + add r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0226B518: .word 0x00000955 + thumb_func_end ov70_0226B324 + + thumb_func_start ov70_0226B51C +ov70_0226B51C: ; 0x0226B51C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #8] + add r1, sp, #0 + bl ov70_0225D054 + ldr r0, _0226B710 ; =0x00000955 + ldrsb r0, [r5, r0] + cmp r0, #1 + beq _0226B53A + cmp r0, #2 + beq _0226B58A + cmp r0, #3 + b _0226B626 +_0226B53A: + mov r0, #3 + lsl r0, r0, #0x10 + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + ldr r2, [sp, #4] + add r3, r0, #0 + add r1, r1, r4 + add r2, r2, r3 + mov r3, #2 + add r5, #0xc + ldr r4, [sp, #8] + lsl r3, r3, #0xe + add r0, r5, #0 + sub r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0226B58A: + mov r0, #0xb + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + add r3, r0, #0 + ldr r2, [sp, #4] + add r1, r1, r4 + add r2, r2, r3 + mov r3, #2 + add r0, r5, #0 + ldr r4, [sp, #8] + lsl r3, r3, #0xe + add r0, #0xc + sub r3, r4, r3 + bl sub_02017350 + mov r0, #0xb + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #0xe + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + ldr r2, [sp, #4] + add r3, r0, #0 + add r1, r1, r4 + add r2, r2, r3 + mov r3, #2 + add r5, #0x84 + ldr r4, [sp, #8] + lsl r3, r3, #0xe + add r0, r5, #0 + sub r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0226B626: + mov r0, #3 + lsl r0, r0, #0x10 + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + add r3, r0, #0 + ldr r2, [sp, #4] + add r1, r1, r4 + add r2, r2, r3 + mov r3, #2 + add r0, r5, #0 + ldr r4, [sp, #8] + lsl r3, r3, #0xe + add r0, #0xc + sub r3, r4, r3 + bl sub_02017350 + mov r0, #0xb + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #2 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + add r3, r0, #0 + ldr r2, [sp, #4] + add r1, r1, r4 + add r2, r2, r3 + mov r3, #2 + add r0, r5, #0 + ldr r4, [sp, #8] + lsl r3, r3, #0xe + add r0, #0x84 + sub r3, r4, r3 + bl sub_02017350 + mov r0, #0xb + lsl r0, r0, #0xe + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + add r6, r0, #0 + mov r0, #0xe + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + bl sub_020E1740 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020E1740 + ldr r1, [sp] + ldr r2, [sp, #4] + add r3, r0, #0 + add r1, r1, r4 + add r2, r2, r3 + mov r3, #2 + add r5, #0xfc + ldr r4, [sp, #8] + lsl r3, r3, #0xe + add r0, r5, #0 + sub r3, r4, r3 + bl sub_02017350 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0226B710: .word 0x00000955 + thumb_func_end ov70_0226B51C + + thumb_func_start ov70_0226B714 +ov70_0226B714: ; 0x0226B714 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r6, #0x96 + lsl r6, r6, #4 + add r5, r1, r6 + add r4, r3, #0 + ldrb r3, [r5, r2] + cmp r4, r3 + beq _0226B73E + strb r4, [r5, r2] + mov r3, #0 + add r5, r1, r2 + sub r6, r6, #4 + strb r3, [r5, r6] + lsl r4, r4, #0xd + str r4, [sp] + bl ov70_02269A90 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0226B73E: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov70_0226B714 + + thumb_func_start ov70_0226B744 +ov70_0226B744: ; 0x0226B744 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + mov r3, #0x96 + add r7, r1, #0 + add r5, r2, #0 + add r4, r7, r5 + lsl r3, r3, #4 + ldrb r6, [r4, r3] + sub r3, r3, #4 + add r4, r7, r3 + ldrb r3, [r4, r5] + str r0, [sp, #4] + cmp r3, #0 + bne _0226B7A4 + mov r3, #0 + bl ov70_02269AE8 + lsl r1, r6, #0xd + str r0, [sp, #8] + cmp r0, r1 + bne _0226B778 + mov r0, #1 + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #8] + b _0226B790 +_0226B778: + cmp r6, #4 + beq _0226B780 + str r1, [sp, #8] + b _0226B790 +_0226B780: + add r1, r7, #0 + mov r0, #0x78 + add r1, #0xc + mul r0, r5 + add r0, r1, r0 + mov r1, #0 + bl sub_02017348 +_0226B790: + ldr r0, [sp, #8] + add r1, r7, #0 + str r0, [sp] + ldr r0, [sp, #4] + add r2, r5, #0 + mov r3, #0 + bl ov70_02269A90 + mov r0, #8 + strb r0, [r4, r5] +_0226B7A4: + ldrb r0, [r4, r5] + sub r0, r0, #1 + strb r0, [r4, r5] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226B744 + + thumb_func_start ov70_0226B7B0 +ov70_0226B7B0: ; 0x0226B7B0 + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + str r0, [sp, #0x10] + add r0, r1, #0 + str r1, [sp, #0x14] + ldr r0, [r0, #8] + add r1, sp, #0x50 + str r2, [sp, #0x18] + bl ov70_0225D054 + mov r0, #0 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + cmp r0, #0 + bls _0226B88E + ldr r0, [sp, #0x20] + str r0, [sp, #0x1c] +_0226B7D2: + ldr r1, [sp, #0x20] + add r1, #0xd + cmp r1, #0xf + bls _0226B7DC + mov r1, #0xf +_0226B7DC: + ldr r0, _0226B8AC ; =0x0226E370 + ldr r7, _0226B8B0 ; =0x0226E3A0 + str r0, [sp, #0x34] + lsl r0, r1, #2 + str r0, [sp, #0x24] + ldr r0, [sp, #0x14] + ldr r1, _0226B8B4 ; =0x00000968 + str r0, [sp, #0x28] + add r0, #0xc + str r0, [sp, #0x28] + ldr r0, [sp, #0x14] + mov r4, #0 + add r0, r0, r1 + str r0, [sp, #0x30] +_0226B7F8: + ldr r0, [sp, #0x1c] + ldr r6, _0226B8B8 ; =0x0226E5A4 + add r5, r4, r0 + ldr r3, [sp, #0x24] + ldr r0, [sp, #0x10] + ldr r1, [sp, #0x14] + add r2, r5, #0 + add r3, r6, r3 + bl ov70_02269828 + ldr r1, [sp, #0x34] + add r0, sp, #0x50 + add r2, sp, #0x44 + bl sub_020BD17C + add r0, sp, #0x44 + add r1, r7, #0 + add r2, sp, #0x38 + bl sub_020BD17C + mov r0, #0x78 + mul r0, r5 + ldr r1, [sp, #0x28] + str r0, [sp, #0x2c] + add r0, r1, r0 + ldr r1, [sp, #0x44] + ldr r2, [sp, #0x48] + ldr r3, [sp, #0x4c] + bl sub_02017350 + ldr r1, [sp, #0x28] + ldr r0, [sp, #0x2c] + add r0, r1, r0 + mov r1, #0 + bl sub_02017348 + ldr r0, [sp, #0x14] + mov r1, #0 + add r2, r0, r5 + ldr r0, _0226B8BC ; =0x00000958 + strb r1, [r2, r0] + ldr r0, [sp, #0x3c] + add r1, r5, #0 + str r0, [sp] + ldr r0, [sp, #0x4c] + str r0, [sp, #4] + ldr r0, [sp, #0x40] + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0x28 + mul r1, r0 + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x38] + add r0, r0, r1 + ldr r1, [sp, #0x44] + ldr r3, [sp, #0x48] + bl ov70_022692B4 + ldr r0, [sp, #0x34] + add r4, r4, #1 + add r0, #0xc + add r7, #0xc + str r0, [sp, #0x34] + cmp r4, #4 + blt _0226B7F8 + ldr r0, [sp, #0x1c] + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x20] + add r1, r0, #1 + ldr r0, [sp, #0x18] + str r1, [sp, #0x20] + cmp r1, r0 + blo _0226B7D2 +_0226B88E: + ldr r2, _0226B8C0 ; =0x00000956 + ldr r1, [sp, #0x18] + ldr r0, [sp, #0x14] + sub r3, r2, #1 + strb r1, [r0, r2] + ldr r1, [sp, #0x14] + mov r0, #0 + strb r0, [r1, r3] + sub r3, r2, #2 + strb r0, [r1, r3] + add r2, r2, #1 + strb r0, [r1, r2] + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_0226B8AC: .word 0x0226E370 +_0226B8B0: .word 0x0226E3A0 +_0226B8B4: .word 0x00000968 +_0226B8B8: .word 0x0226E5A4 +_0226B8BC: .word 0x00000958 +_0226B8C0: .word 0x00000956 + thumb_func_end ov70_0226B7B0 + + thumb_func_start ov70_0226B8C4 +ov70_0226B8C4: ; 0x0226B8C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r2, #0 + ldr r2, _0226B924 ; =0x00000958 + add r5, r1, #0 + add r1, r5, r2 + add r7, r0, #0 + ldrsb r0, [r1, r4] + add r6, r4, #0 + add r2, #0x10 + add r0, r0, #1 + strb r0, [r1, r4] + mov r0, #0x28 + mul r6, r0 + add r0, r5, r2 + ldrsb r1, [r1, r4] + add r0, r0, r6 + bl ov70_022692DC + str r0, [sp] + ldr r0, _0226B928 ; =0x00000968 + add r1, sp, #4 + add r0, r5, r0 + add r0, r0, r6 + add r2, sp, #8 + add r3, sp, #0xc + bl ov70_02269488 + add r1, r5, #0 + mov r0, #0x78 + add r1, #0xc + mul r0, r4 + add r0, r1, r0 + ldr r1, [sp, #4] + ldr r2, [sp, #8] + ldr r3, [sp, #0xc] + bl sub_02017350 + add r0, r7, #0 + add r1, r5, #0 + add r2, r4, #0 + mov r3, #0 + bl ov70_022699BC + ldr r0, [sp] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226B924: .word 0x00000958 +_0226B928: .word 0x00000968 + thumb_func_end ov70_0226B8C4 + + thumb_func_start ov70_0226B92C +ov70_0226B92C: ; 0x0226B92C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + add r7, r1, #0 + mov r6, #0 + str r2, [sp, #4] + add r0, r2, #0 + beq _0226B986 + add r5, r7, #0 + ldr r4, _0226B990 ; =0x0226E5A4 + add r5, #0xc +_0226B942: + ldr r0, [sp] + add r1, r7, #0 + add r2, r6, #0 + add r3, r4, #0 + bl ov70_02269828 + ldr r0, [r7, #8] + add r1, sp, #8 + bl ov70_0225D054 + mov r0, #2 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xe + add r2, r1, r0 + mov r0, #6 + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + add r3, r1, r0 + ldr r1, [sp, #8] + add r0, r5, #0 + str r2, [sp, #0xc] + str r3, [sp, #0x10] + bl sub_02017350 + add r0, r5, #0 + mov r1, #0 + bl sub_02017348 + ldr r0, [sp, #4] + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x78 + cmp r6, r0 + blo _0226B942 +_0226B986: + ldr r1, _0226B994 ; =0x00000954 + ldr r0, [sp, #4] + strb r0, [r7, r1] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226B990: .word 0x0226E5A4 +_0226B994: .word 0x00000954 + thumb_func_end ov70_0226B92C + + thumb_func_start ov70_0226B998 +ov70_0226B998: ; 0x0226B998 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + str r0, [sp, #4] + add r5, r1, #0 + mov r0, #2 + ldrsh r1, [r5, r0] + mov r0, #0xc + add r6, r2, #0 + mul r0, r1 + mov r1, #0x30 + bl sub_020E1F6C + add r4, r0, #0 + ldr r0, _0226BABC ; =0x00000954 + ldr r1, [r5, r0] + cmp r4, r1 + beq _0226BA9C + str r4, [r5, r0] + cmp r4, #0 + beq _0226B9EA + mov r0, #0x30 + add r2, r6, #0 + mul r2, r0 + ldr r0, _0226BAC0 ; =0x0226E510 + lsl r1, r4, #2 + add r0, r0, r2 + add r2, r1, r0 + ldrh r0, [r1, r0] + add r1, sp, #8 + strh r0, [r1, #4] + ldrh r0, [r2, #2] + strh r0, [r1, #6] + ldrh r2, [r1, #4] + add r0, r5, #0 + mov r1, #0x78 + add r0, #0xc + mul r1, r2 + add r0, r0, r1 + mov r1, #0 + bl sub_02017348 +_0226B9EA: + mov r0, #0x30 + add r2, r6, #0 + mul r2, r0 + ldr r0, _0226BAC4 ; =0x0226E514 + lsl r1, r4, #2 + add r0, r0, r2 + add r2, r1, r0 + ldrh r1, [r1, r0] + add r0, sp, #8 + strh r1, [r0] + ldrh r4, [r2, #2] + strh r4, [r0, #2] + cmp r4, #0 + beq _0226BA8A + beq _0226BA1C + lsl r7, r4, #0xc + add r0, r7, #0 + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226BA2C +_0226BA1C: + lsl r7, r4, #0xc + add r0, r7, #0 + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226BA2C: + add r1, sp, #8 + ldrh r6, [r1] + bl sub_020E1740 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #0 + bl ov70_02269A90 + cmp r4, #0 + beq _0226BA58 + add r0, r7, #0 + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226BA66 +_0226BA58: + add r0, r7, #0 + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226BA66: + bl sub_020E1740 + str r0, [sp] + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + mov r3, #1 + bl ov70_02269A90 + add r1, r5, #0 + mov r0, #0x78 + add r1, #0xc + mul r0, r6 + add r0, r1, r0 + mov r1, #1 + bl sub_02017348 + b _0226BA9C +_0226BA8A: + ldrh r1, [r0] + add r2, r5, #0 + mov r0, #0x78 + mul r0, r1 + add r2, #0xc + add r0, r2, r0 + mov r1, #0 + bl sub_02017348 +_0226BA9C: + mov r0, #2 + ldrsh r0, [r5, r0] + cmp r0, #0x30 + bge _0226BAA8 + add r0, r0, #1 + strh r0, [r5, #2] +_0226BAA8: + mov r0, #2 + ldrsh r0, [r5, r0] + cmp r0, #0x30 + blt _0226BAB6 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0226BAB6: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BABC: .word 0x00000954 +_0226BAC0: .word 0x0226E510 +_0226BAC4: .word 0x0226E514 + thumb_func_end ov70_0226B998 + + thumb_func_start ov70_0226BAC8 +ov70_0226BAC8: ; 0x0226BAC8 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + add r7, r1, #0 + mov r4, #0 + str r2, [sp, #4] + add r0, r2, #0 + beq _0226BB1C + add r5, r7, #0 + add r5, #0xc +_0226BADC: + add r3, r4, #6 + lsl r6, r3, #2 + ldr r3, _0226BB2C ; =0x0226E5A4 + ldr r0, [sp] + add r1, r7, #0 + add r2, r4, #0 + add r3, r3, r6 + bl ov70_02269828 + ldr r0, [r7, #8] + add r1, sp, #8 + bl ov70_0225D054 + mov r0, #2 + ldr r1, [sp, #0xc] + lsl r0, r0, #0xe + add r2, r1, r0 + ldr r1, [sp, #8] + ldr r3, [sp, #0x10] + add r0, r5, #0 + str r2, [sp, #0xc] + bl sub_02017350 + add r0, r5, #0 + mov r1, #0 + bl sub_02017348 + ldr r0, [sp, #4] + add r4, r4, #1 + add r5, #0x78 + cmp r4, r0 + blo _0226BADC +_0226BB1C: + ldr r0, _0226BB30 ; =0x00000954 + mov r1, #0xff + strh r1, [r7, r0] + add r1, r0, #2 + ldr r0, [sp, #4] + strh r0, [r7, r1] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BB2C: .word 0x0226E5A4 +_0226BB30: .word 0x00000954 + thumb_func_end ov70_0226BAC8 + + thumb_func_start ov70_0226BB34 +ov70_0226BB34: ; 0x0226BB34 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp] + ldr r0, [r1, #8] + str r1, [sp, #4] + add r1, sp, #8 + bl ov70_0225D054 + mov r0, #0xa + ldr r7, [sp, #4] + mov r4, #0 + ldr r1, [sp, #0x10] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x10] + mov r0, #1 + ldr r1, [sp, #8] + lsl r0, r0, #0xe + sub r1, r1, r0 + str r1, [sp, #8] + ldr r1, [sp, #0xc] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0xc] + add r5, r4, #0 + add r7, #0xc +_0226BB68: + add r3, r4, #0 + add r3, #0x25 + lsl r6, r3, #2 + ldr r3, _0226BBA4 ; =0x0226E5A4 + add r2, r4, #0 + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, #0x10 + add r3, r3, r6 + bl ov70_02269828 + add r1, r4, #0 + add r1, #0x10 + mov r0, #0x78 + mul r0, r1 + ldr r1, [sp, #8] + ldr r2, [sp, #0xc] + ldr r3, [sp, #0x10] + add r0, r7, r0 + add r1, r1, r5 + bl sub_02017350 + mov r0, #6 + lsl r0, r0, #0xe + add r4, r4, #1 + add r5, r5, r0 + cmp r4, #2 + blt _0226BB68 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BBA4: .word 0x0226E5A4 + thumb_func_end ov70_0226BB34 + + thumb_func_start ov70_0226BBA8 +ov70_0226BBA8: ; 0x0226BBA8 + push {r3, r4, r5, r6, r7, lr} + ldr r0, _0226BBD8 ; =0x00000D0C + mov r2, #1 + strh r2, [r1, r0] + add r4, r1, #0 + mov r5, #0 + add r0, r0, #2 + strh r5, [r1, r0] + add r4, #0xc + add r7, r2, #0 + mov r6, #0x78 +_0226BBBE: + add r0, r5, #0 + add r0, #0x10 + add r1, r0, #0 + mul r1, r6 + add r0, r4, r1 + add r1, r7, #0 + bl sub_02017348 + add r5, r5, #1 + cmp r5, #2 + blt _0226BBBE + pop {r3, r4, r5, r6, r7, pc} + nop +_0226BBD8: .word 0x00000D0C + thumb_func_end ov70_0226BBA8 + + thumb_func_start ov70_0226BBDC +ov70_0226BBDC: ; 0x0226BBDC + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r1, _0226BC38 ; =0x00000D0C + add r7, r0, #0 + ldrh r0, [r5, r1] + cmp r0, #0 + beq _0226BC36 + add r0, r1, #2 + ldrh r0, [r5, r0] + cmp r0, #0xd + bhs _0226BBFE + add r0, r1, #2 + ldrh r0, [r5, r0] + add r2, r0, #1 + add r0, r1, #2 + strh r2, [r5, r0] + b _0226BC02 +_0226BBFE: + mov r0, #0 + strh r0, [r5, r1] +_0226BC02: + add r6, r5, #0 + mov r4, #0 + add r6, #0xc +_0226BC08: + ldr r0, _0226BC3C ; =0x00000D0E + ldrh r0, [r5, r0] + cmp r0, #0xd + bhs _0226BC20 + add r2, r4, #0 + add r0, r7, #0 + add r1, r5, #0 + add r2, #0x10 + mov r3, #0 + bl ov70_022699BC + b _0226BC30 +_0226BC20: + add r1, r4, #0 + add r1, #0x10 + mov r0, #0x78 + mul r0, r1 + add r0, r6, r0 + mov r1, #0 + bl sub_02017348 +_0226BC30: + add r4, r4, #1 + cmp r4, #2 + blt _0226BC08 +_0226BC36: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BC38: .word 0x00000D0C +_0226BC3C: .word 0x00000D0E + thumb_func_end ov70_0226BBDC + + thumb_func_start ov70_0226BC40 +ov70_0226BC40: ; 0x0226BC40 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, [sp, #0x30] + mov r7, #2 + str r0, [sp, #0x30] + ldr r0, [sp, #0x34] + mov r6, #1 + str r0, [sp, #0x34] + mov r0, #0x3b + lsl r0, r0, #4 + str r1, [r5, r0] + add r1, r0, #4 + ldr r4, [sp, #0x34] + strh r2, [r5, r1] + add r0, r0, #6 + strh r3, [r5, r0] + mov r0, #0 + str r0, [sp, #0x14] + mov r0, #3 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r4, #0xc + str r0, [sp, #0xc] +_0226BC70: + ldr r1, [sp, #0x10] + mov r0, #0x78 + mul r0, r1 + add r0, r4, r0 + str r0, [sp] + ldr r0, [sp, #0x34] + ldr r2, [sp, #0xc] + ldr r0, [r0, #8] + mov r1, #0x78 + mul r1, r2 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + mov r2, #0x78 + mov r3, #0x78 + mul r2, r6 + mul r3, r7 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, r1 + add r2, r4, r2 + add r3, r4, r3 + bl ov70_0226BD64 + ldr r0, [sp, #0x10] + add r7, r7, #4 + add r0, r0, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #0xc] + add r6, r6, #4 + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [sp, #0x14] + add r5, #0xec + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #4 + blt _0226BC70 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226BC40 + + thumb_func_start ov70_0226BCC0 +ov70_0226BCC0: ; 0x0226BCC0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0xed + lsl r0, r0, #2 + ldrh r0, [r5, r0] + str r1, [sp] + cmp r0, #0 + ble _0226BD2E + ldr r4, [sp, #8] + add r6, sp, #0x10 +_0226BCDC: + mov r0, #0x3b + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r0, r4 + ldrh r0, [r0, r4] + strh r0, [r6] + ldrh r0, [r1, #2] + strh r0, [r6, #2] + ldrh r1, [r6] + ldr r0, [sp] + cmp r1, r0 + bne _0226BD1A + ldrb r7, [r6, #2] + cmp r7, #4 + blo _0226BCFE + bl sub_02022974 +_0226BCFE: + ldrb r0, [r6, #3] + str r0, [sp, #4] + cmp r0, #4 + bls _0226BD0A + bl sub_02022974 +_0226BD0A: + mov r0, #0xec + mul r0, r7 + ldr r1, [sp, #4] + add r0, r5, r0 + bl ov70_0226BDA0 + mov r0, #1 + str r0, [sp, #8] +_0226BD1A: + ldr r0, [sp, #0xc] + add r4, r4, #4 + add r0, r0, #1 + str r0, [sp, #0xc] + mov r0, #0xed + lsl r0, r0, #2 + ldrh r1, [r5, r0] + ldr r0, [sp, #0xc] + cmp r0, r1 + blt _0226BCDC +_0226BD2E: + mov r7, #1 + mov r6, #0 + add r4, r5, #0 +_0226BD34: + add r0, r4, #0 + bl ov70_0226BDE8 + cmp r0, #0 + bne _0226BD40 + mov r7, #0 +_0226BD40: + add r6, r6, #1 + add r4, #0xec + cmp r6, #4 + blt _0226BD34 + ldr r0, _0226BD60 ; =0x000003B6 + ldrh r1, [r5, r0] + ldr r0, [sp] + cmp r1, r0 + bhi _0226BD5A + cmp r7, #1 + bne _0226BD5A + mov r0, #2 + str r0, [sp, #8] +_0226BD5A: + ldr r0, [sp, #8] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BD60: .word 0x000003B6 + thumb_func_end ov70_0226BCC0 + + thumb_func_start ov70_0226BD64 +ov70_0226BD64: ; 0x0226BD64 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [sp, #0x20] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #3 + blo _0226BD78 + bl sub_02022974 +_0226BD78: + add r0, r5, #0 + add r0, #0xd8 + str r4, [r0, #0] + add r0, r5, #0 + add r0, #0xdc + str r6, [r0, #0] + add r0, r5, #0 + add r0, #0xe0 + str r7, [r0, #0] + add r0, r5, #0 + ldr r1, [sp, #0x18] + add r0, #0xe4 + str r1, [r0, #0] + add r0, r5, #0 + ldr r1, [sp, #0x1c] + add r0, #0xe8 + str r1, [r0, #0] + ldr r0, [sp, #0x20] + strh r0, [r5, #2] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0226BD64 + + thumb_func_start ov70_0226BDA0 +ov70_0226BDA0: ; 0x0226BDA0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + ldr r4, _0226BDE0 ; =0x00000000 + beq _0226BDC0 + add r5, r7, #0 +_0226BDAC: + add r0, r5, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02017348 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r6 + blo _0226BDAC +_0226BDC0: + mov r0, #0 + strh r0, [r7] + mov r0, #1 + strb r0, [r7, #6] + strh r6, [r7, #4] + ldrh r2, [r7, #2] + add r1, r7, #0 + add r1, #0xe8 + lsl r3, r2, #2 + ldr r2, _0226BDE4 ; =0x0226E364 + ldr r1, [r1, #0] + ldr r2, [r2, r3] + add r0, r7, #0 + blx r2 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226BDE0: .word 0x00000000 +_0226BDE4: .word 0x0226E364 + thumb_func_end ov70_0226BDA0 + + thumb_func_start ov70_0226BDE8 +ov70_0226BDE8: ; 0x0226BDE8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrb r1, [r5, #6] + cmp r1, #0 + bne _0226BDF6 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0226BDF6: + ldrh r1, [r5, #2] + lsl r2, r1, #2 + ldr r1, _0226BE38 ; =0x0226E31C + ldr r1, [r1, r2] + blx r1 + mov r6, #0 + str r0, [sp] + ldrsh r0, [r5, r6] + add r0, r0, #1 + strh r0, [r5] + ldr r0, [sp] + cmp r0, #1 + bne _0226BE34 + ldrh r0, [r5, #4] + cmp r0, #0 + ble _0226BE30 + add r4, r5, #0 + add r7, r6, #0 +_0226BE1A: + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r1, r7, #0 + bl sub_02017348 + ldrh r0, [r5, #4] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _0226BE1A +_0226BE30: + mov r0, #0 + strb r0, [r5, #6] +_0226BE34: + ldr r0, [sp] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BE38: .word 0x0226E31C + thumb_func_end ov70_0226BDE8 + + thumb_func_start ov70_0226BE3C +ov70_0226BE3C: ; 0x0226BE3C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + str r0, [sp, #0x10] + add r0, r1, #0 + add r1, sp, #0x24 + bl ov70_0225D054 + mov r1, #2 + ldr r0, [sp, #0x24] + lsl r1, r1, #0xe + add r0, r0, r1 + str r0, [sp, #0x24] + ldr r2, [sp, #0x28] + lsl r0, r1, #1 + add r0, r2, r0 + str r0, [sp, #0x28] + ldr r0, [sp, #0x2c] + mov r4, #0 + sub r0, r0, r1 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x10] + ldrh r0, [r0, #4] + cmp r0, #0 + ble _0226BF50 + ldr r0, [sp, #0x10] + str r0, [sp, #0x1c] + add r0, #8 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x10] + str r0, [sp, #0x18] + add r0, #0xa8 + str r0, [sp, #0x18] + ldr r0, [sp, #0x10] + str r0, [sp, #0x14] +_0226BE80: + cmp r4, #3 + bhi _0226BEFE + add r0, r4, r4 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226BE90: ; jump table + .short _0226BE98 - _0226BE90 - 2 ; case 0 + .short _0226BEB0 - _0226BE90 - 2 ; case 1 + .short _0226BEC8 - _0226BE90 - 2 ; case 2 + .short _0226BEE4 - _0226BE90 - 2 ; case 3 +_0226BE98: + mov r0, #3 + ldr r1, [sp, #0x24] + lsl r0, r0, #0xe + sub r7, r1, r0 + mov r0, #1 + ldr r1, [sp, #0x28] + lsl r0, r0, #0x10 + add r6, r1, r0 + ldr r5, [sp, #0x2c] + mov r0, #0 + str r0, [sp, #0x20] + b _0226BEFE +_0226BEB0: + mov r0, #3 + ldr r1, [sp, #0x24] + lsl r0, r0, #0xe + add r7, r1, r0 + mov r0, #1 + ldr r1, [sp, #0x28] + lsl r0, r0, #0x10 + add r6, r1, r0 + ldr r5, [sp, #0x2c] + ldr r0, _0226BF54 ; =0x00007FFF + str r0, [sp, #0x20] + b _0226BEFE +_0226BEC8: + mov r0, #2 + ldr r1, [sp, #0x24] + lsl r0, r0, #0xe + sub r7, r1, r0 + ldr r1, [sp, #0x28] + lsl r0, r0, #1 + add r6, r1, r0 + mov r0, #6 + ldr r1, [sp, #0x2c] + lsl r0, r0, #0xc + sub r5, r1, r0 + ldr r0, _0226BF54 ; =0x00007FFF + str r0, [sp, #0x20] + b _0226BEFE +_0226BEE4: + mov r0, #2 + ldr r1, [sp, #0x24] + lsl r0, r0, #0xe + add r7, r1, r0 + ldr r1, [sp, #0x28] + lsl r0, r0, #1 + add r6, r1, r0 + mov r0, #6 + ldr r1, [sp, #0x2c] + lsl r0, r0, #0xc + sub r5, r1, r0 + mov r0, #0 + str r0, [sp, #0x20] +_0226BEFE: + str r6, [sp] + ldr r0, [sp, #0x2c] + add r2, r7, #0 + str r0, [sp, #4] + str r5, [sp, #8] + mov r0, #0x12 + str r0, [sp, #0xc] + ldr r0, [sp, #0x1c] + ldr r1, [sp, #0x24] + ldr r3, [sp, #0x28] + bl ov70_022692B4 + mov r3, #6 + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x20] + ldr r2, _0226BF58 ; =0x00000CCC + lsl r3, r3, #0xc + bl ov70_0226949C + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x24] + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x2c] + bl sub_02017350 + ldr r0, [sp, #0x1c] + add r4, r4, #1 + add r0, #0x28 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, #0xc + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r0, r0, #4 + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + ldrh r0, [r0, #4] + cmp r4, r0 + blt _0226BE80 +_0226BF50: + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226BF54: .word 0x00007FFF +_0226BF58: .word 0x00000CCC + thumb_func_end ov70_0226BE3C + + thumb_func_start ov70_0226BF5C +ov70_0226BF5C: ; 0x0226BF5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [sp] + ldrh r0, [r0, #4] + cmp r0, #0 + ble _0226BFDC + ldr r0, [sp] + ldr r6, [sp] + str r0, [sp, #4] + add r0, #0xa8 + add r6, #8 + ldr r5, [sp] + str r0, [sp, #4] + add r4, r0, #0 + add r7, r6, #0 +_0226BF80: + ldr r0, [sp, #4] + bl ov70_022694D0 + ldr r2, [sp] + mov r1, #0 + ldrsh r1, [r2, r1] + add r0, r6, #0 + bl ov70_022692DC + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0x10 + bl ov70_02269508 + add r0, r7, #0 + add r1, sp, #0x14 + add r2, sp, #0x18 + add r3, sp, #0x1c + bl ov70_02269488 + ldr r1, [sp, #0x14] + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x18] + add r1, r1, r0 + add r0, r5, #0 + str r1, [sp, #0x14] + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r3, [sp, #0x1c] + bl sub_02017350 + ldr r0, [sp, #4] + add r6, #0x28 + add r0, #0xc + str r0, [sp, #4] + ldr r0, [sp, #0xc] + add r4, #0xc + add r0, r0, #1 + str r0, [sp, #0xc] + ldr r0, [sp] + add r7, #0x28 + ldrh r1, [r0, #4] + ldr r0, [sp, #0xc] + add r5, r5, #4 + cmp r0, r1 + blt _0226BF80 +_0226BFDC: + ldr r0, [sp, #8] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226BF5C + + thumb_func_start ov70_0226BFE4 +ov70_0226BFE4: ; 0x0226BFE4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r0, [sp, #0x10] + add r0, r1, #0 + add r1, sp, #0x1c + bl ov70_0225D054 + mov r0, #2 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0xe + add r1, r1, r0 + str r1, [sp, #0x1c] + ldr r1, [sp, #0x20] + mov r4, #0 + add r1, r1, r0 + str r1, [sp, #0x20] + ldr r1, [sp, #0x24] + sub r0, r1, r0 + str r0, [sp, #0x24] + ldr r0, [sp, #0x10] + ldrh r0, [r0, #4] + cmp r0, #0 + ble _0226C0C6 + ldr r1, [sp, #0x10] + str r1, [sp, #0x18] + add r1, #8 + str r1, [sp, #0x18] + ldr r1, [sp, #0x10] + str r1, [sp, #0x14] + add r1, #0xa8 + str r1, [sp, #0x14] +_0226C022: + cmp r4, #3 + bhi _0226C08A + add r1, r4, r4 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226C032: ; jump table + .short _0226C03A - _0226C032 - 2 ; case 0 + .short _0226C04A - _0226C032 - 2 ; case 1 + .short _0226C05A - _0226C032 - 2 ; case 2 + .short _0226C07C - _0226C032 - 2 ; case 3 +_0226C03A: + mov r0, #1 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0x10 + sub r7, r1, r0 + ldr r1, [sp, #0x24] + ldr r6, [sp, #0x20] + add r5, r1, r0 + b _0226C08A +_0226C04A: + mov r0, #1 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0x10 + add r7, r1, r0 + ldr r1, [sp, #0x24] + ldr r6, [sp, #0x20] + add r5, r1, r0 + b _0226C08A +_0226C05A: + cmp r0, #3 + bne _0226C06C + mov r0, #2 + ldr r1, [sp, #0x24] + lsl r0, r0, #0x10 + ldr r7, [sp, #0x1c] + ldr r6, [sp, #0x20] + sub r5, r1, r0 + b _0226C08A +_0226C06C: + mov r0, #1 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0x10 + sub r7, r1, r0 + ldr r1, [sp, #0x24] + ldr r6, [sp, #0x20] + sub r5, r1, r0 + b _0226C08A +_0226C07C: + mov r0, #1 + ldr r1, [sp, #0x1c] + lsl r0, r0, #0x10 + add r7, r1, r0 + ldr r1, [sp, #0x24] + ldr r6, [sp, #0x20] + sub r5, r1, r0 +_0226C08A: + str r6, [sp] + ldr r0, [sp, #0x24] + add r2, r7, #0 + str r0, [sp, #4] + str r5, [sp, #8] + mov r0, #0x13 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + ldr r1, [sp, #0x1c] + ldr r3, [sp, #0x20] + bl ov70_022692B4 + mov r3, #2 + ldr r0, [sp, #0x14] + ldr r1, _0226C0D0 ; =0x00001555 + ldr r2, _0226C0D4 ; =0x0000071C + lsl r3, r3, #0x10 + bl ov70_0226949C + ldr r0, [sp, #0x18] + add r4, r4, #1 + add r0, #0x28 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r0, #0xc + str r0, [sp, #0x14] + ldr r0, [sp, #0x10] + ldrh r0, [r0, #4] + cmp r4, r0 + blt _0226C022 +_0226C0C6: + ldr r0, [sp, #0x10] + bl ov70_0226C0D8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C0D0: .word 0x00001555 +_0226C0D4: .word 0x0000071C + thumb_func_end ov70_0226BFE4 + + thumb_func_start ov70_0226C0D8 +ov70_0226C0D8: ; 0x0226C0D8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0 + str r0, [sp, #8] + ldrh r0, [r5, #4] + cmp r0, #0 + ble _0226C16A + add r4, r5, #0 + add r0, r5, #0 + add r4, #0xa8 + str r0, [sp, #4] + add r0, #8 + str r0, [sp, #4] + str r4, [sp] + add r6, r0, #0 + add r7, r5, #0 +_0226C0FA: + mov r0, #0 + ldrsh r0, [r5, r0] + cmp r0, #0xe + bne _0226C112 + mov r3, #3 + ldr r2, _0226C178 ; =0x00000E38 + add r0, r4, #0 + mov r1, #0 + lsl r3, r3, #0xe + bl ov70_0226949C + b _0226C118 +_0226C112: + add r0, r4, #0 + bl ov70_022694D0 +_0226C118: + mov r1, #0 + ldrsh r1, [r5, r1] + ldr r0, [sp, #4] + bl ov70_022692DC + ldr r0, [sp] + add r1, sp, #0xc + bl ov70_02269508 + add r0, r6, #0 + add r1, sp, #0x10 + add r2, sp, #0x14 + add r3, sp, #0x18 + bl ov70_02269488 + ldr r1, [sp, #0x14] + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x18] + add r2, r1, r0 + add r0, r7, #0 + str r2, [sp, #0x14] + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x10] + bl sub_02017350 + ldr r0, [sp, #4] + ldrh r1, [r5, #4] + add r0, #0x28 + str r0, [sp, #4] + ldr r0, [sp] + add r4, #0xc + add r0, #0xc + str r0, [sp] + ldr r0, [sp, #8] + add r6, #0x28 + add r0, r0, #1 + add r7, r7, #4 + str r0, [sp, #8] + cmp r0, r1 + blt _0226C0FA +_0226C16A: + mov r0, #0 + ldrsh r1, [r5, r0] + cmp r1, #0x16 + blt _0226C174 + mov r0, #1 +_0226C174: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C178: .word 0x00000E38 + thumb_func_end ov70_0226C0D8 + + thumb_func_start ov70_0226C17C +ov70_0226C17C: ; 0x0226C17C + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + add r0, r1, #0 + add r1, sp, #0x10 + bl ov70_0225D054 + mov r1, #2 + ldr r0, [sp, #0x10] + lsl r1, r1, #0xe + add r0, r0, r1 + str r0, [sp, #0x10] + mov r0, #5 + ldr r2, [sp, #0x14] + lsl r0, r0, #0xe + add r0, r2, r0 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + mov r4, #0 + sub r0, r0, r1 + str r0, [sp, #0x18] + ldrh r0, [r5, #4] + cmp r0, #0 + ble _0226C1D8 + mov r6, #5 + mov r7, #7 + lsl r6, r6, #0xc + lsl r7, r7, #0xc +_0226C1B4: + str r6, [sp] + mov r0, #0xe + mov r3, #0xd + str r7, [sp, #4] + lsl r0, r0, #0xc + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r4, #0 + add r2, sp, #0x10 + lsl r3, r3, #0xc + bl ov70_0226C2A4 + ldrh r0, [r5, #4] + add r4, r4, #1 + cmp r4, r0 + blt _0226C1B4 +_0226C1D8: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_0226C17C + + thumb_func_start ov70_0226C1DC +ov70_0226C1DC: ; 0x0226C1DC + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r5, r0, #0 + ldrh r0, [r5, #4] + mov r6, #0 + cmp r0, #0 + ble _0226C27E + add r4, r5, #0 + str r4, [sp, #0x10] + add r4, #8 + str r4, [sp, #0x10] + add r7, r5, #0 +_0226C1F4: + mov r1, #0 + ldrsh r1, [r5, r1] + ldr r0, [sp, #0x10] + bl ov70_022692DC + str r0, [sp, #0x14] + add r0, r4, #0 + add r1, sp, #0x18 + add r2, sp, #0x1c + add r3, sp, #0x20 + bl ov70_02269488 + add r0, r7, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x20] + bl sub_02017350 + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _0226C26C + ldrb r0, [r5, #7] + add r2, sp, #0x18 + cmp r0, #0 + bne _0226C24A + mov r0, #1 + lsl r0, r0, #0xe + str r0, [sp] + ldr r0, _0226C2A0 ; =0xFFFFD000 + ldr r3, _0226C2A0 ; =0xFFFFD000 + str r0, [sp, #4] + mov r0, #3 + lsl r0, r0, #0xc + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl ov70_0226C2A4 + b _0226C26C +_0226C24A: + mov r0, #5 + lsl r0, r0, #0xc + str r0, [sp] + mov r0, #6 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0xa + lsl r0, r0, #0xc + str r0, [sp, #8] + mov r0, #4 + mov r3, #0xa + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + lsl r3, r3, #0xc + bl ov70_0226C2A4 +_0226C26C: + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r0, #0x28 + str r0, [sp, #0x10] + ldrh r0, [r5, #4] + add r4, #0x28 + add r7, r7, #4 + cmp r6, r0 + blt _0226C1F4 +_0226C27E: + ldr r0, [sp, #0x14] + cmp r0, #1 + bne _0226C29A + ldrb r0, [r5, #7] + add r0, r0, #1 + cmp r0, #3 + bge _0226C294 + strb r0, [r5, #7] + mov r0, #0 + strh r0, [r5] + b _0226C29A +_0226C294: + add sp, #0x24 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0226C29A: + mov r0, #0 + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C2A0: .word 0xFFFFD000 + thumb_func_end ov70_0226C1DC + + thumb_func_start ov70_0226C2A4 +ov70_0226C2A4: ; 0x0226C2A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r7, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r5, #3 + bhi _0226C302 + add r3, r5, r5 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_0226C2C0: ; jump table + .short _0226C2C8 - _0226C2C0 - 2 ; case 0 + .short _0226C2D6 - _0226C2C0 - 2 ; case 1 + .short _0226C2E4 - _0226C2C0 - 2 ; case 2 + .short _0226C2F4 - _0226C2C0 - 2 ; case 3 +_0226C2C8: + ldr r0, [r4, #0] + ldr r1, [r4, #4] + sub r2, r0, r6 + ldr r0, [sp, #0x28] + add r0, r1, r0 + ldr r1, [r4, #8] + b _0226C302 +_0226C2D6: + ldr r0, [r4, #0] + ldr r1, [r4, #4] + add r2, r0, r6 + ldr r0, [sp, #0x28] + add r0, r1, r0 + ldr r1, [r4, #8] + b _0226C302 +_0226C2E4: + ldr r1, [r4, #0] + ldr r0, [sp, #0x2c] + sub r2, r1, r0 + ldr r1, [r4, #4] + ldr r0, [sp, #0x30] + add r0, r1, r0 + ldr r1, [r4, #8] + b _0226C302 +_0226C2F4: + ldr r1, [r4, #0] + ldr r0, [sp, #0x2c] + add r2, r1, r0 + ldr r1, [r4, #4] + ldr r0, [sp, #0x30] + add r0, r1, r0 + ldr r1, [r4, #8] +_0226C302: + str r0, [sp] + ldr r0, [r4, #8] + str r0, [sp, #4] + str r1, [sp, #8] + ldr r0, [sp, #0x34] + add r1, r7, #0 + str r0, [sp, #0xc] + mov r0, #0x28 + add r1, #8 + mul r0, r5 + add r0, r1, r0 + ldr r1, [r4, #0] + ldr r3, [r4, #4] + bl ov70_022692B4 + lsl r0, r5, #2 + add r0, r7, r0 + add r0, #0xd8 + ldr r0, [r0, #0] + ldr r1, [r4, #0] + ldr r2, [r4, #4] + ldr r3, [r4, #8] + bl sub_02017350 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C2A4 + + .rodata + + + .global Unk_ov70_0226E2E8 +Unk_ov70_0226E2E8: ; 0x0226E2E8 + .incbin "incbin/overlay70_rodata.bin", 0xE1C, 0xE20 - 0xE1C + + .global Unk_ov70_0226E2EC +Unk_ov70_0226E2EC: ; 0x0226E2EC + .incbin "incbin/overlay70_rodata.bin", 0xE20, 0xE28 - 0xE20 + + .global Unk_ov70_0226E2F4 +Unk_ov70_0226E2F4: ; 0x0226E2F4 + .incbin "incbin/overlay70_rodata.bin", 0xE28, 0xE30 - 0xE28 + + .global Unk_ov70_0226E2FC +Unk_ov70_0226E2FC: ; 0x0226E2FC + .incbin "incbin/overlay70_rodata.bin", 0xE30, 0xE38 - 0xE30 + + .global Unk_ov70_0226E304 +Unk_ov70_0226E304: ; 0x0226E304 + .incbin "incbin/overlay70_rodata.bin", 0xE38, 0xE40 - 0xE38 + + .global Unk_ov70_0226E30C +Unk_ov70_0226E30C: ; 0x0226E30C + .incbin "incbin/overlay70_rodata.bin", 0xE40, 0xE48 - 0xE40 + + .global Unk_ov70_0226E314 +Unk_ov70_0226E314: ; 0x0226E314 + .incbin "incbin/overlay70_rodata.bin", 0xE48, 0xE50 - 0xE48 + + .global Unk_ov70_0226E31C +Unk_ov70_0226E31C: ; 0x0226E31C + .incbin "incbin/overlay70_rodata.bin", 0xE50, 0xE5C - 0xE50 + + .global Unk_ov70_0226E328 +Unk_ov70_0226E328: ; 0x0226E328 + .incbin "incbin/overlay70_rodata.bin", 0xE5C, 0xE68 - 0xE5C + + .global Unk_ov70_0226E334 +Unk_ov70_0226E334: ; 0x0226E334 + .incbin "incbin/overlay70_rodata.bin", 0xE68, 0xE74 - 0xE68 + + .global Unk_ov70_0226E340 +Unk_ov70_0226E340: ; 0x0226E340 + .incbin "incbin/overlay70_rodata.bin", 0xE74, 0xE80 - 0xE74 + + .global Unk_ov70_0226E34C +Unk_ov70_0226E34C: ; 0x0226E34C + .incbin "incbin/overlay70_rodata.bin", 0xE80, 0xE8C - 0xE80 + + .global Unk_ov70_0226E358 +Unk_ov70_0226E358: ; 0x0226E358 + .incbin "incbin/overlay70_rodata.bin", 0xE8C, 0xE98 - 0xE8C + + .global Unk_ov70_0226E364 +Unk_ov70_0226E364: ; 0x0226E364 + .incbin "incbin/overlay70_rodata.bin", 0xE98, 0xEA4 - 0xE98 + + .global Unk_ov70_0226E370 +Unk_ov70_0226E370: ; 0x0226E370 + .incbin "incbin/overlay70_rodata.bin", 0xEA4, 0xED4 - 0xEA4 + + .global Unk_ov70_0226E3A0 +Unk_ov70_0226E3A0: ; 0x0226E3A0 + .incbin "incbin/overlay70_rodata.bin", 0xED4, 0xF04 - 0xED4 + + .global Unk_ov70_0226E3D0 +Unk_ov70_0226E3D0: ; 0x0226E3D0 + .incbin "incbin/overlay70_rodata.bin", 0xF04, 0xF70 - 0xF04 + + .global Unk_ov70_0226E43C +Unk_ov70_0226E43C: ; 0x0226E43C + .incbin "incbin/overlay70_rodata.bin", 0xF70, 0xFDC - 0xF70 + + .global Unk_ov70_0226E4A8 +Unk_ov70_0226E4A8: ; 0x0226E4A8 + .incbin "incbin/overlay70_rodata.bin", 0xFDC, 0x1048 - 0xFDC + + .global Unk_ov70_0226E514 +Unk_ov70_0226E514: ; 0x0226E514 + .incbin "incbin/overlay70_rodata.bin", 0x1048, 0x10D8 - 0x1048 + + .global Unk_ov70_0226E5A4 +Unk_ov70_0226E5A4: ; 0x0226E5A4 + .incbin "incbin/overlay70_rodata.bin", 0x10D8, 0x1174 - 0x10D8 + + .global Unk_ov70_0226E640 +Unk_ov70_0226E640: ; 0x0226E640 + .incbin "incbin/overlay70_rodata.bin", 0x1174, 0x1184 - 0x1174 + + .global Unk_ov70_0226E650 +Unk_ov70_0226E650: ; 0x0226E650 + .incbin "incbin/overlay70_rodata.bin", 0x1184, 0x1194 - 0x1184 + + .global Unk_ov70_0226E660 +Unk_ov70_0226E660: ; 0x0226E660 + .incbin "incbin/overlay70_rodata.bin", 0x1194, 0x10 + diff --git a/asm/ov70_0226C338.s b/asm/ov70_0226C338.s new file mode 100644 index 000000000..85acfb4d4 --- /dev/null +++ b/asm/ov70_0226C338.s @@ -0,0 +1,412 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0226C338 +ov70_0226C338: ; 0x0226C338 + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x60 + add r6, r2, #0 + bl sub_02018144 + mov r1, #0 + mov r2, #0x60 + add r4, r0, #0 + bl sub_020D5124 + mov r1, #0xa + ldr r2, _0226C394 ; =0x0226E678 + mul r1, r5 + add r0, r4, #0 + add r1, r2, r1 + bl ov70_0226C568 + ldr r2, _0226C398 ; =0x0226E670 + lsl r1, r6, #1 + add r0, r4, #0 + add r1, r2, r1 + bl ov70_0226C58C + mov r1, #0 + add r2, r4, #0 + mov r0, #0x3c +_0226C36E: + add r1, r1, #1 + str r0, [r2, #0x48] + add r2, r2, #4 + cmp r1, #2 + blt _0226C36E + mov r2, #0 + add r1, r4, #0 + mov r0, #0x3c +_0226C37E: + add r2, r2, #1 + str r0, [r1, #0x50] + add r1, r1, #4 + cmp r2, #4 + blt _0226C37E + add r0, r4, #0 + bl ov70_0226C598 + add r0, r4, #0 + pop {r4, r5, r6, pc} + nop +_0226C394: .word 0x0226E678 +_0226C398: .word 0x0226E670 + thumb_func_end ov70_0226C338 + + thumb_func_start ov70_0226C39C +ov70_0226C39C: ; 0x0226C39C + ldr r3, _0226C3A0 ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_0226C3A0: .word sub_020181C4 + thumb_func_end ov70_0226C39C + + thumb_func_start ov70_0226C3A4 +ov70_0226C3A4: ; 0x0226C3A4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp, #4] + ldr r4, [sp, #4] + mov r0, #0 + add r6, r4, #0 + add r5, r4, #0 + add r7, r0, #0 + add r6, #0x30 + add r5, #0x18 +_0226C3B8: + ldr r1, [r4, #0x48] + add r1, r1, #1 + cmp r1, #0x3c + bgt _0226C3D4 + str r1, [r4, #0x48] + mov r0, #0x3c + str r0, [sp] + ldr r3, [r4, #0x48] + add r0, r5, #0 + add r1, r6, #0 + add r2, r4, #0 + bl ov70_0226C50C + mov r0, #1 +_0226C3D4: + add r7, r7, #1 + add r4, r4, #4 + add r6, r6, #4 + add r5, r5, #4 + cmp r7, #2 + blt _0226C3B8 + ldr r4, [sp, #4] + mov r1, #0 + add r7, r4, #0 + add r6, r4, #0 + add r5, r4, #0 + str r1, [sp, #8] + add r7, #8 + add r6, #0x38 + add r5, #0x20 +_0226C3F2: + ldr r1, [r4, #0x50] + add r1, r1, #1 + cmp r1, #0x3c + bgt _0226C40E + str r1, [r4, #0x50] + mov r0, #0x3c + str r0, [sp] + ldr r3, [r4, #0x50] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov70_0226C50C + mov r0, #1 +_0226C40E: + ldr r1, [sp, #8] + add r4, r4, #4 + add r1, r1, #1 + add r7, r7, #4 + add r6, r6, #4 + add r5, r5, #4 + str r1, [sp, #8] + cmp r1, #4 + blt _0226C3F2 + cmp r0, #0 + beq _0226C42A + ldr r0, [sp, #4] + bl ov70_0226C598 +_0226C42A: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C3A4 + + thumb_func_start ov70_0226C430 +ov70_0226C430: ; 0x0226C430 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrb r0, [r5] + ldr r2, _0226C49C ; =0x0226E678 + strb r0, [r5, #0x18] + ldrb r0, [r5, #1] + strb r0, [r5, #0x19] + ldrb r0, [r5, #2] + strb r0, [r5, #0x1a] + ldrb r0, [r5, #3] + strb r0, [r5, #0x1b] + mov r0, #0 + str r0, [r5, #0x48] + mov r0, #0xa + mul r0, r1 + add r4, r2, r0 + add r0, r5, #0 + add r0, #0x30 + add r1, r4, #0 + bl ov70_0226C4E8 + add r6, r4, #2 + add r4, r5, #0 + mov r7, #0 + add r4, #0x38 +_0226C462: + ldrb r1, [r5, #8] + add r0, r5, #0 + add r0, #0x20 + strb r1, [r0] + add r0, r5, #0 + ldrb r1, [r5, #9] + add r0, #0x21 + strb r1, [r0] + add r0, r5, #0 + ldrb r1, [r5, #0xa] + add r0, #0x22 + strb r1, [r0] + add r0, r5, #0 + ldrb r1, [r5, #0xb] + add r0, #0x23 + strb r1, [r0] + mov r0, #0 + str r0, [r5, #0x50] + add r0, r4, #0 + add r1, r6, #0 + bl ov70_0226C4E8 + add r7, r7, #1 + add r5, r5, #4 + add r6, r6, #2 + add r4, r4, #4 + cmp r7, #4 + blt _0226C462 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226C49C: .word 0x0226E678 + thumb_func_end ov70_0226C430 + + thumb_func_start ov70_0226C4A0 +ov70_0226C4A0: ; 0x0226C4A0 + ldrb r2, [r0, #4] + ldr r3, _0226C4C0 ; =ov70_0226C4E8 + lsl r1, r1, #1 + strb r2, [r0, #0x1c] + ldrb r2, [r0, #5] + strb r2, [r0, #0x1d] + ldrb r2, [r0, #6] + strb r2, [r0, #0x1e] + ldrb r2, [r0, #7] + strb r2, [r0, #0x1f] + mov r2, #0 + str r2, [r0, #0x4c] + ldr r2, _0226C4C4 ; =0x0226E670 + add r0, #0x34 + add r1, r2, r1 + bx r3 + ; .align 2, 0 +_0226C4C0: .word ov70_0226C4E8 +_0226C4C4: .word 0x0226E670 + thumb_func_end ov70_0226C4A0 + + thumb_func_start ov70_0226C4C8 +ov70_0226C4C8: ; 0x0226C4C8 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226C4C8 + + thumb_func_start ov70_0226C4CC +ov70_0226C4CC: ; 0x0226C4CC + push {r3, r4} + mov r3, #0 + mov r2, #2 + ldrsb r4, [r0, r3] + ldrsb r2, [r0, r2] + mov r3, #1 + ldrsb r0, [r0, r3] + lsl r2, r2, #0xa + lsl r0, r0, #5 + orr r0, r4 + orr r0, r2 + strh r0, [r1] + pop {r3, r4} + bx lr + thumb_func_end ov70_0226C4CC + + thumb_func_start ov70_0226C4E8 +ov70_0226C4E8: ; 0x0226C4E8 + push {r3, r4} + ldrh r3, [r1] + mov r2, #0x1f + and r3, r2 + strb r3, [r0] + ldrh r4, [r1] + lsl r3, r2, #5 + and r3, r4 + asr r3, r3, #5 + strb r3, [r0, #1] + ldrh r3, [r1] + lsl r1, r2, #0xa + and r1, r3 + asr r1, r1, #0xa + strb r1, [r0, #2] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226C4E8 + + thumb_func_start ov70_0226C50C +ov70_0226C50C: ; 0x0226C50C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #1 + add r4, r2, #0 + ldrsb r2, [r1, r0] + ldrsb r0, [r5, r0] + add r6, r3, #0 + sub r0, r2, r0 + str r0, [sp, #4] + mov r0, #2 + ldrsb r2, [r1, r0] + ldrsb r0, [r5, r0] + sub r0, r2, r0 + str r0, [sp] + mov r0, #0 + ldrsb r7, [r5, r0] + ldrsb r0, [r1, r0] + ldr r1, [sp, #0x20] + sub r0, r0, r7 + mul r0, r6 + bl sub_020E1F6C + add r0, r7, r0 + strb r0, [r4] + ldr r0, [sp, #4] + ldr r1, [sp, #0x20] + mul r0, r6 + bl sub_020E1F6C + mov r1, #1 + ldrsb r1, [r5, r1] + add r0, r1, r0 + strb r0, [r4, #1] + ldr r0, [sp] + ldr r1, [sp, #0x20] + mul r0, r6 + bl sub_020E1F6C + mov r1, #2 + ldrsb r1, [r5, r1] + add r0, r1, r0 + strb r0, [r4, #2] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C50C + + thumb_func_start ov70_0226C568 +ov70_0226C568: ; 0x0226C568 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov70_0226C4E8 + mov r6, #0 + add r4, r4, #2 + add r5, #8 +_0226C578: + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226C4E8 + add r6, r6, #1 + add r4, r4, #2 + add r5, r5, #4 + cmp r6, #4 + blt _0226C578 + pop {r4, r5, r6, pc} + thumb_func_end ov70_0226C568 + + thumb_func_start ov70_0226C58C +ov70_0226C58C: ; 0x0226C58C + ldr r3, _0226C594 ; =ov70_0226C4E8 + add r0, r0, #4 + bx r3 + nop +_0226C594: .word ov70_0226C4E8 + thumb_func_end ov70_0226C58C + + thumb_func_start ov70_0226C598 +ov70_0226C598: ; 0x0226C598 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, sp, #4 + str r0, [sp] + mov r4, #0 + add r5, r0, #0 + add r7, #2 + add r6, sp, #4 +_0226C5A8: + add r0, r5, #0 + add r1, r7, #0 + bl ov70_0226C4CC + ldrh r1, [r6, #2] + add r0, r4, #0 + bl sub_020AF558 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0226C5A8 + ldr r0, [sp] + add r1, sp, #4 + add r0, #8 + add r1, #2 + bl ov70_0226C4CC + ldr r0, [sp] + add r1, sp, #4 + add r0, #0xc + bl ov70_0226C4CC + add r1, sp, #4 + ldrh r0, [r1, #2] + ldrh r1, [r1] + mov r2, #0 + bl sub_020AF56C + ldr r0, [sp] + add r1, sp, #4 + add r0, #0x10 + add r1, #2 + bl ov70_0226C4CC + ldr r0, [sp] + add r1, sp, #4 + add r0, #0x14 + str r0, [sp] + bl ov70_0226C4CC + add r1, sp, #4 + ldrh r0, [r1, #2] + ldrh r1, [r1] + mov r2, #0 + bl sub_020AF590 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C598 + + .rodata + + + .global Unk_ov70_0226E670 +Unk_ov70_0226E670: ; 0x0226E670 + .incbin "incbin/overlay70_rodata.bin", 0x11A4, 0x11AC - 0x11A4 + + .global Unk_ov70_0226E678 +Unk_ov70_0226E678: ; 0x0226E678 + .incbin "incbin/overlay70_rodata.bin", 0x11AC, 0x3C + diff --git a/asm/ov70_0226C60C.s b/asm/ov70_0226C60C.s new file mode 100644 index 000000000..10ac07b4a --- /dev/null +++ b/asm/ov70_0226C60C.s @@ -0,0 +1,338 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0226C60C +ov70_0226C60C: ; 0x0226C60C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + mov r1, #0x1c + add r6, r0, #0 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x1c + mov r0, #0 +_0226C622: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0226C622 + str r5, [r4, #0] + add r0, r5, #0 + bl ov70_0225DEE8 + str r0, [r4, #4] + add r0, r5, #0 + bl ov70_0225DEF8 + str r0, [r4, #8] + add r0, r5, #0 + bl ov70_0225DEF0 + str r0, [r4, #0xc] + ldr r0, [r4, #4] + bl ov66_0222E1B8 + bl ov70_0226C81C + add r7, r0, #0 + ldr r0, [r4, #4] + bl ov66_0222E1D0 + bl ov70_0226C848 + str r0, [sp, #4] + ldr r0, [r4, #4] + bl ov66_0222E1E8 + bl ov70_0226C87C + add r3, r0, #0 + ldr r2, [sp, #4] + add r0, r6, #0 + add r1, r7, #0 + bl ov70_0226C338 + str r0, [r4, #0x10] + add r0, r5, #0 + add r1, r6, #0 + bl ov70_0226CE54 + str r0, [r4, #0x14] + ldr r0, [r4, #4] + ldr r1, [r4, #8] + add r2, r6, #0 + bl ov70_0226C8B4 + str r0, [r4, #0x18] + ldr r0, [r4, #0xc] + add r1, r7, #0 + bl ov70_0225CAEC + ldr r0, [r4, #4] + bl ov66_0222E158 + add r5, r0, #0 + ldr r0, [r4, #4] + bl ov66_0222E120 + ldr r0, [r4, #4] + bl ov66_0222E170 + str r0, [sp] + ldr r0, [r4, #4] + bl ov66_0222E19C + add r7, r0, #0 + ldr r0, [r4, #4] + bl ov66_0222E12C + add r6, r0, #0 + ldr r0, [r4, #4] + bl ov66_0222E190 + cmp r5, #2 + bne _0226C6C8 + ldr r0, [r4, #8] + bl ov70_0226260C +_0226C6C8: + cmp r5, #1 + beq _0226C6DC + cmp r5, #0 + bne _0226C6DC + cmp r7, #1 + bne _0226C6DC + ldr r0, [r4, #8] + mov r1, #3 + bl ov70_02262658 +_0226C6DC: + ldr r0, [sp] + cmp r0, #1 + bne _0226C6E8 + ldr r0, [r4, #8] + bl ov70_0226246C +_0226C6E8: + cmp r6, #1 + bne _0226C6F2 + add r0, r4, #0 + bl ov70_0226C8A8 +_0226C6F2: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0226C60C + + thumb_func_start ov70_0226C6F8 +ov70_0226C6F8: ; 0x0226C6F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl ov70_0226C914 + ldr r0, [r4, #0x14] + bl ov70_0226CF38 + ldr r0, [r4, #0x10] + bl ov70_0226C39C + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C6F8 + + thumb_func_start ov70_0226C718 +ov70_0226C718: ; 0x0226C718 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + mov r1, #1 + bl ov66_0222E084 + cmp r0, #0 + beq _0226C744 + ldr r0, [r5, #4] + bl ov66_0222E1B8 + bl ov70_0226C81C + add r4, r0, #0 + ldr r0, [r5, #0x10] + add r1, r4, #0 + bl ov70_0226C430 + ldr r0, [r5, #0xc] + add r1, r4, #0 + bl ov70_0225CB08 +_0226C744: + ldr r0, [r5, #4] + mov r1, #2 + bl ov66_0222E084 + cmp r0, #0 + beq _0226C762 + ldr r0, [r5, #4] + bl ov66_0222E1D0 + bl ov70_0226C848 + add r1, r0, #0 + ldr r0, [r5, #0x10] + bl ov70_0226C4A0 +_0226C762: + ldr r0, [r5, #4] + mov r1, #3 + bl ov66_0222E084 + cmp r0, #0 + beq _0226C780 + ldr r0, [r5, #4] + bl ov66_0222E1E8 + bl ov70_0226C87C + add r1, r0, #0 + ldr r0, [r5, #0x10] + bl ov70_0226C4C8 +_0226C780: + ldr r0, [r5, #4] + bl ov66_0222E19C + cmp r0, #1 + bne _0226C7A6 + ldr r0, [r5, #4] + bl ov66_0222E158 + cmp r0, #0 + bne _0226C7A6 + ldr r0, [r5, #8] + bl ov70_0226271C + cmp r0, #0 + bne _0226C7A6 + ldr r0, [r5, #8] + mov r1, #1 + bl ov70_02262658 +_0226C7A6: + ldr r0, [r5, #4] + mov r1, #5 + bl ov66_0222E084 + cmp r0, #0 + beq _0226C7CA + ldr r0, [r5, #4] + bl ov66_0222E158 + cmp r0, #1 + bne _0226C7CA + ldr r0, [r5, #8] + bl ov70_0226260C + ldr r0, [r5, #8] + mov r1, #2 + bl ov70_02262658 +_0226C7CA: + ldr r0, [r5, #4] + mov r1, #6 + bl ov66_0222E084 + cmp r0, #0 + beq _0226C7E6 + ldr r0, [r5, #4] + bl ov66_0222E170 + cmp r0, #1 + bne _0226C7E6 + ldr r0, [r5, #8] + bl ov70_0226246C +_0226C7E6: + ldr r0, [r5, #4] + bl ov66_0222E12C + cmp r0, #1 + bne _0226C7FC + ldr r0, [r5, #8] + bl ov70_02262478 + add r0, r5, #0 + bl ov70_0226C8A8 +_0226C7FC: + ldr r0, [r5, #0x10] + bl ov70_0226C3A4 + ldr r0, [r5, #0x14] + bl ov70_0226CF40 + ldr r0, [r5, #0x18] + bl ov70_0226C924 + pop {r3, r4, r5, pc} + thumb_func_end ov70_0226C718 + + thumb_func_start ov70_0226C810 +ov70_0226C810: ; 0x0226C810 + ldr r3, _0226C818 ; =ov70_0226CFFC + ldr r0, [r0, #0x14] + bx r3 + nop +_0226C818: .word ov70_0226CFFC + thumb_func_end ov70_0226C810 + + thumb_func_start ov70_0226C81C +ov70_0226C81C: ; 0x0226C81C + push {r3, lr} + cmp r0, #6 + bhi _0226C840 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226C82E: ; jump table + .short _0226C840 - _0226C82E - 2 ; case 0 + .short _0226C83C - _0226C82E - 2 ; case 1 + .short _0226C83C - _0226C82E - 2 ; case 2 + .short _0226C83C - _0226C82E - 2 ; case 3 + .short _0226C83C - _0226C82E - 2 ; case 4 + .short _0226C83C - _0226C82E - 2 ; case 5 + .short _0226C83C - _0226C82E - 2 ; case 6 +_0226C83C: + sub r0, r0, #1 + pop {r3, pc} +_0226C840: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov70_0226C81C + + thumb_func_start ov70_0226C848 +ov70_0226C848: ; 0x0226C848 + push {r3, lr} + cmp r0, #0xa + bhi _0226C874 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226C85A: ; jump table + .short _0226C874 - _0226C85A - 2 ; case 0 + .short _0226C874 - _0226C85A - 2 ; case 1 + .short _0226C874 - _0226C85A - 2 ; case 2 + .short _0226C874 - _0226C85A - 2 ; case 3 + .short _0226C874 - _0226C85A - 2 ; case 4 + .short _0226C874 - _0226C85A - 2 ; case 5 + .short _0226C874 - _0226C85A - 2 ; case 6 + .short _0226C870 - _0226C85A - 2 ; case 7 + .short _0226C870 - _0226C85A - 2 ; case 8 + .short _0226C870 - _0226C85A - 2 ; case 9 + .short _0226C870 - _0226C85A - 2 ; case 10 +_0226C870: + sub r0, r0, #7 + pop {r3, pc} +_0226C874: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov70_0226C848 + + thumb_func_start ov70_0226C87C +ov70_0226C87C: ; 0x0226C87C + push {r3, lr} + add r1, r0, #0 + sub r1, #0xb + cmp r1, #3 + bhi _0226C89E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0226C892: ; jump table + .short _0226C89A - _0226C892 - 2 ; case 0 + .short _0226C89A - _0226C892 - 2 ; case 1 + .short _0226C89A - _0226C892 - 2 ; case 2 + .short _0226C89A - _0226C892 - 2 ; case 3 +_0226C89A: + sub r0, #0xb + pop {r3, pc} +_0226C89E: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C87C + + thumb_func_start ov70_0226C8A8 +ov70_0226C8A8: ; 0x0226C8A8 + ldr r3, _0226C8B0 ; =sub_020AF558 + mov r0, #2 + mov r1, #0 + bx r3 + ; .align 2, 0 +_0226C8B0: .word sub_020AF558 + thumb_func_end ov70_0226C8A8 \ No newline at end of file diff --git a/asm/ov70_0226C8B4.s b/asm/ov70_0226C8B4.s new file mode 100644 index 000000000..1a9c056b6 --- /dev/null +++ b/asm/ov70_0226C8B4.s @@ -0,0 +1,596 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0226C8B4 +ov70_0226C8B4: ; 0x0226C8B4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r0, r2, #0 + mov r1, #0x10 + bl sub_02018144 + add r4, r0, #0 + add r2, r4, #0 + mov r1, #0x10 + mov r0, #0 +_0226C8CA: + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0226C8CA + str r5, [r4, #0] + add r0, r5, #0 + str r6, [r4, #4] + bl ov66_0222F104 + add r7, r0, #0 + add r0, r5, #0 + bl ov66_0222E158 + strh r0, [r4, #0xa] + ldrh r0, [r4, #0xa] + cmp r0, #0 + beq _0226C90E + cmp r7, #0 + beq _0226C90E + add r0, r6, #0 + mov r1, #1 + bl ov70_0226251C + add r0, r4, #0 + bl ov70_0226CC3C + add r0, r5, #0 + bl ov66_0222F114 + add r2, r0, #0 + add r0, r4, #0 + add r1, r7, #0 + bl ov70_0226CB1C +_0226C90E: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226C8B4 + + thumb_func_start ov70_0226C914 +ov70_0226C914: ; 0x0226C914 + push {r4, lr} + add r4, r0, #0 + bl ov70_0226CC58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov70_0226C914 + + thumb_func_start ov70_0226C924 +ov70_0226C924: ; 0x0226C924 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov66_0222F104 + add r4, r0, #0 + ldr r0, [r5, #0] + bl ov66_0222F114 + add r7, r0, #0 + ldr r0, [r5, #0] + bl ov66_0222E158 + add r6, r0, #0 + ldrh r0, [r5, #0xa] + cmp r0, r6 + beq _0226C964 + strh r6, [r5, #0xa] + cmp r6, #1 + bne _0226C964 + ldr r0, [r5, #4] + mov r1, #1 + bl ov70_0226251C + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov70_0226CB1C + add r0, r5, #0 + bl ov70_0226CC3C +_0226C964: + cmp r6, #0 + beq _0226C982 + ldrb r0, [r5, #8] + cmp r0, r4 + beq _0226C978 + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov70_0226CB1C +_0226C978: + add r0, r5, #0 + add r1, r4, #0 + add r2, r7, #0 + bl ov70_0226C984 +_0226C982: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0226C924 + + thumb_func_start ov70_0226C984 +ov70_0226C984: ; 0x0226C984 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #6 + blo _0226C994 + bl sub_02022974 +_0226C994: + cmp r4, #6 + bhs _0226C9A4 + ldr r2, _0226C9A8 ; =0x0226E6E4 + lsl r3, r4, #2 + ldr r2, [r2, r3] + add r0, r5, #0 + add r1, r6, #0 + blx r2 +_0226C9A4: + pop {r4, r5, r6, pc} + nop +_0226C9A8: .word 0x0226E6E4 + thumb_func_end ov70_0226C984 + + thumb_func_start ov70_0226C9AC +ov70_0226C9AC: ; 0x0226C9AC + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226C9AC + + thumb_func_start ov70_0226C9B0 +ov70_0226C9B0: ; 0x0226C9B0 + bx lr + ; .align 2, 0 + thumb_func_end ov70_0226C9B0 + + thumb_func_start ov70_0226C9B4 +ov70_0226C9B4: ; 0x0226C9B4 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r0, r1, #0 + mov r1, #0xe + bl sub_020E2178 + cmp r1, #0 + bne _0226CA2E + ldr r5, _0226CA30 ; =0x0226E74C + mov r4, #0 +_0226C9C8: + ldr r0, [r7, #0xc] + add r1, r4, #0 + lsl r2, r0, #3 + ldr r0, _0226CA34 ; =0x0226E72C + mov r6, #0 + add r3, r0, r2 + mov r0, #3 + and r1, r0 + ldr r0, _0226CA34 ; =0x0226E72C + ldr r0, [r0, r2] + cmp r1, r0 + bne _0226C9E8 + mov r0, #1 + str r0, [sp] + add r6, r0, #0 + b _0226C9F4 +_0226C9E8: + ldr r0, [r3, #4] + cmp r1, r0 + bne _0226C9F4 + add r0, r6, #0 + str r0, [sp] + mov r6, #1 +_0226C9F4: + cmp r6, #1 + bne _0226CA1A + cmp r4, #0x11 + bhs _0226CA16 + ldrb r1, [r5] + mov r3, #1 + ldr r0, [r7, #4] + ldr r2, [sp] + lsl r3, r3, #0xc + bl ov70_02262754 + add r6, r0, #0 + cmp r6, #1 + beq _0226CA1C + bl sub_02022974 + b _0226CA1C +_0226CA16: + mov r6, #0 + b _0226CA1C +_0226CA1A: + mov r6, #1 +_0226CA1C: + add r5, r5, #1 + add r4, r4, #1 + cmp r6, #1 + beq _0226C9C8 + ldr r0, [r7, #0xc] + add r1, r0, #1 + mov r0, #3 + and r0, r1 + str r0, [r7, #0xc] +_0226CA2E: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226CA30: .word 0x0226E74C +_0226CA34: .word 0x0226E72C + thumb_func_end ov70_0226C9B4 + + thumb_func_start ov70_0226CA38 +ov70_0226CA38: ; 0x0226CA38 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r0, r1, #0 + mov r1, #6 + bl sub_020E2178 + cmp r1, #0 + bne _0226CAC8 + ldr r0, [r5, #0xc] + lsl r1, r0, #1 + ldr r0, _0226CACC ; =0x0226E6D4 + ldrb r0, [r0, r1] + str r0, [sp] + ldr r0, _0226CAD0 ; =0x0226E6D5 + ldrb r0, [r0, r1] + add r1, sp, #4 + bl ov70_0226CBB4 + ldr r0, [sp, #8] + mov r4, #0 + cmp r0, #0 + bls _0226CA8A + mov r7, #1 + add r6, r4, #0 + lsl r7, r7, #0xc +_0226CA6C: + ldr r1, [sp, #4] + ldr r0, [r5, #4] + ldrb r1, [r1, r4] + add r2, r6, #0 + add r3, r7, #0 + bl ov70_02262754 + cmp r0, #1 + beq _0226CA82 + bl sub_02022974 +_0226CA82: + ldr r0, [sp, #8] + add r4, r4, #1 + cmp r4, r0 + blo _0226CA6C +_0226CA8A: + ldr r0, [sp] + add r1, sp, #4 + bl ov70_0226CBB4 + ldr r0, [sp, #8] + mov r4, #0 + cmp r0, #0 + bls _0226CABC + mov r6, #1 + lsl r7, r6, #0xc +_0226CA9E: + ldr r1, [sp, #4] + ldr r0, [r5, #4] + ldrb r1, [r1, r4] + add r2, r6, #0 + add r3, r7, #0 + bl ov70_02262754 + cmp r0, #1 + beq _0226CAB4 + bl sub_02022974 +_0226CAB4: + ldr r0, [sp, #8] + add r4, r4, #1 + cmp r4, r0 + blo _0226CA9E +_0226CABC: + ldr r0, [r5, #0xc] + mov r1, #7 + add r0, r0, #1 + bl sub_020E2178 + str r1, [r5, #0xc] +_0226CAC8: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226CACC: .word 0x0226E6D4 +_0226CAD0: .word 0x0226E6D5 + thumb_func_end ov70_0226CA38 + + thumb_func_start ov70_0226CAD4 +ov70_0226CAD4: ; 0x0226CAD4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #3 + bhs _0226CB0C + lsl r2, r0, #3 + ldr r0, _0226CB10 ; =0x0226E6FC + ldr r0, [r0, r2] + cmp r0, r1 + bhs _0226CB0C + ldr r1, _0226CB14 ; =0x0226E700 + ldr r0, [r4, #4] + ldr r1, [r1, r2] + bl ov70_0226278C + ldr r1, [r4, #0xc] + ldr r0, [r4, #4] + lsl r2, r1, #3 + ldr r1, _0226CB14 ; =0x0226E700 + ldr r1, [r1, r2] + bl ov70_022625D8 + ldr r0, _0226CB18 ; =0x0000059D + bl sub_02005748 + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] +_0226CB0C: + pop {r4, pc} + nop +_0226CB10: .word 0x0226E6FC +_0226CB14: .word 0x0226E700 +_0226CB18: .word 0x0000059D + thumb_func_end ov70_0226CAD4 + + thumb_func_start ov70_0226CB1C +ov70_0226CB1C: ; 0x0226CB1C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #6 + blo _0226CB2C + bl sub_02022974 +_0226CB2C: + cmp r4, #6 + bhs _0226CB4C + add r1, r5, #0 + mov r0, #0 + add r1, #0xc + strb r0, [r5, #0xc] + strb r0, [r1, #1] + strb r0, [r1, #2] + strb r0, [r1, #3] + ldr r2, _0226CB50 ; =0x0226E714 + lsl r3, r4, #2 + ldr r2, [r2, r3] + add r0, r5, #0 + add r1, r6, #0 + blx r2 + strb r4, [r5, #8] +_0226CB4C: + pop {r4, r5, r6, pc} + nop +_0226CB50: .word 0x0226E714 + thumb_func_end ov70_0226CB1C + + thumb_func_start ov70_0226CB54 +ov70_0226CB54: ; 0x0226CB54 + ldr r3, _0226CB60 ; =ov70_02262724 + mov r2, #1 + ldr r0, [r0, #4] + mov r1, #0 + lsl r2, r2, #0xc + bx r3 + ; .align 2, 0 +_0226CB60: .word ov70_02262724 + thumb_func_end ov70_0226CB54 + + thumb_func_start ov70_0226CB64 +ov70_0226CB64: ; 0x0226CB64 + ldr r3, _0226CB70 ; =ov70_02262724 + mov r1, #1 + ldr r0, [r0, #4] + lsl r2, r1, #0xc + bx r3 + nop +_0226CB70: .word ov70_02262724 + thumb_func_end ov70_0226CB64 + + thumb_func_start ov70_0226CB74 +ov70_0226CB74: ; 0x0226CB74 + ldr r3, _0226CB80 ; =ov70_02262724 + mov r2, #1 + ldr r0, [r0, #4] + mov r1, #0 + lsl r2, r2, #0xc + bx r3 + ; .align 2, 0 +_0226CB80: .word ov70_02262724 + thumb_func_end ov70_0226CB74 + + thumb_func_start ov70_0226CB84 +ov70_0226CB84: ; 0x0226CB84 + ldr r3, _0226CB90 ; =ov70_02262724 + mov r2, #1 + ldr r0, [r0, #4] + mov r1, #0 + lsl r2, r2, #0xc + bx r3 + ; .align 2, 0 +_0226CB90: .word ov70_02262724 + thumb_func_end ov70_0226CB84 + + thumb_func_start ov70_0226CB94 +ov70_0226CB94: ; 0x0226CB94 + push {r4, lr} + add r4, r0, #0 + bl ov70_0226CC58 + mov r2, #1 + ldr r0, [r4, #4] + mov r1, #0 + lsl r2, r2, #0xc + bl ov70_02262724 + ldr r0, [r4, #4] + mov r1, #0 + bl ov70_0226251C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0226CB94 + + thumb_func_start ov70_0226CBB4 +ov70_0226CBB4: ; 0x0226CBB4 + push {r3, lr} + cmp r0, #6 + bhi _0226CC1A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226CBC6: ; jump table + .short _0226CBD4 - _0226CBC6 - 2 ; case 0 + .short _0226CBDE - _0226CBC6 - 2 ; case 1 + .short _0226CBE8 - _0226CBC6 - 2 ; case 2 + .short _0226CBF2 - _0226CBC6 - 2 ; case 3 + .short _0226CBFC - _0226CBC6 - 2 ; case 4 + .short _0226CC06 - _0226CBC6 - 2 ; case 5 + .short _0226CC10 - _0226CBC6 - 2 ; case 6 +_0226CBD4: + mov r0, #6 + str r0, [r1, #4] + ldr r0, _0226CC20 ; =0x0226E6CC + str r0, [r1, #0] + pop {r3, pc} +_0226CBDE: + mov r0, #2 + str r0, [r1, #4] + ldr r0, _0226CC24 ; =0x0226E6C4 + str r0, [r1, #0] + pop {r3, pc} +_0226CBE8: + mov r0, #2 + str r0, [r1, #4] + ldr r0, _0226CC28 ; =0x0226E6BC + str r0, [r1, #0] + pop {r3, pc} +_0226CBF2: + mov r0, #1 + str r0, [r1, #4] + ldr r0, _0226CC2C ; =0x0226E6B4 + str r0, [r1, #0] + pop {r3, pc} +_0226CBFC: + mov r0, #1 + str r0, [r1, #4] + ldr r0, _0226CC30 ; =0x0226E6B8 + str r0, [r1, #0] + pop {r3, pc} +_0226CC06: + mov r0, #2 + str r0, [r1, #4] + ldr r0, _0226CC34 ; =0x0226E6C0 + str r0, [r1, #0] + pop {r3, pc} +_0226CC10: + mov r0, #3 + str r0, [r1, #4] + ldr r0, _0226CC38 ; =0x0226E6C8 + str r0, [r1, #0] + pop {r3, pc} +_0226CC1A: + bl sub_02022974 + pop {r3, pc} + ; .align 2, 0 +_0226CC20: .word 0x0226E6CC +_0226CC24: .word 0x0226E6C4 +_0226CC28: .word 0x0226E6BC +_0226CC2C: .word 0x0226E6B4 +_0226CC30: .word 0x0226E6B8 +_0226CC34: .word 0x0226E6C0 +_0226CC38: .word 0x0226E6C8 + thumb_func_end ov70_0226CBB4 + + thumb_func_start ov70_0226CC3C +ov70_0226CC3C: ; 0x0226CC3C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #9] + cmp r0, #0 + bne _0226CC50 + ldr r0, _0226CC54 ; =0x0000059E + bl sub_02005748 + mov r0, #1 + strb r0, [r4, #9] +_0226CC50: + pop {r4, pc} + nop +_0226CC54: .word 0x0000059E + thumb_func_end ov70_0226CC3C + + thumb_func_start ov70_0226CC58 +ov70_0226CC58: ; 0x0226CC58 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #9] + cmp r0, #0 + beq _0226CC6E + ldr r0, _0226CC70 ; =0x0000059E + mov r1, #0 + bl sub_020057A4 + mov r0, #0 + strb r0, [r4, #9] +_0226CC6E: + pop {r4, pc} + ; .align 2, 0 +_0226CC70: .word 0x0000059E + thumb_func_end ov70_0226CC58 + + .rodata + + + .global Unk_ov70_0226E6B4 +Unk_ov70_0226E6B4: ; 0x0226E6B4 + .incbin "incbin/overlay70_rodata.bin", 0x11E8, 0x11EC - 0x11E8 + + .global Unk_ov70_0226E6B8 +Unk_ov70_0226E6B8: ; 0x0226E6B8 + .incbin "incbin/overlay70_rodata.bin", 0x11EC, 0x11F0 - 0x11EC + + .global Unk_ov70_0226E6BC +Unk_ov70_0226E6BC: ; 0x0226E6BC + .incbin "incbin/overlay70_rodata.bin", 0x11F0, 0x11F4 - 0x11F0 + + .global Unk_ov70_0226E6C0 +Unk_ov70_0226E6C0: ; 0x0226E6C0 + .incbin "incbin/overlay70_rodata.bin", 0x11F4, 0x11F8 - 0x11F4 + + .global Unk_ov70_0226E6C4 +Unk_ov70_0226E6C4: ; 0x0226E6C4 + .incbin "incbin/overlay70_rodata.bin", 0x11F8, 0x11FC - 0x11F8 + + .global Unk_ov70_0226E6C8 +Unk_ov70_0226E6C8: ; 0x0226E6C8 + .incbin "incbin/overlay70_rodata.bin", 0x11FC, 0x1200 - 0x11FC + + .global Unk_ov70_0226E6CC +Unk_ov70_0226E6CC: ; 0x0226E6CC + .incbin "incbin/overlay70_rodata.bin", 0x1200, 0x1208 - 0x1200 + + .global Unk_ov70_0226E6D4 +Unk_ov70_0226E6D4: ; 0x0226E6D4 + .incbin "incbin/overlay70_rodata.bin", 0x1208, 0x1218 - 0x1208 + + .global Unk_ov70_0226E6E4 +Unk_ov70_0226E6E4: ; 0x0226E6E4 + .incbin "incbin/overlay70_rodata.bin", 0x1218, 0x1230 - 0x1218 + + .global Unk_ov70_0226E6FC +Unk_ov70_0226E6FC: ; 0x0226E6FC + .incbin "incbin/overlay70_rodata.bin", 0x1230, 0x1248 - 0x1230 + + .global Unk_ov70_0226E714 +Unk_ov70_0226E714: ; 0x0226E714 + .incbin "incbin/overlay70_rodata.bin", 0x1248, 0x1260 - 0x1248 + + .global Unk_ov70_0226E72C +Unk_ov70_0226E72C: ; 0x0226E72C + .incbin "incbin/overlay70_rodata.bin", 0x1260, 0x1280 - 0x1260 + + .global Unk_ov70_0226E74C +Unk_ov70_0226E74C: ; 0x0226E74C + .incbin "incbin/overlay70_rodata.bin", 0x1280, 0x11 + diff --git a/asm/ov70_0226CC74.s b/asm/ov70_0226CC74.s new file mode 100644 index 000000000..602a938a5 --- /dev/null +++ b/asm/ov70_0226CC74.s @@ -0,0 +1,219 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0226CC74 +ov70_0226CC74: ; 0x0226CC74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + bl ov70_02262E80 + add r6, r0, #0 + add r0, r4, #0 + bl ov70_0225DEE8 + str r0, [sp] + add r0, r4, #0 + bl ov70_0225DEF0 + str r0, [sp, #4] + bl ov70_0225CCB0 + add r7, r0, #0 + ldr r0, [sp, #4] + bl ov70_0225CCAC + str r0, [sp, #8] + add r0, r5, #0 + bl ov70_02262E84 + cmp r0, #5 + bls _0226CCAC + b _0226CE46 +_0226CCAC: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0226CCB8: ; jump table + .short _0226CCC4 - _0226CCB8 - 2 ; case 0 + .short _0226CD9A - _0226CCB8 - 2 ; case 1 + .short _0226CDAA - _0226CCB8 - 2 ; case 2 + .short _0226CDDC - _0226CCB8 - 2 ; case 3 + .short _0226CDFC - _0226CCB8 - 2 ; case 4 + .short _0226CE32 - _0226CCB8 - 2 ; case 5 +_0226CCC4: + add r0, r5, #0 + mov r1, #4 + bl ov70_02262E3C + add r6, r0, #0 + ldr r0, _0226CE50 ; =0x000005DC + bl sub_02005748 + ldr r0, [sp, #8] + mov r1, #6 + bl ov70_0225CD60 + bl ov63_0222C0AC + str r0, [sp, #0xc] + ldr r0, [sp, #4] + add r1, r7, #0 + mov r2, #0 + bl ov70_0225CDEC + add r0, r7, #0 + mov r1, #0 + bl ov70_0225D030 + ldr r1, [sp, #0xc] + add r0, r7, #0 + bl ov70_0225D060 + ldr r0, [sp] + bl ov66_0222E12C + cmp r0, #0 + beq _0226CD26 + add r0, r4, #0 + mov r1, #1 + mov r2, #3 + bl ov70_0225E20C + add r1, r0, #0 + mov r0, #4 + str r0, [r6, #0] + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _0226CE4A +_0226CD26: + ldr r0, [sp] + bl ov66_0222E19C + cmp r0, #1 + bne _0226CD50 + add r0, r4, #0 + mov r1, #1 + mov r2, #0x58 + bl ov70_0225E20C + add r1, r0, #0 + mov r0, #4 + str r0, [r6, #0] + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _0226CE4A +_0226CD50: + ldr r0, [sp] + bl ov66_0222E0DC + cmp r0, #1 + bne _0226CD7A + add r0, r4, #0 + mov r1, #1 + mov r2, #0x57 + bl ov70_0225E20C + add r1, r0, #0 + mov r0, #4 + str r0, [r6, #0] + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _0226CE4A +_0226CD7A: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x51 + bl ov70_0225E20C + add r1, r0, #0 + mov r0, #1 + str r0, [r6, #0] + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _0226CE4A +_0226CD9A: + add r0, r4, #0 + bl ov70_0225E164 + add r0, r5, #0 + mov r1, #2 + bl ov70_02262E88 + b _0226CE4A +_0226CDAA: + add r0, r4, #0 + bl ov70_0225E1C4 + cmp r0, #0 + beq _0226CDBC + cmp r0, #1 + beq _0226CDCC + cmp r0, #2 + b _0226CE4A +_0226CDBC: + add r0, r5, #0 + mov r1, #3 + bl ov70_02262E88 + add r0, r4, #0 + bl ov70_0225E1F8 + b _0226CE4A +_0226CDCC: + add r0, r5, #0 + mov r1, #4 + bl ov70_02262E88 + add r0, r4, #0 + bl ov70_0225E1F8 + b _0226CE4A +_0226CDDC: + add r0, r4, #0 + mov r1, #1 + mov r2, #0x55 + bl ov70_0225E20C + add r1, r0, #0 + mov r0, #4 + str r0, [r6, #0] + add r0, r4, #0 + bl ov70_0225DF8C + add r0, r5, #0 + mov r1, #5 + bl ov70_02262E88 + b _0226CE4A +_0226CDFC: + add r0, r4, #0 + bl ov70_0225DFEC + add r0, r4, #0 + bl ov70_0225E1F8 + ldr r0, [sp, #4] + ldr r1, [sp, #8] + mov r2, #1 + bl ov70_0225CDEC + add r0, r5, #0 + bl ov70_02262E64 + add r0, r7, #0 + mov r1, #1 + bl ov70_0225D030 + ldr r0, [sp, #4] + add r1, r7, #0 + mov r2, #0 + mov r3, #1 + bl ov70_0225CDAC + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0226CE32: + add r0, r4, #0 + bl ov70_0225DFAC + cmp r0, #1 + bne _0226CE4A + ldr r1, [r6, #0] + add r0, r5, #0 + bl ov70_02262E88 + b _0226CE4A +_0226CE46: + bl sub_02022974 +_0226CE4A: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226CE50: .word 0x000005DC + thumb_func_end ov70_0226CC74 \ No newline at end of file diff --git a/asm/ov70_0226CE54.s b/asm/ov70_0226CE54.s new file mode 100644 index 000000000..9c92969bf --- /dev/null +++ b/asm/ov70_0226CE54.s @@ -0,0 +1,870 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov70_0226CE54 +ov70_0226CE54: ; 0x0226CE54 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + add r0, r1, #0 + mov r1, #0xc4 + bl sub_02018144 + add r4, r0, #0 + mov r1, #0 + mov r2, #0xc4 + bl sub_020D5124 + str r5, [r4, #0] + add r0, r5, #0 + bl ov70_0225DEE8 + str r0, [r4, #4] + add r0, r5, #0 + bl ov70_0225DEF8 + str r0, [r4, #8] + add r0, r5, #0 + bl ov70_0225DF00 + str r0, [r4, #0xc] + bl ov70_0225C8A8 + add r1, r0, #6 + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + ldr r1, [r0, #0] + mov r0, #7 + mvn r0, r0 + sub r1, r0, r1 + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xbc + ldr r0, [r0, #0] + ldr r6, _0226CF34 ; =0x0226E760 + lsl r1, r0, #0x10 + add r0, r4, #0 + add r0, #0xbc + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r7, #0 + lsl r1, r0, #0x10 + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + add r5, r4, #0 +_0226CEC6: + mov r0, #0 + str r0, [sp] + ldrb r1, [r6] + add r2, sp, #4 + ldr r0, [r4, #0xc] + add r2, #2 + add r3, sp, #4 + bl ov70_0225C8D8 + add r0, sp, #4 + ldrh r0, [r0, #2] + add r7, r7, #1 + add r6, r6, #1 + lsl r1, r0, #4 + add r0, r5, #0 + add r0, #0xaa + strh r1, [r0] + add r0, sp, #4 + ldrh r0, [r0] + lsl r1, r0, #4 + add r0, r5, #0 + add r0, #0xac + add r5, r5, #4 + strh r1, [r0] + cmp r7, #3 + blt _0226CEC6 + mov r5, #0 +_0226CEFC: + add r2, r4, #0 + add r2, #0xbc + ldr r0, [r4, #8] + ldr r2, [r2, #0] + add r1, r5, #0 + bl ov70_022622B0 + ldr r0, [r4, #4] + add r1, r5, #0 + bl ov66_0222EB7C + cmp r0, #1 + bne _0226CF26 + add r0, r4, #0 + add r1, r5, #0 + bl ov70_0226D020 + add r0, r4, #0 + add r1, r5, #0 + bl ov70_0226D46C +_0226CF26: + add r5, r5, #1 + cmp r5, #9 + blt _0226CEFC + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0226CF34: .word 0x0226E760 + thumb_func_end ov70_0226CE54 + + thumb_func_start ov70_0226CF38 +ov70_0226CF38: ; 0x0226CF38 + ldr r3, _0226CF3C ; =sub_020181C4 + bx r3 + ; .align 2, 0 +_0226CF3C: .word sub_020181C4 + thumb_func_end ov70_0226CF38 + + thumb_func_start ov70_0226CF40 +ov70_0226CF40: ; 0x0226CF40 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #4] + bl ov66_0222E338 + add r1, r0, #0 + ldr r0, [r5, #4] + bl ov66_0222EBA4 + mov r1, #0 + mvn r1, r1 + str r0, [sp, #8] + cmp r0, r1 + bne _0226CF62 + mov r6, #0 + b _0226CF6C +_0226CF62: + add r1, sp, #8 + add r2, sp, #4 + bl ov66_0222EC04 + mov r6, #1 +_0226CF6C: + mov r4, #0 +_0226CF6E: + ldr r0, [r5, #4] + add r1, r4, #0 + bl ov66_0222EB7C + cmp r0, #1 + ldr r0, [r5, #8] + bne _0226CFB6 + add r1, r4, #0 + mov r2, #1 + bl ov70_022623C4 + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226D020 + add r0, r5, #0 + add r1, r4, #0 + bl ov70_0226D46C + cmp r6, #0 + beq _0226CFA4 + ldr r0, [sp, #8] + cmp r0, r4 + bne _0226CFA2 + mov r7, #1 + b _0226CFA4 +_0226CFA2: + mov r7, #0 +_0226CFA4: + ldr r0, [sp, #4] + add r1, r4, #0 + str r0, [sp] + add r0, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov70_0226D0E8 + b _0226CFBE +_0226CFB6: + add r1, r4, #0 + mov r2, #0 + bl ov70_022623C4 +_0226CFBE: + add r4, r4, #1 + cmp r4, #9 + blt _0226CF6E + add r7, r5, #0 + mov r6, #0 + add r4, r5, #0 + add r7, #0x2c +_0226CFCC: + ldr r0, [r5, #8] + add r1, r6, #0 + bl ov70_0226241C + strb r0, [r4, #0x10] + ldr r1, [r5, #8] + add r0, r7, #0 + add r2, r6, #0 + bl ov70_0226D2D8 + strb r0, [r4, #0x11] + ldr r0, [r5, #8] + add r1, r6, #0 + bl ov70_02262444 + strb r0, [r4, #0x12] + add r6, r6, #1 + add r4, r4, #3 + add r7, #0xe + cmp r6, #9 + blt _0226CFCC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov70_0226CF40 + + thumb_func_start ov70_0226CFFC +ov70_0226CFFC: ; 0x0226CFFC + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r4, r2, #0 + cmp r5, #9 + blo _0226D00C + bl sub_02022974 +_0226D00C: + cmp r4, #3 + blt _0226D014 + bl sub_02022974 +_0226D014: + lsl r0, r5, #1 + add r0, r5, r0 + add r0, r6, r0 + add r0, r0, r4 + ldrb r0, [r0, #0x10] + pop {r4, r5, r6, pc} + thumb_func_end ov70_0226CFFC + + thumb_func_start ov70_0226D020 +ov70_0226D020: ; 0x0226D020 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + str r1, [sp] + bl ov66_0222EB8C + add r4, r0, #0 + ldr r0, [r5, #4] + bl ov66_0222EB9C + add r6, r0, #0 + add r0, r5, #0 + add r0, #0xc0 + mov r1, #2 + ldr r0, [r0, #0] + lsl r1, r1, #0xc + bl sub_020BCFD0 + add r7, r0, #0 + cmp r6, #0 + ble _0226D05C + lsl r0, r6, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226D06A +_0226D05C: + lsl r0, r6, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226D06A: + add r6, r0, #0 + cmp r4, #0 + ble _0226D082 + lsl r0, r4, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226D090 +_0226D082: + lsl r0, r4, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226D090: + bl sub_020E1740 + asr r1, r0, #0x1f + asr r3, r7, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r4, r2, #0xc + orr r4, r0 + add r0, r6, #0 + bl sub_020E1740 + add r1, r0, #0 + add r0, r4, #0 + bl sub_020BCFD0 + asr r2, r0, #0x1f + lsl r3, r2, #0xd + lsr r1, r0, #0x13 + lsl r2, r0, #0xd + mov r0, #2 + orr r3, r1 + mov r1, #0 + lsl r0, r0, #0xa + add r2, r2, r0 + adc r3, r1 + lsl r0, r3, #0x14 + lsr r3, r2, #0xc + orr r3, r0 + add r0, r5, #0 + add r0, #0xbc + ldr r2, [r0, #0] + ldr r0, [r5, #8] + ldr r1, [sp] + add r2, r3, r2 + bl ov70_022622B0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov70_0226D020 + + thumb_func_start ov70_0226D0E8 +ov70_0226D0E8: ; 0x0226D0E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + ldr r0, [sp, #0x30] + str r1, [sp] + str r0, [sp, #0x30] + ldr r0, [r7, #4] + str r2, [sp, #4] + add r5, r3, #0 + bl ov66_0222EB38 + add r6, r0, #0 + ldr r0, [r7, #4] + bl ov66_0222EB28 + ldr r0, [sp] + mov r4, #0 + lsl r1, r0, #1 + add r0, r0, r1 + str r0, [sp, #0x10] + ldr r0, [sp] + mov r1, #3 + bl sub_020E2178 + str r1, [sp, #8] + mov r0, #0xc + ldr r1, _0226D240 ; =0x0226E774 + mul r0, r6 + add r0, r1, r0 + str r0, [sp, #0xc] + add r0, r7, #0 + str r0, [sp, #0x14] + add r0, #0x2c + str r0, [sp, #0x14] + ldr r0, [sp] + mov r1, #0xe + mul r1, r0 + str r1, [sp, #0x18] +_0226D134: + ldr r1, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r4, r1 + bl ov66_0222EBE4 + mov r6, #0 + cmp r5, #1 + bne _0226D14C + ldr r1, [sp, #0x30] + cmp r4, r1 + bne _0226D14C + mov r6, #1 +_0226D14C: + cmp r0, #1 + bne _0226D232 + cmp r4, #0 + beq _0226D15E + cmp r4, #1 + beq _0226D1C2 + cmp r4, #2 + beq _0226D1F8 + b _0226D232 +_0226D15E: + ldr r0, [r7, #8] + ldr r1, [sp] + bl ov70_02262374 + cmp r0, #1 + bne _0226D232 + ldr r0, [sp, #8] + cmp r0, #2 + bne _0226D194 + ldr r3, [sp, #0xc] + ldr r0, [sp, #4] + ldrh r3, [r3, #2] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D27C + ldr r0, [sp, #0xc] + ldrh r3, [r0, #8] + ldr r0, _0226D244 ; =0x0000FFFE + cmp r3, r0 + beq _0226D1B6 + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D24C + b _0226D1B6 +_0226D194: + ldr r3, [sp, #0xc] + ldr r0, [sp, #4] + ldrh r3, [r3] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D27C + ldr r0, [sp, #0xc] + ldrh r3, [r0, #4] + ldr r0, _0226D244 ; =0x0000FFFE + cmp r3, r0 + beq _0226D1B6 + ldr r0, [sp, #4] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D24C +_0226D1B6: + ldr r1, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r4, r1 + bl ov66_0222EBF4 + b _0226D232 +_0226D1C2: + ldr r0, [sp, #8] + cmp r0, #2 + bne _0226D1CC + mov r1, #1 + b _0226D1CE +_0226D1CC: + mov r1, #0 +_0226D1CE: + ldr r2, [sp, #0x14] + ldr r0, [sp, #0x18] + ldr r3, [sp] + add r0, r2, r0 + ldr r2, [r7, #8] + bl ov70_0226D2A0 + cmp r0, #1 + bne _0226D232 + ldr r1, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r4, r1 + bl ov66_0222EBF4 + ldr r0, [sp, #4] + ldr r3, _0226D248 ; =0x000005AF + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D24C + b _0226D232 +_0226D1F8: + ldr r0, [r7, #8] + ldr r1, [sp] + bl ov70_0226239C + cmp r0, #1 + bne _0226D232 + ldr r1, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r4, r1 + bl ov66_0222EBF4 + ldr r0, [sp, #8] + cmp r0, #2 + bne _0226D224 + ldr r3, [sp, #0xc] + ldr r0, [sp, #4] + ldrh r3, [r3, #0xa] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D24C + b _0226D232 +_0226D224: + ldr r3, [sp, #0xc] + ldr r0, [sp, #4] + ldrh r3, [r3, #6] + add r1, r5, #0 + add r2, r6, #0 + bl ov70_0226D24C +_0226D232: + add r4, r4, #1 + cmp r4, #3 + bge _0226D23A + b _0226D134 +_0226D23A: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0226D240: .word 0x0226E774 +_0226D244: .word 0x0000FFFE +_0226D248: .word 0x000005AF + thumb_func_end ov70_0226D0E8 + + thumb_func_start ov70_0226D24C +ov70_0226D24C: ; 0x0226D24C + push {r3, lr} + cmp r0, #0 + beq _0226D270 + cmp r1, #0 + beq _0226D278 + cmp r2, #0 + beq _0226D266 + lsl r0, r3, #0x10 + lsr r0, r0, #0x10 + mov r1, #5 + bl sub_02005770 + pop {r3, pc} +_0226D266: + lsl r0, r3, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 + pop {r3, pc} +_0226D270: + lsl r0, r3, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_0226D278: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0226D24C + + thumb_func_start ov70_0226D27C +ov70_0226D27C: ; 0x0226D27C + push {r3, lr} + cmp r0, #0 + beq _0226D292 + cmp r1, #0 + beq _0226D29C + lsl r0, r3, #0x10 + lsr r0, r0, #0x10 + mov r1, #0 + bl sub_02005844 + pop {r3, pc} +_0226D292: + lsl r0, r3, #0x10 + lsr r0, r0, #0x10 + mov r1, #0 + bl sub_02005844 +_0226D29C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov70_0226D27C + + thumb_func_start ov70_0226D2A0 +ov70_0226D2A0: ; 0x0226D2A0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r4, #2 + blo _0226D2B2 + bl sub_02022974 +_0226D2B2: + ldrh r0, [r5] + cmp r0, #1 + bne _0226D2BC + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0226D2BC: + ldr r3, _0226D2D4 ; =0x0226E76C + strh r4, [r5, #2] + lsl r4, r4, #2 + mov r0, #1 + strh r0, [r5] + ldr r3, [r3, r4] + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + blx r3 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0226D2D4: .word 0x0226E76C + thumb_func_end ov70_0226D2A0 + + thumb_func_start ov70_0226D2D8 +ov70_0226D2D8: ; 0x0226D2D8 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldrh r3, [r4] + cmp r3, #0 + beq _0226D312 + ldrh r3, [r4, #2] + lsl r5, r3, #2 + ldr r3, _0226D318 ; =0x0226E764 + ldr r3, [r3, r5] + blx r3 + cmp r0, #1 + bne _0226D30E + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + strb r0, [r4, #0xc] + strb r0, [r4, #0xd] +_0226D30E: + mov r0, #1 + pop {r3, r4, r5, pc} +_0226D312: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_0226D318: .word 0x0226E764 + thumb_func_end ov70_0226D2D8 + + thumb_func_start ov70_0226D31C +ov70_0226D31C: ; 0x0226D31C + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + strh r0, [r4, #4] + mov r0, #8 + strh r0, [r4, #6] + mov r0, #5 + bl sub_0201D2A4 + strh r0, [r4, #8] + mov r0, #2 + strh r0, [r4, #0xa] + mov r0, #4 + strh r0, [r4, #0xc] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0226D31C + + thumb_func_start ov70_0226D33C +ov70_0226D33C: ; 0x0226D33C + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + strh r0, [r4, #4] + mov r0, #0x10 + strh r0, [r4, #6] + mov r0, #0xa + bl sub_0201D2A4 + strh r0, [r4, #8] + mov r0, #4 + strh r0, [r4, #0xa] + mov r0, #2 + strh r0, [r4, #0xc] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov70_0226D33C + + thumb_func_start ov70_0226D35C +ov70_0226D35C: ; 0x0226D35C + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r5, r0, #0 + add r0, sp, #0x10 + mov r4, #0 + str r4, [r0, #0] + str r4, [r0, #4] + str r4, [r0, #8] + mov r0, #4 + ldrsh r0, [r5, r0] + str r1, [sp] + str r2, [sp, #4] + add r1, r0, #1 + mov r0, #6 + ldrsh r0, [r5, r0] + cmp r1, r0 + bge _0226D382 + strh r1, [r5, #4] + b _0226D394 +_0226D382: + strh r4, [r5, #4] + mov r0, #0xc + ldrsh r0, [r5, r0] + sub r0, r0, #1 + cmp r0, #0 + ble _0226D392 + strh r0, [r5, #0xc] + b _0226D394 +_0226D392: + mov r4, #1 +_0226D394: + mov r0, #4 + ldrsh r1, [r5, r0] + ldr r0, _0226D464 ; =0x0000FFFF + mul r0, r1 + mov r1, #6 + ldrsh r1, [r5, r1] + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldrh r0, [r5, #8] + cmp r0, #0 + beq _0226D3C0 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226D3CE +_0226D3C0: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226D3CE: + bl sub_020E1740 + add r2, r0, #0 + asr r0, r6, #4 + lsl r1, r0, #2 + ldr r0, _0226D468 ; =0x020F983C + asr r3, r2, #0x1f + ldrsh r0, [r0, r1] + str r0, [sp, #8] + asr r0, r0, #0x1f + str r0, [sp, #0xc] + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + lsl r0, r1, #4 + lsr r6, r0, #0x10 + mov r0, #0xa + ldrsh r0, [r5, r0] + cmp r0, #0 + ble _0226D41A + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0226D428 +_0226D41A: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0226D428: + bl sub_020E1740 + add r2, r0, #0 + ldr r0, [sp, #8] + ldr r1, [sp, #0xc] + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [sp, #0x14] + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, r6, #0 + bl ov70_022623F0 + ldr r0, [sp] + ldr r1, [sp, #4] + add r2, sp, #0x10 + bl ov70_022622EC + add r0, r4, #0 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0226D464: .word 0x0000FFFF +_0226D468: .word 0x020F983C + thumb_func_end ov70_0226D35C + + thumb_func_start ov70_0226D46C +ov70_0226D46C: ; 0x0226D46C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + str r1, [sp] + add r0, r1, #0 + lsl r1, r0, #1 + ldr r0, [sp] + mov r6, #0 + add r0, r0, r1 + str r0, [sp, #4] +_0226D480: + ldr r1, [sp, #4] + ldr r0, [r7, #4] + add r1, r6, r1 + bl ov66_0222EC30 + add r4, r0, #0 + ldr r0, [r7, #8] + ldr r1, [sp] + add r2, r6, #0 + add r3, sp, #8 + bl ov70_02262318 + cmp r4, #3 + bge _0226D4C2 + lsl r0, r4, #2 + add r5, r7, r0 +_0226D4A0: + mov r0, #0xaa + ldrsh r0, [r5, r0] + add r0, #0x10 + lsl r1, r0, #0xc + ldr r0, [sp, #8] + cmp r1, r0 + ble _0226D4BA + ldr r1, [sp, #4] + ldr r0, [r7, #4] + add r1, r6, r1 + add r2, r4, #0 + bl ov66_0222EC20 +_0226D4BA: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _0226D4A0 +_0226D4C2: + add r6, r6, #1 + cmp r6, #3 + blt _0226D480 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov70_0226D46C + + .rodata + + + .global Unk_ov70_0226E760 +Unk_ov70_0226E760: ; 0x0226E760 + .incbin "incbin/overlay70_rodata.bin", 0x1294, 0x1298 - 0x1294 + + .global Unk_ov70_0226E764 +Unk_ov70_0226E764: ; 0x0226E764 + .incbin "incbin/overlay70_rodata.bin", 0x1298, 0x12A0 - 0x1298 + + .global Unk_ov70_0226E76C +Unk_ov70_0226E76C: ; 0x0226E76C + .incbin "incbin/overlay70_rodata.bin", 0x12A0, 0x12A8 - 0x12A0 + + .global Unk_ov70_0226E774 +Unk_ov70_0226E774: ; 0x0226E774 + .incbin "incbin/overlay70_rodata.bin", 0x12A8, 0x3C + diff --git a/asm/overlay71.s b/asm/ov71_0223B140.s similarity index 62% rename from asm/overlay71.s rename to asm/ov71_0223B140.s index e610270aa..0faef18b5 100644 --- a/asm/overlay71.s +++ b/asm/ov71_0223B140.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov71_0223B140 ov71_0223B140: ; 0x0223B140 push {r3, r4, r5, r6, r7, lr} @@ -2711,1737 +2714,74 @@ _0223C694: _0223C698: .word 0x021BF6BC thumb_func_end ov71_0223C654 - thumb_func_start ov71_0223C69C -ov71_0223C69C: ; 0x0223C69C - push {r3, r4, r5, r6, r7, lr} - ldr r7, _0223C6D0 ; =0x0223D670 - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_0223C6A6: - lsl r1, r4, #4 - lsl r2, r4, #3 - add r0, r5, #0 - add r1, r6, r1 - add r2, r7, r2 - bl sub_0201A8D4 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0xb - blo _0223C6A6 - mov r2, #0 - add r0, r5, #0 - mov r1, #7 - mov r3, #1 - str r2, [sp] - bl sub_020196C0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223C6D0: .word 0x0223D670 - thumb_func_end ov71_0223C69C - - thumb_func_start ov71_0223C6D4 -ov71_0223C6D4: ; 0x0223C6D4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0223C6DA: - lsl r0, r4, #4 - add r0, r5, r0 - bl sub_0201A8FC - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0xb - blo _0223C6DA - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov71_0223C6D4 - - thumb_func_start ov71_0223C6F0 -ov71_0223C6F0: ; 0x0223C6F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - mov r1, #0x88 - str r1, [sp] - mov r1, #0x10 - str r1, [sp, #4] - mov r1, #0 - add r2, r1, #0 - add r3, r1, #0 - add r7, r0, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0x88 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r0, #0x10 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0x88 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r0, #0x20 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0x88 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r0, #0x30 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0x88 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r0, #0x40 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r0, #0x50 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r0, #0x60 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r2, #0x9a - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x19 - bl sub_0200B144 - str r0, [sp, #0x14] - mov r0, #0x20 - mov r1, #0x19 - bl sub_02023790 - add r5, r0, #0 - mov r4, #0 -_0223C7AA: - cmp r4, #3 - bne _0223C7B8 - bne _0223C7E2 - ldrb r0, [r6, #4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _0223C7E2 -_0223C7B8: - ldr r1, _0223CA20 ; =0x0223D644 - lsl r2, r4, #2 - ldr r1, [r1, r2] - ldr r0, [sp, #0x14] - add r2, r5, #0 - bl sub_0200B1B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223CA24 ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - lsl r0, r4, #4 - add r0, r7, r0 - add r2, r5, #0 - add r3, r1, #0 - bl sub_0201D78C -_0223C7E2: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #7 - blo _0223C7AA - mov r0, #0x20 - mov r1, #0x19 - bl sub_02023790 - str r0, [sp, #0x10] - mov r0, #6 - mov r1, #0x20 - mov r2, #0x19 - bl sub_0200B368 - mov r2, #0 - str r5, [sp] - add r4, r0, #0 - ldrh r0, [r6, #0x28] - mov r1, #0x88 - add r3, r2, #0 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - add r0, r7, #0 - bl ov71_0223CD64 - add r1, r6, #0 - add r0, r5, #0 - add r1, #8 - bl sub_02023D28 - add r0, r7, #0 - mov r2, #0 - add r0, #0x10 - mov r1, #0x88 - add r3, r2, #0 - str r5, [sp] - bl ov71_0223CDB0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [r6, #0x1c] - add r0, r4, #0 - mov r1, #5 - mov r3, #6 - bl sub_0200B60C - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - mov r1, #0xe - bl sub_0200B1B8 - ldr r2, [sp, #0x10] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x88 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CA24 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r7, #0 - str r1, [sp, #0xc] - add r0, #0x20 - add r2, r5, #0 - bl sub_0201D78C - ldrb r0, [r6, #4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _0223C8D6 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [r6, #0x20] - add r0, r4, #0 - mov r1, #5 - mov r3, #3 - bl sub_0200B60C - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - mov r1, #0x15 - bl sub_0200B1B8 - ldr r2, [sp, #0x10] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x88 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CA24 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r7, #0 - add r0, #0x30 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C -_0223C8D6: - str r5, [sp] - ldr r0, [r6, #0x24] - mov r2, #0 - str r0, [sp, #4] - mov r0, #9 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r7, #0 - add r0, #0x40 - mov r1, #0x88 - add r3, r2, #0 - bl ov71_0223CD64 - ldrb r0, [r6, #4] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - beq _0223C934 - ldr r0, [r6, #0x18] - bl sub_0202CC58 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - ldr r0, [r6, #0x18] - bl sub_0202CC5C - mov r3, #2 - add r2, r0, #0 - str r3, [sp] - mov r1, #1 - add r0, r4, #0 - str r1, [sp, #4] - bl sub_0200B60C - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - mov r1, #0x10 - bl sub_0200B1B8 - b _0223C964 -_0223C934: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldrh r2, [r6, #0x2a] - add r0, r4, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - mov r3, #2 - add r2, r6, #0 - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - add r2, #0x2e - ldrb r2, [r2] - add r0, r4, #0 - bl sub_0200B60C - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - mov r1, #0xf - bl sub_0200B1B8 -_0223C964: - ldr r2, [sp, #0x10] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CA24 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r7, #0 - add r0, #0x50 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r1, #2 - add r2, r6, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - add r2, #0x2f - ldrb r2, [r2] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0200B60C - add r2, r6, #0 - add r2, #0x30 - ldrb r2, [r2] - add r0, r4, #0 - mov r1, #3 - bl sub_0200C2E0 - mov r3, #2 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - add r6, #0x31 - ldrb r2, [r6] - add r0, r4, #0 - mov r1, #4 - bl sub_0200B60C - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - mov r1, #0x11 - bl sub_0200B1B8 - ldr r2, [sp, #0x10] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CA24 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r7, #0x60 - add r0, r7, #0 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B3F0 - add r0, r5, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_0200B190 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CA20: .word 0x0223D644 -_0223CA24: .word 0x00010200 - thumb_func_end ov71_0223C6F0 - - thumb_func_start ov71_0223CA28 -ov71_0223CA28: ; 0x0223CA28 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x20 - str r1, [sp, #0x10] - mov r1, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0x70 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0x80 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0x90 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0xa0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - mov r2, #0x9a - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x19 - bl sub_0200B144 - add r7, r0, #0 - mov r0, #0x20 - mov r1, #0x19 - bl sub_02023790 - add r5, r0, #0 - mov r4, #7 -_0223CAA4: - ldr r1, _0223CD3C ; =0x0223D644 - lsl r2, r4, #2 - ldr r1, [r1, r2] - add r0, r7, #0 - add r2, r5, #0 - bl sub_0200B1B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223CD40 ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - lsl r0, r4, #4 - add r0, r6, r0 - add r2, r5, #0 - add r3, r1, #0 - bl sub_0201D78C - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0xb - blo _0223CAA4 - mov r0, #0x20 - mov r1, #0x19 - bl sub_02023790 - str r0, [sp, #0x14] - mov r0, #6 - mov r1, #0x20 - mov r2, #0x19 - bl sub_0200B368 - ldr r1, [sp, #0x10] - add r4, r0, #0 - add r1, #0x33 - ldrb r1, [r1] - cmp r1, #0 - beq _0223CB6E - mov r1, #2 - str r1, [sp] - mov r2, #1 - str r2, [sp, #4] - ldr r2, [sp, #0x10] - add r3, r1, #0 - add r2, #0x32 - ldrb r2, [r2] - bl sub_0200B60C - ldr r2, [sp, #0x10] - add r0, r4, #0 - add r2, #0x33 - ldrb r2, [r2] - mov r1, #3 - bl sub_0200C2E0 - mov r3, #2 - ldr r2, [sp, #0x10] - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - add r2, #0x34 - ldrb r2, [r2] - add r0, r4, #0 - mov r1, #4 - bl sub_0200B60C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r2, [sp, #0x10] - add r0, r4, #0 - ldrh r2, [r2, #0x2c] - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - mov r3, #2 - ldr r2, [sp, #0x10] - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - add r2, #0x35 - ldrb r2, [r2] - add r0, r4, #0 - bl sub_0200B60C - ldr r2, [sp, #0x14] - add r0, r7, #0 - mov r1, #0x11 - bl sub_0200B1B8 - ldr r2, [sp, #0x14] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - b _0223CBA6 -_0223CB6E: - ldr r2, [sp, #0x14] - add r0, r7, #0 - mov r1, #0xc - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x14] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x14] - add r0, r4, #0 - mov r1, #1 - bl sub_0200B48C - add r0, r7, #0 - mov r1, #0x14 - add r2, r5, #0 - bl sub_0200B1B8 -_0223CBA6: - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CD40 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x70 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r2, [sp, #0x14] - add r0, r7, #0 - mov r1, #0xf - bl sub_0200B1B8 - ldr r2, [sp, #0x14] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r0, #0x10 - str r0, [sp] - mov r1, #0 - ldr r0, _0223CD40 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x70 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - add r0, r4, #0 - ldr r2, [r2, #0x38] - mov r1, #5 - mov r3, #6 - bl sub_0200B60C - ldr r2, [sp, #0x14] - add r0, r7, #0 - mov r1, #0x16 - bl sub_0200B1B8 - ldr r2, [sp, #0x14] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CD40 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x80 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - mov r1, #0x12 - add r2, r5, #0 - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CD40 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x90 - add r2, r5, #0 - mov r3, #0x70 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r2, #0 - ldr r0, [sp, #0x10] - str r5, [sp] - ldr r0, [r0, #0x40] - mov r1, #0xe0 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0x90 - add r3, r2, #0 - bl ov71_0223CD64 - add r0, r7, #0 - mov r1, #0x13 - add r2, r5, #0 - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CD40 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x90 - add r2, r5, #0 - mov r3, #0xb0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - str r5, [sp] - ldr r0, [r0, #0x3c] - mov r1, #0xe0 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0x90 - mov r2, #0x40 - mov r3, #0 - bl ov71_0223CD64 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - add r0, r4, #0 - ldr r2, [r2, #0x44] - mov r1, #5 - mov r3, #6 - bl sub_0200B60C - ldr r2, [sp, #0x14] - add r0, r7, #0 - mov r1, #0x16 - bl sub_0200B1B8 - ldr r2, [sp, #0x14] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CD40 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r6, #0xa0 - add r0, r6, #0 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B3F0 - add r0, r5, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223CD3C: .word 0x0223D644 -_0223CD40: .word 0x00010200 - thumb_func_end ov71_0223CA28 - - thumb_func_start ov71_0223CD44 -ov71_0223CD44: ; 0x0223CD44 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - cmp r4, r6 - bhi _0223CD62 -_0223CD50: - lsl r0, r4, #4 - add r0, r5, r0 - bl sub_0201ACF4 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, r6 - bls _0223CD50 -_0223CD62: - pop {r4, r5, r6, pc} - thumb_func_end ov71_0223CD44 - - thumb_func_start ov71_0223CD64 -ov71_0223CD64: ; 0x0223CD64 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - mov r0, #1 - add r4, r2, #0 - str r0, [sp] - add r2, sp, #0x18 - add r5, r1, #0 - add r6, r3, #0 - ldrb r2, [r2, #0x18] - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x2c] - ldr r3, [sp, #0x34] - bl sub_020238A0 - mov r0, #0 - ldr r1, [sp, #0x28] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - add r3, r3, r4 - str r6, [sp] - mov r1, #0 - ldr r0, _0223CDAC ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - ldr r2, [sp, #0x28] - add r0, r7, #0 - sub r3, r5, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CDAC: .word 0x00010200 - thumb_func_end ov71_0223CD64 - - thumb_func_start ov71_0223CDB0 -ov71_0223CDB0: ; 0x0223CDB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0 - add r4, r2, #0 - ldr r1, [sp, #0x28] - add r6, r3, #0 - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - add r3, r3, r4 - str r6, [sp] - mov r1, #0 - ldr r0, _0223CDE4 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - ldr r2, [sp, #0x28] - add r0, r7, #0 - sub r3, r5, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223CDE4: .word 0x00010200 - thumb_func_end ov71_0223CDB0 - - thumb_func_start ov71_0223CDE8 -ov71_0223CDE8: ; 0x0223CDE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0x18] - cmp r0, #0 - bne _0223CDFA - bl sub_02022974 -_0223CDFA: - ldr r0, [r5, #0x18] - bl sub_0202CC58 - mov r0, #0x28 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - mov r1, #0 - add r0, #0x50 - mov r2, #0xb8 - add r3, r1, #0 - bl sub_0201AE78 - mov r2, #0x9a - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x19 - bl sub_0200B144 - str r0, [sp, #0x10] - mov r0, #0x20 - mov r1, #0x19 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x20 - mov r1, #0x19 - bl sub_02023790 - str r0, [sp, #0x14] - mov r0, #2 - mov r1, #0x20 - mov r2, #0x19 - bl sub_0200B368 - add r6, r0, #0 - ldr r0, [r5, #0x18] - bl sub_0202CC58 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - ldr r0, [r5, #0x18] - bl sub_0202CC5C - mov r3, #2 - add r2, r0, #0 - str r3, [sp] - mov r1, #1 - add r0, r6, #0 - str r1, [sp, #4] - bl sub_0200B60C - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x14] - mov r1, #0x10 - bl sub_0200B1B8 - ldr r2, [sp, #0x14] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe0 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - ldr r0, _0223CEC8 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r7, #0x50 - add r0, r7, #0 - add r2, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_0200B190 - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223CEC8: .word 0x00010200 - thumb_func_end ov71_0223CDE8 - - thumb_func_start ov71_0223CECC -ov71_0223CECC: ; 0x0223CECC - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - cmp r1, #0 - beq _0223CEEC - mov r1, #0 - str r1, [sp] - ldr r3, _0223CF08 ; =0x00010200 - str r1, [sp, #4] - str r3, [sp, #8] - mov r3, #0xcd - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r4, pc} -_0223CEEC: - mov r1, #5 - str r1, [sp] - mov r1, #0x10 - str r1, [sp, #4] - mov r1, #0 - mov r2, #0xcd - add r3, r1, #0 - bl sub_0201AE78 - add r0, r4, #0 - bl sub_0201A954 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0223CF08: .word 0x00010200 - thumb_func_end ov71_0223CECC - - thumb_func_start ov71_0223CF0C -ov71_0223CF0C: ; 0x0223CF0C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r7, r0, #0 - str r1, [sp, #0x14] - bl ov71_0223D2F4 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x80 - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r2, #0x19 - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - mov r0, #0x19 - add r1, r7, #4 - add r2, r0, #0 - bl sub_020095C4 - ldr r4, _0223D068 ; =0x0223D6C8 - str r0, [r7, #0] - mov r6, #0 - add r5, r7, #0 -_0223CF46: - ldrb r0, [r4] - add r1, r6, #0 - mov r2, #0x19 - bl sub_02009714 - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r5, r1] - add r6, r6, #1 - add r4, r4, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0223CF46 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x19 - str r0, [sp, #8] - add r0, r1, #0 - ldr r0, [r7, r0] - ldr r1, [sp, #0x14] - mov r2, #0x21 - mov r3, #0 - bl sub_02009A4C - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r7, r1] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #9 - str r0, [sp, #8] - mov r0, #0x19 - sub r1, #0xc - str r0, [sp, #0xc] - ldr r0, [r7, r1] - ldr r1, [sp, #0x14] - mov r2, #0xe - mov r3, #0 - bl sub_02009B04 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r7, r1] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x19 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r7, r1] - ldr r1, [sp, #0x14] - mov r2, #0x2c - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r7, r1] - mov r0, #1 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x19 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r7, r1] - ldr r1, [sp, #0x14] - mov r2, #0x2e - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r7, r1] - sub r1, #0xc - ldr r0, [r7, r1] - bl sub_0200A328 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r7, r0] - bl sub_0200A5C8 - ldr r3, _0223D06C ; =0x0223D6DC - add r2, sp, #0x20 - str r2, [sp, #0x18] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0x1e - lsl r0, r0, #4 - add r0, r7, r0 - mov r4, #0 - str r0, [sp, #0x1c] -_0223D012: - ldr r1, [sp, #0x18] - lsl r6, r4, #2 - ldr r0, [sp, #0x14] - ldr r1, [r1, r6] - mov r2, #0x19 - add r5, r7, r6 - bl sub_02006CB8 - mov r1, #7 - lsl r1, r1, #6 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223D04C - ldr r1, [sp, #0x1c] - add r1, r1, r6 - bl sub_020A71B0 - cmp r0, #0 - bne _0223D050 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_020181C4 - bl sub_02022974 - b _0223D050 -_0223D04C: - bl sub_02022974 -_0223D050: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #8 - blo _0223D012 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D068: .word 0x0223D6C8 -_0223D06C: .word 0x0223D6DC - thumb_func_end ov71_0223CF0C - - thumb_func_start ov71_0223D070 -ov71_0223D070: ; 0x0223D070 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x88 - add r7, r1, #0 - mov r1, #1 - str r0, [sp, #0x2c] - str r1, [sp] - sub r0, r1, #2 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - ldr r3, [sp, #0x2c] - str r1, [sp, #0x10] - ldr r3, [r3, r0] - add r4, r0, #4 - str r3, [sp, #0x14] - ldr r3, [sp, #0x2c] - ldr r3, [r3, r4] - add r4, r0, #0 - str r3, [sp, #0x18] - ldr r3, [sp, #0x2c] - add r4, #8 - ldr r3, [r3, r4] - add r0, #0xc - str r3, [sp, #0x1c] - ldr r3, [sp, #0x2c] - ldr r0, [r3, r0] - add r3, r1, #0 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r0, sp, #0x64 - add r2, r1, #0 - bl sub_020093B4 - ldr r0, [sp, #0x2c] - mov r4, #0 - ldr r0, [r0, #0] - ldr r6, _0223D230 ; =0x0223D73C - str r0, [sp, #0x34] - add r0, sp, #0x64 - str r0, [sp, #0x38] - mov r0, #1 - lsl r0, r0, #0xc - str r4, [sp, #0x3c] - str r4, [sp, #0x40] - str r4, [sp, #0x44] - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - str r0, [sp, #0x50] - add r0, sp, #0x34 - strh r4, [r0, #0x20] - mov r0, #2 - str r0, [sp, #0x58] - mov r0, #1 - str r0, [sp, #0x5c] - mov r0, #0x19 - ldr r5, [sp, #0x2c] - str r0, [sp, #0x60] -_0223D0EA: - ldr r0, [r6, #0] - lsl r0, r0, #0xc - str r0, [sp, #0x3c] - ldr r0, [r6, #4] - lsl r0, r0, #0xc - str r0, [sp, #0x40] - add r0, sp, #0x34 - bl sub_02021AA0 - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02021D6C - ldrb r0, [r7, r4] - cmp r0, #0 - bne _0223D12A - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC -_0223D12A: - add r4, r4, #1 - add r6, #8 - add r5, r5, #4 - cmp r4, #8 - blt _0223D0EA - mov r0, #8 - ldr r4, _0223D234 ; =0x0223D6FC - ldr r5, [sp, #0x2c] - str r0, [sp, #0x30] - mov r6, #0 - mov r7, #1 -_0223D140: - ldr r0, [r4, #0] - str r7, [sp, #0x58] - lsl r0, r0, #0xc - str r0, [sp, #0x3c] - ldr r0, [r4, #4] - lsl r0, r0, #0xc - str r0, [sp, #0x40] - add r0, sp, #0x34 - bl sub_02021AA0 - mov r1, #0x5f - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #8 - bl sub_02021D6C - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #8 - blt _0223D140 - ldr r0, [sp, #0x30] - ldr r4, _0223D234 ; =0x0223D6FC - add r0, #8 - str r0, [sp, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x30] - ldr r0, [sp, #0x30] - mov r6, #0 - lsl r1, r0, #2 - ldr r0, [sp, #0x2c] - mov r7, #1 - add r5, r0, r1 -_0223D1A0: - ldr r0, [r4, #0] - str r7, [sp, #0x58] - lsl r0, r0, #0xc - str r0, [sp, #0x3c] - ldr r0, [r4, #4] - lsl r0, r0, #0xc - str r0, [sp, #0x40] - add r0, sp, #0x34 - bl sub_02021AA0 - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #9 - bl sub_02021D6C - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #8 - blt _0223D1A0 - mov r1, #0 - add r0, sp, #0x84 - strb r1, [r0] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x3c] - mov r0, #0x22 - lsl r0, r0, #0xe - str r0, [sp, #0x40] - str r1, [sp, #0x58] - mov r1, #0x57 - ldr r0, [sp, #0x2c] - lsl r1, r1, #2 - add r4, r0, r1 - ldr r0, [sp, #0x30] - add r0, #8 - str r0, [sp, #0x30] - lsl r0, r0, #0x18 - lsr r5, r0, #0x16 - add r0, sp, #0x34 - bl sub_02021AA0 - str r0, [r4, r5] - ldr r0, [r4, r5] - mov r1, #0 - bl sub_02021CC8 - ldr r0, [r4, r5] - mov r1, #0xa - bl sub_02021D6C - ldr r0, [r4, r5] - mov r1, #0 - bl sub_02021CAC - add sp, #0x88 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D230: .word 0x0223D73C -_0223D234: .word 0x0223D6FC - thumb_func_end ov71_0223D070 - - thumb_func_start ov71_0223D238 -ov71_0223D238: ; 0x0223D238 - push {r4, r5, r6, lr} - mov r6, #7 - add r5, r0, #0 - mov r4, #0 - lsl r6, r6, #6 -_0223D242: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - bl sub_020181C4 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #8 - blo _0223D242 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_0200A6DC - mov r6, #0x4b - mov r4, #0 - lsl r6, r6, #2 -_0223D270: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - bl sub_02009754 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _0223D270 - ldr r0, [r5, #0] - bl sub_02021964 - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - pop {r4, r5, r6, pc} - thumb_func_end ov71_0223D238 - - thumb_func_start ov71_0223D298 -ov71_0223D298: ; 0x0223D298 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #8 - blo _0223D2AA - bl sub_02022974 -_0223D2AA: - cmp r6, #3 - bls _0223D2B2 - bl sub_02022974 -_0223D2B2: - lsl r7, r4, #2 - mov r0, #0x57 - add r1, r5, r7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02021F9C - mov r1, #1 - bl sub_020A81FC - str r0, [sp] - lsl r0, r4, #5 - str r0, [sp, #4] - mov r0, #0x1e - add r1, r5, r7 - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r5, r6, #5 - ldr r4, [r0, #0xc] - mov r1, #0x20 - add r0, r4, r5 - bl sub_020C2C54 - ldr r2, [sp] - ldr r1, [sp, #4] - add r0, r4, r5 - add r1, r2, r1 - mov r2, #0x20 - bl sub_020C0160 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov71_0223D298 - - thumb_func_start ov71_0223D2F4 -ov71_0223D2F4: ; 0x0223D2F4 - push {r4, lr} - sub sp, #0x10 - ldr r4, _0223D320 ; =0x0223D6CC - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_0201E86C - mov r0, #2 - mov r1, #0x19 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0223D320: .word 0x0223D6CC - thumb_func_end ov71_0223D2F4 - - thumb_func_start ov71_0223D324 -ov71_0223D324: ; 0x0223D324 - mov r2, #0 - mov r1, #0xff -_0223D328: - strb r2, [r0] - strb r1, [r0, #1] - add r2, r2, #1 - add r0, r0, #2 - cmp r2, #4 - blt _0223D328 - bx lr - ; .align 2, 0 - thumb_func_end ov71_0223D324 - - thumb_func_start ov71_0223D338 -ov71_0223D338: ; 0x0223D338 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov71_0223D370 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov71_0223D3A0 - cmp r0, #1 - beq _0223D36C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov71_0223D3D8 - cmp r0, #1 - beq _0223D36C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov71_0223D410 - cmp r0, #1 -_0223D36C: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov71_0223D338 - - thumb_func_start ov71_0223D370 -ov71_0223D370: ; 0x0223D370 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r4, #0 - add r5, r7, #0 - mov r6, #0xff -_0223D37A: - ldrb r0, [r5, #1] - cmp r0, #0xff - beq _0223D38E - ldrb r0, [r5] - add r0, r0, #3 - bl sub_02004B04 - cmp r0, #0 - bne _0223D38E - strb r6, [r5, #1] -_0223D38E: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _0223D37A - add r0, r7, #0 - bl ov71_0223D454 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov71_0223D370 - - thumb_func_start ov71_0223D3A0 -ov71_0223D3A0: ; 0x0223D3A0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r4, #0 - add r1, r6, #0 -_0223D3AA: - ldrb r0, [r1, #1] - cmp r5, r0 - bne _0223D3CA - lsl r7, r4, #1 - ldrb r0, [r6, r7] - add r1, r5, #0 - bl ov71_0223D470 - ldrb r2, [r6, r7] - add r0, r6, #0 - add r1, r4, #0 - add r3, r5, #0 - bl ov71_0223D42C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223D3CA: - add r4, r4, #1 - add r1, r1, #2 - cmp r4, #4 - blt _0223D3AA - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov71_0223D3A0 - - thumb_func_start ov71_0223D3D8 -ov71_0223D3D8: ; 0x0223D3D8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - mov r4, #0 - add r1, r5, #0 -_0223D3E2: - ldrb r0, [r1, #1] - cmp r0, #0xff - bne _0223D402 - lsl r6, r4, #1 - ldrb r0, [r5, r6] - add r1, r7, #0 - bl ov71_0223D470 - ldrb r2, [r5, r6] - add r0, r5, #0 - add r1, r4, #0 - add r3, r7, #0 - bl ov71_0223D42C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223D402: - add r4, r4, #1 - add r1, r1, #2 - cmp r4, #4 - blt _0223D3E2 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov71_0223D3D8 - - thumb_func_start ov71_0223D410 -ov71_0223D410: ; 0x0223D410 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r0, [r5, #6] - add r4, r1, #0 - bl ov71_0223D470 - ldrb r2, [r5, #6] - add r0, r5, #0 - mov r1, #3 - add r3, r4, #0 - bl ov71_0223D42C - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov71_0223D410 - - thumb_func_start ov71_0223D42C -ov71_0223D42C: ; 0x0223D42C - push {r4, r5} - cmp r1, #0 - ble _0223D44A - lsl r4, r1, #1 - add r4, r0, r4 -_0223D436: - sub r5, r4, #2 - ldrb r5, [r5] - sub r1, r1, #1 - strb r5, [r4] - sub r5, r4, #1 - ldrb r5, [r5] - strb r5, [r4, #1] - sub r4, r4, #2 - cmp r1, #0 - bgt _0223D436 -_0223D44A: - strb r2, [r0] - strb r3, [r0, #1] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov71_0223D42C - - thumb_func_start ov71_0223D454 -ov71_0223D454: ; 0x0223D454 - mov r3, #0 - mov r1, #0xff -_0223D458: - ldrb r2, [r0] - cmp r2, #0xff - bne _0223D464 - ldrb r2, [r0, #2] - strb r2, [r0] - strb r1, [r0, #2] -_0223D464: - add r3, r3, #1 - add r0, r0, #2 - cmp r3, #4 - blt _0223D458 - bx lr - ; .align 2, 0 - thumb_func_end ov71_0223D454 - - thumb_func_start ov71_0223D470 -ov71_0223D470: ; 0x0223D470 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r2, #0 - add r0, r5, #3 - add r4, r1, #0 - ldr r2, _0223D49C ; =0x00000694 - add r1, r0, #0 - bl sub_02004AE8 - ldr r2, _0223D4A0 ; =0x0223D77C - lsl r3, r4, #1 - ldrh r2, [r2, r3] - mov r3, #4 - sub r4, r3, r6 - mov r3, #0x98 - mul r3, r4 - ldr r1, _0223D4A4 ; =0x0000FFFF - add r0, r5, #3 - sub r2, r2, r3 - bl sub_02004F68 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223D49C: .word 0x00000694 -_0223D4A0: .word 0x0223D77C -_0223D4A4: .word 0x0000FFFF - thumb_func_end ov71_0223D470 - ; 0x0223D4A8 - - .rodata - .incbin "incbin/overlay71_rodata.bin" - .bss - .space 0x0 + .global Unk_ov71_0223D4A8 +Unk_ov71_0223D4A8: ; 0x0223D4A8 + .incbin "incbin/overlay71_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov71_0223D4AC +Unk_ov71_0223D4AC: ; 0x0223D4AC + .incbin "incbin/overlay71_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov71_0223D4B0 +Unk_ov71_0223D4B0: ; 0x0223D4B0 + .incbin "incbin/overlay71_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov71_0223D4B8 +Unk_ov71_0223D4B8: ; 0x0223D4B8 + .incbin "incbin/overlay71_rodata.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov71_0223D4C0 +Unk_ov71_0223D4C0: ; 0x0223D4C0 + .incbin "incbin/overlay71_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov71_0223D4C8 +Unk_ov71_0223D4C8: ; 0x0223D4C8 + .incbin "incbin/overlay71_rodata.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov71_0223D4D0 +Unk_ov71_0223D4D0: ; 0x0223D4D0 + .incbin "incbin/overlay71_rodata.bin", 0x28, 0x38 - 0x28 + + .global Unk_ov71_0223D4E0 +Unk_ov71_0223D4E0: ; 0x0223D4E0 + .incbin "incbin/overlay71_rodata.bin", 0x38, 0x48 - 0x38 + + .global Unk_ov71_0223D4F0 +Unk_ov71_0223D4F0: ; 0x0223D4F0 + .incbin "incbin/overlay71_rodata.bin", 0x48, 0x64 - 0x48 + + .global Unk_ov71_0223D50C +Unk_ov71_0223D50C: ; 0x0223D50C + .incbin "incbin/overlay71_rodata.bin", 0x64, 0x80 - 0x64 + + .global Unk_ov71_0223D528 +Unk_ov71_0223D528: ; 0x0223D528 + .incbin "incbin/overlay71_rodata.bin", 0x80, 0x9C - 0x80 + + .global Unk_ov71_0223D544 +Unk_ov71_0223D544: ; 0x0223D544 + .incbin "incbin/overlay71_rodata.bin", 0x9C, 0xB8 - 0x9C + + .global Unk_ov71_0223D560 +Unk_ov71_0223D560: ; 0x0223D560 + .incbin "incbin/overlay71_rodata.bin", 0xB8, 0xD4 - 0xB8 + + .global Unk_ov71_0223D57C +Unk_ov71_0223D57C: ; 0x0223D57C + .incbin "incbin/overlay71_rodata.bin", 0xD4, 0xFC - 0xD4 + + .global Unk_ov71_0223D5A4 +Unk_ov71_0223D5A4: ; 0x0223D5A4 + .incbin "incbin/overlay71_rodata.bin", 0xFC, 0x124 - 0xFC + + .global Unk_ov71_0223D5CC +Unk_ov71_0223D5CC: ; 0x0223D5CC + .incbin "incbin/overlay71_rodata.bin", 0x124, 0x15C - 0x124 + + .global Unk_ov71_0223D604 +Unk_ov71_0223D604: ; 0x0223D604 + .incbin "incbin/overlay71_rodata.bin", 0x15C, 0x40 + diff --git a/asm/ov71_0223C69C.s b/asm/ov71_0223C69C.s new file mode 100644 index 000000000..3fa27d159 --- /dev/null +++ b/asm/ov71_0223C69C.s @@ -0,0 +1,1018 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov71_0223C69C +ov71_0223C69C: ; 0x0223C69C + push {r3, r4, r5, r6, r7, lr} + ldr r7, _0223C6D0 ; =0x0223D670 + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 +_0223C6A6: + lsl r1, r4, #4 + lsl r2, r4, #3 + add r0, r5, #0 + add r1, r6, r1 + add r2, r7, r2 + bl sub_0201A8D4 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0xb + blo _0223C6A6 + mov r2, #0 + add r0, r5, #0 + mov r1, #7 + mov r3, #1 + str r2, [sp] + bl sub_020196C0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223C6D0: .word 0x0223D670 + thumb_func_end ov71_0223C69C + + thumb_func_start ov71_0223C6D4 +ov71_0223C6D4: ; 0x0223C6D4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0223C6DA: + lsl r0, r4, #4 + add r0, r5, r0 + bl sub_0201A8FC + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0xb + blo _0223C6DA + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov71_0223C6D4 + + thumb_func_start ov71_0223C6F0 +ov71_0223C6F0: ; 0x0223C6F0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + mov r1, #0x88 + str r1, [sp] + mov r1, #0x10 + str r1, [sp, #4] + mov r1, #0 + add r2, r1, #0 + add r3, r1, #0 + add r7, r0, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0x88 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r0, #0x10 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0x88 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r0, #0x20 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0x88 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r0, #0x30 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0x88 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r0, #0x40 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r0, #0x50 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + add r0, #0x60 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r2, #0x9a + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x19 + bl sub_0200B144 + str r0, [sp, #0x14] + mov r0, #0x20 + mov r1, #0x19 + bl sub_02023790 + add r5, r0, #0 + mov r4, #0 +_0223C7AA: + cmp r4, #3 + bne _0223C7B8 + bne _0223C7E2 + ldrb r0, [r6, #4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _0223C7E2 +_0223C7B8: + ldr r1, _0223CA20 ; =0x0223D644 + lsl r2, r4, #2 + ldr r1, [r1, r2] + ldr r0, [sp, #0x14] + add r2, r5, #0 + bl sub_0200B1B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223CA24 ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + lsl r0, r4, #4 + add r0, r7, r0 + add r2, r5, #0 + add r3, r1, #0 + bl sub_0201D78C +_0223C7E2: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #7 + blo _0223C7AA + mov r0, #0x20 + mov r1, #0x19 + bl sub_02023790 + str r0, [sp, #0x10] + mov r0, #6 + mov r1, #0x20 + mov r2, #0x19 + bl sub_0200B368 + mov r2, #0 + str r5, [sp] + add r4, r0, #0 + ldrh r0, [r6, #0x28] + mov r1, #0x88 + add r3, r2, #0 + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #2 + str r0, [sp, #0xc] + add r0, r7, #0 + bl ov71_0223CD64 + add r1, r6, #0 + add r0, r5, #0 + add r1, #8 + bl sub_02023D28 + add r0, r7, #0 + mov r2, #0 + add r0, #0x10 + mov r1, #0x88 + add r3, r2, #0 + str r5, [sp] + bl ov71_0223CDB0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [r6, #0x1c] + add r0, r4, #0 + mov r1, #5 + mov r3, #6 + bl sub_0200B60C + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + mov r1, #0xe + bl sub_0200B1B8 + ldr r2, [sp, #0x10] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x88 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CA24 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r7, #0 + str r1, [sp, #0xc] + add r0, #0x20 + add r2, r5, #0 + bl sub_0201D78C + ldrb r0, [r6, #4] + lsl r0, r0, #0x1c + lsr r0, r0, #0x1f + beq _0223C8D6 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [r6, #0x20] + add r0, r4, #0 + mov r1, #5 + mov r3, #3 + bl sub_0200B60C + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + mov r1, #0x15 + bl sub_0200B1B8 + ldr r2, [sp, #0x10] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0x88 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CA24 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r7, #0 + add r0, #0x30 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C +_0223C8D6: + str r5, [sp] + ldr r0, [r6, #0x24] + mov r2, #0 + str r0, [sp, #4] + mov r0, #9 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r7, #0 + add r0, #0x40 + mov r1, #0x88 + add r3, r2, #0 + bl ov71_0223CD64 + ldrb r0, [r6, #4] + lsl r0, r0, #0x1e + lsr r0, r0, #0x1f + beq _0223C934 + ldr r0, [r6, #0x18] + bl sub_0202CC58 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + ldr r0, [r6, #0x18] + bl sub_0202CC5C + mov r3, #2 + add r2, r0, #0 + str r3, [sp] + mov r1, #1 + add r0, r4, #0 + str r1, [sp, #4] + bl sub_0200B60C + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + mov r1, #0x10 + bl sub_0200B1B8 + b _0223C964 +_0223C934: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldrh r2, [r6, #0x2a] + add r0, r4, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + mov r3, #2 + add r2, r6, #0 + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + add r2, #0x2e + ldrb r2, [r2] + add r0, r4, #0 + bl sub_0200B60C + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + mov r1, #0xf + bl sub_0200B1B8 +_0223C964: + ldr r2, [sp, #0x10] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CA24 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r7, #0 + add r0, #0x50 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r1, #2 + add r2, r6, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + add r2, #0x2f + ldrb r2, [r2] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0200B60C + add r2, r6, #0 + add r2, #0x30 + ldrb r2, [r2] + add r0, r4, #0 + mov r1, #3 + bl sub_0200C2E0 + mov r3, #2 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + add r6, #0x31 + ldrb r2, [r6] + add r0, r4, #0 + mov r1, #4 + bl sub_0200B60C + ldr r0, [sp, #0x14] + ldr r2, [sp, #0x10] + mov r1, #0x11 + bl sub_0200B1B8 + ldr r2, [sp, #0x10] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CA24 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r7, #0x60 + add r0, r7, #0 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B3F0 + add r0, r5, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_0200B190 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CA20: .word 0x0223D644 +_0223CA24: .word 0x00010200 + thumb_func_end ov71_0223C6F0 + + thumb_func_start ov71_0223CA28 +ov71_0223CA28: ; 0x0223CA28 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x20 + str r1, [sp, #0x10] + mov r1, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0x70 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0x80 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0x90 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r1, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0xa0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + mov r2, #0x9a + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x19 + bl sub_0200B144 + add r7, r0, #0 + mov r0, #0x20 + mov r1, #0x19 + bl sub_02023790 + add r5, r0, #0 + mov r4, #7 +_0223CAA4: + ldr r1, _0223CD3C ; =0x0223D644 + lsl r2, r4, #2 + ldr r1, [r1, r2] + add r0, r7, #0 + add r2, r5, #0 + bl sub_0200B1B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223CD40 ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + lsl r0, r4, #4 + add r0, r6, r0 + add r2, r5, #0 + add r3, r1, #0 + bl sub_0201D78C + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0xb + blo _0223CAA4 + mov r0, #0x20 + mov r1, #0x19 + bl sub_02023790 + str r0, [sp, #0x14] + mov r0, #6 + mov r1, #0x20 + mov r2, #0x19 + bl sub_0200B368 + ldr r1, [sp, #0x10] + add r4, r0, #0 + add r1, #0x33 + ldrb r1, [r1] + cmp r1, #0 + beq _0223CB6E + mov r1, #2 + str r1, [sp] + mov r2, #1 + str r2, [sp, #4] + ldr r2, [sp, #0x10] + add r3, r1, #0 + add r2, #0x32 + ldrb r2, [r2] + bl sub_0200B60C + ldr r2, [sp, #0x10] + add r0, r4, #0 + add r2, #0x33 + ldrb r2, [r2] + mov r1, #3 + bl sub_0200C2E0 + mov r3, #2 + ldr r2, [sp, #0x10] + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + add r2, #0x34 + ldrb r2, [r2] + add r0, r4, #0 + mov r1, #4 + bl sub_0200B60C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r2, [sp, #0x10] + add r0, r4, #0 + ldrh r2, [r2, #0x2c] + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + mov r3, #2 + ldr r2, [sp, #0x10] + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + add r2, #0x35 + ldrb r2, [r2] + add r0, r4, #0 + bl sub_0200B60C + ldr r2, [sp, #0x14] + add r0, r7, #0 + mov r1, #0x11 + bl sub_0200B1B8 + ldr r2, [sp, #0x14] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + b _0223CBA6 +_0223CB6E: + ldr r2, [sp, #0x14] + add r0, r7, #0 + mov r1, #0xc + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x14] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0200B48C + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r2, [sp, #0x14] + add r0, r4, #0 + mov r1, #1 + bl sub_0200B48C + add r0, r7, #0 + mov r1, #0x14 + add r2, r5, #0 + bl sub_0200B1B8 +_0223CBA6: + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CD40 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x70 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r2, [sp, #0x14] + add r0, r7, #0 + mov r1, #0xf + bl sub_0200B1B8 + ldr r2, [sp, #0x14] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r0, #0x10 + str r0, [sp] + mov r1, #0 + ldr r0, _0223CD40 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x70 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + add r0, r4, #0 + ldr r2, [r2, #0x38] + mov r1, #5 + mov r3, #6 + bl sub_0200B60C + ldr r2, [sp, #0x14] + add r0, r7, #0 + mov r1, #0x16 + bl sub_0200B1B8 + ldr r2, [sp, #0x14] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CD40 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x80 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + mov r1, #0x12 + add r2, r5, #0 + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CD40 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x90 + add r2, r5, #0 + mov r3, #0x70 + str r1, [sp, #0xc] + bl sub_0201D78C + mov r2, #0 + ldr r0, [sp, #0x10] + str r5, [sp] + ldr r0, [r0, #0x40] + mov r1, #0xe0 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0x90 + add r3, r2, #0 + bl ov71_0223CD64 + add r0, r7, #0 + mov r1, #0x13 + add r2, r5, #0 + bl sub_0200B1B8 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CD40 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x90 + add r2, r5, #0 + mov r3, #0xb0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + str r5, [sp] + ldr r0, [r0, #0x3c] + mov r1, #0xe0 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, r6, #0 + add r0, #0x90 + mov r2, #0x40 + mov r3, #0 + bl ov71_0223CD64 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + add r0, r4, #0 + ldr r2, [r2, #0x44] + mov r1, #5 + mov r3, #6 + bl sub_0200B60C + ldr r2, [sp, #0x14] + add r0, r7, #0 + mov r1, #0x16 + bl sub_0200B1B8 + ldr r2, [sp, #0x14] + add r0, r4, #0 + add r1, r5, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CD40 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r6, #0xa0 + add r0, r6, #0 + add r2, r5, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r4, #0 + bl sub_0200B3F0 + add r0, r5, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223CD3C: .word 0x0223D644 +_0223CD40: .word 0x00010200 + thumb_func_end ov71_0223CA28 + + thumb_func_start ov71_0223CD44 +ov71_0223CD44: ; 0x0223CD44 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + cmp r4, r6 + bhi _0223CD62 +_0223CD50: + lsl r0, r4, #4 + add r0, r5, r0 + bl sub_0201ACF4 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, r6 + bls _0223CD50 +_0223CD62: + pop {r4, r5, r6, pc} + thumb_func_end ov71_0223CD44 + + thumb_func_start ov71_0223CD64 +ov71_0223CD64: ; 0x0223CD64 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + mov r0, #1 + add r4, r2, #0 + str r0, [sp] + add r2, sp, #0x18 + add r5, r1, #0 + add r6, r3, #0 + ldrb r2, [r2, #0x18] + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x2c] + ldr r3, [sp, #0x34] + bl sub_020238A0 + mov r0, #0 + ldr r1, [sp, #0x28] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + add r3, r3, r4 + str r6, [sp] + mov r1, #0 + ldr r0, _0223CDAC ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + ldr r2, [sp, #0x28] + add r0, r7, #0 + sub r3, r5, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CDAC: .word 0x00010200 + thumb_func_end ov71_0223CD64 + + thumb_func_start ov71_0223CDB0 +ov71_0223CDB0: ; 0x0223CDB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0 + add r4, r2, #0 + ldr r1, [sp, #0x28] + add r6, r3, #0 + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + add r3, r3, r4 + str r6, [sp] + mov r1, #0 + ldr r0, _0223CDE4 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + ldr r2, [sp, #0x28] + add r0, r7, #0 + sub r3, r5, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223CDE4: .word 0x00010200 + thumb_func_end ov71_0223CDB0 + + thumb_func_start ov71_0223CDE8 +ov71_0223CDE8: ; 0x0223CDE8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + add r7, r0, #0 + ldr r0, [r5, #0x18] + cmp r0, #0 + bne _0223CDFA + bl sub_02022974 +_0223CDFA: + ldr r0, [r5, #0x18] + bl sub_0202CC58 + mov r0, #0x28 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r7, #0 + mov r1, #0 + add r0, #0x50 + mov r2, #0xb8 + add r3, r1, #0 + bl sub_0201AE78 + mov r2, #0x9a + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x19 + bl sub_0200B144 + str r0, [sp, #0x10] + mov r0, #0x20 + mov r1, #0x19 + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x20 + mov r1, #0x19 + bl sub_02023790 + str r0, [sp, #0x14] + mov r0, #2 + mov r1, #0x20 + mov r2, #0x19 + bl sub_0200B368 + add r6, r0, #0 + ldr r0, [r5, #0x18] + bl sub_0202CC58 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + ldr r0, [r5, #0x18] + bl sub_0202CC5C + mov r3, #2 + add r2, r0, #0 + str r3, [sp] + mov r1, #1 + add r0, r6, #0 + str r1, [sp, #4] + bl sub_0200B60C + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x14] + mov r1, #0x10 + bl sub_0200B1B8 + ldr r2, [sp, #0x14] + add r0, r6, #0 + add r1, r4, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0xe0 + sub r3, r1, r0 + mov r1, #0 + str r1, [sp] + ldr r0, _0223CEC8 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r7, #0x50 + add r0, r7, #0 + add r2, r4, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_0200B190 + add r0, r4, #0 + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B3F0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223CEC8: .word 0x00010200 + thumb_func_end ov71_0223CDE8 + + thumb_func_start ov71_0223CECC +ov71_0223CECC: ; 0x0223CECC + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + cmp r1, #0 + beq _0223CEEC + mov r1, #0 + str r1, [sp] + ldr r3, _0223CF08 ; =0x00010200 + str r1, [sp, #4] + str r3, [sp, #8] + mov r3, #0xcd + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r4, pc} +_0223CEEC: + mov r1, #5 + str r1, [sp] + mov r1, #0x10 + str r1, [sp, #4] + mov r1, #0 + mov r2, #0xcd + add r3, r1, #0 + bl sub_0201AE78 + add r0, r4, #0 + bl sub_0201A954 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0223CF08: .word 0x00010200 + thumb_func_end ov71_0223CECC + + .rodata + + + .global Unk_ov71_0223D644 +Unk_ov71_0223D644: ; 0x0223D644 + .incbin "incbin/overlay71_rodata.bin", 0x19C, 0x1C8 - 0x19C + + .global Unk_ov71_0223D670 +Unk_ov71_0223D670: ; 0x0223D670 + .incbin "incbin/overlay71_rodata.bin", 0x1C8, 0x58 + diff --git a/asm/ov71_0223CF0C.s b/asm/ov71_0223CF0C.s new file mode 100644 index 000000000..39a6ca8a9 --- /dev/null +++ b/asm/ov71_0223CF0C.s @@ -0,0 +1,532 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov71_0223CF0C +ov71_0223CF0C: ; 0x0223CF0C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + add r7, r0, #0 + str r1, [sp, #0x14] + bl ov71_0223D2F4 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x80 + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r2, #0x19 + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + mov r0, #0x19 + add r1, r7, #4 + add r2, r0, #0 + bl sub_020095C4 + ldr r4, _0223D068 ; =0x0223D6C8 + str r0, [r7, #0] + mov r6, #0 + add r5, r7, #0 +_0223CF46: + ldrb r0, [r4] + add r1, r6, #0 + mov r2, #0x19 + bl sub_02009714 + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r5, r1] + add r6, r6, #1 + add r4, r4, #1 + add r5, r5, #4 + cmp r6, #4 + blt _0223CF46 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x19 + str r0, [sp, #8] + add r0, r1, #0 + ldr r0, [r7, r0] + ldr r1, [sp, #0x14] + mov r2, #0x21 + mov r3, #0 + bl sub_02009A4C + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r7, r1] + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #9 + str r0, [sp, #8] + mov r0, #0x19 + sub r1, #0xc + str r0, [sp, #0xc] + ldr r0, [r7, r1] + ldr r1, [sp, #0x14] + mov r2, #0xe + mov r3, #0 + bl sub_02009B04 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r7, r1] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x19 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r7, r1] + ldr r1, [sp, #0x14] + mov r2, #0x2c + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r7, r1] + mov r0, #1 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x19 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r7, r1] + ldr r1, [sp, #0x14] + mov r2, #0x2e + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r7, r1] + sub r1, #0xc + ldr r0, [r7, r1] + bl sub_0200A328 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r7, r0] + bl sub_0200A5C8 + ldr r3, _0223D06C ; =0x0223D6DC + add r2, sp, #0x20 + str r2, [sp, #0x18] + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0x1e + lsl r0, r0, #4 + add r0, r7, r0 + mov r4, #0 + str r0, [sp, #0x1c] +_0223D012: + ldr r1, [sp, #0x18] + lsl r6, r4, #2 + ldr r0, [sp, #0x14] + ldr r1, [r1, r6] + mov r2, #0x19 + add r5, r7, r6 + bl sub_02006CB8 + mov r1, #7 + lsl r1, r1, #6 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223D04C + ldr r1, [sp, #0x1c] + add r1, r1, r6 + bl sub_020A71B0 + cmp r0, #0 + bne _0223D050 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r5, r0] + bl sub_020181C4 + bl sub_02022974 + b _0223D050 +_0223D04C: + bl sub_02022974 +_0223D050: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #8 + blo _0223D012 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D068: .word 0x0223D6C8 +_0223D06C: .word 0x0223D6DC + thumb_func_end ov71_0223CF0C + + thumb_func_start ov71_0223D070 +ov71_0223D070: ; 0x0223D070 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x88 + add r7, r1, #0 + mov r1, #1 + str r0, [sp, #0x2c] + str r1, [sp] + sub r0, r1, #2 + str r0, [sp, #4] + str r0, [sp, #8] + mov r2, #0 + str r2, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + ldr r3, [sp, #0x2c] + str r1, [sp, #0x10] + ldr r3, [r3, r0] + add r4, r0, #4 + str r3, [sp, #0x14] + ldr r3, [sp, #0x2c] + ldr r3, [r3, r4] + add r4, r0, #0 + str r3, [sp, #0x18] + ldr r3, [sp, #0x2c] + add r4, #8 + ldr r3, [r3, r4] + add r0, #0xc + str r3, [sp, #0x1c] + ldr r3, [sp, #0x2c] + ldr r0, [r3, r0] + add r3, r1, #0 + str r0, [sp, #0x20] + str r2, [sp, #0x24] + str r2, [sp, #0x28] + add r0, sp, #0x64 + add r2, r1, #0 + bl sub_020093B4 + ldr r0, [sp, #0x2c] + mov r4, #0 + ldr r0, [r0, #0] + ldr r6, _0223D230 ; =0x0223D73C + str r0, [sp, #0x34] + add r0, sp, #0x64 + str r0, [sp, #0x38] + mov r0, #1 + lsl r0, r0, #0xc + str r4, [sp, #0x3c] + str r4, [sp, #0x40] + str r4, [sp, #0x44] + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + str r0, [sp, #0x50] + add r0, sp, #0x34 + strh r4, [r0, #0x20] + mov r0, #2 + str r0, [sp, #0x58] + mov r0, #1 + str r0, [sp, #0x5c] + mov r0, #0x19 + ldr r5, [sp, #0x2c] + str r0, [sp, #0x60] +_0223D0EA: + ldr r0, [r6, #0] + lsl r0, r0, #0xc + str r0, [sp, #0x3c] + ldr r0, [r6, #4] + lsl r0, r0, #0xc + str r0, [sp, #0x40] + add r0, sp, #0x34 + bl sub_02021AA0 + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02021D6C + ldrb r0, [r7, r4] + cmp r0, #0 + bne _0223D12A + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC +_0223D12A: + add r4, r4, #1 + add r6, #8 + add r5, r5, #4 + cmp r4, #8 + blt _0223D0EA + mov r0, #8 + ldr r4, _0223D234 ; =0x0223D6FC + ldr r5, [sp, #0x2c] + str r0, [sp, #0x30] + mov r6, #0 + mov r7, #1 +_0223D140: + ldr r0, [r4, #0] + str r7, [sp, #0x58] + lsl r0, r0, #0xc + str r0, [sp, #0x3c] + ldr r0, [r4, #4] + lsl r0, r0, #0xc + str r0, [sp, #0x40] + add r0, sp, #0x34 + bl sub_02021AA0 + mov r1, #0x5f + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #8 + bl sub_02021D6C + mov r0, #0x5f + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #8 + blt _0223D140 + ldr r0, [sp, #0x30] + ldr r4, _0223D234 ; =0x0223D6FC + add r0, #8 + str r0, [sp, #0x30] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x30] + ldr r0, [sp, #0x30] + mov r6, #0 + lsl r1, r0, #2 + ldr r0, [sp, #0x2c] + mov r7, #1 + add r5, r0, r1 +_0223D1A0: + ldr r0, [r4, #0] + str r7, [sp, #0x58] + lsl r0, r0, #0xc + str r0, [sp, #0x3c] + ldr r0, [r4, #4] + lsl r0, r0, #0xc + str r0, [sp, #0x40] + add r0, sp, #0x34 + bl sub_02021AA0 + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #9 + bl sub_02021D6C + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r4, #8 + add r5, r5, #4 + cmp r6, #8 + blt _0223D1A0 + mov r1, #0 + add r0, sp, #0x84 + strb r1, [r0] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x3c] + mov r0, #0x22 + lsl r0, r0, #0xe + str r0, [sp, #0x40] + str r1, [sp, #0x58] + mov r1, #0x57 + ldr r0, [sp, #0x2c] + lsl r1, r1, #2 + add r4, r0, r1 + ldr r0, [sp, #0x30] + add r0, #8 + str r0, [sp, #0x30] + lsl r0, r0, #0x18 + lsr r5, r0, #0x16 + add r0, sp, #0x34 + bl sub_02021AA0 + str r0, [r4, r5] + ldr r0, [r4, r5] + mov r1, #0 + bl sub_02021CC8 + ldr r0, [r4, r5] + mov r1, #0xa + bl sub_02021D6C + ldr r0, [r4, r5] + mov r1, #0 + bl sub_02021CAC + add sp, #0x88 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D230: .word 0x0223D73C +_0223D234: .word 0x0223D6FC + thumb_func_end ov71_0223D070 + + thumb_func_start ov71_0223D238 +ov71_0223D238: ; 0x0223D238 + push {r4, r5, r6, lr} + mov r6, #7 + add r5, r0, #0 + mov r4, #0 + lsl r6, r6, #6 +_0223D242: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + bl sub_020181C4 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #8 + blo _0223D242 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_0200A6DC + mov r6, #0x4b + mov r4, #0 + lsl r6, r6, #2 +_0223D270: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + bl sub_02009754 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _0223D270 + ldr r0, [r5, #0] + bl sub_02021964 + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + pop {r4, r5, r6, pc} + thumb_func_end ov71_0223D238 + + thumb_func_start ov71_0223D298 +ov71_0223D298: ; 0x0223D298 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #8 + blo _0223D2AA + bl sub_02022974 +_0223D2AA: + cmp r6, #3 + bls _0223D2B2 + bl sub_02022974 +_0223D2B2: + lsl r7, r4, #2 + mov r0, #0x57 + add r1, r5, r7 + lsl r0, r0, #2 + ldr r0, [r1, r0] + bl sub_02021F9C + mov r1, #1 + bl sub_020A81FC + str r0, [sp] + lsl r0, r4, #5 + str r0, [sp, #4] + mov r0, #0x1e + add r1, r5, r7 + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r5, r6, #5 + ldr r4, [r0, #0xc] + mov r1, #0x20 + add r0, r4, r5 + bl sub_020C2C54 + ldr r2, [sp] + ldr r1, [sp, #4] + add r0, r4, r5 + add r1, r2, r1 + mov r2, #0x20 + bl sub_020C0160 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov71_0223D298 + + thumb_func_start ov71_0223D2F4 +ov71_0223D2F4: ; 0x0223D2F4 + push {r4, lr} + sub sp, #0x10 + ldr r4, _0223D320 ; =0x0223D6CC + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_0201E86C + mov r0, #2 + mov r1, #0x19 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0223D320: .word 0x0223D6CC + thumb_func_end ov71_0223D2F4 + + .rodata + + + .global Unk_ov71_0223D6C8 +Unk_ov71_0223D6C8: ; 0x0223D6C8 + .incbin "incbin/overlay71_rodata.bin", 0x220, 0x224 - 0x220 + + .global Unk_ov71_0223D6CC +Unk_ov71_0223D6CC: ; 0x0223D6CC + .incbin "incbin/overlay71_rodata.bin", 0x224, 0x234 - 0x224 + + .global Unk_ov71_0223D6DC +Unk_ov71_0223D6DC: ; 0x0223D6DC + .incbin "incbin/overlay71_rodata.bin", 0x234, 0x254 - 0x234 + + .global Unk_ov71_0223D6FC +Unk_ov71_0223D6FC: ; 0x0223D6FC + .incbin "incbin/overlay71_rodata.bin", 0x254, 0x294 - 0x254 + + .global Unk_ov71_0223D73C +Unk_ov71_0223D73C: ; 0x0223D73C + .incbin "incbin/overlay71_rodata.bin", 0x294, 0x40 + diff --git a/asm/ov71_0223D324.s b/asm/ov71_0223D324.s new file mode 100644 index 000000000..368fec8e8 --- /dev/null +++ b/asm/ov71_0223D324.s @@ -0,0 +1,241 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov71_0223D324 +ov71_0223D324: ; 0x0223D324 + mov r2, #0 + mov r1, #0xff +_0223D328: + strb r2, [r0] + strb r1, [r0, #1] + add r2, r2, #1 + add r0, r0, #2 + cmp r2, #4 + blt _0223D328 + bx lr + ; .align 2, 0 + thumb_func_end ov71_0223D324 + + thumb_func_start ov71_0223D338 +ov71_0223D338: ; 0x0223D338 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + bl ov71_0223D370 + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov71_0223D3A0 + cmp r0, #1 + beq _0223D36C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov71_0223D3D8 + cmp r0, #1 + beq _0223D36C + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + bl ov71_0223D410 + cmp r0, #1 +_0223D36C: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov71_0223D338 + + thumb_func_start ov71_0223D370 +ov71_0223D370: ; 0x0223D370 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r4, #0 + add r5, r7, #0 + mov r6, #0xff +_0223D37A: + ldrb r0, [r5, #1] + cmp r0, #0xff + beq _0223D38E + ldrb r0, [r5] + add r0, r0, #3 + bl sub_02004B04 + cmp r0, #0 + bne _0223D38E + strb r6, [r5, #1] +_0223D38E: + add r4, r4, #1 + add r5, r5, #2 + cmp r4, #4 + blt _0223D37A + add r0, r7, #0 + bl ov71_0223D454 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov71_0223D370 + + thumb_func_start ov71_0223D3A0 +ov71_0223D3A0: ; 0x0223D3A0 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r4, #0 + add r1, r6, #0 +_0223D3AA: + ldrb r0, [r1, #1] + cmp r5, r0 + bne _0223D3CA + lsl r7, r4, #1 + ldrb r0, [r6, r7] + add r1, r5, #0 + bl ov71_0223D470 + ldrb r2, [r6, r7] + add r0, r6, #0 + add r1, r4, #0 + add r3, r5, #0 + bl ov71_0223D42C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223D3CA: + add r4, r4, #1 + add r1, r1, #2 + cmp r4, #4 + blt _0223D3AA + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov71_0223D3A0 + + thumb_func_start ov71_0223D3D8 +ov71_0223D3D8: ; 0x0223D3D8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + mov r4, #0 + add r1, r5, #0 +_0223D3E2: + ldrb r0, [r1, #1] + cmp r0, #0xff + bne _0223D402 + lsl r6, r4, #1 + ldrb r0, [r5, r6] + add r1, r7, #0 + bl ov71_0223D470 + ldrb r2, [r5, r6] + add r0, r5, #0 + add r1, r4, #0 + add r3, r7, #0 + bl ov71_0223D42C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223D402: + add r4, r4, #1 + add r1, r1, #2 + cmp r4, #4 + blt _0223D3E2 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov71_0223D3D8 + + thumb_func_start ov71_0223D410 +ov71_0223D410: ; 0x0223D410 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldrb r0, [r5, #6] + add r4, r1, #0 + bl ov71_0223D470 + ldrb r2, [r5, #6] + add r0, r5, #0 + mov r1, #3 + add r3, r4, #0 + bl ov71_0223D42C + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov71_0223D410 + + thumb_func_start ov71_0223D42C +ov71_0223D42C: ; 0x0223D42C + push {r4, r5} + cmp r1, #0 + ble _0223D44A + lsl r4, r1, #1 + add r4, r0, r4 +_0223D436: + sub r5, r4, #2 + ldrb r5, [r5] + sub r1, r1, #1 + strb r5, [r4] + sub r5, r4, #1 + ldrb r5, [r5] + strb r5, [r4, #1] + sub r4, r4, #2 + cmp r1, #0 + bgt _0223D436 +_0223D44A: + strb r2, [r0] + strb r3, [r0, #1] + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov71_0223D42C + + thumb_func_start ov71_0223D454 +ov71_0223D454: ; 0x0223D454 + mov r3, #0 + mov r1, #0xff +_0223D458: + ldrb r2, [r0] + cmp r2, #0xff + bne _0223D464 + ldrb r2, [r0, #2] + strb r2, [r0] + strb r1, [r0, #2] +_0223D464: + add r3, r3, #1 + add r0, r0, #2 + cmp r3, #4 + blt _0223D458 + bx lr + ; .align 2, 0 + thumb_func_end ov71_0223D454 + + thumb_func_start ov71_0223D470 +ov71_0223D470: ; 0x0223D470 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r2, #0 + add r0, r5, #3 + add r4, r1, #0 + ldr r2, _0223D49C ; =0x00000694 + add r1, r0, #0 + bl sub_02004AE8 + ldr r2, _0223D4A0 ; =0x0223D77C + lsl r3, r4, #1 + ldrh r2, [r2, r3] + mov r3, #4 + sub r4, r3, r6 + mov r3, #0x98 + mul r3, r4 + ldr r1, _0223D4A4 ; =0x0000FFFF + add r0, r5, #3 + sub r2, r2, r3 + bl sub_02004F68 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223D49C: .word 0x00000694 +_0223D4A0: .word 0x0223D77C +_0223D4A4: .word 0x0000FFFF + thumb_func_end ov71_0223D470 + + .rodata + + + .global Unk_ov71_0223D77C +Unk_ov71_0223D77C: ; 0x0223D77C + .incbin "incbin/overlay71_rodata.bin", 0x2D4, 0x10 + diff --git a/asm/overlay72.s b/asm/ov72_0223D7A0.s similarity index 96% rename from asm/overlay72.s rename to asm/ov72_0223D7A0.s index 9d40eb2b5..210c434f9 100644 --- a/asm/overlay72.s +++ b/asm/ov72_0223D7A0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov72_0223D7A0 ov72_0223D7A0: ; 0x0223D7A0 push {r4, r5, r6, r7, lr} @@ -2481,14 +2484,63 @@ _0223EB24: ; .align 2, 0 _0223EB38: .word 0x0000069A thumb_func_end ov72_0223EAD8 - ; 0x0223EB3C - .rodata - .incbin "incbin/overlay72_rodata.bin" + + + .global Unk_ov72_0223EB3C +Unk_ov72_0223EB3C: ; 0x0223EB3C + .incbin "incbin/overlay72_rodata.bin", 0x0, 0x6 - 0x0 + + .global Unk_ov72_0223EB42 +Unk_ov72_0223EB42: ; 0x0223EB42 + .incbin "incbin/overlay72_rodata.bin", 0x6, 0xE - 0x6 + + .global Unk_ov72_0223EB4A +Unk_ov72_0223EB4A: ; 0x0223EB4A + .incbin "incbin/overlay72_rodata.bin", 0xE, 0x20 - 0xE + + .global Unk_ov72_0223EB5C +Unk_ov72_0223EB5C: ; 0x0223EB5C + .incbin "incbin/overlay72_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov72_0223EB6C +Unk_ov72_0223EB6C: ; 0x0223EB6C + .incbin "incbin/overlay72_rodata.bin", 0x30, 0x40 - 0x30 + + .global Unk_ov72_0223EB7C +Unk_ov72_0223EB7C: ; 0x0223EB7C + .incbin "incbin/overlay72_rodata.bin", 0x40, 0x5C - 0x40 + + .global Unk_ov72_0223EB98 +Unk_ov72_0223EB98: ; 0x0223EB98 + .incbin "incbin/overlay72_rodata.bin", 0x5C, 0x78 - 0x5C + + .global Unk_ov72_0223EBB4 +Unk_ov72_0223EBB4: ; 0x0223EBB4 + .incbin "incbin/overlay72_rodata.bin", 0x78, 0x94 - 0x78 + + .global Unk_ov72_0223EBD0 +Unk_ov72_0223EBD0: ; 0x0223EBD0 + .incbin "incbin/overlay72_rodata.bin", 0x94, 0xB0 - 0x94 + + .global Unk_ov72_0223EBEC +Unk_ov72_0223EBEC: ; 0x0223EBEC + .incbin "incbin/overlay72_rodata.bin", 0xB0, 0xCC - 0xB0 + + .global Unk_ov72_0223EC08 +Unk_ov72_0223EC08: ; 0x0223EC08 + .incbin "incbin/overlay72_rodata.bin", 0xCC, 0xF4 - 0xCC + + .global Unk_ov72_0223EC30 +Unk_ov72_0223EC30: ; 0x0223EC30 + .incbin "incbin/overlay72_rodata.bin", 0xF4, 0x100 + .data - .incbin "incbin/overlay72_data.bin" - .bss - .space 0x0 + + .global Unk_ov72_0223ED40 +Unk_ov72_0223ED40: ; 0x0223ED40 + .incbin "incbin/overlay72_data.bin", 0x0, 0x1C + diff --git a/asm/overlay73.s b/asm/ov73_021D0D80.s similarity index 87% rename from asm/overlay73.s rename to asm/ov73_021D0D80.s index 73790b20f..68ec22504 100644 --- a/asm/overlay73.s +++ b/asm/ov73_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov73_021D0D80 ov73_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -4571,669 +4574,106 @@ _021D3248: .word 0x020F2DAC _021D324C: .word 0x021D3820 thumb_func_end ov73_021D2318 - thumb_func_start ov73_021D3250 -ov73_021D3250: ; 0x021D3250 - push {r4, lr} - mov r2, #1 - add r4, r0, #0 - mov r0, #3 - mov r1, #0x53 - lsl r2, r2, #0x12 - bl sub_02017FC8 - add r0, r4, #0 - mov r1, #0x28 - mov r2, #0x53 - bl sub_0200681C - mov r1, #0 - mov r2, #0x28 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x53 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #0x24] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov73_021D3250 - - thumb_func_start ov73_021D3280 -ov73_021D3280: ; 0x021D3280 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - bl sub_0200682C - ldr r1, [r5, #0] - add r4, r0, #0 - mov r6, #0 - cmp r1, #5 - bls _021D3296 - b _021D33EA -_021D3296: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D32A2: ; jump table - .short _021D32AE - _021D32A2 - 2 ; case 0 - .short _021D3334 - _021D32A2 - 2 ; case 1 - .short _021D335A - _021D32A2 - 2 ; case 2 - .short _021D3384 - _021D32A2 - 2 ; case 3 - .short _021D3396 - _021D32A2 - 2 ; case 4 - .short _021D33C8 - _021D32A2 - 2 ; case 5 -_021D32AE: - add r0, r6, #0 - add r1, r6, #0 - bl sub_0200F344 - mov r0, #1 - add r1, r6, #0 - bl sub_0200F344 - add r0, r6, #0 - add r1, r0, #0 - bl sub_02017798 - add r0, r6, #0 - add r1, r0, #0 - bl sub_020177BC - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D33F0 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D33F4 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - add r0, r4, #0 - bl ov73_021D342C - add r0, r4, #0 - bl ov73_021D366C - ldr r0, _021D33F8 ; =ov73_021D3420 - add r1, r4, #0 - bl sub_02017798 - bl sub_0201FFD0 - bl sub_020241F0 - add r1, r6, #0 - add r7, r0, #0 - str r1, [sp] - ldr r2, _021D33FC ; =0x0000FFFC - add r1, r7, #0 - mov r3, #7 - bl sub_020039F8 - mov r2, #2 - add r0, r7, #0 - add r1, r6, #0 - lsl r2, r2, #8 - bl sub_020C00B4 - mov r0, #0x3c - str r0, [r4, #0x24] - mov r0, #1 - str r0, [r5, #0] - b _021D33EA -_021D3334: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021D3340 - sub r0, r0, #1 - str r0, [r4, #0x24] - b _021D33EA -_021D3340: - ldr r0, _021D3400 ; =0x00000406 - bl sub_02004224 - ldr r1, _021D3400 ; =0x00000406 - mov r0, #4 - mov r2, #1 - bl sub_02004550 - mov r0, #0x5a - str r0, [r4, #0x24] - mov r0, #2 - str r0, [r5, #0] - b _021D33EA -_021D335A: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021D3366 - sub r0, r0, #1 - str r0, [r4, #0x24] - b _021D33EA -_021D3366: - str r6, [r4, #0x24] - mov r0, #6 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r3, r6, #0 - bl sub_0200F174 - mov r0, #3 - str r0, [r5, #0] - b _021D33EA -_021D3384: - bl ov73_021D37AC - bl sub_0200F2AC - cmp r0, #1 - bne _021D33EA - mov r0, #4 - str r0, [r5, #0] - b _021D33EA -_021D3396: - bl ov73_021D37AC - add r0, r4, #0 - add r1, r6, #0 - mov r2, #0x28 - mov r3, #0x30 - bl ov73_021D3698 - cmp r0, #1 - bne _021D33EA - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - str r0, [sp, #8] - add r0, r6, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #5 - str r0, [r5, #0] - b _021D33EA -_021D33C8: - bl ov73_021D37AC - bl sub_0200F2AC - cmp r0, #1 - bne _021D33EA - add r0, r4, #0 - bl ov73_021D368C - add r0, r4, #0 - bl ov73_021D35F4 - add r0, r6, #0 - add r1, r0, #0 - bl sub_02017798 - mov r6, #1 -_021D33EA: - add r0, r6, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D33F0: .word 0xFFFFE0FF -_021D33F4: .word 0x04001000 -_021D33F8: .word ov73_021D3420 -_021D33FC: .word 0x0000FFFC -_021D3400: .word 0x00000406 - thumb_func_end ov73_021D3280 - - thumb_func_start ov73_021D3404 -ov73_021D3404: ; 0x021D3404 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - ldr r4, [r0, #0] - add r0, r5, #0 - bl sub_02006830 - add r0, r4, #0 - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov73_021D3404 - - thumb_func_start ov73_021D3420 -ov73_021D3420: ; 0x021D3420 - ldr r3, _021D3428 ; =sub_0201C2B8 - ldr r0, [r0, #4] - bx r3 - nop -_021D3428: .word sub_0201C2B8 - thumb_func_end ov73_021D3420 - - thumb_func_start ov73_021D342C -ov73_021D342C: ; 0x021D342C - push {r3, r4, r5, lr} - sub sp, #0xb8 - ldr r5, _021D35D8 ; =0x021D3AC0 - add r4, r0, #0 - add r3, sp, #0x90 - mov r2, #5 -_021D3438: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D3438 - add r0, sp, #0x90 - bl sub_0201FE94 - ldr r0, [r4, #0] - bl sub_02018340 - add r3, sp, #0x80 - ldr r5, _021D35DC ; =0x021D3A40 - str r0, [r4, #4] - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D35E0 ; =0x021D3A6C - add r3, sp, #0x64 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r3, [r4, #0] - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019EBC - ldr r5, _021D35E4 ; =0x021D3A88 - add r3, sp, #0x48 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - ldr r0, [r4, #4] - add r3, r1, #0 - bl sub_020183C4 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - ldr r0, [r4, #0] - mov r1, #1 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x88 - bl sub_02006E3C - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - ldr r0, [r4, #0] - mov r1, #4 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x88 - bl sub_02006E60 - ldr r5, _021D35E8 ; =0x021D3A50 - add r3, sp, #0x2c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #2 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x88 - mov r3, #1 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #5 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x88 - mov r3, #1 - bl sub_02006E60 - ldr r5, _021D35EC ; =0x021D3AA4 - add r3, sp, #0x10 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #8 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x88 - mov r3, #3 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #7 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x88 - mov r3, #3 - bl sub_02006E60 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - mov r1, #6 - str r0, [sp, #4] - mov r0, #0x88 - add r3, r2, #0 - bl sub_02006E84 - mov r3, #0x40 - mov r0, #7 - str r3, [sp] - lsl r0, r0, #6 - str r0, [sp, #4] - ldr r0, [r4, #0] - mov r1, #9 - str r0, [sp, #8] - mov r0, #0x88 - mov r2, #0 - bl sub_02006E9C - ldr r2, [r4, #0] - mov r0, #0 - mov r1, #0x20 - bl sub_02002E7C - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - mov r2, #0xc - ldr r0, _021D35F0 ; =0x04000050 - mov r1, #2 - mov r3, #4 - str r2, [sp] - bl sub_020BF55C - add sp, #0xb8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D35D8: .word 0x021D3AC0 -_021D35DC: .word 0x021D3A40 -_021D35E0: .word 0x021D3A6C -_021D35E4: .word 0x021D3A88 -_021D35E8: .word 0x021D3A50 -_021D35EC: .word 0x021D3AA4 -_021D35F0: .word 0x04000050 - thumb_func_end ov73_021D342C - - thumb_func_start ov73_021D35F4 -ov73_021D35F4: ; 0x021D35F4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02019120 - mov r0, #1 - mov r1, #0 - bl sub_02019120 - mov r0, #2 - mov r1, #0 - bl sub_02019120 - mov r0, #3 - mov r1, #0 - bl sub_02019120 - mov r0, #4 - mov r1, #0 - bl sub_02019120 - mov r0, #5 - mov r1, #0 - bl sub_02019120 - mov r0, #6 - mov r1, #0 - bl sub_02019120 - mov r0, #7 - mov r1, #0 - bl sub_02019120 - ldr r0, _021D3668 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, [r4, #4] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #4] - bl sub_020181C4 - pop {r4, pc} - nop -_021D3668: .word 0x04000050 - thumb_func_end ov73_021D35F4 - - thumb_func_start ov73_021D366C -ov73_021D366C: ; 0x021D366C - push {r4, lr} - add r4, r0, #0 - ldr r2, _021D3688 ; =0x0000025F - ldr r3, [r4, #0] - mov r0, #1 - mov r1, #0x1a - bl sub_0200B144 - str r0, [r4, #8] - bl sub_0201D710 - mov r0, #0 - str r0, [r4, #0xc] - pop {r4, pc} - ; .align 2, 0 -_021D3688: .word 0x0000025F - thumb_func_end ov73_021D366C - - thumb_func_start ov73_021D368C -ov73_021D368C: ; 0x021D368C - ldr r3, _021D3694 ; =sub_0200B190 - ldr r0, [r0, #8] - bx r3 - nop -_021D3694: .word sub_0200B190 - thumb_func_end ov73_021D368C - - thumb_func_start ov73_021D3698 -ov73_021D3698: ; 0x021D3698 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #0xc] - add r7, r1, #0 - mov r6, #0 - cmp r0, #3 - bhi _021D3798 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D36B4: ; jump table - .short _021D36BC - _021D36B4 - 2 ; case 0 - .short _021D3756 - _021D36B4 - 2 ; case 1 - .short _021D3768 - _021D36B4 - 2 ; case 2 - .short _021D3782 - _021D36B4 - 2 ; case 3 -_021D36BC: - mov r0, #2 - add r1, r6, #0 - bl sub_02019120 - mov r0, #1 - ldr r1, [r4, #0] - lsl r0, r0, #0xa - bl sub_02023790 - add r5, r0, #0 - ldr r0, [r4, #8] - add r1, r7, #0 - add r2, r5, #0 - bl sub_0200B1B8 - add r1, r4, #0 - ldr r0, [r4, #4] - ldr r2, _021D37A0 ; =0x021D3A38 - add r1, #0x10 - bl sub_0201A8D4 - add r1, r6, #0 - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0xc0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x10 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - add r0, r6, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #1 - lsl r1, r1, #8 - sub r0, r1, r0 - lsr r7, r0, #1 - add r0, r5, #0 - bl sub_02023C5C - lsl r1, r0, #4 - mov r0, #0xc0 - sub r0, r0, r1 - lsr r0, r0, #1 - str r0, [sp] - add r1, r6, #0 - ldr r0, _021D37A4 ; =0x000F0200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - add r2, r5, #0 - add r3, r7, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A954 - mov r0, #2 - mov r1, #1 - bl sub_02019120 - mov r0, #0xf0 - str r0, [r4, #0x24] - mov r0, #1 - str r0, [r4, #0xc] - b _021D3798 -_021D3756: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021D3762 - sub r0, r0, #1 - str r0, [r4, #0x24] - b _021D3798 -_021D3762: - mov r0, #2 - str r0, [r4, #0xc] - b _021D3798 -_021D3768: - ldr r0, _021D37A8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - and r0, r1 - cmp r0, #1 - beq _021D377C - mov r0, #2 - and r0, r1 - cmp r0, #2 - bne _021D3798 -_021D377C: - mov r0, #3 - str r0, [r4, #0xc] - b _021D3798 -_021D3782: - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A8FC - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019EBC - add r0, r6, #0 - str r0, [r4, #0xc] - mov r6, #1 -_021D3798: - add r0, r6, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D37A0: .word 0x021D3A38 -_021D37A4: .word 0x000F0200 -_021D37A8: .word 0x021BF67C - thumb_func_end ov73_021D3698 - - thumb_func_start ov73_021D37AC -ov73_021D37AC: ; 0x021D37AC - push {r3, lr} - ldr r1, [r0, #0x20] - mov r2, #3 - add r3, r1, #4 - str r3, [r0, #0x20] - ldr r0, [r0, #4] - mov r1, #1 - asr r3, r3, #4 - bl sub_02019184 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov73_021D37AC - ; 0x021D37C4 - - .rodata - .incbin "incbin/overlay73_rodata.bin" - .bss - .space 0x0 + .global Unk_ov73_021D37C4 +Unk_ov73_021D37C4: ; 0x021D37C4 + .incbin "incbin/overlay73_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov73_021D37CC +Unk_ov73_021D37CC: ; 0x021D37CC + .incbin "incbin/overlay73_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov73_021D37D4 +Unk_ov73_021D37D4: ; 0x021D37D4 + .incbin "incbin/overlay73_rodata.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov73_021D37DC +Unk_ov73_021D37DC: ; 0x021D37DC + .incbin "incbin/overlay73_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov73_021D37E4 +Unk_ov73_021D37E4: ; 0x021D37E4 + .incbin "incbin/overlay73_rodata.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov73_021D37EC +Unk_ov73_021D37EC: ; 0x021D37EC + .incbin "incbin/overlay73_rodata.bin", 0x28, 0x30 - 0x28 + + .global Unk_ov73_021D37F4 +Unk_ov73_021D37F4: ; 0x021D37F4 + .incbin "incbin/overlay73_rodata.bin", 0x30, 0x3C - 0x30 + + .global Unk_ov73_021D3800 +Unk_ov73_021D3800: ; 0x021D3800 + .incbin "incbin/overlay73_rodata.bin", 0x3C, 0x4C - 0x3C + + .global Unk_ov73_021D3810 +Unk_ov73_021D3810: ; 0x021D3810 + .incbin "incbin/overlay73_rodata.bin", 0x4C, 0x5C - 0x4C + + .global Unk_ov73_021D3820 +Unk_ov73_021D3820: ; 0x021D3820 + .incbin "incbin/overlay73_rodata.bin", 0x5C, 0x6C - 0x5C + + .global Unk_ov73_021D3830 +Unk_ov73_021D3830: ; 0x021D3830 + .incbin "incbin/overlay73_rodata.bin", 0x6C, 0x7C - 0x6C + + .global Unk_ov73_021D3840 +Unk_ov73_021D3840: ; 0x021D3840 + .incbin "incbin/overlay73_rodata.bin", 0x7C, 0x8C - 0x7C + + .global Unk_ov73_021D3850 +Unk_ov73_021D3850: ; 0x021D3850 + .incbin "incbin/overlay73_rodata.bin", 0x8C, 0xA0 - 0x8C + + .global Unk_ov73_021D3864 +Unk_ov73_021D3864: ; 0x021D3864 + .incbin "incbin/overlay73_rodata.bin", 0xA0, 0xB4 - 0xA0 + + .global Unk_ov73_021D3878 +Unk_ov73_021D3878: ; 0x021D3878 + .incbin "incbin/overlay73_rodata.bin", 0xB4, 0xC8 - 0xB4 + + .global Unk_ov73_021D388C +Unk_ov73_021D388C: ; 0x021D388C + .incbin "incbin/overlay73_rodata.bin", 0xC8, 0xE0 - 0xC8 + + .global Unk_ov73_021D38A4 +Unk_ov73_021D38A4: ; 0x021D38A4 + .incbin "incbin/overlay73_rodata.bin", 0xE0, 0xF8 - 0xE0 + + .global Unk_ov73_021D38BC +Unk_ov73_021D38BC: ; 0x021D38BC + .incbin "incbin/overlay73_rodata.bin", 0xF8, 0x110 - 0xF8 + + .global Unk_ov73_021D38D4 +Unk_ov73_021D38D4: ; 0x021D38D4 + .incbin "incbin/overlay73_rodata.bin", 0x110, 0x12C - 0x110 + + .global Unk_ov73_021D38F0 +Unk_ov73_021D38F0: ; 0x021D38F0 + .incbin "incbin/overlay73_rodata.bin", 0x12C, 0x148 - 0x12C + + .global Unk_ov73_021D390C +Unk_ov73_021D390C: ; 0x021D390C + .incbin "incbin/overlay73_rodata.bin", 0x148, 0x168 - 0x148 + + .global Unk_ov73_021D392C +Unk_ov73_021D392C: ; 0x021D392C + .incbin "incbin/overlay73_rodata.bin", 0x168, 0x190 - 0x168 + + .global Unk_ov73_021D3954 +Unk_ov73_021D3954: ; 0x021D3954 + .incbin "incbin/overlay73_rodata.bin", 0x190, 0x1B8 - 0x190 + + .global Unk_ov73_021D397C +Unk_ov73_021D397C: ; 0x021D397C + .incbin "incbin/overlay73_rodata.bin", 0x1B8, 0x210 - 0x1B8 + + .global Unk_ov73_021D39D4 +Unk_ov73_021D39D4: ; 0x021D39D4 + .incbin "incbin/overlay73_rodata.bin", 0x210, 0x64 + diff --git a/asm/ov73_021D3250.s b/asm/ov73_021D3250.s new file mode 100644 index 000000000..278e6940c --- /dev/null +++ b/asm/ov73_021D3250.s @@ -0,0 +1,697 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov73_021D3250 +ov73_021D3250: ; 0x021D3250 + push {r4, lr} + mov r2, #1 + add r4, r0, #0 + mov r0, #3 + mov r1, #0x53 + lsl r2, r2, #0x12 + bl sub_02017FC8 + add r0, r4, #0 + mov r1, #0x28 + mov r2, #0x53 + bl sub_0200681C + mov r1, #0 + mov r2, #0x28 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x53 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #0x24] + mov r0, #1 + pop {r4, pc} + thumb_func_end ov73_021D3250 + + thumb_func_start ov73_021D3280 +ov73_021D3280: ; 0x021D3280 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + bl sub_0200682C + ldr r1, [r5, #0] + add r4, r0, #0 + mov r6, #0 + cmp r1, #5 + bls _021D3296 + b _021D33EA +_021D3296: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D32A2: ; jump table + .short _021D32AE - _021D32A2 - 2 ; case 0 + .short _021D3334 - _021D32A2 - 2 ; case 1 + .short _021D335A - _021D32A2 - 2 ; case 2 + .short _021D3384 - _021D32A2 - 2 ; case 3 + .short _021D3396 - _021D32A2 - 2 ; case 4 + .short _021D33C8 - _021D32A2 - 2 ; case 5 +_021D32AE: + add r0, r6, #0 + add r1, r6, #0 + bl sub_0200F344 + mov r0, #1 + add r1, r6, #0 + bl sub_0200F344 + add r0, r6, #0 + add r1, r0, #0 + bl sub_02017798 + add r0, r6, #0 + add r1, r0, #0 + bl sub_020177BC + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D33F0 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D33F4 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + add r0, r4, #0 + bl ov73_021D342C + add r0, r4, #0 + bl ov73_021D366C + ldr r0, _021D33F8 ; =ov73_021D3420 + add r1, r4, #0 + bl sub_02017798 + bl sub_0201FFD0 + bl sub_020241F0 + add r1, r6, #0 + add r7, r0, #0 + str r1, [sp] + ldr r2, _021D33FC ; =0x0000FFFC + add r1, r7, #0 + mov r3, #7 + bl sub_020039F8 + mov r2, #2 + add r0, r7, #0 + add r1, r6, #0 + lsl r2, r2, #8 + bl sub_020C00B4 + mov r0, #0x3c + str r0, [r4, #0x24] + mov r0, #1 + str r0, [r5, #0] + b _021D33EA +_021D3334: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021D3340 + sub r0, r0, #1 + str r0, [r4, #0x24] + b _021D33EA +_021D3340: + ldr r0, _021D3400 ; =0x00000406 + bl sub_02004224 + ldr r1, _021D3400 ; =0x00000406 + mov r0, #4 + mov r2, #1 + bl sub_02004550 + mov r0, #0x5a + str r0, [r4, #0x24] + mov r0, #2 + str r0, [r5, #0] + b _021D33EA +_021D335A: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021D3366 + sub r0, r0, #1 + str r0, [r4, #0x24] + b _021D33EA +_021D3366: + str r6, [r4, #0x24] + mov r0, #6 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + str r0, [sp, #8] + add r0, r6, #0 + add r3, r6, #0 + bl sub_0200F174 + mov r0, #3 + str r0, [r5, #0] + b _021D33EA +_021D3384: + bl ov73_021D37AC + bl sub_0200F2AC + cmp r0, #1 + bne _021D33EA + mov r0, #4 + str r0, [r5, #0] + b _021D33EA +_021D3396: + bl ov73_021D37AC + add r0, r4, #0 + add r1, r6, #0 + mov r2, #0x28 + mov r3, #0x30 + bl ov73_021D3698 + cmp r0, #1 + bne _021D33EA + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + str r0, [sp, #8] + add r0, r6, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #5 + str r0, [r5, #0] + b _021D33EA +_021D33C8: + bl ov73_021D37AC + bl sub_0200F2AC + cmp r0, #1 + bne _021D33EA + add r0, r4, #0 + bl ov73_021D368C + add r0, r4, #0 + bl ov73_021D35F4 + add r0, r6, #0 + add r1, r0, #0 + bl sub_02017798 + mov r6, #1 +_021D33EA: + add r0, r6, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D33F0: .word 0xFFFFE0FF +_021D33F4: .word 0x04001000 +_021D33F8: .word ov73_021D3420 +_021D33FC: .word 0x0000FFFC +_021D3400: .word 0x00000406 + thumb_func_end ov73_021D3280 + + thumb_func_start ov73_021D3404 +ov73_021D3404: ; 0x021D3404 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + ldr r4, [r0, #0] + add r0, r5, #0 + bl sub_02006830 + add r0, r4, #0 + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov73_021D3404 + + thumb_func_start ov73_021D3420 +ov73_021D3420: ; 0x021D3420 + ldr r3, _021D3428 ; =sub_0201C2B8 + ldr r0, [r0, #4] + bx r3 + nop +_021D3428: .word sub_0201C2B8 + thumb_func_end ov73_021D3420 + + thumb_func_start ov73_021D342C +ov73_021D342C: ; 0x021D342C + push {r3, r4, r5, lr} + sub sp, #0xb8 + ldr r5, _021D35D8 ; =0x021D3AC0 + add r4, r0, #0 + add r3, sp, #0x90 + mov r2, #5 +_021D3438: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D3438 + add r0, sp, #0x90 + bl sub_0201FE94 + ldr r0, [r4, #0] + bl sub_02018340 + add r3, sp, #0x80 + ldr r5, _021D35DC ; =0x021D3A40 + str r0, [r4, #4] + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D35E0 ; =0x021D3A6C + add r3, sp, #0x64 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r3, [r4, #0] + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019EBC + ldr r5, _021D35E4 ; =0x021D3A88 + add r3, sp, #0x48 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + ldr r0, [r4, #4] + add r3, r1, #0 + bl sub_020183C4 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + ldr r0, [r4, #0] + mov r1, #1 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x88 + bl sub_02006E3C + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + ldr r0, [r4, #0] + mov r1, #4 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x88 + bl sub_02006E60 + ldr r5, _021D35E8 ; =0x021D3A50 + add r3, sp, #0x2c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #2 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x88 + mov r3, #1 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #5 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x88 + mov r3, #1 + bl sub_02006E60 + ldr r5, _021D35EC ; =0x021D3AA4 + add r3, sp, #0x10 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #8 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x88 + mov r3, #3 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [r4, #0] + mov r1, #7 + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x88 + mov r3, #3 + bl sub_02006E60 + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0] + mov r1, #6 + str r0, [sp, #4] + mov r0, #0x88 + add r3, r2, #0 + bl sub_02006E84 + mov r3, #0x40 + mov r0, #7 + str r3, [sp] + lsl r0, r0, #6 + str r0, [sp, #4] + ldr r0, [r4, #0] + mov r1, #9 + str r0, [sp, #8] + mov r0, #0x88 + mov r2, #0 + bl sub_02006E9C + ldr r2, [r4, #0] + mov r0, #0 + mov r1, #0x20 + bl sub_02002E7C + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + mov r2, #0xc + ldr r0, _021D35F0 ; =0x04000050 + mov r1, #2 + mov r3, #4 + str r2, [sp] + bl sub_020BF55C + add sp, #0xb8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D35D8: .word 0x021D3AC0 +_021D35DC: .word 0x021D3A40 +_021D35E0: .word 0x021D3A6C +_021D35E4: .word 0x021D3A88 +_021D35E8: .word 0x021D3A50 +_021D35EC: .word 0x021D3AA4 +_021D35F0: .word 0x04000050 + thumb_func_end ov73_021D342C + + thumb_func_start ov73_021D35F4 +ov73_021D35F4: ; 0x021D35F4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02019120 + mov r0, #1 + mov r1, #0 + bl sub_02019120 + mov r0, #2 + mov r1, #0 + bl sub_02019120 + mov r0, #3 + mov r1, #0 + bl sub_02019120 + mov r0, #4 + mov r1, #0 + bl sub_02019120 + mov r0, #5 + mov r1, #0 + bl sub_02019120 + mov r0, #6 + mov r1, #0 + bl sub_02019120 + mov r0, #7 + mov r1, #0 + bl sub_02019120 + ldr r0, _021D3668 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, [r4, #4] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #4] + bl sub_020181C4 + pop {r4, pc} + nop +_021D3668: .word 0x04000050 + thumb_func_end ov73_021D35F4 + + thumb_func_start ov73_021D366C +ov73_021D366C: ; 0x021D366C + push {r4, lr} + add r4, r0, #0 + ldr r2, _021D3688 ; =0x0000025F + ldr r3, [r4, #0] + mov r0, #1 + mov r1, #0x1a + bl sub_0200B144 + str r0, [r4, #8] + bl sub_0201D710 + mov r0, #0 + str r0, [r4, #0xc] + pop {r4, pc} + ; .align 2, 0 +_021D3688: .word 0x0000025F + thumb_func_end ov73_021D366C + + thumb_func_start ov73_021D368C +ov73_021D368C: ; 0x021D368C + ldr r3, _021D3694 ; =sub_0200B190 + ldr r0, [r0, #8] + bx r3 + nop +_021D3694: .word sub_0200B190 + thumb_func_end ov73_021D368C + + thumb_func_start ov73_021D3698 +ov73_021D3698: ; 0x021D3698 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #0xc] + add r7, r1, #0 + mov r6, #0 + cmp r0, #3 + bhi _021D3798 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D36B4: ; jump table + .short _021D36BC - _021D36B4 - 2 ; case 0 + .short _021D3756 - _021D36B4 - 2 ; case 1 + .short _021D3768 - _021D36B4 - 2 ; case 2 + .short _021D3782 - _021D36B4 - 2 ; case 3 +_021D36BC: + mov r0, #2 + add r1, r6, #0 + bl sub_02019120 + mov r0, #1 + ldr r1, [r4, #0] + lsl r0, r0, #0xa + bl sub_02023790 + add r5, r0, #0 + ldr r0, [r4, #8] + add r1, r7, #0 + add r2, r5, #0 + bl sub_0200B1B8 + add r1, r4, #0 + ldr r0, [r4, #4] + ldr r2, _021D37A0 ; =0x021D3A38 + add r1, #0x10 + bl sub_0201A8D4 + add r1, r6, #0 + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0xc0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x10 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + add r0, r6, #0 + add r1, r5, #0 + add r2, r0, #0 + bl sub_02002EB4 + mov r1, #1 + lsl r1, r1, #8 + sub r0, r1, r0 + lsr r7, r0, #1 + add r0, r5, #0 + bl sub_02023C5C + lsl r1, r0, #4 + mov r0, #0xc0 + sub r0, r0, r1 + lsr r0, r0, #1 + str r0, [sp] + add r1, r6, #0 + ldr r0, _021D37A4 ; =0x000F0200 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x10 + add r2, r5, #0 + add r3, r7, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A954 + mov r0, #2 + mov r1, #1 + bl sub_02019120 + mov r0, #0xf0 + str r0, [r4, #0x24] + mov r0, #1 + str r0, [r4, #0xc] + b _021D3798 +_021D3756: + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _021D3762 + sub r0, r0, #1 + str r0, [r4, #0x24] + b _021D3798 +_021D3762: + mov r0, #2 + str r0, [r4, #0xc] + b _021D3798 +_021D3768: + ldr r0, _021D37A8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + and r0, r1 + cmp r0, #1 + beq _021D377C + mov r0, #2 + and r0, r1 + cmp r0, #2 + bne _021D3798 +_021D377C: + mov r0, #3 + str r0, [r4, #0xc] + b _021D3798 +_021D3782: + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A8FC + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019EBC + add r0, r6, #0 + str r0, [r4, #0xc] + mov r6, #1 +_021D3798: + add r0, r6, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D37A0: .word 0x021D3A38 +_021D37A4: .word 0x000F0200 +_021D37A8: .word 0x021BF67C + thumb_func_end ov73_021D3698 + + thumb_func_start ov73_021D37AC +ov73_021D37AC: ; 0x021D37AC + push {r3, lr} + ldr r1, [r0, #0x20] + mov r2, #3 + add r3, r1, #4 + str r3, [r0, #0x20] + ldr r0, [r0, #4] + mov r1, #1 + asr r3, r3, #4 + bl sub_02019184 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov73_021D37AC + + .rodata + + + .global Unk_ov73_021D3A38 +Unk_ov73_021D3A38: ; 0x021D3A38 + .incbin "incbin/overlay73_rodata.bin", 0x274, 0x27C - 0x274 + + .global Unk_ov73_021D3A40 +Unk_ov73_021D3A40: ; 0x021D3A40 + .incbin "incbin/overlay73_rodata.bin", 0x27C, 0x28C - 0x27C + + .global Unk_ov73_021D3A50 +Unk_ov73_021D3A50: ; 0x021D3A50 + .incbin "incbin/overlay73_rodata.bin", 0x28C, 0x2A8 - 0x28C + + .global Unk_ov73_021D3A6C +Unk_ov73_021D3A6C: ; 0x021D3A6C + .incbin "incbin/overlay73_rodata.bin", 0x2A8, 0x2C4 - 0x2A8 + + .global Unk_ov73_021D3A88 +Unk_ov73_021D3A88: ; 0x021D3A88 + .incbin "incbin/overlay73_rodata.bin", 0x2C4, 0x2E0 - 0x2C4 + + .global Unk_ov73_021D3AA4 +Unk_ov73_021D3AA4: ; 0x021D3AA4 + .incbin "incbin/overlay73_rodata.bin", 0x2E0, 0x2FC - 0x2E0 + + .global Unk_ov73_021D3AC0 +Unk_ov73_021D3AC0: ; 0x021D3AC0 + .incbin "incbin/overlay73_rodata.bin", 0x2FC, 0x28 + diff --git a/asm/overlay74.s b/asm/ov74_021D0D80.s similarity index 96% rename from asm/overlay74.s rename to asm/ov74_021D0D80.s index d66a7da6a..baf2667b0 100644 --- a/asm/overlay74.s +++ b/asm/ov74_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov74_021D0D80 ov74_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -1790,12 +1793,47 @@ ov74_021D1BE4: ; 0x021D1BE4 _021D1BEC: .word 0x021D1C0C _021D1BF0: .word ov74_021D1968 thumb_func_end ov74_021D1BE4 - ; 0x021D1BF4 - .rodata - .incbin "incbin/overlay74_rodata.bin" - .bss - .space 0x0 + .global Unk_ov74_021D1BF4 +Unk_ov74_021D1BF4: ; 0x021D1BF4 + .incbin "incbin/overlay74_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov74_021D1BFC +Unk_ov74_021D1BFC: ; 0x021D1BFC + .incbin "incbin/overlay74_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov74_021D1C04 +Unk_ov74_021D1C04: ; 0x021D1C04 + .incbin "incbin/overlay74_rodata.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov74_021D1C0C +Unk_ov74_021D1C0C: ; 0x021D1C0C + .incbin "incbin/overlay74_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov74_021D1C14 +Unk_ov74_021D1C14: ; 0x021D1C14 + .incbin "incbin/overlay74_rodata.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov74_021D1C1C +Unk_ov74_021D1C1C: ; 0x021D1C1C + .incbin "incbin/overlay74_rodata.bin", 0x28, 0x38 - 0x28 + + .global Unk_ov74_021D1C2C +Unk_ov74_021D1C2C: ; 0x021D1C2C + .incbin "incbin/overlay74_rodata.bin", 0x38, 0x4C - 0x38 + + .global Unk_ov74_021D1C40 +Unk_ov74_021D1C40: ; 0x021D1C40 + .incbin "incbin/overlay74_rodata.bin", 0x4C, 0x68 - 0x4C + + .global Unk_ov74_021D1C5C +Unk_ov74_021D1C5C: ; 0x021D1C5C + .incbin "incbin/overlay74_rodata.bin", 0x68, 0x90 - 0x68 + + .global Unk_ov74_021D1C84 +Unk_ov74_021D1C84: ; 0x021D1C84 + .incbin "incbin/overlay74_rodata.bin", 0x90, 0x8C + diff --git a/asm/overlay75.s b/asm/ov75_021D0D80.s similarity index 97% rename from asm/overlay75.s rename to asm/ov75_021D0D80.s index fa3a46182..7817906bb 100644 --- a/asm/overlay75.s +++ b/asm/ov75_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov75_021D0D80 ov75_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -1922,12 +1925,39 @@ _021D1CF8: pop {r4, r5, r6, pc} ; .align 2, 0 thumb_func_end ov75_021D1CB8 - ; 0x021D1CFC - .rodata - .incbin "incbin/overlay75_rodata.bin" - .bss - .space 0x0 + .global Unk_ov75_021D1CFC +Unk_ov75_021D1CFC: ; 0x021D1CFC + .incbin "incbin/overlay75_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov75_021D1D04 +Unk_ov75_021D1D04: ; 0x021D1D04 + .incbin "incbin/overlay75_rodata.bin", 0x8, 0x18 - 0x8 + + .global Unk_ov75_021D1D14 +Unk_ov75_021D1D14: ; 0x021D1D14 + .incbin "incbin/overlay75_rodata.bin", 0x18, 0x28 - 0x18 + + .global Unk_ov75_021D1D24 +Unk_ov75_021D1D24: ; 0x021D1D24 + .incbin "incbin/overlay75_rodata.bin", 0x28, 0x3C - 0x28 + + .global Unk_ov75_021D1D38 +Unk_ov75_021D1D38: ; 0x021D1D38 + .incbin "incbin/overlay75_rodata.bin", 0x3C, 0x54 - 0x3C + + .global Unk_ov75_021D1D50 +Unk_ov75_021D1D50: ; 0x021D1D50 + .incbin "incbin/overlay75_rodata.bin", 0x54, 0x74 - 0x54 + + .global Unk_ov75_021D1D70 +Unk_ov75_021D1D70: ; 0x021D1D70 + .incbin "incbin/overlay75_rodata.bin", 0x74, 0x9C - 0x74 + + .global Unk_ov75_021D1D98 +Unk_ov75_021D1D98: ; 0x021D1D98 + .incbin "incbin/overlay75_rodata.bin", 0x9C, 0x8C + diff --git a/asm/ov76_0223B140.s b/asm/ov76_0223B140.s new file mode 100644 index 000000000..d49727ccc --- /dev/null +++ b/asm/ov76_0223B140.s @@ -0,0 +1,1005 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov76_0223B140 +ov76_0223B140: ; 0x0223B140 + push {r3, lr} + ldr r0, _0223B154 ; =0x0000000B + mov r1, #2 + bl sub_02006590 + ldr r0, _0223B158 ; =0x0000000C + mov r1, #2 + bl sub_02006590 + pop {r3, pc} + ; .align 2, 0 +_0223B154: .word 0x0000000B +_0223B158: .word 0x0000000C + thumb_func_end ov76_0223B140 + + thumb_func_start ov76_0223B15C +ov76_0223B15C: ; 0x0223B15C + add r3, r2, #0 + sub r3, #0xa + strb r3, [r0] + add r3, r1, #0 + sub r3, #0xa + strb r3, [r0, #2] + add r2, #0xa + strb r2, [r0, #1] + add r1, #0xa + strb r1, [r0, #3] + bx lr + ; .align 2, 0 + thumb_func_end ov76_0223B15C + + thumb_func_start ov76_0223B174 +ov76_0223B174: ; 0x0223B174 + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #2] + mov r1, #0xc0 + strb r1, [r0, #1] + mov r1, #0xff + strb r1, [r0, #3] + bx lr + thumb_func_end ov76_0223B174 + + thumb_func_start ov76_0223B184 +ov76_0223B184: ; 0x0223B184 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + beq _0223B1D8 + cmp r2, #1 + bne _0223B1B4 + ldr r3, _0223B1DC ; =0x021BF6BC + mov r1, #0x1c + mov r2, #0x1e + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, r4, #0 + bl sub_0200D4C4 + add r1, sp, #0 + add r0, r4, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r0, r5, #0 + bl ov76_0223B174 + pop {r3, r4, r5, pc} +_0223B1B4: + add r1, sp, #0 + add r0, r4, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r3, sp, #0 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, r5, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x18 + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + bl ov76_0223B15C +_0223B1D8: + pop {r3, r4, r5, pc} + nop +_0223B1DC: .word 0x021BF6BC + thumb_func_end ov76_0223B184 + + thumb_func_start ov76_0223B1E0 +ov76_0223B1E0: ; 0x0223B1E0 + push {r3, r4, r5, r6, r7, lr} + mov r4, #0 + add r7, r4, #0 + mov r6, #0xcb + add r5, r0, #0 + sub r7, #0x38 + lsl r6, r6, #2 +_0223B1EE: + ldr r0, [r5, r6] + cmp r0, #0 + beq _0223B1FC + add r1, r7, #0 + mov r2, #0x10 + bl sub_0200D5DC +_0223B1FC: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #8 + blt _0223B1EE + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B1E0 + + thumb_func_start ov76_0223B208 +ov76_0223B208: ; 0x0223B208 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r0, #0xf1 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r6, #0 + lsl r0, r0, #3 + add r0, r7, r0 + ldr r4, [r0, #8] + add r5, r7, #0 +_0223B21C: + ldrb r1, [r4] + cmp r1, #0 + beq _0223B25A + mov r0, #0xca + lsl r0, r0, #2 + strb r1, [r5, r0] + ldrb r1, [r4, #1] + add r0, r0, #1 + strb r1, [r5, r0] + ldrb r1, [r4, #2] + ldr r0, _0223B274 ; =0x0000032A + strb r1, [r5, r0] + lsl r1, r6, #0x18 + add r0, r7, #0 + lsr r1, r1, #0x18 + bl ov76_0223B52C + mov r0, #0x33 + mov r1, #0xcb + lsl r0, r0, #4 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + mov r2, #0 + bl ov76_0223B184 + mov r0, #0xc9 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + b _0223B266 +_0223B25A: + mov r0, #0xc9 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r0, #4 + strb r1, [r5, r0] +_0223B266: + add r6, r6, #1 + add r4, r4, #3 + add r5, #0x10 + cmp r6, #8 + blt _0223B21C + pop {r3, r4, r5, r6, r7, pc} + nop +_0223B274: .word 0x0000032A + thumb_func_end ov76_0223B208 + + thumb_func_start ov76_0223B278 +ov76_0223B278: ; 0x0223B278 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + mov r0, #0xc9 + mov r4, #0 + add r3, r6, #0 + lsl r0, r0, #2 +_0223B286: + ldr r2, [r3, r0] + cmp r2, #1 + beq _0223B2E8 + add r0, r6, r1 + mov r1, #0x42 + lsl r1, r1, #4 + ldrb r3, [r0, r1] + lsl r5, r4, #4 + add r0, r1, #0 + add r2, r6, r5 + sub r0, #0xf8 + strb r3, [r2, r0] + add r0, r1, #0 + sub r0, #0xf7 + add r7, r6, r0 + mov r0, #0xbe + sub r1, #0xf6 + strb r0, [r7, r5] + add r0, r6, r1 + mov r1, #0x46 + strb r1, [r0, r5] + str r0, [sp] + add r0, sp, #8 + add r1, sp, #4 + bl sub_020227A4 + ldr r0, [sp, #8] + strb r0, [r7, r5] + ldr r1, [sp, #4] + ldr r0, [sp] + strb r1, [r0, r5] + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + bl ov76_0223B52C + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + bl ov76_0223B314 + mov r0, #0xc9 + mov r2, #1 + add r1, r6, r5 + lsl r0, r0, #2 + str r2, [r1, r0] + add sp, #0xc + add r0, r4, #0 + pop {r4, r5, r6, r7, pc} +_0223B2E8: + add r4, r4, #1 + add r3, #0x10 + cmp r4, #8 + blt _0223B286 + mov r0, #0xff + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B278 + + thumb_func_start ov76_0223B2F8 +ov76_0223B2F8: ; 0x0223B2F8 + mov r1, #0xc9 + mov r3, #0 + lsl r1, r1, #2 +_0223B2FE: + ldr r2, [r0, r1] + cmp r2, #1 + beq _0223B308 + mov r0, #1 + bx lr +_0223B308: + add r3, r3, #1 + add r0, #0x10 + cmp r3, #8 + blt _0223B2FE + mov r0, #0 + bx lr + thumb_func_end ov76_0223B2F8 + + thumb_func_start ov76_0223B314 +ov76_0223B314: ; 0x0223B314 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0xc9 + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + lsl r7, r7, #2 +_0223B320: + ldr r0, [r5, r7] + cmp r0, #1 + bne _0223B360 + cmp r4, r6 + bne _0223B338 + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D474 + b _0223B360 +_0223B338: + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D488 + add r1, r0, #0 + bne _0223B354 + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r1, #1 + bl sub_0200D474 + b _0223B360 +_0223B354: + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r1, #2 + bl sub_0200D474 +_0223B360: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #8 + blt _0223B320 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B314 + + thumb_func_start ov76_0223B36C +ov76_0223B36C: ; 0x0223B36C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r1, #0 + add r1, r0, #0 + add r1, #0xdc + ldr r4, [r1, #0] + add r1, r0, #0 + add r1, #0xe0 + ldr r5, [r1, #0] + mov r1, #0x5b + str r1, [sp] + add r1, #0xca + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #1 + str r1, [sp, #0xc] + mov r1, #2 + str r1, [sp, #0x10] + ldr r1, _0223B3F0 ; =0x0000532D + add r6, r2, #0 + str r1, [sp, #0x14] + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #3 + add r2, r4, #0 + add r3, r5, #0 + bl sub_0200CD7C + add r0, r7, #0 + bl sub_02098140 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223B3F4 ; =0x00004E20 + add r1, r5, #0 + add r0, r6, r0 + str r0, [sp, #8] + add r0, r4, #0 + mov r2, #0x5b + bl sub_0200CBDC + mov r0, #1 + str r0, [sp] + ldr r0, _0223B3F8 ; =0x0000564D + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x5b + mov r3, #0x5d + bl sub_0200CE0C + mov r3, #1 + ldr r0, _0223B3FC ; =0x000059D9 + str r3, [sp] + str r0, [sp, #4] + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0x5b + bl sub_0200CE3C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B3F0: .word 0x0000532D +_0223B3F4: .word 0x00004E20 +_0223B3F8: .word 0x0000564D +_0223B3FC: .word 0x000059D9 + thumb_func_end ov76_0223B36C + + thumb_func_start ov76_0223B400 +ov76_0223B400: ; 0x0223B400 + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + mov r1, #0x26 + lsl r1, r1, #4 + str r0, [sp] + ldr r0, [r0, r1] + cmp r0, #0 + bne _0223B412 + b _0223B520 +_0223B412: + ldr r0, [sp] + mov r7, #0 + str r7, [r0, r1] + add r4, sp, #0x54 + add r5, sp, #0x34 + add r6, r0, #0 +_0223B41E: + mov r0, #0xff + str r0, [r4, #0] + str r0, [r5, #0] + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r0, #0 + beq _0223B436 + bl sub_0200D488 + str r0, [r4, #0] + str r7, [r5, #0] +_0223B436: + add r7, r7, #1 + add r4, r4, #4 + add r5, r5, #4 + add r6, #0x10 + cmp r7, #8 + blt _0223B41E + mov r0, #0 + mov ip, r0 +_0223B446: + mov r0, ip + mov r3, #7 + cmp r0, #7 + bge _0223B476 + add r4, sp, #0x70 + add r5, sp, #0x50 +_0223B452: + sub r7, r4, #4 + ldr r2, [r4, #0] + ldr r0, [r7, #0] + cmp r0, r2 + blt _0223B46A + ldr r1, [r5, #0] + sub r6, r5, #4 + str r0, [r4, #0] + ldr r0, [r6, #0] + str r0, [r5, #0] + str r2, [r7, #0] + str r1, [r6, #0] +_0223B46A: + sub r3, r3, #1 + mov r0, ip + sub r4, r4, #4 + sub r5, r5, #4 + cmp r3, r0 + bgt _0223B452 +_0223B476: + mov r0, ip + add r0, r0, #1 + mov ip, r0 + cmp r0, #7 + blt _0223B446 + mov r3, #0xca + lsl r3, r3, #2 + ldr r0, [sp] + mov r2, #0 + add r1, sp, #0x1c + add r4, r3, #1 + add r5, r3, #2 +_0223B48E: + ldrb r6, [r0, r3] + add r2, r2, #1 + strb r6, [r1] + ldrb r6, [r0, r4] + strb r6, [r1, #1] + ldrb r6, [r0, r5] + add r0, #0x10 + strb r6, [r1, #2] + add r1, r1, #3 + cmp r2, #8 + blt _0223B48E + add r3, sp, #0x1c + add r2, sp, #4 + mov r1, #0x18 +_0223B4AA: + ldrb r0, [r3] + add r3, r3, #1 + strb r0, [r2] + add r2, r2, #1 + sub r1, r1, #1 + bne _0223B4AA + ldr r5, [sp] + mov r6, #0 + add r4, sp, #0x34 + add r7, sp, #4 +_0223B4BE: + ldr r1, [r4, #0] + cmp r1, #0xff + bne _0223B4D6 + mov r0, #0xca + mov r1, #0 + lsl r0, r0, #2 + strb r1, [r5, r0] + add r0, r0, #1 + strb r1, [r5, r0] + ldr r0, _0223B524 ; =0x0000032A + strb r1, [r5, r0] + b _0223B516 +_0223B4D6: + lsl r0, r1, #1 + add r0, r1, r0 + ldrb r1, [r7, r0] + mov r0, #0xca + lsl r0, r0, #2 + strb r1, [r5, r0] + ldr r1, [r4, #0] + lsl r0, r1, #1 + add r0, r1, r0 + add r0, r7, r0 + ldrb r1, [r0, #1] + ldr r0, _0223B528 ; =0x00000329 + strb r1, [r5, r0] + ldr r1, [r4, #0] + lsl r0, r1, #1 + add r0, r1, r0 + add r0, r7, r0 + ldrb r1, [r0, #2] + ldr r0, _0223B524 ; =0x0000032A + strb r1, [r5, r0] + ldr r0, [r4, #0] + lsl r1, r0, #4 + ldr r0, [sp] + add r1, r0, r1 + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #0 + beq _0223B516 + add r1, r6, #0 + bl sub_0200D474 +_0223B516: + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x10 + cmp r6, #8 + blt _0223B4BE +_0223B520: + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B524: .word 0x0000032A +_0223B528: .word 0x00000329 + thumb_func_end ov76_0223B400 + + thumb_func_start ov76_0223B52C +ov76_0223B52C: ; 0x0223B52C + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r1, #0 + add r1, r0, #0 + add r1, #0xdc + ldr r7, [r1, #0] + add r1, r0, #0 + add r1, #0xe0 + ldr r6, [r1, #0] + mov r1, #0xc9 + lsl r1, r1, #2 + add r2, r0, r1 + lsl r1, r5, #4 + add r4, r2, r1 + ldr r1, [r2, r1] + cmp r1, #1 + bne _0223B558 + bl sub_02022974 + add sp, #0x34 + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_0223B558: + ldrb r1, [r4, #4] + add r2, r5, #0 + bl ov76_0223B36C + ldrb r1, [r4, #5] + add r0, sp, #0 + strh r1, [r0] + ldrb r1, [r4, #6] + strh r1, [r0, #2] + mov r1, #0 + strh r1, [r0, #4] + strh r1, [r0, #6] + mov r0, #2 + str r0, [sp, #0x10] + mov r0, #1 + str r0, [sp, #0x2c] + sub r0, r0, #2 + str r1, [sp, #0xc] + str r1, [sp, #0x30] + str r1, [sp, #8] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldrb r0, [r4, #4] + bl sub_02098140 + ldr r0, _0223B5B4 ; =0x00004E20 + add r1, r6, #0 + add r0, r5, r0 + str r0, [sp, #0x14] + ldr r0, _0223B5B8 ; =0x0000532D + add r2, sp, #0 + str r0, [sp, #0x18] + ldr r0, _0223B5BC ; =0x0000564D + str r0, [sp, #0x1c] + ldr r0, _0223B5C0 ; =0x000059D9 + str r0, [sp, #0x20] + add r0, r7, #0 + bl sub_0200CE6C + str r0, [r4, #8] + bl sub_0200D330 + mov r0, #1 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0223B5B4: .word 0x00004E20 +_0223B5B8: .word 0x0000532D +_0223B5BC: .word 0x0000564D +_0223B5C0: .word 0x000059D9 + thumb_func_end ov76_0223B52C + + thumb_func_start ov76_0223B5C4 +ov76_0223B5C4: ; 0x0223B5C4 + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + add r6, r1, #0 + mov r1, #0xc9 + add r4, r0, #0 + lsl r7, r5, #4 + add r3, r4, r7 + lsl r1, r1, #2 + ldr r2, [r3, r1] + cmp r2, #0 + bne _0223B5DE + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223B5DE: + cmp r6, #3 + bhi _0223B66E + add r2, r6, r6 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0223B5EE: ; jump table + .short _0223B5F6 - _0223B5EE - 2 ; case 0 + .short _0223B636 - _0223B5EE - 2 ; case 1 + .short _0223B60C - _0223B5EE - 2 ; case 2 + .short _0223B636 - _0223B5EE - 2 ; case 3 +_0223B5F6: + add r1, r4, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + cmp r1, #0xff + bne _0223B672 + add r4, #0xd4 + add r1, r5, #0 + str r5, [r4, #0] + bl ov76_0223B314 + b _0223B672 +_0223B60C: + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, r5 + bne _0223B672 + add r0, r1, #0 + add r0, #0xc + add r1, #8 + ldr r0, [r3, r0] + ldr r1, [r3, r1] + mov r2, #1 + bl ov76_0223B184 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B758 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B7D4 + b _0223B672 +_0223B636: + add r1, r4, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + cmp r1, #0xff + bne _0223B672 + add r1, r5, #0 + bl ov76_0223B6C4 + mov r1, #0x33 + add r2, r4, r7 + lsl r1, r1, #4 + add r6, r0, #0 + ldr r0, [r2, r1] + sub r1, r1, #4 + ldr r1, [r2, r1] + mov r2, #0 + bl ov76_0223B184 + cmp r6, #0 + bne _0223B666 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B704 +_0223B666: + mov r0, #0xff + add r4, #0xd4 + str r0, [r4, #0] + b _0223B672 +_0223B66E: + bl sub_02022974 +_0223B672: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B5C4 + + thumb_func_start ov76_0223B678 +ov76_0223B678: ; 0x0223B678 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r7, #0xc9 + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_0223B684: + ldr r0, [r5, r7] + cmp r0, #1 + bne _0223B692 + add r0, r6, #0 + add r1, r4, #0 + bl ov76_0223B704 +_0223B692: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #8 + blt _0223B684 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223B678 + + thumb_func_start ov76_0223B69C +ov76_0223B69C: ; 0x0223B69C + push {r3, r4, r5, r6, r7, lr} + mov r7, #0xc9 + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + lsl r7, r7, #2 +_0223B6A8: + ldr r0, [r5, r7] + cmp r0, #1 + bne _0223B6BA + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_0200D3F4 +_0223B6BA: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #8 + blt _0223B6A8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223B69C + + thumb_func_start ov76_0223B6C4 +ov76_0223B6C4: ; 0x0223B6C4 + push {r3, lr} + lsl r1, r1, #4 + add r2, r0, r1 + mov r0, #0xc9 + lsl r0, r0, #2 + ldr r1, [r2, r0] + cmp r1, #0 + bne _0223B6D8 + mov r0, #1 + pop {r3, pc} +_0223B6D8: + add r0, #8 + ldr r0, [r2, r0] + add r1, sp, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r2, sp, #0 + mov r0, #2 + mov r1, #0 + ldrsh r0, [r2, r0] + ldrsh r1, [r2, r1] + mov r2, #0xbe + mov r3, #0x46 + bl ov12_02237E54 + cmp r0, #0x3c + bgt _0223B700 + mov r0, #1 + pop {r3, pc} +_0223B700: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov76_0223B6C4 + + thumb_func_start ov76_0223B704 +ov76_0223B704: ; 0x0223B704 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0xca + add r7, r1, #0 + lsl r0, r0, #2 + lsl r4, r7, #4 + add r6, r5, r0 + ldrb r0, [r6, r4] + bl sub_02098140 + add r0, r5, #0 + add r0, #0xe0 + ldr r1, _0223B754 ; =0x00004E20 + ldr r0, [r0, #0] + add r1, r7, r1 + bl sub_0200D070 + mov r0, #0xcb + lsl r0, r0, #2 + add r7, r5, r0 + ldr r0, [r7, r4] + bl sub_0200D0F4 + mov r1, #0 + mov r2, #0xc9 + lsl r2, r2, #2 + str r1, [r7, r4] + add r3, r5, r4 + str r1, [r3, r2] + strb r1, [r6, r4] + add r0, r2, #5 + strb r1, [r3, r0] + add r0, r2, #6 + add r2, #0xc + strb r1, [r3, r0] + ldr r0, [r3, r2] + add r2, r1, #0 + bl ov76_0223B15C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B754: .word 0x00004E20 + thumb_func_end ov76_0223B704 + + thumb_func_start ov76_0223B758 +ov76_0223B758: ; 0x0223B758 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + bl ov76_0223B6C4 + cmp r0, #0 + bne _0223B778 + lsl r0, r5, #4 + add r1, r4, r0 + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_0200D810 + pop {r3, r4, r5, pc} +_0223B778: + lsl r0, r5, #4 + add r1, r4, r0 + mov r0, #0xcb + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_0200D810 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B758 + + thumb_func_start ov76_0223B78C +ov76_0223B78C: ; 0x0223B78C + push {r4, r5, r6, r7} + mov r2, #0xf1 + lsl r2, r2, #2 + ldr r2, [r0, r2] + ldr r4, _0223B7D0 ; =0x00000329 + lsl r2, r2, #3 + add r2, r0, r2 + ldr r2, [r2, #8] + mov r1, #0 + add r3, r4, #1 + sub r5, r4, #1 +_0223B7A2: + ldrb r7, [r0, r5] + ldrb r6, [r2] + cmp r7, r6 + bne _0223B7BA + ldrb r7, [r0, r4] + ldrb r6, [r2, #1] + cmp r7, r6 + bne _0223B7BA + ldrb r7, [r0, r3] + ldrb r6, [r2, #2] + cmp r7, r6 + beq _0223B7C0 +_0223B7BA: + mov r0, #1 + pop {r4, r5, r6, r7} + bx lr +_0223B7C0: + add r1, r1, #1 + add r2, r2, #3 + add r0, #0x10 + cmp r1, #8 + blt _0223B7A2 + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr + ; .align 2, 0 +_0223B7D0: .word 0x00000329 + thumb_func_end ov76_0223B78C + + thumb_func_start ov76_0223B7D4 +ov76_0223B7D4: ; 0x0223B7D4 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r4, r1, #4 + mov r0, #0xcb + add r1, r5, r4 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0 + add r1, #2 + add r2, sp, #0 + bl sub_0200D550 + add r2, sp, #0 + mov r0, #2 + ldrsh r1, [r2, r0] + ldr r0, _0223B804 ; =0x00000329 + add r3, r5, r4 + strb r1, [r3, r0] + mov r1, #0 + ldrsh r1, [r2, r1] + add r0, r0, #1 + strb r1, [r3, r0] + pop {r3, r4, r5, pc} + nop +_0223B804: .word 0x00000329 + thumb_func_end ov76_0223B7D4 + + thumb_func_start ov76_0223B808 +ov76_0223B808: ; 0x0223B808 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r3, #0xca + add r7, r0, #0 + lsl r3, r3, #2 + mov r0, #0 + add r1, r7, #0 + add r2, sp, #0 + add r4, r3, #1 + add r5, r3, #2 +_0223B81C: + ldrb r6, [r1, r3] + add r0, r0, #1 + strb r6, [r2] + ldrb r6, [r1, r4] + strb r6, [r2, #1] + ldrb r6, [r1, r5] + add r1, #0x10 + strb r6, [r2, #2] + add r2, r2, #3 + cmp r0, #8 + blt _0223B81C + ldr r0, [r7, #0] + mov r2, #0xf1 + lsl r2, r2, #2 + ldr r0, [r0, #0x20] + ldr r2, [r7, r2] + add r1, sp, #0 + bl sub_0202CA40 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B808 + + thumb_func_start ov76_0223B848 +ov76_0223B848: ; 0x0223B848 + push {r3, r4, r5, r6} + mov r3, #0xca + lsl r3, r3, #2 + mov r2, #0 + add r4, r3, #1 + add r5, r3, #2 +_0223B854: + ldrb r6, [r1, r3] + add r2, r2, #1 + strb r6, [r0] + ldrb r6, [r1, r4] + strb r6, [r0, #1] + ldrb r6, [r1, r5] + add r1, #0x10 + strb r6, [r0, #2] + add r0, r0, #3 + cmp r2, #8 + blt _0223B854 + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov76_0223B848 + + .section .sinit, 4 + .word ov76_0223B140 diff --git a/asm/ov76_0223B870.s b/asm/ov76_0223B870.s new file mode 100644 index 000000000..fad9c580c --- /dev/null +++ b/asm/ov76_0223B870.s @@ -0,0 +1,3435 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov76_0223B870 +ov76_0223B870: ; 0x0223B870 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r0, r1, #0 + add r1, sp, #0 + add r4, r2, #0 + add r1, #2 + add r2, sp, #0 + add r6, r3, #0 + bl sub_0200D550 + add r1, sp, #0 + mov r0, #0 + ldrsh r2, [r1, r0] + sub r2, r2, r6 + strb r2, [r5] + ldrsh r0, [r1, r0] + add r0, r0, r6 + strb r0, [r5, #1] + mov r0, #2 + ldrsh r2, [r1, r0] + sub r2, r2, r4 + strb r2, [r5, #2] + ldrsh r0, [r1, r0] + add r0, r0, r4 + strb r0, [r5, #3] + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov76_0223B870 + + thumb_func_start ov76_0223B8A8 +ov76_0223B8A8: ; 0x0223B8A8 + push {r4, lr} + add r4, r0, #0 + mov r0, #2 + mov r1, #0x35 + bl sub_02012744 + mov r1, #0x8d + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #2 + mov r1, #0x35 + bl sub_02002BB8 + pop {r4, pc} + thumb_func_end ov76_0223B8A8 + + thumb_func_start ov76_0223B8C4 +ov76_0223B8C4: ; 0x0223B8C4 + push {r4, lr} + add r4, r0, #0 + mov r0, #2 + bl sub_02002C60 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02012870 + mov r0, #9 + lsl r0, r0, #6 + add r0, r4, r0 + bl sub_0201EE28 + mov r0, #0x8f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02012870 + mov r0, #0x93 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201EE28 + mov r0, #0x8d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020127BC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B8C4 + + thumb_func_start ov76_0223B904 +ov76_0223B904: ; 0x0223B904 + push {r3, lr} + sub sp, #0x18 + add r3, r0, #0 + mov r0, #0xe + str r0, [sp] + mov r0, #7 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0223B93C ; =0x00007530 + add r2, r3, #0 + str r0, [sp, #0x14] + add r0, r3, #0 + add r0, #0xe8 + add r2, #0xdc + add r3, #0xe0 + ldr r0, [r0, #0] + ldr r2, [r2, #0] + ldr r3, [r3, #0] + mov r1, #3 + bl sub_0200CD7C + add sp, #0x18 + pop {r3, pc} + ; .align 2, 0 +_0223B93C: .word 0x00007530 + thumb_func_end ov76_0223B904 + + thumb_func_start ov76_0223B940 +ov76_0223B940: ; 0x0223B940 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl ov76_0223B904 + mov r1, #0 + add r0, r4, #0 + mov r2, #0x68 + mov r3, #0xa5 + str r1, [sp] + bl ov76_0223B98C + mov r0, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #1 + mov r2, #0xc0 + mov r3, #0xa5 + bl ov76_0223B98C + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov76_0223B940 + + thumb_func_start ov76_0223B96C +ov76_0223B96C: ; 0x0223B96C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x8e + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r4, r1, #0 + bl sub_020129D0 + mov r0, #0x8f + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_020129D0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov76_0223B96C + + thumb_func_start ov76_0223B98C +ov76_0223B98C: ; 0x0223B98C + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + add r5, r0, #0 + add r4, r1, #0 + str r2, [sp, #0x10] + add r7, r3, #0 + mov r0, #0 + mov r1, #0x1a + mov r2, #8 + mov r3, #0x35 + bl sub_0200B144 + add r1, r4, #5 + str r0, [sp, #0x14] + bl sub_0200B1EC + str r0, [sp, #0x18] + add r0, sp, #0x1c + bl sub_0201A7A0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + add r1, sp, #0x1c + mov r2, #0xa + mov r3, #2 + bl sub_0201A870 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223BA88 ; =0x000F0D02 + ldr r2, [sp, #0x18] + str r0, [sp, #8] + add r0, sp, #0x1c + mov r1, #2 + str r3, [sp, #0xc] + bl sub_0201D78C + add r0, sp, #0x1c + mov r1, #2 + mov r2, #0x35 + bl sub_02012898 + mov r3, #9 + lsl r3, r3, #6 + mov r1, #0xc + add r6, r4, #0 + mul r6, r1 + add r3, r5, r3 + mov r1, #1 + mov r2, #2 + add r3, r3, r6 + bl sub_0201ED94 + mov r0, #0x8d + lsl r0, r0, #2 + ldr r0, [r5, r0] + str r0, [sp, #0x2c] + add r0, sp, #0x1c + str r0, [sp, #0x30] + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + bl sub_0200D9B0 + str r0, [sp, #0x34] + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + ldr r1, _0223BA8C ; =0x00007530 + bl sub_0200D04C + str r0, [sp, #0x38] + mov r2, #0 + mov r0, #0x91 + str r2, [sp, #0x3c] + add r1, r5, r6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + str r0, [sp, #0x40] + ldr r1, [sp, #0x18] + mov r0, #2 + bl sub_02002D7C + lsr r1, r0, #1 + ldr r0, [sp, #0x10] + add r7, #0xc0 + sub r0, r0, r1 + str r0, [sp, #0x44] + mov r0, #1 + str r0, [sp, #0x4c] + mov r0, #0x28 + str r0, [sp, #0x50] + mov r0, #2 + str r0, [sp, #0x54] + mov r0, #0x35 + str r0, [sp, #0x58] + mov r0, #0x8e + lsl r0, r0, #2 + add r5, r5, r0 + str r7, [sp, #0x48] + lsl r4, r4, #2 + add r0, sp, #0x2c + bl sub_020127E8 + str r0, [r5, r4] + ldr r0, [r5, r4] + ldr r1, [sp, #0x70] + bl sub_02012AC0 + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_0200B190 + add r0, sp, #0x1c + bl sub_0201A8FC + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BA88: .word 0x000F0D02 +_0223BA8C: .word 0x00007530 + thumb_func_end ov76_0223B98C + + thumb_func_start ov76_0223BA90 +ov76_0223BA90: ; 0x0223BA90 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r7, r0, #0 + mov r0, #0 + str r0, [sp, #4] + str r0, [sp] + add r3, r0, #0 + add r5, r0, #0 + mov r0, #0x42 + lsl r0, r0, #4 +_0223BAA4: + add r2, r7, r3 + add r3, r3, #1 + strb r5, [r2, r0] + cmp r3, #8 + blt _0223BAA4 + lsl r0, r1, #3 + str r0, [sp, #8] +_0223BAB2: + mov r6, #0 + add r4, r7, #0 +_0223BAB6: + ldr r0, [r4, #8] + add r1, r5, #0 + bl sub_0202CA94 + cmp r0, #0 + bne _0223BACA + add r6, r6, #1 + add r4, #8 + cmp r6, #0xc + blt _0223BAB6 +_0223BACA: + add r1, r7, r5 + add r1, #0x80 + ldrb r1, [r1] + cmp r1, #0 + bne _0223BAD8 + cmp r0, #1 + bne _0223BAFA +_0223BAD8: + ldr r0, [sp] + add r1, r0, #1 + ldr r0, [sp, #8] + str r1, [sp] + cmp r1, r0 + ble _0223BAFA + ldr r0, [sp, #4] + add r2, r5, #1 + add r1, r7, r0 + mov r0, #0x42 + lsl r0, r0, #4 + strb r2, [r1, r0] + ldr r0, [sp, #4] + add r0, r0, #1 + str r0, [sp, #4] + cmp r0, #8 + bge _0223BB00 +_0223BAFA: + add r5, r5, #1 + cmp r5, #0x51 + blt _0223BAB2 +_0223BB00: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov76_0223BA90 + + thumb_func_start ov76_0223BB04 +ov76_0223BB04: ; 0x0223BB04 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r7, r0, #0 + add r0, #0xdc + ldr r6, [r0, #0] + add r0, r7, #0 + add r0, #0xe0 + ldr r5, [r0, #0] + add r0, r7, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + mov r4, #0 + str r0, [sp, #0x18] +_0223BB1E: + mov r0, #0x42 + add r1, r7, r4 + lsl r0, r0, #4 + ldrb r0, [r1, r0] + bl sub_02098140 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223BB9C ; =0x000061A8 + add r1, r5, #0 + add r0, r4, r0 + str r0, [sp, #8] + add r0, r6, #0 + mov r2, #0x5b + bl sub_0200CBDC + add r4, r4, #1 + cmp r4, #8 + blt _0223BB1E + mov r0, #0x5b + str r0, [sp] + add r0, #0xca + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + ldr r0, _0223BBA0 ; =0x000066B4 + mov r1, #3 + str r0, [sp, #0x14] + ldr r0, [sp, #0x18] + add r2, r6, #0 + add r3, r5, #0 + bl sub_0200CD7C + mov r0, #1 + str r0, [sp] + ldr r0, _0223BBA4 ; =0x00006A2C + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x5b + mov r3, #0xb4 + bl sub_0200CE0C + mov r0, #1 + str r0, [sp] + ldr r0, _0223BBA8 ; =0x00006DB8 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x5b + mov r3, #0x58 + bl sub_0200CE3C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223BB9C: .word 0x000061A8 +_0223BBA0: .word 0x000066B4 +_0223BBA4: .word 0x00006A2C +_0223BBA8: .word 0x00006DB8 + thumb_func_end ov76_0223BB04 + + thumb_func_start ov76_0223BBAC +ov76_0223BBAC: ; 0x0223BBAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + add r5, r0, #0 + add r0, #0xdc + ldr r0, [r0, #0] + mov r4, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xe0 + ldr r7, [r0, #0] + add r0, sp, #4 + strh r4, [r0, #0x20] + strh r4, [r0, #0x22] + strh r4, [r0, #0x24] + strh r4, [r0, #0x26] + mov r0, #0x3c + str r0, [sp, #0x2c] + mov r0, #2 + str r0, [sp, #0x34] + mov r0, #1 + str r0, [sp, #0x50] + sub r0, r0, #2 + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + ldr r0, _0223BC5C ; =0x000066B4 + str r4, [sp, #0x54] + str r0, [sp, #0x3c] + ldr r0, _0223BC60 ; =0x00006A2C + str r4, [sp, #0x30] + str r0, [sp, #0x40] + ldr r0, _0223BC64 ; =0x00006DB8 + str r0, [sp, #0x44] + mov r0, #0xf9 + lsl r0, r0, #2 + add r6, r5, r0 +_0223BBF2: + ldr r0, _0223BC68 ; =0x000061A8 + add r1, r7, #0 + add r0, r4, r0 + str r0, [sp, #0x38] + ldr r0, [sp] + add r2, sp, #0x24 + bl sub_0200CE6C + add r4, r4, #1 + stmia r6!, {r0} + cmp r4, #8 + blt _0223BBF2 + ldr r3, _0223BC6C ; =0x0223ED3C + add r2, sp, #4 + mov r1, #0x10 +_0223BC10: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _0223BC10 + mov r7, #0xf9 + mov r6, #0 + add r4, sp, #4 + lsl r7, r7, #2 +_0223BC24: + mov r2, #2 + ldrsh r2, [r4, r2] + mov r0, #0xf9 + mov r1, #0 + lsl r0, r0, #2 + sub r2, r2, #1 + lsl r2, r2, #0x10 + ldrsh r1, [r4, r1] + ldr r0, [r5, r0] + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200D330 + ldr r0, [r5, r7] + mov r1, #0 + bl sub_0200D3CC + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #8 + blt _0223BC24 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BC5C: .word 0x000066B4 +_0223BC60: .word 0x00006A2C +_0223BC64: .word 0x00006DB8 +_0223BC68: .word 0x000061A8 +_0223BC6C: .word 0x0223ED3C + thumb_func_end ov76_0223BBAC + + thumb_func_start ov76_0223BC70 +ov76_0223BC70: ; 0x0223BC70 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r7, #0xf9 + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_0223BC7C: + add r0, r6, #0 + add r0, #0xe0 + ldr r1, _0223BC9C ; =0x000061A8 + ldr r0, [r0, #0] + add r1, r4, r1 + bl sub_0200D070 + ldr r0, [r5, r7] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _0223BC7C + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BC9C: .word 0x000061A8 + thumb_func_end ov76_0223BC70 + + thumb_func_start ov76_0223BCA0 +ov76_0223BCA0: ; 0x0223BCA0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + mov r7, #0 + str r0, [sp] + str r1, [sp, #4] + add r6, r7, #0 + add r4, r1, #0 + add r5, r1, #0 +_0223BCB0: + mov r0, #0x51 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _0223BCC6 + add r0, r5, #0 + bl ov12_02225C50 + cmp r0, #1 + bne _0223BCC6 + mov r7, #1 +_0223BCC6: + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x24 + cmp r6, #8 + blt _0223BCB0 + mov r1, #0x12 + ldr r0, [sp, #4] + lsl r1, r1, #4 + add r0, r0, r1 + bl ov12_02225C14 + cmp r0, #1 + bne _0223BD0E + mov r4, #0x59 + ldr r0, [sp, #4] + lsl r4, r4, #2 + ldr r0, [r0, r4] + ldr r3, [sp, #4] + sub r4, #0x44 + ldrsh r3, [r3, r4] + mov r1, #5 + mov r2, #0 + mov r7, #1 + bl sub_02019184 + mov r4, #0x59 + ldr r0, [sp, #4] + lsl r4, r4, #2 + ldr r0, [r0, r4] + ldr r3, [sp, #4] + sub r4, #0x42 + ldrsh r3, [r3, r4] + mov r1, #5 + mov r2, #3 + bl sub_02019184 +_0223BD0E: + cmp r7, #0 + bne _0223BD2A + mov r1, #0x5b + ldr r0, [sp, #4] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r2, #0 + str r2, [r0, #0] + ldr r0, [sp, #4] + bl sub_020181C4 + ldr r0, [sp] + bl sub_0200DA58 +_0223BD2A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223BCA0 + + thumb_func_start ov76_0223BD30 +ov76_0223BD30: ; 0x0223BD30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + str r1, [sp, #0xc] + mov r1, #0x17 + str r0, [sp, #8] + mov r0, #0x35 + lsl r1, r1, #4 + str r2, [sp, #0x10] + bl sub_02018144 + str r0, [sp, #0x1c] + ldr r0, [sp, #8] + mov r1, #0x59 + add r0, #0xe4 + ldr r2, [r0, #0] + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + str r2, [r0, r1] + add r4, r0, #0 + add r5, r0, #0 + ldr r0, [sp, #0xc] + mov r1, #0x38 + lsl r0, r0, #4 + neg r0, r0 + str r0, [sp, #0x18] + ldr r0, [sp, #0xc] + ldr r6, [sp, #8] + mul r1, r0 + ldr r0, [sp, #0x10] + mov r7, #0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r1, [sp, #0x14] + str r0, [sp, #0x20] +_0223BD74: + mov r0, #0xc9 + lsl r0, r0, #2 + ldr r0, [r6, r0] + cmp r0, #0 + bne _0223BD88 + mov r0, #0x51 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223BDDE +_0223BD88: + mov r0, #0xcb + lsl r0, r0, #2 + ldr r1, [r6, r0] + mov r0, #0x51 + lsl r0, r0, #2 + str r1, [r4, r0] + add r1, sp, #0x24 + ldr r0, [r4, r0] + add r1, #2 + add r2, sp, #0x24 + bl sub_0200D550 + add r1, sp, #0x24 + mov r0, #0 + ldrsh r3, [r1, r0] + mov r0, #2 + ldrsh r1, [r1, r0] + ldr r0, [sp, #0x18] + ldr r2, [sp, #0x14] + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [sp, #0x20] + add r2, r1, r2 + lsl r2, r2, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + asr r2, r2, #0x10 + bl ov12_02225BC8 + mov r1, #0x51 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov12_02225C50 + mov r1, #0x51 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r5, #0 + bl ov12_02225C50 +_0223BDDE: + add r7, r7, #1 + add r6, #0x10 + add r4, r4, #4 + add r5, #0x24 + cmp r7, #8 + blt _0223BD74 + mov r1, #0x59 + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #5 + bl sub_020192EC + add r4, r0, #0 + mov r1, #0x59 + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #5 + bl sub_020192F8 + add r3, r0, #0 + ldr r0, [sp, #0xc] + mov r5, #0x37 + lsl r0, r0, #4 + add r0, r3, r0 + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + str r0, [sp] + ldr r0, [sp, #0x10] + mov r1, #0x12 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] + lsl r3, r3, #0x10 + ldr r2, [sp, #0xc] + mvn r5, r5 + mul r5, r2 + add r2, r4, r5 + lsl r2, r2, #0x10 + ldr r0, [sp, #0x1c] + lsl r1, r1, #4 + add r0, r0, r1 + lsl r1, r4, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl ov12_02225BC8 + mov r2, #0x96 + lsl r2, r2, #2 + ldr r0, [sp, #8] + add r1, r2, #0 + add r3, r0, r2 + ldr r0, [sp, #0x1c] + sub r1, #0xec + str r3, [r0, r1] + sub r2, #0xec + ldr r0, [r0, r2] + mov r3, #1 + str r3, [r0, #0] + ldr r0, _0223BE68 ; =ov76_0223BCA0 + ldr r1, [sp, #0x1c] + lsl r2, r3, #0xc + bl sub_0200D9E8 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223BE68: .word ov76_0223BCA0 + thumb_func_end ov76_0223BD30 + + thumb_func_start ov76_0223BE6C +ov76_0223BE6C: ; 0x0223BE6C + push {r3, lr} + sub sp, #8 + mov r2, #2 + mov r1, #0 + ldr r0, _0223BE88 ; =ov76_0223BE8C + str r2, [sp] + str r0, [sp, #4] + mov r0, #0x35 + add r3, r1, #0 + bl sub_02024220 + add sp, #8 + pop {r3, pc} + nop +_0223BE88: .word ov76_0223BE8C + thumb_func_end ov76_0223BE6C + + thumb_func_start ov76_0223BE8C +ov76_0223BE8C: ; 0x0223BE8C + push {r3, lr} + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r0, _0223BEF8 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r2, [r0] + ldr r1, _0223BEFC ; =0xFFFFCFFD + and r2, r1 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0223BF00 ; =0x0000CFFB + and r3, r2 + strh r3, [r0] + ldrh r3, [r0] + sub r2, #0x1c + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r0, #0 + ldr r2, _0223BF04 ; =0x00007FFF + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _0223BF08 ; =0xBFFF0000 + ldr r0, _0223BF0C ; =0x04000580 + str r1, [r0, #0] + pop {r3, pc} + ; .align 2, 0 +_0223BEF8: .word 0x04000008 +_0223BEFC: .word 0xFFFFCFFD +_0223BF00: .word 0x0000CFFB +_0223BF04: .word 0x00007FFF +_0223BF08: .word 0xBFFF0000 +_0223BF0C: .word 0x04000580 + thumb_func_end ov76_0223BE8C + + thumb_func_start ov76_0223BF10 +ov76_0223BF10: ; 0x0223BF10 + push {r3, r4, r5, lr} + ldr r3, _0223BF48 ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _0223BF4C ; =0x02100DF4 + mov r1, #0 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + add r2, r1, #0 + blx r3 + add r5, r0, #0 + cmp r4, #0 + bne _0223BF38 + bl sub_02022974 +_0223BF38: + cmp r5, #0 + bne _0223BF40 + bl sub_02022974 +_0223BF40: + bl sub_02014000 + pop {r3, r4, r5, pc} + nop +_0223BF48: .word 0x02100DEC +_0223BF4C: .word 0x02100DF4 + thumb_func_end ov76_0223BF10 + + thumb_func_start ov76_0223BF50 +ov76_0223BF50: ; 0x0223BF50 + push {r3, lr} + bl sub_020241B4 + bl sub_0201469C + cmp r0, #0 + ble _0223BF66 + bl sub_020241B4 + bl sub_020A73C0 +_0223BF66: + bl sub_020146C0 + mov r0, #1 + mov r1, #0 + bl sub_020241BC + pop {r3, pc} + thumb_func_end ov76_0223BF50 + + thumb_func_start ov76_0223BF74 +ov76_0223BF74: ; 0x0223BF74 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x40 + str r1, [sp, #0x18] + str r0, [sp, #0x14] + ldr r1, [sp, #0x58] + add r0, r3, #0 + add r6, r2, #0 + str r3, [sp, #0x1c] + bl ov76_0223D45C + cmp r0, #3 + bhi _0223BFF2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223BF98: ; jump table + .short _0223BFA0 - _0223BF98 - 2 ; case 0 + .short _0223BFB2 - _0223BF98 - 2 ; case 1 + .short _0223BFC8 - _0223BF98 - 2 ; case 2 + .short _0223BFDE - _0223BF98 - 2 ; case 3 +_0223BFA0: + mov r0, #0 + str r0, [sp, #0x24] + mov r0, #4 + str r0, [sp, #0x28] + mov r0, #1 + mov r5, #0xd + mov r4, #6 + str r0, [sp, #0x2c] + b _0223BFF2 +_0223BFB2: + mov r0, #2 + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp, #0x28] + mov r0, #4 + str r0, [sp, #0x2c] + mov r0, #1 + mov r5, #0xb + mov r4, #8 + str r0, [sp, #0x30] + b _0223BFF2 +_0223BFC8: + mov r0, #3 + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp, #0x28] + mov r0, #4 + str r0, [sp, #0x2c] + mov r0, #1 + mov r5, #0xb + mov r4, #8 + str r0, [sp, #0x30] + b _0223BFF2 +_0223BFDE: + mov r0, #2 + str r0, [sp, #0x24] + mov r0, #0 + str r0, [sp, #0x28] + mov r0, #4 + str r0, [sp, #0x2c] + mov r0, #1 + mov r5, #0xb + mov r4, #8 + str r0, [sp, #0x30] +_0223BFF2: + lsr r0, r4, #0x1f + add r0, r4, r0 + asr r7, r0, #1 + ldr r0, [sp, #0x18] + bl sub_0201A7A0 + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + mov r0, #0xa6 + str r0, [sp, #0x10] + lsl r2, r6, #0x18 + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x18] + lsr r2, r2, #0x18 + mov r3, #0x15 + bl sub_0201A7E8 + add r0, r7, #0 + mov r1, #0x35 + bl sub_02013A04 + mov r2, #0x67 + ldr r1, [sp, #0x1c] + lsl r2, r2, #2 + str r0, [r1, r2] + mov r0, #0 + mov r1, #0x1a + mov r2, #8 + mov r3, #0x35 + bl sub_0200B144 + mov r6, #0 + str r0, [sp, #0x20] + cmp r7, #0 + ble _0223C080 + add r5, sp, #0x24 +_0223C04A: + ldr r1, [r5, #0] + ldr r0, [sp, #0x20] + lsl r2, r1, #3 + ldr r1, _0223C0E8 ; =0x0223EF3C + ldr r1, [r1, r2] + bl sub_0200B1EC + ldr r2, [r5, #0] + add r4, r0, #0 + lsl r3, r2, #3 + ldr r2, _0223C0E8 ; =0x0223EF3C + mov r0, #0x67 + add r2, r2, r3 + ldr r1, [sp, #0x1c] + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r2, [r2, #4] + add r1, r4, #0 + bl sub_02013A6C + add r0, r4, #0 + bl sub_020237BC + add r6, r6, #1 + add r5, r5, #4 + cmp r6, r7 + blt _0223C04A +_0223C080: + ldr r0, [sp, #0x20] + bl sub_0200B190 + mov r1, #0x67 + ldr r0, [sp, #0x1c] + lsl r1, r1, #2 + ldr r0, [r0, r1] + mov r1, #0 + str r0, [sp, #0x34] + add r0, sp, #0x24 + strb r1, [r0, #0x18] + ldr r1, [sp, #0x18] + mov r2, #0xf + str r1, [sp, #0x38] + mov r1, #1 + strb r1, [r0, #0x19] + strb r7, [r0, #0x1a] + ldrb r3, [r0, #0x1b] + bic r3, r2 + strb r3, [r0, #0x1b] + ldrb r3, [r0, #0x1b] + mov r2, #0x30 + bic r3, r2 + strb r3, [r0, #0x1b] + ldrb r3, [r0, #0x1b] + mov r2, #0xc0 + bic r3, r2 + mov r2, #0x40 + orr r2, r3 + strb r2, [r0, #0x1b] + ldr r0, [sp, #0x18] + mov r2, #0x1f + mov r3, #0xd + bl sub_0200DC48 + mov r0, #0x35 + str r0, [sp] + mov r0, #2 + mov r2, #0 + str r0, [sp, #4] + add r0, sp, #0x34 + mov r1, #8 + add r3, r2, #0 + bl sub_02001B7C + mov r2, #0x1a + ldr r1, [sp, #0x1c] + lsl r2, r2, #4 + str r0, [r1, r2] + add sp, #0x40 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223C0E8: .word 0x0223EF3C + thumb_func_end ov76_0223BF74 + + thumb_func_start ov76_0223C0EC +ov76_0223C0EC: ; 0x0223C0EC + push {r4, r5} + lsr r5, r0, #0x1f + lsl r4, r0, #0x1e + sub r4, r4, r5 + mov r3, #0x1e + ror r4, r3 + add r4, r5, r4 + mov r3, #0x38 + mul r3, r4 + add r3, #0x28 + strh r3, [r1] + asr r1, r0, #2 + mov r0, #0x35 + mul r0, r1 + add r0, #0x1b + strh r0, [r2] + pop {r4, r5} + bx lr + thumb_func_end ov76_0223C0EC + + thumb_func_start ov76_0223C110 +ov76_0223C110: ; 0x0223C110 + push {r4, r5, r6, lr} + sub sp, #0x18 + add r1, r0, #0 + add r1, #0xdc + ldr r4, [r1, #0] + add r1, r0, #0 + add r1, #0xe0 + add r0, #0xe8 + ldr r5, [r1, #0] + ldr r6, [r0, #0] + bl sub_02079FD0 + mov r1, #0x13 + str r1, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + mov r0, #0xfa + lsl r0, r0, #6 + str r0, [sp, #0x14] + add r0, r6, #0 + mov r1, #2 + add r2, r4, #0 + add r3, r5, #0 + bl sub_0200CD7C + bl sub_02079FDC + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0223C180 ; =0x00004268 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x13 + bl sub_0200CE0C + bl sub_02079FE8 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _0223C184 ; =0x00004650 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x13 + bl sub_0200CE3C + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223C180: .word 0x00004268 +_0223C184: .word 0x00004650 + thumb_func_end ov76_0223C110 + + thumb_func_start ov76_0223C188 +ov76_0223C188: ; 0x0223C188 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r0, #0 + ldr r1, [r5, #0] + mov r6, #0 + ldr r0, [r1, #0] + cmp r0, #0 + ble _0223C276 + str r6, [sp, #0xc] + add r4, r5, #0 +_0223C19C: + ldr r0, [sp, #0xc] + add r0, r1, r0 + ldr r7, [r0, #4] + add r0, r7, #0 + bl sub_02079D80 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0223C27C ; =0x00003A98 + add r1, r5, #0 + add r0, r6, r0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x13 + bl sub_0200D888 + mov r1, #0 + add r0, sp, #0x18 + strh r1, [r0] + strh r1, [r0, #2] + strh r1, [r0, #4] + strh r1, [r0, #6] + mov r0, #0xa + str r0, [sp, #0x20] + add r0, r1, #0 + str r0, [sp, #0x24] + mov r0, #1 + str r0, [sp, #0x28] + mov r0, #2 + str r0, [sp, #0x44] + add r0, r1, #0 + str r0, [sp, #0x48] + ldr r0, _0223C27C ; =0x00003A98 + add r2, sp, #0x18 + add r0, r6, r0 + str r0, [sp, #0x2c] + mov r0, #0xfa + lsl r0, r0, #6 + str r0, [sp, #0x30] + ldr r0, _0223C280 ; =0x00004268 + str r0, [sp, #0x34] + ldr r0, _0223C284 ; =0x00004650 + str r0, [sp, #0x38] + sub r0, r1, #1 + str r0, [sp, #0x3c] + sub r0, r1, #1 + str r0, [sp, #0x40] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200CE6C + mov r1, #0xbf + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r7, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x10] + add r0, r7, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074470 + str r0, [sp, #0x14] + add r0, r7, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + ldr r0, [sp, #0x10] + ldr r2, [sp, #0x14] + bl sub_02079EDC + add r1, r0, #0 + mov r0, #0xbf + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r0, [r0, #0] + bl sub_02021F24 + mov r0, #0xbf + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D364 + ldr r0, [sp, #0xc] + ldr r1, [r5, #0] + add r0, r0, #4 + str r0, [sp, #0xc] + ldr r0, [r1, #0] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, r0 + blt _0223C19C +_0223C276: + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + nop +_0223C27C: .word 0x00003A98 +_0223C280: .word 0x00004268 +_0223C284: .word 0x00004650 + thumb_func_end ov76_0223C188 + + thumb_func_start ov76_0223C288 +ov76_0223C288: ; 0x0223C288 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + mov r4, #0 + ldr r0, [r0, #0] + cmp r0, #0 + ble _0223C2B0 + mov r7, #0xbf + add r5, r6, #0 + lsl r7, r7, #2 +_0223C29C: + ldr r0, [r5, r7] + mov r1, #0 + bl sub_0200D3F4 + ldr r0, [r6, #0] + add r4, r4, #1 + ldr r0, [r0, #0] + add r5, r5, #4 + cmp r4, r0 + blt _0223C29C +_0223C2B0: + mov r5, #0 + add r4, r6, #0 +_0223C2B4: + ldr r7, [r4, #4] + cmp r7, #0xff + beq _0223C2F8 + add r1, sp, #0 + add r0, r5, #0 + add r1, #2 + add r2, sp, #0 + bl ov76_0223C0EC + add r2, sp, #0 + mov r1, #2 + ldrsh r1, [r2, r1] + add r3, r2, #0 + mov r2, #0 + ldrsh r2, [r3, r2] + lsl r0, r7, #2 + add r7, r6, r0 + mov r0, #0xbf + lsl r0, r0, #2 + sub r1, #0x10 + add r2, #0xc + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r7, r0] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + mov r0, #0xbf + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r1, #1 + bl sub_0200D3F4 +_0223C2F8: + add r5, r5, #1 + add r4, #8 + cmp r5, #0xc + blt _0223C2B4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223C288 + + thumb_func_start ov76_0223C304 +ov76_0223C304: ; 0x0223C304 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + mov r4, #0 + ldr r0, [r0, #0] + cmp r0, #0 + ble _0223C32A + mov r7, #0xbf + add r5, r6, #0 + lsl r7, r7, #2 +_0223C318: + ldr r0, [r5, r7] + bl sub_0200D330 + ldr r0, [r6, #0] + add r4, r4, #1 + ldr r0, [r0, #0] + add r5, r5, #4 + cmp r4, r0 + blt _0223C318 +_0223C32A: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C304 + + thumb_func_start ov76_0223C32C +ov76_0223C32C: ; 0x0223C32C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + mov r4, #0 + ldr r0, [r0, #0] + cmp r0, #0 + ble _0223C352 + mov r7, #0xbf + add r5, r6, #0 + lsl r7, r7, #2 +_0223C340: + ldr r0, [r5, r7] + bl sub_0200D0F4 + ldr r0, [r6, #0] + add r4, r4, #1 + ldr r0, [r0, #0] + add r5, r5, #4 + cmp r4, r0 + blt _0223C340 +_0223C352: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C32C + + thumb_func_start ov76_0223C354 +ov76_0223C354: ; 0x0223C354 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r6, #0 + add r4, r7, #0 + add r5, r7, #0 +_0223C35E: + ldr r0, [r4, #8] + bl ov76_0223D430 + mov r1, #0x9a + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0x99 + ldr r1, [r4, #4] + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223C38C + mov r0, #0x99 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0xff + beq _0223C38C + add r0, r7, #0 + add r1, r6, #0 + bl ov76_0223E91C +_0223C38C: + add r6, r6, #1 + add r4, #8 + add r5, #0xc + cmp r6, #0xc + blt _0223C35E + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C354 + + thumb_func_start ov76_0223C398 +ov76_0223C398: ; 0x0223C398 + push {r3, r4, r5, r6, lr} + sub sp, #0x4c + add r4, r0, #0 + mov r0, #0x35 + bl sub_0200C6E4 + add r2, sp, #0x2c + ldr r5, _0223C418 ; =0x0223ED1C + str r0, [r4, #8] + ldmia r5!, {r0, r1} + add r3, r2, #0 + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + ldr r6, _0223C41C ; =0x0223ECF0 + stmia r2!, {r0, r1} + add r5, sp, #0x18 + ldmia r6!, {r0, r1} + add r2, r5, #0 + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r1, r3, #0 + str r0, [r5, #0] + ldr r0, [r4, #8] + mov r3, #0x20 + bl sub_0200C73C + ldr r3, _0223C420 ; =0x0223ED04 + add r2, sp, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r4, #8] + bl sub_0200C704 + str r0, [r4, #0xc] + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + mov r2, #0x80 + bl sub_0200C7C0 + cmp r0, #0 + bne _0223C402 + bl sub_02022974 +_0223C402: + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + add r2, sp, #0 + bl sub_0200CB30 + cmp r0, #0 + bne _0223C414 + bl sub_02022974 +_0223C414: + add sp, #0x4c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223C418: .word 0x0223ED1C +_0223C41C: .word 0x0223ECF0 +_0223C420: .word 0x0223ED04 + thumb_func_end ov76_0223C398 + + thumb_func_start ov76_0223C424 +ov76_0223C424: ; 0x0223C424 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + ldr r1, [r4, #0xc] + bl sub_0200D0B0 + ldr r0, [r4, #8] + bl sub_0200C8D4 + pop {r4, pc} + thumb_func_end ov76_0223C424 + + thumb_func_start ov76_0223C438 +ov76_0223C438: ; 0x0223C438 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #2 + add r4, r1, #0 + str r0, [sp, #4] + ldr r0, _0223C49C ; =0x0000AFC8 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r3, _0223C4A0 ; =0x00000109 + add r2, r4, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0223C4A4 ; =0x0000B798 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r4, #0 + mov r3, #0xad + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0223C4A8 ; =0x0000BB80 + add r2, r4, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xdc + add r5, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r5, #0] + mov r3, #0x51 + bl sub_0200CE54 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223C49C: .word 0x0000AFC8 +_0223C4A0: .word 0x00000109 +_0223C4A4: .word 0x0000B798 +_0223C4A8: .word 0x0000BB80 + thumb_func_end ov76_0223C438 + + thumb_func_start ov76_0223C4AC +ov76_0223C4AC: ; 0x0223C4AC + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + ldr r4, _0223C530 ; =0x0223ED5C + add r6, r0, #0 + add r3, sp, #0 + mov r2, #6 +_0223C4B8: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223C4B8 + mov r7, #0 + add r4, sp, #0 + add r5, r6, #0 +_0223C4C6: + ldr r1, [r4, #0] + add r0, sp, #0 + strh r1, [r0, #0x30] + ldr r1, [r4, #4] + add r2, sp, #0x30 + strh r1, [r0, #0x32] + mov r1, #0 + strh r1, [r0, #0x34] + strh r1, [r0, #0x36] + mov r0, #0x28 + str r0, [sp, #0x38] + mov r0, #2 + str r0, [sp, #0x3c] + str r0, [sp, #0x40] + mov r0, #1 + str r0, [sp, #0x5c] + add r0, r1, #0 + str r0, [sp, #0x60] + ldr r0, _0223C534 ; =0x0000AFC8 + str r0, [sp, #0x44] + ldr r0, _0223C538 ; =0x000066B2 + str r0, [sp, #0x48] + ldr r0, _0223C53C ; =0x0000B798 + str r0, [sp, #0x4c] + ldr r0, _0223C540 ; =0x0000BB80 + str r0, [sp, #0x50] + sub r0, r1, #1 + str r0, [sp, #0x54] + sub r0, r1, #1 + str r0, [sp, #0x58] + add r0, r6, #0 + add r1, r6, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200CE6C + mov r1, #0xc5 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + ldr r1, [r4, #8] + bl sub_0200D7D4 + add r7, r7, #1 + add r4, #0xc + add r5, r5, #4 + cmp r7, #4 + blt _0223C4C6 + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223C530: .word 0x0223ED5C +_0223C534: .word 0x0000AFC8 +_0223C538: .word 0x000066B2 +_0223C53C: .word 0x0000B798 +_0223C540: .word 0x0000BB80 + thumb_func_end ov76_0223C4AC + + thumb_func_start ov76_0223C544 +ov76_0223C544: ; 0x0223C544 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223C564 + mov r6, #0xc5 + mov r4, #0 + lsl r6, r6, #2 +_0223C556: + ldr r0, [r5, r6] + bl sub_0200D330 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223C556 +_0223C564: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov76_0223C544 + + thumb_func_start ov76_0223C568 +ov76_0223C568: ; 0x0223C568 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0xc5 + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + lsl r7, r7, #2 +_0223C574: + ldr r0, [r5, r7] + add r1, r6, #0 + bl sub_0200D3F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223C574 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223C568 + + thumb_func_start ov76_0223C588 +ov76_0223C588: ; 0x0223C588 + push {r4, r5, r6, lr} + mov r6, #0xc5 + add r5, r0, #0 + mov r4, #0 + lsl r6, r6, #2 +_0223C592: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223C592 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov76_0223C588 + + thumb_func_start ov76_0223C5A4 +ov76_0223C5A4: ; 0x0223C5A4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r2, #0 + mov r2, #1 + str r2, [sp] + ldr r2, [sp, #0x3c] + ldr r4, [sp, #0x48] + str r2, [sp, #4] + ldr r2, _0223C618 ; =0x00002AF8 + add r5, r0, #0 + add r2, r3, r2 + str r2, [sp, #8] + add r2, r4, #0 + add r6, r1, #0 + bl sub_0200CC3C + ldr r0, [sp, #0x30] + str r4, [sp] + str r0, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + ldr r1, [sp, #0x44] + add r2, r5, #0 + str r1, [sp, #0xc] + ldr r1, [sp, #0x3c] + add r3, r6, #0 + str r1, [sp, #0x10] + ldr r1, _0223C618 ; =0x00002AF8 + add r0, r0, r1 + str r0, [sp, #0x14] + ldr r1, [sp, #0x40] + add r0, r7, #0 + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + ldr r3, [sp, #0x34] + ldr r0, _0223C618 ; =0x00002AF8 + add r1, r6, #0 + add r0, r3, r0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r4, #0 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r3, [sp, #0x38] + ldr r0, _0223C618 ; =0x00002AF8 + add r1, r6, #0 + add r0, r3, r0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r4, #0 + bl sub_0200CE54 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223C618: .word 0x00002AF8 + thumb_func_end ov76_0223C5A4 + + thumb_func_start ov76_0223C61C +ov76_0223C61C: ; 0x0223C61C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x58 + add r5, r0, #0 + ldr r0, _0223C7CC ; =0x0000011E + add r4, r1, #0 + str r0, [sp] + mov r0, #0xae + str r0, [sp, #4] + mov r3, #0x52 + str r3, [sp, #8] + mov r1, #1 + add r2, r5, #0 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r5, #0 + add r1, r5, #0 + str r4, [sp, #0x18] + add r0, #0xdc + add r1, #0xe0 + add r2, #0xe8 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + add r3, #0xb8 + bl ov76_0223C5A4 + ldr r0, _0223C7D0 ; =0x00000123 + add r2, r5, #0 + str r0, [sp] + mov r0, #0xb3 + str r0, [sp, #4] + mov r3, #0x57 + str r3, [sp, #8] + mov r1, #1 + str r1, [sp, #0xc] + mov r0, #2 + str r0, [sp, #0x10] + str r1, [sp, #0x14] + add r0, r5, #0 + add r1, r5, #0 + str r4, [sp, #0x18] + add r0, #0xdc + add r1, #0xe0 + add r2, #0xe8 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + add r3, #0xbc + bl ov76_0223C5A4 + mov r6, #0 + add r4, r5, #0 + add r7, sp, #0x1c +_0223C68A: + mov r0, #0 + strh r0, [r7, #8] + strh r0, [r7, #0xa] + strh r0, [r7, #0xc] + mov r0, #0x9a + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + strh r0, [r7, #0xe] + mov r0, #0x28 + sub r0, r0, r6 + str r0, [sp, #0x2c] + mov r0, #0 + str r0, [sp, #0x30] + mov r0, #1 + str r0, [sp, #0x34] + mov r0, #2 + str r0, [sp, #0x50] + mov r0, #0 + str r0, [sp, #0x54] + ldr r0, _0223C7D4 ; =0x00002C02 + add r1, #0xe0 + str r0, [sp, #0x38] + add r0, #0x14 + str r0, [sp, #0x3c] + ldr r0, _0223C7D8 ; =0x00002BA6 + add r2, sp, #0x24 + str r0, [sp, #0x40] + sub r0, #0x5c + str r0, [sp, #0x44] + mov r0, #0 + mvn r0, r0 + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + add r0, r5, #0 + add r0, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200CE6C + mov r1, #0x9b + lsl r1, r1, #2 + str r0, [r4, r1] + add r1, sp, #0x20 + add r0, r6, #0 + add r1, #2 + add r2, sp, #0x20 + bl ov76_0223C0EC + mov r0, #0x9b + mov r1, #6 + mov r2, #4 + lsl r0, r0, #2 + ldrsh r1, [r7, r1] + ldrsh r2, [r7, r2] + ldr r0, [r4, r0] + bl sub_0200D4C4 + add r6, r6, #1 + add r4, #0xc + cmp r6, #0xc + blt _0223C68A + mov r1, #0 + add r0, sp, #0x1c + strh r1, [r0, #8] + strh r1, [r0, #0xa] + strh r1, [r0, #0xc] + strh r1, [r0, #0xe] + mov r0, #0x14 + str r0, [sp, #0x2c] + mov r0, #1 + str r1, [sp, #0x30] + str r1, [sp, #0x54] + ldr r1, _0223C7DC ; =0x00002C0B + str r0, [sp, #0x34] + add r0, r1, #0 + add r0, #0x10 + str r0, [sp, #0x3c] + add r0, r1, #0 + mov r2, #2 + sub r0, #0x60 + str r1, [sp, #0x38] + str r0, [sp, #0x40] + sub r0, r2, #3 + sub r1, #0xbc + str r1, [sp, #0x44] + add r1, r5, #0 + str r2, [sp, #0x50] + str r0, [sp, #0x48] + str r0, [sp, #0x4c] + add r0, r5, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, sp, #0x24 + bl sub_0200CE6C + mov r1, #0xbd + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xdc + add r1, #0xe0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, sp, #0x24 + bl sub_0200CE6C + mov r1, #0xbe + lsl r1, r1, #2 + str r0, [r5, r1] + add r1, #0xcc + ldr r0, [r5, r1] + add r1, sp, #0x1c + add r1, #2 + add r2, sp, #0x1c + bl ov76_0223C0EC + mov r0, #0xbd + lsl r0, r0, #2 + add r3, sp, #0x1c + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r5, r0] + bl sub_0200D4C4 + mov r0, #0xbe + lsl r0, r0, #2 + add r3, sp, #0x1c + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + ldr r0, [r5, r0] + bl sub_0200D4C4 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x19 + bl sub_0200D474 + mov r0, #0xbd + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D364 + add sp, #0x58 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223C7CC: .word 0x0000011E +_0223C7D0: .word 0x00000123 +_0223C7D4: .word 0x00002C02 +_0223C7D8: .word 0x00002BA6 +_0223C7DC: .word 0x00002C0B + thumb_func_end ov76_0223C61C + + thumb_func_start ov76_0223C7E0 +ov76_0223C7E0: ; 0x0223C7E0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov76_0223C354 + add r0, r5, #0 + bl ov76_0223C288 + mov r7, #0x9a + lsl r7, r7, #2 + mov r4, #0 + add r6, r7, #4 +_0223C7F6: + ldr r0, [r5, r6] + cmp r0, #0 + beq _0223C802 + ldr r1, [r5, r7] + bl sub_0200D364 +_0223C802: + add r4, r4, #1 + add r5, #0xc + cmp r4, #0xc + blt _0223C7F6 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C7E0 + + thumb_func_start ov76_0223C80C +ov76_0223C80C: ; 0x0223C80C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + lsl r6, r1, #3 + add r0, r5, r6 + ldr r0, [r0, #4] + lsl r4, r2, #3 + str r1, [sp] + add r1, r5, r4 + ldr r7, [r1, #4] + cmp r0, #0xff + beq _0223C838 + add r1, r2, #1 + str r1, [sp, #0xc] + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #4] + mov r1, #0xa2 + add r2, sp, #0xc + bl sub_02074B30 +_0223C838: + cmp r7, #0xff + beq _0223C852 + ldr r0, [sp] + add r2, sp, #8 + add r0, r0, #1 + str r0, [sp, #8] + ldr r1, [r5, #0] + lsl r0, r7, #2 + add r0, r1, r0 + ldr r0, [r0, #4] + mov r1, #0xa2 + bl sub_02074B30 +_0223C852: + add r2, r5, #4 + ldr r1, [r2, r6] + ldr r0, [r2, r4] + add r7, r5, #0 + str r0, [r2, r6] + str r1, [r2, r4] + add r7, #8 + ldr r0, [r7, r6] + add r1, sp, #0x10 + bl sub_0202CA10 + add r0, r5, #0 + str r0, [sp, #4] + add r0, #8 + str r0, [sp, #4] + ldr r0, [r0, r4] + ldr r1, [r7, r6] + bl sub_0202CA10 + ldr r1, [sp, #4] + add r0, sp, #0x10 + ldr r1, [r1, r4] + bl sub_0202CA10 + add r0, r5, #0 + bl ov76_0223C7E0 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C80C + + thumb_func_start ov76_0223C88C +ov76_0223C88C: ; 0x0223C88C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r6, #0x9b + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #2 +_0223C898: + ldr r0, [r5, r6] + bl sub_0200D330 + add r4, r4, #1 + add r5, #0xc + cmp r4, #0xc + blt _0223C898 + mov r0, #0xbd + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_0200D330 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_0200D330 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C88C + + thumb_func_start ov76_0223C8BC +ov76_0223C8BC: ; 0x0223C8BC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r6, #0x9b + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #2 +_0223C8C8: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, #0xc + cmp r4, #0xc + blt _0223C8C8 + mov r0, #0xbd + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_0200D0F4 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r7, r0] + bl sub_0200D0F4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223C8BC + + thumb_func_start ov76_0223C8EC +ov76_0223C8EC: ; 0x0223C8EC + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r2, #0 + add r4, r1, #0 + lsl r1, r6, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #0x35 + str r1, [sp, #4] + mov r1, #1 + add r2, r1, #0 + mov r3, #0xf + add r5, r0, #0 + bl sub_0200DD0C + add r0, r6, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xc0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0x26 + mov r3, #0x35 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x35 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + mov r2, #0x1f + mov r3, #0xd + bl sub_0200DAA4 + bl sub_0200DAA0 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0x26 + mov r3, #0x35 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xe + mov r2, #7 + mov r3, #0x35 + bl sub_02003050 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov76_0223C8EC + + thumb_func_start ov76_0223C974 +ov76_0223C974: ; 0x0223C974 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r6, r2, #0 + add r4, r1, #0 + lsl r1, r6, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #0x35 + str r1, [sp, #4] + mov r1, #4 + mov r2, #1 + mov r3, #0xf + add r5, r0, #0 + bl sub_0200DD0C + add r0, r6, #0 + bl sub_0200DD08 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xc0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0x26 + mov r3, #0x35 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + mov r0, #0x35 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #4 + mov r2, #0x1f + mov r3, #0xd + bl sub_0200DAA4 + bl sub_0200DAA0 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xd0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0x26 + mov r3, #0x35 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0xe0 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xe + mov r2, #7 + mov r3, #0x35 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x30 + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xe + mov r2, #7 + mov r3, #0x35 + bl sub_02003050 + mov r0, #1 + str r0, [sp] + mov r0, #0x20 + mov r1, #0x5b + str r0, [sp, #4] + mov r0, #0xb0 + add r2, r1, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, #0xcb + mov r3, #0x35 + bl sub_02003050 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov76_0223C974 + + thumb_func_start ov76_0223CA30 +ov76_0223CA30: ; 0x0223CA30 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, _0223CA94 ; =0x0000FFFF + add r4, r0, #0 + cmp r5, r1 + bne _0223CA4E + mov r1, #0xf + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201A954 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0223CA4E: + mov r0, #0 + mov r1, #0x1a + mov r2, #8 + mov r3, #0x35 + bl sub_0200B144 + add r1, r5, #0 + add r6, r0, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + add r0, r4, #0 + mov r1, #1 + add r2, r5, #0 + str r3, [sp, #8] + bl sub_0201D738 + add r0, r4, #0 + bl sub_0201A954 + add r0, r5, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223CA94: .word 0x0000FFFF + thumb_func_end ov76_0223CA30 + + thumb_func_start ov76_0223CA98 +ov76_0223CA98: ; 0x0223CA98 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0201A7A0 + ldr r0, [sp, #0x28] + lsl r2, r4, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x2c] + lsl r3, r6, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + add r1, r5, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xe + str r0, [sp, #0xc] + ldr r0, [sp, #0x34] + lsr r2, r2, #0x18 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + add r0, r7, #0 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + mov r1, #1 + add r0, r5, #0 + add r2, r1, #0 + mov r3, #0xc + bl sub_0200E060 + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov76_0223CA98 + + thumb_func_start ov76_0223CAFC +ov76_0223CAFC: ; 0x0223CAFC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r7, r0, #0 + add r0, r5, #0 + add r4, r2, #0 + add r6, r3, #0 + bl sub_0201A7A0 + ldr r0, [sp, #0x28] + lsl r2, r4, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [sp, #0x2c] + lsl r3, r6, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [sp, #0x30] + add r1, r5, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [sp, #0x38] + lsr r2, r2, #0x18 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldr r0, [sp, #0x34] + lsr r3, r3, #0x18 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + add r0, r7, #0 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov76_0223CAFC + + thumb_func_start ov76_0223CB58 +ov76_0223CB58: ; 0x0223CB58 + push {r3, r4, lr} + sub sp, #0x14 + mov r1, #2 + add r4, r0, #0 + str r1, [sp] + mov r0, #4 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #0x94 + str r1, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0xe4 + add r1, #0x88 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #3 + bl ov76_0223CAFC + mov r1, #2 + str r1, [sp] + mov r0, #4 + str r0, [sp, #4] + str r1, [sp, #8] + mov r1, #0x9c + str r1, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0xe4 + add r1, #0x90 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #0xa + bl ov76_0223CAFC + mov r0, #5 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r1, #0xa4 + str r1, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0xe4 + add r1, #0x98 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #3 + bl ov76_0223CAFC + mov r0, #5 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r1, #0xac + str r1, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0xe4 + add r1, #0xa0 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #0xa + bl ov76_0223CAFC + mov r0, #8 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r1, #0xb4 + str r1, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0xe4 + add r1, #0xa8 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #3 + bl ov76_0223CAFC + mov r0, #8 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r1, #0xbc + str r1, [sp, #0xc] + mov r0, #0xb + str r0, [sp, #0x10] + add r0, r4, #0 + add r0, #0xe4 + add r1, #0xb0 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #0xa + bl ov76_0223CAFC + mov r2, #0xb + str r2, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r1, #0xc4 + str r1, [sp, #0xc] + add r0, r4, #0 + str r2, [sp, #0x10] + add r0, #0xe4 + add r1, #0xb8 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #3 + bl ov76_0223CAFC + mov r2, #0xb + str r2, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r1, #0xcc + str r1, [sp, #0xc] + add r0, r4, #0 + str r2, [sp, #0x10] + add r0, #0xe4 + add r1, #0xc0 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r2, #6 + mov r3, #0xa + bl ov76_0223CAFC + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223CB58 + + thumb_func_start ov76_0223CC8C +ov76_0223CC8C: ; 0x0223CC8C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r7, #0 + add r5, #0xec + mov r6, #3 + add r5, #0x30 +_0223CC9A: + ldr r0, _0223CD18 ; =0x0000041D + add r1, r7, r6 + ldrb r0, [r1, r0] + str r0, [sp, #0x10] + cmp r0, #0 + bne _0223CCB6 + add r0, r5, #0 + mov r1, #0xee + bl sub_0201ADA4 + add r0, r5, #0 + bl sub_0201A954 + b _0223CD0A +_0223CCB6: + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x64 + mov r1, #0x35 + bl sub_02023790 + ldr r1, [sp, #0x10] + add r4, r0, #0 + ldr r0, [r7, #0x64] + sub r1, r1, #1 + bl sub_0202CA90 + add r1, r0, #0 + mov r0, #1 + str r0, [sp] + add r0, r4, #0 + mov r2, #3 + mov r3, #1 + bl sub_020238A0 + mov r0, #0 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223CD1C ; =0x00010200 + mov r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r2, r4, #0 + mov r3, #7 + bl sub_0201D78C + add r0, r5, #0 + bl sub_0201A954 + add r0, r4, #0 + bl sub_020237BC +_0223CD0A: + add r6, r6, #1 + add r5, #0x10 + cmp r6, #0xb + blt _0223CC9A + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223CD18: .word 0x0000041D +_0223CD1C: .word 0x00010200 + thumb_func_end ov76_0223CC8C + + thumb_func_start ov76_0223CD20 +ov76_0223CD20: ; 0x0223CD20 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + add r0, r1, #3 + lsl r4, r0, #4 + mov r0, #0x42 + add r1, r6, r1 + lsl r0, r0, #4 + add r5, r6, #0 + ldrb r7, [r1, r0] + add r5, #0xec + cmp r7, #0 + bne _0223CD4C + add r0, r5, r4 + mov r1, #0xee + bl sub_0201ADA4 + add r0, r5, r4 + bl sub_0201A954 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_0223CD4C: + add r0, r5, r4 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x64 + mov r1, #0x35 + bl sub_02023790 + str r0, [sp, #0x10] + ldr r0, [r6, #0x64] + sub r1, r7, #1 + bl sub_0202CA90 + add r1, r0, #0 + mov r3, #1 + ldr r0, [sp, #0x10] + mov r2, #3 + str r3, [sp] + bl sub_020238A0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223CDA0 ; =0x00010200 + ldr r2, [sp, #0x10] + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, r4 + mov r1, #1 + mov r3, #7 + bl sub_0201D78C + add r0, r5, r4 + bl sub_0201A954 + ldr r0, [sp, #0x10] + bl sub_020237BC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223CDA0: .word 0x00010200 + thumb_func_end ov76_0223CD20 + + thumb_func_start ov76_0223CDA4 +ov76_0223CDA4: ; 0x0223CDA4 + push {r3, r4, r5, lr} + add r0, #0xec + add r5, r0, #0 + mov r4, #3 + add r5, #0x30 +_0223CDAE: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xb + blt _0223CDAE + pop {r3, r4, r5, pc} + thumb_func_end ov76_0223CDA4 + + thumb_func_start ov76_0223CDC4 +ov76_0223CDC4: ; 0x0223CDC4 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, _0223CE28 ; =0x0000FFFF + add r4, r0, #0 + cmp r5, r1 + bne _0223CDE2 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_0201A954 + add sp, #0xc + pop {r3, r4, r5, r6, pc} +_0223CDE2: + mov r0, #0 + mov r1, #0x1a + mov r2, #0xc + mov r3, #0x35 + bl sub_0200B144 + add r1, r5, #0 + add r6, r0, #0 + bl sub_0200B1EC + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + add r0, r4, #0 + mov r1, #1 + add r2, r5, #0 + str r3, [sp, #8] + bl sub_0201D738 + add r0, r4, #0 + bl sub_0201A954 + add r0, r5, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_0200B190 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223CE28: .word 0x0000FFFF + thumb_func_end ov76_0223CDC4 + + thumb_func_start ov76_0223CE2C +ov76_0223CE2C: ; 0x0223CE2C + push {r3, lr} + bl sub_0201FFD0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + pop {r3, pc} + thumb_func_end ov76_0223CE2C + + thumb_func_start ov76_0223CE44 +ov76_0223CE44: ; 0x0223CE44 + push {lr} + sub sp, #0xc + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x35 + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} + ; .align 2, 0 + thumb_func_end ov76_0223CE44 + + thumb_func_start ov76_0223CE64 +ov76_0223CE64: ; 0x0223CE64 + push {lr} + sub sp, #0xc + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x35 + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + add sp, #0xc + pop {pc} + thumb_func_end ov76_0223CE64 + + thumb_func_start ov76_0223CE84 +ov76_0223CE84: ; 0x0223CE84 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + add r4, r1, #0 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xd7 + mov r3, #2 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xe7 + mov r3, #2 + bl sub_0200710C + mov r1, #0 + str r1, [sp] + mov r0, #0x40 + str r0, [sp, #4] + add r0, r5, #0 + str r1, [sp, #8] + add r0, #0xe8 + mov r1, #0x5b + add r2, r1, #0 + ldr r0, [r0, #0] + add r2, #0xc5 + mov r3, #0x35 + bl sub_02003050 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xd8 + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r1, #0x35 + str r1, [sp, #0xc] + add r5, #0xe4 + ldr r2, [r5, #0] + add r0, r4, #0 + add r1, #0xe8 + mov r3, #3 + bl sub_0200710C + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov76_0223CE84 + + thumb_func_start ov76_0223CF24 +ov76_0223CF24: ; 0x0223CF24 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + add r4, r1, #0 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xd6 + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xe6 + mov r3, #5 + bl sub_0200710C + mov r0, #1 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0 + mov r1, #0x5b + add r2, r1, #0 + add r5, #0xe8 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r2, #0xc4 + mov r3, #0x35 + bl sub_02003050 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov76_0223CF24 + + thumb_func_start ov76_0223CF88 +ov76_0223CF88: ; 0x0223CF88 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + add r4, r1, #0 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xd6 + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r1, #0x35 + add r2, r5, #0 + str r1, [sp, #0xc] + add r2, #0xe4 + ldr r2, [r2, #0] + add r0, r4, #0 + add r1, #0xe5 + mov r3, #7 + bl sub_0200710C + mov r0, #1 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0 + mov r1, #0x5b + add r2, r1, #0 + add r5, #0xe8 + str r0, [sp, #8] + ldr r0, [r5, #0] + add r2, #0xc4 + mov r3, #0x35 + bl sub_02003050 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov76_0223CF88 + + thumb_func_start ov76_0223CFEC +ov76_0223CFEC: ; 0x0223CFEC + push {r4, r5, r6, lr} + sub sp, #0x18 + add r5, r1, #0 + add r1, r0, #0 + add r1, #0xdc + ldr r6, [r1, #0] + add r1, r0, #0 + add r1, #0xe0 + ldr r4, [r1, #0] + ldr r1, _0223D128 ; =0x00000122 + str r5, [sp] + str r1, [sp, #4] + mov r1, #0 + str r1, [sp, #8] + mov r1, #3 + str r1, [sp, #0xc] + mov r2, #2 + str r2, [sp, #0x10] + ldr r2, _0223D12C ; =0x000066B2 + add r0, #0xe8 + str r2, [sp, #0x14] + ldr r0, [r0, #0] + add r2, r6, #0 + add r3, r4, #0 + bl sub_0200CDC4 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223D130 ; =0x000062B9 + ldr r3, _0223D134 ; =0x00000111 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0223D138 ; =0x00006A29 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0xb1 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0223D13C ; =0x00006DB5 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0x55 + bl sub_0200CE54 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223D140 ; =0x000062BA + ldr r3, _0223D144 ; =0x00000112 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0223D148 ; =0x00006A2A + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0xb2 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0223D14C ; =0x00006DB6 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0x56 + bl sub_0200CE54 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223D150 ; =0x000062B6 + ldr r3, _0223D154 ; =0x0000010E + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0223D158 ; =0x00006A27 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0xaf + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0223D15C ; =0x00006DB3 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0x53 + bl sub_0200CE54 + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223D160 ; =0x000089C8 + mov r3, #0x11 + str r0, [sp, #8] + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + lsl r3, r3, #4 + bl sub_0200CC3C + mov r0, #1 + str r0, [sp] + ldr r0, _0223D164 ; =0x00006A28 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0xb0 + bl sub_0200CE24 + mov r0, #1 + str r0, [sp] + ldr r0, _0223D168 ; =0x00006DB4 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + add r2, r5, #0 + mov r3, #0x54 + bl sub_0200CE54 + add sp, #0x18 + pop {r4, r5, r6, pc} + nop +_0223D128: .word 0x00000122 +_0223D12C: .word 0x000066B2 +_0223D130: .word 0x000062B9 +_0223D134: .word 0x00000111 +_0223D138: .word 0x00006A29 +_0223D13C: .word 0x00006DB5 +_0223D140: .word 0x000062BA +_0223D144: .word 0x00000112 +_0223D148: .word 0x00006A2A +_0223D14C: .word 0x00006DB6 +_0223D150: .word 0x000062B6 +_0223D154: .word 0x0000010E +_0223D158: .word 0x00006A27 +_0223D15C: .word 0x00006DB3 +_0223D160: .word 0x000089C8 +_0223D164: .word 0x00006A28 +_0223D168: .word 0x00006DB4 + thumb_func_end ov76_0223CFEC + + thumb_func_start ov76_0223D16C +ov76_0223D16C: ; 0x0223D16C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xa0 + add r7, r0, #0 + add r0, #0xdc + ldr r6, [r0, #0] + add r0, r7, #0 + add r0, #0xe0 + ldr r5, [r0, #0] + mov r0, #0xf9 + lsl r0, r0, #2 + add r4, r7, r0 + mov r1, #0 + add r2, sp, #0x6c + strh r1, [r2] + strh r1, [r2, #2] + strh r1, [r2, #4] + strh r1, [r2, #6] + mov r0, #0x3c + str r0, [sp, #0x74] + mov r0, #2 + str r0, [sp, #0x7c] + mov r0, #1 + str r1, [sp, #0x9c] + sub r1, r0, #2 + str r0, [sp, #0x98] + str r0, [sp, #0x78] + ldr r0, _0223D2B8 ; =0x000062B9 + str r1, [sp, #0x90] + str r0, [sp, #0x80] + ldr r0, _0223D2BC ; =0x000066B2 + str r1, [sp, #0x94] + str r0, [sp, #0x84] + ldr r0, _0223D2C0 ; =0x00006A29 + add r1, r5, #0 + str r0, [sp, #0x88] + ldr r0, _0223D2C4 ; =0x00006DB5 + str r0, [sp, #0x8c] + add r0, r6, #0 + bl sub_0200CE6C + str r0, [r4, #0x20] + ldr r0, _0223D2C8 ; =0x000062BA + add r1, r5, #0 + str r0, [sp, #0x80] + ldr r0, _0223D2BC ; =0x000066B2 + add r2, sp, #0x6c + str r0, [sp, #0x84] + ldr r0, _0223D2CC ; =0x00006A2A + str r0, [sp, #0x88] + ldr r0, _0223D2D0 ; =0x00006DB6 + str r0, [sp, #0x8c] + add r0, r6, #0 + bl sub_0200CE6C + str r0, [r4, #0x24] + mov r0, #1 + str r0, [sp, #0x98] + str r0, [sp, #0x78] + ldr r0, _0223D2D4 ; =0x000089C8 + add r1, r5, #0 + str r0, [sp, #0x80] + ldr r0, _0223D2BC ; =0x000066B2 + add r2, sp, #0x6c + str r0, [sp, #0x84] + ldr r0, _0223D2D8 ; =0x00006A28 + str r0, [sp, #0x88] + ldr r0, _0223D2DC ; =0x00006DB4 + str r0, [sp, #0x8c] + add r0, r6, #0 + bl sub_0200CE6C + str r0, [r4, #0x28] + mov r0, #1 + str r0, [sp, #0x98] + mov r0, #0 + str r0, [sp, #0x78] + ldr r0, _0223D2E0 ; =0x000062B6 + add r1, r5, #0 + str r0, [sp, #0x80] + ldr r0, _0223D2BC ; =0x000066B2 + add r2, sp, #0x6c + str r0, [sp, #0x84] + ldr r0, _0223D2E4 ; =0x00006A27 + str r0, [sp, #0x88] + ldr r0, _0223D2E8 ; =0x00006DB3 + str r0, [sp, #0x8c] + add r0, r6, #0 + bl sub_0200CE6C + str r0, [r4, #0x2c] + add r0, r6, #0 + add r1, r5, #0 + add r2, sp, #0x6c + bl sub_0200CE6C + ldr r3, _0223D2EC ; =0x0223ED8C + str r0, [r4, #0x30] + add r2, sp, #0x38 + mov r1, #0x1a +_0223D232: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _0223D232 + ldr r3, _0223D2F0 ; =0x0223EDC0 + add r2, sp, #4 + mov r1, #0x1a +_0223D244: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _0223D244 + mov r0, #8 + str r0, [sp] + mov r0, #0x1d + add r4, r7, #0 + lsl r0, r0, #4 + add r7, r7, r0 + add r6, sp, #0x58 + add r4, #0x20 + add r5, sp, #0x24 + add r7, #0x20 +_0223D264: + mov r0, #0xf9 + mov r1, #0 + mov r2, #2 + lsl r0, r0, #2 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r4, r0] + bl sub_0200D4C4 + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200D330 + mov r0, #0xf9 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3CC + mov r1, #0xf9 + mov r2, #0 + mov r3, #2 + lsl r1, r1, #2 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + ldr r1, [r4, r1] + add r0, r7, #0 + bl ov76_0223B870 + ldr r0, [sp] + add r6, r6, #4 + add r0, r0, #1 + add r4, r4, #4 + add r5, r5, #4 + add r7, r7, #4 + str r0, [sp] + cmp r0, #0xd + blt _0223D264 + add sp, #0xa0 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D2B8: .word 0x000062B9 +_0223D2BC: .word 0x000066B2 +_0223D2C0: .word 0x00006A29 +_0223D2C4: .word 0x00006DB5 +_0223D2C8: .word 0x000062BA +_0223D2CC: .word 0x00006A2A +_0223D2D0: .word 0x00006DB6 +_0223D2D4: .word 0x000089C8 +_0223D2D8: .word 0x00006A28 +_0223D2DC: .word 0x00006DB4 +_0223D2E0: .word 0x000062B6 +_0223D2E4: .word 0x00006A27 +_0223D2E8: .word 0x00006DB3 +_0223D2EC: .word 0x0223ED8C +_0223D2F0: .word 0x0223EDC0 + thumb_func_end ov76_0223D16C + + thumb_func_start ov76_0223D2F4 +ov76_0223D2F4: ; 0x0223D2F4 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0xf9 + add r5, r0, #0 + add r6, r1, #0 + mov r4, #0 + lsl r7, r7, #2 +_0223D300: + ldr r0, [r5, r7] + cmp r0, #0 + beq _0223D30C + add r1, r6, #0 + bl sub_0200D3F4 +_0223D30C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xd + blt _0223D300 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223D2F4 + + thumb_func_start ov76_0223D318 +ov76_0223D318: ; 0x0223D318 + bx lr + ; .align 2, 0 + thumb_func_end ov76_0223D318 + + thumb_func_start ov76_0223D31C +ov76_0223D31C: ; 0x0223D31C + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r6, #0xf9 + mov r4, #8 + add r5, #0x20 + lsl r6, r6, #2 +_0223D328: + ldr r0, [r5, r6] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xd + blt _0223D328 + pop {r4, r5, r6, pc} + thumb_func_end ov76_0223D31C + + .rodata + + + .global Unk_ov76_0223ECF0 +Unk_ov76_0223ECF0: ; 0x0223ECF0 + .incbin "incbin/overlay76_rodata.bin", 0x0, 0x14 - 0x0 + + .global Unk_ov76_0223ED04 +Unk_ov76_0223ED04: ; 0x0223ED04 + .incbin "incbin/overlay76_rodata.bin", 0x14, 0x2C - 0x14 + + .global Unk_ov76_0223ED1C +Unk_ov76_0223ED1C: ; 0x0223ED1C + .incbin "incbin/overlay76_rodata.bin", 0x2C, 0x4C - 0x2C + + .global Unk_ov76_0223ED3C +Unk_ov76_0223ED3C: ; 0x0223ED3C + .incbin "incbin/overlay76_rodata.bin", 0x4C, 0x6C - 0x4C + + .global Unk_ov76_0223ED5C +Unk_ov76_0223ED5C: ; 0x0223ED5C + .incbin "incbin/overlay76_rodata.bin", 0x6C, 0x9C - 0x6C + + .global Unk_ov76_0223ED8C +Unk_ov76_0223ED8C: ; 0x0223ED8C + .incbin "incbin/overlay76_rodata.bin", 0x9C, 0xD0 - 0x9C + + .global Unk_ov76_0223EDC0 +Unk_ov76_0223EDC0: ; 0x0223EDC0 + .incbin "incbin/overlay76_rodata.bin", 0xD0, 0x34 + diff --git a/asm/ov76_0223D338.s b/asm/ov76_0223D338.s new file mode 100644 index 000000000..8265ddfc8 --- /dev/null +++ b/asm/ov76_0223D338.s @@ -0,0 +1,3223 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov76_0223D338 +ov76_0223D338: ; 0x0223D338 + add r1, r0, #0 + mov r0, #0xf1 + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r3, _0223D34C ; =sub_0202CA10 + lsl r0, r0, #3 + add r0, r1, r0 + ldr r0, [r0, #8] + add r1, #0x68 + bx r3 + ; .align 2, 0 +_0223D34C: .word sub_0202CA10 + thumb_func_end ov76_0223D338 + + thumb_func_start ov76_0223D350 +ov76_0223D350: ; 0x0223D350 + mov r1, #0xf1 + add r2, r0, #0 + lsl r1, r1, #2 + ldr r1, [r2, r1] + ldr r3, _0223D364 ; =sub_0202CA10 + lsl r1, r1, #3 + add r1, r2, r1 + add r0, #0x68 + ldr r1, [r1, #8] + bx r3 + ; .align 2, 0 +_0223D364: .word sub_0202CA10 + thumb_func_end ov76_0223D350 + + thumb_func_start ov76_0223D368 +ov76_0223D368: ; 0x0223D368 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0223D36E: + ldr r0, [r5, #0x64] + add r1, r4, #0 + bl sub_0202CA90 + add r1, r5, r4 + add r1, #0x80 + add r4, r4, #1 + strb r0, [r1] + cmp r4, #0x51 + blt _0223D36E + pop {r3, r4, r5, pc} + thumb_func_end ov76_0223D368 + + thumb_func_start ov76_0223D384 +ov76_0223D384: ; 0x0223D384 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0223D38A: + add r2, r5, r4 + add r2, #0x80 + ldrb r2, [r2] + ldr r0, [r5, #0x64] + add r1, r4, #0 + bl sub_0202CADC + add r4, r4, #1 + cmp r4, #0x51 + blt _0223D38A + pop {r3, r4, r5, pc} + thumb_func_end ov76_0223D384 + + thumb_func_start ov76_0223D3A0 +ov76_0223D3A0: ; 0x0223D3A0 + push {r3, lr} + mov r0, #7 + str r0, [sp] + ldr r0, _0223D3C4 ; =0x04000050 + mov r1, #0 + mov r2, #6 + mov r3, #0xb + bl sub_020BF55C + mov r0, #8 + str r0, [sp] + ldr r0, _0223D3C8 ; =0x04001050 + mov r1, #0 + mov r2, #0xe + mov r3, #7 + bl sub_020BF55C + pop {r3, pc} + ; .align 2, 0 +_0223D3C4: .word 0x04000050 +_0223D3C8: .word 0x04001050 + thumb_func_end ov76_0223D3A0 + + thumb_func_start ov76_0223D3CC +ov76_0223D3CC: ; 0x0223D3CC + push {r3, r4, r5, r6, r7, lr} + mov r1, #0xf1 + add r5, r0, #0 + lsl r1, r1, #2 + ldr r0, [r5, r1] + lsl r0, r0, #3 + add r0, r5, r0 + ldr r0, [r0, #4] + cmp r0, #0xff + beq _0223D3F2 + ldr r2, [r5, #0] + lsl r0, r0, #2 + add r0, r2, r0 + add r1, #0x64 + ldr r0, [r0, #4] + ldr r1, [r5, r1] + bl sub_020775EC + pop {r3, r4, r5, r6, r7, pc} +_0223D3F2: + ldr r1, [r5, #0] + mov r6, #0 + ldr r0, [r1, #0] + cmp r0, #0 + ble _0223D428 + add r4, r6, #0 +_0223D3FE: + add r0, r1, r4 + ldr r7, [r0, #4] + mov r1, #0x4c + add r0, r7, #0 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _0223D41C + ldr r1, _0223D42C ; =0x00000428 + add r0, r7, #0 + ldr r1, [r5, r1] + bl sub_020775EC + pop {r3, r4, r5, r6, r7, pc} +_0223D41C: + ldr r1, [r5, #0] + add r6, r6, #1 + ldr r0, [r1, #0] + add r4, r4, #4 + cmp r6, r0 + blt _0223D3FE +_0223D428: + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D42C: .word 0x00000428 + thumb_func_end ov76_0223D3CC + + thumb_func_start ov76_0223D430 +ov76_0223D430: ; 0x0223D430 + push {r3, r4, r5, r6, r7, lr} + mov r7, #0 + add r6, r0, #0 + add r5, r7, #0 + add r4, r7, #0 +_0223D43A: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0202CA64 + bl sub_0202CA7C + cmp r0, #0 + beq _0223D44C + add r5, r5, #1 +_0223D44C: + add r4, r4, #1 + cmp r4, #8 + blt _0223D43A + cmp r5, #0 + beq _0223D458 + mov r7, #1 +_0223D458: + add r0, r7, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov76_0223D430 + + thumb_func_start ov76_0223D45C +ov76_0223D45C: ; 0x0223D45C + mov r2, #0xc + mul r2, r1 + add r1, r0, r2 + mov r0, #0x99 + lsl r0, r0, #2 + ldr r2, [r1, r0] + add r0, r0, #4 + ldr r0, [r1, r0] + cmp r2, #0xff + bne _0223D478 + cmp r0, #0 + bne _0223D478 + mov r0, #0 + bx lr +_0223D478: + cmp r2, #0xff + bne _0223D484 + cmp r0, #1 + bne _0223D484 + mov r0, #1 + bx lr +_0223D484: + cmp r2, #0xff + beq _0223D490 + cmp r0, #1 + bne _0223D490 + mov r0, #2 + bx lr +_0223D490: + mov r0, #3 + bx lr + thumb_func_end ov76_0223D45C + + thumb_func_start ov76_0223D494 +ov76_0223D494: ; 0x0223D494 + push {r3, r4} + cmp r2, #0xff + bne _0223D4A6 + mov r2, #0xf6 + lsl r2, r2, #2 + ldr r4, [r0, r2] + sub r2, r2, #4 + str r4, [r0, r2] + b _0223D4AC +_0223D4A6: + mov r4, #0xf5 + lsl r4, r4, #2 + str r2, [r0, r4] +_0223D4AC: + mov r2, #0xf3 + lsl r2, r2, #2 + str r1, [r0, r2] + add r1, r2, #0 + add r1, #0xc + str r3, [r0, r1] + mov r1, #0 + add r2, #0x10 + str r1, [r0, r2] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov76_0223D494 + + thumb_func_start ov76_0223D4C4 +ov76_0223D4C4: ; 0x0223D4C4 + push {r4, lr} + add r4, r0, #0 + add r0, #0xfc + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0xfc + bl sub_0201ACF4 + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02001BC4 + mov r0, #0x67 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02013A3C + add r4, #0xfc + add r0, r4, #0 + bl sub_0201A8FC + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223D4C4 + + thumb_func_start ov76_0223D4FC +ov76_0223D4FC: ; 0x0223D4FC + push {r3, lr} + mov r1, #1 + mov r2, #0 + mov r3, #3 + bl ov76_0223D494 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov76_0223D4FC + + thumb_func_start ov76_0223D50C +ov76_0223D50C: ; 0x0223D50C + push {r4, lr} + add r4, r0, #0 + bl ov76_0223B400 + add r0, r4, #0 + bl ov76_0223B808 + add r0, r4, #0 + bl ov76_0223C7E0 + mov r2, #0 + add r0, r4, #0 + mov r1, #2 + add r3, r2, #0 + bl ov76_0223D494 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov76_0223D50C + + thumb_func_start ov76_0223D530 +ov76_0223D530: ; 0x0223D530 + push {r3, lr} + mov r1, #3 + mov r2, #0 + add r3, r1, #0 + bl ov76_0223D494 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov76_0223D530 + + thumb_func_start ov76_0223D540 +ov76_0223D540: ; 0x0223D540 + push {r3, lr} + mov r1, #4 + mov r2, #0 + mov r3, #3 + bl ov76_0223D494 + mov r0, #0 + pop {r3, pc} + thumb_func_end ov76_0223D540 + + thumb_func_start ov76_0223D550 +ov76_0223D550: ; 0x0223D550 + push {r3, r4, r5, lr} + mov r1, #0xf3 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + lsl r2, r1, #2 + ldr r1, _0223D570 ; =0x0223EE04 + ldr r1, [r1, r2] + blx r1 + add r4, #0xe0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl sub_0200C7EC + add r0, r5, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D570: .word 0x0223EE04 + thumb_func_end ov76_0223D550 + + thumb_func_start ov76_0223D574 +ov76_0223D574: ; 0x0223D574 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223D5FC ; =0x021BF67C + mov r1, #0x10 + ldr r0, [r0, #0x4c] + tst r1, r0 + beq _0223D592 + ldr r0, [r4, #0] + mov r1, #0xc + add r0, r0, #1 + str r0, [r4, #0] + bl sub_020E1F6C + str r1, [r4, #0] + b _0223D5F8 +_0223D592: + mov r1, #0x20 + tst r1, r0 + beq _0223D5AA + ldr r0, [r4, #0] + cmp r0, #0 + ble _0223D5A4 + sub r0, r0, #1 + str r0, [r4, #0] + b _0223D5F8 +_0223D5A4: + mov r0, #0xb + str r0, [r4, #0] + b _0223D5F8 +_0223D5AA: + mov r1, #0x40 + tst r1, r0 + beq _0223D5CE + ldr r1, [r4, #0] + asr r0, r1, #1 + lsr r0, r0, #0x1e + add r0, r1, r0 + asr r0, r0, #2 + beq _0223D5CA + sub r0, r1, #4 + mov r1, #0xc + str r0, [r4, #0] + bl sub_020E1F6C + str r1, [r4, #0] + b _0223D5F8 +_0223D5CA: + mov r0, #0 + pop {r4, pc} +_0223D5CE: + mov r1, #0x80 + tst r0, r1 + beq _0223D5F4 + ldr r1, [r4, #0] + asr r0, r1, #1 + lsr r0, r0, #0x1e + add r0, r1, r0 + asr r0, r0, #2 + cmp r0, #2 + beq _0223D5F0 + add r0, r1, #4 + mov r1, #0xc + str r0, [r4, #0] + bl sub_020E1F6C + str r1, [r4, #0] + b _0223D5F8 +_0223D5F0: + mov r0, #0 + pop {r4, pc} +_0223D5F4: + mov r0, #0 + pop {r4, pc} +_0223D5F8: + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_0223D5FC: .word 0x021BF67C + thumb_func_end ov76_0223D574 + + thumb_func_start ov76_0223D600 +ov76_0223D600: ; 0x0223D600 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r4, #0 + str r2, [sp] + cmp r1, #0 + bne _0223D610 + mov r4, #1 +_0223D610: + mov r0, #0xf1 + lsl r0, r0, #2 + lsl r6, r1, #2 + add r7, r5, r0 + add r1, sp, #4 + ldr r0, [r7, r6] + add r1, #2 + add r2, sp, #4 + bl ov76_0223C0EC + mov r0, #0xbd + add r1, r5, r6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r3, sp, #4 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + bl sub_0200D4C4 + ldr r0, [sp] + cmp r0, #1 + bne _0223D66E + mov r0, #0xf1 + lsl r0, r0, #2 + add r1, r5, r0 + ldr r0, [r7, r6] + lsl r4, r4, #2 + str r0, [r1, r4] + ldr r0, [r1, r4] + add r1, sp, #4 + add r1, #2 + add r2, sp, #4 + bl ov76_0223C0EC + mov r0, #0xbd + add r1, r5, r4 + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r3, sp, #4 + mov r1, #2 + mov r2, #0 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + bl sub_0200D4C4 +_0223D66E: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov76_0223D600 + + thumb_func_start ov76_0223D674 +ov76_0223D674: ; 0x0223D674 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #6 + bls _0223D686 + b _0223D92A +_0223D686: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223D692: ; jump table + .short _0223D6A0 - _0223D692 - 2 ; case 0 + .short _0223D79A - _0223D692 - 2 ; case 1 + .short _0223D7AA - _0223D692 - 2 ; case 2 + .short _0223D7BE - _0223D692 - 2 ; case 3 + .short _0223D880 - _0223D692 - 2 ; case 4 + .short _0223D8DE - _0223D692 - 2 ; case 5 + .short _0223D8EE - _0223D692 - 2 ; case 6 +_0223D6A0: + mov r0, #0x5b + mov r1, #0x35 + bl sub_02006C24 + add r5, r0, #0 + add r0, r4, #0 + bl ov76_0223C110 + add r0, r4, #0 + bl ov76_0223C188 + add r0, r4, #0 + bl ov76_0223C288 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223CE84 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223CF24 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223CF88 + add r0, r4, #0 + bl ov76_0223C354 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223C61C + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + add r1, r4, #0 + str r3, [sp, #8] + mov r0, #0x28 + str r0, [sp, #0xc] + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + add r1, #0xec + mov r2, #1 + bl ov76_0223CA98 + add r0, r4, #0 + bl ov76_0223B208 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223B69C + add r0, r4, #0 + bl ov76_0223B1E0 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223CFEC + add r0, r4, #0 + bl ov76_0223D16C + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223C438 + add r0, r4, #0 + bl ov76_0223C4AC + add r0, r4, #0 + bl ov76_0223D338 + add r0, r4, #0 + bl ov76_0223D368 + ldr r1, _0223D93C ; =0x00000418 + add r0, r4, #0 + ldr r1, [r4, r1] + bl ov76_0223BA90 + add r0, r4, #0 + bl ov76_0223BB04 + add r0, r4, #0 + bl ov76_0223BBAC + add r0, r4, #0 + mov r1, #0 + bl ov76_0223D2F4 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223C568 + add r0, r4, #0 + bl ov76_0223B940 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223B96C + add r0, r4, #0 + add r0, #0xec + mov r1, #7 + bl ov76_0223CA30 + bl ov76_0223CE2C + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DCB8 + add r0, r5, #0 + bl sub_02006CA8 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223D92A +_0223D79A: + bl ov76_0223CE44 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223D92A +_0223D7AA: + bl sub_0200F2AC + cmp r0, #1 + beq _0223D7B4 + b _0223D92A +_0223D7B4: + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_0223D7BE: + bl sub_02022798 + cmp r0, #1 + bne _0223D7CE + add r0, r4, #0 + bl ov76_0223D4FC + b _0223D92A +_0223D7CE: + mov r0, #0xf1 + lsl r0, r0, #2 + ldr r6, [r4, r0] + add r0, r4, r0 + bl ov76_0223D574 + mov r1, #0xf1 + lsl r1, r1, #2 + ldr r5, [r4, r1] + cmp r0, #1 + str r6, [r4, r1] + bne _0223D82A + add r0, r4, #0 + bl ov76_0223B400 + add r0, r4, #0 + bl ov76_0223B808 + add r0, r4, #0 + bl ov76_0223C7E0 + mov r0, #0xf1 + lsl r0, r0, #2 + str r5, [r4, r0] + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + bl ov76_0223D600 + add r0, r4, #0 + bl ov76_0223B678 + add r0, r4, #0 + bl ov76_0223B208 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223B69C + add r0, r4, #0 + bl ov76_0223B1E0 + ldr r0, _0223D940 ; =0x000005DC + bl sub_02005748 + b _0223D92A +_0223D82A: + ldr r0, _0223D944 ; =0x021BF67C + ldr r2, [r0, #0x48] + mov r0, #1 + tst r0, r2 + beq _0223D86C + add r0, r1, #0 + add r0, #0x10 + ldr r0, [r4, r0] + add r1, #0x10 + add r0, r0, #1 + str r0, [r4, r1] + add r0, r4, #0 + add r0, #0xec + mov r1, #8 + bl ov76_0223CA30 + mov r0, #0xf1 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r4, #0 + str r0, [sp] + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + add r1, #0xfc + mov r2, #1 + add r3, r4, #0 + bl ov76_0223BF74 + ldr r0, _0223D940 ; =0x000005DC + bl sub_02005748 + b _0223D92A +_0223D86C: + mov r0, #2 + tst r0, r2 + beq _0223D92A + mov r0, #5 + add r1, #0x10 + str r0, [r4, r1] + ldr r0, _0223D948 ; =0x000005DD + bl sub_02005748 + b _0223D92A +_0223D880: + mov r0, #0x1a + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02001BE0 + add r1, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r1, r0 + beq _0223D89C + add r0, r0, #1 + cmp r1, r0 + beq _0223D92A + b _0223D8B6 +_0223D89C: + add r0, r4, #0 + bl ov76_0223D4C4 + add r0, r4, #0 + add r0, #0xec + mov r1, #7 + bl ov76_0223CA30 + mov r0, #0xf5 + mov r1, #3 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223D92A +_0223D8B6: + cmp r1, #0 + beq _0223D92A + add r0, r4, #0 + blx r1 + cmp r0, #1 + beq _0223D8CA + add r0, r4, #0 + bl ov76_0223D4C4 + b _0223D92A +_0223D8CA: + add r0, r4, #0 + add r0, #0xec + mov r1, #7 + bl ov76_0223CA30 + mov r0, #0xf5 + mov r1, #3 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223D92A +_0223D8DE: + bl ov76_0223CE64 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223D92A +_0223D8EE: + bl sub_0200F2AC + cmp r0, #1 + bne _0223D92A + add r0, r4, #0 + add r0, #0xec + bl sub_0201A8FC + add r0, r4, #0 + bl ov76_0223C8BC + add r0, r4, #0 + bl ov76_0223C32C + add r0, r4, #0 + bl ov76_0223D31C + add r0, r4, #0 + bl ov76_0223C588 + add r0, r4, #0 + bl ov76_0223BC70 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02097F30 + add sp, #0x10 + mov r0, #0 + pop {r4, r5, r6, pc} +_0223D92A: + add r0, r4, #0 + bl ov76_0223C304 + add r0, r4, #0 + bl ov76_0223C88C + mov r0, #1 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223D93C: .word 0x00000418 +_0223D940: .word 0x000005DC +_0223D944: .word 0x021BF67C +_0223D948: .word 0x000005DD + thumb_func_end ov76_0223D674 + + thumb_func_start ov76_0223D94C +ov76_0223D94C: ; 0x0223D94C + push {r3, lr} + cmp r1, #3 + bhi _0223D97E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223D95E: ; jump table + .short _0223D966 - _0223D95E - 2 ; case 0 + .short _0223D976 - _0223D95E - 2 ; case 1 + .short _0223D96E - _0223D95E - 2 ; case 2 + .short _0223D976 - _0223D95E - 2 ; case 3 +_0223D966: + mov r1, #1 + bl sub_0200D3CC + pop {r3, pc} +_0223D96E: + mov r1, #2 + bl sub_0200D3CC + pop {r3, pc} +_0223D976: + mov r1, #0 + bl sub_0200D3CC + pop {r3, pc} +_0223D97E: + bl sub_02022974 + pop {r3, pc} + thumb_func_end ov76_0223D94C + + thumb_func_start ov76_0223D984 +ov76_0223D984: ; 0x0223D984 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + cmp r5, #0 + beq _0223D9A8 + add r1, sp, #4 + add r2, sp, #0 + bl sub_020129A4 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r5, #0 + add r1, r1, r4 + add r2, r2, r6 + bl sub_020128C4 +_0223D9A8: + add sp, #8 + pop {r4, r5, r6, pc} + thumb_func_end ov76_0223D984 + + thumb_func_start ov76_0223D9AC +ov76_0223D9AC: ; 0x0223D9AC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #3 + beq _0223D9BE + cmp r0, #6 + beq _0223D9D8 + b _0223D9F8 +_0223D9BE: + mov r1, #0 + ldr r0, [r4, #8] + sub r2, r1, #1 + bl ov76_0223D984 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_0200D3CC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_0223D9D8: + ldr r0, [r4, #8] + mov r1, #0 + mov r2, #2 + bl ov76_0223D984 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_0200D3CC + add r0, r5, #0 + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r3, r4, r5, pc} +_0223D9F8: + add r0, r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov76_0223D9AC + + thumb_func_start ov76_0223DA00 +ov76_0223DA00: ; 0x0223DA00 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #0x35 + mov r1, #0xc + bl sub_02018144 + add r4, r0, #0 + mov r0, #1 + str r0, [r4, #0] + mov r1, #0 + str r6, [r4, #4] + add r0, r5, #0 + sub r2, r1, #1 + str r5, [r4, #8] + bl ov76_0223D984 + mov r2, #0xfa + ldr r0, _0223DA30 ; =ov76_0223D9AC + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_0200D9E8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223DA30: .word ov76_0223D9AC + thumb_func_end ov76_0223DA00 + + thumb_func_start ov76_0223DA34 +ov76_0223DA34: ; 0x0223DA34 + push {r4, r5, r6, lr} + add r4, r2, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r6, r1, #0 + cmp r0, #0 + bne _0223DA48 + b _0223DC84 +_0223DA48: + cmp r5, #0x14 + bls _0223DA4E + b _0223DC80 +_0223DA4E: + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223DA5A: ; jump table + .short _0223DBC2 - _0223DA5A - 2 ; case 0 + .short _0223DBC2 - _0223DA5A - 2 ; case 1 + .short _0223DBC2 - _0223DA5A - 2 ; case 2 + .short _0223DBC2 - _0223DA5A - 2 ; case 3 + .short _0223DBC2 - _0223DA5A - 2 ; case 4 + .short _0223DBC2 - _0223DA5A - 2 ; case 5 + .short _0223DBC2 - _0223DA5A - 2 ; case 6 + .short _0223DBC2 - _0223DA5A - 2 ; case 7 + .short _0223DA84 - _0223DA5A - 2 ; case 8 + .short _0223DACE - _0223DA5A - 2 ; case 9 + .short _0223DB1C - _0223DA5A - 2 ; case 10 + .short _0223DB4A - _0223DA5A - 2 ; case 11 + .short _0223DB88 - _0223DA5A - 2 ; case 12 + .short _0223DC50 - _0223DA5A - 2 ; case 13 + .short _0223DC50 - _0223DA5A - 2 ; case 14 + .short _0223DC50 - _0223DA5A - 2 ; case 15 + .short _0223DC50 - _0223DA5A - 2 ; case 16 + .short _0223DC50 - _0223DA5A - 2 ; case 17 + .short _0223DC50 - _0223DA5A - 2 ; case 18 + .short _0223DC50 - _0223DA5A - 2 ; case 19 + .short _0223DC50 - _0223DA5A - 2 ; case 20 +_0223DA84: + cmp r6, #0 + bne _0223DAC2 + ldr r1, _0223DC88 ; =0x00000418 + ldr r0, [r4, r1] + cmp r0, #0 + ble _0223DA92 + b _0223DA96 +_0223DA92: + add r0, r1, #4 + ldr r0, [r4, r0] +_0223DA96: + sub r0, r0, #1 + str r0, [r4, r1] + add r0, r4, #0 + bl ov76_0223BC70 + ldr r1, _0223DC88 ; =0x00000418 + add r0, r4, #0 + ldr r1, [r4, r1] + bl ov76_0223BA90 + add r0, r4, #0 + bl ov76_0223BB04 + add r0, r4, #0 + bl ov76_0223BBAC + add r0, r4, #0 + bl ov76_0223CC8C + ldr r0, _0223DC8C ; =0x000006C5 + bl sub_02005748 +_0223DAC2: + ldr r0, _0223DC90 ; =0x00000404 + add r1, r6, #0 + ldr r0, [r4, r0] + bl ov76_0223D94C + pop {r4, r5, r6, pc} +_0223DACE: + cmp r6, #0 + bne _0223DB10 + ldr r1, _0223DC88 ; =0x00000418 + ldr r0, [r4, r1] + add r0, r0, #1 + str r0, [r4, r1] + ldr r0, [r4, r1] + add r1, r1, #4 + ldr r1, [r4, r1] + bl sub_020E1F6C + ldr r0, _0223DC88 ; =0x00000418 + str r1, [r4, r0] + add r0, r4, #0 + bl ov76_0223BC70 + ldr r1, _0223DC88 ; =0x00000418 + add r0, r4, #0 + ldr r1, [r4, r1] + bl ov76_0223BA90 + add r0, r4, #0 + bl ov76_0223BB04 + add r0, r4, #0 + bl ov76_0223BBAC + add r0, r4, #0 + bl ov76_0223CC8C + ldr r0, _0223DC8C ; =0x000006C5 + bl sub_02005748 +_0223DB10: + ldr r0, _0223DC94 ; =0x00000408 + add r1, r6, #0 + ldr r0, [r4, r0] + bl ov76_0223D94C + pop {r4, r5, r6, pc} +_0223DB1C: + cmp r6, #0 + bne _0223DB3E + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #5 + beq _0223DB34 + mov r1, #5 + str r1, [r4, r0] + ldr r0, _0223DC98 ; =0x000005DD + bl sub_02005748 +_0223DB34: + ldr r0, _0223DC9C ; =0x0000040C + mov r1, #0 + ldr r0, [r4, r0] + bl ov76_0223DA00 +_0223DB3E: + ldr r0, _0223DC9C ; =0x0000040C + add r1, r6, #0 + ldr r0, [r4, r0] + bl ov76_0223D94C + pop {r4, r5, r6, pc} +_0223DB4A: + cmp r6, #0 + bne _0223DB7A + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #6 + beq _0223DB6A + mov r1, #6 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DCB8 + ldr r0, _0223DCA0 ; =0x000005E2 + bl sub_02005748 +_0223DB6A: + mov r0, #0x41 + mov r1, #0x8e + lsl r0, r0, #4 + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + bl ov76_0223DA00 +_0223DB7A: + mov r0, #0x41 + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, r6, #0 + bl ov76_0223D94C + pop {r4, r5, r6, pc} +_0223DB88: + cmp r6, #0 + bne _0223DBB6 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #7 + beq _0223DBA8 + mov r1, #7 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DCB8 + ldr r0, _0223DC98 ; =0x000005DD + bl sub_02005748 +_0223DBA8: + ldr r0, _0223DCA4 ; =0x00000414 + mov r1, #0x8f + lsl r1, r1, #2 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + bl ov76_0223DA00 +_0223DBB6: + ldr r0, _0223DCA4 ; =0x00000414 + add r1, r6, #0 + ldr r0, [r4, r0] + bl ov76_0223D94C + pop {r4, r5, r6, pc} +_0223DBC2: + cmp r6, #0 + bne _0223DC84 + add r0, r4, #0 + bl ov76_0223B2F8 + cmp r0, #0 + bne _0223DBE2 + ldr r0, _0223DCA8 ; =0x000005F2 + bl sub_02005748 + add r4, #0xec + add r0, r4, #0 + mov r1, #0xf + bl ov76_0223CA30 + pop {r4, r5, r6, pc} +_0223DBE2: + mov r0, #0x42 + lsl r0, r0, #4 + add r6, r4, r0 + ldrb r1, [r6, r5] + cmp r1, #0 + beq _0223DC38 + ldr r0, [r4, #0x64] + sub r1, r1, #1 + bl sub_0202CA90 + cmp r0, #0 + beq _0223DC38 + lsl r1, r5, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl ov76_0223B278 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] + ldrb r0, [r6, r5] + bl sub_02098164 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0xec + bl ov76_0223CDC4 + ldr r0, [r4, #0] + mov r2, #0 + ldrb r1, [r6, r5] + ldr r0, [r0, #0x20] + mvn r2, r2 + bl sub_0202CAE0 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223CD20 + ldr r0, _0223DCAC ; =0x000005EB + bl sub_02005748 + pop {r4, r5, r6, pc} +_0223DC38: + ldrb r0, [r6, r5] + cmp r0, #0 + beq _0223DC84 + ldr r0, _0223DCA8 ; =0x000005F2 + bl sub_02005748 + add r4, #0xec + add r0, r4, #0 + mov r1, #0x10 + bl ov76_0223CA30 + pop {r4, r5, r6, pc} +_0223DC50: + cmp r6, #0 + bne _0223DC84 + sub r5, #0xd + lsl r2, r5, #0x18 + add r0, r4, #0 + lsr r2, r2, #0x18 + bl ov76_0223B5C4 + lsl r0, r5, #4 + add r1, r4, r0 + mov r0, #0xca + lsl r0, r0, #2 + ldrb r0, [r1, r0] + bl sub_02098164 + add r4, #0xec + add r1, r0, #0 + add r0, r4, #0 + bl ov76_0223CDC4 + ldr r0, _0223DCAC ; =0x000005EB + bl sub_02005748 + pop {r4, r5, r6, pc} +_0223DC80: + bl sub_02022974 +_0223DC84: + pop {r4, r5, r6, pc} + nop +_0223DC88: .word 0x00000418 +_0223DC8C: .word 0x000006C5 +_0223DC90: .word 0x00000404 +_0223DC94: .word 0x00000408 +_0223DC98: .word 0x000005DD +_0223DC9C: .word 0x0000040C +_0223DCA0: .word 0x000005E2 +_0223DCA4: .word 0x00000414 +_0223DCA8: .word 0x000005F2 +_0223DCAC: .word 0x000005EB + thumb_func_end ov76_0223DA34 + + thumb_func_start ov76_0223DCB0 +ov76_0223DCB0: ; 0x0223DCB0 + mov r1, #0x96 + lsl r1, r1, #2 + ldr r0, [r0, r1] + bx lr + thumb_func_end ov76_0223DCB0 + + thumb_func_start ov76_0223DCB8 +ov76_0223DCB8: ; 0x0223DCB8 + add r0, #0xd8 + str r1, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov76_0223DCB8 + + thumb_func_start ov76_0223DCC0 +ov76_0223DCC0: ; 0x0223DCC0 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + add r1, sp, #0x10 + mov r0, #0 + strb r0, [r1] + strb r0, [r1, #1] + strb r0, [r1, #2] + mov r7, #0x1d + lsl r7, r7, #4 + strb r0, [r1, #3] + ldr r1, _0223DD7C ; =0x0223EE44 + ldr r2, [sp, #4] + add r3, r7, #1 + add r4, r7, #2 + add r5, r7, #3 +_0223DCE0: + ldrb r6, [r1] + add r0, r0, #1 + strb r6, [r2, r7] + ldrb r6, [r1, #1] + strb r6, [r2, r3] + ldrb r6, [r1, #2] + strb r6, [r2, r4] + ldrb r6, [r1, #3] + add r1, r1, #4 + strb r6, [r2, r5] + add r2, r2, #4 + cmp r0, #0xd + blt _0223DCE0 + cmp r0, #0x15 + bge _0223DD5A + mov r3, #0x1d + ldr r2, [sp, #4] + lsl r3, r3, #4 + add r2, r2, r3 + lsl r4, r0, #2 + ldr r1, [sp, #4] + ldr r3, [sp, #4] + add r1, r1, r4 + add r2, r2, r4 + lsl r4, r0, #4 + add r5, sp, #0xc + add r3, r3, r4 + ldrb r4, [r5, #4] + strb r4, [r5] + ldrb r4, [r5, #5] + strb r4, [r5, #1] + ldrb r4, [r5, #6] + strb r4, [r5, #2] + ldrb r4, [r5, #7] + strb r4, [r5, #3] + ldrb r4, [r5, #2] + ldrb r6, [r5] + ldrb r7, [r5, #1] + str r4, [sp, #8] + ldrb r4, [r5, #3] + mov ip, r4 +_0223DD32: + mov r4, #0x1d + lsl r4, r4, #4 + strb r6, [r1, r4] + add r4, r4, #1 + strb r7, [r1, r4] + ldr r5, _0223DD80 ; =0x000001D2 + ldr r4, [sp, #8] + add r0, r0, #1 + strb r4, [r1, r5] + add r5, r5, #1 + mov r4, ip + strb r4, [r1, r5] + mov r4, #0x26 + lsl r4, r4, #4 + str r2, [r3, r4] + add r1, r1, #4 + add r2, r2, #4 + add r3, #0x10 + cmp r0, #0x15 + blt _0223DD32 +_0223DD5A: + mov r0, #0x35 + str r0, [sp] + mov r1, #0x1d + ldr r0, [sp, #4] + lsl r1, r1, #4 + add r0, r0, r1 + ldr r2, _0223DD84 ; =ov76_0223DA34 + ldr r3, [sp, #4] + mov r1, #0x15 + bl sub_02023FCC + mov r2, #0x73 + ldr r1, [sp, #4] + lsl r2, r2, #2 + str r0, [r1, r2] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223DD7C: .word 0x0223EE44 +_0223DD80: .word 0x000001D2 +_0223DD84: .word ov76_0223DA34 + thumb_func_end ov76_0223DCC0 + + thumb_func_start ov76_0223DD88 +ov76_0223DD88: ; 0x0223DD88 + push {r4, r5, r6, lr} + sub sp, #0x48 + ldr r1, _0223DDF4 ; =0x00000428 + add r5, r0, #0 + ldr r1, [r5, r1] + add r0, sp, #0x38 + mov r2, #2 + bl sub_02075EF4 + ldr r0, _0223DDF4 ; =0x00000428 + mov r1, #5 + ldr r0, [r5, r0] + mov r2, #0 + bl sub_02074470 + add r4, r0, #0 + ldr r0, _0223DDF4 ; =0x00000428 + mov r1, #2 + ldr r0, [r5, r0] + bl sub_020765AC + add r6, r0, #0 + mov r0, #0x6b + lsl r0, r0, #2 + str r6, [r5, r0] + ldr r0, _0223DDF8 ; =0x0000042C + lsl r2, r4, #0x10 + ldr r0, [r5, r0] + add r1, sp, #0x10 + lsr r2, r2, #0x10 + mov r3, #1 + bl sub_020789BC + ldr r0, _0223DDFC ; =0xFFFFFD80 + add r6, #0x30 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + add r0, sp, #0x10 + str r0, [sp, #8] + mov r0, #0x69 + str r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, sp, #0x38 + mov r2, #0xc0 + add r3, r6, #0 + bl sub_02007C34 + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r5, r1] + add sp, #0x48 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223DDF4: .word 0x00000428 +_0223DDF8: .word 0x0000042C +_0223DDFC: .word 0xFFFFFD80 + thumb_func_end ov76_0223DD88 + + thumb_func_start ov76_0223DE00 +ov76_0223DE00: ; 0x0223DE00 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0223DE4C ; =0x00000428 + mov r1, #5 + ldr r0, [r5, r0] + mov r2, #0 + bl sub_02074470 + add r4, r0, #0 + ldr r0, _0223DE4C ; =0x00000428 + ldr r0, [r5, r0] + bl sub_02075BCC + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02007B98 + mov r0, #2 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r2, #0x97 + str r0, [sp, #8] + ldr r0, _0223DE50 ; =0x0000042C + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0xb4 + lsl r3, r4, #0x10 + ldr r0, [r5, r0] + ldr r2, [r5, r2] + lsr r3, r3, #0x10 + bl sub_020789F4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223DE4C: .word 0x00000428 +_0223DE50: .word 0x0000042C + thumb_func_end ov76_0223DE00 + + thumb_func_start ov76_0223DE54 +ov76_0223DE54: ; 0x0223DE54 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xc + mov r2, #0 + bl sub_02007DEC + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xd + mov r2, #0 + bl sub_02007DEC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223DE54 + + thumb_func_start ov76_0223DE78 +ov76_0223DE78: ; 0x0223DE78 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xc + bl sub_020080C0 + mov r1, #1 + lsl r1, r1, #8 + cmp r0, r1 + bne _0223DE94 + mov r0, #0 + pop {r4, pc} +_0223DE94: + add r1, #0xa8 + ldr r0, [r4, r1] + mov r1, #0xc + bl sub_020080C0 + mov r2, #1 + lsl r2, r2, #8 + cmp r0, r2 + blt _0223DEC6 + add r0, r2, #0 + add r0, #0xa8 + ldr r0, [r4, r0] + mov r1, #0xc + bl sub_02007DEC + mov r0, #0x6a + lsl r0, r0, #2 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, r0] + add r2, #0xf3 + bl sub_02007DEC + mov r0, #0 + pop {r4, pc} +_0223DEC6: + add r2, #0xa8 + ldr r0, [r4, r2] + mov r1, #0xc + mov r2, #0x20 + bl sub_02008274 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xd + mov r2, #0x20 + bl sub_02008274 + mov r1, #0x6a + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, r1, #4 + ldr r1, [r4, r1] + bl sub_020087C8 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223DE78 + + thumb_func_start ov76_0223DEF4 +ov76_0223DEF4: ; 0x0223DEF4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xc + bl sub_020080C0 + cmp r0, #0 + bne _0223DF0C + mov r0, #0 + pop {r4, pc} +_0223DF0C: + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xc + bl sub_020080C0 + cmp r0, #0 + bgt _0223DF3C + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xc + mov r2, #0 + bl sub_02007DEC + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xd + mov r2, #0 + bl sub_02007DEC + mov r0, #0 + pop {r4, pc} +_0223DF3C: + mov r0, #0x6a + lsl r0, r0, #2 + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2c + bl sub_02008274 + mov r0, #0x6a + lsl r0, r0, #2 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, r0] + sub r2, #0x2d + bl sub_02008274 + mov r1, #0x6a + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, r1, #4 + ldr r1, [r4, r1] + bl sub_020087C8 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223DEF4 + + thumb_func_start ov76_0223DF70 +ov76_0223DF70: ; 0x0223DF70 + add r2, r1, #0 + mov r1, #0x6a + lsl r1, r1, #2 + ldr r0, [r0, r1] + ldr r3, _0223DF80 ; =sub_02007DEC + mov r1, #6 + bx r3 + nop +_0223DF80: .word sub_02007DEC + thumb_func_end ov76_0223DF70 + + thumb_func_start ov76_0223DF84 +ov76_0223DF84: ; 0x0223DF84 + mov r1, #0x6a + lsl r1, r1, #2 + ldr r3, _0223DF90 ; =sub_02007DC8 + ldr r0, [r0, r1] + bx r3 + nop +_0223DF90: .word sub_02007DC8 + thumb_func_end ov76_0223DF84 + + thumb_func_start ov76_0223DF94 +ov76_0223DF94: ; 0x0223DF94 + push {r4, r5, r6, r7, lr} + sub sp, #0xa4 + mov r1, #0xf5 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r2, [r4, r1] + cmp r2, #0xa + bhi _0223E014 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0223DFB0: ; jump table + .short _0223DFC6 - _0223DFB0 - 2 ; case 0 + .short _0223E00C - _0223DFB0 - 2 ; case 1 + .short _0223E082 - _0223DFB0 - 2 ; case 2 + .short _0223E0BA - _0223DFB0 - 2 ; case 3 + .short _0223E7C0 - _0223DFB0 - 2 ; case 4 + .short _0223E0DA - _0223DFB0 - 2 ; case 5 + .short _0223E42E - _0223DFB0 - 2 ; case 6 + .short _0223E49A - _0223DFB0 - 2 ; case 7 + .short _0223E6BC - _0223DFB0 - 2 ; case 8 + .short _0223E6F0 - _0223DFB0 - 2 ; case 9 + .short _0223E77C - _0223DFB0 - 2 ; case 10 +_0223DFC6: + mov r1, #0 + bl ov76_0223DCB8 + add r0, r4, #0 + ldr r1, _0223E304 ; =0x0000FFFF + add r0, #0xec + bl ov76_0223CA30 + add r0, r4, #0 + bl ov76_0223CB58 + add r0, r4, #0 + bl ov76_0223CC8C + add r0, r4, #0 + mov r1, #1 + mov r2, #4 + bl ov76_0223BD30 + add r0, r4, #0 + bl ov76_0223D338 + add r0, r4, #0 + bl ov76_0223D368 + mov r0, #0x26 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E00C: + bl ov76_0223DCB0 + cmp r0, #1 + bne _0223E016 +_0223E014: + b _0223E7C0 +_0223E016: + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #1 + mov r2, #3 + bl sub_02003178 + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E304 ; =0x0000FFFF + mov r1, #4 + bl sub_02003178 + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #7 + mov r1, #1 + bl sub_02019060 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223D2F4 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223C568 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223B96C + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E082: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0223E180 + mov r0, #3 + mov r1, #1 + bl sub_02019060 + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #1 + mov r2, #2 + bl sub_02003178 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E0BA: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0223E180 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223DCB8 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E0DA: + add r2, r1, #0 + add r2, #8 + ldr r2, [r4, r2] + cmp r2, #7 + bls _0223E0E6 + b _0223E3F4 +_0223E0E6: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0223E0F2: ; jump table + .short _0223E102 - _0223E0F2 - 2 ; case 0 + .short _0223E174 - _0223E0F2 - 2 ; case 1 + .short _0223E1CA - _0223E0F2 - 2 ; case 2 + .short _0223E22E - _0223E0F2 - 2 ; case 3 + .short _0223E27A - _0223E0F2 - 2 ; case 4 + .short _0223E2BE - _0223E0F2 - 2 ; case 5 + .short _0223E314 - _0223E0F2 - 2 ; case 6 + .short _0223E388 - _0223E0F2 - 2 ; case 7 +_0223E102: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r3, #0 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E308 ; =0x0000080B + mov r1, #2 + bl sub_02003178 + mov r3, #0 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E304 ; =0x0000FFFF + mov r1, #8 + bl sub_02003178 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DCB8 + mov r0, #0x3e + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r4, #0 + bl ov76_0223D3CC + add r0, r4, #0 + bl ov76_0223DD88 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223DF70 + add r0, r4, #0 + add r0, #0xec + mov r1, #0xd + bl ov76_0223CA30 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E174: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + beq _0223E182 +_0223E180: + b _0223E7C0 +_0223E182: + mov r0, #0x35 + str r0, [sp, #0x80] + mov r1, #1 + mov r2, #0 + mov r0, #0xff + str r0, [sp, #0x88] + add r0, r4, #0 + str r1, [sp, #0x7c] + str r1, [sp, #0x94] + str r2, [sp, #0x84] + str r2, [sp, #0x90] + add r0, #0xdc + ldr r0, [r0, #0] + mov r1, #0x9b + str r0, [sp, #0x98] + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + str r0, [sp, #0x9c] + ldr r0, _0223E30C ; =0x00000428 + ldr r0, [r4, r0] + bl sub_02074470 + str r0, [sp, #0x8c] + add r0, sp, #0x7c + bl ov12_02237728 + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E1CA: + add r2, sp, #0x58 + mov r0, #0 + str r0, [r2, #0] + str r0, [r2, #4] + str r0, [r2, #8] + mov r0, #1 + str r0, [sp, #0x58] + add r0, r1, #0 + add r0, #0x54 + ldr r0, [r4, r0] + sub r1, #0x10 + str r0, [sp, #0x60] + ldr r0, [r4, r1] + add r1, r4, #0 + add r0, r0, #1 + str r0, [sp, #0x18] + add r0, sp, #0x64 + bl ov76_0223B848 + ldr r0, _0223E30C ; =0x00000428 + mov r1, #0xa2 + ldr r0, [r4, r0] + add r2, sp, #0x18 + bl sub_02074B30 + ldr r0, _0223E30C ; =0x00000428 + mov r1, #0xab + ldr r0, [r4, r0] + add r2, sp, #0x64 + bl sub_02074B30 + mov r0, #0x35 + add r1, sp, #0x58 + bl ov12_02236004 + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + bl ov12_02236320 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + mov r1, #0 + add r0, r0, #4 + str r1, [r4, r0] + b _0223E7C0 +_0223E22E: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_02236374 + cmp r0, #1 + bne _0223E2EA + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_02237810 + cmp r0, #1 + bne _0223E2EA + add r0, r4, #0 + bl ov76_0223DE78 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_022363B4 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DF70 + add r0, r4, #0 + bl ov76_0223DE54 + ldr r0, _0223E310 ; =0x000006C6 + bl sub_02005748 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E27A: + bl ov76_0223DE78 + add r5, r0, #0 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_022377F8 + cmp r0, #0 + bne _0223E2EA + cmp r5, #0 + bne _0223E2EA + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_0223783C + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + bl ov76_0223DE00 + mov r0, #0x3e + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + sub r1, r0, #4 + ldr r1, [r4, r1] + sub r0, r0, #4 + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E2BE: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_022363C4 + cmp r0, #0 + bne _0223E2EA + mov r0, #0x97 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_020160F4 + cmp r0, #1 + bne _0223E2EA + mov r0, #0x6a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02007C24 + cmp r0, #0 + beq _0223E2EC +_0223E2EA: + b _0223E7C0 +_0223E2EC: + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_02236428 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 + nop +_0223E304: .word 0x0000FFFF +_0223E308: .word 0x0000080B +_0223E30C: .word 0x00000428 +_0223E310: .word 0x000006C6 +_0223E314: + add r0, r1, #0 + add r0, #0xc + ldr r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #0 + add r0, #0xc + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0xc + ldr r0, [r4, r0] + cmp r0, #0x1e + blt _0223E402 + add r0, r1, #0 + mov r2, #0 + add r0, #0xc + str r2, [r4, r0] + mov r0, #0x35 + mov r3, #1 + str r0, [sp, #0x34] + mov r0, #5 + str r0, [sp, #0x38] + mov r0, #0xff + str r0, [sp, #0x3c] + add r0, r4, #0 + str r3, [sp, #0x30] + str r2, [sp, #0x44] + str r3, [sp, #0x48] + add r0, #0xdc + ldr r0, [r0, #0] + add r1, #0x54 + str r0, [sp, #0x4c] + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + str r0, [sp, #0x50] + ldr r0, [r4, r1] + mov r1, #0x9b + bl sub_02074470 + str r0, [sp, #0x40] + add r0, sp, #0x30 + bl ov12_02237728 + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r4, r1] + bl ov76_0223D3A0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E388: + bl ov76_0223DEF4 + add r5, r0, #0 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_022377F8 + cmp r0, #0 + bne _0223E402 + cmp r5, #0 + bne _0223E402 + mov r0, #0xa + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E6E8 ; =0x0000080B + mov r1, #2 + bl sub_02003178 + mov r0, #0xa + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E6EC ; =0x0000FFFF + mov r1, #8 + bl sub_02003178 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223DF70 + add r0, r4, #0 + bl ov76_0223DF84 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov12_0223783C + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E3F4: + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + beq _0223E404 +_0223E402: + b _0223E7C0 +_0223E404: + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + mov r1, #1 + bl ov76_0223DCB8 + mov r0, #0xf7 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r1, #4 + sub r0, #8 + str r1, [r4, r0] + add r0, r4, #0 + ldr r1, _0223E6EC ; =0x0000FFFF + add r0, #0xec + bl ov76_0223CA30 + b _0223E7C0 +_0223E42E: + add r0, #0xec + mov r1, #0xc + bl ov76_0223CA30 + add r0, r4, #0 + bl ov76_0223B78C + cmp r0, #1 + bne _0223E448 + mov r0, #0x26 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] +_0223E448: + add r0, r4, #0 + bl ov76_0223B808 + add r0, r4, #0 + bl ov76_0223C7E0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x28] + bl sub_0202CD88 + mov r1, #6 + bl sub_0202CFEC + mov r0, #0xf1 + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r0, #0xc + mul r0, r1 + add r2, r4, r0 + mov r0, #0x99 + lsl r0, r0, #2 + ldr r0, [r2, r0] + cmp r0, #0xff + beq _0223E490 + ldr r2, [r4, #0] + lsl r0, r0, #2 + add r0, r2, r0 + ldr r5, [r0, #4] + ldr r0, [r2, #0x20] + bl sub_0202CA28 + add r2, r0, #0 + add r0, r5, #0 + mov r1, #0xab + bl sub_02074B30 +_0223E490: + mov r0, #0xf5 + mov r1, #8 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223E7C0 +_0223E49A: + add r1, #8 + ldr r1, [r4, r1] + cmp r1, #5 + bhi _0223E524 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E4AE: ; jump table + .short _0223E4BA - _0223E4AE - 2 ; case 0 + .short _0223E518 - _0223E4AE - 2 ; case 1 + .short _0223E59C - _0223E4AE - 2 ; case 2 + .short _0223E5AE - _0223E4AE - 2 ; case 3 + .short _0223E616 - _0223E4AE - 2 ; case 4 + .short _0223E652 - _0223E4AE - 2 ; case 5 +_0223E4BA: + bl ov76_0223B78C + cmp r0, #0 + bne _0223E4CC + mov r0, #0xf5 + mov r1, #8 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223E7C0 +_0223E4CC: + mov r3, #0 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E6E8 ; =0x0000080B + mov r1, #2 + bl sub_02003178 + mov r3, #0 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E6EC ; =0x0000FFFF + mov r1, #8 + bl sub_02003178 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DCB8 + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E518: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + beq _0223E526 +_0223E524: + b _0223E7C0 +_0223E526: + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02003858 + mov r0, #1 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r2, #4 + add r0, r4, #0 + str r2, [sp, #8] + mov r1, #0x28 + str r1, [sp, #0xc] + add r0, #0xe4 + add r1, #0xe4 + ldr r0, [r0, #0] + add r1, r4, r1 + mov r3, #2 + bl ov76_0223CA98 + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r1, #0x19 + str r0, [sp, #0x1c] + mov r0, #4 + str r0, [sp, #0x20] + mov r0, #0xd4 + str r0, [sp, #0x24] + mov r0, #5 + str r0, [sp, #0x28] + add r0, sp, #0x10 + strb r1, [r0, #0x1c] + mov r1, #6 + strb r1, [r0, #0x1d] + mov r0, #0x35 + bl sub_02015920 + mov r1, #0x89 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + add r1, sp, #0x1c + bl sub_02015958 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0xe + bl ov76_0223CA30 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E59C: + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_0223E5AE: + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020159FC + cmp r0, #0 + beq _0223E65E + cmp r0, #1 + beq _0223E5C4 + cmp r0, #2 + bne _0223E65E +_0223E5C4: + mov r1, #0x3e + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02003858 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02015A54 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02015938 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl sub_0200E084 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E616: + mov r0, #0xa + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E6E8 ; =0x0000080B + mov r1, #2 + bl sub_02003178 + mov r0, #0xa + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E6EC ; =0x0000FFFF + mov r1, #8 + bl sub_02003178 + mov r0, #0xf7 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E652: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + beq _0223E660 +_0223E65E: + b _0223E7C0 +_0223E660: + mov r0, #0x3e + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0 + beq _0223E6AA + cmp r1, #1 + beq _0223E674 + cmp r1, #2 + beq _0223E6A4 + b _0223E6AA +_0223E674: + add r0, r4, #0 + bl ov76_0223D350 + add r0, r4, #0 + bl ov76_0223D384 + add r0, r4, #0 + bl ov76_0223CC8C + add r0, r4, #0 + bl ov76_0223B678 + add r0, r4, #0 + bl ov76_0223B208 + add r0, r4, #0 + mov r1, #1 + bl ov76_0223B69C + mov r0, #0xf5 + mov r1, #6 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223E6AA +_0223E6A4: + mov r1, #4 + sub r0, #0xc + str r1, [r4, r0] +_0223E6AA: + add r0, r4, #0 + mov r1, #1 + bl ov76_0223DCB8 + mov r0, #0xf7 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223E7C0 +_0223E6BC: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r3, #0 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #1 + mov r2, #2 + bl sub_02003178 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 + ; .align 2, 0 +_0223E6E8: .word 0x0000080B +_0223E6EC: .word 0x0000FFFF +_0223E6F0: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0223E7C0 + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + mov r1, #1 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + add r2, r1, #0 + bl sub_02003178 + mov r0, #0x10 + str r0, [sp] + mov r3, #0 + str r3, [sp, #4] + add r0, r4, #0 + str r3, [sp, #8] + add r0, #0xe8 + ldr r0, [r0, #0] + ldr r2, _0223E89C ; =0x0000FFFF + mov r1, #4 + bl sub_02003178 + mov r0, #3 + add r1, r0, #0 + bl sub_02019060 + mov r0, #7 + mov r1, #3 + bl sub_02019060 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223D2F4 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223C568 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223B96C + mov r1, #0 + add r0, r4, #0 + mvn r1, r1 + mov r2, #4 + bl ov76_0223BD30 + add r0, r4, #0 + mov r1, #0 + bl ov76_0223DCB8 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E7C0 +_0223E77C: + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_0200384C + cmp r0, #0 + bne _0223E7C0 + add r0, r4, #0 + bl ov76_0223DCB0 + cmp r0, #1 + beq _0223E7C0 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3F4 + mov r1, #0 + add r0, r4, #0 + mov r2, #0xff + add r3, r1, #0 + bl ov76_0223D494 + add r0, r4, #0 + add r0, #0xec + mov r1, #7 + bl ov76_0223CA30 + add r0, r4, #0 + bl ov76_0223CDA4 + add sp, #0xa4 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223E7C0: + add r0, r4, #0 + add r0, #0xd4 + ldr r5, [r0, #0] + cmp r5, #0xff + bne _0223E7D6 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0202404C + b _0223E87E +_0223E7D6: + add r0, sp, #0x14 + add r1, sp, #0x10 + bl sub_020227A4 + cmp r0, #0 + beq _0223E824 + lsl r6, r5, #4 + mov r0, #0xca + add r1, r4, r6 + lsl r0, r0, #2 + ldrb r0, [r1, r0] + bl sub_02098164 + add r1, r0, #0 + add r0, r4, #0 + add r0, #0xec + bl ov76_0223CDC4 + mov r0, #0xcb + ldr r2, [sp, #0x10] + add r1, r4, r6 + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r1, [sp, #0x14] + lsl r2, r2, #0x10 + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B758 + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B7D4 + b _0223E87E +_0223E824: + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B6C4 + lsl r6, r5, #4 + mov r2, #0x33 + add r1, r4, r6 + lsl r2, r2, #4 + add r7, r0, #0 + ldr r0, [r1, r2] + sub r2, r2, #4 + ldr r1, [r1, r2] + mov r2, #0 + bl ov76_0223B184 + cmp r7, #0 + bne _0223E866 + mov r1, #0xca + ldr r0, [r4, #0] + add r2, r4, r6 + lsl r1, r1, #2 + ldrb r1, [r2, r1] + ldr r0, [r0, #0x20] + mov r2, #1 + bl sub_0202CB20 + add r0, r4, #0 + bl ov76_0223CC8C + add r0, r4, #0 + add r1, r5, #0 + bl ov76_0223B704 +_0223E866: + ldr r0, _0223E8A0 ; =0x000005EA + bl sub_02005748 + add r0, r4, #0 + mov r1, #0xff + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + ldr r1, _0223E89C ; =0x0000FFFF + add r0, #0xec + bl ov76_0223CDC4 +_0223E87E: + add r0, r4, #0 + bl ov76_0223D318 + add r0, r4, #0 + bl ov76_0223C544 + add r0, r4, #0 + bl ov76_0223C304 + add r0, r4, #0 + bl ov76_0223C88C + mov r0, #1 + add sp, #0xa4 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E89C: .word 0x0000FFFF +_0223E8A0: .word 0x000005EA + thumb_func_end ov76_0223DF94 + + thumb_func_start ov76_0223E8A4 +ov76_0223E8A4: ; 0x0223E8A4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _0223E8BC + cmp r1, #1 + beq _0223E8C0 + cmp r1, #2 + beq _0223E8D0 + b _0223E90A +_0223E8BC: + add r1, r1, #1 + str r1, [r4, r0] +_0223E8C0: + bl ov76_0223CE64 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E90A +_0223E8D0: + bl sub_0200F2AC + cmp r0, #1 + bne _0223E90A + add r0, r4, #0 + add r0, #0xec + bl sub_0201A8FC + add r0, r4, #0 + bl ov76_0223C8BC + add r0, r4, #0 + bl ov76_0223C32C + add r0, r4, #0 + bl ov76_0223D31C + add r0, r4, #0 + bl ov76_0223C588 + add r0, r4, #0 + bl ov76_0223BC70 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02097F30 + mov r0, #0 + pop {r4, pc} +_0223E90A: + add r0, r4, #0 + bl ov76_0223C304 + add r0, r4, #0 + bl ov76_0223C88C + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov76_0223E8A4 + + thumb_func_start ov76_0223E91C +ov76_0223E91C: ; 0x0223E91C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + mov r0, #0 + add r4, r5, #4 + lsl r6, r1, #3 + str r0, [sp] + ldr r0, [r4, r6] + cmp r0, #0xff + beq _0223E940 + ldr r1, [r5, #0] + lsl r0, r0, #2 + add r0, r1, r0 + ldr r0, [r0, #4] + mov r1, #0xa2 + add r2, sp, #0 + bl sub_02074B30 +_0223E940: + mov r0, #0xff + str r0, [r4, r6] + add r0, r5, #0 + bl ov76_0223C7E0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov76_0223E91C + + thumb_func_start ov76_0223E950 +ov76_0223E950: ; 0x0223E950 + push {r4, lr} + mov r2, #0xf5 + add r4, r0, #0 + lsl r2, r2, #2 + ldr r1, [r4, r2] + cmp r1, #0 + beq _0223E968 + cmp r1, #1 + beq _0223E986 + cmp r1, #2 + beq _0223E996 + b _0223E9AA +_0223E968: + sub r2, #0x10 + ldr r1, [r4, r2] + bl ov76_0223E91C + add r0, r4, #0 + add r0, #0xec + mov r1, #9 + bl ov76_0223CA30 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + b _0223E9AA +_0223E986: + ldr r0, _0223E9BC ; =0x021BF67C + ldr r3, [r0, #0x48] + ldr r0, _0223E9C0 ; =0x00000CF3 + tst r0, r3 + beq _0223E9AA + add r0, r1, #1 + str r0, [r4, r2] + b _0223E9AA +_0223E996: + mov r1, #0 + mov r2, #0xff + add r3, r1, #0 + bl ov76_0223D494 + add r0, r4, #0 + add r0, #0xec + mov r1, #7 + bl ov76_0223CA30 +_0223E9AA: + add r0, r4, #0 + bl ov76_0223C304 + add r0, r4, #0 + bl ov76_0223C88C + mov r0, #1 + pop {r4, pc} + nop +_0223E9BC: .word 0x021BF67C +_0223E9C0: .word 0x00000CF3 + thumb_func_end ov76_0223E950 + + thumb_func_start ov76_0223E9C4 +ov76_0223E9C4: ; 0x0223E9C4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #3 + bls _0223E9D4 + b _0223EAFC +_0223E9D4: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223E9E0: ; jump table + .short _0223E9E8 - _0223E9E0 - 2 ; case 0 + .short _0223EA2A - _0223E9E0 - 2 ; case 1 + .short _0223EAB4 - _0223E9E0 - 2 ; case 2 + .short _0223EAC4 - _0223E9E0 - 2 ; case 3 +_0223E9E8: + sub r0, #0xe0 + ldr r0, [r4, r0] + mov r1, #0x19 + bl sub_0200D474 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x14 + bl sub_0200D474 + mov r0, #0xbd + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D364 + add r0, r4, #0 + add r0, #0xec + mov r1, #0xa + bl ov76_0223CA30 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_0200D3F4 + mov r0, #0xf5 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_0223EA2A: + mov r0, #0xf2 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov76_0223D574 + cmp r0, #1 + bne _0223EA4A + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov76_0223D600 + ldr r0, _0223EB0C ; =0x000005DC + bl sub_02005748 + b _0223EAFC +_0223EA4A: + ldr r0, _0223EB10 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + beq _0223EA88 + mov r2, #0xf1 + lsl r2, r2, #2 + ldr r1, [r4, r2] + add r2, r2, #4 + ldr r2, [r4, r2] + add r0, r4, #0 + bl ov76_0223C80C + mov r1, #1 + add r0, r4, #0 + add r2, r1, #0 + bl ov76_0223D600 + add r0, r4, #0 + add r0, #0xec + mov r1, #0xb + bl ov76_0223CA30 + mov r0, #0xf5 + mov r1, #2 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _0223EB0C ; =0x000005DC + bl sub_02005748 + b _0223EAFC +_0223EA88: + mov r0, #2 + tst r0, r1 + beq _0223EAFC + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + bl ov76_0223D600 + mov r0, #0xf5 + mov r1, #3 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _0223EB14 ; =0x000005DD + bl sub_02005748 + b _0223EAFC +_0223EAB4: + ldr r1, _0223EB10 ; =0x021BF67C + ldr r2, [r1, #0x48] + ldr r1, _0223EB18 ; =0x00000CF3 + tst r1, r2 + beq _0223EAFC + mov r1, #3 + str r1, [r4, r0] + b _0223EAFC +_0223EAC4: + sub r0, #0xe0 + ldr r0, [r4, r0] + mov r1, #0x14 + bl sub_0200D474 + mov r0, #0xbe + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x19 + bl sub_0200D474 + mov r1, #0 + add r0, r4, #0 + mov r2, #0xff + add r3, r1, #0 + bl ov76_0223D494 + mov r0, #0xbd + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200D364 + add r0, r4, #0 + add r0, #0xec + mov r1, #7 + bl ov76_0223CA30 +_0223EAFC: + add r0, r4, #0 + bl ov76_0223C304 + add r0, r4, #0 + bl ov76_0223C88C + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_0223EB0C: .word 0x000005DC +_0223EB10: .word 0x021BF67C +_0223EB14: .word 0x000005DD +_0223EB18: .word 0x00000CF3 + thumb_func_end ov76_0223E9C4 + + thumb_func_start ov76_0223EB1C +ov76_0223EB1C: ; 0x0223EB1C + mov r0, #0 + bx lr + thumb_func_end ov76_0223EB1C + + thumb_func_start ov76_0223EB20 +ov76_0223EB20: ; 0x0223EB20 + push {r3, lr} + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _0223EB4C ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _0223EB50 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + pop {r3, pc} + ; .align 2, 0 +_0223EB4C: .word 0xFFFFE0FF +_0223EB50: .word 0x04001000 + thumb_func_end ov76_0223EB20 + + thumb_func_start ov76_0223EB54 +ov76_0223EB54: ; 0x0223EB54 + push {r3, lr} + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + pop {r3, pc} + thumb_func_end ov76_0223EB54 + + thumb_func_start ov76_0223EB64 +ov76_0223EB64: ; 0x0223EB64 + push {r4, r5, lr} + sub sp, #0xfc + add r4, r0, #0 + bl sub_0201FF00 + ldr r5, _0223EC9C ; =0x0223EE1C + add r3, sp, #0x10 + mov r2, #5 +_0223EB74: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223EB74 + add r0, sp, #0x10 + bl sub_0201FE94 + mov r1, #6 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x62 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + mov r1, #0x19 + mov r2, #1 + mov r0, #0 + lsl r1, r1, #0x16 + lsl r2, r2, #0x12 + bl sub_020C4B4C + mov r1, #0x66 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x14 + lsl r2, r2, #0x10 + bl sub_020C4B4C + ldr r5, _0223ECA0 ; =0x0223EDF4 + add r3, sp, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223ECA4 ; =0x0223EE78 + add r3, sp, #0xa8 + mov r2, #0xa +_0223EBD4: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223EBD4 + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + add r2, sp, #0xa8 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + add r2, sp, #0xc4 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + add r2, sp, #0xe0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + ldr r1, _0223ECA8 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r2, r0 + strh r2, [r1] + add r1, r0, #0 + bl sub_0201FF0C + ldr r5, _0223ECAC ; =0x0223EECC + add r3, sp, #0x38 + mov r2, #0xe +_0223EC36: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223EC36 + add r0, r4, #0 + mov r1, #4 + add r2, sp, #0x38 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #5 + add r2, sp, #0x54 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #6 + add r2, sp, #0x70 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #7 + add r2, sp, #0x8c + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #5 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #6 + bl sub_02019EBC + add r0, r4, #0 + mov r1, #7 + bl sub_02019EBC + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + add sp, #0xfc + pop {r4, r5, pc} + nop +_0223EC9C: .word 0x0223EE1C +_0223ECA0: .word 0x0223EDF4 +_0223ECA4: .word 0x0223EE78 +_0223ECA8: .word 0x04000008 +_0223ECAC: .word 0x0223EECC + thumb_func_end ov76_0223EB64 + + thumb_func_start ov76_0223ECB0 +ov76_0223ECB0: ; 0x0223ECB0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x69 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02008A94 + bl sub_0201DCAC + bl sub_0200C800 + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + bl sub_02003694 + add r4, #0xe4 + ldr r0, [r4, #0] + bl sub_0201C2B8 + ldr r3, _0223ECE8 ; =0x027E0000 + ldr r1, _0223ECEC ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_0223ECE8: .word 0x027E0000 +_0223ECEC: .word 0x00003FF8 + thumb_func_end ov76_0223ECB0 + + .rodata + + + .global Unk_ov76_0223EDF4 +Unk_ov76_0223EDF4: ; 0x0223EDF4 + .incbin "incbin/overlay76_rodata.bin", 0x104, 0x114 - 0x104 + + .global Unk_ov76_0223EE04 +Unk_ov76_0223EE04: ; 0x0223EE04 + .incbin "incbin/overlay76_rodata.bin", 0x114, 0x12C - 0x114 + + .global Unk_ov76_0223EE1C +Unk_ov76_0223EE1C: ; 0x0223EE1C + .incbin "incbin/overlay76_rodata.bin", 0x12C, 0x154 - 0x12C + + .global Unk_ov76_0223EE44 +Unk_ov76_0223EE44: ; 0x0223EE44 + .incbin "incbin/overlay76_rodata.bin", 0x154, 0x188 - 0x154 + + .global Unk_ov76_0223EE78 +Unk_ov76_0223EE78: ; 0x0223EE78 + .incbin "incbin/overlay76_rodata.bin", 0x188, 0x1DC - 0x188 + + .global Unk_ov76_0223EECC +Unk_ov76_0223EECC: ; 0x0223EECC + .incbin "incbin/overlay76_rodata.bin", 0x1DC, 0x24C - 0x1DC + + .global Unk_ov76_0223EF3C +Unk_ov76_0223EF3C: ; 0x0223EF3C + .incbin "incbin/overlay76_rodata.bin", 0x24C, 0x28 + diff --git a/asm/ov77_021D0D80.s b/asm/ov77_021D0D80.s new file mode 100644 index 000000000..6f05fc61f --- /dev/null +++ b/asm/ov77_021D0D80.s @@ -0,0 +1,3005 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov77_021D0D80 +ov77_021D0D80: ; 0x021D0D80 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + ldr r1, _021D0E20 ; =0x04001050 + mov r0, #0 + strh r0, [r1] + ldr r1, _021D0E24 ; =0x04000050 + strh r0, [r1] + add r1, r0, #0 + bl sub_02017798 + mov r0, #0 + add r1, r0, #0 + bl sub_020177BC + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D0E28 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D0E2C ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + mov r2, #1 + mov r0, #3 + mov r1, #0x1e + lsl r2, r2, #0x12 + bl sub_02017FC8 + ldr r1, _021D0E30 ; =0x00000504 + add r0, r4, #0 + mov r2, #0x1e + bl sub_0200681C + ldr r2, _021D0E30 ; =0x00000504 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x1e + str r0, [r4, #0] + ldr r0, _021D0E34 ; =0x000004EC + mov r1, #0 + strh r1, [r4, r0] + add r0, #0x10 + str r1, [r4, r0] + bl ov77_021D1184 + add r0, r4, #0 + bl ov77_021D17B4 + add r0, r4, #0 + bl ov77_021D11CC + ldr r0, _021D0E38 ; =ov77_021D1178 + add r1, r4, #0 + bl sub_02017798 + bl sub_0201FFD0 + mov r0, #1 + pop {r4, pc} + nop +_021D0E20: .word 0x04001050 +_021D0E24: .word 0x04000050 +_021D0E28: .word 0xFFFFE0FF +_021D0E2C: .word 0x04001000 +_021D0E30: .word 0x00000504 +_021D0E34: .word 0x000004EC +_021D0E38: .word ov77_021D1178 + thumb_func_end ov77_021D0D80 + + thumb_func_start ov77_021D0E3C +ov77_021D0E3C: ; 0x021D0E3C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #6 + bhi _021D0E7A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D0E5A: ; jump table + .short _021D0E68 - _021D0E5A - 2 ; case 0 + .short _021D0EB8 - _021D0E5A - 2 ; case 1 + .short _021D0ED8 - _021D0E5A - 2 ; case 2 + .short _021D0EEE - _021D0E5A - 2 ; case 3 + .short _021D0FBC - _021D0E5A - 2 ; case 4 + .short _021D1078 - _021D0E5A - 2 ; case 5 + .short _021D10BC - _021D0E5A - 2 ; case 6 +_021D0E68: + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D1A60 + cmp r0, #1 + beq _021D0E7C +_021D0E7A: + b _021D10DC +_021D0E7C: + mov r1, #0x8e + ldr r2, _021D10E4 ; =0x021BF67C + mov r0, #0 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r1, [r2, #0x6c] + cmp r1, #0 + bne _021D0EA6 + mov r2, #0x4f + mov r1, #0x1e + lsl r2, r2, #4 + str r1, [r4, r2] + add r1, r2, #0 + mov r3, #1 + sub r1, #0x18 + str r3, [r4, r1] + sub r2, #0x14 + str r0, [r4, r2] + mov r0, #2 + str r0, [r5, #0] + b _021D10DC +_021D0EA6: + mov r1, #0x4f + lsl r1, r1, #4 + str r0, [r4, r1] + str r0, [r2, #0x6c] + mov r0, #1 + sub r1, #0x14 + str r0, [r4, r1] + str r0, [r5, #0] + b _021D10DC +_021D0EB8: + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D1DF0 + cmp r0, #1 + bne _021D0F9E + mov r0, #0x8e + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #2 + str r0, [r5, #0] + b _021D10DC +_021D0ED8: + mov r0, #0 + bl sub_02004234 + mov r0, #1 + ldr r1, _021D10E8 ; =0x00000495 + add r2, r0, #0 + bl sub_02004550 + mov r0, #3 + str r0, [r5, #0] + b _021D10DC +_021D0EEE: + mov r0, #0x4f + lsl r0, r0, #4 + ldr r1, [r4, r0] + cmp r1, #0 + beq _021D0F12 + sub r1, r1, #1 + str r1, [r4, r0] + mov r1, #0 + sub r0, #0x60 + str r1, [r4, r0] + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D20E4 + b _021D10DC +_021D0F12: + mov r1, #1 + sub r0, #0x60 + str r1, [r4, r0] + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D20E4 + ldr r1, _021D10EC ; =0x000004FC + ldr r2, _021D10E4 ; =0x021BF67C + ldr r0, [r4, r1] + add r0, r0, #1 + str r0, [r4, r1] + ldr r3, [r2, #0x48] + mov r0, #1 + add r6, r3, #0 + and r6, r0 + cmp r6, #1 + beq _021D0F44 + mov r6, #8 + and r3, r6 + cmp r3, #8 + bne _021D0F68 +_021D0F44: + ldr r0, _021D10F0 ; =0x000004EC + mov r1, #1 + strh r1, [r4, r0] + mov r0, #0 + mov r1, #0x3c + bl sub_0200564C + ldr r0, _021D10F4 ; =0x000001E7 + mov r1, #1 + bl sub_02005844 + ldr r0, [r4, #4] + ldr r1, [r4, #0] + bl ov77_021D1D48 + mov r0, #4 + str r0, [r5, #0] + b _021D10DC +_021D0F68: + ldr r6, [r2, #0x44] + mov r3, #0x46 + and r3, r6 + cmp r3, #0x46 + bne _021D0F94 + mov r2, #2 + sub r1, #0x10 + strh r2, [r4, r1] + mov r1, #6 + str r1, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0] + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #6 + str r0, [r5, #0] + b _021D10DC +_021D0F94: + mov r3, #0xe1 + ldr r6, [r4, r1] + lsl r3, r3, #2 + cmp r6, r3 + bgt _021D0FA0 +_021D0F9E: + b _021D10DC +_021D0FA0: + mov r3, #3 + sub r1, #0x10 + strh r3, [r4, r1] + mov r1, #0 + str r0, [r2, #0x6c] + bl sub_0201FF74 + mov r0, #0 + mov r1, #0x3c + bl sub_0200564C + mov r0, #5 + str r0, [r5, #0] + b _021D10DC +_021D0FBC: + mov r0, #0x49 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D20E4 + mov r0, #5 + lsl r0, r0, #8 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0xa + bne _021D0FFA + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r3, _021D10F8 ; =0x00007FFF + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 +_021D0FFA: + bl sub_0200598C + cmp r0, #0 + bne _021D10DC + bl sub_0200F2AC + cmp r0, #1 + bne _021D10DC + mov r0, #5 + lsl r0, r0, #8 + ldr r1, [r4, r0] + cmp r1, #0xa + blt _021D10DC + sub r0, #0x6b + mov r1, #0 + bl sub_020055D0 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + mov r0, #6 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r4, #0] + ldr r3, _021D10F8 ; =0x00007FFF + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #6 + str r0, [r5, #0] + b _021D10DC +_021D1078: + mov r0, #0x49 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D20E4 + bl sub_02005684 + cmp r0, #0 + bne _021D10DC + ldr r0, _021D10E8 ; =0x00000495 + mov r1, #0 + bl sub_020055D0 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r3, _021D10F8 ; =0x00007FFF + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + mov r0, #6 + str r0, [r5, #0] + b _021D10DC +_021D10BC: + bl sub_0200F2AC + cmp r0, #1 + bne _021D10DC + mov r0, #0x8e + lsl r0, r0, #2 + ldr r1, [r4, #4] + ldr r2, [r4, #0] + add r0, r4, r0 + bl ov77_021D21C0 + cmp r0, #1 + bne _021D10DC + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D10DC: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021D10E4: .word 0x021BF67C +_021D10E8: .word 0x00000495 +_021D10EC: .word 0x000004FC +_021D10F0: .word 0x000004EC +_021D10F4: .word 0x000001E7 +_021D10F8: .word 0x00007FFF + thumb_func_end ov77_021D0E3C + + thumb_func_start ov77_021D10FC +ov77_021D10FC: ; 0x021D10FC + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + bl sub_0200682C + add r6, r0, #0 + ldr r0, _021D1164 ; =0x000004EC + ldr r4, [r6, #0] + ldrh r5, [r6, r0] + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + add r0, r6, #0 + bl ov77_021D11FC + add r0, r6, #0 + bl ov77_021D1908 + add r0, r7, #0 + bl sub_02006830 + add r0, r4, #0 + bl sub_0201807C + cmp r5, #1 + beq _021D1138 + cmp r5, #2 + beq _021D1144 + cmp r5, #3 + beq _021D1150 +_021D1138: + mov r0, #0 + ldr r1, _021D1168 ; =0x020F8AB4 + mvn r0, r0 + bl sub_02000EC4 + b _021D115E +_021D1144: + mov r0, #0 + ldr r1, _021D116C ; =0x020F8A48 + mvn r0, r0 + bl sub_02000EC4 + b _021D115E +_021D1150: + mov r0, #0 + bl sub_02004234 + ldr r0, _021D1170 ; =0x0000004D + ldr r1, _021D1174 ; =0x021D788C + bl sub_02000EC4 +_021D115E: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1164: .word 0x000004EC +_021D1168: .word 0x020F8AB4 +_021D116C: .word 0x020F8A48 +_021D1170: .word 0x0000004D +_021D1174: .word 0x021D788C + thumb_func_end ov77_021D10FC + + thumb_func_start ov77_021D1178 +ov77_021D1178: ; 0x021D1178 + ldr r3, _021D1180 ; =sub_0201C2B8 + ldr r0, [r0, #4] + bx r3 + nop +_021D1180: .word sub_0201C2B8 + thumb_func_end ov77_021D1178 + + thumb_func_start ov77_021D1184 +ov77_021D1184: ; 0x021D1184 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D11A0 ; =0x021D7404 + add r3, sp, #0 + mov r2, #5 +_021D118E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D118E + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D11A0: .word 0x021D7404 + thumb_func_end ov77_021D1184 + + thumb_func_start ov77_021D11A4 +ov77_021D11A4: ; 0x021D11A4 + ldr r0, _021D11C8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + and r0, r1 + cmp r0, #1 + beq _021D11C0 + mov r0, #8 + and r0, r1 + cmp r0, #8 + beq _021D11C0 + mov r0, #4 + and r0, r1 + cmp r0, #4 + bne _021D11C4 +_021D11C0: + mov r0, #1 + bx lr +_021D11C4: + mov r0, #0 + bx lr + ; .align 2, 0 +_021D11C8: .word 0x021BF67C + thumb_func_end ov77_021D11A4 + + thumb_func_start ov77_021D11CC +ov77_021D11CC: ; 0x021D11CC + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #4 + mov r1, #0 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r4, #0] + mov r2, #1 + add r3, r1, #0 + bl sub_02024220 + str r0, [r4, #8] + ldr r1, _021D11F8 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + strh r0, [r1] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_021D11F8: .word 0x04000008 + thumb_func_end ov77_021D11CC + + thumb_func_start ov77_021D11FC +ov77_021D11FC: ; 0x021D11FC + ldr r3, _021D1204 ; =sub_020242C4 + ldr r0, [r0, #8] + bx r3 + nop +_021D1204: .word sub_020242C4 + thumb_func_end ov77_021D11FC + + thumb_func_start ov77_021D1208 +ov77_021D1208: ; 0x021D1208 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r3, #0 + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r0, #0x70 + add r1, r4, #0 + mov r2, #4 + bl sub_020182CC + mov r0, #0x30 + add r1, r6, #0 + add r2, r4, #0 + bl sub_02006AC0 + str r0, [r5, #0x5c] + mov r0, #0x30 + add r1, r7, #0 + add r2, r4, #0 + bl sub_02006AC0 + str r0, [r5, #0x60] + mov r0, #0x30 + mov r1, #2 + add r2, r4, #0 + bl sub_02006AC0 + add r1, r5, #0 + add r2, r5, #0 + str r0, [r5, #0x64] + add r0, r5, #4 + add r1, #0x58 + add r2, #0x5c + bl sub_0201CA3C + ldr r0, [r5, #0x60] + mov r1, #0 + bl sub_020B3C5C + add r6, r0, #0 + ldr r0, [r5, #0x64] + mov r1, #0 + bl sub_020B3C5C + add r7, r0, #0 + add r0, r5, #0 + ldr r2, [r5, #0x58] + add r0, #0x70 + add r1, r6, #0 + bl sub_020B2CB4 + str r0, [r5, #0x68] + add r0, r5, #0 + ldr r2, [r5, #0x58] + add r0, #0x70 + add r1, r7, #0 + bl sub_020B2CB4 + str r0, [r5, #0x6c] + ldr r0, [r5, #0x5c] + bl sub_020B3C1C + str r0, [sp] + ldr r0, [r5, #0x68] + ldr r2, [r5, #0x58] + ldr r3, [sp] + add r1, r6, #0 + bl sub_020AE4F0 + ldr r0, [r5, #0x6c] + ldr r2, [r5, #0x58] + ldr r3, [sp] + add r1, r7, #0 + bl sub_020AE4F0 + ldr r1, [r5, #0x68] + add r0, r5, #4 + bl sub_020AE77C + ldr r1, [r5, #0x6c] + add r0, r5, #4 + bl sub_020AE77C + add r3, r5, #0 + add r6, sp, #0x10 + mov r7, #0 + str r7, [r6, #0] + add r2, sp, #4 + str r7, [r6, #4] + str r7, [r2, #0] + str r7, [r6, #8] + str r7, [r2, #4] + ldmia r6!, {r0, r1} + str r7, [r2, #8] + add r3, #0x80 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + ldr r6, _021D12FC ; =0x021D72E4 + str r0, [r3, #0] + add r3, r5, #0 + ldmia r6!, {r0, r1} + add r3, #0x8c + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + add r3, r5, #0 + ldmia r2!, {r0, r1} + add r3, #0x98 + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + add r1, r4, #0 + str r0, [r3, #0] + add r0, r5, #0 + add r0, #0xac + str r7, [r0, #0] + add r0, r5, #0 + bl ov77_021D1300 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D12FC: .word 0x021D72E4 + thumb_func_end ov77_021D1208 + + thumb_func_start ov77_021D1300 +ov77_021D1300: ; 0x021D1300 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x30 + add r4, r1, #0 + bl sub_02006C24 + add r6, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r5, r0 + add r1, r6, #0 + mov r2, #0x13 + add r3, r4, #0 + bl sub_020170D8 + mov r0, #0x56 + lsl r0, r0, #2 + mov r2, #0x1f + ldr r0, [r5, r0] + mov r1, #1 + lsl r2, r2, #0x10 + bl sub_020B2D8C + mov r0, #0x56 + lsl r0, r0, #2 + mov r2, #0x3f + ldr r0, [r5, r0] + mov r1, #1 + lsl r2, r2, #0x18 + bl sub_020B2D8C + add r0, r5, #0 + mov r1, #0x4a + str r4, [sp] + add r0, #0x70 + lsl r1, r1, #2 + str r0, [sp, #4] + add r0, r5, r1 + add r1, #0x28 + add r1, r5, r1 + add r2, r6, #0 + mov r3, #0x15 + bl sub_02017164 + mov r0, #0x4a + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_02017240 + add r0, r5, #0 + mov r1, #0x4f + str r4, [sp] + add r0, #0x70 + lsl r1, r1, #2 + str r0, [sp, #4] + add r0, r5, r1 + add r1, #0x14 + add r1, r5, r1 + add r2, r6, #0 + mov r3, #0x14 + bl sub_02017164 + mov r0, #0x4f + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_02017240 + mov r1, #0x15 + add r0, r5, #0 + lsl r1, r1, #4 + add r0, #0xb0 + add r1, r5, r1 + bl sub_02017258 + mov r1, #0 + add r0, r5, #0 + add r0, #0xb0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02017350 + mov r1, #1 + lsl r1, r1, #0xc + add r0, r5, #0 + add r0, #0xb0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201736C + add r0, r5, #0 + add r0, #0xb0 + mov r1, #1 + bl sub_02017348 + mov r1, #0x4a + add r0, r5, #0 + lsl r1, r1, #2 + add r0, #0xb0 + add r1, r5, r1 + bl sub_0201727C + mov r1, #0x4f + add r0, r5, #0 + lsl r1, r1, #2 + add r0, #0xb0 + add r1, r5, r1 + bl sub_0201727C + mov r0, #2 + lsl r0, r0, #8 + add r0, r5, r0 + add r1, r6, #0 + mov r2, #0x10 + add r3, r4, #0 + bl sub_020170D8 + mov r0, #0x82 + lsl r0, r0, #2 + mov r2, #0x1f + ldr r0, [r5, r0] + mov r1, #1 + lsl r2, r2, #0x10 + bl sub_020B2D8C + mov r0, #0x82 + lsl r0, r0, #2 + mov r2, #0x3f + ldr r0, [r5, r0] + mov r1, #1 + lsl r2, r2, #0x18 + bl sub_020B2D8C + add r0, r5, #0 + mov r1, #0x76 + str r4, [sp] + add r0, #0x70 + lsl r1, r1, #2 + str r0, [sp, #4] + add r0, r5, r1 + add r1, #0x28 + add r1, r5, r1 + add r2, r6, #0 + mov r3, #0x12 + bl sub_02017164 + mov r0, #0x76 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_02017240 + add r0, r5, #0 + mov r1, #0x7b + str r4, [sp] + add r0, #0x70 + lsl r1, r1, #2 + str r0, [sp, #4] + add r0, r5, r1 + add r1, #0x14 + add r1, r5, r1 + add r2, r6, #0 + mov r3, #0x11 + bl sub_02017164 + mov r0, #0x7b + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #0 + bl sub_02017240 + mov r1, #0x16 + lsl r1, r1, #4 + add r0, r5, r1 + add r1, #0xa0 + add r1, r5, r1 + bl sub_02017258 + mov r1, #0 + mov r0, #0x16 + lsl r0, r0, #4 + add r0, r5, r0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02017350 + mov r0, #0x16 + mov r1, #1 + lsl r1, r1, #0xc + lsl r0, r0, #4 + add r0, r5, r0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201736C + mov r0, #0x16 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #1 + bl sub_02017348 + mov r1, #0x16 + lsl r1, r1, #4 + add r0, r5, r1 + add r1, #0x78 + add r1, r5, r1 + bl sub_0201727C + mov r1, #0x16 + lsl r1, r1, #4 + add r0, r5, r1 + add r1, #0x8c + add r1, r5, r1 + bl sub_0201727C + add r0, r6, #0 + bl sub_02006CA8 + mov r1, #0x85 + ldr r0, _021D14DC ; =0xFFFFFED2 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r2, _021D14E0 ; =0x0000E383 + add r0, r1, #4 + str r2, [r5, r0] + add r0, r1, #0 + mov r2, #1 + lsl r2, r2, #0xc + add r0, #8 + str r2, [r5, r0] + mov r0, #0x1e + lsl r0, r0, #0xa + add r1, #0xc + str r0, [r5, r1] + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D14DC: .word 0xFFFFFED2 +_021D14E0: .word 0x0000E383 + thumb_func_end ov77_021D1300 + + thumb_func_start ov77_021D14E4 +ov77_021D14E4: ; 0x021D14E4 + push {r4, lr} + add r4, r0, #0 + bl ov77_021D1514 + add r0, r4, #0 + ldr r1, [r4, #0x68] + add r0, #0x70 + bl sub_020B2CD8 + add r0, r4, #0 + ldr r1, [r4, #0x6c] + add r0, #0x70 + bl sub_020B2CD8 + ldr r0, [r4, #0x60] + bl sub_020181C4 + ldr r0, [r4, #0x64] + bl sub_020181C4 + ldr r0, [r4, #0x5c] + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov77_021D14E4 + + thumb_func_start ov77_021D1514 +ov77_021D1514: ; 0x021D1514 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_02017110 + mov r0, #0x4a + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x70 + bl sub_020171A0 + mov r0, #0x4f + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x70 + bl sub_020171A0 + mov r0, #2 + lsl r0, r0, #8 + add r0, r4, r0 + bl sub_02017110 + mov r0, #0x76 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x70 + bl sub_020171A0 + mov r0, #0x7b + lsl r0, r0, #2 + add r0, r4, r0 + add r4, #0x70 + add r1, r4, #0 + bl sub_020171A0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D1514 + + thumb_func_start ov77_021D1568 +ov77_021D1568: ; 0x021D1568 + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + ldr r6, _021D16F4 ; =0x021D73E0 + add r5, r0, #0 + add r4, r1, #0 + add r3, sp, #0 + mov r2, #4 +_021D1576: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D1576 + ldr r0, [r6, #0] + str r0, [r3, #0] + mov r0, #0x2a + lsl r0, r0, #4 + ldr r1, [r5, r0] + cmp r1, #0 + bne _021D15B6 + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #1 + bne _021D15B6 + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl ov77_021D25AC + add r1, r4, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + mov r0, #0 + bl sub_02020854 + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl sub_020203D4 + b _021D15CC +_021D15B6: + add r1, r4, #0 + add r1, #0xa4 + ldr r1, [r1, #0] + mov r0, #0 + bl sub_02020854 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_020203D4 +_021D15CC: + mov r0, #0xab + lsl r0, r0, #2 + ldr r1, [r5, r0] + add r1, r1, #2 + str r1, [r5, r0] + mov r1, #0x5a + ldr r0, [r5, r0] + lsl r1, r1, #2 + bl sub_020E1F6C + mov r0, #0xab + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r1, [r5, r0] + ldr r0, _021D16F8 ; =0x0000FFFF + mul r0, r1 + mov r1, #0x5a + lsl r1, r1, #2 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0201D250 + bl sub_020E01B8 + ldr r2, _021D16FC ; =0x33333333 + ldr r3, _021D1700 ; =0x3FD33333 + bl sub_020E0234 + bl sub_020E0088 + add r1, r4, #0 + add r1, #0x84 + ldr r1, [r1, #0] + sub r1, r1, r0 + add r0, r4, #0 + add r0, #0x84 + str r1, [r0, #0] + ldr r0, [r4, #0] + cmp r0, #0 + beq _021D16F0 + cmp r0, #1 + beq _021D162C + cmp r0, #2 + beq _021D1640 + add sp, #0x24 + pop {r3, r4, r5, r6, pc} +_021D162C: + bl sub_020241B4 + mov r0, #1 + add r1, r0, #0 + bl sub_020241BC + mov r0, #0 + add sp, #0x24 + str r0, [r4, #0] + pop {r3, r4, r5, r6, pc} +_021D1640: + bl sub_020241B4 + bl sub_020203EC + add r1, r4, #0 + add r0, sp, #0 + add r1, #0x98 + bl sub_0201E268 + mov r0, #0x2a + lsl r0, r0, #4 + ldr r1, [r5, r0] + cmp r1, #0 + bne _021D166C + add r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #1 + bne _021D1680 + add r0, r4, #0 + bl ov77_021D1704 + b _021D1680 +_021D166C: + bl sub_020C2BE8 + add r1, r4, #0 + add r3, r4, #0 + add r0, r4, #4 + add r1, #0x80 + add r2, sp, #0 + add r3, #0x8c + bl sub_0201CA74 +_021D1680: + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D1694 + cmp r0, #1 + beq _021D16A0 + cmp r0, #2 + beq _021D16B0 + b _021D16E8 +_021D1694: + ldr r0, [r4, #0x68] + mov r1, #0 + str r1, [r0, #0] + ldr r0, [r4, #0x6c] + str r1, [r0, #0] + b _021D16E8 +_021D16A0: + ldr r0, [r4, #0x68] + ldr r0, [r0, #0] + cmp r0, #0 + bne _021D16B0 + mov r0, #0 + add r4, #0xac + str r0, [r4, #0] + b _021D16E8 +_021D16B0: + ldr r2, [r4, #0x68] + mov r0, #1 + ldr r1, [r2, #0] + lsl r0, r0, #0xc + add r1, r1, r0 + str r1, [r2, #0] + ldr r2, [r4, #0x6c] + ldr r1, [r2, #0] + add r0, r1, r0 + str r0, [r2, #0] + ldr r2, [r4, #0x68] + ldr r0, [r2, #8] + ldr r1, [r2, #0] + ldrh r0, [r0, #4] + lsl r0, r0, #0xc + cmp r1, r0 + bne _021D16D6 + mov r0, #0 + str r0, [r2, #0] +_021D16D6: + ldr r2, [r4, #0x6c] + ldr r0, [r2, #8] + ldr r1, [r2, #0] + ldrh r0, [r0, #4] + lsl r0, r0, #0xc + cmp r1, r0 + bne _021D16E8 + mov r0, #0 + str r0, [r2, #0] +_021D16E8: + mov r0, #1 + add r1, r0, #0 + bl sub_020241BC +_021D16F0: + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D16F4: .word 0x021D73E0 +_021D16F8: .word 0x0000FFFF +_021D16FC: .word 0x33333333 +_021D1700: .word 0x3FD33333 + thumb_func_end ov77_021D1568 + + thumb_func_start ov77_021D1704 +ov77_021D1704: ; 0x021D1704 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x89 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + cmp r1, #1 + bne _021D172C + sub r0, #0xfc + mov r1, #1 + add r0, r4, r0 + lsl r1, r1, #0xc + bl sub_02017204 + cmp r0, #1 + bne _021D172C + mov r0, #0x89 + mov r1, #2 + lsl r0, r0, #2 + strb r1, [r4, r0] +_021D172C: + ldr r0, _021D17B0 ; =0x00000225 + ldrb r1, [r4, r0] + cmp r1, #1 + bne _021D174A + sub r0, #0xe9 + mov r1, #1 + add r0, r4, r0 + lsl r1, r1, #0xc + bl sub_02017204 + cmp r0, #1 + bne _021D174A + ldr r0, _021D17B0 ; =0x00000225 + mov r1, #2 + strb r1, [r4, r0] +_021D174A: + mov r0, #0x76 + lsl r0, r0, #2 + mov r1, #1 + add r0, r4, r0 + lsl r1, r1, #0xc + bl sub_020171CC + mov r0, #0x7b + lsl r0, r0, #2 + mov r1, #1 + add r0, r4, r0 + lsl r1, r1, #0xc + bl sub_020171CC + mov r1, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + mov r0, #0x16 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_02017294 + mov r0, #0x89 + lsl r0, r0, #2 + ldrb r1, [r4, r0] + cmp r1, #2 + bne _021D178C + add r0, r0, #1 + ldrb r0, [r4, r0] + cmp r0, #2 + beq _021D1796 +_021D178C: + add r4, #0xb0 + add r0, r4, #0 + bl sub_02017294 + b _021D17A0 +_021D1796: + add r4, #0xb0 + add r0, r4, #0 + mov r1, #0 + bl sub_02017348 +_021D17A0: + mov r2, #1 + mov r0, #0x12 + add r1, sp, #0 + str r2, [sp] + bl sub_020B275C + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_021D17B0: .word 0x00000225 + thumb_func_end ov77_021D1704 + + thumb_func_start ov77_021D17B4 +ov77_021D17B4: ; 0x021D17B4 + push {r3, r4, r5, lr} + sub sp, #0xb8 + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02018340 + add r3, sp, #0xa8 + ldr r5, _021D18EC ; =0x021D72F0 + str r0, [r4, #4] + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D18F0 ; =0x021D7354 + add r3, sp, #0x8c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D18F4 ; =0x021D7370 + add r3, sp, #0x70 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D18F8 ; =0x021D738C + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #6 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D18FC ; =0x021D73A8 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D1900 ; =0x021D7300 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D1904 ; =0x021D731C + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #7 + str r0, [r3, #0] + ldr r0, [r4, #4] + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + add sp, #0xb8 + pop {r3, r4, r5, pc} + nop +_021D18EC: .word 0x021D72F0 +_021D18F0: .word 0x021D7354 +_021D18F4: .word 0x021D7370 +_021D18F8: .word 0x021D738C +_021D18FC: .word 0x021D73A8 +_021D1900: .word 0x021D7300 +_021D1904: .word 0x021D731C + thumb_func_end ov77_021D17B4 + + thumb_func_start ov77_021D1908 +ov77_021D1908: ; 0x021D1908 + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #8 + mov r1, #0 + bl sub_0201FF74 + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #5 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #6 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #4] + mov r1, #7 + bl sub_02019044 + ldr r0, [r4, #4] + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov77_021D1908 + + thumb_func_start ov77_021D1984 +ov77_021D1984: ; 0x021D1984 + push {r3, r4, lr} + sub sp, #0x14 + mov r3, #0 + add r2, sp, #0 + strh r3, [r2] + add r4, r1, #0 + add r1, sp, #8 + strh r3, [r2, #2] + str r3, [r1, #0] + strh r3, [r2, #4] + str r3, [r1, #4] + strh r3, [r2, #6] + mov r2, #0x2a + str r3, [r1, #8] + lsl r2, r2, #4 + ldr r0, [r0, r2] + cmp r0, #1 + beq _021D1A54 + sub r2, #0x90 + ldr r0, [r4, r2] + cmp r0, #0x3c + bhs _021D19C0 + ldr r0, _021D1A58 ; =0xFFFFF600 + str r0, [sp, #0x10] + add r0, r1, #0 + add r1, r4, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + bl sub_02020990 +_021D19C0: + mov r1, #0x21 + lsl r1, r1, #4 + ldr r0, [r4, r1] + cmp r0, #0x4b + bne _021D19D6 + add r0, r1, #0 + mov r2, #1 + add r0, #0x14 + strb r2, [r4, r0] + add r1, #0x15 + strb r2, [r4, r1] +_021D19D6: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #0xfa + blo _021D1A4A + add r1, r4, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + add r0, sp, #0 + bl sub_02020A94 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r0, sp, #0 + strh r1, [r0] + add r1, r4, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + add r0, sp, #0 + bl sub_020209D4 + mov r1, #0x86 + lsl r1, r1, #2 + sub r0, r1, #4 + ldr r2, [r4, r1] + ldr r0, [r4, r0] + add r0, r2, r0 + str r0, [r4, r1] + ldr r2, [r4, r1] + ldr r0, _021D1A5C ; =0x0000C011 + cmp r2, r0 + bge _021D1A4A + str r0, [r4, r1] + add r1, #8 + ldr r0, [r4, r1] + add r1, r4, #0 + asr r0, r0, #8 + neg r0, r0 + add r1, #0xa8 + lsl r0, r0, #0x10 + ldr r1, [r1, #0] + lsr r0, r0, #0x10 + bl sub_0202094C + mov r1, #0x22 + lsl r1, r1, #4 + add r0, r1, #0 + ldr r2, [r4, r1] + add r0, #0x60 + sub r0, r2, r0 + str r0, [r4, r1] + mov r0, #1 + ldr r2, [r4, r1] + lsl r0, r0, #0xc + cmp r2, r0 + bge _021D1A4A + str r0, [r4, r1] +_021D1A4A: + mov r0, #0x21 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_021D1A54: + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_021D1A58: .word 0xFFFFF600 +_021D1A5C: .word 0x0000C011 + thumb_func_end ov77_021D1984 + + thumb_func_start ov77_021D1A60 +ov77_021D1A60: ; 0x021D1A60 + push {r3, r4, r5, r6, lr} + sub sp, #0x24 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + bl ov77_021D24C8 + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov77_021D2214 + add r0, r5, #4 + mov r1, #1 + mov r2, #0 + add r3, r4, #0 + bl ov77_021D1208 + ldr r0, _021D1BF0 ; =0x04000060 + ldr r2, _021D1BF4 ; =0xFFFFCFFF + ldrh r1, [r0] + add r3, r1, #0 + and r3, r2 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0] + and r2, r1 + mov r1, #8 + orr r1, r2 + strh r1, [r0] + mov r0, #0x9d + lsl r0, r0, #2 + add r1, r0, #0 + ldr r2, [r5, r0] + sub r1, #0x34 + str r2, [r5, r1] + add r1, r0, #4 + ldr r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x30 + str r2, [r5, r1] + add r1, r0, #0 + add r1, #8 + ldr r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x2c + str r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x18 + ldr r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x28 + str r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x14 + ldr r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x24 + str r2, [r5, r1] + add r1, r0, #0 + sub r1, #0x10 + ldr r1, [r5, r1] + sub r0, #0x20 + str r1, [r5, r0] + add r0, r4, #0 + bl sub_020203AC + add r1, r5, #0 + add r1, #0xa8 + str r0, [r1, #0] + mov r3, #0 + add r0, r5, #0 + mov r1, #9 + mov r2, #0xb6 + str r3, [sp] + add r0, #0xa8 + ldr r0, [r0, #0] + lsl r1, r1, #6 + str r0, [sp, #4] + add r0, r5, r1 + add r1, #0xc + add r1, r5, r1 + lsl r2, r2, #4 + bl sub_02020784 + add r2, r5, #0 + add r2, #0xa8 + mov r1, #0x4b + ldr r2, [r2, #0] + mov r0, #0 + lsl r1, r1, #0xe + bl sub_020206BC + add r1, r5, #0 + add r1, #0xa8 + ldr r1, [r1, #0] + mov r0, #0 + bl sub_02020854 + add r0, r5, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl sub_020203D4 + add r1, sp, #0x18 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r4, #0 + bl sub_020203AC + add r1, r5, #0 + add r1, #0xac + str r0, [r1, #0] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + mov r1, #0xa + str r0, [sp, #8] + ldr r2, _021D1BF8 ; =0x021D72C8 + ldr r3, _021D1BFC ; =0x00000FA4 + add r0, sp, #0x18 + lsl r1, r1, #0x10 + bl sub_020206D0 + add r2, r5, #0 + add r2, #0xac + mov r1, #0x4b + ldr r2, [r2, #0] + mov r0, #0 + lsl r1, r1, #0xe + bl sub_020206BC + ldr r4, _021D1C00 ; =0x021D72D8 + add r3, sp, #0xc + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + add r1, r5, #0 + str r0, [r3, #0] + add r1, #0xac + ldr r1, [r1, #0] + add r0, r2, #0 + bl sub_02020990 + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_020203D4 + mov r3, #0xa3 + lsl r3, r3, #2 + add r2, r3, #2 + ldrsh r1, [r5, r3] + add r3, r3, #4 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + mov r0, #0 + bl sub_020AF51C + ldr r1, _021D1C04 ; =0x00007FFF + mov r0, #0 + bl sub_020AF558 + ldr r3, _021D1C08 ; =0x00000292 + mov r0, #1 + add r2, r3, #2 + ldrsh r1, [r5, r3] + add r3, r3, #4 + ldrsh r2, [r5, r2] + ldrsh r3, [r5, r3] + bl sub_020AF51C + ldr r1, _021D1C04 ; =0x00007FFF + mov r0, #1 + bl sub_020AF558 + ldr r2, _021D1BF0 ; =0x04000060 + ldr r0, _021D1BF4 ; =0xFFFFCFFF + ldrh r1, [r2] + and r1, r0 + mov r0, #0x10 + orr r0, r1 + strh r0, [r2] + ldr r0, _021D1C0C ; =0x021BF6DC + mov r1, #1 + strb r1, [r0, #5] + bl sub_0201FFE8 + mov r0, #2 + str r0, [r5, #4] + mov r0, #1 + add sp, #0x24 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D1BF0: .word 0x04000060 +_021D1BF4: .word 0xFFFFCFFF +_021D1BF8: .word 0x021D72C8 +_021D1BFC: .word 0x00000FA4 +_021D1C00: .word 0x021D72D8 +_021D1C04: .word 0x00007FFF +_021D1C08: .word 0x00000292 +_021D1C0C: .word 0x021BF6DC + thumb_func_end ov77_021D1A60 + + thumb_func_start ov77_021D1C10 +ov77_021D1C10: ; 0x021D1C10 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xa + lsl r0, r0, #6 + ldr r1, [r4, r0] + sub r0, #0xc + ldr r0, [r4, r0] + sub r0, r1, r0 + mov r1, #0x3c + bl sub_020E1F6C + mov r1, #9 + lsl r1, r1, #6 + ldr r2, [r4, r1] + add r0, r2, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x44 + add r1, #0x38 + ldr r2, [r4, r0] + ldr r0, [r4, r1] + mov r1, #0x3c + sub r0, r2, r0 + bl sub_020E1F6C + mov r1, #0x91 + lsl r1, r1, #2 + ldr r2, [r4, r1] + add r0, r2, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x44 + add r1, #0x38 + ldr r2, [r4, r0] + ldr r0, [r4, r1] + mov r1, #0x3c + sub r0, r2, r0 + bl sub_020E1F6C + mov r1, #0x92 + lsl r1, r1, #2 + ldr r2, [r4, r1] + add r0, r2, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x20 + add r1, #0x14 + ldr r2, [r4, r0] + ldr r0, [r4, r1] + mov r1, #0x3c + sub r0, r2, r0 + bl sub_020E1F6C + mov r1, #0x93 + lsl r1, r1, #2 + ldr r2, [r4, r1] + add r0, r2, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x20 + add r1, #0x14 + ldr r2, [r4, r0] + ldr r0, [r4, r1] + mov r1, #0x3c + sub r0, r2, r0 + bl sub_020E1F6C + mov r1, #0x25 + lsl r1, r1, #4 + ldr r2, [r4, r1] + add r0, r2, r0 + str r0, [r4, r1] + add r0, r1, #0 + add r0, #0x20 + add r1, #0x14 + ldr r2, [r4, r0] + ldr r0, [r4, r1] + mov r1, #0x3c + sub r0, r2, r0 + bl sub_020E1F6C + mov r1, #0x95 + lsl r1, r1, #2 + ldr r2, [r4, r1] + add r0, r2, r0 + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D1C10 + + thumb_func_start ov77_021D1CC0 +ov77_021D1CC0: ; 0x021D1CC0 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r4, r1, #0 + mov r1, #5 + add r5, r0, #0 + bl sub_02019044 + ldr r6, _021D1D3C ; =0x021D73C4 + add r3, sp, #0x10 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r5, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x17 + add r2, r5, #0 + mov r3, #5 + str r4, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x19 + add r2, r5, #0 + mov r3, #5 + str r4, [sp, #0xc] + bl sub_02006E60 + ldr r0, _021D1D40 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + mov r3, #0xa + ldr r0, _021D1D44 ; =0x04001050 + mov r1, #2 + mov r2, #8 + str r3, [sp] + bl sub_020BF55C + mov r0, #2 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + nop +_021D1D3C: .word 0x021D73C4 +_021D1D40: .word 0x04000050 +_021D1D44: .word 0x04001050 + thumb_func_end ov77_021D1CC0 + + thumb_func_start ov77_021D1D48 +ov77_021D1D48: ; 0x021D1D48 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r5, r1, #0 + mov r1, #4 + add r4, r0, #0 + bl sub_02019044 + ldr r6, _021D1DE4 ; =0x021D7338 + add r3, sp, #0x10 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x16 + add r2, r4, #0 + mov r3, #4 + str r5, [sp, #0xc] + bl sub_02006E60 + ldr r0, _021D1DE8 ; =0x04001008 + mov r2, #3 + ldrh r1, [r0] + bic r1, r2 + strh r1, [r0] + ldrh r3, [r0, #2] + mov r1, #1 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #2] + ldrh r1, [r0, #4] + bic r1, r2 + strh r1, [r0, #4] + ldrh r3, [r0, #6] + mov r1, #2 + bic r3, r2 + orr r1, r3 + strh r1, [r0, #6] + mov r2, #0 + add r0, r4, #0 + mov r1, #6 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + mov r1, #6 + mov r2, #3 + mov r3, #1 + bl sub_02019184 + mov r0, #0xa + str r0, [sp] + ldr r0, _021D1DEC ; =0x04001050 + mov r1, #3 + mov r2, #0xc + mov r3, #0x1a + bl sub_020BF55C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D1DE4: .word 0x021D7338 +_021D1DE8: .word 0x04001008 +_021D1DEC: .word 0x04001050 + thumb_func_end ov77_021D1D48 + + thumb_func_start ov77_021D1DF0 +ov77_021D1DF0: ; 0x021D1DF0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r4, r0, #0 + add r7, r1, #0 + add r5, r2, #0 + mov r6, #0 + bl ov77_021D11A4 + cmp r0, #1 + bne _021D1E22 + mov r0, #0x2a + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + add r1, r6, #0 + add r0, r0, #4 + str r1, [r4, r0] + bl sub_0200F2C0 + mov r0, #3 + bl sub_0200ABB0 + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_021D1E22: + ldr r0, [r4, #0] + cmp r0, #0xa + bhi _021D1EAC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D1E34: ; jump table + .short _021D1E4A - _021D1E34 - 2 ; case 0 + .short _021D1E78 - _021D1E34 - 2 ; case 1 + .short _021D1E98 - _021D1E34 - 2 ; case 2 + .short _021D1EFA - _021D1E34 - 2 ; case 3 + .short _021D1F3A - _021D1E34 - 2 ; case 4 + .short _021D1F54 - _021D1E34 - 2 ; case 5 + .short _021D1FAC - _021D1E34 - 2 ; case 6 + .short _021D1FFE - _021D1E34 - 2 ; case 7 + .short _021D1FE8 - _021D1E34 - 2 ; case 8 + .short _021D2028 - _021D1E34 - 2 ; case 9 + .short _021D20A2 - _021D1E34 - 2 ; case 10 +_021D1E4A: + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + add r0, r6, #0 + ldr r1, _021D20D8 ; =0x0000029A + ldr r2, _021D20DC ; =0x0000010B + strh r0, [r4, r1] + sub r1, #0x6e + strh r2, [r4, r1] + mov r1, #0xf + str r1, [sp] + mov r1, #3 + str r1, [sp, #4] + mov r1, #1 + add r2, r1, #0 + add r3, r0, #0 + str r5, [sp, #8] + bl sub_0200F174 + mov r0, #1 + str r0, [r4, #0] + b _021D20BC +_021D1E78: + bl sub_0200F2AC + cmp r0, #1 + bne _021D1EAC + mov r0, #0x8b + lsl r0, r0, #2 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _021D1E90 + sub r1, r1, #1 + strh r1, [r4, r0] + b _021D20BC +_021D1E90: + mov r1, #2 + strh r1, [r4, r0] + str r1, [r4, #0] + b _021D20BC +_021D1E98: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _021D1EAC + mov r0, #2 + bl sub_0200AC1C + cmp r0, #1 + beq _021D1EAE +_021D1EAC: + b _021D20BC +_021D1EAE: + mov r0, #0x8b + lsl r0, r0, #2 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _021D1EF0 + mov r0, #1 + str r0, [sp] + mov r0, #0xa + mov r1, #0x10 + add r2, r6, #0 + mov r3, #7 + bl sub_0200AAE0 + mov r0, #2 + str r0, [sp] + mov r0, #0xa + mov r1, #0x10 + add r2, r6, #0 + mov r3, #0x27 + bl sub_0200AAE0 + ldr r1, _021D20D8 ; =0x0000029A + mov r0, #2 + strh r0, [r4, r1] + add r0, r1, #0 + sub r0, #0x6e + ldrh r0, [r4, r0] + sub r1, #0x6e + sub r0, r0, #1 + strh r0, [r4, r1] + mov r0, #3 + str r0, [r4, #0] + b _021D20BC +_021D1EF0: + add r1, r6, #0 + strh r1, [r4, r0] + mov r0, #4 + str r0, [r4, #0] + b _021D20BC +_021D1EFA: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _021D1FB4 + mov r0, #2 + bl sub_0200AC1C + cmp r0, #1 + bne _021D1FB4 + mov r0, #1 + str r0, [sp] + mov r0, #0xa + add r1, r6, #0 + mov r2, #0x10 + mov r3, #7 + bl sub_0200AAE0 + mov r0, #2 + str r0, [sp] + mov r0, #0xa + add r1, r6, #0 + mov r2, #0x10 + mov r3, #0x27 + bl sub_0200AAE0 + ldr r0, _021D20D8 ; =0x0000029A + mov r1, #3 + strh r1, [r4, r0] + mov r0, #2 + str r0, [r4, #0] + b _021D20BC +_021D1F3A: + mov r0, #0x8b + lsl r0, r0, #2 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _021D1F4A + sub r1, r1, #1 + strh r1, [r4, r0] + b _021D20BC +_021D1F4A: + mov r1, #1 + strh r1, [r4, r0] + mov r0, #5 + str r0, [r4, #0] + b _021D20BC +_021D1F54: + bl sub_0200F2AC + cmp r0, #1 + bne _021D1FB4 + mov r0, #0x8b + lsl r0, r0, #2 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _021D1F94 + mov r0, #5 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + add r0, r6, #0 + ldr r3, _021D20E0 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + str r5, [sp, #8] + bl sub_0200F174 + ldr r1, _021D20D8 ; =0x0000029A + mov r0, #2 + strh r0, [r4, r1] + add r0, r1, #0 + sub r0, #0x6e + ldrh r0, [r4, r0] + sub r1, #0x6e + sub r0, r0, #1 + strh r0, [r4, r1] + mov r0, #6 + str r0, [r4, #0] + b _021D20BC +_021D1F94: + mov r1, #0xa + strh r1, [r4, r0] + mov r1, #8 + str r1, [r4, #0] + mov r1, #1 + add r0, #0x74 + str r1, [r4, r0] + add r0, r6, #0 + add r1, r0, #0 + bl sub_0200F344 + b _021D20BC +_021D1FAC: + bl sub_0200F2AC + cmp r0, #1 + beq _021D1FB6 +_021D1FB4: + b _021D20BC +_021D1FB6: + mov r0, #0xa9 + add r1, r6, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #2 + mov r1, #1 + bl sub_0201FF74 + add r0, r4, #0 + mov r1, #2 + add r0, #0xb0 + str r1, [r0, #0] + mov r0, #0x10 + str r0, [sp] + mov r0, #3 + mov r1, #1 + str r0, [sp, #4] + ldr r3, _021D20E0 ; =0x00007FFF + add r2, r1, #0 + str r5, [sp, #8] + bl sub_0200F174 + mov r0, #5 + str r0, [r4, #0] + b _021D20BC +_021D1FE8: + mov r0, #0x8b + lsl r0, r0, #2 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _021D1FF8 + sub r1, r1, #1 + strh r1, [r4, r0] + b _021D20BC +_021D1FF8: + mov r0, #7 + str r0, [r4, #0] + b _021D20BC +_021D1FFE: + mov r0, #0x30 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #3 + add r2, r1, #0 + add r3, r6, #0 + str r5, [sp, #8] + bl sub_0200F174 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #9 + str r0, [r4, #0] + mov r0, #0xaa + add r1, r6, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + b _021D20BC +_021D2028: + add r0, r4, #0 + bl ov77_021D1C10 + add r1, r4, #0 + mov r0, #9 + add r1, #0xa8 + lsl r0, r0, #6 + ldr r1, [r1, #0] + add r0, r4, r0 + bl sub_02020ACC + add r1, r4, #0 + mov r0, #0x93 + add r1, #0xa8 + lsl r0, r0, #2 + ldr r1, [r1, #0] + add r0, r4, r0 + bl sub_02020ADC + mov r0, #0xaa + lsl r0, r0, #2 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r0, [r4, r0] + cmp r0, #0x3c + blt _021D20BC + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + add r0, r7, #0 + add r1, r5, #0 + bl ov77_021D1CC0 + mov r0, #0x10 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r1, #1 + ldr r3, _021D20E0 ; =0x00007FFF + mov r0, #4 + add r2, r1, #0 + str r5, [sp, #8] + bl sub_0200F174 + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x8b + mov r1, #0x5a + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #0xa + str r0, [r4, #0] + b _021D20BC +_021D20A2: + mov r0, #0x8b + lsl r0, r0, #2 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _021D20B2 + sub r1, r1, #1 + strh r1, [r4, r0] + b _021D20BC +_021D20B2: + bl sub_0200F2AC + cmp r0, #1 + bne _021D20BC + mov r6, #1 +_021D20BC: + add r0, r4, #0 + bl ov77_021D2438 + add r0, r4, #0 + add r1, r4, #4 + bl ov77_021D1984 + add r0, r4, #0 + add r1, r4, #4 + bl ov77_021D1568 + add r0, r6, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D20D8: .word 0x0000029A +_021D20DC: .word 0x0000010B +_021D20E0: .word 0x00007FFF + thumb_func_end ov77_021D1DF0 + + thumb_func_start ov77_021D20E4 +ov77_021D20E4: ; 0x021D20E4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r6, r1, #0 + add r7, r2, #0 + mov r4, #0 + cmp r0, #0 + beq _021D20FA + cmp r0, #1 + beq _021D2174 + b _021D21B0 +_021D20FA: + add r1, r5, #0 + mov r0, #0xa + add r1, #0xa8 + lsl r0, r0, #6 + ldr r1, [r1, #0] + add r0, r5, r0 + bl sub_02020ACC + add r1, r5, #0 + mov r0, #0x9a + add r1, #0xa8 + lsl r0, r0, #2 + ldr r1, [r1, #0] + add r0, r5, r0 + bl sub_02020ADC + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + add r0, r4, #0 + bl sub_0200F338 + mov r0, #1 + bl sub_0200F338 + add r0, r5, #0 + mov r1, #2 + add r0, #0xb0 + str r1, [r0, #0] + ldr r1, _021D21BC ; =0x00007FFF + mov r0, #1 + bl sub_020AF558 + add r0, r6, #0 + add r1, r7, #0 + bl ov77_021D1CC0 + mov r0, #0x8b + add r1, r4, #0 + lsl r0, r0, #2 + strh r1, [r5, r0] + mov r0, #1 + str r0, [r5, #0] + b _021D21B0 +_021D2174: + mov r0, #0x96 + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #1 + bne _021D219C + sub r0, #0x2c + ldrh r0, [r5, r0] + cmp r0, #0 + bne _021D2190 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + b _021D219C +_021D2190: + cmp r0, #0x10 + bne _021D219C + mov r0, #1 + add r1, r4, #0 + bl sub_0201FF74 +_021D219C: + mov r1, #0x8b + lsl r1, r1, #2 + ldrh r0, [r5, r1] + mov r4, #1 + add r0, r0, #1 + strh r0, [r5, r1] + ldrh r2, [r5, r1] + mov r0, #0x1f + and r0, r2 + strh r0, [r5, r1] +_021D21B0: + add r0, r5, #0 + add r1, r5, #4 + bl ov77_021D1568 + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D21BC: .word 0x00007FFF + thumb_func_end ov77_021D20E4 + + thumb_func_start ov77_021D21C0 +ov77_021D21C0: ; 0x021D21C0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + add r4, r1, #0 + add r6, r2, #0 + bl sub_020203B8 + add r0, r5, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_020203B8 + add r0, r5, #4 + bl ov77_021D14E4 + add r0, r4, #0 + add r1, r6, #0 + add r2, r5, #0 + bl ov77_021D2428 + ldr r2, _021D2208 ; =0x04000050 + mov r3, #0 + strh r3, [r2] + add r2, #0x10 + ldrh r1, [r2] + ldr r0, _021D220C ; =0x0000CFDF + and r0, r1 + strh r0, [r2] + ldr r0, _021D2210 ; =0x021BF6DC + strb r3, [r0, #5] + bl sub_0201FFE8 + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_021D2208: .word 0x04000050 +_021D220C: .word 0x0000CFDF +_021D2210: .word 0x021BF6DC + thumb_func_end ov77_021D21C0 + + thumb_func_start ov77_021D2214 +ov77_021D2214: ; 0x021D2214 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + add r4, r1, #0 + str r0, [sp, #8] + add r6, r2, #0 + mov r0, #0x30 + mov r1, #0x17 + add r2, r5, #0 + mov r3, #7 + str r4, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x1a + add r2, r5, #0 + mov r3, #3 + str r4, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x18 + add r2, r5, #0 + mov r3, #7 + str r4, [sp, #0xc] + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x1b + add r2, r5, #0 + mov r3, #3 + str r4, [sp, #0xc] + bl sub_02006E60 + mov r3, #0 + str r3, [sp] + mov r0, #0x30 + mov r1, #7 + mov r2, #4 + str r4, [sp, #4] + bl sub_02006E84 + mov r2, #0 + str r2, [sp] + mov r0, #0x30 + mov r1, #6 + add r3, r2, #0 + str r4, [sp, #4] + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0xc + add r2, r5, #0 + mov r3, #6 + str r4, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + mov r3, #1 + mov r0, #0x30 + mov r1, #0xb + mov r2, #6 + lsl r3, r3, #0xe + str r4, [sp, #4] + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #0x16 + add r2, r5, #0 + mov r3, #6 + str r4, [sp, #0xc] + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + mov r1, #0xe + add r2, r5, #0 + mov r3, #5 + str r4, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + mov r0, #0x80 + mov r1, #0xd + mov r2, #6 + lsl r3, r0, #6 + str r4, [sp, #4] + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x80 + mov r1, #0xc + add r2, r5, #0 + mov r3, #5 + str r4, [sp, #0xc] + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #5 + add r2, r5, #0 + mov r3, #1 + str r4, [sp, #0xc] + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x30 + mov r1, #3 + add r2, r5, #0 + mov r3, #1 + str r4, [sp, #0xc] + bl sub_02006E60 + mov r0, #0x60 + str r0, [sp] + mov r0, #0x30 + mov r1, #4 + mov r2, #0 + mov r3, #0x20 + str r4, [sp, #4] + bl sub_02006E84 + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + add r3, r4, #0 + bl sub_02019690 + ldr r2, _021D2418 ; =0x00000261 + mov r0, #1 + mov r1, #0x1a + add r3, r4, #0 + bl sub_0200B144 + add r7, r0, #0 + mov r0, #0x40 + add r1, r4, #0 + bl sub_02023790 + mov r1, #0x23 + lsl r1, r1, #4 + add r4, r0, #0 + ldr r2, _021D241C ; =0x021D72D0 + add r0, r5, #0 + add r1, r6, r1 + bl sub_0201A8D4 + mov r1, #0 + mov r0, #0xe0 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0x23 + lsl r0, r0, #4 + add r0, r6, r0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + add r0, r7, #0 + mov r1, #0 + add r2, r4, #0 + bl sub_0200B1B8 + ldr r3, _021D2420 ; =0x00000237 + mov r0, #0 + ldrb r3, [r6, r3] + add r1, r4, #0 + mov r2, #1 + lsl r3, r3, #3 + bl sub_02002EEC + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + ldr r0, _021D2424 ; =0x00010100 + str r1, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #0x23 + lsl r0, r0, #4 + str r1, [sp, #0x10] + add r0, r6, r0 + add r2, r4, #0 + str r1, [sp, #0x14] + bl sub_0201D7E0 + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_0200B190 + mov r1, #0x15 + add r0, sp, #0x18 + strh r1, [r0, #2] + strh r1, [r0] + add r1, sp, #0x18 + mov r0, #4 + add r1, #2 + mov r2, #2 + mov r3, #0x42 + bl sub_0201972C + mov r0, #4 + add r1, sp, #0x18 + mov r2, #2 + mov r3, #0x44 + bl sub_0201972C + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2418: .word 0x00000261 +_021D241C: .word 0x021D72D0 +_021D2420: .word 0x00000237 +_021D2424: .word 0x00010100 + thumb_func_end ov77_021D2214 + + thumb_func_start ov77_021D2428 +ov77_021D2428: ; 0x021D2428 + mov r0, #0x23 + lsl r0, r0, #4 + ldr r3, _021D2434 ; =sub_0201A8FC + add r0, r2, r0 + bx r3 + nop +_021D2434: .word sub_0201A8FC + thumb_func_end ov77_021D2428 + + thumb_func_start ov77_021D2438 +ov77_021D2438: ; 0x021D2438 + push {r4, lr} + ldr r1, _021D24C4 ; =0x0000029A + ldrh r2, [r0, r1] + cmp r2, #3 + bhi _021D2498 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D244E: ; jump table + .short _021D2456 - _021D244E - 2 ; case 0 + .short _021D2498 - _021D244E - 2 ; case 1 + .short _021D2462 - _021D244E - 2 ; case 2 + .short _021D247E - _021D244E - 2 ; case 3 +_021D2456: + mov r3, #5 + sub r2, r1, #2 + strh r3, [r0, r2] + mov r2, #1 + strh r2, [r0, r1] + b _021D2498 +_021D2462: + sub r2, r1, #2 + ldrh r2, [r0, r2] + add r3, r2, #2 + sub r2, r1, #2 + strh r3, [r0, r2] + ldrh r2, [r0, r2] + cmp r2, #0x1f + blo _021D2498 + mov r3, #0x1f + sub r2, r1, #2 + strh r3, [r0, r2] + mov r2, #1 + strh r2, [r0, r1] + b _021D2498 +_021D247E: + sub r2, r1, #2 + ldrh r2, [r0, r2] + sub r3, r2, #2 + sub r2, r1, #2 + strh r3, [r0, r2] + ldrh r2, [r0, r2] + cmp r2, #5 + bhi _021D2498 + mov r3, #5 + sub r2, r1, #2 + strh r3, [r0, r2] + mov r2, #1 + strh r2, [r0, r1] +_021D2498: + mov r1, #0xa6 + lsl r1, r1, #2 + ldrh r3, [r0, r1] + mov r1, #0x1f + lsl r1, r1, #0xa + lsl r2, r3, #0xa + and r1, r2 + add r4, r3, #0 + mov r2, #0x1f + and r4, r2 + lsl r3, r3, #5 + lsl r2, r2, #5 + and r2, r3 + orr r2, r4 + orr r1, r2 + lsl r1, r1, #0x10 + mov r0, #1 + lsr r1, r1, #0x10 + bl sub_020AF558 + pop {r4, pc} + nop +_021D24C4: .word 0x0000029A + thumb_func_end ov77_021D2438 + + thumb_func_start ov77_021D24C8 +ov77_021D24C8: ; 0x021D24C8 + push {r4, r5, r6, lr} + sub sp, #0x18 + mov r1, #0x97 + lsl r1, r1, #2 + add r4, r0, #0 + mov r5, #0 + mov r3, #3 + mov r2, #0x96 + str r5, [r4, r1] + lsl r3, r3, #0x12 + add r0, r1, #4 + str r3, [r4, r0] + add r0, r1, #0 + lsl r2, r2, #0xe + add r0, #8 + str r2, [r4, r0] + add r0, r1, #0 + add r6, r1, #0 + ldr r2, _021D2590 ; =0xFFFC0000 + add r0, #0xc + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0x10 + str r3, [r4, r0] + mov r2, #0x79 + add r0, r1, #0 + lsl r2, r2, #0xe + add r0, #0x14 + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0x18 + str r5, [r4, r0] + mov r2, #0x19 + add r0, r1, #0 + lsl r2, r2, #0xe + add r0, #0x1c + str r2, [r4, r0] + ldr r0, _021D2594 ; =0xFFFEE000 + add r6, #0x20 + str r0, [r4, r6] + add r6, r1, #0 + add r6, #0x24 + str r5, [r4, r6] + add r5, r1, #0 + add r5, #0x28 + str r2, [r4, r5] + add r2, r1, #0 + add r2, #0x2c + str r0, [r4, r2] + add r0, r1, #0 + ldr r2, _021D2598 ; =0x000008DB + add r0, #0x30 + strh r2, [r4, r0] + add r0, r1, #0 + ldr r2, _021D259C ; =0xFFFFF85F + add r0, #0x32 + strh r2, [r4, r0] + add r2, r1, #0 + ldr r0, _021D25A0 ; =0xFFFFF513 + add r2, #0x34 + strh r0, [r4, r2] + add r2, r1, #0 + ldr r5, _021D25A4 ; =0xFFFFF725 + add r2, #0x36 + strh r5, [r4, r2] + add r2, r1, #0 + ldr r5, _021D25A8 ; =0x000007A1 + add r2, #0x38 + strh r5, [r4, r2] + add r2, r1, #0 + add r2, #0x3a + strh r0, [r4, r2] + add r0, r1, #0 + lsr r2, r3, #6 + add r0, #0x40 + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0x24 + add r1, #0xc + add r0, r4, r0 + add r1, r4, r1 + add r2, sp, #0xc + bl sub_020BD1B0 + add r0, sp, #0xc + add r1, sp, #0 + bl sub_020BD3E4 + mov r0, #0xa3 + ldr r1, [sp] + lsl r0, r0, #2 + strh r1, [r4, r0] + add r1, r0, #2 + ldr r2, [sp, #4] + add r0, r0, #4 + strh r2, [r4, r1] + ldr r1, [sp, #8] + strh r1, [r4, r0] + add sp, #0x18 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D2590: .word 0xFFFC0000 +_021D2594: .word 0xFFFEE000 +_021D2598: .word 0x000008DB +_021D259C: .word 0xFFFFF85F +_021D25A0: .word 0xFFFFF513 +_021D25A4: .word 0xFFFFF725 +_021D25A8: .word 0x000007A1 + thumb_func_end ov77_021D24C8 + + thumb_func_start ov77_021D25AC +ov77_021D25AC: ; 0x021D25AC + bx lr + ; .align 2, 0 + thumb_func_end ov77_021D25AC + + .rodata + + + .global Unk_ov77_021D72C8 +Unk_ov77_021D72C8: ; 0x021D72C8 + .incbin "incbin/overlay77_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov77_021D72D0 +Unk_ov77_021D72D0: ; 0x021D72D0 + .incbin "incbin/overlay77_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov77_021D72D8 +Unk_ov77_021D72D8: ; 0x021D72D8 + .incbin "incbin/overlay77_rodata.bin", 0x10, 0x1C - 0x10 + + .global Unk_ov77_021D72E4 +Unk_ov77_021D72E4: ; 0x021D72E4 + .incbin "incbin/overlay77_rodata.bin", 0x1C, 0x28 - 0x1C + + .global Unk_ov77_021D72F0 +Unk_ov77_021D72F0: ; 0x021D72F0 + .incbin "incbin/overlay77_rodata.bin", 0x28, 0x38 - 0x28 + + .global Unk_ov77_021D7300 +Unk_ov77_021D7300: ; 0x021D7300 + .incbin "incbin/overlay77_rodata.bin", 0x38, 0x54 - 0x38 + + .global Unk_ov77_021D731C +Unk_ov77_021D731C: ; 0x021D731C + .incbin "incbin/overlay77_rodata.bin", 0x54, 0x70 - 0x54 + + .global Unk_ov77_021D7338 +Unk_ov77_021D7338: ; 0x021D7338 + .incbin "incbin/overlay77_rodata.bin", 0x70, 0x8C - 0x70 + + .global Unk_ov77_021D7354 +Unk_ov77_021D7354: ; 0x021D7354 + .incbin "incbin/overlay77_rodata.bin", 0x8C, 0xA8 - 0x8C + + .global Unk_ov77_021D7370 +Unk_ov77_021D7370: ; 0x021D7370 + .incbin "incbin/overlay77_rodata.bin", 0xA8, 0xC4 - 0xA8 + + .global Unk_ov77_021D738C +Unk_ov77_021D738C: ; 0x021D738C + .incbin "incbin/overlay77_rodata.bin", 0xC4, 0xE0 - 0xC4 + + .global Unk_ov77_021D73A8 +Unk_ov77_021D73A8: ; 0x021D73A8 + .incbin "incbin/overlay77_rodata.bin", 0xE0, 0xFC - 0xE0 + + .global Unk_ov77_021D73C4 +Unk_ov77_021D73C4: ; 0x021D73C4 + .incbin "incbin/overlay77_rodata.bin", 0xFC, 0x118 - 0xFC + + .global Unk_ov77_021D73E0 +Unk_ov77_021D73E0: ; 0x021D73E0 + .incbin "incbin/overlay77_rodata.bin", 0x118, 0x13C - 0x118 + + .global Unk_ov77_021D7404 +Unk_ov77_021D7404: ; 0x021D7404 + .incbin "incbin/overlay77_rodata.bin", 0x13C, 0x164 - 0x13C + + .global Unk_ov77_021D742C +Unk_ov77_021D742C: ; 0x021D742C + .incbin "incbin/overlay77_rodata.bin", 0x164, 0x10 + diff --git a/asm/ov77_021D25B0.s b/asm/ov77_021D25B0.s new file mode 100644 index 000000000..318dec8bd --- /dev/null +++ b/asm/ov77_021D25B0.s @@ -0,0 +1,5819 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov77_021D25B0 +ov77_021D25B0: ; 0x021D25B0 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D25CC ; =0x021D76F4 + add r3, sp, #0 + mov r2, #5 +_021D25BA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D25BA + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D25CC: .word 0x021D76F4 + thumb_func_end ov77_021D25B0 + + thumb_func_start ov77_021D25D0 +ov77_021D25D0: ; 0x021D25D0 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D25EC ; =0x021D771C + add r3, sp, #0 + mov r2, #5 +_021D25DA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D25DA + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D25EC: .word 0x021D771C + thumb_func_end ov77_021D25D0 + + thumb_func_start ov77_021D25F0 +ov77_021D25F0: ; 0x021D25F0 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D260C ; =0x021D7744 + add r3, sp, #0 + mov r2, #5 +_021D25FA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D25FA + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D260C: .word 0x021D7744 + thumb_func_end ov77_021D25F0 + + thumb_func_start ov77_021D2610 +ov77_021D2610: ; 0x021D2610 + push {r3, r4, r5, lr} + sub sp, #0xb8 + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02018340 + add r3, sp, #0xa8 + ldr r5, _021D2708 ; =0x021D74CC + str r0, [r4, #0xc] + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D270C ; =0x021D7510 + add r3, sp, #0x8c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2710 ; =0x021D752C + add r3, sp, #0x70 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2714 ; =0x021D7548 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2718 ; =0x021D75F0 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D271C ; =0x021D75D4 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2720 ; =0x021D7580 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #7 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + add sp, #0xb8 + pop {r3, r4, r5, pc} + nop +_021D2708: .word 0x021D74CC +_021D270C: .word 0x021D7510 +_021D2710: .word 0x021D752C +_021D2714: .word 0x021D7548 +_021D2718: .word 0x021D75F0 +_021D271C: .word 0x021D75D4 +_021D2720: .word 0x021D7580 + thumb_func_end ov77_021D2610 + + thumb_func_start ov77_021D2724 +ov77_021D2724: ; 0x021D2724 + push {r4, r5, lr} + sub sp, #0xd4 + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02018340 + add r3, sp, #0x70 + ldr r5, _021D2810 ; =0x021D74AC + str r0, [r4, #0xc] + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D2814 ; =0x021D75B8 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2818 ; =0x021D760C + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D281C ; =0x021D7628 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2820 ; =0x021D7644 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D2824 ; =0x021D7838 + add r3, sp, #0x80 + mov r2, #0xa +_021D27CC: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D27CC + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + add r2, sp, #0x80 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + mov r1, #6 + add r2, sp, #0x9c + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + mov r1, #7 + add r2, sp, #0xb8 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + add sp, #0xd4 + pop {r4, r5, pc} + ; .align 2, 0 +_021D2810: .word 0x021D74AC +_021D2814: .word 0x021D75B8 +_021D2818: .word 0x021D760C +_021D281C: .word 0x021D7628 +_021D2820: .word 0x021D7644 +_021D2824: .word 0x021D7838 + thumb_func_end ov77_021D2724 + + thumb_func_start ov77_021D2828 +ov77_021D2828: ; 0x021D2828 + push {r3, r4, r5, lr} + sub sp, #0xa8 + mov r1, #0 + add r4, r0, #0 + bl ov77_021D361C + ldr r5, _021D28EC ; =0x021D767C + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D28F0 ; =0x021D7698 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D28F4 ; =0x021D76B4 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D28F8 ; =0x021D77E4 + add r3, sp, #0x54 + mov r2, #0xa +_021D289A: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D289A + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + add r2, sp, #0x54 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + mov r1, #6 + add r2, sp, #0x70 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + mov r1, #7 + add r2, sp, #0x8c + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + ldr r0, _021D28FC ; =0x0000028E + mov r1, #1 + strb r1, [r4, r0] + add sp, #0xa8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D28EC: .word 0x021D767C +_021D28F0: .word 0x021D7698 +_021D28F4: .word 0x021D76B4 +_021D28F8: .word 0x021D77E4 +_021D28FC: .word 0x0000028E + thumb_func_end ov77_021D2828 + + thumb_func_start ov77_021D2900 +ov77_021D2900: ; 0x021D2900 + push {r3, r4, r5, lr} + sub sp, #0x48 + add r4, r0, #0 + bl ov77_021D35B8 + add r0, r4, #0 + bl ov77_021D2828 + ldr r5, _021D29F0 ; =0x021D74DC + add r3, sp, #0x38 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D29F4 ; =0x021D7564 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + add r3, r1, #0 + bl sub_020183C4 + ldr r5, _021D29F8 ; =0x021D759C + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + mov r1, #0 + ldr r0, [r4, #0xc] + add r2, r1, #0 + add r3, r1, #0 + bl sub_02019184 + mov r1, #0 + ldr r0, [r4, #0xc] + mov r2, #3 + add r3, r1, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r4, #0xc] + mov r1, #4 + add r3, r2, #0 + bl sub_02019184 + ldr r0, [r4, #0xc] + mov r1, #4 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #2 + mov r1, #1 + bl sub_0201FF74 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r0, _021D29FC ; =0x0000028E + mov r1, #2 + strb r1, [r4, r0] + add sp, #0x48 + pop {r3, r4, r5, pc} + nop +_021D29F0: .word 0x021D74DC +_021D29F4: .word 0x021D7564 +_021D29F8: .word 0x021D759C +_021D29FC: .word 0x0000028E + thumb_func_end ov77_021D2900 + + thumb_func_start ov77_021D2A00 +ov77_021D2A00: ; 0x021D2A00 + push {r4, r5, lr} + sub sp, #0x2c + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_02018340 + add r3, sp, #0x1c + ldr r5, _021D2A50 ; =0x021D74BC + str r0, [r4, #0xc] + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D2A54 ; =0x021D7660 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + ldr r0, [r4, #0xc] + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0 + bl sub_0201975C + add sp, #0x2c + pop {r4, r5, pc} + nop +_021D2A50: .word 0x021D74BC +_021D2A54: .word 0x021D7660 + thumb_func_end ov77_021D2A00 + + thumb_func_start ov77_021D2A58 +ov77_021D2A58: ; 0x021D2A58 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #4 + str r0, [sp] + ldr r0, _021D2A94 ; =ov77_021D2AA0 + mov r1, #0 + str r0, [sp, #4] + ldr r0, [r4, #0] + mov r2, #1 + add r3, r1, #0 + bl sub_02024220 + str r0, [r4, #0x10] + ldr r3, _021D2A98 ; =0x02100DEC + mov r0, #2 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _021D2A9C ; =0x02100DF4 + mov r0, #0x80 + ldr r3, [r3, #0] + mov r1, #0 + mov r2, #1 + blx r3 + add sp, #8 + pop {r4, pc} + nop +_021D2A94: .word ov77_021D2AA0 +_021D2A98: .word 0x02100DEC +_021D2A9C: .word 0x02100DF4 + thumb_func_end ov77_021D2A58 + + thumb_func_start ov77_021D2AA0 +ov77_021D2AA0: ; 0x021D2AA0 + push {r3, lr} + bl sub_020B2628 + ldr r0, _021D2B14 ; =0x04000008 + mov r1, #3 + ldrh r2, [r0] + bic r2, r1 + mov r1, #1 + orr r1, r2 + strh r1, [r0] + add r0, #0x58 + ldrh r2, [r0] + ldr r1, _021D2B18 ; =0xFFFFCFFD + and r2, r1 + strh r2, [r0] + ldrh r3, [r0] + add r2, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _021D2B1C ; =0x0000CFFB + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #8 + orr r2, r3 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldr r0, _021D2B20 ; =0x021D74EC + bl sub_020BFD2C + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r0, #0 + ldr r2, _021D2B24 ; =0x00007FFF + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _021D2B28 ; =0xBFFF0000 + ldr r0, _021D2B2C ; =0x04000580 + str r1, [r0, #0] + pop {r3, pc} + nop +_021D2B14: .word 0x04000008 +_021D2B18: .word 0xFFFFCFFD +_021D2B1C: .word 0x0000CFFB +_021D2B20: .word 0x021D74EC +_021D2B24: .word 0x00007FFF +_021D2B28: .word 0xBFFF0000 +_021D2B2C: .word 0x04000580 + thumb_func_end ov77_021D2AA0 + + thumb_func_start ov77_021D2B30 +ov77_021D2B30: ; 0x021D2B30 + ldr r3, _021D2B34 ; =sub_0200A858 + bx r3 + ; .align 2, 0 +_021D2B34: .word sub_0200A858 + thumb_func_end ov77_021D2B30 + + thumb_func_start ov77_021D2B38 +ov77_021D2B38: ; 0x021D2B38 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r0, [sp] + ldr r0, _021D2C64 ; =0x0000025B + add r5, #0x34 + ldrb r0, [r5, r0] + cmp r0, #1 + bne _021D2B84 + ldr r0, _021D2C68 ; =0x021BF6DC + mov r1, #1 + strb r1, [r0, #5] + bl sub_0201FFE8 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #8 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r1, _021D2C64 ; =0x0000025B + mov r0, #0 + strb r0, [r5, r1] + ldr r1, [r5, #0x28] + bl sub_02020854 + ldr r0, [r5, #0x28] + bl sub_020203D4 +_021D2B84: + ldr r0, [sp] + ldr r0, [r0, #0xc] + cmp r0, #0 + beq _021D2B90 + bl sub_0201C2B8 +_021D2B90: + ldr r7, _021D2C6C ; =0x00000247 + mov r4, #0 + add r6, r7, #1 +_021D2B96: + ldr r0, _021D2C6C ; =0x00000247 + ldrb r1, [r5, r0] + mov r0, #1 + tst r0, r1 + beq _021D2BAA + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + mov r1, #1 + bl sub_02019120 +_021D2BAA: + mov r0, #0x92 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + mov r0, #1 + tst r0, r1 + beq _021D2BC0 + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + mov r1, #0 + bl sub_02019120 +_021D2BC0: + ldrb r0, [r5, r7] + add r4, r4, #1 + asr r0, r0, #1 + strb r0, [r5, r7] + ldrb r0, [r5, r6] + asr r0, r0, #1 + strb r0, [r5, r6] + cmp r4, #8 + blt _021D2B96 + mov r2, #0x25 + lsl r2, r2, #4 + sub r1, r2, #2 + ldrsh r6, [r5, r1] + sub r1, r2, #6 + ldrsh r1, [r5, r1] + sub r4, r2, #4 + ldrsh r4, [r5, r4] + lsl r3, r1, #8 + mov r1, #0xff + lsl r1, r1, #8 + lsl r4, r4, #0x18 + ldrsh r0, [r5, r2] + and r3, r1 + lsr r4, r4, #0x18 + orr r3, r4 + ldr r4, _021D2C70 ; =0x04000040 + lsl r0, r0, #0x18 + strh r3, [r4] + lsl r3, r6, #8 + and r3, r1 + lsr r0, r0, #0x18 + orr r0, r3 + strh r0, [r4, #4] + add r0, r2, #0 + add r0, #8 + ldrsh r4, [r5, r0] + add r0, r2, #6 + ldrsh r3, [r5, r0] + add r0, r2, #2 + add r6, r2, #4 + ldrsh r0, [r5, r0] + ldrsh r6, [r5, r6] + lsl r3, r3, #8 + lsl r0, r0, #8 + lsl r6, r6, #0x18 + and r0, r1 + lsr r6, r6, #0x18 + orr r6, r0 + ldr r0, _021D2C74 ; =0x04001040 + and r3, r1 + lsl r1, r4, #0x18 + lsr r1, r1, #0x18 + strh r6, [r0] + orr r1, r3 + sub r2, #0xb + strh r1, [r0, #4] + ldrb r0, [r5, r2] + cmp r0, #1 + bne _021D2C40 + bl ov77_021D2C80 + ldr r0, _021D2C78 ; =0x00000245 + mov r1, #0 + strb r1, [r5, r0] +_021D2C40: + ldr r0, _021D2C7C ; =0x00000246 + ldrb r0, [r5, r0] + cmp r0, #1 + bne _021D2C52 + bl ov77_021D2CE8 + ldr r0, _021D2C7C ; =0x00000246 + mov r1, #0 + strb r1, [r5, r0] +_021D2C52: + bl sub_0201DCAC + bl sub_0200A858 + ldr r0, [sp] + ldr r0, [r0, #0x50] + bl ov77_021D6E40 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2C64: .word 0x0000025B +_021D2C68: .word 0x021BF6DC +_021D2C6C: .word 0x00000247 +_021D2C70: .word 0x04000040 +_021D2C74: .word 0x04001040 +_021D2C78: .word 0x00000245 +_021D2C7C: .word 0x00000246 + thumb_func_end ov77_021D2B38 + + thumb_func_start ov77_021D2C80 +ov77_021D2C80: ; 0x021D2C80 + push {r3, r4, r5, r6} + mov r0, #1 + lsl r0, r0, #0x1a + ldr r1, [r0, #0] + ldr r2, _021D2CE0 ; =0xFFFF1FFF + add r3, r1, #0 + add r5, r0, #0 + and r3, r2 + lsr r1, r0, #0xd + orr r1, r3 + str r1, [r0, #0] + add r5, #0x48 + ldrh r1, [r5] + mov r4, #0x3f + mov r3, #0x1f + bic r1, r4 + orr r1, r3 + mov r6, #0x20 + orr r1, r6 + strh r1, [r5] + add r0, #0x4a + ldrh r1, [r0] + mov r5, #0x11 + bic r1, r4 + orr r1, r5 + orr r1, r6 + strh r1, [r0] + ldr r0, _021D2CE4 ; =0x04001000 + ldr r1, [r0, #0] + and r2, r1 + lsr r1, r0, #0xd + orr r1, r2 + add r2, r0, #0 + str r1, [r0, #0] + add r2, #0x48 + ldrh r1, [r2] + add r0, #0x4a + bic r1, r4 + orr r1, r3 + orr r1, r6 + strh r1, [r2] + ldrh r1, [r0] + bic r1, r4 + orr r1, r5 + orr r1, r6 + strh r1, [r0] + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 +_021D2CE0: .word 0xFFFF1FFF +_021D2CE4: .word 0x04001000 + thumb_func_end ov77_021D2C80 + + thumb_func_start ov77_021D2CE8 +ov77_021D2CE8: ; 0x021D2CE8 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D2D00 ; =0xFFFF1FFF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D2D04 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + bx lr + nop +_021D2D00: .word 0xFFFF1FFF +_021D2D04: .word 0x04001000 + thumb_func_end ov77_021D2CE8 + + thumb_func_start ov77_021D2D08 +ov77_021D2D08: ; 0x021D2D08 + push {r4, lr} + add r4, r0, #0 + bl sub_0200AB84 + ldr r1, _021D2D8C ; =0x00007FFF + mov r0, #0 + bl sub_0200F344 + ldr r1, _021D2D8C ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + mov r0, #0 + add r1, r0, #0 + bl sub_020177BC + bl sub_0201FF00 + bl sub_0201FF68 + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + mov r2, #0xa + mov r0, #3 + mov r1, #0x4c + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r1, #0x2b + add r0, r4, #0 + lsl r1, r1, #4 + mov r2, #0x4c + bl sub_0200681C + mov r2, #0x2b + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x4c + str r0, [r4, #0] + mov r1, #0 + mov r0, #0xab + str r1, [r4, #8] + lsl r0, r0, #2 + strb r1, [r4, r0] + ldr r0, _021D2D90 ; =0x021BF6DC + strb r1, [r0, #5] + bl sub_0201FFE8 + bl sub_0201D2D0 + str r0, [r4, #0x14] + mov r0, #0 + bl sub_0201D2DC + mov r0, #1 + pop {r4, pc} + nop +_021D2D8C: .word 0x00007FFF +_021D2D90: .word 0x021BF6DC + thumb_func_end ov77_021D2D08 + + thumb_func_start ov77_021D2D94 +ov77_021D2D94: ; 0x021D2D94 + push {r3, r4, r5, lr} + add r4, r1, #0 + bl sub_0200682C + add r5, r0, #0 + mov r0, #0xab + lsl r0, r0, #2 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _021D2DD0 + ldr r0, _021D2E58 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _021D2DB8 + mov r0, #8 + tst r0, r1 + beq _021D2DD0 +_021D2DB8: + mov r0, #1 + str r0, [r5, #8] + ldr r1, _021D2E58 ; =0x021BF67C + mov r0, #0 + str r0, [r1, #0x6c] + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 +_021D2DD0: + ldr r0, [r4, #0] + cmp r0, #4 + bhi _021D2E3E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2DE2: ; jump table + .short _021D2DEC - _021D2DE2 - 2 ; case 0 + .short _021D2DFC - _021D2DE2 - 2 ; case 1 + .short _021D2E0E - _021D2DE2 - 2 ; case 2 + .short _021D2E20 - _021D2DE2 - 2 ; case 3 + .short _021D2E32 - _021D2DE2 - 2 ; case 4 +_021D2DEC: + mov r0, #0xab + lsl r0, r0, #2 + add r0, r5, r0 + str r0, [r5, #0x30] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D2E42 +_021D2DFC: + add r0, r5, #0 + bl ov77_021D2E9C + cmp r0, #0 + beq _021D2E42 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D2E42 +_021D2E0E: + add r0, r5, #0 + bl ov77_021D33F0 + cmp r0, #0 + beq _021D2E42 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D2E42 +_021D2E20: + add r0, r5, #0 + bl ov77_021D5254 + cmp r0, #0 + beq _021D2E42 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _021D2E42 +_021D2E32: + ldr r1, [r5, #4] + ldr r0, _021D2E5C ; =0x0000097E + cmp r1, r0 + blt _021D2E42 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2E3E: + bl sub_02022974 +_021D2E42: + ldr r0, [r5, #8] + cmp r0, #0 + beq _021D2E4C + mov r0, #1 + pop {r3, r4, r5, pc} +_021D2E4C: + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D2E58: .word 0x021BF67C +_021D2E5C: .word 0x0000097E + thumb_func_end ov77_021D2D94 + + thumb_func_start ov77_021D2E60 +ov77_021D2E60: ; 0x021D2E60 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + bne _021D2E76 + bl sub_0200F2C0 +_021D2E76: + ldr r0, [r4, #0x14] + bl sub_0201D2DC + add r0, r5, #0 + bl sub_02006830 + mov r0, #0x4c + bl sub_0201807C + ldr r0, _021D2E94 ; =0x0000004D + ldr r1, _021D2E98 ; =0x021D742C + bl sub_02000EC4 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D2E94: .word 0x0000004D +_021D2E98: .word 0x021D742C + thumb_func_end ov77_021D2E60 + + thumb_func_start ov77_021D2E9C +ov77_021D2E9C: ; 0x021D2E9C + push {r4, lr} + add r1, r0, #0 + ldr r0, [r1, #8] + add r4, r1, #0 + add r4, #0x18 + cmp r0, #0 + beq _021D2EAE + mov r0, #3 + strb r0, [r4] +_021D2EAE: + ldrb r0, [r4] + cmp r0, #3 + bhi _021D2F06 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D2EC0: ; jump table + .short _021D2EC8 - _021D2EC0 - 2 ; case 0 + .short _021D2ED6 - _021D2EC0 - 2 ; case 1 + .short _021D2EE6 - _021D2EC0 - 2 ; case 2 + .short _021D2EFC - _021D2EC0 - 2 ; case 3 +_021D2EC8: + add r0, r1, #0 + bl ov77_021D2F0C + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _021D2F06 +_021D2ED6: + add r1, #0x18 + add r0, r1, #0 + bl ov77_021D2F38 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _021D2F06 +_021D2EE6: + add r0, r1, #0 + ldr r1, [r1, #4] + add r0, #0x18 + bl ov77_021D30D0 + cmp r0, #0 + beq _021D2F06 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _021D2F06 +_021D2EFC: + add r0, r1, #0 + bl ov77_021D3234 + mov r0, #1 + pop {r4, pc} +_021D2F06: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D2E9C + + thumb_func_start ov77_021D2F0C +ov77_021D2F0C: ; 0x021D2F0C + push {r4, lr} + add r4, r0, #0 + bl ov77_021D25B0 + add r0, r4, #0 + bl ov77_021D2610 + ldr r0, [r4, #0xc] + str r0, [r4, #0x24] + bl ov77_021D670C + str r0, [r4, #0x2c] + ldr r0, _021D2F34 ; =ov77_021D2B30 + add r1, r4, #0 + bl sub_02017798 + mov r0, #1 + strb r0, [r4, #0x1a] + pop {r4, pc} + nop +_021D2F34: .word ov77_021D2B30 + thumb_func_end ov77_021D2F0C + + thumb_func_start ov77_021D2F38 +ov77_021D2F38: ; 0x021D2F38 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x10 + mov r3, #2 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x10 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x11 + mov r3, #2 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x12 + mov r3, #6 + bl sub_02006E60 + mov r2, #0 + str r2, [sp] + mov r0, #0x4c + str r0, [sp, #4] + mov r0, #0x80 + mov r1, #0xf + add r3, r2, #0 + bl sub_02006E84 + mov r3, #0 + str r3, [sp] + mov r0, #0x4c + str r0, [sp, #4] + mov r0, #0x80 + mov r1, #0xf + mov r2, #4 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x30 + mov r1, #0xf + mov r3, #1 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x30 + mov r1, #0xd + mov r3, #1 + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x4c + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x30 + mov r1, #0xe + add r3, r2, #0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x13 + mov r3, #3 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x13 + mov r3, #7 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x72 + mov r3, #5 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x80 + mov r1, #0x71 + mov r3, #5 + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x4c + str r0, [sp, #4] + mov r0, #0x80 + mov r1, #0x73 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D30C8 ; =0x04000050 + mov r1, #2 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D30CC ; =0x04001050 + mov r1, #2 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + mov r0, #1 + add r1, r0, #0 + bl sub_020C12B4 + mov r0, #0 + bl sub_0200F338 + mov r0, #1 + bl sub_0200F338 + bl sub_0201FFD0 + add sp, #0x10 + pop {r4, pc} + nop +_021D30C8: .word 0x04000050 +_021D30CC: .word 0x04001050 + thumb_func_end ov77_021D2F38 + + thumb_func_start ov77_021D30D0 +ov77_021D30D0: ; 0x021D30D0 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x14] + add r5, r1, #0 + bl ov77_021D69C0 + ldrb r0, [r4, #1] + cmp r0, #5 + bls _021D30E6 + b _021D3208 +_021D30E6: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D30F2: ; jump table + .short _021D30FE - _021D30F2 - 2 ; case 0 + .short _021D3122 - _021D30F2 - 2 ; case 1 + .short _021D3148 - _021D30F2 - 2 ; case 2 + .short _021D31AE - _021D30F2 - 2 ; case 3 + .short _021D31CE - _021D30F2 - 2 ; case 4 + .short _021D31FA - _021D30F2 - 2 ; case 5 +_021D30FE: + mov r2, #0 + strb r2, [r4, #7] + strb r2, [r4, #6] + ldr r0, _021D3210 ; =ov77_021D32A4 + strb r2, [r4, #8] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x10] + mov r0, #1 + ldr r1, _021D3214 ; =0x00000494 + add r2, r0, #0 + bl sub_02004550 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D3208 +_021D3122: + ldrb r0, [r4, #8] + cmp r0, #0 + beq _021D3208 + cmp r5, #0x73 + blt _021D3208 + mov r2, #0 + strb r2, [r4, #7] + mov r0, #0x10 + strb r0, [r4, #6] + ldr r0, _021D3218 ; =ov77_021D3300 + strb r2, [r4, #8] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x10] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D3208 +_021D3148: + ldrb r0, [r4, #8] + cmp r0, #0 + beq _021D3208 + ldr r0, _021D321C ; =0x00000109 + cmp r5, r0 + blt _021D3208 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D3220 ; =0x04000050 + mov r1, #4 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + mov r0, #0x10 + str r0, [sp] + ldr r0, _021D3224 ; =0x04001050 + mov r1, #4 + mov r2, #8 + mov r3, #0 + bl sub_020BF55C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF74 + mov r2, #0 + strb r2, [r4, #7] + strb r2, [r4, #6] + ldr r0, _021D3228 ; =ov77_021D3360 + strb r2, [r4, #8] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x10] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D3208 +_021D31AE: + ldrb r0, [r4, #8] + cmp r0, #0 + beq _021D3208 + mov r2, #0 + strb r2, [r4, #7] + strb r2, [r4, #6] + ldr r0, _021D322C ; =ov77_021D33A8 + strb r2, [r4, #8] + add r1, r4, #0 + bl sub_0200D9E8 + str r0, [r4, #0x10] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D3208 +_021D31CE: + ldrb r0, [r4, #8] + cmp r0, #0 + beq _021D3208 + ldr r0, _021D3230 ; =0x000001EA + cmp r5, r0 + blt _021D3208 + mov r0, #0x12 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #2 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D3208 +_021D31FA: + bl sub_0200F2AC + cmp r0, #0 + beq _021D3208 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D3208: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_021D3210: .word ov77_021D32A4 +_021D3214: .word 0x00000494 +_021D3218: .word ov77_021D3300 +_021D321C: .word 0x00000109 +_021D3220: .word 0x04000050 +_021D3224: .word 0x04001050 +_021D3228: .word ov77_021D3360 +_021D322C: .word ov77_021D33A8 +_021D3230: .word 0x000001EA + thumb_func_end ov77_021D30D0 + + thumb_func_start ov77_021D3234 +ov77_021D3234: ; 0x021D3234 + push {r4, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + ldrb r0, [r4, #0x1a] + cmp r0, #0 + beq _021D3286 + ldr r0, [r4, #0x2c] + bl ov77_021D67B0 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #6 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #7 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #5 + bl sub_02019044 + ldr r0, [r4, #0xc] + bl sub_020181C4 + mov r0, #0 + strb r0, [r4, #0x1a] +_021D3286: + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _021D32A0 + ldr r0, [r4, #8] + cmp r0, #0 + bne _021D3296 + bl sub_02022974 +_021D3296: + ldr r0, [r4, #0x28] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x28] +_021D32A0: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D3234 + + thumb_func_start ov77_021D32A4 +ov77_021D32A4: ; 0x021D32A4 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r1, [r4, #7] + add r1, r1, #1 + strb r1, [r4, #7] + ldrb r1, [r4, #7] + cmp r1, #6 + blo _021D32C0 + mov r1, #0 + strb r1, [r4, #7] + ldrb r1, [r4, #6] + add r1, r1, #1 + strb r1, [r4, #6] +_021D32C0: + ldrb r1, [r4, #6] + cmp r1, #0x10 + blo _021D32D2 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #1 + strb r0, [r4, #8] +_021D32D2: + mov r0, #0x10 + str r0, [sp] + ldrb r3, [r4, #6] + ldr r0, _021D32F8 ; =0x04000050 + mov r1, #2 + mov r2, #8 + bl sub_020BF55C + mov r0, #0x10 + str r0, [sp] + ldrb r3, [r4, #6] + ldr r0, _021D32FC ; =0x04001050 + mov r1, #2 + mov r2, #8 + bl sub_020BF55C + add sp, #4 + pop {r3, r4, pc} + nop +_021D32F8: .word 0x04000050 +_021D32FC: .word 0x04001050 + thumb_func_end ov77_021D32A4 + + thumb_func_start ov77_021D3300 +ov77_021D3300: ; 0x021D3300 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r1, [r4, #7] + add r1, r1, #1 + strb r1, [r4, #7] + ldrb r1, [r4, #7] + cmp r1, #4 + blo _021D331C + mov r1, #0 + strb r1, [r4, #7] + ldrb r1, [r4, #6] + sub r1, r1, #1 + strb r1, [r4, #6] +_021D331C: + ldrb r1, [r4, #6] + cmp r1, #0 + bne _021D3332 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x10] + mov r1, #1 + strb r1, [r4, #8] + ldr r0, [r4, #0x18] + strb r1, [r0] +_021D3332: + mov r0, #0x10 + str r0, [sp] + ldrb r3, [r4, #6] + ldr r0, _021D3358 ; =0x04000050 + mov r1, #2 + mov r2, #8 + bl sub_020BF55C + mov r0, #0x10 + str r0, [sp] + ldrb r3, [r4, #6] + ldr r0, _021D335C ; =0x04001050 + mov r1, #2 + mov r2, #8 + bl sub_020BF55C + add sp, #4 + pop {r3, r4, pc} + nop +_021D3358: .word 0x04000050 +_021D335C: .word 0x04001050 + thumb_func_end ov77_021D3300 + + thumb_func_start ov77_021D3360 +ov77_021D3360: ; 0x021D3360 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r1, [r4, #7] + add r1, r1, #1 + strb r1, [r4, #7] + ldrb r1, [r4, #7] + cmp r1, #4 + blo _021D337C + mov r1, #0 + strb r1, [r4, #7] + ldrb r1, [r4, #6] + add r1, r1, #1 + strb r1, [r4, #6] +_021D337C: + ldrb r1, [r4, #6] + cmp r1, #0x10 + blo _021D338E + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #1 + strb r0, [r4, #8] +_021D338E: + mov r0, #0x10 + str r0, [sp] + ldrb r3, [r4, #6] + ldr r0, _021D33A4 ; =0x04000050 + mov r1, #4 + mov r2, #8 + bl sub_020BF55C + add sp, #4 + pop {r3, r4, pc} + nop +_021D33A4: .word 0x04000050 + thumb_func_end ov77_021D3360 + + thumb_func_start ov77_021D33A8 +ov77_021D33A8: ; 0x021D33A8 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldrb r1, [r4, #7] + add r1, r1, #1 + strb r1, [r4, #7] + ldrb r1, [r4, #7] + cmp r1, #4 + blo _021D33C4 + mov r1, #0 + strb r1, [r4, #7] + ldrb r1, [r4, #6] + add r1, r1, #1 + strb r1, [r4, #6] +_021D33C4: + ldrb r1, [r4, #6] + cmp r1, #0x10 + blo _021D33D6 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #1 + strb r0, [r4, #8] +_021D33D6: + mov r0, #0x10 + str r0, [sp] + ldrb r3, [r4, #6] + ldr r0, _021D33EC ; =0x04001050 + mov r1, #4 + mov r2, #8 + bl sub_020BF55C + add sp, #4 + pop {r3, r4, pc} + nop +_021D33EC: .word 0x04001050 + thumb_func_end ov77_021D33A8 + + thumb_func_start ov77_021D33F0 +ov77_021D33F0: ; 0x021D33F0 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + add r4, r5, #0 + add r4, #0x34 + cmp r0, #0 + beq _021D3402 + mov r0, #4 + strb r0, [r4] +_021D3402: + ldrb r0, [r4] + cmp r0, #4 + bhi _021D34A4 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D3414: ; jump table + .short _021D341E - _021D3414 - 2 ; case 0 + .short _021D342C - _021D3414 - 2 ; case 1 + .short _021D343C - _021D3414 - 2 ; case 2 + .short _021D3458 - _021D3414 - 2 ; case 3 + .short _021D349A - _021D3414 - 2 ; case 4 +_021D341E: + add r0, r5, #0 + bl ov77_021D34A8 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _021D34A4 +_021D342C: + add r5, #0x34 + add r0, r5, #0 + bl ov77_021D37C0 + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _021D34A4 +_021D343C: + add r0, r5, #0 + add r0, #0x34 + mov r1, #0 + bl ov77_021D40DC + cmp r0, #1 + bne _021D34A4 + mov r0, #1 + add r5, #0x3a + strb r0, [r5] + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] + b _021D34A4 +_021D3458: + add r1, r5, #0 + ldr r2, [r5, #4] + add r0, r5, #0 + add r1, #0x34 + bl ov77_021D4230 + cmp r0, #0 + beq _021D346E + ldrb r0, [r4] + add r0, r0, #1 + strb r0, [r4] +_021D346E: + ldr r0, [r5, #0x48] + bl ov77_021D6020 + add r0, r5, #0 + add r0, #0x3a + ldrb r0, [r0] + cmp r0, #0 + beq _021D3492 + add r0, r5, #0 + add r0, #0x39 + ldrb r0, [r0] + cmp r0, #0 + bne _021D34A4 + add r5, #0x34 + add r0, r5, #0 + bl ov77_021D4188 + b _021D34A4 +_021D3492: + ldr r0, [r5, #0x50] + bl ov77_021D6E50 + b _021D34A4 +_021D349A: + add r0, r5, #0 + bl ov77_021D36F8 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D34A4: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov77_021D33F0 + + thumb_func_start ov77_021D34A8 +ov77_021D34A8: ; 0x021D34A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + bl ov77_021D25D0 + add r0, r5, #0 + bl ov77_021D2724 + add r0, r5, #0 + bl ov77_021D2A58 + bl ov77_021D555C + add r4, r0, #0 + bl ov77_021D6CB8 + add r6, r0, #0 + mov r0, #0x4c + add r1, r4, #0 + bl sub_02018144 + str r0, [r5, #0x48] + mov r0, #0x10 + bl ov77_021D6734 + str r0, [r5, #0x4c] + mov r0, #0x4c + add r1, r6, #0 + bl sub_02018144 + str r0, [r5, #0x50] + ldr r0, [r5, #0x48] + mov r1, #0 + add r2, r4, #0 + bl sub_020D5124 + ldr r0, [r5, #0x50] + mov r1, #0 + add r2, r6, #0 + bl sub_020D5124 + add r0, r5, #0 + mov r1, #4 + add r0, #0x3c + strb r1, [r0] + ldr r0, [r5, #0x50] + bl ov77_021D6CFC + ldr r0, [r5, #0xc] + mov r1, #0 + str r0, [r5, #0x44] + ldr r0, _021D3598 ; =0x021BF6DC + strb r1, [r0, #5] + bl sub_0201FFE8 + ldr r6, _021D359C ; =0x021D776C + ldr r7, _021D35A0 ; =0x021D7444 + mov r4, #0 +_021D351C: + mov r0, #0xc + add r1, r4, #0 + mul r1, r0 + add r3, r6, r1 + ldr r2, [r3, #4] + ldr r1, [r6, r1] + ldr r3, [r3, #8] + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + lsl r3, r3, #0x10 + add r0, r4, #0 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + asr r3, r3, #0x10 + bl sub_020AF51C + lsl r1, r4, #1 + ldrh r1, [r7, r1] + add r0, r4, #0 + bl sub_020AF558 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021D351C + ldr r0, _021D35A4 ; =0x00004210 + ldr r1, _021D35A8 ; =0x0000318A + mov r2, #0 + bl sub_020AF56C + ldr r0, _021D35AC ; =0x00004A52 + ldr r1, _021D35B0 ; =0x000039CE + mov r2, #0 + bl sub_020AF590 + mov r0, #0x1f + str r0, [sp] + mov r0, #2 + lsl r0, r0, #0xe + mov r1, #0 + str r0, [sp, #4] + mov r0, #0xd + mov r2, #2 + add r3, r1, #0 + bl sub_020AF5B4 + ldr r0, _021D35B4 ; =ov77_021D2B38 + add r1, r5, #0 + bl sub_02017798 + mov r0, #0xf + mvn r0, r0 + mov r1, #8 + mov r2, #1 + bl sub_0200AB4C + mov r0, #1 + add r5, #0x36 + strb r0, [r5] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3598: .word 0x021BF6DC +_021D359C: .word 0x021D776C +_021D35A0: .word 0x021D7444 +_021D35A4: .word 0x00004210 +_021D35A8: .word 0x0000318A +_021D35AC: .word 0x00004A52 +_021D35B0: .word 0x000039CE +_021D35B4: .word ov77_021D2B38 + thumb_func_end ov77_021D34A8 + + thumb_func_start ov77_021D35B8 +ov77_021D35B8: ; 0x021D35B8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, #0x38 + ldrb r0, [r0] + cmp r0, #0 + bne _021D35CE + add r0, r5, #0 + add r0, #0x39 + ldrb r0, [r0] + cmp r0, #0 + beq _021D3618 +_021D35CE: + bl sub_020203E0 + ldr r0, [r5, #0x5c] + bl sub_020203B8 + mov r0, #0x27 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r6, #0 + cmp r0, #0 + ble _021D35FE + mov r7, #0x27 + add r4, r5, #0 + lsl r7, r7, #4 +_021D35EA: + add r0, r4, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, [r5, r7] + add r6, r6, #1 + add r4, #0x58 + cmp r6, r0 + blt _021D35EA +_021D35FE: + mov r0, #0x27 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r5, r0] + ldr r0, [r5, #0x54] + bl sub_020181C4 + add r0, r5, #0 + mov r1, #0 + add r0, #0x38 + strb r1, [r0] + add r5, #0x39 + strb r1, [r5] +_021D3618: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov77_021D35B8 + + thumb_func_start ov77_021D361C +ov77_021D361C: ; 0x021D361C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x36 + ldrb r0, [r0] + add r4, r1, #0 + cmp r0, #0 + beq _021D36F0 + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _021D36F0 + ldr r1, _021D36F4 ; =0x0000028E + ldrb r1, [r5, r1] + cmp r1, #0 + bne _021D3670 + mov r1, #3 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #1 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #4 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #5 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #6 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #7 + bl sub_02019044 + b _021D36E2 +_021D3670: + cmp r1, #1 + bne _021D36A4 + mov r1, #3 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #1 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #5 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #6 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #7 + bl sub_02019044 + b _021D36E2 +_021D36A4: + mov r1, #0 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #3 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #1 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #4 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #5 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #6 + bl sub_02019044 + ldr r0, [r5, #0xc] + mov r1, #7 + bl sub_02019044 +_021D36E2: + cmp r4, #1 + bne _021D36F0 + ldr r0, [r5, #0xc] + bl sub_020181C4 + mov r0, #0 + str r0, [r5, #0xc] +_021D36F0: + pop {r3, r4, r5, pc} + nop +_021D36F4: .word 0x0000028E + thumb_func_end ov77_021D361C + + thumb_func_start ov77_021D36F8 +ov77_021D36F8: ; 0x021D36F8 + push {r4, lr} + mov r3, #1 + lsl r3, r3, #0x1a + ldr r2, [r3, #0] + ldr r1, _021D37B8 ; =0xFFFF1FFF + add r4, r0, #0 + and r1, r2 + str r1, [r3, #0] + bl ov77_021D35B8 + add r0, r4, #0 + add r0, #0x37 + ldrb r0, [r0] + cmp r0, #0 + beq _021D3724 + ldr r0, [r4, #0x48] + bl ov77_021D5BAC + add r0, r4, #0 + mov r1, #0 + add r0, #0x37 + strb r1, [r0] +_021D3724: + add r0, r4, #0 + add r0, #0x36 + ldrb r0, [r0] + cmp r0, #0 + beq _021D3788 + ldr r0, [r4, #0x4c] + cmp r0, #0 + beq _021D373C + bl ov77_021D6760 + mov r0, #0 + str r0, [r4, #0x4c] +_021D373C: + ldr r0, [r4, #0x48] + cmp r0, #0 + beq _021D374A + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x48] +_021D374A: + ldr r0, [r4, #0x50] + cmp r0, #0 + beq _021D375E + bl ov77_021D6E28 + ldr r0, [r4, #0x50] + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0x50] +_021D375E: + add r0, r4, #0 + mov r1, #1 + bl ov77_021D361C + mov r0, #0x9d + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D377C + bl sub_020181C4 + mov r0, #0x9d + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_021D377C: + ldr r0, [r4, #0x10] + bl sub_020242C4 + mov r0, #0 + add r4, #0x36 + strb r0, [r4] +_021D3788: + bl sub_020B2628 + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D37B8 ; =0xFFFF1FFF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D37BC ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + pop {r4, pc} + nop +_021D37B8: .word 0xFFFF1FFF +_021D37BC: .word 0x04001000 + thumb_func_end ov77_021D36F8 + + thumb_func_start ov77_021D37C0 +ov77_021D37C0: ; 0x021D37C0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x80 + mov r1, #0x4c + bl sub_02006C24 + mov r3, #6 + lsl r3, r3, #6 + str r3, [sp] + mov r1, #0x40 + str r1, [sp, #4] + mov r1, #0x4c + str r1, [sp, #8] + mov r1, #0x60 + mov r2, #0 + add r4, r0, #0 + bl sub_02007148 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x5f + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0xc + mov r3, #3 + bl sub_0200710C + mov r3, #7 + lsl r3, r3, #6 + str r3, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xd + mov r2, #0 + bl sub_02007148 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0xe + mov r3, #2 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0xc + mov r3, #2 + bl sub_0200710C + mov r0, #0x41 + mov r1, #0x4c + bl sub_02006C24 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r1, #0x4c + str r1, [sp, #0xc] + ldr r2, [r5, #0x10] + mov r1, #0x38 + mov r3, #1 + add r6, r0, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r6, #0 + mov r1, #0x39 + mov r3, #1 + bl sub_0200710C + mov r0, #1 + lsl r0, r0, #0xa + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r6, #0 + mov r1, #0x39 + mov r3, #1 + bl sub_0200710C + mov r0, #0x20 + str r0, [sp] + mov r0, #0x4c + mov r2, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r1, #0x37 + add r3, r2, #0 + bl sub_02007130 + add r0, r6, #0 + bl sub_02006CA8 + mov r3, #0 + str r3, [sp] + mov r0, #0x4c + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x3d + mov r2, #4 + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x3b + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x3f + mov r3, #5 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x3a + mov r3, #6 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x3e + mov r3, #6 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x3c + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x40 + mov r3, #7 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0xe + mov r3, #4 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0xc + mov r3, #4 + bl sub_0200710C + mov r3, #7 + lsl r3, r3, #6 + str r3, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0xd + mov r2, #4 + bl sub_02007148 + ldr r0, [r5, #0x14] + bl ov77_021D5564 + ldr r0, [r5, #0x14] + bl ov77_021D5C3C + ldr r0, [r5, #0x14] + ldr r1, [r5, #0x18] + bl ov77_021D5FB4 + mov r1, #5 + mov r0, #0 + lsl r1, r1, #0x18 + mov r2, #2 + bl sub_020C4AF0 + ldr r1, _021D3A0C ; =0x05000400 + mov r0, #0 + mov r2, #2 + bl sub_020C4AF0 + mov r0, #0xe + mov r1, #0 + bl sub_0201FF0C + mov r0, #0xf + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + bl sub_0200F338 + mov r0, #1 + bl sub_0200F338 + add r0, r4, #0 + bl sub_02006CA8 + mov r0, #1 + strb r0, [r5, #3] + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_021D3A0C: .word 0x05000400 + thumb_func_end ov77_021D37C0 + + thumb_func_start ov77_021D3A10 +ov77_021D3A10: ; 0x021D3A10 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #2 + add r3, r2, #0 + bl sub_02018898 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #3 + add r3, r2, #0 + bl sub_02018898 + ldr r1, _021D3B54 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + strh r2, [r1] + mov r0, #1 + mov r1, #3 + bl sub_02019060 + mov r0, #0x80 + mov r1, #0x4c + bl sub_02006C24 + mov r2, #0 + str r2, [sp] + mov r1, #0x4c + str r1, [sp, #4] + mov r1, #0x44 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x42 + mov r3, #1 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x46 + mov r3, #1 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x41 + mov r3, #2 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x45 + mov r3, #2 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x43 + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x47 + mov r3, #3 + bl sub_0200710C + mov r1, #5 + mov r0, #0 + lsl r1, r1, #0x18 + mov r2, #2 + bl sub_020C4AF0 + ldr r1, _021D3B58 ; =0x05000400 + mov r0, #0 + mov r2, #2 + bl sub_020C4AF0 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #1 + add r3, r2, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #5 + add r3, r2, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #6 + add r3, r2, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r5, #0x10] + mov r1, #7 + add r3, r2, #0 + bl sub_02019184 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_021D3B54: .word 0x04000008 +_021D3B58: .word 0x05000400 + thumb_func_end ov77_021D3A10 + + thumb_func_start ov77_021D3B5C +ov77_021D3B5C: ; 0x021D3B5C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + bl ov77_021D2828 + mov r0, #0x80 + mov r1, #0x4c + bl sub_02006C24 + mov r2, #0 + str r2, [sp] + mov r1, #0x4c + str r1, [sp, #4] + mov r1, #0x48 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r3, #0 + str r3, [sp] + mov r0, #0x4c + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0x48 + mov r2, #4 + bl sub_02007130 + mov r1, #2 + mov r0, #0x4c + lsl r1, r1, #8 + bl sub_02018144 + mov r2, #9 + lsl r2, r2, #6 + str r0, [r5, r2] + mov r0, #5 + ldr r1, [r5, r2] + lsl r0, r0, #0x18 + sub r2, #0x40 + bl sub_020C4B18 + mov r1, #9 + lsl r1, r1, #6 + ldr r1, [r5, r1] + mov r0, #0 + mov r2, #2 + bl sub_020C4AF0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x49 + mov r3, #1 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0x4c + str r1, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r3, #1 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x49 + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r1, #0x4c + str r1, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r3, #5 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4a + mov r3, #2 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4d + mov r3, #2 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4a + mov r3, #6 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4d + mov r3, #6 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4b + mov r3, #3 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4e + mov r3, #3 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4b + mov r3, #7 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x4e + mov r3, #7 + bl sub_0200710C + mov r1, #5 + mov r0, #0 + lsl r1, r1, #0x18 + mov r2, #2 + bl sub_020C4AF0 + ldr r1, _021D3D48 ; =0x05000400 + mov r0, #0 + mov r2, #2 + bl sub_020C4AF0 + mov r2, #0 + add r3, r2, #0 + ldr r0, [r5, #0x10] + mov r1, #1 + sub r3, #0x80 + bl sub_02019184 + mov r2, #0 + add r3, r2, #0 + ldr r0, [r5, #0x10] + mov r1, #2 + sub r3, #0xc8 + bl sub_02019184 + mov r2, #0 + add r3, r2, #0 + ldr r0, [r5, #0x10] + mov r1, #3 + sub r3, #0x98 + bl sub_02019184 + ldr r0, [r5, #0x10] + mov r1, #5 + mov r2, #0 + mov r3, #0x80 + bl sub_02019184 + ldr r0, [r5, #0x10] + mov r1, #6 + mov r2, #0 + mov r3, #0xc0 + bl sub_02019184 + ldr r0, [r5, #0x10] + mov r1, #7 + mov r2, #0 + mov r3, #0xb0 + bl sub_02019184 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_021D3D48: .word 0x05000400 + thumb_func_end ov77_021D3B5C + + thumb_func_start ov77_021D3D4C +ov77_021D3D4C: ; 0x021D3D4C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + bl ov77_021D2900 + mov r0, #0x80 + mov r1, #0x4c + bl sub_02006C24 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + mov r1, #0x4c + str r1, [sp, #0xc] + ldr r2, [r5, #0x10] + mov r1, #0x4f + add r4, r0, #0 + bl sub_020070E8 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + str r3, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x50 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x51 + mov r3, #4 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r5, #0x10] + add r0, r4, #0 + mov r1, #0x52 + mov r3, #4 + bl sub_0200710C + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov77_021D3D4C + + thumb_func_start ov77_021D3DC4 +ov77_021D3DC4: ; 0x021D3DC4 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D3ED8 ; =0x021BF6DC + ldrb r0, [r0, #5] + cmp r0, #0 + ldr r0, [r4, #0x10] + bne _021D3E50 + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r1, #3 + ldr r0, [r4, #0x10] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + add r3, #0xfd + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #6 + add r3, #0xfd + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #7 + add r3, #0xfd + bl sub_02019184 + mov r0, #1 + add r1, r0, #0 + bl sub_02019060 + mov r0, #2 + add r1, r0, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #0 + bl sub_02019060 + mov r0, #5 + mov r1, #1 + bl sub_02019060 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + mov r0, #7 + mov r1, #0 + bl sub_02019060 + b _021D3ECC +_021D3E50: + mov r2, #3 + add r3, r2, #0 + mov r1, #1 + add r3, #0xfd + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #2 + add r3, #0xfd + bl sub_02019184 + mov r1, #3 + add r3, r1, #0 + ldr r0, [r4, #0x10] + add r2, r1, #0 + add r3, #0xfd + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #5 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #7 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r0, #1 + add r1, r0, #0 + bl sub_02019060 + mov r0, #2 + add r1, r0, #0 + bl sub_02019060 + mov r0, #3 + mov r1, #0 + bl sub_02019060 + mov r0, #5 + mov r1, #1 + bl sub_02019060 + mov r0, #6 + mov r1, #2 + bl sub_02019060 + mov r0, #7 + mov r1, #0 + bl sub_02019060 +_021D3ECC: + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov77_021D636C + pop {r4, pc} + nop +_021D3ED8: .word 0x021BF6DC + thumb_func_end ov77_021D3DC4 + + thumb_func_start ov77_021D3EDC +ov77_021D3EDC: ; 0x021D3EDC + push {r4, lr} + lsl r2, r1, #2 + ldr r1, _021D3F20 ; =0x021D7458 + add r4, r0, #0 + ldr r1, [r1, r2] + mov r0, #0x80 + mov r2, #0x4c + bl sub_02006AC0 + str r0, [r4, #0x20] + bl sub_020B3C1C + str r0, [r4, #0x24] + bl sub_0201CBCC + cmp r0, #0 + bne _021D3F02 + bl sub_02022974 +_021D3F02: + ldr r0, [r4, #0x24] + ldr r0, [r0, #0x14] + cmp r0, #0 + bne _021D3F0E + bl sub_02022974 +_021D3F0E: + ldr r2, [r4, #0x24] + ldr r0, [r4, #0x20] + ldr r1, [r2, #0x14] + add r1, r2, r1 + sub r1, r1, r0 + bl sub_020182F0 + pop {r4, pc} + nop +_021D3F20: .word 0x021D7458 + thumb_func_end ov77_021D3EDC + + thumb_func_start ov77_021D3F24 +ov77_021D3F24: ; 0x021D3F24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + str r3, [sp] + cmp r3, #6 + ble _021D3F38 + mov r0, #6 + str r0, [sp] +_021D3F38: + mov r0, #0x80 + mov r1, #0x4c + bl sub_02006C24 + str r0, [sp, #8] + lsl r0, r4, #0x18 + lsr r7, r0, #0x18 + ldr r0, [sp] + cmp r7, r0 + bge _021D4036 + mov r0, #0x18 + ldr r1, _021D4040 ; =0x021D779C + mul r0, r6 + add r0, r1, r0 + str r0, [sp, #4] + add r0, r5, #0 + str r0, [sp, #0xc] + add r0, #0x2c + str r0, [sp, #0xc] +_021D3F5E: + ldr r0, [sp, #4] + lsl r1, r7, #2 + ldr r1, [r0, r1] + cmp r1, #0 + beq _021D4036 + mov r0, #0x58 + add r6, r7, #0 + mul r6, r0 + ldr r0, [sp, #8] + mov r2, #0x4c + bl sub_02006CB8 + add r1, r5, r6 + add r1, #0x80 + str r0, [r1, #0] + add r0, r5, r6 + add r0, #0x80 + ldr r0, [r0, #0] + ldr r1, [r5, #0x24] + bl sub_0201CBB0 + cmp r0, #0 + bne _021D3F90 + bl sub_02022974 +_021D3F90: + add r0, r5, r6 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_020B3C0C + ldrb r0, [r0, #9] + cmp r0, #1 + beq _021D3FA4 + bl sub_02022974 +_021D3FA4: + add r0, r5, r6 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_020B3C0C + cmp r0, #0 + beq _021D3FD2 + add r2, r0, #0 + add r2, #8 + beq _021D3FC6 + ldrb r1, [r0, #9] + cmp r1, #0 + bls _021D3FC6 + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _021D3FC8 +_021D3FC6: + mov r1, #0 +_021D3FC8: + cmp r1, #0 + beq _021D3FD2 + ldr r1, [r1, #0] + add r4, r0, r1 + b _021D3FD4 +_021D3FD2: + mov r4, #0 +_021D3FD4: + cmp r4, #0 + bne _021D3FDC + bl sub_02022974 +_021D3FDC: + ldr r0, [sp, #0xc] + add r1, r4, #0 + add r0, r0, r6 + bl sub_020AE608 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x40 + bl sub_020B2CE4 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x80 + bl sub_020B2CE4 + mov r2, #2 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #8 + bl sub_020B2CE4 + mov r2, #1 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #0xa + bl sub_020B2CE4 + add r0, r4, #0 + mov r1, #0 + mov r2, #0xf + bl sub_020B2D8C + mov r0, #0x8f + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r0, #1 + mov r0, #0x8f + lsl r0, r0, #2 + str r1, [r5, r0] + add r0, r7, #1 + lsl r0, r0, #0x18 + lsr r7, r0, #0x18 + ldr r0, [sp] + cmp r7, r0 + blt _021D3F5E +_021D4036: + ldr r0, [sp, #8] + bl sub_02006CA8 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4040: .word 0x021D779C + thumb_func_end ov77_021D3F24 + + thumb_func_start ov77_021D4044 +ov77_021D4044: ; 0x021D4044 + push {r4, r5, lr} + sub sp, #0x24 + add r4, r0, #0 + mov r0, #0x4c + bl sub_020203AC + add r3, sp, #0x18 + ldr r5, _021D40A0 ; =0x021D7494 + str r0, [r4, #0x28] + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + ldr r1, _021D40A4 ; =0x0029AEC1 + str r0, [r3, #0] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r4, #0x28] + ldr r3, _021D40A8 ; =0x000005C1 + str r0, [sp, #8] + add r0, r2, #0 + ldr r2, _021D40AC ; =0x021D7500 + bl sub_020206D0 + ldr r0, _021D40B0 ; =0x00000981 + ldr r1, [r4, #0x28] + bl sub_02020910 + ldr r5, _021D40B4 ; =0x021D7464 + add r3, sp, #0xc + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r1, [r4, #0x28] + add r0, r2, #0 + bl sub_02020990 + ldr r0, [r4, #0x28] + bl sub_020203D4 + add sp, #0x24 + pop {r4, r5, pc} + nop +_021D40A0: .word 0x021D7494 +_021D40A4: .word 0x0029AEC1 +_021D40A8: .word 0x000005C1 +_021D40AC: .word 0x021D7500 +_021D40B0: .word 0x00000981 +_021D40B4: .word 0x021D7464 + thumb_func_end ov77_021D4044 + + thumb_func_start ov77_021D40B8 +ov77_021D40B8: ; 0x021D40B8 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + bl ov77_021D3EDC + add r0, r4, #0 + add r1, r5, #0 + mov r2, #0 + mov r3, #6 + bl ov77_021D3F24 + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4044 + mov r0, #1 + strb r0, [r4, #4] + pop {r3, r4, r5, pc} + thumb_func_end ov77_021D40B8 + + thumb_func_start ov77_021D40DC +ov77_021D40DC: ; 0x021D40DC + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + ldrb r2, [r4, #9] + bne _021D4126 + cmp r2, #0 + beq _021D40F2 + cmp r2, #1 + beq _021D4104 + cmp r2, #2 + b _021D410E +_021D40F2: + mov r2, #1 + strb r2, [r4, #5] + bl ov77_021D3EDC + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4044 + b _021D417C +_021D4104: + mov r2, #0 + mov r3, #1 + bl ov77_021D3F24 + b _021D417C +_021D410E: + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + mov r3, #6 + bl ov77_021D3F24 + mov r0, #0 + strb r0, [r4, #9] + strb r0, [r4, #5] + mov r0, #1 + strb r0, [r4, #4] + pop {r3, r4, r5, pc} +_021D4126: + cmp r2, #3 + bhi _021D4164 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D4136: ; jump table + .short _021D413E - _021D4136 - 2 ; case 0 + .short _021D4150 - _021D4136 - 2 ; case 1 + .short _021D415A - _021D4136 - 2 ; case 2 + .short _021D4164 - _021D4136 - 2 ; case 3 +_021D413E: + mov r2, #1 + strb r2, [r4, #5] + bl ov77_021D3EDC + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4044 + b _021D417C +_021D4150: + mov r2, #0 + mov r3, #2 + bl ov77_021D3F24 + b _021D417C +_021D415A: + mov r2, #2 + mov r3, #4 + bl ov77_021D3F24 + b _021D417C +_021D4164: + add r0, r4, #0 + add r1, r5, #0 + mov r2, #4 + mov r3, #6 + bl ov77_021D3F24 + mov r0, #0 + strb r0, [r4, #9] + strb r0, [r4, #5] + mov r0, #1 + strb r0, [r4, #4] + pop {r3, r4, r5, pc} +_021D417C: + ldrb r0, [r4, #9] + add r0, r0, #1 + strb r0, [r4, #9] + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D40DC + + thumb_func_start ov77_021D4188 +ov77_021D4188: ; 0x021D4188 + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + ldr r4, _021D4224 ; =0x021D76D0 + add r5, r0, #0 + add r3, sp, #0x18 + mov r2, #4 +_021D4194: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D4194 + ldr r0, [r4, #0] + add r2, sp, #0xc + str r0, [r3, #0] + ldr r3, _021D4228 ; =0x021D7488 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r1, sp, #0 + str r0, [r2, #0] + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + bl sub_020B2628 + bl sub_020241B4 + bl sub_020203EC + mov r0, #0x97 + lsl r0, r0, #2 + ldrb r1, [r5, r0] + cmp r1, #1 + bne _021D41FE + sub r0, #0x20 + ldr r0, [r5, r0] + mov r4, #0 + cmp r0, #0 + ble _021D41FE + add r6, r5, #0 + mov r7, #0x8f + add r6, #0x2c + lsl r7, r7, #2 +_021D41DE: + bl sub_020C2BE8 + mov r0, #0x58 + mul r0, r4 + add r0, r6, r0 + add r1, sp, #0 + add r2, sp, #0x18 + add r3, sp, #0xc + bl sub_0201CA74 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + ldr r0, [r5, r7] + cmp r4, r0 + blt _021D41DE +_021D41FE: + ldr r0, _021D422C ; =0x0000025D + ldrb r0, [r5, r0] + cmp r0, #1 + bne _021D4216 + bl sub_020B2628 + bl sub_020241B4 + bl sub_0201469C + bl sub_020146C0 +_021D4216: + mov r0, #0 + mov r1, #1 + bl sub_020241BC + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_021D4224: .word 0x021D76D0 +_021D4228: .word 0x021D7488 +_021D422C: .word 0x0000025D + thumb_func_end ov77_021D4188 + + thumb_func_start ov77_021D4230 +ov77_021D4230: ; 0x021D4230 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r6, r0, #0 + ldrb r0, [r4, #7] + add r5, r2, #0 + cmp r0, #0 + bne _021D424C + mov r1, #0x91 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + ldr r0, [r4, #0x18] + bl ov77_021D6BA0 +_021D424C: + ldrb r0, [r4, #7] + ldrb r1, [r4, #8] + add r0, r0, #1 + bl sub_020E1F6C + strb r1, [r4, #7] + ldrb r0, [r4, #1] + cmp r0, #0x13 + bhi _021D42D0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D426A: ; jump table + .short _021D4292 - _021D426A - 2 ; case 0 + .short _021D42BE - _021D426A - 2 ; case 1 + .short _021D4318 - _021D426A - 2 ; case 2 + .short _021D43D8 - _021D426A - 2 ; case 3 + .short _021D4428 - _021D426A - 2 ; case 4 + .short _021D45C2 - _021D426A - 2 ; case 5 + .short _021D469C - _021D426A - 2 ; case 6 + .short _021D46D2 - _021D426A - 2 ; case 7 + .short _021D4742 - _021D426A - 2 ; case 8 + .short _021D47D8 - _021D426A - 2 ; case 9 + .short _021D4878 - _021D426A - 2 ; case 10 + .short _021D48B8 - _021D426A - 2 ; case 11 + .short _021D4906 - _021D426A - 2 ; case 12 + .short _021D4946 - _021D426A - 2 ; case 13 + .short _021D4986 - _021D426A - 2 ; case 14 + .short _021D49D0 - _021D426A - 2 ; case 15 + .short _021D4AA6 - _021D426A - 2 ; case 16 + .short _021D4AD6 - _021D426A - 2 ; case 17 + .short _021D4B24 - _021D426A - 2 ; case 18 + .short _021D4B4E - _021D426A - 2 ; case 19 +_021D4292: + mov r0, #0xa + lsl r0, r0, #6 + cmp r5, r0 + blt _021D42D0 + mov r0, #3 + mov r1, #1 + bl sub_02019120 + mov r0, #1 + mov r1, #0 + str r0, [sp] + mov r0, #8 + add r2, r1, #0 + sub r2, #0x10 + add r3, r0, #0 + bl sub_0200AAE0 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + bl _021D4B54 +_021D42BE: + mov r0, #1 + bl sub_0200AC1C + cmp r0, #1 + bne _021D42D0 + mov r0, #0xaf + lsl r0, r0, #2 + cmp r5, r0 + beq _021D42D4 +_021D42D0: + bl _021D4B54 +_021D42D4: + mov r0, #0 + mov r1, #1 + bl sub_02019120 + ldr r0, [r4, #0x1c] + mov r1, #9 + bl ov77_021D6CD0 + ldr r0, [r4, #0x1c] + mov r1, #0xa + bl ov77_021D6CD0 + ldr r0, [r4, #0x1c] + mov r1, #0xb + bl ov77_021D6CD0 + mov r1, #0 + ldr r0, _021D45DC ; =0x04000050 + mov r2, #0xf + add r3, r1, #0 + str r1, [sp] + bl sub_020BF55C + ldr r0, _021D45E0 ; =0x0000025D + mov r1, #1 + strb r1, [r4, r0] + ldr r0, [r4, #0x14] + bl ov77_021D6050 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + bl _021D4B54 +_021D4318: + ldr r0, _021D45E4 ; =0x00000311 + cmp r5, r0 + bne _021D4336 + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + mov r1, #0 + str r0, [sp, #8] + ldr r3, _021D45E8 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 +_021D4336: + ldr r0, _021D45EC ; =0x00000316 + cmp r5, r0 + bne _021D4368 + bl sub_0200F2AC + cmp r0, #1 + beq _021D4348 + bl sub_02022974 +_021D4348: + ldr r0, _021D45F0 ; =0x00000247 + mov r2, #4 + strb r2, [r4, r0] + mov r1, #8 + add r0, r0, #1 + strb r1, [r4, r0] + str r2, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + ldr r3, _021D45E8 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 +_021D4368: + mov r0, #0x3b + lsl r0, r0, #4 + cmp r5, r0 + bne _021D439A + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + ldr r0, _021D45F4 ; =0x0000025B + mov r3, #1 + strb r3, [r4, r0] + add r1, r0, #2 + mov r2, #0 + strb r2, [r4, r1] + add r0, r0, #1 + strb r3, [r4, r0] + ldr r0, [r4, #0x1c] + bl ov77_021D6CBC + bl sub_02014710 + cmp r0, #0 + beq _021D439A + bl sub_02022974 +_021D439A: + ldr r0, _021D45F8 ; =0x000003B1 + cmp r5, r0 + bne _021D43A8 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 +_021D43A8: + ldr r0, _021D45FC ; =0x000003CF + cmp r5, r0 + blt _021D4458 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #0x12 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + ldr r3, _021D45E8 ; =0x00007FFF + mov r0, #3 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #0x10 + strb r0, [r4, #8] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D43D8: + add r0, r6, #0 + add r1, r4, #0 + add r2, r5, #0 + bl ov77_021D513C + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4F38 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D6530 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D60E0 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D61B8 + ldr r0, _021D4600 ; =0x00000628 + cmp r5, r0 + blt _021D4458 + mov r0, #0x12 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + ldr r3, _021D45E8 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4428: + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4F38 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D6530 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D60E0 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D61B8 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4458 + mov r0, #0x19 + lsl r0, r0, #6 + cmp r5, r0 + bge _021D445A +_021D4458: + b _021D4B54 +_021D445A: + mov r0, #4 + mov r1, #0 + bl sub_02019120 + ldr r0, [r4, #0x14] + ldr r1, [r4, #0x18] + bl ov77_021D6000 + mov r0, #0x91 + mov r1, #1 + lsl r0, r0, #2 + strb r1, [r4, r0] + add r0, r6, #0 + add r1, r4, #0 + bl ov77_021D3A10 + mov r1, #1 + ldr r0, [r4, #0x14] + add r2, r1, #0 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #2 + mov r2, #1 + bl ov77_021D603C + mov r0, #1 + add r1, r0, #0 + bl sub_02019120 + mov r0, #2 + mov r1, #1 + bl sub_02019120 + mov r0, #3 + mov r1, #1 + bl sub_02019120 + mov r0, #5 + mov r1, #1 + bl sub_02019120 + mov r0, #6 + mov r1, #1 + bl sub_02019120 + mov r0, #7 + mov r1, #1 + bl sub_02019120 + mov r1, #1 + add r3, r1, #0 + ldr r0, [r4, #0x10] + mov r2, #0 + add r3, #0xff + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #2 + add r3, #0xfd + bl sub_02019184 + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #3 + add r3, r2, #0 + bl sub_02019184 + mov r1, #3 + ldr r0, [r4, #0x10] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + mov r1, #5 + add r3, r1, #0 + ldr r0, [r4, #0x10] + mov r2, #0 + add r3, #0xfb + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #5 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #6 + add r3, r2, #0 + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #6 + add r3, #0xfd + bl sub_02019184 + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #7 + add r3, r2, #0 + bl sub_02019184 + ldr r0, [r4, #0x10] + mov r1, #7 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r2, #0x26 + lsl r2, r2, #4 + mov r0, #1 + lsl r0, r0, #0x14 + add r1, r2, #0 + str r0, [r4, r2] + add r6, r2, #0 + mov r0, #0 + sub r1, #0x16 + strh r0, [r4, r1] + add r1, r2, #0 + mov r5, #0xff + sub r1, #0x14 + strh r5, [r4, r1] + add r1, r2, #0 + mov r3, #0x20 + sub r1, #0x12 + strh r3, [r4, r1] + mov r1, #0x9f + sub r6, #0x10 + strh r1, [r4, r6] + add r6, r2, #0 + sub r6, #0xe + strh r0, [r4, r6] + add r6, r2, #0 + sub r6, #0xc + strh r5, [r4, r6] + add r5, r2, #0 + sub r5, #0xa + strh r3, [r4, r5] + add r3, r2, #0 + sub r3, #8 + strh r1, [r4, r3] + mov r1, #1 + sub r2, #0x1b + strb r1, [r4, r2] + ldr r2, _021D45DC ; =0x04000050 + strb r0, [r4, #6] + strh r0, [r2] + ldr r2, _021D4604 ; =0x04001050 + ldr r3, _021D45E8 ; =0x00007FFF + strh r0, [r2] + mov r2, #0x12 + str r2, [sp] + str r1, [sp, #4] + mov r2, #0x4c + str r2, [sp, #8] + add r2, r1, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D45C2: + add r0, r4, #0 + bl ov77_021D4B70 + ldr r0, [r4, #0x14] + bl ov77_021D607C + bl sub_0200F2AC + cmp r0, #0 + beq _021D46B0 + ldr r0, _021D4608 ; =0x00000726 + b _021D460C + nop +_021D45DC: .word 0x04000050 +_021D45E0: .word 0x0000025D +_021D45E4: .word 0x00000311 +_021D45E8: .word 0x00007FFF +_021D45EC: .word 0x00000316 +_021D45F0: .word 0x00000247 +_021D45F4: .word 0x0000025B +_021D45F8: .word 0x000003B1 +_021D45FC: .word 0x000003CF +_021D4600: .word 0x00000628 +_021D4604: .word 0x04001050 +_021D4608: .word 0x00000726 +_021D460C: + cmp r5, r0 + blt _021D46B0 + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #3 + add r3, r2, #0 + bl sub_0201C63C + mov r1, #3 + add r3, r1, #0 + ldr r0, [r4, #0x10] + add r2, r1, #0 + add r3, #0xfd + bl sub_0201C63C + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #7 + add r3, r2, #0 + bl sub_0201C63C + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #7 + add r3, #0xfd + bl sub_0201C63C + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #2 + add r3, r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #6 + add r3, r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + mov r0, #0x92 + mov r1, #0x22 + lsl r0, r0, #2 + strb r1, [r4, r0] + mov r1, #1 + sub r0, r0, #2 + strb r1, [r4, r0] + ldr r0, [r4, #0x14] + mov r2, #0 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #2 + mov r2, #0 + bl ov77_021D603C + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D469C: + add r0, r4, #0 + bl ov77_021D4BE4 + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4C04 + ldr r0, _021D49F8 ; =0x00000735 + cmp r5, r0 + beq _021D46B2 +_021D46B0: + b _021D4B54 +_021D46B2: + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D46D2: + add r0, r4, #0 + bl ov77_021D4BE4 + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4C04 + bl sub_0200F2AC + cmp r0, #0 + beq _021D47B6 + ldr r0, _021D49FC ; =0x00000247 + mov r1, #0x22 + strb r1, [r4, r0] + mov r2, #0 + mov r1, #0x44 + add r0, r0, #1 + strb r1, [r4, r0] + ldr r0, [r4, #0x10] + mov r1, #1 + add r3, r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #1 + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + add r3, r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #5 + mov r2, #3 + mov r3, #0 + bl sub_0201C63C + mov r0, #4 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4742: + add r0, r4, #0 + bl ov77_021D4BE4 + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4C04 + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D6470 + bl sub_0200F2AC + cmp r0, #0 + beq _021D47B6 + ldr r0, _021D4A00 ; =0x00000744 + cmp r5, r0 + bne _021D47B0 + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #1 + add r3, r2, #0 + bl sub_0201C63C + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #1 + add r3, #0xfd + bl sub_0201C63C + mov r2, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + add r3, r2, #0 + bl sub_0201C63C + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + add r3, #0xfd + bl sub_0201C63C + ldr r0, [r4, #0x14] + mov r1, #0xb + mov r2, #1 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0xc + mov r2, #1 + bl ov77_021D603C + b _021D4B54 +_021D47B0: + add r0, #0x3c + cmp r5, r0 + bge _021D47B8 +_021D47B6: + b _021D4B54 +_021D47B8: + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + ldr r3, _021D4A04 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D47D8: + ldr r0, [r4, #0x14] + add r1, r5, #0 + bl ov77_021D6470 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4868 + mov r0, #0x40 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + ldr r3, _021D4A04 ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + ldr r0, [r4, #0x14] + mov r1, #0xb + mov r2, #0 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0xc + mov r2, #0 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0xd + mov r2, #1 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0xe + mov r2, #1 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0xf + mov r2, #1 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0x10 + mov r2, #1 + bl ov77_021D603C + ldr r0, [r4, #0x14] + mov r1, #0 + bl ov77_021D636C + add r0, r6, #0 + add r1, r4, #0 + bl ov77_021D3B5C + ldr r0, _021D4A08 ; =0x021BF6DC + mov r1, #0 + strb r1, [r0, #5] + bl sub_0201FFE8 + add r0, r4, #0 + bl ov77_021D3DC4 + ldr r0, _021D4A0C ; =0x00000246 + mov r1, #1 + strb r1, [r4, r0] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4868: + add r0, r4, #0 + bl ov77_021D4BE4 + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4C04 + b _021D4B54 +_021D4878: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + add r0, r4, #0 + add r1, r5, #0 + bl ov77_021D4DC8 + bl sub_0200F2AC + cmp r0, #0 + beq _021D48CA + ldr r0, _021D4A10 ; =0x000007DA + cmp r5, r0 + blt _021D48CA + mov r0, #4 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D48B8: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + bne _021D48CC +_021D48CA: + b _021D4B54 +_021D48CC: + mov r1, #0 + ldr r0, _021D4A14 ; =0x04000050 + mov r2, #0x3e + add r3, r1, #0 + str r1, [sp] + bl sub_020BF55C + mov r1, #5 + mov r2, #2 + mov r0, #0 + lsl r1, r1, #0x18 + lsl r2, r2, #8 + bl sub_020C4AF0 + mov r0, #4 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4906: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + beq _021D49E2 + ldr r0, [r4, #0x1c] + mov r1, #0 + add r2, r5, #0 + bl ov77_021D6E78 + cmp r0, #0 + beq _021D49E2 + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4946: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + beq _021D49E2 + ldr r0, _021D4A08 ; =0x021BF6DC + mov r1, #1 + strb r1, [r0, #5] + bl sub_0201FFE8 + add r0, r4, #0 + bl ov77_021D3DC4 + mov r0, #4 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4986: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + beq _021D49E2 + ldr r0, _021D4A18 ; =0x00000852 + cmp r5, r0 + blt _021D49E2 + ldr r0, [r4, #0x1c] + mov r1, #1 + add r2, r5, #0 + bl ov77_021D6E78 + cmp r0, #0 + beq _021D49E2 + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0xc] + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D49D0: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + bne _021D49E4 +_021D49E2: + b _021D4B54 +_021D49E4: + mov r2, #9 + lsl r2, r2, #6 + ldr r0, [r4, r2] + mov r1, #5 + lsl r1, r1, #0x18 + sub r2, #0x40 + bl sub_020C4B18 + ldr r0, _021D4A08 ; =0x021BF6DC + b _021D4A1C + ; .align 2, 0 +_021D49F8: .word 0x00000735 +_021D49FC: .word 0x00000247 +_021D4A00: .word 0x00000744 +_021D4A04: .word 0x00007FFF +_021D4A08: .word 0x021BF6DC +_021D4A0C: .word 0x00000246 +_021D4A10: .word 0x000007DA +_021D4A14: .word 0x04000050 +_021D4A18: .word 0x00000852 +_021D4A1C: + mov r1, #0 + strb r1, [r0, #5] + bl sub_0201FFE8 + add r0, r6, #0 + add r1, r4, #0 + bl ov77_021D3D4C + add r0, r4, #0 + bl ov77_021D3DC4 + ldr r0, [r4, #0x14] + mov r1, #1 + bl ov77_021D636C + mov r2, #0 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #1 + sub r3, #0x3c + bl sub_0201C63C + mov r2, #0 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #2 + sub r3, #0x3c + bl sub_0201C63C + mov r2, #0 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #3 + sub r3, #0x3c + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #5 + mov r2, #0 + mov r3, #0x3c + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #0 + mov r3, #0x3c + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #7 + mov r2, #0 + mov r3, #0x3c + bl sub_0201C63C + mov r0, #0x10 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4AA6: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4B54 + mov r0, #0x10 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #4 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4AD6: + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4B54 + ldr r0, _021D4B5C ; =0x000008A7 + cmp r5, r0 + blt _021D4AF4 + add r0, r4, #0 + bl ov77_021D4E90 +_021D4AF4: + ldr r0, _021D4B60 ; =0x000008A8 + cmp r5, r0 + blt _021D4B54 + ldr r1, _021D4B64 ; =0x00000247 + mov r0, #0x11 + ldrb r2, [r4, r1] + ldr r3, _021D4B68 ; =0x00007FFF + orr r0, r2 + strb r0, [r4, r1] + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4B24: + add r0, r4, #0 + bl ov77_021D4E90 + mov r1, #1 + ldr r0, [r4, #0x14] + lsl r1, r1, #0x10 + bl ov77_021D6290 + bl sub_0200F2AC + cmp r0, #0 + beq _021D4B54 + ldr r0, _021D4B6C ; =0x021BF6DC + mov r1, #1 + strb r1, [r0, #5] + bl sub_0201FFE8 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D4B54 +_021D4B4E: + add sp, #0xc + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D4B54: + mov r0, #0 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021D4B5C: .word 0x000008A7 +_021D4B60: .word 0x000008A8 +_021D4B64: .word 0x00000247 +_021D4B68: .word 0x00007FFF +_021D4B6C: .word 0x021BF6DC + thumb_func_end ov77_021D4230 + + thumb_func_start ov77_021D4B70 +ov77_021D4B70: ; 0x021D4B70 + push {r4, lr} + mov r3, #0x26 + add r4, r0, #0 + lsl r3, r3, #4 + add r0, r3, #0 + ldr r1, [r4, r3] + add r0, #0x20 + add r0, r1, r0 + str r0, [r4, r3] + add r0, r3, #4 + ldr r1, [r4, r0] + mov r0, #0x11 + lsl r0, r0, #4 + add r1, r1, r0 + add r0, r3, #4 + str r1, [r4, r0] + add r3, r3, #4 + ldr r3, [r4, r3] + ldr r0, [r4, #0x10] + asr r3, r3, #0xc + mov r1, #1 + mov r2, #3 + neg r3, r3 + bl sub_02019184 + mov r3, #0x26 + lsl r3, r3, #4 + ldr r3, [r4, r3] + ldr r0, [r4, #0x10] + asr r3, r3, #0xc + mov r1, #2 + mov r2, #3 + neg r3, r3 + bl sub_02019184 + mov r3, #0x99 + lsl r3, r3, #2 + ldr r3, [r4, r3] + ldr r0, [r4, #0x10] + asr r3, r3, #0xc + mov r1, #5 + mov r2, #3 + neg r3, r3 + bl sub_02019184 + mov r3, #0x26 + lsl r3, r3, #4 + ldr r3, [r4, r3] + ldr r0, [r4, #0x10] + asr r3, r3, #0xc + mov r1, #6 + mov r2, #3 + neg r3, r3 + bl sub_02019184 + mov r0, #0 + str r0, [r4, #0xc] + pop {r4, pc} + thumb_func_end ov77_021D4B70 + + thumb_func_start ov77_021D4BE4 +ov77_021D4BE4: ; 0x021D4BE4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #3 + mov r2, #1 + mov r3, #0x10 + bl sub_0201C63C + mov r2, #1 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #7 + sub r3, #0x11 + bl sub_0201C63C + pop {r4, pc} + thumb_func_end ov77_021D4BE4 + + thumb_func_start ov77_021D4C04 +ov77_021D4C04: ; 0x021D4C04 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, _021D4DB0 ; =0x00000744 + cmp r1, r0 + beq _021D4C10 + b _021D4D42 +_021D4C10: + ldr r7, _021D4DB4 ; =0x04000048 + ldr r3, _021D4DB8 ; =0x0000024A + ldrh r2, [r7] + mov r0, #0x3f + mov r1, #0x1f + bic r2, r0 + orr r1, r2 + mov r6, #0x20 + orr r1, r6 + strh r1, [r7] + ldrh r2, [r7, #2] + mov r1, #0x1d + add r5, r3, #4 + bic r2, r0 + orr r1, r2 + orr r1, r6 + strh r1, [r7, #2] + mov r1, #0 + strh r1, [r4, r3] + mov r2, #0xff + add r1, r3, #2 + strh r2, [r4, r1] + mov r1, #0 + strh r1, [r4, r5] + add r5, r3, #6 + mov r1, #0x88 + strh r1, [r4, r5] + add r1, r5, #0 + ldrsh r1, [r4, r1] + str r1, [sp] + add r1, r3, #4 + ldrsh r1, [r4, r1] + mov ip, r1 + ldrsh r1, [r4, r3] + lsl r5, r1, #8 + lsl r1, r2, #8 + and r1, r5 + add r5, r3, #2 + ldrsh r5, [r4, r5] + lsl r5, r5, #0x18 + lsr r5, r5, #0x18 + orr r5, r1 + add r1, r7, #0 + sub r1, #8 + strh r5, [r1] + mov r1, ip + lsl r5, r1, #8 + lsl r1, r2, #8 + and r1, r5 + ldr r5, [sp] + lsl r5, r5, #0x18 + lsr r5, r5, #0x18 + orr r5, r1 + sub r1, r7, #4 + strh r5, [r1] + lsl r1, r6, #0x15 + ldr r7, [r1, #0] + ldr r5, _021D4DBC ; =0xFFFF1FFF + and r7, r5 + lsl r5, r6, #8 + orr r5, r7 + str r5, [r1, #0] + ldr r1, _021D4DC0 ; =0x04001048 + mov r5, #0x1f + ldrh r7, [r1] + bic r7, r0 + orr r5, r7 + orr r5, r6 + strh r5, [r1] + ldrh r5, [r1, #2] + bic r5, r0 + mov r0, #0x1d + orr r0, r5 + orr r0, r6 + strh r0, [r1, #2] + ldrh r5, [r1] + ldr r0, _021D4DC4 ; =0xFFFFC0FF + and r5, r0 + mov r0, #0x1f + lsl r0, r0, #8 + orr r5, r0 + lsr r0, r1, #0xd + orr r0, r5 + add r5, r3, #0 + strh r0, [r1] + add r5, #8 + mov r0, #0 + strh r0, [r4, r5] + add r0, r3, #0 + add r0, #0xa + add r5, r3, #0 + strh r2, [r4, r0] + add r5, #0xc + mov r0, #0 + strh r0, [r4, r5] + add r5, r3, #0 + add r5, #0xe + mov r0, #0x88 + strh r0, [r4, r5] + add r0, r3, #0 + add r0, #0xe + ldrsh r6, [r4, r0] + add r0, r3, #0 + add r0, #0xc + ldrsh r5, [r4, r0] + add r0, r3, #0 + add r0, #8 + ldrsh r0, [r4, r0] + lsl r5, r5, #8 + lsl r7, r0, #8 + lsl r0, r2, #8 + and r0, r7 + add r7, r3, #0 + add r7, #0xa + ldrsh r7, [r4, r7] + lsl r7, r7, #0x18 + lsr r7, r7, #0x18 + orr r7, r0 + add r0, r1, #0 + sub r0, #8 + strh r7, [r0] + lsl r0, r2, #8 + and r5, r0 + lsl r0, r6, #0x18 + lsr r0, r0, #0x18 + orr r5, r0 + sub r0, r1, #4 + strh r5, [r0] + add r0, r3, #0 + add r0, #0xe + add r3, #0xc + ldrsh r0, [r4, r0] + ldrsh r5, [r4, r3] + lsr r4, r1, #0x12 + sub r3, r1, #6 + strh r4, [r3] + lsl r0, r0, #0x18 + lsl r3, r5, #8 + lsl r2, r2, #8 + and r2, r3 + lsr r0, r0, #0x18 + orr r2, r0 + sub r0, r1, #2 + strh r2, [r0] + sub r1, #0x48 + ldr r2, [r1, #0] + ldr r0, _021D4DBC ; =0xFFFF1FFF + and r2, r0 + mov r0, #6 + lsl r0, r0, #0xc + orr r0, r2 + str r0, [r1, #0] + pop {r3, r4, r5, r6, r7, pc} +_021D4D42: + ble _021D4DAE + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02019FF0 + mov r1, #1 + lsl r1, r1, #8 + cmp r0, r1 + blt _021D4D60 + mov r1, #0x92 + lsl r1, r1, #2 + ldrb r2, [r4, r1] + mov r0, #2 + orr r0, r2 + strb r0, [r4, r1] +_021D4D60: + ldr r0, [r4, #0x10] + mov r1, #5 + bl sub_02019FF0 + mov r1, #0xff + mvn r1, r1 + cmp r0, r1 + bgt _021D4D7C + mov r1, #0x92 + lsl r1, r1, #2 + ldrb r2, [r4, r1] + mov r0, #0x20 + orr r0, r2 + strb r0, [r4, r1] +_021D4D7C: + mov r1, #1 + ldr r0, [r4, #0x10] + add r2, r1, #0 + mov r3, #0xc + bl sub_0201C63C + mov r2, #4 + ldr r0, [r4, #0x10] + mov r1, #1 + sub r3, r2, #5 + bl sub_0201C63C + mov r2, #1 + add r3, r2, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + sub r3, #0xd + bl sub_0201C63C + mov r2, #4 + ldr r0, [r4, #0x10] + mov r1, #5 + sub r3, r2, #5 + bl sub_0201C63C +_021D4DAE: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D4DB0: .word 0x00000744 +_021D4DB4: .word 0x04000048 +_021D4DB8: .word 0x0000024A +_021D4DBC: .word 0xFFFF1FFF +_021D4DC0: .word 0x04001048 +_021D4DC4: .word 0xFFFFC0FF + thumb_func_end ov77_021D4C04 + + thumb_func_start ov77_021D4DC8 +ov77_021D4DC8: ; 0x021D4DC8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _021D4E84 ; =0x00000788 + add r4, r1, #0 + cmp r4, r0 + ble _021D4E0A + ldr r0, [r5, #0x10] + mov r1, #1 + bl sub_020192EC + add r3, r0, #0 + add r3, #0x14 + cmp r3, #0 + ble _021D4DE6 + mov r3, #0 +_021D4DE6: + ldr r0, [r5, #0x10] + mov r1, #1 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r5, #0x10] + mov r1, #5 + bl sub_020192EC + add r3, r0, #0 + sub r3, #0x14 + bpl _021D4E00 + mov r3, #0 +_021D4E00: + ldr r0, [r5, #0x10] + mov r1, #5 + mov r2, #0 + bl sub_0201C63C +_021D4E0A: + ldr r0, _021D4E88 ; =0x0000078E + cmp r4, r0 + blt _021D4E46 + ldr r0, [r5, #0x10] + mov r1, #2 + bl sub_020192EC + add r3, r0, #0 + add r3, #0x14 + cmp r3, #0 + ble _021D4E22 + mov r3, #0 +_021D4E22: + ldr r0, [r5, #0x10] + mov r1, #2 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r5, #0x10] + mov r1, #6 + bl sub_020192EC + add r3, r0, #0 + sub r3, #0x14 + bpl _021D4E3C + mov r3, #0 +_021D4E3C: + ldr r0, [r5, #0x10] + mov r1, #6 + mov r2, #0 + bl sub_0201C63C +_021D4E46: + ldr r0, _021D4E8C ; =0x00000794 + cmp r4, r0 + blt _021D4E82 + ldr r0, [r5, #0x10] + mov r1, #3 + bl sub_020192EC + add r3, r0, #0 + add r3, #0x14 + cmp r3, #0 + ble _021D4E5E + mov r3, #0 +_021D4E5E: + ldr r0, [r5, #0x10] + mov r1, #3 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r5, #0x10] + mov r1, #7 + bl sub_020192EC + add r3, r0, #0 + sub r3, #0x14 + bpl _021D4E78 + mov r3, #0 +_021D4E78: + ldr r0, [r5, #0x10] + mov r1, #7 + mov r2, #0 + bl sub_0201C63C +_021D4E82: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D4E84: .word 0x00000788 +_021D4E88: .word 0x0000078E +_021D4E8C: .word 0x00000794 + thumb_func_end ov77_021D4DC8 + + thumb_func_start ov77_021D4E90 +ov77_021D4E90: ; 0x021D4E90 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_020192EC + add r3, r0, #0 + add r3, #0xc + cmp r3, #0 + ble _021D4EA6 + mov r3, #0 +_021D4EA6: + ldr r0, [r4, #0x10] + mov r1, #1 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #5 + bl sub_020192EC + add r3, r0, #0 + sub r3, #0xc + bpl _021D4EC0 + mov r3, #0 +_021D4EC0: + ldr r0, [r4, #0x10] + mov r1, #5 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #2 + bl sub_020192EC + add r3, r0, #0 + add r3, #0xc + cmp r3, #0 + ble _021D4EDC + mov r3, #0 +_021D4EDC: + ldr r0, [r4, #0x10] + mov r1, #2 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #6 + bl sub_020192EC + add r3, r0, #0 + sub r3, #0xc + bpl _021D4EF6 + mov r3, #0 +_021D4EF6: + ldr r0, [r4, #0x10] + mov r1, #6 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #3 + bl sub_020192EC + add r3, r0, #0 + add r3, #0xc + cmp r3, #0 + ble _021D4F12 + mov r3, #0 +_021D4F12: + ldr r0, [r4, #0x10] + mov r1, #3 + mov r2, #0 + bl sub_0201C63C + ldr r0, [r4, #0x10] + mov r1, #7 + bl sub_020192EC + add r3, r0, #0 + sub r3, #0xc + bpl _021D4F2C + mov r3, #0 +_021D4F2C: + ldr r0, [r4, #0x10] + mov r1, #7 + mov r2, #0 + bl sub_0201C63C + pop {r4, pc} + thumb_func_end ov77_021D4E90 + + thumb_func_start ov77_021D4F38 +ov77_021D4F38: ; 0x021D4F38 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x70 + add r4, r0, #0 + add r0, sp, #0x64 + mov r2, #0 + str r2, [r0, #0] + ldr r5, _021D5100 ; =0x000004A7 + str r2, [r0, #4] + str r2, [r0, #8] + cmp r1, r5 + bge _021D4F84 + ldr r0, [r4, #0x28] + bl sub_02020A88 + ldr r1, _021D5104 ; =0x000005C1 + sub r0, #0x20 + cmp r0, r1 + ble _021D4F66 + ldr r0, _021D5108 ; =0x0000FFE0 + ldr r1, [r4, #0x28] + bl sub_0202094C + b _021D4F6E +_021D4F66: + add r0, r1, #0 + ldr r1, [r4, #0x28] + bl sub_02020910 +_021D4F6E: + mov r0, #2 + ldr r1, [sp, #0x6c] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x6c] + ldr r1, [r4, #0x28] + add r0, sp, #0x64 + bl sub_02020990 + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} +_021D4F84: + bne _021D502A + ldr r6, _021D510C ; =0x021D7470 + add r5, sp, #0x58 + ldmia r6!, {r0, r1} + add r3, r5, #0 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + ldr r1, _021D5110 ; =0x0029AEC1 + str r0, [r5, #0] + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x28] + ldr r2, _021D5114 ; =0x021D7500 + str r0, [sp, #8] + add r0, r3, #0 + ldr r3, _021D5104 ; =0x000005C1 + bl sub_020206D0 + ldr r5, _021D5118 ; =0x021D74A0 + add r3, sp, #0x4c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r1, [r4, #0x28] + add r0, r2, #0 + bl sub_02020990 + bl sub_020B2628 + ldr r3, _021D511C ; =0x00001194 + mov r0, #1 + mov r1, #0 + mov r2, #3 + bl sub_020BFC74 + ldr r1, _021D5120 ; =0x001F7FFF + ldr r0, _021D5124 ; =0x04000358 + mov r7, #0 + str r1, [r0, #0] + mov r0, #4 + add r1, r7, #0 + mov r2, #8 + mov r3, #0xc + add r4, sp, #0x2c +_021D4FE0: + lsl r5, r3, #0x18 + mov ip, r5 + lsl r5, r0, #8 + lsl r6, r2, #0x10 + orr r5, r1 + orr r5, r6 + mov r6, ip + orr r5, r6 + add r7, r7, #1 + stmia r4!, {r5} + add r0, #0x10 + add r1, #0x10 + add r2, #0x10 + add r3, #0x10 + cmp r7, #8 + blt _021D4FE0 + add r0, sp, #0x2c + bl sub_020BFD44 + mov r0, #9 + str r0, [sp] + ldr r0, _021D5128 ; =0x04000050 + mov r1, #2 + mov r2, #0x21 + mov r3, #7 + bl sub_020BF55C + mov r0, #1 + mov r1, #0 + bl sub_02019060 + mov r0, #1 + add r1, r0, #0 + bl sub_02019120 + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} +_021D502A: + add r3, r5, #0 + add r3, #0xd2 + cmp r1, r3 + bge _021D5052 + mov r1, #1 + ldr r2, [sp, #0x64] + lsl r1, r1, #0xe + add r1, r2, r1 + str r1, [sp, #0x64] + ldr r1, [r4, #0x28] + bl sub_02020990 + mov r1, #1 + ldr r0, [r4, #0x10] + add r2, r1, #0 + mov r3, #4 + bl sub_0201C63C + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} +_021D5052: + add r5, #0xd2 + cmp r1, r5 + bne _021D50CC + ldr r6, _021D512C ; =0x021D744C + add r5, sp, #0x20 + ldmia r6!, {r0, r1} + add r3, r5, #0 + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + ldr r1, _021D5110 ; =0x0029AEC1 + str r0, [r5, #0] + str r2, [sp] + str r2, [sp, #4] + ldr r0, [r4, #0x28] + ldr r2, _021D5114 ; =0x021D7500 + str r0, [sp, #8] + add r0, r3, #0 + ldr r3, _021D5104 ; =0x000005C1 + bl sub_020206D0 + ldr r5, _021D5130 ; =0x021D747C + add r3, sp, #0x14 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r1, [r4, #0x28] + add r0, r2, #0 + bl sub_02020990 + ldr r2, _021D5134 ; =0x021D743C + add r1, sp, #0xc + ldrh r3, [r2] + add r0, sp, #0xc + strh r3, [r1] + ldrh r3, [r2, #2] + strh r3, [r1, #2] + ldrh r3, [r2, #4] + ldrh r2, [r2, #6] + strh r3, [r1, #4] + strh r2, [r1, #6] + ldr r1, [r4, #0x28] + bl sub_020209F8 + bl sub_020B2628 + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + ldr r0, _021D5128 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + mov r0, #1 + bl sub_02019120 + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} +_021D50CC: + ldr r0, _021D5138 ; =0x00000618 + cmp r1, r0 + blt _021D50EA + ldr r0, [r4, #0x28] + bl sub_02020A88 + mov r1, #1 + add r0, #0x18 + lsl r1, r1, #0xe + cmp r0, r1 + bge _021D50EA + ldr r1, [r4, #0x28] + mov r0, #0x18 + bl sub_0202094C +_021D50EA: + mov r0, #2 + ldr r1, [sp, #0x64] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x64] + ldr r1, [r4, #0x28] + add r0, sp, #0x64 + bl sub_02020990 + add sp, #0x70 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D5100: .word 0x000004A7 +_021D5104: .word 0x000005C1 +_021D5108: .word 0x0000FFE0 +_021D510C: .word 0x021D7470 +_021D5110: .word 0x0029AEC1 +_021D5114: .word 0x021D7500 +_021D5118: .word 0x021D74A0 +_021D511C: .word 0x00001194 +_021D5120: .word 0x001F7FFF +_021D5124: .word 0x04000358 +_021D5128: .word 0x04000050 +_021D512C: .word 0x021D744C +_021D5130: .word 0x021D747C +_021D5134: .word 0x021D743C +_021D5138: .word 0x00000618 + thumb_func_end ov77_021D4F38 + + thumb_func_start ov77_021D513C +ov77_021D513C: ; 0x021D513C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _021D524C ; =0x00000573 + add r4, r1, #0 + cmp r2, r0 + bgt _021D5174 + bge _021D51FA + sub r0, #0xd2 + sub r0, r2, r0 + cmp r0, #9 + bhi _021D5246 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5160: ; jump table + .short _021D517E - _021D5160 - 2 ; case 0 + .short _021D5246 - _021D5160 - 2 ; case 1 + .short _021D5246 - _021D5160 - 2 ; case 2 + .short _021D5246 - _021D5160 - 2 ; case 3 + .short _021D5246 - _021D5160 - 2 ; case 4 + .short _021D5246 - _021D5160 - 2 ; case 5 + .short _021D519A - _021D5160 - 2 ; case 6 + .short _021D51B8 - _021D5160 - 2 ; case 7 + .short _021D51C4 - _021D5160 - 2 ; case 8 + .short _021D51D0 - _021D5160 - 2 ; case 9 +_021D5174: + ldr r0, _021D5250 ; =0x00000579 + cmp r2, r0 + beq _021D5216 + add sp, #0xc + pop {r4, r5, pc} +_021D517E: + mov r0, #4 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + add sp, #0xc + pop {r4, r5, pc} +_021D519A: + bl sub_0200F2AC + cmp r0, #1 + beq _021D51A6 + bl sub_02022974 +_021D51A6: + add r0, r5, #0 + bl ov77_021D35B8 + add r0, r4, #0 + mov r1, #1 + bl ov77_021D40DC + add sp, #0xc + pop {r4, r5, pc} +_021D51B8: + add r0, r4, #0 + mov r1, #1 + bl ov77_021D40DC + add sp, #0xc + pop {r4, r5, pc} +_021D51C4: + add r0, r4, #0 + mov r1, #1 + bl ov77_021D40DC + add sp, #0xc + pop {r4, r5, pc} +_021D51D0: + add r0, r4, #0 + mov r1, #1 + bl ov77_021D40DC + cmp r0, #1 + beq _021D51E0 + bl sub_02022974 +_021D51E0: + mov r0, #4 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + add sp, #0xc + pop {r4, r5, pc} +_021D51FA: + mov r0, #4 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + add sp, #0xc + pop {r4, r5, pc} +_021D5216: + bl sub_0200F2AC + cmp r0, #1 + beq _021D5222 + bl sub_02022974 +_021D5222: + add r0, r5, #0 + bl ov77_021D35B8 + add r0, r4, #0 + mov r1, #2 + bl ov77_021D40B8 + mov r0, #4 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 +_021D5246: + add sp, #0xc + pop {r4, r5, pc} + nop +_021D524C: .word 0x00000573 +_021D5250: .word 0x00000579 + thumb_func_end ov77_021D513C + + thumb_func_start ov77_021D5254 +ov77_021D5254: ; 0x021D5254 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + mov r5, #0xa7 + lsl r5, r5, #2 + cmp r0, #0 + beq _021D5266 + mov r0, #3 + strb r0, [r4, r5] +_021D5266: + ldrb r0, [r4, r5] + cmp r0, #3 + bhi _021D52C2 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D5278: ; jump table + .short _021D5280 - _021D5278 - 2 ; case 0 + .short _021D528E - _021D5278 - 2 ; case 1 + .short _021D52A0 - _021D5278 - 2 ; case 2 + .short _021D52B8 - _021D5278 - 2 ; case 3 +_021D5280: + add r0, r4, #0 + bl ov77_021D52C8 + ldrb r0, [r4, r5] + add r0, r0, #1 + strb r0, [r4, r5] + b _021D52C2 +_021D528E: + mov r0, #0xa7 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov77_021D5308 + ldrb r0, [r4, r5] + add r0, r0, #1 + strb r0, [r4, r5] + b _021D52C2 +_021D52A0: + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r1, [r4, #4] + add r0, r4, r0 + bl ov77_021D5390 + cmp r0, #0 + beq _021D52C2 + ldrb r0, [r4, r5] + add r0, r0, #1 + strb r0, [r4, r5] + b _021D52C2 +_021D52B8: + add r0, r4, #0 + bl ov77_021D5478 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D52C2: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D5254 + + thumb_func_start ov77_021D52C8 +ov77_021D52C8: ; 0x021D52C8 + push {r4, lr} + add r4, r0, #0 + bl ov77_021D25F0 + add r0, r4, #0 + bl ov77_021D2A00 + mov r0, #0xa9 + ldr r1, [r4, #0xc] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r1, _021D52FC ; =0x00007FFF + mov r0, #0 + bl sub_0200F344 + ldr r1, _021D52FC ; =0x00007FFF + mov r0, #1 + bl sub_0200F344 + ldr r0, _021D5300 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + ldr r0, _021D5304 ; =0x0000029E + mov r1, #1 + strb r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_021D52FC: .word 0x00007FFF +_021D5300: .word 0x04000050 +_021D5304: .word 0x0000029E + thumb_func_end ov77_021D52C8 + + thumb_func_start ov77_021D5308 +ov77_021D5308: ; 0x021D5308 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r2, #0 + add r4, r0, #0 + str r2, [sp] + mov r0, #0x4c + str r0, [sp, #4] + mov r0, #0x80 + mov r1, #0x63 + add r3, r2, #0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #8] + mov r0, #0x80 + mov r1, #0x62 + mov r3, #2 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + ldr r2, [r4, #8] + mov r0, #0x80 + mov r1, #0x61 + mov r3, #2 + bl sub_02006E60 + bl sub_0201FF00 + mov r0, #0 + bl sub_0201FF48 + mov r0, #0 + bl sub_0201FFB0 + ldr r0, _021D538C ; =0xFFFE8000 + mov r2, #0 + str r0, [r4, #4] + ldr r0, [r4, #8] + mov r1, #2 + add r3, r2, #0 + bl sub_02019184 + ldr r5, [r4, #4] + ldr r0, [r4, #8] + asr r3, r5, #0xb + lsr r3, r3, #0x14 + add r3, r5, r3 + mov r1, #2 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + mov r0, #1 + strb r0, [r4, #3] + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D538C: .word 0xFFFE8000 + thumb_func_end ov77_021D5308 + + thumb_func_start ov77_021D5390 +ov77_021D5390: ; 0x021D5390 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldrb r0, [r4, #1] + cmp r0, #4 + bhi _021D5448 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D53A8: ; jump table + .short _021D53B2 - _021D53A8 - 2 ; case 0 + .short _021D53D6 - _021D53A8 - 2 ; case 1 + .short _021D5404 - _021D53A8 - 2 ; case 2 + .short _021D5414 - _021D53A8 - 2 ; case 3 + .short _021D543A - _021D53A8 - 2 ; case 4 +_021D53B2: + ldr r0, _021D546C ; =0x0000089D + cmp r1, r0 + blt _021D5448 + mov r0, #0x1e + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + ldr r3, _021D5470 ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D5448 +_021D53D6: + bl sub_0200F2AC + cmp r0, #0 + beq _021D5448 + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x5a + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D5448 +_021D5404: + bl sub_0200F2AC + cmp r0, #0 + beq _021D5448 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D5448 +_021D5414: + ldr r0, _021D5474 ; =0x00000974 + cmp r1, r0 + blt _021D5448 + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + b _021D5448 +_021D543A: + bl sub_0200F2AC + cmp r0, #0 + beq _021D5448 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D5448: + mov r0, #1 + ldr r1, [r4, #4] + lsl r0, r0, #0xa + add r5, r1, r0 + asr r3, r5, #0xb + str r5, [r4, #4] + lsr r3, r3, #0x14 + add r3, r5, r3 + ldr r0, [r4, #8] + mov r1, #2 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_021D546C: .word 0x0000089D +_021D5470: .word 0x00007FFF +_021D5474: .word 0x00000974 + thumb_func_end ov77_021D5390 + + thumb_func_start ov77_021D5478 +ov77_021D5478: ; 0x021D5478 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D54A8 ; =0x0000029E + ldrb r0, [r4, r0] + cmp r0, #0 + beq _021D5498 + ldr r0, [r4, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0xc] + bl sub_020181C4 + ldr r0, _021D54A8 ; =0x0000029E + mov r1, #0 + strb r1, [r4, r0] +_021D5498: + ldr r0, _021D54AC ; =0x0000029F + ldrb r1, [r4, r0] + cmp r1, #0 + beq _021D54A4 + mov r1, #0 + strb r1, [r4, r0] +_021D54A4: + pop {r4, pc} + nop +_021D54A8: .word 0x0000029E +_021D54AC: .word 0x0000029F + thumb_func_end ov77_021D5478 + + .rodata + + + .global Unk_ov77_021D743C +Unk_ov77_021D743C: ; 0x021D743C + .incbin "incbin/overlay77_rodata.bin", 0x174, 0x17C - 0x174 + + .global Unk_ov77_021D7444 +Unk_ov77_021D7444: ; 0x021D7444 + .incbin "incbin/overlay77_rodata.bin", 0x17C, 0x184 - 0x17C + + .global Unk_ov77_021D744C +Unk_ov77_021D744C: ; 0x021D744C + .incbin "incbin/overlay77_rodata.bin", 0x184, 0x190 - 0x184 + + .global Unk_ov77_021D7458 +Unk_ov77_021D7458: ; 0x021D7458 + .incbin "incbin/overlay77_rodata.bin", 0x190, 0x19C - 0x190 + + .global Unk_ov77_021D7464 +Unk_ov77_021D7464: ; 0x021D7464 + .incbin "incbin/overlay77_rodata.bin", 0x19C, 0x1A8 - 0x19C + + .global Unk_ov77_021D7470 +Unk_ov77_021D7470: ; 0x021D7470 + .incbin "incbin/overlay77_rodata.bin", 0x1A8, 0x1B4 - 0x1A8 + + .global Unk_ov77_021D747C +Unk_ov77_021D747C: ; 0x021D747C + .incbin "incbin/overlay77_rodata.bin", 0x1B4, 0x1C0 - 0x1B4 + + .global Unk_ov77_021D7488 +Unk_ov77_021D7488: ; 0x021D7488 + .incbin "incbin/overlay77_rodata.bin", 0x1C0, 0x1CC - 0x1C0 + + .global Unk_ov77_021D7494 +Unk_ov77_021D7494: ; 0x021D7494 + .incbin "incbin/overlay77_rodata.bin", 0x1CC, 0x1D8 - 0x1CC + + .global Unk_ov77_021D74A0 +Unk_ov77_021D74A0: ; 0x021D74A0 + .incbin "incbin/overlay77_rodata.bin", 0x1D8, 0x1E4 - 0x1D8 + + .global Unk_ov77_021D74AC +Unk_ov77_021D74AC: ; 0x021D74AC + .incbin "incbin/overlay77_rodata.bin", 0x1E4, 0x1F4 - 0x1E4 + + .global Unk_ov77_021D74BC +Unk_ov77_021D74BC: ; 0x021D74BC + .incbin "incbin/overlay77_rodata.bin", 0x1F4, 0x204 - 0x1F4 + + .global Unk_ov77_021D74CC +Unk_ov77_021D74CC: ; 0x021D74CC + .incbin "incbin/overlay77_rodata.bin", 0x204, 0x214 - 0x204 + + .global Unk_ov77_021D74DC +Unk_ov77_021D74DC: ; 0x021D74DC + .incbin "incbin/overlay77_rodata.bin", 0x214, 0x224 - 0x214 + + .global Unk_ov77_021D74EC +Unk_ov77_021D74EC: ; 0x021D74EC + .incbin "incbin/overlay77_rodata.bin", 0x224, 0x234 - 0x224 + + .global Unk_ov77_021D74FC +Unk_ov77_021D74FC: ; 0x021D74FC + .incbin "incbin/overlay77_rodata.bin", 0x234, 0x248 - 0x234 + + .global Unk_ov77_021D7510 +Unk_ov77_021D7510: ; 0x021D7510 + .incbin "incbin/overlay77_rodata.bin", 0x248, 0x264 - 0x248 + + .global Unk_ov77_021D752C +Unk_ov77_021D752C: ; 0x021D752C + .incbin "incbin/overlay77_rodata.bin", 0x264, 0x280 - 0x264 + + .global Unk_ov77_021D7548 +Unk_ov77_021D7548: ; 0x021D7548 + .incbin "incbin/overlay77_rodata.bin", 0x280, 0x29C - 0x280 + + .global Unk_ov77_021D7564 +Unk_ov77_021D7564: ; 0x021D7564 + .incbin "incbin/overlay77_rodata.bin", 0x29C, 0x2B8 - 0x29C + + .global Unk_ov77_021D7580 +Unk_ov77_021D7580: ; 0x021D7580 + .incbin "incbin/overlay77_rodata.bin", 0x2B8, 0x2D4 - 0x2B8 + + .global Unk_ov77_021D759C +Unk_ov77_021D759C: ; 0x021D759C + .incbin "incbin/overlay77_rodata.bin", 0x2D4, 0x2F0 - 0x2D4 + + .global Unk_ov77_021D75B8 +Unk_ov77_021D75B8: ; 0x021D75B8 + .incbin "incbin/overlay77_rodata.bin", 0x2F0, 0x30C - 0x2F0 + + .global Unk_ov77_021D75D4 +Unk_ov77_021D75D4: ; 0x021D75D4 + .incbin "incbin/overlay77_rodata.bin", 0x30C, 0x328 - 0x30C + + .global Unk_ov77_021D75F0 +Unk_ov77_021D75F0: ; 0x021D75F0 + .incbin "incbin/overlay77_rodata.bin", 0x328, 0x344 - 0x328 + + .global Unk_ov77_021D760C +Unk_ov77_021D760C: ; 0x021D760C + .incbin "incbin/overlay77_rodata.bin", 0x344, 0x360 - 0x344 + + .global Unk_ov77_021D7628 +Unk_ov77_021D7628: ; 0x021D7628 + .incbin "incbin/overlay77_rodata.bin", 0x360, 0x37C - 0x360 + + .global Unk_ov77_021D7644 +Unk_ov77_021D7644: ; 0x021D7644 + .incbin "incbin/overlay77_rodata.bin", 0x37C, 0x398 - 0x37C + + .global Unk_ov77_021D7660 +Unk_ov77_021D7660: ; 0x021D7660 + .incbin "incbin/overlay77_rodata.bin", 0x398, 0x3B4 - 0x398 + + .global Unk_ov77_021D767C +Unk_ov77_021D767C: ; 0x021D767C + .incbin "incbin/overlay77_rodata.bin", 0x3B4, 0x3D0 - 0x3B4 + + .global Unk_ov77_021D7698 +Unk_ov77_021D7698: ; 0x021D7698 + .incbin "incbin/overlay77_rodata.bin", 0x3D0, 0x3EC - 0x3D0 + + .global Unk_ov77_021D76B4 +Unk_ov77_021D76B4: ; 0x021D76B4 + .incbin "incbin/overlay77_rodata.bin", 0x3EC, 0x408 - 0x3EC + + .global Unk_ov77_021D76D0 +Unk_ov77_021D76D0: ; 0x021D76D0 + .incbin "incbin/overlay77_rodata.bin", 0x408, 0x42C - 0x408 + + .global Unk_ov77_021D76F4 +Unk_ov77_021D76F4: ; 0x021D76F4 + .incbin "incbin/overlay77_rodata.bin", 0x42C, 0x454 - 0x42C + + .global Unk_ov77_021D771C +Unk_ov77_021D771C: ; 0x021D771C + .incbin "incbin/overlay77_rodata.bin", 0x454, 0x47C - 0x454 + + .global Unk_ov77_021D7744 +Unk_ov77_021D7744: ; 0x021D7744 + .incbin "incbin/overlay77_rodata.bin", 0x47C, 0x4A4 - 0x47C + + .global Unk_ov77_021D776C +Unk_ov77_021D776C: ; 0x021D776C + .incbin "incbin/overlay77_rodata.bin", 0x4A4, 0x4D4 - 0x4A4 + + .global Unk_ov77_021D779C +Unk_ov77_021D779C: ; 0x021D779C + .incbin "incbin/overlay77_rodata.bin", 0x4D4, 0x51C - 0x4D4 + + .global Unk_ov77_021D77E4 +Unk_ov77_021D77E4: ; 0x021D77E4 + .incbin "incbin/overlay77_rodata.bin", 0x51C, 0x570 - 0x51C + + .global Unk_ov77_021D7838 +Unk_ov77_021D7838: ; 0x021D7838 + .incbin "incbin/overlay77_rodata.bin", 0x570, 0x5C4 - 0x570 + + .global Unk_ov77_021D788C +Unk_ov77_021D788C: ; 0x021D788C + .incbin "incbin/overlay77_rodata.bin", 0x5C4, 0x10 + diff --git a/asm/ov77_021D54B0.s b/asm/ov77_021D54B0.s new file mode 100644 index 000000000..437b25835 --- /dev/null +++ b/asm/ov77_021D54B0.s @@ -0,0 +1,2244 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov77_021D54B0 +ov77_021D54B0: ; 0x021D54B0 + push {r4, lr} + sub sp, #0x10 + ldr r4, _021D54E4 ; =0x021D78BC + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_0201E86C + mov r0, #0xb + mov r1, #0x4c + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + mov r0, #6 + mov r1, #0x4c + bl sub_0201DBEC + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_021D54E4: .word 0x021D78BC + thumb_func_end ov77_021D54B0 + + thumb_func_start ov77_021D54E8 +ov77_021D54E8: ; 0x021D54E8 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r6, r0, #0 + mov r0, #0 + str r6, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, [sp, #0x44] + add r5, r1, #0 + str r0, [sp, #0xc] + mov r1, #0x4b + str r2, [sp, #0x10] + lsl r1, r1, #2 + ldr r0, [r5, r1] + add r4, r3, #0 + str r0, [sp, #0x14] + add r0, r1, #4 + ldr r0, [r5, r0] + add r2, r6, #0 + str r0, [sp, #0x18] + add r0, r1, #0 + add r0, #8 + ldr r0, [r5, r0] + add r1, #0xc + str r0, [sp, #0x1c] + ldr r0, [r5, r1] + add r1, r6, #0 + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r0, [sp, #0x40] + add r3, r6, #0 + bl sub_020093B4 + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r4, #0] + ldr r0, [sp, #0x40] + str r0, [r4, #4] + str r1, [r4, #8] + str r1, [r4, #0xc] + mov r0, #1 + str r1, [r4, #0x10] + lsl r0, r0, #0xc + str r0, [r4, #0x14] + str r0, [r4, #0x18] + str r0, [r4, #0x1c] + strh r1, [r4, #0x20] + mov r0, #1 + str r0, [r4, #0x24] + ldr r0, [sp, #0x48] + str r0, [r4, #0x28] + mov r0, #0x4c + str r0, [r4, #0x2c] + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + thumb_func_end ov77_021D54E8 + + thumb_func_start ov77_021D555C +ov77_021D555C: ; 0x021D555C + mov r0, #0x2a + lsl r0, r0, #4 + bx lr + ; .align 2, 0 + thumb_func_end ov77_021D555C + + thumb_func_start ov77_021D5564 +ov77_021D5564: ; 0x021D5564 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + add r5, r0, #0 + add r3, r1, #0 + ldr r0, _021D55C4 ; =0xFFCFFFEF + mov r1, #0x10 + and r3, r0 + orr r3, r1 + str r3, [r2, #0] + ldr r3, _021D55C8 ; =0x04001000 + ldr r2, [r3, #0] + and r0, r2 + orr r0, r1 + str r0, [r3, #0] + bl ov77_021D54B0 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x80 + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r2, #0x4c + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + mov r0, #0x21 + add r1, r5, #4 + mov r2, #0x4c + bl sub_020095C4 + str r0, [r5, #0] + mov r0, #3 + mov r1, #0x4c + bl sub_0201DCC8 + mov r1, #0xa7 + lsl r1, r1, #2 + ldr r4, _021D55CC ; =0x021D7914 + b _021D55D0 + nop +_021D55C4: .word 0xFFCFFFEF +_021D55C8: .word 0x04001000 +_021D55CC: .word 0x021D7914 +_021D55D0: + str r0, [r5, r1] + mov r7, #0 + add r6, r5, #0 +_021D55D6: + ldrb r0, [r4] + add r1, r7, #0 + mov r2, #0x4c + bl sub_02009714 + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r6, r1] + add r7, r7, #1 + add r4, r4, #1 + add r6, r6, #4 + cmp r7, #4 + blt _021D55D6 + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x2e + bl sub_0200985C + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x2e + mov r3, #0 + bl sub_0200985C + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x32 + mov r3, #0 + bl sub_0200985C + mov r1, #0x57 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #3 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x57 + mov r3, #0 + bl sub_0200985C + mov r1, #0x5b + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x16 + mov r3, #0 + bl sub_0200985C + mov r1, #0x5f + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #5 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x17 + mov r3, #0 + bl sub_0200985C + mov r1, #0x63 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x5b + mov r3, #0 + bl sub_0200985C + mov r1, #0x67 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #7 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x53 + mov r3, #0 + bl sub_0200985C + mov r1, #0x6b + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x53 + mov r3, #0 + bl sub_0200985C + mov r1, #0x6f + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #9 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x36 + mov r3, #0 + bl sub_0200985C + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xa + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x36 + mov r3, #0 + bl sub_0200985C + mov r1, #0x77 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r3, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x31 + bl sub_020098B8 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r1, #1 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x31 + mov r3, #0 + bl sub_020098B8 + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x35 + mov r3, #0 + bl sub_020098B8 + mov r1, #0x16 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #3 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x5a + mov r3, #0 + bl sub_020098B8 + mov r1, #0x17 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x14 + mov r3, #0 + bl sub_020098B8 + mov r1, #6 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r0, #5 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x15 + mov r3, #0 + bl sub_020098B8 + mov r1, #0x19 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x5e + mov r3, #0 + bl sub_020098B8 + mov r1, #0x1a + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #7 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x56 + mov r3, #0 + bl sub_020098B8 + mov r1, #0x1b + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x56 + mov r3, #0 + bl sub_020098B8 + mov r1, #7 + lsl r1, r1, #6 + str r0, [r5, r1] + mov r0, #9 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x39 + mov r3, #0 + bl sub_020098B8 + mov r1, #0x1d + lsl r1, r1, #4 + str r0, [r5, r1] + mov r0, #0xa + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x39 + mov r3, #0 + bl sub_020098B8 + mov r1, #0x1e + lsl r1, r1, #4 + str r0, [r5, r1] + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x30 + bl sub_02009918 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x30 + mov r3, #0 + bl sub_02009918 + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x33 + mov r3, #0 + bl sub_02009918 + mov r1, #0x59 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #3 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x59 + mov r3, #0 + bl sub_02009918 + mov r1, #0x5d + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #4 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x18 + mov r3, #0 + bl sub_02009918 + mov r1, #0x61 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #6 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x5d + mov r3, #0 + bl sub_02009918 + mov r1, #0x69 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #7 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x55 + mov r3, #0 + bl sub_02009918 + mov r1, #0x6d + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #8 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x55 + mov r3, #0 + bl sub_02009918 + mov r1, #0x71 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #9 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x37 + mov r3, #0 + bl sub_02009918 + mov r1, #0x75 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xa + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x37 + mov r3, #0 + bl sub_02009918 + mov r1, #0x79 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #5 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x19 + mov r3, #0 + bl sub_02009918 + mov r1, #0x65 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x2f + bl sub_02009918 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #1 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x2f + mov r3, #0 + bl sub_02009918 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #2 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x34 + mov r3, #0 + bl sub_02009918 + mov r1, #0x5a + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #3 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x58 + mov r3, #0 + bl sub_02009918 + mov r1, #0x5e + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #4 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x1a + mov r3, #0 + bl sub_02009918 + mov r1, #0x62 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #5 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x1b + mov r3, #0 + bl sub_02009918 + mov r1, #0x66 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #6 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x5c + mov r3, #0 + bl sub_02009918 + mov r1, #0x6a + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #7 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x54 + mov r3, #0 + bl sub_02009918 + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #8 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x54 + mov r3, #0 + bl sub_02009918 + mov r1, #0x72 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #9 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x38 + mov r3, #0 + bl sub_02009918 + mov r1, #0x76 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #0xa + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r5, r0] + mov r1, #0x80 + mov r2, #0x38 + mov r3, #0 + bl sub_02009918 + mov r1, #0x7a + lsl r1, r1, #2 + add r7, r1, #0 + add r6, r1, #0 + str r0, [r5, r1] + mov r4, #0 + sub r7, #0xac + sub r6, #0xa8 +_021D5B8C: + ldr r0, [r5, r7] + bl sub_0200A3DC + ldr r0, [r5, r6] + bl sub_0200A640 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xb + blt _021D5B8C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov77_021D5564 + + thumb_func_start ov77_021D5BAC +ov77_021D5BAC: ; 0x021D5BAC + push {r3, r4, r5, r6, r7, lr} + mov r7, #5 + add r5, r0, #0 + mov r4, #0 + lsl r7, r7, #6 +_021D5BB6: + lsl r0, r4, #4 + add r6, r5, r0 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r6, r0] + bl sub_0200A4E4 + ldr r0, [r6, r7] + bl sub_0200A6DC + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0xb + blo _021D5BB6 + mov r6, #0x4b + mov r4, #0 + lsl r6, r6, #2 +_021D5BDA: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + bl sub_02009754 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021D5BDA + ldr r0, [r5, #0] + bl sub_02021964 + mov r0, #0x23 + lsl r0, r0, #4 + mov r4, #0 + add r6, r5, r0 + mov r7, #0x24 +_021D5BFE: + add r0, r4, #0 + mul r0, r7 + add r0, r6, r0 + bl sub_020094F0 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D5BFE + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _021D5C28 + bl sub_0201DCF0 + mov r0, #0xa7 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_021D5C28: + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + bl sub_0201DC3C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov77_021D5BAC + + thumb_func_start ov77_021D5C3C +ov77_021D5C3C: ; 0x021D5C3C + push {r4, r5, r6, r7, lr} + sub sp, #0xac + ldr r3, _021D5FA4 ; =0x021D78FC + add r5, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x40 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r3, _021D5FA8 ; =0x021D78CC + add r2, sp, #0x28 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r3, _021D5FAC ; =0x021D78E4 + add r2, sp, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0x23 + lsl r0, r0, #4 + add r0, r5, r0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + add r1, r5, #0 + add r2, r0, #0 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #5 + lsl r0, r0, #0x10 + str r0, [sp, #0x60] + mov r0, #7 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x7b + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x9e + lsl r0, r0, #2 + add r0, r5, r0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r1, #2 + str r1, [sp, #8] + add r1, r5, #0 + mov r2, #0 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #5 + lsl r0, r0, #0x10 + str r0, [sp, #0x60] + mov r0, #0x13 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x1f + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x95 + lsl r0, r0, #2 + add r0, r5, r0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #2 + add r1, r5, #0 + mov r2, #0 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #0xb + lsl r0, r0, #0x10 + str r0, [sp, #0x60] + mov r0, #7 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x7d + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, sp, #0x88 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #3 + add r1, r5, #0 + add r3, sp, #0x58 + bl ov77_021D54E8 + ldr r0, _021D5FB0 ; =0xFFFC0000 + str r0, [sp, #0x60] + mov r0, #7 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, sp, #0x88 + str r0, [sp] + mov r2, #0 + str r2, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #6 + add r1, r5, #0 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #5 + lsl r0, r0, #0x12 + str r0, [sp, #0x60] + mov r0, #7 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x85 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, sp, #0x88 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r2, #1 + mov r0, #7 + add r1, r5, #0 + add r3, sp, #0x58 + str r2, [sp, #8] + bl ov77_021D54E8 + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x60] + mov r0, #6 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x86 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CF8 + add r0, sp, #0x88 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #8 + add r1, r5, #0 + mov r2, #1 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x60] + mov r0, #0x12 + lsl r0, r0, #0x10 + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x87 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CF8 + add r0, sp, #0x88 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #9 + add r1, r5, #0 + mov r2, #3 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x60] + mov r0, #0x1a + lsl r0, r0, #0xe + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x22 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x89 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, sp, #0x88 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xa + add r1, r5, #0 + mov r2, #3 + add r3, sp, #0x58 + bl ov77_021D54E8 + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x60] + mov r0, #0x4a + lsl r0, r0, #0xe + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x8a + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, sp, #0x58 + bl sub_02021AA0 + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0 + str r0, [sp, #0xc] + add r7, sp, #0x28 + add r6, sp, #0x10 + add r4, sp, #0x40 +_021D5F36: + add r0, sp, #0x88 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #4 + add r1, r5, #0 + mov r2, #0 + add r3, sp, #0x58 + bl ov77_021D54E8 + ldr r0, [r7, #0] + lsl r0, r0, #0xc + str r0, [sp, #0x60] + ldr r0, [r6, #0] + lsl r0, r0, #0xc + str r0, [sp, #0x64] + add r0, sp, #0x58 + bl sub_02021AA0 + ldr r1, [r4, #0] + lsl r1, r1, #2 + add r2, r5, r1 + mov r1, #0x7b + lsl r1, r1, #2 + str r0, [r2, r1] + ldr r0, [r4, #0] + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r4, #0] + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CAC + ldr r0, [sp, #0xc] + add r7, r7, #4 + add r0, r0, #1 + add r6, r6, #4 + add r4, r4, #4 + str r0, [sp, #0xc] + cmp r0, #6 + blt _021D5F36 + add sp, #0xac + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D5FA4: .word 0x021D78FC +_021D5FA8: .word 0x021D78CC +_021D5FAC: .word 0x021D78E4 +_021D5FB0: .word 0xFFFC0000 + thumb_func_end ov77_021D5C3C + + thumb_func_start ov77_021D5FB4 +ov77_021D5FB4: ; 0x021D5FB4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + add r3, r0, #0 + add r0, sp, #0x3c + str r0, [sp] + mov r2, #0 + add r6, r1, #0 + add r1, r3, #0 + str r2, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #5 + add r3, sp, #0xc + bl ov77_021D54E8 + mov r5, #0 + add r7, sp, #0xc +_021D5FD6: + add r0, r6, #0 + add r1, r5, #0 + bl ov77_021D6794 + add r4, r0, #0 + add r0, r7, #0 + bl sub_02021AA0 + str r0, [r4, #0] + mov r1, #0 + bl sub_02021CC8 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021CAC + add r5, r5, #1 + cmp r5, #0x10 + blt _021D5FD6 + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov77_021D5FB4 + + thumb_func_start ov77_021D6000 +ov77_021D6000: ; 0x021D6000 + push {r4, r5, r6, lr} + mov r4, #0 + add r5, r1, #0 + add r6, r4, #0 +_021D6008: + add r0, r5, #0 + add r1, r4, #0 + bl ov77_021D6794 + ldr r0, [r0, #0] + add r1, r6, #0 + bl sub_02021CAC + add r4, r4, #1 + cmp r4, #0x10 + blt _021D6008 + pop {r4, r5, r6, pc} + thumb_func_end ov77_021D6000 + + thumb_func_start ov77_021D6020 +ov77_021D6020: ; 0x021D6020 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020219F8 + mov r0, #0xa7 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D6038 + bl sub_0201DCE8 +_021D6038: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6020 + + thumb_func_start ov77_021D603C +ov77_021D603C: ; 0x021D603C + lsl r1, r1, #2 + add r1, r0, r1 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r1, r0] + ldr r3, _021D604C ; =sub_02021CAC + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_021D604C: .word sub_02021CAC + thumb_func_end ov77_021D603C + + thumb_func_start ov77_021D6050 +ov77_021D6050: ; 0x021D6050 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r4, r1, #0 + bl sub_02021CC8 + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02021CC8 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_02021CC8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6050 + + thumb_func_start ov77_021D607C +ov77_021D607C: ; 0x021D607C + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0x1f + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #2 + ldr r1, [sp] + lsl r0, r0, #8 + sub r1, r1, r0 + str r1, [sp] + sub r0, #0x10 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + mov r0, #0x7d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #2 + ldr r1, [sp] + lsl r0, r0, #8 + add r1, r1, r0 + str r1, [sp] + sub r0, #0xc + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D607C + + thumb_func_start ov77_021D60E0 +ov77_021D60E0: ; 0x021D60E0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, _021D61B0 ; =0x00000582 + add r4, r0, #0 + cmp r5, r1 + bge _021D60F4 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D60F4: + bne _021D60FE + mov r1, #3 + mov r2, #1 + bl ov77_021D603C +_021D60FE: + ldr r0, _021D61B4 ; =0x00000627 + cmp r5, r0 + bge _021D6154 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #0x12 + ldr r1, [sp] + lsl r0, r0, #0xc + add r1, r1, r0 + mov r0, #0xb + lsl r0, r0, #0x10 + str r1, [sp] + cmp r1, r0 + blt _021D6142 + str r0, [sp] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D6142: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D6154: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #0x12 + ldr r1, [sp] + lsl r0, r0, #0xc + add r1, r1, r0 + mov r0, #5 + lsl r0, r0, #0x12 + str r1, [sp] + cmp r1, r0 + blt _021D619C + str r0, [sp] + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add r0, r4, #0 + mov r1, #3 + mov r2, #0 + bl ov77_021D603C + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D619C: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_021D61B0: .word 0x00000582 +_021D61B4: .word 0x00000627 + thumb_func_end ov77_021D60E0 + + thumb_func_start ov77_021D61B8 +ov77_021D61B8: ; 0x021D61B8 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, _021D6284 ; =0x000005DC + add r4, r0, #0 + cmp r5, r1 + bge _021D61CC + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D61CC: + bne _021D61D6 + mov r1, #0xa + mov r2, #1 + bl ov77_021D603C +_021D61D6: + ldr r0, _021D6288 ; =0x00000627 + cmp r5, r0 + bge _021D622C + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #0x12 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r1, r1, r0 + mov r0, #5 + lsl r0, r0, #0x10 + str r1, [sp] + cmp r1, r0 + bgt _021D621A + str r0, [sp] + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D621A: + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D622C: + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + mov r0, #0x12 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r1, r1, r0 + ldr r0, _021D628C ; =0xFFFC0000 + str r1, [sp] + cmp r1, r0 + bgt _021D6272 + str r0, [sp] + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add r0, r4, #0 + mov r1, #0xa + mov r2, #0 + bl ov77_021D603C + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D6272: + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D6284: .word 0x000005DC +_021D6288: .word 0x00000627 +_021D628C: .word 0xFFFC0000 + thumb_func_end ov77_021D61B8 + + thumb_func_start ov77_021D6290 +ov77_021D6290: ; 0x021D6290 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + ldr r0, _021D6364 ; =0x021BF6DC + add r7, r1, #0 + ldrb r0, [r0, #5] + cmp r0, #0 + bne _021D62A6 + mov r6, #0xd + mov r4, #0xf + b _021D62AA +_021D62A6: + mov r6, #0xf + mov r4, #0xd +_021D62AA: + mov r0, #0x7b + lsl r0, r0, #2 + add r0, r5, r0 + str r0, [sp] + ldr r1, [sp] + lsl r0, r6, #2 + str r0, [sp, #4] + ldr r0, [r1, r0] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #0xc] + add r1, r0, r7 + mov r0, #6 + lsl r0, r0, #0x12 + str r1, [sp, #0xc] + cmp r1, r0 + blt _021D62E0 + mov r0, #1 + lsl r0, r0, #0x14 + sub r0, r1, r0 + str r0, [sp, #0xc] +_021D62E0: + ldr r1, [sp] + ldr r0, [sp, #4] + ldr r0, [r1, r0] + add r1, sp, #0xc + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0xc] + lsl r0, r0, #0x14 + sub r0, r1, r0 + str r0, [sp, #0xc] + add r0, r6, #1 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0xc + bl sub_02021C50 + mov r0, #0x7b + lsl r0, r0, #2 + add r6, r5, r0 + lsl r0, r4, #2 + str r0, [sp, #8] + ldr r0, [r6, r0] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0xc + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, [sp, #0xc] + sub r1, r0, r7 + ldr r0, _021D6368 ; =0xFFF80000 + str r1, [sp, #0xc] + cmp r1, r0 + bgt _021D6338 + mov r0, #1 + lsl r0, r0, #0x14 + add r0, r1, r0 + str r0, [sp, #0xc] +_021D6338: + ldr r0, [sp, #8] + add r1, sp, #0xc + ldr r0, [r6, r0] + bl sub_02021C50 + mov r0, #1 + ldr r1, [sp, #0xc] + lsl r0, r0, #0x14 + add r0, r1, r0 + str r0, [sp, #0xc] + add r0, r4, #1 + lsl r0, r0, #2 + add r1, r5, r0 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r1, r0] + add r1, sp, #0xc + bl sub_02021C50 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D6364: .word 0x021BF6DC +_021D6368: .word 0xFFF80000 + thumb_func_end ov77_021D6290 + + thumb_func_start ov77_021D636C +ov77_021D636C: ; 0x021D636C + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + cmp r1, #0 + bne _021D63E2 + ldr r0, _021D646C ; =0x021BF6DC + ldrb r0, [r0, #5] + cmp r0, #0 + bne _021D63B0 + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021F24 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021F24 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021F24 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021F24 + b _021D6412 +_021D63B0: + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021F24 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021F24 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021F24 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021F24 + b _021D6412 +_021D63E2: + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021F24 + mov r0, #0x89 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021F24 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021F24 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02021F24 +_021D6412: + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, r2, #0 + str r0, [r3, #0] + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp] + mov r0, #0x22 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_02021C50 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, r2, #0 + str r0, [r3, #0] + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp] + mov r0, #0x8a + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, pc} + nop +_021D646C: .word 0x021BF6DC + thumb_func_end ov77_021D636C + + thumb_func_start ov77_021D6470 +ov77_021D6470: ; 0x021D6470 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _021D652C ; =0x00000744 + add r6, r1, #0 + sub r4, r6, r0 + bpl _021D6480 + mov r4, #0 +_021D6480: + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021D30 + mov r1, #7 + add r2, r0, #0 + lsl r1, r1, #0xa + mov r0, #0x86 + add r1, r2, r1 + lsl r0, r0, #2 + add r1, r1, r4 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021D30 + mov r1, #7 + add r2, r0, #0 + lsl r1, r1, #0xa + mov r0, #0x87 + sub r1, r2, r1 + lsl r0, r0, #2 + sub r1, r1, r4 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + bl sub_02021C94 + ldr r0, _021D652C ; =0x00000744 + cmp r6, r0 + blt _021D6526 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021D28 + add r4, r0, #0 + add r3, sp, #0 + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + mov r0, #1 + ldr r1, [sp] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp] + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r2, #0 + bl sub_02021C50 + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021D28 + add r4, r0, #0 + add r3, sp, #0 + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [r3, #0] + mov r0, #1 + ldr r1, [sp] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp] + mov r0, #0x87 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r2, #0 + bl sub_02021C50 +_021D6526: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_021D652C: .word 0x00000744 + thumb_func_end ov77_021D6470 + + thumb_func_start ov77_021D6530 +ov77_021D6530: ; 0x021D6530 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r3, _021D6650 ; =0x021D78B0 + add r2, sp, #0x18 + str r0, [sp] + str r1, [sp, #4] + ldmia r3!, {r0, r1} + str r2, [sp, #8] + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r0, _021D6654 ; =0x021D789C + ldr r1, [r0, #8] + str r1, [sp, #0x14] + ldr r1, [r0, #0xc] + ldr r0, [r0, #0x10] + str r1, [sp, #0xc] + str r0, [sp, #0x10] + ldr r1, _021D6658 ; =0x000005A5 + ldr r0, [sp, #4] + cmp r0, r1 + blt _021D65AC + mov r4, #0 +_021D655E: + ldr r0, [sp, #8] + lsl r7, r4, #2 + ldr r0, [r0, r7] + lsl r1, r0, #2 + ldr r0, [sp] + add r5, r0, r1 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0x24 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r0, _021D665C ; =0x021D79AC + ldr r1, [sp, #0x24] + ldr r0, [r0, r7] + sub r0, r1, r0 + str r0, [sp, #0x24] + mov r0, #1 + ldr r1, [sp, #0x28] + lsl r0, r0, #0xe + sub r0, r1, r0 + str r0, [sp, #0x28] + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r2, #0 + bl sub_02021C50 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D655E +_021D65AC: + ldr r1, _021D6660 ; =0x000005D2 + ldr r0, [sp, #4] + cmp r0, r1 + blt _021D65F4 + ldr r0, [sp, #0x14] + lsl r1, r0, #2 + ldr r0, [sp] + add r4, r0, r1 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r5, r0, #0 + add r3, sp, #0x24 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + ldr r0, _021D6664 ; =0x021D79A0 + ldr r1, [sp, #0x24] + ldr r0, [r0, #0] + sub r0, r1, r0 + str r0, [sp, #0x24] + mov r0, #3 + ldr r1, [sp, #0x28] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x28] + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 +_021D65F4: + ldr r1, _021D6668 ; =0x000005E6 + ldr r0, [sp, #4] + cmp r0, r1 + blt _021D664C + mov r5, #0 +_021D65FE: + lsl r7, r5, #2 + add r0, sp, #0xc + ldr r0, [r0, r7] + lsl r1, r0, #2 + ldr r0, [sp] + add r4, r0, r1 + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0x24 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + ldr r0, _021D666C ; =0x021D79A4 + ldr r1, [sp, #0x24] + ldr r0, [r0, r7] + sub r0, r1, r0 + str r0, [sp, #0x24] + mov r0, #3 + ldr r1, [sp, #0x28] + lsl r0, r0, #0xc + sub r0, r1, r0 + str r0, [sp, #0x28] + mov r0, #0x7b + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r2, #0 + bl sub_02021C50 + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, #2 + blo _021D65FE +_021D664C: + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6650: .word 0x021D78B0 +_021D6654: .word 0x021D789C +_021D6658: .word 0x000005A5 +_021D665C: .word 0x021D79AC +_021D6660: .word 0x000005D2 +_021D6664: .word 0x021D79A0 +_021D6668: .word 0x000005E6 +_021D666C: .word 0x021D79A4 + thumb_func_end ov77_021D6530 + + .rodata + + + .global Unk_ov77_021D789C +Unk_ov77_021D789C: ; 0x021D789C + .incbin "incbin/overlay77_rodata.bin", 0x5D4, 0x5D8 - 0x5D4 + + .global Unk_ov77_021D78A0 +Unk_ov77_021D78A0: ; 0x021D78A0 + .incbin "incbin/overlay77_rodata.bin", 0x5D8, 0x5DC - 0x5D8 + + .global Unk_ov77_021D78A4 +Unk_ov77_021D78A4: ; 0x021D78A4 + .incbin "incbin/overlay77_rodata.bin", 0x5DC, 0x5E0 - 0x5DC + + .global Unk_ov77_021D78A8 +Unk_ov77_021D78A8: ; 0x021D78A8 + .incbin "incbin/overlay77_rodata.bin", 0x5E0, 0x5E8 - 0x5E0 + + .global Unk_ov77_021D78B0 +Unk_ov77_021D78B0: ; 0x021D78B0 + .incbin "incbin/overlay77_rodata.bin", 0x5E8, 0x5F4 - 0x5E8 + + .global Unk_ov77_021D78BC +Unk_ov77_021D78BC: ; 0x021D78BC + .incbin "incbin/overlay77_rodata.bin", 0x5F4, 0x604 - 0x5F4 + + .global Unk_ov77_021D78CC +Unk_ov77_021D78CC: ; 0x021D78CC + .incbin "incbin/overlay77_rodata.bin", 0x604, 0x61C - 0x604 + + .global Unk_ov77_021D78E4 +Unk_ov77_021D78E4: ; 0x021D78E4 + .incbin "incbin/overlay77_rodata.bin", 0x61C, 0x634 - 0x61C + + .global Unk_ov77_021D78FC +Unk_ov77_021D78FC: ; 0x021D78FC + .incbin "incbin/overlay77_rodata.bin", 0x634, 0x64C - 0x634 + + .global Unk_ov77_021D7914 +Unk_ov77_021D7914: ; 0x021D7914 + .incbin "incbin/overlay77_rodata.bin", 0x64C, 0x4 + + + .data + + + .global Unk_ov77_021D79A0 +Unk_ov77_021D79A0: ; 0x021D79A0 + .incbin "incbin/overlay77_data.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov77_021D79A4 +Unk_ov77_021D79A4: ; 0x021D79A4 + .incbin "incbin/overlay77_data.bin", 0x4, 0xC - 0x4 + + .global Unk_ov77_021D79AC +Unk_ov77_021D79AC: ; 0x021D79AC + .incbin "incbin/overlay77_data.bin", 0xC, 0x18 - 0xC + + .global Unk_ov77_021D79B8 +Unk_ov77_021D79B8: ; 0x021D79B8 + .incbin "incbin/overlay77_data.bin", 0x18, 0x44 + diff --git a/asm/ov77_021D6670.s b/asm/ov77_021D6670.s new file mode 100644 index 000000000..42b38c818 --- /dev/null +++ b/asm/ov77_021D6670.s @@ -0,0 +1,814 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov77_021D6670 +ov77_021D6670: ; 0x021D6670 + push {r4, lr} + sub sp, #0x10 + ldr r4, _021D669C ; =0x021D7920 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_0201E86C + mov r0, #1 + mov r1, #0x4c + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_021D669C: .word 0x021D7920 + thumb_func_end ov77_021D6670 + + thumb_func_start ov77_021D66A0 +ov77_021D66A0: ; 0x021D66A0 + push {r3, r4, r5, r6, lr} + sub sp, #0x2c + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + str r1, [sp] + sub r0, r1, #1 + str r0, [sp, #4] + str r0, [sp, #8] + add r6, r2, #0 + str r1, [sp, #0xc] + mov r2, #0x4b + str r1, [sp, #0x10] + lsl r2, r2, #2 + ldr r0, [r5, r2] + add r3, r1, #0 + str r0, [sp, #0x14] + add r0, r2, #4 + ldr r0, [r5, r0] + str r0, [sp, #0x18] + add r0, r2, #0 + add r0, #8 + ldr r0, [r5, r0] + add r2, #0xc + str r0, [sp, #0x1c] + ldr r0, [r5, r2] + add r2, r1, #0 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + str r1, [sp, #0x28] + add r0, r6, #0 + bl sub_020093B4 + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r4, #0] + str r6, [r4, #4] + str r1, [r4, #8] + str r1, [r4, #0xc] + mov r0, #1 + str r1, [r4, #0x10] + lsl r0, r0, #0xc + str r0, [r4, #0x14] + str r0, [r4, #0x18] + str r0, [r4, #0x1c] + strh r1, [r4, #0x20] + mov r0, #1 + str r0, [r4, #0x24] + str r0, [r4, #0x28] + mov r0, #0x4c + str r0, [r4, #0x2c] + add sp, #0x2c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov77_021D66A0 + + thumb_func_start ov77_021D670C +ov77_021D670C: ; 0x021D670C + push {r4, lr} + mov r1, #0x7d + mov r0, #0x4c + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x7d + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + add r0, r4, #0 + bl ov77_021D6800 + add r0, r4, #0 + bl ov77_021D6964 + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov77_021D670C + + thumb_func_start ov77_021D6734 +ov77_021D6734: ; 0x021D6734 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x4c + mov r1, #8 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0xc + add r6, r5, #0 + mul r6, r0 + mov r0, #0x4c + add r1, r6, #0 + bl sub_02018144 + mov r1, #0 + add r2, r6, #0 + str r0, [r4, #4] + bl sub_020D5124 + str r5, [r4, #0] + add r0, r4, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov77_021D6734 + + thumb_func_start ov77_021D6760 +ov77_021D6760: ; 0x021D6760 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + mov r6, #0 + cmp r0, #0 + ble _021D6786 + add r4, r6, #0 +_021D676E: + ldr r0, [r5, #4] + add r0, r0, r4 + ldr r0, [r0, #8] + cmp r0, #0 + beq _021D677C + bl sub_0200DA58 +_021D677C: + ldr r0, [r5, #0] + add r6, r6, #1 + add r4, #0xc + cmp r6, r0 + blt _021D676E +_021D6786: + ldr r0, [r5, #4] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov77_021D6760 + + thumb_func_start ov77_021D6794 +ov77_021D6794: ; 0x021D6794 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r4, r0 + blt _021D67A4 + bl sub_02022974 +_021D67A4: + mov r0, #0xc + ldr r1, [r5, #4] + mul r0, r4 + add r0, r1, r0 + add r0, r0, #4 + pop {r3, r4, r5, pc} + thumb_func_end ov77_021D6794 + + thumb_func_start ov77_021D67B0 +ov77_021D67B0: ; 0x021D67B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl ov77_021D691C + mov r6, #0x73 + mov r4, #0 + lsl r6, r6, #2 +_021D67BE: + lsl r0, r4, #4 + add r0, r5, r0 + ldr r0, [r0, r6] + cmp r0, #0 + beq _021D67CC + bl sub_0200DA58 +_021D67CC: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D67BE + mov r6, #0x55 + mov r4, #0 + mov r7, #0xc + lsl r6, r6, #2 +_021D67DE: + add r0, r4, #0 + mul r0, r7 + add r0, r5, r0 + ldr r0, [r0, r6] + cmp r0, #0 + beq _021D67EE + bl sub_0200DA58 +_021D67EE: + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #0xa + blo _021D67DE + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov77_021D67B0 + + thumb_func_start ov77_021D6800 +ov77_021D6800: ; 0x021D6800 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + add r7, r0, #0 + add r3, r1, #0 + ldr r0, _021D6910 ; =0xFFCFFFEF + mov r1, #0x10 + and r3, r0 + orr r3, r1 + str r3, [r2, #0] + ldr r3, _021D6914 ; =0x04001000 + ldr r2, [r3, #0] + and r0, r2 + orr r0, r1 + str r0, [r3, #0] + bl ov77_021D6670 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x80 + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r2, #0x4c + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + mov r0, #0xa + add r1, r7, #4 + mov r2, #0x4c + bl sub_020095C4 + ldr r4, _021D6918 ; =0x021D7930 + str r0, [r7, #0] + mov r6, #0 + add r5, r7, #0 +_021D6854: + ldrb r0, [r4] + add r1, r6, #0 + mov r2, #0x4c + bl sub_02009714 + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r5, r1] + add r6, r6, #1 + add r4, r4, #1 + add r5, r5, #4 + cmp r6, #4 + blt _021D6854 + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe0 + ldr r0, [r7, r0] + mov r1, #0x80 + mov r2, #4 + bl sub_0200985C + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r7, r1] + mov r3, #0 + str r3, [sp] + mov r2, #3 + str r2, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x4c + str r0, [sp, #0xc] + add r0, #0xe4 + ldr r0, [r7, r0] + mov r1, #0x80 + bl sub_020098B8 + mov r1, #5 + lsl r1, r1, #6 + str r0, [r7, r1] + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xe8 + ldr r0, [r7, r0] + mov r1, #0x80 + mov r2, #5 + bl sub_02009918 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r7, r1] + mov r3, #0 + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4c + str r0, [sp, #8] + add r0, #0xec + ldr r0, [r7, r0] + mov r1, #0x80 + mov r2, #6 + bl sub_02009918 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r7, r1] + sub r1, #0xc + ldr r0, [r7, r1] + bl sub_0200A328 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r7, r0] + bl sub_0200A5C8 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021D6910: .word 0xFFCFFFEF +_021D6914: .word 0x04001000 +_021D6918: .word 0x021D7930 + thumb_func_end ov77_021D6800 + + thumb_func_start ov77_021D691C +ov77_021D691C: ; 0x021D691C + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x4f + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A4E4 + mov r0, #5 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_0200A6DC + mov r6, #0x4b + mov r4, #0 + lsl r6, r6, #2 +_021D693A: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + bl sub_02009754 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021D693A + ldr r0, [r5, #0] + bl sub_02021964 + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov77_021D691C + + thumb_func_start ov77_021D6964 +ov77_021D6964: ; 0x021D6964 + push {r4, r5, r6, r7, lr} + sub sp, #0x54 + add r7, r0, #0 + mov r6, #0 + add r4, r6, #0 + add r5, r7, #0 +_021D6970: + add r0, r7, #0 + add r1, sp, #0 + add r2, sp, #0x30 + bl ov77_021D66A0 + add r0, sp, #0 + str r4, [sp, #8] + str r4, [sp, #0xc] + bl sub_02021AA0 + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x15 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #2 + lsl r0, r0, #0xc + add r6, r6, #1 + add r4, r4, r0 + add r5, #0xc + cmp r6, #0xa + blt _021D6970 + add sp, #0x54 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6964 + + thumb_func_start ov77_021D69B4 +ov77_021D69B4: ; 0x021D69B4 + ldr r3, _021D69BC ; =sub_020219F8 + ldr r0, [r0, #0] + bx r3 + nop +_021D69BC: .word sub_020219F8 + thumb_func_end ov77_021D69B4 + + thumb_func_start ov77_021D69C0 +ov77_021D69C0: ; 0x021D69C0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + cmp r1, #0xb4 + bne _021D69E2 + mov r2, #3 + str r2, [sp] + mov r0, #0 + str r0, [sp, #4] + mov r0, #0x71 + lsl r0, r0, #2 + add r0, r4, r0 + add r1, r4, #0 + add r3, r2, #0 + bl ov77_021D6A0C + b _021D69FC +_021D69E2: + ldr r0, _021D6A08 ; =0x0000011D + cmp r1, r0 + bne _021D69FC + mov r2, #3 + add r0, #0xb7 + str r2, [sp] + mov r1, #1 + str r1, [sp, #4] + add r0, r4, r0 + add r1, r4, #0 + add r3, r2, #0 + bl ov77_021D6A0C +_021D69FC: + add r0, r4, #0 + bl ov77_021D69B4 + add sp, #8 + pop {r4, pc} + nop +_021D6A08: .word 0x0000011D + thumb_func_end ov77_021D69C0 + + thumb_func_start ov77_021D6A0C +ov77_021D6A0C: ; 0x021D6A0C + push {r4, lr} + add r4, r0, #0 + strb r2, [r4] + ldr r2, _021D6A3C ; =0xFFFFFFF8 + strb r3, [r4, #1] + add r2, sp + ldrb r0, [r2, #0x10] + strb r0, [r4, #2] + mov r0, #0 + strb r0, [r4, #4] + strb r0, [r4, #3] + mov r0, #0x53 + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [r4, #0xc] + ldrb r0, [r2, #0x14] + add r1, r4, #0 + mov r2, #0xa + strb r0, [r4, #5] + ldr r0, _021D6A40 ; =ov77_021D6B0C + bl sub_0200D9E8 + str r0, [r4, #8] + pop {r4, pc} + ; .align 2, 0 +_021D6A3C: .word 0xFFFFFFF8 +_021D6A40: .word ov77_021D6B0C + thumb_func_end ov77_021D6A0C + + thumb_func_start ov77_021D6A44 +ov77_021D6A44: ; 0x021D6A44 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + str r0, [sp] + cmp r2, #0 + bne _021D6A54 + mov r7, #0x40 + b _021D6A56 +_021D6A54: + mov r7, #0x20 +_021D6A56: + mov r5, #0 + cmp r6, #0 + bls _021D6AD2 +_021D6A5C: + ldr r0, [sp] + mov r1, #0xa + bl ov77_021D6ADC + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #4 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r2, r0, #0x19 + sub r2, r2, r1 + mov r0, #0x19 + ror r2, r0 + add r0, r1, r2 + add r0, #0x40 + lsl r0, r0, #0xc + str r0, [sp, #4] + bl sub_0201D2E8 + lsr r1, r0, #0x1f + lsl r2, r0, #0x1a + sub r2, r2, r1 + mov r0, #0x1a + ror r2, r0 + add r0, r1, r2 + add r0, r7, r0 + lsl r0, r0, #0xc + str r0, [sp, #8] + ldr r0, [r4, #4] + add r1, sp, #4 + bl sub_02021C50 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r4, #4] + mov r1, #1 + bl sub_02021CAC + ldr r0, _021D6AD8 ; =ov77_021D6B48 + add r1, r4, #0 + mov r2, #0x14 + bl sub_0200D9E8 + str r0, [r4, #8] + add r0, r5, #1 + lsl r0, r0, #0x18 + lsr r5, r0, #0x18 + cmp r5, r6 + blo _021D6A5C +_021D6AD2: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D6AD8: .word ov77_021D6B48 + thumb_func_end ov77_021D6A44 + + thumb_func_start ov77_021D6ADC +ov77_021D6ADC: ; 0x021D6ADC + push {r4, lr} + mov r4, #0 + mov r2, #0xc +_021D6AE2: + add r1, r4, #0 + mul r1, r2 + add r3, r0, r1 + ldrb r1, [r0, r1] + cmp r1, #0 + bne _021D6AFA + mov r0, #1 + strb r0, [r3] + mov r0, #0 + strb r0, [r3, #1] + add r0, r3, #0 + pop {r4, pc} +_021D6AFA: + add r1, r4, #1 + lsl r1, r1, #0x18 + lsr r4, r1, #0x18 + cmp r4, #0xa + blo _021D6AE2 + bl sub_02022974 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov77_021D6ADC + + thumb_func_start ov77_021D6B0C +ov77_021D6B0C: ; 0x021D6B0C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldrb r1, [r4, #4] + add r5, r0, #0 + add r0, r1, #1 + strb r0, [r4, #4] + ldrb r0, [r4, #1] + cmp r1, r0 + blo _021D6B44 + ldrb r1, [r4] + ldrb r2, [r4, #5] + ldr r0, [r4, #0xc] + bl ov77_021D6A44 + mov r0, #0 + strb r0, [r4, #4] + ldrb r0, [r4, #3] + add r0, r0, #1 + strb r0, [r4, #3] + ldrb r1, [r4, #3] + ldrb r0, [r4, #2] + cmp r1, r0 + blo _021D6B44 + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #8] +_021D6B44: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6B0C + + thumb_func_start ov77_021D6B48 +ov77_021D6B48: ; 0x021D6B48 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + bl sub_02021D28 + add r6, r0, #0 + add r3, sp, #0 + ldmia r6!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r6, #0] + str r0, [r3, #0] + mov r0, #3 + ldr r1, [sp, #4] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #4] + add r1, r2, #0 + bl sub_02021C50 + ldrb r0, [r4, #1] + add r0, r0, #1 + strb r0, [r4, #1] + ldrb r0, [r4, #1] + cmp r0, #0x50 + blo _021D6B9C + add r0, r5, #0 + bl sub_0200DA58 + mov r1, #0 + str r1, [r4, #8] + strb r1, [r4] + ldr r0, [r4, #4] + bl sub_02021CC8 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021CAC +_021D6B9C: + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov77_021D6B48 + + thumb_func_start ov77_021D6BA0 +ov77_021D6BA0: ; 0x021D6BA0 + ldr r3, _021D6BA8 ; =ov77_021D6BAC + add r2, r1, #0 + mov r1, #2 + bx r3 + ; .align 2, 0 +_021D6BA8: .word ov77_021D6BAC + thumb_func_end ov77_021D6BA0 + + thumb_func_start ov77_021D6BAC +ov77_021D6BAC: ; 0x021D6BAC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + ldr r0, [r6, #4] + add r7, r1, #0 + str r2, [sp] + str r0, [sp, #4] + ldr r4, _021D6C3C ; =0x00000000 + beq _021D6C36 +_021D6BBE: + ldr r0, [sp, #4] + ldr r1, [r6, #0] + bl ov77_021D6ADC + add r5, r0, #0 + ldr r0, [r5, #4] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #8 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bl sub_0201D2E8 + mov r1, #0xe0 + bl sub_020E1F6C + add r1, #0xa + lsl r0, r1, #0xc + str r0, [sp, #8] + bl sub_0201D2E8 + mov r1, #0x38 + bl sub_020E1F6C + add r1, #0xfa + lsl r0, r1, #0xc + str r0, [sp, #0xc] + ldr r0, [r5, #4] + add r1, sp, #8 + bl sub_02021C50 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [sp] + cmp r0, #0 + ldr r0, [r5, #4] + bne _021D6C1A + mov r1, #1 + bl sub_02021CAC + b _021D6C20 +_021D6C1A: + mov r1, #0 + bl sub_02021CAC +_021D6C20: + ldr r0, _021D6C40 ; =ov77_021D6C44 + add r1, r5, #0 + mov r2, #0x14 + bl sub_0200D9E8 + str r0, [r5, #8] + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, r7 + blo _021D6BBE +_021D6C36: + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021D6C3C: .word 0x00000000 +_021D6C40: .word ov77_021D6C44 + thumb_func_end ov77_021D6BAC + + thumb_func_start ov77_021D6C44 +ov77_021D6C44: ; 0x021D6C44 + push {r4, lr} + add r4, r1, #0 + ldrb r1, [r4, #1] + add r1, r1, #1 + strb r1, [r4, #1] + ldrb r1, [r4, #1] + cmp r1, #8 + blo _021D6C6C + bl sub_0200DA58 + mov r1, #0 + str r1, [r4, #8] + strb r1, [r4] + ldr r0, [r4, #4] + bl sub_02021CC8 + ldr r0, [r4, #4] + mov r1, #0 + bl sub_02021CAC +_021D6C6C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6C44 + + .rodata + + + .global Unk_ov77_021D7918 +Unk_ov77_021D7918: ; 0x021D7918 + .incbin "incbin/overlay77_rodata.bin", 0x650, 0x654 - 0x650 + + .global Unk_ov77_021D791C +Unk_ov77_021D791C: ; 0x021D791C + .incbin "incbin/overlay77_rodata.bin", 0x654, 0x658 - 0x654 + + .global Unk_ov77_021D7920 +Unk_ov77_021D7920: ; 0x021D7920 + .incbin "incbin/overlay77_rodata.bin", 0x658, 0x668 - 0x658 + + .global Unk_ov77_021D7930 +Unk_ov77_021D7930: ; 0x021D7930 + .incbin "incbin/overlay77_rodata.bin", 0x668, 0x4 + diff --git a/asm/ov77_021D6C70.s b/asm/ov77_021D6C70.s new file mode 100644 index 000000000..b2b9f4687 --- /dev/null +++ b/asm/ov77_021D6C70.s @@ -0,0 +1,853 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov77_021D6C70 +ov77_021D6C70: ; 0x021D6C70 + push {r4, lr} + ldr r3, _021D6C90 ; =0x02100DEC + mov r2, #0 + ldr r3, [r3, #0] + blx r3 + add r4, r0, #0 + bl sub_020145B4 + cmp r4, #0 + bne _021D6C88 + bl sub_02022974 +_021D6C88: + lsl r0, r4, #0x10 + lsr r0, r0, #0xd + pop {r4, pc} + nop +_021D6C90: .word 0x02100DEC + thumb_func_end ov77_021D6C70 + + thumb_func_start ov77_021D6C94 +ov77_021D6C94: ; 0x021D6C94 + push {r4, lr} + ldr r3, _021D6CB4 ; =0x02100DF4 + mov r2, #1 + ldr r3, [r3, #0] + blx r3 + add r4, r0, #0 + bne _021D6CA6 + bl sub_02022974 +_021D6CA6: + add r0, r4, #0 + bl sub_020145F4 + lsl r0, r4, #0x10 + lsr r0, r0, #0xd + pop {r4, pc} + nop +_021D6CB4: .word 0x02100DF4 + thumb_func_end ov77_021D6C94 + + thumb_func_start ov77_021D6CB8 +ov77_021D6CB8: ; 0x021D6CB8 + mov r0, #0x2c + bx lr + thumb_func_end ov77_021D6CB8 + + thumb_func_start ov77_021D6CBC +ov77_021D6CBC: ; 0x021D6CBC + push {r4, lr} + add r4, r0, #0 + beq _021D6CC8 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _021D6CCC +_021D6CC8: + bl sub_02022974 +_021D6CCC: + ldr r0, [r4, #0x18] + pop {r4, pc} + thumb_func_end ov77_021D6CBC + + thumb_func_start ov77_021D6CD0 +ov77_021D6CD0: ; 0x021D6CD0 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r5, #0 + beq _021D6CE0 + ldr r0, [r5, #0x18] + cmp r0, #0 + bne _021D6CE4 +_021D6CE0: + bl sub_02022974 +_021D6CE4: + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_02014788 + mov r2, #0 + ldr r0, [r5, #0x18] + add r1, r4, #0 + add r3, r2, #0 + bl sub_020146F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6CD0 + + thumb_func_start ov77_021D6CFC +ov77_021D6CFC: ; 0x021D6CFC + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + ldr r3, _021D6E14 ; =0x021D7934 + add r5, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0x28 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, sp, #0x10 + bl sub_02013880 + ldr r2, [sp, #0x10] + ldr r1, [sp, #0x14] + ldr r0, [sp, #0x18] + mul r1, r2 + add r2, r0, r1 + mov r1, #1 + add r4, r2, #0 + and r4, r1 + mov r1, #3 + bl sub_020E2178 + add r2, r1, #0 + mov r1, #0 + add r6, sp, #0x28 + add r7, sp, #0x1c +_021D6D32: + lsl r3, r2, #2 + ldr r3, [r6, r3] + lsl r0, r1, #2 + str r3, [r7, r0] + add r0, r5, r0 + str r2, [r0, #0x1c] + cmp r4, #0 + beq _021D6D46 + add r2, r2, #1 + b _021D6D48 +_021D6D46: + sub r2, r2, #1 +_021D6D48: + cmp r2, #3 + blt _021D6D50 + mov r2, #0 + b _021D6D56 +_021D6D50: + cmp r2, #0 + bge _021D6D56 + mov r2, #2 +_021D6D56: + add r0, r1, #1 + lsl r0, r0, #0x18 + lsr r1, r0, #0x18 + cmp r1, #3 + blo _021D6D32 + mov r0, #0x4c + bl sub_0200762C + ldr r7, _021D6E18 ; =0x021D7958 + str r0, [r5, #0] + mov r4, #0 +_021D6D6C: + lsl r6, r4, #2 + add r1, sp, #0x1c + mov r0, #0 + ldr r1, [r1, r6] + str r0, [sp] + str r0, [sp, #4] + lsl r1, r1, #0x10 + str r0, [sp, #8] + add r0, sp, #0x34 + lsr r1, r1, #0x10 + mov r2, #0 + mov r3, #2 + bl sub_02075FB4 + add r6, r5, r6 + ldr r0, [r6, #0x1c] + add r1, sp, #0x34 + lsl r2, r0, #3 + ldr r0, _021D6E1C ; =0x000003FF + add r3, r7, r2 + str r0, [sp] + str r4, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r5, #0] + ldr r2, [r7, r2] + ldr r3, [r3, #4] + bl sub_02007C34 + mov r1, #6 + mov r2, #1 + str r0, [r6, #4] + bl sub_02007DEC + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D6D6C + mov r0, #1 + str r0, [r5, #0x10] + bl sub_02014000 + mov r1, #0x12 + mov r0, #0x4c + lsl r1, r1, #0xa + bl sub_02018144 + str r0, [r5, #0x14] + mov r0, #1 + str r0, [sp] + mov r0, #0x4c + str r0, [sp, #4] + mov r3, #0x12 + ldr r0, _021D6E20 ; =ov77_021D6C70 + ldr r1, _021D6E24 ; =ov77_021D6C94 + ldr r2, [r5, #0x14] + lsl r3, r3, #0xa + bl sub_02014014 + str r0, [r5, #0x18] + bl sub_02014784 + add r2, r0, #0 + mov r0, #1 + mov r1, #0xe1 + lsl r0, r0, #0xc + lsl r1, r1, #0xe + bl sub_020206BC + mov r0, #0x3d + mov r1, #4 + mov r2, #0x4c + bl sub_020144C4 + add r1, r0, #0 + ldr r0, [r5, #0x18] + mov r2, #0xa + mov r3, #1 + bl sub_020144CC + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6E14: .word 0x021D7934 +_021D6E18: .word 0x021D7958 +_021D6E1C: .word 0x000003FF +_021D6E20: .word ov77_021D6C70 +_021D6E24: .word ov77_021D6C94 + thumb_func_end ov77_021D6CFC + + thumb_func_start ov77_021D6E28 +ov77_021D6E28: ; 0x021D6E28 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl sub_0201411C + ldr r0, [r4, #0x14] + bl sub_020181C4 + ldr r0, [r4, #0] + bl sub_02007B6C + pop {r4, pc} + thumb_func_end ov77_021D6E28 + + thumb_func_start ov77_021D6E40 +ov77_021D6E40: ; 0x021D6E40 + push {r3, lr} + cmp r0, #0 + beq _021D6E4C + ldr r0, [r0, #0] + bl sub_02008A94 +_021D6E4C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6E40 + + thumb_func_start ov77_021D6E50 +ov77_021D6E50: ; 0x021D6E50 + push {r4, lr} + add r4, r0, #0 + beq _021D6E74 + bl sub_020B2628 + bl sub_020241B4 + bl sub_020A73C0 + ldr r0, [r4, #0] + bl sub_02007768 + bl ov77_021D725C + mov r0, #1 + mov r1, #0 + bl sub_020241BC +_021D6E74: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov77_021D6E50 + + thumb_func_start ov77_021D6E78 +ov77_021D6E78: ; 0x021D6E78 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r0, #0 + add r2, r4, #0 + add r2, #0x28 + ldrb r2, [r2] + add r5, r4, #0 + add r6, r1, #0 + add r5, #0x28 + cmp r2, #5 + bls _021D6E90 + b _021D6FE2 +_021D6E90: + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_021D6E9C: ; jump table + .short _021D6EA8 - _021D6E9C - 2 ; case 0 + .short _021D6EEA - _021D6E9C - 2 ; case 1 + .short _021D6F0E - _021D6E9C - 2 ; case 2 + .short _021D6F6E - _021D6E9C - 2 ; case 3 + .short _021D6F92 - _021D6E9C - 2 ; case 4 + .short _021D6FBE - _021D6E9C - 2 ; case 5 +_021D6EA8: + ldr r0, _021D6FE8 ; =0x0400004A + mov r1, #0x3f + ldrh r2, [r0] + add r7, r4, #4 + bic r2, r1 + mov r1, #0x11 + orr r1, r2 + mov r2, #0x20 + orr r1, r2 + strh r1, [r0] + lsl r0, r6, #2 + str r0, [sp] + ldr r0, [r7, r0] + mov r1, #0xc + lsl r2, r2, #5 + bl sub_02007DEC + ldr r0, [sp] + mov r2, #1 + ldr r0, [r7, r0] + mov r1, #0xd + lsl r2, r2, #0xa + bl sub_02007DEC + ldr r0, [sp] + mov r1, #6 + ldr r0, [r7, r0] + mov r2, #0 + bl sub_02007DEC + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] +_021D6EEA: + lsl r2, r6, #2 + add r2, r4, r2 + ldr r2, [r2, #0x1c] + add r0, r4, #0 + lsl r3, r2, #3 + ldr r2, _021D6FEC ; =0x021D7940 + add r1, r6, #0 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _021D6FE2 + mov r0, #0 + add r4, #0x29 + strb r0, [r4] + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + b _021D6FE2 +_021D6F0E: + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_02014788 + add r0, r4, #0 + str r0, [sp, #4] + add r0, #0x1c + str r0, [sp, #4] + ldr r1, [sp, #4] + lsl r6, r6, #2 + add r7, r4, #4 + ldr r1, [r1, r6] + mov r2, #0xc + mul r2, r1 + ldr r1, _021D6FF0 ; =0x021D7970 + ldr r0, [r4, #0x18] + ldr r1, [r1, r2] + ldr r2, _021D6FF4 ; =ov77_021D7268 + ldr r3, [r7, r6] + bl sub_020146F4 + ldr r1, [sp, #4] + mov r2, #0xc + ldr r1, [r1, r6] + ldr r0, [r4, #0x18] + mul r2, r1 + ldr r1, _021D6FF8 ; =0x021D7974 + ldr r3, [r7, r6] + ldr r1, [r1, r2] + ldr r2, _021D6FF4 ; =ov77_021D7268 + bl sub_020146F4 + ldr r1, [sp, #4] + ldr r0, [r4, #0x18] + ldr r2, [r1, r6] + mov r1, #0xc + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D6FFC ; =0x021D7978 + ldr r2, _021D6FF4 ; =ov77_021D7268 + ldr r1, [r1, r3] + ldr r3, [r7, r6] + bl sub_020146F4 + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + b _021D6FE2 +_021D6F6E: + ldr r0, [r4, #0x18] + bl sub_02014710 + cmp r0, #0 + bne _021D6FE2 + ldr r1, _021D6FE8 ; =0x0400004A + mov r0, #0x3f + ldrh r2, [r1] + bic r2, r0 + mov r0, #0x10 + orr r2, r0 + mov r0, #0x20 + orr r0, r2 + strh r0, [r1] + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + b _021D6FE2 +_021D6F92: + lsl r6, r6, #2 + add r2, r4, r6 + ldr r2, [r2, #0x1c] + lsl r3, r2, #3 + ldr r2, _021D7000 ; =0x021D7944 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _021D6FE2 + add r0, r4, r6 + ldr r0, [r0, #4] + mov r1, #6 + mov r2, #1 + bl sub_02007DEC + mov r0, #0 + add r4, #0x29 + strb r0, [r4] + ldrb r0, [r5] + add r0, r0, #1 + strb r0, [r5] + b _021D6FE2 +_021D6FBE: + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x29 + strb r1, [r0] + add r0, r4, #0 + add r0, #0x29 + ldrb r0, [r0] + cmp r0, #0x14 + blo _021D6FE2 + mov r0, #0 + add r4, #0x29 + strb r0, [r4] + strb r0, [r5] + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_021D6FE2: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D6FE8: .word 0x0400004A +_021D6FEC: .word 0x021D7940 +_021D6FF0: .word 0x021D7970 +_021D6FF4: .word ov77_021D7268 +_021D6FF8: .word 0x021D7974 +_021D6FFC: .word 0x021D7978 +_021D7000: .word 0x021D7944 + thumb_func_end ov77_021D6E78 + + thumb_func_start ov77_021D7004 +ov77_021D7004: ; 0x021D7004 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r4, [r0, #4] + mov r1, #0 + add r0, r4, #0 + mov r2, #6 + bl sub_02008274 + mov r1, #1 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x11 + bl sub_02008274 + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x8c + bl sub_02008274 + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x8d + bl sub_02008274 + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x29 + add r5, #0x29 + strb r1, [r0] + ldrb r0, [r5] + cmp r0, #6 + blo _021D706E + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D706E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D7004 + + thumb_func_start ov77_021D7074 +ov77_021D7074: ; 0x021D7074 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r4, [r0, #4] + mov r1, #0 + add r0, r4, #0 + sub r2, r1, #3 + bl sub_02008274 + mov r1, #1 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x13 + bl sub_02008274 + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x29 + add r5, #0x29 + strb r1, [r0] + ldrb r0, [r5] + cmp r0, #6 + blo _021D70C6 + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D70C6: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D7074 + + thumb_func_start ov77_021D70CC +ov77_021D70CC: ; 0x021D70CC + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r4, [r0, #4] + mov r1, #0 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x10 + bl sub_02008274 + mov r1, #1 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x11 + bl sub_02008274 + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x8c + bl sub_02008274 + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x8d + bl sub_02008274 + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x29 + add r5, #0x29 + strb r1, [r0] + ldrb r0, [r5] + cmp r0, #6 + blo _021D7138 + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D7138: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov77_021D70CC + + thumb_func_start ov77_021D713C +ov77_021D713C: ; 0x021D713C + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r4, [r0, #4] + mov r1, #0 + add r0, r4, #0 + sub r2, r1, #6 + bl sub_02008274 + mov r1, #1 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x11 + bl sub_02008274 + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x29 + add r5, #0x29 + strb r1, [r0] + ldrb r0, [r5] + cmp r0, #6 + blo _021D718E + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D718E: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D713C + + thumb_func_start ov77_021D7194 +ov77_021D7194: ; 0x021D7194 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r4, [r0, #4] + mov r1, #0 + add r0, r4, #0 + mov r2, #8 + bl sub_02008274 + mov r1, #1 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x11 + bl sub_02008274 + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x8c + bl sub_02008274 + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x8d + bl sub_02008274 + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x29 + add r5, #0x29 + strb r1, [r0] + ldrb r0, [r5] + cmp r0, #6 + blo _021D71FE + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D71FE: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D7194 + + thumb_func_start ov77_021D7204 +ov77_021D7204: ; 0x021D7204 + push {r3, r4, r5, lr} + add r5, r0, #0 + lsl r0, r1, #2 + add r0, r5, r0 + ldr r4, [r0, #4] + mov r1, #0 + add r0, r4, #0 + mov r2, #6 + bl sub_02008274 + mov r1, #1 + add r2, r1, #0 + add r0, r4, #0 + sub r2, #0x15 + bl sub_02008274 + add r0, r5, #0 + add r0, #0x29 + ldrb r0, [r0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0x29 + add r5, #0x29 + strb r1, [r0] + ldrb r0, [r5] + cmp r0, #6 + blo _021D7256 + mov r1, #0xc + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf4 + bl sub_02007DEC + mov r1, #0xd + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xf3 + bl sub_02007DEC + mov r0, #1 + pop {r3, r4, r5, pc} +_021D7256: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D7204 + + thumb_func_start ov77_021D725C +ov77_021D725C: ; 0x021D725C + push {r3, lr} + bl sub_0201469C + bl sub_020146C0 + pop {r3, pc} + thumb_func_end ov77_021D725C + + thumb_func_start ov77_021D7268 +ov77_021D7268: ; 0x021D7268 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + bl sub_02014764 + add r2, sp, #0 + mov r1, #0 + str r1, [r2, #0] + str r1, [r2, #4] + add r4, r0, #0 + str r1, [r2, #8] + bl sub_020080C0 + sub r0, #0x80 + mov r1, #0xac + mul r1, r0 + str r1, [sp] + add r0, r4, #0 + mov r1, #1 + bl sub_020080C0 + sub r0, #0x60 + mov r1, #0xac + mul r1, r0 + str r1, [sp, #4] + mov r0, #0x40 + str r0, [sp, #8] + ldr r0, [r5, #0x20] + ldr r1, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #4] + add r0, r1, r0 + str r0, [r5, #0x28] + ldr r0, [r5, #0x20] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + ldr r0, [r0, #8] + add r0, r1, r0 + str r0, [r5, #0x2c] + ldr r0, [r5, #0x20] + ldr r1, [sp, #8] + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + add r0, r1, r0 + str r0, [r5, #0x30] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov77_021D7268 + + .rodata + + + .global Unk_ov77_021D7934 +Unk_ov77_021D7934: ; 0x021D7934 + .incbin "incbin/overlay77_rodata.bin", 0x66C, 0x678 - 0x66C + + .global Unk_ov77_021D7940 +Unk_ov77_021D7940: ; 0x021D7940 + .incbin "incbin/overlay77_rodata.bin", 0x678, 0x690 - 0x678 + + .global Unk_ov77_021D7958 +Unk_ov77_021D7958: ; 0x021D7958 + .incbin "incbin/overlay77_rodata.bin", 0x690, 0x6A8 - 0x690 + + .global Unk_ov77_021D7970 +Unk_ov77_021D7970: ; 0x021D7970 + .incbin "incbin/overlay77_rodata.bin", 0x6A8, 0x24 + diff --git a/asm/overlay78.s b/asm/ov78_021D0D80.s similarity index 98% rename from asm/overlay78.s rename to asm/ov78_021D0D80.s index 3e8a56a5f..9bf24c8b2 100644 --- a/asm/overlay78.s +++ b/asm/ov78_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov78_021D0D80 ov78_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -3602,12 +3605,31 @@ _021D2940: .word 0x00000183 _021D2944: .word 0x00000186 _021D2948: .word 0x00000189 thumb_func_end ov78_021D291C - ; 0x021D294C - .rodata - .incbin "incbin/overlay78_rodata.bin" - .bss - .space 0x0 + .global Unk_ov78_021D294C +Unk_ov78_021D294C: ; 0x021D294C + .incbin "incbin/overlay78_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov78_021D295C +Unk_ov78_021D295C: ; 0x021D295C + .incbin "incbin/overlay78_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov78_021D296C +Unk_ov78_021D296C: ; 0x021D296C + .incbin "incbin/overlay78_rodata.bin", 0x20, 0x3C - 0x20 + + .global Unk_ov78_021D2988 +Unk_ov78_021D2988: ; 0x021D2988 + .incbin "incbin/overlay78_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov78_021D29A4 +Unk_ov78_021D29A4: ; 0x021D29A4 + .incbin "incbin/overlay78_rodata.bin", 0x58, 0x74 - 0x58 + + .global Unk_ov78_021D29C0 +Unk_ov78_021D29C0: ; 0x021D29C0 + .incbin "incbin/overlay78_rodata.bin", 0x74, 0x28 + diff --git a/asm/ov79_021D0D80.s b/asm/ov79_021D0D80.s new file mode 100644 index 000000000..527a95123 --- /dev/null +++ b/asm/ov79_021D0D80.s @@ -0,0 +1,1409 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov79_021D0D80 +ov79_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02006840 + mov r2, #2 + add r5, r0, #0 + mov r0, #3 + mov r1, #0x2d + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r1, #2 + add r0, r4, #0 + lsl r1, r1, #8 + mov r2, #0x2d + bl sub_0200681C + mov r2, #2 + mov r1, #0 + lsl r2, r2, #8 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x2d + str r0, [r4, #0] + str r5, [r4, #0x20] + ldrb r0, [r5, #3] + strb r0, [r4, #0x1b] + ldr r0, _021D0DC0 ; =0x0000FFFF + strh r0, [r4, #0x14] + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D0DC0: .word 0x0000FFFF + thumb_func_end ov79_021D0D80 + + thumb_func_start ov79_021D0DC4 +ov79_021D0DC4: ; 0x021D0DC4 + push {r3, lr} + bl sub_0200682C + bl ov79_021D0E1C + cmp r0, #0 + beq _021D0DD6 + mov r0, #1 + pop {r3, pc} +_021D0DD6: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov79_021D0DC4 + + thumb_func_start ov79_021D0DDC +ov79_021D0DDC: ; 0x021D0DDC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + ldrb r1, [r4, #0x1a] + ldr r0, [r4, #0x20] + strb r1, [r0, #1] + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x20] + strb r1, [r0, #2] + ldrb r1, [r4, #0x1b] + ldr r0, [r4, #0x20] + strb r1, [r0, #3] + add r0, r4, #0 + add r0, #0x80 + ldrh r1, [r0] + ldr r0, [r4, #0x20] + strh r1, [r0, #4] + add r0, r4, #0 + add r0, #0x82 + ldrh r1, [r0] + ldr r0, [r4, #0x20] + strh r1, [r0, #6] + add r0, r5, #0 + bl sub_02006830 + ldr r0, [r4, #0] + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov79_021D0DDC + + thumb_func_start ov79_021D0E1C +ov79_021D0E1C: ; 0x021D0E1C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #6 + bls _021D0E2A + b _021D0F5E +_021D0E2A: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D0E36: ; jump table + .short _021D0E44 - _021D0E36 - 2 ; case 0 + .short _021D0E94 - _021D0E36 - 2 ; case 1 + .short _021D0EBC - _021D0E36 - 2 ; case 2 + .short _021D0ECE - _021D0E36 - 2 ; case 3 + .short _021D0F04 - _021D0E36 - 2 ; case 4 + .short _021D0F16 - _021D0E36 - 2 ; case 5 + .short _021D0F24 - _021D0E36 - 2 ; case 6 +_021D0E44: + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D0F70 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D0F74 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + mov r0, #0 + bl sub_0200F32C + mov r0, #1 + bl sub_0200F32C + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + b _021D0F64 +_021D0E94: + bl ov79_021D122C + cmp r0, #0 + bne _021D0EA2 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021D0EA2: + mov r0, #0 + str r0, [r4, #0xc] + mov r1, #6 + str r1, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r2, [r4, #0] + add r3, r0, #0 + str r2, [sp, #8] + add r2, r1, #0 + bl sub_0200F174 + b _021D0F64 +_021D0EBC: + bl ov79_021D21F8 + bl sub_0200F2AC + cmp r0, #0 + bne _021D0F64 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021D0ECE: + bl ov79_021D21F8 + ldrh r1, [r4, #0x18] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _021D0F78 ; =0x021D394C + ldr r1, [r1, r2] + blx r1 + cmp r0, #0 + bne _021D0EE8 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021D0EE8: + mov r0, #0 + str r0, [r4, #0xc] + mov r1, #6 + str r1, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r1, [r4, #0] + add r2, r0, #0 + str r1, [sp, #8] + add r1, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + b _021D0F64 +_021D0F04: + bl ov79_021D21F8 + bl sub_0200F2AC + cmp r0, #0 + bne _021D0F64 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021D0F16: + bl ov79_021D12A0 + cmp r0, #0 + bne _021D0F64 + add sp, #0xc + mov r0, #0 + pop {r3, r4, pc} +_021D0F24: + bl sub_0201E530 + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D0F70 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D0F74 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + b _021D0F64 +_021D0F5E: + add sp, #0xc + mov r0, #1 + pop {r3, r4, pc} +_021D0F64: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021D0F70: .word 0xFFFFE0FF +_021D0F74: .word 0x04001000 +_021D0F78: .word 0x021D394C + thumb_func_end ov79_021D0E1C + + thumb_func_start ov79_021D0F7C +ov79_021D0F7C: ; 0x021D0F7C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _021D0F8E + bl sub_0200C800 +_021D0F8E: + bl sub_0201DCAC + ldr r0, [r4, #0x24] + bl sub_0201C2B8 + ldr r3, _021D0FA8 ; =0x027E0000 + ldr r1, _021D0FAC ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_021D0FA8: .word 0x027E0000 +_021D0FAC: .word 0x00003FF8 + thumb_func_end ov79_021D0F7C + + thumb_func_start ov79_021D0FB0 +ov79_021D0FB0: ; 0x021D0FB0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _021D0FE8 ; =0x021D3964 + bl sub_02022664 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021D0FE4 + ldr r0, _021D0FE8 ; =0x021D3964 + bl sub_02022644 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _021D0FE0 + ldrh r0, [r4, #0x14] + cmp r0, #1 + bne _021D0FE0 + ldrb r1, [r4, #0x1b] + add r0, r4, #0 + mov r2, #2 + bl ov79_021D1B24 +_021D0FE0: + mov r0, #0 + mvn r0, r0 +_021D0FE4: + pop {r4, pc} + nop +_021D0FE8: .word 0x021D3964 + thumb_func_end ov79_021D0FB0 + + thumb_func_start ov79_021D0FEC +ov79_021D0FEC: ; 0x021D0FEC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + mov r4, #0 + mvn r4, r4 + cmp r1, #0 + bne _021D1002 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D1002: + bl ov79_021D0FB0 + add r1, r0, #0 + ldr r0, _021D1098 ; =0x021BF67C + ldr r0, [r0, #0x44] + cmp r0, #0 + beq _021D1024 + ldrh r0, [r5, #0x14] + cmp r0, #0 + bne _021D1036 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl sub_02001288 + add r4, r0, #0 + b _021D1036 +_021D1024: + cmp r1, #0 + blt _021D1032 + lsl r1, r1, #0x18 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl ov79_021D1C44 +_021D1032: + mov r0, #0 + pop {r3, r4, r5, pc} +_021D1036: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _021D1042 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D1042: + ldr r0, _021D1098 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _021D105E + ldr r0, _021D109C ; =0x000005DC + bl sub_02005748 + mov r0, #0xff + strb r0, [r5, #0x1a] + mov r0, #0 + str r0, [r5, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D105E: + mov r0, #1 + tst r0, r1 + beq _021D1092 + ldr r0, _021D109C ; =0x000005DC + bl sub_02005748 + cmp r4, #0xff + beq _021D107C + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _021D107C + add r0, r0, #1 + cmp r4, r0 + bne _021D1088 +_021D107C: + mov r0, #0xff + strb r0, [r5, #0x1a] + mov r0, #0 + str r0, [r5, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} +_021D1088: + strb r4, [r5, #0x1a] + mov r0, #1 + strh r0, [r5, #0x18] + mov r0, #0 + pop {r3, r4, r5, pc} +_021D1092: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D1098: .word 0x021BF67C +_021D109C: .word 0x000005DC + thumb_func_end ov79_021D0FEC + + thumb_func_start ov79_021D10A0 +ov79_021D10A0: ; 0x021D10A0 + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + bl ov79_021D2214 + add r0, r4, #0 + bl ov79_021D1ED8 + mov r0, #2 + strh r0, [r4, #0x18] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov79_021D10A0 + + thumb_func_start ov79_021D10B8 +ov79_021D10B8: ; 0x021D10B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl sub_02001288 + add r4, r0, #0 + ldr r0, _021D1144 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _021D10EA + ldr r0, _021D1148 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov79_021D1F60 + add r0, r5, #0 + mov r1, #0 + bl ov79_021D2214 + mov r0, #0 + strh r0, [r5, #0x18] + pop {r3, r4, r5, pc} +_021D10EA: + mov r0, #1 + tst r0, r1 + beq _021D113E + ldr r0, _021D1148 ; =0x000005DC + bl sub_02005748 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bhi _021D110E + bhs _021D112C + cmp r4, #1 + bhi _021D112C + cmp r4, #0 + beq _021D1114 + cmp r4, #1 + beq _021D111A + b _021D112C +_021D110E: + add r0, r0, #1 + cmp r4, r0 + b _021D112C +_021D1114: + mov r0, #1 + str r0, [r5, #0x10] + pop {r3, r4, r5, pc} +_021D111A: + add r0, r5, #0 + bl ov79_021D1F60 + add r0, r5, #0 + bl ov79_021D1FBC + mov r0, #3 + strh r0, [r5, #0x18] + b _021D113E +_021D112C: + add r0, r5, #0 + bl ov79_021D1F60 + add r0, r5, #0 + mov r1, #0 + bl ov79_021D2214 + mov r0, #0 + strh r0, [r5, #0x18] +_021D113E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D1144: .word 0x021BF67C +_021D1148: .word 0x000005DC + thumb_func_end ov79_021D10B8 + + thumb_func_start ov79_021D114C +ov79_021D114C: ; 0x021D114C + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #0x1f] + bl sub_0201D724 + cmp r0, #0 + beq _021D115E + mov r0, #0 + pop {r4, pc} +_021D115E: + add r0, r4, #0 + bl ov79_021D2054 + mov r0, #4 + strh r0, [r4, #0x18] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov79_021D114C + + thumb_func_start ov79_021D116C +ov79_021D116C: ; 0x021D116C + push {r4, lr} + add r4, r0, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r4, #0] + bl sub_02002114 + cmp r0, #0 + beq _021D1188 + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _021D119C + b _021D11B6 +_021D1188: + ldr r0, _021D11BC ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + bl ov79_021D2008 + mov r0, #5 + strh r0, [r4, #0x18] + mov r0, #0 + pop {r4, pc} +_021D119C: + ldr r0, _021D11BC ; =0x000005DC + bl sub_02005748 + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl sub_0200E084 + mov r0, #1 + strh r0, [r4, #0x18] + mov r0, #0 + pop {r4, pc} +_021D11B6: + mov r0, #0 + pop {r4, pc} + nop +_021D11BC: .word 0x000005DC + thumb_func_end ov79_021D116C + + thumb_func_start ov79_021D11C0 +ov79_021D11C0: ; 0x021D11C0 + push {r4, lr} + add r4, r0, #0 + ldrb r0, [r4, #0x1f] + bl sub_0201D724 + cmp r0, #0 + beq _021D11D2 + mov r0, #0 + pop {r4, pc} +_021D11D2: + ldr r0, _021D1228 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _021D11E0 + mov r0, #0 + pop {r4, pc} +_021D11E0: + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #1 + bl sub_0200E084 + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + ldrb r0, [r4, #0x1a] + ldr r3, [r4, #0x20] + lsl r2, r0, #3 + add r3, #0x20 + ldrb r1, [r3, r2] + mov r0, #0x40 + orr r0, r1 + strb r0, [r3, r2] + ldr r0, [r4, #0x20] + mov r1, #1 + strb r1, [r0, #2] + add r0, r4, #0 + mov r1, #0 + bl ov79_021D1AB8 + add r0, r4, #0 + bl ov79_021D196C + add r0, r4, #0 + mov r1, #0 + bl ov79_021D2214 + mov r0, #0 + strh r0, [r4, #0x18] + pop {r4, pc} + ; .align 2, 0 +_021D1228: .word 0x021BF67C + thumb_func_end ov79_021D11C0 + + thumb_func_start ov79_021D122C +ov79_021D122C: ; 0x021D122C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #5 + bhi _021D1290 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D1242: ; jump table + .short _021D124E - _021D1242 - 2 ; case 0 + .short _021D1254 - _021D1242 - 2 ; case 1 + .short _021D125A - _021D1242 - 2 ; case 2 + .short _021D1266 - _021D1242 - 2 ; case 3 + .short _021D126C - _021D1242 - 2 ; case 4 + .short _021D1272 - _021D1242 - 2 ; case 5 +_021D124E: + bl ov79_021D132C + b _021D1290 +_021D1254: + bl ov79_021D13C4 + b _021D1290 +_021D125A: + bl ov79_021D1568 + add r0, r4, #0 + bl ov79_021D14A4 + b _021D1290 +_021D1266: + bl ov79_021D20F4 + b _021D1290 +_021D126C: + bl ov79_021D167C + b _021D1290 +_021D1272: + bl ov79_021D196C + ldrb r1, [r4, #0x1b] + add r0, r4, #0 + mov r2, #4 + bl ov79_021D1B24 + ldr r0, _021D129C ; =ov79_021D0F7C + add r1, r4, #0 + bl sub_02017798 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + pop {r4, pc} +_021D1290: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + pop {r4, pc} + nop +_021D129C: .word ov79_021D0F7C + thumb_func_end ov79_021D122C + + thumb_func_start ov79_021D12A0 +ov79_021D12A0: ; 0x021D12A0 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #5 + bhi _021D1302 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D12B6: ; jump table + .short _021D12C2 - _021D12B6 - 2 ; case 0 + .short _021D12DA - _021D12B6 - 2 ; case 1 + .short _021D12E6 - _021D12B6 - 2 ; case 2 + .short _021D12F2 - _021D12B6 - 2 ; case 3 + .short _021D12F8 - _021D12B6 - 2 ; case 4 + .short _021D12FE - _021D12B6 - 2 ; case 5 +_021D12C2: + add r1, r4, #0 + add r1, #0xd0 + ldr r1, [r1, #0] + cmp r1, #0 + beq _021D12D0 + bl ov79_021D1F60 +_021D12D0: + add r0, r4, #0 + mov r1, #1 + bl ov79_021D1AB8 + b _021D1302 +_021D12DA: + bl ov79_021D17E8 + add r0, r4, #0 + bl ov79_021D21CC + b _021D1302 +_021D12E6: + bl ov79_021D1548 + add r0, r4, #0 + bl ov79_021D1618 + b _021D1302 +_021D12F2: + bl ov79_021D14A0 + b _021D1302 +_021D12F8: + bl ov79_021D13A4 + b _021D1302 +_021D12FE: + mov r0, #1 + pop {r4, pc} +_021D1302: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + mov r0, #0 + pop {r4, pc} + thumb_func_end ov79_021D12A0 + + thumb_func_start ov79_021D130C +ov79_021D130C: ; 0x021D130C + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D1328 ; =0x021D3980 + add r3, sp, #0 + mov r2, #5 +_021D1316: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D1316 + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D1328: .word 0x021D3980 + thumb_func_end ov79_021D130C + + thumb_func_start ov79_021D132C +ov79_021D132C: ; 0x021D132C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xb8 + add r5, r0, #0 + bl ov79_021D130C + ldr r0, [r5, #0] + bl sub_02018340 + add r3, sp, #0 + ldr r4, _021D139C ; =0x021D3910 + str r0, [r5, #0x24] + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r4, _021D13A0 ; =0x021D3A10 + add r3, sp, #0x10 + mov r2, #0x15 +_021D1358: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D1358 + mov r4, #0 + add r7, r4, #0 + add r6, sp, #0x10 +_021D1366: + lsl r1, r4, #0x18 + ldr r0, [r5, #0x24] + lsr r1, r1, #0x18 + add r2, r6, #0 + mov r3, #0 + bl sub_020183C4 + lsl r1, r4, #0x18 + ldr r0, [r5, #0x24] + lsr r1, r1, #0x18 + bl sub_02019EBC + lsl r0, r4, #0x18 + ldr r3, [r5, #0] + lsr r0, r0, #0x18 + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + add r7, r7, #1 + add r4, r4, #1 + add r6, #0x1c + cmp r7, #6 + blt _021D1366 + add sp, #0xb8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D139C: .word 0x021D3910 +_021D13A0: .word 0x021D3A10 + thumb_func_end ov79_021D132C + + thumb_func_start ov79_021D13A4 +ov79_021D13A4: ; 0x021D13A4 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021D13AA: + lsl r1, r4, #0x18 + ldr r0, [r5, #0x24] + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + cmp r4, #6 + blt _021D13AA + ldr r0, [r5, #0x24] + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov79_021D13A4 + + thumb_func_start ov79_021D13C4 +ov79_021D13C4: ; 0x021D13C4 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #0x53 + bl sub_02006C24 + add r4, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x53 + bl sub_0208C210 + mov r0, #3 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x53 + bl sub_0208C210 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #6 + lsl r0, r0, #6 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x53 + bl sub_0208C210 + mov r1, #0 + str r1, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #6 + lsl r0, r0, #6 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x53 + bl sub_0208C210 + mov r0, #0xa + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x53 + bl sub_0208C210 + mov r0, #0xb + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x24] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x53 + bl sub_0208C210 + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, [r5, #0x24] + mov r1, #3 + bl sub_0201C3C0 + ldr r0, [r5, #0x24] + mov r1, #5 + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov79_021D13C4 + + thumb_func_start ov79_021D14A0 +ov79_021D14A0: ; 0x021D14A0 + bx lr + ; .align 2, 0 + thumb_func_end ov79_021D14A0 + + thumb_func_start ov79_021D14A4 +ov79_021D14A4: ; 0x021D14A4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, [r6, #0] + mov r1, #1 + str r0, [sp, #4] + ldr r0, [r6, #0x24] + mov r2, #0x1f + mov r3, #0xf + bl sub_0200DAA4 + ldr r0, [r6, #0x20] + ldr r0, [r0, #0x18] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r6, #0] + mov r1, #1 + str r0, [sp, #4] + ldr r0, [r6, #0x24] + add r2, r1, #0 + mov r3, #0xe + bl sub_0200DD0C + mov r1, #0x1a + ldr r2, [r6, #0] + mov r0, #0 + lsl r1, r1, #4 + bl sub_02002E7C + mov r1, #6 + ldr r2, [r6, #0] + mov r0, #0 + lsl r1, r1, #6 + bl sub_02002E98 + mov r1, #0x1a + ldr r2, [r6, #0] + mov r0, #4 + lsl r1, r1, #4 + bl sub_02002E7C + add r5, r6, #0 + ldr r4, _021D1544 ; =0x021D39A8 + mov r7, #0 + add r5, #0xe8 +_021D1508: + ldrb r0, [r4, #2] + add r1, r5, #0 + str r0, [sp] + ldrb r0, [r4, #3] + str r0, [sp, #4] + ldrb r0, [r4, #4] + str r0, [sp, #8] + ldrb r0, [r4, #5] + str r0, [sp, #0xc] + ldrh r0, [r4, #6] + str r0, [sp, #0x10] + ldrb r2, [r4] + ldrb r3, [r4, #1] + ldr r0, [r6, #0x24] + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r7, r7, #1 + add r4, #8 + add r5, #0x10 + cmp r7, #0xd + blt _021D1508 + add r0, r6, #0 + bl ov79_021D2078 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1544: .word 0x021D39A8 + thumb_func_end ov79_021D14A4 + + thumb_func_start ov79_021D1548 +ov79_021D1548: ; 0x021D1548 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0xe8 +_021D1550: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xd + blt _021D1550 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov79_021D1548 + + thumb_func_start ov79_021D1568 +ov79_021D1568: ; 0x021D1568 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #2 + bl sub_02002BB8 + ldr r2, _021D1614 ; =0x000001CF + ldr r3, [r5, #0] + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + str r0, [r5, #0x2c] + ldr r0, [r5, #0] + bl sub_020158A8 + str r0, [r5, #0x28] + ldr r2, [r5, #0] + mov r0, #2 + mov r1, #0x40 + bl sub_0200B368 + str r0, [r5, #0x30] + ldr r1, [r5, #0] + mov r0, #0x40 + bl sub_02023790 + str r0, [r5, #0x34] + ldr r0, [r5, #0x2c] + mov r1, #6 + bl sub_0200B1EC + str r0, [r5, #0x38] + ldr r0, [r5, #0x2c] + mov r1, #0x16 + bl sub_0200B1EC + str r0, [r5, #0x3c] + ldr r0, [r5, #0x2c] + mov r1, #4 + bl sub_0200B1EC + str r0, [r5, #0x40] + ldr r0, [r5, #0x2c] + mov r1, #7 + bl sub_0200B1EC + str r0, [r5, #0x44] + ldr r0, [r5, #0x2c] + mov r1, #8 + bl sub_0200B1EC + str r0, [r5, #0x48] + ldr r0, [r5, #0x2c] + mov r1, #0 + bl sub_0200B1EC + str r0, [r5, #0x4c] + mov r4, #0 + add r6, r5, #0 +_021D15E0: + add r1, r4, #0 + ldr r0, [r5, #0x2c] + add r1, #0xb + bl sub_0200B1EC + str r0, [r6, #0x50] + cmp r4, #5 + bge _021D1604 + add r1, r4, #0 + ldr r0, [r5, #0x2c] + add r1, #0x11 + bl sub_0200B1EC + str r0, [r6, #0x68] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #6 + blt _021D15E0 +_021D1604: + ldr r0, [r5, #0x20] + ldr r0, [r0, #0x18] + bl sub_02027AC0 + add r5, #0x7c + strb r0, [r5] + pop {r4, r5, r6, pc} + nop +_021D1614: .word 0x000001CF + thumb_func_end ov79_021D1568 + + thumb_func_start ov79_021D1618 +ov79_021D1618: ; 0x021D1618 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021D1620: + ldr r0, [r5, #0x50] + bl sub_020237BC + cmp r4, #5 + bge _021D1638 + ldr r0, [r5, #0x68] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _021D1620 +_021D1638: + ldr r0, [r6, #0x4c] + bl sub_020237BC + ldr r0, [r6, #0x48] + bl sub_020237BC + ldr r0, [r6, #0x44] + bl sub_020237BC + ldr r0, [r6, #0x40] + bl sub_020237BC + ldr r0, [r6, #0x3c] + bl sub_020237BC + ldr r0, [r6, #0x38] + bl sub_020237BC + ldr r0, [r6, #0x34] + bl sub_020237BC + ldr r0, [r6, #0x30] + bl sub_0200B3F0 + ldr r0, [r6, #0x28] + bl sub_020158F4 + ldr r0, [r6, #0x2c] + bl sub_0200B190 + mov r0, #2 + bl sub_02002C60 + pop {r4, r5, r6, pc} + thumb_func_end ov79_021D1618 + + thumb_func_start ov79_021D167C +ov79_021D167C: ; 0x021D167C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r6, _021D17D4 ; =0x021D3AB8 + mov r7, #0 + add r4, r5, #0 +_021D1688: + mov r0, #0x6e + mov r1, #0x6f + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200CA08 + mov r1, #7 + lsl r1, r1, #6 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + add r7, r7, #1 + add r6, #0x28 + add r4, r4, #4 + cmp r7, #3 + blt _021D1688 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r6, _021D17D8 ; =0x021D3920 + mov r7, #0 + add r4, r5, #0 +_021D16DE: + mov r0, #0x6e + mov r1, #0x6f + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + ldr r2, _021D17DC ; =0x021D3B30 + bl sub_0200CA08 + mov r1, #0x73 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r7, #3 + bl sub_02021D6C + mov r0, #0x73 + mov r1, #0 + mov r2, #2 + lsl r0, r0, #2 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r4, r0] + bl sub_0200D494 + add r7, r7, #1 + add r4, r4, #4 + add r6, r6, #4 + cmp r7, #5 + blt _021D16DE + mov r7, #0 + ldr r6, _021D17E0 ; =0x021D3934 + add r4, r5, #0 + str r7, [sp, #0x10] +_021D1730: + mov r0, #0x6e + mov r1, #0x6f + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + ldr r2, _021D17E4 ; =0x021D3B58 + bl sub_0200CA08 + mov r1, #0x1e + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + ldr r1, [sp, #0x10] + bl sub_02021D6C + mov r0, #0x1e + lsl r0, r0, #4 + mov r1, #2 + ldr r0, [r4, r0] + lsl r1, r1, #0xc + bl sub_02021CE4 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + add r1, r7, #2 + bl sub_02021E90 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x1e + mov r1, #0 + mov r2, #2 + lsl r0, r0, #4 + ldrsh r1, [r6, r1] + ldrsh r2, [r6, r2] + ldr r0, [r4, r0] + bl sub_0200D494 + ldr r0, [sp, #0x10] + add r7, r7, #1 + add r0, r0, #3 + add r4, r4, #4 + add r6, r6, #4 + str r0, [sp, #0x10] + cmp r7, #6 + blt _021D1730 + mov r1, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #0x7e + str r1, [sp, #0xc] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r2, #0xe7 + mov r3, #0x4c + bl sub_0209916C + mov r1, #0x7f + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #0 + ldr r0, [r0, #4] + bl sub_0200D3F4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D17D4: .word 0x021D3AB8 +_021D17D8: .word 0x021D3920 +_021D17DC: .word 0x021D3B30 +_021D17E0: .word 0x021D3934 +_021D17E4: .word 0x021D3B58 + thumb_func_end ov79_021D167C + + thumb_func_start ov79_021D17E8 +ov79_021D17E8: ; 0x021D17E8 + push {r3, r4, r5, r6, r7, lr} + mov r1, #0x7e + add r5, r0, #0 + lsl r1, r1, #2 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + bl sub_02099370 + mov r7, #0x1e + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #4 +_021D1802: + ldr r0, [r4, r7] + bl sub_0200C7E4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #6 + blt _021D1802 + mov r7, #0x73 + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #2 +_021D1818: + ldr r0, [r4, r7] + bl sub_0200C7E4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #5 + blt _021D1818 + mov r6, #7 + mov r4, #0 + lsl r6, r6, #6 +_021D182C: + ldr r0, [r5, r6] + bl sub_0200C7E4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021D182C + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov79_021D17E8 + + .rodata + + + .global Unk_ov79_021D3910 +Unk_ov79_021D3910: ; 0x021D3910 + .incbin "incbin/overlay79_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov79_021D3920 +Unk_ov79_021D3920: ; 0x021D3920 + .incbin "incbin/overlay79_rodata.bin", 0x10, 0x24 - 0x10 + + .global Unk_ov79_021D3934 +Unk_ov79_021D3934: ; 0x021D3934 + .incbin "incbin/overlay79_rodata.bin", 0x24, 0x3C - 0x24 + + .global Unk_ov79_021D394C +Unk_ov79_021D394C: ; 0x021D394C + .incbin "incbin/overlay79_rodata.bin", 0x3C, 0x54 - 0x3C + + .global Unk_ov79_021D3964 +Unk_ov79_021D3964: ; 0x021D3964 + .incbin "incbin/overlay79_rodata.bin", 0x54, 0x70 - 0x54 + + .global Unk_ov79_021D3980 +Unk_ov79_021D3980: ; 0x021D3980 + .incbin "incbin/overlay79_rodata.bin", 0x70, 0x98 - 0x70 + + .global Unk_ov79_021D39A8 +Unk_ov79_021D39A8: ; 0x021D39A8 + .incbin "incbin/overlay79_rodata.bin", 0x98, 0x100 - 0x98 + + .global Unk_ov79_021D3A10 +Unk_ov79_021D3A10: ; 0x021D3A10 + .incbin "incbin/overlay79_rodata.bin", 0x100, 0x1A8 - 0x100 + + .global Unk_ov79_021D3AB8 +Unk_ov79_021D3AB8: ; 0x021D3AB8 + .incbin "incbin/overlay79_rodata.bin", 0x1A8, 0xC8 + diff --git a/asm/ov79_021D183C.s b/asm/ov79_021D183C.s new file mode 100644 index 000000000..11289a55e --- /dev/null +++ b/asm/ov79_021D183C.s @@ -0,0 +1,1151 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov79_021D183C +ov79_021D183C: ; 0x021D183C + ldrb r2, [r0, #4] + mov r1, #0x20 + bic r2, r1 + strb r2, [r0, #4] + mov r1, #0xff + strb r1, [r0, #6] + ldrb r1, [r0, #6] + strb r1, [r0, #7] + bx lr + ; .align 2, 0 + thumb_func_end ov79_021D183C + + thumb_func_start ov79_021D1850 +ov79_021D1850: ; 0x021D1850 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + cmp r3, #0 + beq _021D186E + mov r0, #0x42 + lsl r0, r0, #2 + mov r1, #1 + add r0, r5, r0 + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 +_021D186E: + mov r0, #0xd8 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + add r0, #0xe8 + mov r2, #0 + add r0, r5, r0 + mov r1, #0xff + add r3, r2, #0 + bl sub_0201AE78 + mov r0, #1 + bl sub_02002AC8 + mov r0, #0 + bl sub_02002AE4 + mov r3, #0 + str r3, [sp] + ldr r0, _021D18B0 ; =0x0001020F + str r4, [sp, #4] + str r0, [sp, #8] + mov r0, #0x42 + lsl r0, r0, #2 + add r0, r5, r0 + mov r1, #1 + add r2, r6, #0 + str r3, [sp, #0xc] + bl sub_0201D78C + strb r0, [r5, #0x1f] + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D18B0: .word 0x0001020F + thumb_func_end ov79_021D1850 + + thumb_func_start ov79_021D18B4 +ov79_021D18B4: ; 0x021D18B4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r5, r1, #0 + mov r0, #0xff + strb r0, [r5, #0x1e] + ldrb r0, [r5, #0x1e] + strb r0, [r5, #0x1d] + ldrb r2, [r5, #0x1b] + cmp r2, #5 + bne _021D18D2 + mov r7, #0x1f + b _021D18E8 +_021D18D2: + mov r7, #1 + ldr r1, [sp, #4] + cmp r2, #0 + ble _021D18E8 +_021D18DA: + lsl r0, r7, #0x19 + lsr r7, r0, #0x18 + add r0, r1, #1 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + cmp r1, r2 + blt _021D18DA +_021D18E8: + ldr r0, [sp] + mov r6, #0 + ldrb r0, [r0] + cmp r0, #0 + ble _021D195E + ldr r0, [sp] + str r0, [sp, #8] + add r0, #0x1c + str r0, [sp, #8] +_021D18FA: + ldr r0, [sp, #8] + lsl r1, r6, #3 + add r4, r0, r1 + add r0, r4, #0 + bl ov79_021D183C + ldrb r0, [r4, #4] + lsl r1, r0, #0x18 + lsr r1, r1, #0x1f + beq _021D1950 + lsl r1, r0, #0x19 + lsr r1, r1, #0x1f + bne _021D1950 + mov r1, #0x1f + and r1, r0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + tst r1, r7 + beq _021D1950 + mov r1, #0x20 + orr r0, r1 + strb r0, [r4, #4] + ldrb r0, [r5, #0x1d] + cmp r0, #0xff + ldrb r0, [r4, #5] + bne _021D1932 + strb r0, [r5, #0x1d] + b _021D193E +_021D1932: + ldrb r1, [r5, #0x1e] + lsl r2, r1, #3 + ldr r1, [sp] + add r1, r1, r2 + add r1, #0x23 + strb r0, [r1] +_021D193E: + ldrb r0, [r5, #0x1e] + strb r0, [r4, #6] + ldrb r0, [r4, #5] + strb r0, [r5, #0x1e] + ldr r0, [sp, #4] + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #4] +_021D1950: + add r0, r6, #1 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + ldr r0, [sp] + ldrb r0, [r0] + cmp r6, r0 + blt _021D18FA +_021D195E: + ldr r0, [sp, #4] + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov79_021D18B4 + + thumb_func_start ov79_021D196C +ov79_021D196C: ; 0x021D196C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0x20] + add r1, r5, #0 + bl ov79_021D18B4 + strb r0, [r5, #0x1c] + ldrb r0, [r5, #0x1c] + ldr r1, [r5, #0] + bl sub_02013A04 + add r1, r5, #0 + add r1, #0xcc + str r0, [r1, #0] + ldrb r4, [r5, #0x1e] + cmp r4, #0xff + beq _021D19E6 + mov r7, #0 +_021D1992: + ldr r1, [r5, #0x20] + lsl r0, r4, #3 + add r1, #0x1c + add r6, r1, r0 + ldrb r4, [r6, #6] + ldrb r1, [r6, #2] + ldr r0, [r5, #0x28] + bl sub_02015918 + add r2, r0, #0 + str r7, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [r5, #0x30] + add r1, r7, #0 + add r3, r7, #0 + bl sub_0200B48C + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldrb r2, [r6, #1] + ldr r0, [r5, #0x30] + mov r1, #1 + mov r3, #2 + bl sub_0200B60C + ldr r0, [r5, #0x30] + ldr r1, [r5, #0x34] + ldr r2, [r5, #0x3c] + bl sub_0200C388 + add r0, r5, #0 + add r0, #0xcc + ldrb r2, [r6, #5] + ldr r0, [r0, #0] + ldr r1, [r5, #0x34] + bl sub_02013A6C + cmp r4, #0xff + bne _021D1992 +_021D19E6: + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + ldr r1, [r5, #0x38] + mov r2, #0xff + bl sub_02013A6C + add r1, r5, #0 + ldr r0, _021D1AB4 ; =0x021D3BB0 + add r1, #0x84 + mov r2, #0x20 + bl sub_020C4DB0 + ldr r0, [r5, #0x20] + ldrh r1, [r0, #6] + add r0, r5, #0 + add r0, #0x82 + strh r1, [r0] + ldr r0, [r5, #0x20] + ldrh r1, [r0, #4] + add r0, r5, #0 + add r0, #0x80 + strh r1, [r0] + ldr r0, [r5, #0x20] + ldrb r0, [r0, #2] + cmp r0, #0 + beq _021D1A64 + add r0, r5, #0 + add r0, #0x80 + ldrh r0, [r0] + cmp r0, #0 + bne _021D1A48 + add r0, r5, #0 + add r0, #0x82 + ldrh r1, [r0] + cmp r1, #0 + beq _021D1A5E + ldrb r0, [r5, #0x1c] + sub r0, r0, #1 + cmp r1, r0 + blt _021D1A5E + add r0, r5, #0 + add r0, #0x82 + ldrh r0, [r0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0x82 + strh r1, [r0] + b _021D1A5E +_021D1A48: + add r1, r0, #6 + ldrb r0, [r5, #0x1c] + cmp r1, r0 + blt _021D1A5E + add r0, r5, #0 + add r0, #0x80 + ldrh r0, [r0] + sub r1, r0, #1 + add r0, r5, #0 + add r0, #0x80 + strh r1, [r0] +_021D1A5E: + ldr r0, [r5, #0x20] + mov r1, #0 + strb r1, [r0, #2] +_021D1A64: + add r1, r5, #0 + add r0, r5, #0 + add r1, #0xe8 + add r0, #0x90 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xcc + ldr r1, [r0, #0] + add r0, r5, #0 + add r0, #0x84 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xa0 + str r5, [r0, #0] + add r0, r5, #0 + add r2, r5, #0 + ldrb r1, [r5, #0x1c] + add r0, #0x94 + add r2, #0x82 + strh r1, [r0] + mov r0, #0 + strh r0, [r5, #0x16] + add r1, r5, #0 + add r1, #0x80 + ldr r3, [r5, #0] + add r0, r5, #0 + lsl r3, r3, #0x18 + ldrh r1, [r1] + ldrh r2, [r2] + add r0, #0x84 + lsr r3, r3, #0x18 + bl sub_0200112C + add r1, r5, #0 + add r1, #0xc4 + str r0, [r1, #0] + mov r0, #1 + strh r0, [r5, #0x16] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1AB4: .word 0x021D3BB0 + thumb_func_end ov79_021D196C + + thumb_func_start ov79_021D1AB8 +ov79_021D1AB8: ; 0x021D1AB8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0xb0 + str r0, [sp] + mov r0, #0x60 + add r4, r1, #0 + mov r1, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xe8 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + cmp r4, #0 + beq _021D1AE2 + add r0, r5, #0 + add r0, #0xe8 + bl sub_0201ACF4 +_021D1AE2: + add r0, r5, #0 + add r0, #0xc4 + add r1, r5, #0 + add r2, r5, #0 + ldr r0, [r0, #0] + add r1, #0x80 + add r2, #0x82 + bl sub_02001384 + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + bl sub_02013A3C + add r0, r5, #0 + add r0, #0x80 + ldrh r1, [r0] + ldr r0, [r5, #0x20] + strh r1, [r0, #4] + add r0, r5, #0 + add r0, #0x82 + ldrh r1, [r0] + ldr r0, [r5, #0x20] + strh r1, [r0, #6] + add r0, r5, #0 + mov r1, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r5, #0xcc + str r1, [r5, #0] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov79_021D1AB8 + + thumb_func_start ov79_021D1B24 +ov79_021D1B24: ; 0x021D1B24 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + cmp r2, #4 + bls _021D1B30 + b _021D1C36 +_021D1B30: + add r0, r2, r2 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D1B3C: ; jump table + .short _021D1B46 - _021D1B3C - 2 ; case 0 + .short _021D1B76 - _021D1B3C - 2 ; case 1 + .short _021D1BA6 - _021D1B3C - 2 ; case 2 + .short _021D1BD4 - _021D1B3C - 2 ; case 3 + .short _021D1C02 - _021D1B3C - 2 ; case 4 +_021D1B46: + mov r0, #0x1e + lsl r0, r0, #4 + add r6, r4, r0 + lsl r7, r5, #2 + lsl r1, r5, #1 + ldr r0, [r6, r7] + add r1, r5, r1 + bl sub_02021D6C + ldr r0, [r6, r7] + mov r1, #0 + bl sub_02021CC8 + add r1, r4, #0 + add r0, r5, #7 + add r1, #0xe8 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #1 + mov r2, #2 + mov r3, #0 + bl sub_0201C04C + b _021D1C36 +_021D1B76: + mov r0, #0x1e + lsl r0, r0, #4 + add r6, r4, r0 + lsl r7, r5, #2 + ldr r0, [r6, r7] + bl sub_02021DE0 + ldr r0, [r6, r7] + mov r1, #1 + bl sub_02021CC8 + add r1, r4, #0 + add r0, r5, #7 + add r1, #0xe8 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + mov r2, #4 + add r3, r1, #0 + bl sub_0201C04C + mov r0, #1 + strh r0, [r4, #0x14] + b _021D1C36 +_021D1BA6: + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r1, r5, #1 + add r1, r5, r1 + add r1, r1, #1 + bl sub_02021D6C + add r1, r4, #0 + add r0, r5, #7 + add r1, #0xe8 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #1 + mov r2, #2 + mov r3, #0 + bl sub_0201C04C + mov r0, #0 + strh r0, [r4, #0x14] + b _021D1C36 +_021D1BD4: + lsl r0, r5, #2 + add r1, r4, r0 + mov r0, #0x1e + lsl r0, r0, #4 + ldr r0, [r1, r0] + lsl r1, r5, #1 + add r1, r5, r1 + add r1, r1, #2 + bl sub_02021D6C + add r1, r4, #0 + add r0, r5, #7 + add r1, #0xe8 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + mov r2, #2 + add r3, r1, #0 + bl sub_0201C04C + mov r0, #1 + strh r0, [r4, #0x14] + b _021D1C36 +_021D1C02: + mov r0, #0x1e + lsl r0, r0, #4 + lsl r1, r5, #1 + add r1, r5, r1 + add r6, r4, r0 + lsl r7, r5, #2 + ldr r0, [r6, r7] + add r1, r1, #1 + bl sub_02021D6C + ldr r0, [r6, r7] + mov r1, #1 + bl sub_02021CC8 + add r1, r4, #0 + add r0, r5, #7 + add r1, #0xe8 + lsl r0, r0, #4 + add r0, r1, r0 + mov r1, #0 + mov r2, #2 + add r3, r1, #0 + bl sub_0201C04C + mov r0, #0 + strh r0, [r4, #0x14] +_021D1C36: + add r0, r5, #7 + add r4, #0xe8 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A954 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov79_021D1B24 + + thumb_func_start ov79_021D1C44 +ov79_021D1C44: ; 0x021D1C44 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _021D1D14 ; =0x000005E4 + add r5, r1, #0 + bl sub_02005748 + ldrh r1, [r4, #0x14] + ldr r0, _021D1D18 ; =0x0000FFFF + cmp r1, r0 + beq _021D1C76 + ldrb r1, [r4, #0x1b] + cmp r5, r1 + bne _021D1C6E + add r0, r4, #0 + add r1, r5, #0 + mov r2, #3 + bl ov79_021D1B24 + add sp, #0x10 + pop {r3, r4, r5, pc} +_021D1C6E: + add r0, r4, #0 + mov r2, #0 + bl ov79_021D1B24 +_021D1C76: + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov79_021D1B24 + add r0, r4, #0 + mov r1, #0 + strb r5, [r4, #0x1b] + bl ov79_021D1AB8 + add r0, r4, #0 + mov r2, #0 + add r0, #0x82 + strh r2, [r0] + add r0, r4, #0 + add r0, #0x82 + ldrh r1, [r0] + add r0, r4, #0 + add r0, #0x80 + strh r1, [r0] + ldr r0, [r4, #0x20] + strh r2, [r0, #6] + ldr r1, [r4, #0x20] + ldrh r0, [r1, #6] + strh r0, [r1, #4] + add r0, r4, #0 + bl ov79_021D196C + mov r1, #0xa0 + str r1, [sp] + mov r0, #0x18 + add r1, #0xa8 + str r0, [sp, #4] + add r0, r4, r1 + mov r1, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + ldrb r1, [r4, #0x1b] + cmp r1, #5 + bne _021D1CD8 + mov r0, #0x52 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201A954 + add sp, #0x10 + pop {r3, r4, r5, pc} +_021D1CD8: + lsl r1, r1, #2 + add r1, r4, r1 + mov r0, #0 + ldr r1, [r1, #0x68] + add r2, r0, #0 + bl sub_02002D7C + mov r2, #0xa0 + sub r3, r2, r0 + mov r0, #3 + str r0, [sp] + mov r1, #0 + ldr r0, _021D1D1C ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + add r2, #0xa8 + str r1, [sp, #0xc] + add r0, r4, r2 + ldrb r2, [r4, #0x1b] + lsl r2, r2, #2 + add r2, r4, r2 + lsr r4, r3, #0x1f + add r4, r3, r4 + ldr r2, [r2, #0x68] + asr r3, r4, #1 + bl sub_0201D78C + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_021D1D14: .word 0x000005E4 +_021D1D18: .word 0x0000FFFF +_021D1D1C: .word 0x00010200 + thumb_func_end ov79_021D1C44 + + thumb_func_start ov79_021D1D20 +ov79_021D1D20: ; 0x021D1D20 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r1, #0 + ldr r6, _021D1D84 ; =0x00000001 + bne _021D1D4A + mov r4, #0 + mov r6, #0x73 + add r7, r4, #0 + lsl r6, r6, #2 +_021D1D32: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + add r1, r7, #0 + bl sub_02021CAC + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #5 + blo _021D1D32 + pop {r3, r4, r5, r6, r7, pc} +_021D1D4A: + mov r4, #0 +_021D1D4C: + ldrb r0, [r7, #4] + tst r0, r6 + beq _021D1D64 + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #1 + bl sub_02021CAC + b _021D1D74 +_021D1D64: + lsl r0, r4, #2 + add r1, r5, r0 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r1, r0] + mov r1, #0 + bl sub_02021CAC +_021D1D74: + lsl r0, r6, #0x19 + lsr r6, r0, #0x18 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #5 + blo _021D1D4C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1D84: .word 0x00000001 + thumb_func_end ov79_021D1D20 + + thumb_func_start ov79_021D1D88 +ov79_021D1D88: ; 0x021D1D88 + ldr r3, _021D1D90 ; =sub_02001504 + mov r1, #0x13 + bx r3 + nop +_021D1D90: .word sub_02001504 + thumb_func_end ov79_021D1D88 + + thumb_func_start ov79_021D1D94 +ov79_021D1D94: ; 0x021D1D94 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + mov r1, #0x13 + add r7, r0, #0 + add r6, r2, #0 + bl sub_02001504 + add r4, r0, #0 + cmp r6, #0 + bne _021D1DB0 + ldr r0, _021D1ED0 ; =0x000005DC + bl sub_02005748 +_021D1DB0: + add r1, sp, #0x10 + add r0, r7, #0 + add r1, #2 + add r2, sp, #0x10 + bl sub_020014DC + add r2, sp, #0x10 + ldrh r2, [r2] + mov r0, #7 + lsl r0, r0, #6 + lsl r2, r2, #4 + add r2, #0x28 + lsl r2, r2, #0x10 + ldr r0, [r4, r0] + mov r1, #0x69 + asr r2, r2, #0x10 + bl sub_0200D494 + add r0, sp, #0x10 + ldrh r0, [r0, #2] + cmp r0, #0 + bne _021D1DEA + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + b _021D1DF6 +_021D1DEA: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC +_021D1DF6: + add r0, sp, #0x10 + ldrh r1, [r0, #2] + ldrb r0, [r4, #0x1c] + sub r0, r0, #6 + cmp r1, r0 + bge _021D1E10 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + b _021D1E1C +_021D1E10: + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC +_021D1E1C: + mov r0, #0x50 + str r0, [sp] + mov r1, #0 + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xf8 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0201AE78 + cmp r5, #0xff + bne _021D1E58 + add r0, r4, #0 + mov r1, #0 + bl ov79_021D1D20 + add r0, r4, #0 + add r0, #0xf8 + bl sub_0201A954 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + ldr r0, [r0, #4] + bl sub_0200D3F4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} +_021D1E58: + ldr r1, [r4, #0x20] + lsl r5, r5, #3 + add r1, #0x1c + add r0, r4, #0 + add r1, r1, r5 + bl ov79_021D1D20 + ldr r0, [r4, #0x34] + bl sub_020237E8 + ldr r0, [r4, #0x20] + add r0, r0, r5 + ldrb r2, [r0, #0x1f] + cmp r2, #0x63 + bls _021D1E78 + mov r2, #0x63 +_021D1E78: + mov r1, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0x30] + mov r3, #2 + bl sub_0200B60C + ldr r0, [r4, #0x30] + ldr r1, [r4, #0x34] + ldr r2, [r4, #0x40] + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + ldr r0, _021D1ED4 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r4, #0 + ldr r2, [r4, #0x34] + add r0, #0xf8 + mov r3, #8 + bl sub_0201D78C + ldr r2, [r4, #0x20] + mov r1, #0x7e + lsl r1, r1, #2 + add r2, r2, r5 + ldr r0, [r4, r1] + add r1, r1, #4 + ldrb r2, [r2, #0x1e] + ldr r1, [r4, r1] + bl sub_0209933C + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + ldr r0, [r0, #4] + bl sub_0200D3F4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1ED0: .word 0x000005DC +_021D1ED4: .word 0x00010200 + thumb_func_end ov79_021D1D94 + + thumb_func_start ov79_021D1ED8 +ov79_021D1ED8: ; 0x021D1ED8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #3 + bl sub_02013A04 + add r1, r5, #0 + add r1, #0xd0 + str r0, [r1, #0] + mov r4, #0 +_021D1EEC: + add r0, r5, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + ldr r1, [r5, #0x2c] + add r2, r4, #1 + add r3, r4, #0 + bl sub_02013A4C + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D1EEC + add r1, r5, #0 + ldr r0, _021D1F5C ; =0x021D3B90 + add r1, #0xa4 + mov r2, #0x20 + bl sub_020C4DB0 + mov r0, #0x46 + lsl r0, r0, #2 + add r1, r5, #0 + add r0, r5, r0 + add r1, #0xb0 + str r0, [r1, #0] + add r1, r5, #0 + add r1, #0xd0 + ldr r2, [r1, #0] + add r1, r5, #0 + add r1, #0xa4 + str r2, [r1, #0] + add r1, r5, #0 + add r1, #0xc0 + str r5, [r1, #0] + add r1, r5, #0 + mov r2, #3 + add r1, #0xb4 + strh r2, [r1] + mov r1, #1 + mov r2, #0x1f + mov r3, #0xf + bl sub_0200DC48 + ldr r3, [r5, #0] + add r0, r5, #0 + mov r1, #0 + lsl r3, r3, #0x18 + add r0, #0xa4 + add r2, r1, #0 + lsr r3, r3, #0x18 + bl sub_0200112C + add r5, #0xc8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} + nop +_021D1F5C: .word 0x021D3B90 + thumb_func_end ov79_021D1ED8 + + thumb_func_start ov79_021D1F60 +ov79_021D1F60: ; 0x021D1F60 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #0x46 + lsl r0, r0, #2 + add r0, r4, r0 + mov r1, #0 + bl sub_0200DC9C + mov r0, #0x46 + lsl r0, r0, #2 + add r0, r4, r0 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #0xc8 + add r2, sp, #0 + ldr r0, [r0, #0] + add r1, sp, #0 + add r2, #2 + bl sub_02001384 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_02013A3C + add r0, r4, #0 + mov r1, #0 + add r0, #0xc8 + str r1, [r0, #0] + add r4, #0xd0 + str r1, [r4, #0] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D1F60 + + thumb_func_start ov79_021D1FA8 +ov79_021D1FA8: ; 0x021D1FA8 + push {r3, lr} + cmp r2, #0 + bne _021D1FB4 + ldr r0, _021D1FB8 ; =0x000005DC + bl sub_02005748 +_021D1FB4: + pop {r3, pc} + nop +_021D1FB8: .word 0x000005DC + thumb_func_end ov79_021D1FA8 + + thumb_func_start ov79_021D1FBC +ov79_021D1FBC: ; 0x021D1FBC + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x34] + bl sub_020237E8 + ldrb r1, [r4, #0x1a] + ldr r2, [r4, #0x20] + ldr r0, [r4, #0x28] + lsl r1, r1, #3 + add r1, r2, r1 + ldrb r1, [r1, #0x1e] + bl sub_02015918 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r3, #2 + str r3, [sp, #4] + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200B48C + ldr r0, [r4, #0x30] + ldr r1, [r4, #0x34] + ldr r2, [r4, #0x44] + bl sub_0200C388 + add r0, r4, #0 + ldr r1, [r4, #0x34] + add r4, #0x7c + ldrb r2, [r4] + mov r3, #1 + bl ov79_021D1850 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D1FBC + + thumb_func_start ov79_021D2008 +ov79_021D2008: ; 0x021D2008 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x34] + bl sub_020237E8 + ldrb r1, [r4, #0x1a] + ldr r2, [r4, #0x20] + ldr r0, [r4, #0x28] + lsl r1, r1, #3 + add r1, r2, r1 + ldrb r1, [r1, #0x1e] + bl sub_02015918 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + mov r3, #2 + str r3, [sp, #4] + ldr r0, [r4, #0x30] + mov r1, #0 + bl sub_0200B48C + ldr r0, [r4, #0x30] + ldr r1, [r4, #0x34] + ldr r2, [r4, #0x48] + bl sub_0200C388 + add r0, r4, #0 + ldr r1, [r4, #0x34] + add r4, #0x7c + ldrb r2, [r4] + mov r3, #0 + bl ov79_021D1850 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D2008 + + thumb_func_start ov79_021D2054 +ov79_021D2054: ; 0x021D2054 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r1, _021D2074 ; =0x021D3B88 + str r0, [sp] + ldr r0, [r4, #0x24] + mov r2, #0x1f + mov r3, #0xf + bl sub_02002100 + add r4, #0xd4 + str r0, [r4, #0] + add sp, #4 + pop {r3, r4, pc} + nop +_021D2074: .word 0x021D3B88 + thumb_func_end ov79_021D2054 + + thumb_func_start ov79_021D2078 +ov79_021D2078: ; 0x021D2078 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + mov r1, #0 + add r5, r0, #0 + str r1, [sp] + ldr r0, _021D20E8 ; =0x00010200 + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + mov r0, #0x4e + lsl r0, r0, #2 + ldr r2, [r5, #0x4c] + add r0, r5, r0 + mov r3, #4 + bl sub_0201D78C + add r0, r5, #0 + str r0, [sp, #0x10] + add r0, #0xe8 + ldr r4, _021D20EC ; =0x021D3B80 + mov r6, #0 + str r0, [sp, #0x10] +_021D20A4: + ldr r1, [r5, #0x50] + mov r0, #2 + mov r2, #0 + bl sub_02002D7C + mov r1, #0x40 + sub r3, r1, r0 + ldrb r0, [r4] + lsr r7, r3, #0x1f + add r7, r3, r7 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _021D20F0 ; =0x00020301 + asr r3, r7, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + add r0, r6, #7 + lsl r1, r0, #4 + ldr r0, [sp, #0x10] + ldr r2, [r5, #0x50] + add r0, r0, r1 + mov r1, #2 + bl sub_0201D78C + add r6, r6, #1 + add r5, r5, #4 + add r4, r4, #1 + cmp r6, #6 + blt _021D20A4 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_021D20E8: .word 0x00010200 +_021D20EC: .word 0x021D3B80 +_021D20F0: .word 0x00020301 + thumb_func_end ov79_021D2078 + + .rodata + + + .global Unk_ov79_021D3B80 +Unk_ov79_021D3B80: ; 0x021D3B80 + .incbin "incbin/overlay79_rodata.bin", 0x270, 0x278 - 0x270 + + .global Unk_ov79_021D3B88 +Unk_ov79_021D3B88: ; 0x021D3B88 + .incbin "incbin/overlay79_rodata.bin", 0x278, 0x280 - 0x278 + + .global Unk_ov79_021D3B90 +Unk_ov79_021D3B90: ; 0x021D3B90 + .incbin "incbin/overlay79_rodata.bin", 0x280, 0x2A0 - 0x280 + + .global Unk_ov79_021D3BB0 +Unk_ov79_021D3BB0: ; 0x021D3BB0 + .incbin "incbin/overlay79_rodata.bin", 0x2A0, 0x20 + diff --git a/asm/ov79_021D20F4.s b/asm/ov79_021D20F4.s new file mode 100644 index 000000000..6375839fb --- /dev/null +++ b/asm/ov79_021D20F4.s @@ -0,0 +1,224 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov79_021D20F4 +ov79_021D20F4: ; 0x021D20F4 + push {r4, r5, r6, r7, lr} + sub sp, #0x54 + add r4, r0, #0 + ldr r1, [r4, #0] + mov r0, #0x20 + bl sub_0201DBEC + ldr r0, [r4, #0] + bl sub_0200C6E4 + mov r1, #0x6e + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, r1] + bl sub_0200C704 + mov r7, #0x6f + lsl r7, r7, #2 + add r2, sp, #0x34 + ldr r3, _021D21C0 ; =0x021D3C00 + str r0, [r4, r7] + ldmia r3!, {r0, r1} + add r6, r2, #0 + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + ldr r5, _021D21C4 ; =0x021D3BD0 + stmia r2!, {r0, r1} + add r3, sp, #0x20 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, r6, #0 + str r0, [r3, #0] + sub r0, r7, #4 + ldr r0, [r4, r0] + mov r3, #0x20 + bl sub_0200C73C + sub r1, r7, #4 + ldr r0, [r4, r1] + add r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0xe + bl sub_0200C7C0 + ldr r0, [r4, #0] + bl sub_0200A93C + ldr r0, [r4, #0] + bl sub_0200A944 + ldr r5, _021D21C8 ; =0x021D3BE4 + add r3, sp, #4 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + sub r1, r7, #4 + str r0, [r3, #0] + ldr r0, [r4, r1] + add r1, r1, #4 + ldr r1, [r4, r1] + bl sub_0200C8F0 + mov r1, #1 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0] + add r2, r1, #0 + add r3, r1, #0 + bl sub_02098FFC + add r1, r7, #0 + add r1, #0x3c + str r0, [r4, r1] + bl sub_02035E38 + cmp r0, #0 + beq _021D21AC + bl sub_02039734 +_021D21AC: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x54 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D21C0: .word 0x021D3C00 +_021D21C4: .word 0x021D3BD0 +_021D21C8: .word 0x021D3BE4 + thumb_func_end ov79_021D20F4 + + thumb_func_start ov79_021D21CC +ov79_021D21CC: ; 0x021D21CC + push {r4, lr} + add r4, r0, #0 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0209903C + mov r1, #0x6e + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, r1, #4 + ldr r1, [r4, r1] + bl sub_0200C8B0 + mov r0, #0x6e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200C8D4 + bl sub_0201DC3C + pop {r4, pc} + thumb_func_end ov79_021D21CC + + thumb_func_start ov79_021D21F8 +ov79_021D21F8: ; 0x021D21F8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200C7EC + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_02099160 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D21F8 + + thumb_func_start ov79_021D2214 +ov79_021D2214: ; 0x021D2214 + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + bne _021D2242 + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021E90 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + pop {r4, pc} +_021D2242: + mov r0, #7 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #9 + bl sub_02021E90 + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CC8 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CC8 + pop {r4, pc} + thumb_func_end ov79_021D2214 + + .rodata + + + .global Unk_ov79_021D3BD0 +Unk_ov79_021D3BD0: ; 0x021D3BD0 + .incbin "incbin/overlay79_rodata.bin", 0x2C0, 0x2D4 - 0x2C0 + + .global Unk_ov79_021D3BE4 +Unk_ov79_021D3BE4: ; 0x021D3BE4 + .incbin "incbin/overlay79_rodata.bin", 0x2D4, 0x2F0 - 0x2D4 + + .global Unk_ov79_021D3C00 +Unk_ov79_021D3C00: ; 0x021D3C00 + .incbin "incbin/overlay79_rodata.bin", 0x2F0, 0x20 + + + .data + + + .global Unk_ov79_021D3D00 +Unk_ov79_021D3D00: ; 0x021D3D00 + .incbin "incbin/overlay79_data.bin", 0x0, 0x1C - 0x0 + + .global Unk_ov79_021D3D1C +Unk_ov79_021D3D1C: ; 0x021D3D1C + .incbin "incbin/overlay79_data.bin", 0x1C, 0x38 - 0x1C + + .global Unk_ov79_021D3D38 +Unk_ov79_021D3D38: ; 0x021D3D38 + .incbin "incbin/overlay79_data.bin", 0x38, 0x54 - 0x38 + + .global Unk_ov79_021D3D54 +Unk_ov79_021D3D54: ; 0x021D3D54 + .incbin "incbin/overlay79_data.bin", 0x54, 0x70 - 0x54 + + .global Unk_ov79_021D3D70 +Unk_ov79_021D3D70: ; 0x021D3D70 + .incbin "incbin/overlay79_data.bin", 0x70, 0x1B + diff --git a/asm/ov79_021D2268.s b/asm/ov79_021D2268.s new file mode 100644 index 000000000..f8f4646f0 --- /dev/null +++ b/asm/ov79_021D2268.s @@ -0,0 +1,2686 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov79_021D2268 +ov79_021D2268: ; 0x021D2268 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + add r5, r1, #0 + add r1, sp, #0 + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + add r4, r2, #0 + str r0, [r1, #8] + add r7, r3, #0 + ldr r0, [r4, #0] + add r1, r7, #0 + bl sub_020BCFD0 + str r0, [r5, #0] + ldr r0, [r4, #4] + add r1, r7, #0 + bl sub_020BCFD0 + str r0, [r5, #4] + ldr r0, [r4, #8] + add r1, r7, #0 + bl sub_020BCFD0 + add r2, sp, #0 + str r0, [r5, #8] + ldmia r2!, {r0, r1} + stmia r6!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r6, #0] + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov79_021D2268 + + thumb_func_start ov79_021D22AC +ov79_021D22AC: ; 0x021D22AC + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02006840 + mov r2, #1 + add r5, r0, #0 + mov r0, #3 + mov r1, #0x2e + lsl r2, r2, #0x10 + bl sub_02017FC8 + mov r1, #0x6f + add r0, r4, #0 + lsl r1, r1, #2 + mov r2, #0x2e + bl sub_0200681C + mov r2, #0x6f + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x2e + str r0, [r4, #0] + str r5, [r4, #0x10] + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov79_021D22AC + + thumb_func_start ov79_021D22E4 +ov79_021D22E4: ; 0x021D22E4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #2 + blt _021D2308 + cmp r0, #5 + bgt _021D2308 + add r0, r4, #0 + add r0, #0x40 + bl ov79_021D3820 + ldr r0, [r4, #0x5c] + bl sub_02099160 +_021D2308: + ldr r0, [r5, #0] + cmp r0, #7 + bls _021D2310 + b _021D2442 +_021D2310: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_021D231C: ; jump table + .short _021D232C - _021D231C - 2 ; case 0 + .short _021D2372 - _021D231C - 2 ; case 1 + .short _021D238C - _021D231C - 2 ; case 2 + .short _021D23B6 - _021D231C - 2 ; case 3 + .short _021D23C4 - _021D231C - 2 ; case 4 + .short _021D23EE - _021D231C - 2 ; case 5 + .short _021D23FC - _021D231C - 2 ; case 6 + .short _021D240C - _021D231C - 2 ; case 7 +_021D232C: + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D2454 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D2458 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + mov r0, #0 + bl sub_0200F32C + mov r0, #1 + bl sub_0200F32C + b _021D2448 +_021D2372: + add r0, r4, #0 + bl ov79_021D247C + cmp r0, #0 + bne _021D2382 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D2382: + ldr r0, _021D245C ; =ov79_021D252C + add r1, r4, #0 + bl sub_02017798 + b _021D2448 +_021D238C: + ldr r1, [r4, #4] + add r0, r1, #1 + str r0, [r4, #4] + cmp r1, #4 + bge _021D239C + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D239C: + mov r0, #0 + str r0, [r4, #4] + mov r1, #6 + str r1, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r2, [r4, #0] + add r3, r0, #0 + str r2, [sp, #8] + add r2, r1, #0 + bl sub_0200F174 + b _021D2448 +_021D23B6: + bl sub_0200F2AC + cmp r0, #0 + bne _021D2448 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D23C4: + add r0, r4, #0 + bl ov79_021D2928 + cmp r0, #0 + bne _021D23D4 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D23D4: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + b _021D2448 +_021D23EE: + bl sub_0200F2AC + cmp r0, #0 + bne _021D2448 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D23FC: + add r0, r4, #0 + bl ov79_021D24D4 + cmp r0, #0 + bne _021D2448 + add sp, #0xc + mov r0, #0 + pop {r4, r5, pc} +_021D240C: + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D2454 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D2458 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + b _021D2448 +_021D2442: + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_021D2448: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_021D2454: .word 0xFFFFE0FF +_021D2458: .word 0x04001000 +_021D245C: .word ov79_021D252C + thumb_func_end ov79_021D22E4 + + thumb_func_start ov79_021D2460 +ov79_021D2460: ; 0x021D2460 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, r5, #0 + bl sub_02006830 + ldr r0, [r4, #0] + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov79_021D2460 + + thumb_func_start ov79_021D247C +ov79_021D247C: ; 0x021D247C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #0 + beq _021D2490 + cmp r1, #1 + beq _021D249C + cmp r1, #2 + beq _021D24A8 + b _021D24C8 +_021D2490: + bl ov79_021D257C + add r0, r4, #0 + bl ov79_021D2634 + b _021D24C8 +_021D249C: + bl ov79_021D2768 + add r0, r4, #0 + bl ov79_021D270C + b _021D24C8 +_021D24A8: + bl ov79_021D27D8 + add r0, r4, #0 + add r1, r4, #0 + ldr r2, [r4, #0] + add r0, #0x40 + add r1, #0x30 + bl ov79_021D3768 + add r0, r4, #0 + bl ov79_021D2864 + mov r0, #0 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} +_021D24C8: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D247C + + thumb_func_start ov79_021D24D4 +ov79_021D24D4: ; 0x021D24D4 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #3 + bhi _021D2520 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D24EA: ; jump table + .short _021D24F2 - _021D24EA - 2 ; case 0 + .short _021D2506 - _021D24EA - 2 ; case 1 + .short _021D2512 - _021D24EA - 2 ; case 2 + .short _021D2518 - _021D24EA - 2 ; case 3 +_021D24F2: + bl ov79_021D2908 + add r0, r4, #0 + add r0, #0x40 + bl ov79_021D385C + add r0, r4, #0 + bl ov79_021D2858 + b _021D2520 +_021D2506: + bl ov79_021D2754 + add r0, r4, #0 + bl ov79_021D27AC + b _021D2520 +_021D2512: + bl ov79_021D260C + b _021D2520 +_021D2518: + mov r0, #0 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} +_021D2520: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D24D4 + + thumb_func_start ov79_021D252C +ov79_021D252C: ; 0x021D252C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x68] + bl sub_0201C2B8 + ldr r0, [r4, #0x44] + bl sub_02008A94 + bl sub_0200C800 + bl sub_0201DCAC + ldr r3, _021D2554 ; =0x027E0000 + ldr r1, _021D2558 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_021D2554: .word 0x027E0000 +_021D2558: .word 0x00003FF8 + thumb_func_end ov79_021D252C + + thumb_func_start ov79_021D255C +ov79_021D255C: ; 0x021D255C + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D2578 ; =0x021D3C70 + add r3, sp, #0 + mov r2, #5 +_021D2566: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D2566 + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D2578: .word 0x021D3C70 + thumb_func_end ov79_021D255C + + thumb_func_start ov79_021D257C +ov79_021D257C: ; 0x021D257C + push {r4, r5, r6, r7, lr} + sub sp, #0x6c + add r5, r0, #0 + bl ov79_021D255C + ldr r0, [r5, #0] + bl sub_02018340 + add r3, sp, #8 + ldr r4, _021D2600 ; =0x021D3C2C + str r0, [r5, #0x68] + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r4, _021D2604 ; =0x021D3C98 + add r3, sp, #0x18 + mov r2, #0xa +_021D25A8: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D25A8 + ldr r1, _021D2608 ; =0x021D3C20 + ldr r0, [r4, #0] + ldrb r2, [r1] + str r0, [r3, #0] + add r0, sp, #4 + strb r2, [r0] + ldrb r2, [r1, #1] + ldrb r1, [r1, #2] + add r4, sp, #4 + strb r2, [r0, #1] + strb r1, [r0, #2] + mov r0, #0 + str r0, [sp] + add r6, sp, #0x18 +_021D25CC: + ldrb r7, [r4] + ldr r0, [r5, #0x68] + add r2, r6, #0 + add r1, r7, #0 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r5, #0x68] + add r1, r7, #0 + bl sub_02019EBC + ldr r3, [r5, #0] + add r0, r7, #0 + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r0, [sp] + add r4, r4, #1 + add r0, r0, #1 + add r6, #0x1c + str r0, [sp] + cmp r0, #3 + blt _021D25CC + add sp, #0x6c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2600: .word 0x021D3C2C +_021D2604: .word 0x021D3C98 +_021D2608: .word 0x021D3C20 + thumb_func_end ov79_021D257C + + thumb_func_start ov79_021D260C +ov79_021D260C: ; 0x021D260C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #1 +_021D2612: + lsl r1, r4, #0x18 + ldr r0, [r5, #0x68] + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + cmp r4, #3 + blt _021D2612 + ldr r0, [r5, #0x68] + mov r1, #4 + bl sub_02019044 + ldr r0, [r5, #0x68] + bl sub_020181C4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov79_021D260C + + thumb_func_start ov79_021D2634 +ov79_021D2634: ; 0x021D2634 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #0x57 + bl sub_02006C24 + add r4, r0, #0 + mov r0, #2 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x68] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x57 + bl sub_0208C210 + mov r0, #3 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x68] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x57 + bl sub_0208C210 + mov r1, #0 + str r1, [sp] + mov r0, #2 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x20 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + ldr r0, [r5, #0x68] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x57 + bl sub_0208C210 + mov r0, #1 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xa0 + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0x68] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x57 + bl sub_0208C210 + mov r0, #4 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x68] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x57 + bl sub_0208C210 + mov r0, #5 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x68] + ldr r1, [r5, #0] + add r2, r4, #0 + mov r3, #0x57 + bl sub_0208C210 + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, [r5, #0x68] + mov r1, #2 + bl sub_0201C3C0 + ldr r0, [r5, #0x68] + mov r1, #4 + bl sub_0201C3C0 + add sp, #0x14 + pop {r4, r5, pc} + thumb_func_end ov79_021D2634 + + thumb_func_start ov79_021D270C +ov79_021D270C: ; 0x021D270C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + add r1, r4, #0 + ldr r0, [r4, #0x68] + ldr r2, _021D2750 ; =0x021D3C24 + add r1, #0x6c + bl sub_0201A8D4 + add r0, r4, #0 + add r0, #0x6c + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r4, #0x10] + mov r1, #1 + ldrb r0, [r0, #0xb] + add r2, r1, #0 + mov r3, #0xe + str r0, [sp] + ldr r0, [r4, #0] + str r0, [sp, #4] + ldr r0, [r4, #0x68] + bl sub_0200DD0C + mov r1, #0x1e + ldr r2, [r4, #0] + mov r0, #0 + lsl r1, r1, #4 + bl sub_02002E98 + add sp, #8 + pop {r4, pc} + nop +_021D2750: .word 0x021D3C24 + thumb_func_end ov79_021D270C + + thumb_func_start ov79_021D2754 +ov79_021D2754: ; 0x021D2754 + push {r4, lr} + add r4, r0, #0 + add r0, #0x6c + bl sub_0201ACF4 + add r4, #0x6c + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + thumb_func_end ov79_021D2754 + + thumb_func_start ov79_021D2768 +ov79_021D2768: ; 0x021D2768 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r2, _021D27A8 ; =0x000001CE + ldr r3, [r6, #0] + mov r0, #0 + mov r1, #0x1a + bl sub_0200B144 + str r0, [r6, #0x18] + ldr r2, [r6, #0] + mov r0, #1 + mov r1, #0x40 + bl sub_0200B368 + str r0, [r6, #0x1c] + ldr r1, [r6, #0] + mov r0, #0x40 + bl sub_02023790 + str r0, [r6, #0x20] + mov r4, #0 + add r5, r6, #0 +_021D2794: + ldr r0, [r6, #0x18] + add r1, r4, #0 + bl sub_0200B1EC + str r0, [r5, #0x24] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021D2794 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_021D27A8: .word 0x000001CE + thumb_func_end ov79_021D2768 + + thumb_func_start ov79_021D27AC +ov79_021D27AC: ; 0x021D27AC + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_021D27B4: + ldr r0, [r5, #0x24] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _021D27B4 + ldr r0, [r6, #0x20] + bl sub_020237BC + ldr r0, [r6, #0x1c] + bl sub_0200B3F0 + ldr r0, [r6, #0x18] + bl sub_0200B190 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov79_021D27AC + + thumb_func_start ov79_021D27D8 +ov79_021D27D8: ; 0x021D27D8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x10] + mov r1, #5 + ldr r0, [r0, #0] + mov r2, #0 + str r0, [r4, #0x30] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0] + bl sub_02074470 + strh r0, [r4, #0x34] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0] + bl sub_02075D6C + add r1, r4, #0 + add r1, #0x37 + strb r0, [r1] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0] + bl sub_02075BCC + add r1, r4, #0 + add r1, #0x36 + strb r0, [r1] + ldr r0, [r4, #0x10] + mov r1, #0x70 + ldr r0, [r0, #0] + mov r2, #0 + bl sub_02074470 + add r1, r0, #0 + ldrh r0, [r4, #0x34] + mov r2, #0x1c + bl sub_020759CC + mov r1, #1 + eor r1, r0 + add r0, r4, #0 + add r0, #0x38 + strb r1, [r0] + ldr r1, [r4, #0] + mov r0, #0xc + bl sub_02023790 + str r0, [r4, #0x3c] + ldr r0, [r4, #0x10] + ldr r2, [r4, #0x3c] + ldr r0, [r0, #0] + mov r1, #0x77 + bl sub_02074470 + add r1, r4, #0 + ldr r0, [r4, #0x10] + add r1, #0x36 + ldrb r1, [r1] + ldr r0, [r0, #4] + bl sub_02098EAC + add r4, #0x39 + strb r0, [r4] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D27D8 + + thumb_func_start ov79_021D2858 +ov79_021D2858: ; 0x021D2858 + ldr r3, _021D2860 ; =sub_020237BC + ldr r0, [r0, #0x3c] + bx r3 + nop +_021D2860: .word sub_020237BC + thumb_func_end ov79_021D2858 + + thumb_func_start ov79_021D2864 +ov79_021D2864: ; 0x021D2864 + push {r3, r4, r5, r6, lr} + sub sp, #0x44 + add r4, r0, #0 + ldr r1, [r4, #0] + mov r0, #0x20 + bl sub_0201DBEC + ldr r0, [r4, #0] + bl sub_0200C6E4 + add r2, sp, #0x24 + ldr r5, _021D2900 ; =0x021D3C50 + str r0, [r4, #0x7c] + ldmia r5!, {r0, r1} + add r3, r2, #0 + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + ldr r6, _021D2904 ; =0x021D3C3C + stmia r2!, {r0, r1} + add r5, sp, #0x10 + ldmia r6!, {r0, r1} + add r2, r5, #0 + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r1, r3, #0 + str r0, [r5, #0] + ldr r0, [r4, #0x7c] + mov r3, #0x20 + bl sub_0200C73C + ldr r0, [r4, #0] + bl sub_0200A93C + mov r0, #0 + str r0, [sp] + mov r1, #2 + ldr r0, [r4, #0] + add r2, r1, #0 + mov r3, #1 + bl sub_02098FFC + str r0, [r4, #0x5c] + mov r1, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + str r1, [sp, #8] + str r1, [sp, #0xc] + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x5c] + ldrh r1, [r1, #8] + mov r2, #0x64 + mov r3, #0x5a + bl sub_0209916C + str r0, [r4, #0x60] + ldr r0, [r0, #4] + mov r1, #0 + bl sub_0200D3F4 + bl sub_02035E38 + cmp r0, #0 + beq _021D28F4 + bl sub_02039734 +_021D28F4: + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x44 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_021D2900: .word 0x021D3C50 +_021D2904: .word 0x021D3C3C + thumb_func_end ov79_021D2864 + + thumb_func_start ov79_021D2908 +ov79_021D2908: ; 0x021D2908 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x5c] + ldr r1, [r4, #0x60] + bl sub_02099370 + ldr r0, [r4, #0x5c] + bl sub_0209903C + ldr r0, [r4, #0x7c] + bl sub_0200C8D4 + bl sub_0201DC3C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D2908 + + thumb_func_start ov79_021D2928 +ov79_021D2928: ; 0x021D2928 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #4] + cmp r1, #8 + bhi _021D29A8 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D293E: ; jump table + .short _021D2950 - _021D293E - 2 ; case 0 + .short _021D295C - _021D293E - 2 ; case 1 + .short _021D2968 - _021D293E - 2 ; case 2 + .short _021D2974 - _021D293E - 2 ; case 3 + .short _021D2980 - _021D293E - 2 ; case 4 + .short _021D298C - _021D293E - 2 ; case 5 + .short _021D2998 - _021D293E - 2 ; case 6 + .short _021D29A0 - _021D293E - 2 ; case 7 + .short _021D29A8 - _021D293E - 2 ; case 8 +_021D2950: + add r1, r4, #0 + add r1, #0x80 + bl ov79_021D2A04 + str r0, [r4, #4] + b _021D29B0 +_021D295C: + add r1, r4, #0 + add r1, #0x80 + bl ov79_021D2AE0 + str r0, [r4, #4] + b _021D29B0 +_021D2968: + add r1, r4, #0 + add r1, #0x80 + bl ov79_021D2AF0 + str r0, [r4, #4] + b _021D29B0 +_021D2974: + add r1, r4, #0 + add r1, #0x80 + bl ov79_021D2B3C + str r0, [r4, #4] + b _021D29B0 +_021D2980: + add r1, r4, #0 + add r1, #0x80 + bl ov79_021D2B54 + str r0, [r4, #4] + b _021D29B0 +_021D298C: + add r1, r4, #0 + add r1, #0x80 + bl ov79_021D2B84 + str r0, [r4, #4] + b _021D29B0 +_021D2998: + bl ov79_021D2B94 + str r0, [r4, #4] + b _021D29B0 +_021D29A0: + bl ov79_021D2C08 + str r0, [r4, #4] + b _021D29B0 +_021D29A8: + mov r0, #0 + str r0, [r4, #4] + mov r0, #1 + pop {r4, pc} +_021D29B0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov79_021D2928 + + thumb_func_start ov79_021D29B4 +ov79_021D29B4: ; 0x021D29B4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r2, #0 + add r3, r5, #0 + add r0, r1, #0 + mov r2, #0x1c + add r3, #0xcc + mul r0, r2 + add r4, r3, r0 + add r0, r4, #0 + mov r1, #0 + bl sub_020C4CF4 + str r5, [r4, #0x14] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #0x18] + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] + pop {r4, r5, r6, pc} + thumb_func_end ov79_021D29B4 + + thumb_func_start ov79_021D29E4 +ov79_021D29E4: ; 0x021D29E4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + bl sub_0200DA58 + ldr r1, [r4, #0x14] + mov r2, #0x1c + ldr r0, [r1, #4] + sub r0, r0, #1 + str r0, [r1, #4] + add r0, r4, #0 + mov r1, #0 + bl sub_020C4CF4 + mov r0, #0 + pop {r4, pc} + thumb_func_end ov79_021D29E4 + + thumb_func_start ov79_021D2A04 +ov79_021D2A04: ; 0x021D2A04 + push {r3, r4, r5, lr} + sub sp, #0x18 + add r4, r1, #0 + mov r2, #0x4f + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020C4CF4 + ldr r0, [r5, #0x60] + mov r2, #0x18 + ldr r0, [r0, #4] + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + ldr r1, [r5, #0x58] + add r0, r4, #0 + add r0, #0xc8 + str r1, [r0, #0] + add r5, #0x39 + ldrb r0, [r5] + mov r1, #2 + lsl r1, r1, #0x12 + str r0, [r4, #8] + str r2, [r4, #0] + mov r0, #0xe + str r1, [r4, #0xc] + lsl r0, r0, #0x10 + str r0, [r4, #0x10] + str r1, [r4, #0x18] + lsl r0, r2, #0xe + str r0, [r4, #0x1c] + lsr r0, r1, #7 + str r0, [r4, #0x30] + str r0, [r4, #0x34] + lsr r0, r1, #8 + str r0, [r4, #0x3c] + str r0, [r4, #0x40] + add r1, r4, #0 + str r2, [r4, #0x64] + mov r0, #0 + str r0, [r4, #0x60] + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, #0xc + bl sub_02021C50 + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xc + add r1, #0x18 + add r2, sp, #0xc + bl sub_020BD1B0 + add r1, r4, #0 + mov r3, #6 + add r0, sp, #0 + add r1, #0x48 + add r2, sp, #0xc + lsl r3, r3, #0xe + bl ov79_021D2268 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CF8 + add r0, r4, #0 + add r0, #0xc4 + add r1, r4, #0 + ldr r0, [r0, #0] + add r1, #0x30 + bl sub_02021C70 + ldr r2, _021D2AD0 ; =ov79_021D2C50 + add r0, r4, #0 + mov r1, #0 + bl ov79_021D29B4 + ldr r2, _021D2AD4 ; =ov79_021D2D7C + add r0, r4, #0 + mov r1, #1 + bl ov79_021D29B4 + ldr r2, _021D2AD8 ; =ov79_021D2F4C + add r0, r4, #0 + mov r1, #2 + bl ov79_021D29B4 + ldr r2, _021D2ADC ; =ov79_021D3094 + add r0, r4, #0 + mov r1, #3 + bl ov79_021D29B4 + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, pc} + nop +_021D2AD0: .word ov79_021D2C50 +_021D2AD4: .word ov79_021D2D7C +_021D2AD8: .word ov79_021D2F4C +_021D2ADC: .word ov79_021D3094 + thumb_func_end ov79_021D2A04 + + thumb_func_start ov79_021D2AE0 +ov79_021D2AE0: ; 0x021D2AE0 + ldr r0, [r1, #4] + cmp r0, #0 + beq _021D2AEA + mov r0, #1 + bx lr +_021D2AEA: + mov r0, #2 + bx lr + ; .align 2, 0 + thumb_func_end ov79_021D2AE0 + + thumb_func_start ov79_021D2AF0 +ov79_021D2AF0: ; 0x021D2AF0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x30] + mov r1, #0x70 + mov r2, #0 + bl sub_02074470 + add r1, r4, #0 + add r1, #0x39 + ldrb r1, [r1] + cmp r1, #1 + ldr r1, [r4, #0] + bne _021D2B22 + lsl r0, r0, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r1, [r4, #0x34] + mov r0, #0xb + mov r2, #0 + mov r3, #0x7f + bl sub_020059D0 + b _021D2B36 +_021D2B22: + lsl r0, r0, #0x18 + str r1, [sp] + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #0 + ldrh r1, [r4, #0x34] + add r2, r0, #0 + mov r3, #0x7f + bl sub_020059D0 +_021D2B36: + mov r0, #3 + add sp, #8 + pop {r4, pc} + thumb_func_end ov79_021D2AF0 + + thumb_func_start ov79_021D2B3C +ov79_021D2B3C: ; 0x021D2B3C + push {r3, lr} + bl sub_0200598C + cmp r0, #0 + beq _021D2B4A + mov r0, #3 + pop {r3, pc} +_021D2B4A: + mov r0, #0 + bl sub_0200592C + mov r0, #4 + pop {r3, pc} + thumb_func_end ov79_021D2B3C + + thumb_func_start ov79_021D2B54 +ov79_021D2B54: ; 0x021D2B54 + push {r4, lr} + add r4, r1, #0 + add r0, r4, #0 + add r0, #0x68 + mov r1, #0 + mov r2, #0x5c + bl sub_020C4CF4 + ldr r2, _021D2B7C ; =ov79_021D3290 + add r0, r4, #0 + mov r1, #0 + bl ov79_021D29B4 + ldr r2, _021D2B80 ; =ov79_021D33DC + add r0, r4, #0 + mov r1, #1 + bl ov79_021D29B4 + mov r0, #5 + pop {r4, pc} + ; .align 2, 0 +_021D2B7C: .word ov79_021D3290 +_021D2B80: .word ov79_021D33DC + thumb_func_end ov79_021D2B54 + + thumb_func_start ov79_021D2B84 +ov79_021D2B84: ; 0x021D2B84 + ldr r0, [r1, #4] + cmp r0, #0 + beq _021D2B8E + mov r0, #5 + bx lr +_021D2B8E: + mov r0, #6 + bx lr + ; .align 2, 0 + thumb_func_end ov79_021D2B84 + + thumb_func_start ov79_021D2B94 +ov79_021D2B94: ; 0x021D2B94 + push {r4, lr} + sub sp, #0x10 + mov r1, #1 + add r4, r0, #0 + add r0, #0x6c + add r2, r1, #0 + mov r3, #0xe + bl sub_0200E060 + add r0, r4, #0 + add r0, #0x6c + mov r1, #0xff + bl sub_0201ADA4 + ldr r0, [r4, #0x20] + bl sub_020237E8 + mov r0, #1 + str r0, [sp] + mov r3, #2 + str r3, [sp, #4] + ldr r0, [r4, #0x1c] + ldr r2, [r4, #0x3c] + mov r1, #0 + bl sub_0200B48C + add r2, r4, #0 + add r2, #0x39 + ldrb r2, [r2] + ldr r0, [r4, #0x1c] + ldr r1, [r4, #0x20] + lsl r2, r2, #2 + add r2, r4, r2 + ldr r2, [r2, #0x24] + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + ldr r0, [r4, #0x10] + mov r1, #1 + ldrb r0, [r0, #0xa] + str r0, [sp, #4] + ldr r0, _021D2C04 ; =0x0001020F + str r0, [sp, #8] + str r3, [sp, #0xc] + add r0, r4, #0 + ldr r2, [r4, #0x20] + add r0, #0x6c + bl sub_0201D78C + strh r0, [r4, #0xc] + mov r0, #0 + strh r0, [r4, #0xe] + mov r0, #7 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_021D2C04: .word 0x0001020F + thumb_func_end ov79_021D2B94 + + thumb_func_start ov79_021D2C08 +ov79_021D2C08: ; 0x021D2C08 + push {r4, lr} + add r4, r0, #0 + ldrh r0, [r4, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + beq _021D2C1E + mov r0, #7 + pop {r4, pc} +_021D2C1E: + ldr r0, _021D2C4C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _021D2C36 + ldrh r1, [r4, #0xe] + add r0, r1, #1 + strh r0, [r4, #0xe] + cmp r1, #0x5a + bhs _021D2C36 + mov r0, #7 + pop {r4, pc} +_021D2C36: + add r0, r4, #0 + add r0, #0x6c + mov r1, #1 + bl sub_0200E084 + add r4, #0x6c + add r0, r4, #0 + bl sub_0201ACF4 + mov r0, #8 + pop {r4, pc} + ; .align 2, 0 +_021D2C4C: .word 0x021BF67C + thumb_func_end ov79_021D2C08 + + thumb_func_start ov79_021D2C50 +ov79_021D2C50: ; 0x021D2C50 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + ldr r4, [r6, #0x14] + add r7, r0, #0 + mov r0, #0x18 + add r5, r4, #0 + str r0, [r6, #4] + mov r0, #1 + add r5, #0xc + lsl r0, r0, #0xc + str r0, [r5, #0x24] + str r0, [r5, #0x28] + lsr r0, r0, #1 + str r0, [r5, #0x30] + str r0, [r5, #0x34] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x24 + add r1, #0x30 + add r2, sp, #0xc + bl sub_020BD1B0 + ldr r0, [r6, #4] + cmp r0, #0 + ble _021D2C96 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D2CA4 +_021D2C96: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D2CA4: + bl sub_020E1740 + add r1, r5, #0 + add r3, r0, #0 + add r0, sp, #0 + add r1, #0x3c + add r2, sp, #0xc + bl ov79_021D2268 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CAC + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_02021CF8 + add r4, #0xc4 + add r5, #0x24 + ldr r0, [r4, #0] + add r1, r5, #0 + bl sub_02021C70 + ldr r1, _021D2CE8 ; =ov79_021D2CEC + add r0, r7, #0 + bl sub_0201CECC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D2CE8: .word ov79_021D2CEC + thumb_func_end ov79_021D2C50 + + thumb_func_start ov79_021D2CEC +ov79_021D2CEC: ; 0x021D2CEC + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r6, [r5, #0x14] + add r1, sp, #0 + mov r0, #0 + str r0, [r1, #0] + add r4, r6, #0 + str r0, [r1, #4] + str r0, [r1, #8] + add r4, #0xc + ldr r0, [r4, #0x3c] + ldr r2, [r5, #0xc] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + mov r0, #2 + add r3, r1, #0 + mov r7, #0 + lsl r0, r0, #0xa + add r0, r2, r0 + adc r3, r7 + ldr r1, [r4, #0x24] + lsl r2, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + sub r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #0x40] + ldr r2, [r5, #0xc] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r3, #2 + ldr r2, [r4, #0x28] + add r4, r7, #0 + lsl r3, r3, #0xa + add r3, r0, r3 + adc r1, r4 + lsl r0, r1, #0x14 + lsr r1, r3, #0xc + orr r1, r0 + sub r0, r2, r1 + str r0, [sp, #4] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, sp, #0 + bl sub_02021C70 + mov r0, #1 + ldr r1, [r5, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r5, #0xc] + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] + bne _021D2D78 + add r6, #0xc4 + ldr r0, [r6, #0] + add r1, r7, #0 + bl sub_02021CAC + add r0, r5, #0 + bl ov79_021D29E4 +_021D2D78: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov79_021D2CEC + + thumb_func_start ov79_021D2D7C +ov79_021D2D7C: ; 0x021D2D7C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + ldr r6, [r5, #0x14] + add r7, r0, #0 + add r3, sp, #0xc + mov r0, #0 + str r0, [r3, #0] + str r0, [r3, #4] + str r0, [r3, #8] + mov r2, #0x18 + mov r1, #2 + add r4, r6, #0 + mov r0, #0xe + str r2, [r5, #4] + lsl r1, r1, #0x12 + add r4, #0xc + str r1, [r6, #0xc] + lsl r0, r0, #0x10 + str r0, [r4, #4] + str r1, [r4, #0xc] + lsl r0, r2, #0xe + str r0, [r4, #0x10] + add r0, r4, #0 + add r0, #0xc + add r1, r4, #0 + add r2, r3, #0 + bl sub_020BD1B0 + ldr r0, [r5, #4] + cmp r0, #0 + ble _021D2DCE + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D2DDC +_021D2DCE: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D2DDC: + bl sub_020E1740 + add r1, r4, #0 + add r3, r0, #0 + add r0, sp, #0 + add r1, #0x18 + add r2, sp, #0xc + bl ov79_021D2268 + ldr r0, [r5, #4] + cmp r0, #0 + ble _021D2E06 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D2E14 +_021D2E06: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D2E14: + bl sub_020E1740 + add r1, r0, #0 + mov r0, #0x2d + lsl r0, r0, #0xe + bl sub_020BCFD0 + str r0, [r4, #0x48] + ldr r0, [r5, #4] + cmp r0, #0 + ble _021D2E3C + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D2E4A +_021D2E3C: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D2E4A: + bl sub_020E1740 + add r1, r0, #0 + mov r0, #1 + lsl r0, r0, #0xc + bl sub_020BCFD0 + add r6, #0xc4 + str r0, [r4, #0x4c] + ldr r0, [r6, #0] + add r1, r4, #0 + bl sub_02021C50 + ldr r1, _021D2E70 ; =ov79_021D2E74 + add r0, r7, #0 + bl sub_0201CECC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2E70: .word ov79_021D2E74 + thumb_func_end ov79_021D2D7C + + thumb_func_start ov79_021D2E74 +ov79_021D2E74: ; 0x021D2E74 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r6, [r5, #0x14] + ldr r2, [r5, #0xc] + add r4, r6, #0 + add r4, #0xc + ldr r0, [r4, #0x18] + asr r3, r2, #0x1f + asr r1, r0, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + mov r0, #2 + add r3, r1, #0 + mov r7, #0 + lsl r0, r0, #0xa + add r0, r2, r0 + adc r3, r7 + ldr r1, [r6, #0xc] + lsl r2, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + add r0, r1, r0 + str r0, [sp] + ldr r0, [r4, #0x1c] + ldr r2, [r5, #0xc] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + mov r0, #2 + add r3, r1, #0 + lsl r0, r0, #0xa + add r0, r2, r0 + adc r3, r7 + ldr r1, [r4, #4] + lsl r2, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + add r0, r1, r0 + str r0, [sp, #4] + ldr r0, [r4, #0x48] + ldr r2, [r5, #0xc] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + add r3, r7, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + lsl r0, r1, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, _021D2F48 ; =0xFFFC0000 + asr r1, r0, #0x1f + asr r3, r2, #0x12 + bl sub_020E1F1C + add r3, r7, #0 + mov r7, #2 + add r2, r1, #0 + lsl r7, r7, #0xa + add r0, r0, r7 + adc r2, r3 + lsl r2, r2, #0x14 + lsr r0, r0, #0xc + orr r0, r2 + asr r4, r0, #0x1f + lsr r2, r0, #0x14 + lsl r4, r4, #0xc + orr r4, r2 + lsl r0, r0, #0xc + add r2, r0, r7 + adc r4, r3 + ldr r1, [sp, #4] + lsl r0, r4, #0x14 + lsr r2, r2, #0xc + orr r2, r0 + add r0, r1, r2 + add r6, #0xc4 + str r0, [sp, #4] + ldr r0, [r6, #0] + add r1, sp, #0 + bl sub_02021C50 + ldr r1, [r5, #0xc] + lsl r0, r7, #1 + add r0, r1, r0 + str r0, [r5, #0xc] + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] + bne _021D2F44 + add r0, r5, #0 + bl ov79_021D29E4 +_021D2F44: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2F48: .word 0xFFFC0000 + thumb_func_end ov79_021D2E74 + + thumb_func_start ov79_021D2F4C +ov79_021D2F4C: ; 0x021D2F4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + ldr r4, [r6, #0x14] + add r7, r0, #0 + add r5, r4, #0 + mov r1, #0x18 + mov r0, #1 + add r5, #0x68 + str r1, [r6, #4] + lsl r0, r0, #0xc + str r0, [r5, #0x24] + str r0, [r5, #0x28] + lsl r0, r1, #8 + str r0, [r5, #0x30] + str r0, [r5, #0x34] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x30 + add r1, #0x24 + add r2, sp, #0xc + bl sub_020BD1B0 + ldr r0, [r6, #4] + cmp r0, #0 + ble _021D2F92 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D2FA0 +_021D2F92: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D2FA0: + bl sub_020E1740 + add r5, #0x3c + add r3, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + add r2, sp, #0xc + bl ov79_021D2268 + add r0, r4, #0 + add r0, #0xc8 + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r0, #0] + add r2, #0xf4 + bl sub_02007DEC + add r4, #0xc8 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #0] + add r2, #0xf3 + bl sub_02007DEC + ldr r1, _021D2FDC ; =ov79_021D2FE0 + add r0, r7, #0 + bl sub_0201CECC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2FDC: .word ov79_021D2FE0 + thumb_func_end ov79_021D2F4C + + thumb_func_start ov79_021D2FE0 +ov79_021D2FE0: ; 0x021D2FE0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + ldr r6, [r5, #0x14] + ldr r0, [r5, #0xc] + add r4, r6, #0 + add r4, #0x68 + str r0, [sp, #4] + asr r7, r0, #0x1f + ldr r0, [r4, #0x40] + ldr r2, [sp, #4] + asr r1, r0, #0x1f + add r3, r7, #0 + bl sub_020E1F1C + mov r3, #2 + add r2, r0, #0 + lsl r3, r3, #0xa + add r3, r2, r3 + ldr r2, _021D3090 ; =0x00000000 + ldr r0, [r4, #0x28] + adc r1, r2 + lsr r2, r3, #0xc + lsl r1, r1, #0x14 + orr r2, r1 + add r0, r0, r2 + str r0, [sp] + ldr r0, [r4, #0x3c] + ldr r2, [sp, #4] + asr r1, r0, #0x1f + add r3, r7, #0 + bl sub_020E1F1C + mov r2, #2 + add r3, r0, #0 + add r0, r6, #0 + add r7, r1, #0 + add r0, #0xc8 + lsl r2, r2, #0xa + mov r1, #0xc + add r3, r3, r2 + ldr r2, _021D3090 ; =0x00000000 + ldr r4, [r4, #0x24] + adc r7, r2 + lsl r2, r7, #0x14 + lsr r3, r3, #0xc + orr r3, r2 + add r2, r4, r3 + ldr r0, [r0, #0] + asr r2, r2, #4 + bl sub_02007DEC + add r0, r6, #0 + add r0, #0xc8 + ldr r2, [sp] + ldr r0, [r0, #0] + mov r1, #0xd + asr r2, r2, #4 + bl sub_02007DEC + mov r0, #1 + ldr r1, [r5, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r5, #0xc] + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] + bne _021D308A + add r0, r6, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #0 + mov r2, #0x80 + bl sub_02007DEC + add r6, #0xc8 + ldr r0, [r6, #0] + mov r1, #1 + mov r2, #0x60 + bl sub_02007DEC + add r0, r5, #0 + bl ov79_021D29E4 +_021D308A: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D3090: .word 0x00000000 + thumb_func_end ov79_021D2FE0 + + thumb_func_start ov79_021D3094 +ov79_021D3094: ; 0x021D3094 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + ldr r4, [r6, #0x14] + add r7, r0, #0 + mov r0, #0x18 + mov r1, #2 + add r5, r4, #0 + str r0, [r6, #4] + lsl r1, r1, #0x12 + add r5, #0x68 + str r1, [r4, #0x68] + lsl r0, r0, #0xe + str r0, [r5, #4] + mov r0, #7 + str r1, [r5, #0xc] + lsl r0, r0, #0x10 + str r0, [r5, #0x10] + add r0, r5, #0 + add r0, #0xc + add r1, r5, #0 + add r2, sp, #0xc + bl sub_020BD1B0 + ldr r0, [r6, #4] + cmp r0, #0 + ble _021D30DC + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D30EA +_021D30DC: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D30EA: + bl sub_020E1740 + add r1, r5, #0 + add r3, r0, #0 + add r0, sp, #0 + add r1, #0x18 + add r2, sp, #0xc + bl ov79_021D2268 + add r0, r4, #0 + add r0, #0xc8 + ldr r2, [r5, #0] + ldr r0, [r0, #0] + mov r1, #0 + asr r2, r2, #0xc + bl sub_02007DEC + add r4, #0xc8 + ldr r2, [r5, #4] + ldr r0, [r4, #0] + mov r1, #1 + asr r2, r2, #0xc + bl sub_02007DEC + ldr r1, _021D3128 ; =ov79_021D312C + add r0, r7, #0 + bl sub_0201CECC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D3128: .word ov79_021D312C + thumb_func_end ov79_021D3094 + + thumb_func_start ov79_021D312C +ov79_021D312C: ; 0x021D312C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + ldr r5, [r6, #0x14] + ldr r7, [r6, #0xc] + add r4, r5, #0 + str r0, [sp] + asr r0, r7, #0x1f + str r0, [sp, #8] + add r4, #0x68 + ldr r0, [r4, #0x1c] + ldr r3, [sp, #8] + asr r1, r0, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov r3, #2 + add r2, r0, #0 + lsl r3, r3, #0xa + add r3, r2, r3 + ldr r2, _021D3260 ; =0x00000000 + ldr r0, [r4, #4] + adc r1, r2 + lsr r2, r3, #0xc + lsl r1, r1, #0x14 + orr r2, r1 + add r0, r0, r2 + str r0, [sp, #4] + ldr r0, [r4, #0x18] + ldr r3, [sp, #8] + asr r1, r0, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov ip, r0 + ldr r2, [r5, #0x68] + add r7, r1, #0 + str r2, [sp, #0xc] + mov r2, #2 + add r0, r5, #0 + add r0, #0xc8 + mov r1, #0 + mov r3, ip + lsl r2, r2, #0xa + add r2, r3, r2 + adc r7, r1 + lsl r3, r7, #0x14 + lsr r2, r2, #0xc + orr r2, r3 + ldr r3, [sp, #0xc] + ldr r0, [r0, #0] + add r2, r3, r2 + asr r2, r2, #0xc + bl sub_02007DEC + add r0, r5, #0 + add r0, #0xc8 + ldr r2, [sp, #4] + ldr r0, [r0, #0] + mov r1, #1 + asr r2, r2, #0xc + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + sub r0, r0, #4 + add r1, r0, #0 + mul r1, r0 + mov r0, #0x10 + sub r0, r0, r1 + neg r0, r0 + cmp r0, #0 + ble _021D31D2 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D31E0 +_021D31D2: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D31E0: + bl sub_020E1740 + ldr r2, _021D3264 ; =0x00001666 + asr r1, r0, #0x1f + mov r3, #0 + bl sub_020E1F1C + add r3, r1, #0 + mov r1, #4 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0xc8 + lsl r2, r1, #9 + add r7, r7, r2 + ldr r2, _021D3260 ; =0x00000000 + ldr r0, [r0, #0] + adc r3, r2 + lsl r2, r3, #0x14 + lsr r3, r7, #0xc + orr r3, r2 + asr r2, r3, #0xc + bl sub_02007DEC + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x50 + strh r1, [r0] + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + cmp r0, #8 + bls _021D322E + add r0, r4, #0 + mov r1, #0 + add r0, #0x50 + strh r1, [r0] +_021D322E: + mov r0, #1 + ldr r1, [r6, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r6, #0xc] + ldr r1, [r6, #4] + sub r0, r1, #1 + str r0, [r6, #4] + cmp r1, #0 + bne _021D325C + add r5, #0xc8 + ldr r0, [r5, #0] + mov r1, #4 + mov r2, #0 + bl sub_02007DEC + mov r0, #0 + add r4, #0x50 + strh r0, [r4] + ldr r0, [sp] + ldr r1, _021D3268 ; =ov79_021D326C + bl sub_0201CECC +_021D325C: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3260: .word 0x00000000 +_021D3264: .word 0x00001666 +_021D3268: .word ov79_021D326C + thumb_func_end ov79_021D312C + + thumb_func_start ov79_021D326C +ov79_021D326C: ; 0x021D326C + push {r3, lr} + ldr r3, [r1, #0x14] + add r3, #0x68 + add r0, r3, #0 + add r0, #0x50 + ldrh r2, [r0] + add r0, r3, #0 + add r0, #0x50 + ldrh r0, [r0] + add r3, #0x50 + add r0, r0, #1 + strh r0, [r3] + cmp r2, #4 + blo _021D328E + add r0, r1, #0 + bl ov79_021D29E4 +_021D328E: + pop {r3, pc} + thumb_func_end ov79_021D326C + + thumb_func_start ov79_021D3290 +ov79_021D3290: ; 0x021D3290 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + ldr r4, [r6, #0x14] + add r7, r0, #0 + add r5, r4, #0 + mov r1, #8 + mov r0, #6 + add r5, #0x68 + str r1, [r6, #4] + lsl r0, r0, #0xa + str r0, [r5, #0x24] + str r0, [r5, #0x28] + lsl r0, r1, #9 + str r0, [r5, #0x30] + str r0, [r5, #0x34] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x30 + add r1, #0x24 + add r2, sp, #0xc + bl sub_020BD1B0 + ldr r0, [r6, #4] + cmp r0, #0 + ble _021D32D6 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D32E4 +_021D32D6: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D32E4: + bl sub_020E1740 + add r5, #0x3c + add r3, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + add r2, sp, #0xc + bl ov79_021D2268 + add r0, r4, #0 + add r0, #0xc8 + mov r1, #0xc + ldr r0, [r0, #0] + lsl r2, r1, #5 + bl sub_02007DEC + add r4, #0xc8 + mov r2, #6 + ldr r0, [r4, #0] + mov r1, #0xd + lsl r2, r2, #6 + bl sub_02007DEC + ldr r1, _021D3320 ; =ov79_021D3324 + add r0, r7, #0 + bl sub_0201CECC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D3320: .word ov79_021D3324 + thumb_func_end ov79_021D3290 + + thumb_func_start ov79_021D3324 +ov79_021D3324: ; 0x021D3324 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r1, #0 + ldr r6, [r5, #0x14] + ldr r0, [r5, #0xc] + add r4, r6, #0 + add r4, #0x68 + str r0, [sp, #4] + asr r7, r0, #0x1f + ldr r0, [r4, #0x40] + ldr r2, [sp, #4] + asr r1, r0, #0x1f + add r3, r7, #0 + bl sub_020E1F1C + mov r3, #2 + add r2, r0, #0 + lsl r3, r3, #0xa + add r3, r2, r3 + ldr r2, _021D33D8 ; =0x00000000 + ldr r0, [r4, #0x28] + adc r1, r2 + lsr r2, r3, #0xc + lsl r1, r1, #0x14 + orr r2, r1 + add r0, r0, r2 + str r0, [sp] + ldr r0, [r4, #0x3c] + ldr r2, [sp, #4] + asr r1, r0, #0x1f + add r3, r7, #0 + bl sub_020E1F1C + mov r2, #2 + add r3, r0, #0 + add r0, r6, #0 + add r7, r1, #0 + add r0, #0xc8 + lsl r2, r2, #0xa + mov r1, #0xc + add r3, r3, r2 + ldr r2, _021D33D8 ; =0x00000000 + ldr r4, [r4, #0x24] + adc r7, r2 + lsl r2, r7, #0x14 + lsr r3, r3, #0xc + orr r3, r2 + add r2, r4, r3 + ldr r0, [r0, #0] + asr r2, r2, #4 + bl sub_02007DEC + add r0, r6, #0 + add r0, #0xc8 + ldr r2, [sp] + ldr r0, [r0, #0] + mov r1, #0xd + asr r2, r2, #4 + bl sub_02007DEC + mov r0, #1 + ldr r1, [r5, #0xc] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r5, #0xc] + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] + bne _021D33D2 + add r0, r6, #0 + add r0, #0xc8 + mov r1, #0xc + add r2, r1, #0 + ldr r0, [r0, #0] + add r2, #0xf4 + bl sub_02007DEC + add r6, #0xc8 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r6, #0] + add r2, #0xf3 + bl sub_02007DEC + add r0, r5, #0 + bl ov79_021D29E4 +_021D33D2: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D33D8: .word 0x00000000 + thumb_func_end ov79_021D3324 + + thumb_func_start ov79_021D33DC +ov79_021D33DC: ; 0x021D33DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r1, #0 + ldr r4, [r6, #0x14] + add r7, r0, #0 + mov r0, #8 + add r5, r4, #0 + str r0, [r6, #4] + lsl r1, r0, #0x10 + mov r0, #7 + add r5, #0x68 + str r1, [r4, #0x68] + lsl r0, r0, #0x10 + str r0, [r5, #4] + mov r0, #6 + str r1, [r5, #0xc] + lsl r0, r0, #0x10 + str r0, [r5, #0x10] + add r0, r5, #0 + add r0, #0xc + add r1, r5, #0 + add r2, sp, #0xc + bl sub_020BD1B0 + ldr r0, [r6, #4] + cmp r0, #0 + ble _021D3424 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D3432 +_021D3424: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D3432: + bl sub_020E1740 + add r1, r5, #0 + add r3, r0, #0 + add r0, sp, #0 + add r1, #0x18 + add r2, sp, #0xc + bl ov79_021D2268 + ldr r0, [r6, #4] + cmp r0, #0 + ble _021D345C + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D346A +_021D345C: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D346A: + bl sub_020E1740 + add r1, r0, #0 + mov r0, #0x2d + lsl r0, r0, #0xe + bl sub_020BCFD0 + str r0, [r5, #0x48] + add r0, r4, #0 + add r0, #0xc8 + ldr r2, [r5, #0] + ldr r0, [r0, #0] + mov r1, #0 + asr r2, r2, #0xc + bl sub_02007DEC + add r4, #0xc8 + ldr r2, [r5, #4] + ldr r0, [r4, #0] + mov r1, #1 + asr r2, r2, #0xc + bl sub_02007DEC + ldr r1, _021D34A4 ; =ov79_021D34A8 + add r0, r7, #0 + bl sub_0201CECC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D34A4: .word ov79_021D34A8 + thumb_func_end ov79_021D33DC + + thumb_func_start ov79_021D34A8 +ov79_021D34A8: ; 0x021D34A8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + ldr r5, [r6, #0x14] + ldr r7, [r6, #0xc] + add r4, r5, #0 + str r0, [sp] + asr r0, r7, #0x1f + str r0, [sp, #8] + add r4, #0x68 + ldr r0, [r4, #0x1c] + ldr r3, [sp, #8] + asr r1, r0, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov r3, #2 + add r2, r0, #0 + lsl r3, r3, #0xa + add r3, r2, r3 + ldr r2, _021D35A4 ; =0x00000000 + ldr r0, [r4, #4] + adc r1, r2 + lsr r2, r3, #0xc + lsl r1, r1, #0x14 + orr r2, r1 + add r0, r0, r2 + str r0, [sp, #4] + ldr r0, [r4, #0x18] + ldr r3, [sp, #8] + asr r1, r0, #0x1f + add r2, r7, #0 + bl sub_020E1F1C + mov ip, r0 + ldr r2, [r5, #0x68] + add r7, r1, #0 + str r2, [sp, #0xc] + mov r2, #2 + add r0, r5, #0 + add r0, #0xc8 + mov r1, #0 + mov r3, ip + lsl r2, r2, #0xa + add r2, r3, r2 + adc r7, r1 + lsl r3, r7, #0x14 + lsr r2, r2, #0xc + orr r2, r3 + ldr r3, [sp, #0xc] + ldr r0, [r0, #0] + add r2, r3, r2 + asr r2, r2, #0xc + bl sub_02007DEC + add r0, r5, #0 + add r0, #0xc8 + ldr r2, [sp, #4] + ldr r0, [r0, #0] + mov r1, #1 + asr r2, r2, #0xc + bl sub_02007DEC + ldr r0, [r4, #0x48] + ldr r2, [r6, #0xc] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + lsl r0, r1, #4 + lsr r0, r0, #0x10 + bl sub_0201D250 + ldr r2, _021D35A8 ; =0xFFFFA000 + asr r1, r0, #0x1f + asr r3, r2, #0xf + bl sub_020E1F1C + add r4, r1, #0 + mov r1, #4 + add r3, r0, #0 + add r0, r5, #0 + add r0, #0xc8 + mov r7, #0 + lsl r2, r1, #9 + add r2, r3, r2 + adc r4, r7 + lsl r3, r4, #0x14 + lsr r2, r2, #0xc + orr r2, r3 + ldr r0, [r0, #0] + asr r2, r2, #0xc + bl sub_02007DEC + add r2, r6, #0 + add r2, #0xc + mov r0, #1 + ldr r1, [r2, #0] + lsl r0, r0, #0xc + add r0, r1, r0 + str r0, [r2, #0] + ldr r0, [r6, #4] + sub r0, r0, #1 + str r0, [r6, #4] + bne _021D359E + add r5, #0xc8 + ldr r0, [r5, #0] + mov r1, #4 + add r2, r7, #0 + bl sub_02007DEC + ldr r0, [sp] + ldr r1, _021D35AC ; =ov79_021D35B0 + bl sub_0201CECC +_021D359E: + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D35A4: .word 0x00000000 +_021D35A8: .word 0xFFFFA000 +_021D35AC: .word ov79_021D35B0 + thumb_func_end ov79_021D34A8 + + thumb_func_start ov79_021D35B0 +ov79_021D35B0: ; 0x021D35B0 + push {r3, lr} + ldr r3, [r1, #4] + add r2, r3, #1 + str r2, [r1, #4] + cmp r3, #4 + blt _021D35E0 + ldr r2, [r1, #0x14] + ldr r2, [r2, #8] + cmp r2, #0 + beq _021D35CA + cmp r2, #1 + beq _021D35D2 + b _021D35DA +_021D35CA: + ldr r1, _021D35E4 ; =ov79_021D35EC + bl sub_0201CECC + pop {r3, pc} +_021D35D2: + ldr r1, _021D35E8 ; =ov79_021D36CC + bl sub_0201CECC + pop {r3, pc} +_021D35DA: + add r0, r1, #0 + bl ov79_021D29E4 +_021D35E0: + pop {r3, pc} + nop +_021D35E4: .word ov79_021D35EC +_021D35E8: .word ov79_021D36CC + thumb_func_end ov79_021D35B0 + + thumb_func_start ov79_021D35EC +ov79_021D35EC: ; 0x021D35EC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x14] + mov r1, #0 + add r0, #0x68 + mov r2, #0x5c + bl sub_020C4CF4 + mov r0, #3 + str r0, [r4, #4] + ldr r1, _021D360C ; =ov79_021D3610 + add r0, r5, #0 + bl sub_0201CECC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D360C: .word ov79_021D3610 + thumb_func_end ov79_021D35EC + + thumb_func_start ov79_021D3610 +ov79_021D3610: ; 0x021D3610 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + ldr r7, [r5, #0x14] + add r4, r7, #0 + add r4, #0x68 + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + sub r0, r0, #4 + add r1, r0, #0 + mul r1, r0 + mov r0, #0x10 + sub r0, r0, r1 + neg r0, r0 + cmp r0, #0 + ble _021D3642 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D3650 +_021D3642: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D3650: + bl sub_020E1740 + ldr r2, _021D36C4 ; =0x00001666 + asr r1, r0, #0x1f + mov r3, #0 + bl sub_020E1F1C + add r6, r1, #0 + mov r1, #4 + add r3, r0, #0 + add r0, r7, #0 + add r0, #0xc8 + lsl r2, r1, #9 + add r3, r3, r2 + ldr r2, _021D36C8 ; =0x00000000 + ldr r0, [r0, #0] + adc r6, r2 + lsl r2, r6, #0x14 + lsr r3, r3, #0xc + orr r3, r2 + asr r2, r3, #0xc + bl sub_02007DEC + add r1, r4, #0 + mov r0, #0 + add r1, #0x52 + strh r0, [r1] + add r1, r4, #0 + add r1, #0x50 + ldrh r1, [r1] + add r2, r1, #1 + add r1, r4, #0 + add r1, #0x50 + strh r2, [r1] + add r1, r4, #0 + add r1, #0x50 + ldrh r1, [r1] + cmp r1, #8 + bls _021D36A8 + add r4, #0x50 + strh r0, [r4] + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] +_021D36A8: + ldr r0, [r5, #4] + cmp r0, #0 + bne _021D36C0 + add r7, #0xc8 + ldr r0, [r7, #0] + mov r1, #4 + mov r2, #0 + bl sub_02007DEC + add r0, r5, #0 + bl ov79_021D29E4 +_021D36C0: + pop {r3, r4, r5, r6, r7, pc} + nop +_021D36C4: .word 0x00001666 +_021D36C8: .word 0x00000000 + thumb_func_end ov79_021D3610 + + thumb_func_start ov79_021D36CC +ov79_021D36CC: ; 0x021D36CC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x14] + mov r1, #0 + add r0, #0x68 + mov r2, #0x5c + bl sub_020C4CF4 + mov r0, #0x20 + str r0, [r4, #4] + ldr r1, _021D36EC ; =ov79_021D36F0 + add r0, r5, #0 + bl sub_0201CECC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D36EC: .word ov79_021D36F0 + thumb_func_end ov79_021D36CC + + thumb_func_start ov79_021D36F0 +ov79_021D36F0: ; 0x021D36F0 + push {r4, r5, r6, lr} + add r5, r1, #0 + ldr r6, [r5, #0x14] + add r4, r6, #0 + add r4, #0x68 + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + bl sub_0201D250 + asr r1, r0, #0x1f + lsr r2, r0, #0x13 + lsl r1, r1, #0xd + orr r1, r2 + mov r2, #2 + lsl r3, r0, #0xd + mov r0, #0 + lsl r2, r2, #0xa + add r2, r3, r2 + adc r1, r0 + lsl r1, r1, #0x14 + lsr r2, r2, #0xc + orr r2, r1 + add r1, r4, #0 + add r1, #0x50 + ldrh r3, [r1] + ldr r1, _021D3764 ; =0x00000167 + cmp r3, r1 + bls _021D372C + b _021D3734 +_021D372C: + add r0, r4, #0 + add r0, #0x50 + ldrh r0, [r0] + add r0, #0x5a +_021D3734: + add r4, #0x50 + strh r0, [r4] + add r0, r6, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #3 + asr r2, r2, #0xc + bl sub_02007DEC + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] + bne _021D3760 + add r6, #0xc8 + ldr r0, [r6, #0] + mov r1, #3 + mov r2, #0 + bl sub_02007DEC + add r0, r5, #0 + bl ov79_021D29E4 +_021D3760: + pop {r4, r5, r6, pc} + nop +_021D3764: .word 0x00000167 + thumb_func_end ov79_021D36F0 + + .rodata + + + .global Unk_ov79_021D3C20 +Unk_ov79_021D3C20: ; 0x021D3C20 + .incbin "incbin/overlay79_rodata.bin", 0x310, 0x314 - 0x310 + + .global Unk_ov79_021D3C24 +Unk_ov79_021D3C24: ; 0x021D3C24 + .incbin "incbin/overlay79_rodata.bin", 0x314, 0x31C - 0x314 + + .global Unk_ov79_021D3C2C +Unk_ov79_021D3C2C: ; 0x021D3C2C + .incbin "incbin/overlay79_rodata.bin", 0x31C, 0x32C - 0x31C + + .global Unk_ov79_021D3C3C +Unk_ov79_021D3C3C: ; 0x021D3C3C + .incbin "incbin/overlay79_rodata.bin", 0x32C, 0x340 - 0x32C + + .global Unk_ov79_021D3C50 +Unk_ov79_021D3C50: ; 0x021D3C50 + .incbin "incbin/overlay79_rodata.bin", 0x340, 0x360 - 0x340 + + .global Unk_ov79_021D3C70 +Unk_ov79_021D3C70: ; 0x021D3C70 + .incbin "incbin/overlay79_rodata.bin", 0x360, 0x388 - 0x360 + + .global Unk_ov79_021D3C98 +Unk_ov79_021D3C98: ; 0x021D3C98 + .incbin "incbin/overlay79_rodata.bin", 0x388, 0x54 + diff --git a/asm/ov79_021D3768.s b/asm/ov79_021D3768.s new file mode 100644 index 000000000..bc2e9e5dd --- /dev/null +++ b/asm/ov79_021D3768.s @@ -0,0 +1,214 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov79_021D3768 +ov79_021D3768: ; 0x021D3768 + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r4, r2, #0 + mov r1, #0 + mov r2, #0x1c + add r5, r0, #0 + bl sub_020C4CF4 + bl sub_020B28CC + bl sub_020BF9AC + bl sub_020BFB4C + ldr r0, _021D3804 ; =0x04000060 + ldr r1, _021D3808 ; =0xFFFFCFFD + ldrh r2, [r0] + ldr r3, _021D380C ; =0x0000CFFB + and r2, r1 + strh r2, [r0] + ldrh r2, [r0] + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r6, [r0] + add r1, r1, #2 + sub r3, #0x1c + and r6, r2 + mov r2, #8 + orr r2, r6 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x10 + orr r1, r2 + strh r1, [r0] + ldrh r1, [r0] + and r1, r3 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_020BFC74 + mov r0, #0 + ldr r2, _021D3810 ; =0x00007FFF + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _021D3814 ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _021D3818 ; =0xBFFF0000 + str r0, [r1, #0x40] + add r0, r5, #0 + add r1, r4, #0 + bl ov79_021D3870 + add r0, r5, #0 + add r1, r7, #0 + add r2, r4, #0 + bl ov79_021D38D0 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r1, _021D381C ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + mov r0, #1 + orr r0, r2 + strh r0, [r1] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D3804: .word 0x04000060 +_021D3808: .word 0xFFFFCFFD +_021D380C: .word 0x0000CFFB +_021D3810: .word 0x00007FFF +_021D3814: .word 0x04000540 +_021D3818: .word 0xBFFF0000 +_021D381C: .word 0x04000008 + thumb_func_end ov79_021D3768 + + thumb_func_start ov79_021D3820 +ov79_021D3820: ; 0x021D3820 + push {r4, lr} + add r4, r0, #0 + bl sub_020241B4 + bl sub_020203EC + ldr r2, _021D3854 ; =0x04000440 + mov r3, #0 + add r1, r2, #0 + str r3, [r2, #0] + add r1, #0x14 + str r3, [r1, #0] + mov r0, #2 + str r0, [r2, #0] + str r3, [r1, #0] + bl sub_020AF480 + bl sub_020A73C0 + ldr r0, [r4, #4] + bl sub_02007768 + ldr r0, _021D3858 ; =0x04000540 + mov r1, #1 + str r1, [r0, #0] + pop {r4, pc} + ; .align 2, 0 +_021D3854: .word 0x04000440 +_021D3858: .word 0x04000540 + thumb_func_end ov79_021D3820 + + thumb_func_start ov79_021D385C +ov79_021D385C: ; 0x021D385C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + bl sub_020203B8 + ldr r0, [r4, #4] + bl sub_02007B6C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov79_021D385C + + thumb_func_start ov79_021D3870 +ov79_021D3870: ; 0x021D3870 + push {r4, r5, lr} + sub sp, #0x1c + ldr r5, _021D38C8 ; =0x021D3CEC + add r4, r0, #0 + add r2, r1, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x10 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, sp, #8 + str r0, [r3, #0] + mov r0, #0 + strh r0, [r1] + strh r0, [r1, #2] + strh r0, [r1, #4] + strh r0, [r1, #6] + add r0, r2, #0 + bl sub_020203AC + str r0, [r4, #0] + mov r1, #1 + str r1, [sp] + ldr r0, [r4, #0] + ldr r3, _021D38CC ; =0x000005C1 + str r0, [sp, #4] + add r0, sp, #0x10 + lsl r1, r1, #0x10 + add r2, sp, #8 + bl sub_02020738 + mov r1, #0x19 + ldr r2, [r4, #0] + mov r0, #0 + lsl r1, r1, #0xe + bl sub_020206BC + ldr r0, [r4, #0] + bl sub_020206B0 + ldr r0, [r4, #0] + bl sub_020203D4 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 +_021D38C8: .word 0x021D3CEC +_021D38CC: .word 0x000005C1 + thumb_func_end ov79_021D3870 + + thumb_func_start ov79_021D38D0 +ov79_021D38D0: ; 0x021D38D0 + push {r4, r5, r6, lr} + sub sp, #0x20 + add r5, r0, #0 + add r0, r2, #0 + add r4, r1, #0 + bl sub_0200762C + str r0, [r5, #4] + ldr r1, [r4, #0] + add r0, sp, #0x10 + mov r2, #2 + bl sub_02075EF4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r5, #4] + add r1, sp, #0x10 + mov r2, #0x80 + mov r3, #0x60 + bl sub_02007C34 + ldrb r2, [r4, #8] + mov r1, #0x23 + add r6, r0, #0 + bl sub_02007DEC + str r6, [r5, #0x18] + add sp, #0x20 + pop {r4, r5, r6, pc} + thumb_func_end ov79_021D38D0 + + .rodata + + + .global Unk_ov79_021D3CEC +Unk_ov79_021D3CEC: ; 0x021D3CEC + .incbin "incbin/overlay79_rodata.bin", 0x3DC, 0xC + diff --git a/asm/ov7_02249960.s b/asm/ov7_02249960.s new file mode 100644 index 000000000..54e202c89 --- /dev/null +++ b/asm/ov7_02249960.s @@ -0,0 +1,3450 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov7_02249960 +ov7_02249960: ; 0x02249960 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _02249A0C ; =0x0224F5A0 + add r4, r1, #0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + bne _02249982 + ldr r0, _02249A0C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0201D730 +_02249982: + cmp r4, #0 + beq _022499A4 + ldr r0, _02249A0C ; =0x0224F5A0 + add r1, r5, #0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0x10] + bl sub_0200B1B8 + ldr r0, _02249A0C ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x58] + ldr r1, [r2, #0x14] + ldr r2, [r2, #0x10] + bl sub_0200C388 + b _022499B2 +_022499A4: + ldr r0, _02249A0C ; =0x0224F5A0 + add r1, r5, #0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0x14] + bl sub_0200B1B8 +_022499B2: + ldr r0, _02249A0C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x40 + bl sub_0201A7CC + cmp r0, #0 + bne _022499D0 + ldr r0, _02249A0C ; =0x0224F5A0 + mov r2, #3 + ldr r1, [r0, #0] + ldr r0, [r1, #0x68] + add r1, #0x40 + ldr r0, [r0, #8] + bl sub_0205D8F4 +_022499D0: + ldr r0, _02249A0C ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x68] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r1, r0, #0 + ldr r0, _02249A0C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x40 + bl sub_0205D944 + ldr r0, _02249A0C ; =0x0224F5A0 + ldr r4, [r0, #0] + ldr r0, [r4, #0x68] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r2, r0, #0 + add r0, r4, #0 + ldr r1, [r4, #0x14] + add r0, #0x40 + mov r3, #1 + bl sub_0205D994 + ldr r1, _02249A0C ; =0x0224F5A0 + ldr r1, [r1, #0] + add r1, #0x94 + strb r0, [r1] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02249A0C: .word 0x0224F5A0 + thumb_func_end ov7_02249960 + + thumb_func_start ov7_02249A10 +ov7_02249A10: ; 0x02249A10 + push {r0, r1, r2, r3} + push {r3, r4, lr} + sub sp, #0x34 + ldr r0, _02249AAC ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x20 + bl sub_0201A7CC + cmp r0, #0 + bne _02249A54 + ldr r0, _02249AAC ; =0x0224F5A0 + add r3, sp, #0x60 + ldr r1, [r0, #0] + add r0, sp, #0x64 + ldrb r0, [r0] + ldrb r3, [r3] + mov r2, #3 + str r0, [sp] + add r0, sp, #0x68 + ldrb r0, [r0] + str r0, [sp, #4] + add r0, sp, #0x6c + ldrb r0, [r0] + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + add r0, sp, #0x40 + ldrh r0, [r0, #0x30] + str r0, [sp, #0x10] + ldr r0, [r1, #0x68] + add r1, #0x20 + ldr r0, [r0, #8] + bl sub_0201A7E8 +_02249A54: + ldr r0, _02249AAC ; =0x0224F5A0 + ldr r2, _02249AB0 ; =0x000003D9 + ldr r0, [r0, #0] + mov r1, #1 + add r0, #0x20 + mov r3, #0xb + bl sub_0200DC48 + add r4, sp, #0x40 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, _02249AAC ; =0x0224F5A0 + mov r3, #4 + ldr r1, [r0, #0] + ldr r0, [r1, #0x64] + add r1, #0x20 + str r1, [sp, #0x20] + str r0, [sp, #0x14] + mov r1, #0 + add r0, r2, #0 + add r2, r1, #0 + bl sub_0200112C + ldr r1, _02249AAC ; =0x0224F5A0 + ldr r2, [r1, #0] + str r0, [r2, #0x5c] + ldr r0, [r1, #0] + add r0, #0x20 + bl sub_0201A954 + add sp, #0x34 + pop {r3, r4} + pop {r3} + add sp, #0x10 + bx r3 + nop +_02249AAC: .word 0x0224F5A0 +_02249AB0: .word 0x000003D9 + thumb_func_end ov7_02249A10 + + thumb_func_start ov7_02249AB4 +ov7_02249AB4: ; 0x02249AB4 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + ldr r0, _02249B90 ; =0x0224F5A0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02249AC4 + bl sub_02022974 +_02249AC4: + mov r0, #4 + mov r1, #0x9c + bl sub_02018144 + ldr r1, _02249B90 ; =0x0224F5A0 + mov r2, #0x9c + str r0, [r1, #0] + mov r1, #0 + bl sub_020C4CF4 + ldr r0, _02249B90 ; =0x0224F5A0 + mov r2, #0 + ldr r1, [r0, #0] + mov r3, #4 + add r1, #0x88 + str r2, [r1, #0] + ldr r1, [r0, #0] + str r4, [r1, #0x68] + ldr r0, [r0, #0] + mov r1, #0x1a + add r0, #0x97 + strb r2, [r0] + ldr r2, _02249B94 ; =0x00000161 + mov r0, #1 + bl sub_0200B144 + ldr r1, _02249B90 ; =0x0224F5A0 + ldr r2, [r1, #0] + str r0, [r2, #0x74] + ldr r0, [r1, #0] + ldr r0, [r0, #0x68] + bl sub_0203D174 + bl sub_02025E38 + ldr r1, _02249B90 ; =0x0224F5A0 + ldr r1, [r1, #0] + str r0, [r1, #0x78] + mov r0, #4 + bl sub_02025E6C + ldr r1, _02249B90 ; =0x0224F5A0 + ldr r2, [r1, #0] + str r0, [r2, #0x7c] + ldr r0, [r1, #0] + add r0, #0x20 + bl sub_0201A7A0 + ldr r0, _02249B90 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201A7A0 + ldr r0, _02249B90 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x40 + bl sub_0201A7A0 + mov r0, #4 + bl sub_0200B358 + ldr r1, _02249B90 ; =0x0224F5A0 + ldr r1, [r1, #0] + str r0, [r1, #0x50] + mov r0, #4 + bl sub_0200B358 + ldr r1, _02249B90 ; =0x0224F5A0 + ldr r1, [r1, #0] + str r0, [r1, #0x54] + mov r0, #4 + bl sub_0200B358 + ldr r1, _02249B90 ; =0x0224F5A0 + ldr r2, [r1, #0] + str r0, [r2, #0x58] + ldr r0, [r1, #0] + mov r2, #0 + add r0, #0x98 + strb r2, [r0] + add r5, r2, #0 +_02249B66: + ldr r0, [r1, #0] + add r0, r0, r2 + add r0, #0x80 + add r2, r2, #1 + strb r5, [r0] + cmp r2, #8 + blt _02249B66 + ldr r6, _02249B90 ; =0x0224F5A0 + add r4, r5, #0 + mov r7, #0x8c +_02249B7A: + add r0, r7, #0 + mov r1, #4 + bl sub_02023790 + ldr r1, [r6, #0] + add r5, r5, #1 + str r0, [r1, r4] + add r4, r4, #4 + cmp r5, #8 + blt _02249B7A + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249B90: .word 0x0224F5A0 +_02249B94: .word 0x00000161 + thumb_func_end ov7_02249AB4 + + thumb_func_start ov7_02249B98 +ov7_02249B98: ; 0x02249B98 + push {r4, r5, r6, lr} + mov r4, #0 + ldr r6, _02249C28 ; =0x0224F5A0 + add r5, r4, #0 +_02249BA0: + ldr r0, [r6, #0] + ldr r0, [r0, r5] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _02249BA0 + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x7c] + bl sub_020181C4 + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x50] + cmp r0, #0 + beq _02249BD0 + bl sub_0200B3F0 + ldr r0, _02249C28 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + str r1, [r0, #0x50] +_02249BD0: + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x54] + cmp r0, #0 + beq _02249BE6 + bl sub_0200B3F0 + ldr r0, _02249C28 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + str r1, [r0, #0x54] +_02249BE6: + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x58] + cmp r0, #0 + beq _02249BFC + bl sub_0200B3F0 + ldr r0, _02249C28 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + str r1, [r0, #0x58] +_02249BFC: + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x74] + bl sub_0200B190 + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r1, [r0, #0x4c] + cmp r1, #0 + beq _02249C16 + add r0, #0x40 + bl sub_0201A8FC +_02249C16: + ldr r0, _02249C28 ; =0x0224F5A0 + ldr r0, [r0, #0] + bl sub_020181C4 + ldr r0, _02249C28 ; =0x0224F5A0 + mov r1, #0 + str r1, [r0, #0] + pop {r4, r5, r6, pc} + nop +_02249C28: .word 0x0224F5A0 + thumb_func_end ov7_02249B98 + + thumb_func_start ov7_02249C2C +ov7_02249C2C: ; 0x02249C2C + push {r4, lr} + add r4, r0, #0 + bl ov7_0224B3FC + add r2, r0, #0 + ldr r0, [r4, #0x68] + add r4, #0x91 + ldrb r1, [r4] + bl sub_02059748 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_02249C2C + + thumb_func_start ov7_02249C44 +ov7_02249C44: ; 0x02249C44 + push {r3, lr} + ldr r0, _02249C5C ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x98 + strb r1, [r0] + cmp r2, #0 + bne _02249C5A + ldr r0, _02249C60 ; =0x000005DC + bl sub_02005748 +_02249C5A: + pop {r3, pc} + ; .align 2, 0 +_02249C5C: .word 0x0224F5A0 +_02249C60: .word 0x000005DC + thumb_func_end ov7_02249C44 + + thumb_func_start ov7_02249C64 +ov7_02249C64: ; 0x02249C64 + push {r3, r4, r5, r6, r7, lr} + mov r1, #3 + add r5, r0, #0 + mov r4, #0 + bl sub_02001504 + cmp r0, #0 + bls _02249C92 + add r6, r4, #0 + mov r7, #3 +_02249C78: + lsl r2, r4, #0x18 + add r0, r5, #0 + add r1, r6, #0 + lsr r2, r2, #0x18 + bl ov7_02249C94 + add r0, r5, #0 + add r1, r7, #0 + add r4, r4, #1 + bl sub_02001504 + cmp r4, r0 + blo _02249C78 +_02249C92: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov7_02249C64 + + thumb_func_start ov7_02249C94 +ov7_02249C94: ; 0x02249C94 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r2, #0 + bl sub_02033808 + add r4, r0, #0 + mov r2, #0 + add r0, sp, #0xc + strh r2, [r0] + ldr r0, _02249E08 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x5c] + cmp r0, #0 + beq _02249CB6 + add r1, sp, #0xc + bl sub_020014DC +_02249CB6: + add r0, sp, #0xc + ldrh r1, [r0] + add r1, r1, r5 + strh r1, [r0] + ldr r0, _02249E08 ; =0x0224F5A0 + lsl r5, r5, #4 + ldr r0, [r0, #0] + add r0, #0x20 + bl sub_0201C294 + lsl r0, r0, #3 + sub r0, #8 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _02249E08 ; =0x0224F5A0 + lsl r3, r5, #0x10 + ldr r0, [r0, #0] + mov r1, #0xf + add r0, #0x20 + mov r2, #8 + lsr r3, r3, #0x10 + bl sub_0201AE78 + add r0, sp, #0xc + ldrh r2, [r0] + cmp r2, r4 + bge _02249DB8 + ldr r1, _02249E08 ; =0x0224F5A0 + add r0, r2, #0 + ldr r1, [r1, #0] + ldr r1, [r1, #0x7c] + bl sub_020339AC + mov r3, #2 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02249E08 ; =0x0224F5A0 + add r2, sp, #0xc + ldr r0, [r0, #0] + ldrh r2, [r2] + ldr r0, [r0, #0x50] + mov r1, #0 + add r2, r2, #1 + bl sub_0200B60C + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #1 + ldr r2, [r0, #0] + ldr r0, [r2, #0x50] + ldr r2, [r2, #0x7c] + bl sub_0200B498 + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0x3f + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #4] + bl sub_0200B1B8 + ldr r0, _02249E08 ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x50] + ldmia r2!, {r1, r2} + bl sub_0200C388 + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0 + ldr r2, [r0, #0] + mov r0, #0xff + str r5, [sp] + str r0, [sp, #4] + add r0, r2, #0 + str r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0x20 + mov r3, #8 + bl sub_0201D738 + ldr r0, _02249E08 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x7c] + bl sub_02025F20 + add r2, r0, #0 + mov r1, #2 + lsl r2, r2, #0x10 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02249E08 ; =0x0224F5A0 + lsr r2, r2, #0x10 + ldr r0, [r0, #0] + mov r3, #5 + ldr r0, [r0, #0x50] + bl sub_0200B60C + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0x41 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0xc] + bl sub_0200B1B8 + ldr r0, _02249E08 ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x50] + ldr r1, [r2, #8] + ldr r2, [r2, #0xc] + bl sub_0200C388 + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0 + ldr r2, [r0, #0] + mov r0, #0xff + str r5, [sp] + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + ldr r2, [r2, #8] + add r0, #0x20 + mov r3, #0x58 + bl sub_0201D738 + add sp, #0x10 + pop {r3, r4, r5, pc} +_02249DB8: + mov r3, #2 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + add r2, r2, #1 + ldr r0, [r0, #0x50] + bl sub_0200B60C + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0x40 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #4] + bl sub_0200B1B8 + ldr r0, _02249E08 ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x50] + ldmia r2!, {r1, r2} + bl sub_0200C388 + ldr r0, _02249E08 ; =0x0224F5A0 + mov r1, #0 + ldr r2, [r0, #0] + mov r0, #0xff + str r5, [sp] + str r0, [sp, #4] + add r0, r2, #0 + str r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0x20 + mov r3, #8 + bl sub_0201D738 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_02249E08: .word 0x0224F5A0 + thumb_func_end ov7_02249C94 + + thumb_func_start ov7_02249E0C +ov7_02249E0C: ; 0x02249E0C + push {r4, lr} + sub sp, #0x98 + add r4, r0, #0 + ldr r0, _02249ECC ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201A7CC + cmp r0, #0 + bne _02249E46 + ldr r0, _02249ECC ; =0x0224F5A0 + mov r2, #3 + ldr r1, [r0, #0] + mov r0, #2 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xc9 + str r0, [sp, #0x10] + ldr r0, [r1, #0x68] + add r1, #0x30 + ldr r0, [r0, #8] + mov r3, #0x17 + bl sub_0201A7E8 +_02249E46: + ldr r0, _02249ECC ; =0x0224F5A0 + ldr r2, _02249ED0 ; =0x000003D9 + ldr r0, [r0, #0] + mov r1, #1 + add r0, #0x30 + mov r3, #0xb + bl sub_0200DC48 + ldr r0, _02249ECC ; =0x0224F5A0 + mov r1, #0xf + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _02249ECC ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201A954 + add r0, r4, #0 + mov r1, #1 + add r0, #0x97 + strb r1, [r0] + ldr r0, _02249ED4 ; =ov7_0224A718 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + ldr r0, _02249ECC ; =0x0224F5A0 + ldr r0, [r0, #0] + bl ov7_02249EE0 + ldr r4, _02249ED8 ; =0x0224EF64 + add r3, sp, #0x14 + mov r2, #0x10 +_02249E8C: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _02249E8C + ldr r0, [r4, #0] + str r0, [r3, #0] + ldr r0, _02249ECC ; =0x0224F5A0 + ldr r1, [r0, #0] + add r0, r1, #0 + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #8 + bne _02249EB4 + add r1, #0x92 + ldrb r0, [r1] + mov r1, #0 + add r0, #0x67 + bl ov7_02249960 + b _02249EC0 +_02249EB4: + lsl r1, r0, #2 + add r0, sp, #0x14 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 +_02249EC0: + ldr r0, _02249EDC ; =ov7_02249F54 + bl ov7_0224A530 + add sp, #0x98 + pop {r4, pc} + nop +_02249ECC: .word 0x0224F5A0 +_02249ED0: .word 0x000003D9 +_02249ED4: .word ov7_0224A718 +_02249ED8: .word 0x0224EF64 +_02249EDC: .word ov7_02249F54 + thumb_func_end ov7_02249E0C + + thumb_func_start ov7_02249EE0 +ov7_02249EE0: ; 0x02249EE0 + push {lr} + sub sp, #0xc + ldr r0, _02249F50 ; =0x0224F5A0 + mov r1, #0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x54] + ldr r2, [r2, #0x78] + bl sub_0200B498 + ldr r0, _02249F50 ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x78] + bl sub_02025F20 + add r2, r0, #0 + mov r0, #2 + str r0, [sp] + mov r1, #1 + lsl r2, r2, #0x10 + ldr r0, _02249F50 ; =0x0224F5A0 + str r1, [sp, #4] + ldr r0, [r0, #0] + lsr r2, r2, #0x10 + ldr r0, [r0, #0x54] + mov r3, #5 + bl sub_0200B60C + ldr r0, _02249F50 ; =0x0224F5A0 + mov r1, #0x3e + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0x18] + bl sub_0200B1B8 + ldr r0, _02249F50 ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x54] + ldr r1, [r2, #0x1c] + ldr r2, [r2, #0x18] + bl sub_0200C388 + ldr r0, _02249F50 ; =0x0224F5A0 + mov r3, #2 + ldr r2, [r0, #0] + mov r1, #0 + str r3, [sp] + str r1, [sp, #4] + add r0, r2, #0 + str r1, [sp, #8] + ldr r2, [r2, #0x1c] + add r0, #0x30 + bl sub_0201D738 + add sp, #0xc + pop {pc} + nop +_02249F50: .word 0x0224F5A0 + thumb_func_end ov7_02249EE0 + + thumb_func_start ov7_02249F54 +ov7_02249F54: ; 0x02249F54 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + ldr r0, _02249FF0 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _02249FEC + mov r0, #0x10 + mov r1, #4 + bl sub_02013A04 + ldr r4, _02249FF0 ; =0x0224F5A0 + mov r5, #0 + ldr r1, [r4, #0] + mov r6, #2 + str r0, [r1, #0x64] + mov r7, #1 +_02249F7C: + str r6, [sp] + str r7, [sp, #4] + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0x50] + add r2, r5, #1 + add r3, r6, #0 + bl sub_0200B60C + ldr r2, [r4, #0] + mov r1, #0x40 + ldr r0, [r2, #0x74] + ldr r2, [r2, #4] + bl sub_0200B1B8 + ldr r2, [r4, #0] + ldr r0, [r2, #0x50] + ldmia r2!, {r1, r2} + bl sub_0200C388 + ldr r1, [r4, #0] + mov r2, #0 + ldr r0, [r1, #0x64] + ldr r1, [r1, #0] + bl sub_02013A6C + add r5, r5, #1 + cmp r5, #0x10 + blt _02249F7C + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #2 + str r0, [sp, #0x14] + mov r0, #0x14 + str r0, [sp, #0x18] + mov r0, #0xa + mov r4, sp + str r0, [sp, #0x1c] + sub r4, #0x10 + ldr r3, _02249FF4 ; =0x0224ED34 + str r1, [sp, #0x20] + add r2, r4, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r4!, {r0, r1, r2, r3} + bl ov7_02249A10 + ldr r0, _02249FF8 ; =ov7_02249FFC + bl ov7_0224A530 +_02249FEC: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249FF0: .word 0x0224F5A0 +_02249FF4: .word 0x0224ED34 +_02249FF8: .word ov7_02249FFC + thumb_func_end ov7_02249F54 + + thumb_func_start ov7_02249FFC +ov7_02249FFC: ; 0x02249FFC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov7_02249EE0 + bl sub_020360F0 + cmp r0, #0 + beq _0224A028 + ldr r0, _0224A0BC ; =0x0224F5A0 + mov r1, #3 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] + bl ov7_0224A528 + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + pop {r3, r4, r5, pc} +_0224A028: + bl sub_02033870 + cmp r0, #0 + beq _0224A036 + mov r0, #0 + mvn r0, r0 + b _0224A040 +_0224A036: + ldr r0, _0224A0BC ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x5c] + bl sub_02001288 +_0224A040: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0224A056 + add r1, r1, #1 + cmp r0, r1 + bne _0224A074 + add r0, r4, #0 + bl ov7_0224A0C8 + pop {r3, r4, r5, pc} +_0224A056: + ldr r0, _0224A0C0 ; =0x000005DC + bl sub_02005748 + ldr r0, _0224A0BC ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] + bl ov7_0224A528 + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + pop {r3, r4, r5, pc} +_0224A074: + ldr r0, _0224A0C0 ; =0x000005DC + bl sub_02005748 + add r1, r4, #0 + ldr r0, [r4, #0x5c] + add r1, #0x8e + bl sub_020014D0 + bl sub_02033808 + add r1, r4, #0 + add r1, #0x8e + ldrh r1, [r1] + cmp r0, r1 + ble _0224A0BA + add r0, r4, #0 + bl ov7_0224A0C8 + add r0, r4, #0 + add r0, #0x8e + ldrh r0, [r0] + bl sub_0203383C + add r1, r4, #0 + add r1, #0x8e + add r4, #0x8e + strh r0, [r1] + ldrh r0, [r4] + bl sub_02059788 + bl sub_020365D0 + ldr r0, _0224A0C4 ; =ov7_0224A128 + bl ov7_0224A530 +_0224A0BA: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224A0BC: .word 0x0224F5A0 +_0224A0C0: .word 0x000005DC +_0224A0C4: .word ov7_0224A128 + thumb_func_end ov7_02249FFC + + thumb_func_start ov7_0224A0C8 +ov7_0224A0C8: ; 0x0224A0C8 + push {r3, lr} + sub sp, #8 + bl sub_02033870 + cmp r0, #0 + bne _0224A0E0 + ldr r0, _0224A124 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x98 + ldrb r0, [r0] + cmp r0, #0 + beq _0224A11E +_0224A0E0: + ldr r0, _0224A124 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + add r0, #0x98 + strb r1, [r0] + bl sub_02033884 + mov r0, #0xc + str r0, [sp] + mov r0, #0x50 + str r0, [sp, #4] + ldr r0, _0224A124 ; =0x0224F5A0 + mov r1, #0xf + ldr r0, [r0, #0] + mov r2, #8 + add r0, #0x20 + mov r3, #0 + bl sub_0201AE78 + ldr r0, _0224A124 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + add r2, r1, #0 + ldr r0, [r0, #0x5c] + bl ov7_02249C64 + ldr r0, _0224A124 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x20 + bl sub_0201A954 +_0224A11E: + add sp, #8 + pop {r3, pc} + nop +_0224A124: .word 0x0224F5A0 + thumb_func_end ov7_0224A0C8 + + thumb_func_start ov7_0224A128 +ov7_0224A128: ; 0x0224A128 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + bl sub_020360F0 + cmp r0, #0 + beq _0224A152 + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + mov r0, #0 + add r1, r0, #0 + bl ov7_02249960 + add r0, r4, #0 + bl ov7_0224B348 + add sp, #0xc + pop {r4, r5, pc} +_0224A152: + bl sub_0203608C + bl sub_02032EE8 + cmp r0, #0 + beq _0224A238 + bl sub_020365D0 + ldr r1, _0224A23C ; =0x0224F5A0 + add r0, r4, #0 + add r0, #0x8e + ldr r1, [r1, #0] + ldrh r0, [r0] + ldr r1, [r1, #0x7c] + bl sub_020339AC + ldr r2, _0224A23C ; =0x0224F5A0 + ldr r0, [r4, #0x58] + ldr r2, [r2, #0] + mov r1, #1 + ldr r2, [r2, #0x7c] + bl sub_0200B498 + bl ov7_0224B3D4 + cmp r0, #2 + bgt _0224A192 + mov r0, #1 + add r1, r0, #0 + bl ov7_02249960 + b _0224A232 +_0224A192: + ldr r0, _0224A23C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224A1AE + ldr r0, _0224A23C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0201D730 +_0224A1AE: + ldr r0, _0224A23C ; =0x0224F5A0 + mov r1, #2 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0x10] + bl sub_0200B1B8 + ldr r0, _0224A23C ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x58] + ldr r1, [r2, #0x14] + ldr r2, [r2, #0x10] + bl sub_0200C388 + ldr r0, _0224A23C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x40 + bl sub_0201A7CC + cmp r0, #0 + bne _0224A1E8 + ldr r0, _0224A23C ; =0x0224F5A0 + mov r2, #3 + ldr r1, [r0, #0] + ldr r0, [r1, #0x68] + add r1, #0x40 + ldr r0, [r0, #8] + bl sub_0205D8F4 +_0224A1E8: + ldr r0, _0224A23C ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x68] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r1, r0, #0 + ldr r0, _0224A23C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x40 + bl sub_0205D944 + mov r0, #1 + bl sub_02002AC8 + mov r0, #0 + bl sub_02002AE4 + mov r0, #0 + bl sub_02002B20 + ldr r0, _0224A23C ; =0x0224F5A0 + mov r3, #0 + ldr r2, [r0, #0] + mov r1, #1 + str r3, [sp] + str r1, [sp, #4] + add r0, r2, #0 + str r3, [sp, #8] + ldr r2, [r2, #0x14] + add r0, #0x40 + bl sub_0201D738 + ldr r1, _0224A23C ; =0x0224F5A0 + ldr r1, [r1, #0] + add r1, #0x94 + strb r0, [r1] +_0224A232: + ldr r0, _0224A240 ; =ov7_0224A34C + bl ov7_0224A530 +_0224A238: + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224A23C: .word 0x0224F5A0 +_0224A240: .word ov7_0224A34C + thumb_func_end ov7_0224A128 + + thumb_func_start ov7_0224A244 +ov7_0224A244: ; 0x0224A244 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r4, r1, #0 + bl sub_020360F0 + cmp r0, #0 + beq _0224A26A + add r0, r6, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + mov r0, #0 + add r1, r0, #0 + bl ov7_02249960 + add r0, r4, #0 + bl ov7_0224B348 + b _0224A33E +_0224A26A: + mov r0, #0 + mov r1, #3 + bl sub_020365A8 + add r5, r0, #0 + bl sub_0203608C + cmp r5, r0 + bne _0224A290 + bl sub_020365D0 + add r0, r6, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + add r0, r4, #0 + bl ov7_0224B2DC + b _0224A33E +_0224A290: + mov r0, #0 + mov r1, #5 + bl sub_020365A8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224A2B4 + bl sub_020365D0 + add r0, r6, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + add r0, r4, #0 + bl ov7_0224B2DC + b _0224A33E +_0224A2B4: + mov r0, #0 + mov r1, #4 + bl sub_020365A8 + add r5, r0, #0 + bl sub_0203608C + cmp r5, r0 + bne _0224A2D6 + mov r0, #0x61 + mov r1, #0 + bl ov7_02249960 + ldr r0, _0224A344 ; =ov7_0224AB64 + bl ov7_0224A530 + b _0224A33E +_0224A2D6: + mov r0, #0 + mov r1, #2 + bl sub_020365A8 + add r5, r0, #0 + bl sub_0203608C + cmp r5, r0 + bne _0224A322 + bl sub_020365D0 + bl sub_02032E64 + add r1, r4, #0 + add r1, #0x90 + strb r0, [r1] + ldr r0, _0224A348 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224A312 + ldr r0, _0224A348 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0201D730 +_0224A312: + add r0, r6, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + add r0, r4, #0 + bl ov7_0224B08C + b _0224A33E +_0224A322: + bl ov7_0224B4E4 + cmp r0, #0 + beq _0224A33A + add r0, r6, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + add r0, r4, #0 + bl ov7_0224B2DC + b _0224A33E +_0224A33A: + mov r0, #0 + pop {r4, r5, r6, pc} +_0224A33E: + mov r0, #1 + pop {r4, r5, r6, pc} + nop +_0224A344: .word ov7_0224AB64 +_0224A348: .word 0x0224F5A0 + thumb_func_end ov7_0224A244 + + thumb_func_start ov7_0224A34C +ov7_0224A34C: ; 0x0224A34C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0224A388 ; =0x0224F5A0 + add r4, r1, #0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224A386 + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224A244 + cmp r0, #0 + bne _0224A386 + ldr r0, _0224A38C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _0224A386 + mov r0, #3 + mov r1, #0 + bl ov7_02249960 + ldr r0, _0224A390 ; =ov7_0224A394 + bl ov7_0224A530 +_0224A386: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224A388: .word 0x0224F5A0 +_0224A38C: .word 0x021BF67C +_0224A390: .word ov7_0224A394 + thumb_func_end ov7_0224A34C + + thumb_func_start ov7_0224A394 +ov7_0224A394: ; 0x0224A394 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + bl ov7_0224A244 + cmp r0, #0 + bne _0224A3D0 + ldr r0, _0224A3D4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224A3D0 + mov r0, #4 + str r0, [sp] + ldr r0, _0224A3D4 ; =0x0224F5A0 + ldr r1, _0224A3D8 ; =0x0224ED0C + ldr r0, [r0, #0] + ldr r2, _0224A3DC ; =0x000003D9 + ldr r0, [r0, #0x68] + mov r3, #0xb + ldr r0, [r0, #8] + bl sub_02002100 + str r0, [r4, #0x60] + ldr r0, _0224A3E0 ; =ov7_0224A3E4 + bl ov7_0224A530 +_0224A3D0: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0224A3D4: .word 0x0224F5A0 +_0224A3D8: .word 0x0224ED0C +_0224A3DC: .word 0x000003D9 +_0224A3E0: .word ov7_0224A3E4 + thumb_func_end ov7_0224A394 + + thumb_func_start ov7_0224A3E4 +ov7_0224A3E4: ; 0x0224A3E4 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov7_0224A244 + cmp r0, #0 + ldr r0, [r4, #0x60] + beq _0224A400 + mov r1, #4 + bl sub_02002154 + mov r0, #0 + str r0, [r4, #0x60] + pop {r3, r4, r5, pc} +_0224A400: + mov r1, #4 + bl sub_02002114 + cmp r0, #0 + bne _0224A422 + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + mov r0, #6 + mov r1, #0 + bl ov7_02249960 + add r0, r4, #0 + bl ov7_0224B348 + pop {r3, r4, r5, pc} +_0224A422: + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224A430 + ldr r0, _0224A434 ; =ov7_0224A128 + bl ov7_0224A530 +_0224A430: + pop {r3, r4, r5, pc} + nop +_0224A434: .word ov7_0224A128 + thumb_func_end ov7_0224A3E4 + + thumb_func_start ov7_0224A438 +ov7_0224A438: ; 0x0224A438 + push {r4, lr} + sub sp, #0x10 + add r4, r2, #0 + mov r2, #0 + add r0, sp, #0xc + strh r2, [r0] + ldr r0, _0224A50C ; =0x0224F5A0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x5c] + cmp r0, #0 + beq _0224A454 + add r1, sp, #0xc + bl sub_020014DC +_0224A454: + add r0, sp, #0xc + ldrh r1, [r0] + add r1, r1, r4 + strh r1, [r0] + ldrh r0, [r0] + bl sub_02032EE8 + cmp r0, #0 + beq _0224A506 + add r0, sp, #0xc + ldrh r0, [r0] + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, _0224A50C ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + ldr r0, [r0, #0x50] + bl sub_0200B498 + ldr r0, _0224A50C ; =0x0224F5A0 + mov r1, #0x42 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #4] + bl sub_0200B1B8 + ldr r0, _0224A50C ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x50] + ldmia r2!, {r1, r2} + bl sub_0200C388 + ldr r0, _0224A50C ; =0x0224F5A0 + lsl r4, r4, #4 + ldr r2, [r0, #0] + mov r1, #0 + str r4, [sp] + str r1, [sp, #4] + add r0, r2, #0 + str r1, [sp, #8] + ldr r2, [r2, #0] + add r0, #0x20 + mov r3, #8 + bl sub_0201D738 + add r0, sp, #0xc + ldrh r0, [r0] + bl sub_02032EE8 + bl sub_02025F24 + mov r1, #2 + add r2, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0224A50C ; =0x0224F5A0 + mov r3, #5 + ldr r0, [r0, #0] + ldr r0, [r0, #0x50] + bl sub_0200B60C + ldr r0, _0224A50C ; =0x0224F5A0 + mov r1, #0x41 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0xc] + bl sub_0200B1B8 + ldr r0, _0224A50C ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x50] + ldr r1, [r2, #8] + ldr r2, [r2, #0xc] + bl sub_0200C388 + ldr r0, _0224A50C ; =0x0224F5A0 + mov r1, #0 + ldr r2, [r0, #0] + mov r3, #0x48 + str r4, [sp] + str r1, [sp, #4] + add r0, r2, #0 + str r1, [sp, #8] + ldr r2, [r2, #8] + add r0, #0x20 + bl sub_0201D738 +_0224A506: + add sp, #0x10 + pop {r4, pc} + nop +_0224A50C: .word 0x0224F5A0 + thumb_func_end ov7_0224A438 + + thumb_func_start ov7_0224A510 +ov7_0224A510: ; 0x0224A510 + push {r4, lr} + add r4, r0, #0 + bl ov7_0224B3FC + add r2, r0, #0 + ldr r0, [r4, #0x68] + add r4, #0x91 + ldrb r1, [r4] + bl sub_02059708 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224A510 + + thumb_func_start ov7_0224A528 +ov7_0224A528: ; 0x0224A528 + ldr r3, _0224A52C ; =sub_0205987C + bx r3 + ; .align 2, 0 +_0224A52C: .word sub_0205987C + thumb_func_end ov7_0224A528 + + thumb_func_start ov7_0224A530 +ov7_0224A530: ; 0x0224A530 + ldr r1, _0224A538 ; =0x0224F5A0 + ldr r1, [r1, #0] + str r0, [r1, #0x6c] + bx lr + ; .align 2, 0 +_0224A538: .word 0x0224F5A0 + thumb_func_end ov7_0224A530 + + thumb_func_start ov7_0224A53C +ov7_0224A53C: ; 0x0224A53C + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, _0224A5C0 ; =ov7_0224A718 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + bl ov7_0224A5D0 + ldr r0, _0224A5C4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201A7CC + cmp r0, #0 + bne _0224A584 + ldr r0, _0224A5C4 ; =0x0224F5A0 + mov r2, #3 + ldr r1, [r0, #0] + mov r0, #2 + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xcd + str r0, [sp, #0x10] + ldr r0, [r1, #0x68] + add r1, #0x30 + ldr r0, [r0, #8] + mov r3, #0x16 + bl sub_0201A7E8 +_0224A584: + ldr r0, _0224A5C4 ; =0x0224F5A0 + ldr r2, _0224A5C8 ; =0x000003D9 + ldr r0, [r0, #0] + mov r1, #1 + add r0, #0x30 + mov r3, #0xb + bl sub_0200DC48 + ldr r0, _0224A5C4 ; =0x0224F5A0 + mov r1, #0xf + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _0224A5C4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201A954 + mov r0, #1 + add r4, #0x97 + strb r0, [r4] + mov r0, #0 + bl sub_02032E1C + ldr r0, _0224A5CC ; =ov7_0224A72C + bl ov7_0224A530 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_0224A5C0: .word ov7_0224A718 +_0224A5C4: .word 0x0224F5A0 +_0224A5C8: .word 0x000003D9 +_0224A5CC: .word ov7_0224A72C + thumb_func_end ov7_0224A53C + + thumb_func_start ov7_0224A5D0 +ov7_0224A5D0: ; 0x0224A5D0 + push {r3, r4, lr} + sub sp, #0x84 + ldr r4, _0224A644 ; =0x0224EDD8 + add r3, sp, #0 + mov r2, #0x10 +_0224A5DA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224A5DA + ldr r0, [r4, #0] + str r0, [r3, #0] + ldr r0, _0224A648 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #0x21 + blo _0224A5F6 + bl sub_02022974 +_0224A5F6: + ldr r0, _0224A648 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #8 + bne _0224A632 + bl sub_02032E64 + cmp r0, #1 + ble _0224A61E + ldr r0, _0224A648 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + add r0, #0x92 + ldrb r0, [r0] + add r0, #0x6c + bl ov7_02249960 + add sp, #0x84 + pop {r3, r4, pc} +_0224A61E: + ldr r0, _0224A648 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + add r0, #0x92 + ldrb r0, [r0] + add r0, #0x62 + bl ov7_02249960 + add sp, #0x84 + pop {r3, r4, pc} +_0224A632: + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 + add sp, #0x84 + pop {r3, r4, pc} + nop +_0224A644: .word 0x0224EDD8 +_0224A648: .word 0x0224F5A0 + thumb_func_end ov7_0224A5D0 + + thumb_func_start ov7_0224A64C +ov7_0224A64C: ; 0x0224A64C + push {r3, r4, lr} + sub sp, #0xc + bl sub_02032E64 + add r4, r0, #0 + bl ov7_0224B3D4 + cmp r4, r0 + blt _0224A668 + bl sub_02032E64 + add r2, r0, #0 + mov r4, #0x44 + b _0224A676 +_0224A668: + bl ov7_0224B3D4 + add r4, r0, #0 + bl sub_02032E64 + sub r2, r4, r0 + mov r4, #0x43 +_0224A676: + mov r0, #5 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0224A6D0 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + mov r3, #2 + ldr r0, [r0, #0x54] + bl sub_0200B60C + ldr r0, _0224A6D0 ; =0x0224F5A0 + mov r1, #0xf + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201ADA4 + ldr r0, _0224A6D0 ; =0x0224F5A0 + add r1, r4, #0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x74] + ldr r2, [r2, #0x1c] + bl sub_0200B1B8 + ldr r0, _0224A6D0 ; =0x0224F5A0 + ldr r2, [r0, #0] + ldr r0, [r2, #0x54] + ldr r1, [r2, #0x18] + ldr r2, [r2, #0x1c] + bl sub_0200C388 + ldr r0, _0224A6D0 ; =0x0224F5A0 + mov r3, #2 + ldr r2, [r0, #0] + mov r1, #0 + str r3, [sp] + str r1, [sp, #4] + add r0, r2, #0 + str r1, [sp, #8] + ldr r2, [r2, #0x18] + add r0, #0x30 + bl sub_0201D738 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0224A6D0: .word 0x0224F5A0 + thumb_func_end ov7_0224A64C + + thumb_func_start ov7_0224A6D4 +ov7_0224A6D4: ; 0x0224A6D4 + push {r3, r4, r5, r6, lr} + sub sp, #0x84 + ldr r6, _0224A714 ; =0x0224ED54 + add r2, r0, #0 + add r4, r1, #0 + add r5, sp, #0 + mov r3, #0x10 +_0224A6E2: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _0224A6E2 + ldr r0, [r6, #0] + str r0, [r5, #0] + add r0, r2, #0 + bl sub_02032EE8 + add r2, r0, #0 + beq _0224A700 + ldr r0, [r4, #0x58] + mov r1, #1 + bl sub_0200B498 +_0224A700: + add r4, #0x91 + ldrb r0, [r4] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + mov r1, #1 + bl ov7_02249960 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224A714: .word 0x0224ED54 + thumb_func_end ov7_0224A6D4 + + thumb_func_start ov7_0224A718 +ov7_0224A718: ; 0x0224A718 + push {r3, lr} + ldr r2, _0224A728 ; =0x0224F5A0 + ldr r2, [r2, #0] + ldr r2, [r2, #0x6c] + cmp r2, #0 + beq _0224A726 + blx r2 +_0224A726: + pop {r3, pc} + ; .align 2, 0 +_0224A728: .word 0x0224F5A0 + thumb_func_end ov7_0224A718 + + thumb_func_start ov7_0224A72C +ov7_0224A72C: ; 0x0224A72C + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r0, r1, #0 + bl ov7_0224A64C + ldr r0, _0224A7C4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224A7C0 + mov r0, #5 + mov r1, #4 + bl sub_02013A04 + ldr r4, _0224A7C4 ; =0x0224F5A0 + mov r5, #0 + ldr r1, [r4, #0] + mov r6, #0x45 + str r0, [r1, #0x64] + add r7, r5, #0 +_0224A75A: + ldr r1, [r4, #0] + add r2, r6, #0 + ldr r0, [r1, #0x64] + ldr r1, [r1, #0x74] + add r3, r7, #0 + bl sub_02013A4C + add r5, r5, #1 + cmp r5, #5 + blt _0224A75A + ldr r1, _0224A7C4 ; =0x0224F5A0 + mov r2, #1 + ldr r0, [r1, #0] + mov r3, #0 + add r0, #0x98 + strb r2, [r0] + add r2, r3, #0 +_0224A77C: + ldr r0, [r1, #0] + add r0, r0, r3 + add r0, #0x80 + add r3, r3, #1 + strb r2, [r0] + cmp r3, #8 + blt _0224A77C + mov r1, #1 + str r1, [sp, #0x10] + mov r0, #2 + str r0, [sp, #0x14] + mov r0, #0x11 + str r0, [sp, #0x18] + mov r0, #0xc + mov r4, sp + str r0, [sp, #0x1c] + sub r4, #0x10 + ldr r3, _0224A7C8 ; =0x0224ED14 + str r1, [sp, #0x20] + add r2, r4, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r4!, {r0, r1, r2, r3} + bl ov7_02249A10 + ldr r0, _0224A7CC ; =ov7_0224A7D0 + bl ov7_0224A530 +_0224A7C0: + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A7C4: .word 0x0224F5A0 +_0224A7C8: .word 0x0224ED14 +_0224A7CC: .word ov7_0224A7D0 + thumb_func_end ov7_0224A72C + + thumb_func_start ov7_0224A7D0 +ov7_0224A7D0: ; 0x0224A7D0 + push {r4, r5, r6, r7, lr} + sub sp, #0x8c + str r0, [sp] + add r0, r1, #0 + str r1, [sp, #4] + bl ov7_0224A64C + mov r7, #1 + ldr r4, _0224A964 ; =0x0224F5A0 + mov r5, #0 + add r6, r7, #0 +_0224A7E6: + add r0, r5, #0 + bl sub_02032DC4 + cmp r0, #0 + beq _0224A804 + cmp r5, #0 + beq _0224A804 + ldr r0, [r4, #0] + add r0, r0, r5 + add r0, #0x80 + strb r6, [r0] + ldr r0, [r4, #0] + add r0, #0x98 + strb r6, [r0] + b _0224A84E +_0224A804: + add r0, r5, #0 + bl sub_02032EE8 + cmp r0, #0 + beq _0224A828 + ldr r1, [r4, #0] + add r0, r1, r5 + add r0, #0x80 + ldrb r0, [r0] + cmp r0, #0 + bne _0224A828 + add r0, r1, r5 + add r0, #0x80 + strb r7, [r0] + ldr r0, [r4, #0] + add r0, #0x98 + strb r7, [r0] + b _0224A84E +_0224A828: + add r0, r5, #0 + bl sub_02032EE8 + cmp r0, #0 + bne _0224A84E + ldr r1, [r4, #0] + add r0, r1, r5 + add r0, #0x80 + ldrb r0, [r0] + cmp r0, #0 + beq _0224A84E + add r1, r1, r5 + add r1, #0x80 + mov r0, #0 + strb r0, [r1] + ldr r1, [r4, #0] + mov r0, #1 + add r1, #0x98 + strb r0, [r1] +_0224A84E: + add r5, r5, #1 + cmp r5, #8 + blt _0224A7E6 + ldr r1, _0224A964 ; =0x0224F5A0 + ldr r2, [r1, #0] + add r0, r2, #0 + add r0, #0x98 + ldrb r0, [r0] + cmp r0, #0 + beq _0224A8A6 + mov r0, #0 + add r2, #0x98 + strb r0, [r2] + ldr r0, [r1, #0] + ldr r0, [r0, #0x5c] + bl sub_020013AC + ldr r0, _0224A964 ; =0x0224F5A0 + mov r1, #3 + ldr r0, [r0, #0] + mov r5, #0 + ldr r0, [r0, #0x5c] + bl sub_02001504 + cmp r0, #0 + bls _0224A8A6 + ldr r4, _0224A964 ; =0x0224F5A0 + add r6, r5, #0 + mov r7, #3 +_0224A888: + ldr r0, [r4, #0] + lsl r2, r5, #0x18 + ldr r0, [r0, #0x5c] + add r1, r6, #0 + lsr r2, r2, #0x18 + bl ov7_0224A438 + ldr r0, [r4, #0] + add r1, r7, #0 + ldr r0, [r0, #0x5c] + add r5, r5, #1 + bl sub_02001504 + cmp r5, r0 + blo _0224A888 +_0224A8A6: + ldr r0, [sp, #4] + ldr r0, [r0, #0x5c] + bl sub_02001288 + add r4, r0, #0 + bl sub_02032E44 + cmp r0, #0xff + beq _0224A8DE + bl sub_02032E44 + ldr r1, [sp, #4] + add r1, #0x95 + strb r0, [r1] + ldr r0, _0224A968 ; =0x0000060D + bl sub_02005748 + ldr r0, [sp, #4] + ldr r1, [sp, #4] + add r0, #0x95 + ldrb r0, [r0] + bl ov7_0224A6D4 + ldr r0, _0224A96C ; =ov7_0224AF84 + bl ov7_0224A530 + add sp, #0x8c + pop {r4, r5, r6, r7, pc} +_0224A8DE: + bl sub_020360F0 + cmp r0, #0 + beq _0224A900 + bl ov7_0224A528 + ldr r0, [sp] + ldr r1, [sp, #4] + bl ov7_0224AFD8 + ldr r0, _0224A964 ; =0x0224F5A0 + mov r1, #3 + ldr r0, [r0, #0] + add sp, #0x8c + add r0, #0x88 + str r1, [r0, #0] + pop {r4, r5, r6, r7, pc} +_0224A900: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224A910 + add r0, r0, #1 + cmp r4, r0 + beq _0224A95E + b _0224A91A +_0224A910: + ldr r0, _0224A970 ; =ov7_0224AE10 + bl ov7_0224A530 + add sp, #0x8c + pop {r4, r5, r6, r7, pc} +_0224A91A: + bl ov7_0224B3D4 + add r4, r0, #0 + bl sub_02032E64 + cmp r4, r0 + bgt _0224A95E + ldr r4, _0224A974 ; =0x0224EEE0 + add r3, sp, #8 + mov r2, #0x10 +_0224A92E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224A92E + ldr r0, [r4, #0] + str r0, [r3, #0] + bl sub_02032E64 + ldr r1, [sp, #4] + add r1, #0x90 + strb r0, [r1] + ldr r0, [sp, #4] + add r0, #0x91 + str r0, [sp, #4] + ldrb r0, [r0] + lsl r1, r0, #2 + add r0, sp, #8 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 + ldr r0, _0224A978 ; =ov7_0224AC48 + bl ov7_0224A530 +_0224A95E: + add sp, #0x8c + pop {r4, r5, r6, r7, pc} + nop +_0224A964: .word 0x0224F5A0 +_0224A968: .word 0x0000060D +_0224A96C: .word ov7_0224AF84 +_0224A970: .word ov7_0224AE10 +_0224A974: .word 0x0224EEE0 +_0224A978: .word ov7_0224AC48 + thumb_func_end ov7_0224A7D0 + + thumb_func_start ov7_0224A97C +ov7_0224A97C: ; 0x0224A97C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + add r0, r4, #0 + bl ov7_0224A64C + ldr r0, [r4, #0x5c] + bl sub_02001288 + ldr r0, [r4, #0x60] + mov r1, #4 + bl sub_02002114 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x95 + ldrb r0, [r0] + bl sub_02035D78 + cmp r0, #0 + bne _0224AA1A + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _0224A9B6 + ldr r0, [r4, #0x60] + mov r1, #4 + bl sub_02002154 +_0224A9B6: + add r0, r4, #0 + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #8 + bne _0224AA02 + mov r5, #1 + bl ov7_0224B3E8 + cmp r0, #1 + ble _0224A9F2 + mov r4, #5 +_0224A9CC: + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0224A9E8 + add r0, r5, #0 + bl sub_02032D98 + lsl r1, r5, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl sub_02036594 +_0224A9E8: + add r5, r5, #1 + bl ov7_0224B3E8 + cmp r5, r0 + blt _0224A9CC +_0224A9F2: + mov r0, #0 + add r1, r0, #0 + bl ov7_02249960 + ldr r0, _0224AB54 ; =ov7_0224ABA4 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AA02: + add r4, #0x95 + ldrb r0, [r4] + bl sub_02032D98 + mov r0, #0 + add r1, r0, #0 + bl ov7_02249960 + ldr r0, _0224AB54 ; =ov7_0224ABA4 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AA1A: + bl sub_020360F0 + cmp r0, #0 + bne _0224AA2A + bl ov7_0224B4E4 + cmp r0, #0 + beq _0224AA52 +_0224AA2A: + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + bne _0224AA3A + ldr r0, [r4, #0x60] + mov r1, #4 + bl sub_02002154 +_0224AA3A: + add r4, #0x95 + ldrb r0, [r4] + bl sub_02032D98 + mov r0, #0 + add r1, r0, #0 + bl ov7_02249960 + ldr r0, _0224AB54 ; =ov7_0224ABA4 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AA52: + cmp r5, #0 + bne _0224AAE2 + add r0, r4, #0 + add r0, #0x91 + ldrb r0, [r0] + add r0, #0xff + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bhi _0224AA88 + bl sub_02032FE4 + cmp r0, #0 + bne _0224AA88 + mov r0, #0x61 + mov r1, #0 + bl ov7_02249960 + ldr r0, _0224AB58 ; =ov7_0224AB64 + bl ov7_0224A530 + add r4, #0x95 + ldrb r1, [r4] + mov r0, #4 + bl sub_02036594 + pop {r4, r5, r6, pc} +_0224AA88: + add r0, r4, #0 + add r0, #0x95 + ldrb r0, [r0] + bl sub_02032E1C + add r1, r4, #0 + add r1, #0x95 + ldrb r1, [r1] + mov r0, #2 + bl sub_02036594 + bl ov7_0224B3E8 + add r5, r0, #0 + bl sub_02032E64 + cmp r5, r0 + bne _0224AAD6 + bl sub_02032E64 + add r1, r4, #0 + add r1, #0x90 + strb r0, [r1] + bl ov7_0224B3E8 + cmp r0, #2 + ble _0224AAC6 + ldr r0, _0224AB5C ; =ov7_0224AC08 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AAC6: + add r0, r6, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + add r0, r4, #0 + bl ov7_0224B054 + pop {r4, r5, r6, pc} +_0224AAD6: + bl ov7_0224A5D0 + ldr r0, _0224AB60 ; =ov7_0224ABE0 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AAE2: + mov r0, #0 + mvn r0, r0 + cmp r5, r0 + beq _0224AB50 + add r0, r4, #0 + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #8 + bne _0224AB32 + mov r5, #1 + bl ov7_0224B3E8 + cmp r0, #1 + ble _0224AB26 + mov r4, #5 +_0224AB00: + lsl r0, r5, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0224AB1C + add r0, r5, #0 + bl sub_02032D98 + lsl r1, r5, #0x18 + add r0, r4, #0 + lsr r1, r1, #0x18 + bl sub_02036594 +_0224AB1C: + add r5, r5, #1 + bl ov7_0224B3E8 + cmp r5, r0 + blt _0224AB00 +_0224AB26: + bl ov7_0224A5D0 + ldr r0, _0224AB60 ; =ov7_0224ABE0 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AB32: + add r0, r4, #0 + add r0, #0x95 + ldrb r0, [r0] + bl sub_02032D98 + add r4, #0x95 + ldrb r1, [r4] + mov r0, #3 + bl sub_02036594 + bl ov7_0224A5D0 + ldr r0, _0224AB60 ; =ov7_0224ABE0 + bl ov7_0224A530 +_0224AB50: + pop {r4, r5, r6, pc} + nop +_0224AB54: .word ov7_0224ABA4 +_0224AB58: .word ov7_0224AB64 +_0224AB5C: .word ov7_0224AC08 +_0224AB60: .word ov7_0224ABE0 + thumb_func_end ov7_0224A97C + + thumb_func_start ov7_0224AB64 +ov7_0224AB64: ; 0x0224AB64 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0224AB9C ; =0x0224F5A0 + add r4, r1, #0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224AB9A + ldr r0, _0224ABA0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224AB9A + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + bl ov7_0224A528 + ldr r0, _0224AB9C ; =0x0224F5A0 + mov r1, #4 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] +_0224AB9A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224AB9C: .word 0x0224F5A0 +_0224ABA0: .word 0x021BF67C + thumb_func_end ov7_0224AB64 + + thumb_func_start ov7_0224ABA4 +ov7_0224ABA4: ; 0x0224ABA4 + push {r3, lr} + add r0, r1, #0 + bl ov7_0224A64C + ldr r0, _0224ABD4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224ABD0 + ldr r0, _0224ABD8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224ABD0 + bl ov7_0224A5D0 + ldr r0, _0224ABDC ; =ov7_0224ABE0 + bl ov7_0224A530 +_0224ABD0: + pop {r3, pc} + nop +_0224ABD4: .word 0x0224F5A0 +_0224ABD8: .word 0x021BF67C +_0224ABDC: .word ov7_0224ABE0 + thumb_func_end ov7_0224ABA4 + + thumb_func_start ov7_0224ABE0 +ov7_0224ABE0: ; 0x0224ABE0 + push {r3, lr} + add r0, r1, #0 + bl ov7_0224A64C + ldr r0, _0224AC00 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224ABFE + ldr r0, _0224AC04 ; =ov7_0224A7D0 + bl ov7_0224A530 +_0224ABFE: + pop {r3, pc} + ; .align 2, 0 +_0224AC00: .word 0x0224F5A0 +_0224AC04: .word ov7_0224A7D0 + thumb_func_end ov7_0224ABE0 + + thumb_func_start ov7_0224AC08 +ov7_0224AC08: ; 0x0224AC08 + push {r4, r5, lr} + sub sp, #0x84 + ldr r5, _0224AC40 ; =0x0224EFE8 + add r4, r1, #0 + add r3, sp, #0 + mov r2, #0x10 +_0224AC14: + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224AC14 + ldr r0, [r5, #0] + str r0, [r3, #0] + add r0, r4, #0 + bl ov7_0224A64C + add r4, #0x91 + ldrb r0, [r4] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 + ldr r0, _0224AC44 ; =ov7_0224AC48 + bl ov7_0224A530 + add sp, #0x84 + pop {r4, r5, pc} + ; .align 2, 0 +_0224AC40: .word 0x0224EFE8 +_0224AC44: .word ov7_0224AC48 + thumb_func_end ov7_0224AC08 + + thumb_func_start ov7_0224AC48 +ov7_0224AC48: ; 0x0224AC48 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r0, r4, #0 + bl ov7_0224A64C + mov r0, #0 + bl sub_02036994 + ldr r0, [r4, #0x5c] + bl sub_02001288 + ldr r0, _0224AC94 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224AC8E + mov r0, #4 + str r0, [sp] + ldr r0, _0224AC94 ; =0x0224F5A0 + ldr r1, _0224AC98 ; =0x0224ED0C + ldr r0, [r0, #0] + ldr r2, _0224AC9C ; =0x000003D9 + ldr r0, [r0, #0x68] + mov r3, #0xb + ldr r0, [r0, #8] + bl sub_02002100 + str r0, [r4, #0x60] + ldr r0, _0224ACA0 ; =ov7_0224ACA4 + bl ov7_0224A530 +_0224AC8E: + add sp, #4 + pop {r3, r4, pc} + nop +_0224AC94: .word 0x0224F5A0 +_0224AC98: .word 0x0224ED0C +_0224AC9C: .word 0x000003D9 +_0224ACA0: .word ov7_0224ACA4 + thumb_func_end ov7_0224AC48 + + thumb_func_start ov7_0224ACA4 +ov7_0224ACA4: ; 0x0224ACA4 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + bl ov7_0224A64C + ldr r0, [r5, #0x5c] + bl sub_02001288 + ldr r0, [r5, #0x60] + mov r1, #4 + bl sub_02002114 + add r4, r0, #0 + bl sub_020360F0 + cmp r0, #0 + bne _0224ACD6 + bl sub_02035E18 + add r1, r5, #0 + add r1, #0x90 + ldrb r1, [r1] + cmp r1, r0 + beq _0224ACF2 +_0224ACD6: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + bne _0224ACE6 + ldr r0, [r5, #0x60] + mov r1, #4 + bl sub_02002154 +_0224ACE6: + mov r0, #0 + str r0, [r5, #0x60] + ldr r0, _0224AD5C ; =ov7_0224AD68 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224ACF2: + cmp r4, #0 + bne _0224AD34 + add r5, #0x91 + ldrb r0, [r5] + cmp r0, #8 + bne _0224AD26 + mov r4, #1 + bl sub_02035E18 + cmp r0, #1 + ble _0224AD26 +_0224AD08: + lsl r0, r4, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + bne _0224AD1C + ldr r0, _0224AD5C ; =ov7_0224AD68 + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AD1C: + add r4, r4, #1 + bl sub_02035E18 + cmp r4, r0 + blt _0224AD08 +_0224AD26: + mov r0, #0xa + bl sub_020364F0 + ldr r0, _0224AD60 ; =ov7_0224AF2C + bl ov7_0224A530 + pop {r4, r5, r6, pc} +_0224AD34: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _0224AD58 + mov r0, #1 + bl sub_02036994 + bl ov7_0224A528 + add r0, r6, #0 + add r1, r5, #0 + bl ov7_0224AFD8 + ldr r0, _0224AD64 ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] +_0224AD58: + pop {r4, r5, r6, pc} + nop +_0224AD5C: .word ov7_0224AD68 +_0224AD60: .word ov7_0224AF2C +_0224AD64: .word 0x0224F5A0 + thumb_func_end ov7_0224ACA4 + + thumb_func_start ov7_0224AD68 +ov7_0224AD68: ; 0x0224AD68 + push {r3, r4, r5, r6, lr} + sub sp, #0x84 + ldr r6, _0224ADCC ; =0x0224EE5C + add r2, r0, #0 + add r4, r1, #0 + add r5, sp, #0 + mov r3, #0x10 +_0224AD76: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _0224AD76 + ldr r0, [r6, #0] + add r1, r4, #0 + str r0, [r5, #0] + add r0, r2, #0 + bl ov7_0224AFD8 + ldr r0, _0224ADD0 ; =0x0224F5A0 + ldr r1, [r0, #0] + add r0, r1, #0 + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #8 + bne _0224ADA6 + add r1, #0x92 + ldrb r0, [r1] + mov r1, #0 + add r0, #0x76 + bl ov7_02249960 + b _0224ADB8 +_0224ADA6: + add r0, r4, #0 + add r0, #0x91 + ldrb r0, [r0] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 +_0224ADB8: + bl sub_0205987C + ldr r0, _0224ADD4 ; =ov7_0224ADD8 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} + nop +_0224ADCC: .word 0x0224EE5C +_0224ADD0: .word 0x0224F5A0 +_0224ADD4: .word ov7_0224ADD8 + thumb_func_end ov7_0224AD68 + + thumb_func_start ov7_0224ADD8 +ov7_0224ADD8: ; 0x0224ADD8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224AE08 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224AE06 + ldr r0, _0224AE0C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224AE06 + ldr r0, _0224AE08 ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] + add r0, r4, #0 + bl sub_0200DA58 +_0224AE06: + pop {r4, pc} + ; .align 2, 0 +_0224AE08: .word 0x0224F5A0 +_0224AE0C: .word 0x021BF67C + thumb_func_end ov7_0224ADD8 + + thumb_func_start ov7_0224AE10 +ov7_0224AE10: ; 0x0224AE10 + push {r3, r4, r5, r6, lr} + sub sp, #0x84 + ldr r6, _0224AE6C ; =0x0224F06C + add r5, r0, #0 + add r4, r1, #0 + add r3, sp, #0 + mov r2, #0x10 +_0224AE1E: + ldmia r6!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0224AE1E + ldr r0, [r6, #0] + str r0, [r3, #0] + add r0, r4, #0 + bl ov7_0224A64C + bl sub_02032E64 + cmp r0, #1 + ble _0224AE52 + add r4, #0x91 + ldrb r0, [r4] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 + ldr r0, _0224AE70 ; =ov7_0224AE78 + bl ov7_0224A530 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} +_0224AE52: + bl ov7_0224A528 + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + ldr r0, _0224AE74 ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] + add sp, #0x84 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224AE6C: .word 0x0224F06C +_0224AE70: .word ov7_0224AE78 +_0224AE74: .word 0x0224F5A0 + thumb_func_end ov7_0224AE10 + + thumb_func_start ov7_0224AE78 +ov7_0224AE78: ; 0x0224AE78 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r0, r4, #0 + bl ov7_0224A64C + ldr r0, [r4, #0x5c] + bl sub_02001288 + ldr r0, _0224AEBC ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224AEB8 + mov r0, #4 + str r0, [sp] + ldr r0, _0224AEBC ; =0x0224F5A0 + ldr r1, _0224AEC0 ; =0x0224ED0C + ldr r0, [r0, #0] + ldr r2, _0224AEC4 ; =0x000003D9 + ldr r0, [r0, #0x68] + mov r3, #0xb + ldr r0, [r0, #8] + bl sub_02002100 + str r0, [r4, #0x60] + ldr r0, _0224AEC8 ; =ov7_0224AECC + bl ov7_0224A530 +_0224AEB8: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0224AEBC: .word 0x0224F5A0 +_0224AEC0: .word 0x0224ED0C +_0224AEC4: .word 0x000003D9 +_0224AEC8: .word ov7_0224AECC + thumb_func_end ov7_0224AE78 + + thumb_func_start ov7_0224AECC +ov7_0224AECC: ; 0x0224AECC + push {r4, r5, r6, lr} + add r5, r1, #0 + add r6, r0, #0 + add r0, r5, #0 + bl ov7_0224A64C + ldr r0, [r5, #0x5c] + bl sub_02001288 + ldr r0, [r5, #0x60] + mov r1, #4 + bl sub_02002114 + add r4, r0, #0 + bl sub_020360F0 + cmp r0, #0 + beq _0224AEF4 + mov r4, #1 + mvn r4, r4 +_0224AEF4: + cmp r4, #0 + bne _0224AF10 + bl ov7_0224A528 + add r0, r6, #0 + add r1, r5, #0 + bl ov7_0224AFD8 + ldr r0, _0224AF24 ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] + pop {r4, r5, r6, pc} +_0224AF10: + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _0224AF22 + bl ov7_0224A5D0 + ldr r0, _0224AF28 ; =ov7_0224ABE0 + bl ov7_0224A530 +_0224AF22: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224AF24: .word 0x0224F5A0 +_0224AF28: .word ov7_0224ABE0 + thumb_func_end ov7_0224AECC + + thumb_func_start ov7_0224AF2C +ov7_0224AF2C: ; 0x0224AF2C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_020360F0 + cmp r0, #0 + bne _0224AF48 + bl sub_02035E18 + add r1, r4, #0 + add r1, #0x90 + ldrb r1, [r1] + cmp r1, r0 + beq _0224AF50 +_0224AF48: + ldr r0, _0224AF80 ; =ov7_0224AD68 + bl ov7_0224A530 + pop {r3, r4, r5, pc} +_0224AF50: + add r0, r4, #0 + bl ov7_0224A64C + ldr r0, [r4, #0x5c] + bl sub_02001288 + mov r0, #0xa + bl sub_02036540 + cmp r0, #0 + beq _0224AF7C + bl sub_02036450 + cmp r0, #0 + beq _0224AF7C + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224AFD8 + add r0, r4, #0 + bl ov7_0224B3A8 +_0224AF7C: + pop {r3, r4, r5, pc} + nop +_0224AF80: .word ov7_0224AD68 + thumb_func_end ov7_0224AF2C + + thumb_func_start ov7_0224AF84 +ov7_0224AF84: ; 0x0224AF84 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + add r0, r4, #0 + bl ov7_0224A64C + ldr r0, [r4, #0x5c] + bl sub_02001288 + ldr r0, _0224AFC8 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224AFC4 + mov r0, #4 + str r0, [sp] + ldr r0, _0224AFC8 ; =0x0224F5A0 + ldr r1, _0224AFCC ; =0x0224ED0C + ldr r0, [r0, #0] + ldr r2, _0224AFD0 ; =0x000003D9 + ldr r0, [r0, #0x68] + mov r3, #0xb + ldr r0, [r0, #8] + bl sub_02002100 + str r0, [r4, #0x60] + ldr r0, _0224AFD4 ; =ov7_0224A97C + bl ov7_0224A530 +_0224AFC4: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0224AFC8: .word 0x0224F5A0 +_0224AFCC: .word 0x0224ED0C +_0224AFD0: .word 0x000003D9 +_0224AFD4: .word ov7_0224A97C + thumb_func_end ov7_0224AF84 + + thumb_func_start ov7_0224AFD8 +ov7_0224AFD8: ; 0x0224AFD8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0224B050 ; =0x0224F5A0 + add r4, r1, #0 + ldr r0, [r0, #0] + mov r1, #0xf + add r0, #0x40 + bl sub_0201ADA4 + add r0, r4, #0 + add r0, #0x20 + mov r1, #0 + bl sub_0200DC9C + ldr r0, [r4, #0x64] + bl sub_02013A3C + mov r1, #0 + ldr r0, [r4, #0x5c] + add r2, r1, #0 + bl sub_02001384 + add r0, r4, #0 + add r0, #0x20 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #0x20 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x97 + ldrb r0, [r0] + cmp r0, #0 + beq _0224B044 + ldr r0, _0224B050 ; =0x0224F5A0 + mov r1, #0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0200DC9C + ldr r0, _0224B050 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201ACF4 + ldr r0, _0224B050 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x30 + bl sub_0201A8FC + mov r0, #0 + add r4, #0x97 + strb r0, [r4] +_0224B044: + cmp r5, #0 + beq _0224B04E + add r0, r5, #0 + bl sub_0200DA58 +_0224B04E: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B050: .word 0x0224F5A0 + thumb_func_end ov7_0224AFD8 + + thumb_func_start ov7_0224B054 +ov7_0224B054: ; 0x0224B054 + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + bl sub_02032EE8 + add r2, r0, #0 + ldr r0, [r4, #0x58] + mov r1, #1 + bl sub_0200B498 + mov r0, #0x39 + mov r1, #1 + bl ov7_02249960 + ldr r0, _0224B084 ; =ov7_0224A718 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + ldr r0, _0224B088 ; =ov7_0224B0E8 + bl ov7_0224A530 + pop {r4, pc} + nop +_0224B084: .word ov7_0224A718 +_0224B088: .word ov7_0224B0E8 + thumb_func_end ov7_0224B054 + + thumb_func_start ov7_0224B08C +ov7_0224B08C: ; 0x0224B08C + push {r4, lr} + ldr r1, _0224B0DC ; =0x0224F5A0 + add r4, r0, #0 + add r0, #0x8e + ldr r1, [r1, #0] + ldrh r0, [r0] + ldr r1, [r1, #0x7c] + bl sub_020339AC + ldr r2, _0224B0DC ; =0x0224F5A0 + ldr r0, [r4, #0x58] + ldr r2, [r2, #0] + mov r1, #1 + ldr r2, [r2, #0x7c] + bl sub_0200B498 + mov r0, #4 + mov r1, #1 + bl ov7_02249960 + bl sub_02035E18 + add r1, r4, #0 + add r1, #0x90 + strb r0, [r1] + ldr r0, _0224B0E0 ; =ov7_0224A718 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + ldr r0, _0224B0E4 ; =ov7_0224B0E8 + bl ov7_0224A530 + ldr r0, _0224B0DC ; =0x0224F5A0 + mov r1, #0x5a + ldr r0, [r0, #0] + add r0, #0x96 + strb r1, [r0] + pop {r4, pc} + nop +_0224B0DC: .word 0x0224F5A0 +_0224B0E0: .word ov7_0224A718 +_0224B0E4: .word ov7_0224B0E8 + thumb_func_end ov7_0224B08C + + thumb_func_start ov7_0224B0E8 +ov7_0224B0E8: ; 0x0224B0E8 + push {r4, lr} + add r4, r1, #0 + bl sub_0203608C + cmp r0, #0 + bne _0224B108 + bl sub_02035E18 + add r4, #0x90 + ldrb r1, [r4] + cmp r1, r0 + beq _0224B108 + ldr r0, _0224B140 ; =ov7_0224B274 + bl ov7_0224A530 + pop {r4, pc} +_0224B108: + bl ov7_0224B4E4 + cmp r0, #0 + bne _0224B118 + bl sub_020360F0 + cmp r0, #0 + beq _0224B120 +_0224B118: + ldr r0, _0224B140 ; =ov7_0224B274 + bl ov7_0224A530 + pop {r4, pc} +_0224B120: + ldr r0, _0224B144 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224B13C + mov r0, #0xa + bl sub_020364F0 + ldr r0, _0224B148 ; =ov7_0224B14C + bl ov7_0224A530 +_0224B13C: + pop {r4, pc} + nop +_0224B140: .word ov7_0224B274 +_0224B144: .word 0x0224F5A0 +_0224B148: .word ov7_0224B14C + thumb_func_end ov7_0224B0E8 + + thumb_func_start ov7_0224B14C +ov7_0224B14C: ; 0x0224B14C + push {r3, r4, r5, r6, lr} + sub sp, #0x84 + add r5, r0, #0 + add r4, r1, #0 + bl sub_0203608C + cmp r0, #0 + bne _0224B172 + bl sub_02035E18 + add r1, r4, #0 + add r1, #0x90 + ldrb r1, [r1] + cmp r1, r0 + beq _0224B172 + ldr r0, _0224B268 ; =ov7_0224B274 + bl ov7_0224A530 + b _0224B202 +_0224B172: + bl ov7_0224B4E4 + cmp r0, #0 + bne _0224B182 + bl sub_020360F0 + cmp r0, #0 + beq _0224B18C +_0224B182: + ldr r0, _0224B268 ; =ov7_0224B274 + bl ov7_0224A530 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} +_0224B18C: + mov r0, #0 + bl sub_02035D78 + cmp r0, #0 + bne _0224B1A0 + ldr r0, _0224B268 ; =ov7_0224B274 + bl ov7_0224A530 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} +_0224B1A0: + mov r0, #0 + mov r1, #5 + bl sub_020365A8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224B1BA + ldr r0, _0224B268 ; =ov7_0224B274 + bl ov7_0224A530 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} +_0224B1BA: + mov r0, #0xa + bl sub_02036540 + cmp r0, #0 + beq _0224B202 + bl sub_02036450 + cmp r0, #0 + beq _0224B202 + ldr r0, _0224B26C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224B1E8 + ldr r0, _0224B26C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0201D730 +_0224B1E8: + bl sub_02035E18 + add r1, r4, #0 + add r1, #0x90 + strb r0, [r1] + add r0, r4, #0 + bl ov7_0224B3A8 + add r0, r5, #0 + bl sub_0200DA58 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} +_0224B202: + ldr r2, _0224B26C ; =0x0224F5A0 + ldr r0, [r2, #0] + add r1, r0, #0 + add r1, #0x96 + ldrb r1, [r1] + cmp r1, #0 + beq _0224B264 + add r1, r0, #0 + add r1, #0x96 + ldrb r1, [r1] + add r0, #0x96 + sub r1, r1, #1 + strb r1, [r0] + ldr r2, [r2, #0] + add r0, r2, #0 + add r0, #0x96 + ldrb r0, [r0] + cmp r0, #0 + bne _0224B264 + ldr r6, _0224B270 ; =0x0224F0F0 + add r5, sp, #0 + mov r3, #0x10 +_0224B22E: + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + sub r3, r3, #1 + bne _0224B22E + ldr r0, [r6, #0] + str r0, [r5, #0] + add r0, r2, #0 + add r0, #0x91 + ldrb r0, [r0] + cmp r0, #8 + bne _0224B254 + add r2, #0x92 + ldrb r0, [r2] + mov r1, #0 + add r0, #0x71 + bl ov7_02249960 + add sp, #0x84 + pop {r3, r4, r5, r6, pc} +_0224B254: + add r4, #0x91 + ldrb r0, [r4] + lsl r1, r0, #2 + add r0, sp, #0 + ldr r0, [r0, r1] + mov r1, #0 + bl ov7_02249960 +_0224B264: + add sp, #0x84 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224B268: .word ov7_0224B274 +_0224B26C: .word 0x0224F5A0 +_0224B270: .word 0x0224F0F0 + thumb_func_end ov7_0224B14C + + thumb_func_start ov7_0224B274 +ov7_0224B274: ; 0x0224B274 + push {r3, lr} + ldr r0, _0224B298 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224B294 + mov r0, #0 + add r1, r0, #0 + bl ov7_02249960 + ldr r0, _0224B29C ; =ov7_0224B2A0 + bl ov7_0224A530 +_0224B294: + pop {r3, pc} + nop +_0224B298: .word 0x0224F5A0 +_0224B29C: .word ov7_0224B2A0 + thumb_func_end ov7_0224B274 + + thumb_func_start ov7_0224B2A0 +ov7_0224B2A0: ; 0x0224B2A0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224B2D4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224B2D2 + ldr r0, _0224B2D8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224B2D2 + add r0, r4, #0 + bl sub_0200DA58 + bl ov7_0224A528 + ldr r0, _0224B2D4 ; =0x0224F5A0 + mov r1, #1 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] +_0224B2D2: + pop {r4, pc} + ; .align 2, 0 +_0224B2D4: .word 0x0224F5A0 +_0224B2D8: .word 0x021BF67C + thumb_func_end ov7_0224B2A0 + + thumb_func_start ov7_0224B2DC +ov7_0224B2DC: ; 0x0224B2DC + push {r4, lr} + ldr r1, _0224B314 ; =0x0224F5A0 + add r4, r0, #0 + add r0, #0x8e + ldr r1, [r1, #0] + ldrh r0, [r0] + ldr r1, [r1, #0x7c] + bl sub_020339AC + ldr r2, _0224B314 ; =0x0224F5A0 + ldr r0, [r4, #0x58] + ldr r2, [r2, #0] + mov r1, #1 + ldr r2, [r2, #0x7c] + bl sub_0200B498 + mov r0, #5 + mov r1, #1 + bl ov7_02249960 + bl sub_020597A4 + ldr r0, _0224B318 ; =ov7_0224B31C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r4, pc} + ; .align 2, 0 +_0224B314: .word 0x0224F5A0 +_0224B318: .word ov7_0224B31C + thumb_func_end ov7_0224B2DC + + thumb_func_start ov7_0224B31C +ov7_0224B31C: ; 0x0224B31C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0224B344 ; =0x0224F5A0 + add r4, r1, #0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224B342 + bl sub_020597A4 + add r0, r4, #0 + bl ov7_02249E0C + add r0, r5, #0 + bl sub_0200DA58 +_0224B342: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B344: .word 0x0224F5A0 + thumb_func_end ov7_0224B31C + + thumb_func_start ov7_0224B348 +ov7_0224B348: ; 0x0224B348 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_020597A4 + mov r4, #0 +_0224B352: + add r0, r4, #0 + bl sub_02032D98 + add r4, r4, #1 + cmp r4, #8 + blt _0224B352 + ldr r0, _0224B36C ; =ov7_0224B370 + add r1, r5, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_0224B36C: .word ov7_0224B370 + thumb_func_end ov7_0224B348 + + thumb_func_start ov7_0224B370 +ov7_0224B370: ; 0x0224B370 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0224B3A0 ; =0x0224F5A0 + add r4, r1, #0 + ldr r0, [r0, #0] + add r0, #0x94 + ldrb r0, [r0] + bl sub_0205DA04 + cmp r0, #0 + beq _0224B39C + ldr r0, _0224B3A4 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224B39C + add r0, r4, #0 + bl ov7_02249E0C + add r0, r5, #0 + bl sub_0200DA58 +_0224B39C: + pop {r3, r4, r5, pc} + nop +_0224B3A0: .word 0x0224F5A0 +_0224B3A4: .word 0x021BF67C + thumb_func_end ov7_0224B370 + + thumb_func_start ov7_0224B3A8 +ov7_0224B3A8: ; 0x0224B3A8 + push {r3, lr} + mov r0, #0 + bl sub_02036994 + ldr r0, _0224B3D0 ; =0x0224F5A0 + mov r1, #2 + ldr r0, [r0, #0] + add r0, #0x88 + str r1, [r0, #0] + mov r0, #1 + add r1, r0, #0 + bl sub_020388F4 + bl sub_02032AC0 + mov r0, #1 + bl sub_02033EA8 + pop {r3, pc} + nop +_0224B3D0: .word 0x0224F5A0 + thumb_func_end ov7_0224B3A8 + + thumb_func_start ov7_0224B3D4 +ov7_0224B3D4: ; 0x0224B3D4 + ldr r0, _0224B3E0 ; =0x0224F5A0 + ldr r3, _0224B3E4 ; =sub_02036158 + ldr r0, [r0, #0] + add r0, #0x91 + ldrb r0, [r0] + bx r3 + ; .align 2, 0 +_0224B3E0: .word 0x0224F5A0 +_0224B3E4: .word sub_02036158 + thumb_func_end ov7_0224B3D4 + + thumb_func_start ov7_0224B3E8 +ov7_0224B3E8: ; 0x0224B3E8 + ldr r0, _0224B3F4 ; =0x0224F5A0 + ldr r3, _0224B3F8 ; =sub_02036148 + ldr r0, [r0, #0] + add r0, #0x91 + ldrb r0, [r0] + bx r3 + ; .align 2, 0 +_0224B3F4: .word 0x0224F5A0 +_0224B3F8: .word sub_02036148 + thumb_func_end ov7_0224B3E8 + + thumb_func_start ov7_0224B3FC +ov7_0224B3FC: ; 0x0224B3FC + ldr r0, _0224B410 ; =0x0224F5A0 + ldr r2, [r0, #0] + add r0, r2, #0 + add r0, #0x92 + add r2, #0x93 + ldrb r1, [r0] + ldrb r0, [r2] + lsl r0, r0, #4 + add r0, r1, r0 + bx lr + ; .align 2, 0 +_0224B410: .word 0x0224F5A0 + thumb_func_end ov7_0224B3FC + + thumb_func_start ov7_0224B414 +ov7_0224B414: ; 0x0224B414 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov7_02249AB4 + ldr r0, _0224B44C ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x91 + strb r4, [r0] + sub r0, r4, #3 + cmp r0, #1 + bhi _0224B436 + mov r0, #0 + add r5, #0xb0 + str r0, [r5, #0] +_0224B436: + ldr r0, _0224B44C ; =0x0224F5A0 + ldr r1, [r0, #0] + add r1, #0x92 + strb r6, [r1] + ldr r1, [r0, #0] + add r1, #0x93 + strb r7, [r1] + ldr r0, [r0, #0] + bl ov7_02249C2C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B44C: .word 0x0224F5A0 + thumb_func_end ov7_0224B414 + + thumb_func_start ov7_0224B450 +ov7_0224B450: ; 0x0224B450 + ldr r0, _0224B458 ; =0x0224F5A0 + ldr r3, _0224B45C ; =ov7_02249E0C + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0224B458: .word 0x0224F5A0 +_0224B45C: .word ov7_02249E0C + thumb_func_end ov7_0224B450 + + thumb_func_start ov7_0224B460 +ov7_0224B460: ; 0x0224B460 + push {r4, lr} + ldr r0, _0224B478 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x88 + ldr r4, [r0, #0] + cmp r4, #0 + beq _0224B472 + bl ov7_02249B98 +_0224B472: + add r0, r4, #0 + pop {r4, pc} + nop +_0224B478: .word 0x0224F5A0 + thumb_func_end ov7_0224B460 + + thumb_func_start ov7_0224B47C +ov7_0224B47C: ; 0x0224B47C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl ov7_02249AB4 + ldr r0, _0224B4B4 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x91 + strb r4, [r0] + sub r0, r4, #3 + cmp r0, #1 + bhi _0224B49E + mov r0, #0 + add r5, #0xb0 + str r0, [r5, #0] +_0224B49E: + ldr r0, _0224B4B4 ; =0x0224F5A0 + ldr r1, [r0, #0] + add r1, #0x92 + strb r6, [r1] + ldr r1, [r0, #0] + add r1, #0x93 + strb r7, [r1] + ldr r0, [r0, #0] + bl ov7_0224A510 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B4B4: .word 0x0224F5A0 + thumb_func_end ov7_0224B47C + + thumb_func_start ov7_0224B4B8 +ov7_0224B4B8: ; 0x0224B4B8 + ldr r0, _0224B4C0 ; =0x0224F5A0 + ldr r3, _0224B4C4 ; =ov7_0224A53C + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_0224B4C0: .word 0x0224F5A0 +_0224B4C4: .word ov7_0224A53C + thumb_func_end ov7_0224B4B8 + + thumb_func_start ov7_0224B4C8 +ov7_0224B4C8: ; 0x0224B4C8 + push {r4, lr} + ldr r0, _0224B4E0 ; =0x0224F5A0 + ldr r0, [r0, #0] + add r0, #0x88 + ldr r4, [r0, #0] + cmp r4, #0 + beq _0224B4DA + bl ov7_02249B98 +_0224B4DA: + add r0, r4, #0 + pop {r4, pc} + nop +_0224B4E0: .word 0x0224F5A0 + thumb_func_end ov7_0224B4C8 + + thumb_func_start ov7_0224B4E4 +ov7_0224B4E4: ; 0x0224B4E4 + mov r0, #0 + bx lr + thumb_func_end ov7_0224B4E4 + + .rodata + + + .global Unk_ov7_0224ED0C +Unk_ov7_0224ED0C: ; 0x0224ED0C + .incbin "incbin/overlay7_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov7_0224ED14 +Unk_ov7_0224ED14: ; 0x0224ED14 + .incbin "incbin/overlay7_rodata.bin", 0x8, 0x28 - 0x8 + + .global Unk_ov7_0224ED34 +Unk_ov7_0224ED34: ; 0x0224ED34 + .incbin "incbin/overlay7_rodata.bin", 0x28, 0x48 - 0x28 + + .global Unk_ov7_0224ED54 +Unk_ov7_0224ED54: ; 0x0224ED54 + .incbin "incbin/overlay7_rodata.bin", 0x48, 0xCC - 0x48 + + .global Unk_ov7_0224EDD8 +Unk_ov7_0224EDD8: ; 0x0224EDD8 + .incbin "incbin/overlay7_rodata.bin", 0xCC, 0x150 - 0xCC + + .global Unk_ov7_0224EE5C +Unk_ov7_0224EE5C: ; 0x0224EE5C + .incbin "incbin/overlay7_rodata.bin", 0x150, 0x1D4 - 0x150 + + .global Unk_ov7_0224EEE0 +Unk_ov7_0224EEE0: ; 0x0224EEE0 + .incbin "incbin/overlay7_rodata.bin", 0x1D4, 0x258 - 0x1D4 + + .global Unk_ov7_0224EF64 +Unk_ov7_0224EF64: ; 0x0224EF64 + .incbin "incbin/overlay7_rodata.bin", 0x258, 0x2DC - 0x258 + + .global Unk_ov7_0224EFE8 +Unk_ov7_0224EFE8: ; 0x0224EFE8 + .incbin "incbin/overlay7_rodata.bin", 0x2DC, 0x360 - 0x2DC + + .global Unk_ov7_0224F06C +Unk_ov7_0224F06C: ; 0x0224F06C + .incbin "incbin/overlay7_rodata.bin", 0x360, 0x3E4 - 0x360 + + .global Unk_ov7_0224F0F0 +Unk_ov7_0224F0F0: ; 0x0224F0F0 + .incbin "incbin/overlay7_rodata.bin", 0x3E4, 0x84 + + + .bss + + + .global Unk_ov7_0224F5A0 +Unk_ov7_0224F5A0: ; 0x0224F5A0 + .space 0x4 + diff --git a/asm/ov7_0224B4E8.s b/asm/ov7_0224B4E8.s new file mode 100644 index 000000000..f95b63581 --- /dev/null +++ b/asm/ov7_0224B4E8.s @@ -0,0 +1,1245 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov7_0224B4E8 +ov7_0224B4E8: ; 0x0224B4E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x54 + add r4, r1, #0 + bl sub_0201A7CC + cmp r0, #0 + bne _0224B522 + add r0, r5, #0 + add r0, #0x54 + bl sub_0201A7A0 + ldr r0, [r5, #0x10] + add r1, r5, #0 + ldr r0, [r0, #8] + add r1, #0x54 + mov r2, #3 + bl sub_0205D8F4 + ldr r0, [r5, #0x10] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0x54 + bl sub_0205D944 + b _0224B52A +_0224B522: + add r0, r5, #0 + add r0, #0x54 + bl sub_0205D988 +_0224B52A: + ldr r0, [r5, #0x68] + ldr r2, [r5, #0x14] + add r1, r4, #0 + bl sub_0200B1B8 + ldr r0, [r5, #0x64] + ldr r1, [r5, #0x18] + ldr r2, [r5, #0x14] + bl sub_0200C388 + ldr r0, [r5, #0x10] + ldr r0, [r0, #0xc] + bl sub_02025E44 + add r2, r0, #0 + add r0, r5, #0 + ldr r1, [r5, #0x18] + add r0, #0x54 + mov r3, #1 + bl sub_0205D994 + str r0, [r5, #0x74] + pop {r3, r4, r5, pc} + thumb_func_end ov7_0224B4E8 + + thumb_func_start ov7_0224B558 +ov7_0224B558: ; 0x0224B558 + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + beq _0224B570 + add r0, #0x54 + mov r1, #0 + bl sub_0200E084 + add r0, r4, #0 + add r0, #0x54 + bl sub_0201ACF4 +_0224B570: + add r4, #0x54 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224B558 + + thumb_func_start ov7_0224B57C +ov7_0224B57C: ; 0x0224B57C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x10] + ldr r2, [r4, #0x1c] + ldr r0, [r0, #0xc] + mov r3, #4 + bl sub_0202616C + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r1, #0 + ldr r0, [r4, #0x64] + ldr r2, [r4, #0x1c] + add r3, r1, #0 + bl sub_0200B48C + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224B57C + + thumb_func_start ov7_0224B5A8 +ov7_0224B5A8: ; 0x0224B5A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r5, #0 + ldr r0, [r0, #0xc] + mov r1, #0 + add r4, #0x34 + bl sub_0202610C + mov r6, #5 + cmp r0, #0 + beq _0224B5C4 + add r6, r6, #1 +_0224B5C4: + add r0, r4, #0 + bl sub_0201A7CC + cmp r0, #0 + bne _0224B656 + add r0, r6, #2 + mov r1, #4 + bl sub_02013A04 + str r0, [r5, #8] + mov r3, #1 + str r3, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r6, #2 + lsl r0, r0, #0x19 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + str r3, [sp, #0x10] + ldr r0, [r5, #0x10] + add r1, r4, #0 + ldr r0, [r0, #8] + mov r2, #3 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224B6A4 ; =0x000003D9 + add r0, #0x34 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r0, [r5, #8] + ldr r1, [r5, #0x68] + mov r2, #0x7b + mov r3, #0xc + bl sub_02013A4C + mov r4, #0 + cmp r6, #0 + ble _0224B648 + mov r7, #0x71 +_0224B61C: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224B57C + ldr r0, [r5, #0x68] + ldr r2, [r5, #0x1c] + add r1, r7, #0 + bl sub_0200B1B8 + ldr r0, [r5, #0x64] + ldr r1, [r5, #0x20] + ldr r2, [r5, #0x1c] + bl sub_0200C388 + ldr r0, [r5, #8] + ldr r1, [r5, #0x20] + add r2, r4, #0 + bl sub_02013A6C + add r4, r4, #1 + cmp r4, r6 + blt _0224B61C +_0224B648: + mov r2, #0x72 + add r3, r2, #0 + ldr r0, [r5, #8] + ldr r1, [r5, #0x68] + sub r3, #0x74 + bl sub_02013A4C +_0224B656: + ldr r4, _0224B6A8 ; =0x0224F188 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r6, #2 + lsl r0, r0, #0x10 + lsr r1, r0, #0x10 + add r0, sp, #0x14 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + ldr r0, [r5, #8] + mov r1, #0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0x34 + str r0, [sp, #0x20] + add r0, r2, #0 + add r2, r5, #0 + str r5, [sp, #0x30] + add r2, #0x78 + ldrh r2, [r2] + mov r3, #4 + bl sub_0200112C + str r0, [r5, #0] + add r5, #0x34 + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0224B6A4: .word 0x000003D9 +_0224B6A8: .word 0x0224F188 + thumb_func_end ov7_0224B5A8 + + thumb_func_start ov7_0224B6AC +ov7_0224B6AC: ; 0x0224B6AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0224B6E6 + mov r1, #0 + add r2, r1, #0 + bl sub_02001384 + add r0, r4, #0 + add r0, #0x34 + mov r1, #1 + bl sub_0200DC9C + add r1, r4, #0 + add r1, #0x38 + ldrb r1, [r1] + ldr r0, [r4, #0x34] + bl sub_0201C3C0 + add r0, r4, #0 + add r0, #0x34 + bl sub_0201A8FC + ldr r0, [r4, #8] + bl sub_02013A3C + mov r0, #0 + str r0, [r4, #0] +_0224B6E6: + pop {r4, pc} + thumb_func_end ov7_0224B6AC + + thumb_func_start ov7_0224B6E8 +ov7_0224B6E8: ; 0x0224B6E8 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl sub_02001288 + add r4, r0, #0 + add r2, r5, #0 + ldr r0, [r5, #0] + mov r1, #0 + add r2, #0x78 + bl sub_020014DC + add r0, r5, #0 + add r0, #0x80 + ldrh r6, [r0] + add r1, r5, #0 + ldr r0, [r5, #0] + add r1, #0x80 + bl sub_020014D0 + add r0, r5, #0 + add r0, #0x80 + ldrh r0, [r0] + cmp r6, r0 + beq _0224B720 + ldr r0, _0224B784 ; =0x000005DC + bl sub_02005748 +_0224B720: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224B750 + add r0, r0, #1 + cmp r4, r0 + beq _0224B734 + cmp r4, #0xc + beq _0224B738 + b _0224B76A +_0224B734: + mov r0, #0 + pop {r4, r5, r6, pc} +_0224B738: + ldr r0, _0224B784 ; =0x000005DC + bl sub_02005748 + ldr r0, [r5, #0x10] + mov r1, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + bl ov7_0224B6AC + mov r0, #2 + pop {r4, r5, r6, pc} +_0224B750: + ldr r0, _0224B784 ; =0x000005DC + bl sub_02005748 + ldr r0, [r5, #0x10] + mov r1, #0 + add r0, #0xb0 + str r1, [r0, #0] + add r0, r5, #0 + bl ov7_0224B6AC + mov r0, #0 + mvn r0, r0 + pop {r4, r5, r6, pc} +_0224B76A: + ldr r0, _0224B784 ; =0x000005DC + bl sub_02005748 + ldr r0, [r5, #0x10] + add r1, r4, #0 + ldr r0, [r0, #0xc] + bl sub_02026150 + ldr r1, [r5, #0x10] + add r1, #0xb0 + str r0, [r1, #0] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224B784: .word 0x000005DC + thumb_func_end ov7_0224B6E8 + + thumb_func_start ov7_0224B788 +ov7_0224B788: ; 0x0224B788 + push {r3, r4, r5, r6, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #3 + mov r1, #4 + ldr r4, _0224B82C ; =0x0224F4D8 + bl sub_02013A04 + str r0, [r5, #0xc] + mov r0, #0xa + str r0, [sp] + mov r0, #9 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0224B830 ; =0x00000201 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0x10] + add r1, #0x44 + ldr r0, [r0, #8] + mov r2, #3 + mov r3, #0x16 + bl sub_0201A7E8 + add r0, r5, #0 + ldr r2, _0224B834 ; =0x000003D9 + add r0, #0x44 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r6, #0 +_0224B7CE: + ldr r0, [r5, #0xc] + ldr r1, [r5, #0x68] + ldr r2, [r4, #0] + ldr r3, [r4, #4] + bl sub_02013A4C + add r6, r6, #1 + add r4, #8 + cmp r6, #3 + blt _0224B7CE + ldr r4, _0224B838 ; =0x0224F188 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + mov r1, #3 + add r0, sp, #0x14 + strh r1, [r0, #0x10] + strh r1, [r0, #0x12] + ldr r0, [r5, #0xc] + mov r1, #0 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #0x44 + str r0, [sp, #0x20] + add r0, r2, #0 + add r2, r5, #0 + str r5, [sp, #0x30] + add r2, #0x7a + ldrh r2, [r2] + mov r3, #4 + bl sub_0200112C + str r0, [r5, #4] + add r5, #0x44 + add r0, r5, #0 + bl sub_0201A954 + add sp, #0x34 + pop {r3, r4, r5, r6, pc} + nop +_0224B82C: .word 0x0224F4D8 +_0224B830: .word 0x00000201 +_0224B834: .word 0x000003D9 +_0224B838: .word 0x0224F188 + thumb_func_end ov7_0224B788 + + thumb_func_start ov7_0224B83C +ov7_0224B83C: ; 0x0224B83C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #4] + bl sub_02001288 + add r4, r0, #0 + add r2, r5, #0 + ldr r0, [r5, #4] + mov r1, #0 + add r2, #0x7a + bl sub_020014DC + add r0, r5, #0 + add r0, #0x82 + ldrh r6, [r0] + add r1, r5, #0 + ldr r0, [r5, #4] + add r1, #0x82 + bl sub_020014D0 + add r0, r5, #0 + add r0, #0x82 + ldrh r0, [r0] + cmp r6, r0 + beq _0224B874 + ldr r0, _0224B8D8 ; =0x000005DC + bl sub_02005748 +_0224B874: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224B886 + add r0, r0, #1 + cmp r4, r0 + bne _0224B892 + mov r0, #0 + pop {r4, r5, r6, pc} +_0224B886: + ldr r0, _0224B8D8 ; =0x000005DC + bl sub_02005748 + mov r4, #0 + mvn r4, r4 + b _0224B89E +_0224B892: + ldr r0, _0224B8D8 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov7_0224B6AC +_0224B89E: + ldr r0, [r5, #4] + cmp r0, #0 + beq _0224B8D4 + mov r1, #0 + add r2, r1, #0 + bl sub_02001384 + add r0, r5, #0 + add r0, #0x44 + mov r1, #1 + bl sub_0200DC9C + add r1, r5, #0 + add r1, #0x48 + ldrb r1, [r1] + ldr r0, [r5, #0x44] + bl sub_0201C3C0 + add r0, r5, #0 + add r0, #0x44 + bl sub_0201A8FC + ldr r0, [r5, #0xc] + bl sub_02013A3C + mov r0, #0 + str r0, [r5, #4] +_0224B8D4: + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224B8D8: .word 0x000005DC + thumb_func_end ov7_0224B83C + + thumb_func_start ov7_0224B8DC +ov7_0224B8DC: ; 0x0224B8DC + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + ldr r2, _0224BB80 ; =0x00000161 + str r0, [sp, #0x14] + ldr r5, [r0, #0x64] + mov r0, #0 + mov r1, #0x1a + mov r3, #4 + bl sub_0200B144 + str r0, [sp, #0x30] + mov r0, #0xb4 + mov r1, #4 + bl sub_02023790 + str r0, [sp, #0x2c] + mov r0, #0xb4 + mov r1, #4 + bl sub_02023790 + str r0, [sp, #0x28] + ldr r0, [sp, #0x14] + mov r2, #3 + str r0, [sp, #0x24] + add r0, #0x24 + str r0, [sp, #0x24] + mov r0, #2 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #0x13 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r1, [sp, #0x24] + ldr r0, [r0, #0x10] + mov r3, #4 + ldr r0, [r0, #8] + bl sub_0201A7E8 + ldr r0, [sp, #0x24] + ldr r2, _0224BB84 ; =0x000003D9 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + ldr r0, [sp, #0x24] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + add r1, r0, #0 + add r1, #0x78 + ldrh r1, [r1] + sub r1, r1, #1 + bl ov7_0224B57C + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x2c] + mov r1, #0x5f + bl sub_0200B1B8 + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x2c] + add r0, r5, #0 + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x28] + mov r3, #0x39 + str r1, [sp, #8] + bl sub_0201D738 + mov r6, #0 + mov r4, #0x10 + mov r7, #0xff +_0224B982: + add r1, r6, #0 + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x2c] + add r1, #0x4b + bl sub_0200B1B8 + str r4, [sp] + str r7, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x2c] + mov r1, #0 + mov r3, #2 + bl sub_0201D738 + add r6, r6, #1 + add r4, #0xf + cmp r6, #9 + blt _0224B982 + mov r0, #0 + str r0, [sp, #0x18] + ldr r0, _0224BB88 ; =0x0224F4CC + ldr r7, _0224BB8C ; =0x0224F4C0 + str r0, [sp, #0x20] + mov r0, #0x10 + str r0, [sp, #0x1c] +_0224B9B8: + ldr r0, [sp, #0x14] + ldrb r1, [r7] + ldr r0, [r0, #0x10] + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_02026074 + add r2, r0, #0 + ldr r0, [sp, #0x20] + ldrb r4, [r0] + ldrb r0, [r7] + cmp r0, #0xb + bls _0224B9D4 + b _0224BB10 +_0224B9D4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224B9E0: ; jump table + .short _0224BB10 - _0224B9E0 - 2 ; case 0 + .short _0224B9F8 - _0224B9E0 - 2 ; case 1 + .short _0224BA0A - _0224B9E0 - 2 ; case 2 + .short _0224BA1E - _0224B9E0 - 2 ; case 3 + .short _0224BB0A - _0224B9E0 - 2 ; case 4 + .short _0224BA3A - _0224B9E0 - 2 ; case 5 + .short _0224BB10 - _0224B9E0 - 2 ; case 6 + .short _0224BAB8 - _0224B9E0 - 2 ; case 7 + .short _0224BB10 - _0224B9E0 - 2 ; case 8 + .short _0224BB0A - _0224B9E0 - 2 ; case 9 + .short _0224BB0A - _0224B9E0 - 2 ; case 10 + .short _0224BB0A - _0224B9E0 - 2 ; case 11 +_0224B9F8: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #1 + bl sub_0200B60C + b _0224BB10 +_0224BA0A: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + b _0224BB10 +_0224BA1E: + cmp r2, #0 + bne _0224BA26 + mov r4, #0x60 + b _0224BB10 +_0224BA26: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + b _0224BB10 +_0224BA3A: + cmp r2, #0 + ldr r0, _0224BB90 ; =0x00002710 + blt _0224BA54 + mul r0, r2 + mov r1, #0xfe + bl sub_020E1F6C + add r0, r0, #5 + mov r1, #0xa + bl sub_020E1F6C + add r6, r0, #0 + b _0224BA68 +_0224BA54: + neg r1, r2 + mul r0, r1 + mov r1, #0xfe + bl sub_020E1F6C + add r0, r0, #5 + mov r1, #0xa + bl sub_020E1F6C + neg r6, r0 +_0224BA68: + add r0, r6, #0 + mov r1, #0xc + bl sub_020E1F6C + bl sub_020D4070 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #2 + bl sub_0200B60C + add r0, r6, #0 + mov r1, #0xc + bl sub_020E1F6C + add r0, r1, #0 + bl sub_020D4070 + add r2, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #1 + mov r3, #2 + bl sub_0200B60C + cmp r6, #0 + bne _0224BAB2 + mov r4, #0x60 + b _0224BB10 +_0224BAB2: + ble _0224BB10 + add r4, r4, #1 + b _0224BB10 +_0224BAB8: + cmp r2, #0 + ldr r0, _0224BB94 ; =0x00035D2E + blt _0224BAD0 + add r1, r2, #0 + mul r1, r0 + ldr r0, _0224BB98 ; =0x0000C350 + add r0, r1, r0 + ldr r1, _0224BB9C ; =0x000186A0 + bl sub_020E1F6C + add r6, r0, #0 + b _0224BAE2 +_0224BAD0: + neg r1, r2 + add r2, r1, #0 + mul r2, r0 + ldr r0, _0224BB98 ; =0x0000C350 + ldr r1, _0224BB9C ; =0x000186A0 + add r0, r2, r0 + bl sub_020E1F6C + neg r6, r0 +_0224BAE2: + add r0, r6, #0 + bl sub_020D4070 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + cmp r6, #0 + bne _0224BB04 + mov r4, #0x60 + b _0224BB10 +_0224BB04: + ble _0224BB10 + add r4, r4, #1 + b _0224BB10 +_0224BB0A: + cmp r2, #0 + bne _0224BB10 + add r4, r4, #1 +_0224BB10: + ldr r0, [sp, #0x30] + ldr r2, [sp, #0x2c] + add r1, r4, #0 + bl sub_0200B1B8 + ldr r1, [sp, #0x28] + ldr r2, [sp, #0x2c] + add r0, r5, #0 + bl sub_0200C388 + mov r0, #0 + ldr r1, [sp, #0x28] + add r2, r0, #0 + bl sub_02002D7C + add r4, r0, #0 + ldr r0, [sp, #0x1c] + mov r3, #0xbf + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + ldr r0, [sp, #0x24] + ldr r2, [sp, #0x28] + mov r1, #0 + sub r3, r3, r4 + bl sub_0201D738 + ldr r0, [sp, #0x20] + add r7, r7, #1 + add r0, r0, #1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x1c] + add r0, #0xf + str r0, [sp, #0x1c] + ldr r0, [sp, #0x18] + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, #9 + bge _0224BB64 + b _0224B9B8 +_0224BB64: + ldr r0, [sp, #0x2c] + bl sub_020237BC + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x30] + bl sub_0200B190 + ldr r0, [sp, #0x24] + bl sub_0201A954 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BB80: .word 0x00000161 +_0224BB84: .word 0x000003D9 +_0224BB88: .word 0x0224F4CC +_0224BB8C: .word 0x0224F4C0 +_0224BB90: .word 0x00002710 +_0224BB94: .word 0x00035D2E +_0224BB98: .word 0x0000C350 +_0224BB9C: .word 0x000186A0 + thumb_func_end ov7_0224B8DC + + thumb_func_start ov7_0224BBA0 +ov7_0224BBA0: ; 0x0224BBA0 + push {r4, lr} + add r4, r0, #0 + add r0, #0x24 + mov r1, #1 + bl sub_0200DC9C + add r1, r4, #0 + add r1, #0x28 + ldrb r1, [r1] + ldr r0, [r4, #0x24] + bl sub_0201C3C0 + add r4, #0x24 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224BBA0 + + thumb_func_start ov7_0224BBC4 +ov7_0224BBC4: ; 0x0224BBC4 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x10] + ldr r0, [r0, #0xc] + bl sub_0207A268 + add r1, r0, #0 + ldr r0, [r4, #0x10] + ldr r2, [r4, #0x6c] + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_0207A594 + cmp r0, #0 + beq _0224BBEE + cmp r0, #1 + beq _0224BC2E + cmp r0, #4 + beq _0224BBF4 + b _0224BC2E +_0224BBEE: + add sp, #8 + mov r0, #1 + pop {r4, pc} +_0224BBF4: + ldr r0, _0224BC70 ; =0x000005F3 + bl sub_02005748 + add r1, r4, #0 + add r1, #0x78 + ldrh r1, [r1] + add r0, r4, #0 + sub r1, r1, #1 + bl ov7_0224B57C + ldr r0, [r4, #0x10] + mov r1, #1 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_02026074 + mov r1, #1 + str r1, [sp] + str r1, [sp, #4] + add r2, r0, #0 + ldr r0, [r4, #0x64] + add r3, r1, #0 + bl sub_0200B60C + add r0, r4, #0 + mov r1, #0x6b + bl ov7_0224B4E8 + b _0224BC68 +_0224BC2E: + ldr r0, _0224BC70 ; =0x000005F3 + bl sub_02005748 + add r1, r4, #0 + add r1, #0x78 + ldrh r1, [r1] + add r0, r4, #0 + sub r1, r1, #1 + bl ov7_0224B57C + ldr r0, [r4, #0x10] + mov r1, #3 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_02026074 + add r2, r0, #0 + mov r0, #0 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r0, [r4, #0x64] + mov r3, #3 + bl sub_0200B60C + add r0, r4, #0 + mov r1, #0x79 + bl ov7_0224B4E8 +_0224BC68: + mov r0, #0 + add sp, #8 + pop {r4, pc} + nop +_0224BC70: .word 0x000005F3 + thumb_func_end ov7_0224BBC4 + + thumb_func_start ov7_0224BC74 +ov7_0224BC74: ; 0x0224BC74 + push {r4, lr} + add r4, r0, #0 + bl sub_02050A60 + add r0, r4, #0 + bl sub_02050A64 + add r4, r0, #0 + ldr r1, [r4, #0x7c] + cmp r1, #0xb + bls _0224BC8C + b _0224BE02 +_0224BC8C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224BC98: ; jump table + .short _0224BCB0 - _0224BC98 - 2 ; case 0 + .short _0224BCBE - _0224BC98 - 2 ; case 1 + .short _0224BCDC - _0224BC98 - 2 ; case 2 + .short _0224BD0E - _0224BC98 - 2 ; case 3 + .short _0224BD1A - _0224BC98 - 2 ; case 4 + .short _0224BD40 - _0224BC98 - 2 ; case 5 + .short _0224BD5A - _0224BC98 - 2 ; case 6 + .short _0224BD78 - _0224BC98 - 2 ; case 7 + .short _0224BD8C - _0224BC98 - 2 ; case 8 + .short _0224BDAE - _0224BC98 - 2 ; case 9 + .short _0224BE06 - _0224BC98 - 2 ; case 10 + .short _0224BDC2 - _0224BC98 - 2 ; case 11 +_0224BCB0: + mov r1, #0x6a + bl ov7_0224B4E8 + ldr r0, [r4, #0x7c] + add r0, r0, #1 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BCBE: + ldr r0, [r4, #0x74] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DA04 + cmp r0, #0 + bne _0224BCCE + b _0224BE06 +_0224BCCE: + add r0, r4, #0 + bl ov7_0224B5A8 + ldr r0, [r4, #0x7c] + add r0, r0, #1 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BCDC: + bl ov7_0224B6E8 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0224BCF4 + ldr r0, [r4, #0x70] + mov r1, #2 + strh r1, [r0] + mov r0, #0xb + str r0, [r4, #0x7c] + b _0224BE06 +_0224BCF4: + cmp r0, #2 + bne _0224BD04 + ldr r0, [r4, #0x70] + mov r1, #3 + strh r1, [r0] + mov r0, #0xb + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD04: + cmp r0, #1 + bne _0224BE06 + mov r0, #3 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD0E: + bl ov7_0224B788 + ldr r0, [r4, #0x7c] + add r0, r0, #1 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD1A: + bl ov7_0224B83C + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + bne _0224BD2C + mov r0, #2 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD2C: + cmp r0, #1 + bne _0224BD36 + mov r0, #5 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD36: + cmp r0, #2 + bne _0224BE06 + mov r0, #7 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD40: + bl ov7_0224BBC4 + cmp r0, #0 + beq _0224BD54 + ldr r0, [r4, #0x70] + mov r1, #1 + strh r1, [r0] + mov r0, #0xb + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD54: + mov r0, #6 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD5A: + ldr r0, [r4, #0x74] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DA04 + cmp r0, #0 + beq _0224BE06 + ldr r0, _0224BE0C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224BE06 + mov r0, #0 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD78: + mov r1, #1 + bl ov7_0224B558 + add r0, r4, #0 + bl ov7_0224B8DC + ldr r0, [r4, #0x7c] + add r0, r0, #1 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BD8C: + ldr r1, _0224BE0C ; =0x021BF67C + ldr r2, [r1, #0x48] + mov r1, #3 + tst r1, r2 + beq _0224BE06 + bl ov7_0224BBA0 + add r0, r4, #0 + mov r1, #0x6a + bl ov7_0224B4E8 + add r0, r4, #0 + bl ov7_0224B5A8 + mov r0, #9 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BDAE: + ldr r0, [r4, #0x74] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0205DA04 + cmp r0, #0 + beq _0224BE06 + mov r0, #3 + str r0, [r4, #0x7c] + b _0224BE06 +_0224BDC2: + bl ov7_0224B6AC + add r0, r4, #0 + mov r1, #0 + bl ov7_0224B558 + ldr r0, [r4, #0x64] + bl sub_0200B3F0 + ldr r0, [r4, #0x68] + bl sub_0200B190 + ldr r0, [r4, #0x14] + bl sub_020237BC + ldr r0, [r4, #0x18] + bl sub_020237BC + ldr r0, [r4, #0x1c] + bl sub_020237BC + ldr r0, [r4, #0x20] + bl sub_020237BC + ldr r0, [r4, #0x6c] + bl sub_0207A2C0 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r4, pc} +_0224BE02: + mov r0, #1 + pop {r4, pc} +_0224BE06: + mov r0, #0 + pop {r4, pc} + nop +_0224BE0C: .word 0x021BF67C + thumb_func_end ov7_0224BC74 + + thumb_func_start ov7_0224BE10 +ov7_0224BE10: ; 0x0224BE10 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xb + mov r1, #0x84 + bl sub_02018184 + mov r1, #0 + mov r2, #0x84 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0 + str r0, [r4, #0x7c] + str r5, [r4, #0x10] + add r5, #0xb0 + str r0, [r5, #0] + mov r0, #4 + bl sub_0200B358 + str r0, [r4, #0x64] + mov r0, #0 + mov r1, #0x1a + mov r2, #0xdd + mov r3, #4 + bl sub_0200B144 + str r0, [r4, #0x68] + mov r0, #0xb4 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x14] + mov r0, #0xb4 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x18] + mov r0, #0xb4 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x1c] + mov r0, #0xb4 + mov r1, #4 + bl sub_02023790 + str r0, [r4, #0x20] + mov r0, #0xb + bl sub_0207A2A8 + str r0, [r4, #0x6c] + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov7_0224BE10 + + thumb_func_start ov7_0224BE7C +ov7_0224BE7C: ; 0x0224BE7C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_02050A60 + bl ov7_0224BE10 + add r2, r0, #0 + ldr r1, _0224BE98 ; =ov7_0224BC74 + add r0, r5, #0 + str r4, [r2, #0x70] + bl sub_02050944 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224BE98: .word ov7_0224BC74 + thumb_func_end ov7_0224BE7C + + .rodata + + + .global Unk_ov7_0224F174 +Unk_ov7_0224F174: ; 0x0224F174 + .incbin "incbin/overlay7_rodata.bin", 0x468, 0x46C - 0x468 + + .global Unk_ov7_0224F178 +Unk_ov7_0224F178: ; 0x0224F178 + .incbin "incbin/overlay7_rodata.bin", 0x46C, 0x470 - 0x46C + + .global Unk_ov7_0224F17C +Unk_ov7_0224F17C: ; 0x0224F17C + .incbin "incbin/overlay7_rodata.bin", 0x470, 0x474 - 0x470 + + .global Unk_ov7_0224F180 +Unk_ov7_0224F180: ; 0x0224F180 + .incbin "incbin/overlay7_rodata.bin", 0x474, 0x478 - 0x474 + + .global Unk_ov7_0224F184 +Unk_ov7_0224F184: ; 0x0224F184 + .incbin "incbin/overlay7_rodata.bin", 0x478, 0x47C - 0x478 + + .global Unk_ov7_0224F188 +Unk_ov7_0224F188: ; 0x0224F188 + .incbin "incbin/overlay7_rodata.bin", 0x47C, 0x20 + + + .data + + + .global Unk_ov7_0224F4C0 +Unk_ov7_0224F4C0: ; 0x0224F4C0 + .incbin "incbin/overlay7_data.bin", 0x0, 0xC - 0x0 + + .global Unk_ov7_0224F4CC +Unk_ov7_0224F4CC: ; 0x0224F4CC + .incbin "incbin/overlay7_data.bin", 0xC, 0x18 - 0xC + + .global Unk_ov7_0224F4D8 +Unk_ov7_0224F4D8: ; 0x0224F4D8 + .incbin "incbin/overlay7_data.bin", 0x18, 0x18 + diff --git a/asm/ov7_0224BE9C.s b/asm/ov7_0224BE9C.s new file mode 100644 index 000000000..a9469613c --- /dev/null +++ b/asm/ov7_0224BE9C.s @@ -0,0 +1,1879 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov7_0224BE9C +ov7_0224BE9C: ; 0x0224BE9C + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0xc1 + lsl r1, r1, #2 + add r5, r0, #0 + add r7, r2, #0 + bl sub_02018144 + mov r2, #0xc1 + add r4, r0, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + str r5, [r4, #0x18] + str r7, [r4, #0x14] + str r6, [r4, #8] + add r0, r6, #0 + bl sub_0202A750 + bl sub_02029D04 + str r0, [r4, #0xc] + add r0, r6, #0 + bl sub_0207D990 + str r0, [r4, #0x10] + mov r2, #0x8f + ldr r3, [r4, #0x18] + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + bl sub_0200B144 + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + bl ov7_0224C338 + add r0, r4, #0 + bl ov7_0224C35C + add r0, r4, #0 + bl ov7_0224C3CC + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov7_0224BE9C + + thumb_func_start ov7_0224BEFC +ov7_0224BEFC: ; 0x0224BEFC + push {r4, lr} + add r4, r0, #0 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200B190 + add r0, r4, #0 + bl ov7_0224C3B8 + add r0, r4, #0 + bl ov7_0224C3E0 + mov r2, #0xc1 + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #2 + bl sub_020D5124 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224BEFC + + thumb_func_start ov7_0224BF2C +ov7_0224BF2C: ; 0x0224BF2C + push {r4, r5, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0xc + bls _0224BF3A + b _0224C32A +_0224BF3A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224BF46: ; jump table + .short _0224BF60 - _0224BF46 - 2 ; case 0 + .short _0224BF9E - _0224BF46 - 2 ; case 1 + .short _0224BFDE - _0224BF46 - 2 ; case 2 + .short _0224C036 - _0224BF46 - 2 ; case 3 + .short _0224C06C - _0224BF46 - 2 ; case 4 + .short _0224C10E - _0224BF46 - 2 ; case 5 + .short _0224C122 - _0224BF46 - 2 ; case 6 + .short _0224C212 - _0224BF46 - 2 ; case 7 + .short _0224C262 - _0224BF46 - 2 ; case 8 + .short _0224C28E - _0224BF46 - 2 ; case 9 + .short _0224C2BA - _0224BF46 - 2 ; case 10 + .short _0224C2CE - _0224BF46 - 2 ; case 11 + .short _0224C2FC - _0224BF46 - 2 ; case 12 +_0224BF60: + mov r3, #0x55 + lsl r3, r3, #2 + add r0, r4, r3 + sub r3, r3, #4 + ldr r1, [r4, #0x14] + ldr r2, [r4, #0x18] + ldr r3, [r4, r3] + bl ov7_0224C3EC + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #4 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb + str r0, [r4, #0] + mov r0, #1 + str r0, [r4, #4] + b _0224C32A +_0224BF9E: + ldr r0, [r4, #0xc] + ldr r1, _0224C2EC ; =0x0224F1B4 + mov r2, #0x16 + bl ov7_0224CC88 + cmp r0, #0 + beq _0224BFD8 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb + str r0, [r4, #0] + mov r0, #0xc + str r0, [r4, #4] + b _0224C32A +_0224BFD8: + mov r0, #2 + str r0, [r4, #0] + b _0224C32A +_0224BFDE: + mov r2, #0x5a + lsl r2, r2, #2 + add r0, r4, r2 + sub r2, #0x20 + ldr r1, [r4, #0x14] + ldr r2, [r4, r2] + ldr r3, [r4, #0x18] + bl ov7_0224C620 + ldr r0, [r4, #0x18] + mov r1, #0x5a + str r0, [sp] + ldr r0, [r4, #0x14] + lsl r1, r1, #2 + str r0, [sp, #4] + mov r0, #0x2f + lsl r0, r0, #4 + ldr r2, _0224C2EC ; =0x0224F1B4 + ldr r3, [r4, #0x10] + add r0, r4, r0 + add r1, r4, r1 + bl ov7_0224CBD0 + mov r1, #0x52 + mov r0, #0x16 + lsl r1, r1, #2 + str r0, [sp] + ldr r0, [r4, r1] + add r1, #0x3c + str r0, [sp, #4] + mov r0, #0x2f + lsl r0, r0, #4 + add r0, r4, r0 + str r0, [sp, #8] + ldr r0, _0224C2F0 ; =ov7_0224CBE4 + ldr r3, _0224C2EC ; =0x0224F1B4 + str r0, [sp, #0xc] + ldr r0, [r4, #0x1c] + str r0, [sp, #0x10] + add r0, r4, r1 + ldr r1, [r4, #0x14] + ldr r2, [r4, #0x18] + bl ov7_0224C768 +_0224C036: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CA0C + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #6 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xa + str r0, [r4, #0] + mov r0, #4 + str r0, [r4, #4] + b _0224C32A +_0224C06C: + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224C9A4 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224C0D2 + sub r1, r1, #1 + cmp r0, r1 + beq _0224C0D2 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x12 + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + ldr r0, [r4, #0x14] + mov r1, #3 + add r3, r2, #0 + bl sub_02019CB8 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CA34 + mov r0, #0x2b + lsl r0, r0, #4 + ldrh r0, [r4, r0] + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [sp] + add r0, r4, r1 + sub r1, #0xc + ldr r1, [r4, r1] + ldr r2, [r4, #0x18] + ldr r3, _0224C2EC ; =0x0224F1B4 + bl ov7_0224C4E0 + mov r0, #0xa + str r0, [r4, #0] + mov r0, #5 + str r0, [r4, #4] + ldr r0, _0224C2F4 ; =0x000005DC + bl sub_02005748 + b _0224C32A +_0224C0D2: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0224C0DC + b _0224C32A +_0224C0DC: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xb + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb + str r0, [r4, #0] + mov r0, #0xc + str r0, [r4, #4] + ldr r0, _0224C2F4 ; =0x000005DC + bl sub_02005748 + b _0224C32A +_0224C10E: + mov r0, #0xb9 + lsl r0, r0, #2 + ldr r1, [r4, #0x14] + ldr r2, [r4, #0x18] + add r0, r4, r0 + bl ov7_0224CC44 + mov r0, #6 + str r0, [r4, #0] + b _0224C32A +_0224C122: + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CC78 + cmp r0, #0 + bne _0224C1F8 + mov r2, #0x2b + lsl r2, r2, #4 + ldrh r2, [r4, r2] + ldr r0, [r4, #0x10] + ldr r1, _0224C2EC ; =0x0224F1B4 + ldr r3, [r4, #0x18] + bl ov7_0224CCB8 + cmp r0, #0 + bne _0224C17A + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #9 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb + str r0, [r4, #0] + mov r0, #3 + str r0, [r4, #4] + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CC6C + b _0224C32A +_0224C17A: + mov r2, #0x2b + lsl r2, r2, #4 + ldrh r2, [r4, r2] + ldr r0, [r4, #0xc] + ldr r1, _0224C2EC ; =0x0224F1B4 + bl ov7_0224CCE4 + cmp r0, #0 + bne _0224C1C2 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CC6C + mov r0, #0xb + str r0, [r4, #0] + mov r0, #3 + str r0, [r4, #4] + b _0224C32A +_0224C1C2: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #8 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CC6C + mov r0, #0xb + str r0, [r4, #0] + mov r0, #7 + str r0, [r4, #4] + b _0224C32A +_0224C1F8: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0224C202 + b _0224C32A +_0224C202: + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CC6C + mov r0, #3 + str r0, [r4, #0] + b _0224C32A +_0224C212: + ldr r0, [r4, #0x18] + mov r3, #0x2b + str r0, [sp] + lsl r3, r3, #4 + ldrh r3, [r4, r3] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + ldr r2, _0224C2EC ; =0x0224F1B4 + bl ov7_0224CCF4 + mov r0, #0x2b + lsl r0, r0, #4 + ldrh r0, [r4, r0] + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [sp] + add r0, r4, r1 + sub r1, #0xc + ldr r1, [r4, r1] + ldr r2, [r4, #0x18] + ldr r3, _0224C2EC ; =0x0224F1B4 + bl ov7_0224C580 + ldr r0, [r4, #0xc] + ldr r1, _0224C2EC ; =0x0224F1B4 + mov r2, #0x16 + bl ov7_0224CC88 + cmp r0, #0 + beq _0224C258 + mov r0, #0xb + str r0, [r4, #0] + mov r0, #8 + str r0, [r4, #4] + b _0224C32A +_0224C258: + mov r0, #0xb + str r0, [r4, #0] + mov r0, #3 + str r0, [r4, #4] + b _0224C32A +_0224C262: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xd + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb + str r0, [r4, #0] + mov r0, #9 + str r0, [r4, #4] + b _0224C32A +_0224C28E: + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #5 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r2, [r4, #0x18] + add r0, r4, r0 + add r1, r5, #0 + bl ov7_0224C468 + add r0, r5, #0 + bl sub_020237BC + mov r0, #0xb + str r0, [r4, #0] + mov r0, #0xc + str r0, [r4, #4] + b _0224C32A +_0224C2BA: + mov r0, #0x55 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224C4B8 + cmp r0, #0 + beq _0224C32A + ldr r0, [r4, #4] + str r0, [r4, #0] + b _0224C32A +_0224C2CE: + mov r0, #0x55 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224C4B8 + cmp r0, #0 + beq _0224C32A + ldr r0, _0224C2F8 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224C32A + ldr r0, [r4, #4] + str r0, [r4, #0] + b _0224C32A + ; .align 2, 0 +_0224C2EC: .word 0x0224F1B4 +_0224C2F0: .word ov7_0224CBE4 +_0224C2F4: .word 0x000005DC +_0224C2F8: .word 0x021BF67C +_0224C2FC: + mov r0, #0x55 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224C444 + mov r0, #0x5a + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224C698 + mov r0, #0x61 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224C934 + mov r0, #0xb9 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov7_0224CC6C + add sp, #0x14 + mov r0, #1 + pop {r4, r5, pc} +_0224C32A: + ldr r0, [r4, #0x1c] + bl sub_020219F8 + mov r0, #0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov7_0224BF2C + + thumb_func_start ov7_0224C338 +ov7_0224C338: ; 0x0224C338 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + bl sub_02025E44 + add r4, r0, #0 + bl sub_02027B50 + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r4, #0 + bl sub_02027AC0 + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r5, r1] + pop {r3, r4, r5, pc} + thumb_func_end ov7_0224C338 + + thumb_func_start ov7_0224C35C +ov7_0224C35C: ; 0x0224C35C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r4, #0x18] + mov r2, #1 + str r0, [sp, #4] + ldr r0, [r4, #0x14] + mov r3, #0xa + bl sub_0200DD0C + mov r1, #6 + ldr r2, [r4, #0x18] + mov r0, #0 + lsl r1, r1, #6 + bl sub_02002E98 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0x18] + mov r1, #3 + str r0, [sp, #4] + ldr r0, [r4, #0x14] + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r1, #0x1a + ldr r2, [r4, #0x18] + mov r0, #0 + lsl r1, r1, #4 + bl sub_02002E7C + ldr r0, [r4, #0x14] + mov r1, #3 + bl sub_02019EBC + add sp, #8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224C35C + + thumb_func_start ov7_0224C3B8 +ov7_0224C3B8: ; 0x0224C3B8 + push {r3, lr} + ldr r0, [r0, #0x14] + mov r1, #3 + bl sub_02019EBC + mov r0, #0 + mov r1, #1 + bl sub_0205D8CC + pop {r3, pc} + thumb_func_end ov7_0224C3B8 + + thumb_func_start ov7_0224C3CC +ov7_0224C3CC: ; 0x0224C3CC + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + ldr r2, [r4, #0x18] + mov r0, #2 + add r1, #0x20 + bl sub_020095C4 + str r0, [r4, #0x1c] + pop {r4, pc} + thumb_func_end ov7_0224C3CC + + thumb_func_start ov7_0224C3E0 +ov7_0224C3E0: ; 0x0224C3E0 + ldr r3, _0224C3E8 ; =sub_02021964 + ldr r0, [r0, #0x1c] + bx r3 + nop +_0224C3E8: .word sub_02021964 + thumb_func_end ov7_0224C3E0 + + thumb_func_start ov7_0224C3EC +ov7_0224C3EC: ; 0x0224C3EC + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #1 + beq _0224C43E + str r3, [r5, #8] + add r0, r2, #0 + mov r1, #1 + bl sub_0201A778 + str r0, [r5, #4] + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xc + str r0, [sp, #0xc] + mov r0, #0x28 + str r0, [sp, #0x10] + ldr r1, [r5, #4] + add r0, r4, #0 + mov r2, #3 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, [r5, #4] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r5, #4] + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r0, #1 + str r0, [r5, #0] +_0224C43E: + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov7_0224C3EC + + thumb_func_start ov7_0224C444 +ov7_0224C444: ; 0x0224C444 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0224C466 + ldr r0, [r4, #4] + bl sub_0201ACF4 + ldr r0, [r4, #4] + bl sub_0201A8FC + ldr r0, [r4, #4] + mov r1, #1 + bl sub_0201A928 + mov r0, #0 + str r0, [r4, #0] +_0224C466: + pop {r4, pc} + thumb_func_end ov7_0224C444 + + thumb_func_start ov7_0224C468 +ov7_0224C468: ; 0x0224C468 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, [r5, #0x10] + add r4, r1, #0 + add r6, r2, #0 + cmp r0, #0 + beq _0224C47C + bl sub_02022974 +_0224C47C: + ldr r0, [r5, #4] + mov r1, #0xf + bl sub_0201ADA4 + add r0, r4, #0 + add r1, r6, #0 + bl sub_02023868 + str r0, [r5, #0x10] + mov r3, #0 + str r3, [sp] + ldr r0, [r5, #8] + mov r1, #1 + str r0, [sp, #4] + ldr r0, _0224C4B4 ; =0x0001020F + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r5, #0x10] + bl sub_0201D78C + str r0, [r5, #0xc] + ldr r0, [r5, #4] + bl sub_0201A954 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0224C4B4: .word 0x0001020F + thumb_func_end ov7_0224C468 + + thumb_func_start ov7_0224C4B8 +ov7_0224C4B8: ; 0x0224C4B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0224C4DC + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _0224C4D8 + bl sub_020237BC + mov r0, #0 + str r0, [r4, #0x10] +_0224C4D8: + mov r0, #1 + pop {r4, pc} +_0224C4DC: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov7_0224C4B8 + + thumb_func_start ov7_0224C4E0 +ov7_0224C4E0: ; 0x0224C4E0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #8] + str r2, [sp, #0xc] + add r0, r2, #0 + add r4, r1, #0 + add r5, r3, #0 + bl sub_0200B358 + add r6, r0, #0 + ldr r1, [sp, #0xc] + mov r0, #0xc8 + bl sub_02023790 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #7 + bl sub_0200B1EC + ldr r1, [sp, #0x30] + str r0, [sp, #0x14] + add r7, r5, #0 + mov r0, #0xc + add r4, r1, #0 + mul r4, r0 + add r7, #8 + ldr r0, [r7, r4] + cmp r0, #1 + bne _0224C52A + add r2, r5, r4 + ldr r2, [r2, #4] + add r0, r6, #0 + mov r1, #0 + add r2, #0x95 + bl sub_0200B70C + b _0224C538 +_0224C52A: + add r2, r5, r4 + ldr r2, [r2, #4] + add r0, r6, #0 + mov r1, #0 + add r2, #0x95 + bl sub_0200B77C +_0224C538: + mov r0, #0 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r2, [r7, r4] + add r0, r6, #0 + mov r3, #3 + bl sub_0200B60C + ldr r2, [r5, r4] + add r0, r6, #0 + mov r1, #2 + bl sub_0200BFAC + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + add r0, r6, #0 + bl sub_0200C388 + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl ov7_0224C468 + add r0, r6, #0 + bl sub_0200B3F0 + ldr r0, [sp, #0x10] + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov7_0224C4E0 + + thumb_func_start ov7_0224C580 +ov7_0224C580: ; 0x0224C580 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #8] + str r2, [sp, #0xc] + add r0, r2, #0 + add r4, r1, #0 + add r5, r3, #0 + bl sub_0200B358 + add r6, r0, #0 + ldr r1, [sp, #0xc] + mov r0, #0xc8 + bl sub_02023790 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #0xc + bl sub_0200B1EC + ldr r1, [sp, #0x30] + str r0, [sp, #0x14] + add r7, r5, #0 + mov r0, #0xc + add r4, r1, #0 + mul r4, r0 + add r7, #8 + ldr r0, [r7, r4] + cmp r0, #1 + bne _0224C5CA + add r2, r5, r4 + ldr r2, [r2, #4] + add r0, r6, #0 + mov r1, #0 + add r2, #0x95 + bl sub_0200B70C + b _0224C5D8 +_0224C5CA: + add r2, r5, r4 + ldr r2, [r2, #4] + add r0, r6, #0 + mov r1, #0 + add r2, #0x95 + bl sub_0200B77C +_0224C5D8: + mov r0, #0 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r2, [r7, r4] + add r0, r6, #0 + mov r3, #3 + bl sub_0200B60C + ldr r2, [r5, r4] + add r0, r6, #0 + mov r1, #2 + bl sub_0200BFAC + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x14] + add r0, r6, #0 + bl sub_0200C388 + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + ldr r2, [sp, #0xc] + bl ov7_0224C468 + add r0, r6, #0 + bl sub_0200B3F0 + ldr r0, [sp, #0x10] + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov7_0224C580 + + thumb_func_start ov7_0224C620 +ov7_0224C620: ; 0x0224C620 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + ldr r0, [r6, #0] + add r4, r1, #0 + add r7, r2, #0 + str r3, [sp, #0x14] + cmp r0, #1 + beq _0224C692 + add r0, r3, #0 + mov r1, #1 + bl sub_0201A778 + str r0, [r6, #4] + mov r0, #0xb + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x94 + str r0, [sp, #0x10] + ldr r1, [r6, #4] + add r0, r4, #0 + mov r2, #3 + mov r3, #1 + bl sub_0201A7E8 + ldr r0, [sp, #0x14] + bl sub_0200B358 + str r0, [r6, #8] + mov r4, #0 + add r5, r6, #0 +_0224C668: + add r1, r4, #0 + add r0, r7, #0 + add r1, #0x10 + bl sub_0200B1EC + str r0, [r5, #0x10] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _0224C668 + ldr r1, [sp, #0x14] + mov r0, #0x20 + bl sub_02023790 + str r0, [r6, #0xc] + ldr r0, [r6, #4] + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #1 + str r0, [r6, #0] +_0224C692: + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov7_0224C620 + + thumb_func_start ov7_0224C698 +ov7_0224C698: ; 0x0224C698 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + cmp r0, #0 + beq _0224C6D8 + mov r4, #0 + add r5, r6, #0 +_0224C6A6: + ldr r0, [r5, #0x10] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #3 + blt _0224C6A6 + ldr r0, [r6, #0xc] + bl sub_020237BC + ldr r0, [r6, #8] + bl sub_0200B3F0 + ldr r0, [r6, #4] + bl sub_0201ACF4 + ldr r0, [r6, #4] + bl sub_0201A8FC + ldr r0, [r6, #4] + mov r1, #1 + bl sub_0201A928 + mov r0, #0 + str r0, [r6, #0] +_0224C6D8: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov7_0224C698 + + thumb_func_start ov7_0224C6DC +ov7_0224C6DC: ; 0x0224C6DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + add r5, r0, #0 + ldr r0, [r5, #8] + add r6, #0x95 + add r4, r2, #0 + mov r1, #0 + add r2, r6, #0 + add r7, r3, #0 + bl sub_0200B70C + mov r1, #1 + str r1, [sp] + str r1, [sp, #4] + ldr r0, [r5, #8] + add r2, r4, #0 + mov r3, #3 + bl sub_0200B60C + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [r5, #8] + mov r1, #2 + add r2, r7, #0 + mov r3, #3 + bl sub_0200B60C + ldr r0, [r5, #4] + mov r1, #0xf + bl sub_0201ADA4 + mov r7, #0 + add r6, r5, #0 + add r4, r7, #0 +_0224C724: + ldr r0, [r5, #8] + ldr r1, [r5, #0xc] + ldr r2, [r6, #0x10] + bl sub_0200C388 + mov r1, #0 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0224C764 ; =0x0001020F + add r3, r1, #0 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, [r5, #4] + ldr r2, [r5, #0xc] + bl sub_0201D78C + add r7, r7, #1 + add r6, r6, #4 + add r4, #0x10 + cmp r7, #3 + blt _0224C724 + ldr r0, [r5, #4] + mov r1, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224C764: .word 0x0001020F + thumb_func_end ov7_0224C6DC + + thumb_func_start ov7_0224C768 +ov7_0224C768: ; 0x0224C768 + push {r4, r5, r6, r7, lr} + sub sp, #0x64 + add r5, r0, #0 + ldr r0, [sp, #0x78] + add r4, r1, #0 + str r0, [sp, #0x78] + ldr r0, [r5, #0] + str r2, [sp, #0x14] + str r3, [sp, #0x18] + cmp r0, #1 + bne _0224C780 + b _0224C924 +_0224C780: + ldr r0, [sp, #0x78] + mov r1, #1 + mov r2, #0x12 + str r1, [r5, #0] + add r0, r0, #1 + lsl r2, r2, #4 + str r0, [r5, r2] + add r0, r2, #0 + ldr r3, [sp, #0x80] + add r0, #0x10 + str r3, [r5, r0] + ldr r0, [sp, #0x84] + add r2, #0x14 + str r0, [r5, r2] + ldr r0, [sp, #0x14] + bl sub_0201A778 + str r0, [r5, #4] + mov r0, #1 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xe8 + str r0, [sp, #0x10] + ldr r1, [r5, #4] + add r0, r4, #0 + mov r2, #3 + mov r3, #0x11 + bl sub_0201A7E8 + ldr r0, [sp, #0x14] + bl sub_0200B358 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r1, [sp, #0x14] + mov r0, #0x20 + bl sub_02023790 + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, [sp, #0x7c] + mov r1, #0x10 + bl sub_0200B1EC + str r0, [sp, #0x1c] + ldr r0, [sp, #0x78] + mov r7, #0 + cmp r0, #0 + bls _0224C844 + add r6, r5, #0 + add r4, r5, #0 +_0224C7F4: + mov r0, #0x49 + ldr r2, [sp, #0x18] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200BFAC + mov r0, #0x49 + mov r1, #0x4a + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + ldr r2, [sp, #0x1c] + bl sub_0200C388 + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp, #0x14] + bl sub_02023868 + add r1, r6, #0 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r6, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r6, r6, #4 + str r0, [r4, #0xc] + str r7, [r4, #0x10] + ldr r0, [sp, #0x18] + add r7, r7, #1 + add r0, #0xc + str r0, [sp, #0x18] + ldr r0, [sp, #0x78] + add r4, #8 + cmp r7, r0 + blo _0224C7F4 +_0224C844: + ldr r0, [sp, #0x78] + add r4, r5, #0 + lsl r6, r0, #2 + ldr r0, [sp, #0x7c] + add r4, #0xc4 + mov r1, #0x13 + bl sub_0200B1EC + str r0, [r4, r6] + ldr r0, [sp, #0x78] + lsl r1, r0, #3 + ldr r0, [r4, r6] + add r1, r5, r1 + str r0, [r1, #0xc] + ldr r0, [sp, #0x78] + str r0, [r1, #0x10] + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200B3F0 + mov r0, #0x4a + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r3, [sp, #0x14] + ldr r0, [r5, #4] + ldr r1, _0224C928 ; =0x0224F4F0 + lsl r3, r3, #0x18 + str r0, [r1, #0xc] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r5, r0] + lsr r3, r3, #0x18 + strh r0, [r1, #0x10] + add r0, r5, #0 + add r0, #0xc + str r0, [r1, #0] + mov r1, #0 + ldr r0, _0224C92C ; =0x0224F4F0 + add r2, r1, #0 + bl sub_0200112C + str r0, [r5, #8] + ldr r0, [r5, #4] + mov r1, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + mov r7, #0x4e + mov r4, #0 + add r6, r5, #0 + lsl r7, r7, #2 +_0224C8B8: + ldr r2, [sp, #0x14] + mov r0, #1 + add r1, r4, #0 + bl sub_02009714 + str r0, [r6, r7] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #4 + blt _0224C8B8 + ldr r2, [sp, #0x14] + add r0, sp, #0x40 + add r1, r5, #0 + bl ov7_0224CA54 + ldr r0, [sp, #0x88] + mov r6, #0 + str r0, [sp, #0x20] + add r0, sp, #0x40 + str r0, [sp, #0x24] + mov r0, #1 + str r0, [sp, #0x38] + ldr r0, [sp, #0x14] + mov r7, #0x56 + str r0, [sp, #0x3c] + mov r0, #3 + lsl r0, r0, #0x12 + ldr r4, _0224C930 ; =0x0224F1A8 + str r6, [sp, #0x34] + str r0, [sp, #0x28] + lsl r7, r7, #2 +_0224C8F6: + ldrb r0, [r4] + lsl r0, r0, #0xc + str r0, [sp, #0x2c] + add r0, sp, #0x20 + bl sub_02021B90 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_02021D6C + ldr r0, [r5, r7] + mov r1, #1 + bl sub_02021CC8 + add r6, r6, #1 + add r4, r4, #1 + add r5, r5, #4 + cmp r6, #2 + blt _0224C8F6 +_0224C924: + add sp, #0x64 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224C928: .word 0x0224F4F0 +_0224C92C: .word 0x0224F4F0 +_0224C930: .word 0x0224F1A8 + thumb_func_end ov7_0224C768 + + thumb_func_start ov7_0224C934 +ov7_0224C934: ; 0x0224C934 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, [r6, #0] + cmp r0, #0 + beq _0224C9A2 + mov r7, #0x56 + mov r4, #0 + add r5, r6, #0 + lsl r7, r7, #2 +_0224C946: + ldr r0, [r5, r7] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0224C946 + add r0, r6, #0 + bl ov7_0224CB40 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r6, r0] + mov r5, #0 + cmp r0, #0 + ble _0224C980 + mov r7, #0x12 + add r4, r6, #0 + lsl r7, r7, #4 +_0224C96C: + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl sub_020237BC + ldr r0, [r6, r7] + add r5, r5, #1 + add r4, r4, #4 + cmp r5, r0 + blt _0224C96C +_0224C980: + mov r1, #0 + ldr r0, [r6, #8] + add r2, r1, #0 + bl sub_02001384 + ldr r0, [r6, #4] + bl sub_0201ACF4 + ldr r0, [r6, #4] + bl sub_0201A8FC + ldr r0, [r6, #4] + mov r1, #1 + bl sub_0201A928 + mov r0, #1 + str r0, [r6, #0] +_0224C9A2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov7_0224C934 + + thumb_func_start ov7_0224C9A4 +ov7_0224C9A4: ; 0x0224C9A4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #8] + bl sub_02001288 + mov r1, #0 + add r4, r0, #0 + mvn r1, r1 + cmp r4, r1 + bne _0224C9EA + ldr r0, [r5, #8] + add r1, sp, #0 + bl sub_020014D0 + mov r2, #0x4b + add r0, sp, #0 + lsl r2, r2, #2 + ldrh r1, [r0] + ldrh r0, [r5, r2] + cmp r0, r1 + beq _0224CA02 + strh r1, [r5, r2] + add r0, r2, #4 + ldrh r1, [r5, r2] + add r2, #8 + ldr r0, [r5, r0] + ldr r2, [r5, r2] + blx r2 + ldr r0, _0224CA08 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov7_0224CB70 + b _0224CA02 +_0224C9EA: + sub r0, r1, #1 + cmp r4, r0 + beq _0224CA02 + mov r0, #0x4b + lsl r0, r0, #2 + ldrh r2, [r5, r0] + sub r0, #0xc + ldr r0, [r5, r0] + sub r0, r0, #1 + cmp r2, r0 + bne _0224CA02 + sub r4, r1, #1 +_0224CA02: + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_0224CA08: .word 0x000005DC + thumb_func_end ov7_0224C9A4 + + thumb_func_start ov7_0224CA0C +ov7_0224CA0C: ; 0x0224CA0C + push {r4, lr} + mov r2, #0x13 + lsl r2, r2, #4 + add r4, r0, #0 + sub r1, r2, #4 + ldr r0, [r4, r2] + add r2, r2, #4 + ldrh r1, [r4, r1] + ldr r2, [r4, r2] + blx r2 + ldr r0, [r4, #4] + mov r1, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + add r0, r4, #0 + bl ov7_0224CB70 + pop {r4, pc} + thumb_func_end ov7_0224CA0C + + thumb_func_start ov7_0224CA34 +ov7_0224CA34: ; 0x0224CA34 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x57 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224CA34 + + thumb_func_start ov7_0224CA54 +ov7_0224CA54: ; 0x0224CA54 + push {r4, r5, r6, r7, lr} + sub sp, #0x2c + add r4, r2, #0 + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0x3e + add r1, r4, #0 + bl sub_02006C24 + ldr r1, _0224CB3C ; =0x00001388 + add r6, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + lsr r0, r1, #4 + str r4, [sp, #8] + ldr r0, [r5, r0] + add r1, r6, #0 + mov r2, #4 + mov r3, #0 + bl sub_02009A4C + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, _0224CB3C ; =0x00001388 + sub r1, #0xc + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #0xa + mov r3, #0 + bl sub_02009B04 + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r5, r1] + ldr r0, _0224CB3C ; =0x00001388 + sub r1, #0xc + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + str r4, [sp, #8] + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #5 + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r5, r1] + ldr r0, _0224CB3C ; =0x00001388 + sub r1, #0xc + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + str r4, [sp, #8] + ldr r0, [r5, r1] + add r1, r6, #0 + mov r2, #6 + mov r3, #0 + bl sub_02009BC4 + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r6, #0 + bl sub_02006CA8 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A3DC + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A640 + ldr r1, _0224CB3C ; =0x00001388 + mov r0, #0 + mov r3, #0x4f + str r1, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsr r2, r1, #4 + ldr r2, [r5, r2] + lsl r3, r3, #2 + str r2, [sp, #0x14] + ldr r2, [r5, r3] + str r2, [sp, #0x18] + add r2, r3, #4 + ldr r2, [r5, r2] + add r3, #8 + str r2, [sp, #0x1c] + ldr r2, [r5, r3] + add r3, r1, #0 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r7, #0 + add r2, r1, #0 + bl sub_020093B4 + add sp, #0x2c + pop {r4, r5, r6, r7, pc} + nop +_0224CB3C: .word 0x00001388 + thumb_func_end ov7_0224CA54 + + thumb_func_start ov7_0224CB40 +ov7_0224CB40: ; 0x0224CB40 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0x52 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A4E4 + mov r0, #0x53 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_0200A6DC + mov r6, #0x4e + mov r4, #0 + lsl r6, r6, #2 +_0224CB5E: + ldr r0, [r5, r6] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0224CB5E + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov7_0224CB40 + + thumb_func_start ov7_0224CB70 +ov7_0224CB70: ; 0x0224CB70 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #8] + add r1, sp, #0 + mov r2, #0 + bl sub_020014DC + add r0, sp, #0 + ldrh r0, [r0] + cmp r0, #0 + bne _0224CB96 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + b _0224CBA2 +_0224CB96: + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC +_0224CBA2: + add r0, sp, #0 + ldrh r2, [r0] + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + sub r1, r1, #7 + cmp r2, r1 + blt _0224CBC0 + add r0, #0x3c + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + add sp, #4 + pop {r3, r4, pc} +_0224CBC0: + add r0, #0x3c + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov7_0224CB70 + + thumb_func_start ov7_0224CBD0 +ov7_0224CBD0: ; 0x0224CBD0 + push {r3, r4} + ldr r4, [sp, #0xc] + str r4, [r0, #4] + str r1, [r0, #8] + str r2, [r0, #0xc] + ldr r1, [sp, #8] + str r3, [r0, #0x10] + str r1, [r0, #0] + pop {r3, r4} + bx lr + thumb_func_end ov7_0224CBD0 + + thumb_func_start ov7_0224CBE4 +ov7_0224CBE4: ; 0x0224CBE4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + cmp r1, #0x16 + bhs _0224CC1C + add r4, r1, #0 + mov r0, #0xc + mul r4, r0 + ldr r1, [r5, #0xc] + ldr r0, [r5, #0x10] + add r1, r1, r4 + ldr r1, [r1, #4] + ldr r2, [r5, #0] + add r1, #0x95 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0207D730 + ldr r1, [r5, #0xc] + add r3, r0, #0 + add r2, r1, r4 + ldr r1, [r2, #4] + ldr r0, [r5, #8] + ldr r2, [r2, #8] + bl ov7_0224C6DC + add sp, #0x10 + pop {r3, r4, r5, pc} +_0224CC1C: + mov r0, #0xa + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0x11 + str r0, [sp, #0xc] + mov r2, #0 + ldr r0, [r5, #4] + mov r1, #3 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r5, #4] + mov r1, #3 + bl sub_02019448 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov7_0224CBE4 + + thumb_func_start ov7_0224CC44 +ov7_0224CC44: ; 0x0224CC44 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r2, #0 + cmp r0, #1 + beq _0224CC66 + add r0, r1, #0 + ldr r1, _0224CC68 ; =0x0224F1AC + mov r2, #0x1f + mov r3, #0xb + str r4, [sp] + bl sub_02002100 + str r0, [r5, #4] + str r4, [r5, #8] + mov r0, #1 + str r0, [r5, #0] +_0224CC66: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224CC68: .word 0x0224F1AC + thumb_func_end ov7_0224CC44 + + thumb_func_start ov7_0224CC6C +ov7_0224CC6C: ; 0x0224CC6C + ldr r1, [r0, #0] + cmp r1, #0 + beq _0224CC76 + mov r1, #0 + str r1, [r0, #0] +_0224CC76: + bx lr + thumb_func_end ov7_0224CC6C + + thumb_func_start ov7_0224CC78 +ov7_0224CC78: ; 0x0224CC78 + ldr r3, _0224CC84 ; =sub_02002114 + add r1, r0, #0 + ldr r0, [r1, #4] + ldr r1, [r1, #8] + bx r3 + nop +_0224CC84: .word sub_02002114 + thumb_func_end ov7_0224CC78 + + thumb_func_start ov7_0224CC88 +ov7_0224CC88: ; 0x0224CC88 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + add r6, r2, #0 + ldr r4, _0224CCB4 ; =0x00000000 + beq _0224CCAE +_0224CC94: + ldr r1, [r5, #0] + add r0, r7, #0 + mov r2, #1 + bl sub_02029D50 + cmp r0, #1 + bne _0224CCA6 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0224CCA6: + add r4, r4, #1 + add r5, #0xc + cmp r4, r6 + blo _0224CC94 +_0224CCAE: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224CCB4: .word 0x00000000 + thumb_func_end ov7_0224CC88 + + thumb_func_start ov7_0224CCB8 +ov7_0224CCB8: ; 0x0224CCB8 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r2, #0 + mov r1, #0xc + mul r4, r1 + add r1, r5, r4 + ldr r1, [r1, #4] + add r2, r3, #0 + add r1, #0x95 + lsl r1, r1, #0x10 + lsr r1, r1, #0x10 + bl sub_0207D730 + add r1, r5, r4 + ldr r1, [r1, #8] + cmp r0, r1 + blo _0224CCDE + mov r0, #1 + pop {r3, r4, r5, pc} +_0224CCDE: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov7_0224CCB8 + + thumb_func_start ov7_0224CCE4 +ov7_0224CCE4: ; 0x0224CCE4 + mov r3, #0xc + mul r3, r2 + ldr r1, [r1, r3] + ldr r3, _0224CCF0 ; =sub_02029D50 + mov r2, #1 + bx r3 + ; .align 2, 0 +_0224CCF0: .word sub_02029D50 + thumb_func_end ov7_0224CCE4 + + thumb_func_start ov7_0224CCF4 +ov7_0224CCF4: ; 0x0224CCF4 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0xc + mul r1, r3 + add r3, r2, r1 + ldr r4, [r3, #4] + ldr r1, [r2, r1] + ldr r5, [r3, #8] + add r4, #0x95 + mov r2, #1 + bl sub_02029E2C + lsl r1, r4, #0x10 + lsl r2, r5, #0x10 + ldr r3, [sp, #0x10] + add r0, r6, #0 + lsr r1, r1, #0x10 + lsr r2, r2, #0x10 + bl sub_0207D60C + cmp r0, #1 + beq _0224CD24 + bl sub_02022974 +_0224CD24: + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov7_0224CCF4 + + .rodata + + + .global Unk_ov7_0224F1A8 +Unk_ov7_0224F1A8: ; 0x0224F1A8 + .incbin "incbin/overlay7_rodata.bin", 0x49C, 0x4A0 - 0x49C + + .global Unk_ov7_0224F1AC +Unk_ov7_0224F1AC: ; 0x0224F1AC + .incbin "incbin/overlay7_rodata.bin", 0x4A0, 0x4A8 - 0x4A0 + + .global Unk_ov7_0224F1B4 +Unk_ov7_0224F1B4: ; 0x0224F1B4 + .incbin "incbin/overlay7_rodata.bin", 0x4A8, 0x108 + + + .data + + + .global Unk_ov7_0224F4F0 +Unk_ov7_0224F4F0: ; 0x0224F4F0 + .incbin "incbin/overlay7_data.bin", 0x30, 0x20 + diff --git a/asm/ov7_0224CD28.s b/asm/ov7_0224CD28.s new file mode 100644 index 000000000..e25de4984 --- /dev/null +++ b/asm/ov7_0224CD28.s @@ -0,0 +1,4019 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov7_0224CD28 +ov7_0224CD28: ; 0x0224CD28 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + mov r1, #1 + add r5, r0, #0 + ldr r2, _0224CD84 ; =0x0000FFFF + mov r0, #0 + lsl r1, r1, #8 +_0224CD36: + lsl r3, r0, #1 + ldrh r3, [r4, r3] + cmp r3, r2 + beq _0224CD48 + add r0, r0, #1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, r1 + blo _0224CD36 +_0224CD48: + mov r1, #0x23 + lsl r1, r1, #4 + strb r0, [r5, r1] + ldrb r1, [r5, r1] + mov r0, #0xb + lsl r1, r1, #1 + bl sub_02018144 + mov r1, #0x8b + lsl r1, r1, #2 + str r0, [r5, r1] + add r1, r1, #4 + ldrb r1, [r5, r1] + mov r0, #0 + cmp r1, #0 + ble _0224CD82 + mov r1, #0x8b + lsl r1, r1, #2 + add r2, r1, #4 +_0224CD6E: + lsl r7, r0, #1 + ldrh r6, [r4, r7] + ldr r3, [r5, r1] + add r0, r0, #1 + strh r6, [r3, r7] + lsl r0, r0, #0x10 + ldrb r3, [r5, r2] + lsr r0, r0, #0x10 + cmp r0, r3 + blt _0224CD6E +_0224CD82: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224CD84: .word 0x0000FFFF + thumb_func_end ov7_0224CD28 + + thumb_func_start ov7_0224CD88 +ov7_0224CD88: ; 0x0224CD88 + push {r4, lr} + mov r1, #0x95 + mov r0, #0xb + lsl r1, r1, #2 + bl sub_02018144 + mov r2, #0x95 + mov r1, #0 + lsl r2, r2, #2 + add r4, r0, #0 + bl sub_020D5124 + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov7_0224CD88 + + thumb_func_start ov7_0224CDA4 +ov7_0224CDA4: ; 0x0224CDA4 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + add r7, r0, #0 + str r2, [sp] + add r6, r3, #0 + bl ov7_0224CD88 + add r4, r0, #0 + ldr r0, [r5, #8] + mov r1, #0xb + str r0, [r4, #0] + mov r0, #0x60 + bl sub_02023790 + mov r1, #0x8d + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #0xc] + bl sub_02025E38 + mov r1, #0x83 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #0xc] + bl sub_02025E44 + mov r1, #0x85 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #0xc] + bl sub_0202CD88 + mov r1, #0x87 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r5, #0xc] + bl sub_020507E4 + mov r1, #0x89 + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r2, [sp, #0x18] + add r0, r1, #4 + str r2, [r4, r0] + add r0, r5, #0 + bl ov7_0224CE90 + ldr r1, _0224CE88 ; =0x00000242 + mov r3, #0xb + strb r0, [r4, r1] + add r0, r5, #0 + add r0, #0x9c + ldr r2, [r0, #0] + add r0, r1, #0 + sub r0, #0x2a + str r2, [r4, r0] + add r0, r1, #3 + strb r6, [r4, r0] + ldr r0, [r5, #0xc] + sub r1, #0x22 + str r0, [r4, r1] + mov r0, #1 + mov r1, #2 + mov r2, #0 + bl sub_0200C440 + mov r1, #0x25 + lsl r1, r1, #4 + str r0, [r4, r1] + sub r1, #0xb + ldrb r0, [r4, r1] + cmp r0, #0 + bne _0224CE44 + ldr r0, [r5, #0xc] + bl sub_0207D990 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r4, r1] + b _0224CE72 +_0224CE44: + cmp r0, #3 + bne _0224CE56 + ldr r0, [r5, #0xc] + bl sub_0207D990 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r4, r1] + b _0224CE72 +_0224CE56: + cmp r0, #1 + ldr r0, [r5, #0xc] + bne _0224CE68 + bl sub_020298B0 + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r4, r1] + b _0224CE72 +_0224CE68: + bl sub_0202CA1C + mov r1, #0x21 + lsl r1, r1, #4 + str r0, [r4, r1] +_0224CE72: + ldr r1, [sp] + add r0, r4, #0 + bl ov7_0224CD28 + ldr r1, _0224CE8C ; =ov7_0224CEAC + add r0, r7, #0 + add r2, r4, #0 + bl sub_02050944 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224CE88: .word 0x00000242 +_0224CE8C: .word ov7_0224CEAC + thumb_func_end ov7_0224CDA4 + + thumb_func_start ov7_0224CE90 +ov7_0224CE90: ; 0x0224CE90 + push {r3, lr} + ldr r0, [r0, #0x3c] + bl sub_0205EA78 + cmp r0, #0 + beq _0224CEA4 + cmp r0, #1 + beq _0224CEA4 + cmp r0, #3 + bne _0224CEA8 +_0224CEA4: + mov r0, #0xa + pop {r3, pc} +_0224CEA8: + mov r0, #8 + pop {r3, pc} + thumb_func_end ov7_0224CE90 + + thumb_func_start ov7_0224CEAC +ov7_0224CEAC: ; 0x0224CEAC + push {r4, r5, r6, lr} + add r6, r0, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + ldr r1, _0224D004 ; =0x00000233 + add r4, r0, #0 + ldrb r1, [r4, r1] + cmp r1, #0x14 + bls _0224CEC8 + b _0224CFD0 +_0224CEC8: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224CED4: ; jump table + .short _0224CEFE - _0224CED4 - 2 ; case 0 + .short _0224CF0A - _0224CED4 - 2 ; case 1 + .short _0224CF14 - _0224CED4 - 2 ; case 2 + .short _0224CF24 - _0224CED4 - 2 ; case 3 + .short _0224CF2E - _0224CED4 - 2 ; case 4 + .short _0224CF38 - _0224CED4 - 2 ; case 5 + .short _0224CF42 - _0224CED4 - 2 ; case 6 + .short _0224CF4C - _0224CED4 - 2 ; case 7 + .short _0224CF56 - _0224CED4 - 2 ; case 8 + .short _0224CF60 - _0224CED4 - 2 ; case 9 + .short _0224CF6A - _0224CED4 - 2 ; case 10 + .short _0224CF74 - _0224CED4 - 2 ; case 11 + .short _0224CF7E - _0224CED4 - 2 ; case 12 + .short _0224CF8C - _0224CED4 - 2 ; case 13 + .short _0224CF96 - _0224CED4 - 2 ; case 14 + .short _0224CFA0 - _0224CED4 - 2 ; case 15 + .short _0224CFD0 - _0224CED4 - 2 ; case 16 + .short _0224CFD0 - _0224CED4 - 2 ; case 17 + .short _0224CFA8 - _0224CED4 - 2 ; case 18 + .short _0224CFB6 - _0224CED4 - 2 ; case 19 + .short _0224CFC6 - _0224CED4 - 2 ; case 20 +_0224CEFE: + bl ov7_0224D008 + ldr r0, _0224D004 ; =0x00000233 + mov r1, #1 + strb r1, [r4, r0] + b _0224CFD0 +_0224CF0A: + bl ov7_0224D1EC + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF14: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224D388 + ldr r0, _0224D004 ; =0x00000233 + mov r1, #3 + strb r1, [r4, r0] + b _0224CFD0 +_0224CF24: + bl ov7_0224D620 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF2E: + bl ov7_0224DC84 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF38: + bl ov7_0224DE94 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF42: + bl ov7_0224DFB0 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF4C: + bl ov7_0224E3A0 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF56: + bl ov7_0224E3D8 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF60: + bl ov7_0224E5B0 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF6A: + bl ov7_0224E6B8 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF74: + bl ov7_0224E7C8 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF7E: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224E950 + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF8C: + bl ov7_0224EA2C + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CF96: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224EC20 + b _0224CFD0 +_0224CFA0: + add r0, r6, #0 + bl ov7_0224EC38 + b _0224CFD0 +_0224CFA8: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224EC9C + ldr r1, _0224D004 ; =0x00000233 + strb r0, [r4, r1] + b _0224CFD0 +_0224CFB6: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224EA54 + ldr r0, _0224D004 ; =0x00000233 + mov r1, #0x14 + strb r1, [r4, r0] + b _0224CFD0 +_0224CFC6: + add r0, r5, #0 + add r1, r4, #0 + bl ov7_0224D250 + pop {r4, r5, r6, pc} +_0224CFD0: + ldr r0, _0224D004 ; =0x00000233 + ldrb r1, [r4, r0] + cmp r1, #4 + blo _0224CFFE + cmp r1, #0xb + bhi _0224CFFE + sub r0, #0x3b + mov r1, #1 + ldr r0, [r4, r0] + lsl r1, r1, #0xc + bl sub_02021E2C + mov r0, #0x7f + lsl r0, r0, #2 + mov r1, #1 + ldr r0, [r4, r0] + lsl r1, r1, #0xc + bl sub_02021E2C + add r4, #0x94 + ldr r0, [r4, #0] + bl sub_020219F8 +_0224CFFE: + mov r0, #0 + pop {r4, r5, r6, pc} + nop +_0224D004: .word 0x00000233 + thumb_func_end ov7_0224CEAC + + thumb_func_start ov7_0224D008 +ov7_0224D008: ; 0x0224D008 + push {r4, lr} + add r4, r0, #0 + bl ov7_0224D018 + add r0, r4, #0 + bl ov7_0224D040 + pop {r4, pc} + thumb_func_end ov7_0224D008 + + thumb_func_start ov7_0224D018 +ov7_0224D018: ; 0x0224D018 + push {r4, lr} + ldr r2, _0224D03C ; =0x0000021F + add r4, r0, #0 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xb + bl sub_0200B144 + add r1, r4, #0 + add r1, #0x88 + str r0, [r1, #0] + mov r0, #0xb + bl sub_0200B358 + add r4, #0x8c + str r0, [r4, #0] + pop {r4, pc} + nop +_0224D03C: .word 0x0000021F + thumb_func_end ov7_0224D018 + + thumb_func_start ov7_0224D040 +ov7_0224D040: ; 0x0224D040 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, _0224D1E0 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #0 + bne _0224D0BC + mov r4, #3 + add r0, r4, #0 + mov r1, #0xb + bl sub_02013A04 + add r1, r5, #0 + add r1, #0x84 + str r0, [r1, #0] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0xf + mov r3, #2 + bl sub_02013A4C + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x10 + mov r3, #0xe + bl sub_02013A4C + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + mov r2, #0x11 + add r3, r2, #0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + sub r3, #0x13 + bl sub_02013A4C + mov r3, #1 + str r3, [sp] + mov r1, #0xd + str r1, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, _0224D1E4 ; =0x000001E9 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, #8 + add r2, r4, #0 + bl sub_0201A7E8 + b _0224D174 +_0224D0BC: + cmp r0, #3 + bne _0224D11C + mov r4, #2 + add r0, r4, #0 + mov r1, #0xb + bl sub_02013A04 + add r1, r5, #0 + add r1, #0x84 + str r0, [r1, #0] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x1d + add r3, r4, #0 + bl sub_02013A4C + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + mov r2, #0x1e + add r3, r2, #0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + sub r3, #0x20 + bl sub_02013A4C + mov r1, #0xd + str r1, [sp] + mov r0, #7 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, _0224D1E4 ; =0x000001E9 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, #8 + mov r2, #3 + mov r3, #0x17 + bl sub_0201A7E8 + b _0224D174 +_0224D11C: + mov r4, #2 + add r0, r4, #0 + mov r1, #0xb + bl sub_02013A04 + add r1, r5, #0 + add r1, #0x84 + str r0, [r1, #0] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0xf + add r3, r4, #0 + bl sub_02013A4C + add r0, r5, #0 + add r1, r5, #0 + add r0, #0x84 + add r1, #0x88 + mov r2, #0x11 + add r3, r2, #0 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + sub r3, #0x13 + bl sub_02013A4C + mov r3, #1 + str r3, [sp] + mov r1, #0xd + str r1, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, _0224D1E4 ; =0x000001E9 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, #8 + mov r2, #3 + bl sub_0201A7E8 +_0224D174: + add r0, r5, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r2, sp, #0x14 + str r0, [sp, #0x14] + add r0, r5, #0 + add r0, #8 + str r0, [sp, #0x18] + mov r0, #0 + strb r0, [r2, #8] + mov r1, #1 + strb r1, [r2, #9] + strb r4, [r2, #0xa] + ldrb r3, [r2, #0xb] + mov r1, #0xf + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0x30 + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0xc0 + bic r3, r1 + strb r3, [r2, #0xb] + str r0, [sp] + mov r3, #0xb + str r3, [sp, #4] + ldr r0, [r5, #0] + ldr r2, _0224D1E8 ; =0x000003D9 + mov r1, #3 + bl sub_0200DAA4 + add r0, r5, #0 + ldr r2, _0224D1E8 ; =0x000003D9 + add r0, #8 + mov r1, #1 + mov r3, #0xb + bl sub_0200DC48 + mov r0, #0xb + str r0, [sp] + mov r0, #2 + mov r2, #0 + str r0, [sp, #4] + add r0, sp, #0x14 + mov r1, #8 + add r3, r2, #0 + bl sub_02001B7C + add r5, #0x80 + str r0, [r5, #0] + add sp, #0x20 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224D1E0: .word 0x00000245 +_0224D1E4: .word 0x000001E9 +_0224D1E8: .word 0x000003D9 + thumb_func_end ov7_0224D040 + + thumb_func_start ov7_0224D1EC +ov7_0224D1EC: ; 0x0224D1EC + push {r4, lr} + add r4, r0, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_02001BE0 + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0224D208 + add r1, r1, #1 + cmp r0, r1 + beq _0224D218 + b _0224D212 +_0224D208: + add r0, r4, #0 + bl ov7_0224D21C + mov r0, #0x13 + pop {r4, pc} +_0224D212: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + pop {r4, pc} +_0224D218: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov7_0224D1EC + + thumb_func_start ov7_0224D21C +ov7_0224D21C: ; 0x0224D21C + push {r4, lr} + add r4, r0, #0 + add r0, #8 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #8 + bl sub_0201ACF4 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_02001BC4 + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + bl sub_02013A3C + add r4, #8 + add r0, r4, #0 + bl sub_0201A8FC + pop {r4, pc} + thumb_func_end ov7_0224D21C + + thumb_func_start ov7_0224D250 +ov7_0224D250: ; 0x0224D250 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #9 + add r4, r1, #0 + lsl r0, r0, #6 + ldrb r0, [r4, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224D268 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224D268: + ldr r0, _0224D37C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + bne _0224D274 + b _0224D378 +_0224D274: + add r0, r4, #0 + add r0, #0x18 + mov r1, #0 + bl sub_0200E084 + add r0, r4, #0 + add r0, #0x18 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_0200B190 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + bl sub_0200B3F0 + mov r0, #0x8d + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _0224D380 ; =0x00000245 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0224D35A + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + bl sub_0203A138 + cmp r0, #0x65 + beq _0224D35A + ldr r0, [r5, #0x1c] + ldr r0, [r0, #0] + cmp r0, #0x51 + beq _0224D35A + ldr r1, _0224D384 ; =0x000001BE + cmp r0, r1 + beq _0224D35A + add r0, r1, #0 + add r0, #0x85 + ldrb r2, [r4, r0] + cmp r2, #0 + beq _0224D2EE + add r1, #0x86 + ldrb r0, [r4, r1] + cmp r0, #0 + beq _0224D2EE + mov r0, #0xb + bl sub_0202BD38 + add r1, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #1 + bl sub_0202B758 + b _0224D35A +_0224D2EE: + cmp r2, #1 + bls _0224D308 + mov r0, #0xb + bl sub_0202BD14 + add r1, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #1 + bl sub_0202B758 + b _0224D35A +_0224D308: + mov r0, #0x91 + lsl r0, r0, #2 + ldrb r0, [r4, r0] + cmp r0, #1 + bls _0224D328 + mov r0, #0xb + bl sub_0202BD2C + add r1, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #1 + bl sub_0202B758 + b _0224D35A +_0224D328: + cmp r2, #0 + beq _0224D342 + mov r0, #0xb + bl sub_0202BD08 + add r1, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #1 + bl sub_0202B758 + b _0224D35A +_0224D342: + cmp r0, #0 + beq _0224D35A + mov r0, #0xb + bl sub_0202BD20 + add r1, r0, #0 + mov r0, #0x86 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r2, #1 + bl sub_0202B758 +_0224D35A: + mov r0, #0x25 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200C560 + mov r0, #0x8b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #1 + pop {r3, r4, r5, pc} +_0224D378: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224D37C: .word 0x021BF67C +_0224D380: .word 0x00000245 +_0224D384: .word 0x000001BE + thumb_func_end ov7_0224D250 + + thumb_func_start ov7_0224D388 +ov7_0224D388: ; 0x0224D388 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x12 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #6 + mov r2, #0 + str r0, [sp, #8] + add r4, r1, #0 + str r2, [sp, #0xc] + ldr r0, [r4, #0] + mov r1, #3 + add r3, r2, #0 + bl sub_02019CB8 + add r0, r4, #0 + bl ov7_0224D21C + add r0, r4, #0 + bl ov7_0224D3E8 + mov r0, #0xb + bl sub_020203AC + add r1, r4, #0 + add r1, #0x90 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0x90 + ldr r0, [r5, #0x24] + ldr r1, [r1, #0] + bl sub_020203C0 + add r0, r4, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl sub_020203D4 + ldr r0, _0224D3E4 ; =0x00000241 + mov r1, #0 + strb r1, [r4, r0] + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0224D3E4: .word 0x00000241 + thumb_func_end ov7_0224D388 + + thumb_func_start ov7_0224D3E8 +ov7_0224D3E8: ; 0x0224D3E8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r5, #0 + ldr r7, _0224D43C ; =0x0224F328 + mov r6, #0 + add r4, #8 +_0224D3F4: + ldr r0, _0224D440 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _0224D410 + cmp r0, #3 + beq _0224D410 + cmp r6, #1 + bne _0224D410 + ldr r0, [r5, #0] + ldr r2, _0224D444 ; =0x0224F2BC + add r1, r4, #0 + bl sub_0201A8D4 + b _0224D42E +_0224D410: + cmp r0, #3 + bne _0224D424 + cmp r6, #2 + bne _0224D424 + ldr r0, [r5, #0] + ldr r2, _0224D448 ; =0x0224F2C4 + add r1, r4, #0 + bl sub_0201A8D4 + b _0224D42E +_0224D424: + ldr r0, [r5, #0] + add r1, r4, #0 + add r2, r7, #0 + bl sub_0201A8D4 +_0224D42E: + add r6, r6, #1 + add r4, #0x10 + add r7, #8 + cmp r6, #6 + blo _0224D3F4 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D43C: .word 0x0224F328 +_0224D440: .word 0x00000245 +_0224D444: .word 0x0224F2BC +_0224D448: .word 0x0224F2C4 + thumb_func_end ov7_0224D3E8 + + thumb_func_start ov7_0224D44C +ov7_0224D44C: ; 0x0224D44C + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x28 + mov r1, #1 + bl sub_0200DC9C + mov r4, #0 + add r5, #8 +_0224D45C: + add r0, r5, #0 + bl sub_0201ACF4 + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #6 + blo _0224D45C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov7_0224D44C + + thumb_func_start ov7_0224D474 +ov7_0224D474: ; 0x0224D474 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x3e + mov r1, #0xb + bl sub_02006C24 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r2, #0xb + str r2, [sp, #0xc] + ldr r2, [r5, #0] + mov r3, #1 + add r4, r0, #0 + bl sub_020070E8 + ldr r0, _0224D544 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _0224D4A4 + cmp r0, #3 + bne _0224D4BE +_0224D4A4: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r4, #0 + mov r1, #2 + mov r3, #1 + bl sub_0200710C + b _0224D4D6 +_0224D4BE: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r4, #0 + mov r1, #3 + mov r3, #1 + bl sub_0200710C +_0224D4D6: + ldr r0, _0224D544 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #3 + bne _0224D4F2 + mov r0, #0x20 + mov r2, #0 + str r0, [sp] + mov r1, #0xb + add r0, r4, #0 + add r3, r2, #0 + str r1, [sp, #4] + bl sub_02007130 + b _0224D506 +_0224D4F2: + mov r0, #0x20 + str r0, [sp] + mov r0, #0xb + mov r2, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #1 + add r3, r2, #0 + bl sub_02007130 +_0224D506: + mov r0, #0 + str r0, [sp] + mov r3, #0xb + str r3, [sp, #4] + ldr r0, [r5, #0] + mov r1, #3 + mov r2, #0x1f + bl sub_0200DAA4 + mov r0, #0x85 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + ldr r0, [r5, #0] + mov r1, #3 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0224D544: .word 0x00000245 + thumb_func_end ov7_0224D474 + + thumb_func_start ov7_0224D548 +ov7_0224D548: ; 0x0224D548 + push {r4, lr} + add r4, r0, #0 + bl sub_02020014 + mov r1, #0x8f + lsl r1, r1, #2 + str r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0201A008 + mov r1, #0x8e + lsl r1, r1, #2 + strb r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #1 + bl sub_0201A008 + ldr r1, _0224D5CC ; =0x00000239 + strb r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #2 + bl sub_0201A008 + ldr r1, _0224D5D0 ; =0x0000023A + strb r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #3 + bl sub_0201A008 + ldr r1, _0224D5D4 ; =0x0000023B + strb r0, [r4, r1] + mov r0, #0 + mov r1, #3 + bl sub_02019060 + mov r0, #1 + mov r1, #2 + bl sub_02019060 + mov r0, #2 + mov r1, #1 + bl sub_02019060 + mov r0, #3 + mov r1, #0 + bl sub_02019060 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #8 + mov r1, #1 + bl sub_0201FF0C + pop {r4, pc} + nop +_0224D5CC: .word 0x00000239 +_0224D5D0: .word 0x0000023A +_0224D5D4: .word 0x0000023B + thumb_func_end ov7_0224D548 + + thumb_func_start ov7_0224D5D8 +ov7_0224D5D8: ; 0x0224D5D8 + push {r4, lr} + mov r1, #0x8e + add r4, r0, #0 + lsl r1, r1, #2 + ldrb r1, [r4, r1] + mov r0, #0 + bl sub_02019060 + ldr r1, _0224D614 ; =0x00000239 + mov r0, #1 + ldrb r1, [r4, r1] + bl sub_02019060 + ldr r1, _0224D618 ; =0x0000023A + mov r0, #2 + ldrb r1, [r4, r1] + bl sub_02019060 + ldr r1, _0224D61C ; =0x0000023B + mov r0, #3 + ldrb r1, [r4, r1] + bl sub_02019060 + mov r0, #0x8f + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0201FF48 + pop {r4, pc} + nop +_0224D614: .word 0x00000239 +_0224D618: .word 0x0000023A +_0224D61C: .word 0x0000023B + thumb_func_end ov7_0224D5D8 + + thumb_func_start ov7_0224D620 +ov7_0224D620: ; 0x0224D620 + push {r4, r5, lr} + sub sp, #0xc + ldr r1, _0224D690 ; =0x00000241 + add r4, r0, #0 + add r0, r1, #1 + ldrb r2, [r4, r1] + ldrb r0, [r4, r0] + cmp r2, r0 + beq _0224D65A + ldr r5, _0224D694 ; =0x0224F2D4 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + add r1, r4, #0 + str r0, [r3, #0] + add r1, #0x90 + ldr r1, [r1, #0] + add r0, r2, #0 + bl sub_02020990 + ldr r0, _0224D690 ; =0x00000241 + add sp, #0xc + ldrb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + mov r0, #3 + pop {r4, r5, pc} +_0224D65A: + mov r0, #0 + strb r0, [r4, r1] + mov r1, #6 + mov r2, #2 + lsl r1, r1, #0x18 + lsl r2, r2, #0x12 + bl sub_020C4B4C + add r0, r4, #0 + bl ov7_0224EAD0 + add r0, r4, #0 + bl ov7_0224D474 + add r0, r4, #0 + bl ov7_0224D548 + add r0, r4, #0 + bl ov7_0224D6BC + add r0, r4, #0 + mov r1, #0 + bl ov7_0224DAF8 + mov r0, #4 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224D690: .word 0x00000241 +_0224D694: .word 0x0224F2D4 + thumb_func_end ov7_0224D620 + + thumb_func_start ov7_0224D698 +ov7_0224D698: ; 0x0224D698 + push {r3, lr} + ldr r2, _0224D6B8 ; =0x00000245 + ldrb r0, [r0, r2] + cmp r0, #1 + bne _0224D6A6 + add r0, r1, #0 + pop {r3, pc} +_0224D6A6: + cmp r0, #2 + bne _0224D6B4 + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + bl sub_02098164 + add r1, r0, #0 +_0224D6B4: + add r0, r1, #0 + pop {r3, pc} + ; .align 2, 0 +_0224D6B8: .word 0x00000245 + thumb_func_end ov7_0224D698 + + thumb_func_start ov7_0224D6BC +ov7_0224D6BC: ; 0x0224D6BC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r2, _0224D850 ; =0x00000245 + add r5, r0, #0 + mov r0, #0 + str r0, [sp] + ldrb r0, [r5, r2] + cmp r0, #0 + beq _0224D6D2 + cmp r0, #3 + bne _0224D6F2 +_0224D6D2: + mov r2, #0x62 + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0xb + bl sub_0200B144 + str r0, [sp, #0xc] + ldr r2, _0224D854 ; =0x00000287 + mov r0, #0 + mov r1, #0x1a + mov r3, #0xb + bl sub_0200B144 + str r0, [sp, #4] + b _0224D714 +_0224D6F2: + cmp r0, #1 + bne _0224D706 + ldr r0, [sp] + mov r1, #0x1a + add r2, #0x2d + mov r3, #0xb + bl sub_0200B144 + str r0, [sp, #0xc] + b _0224D714 +_0224D706: + ldr r0, [sp] + mov r1, #0x1a + mov r2, #0xc + mov r3, #0xb + bl sub_0200B144 + str r0, [sp, #0xc] +_0224D714: + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r0, [r5, r0] + mov r1, #0xb + add r0, r0, #1 + bl sub_02013A04 + str r0, [r5, #0x7c] + mov r0, #0 + str r0, [sp, #8] + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r0, [r5, r0] + cmp r0, #0 + bls _0224D7B4 + ldr r4, [sp, #8] +_0224D734: + mov r1, #0x8b + lsl r1, r1, #2 + ldr r1, [r5, r1] + add r0, r5, #0 + ldrh r1, [r1, r4] + bl ov7_0224D698 + add r6, r0, #0 + mov r0, #0x69 + lsl r0, r0, #2 + cmp r6, r0 + bhi _0224D780 + sub r0, #0x5c + cmp r6, r0 + blo _0224D780 + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D268 + add r1, r0, #0 + ldr r0, [sp, #4] + bl sub_0200B1EC + add r7, r0, #0 + mov r2, #0x8b + lsl r2, r2, #2 + ldr r2, [r5, r2] + ldr r0, [r5, #0x7c] + ldrh r2, [r2, r4] + add r1, r7, #0 + bl sub_02013A6C + add r0, r7, #0 + bl sub_020237BC + mov r0, #1 + str r0, [sp] + b _0224D7A0 +_0224D780: + ldr r0, [sp, #0xc] + add r1, r6, #0 + bl sub_0200B1EC + mov r2, #0x8b + add r7, r0, #0 + lsl r2, r2, #2 + ldr r2, [r5, r2] + ldr r0, [r5, #0x7c] + ldrh r2, [r2, r4] + add r1, r7, #0 + bl sub_02013A6C + add r0, r7, #0 + bl sub_020237BC +_0224D7A0: + ldr r0, [sp, #8] + add r4, r4, #2 + add r0, r0, #1 + str r0, [sp, #8] + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r1, [r5, r0] + ldr r0, [sp, #8] + cmp r0, r1 + blo _0224D734 +_0224D7B4: + ldr r0, [sp] + cmp r0, #0 + ldr r0, [r5, #0x7c] + beq _0224D7CE + add r1, r5, #0 + add r1, #0x88 + mov r2, #0x1a + add r3, r2, #0 + ldr r1, [r1, #0] + sub r3, #0x1c + bl sub_02013A4C + b _0224D7DE +_0224D7CE: + add r1, r5, #0 + add r1, #0x88 + mov r2, #8 + add r3, r2, #0 + ldr r1, [r1, #0] + sub r3, #0xa + bl sub_02013A4C +_0224D7DE: + ldr r0, [sp, #0xc] + bl sub_0200B190 + ldr r0, _0224D850 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _0224D7F0 + cmp r0, #3 + bne _0224D7F6 +_0224D7F0: + ldr r0, [sp, #4] + bl sub_0200B190 +_0224D7F6: + ldr r3, _0224D858 ; =0x0224F308 + add r2, sp, #0x10 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #0x69 + lsl r0, r0, #2 + cmp r6, r0 + bhi _0224D820 + sub r0, #0x5c + cmp r6, r0 + blo _0224D820 + mov r1, #0x23 + add r0, sp, #0x10 + strb r1, [r0, #0x15] + b _0224D826 +_0224D820: + mov r1, #0 + add r0, sp, #0x10 + strb r1, [r0, #0x15] +_0224D826: + ldr r0, [r5, #0x7c] + mov r3, #0xb + str r0, [sp, #0x10] + add r0, r5, #0 + add r0, #8 + str r0, [sp, #0x1c] + mov r0, #0x23 + lsl r0, r0, #4 + ldrb r0, [r5, r0] + add r1, r0, #1 + add r0, sp, #0x10 + strh r1, [r0, #0x10] + mov r1, #0 + add r0, sp, #0x10 + add r2, r1, #0 + str r5, [sp, #0x2c] + bl sub_0200112C + str r0, [r5, #0x78] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224D850: .word 0x00000245 +_0224D854: .word 0x00000287 +_0224D858: .word 0x0224F308 + thumb_func_end ov7_0224D6BC + + thumb_func_start ov7_0224D85C +ov7_0224D85C: ; 0x0224D85C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r1, #0 + mov r1, #0x13 + str r0, [sp, #0x10] + add r6, r2, #0 + bl sub_02001504 + add r4, r0, #0 + cmp r6, #1 + beq _0224D878 + ldr r0, _0224D9AC ; =0x00000638 + bl sub_02005748 +_0224D878: + add r0, r4, #0 + add r0, #0x18 + mov r1, #0 + bl sub_0201ADA4 + mov r1, #1 + mvn r1, r1 + cmp r5, r1 + beq _0224D938 + ldr r2, _0224D9B0 ; =0x00000245 + ldrb r0, [r4, r2] + cmp r0, #0 + bne _0224D8A8 + mov r0, #0x82 + mov r1, #0xb + bl sub_02023790 + lsl r1, r5, #0x10 + lsr r1, r1, #0x10 + mov r2, #0xb + add r6, r0, #0 + bl sub_0207CFC8 + b _0224D90C +_0224D8A8: + cmp r0, #3 + bne _0224D8C2 + mov r0, #0x82 + mov r1, #0xb + bl sub_02023790 + lsl r1, r5, #0x10 + lsr r1, r1, #0x10 + mov r2, #0xb + add r6, r0, #0 + bl sub_0207CFC8 + b _0224D90C +_0224D8C2: + cmp r0, #1 + bne _0224D8E6 + mov r0, #0 + mov r1, #0x1a + add r2, #0x2d + mov r3, #0xb + bl sub_0200B144 + add r1, r5, #0 + add r7, r0, #0 + add r1, #0x8a + bl sub_0200B1EC + add r6, r0, #0 + add r0, r7, #0 + bl sub_0200B190 + b _0224D90C +_0224D8E6: + mov r0, #0 + mov r1, #0x1a + sub r2, #0x27 + mov r3, #0xb + bl sub_0200B144 + add r7, r0, #0 + lsl r0, r5, #0x18 + lsr r0, r0, #0x18 + bl sub_020981F4 + add r1, r0, #0 + add r0, r7, #0 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r7, #0 + bl sub_0200B190 +_0224D90C: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0224D9B4 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0x18 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + lsl r1, r5, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + bl ov7_0224EB7C + b _0224D940 +_0224D938: + add r0, r4, #0 + lsr r1, r1, #0x10 + bl ov7_0224EB7C +_0224D940: + add r1, sp, #0x14 + ldr r0, [sp, #0x10] + add r1, #2 + add r2, sp, #0x14 + bl sub_020014DC + add r0, sp, #0x14 + ldrh r0, [r0, #2] + cmp r0, #0 + bne _0224D962 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + b _0224D96E +_0224D962: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC +_0224D96E: + ldr r0, [sp, #0x10] + mov r1, #2 + bl sub_02001504 + cmp r0, #7 + bls _0224D992 + add r1, sp, #0x14 + ldrh r1, [r1, #2] + add r1, r1, #7 + cmp r0, r1 + bls _0224D992 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + b _0224D99E +_0224D992: + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC +_0224D99E: + add r4, #0x18 + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0224D9AC: .word 0x00000638 +_0224D9B0: .word 0x00000245 +_0224D9B4: .word 0x000F0E00 + thumb_func_end ov7_0224D85C + + thumb_func_start ov7_0224D9B8 +ov7_0224D9B8: ; 0x0224D9B8 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r5, r1, #0 + mov r1, #0x13 + add r7, r2, #0 + bl sub_02001504 + add r4, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _0224DAA0 + lsl r0, r5, #0x10 + lsr r2, r0, #0x10 + mov r0, #0x69 + lsl r0, r0, #2 + cmp r2, r0 + bhi _0224DA0A + add r1, r0, #0 + sub r1, #0x5c + cmp r2, r1 + blo _0224DA0A + add r1, r0, #0 + sub r1, #0x5d + sub r1, r2, r1 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 + mov r1, #2 + add r3, r4, #0 + str r1, [sp] + add r3, #8 + str r3, [sp, #4] + mov r3, #0 + str r3, [sp, #8] + add r3, r7, #4 + str r3, [sp, #0xc] + add r0, #0xac + ldr r0, [r4, r0] + add r3, r1, #0 + bl sub_0200C648 +_0224DA0A: + lsl r1, r5, #0x10 + add r0, r4, #0 + lsr r1, r1, #0x10 + bl ov7_0224E890 + str r0, [sp, #0x14] + mov r0, #0xc + mov r1, #0xb + bl sub_02023790 + str r0, [sp, #0x18] + ldr r0, _0224DAF0 ; =0x00000245 + ldrb r0, [r4, r0] + cmp r0, #3 + bne _0224DA38 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x20 + bl sub_0200B1EC + str r0, [sp, #0x10] + b _0224DA46 +_0224DA38: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #9 + bl sub_0200B1EC + str r0, [sp, #0x10] +_0224DA46: + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r2, [sp, #0x14] + mov r1, #0 + mov r3, #4 + bl sub_0200B60C + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + ldr r1, [sp, #0x18] + ldr r2, [sp, #0x10] + bl sub_0200C388 + mov r0, #0 + ldr r1, [sp, #0x18] + add r2, r0, #0 + bl sub_02002D7C + mov ip, r0 + str r7, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0224DAF4 ; =0x00010200 + ldr r2, [sp, #0x18] + str r0, [sp, #8] + add r0, r4, #0 + mov r1, #0 + mov r6, ip + mov r3, #0x98 + add r0, #8 + sub r3, r3, r6 + str r1, [sp, #0xc] + bl sub_0201D78C + ldr r0, [sp, #0x10] + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC +_0224DAA0: + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + bne _0224DAEC + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #8 + bl sub_0200B1EC + add r5, r0, #0 + mov r0, #0x98 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #8 + mov r1, #0xf + mov r2, #0 + add r3, r7, #0 + bl sub_0201AE78 + mov r1, #0 + str r7, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0224DAF4 ; =0x00010200 + add r4, #8 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r5, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r5, #0 + bl sub_020237BC +_0224DAEC: + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224DAF0: .word 0x00000245 +_0224DAF4: .word 0x00010200 + thumb_func_end ov7_0224D9B8 + + thumb_func_start ov7_0224DAF8 +ov7_0224DAF8: ; 0x0224DAF8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0224DC80 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #3 + bne _0224DBA2 + cmp r1, #0 + bne _0224DB24 + add r0, r5, #0 + add r0, #0x28 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x28 + mov r1, #1 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + b _0224DB3A +_0224DB24: + mov r0, #0x48 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0 + add r0, #0x28 + mov r1, #0xf + add r3, r2, #0 + bl sub_0201AE78 +_0224DB3A: + mov r0, #0x10 + mov r1, #0xb + bl sub_02023790 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x26 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + bl ov7_0224E8F4 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + mov r1, #0 + add r7, r0, #0 + mov r3, #0x40 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x28 + add r2, r4, #0 + sub r3, r3, r7 + str r1, [sp, #8] + bl sub_0201D738 + b _0224DC66 +_0224DBA2: + cmp r1, #0 + bne _0224DBEA + add r0, r5, #0 + add r0, #0x28 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x28 + mov r1, #1 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x12 + bl sub_0200B1EC + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x28 + add r2, r4, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r4, #0 + bl sub_020237BC + b _0224DBFE +_0224DBEA: + mov r0, #0x48 + str r0, [sp] + add r0, r5, #0 + mov r3, #0x10 + add r0, #0x28 + mov r1, #0xf + mov r2, #0 + str r3, [sp, #4] + bl sub_0201AE78 +_0224DBFE: + mov r0, #0x10 + mov r1, #0xb + bl sub_02023790 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x13 + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + bl ov7_0224E8F4 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + add r7, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + mov r3, #0x48 + mov r1, #0 + add r0, #0x28 + add r2, r4, #0 + sub r3, r3, r7 + str r1, [sp, #8] + bl sub_0201D738 +_0224DC66: + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r5, #0x28 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224DC80: .word 0x00000245 + thumb_func_end ov7_0224DAF8 + + thumb_func_start ov7_0224DC84 +ov7_0224DC84: ; 0x0224DC84 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r2, sp, #0 + ldr r0, [r5, #0x78] + mov r1, #0 + add r2, #2 + bl sub_020014DC + ldr r0, [r5, #0x78] + bl sub_02001288 + add r4, r0, #0 + ldr r0, [r5, #0x78] + mov r1, #0 + add r2, sp, #0 + bl sub_020014DC + add r0, sp, #0 + ldrh r2, [r0] + ldrh r0, [r0, #2] + cmp r0, r2 + beq _0224DCC4 + mov r0, #2 + lsl r2, r2, #4 + lsl r0, r0, #8 + add r2, #0x18 + lsl r2, r2, #0x10 + ldr r0, [r5, r0] + mov r1, #0xac + asr r2, r2, #0x10 + bl sub_0200D494 +_0224DCC4: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0224DCD6 + add r0, r0, #1 + cmp r4, r0 + bne _0224DCD4 + b _0224DE7C +_0224DCD4: + b _0224DD04 +_0224DCD6: + mov r1, #0 + ldr r0, [r5, #0x78] + add r2, r1, #0 + bl sub_02001384 + ldr r0, [r5, #0x7c] + bl sub_02013A3C + add r0, r5, #0 + bl ov7_0224D44C + add r0, r5, #0 + bl ov7_0224D5D8 + ldr r0, [r5, #0] + mov r1, #1 + bl sub_02019EBC + ldr r0, _0224DE80 ; =0x000005DC + bl sub_02005748 + mov r0, #0xc + pop {r3, r4, r5, pc} +_0224DD04: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02021D34 + mov r1, #0x82 + lsl r1, r1, #2 + strh r0, [r5, r1] + sub r1, #0xc + ldr r0, [r5, r1] + bl sub_02021D34 + ldr r1, _0224DE84 ; =0x0000020A + strh r0, [r5, r1] + sub r1, #0x12 + ldr r0, [r5, r1] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021CAC + add r0, r5, #0 + mov r1, #1 + bl ov7_0224EC10 + add r0, r5, #0 + add r0, #0x58 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x18 + bl sub_0201ACF4 + add r0, r5, #0 + add r0, #0x58 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + ldr r1, _0224DE88 ; =0x00000246 + mov r2, #1 + strh r4, [r5, r1] + add r0, r1, #2 + strh r2, [r5, r0] + ldrh r1, [r5, r1] + add r0, r5, #0 + bl ov7_0224E890 + mov r1, #0x93 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r5, #0 + bl ov7_0224E8F4 + mov r2, #0x93 + lsl r2, r2, #2 + ldr r1, [r5, r2] + cmp r0, r1 + bhs _0224DDE0 + sub r0, r2, #7 + ldrb r0, [r5, r0] + cmp r0, #3 + bne _0224DD9C + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x25 + bl sub_0200B1EC + b _0224DDA8 +_0224DD9C: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_0200B1EC +_0224DDA8: + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0x20 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #0x58 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r5, r1] + mov r0, #0xa + pop {r3, r4, r5, pc} +_0224DDE0: + sub r2, r2, #7 + ldrb r2, [r5, r2] + cmp r2, #1 + bne _0224DDF6 + ldr r0, _0224DE80 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + bl ov7_0224E098 + pop {r3, r4, r5, pc} +_0224DDF6: + bl sub_020E2178 + ldr r1, _0224DE8C ; =0x0000024A + strh r0, [r5, r1] + ldrh r0, [r5, r1] + cmp r0, #0x63 + bls _0224DE08 + mov r0, #0x63 + strh r0, [r5, r1] +_0224DE08: + ldr r1, _0224DE88 ; =0x00000246 + add r0, r5, #0 + ldrh r1, [r5, r1] + mov r2, #0 + bl ov7_0224E834 + ldr r0, _0224DE90 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #3 + bne _0224DE2A + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x21 + bl sub_0200B1EC + b _0224DE36 +_0224DE2A: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #4 + bl sub_0200B1EC +_0224DE36: + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0x20 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #0x58 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r5, r1] + add r0, r5, #0 + mov r1, #1 + bl ov7_0224EB38 + ldr r0, _0224DE80 ; =0x000005DC + bl sub_02005748 + mov r0, #5 + pop {r3, r4, r5, pc} +_0224DE7C: + mov r0, #4 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224DE80: .word 0x000005DC +_0224DE84: .word 0x0000020A +_0224DE88: .word 0x00000246 +_0224DE8C: .word 0x0000024A +_0224DE90: .word 0x00000245 + thumb_func_end ov7_0224DC84 + + thumb_func_start ov7_0224DE94 +ov7_0224DE94: ; 0x0224DE94 + push {r4, lr} + add r4, r0, #0 + mov r0, #9 + lsl r0, r0, #6 + ldrb r0, [r4, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224DEAA + mov r0, #5 + pop {r4, pc} +_0224DEAA: + add r0, r4, #0 + bl ov7_0224DED4 + add r0, r4, #0 + mov r1, #0 + bl ov7_0224E28C + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CAC + mov r0, #6 + pop {r4, pc} + thumb_func_end ov7_0224DE94 + + thumb_func_start ov7_0224DED4 +ov7_0224DED4: ; 0x0224DED4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r1, _0224DFAC ; =0x00000245 + add r5, r0, #0 + ldrb r0, [r5, r1] + cmp r0, #0 + bne _0224DEF6 + add r0, r1, #0 + add r1, r1, #1 + sub r0, #0x35 + ldrh r1, [r5, r1] + ldr r0, [r5, r0] + mov r2, #0xb + bl sub_0207D730 + add r4, r0, #0 + b _0224DF28 +_0224DEF6: + cmp r0, #3 + bne _0224DF0E + add r0, r1, #0 + add r1, r1, #1 + sub r0, #0x35 + ldrh r1, [r5, r1] + ldr r0, [r5, r0] + mov r2, #0xb + bl sub_0207D730 + add r4, r0, #0 + b _0224DF28 +_0224DF0E: + cmp r0, #2 + bne _0224DF26 + add r0, r1, #0 + add r1, r1, #1 + sub r0, #0x35 + ldrh r1, [r5, r1] + ldr r0, [r5, r0] + bl sub_0202CBC8 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + b _0224DF28 +_0224DF26: + mov r4, #0 +_0224DF28: + add r0, r5, #0 + add r0, #0x48 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r5, #0 + add r0, #0x48 + mov r1, #1 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + mov r0, #0x18 + mov r1, #0xb + bl sub_02023790 + add r6, r0, #0 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x14 + bl sub_0200B1EC + add r7, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #0 + add r2, r4, #0 + mov r3, #3 + bl sub_0200B60C + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r6, #0 + add r2, r7, #0 + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x48 + add r2, r6, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r7, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add r5, #0x48 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + nop +_0224DFAC: .word 0x00000245 + thumb_func_end ov7_0224DED4 + + thumb_func_start ov7_0224DFB0 +ov7_0224DFB0: ; 0x0224DFB0 + push {r4, lr} + mov r1, #0x92 + add r4, r0, #0 + lsl r1, r1, #2 + add r0, r4, r1 + add r1, r1, #2 + ldrh r1, [r4, r1] + bl sub_0208C15C + cmp r0, #0 + beq _0224DFD8 + ldr r0, _0224E08C ; =0x00000638 + bl sub_02005748 + add r0, r4, #0 + mov r1, #1 + bl ov7_0224E28C + mov r0, #6 + pop {r4, pc} +_0224DFD8: + ldr r0, _0224E090 ; =0x021BF67C + mov r1, #1 + ldr r2, [r0, #0x48] + add r0, r2, #0 + tst r0, r1 + beq _0224E028 + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + add r0, r4, #0 + add r0, #0x48 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0x38 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0x58 + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, _0224E094 ; =0x000005DC + bl sub_02005748 + add r0, r4, #0 + bl ov7_0224E098 + pop {r4, pc} +_0224E028: + mov r0, #2 + tst r0, r2 + beq _0224E088 + add r0, r4, #0 + add r0, #0x48 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0x38 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0x58 + mov r1, #0 + bl sub_0200E084 + add r0, r4, #0 + mov r1, #0 + bl ov7_0224EB38 + mov r1, #0x7e + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0x10 + ldrh r1, [r4, r1] + bl sub_02021CAC + mov r1, #0x7f + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0xe + ldrh r1, [r4, r1] + bl sub_02021CAC + add r0, r4, #0 + mov r1, #0 + bl ov7_0224EC10 + add r4, #0x18 + add r0, r4, #0 + bl sub_0201A9A4 + ldr r0, _0224E094 ; =0x000005DC + bl sub_02005748 + mov r0, #4 + pop {r4, pc} +_0224E088: + mov r0, #6 + pop {r4, pc} + ; .align 2, 0 +_0224E08C: .word 0x00000638 +_0224E090: .word 0x021BF67C +_0224E094: .word 0x000005DC + thumb_func_end ov7_0224DFB0 + + thumb_func_start ov7_0224E098 +ov7_0224E098: ; 0x0224E098 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r2, _0224E284 ; =0x00000245 + add r4, r0, #0 + ldrb r0, [r4, r2] + cmp r0, #0 + bne _0224E0BC + add r0, r2, #0 + add r1, r2, #1 + add r2, r2, #3 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldrh r2, [r4, r2] + ldr r0, [r4, r0] + mov r3, #0xb + bl sub_0207D55C + b _0224E100 +_0224E0BC: + cmp r0, #3 + bne _0224E0D6 + add r0, r2, #0 + add r1, r2, #1 + add r2, r2, #3 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldrh r2, [r4, r2] + ldr r0, [r4, r0] + mov r3, #0xb + bl sub_0207D55C + b _0224E100 +_0224E0D6: + cmp r0, #1 + bne _0224E0EE + sub r2, #0x35 + ldr r0, [r4, r2] + bl sub_020289A0 + cmp r0, #0xc8 + bne _0224E0EA + mov r0, #0 + b _0224E100 +_0224E0EA: + mov r0, #1 + b _0224E100 +_0224E0EE: + add r0, r2, #0 + add r1, r2, #1 + add r2, r2, #3 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, r0] + bl sub_0202CB70 +_0224E100: + cmp r0, #0 + bne _0224E192 + mov r0, #0x92 + mov r1, #0 + lsl r0, r0, #2 + strh r1, [r4, r0] + sub r0, r0, #3 + ldrb r0, [r4, r0] + cmp r0, #0 + bne _0224E124 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #7 + bl sub_0200B1EC + add r5, r0, #0 + b _0224E15A +_0224E124: + cmp r0, #3 + bne _0224E138 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #7 + bl sub_0200B1EC + add r5, r0, #0 + b _0224E15A +_0224E138: + cmp r0, #1 + bne _0224E14C + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0xc + bl sub_0200B1EC + add r5, r0, #0 + b _0224E15A +_0224E14C: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0xe + bl sub_0200B1EC + add r5, r0, #0 +_0224E15A: + add r0, r4, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + add r2, r5, #0 + bl sub_0200C388 + add r0, r5, #0 + bl sub_020237BC + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r4, r2] + sub r2, #0x20 + add r0, r4, #0 + ldr r2, [r4, r2] + add r0, #0x58 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r4, r1] + add sp, #8 + mov r0, #0xa + pop {r3, r4, r5, pc} +_0224E192: + ldr r1, _0224E288 ; =0x00000246 + add r0, r4, #0 + ldrh r1, [r4, r1] + mov r2, #0 + bl ov7_0224E834 + mov r0, #0 + str r0, [sp] + mov r1, #1 + mov r2, #0x92 + add r0, r4, #0 + str r1, [sp, #4] + lsl r2, r2, #2 + add r0, #0x8c + ldrsh r2, [r4, r2] + ldr r0, [r0, #0] + mov r3, #2 + bl sub_0200B60C + mov r0, #0 + str r0, [sp] + mov r0, #1 + mov r2, #0x93 + str r0, [sp, #4] + lsl r2, r2, #2 + ldr r3, [r4, r2] + sub r2, r2, #4 + add r0, r4, #0 + ldrsh r2, [r4, r2] + add r0, #0x8c + ldr r0, [r0, #0] + mul r2, r3 + mov r1, #2 + mov r3, #6 + bl sub_0200B60C + ldr r1, _0224E288 ; =0x00000246 + add r2, r1, #0 + ldrh r0, [r4, r1] + sub r2, #0xa2 + cmp r0, r2 + bhi _0224E226 + sub r1, #0xfe + cmp r0, r1 + blo _0224E226 + bl sub_0207D268 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #3 + bl sub_0200B630 + ldr r0, _0224E284 ; =0x00000245 + ldrb r0, [r4, r0] + cmp r0, #3 + bne _0224E216 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x24 + bl sub_0200B1EC + add r5, r0, #0 + b _0224E24C +_0224E216: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x1b + bl sub_0200B1EC + add r5, r0, #0 + b _0224E24C +_0224E226: + ldr r0, _0224E284 ; =0x00000245 + ldrb r0, [r4, r0] + cmp r0, #3 + bne _0224E23E + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x23 + bl sub_0200B1EC + add r5, r0, #0 + b _0224E24C +_0224E23E: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #5 + bl sub_0200B1EC + add r5, r0, #0 +_0224E24C: + add r0, r4, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + add r2, r5, #0 + bl sub_0200C388 + add r0, r5, #0 + bl sub_020237BC + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r4, r2] + sub r2, #0x20 + add r0, r4, #0 + ldr r2, [r4, r2] + add r0, #0x58 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r4, r1] + mov r0, #7 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224E284: .word 0x00000245 +_0224E288: .word 0x00000246 + thumb_func_end ov7_0224E098 + + thumb_func_start ov7_0224E28C +ov7_0224E28C: ; 0x0224E28C + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r0, #0x38 + mov r1, #0xf + bl sub_0201ADA4 + cmp r4, #0 + bne _0224E2AE + add r0, r5, #0 + add r0, #0x38 + mov r1, #1 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 +_0224E2AE: + mov r0, #0x18 + mov r1, #0xb + bl sub_02023790 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x15 + bl sub_0200B1EC + mov r3, #2 + add r6, r0, #0 + mov r2, #0x92 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + add r0, r5, #0 + lsl r2, r2, #2 + add r0, #0x8c + ldrsh r2, [r5, r2] + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200B60C + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + add r0, r5, #0 + add r0, #0x38 + add r2, r4, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0224E39C ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #3 + bne _0224E322 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x22 + bl sub_0200B1EC + b _0224E32E +_0224E322: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x16 + bl sub_0200B1EC +_0224E32E: + add r7, r0, #0 + mov r0, #1 + str r0, [sp] + mov r2, #0x93 + str r0, [sp, #4] + lsl r2, r2, #2 + ldr r3, [r5, r2] + sub r2, r2, #4 + add r0, r5, #0 + ldrsh r2, [r5, r2] + add r0, #0x8c + ldr r0, [r0, #0] + mul r2, r3 + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + add r0, r5, #0 + add r0, #0x8c + ldr r0, [r0, #0] + add r1, r4, #0 + add r2, r7, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + bl sub_02002D7C + add r6, r0, #0 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + mov r3, #0x60 + mov r1, #0 + add r0, #0x38 + add r2, r4, #0 + sub r3, r3, r6 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r7, #0 + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r5, #0x38 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224E39C: .word 0x00000245 + thumb_func_end ov7_0224E28C + + thumb_func_start ov7_0224E3A0 +ov7_0224E3A0: ; 0x0224E3A0 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #9 + lsl r0, r0, #6 + ldrb r0, [r4, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224E3BA + add sp, #4 + mov r0, #7 + pop {r3, r4, pc} +_0224E3BA: + mov r3, #0xb + str r3, [sp] + ldr r0, [r4, #0] + ldr r1, _0224E3D4 ; =0x0224F2CC + mov r2, #0x1f + bl sub_02002100 + add r4, #0x80 + str r0, [r4, #0] + mov r0, #8 + add sp, #4 + pop {r3, r4, pc} + nop +_0224E3D4: .word 0x0224F2CC + thumb_func_end ov7_0224E3A0 + + thumb_func_start ov7_0224E3D8 +ov7_0224E3D8: ; 0x0224E3D8 + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, #0x80 + ldr r0, [r0, #0] + mov r1, #0xb + bl sub_02002114 + cmp r0, #0 + beq _0224E3F6 + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + bne _0224E3F4 + b _0224E55E +_0224E3F4: + b _0224E5A0 +_0224E3F6: + ldr r2, _0224E5A4 ; =0x00000245 + ldrb r0, [r4, r2] + cmp r0, #0 + bne _0224E454 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #6 + bl sub_0200B1EC + mov r2, #0x92 + lsl r2, r2, #2 + add r5, r0, #0 + ldrsh r0, [r4, r2] + cmp r0, #1 + bne _0224E428 + add r0, r4, #0 + sub r2, r2, #2 + add r0, #0x8c + ldrh r2, [r4, r2] + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200B70C + b _0224E438 +_0224E428: + add r0, r4, #0 + sub r2, r2, #2 + add r0, #0x8c + ldrh r2, [r4, r2] + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200B77C +_0224E438: + ldr r0, _0224E5A8 ; =0x00000246 + mov r1, #5 + ldrh r0, [r4, r0] + mov r2, #0xb + bl sub_0207CFF0 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0200B7B4 + b _0224E518 +_0224E454: + cmp r0, #3 + bne _0224E4AC + add r0, r2, #3 + ldrsh r0, [r4, r0] + cmp r0, #1 + bne _0224E472 + add r0, r4, #0 + add r2, r2, #1 + add r0, #0x8c + ldrh r2, [r4, r2] + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200B70C + b _0224E482 +_0224E472: + add r0, r4, #0 + add r2, r2, #1 + add r0, #0x8c + ldrh r2, [r4, r2] + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200B77C +_0224E482: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #6 + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, _0224E5A8 ; =0x00000246 + mov r1, #5 + ldrh r0, [r4, r0] + mov r2, #0xb + bl sub_0207CFF0 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0200B7B4 + b _0224E518 +_0224E4AC: + cmp r0, #1 + bne _0224E4CC + add r1, r2, #1 + ldrh r1, [r4, r1] + add r0, r4, #0 + mov r2, #0 + bl ov7_0224E834 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0xb + bl sub_0200B1EC + add r5, r0, #0 + b _0224E518 +_0224E4CC: + add r0, r2, #3 + ldrsh r0, [r4, r0] + cmp r0, #1 + bne _0224E4F0 + add r0, r2, #1 + ldrh r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02098164 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200BE64 + b _0224E50A +_0224E4F0: + add r0, r2, #1 + ldrh r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02098164 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x8c + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200BE98 +_0224E50A: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0xd + bl sub_0200B1EC + add r5, r0, #0 +_0224E518: + add r0, r4, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + add r2, r5, #0 + bl sub_0200C388 + add r0, r5, #0 + bl sub_020237BC + add r0, r4, #0 + add r0, #0x58 + mov r1, #0xf + bl sub_0201ADA4 + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r4, r2] + sub r2, #0x20 + add r0, r4, #0 + ldr r2, [r4, r2] + add r0, #0x58 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r4, r1] + ldr r0, _0224E5AC ; =0x00000644 + bl sub_02005748 + mov r0, #9 + pop {r3, r4, r5, pc} +_0224E55E: + add r0, r4, #0 + add r0, #0x58 + mov r1, #0 + bl sub_0200E084 + add r0, r4, #0 + mov r1, #0 + bl ov7_0224EB38 + mov r1, #0x7e + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0x10 + ldrh r1, [r4, r1] + bl sub_02021CAC + mov r1, #0x7f + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0xe + ldrh r1, [r4, r1] + bl sub_02021CAC + add r0, r4, #0 + mov r1, #0 + bl ov7_0224EC10 + add r4, #0x18 + add r0, r4, #0 + bl sub_0201A9A4 + mov r0, #4 + pop {r3, r4, r5, pc} +_0224E5A0: + mov r0, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224E5A4: .word 0x00000245 +_0224E5A8: .word 0x00000246 +_0224E5AC: .word 0x00000644 + thumb_func_end ov7_0224E3D8 + + thumb_func_start ov7_0224E5B0 +ov7_0224E5B0: ; 0x0224E5B0 + push {r4, lr} + add r4, r0, #0 + mov r0, #9 + lsl r0, r0, #6 + ldrb r0, [r4, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224E5C6 + mov r0, #9 + pop {r4, pc} +_0224E5C6: + ldr r2, _0224E6B4 ; =0x00000245 + ldrb r0, [r4, r2] + cmp r0, #0 + bne _0224E5FC + add r0, r2, #0 + add r1, r2, #1 + add r2, r2, #3 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldrh r2, [r4, r2] + ldr r0, [r4, r0] + mov r3, #0xb + bl sub_0207D570 + mov r2, #0x22 + lsl r2, r2, #4 + add r1, r2, #0 + ldr r0, [r4, r2] + add r2, #0x28 + ldrsh r2, [r4, r2] + add r1, #0x26 + ldrh r1, [r4, r1] + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl sub_0206D504 + b _0224E63C +_0224E5FC: + cmp r0, #3 + bne _0224E616 + add r0, r2, #0 + add r1, r2, #1 + add r2, r2, #3 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldrh r2, [r4, r2] + ldr r0, [r4, r0] + mov r3, #0xb + bl sub_0207D570 + b _0224E63C +_0224E616: + cmp r0, #1 + bne _0224E62A + add r0, r2, #0 + add r1, r2, #1 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldr r0, [r4, r0] + bl sub_0202895C + b _0224E63C +_0224E62A: + add r0, r2, #0 + add r1, r2, #1 + add r2, r2, #3 + sub r0, #0x35 + ldrh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [r4, r0] + bl sub_0202CAE0 +_0224E63C: + mov r1, #0x93 + lsl r1, r1, #2 + ldr r2, [r4, r1] + sub r1, r1, #4 + ldrsh r1, [r4, r1] + add r0, r4, #0 + mul r1, r2 + bl ov7_0224E920 + ldr r2, _0224E6B4 ; =0x00000245 + ldrb r0, [r4, r2] + cmp r0, #3 + bne _0224E66E + add r0, r2, #0 + add r3, r2, #7 + add r2, r2, #3 + sub r0, #0x29 + ldrsh r2, [r4, r2] + ldr r3, [r4, r3] + ldr r0, [r4, r0] + mov r1, #0x45 + mul r2, r3 + bl sub_0202CF70 + b _0224E684 +_0224E66E: + add r0, r2, #0 + add r3, r2, #7 + add r2, r2, #3 + sub r0, #0x29 + ldrsh r2, [r4, r2] + ldr r3, [r4, r3] + ldr r0, [r4, r0] + mov r1, #0x23 + mul r2, r3 + bl sub_0202CF70 +_0224E684: + add r0, r4, #0 + mov r1, #1 + bl ov7_0224DAF8 + mov r1, #0x92 + lsl r1, r1, #2 + ldrsh r0, [r4, r1] + cmp r0, #1 + ble _0224E69E + mov r2, #2 + sub r0, r1, #5 + strb r2, [r4, r0] + b _0224E6B0 +_0224E69E: + sub r0, r1, #5 + ldrb r0, [r4, r0] + cmp r0, #0xff + beq _0224E6B0 + sub r0, r1, #5 + ldrb r0, [r4, r0] + add r2, r0, #1 + sub r0, r1, #5 + strb r2, [r4, r0] +_0224E6B0: + mov r0, #0xa + pop {r4, pc} + ; .align 2, 0 +_0224E6B4: .word 0x00000245 + thumb_func_end ov7_0224E5B0 + + thumb_func_start ov7_0224E6B8 +ov7_0224E6B8: ; 0x0224E6B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #9 + lsl r0, r0, #6 + ldrb r0, [r5, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224E6CE + mov r0, #0xa + pop {r3, r4, r5, pc} +_0224E6CE: + ldr r0, _0224E7BC ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224E7B6 + mov r0, #0x8a + lsl r0, r0, #2 + ldr r1, [r5, r0] + cmp r1, #1 + bne _0224E6EA + sub r0, r0, #4 + ldr r0, [r5, r0] + bl sub_0206B3B4 +_0224E6EA: + ldr r0, _0224E7C0 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #0 + beq _0224E6F6 + cmp r0, #3 + bne _0224E774 +_0224E6F6: + ldr r1, _0224E7C4 ; =0x00000246 + ldrh r0, [r5, r1] + cmp r0, #4 + bne _0224E774 + add r0, r1, #2 + ldrsh r0, [r5, r0] + cmp r0, #0xa + blt _0224E774 + sub r1, #0x36 + ldr r0, [r5, r1] + mov r1, #0xc + mov r2, #1 + mov r3, #0xb + bl sub_0207D570 + cmp r0, #1 + bne _0224E774 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0xa + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + add r0, #0x58 + mov r1, #0xf + bl sub_0201ADA4 + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0x20 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #0x58 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r5, r1] + sub r1, #0x20 + ldr r0, [r5, r1] + bl sub_0202CD88 + mov r1, #0x32 + bl sub_0202CF28 + mov r0, #0xb + pop {r3, r4, r5, pc} +_0224E774: + add r0, r5, #0 + add r0, #0x58 + mov r1, #0 + bl sub_0200E084 + add r0, r5, #0 + mov r1, #0 + bl ov7_0224EB38 + mov r1, #0x7e + lsl r1, r1, #2 + ldr r0, [r5, r1] + add r1, #0x10 + ldrh r1, [r5, r1] + bl sub_02021CAC + mov r1, #0x7f + lsl r1, r1, #2 + ldr r0, [r5, r1] + add r1, #0xe + ldrh r1, [r5, r1] + bl sub_02021CAC + add r0, r5, #0 + mov r1, #0 + bl ov7_0224EC10 + add r5, #0x18 + add r0, r5, #0 + bl sub_0201A9A4 + mov r0, #4 + pop {r3, r4, r5, pc} +_0224E7B6: + mov r0, #0xa + pop {r3, r4, r5, pc} + nop +_0224E7BC: .word 0x021BF67C +_0224E7C0: .word 0x00000245 +_0224E7C4: .word 0x00000246 + thumb_func_end ov7_0224E6B8 + + thumb_func_start ov7_0224E7C8 +ov7_0224E7C8: ; 0x0224E7C8 + push {r4, lr} + add r4, r0, #0 + mov r0, #9 + lsl r0, r0, #6 + ldrb r0, [r4, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224E7DE + mov r0, #0xb + pop {r4, pc} +_0224E7DE: + ldr r0, _0224E830 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0224E82A + add r0, r4, #0 + add r0, #0x58 + mov r1, #0 + bl sub_0200E084 + add r0, r4, #0 + mov r1, #0 + bl ov7_0224EB38 + mov r1, #0x7e + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0x10 + ldrh r1, [r4, r1] + bl sub_02021CAC + mov r1, #0x7f + lsl r1, r1, #2 + ldr r0, [r4, r1] + add r1, #0xe + ldrh r1, [r4, r1] + bl sub_02021CAC + add r0, r4, #0 + mov r1, #0 + bl ov7_0224EC10 + add r4, #0x18 + add r0, r4, #0 + bl sub_0201A9A4 + mov r0, #4 + pop {r4, pc} +_0224E82A: + mov r0, #0xb + pop {r4, pc} + nop +_0224E830: .word 0x021BF67C + thumb_func_end ov7_0224E7C8 + + thumb_func_start ov7_0224E834 +ov7_0224E834: ; 0x0224E834 + push {r3, r4, r5, lr} + add r4, r0, #0 + ldr r0, _0224E88C ; =0x00000245 + add r3, r1, #0 + ldrb r0, [r4, r0] + add r5, r2, #0 + cmp r0, #0 + bne _0224E852 + add r4, #0x8c + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, r3, #0 + bl sub_0200B70C + pop {r3, r4, r5, pc} +_0224E852: + cmp r0, #3 + bne _0224E864 + add r4, #0x8c + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, r3, #0 + bl sub_0200B70C + pop {r3, r4, r5, pc} +_0224E864: + cmp r0, #1 + bne _0224E876 + add r4, #0x8c + ldr r0, [r4, #0] + add r1, r5, #0 + add r2, r3, #0 + bl sub_0200BC80 + pop {r3, r4, r5, pc} +_0224E876: + lsl r0, r3, #0x18 + lsr r0, r0, #0x18 + bl sub_02098164 + add r4, #0x8c + add r2, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + bl sub_0200BE64 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224E88C: .word 0x00000245 + thumb_func_end ov7_0224E834 + + thumb_func_start ov7_0224E890 +ov7_0224E890: ; 0x0224E890 + push {r3, lr} + ldr r2, _0224E8C8 ; =0x00000245 + ldrb r2, [r0, r2] + cmp r2, #0 + bne _0224E8A6 + add r0, r1, #0 + mov r1, #0 + mov r2, #0xb + bl sub_0207CFF0 + pop {r3, pc} +_0224E8A6: + cmp r2, #3 + bne _0224E8B0 + bl ov7_0224E8CC + pop {r3, pc} +_0224E8B0: + cmp r2, #1 + bne _0224E8BC + add r0, r1, #0 + bl sub_0205745C + pop {r3, pc} +_0224E8BC: + lsl r0, r1, #0x18 + lsr r0, r0, #0x18 + bl sub_020981D0 + pop {r3, pc} + nop +_0224E8C8: .word 0x00000245 + thumb_func_end ov7_0224E890 + + thumb_func_start ov7_0224E8CC +ov7_0224E8CC: ; 0x0224E8CC + ldr r3, _0224E8EC ; =0x0224F3F8 + mov r2, #0 +_0224E8D0: + ldrh r0, [r3] + cmp r1, r0 + bne _0224E8DE + ldr r0, _0224E8F0 ; =0x0224F3FA + lsl r1, r2, #2 + ldrh r0, [r0, r1] + bx lr +_0224E8DE: + add r2, r2, #1 + add r3, r3, #4 + cmp r2, #0x29 + blo _0224E8D0 + mov r0, #0 + bx lr + nop +_0224E8EC: .word 0x0224F3F8 +_0224E8F0: .word 0x0224F3FA + thumb_func_end ov7_0224E8CC + + thumb_func_start ov7_0224E8F4 +ov7_0224E8F4: ; 0x0224E8F4 + push {r3, lr} + ldr r1, _0224E91C ; =0x00000245 + ldrb r2, [r0, r1] + cmp r2, #3 + bne _0224E910 + sub r1, #0x25 + ldr r0, [r0, r1] + bl sub_0202D750 + mov r1, #0 + add r2, r1, #0 + bl sub_0202D230 + pop {r3, pc} +_0224E910: + sub r1, #0x39 + ldr r0, [r0, r1] + bl sub_02025F74 + pop {r3, pc} + nop +_0224E91C: .word 0x00000245 + thumb_func_end ov7_0224E8F4 + + thumb_func_start ov7_0224E920 +ov7_0224E920: ; 0x0224E920 + push {r4, lr} + ldr r2, _0224E94C ; =0x00000245 + add r4, r1, #0 + ldrb r3, [r0, r2] + cmp r3, #3 + bne _0224E940 + sub r2, #0x25 + ldr r0, [r0, r2] + bl sub_0202D750 + lsl r1, r4, #0x10 + lsr r1, r1, #0x10 + mov r2, #6 + bl sub_0202D230 + pop {r4, pc} +_0224E940: + sub r2, #0x39 + ldr r0, [r0, r2] + bl sub_02025FB8 + pop {r4, pc} + nop +_0224E94C: .word 0x00000245 + thumb_func_end ov7_0224E920 + + thumb_func_start ov7_0224E950 +ov7_0224E950: ; 0x0224E950 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, _0224EA20 ; =0x00000241 + add r5, r1, #0 + add r1, r0, #1 + ldrb r2, [r5, r0] + ldrb r1, [r5, r1] + cmp r2, r1 + beq _0224E98C + ldr r4, _0224EA24 ; =0x0224F2E0 + add r3, sp, #0 + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + add r1, r5, #0 + str r0, [r3, #0] + add r1, #0x90 + ldr r1, [r1, #0] + add r0, r2, #0 + bl sub_02020990 + ldr r0, _0224EA20 ; =0x00000241 + add sp, #0xc + ldrb r1, [r5, r0] + add r1, r1, #1 + strb r1, [r5, r0] + mov r0, #0xc + pop {r4, r5, pc} +_0224E98C: + mov r1, #0 + strb r1, [r5, r0] + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + ldr r1, [r4, #0x24] + bl sub_020203C0 + add r0, r5, #0 + add r0, #0x90 + ldr r0, [r0, #0] + bl sub_020203B8 + ldr r0, [r4, #0x24] + bl sub_020203D4 + add r0, r5, #0 + bl ov7_0224EB14 + ldr r0, _0224EA28 ; =0x00000245 + ldrb r0, [r5, r0] + cmp r0, #3 + bne _0224E9C0 + add sp, #0xc + mov r0, #0x13 + pop {r4, r5, pc} +_0224E9C0: + add r1, r5, #0 + ldr r0, [r4, #8] + add r1, #0x18 + mov r2, #3 + bl sub_0205D8F4 + mov r1, #0x85 + lsl r1, r1, #2 + add r0, r5, #0 + ldr r1, [r5, r1] + add r0, #0x18 + bl sub_0205D944 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0x20 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #0x18 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r5, r1] + mov r0, #0xd + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224EA20: .word 0x00000241 +_0224EA24: .word 0x0224F2E0 +_0224EA28: .word 0x00000245 + thumb_func_end ov7_0224E950 + + thumb_func_start ov7_0224EA2C +ov7_0224EA2C: ; 0x0224EA2C + push {r4, lr} + add r4, r0, #0 + mov r0, #9 + lsl r0, r0, #6 + ldrb r0, [r4, r0] + bl sub_0205DA04 + cmp r0, #0 + bne _0224EA42 + mov r0, #0xd + pop {r4, pc} +_0224EA42: + add r0, r4, #0 + add r0, #0x18 + bl sub_0201A8FC + add r0, r4, #0 + bl ov7_0224D040 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov7_0224EA2C + + thumb_func_start ov7_0224EA54 +ov7_0224EA54: ; 0x0224EA54 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _0224EACC ; =0x00000245 + add r4, r1, #0 + ldrb r0, [r4, r0] + cmp r0, #3 + bne _0224EA70 + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #0x1f + bl sub_0200B1EC + b _0224EA7C +_0224EA70: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #1 + bl sub_0200B1EC +_0224EA7C: + add r6, r0, #0 + add r0, r4, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + add r1, r4, #0 + ldr r0, [r5, #8] + add r1, #0x18 + mov r2, #3 + bl sub_0205D8F4 + mov r1, #0x85 + lsl r1, r1, #2 + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0x18 + bl sub_0205D944 + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r4, r2] + sub r2, #0x20 + add r0, r4, #0 + ldr r2, [r4, r2] + add r0, #0x18 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r4, r1] + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224EACC: .word 0x00000245 + thumb_func_end ov7_0224EA54 + + thumb_func_start ov7_0224EAD0 +ov7_0224EAD0: ; 0x0224EAD0 + push {r3, r4, r5, r6, r7, lr} + ldr r1, _0224EB0C ; =0x0224F2EC + add r5, r0, #0 + add r0, #0x94 + mov r2, #4 + mov r3, #0xb + bl ov5_021D2F14 + add r7, r5, #0 + ldr r4, _0224EB10 ; =0x0224F358 + mov r6, #0 + add r7, #0x94 +_0224EAE8: + add r0, r7, #0 + add r1, r4, #0 + bl ov5_021D3104 + mov r1, #0x7e + lsl r1, r1, #2 + str r0, [r5, r1] + add r6, r6, #1 + add r4, #0x28 + add r5, r5, #4 + cmp r6, #4 + blo _0224EAE8 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + pop {r3, r4, r5, r6, r7, pc} + nop +_0224EB0C: .word 0x0224F2EC +_0224EB10: .word 0x0224F358 + thumb_func_end ov7_0224EAD0 + + thumb_func_start ov7_0224EB14 +ov7_0224EB14: ; 0x0224EB14 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r6, #0x7e + mov r4, #0 + add r5, r7, #0 + lsl r6, r6, #2 +_0224EB20: + ldr r0, [r5, r6] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blo _0224EB20 + add r7, #0x94 + add r0, r7, #0 + bl ov5_021D30A8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov7_0224EB14 + + thumb_func_start ov7_0224EB38 +ov7_0224EB38: ; 0x0224EB38 + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + bne _0224EB5E + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xb1 + mov r2, #8 + bl sub_0200D494 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xb1 + mov r2, #0x84 + bl sub_0200D494 + pop {r4, pc} +_0224EB5E: + mov r0, #0x7e + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa2 + mov r2, #0x6c + bl sub_0200D494 + mov r0, #0x7f + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa2 + mov r2, #0x84 + bl sub_0200D494 + pop {r4, pc} + thumb_func_end ov7_0224EB38 + + thumb_func_start ov7_0224EB7C +ov7_0224EB7C: ; 0x0224EB7C + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _0224EC0C ; =0x00000245 + add r6, r1, #0 + ldrb r1, [r4, r0] + cmp r1, #0 + beq _0224EB9E + cmp r1, #3 + beq _0224EB9E + sub r0, #0x41 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + add sp, #8 + pop {r4, r5, r6, pc} +_0224EB9E: + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #2 + bl sub_02009DC8 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #1 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0x71 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + mov r2, #0x10 + bl sub_02009968 + add r0, r5, #0 + bl sub_0200A4C0 + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02009DC8 + add r5, r0, #0 + add r0, r6, #0 + mov r1, #2 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #0x72 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + mov r2, #0x10 + bl sub_020099D4 + add r0, r5, #0 + bl sub_0200A6B8 + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0224EC0C: .word 0x00000245 + thumb_func_end ov7_0224EB7C + + thumb_func_start ov7_0224EC10 +ov7_0224EC10: ; 0x0224EC10 + mov r2, #2 + lsl r2, r2, #8 + ldr r3, _0224EC1C ; =sub_0200D414 + ldr r0, [r0, r2] + bx r3 + nop +_0224EC1C: .word sub_0200D414 + thumb_func_end ov7_0224EC10 + + thumb_func_start ov7_0224EC20 +ov7_0224EC20: ; 0x0224EC20 + push {r4, lr} + mov r0, #0 + add r4, r1, #0 + bl ov5_021D1744 + ldr r0, _0224EC34 ; =0x00000233 + mov r1, #0xf + strb r1, [r4, r0] + pop {r4, pc} + nop +_0224EC34: .word 0x00000233 + thumb_func_end ov7_0224EC20 + + thumb_func_start ov7_0224EC38 +ov7_0224EC38: ; 0x0224EC38 + push {r4, r5, r6, lr} + add r6, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _0224EC8E + add r0, r6, #0 + bl sub_02050A60 + add r5, r0, #0 + add r0, r6, #0 + bl sub_02050A64 + add r4, r0, #0 + bl ov7_0224D21C + ldr r0, [r5, #0xc] + bl sub_0207D990 + ldr r1, _0224EC90 ; =0x0224F49C + mov r2, #0xb + bl sub_0207D824 + add r3, r5, #0 + str r0, [r4, #4] + add r3, #0x98 + ldr r1, [r5, #0xc] + ldr r3, [r3, #0] + mov r2, #2 + bl sub_0207CB2C + ldr r1, [r4, #4] + add r0, r5, #0 + bl sub_0203D1E4 + ldr r1, _0224EC94 ; =0x0209AC15 + add r0, r6, #0 + add r2, r4, #0 + bl sub_02050924 + ldr r0, _0224EC98 ; =0x00000233 + mov r1, #0x10 + strb r1, [r4, r0] +_0224EC8E: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224EC90: .word 0x0224F49C +_0224EC94: .word 0x0209AC15 +_0224EC98: .word 0x00000233 + thumb_func_end ov7_0224EC38 + + thumb_func_start ov7_0224EC9C +ov7_0224EC9C: ; 0x0224EC9C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r5, r1, #0 + bl sub_0200F2AC + cmp r0, #0 + bne _0224ECAE + mov r0, #0x12 + pop {r3, r4, r5, pc} +_0224ECAE: + add r1, r5, #0 + ldr r0, [r4, #8] + add r1, #0x18 + mov r2, #3 + bl sub_0205D8F4 + mov r1, #0x85 + lsl r1, r1, #2 + add r0, r5, #0 + ldr r1, [r5, r1] + add r0, #0x18 + bl sub_0205D944 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x8d + add r0, #0x8c + lsl r1, r1, #2 + ldr r0, [r0, #0] + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + mov r2, #0x8d + lsl r2, r2, #2 + ldr r1, [r5, r2] + sub r2, #0x20 + add r0, r5, #0 + ldr r2, [r5, r2] + add r0, #0x18 + mov r3, #1 + bl sub_0205D994 + mov r1, #9 + lsl r1, r1, #6 + strb r0, [r5, r1] + mov r0, #0xd + pop {r3, r4, r5, pc} + thumb_func_end ov7_0224EC9C + + .rodata + + + .global Unk_ov7_0224F2BC +Unk_ov7_0224F2BC: ; 0x0224F2BC + .incbin "incbin/overlay7_rodata.bin", 0x5B0, 0x5B8 - 0x5B0 + + .global Unk_ov7_0224F2C4 +Unk_ov7_0224F2C4: ; 0x0224F2C4 + .incbin "incbin/overlay7_rodata.bin", 0x5B8, 0x5C0 - 0x5B8 + + .global Unk_ov7_0224F2CC +Unk_ov7_0224F2CC: ; 0x0224F2CC + .incbin "incbin/overlay7_rodata.bin", 0x5C0, 0x5C8 - 0x5C0 + + .global Unk_ov7_0224F2D4 +Unk_ov7_0224F2D4: ; 0x0224F2D4 + .incbin "incbin/overlay7_rodata.bin", 0x5C8, 0x5D4 - 0x5C8 + + .global Unk_ov7_0224F2E0 +Unk_ov7_0224F2E0: ; 0x0224F2E0 + .incbin "incbin/overlay7_rodata.bin", 0x5D4, 0x5E0 - 0x5D4 + + .global Unk_ov7_0224F2EC +Unk_ov7_0224F2EC: ; 0x0224F2EC + .incbin "incbin/overlay7_rodata.bin", 0x5E0, 0x5FC - 0x5E0 + + .global Unk_ov7_0224F308 +Unk_ov7_0224F308: ; 0x0224F308 + .incbin "incbin/overlay7_rodata.bin", 0x5FC, 0x61C - 0x5FC + + .global Unk_ov7_0224F328 +Unk_ov7_0224F328: ; 0x0224F328 + .incbin "incbin/overlay7_rodata.bin", 0x61C, 0x64C - 0x61C + + .global Unk_ov7_0224F358 +Unk_ov7_0224F358: ; 0x0224F358 + .incbin "incbin/overlay7_rodata.bin", 0x64C, 0x6EC - 0x64C + + .global Unk_ov7_0224F3F8 +Unk_ov7_0224F3F8: ; 0x0224F3F8 + .incbin "incbin/overlay7_rodata.bin", 0x6EC, 0x790 - 0x6EC + + .global Unk_ov7_0224F49C +Unk_ov7_0224F49C: ; 0x0224F49C + .incbin "incbin/overlay7_rodata.bin", 0x790, 0x9 + + + .data + + + .global Unk_ov7_0224F510 +Unk_ov7_0224F510: ; 0x0224F510 + .incbin "incbin/overlay7_data.bin", 0x50, 0x64 - 0x50 + + .global Unk_ov7_0224F524 +Unk_ov7_0224F524: ; 0x0224F524 + .incbin "incbin/overlay7_data.bin", 0x64, 0x7C - 0x64 + + .global Unk_ov7_0224F53C +Unk_ov7_0224F53C: ; 0x0224F53C + .incbin "incbin/overlay7_data.bin", 0x7C, 0x94 - 0x7C + + .global Unk_ov7_0224F554 +Unk_ov7_0224F554: ; 0x0224F554 + .incbin "incbin/overlay7_data.bin", 0x94, 0xAC - 0x94 + + .global Unk_ov7_0224F56C +Unk_ov7_0224F56C: ; 0x0224F56C + .incbin "incbin/overlay7_data.bin", 0xAC, 0x16 + diff --git a/asm/ov80_021D0D80.s b/asm/ov80_021D0D80.s new file mode 100644 index 000000000..3532fe139 --- /dev/null +++ b/asm/ov80_021D0D80.s @@ -0,0 +1,891 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov80_021D0D80 +ov80_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02006840 + mov r2, #2 + add r5, r0, #0 + mov r0, #3 + mov r1, #0x11 + lsl r2, r2, #0x10 + bl sub_02017FC8 + add r0, r4, #0 + mov r1, #0xe4 + mov r2, #0x11 + bl sub_0200681C + mov r1, #0 + mov r2, #0xe4 + add r4, r0, #0 + bl sub_020D5124 + ldr r0, _021D0DD4 ; =0x00000139 + str r5, [r4, #0x2c] + ldrb r0, [r5, r0] + cmp r0, #3 + bhs _021D0DB6 + b _021D0DB8 +_021D0DB6: + mov r0, #0 +_021D0DB8: + strb r0, [r4] + mov r0, #0x4f + lsl r0, r0, #2 + ldrh r0, [r5, r0] + mov r1, #0 + add r2, r1, #0 + strh r0, [r4, #2] + mov r0, #0x11 + str r0, [r4, #4] + mov r0, #0x37 + bl sub_02004550 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D0DD4: .word 0x00000139 + thumb_func_end ov80_021D0D80 + + thumb_func_start ov80_021D0DD8 +ov80_021D0DD8: ; 0x021D0DD8 + push {r4, lr} + bl sub_0200682C + add r4, r0, #0 + ldr r1, [r4, #8] + cmp r1, #8 + bhi _021D0E4A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D0DF2: ; jump table + .short _021D0E04 - _021D0DF2 - 2 ; case 0 + .short _021D0E0C - _021D0DF2 - 2 ; case 1 + .short _021D0E4A - _021D0DF2 - 2 ; case 2 + .short _021D0E14 - _021D0DF2 - 2 ; case 3 + .short _021D0E22 - _021D0DF2 - 2 ; case 4 + .short _021D0E4A - _021D0DF2 - 2 ; case 5 + .short _021D0E30 - _021D0DF2 - 2 ; case 6 + .short _021D0E46 - _021D0DF2 - 2 ; case 7 + .short _021D0E3E - _021D0DF2 - 2 ; case 8 +_021D0E04: + bl ov80_021D132C + str r0, [r4, #8] + b _021D0E4A +_021D0E0C: + bl ov80_021D1354 + str r0, [r4, #8] + b _021D0E4A +_021D0E14: + bl ov80_021D138C + str r0, [r4, #8] + add r0, r4, #0 + bl ov80_021D1068 + b _021D0E4A +_021D0E22: + bl ov80_021D13A0 + str r0, [r4, #8] + add r0, r4, #0 + bl ov80_021D1068 + b _021D0E4A +_021D0E30: + bl ov80_021D13DC + str r0, [r4, #8] + add r0, r4, #0 + bl ov80_021D1068 + b _021D0E4A +_021D0E3E: + bl ov80_021D1438 + str r0, [r4, #8] + b _021D0E4A +_021D0E46: + mov r0, #1 + pop {r4, pc} +_021D0E4A: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov80_021D0DD8 + + thumb_func_start ov80_021D0E50 +ov80_021D0E50: ; 0x021D0E50 + push {r4, lr} + add r4, r0, #0 + bl sub_0200682C + add r0, r4, #0 + bl sub_02006830 + mov r0, #0x11 + bl sub_0201807C + mov r0, #1 + pop {r4, pc} + thumb_func_end ov80_021D0E50 + + thumb_func_start ov80_021D0E68 +ov80_021D0E68: ; 0x021D0E68 + push {r4, lr} + add r4, r0, #0 + ldrb r2, [r4] + mov r1, #0x24 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D0E9C ; =0x021D2EB4 + ldr r1, [r1, r3] + cmp r1, #0 + beq _021D0E7E + blx r1 +_021D0E7E: + bl sub_020A635C + add r0, r4, #0 + bl ov80_021D2AEC + ldr r0, [r4, #0x28] + bl sub_0201C2B8 + ldr r3, _021D0EA0 ; =0x027E0000 + ldr r1, _021D0EA4 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + ; .align 2, 0 +_021D0E9C: .word 0x021D2EB4 +_021D0EA0: .word 0x027E0000 +_021D0EA4: .word 0x00003FF8 + thumb_func_end ov80_021D0E68 + + thumb_func_start ov80_021D0EA8 +ov80_021D0EA8: ; 0x021D0EA8 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D0EC4 ; =0x021D2E6C + add r3, sp, #0 + mov r2, #5 +_021D0EB2: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D0EB2 + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D0EC4: .word 0x021D2E6C + thumb_func_end ov80_021D0EA8 + + thumb_func_start ov80_021D0EC8 +ov80_021D0EC8: ; 0x021D0EC8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _021D0EDC + cmp r0, #1 + beq _021D0F82 + cmp r0, #2 + beq _021D0FAE + b _021D0FCC +_021D0EDC: + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D0FD8 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D0FDC ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + ldr r0, [r4, #0x2c] + ldr r1, [r0, #0] + cmp r1, #0 + bne _021D0F1C + ldr r0, [r0, #4] + cmp r0, #0 + bne _021D0F1C + mov r0, #3 + str r0, [r4, #0x20] + mov r0, #0x1b + str r0, [r4, #0x24] + b _021D0F34 +_021D0F1C: + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r0, r0, #5 + str r0, [r4, #0x20] + ldr r0, [r4, #0x2c] + ldr r1, [r0, #4] + asr r0, r1, #4 + lsr r0, r0, #0x1b + add r0, r1, r0 + asr r0, r0, #5 + str r0, [r4, #0x24] +_021D0F34: + ldr r0, [r4, #0x20] + ldr r2, _021D0FE0 ; =0x000001B1 + str r0, [r4, #0x18] + ldr r0, [r4, #0x24] + mov r1, #0x1a + str r0, [r4, #0x1c] + ldr r3, [r4, #4] + mov r0, #1 + bl sub_0200B144 + add r1, r4, #0 + add r1, #0x80 + str r0, [r1, #0] + ldr r2, _021D0FE4 ; =0x00000267 + ldr r3, [r4, #4] + mov r0, #1 + mov r1, #0x1a + bl sub_0200B144 + add r1, r4, #0 + add r1, #0x84 + str r0, [r1, #0] + ldr r1, [r4, #4] + mov r0, #0x16 + bl sub_02023790 + add r1, r4, #0 + add r1, #0x88 + str r0, [r1, #0] + ldr r0, [r4, #4] + bl sub_02039EBC + str r0, [r4, #0x30] + ldr r0, _021D0FE8 ; =0x021D3380 + ldr r1, [r4, #4] + bl ov80_021D2D70 + str r0, [r4, #0x40] + b _021D0FCC +_021D0F82: + bl ov80_021D0EA8 + ldr r0, [r4, #4] + bl sub_02018340 + str r0, [r4, #0x28] + ldr r1, [r4, #0x28] + add r0, r4, #0 + bl ov80_021D1088 + add r0, r4, #0 + bl ov80_021D1158 + bl sub_0201E3D8 + mov r0, #4 + bl sub_0201E450 + add r0, r4, #0 + bl ov80_021D2A08 + b _021D0FCC +_021D0FAE: + ldr r0, _021D0FEC ; =ov80_021D0E68 + add r1, r4, #0 + bl sub_02017798 + ldrb r1, [r4] + mov r0, #0x24 + add r2, r1, #0 + mul r2, r0 + ldr r0, _021D0FF0 ; =0x021D2EA4 + ldr r0, [r0, r2] + str r0, [r4, #0x38] + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #1 + pop {r4, pc} +_021D0FCC: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} + nop +_021D0FD8: .word 0xFFFFE0FF +_021D0FDC: .word 0x04001000 +_021D0FE0: .word 0x000001B1 +_021D0FE4: .word 0x00000267 +_021D0FE8: .word 0x021D3380 +_021D0FEC: .word ov80_021D0E68 +_021D0FF0: .word 0x021D2EA4 + thumb_func_end ov80_021D0EC8 + + thumb_func_start ov80_021D0FF4 +ov80_021D0FF4: ; 0x021D0FF4 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0201E530 + mov r0, #0x1f + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x1f + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + add r0, r5, #0 + bl ov80_021D2AC0 + add r0, r5, #0 + bl ov80_021D12D8 + mov r4, #0 +_021D1026: + lsl r1, r4, #0x18 + ldr r0, [r5, #0x28] + lsr r1, r1, #0x18 + bl sub_02019044 + add r4, r4, #1 + cmp r4, #8 + blt _021D1026 + ldr r0, [r5, #0x28] + bl sub_020181C4 + ldr r0, [r5, #0x40] + bl ov80_021D2E10 + ldr r0, [r5, #0x30] + bl sub_02039EF0 + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + bl sub_020237BC + add r0, r5, #0 + add r0, #0x84 + ldr r0, [r0, #0] + bl sub_0200B190 + add r5, #0x80 + ldr r0, [r5, #0] + bl sub_0200B190 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov80_021D0FF4 + + thumb_func_start ov80_021D1068 +ov80_021D1068: ; 0x021D1068 + push {r4, lr} + add r4, r0, #0 + ldrb r2, [r4] + mov r1, #0x24 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D1084 ; =0x021D2EAC + ldr r1, [r1, r3] + blx r1 + add r0, r4, #0 + bl ov80_021D2AE0 + pop {r4, pc} + nop +_021D1084: .word 0x021D2EAC + thumb_func_end ov80_021D1068 + + thumb_func_start ov80_021D1088 +ov80_021D1088: ; 0x021D1088 + push {r4, r5, r6, r7, lr} + sub sp, #0xf4 + ldr r4, _021D1150 ; =0x021D2E5C + add r3, sp, #4 + str r0, [sp] + add r6, r1, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r4, _021D1154 ; =0x021D2F00 + add r3, sp, #0x14 + mov r2, #0x1c +_021D10AA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D10AA + mov r4, #0 + add r7, r4, #0 + add r5, sp, #0x14 +_021D10B8: + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + add r2, r5, #0 + mov r3, #0 + bl sub_020183C4 + lsl r1, r4, #0x18 + add r0, r6, #0 + lsr r1, r1, #0x18 + add r4, r4, #1 + bl sub_02019EBC + add r7, r7, #1 + add r5, #0x1c + cmp r7, #8 + blt _021D10B8 + ldr r3, [sp] + mov r0, #0 + ldr r3, [r3, #4] + mov r1, #0x20 + add r2, r0, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #1 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #2 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #3 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #4 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #5 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #6 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + ldr r3, [sp] + mov r0, #7 + ldr r3, [r3, #4] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + add sp, #0xf4 + pop {r4, r5, r6, r7, pc} + nop +_021D1150: .word 0x021D2E5C +_021D1154: .word 0x021D2F00 + thumb_func_end ov80_021D1088 + + thumb_func_start ov80_021D1158 +ov80_021D1158: ; 0x021D1158 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + ldr r1, [r5, #4] + mov r0, #0x11 + bl sub_02006C24 + add r4, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x28] + ldr r1, [r5, #4] + add r2, r4, #0 + mov r3, #0x11 + bl sub_0208C210 + mov r0, #0x14 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x28] + ldr r1, [r5, #4] + add r2, r4, #0 + mov r3, #0x11 + bl sub_0208C210 + mov r0, #0x15 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x28] + ldr r1, [r5, #4] + add r2, r4, #0 + mov r3, #0x11 + bl sub_0208C210 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + str r1, [sp, #0xc] + str r1, [sp, #0x10] + ldr r0, [r5, #0x28] + ldr r1, [r5, #4] + add r2, r4, #0 + mov r3, #0x11 + bl sub_0208C210 + mov r0, #1 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [r5, #0x28] + ldr r1, [r5, #4] + add r2, r4, #0 + mov r3, #0x11 + bl sub_0208C210 + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x18 + add r3, #0xb8 + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0x98 + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x16 + add r3, #0xbc + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0x9c + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x17 + add r3, #0xc0 + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0xa0 + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x19 + add r3, #0xc4 + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0xa4 + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x1a + add r3, #0xc8 + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0xa8 + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x1b + add r3, #0xcc + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0xac + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x1c + add r3, #0xd0 + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0xb0 + str r0, [r1, #0] + ldr r0, [r5, #4] + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x11 + mov r2, #0x1d + add r3, #0xd4 + bl sub_0208C2F4 + add r1, r5, #0 + add r1, #0xb4 + str r0, [r1, #0] + add r0, r4, #0 + bl sub_02006CA8 + mov r1, #0x1e + ldr r2, [r5, #4] + mov r0, #0 + lsl r1, r1, #4 + bl sub_02002E7C + mov r1, #0x1e + ldr r2, [r5, #4] + mov r0, #4 + lsl r1, r1, #4 + bl sub_02002E7C + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov80_021D1158 + + thumb_func_start ov80_021D12D8 +ov80_021D12D8: ; 0x021D12D8 + push {r4, lr} + add r4, r0, #0 + add r0, #0xb4 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xb0 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xac + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xa8 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xa4 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0xa0 + ldr r0, [r0, #0] + bl sub_020181C4 + add r0, r4, #0 + add r0, #0x9c + ldr r0, [r0, #0] + bl sub_020181C4 + add r4, #0x98 + ldr r0, [r4, #0] + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov80_021D12D8 + + thumb_func_start ov80_021D132C +ov80_021D132C: ; 0x021D132C + push {r4, lr} + add r4, r0, #0 + bl ov80_021D0EC8 + cmp r0, #1 + beq _021D133C + mov r0, #0 + pop {r4, pc} +_021D133C: + ldrb r2, [r4] + mov r1, #0x24 + add r0, r4, #0 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D1350 ; =0x021D2E94 + ldr r1, [r1, r3] + blx r1 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_021D1350: .word 0x021D2E94 + thumb_func_end ov80_021D132C + + thumb_func_start ov80_021D1354 +ov80_021D1354: ; 0x021D1354 + push {r4, lr} + add r4, r0, #0 + ldrb r2, [r4] + mov r1, #0x24 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D1384 ; =0x021D2E98 + ldr r1, [r1, r3] + blx r1 + cmp r0, #1 + beq _021D136E + mov r0, #1 + pop {r4, pc} +_021D136E: + ldrb r2, [r4] + mov r1, #0x24 + add r0, r4, #0 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D1388 ; =0x021D2E9C + ldr r1, [r1, r3] + blx r1 + mov r0, #3 + pop {r4, pc} + nop +_021D1384: .word 0x021D2E98 +_021D1388: .word 0x021D2E9C + thumb_func_end ov80_021D1354 + + thumb_func_start ov80_021D138C +ov80_021D138C: ; 0x021D138C + push {r3, lr} + bl sub_0200F2AC + cmp r0, #0 + beq _021D139A + mov r0, #4 + pop {r3, pc} +_021D139A: + mov r0, #3 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov80_021D138C + + thumb_func_start ov80_021D13A0 +ov80_021D13A0: ; 0x021D13A0 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x38] + blx r1 + cmp r0, #1 + beq _021D13C0 + ldrb r2, [r4] + mov r1, #0x24 + add r0, r4, #0 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D13D4 ; =0x021D2EA8 + ldr r1, [r1, r3] + blx r1 + mov r0, #4 + pop {r4, pc} +_021D13C0: + ldrb r2, [r4] + mov r1, #0x24 + add r0, r4, #0 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D13D8 ; =0x021D2EA0 + ldr r1, [r1, r3] + blx r1 + mov r0, #6 + pop {r4, pc} + ; .align 2, 0 +_021D13D4: .word 0x021D2EA8 +_021D13D8: .word 0x021D2EA0 + thumb_func_end ov80_021D13A0 + + thumb_func_start ov80_021D13DC +ov80_021D13DC: ; 0x021D13DC + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _021D141A + mov r1, #0 + ldr r0, _021D1430 ; =0x04000050 + add r2, r1, #0 + mov r3, #0x1f + str r1, [sp] + bl sub_020BF55C + mov r0, #0 + add r1, r0, #0 + bl sub_0200F344 + mov r0, #1 + mov r1, #0 + bl sub_0200F344 + mov r0, #0 + bl sub_0200F32C + mov r0, #1 + bl sub_0200F32C + add sp, #4 + mov r0, #8 + pop {r3, r4, pc} +_021D141A: + ldrb r2, [r4] + mov r1, #0x24 + add r0, r4, #0 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D1434 ; =0x021D2EA8 + ldr r1, [r1, r3] + blx r1 + mov r0, #6 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_021D1430: .word 0x04000050 +_021D1434: .word 0x021D2EA8 + thumb_func_end ov80_021D13DC + + thumb_func_start ov80_021D1438 +ov80_021D1438: ; 0x021D1438 + push {r4, lr} + add r4, r0, #0 + ldrb r2, [r4] + mov r1, #0x24 + add r3, r2, #0 + mul r3, r1 + ldr r1, _021D1454 ; =0x021D2EB0 + ldr r1, [r1, r3] + blx r1 + add r0, r4, #0 + bl ov80_021D0FF4 + mov r0, #7 + pop {r4, pc} + ; .align 2, 0 +_021D1454: .word 0x021D2EB0 + thumb_func_end ov80_021D1438 + + .rodata + + + .global Unk_ov80_021D2E5C +Unk_ov80_021D2E5C: ; 0x021D2E5C + .incbin "incbin/overlay80_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov80_021D2E6C +Unk_ov80_021D2E6C: ; 0x021D2E6C + .incbin "incbin/overlay80_rodata.bin", 0x10, 0x38 - 0x10 + + .global Unk_ov80_021D2E94 +Unk_ov80_021D2E94: ; 0x021D2E94 + .incbin "incbin/overlay80_rodata.bin", 0x38, 0xA4 - 0x38 + + .global Unk_ov80_021D2F00 +Unk_ov80_021D2F00: ; 0x021D2F00 + .incbin "incbin/overlay80_rodata.bin", 0xA4, 0xE0 + + + .data + + + .global Unk_ov80_021D3380 +Unk_ov80_021D3380: ; 0x021D3380 + .incbin "incbin/overlay80_data.bin", 0x0, 0x14 + diff --git a/asm/overlay80.s b/asm/ov80_021D1458.s similarity index 65% rename from asm/overlay80.s rename to asm/ov80_021D1458.s index e4b0118ae..d64cc6882 100644 --- a/asm/overlay80.s +++ b/asm/ov80_021D1458.s @@ -1,863 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov80_021D0D80 -ov80_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02006840 - mov r2, #2 - add r5, r0, #0 - mov r0, #3 - mov r1, #0x11 - lsl r2, r2, #0x10 - bl sub_02017FC8 - add r0, r4, #0 - mov r1, #0xe4 - mov r2, #0x11 - bl sub_0200681C - mov r1, #0 - mov r2, #0xe4 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _021D0DD4 ; =0x00000139 - str r5, [r4, #0x2c] - ldrb r0, [r5, r0] - cmp r0, #3 - bhs _021D0DB6 - b _021D0DB8 -_021D0DB6: - mov r0, #0 -_021D0DB8: - strb r0, [r4] - mov r0, #0x4f - lsl r0, r0, #2 - ldrh r0, [r5, r0] - mov r1, #0 - add r2, r1, #0 - strh r0, [r4, #2] - mov r0, #0x11 - str r0, [r4, #4] - mov r0, #0x37 - bl sub_02004550 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D0DD4: .word 0x00000139 - thumb_func_end ov80_021D0D80 - - thumb_func_start ov80_021D0DD8 -ov80_021D0DD8: ; 0x021D0DD8 - push {r4, lr} - bl sub_0200682C - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #8 - bhi _021D0E4A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D0DF2: ; jump table - .short _021D0E04 - _021D0DF2 - 2 ; case 0 - .short _021D0E0C - _021D0DF2 - 2 ; case 1 - .short _021D0E4A - _021D0DF2 - 2 ; case 2 - .short _021D0E14 - _021D0DF2 - 2 ; case 3 - .short _021D0E22 - _021D0DF2 - 2 ; case 4 - .short _021D0E4A - _021D0DF2 - 2 ; case 5 - .short _021D0E30 - _021D0DF2 - 2 ; case 6 - .short _021D0E46 - _021D0DF2 - 2 ; case 7 - .short _021D0E3E - _021D0DF2 - 2 ; case 8 -_021D0E04: - bl ov80_021D132C - str r0, [r4, #8] - b _021D0E4A -_021D0E0C: - bl ov80_021D1354 - str r0, [r4, #8] - b _021D0E4A -_021D0E14: - bl ov80_021D138C - str r0, [r4, #8] - add r0, r4, #0 - bl ov80_021D1068 - b _021D0E4A -_021D0E22: - bl ov80_021D13A0 - str r0, [r4, #8] - add r0, r4, #0 - bl ov80_021D1068 - b _021D0E4A -_021D0E30: - bl ov80_021D13DC - str r0, [r4, #8] - add r0, r4, #0 - bl ov80_021D1068 - b _021D0E4A -_021D0E3E: - bl ov80_021D1438 - str r0, [r4, #8] - b _021D0E4A -_021D0E46: - mov r0, #1 - pop {r4, pc} -_021D0E4A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov80_021D0DD8 - - thumb_func_start ov80_021D0E50 -ov80_021D0E50: ; 0x021D0E50 - push {r4, lr} - add r4, r0, #0 - bl sub_0200682C - add r0, r4, #0 - bl sub_02006830 - mov r0, #0x11 - bl sub_0201807C - mov r0, #1 - pop {r4, pc} - thumb_func_end ov80_021D0E50 - - thumb_func_start ov80_021D0E68 -ov80_021D0E68: ; 0x021D0E68 - push {r4, lr} - add r4, r0, #0 - ldrb r2, [r4] - mov r1, #0x24 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D0E9C ; =0x021D2EB4 - ldr r1, [r1, r3] - cmp r1, #0 - beq _021D0E7E - blx r1 -_021D0E7E: - bl sub_020A635C - add r0, r4, #0 - bl ov80_021D2AEC - ldr r0, [r4, #0x28] - bl sub_0201C2B8 - ldr r3, _021D0EA0 ; =0x027E0000 - ldr r1, _021D0EA4 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - ; .align 2, 0 -_021D0E9C: .word 0x021D2EB4 -_021D0EA0: .word 0x027E0000 -_021D0EA4: .word 0x00003FF8 - thumb_func_end ov80_021D0E68 - - thumb_func_start ov80_021D0EA8 -ov80_021D0EA8: ; 0x021D0EA8 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D0EC4 ; =0x021D2E6C - add r3, sp, #0 - mov r2, #5 -_021D0EB2: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D0EB2 - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D0EC4: .word 0x021D2E6C - thumb_func_end ov80_021D0EA8 - - thumb_func_start ov80_021D0EC8 -ov80_021D0EC8: ; 0x021D0EC8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D0EDC - cmp r0, #1 - beq _021D0F82 - cmp r0, #2 - beq _021D0FAE - b _021D0FCC -_021D0EDC: - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D0FD8 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D0FDC ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - ldr r0, [r4, #0x2c] - ldr r1, [r0, #0] - cmp r1, #0 - bne _021D0F1C - ldr r0, [r0, #4] - cmp r0, #0 - bne _021D0F1C - mov r0, #3 - str r0, [r4, #0x20] - mov r0, #0x1b - str r0, [r4, #0x24] - b _021D0F34 -_021D0F1C: - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r0, r0, #5 - str r0, [r4, #0x20] - ldr r0, [r4, #0x2c] - ldr r1, [r0, #4] - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r0, r0, #5 - str r0, [r4, #0x24] -_021D0F34: - ldr r0, [r4, #0x20] - ldr r2, _021D0FE0 ; =0x000001B1 - str r0, [r4, #0x18] - ldr r0, [r4, #0x24] - mov r1, #0x1a - str r0, [r4, #0x1c] - ldr r3, [r4, #4] - mov r0, #1 - bl sub_0200B144 - add r1, r4, #0 - add r1, #0x80 - str r0, [r1, #0] - ldr r2, _021D0FE4 ; =0x00000267 - ldr r3, [r4, #4] - mov r0, #1 - mov r1, #0x1a - bl sub_0200B144 - add r1, r4, #0 - add r1, #0x84 - str r0, [r1, #0] - ldr r1, [r4, #4] - mov r0, #0x16 - bl sub_02023790 - add r1, r4, #0 - add r1, #0x88 - str r0, [r1, #0] - ldr r0, [r4, #4] - bl sub_02039EBC - str r0, [r4, #0x30] - ldr r0, _021D0FE8 ; =0x021D3380 - ldr r1, [r4, #4] - bl ov80_021D2D70 - str r0, [r4, #0x40] - b _021D0FCC -_021D0F82: - bl ov80_021D0EA8 - ldr r0, [r4, #4] - bl sub_02018340 - str r0, [r4, #0x28] - ldr r1, [r4, #0x28] - add r0, r4, #0 - bl ov80_021D1088 - add r0, r4, #0 - bl ov80_021D1158 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - add r0, r4, #0 - bl ov80_021D2A08 - b _021D0FCC -_021D0FAE: - ldr r0, _021D0FEC ; =ov80_021D0E68 - add r1, r4, #0 - bl sub_02017798 - ldrb r1, [r4] - mov r0, #0x24 - add r2, r1, #0 - mul r2, r0 - ldr r0, _021D0FF0 ; =0x021D2EA4 - ldr r0, [r0, r2] - str r0, [r4, #0x38] - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #1 - pop {r4, pc} -_021D0FCC: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} - nop -_021D0FD8: .word 0xFFFFE0FF -_021D0FDC: .word 0x04001000 -_021D0FE0: .word 0x000001B1 -_021D0FE4: .word 0x00000267 -_021D0FE8: .word 0x021D3380 -_021D0FEC: .word ov80_021D0E68 -_021D0FF0: .word 0x021D2EA4 - thumb_func_end ov80_021D0EC8 - - thumb_func_start ov80_021D0FF4 -ov80_021D0FF4: ; 0x021D0FF4 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0201E530 - mov r0, #0x1f - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x1f - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - add r0, r5, #0 - bl ov80_021D2AC0 - add r0, r5, #0 - bl ov80_021D12D8 - mov r4, #0 -_021D1026: - lsl r1, r4, #0x18 - ldr r0, [r5, #0x28] - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - cmp r4, #8 - blt _021D1026 - ldr r0, [r5, #0x28] - bl sub_020181C4 - ldr r0, [r5, #0x40] - bl ov80_021D2E10 - ldr r0, [r5, #0x30] - bl sub_02039EF0 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_020237BC - add r0, r5, #0 - add r0, #0x84 - ldr r0, [r0, #0] - bl sub_0200B190 - add r5, #0x80 - ldr r0, [r5, #0] - bl sub_0200B190 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov80_021D0FF4 - - thumb_func_start ov80_021D1068 -ov80_021D1068: ; 0x021D1068 - push {r4, lr} - add r4, r0, #0 - ldrb r2, [r4] - mov r1, #0x24 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D1084 ; =0x021D2EAC - ldr r1, [r1, r3] - blx r1 - add r0, r4, #0 - bl ov80_021D2AE0 - pop {r4, pc} - nop -_021D1084: .word 0x021D2EAC - thumb_func_end ov80_021D1068 - - thumb_func_start ov80_021D1088 -ov80_021D1088: ; 0x021D1088 - push {r4, r5, r6, r7, lr} - sub sp, #0xf4 - ldr r4, _021D1150 ; =0x021D2E5C - add r3, sp, #4 - str r0, [sp] - add r6, r1, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r4, _021D1154 ; =0x021D2F00 - add r3, sp, #0x14 - mov r2, #0x1c -_021D10AA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D10AA - mov r4, #0 - add r7, r4, #0 - add r5, sp, #0x14 -_021D10B8: - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - add r2, r5, #0 - mov r3, #0 - bl sub_020183C4 - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - add r4, r4, #1 - bl sub_02019EBC - add r7, r7, #1 - add r5, #0x1c - cmp r7, #8 - blt _021D10B8 - ldr r3, [sp] - mov r0, #0 - ldr r3, [r3, #4] - mov r1, #0x20 - add r2, r0, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #1 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #2 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #3 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #4 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #5 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #6 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [sp] - mov r0, #7 - ldr r3, [r3, #4] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - add sp, #0xf4 - pop {r4, r5, r6, r7, pc} - nop -_021D1150: .word 0x021D2E5C -_021D1154: .word 0x021D2F00 - thumb_func_end ov80_021D1088 - - thumb_func_start ov80_021D1158 -ov80_021D1158: ; 0x021D1158 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #4] - mov r0, #0x11 - bl sub_02006C24 - add r4, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x28] - ldr r1, [r5, #4] - add r2, r4, #0 - mov r3, #0x11 - bl sub_0208C210 - mov r0, #0x14 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x28] - ldr r1, [r5, #4] - add r2, r4, #0 - mov r3, #0x11 - bl sub_0208C210 - mov r0, #0x15 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x28] - ldr r1, [r5, #4] - add r2, r4, #0 - mov r3, #0x11 - bl sub_0208C210 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - ldr r0, [r5, #0x28] - ldr r1, [r5, #4] - add r2, r4, #0 - mov r3, #0x11 - bl sub_0208C210 - mov r0, #1 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x28] - ldr r1, [r5, #4] - add r2, r4, #0 - mov r3, #0x11 - bl sub_0208C210 - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x18 - add r3, #0xb8 - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0x98 - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x16 - add r3, #0xbc - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0x9c - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x17 - add r3, #0xc0 - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0xa0 - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x19 - add r3, #0xc4 - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0xa4 - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x1a - add r3, #0xc8 - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0xa8 - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x1b - add r3, #0xcc - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0xac - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x1c - add r3, #0xd0 - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0xb0 - str r0, [r1, #0] - ldr r0, [r5, #4] - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x11 - mov r2, #0x1d - add r3, #0xd4 - bl sub_0208C2F4 - add r1, r5, #0 - add r1, #0xb4 - str r0, [r1, #0] - add r0, r4, #0 - bl sub_02006CA8 - mov r1, #0x1e - ldr r2, [r5, #4] - mov r0, #0 - lsl r1, r1, #4 - bl sub_02002E7C - mov r1, #0x1e - ldr r2, [r5, #4] - mov r0, #4 - lsl r1, r1, #4 - bl sub_02002E7C - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov80_021D1158 - - thumb_func_start ov80_021D12D8 -ov80_021D12D8: ; 0x021D12D8 - push {r4, lr} - add r4, r0, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl sub_020181C4 - add r4, #0x98 - ldr r0, [r4, #0] - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov80_021D12D8 - - thumb_func_start ov80_021D132C -ov80_021D132C: ; 0x021D132C - push {r4, lr} - add r4, r0, #0 - bl ov80_021D0EC8 - cmp r0, #1 - beq _021D133C - mov r0, #0 - pop {r4, pc} -_021D133C: - ldrb r2, [r4] - mov r1, #0x24 - add r0, r4, #0 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D1350 ; =0x021D2E94 - ldr r1, [r1, r3] - blx r1 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_021D1350: .word 0x021D2E94 - thumb_func_end ov80_021D132C - - thumb_func_start ov80_021D1354 -ov80_021D1354: ; 0x021D1354 - push {r4, lr} - add r4, r0, #0 - ldrb r2, [r4] - mov r1, #0x24 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D1384 ; =0x021D2E98 - ldr r1, [r1, r3] - blx r1 - cmp r0, #1 - beq _021D136E - mov r0, #1 - pop {r4, pc} -_021D136E: - ldrb r2, [r4] - mov r1, #0x24 - add r0, r4, #0 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D1388 ; =0x021D2E9C - ldr r1, [r1, r3] - blx r1 - mov r0, #3 - pop {r4, pc} - nop -_021D1384: .word 0x021D2E98 -_021D1388: .word 0x021D2E9C - thumb_func_end ov80_021D1354 - - thumb_func_start ov80_021D138C -ov80_021D138C: ; 0x021D138C - push {r3, lr} - bl sub_0200F2AC - cmp r0, #0 - beq _021D139A - mov r0, #4 - pop {r3, pc} -_021D139A: - mov r0, #3 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov80_021D138C - - thumb_func_start ov80_021D13A0 -ov80_021D13A0: ; 0x021D13A0 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x38] - blx r1 - cmp r0, #1 - beq _021D13C0 - ldrb r2, [r4] - mov r1, #0x24 - add r0, r4, #0 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D13D4 ; =0x021D2EA8 - ldr r1, [r1, r3] - blx r1 - mov r0, #4 - pop {r4, pc} -_021D13C0: - ldrb r2, [r4] - mov r1, #0x24 - add r0, r4, #0 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D13D8 ; =0x021D2EA0 - ldr r1, [r1, r3] - blx r1 - mov r0, #6 - pop {r4, pc} - ; .align 2, 0 -_021D13D4: .word 0x021D2EA8 -_021D13D8: .word 0x021D2EA0 - thumb_func_end ov80_021D13A0 - - thumb_func_start ov80_021D13DC -ov80_021D13DC: ; 0x021D13DC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _021D141A - mov r1, #0 - ldr r0, _021D1430 ; =0x04000050 - add r2, r1, #0 - mov r3, #0x1f - str r1, [sp] - bl sub_020BF55C - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - mov r0, #0 - bl sub_0200F32C - mov r0, #1 - bl sub_0200F32C - add sp, #4 - mov r0, #8 - pop {r3, r4, pc} -_021D141A: - ldrb r2, [r4] - mov r1, #0x24 - add r0, r4, #0 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D1434 ; =0x021D2EA8 - ldr r1, [r1, r3] - blx r1 - mov r0, #6 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_021D1430: .word 0x04000050 -_021D1434: .word 0x021D2EA8 - thumb_func_end ov80_021D13DC - - thumb_func_start ov80_021D1438 -ov80_021D1438: ; 0x021D1438 - push {r4, lr} - add r4, r0, #0 - ldrb r2, [r4] - mov r1, #0x24 - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D1454 ; =0x021D2EB0 - ldr r1, [r1, r3] - blx r1 - add r0, r4, #0 - bl ov80_021D0FF4 - mov r0, #7 - pop {r4, pc} - ; .align 2, 0 -_021D1454: .word 0x021D2EB0 - thumb_func_end ov80_021D1438 thumb_func_start ov80_021D1458 ov80_021D1458: ; 0x021D1458 @@ -3646,597 +2793,34 @@ _021D29EE: pop {r3, r4, r5, pc} thumb_func_end ov80_021D29BC - thumb_func_start ov80_021D2A08 -ov80_021D2A08: ; 0x021D2A08 - push {r4, r5, r6, lr} - sub sp, #0x50 - add r4, r0, #0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r1, [r4, #4] - mov r0, #0x20 - bl sub_0201DBEC - ldr r0, [r4, #4] - bl sub_0200C6E4 - add r1, r4, #0 - add r1, #0xd8 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - bl sub_0200C704 - add r1, r4, #0 - add r1, #0xdc - add r2, sp, #0x30 - ldr r5, _021D2AB4 ; =0x021D3190 - str r0, [r1, #0] - ldmia r5!, {r0, r1} - add r3, r2, #0 - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - ldr r6, _021D2AB8 ; =0x021D3160 - stmia r2!, {r0, r1} - add r5, sp, #0x1c - ldmia r6!, {r0, r1} - add r2, r5, #0 - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r1, r3, #0 - str r0, [r5, #0] - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r3, #0x20 - bl sub_0200C73C - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x1c - bl sub_0200C7C0 - ldr r5, _021D2ABC ; =0x021D3174 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - add r0, r4, #0 - add r0, #0xd8 - add r4, #0xdc - ldr r0, [r0, #0] - ldr r1, [r4, #0] - bl sub_0200C8F0 - add sp, #0x50 - pop {r4, r5, r6, pc} - nop -_021D2AB4: .word 0x021D3190 -_021D2AB8: .word 0x021D3160 -_021D2ABC: .word 0x021D3174 - thumb_func_end ov80_021D2A08 - - thumb_func_start ov80_021D2AC0 -ov80_021D2AC0: ; 0x021D2AC0 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200C8B0 - add r4, #0xd8 - ldr r0, [r4, #0] - bl sub_0200C8D4 - bl sub_0201DC3C - pop {r4, pc} - thumb_func_end ov80_021D2AC0 - - thumb_func_start ov80_021D2AE0 -ov80_021D2AE0: ; 0x021D2AE0 - ldr r3, _021D2AE8 ; =sub_0200C7EC - add r0, #0xdc - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_021D2AE8: .word sub_0200C7EC - thumb_func_end ov80_021D2AE0 - - thumb_func_start ov80_021D2AEC -ov80_021D2AEC: ; 0x021D2AEC - ldr r3, _021D2AF0 ; =sub_0200C800 - bx r3 - ; .align 2, 0 -_021D2AF0: .word sub_0200C800 - thumb_func_end ov80_021D2AEC - - thumb_func_start ov80_021D2AF4 -ov80_021D2AF4: ; 0x021D2AF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r5, [sp, #0x28] - str r0, [sp] - str r1, [sp, #4] - add r0, r5, #0 - mov r1, #0xc - str r2, [sp, #8] - add r4, r3, #0 - bl sub_02018144 - add r7, r0, #0 - mov r0, #0 - strb r0, [r7] - strb r0, [r7, #1] - strb r0, [r7, #2] - strb r0, [r7, #3] - strb r0, [r7, #4] - strb r0, [r7, #5] - strb r0, [r7, #6] - strb r0, [r7, #7] - strb r0, [r7, #8] - strb r0, [r7, #9] - strb r0, [r7, #0xa] - strb r0, [r7, #0xb] - strh r4, [r7] - ldrh r2, [r7] - mov r1, #0x1c - add r0, r5, #0 - mul r1, r2 - bl sub_02018144 - str r0, [r7, #8] - ldrh r3, [r7] - mov r2, #0x1c - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - ldrh r0, [r7] - mov r6, #0 - ldr r5, _021D2C10 ; =0x021D31D8 - cmp r0, #0 - ble _021D2C0A - str r6, [sp, #0xc] -_021D2B4E: - ldr r0, [r7, #8] - ldr r1, [sp, #0xc] - ldr r2, [r5, #0] - add r4, r0, r1 - str r2, [r0, r1] - ldrb r0, [r5, #8] - ldr r1, [sp, #4] - ldr r2, _021D2C14 ; =0x021D31B0 - strb r0, [r4, #8] - ldrb r0, [r5, #9] - strb r0, [r4, #9] - ldrh r0, [r5, #0xa] - strh r0, [r4, #0xa] - ldr r0, [r5, #0xc] - str r0, [r4, #0xc] - ldr r0, [r5, #0x10] - str r0, [r4, #0x10] - ldr r0, [sp, #8] - ldrb r0, [r0, r6] - str r0, [r4, #0x14] - ldr r0, [sp] - bl sub_0200CA08 - str r0, [r4, #0x18] - mov r1, #1 - bl sub_02021CAC - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021D2B98 - ldrb r2, [r4, #9] - ldr r0, [r4, #0x18] - add r2, r2, #5 - add r1, r2, r1 - bl sub_02021E90 - b _021D2BAE -_021D2B98: - ldrh r1, [r4, #0xa] - ldr r0, _021D2C18 ; =0x0000FFFF - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _021D2BAE - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_02021CAC -_021D2BAE: - ldrb r0, [r4, #8] - cmp r0, #0 - beq _021D2BC6 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D2BD4 -_021D2BC6: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D2BD4: - bl sub_020E1740 - add r1, r0, #0 - ldr r0, [r4, #0x18] - bl sub_02021E2C - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x10] - add r1, #0x19 - sub r2, #0x22 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, #0x18] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D494 - ldr r0, [sp, #0xc] - add r5, #0x14 - add r0, #0x1c - str r0, [sp, #0xc] - add r0, r6, #1 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldrh r0, [r7] - cmp r6, r0 - blt _021D2B4E -_021D2C0A: - add r0, r7, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2C10: .word 0x021D31D8 -_021D2C14: .word 0x021D31B0 -_021D2C18: .word 0x0000FFFF - thumb_func_end ov80_021D2AF4 - - thumb_func_start ov80_021D2C1C -ov80_021D2C1C: ; 0x021D2C1C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrh r0, [r5] - mov r6, #0 - cmp r0, #0 - ble _021D2C4C - add r4, r6, #0 -_021D2C2A: - ldr r0, [r5, #8] - mov r1, #0 - add r7, r0, r4 - ldr r0, [r7, #0x18] - add r2, r1, #0 - bl sub_02021C98 - ldr r0, [r7, #0x18] - bl sub_02021BD4 - add r0, r6, #1 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldrh r0, [r5] - add r4, #0x1c - cmp r6, r0 - blt _021D2C2A -_021D2C4C: - ldr r0, [r5, #8] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov80_021D2C1C - - thumb_func_start ov80_021D2C5C -ov80_021D2C5C: ; 0x021D2C5C - push {r3, r4, r5, r6} - ldrh r5, [r0] - mov r4, #0 - cmp r5, #0 - ble _021D2CB8 - ldr r0, [r0, #8] -_021D2C68: - ldr r6, [r0, #0] - cmp r6, r1 - bne _021D2CAC - ldrh r6, [r0, #0xa] - cmp r6, #3 - bhi _021D2CAC - add r6, r6, r6 - add r6, pc - ldrh r6, [r6, #6] - lsl r6, r6, #0x10 - asr r6, r6, #0x10 - add pc, r6 -_021D2C80: ; jump table - .short _021D2C88 - _021D2C80 - 2 ; case 0 - .short _021D2C8C - _021D2C80 - 2 ; case 1 - .short _021D2C98 - _021D2C80 - 2 ; case 2 - .short _021D2CA4 - _021D2C80 - 2 ; case 3 -_021D2C88: - pop {r3, r4, r5, r6} - bx lr -_021D2C8C: - cmp r2, #9 - bne _021D2CAC - cmp r3, #0x1c - bne _021D2CAC - pop {r3, r4, r5, r6} - bx lr -_021D2C98: - cmp r2, #0x1a - bne _021D2CAC - cmp r3, #0x12 - bne _021D2CAC - pop {r3, r4, r5, r6} - bx lr -_021D2CA4: - cmp r2, #0x1a - bne _021D2CAC - cmp r3, #0x11 - beq _021D2CBA -_021D2CAC: - add r4, r4, #1 - lsl r4, r4, #0x10 - asr r4, r4, #0x10 - add r0, #0x1c - cmp r4, r5 - blt _021D2C68 -_021D2CB8: - mov r0, #0 -_021D2CBA: - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov80_021D2C5C - - thumb_func_start ov80_021D2CC0 -ov80_021D2CC0: ; 0x021D2CC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bne _021D2CCA - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2CCA: - bl ov80_021D2C5C - add r4, r0, #0 - beq _021D2CD8 - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021D2CF2 -_021D2CD8: - ldr r3, [r5, #4] - cmp r3, #0 - beq _021D2CEC - ldrb r1, [r3, #9] - ldr r0, [r3, #0x18] - add r2, r1, #5 - ldr r1, [r3, #0x14] - add r1, r2, r1 - bl sub_02021E90 -_021D2CEC: - mov r0, #0 - str r0, [r5, #4] - pop {r3, r4, r5, pc} -_021D2CF2: - ldr r1, [r5, #4] - cmp r1, #0 - bne _021D2D00 - mov r0, #0 - strb r0, [r5, #2] - strb r0, [r5, #3] - b _021D2D1C -_021D2D00: - ldrh r2, [r4, #0xa] - ldr r0, _021D2D24 ; =0x0000FFFE - add r0, r2, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _021D2D1C - ldrb r2, [r1, #9] - ldr r0, [r1, #0x18] - ldr r1, [r1, #0x14] - add r2, r2, #5 - add r1, r2, r1 - bl sub_02021E90 -_021D2D1C: - str r4, [r5, #4] - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_021D2D24: .word 0x0000FFFE - thumb_func_end ov80_021D2CC0 - - thumb_func_start ov80_021D2D28 -ov80_021D2D28: ; 0x021D2D28 - push {r4, lr} - add r4, r0, #0 - ldr r3, [r4, #4] - cmp r3, #0 - beq _021D2D6C - cmp r1, #1 - bne _021D2D6C - ldrb r0, [r4, #3] - cmp r0, #0 - ldr r0, [r3, #0x18] - bne _021D2D48 - ldrb r1, [r3, #9] - add r1, #8 - bl sub_02021E90 - b _021D2D54 -_021D2D48: - ldrb r1, [r3, #9] - add r2, r1, #5 - ldr r1, [r3, #0x14] - add r1, r2, r1 - bl sub_02021E90 -_021D2D54: - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] - ldrb r0, [r4, #2] - cmp r0, #0x10 - bne _021D2D6C - mov r0, #0 - strb r0, [r4, #2] - ldrb r1, [r4, #3] - mov r0, #1 - eor r0, r1 - strb r0, [r4, #3] -_021D2D6C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov80_021D2D28 - - thumb_func_start ov80_021D2D70 -ov80_021D2D70: ; 0x021D2D70 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r0, #0 - add r0, sp, #4 - add r4, r1, #0 - bl sub_020C7DA0 - add r0, sp, #4 - add r1, r5, #0 - bl sub_020C8080 - cmp r0, #0 - bne _021D2D94 - bl sub_02022974 - add sp, #0x4c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D2D94: - add r0, sp, #4 - add r1, sp, #0 - mov r2, #4 - bl sub_020C81D4 - cmp r0, #0 - bge _021D2DA6 - bl sub_02022974 -_021D2DA6: - add r0, r4, #0 - mov r1, #8 - bl sub_02018144 - add r6, r0, #0 - mov r0, #0 - strb r0, [r6] - strb r0, [r6, #1] - strb r0, [r6, #2] - strb r0, [r6, #3] - strb r0, [r6, #4] - strb r0, [r6, #5] - strb r0, [r6, #6] - strb r0, [r6, #7] - ldr r2, [sp] - mov r1, #0x18 - add r0, r4, #0 - mul r1, r2 - bl sub_02018144 - str r0, [r6, #4] - ldr r3, [sp] - mov r2, #0x18 - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - ldr r0, [sp] - mov r4, #0 - str r0, [r6, #0] - cmp r0, #0 - ble _021D2E02 - add r5, r4, #0 -_021D2DE8: - ldr r0, [r6, #4] - mov r2, #0x18 - add r7, r0, r5 - add r0, sp, #4 - add r1, r7, #0 - bl sub_020C81D4 - strh r4, [r7, #0x16] - ldr r0, [r6, #0] - add r4, r4, #1 - add r5, #0x18 - cmp r4, r0 - blt _021D2DE8 -_021D2E02: - add r0, sp, #4 - bl sub_020C80C8 - add r0, r6, #0 - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov80_021D2D70 - - thumb_func_start ov80_021D2E10 -ov80_021D2E10: ; 0x021D2E10 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov80_021D2E10 - - thumb_func_start ov80_021D2E24 -ov80_021D2E24: ; 0x021D2E24 - push {r3, r4, r5, r6} - ldr r6, [r0, #0] - mov r5, #0 - cmp r6, #0 - ble _021D2E54 - ldr r0, [r0, #4] -_021D2E30: - ldrh r4, [r0] - cmp r4, r1 - bne _021D2E4C - ldrh r4, [r0, #2] - cmp r4, r2 - bne _021D2E4C - ldrh r1, [r0, #0x14] - cmp r1, #0 - beq _021D2E56 - tst r1, r3 - bne _021D2E56 - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_021D2E4C: - add r5, r5, #1 - add r0, #0x18 - cmp r5, r6 - blt _021D2E30 -_021D2E54: - mov r0, #0 -_021D2E56: - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov80_021D2E24 - ; 0x021D2E5C - - .rodata - .incbin "incbin/overlay80_rodata.bin" - .data - .incbin "incbin/overlay80_data.bin" - .bss - .space 0x0 + .global Unk_ov80_021D2FE0 +Unk_ov80_021D2FE0: ; 0x021D2FE0 + .incbin "incbin/overlay80_rodata.bin", 0x184, 0x188 - 0x184 + + .global Unk_ov80_021D2FE4 +Unk_ov80_021D2FE4: ; 0x021D2FE4 + .incbin "incbin/overlay80_rodata.bin", 0x188, 0x190 - 0x188 + + .global Unk_ov80_021D2FEC +Unk_ov80_021D2FEC: ; 0x021D2FEC + .incbin "incbin/overlay80_rodata.bin", 0x190, 0x19C - 0x190 + + .global Unk_ov80_021D2FF8 +Unk_ov80_021D2FF8: ; 0x021D2FF8 + .incbin "incbin/overlay80_rodata.bin", 0x19C, 0x1C4 - 0x19C + + .global Unk_ov80_021D3020 +Unk_ov80_021D3020: ; 0x021D3020 + .incbin "incbin/overlay80_rodata.bin", 0x1C4, 0x224 - 0x1C4 + + .global Unk_ov80_021D3080 +Unk_ov80_021D3080: ; 0x021D3080 + .incbin "incbin/overlay80_rodata.bin", 0x224, 0x28C - 0x224 + + .global Unk_ov80_021D30E8 +Unk_ov80_021D30E8: ; 0x021D30E8 + .incbin "incbin/overlay80_rodata.bin", 0x28C, 0x78 + diff --git a/asm/ov80_021D2A08.s b/asm/ov80_021D2A08.s new file mode 100644 index 000000000..4a91d5f9c --- /dev/null +++ b/asm/ov80_021D2A08.s @@ -0,0 +1,167 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov80_021D2A08 +ov80_021D2A08: ; 0x021D2A08 + push {r4, r5, r6, lr} + sub sp, #0x50 + add r4, r0, #0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + ldr r1, [r4, #4] + mov r0, #0x20 + bl sub_0201DBEC + ldr r0, [r4, #4] + bl sub_0200C6E4 + add r1, r4, #0 + add r1, #0xd8 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + bl sub_0200C704 + add r1, r4, #0 + add r1, #0xdc + add r2, sp, #0x30 + ldr r5, _021D2AB4 ; =0x021D3190 + str r0, [r1, #0] + ldmia r5!, {r0, r1} + add r3, r2, #0 + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + ldr r6, _021D2AB8 ; =0x021D3160 + stmia r2!, {r0, r1} + add r5, sp, #0x1c + ldmia r6!, {r0, r1} + add r2, r5, #0 + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r1, r3, #0 + str r0, [r5, #0] + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r3, #0x20 + bl sub_0200C73C + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x1c + bl sub_0200C7C0 + ldr r5, _021D2ABC ; =0x021D3174 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + add r0, r4, #0 + add r0, #0xd8 + add r4, #0xdc + ldr r0, [r0, #0] + ldr r1, [r4, #0] + bl sub_0200C8F0 + add sp, #0x50 + pop {r4, r5, r6, pc} + nop +_021D2AB4: .word 0x021D3190 +_021D2AB8: .word 0x021D3160 +_021D2ABC: .word 0x021D3174 + thumb_func_end ov80_021D2A08 + + thumb_func_start ov80_021D2AC0 +ov80_021D2AC0: ; 0x021D2AC0 + push {r4, lr} + add r4, r0, #0 + add r1, r4, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200C8B0 + add r4, #0xd8 + ldr r0, [r4, #0] + bl sub_0200C8D4 + bl sub_0201DC3C + pop {r4, pc} + thumb_func_end ov80_021D2AC0 + + thumb_func_start ov80_021D2AE0 +ov80_021D2AE0: ; 0x021D2AE0 + ldr r3, _021D2AE8 ; =sub_0200C7EC + add r0, #0xdc + ldr r0, [r0, #0] + bx r3 + ; .align 2, 0 +_021D2AE8: .word sub_0200C7EC + thumb_func_end ov80_021D2AE0 + + thumb_func_start ov80_021D2AEC +ov80_021D2AEC: ; 0x021D2AEC + ldr r3, _021D2AF0 ; =sub_0200C800 + bx r3 + ; .align 2, 0 +_021D2AF0: .word sub_0200C800 + thumb_func_end ov80_021D2AEC + + .rodata + + + .global Unk_ov80_021D3160 +Unk_ov80_021D3160: ; 0x021D3160 + .incbin "incbin/overlay80_rodata.bin", 0x304, 0x318 - 0x304 + + .global Unk_ov80_021D3174 +Unk_ov80_021D3174: ; 0x021D3174 + .incbin "incbin/overlay80_rodata.bin", 0x318, 0x334 - 0x318 + + .global Unk_ov80_021D3190 +Unk_ov80_021D3190: ; 0x021D3190 + .incbin "incbin/overlay80_rodata.bin", 0x334, 0x20 + + + .data + + + .global Unk_ov80_021D3394 +Unk_ov80_021D3394: ; 0x021D3394 + .incbin "incbin/overlay80_data.bin", 0x14, 0x2C - 0x14 + + .global Unk_ov80_021D33AC +Unk_ov80_021D33AC: ; 0x021D33AC + .incbin "incbin/overlay80_data.bin", 0x2C, 0x44 - 0x2C + + .global Unk_ov80_021D33C4 +Unk_ov80_021D33C4: ; 0x021D33C4 + .incbin "incbin/overlay80_data.bin", 0x44, 0x5C - 0x44 + + .global Unk_ov80_021D33DC +Unk_ov80_021D33DC: ; 0x021D33DC + .incbin "incbin/overlay80_data.bin", 0x5C, 0x74 - 0x5C + + .global Unk_ov80_021D33F4 +Unk_ov80_021D33F4: ; 0x021D33F4 + .incbin "incbin/overlay80_data.bin", 0x74, 0x18 + diff --git a/asm/ov80_021D2AF4.s b/asm/ov80_021D2AF4.s new file mode 100644 index 000000000..7689562c9 --- /dev/null +++ b/asm/ov80_021D2AF4.s @@ -0,0 +1,483 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov80_021D2AF4 +ov80_021D2AF4: ; 0x021D2AF4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + ldr r5, [sp, #0x28] + str r0, [sp] + str r1, [sp, #4] + add r0, r5, #0 + mov r1, #0xc + str r2, [sp, #8] + add r4, r3, #0 + bl sub_02018144 + add r7, r0, #0 + mov r0, #0 + strb r0, [r7] + strb r0, [r7, #1] + strb r0, [r7, #2] + strb r0, [r7, #3] + strb r0, [r7, #4] + strb r0, [r7, #5] + strb r0, [r7, #6] + strb r0, [r7, #7] + strb r0, [r7, #8] + strb r0, [r7, #9] + strb r0, [r7, #0xa] + strb r0, [r7, #0xb] + strh r4, [r7] + ldrh r2, [r7] + mov r1, #0x1c + add r0, r5, #0 + mul r1, r2 + bl sub_02018144 + str r0, [r7, #8] + ldrh r3, [r7] + mov r2, #0x1c + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + ldrh r0, [r7] + mov r6, #0 + ldr r5, _021D2C10 ; =0x021D31D8 + cmp r0, #0 + ble _021D2C0A + str r6, [sp, #0xc] +_021D2B4E: + ldr r0, [r7, #8] + ldr r1, [sp, #0xc] + ldr r2, [r5, #0] + add r4, r0, r1 + str r2, [r0, r1] + ldrb r0, [r5, #8] + ldr r1, [sp, #4] + ldr r2, _021D2C14 ; =0x021D31B0 + strb r0, [r4, #8] + ldrb r0, [r5, #9] + strb r0, [r4, #9] + ldrh r0, [r5, #0xa] + strh r0, [r4, #0xa] + ldr r0, [r5, #0xc] + str r0, [r4, #0xc] + ldr r0, [r5, #0x10] + str r0, [r4, #0x10] + ldr r0, [sp, #8] + ldrb r0, [r0, r6] + str r0, [r4, #0x14] + ldr r0, [sp] + bl sub_0200CA08 + str r0, [r4, #0x18] + mov r1, #1 + bl sub_02021CAC + ldr r1, [r4, #0x14] + cmp r1, #0 + beq _021D2B98 + ldrb r2, [r4, #9] + ldr r0, [r4, #0x18] + add r2, r2, #5 + add r1, r2, r1 + bl sub_02021E90 + b _021D2BAE +_021D2B98: + ldrh r1, [r4, #0xa] + ldr r0, _021D2C18 ; =0x0000FFFF + add r0, r1, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _021D2BAE + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_02021CAC +_021D2BAE: + ldrb r0, [r4, #8] + cmp r0, #0 + beq _021D2BC6 + lsl r0, r0, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _021D2BD4 +_021D2BC6: + lsl r0, r0, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_021D2BD4: + bl sub_020E1740 + add r1, r0, #0 + ldr r0, [r4, #0x18] + bl sub_02021E2C + ldr r1, [r4, #0xc] + ldr r2, [r4, #0x10] + add r1, #0x19 + sub r2, #0x22 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + ldr r0, [r4, #0x18] + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_0200D494 + ldr r0, [sp, #0xc] + add r5, #0x14 + add r0, #0x1c + str r0, [sp, #0xc] + add r0, r6, #1 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldrh r0, [r7] + cmp r6, r0 + blt _021D2B4E +_021D2C0A: + add r0, r7, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D2C10: .word 0x021D31D8 +_021D2C14: .word 0x021D31B0 +_021D2C18: .word 0x0000FFFF + thumb_func_end ov80_021D2AF4 + + thumb_func_start ov80_021D2C1C +ov80_021D2C1C: ; 0x021D2C1C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldrh r0, [r5] + mov r6, #0 + cmp r0, #0 + ble _021D2C4C + add r4, r6, #0 +_021D2C2A: + ldr r0, [r5, #8] + mov r1, #0 + add r7, r0, r4 + ldr r0, [r7, #0x18] + add r2, r1, #0 + bl sub_02021C98 + ldr r0, [r7, #0x18] + bl sub_02021BD4 + add r0, r6, #1 + lsl r0, r0, #0x10 + asr r6, r0, #0x10 + ldrh r0, [r5] + add r4, #0x1c + cmp r6, r0 + blt _021D2C2A +_021D2C4C: + ldr r0, [r5, #8] + bl sub_020181C4 + add r0, r5, #0 + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov80_021D2C1C + + thumb_func_start ov80_021D2C5C +ov80_021D2C5C: ; 0x021D2C5C + push {r3, r4, r5, r6} + ldrh r5, [r0] + mov r4, #0 + cmp r5, #0 + ble _021D2CB8 + ldr r0, [r0, #8] +_021D2C68: + ldr r6, [r0, #0] + cmp r6, r1 + bne _021D2CAC + ldrh r6, [r0, #0xa] + cmp r6, #3 + bhi _021D2CAC + add r6, r6, r6 + add r6, pc + ldrh r6, [r6, #6] + lsl r6, r6, #0x10 + asr r6, r6, #0x10 + add pc, r6 +_021D2C80: ; jump table + .short _021D2C88 - _021D2C80 - 2 ; case 0 + .short _021D2C8C - _021D2C80 - 2 ; case 1 + .short _021D2C98 - _021D2C80 - 2 ; case 2 + .short _021D2CA4 - _021D2C80 - 2 ; case 3 +_021D2C88: + pop {r3, r4, r5, r6} + bx lr +_021D2C8C: + cmp r2, #9 + bne _021D2CAC + cmp r3, #0x1c + bne _021D2CAC + pop {r3, r4, r5, r6} + bx lr +_021D2C98: + cmp r2, #0x1a + bne _021D2CAC + cmp r3, #0x12 + bne _021D2CAC + pop {r3, r4, r5, r6} + bx lr +_021D2CA4: + cmp r2, #0x1a + bne _021D2CAC + cmp r3, #0x11 + beq _021D2CBA +_021D2CAC: + add r4, r4, #1 + lsl r4, r4, #0x10 + asr r4, r4, #0x10 + add r0, #0x1c + cmp r4, r5 + blt _021D2C68 +_021D2CB8: + mov r0, #0 +_021D2CBA: + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov80_021D2C5C + + thumb_func_start ov80_021D2CC0 +ov80_021D2CC0: ; 0x021D2CC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bne _021D2CCA + mov r0, #0 + pop {r3, r4, r5, pc} +_021D2CCA: + bl ov80_021D2C5C + add r4, r0, #0 + beq _021D2CD8 + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _021D2CF2 +_021D2CD8: + ldr r3, [r5, #4] + cmp r3, #0 + beq _021D2CEC + ldrb r1, [r3, #9] + ldr r0, [r3, #0x18] + add r2, r1, #5 + ldr r1, [r3, #0x14] + add r1, r2, r1 + bl sub_02021E90 +_021D2CEC: + mov r0, #0 + str r0, [r5, #4] + pop {r3, r4, r5, pc} +_021D2CF2: + ldr r1, [r5, #4] + cmp r1, #0 + bne _021D2D00 + mov r0, #0 + strb r0, [r5, #2] + strb r0, [r5, #3] + b _021D2D1C +_021D2D00: + ldrh r2, [r4, #0xa] + ldr r0, _021D2D24 ; =0x0000FFFE + add r0, r2, r0 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r0, #1 + bhi _021D2D1C + ldrb r2, [r1, #9] + ldr r0, [r1, #0x18] + ldr r1, [r1, #0x14] + add r2, r2, #5 + add r1, r2, r1 + bl sub_02021E90 +_021D2D1C: + str r4, [r5, #4] + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_021D2D24: .word 0x0000FFFE + thumb_func_end ov80_021D2CC0 + + thumb_func_start ov80_021D2D28 +ov80_021D2D28: ; 0x021D2D28 + push {r4, lr} + add r4, r0, #0 + ldr r3, [r4, #4] + cmp r3, #0 + beq _021D2D6C + cmp r1, #1 + bne _021D2D6C + ldrb r0, [r4, #3] + cmp r0, #0 + ldr r0, [r3, #0x18] + bne _021D2D48 + ldrb r1, [r3, #9] + add r1, #8 + bl sub_02021E90 + b _021D2D54 +_021D2D48: + ldrb r1, [r3, #9] + add r2, r1, #5 + ldr r1, [r3, #0x14] + add r1, r2, r1 + bl sub_02021E90 +_021D2D54: + ldrb r0, [r4, #2] + add r0, r0, #1 + strb r0, [r4, #2] + ldrb r0, [r4, #2] + cmp r0, #0x10 + bne _021D2D6C + mov r0, #0 + strb r0, [r4, #2] + ldrb r1, [r4, #3] + mov r0, #1 + eor r0, r1 + strb r0, [r4, #3] +_021D2D6C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov80_021D2D28 + + thumb_func_start ov80_021D2D70 +ov80_021D2D70: ; 0x021D2D70 + push {r4, r5, r6, r7, lr} + sub sp, #0x4c + add r5, r0, #0 + add r0, sp, #4 + add r4, r1, #0 + bl sub_020C7DA0 + add r0, sp, #4 + add r1, r5, #0 + bl sub_020C8080 + cmp r0, #0 + bne _021D2D94 + bl sub_02022974 + add sp, #0x4c + mov r0, #0 + pop {r4, r5, r6, r7, pc} +_021D2D94: + add r0, sp, #4 + add r1, sp, #0 + mov r2, #4 + bl sub_020C81D4 + cmp r0, #0 + bge _021D2DA6 + bl sub_02022974 +_021D2DA6: + add r0, r4, #0 + mov r1, #8 + bl sub_02018144 + add r6, r0, #0 + mov r0, #0 + strb r0, [r6] + strb r0, [r6, #1] + strb r0, [r6, #2] + strb r0, [r6, #3] + strb r0, [r6, #4] + strb r0, [r6, #5] + strb r0, [r6, #6] + strb r0, [r6, #7] + ldr r2, [sp] + mov r1, #0x18 + add r0, r4, #0 + mul r1, r2 + bl sub_02018144 + str r0, [r6, #4] + ldr r3, [sp] + mov r2, #0x18 + mov r1, #0 + mul r2, r3 + bl sub_020D5124 + ldr r0, [sp] + mov r4, #0 + str r0, [r6, #0] + cmp r0, #0 + ble _021D2E02 + add r5, r4, #0 +_021D2DE8: + ldr r0, [r6, #4] + mov r2, #0x18 + add r7, r0, r5 + add r0, sp, #4 + add r1, r7, #0 + bl sub_020C81D4 + strh r4, [r7, #0x16] + ldr r0, [r6, #0] + add r4, r4, #1 + add r5, #0x18 + cmp r4, r0 + blt _021D2DE8 +_021D2E02: + add r0, sp, #4 + bl sub_020C80C8 + add r0, r6, #0 + add sp, #0x4c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov80_021D2D70 + + thumb_func_start ov80_021D2E10 +ov80_021D2E10: ; 0x021D2E10 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov80_021D2E10 + + thumb_func_start ov80_021D2E24 +ov80_021D2E24: ; 0x021D2E24 + push {r3, r4, r5, r6} + ldr r6, [r0, #0] + mov r5, #0 + cmp r6, #0 + ble _021D2E54 + ldr r0, [r0, #4] +_021D2E30: + ldrh r4, [r0] + cmp r4, r1 + bne _021D2E4C + ldrh r4, [r0, #2] + cmp r4, r2 + bne _021D2E4C + ldrh r1, [r0, #0x14] + cmp r1, #0 + beq _021D2E56 + tst r1, r3 + bne _021D2E56 + mov r0, #0 + pop {r3, r4, r5, r6} + bx lr +_021D2E4C: + add r5, r5, #1 + add r0, #0x18 + cmp r5, r6 + blt _021D2E30 +_021D2E54: + mov r0, #0 +_021D2E56: + pop {r3, r4, r5, r6} + bx lr + ; .align 2, 0 + thumb_func_end ov80_021D2E24 + + .rodata + + + .global Unk_ov80_021D31B0 +Unk_ov80_021D31B0: ; 0x021D31B0 + .incbin "incbin/overlay80_rodata.bin", 0x354, 0x37C - 0x354 + + .global Unk_ov80_021D31D8 +Unk_ov80_021D31D8: ; 0x021D31D8 + .incbin "incbin/overlay80_rodata.bin", 0x37C, 0x190 + diff --git a/asm/ov81_021D0D80.s b/asm/ov81_021D0D80.s new file mode 100644 index 000000000..ea9cd98bc --- /dev/null +++ b/asm/ov81_021D0D80.s @@ -0,0 +1,1108 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov81_021D0D80 +ov81_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r0, #1 + lsl r0, r0, #0x1a + ldr r2, [r0, #0] + ldr r1, _021D0E60 ; =0xFFFFE0FF + ldr r3, _021D0E64 ; =0x04001000 + and r2, r1 + str r2, [r0, #0] + ldr r2, [r3, #0] + add r0, #0x50 + and r1, r2 + str r1, [r3, #0] + mov r1, #0 + strh r1, [r0] + add r3, #0x50 + strh r1, [r3] + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + mov r2, #2 + mov r0, #3 + mov r1, #0x2a + lsl r2, r2, #0x10 + bl sub_02017FC8 + add r0, r4, #0 + bl sub_02006840 + add r5, r0, #0 + ldr r1, _021D0E68 ; =0x00001068 + add r0, r4, #0 + mov r2, #0x2a + bl sub_0200681C + ldr r2, _021D0E68 ; =0x00001068 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x2a + bl sub_02018340 + str r0, [r4, #0] + str r5, [r4, #0x4c] + add r0, r5, #0 + bl sub_0202B628 + str r0, [r4, #0x44] + add r0, r5, #0 + bl sub_02025E38 + str r0, [r4, #0x48] + mov r0, #0 + mov r1, #0x2a + bl sub_0208C120 + mov r0, #0 + mov r1, #0x2a + bl sub_02002BEC + bl ov81_021D0F20 + ldr r0, [r4, #0] + bl ov81_021D0F40 + add r0, r4, #0 + bl ov81_021D1050 + add r0, r4, #0 + bl ov81_021D1130 + add r0, r4, #0 + bl ov81_021D1610 + add r0, r4, #0 + mov r1, #0 + bl ov81_021D164C + add r0, r4, #0 + bl ov81_021D1434 + ldr r0, _021D0E6C ; =ov81_021D0F00 + add r1, r4, #0 + bl sub_02017798 + bl sub_0201FFD0 + bl sub_02039734 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r1, #0 + mov r0, #0x43 + add r2, r1, #0 + bl sub_02004550 + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_021D0E60: .word 0xFFFFE0FF +_021D0E64: .word 0x04001000 +_021D0E68: .word 0x00001068 +_021D0E6C: .word ov81_021D0F00 + thumb_func_end ov81_021D0D80 + + thumb_func_start ov81_021D0E70 +ov81_021D0E70: ; 0x021D0E70 + push {r4, lr} + add r4, r1, #0 + bl sub_0200682C + ldr r1, [r4, #0] + cmp r1, #4 + bhi _021D0EC0 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_021D0E8A: ; jump table + .short _021D0E94 - _021D0E8A - 2 ; case 0 + .short _021D0E9C - _021D0E8A - 2 ; case 1 + .short _021D0EA4 - _021D0E8A - 2 ; case 2 + .short _021D0EAC - _021D0E8A - 2 ; case 3 + .short _021D0EB4 - _021D0E8A - 2 ; case 4 +_021D0E94: + bl ov81_021D1174 + str r0, [r4, #0] + b _021D0EC0 +_021D0E9C: + bl ov81_021D1188 + str r0, [r4, #0] + b _021D0EC0 +_021D0EA4: + bl ov81_021D120C + str r0, [r4, #0] + b _021D0EC0 +_021D0EAC: + bl ov81_021D12E8 + str r0, [r4, #0] + b _021D0EC0 +_021D0EB4: + bl ov81_021D1358 + cmp r0, #1 + bne _021D0EC0 + mov r0, #1 + pop {r4, pc} +_021D0EC0: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov81_021D0E70 + + thumb_func_start ov81_021D0EC4 +ov81_021D0EC4: ; 0x021D0EC4 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + add r0, r4, #0 + bl ov81_021D1634 + ldr r0, [r4, #0] + bl ov81_021D101C + add r0, r4, #0 + bl ov81_021D115C + mov r0, #0 + bl sub_02002C28 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0x2a + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov81_021D0EC4 + + thumb_func_start ov81_021D0F00 +ov81_021D0F00: ; 0x021D0F00 + push {r3, lr} + ldr r0, [r0, #0] + bl sub_0201C2B8 + ldr r3, _021D0F18 ; =0x027E0000 + ldr r1, _021D0F1C ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r3, pc} + nop +_021D0F18: .word 0x027E0000 +_021D0F1C: .word 0x00003FF8 + thumb_func_end ov81_021D0F00 + + thumb_func_start ov81_021D0F20 +ov81_021D0F20: ; 0x021D0F20 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D0F3C ; =0x021D33C0 + add r3, sp, #0 + mov r2, #5 +_021D0F2A: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D0F2A + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D0F3C: .word 0x021D33C0 + thumb_func_end ov81_021D0F20 + + thumb_func_start ov81_021D0F40 +ov81_021D0F40: ; 0x021D0F40 + push {r3, r4, r5, lr} + sub sp, #0x80 + ldr r5, _021D1008 ; =0x021D3340 + add r3, sp, #0x70 + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _021D100C ; =0x021D336C + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _021D1010 ; =0x021D3350 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + ldr r5, _021D1014 ; =0x021D3388 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _021D1018 ; =0x021D33A4 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x2a + bl sub_02019690 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x2a + bl sub_02019690 + add sp, #0x80 + pop {r3, r4, r5, pc} + nop +_021D1008: .word 0x021D3340 +_021D100C: .word 0x021D336C +_021D1010: .word 0x021D3350 +_021D1014: .word 0x021D3388 +_021D1018: .word 0x021D33A4 + thumb_func_end ov81_021D0F40 + + thumb_func_start ov81_021D101C +ov81_021D101C: ; 0x021D101C + push {r4, lr} + add r4, r0, #0 + bl sub_0201FF00 + add r0, r4, #0 + mov r1, #3 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + mov r0, #0x2a + add r1, r4, #0 + bl sub_02018238 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov81_021D101C + + thumb_func_start ov81_021D1050 +ov81_021D1050: ; 0x021D1050 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x50 + mov r1, #0x2a + bl sub_02006C24 + add r4, r0, #0 + ldr r0, [r5, #0x48] + bl sub_02025F30 + cmp r0, #0 + bne _021D10AC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x2a + str r0, [sp, #0xc] + mov r1, #2 + ldr r2, [r5, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020070E8 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + mov r0, #0x2a + str r0, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r4, #0 + mov r3, #2 + bl sub_0200710C + mov r2, #0 + str r2, [sp] + mov r0, #0x2a + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #4 + add r3, r2, #0 + bl sub_02007130 + b _021D10EE +_021D10AC: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x2a + str r0, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r4, #0 + mov r1, #3 + mov r3, #2 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x2a + str r0, [sp, #0xc] + ldr r2, [r5, #0] + add r0, r4, #0 + mov r1, #1 + mov r3, #2 + bl sub_0200710C + mov r2, #0 + str r2, [sp] + mov r0, #0x2a + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #5 + add r3, r2, #0 + bl sub_02007130 +_021D10EE: + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, [r5, #0] + mov r1, #2 + bl sub_02019FE4 + add r1, r5, #0 + mov r2, #2 + add r1, #0x5c + lsl r2, r2, #0xa + bl sub_020C4B18 + ldr r0, [r5, #0] + add r5, #0x5c + mov r3, #2 + mov r1, #3 + add r2, r5, #0 + lsl r3, r3, #0xa + bl sub_02019574 + mov r1, #0x1e + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x2a + bl sub_02002E7C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov81_021D1050 + + thumb_func_start ov81_021D1130 +ov81_021D1130: ; 0x021D1130 + push {r4, lr} + ldr r2, _021D1158 ; =0x0000016E + add r4, r0, #0 + mov r0, #0 + mov r1, #0x1a + mov r3, #0x2a + bl sub_0200B144 + str r0, [r4, #0x50] + mov r0, #0x2a + bl sub_0200B358 + str r0, [r4, #0x54] + mov r0, #0x80 + mov r1, #0x2a + bl sub_02023790 + str r0, [r4, #0x58] + pop {r4, pc} + nop +_021D1158: .word 0x0000016E + thumb_func_end ov81_021D1130 + + thumb_func_start ov81_021D115C +ov81_021D115C: ; 0x021D115C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x50] + bl sub_0200B190 + ldr r0, [r4, #0x54] + bl sub_0200B3F0 + ldr r0, [r4, #0x58] + bl sub_020237BC + pop {r4, pc} + thumb_func_end ov81_021D115C + + thumb_func_start ov81_021D1174 +ov81_021D1174: ; 0x021D1174 + push {r3, lr} + bl sub_0200F2AC + cmp r0, #1 + bne _021D1182 + mov r0, #1 + pop {r3, pc} +_021D1182: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov81_021D1174 + + thumb_func_start ov81_021D1188 +ov81_021D1188: ; 0x021D1188 + push {r3, lr} + ldr r1, _021D1204 ; =0x021BF67C + ldr r3, [r1, #0x48] + mov r1, #0x20 + add r2, r3, #0 + tst r2, r1 + beq _021D11A8 + sub r1, #0x21 + bl ov81_021D13CC + cmp r0, #1 + bne _021D11A4 + mov r0, #2 + pop {r3, pc} +_021D11A4: + mov r0, #1 + pop {r3, pc} +_021D11A8: + mov r1, #0x11 + tst r1, r3 + beq _021D11C0 + mov r1, #1 + bl ov81_021D13CC + cmp r0, #1 + bne _021D11BC + mov r0, #3 + pop {r3, pc} +_021D11BC: + mov r0, #1 + pop {r3, pc} +_021D11C0: + mov r2, #2 + add r1, r3, #0 + tst r1, r2 + beq _021D11EA + ldr r1, _021D1208 ; =0x0000105C + ldrsb r1, [r0, r1] + cmp r1, #0 + beq _021D11DE + sub r1, r2, #3 + bl ov81_021D13CC + cmp r0, #1 + bne _021D11EA + mov r0, #2 + pop {r3, pc} +_021D11DE: + mov r0, #1 + mov r1, #0x2a + bl sub_0208C120 + mov r0, #4 + pop {r3, pc} +_021D11EA: + ldr r0, _021D1204 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #8 + tst r0, r1 + beq _021D1200 + mov r0, #1 + mov r1, #0x2a + bl sub_0208C120 + mov r0, #4 + pop {r3, pc} +_021D1200: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 +_021D1204: .word 0x021BF67C +_021D1208: .word 0x0000105C + thumb_func_end ov81_021D1188 + + thumb_func_start ov81_021D120C +ov81_021D120C: ; 0x021D120C + push {r3, r4, lr} + sub sp, #0xc + ldr r1, _021D12C8 ; =0x0000105E + add r4, r0, #0 + ldrsb r1, [r4, r1] + cmp r1, #0 + beq _021D1220 + cmp r1, #1 + beq _021D125C + b _021D12C2 +_021D1220: + bl ov81_021D1360 + ldr r2, _021D12CC ; =0x00001063 + add r0, r4, #0 + ldrb r1, [r4, r2] + sub r2, r2, #7 + ldrsb r2, [r4, r2] + sub r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl ov81_021D140C + ldr r1, _021D12D0 ; =0x0000105C + ldrsb r0, [r4, r1] + sub r0, r0, #1 + strb r0, [r4, r1] + add r1, r1, #4 + ldrsb r2, [r4, r1] + mov r1, #1 + add r0, r4, #0 + eor r1, r2 + bl ov81_021D164C + ldr r0, _021D12C8 ; =0x0000105E + mov r1, #1 + strb r1, [r4, r0] + ldr r0, _021D12D4 ; =0x00000691 + bl sub_02005748 + b _021D12C2 +_021D125C: + bl ov81_021D14E0 + cmp r0, #1 + bne _021D12C2 + ldr r1, _021D12D8 ; =0x0000105F + mov r3, #0 + strb r3, [r4, r1] + sub r0, r1, #1 + strb r3, [r4, r0] + add r0, r1, #1 + ldrsb r2, [r4, r0] + mov r0, #1 + eor r2, r0 + add r0, r1, #1 + strb r2, [r4, r0] + ldr r2, _021D12DC ; =0x0000085C + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + add r1, r1, #3 + ldrb r1, [r4, r1] + ldr r0, [r4, #0] + add r2, r4, r2 + bl sub_020198C0 + mov r3, #0 + add r2, r4, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r1, _021D12E0 ; =0x00001061 + ldr r0, [r4, #0] + ldrb r1, [r4, r1] + add r2, #0x5c + bl sub_020198C0 + ldr r1, _021D12E4 ; =0x00001062 + ldr r0, [r4, #0] + ldrb r1, [r4, r1] + bl sub_0201C3C0 + ldr r1, _021D12E0 ; =0x00001061 + ldr r0, [r4, #0] + ldrb r1, [r4, r1] + bl sub_0201C3C0 + add sp, #0xc + mov r0, #1 + pop {r3, r4, pc} +_021D12C2: + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_021D12C8: .word 0x0000105E +_021D12CC: .word 0x00001063 +_021D12D0: .word 0x0000105C +_021D12D4: .word 0x00000691 +_021D12D8: .word 0x0000105F +_021D12DC: .word 0x0000085C +_021D12E0: .word 0x00001061 +_021D12E4: .word 0x00001062 + thumb_func_end ov81_021D120C + + thumb_func_start ov81_021D12E8 +ov81_021D12E8: ; 0x021D12E8 + push {r4, lr} + ldr r1, _021D1348 ; =0x0000105E + add r4, r0, #0 + ldrsb r1, [r4, r1] + cmp r1, #0 + beq _021D12FA + cmp r1, #1 + beq _021D1322 + b _021D1342 +_021D12FA: + bl ov81_021D1360 + ldr r1, _021D134C ; =0x0000105C + ldrsb r0, [r4, r1] + add r0, r0, #1 + strb r0, [r4, r1] + add r1, r1, #4 + ldrsb r2, [r4, r1] + mov r1, #1 + add r0, r4, #0 + eor r1, r2 + bl ov81_021D164C + ldr r0, _021D1348 ; =0x0000105E + mov r1, #1 + strb r1, [r4, r0] + ldr r0, _021D1350 ; =0x00000691 + bl sub_02005748 + b _021D1342 +_021D1322: + bl ov81_021D156C + cmp r0, #1 + bne _021D1342 + ldr r1, _021D1354 ; =0x0000105F + mov r2, #0 + strb r2, [r4, r1] + sub r0, r1, #1 + strb r2, [r4, r0] + add r0, r1, #1 + ldrsb r2, [r4, r0] + mov r0, #1 + add r1, r1, #1 + eor r2, r0 + strb r2, [r4, r1] + pop {r4, pc} +_021D1342: + mov r0, #3 + pop {r4, pc} + nop +_021D1348: .word 0x0000105E +_021D134C: .word 0x0000105C +_021D1350: .word 0x00000691 +_021D1354: .word 0x0000105F + thumb_func_end ov81_021D12E8 + + thumb_func_start ov81_021D1358 +ov81_021D1358: ; 0x021D1358 + ldr r3, _021D135C ; =sub_0200F2AC + bx r3 + ; .align 2, 0 +_021D135C: .word sub_0200F2AC + thumb_func_end ov81_021D1358 + + thumb_func_start ov81_021D1360 +ov81_021D1360: ; 0x021D1360 + ldr r2, _021D139C ; =0x00001060 + ldrsb r1, [r0, r2] + cmp r1, #0 + bne _021D1382 + mov r3, #0 + add r1, r2, #2 + strb r3, [r0, r1] + mov r3, #2 + add r1, r2, #1 + strb r3, [r0, r1] + mov r3, #1 + add r1, r2, #4 + strb r3, [r0, r1] + mov r3, #3 + add r1, r2, #3 + strb r3, [r0, r1] + bx lr +_021D1382: + mov r3, #1 + add r1, r2, #2 + strb r3, [r0, r1] + mov r3, #3 + add r1, r2, #1 + strb r3, [r0, r1] + mov r3, #0 + add r1, r2, #4 + strb r3, [r0, r1] + mov r3, #2 + add r1, r2, #3 + strb r3, [r0, r1] + bx lr + ; .align 2, 0 +_021D139C: .word 0x00001060 + thumb_func_end ov81_021D1360 + + thumb_func_start ov81_021D13A0 +ov81_021D13A0: ; 0x021D13A0 + push {r3, lr} + ldr r0, [r0, #0x44] + add r3, r1, #0 + add r1, sp, #0 + mov r2, #0 + bl sub_0202C2A4 + ldr r1, [sp] + lsl r0, r1, #0x19 + lsr r0, r0, #0x19 + bne _021D13C6 + lsl r0, r1, #0x15 + lsr r0, r0, #0x1c + bne _021D13C6 + lsl r0, r1, #0xd + lsr r0, r0, #0x1b + bne _021D13C6 + mov r0, #0 + pop {r3, pc} +_021D13C6: + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov81_021D13A0 + + thumb_func_start ov81_021D13CC +ov81_021D13CC: ; 0x021D13CC + push {r3, lr} + cmp r1, #1 + ldr r1, _021D1408 ; =0x0000105C + bne _021D13EC + ldrsb r1, [r0, r1] + cmp r1, #9 + beq _021D1404 + add r1, r1, #1 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov81_021D13A0 + cmp r0, #1 + bne _021D1404 + mov r0, #1 + pop {r3, pc} +_021D13EC: + ldrsb r1, [r0, r1] + cmp r1, #0 + beq _021D1404 + sub r1, r1, #1 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl ov81_021D13A0 + cmp r0, #1 + bne _021D1404 + mov r0, #1 + pop {r3, pc} +_021D1404: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_021D1408: .word 0x0000105C + thumb_func_end ov81_021D13CC + + thumb_func_start ov81_021D140C +ov81_021D140C: ; 0x021D140C + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x20 + str r0, [sp] + str r0, [sp, #4] + str r2, [sp, #8] + mov r2, #0 + ldr r0, [r5, #0] + add r3, r2, #0 + add r4, r1, #0 + bl sub_02019E2C + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_0201C3C0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov81_021D140C + + thumb_func_start ov81_021D1434 +ov81_021D1434: ; 0x021D1434 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02019FE4 + ldr r2, _021D144C ; =0x0000085C + add r1, r4, r2 + sub r2, #0x5c + bl sub_020C4B18 + pop {r4, pc} + ; .align 2, 0 +_021D144C: .word 0x0000085C + thumb_func_end ov81_021D1434 + + thumb_func_start ov81_021D1450 +ov81_021D1450: ; 0x021D1450 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r2, [sp, #0x10] + add r6, r1, #0 + ldr r1, [sp, #0x10] + add r7, r0, #0 + lsl r1, r1, #0x18 + ldr r0, [r7, #0] + lsr r1, r1, #0x18 + add r5, r3, #0 + bl sub_02019FE4 + str r0, [sp, #0x14] + ldr r1, _021D14DC ; =0x021D33E8 + lsl r0, r5, #5 + add r5, r1, r0 + ldr r0, [sp, #0x10] + mov r4, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x18] +_021D147A: + ldrb r0, [r5, r4] + cmp r0, #0xff + bne _021D14A0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x20 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + lsl r3, r4, #0x18 + ldr r0, [r7, #0] + ldr r1, [sp, #0x18] + mov r2, #0 + lsr r3, r3, #0x18 + bl sub_02019CB8 + b _021D14C0 +_021D14A0: + ldr r0, [sp, #0x14] + lsl r1, r4, #1 + mov r2, #0 + add r3, r0, r1 +_021D14A8: + ldrb r0, [r5, r4] + lsl r1, r2, #5 + add r0, r1, r0 + lsl r0, r0, #1 + ldrh r0, [r6, r0] + lsl r1, r1, #1 + strh r0, [r3, r1] + add r0, r2, #1 + lsl r0, r0, #0x10 + lsr r2, r0, #0x10 + cmp r2, #0x20 + blo _021D14A8 +_021D14C0: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x20 + blo _021D147A + ldr r1, [sp, #0x10] + ldr r0, [r7, #0] + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + bl sub_0201C3C0 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_021D14DC: .word 0x021D33E8 + thumb_func_end ov81_021D1450 + + thumb_func_start ov81_021D14E0 +ov81_021D14E0: ; 0x021D14E0 + push {r4, lr} + ldr r3, _021D1558 ; =0x00001062 + add r4, r0, #0 + ldrb r2, [r4, r3] + sub r3, r3, #3 + ldr r1, _021D155C ; =0x0000085C + ldrsb r3, [r4, r3] + add r1, r4, r1 + bl ov81_021D1450 + ldr r3, _021D1560 ; =0x00001061 + add r1, r4, #0 + ldrb r2, [r4, r3] + sub r3, r3, #2 + ldrsb r3, [r4, r3] + add r0, r4, #0 + add r1, #0x5c + bl ov81_021D1450 + ldr r2, _021D1560 ; =0x00001061 + add r0, r4, #0 + ldrb r1, [r4, r2] + sub r2, r2, #5 + ldrsb r2, [r4, r2] + add r2, r2, #1 + lsl r2, r2, #0x18 + lsr r2, r2, #0x18 + bl ov81_021D140C + ldr r0, _021D1564 ; =0x0000105F + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrsb r1, [r4, r0] + cmp r1, #9 + bne _021D1554 + add r0, r0, #5 + ldrb r0, [r4, r0] + mov r1, #0 + bl sub_02019060 + ldr r0, _021D1568 ; =0x00001063 + mov r1, #1 + ldrb r0, [r4, r0] + bl sub_02019060 + ldr r0, _021D1558 ; =0x00001062 + mov r1, #2 + ldrb r0, [r4, r0] + bl sub_02019060 + ldr r0, _021D1560 ; =0x00001061 + mov r1, #3 + ldrb r0, [r4, r0] + bl sub_02019060 + mov r0, #1 + pop {r4, pc} +_021D1554: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 +_021D1558: .word 0x00001062 +_021D155C: .word 0x0000085C +_021D1560: .word 0x00001061 +_021D1564: .word 0x0000105F +_021D1568: .word 0x00001063 + thumb_func_end ov81_021D14E0 + + thumb_func_start ov81_021D156C +ov81_021D156C: ; 0x021D156C + push {r3, r4, r5, lr} + ldr r3, _021D15F8 ; =0x00001064 + add r4, r0, #0 + ldrb r2, [r4, r3] + sub r3, r3, #5 + ldrsb r5, [r4, r3] + mov r3, #8 + ldr r1, _021D15FC ; =0x0000085C + sub r3, r3, r5 + lsl r3, r3, #0x10 + add r1, r4, r1 + lsr r3, r3, #0x10 + bl ov81_021D1450 + ldr r3, _021D1600 ; =0x00001063 + add r1, r4, #0 + ldrb r2, [r4, r3] + sub r3, r3, #4 + ldrsb r5, [r4, r3] + mov r3, #8 + add r0, r4, #0 + sub r3, r3, r5 + lsl r3, r3, #0x10 + add r1, #0x5c + lsr r3, r3, #0x10 + bl ov81_021D1450 + ldr r2, _021D1600 ; =0x00001063 + add r0, r4, #0 + ldrb r1, [r4, r2] + sub r2, r2, #7 + ldrb r2, [r4, r2] + bl ov81_021D140C + ldr r0, _021D1604 ; =0x0000105F + ldrsb r1, [r4, r0] + cmp r1, #1 + bne _021D15E0 + add r0, r0, #5 + ldrb r0, [r4, r0] + mov r1, #0 + bl sub_02019060 + ldr r0, _021D1600 ; =0x00001063 + mov r1, #1 + ldrb r0, [r4, r0] + bl sub_02019060 + ldr r0, _021D1608 ; =0x00001062 + mov r1, #2 + ldrb r0, [r4, r0] + bl sub_02019060 + ldr r0, _021D160C ; =0x00001061 + mov r1, #3 + ldrb r0, [r4, r0] + bl sub_02019060 +_021D15E0: + ldr r0, _021D1604 ; =0x0000105F + ldrsb r1, [r4, r0] + add r1, r1, #1 + strb r1, [r4, r0] + ldrsb r0, [r4, r0] + cmp r0, #9 + bne _021D15F2 + mov r0, #1 + pop {r3, r4, r5, pc} +_021D15F2: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D15F8: .word 0x00001064 +_021D15FC: .word 0x0000085C +_021D1600: .word 0x00001063 +_021D1604: .word 0x0000105F +_021D1608: .word 0x00001062 +_021D160C: .word 0x00001061 + thumb_func_end ov81_021D156C + + .rodata + + + .global Unk_ov81_021D3340 +Unk_ov81_021D3340: ; 0x021D3340 + .incbin "incbin/overlay81_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov81_021D3350 +Unk_ov81_021D3350: ; 0x021D3350 + .incbin "incbin/overlay81_rodata.bin", 0x10, 0x2C - 0x10 + + .global Unk_ov81_021D336C +Unk_ov81_021D336C: ; 0x021D336C + .incbin "incbin/overlay81_rodata.bin", 0x2C, 0x48 - 0x2C + + .global Unk_ov81_021D3388 +Unk_ov81_021D3388: ; 0x021D3388 + .incbin "incbin/overlay81_rodata.bin", 0x48, 0x64 - 0x48 + + .global Unk_ov81_021D33A4 +Unk_ov81_021D33A4: ; 0x021D33A4 + .incbin "incbin/overlay81_rodata.bin", 0x64, 0x80 - 0x64 + + .global Unk_ov81_021D33C0 +Unk_ov81_021D33C0: ; 0x021D33C0 + .incbin "incbin/overlay81_rodata.bin", 0x80, 0xA8 - 0x80 + + .global Unk_ov81_021D33E8 +Unk_ov81_021D33E8: ; 0x021D33E8 + .incbin "incbin/overlay81_rodata.bin", 0xA8, 0x120 + diff --git a/asm/overlay81.s b/asm/ov81_021D1610.s similarity index 77% rename from asm/overlay81.s rename to asm/ov81_021D1610.s index 20b31ac01..db744ae63 100644 --- a/asm/overlay81.s +++ b/asm/ov81_021D1610.s @@ -1,1076 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov81_021D0D80 -ov81_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _021D0E60 ; =0xFFFFE0FF - ldr r3, _021D0E64 ; =0x04001000 - and r2, r1 - str r2, [r0, #0] - ldr r2, [r3, #0] - add r0, #0x50 - and r1, r2 - str r1, [r3, #0] - mov r1, #0 - strh r1, [r0] - add r3, #0x50 - strh r1, [r3] - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - mov r2, #2 - mov r0, #3 - mov r1, #0x2a - lsl r2, r2, #0x10 - bl sub_02017FC8 - add r0, r4, #0 - bl sub_02006840 - add r5, r0, #0 - ldr r1, _021D0E68 ; =0x00001068 - add r0, r4, #0 - mov r2, #0x2a - bl sub_0200681C - ldr r2, _021D0E68 ; =0x00001068 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x2a - bl sub_02018340 - str r0, [r4, #0] - str r5, [r4, #0x4c] - add r0, r5, #0 - bl sub_0202B628 - str r0, [r4, #0x44] - add r0, r5, #0 - bl sub_02025E38 - str r0, [r4, #0x48] - mov r0, #0 - mov r1, #0x2a - bl sub_0208C120 - mov r0, #0 - mov r1, #0x2a - bl sub_02002BEC - bl ov81_021D0F20 - ldr r0, [r4, #0] - bl ov81_021D0F40 - add r0, r4, #0 - bl ov81_021D1050 - add r0, r4, #0 - bl ov81_021D1130 - add r0, r4, #0 - bl ov81_021D1610 - add r0, r4, #0 - mov r1, #0 - bl ov81_021D164C - add r0, r4, #0 - bl ov81_021D1434 - ldr r0, _021D0E6C ; =ov81_021D0F00 - add r1, r4, #0 - bl sub_02017798 - bl sub_0201FFD0 - bl sub_02039734 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r1, #0 - mov r0, #0x43 - add r2, r1, #0 - bl sub_02004550 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D0E60: .word 0xFFFFE0FF -_021D0E64: .word 0x04001000 -_021D0E68: .word 0x00001068 -_021D0E6C: .word ov81_021D0F00 - thumb_func_end ov81_021D0D80 - - thumb_func_start ov81_021D0E70 -ov81_021D0E70: ; 0x021D0E70 - push {r4, lr} - add r4, r1, #0 - bl sub_0200682C - ldr r1, [r4, #0] - cmp r1, #4 - bhi _021D0EC0 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D0E8A: ; jump table - .short _021D0E94 - _021D0E8A - 2 ; case 0 - .short _021D0E9C - _021D0E8A - 2 ; case 1 - .short _021D0EA4 - _021D0E8A - 2 ; case 2 - .short _021D0EAC - _021D0E8A - 2 ; case 3 - .short _021D0EB4 - _021D0E8A - 2 ; case 4 -_021D0E94: - bl ov81_021D1174 - str r0, [r4, #0] - b _021D0EC0 -_021D0E9C: - bl ov81_021D1188 - str r0, [r4, #0] - b _021D0EC0 -_021D0EA4: - bl ov81_021D120C - str r0, [r4, #0] - b _021D0EC0 -_021D0EAC: - bl ov81_021D12E8 - str r0, [r4, #0] - b _021D0EC0 -_021D0EB4: - bl ov81_021D1358 - cmp r0, #1 - bne _021D0EC0 - mov r0, #1 - pop {r4, pc} -_021D0EC0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov81_021D0E70 - - thumb_func_start ov81_021D0EC4 -ov81_021D0EC4: ; 0x021D0EC4 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - add r0, r4, #0 - bl ov81_021D1634 - ldr r0, [r4, #0] - bl ov81_021D101C - add r0, r4, #0 - bl ov81_021D115C - mov r0, #0 - bl sub_02002C28 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0x2a - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov81_021D0EC4 - - thumb_func_start ov81_021D0F00 -ov81_021D0F00: ; 0x021D0F00 - push {r3, lr} - ldr r0, [r0, #0] - bl sub_0201C2B8 - ldr r3, _021D0F18 ; =0x027E0000 - ldr r1, _021D0F1C ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r3, pc} - nop -_021D0F18: .word 0x027E0000 -_021D0F1C: .word 0x00003FF8 - thumb_func_end ov81_021D0F00 - - thumb_func_start ov81_021D0F20 -ov81_021D0F20: ; 0x021D0F20 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D0F3C ; =0x021D33C0 - add r3, sp, #0 - mov r2, #5 -_021D0F2A: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D0F2A - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D0F3C: .word 0x021D33C0 - thumb_func_end ov81_021D0F20 - - thumb_func_start ov81_021D0F40 -ov81_021D0F40: ; 0x021D0F40 - push {r3, r4, r5, lr} - sub sp, #0x80 - ldr r5, _021D1008 ; =0x021D3340 - add r3, sp, #0x70 - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D100C ; =0x021D336C - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _021D1010 ; =0x021D3350 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - ldr r5, _021D1014 ; =0x021D3388 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D1018 ; =0x021D33A4 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x2a - bl sub_02019690 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x2a - bl sub_02019690 - add sp, #0x80 - pop {r3, r4, r5, pc} - nop -_021D1008: .word 0x021D3340 -_021D100C: .word 0x021D336C -_021D1010: .word 0x021D3350 -_021D1014: .word 0x021D3388 -_021D1018: .word 0x021D33A4 - thumb_func_end ov81_021D0F40 - - thumb_func_start ov81_021D101C -ov81_021D101C: ; 0x021D101C - push {r4, lr} - add r4, r0, #0 - bl sub_0201FF00 - add r0, r4, #0 - mov r1, #3 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - mov r0, #0x2a - add r1, r4, #0 - bl sub_02018238 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov81_021D101C - - thumb_func_start ov81_021D1050 -ov81_021D1050: ; 0x021D1050 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x50 - mov r1, #0x2a - bl sub_02006C24 - add r4, r0, #0 - ldr r0, [r5, #0x48] - bl sub_02025F30 - cmp r0, #0 - bne _021D10AC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x2a - str r0, [sp, #0xc] - mov r1, #2 - ldr r2, [r5, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020070E8 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r0, #0x2a - str r0, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r4, #0 - mov r3, #2 - bl sub_0200710C - mov r2, #0 - str r2, [sp] - mov r0, #0x2a - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #4 - add r3, r2, #0 - bl sub_02007130 - b _021D10EE -_021D10AC: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x2a - str r0, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r4, #0 - mov r1, #3 - mov r3, #2 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x2a - str r0, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r4, #0 - mov r1, #1 - mov r3, #2 - bl sub_0200710C - mov r2, #0 - str r2, [sp] - mov r0, #0x2a - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #5 - add r3, r2, #0 - bl sub_02007130 -_021D10EE: - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, [r5, #0] - mov r1, #2 - bl sub_02019FE4 - add r1, r5, #0 - mov r2, #2 - add r1, #0x5c - lsl r2, r2, #0xa - bl sub_020C4B18 - ldr r0, [r5, #0] - add r5, #0x5c - mov r3, #2 - mov r1, #3 - add r2, r5, #0 - lsl r3, r3, #0xa - bl sub_02019574 - mov r1, #0x1e - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x2a - bl sub_02002E7C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov81_021D1050 - - thumb_func_start ov81_021D1130 -ov81_021D1130: ; 0x021D1130 - push {r4, lr} - ldr r2, _021D1158 ; =0x0000016E - add r4, r0, #0 - mov r0, #0 - mov r1, #0x1a - mov r3, #0x2a - bl sub_0200B144 - str r0, [r4, #0x50] - mov r0, #0x2a - bl sub_0200B358 - str r0, [r4, #0x54] - mov r0, #0x80 - mov r1, #0x2a - bl sub_02023790 - str r0, [r4, #0x58] - pop {r4, pc} - nop -_021D1158: .word 0x0000016E - thumb_func_end ov81_021D1130 - - thumb_func_start ov81_021D115C -ov81_021D115C: ; 0x021D115C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - bl sub_0200B190 - ldr r0, [r4, #0x54] - bl sub_0200B3F0 - ldr r0, [r4, #0x58] - bl sub_020237BC - pop {r4, pc} - thumb_func_end ov81_021D115C - - thumb_func_start ov81_021D1174 -ov81_021D1174: ; 0x021D1174 - push {r3, lr} - bl sub_0200F2AC - cmp r0, #1 - bne _021D1182 - mov r0, #1 - pop {r3, pc} -_021D1182: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov81_021D1174 - - thumb_func_start ov81_021D1188 -ov81_021D1188: ; 0x021D1188 - push {r3, lr} - ldr r1, _021D1204 ; =0x021BF67C - ldr r3, [r1, #0x48] - mov r1, #0x20 - add r2, r3, #0 - tst r2, r1 - beq _021D11A8 - sub r1, #0x21 - bl ov81_021D13CC - cmp r0, #1 - bne _021D11A4 - mov r0, #2 - pop {r3, pc} -_021D11A4: - mov r0, #1 - pop {r3, pc} -_021D11A8: - mov r1, #0x11 - tst r1, r3 - beq _021D11C0 - mov r1, #1 - bl ov81_021D13CC - cmp r0, #1 - bne _021D11BC - mov r0, #3 - pop {r3, pc} -_021D11BC: - mov r0, #1 - pop {r3, pc} -_021D11C0: - mov r2, #2 - add r1, r3, #0 - tst r1, r2 - beq _021D11EA - ldr r1, _021D1208 ; =0x0000105C - ldrsb r1, [r0, r1] - cmp r1, #0 - beq _021D11DE - sub r1, r2, #3 - bl ov81_021D13CC - cmp r0, #1 - bne _021D11EA - mov r0, #2 - pop {r3, pc} -_021D11DE: - mov r0, #1 - mov r1, #0x2a - bl sub_0208C120 - mov r0, #4 - pop {r3, pc} -_021D11EA: - ldr r0, _021D1204 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #8 - tst r0, r1 - beq _021D1200 - mov r0, #1 - mov r1, #0x2a - bl sub_0208C120 - mov r0, #4 - pop {r3, pc} -_021D1200: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 -_021D1204: .word 0x021BF67C -_021D1208: .word 0x0000105C - thumb_func_end ov81_021D1188 - - thumb_func_start ov81_021D120C -ov81_021D120C: ; 0x021D120C - push {r3, r4, lr} - sub sp, #0xc - ldr r1, _021D12C8 ; =0x0000105E - add r4, r0, #0 - ldrsb r1, [r4, r1] - cmp r1, #0 - beq _021D1220 - cmp r1, #1 - beq _021D125C - b _021D12C2 -_021D1220: - bl ov81_021D1360 - ldr r2, _021D12CC ; =0x00001063 - add r0, r4, #0 - ldrb r1, [r4, r2] - sub r2, r2, #7 - ldrsb r2, [r4, r2] - sub r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl ov81_021D140C - ldr r1, _021D12D0 ; =0x0000105C - ldrsb r0, [r4, r1] - sub r0, r0, #1 - strb r0, [r4, r1] - add r1, r1, #4 - ldrsb r2, [r4, r1] - mov r1, #1 - add r0, r4, #0 - eor r1, r2 - bl ov81_021D164C - ldr r0, _021D12C8 ; =0x0000105E - mov r1, #1 - strb r1, [r4, r0] - ldr r0, _021D12D4 ; =0x00000691 - bl sub_02005748 - b _021D12C2 -_021D125C: - bl ov81_021D14E0 - cmp r0, #1 - bne _021D12C2 - ldr r1, _021D12D8 ; =0x0000105F - mov r3, #0 - strb r3, [r4, r1] - sub r0, r1, #1 - strb r3, [r4, r0] - add r0, r1, #1 - ldrsb r2, [r4, r0] - mov r0, #1 - eor r2, r0 - add r0, r1, #1 - strb r2, [r4, r0] - ldr r2, _021D12DC ; =0x0000085C - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - add r1, r1, #3 - ldrb r1, [r4, r1] - ldr r0, [r4, #0] - add r2, r4, r2 - bl sub_020198C0 - mov r3, #0 - add r2, r4, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r1, _021D12E0 ; =0x00001061 - ldr r0, [r4, #0] - ldrb r1, [r4, r1] - add r2, #0x5c - bl sub_020198C0 - ldr r1, _021D12E4 ; =0x00001062 - ldr r0, [r4, #0] - ldrb r1, [r4, r1] - bl sub_0201C3C0 - ldr r1, _021D12E0 ; =0x00001061 - ldr r0, [r4, #0] - ldrb r1, [r4, r1] - bl sub_0201C3C0 - add sp, #0xc - mov r0, #1 - pop {r3, r4, pc} -_021D12C2: - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021D12C8: .word 0x0000105E -_021D12CC: .word 0x00001063 -_021D12D0: .word 0x0000105C -_021D12D4: .word 0x00000691 -_021D12D8: .word 0x0000105F -_021D12DC: .word 0x0000085C -_021D12E0: .word 0x00001061 -_021D12E4: .word 0x00001062 - thumb_func_end ov81_021D120C - - thumb_func_start ov81_021D12E8 -ov81_021D12E8: ; 0x021D12E8 - push {r4, lr} - ldr r1, _021D1348 ; =0x0000105E - add r4, r0, #0 - ldrsb r1, [r4, r1] - cmp r1, #0 - beq _021D12FA - cmp r1, #1 - beq _021D1322 - b _021D1342 -_021D12FA: - bl ov81_021D1360 - ldr r1, _021D134C ; =0x0000105C - ldrsb r0, [r4, r1] - add r0, r0, #1 - strb r0, [r4, r1] - add r1, r1, #4 - ldrsb r2, [r4, r1] - mov r1, #1 - add r0, r4, #0 - eor r1, r2 - bl ov81_021D164C - ldr r0, _021D1348 ; =0x0000105E - mov r1, #1 - strb r1, [r4, r0] - ldr r0, _021D1350 ; =0x00000691 - bl sub_02005748 - b _021D1342 -_021D1322: - bl ov81_021D156C - cmp r0, #1 - bne _021D1342 - ldr r1, _021D1354 ; =0x0000105F - mov r2, #0 - strb r2, [r4, r1] - sub r0, r1, #1 - strb r2, [r4, r0] - add r0, r1, #1 - ldrsb r2, [r4, r0] - mov r0, #1 - add r1, r1, #1 - eor r2, r0 - strb r2, [r4, r1] - pop {r4, pc} -_021D1342: - mov r0, #3 - pop {r4, pc} - nop -_021D1348: .word 0x0000105E -_021D134C: .word 0x0000105C -_021D1350: .word 0x00000691 -_021D1354: .word 0x0000105F - thumb_func_end ov81_021D12E8 - - thumb_func_start ov81_021D1358 -ov81_021D1358: ; 0x021D1358 - ldr r3, _021D135C ; =sub_0200F2AC - bx r3 - ; .align 2, 0 -_021D135C: .word sub_0200F2AC - thumb_func_end ov81_021D1358 - - thumb_func_start ov81_021D1360 -ov81_021D1360: ; 0x021D1360 - ldr r2, _021D139C ; =0x00001060 - ldrsb r1, [r0, r2] - cmp r1, #0 - bne _021D1382 - mov r3, #0 - add r1, r2, #2 - strb r3, [r0, r1] - mov r3, #2 - add r1, r2, #1 - strb r3, [r0, r1] - mov r3, #1 - add r1, r2, #4 - strb r3, [r0, r1] - mov r3, #3 - add r1, r2, #3 - strb r3, [r0, r1] - bx lr -_021D1382: - mov r3, #1 - add r1, r2, #2 - strb r3, [r0, r1] - mov r3, #3 - add r1, r2, #1 - strb r3, [r0, r1] - mov r3, #0 - add r1, r2, #4 - strb r3, [r0, r1] - mov r3, #2 - add r1, r2, #3 - strb r3, [r0, r1] - bx lr - ; .align 2, 0 -_021D139C: .word 0x00001060 - thumb_func_end ov81_021D1360 - - thumb_func_start ov81_021D13A0 -ov81_021D13A0: ; 0x021D13A0 - push {r3, lr} - ldr r0, [r0, #0x44] - add r3, r1, #0 - add r1, sp, #0 - mov r2, #0 - bl sub_0202C2A4 - ldr r1, [sp] - lsl r0, r1, #0x19 - lsr r0, r0, #0x19 - bne _021D13C6 - lsl r0, r1, #0x15 - lsr r0, r0, #0x1c - bne _021D13C6 - lsl r0, r1, #0xd - lsr r0, r0, #0x1b - bne _021D13C6 - mov r0, #0 - pop {r3, pc} -_021D13C6: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov81_021D13A0 - - thumb_func_start ov81_021D13CC -ov81_021D13CC: ; 0x021D13CC - push {r3, lr} - cmp r1, #1 - ldr r1, _021D1408 ; =0x0000105C - bne _021D13EC - ldrsb r1, [r0, r1] - cmp r1, #9 - beq _021D1404 - add r1, r1, #1 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov81_021D13A0 - cmp r0, #1 - bne _021D1404 - mov r0, #1 - pop {r3, pc} -_021D13EC: - ldrsb r1, [r0, r1] - cmp r1, #0 - beq _021D1404 - sub r1, r1, #1 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov81_021D13A0 - cmp r0, #1 - bne _021D1404 - mov r0, #1 - pop {r3, pc} -_021D1404: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021D1408: .word 0x0000105C - thumb_func_end ov81_021D13CC - - thumb_func_start ov81_021D140C -ov81_021D140C: ; 0x021D140C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x20 - str r0, [sp] - str r0, [sp, #4] - str r2, [sp, #8] - mov r2, #0 - ldr r0, [r5, #0] - add r3, r2, #0 - add r4, r1, #0 - bl sub_02019E2C - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_0201C3C0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov81_021D140C - - thumb_func_start ov81_021D1434 -ov81_021D1434: ; 0x021D1434 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02019FE4 - ldr r2, _021D144C ; =0x0000085C - add r1, r4, r2 - sub r2, #0x5c - bl sub_020C4B18 - pop {r4, pc} - ; .align 2, 0 -_021D144C: .word 0x0000085C - thumb_func_end ov81_021D1434 - - thumb_func_start ov81_021D1450 -ov81_021D1450: ; 0x021D1450 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r2, [sp, #0x10] - add r6, r1, #0 - ldr r1, [sp, #0x10] - add r7, r0, #0 - lsl r1, r1, #0x18 - ldr r0, [r7, #0] - lsr r1, r1, #0x18 - add r5, r3, #0 - bl sub_02019FE4 - str r0, [sp, #0x14] - ldr r1, _021D14DC ; =0x021D33E8 - lsl r0, r5, #5 - add r5, r1, r0 - ldr r0, [sp, #0x10] - mov r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] -_021D147A: - ldrb r0, [r5, r4] - cmp r0, #0xff - bne _021D14A0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x20 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - lsl r3, r4, #0x18 - ldr r0, [r7, #0] - ldr r1, [sp, #0x18] - mov r2, #0 - lsr r3, r3, #0x18 - bl sub_02019CB8 - b _021D14C0 -_021D14A0: - ldr r0, [sp, #0x14] - lsl r1, r4, #1 - mov r2, #0 - add r3, r0, r1 -_021D14A8: - ldrb r0, [r5, r4] - lsl r1, r2, #5 - add r0, r1, r0 - lsl r0, r0, #1 - ldrh r0, [r6, r0] - lsl r1, r1, #1 - strh r0, [r3, r1] - add r0, r2, #1 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - cmp r2, #0x20 - blo _021D14A8 -_021D14C0: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x20 - blo _021D147A - ldr r1, [sp, #0x10] - ldr r0, [r7, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201C3C0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D14DC: .word 0x021D33E8 - thumb_func_end ov81_021D1450 - - thumb_func_start ov81_021D14E0 -ov81_021D14E0: ; 0x021D14E0 - push {r4, lr} - ldr r3, _021D1558 ; =0x00001062 - add r4, r0, #0 - ldrb r2, [r4, r3] - sub r3, r3, #3 - ldr r1, _021D155C ; =0x0000085C - ldrsb r3, [r4, r3] - add r1, r4, r1 - bl ov81_021D1450 - ldr r3, _021D1560 ; =0x00001061 - add r1, r4, #0 - ldrb r2, [r4, r3] - sub r3, r3, #2 - ldrsb r3, [r4, r3] - add r0, r4, #0 - add r1, #0x5c - bl ov81_021D1450 - ldr r2, _021D1560 ; =0x00001061 - add r0, r4, #0 - ldrb r1, [r4, r2] - sub r2, r2, #5 - ldrsb r2, [r4, r2] - add r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl ov81_021D140C - ldr r0, _021D1564 ; =0x0000105F - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrsb r1, [r4, r0] - cmp r1, #9 - bne _021D1554 - add r0, r0, #5 - ldrb r0, [r4, r0] - mov r1, #0 - bl sub_02019060 - ldr r0, _021D1568 ; =0x00001063 - mov r1, #1 - ldrb r0, [r4, r0] - bl sub_02019060 - ldr r0, _021D1558 ; =0x00001062 - mov r1, #2 - ldrb r0, [r4, r0] - bl sub_02019060 - ldr r0, _021D1560 ; =0x00001061 - mov r1, #3 - ldrb r0, [r4, r0] - bl sub_02019060 - mov r0, #1 - pop {r4, pc} -_021D1554: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D1558: .word 0x00001062 -_021D155C: .word 0x0000085C -_021D1560: .word 0x00001061 -_021D1564: .word 0x0000105F -_021D1568: .word 0x00001063 - thumb_func_end ov81_021D14E0 - - thumb_func_start ov81_021D156C -ov81_021D156C: ; 0x021D156C - push {r3, r4, r5, lr} - ldr r3, _021D15F8 ; =0x00001064 - add r4, r0, #0 - ldrb r2, [r4, r3] - sub r3, r3, #5 - ldrsb r5, [r4, r3] - mov r3, #8 - ldr r1, _021D15FC ; =0x0000085C - sub r3, r3, r5 - lsl r3, r3, #0x10 - add r1, r4, r1 - lsr r3, r3, #0x10 - bl ov81_021D1450 - ldr r3, _021D1600 ; =0x00001063 - add r1, r4, #0 - ldrb r2, [r4, r3] - sub r3, r3, #4 - ldrsb r5, [r4, r3] - mov r3, #8 - add r0, r4, #0 - sub r3, r3, r5 - lsl r3, r3, #0x10 - add r1, #0x5c - lsr r3, r3, #0x10 - bl ov81_021D1450 - ldr r2, _021D1600 ; =0x00001063 - add r0, r4, #0 - ldrb r1, [r4, r2] - sub r2, r2, #7 - ldrb r2, [r4, r2] - bl ov81_021D140C - ldr r0, _021D1604 ; =0x0000105F - ldrsb r1, [r4, r0] - cmp r1, #1 - bne _021D15E0 - add r0, r0, #5 - ldrb r0, [r4, r0] - mov r1, #0 - bl sub_02019060 - ldr r0, _021D1600 ; =0x00001063 - mov r1, #1 - ldrb r0, [r4, r0] - bl sub_02019060 - ldr r0, _021D1608 ; =0x00001062 - mov r1, #2 - ldrb r0, [r4, r0] - bl sub_02019060 - ldr r0, _021D160C ; =0x00001061 - mov r1, #3 - ldrb r0, [r4, r0] - bl sub_02019060 -_021D15E0: - ldr r0, _021D1604 ; =0x0000105F - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrsb r0, [r4, r0] - cmp r0, #9 - bne _021D15F2 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D15F2: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D15F8: .word 0x00001064 -_021D15FC: .word 0x0000085C -_021D1600: .word 0x00001063 -_021D1604: .word 0x0000105F -_021D1608: .word 0x00001062 -_021D160C: .word 0x00001061 - thumb_func_end ov81_021D156C thumb_func_start ov81_021D1610 ov81_021D1610: ; 0x021D1610 @@ -4784,12 +3718,11 @@ ov81_021D3304: ; 0x021D3304 ; .align 2, 0 _021D333C: .word 0x00010200 thumb_func_end ov81_021D3304 - ; 0x021D3340 - .rodata - .incbin "incbin/overlay81_rodata.bin" - .bss - .space 0x0 + .global Unk_ov81_021D3508 +Unk_ov81_021D3508: ; 0x021D3508 + .incbin "incbin/overlay81_rodata.bin", 0x1C8, 0x20 + diff --git a/asm/ov82_0223B140.s b/asm/ov82_0223B140.s new file mode 100644 index 000000000..0b210146e --- /dev/null +++ b/asm/ov82_0223B140.s @@ -0,0 +1,222 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov82_0223B140 +ov82_0223B140: ; 0x0223B140 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223B160 + bl sub_02006844 + cmp r0, #0 + beq _0223B160 + ldr r0, [r4, #0] + bl sub_02006814 + mov r0, #0 + str r0, [r4, #0] + mov r0, #1 + pop {r4, pc} +_0223B160: + mov r0, #0 + pop {r4, pc} + thumb_func_end ov82_0223B140 + + thumb_func_start ov82_0223B164 +ov82_0223B164: ; 0x0223B164 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02006840 + mov r2, #2 + add r5, r0, #0 + mov r0, #3 + mov r1, #0x37 + lsl r2, r2, #0x10 + bl sub_02017FC8 + add r0, r4, #0 + mov r1, #0x28 + mov r2, #0x37 + bl sub_0200681C + mov r1, #0 + mov r2, #0x28 + add r4, r0, #0 + bl sub_020C4CF4 + mov r0, #0x37 + str r0, [r4, #0] + str r5, [r4, #0x10] + ldr r1, [r5, #0x20] + cmp r1, #0 + beq _0223B1A4 + ldr r1, [r5, #0x24] + cmp r1, #0 + beq _0223B1A4 + bl ov4_021D1E74 +_0223B1A4: + add r0, r4, #0 + ldr r1, [r5, #0x20] + add r0, #0x26 + strb r1, [r0] + add r0, r4, #0 + ldr r1, [r5, #0x24] + add r0, #0x27 + strb r1, [r0] + ldr r0, [r4, #0] + bl sub_0207D99C + str r0, [r4, #0xc] + ldr r0, [r5, #4] + cmp r0, #1 + bne _0223B1CE + ldrh r1, [r4, #6] + mov r0, #0xff + bic r1, r0 + mov r0, #1 + orr r0, r1 + strh r0, [r4, #6] +_0223B1CE: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov82_0223B164 + + thumb_func_start ov82_0223B1D4 +ov82_0223B1D4: ; 0x0223B1D4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + bl sub_0200682C + add r6, r0, #0 + add r0, r5, #0 + bl sub_02006840 + ldr r5, [r4, #0] + cmp r5, #4 + bhi _0223B23E + add r0, r5, r5 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B1F8: ; jump table + .short _0223B202 - _0223B1F8 - 2 ; case 0 + .short _0223B210 - _0223B1F8 - 2 ; case 1 + .short _0223B21E - _0223B1F8 - 2 ; case 2 + .short _0223B22C - _0223B1F8 - 2 ; case 3 + .short _0223B23A - _0223B1F8 - 2 ; case 4 +_0223B202: + add r1, r6, #0 + add r0, r6, #0 + add r1, #0x14 + bl ov82_0223B2E0 + str r0, [r4, #0] + b _0223B23E +_0223B210: + add r1, r6, #0 + add r0, r6, #0 + add r1, #0x14 + bl ov82_0223B330 + str r0, [r4, #0] + b _0223B23E +_0223B21E: + add r1, r6, #0 + add r0, r6, #0 + add r1, #0x14 + bl ov82_0223B35C + str r0, [r4, #0] + b _0223B23E +_0223B22C: + add r1, r6, #0 + add r0, r6, #0 + add r1, #0x14 + bl ov82_0223B37C + str r0, [r4, #0] + b _0223B23E +_0223B23A: + mov r0, #1 + pop {r4, r5, r6, pc} +_0223B23E: + ldr r0, [r4, #0] + cmp r5, r0 + beq _0223B248 + mov r0, #0 + str r0, [r6, #0x14] +_0223B248: + mov r0, #0 + pop {r4, r5, r6, pc} + thumb_func_end ov82_0223B1D4 + + thumb_func_start ov82_0223B24C +ov82_0223B24C: ; 0x0223B24C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r1, #0 + bl sub_0200682C + add r6, r0, #0 + add r0, r7, #0 + bl sub_02006840 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223B26C + cmp r0, #1 + beq _0223B2BC + b _0223B2D8 +_0223B26C: + ldr r0, [r6, #0] + str r0, [sp] + ldr r0, [r6, #0xc] + bl sub_020181C4 + add r0, r6, #0 + mov r1, #0 + mov r2, #0x28 + bl sub_020C4CF4 + add r0, r7, #0 + bl sub_02006830 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0223B296 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _0223B296 + bl ov4_021D1F18 +_0223B296: + ldr r0, [sp] + bl sub_0201807C + ldr r0, [r4, #0x20] + cmp r0, #0 + bne _0223B2A6 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223B2A6: + mov r0, #0 + mov r1, #1 + bl sub_020388F4 + mov r0, #4 + bl sub_020364F0 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223B2DC +_0223B2BC: + mov r0, #4 + bl sub_02036540 + cmp r0, #0 + bne _0223B2D4 + bl sub_02035E18 + add r4, r0, #0 + bl sub_02032E64 + cmp r4, r0 + bge _0223B2DC +_0223B2D4: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223B2D8: + bl sub_02022974 +_0223B2DC: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov82_0223B24C \ No newline at end of file diff --git a/asm/overlay82.s b/asm/ov82_0223B2E0.s similarity index 62% rename from asm/overlay82.s rename to asm/ov82_0223B2E0.s index a6d77dc1f..8cef2f992 100644 --- a/asm/overlay82.s +++ b/asm/ov82_0223B2E0.s @@ -1,222 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov82_0223B140 -ov82_0223B140: ; 0x0223B140 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223B160 - bl sub_02006844 - cmp r0, #0 - beq _0223B160 - ldr r0, [r4, #0] - bl sub_02006814 - mov r0, #0 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} -_0223B160: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov82_0223B140 - - thumb_func_start ov82_0223B164 -ov82_0223B164: ; 0x0223B164 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02006840 - mov r2, #2 - add r5, r0, #0 - mov r0, #3 - mov r1, #0x37 - lsl r2, r2, #0x10 - bl sub_02017FC8 - add r0, r4, #0 - mov r1, #0x28 - mov r2, #0x37 - bl sub_0200681C - mov r1, #0 - mov r2, #0x28 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x37 - str r0, [r4, #0] - str r5, [r4, #0x10] - ldr r1, [r5, #0x20] - cmp r1, #0 - beq _0223B1A4 - ldr r1, [r5, #0x24] - cmp r1, #0 - beq _0223B1A4 - bl ov4_021D1E74 -_0223B1A4: - add r0, r4, #0 - ldr r1, [r5, #0x20] - add r0, #0x26 - strb r1, [r0] - add r0, r4, #0 - ldr r1, [r5, #0x24] - add r0, #0x27 - strb r1, [r0] - ldr r0, [r4, #0] - bl sub_0207D99C - str r0, [r4, #0xc] - ldr r0, [r5, #4] - cmp r0, #1 - bne _0223B1CE - ldrh r1, [r4, #6] - mov r0, #0xff - bic r1, r0 - mov r0, #1 - orr r0, r1 - strh r0, [r4, #6] -_0223B1CE: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov82_0223B164 - - thumb_func_start ov82_0223B1D4 -ov82_0223B1D4: ; 0x0223B1D4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_0200682C - add r6, r0, #0 - add r0, r5, #0 - bl sub_02006840 - ldr r5, [r4, #0] - cmp r5, #4 - bhi _0223B23E - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B1F8: ; jump table - .short _0223B202 - _0223B1F8 - 2 ; case 0 - .short _0223B210 - _0223B1F8 - 2 ; case 1 - .short _0223B21E - _0223B1F8 - 2 ; case 2 - .short _0223B22C - _0223B1F8 - 2 ; case 3 - .short _0223B23A - _0223B1F8 - 2 ; case 4 -_0223B202: - add r1, r6, #0 - add r0, r6, #0 - add r1, #0x14 - bl ov82_0223B2E0 - str r0, [r4, #0] - b _0223B23E -_0223B210: - add r1, r6, #0 - add r0, r6, #0 - add r1, #0x14 - bl ov82_0223B330 - str r0, [r4, #0] - b _0223B23E -_0223B21E: - add r1, r6, #0 - add r0, r6, #0 - add r1, #0x14 - bl ov82_0223B35C - str r0, [r4, #0] - b _0223B23E -_0223B22C: - add r1, r6, #0 - add r0, r6, #0 - add r1, #0x14 - bl ov82_0223B37C - str r0, [r4, #0] - b _0223B23E -_0223B23A: - mov r0, #1 - pop {r4, r5, r6, pc} -_0223B23E: - ldr r0, [r4, #0] - cmp r5, r0 - beq _0223B248 - mov r0, #0 - str r0, [r6, #0x14] -_0223B248: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov82_0223B1D4 - - thumb_func_start ov82_0223B24C -ov82_0223B24C: ; 0x0223B24C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - bl sub_0200682C - add r6, r0, #0 - add r0, r7, #0 - bl sub_02006840 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223B26C - cmp r0, #1 - beq _0223B2BC - b _0223B2D8 -_0223B26C: - ldr r0, [r6, #0] - str r0, [sp] - ldr r0, [r6, #0xc] - bl sub_020181C4 - add r0, r6, #0 - mov r1, #0 - mov r2, #0x28 - bl sub_020C4CF4 - add r0, r7, #0 - bl sub_02006830 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0223B296 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _0223B296 - bl ov4_021D1F18 -_0223B296: - ldr r0, [sp] - bl sub_0201807C - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _0223B2A6 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223B2A6: - mov r0, #0 - mov r1, #1 - bl sub_020388F4 - mov r0, #4 - bl sub_020364F0 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223B2DC -_0223B2BC: - mov r0, #4 - bl sub_02036540 - cmp r0, #0 - bne _0223B2D4 - bl sub_02035E18 - add r4, r0, #0 - bl sub_02032E64 - cmp r4, r0 - bge _0223B2DC -_0223B2D4: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223B2D8: - bl sub_02022974 -_0223B2DC: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov82_0223B24C thumb_func_start ov82_0223B2E0 ov82_0223B2E0: ; 0x0223B2E0 @@ -548,12 +336,23 @@ _0223B526: pop {r3, r4, pc} ; .align 2, 0 thumb_func_end ov82_0223B510 - ; 0x0223B550 - .rodata - .incbin "incbin/overlay82_rodata.bin" - .bss - .space 0x0 + .global Unk_ov82_0223B550 +Unk_ov82_0223B550: ; 0x0223B550 + .incbin "incbin/overlay82_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov82_0223B554 +Unk_ov82_0223B554: ; 0x0223B554 + .incbin "incbin/overlay82_rodata.bin", 0x4, 0x14 - 0x4 + + .global Unk_ov82_0223B564 +Unk_ov82_0223B564: ; 0x0223B564 + .incbin "incbin/overlay82_rodata.bin", 0x14, 0x24 - 0x14 + + .global Unk_ov82_0223B574 +Unk_ov82_0223B574: ; 0x0223B574 + .incbin "incbin/overlay82_rodata.bin", 0x24, 0x10 + diff --git a/asm/ov83_0223B5A0.s b/asm/ov83_0223B5A0.s new file mode 100644 index 000000000..935a92ab0 --- /dev/null +++ b/asm/ov83_0223B5A0.s @@ -0,0 +1,2460 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223B5A0 +ov83_0223B5A0: ; 0x0223B5A0 + push {r3, lr} + ldr r0, [r0, #0x18] + bl ov83_0223CBFC + bl sub_0201DCAC + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov83_0223B5A0 + + thumb_func_start ov83_0223B5B0 +ov83_0223B5B0: ; 0x0223B5B0 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_02006840 + mov r2, #2 + add r4, r0, #0 + mov r0, #3 + mov r1, #0x38 + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, _0223B64C ; =0x00001604 + add r0, r5, #0 + mov r2, #0x38 + bl sub_0200681C + ldr r2, _0223B64C ; =0x00001604 + add r5, r0, #0 + mov r1, #0 + bl sub_020D5124 + str r5, [r4, #0x18] + mov r1, #0x38 + str r1, [r5, #0] + mov r0, #0x10 + bl sub_0201DBEC + ldrh r0, [r4, #6] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bne _0223B5F4 + mov r1, #1 + b _0223B5F6 +_0223B5F4: + mov r1, #0 +_0223B5F6: + ldr r0, _0223B650 ; =0x0000142C + str r1, [r5, r0] + ldr r1, [r4, #0x10] + add r0, r5, #0 + ldr r1, [r1, #0x10] + bl ov83_0223D150 + add r0, r4, #0 + add r0, #0x26 + ldrb r0, [r0] + cmp r0, #0 + beq _0223B614 + mov r0, #1 + bl sub_0203632C +_0223B614: + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x18] + bl sub_02027B50 + str r0, [r5, #0x24] + ldr r0, [r4, #0x10] + ldr r0, [r0, #0x18] + bl sub_02027AC0 + str r0, [r5, #0x28] + mov r0, #0xae + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r0, _0223B654 ; =ov83_0223B5A0 + add r1, r4, #0 + bl sub_02017798 + bl sub_020177A4 + ldr r1, _0223B658 ; =0x0000049F + mov r0, #0xc + mov r2, #1 + bl sub_02004550 + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_0223B64C: .word 0x00001604 +_0223B650: .word 0x0000142C +_0223B654: .word ov83_0223B5A0 +_0223B658: .word 0x0000049F + thumb_func_end ov83_0223B5B0 + + thumb_func_start ov83_0223B65C +ov83_0223B65C: ; 0x0223B65C + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r5, r1, #0 + bl sub_02006840 + add r7, r0, #0 + add r0, r4, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0xc] + ldr r1, _0223B70C ; =0x0224024C + str r0, [sp] + lsl r0, r0, #3 + add r1, r1, r0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223B68A + cmp r0, #1 + beq _0223B6CC + cmp r0, #2 + beq _0223B6DC + b _0223B6F0 +_0223B68A: + ldr r3, [r1, #0] + cmp r3, #0 + beq _0223B6F0 + ldr r6, [r1, #4] + add r2, r4, #0 + add r0, r7, #0 + add r1, r4, #0 + add r2, #0x10 + blx r3 + str r0, [r4, #0xc] + ldrb r0, [r4, #0x19] + cmp r0, #0 + beq _0223B6AC + ldrb r0, [r4, #0x1a] + str r0, [r4, #0xc] + mov r0, #0 + strb r0, [r4, #0x19] +_0223B6AC: + ldr r1, [r4, #0xc] + ldr r0, [sp] + cmp r0, r1 + beq _0223B6F0 + mov r0, #0 + str r0, [r4, #0x10] + ldrh r0, [r7, #6] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + beq _0223B6F0 + cmp r6, #0 + beq _0223B6F0 + str r6, [r4, #8] + mov r0, #1 + str r0, [r5, #0] + b _0223B6F0 +_0223B6CC: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_020364F0 + mov r0, #2 + str r0, [r5, #0] + b _0223B6F0 +_0223B6DC: + ldr r0, [r4, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_02036540 + cmp r0, #0 + beq _0223B6F0 + mov r0, #0 + str r0, [r5, #0] + str r0, [r4, #8] +_0223B6F0: + add r0, r4, #0 + bl ov83_0223CBA4 + ldr r0, [r4, #0] + ldr r1, [r4, #0x20] + bl sub_02038A1C + ldr r0, [r4, #4] + cmp r0, #0 + beq _0223B708 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223B708: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B70C: .word 0x0224024C + thumb_func_end ov83_0223B65C + + thumb_func_start ov83_0223B710 +ov83_0223B710: ; 0x0223B710 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02006840 + add r4, r0, #0 + add r0, r5, #0 + bl sub_0200682C + add r6, r0, #0 + add r0, r4, #0 + add r0, #0x26 + ldrb r0, [r0] + ldr r7, [r6, #0] + cmp r0, #0 + beq _0223B73A + bl sub_0203608C + cmp r0, #0 + bne _0223B73A + bl ov4_021D25FC +_0223B73A: + add r0, r6, #0 + bl ov83_0223D1EC + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201DC3C + ldr r2, _0223B770 ; =0x00001604 + add r0, r6, #0 + mov r1, #0 + bl sub_020C4CF4 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0 + str r0, [r4, #0x18] + add r0, r7, #0 + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223B770: .word 0x00001604 + thumb_func_end ov83_0223B710 + + thumb_func_start ov83_0223B774 +ov83_0223B774: ; 0x0223B774 + strb r1, [r0, #0x18] + mov r1, #1 + str r1, [r0, #0x14] + bx lr + thumb_func_end ov83_0223B774 + + thumb_func_start ov83_0223B77C +ov83_0223B77C: ; 0x0223B77C + strb r1, [r0, #0x1a] + mov r1, #1 + strb r1, [r0, #0x19] + bx lr + thumb_func_end ov83_0223B77C + + thumb_func_start ov83_0223B784 +ov83_0223B784: ; 0x0223B784 + mov r1, #1 + str r1, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223B784 + + thumb_func_start ov83_0223B78C +ov83_0223B78C: ; 0x0223B78C + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r2, [r4, #0] + add r5, r1, #0 + cmp r2, #0 + beq _0223B7A8 + cmp r2, #1 + bne _0223B7A0 + b _0223B8B2 +_0223B7A0: + cmp r2, #2 + bne _0223B7A6 + b _0223B8D0 +_0223B7A6: + b _0223B8E0 +_0223B7A8: + bl ov83_0223C82C + ldr r0, _0223B8E8 ; =0x00001428 + ldr r0, [r5, r0] + bl ov83_0223D570 + cmp r0, #0 + bne _0223B7C2 + mov r0, #0xba + lsl r0, r0, #2 + add r0, r5, r0 + bl ov83_0223FDB0 +_0223B7C2: + ldr r0, [r5, #0x24] + ldr r2, _0223B8EC ; =0x0000157C + str r0, [sp] + ldr r0, [r5, #0] + ldr r3, _0223B8F0 ; =0x00001424 + str r0, [sp, #4] + ldr r0, _0223B8F4 ; =0x0000054C + ldr r1, [r5, r3] + add r3, #0xc + add r0, r5, r0 + add r2, r5, r2 + add r3, r5, r3 + bl ov83_0223DEA0 + ldr r0, _0223B8F8 ; =0x000005A4 + add r0, r5, r0 + bl ov83_0223E340 + ldr r0, [r5, #0x24] + ldr r2, _0223B8EC ; =0x0000157C + str r0, [sp] + ldr r0, [r5, #0] + ldr r3, _0223B8F0 ; =0x00001424 + str r0, [sp, #4] + ldr r0, _0223B8FC ; =0x0000063C + ldr r1, [r5, r3] + add r3, #0xc + add r0, r5, r0 + add r2, r5, r2 + add r3, r5, r3 + bl ov83_0223E6D4 + mov r0, #0x16 + lsl r0, r0, #6 + add r0, r5, r0 + bl ov83_0223E244 + ldr r0, _0223B900 ; =0x0000058C + add r0, r5, r0 + bl ov83_0223E244 + ldr r0, _0223B904 ; =0x00000598 + add r0, r5, r0 + bl ov83_0223E244 + ldr r3, _0223B908 ; =0x00001430 + ldr r0, _0223B90C ; =0x0000061C + add r2, r3, #0 + add r1, r5, r3 + sub r2, #0xc + sub r3, #8 + ldr r2, [r5, r2] + ldr r3, [r5, r3] + add r0, r5, r0 + bl ov83_0223E5A4 + ldr r0, _0223B910 ; =0x00000674 + add r0, r5, r0 + bl ov83_0223ED3C + ldr r0, _0223B914 ; =0x00000A88 + add r0, r5, r0 + bl ov83_0223F29C + ldr r1, _0223B8F0 ; =0x00001424 + ldr r0, _0223B918 ; =0x00000B08 + ldr r1, [r5, r1] + add r0, r5, r0 + bl ov83_0223F494 + mov r0, #0x2d + lsl r0, r0, #4 + add r0, r5, r0 + bl ov83_0223F820 + add r0, r5, #0 + bl ov83_0223C958 + bl sub_02039734 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + ldr r0, _0223B8F0 ; =0x00001424 + ldr r0, [r5, r0] + cmp r0, #1 + ble _0223B87A + ldr r0, _0223B8F4 ; =0x0000054C + add r0, r5, r0 + bl ov83_0223DF84 +_0223B87A: + ldr r0, _0223B8F8 ; =0x000005A4 + mov r1, #3 + add r0, r5, r0 + mov r2, #1 + bl ov83_0223E484 + ldr r0, _0223B8F8 ; =0x000005A4 + mov r1, #4 + add r0, r5, r0 + mov r2, #1 + bl ov83_0223E484 + ldr r0, _0223B8F8 ; =0x000005A4 + mov r1, #5 + add r0, r5, r0 + mov r2, #1 + bl ov83_0223E484 + ldr r0, _0223B8F8 ; =0x000005A4 + mov r1, #6 + add r0, r5, r0 + mov r2, #1 + bl ov83_0223E484 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223B8E0 +_0223B8B2: + mov r0, #6 + mov r1, #1 + str r0, [sp] + str r1, [sp, #4] + ldr r0, [r5, #0] + ldr r3, _0223B91C ; =0x0000FFFF + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223B8E0 +_0223B8D0: + bl sub_0200F2AC + cmp r0, #0 + beq _0223B8E0 + ldr r0, [r5, #0xc] + add sp, #0xc + add r0, r0, #1 + pop {r4, r5, pc} +_0223B8E0: + ldr r0, [r5, #0xc] + add sp, #0xc + pop {r4, r5, pc} + nop +_0223B8E8: .word 0x00001428 +_0223B8EC: .word 0x0000157C +_0223B8F0: .word 0x00001424 +_0223B8F4: .word 0x0000054C +_0223B8F8: .word 0x000005A4 +_0223B8FC: .word 0x0000063C +_0223B900: .word 0x0000058C +_0223B904: .word 0x00000598 +_0223B908: .word 0x00001430 +_0223B90C: .word 0x0000061C +_0223B910: .word 0x00000674 +_0223B914: .word 0x00000A88 +_0223B918: .word 0x00000B08 +_0223B91C: .word 0x0000FFFF + thumb_func_end ov83_0223B78C + + thumb_func_start ov83_0223B920 +ov83_0223B920: ; 0x0223B920 + push {r4, lr} + ldr r0, _0223B94C ; =0x00001428 + add r4, r1, #0 + ldr r0, [r4, r0] + bl ov83_0223D570 + cmp r0, #0 + bne _0223B946 + ldr r3, _0223B94C ; =0x00001428 + mov r1, #0 + ldr r3, [r4, r3] + mov r0, #0x16 + add r2, r1, #0 + bl ov83_0223D508 + cmp r0, #0 + bne _0223B946 + ldr r0, [r4, #0xc] + pop {r4, pc} +_0223B946: + ldr r0, [r4, #0xc] + add r0, r0, #1 + pop {r4, pc} + ; .align 2, 0 +_0223B94C: .word 0x00001428 + thumb_func_end ov83_0223B920 + + thumb_func_start ov83_0223B950 +ov83_0223B950: ; 0x0223B950 + ldr r0, [r1, #0x14] + cmp r0, #0 + beq _0223B95E + ldrb r0, [r1, #0x18] + str r0, [r1, #0xc] + mov r0, #0 + str r0, [r1, #0x14] +_0223B95E: + ldr r0, [r1, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223B950 + + thumb_func_start ov83_0223B964 +ov83_0223B964: ; 0x0223B964 + push {r3, r4, r5, lr} + add r4, r2, #0 + add r5, r1, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _0223B97A + cmp r1, #1 + beq _0223B990 + cmp r1, #2 + beq _0223B9B4 + b _0223B9D2 +_0223B97A: + ldr r1, _0223B9DC ; =0x00001424 + mov r0, #0xd7 + lsl r0, r0, #2 + ldr r1, [r5, r1] + add r0, r5, r0 + bl ov83_0223DB18 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223B9D6 +_0223B990: + ldr r1, [r0, #8] + ldr r0, _0223B9E0 ; =0x00001430 + mov r2, #0 + str r1, [r5, r0] + ldr r0, _0223B9E4 ; =0x000015F8 + add r3, r5, #0 + mov r1, #2 +_0223B99E: + add r2, r2, #1 + strh r1, [r3, r0] + add r3, r3, #2 + cmp r2, #5 + blt _0223B99E + ldr r0, _0223B9E8 ; =0x00001602 + strh r1, [r5, r0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223B9D6 +_0223B9B4: + bl ov83_0223D4B8 + ldr r3, _0223B9E0 ; =0x00001430 + add r2, r0, #0 + add r1, r5, r3 + sub r3, #8 + ldr r3, [r5, r3] + mov r0, #0x19 + bl ov83_0223D508 + cmp r0, #1 + bne _0223B9D6 + ldr r0, [r5, #0xc] + add r0, r0, #1 + pop {r3, r4, r5, pc} +_0223B9D2: + bl sub_02022974 +_0223B9D6: + ldr r0, [r5, #0xc] + pop {r3, r4, r5, pc} + nop +_0223B9DC: .word 0x00001424 +_0223B9E0: .word 0x00001430 +_0223B9E4: .word 0x000015F8 +_0223B9E8: .word 0x00001602 + thumb_func_end ov83_0223B964 + + thumb_func_start ov83_0223B9EC +ov83_0223B9EC: ; 0x0223B9EC + push {r3, r4, r5, r6, r7, lr} + add r5, r2, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #5 + bls _0223B9FA + b _0223BB18 +_0223B9FA: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223BA06: ; jump table + .short _0223BA12 - _0223BA06 - 2 ; case 0 + .short _0223BA26 - _0223BA06 - 2 ; case 1 + .short _0223BA38 - _0223BA06 - 2 ; case 2 + .short _0223BA78 - _0223BA06 - 2 ; case 3 + .short _0223BA94 - _0223BA06 - 2 ; case 4 + .short _0223BABA - _0223BA06 - 2 ; case 5 +_0223BA12: + ldr r0, _0223BB1C ; =0x0000141C + ldr r1, [r4, #0] + ldr r2, [r4, #0x20] + add r0, r4, r0 + bl ov83_0223F790 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223BB18 +_0223BA26: + mov r0, #0xd7 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov83_0223DC68 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223BB18 +_0223BA38: + mov r0, #0xd7 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov83_0223DD30 + add r1, r0, #0 + cmp r1, #1 + bne _0223BA5C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + ldr r0, _0223BB20 ; =0x0000054C + add r0, r4, r0 + bl ov83_0223DF70 + mov r0, #0x18 + str r0, [r4, #0x1c] + b _0223BB18 +_0223BA5C: + cmp r1, #0 + beq _0223BB18 + add r2, r4, r1 + ldr r1, _0223BB24 ; =0x0000155E + ldr r0, _0223BB20 ; =0x0000054C + ldrb r2, [r2, r1] + sub r1, #0xc2 + add r0, r4, r0 + lsl r2, r2, #2 + add r2, r4, r2 + ldr r1, [r2, r1] + bl ov83_0223DF30 + b _0223BB18 +_0223BA78: + ldr r0, [r4, #0x1c] + cmp r0, #0 + ble _0223BA84 + sub r0, r0, #1 + str r0, [r4, #0x1c] + b _0223BB18 +_0223BA84: + ldr r0, _0223BB28 ; =0x00000598 + add r0, r4, r0 + bl ov83_0223E2FC + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223BB18 +_0223BA94: + ldr r0, _0223BB28 ; =0x00000598 + add r0, r4, r0 + bl ov83_0223E32C + cmp r0, #0 + beq _0223BB18 + ldr r0, _0223BB20 ; =0x0000054C + add r0, r4, r0 + bl ov83_0223DFAC + mov r0, #0x16 + lsl r0, r0, #6 + add r0, r4, r0 + bl ov83_0223E2E4 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223BB18 +_0223BABA: + mov r0, #0x16 + lsl r0, r0, #6 + add r0, r4, r0 + bl ov83_0223E32C + add r6, r0, #0 + ldr r0, _0223BB2C ; =0x00000588 + ldr r0, [r4, r0] + bl sub_02021E74 + add r7, r0, #0 + add r0, r7, #1 + mov r1, #3 + bl sub_020E1F6C + add r5, r0, #0 + mov r0, #0xd6 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, r5 + beq _0223BAFC + cmp r7, #0xa + bge _0223BAF0 + ldr r0, _0223BB30 ; =0x000006BD + bl sub_02005748 + b _0223BAF6 +_0223BAF0: + ldr r0, _0223BB34 ; =0x000006BE + bl sub_02005748 +_0223BAF6: + mov r0, #0xd6 + lsl r0, r0, #2 + str r5, [r4, r0] +_0223BAFC: + cmp r6, #0 + beq _0223BB18 + ldr r0, _0223BB38 ; =0x0000061C + mov r1, #1 + add r0, r4, r0 + bl ov83_0223E69C + ldr r0, _0223BB3C ; =0x000005A4 + add r0, r4, r0 + bl ov83_0223E500 + ldr r0, [r4, #0xc] + add r0, r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223BB18: + ldr r0, [r4, #0xc] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BB1C: .word 0x0000141C +_0223BB20: .word 0x0000054C +_0223BB24: .word 0x0000155E +_0223BB28: .word 0x00000598 +_0223BB2C: .word 0x00000588 +_0223BB30: .word 0x000006BD +_0223BB34: .word 0x000006BE +_0223BB38: .word 0x0000061C +_0223BB3C: .word 0x000005A4 + thumb_func_end ov83_0223B9EC + + thumb_func_start ov83_0223BB40 +ov83_0223BB40: ; 0x0223BB40 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + mov r0, #0x2d + add r5, r1, #0 + lsl r0, r0, #4 + add r0, r5, r0 + bl ov83_0223F83C + ldr r0, _0223BCC4 ; =0x00001434 + mov r1, #0x2d + lsl r1, r1, #4 + add r0, r5, r0 + add r1, r5, r1 + bl ov83_0223F88C + ldr r0, _0223BCC8 ; =0x00001428 + ldr r0, [r5, r0] + bl ov83_0223D570 + cmp r0, #0 + bne _0223BBCE + ldr r2, _0223BCCC ; =0x00001430 + mov r0, #0xba + add r1, r5, r2 + sub r2, #0xc + lsl r0, r0, #2 + ldr r2, [r5, r2] + add r0, r5, r0 + bl ov83_0223FDD8 + cmp r0, #1 + bne _0223BB92 + ldr r3, _0223BCC8 ; =0x00001428 + mov r1, #0 + ldr r3, [r5, r3] + mov r0, #0x17 + add r2, r1, #0 + bl ov83_0223D508 + ldr r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} +_0223BB92: + mov r0, #0xba + lsl r0, r0, #2 + add r0, r5, r0 + bl ov83_0223FFA0 + ldr r0, _0223BCD0 ; =0x00001578 + ldr r2, _0223BCCC ; =0x00001430 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223BBBE + mov r0, #0xba + add r1, r5, r2 + sub r2, #0xc + lsl r0, r0, #2 + ldr r2, [r5, r2] + add r0, r5, r0 + bl ov83_0223FE50 + ldr r0, _0223BCD0 ; =0x00001578 + mov r1, #1 + str r1, [r5, r0] + b _0223BBCE +_0223BBBE: + mov r0, #0xba + add r1, r5, r2 + sub r2, #0xc + lsl r0, r0, #2 + ldr r2, [r5, r2] + add r0, r5, r0 + bl ov83_0223FEC0 +_0223BBCE: + add r4, #0x26 + ldrb r0, [r4] + cmp r0, #0 + beq _0223BC84 + ldr r0, _0223BCD4 ; =0x000015F4 + ldr r1, [r5, r0] + add r1, r1, #1 + str r1, [r5, r0] + ldr r2, [r5, r0] + mov r1, #1 + tst r1, r2 + bne _0223BC9E + mov r1, #0 + str r1, [r5, r0] + ldr r0, _0223BCC8 ; =0x00001428 + ldr r0, [r5, r0] + bl ov83_0223D570 + cmp r0, #0 + bne _0223BC5E + mov r7, #1 + add r6, r7, #0 + add r4, r5, #2 +_0223BBFC: + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0223BC12 + ldr r0, _0223BCD8 ; =0x000015F8 + ldrh r0, [r4, r0] + cmp r0, #0 + bne _0223BC12 + mov r7, #0 +_0223BC12: + add r6, r6, #1 + add r4, r4, #2 + cmp r6, #8 + blt _0223BBFC + cmp r7, #0 + beq _0223BC9E + bl ov83_0223D4BC + ldr r3, _0223BCC4 ; =0x00001434 + add r2, r0, #0 + add r1, r5, r3 + sub r3, #0xc + ldr r3, [r5, r3] + mov r0, #0x1a + bl ov83_0223D508 + ldr r0, _0223BCD0 ; =0x00001578 + mov r1, #0 + add r7, r0, #0 + str r1, [r5, r0] + mov r6, #1 + add r4, r5, #2 + add r7, #0x80 +_0223BC40: + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + bl sub_02035D78 + cmp r0, #0 + beq _0223BC54 + ldr r0, _0223BCD8 ; =0x000015F8 + ldrh r0, [r4, r0] + sub r0, r0, #1 + strh r0, [r4, r7] +_0223BC54: + add r6, r6, #1 + add r4, r4, #2 + cmp r6, #8 + blt _0223BC40 + b _0223BC9E +_0223BC5E: + ldr r0, _0223BCDC ; =0x00001602 + ldrh r0, [r5, r0] + cmp r0, #0 + beq _0223BC9E + bl ov83_0223D4C8 + ldr r3, _0223BCC4 ; =0x00001434 + add r2, r0, #0 + add r1, r5, r3 + sub r3, #0xc + ldr r3, [r5, r3] + mov r0, #0x20 + bl ov83_0223D508 + ldr r0, _0223BCDC ; =0x00001602 + ldrh r1, [r5, r0] + sub r1, r1, #1 + strh r1, [r5, r0] + b _0223BC9E +_0223BC84: + bl ov83_0223D4BC + ldr r3, _0223BCC4 ; =0x00001434 + add r2, r0, #0 + add r1, r5, r3 + sub r3, #0xc + ldr r3, [r5, r3] + mov r0, #0x1a + bl ov83_0223D508 + ldr r0, _0223BCD0 ; =0x00001578 + mov r1, #0 + str r1, [r5, r0] +_0223BC9E: + add r0, r5, #0 + bl ov83_0223C3E8 + ldr r0, _0223BCE0 ; =0x00000674 + ldr r1, _0223BCCC ; =0x00001430 + add r0, r5, r0 + add r1, r5, r1 + bl ov83_0223EDA4 + ldr r0, _0223BCE4 ; =0x00000A88 + add r0, r5, r0 + bl ov83_0223F378 + ldr r0, _0223BCE8 ; =0x00000B08 + add r0, r5, r0 + bl ov83_0223F52C + ldr r0, [r5, #0xc] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BCC4: .word 0x00001434 +_0223BCC8: .word 0x00001428 +_0223BCCC: .word 0x00001430 +_0223BCD0: .word 0x00001578 +_0223BCD4: .word 0x000015F4 +_0223BCD8: .word 0x000015F8 +_0223BCDC: .word 0x00001602 +_0223BCE0: .word 0x00000674 +_0223BCE4: .word 0x00000A88 +_0223BCE8: .word 0x00000B08 + thumb_func_end ov83_0223BB40 + + thumb_func_start ov83_0223BCEC +ov83_0223BCEC: ; 0x0223BCEC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r4, r1, #0 + ldr r0, _0223BF34 ; =0x00000674 + ldr r1, _0223BF38 ; =0x00001430 + add r6, r2, #0 + add r0, r4, r0 + add r1, r4, r1 + bl ov83_0223EDA4 + ldr r0, [r6, #0] + cmp r0, #6 + bls _0223BD0A + b _0223BF28 +_0223BD0A: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223BD16: ; jump table + .short _0223BD24 - _0223BD16 - 2 ; case 0 + .short _0223BDAE - _0223BD16 - 2 ; case 1 + .short _0223BDDA - _0223BD16 - 2 ; case 2 + .short _0223BDFA - _0223BD16 - 2 ; case 3 + .short _0223BE80 - _0223BD16 - 2 ; case 4 + .short _0223BEDA - _0223BD16 - 2 ; case 5 + .short _0223BF20 - _0223BD16 - 2 ; case 6 +_0223BD24: + ldr r0, _0223BF3C ; =0x0000063C + add r0, r4, r0 + bl ov83_0223E994 + ldr r0, _0223BF40 ; =0x00000A88 + mov r1, #0 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223BF40 ; =0x00000A88 + mov r1, #1 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223BF40 ; =0x00000A88 + mov r1, #2 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223BF40 ; =0x00000A88 + mov r1, #3 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223BF44 ; =0x0000058C + add r0, r4, r0 + bl ov83_0223E2E4 + ldr r0, _0223BF48 ; =0x000006BA + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223BF4C ; =0x000006BB + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223BF50 ; =0x000006BF + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223BF54 ; =0x000006C1 + mov r1, #0 + bl sub_020057A4 + ldr r0, _0223BF58 ; =0x000006C2 + bl sub_02005748 + ldr r0, _0223BF5C ; =0x000005A4 + mov r1, #0 + add r0, r4, r0 + add r2, r1, #0 + bl ov83_0223E484 + ldr r0, _0223BF5C ; =0x000005A4 + mov r1, #1 + add r0, r4, r0 + mov r2, #0 + bl ov83_0223E484 + ldr r0, _0223BF5C ; =0x000005A4 + mov r1, #2 + add r0, r4, r0 + mov r2, #0 + bl ov83_0223E484 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BDAE: + ldr r0, _0223BF44 ; =0x0000058C + add r0, r4, r0 + bl ov83_0223E32C + cmp r0, #0 + beq _0223BDE2 + mov r0, #6 + str r0, [sp] + mov r0, #1 + mov r1, #0 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r2, r1, #0 + str r0, [sp, #8] + mov r0, #3 + add r3, r1, #0 + bl sub_0200F174 + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BDDA: + bl sub_0200F2AC + cmp r0, #0 + bne _0223BDE4 +_0223BDE2: + b _0223BF2C +_0223BDE4: + add r7, #0x26 + ldrb r0, [r7] + cmp r0, #0 + beq _0223BDF2 + mov r0, #0 + bl sub_0203632C +_0223BDF2: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BDFA: + ldr r0, [r7, #0x10] + ldr r0, [r0, #0xc] + bl sub_0202CD88 + ldr r1, _0223BF60 ; =0x0000142C + add r5, r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + bne _0223BE1C + mov r1, #0xc + bl sub_0202CFEC + add r0, r5, #0 + mov r1, #0x34 + bl sub_0202CF28 + b _0223BE2A +_0223BE1C: + mov r1, #0x12 + bl sub_0202CFEC + add r0, r5, #0 + mov r1, #0x35 + bl sub_0202CF28 +_0223BE2A: + ldr r0, _0223BF60 ; =0x0000142C + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223BE78 + ldr r0, [r7, #0x10] + ldr r0, [r0, #0xc] + bl sub_0202B370 + str r0, [sp, #0xc] + ldr r0, _0223BF64 ; =0x00001424 + mov r5, #0 + ldr r0, [r4, r0] + cmp r0, #0 + ble _0223BE78 +_0223BE46: + ldr r0, _0223BF68 ; =0x00001560 + add r1, r4, r5 + ldrb r0, [r1, r0] + bl sub_02032F1C + add r1, r0, #0 + ldr r0, [r7, #0x10] + add r2, sp, #0x10 + ldr r0, [r0, #0xc] + bl sub_0203909C + cmp r0, #0 + beq _0223BE64 + cmp r0, #1 + bne _0223BE6E +_0223BE64: + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x10] + mov r2, #1 + bl sub_0202B1D0 +_0223BE6E: + ldr r0, _0223BF64 ; =0x00001424 + add r5, r5, #1 + ldr r0, [r4, r0] + cmp r5, r0 + blt _0223BE46 +_0223BE78: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BE80: + ldr r0, _0223BF6C ; =0x00001428 + ldr r0, [r4, r0] + bl ov83_0223D570 + cmp r0, #0 + bne _0223BED2 + ldr r0, [r4, #0] + bl sub_0202A93C + add r5, r0, #0 + ldr r0, [r4, #0] + ldr r3, _0223BF38 ; =0x00001430 + str r0, [sp] + mov r0, #0xba + add r2, r4, r3 + sub r3, #0xc + lsl r0, r0, #2 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r5, #0 + bl ov83_0223FFD4 + bl sub_0202A910 + ldr r3, _0223BF6C ; =0x00001428 + add r2, r0, #0 + ldr r3, [r4, r3] + mov r0, #0x1c + add r1, r5, #0 + bl ov83_0223D508 + add r7, r0, #0 + add r0, r5, #0 + bl sub_020181C4 + cmp r7, #1 + bne _0223BF2C + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BED2: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BEDA: + ldr r0, _0223BF6C ; =0x00001428 + ldr r0, [r4, r0] + bl ov83_0223D570 + cmp r0, #0 + bne _0223BF18 + ldr r2, _0223BF38 ; =0x00001430 + mov r0, #0xba + add r1, r4, r2 + sub r2, #0xc + lsl r0, r0, #2 + ldr r2, [r4, r2] + add r0, r4, r0 + bl ov83_022401AC + bl ov83_0223D4C0 + ldr r3, _0223BF70 ; =0x00001450 + add r2, r0, #0 + add r1, r4, r3 + sub r3, #0x28 + ldr r3, [r4, r3] + mov r0, #0x1b + bl ov83_0223D508 + cmp r0, #1 + bne _0223BF2C + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BF18: + ldr r0, [r6, #0] + add r0, r0, #1 + str r0, [r6, #0] + b _0223BF2C +_0223BF20: + ldr r0, [r4, #0xc] + add sp, #0x14 + add r0, r0, #1 + pop {r4, r5, r6, r7, pc} +_0223BF28: + bl sub_02022974 +_0223BF2C: + ldr r0, [r4, #0xc] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223BF34: .word 0x00000674 +_0223BF38: .word 0x00001430 +_0223BF3C: .word 0x0000063C +_0223BF40: .word 0x00000A88 +_0223BF44: .word 0x0000058C +_0223BF48: .word 0x000006BA +_0223BF4C: .word 0x000006BB +_0223BF50: .word 0x000006BF +_0223BF54: .word 0x000006C1 +_0223BF58: .word 0x000006C2 +_0223BF5C: .word 0x000005A4 +_0223BF60: .word 0x0000142C +_0223BF64: .word 0x00001424 +_0223BF68: .word 0x00001560 +_0223BF6C: .word 0x00001428 +_0223BF70: .word 0x00001450 + thumb_func_end ov83_0223BCEC + + thumb_func_start ov83_0223BF74 +ov83_0223BF74: ; 0x0223BF74 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r2, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #0xb + bls _0223BF86 + b _0223C21C +_0223BF86: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223BF92: ; jump table + .short _0223BFAA - _0223BF92 - 2 ; case 0 + .short _0223C006 - _0223BF92 - 2 ; case 1 + .short _0223C01C - _0223BF92 - 2 ; case 2 + .short _0223C040 - _0223BF92 - 2 ; case 3 + .short _0223C06E - _0223BF92 - 2 ; case 4 + .short _0223C09A - _0223BF92 - 2 ; case 5 + .short _0223C0CE - _0223BF92 - 2 ; case 6 + .short _0223C0F4 - _0223BF92 - 2 ; case 7 + .short _0223C10E - _0223BF92 - 2 ; case 8 + .short _0223C18A - _0223BF92 - 2 ; case 9 + .short _0223C1B4 - _0223BF92 - 2 ; case 10 + .short _0223C1F2 - _0223BF92 - 2 ; case 11 +_0223BFAA: + ldr r0, _0223C228 ; =0x0000063C + mov r1, #0 + add r0, r4, r0 + bl ov83_0223EC4C + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0xae + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r4, #0] + ldr r3, _0223C22C ; =0x00001414 + str r0, [sp] + add r0, r4, r3 + add r3, #0x80 + ldrb r3, [r4, r3] + mov r1, #0x80 + mov r2, #0x90 + bl ov83_0223F730 + mov r0, #6 + mov r2, #0 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r0, [r4, #0] + add r3, r2, #0 + str r0, [sp, #8] + mov r0, #3 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C220 +_0223C006: + bl sub_0200F2AC + cmp r0, #0 + bne _0223C010 + b _0223C220 +_0223C010: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0x1e + str r0, [r4, #0x1c] + b _0223C220 +_0223C01C: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bpl _0223C11C + ldr r0, _0223C228 ; =0x0000063C + mov r1, #1 + add r0, r4, r0 + bl ov83_0223EC4C + ldr r0, _0223C230 ; =0x000006C3 + bl sub_02005748 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0x1e + str r0, [r4, #0x1c] + b _0223C220 +_0223C040: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bpl _0223C11C + ldr r0, _0223C228 ; =0x0000063C + mov r1, #2 + add r0, r4, r0 + bl ov83_0223EC4C + ldr r0, _0223C22C ; =0x00001414 + add r0, r4, r0 + bl ov83_0223F784 + ldr r0, _0223C230 ; =0x000006C3 + bl sub_02005748 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0x96 + lsl r0, r0, #2 + str r0, [r4, #0x1c] + b _0223C220 +_0223C06E: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bmi _0223C088 + ldr r0, _0223C234 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223C088 + ldr r0, _0223C238 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0223C090 +_0223C088: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C220 +_0223C090: + ldr r0, _0223C22C ; =0x00001414 + add r0, r4, r0 + bl ov83_0223F784 + b _0223C220 +_0223C09A: + ldr r0, _0223C22C ; =0x00001414 + add r0, r4, r0 + bl ov83_0223F770 + ldr r0, _0223C228 ; =0x0000063C + add r0, r4, r0 + bl ov83_0223EC70 + ldr r1, _0223C23C ; =0x00001530 + ldr r2, _0223C240 ; =0x00001424 + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r0, r6, #0 + bl ov83_0223C8B0 + ldr r0, _0223C228 ; =0x0000063C + mov r1, #0 + add r0, r4, r0 + bl ov83_0223EC8C + mov r0, #0x96 + str r0, [r4, #0x1c] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C220 +_0223C0CE: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + ldr r0, _0223C234 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223C0EC + ldr r0, [r4, #0x1c] + cmp r0, #0 + blt _0223C0EC + ldr r0, _0223C238 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0223C11C +_0223C0EC: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C220 +_0223C0F4: + ldr r0, _0223C228 ; =0x0000063C + mov r1, #1 + add r0, r4, r0 + bl ov83_0223EC8C + ldr r0, _0223C244 ; =0x0000141C + add r0, r4, r0 + bl ov83_0223F7B0 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C220 +_0223C10E: + ldr r0, _0223C244 ; =0x0000141C + add r0, r4, r0 + bl ov83_0223F7DC + sub r1, r0, #1 + cmp r1, #1 + bls _0223C11E +_0223C11C: + b _0223C220 +_0223C11E: + cmp r0, #1 + bne _0223C16A + ldr r0, [r6, #0x10] + ldr r0, [r0, #8] + bl sub_0202AC98 + cmp r0, #0x64 + blo _0223C142 + ldr r0, _0223C228 ; =0x0000063C + mov r1, #2 + add r0, r4, r0 + bl ov83_0223EC8C + mov r0, #0xa + str r0, [r5, #0] + mov r0, #0x96 + str r0, [r4, #0x1c] + b _0223C220 +_0223C142: + ldr r0, [r6, #0x10] + mov r1, #4 + ldr r0, [r0, #0x14] + bl sub_0207D69C + cmp r0, #0 + bne _0223C164 + ldr r0, _0223C228 ; =0x0000063C + mov r1, #5 + add r0, r4, r0 + bl ov83_0223EC8C + mov r0, #0xa + str r0, [r5, #0] + mov r0, #0x96 + str r0, [r4, #0x1c] + b _0223C220 +_0223C164: + mov r0, #9 + str r0, [r5, #0] + b _0223C16E +_0223C16A: + mov r0, #0xb + str r0, [r5, #0] +_0223C16E: + ldr r0, _0223C240 ; =0x00001424 + ldr r0, [r4, r0] + cmp r0, #1 + ble _0223C220 + ldr r0, _0223C228 ; =0x0000063C + mov r1, #6 + add r0, r4, r0 + bl ov83_0223EC8C + ldr r0, _0223C228 ; =0x0000063C + add r0, r4, r0 + bl ov83_0223E9BC + b _0223C220 +_0223C18A: + mov r0, #0x35 + mov r1, #1 + lsl r0, r0, #4 + str r1, [r4, r0] + bl ov83_0223D4B0 + ldr r3, _0223C248 ; =0x00001428 + mov r1, #0x35 + lsl r1, r1, #4 + add r2, r0, #0 + ldr r3, [r4, r3] + mov r0, #0x1e + add r1, r4, r1 + bl ov83_0223D508 + cmp r0, #1 + bne _0223C220 + ldr r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + pop {r3, r4, r5, r6, pc} +_0223C1B4: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + ldr r0, _0223C234 ; =0x021BF6BC + ldrh r0, [r0, #0x20] + cmp r0, #0 + bne _0223C1D2 + ldr r0, [r4, #0x1c] + cmp r0, #0 + blt _0223C1D2 + ldr r0, _0223C238 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #3 + tst r0, r1 + beq _0223C220 +_0223C1D2: + ldr r0, _0223C240 ; =0x00001424 + ldr r0, [r4, r0] + cmp r0, #1 + ble _0223C1EC + ldr r0, _0223C228 ; =0x0000063C + mov r1, #6 + add r0, r4, r0 + bl ov83_0223EC8C + ldr r0, _0223C228 ; =0x0000063C + add r0, r4, r0 + bl ov83_0223E9BC +_0223C1EC: + mov r0, #0xb + str r0, [r5, #0] + b _0223C220 +_0223C1F2: + mov r0, #0x35 + mov r1, #0 + lsl r0, r0, #4 + str r1, [r4, r0] + bl ov83_0223D4B0 + ldr r3, _0223C248 ; =0x00001428 + mov r1, #0x35 + lsl r1, r1, #4 + add r2, r0, #0 + ldr r3, [r4, r3] + mov r0, #0x1e + add r1, r4, r1 + bl ov83_0223D508 + cmp r0, #1 + bne _0223C220 + ldr r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + pop {r3, r4, r5, r6, pc} +_0223C21C: + bl sub_02022974 +_0223C220: + ldr r0, [r4, #0xc] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0223C228: .word 0x0000063C +_0223C22C: .word 0x00001414 +_0223C230: .word 0x000006C3 +_0223C234: .word 0x021BF6BC +_0223C238: .word 0x021BF67C +_0223C23C: .word 0x00001530 +_0223C240: .word 0x00001424 +_0223C244: .word 0x0000141C +_0223C248: .word 0x00001428 + thumb_func_end ov83_0223BF74 + + thumb_func_start ov83_0223C24C +ov83_0223C24C: ; 0x0223C24C + ldr r3, _0223C254 ; =ov83_0223CB5C + add r0, r1, #0 + add r1, r2, #0 + bx r3 + ; .align 2, 0 +_0223C254: .word ov83_0223CB5C + thumb_func_end ov83_0223C24C + + thumb_func_start ov83_0223C258 +ov83_0223C258: ; 0x0223C258 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r2, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + cmp r0, #4 + bhi _0223C32E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223C274: ; jump table + .short _0223C27E - _0223C274 - 2 ; case 0 + .short _0223C2D8 - _0223C274 - 2 ; case 1 + .short _0223C2E8 - _0223C274 - 2 ; case 2 + .short _0223C308 - _0223C274 - 2 ; case 3 + .short _0223C318 - _0223C274 - 2 ; case 4 +_0223C27E: + ldr r0, _0223C334 ; =0x00001575 + ldrb r0, [r4, r0] + cmp r0, #1 + bne _0223C296 + ldr r0, _0223C338 ; =0x0000063C + mov r1, #3 + add r0, r4, r0 + bl ov83_0223EC8C + mov r0, #1 + str r0, [r6, #0x20] + b _0223C2CC +_0223C296: + mov r0, #0 + str r0, [r6, #0x20] + ldr r0, _0223C33C ; =0x00001424 + ldr r0, [r4, r0] + cmp r0, #1 + bgt _0223C2A8 + mov r0, #2 + str r0, [r5, #0] + b _0223C32E +_0223C2A8: + ldr r0, _0223C338 ; =0x0000063C + mov r1, #4 + add r0, r4, r0 + bl ov83_0223EC8C + ldr r0, _0223C340 ; =0x0000142C + ldr r0, [r4, r0] + cmp r0, #1 + bne _0223C2CC + ldr r0, [r4, #0] + bl sub_0202C1E0 + add r1, r0, #0 + ldr r0, [r6, #0x10] + mov r2, #4 + ldr r0, [r0, #0x1c] + bl sub_0202B758 +_0223C2CC: + mov r0, #0x3c + str r0, [r4, #0x1c] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C32E +_0223C2D8: + ldr r0, [r4, #0x1c] + sub r0, r0, #1 + str r0, [r4, #0x1c] + bpl _0223C32E + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C32E +_0223C2E8: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C32E +_0223C308: + bl sub_0200F2AC + cmp r0, #0 + beq _0223C32E + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0223C32E +_0223C318: + add r0, r4, #0 + add r1, r5, #0 + bl ov83_0223CB8C + add r0, r4, #0 + bl ov83_0223CAA4 + ldr r0, [r4, #0xc] + add sp, #0xc + add r0, r0, #1 + pop {r3, r4, r5, r6, pc} +_0223C32E: + ldr r0, [r4, #0xc] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223C334: .word 0x00001575 +_0223C338: .word 0x0000063C +_0223C33C: .word 0x00001424 +_0223C340: .word 0x0000142C + thumb_func_end ov83_0223C258 + + thumb_func_start ov83_0223C344 +ov83_0223C344: ; 0x0223C344 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0xd7 + add r4, r1, #0 + lsl r0, r0, #2 + add r0, r4, r0 + bl ov83_0223DB30 + ldr r0, _0223C3C0 ; =0x0000054C + add r0, r4, r0 + bl ov83_0223DEC4 + mov r0, #0x16 + lsl r0, r0, #6 + add r0, r4, r0 + bl ov83_0223E260 + ldr r0, _0223C3C4 ; =0x0000058C + add r0, r4, r0 + bl ov83_0223E260 + ldr r0, _0223C3C8 ; =0x00000598 + add r0, r4, r0 + bl ov83_0223E260 + ldr r0, _0223C3CC ; =0x000005A4 + add r0, r4, r0 + bl ov83_0223E34C + ldr r0, _0223C3D0 ; =0x0000061C + add r0, r4, r0 + bl ov83_0223E5C0 + ldr r0, _0223C3D4 ; =0x0000063C + add r0, r4, r0 + bl ov83_0223E6F8 + ldr r0, _0223C3D8 ; =0x00000674 + add r0, r4, r0 + bl ov83_0223ED4C + ldr r0, _0223C3DC ; =0x00000A88 + add r0, r4, r0 + bl ov83_0223F2A8 + ldr r0, _0223C3E0 ; =0x00000B08 + add r0, r4, r0 + bl ov83_0223F4AC + ldr r0, _0223C3E4 ; =0x0000141C + add r0, r4, r0 + bl ov83_0223F7A4 + add r0, r5, #0 + add r1, r4, #0 + bl ov83_0223C87C + add r0, r4, #0 + bl ov83_0223B784 + ldr r0, [r4, #0xc] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C3C0: .word 0x0000054C +_0223C3C4: .word 0x0000058C +_0223C3C8: .word 0x00000598 +_0223C3CC: .word 0x000005A4 +_0223C3D0: .word 0x0000061C +_0223C3D4: .word 0x0000063C +_0223C3D8: .word 0x00000674 +_0223C3DC: .word 0x00000A88 +_0223C3E0: .word 0x00000B08 +_0223C3E4: .word 0x0000141C + thumb_func_end ov83_0223C344 + + thumb_func_start ov83_0223C3E8 +ov83_0223C3E8: ; 0x0223C3E8 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223C470 ; =0x000014C8 + add r4, r5, r0 + ldrb r0, [r4, #0xc] + cmp r0, #0 + ldr r0, _0223C474 ; =0x000015F0 + bne _0223C400 + ldrh r2, [r5, r0] + ldrh r1, [r4, #0xa] + add r1, r2, r1 + b _0223C406 +_0223C400: + ldrh r2, [r5, r0] + ldrh r1, [r4, #0xa] + sub r1, r2, r1 +_0223C406: + strh r1, [r5, r0] + ldr r1, _0223C474 ; =0x000015F0 + ldr r0, _0223C478 ; =0x000005A4 + ldrh r1, [r5, r1] + add r0, r5, r0 + bl ov83_0223E4A4 + add r0, r5, #0 + bl ov83_0223C90C + ldrh r0, [r4, #0xa] + ldrb r1, [r4, #0xd] + bl ov83_0223FB68 + add r1, r0, #0 + ldr r0, _0223C478 ; =0x000005A4 + add r0, r5, r0 + bl ov83_0223E4C0 + ldr r0, _0223C478 ; =0x000005A4 + ldrb r1, [r4, #0xd] + add r0, r5, r0 + bl ov83_0223E51C + ldr r0, _0223C47C ; =0x0000061C + add r0, r5, r0 + bl ov83_0223E658 + add r0, r5, #0 + bl ov83_0223C480 + add r0, r5, #0 + bl ov83_0223C758 + add r0, r5, #0 + bl ov83_0223C558 + add r0, r5, #0 + bl ov83_0223C600 + add r0, r5, #0 + bl ov83_0223C6D4 + add r0, r5, #0 + bl ov83_0223C7FC + mov r0, #0 + strb r0, [r4, #0x13] + strb r0, [r4, #0x12] + strb r0, [r4, #0xf] + strb r0, [r4, #0xe] + pop {r3, r4, r5, pc} + nop +_0223C470: .word 0x000014C8 +_0223C474: .word 0x000015F0 +_0223C478: .word 0x000005A4 +_0223C47C: .word 0x0000061C + thumb_func_end ov83_0223C3E8 + + thumb_func_start ov83_0223C480 +ov83_0223C480: ; 0x0223C480 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _0223C534 ; =0x000014C8 + mov r2, #7 + add r4, r5, r0 + ldrb r3, [r4, #0xd] + ldr r0, _0223C538 ; =0x000005A4 + mov r1, #5 + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223C53C ; =0x02240234 + add r0, r5, r0 + ldrb r2, [r2, r6] + bl ov83_0223E484 + ldrb r3, [r4, #0xd] + ldr r0, _0223C538 ; =0x000005A4 + mov r2, #7 + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223C540 ; =0x02240235 + add r0, r5, r0 + ldrb r2, [r2, r6] + mov r1, #6 + bl ov83_0223E484 + ldrb r2, [r4, #0xd] + ldr r0, _0223C538 ; =0x000005A4 + mov r1, #7 + add r3, r2, #0 + ldr r2, _0223C544 ; =0x02240236 + mul r3, r1 + ldrb r2, [r2, r3] + add r0, r5, r0 + bl ov83_0223E484 + ldrb r3, [r4, #0xd] + ldr r0, _0223C538 ; =0x000005A4 + mov r2, #7 + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223C548 ; =0x02240237 + add r0, r5, r0 + ldrb r2, [r2, r6] + mov r1, #0 + bl ov83_0223E484 + ldrb r3, [r4, #0xd] + ldr r0, _0223C538 ; =0x000005A4 + mov r2, #7 + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223C54C ; =0x02240238 + add r0, r5, r0 + ldrb r2, [r2, r6] + mov r1, #1 + bl ov83_0223E484 + ldrb r3, [r4, #0xd] + ldr r0, _0223C538 ; =0x000005A4 + mov r2, #7 + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223C550 ; =0x02240239 + add r0, r5, r0 + ldrb r2, [r2, r6] + mov r1, #2 + bl ov83_0223E484 + ldrb r1, [r4, #0xd] + mov r0, #7 + add r2, r1, #0 + mul r2, r0 + ldr r0, _0223C554 ; =0x0224023A + ldrb r1, [r0, r2] + cmp r1, #8 + beq _0223C532 + ldrb r2, [r4, #0x10] + ldr r0, _0223C538 ; =0x000005A4 + cmp r2, #0 + beq _0223C52A + add r0, r5, r0 + bl ov83_0223E4E0 + pop {r4, r5, r6, pc} +_0223C52A: + add r0, r5, r0 + mov r2, #0 + bl ov83_0223E484 +_0223C532: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223C534: .word 0x000014C8 +_0223C538: .word 0x000005A4 +_0223C53C: .word 0x02240234 +_0223C540: .word 0x02240235 +_0223C544: .word 0x02240236 +_0223C548: .word 0x02240237 +_0223C54C: .word 0x02240238 +_0223C550: .word 0x02240239 +_0223C554: .word 0x0224023A + thumb_func_end ov83_0223C480 + + thumb_func_start ov83_0223C558 +ov83_0223C558: ; 0x0223C558 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223C5F4 ; =0x000014C8 + add r1, r4, r0 + ldrb r2, [r1, #0x11] + ldrb r0, [r1, #0xc] + cmp r2, r0 + beq _0223C578 + ldrh r0, [r1, #0xa] + cmp r0, #0 + beq _0223C578 + mov r0, #0xb + lsl r0, r0, #6 + ldr r1, [r4, r0] + cmp r1, #0 + beq _0223C596 +_0223C578: + ldr r0, _0223C5F8 ; =0x00000A88 + mov r1, #1 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223C5F8 ; =0x00000A88 + mov r1, #3 + add r0, r4, r0 + bl ov83_0223F3D0 + mov r0, #0xb1 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + pop {r4, pc} +_0223C596: + cmp r2, #0 + bne _0223C5C6 + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #1 + beq _0223C5F0 + ldr r0, _0223C5F8 ; =0x00000A88 + mov r1, #1 + add r0, r4, r0 + bl ov83_0223F3A0 + mov r0, #0xb1 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _0223C5F8 ; =0x00000A88 + mov r1, #3 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223C5FC ; =0x000006C1 + bl sub_02005748 + pop {r4, pc} +_0223C5C6: + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #2 + beq _0223C5F0 + ldr r0, _0223C5F8 ; =0x00000A88 + mov r1, #3 + add r0, r4, r0 + bl ov83_0223F3A0 + mov r0, #0xb1 + mov r1, #2 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, _0223C5F8 ; =0x00000A88 + mov r1, #1 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223C5FC ; =0x000006C1 + bl sub_02005748 +_0223C5F0: + pop {r4, pc} + nop +_0223C5F4: .word 0x000014C8 +_0223C5F8: .word 0x00000A88 +_0223C5FC: .word 0x000006C1 + thumb_func_end ov83_0223C558 + + thumb_func_start ov83_0223C600 +ov83_0223C600: ; 0x0223C600 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223C6C4 ; =0x000014C8 + mov r1, #0xb1 + lsl r1, r1, #2 + add r4, r5, r0 + ldr r0, [r5, r1] + cmp r0, #0 + bne _0223C61A + sub r0, r1, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223C630 +_0223C61A: + ldr r0, _0223C6C8 ; =0x0000063C + add r0, r5, r0 + bl ov83_0223E994 + mov r0, #0xb3 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + sub r0, r0, #4 + str r1, [r5, r0] + pop {r3, r4, r5, pc} +_0223C630: + add r1, #8 + ldr r0, [r5, r1] + cmp r0, #0 + bne _0223C664 + ldrb r0, [r4, #0x13] + cmp r0, #0 + beq _0223C678 + ldr r0, _0223C6C8 ; =0x0000063C + add r0, r5, r0 + bl ov83_0223E994 + ldr r0, _0223C6C8 ; =0x0000063C + ldrb r2, [r4, #0xd] + ldr r1, _0223C6CC ; =0x02240208 + add r0, r5, r0 + ldrb r1, [r1, r2] + bl ov83_0223E908 + mov r0, #0xb3 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + mov r1, #0 + sub r0, r0, #4 + str r1, [r5, r0] + b _0223C678 +_0223C664: + ldr r0, _0223C6C8 ; =0x0000063C + add r0, r5, r0 + bl ov83_0223E984 + cmp r0, #0 + beq _0223C678 + mov r0, #0xb3 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_0223C678: + mov r0, #0xb2 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223C6AE + ldrb r0, [r4, #0x12] + cmp r0, #0 + beq _0223C6C2 + ldr r0, _0223C6C8 ; =0x0000063C + add r0, r5, r0 + bl ov83_0223E994 + ldr r0, _0223C6C8 ; =0x0000063C + ldrb r2, [r4, #0xd] + ldr r1, _0223C6D0 ; =0x0224020C + add r0, r5, r0 + ldrb r1, [r1, r2] + bl ov83_0223E908 + mov r0, #0xb2 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r5, r0] + mov r1, #0 + add r0, r0, #4 + str r1, [r5, r0] + pop {r3, r4, r5, pc} +_0223C6AE: + ldr r0, _0223C6C8 ; =0x0000063C + add r0, r5, r0 + bl ov83_0223E984 + cmp r0, #0 + beq _0223C6C2 + mov r0, #0xb2 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] +_0223C6C2: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C6C4: .word 0x000014C8 +_0223C6C8: .word 0x0000063C +_0223C6CC: .word 0x02240208 +_0223C6D0: .word 0x0224020C + thumb_func_end ov83_0223C600 + + thumb_func_start ov83_0223C6D4 +ov83_0223C6D4: ; 0x0223C6D4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223C748 ; =0x000014C8 + add r4, r5, r0 + ldrb r0, [r4, #0x13] + cmp r0, #0 + beq _0223C6FE + ldr r0, _0223C74C ; =0x00000674 + ldrb r1, [r4, #0xd] + add r0, r5, r0 + mov r2, #2 + bl ov83_0223EDDC + ldrb r0, [r4, #0xd] + lsl r1, r0, #2 + ldr r0, _0223C750 ; =0x02240210 + ldr r0, [r0, r1] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_0223C6FE: + ldrb r0, [r4, #0x12] + cmp r0, #1 + bne _0223C722 + ldr r0, _0223C74C ; =0x00000674 + ldrb r1, [r4, #0xd] + add r0, r5, r0 + mov r2, #1 + bl ov83_0223EDDC + ldrb r0, [r4, #0xd] + lsl r1, r0, #2 + ldr r0, _0223C754 ; =0x0224021C + ldr r0, [r0, r1] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 + b _0223C732 +_0223C722: + cmp r0, #2 + bne _0223C732 + ldr r0, _0223C74C ; =0x00000674 + ldrb r1, [r4, #0xd] + add r0, r5, r0 + mov r2, #0 + bl ov83_0223EDDC +_0223C732: + ldrh r0, [r4, #0xa] + ldrb r1, [r4, #0xd] + bl ov83_0223FB50 + cmp r0, #0 + bne _0223C746 + ldr r0, _0223C74C ; =0x00000674 + add r0, r5, r0 + bl ov83_0223EFCC +_0223C746: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C748: .word 0x000014C8 +_0223C74C: .word 0x00000674 +_0223C750: .word 0x02240210 +_0223C754: .word 0x0224021C + thumb_func_end ov83_0223C6D4 + + thumb_func_start ov83_0223C758 +ov83_0223C758: ; 0x0223C758 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223C7F0 ; =0x000014C8 + add r1, r4, r0 + ldrb r0, [r1, #0xe] + cmp r0, #0 + beq _0223C7B0 + ldrb r0, [r1, #0x11] + cmp r0, #0 + ldr r0, _0223C7F4 ; =0x00000A88 + bne _0223C790 + add r0, r4, r0 + mov r1, #0 + bl ov83_0223F3A0 + ldr r0, _0223C7F4 ; =0x00000A88 + mov r1, #2 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223C7F8 ; =0x000006C1 + bl sub_02005748 + mov r0, #0xb + mov r1, #1 + lsl r0, r0, #6 + str r1, [r4, r0] + b _0223C7B0 +_0223C790: + add r0, r4, r0 + mov r1, #2 + bl ov83_0223F3A0 + ldr r0, _0223C7F4 ; =0x00000A88 + mov r1, #0 + add r0, r4, r0 + bl ov83_0223F3D0 + ldr r0, _0223C7F8 ; =0x000006C1 + bl sub_02005748 + mov r0, #0xb + mov r1, #2 + lsl r0, r0, #6 + str r1, [r4, r0] +_0223C7B0: + mov r0, #0xb + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #1 + bne _0223C7D2 + ldr r0, _0223C7F4 ; =0x00000A88 + mov r1, #0 + add r0, r4, r0 + bl ov83_0223F3F0 + cmp r0, #1 + bne _0223C7EC + mov r0, #0xb + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] + pop {r4, pc} +_0223C7D2: + cmp r0, #2 + bne _0223C7EC + ldr r0, _0223C7F4 ; =0x00000A88 + mov r1, #2 + add r0, r4, r0 + bl ov83_0223F3F0 + cmp r0, #1 + bne _0223C7EC + mov r0, #0xb + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] +_0223C7EC: + pop {r4, pc} + nop +_0223C7F0: .word 0x000014C8 +_0223C7F4: .word 0x00000A88 +_0223C7F8: .word 0x000006C1 + thumb_func_end ov83_0223C758 + + thumb_func_start ov83_0223C7FC +ov83_0223C7FC: ; 0x0223C7FC + push {r3, lr} + ldr r3, _0223C820 ; =0x00001434 + add r2, r3, #1 + ldrb r1, [r0, r3] + add r3, #0xa3 + ldrb r3, [r0, r3] + ldrb r2, [r0, r2] + cmp r3, #1 + bne _0223C81C + ldr r3, _0223C824 ; =0x00000B08 + add r0, r0, r3 + bl ov83_0223F544 + ldr r0, _0223C828 ; =0x000006BF + bl sub_02005748 +_0223C81C: + pop {r3, pc} + nop +_0223C820: .word 0x00001434 +_0223C824: .word 0x00000B08 +_0223C828: .word 0x000006BF + thumb_func_end ov83_0223C7FC + + thumb_func_start ov83_0223C82C +ov83_0223C82C: ; 0x0223C82C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + bl sub_0202A93C + ldr r1, _0223C870 ; =0x00001530 + str r0, [r4, r1] + ldr r0, _0223C874 ; =0x00001428 + ldr r0, [r4, r0] + bl ov83_0223D570 + ldr r1, _0223C878 ; =0x00001574 + mov r6, #0 + strb r0, [r4, r1] + add r0, r1, #0 + mov r3, #0x80 + mov r2, #0x60 + sub r0, #0xb4 + sub r1, #0xb3 +_0223C854: + strb r3, [r4, r0] + strb r2, [r4, r1] + add r6, r6, #1 + add r4, #0x1c + cmp r6, #4 + blt _0223C854 + add r5, #0x26 + ldrb r0, [r5] + cmp r0, #0 + beq _0223C86E + mov r0, #2 + bl sub_02035938 +_0223C86E: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223C870: .word 0x00001530 +_0223C874: .word 0x00001428 +_0223C878: .word 0x00001574 + thumb_func_end ov83_0223C82C + + thumb_func_start ov83_0223C87C +ov83_0223C87C: ; 0x0223C87C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223C8AC ; =0x00001530 + add r4, r1, #0 + ldr r0, [r4, r0] + cmp r0, #0 + bne _0223C88E + bl sub_02022974 +_0223C88E: + ldr r0, _0223C8AC ; =0x00001530 + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r1, _0223C8AC ; =0x00001530 + mov r0, #0 + add r5, #0x26 + str r0, [r4, r1] + ldrb r1, [r5] + cmp r1, #0 + beq _0223C8A8 + bl sub_02035938 +_0223C8A8: + pop {r3, r4, r5, pc} + nop +_0223C8AC: .word 0x00001530 + thumb_func_end ov83_0223C87C + + thumb_func_start ov83_0223C8B0 +ov83_0223C8B0: ; 0x0223C8B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0x10] + add r7, r1, #0 + ldr r0, [r0, #0xc] + add r6, r2, #0 + bl sub_0202440C + mov r4, #0 + str r0, [sp] + cmp r6, #0 + ble _0223C8EA +_0223C8CE: + ldr r0, [r5, #0x10] + add r1, r7, #0 + ldr r0, [r0, #8] + bl sub_0202AB74 + ldr r1, _0223C908 ; =0x0000FFFF + cmp r0, r1 + bne _0223C8E4 + mov r0, #0 + str r0, [sp, #4] + b _0223C8EA +_0223C8E4: + add r4, r4, #1 + cmp r4, r6 + blt _0223C8CE +_0223C8EA: + add r5, #0x26 + ldrb r0, [r5] + cmp r0, #0 + bne _0223C902 + add r0, r7, #0 + mov r1, #0 + bl sub_0202A974 + add r1, r0, #0 + ldr r0, [sp] + bl sub_0206CFCC +_0223C902: + ldr r0, [sp, #4] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223C908: .word 0x0000FFFF + thumb_func_end ov83_0223C8B0 + + thumb_func_start ov83_0223C90C +ov83_0223C90C: ; 0x0223C90C + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223C950 ; =0x000014C8 + add r4, r5, r0 + ldrb r2, [r4, #0xc] + cmp r2, #0 + bne _0223C926 + mov r0, #0xd5 + lsl r0, r0, #2 + ldr r1, [r5, r0] + ldrh r0, [r4, #8] + cmp r1, r0 + bgt _0223C936 +_0223C926: + cmp r2, #1 + bne _0223C946 + mov r0, #0xd5 + lsl r0, r0, #2 + ldr r1, [r5, r0] + ldrh r0, [r4, #8] + cmp r1, r0 + bge _0223C946 +_0223C936: + ldrb r0, [r4, #0xd] + lsl r1, r0, #2 + ldr r0, _0223C954 ; =0x02240228 + ldr r0, [r0, r1] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_02005748 +_0223C946: + ldrh r1, [r4, #8] + mov r0, #0xd5 + lsl r0, r0, #2 + str r1, [r5, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C950: .word 0x000014C8 +_0223C954: .word 0x02240228 + thumb_func_end ov83_0223C90C + + .rodata + + + .global Unk_ov83_02240208 +Unk_ov83_02240208: ; 0x02240208 + .incbin "incbin/overlay83_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov83_0224020C +Unk_ov83_0224020C: ; 0x0224020C + .incbin "incbin/overlay83_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov83_02240210 +Unk_ov83_02240210: ; 0x02240210 + .incbin "incbin/overlay83_rodata.bin", 0x8, 0x14 - 0x8 + + .global Unk_ov83_0224021C +Unk_ov83_0224021C: ; 0x0224021C + .incbin "incbin/overlay83_rodata.bin", 0x14, 0x20 - 0x14 + + .global Unk_ov83_02240228 +Unk_ov83_02240228: ; 0x02240228 + .incbin "incbin/overlay83_rodata.bin", 0x20, 0x2C - 0x20 + + .global Unk_ov83_02240234 +Unk_ov83_02240234: ; 0x02240234 + .incbin "incbin/overlay83_rodata.bin", 0x2C, 0x44 - 0x2C + + .global Unk_ov83_0224024C +Unk_ov83_0224024C: ; 0x0224024C + .incbin "incbin/overlay83_rodata.bin", 0x44, 0x70 + diff --git a/asm/ov83_0223C958.s b/asm/ov83_0223C958.s new file mode 100644 index 000000000..f085fe0bc --- /dev/null +++ b/asm/ov83_0223C958.s @@ -0,0 +1,970 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223C958 +ov83_0223C958: ; 0x0223C958 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r1, [r5, #0] + mov r0, #0x7a + bl sub_02006C24 + add r4, r0, #0 + add r0, r5, #0 + bl ov83_0223CE9C + add r0, r5, #0 + ldr r1, [r5, #0] + add r0, #0x20 + bl ov83_0223CC30 + add r0, r5, #0 + bl ov83_0223CD64 + add r0, r5, #0 + bl ov83_0223CCF8 + add r0, r5, #0 + bl ov83_0223CD28 + add r0, r5, #0 + add r1, r4, #0 + bl ov83_0223CDD0 + ldr r0, _0223CA7C ; =0x0000054C + ldr r1, [r5, #0x20] + ldr r2, [r5, #0] + add r0, r5, r0 + add r3, r4, #0 + bl ov83_0223DEE0 + ldr r0, _0223CA80 ; =0x0000063C + ldr r1, [r5, #0x20] + ldr r2, [r5, #0] + add r0, r5, r0 + add r3, r4, #0 + bl ov83_0223E720 + mov r1, #0xaf + ldr r0, _0223CA84 ; =0x000005A4 + lsl r1, r1, #2 + ldr r1, [r5, r1] + ldr r2, [r5, #0] + add r0, r5, r0 + add r3, r4, #0 + bl ov83_0223E368 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x16 + mov r2, #0x5a + lsl r0, r0, #6 + add r1, r5, #0 + lsl r2, r2, #2 + ldr r3, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r2, r5, r2 + bl ov83_0223E28C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0223CA88 ; =0x00000598 + mov r2, #0x5a + add r1, r5, #0 + lsl r2, r2, #2 + ldr r3, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r2, r5, r2 + bl ov83_0223E28C + mov r0, #5 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, _0223CA8C ; =0x0000058C + mov r2, #0x5a + add r1, r5, #0 + lsl r2, r2, #2 + ldr r3, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r2, r5, r2 + bl ov83_0223E28C + ldr r0, _0223CA90 ; =0x0000061C + mov r2, #0x5a + add r1, r5, #0 + lsl r2, r2, #2 + ldr r3, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r2, r5, r2 + bl ov83_0223E5DC + ldr r0, _0223CA94 ; =0x00000674 + mov r2, #0x5a + add r1, r5, #0 + lsl r2, r2, #2 + ldr r3, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r2, r5, r2 + bl ov83_0223ED6C + ldr r0, _0223CA98 ; =0x00000A88 + add r1, r5, #0 + ldr r2, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r3, r4, #0 + bl ov83_0223F2C4 + ldr r0, _0223CA9C ; =0x00000B08 + mov r2, #0x5a + add r1, r5, #0 + lsl r2, r2, #2 + ldr r3, [r5, #0] + add r0, r5, r0 + add r1, #0x2c + add r2, r5, r2 + bl ov83_0223F4CC + add r0, r5, #0 + bl ov83_0223CF2C + add r0, r4, #0 + bl sub_02006CA8 + ldr r0, _0223CAA0 ; =0x021BF6DC + mov r1, #1 + strb r1, [r0, #5] + bl sub_0201FFE8 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223CA7C: .word 0x0000054C +_0223CA80: .word 0x0000063C +_0223CA84: .word 0x000005A4 +_0223CA88: .word 0x00000598 +_0223CA8C: .word 0x0000058C +_0223CA90: .word 0x0000061C +_0223CA94: .word 0x00000674 +_0223CA98: .word 0x00000A88 +_0223CA9C: .word 0x00000B08 +_0223CAA0: .word 0x021BF6DC + thumb_func_end ov83_0223C958 + + thumb_func_start ov83_0223CAA4 +ov83_0223CAA4: ; 0x0223CAA4 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223CB34 ; =0x0000063C + add r0, r4, r0 + bl ov83_0223E760 + ldr r0, _0223CB38 ; =0x0000054C + add r0, r4, r0 + bl ov83_0223DF10 + ldr r0, _0223CB3C ; =0x000005A4 + add r0, r4, r0 + bl ov83_0223E438 + add r0, r4, #0 + bl ov83_0223CE7C + mov r0, #0x16 + lsl r0, r0, #6 + add r0, r4, r0 + bl ov83_0223E2C8 + ldr r0, _0223CB40 ; =0x0000058C + add r0, r4, r0 + bl ov83_0223E2C8 + ldr r0, _0223CB44 ; =0x00000598 + add r0, r4, r0 + bl ov83_0223E2C8 + ldr r0, _0223CB48 ; =0x0000061C + add r0, r4, r0 + bl ov83_0223E63C + ldr r0, _0223CB4C ; =0x00000674 + add r0, r4, r0 + bl ov83_0223ED78 + ldr r0, _0223CB50 ; =0x00000A88 + add r0, r4, r0 + bl ov83_0223F348 + ldr r0, _0223CB54 ; =0x00000B08 + add r0, r4, r0 + bl ov83_0223F510 + add r0, r4, #0 + add r0, #0x20 + bl ov83_0223CCCC + add r0, r4, #0 + bl ov83_0223CD1C + add r0, r4, #0 + bl ov83_0223CDC0 + add r0, r4, #0 + bl ov83_0223CD54 + add r0, r4, #0 + bl ov83_0223CF20 + add r0, r4, #0 + bl ov83_0223D068 + ldr r0, _0223CB58 ; =0x021BF6DC + mov r1, #0 + strb r1, [r0, #5] + bl sub_0201FFE8 + pop {r4, pc} + nop +_0223CB34: .word 0x0000063C +_0223CB38: .word 0x0000054C +_0223CB3C: .word 0x000005A4 +_0223CB40: .word 0x0000058C +_0223CB44: .word 0x00000598 +_0223CB48: .word 0x0000061C +_0223CB4C: .word 0x00000674 +_0223CB50: .word 0x00000A88 +_0223CB54: .word 0x00000B08 +_0223CB58: .word 0x021BF6DC + thumb_func_end ov83_0223CAA4 + + thumb_func_start ov83_0223CB5C +ov83_0223CB5C: ; 0x0223CB5C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r1, _0223CB88 ; =0x0000149C + str r0, [sp] + mov r0, #0xd7 + mov r3, #0x5a + lsl r0, r0, #2 + add r2, r4, #0 + lsl r3, r3, #2 + add r0, r4, r0 + add r1, r4, r1 + add r2, #0x2c + add r3, r4, r3 + bl ov83_0223DB4C + ldr r0, [r4, #0xc] + add r0, r0, #1 + add sp, #4 + pop {r3, r4, pc} + nop +_0223CB88: .word 0x0000149C + thumb_func_end ov83_0223CB5C + + thumb_func_start ov83_0223CB8C +ov83_0223CB8C: ; 0x0223CB8C + push {r4, lr} + add r4, r0, #0 + mov r0, #0xd7 + lsl r0, r0, #2 + add r1, r4, #0 + add r0, r4, r0 + add r1, #0x2c + bl ov83_0223DC1C + ldr r0, [r4, #0xc] + add r0, r0, #1 + pop {r4, pc} + thumb_func_end ov83_0223CB8C + + thumb_func_start ov83_0223CBA4 +ov83_0223CBA4: ; 0x0223CBA4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_020241B4 + mov r1, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + bl sub_020B2628 + bl sub_020A73C0 + mov r0, #0xaf + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223CBCE + bl sub_020150EC +_0223CBCE: + mov r2, #1 + mov r0, #0x12 + add r1, sp, #0 + str r2, [sp] + bl sub_020B275C + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + mov r0, #0xae + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223CBF6 + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _0223CBF6 + bl sub_020219F8 +_0223CBF6: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223CBA4 + + thumb_func_start ov83_0223CBFC +ov83_0223CBFC: ; 0x0223CBFC + push {r4, lr} + add r4, r0, #0 + bl sub_0200A858 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0223CC0E + bl sub_0201C2B8 +_0223CC0E: + pop {r4, pc} + thumb_func_end ov83_0223CBFC + + thumb_func_start ov83_0223CC10 +ov83_0223CC10: ; 0x0223CC10 + push {r4, lr} + sub sp, #0x28 + ldr r4, _0223CC2C ; =0x022402F0 + add r3, sp, #0 + mov r2, #5 +_0223CC1A: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223CC1A + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_0223CC2C: .word 0x022402F0 + thumb_func_end ov83_0223CC10 + + thumb_func_start ov83_0223CC30 +ov83_0223CC30: ; 0x0223CC30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x88 + str r1, [sp] + add r6, r0, #0 + bl ov83_0223CC10 + ldr r0, [sp] + bl sub_02018340 + add r3, sp, #8 + ldr r4, _0223CCC0 ; =0x022402E0 + str r0, [r6, #0] + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #0 + mov r1, #2 + bl sub_02019060 + ldr r4, _0223CCC4 ; =0x02240318 + add r3, sp, #0x18 + mov r2, #0xe +_0223CC6E: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223CC6E + ldr r1, _0223CCC8 ; =0x022402BC + add r0, sp, #4 + ldrb r2, [r1] + mov r7, #0 + add r5, sp, #4 + strb r2, [r0] + ldrb r2, [r1, #1] + add r4, sp, #0x18 + strb r2, [r0, #1] + ldrb r2, [r1, #2] + ldrb r1, [r1, #3] + strb r2, [r0, #2] + strb r1, [r0, #3] +_0223CC90: + ldrb r1, [r5] + ldr r0, [r6, #0] + add r2, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldrb r1, [r5] + ldr r0, [r6, #0] + bl sub_02019EBC + ldrb r0, [r5] + ldr r3, [sp] + mov r1, #0x20 + mov r2, #0 + bl sub_02019690 + add r7, r7, #1 + add r4, #0x1c + add r5, r5, #1 + cmp r7, #4 + blt _0223CC90 + add sp, #0x88 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CCC0: .word 0x022402E0 +_0223CCC4: .word 0x02240318 +_0223CCC8: .word 0x022402BC + thumb_func_end ov83_0223CC30 + + thumb_func_start ov83_0223CCCC +ov83_0223CCCC: ; 0x0223CCCC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + mov r1, #5 + bl sub_02019044 + ldr r0, [r4, #0] + mov r1, #4 + bl sub_02019044 + ldr r0, [r4, #0] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0] + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov83_0223CCCC + + thumb_func_start ov83_0223CCF8 +ov83_0223CCF8: ; 0x0223CCF8 + push {r3, lr} + add r3, r0, #0 + ldr r3, [r3, #0] + add r0, #0x2c + mov r1, #0x48 + mov r2, #0x10 + bl ov83_0223D754 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov83_0223CCF8 + + thumb_func_start ov83_0223CD1C +ov83_0223CD1C: ; 0x0223CD1C + ldr r3, _0223CD24 ; =ov83_0223D784 + add r0, #0x2c + bx r3 + nop +_0223CD24: .word ov83_0223D784 + thumb_func_end ov83_0223CD1C + + thumb_func_start ov83_0223CD28 +ov83_0223CD28: ; 0x0223CD28 + push {r3, r4, r5, lr} + sub sp, #0x10 + ldr r5, _0223CD50 ; =0x022402C0 + add r3, sp, #0 + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + str r0, [sp, #0xc] + add r0, r2, #0 + bl sub_02015064 + mov r1, #0xaf + lsl r1, r1, #2 + str r0, [r4, r1] + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223CD50: .word 0x022402C0 + thumb_func_end ov83_0223CD28 + + thumb_func_start ov83_0223CD54 +ov83_0223CD54: ; 0x0223CD54 + mov r1, #0xaf + lsl r1, r1, #2 + ldr r3, _0223CD60 ; =sub_020150A8 + ldr r0, [r0, r1] + bx r3 + nop +_0223CD60: .word sub_020150A8 + thumb_func_end ov83_0223CD54 + + thumb_func_start ov83_0223CD64 +ov83_0223CD64: ; 0x0223CD64 + push {r4, r5, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x80 + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + ldr r2, [r4, #0] + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + ldr r5, _0223CDB8 ; =0x022402D0 + add r3, sp, #0x14 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + ldr r1, _0223CDBC ; =0x00200010 + str r0, [sp, #0x20] + add r0, r2, #0 + mov r2, #0x10 + bl sub_0201E88C + ldr r1, [r4, #0] + mov r0, #0x20 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x24 + pop {r4, r5, pc} + nop +_0223CDB8: .word 0x022402D0 +_0223CDBC: .word 0x00200010 + thumb_func_end ov83_0223CD64 + + thumb_func_start ov83_0223CDC0 +ov83_0223CDC0: ; 0x0223CDC0 + push {r3, lr} + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + pop {r3, pc} + thumb_func_end ov83_0223CDC0 + + thumb_func_start ov83_0223CDD0 +ov83_0223CDD0: ; 0x0223CDD0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + str r0, [sp, #0x18] + ldr r0, _0223CE78 ; =0x02240388 + str r1, [sp, #0x1c] + str r0, [sp, #0x24] + mov r0, #0xc + str r0, [sp, #0x2c] + mov r1, #0x5a + ldr r0, [sp, #0x18] + lsl r1, r1, #2 + add r0, r0, r1 + str r0, [sp, #0x20] + ldr r0, [sp, #0x18] + mov r4, #0 + str r0, [sp, #0x28] + add r0, #0x2c + mov r7, #0xd + mov r5, #0xe + str r0, [sp, #0x28] +_0223CDF8: + cmp r4, #0 + ble _0223CE2E + ldr r0, [sp, #0x24] + ldrb r0, [r0] + cmp r0, #8 + bne _0223CE2E + str r5, [sp] + ldr r0, [sp, #0x2c] + str r7, [sp, #4] + str r0, [sp, #8] + mov r0, #0x7d + lsl r0, r0, #4 + add r0, r4, r0 + str r0, [sp, #0xc] + ldr r0, [sp, #0x18] + mov r3, #0x5b + ldr r0, [r0, #0] + ldr r6, [sp, #0x18] + str r0, [sp, #0x10] + lsl r3, r3, #2 + ldr r0, [sp, #0x28] + ldr r1, [sp, #0x20] + ldr r2, [sp, #0x1c] + ldr r3, [r6, r3] + bl ov83_0223D894 + b _0223CE56 +_0223CE2E: + mov r0, #2 + str r0, [sp] + str r5, [sp, #4] + ldr r0, [sp, #0x2c] + str r7, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0x7d + lsl r0, r0, #4 + add r0, r4, r0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x24] + ldr r0, [r0, #0] + ldr r1, [sp, #0x20] + str r0, [sp, #0x14] + ldrb r3, [r3] + ldr r0, [sp, #0x28] + ldr r2, [sp, #0x1c] + bl ov83_0223D7A8 +_0223CE56: + ldr r0, [sp, #0x24] + add r4, r4, #1 + add r0, r0, #1 + str r0, [sp, #0x24] + ldr r0, [sp, #0x2c] + add r7, r7, #3 + add r0, r0, #3 + str r0, [sp, #0x2c] + ldr r0, [sp, #0x20] + add r5, r5, #3 + add r0, #0x38 + str r0, [sp, #0x20] + cmp r4, #6 + blt _0223CDF8 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CE78: .word 0x02240388 + thumb_func_end ov83_0223CDD0 + + thumb_func_start ov83_0223CE7C +ov83_0223CE7C: ; 0x0223CE7C + push {r4, r5, r6, lr} + mov r1, #0x5a + lsl r1, r1, #2 + add r6, r0, #0 + mov r4, #0 + add r5, r0, r1 + add r6, #0x2c +_0223CE8A: + add r0, r6, #0 + add r1, r5, #0 + bl ov83_0223D95C + add r4, r4, #1 + add r5, #0x38 + cmp r4, #6 + blt _0223CE8A + pop {r4, r5, r6, pc} + thumb_func_end ov83_0223CE7C + + thumb_func_start ov83_0223CE9C +ov83_0223CE9C: ; 0x0223CE9C + push {r3, r4, lr} + sub sp, #4 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _0223CF08 ; =0x04000060 + ldr r2, _0223CF0C ; =0xFFFFCFFD + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + ldrh r3, [r0] + add r1, r2, #2 + and r3, r1 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r1, [r0] + ldr r3, _0223CF10 ; =0x0000CFFB + and r1, r3 + strh r1, [r0] + add r1, r2, #2 + ldrh r4, [r0] + sub r3, #0x1c + lsr r2, r2, #0x11 + and r4, r1 + mov r1, #8 + orr r1, r4 + strh r1, [r0] + ldrh r1, [r0] + and r1, r3 + strh r1, [r0] + mov r1, #0 + ldr r0, _0223CF14 ; =0x000043FF + mov r3, #0x3f + str r1, [sp] + bl sub_020BFD58 + ldr r2, _0223CF18 ; =0x04000540 + mov r0, #2 + ldr r1, _0223CF1C ; =0xBFFF0000 + str r0, [r2, #0] + str r1, [r2, #0x40] + mov r1, #1 + bl sub_020A5A94 + mov r0, #2 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + add sp, #4 + pop {r3, r4, pc} + nop +_0223CF08: .word 0x04000060 +_0223CF0C: .word 0xFFFFCFFD +_0223CF10: .word 0x0000CFFB +_0223CF14: .word 0x000043FF +_0223CF18: .word 0x04000540 +_0223CF1C: .word 0xBFFF0000 + thumb_func_end ov83_0223CE9C + + thumb_func_start ov83_0223CF20 +ov83_0223CF20: ; 0x0223CF20 + push {r3, lr} + bl sub_020A5B1C + bl sub_020A5F50 + pop {r3, pc} + thumb_func_end ov83_0223CF20 + + thumb_func_start ov83_0223CF2C +ov83_0223CF2C: ; 0x0223CF2C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r2, #0x1d + ldr r3, [r5, #0] + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #4 + bl sub_0200B144 + ldr r1, _0223D030 ; =0x0000157C + str r0, [r5, r1] + ldr r2, [r5, #0] + mov r0, #4 + mov r1, #0x40 + bl sub_0200B368 + mov r1, #0x56 + lsl r1, r1, #6 + str r0, [r5, r1] + ldr r1, [r5, #0] + mov r0, #0x40 + bl sub_02023790 + ldr r1, _0223D034 ; =0x00001584 + str r0, [r5, r1] + sub r1, #8 + ldr r0, [r5, r1] + mov r1, #0 + bl sub_0200B1EC + ldr r1, _0223D038 ; =0x00001588 + str r0, [r5, r1] + sub r1, #0xc + ldr r0, [r5, r1] + mov r1, #1 + bl sub_0200B1EC + ldr r1, _0223D03C ; =0x0000158C + str r0, [r5, r1] + sub r1, #0x10 + ldr r0, [r5, r1] + mov r1, #2 + bl sub_0200B1EC + ldr r1, _0223D040 ; =0x00001590 + str r0, [r5, r1] + sub r1, #0x14 + ldr r0, [r5, r1] + mov r1, #0x14 + bl sub_0200B1EC + ldr r1, _0223D044 ; =0x00001594 + str r0, [r5, r1] + sub r1, #0x18 + ldr r0, [r5, r1] + mov r1, #0x15 + bl sub_0200B1EC + ldr r1, _0223D048 ; =0x00001598 + str r0, [r5, r1] + sub r1, #0x1c + ldr r0, [r5, r1] + mov r1, #0x16 + bl sub_0200B1EC + ldr r1, _0223D04C ; =0x0000159C + str r0, [r5, r1] + sub r1, #0x20 + ldr r0, [r5, r1] + mov r1, #0x17 + bl sub_0200B1EC + ldr r1, _0223D050 ; =0x000015A0 + str r0, [r5, r1] + sub r1, #0x24 + ldr r0, [r5, r1] + mov r1, #0x18 + bl sub_0200B1EC + ldr r1, _0223D054 ; =0x000015A4 + str r0, [r5, r1] + sub r1, #0x28 + ldr r0, [r5, r1] + mov r1, #0x19 + bl sub_0200B1EC + ldr r1, _0223D058 ; =0x000015A8 + str r0, [r5, r1] + sub r1, #0x2c + ldr r0, [r5, r1] + mov r1, #8 + bl sub_0200B1EC + ldr r1, _0223D05C ; =0x000015AC + str r0, [r5, r1] + sub r1, #0x30 + ldr r0, [r5, r1] + mov r1, #9 + bl sub_0200B1EC + ldr r1, _0223D060 ; =0x000015B0 + mov r4, #0 + str r0, [r5, r1] + add r6, r5, #0 + add r7, r1, #4 +_0223CFFE: + ldr r0, _0223D030 ; =0x0000157C + add r1, r4, #3 + ldr r0, [r5, r0] + bl sub_0200B1EC + str r0, [r6, r7] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #5 + blt _0223CFFE + ldr r7, _0223D064 ; =0x000015C8 + mov r4, #0 + add r6, r5, #0 +_0223D018: + ldr r0, _0223D030 ; =0x0000157C + add r1, r4, #0 + ldr r0, [r5, r0] + add r1, #0xa + bl sub_0200B1EC + str r0, [r6, r7] + add r4, r4, #1 + add r6, r6, #4 + cmp r4, #0xa + blt _0223D018 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D030: .word 0x0000157C +_0223D034: .word 0x00001584 +_0223D038: .word 0x00001588 +_0223D03C: .word 0x0000158C +_0223D040: .word 0x00001590 +_0223D044: .word 0x00001594 +_0223D048: .word 0x00001598 +_0223D04C: .word 0x0000159C +_0223D050: .word 0x000015A0 +_0223D054: .word 0x000015A4 +_0223D058: .word 0x000015A8 +_0223D05C: .word 0x000015AC +_0223D060: .word 0x000015B0 +_0223D064: .word 0x000015C8 + thumb_func_end ov83_0223CF2C + + thumb_func_start ov83_0223D068 +ov83_0223D068: ; 0x0223D068 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _0223D108 ; =0x000015B0 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D10C ; =0x000015AC + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D110 ; =0x0000159C + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D114 ; =0x00001598 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D118 ; =0x00001594 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D11C ; =0x00001590 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D120 ; =0x0000158C + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D124 ; =0x00001588 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D128 ; =0x000015A0 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D12C ; =0x000015A4 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r0, _0223D130 ; =0x000015A8 + ldr r0, [r6, r0] + bl sub_020237BC + ldr r7, _0223D134 ; =0x000015B4 + mov r4, #0 + add r5, r6, #0 +_0223D0CA: + ldr r0, [r5, r7] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #5 + blt _0223D0CA + ldr r7, _0223D138 ; =0x000015C8 + mov r5, #0 + add r4, r6, #0 +_0223D0DE: + ldr r0, [r4, r7] + bl sub_020237BC + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #0xa + blt _0223D0DE + ldr r0, _0223D13C ; =0x00001584 + ldr r0, [r6, r0] + bl sub_020237BC + mov r0, #0x56 + lsl r0, r0, #6 + ldr r0, [r6, r0] + bl sub_0200B3F0 + ldr r0, _0223D140 ; =0x0000157C + ldr r0, [r6, r0] + bl sub_0200B190 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D108: .word 0x000015B0 +_0223D10C: .word 0x000015AC +_0223D110: .word 0x0000159C +_0223D114: .word 0x00001598 +_0223D118: .word 0x00001594 +_0223D11C: .word 0x00001590 +_0223D120: .word 0x0000158C +_0223D124: .word 0x00001588 +_0223D128: .word 0x000015A0 +_0223D12C: .word 0x000015A4 +_0223D130: .word 0x000015A8 +_0223D134: .word 0x000015B4 +_0223D138: .word 0x000015C8 +_0223D13C: .word 0x00001584 +_0223D140: .word 0x0000157C + thumb_func_end ov83_0223D068 + + .rodata + + + .global Unk_ov83_022402BC +Unk_ov83_022402BC: ; 0x022402BC + .incbin "incbin/overlay83_rodata.bin", 0xB4, 0xB8 - 0xB4 + + .global Unk_ov83_022402C0 +Unk_ov83_022402C0: ; 0x022402C0 + .incbin "incbin/overlay83_rodata.bin", 0xB8, 0xC8 - 0xB8 + + .global Unk_ov83_022402D0 +Unk_ov83_022402D0: ; 0x022402D0 + .incbin "incbin/overlay83_rodata.bin", 0xC8, 0xD8 - 0xC8 + + .global Unk_ov83_022402E0 +Unk_ov83_022402E0: ; 0x022402E0 + .incbin "incbin/overlay83_rodata.bin", 0xD8, 0xE8 - 0xD8 + + .global Unk_ov83_022402F0 +Unk_ov83_022402F0: ; 0x022402F0 + .incbin "incbin/overlay83_rodata.bin", 0xE8, 0x110 - 0xE8 + + .global Unk_ov83_02240318 +Unk_ov83_02240318: ; 0x02240318 + .incbin "incbin/overlay83_rodata.bin", 0x110, 0x180 - 0x110 + + .global Unk_ov83_02240388 +Unk_ov83_02240388: ; 0x02240388 + .incbin "incbin/overlay83_rodata.bin", 0x180, 0x6 + diff --git a/asm/ov83_0223D144.s b/asm/ov83_0223D144.s new file mode 100644 index 000000000..59aa0bbfc --- /dev/null +++ b/asm/ov83_0223D144.s @@ -0,0 +1,29 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223D144 +ov83_0223D144: ; 0x0223D144 + ldr r0, _0223D148 ; =0x02240390 + bx lr + ; .align 2, 0 +_0223D148: .word 0x02240390 + thumb_func_end ov83_0223D144 + + thumb_func_start ov83_0223D14C +ov83_0223D14C: ; 0x0223D14C + mov r0, #0xb + bx lr + thumb_func_end ov83_0223D14C + + .rodata + + + .global Unk_ov83_02240390 +Unk_ov83_02240390: ; 0x02240390 + .incbin "incbin/overlay83_rodata.bin", 0x188, 0x84 + diff --git a/asm/ov83_0223D150.s b/asm/ov83_0223D150.s new file mode 100644 index 000000000..4a2face2d --- /dev/null +++ b/asm/ov83_0223D150.s @@ -0,0 +1,510 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223D150 +ov83_0223D150: ; 0x0223D150 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, _0223D1D8 ; =0x0000142C + add r4, r1, #0 + ldr r1, [r7, r0] + cmp r1, #1 + bne _0223D168 + bl sub_02035E18 + ldr r1, _0223D1DC ; =0x00001424 + str r0, [r7, r1] + b _0223D16E +_0223D168: + mov r1, #1 + sub r0, #8 + str r1, [r7, r0] +_0223D16E: + bl ov83_0223D144 + add r5, r0, #0 + bl ov83_0223D14C + add r1, r0, #0 + ldr r0, [r7, #0] + ldr r3, _0223D1D8 ; =0x0000142C + str r0, [sp] + ldr r3, [r7, r3] + add r0, r5, #0 + add r2, r7, #0 + bl ov83_0223D4CC + ldr r1, _0223D1E0 ; =0x00001428 + str r0, [r7, r1] + ldr r0, _0223D1E4 ; =0x00001560 + mov r1, #4 + add r0, r7, r0 + add r2, r1, #0 + bl sub_020D5124 + ldr r0, _0223D1D8 ; =0x0000142C + ldr r0, [r7, r0] + cmp r0, #1 + bne _0223D1CC + mov r6, #0 + add r4, r6, #0 + add r5, r7, #0 +_0223D1A8: + add r0, r4, #0 + bl sub_02032EE8 + ldr r1, _0223D1E8 ; =0x00001564 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223D1C2 + ldr r0, _0223D1E4 ; =0x00001560 + add r1, r7, r6 + strb r4, [r1, r0] + add r6, r6, #1 +_0223D1C2: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223D1A8 + pop {r3, r4, r5, r6, r7, pc} +_0223D1CC: + ldr r0, _0223D1E4 ; =0x00001560 + mov r1, #0 + strb r1, [r7, r0] + add r0, r0, #4 + str r4, [r7, r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D1D8: .word 0x0000142C +_0223D1DC: .word 0x00001424 +_0223D1E0: .word 0x00001428 +_0223D1E4: .word 0x00001560 +_0223D1E8: .word 0x00001564 + thumb_func_end ov83_0223D150 + + thumb_func_start ov83_0223D1EC +ov83_0223D1EC: ; 0x0223D1EC + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223D200 ; =0x00001428 + ldr r0, [r4, r0] + bl ov83_0223D558 + ldr r0, _0223D200 ; =0x00001428 + mov r1, #0 + str r1, [r4, r0] + pop {r4, pc} + ; .align 2, 0 +_0223D200: .word 0x00001428 + thumb_func_end ov83_0223D1EC + + thumb_func_start ov83_0223D204 +ov83_0223D204: ; 0x0223D204 + add r0, r3, #0 + ldr r3, _0223D20C ; =ov83_0223B774 + mov r1, #3 + bx r3 + ; .align 2, 0 +_0223D20C: .word ov83_0223B774 + thumb_func_end ov83_0223D204 + + thumb_func_start ov83_0223D210 +ov83_0223D210: ; 0x0223D210 + add r0, r3, #0 + ldr r3, _0223D218 ; =ov83_0223B77C + mov r1, #8 + bx r3 + ; .align 2, 0 +_0223D218: .word ov83_0223B77C + thumb_func_end ov83_0223D210 + + thumb_func_start ov83_0223D21C +ov83_0223D21C: ; 0x0223D21C + push {r3, r4, r5, lr} + ldr r0, _0223D250 ; =0x0000149C + add r5, r1, #0 + add r4, r3, #0 + add r1, r2, #0 + add r0, r4, r0 + add r2, r5, #0 + bl sub_020D50B8 + ldr r0, _0223D254 ; =0x000014AC + mov r1, #0xa + add r3, r4, r0 + add r0, #0x1c + add r2, r4, r0 +_0223D238: + ldrh r0, [r3] + add r3, r3, #2 + strh r0, [r2] + add r2, r2, #2 + sub r1, r1, #1 + bne _0223D238 + add r0, r4, #0 + mov r1, #5 + bl ov83_0223B774 + pop {r3, r4, r5, pc} + nop +_0223D250: .word 0x0000149C +_0223D254: .word 0x000014AC + thumb_func_end ov83_0223D21C + + thumb_func_start ov83_0223D258 +ov83_0223D258: ; 0x0223D258 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r6, r0, #0 + ldr r0, _0223D2D4 ; =0x00001428 + add r5, r3, #0 + ldr r0, [r5, r0] + str r1, [sp] + str r2, [sp, #4] + bl ov83_0223D570 + cmp r0, #0 + bne _0223D2D0 + ldr r0, _0223D2D8 ; =0x00001544 + lsl r4, r6, #2 + add r7, r5, r0 + ldr r1, [sp, #4] + ldr r2, [sp] + add r0, r7, r4 + bl sub_020D50B8 + ldr r0, _0223D2DC ; =0x00001554 + mov r2, #1 + add r1, r5, r6 + strb r2, [r1, r0] + ldr r1, [r7, r4] + add r2, r5, r4 + sub r0, #0xf0 + str r1, [r2, r0] + mov r0, #0 + ldr r1, _0223D2DC ; =0x00001554 + add r3, r0, #0 +_0223D296: + add r2, r5, r3 + ldrb r2, [r2, r1] + cmp r2, #1 + bne _0223D2A0 + add r0, r0, #1 +_0223D2A0: + add r3, r3, #1 + cmp r3, #4 + blt _0223D296 + ldr r1, _0223D2E0 ; =0x00001424 + ldr r2, [r5, r1] + cmp r0, r2 + blt _0223D2D0 + mov r0, #0xba + lsl r0, r0, #2 + add r1, #0x50 + add r0, r5, r0 + add r1, r5, r1 + bl ov83_0223FF44 + bl ov83_0223D4B4 + ldr r3, _0223D2E4 ; =0x00001464 + add r2, r0, #0 + add r1, r5, r3 + sub r3, #0x3c + ldr r3, [r5, r3] + mov r0, #0x18 + bl ov83_0223D508 +_0223D2D0: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D2D4: .word 0x00001428 +_0223D2D8: .word 0x00001544 +_0223D2DC: .word 0x00001554 +_0223D2E0: .word 0x00001424 +_0223D2E4: .word 0x00001464 + thumb_func_end ov83_0223D258 + + thumb_func_start ov83_0223D2E8 +ov83_0223D2E8: ; 0x0223D2E8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r3, #0 + mov ip, r2 + ldr r3, _0223D348 ; =0x000014D6 + mov r2, #0x1c + add r5, r0, #0 + mul r5, r2 + add r2, r4, r3 + str r2, [sp, #4] + str r1, [sp] + mov r1, ip + ldrb r2, [r2, r5] + add r1, #8 + cmp r2, #1 + bne _0223D31C + ldrb r1, [r1, #0xe] + cmp r1, #0 + bne _0223D31C + cmp r0, #0 + bne _0223D31C + add r1, r4, r5 + sub r0, r3, #2 + mov r6, #1 + ldrb r7, [r1, r0] + b _0223D31E +_0223D31C: + mov r6, #0 +_0223D31E: + mov r0, #0x53 + lsl r0, r0, #6 + add r0, r4, r0 + ldr r2, [sp] + add r0, r0, r5 + mov r1, ip + bl sub_020D50B8 + cmp r6, #1 + bne _0223D33C + ldr r0, [sp, #4] + add r1, r4, r5 + strb r6, [r0, r5] + ldr r0, _0223D34C ; =0x000014D4 + strb r7, [r1, r0] +_0223D33C: + ldr r0, _0223D350 ; =0x00001602 + ldrh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D348: .word 0x000014D6 +_0223D34C: .word 0x000014D4 +_0223D350: .word 0x00001602 + thumb_func_end ov83_0223D2E8 + + thumb_func_start ov83_0223D354 +ov83_0223D354: ; 0x0223D354 + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + mov ip, r1 + add r1, r2, #0 + mov r2, #0x1c + ldr r0, _0223D39C ; =0x000014D6 + add r5, r3, #0 + mul r4, r2 + add r7, r5, r0 + ldrb r2, [r7, r4] + cmp r2, #1 + bne _0223D37E + ldrb r2, [r1, #0xe] + cmp r2, #0 + bne _0223D37E + add r2, r5, r4 + sub r0, r0, #2 + ldrb r0, [r2, r0] + mov r6, #1 + str r0, [sp] + b _0223D380 +_0223D37E: + mov r6, #0 +_0223D380: + ldr r0, _0223D3A0 ; =0x000014C8 + mov r2, ip + add r0, r5, r0 + add r0, r0, r4 + bl sub_020D50B8 + cmp r6, #1 + bne _0223D39A + strb r6, [r7, r4] + ldr r1, _0223D3A4 ; =0x000014D4 + ldr r0, [sp] + add r2, r5, r4 + strb r0, [r2, r1] +_0223D39A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D39C: .word 0x000014D6 +_0223D3A0: .word 0x000014C8 +_0223D3A4: .word 0x000014D4 + thumb_func_end ov83_0223D354 + + thumb_func_start ov83_0223D3A8 +ov83_0223D3A8: ; 0x0223D3A8 + push {r4, r5, r6, lr} + add r4, r0, #0 + mov r0, #0x53 + add r5, r3, #0 + lsl r0, r0, #6 + add r6, r1, #0 + add r1, r5, r0 + mov r0, #0x1c + mul r0, r4 + add r0, r1, r0 + add r1, r2, #0 + add r2, r6, #0 + bl sub_020D50B8 + ldr r0, _0223D3D4 ; =0x000015F8 + lsl r1, r4, #1 + add r2, r5, r0 + ldrh r0, [r2, r1] + add r0, r0, #1 + strh r0, [r2, r1] + pop {r4, r5, r6, pc} + nop +_0223D3D4: .word 0x000015F8 + thumb_func_end ov83_0223D3A8 + + thumb_func_start ov83_0223D3D8 +ov83_0223D3D8: ; 0x0223D3D8 + push {r3, r4, r5, lr} + ldr r0, _0223D3F4 ; =0x00001488 + add r5, r1, #0 + add r4, r3, #0 + add r1, r2, #0 + add r0, r4, r0 + add r2, r5, #0 + bl sub_020D50B8 + add r0, r4, #0 + mov r1, #0xa + bl ov83_0223B774 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D3F4: .word 0x00001488 + thumb_func_end ov83_0223D3D8 + + thumb_func_start ov83_0223D3F8 +ov83_0223D3F8: ; 0x0223D3F8 + push {r4, lr} + ldr r0, _0223D40C ; =0x00001530 + add r4, r1, #0 + ldr r0, [r3, r0] + add r1, r2, #0 + add r2, r4, #0 + bl sub_020D50B8 + pop {r4, pc} + nop +_0223D40C: .word 0x00001530 + thumb_func_end ov83_0223D3F8 + + thumb_func_start ov83_0223D410 +ov83_0223D410: ; 0x0223D410 + push {r3, r4, r5, lr} + ldr r0, _0223D42C ; =0x00001575 + add r5, r1, #0 + add r4, r3, #0 + add r1, r2, #0 + add r0, r4, r0 + add r2, r5, #0 + bl sub_020D50B8 + add r0, r4, #0 + mov r1, #0xc + bl ov83_0223B774 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D42C: .word 0x00001575 + thumb_func_end ov83_0223D410 + + thumb_func_start ov83_0223D430 +ov83_0223D430: ; 0x0223D430 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, _0223D49C ; =0x00001428 + add r4, r3, #0 + ldr r0, [r4, r0] + add r6, r1, #0 + add r7, r2, #0 + bl ov83_0223D570 + cmp r0, #0 + bne _0223D49A + ldr r0, _0223D4A0 ; =0x00001558 + add r1, r7, #0 + add r0, r4, r0 + add r0, r0, r5 + add r2, r6, #0 + bl sub_020D50B8 + ldr r0, _0223D4A4 ; =0x0000155C + add r1, r4, r5 + mov r2, #1 + strb r2, [r1, r0] + add r6, sp, #0 + mov r3, #0 + strb r2, [r6] + add r2, r3, #0 + sub r7, r0, #4 + add r5, r0, #0 +_0223D468: + add r1, r4, r2 + ldrb r0, [r1, r5] + cmp r0, #1 + bne _0223D47A + ldrb r0, [r6] + ldrb r1, [r1, r7] + add r3, r3, #1 + and r0, r1 + strb r0, [r6] +_0223D47A: + add r2, r2, #1 + cmp r2, #4 + blt _0223D468 + ldr r0, _0223D4A8 ; =0x00001424 + ldr r0, [r4, r0] + cmp r3, r0 + blt _0223D49A + bl ov83_0223D4B0 + ldr r3, _0223D49C ; =0x00001428 + add r2, r0, #0 + ldr r3, [r4, r3] + mov r0, #0x1d + add r1, sp, #0 + bl ov83_0223D508 +_0223D49A: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D49C: .word 0x00001428 +_0223D4A0: .word 0x00001558 +_0223D4A4: .word 0x0000155C +_0223D4A8: .word 0x00001424 + thumb_func_end ov83_0223D430 + + thumb_func_start ov83_0223D4AC +ov83_0223D4AC: ; 0x0223D4AC + mov r0, #0 + bx lr + thumb_func_end ov83_0223D4AC + + thumb_func_start ov83_0223D4B0 +ov83_0223D4B0: ; 0x0223D4B0 + mov r0, #1 + bx lr + thumb_func_end ov83_0223D4B0 + + thumb_func_start ov83_0223D4B4 +ov83_0223D4B4: ; 0x0223D4B4 + mov r0, #0x24 + bx lr + thumb_func_end ov83_0223D4B4 + + thumb_func_start ov83_0223D4B8 +ov83_0223D4B8: ; 0x0223D4B8 + mov r0, #4 + bx lr + thumb_func_end ov83_0223D4B8 + + thumb_func_start ov83_0223D4BC +ov83_0223D4BC: ; 0x0223D4BC + mov r0, #0x1c + bx lr + thumb_func_end ov83_0223D4BC + + thumb_func_start ov83_0223D4C0 +ov83_0223D4C0: ; 0x0223D4C0 + mov r0, #0x14 + bx lr + thumb_func_end ov83_0223D4C0 + + thumb_func_start ov83_0223D4C4 +ov83_0223D4C4: ; 0x0223D4C4 + mov r0, #0x14 + bx lr + thumb_func_end ov83_0223D4C4 + + thumb_func_start ov83_0223D4C8 +ov83_0223D4C8: ; 0x0223D4C8 + mov r0, #8 + bx lr + thumb_func_end ov83_0223D4C8 \ No newline at end of file diff --git a/asm/ov83_0223D4CC.s b/asm/ov83_0223D4CC.s new file mode 100644 index 000000000..d85e0367b --- /dev/null +++ b/asm/ov83_0223D4CC.s @@ -0,0 +1,272 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223D4CC +ov83_0223D4CC: ; 0x0223D4CC + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + add r7, r1, #0 + ldr r0, [sp, #0x18] + mov r1, #8 + str r2, [sp] + add r5, r3, #0 + bl sub_02018144 + add r4, r0, #0 + mov r0, #0 + str r5, [r4, #0] + str r0, [r4, #4] + cmp r5, #1 + bne _0223D4F6 + ldr r2, [sp] + add r0, r6, #0 + add r1, r7, #0 + bl sub_02032798 + b _0223D504 +_0223D4F6: + ldr r2, [sp] + ldr r3, [sp, #0x18] + add r0, r6, #0 + add r1, r7, #0 + bl ov83_0223D584 + str r0, [r4, #4] +_0223D504: + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223D4CC + + thumb_func_start ov83_0223D508 +ov83_0223D508: ; 0x0223D508 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r3, #0] + add r6, r1, #0 + add r7, r2, #0 + cmp r0, #1 + bne _0223D54A + bl sub_0203895C + cmp r0, #0x1d + bne _0223D53E + add r0, r5, #0 + mov r4, #1 + bl sub_0203626C + cmp r0, #0 + beq _0223D52C + mov r4, #0 +_0223D52C: + bl ov4_021D1404 + cmp r0, #0 + bne _0223D536 + mov r4, #0 +_0223D536: + cmp r4, #0 + bne _0223D53E + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_0223D53E: + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl sub_020359DC + pop {r3, r4, r5, r6, r7, pc} +_0223D54A: + ldr r0, [r3, #4] + add r1, r5, #0 + add r2, r6, #0 + add r3, r7, #0 + bl ov83_0223D638 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223D508 + + thumb_func_start ov83_0223D558 +ov83_0223D558: ; 0x0223D558 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + bne _0223D568 + ldr r0, [r4, #4] + bl ov83_0223D620 +_0223D568: + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + thumb_func_end ov83_0223D558 + + thumb_func_start ov83_0223D570 +ov83_0223D570: ; 0x0223D570 + push {r3, lr} + ldr r0, [r0, #0] + cmp r0, #1 + bne _0223D57E + bl sub_0203608C + pop {r3, pc} +_0223D57E: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D570 + + thumb_func_start ov83_0223D584 +ov83_0223D584: ; 0x0223D584 + push {r3, r4, r5, r6, r7, lr} + add r6, r1, #0 + mov r1, #0x1b + add r5, r0, #0 + add r0, r3, #0 + lsl r1, r1, #4 + add r7, r2, #0 + bl sub_02018144 + mov r2, #0x1b + mov r1, #0 + lsl r2, r2, #4 + add r4, r0, #0 + bl sub_020D5124 + mov r1, #0x1a + lsl r1, r1, #4 + str r5, [r4, r1] + add r0, r1, #4 + str r6, [r4, r0] + add r1, #8 + str r7, [r4, r1] + ldr r0, _0223D5C4 ; =ov83_0223D5CC + ldr r2, _0223D5C8 ; =0x00001388 + add r1, r4, #0 + bl sub_0200DA3C + mov r1, #0x6b + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D5C4: .word ov83_0223D5CC +_0223D5C8: .word 0x00001388 + thumb_func_end ov83_0223D584 + + thumb_func_start ov83_0223D5CC +ov83_0223D5CC: ; 0x0223D5CC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r7, r1, #0 + mov r0, #0 + str r0, [sp] + add r6, r7, #0 +_0223D5D8: + ldr r0, [r6, #0] + cmp r0, #1 + bne _0223D60E + mov r4, #0x1a + lsl r4, r4, #4 + ldr r4, [r7, r4] + mov r3, #0x6a + mov ip, r4 + ldr r4, [r6, #4] + mov r5, #0xc + mul r5, r4 + str r5, [sp, #4] + lsl r3, r3, #2 + add r2, r6, #0 + ldr r4, [sp, #4] + mov r5, ip + ldr r1, [r6, #0x30] + ldr r3, [r7, r3] + ldr r4, [r5, r4] + mov r0, #0 + add r2, #8 + blx r4 + add r0, r6, #0 + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 +_0223D60E: + ldr r0, [sp] + add r6, #0x34 + add r0, r0, #1 + str r0, [sp] + cmp r0, #8 + blt _0223D5D8 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D5CC + + thumb_func_start ov83_0223D620 +ov83_0223D620: ; 0x0223D620 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x6b + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200DA58 + add r0, r4, #0 + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D620 + + thumb_func_start ov83_0223D638 +ov83_0223D638: ; 0x0223D638 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + mov r4, #0 + str r2, [sp] + add r7, r1, #0 + add r5, r3, #0 + add r0, r4, #0 + add r2, r6, #0 +_0223D648: + ldr r1, [r2, #0] + cmp r1, #0 + bne _0223D656 + mov r1, #0x34 + mul r1, r0 + add r4, r6, r1 + b _0223D65E +_0223D656: + add r0, r0, #1 + add r2, #0x34 + cmp r0, #8 + blt _0223D648 +_0223D65E: + cmp r4, #0 + bne _0223D666 + bl sub_02022974 +_0223D666: + mov r0, #0x1a + lsl r0, r0, #4 + add r1, r7, #0 + ldr r2, [r6, r0] + sub r1, #0x16 + mov r0, #0xc + mul r0, r1 + add r0, r2, r0 + ldr r0, [r0, #4] + blx r0 + cmp r0, r5 + beq _0223D682 + bl sub_02022974 +_0223D682: + cmp r5, #0x26 + blt _0223D68A + bl sub_02022974 +_0223D68A: + sub r7, #0x16 + str r7, [r4, #4] + cmp r5, #0 + ble _0223D69E + add r0, r4, #0 + ldr r1, [sp] + add r0, #8 + add r2, r5, #0 + bl sub_020D50B8 +_0223D69E: + str r5, [r4, #0x30] + mov r0, #1 + str r0, [r4, #0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D638 \ No newline at end of file diff --git a/asm/ov83_0223D6A8.s b/asm/ov83_0223D6A8.s new file mode 100644 index 000000000..70fed8462 --- /dev/null +++ b/asm/ov83_0223D6A8.s @@ -0,0 +1,4565 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223D6A8 +ov83_0223D6A8: ; 0x0223D6A8 + push {r4, lr} + add r4, r0, #0 + add r0, r2, #0 + mov r2, #0 + bl sub_02002D7C + lsr r0, r0, #1 + sub r0, r4, r0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D6A8 + + thumb_func_start ov83_0223D6BC +ov83_0223D6BC: ; 0x0223D6BC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + str r2, [sp] + add r0, r3, #0 + mov r2, #0 + add r3, sp, #4 + bl sub_020071B4 + add r4, r0, #0 + ldr r0, [sp, #4] + str r5, [sp, #8] + str r0, [sp, #0xc] + add r0, sp, #8 + bl sub_02015128 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D6BC + + thumb_func_start ov83_0223D6EC +ov83_0223D6EC: ; 0x0223D6EC + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r2, #0 + add r5, r0, #0 + add r0, r3, #0 + add r2, sp, #0 + add r3, r4, #0 + bl sub_020071EC + add r4, r0, #0 + ldr r0, [sp] + str r5, [sp, #4] + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + add r0, sp, #4 + bl sub_020151A4 + add r5, r0, #0 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D6EC + + thumb_func_start ov83_0223D720 +ov83_0223D720: ; 0x0223D720 + push {r4, lr} + sub sp, #0x20 + str r0, [sp] + str r1, [sp, #4] + str r2, [sp, #8] + add r0, sp, #0 + ldr r1, [sp, #0x28] + strh r3, [r0, #0xc] + strh r1, [r0, #0xe] + mov r2, #0 + strh r2, [r0, #0x10] + mov r1, #0x1f + str r1, [sp, #0x14] + ldr r1, [sp, #0x2c] + str r1, [sp, #0x18] + strh r2, [r0, #0x1c] + add r0, sp, #0 + bl sub_02015214 + mov r1, #0 + add r4, r0, #0 + bl sub_02015240 + add r0, r4, #0 + add sp, #0x20 + pop {r4, pc} + thumb_func_end ov83_0223D720 + + thumb_func_start ov83_0223D754 +ov83_0223D754: ; 0x0223D754 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r0, r1, #0 + add r6, r3, #0 + add r7, r2, #0 + add r1, r5, #4 + add r2, r6, #0 + bl sub_020095C4 + str r0, [r5, #0] + mov r4, #0 +_0223D76A: + add r0, r7, #0 + add r1, r4, #0 + add r2, r6, #0 + bl sub_02009714 + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r5, r1] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223D76A + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223D754 + + thumb_func_start ov83_0223D784 +ov83_0223D784: ; 0x0223D784 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl sub_02021964 + mov r4, #0 + mov r6, #0x4b + str r4, [r5, #0] + lsl r6, r6, #2 +_0223D796: + ldr r0, [r5, r6] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223D796 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D784 + + thumb_func_start ov83_0223D7A8 +ov83_0223D7A8: ; 0x0223D7A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + ldr r6, [sp, #0x58] + add r5, r0, #0 + ldr r7, [sp, #0x5c] + str r6, [sp] + mov r0, #1 + str r0, [sp, #4] + str r7, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + add r4, r1, #0 + str r3, [sp, #0x30] + str r2, [sp, #0x2c] + add r1, r2, #0 + ldr r0, [r5, r0] + ldr r2, [sp, #0x4c] + mov r3, #0 + bl sub_02009AA8 + str r0, [r4, #0] + str r6, [sp] + mov r1, #1 + ldr r0, [sp, #0x48] + str r1, [sp, #4] + str r0, [sp, #8] + str r7, [sp, #0xc] + mov r0, #0x13 + str r1, [sp, #0x10] + lsl r0, r0, #4 + ldr r0, [r5, r0] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x30] + mov r3, #0 + bl sub_02009B64 + str r0, [r4, #4] + mov r3, #0 + str r3, [r4, #0x10] + str r6, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4d + str r7, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x50] + bl sub_02009BC4 + str r0, [r4, #8] + str r6, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4e + str r7, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x54] + mov r3, #0 + bl sub_02009BC4 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl sub_0200A450 + cmp r0, #0 + bne _0223D838 + bl sub_02022974 +_0223D838: + ldr r0, [r4, #0] + bl sub_02009D4C + ldr r0, [r4, #4] + bl sub_0200A640 + cmp r0, #0 + bne _0223D84C + bl sub_02022974 +_0223D84C: + ldr r0, [r4, #4] + bl sub_02009D4C + mov r0, #0 + mov r2, #0x4b + str r6, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r4, #0x14 + str r1, [sp, #0x14] + add r1, r2, #4 + ldr r1, [r5, r1] + add r3, r6, #0 + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r1, [r5, r1] + add r2, #0xc + str r1, [sp, #0x1c] + ldr r1, [r5, r2] + add r2, r6, #0 + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r4, #0 + add r1, r6, #0 + bl sub_020093B4 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + thumb_func_end ov83_0223D7A8 + + thumb_func_start ov83_0223D894 +ov83_0223D894: ; 0x0223D894 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + ldr r6, [sp, #0x5c] + add r5, r0, #0 + ldr r7, [sp, #0x60] + str r6, [sp] + mov r0, #1 + str r0, [sp, #4] + str r7, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0x4b + lsl r0, r0, #2 + add r4, r1, #0 + str r3, [sp, #0x30] + str r2, [sp, #0x2c] + add r1, r2, #0 + ldr r0, [r5, r0] + ldr r2, [sp, #0x50] + mov r3, #0 + bl sub_02009AA8 + str r0, [r4, #0] + ldr r0, [sp, #0x30] + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #0x10] + ldr r0, [sp, #0x30] + bl sub_02009E08 + str r0, [sp, #0x34] + str r6, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x4d + str r7, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x54] + mov r3, #0 + bl sub_02009BC4 + str r0, [r4, #8] + str r6, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x4e + str r7, [sp, #8] + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [sp, #0x2c] + ldr r2, [sp, #0x58] + mov r3, #0 + bl sub_02009BC4 + str r0, [r4, #0xc] + ldr r0, [r4, #0] + bl sub_0200A450 + cmp r0, #0 + bne _0223D912 + bl sub_02022974 +_0223D912: + ldr r0, [r4, #0] + bl sub_02009D4C + mov r0, #0 + mov r2, #0x4b + str r6, [sp] + mvn r0, r0 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + lsl r2, r2, #2 + ldr r1, [r5, r2] + add r4, #0x14 + str r1, [sp, #0x14] + add r1, r2, #4 + ldr r1, [r5, r1] + add r3, r6, #0 + str r1, [sp, #0x18] + add r1, r2, #0 + add r1, #8 + ldr r1, [r5, r1] + add r2, #0xc + str r1, [sp, #0x1c] + ldr r1, [r5, r2] + ldr r2, [sp, #0x34] + str r1, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r4, #0 + add r1, r6, #0 + bl sub_020093B4 + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D894 + + thumb_func_start ov83_0223D95C +ov83_0223D95C: ; 0x0223D95C + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r5, r0, #0 + ldr r0, [r7, #0] + bl sub_0200A4E4 + ldr r0, [r7, #0x10] + cmp r0, #0 + bne _0223D974 + ldr r0, [r7, #4] + bl sub_0200A6DC +_0223D974: + mov r6, #0 + add r4, r7, #0 +_0223D978: + cmp r6, #1 + beq _0223D98A + mov r0, #0x4b + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0] + bl sub_02009D68 + b _0223D99C +_0223D98A: + ldr r0, [r7, #0x10] + cmp r0, #0 + bne _0223D99C + mov r0, #0x4b + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r1, [r4, #0] + bl sub_02009D68 +_0223D99C: + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #4 + blt _0223D978 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223D95C + + thumb_func_start ov83_0223D9A8 +ov83_0223D9A8: ; 0x0223D9A8 + push {r4, lr} + sub sp, #0x20 + ldr r0, [r0, #0] + add r1, #0x14 + str r0, [sp] + ldr r0, [sp, #0x28] + str r1, [sp, #4] + str r0, [sp, #0x10] + ldr r0, [sp, #0x2c] + str r2, [sp, #8] + str r0, [sp, #0x14] + mov r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x30] + str r3, [sp, #0xc] + str r0, [sp, #0x1c] + add r0, sp, #0 + bl sub_02021B90 + add r4, r0, #0 + bne _0223D9D6 + bl sub_02022974 +_0223D9D6: + add r0, r4, #0 + add sp, #0x20 + pop {r4, pc} + thumb_func_end ov83_0223D9A8 + + thumb_func_start ov83_0223D9DC +ov83_0223D9DC: ; 0x0223D9DC + str r1, [r0, #0] + str r1, [r0, #4] + sub r1, r2, r1 + str r1, [r0, #8] + str r3, [r0, #0x10] + mov r1, #0 + str r1, [r0, #0xc] + bx lr + thumb_func_end ov83_0223D9DC + + thumb_func_start ov83_0223D9EC +ov83_0223D9EC: ; 0x0223D9EC + push {r4, lr} + add r4, r0, #0 + ldr r2, [r4, #0xc] + ldr r0, [r4, #8] + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, [r4, #0x10] + lsl r1, r1, #0xc + bl sub_020BCFD0 + ldr r1, [r4, #4] + add r0, r0, r1 + str r0, [r4, #0] + ldr r0, [r4, #0xc] + ldr r1, [r4, #0x10] + add r0, r0, #1 + cmp r0, r1 + bgt _0223DA2C + str r0, [r4, #0xc] + mov r0, #0 + pop {r4, pc} +_0223DA2C: + str r1, [r4, #0xc] + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223D9EC + + thumb_func_start ov83_0223DA34 +ov83_0223DA34: ; 0x0223DA34 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r5, r0, #0 + add r7, r2, #0 + add r0, r3, #0 + add r6, r1, #0 + lsl r2, r4, #0xc + str r3, [sp] + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + sub r0, r7, r6 + mov r7, #2 + mov r3, #0 + lsl r7, r7, #0xa + add r2, r2, r7 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r2, r2, #0xc + orr r2, r1 + sub r2, r0, r2 + asr r1, r2, #0x1f + lsr r0, r2, #0x13 + lsl r1, r1, #0xd + orr r1, r0 + lsl r0, r2, #0xd + add r0, r0, r7 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + add r1, r4, #0 + mul r1, r4 + lsl r1, r1, #0xc + bl sub_020BCFD0 + str r6, [r5, #0] + ldr r1, [sp] + str r6, [r5, #4] + str r1, [r5, #8] + str r0, [r5, #0xc] + mov r0, #0 + str r0, [r5, #0x10] + str r4, [r5, #0x14] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223DA34 + + thumb_func_start ov83_0223DA94 +ov83_0223DA94: ; 0x0223DA94 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r6, [r5, #0x10] + ldr r0, [r5, #8] + lsl r2, r6, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsr r4, r2, #0xc + lsl r0, r1, #0x14 + add r2, r6, #0 + orr r4, r0 + ldr r0, [r5, #0xc] + mul r2, r6 + lsl r2, r2, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + lsl r1, r2, #2 + bl sub_020BCFD0 + ldr r1, [r5, #4] + add r0, r4, r0 + add r0, r1, r0 + str r0, [r5, #0] + ldr r0, [r5, #0x10] + ldr r1, [r5, #0x14] + add r0, r0, #1 + cmp r0, r1 + bgt _0223DAF4 + str r0, [r5, #0x10] + mov r0, #0 + pop {r4, r5, r6, pc} +_0223DAF4: + str r1, [r5, #0x10] + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223DA94 + + thumb_func_start ov83_0223DAFC +ov83_0223DAFC: ; 0x0223DAFC + push {r4} + sub sp, #0xc + str r2, [sp, #4] + str r3, [sp, #8] + add r2, sp, #0 + add r4, r0, #0 + str r1, [sp] + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + add sp, #0xc + pop {r4} + bx lr + thumb_func_end ov83_0223DAFC + + thumb_func_start ov83_0223DB18 +ov83_0223DB18: ; 0x0223DB18 + push {r3, r4, r5, lr} + mov r2, #0x1f + add r4, r1, #0 + mov r1, #0 + lsl r2, r2, #4 + add r5, r0, #0 + bl sub_020D5124 + mov r0, #0x42 + lsl r0, r0, #2 + str r4, [r5, r0] + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223DB18 + + thumb_func_start ov83_0223DB30 +ov83_0223DB30: ; 0x0223DB30 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223DB3E + bl sub_02022974 +_0223DB3E: + mov r2, #0x1f + add r0, r4, #0 + mov r1, #0 + lsl r2, r2, #4 + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov83_0223DB30 + + thumb_func_start ov83_0223DB4C +ov83_0223DB4C: ; 0x0223DB4C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r6, [sp, #0x48] + str r0, [sp, #0x18] + str r1, [sp, #0x1c] + mov r0, #0x35 + add r1, r6, #0 + add r7, r2, #0 + str r3, [sp, #0x20] + bl sub_02006C24 + ldr r4, [sp, #0x18] + str r0, [sp, #0x24] + mov r0, #0 + ldr r5, [sp, #0x18] + str r0, [sp, #0x28] + str r0, [sp, #0x2c] + add r4, #0x28 +_0223DB70: + ldr r0, [sp, #0x1c] + ldr r3, [r0, #0] + cmp r3, #0 + beq _0223DBEC + mov r0, #1 + str r0, [sp] + add r0, r3, #0 + sub r0, #0x8f + str r0, [sp, #4] + mov r0, #5 + str r0, [sp, #8] + mov r0, #4 + str r0, [sp, #0xc] + mov r0, #0xfa + ldr r1, [sp, #0x2c] + lsl r0, r0, #2 + add r0, r1, r0 + str r0, [sp, #0x10] + ldr r2, [sp, #0x24] + add r0, r7, #0 + add r1, r4, #0 + sub r3, #0x4f + str r6, [sp, #0x14] + bl ov83_0223D7A8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r2, #0 + add r0, r7, #0 + add r1, r4, #0 + add r3, r2, #0 + str r6, [sp, #8] + bl ov83_0223D9A8 + mov r1, #0 + str r0, [r5, #8] + bl sub_02021CAC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r2, #0 + ldr r1, [sp, #0x20] + str r6, [sp, #8] + add r0, r7, #0 + add r3, r2, #0 + bl ov83_0223D9A8 + str r0, [r5, #0x18] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #0x18] + mov r1, #1 + bl sub_02021D6C + ldr r0, [sp, #0x28] + add r4, #0x38 + add r0, r0, #1 + add r5, r5, #4 + str r0, [sp, #0x28] +_0223DBEC: + mov r0, #0x42 + ldr r1, [sp, #0x18] + lsl r0, r0, #2 + ldr r1, [r1, r0] + ldr r0, [sp, #0x28] + cmp r1, r0 + beq _0223DC0A + ldr r0, [sp, #0x1c] + add r0, r0, #4 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x2c] + add r0, r0, #1 + str r0, [sp, #0x2c] + cmp r0, #4 + blt _0223DB70 +_0223DC0A: + ldr r0, [sp, #0x24] + bl sub_02006CA8 + ldr r0, [sp, #0x18] + mov r1, #1 + str r1, [r0, #0] + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223DB4C + + thumb_func_start ov83_0223DC1C +ov83_0223DC1C: ; 0x0223DC1C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r0, [r7, #0] + str r1, [sp] + cmp r0, #1 + beq _0223DC2C + bl sub_02022974 +_0223DC2C: + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r7, r0] + mov r4, #0 + cmp r0, #0 + ble _0223DC62 + add r6, r7, #0 + add r5, r7, #0 + add r6, #0x28 +_0223DC3E: + ldr r0, [r5, #8] + bl sub_02021BD4 + ldr r0, [r5, #0x18] + bl sub_02021BD4 + ldr r0, [sp] + add r1, r6, #0 + bl ov83_0223D95C + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r7, r0] + add r4, r4, #1 + add r5, r5, #4 + add r6, #0x38 + cmp r4, r0 + blt _0223DC3E +_0223DC62: + mov r0, #0 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223DC1C + + thumb_func_start ov83_0223DC68 +ov83_0223DC68: ; 0x0223DC68 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #4] + ldr r0, [r0, #4] + cmp r0, #0 + beq _0223DC78 + bl sub_02022974 +_0223DC78: + mov r0, #0 + str r0, [sp, #0xc] + mov r2, #0x42 + ldr r0, [sp, #4] + lsl r2, r2, #2 + ldr r0, [r0, r2] + cmp r0, #0 + ble _0223DD18 + ldr r0, [sp, #4] + add r1, r2, #4 + add r0, r0, r1 + str r0, [sp, #8] + ldr r0, [sp, #4] + add r2, #0x64 + ldr r4, _0223DD2C ; =0x02240460 + add r7, r0, r2 + add r6, r0, #0 + add r5, r0, #0 +_0223DC9C: + ldrb r0, [r4, #0x10] + mov r1, #8 + mov r2, #0xa + str r0, [sp] + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r0, [sp, #8] + ldr r3, [r4, #0] + lsl r1, r1, #0xc + lsl r2, r2, #0xc + bl ov83_0223DA34 + ldrb r0, [r4, #0x10] + mov r1, #0xc + mov r2, #0xe + str r0, [sp] + ldrsh r1, [r4, r1] + ldrsh r2, [r4, r2] + ldr r3, [r4, #4] + add r0, r7, #0 + lsl r1, r1, #0xc + lsl r2, r2, #0xc + bl ov83_0223DA34 + mov r1, #0x43 + mov r2, #0x5b + lsl r1, r1, #2 + lsl r2, r2, #2 + ldr r1, [r6, r1] + ldr r2, [r6, r2] + add r0, sp, #0x10 + mov r3, #0 + bl ov83_0223DAFC + ldr r0, [r5, #8] + add r1, sp, #0x10 + bl sub_02021C50 + mov r0, #0x73 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r5, r0] + ldrb r1, [r4, #0x11] + add r0, #0x10 + add r4, #0x14 + str r1, [r5, r0] + ldr r0, [sp, #8] + ldr r1, [sp, #4] + add r0, #0x18 + str r0, [sp, #8] + ldr r0, [sp, #0xc] + add r7, #0x18 + add r0, r0, #1 + str r0, [sp, #0xc] + mov r0, #0x42 + lsl r0, r0, #2 + ldr r1, [r1, r0] + ldr r0, [sp, #0xc] + add r6, #0x18 + add r5, r5, #4 + cmp r0, r1 + blt _0223DC9C +_0223DD18: + mov r1, #0x7b + ldr r0, [sp, #4] + mov r2, #0 + lsl r1, r1, #2 + str r2, [r0, r1] + mov r1, #1 + str r1, [r0, #4] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223DD2C: .word 0x02240460 + thumb_func_end ov83_0223DC68 + + thumb_func_start ov83_0223DD30 +ov83_0223DD30: ; 0x0223DD30 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r6, #4] + cmp r0, #0 + bne _0223DD46 + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223DD46: + mov r0, #0x7b + lsl r0, r0, #2 + add r1, r0, #0 + sub r1, #0xe4 + ldr r2, [r6, r0] + ldr r1, [r6, r1] + cmp r2, r1 + bge _0223DD96 + add r1, r0, #0 + sub r1, #0x10 + add r1, r6, r1 + lsl r3, r2, #2 + ldr r2, [r1, r3] + sub r2, r2, #1 + str r2, [r1, r3] + ldr r1, [r6, r0] + lsl r1, r1, #2 + add r2, r6, r1 + add r1, r0, #0 + sub r1, #0x10 + ldr r1, [r2, r1] + cmp r1, #0 + bgt _0223DD96 + add r3, r0, #0 + mov r1, #1 + sub r3, #0x20 + str r1, [r2, r3] + ldr r0, [r6, r0] + lsl r0, r0, #2 + add r0, r6, r0 + ldr r0, [r0, #8] + bl sub_02021CAC + mov r1, #0x7b + lsl r1, r1, #2 + ldr r2, [r6, r1] + add r0, r2, #2 + str r0, [sp, #4] + add r0, r2, #1 + str r0, [r6, r1] +_0223DD96: + mov r1, #0x42 + mov r0, #0 + lsl r1, r1, #2 + str r0, [sp, #8] + ldr r0, [r6, r1] + cmp r0, #0 + ble _0223DE7A + add r0, r1, #4 + add r0, r6, r0 + add r1, #0x64 + add r4, r6, #0 + str r0, [sp] + add r7, r6, r1 + add r5, r6, #0 +_0223DDB2: + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #3 + bhi _0223DE58 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223DDC8: ; jump table + .short _0223DE5C - _0223DDC8 - 2 ; case 0 + .short _0223DDD0 - _0223DDC8 - 2 ; case 1 + .short _0223DE36 - _0223DDC8 - 2 ; case 2 + .short _0223DE5C - _0223DDC8 - 2 ; case 3 +_0223DDD0: + ldr r0, [sp] + bl ov83_0223DA94 + str r0, [sp, #0xc] + add r0, r7, #0 + bl ov83_0223DA94 + mov r1, #0x43 + mov r2, #0x5b + lsl r1, r1, #2 + lsl r2, r2, #2 + ldr r1, [r5, r1] + ldr r2, [r5, r2] + add r0, sp, #0x10 + mov r3, #0 + bl ov83_0223DAFC + ldr r0, [r4, #8] + add r1, sp, #0x10 + bl sub_02021C50 + ldr r0, [sp, #0xc] + cmp r0, #1 + bne _0223DE5C + ldr r0, [r4, #0x18] + add r1, sp, #0x10 + bl sub_02021C50 + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0x18] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_02021CAC + ldr r0, _0223DE9C ; =0x000006BC + bl sub_02005748 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r0, #1 + mov r0, #0x73 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223DE5C +_0223DE36: + ldr r0, [r4, #0x18] + bl sub_02021FD0 + cmp r0, #0 + bne _0223DE5C + ldr r0, [r4, #0x18] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r0, #1 + mov r0, #0x73 + lsl r0, r0, #2 + str r1, [r4, r0] + b _0223DE5C +_0223DE58: + bl sub_02022974 +_0223DE5C: + ldr r0, [sp] + add r4, r4, #4 + add r0, #0x18 + str r0, [sp] + ldr r0, [sp, #8] + add r7, #0x18 + add r0, r0, #1 + str r0, [sp, #8] + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r6, r0] + ldr r1, [sp, #8] + add r5, #0x18 + cmp r1, r0 + blt _0223DDB2 +_0223DE7A: + sub r0, r0, #1 + lsl r0, r0, #2 + add r1, r6, r0 + mov r0, #0x73 + lsl r0, r0, #2 + ldr r0, [r1, r0] + cmp r0, #3 + bne _0223DE94 + mov r0, #0 + str r0, [r6, #4] + add sp, #0x1c + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223DE94: + ldr r0, [sp, #4] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223DE9C: .word 0x000006BC + thumb_func_end ov83_0223DD30 + + thumb_func_start ov83_0223DEA0 +ov83_0223DEA0: ; 0x0223DEA0 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + mov r1, #0 + mov r2, #0x34 + add r7, r3, #0 + bl sub_020D5124 + str r6, [r5, #0x18] + ldr r0, [sp, #0x1c] + str r4, [r5, #0x14] + str r0, [r5, #0] + ldr r0, [sp, #0x18] + str r7, [r5, #0x1c] + str r0, [r5, #0x10] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223DEA0 + + thumb_func_start ov83_0223DEC4 +ov83_0223DEC4: ; 0x0223DEC4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _0223DED2 + bl sub_02022974 +_0223DED2: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x34 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223DEC4 + + thumb_func_start ov83_0223DEE0 +ov83_0223DEE0: ; 0x0223DEE0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x30] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _0223DEF4 + bl sub_02022974 +_0223DEF4: + add r0, r5, #0 + add r1, r6, #0 + str r4, [r5, #4] + bl ov83_0223E09C + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov83_0223E15C + mov r0, #1 + str r0, [r5, #0x30] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223DEE0 + + thumb_func_start ov83_0223DF10 +ov83_0223DF10: ; 0x0223DF10 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x30] + cmp r0, #1 + beq _0223DF1E + bl sub_02022974 +_0223DF1E: + add r0, r4, #0 + bl ov83_0223E138 + add r0, r4, #0 + bl ov83_0223E208 + mov r0, #0 + str r0, [r4, #0x30] + pop {r4, pc} + thumb_func_end ov83_0223DF10 + + thumb_func_start ov83_0223DF30 +ov83_0223DF30: ; 0x0223DF30 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x18] + add r2, r1, #0 + ldr r0, [r0, #4] + mov r1, #0 + bl sub_0200B70C + ldr r2, [r4, #0x18] + ldr r0, [r2, #4] + ldr r1, [r2, #8] + ldr r2, [r2, #0x10] + bl sub_0200C388 + ldr r0, [r4, #8] + mov r1, #0xf + bl sub_0201ADA4 + ldr r1, [r4, #0x18] + mov r2, #0 + ldr r0, [r4, #8] + ldr r1, [r1, #8] + add r3, r2, #0 + bl ov83_0223E21C + mov r1, #0 + ldr r0, [r4, #8] + mov r2, #1 + add r3, r1, #0 + bl sub_0200E060 + pop {r4, pc} + thumb_func_end ov83_0223DF30 + + thumb_func_start ov83_0223DF70 +ov83_0223DF70: ; 0x0223DF70 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0201ACF4 + ldr r0, [r4, #4] + mov r1, #4 + bl sub_02019EBC + pop {r4, pc} + thumb_func_end ov83_0223DF70 + + thumb_func_start ov83_0223DF84 +ov83_0223DF84: ; 0x0223DF84 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + mov r1, #0xf + bl sub_0201ADA4 + ldr r1, [r4, #0x18] + mov r2, #0 + ldr r0, [r4, #8] + ldr r1, [r1, #0xc] + add r3, r2, #0 + bl ov83_0223E21C + mov r1, #0 + ldr r0, [r4, #8] + mov r2, #1 + add r3, r1, #0 + bl sub_0200E060 + pop {r4, pc} + thumb_func_end ov83_0223DF84 + + thumb_func_start ov83_0223DFAC +ov83_0223DFAC: ; 0x0223DFAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0x14] + cmp r0, #1 + beq _0223E098 + mov r4, #0 + cmp r0, #0 + ble _0223E08A +_0223DFBE: + lsr r2, r4, #0x1f + lsl r1, r4, #0x1f + sub r1, r1, r2 + mov r0, #0x1f + ror r1, r0 + add r1, r2, r1 + add r2, r4, r2 + asr r2, r2, #1 + mov r0, #0xc + add r6, r1, #0 + mul r6, r0 + lsl r0, r2, #2 + add r2, r2, r0 + str r2, [sp, #0x1c] + mov r2, #0xa + str r2, [sp] + mov r2, #4 + str r2, [sp, #4] + ldr r2, [r5, #0x2c] + lsl r0, r0, #0x18 + add r2, #0xc + str r2, [sp, #8] + mov r2, #0xa + mul r2, r1 + lsl r1, r2, #0x18 + lsr r1, r1, #0x18 + str r1, [sp, #0xc] + lsr r0, r0, #0x18 + ldr r3, [sp, #0x1c] + str r0, [sp, #0x10] + mov r0, #0x14 + str r0, [sp, #0x14] + mov r0, #8 + add r2, r6, #5 + add r3, #0xd + str r0, [sp, #0x18] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r5, #4] + mov r1, #5 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + mov r0, #0xa + ldr r3, [sp, #0x1c] + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #2 + add r2, r6, #5 + add r3, #0xd + str r0, [sp, #8] + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r5, #4] + mov r1, #5 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_02019E2C + ldr r7, [r5, #0x1c] + mov r2, #0x13 + ldr r0, [r5, #0x18] + add r3, r7, r4 + lsl r2, r2, #4 + ldrb r2, [r3, r2] + ldr r0, [r0, #4] + mov r1, #0 + lsl r2, r2, #2 + add r3, r7, r2 + mov r2, #0x4d + lsl r2, r2, #2 + ldr r2, [r3, r2] + bl sub_0200B498 + ldr r2, [r5, #0x18] + ldr r0, [r2, #4] + ldr r1, [r2, #8] + ldr r2, [r2, #0x14] + bl sub_0200C388 + ldr r1, [r5, #0x18] + lsl r0, r6, #3 + ldr r1, [r1, #8] + add r0, #0x20 + mov r2, #1 + bl ov83_0223D6A8 + ldr r1, [r5, #0x18] + ldr r3, [sp, #0x1c] + add r2, r0, #0 + lsl r3, r3, #3 + ldr r0, [r5, #0xc] + ldr r1, [r1, #8] + add r3, #8 + bl ov83_0223E21C + ldr r0, [r5, #0x14] + add r4, r4, #1 + cmp r4, r0 + blt _0223DFBE +_0223E08A: + ldr r0, [r5, #0xc] + bl sub_0201A9A4 + ldr r0, [r5, #4] + mov r1, #5 + bl sub_0201C3C0 +_0223E098: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223DFAC + + thumb_func_start ov83_0223E09C +ov83_0223E09C: ; 0x0223E09C + push {r4, r5, lr} + sub sp, #0x14 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl sub_0201A778 + str r0, [r5, #8] + add r0, r4, #0 + mov r1, #1 + bl sub_0201A778 + str r0, [r5, #0xc] + mov r0, #0x13 + str r0, [sp] + mov r0, #0x17 + str r0, [sp, #4] + mov r2, #4 + str r2, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r5, #4] + ldr r1, [r5, #8] + add r3, r2, #0 + bl sub_0201A7E8 + mov r0, #0xd + str r0, [sp] + mov r0, #0x14 + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + mov r0, #0x1f + str r0, [sp, #0x10] + ldr r0, [r5, #4] + ldr r1, [r5, #0xc] + mov r2, #4 + mov r3, #6 + bl sub_0201A7E8 + ldr r0, [r5, #8] + mov r1, #0xf + bl sub_0201ADA4 + ldr r0, [r5, #0xc] + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [r5, #0x10] + mov r1, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + str r4, [sp, #4] + ldr r0, [r5, #4] + mov r2, #1 + mov r3, #0 + bl sub_0200DD0C + mov r0, #4 + mov r1, #0x20 + add r2, r4, #0 + bl sub_02002E98 + mov r1, #1 + ldr r0, [r5, #8] + add r2, r1, #0 + mov r3, #0 + bl sub_0200E060 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E09C + + thumb_func_start ov83_0223E138 +ov83_0223E138: ; 0x0223E138 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + bl sub_0201A8FC + ldr r0, [r4, #8] + mov r1, #1 + bl sub_0201A928 + ldr r0, [r4, #0xc] + bl sub_0201A8FC + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_0201A928 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E138 + + thumb_func_start ov83_0223E15C +ov83_0223E15C: ; 0x0223E15C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r2, #0 + mov r3, #0x40 + add r5, r0, #0 + add r4, r1, #0 + str r3, [sp] + add r0, r6, #0 + mov r1, #1 + mov r2, #4 + str r4, [sp, #4] + bl sub_02007130 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r5, #4] + add r0, r6, #0 + mov r3, #5 + bl sub_020070E8 + ldr r0, [r5, #0x14] + cmp r0, #1 + bne _0223E194 + mov r1, #2 + b _0223E196 +_0223E194: + mov r1, #3 +_0223E196: + add r3, r5, #0 + str r4, [sp] + add r0, r6, #0 + mov r2, #0 + add r3, #0x24 + bl sub_020071D0 + str r0, [r5, #0x20] + ldr r2, [r5, #0x24] + mov r3, #0 + str r3, [sp] + ldrh r0, [r2] + mov r1, #5 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_020198C0 + ldr r1, [r5, #0x24] + mov r2, #0 + ldrh r0, [r1] + add r3, r2, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r1, #2] + mov r1, #5 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_02019E2C + add r3, r5, #0 + str r4, [sp] + add r0, r6, #0 + mov r1, #4 + mov r2, #0 + add r3, #0x2c + bl sub_020071D0 + str r0, [r5, #0x28] + ldr r0, [r5, #4] + mov r1, #5 + bl sub_0201C3C0 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E15C + + thumb_func_start ov83_0223E208 +ov83_0223E208: ; 0x0223E208 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + bl sub_020181C4 + ldr r0, [r4, #0x28] + bl sub_020181C4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E208 + + thumb_func_start ov83_0223E21C +ov83_0223E21C: ; 0x0223E21C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r1, #0 + add r4, r2, #0 + str r3, [sp] + mov r2, #0 + ldr r1, _0223E240 ; =0x0001020F + str r2, [sp, #4] + str r1, [sp, #8] + str r2, [sp, #0xc] + mov r1, #1 + add r2, r5, #0 + add r3, r4, #0 + bl sub_0201D78C + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223E240: .word 0x0001020F + thumb_func_end ov83_0223E21C + + thumb_func_start ov83_0223E244 +ov83_0223E244: ; 0x0223E244 + mov r1, #0 + strb r1, [r0] + strb r1, [r0, #1] + strb r1, [r0, #2] + strb r1, [r0, #3] + strb r1, [r0, #4] + strb r1, [r0, #5] + strb r1, [r0, #6] + strb r1, [r0, #7] + strb r1, [r0, #8] + strb r1, [r0, #9] + strb r1, [r0, #0xa] + strb r1, [r0, #0xb] + bx lr + thumb_func_end ov83_0223E244 + + thumb_func_start ov83_0223E260 +ov83_0223E260: ; 0x0223E260 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223E26E + bl sub_02022974 +_0223E26E: + mov r0, #0 + strb r0, [r4] + strb r0, [r4, #1] + strb r0, [r4, #2] + strb r0, [r4, #3] + strb r0, [r4, #4] + strb r0, [r4, #5] + strb r0, [r4, #6] + strb r0, [r4, #7] + strb r0, [r4, #8] + strb r0, [r4, #9] + strb r0, [r4, #0xa] + strb r0, [r4, #0xb] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E260 + + thumb_func_start ov83_0223E28C +ov83_0223E28C: ; 0x0223E28C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r1, #0 + ldr r3, [sp, #0x18] + mov r1, #0x38 + mul r1, r3 + add r1, r2, r1 + mov r2, #2 + mov r3, #6 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov83_0223D9A8 + str r0, [r4, #8] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #8] + ldr r1, [sp, #0x1c] + bl sub_02021D6C + mov r0, #1 + str r0, [r4, #0] + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov83_0223E28C + + thumb_func_start ov83_0223E2C8 +ov83_0223E2C8: ; 0x0223E2C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #1 + beq _0223E2D6 + bl sub_02022974 +_0223E2D6: + ldr r0, [r4, #8] + bl sub_02021BD4 + mov r0, #0 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E2C8 + + thumb_func_start ov83_0223E2E4 +ov83_0223E2E4: ; 0x0223E2E4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02021CC8 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E2E4 + + thumb_func_start ov83_0223E2FC +ov83_0223E2FC: ; 0x0223E2FC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #8] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x2a + lsl r0, r0, #0xe + str r0, [sp] + mov r0, #0xf + lsl r0, r0, #0xe + str r0, [sp, #4] + ldr r0, [r4, #8] + add r1, sp, #0 + bl sub_02021C50 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E2FC + + thumb_func_start ov83_0223E32C +ov83_0223E32C: ; 0x0223E32C + push {r3, lr} + ldr r0, [r0, #8] + bl sub_02021FD0 + cmp r0, #0 + bne _0223E33C + mov r0, #1 + pop {r3, pc} +_0223E33C: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov83_0223E32C + + thumb_func_start ov83_0223E340 +ov83_0223E340: ; 0x0223E340 + ldr r3, _0223E348 ; =sub_020D5124 + mov r1, #0 + mov r2, #0x78 + bx r3 + ; .align 2, 0 +_0223E348: .word sub_020D5124 + thumb_func_end ov83_0223E340 + + thumb_func_start ov83_0223E34C +ov83_0223E34C: ; 0x0223E34C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x74] + cmp r0, #0 + beq _0223E35A + bl sub_02022974 +_0223E35A: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x78 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E34C + + thumb_func_start ov83_0223E368 +ov83_0223E368: ; 0x0223E368 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r0, [sp, #8] + ldr r0, [r0, #0x74] + add r7, r2, #0 + str r1, [sp, #0xc] + str r3, [sp, #0x10] + cmp r0, #0 + beq _0223E37E + bl sub_02022974 +_0223E37E: + ldr r4, _0223E420 ; =0x02240418 + ldr r5, [sp, #8] + mov r6, #0 +_0223E384: + ldrb r1, [r4] + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x10] + add r2, r7, #0 + bl ov83_0223D6BC + add r6, r6, #1 + add r4, r4, #1 + stmia r5!, {r0} + cmp r6, #6 + blt _0223E384 + ldr r4, _0223E424 ; =0x02240438 + ldr r5, [sp, #8] + mov r6, #0 +_0223E3A0: + ldrb r1, [r4] + ldr r0, [sp, #0xc] + ldr r3, [sp, #0x10] + add r2, r7, #0 + bl ov83_0223D6EC + str r0, [r5, #0x18] + add r6, r6, #1 + add r4, r4, #1 + add r5, r5, #4 + cmp r6, #8 + blt _0223E3A0 + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, _0223E428 ; =0x02240428 + ldr r6, _0223E42C ; =0x02240430 + ldr r4, _0223E430 ; =0x02240440 + ldr r5, [sp, #8] + ldr r7, _0223E434 ; =0x02240420 + str r0, [sp, #0x18] +_0223E3C8: + ldrb r0, [r6] + str r0, [sp] + ldr r0, [sp, #0x18] + ldrb r0, [r0] + str r0, [sp, #4] + ldrb r1, [r7] + ldrb r3, [r4] + ldr r0, [sp, #0xc] + lsl r2, r1, #2 + ldr r1, [sp, #8] + ldr r1, [r1, r2] + ldr r2, [r5, #0x18] + bl ov83_0223D720 + str r0, [r5, #0x38] + ldrb r2, [r4] + mov r1, #0x80 + ldrb r3, [r6] + sub r1, r1, r2 + mov r2, #0x60 + sub r2, r2, r3 + lsl r1, r1, #0x10 + lsl r2, r2, #0x10 + asr r1, r1, #0x10 + asr r2, r2, #0x10 + bl sub_02015268 + ldr r0, [sp, #0x18] + add r6, r6, #1 + add r0, r0, #1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x14] + add r4, r4, #1 + add r0, r0, #1 + add r5, r5, #4 + add r7, r7, #1 + str r0, [sp, #0x14] + cmp r0, #8 + blt _0223E3C8 + ldr r0, [sp, #8] + mov r1, #1 + str r1, [r0, #0x74] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E420: .word 0x02240418 +_0223E424: .word 0x02240438 +_0223E428: .word 0x02240428 +_0223E42C: .word 0x02240430 +_0223E430: .word 0x02240440 +_0223E434: .word 0x02240420 + thumb_func_end ov83_0223E368 + + thumb_func_start ov83_0223E438 +ov83_0223E438: ; 0x0223E438 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0x74] + cmp r0, #1 + beq _0223E446 + bl sub_02022974 +_0223E446: + mov r4, #0 + add r5, r6, #0 +_0223E44A: + ldr r0, [r5, #0x38] + bl sub_02015238 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _0223E44A + mov r5, #0 + add r4, r6, #0 +_0223E45C: + ldr r0, [r4, #0] + bl sub_02015164 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #6 + blt _0223E45C + mov r5, #0 + add r4, r6, #0 +_0223E46E: + ldr r0, [r4, #0x18] + bl sub_020151D4 + add r5, r5, #1 + add r4, r4, #4 + cmp r5, #8 + blt _0223E46E + mov r0, #0 + str r0, [r6, #0x74] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E438 + + thumb_func_start ov83_0223E484 +ov83_0223E484: ; 0x0223E484 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #8 + blo _0223E494 + bl sub_02022974 +_0223E494: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, #0x38] + add r1, r6, #0 + bl sub_02015240 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E484 + + thumb_func_start ov83_0223E4A4 +ov83_0223E4A4: ; 0x0223E4A4 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #5 + add r5, #0x14 +_0223E4AE: + ldr r0, [r5, #0x38] + add r1, r6, #0 + bl sub_020152BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + ble _0223E4AE + pop {r4, r5, r6, pc} + thumb_func_end ov83_0223E4A4 + + thumb_func_start ov83_0223E4C0 +ov83_0223E4C0: ; 0x0223E4C0 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r4, #5 + add r5, #0x14 +_0223E4CA: + ldr r0, [r5, #0x38] + add r1, r6, #0 + add r2, r6, #0 + bl sub_02015270 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + ble _0223E4CA + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E4C0 + + thumb_func_start ov83_0223E4E0 +ov83_0223E4E0: ; 0x0223E4E0 + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + add r6, r2, #0 + cmp r4, #8 + blo _0223E4F0 + bl sub_02022974 +_0223E4F0: + lsl r0, r4, #2 + add r0, r5, r0 + lsl r1, r6, #0x18 + ldr r0, [r0, #0x38] + lsr r1, r1, #0x18 + bl sub_02015294 + pop {r4, r5, r6, pc} + thumb_func_end ov83_0223E4E0 + + thumb_func_start ov83_0223E500 +ov83_0223E500: ; 0x0223E500 + push {r3, lr} + mov r2, #1 + str r2, [r0, #0x6c] + mov r1, #0 + str r1, [r0, #0x70] + lsl r1, r2, #0xc + ldr r2, _0223E518 ; =0x00000FAE + add r0, #0x58 + mov r3, #4 + bl ov83_0223D9DC + pop {r3, pc} + ; .align 2, 0 +_0223E518: .word 0x00000FAE + thumb_func_end ov83_0223E500 + + thumb_func_start ov83_0223E51C +ov83_0223E51C: ; 0x0223E51C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x6c] + add r3, r1, #0 + cmp r0, #0 + beq _0223E52E + cmp r0, #1 + beq _0223E568 + b _0223E592 +_0223E52E: + ldr r0, [r5, #0x70] + cmp r0, #0 + bne _0223E54C + ldr r1, _0223E598 ; =0x02240448 + lsl r4, r3, #2 + ldr r2, _0223E59C ; =0x02240454 + ldr r1, [r1, r4] + ldr r2, [r2, r4] + ldr r4, _0223E5A0 ; =0x02240414 + add r0, r5, #0 + ldrb r3, [r4, r3] + add r0, #0x58 + bl ov83_0223D9DC + b _0223E562 +_0223E54C: + ldr r1, _0223E59C ; =0x02240454 + lsl r4, r3, #2 + ldr r2, _0223E598 ; =0x02240448 + ldr r1, [r1, r4] + ldr r2, [r2, r4] + ldr r4, _0223E5A0 ; =0x02240414 + add r0, r5, #0 + ldrb r3, [r4, r3] + add r0, #0x58 + bl ov83_0223D9DC +_0223E562: + ldr r0, [r5, #0x6c] + add r0, r0, #1 + str r0, [r5, #0x6c] +_0223E568: + add r0, r5, #0 + add r0, #0x58 + bl ov83_0223D9EC + add r7, r0, #0 + mov r6, #0 + add r4, r5, #0 +_0223E576: + ldr r1, [r5, #0x58] + ldr r0, [r4, #0x38] + add r2, r1, #0 + bl sub_02015270 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #2 + ble _0223E576 + cmp r7, #1 + bne _0223E596 + mov r0, #0 + str r0, [r5, #0x6c] + pop {r3, r4, r5, r6, r7, pc} +_0223E592: + bl sub_02022974 +_0223E596: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E598: .word 0x02240448 +_0223E59C: .word 0x02240454 +_0223E5A0: .word 0x02240414 + thumb_func_end ov83_0223E51C + + thumb_func_start ov83_0223E5A4 +ov83_0223E5A4: ; 0x0223E5A4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r2, #0 + mov r1, #0 + mov r2, #0x20 + add r5, r0, #0 + add r7, r3, #0 + bl sub_020D5124 + str r4, [r5, #0x14] + str r6, [r5, #0x18] + str r7, [r5, #0x1c] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E5A4 + + thumb_func_start ov83_0223E5C0 +ov83_0223E5C0: ; 0x0223E5C0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223E5CE + bl sub_02022974 +_0223E5CE: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x20 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E5C0 + + thumb_func_start ov83_0223E5DC +ov83_0223E5DC: ; 0x0223E5DC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + str r0, [sp, #0xc] + mov r0, #2 + lsl r0, r0, #0x12 + str r0, [sp, #0x14] + mov r0, #6 + add r6, r2, #0 + lsl r0, r0, #0x10 + ldr r5, [sp, #0xc] + str r1, [sp, #0x10] + add r7, r3, #0 + str r0, [sp, #0x18] + mov r4, #0 + add r6, #0x38 +_0223E5FA: + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, [sp, #0x10] + str r7, [sp, #8] + add r1, r6, #0 + mov r2, #0x80 + mov r3, #0x60 + bl ov83_0223D9A8 + str r0, [r5, #4] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r5, #4] + add r1, r4, #4 + bl sub_02021D6C + ldr r0, [r5, #4] + add r1, sp, #0x14 + bl sub_02021C50 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223E5FA + ldr r0, [sp, #0xc] + mov r1, #1 + str r1, [r0, #0] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E5DC + + thumb_func_start ov83_0223E63C +ov83_0223E63C: ; 0x0223E63C + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_0223E644: + ldr r0, [r5, #4] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223E644 + mov r0, #0 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + thumb_func_end ov83_0223E63C + + thumb_func_start ov83_0223E658 +ov83_0223E658: ; 0x0223E658 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r6, r0, #0 + ldr r7, [r6, #0x14] + ldr r0, [r6, #0x18] + add r7, #0x98 + mov r4, #0 + cmp r0, #0 + bls _0223E696 + add r5, r6, #0 +_0223E66C: + ldr r0, [r6, #0x14] + add r1, r0, r4 + mov r0, #0x13 + lsl r0, r0, #4 + ldrb r1, [r1, r0] + add r0, r7, r1 + ldrb r1, [r7, r1] + lsl r1, r1, #0xc + str r1, [sp] + ldrb r0, [r0, #4] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + ldr r0, [r5, #4] + bl sub_02021C50 + ldr r0, [r6, #0x18] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blo _0223E66C +_0223E696: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E658 + + thumb_func_start ov83_0223E69C +ov83_0223E69C: ; 0x0223E69C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x18] + mov r6, #0 + str r1, [sp] + cmp r0, #0 + bls _0223E6D2 + add r7, r5, #0 +_0223E6AC: + ldr r0, [r5, #0x14] + add r1, r0, r6 + mov r0, #0x13 + lsl r0, r0, #4 + ldrb r4, [r1, r0] + ldr r0, [r5, #0x1c] + bl ov83_0223D570 + cmp r4, r0 + beq _0223E6C8 + ldr r0, [r7, #4] + ldr r1, [sp] + bl sub_02021CAC +_0223E6C8: + ldr r0, [r5, #0x18] + add r6, r6, #1 + add r7, r7, #4 + cmp r6, r0 + blo _0223E6AC +_0223E6D2: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223E69C + + thumb_func_start ov83_0223E6D4 +ov83_0223E6D4: ; 0x0223E6D4 + push {r3, r4, r5, r6, r7, lr} + add r4, r1, #0 + add r6, r2, #0 + add r5, r0, #0 + mov r1, #0 + mov r2, #0x38 + add r7, r3, #0 + bl sub_020D5124 + str r6, [r5, #0x1c] + ldr r0, [sp, #0x1c] + str r4, [r5, #0x20] + str r0, [r5, #0] + ldr r0, [sp, #0x18] + str r7, [r5, #0x24] + str r0, [r5, #0x18] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E6D4 + + thumb_func_start ov83_0223E6F8 +ov83_0223E6F8: ; 0x0223E6F8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _0223E706 + bl sub_02022974 +_0223E706: + add r0, r4, #0 + bl ov83_0223E994 + add r0, r4, #0 + bl ov83_0223E9D0 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x38 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E6F8 + + thumb_func_start ov83_0223E720 +ov83_0223E720: ; 0x0223E720 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x28] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r0, #0 + beq _0223E734 + bl sub_02022974 +_0223E734: + add r0, r5, #0 + add r1, r6, #0 + str r4, [r5, #4] + bl ov83_0223E77C + add r0, r5, #0 + add r1, r6, #0 + add r2, r7, #0 + bl ov83_0223E844 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #1 + str r0, [r5, #0x28] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E720 + + thumb_func_start ov83_0223E760 +ov83_0223E760: ; 0x0223E760 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + cmp r0, #1 + beq _0223E76E + bl sub_02022974 +_0223E76E: + add r0, r4, #0 + bl ov83_0223E824 + mov r0, #0 + str r0, [r4, #0x28] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E760 + + thumb_func_start ov83_0223E77C +ov83_0223E77C: ; 0x0223E77C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r7, r0, #0 + ldr r0, [r7, #0x18] + str r1, [sp, #0x14] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + add r0, r1, #0 + str r0, [sp, #4] + ldr r0, [r7, #4] + mov r1, #2 + mov r2, #1 + mov r3, #0 + bl sub_0200DD0C + ldr r2, [sp, #0x14] + mov r0, #0 + mov r1, #0x40 + bl sub_02002E98 + mov r0, #0 + str r0, [sp] + ldr r0, [sp, #0x14] + mov r1, #2 + str r0, [sp, #4] + ldr r0, [r7, #4] + mov r2, #0x1f + mov r3, #1 + bl sub_0200DAA4 + ldr r2, [sp, #0x14] + mov r0, #0 + mov r1, #0x60 + bl sub_02002E7C + ldr r5, _0223E820 ; =0x022405C0 + mov r6, #0 + add r4, r7, #0 +_0223E7CA: + ldr r0, [sp, #0x14] + mov r1, #1 + bl sub_0201A778 + str r0, [r4, #8] + ldrh r0, [r5, #2] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r5, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r5, #6] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldrh r0, [r5, #8] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0xc] + ldrh r0, [r5, #0xa] + str r0, [sp, #0x10] + ldrh r3, [r5] + ldr r0, [r7, #4] + ldr r1, [r4, #8] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [r4, #8] + mov r1, #0 + bl sub_0201ADA4 + add r6, r6, #1 + add r4, r4, #4 + add r5, #0xc + cmp r6, #4 + blt _0223E7CA + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223E820: .word 0x022405C0 + thumb_func_end ov83_0223E77C + + thumb_func_start ov83_0223E824 +ov83_0223E824: ; 0x0223E824 + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r4, #0 + mov r6, #1 +_0223E82C: + ldr r0, [r5, #8] + bl sub_0201A8FC + ldr r0, [r5, #8] + add r1, r6, #0 + bl sub_0201A928 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223E82C + pop {r4, r5, r6, pc} + thumb_func_end ov83_0223E824 + + thumb_func_start ov83_0223E844 +ov83_0223E844: ; 0x0223E844 + push {r3, r4, r5, r6, lr} + sub sp, #0x14 + add r5, r0, #0 + add r6, r2, #0 + mov r0, #0x20 + add r4, r1, #0 + str r0, [sp] + add r0, r6, #0 + mov r1, #6 + mov r2, #0 + mov r3, #0x80 + str r4, [sp, #4] + bl sub_02007130 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r4, [sp, #0xc] + ldr r2, [r5, #4] + add r0, r6, #0 + mov r1, #5 + mov r3, #1 + bl sub_020070E8 + str r4, [sp] + add r0, r6, #0 + mov r1, #7 + mov r2, #0 + add r3, sp, #0x10 + bl sub_020071D0 + ldr r2, [sp, #0x10] + mov r3, #0 + str r3, [sp] + add r4, r0, #0 + ldrh r0, [r2] + mov r1, #1 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r2, #2] + add r2, #0xc + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_020198C0 + ldr r1, [sp, #0x10] + mov r2, #0 + ldrh r0, [r1] + add r3, r2, #0 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r1, #2] + mov r1, #1 + lsl r0, r0, #0x15 + lsr r0, r0, #0x18 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + ldr r0, [r5, #4] + bl sub_02019E2C + add r0, r4, #0 + bl sub_020181C4 + ldr r0, [r5, #4] + mov r1, #1 + bl sub_0201C3C0 + add sp, #0x14 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E844 + + thumb_func_start ov83_0223E8DC +ov83_0223E8DC: ; 0x0223E8DC + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0x30] + add r0, r0, #1 + str r0, [r4, #0x30] + cmp r0, #0x1e + blt _0223E906 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r5, #0 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x2c] +_0223E906: + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223E8DC + + thumb_func_start ov83_0223E908 +ov83_0223E908: ; 0x0223E908 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #0x2c] + add r5, r1, #0 + cmp r0, #0 + beq _0223E91A + bl sub_02022974 +_0223E91A: + mov r2, #1 + ldr r0, _0223E97C ; =ov83_0223E8DC + add r1, r4, #0 + lsl r2, r2, #0xa + bl sub_0200D9E8 + str r0, [r4, #0x2c] + mov r1, #0 + str r1, [r4, #0x30] + ldr r0, [r4, #8] + bl sub_0201ADA4 + ldr r1, [r4, #0x1c] + lsl r5, r5, #2 + add r1, r1, r5 + ldr r1, [r1, #0x38] + mov r0, #1 + mov r2, #0 + mov r3, #0x80 + bl sub_02002EEC + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + ldr r0, _0223E980 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #8] + add r2, r2, r5 + ldr r2, [r2, #0x38] + mov r1, #1 + bl sub_0201D78C + ldr r0, [r4, #8] + bl sub_0201A954 + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #4 + mov r1, #1 + bl sub_0201FF0C + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0223E97C: .word ov83_0223E8DC +_0223E980: .word 0x0001020F + thumb_func_end ov83_0223E908 + + thumb_func_start ov83_0223E984 +ov83_0223E984: ; 0x0223E984 + ldr r0, [r0, #0x2c] + cmp r0, #0 + bne _0223E98E + mov r0, #1 + bx lr +_0223E98E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223E984 + + thumb_func_start ov83_0223E994 +ov83_0223E994: ; 0x0223E994 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x2c] + cmp r0, #0 + beq _0223E9B8 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + ldr r0, [r4, #0x2c] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x2c] +_0223E9B8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223E994 + + thumb_func_start ov83_0223E9BC +ov83_0223E9BC: ; 0x0223E9BC + push {r4, lr} + add r4, r0, #0 + bl ov83_0223E9D0 + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_0200E7FC + str r0, [r4, #0x34] + pop {r4, pc} + thumb_func_end ov83_0223E9BC + + thumb_func_start ov83_0223E9D0 +ov83_0223E9D0: ; 0x0223E9D0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _0223E9E2 + bl sub_0200EBA0 + mov r0, #0 + str r0, [r4, #0x34] +_0223E9E2: + pop {r4, pc} + thumb_func_end ov83_0223E9D0 + + thumb_func_start ov83_0223E9E4 +ov83_0223E9E4: ; 0x0223E9E4 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0xc] + mov r1, #0xf + bl sub_0201ADA4 + ldr r1, [r4, #0x1c] + mov r0, #0 + ldr r1, [r1, #0x34] + add r2, r0, #0 + mov r3, #0xe0 + bl sub_02002EEC + mov r1, #0 + add r3, r0, #0 + str r1, [sp] + ldr r0, _0223EA68 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #0x34] + bl sub_0201D78C + ldr r0, [r4, #0xc] + mov r1, #0 + mov r2, #0x1f + mov r3, #1 + bl sub_0200DC48 + ldr r0, [r4, #0x10] + mov r1, #0xf + bl sub_0201ADA4 + mov r1, #0 + str r1, [sp] + ldr r0, _0223EA68 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0x10] + ldr r2, [r2, #0x64] + add r3, r1, #0 + bl sub_0201D78C + ldr r0, [r4, #0x10] + mov r1, #0 + mov r2, #0x1f + mov r3, #1 + bl sub_0200DC48 + ldr r0, [r4, #0xc] + bl sub_0201A9A4 + ldr r0, [r4, #0x10] + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0223EA68: .word 0x0001020F + thumb_func_end ov83_0223E9E4 + + thumb_func_start ov83_0223EA6C +ov83_0223EA6C: ; 0x0223EA6C + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + mov r0, #0x18 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EBD4 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #0x4c] + add r3, r1, #0 + bl sub_0201D78C + mov r3, #2 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [r4, #0x24] + ldr r0, [r4, #0x1c] + add r2, #0x66 + ldrb r2, [r2] + ldr r0, [r0, #4] + mov r1, #0 + bl sub_0200B60C + mov r3, #2 + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r2, [r4, #0x24] + ldr r0, [r4, #0x1c] + add r2, #0x67 + ldrb r2, [r2] + ldr r0, [r0, #4] + bl sub_0200B60C + mov r1, #2 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, [r4, #0x24] + ldr r0, [r4, #0x1c] + add r2, #0x68 + ldrb r2, [r2] + ldr r0, [r0, #4] + add r3, r1, #0 + bl sub_0200B60C + ldr r2, [r4, #0x1c] + ldr r0, [r2, #4] + ldr r1, [r2, #8] + ldr r2, [r2, #0x50] + bl sub_0200C388 + mov r0, #0x18 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EBD4 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #8] + mov r3, #0xa0 + bl sub_0201D78C + mov r0, #0x30 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EBD4 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #0x54] + add r3, r1, #0 + bl sub_0201D78C + mov r1, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0x1c] + ldr r2, [r4, #0x24] + ldr r0, [r0, #4] + ldr r2, [r2, #0x58] + mov r3, #4 + bl sub_0200B60C + ldr r0, [r4, #0x24] + ldr r0, [r0, #0x58] + cmp r0, #1 + bne _0223EB34 + mov r2, #3 + b _0223EB36 +_0223EB34: + mov r2, #5 +_0223EB36: + ldr r3, [r4, #0x1c] + lsl r2, r2, #2 + add r2, r3, r2 + ldr r0, [r3, #4] + ldr r1, [r3, #8] + ldr r2, [r2, #0x4c] + bl sub_0200C388 + mov r0, #0x30 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EBD4 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #8] + mov r3, #0xa0 + bl sub_0201D78C + mov r0, #0x44 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EBD4 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #0x5c] + add r3, r1, #0 + bl sub_0201D78C + mov r1, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0x1c] + ldr r2, [r4, #0x24] + ldr r0, [r0, #4] + ldr r2, [r2, #0x5c] + mov r3, #4 + bl sub_0200B60C + ldr r0, [r4, #0x24] + ldr r0, [r0, #0x5c] + cmp r0, #1 + bne _0223EB9C + mov r2, #3 + b _0223EB9E +_0223EB9C: + mov r2, #5 +_0223EB9E: + ldr r3, [r4, #0x1c] + lsl r2, r2, #2 + add r2, r3, r2 + ldr r0, [r3, #4] + ldr r1, [r3, #8] + ldr r2, [r2, #0x4c] + bl sub_0200C388 + mov r0, #0x44 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EBD4 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0xc] + ldr r2, [r2, #8] + mov r3, #0xa0 + bl sub_0201D78C + ldr r0, [r4, #0xc] + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, pc} + nop +_0223EBD4: .word 0x0001020F + thumb_func_end ov83_0223EA6C + + thumb_func_start ov83_0223EBD8 +ov83_0223EBD8: ; 0x0223EBD8 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r2, [r4, #0x24] + ldr r0, [r4, #0x1c] + add r2, #0x64 + ldrb r2, [r2] + ldr r0, [r0, #4] + mov r1, #3 + bl sub_0200BF74 + mov r3, #2 + str r3, [sp] + mov r1, #1 + str r1, [sp, #4] + ldr r2, [r4, #0x24] + ldr r0, [r4, #0x1c] + add r2, #0x65 + ldrb r2, [r2] + ldr r0, [r0, #4] + bl sub_0200B60C + mov r1, #2 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0x1c] + ldr r2, [r4, #0x20] + ldr r0, [r0, #4] + add r3, r1, #0 + bl sub_0200B60C + ldr r2, [r4, #0x1c] + ldr r0, [r2, #4] + ldr r1, [r2, #8] + ldr r2, [r2, #0x68] + bl sub_0200C388 + mov r0, #0x18 + str r0, [sp] + mov r1, #0 + ldr r0, _0223EC48 ; =0x0001020F + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, [r4, #0x1c] + ldr r0, [r4, #0x10] + ldr r2, [r2, #8] + mov r3, #0x10 + bl sub_0201D78C + ldr r0, [r4, #0x10] + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0223EC48: .word 0x0001020F + thumb_func_end ov83_0223EBD8 + + thumb_func_start ov83_0223EC4C +ov83_0223EC4C: ; 0x0223EC4C + push {r3, lr} + cmp r1, #0 + beq _0223EC5C + cmp r1, #1 + beq _0223EC62 + cmp r1, #2 + beq _0223EC68 + pop {r3, pc} +_0223EC5C: + bl ov83_0223E9E4 + pop {r3, pc} +_0223EC62: + bl ov83_0223EA6C + pop {r3, pc} +_0223EC68: + bl ov83_0223EBD8 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov83_0223EC4C + + thumb_func_start ov83_0223EC70 +ov83_0223EC70: ; 0x0223EC70 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + mov r1, #2 + bl sub_02019EBC + ldr r0, [r4, #0xc] + bl sub_0201ACF4 + ldr r0, [r4, #0x10] + bl sub_0201ACF4 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223EC70 + + thumb_func_start ov83_0223EC8C +ov83_0223EC8C: ; 0x0223EC8C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + add r6, r1, #0 + bl ov83_0223E9D0 + ldr r0, [r4, #0x14] + mov r1, #0xf + bl sub_0201ADA4 + cmp r6, #6 + bhi _0223ED0C + add r0, r6, r6 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223ECB0: ; jump table + .short _0223ECBE - _0223ECB0 - 2 ; case 0 + .short _0223ECEA - _0223ECB0 - 2 ; case 1 + .short _0223ECF0 - _0223ECB0 - 2 ; case 2 + .short _0223ECF6 - _0223ECB0 - 2 ; case 3 + .short _0223ECFC - _0223ECB0 - 2 ; case 4 + .short _0223ED02 - _0223ECB0 - 2 ; case 5 + .short _0223ED08 - _0223ECB0 - 2 ; case 6 +_0223ECBE: + mov r3, #0x51 + ldr r2, [r4, #0x24] + lsl r3, r3, #2 + ldrb r5, [r2, r3] + ldr r0, [r4, #0x1c] + sub r3, #0x10 + lsl r5, r5, #2 + add r2, r2, r5 + ldr r0, [r0, #4] + ldr r2, [r2, r3] + mov r1, #0 + bl sub_0200B498 + ldr r2, [r4, #0x1c] + ldr r0, [r2, #4] + ldr r1, [r2, #8] + ldr r2, [r2, #0x18] + bl sub_0200C388 + ldr r0, [r4, #0x1c] + ldr r5, [r0, #8] + b _0223ED0C +_0223ECEA: + ldr r0, [r4, #0x1c] + ldr r5, [r0, #0x1c] + b _0223ED0C +_0223ECF0: + ldr r0, [r4, #0x1c] + ldr r5, [r0, #0x28] + b _0223ED0C +_0223ECF6: + ldr r0, [r4, #0x1c] + ldr r5, [r0, #0x24] + b _0223ED0C +_0223ECFC: + ldr r0, [r4, #0x1c] + ldr r5, [r0, #0x20] + b _0223ED0C +_0223ED02: + ldr r0, [r4, #0x1c] + ldr r5, [r0, #0x2c] + b _0223ED0C +_0223ED08: + ldr r0, [r4, #0x1c] + ldr r5, [r0, #0xc] +_0223ED0C: + mov r3, #0 + str r3, [sp] + ldr r0, _0223ED38 ; =0x0001020F + str r3, [sp, #4] + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r4, #0x14] + mov r1, #1 + add r2, r5, #0 + bl sub_0201D78C + mov r1, #0 + ldr r0, [r4, #0x14] + mov r2, #1 + add r3, r1, #0 + bl sub_0200E060 + ldr r0, [r4, #0x14] + bl sub_0201A9A4 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223ED38: .word 0x0001020F + thumb_func_end ov83_0223EC8C + + thumb_func_start ov83_0223ED3C +ov83_0223ED3C: ; 0x0223ED3C + ldr r3, _0223ED44 ; =sub_020D5124 + mov r1, #0 + ldr r2, _0223ED48 ; =0x00000414 + bx r3 + ; .align 2, 0 +_0223ED44: .word sub_020D5124 +_0223ED48: .word 0x00000414 + thumb_func_end ov83_0223ED3C + + thumb_func_start ov83_0223ED4C +ov83_0223ED4C: ; 0x0223ED4C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223ED5A + bl sub_02022974 +_0223ED5A: + ldr r2, _0223ED68 ; =0x00000414 + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + pop {r4, pc} + nop +_0223ED68: .word 0x00000414 + thumb_func_end ov83_0223ED4C + + thumb_func_start ov83_0223ED6C +ov83_0223ED6C: ; 0x0223ED6C + str r1, [r0, #4] + str r2, [r0, #8] + str r3, [r0, #0xc] + mov r1, #1 + str r1, [r0, #0] + bx lr + thumb_func_end ov83_0223ED6C + + thumb_func_start ov83_0223ED78 +ov83_0223ED78: ; 0x0223ED78 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r5, r7, #0 + mov r6, #0 + add r4, r7, #0 + add r5, #0x10 +_0223ED84: + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223ED94 + add r0, r5, #0 + bl ov83_0223F054 +_0223ED94: + add r6, r6, #1 + add r4, #0x80 + add r5, #0x80 + cmp r6, #8 + blt _0223ED84 + mov r0, #0 + str r0, [r7, #0] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223ED78 + + thumb_func_start ov83_0223EDA4 +ov83_0223EDA4: ; 0x0223EDA4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r5, #0 + add r7, r1, #0 + mov r6, #0 + add r4, #0x10 +_0223EDB0: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223EDCE + add r0, r4, #0 + bl ov83_0223F074 + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _0223EDCE + add r0, r4, #0 + add r1, r7, #0 + bl ov83_0223F0F4 +_0223EDCE: + add r6, r6, #1 + add r5, #0x80 + add r4, #0x80 + cmp r6, #8 + blt _0223EDB0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223EDA4 + + thumb_func_start ov83_0223EDDC +ov83_0223EDDC: ; 0x0223EDDC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0xb8 + add r5, r0, #0 + lsl r0, r1, #1 + add r0, r1, r0 + add r2, r2, r0 + mov r0, #0x1c + add r1, r2, #0 + mul r1, r0 + ldr r0, _0223EFC0 ; =0x022404B0 + add r3, sp, #0x9c + add r4, r0, r1 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + cmp r2, #8 + str r0, [r3, #0] + blt _0223EE0A + b _0223EFBC +_0223EE0A: + add r0, r5, #0 + bl ov83_0223EFF4 + str r0, [sp, #0x60] + cmp r0, #0 + bne _0223EE2C + add r0, r5, #0 + bl ov83_0223F018 + str r0, [sp, #0x60] + cmp r0, #0 + bne _0223EE26 + bl sub_02022974 +_0223EE26: + ldr r0, [sp, #0x60] + bl ov83_0223F054 +_0223EE2C: + bl sub_0201D35C + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + bl sub_0201D35C + add r1, sp, #0x9c + ldrb r1, [r1, #0x11] + bl sub_020E2178 + add r0, sp, #0x9c + ldrb r0, [r0, #0x10] + add r4, r0, r1 + bl sub_0201D35C + add r1, sp, #0x9c + ldrb r1, [r1, #0x13] + bl sub_020E2178 + add r0, sp, #0x9c + ldrb r0, [r0, #0x12] + add r0, r0, r1 + add r0, r0, r4 + asr r1, r6, #4 + lsl r2, r1, #1 + lsl r0, r0, #0xc + str r0, [sp, #0x6c] + asr r0, r0, #0x1f + lsl r3, r2, #1 + ldr r1, _0223EFC4 ; =0x020F983C + str r0, [sp, #0x70] + ldr r0, [sp, #0xa8] + ldrsh r6, [r1, r3] + lsl r3, r4, #0xc + add r2, r2, #1 + str r3, [sp, #0x64] + asr r3, r3, #0x1f + lsl r2, r2, #1 + str r0, [sp, #0x74] + asr r0, r0, #0x1f + str r3, [sp, #0x68] + ldrsh r4, [r1, r2] + str r0, [sp, #0x78] + bl sub_0201D35C + ldr r1, [sp, #0xa0] + bl sub_020E2178 + ldr r0, [sp, #0x9c] + ldr r2, [sp, #0x64] + add r0, r0, r1 + str r0, [sp, #0x5c] + asr r0, r6, #0x1f + str r0, [sp, #0x7c] + ldr r1, [sp, #0x7c] + ldr r3, [sp, #0x68] + add r0, r6, #0 + asr r7, r4, #0x1f + bl sub_020E1F1C + str r1, [sp, #0x58] + str r0, [sp, #0x80] + ldr r1, [sp, #0x7c] + ldr r2, [sp, #0x6c] + ldr r3, [sp, #0x70] + add r0, r6, #0 + bl sub_020E1F1C + str r1, [sp, #0x50] + str r0, [sp, #0x84] + ldr r1, [sp, #0x7c] + ldr r2, [sp, #0x74] + ldr r3, [sp, #0x78] + add r0, r6, #0 + bl sub_020E1F1C + str r0, [sp, #0x88] + str r1, [sp, #0x98] + ldr r2, [sp, #0x64] + ldr r3, [sp, #0x68] + add r0, r4, #0 + add r1, r7, #0 + bl sub_020E1F1C + str r0, [sp, #0x8c] + str r1, [sp, #0x48] + ldr r2, [sp, #0x6c] + ldr r3, [sp, #0x70] + add r0, r4, #0 + add r1, r7, #0 + bl sub_020E1F1C + str r0, [sp, #0x90] + str r1, [sp, #0x40] + ldr r2, [sp, #0x74] + ldr r3, [sp, #0x78] + add r0, r4, #0 + add r1, r7, #0 + bl sub_020E1F1C + add r2, r0, #0 + mov r4, #2 + ldr r0, [sp, #0x88] + ldr r3, [sp, #0x98] + mov r6, #0 + lsl r4, r4, #0xa + add r0, r0, r4 + adc r3, r6 + str r3, [sp, #0x98] + lsl r3, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r3 + str r0, [sp] + ldr r0, [sp, #0x8c] + ldr r3, [sp, #0x48] + add r0, r0, r4 + adc r3, r6 + str r3, [sp, #0x48] + mov r7, #6 + lsl r3, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r3 + lsl r7, r7, #0x10 + add r0, r0, r7 + str r0, [sp, #4] + ldr r0, [sp, #0x90] + ldr r3, [sp, #0x40] + add r0, r0, r4 + adc r3, r6 + str r3, [sp, #0x40] + lsl r3, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r3 + add r0, r0, r7 + add r2, r2, r4 + adc r1, r6 + str r0, [sp, #8] + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [sp, #0xc] + ldr r0, _0223EFC8 ; =0x0000019A + add r2, sp, #0x9c + str r0, [sp, #0x10] + ldr r0, [sp, #0x5c] + mov r1, #0x38 + str r0, [sp, #0x14] + ldr r0, [sp, #0xa4] + str r0, [sp, #0x18] + ldrb r0, [r2, #0x18] + str r0, [sp, #0x1c] + ldrb r0, [r2, #0x14] + str r0, [sp, #0x20] + ldrb r3, [r2, #0x15] + ldr r0, [r5, #8] + mul r1, r3 + add r0, r0, r1 + str r0, [sp, #0x24] + ldrb r0, [r2, #0x16] + str r0, [sp, #0x28] + ldr r0, [r5, #4] + str r0, [sp, #0x2c] + ldr r0, [r5, #0xc] + str r0, [sp, #0x30] + ldrb r0, [r2, #0x19] + str r0, [sp, #0x34] + ldrb r0, [r2, #0x1a] + str r0, [sp, #0x38] + ldrb r1, [r2, #0x17] + ldr r2, [sp, #0x80] + ldr r0, [sp, #0x60] + add r3, r2, r4 + ldr r2, [sp, #0x58] + adc r2, r6 + str r2, [sp, #0x58] + lsl r2, r2, #0x14 + lsr r3, r3, #0xc + orr r3, r2 + lsl r2, r4, #8 + add r2, r3, r2 + ldr r3, [sp, #0x84] + add r7, r3, r4 + ldr r3, [sp, #0x50] + adc r3, r6 + str r3, [sp, #0x50] + lsl r3, r3, #0x14 + lsr r6, r7, #0xc + orr r6, r3 + lsl r3, r4, #8 + add r3, r6, r3 + bl ov83_0223F1C0 + mov r1, #0x41 + lsl r1, r1, #4 + ldr r2, [r5, r1] + ldr r0, [sp, #0x60] + str r2, [r0, #0x7c] + ldr r0, [r5, r1] + add r0, r0, #1 + str r0, [r5, r1] +_0223EFBC: + add sp, #0xb8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223EFC0: .word 0x022404B0 +_0223EFC4: .word 0x020F983C +_0223EFC8: .word 0x0000019A + thumb_func_end ov83_0223EDDC + + thumb_func_start ov83_0223EFCC +ov83_0223EFCC: ; 0x0223EFCC + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r5, #0 + mov r6, #0 + add r4, #0x10 +_0223EFD6: + add r0, r5, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0223EFE6 + add r0, r4, #0 + bl ov83_0223F268 +_0223EFE6: + add r6, r6, #1 + add r5, #0x80 + add r4, #0x80 + cmp r6, #8 + blt _0223EFD6 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223EFCC + + thumb_func_start ov83_0223EFF4 +ov83_0223EFF4: ; 0x0223EFF4 + mov r2, #0 + add r3, r0, #0 +_0223EFF8: + add r1, r3, #0 + add r1, #0x88 + ldr r1, [r1, #0] + cmp r1, #0 + bne _0223F00A + add r0, #0x10 + lsl r1, r2, #7 + add r0, r0, r1 + bx lr +_0223F00A: + add r2, r2, #1 + add r3, #0x80 + cmp r2, #8 + blt _0223EFF8 + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223EFF4 + + thumb_func_start ov83_0223F018 +ov83_0223F018: ; 0x0223F018 + push {r4, r5} + mov r2, #0 + add r3, r0, #0 + add r1, r2, #0 + add r3, #0x10 +_0223F022: + add r4, r0, #0 + add r4, #0x88 + ldr r4, [r4, #0] + cmp r4, #0 + beq _0223F042 + cmp r2, #0 + bne _0223F034 + add r2, r3, #0 + b _0223F042 +_0223F034: + add r4, r0, #0 + add r4, #0x8c + ldr r5, [r2, #0x7c] + ldr r4, [r4, #0] + cmp r5, r4 + ble _0223F042 + add r2, r3, #0 +_0223F042: + add r1, r1, #1 + add r0, #0x80 + add r3, #0x80 + cmp r1, #8 + blt _0223F022 + add r0, r2, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223F018 + + thumb_func_start ov83_0223F054 +ov83_0223F054: ; 0x0223F054 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x78] + cmp r0, #0 + bne _0223F062 + bl sub_02022974 +_0223F062: + ldr r0, [r4, #0x78] + bl sub_02021BD4 + add r0, r4, #0 + mov r1, #0 + mov r2, #0x80 + bl sub_020D5124 + pop {r4, pc} + thumb_func_end ov83_0223F054 + + thumb_func_start ov83_0223F074 +ov83_0223F074: ; 0x0223F074 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _0223F0C6 + add r0, r4, #0 + add r0, #0x30 + bl ov83_0223DA94 + str r0, [r4, #4] + add r0, r4, #0 + add r0, #0x48 + bl ov83_0223DA94 + add r0, r4, #0 + add r0, #0x60 + bl ov83_0223DA94 + ldr r0, [r4, #0x30] + add r1, r4, #0 + str r0, [r4, #0x14] + ldr r0, [r4, #0x48] + add r1, #0x14 + str r0, [r4, #0x18] + ldr r0, [r4, #0x78] + bl sub_02021C50 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0223F0C6 + ldr r0, [r4, #0x60] + add r1, r4, #0 + str r0, [r4, #0x20] + ldr r0, [r4, #0x60] + add r1, #0x20 + str r0, [r4, #0x24] + ldr r0, [r4, #0x60] + str r0, [r4, #0x28] + ldr r0, [r4, #0x78] + bl sub_02021C70 +_0223F0C6: + ldr r0, [r4, #8] + cmp r0, #0 + bne _0223F0DA + ldr r0, [r4, #0x78] + bl sub_02021FD0 + cmp r0, #0 + bne _0223F0DA + mov r0, #1 + str r0, [r4, #8] +_0223F0DA: + ldr r0, [r4, #0] + cmp r0, #0 + bne _0223F0F2 + ldr r0, [r4, #4] + cmp r0, #1 + bne _0223F0F2 + ldr r0, [r4, #8] + cmp r0, #1 + bne _0223F0F2 + add r0, r4, #0 + bl ov83_0223F054 +_0223F0F2: + pop {r4, pc} + thumb_func_end ov83_0223F074 + + thumb_func_start ov83_0223F0F4 +ov83_0223F0F4: ; 0x0223F0F4 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [r5, #4] + cmp r0, #1 + bne _0223F1B8 + ldr r0, [r5, #8] + cmp r0, #1 + bne _0223F1B8 + add r0, r1, #0 + add r0, #0xa4 + ldrb r0, [r0] + ldr r2, [r5, #0x2c] + cmp r0, #0 + bne _0223F11A + add r1, #0xa2 + ldrh r0, [r1] + add r0, r2, r0 + b _0223F120 +_0223F11A: + add r1, #0xa2 + ldrh r0, [r1] + sub r0, r2, r0 +_0223F120: + str r0, [r5, #0x2c] + mov r0, #2 + ldr r1, [r5, #0x14] + lsl r0, r0, #0x12 + sub r4, r1, r0 + mov r0, #6 + mov r2, #0 + ldr r1, [r5, #0x18] + lsl r0, r0, #0x10 + sub r6, r1, r0 + asr r0, r4, #0xc + asr r1, r6, #0xc + add r3, r2, #0 + bl sub_0201E3BC + add r7, r0, #0 + add r0, r6, #0 + add r1, r4, #0 + bl sub_020BDA20 + lsl r6, r7, #0xc + ldr r1, [r5, #0x2c] + asr r7, r6, #0x1f + add r0, r0, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + asr r0, r0, #4 + lsl r4, r0, #1 + add r0, r4, #1 + lsl r1, r0, #1 + ldr r0, _0223F1BC ; =0x020F983C + add r2, r6, #0 + ldrsh r0, [r0, r1] + add r3, r7, #0 + asr r1, r0, #0x1f + bl sub_020E1F1C + add r2, r0, #0 + mov r0, #2 + mov r3, #0 + lsl r0, r0, #0xa + add r0, r2, r0 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + str r0, [sp] + ldr r0, _0223F1BC ; =0x020F983C + lsl r1, r4, #1 + ldrsh r0, [r0, r1] + add r2, r6, #0 + add r3, r7, #0 + asr r1, r0, #0x1f + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r0, r0, r2 + adc r1, r3 + lsl r1, r1, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r3, [sp] + lsl r1, r2, #8 + add r1, r3, r1 + str r1, [sp] + mov r1, #6 + lsl r1, r1, #0x10 + str r0, [sp, #4] + add r0, r0, r1 + str r0, [sp, #4] + ldr r0, [r5, #0x78] + add r1, sp, #0 + bl sub_02021C50 +_0223F1B8: + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F1BC: .word 0x020F983C + thumb_func_end ov83_0223F0F4 + + thumb_func_start ov83_0223F1C0 +ov83_0223F1C0: ; 0x0223F1C0 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [sp, #0x40] + str r1, [r5, #0] + add r4, r2, #0 + str r0, [sp] + add r0, r5, #0 + add r2, r3, #0 + ldr r3, [sp, #0x20] + add r0, #0x30 + add r1, r4, #0 + ldr r6, [sp, #0x30] + bl ov83_0223DA34 + ldr r0, [sp, #0x40] + ldr r1, [sp, #0x24] + str r0, [sp] + add r0, r5, #0 + ldr r2, [sp, #0x28] + ldr r3, [sp, #0x2c] + add r0, #0x48 + bl ov83_0223DA34 + ldr r0, [sp, #0x40] + ldr r2, [sp, #0x34] + str r0, [sp] + add r0, r5, #0 + ldr r3, [sp, #0x38] + add r0, #0x60 + add r1, r6, #0 + bl ov83_0223DA34 + ldr r3, [sp, #0x24] + str r4, [r5, #0x14] + str r3, [r5, #0x18] + str r6, [r5, #0x20] + str r6, [r5, #0x24] + ldr r0, [sp, #0x3c] + str r6, [r5, #0x28] + str r0, [r5, #0xc] + ldr r0, [sp, #0x54] + ldr r1, [sp, #0x44] + str r0, [r5, #0x10] + mov r0, #0 + str r0, [sp] + add r0, sp, #0x58 + ldrb r0, [r0] + add r2, r4, #0 + str r0, [sp, #4] + ldr r0, [sp, #0x50] + str r0, [sp, #8] + ldr r0, [sp, #0x4c] + bl ov83_0223D9A8 + str r0, [r5, #0x78] + cmp r0, #0 + bne _0223F238 + bl sub_02022974 +_0223F238: + ldr r0, [r5, #0xc] + cmp r0, #0 + beq _0223F24A + add r1, r5, #0 + ldr r0, [r5, #0x78] + add r1, #0x20 + mov r2, #2 + bl sub_02021C80 +_0223F24A: + ldr r0, [r5, #0x78] + ldr r1, [sp, #0x48] + bl sub_02021D6C + ldr r0, [r5, #0x78] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r5, #0x78] + mov r1, #2 + bl sub_02021E80 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F1C0 + + thumb_func_start ov83_0223F268 +ov83_0223F268: ; 0x0223F268 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #1 + bne _0223F296 + mov r0, #8 + str r0, [sp] + add r0, r4, #0 + ldr r1, [r4, #0x60] + add r0, #0x60 + mov r2, #0xcd + mov r3, #0 + bl ov83_0223DA34 + mov r0, #0 + str r0, [r4, #0] + mov r0, #1 + str r0, [r4, #0xc] + ldr r0, [r4, #0x78] + mov r1, #2 + bl sub_02021CF8 +_0223F296: + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F268 + + thumb_func_start ov83_0223F29C +ov83_0223F29C: ; 0x0223F29C + ldr r3, _0223F2A4 ; =sub_020D5124 + mov r1, #0 + mov r2, #0x80 + bx r3 + ; .align 2, 0 +_0223F2A4: .word sub_020D5124 + thumb_func_end ov83_0223F29C + + thumb_func_start ov83_0223F2A8 +ov83_0223F2A8: ; 0x0223F2A8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x7c] + cmp r0, #0 + beq _0223F2B6 + bl sub_02022974 +_0223F2B6: + add r0, r4, #0 + mov r1, #0 + mov r2, #0x80 + bl sub_020D5124 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F2A8 + + thumb_func_start ov83_0223F2C4 +ov83_0223F2C4: ; 0x0223F2C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r6, r0, #0 + ldr r0, [r6, #0x7c] + add r7, r1, #0 + add r4, r3, #0 + str r2, [sp, #0x18] + cmp r0, #0 + beq _0223F2DA + bl sub_02022974 +_0223F2DA: + str r7, [r6, #0] + mov r0, #2 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x1f + str r0, [sp, #8] + mov r0, #0x1e + str r0, [sp, #0xc] + ldr r0, _0223F344 ; =0x00001B58 + add r1, r6, #4 + str r0, [sp, #0x10] + ldr r0, [sp, #0x18] + add r2, r4, #0 + str r0, [sp, #0x14] + add r0, r7, #0 + mov r3, #0x21 + bl ov83_0223D7A8 + mov r4, #0 + add r5, r6, #0 +_0223F304: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x18] + mov r2, #2 + mov r3, #6 + str r0, [sp, #8] + add r0, r7, #0 + add r1, r6, #4 + lsl r2, r2, #0x12 + lsl r3, r3, #0x10 + bl ov83_0223D9A8 + str r0, [r5, #0x3c] + cmp r4, #2 + blt _0223F32C + ldr r0, [r5, #0x3c] + mov r1, #1 + bl sub_02021D6C +_0223F32C: + ldr r0, [r5, #0x3c] + mov r1, #0 + bl sub_02021CAC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0223F304 + mov r0, #1 + str r0, [r6, #0x7c] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F344: .word 0x00001B58 + thumb_func_end ov83_0223F2C4 + + thumb_func_start ov83_0223F348 +ov83_0223F348: ; 0x0223F348 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, [r6, #0x7c] + cmp r0, #1 + beq _0223F356 + bl sub_02022974 +_0223F356: + mov r4, #0 + add r5, r6, #0 +_0223F35A: + ldr r0, [r5, #0x3c] + bl sub_02021BD4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0223F35A + ldr r0, [r6, #0] + add r1, r6, #4 + bl ov83_0223D95C + mov r0, #0 + str r0, [r6, #0x7c] + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F348 + + thumb_func_start ov83_0223F378 +ov83_0223F378: ; 0x0223F378 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0x3c +_0223F380: + cmp r4, #2 + beq _0223F388 + cmp r4, #0 + bne _0223F390 +_0223F388: + add r0, r5, #0 + bl ov83_0223F420 + b _0223F396 +_0223F390: + add r0, r5, #0 + bl ov83_0223F458 +_0223F396: + add r4, r4, #1 + add r5, #0x10 + cmp r4, #4 + blt _0223F380 + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223F378 + + thumb_func_start ov83_0223F3A0 +ov83_0223F3A0: ; 0x0223F3A0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #4 + blt _0223F3AE + bl sub_02022974 +_0223F3AE: + cmp r5, #2 + beq _0223F3B6 + cmp r5, #0 + bne _0223F3C2 +_0223F3B6: + add r4, #0x3c + lsl r0, r5, #4 + add r0, r4, r0 + bl ov83_0223F410 + pop {r3, r4, r5, pc} +_0223F3C2: + add r4, #0x3c + lsl r0, r5, #4 + add r0, r4, r0 + bl ov83_0223F44C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F3A0 + + thumb_func_start ov83_0223F3D0 +ov83_0223F3D0: ; 0x0223F3D0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #4 + blt _0223F3DE + bl sub_02022974 +_0223F3DE: + lsl r0, r5, #4 + mov r1, #0 + add r0, r4, r0 + str r1, [r0, #0x48] + ldr r0, [r0, #0x3c] + bl sub_02021CAC + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F3D0 + + thumb_func_start ov83_0223F3F0 +ov83_0223F3F0: ; 0x0223F3F0 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #4 + blt _0223F3FE + bl sub_02022974 +_0223F3FE: + lsl r0, r5, #4 + add r0, r4, r0 + ldr r0, [r0, #0x48] + cmp r0, #0 + bne _0223F40C + mov r0, #1 + pop {r3, r4, r5, pc} +_0223F40C: + mov r0, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223F3F0 + + thumb_func_start ov83_0223F410 +ov83_0223F410: ; 0x0223F410 + mov r1, #0 + str r1, [r0, #4] + mov r1, #3 + str r1, [r0, #8] + mov r1, #1 + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223F410 + + thumb_func_start ov83_0223F420 +ov83_0223F420: ; 0x0223F420 + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0xc] + cmp r1, #0 + beq _0223F448 + bl ov83_0223F458 + ldr r0, [r4, #4] + cmp r0, #0 + bne _0223F448 + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0 + bgt _0223F448 + mov r1, #0 + str r1, [r4, #0xc] + ldr r0, [r4, #0] + bl sub_02021CAC +_0223F448: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F420 + + thumb_func_start ov83_0223F44C +ov83_0223F44C: ; 0x0223F44C + mov r1, #0 + str r1, [r0, #4] + mov r1, #1 + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov83_0223F44C + + thumb_func_start ov83_0223F458 +ov83_0223F458: ; 0x0223F458 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0223F490 + ldr r0, [r4, #4] + cmp r0, #0 + bne _0223F472 + ldr r0, [r4, #0] + mov r1, #1 + bl sub_02021CAC + b _0223F48A +_0223F472: + cmp r0, #8 + bne _0223F480 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_02021CAC + b _0223F48A +_0223F480: + cmp r0, #0x10 + bne _0223F48A + mov r0, #0 + str r0, [r4, #4] + pop {r4, pc} +_0223F48A: + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] +_0223F490: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F458 + + thumb_func_start ov83_0223F494 +ov83_0223F494: ; 0x0223F494 + push {r3, r4, r5, lr} + ldr r2, _0223F4A8 ; =0x0000090C + add r4, r1, #0 + mov r1, #0 + add r5, r0, #0 + bl sub_020D5124 + str r4, [r5, #4] + pop {r3, r4, r5, pc} + nop +_0223F4A8: .word 0x0000090C + thumb_func_end ov83_0223F494 + + thumb_func_start ov83_0223F4AC +ov83_0223F4AC: ; 0x0223F4AC + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223F4BA + bl sub_02022974 +_0223F4BA: + ldr r2, _0223F4C8 ; =0x0000090C + add r0, r4, #0 + mov r1, #0 + bl sub_020D5124 + pop {r4, pc} + nop +_0223F4C8: .word 0x0000090C + thumb_func_end ov83_0223F4AC + + thumb_func_start ov83_0223F4CC +ov83_0223F4CC: ; 0x0223F4CC + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r6, r2, #0 + str r0, [sp, #0xc] + str r1, [sp, #0x10] + add r7, r3, #0 + mov r4, #0 + add r5, r0, #0 + add r6, #0x38 +_0223F4DE: + mov r0, #0 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r2, #0 + ldr r0, [sp, #0x10] + add r1, r6, #0 + add r3, r2, #0 + str r7, [sp, #8] + bl ov83_0223D9A8 + mov r1, #0 + str r0, [r5, #0x50] + bl sub_02021CAC + add r4, r4, #1 + add r5, #0x48 + cmp r4, #0x20 + blt _0223F4DE + ldr r0, [sp, #0xc] + mov r1, #1 + str r1, [r0, #0] + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F4CC + + thumb_func_start ov83_0223F510 +ov83_0223F510: ; 0x0223F510 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_0223F518: + ldr r0, [r5, #0x50] + bl sub_02021BD4 + add r4, r4, #1 + add r5, #0x48 + cmp r4, #0x20 + blt _0223F518 + mov r0, #0 + str r0, [r6, #0] + pop {r4, r5, r6, pc} + thumb_func_end ov83_0223F510 + + thumb_func_start ov83_0223F52C +ov83_0223F52C: ; 0x0223F52C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 + add r5, #0xc +_0223F534: + add r0, r5, #0 + bl ov83_0223F670 + add r4, r4, #1 + add r5, #0x48 + cmp r4, #0x20 + blt _0223F534 + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223F52C + + thumb_func_start ov83_0223F544 +ov83_0223F544: ; 0x0223F544 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r0, #0 + add r0, r1, #0 + str r1, [sp, #0x10] + add r1, r2, #0 + sub r0, #0x80 + sub r1, #0x60 + str r2, [sp, #0x14] + bl sub_020BDA20 + asr r0, r0, #4 + lsl r1, r0, #1 + add r0, r1, #1 + ldr r7, _0223F648 ; =0x020F983C + lsl r0, r0, #1 + ldrsh r3, [r7, r0] + asr r6, r3, #0x1f + lsr r2, r3, #0x10 + lsl r0, r6, #0x10 + orr r0, r2 + mov r2, #2 + lsl r5, r3, #0x10 + lsl r2, r2, #0xa + add r5, r5, r2 + ldr r2, _0223F64C ; =0x00000000 + adc r0, r2 + lsr r2, r5, #0xc + lsl r0, r0, #0x14 + str r2, [sp, #0x18] + orr r2, r0 + lsl r0, r1, #1 + str r2, [sp, #0x18] + ldrsh r2, [r7, r0] + asr r0, r2, #0x1f + mov ip, r0 + lsr r1, r2, #0x10 + lsl r0, r0, #0x10 + orr r0, r1 + mov r1, #2 + lsl r5, r2, #0x10 + lsl r1, r1, #0xa + add r1, r5, r1 + ldr r5, _0223F64C ; =0x00000000 + adc r0, r5 + lsr r7, r1, #0xc + lsl r0, r0, #0x14 + orr r7, r0 + lsr r0, r3, #0x14 + lsl r1, r6, #0xc + orr r1, r0 + mov r0, #2 + lsl r3, r3, #0xc + lsl r0, r0, #0xa + add r0, r3, r0 + ldr r3, _0223F64C ; =0x00000000 + adc r1, r3 + lsr r6, r0, #0xc + lsl r1, r1, #0x14 + orr r6, r1 + mov r1, ip + lsr r0, r2, #0x14 + lsl r1, r1, #0xc + orr r1, r0 + mov r0, #2 + lsl r2, r2, #0xc + lsl r0, r0, #0xa + add r2, r2, r0 + ldr r0, _0223F64C ; =0x00000000 + adc r1, r0 + lsl r0, r1, #0x14 + lsr r5, r2, #0xc + orr r5, r0 + add r0, r4, #0 + bl ov83_0223F650 + cmp r0, #0 + beq _0223F604 + mov r2, #2 + ldr r1, [sp, #0x18] + lsl r2, r2, #0x12 + add r1, r1, r2 + str r1, [sp] + mov r1, #6 + lsl r1, r1, #0x10 + add r1, r7, r1 + str r1, [sp, #4] + str r6, [sp, #8] + str r5, [sp, #0xc] + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + ldr r1, [r4, #8] + lsl r2, r2, #0xc + lsl r3, r3, #0xc + bl ov83_0223F6CC +_0223F604: + add r0, r4, #0 + bl ov83_0223F650 + cmp r0, #0 + beq _0223F636 + mov r2, #2 + ldr r1, [sp, #0x18] + lsl r2, r2, #0x12 + sub r1, r2, r1 + str r1, [sp] + mov r1, #6 + lsl r1, r1, #0x10 + sub r1, r1, r7 + str r1, [sp, #4] + neg r1, r6 + str r1, [sp, #8] + neg r1, r5 + ldr r2, [sp, #0x10] + ldr r3, [sp, #0x14] + str r1, [sp, #0xc] + ldr r1, [r4, #8] + lsl r2, r2, #0xc + lsl r3, r3, #0xc + bl ov83_0223F6CC +_0223F636: + ldr r0, [r4, #8] + ldr r1, [r4, #4] + add r0, r0, #1 + bl sub_020E1F6C + str r1, [r4, #8] + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223F648: .word 0x020F983C +_0223F64C: .word 0x00000000 + thumb_func_end ov83_0223F544 + + thumb_func_start ov83_0223F650 +ov83_0223F650: ; 0x0223F650 + mov r2, #0 + add r3, r0, #0 +_0223F654: + ldr r1, [r3, #0xc] + cmp r1, #0 + bne _0223F664 + mov r1, #0x48 + add r0, #0xc + mul r1, r2 + add r0, r0, r1 + bx lr +_0223F664: + add r2, r2, #1 + add r3, #0x48 + cmp r2, #0x20 + blt _0223F654 + mov r0, #0 + bx lr + thumb_func_end ov83_0223F650 + + thumb_func_start ov83_0223F670 +ov83_0223F670: ; 0x0223F670 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223F6B0 + ldr r0, [r4, #4] + cmp r0, #0 + bne _0223F6A4 + add r0, r4, #0 + add r0, #0x14 + bl ov83_0223DA94 + str r0, [r4, #4] + add r0, r4, #0 + add r0, #0x2c + bl ov83_0223DA94 + ldr r0, [r4, #0x14] + add r1, r4, #0 + str r0, [r4, #8] + ldr r0, [r4, #0x2c] + add r1, #8 + str r0, [r4, #0xc] + ldr r0, [r4, #0x44] + bl sub_02021C50 +_0223F6A4: + ldr r0, [r4, #4] + cmp r0, #1 + bne _0223F6B0 + add r0, r4, #0 + bl ov83_0223F6B4 +_0223F6B0: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F670 + + thumb_func_start ov83_0223F6B4 +ov83_0223F6B4: ; 0x0223F6B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0223F6CA + ldr r0, [r4, #0x44] + mov r1, #0 + bl sub_02021CAC + mov r0, #0 + str r0, [r4, #0] +_0223F6CA: + pop {r4, pc} + thumb_func_end ov83_0223F6B4 + + thumb_func_start ov83_0223F6CC +ov83_0223F6CC: ; 0x0223F6CC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0x10 + add r4, r2, #0 + add r6, r3, #0 + str r0, [sp] + add r0, r5, #0 + add r7, r1, #0 + ldr r2, [sp, #0x18] + ldr r3, [sp, #0x20] + add r0, #0x14 + add r1, r4, #0 + bl ov83_0223DA34 + mov r0, #0x10 + str r0, [sp] + add r0, r5, #0 + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x24] + add r0, #0x2c + add r1, r6, #0 + bl ov83_0223DA34 + str r4, [r5, #8] + str r6, [r5, #0xc] + ldr r0, [r5, #0x44] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r5, #0x44] + add r1, r7, #0 + bl sub_02021D6C + ldr r0, [r5, #0x44] + bl sub_02021DE0 + ldr r0, [r5, #0x44] + mov r1, #1 + bl sub_02021CC8 + ldr r0, [r5, #0x44] + mov r1, #2 + bl sub_02021E80 + mov r0, #1 + str r0, [r5, #0] + mov r0, #0 + str r0, [r5, #4] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F6CC + + thumb_func_start ov83_0223F730 +ov83_0223F730: ; 0x0223F730 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #2 + add r4, r1, #0 + str r0, [sp] + ldr r0, [sp, #0x28] + mov r1, #1 + add r6, r2, #0 + add r7, r3, #0 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02098FFC + str r0, [r5, #0] + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + lsl r2, r4, #0x10 + lsl r3, r6, #0x10 + ldr r0, [r5, #0] + add r1, r7, #0 + lsr r2, r2, #0x10 + lsr r3, r3, #0x10 + bl sub_0209916C + str r0, [r5, #4] + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F730 + + thumb_func_start ov83_0223F770 +ov83_0223F770: ; 0x0223F770 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r1, [r4, #4] + bl sub_02099370 + ldr r0, [r4, #0] + bl sub_0209903C + pop {r4, pc} + thumb_func_end ov83_0223F770 + + thumb_func_start ov83_0223F784 +ov83_0223F784: ; 0x0223F784 + ldr r3, _0223F78C ; =sub_02099160 + ldr r0, [r0, #0] + bx r3 + nop +_0223F78C: .word sub_02099160 + thumb_func_end ov83_0223F784 + + thumb_func_start ov83_0223F790 +ov83_0223F790: ; 0x0223F790 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r4, r2, #0 + bl sub_02015920 + str r0, [r5, #0] + str r4, [r5, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F790 + + thumb_func_start ov83_0223F7A4 +ov83_0223F7A4: ; 0x0223F7A4 + ldr r3, _0223F7AC ; =sub_02015938 + ldr r0, [r0, #0] + bx r3 + nop +_0223F7AC: .word sub_02015938 + thumb_func_end ov83_0223F7A4 + + thumb_func_start ov83_0223F7B0 +ov83_0223F7B0: ; 0x0223F7B0 + push {lr} + sub sp, #0x14 + ldr r1, [r0, #4] + mov r2, #0x18 + str r1, [sp] + mov r1, #2 + str r1, [sp, #4] + mov r1, #0xaf + str r1, [sp, #8] + mov r1, #5 + str r1, [sp, #0xc] + add r1, sp, #0 + strb r2, [r1, #0x10] + mov r2, #8 + strb r2, [r1, #0x11] + ldr r0, [r0, #0] + add r1, sp, #0 + bl sub_02015958 + add sp, #0x14 + pop {pc} + ; .align 2, 0 + thumb_func_end ov83_0223F7B0 + + thumb_func_start ov83_0223F7DC +ov83_0223F7DC: ; 0x0223F7DC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + bl sub_020159FC + add r4, r0, #0 + beq _0223F7F0 + ldr r0, [r5, #0] + bl sub_02015A54 +_0223F7F0: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223F7DC + + .rodata + + + .global Unk_ov83_02240414 +Unk_ov83_02240414: ; 0x02240414 + .incbin "incbin/overlay83_rodata.bin", 0x20C, 0x210 - 0x20C + + .global Unk_ov83_02240418 +Unk_ov83_02240418: ; 0x02240418 + .incbin "incbin/overlay83_rodata.bin", 0x210, 0x218 - 0x210 + + .global Unk_ov83_02240420 +Unk_ov83_02240420: ; 0x02240420 + .incbin "incbin/overlay83_rodata.bin", 0x218, 0x220 - 0x218 + + .global Unk_ov83_02240428 +Unk_ov83_02240428: ; 0x02240428 + .incbin "incbin/overlay83_rodata.bin", 0x220, 0x228 - 0x220 + + .global Unk_ov83_02240430 +Unk_ov83_02240430: ; 0x02240430 + .incbin "incbin/overlay83_rodata.bin", 0x228, 0x230 - 0x228 + + .global Unk_ov83_02240438 +Unk_ov83_02240438: ; 0x02240438 + .incbin "incbin/overlay83_rodata.bin", 0x230, 0x238 - 0x230 + + .global Unk_ov83_02240440 +Unk_ov83_02240440: ; 0x02240440 + .incbin "incbin/overlay83_rodata.bin", 0x238, 0x240 - 0x238 + + .global Unk_ov83_02240448 +Unk_ov83_02240448: ; 0x02240448 + .incbin "incbin/overlay83_rodata.bin", 0x240, 0x24C - 0x240 + + .global Unk_ov83_02240454 +Unk_ov83_02240454: ; 0x02240454 + .incbin "incbin/overlay83_rodata.bin", 0x24C, 0x258 - 0x24C + + .global Unk_ov83_02240460 +Unk_ov83_02240460: ; 0x02240460 + .incbin "incbin/overlay83_rodata.bin", 0x258, 0x2A8 - 0x258 + + .global Unk_ov83_022404B0 +Unk_ov83_022404B0: ; 0x022404B0 + .incbin "incbin/overlay83_rodata.bin", 0x2A8, 0xE0 + + + .data + + + .global Unk_ov83_022405C0 +Unk_ov83_022405C0: ; 0x022405C0 + .incbin "incbin/overlay83_data.bin", 0x0, 0x30 + diff --git a/asm/ov83_0223F7F4.s b/asm/ov83_0223F7F4.s new file mode 100644 index 000000000..1827d890d --- /dev/null +++ b/asm/ov83_0223F7F4.s @@ -0,0 +1,1471 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov83_0223F7F4 +ov83_0223F7F4: ; 0x0223F7F4 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r1, #0 + add r1, r3, #0 + ldr r3, [sp, #0x1c] + add r5, r0, #0 + ldr r6, [sp, #0x18] + add r0, r2, #0 + sub r4, r4, r3 + sub r1, r1, r3 + mov r3, #0 + str r3, [sp] + sub r2, r5, r6 + sub r0, r0, r6 + add r3, r4, #0 + bl sub_0201D4CC + mov r1, #0xa0 + mul r1, r0 + add r0, r1, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov83_0223F7F4 + + thumb_func_start ov83_0223F820 +ov83_0223F820: ; 0x0223F820 + add r3, r0, #0 + mov r2, #0x18 + mov r1, #0 +_0223F826: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _0223F826 + mov r2, #0x80 + str r2, [r0, #0] + mov r1, #0x60 + str r1, [r0, #4] + str r2, [r0, #8] + str r1, [r0, #0xc] + bx lr + thumb_func_end ov83_0223F820 + + thumb_func_start ov83_0223F83C +ov83_0223F83C: ; 0x0223F83C + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, _0223F888 ; =0x021BF6BC + ldrh r1, [r0, #0x22] + cmp r1, #0 + beq _0223F860 + ldrh r1, [r0, #0x1c] + str r1, [r4, #0] + ldrh r0, [r0, #0x1e] + str r0, [r4, #4] + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _0223F860 + ldr r0, [r4, #0] + str r0, [r4, #8] + ldr r0, [r4, #4] + str r0, [r4, #0xc] +_0223F860: + mov r0, #0x80 + str r0, [sp] + mov r0, #0x60 + str r0, [sp, #4] + ldr r0, [r4, #0] + ldr r1, [r4, #4] + ldr r2, [r4, #8] + ldr r3, [r4, #0xc] + bl ov83_0223F7F4 + str r0, [r4, #0x10] + ldr r0, [r4, #0] + str r0, [r4, #8] + ldr r0, [r4, #4] + str r0, [r4, #0xc] + ldr r0, _0223F888 ; =0x021BF6BC + ldrh r0, [r0, #0x22] + str r0, [r4, #0x14] + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_0223F888: .word 0x021BF6BC + thumb_func_end ov83_0223F83C + + thumb_func_start ov83_0223F88C +ov83_0223F88C: ; 0x0223F88C + ldr r2, [r1, #0] + strb r2, [r0] + ldr r2, [r1, #4] + strb r2, [r0, #1] + ldr r1, [r1, #0x10] + cmp r1, #0 + bge _0223F8A4 + neg r1, r1 + strh r1, [r0, #2] + mov r1, #1 + strb r1, [r0, #4] + bx lr +_0223F8A4: + strh r1, [r0, #2] + mov r1, #0 + strb r1, [r0, #4] + bx lr + thumb_func_end ov83_0223F88C + + thumb_func_start ov83_0223F8AC +ov83_0223F8AC: ; 0x0223F8AC + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + mov r2, #0x80 + mov r3, #0x60 + bl sub_0201E3BC + add r4, r0, #0 + ldr r0, [r5, #0xc] + cmp r0, #0 + bge _0223F8C6 + neg r0, r0 +_0223F8C6: + lsl r0, r0, #0x10 + ldr r1, [r5, #0] + lsr r0, r0, #0x10 + bl ov83_0223FB68 + asr r2, r0, #0x1f + lsl r3, r2, #0x12 + lsr r1, r0, #0xe + orr r3, r1 + mov r1, #2 + lsl r2, r0, #0x12 + mov r0, #0 + lsl r1, r1, #0xa + add r2, r2, r1 + adc r3, r0 + lsl r1, r3, #0x14 + lsr r2, r2, #0xc + orr r2, r1 + asr r1, r2, #0xc + cmp r4, #0x10 + bhs _0223F8F4 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223F8F4: + add r1, #8 + cmp r4, r1 + bls _0223F8FC + mov r0, #2 +_0223F8FC: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223F8AC + + thumb_func_start ov83_0223F900 +ov83_0223F900: ; 0x0223F900 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #1 + str r0, [r5, #0x10] + mov r0, #0 + add r4, r1, #0 + str r2, [sp] + str r3, [sp, #4] + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, r2, #0 + beq _0223F98C +_0223F91A: + ldr r0, [sp, #0xc] + add r1, r4, r0 + mov r0, #0x13 + lsl r0, r0, #4 + ldrb r1, [r1, r0] + mov r0, #0x1c + add r6, r1, #0 + mul r6, r0 + add r1, r4, r6 + add r2, r4, r6 + add r1, #0x90 + add r2, #0x91 + ldrb r1, [r1] + ldrb r2, [r2] + add r0, r5, #0 + bl ov83_0223F8AC + cmp r0, #0 + beq _0223F94A + cmp r0, #1 + beq _0223F952 + cmp r0, #2 + beq _0223F962 + b _0223F968 +_0223F94A: + add r0, r4, r6 + add r0, #0x92 + ldrh r7, [r0] + b _0223F968 +_0223F952: + add r0, r4, r6 + add r0, #0x92 + ldrh r0, [r0] + lsl r0, r0, #0xf + lsr r7, r0, #0x10 + mov r0, #0 + str r0, [r5, #0x10] + b _0223F968 +_0223F962: + mov r7, #0 + add r0, r7, #0 + str r0, [r5, #0x10] +_0223F968: + add r0, r4, r6 + add r0, #0x94 + ldrb r0, [r0] + cmp r0, #0 + bne _0223F97A + ldr r0, [sp, #8] + add r0, r0, r7 + str r0, [sp, #8] + b _0223F980 +_0223F97A: + ldr r0, [sp, #8] + sub r0, r0, r7 + str r0, [sp, #8] +_0223F980: + ldr r0, [sp, #0xc] + add r1, r0, #1 + ldr r0, [sp] + str r1, [sp, #0xc] + cmp r1, r0 + blo _0223F91A +_0223F98C: + ldr r0, [sp, #8] + ldr r1, [sp] + bl sub_020E1F6C + add r4, r0, #0 + ldr r1, [r5, #0] + ldr r0, _0223FA74 ; =0x02240590 + ldrb r0, [r0, r1] + mov r1, #0x33 + lsl r1, r1, #0xe + lsl r0, r0, #0xc + bl sub_020BCFD0 + add r2, r0, #0 + lsl r0, r4, #0xc + asr r1, r0, #0x1f + asr r3, r2, #0x1f + bl sub_020E1F1C + mov r4, #2 + mov r2, #0 + lsl r4, r4, #0xa + add r4, r0, r4 + adc r1, r2 + lsl r0, r1, #0x14 + lsr r1, r4, #0xc + orr r1, r0 + ldr r3, [r5, #0xc] + asr r0, r1, #0xc + add r0, r3, r0 + str r0, [r5, #0xc] + cmp r0, #0 + ble _0223F9E0 + ldr r1, [r5, #0] + lsl r3, r1, #1 + ldr r1, _0223FA78 ; =0x0224059C + ldrh r1, [r1, r3] + sub r0, r0, r1 + str r0, [r5, #0xc] + bpl _0223F9F4 + str r2, [r5, #0xc] + b _0223F9F4 +_0223F9E0: + bge _0223F9F4 + ldr r1, [r5, #0] + lsl r3, r1, #1 + ldr r1, _0223FA78 ; =0x0224059C + ldrh r1, [r1, r3] + add r0, r0, r1 + str r0, [r5, #0xc] + cmp r0, #0 + ble _0223F9F4 + str r2, [r5, #0xc] +_0223F9F4: + ldr r1, [r5, #0xc] + ldr r0, _0223FA7C ; =0x00000E38 + cmp r1, r0 + ble _0223FA00 + str r0, [r5, #0xc] + b _0223FA08 +_0223FA00: + ldr r0, _0223FA80 ; =0xFFFFF1C8 + cmp r1, r0 + bge _0223FA08 + str r0, [r5, #0xc] +_0223FA08: + ldr r0, [r5, #0xc] + mov r1, #0xa0 + ldr r4, [r5, #8] + bl sub_020E1F6C + add r1, r0, #0 + mov r0, #0x44 + bl sub_0201D580 + ldr r1, [r5, #8] + add r0, r1, r0 + str r0, [r5, #8] + ldr r0, [sp, #4] + cmp r0, #0 + bne _0223FA2C + ldr r0, [r5, #0xc] + cmp r0, #0 + bge _0223FA38 +_0223FA2C: + ldr r0, [sp, #4] + cmp r0, #1 + bne _0223FA68 + ldr r0, [r5, #0xc] + cmp r0, #0 + bge _0223FA68 +_0223FA38: + ldr r0, [sp, #4] + cmp r0, #0 + bne _0223FA54 + lsl r0, r4, #0x10 + lsr r1, r0, #0x10 + ldr r0, [r5, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r1, r0 + ble _0223FA68 + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] + b _0223FA68 +_0223FA54: + lsl r0, r4, #0x10 + lsr r1, r0, #0x10 + ldr r0, [r5, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + cmp r1, r0 + bge _0223FA68 + ldr r0, [r5, #4] + add r0, r0, #1 + str r0, [r5, #4] +_0223FA68: + ldr r0, [r5, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FA74: .word 0x02240590 +_0223FA78: .word 0x0224059C +_0223FA7C: .word 0x00000E38 +_0223FA80: .word 0xFFFFF1C8 + thumb_func_end ov83_0223F900 + + thumb_func_start ov83_0223FA84 +ov83_0223FA84: ; 0x0223FA84 + ldr r0, [r0, #8] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bx lr + thumb_func_end ov83_0223FA84 + + thumb_func_start ov83_0223FA8C +ov83_0223FA8C: ; 0x0223FA8C + ldr r0, [r0, #4] + bx lr + thumb_func_end ov83_0223FA8C + + thumb_func_start ov83_0223FA90 +ov83_0223FA90: ; 0x0223FA90 + push {r3, r4, r5, lr} + add r5, r1, #0 + add r4, r0, #0 + cmp r5, #3 + blt _0223FA9E + bl sub_02022974 +_0223FA9E: + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223FA90 + + thumb_func_start ov83_0223FAA8 +ov83_0223FAA8: ; 0x0223FAA8 + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov83_0223FAA8 + + thumb_func_start ov83_0223FAAC +ov83_0223FAAC: ; 0x0223FAAC + push {r4, r5, r6, lr} + add r5, r0, #0 + mov r0, #0 + str r0, [r5, #0x18] + add r4, r1, #0 + add r6, r2, #0 + str r0, [r5, #0x10] + add r0, r4, #0 + add r1, r6, #0 + bl ov83_0223FB30 + cmp r0, #0 + beq _0223FAEA + ldr r0, [r5, #0xc] + add r0, r0, #1 + str r0, [r5, #0xc] + cmp r0, #0x1e + blo _0223FAE4 + ldr r1, [r5, #4] + ldr r0, _0223FB2C ; =0x0000270F + cmp r1, r0 + bhs _0223FADC + add r0, r1, #1 + str r0, [r5, #4] +_0223FADC: + mov r0, #1 + str r0, [r5, #0x18] + mov r0, #0 + str r0, [r5, #0xc] +_0223FAE4: + mov r0, #0 + str r0, [r5, #0x14] + pop {r4, r5, r6, pc} +_0223FAEA: + add r0, r4, #0 + add r1, r6, #0 + bl ov83_0223FB50 + cmp r0, #0 + beq _0223FB26 + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + cmp r0, #0x5a + blo _0223FB2A + mov r0, #0 + str r0, [r5, #8] + ldr r0, [r5, #0x14] + cmp r0, #0 + bne _0223FB14 + mov r0, #2 + str r0, [r5, #0x10] + mov r0, #1 + str r0, [r5, #0x14] + pop {r4, r5, r6, pc} +_0223FB14: + mov r0, #1 + str r0, [r5, #0x10] + ldr r1, [r5, #0] + ldr r0, _0223FB2C ; =0x0000270F + cmp r1, r0 + bhs _0223FB2A + add r0, r1, #1 + str r0, [r5, #0] + pop {r4, r5, r6, pc} +_0223FB26: + mov r0, #0 + str r0, [r5, #0x14] +_0223FB2A: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223FB2C: .word 0x0000270F + thumb_func_end ov83_0223FAAC + + thumb_func_start ov83_0223FB30 +ov83_0223FB30: ; 0x0223FB30 + cmp r1, #2 + bne _0223FB38 + mov r0, #0 + bx lr +_0223FB38: + cmp r0, #0 + bge _0223FB3E + neg r0, r0 +_0223FB3E: + ldr r1, _0223FB4C ; =0x00000E38 + cmp r0, r1 + blt _0223FB48 + mov r0, #1 + bx lr +_0223FB48: + mov r0, #0 + bx lr + ; .align 2, 0 +_0223FB4C: .word 0x00000E38 + thumb_func_end ov83_0223FB30 + + thumb_func_start ov83_0223FB50 +ov83_0223FB50: ; 0x0223FB50 + cmp r0, #0 + bge _0223FB56 + neg r0, r0 +_0223FB56: + ldr r1, _0223FB64 ; =0x0000038E + cmp r0, r1 + bgt _0223FB60 + mov r0, #1 + bx lr +_0223FB60: + mov r0, #0 + bx lr + ; .align 2, 0 +_0223FB64: .word 0x0000038E + thumb_func_end ov83_0223FB50 + + thumb_func_start ov83_0223FB68 +ov83_0223FB68: ; 0x0223FB68 + push {r3, lr} + ldr r1, _0223FB9C ; =0x0000038E + sub r0, r0, r1 + bpl _0223FB72 + mov r0, #0 +_0223FB72: + lsl r2, r0, #0xc + asr r1, r2, #0x1f + lsr r0, r2, #0x16 + lsl r3, r1, #0xa + orr r3, r0 + mov r0, #2 + lsl r2, r2, #0xa + mov r1, #0 + lsl r0, r0, #0xa + add r0, r2, r0 + adc r3, r1 + lsl r1, r3, #0x14 + lsr r0, r0, #0xc + orr r0, r1 + ldr r1, _0223FBA0 ; =0x00AAA000 + bl sub_020BCFD0 + mov r1, #1 + lsl r1, r1, #0xc + add r0, r0, r1 + pop {r3, pc} + ; .align 2, 0 +_0223FB9C: .word 0x0000038E +_0223FBA0: .word 0x00AAA000 + thumb_func_end ov83_0223FB68 + + thumb_func_start ov83_0223FBA4 +ov83_0223FBA4: ; 0x0223FBA4 + add r3, r0, #0 + mov r2, #0x10 + mov r1, #0 +_0223FBAA: + strb r1, [r3] + add r3, r3, #1 + sub r2, r2, #1 + bne _0223FBAA + mov r1, #2 + str r1, [r0, #8] + sub r1, r1, #3 + str r1, [r0, #4] + bx lr + thumb_func_end ov83_0223FBA4 + + thumb_func_start ov83_0223FBBC +ov83_0223FBBC: ; 0x0223FBBC + push {r4, r5, r6, lr} + add r4, r1, #0 + add r5, r0, #0 + mov r1, #0 + str r1, [r5, #0xc] + add r1, r2, #0 + add r6, r3, #0 + bl ov83_0223FC3C + cmp r0, #1 + beq _0223FC34 + cmp r6, #1 + beq _0223FC34 + ldr r0, [r5, #4] + cmp r0, #0 + bge _0223FC2E + bl sub_0201D35C + mov r1, #5 + add r6, r0, #0 + bl sub_020E2178 + ldr r0, [r5, #8] + cmp r1, r0 + bhi _0223FBF4 + mov r1, #1 + str r1, [r5, #0xc] + b _0223FBFA +_0223FBF4: + mov r0, #1 + mov r1, #0 + str r0, [r5, #0xc] +_0223FBFA: + ldr r0, [r5, #0] + cmp r1, r0 + bne _0223FC18 + cmp r0, #1 + ldr r0, [r5, #8] + bne _0223FC0E + sub r0, r0, #1 + bmi _0223FC1E + str r0, [r5, #8] + b _0223FC1E +_0223FC0E: + add r0, r0, #1 + cmp r0, #5 + bge _0223FC1E + str r0, [r5, #8] + b _0223FC1E +_0223FC18: + str r1, [r5, #0] + mov r0, #2 + str r0, [r5, #8] +_0223FC1E: + add r0, r6, #0 + mov r1, #0x3c + bl sub_020E2178 + ldr r0, _0223FC38 ; =0x022405F0 + ldrb r0, [r0, r4] + add r0, r0, r1 + str r0, [r5, #4] +_0223FC2E: + ldr r0, [r5, #4] + sub r0, r0, #1 + str r0, [r5, #4] +_0223FC34: + pop {r4, r5, r6, pc} + nop +_0223FC38: .word 0x022405F0 + thumb_func_end ov83_0223FBBC + + thumb_func_start ov83_0223FC3C +ov83_0223FC3C: ; 0x0223FC3C + cmp r1, #0 + bge _0223FC46 + ldr r2, [r0, #0] + cmp r2, #0 + beq _0223FC50 +_0223FC46: + cmp r1, #0 + ble _0223FC54 + ldr r0, [r0, #0] + cmp r0, #1 + bne _0223FC54 +_0223FC50: + mov r0, #1 + bx lr +_0223FC54: + mov r0, #0 + bx lr + thumb_func_end ov83_0223FC3C + + thumb_func_start ov83_0223FC58 +ov83_0223FC58: ; 0x0223FC58 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r7, #0x1f + add r0, r1, #0 + str r1, [sp] + add r6, r7, #0 + bl ov83_0223FA8C + add r4, r0, #0 + ldr r0, [r5, #8] + cmp r0, #3 + blt _0223FC74 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223FC74: + mov r1, #0x96 + ldr r2, [r5, #0] + lsl r1, r1, #2 + cmp r2, r1 + beq _0223FC86 + ldr r1, _0223FCE4 ; =0x02240594 + ldrb r0, [r1, r0] + cmp r4, r0 + blt _0223FCA0 +_0223FC86: + ldr r0, [r5, #8] + mov r4, #0 + add r0, r0, #1 + str r0, [r5, #8] + str r4, [r5, #0] + ldr r1, [r5, #8] + cmp r1, #3 + blt _0223FC9A + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223FC9A: + ldr r0, [sp] + bl ov83_0223FA90 +_0223FCA0: + mov r0, #0x96 + ldr r1, [r5, #0] + lsl r0, r0, #2 + sub r1, r0, r1 + cmp r1, #0x3c + bgt _0223FCB8 + mov r0, #0x1f + mul r0, r1 + mov r1, #0x3c + bl sub_020E1F6C + add r7, r0, #0 +_0223FCB8: + ldr r1, [r5, #8] + ldr r0, _0223FCE4 ; =0x02240594 + ldrb r0, [r0, r1] + sub r1, r0, r4 + cmp r1, #5 + bgt _0223FCD0 + mov r0, #0x1f + mul r0, r1 + mov r1, #5 + bl sub_020E1F6C + add r6, r0, #0 +_0223FCD0: + cmp r7, r6 + bge _0223FCD8 + str r7, [r5, #4] + b _0223FCDA +_0223FCD8: + str r6, [r5, #4] +_0223FCDA: + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FCE4: .word 0x02240594 + thumb_func_end ov83_0223FC58 + + thumb_func_start ov83_0223FCE8 +ov83_0223FCE8: ; 0x0223FCE8 + push {r3, r4, r5, r6, r7, lr} + add r5, r1, #0 + mov r1, #0 + str r1, [r0, #0xc] + add r7, r5, #0 + add r4, r3, #0 + str r0, [sp] + ldr r1, [sp, #0x18] + add r0, r4, #0 + add r6, r2, #0 + add r7, #0x98 + bl ov83_0223FB50 + cmp r0, #1 + beq _0223FD18 + ldr r1, [sp, #0x18] + add r0, r4, #0 + bl ov83_0223FB30 + cmp r0, #1 + beq _0223FD18 + ldr r0, [sp, #0x1c] + cmp r0, #0 + bne _0223FD22 +_0223FD18: + ldr r0, [sp] + mov r1, #0 + str r1, [r0, #4] + str r1, [r0, #8] + pop {r3, r4, r5, r6, r7, pc} +_0223FD22: + cmp r6, #1 + bgt _0223FD30 + ldr r0, [sp] + mov r1, #0 + str r1, [r0, #4] + str r1, [r0, #8] + pop {r3, r4, r5, r6, r7, pc} +_0223FD30: + ldr r0, [sp, #0x20] + cmp r0, #1 + beq _0223FDAE + mov r0, #0 + cmp r6, #0 + ble _0223FD5E + mov r2, #0x96 + mov r4, #0x1c + lsl r2, r2, #2 +_0223FD42: + mov r1, #0x13 + add r3, r5, r0 + lsl r1, r1, #4 + ldrb r1, [r3, r1] + add r3, r1, #0 + mul r3, r4 + add r1, r5, r3 + add r1, #0x92 + ldrh r1, [r1] + cmp r1, r2 + bls _0223FDAE + add r0, r0, #1 + cmp r0, r6 + blt _0223FD42 +_0223FD5E: + mov r4, #1 + cmp r6, #1 + ble _0223FD8E +_0223FD64: + mov r0, #0x13 + add r1, r5, r4 + lsl r0, r0, #4 + ldrb r2, [r1, r0] + ldrb r0, [r7] + ldrb r1, [r7, #4] + add r3, r7, r2 + ldrb r2, [r7, r2] + ldrb r3, [r3, #4] + bl sub_0201E3BC + cmp r0, #0x20 + bls _0223FD88 + ldr r0, [sp] + mov r1, #0 + str r1, [r0, #4] + str r1, [r0, #8] + pop {r3, r4, r5, r6, r7, pc} +_0223FD88: + add r4, r4, #1 + cmp r4, r6 + blt _0223FD64 +_0223FD8E: + ldr r0, [sp] + ldr r0, [r0, #4] + cmp r0, #4 + bge _0223FD9E + add r1, r0, #1 + ldr r0, [sp] + str r1, [r0, #4] + pop {r3, r4, r5, r6, r7, pc} +_0223FD9E: + ldr r0, [sp] + mov r2, #1 + str r2, [r0, #0xc] + ldr r0, [r0, #0] + add r1, r0, #1 + ldr r0, [sp] + str r1, [r0, #0] + str r2, [r0, #8] +_0223FDAE: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov83_0223FCE8 + + thumb_func_start ov83_0223FDB0 +ov83_0223FDB0: ; 0x0223FDB0 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + mov r2, #0x68 + bl sub_020D5124 + add r0, r4, #0 + add r0, #0xc + bl ov83_0223FBA4 + mov r1, #0 + mov r0, #0x1f + str r0, [r4, #0x50] + add r4, #0xc + add r0, r4, #0 + add r2, r1, #0 + add r3, r1, #0 + bl ov83_0223FBBC + pop {r4, pc} + thumb_func_end ov83_0223FDB0 + + thumb_func_start ov83_0223FDD8 +ov83_0223FDD8: ; 0x0223FDD8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r1, #0 + add r1, r5, #0 + add r0, #0x4c + add r1, #0x1c + add r6, r2, #0 + bl ov83_0223FC58 + cmp r0, #1 + bne _0223FDF6 + add sp, #0xc + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_0223FDF6: + add r0, r5, #0 + ldr r3, [r5, #0xc] + add r0, #0x1c + add r1, r4, #0 + add r2, r6, #0 + bl ov83_0223F900 + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FAA8 + add r7, r0, #0 + add r0, r5, #0 + ldr r2, [r5, #0x54] + add r0, #0x30 + add r1, r7, #0 + bl ov83_0223FAAC + add r0, r5, #0 + add r0, #0xc + add r1, r7, #0 + bl ov83_0223FC3C + ldr r1, [r5, #0x54] + add r2, r6, #0 + str r1, [sp] + ldr r1, [r5, #0x2c] + add r3, r7, #0 + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x58 + add r1, r4, #0 + bl ov83_0223FCE8 + add r0, r5, #0 + ldr r1, [r5, #0x54] + ldr r3, [r5, #0x60] + add r0, #0xc + add r2, r7, #0 + bl ov83_0223FBBC + mov r0, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov83_0223FDD8 + + thumb_func_start ov83_0223FE50 +ov83_0223FE50: ; 0x0223FE50 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r4, #0xc + mov r2, #0 +_0223FE5A: + add r3, r1, #0 + add r3, #0x90 + ldrb r3, [r3] + add r0, r4, r2 + strb r3, [r4, r2] + add r3, r1, #0 + add r3, #0x91 + ldrb r3, [r3] + add r2, r2, #1 + add r1, #0x1c + strb r3, [r0, #4] + cmp r2, #4 + blt _0223FE5A + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FAA8 + cmp r0, #0 + blt _0223FE86 + strh r0, [r4, #0xa] + mov r0, #0 + b _0223FE8C +_0223FE86: + neg r0, r0 + strh r0, [r4, #0xa] + mov r0, #1 +_0223FE8C: + strb r0, [r4, #0xc] + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FA84 + strh r0, [r4, #8] + ldr r0, [r5, #0x40] + strb r0, [r4, #0x12] + ldr r0, [r5, #0x48] + strb r0, [r4, #0x13] + ldr r0, [r5, #0xc] + strb r0, [r4, #0x11] + ldr r0, [r5, #0x18] + strb r0, [r4, #0xe] + ldr r0, [r5, #0x54] + cmp r0, #3 + bge _0223FEB0 + b _0223FEB2 +_0223FEB0: + mov r0, #2 +_0223FEB2: + strb r0, [r4, #0xd] + ldr r0, [r5, #0x50] + strb r0, [r4, #0x10] + ldr r0, [r5, #0x64] + strb r0, [r4, #0xf] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223FE50 + + thumb_func_start ov83_0223FEC0 +ov83_0223FEC0: ; 0x0223FEC0 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r4, #0xc + mov r2, #0 +_0223FECA: + add r3, r1, #0 + add r3, #0x90 + ldrb r3, [r3] + add r0, r4, r2 + strb r3, [r4, r2] + add r3, r1, #0 + add r3, #0x91 + ldrb r3, [r3] + add r2, r2, #1 + add r1, #0x1c + strb r3, [r0, #4] + cmp r2, #4 + blt _0223FECA + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FAA8 + cmp r0, #0 + blt _0223FEF6 + strh r0, [r4, #0xa] + mov r0, #0 + b _0223FEFC +_0223FEF6: + neg r0, r0 + strh r0, [r4, #0xa] + mov r0, #1 +_0223FEFC: + strb r0, [r4, #0xc] + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FA84 + strh r0, [r4, #8] + ldr r0, [r5, #0x40] + cmp r0, #0 + beq _0223FF10 + strb r0, [r4, #0x12] +_0223FF10: + ldrb r0, [r4, #0x13] + cmp r0, #0 + bne _0223FF1A + ldr r0, [r5, #0x48] + strb r0, [r4, #0x13] +_0223FF1A: + ldr r0, [r5, #0x18] + cmp r0, #1 + bne _0223FF28 + ldr r0, [r5, #0xc] + strb r0, [r4, #0x11] + ldr r0, [r5, #0x18] + strb r0, [r4, #0xe] +_0223FF28: + ldr r0, [r5, #0x54] + cmp r0, #3 + bge _0223FF30 + b _0223FF32 +_0223FF30: + mov r0, #2 +_0223FF32: + strb r0, [r4, #0xd] + ldr r0, [r5, #0x50] + strb r0, [r4, #0x10] + ldrb r0, [r4, #0xf] + cmp r0, #0 + bne _0223FF42 + ldr r0, [r5, #0x64] + strb r0, [r4, #0xf] +_0223FF42: + pop {r3, r4, r5, pc} + thumb_func_end ov83_0223FEC0 + + thumb_func_start ov83_0223FF44 +ov83_0223FF44: ; 0x0223FF44 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + mov r3, #0 + mov r1, #0x80 + mov r0, #0x60 +_0223FF50: + add r2, r4, r3 + strb r1, [r4, r3] + add r3, r3, #1 + strb r0, [r2, #4] + cmp r3, #4 + blt _0223FF50 + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FAA8 + cmp r0, #0 + blt _0223FF6E + strh r0, [r4, #0xa] + mov r0, #0 + b _0223FF74 +_0223FF6E: + neg r0, r0 + strh r0, [r4, #0xa] + mov r0, #1 +_0223FF74: + strb r0, [r4, #0xc] + add r0, r5, #0 + add r0, #0x1c + bl ov83_0223FA84 + strh r0, [r4, #8] + ldr r0, [r5, #0x40] + strb r0, [r4, #0x12] + ldr r0, [r5, #0x48] + strb r0, [r4, #0x13] + ldr r0, [r5, #0xc] + strb r0, [r4, #0x11] + ldr r0, [r5, #0x18] + strb r0, [r4, #0xe] + ldr r0, [r5, #0x54] + strb r0, [r4, #0xd] + ldr r0, [r5, #0x50] + strb r0, [r4, #0x10] + ldr r0, [r5, #0x64] + strb r0, [r4, #0xf] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov83_0223FF44 + + thumb_func_start ov83_0223FFA0 +ov83_0223FFA0: ; 0x0223FFA0 + ldr r1, [r0, #0] + add r1, r1, #1 + str r1, [r0, #0] + bx lr + thumb_func_end ov83_0223FFA0 + + thumb_func_start ov83_0223FFA8 +ov83_0223FFA8: ; 0x0223FFA8 + push {r4, lr} + add r4, r1, #0 + mov r1, #6 + bl sub_020E2178 + ldr r1, _0223FFCC ; =0x02240597 + ldrb r1, [r1, r4] + mul r1, r0 + add r0, r1, #0 + mov r1, #0xa + bl sub_020E2178 + ldr r1, _0223FFD0 ; =0x0000270F + cmp r0, r1 + ble _0223FFC8 + add r0, r1, #0 +_0223FFC8: + pop {r4, pc} + nop +_0223FFCC: .word 0x02240597 +_0223FFD0: .word 0x0000270F + thumb_func_end ov83_0223FFA8 + + thumb_func_start ov83_0223FFD4 +ov83_0223FFD4: ; 0x0223FFD4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x60 + str r0, [sp] + ldr r0, [sp, #0x78] + str r1, [sp, #4] + str r0, [sp, #0x78] + add r0, r2, #0 + str r0, [sp, #0x24] + add r0, #0x34 + str r0, [sp, #0x24] + mov r1, #0 + add r0, sp, #0x4c + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [r0, #0xc] + str r1, [r0, #0x10] + add r0, r1, #0 + add r6, r3, #0 + str r2, [sp, #8] + str r1, [sp, #0x20] + str r0, [sp, #0x18] + str r0, [sp, #0x28] + cmp r6, #0 + bls _02240086 +_02240006: + ldr r1, [sp, #8] + ldr r0, [sp, #0x28] + add r1, r1, r0 + mov r0, #0x13 + lsl r0, r0, #4 + ldrb r0, [r1, r0] + ldr r1, [sp, #0x78] + lsl r4, r0, #2 + ldr r0, [sp, #0x24] + ldr r0, [r0, r4] + bl sub_020973C8 + mov r3, #0 + add r7, r0, #0 + add r2, r3, #0 + cmp r6, #0 + bls _02240048 + ldr r0, [sp, #0x24] + mov r5, #0x13 + ldr r4, [r0, r4] + lsl r5, r5, #4 +_02240030: + ldr r0, [sp, #8] + add r0, r0, r2 + ldrb r0, [r0, r5] + lsl r1, r0, #2 + ldr r0, [sp, #0x24] + ldr r0, [r0, r1] + cmp r4, r0 + bne _02240042 + add r3, r3, #1 +_02240042: + add r2, r2, #1 + cmp r2, r6 + blo _02240030 +_02240048: + ldr r0, [sp, #0x18] + cmp r3, r0 + ble _02240050 + str r3, [sp, #0x18] +_02240050: + mov r5, #0 + add r4, sp, #0x4c +_02240054: + add r0, r7, #0 + add r1, r5, #5 + bl sub_020973D4 + ldr r1, [r4, #0] + add r5, r5, #1 + add r0, r1, r0 + stmia r4!, {r0} + cmp r5, #5 + blt _02240054 + add r0, r7, #0 + mov r1, #0xa + bl sub_020973D4 + ldr r1, [sp, #0x20] + add r0, r1, r0 + str r0, [sp, #0x20] + add r0, r7, #0 + bl sub_020181C4 + ldr r0, [sp, #0x28] + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, r6 + blo _02240006 +_02240086: + ldr r0, [sp, #0x18] + cmp r0, #2 + blt _02240096 + cmp r6, #1 + bls _02240096 + mov r0, #1 + str r0, [sp, #0x14] + b _0224009A +_02240096: + mov r0, #0 + str r0, [sp, #0x14] +_0224009A: + ldr r0, [sp, #0x20] + add r1, r6, #0 + bl sub_020E2178 + sub r0, r0, r6 + mov r5, #0 + add r4, sp, #0x4c + str r0, [sp, #0x1c] + str r5, [sp, #0xc] + add r7, sp, #0x38 + str r4, [sp, #0x2c] +_022400B0: + ldr r0, [sp, #0xc] + mov r1, #5 + add r0, r0, #1 + bl sub_020E1F6C + lsl r2, r1, #2 + ldr r1, [sp, #0x2c] + ldr r0, [r4, #0] + ldr r1, [r1, r2] + sub r0, r0, r1 + str r0, [r7, #0] + bpl _022400CA + add r5, r5, #1 +_022400CA: + ldr r0, [sp, #0xc] + add r4, r4, #4 + add r0, r0, #1 + add r7, r7, #4 + str r0, [sp, #0xc] + cmp r0, #5 + blt _022400B0 + mov r2, #0 + add r1, sp, #0x38 +_022400DC: + ldr r0, [r1, #0] + add r2, r2, #1 + sub r0, r0, r5 + stmia r1!, {r0} + cmp r2, #5 + blt _022400DC + cmp r5, #4 + blt _022400F0 + mov r0, #1 + str r0, [sp, #0x14] +_022400F0: + ldr r1, [sp] + ldr r0, _022401A8 ; =0x001B7740 + ldr r1, [r1, #0] + bl sub_020E2178 + mov r1, #0xa + add r5, r0, #0 + bl sub_020E1F6C + cmp r1, #5 + blt _02240108 + add r5, #0xa +_02240108: + add r0, r5, #0 + mov r1, #0xa + mov r7, #0 + add r4, sp, #0x38 + bl sub_020E1F6C + str r0, [sp, #0x10] +_02240116: + ldr r0, [sp, #0x10] + ldr r1, [r4, #0] + add r5, r0, #0 + mul r5, r1 + add r0, r5, #0 + mov r1, #0x64 + bl sub_020E1F6C + cmp r1, #0x32 + blt _0224012C + add r5, #0x64 +_0224012C: + add r0, r5, #0 + mov r1, #0x64 + bl sub_020E1F6C + ldr r1, [sp] + ldr r2, [r1, #0x30] + ldr r1, [r1, #0x34] + add r1, r2, r1 + sub r0, r0, r1 + str r0, [r4, #0] + bpl _02240146 + mov r0, #0 + str r0, [r4, #0] +_02240146: + add r7, r7, #1 + add r4, r4, #4 + cmp r7, #5 + blt _02240116 + cmp r6, #1 + bls _02240168 + ldr r0, [sp] + add r1, r6, #0 + ldr r0, [r0, #0x58] + bl ov83_0223FFA8 + cmp r0, #0xa + ble _02240162 + mov r0, #0xa +_02240162: + ldr r1, [sp, #0x1c] + sub r0, r1, r0 + str r0, [sp, #0x1c] +_02240168: + ldr r0, [sp, #0x1c] + cmp r0, #0xf + bge _02240172 + mov r0, #0xf + str r0, [sp, #0x1c] +_02240172: + mov r3, #0 + add r1, sp, #0x38 + add r2, sp, #0x30 +_02240178: + ldr r0, [r1, #0] + add r3, r3, #1 + strb r0, [r2] + add r1, r1, #4 + add r2, r2, #1 + cmp r3, #5 + blt _02240178 + ldr r2, [sp, #0x1c] + ldr r0, [sp, #4] + lsl r2, r2, #0x18 + ldr r3, [sp, #0x14] + add r1, sp, #0x30 + lsr r2, r2, #0x18 + bl sub_0202A9E4 + ldr r1, [sp] + str r0, [r1, #4] + ldr r0, [sp, #4] + bl sub_0202AABC + ldr r1, [sp] + str r0, [r1, #8] + add sp, #0x60 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022401A8: .word 0x001B7740 + thumb_func_end ov83_0223FFD4 + + thumb_func_start ov83_022401AC +ov83_022401AC: ; 0x022401AC + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0x34] + add r4, r1, #0 + str r0, [r1, #0x20] + ldr r0, [r5, #0x30] + add r4, #0x20 + str r0, [r4, #4] + ldr r0, [r5, #0x58] + add r1, r2, #0 + bl ov83_0223FFA8 + str r0, [r4, #8] + ldr r0, [r5, #4] + ldr r1, _02240204 ; =0x00000708 + strb r0, [r4, #0xc] + ldr r0, [r5, #8] + strb r0, [r4, #0xd] + ldr r5, [r5, #0] + add r0, r5, #0 + bl sub_020E1F6C + strb r0, [r4, #0xe] + ldrb r1, [r4, #0xe] + ldr r0, _02240204 ; =0x00000708 + mul r0, r1 + sub r5, r5, r0 + add r0, r5, #0 + mov r1, #0x1e + bl sub_020E1F6C + strb r0, [r4, #0xf] + ldrb r0, [r4, #0xf] + mov r1, #0x1e + add r2, r0, #0 + mul r2, r1 + sub r2, r5, r2 + mov r0, #0x64 + mul r0, r2 + bl sub_020E1F6C + strb r0, [r4, #0x10] + pop {r3, r4, r5, pc} + nop +_02240204: .word 0x00000708 + thumb_func_end ov83_022401AC + + .rodata + + + .global Unk_ov83_02240590 +Unk_ov83_02240590: ; 0x02240590 + .incbin "incbin/overlay83_rodata.bin", 0x388, 0x38C - 0x388 + + .global Unk_ov83_02240594 +Unk_ov83_02240594: ; 0x02240594 + .incbin "incbin/overlay83_rodata.bin", 0x38C, 0x390 - 0x38C + + .global Unk_ov83_02240598 +Unk_ov83_02240598: ; 0x02240598 + .incbin "incbin/overlay83_rodata.bin", 0x390, 0x394 - 0x390 + + .global Unk_ov83_0224059C +Unk_ov83_0224059C: ; 0x0224059C + .incbin "incbin/overlay83_rodata.bin", 0x394, 0x6 + + + .data + + + .global Unk_ov83_022405F0 +Unk_ov83_022405F0: ; 0x022405F0 + .incbin "incbin/overlay83_data.bin", 0x30, 0x3 + diff --git a/asm/overlay84.s b/asm/ov84_0223B5A0.s similarity index 66% rename from asm/overlay84.s rename to asm/ov84_0223B5A0.s index 1689f8fdf..3c8e4d69b 100644 --- a/asm/overlay84.s +++ b/asm/ov84_0223B5A0.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov84_0223B5A0 ov84_0223B5A0: ; 0x0223B5A0 push {r4, r5, lr} @@ -7433,3761 +7436,114 @@ _0223F038: .word 0x00000498 _0223F03C: .word 0x00000638 thumb_func_end ov84_0223EFD0 - thumb_func_start ov84_0223F040 -ov84_0223F040: ; 0x0223F040 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x11 - str r0, [sp, #4] - mov r0, #0x12 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r2, #2 - mov r3, #0xe - bl sub_0201A7E8 - mov r0, #0x12 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223F1BC ; =0x00000133 - add r1, r4, #0 - str r0, [sp, #0x10] - mov r2, #0 - ldr r0, [r4, #0] - add r1, #0x14 - add r3, r2, #0 - bl sub_0201A7E8 - mov r0, #0xd - str r0, [sp] - mov r0, #0x24 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, _0223F1C0 ; =0x000001F3 - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, #0x24 - mov r2, #2 - mov r3, #0 - bl sub_0201A7E8 - mov r0, #0x13 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r0, _0223F1C4 ; =0x0000025F - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, #0x34 - mov r2, #0 - mov r3, #6 - bl sub_0201A7E8 - mov r0, #0x13 - str r0, [sp] - mov r0, #0xd - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r0, _0223F1C4 ; =0x0000025F - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, #0x44 - mov r2, #0 - mov r3, #6 - bl sub_0201A7E8 - mov r0, #0xb - str r0, [sp] - mov r0, #0xc - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0223F1C8 ; =0x00000297 - add r1, r4, #0 - str r0, [sp, #0x10] - mov r2, #0 - ldr r0, [r4, #0] - add r1, #0x54 - add r3, r2, #0 - bl sub_0201A7E8 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r0, _0223F1CC ; =0x000002AF - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, #0x64 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - mov r0, #0xd - str r0, [sp] - mov r0, #0xc - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223F1D0 ; =0x00000337 - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, #0x74 - mov r2, #0 - mov r3, #0x13 - bl sub_0201A7E8 - mov r3, #1 - add r1, r4, #0 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223F1D4 ; =0x00000367 - add r1, #0x84 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - mov r2, #0 - bl sub_0201A7E8 - mov r0, #0x13 - str r0, [sp] - mov r0, #7 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223F1D8 ; =0x00000387 - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, #0x94 - mov r2, #0 - mov r3, #0x18 - bl sub_0201A7E8 - mov r0, #0xc - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223F1D8 ; =0x00000387 - mov r2, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r4, #0xa4 - add r1, r4, #0 - mov r3, #1 - bl sub_0201A7E8 - add sp, #0x14 - pop {r3, r4, pc} - nop -_0223F1BC: .word 0x00000133 -_0223F1C0: .word 0x000001F3 -_0223F1C4: .word 0x0000025F -_0223F1C8: .word 0x00000297 -_0223F1CC: .word 0x000002AF -_0223F1D0: .word 0x00000337 -_0223F1D4: .word 0x00000367 -_0223F1D8: .word 0x00000387 - thumb_func_end ov84_0223F040 - - thumb_func_start ov84_0223F1DC -ov84_0223F1DC: ; 0x0223F1DC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0223F1E2: - lsl r0, r4, #4 - add r0, r5, r0 - bl sub_0201A8FC - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0xb - blo _0223F1E2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov84_0223F1DC - - thumb_func_start ov84_0223F1F8 -ov84_0223F1F8: ; 0x0223F1F8 - push {r3, r4, r5, r6, r7, lr} - ldr r2, _0223F230 ; =0x0000018B - add r5, r0, #0 - mov r0, #1 - mov r1, #0x1a - mov r3, #6 - bl sub_0200B144 - ldr r7, _0223F234 ; =0x00000404 - add r6, r0, #0 - mov r4, #0 -_0223F20E: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0200B1EC - lsl r1, r4, #2 - add r1, r5, r1 - str r0, [r1, r7] - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #8 - blo _0223F20E - add r0, r6, #0 - bl sub_0200B190 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F230: .word 0x0000018B -_0223F234: .word 0x00000404 - thumb_func_end ov84_0223F1F8 - - thumb_func_start ov84_0223F238 -ov84_0223F238: ; 0x0223F238 - push {r4, r5, r6, lr} - ldr r6, _0223F258 ; =0x00000404 - add r5, r0, #0 - mov r4, #0 -_0223F240: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - bl sub_020237BC - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #8 - blo _0223F240 - pop {r4, r5, r6, pc} - nop -_0223F258: .word 0x00000404 - thumb_func_end ov84_0223F238 - - thumb_func_start ov84_0223F25C -ov84_0223F25C: ; 0x0223F25C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r4, #0 - mov r6, #0xd - mov r7, #1 -_0223F268: - str r6, [sp] - ldr r2, _0223F2B8 ; =0x000001FF - str r7, [sp, #4] - add r2, r4, r2 - lsl r2, r2, #0x10 - lsl r3, r4, #0x18 - str r7, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, [r5, #0] - mov r1, #2 - lsr r2, r2, #0x10 - lsr r3, r3, #0x18 - bl sub_02019CB8 - mov r0, #0xe - str r0, [sp] - mov r0, #1 - ldr r2, _0223F2BC ; =0x00000223 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #3 - add r2, r4, r2 - str r0, [sp, #0xc] - lsl r2, r2, #0x10 - lsl r3, r4, #0x18 - ldr r0, [r5, #0] - mov r1, #2 - lsr r2, r2, #0x10 - lsr r3, r3, #0x18 - bl sub_02019CB8 - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0xc - blo _0223F268 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F2B8: .word 0x000001FF -_0223F2BC: .word 0x00000223 - thumb_func_end ov84_0223F25C - - thumb_func_start ov84_0223F2C0 -ov84_0223F2C0: ; 0x0223F2C0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - add r4, r2, #0 - add r2, r0, #0 - add r6, r1, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F2F8 ; =0x00010200 - lsr r3, r3, #1 - add r5, #0x24 - str r0, [sp, #8] - mov r1, #0 - add r0, r5, #0 - add r2, r6, #0 - sub r3, r4, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223F2F8: .word 0x00010200 - thumb_func_end ov84_0223F2C0 - - thumb_func_start ov84_0223F2FC -ov84_0223F2FC: ; 0x0223F2FC - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r0, #0x24 - mov r1, #0 - bl sub_0201ADA4 - add r2, r4, #0 - add r2, #0xc4 - ldr r6, [r2, #0] - ldr r1, _0223F38C ; =0x00000429 - add r2, r6, #0 - add r2, #0x64 - ldrb r3, [r2] - mov r2, #0xc - add r0, r4, r1 - add r5, r3, #0 - mul r5, r2 - add r3, r6, r5 - ldrb r3, [r3, #0xc] - lsl r3, r3, #2 - add r5, r4, r3 - add r3, r1, #0 - sub r3, #0x25 - ldr r7, [r5, r3] - ldrb r3, [r0] - sub r1, #0x25 - add r5, r3, #0 - mul r5, r2 - add r3, r6, r5 - ldrb r3, [r3, #0xc] - lsl r3, r3, #2 - add r3, r4, r3 - ldr r1, [r3, r1] - ldrb r3, [r0, #1] - ldrb r0, [r0, #3] - cmp r3, #0 - bne _0223F35E - mul r2, r0 - add r2, #0x92 - lsl r0, r2, #0x10 - lsr r5, r0, #0x10 - add r2, r5, #0 - sub r2, #0x60 - lsl r2, r2, #0x10 - add r0, r4, #0 - lsr r2, r2, #0x10 - bl ov84_0223F2C0 - b _0223F376 -_0223F35E: - mul r2, r0 - mov r0, #0x92 - sub r0, r0, r2 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r2, r5, #0 - add r2, #0x60 - lsl r2, r2, #0x10 - add r0, r4, #0 - lsr r2, r2, #0x10 - bl ov84_0223F2C0 -_0223F376: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov84_0223F2C0 - add r4, #0x24 - add r0, r4, #0 - bl sub_0201ACCC - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F38C: .word 0x00000429 - thumb_func_end ov84_0223F2FC - - thumb_func_start ov84_0223F390 -ov84_0223F390: ; 0x0223F390 - push {r3, r4, r5, lr} - add r0, #0xd4 - ldr r0, [r0, #0] - add r5, r1, #0 - mov r1, #0x15 - mov r2, #6 - bl sub_02006CB8 - add r1, r5, #0 - add r4, r0, #0 - bl sub_020A7164 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov84_0223F390 - - thumb_func_start ov84_0223F3AC -ov84_0223F3AC: ; 0x0223F3AC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - add r1, sp, #0x18 - add r5, r0, #0 - add r6, r2, #0 - bl ov84_0223F390 - add r7, r0, #0 - cmp r6, #1 - bne _0223F3D8 - add r0, r5, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - mov r0, #0xc - mul r0, r4 - add r0, r1, r0 - ldrb r0, [r0, #0xc] - lsl r0, r0, #5 - add r0, #0x10 - lsl r0, r0, #0x18 - b _0223F3E8 -_0223F3D8: - add r0, r5, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - mov r0, #0xc - mul r0, r4 - add r0, r1, r0 - ldrb r0, [r0, #0xc] - lsl r0, r0, #0x1d -_0223F3E8: - lsr r2, r0, #0x18 - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0x10 - ldr r1, _0223F434 ; =0x00000427 - str r0, [sp, #4] - ldrb r0, [r5, r1] - add r1, r1, #1 - ldrb r1, [r5, r1] - add r3, r1, #0 - mul r3, r4 - add r0, r0, r3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #0xa - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - add r0, r5, #0 - ldr r1, [r1, #0x14] - add r0, #0x54 - mov r3, #0 - bl sub_0201ADDC - add r5, #0x54 - add r0, r5, #0 - bl sub_0201A9A4 - mov r0, #6 - add r1, r7, #0 - bl sub_02018238 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F434: .word 0x00000427 - thumb_func_end ov84_0223F3AC - - thumb_func_start ov84_0223F438 -ov84_0223F438: ; 0x0223F438 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - add r1, sp, #0x1c - bl ov84_0223F390 - str r0, [sp, #0x18] - add r0, r5, #0 - add r0, #0x54 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _0223F4E0 ; =0x00000424 - mov r4, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - bls _0223F4CC - mov r7, #1 - add r6, r5, #0 - lsl r7, r7, #8 - add r6, #0x54 -_0223F462: - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #0 - add r1, #0x64 - ldrb r1, [r1] - cmp r4, r1 - bne _0223F482 - mov r1, #0xc - mul r1, r4 - add r0, r0, r1 - ldrb r0, [r0, #0xc] - lsl r0, r0, #5 - add r0, #0x10 - lsl r0, r0, #0x18 - b _0223F48C -_0223F482: - mov r1, #0xc - mul r1, r4 - add r0, r0, r1 - ldrb r0, [r0, #0xc] - lsl r0, r0, #0x1d -_0223F48C: - lsr r2, r0, #0x18 - str r7, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _0223F4E4 ; =0x00000427 - ldrb r3, [r5, r0] - add r0, r0, #1 - ldrb r0, [r5, r0] - add r1, r0, #0 - mul r1, r4 - add r0, r3, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #0xa - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - add r0, r6, #0 - ldr r1, [r1, #0x14] - mov r3, #0 - bl sub_0201ADDC - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - ldr r0, _0223F4E0 ; =0x00000424 - ldrb r0, [r5, r0] - cmp r4, r0 - blo _0223F462 -_0223F4CC: - add r5, #0x54 - add r0, r5, #0 - bl sub_0201A9A4 - ldr r1, [sp, #0x18] - mov r0, #6 - bl sub_02018238 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F4E0: .word 0x00000424 -_0223F4E4: .word 0x00000427 - thumb_func_end ov84_0223F438 - - thumb_func_start ov84_0223F4E8 -ov84_0223F4E8: ; 0x0223F4E8 - push {r3, r4, r5, lr} - lsl r1, r1, #0x10 - add r4, r2, #0 - lsr r1, r1, #0x10 - mov r2, #0 - add r5, r0, #0 - bl ov84_0223BE5C - add r2, r0, #0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200B70C - pop {r3, r4, r5, pc} - thumb_func_end ov84_0223F4E8 - - thumb_func_start ov84_0223F508 -ov84_0223F508: ; 0x0223F508 - push {r3, r4, r5, lr} - lsl r1, r1, #0x10 - add r4, r2, #0 - lsr r1, r1, #0x10 - mov r2, #0 - add r5, r0, #0 - bl ov84_0223BE5C - add r2, r0, #0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200B77C - pop {r3, r4, r5, pc} - thumb_func_end ov84_0223F508 - - thumb_func_start ov84_0223F528 -ov84_0223F528: ; 0x0223F528 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _0223F57C ; =0x0000FFFF - add r6, r1, #0 - cmp r6, r0 - beq _0223F54A - mov r0, #0x82 - mov r1, #6 - bl sub_02023790 - add r1, r6, #0 - mov r2, #6 - add r4, r0, #0 - bl sub_0207CFC8 - b _0223F558 -_0223F54A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x5e - bl sub_0200B1EC - add r4, r0, #0 -_0223F558: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F580 ; =0x000F0E00 - add r5, #0x14 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r4, #0 - mov r3, #0x28 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223F57C: .word 0x0000FFFF -_0223F580: .word 0x000F0E00 - thumb_func_end ov84_0223F528 - - thumb_func_start ov84_0223F584 -ov84_0223F584: ; 0x0223F584 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r5, #0 - add r0, r1, #0 - add r4, #0x14 - bl sub_0207D268 - str r0, [sp, #0x10] - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x62 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x56 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x59 - bl sub_0200B1EC - add r6, r0, #0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r4, #0 - mov r3, #0x60 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x57 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x60 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x58 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x20 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x60 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x10] - mov r1, #0 - bl sub_020790DC - add r7, r0, #0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x5a - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - add r2, r7, #0 - mov r3, #2 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - mov r2, #0xfe - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r3, #0x30 - bl sub_0201D78C - ldr r0, [sp, #0x10] - mov r1, #2 - bl sub_020790C4 - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - cmp r7, #1 - bhi _0223F6FA - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x18 - bl sub_0200B1EC - b _0223F706 -_0223F6FA: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x5b - bl sub_0200B1EC -_0223F706: - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r7, #0 - mov r3, #3 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - mov r2, #0xfe - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r3, #0xa0 - bl sub_0201D78C - ldr r0, [sp, #0x10] - mov r1, #4 - bl sub_020790C4 - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - bne _0223F770 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x18 - bl sub_0200B1EC - b _0223F77C -_0223F770: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x5b - bl sub_0200B1EC -_0223F77C: - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r7, #0 - mov r3, #3 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x20 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F7D0 ; =0x000F0E00 - mov r2, #0xfe - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r3, #0xa0 - bl sub_0201D78C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223F7D0: .word 0x000F0E00 - thumb_func_end ov84_0223F584 - - thumb_func_start ov84_0223F7D4 -ov84_0223F7D4: ; 0x0223F7D4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x26 - bl sub_0200B1EC - mov r1, #0xff - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x25 - bl sub_0200B1EC - mov r1, #1 - lsl r1, r1, #0xa - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov84_0223F7D4 - - thumb_func_start ov84_0223F800 -ov84_0223F800: ; 0x0223F800 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xff - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020237BC - mov r0, #1 - lsl r0, r0, #0xa - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov84_0223F800 - - thumb_func_start ov84_0223F81C -ov84_0223F81C: ; 0x0223F81C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - str r1, [sp, #0x10] - add r0, #0xc4 - ldr r0, [r0, #0] - add r4, r2, #0 - add r1, r0, #0 - add r1, #0x64 - ldrb r2, [r1] - mov r1, #0xc - add r6, r3, #0 - mul r1, r2 - add r0, r0, r1 - ldrb r0, [r0, #0xc] - cmp r0, #3 - str r4, [sp] - bne _0223F858 - mov r2, #0xff - str r2, [sp, #4] - str r6, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r5, #4 - mov r3, #0x73 - bl sub_0201D78C - b _0223F86E -_0223F858: - mov r2, #0xff - str r2, [sp, #4] - str r6, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r5, #4 - mov r3, #0x6d - bl sub_0201D78C -_0223F86E: - mov r0, #0xa - mov r1, #6 - bl sub_02023790 - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [sp, #0x10] - mov r3, #3 - bl sub_0200B60C - mov r0, #0x46 - mov r2, #1 - lsl r0, r0, #2 - lsl r2, r2, #0xa - ldr r0, [r5, r0] - ldr r2, [r5, r2] - add r1, r7, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r4, #0x86 - str r6, [sp, #8] - mov r1, #0 - add r0, r5, #4 - add r2, r7, #0 - sub r3, r4, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov84_0223F81C - - thumb_func_start ov84_0223F8D0 -ov84_0223F8D0: ; 0x0223F8D0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r1, #0 - add r4, r2, #0 - add r5, r0, #0 - mov r0, #0x69 - ldrh r2, [r6] - lsl r0, r0, #2 - cmp r2, r0 - bhs _0223F91A - add r1, r0, #0 - sub r1, #0x5d - sub r1, r2, r1 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 - mov r1, #2 - str r1, [sp] - add r3, r5, #4 - str r3, [sp, #4] - mov r3, #0 - str r3, [sp, #8] - add r3, r4, #5 - str r3, [sp, #0xc] - sub r0, #0x94 - ldr r0, [r5, r0] - add r3, r1, #0 - bl sub_0200C648 - lsl r2, r4, #0x10 - ldrh r1, [r6, #2] - ldr r3, _0223F948 ; =0x00010200 - add r0, r5, #0 - lsr r2, r2, #0x10 - bl ov84_0223F81C - add sp, #0x10 - pop {r4, r5, r6, pc} -_0223F91A: - sub r1, r0, #1 - sub r1, r2, r1 - add r2, r5, #4 - str r2, [sp] - mov r2, #0x10 - str r2, [sp, #4] - add r2, r4, #5 - str r2, [sp, #8] - sub r0, #0x94 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - mov r2, #2 - mov r3, #1 - bl sub_0200C5BC - add r0, r5, #0 - add r1, r4, #0 - bl ov84_0223F9B0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223F948: .word 0x00010200 - thumb_func_end ov84_0223F8D0 - - thumb_func_start ov84_0223F94C -ov84_0223F94C: ; 0x0223F94C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - add r6, r2, #0 - bl sub_0207D344 - mov r1, #2 - add r2, r0, #0 - str r1, [sp] - add r0, r5, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r6, #5 - str r0, [sp, #0xc] - mov r0, #0x11 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r2, r2, #1 - add r3, r1, #0 - bl sub_0200C648 - lsl r2, r6, #0x10 - ldrh r1, [r4, #2] - ldr r3, _0223F990 ; =0x00010200 - add r0, r5, #0 - lsr r2, r2, #0x10 - bl ov84_0223F81C - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223F990: .word 0x00010200 - thumb_func_end ov84_0223F94C - - thumb_func_start ov84_0223F994 -ov84_0223F994: ; 0x0223F994 - push {r3, r4, r5, lr} - add r0, #0xd4 - ldr r0, [r0, #0] - add r5, r1, #0 - mov r1, #0x26 - mov r2, #6 - bl sub_02006CB8 - add r1, r5, #0 - add r4, r0, #0 - bl sub_020A7164 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov84_0223F994 - - thumb_func_start ov84_0223F9B0 -ov84_0223F9B0: ; 0x0223F9B0 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r4, r1, #0 - add r1, sp, #0x18 - add r5, r0, #0 - bl ov84_0223F994 - add r6, r0, #0 - mov r0, #0x40 - str r0, [sp] - mov r0, #0x10 - lsl r1, r4, #0x10 - str r0, [sp, #4] - mov r3, #0 - str r3, [sp, #8] - lsr r1, r1, #0x10 - str r1, [sp, #0xc] - mov r1, #0x18 - str r1, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - add r0, r5, #4 - ldr r1, [r1, #0x14] - mov r2, #0x28 - bl sub_0201ADDC - mov r0, #6 - add r1, r6, #0 - bl sub_02018238 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - thumb_func_end ov84_0223F9B0 - - thumb_func_start ov84_0223F9F0 -ov84_0223F9F0: ; 0x0223F9F0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x45 - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - mov r1, #0x29 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x88 - str r0, [sp] - mov r0, #0x10 - mov r1, #0 - lsl r3, r4, #0x10 - str r0, [sp, #4] - add r0, r5, #4 - add r2, r1, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - mov r1, #0 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223FA40 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223FA40: .word 0x00010200 - thumb_func_end ov84_0223F9F0 - - thumb_func_start ov84_0223FA44 -ov84_0223FA44: ; 0x0223FA44 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r4, r1, #0 - add r1, sp, #0x18 - add r5, r0, #0 - bl ov84_0223F994 - add r6, r0, #0 - mov r0, #0x40 - str r0, [sp] - mov r0, #0x10 - mov r2, #0 - str r0, [sp, #4] - mov r1, #0x60 - str r1, [sp, #8] - lsl r1, r4, #0x10 - lsr r1, r1, #0x10 - str r1, [sp, #0xc] - mov r1, #0x28 - str r1, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - add r0, r5, #4 - ldr r1, [r1, #0x14] - add r3, r2, #0 - bl sub_0201ADDC - mov r0, #6 - add r1, r6, #0 - bl sub_02018238 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov84_0223FA44 - - thumb_func_start ov84_0223FA88 -ov84_0223FA88: ; 0x0223FA88 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B1EC - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x10 - ldr r0, [r4, r1] - mov r1, #6 - bl sub_0200B1EC - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x14 - ldr r0, [r4, r1] - mov r1, #0x10 - bl sub_0200B1EC - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x18 - ldr r0, [r4, r1] - mov r1, #0x5f - bl sub_0200B1EC - mov r1, #0x13 - lsl r1, r1, #4 - str r0, [r4, r1] - sub r1, #0x1c - ldr r0, [r4, r1] - mov r1, #0x60 - bl sub_0200B1EC - mov r1, #0x4d - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x20 - ldr r0, [r4, r1] - mov r1, #1 - bl sub_0200B1EC - mov r1, #0x4e - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x24 - ldr r0, [r4, r1] - mov r1, #2 - bl sub_0200B1EC - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x28 - ldr r0, [r4, r1] - mov r1, #0x12 - bl sub_0200B1EC - mov r1, #5 - lsl r1, r1, #6 - str r0, [r4, r1] - sub r1, #0x2c - ldr r0, [r4, r1] - mov r1, #3 - bl sub_0200B1EC - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x30 - ldr r0, [r4, r1] - mov r1, #4 - bl sub_0200B1EC - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x34 - ldr r0, [r4, r1] - mov r1, #5 - bl sub_0200B1EC - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x38 - ldr r0, [r4, r1] - mov r1, #8 - bl sub_0200B1EC - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r4, r1] - pop {r4, pc} - thumb_func_end ov84_0223FA88 - - thumb_func_start ov84_0223FB50 -ov84_0223FB50: ; 0x0223FB50 - push {r4, r5, r6, lr} - mov r6, #0x49 - add r5, r0, #0 - mov r4, #0 - lsl r6, r6, #2 -_0223FB5A: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - bl sub_020237BC - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0xc - blo _0223FB5A - pop {r4, r5, r6, pc} - thumb_func_end ov84_0223FB50 - - thumb_func_start ov84_0223FB70 -ov84_0223FB70: ; 0x0223FB70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r6, r1, #0 - add r1, r0, #0 - add r1, #0x64 - add r7, r2, #0 - ldrb r2, [r1] - mov r1, #0xc - mul r1, r2 - add r0, r0, r1 - ldrb r0, [r0, #0xc] - cmp r0, #4 - bne _0223FBC0 - lsl r0, r7, #1 - mov r3, #0x17 - sub r1, r3, r0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #8 - lsl r0, r0, #0x18 - str r1, [sp, #4] - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223FD78 ; =0x00000337 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, #0xb4 - mov r2, #0 - bl sub_0201A7E8 - mov r0, #4 - str r0, [sp, #0x14] - b _0223FBF0 -_0223FBC0: - lsl r0, r7, #1 - mov r1, #0x17 - sub r1, r1, r0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #7 - lsl r0, r0, #0x18 - str r1, [sp, #4] - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _0223FD78 ; =0x00000337 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, #0xb4 - mov r2, #0 - mov r3, #0x18 - bl sub_0201A7E8 - mov r0, #3 - str r0, [sp, #0x14] -_0223FBF0: - add r0, r7, #0 - mov r1, #6 - bl sub_02013A04 - mov r1, #0x55 - lsl r1, r1, #2 - mov r4, #0 - str r0, [r5, r1] - cmp r7, #0 - ble _0223FC2C -_0223FC04: - ldrb r0, [r6, r4] - bl ov84_0223D84C - ldrb r1, [r6, r4] - add r2, r0, #0 - mov r0, #0x55 - lsl r1, r1, #2 - add r3, r5, r1 - mov r1, #0x49 - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r3, r1] - bl sub_02013A6C - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, r7 - blt _0223FC04 -_0223FC2C: - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - str r0, [sp, #0x1c] - add r0, r5, #0 - add r0, #0xb4 - str r0, [sp, #0x20] - add r0, sp, #0x1c - strb r1, [r0, #8] - mov r1, #1 - strb r1, [r0, #9] - strb r7, [r0, #0xa] - ldrb r2, [r0, #0xb] - mov r1, #0xf - bic r2, r1 - strb r2, [r0, #0xb] - ldrb r2, [r0, #0xb] - mov r1, #0x30 - bic r2, r1 - strb r2, [r0, #0xb] - cmp r7, #4 - ldrb r2, [r0, #0xb] - blo _0223FC68 - mov r1, #0xc0 - bic r2, r1 - mov r1, #0x40 - orr r1, r2 - strb r1, [r0, #0xb] - b _0223FC6E -_0223FC68: - mov r1, #0xc0 - bic r2, r1 - strb r2, [r0, #0xb] -_0223FC6E: - mov r0, #6 - str r0, [sp] - mov r0, #2 - mov r2, #0 - str r0, [sp, #4] - add r0, sp, #0x1c - mov r1, #8 - add r3, r2, #0 - bl sub_02001AF4 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r5, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - mov r3, #0xc - add r0, r2, #0 - add r0, #0x64 - ldrb r0, [r0] - add r1, r0, #0 - mul r1, r3 - add r0, r2, r1 - ldrb r0, [r0, #0xc] - cmp r0, #3 - bne _0223FCD8 - add r0, r5, #0 - add r0, #0x14 - mov r1, #0 - bl sub_0201ADA4 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r0, r5, #0 - add r1, #0x66 - ldrh r1, [r1] - bl ov84_0223F584 - add r0, r5, #0 - add r0, #0x14 - bl sub_0201A9A4 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r0, r5, #0 - add r1, #0x66 - ldrh r1, [r1] - mov r2, #1 - bl ov84_02240D5C - b _0223FD5E -_0223FCD8: - ldr r0, [sp, #0x14] - add r4, r5, #4 - lsl r6, r0, #4 - ldr r2, _0223FD7C ; =0x000003D9 - add r0, r4, r6 - mov r1, #1 - bl sub_0200E060 - add r0, r4, r6 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x2a - bl sub_0200B1EC - str r0, [sp, #0x18] - mov r0, #0x38 - mov r1, #6 - bl sub_02023790 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - add r0, r1, #4 - add r1, #0x64 - ldrb r2, [r1] - mov r1, #0xc - mul r1, r2 - add r1, r0, r1 - ldrh r2, [r1, #6] - ldrh r1, [r1, #4] - add r0, r5, #0 - add r1, r2, r1 - sub r1, r1, #1 - mov r2, #0 - bl ov84_0223F4E8 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [sp, #0x18] - add r1, r7, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r4, r6 - mov r1, #1 - add r2, r7, #0 - str r3, [sp, #8] - bl sub_0201D738 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 -_0223FD5E: - add r0, r5, #0 - ldr r2, _0223FD80 ; =0x000003F7 - add r0, #0xb4 - mov r1, #1 - mov r3, #0xe - bl sub_0200DC48 - add r5, #0xb4 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FD78: .word 0x00000337 -_0223FD7C: .word 0x000003D9 -_0223FD80: .word 0x000003F7 - thumb_func_end ov84_0223FB70 - - thumb_func_start ov84_0223FD84 -ov84_0223FD84: ; 0x0223FD84 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - add r0, r2, #0 - add r0, #0x64 - ldrb r1, [r0] - mov r0, #0xc - mul r0, r1 - add r0, r2, r0 - ldrb r0, [r0, #0xc] - cmp r0, #4 - bne _0223FDA2 - mov r1, #4 - b _0223FDA4 -_0223FDA2: - mov r1, #3 -_0223FDA4: - cmp r0, #3 - beq _0223FDBA - lsl r6, r1, #4 - add r4, r5, #4 - add r0, r4, r6 - mov r1, #1 - bl sub_0200E084 - add r0, r4, r6 - bl sub_0201AD10 -_0223FDBA: - add r0, r5, #0 - add r0, #0xb4 - mov r1, #1 - bl sub_0200DC9C - add r0, r5, #0 - add r0, #0xb4 - bl sub_0201AD10 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02001BC4 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02013A3C - add r0, r5, #0 - add r0, #0xb4 - bl sub_0201A8FC - add r0, r5, #0 - add r0, #0x14 - mov r1, #0 - bl sub_0201ADA4 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r0, r5, #0 - add r1, #0x66 - ldrh r1, [r1] - bl ov84_0223F528 - add r0, r5, #0 - add r0, #0x14 - bl sub_0201A9A4 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov84_02240D5C - pop {r4, r5, r6, pc} - thumb_func_end ov84_0223FD84 - - thumb_func_start ov84_0223FE18 -ov84_0223FE18: ; 0x0223FE18 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r0, #0x14 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x2d - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x82 - mov r1, #6 - bl sub_02023790 - ldr r1, _0223FE8C ; =0x0000047B - add r4, r0, #0 - ldrb r1, [r5, r1] - add r0, r5, #0 - mov r2, #0 - sub r1, r1, #1 - bl ov84_0223F4E8 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223FE90 ; =0x000F0E00 - add r2, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x14 - mov r3, #0x28 - str r1, [sp, #0xc] - bl sub_0201D78C - add r5, #0x14 - add r0, r5, #0 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223FE8C: .word 0x0000047B -_0223FE90: .word 0x000F0E00 - thumb_func_end ov84_0223FE18 - - thumb_func_start ov84_0223FE94 -ov84_0223FE94: ; 0x0223FE94 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r2, _0223FF3C ; =0x000003F7 - add r5, r0, #0 - add r0, #0x94 - mov r1, #1 - mov r3, #0xe - bl sub_0200DC48 - add r0, r5, #0 - bl ov84_0223FF44 - add r0, r5, #0 - ldr r2, _0223FF40 ; =0x000003D9 - add r0, #0x34 - mov r1, #1 - mov r3, #0xc - bl sub_0200E060 - add r0, r5, #0 - add r0, #0x34 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x34 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x38 - mov r1, #6 - bl sub_02023790 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r2, r0, #4 - add r0, #0x64 - ldrb r1, [r0] - mov r0, #0xc - mul r0, r1 - add r1, r2, r0 - ldrh r2, [r1, #6] - ldrh r1, [r1, #4] - add r0, r5, #0 - add r1, r2, r1 - sub r1, r1, #1 - mov r2, #0 - bl ov84_0223F4E8 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x34 - mov r1, #1 - add r2, r4, #0 - str r3, [sp, #8] - bl sub_0201D738 - add r5, #0x34 - add r0, r5, #0 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0223FF3C: .word 0x000003F7 -_0223FF40: .word 0x000003D9 - thumb_func_end ov84_0223FE94 - - thumb_func_start ov84_0223FF44 -ov84_0223FF44: ; 0x0223FF44 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r5, #0 - add r4, #0x94 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x54 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, _0223FFBC ; =0x00000488 - mov r0, #0x46 - lsl r0, r0, #2 - ldrsh r2, [r5, r2] - ldr r0, [r5, r0] - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - mov r2, #0xfe - str r1, [sp, #8] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r3, #0x10 - bl sub_0201D738 - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0223FFBC: .word 0x00000488 - thumb_func_end ov84_0223FF44 - - thumb_func_start ov84_0223FFC0 -ov84_0223FFC0: ; 0x0223FFC0 - push {r4, lr} - add r4, r0, #0 - add r0, #0x34 - mov r1, #1 - bl sub_0200E084 - add r0, r4, #0 - add r0, #0x94 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0x34 - bl sub_0201AD10 - add r0, r4, #0 - add r0, #0x94 - bl sub_0201AD10 - add r4, #0x14 - add r0, r4, #0 - bl sub_0201A9A4 - pop {r4, pc} - thumb_func_end ov84_0223FFC0 - - thumb_func_start ov84_0223FFF0 -ov84_0223FFF0: ; 0x0223FFF0 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r2, _02240094 ; =0x000003D9 - add r5, r0, #0 - add r0, #0x64 - mov r1, #1 - mov r3, #0xc - bl sub_0200E060 - add r0, r5, #0 - add r0, #0x64 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x36 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r2, r0, #4 - add r0, #0x64 - ldrb r1, [r0] - mov r0, #0xc - mul r0, r1 - add r1, r2, r0 - ldr r0, _02240098 ; =0x00000488 - ldrsh r0, [r5, r0] - cmp r0, #1 - bne _02240046 - ldrh r2, [r1, #6] - ldrh r1, [r1, #4] - add r0, r5, #0 - add r1, r2, r1 - sub r1, r1, #1 - mov r2, #0 - bl ov84_0223F4E8 - b _02240056 -_02240046: - ldrh r2, [r1, #6] - ldrh r1, [r1, #4] - add r0, r5, #0 - add r1, r2, r1 - sub r1, r1, #1 - mov r2, #0 - bl ov84_0223F508 -_02240056: - mov r0, #0 - str r0, [sp] - mov r1, #1 - mov r0, #0x46 - ldr r2, _02240098 ; =0x00000488 - str r1, [sp, #4] - lsl r0, r0, #2 - ldrsh r2, [r5, r2] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl ov84_022400A0 - ldr r1, _0224009C ; =0x00000426 - strb r0, [r5, r1] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02240094: .word 0x000003D9 -_02240098: .word 0x00000488 -_0224009C: .word 0x00000426 - thumb_func_end ov84_0223FFF0 - - thumb_func_start ov84_022400A0 -ov84_022400A0: ; 0x022400A0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #1 - bl sub_02002AC8 - mov r0, #0 - bl sub_02002AE4 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_02027AC0 - mov r3, #0 - str r3, [sp] - str r0, [sp, #4] - ldr r0, _022400DC ; =ov84_022400E0 - mov r2, #0xfe - str r0, [sp, #8] - lsl r2, r2, #2 - add r0, r4, #0 - ldr r2, [r4, r2] - add r0, #0x64 - mov r1, #1 - bl sub_0201D738 - add sp, #0xc - pop {r3, r4, pc} - nop -_022400DC: .word ov84_022400E0 - thumb_func_end ov84_022400A0 - - thumb_func_start ov84_022400E0 -ov84_022400E0: ; 0x022400E0 - push {r3, lr} - cmp r1, #4 - bhi _02240118 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022400F2: ; jump table - .short _02240118 - _022400F2 - 2 ; case 0 - .short _022400FC - _022400F2 - 2 ; case 1 - .short _02240102 - _022400F2 - 2 ; case 2 - .short _02240108 - _022400F2 - 2 ; case 3 - .short _02240110 - _022400F2 - 2 ; case 4 -_022400FC: - bl sub_020057E0 - pop {r3, pc} -_02240102: - bl sub_020061E4 - pop {r3, pc} -_02240108: - ldr r0, _0224011C ; =0x0000060D - bl sub_02005748 - b _02240118 -_02240110: - ldr r0, _0224011C ; =0x0000060D - bl sub_020057D4 - pop {r3, pc} -_02240118: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_0224011C: .word 0x0000060D - thumb_func_end ov84_022400E0 - - thumb_func_start ov84_02240120 -ov84_02240120: ; 0x02240120 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #6 - str r0, [sp] - ldr r0, [r4, #0] - ldr r1, _02240140 ; =0x02241150 - ldr r2, _02240144 ; =0x000003F7 - mov r3, #0xe - bl sub_02002100 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r4, r1] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02240140: .word 0x02241150 -_02240144: .word 0x000003F7 - thumb_func_end ov84_02240120 - - thumb_func_start ov84_02240148 -ov84_02240148: ; 0x02240148 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r5, #0 - add r4, #0x74 - cmp r1, #0 - bne _02240162 - ldr r2, _0224023C ; =0x000003F7 - add r0, r4, #0 - mov r1, #1 - mov r3, #0xe - bl sub_0200DC48 -_02240162: - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x50 - bl sub_0200B1EC - mov r3, #2 - add r6, r0, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, _02240240 ; =0x00000488 - mov r0, #0x46 - lsl r0, r0, #2 - ldrsh r2, [r5, r2] - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - mov r2, #0xfe - str r1, [sp, #8] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x51 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r2, _02240244 ; =0x0000048C - mov r0, #0x46 - ldr r3, [r5, r2] - sub r2, r2, #4 - ldrsh r2, [r5, r2] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mul r2, r3 - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - mov r1, #0xfe - lsl r1, r1, #2 - mov r0, #0 - ldr r1, [r5, r1] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - mov r2, #0xfe - str r1, [sp, #8] - lsl r2, r2, #2 - ldr r2, [r5, r2] - mov r5, #0x60 - add r0, r4, #0 - sub r3, r5, r3 - bl sub_0201D738 - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224023C: .word 0x000003F7 -_02240240: .word 0x00000488 -_02240244: .word 0x0000048C - thumb_func_end ov84_02240148 - - thumb_func_start ov84_02240248 -ov84_02240248: ; 0x02240248 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r5, #0 - add r4, #0x84 - cmp r1, #0 - bne _02240294 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r2, _02240324 ; =0x000003F7 - add r0, r4, #0 - mov r1, #1 - mov r3, #0xe - bl sub_0200DC48 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x4e - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - b _022402A6 -_02240294: - mov r0, #0x50 - str r0, [sp] - mov r3, #0x10 - add r0, r4, #0 - mov r1, #0xf - mov r2, #0 - str r3, [sp, #4] - bl sub_0201AE78 -_022402A6: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x4f - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - bl sub_02025F74 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - mov r1, #0xfe - lsl r1, r1, #2 - mov r0, #0 - ldr r1, [r5, r1] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - mov r2, #0xfe - str r1, [sp, #8] - lsl r2, r2, #2 - ldr r2, [r5, r2] - mov r5, #0x50 - add r0, r4, #0 - sub r3, r5, r3 - bl sub_0201D738 - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_02240324: .word 0x000003F7 - thumb_func_end ov84_02240248 - - thumb_func_start ov84_02240328 -ov84_02240328: ; 0x02240328 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r5, #0 - add r4, #0xa4 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r2, _022403F0 ; =0x000003F7 - add r0, r4, #0 - mov r1, #1 - mov r3, #0xe - bl sub_0200DC48 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x6c - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x6d - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0202AB28 - bl sub_0202AC98 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - mov r0, #0x46 - mov r1, #0xfe - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r1, #0xfe - lsl r1, r1, #2 - mov r0, #0 - ldr r1, [r5, r1] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - mov r2, #0xfe - str r1, [sp, #8] - lsl r2, r2, #2 - ldr r2, [r5, r2] - mov r5, #0x58 - add r0, r4, #0 - sub r3, r5, r3 - bl sub_0201D738 - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022403F0: .word 0x000003F7 - thumb_func_end ov84_02240328 - - thumb_func_start ov84_022403F4 -ov84_022403F4: ; 0x022403F4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x20 - mov r1, #6 - bl sub_0201DBEC - add r0, r4, #0 - bl ov84_02240424 - add r0, r4, #0 - bl ov84_022404C0 - add r0, r4, #0 - bl ov84_02240950 - pop {r4, pc} - thumb_func_end ov84_022403F4 - - thumb_func_start ov84_02240424 -ov84_02240424: ; 0x02240424 - push {r3, r4, r5, r6, lr} - sub sp, #0x4c - ldr r3, _022404B4 ; =0x02241178 - add r2, sp, #0x34 - add r4, r0, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #6 - bl sub_0200C6E4 - add r1, r4, #0 - add r1, #0xd8 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - bl sub_0200C704 - add r1, r4, #0 - add r1, #0xdc - add r2, sp, #0x14 - ldr r5, _022404B8 ; =0x02241190 - str r0, [r1, #0] - ldmia r5!, {r0, r1} - add r3, r2, #0 - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - ldr r6, _022404BC ; =0x02241164 - stmia r2!, {r0, r1} - add r5, sp, #0 - ldmia r6!, {r0, r1} - add r2, r5, #0 - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r1, r3, #0 - str r0, [r5, #0] - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r3, #0x20 - bl sub_0200C73C - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0xc - bl sub_0200C7C0 - add r0, r4, #0 - add r0, #0xd8 - add r4, #0xdc - ldr r0, [r0, #0] - ldr r1, [r4, #0] - add r2, sp, #0x34 - bl sub_0200CB30 - add sp, #0x4c - pop {r3, r4, r5, r6, pc} - nop -_022404B4: .word 0x02241178 -_022404B8: .word 0x02241190 -_022404BC: .word 0x02241164 - thumb_func_end ov84_02240424 - - thumb_func_start ov84_022404C0 -ov84_022404C0: ; 0x022404C0 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _02240844 ; =0x00000425 - ldrb r0, [r5, r0] - cmp r0, #0 - bne _022404D4 - mov r3, #2 - mov r4, #3 - b _022404D8 -_022404D4: - mov r3, #6 - mov r4, #7 -_022404D8: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02240848 ; =0x0000C0F9 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0224084C ; =0x0000C0FA - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x19 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02240850 ; =0x0000C0FB - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x1c - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02240854 ; =0x0000C0FC - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x1f - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02240858 ; =0x0000C0FD - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0xa - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0224085C ; =0x0000C0FE - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x24 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xc1 - lsl r0, r0, #8 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x3e - mov r3, #4 - bl sub_0200CBDC - mov r0, #0 - mov r1, #1 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02240860 ; =0x0000C0FF - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x10 - bl sub_0200CBDC - ldr r0, _02240864 ; =0x0000C101 - add r1, r5, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #1 - mov r3, #0 - bl sub_0207C948 - ldr r0, _02240868 ; =0x0000C102 - add r1, r5, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #1 - mov r3, #0 - bl sub_0207CAC4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, _02240848 ; =0x0000C0F9 - add r1, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - add r3, r4, #0 - bl sub_0200CD0C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _0224084C ; =0x0000C0FA - add r1, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x14 - bl sub_0200CD0C - mov r0, #0 - mov r1, #2 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, _02240854 ; =0x0000C0FC - add r1, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x10 - bl sub_0200CC9C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _02240858 ; =0x0000C0FD - add r1, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x3e - mov r3, #0xa - bl sub_0200CC9C - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r3, _0224085C ; =0x0000C0FE - mov r2, #1 - bl sub_0207C97C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldr r0, _02240850 ; =0x0000C0FB - add r1, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x25 - bl sub_0200CD0C - mov r0, #0 - str r0, [sp] - ldr r0, _02240848 ; =0x0000C0F9 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #1 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _0224084C ; =0x0000C0FA - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x18 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02240850 ; =0x0000C0FB - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x1b - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02240854 ; =0x0000C0FC - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x1e - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02240858 ; =0x0000C0FD - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #9 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _0224085C ; =0x0000C0FE - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x23 - bl sub_0200CE24 - bl sub_0207CF40 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02240860 ; =0x0000C0FF - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x10 - bl sub_0200CE0C - mov r0, #0 - str r0, [sp] - mov r0, #0xc1 - lsl r0, r0, #8 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x3e - mov r3, #5 - bl sub_0200CE0C - mov r3, #0 - add r1, r5, #0 - add r2, r5, #0 - ldr r0, _02240848 ; =0x0000C0F9 - str r3, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _0224084C ; =0x0000C0FA - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x17 - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _02240850 ; =0x0000C0FB - b _0224086C - ; .align 2, 0 -_02240844: .word 0x00000425 -_02240848: .word 0x0000C0F9 -_0224084C: .word 0x0000C0FA -_02240850: .word 0x0000C0FB -_02240854: .word 0x0000C0FC -_02240858: .word 0x0000C0FD -_0224085C: .word 0x0000C0FE -_02240860: .word 0x0000C0FF -_02240864: .word 0x0000C101 -_02240868: .word 0x0000C102 -_0224086C: - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x1a - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _0224093C ; =0x0000C0FC - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x1d - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _02240940 ; =0x0000C0FD - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #8 - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _02240944 ; =0x0000C0FE - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r5, #0 - add r0, #0xd8 - add r1, #0xdc - add r2, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - mov r3, #0x22 - bl sub_0200CE54 - bl sub_0207CF44 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02240948 ; =0x0000C0FF - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x10 - bl sub_0200CE3C - mov r0, #0 - str r0, [sp] - mov r0, #0xc1 - lsl r0, r0, #8 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x3e - mov r3, #6 - bl sub_0200CE3C - add r0, r5, #0 - add r0, #0xd8 - add r5, #0xdc - ldr r2, _0224094C ; =0x0000C101 - ldr r0, [r0, #0] - ldr r1, [r5, #0] - add r3, r2, #0 - bl sub_0207C9EC - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0224093C: .word 0x0000C0FC -_02240940: .word 0x0000C0FD -_02240944: .word 0x0000C0FE -_02240948: .word 0x0000C0FF -_0224094C: .word 0x0000C101 - thumb_func_end ov84_022404C0 - - thumb_func_start ov84_02240950 -ov84_02240950: ; 0x02240950 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r4, _02240A7C ; =0x022411B0 - mov r7, #0 - add r6, r5, #0 -_0224095C: - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r4, #0 - bl sub_0200CE6C - add r1, r6, #0 - add r1, #0xe0 - add r7, r7, #1 - str r0, [r1, #0] - add r4, #0x34 - add r6, r6, #4 - cmp r7, #0xc - blo _0224095C - add r0, r5, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r0, #0x65 - ldrb r0, [r0] - add r0, #0xfc - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bhi _022409CE - add r0, r5, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 -_022409CE: - ldr r0, _02240A80 ; =0x00000424 - ldrb r0, [r5, r0] - cmp r0, #1 - bne _022409EE - add r0, r5, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r5, #0 - add r0, #0xec - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 -_022409EE: - add r0, r5, #0 - mov r1, #0 - bl ov84_02240D3C - add r0, r5, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - add r0, r5, #0 - add r2, r1, #0 - add r2, #0x64 - ldrb r3, [r2] - mov r2, #0xc - add r0, #0xe0 - mul r2, r3 - add r1, r1, r2 - ldrb r1, [r1, #0xc] - ldr r0, [r0, #0] - bl sub_0200D364 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r0, r5, #0 - add r1, #0x64 - ldrb r1, [r1] - bl ov84_02240C30 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r2, #0x61 - bl sub_0200D4C4 - add r0, r5, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - add r0, r5, #0 - add r3, r2, #0 - add r3, #0x64 - ldrb r4, [r3] - mov r3, #0xc - add r0, #0xf0 - mul r3, r4 - add r2, r2, r3 - ldrh r2, [r2, #8] - ldr r0, [r0, #0] - mov r1, #0xb1 - sub r2, r2, #1 - lsl r2, r2, #4 - add r2, #0x18 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r4, _02240A84 ; =0x02241158 - add r3, sp, #0 - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - add r1, r2, #0 - add r5, #0xe0 - str r0, [r3, #0] - ldr r0, [r5, #0] - mov r2, #2 - ldr r0, [r0, #0] - bl sub_02021C80 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240A7C: .word 0x022411B0 -_02240A80: .word 0x00000424 -_02240A84: .word 0x02241158 - thumb_func_end ov84_02240950 - - thumb_func_start ov84_02240A88 -ov84_02240A88: ; 0x02240A88 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02240A90: - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xc - blo _02240A90 - add r0, r6, #0 - add r1, r6, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200D0B0 - add r6, #0xd8 - ldr r0, [r6, #0] - bl sub_0200C8D4 - pop {r4, r5, r6, pc} - thumb_func_end ov84_02240A88 - - thumb_func_start ov84_02240ABC -ov84_02240ABC: ; 0x02240ABC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_02240AC2: - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - bl sub_0200D330 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xc - blo _02240AC2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov84_02240ABC - - thumb_func_start ov84_02240AD8 -ov84_02240AD8: ; 0x02240AD8 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02240B2C ; =0x0000C0FF - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x10 - bl sub_0200D948 - add r0, r4, #0 - mov r1, #2 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02240B30 ; =0x0000C0FC - mov r2, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r5, #0xdc - ldr r0, [r0, #0] - ldr r1, [r5, #0] - bl sub_0200D97C - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02240B2C: .word 0x0000C0FF -_02240B30: .word 0x0000C0FC - thumb_func_end ov84_02240AD8 - - thumb_func_start ov84_02240B34 -ov84_02240B34: ; 0x02240B34 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r4, r1, #0 - bl sub_0200D41C - add r5, #0xe4 - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_0200D41C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov84_02240B34 - - thumb_func_start ov84_02240B50 -ov84_02240B50: ; 0x02240B50 - ldr r1, _02240B64 ; =0x00000454 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _02240B5C - mov r0, #1 - b _02240B5E -_02240B5C: - mov r0, #0 -_02240B5E: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr - ; .align 2, 0 -_02240B64: .word 0x00000454 - thumb_func_end ov84_02240B50 - - thumb_func_start ov84_02240B68 -ov84_02240B68: ; 0x02240B68 - ldr r1, _02240B78 ; =0x00000457 - mov r2, #0 - strb r2, [r0, r1] - ldr r3, _02240B7C ; =ov84_02240C48 - mov r2, #1 - sub r1, r1, #3 - strb r2, [r0, r1] - bx r3 - ; .align 2, 0 -_02240B78: .word 0x00000457 -_02240B7C: .word ov84_02240C48 - thumb_func_end ov84_02240B68 - - thumb_func_start ov84_02240B80 -ov84_02240B80: ; 0x02240B80 - push {r3, lr} - ldr r1, _02240B94 ; =0x00000454 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _02240B92 - cmp r1, #1 - bne _02240B92 - bl ov84_02240B98 -_02240B92: - pop {r3, pc} - ; .align 2, 0 -_02240B94: .word 0x00000454 - thumb_func_end ov84_02240B80 - - thumb_func_start ov84_02240B98 -ov84_02240B98: ; 0x02240B98 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r2, _02240C24 ; =0x00000455 - ldrb r0, [r4, r2] - cmp r0, #0 - bne _02240BD0 - add r1, r2, #2 - ldrb r1, [r4, r1] - ldr r0, [sp] - lsl r1, r1, #2 - add r3, r4, r1 - add r1, r2, #3 - ldr r1, [r3, r1] - sub r0, r0, r1 - str r0, [sp] - b _02240BE2 -_02240BD0: - add r1, r2, #2 - ldrb r1, [r4, r1] - ldr r0, [sp] - lsl r1, r1, #2 - add r3, r4, r1 - add r1, r2, #3 - ldr r1, [r3, r1] - add r0, r0, r1 - str r0, [sp] -_02240BE2: - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - add r1, sp, #0 - ldr r0, [r0, #0] - bl sub_02021C50 - ldr r1, _02240C28 ; =0x00000457 - ldrb r0, [r4, r1] - add r0, r0, #1 - strb r0, [r4, r1] - ldrb r0, [r4, r1] - cmp r0, #8 - bne _02240C20 - add r1, #0x21 - ldrb r1, [r4, r1] - add r0, r4, #0 - bl ov84_02240C30 - lsl r0, r0, #0xc - str r0, [sp] - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - add r1, sp, #0 - ldr r0, [r0, #0] - bl sub_02021C50 - ldr r0, _02240C2C ; =0x00000454 - mov r1, #0 - strb r1, [r4, r0] -_02240C20: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02240C24: .word 0x00000455 -_02240C28: .word 0x00000457 -_02240C2C: .word 0x00000454 - thumb_func_end ov84_02240B98 - - thumb_func_start ov84_02240C30 -ov84_02240C30: ; 0x02240C30 - ldr r2, _02240C44 ; =0x00000427 - ldrb r3, [r0, r2] - add r2, r2, #1 - ldrb r0, [r0, r2] - mul r1, r0 - add r0, r3, r1 - add r0, r0, #6 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr - ; .align 2, 0 -_02240C44: .word 0x00000427 - thumb_func_end ov84_02240C30 - - thumb_func_start ov84_02240C48 -ov84_02240C48: ; 0x02240C48 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r1, _02240CE4 ; =0x00000478 - str r0, [r2, #0] - ldrb r1, [r4, r1] - add r0, r4, #0 - bl ov84_02240C30 - lsl r1, r0, #0xc - ldr r0, [sp] - cmp r1, r0 - bge _02240C82 - sub r0, r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - mov r2, #0 - b _02240C8C -_02240C82: - sub r0, r1, r0 - mov r1, #0x64 - bl sub_020E1F6C - mov r2, #1 -_02240C8C: - ldr r1, _02240CE8 ; =0x00000455 - mov r3, #0x28 - strb r2, [r4, r1] - add r5, r0, #0 - ldr r1, _02240CEC ; =0x00000458 - mov r2, #0 - mul r5, r3 - str r2, [r4, r1] - add r3, r1, #4 - str r5, [r4, r3] - mov r3, #0x19 - add r5, r0, #0 - mul r5, r3 - add r3, r1, #0 - add r3, #8 - str r5, [r4, r3] - mov r3, #0xf - add r5, r0, #0 - mul r5, r3 - add r3, r1, #0 - add r3, #0xc - str r5, [r4, r3] - mov r3, #0xa - add r5, r0, #0 - mul r5, r3 - add r3, r1, #0 - add r3, #0x10 - str r5, [r4, r3] - mov r3, #7 - add r5, r0, #0 - mul r5, r3 - add r3, r1, #0 - add r3, #0x14 - str r5, [r4, r3] - lsl r3, r0, #1 - add r3, r0, r3 - add r0, r1, #0 - add r0, #0x18 - str r3, [r4, r0] - add r1, #0x1c - str r2, [r4, r1] - add sp, #0xc - pop {r4, r5, pc} - nop -_02240CE4: .word 0x00000478 -_02240CE8: .word 0x00000455 -_02240CEC: .word 0x00000458 - thumb_func_end ov84_02240C48 - - thumb_func_start ov84_02240CF0 -ov84_02240CF0: ; 0x02240CF0 - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - bne _02240D16 - mov r0, #1 - lsl r0, r0, #8 - ldr r0, [r4, r0] - mov r1, #0xdc - mov r2, #0x9c - bl sub_0200D4C4 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xdc - mov r2, #0xb4 - bl sub_0200D4C4 - b _02240D32 -_02240D16: - mov r0, #1 - lsl r0, r0, #8 - ldr r0, [r4, r0] - mov r1, #0xa2 - mov r2, #0x6c - bl sub_0200D4C4 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa2 - mov r2, #0x84 - bl sub_0200D4C4 -_02240D32: - add r0, r4, #0 - mov r1, #1 - bl ov84_02240D3C - pop {r4, pc} - thumb_func_end ov84_02240CF0 - - thumb_func_start ov84_02240D3C -ov84_02240D3C: ; 0x02240D3C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - ldr r0, [r5, r0] - add r4, r1, #0 - bl sub_0200D3F4 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200D3F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov84_02240D3C - - thumb_func_start ov84_02240D5C -ov84_02240D5C: ; 0x02240D5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x42 - lsl r0, r0, #2 - add r4, r2, #0 - add r6, r1, #0 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200D3F4 - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200D3F4 - cmp r4, #0 - beq _02240E18 - add r0, r6, #0 - bl sub_0207D268 - mov r1, #3 - add r4, r0, #0 - bl sub_020790C4 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r4, #0 - mov r1, #1 - bl sub_020790C4 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - bl sub_0207C944 - add r7, r0, #0 - add r0, r6, #0 - bl sub_0207C908 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, _02240E1C ; =0x0000C101 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r7, #0 - bl sub_0200D948 - add r0, r6, #0 - bl sub_0207C92C - add r1, r0, #0 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r1, #6 - bl sub_0200D41C - bl sub_0207CAC0 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0207CA90 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, _02240E20 ; =0x0000C102 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xd8 - add r1, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r6, #0 - bl sub_0200D948 - add r0, r4, #0 - bl sub_0207CAA8 - add r1, r0, #0 - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r1, #6 - bl sub_0200D41C -_02240E18: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240E1C: .word 0x0000C101 -_02240E20: .word 0x0000C102 - thumb_func_end ov84_02240D5C - - thumb_func_start ov84_02240E24 -ov84_02240E24: ; 0x02240E24 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xf8 - add r4, r1, #0 - ldr r0, [r0, #0] - mov r1, #1 - add r6, r2, #0 - bl sub_0200D3F4 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200D4C4 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3CC - add r5, #0xf8 - ldr r0, [r5, #0] - mov r1, #0 - bl sub_0200D364 - pop {r4, r5, r6, pc} - thumb_func_end ov84_02240E24 - - thumb_func_start ov84_02240E5C -ov84_02240E5C: ; 0x02240E5C - push {r4, lr} - add r4, r0, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl sub_0200D408 - cmp r0, #1 - bne _02240E92 - add r0, r4, #0 - add r0, #0xf8 - mov r1, #1 - ldr r0, [r0, #0] - lsl r1, r1, #0xc - bl sub_0200D34C - add r0, r4, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl sub_0200D3E0 - cmp r0, #2 - bne _02240E92 - add r4, #0xf8 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D3F4 -_02240E92: - pop {r4, pc} - thumb_func_end ov84_02240E5C - ; 0x02240E94 - - .rodata - .incbin "incbin/overlay84_rodata.bin" - .bss - .space 0x0 + .global Unk_ov84_02240E94 +Unk_ov84_02240E94: ; 0x02240E94 + .incbin "incbin/overlay84_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov84_02240E98 +Unk_ov84_02240E98: ; 0x02240E98 + .incbin "incbin/overlay84_rodata.bin", 0x4, 0xC - 0x4 + + .global Unk_ov84_02240EA0 +Unk_ov84_02240EA0: ; 0x02240EA0 + .incbin "incbin/overlay84_rodata.bin", 0xC, 0x14 - 0xC + + .global Unk_ov84_02240EA8 +Unk_ov84_02240EA8: ; 0x02240EA8 + .incbin "incbin/overlay84_rodata.bin", 0x14, 0x20 - 0x14 + + .global Unk_ov84_02240EB4 +Unk_ov84_02240EB4: ; 0x02240EB4 + .incbin "incbin/overlay84_rodata.bin", 0x20, 0x2C - 0x20 + + .global Unk_ov84_02240EC0 +Unk_ov84_02240EC0: ; 0x02240EC0 + .incbin "incbin/overlay84_rodata.bin", 0x2C, 0x3C - 0x2C + + .global Unk_ov84_02240ED0 +Unk_ov84_02240ED0: ; 0x02240ED0 + .incbin "incbin/overlay84_rodata.bin", 0x3C, 0x50 - 0x3C + + .global Unk_ov84_02240EE4 +Unk_ov84_02240EE4: ; 0x02240EE4 + .incbin "incbin/overlay84_rodata.bin", 0x50, 0x6C - 0x50 + + .global Unk_ov84_02240F00 +Unk_ov84_02240F00: ; 0x02240F00 + .incbin "incbin/overlay84_rodata.bin", 0x6C, 0x88 - 0x6C + + .global Unk_ov84_02240F1C +Unk_ov84_02240F1C: ; 0x02240F1C + .incbin "incbin/overlay84_rodata.bin", 0x88, 0xA4 - 0x88 + + .global Unk_ov84_02240F38 +Unk_ov84_02240F38: ; 0x02240F38 + .incbin "incbin/overlay84_rodata.bin", 0xA4, 0xC0 - 0xA4 + + .global Unk_ov84_02240F54 +Unk_ov84_02240F54: ; 0x02240F54 + .incbin "incbin/overlay84_rodata.bin", 0xC0, 0xDC - 0xC0 + + .global Unk_ov84_02240F70 +Unk_ov84_02240F70: ; 0x02240F70 + .incbin "incbin/overlay84_rodata.bin", 0xDC, 0xF8 - 0xDC + + .global Unk_ov84_02240F8C +Unk_ov84_02240F8C: ; 0x02240F8C + .incbin "incbin/overlay84_rodata.bin", 0xF8, 0x114 - 0xF8 + + .global Unk_ov84_02240FA8 +Unk_ov84_02240FA8: ; 0x02240FA8 + .incbin "incbin/overlay84_rodata.bin", 0x114, 0x134 - 0x114 + + .global Unk_ov84_02240FC8 +Unk_ov84_02240FC8: ; 0x02240FC8 + .incbin "incbin/overlay84_rodata.bin", 0x134, 0x154 - 0x134 + + .global Unk_ov84_02240FE8 +Unk_ov84_02240FE8: ; 0x02240FE8 + .incbin "incbin/overlay84_rodata.bin", 0x154, 0x178 - 0x154 + + .global Unk_ov84_0224100C +Unk_ov84_0224100C: ; 0x0224100C + .incbin "incbin/overlay84_rodata.bin", 0x178, 0x1A0 - 0x178 + + .global Unk_ov84_02241034 +Unk_ov84_02241034: ; 0x02241034 + .incbin "incbin/overlay84_rodata.bin", 0x1A0, 0x1D0 - 0x1A0 + + .global Unk_ov84_02241064 +Unk_ov84_02241064: ; 0x02241064 + .incbin "incbin/overlay84_rodata.bin", 0x1D0, 0x202 - 0x1D0 + + .global Unk_ov84_02241096 +Unk_ov84_02241096: ; 0x02241096 + .incbin "incbin/overlay84_rodata.bin", 0x202, 0x234 - 0x202 + + .global Unk_ov84_022410C8 +Unk_ov84_022410C8: ; 0x022410C8 + .incbin "incbin/overlay84_rodata.bin", 0x234, 0x27C - 0x234 + + .global Unk_ov84_02241110 +Unk_ov84_02241110: ; 0x02241110 + .incbin "incbin/overlay84_rodata.bin", 0x27C, 0x284 - 0x27C + + .global Unk_ov84_02241118 +Unk_ov84_02241118: ; 0x02241118 + .incbin "incbin/overlay84_rodata.bin", 0x284, 0x28C - 0x284 + + .global Unk_ov84_02241120 +Unk_ov84_02241120: ; 0x02241120 + .incbin "incbin/overlay84_rodata.bin", 0x28C, 0x29C - 0x28C + + .global Unk_ov84_02241130 +Unk_ov84_02241130: ; 0x02241130 + .incbin "incbin/overlay84_rodata.bin", 0x29C, 0x2AC - 0x29C + + .global Unk_ov84_02241140 +Unk_ov84_02241140: ; 0x02241140 + .incbin "incbin/overlay84_rodata.bin", 0x2AC, 0x10 + diff --git a/asm/ov84_0223F040.s b/asm/ov84_0223F040.s new file mode 100644 index 000000000..68faf73f4 --- /dev/null +++ b/asm/ov84_0223F040.s @@ -0,0 +1,2448 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov84_0223F040 +ov84_0223F040: ; 0x0223F040 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #0x11 + str r0, [sp, #4] + mov r0, #0x12 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, r4, #4 + mov r2, #2 + mov r3, #0xe + bl sub_0201A7E8 + mov r0, #0x12 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223F1BC ; =0x00000133 + add r1, r4, #0 + str r0, [sp, #0x10] + mov r2, #0 + ldr r0, [r4, #0] + add r1, #0x14 + add r3, r2, #0 + bl sub_0201A7E8 + mov r0, #0xd + str r0, [sp] + mov r0, #0x24 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, _0223F1C0 ; =0x000001F3 + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, #0x24 + mov r2, #2 + mov r3, #0 + bl sub_0201A7E8 + mov r0, #0x13 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r0, _0223F1C4 ; =0x0000025F + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, #0x34 + mov r2, #0 + mov r3, #6 + bl sub_0201A7E8 + mov r0, #0x13 + str r0, [sp] + mov r0, #0xd + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r0, _0223F1C4 ; =0x0000025F + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, #0x44 + mov r2, #0 + mov r3, #6 + bl sub_0201A7E8 + mov r0, #0xb + str r0, [sp] + mov r0, #0xc + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0223F1C8 ; =0x00000297 + add r1, r4, #0 + str r0, [sp, #0x10] + mov r2, #0 + ldr r0, [r4, #0] + add r1, #0x54 + add r3, r2, #0 + bl sub_0201A7E8 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xb + str r0, [sp, #0xc] + ldr r0, _0223F1CC ; =0x000002AF + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, #0x64 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + mov r0, #0xd + str r0, [sp] + mov r0, #0xc + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223F1D0 ; =0x00000337 + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, #0x74 + mov r2, #0 + mov r3, #0x13 + bl sub_0201A7E8 + mov r3, #1 + add r1, r4, #0 + str r3, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223F1D4 ; =0x00000367 + add r1, #0x84 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + mov r2, #0 + bl sub_0201A7E8 + mov r0, #0x13 + str r0, [sp] + mov r0, #7 + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223F1D8 ; =0x00000387 + add r1, r4, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r1, #0x94 + mov r2, #0 + mov r3, #0x18 + bl sub_0201A7E8 + mov r0, #0xc + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223F1D8 ; =0x00000387 + mov r2, #0 + str r0, [sp, #0x10] + ldr r0, [r4, #0] + add r4, #0xa4 + add r1, r4, #0 + mov r3, #1 + bl sub_0201A7E8 + add sp, #0x14 + pop {r3, r4, pc} + nop +_0223F1BC: .word 0x00000133 +_0223F1C0: .word 0x000001F3 +_0223F1C4: .word 0x0000025F +_0223F1C8: .word 0x00000297 +_0223F1CC: .word 0x000002AF +_0223F1D0: .word 0x00000337 +_0223F1D4: .word 0x00000367 +_0223F1D8: .word 0x00000387 + thumb_func_end ov84_0223F040 + + thumb_func_start ov84_0223F1DC +ov84_0223F1DC: ; 0x0223F1DC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_0223F1E2: + lsl r0, r4, #4 + add r0, r5, r0 + bl sub_0201A8FC + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0xb + blo _0223F1E2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov84_0223F1DC + + thumb_func_start ov84_0223F1F8 +ov84_0223F1F8: ; 0x0223F1F8 + push {r3, r4, r5, r6, r7, lr} + ldr r2, _0223F230 ; =0x0000018B + add r5, r0, #0 + mov r0, #1 + mov r1, #0x1a + mov r3, #6 + bl sub_0200B144 + ldr r7, _0223F234 ; =0x00000404 + add r6, r0, #0 + mov r4, #0 +_0223F20E: + add r0, r6, #0 + add r1, r4, #0 + bl sub_0200B1EC + lsl r1, r4, #2 + add r1, r5, r1 + str r0, [r1, r7] + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #8 + blo _0223F20E + add r0, r6, #0 + bl sub_0200B190 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F230: .word 0x0000018B +_0223F234: .word 0x00000404 + thumb_func_end ov84_0223F1F8 + + thumb_func_start ov84_0223F238 +ov84_0223F238: ; 0x0223F238 + push {r4, r5, r6, lr} + ldr r6, _0223F258 ; =0x00000404 + add r5, r0, #0 + mov r4, #0 +_0223F240: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + bl sub_020237BC + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #8 + blo _0223F240 + pop {r4, r5, r6, pc} + nop +_0223F258: .word 0x00000404 + thumb_func_end ov84_0223F238 + + thumb_func_start ov84_0223F25C +ov84_0223F25C: ; 0x0223F25C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r4, #0 + mov r6, #0xd + mov r7, #1 +_0223F268: + str r6, [sp] + ldr r2, _0223F2B8 ; =0x000001FF + str r7, [sp, #4] + add r2, r4, r2 + lsl r2, r2, #0x10 + lsl r3, r4, #0x18 + str r7, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, [r5, #0] + mov r1, #2 + lsr r2, r2, #0x10 + lsr r3, r3, #0x18 + bl sub_02019CB8 + mov r0, #0xe + str r0, [sp] + mov r0, #1 + ldr r2, _0223F2BC ; =0x00000223 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #3 + add r2, r4, r2 + str r0, [sp, #0xc] + lsl r2, r2, #0x10 + lsl r3, r4, #0x18 + ldr r0, [r5, #0] + mov r1, #2 + lsr r2, r2, #0x10 + lsr r3, r3, #0x18 + bl sub_02019CB8 + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0xc + blo _0223F268 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F2B8: .word 0x000001FF +_0223F2BC: .word 0x00000223 + thumb_func_end ov84_0223F25C + + thumb_func_start ov84_0223F2C0 +ov84_0223F2C0: ; 0x0223F2C0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0 + add r4, r2, #0 + add r2, r0, #0 + add r6, r1, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F2F8 ; =0x00010200 + lsr r3, r3, #1 + add r5, #0x24 + str r0, [sp, #8] + mov r1, #0 + add r0, r5, #0 + add r2, r6, #0 + sub r3, r4, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223F2F8: .word 0x00010200 + thumb_func_end ov84_0223F2C0 + + thumb_func_start ov84_0223F2FC +ov84_0223F2FC: ; 0x0223F2FC + push {r3, r4, r5, r6, r7, lr} + add r4, r0, #0 + add r0, #0x24 + mov r1, #0 + bl sub_0201ADA4 + add r2, r4, #0 + add r2, #0xc4 + ldr r6, [r2, #0] + ldr r1, _0223F38C ; =0x00000429 + add r2, r6, #0 + add r2, #0x64 + ldrb r3, [r2] + mov r2, #0xc + add r0, r4, r1 + add r5, r3, #0 + mul r5, r2 + add r3, r6, r5 + ldrb r3, [r3, #0xc] + lsl r3, r3, #2 + add r5, r4, r3 + add r3, r1, #0 + sub r3, #0x25 + ldr r7, [r5, r3] + ldrb r3, [r0] + sub r1, #0x25 + add r5, r3, #0 + mul r5, r2 + add r3, r6, r5 + ldrb r3, [r3, #0xc] + lsl r3, r3, #2 + add r3, r4, r3 + ldr r1, [r3, r1] + ldrb r3, [r0, #1] + ldrb r0, [r0, #3] + cmp r3, #0 + bne _0223F35E + mul r2, r0 + add r2, #0x92 + lsl r0, r2, #0x10 + lsr r5, r0, #0x10 + add r2, r5, #0 + sub r2, #0x60 + lsl r2, r2, #0x10 + add r0, r4, #0 + lsr r2, r2, #0x10 + bl ov84_0223F2C0 + b _0223F376 +_0223F35E: + mul r2, r0 + mov r0, #0x92 + sub r0, r0, r2 + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + add r2, r5, #0 + add r2, #0x60 + lsl r2, r2, #0x10 + add r0, r4, #0 + lsr r2, r2, #0x10 + bl ov84_0223F2C0 +_0223F376: + add r0, r4, #0 + add r1, r7, #0 + add r2, r5, #0 + bl ov84_0223F2C0 + add r4, #0x24 + add r0, r4, #0 + bl sub_0201ACCC + pop {r3, r4, r5, r6, r7, pc} + nop +_0223F38C: .word 0x00000429 + thumb_func_end ov84_0223F2FC + + thumb_func_start ov84_0223F390 +ov84_0223F390: ; 0x0223F390 + push {r3, r4, r5, lr} + add r0, #0xd4 + ldr r0, [r0, #0] + add r5, r1, #0 + mov r1, #0x15 + mov r2, #6 + bl sub_02006CB8 + add r1, r5, #0 + add r4, r0, #0 + bl sub_020A7164 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov84_0223F390 + + thumb_func_start ov84_0223F3AC +ov84_0223F3AC: ; 0x0223F3AC + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r1, #0 + add r1, sp, #0x18 + add r5, r0, #0 + add r6, r2, #0 + bl ov84_0223F390 + add r7, r0, #0 + cmp r6, #1 + bne _0223F3D8 + add r0, r5, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + mov r0, #0xc + mul r0, r4 + add r0, r1, r0 + ldrb r0, [r0, #0xc] + lsl r0, r0, #5 + add r0, #0x10 + lsl r0, r0, #0x18 + b _0223F3E8 +_0223F3D8: + add r0, r5, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + mov r0, #0xc + mul r0, r4 + add r0, r1, r0 + ldrb r0, [r0, #0xc] + lsl r0, r0, #0x1d +_0223F3E8: + lsr r2, r0, #0x18 + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0x10 + ldr r1, _0223F434 ; =0x00000427 + str r0, [sp, #4] + ldrb r0, [r5, r1] + add r1, r1, #1 + ldrb r1, [r5, r1] + add r3, r1, #0 + mul r3, r4 + add r0, r0, r3 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #0xa + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + add r0, r5, #0 + ldr r1, [r1, #0x14] + add r0, #0x54 + mov r3, #0 + bl sub_0201ADDC + add r5, #0x54 + add r0, r5, #0 + bl sub_0201A9A4 + mov r0, #6 + add r1, r7, #0 + bl sub_02018238 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F434: .word 0x00000427 + thumb_func_end ov84_0223F3AC + + thumb_func_start ov84_0223F438 +ov84_0223F438: ; 0x0223F438 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + add r1, sp, #0x1c + bl ov84_0223F390 + str r0, [sp, #0x18] + add r0, r5, #0 + add r0, #0x54 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, _0223F4E0 ; =0x00000424 + mov r4, #0 + ldrb r0, [r5, r0] + cmp r0, #0 + bls _0223F4CC + mov r7, #1 + add r6, r5, #0 + lsl r7, r7, #8 + add r6, #0x54 +_0223F462: + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r1, r0, #0 + add r1, #0x64 + ldrb r1, [r1] + cmp r4, r1 + bne _0223F482 + mov r1, #0xc + mul r1, r4 + add r0, r0, r1 + ldrb r0, [r0, #0xc] + lsl r0, r0, #5 + add r0, #0x10 + lsl r0, r0, #0x18 + b _0223F48C +_0223F482: + mov r1, #0xc + mul r1, r4 + add r0, r0, r1 + ldrb r0, [r0, #0xc] + lsl r0, r0, #0x1d +_0223F48C: + lsr r2, r0, #0x18 + str r7, [sp] + mov r0, #0x10 + str r0, [sp, #4] + ldr r0, _0223F4E4 ; =0x00000427 + ldrb r3, [r5, r0] + add r0, r0, #1 + ldrb r0, [r5, r0] + add r1, r0, #0 + mul r1, r4 + add r0, r3, r1 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + mov r0, #0xa + str r0, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x1c] + add r0, r6, #0 + ldr r1, [r1, #0x14] + mov r3, #0 + bl sub_0201ADDC + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + ldr r0, _0223F4E0 ; =0x00000424 + ldrb r0, [r5, r0] + cmp r4, r0 + blo _0223F462 +_0223F4CC: + add r5, #0x54 + add r0, r5, #0 + bl sub_0201A9A4 + ldr r1, [sp, #0x18] + mov r0, #6 + bl sub_02018238 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223F4E0: .word 0x00000424 +_0223F4E4: .word 0x00000427 + thumb_func_end ov84_0223F438 + + thumb_func_start ov84_0223F4E8 +ov84_0223F4E8: ; 0x0223F4E8 + push {r3, r4, r5, lr} + lsl r1, r1, #0x10 + add r4, r2, #0 + lsr r1, r1, #0x10 + mov r2, #0 + add r5, r0, #0 + bl ov84_0223BE5C + add r2, r0, #0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200B70C + pop {r3, r4, r5, pc} + thumb_func_end ov84_0223F4E8 + + thumb_func_start ov84_0223F508 +ov84_0223F508: ; 0x0223F508 + push {r3, r4, r5, lr} + lsl r1, r1, #0x10 + add r4, r2, #0 + lsr r1, r1, #0x10 + mov r2, #0 + add r5, r0, #0 + bl ov84_0223BE5C + add r2, r0, #0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200B77C + pop {r3, r4, r5, pc} + thumb_func_end ov84_0223F508 + + thumb_func_start ov84_0223F528 +ov84_0223F528: ; 0x0223F528 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _0223F57C ; =0x0000FFFF + add r6, r1, #0 + cmp r6, r0 + beq _0223F54A + mov r0, #0x82 + mov r1, #6 + bl sub_02023790 + add r1, r6, #0 + mov r2, #6 + add r4, r0, #0 + bl sub_0207CFC8 + b _0223F558 +_0223F54A: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x5e + bl sub_0200B1EC + add r4, r0, #0 +_0223F558: + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F580 ; =0x000F0E00 + add r5, #0x14 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r4, #0 + mov r3, #0x28 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r4, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223F57C: .word 0x0000FFFF +_0223F580: .word 0x000F0E00 + thumb_func_end ov84_0223F528 + + thumb_func_start ov84_0223F584 +ov84_0223F584: ; 0x0223F584 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + add r4, r5, #0 + add r0, r1, #0 + add r4, #0x14 + bl sub_0207D268 + str r0, [sp, #0x10] + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x62 + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x56 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x59 + bl sub_0200B1EC + add r6, r0, #0 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r4, #0 + mov r3, #0x60 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x57 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x60 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x58 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x20 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + mov r1, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r2, r6, #0 + mov r3, #0x60 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + ldr r0, [sp, #0x10] + mov r1, #0 + bl sub_020790DC + add r7, r0, #0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x5a + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + add r2, r7, #0 + mov r3, #2 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + mov r2, #0xfe + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r3, #0x30 + bl sub_0201D78C + ldr r0, [sp, #0x10] + mov r1, #2 + bl sub_020790C4 + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + cmp r7, #1 + bhi _0223F6FA + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x18 + bl sub_0200B1EC + b _0223F706 +_0223F6FA: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x5b + bl sub_0200B1EC +_0223F706: + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r7, #0 + mov r3, #3 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + mov r2, #0xfe + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r3, #0xa0 + bl sub_0201D78C + ldr r0, [sp, #0x10] + mov r1, #4 + bl sub_020790C4 + lsl r0, r0, #0x10 + lsr r7, r0, #0x10 + bne _0223F770 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x18 + bl sub_0200B1EC + b _0223F77C +_0223F770: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x5b + bl sub_0200B1EC +_0223F77C: + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r2, r7, #0 + mov r3, #3 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x20 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223F7D0 ; =0x000F0E00 + mov r2, #0xfe + str r0, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r3, #0xa0 + bl sub_0201D78C + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223F7D0: .word 0x000F0E00 + thumb_func_end ov84_0223F584 + + thumb_func_start ov84_0223F7D4 +ov84_0223F7D4: ; 0x0223F7D4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x26 + bl sub_0200B1EC + mov r1, #0xff + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0x25 + bl sub_0200B1EC + mov r1, #1 + lsl r1, r1, #0xa + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov84_0223F7D4 + + thumb_func_start ov84_0223F800 +ov84_0223F800: ; 0x0223F800 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xff + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020237BC + mov r0, #1 + lsl r0, r0, #0xa + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov84_0223F800 + + thumb_func_start ov84_0223F81C +ov84_0223F81C: ; 0x0223F81C + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r0, #0 + str r1, [sp, #0x10] + add r0, #0xc4 + ldr r0, [r0, #0] + add r4, r2, #0 + add r1, r0, #0 + add r1, #0x64 + ldrb r2, [r1] + mov r1, #0xc + add r6, r3, #0 + mul r1, r2 + add r0, r0, r1 + ldrb r0, [r0, #0xc] + cmp r0, #3 + str r4, [sp] + bne _0223F858 + mov r2, #0xff + str r2, [sp, #4] + str r6, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r5, #4 + mov r3, #0x73 + bl sub_0201D78C + b _0223F86E +_0223F858: + mov r2, #0xff + str r2, [sp, #4] + str r6, [sp, #8] + mov r1, #0 + str r1, [sp, #0xc] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r5, #4 + mov r3, #0x6d + bl sub_0201D78C +_0223F86E: + mov r0, #0xa + mov r1, #6 + bl sub_02023790 + mov r1, #0 + add r7, r0, #0 + str r1, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [sp, #0x10] + mov r3, #3 + bl sub_0200B60C + mov r0, #0x46 + mov r2, #1 + lsl r0, r0, #2 + lsl r2, r2, #0xa + ldr r0, [r5, r0] + ldr r2, [r5, r2] + add r1, r7, #0 + bl sub_0200C388 + mov r0, #0 + add r1, r7, #0 + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r4, #0x86 + str r6, [sp, #8] + mov r1, #0 + add r0, r5, #4 + add r2, r7, #0 + sub r3, r4, r3 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r7, #0 + bl sub_020237BC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov84_0223F81C + + thumb_func_start ov84_0223F8D0 +ov84_0223F8D0: ; 0x0223F8D0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r1, #0 + add r4, r2, #0 + add r5, r0, #0 + mov r0, #0x69 + ldrh r2, [r6] + lsl r0, r0, #2 + cmp r2, r0 + bhs _0223F91A + add r1, r0, #0 + sub r1, #0x5d + sub r1, r2, r1 + lsl r1, r1, #0x10 + lsr r2, r1, #0x10 + mov r1, #2 + str r1, [sp] + add r3, r5, #4 + str r3, [sp, #4] + mov r3, #0 + str r3, [sp, #8] + add r3, r4, #5 + str r3, [sp, #0xc] + sub r0, #0x94 + ldr r0, [r5, r0] + add r3, r1, #0 + bl sub_0200C648 + lsl r2, r4, #0x10 + ldrh r1, [r6, #2] + ldr r3, _0223F948 ; =0x00010200 + add r0, r5, #0 + lsr r2, r2, #0x10 + bl ov84_0223F81C + add sp, #0x10 + pop {r4, r5, r6, pc} +_0223F91A: + sub r1, r0, #1 + sub r1, r2, r1 + add r2, r5, #4 + str r2, [sp] + mov r2, #0x10 + str r2, [sp, #4] + add r2, r4, #5 + str r2, [sp, #8] + sub r0, #0x94 + lsl r1, r1, #0x10 + ldr r0, [r5, r0] + lsr r1, r1, #0x10 + mov r2, #2 + mov r3, #1 + bl sub_0200C5BC + add r0, r5, #0 + add r1, r4, #0 + bl ov84_0223F9B0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223F948: .word 0x00010200 + thumb_func_end ov84_0223F8D0 + + thumb_func_start ov84_0223F94C +ov84_0223F94C: ; 0x0223F94C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r1, #0 + add r5, r0, #0 + ldrh r0, [r4] + add r6, r2, #0 + bl sub_0207D344 + mov r1, #2 + add r2, r0, #0 + str r1, [sp] + add r0, r5, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r6, #5 + str r0, [sp, #0xc] + mov r0, #0x11 + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r2, r2, #1 + add r3, r1, #0 + bl sub_0200C648 + lsl r2, r6, #0x10 + ldrh r1, [r4, #2] + ldr r3, _0223F990 ; =0x00010200 + add r0, r5, #0 + lsr r2, r2, #0x10 + bl ov84_0223F81C + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223F990: .word 0x00010200 + thumb_func_end ov84_0223F94C + + thumb_func_start ov84_0223F994 +ov84_0223F994: ; 0x0223F994 + push {r3, r4, r5, lr} + add r0, #0xd4 + ldr r0, [r0, #0] + add r5, r1, #0 + mov r1, #0x26 + mov r2, #6 + bl sub_02006CB8 + add r1, r5, #0 + add r4, r0, #0 + bl sub_020A7164 + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov84_0223F994 + + thumb_func_start ov84_0223F9B0 +ov84_0223F9B0: ; 0x0223F9B0 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r4, r1, #0 + add r1, sp, #0x18 + add r5, r0, #0 + bl ov84_0223F994 + add r6, r0, #0 + mov r0, #0x40 + str r0, [sp] + mov r0, #0x10 + lsl r1, r4, #0x10 + str r0, [sp, #4] + mov r3, #0 + str r3, [sp, #8] + lsr r1, r1, #0x10 + str r1, [sp, #0xc] + mov r1, #0x18 + str r1, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + add r0, r5, #4 + ldr r1, [r1, #0x14] + mov r2, #0x28 + bl sub_0201ADDC + mov r0, #6 + add r1, r6, #0 + bl sub_02018238 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + thumb_func_end ov84_0223F9B0 + + thumb_func_start ov84_0223F9F0 +ov84_0223F9F0: ; 0x0223F9F0 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + mov r0, #0x45 + lsl r0, r0, #2 + add r4, r1, #0 + ldr r0, [r5, r0] + mov r1, #0x29 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x88 + str r0, [sp] + mov r0, #0x10 + mov r1, #0 + lsl r3, r4, #0x10 + str r0, [sp, #4] + add r0, r5, #4 + add r2, r1, #0 + lsr r3, r3, #0x10 + bl sub_0201AE78 + mov r1, #0 + str r4, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223FA40 ; =0x00010200 + add r2, r6, #0 + str r0, [sp, #8] + add r0, r5, #4 + add r3, r1, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223FA40: .word 0x00010200 + thumb_func_end ov84_0223F9F0 + + thumb_func_start ov84_0223FA44 +ov84_0223FA44: ; 0x0223FA44 + push {r3, r4, r5, r6, lr} + sub sp, #0x1c + add r4, r1, #0 + add r1, sp, #0x18 + add r5, r0, #0 + bl ov84_0223F994 + add r6, r0, #0 + mov r0, #0x40 + str r0, [sp] + mov r0, #0x10 + mov r2, #0 + str r0, [sp, #4] + mov r1, #0x60 + str r1, [sp, #8] + lsl r1, r4, #0x10 + lsr r1, r1, #0x10 + str r1, [sp, #0xc] + mov r1, #0x28 + str r1, [sp, #0x10] + str r0, [sp, #0x14] + ldr r1, [sp, #0x18] + add r0, r5, #4 + ldr r1, [r1, #0x14] + add r3, r2, #0 + bl sub_0201ADDC + mov r0, #6 + add r1, r6, #0 + bl sub_02018238 + add sp, #0x1c + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov84_0223FA44 + + thumb_func_start ov84_0223FA88 +ov84_0223FA88: ; 0x0223FA88 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B1EC + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x10 + ldr r0, [r4, r1] + mov r1, #6 + bl sub_0200B1EC + mov r1, #0x4a + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x14 + ldr r0, [r4, r1] + mov r1, #0x10 + bl sub_0200B1EC + mov r1, #0x4b + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x18 + ldr r0, [r4, r1] + mov r1, #0x5f + bl sub_0200B1EC + mov r1, #0x13 + lsl r1, r1, #4 + str r0, [r4, r1] + sub r1, #0x1c + ldr r0, [r4, r1] + mov r1, #0x60 + bl sub_0200B1EC + mov r1, #0x4d + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x20 + ldr r0, [r4, r1] + mov r1, #1 + bl sub_0200B1EC + mov r1, #0x4e + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x24 + ldr r0, [r4, r1] + mov r1, #2 + bl sub_0200B1EC + mov r1, #0x4f + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x28 + ldr r0, [r4, r1] + mov r1, #0x12 + bl sub_0200B1EC + mov r1, #5 + lsl r1, r1, #6 + str r0, [r4, r1] + sub r1, #0x2c + ldr r0, [r4, r1] + mov r1, #3 + bl sub_0200B1EC + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x30 + ldr r0, [r4, r1] + mov r1, #4 + bl sub_0200B1EC + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x34 + ldr r0, [r4, r1] + mov r1, #5 + bl sub_0200B1EC + mov r1, #0x53 + lsl r1, r1, #2 + str r0, [r4, r1] + sub r1, #0x38 + ldr r0, [r4, r1] + mov r1, #8 + bl sub_0200B1EC + mov r1, #0x15 + lsl r1, r1, #4 + str r0, [r4, r1] + pop {r4, pc} + thumb_func_end ov84_0223FA88 + + thumb_func_start ov84_0223FB50 +ov84_0223FB50: ; 0x0223FB50 + push {r4, r5, r6, lr} + mov r6, #0x49 + add r5, r0, #0 + mov r4, #0 + lsl r6, r6, #2 +_0223FB5A: + lsl r0, r4, #2 + add r0, r5, r0 + ldr r0, [r0, r6] + bl sub_020237BC + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0xc + blo _0223FB5A + pop {r4, r5, r6, pc} + thumb_func_end ov84_0223FB50 + + thumb_func_start ov84_0223FB70 +ov84_0223FB70: ; 0x0223FB70 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r6, r1, #0 + add r1, r0, #0 + add r1, #0x64 + add r7, r2, #0 + ldrb r2, [r1] + mov r1, #0xc + mul r1, r2 + add r0, r0, r1 + ldrb r0, [r0, #0xc] + cmp r0, #4 + bne _0223FBC0 + lsl r0, r7, #1 + mov r3, #0x17 + sub r1, r3, r0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #8 + lsl r0, r0, #0x18 + str r1, [sp, #4] + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223FD78 ; =0x00000337 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, #0xb4 + mov r2, #0 + bl sub_0201A7E8 + mov r0, #4 + str r0, [sp, #0x14] + b _0223FBF0 +_0223FBC0: + lsl r0, r7, #1 + mov r1, #0x17 + sub r1, r1, r0 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp] + mov r1, #7 + lsl r0, r0, #0x18 + str r1, [sp, #4] + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #3 + str r0, [sp, #0xc] + ldr r0, _0223FD78 ; =0x00000337 + add r1, r5, #0 + str r0, [sp, #0x10] + ldr r0, [r5, #0] + add r1, #0xb4 + mov r2, #0 + mov r3, #0x18 + bl sub_0201A7E8 + mov r0, #3 + str r0, [sp, #0x14] +_0223FBF0: + add r0, r7, #0 + mov r1, #6 + bl sub_02013A04 + mov r1, #0x55 + lsl r1, r1, #2 + mov r4, #0 + str r0, [r5, r1] + cmp r7, #0 + ble _0223FC2C +_0223FC04: + ldrb r0, [r6, r4] + bl ov84_0223D84C + ldrb r1, [r6, r4] + add r2, r0, #0 + mov r0, #0x55 + lsl r1, r1, #2 + add r3, r5, r1 + mov r1, #0x49 + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r3, r1] + bl sub_02013A6C + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, r7 + blt _0223FC04 +_0223FC2C: + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + str r0, [sp, #0x1c] + add r0, r5, #0 + add r0, #0xb4 + str r0, [sp, #0x20] + add r0, sp, #0x1c + strb r1, [r0, #8] + mov r1, #1 + strb r1, [r0, #9] + strb r7, [r0, #0xa] + ldrb r2, [r0, #0xb] + mov r1, #0xf + bic r2, r1 + strb r2, [r0, #0xb] + ldrb r2, [r0, #0xb] + mov r1, #0x30 + bic r2, r1 + strb r2, [r0, #0xb] + cmp r7, #4 + ldrb r2, [r0, #0xb] + blo _0223FC68 + mov r1, #0xc0 + bic r2, r1 + mov r1, #0x40 + orr r1, r2 + strb r1, [r0, #0xb] + b _0223FC6E +_0223FC68: + mov r1, #0xc0 + bic r2, r1 + strb r2, [r0, #0xb] +_0223FC6E: + mov r0, #6 + str r0, [sp] + mov r0, #2 + mov r2, #0 + str r0, [sp, #4] + add r0, sp, #0x1c + mov r1, #8 + add r3, r2, #0 + bl sub_02001AF4 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r5, r1] + add r0, r5, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + mov r3, #0xc + add r0, r2, #0 + add r0, #0x64 + ldrb r0, [r0] + add r1, r0, #0 + mul r1, r3 + add r0, r2, r1 + ldrb r0, [r0, #0xc] + cmp r0, #3 + bne _0223FCD8 + add r0, r5, #0 + add r0, #0x14 + mov r1, #0 + bl sub_0201ADA4 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r0, r5, #0 + add r1, #0x66 + ldrh r1, [r1] + bl ov84_0223F584 + add r0, r5, #0 + add r0, #0x14 + bl sub_0201A9A4 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r0, r5, #0 + add r1, #0x66 + ldrh r1, [r1] + mov r2, #1 + bl ov84_02240D5C + b _0223FD5E +_0223FCD8: + ldr r0, [sp, #0x14] + add r4, r5, #4 + lsl r6, r0, #4 + ldr r2, _0223FD7C ; =0x000003D9 + add r0, r4, r6 + mov r1, #1 + bl sub_0200E060 + add r0, r4, r6 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x2a + bl sub_0200B1EC + str r0, [sp, #0x18] + mov r0, #0x38 + mov r1, #6 + bl sub_02023790 + add r7, r0, #0 + add r0, r5, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + add r0, r1, #4 + add r1, #0x64 + ldrb r2, [r1] + mov r1, #0xc + mul r1, r2 + add r1, r0, r1 + ldrh r2, [r1, #6] + ldrh r1, [r1, #4] + add r0, r5, #0 + add r1, r2, r1 + sub r1, r1, #1 + mov r2, #0 + bl ov84_0223F4E8 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + ldr r2, [sp, #0x18] + add r1, r7, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r4, r6 + mov r1, #1 + add r2, r7, #0 + str r3, [sp, #8] + bl sub_0201D738 + add r0, r7, #0 + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + add r0, r4, r6 + bl sub_0201A9A4 +_0223FD5E: + add r0, r5, #0 + ldr r2, _0223FD80 ; =0x000003F7 + add r0, #0xb4 + mov r1, #1 + mov r3, #0xe + bl sub_0200DC48 + add r5, #0xb4 + add r0, r5, #0 + bl sub_0201A9A4 + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223FD78: .word 0x00000337 +_0223FD7C: .word 0x000003D9 +_0223FD80: .word 0x000003F7 + thumb_func_end ov84_0223FB70 + + thumb_func_start ov84_0223FD84 +ov84_0223FD84: ; 0x0223FD84 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + add r0, r2, #0 + add r0, #0x64 + ldrb r1, [r0] + mov r0, #0xc + mul r0, r1 + add r0, r2, r0 + ldrb r0, [r0, #0xc] + cmp r0, #4 + bne _0223FDA2 + mov r1, #4 + b _0223FDA4 +_0223FDA2: + mov r1, #3 +_0223FDA4: + cmp r0, #3 + beq _0223FDBA + lsl r6, r1, #4 + add r4, r5, #4 + add r0, r4, r6 + mov r1, #1 + bl sub_0200E084 + add r0, r4, r6 + bl sub_0201AD10 +_0223FDBA: + add r0, r5, #0 + add r0, #0xb4 + mov r1, #1 + bl sub_0200DC9C + add r0, r5, #0 + add r0, #0xb4 + bl sub_0201AD10 + mov r0, #0x56 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02001BC4 + mov r0, #0x55 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02013A3C + add r0, r5, #0 + add r0, #0xb4 + bl sub_0201A8FC + add r0, r5, #0 + add r0, #0x14 + mov r1, #0 + bl sub_0201ADA4 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r0, r5, #0 + add r1, #0x66 + ldrh r1, [r1] + bl ov84_0223F528 + add r0, r5, #0 + add r0, #0x14 + bl sub_0201A9A4 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl ov84_02240D5C + pop {r4, r5, r6, pc} + thumb_func_end ov84_0223FD84 + + thumb_func_start ov84_0223FE18 +ov84_0223FE18: ; 0x0223FE18 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r0, #0x14 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x2d + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x82 + mov r1, #6 + bl sub_02023790 + ldr r1, _0223FE8C ; =0x0000047B + add r4, r0, #0 + ldrb r1, [r5, r1] + add r0, r5, #0 + mov r2, #0 + sub r1, r1, #1 + bl ov84_0223F4E8 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r1, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + ldr r0, _0223FE90 ; =0x000F0E00 + add r2, r4, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0x14 + mov r3, #0x28 + str r1, [sp, #0xc] + bl sub_0201D78C + add r5, #0x14 + add r0, r5, #0 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223FE8C: .word 0x0000047B +_0223FE90: .word 0x000F0E00 + thumb_func_end ov84_0223FE18 + + thumb_func_start ov84_0223FE94 +ov84_0223FE94: ; 0x0223FE94 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r2, _0223FF3C ; =0x000003F7 + add r5, r0, #0 + add r0, #0x94 + mov r1, #1 + mov r3, #0xe + bl sub_0200DC48 + add r0, r5, #0 + bl ov84_0223FF44 + add r0, r5, #0 + ldr r2, _0223FF40 ; =0x000003D9 + add r0, #0x34 + mov r1, #1 + mov r3, #0xc + bl sub_0200E060 + add r0, r5, #0 + add r0, #0x34 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x34 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #0x38 + mov r1, #6 + bl sub_02023790 + add r4, r0, #0 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r2, r0, #4 + add r0, #0x64 + ldrb r1, [r0] + mov r0, #0xc + mul r0, r1 + add r1, r2, r0 + ldrh r2, [r1, #6] + ldrh r1, [r1, #4] + add r0, r5, #0 + add r1, r2, r1 + sub r1, r1, #1 + mov r2, #0 + bl ov84_0223F4E8 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x34 + mov r1, #1 + add r2, r4, #0 + str r3, [sp, #8] + bl sub_0201D738 + add r5, #0x34 + add r0, r5, #0 + bl sub_0201A9A4 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0223FF3C: .word 0x000003F7 +_0223FF40: .word 0x000003D9 + thumb_func_end ov84_0223FE94 + + thumb_func_start ov84_0223FF44 +ov84_0223FF44: ; 0x0223FF44 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r5, #0 + add r4, #0x94 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x54 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, _0223FFBC ; =0x00000488 + mov r0, #0x46 + lsl r0, r0, #2 + ldrsh r2, [r5, r2] + ldr r0, [r5, r0] + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + mov r2, #0xfe + str r1, [sp, #8] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r3, #0x10 + bl sub_0201D738 + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_0223FFBC: .word 0x00000488 + thumb_func_end ov84_0223FF44 + + thumb_func_start ov84_0223FFC0 +ov84_0223FFC0: ; 0x0223FFC0 + push {r4, lr} + add r4, r0, #0 + add r0, #0x34 + mov r1, #1 + bl sub_0200E084 + add r0, r4, #0 + add r0, #0x94 + mov r1, #1 + bl sub_0200DC9C + add r0, r4, #0 + add r0, #0x34 + bl sub_0201AD10 + add r0, r4, #0 + add r0, #0x94 + bl sub_0201AD10 + add r4, #0x14 + add r0, r4, #0 + bl sub_0201A9A4 + pop {r4, pc} + thumb_func_end ov84_0223FFC0 + + thumb_func_start ov84_0223FFF0 +ov84_0223FFF0: ; 0x0223FFF0 + push {r3, r4, r5, lr} + sub sp, #8 + ldr r2, _02240094 ; =0x000003D9 + add r5, r0, #0 + add r0, #0x64 + mov r1, #1 + mov r3, #0xc + bl sub_0200E060 + add r0, r5, #0 + add r0, #0x64 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x36 + bl sub_0200B1EC + add r4, r0, #0 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r2, r0, #4 + add r0, #0x64 + ldrb r1, [r0] + mov r0, #0xc + mul r0, r1 + add r1, r2, r0 + ldr r0, _02240098 ; =0x00000488 + ldrsh r0, [r5, r0] + cmp r0, #1 + bne _02240046 + ldrh r2, [r1, #6] + ldrh r1, [r1, #4] + add r0, r5, #0 + add r1, r2, r1 + sub r1, r1, #1 + mov r2, #0 + bl ov84_0223F4E8 + b _02240056 +_02240046: + ldrh r2, [r1, #6] + ldrh r1, [r1, #4] + add r0, r5, #0 + add r1, r2, r1 + sub r1, r1, #1 + mov r2, #0 + bl ov84_0223F508 +_02240056: + mov r0, #0 + str r0, [sp] + mov r1, #1 + mov r0, #0x46 + ldr r2, _02240098 ; =0x00000488 + str r1, [sp, #4] + lsl r0, r0, #2 + ldrsh r2, [r5, r2] + ldr r0, [r5, r0] + mov r3, #3 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + add r0, r4, #0 + bl sub_020237BC + add r0, r5, #0 + bl ov84_022400A0 + ldr r1, _0224009C ; =0x00000426 + strb r0, [r5, r1] + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02240094: .word 0x000003D9 +_02240098: .word 0x00000488 +_0224009C: .word 0x00000426 + thumb_func_end ov84_0223FFF0 + + thumb_func_start ov84_022400A0 +ov84_022400A0: ; 0x022400A0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #1 + bl sub_02002AC8 + mov r0, #0 + bl sub_02002AE4 + add r0, r4, #0 + add r0, #0xd0 + ldr r0, [r0, #0] + bl sub_02027AC0 + mov r3, #0 + str r3, [sp] + str r0, [sp, #4] + ldr r0, _022400DC ; =ov84_022400E0 + mov r2, #0xfe + str r0, [sp, #8] + lsl r2, r2, #2 + add r0, r4, #0 + ldr r2, [r4, r2] + add r0, #0x64 + mov r1, #1 + bl sub_0201D738 + add sp, #0xc + pop {r3, r4, pc} + nop +_022400DC: .word ov84_022400E0 + thumb_func_end ov84_022400A0 + + thumb_func_start ov84_022400E0 +ov84_022400E0: ; 0x022400E0 + push {r3, lr} + cmp r1, #4 + bhi _02240118 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022400F2: ; jump table + .short _02240118 - _022400F2 - 2 ; case 0 + .short _022400FC - _022400F2 - 2 ; case 1 + .short _02240102 - _022400F2 - 2 ; case 2 + .short _02240108 - _022400F2 - 2 ; case 3 + .short _02240110 - _022400F2 - 2 ; case 4 +_022400FC: + bl sub_020057E0 + pop {r3, pc} +_02240102: + bl sub_020061E4 + pop {r3, pc} +_02240108: + ldr r0, _0224011C ; =0x0000060D + bl sub_02005748 + b _02240118 +_02240110: + ldr r0, _0224011C ; =0x0000060D + bl sub_020057D4 + pop {r3, pc} +_02240118: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 +_0224011C: .word 0x0000060D + thumb_func_end ov84_022400E0 + + thumb_func_start ov84_02240120 +ov84_02240120: ; 0x02240120 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r0, #6 + str r0, [sp] + ldr r0, [r4, #0] + ldr r1, _02240140 ; =0x02241150 + ldr r2, _02240144 ; =0x000003F7 + mov r3, #0xe + bl sub_02002100 + mov r1, #0x56 + lsl r1, r1, #2 + str r0, [r4, r1] + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02240140: .word 0x02241150 +_02240144: .word 0x000003F7 + thumb_func_end ov84_02240120 + + thumb_func_start ov84_02240148 +ov84_02240148: ; 0x02240148 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r5, #0 + add r4, #0x74 + cmp r1, #0 + bne _02240162 + ldr r2, _0224023C ; =0x000003F7 + add r0, r4, #0 + mov r1, #1 + mov r3, #0xe + bl sub_0200DC48 +_02240162: + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x50 + bl sub_0200B1EC + mov r3, #2 + add r6, r0, #0 + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r2, _02240240 ; =0x00000488 + mov r0, #0x46 + lsl r0, r0, #2 + ldrsh r2, [r5, r2] + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + mov r2, #0xfe + str r1, [sp, #8] + lsl r2, r2, #2 + ldr r2, [r5, r2] + add r0, r4, #0 + add r3, r1, #0 + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x51 + bl sub_0200B1EC + add r6, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + ldr r2, _02240244 ; =0x0000048C + mov r0, #0x46 + ldr r3, [r5, r2] + sub r2, r2, #4 + ldrsh r2, [r5, r2] + lsl r0, r0, #2 + ldr r0, [r5, r0] + mul r2, r3 + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + mov r1, #0xfe + lsl r1, r1, #2 + mov r0, #0 + ldr r1, [r5, r1] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #8 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + mov r2, #0xfe + str r1, [sp, #8] + lsl r2, r2, #2 + ldr r2, [r5, r2] + mov r5, #0x60 + add r0, r4, #0 + sub r3, r5, r3 + bl sub_0201D738 + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224023C: .word 0x000003F7 +_02240240: .word 0x00000488 +_02240244: .word 0x0000048C + thumb_func_end ov84_02240148 + + thumb_func_start ov84_02240248 +ov84_02240248: ; 0x02240248 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r5, #0 + add r4, #0x84 + cmp r1, #0 + bne _02240294 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r2, _02240324 ; =0x000003F7 + add r0, r4, #0 + mov r1, #1 + mov r3, #0xe + bl sub_0200DC48 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x4e + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + b _022402A6 +_02240294: + mov r0, #0x50 + str r0, [sp] + mov r3, #0x10 + add r0, r4, #0 + mov r1, #0xf + mov r2, #0 + str r3, [sp, #4] + bl sub_0201AE78 +_022402A6: + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x4f + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + add r0, #0xcc + ldr r0, [r0, #0] + bl sub_02025F74 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + mov r3, #6 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + mov r1, #0xfe + lsl r1, r1, #2 + mov r0, #0 + ldr r1, [r5, r1] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + mov r2, #0xfe + str r1, [sp, #8] + lsl r2, r2, #2 + ldr r2, [r5, r2] + mov r5, #0x50 + add r0, r4, #0 + sub r3, r5, r3 + bl sub_0201D738 + add r0, r4, #0 + bl sub_0201A9A4 + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + nop +_02240324: .word 0x000003F7 + thumb_func_end ov84_02240248 + + thumb_func_start ov84_02240328 +ov84_02240328: ; 0x02240328 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r4, r5, #0 + add r4, #0xa4 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + ldr r2, _022403F0 ; =0x000003F7 + add r0, r4, #0 + mov r1, #1 + mov r3, #0xe + bl sub_0200DC48 + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x6c + bl sub_0200B1EC + mov r1, #0 + add r6, r0, #0 + str r1, [sp] + mov r0, #0xff + str r0, [sp, #4] + add r0, r4, #0 + add r2, r6, #0 + add r3, r1, #0 + str r1, [sp, #8] + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + mov r0, #0x45 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x6d + bl sub_0200B1EC + add r6, r0, #0 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_0202AB28 + bl sub_0202AC98 + add r2, r0, #0 + mov r0, #1 + str r0, [sp] + str r0, [sp, #4] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + mov r3, #3 + bl sub_0200B60C + mov r0, #0x46 + mov r1, #0xfe + lsl r0, r0, #2 + lsl r1, r1, #2 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + mov r1, #0xfe + lsl r1, r1, #2 + mov r0, #0 + ldr r1, [r5, r1] + add r2, r0, #0 + bl sub_02002D7C + add r3, r0, #0 + mov r0, #0x10 + str r0, [sp] + mov r0, #0xff + str r0, [sp, #4] + mov r1, #0 + mov r2, #0xfe + str r1, [sp, #8] + lsl r2, r2, #2 + ldr r2, [r5, r2] + mov r5, #0x58 + add r0, r4, #0 + sub r3, r5, r3 + bl sub_0201D738 + add r0, r4, #0 + bl sub_0201A9A4 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022403F0: .word 0x000003F7 + thumb_func_end ov84_02240328 + + .rodata + + + .global Unk_ov84_02241150 +Unk_ov84_02241150: ; 0x02241150 + .incbin "incbin/overlay84_rodata.bin", 0x2BC, 0x8 + diff --git a/asm/ov84_022403F4.s b/asm/ov84_022403F4.s new file mode 100644 index 000000000..8ada1da92 --- /dev/null +++ b/asm/ov84_022403F4.s @@ -0,0 +1,1348 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov84_022403F4 +ov84_022403F4: ; 0x022403F4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0x20 + mov r1, #6 + bl sub_0201DBEC + add r0, r4, #0 + bl ov84_02240424 + add r0, r4, #0 + bl ov84_022404C0 + add r0, r4, #0 + bl ov84_02240950 + pop {r4, pc} + thumb_func_end ov84_022403F4 + + thumb_func_start ov84_02240424 +ov84_02240424: ; 0x02240424 + push {r3, r4, r5, r6, lr} + sub sp, #0x4c + ldr r3, _022404B4 ; =0x02241178 + add r2, sp, #0x34 + add r4, r0, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r0, #6 + bl sub_0200C6E4 + add r1, r4, #0 + add r1, #0xd8 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + bl sub_0200C704 + add r1, r4, #0 + add r1, #0xdc + add r2, sp, #0x14 + ldr r5, _022404B8 ; =0x02241190 + str r0, [r1, #0] + ldmia r5!, {r0, r1} + add r3, r2, #0 + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r5!, {r0, r1} + ldr r6, _022404BC ; =0x02241164 + stmia r2!, {r0, r1} + add r5, sp, #0 + ldmia r6!, {r0, r1} + add r2, r5, #0 + stmia r5!, {r0, r1} + ldmia r6!, {r0, r1} + stmia r5!, {r0, r1} + ldr r0, [r6, #0] + add r1, r3, #0 + str r0, [r5, #0] + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r3, #0x20 + bl sub_0200C73C + add r0, r4, #0 + add r1, r4, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0xc + bl sub_0200C7C0 + add r0, r4, #0 + add r0, #0xd8 + add r4, #0xdc + ldr r0, [r0, #0] + ldr r1, [r4, #0] + add r2, sp, #0x34 + bl sub_0200CB30 + add sp, #0x4c + pop {r3, r4, r5, r6, pc} + nop +_022404B4: .word 0x02241178 +_022404B8: .word 0x02241190 +_022404BC: .word 0x02241164 + thumb_func_end ov84_02240424 + + thumb_func_start ov84_022404C0 +ov84_022404C0: ; 0x022404C0 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r0, _02240844 ; =0x00000425 + ldrb r0, [r5, r0] + cmp r0, #0 + bne _022404D4 + mov r3, #2 + mov r4, #3 + b _022404D8 +_022404D4: + mov r3, #6 + mov r4, #7 +_022404D8: + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02240848 ; =0x0000C0F9 + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _0224084C ; =0x0000C0FA + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x19 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02240850 ; =0x0000C0FB + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x1c + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02240854 ; =0x0000C0FC + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x1f + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02240858 ; =0x0000C0FD + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0xa + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + ldr r0, _0224085C ; =0x0000C0FE + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x24 + bl sub_0200CC3C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xc1 + lsl r0, r0, #8 + str r0, [sp, #8] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x3e + mov r3, #4 + bl sub_0200CBDC + mov r0, #0 + mov r1, #1 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, _02240860 ; =0x0000C0FF + add r1, r5, #0 + str r0, [sp, #8] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x10 + bl sub_0200CBDC + ldr r0, _02240864 ; =0x0000C101 + add r1, r5, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #1 + mov r3, #0 + bl sub_0207C948 + ldr r0, _02240868 ; =0x0000C102 + add r1, r5, #0 + str r0, [sp] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #1 + mov r3, #0 + bl sub_0207CAC4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, _02240848 ; =0x0000C0F9 + add r1, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + add r3, r4, #0 + bl sub_0200CD0C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _0224084C ; =0x0000C0FA + add r1, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x14 + bl sub_0200CD0C + mov r0, #0 + mov r1, #2 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + str r0, [sp, #8] + ldr r0, _02240854 ; =0x0000C0FC + add r1, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x10 + bl sub_0200CC9C + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r0, _02240858 ; =0x0000C0FD + add r1, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x3e + mov r3, #0xa + bl sub_0200CC9C + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r3, _0224085C ; =0x0000C0FE + mov r2, #1 + bl sub_0207C97C + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + ldr r0, _02240850 ; =0x0000C0FB + add r1, r5, #0 + str r0, [sp, #0xc] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x25 + bl sub_0200CD0C + mov r0, #0 + str r0, [sp] + ldr r0, _02240848 ; =0x0000C0F9 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #1 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _0224084C ; =0x0000C0FA + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x18 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02240850 ; =0x0000C0FB + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x1b + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02240854 ; =0x0000C0FC + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x1e + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _02240858 ; =0x0000C0FD + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #9 + bl sub_0200CE24 + mov r0, #0 + str r0, [sp] + ldr r0, _0224085C ; =0x0000C0FE + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x23 + bl sub_0200CE24 + bl sub_0207CF40 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02240860 ; =0x0000C0FF + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x10 + bl sub_0200CE0C + mov r0, #0 + str r0, [sp] + mov r0, #0xc1 + lsl r0, r0, #8 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x3e + mov r3, #5 + bl sub_0200CE0C + mov r3, #0 + add r1, r5, #0 + add r2, r5, #0 + ldr r0, _02240848 ; =0x0000C0F9 + str r3, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _0224084C ; =0x0000C0FA + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x17 + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _02240850 ; =0x0000C0FB + b _0224086C + ; .align 2, 0 +_02240844: .word 0x00000425 +_02240848: .word 0x0000C0F9 +_0224084C: .word 0x0000C0FA +_02240850: .word 0x0000C0FB +_02240854: .word 0x0000C0FC +_02240858: .word 0x0000C0FD +_0224085C: .word 0x0000C0FE +_02240860: .word 0x0000C0FF +_02240864: .word 0x0000C101 +_02240868: .word 0x0000C102 +_0224086C: + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x1a + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _0224093C ; =0x0000C0FC + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x1d + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _02240940 ; =0x0000C0FD + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #8 + bl sub_0200CE54 + mov r0, #0 + str r0, [sp] + ldr r0, _02240944 ; =0x0000C0FE + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r2, r5, #0 + add r0, #0xd8 + add r1, #0xdc + add r2, #0xd4 + ldr r0, [r0, #0] + ldr r1, [r1, #0] + ldr r2, [r2, #0] + mov r3, #0x22 + bl sub_0200CE54 + bl sub_0207CF44 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02240948 ; =0x0000C0FF + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x10 + bl sub_0200CE3C + mov r0, #0 + str r0, [sp] + mov r0, #0xc1 + lsl r0, r0, #8 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x3e + mov r3, #6 + bl sub_0200CE3C + add r0, r5, #0 + add r0, #0xd8 + add r5, #0xdc + ldr r2, _0224094C ; =0x0000C101 + ldr r0, [r0, #0] + ldr r1, [r5, #0] + add r3, r2, #0 + bl sub_0207C9EC + add sp, #0x10 + pop {r3, r4, r5, pc} + nop +_0224093C: .word 0x0000C0FC +_02240940: .word 0x0000C0FD +_02240944: .word 0x0000C0FE +_02240948: .word 0x0000C0FF +_0224094C: .word 0x0000C101 + thumb_func_end ov84_022404C0 + + thumb_func_start ov84_02240950 +ov84_02240950: ; 0x02240950 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r4, _02240A7C ; =0x022411B0 + mov r7, #0 + add r6, r5, #0 +_0224095C: + add r0, r5, #0 + add r1, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r4, #0 + bl sub_0200CE6C + add r1, r6, #0 + add r1, #0xe0 + add r7, r7, #1 + str r0, [r1, #0] + add r4, #0x34 + add r6, r6, #4 + cmp r7, #0xc + blo _0224095C + add r0, r5, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D3F4 + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + add r0, #0x65 + ldrb r0, [r0] + add r0, #0xfc + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + cmp r0, #1 + bhi _022409CE + add r0, r5, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 +_022409CE: + ldr r0, _02240A80 ; =0x00000424 + ldrb r0, [r5, r0] + cmp r0, #1 + bne _022409EE + add r0, r5, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 + add r0, r5, #0 + add r0, #0xec + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3F4 +_022409EE: + add r0, r5, #0 + mov r1, #0 + bl ov84_02240D3C + add r0, r5, #0 + add r0, #0xc4 + ldr r1, [r0, #0] + add r0, r5, #0 + add r2, r1, #0 + add r2, #0x64 + ldrb r3, [r2] + mov r2, #0xc + add r0, #0xe0 + mul r2, r3 + add r1, r1, r2 + ldrb r1, [r1, #0xc] + ldr r0, [r0, #0] + bl sub_0200D364 + add r1, r5, #0 + add r1, #0xc4 + ldr r1, [r1, #0] + add r0, r5, #0 + add r1, #0x64 + ldrb r1, [r1] + bl ov84_02240C30 + add r1, r0, #0 + add r0, r5, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r2, #0x61 + bl sub_0200D4C4 + add r0, r5, #0 + add r0, #0xc4 + ldr r2, [r0, #0] + add r0, r5, #0 + add r3, r2, #0 + add r3, #0x64 + ldrb r4, [r3] + mov r3, #0xc + add r0, #0xf0 + mul r3, r4 + add r2, r2, r3 + ldrh r2, [r2, #8] + ldr r0, [r0, #0] + mov r1, #0xb1 + sub r2, r2, #1 + lsl r2, r2, #4 + add r2, #0x18 + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + bl sub_0200D4C4 + ldr r4, _02240A84 ; =0x02241158 + add r3, sp, #0 + ldmia r4!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + add r1, r2, #0 + add r5, #0xe0 + str r0, [r3, #0] + ldr r0, [r5, #0] + mov r2, #2 + ldr r0, [r0, #0] + bl sub_02021C80 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240A7C: .word 0x022411B0 +_02240A80: .word 0x00000424 +_02240A84: .word 0x02241158 + thumb_func_end ov84_02240950 + + thumb_func_start ov84_02240A88 +ov84_02240A88: ; 0x02240A88 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02240A90: + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + bl sub_0200D0F4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xc + blo _02240A90 + add r0, r6, #0 + add r1, r6, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + bl sub_0200D0B0 + add r6, #0xd8 + ldr r0, [r6, #0] + bl sub_0200C8D4 + pop {r4, r5, r6, pc} + thumb_func_end ov84_02240A88 + + thumb_func_start ov84_02240ABC +ov84_02240ABC: ; 0x02240ABC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_02240AC2: + add r0, r5, #0 + add r0, #0xe0 + ldr r0, [r0, #0] + bl sub_0200D330 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xc + blo _02240AC2 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov84_02240ABC + + thumb_func_start ov84_02240AD8 +ov84_02240AD8: ; 0x02240AD8 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #1 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02240B2C ; =0x0000C0FF + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + mov r2, #0x10 + bl sub_0200D948 + add r0, r4, #0 + mov r1, #2 + bl sub_0207CE78 + add r3, r0, #0 + mov r0, #0 + str r0, [sp] + ldr r0, _02240B30 ; =0x0000C0FC + mov r2, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r5, #0xdc + ldr r0, [r0, #0] + ldr r1, [r5, #0] + bl sub_0200D97C + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02240B2C: .word 0x0000C0FF +_02240B30: .word 0x0000C0FC + thumb_func_end ov84_02240AD8 + + thumb_func_start ov84_02240B34 +ov84_02240B34: ; 0x02240B34 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + add r4, r1, #0 + bl sub_0200D41C + add r5, #0xe4 + ldr r0, [r5, #0] + add r1, r4, #0 + bl sub_0200D41C + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov84_02240B34 + + thumb_func_start ov84_02240B50 +ov84_02240B50: ; 0x02240B50 + ldr r1, _02240B64 ; =0x00000454 + ldrb r0, [r0, r1] + cmp r0, #0 + bne _02240B5C + mov r0, #1 + b _02240B5E +_02240B5C: + mov r0, #0 +_02240B5E: + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr + ; .align 2, 0 +_02240B64: .word 0x00000454 + thumb_func_end ov84_02240B50 + + thumb_func_start ov84_02240B68 +ov84_02240B68: ; 0x02240B68 + ldr r1, _02240B78 ; =0x00000457 + mov r2, #0 + strb r2, [r0, r1] + ldr r3, _02240B7C ; =ov84_02240C48 + mov r2, #1 + sub r1, r1, #3 + strb r2, [r0, r1] + bx r3 + ; .align 2, 0 +_02240B78: .word 0x00000457 +_02240B7C: .word ov84_02240C48 + thumb_func_end ov84_02240B68 + + thumb_func_start ov84_02240B80 +ov84_02240B80: ; 0x02240B80 + push {r3, lr} + ldr r1, _02240B94 ; =0x00000454 + ldrb r1, [r0, r1] + cmp r1, #0 + beq _02240B92 + cmp r1, #1 + bne _02240B92 + bl ov84_02240B98 +_02240B92: + pop {r3, pc} + ; .align 2, 0 +_02240B94: .word 0x00000454 + thumb_func_end ov84_02240B80 + + thumb_func_start ov84_02240B98 +ov84_02240B98: ; 0x02240B98 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + ldr r2, _02240C24 ; =0x00000455 + ldrb r0, [r4, r2] + cmp r0, #0 + bne _02240BD0 + add r1, r2, #2 + ldrb r1, [r4, r1] + ldr r0, [sp] + lsl r1, r1, #2 + add r3, r4, r1 + add r1, r2, #3 + ldr r1, [r3, r1] + sub r0, r0, r1 + str r0, [sp] + b _02240BE2 +_02240BD0: + add r1, r2, #2 + ldrb r1, [r4, r1] + ldr r0, [sp] + lsl r1, r1, #2 + add r3, r4, r1 + add r1, r2, #3 + ldr r1, [r3, r1] + add r0, r0, r1 + str r0, [sp] +_02240BE2: + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + add r1, sp, #0 + ldr r0, [r0, #0] + bl sub_02021C50 + ldr r1, _02240C28 ; =0x00000457 + ldrb r0, [r4, r1] + add r0, r0, #1 + strb r0, [r4, r1] + ldrb r0, [r4, r1] + cmp r0, #8 + bne _02240C20 + add r1, #0x21 + ldrb r1, [r4, r1] + add r0, r4, #0 + bl ov84_02240C30 + lsl r0, r0, #0xc + str r0, [sp] + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + add r1, sp, #0 + ldr r0, [r0, #0] + bl sub_02021C50 + ldr r0, _02240C2C ; =0x00000454 + mov r1, #0 + strb r1, [r4, r0] +_02240C20: + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02240C24: .word 0x00000455 +_02240C28: .word 0x00000457 +_02240C2C: .word 0x00000454 + thumb_func_end ov84_02240B98 + + thumb_func_start ov84_02240C30 +ov84_02240C30: ; 0x02240C30 + ldr r2, _02240C44 ; =0x00000427 + ldrb r3, [r0, r2] + add r2, r2, #1 + ldrb r0, [r0, r2] + mul r1, r0 + add r0, r3, r1 + add r0, r0, #6 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bx lr + ; .align 2, 0 +_02240C44: .word 0x00000427 + thumb_func_end ov84_02240C30 + + thumb_func_start ov84_02240C48 +ov84_02240C48: ; 0x02240C48 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bl sub_02021D28 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, sp, #0 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + ldr r1, _02240CE4 ; =0x00000478 + str r0, [r2, #0] + ldrb r1, [r4, r1] + add r0, r4, #0 + bl ov84_02240C30 + lsl r1, r0, #0xc + ldr r0, [sp] + cmp r1, r0 + bge _02240C82 + sub r0, r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + mov r2, #0 + b _02240C8C +_02240C82: + sub r0, r1, r0 + mov r1, #0x64 + bl sub_020E1F6C + mov r2, #1 +_02240C8C: + ldr r1, _02240CE8 ; =0x00000455 + mov r3, #0x28 + strb r2, [r4, r1] + add r5, r0, #0 + ldr r1, _02240CEC ; =0x00000458 + mov r2, #0 + mul r5, r3 + str r2, [r4, r1] + add r3, r1, #4 + str r5, [r4, r3] + mov r3, #0x19 + add r5, r0, #0 + mul r5, r3 + add r3, r1, #0 + add r3, #8 + str r5, [r4, r3] + mov r3, #0xf + add r5, r0, #0 + mul r5, r3 + add r3, r1, #0 + add r3, #0xc + str r5, [r4, r3] + mov r3, #0xa + add r5, r0, #0 + mul r5, r3 + add r3, r1, #0 + add r3, #0x10 + str r5, [r4, r3] + mov r3, #7 + add r5, r0, #0 + mul r5, r3 + add r3, r1, #0 + add r3, #0x14 + str r5, [r4, r3] + lsl r3, r0, #1 + add r3, r0, r3 + add r0, r1, #0 + add r0, #0x18 + str r3, [r4, r0] + add r1, #0x1c + str r2, [r4, r1] + add sp, #0xc + pop {r4, r5, pc} + nop +_02240CE4: .word 0x00000478 +_02240CE8: .word 0x00000455 +_02240CEC: .word 0x00000458 + thumb_func_end ov84_02240C48 + + thumb_func_start ov84_02240CF0 +ov84_02240CF0: ; 0x02240CF0 + push {r4, lr} + add r4, r0, #0 + cmp r1, #0 + bne _02240D16 + mov r0, #1 + lsl r0, r0, #8 + ldr r0, [r4, r0] + mov r1, #0xdc + mov r2, #0x9c + bl sub_0200D4C4 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xdc + mov r2, #0xb4 + bl sub_0200D4C4 + b _02240D32 +_02240D16: + mov r0, #1 + lsl r0, r0, #8 + ldr r0, [r4, r0] + mov r1, #0xa2 + mov r2, #0x6c + bl sub_0200D4C4 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0xa2 + mov r2, #0x84 + bl sub_0200D4C4 +_02240D32: + add r0, r4, #0 + mov r1, #1 + bl ov84_02240D3C + pop {r4, pc} + thumb_func_end ov84_02240CF0 + + thumb_func_start ov84_02240D3C +ov84_02240D3C: ; 0x02240D3C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #1 + lsl r0, r0, #8 + ldr r0, [r5, r0] + add r4, r1, #0 + bl sub_0200D3F4 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200D3F4 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov84_02240D3C + + thumb_func_start ov84_02240D5C +ov84_02240D5C: ; 0x02240D5C + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x42 + lsl r0, r0, #2 + add r4, r2, #0 + add r6, r1, #0 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200D3F4 + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r4, #0 + bl sub_0200D3F4 + cmp r4, #0 + beq _02240E18 + add r0, r6, #0 + bl sub_0207D268 + mov r1, #3 + add r4, r0, #0 + bl sub_020790C4 + lsl r0, r0, #0x10 + lsr r6, r0, #0x10 + add r0, r4, #0 + mov r1, #1 + bl sub_020790C4 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + bl sub_0207C944 + add r7, r0, #0 + add r0, r6, #0 + bl sub_0207C908 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, _02240E1C ; =0x0000C101 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r7, #0 + bl sub_0200D948 + add r0, r6, #0 + bl sub_0207C92C + add r1, r0, #0 + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r1, #6 + bl sub_0200D41C + bl sub_0207CAC0 + add r6, r0, #0 + add r0, r4, #0 + bl sub_0207CA90 + add r3, r0, #0 + mov r0, #1 + str r0, [sp] + ldr r0, _02240E20 ; =0x0000C102 + add r1, r5, #0 + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0xd8 + add r1, #0xdc + ldr r0, [r0, #0] + ldr r1, [r1, #0] + add r2, r6, #0 + bl sub_0200D948 + add r0, r4, #0 + bl sub_0207CAA8 + add r1, r0, #0 + mov r0, #0x43 + lsl r0, r0, #2 + ldr r0, [r5, r0] + add r1, r1, #6 + bl sub_0200D41C +_02240E18: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240E1C: .word 0x0000C101 +_02240E20: .word 0x0000C102 + thumb_func_end ov84_02240D5C + + thumb_func_start ov84_02240E24 +ov84_02240E24: ; 0x02240E24 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0xf8 + add r4, r1, #0 + ldr r0, [r0, #0] + mov r1, #1 + add r6, r2, #0 + bl sub_0200D3F4 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r1, r4, #0 + add r2, r6, #0 + bl sub_0200D4C4 + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + mov r1, #0 + bl sub_0200D3CC + add r5, #0xf8 + ldr r0, [r5, #0] + mov r1, #0 + bl sub_0200D364 + pop {r4, r5, r6, pc} + thumb_func_end ov84_02240E24 + + thumb_func_start ov84_02240E5C +ov84_02240E5C: ; 0x02240E5C + push {r4, lr} + add r4, r0, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl sub_0200D408 + cmp r0, #1 + bne _02240E92 + add r0, r4, #0 + add r0, #0xf8 + mov r1, #1 + ldr r0, [r0, #0] + lsl r1, r1, #0xc + bl sub_0200D34C + add r0, r4, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + bl sub_0200D3E0 + cmp r0, #2 + bne _02240E92 + add r4, #0xf8 + ldr r0, [r4, #0] + mov r1, #0 + bl sub_0200D3F4 +_02240E92: + pop {r4, pc} + thumb_func_end ov84_02240E5C + + .rodata + + + .global Unk_ov84_02241158 +Unk_ov84_02241158: ; 0x02241158 + .incbin "incbin/overlay84_rodata.bin", 0x2C4, 0x2D0 - 0x2C4 + + .global Unk_ov84_02241164 +Unk_ov84_02241164: ; 0x02241164 + .incbin "incbin/overlay84_rodata.bin", 0x2D0, 0x2E4 - 0x2D0 + + .global Unk_ov84_02241178 +Unk_ov84_02241178: ; 0x02241178 + .incbin "incbin/overlay84_rodata.bin", 0x2E4, 0x2FC - 0x2E4 + + .global Unk_ov84_02241190 +Unk_ov84_02241190: ; 0x02241190 + .incbin "incbin/overlay84_rodata.bin", 0x2FC, 0x31C - 0x2FC + + .global Unk_ov84_022411B0 +Unk_ov84_022411B0: ; 0x022411B0 + .incbin "incbin/overlay84_rodata.bin", 0x31C, 0x270 + diff --git a/asm/overlay85.s b/asm/ov85_02241440.s similarity index 97% rename from asm/overlay85.s rename to asm/ov85_02241440.s index 2ab09462c..6a09dfb01 100644 --- a/asm/overlay85.s +++ b/asm/ov85_02241440.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov85_02241440 ov85_02241440: ; 0x02241440 push {r3, r4, r5, lr} @@ -2470,12 +2473,39 @@ _02242834: .word 0x000001EE _02242838: .word 0x02242A34 _0224283C: .word 0x02242A46 thumb_func_end ov85_02242578 - ; 0x02242840 - .rodata - .incbin "incbin/overlay85_rodata.bin" - .bss - .space 0x0 + .global Unk_ov85_02242840 +Unk_ov85_02242840: ; 0x02242840 + .incbin "incbin/overlay85_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov85_0224284C +Unk_ov85_0224284C: ; 0x0224284C + .incbin "incbin/overlay85_rodata.bin", 0xC, 0x1C - 0xC + + .global Unk_ov85_0224285C +Unk_ov85_0224285C: ; 0x0224285C + .incbin "incbin/overlay85_rodata.bin", 0x1C, 0x38 - 0x1C + + .global Unk_ov85_02242878 +Unk_ov85_02242878: ; 0x02242878 + .incbin "incbin/overlay85_rodata.bin", 0x38, 0x54 - 0x38 + + .global Unk_ov85_02242894 +Unk_ov85_02242894: ; 0x02242894 + .incbin "incbin/overlay85_rodata.bin", 0x54, 0x70 - 0x54 + + .global Unk_ov85_022428B0 +Unk_ov85_022428B0: ; 0x022428B0 + .incbin "incbin/overlay85_rodata.bin", 0x70, 0x98 - 0x70 + + .global Unk_ov85_022428D8 +Unk_ov85_022428D8: ; 0x022428D8 + .incbin "incbin/overlay85_rodata.bin", 0x98, 0xF8 - 0x98 + + .global Unk_ov85_02242938 +Unk_ov85_02242938: ; 0x02242938 + .incbin "incbin/overlay85_rodata.bin", 0xF8, 0x120 + diff --git a/asm/overlay86.s b/asm/ov86_0223B140.s similarity index 97% rename from asm/overlay86.s rename to asm/ov86_0223B140.s index d6a577cad..486503d9f 100644 --- a/asm/overlay86.s +++ b/asm/ov86_0223B140.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov86_0223B140 ov86_0223B140: ; 0x0223B140 push {r3, r4, r5, r6, r7, lr} @@ -4225,14 +4228,91 @@ _0223D35E: _0223D36C: .word 0x00001BE4 _0223D370: .word 0x00001BE8 thumb_func_end ov86_0223D2A8 - ; 0x0223D374 - .rodata - .incbin "incbin/overlay86_rodata.bin" + + + .global Unk_ov86_0223D374 +Unk_ov86_0223D374: ; 0x0223D374 + .incbin "incbin/overlay86_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov86_0223D37C +Unk_ov86_0223D37C: ; 0x0223D37C + .incbin "incbin/overlay86_rodata.bin", 0x8, 0x14 - 0x8 + + .global Unk_ov86_0223D388 +Unk_ov86_0223D388: ; 0x0223D388 + .incbin "incbin/overlay86_rodata.bin", 0x14, 0x24 - 0x14 + + .global Unk_ov86_0223D398 +Unk_ov86_0223D398: ; 0x0223D398 + .incbin "incbin/overlay86_rodata.bin", 0x24, 0x34 - 0x24 + + .global Unk_ov86_0223D3A8 +Unk_ov86_0223D3A8: ; 0x0223D3A8 + .incbin "incbin/overlay86_rodata.bin", 0x34, 0x44 - 0x34 + + .global Unk_ov86_0223D3B8 +Unk_ov86_0223D3B8: ; 0x0223D3B8 + .incbin "incbin/overlay86_rodata.bin", 0x44, 0x58 - 0x44 + + .global Unk_ov86_0223D3CC +Unk_ov86_0223D3CC: ; 0x0223D3CC + .incbin "incbin/overlay86_rodata.bin", 0x58, 0x70 - 0x58 + + .global Unk_ov86_0223D3E4 +Unk_ov86_0223D3E4: ; 0x0223D3E4 + .incbin "incbin/overlay86_rodata.bin", 0x70, 0x88 - 0x70 + + .global Unk_ov86_0223D3FC +Unk_ov86_0223D3FC: ; 0x0223D3FC + .incbin "incbin/overlay86_rodata.bin", 0x88, 0xA4 - 0x88 + + .global Unk_ov86_0223D418 +Unk_ov86_0223D418: ; 0x0223D418 + .incbin "incbin/overlay86_rodata.bin", 0xA4, 0xC0 - 0xA4 + + .global Unk_ov86_0223D434 +Unk_ov86_0223D434: ; 0x0223D434 + .incbin "incbin/overlay86_rodata.bin", 0xC0, 0xDC - 0xC0 + + .global Unk_ov86_0223D450 +Unk_ov86_0223D450: ; 0x0223D450 + .incbin "incbin/overlay86_rodata.bin", 0xDC, 0xFC - 0xDC + + .global Unk_ov86_0223D470 +Unk_ov86_0223D470: ; 0x0223D470 + .incbin "incbin/overlay86_rodata.bin", 0xFC, 0x11C - 0xFC + + .global Unk_ov86_0223D490 +Unk_ov86_0223D490: ; 0x0223D490 + .incbin "incbin/overlay86_rodata.bin", 0x11C, 0x13C - 0x11C + + .global Unk_ov86_0223D4B0 +Unk_ov86_0223D4B0: ; 0x0223D4B0 + .incbin "incbin/overlay86_rodata.bin", 0x13C, 0x164 - 0x13C + + .global Unk_ov86_0223D4D8 +Unk_ov86_0223D4D8: ; 0x0223D4D8 + .incbin "incbin/overlay86_rodata.bin", 0x164, 0x48 + .data - .incbin "incbin/overlay86_data.bin" + + + .global Unk_ov86_0223D540 +Unk_ov86_0223D540: ; 0x0223D540 + .incbin "incbin/overlay86_data.bin", 0x0, 0x4 + .bss - .space 0x20 + + + .global Unk_ov86_0223D560 +Unk_ov86_0223D560: ; 0x0223D560 + .space 0x4 + + .global Unk_ov86_0223D564 +Unk_ov86_0223D564: ; 0x0223D564 + .space 0x4 + diff --git a/asm/ov87_021D0D80.s b/asm/ov87_021D0D80.s new file mode 100644 index 000000000..909e30e68 --- /dev/null +++ b/asm/ov87_021D0D80.s @@ -0,0 +1,395 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov87_021D0D80 +ov87_021D0D80: ; 0x021D0D80 + push {r3, r4, r5, lr} + mov r2, #1 + add r5, r0, #0 + mov r0, #3 + mov r1, #0x3c + lsl r2, r2, #0xe + bl sub_02017FC8 + mov r2, #7 + mov r0, #3 + mov r1, #0x3d + lsl r2, r2, #0xe + bl sub_02017FC8 + add r0, r5, #0 + mov r1, #0xdc + mov r2, #0x3c + bl sub_0200681C + add r4, r0, #0 + beq _021D0DF8 + add r0, r5, #0 + bl sub_02006840 + add r1, r4, #0 + add r1, #0xcc + str r0, [r1, #0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xcc + ldr r0, [r0, #0] + bl sub_0202E148 + add r1, r4, #0 + add r1, #0xd0 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xcc + ldr r1, [r1, #0] + add r0, r4, #0 + bl ov87_021D0FC4 + add r0, r4, #0 + add r1, r4, #0 + bl ov87_021D106C + add r1, r4, #0 + add r1, #0xc8 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + mov r1, #0 + bl ov87_021D11D0 + add r4, #0xd8 + str r0, [r4, #0] +_021D0DF8: + mov r0, #1 + pop {r3, r4, r5, pc} + thumb_func_end ov87_021D0D80 + + thumb_func_start ov87_021D0DFC +ov87_021D0DFC: ; 0x021D0DFC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl ov87_021D1140 + add r0, r4, #0 + bl ov87_021D1000 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0x3d + bl sub_0201807C + mov r0, #0x3c + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov87_021D0DFC + + thumb_func_start ov87_021D0E2C +ov87_021D0E2C: ; 0x021D0E2C + push {r3, r4, r5, lr} + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _021D0E58 + add r0, r4, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl ov87_021D11F8 + cmp r0, #0 + bne _021D0E50 + mov r0, #0 + pop {r3, r4, r5, pc} +_021D0E50: + add r0, r4, #0 + mov r1, #0 + add r0, #0xd8 + str r1, [r0, #0] +_021D0E58: + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D0E64 + cmp r0, #1 + beq _021D0F2A + b _021D0F2E +_021D0E64: + ldr r0, _021D0F34 ; =0x021BF67C + mov r1, #2 + ldr r0, [r0, #0x48] + add r2, r0, #0 + tst r2, r1 + beq _021D0E80 + add r0, r4, #0 + mov r1, #1 + bl ov87_021D0F38 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D0F2E +_021D0E80: + mov r2, #1 + add r3, r0, #0 + tst r3, r2 + beq _021D0E98 + ldr r0, [r4, #0x1c] + mov r1, #4 + eor r0, r2 + str r0, [r4, #0x1c] + add r0, r4, #0 + bl ov87_021D0F38 + b _021D0F2E +_021D0E98: + mov r2, #0x20 + tst r2, r0 + beq _021D0EB2 + add r0, r4, #0 + bl ov87_021D0F4C + cmp r0, #0 + beq _021D0F2E + add r0, r4, #0 + mov r1, #3 + bl ov87_021D0F38 + b _021D0F2E +_021D0EB2: + mov r2, #0x10 + tst r2, r0 + beq _021D0ECC + add r0, r4, #0 + bl ov87_021D0F88 + cmp r0, #0 + beq _021D0F2E + add r0, r4, #0 + mov r1, #3 + bl ov87_021D0F38 + b _021D0F2E +_021D0ECC: + mov r2, #0x40 + tst r2, r0 + beq _021D0EFC + ldr r0, [r4, #0x18] + sub r0, r0, #1 + str r0, [r4, #0x18] + bpl _021D0EF4 + add r0, r4, #0 + bl ov87_021D0F4C + cmp r0, #0 + beq _021D0F2E + ldr r0, [r4, #0x14] + mov r1, #3 + sub r0, r0, #1 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov87_021D0F38 + b _021D0F2E +_021D0EF4: + add r0, r4, #0 + bl ov87_021D0F38 + b _021D0F2E +_021D0EFC: + mov r2, #0x80 + tst r0, r2 + beq _021D0F2E + ldr r0, [r4, #0x18] + add r2, r0, #1 + str r2, [r4, #0x18] + ldr r0, [r4, #0x14] + cmp r2, r0 + blt _021D0F22 + add r0, r4, #0 + bl ov87_021D0F88 + cmp r0, #0 + beq _021D0F2E + add r0, r4, #0 + mov r1, #3 + bl ov87_021D0F38 + b _021D0F2E +_021D0F22: + add r0, r4, #0 + bl ov87_021D0F38 + b _021D0F2E +_021D0F2A: + mov r0, #1 + pop {r3, r4, r5, pc} +_021D0F2E: + mov r0, #0 + pop {r3, r4, r5, pc} + nop +_021D0F34: .word 0x021BF67C + thumb_func_end ov87_021D0E2C + + thumb_func_start ov87_021D0F38 +ov87_021D0F38: ; 0x021D0F38 + push {r4, lr} + add r4, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + bl ov87_021D11D0 + add r4, #0xd8 + str r0, [r4, #0] + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov87_021D0F38 + + thumb_func_start ov87_021D0F4C +ov87_021D0F4C: ; 0x021D0F4C + push {r3, lr} + add r1, r0, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + add r2, r1, #1 + add r1, r0, #0 + add r1, #0xd4 + str r2, [r1, #0] + add r1, r0, #0 + add r1, #0xd4 + ldr r2, [r1, #0] + add r1, r0, #0 + add r1, #0xd0 + ldr r1, [r1, #0] + cmp r2, r1 + blt _021D0F74 + add r1, r0, #0 + mov r2, #0 + add r1, #0xd4 + str r2, [r1, #0] +_021D0F74: + add r1, r0, #0 + add r2, r0, #0 + add r1, #0xcc + add r2, #0xd4 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov87_021D101C + mov r0, #1 + pop {r3, pc} + thumb_func_end ov87_021D0F4C + + thumb_func_start ov87_021D0F88 +ov87_021D0F88: ; 0x021D0F88 + push {r3, lr} + add r1, r0, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + sub r2, r1, #1 + add r1, r0, #0 + add r1, #0xd4 + str r2, [r1, #0] + add r1, r0, #0 + add r1, #0xd4 + ldr r1, [r1, #0] + cmp r1, #0 + bge _021D0FB0 + add r1, r0, #0 + add r1, #0xd0 + ldr r1, [r1, #0] + sub r2, r1, #1 + add r1, r0, #0 + add r1, #0xd4 + str r2, [r1, #0] +_021D0FB0: + add r1, r0, #0 + add r2, r0, #0 + add r1, #0xcc + add r2, #0xd4 + ldr r1, [r1, #0] + ldr r2, [r2, #0] + bl ov87_021D101C + mov r0, #1 + pop {r3, pc} + thumb_func_end ov87_021D0F88 + + thumb_func_start ov87_021D0FC4 +ov87_021D0FC4: ; 0x021D0FC4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + str r1, [sp, #4] + mov r4, #0 + add r5, r0, #0 + mov r6, #0xc + mov r7, #0x3c +_021D0FD4: + add r0, r6, #0 + add r1, r7, #0 + bl sub_02023790 + str r0, [r5, #0x20] + mov r0, #8 + mov r1, #0x3c + bl sub_02023790 + str r0, [r5, #0x24] + add r4, r4, #1 + add r5, #0x1c + cmp r4, #6 + blt _021D0FD4 + ldr r0, [sp] + mov r2, #0 + ldr r1, [sp, #4] + str r2, [r0, #0x1c] + bl ov87_021D101C + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov87_021D0FC4 + + thumb_func_start ov87_021D1000 +ov87_021D1000: ; 0x021D1000 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r4, #0 +_021D1006: + ldr r0, [r5, #0x20] + bl sub_020237BC + ldr r0, [r5, #0x24] + bl sub_020237BC + add r4, r4, #1 + add r5, #0x1c + cmp r4, #6 + blt _021D1006 + pop {r3, r4, r5, pc} + thumb_func_end ov87_021D1000 + + thumb_func_start ov87_021D101C +ov87_021D101C: ; 0x021D101C + push {r3, r4, r5, r6, r7, lr} + add r7, r1, #0 + add r6, r0, #0 + str r2, [sp] + add r0, r7, #0 + add r1, r2, #0 + bl sub_0202E174 + str r0, [r6, #0] + ldr r1, [sp] + add r0, r7, #0 + bl sub_0202E1A8 + str r0, [r6, #0x14] + ldr r1, [sp] + add r0, r7, #0 + add r2, r6, #4 + bl sub_0202E274 + ldr r0, [r6, #0x14] + mov r4, #0 + cmp r0, #0 + ble _021D1064 + add r5, r6, #0 + add r5, #0x20 +_021D104E: + ldr r1, [sp] + add r0, r7, #0 + add r2, r4, #0 + add r3, r5, #0 + bl sub_0202E1F4 + ldr r0, [r6, #0x14] + add r4, r4, #1 + add r5, #0x1c + cmp r4, r0 + blt _021D104E +_021D1064: + mov r0, #0 + str r0, [r6, #0x18] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov87_021D101C \ No newline at end of file diff --git a/asm/overlay87.s b/asm/ov87_021D106C.s similarity index 77% rename from asm/overlay87.s rename to asm/ov87_021D106C.s index ec40d22a7..bb154ee85 100644 --- a/asm/overlay87.s +++ b/asm/ov87_021D106C.s @@ -1,395 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov87_021D0D80 -ov87_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - mov r2, #1 - add r5, r0, #0 - mov r0, #3 - mov r1, #0x3c - lsl r2, r2, #0xe - bl sub_02017FC8 - mov r2, #7 - mov r0, #3 - mov r1, #0x3d - lsl r2, r2, #0xe - bl sub_02017FC8 - add r0, r5, #0 - mov r1, #0xdc - mov r2, #0x3c - bl sub_0200681C - add r4, r0, #0 - beq _021D0DF8 - add r0, r5, #0 - bl sub_02006840 - add r1, r4, #0 - add r1, #0xcc - str r0, [r1, #0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xcc - ldr r0, [r0, #0] - bl sub_0202E148 - add r1, r4, #0 - add r1, #0xd0 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xcc - ldr r1, [r1, #0] - add r0, r4, #0 - bl ov87_021D0FC4 - add r0, r4, #0 - add r1, r4, #0 - bl ov87_021D106C - add r1, r4, #0 - add r1, #0xc8 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #0 - bl ov87_021D11D0 - add r4, #0xd8 - str r0, [r4, #0] -_021D0DF8: - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov87_021D0D80 - - thumb_func_start ov87_021D0DFC -ov87_021D0DFC: ; 0x021D0DFC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl ov87_021D1140 - add r0, r4, #0 - bl ov87_021D1000 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0x3d - bl sub_0201807C - mov r0, #0x3c - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov87_021D0DFC - - thumb_func_start ov87_021D0E2C -ov87_021D0E2C: ; 0x021D0E2C - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D0E58 - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl ov87_021D11F8 - cmp r0, #0 - bne _021D0E50 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D0E50: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd8 - str r1, [r0, #0] -_021D0E58: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D0E64 - cmp r0, #1 - beq _021D0F2A - b _021D0F2E -_021D0E64: - ldr r0, _021D0F34 ; =0x021BF67C - mov r1, #2 - ldr r0, [r0, #0x48] - add r2, r0, #0 - tst r2, r1 - beq _021D0E80 - add r0, r4, #0 - mov r1, #1 - bl ov87_021D0F38 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D0F2E -_021D0E80: - mov r2, #1 - add r3, r0, #0 - tst r3, r2 - beq _021D0E98 - ldr r0, [r4, #0x1c] - mov r1, #4 - eor r0, r2 - str r0, [r4, #0x1c] - add r0, r4, #0 - bl ov87_021D0F38 - b _021D0F2E -_021D0E98: - mov r2, #0x20 - tst r2, r0 - beq _021D0EB2 - add r0, r4, #0 - bl ov87_021D0F4C - cmp r0, #0 - beq _021D0F2E - add r0, r4, #0 - mov r1, #3 - bl ov87_021D0F38 - b _021D0F2E -_021D0EB2: - mov r2, #0x10 - tst r2, r0 - beq _021D0ECC - add r0, r4, #0 - bl ov87_021D0F88 - cmp r0, #0 - beq _021D0F2E - add r0, r4, #0 - mov r1, #3 - bl ov87_021D0F38 - b _021D0F2E -_021D0ECC: - mov r2, #0x40 - tst r2, r0 - beq _021D0EFC - ldr r0, [r4, #0x18] - sub r0, r0, #1 - str r0, [r4, #0x18] - bpl _021D0EF4 - add r0, r4, #0 - bl ov87_021D0F4C - cmp r0, #0 - beq _021D0F2E - ldr r0, [r4, #0x14] - mov r1, #3 - sub r0, r0, #1 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov87_021D0F38 - b _021D0F2E -_021D0EF4: - add r0, r4, #0 - bl ov87_021D0F38 - b _021D0F2E -_021D0EFC: - mov r2, #0x80 - tst r0, r2 - beq _021D0F2E - ldr r0, [r4, #0x18] - add r2, r0, #1 - str r2, [r4, #0x18] - ldr r0, [r4, #0x14] - cmp r2, r0 - blt _021D0F22 - add r0, r4, #0 - bl ov87_021D0F88 - cmp r0, #0 - beq _021D0F2E - add r0, r4, #0 - mov r1, #3 - bl ov87_021D0F38 - b _021D0F2E -_021D0F22: - add r0, r4, #0 - bl ov87_021D0F38 - b _021D0F2E -_021D0F2A: - mov r0, #1 - pop {r3, r4, r5, pc} -_021D0F2E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D0F34: .word 0x021BF67C - thumb_func_end ov87_021D0E2C - - thumb_func_start ov87_021D0F38 -ov87_021D0F38: ; 0x021D0F38 - push {r4, lr} - add r4, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl ov87_021D11D0 - add r4, #0xd8 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov87_021D0F38 - - thumb_func_start ov87_021D0F4C -ov87_021D0F4C: ; 0x021D0F4C - push {r3, lr} - add r1, r0, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - add r2, r1, #1 - add r1, r0, #0 - add r1, #0xd4 - str r2, [r1, #0] - add r1, r0, #0 - add r1, #0xd4 - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0xd0 - ldr r1, [r1, #0] - cmp r2, r1 - blt _021D0F74 - add r1, r0, #0 - mov r2, #0 - add r1, #0xd4 - str r2, [r1, #0] -_021D0F74: - add r1, r0, #0 - add r2, r0, #0 - add r1, #0xcc - add r2, #0xd4 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov87_021D101C - mov r0, #1 - pop {r3, pc} - thumb_func_end ov87_021D0F4C - - thumb_func_start ov87_021D0F88 -ov87_021D0F88: ; 0x021D0F88 - push {r3, lr} - add r1, r0, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - sub r2, r1, #1 - add r1, r0, #0 - add r1, #0xd4 - str r2, [r1, #0] - add r1, r0, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - cmp r1, #0 - bge _021D0FB0 - add r1, r0, #0 - add r1, #0xd0 - ldr r1, [r1, #0] - sub r2, r1, #1 - add r1, r0, #0 - add r1, #0xd4 - str r2, [r1, #0] -_021D0FB0: - add r1, r0, #0 - add r2, r0, #0 - add r1, #0xcc - add r2, #0xd4 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov87_021D101C - mov r0, #1 - pop {r3, pc} - thumb_func_end ov87_021D0F88 - - thumb_func_start ov87_021D0FC4 -ov87_021D0FC4: ; 0x021D0FC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - str r1, [sp, #4] - mov r4, #0 - add r5, r0, #0 - mov r6, #0xc - mov r7, #0x3c -_021D0FD4: - add r0, r6, #0 - add r1, r7, #0 - bl sub_02023790 - str r0, [r5, #0x20] - mov r0, #8 - mov r1, #0x3c - bl sub_02023790 - str r0, [r5, #0x24] - add r4, r4, #1 - add r5, #0x1c - cmp r4, #6 - blt _021D0FD4 - ldr r0, [sp] - mov r2, #0 - ldr r1, [sp, #4] - str r2, [r0, #0x1c] - bl ov87_021D101C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov87_021D0FC4 - - thumb_func_start ov87_021D1000 -ov87_021D1000: ; 0x021D1000 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021D1006: - ldr r0, [r5, #0x20] - bl sub_020237BC - ldr r0, [r5, #0x24] - bl sub_020237BC - add r4, r4, #1 - add r5, #0x1c - cmp r4, #6 - blt _021D1006 - pop {r3, r4, r5, pc} - thumb_func_end ov87_021D1000 - - thumb_func_start ov87_021D101C -ov87_021D101C: ; 0x021D101C - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r6, r0, #0 - str r2, [sp] - add r0, r7, #0 - add r1, r2, #0 - bl sub_0202E174 - str r0, [r6, #0] - ldr r1, [sp] - add r0, r7, #0 - bl sub_0202E1A8 - str r0, [r6, #0x14] - ldr r1, [sp] - add r0, r7, #0 - add r2, r6, #4 - bl sub_0202E274 - ldr r0, [r6, #0x14] - mov r4, #0 - cmp r0, #0 - ble _021D1064 - add r5, r6, #0 - add r5, #0x20 -_021D104E: - ldr r1, [sp] - add r0, r7, #0 - add r2, r4, #0 - add r3, r5, #0 - bl sub_0202E1F4 - ldr r0, [r6, #0x14] - add r4, r4, #1 - add r5, #0x1c - cmp r4, r0 - blt _021D104E -_021D1064: - mov r0, #0 - str r0, [r6, #0x18] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov87_021D101C thumb_func_start ov87_021D106C ov87_021D106C: ; 0x021D106C @@ -1700,14 +1315,39 @@ _021D1AC4: pop {r3, r4, r5, r6, r7, pc} ; .align 2, 0 thumb_func_end ov87_021D1AB8 - ; 0x021D1AD8 - .rodata - .incbin "incbin/overlay87_rodata.bin" + + + .global Unk_ov87_021D1AD8 +Unk_ov87_021D1AD8: ; 0x021D1AD8 + .incbin "incbin/overlay87_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov87_021D1AE8 +Unk_ov87_021D1AE8: ; 0x021D1AE8 + .incbin "incbin/overlay87_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov87_021D1AF8 +Unk_ov87_021D1AF8: ; 0x021D1AF8 + .incbin "incbin/overlay87_rodata.bin", 0x20, 0x3C - 0x20 + + .global Unk_ov87_021D1B14 +Unk_ov87_021D1B14: ; 0x021D1B14 + .incbin "incbin/overlay87_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov87_021D1B30 +Unk_ov87_021D1B30: ; 0x021D1B30 + .incbin "incbin/overlay87_rodata.bin", 0x58, 0x80 - 0x58 + + .global Unk_ov87_021D1B58 +Unk_ov87_021D1B58: ; 0x021D1B58 + .incbin "incbin/overlay87_rodata.bin", 0x80, 0x30 + .data - .incbin "incbin/overlay87_data.bin" - .bss - .space 0x0 + + .global Unk_ov87_021D1BA0 +Unk_ov87_021D1BA0: ; 0x021D1BA0 + .incbin "incbin/overlay87_data.bin", 0x0, 0x14 + diff --git a/asm/overlay88.s b/asm/ov88_0223B140.s similarity index 92% rename from asm/overlay88.s rename to asm/ov88_0223B140.s index 114b5b967..93757fb8d 100644 --- a/asm/overlay88.s +++ b/asm/ov88_0223B140.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov88_0223B140 ov88_0223B140: ; 0x0223B140 push {r3, r4, r5, r6, lr} @@ -6845,553 +6848,70 @@ _0223E9BC: .word 0x000036AC _0223E9C0: .word 0x00000708 thumb_func_end ov88_0223E998 - thumb_func_start ov88_0223E9C4 -ov88_0223E9C4: ; 0x0223E9C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r2, #0 - mov r2, #1 - str r2, [sp] - mov r3, #0xa - str r3, [sp, #4] - mov r3, #2 - str r3, [sp, #8] - mov r6, #8 - str r6, [sp, #0xc] - add r5, r1, #0 - str r0, [sp, #0x14] - str r2, [sp, #0x10] - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - mov r2, #1 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - add r0, r6, #0 - str r0, [sp, #0xc] - mov r0, #0x15 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r1, #0x10 - mov r3, #0x14 - bl sub_0201A7E8 - add r0, r5, #0 - add r0, #0x10 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x15 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - add r0, r6, #0 - str r0, [sp, #0xc] - mov r0, #0x29 - str r0, [sp, #0x10] - add r1, r5, #0 - ldr r0, [sp, #0x14] - add r1, #0x60 - mov r2, #1 - mov r3, #0x1a - bl sub_0201A7E8 - add r0, r5, #0 - add r0, #0x60 - mov r1, #0 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x1a - str r0, [sp, #4] - ldr r0, [sp, #0x14] - ldr r2, _0223EBF4 ; =0x000001D9 - mov r1, #0 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x1a - str r0, [sp, #4] - ldr r0, [sp, #0x14] - ldr r2, _0223EBF8 ; =0x000001F7 - mov r3, #0xb - bl sub_0200DAA4 - mov r1, #0x15 - str r1, [sp] - mov r0, #0x14 - str r0, [sp, #4] - mov r3, #2 - lsl r1, r1, #4 - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r1, r5, r1 - mov r2, #0 - bl sub_0201A7E8 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x13 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - mov r1, #0x16 - str r0, [sp, #0x10] - lsl r1, r1, #4 - ldr r0, [sp, #0x14] - add r1, r5, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - mov r0, #0x16 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x38 - mov r1, #0x17 - str r0, [sp, #0x10] - lsl r1, r1, #4 - ldr r0, [sp, #0x14] - add r1, r5, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - mov r0, #0x17 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x11 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r1, #0xa4 - str r1, [sp, #0x10] - add r1, #0xdc - ldr r0, [sp, #0x14] - add r1, r5, r1 - mov r2, #0 - mov r3, #0x14 - bl sub_0201A7E8 - mov r0, #6 - lsl r0, r0, #6 - add r0, r5, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x13 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r1, #0xe6 - str r1, [sp, #0x10] - add r1, #0xaa - ldr r0, [sp, #0x14] - add r1, r5, r1 - mov r2, #0 - mov r3, #0x14 - bl sub_0201A7E8 - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r4, _0223EBFC ; =0x0223F170 - mov r7, #0 - mov r6, #0x33 -_0223EB5E: - add r0, r7, #7 - lsl r0, r0, #4 - str r0, [sp, #0x18] - ldrh r0, [r4, #2] - ldr r1, [sp, #0x18] - mov r2, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [sp, #0x14] - add r1, r5, r1 - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [sp, #0x18] - mov r1, #0 - add r0, r5, r0 - bl sub_0201ADA4 - add r7, r7, #1 - add r6, #0x10 - add r4, r4, #4 - cmp r7, #0xe - blt _0223EB5E - ldr r4, _0223EC00 ; =0x0223F1A8 - mov r6, #0 -_0223EBA8: - add r0, r6, #0 - add r0, #0x1a - lsl r7, r0, #4 - ldrh r0, [r4, #2] - add r1, r5, r7 - mov r2, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r4, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r4, #6] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldrh r0, [r4, #8] - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [sp, #0x14] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, r7 - mov r1, #0 - bl sub_0201ADA4 - add r6, r6, #1 - add r4, #0xa - cmp r6, #8 - blt _0223EBA8 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223EBF4: .word 0x000001D9 -_0223EBF8: .word 0x000001F7 -_0223EBFC: .word 0x0223F170 -_0223EC00: .word 0x0223F1A8 - thumb_func_end ov88_0223E9C4 - - thumb_func_start ov88_0223EC04 -ov88_0223EC04: ; 0x0223EC04 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r5, #0 -_0223EC0A: - add r0, r5, #7 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - add r5, r5, #1 - cmp r5, #0xe - blt _0223EC0A - mov r5, #0 -_0223EC1C: - add r0, r5, #0 - add r0, #0x1a - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - add r5, r5, #1 - cmp r5, #8 - blt _0223EC1C - add r0, r4, #0 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x60 - bl sub_0201A8FC - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #0x16 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #0x17 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #6 - lsl r0, r0, #6 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - pop {r3, r4, r5, pc} - thumb_func_end ov88_0223EC04 - - thumb_func_start ov88_0223EC78 -ov88_0223EC78: ; 0x0223EC78 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r3, #0 - ldr r3, [sp, #0x20] - add r5, r0, #0 - add r6, r1, #0 - cmp r3, #1 - bne _0223EC9C - mov r0, #0 - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r5, #7] - lsl r1, r1, #3 - sub r1, r1, r0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r3, r0, #1 -_0223EC9C: - ldr r0, [sp, #0x24] - mov r1, #0 - str r0, [sp] - ldr r0, _0223ECB8 ; =0x000B0C00 - str r4, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223ECB8: .word 0x000B0C00 - thumb_func_end ov88_0223EC78 - - thumb_func_start ov88_0223ECBC -ov88_0223ECBC: ; 0x0223ECBC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - add r1, r3, #0 - ldr r0, [sp, #0x20] - add r2, r6, #0 - mov r3, #0x1a - bl sub_0200B29C - add r6, r0, #0 - cmp r4, #1 - bne _0223ECE6 - ldr r2, _0223ED20 ; =0x000001D9 - add r0, r5, #0 - mov r1, #0 - mov r3, #0xa - bl sub_0200E060 - b _0223ECF2 -_0223ECE6: - ldr r2, _0223ED24 ; =0x000001F7 - add r0, r5, #0 - mov r1, #0 - mov r3, #0xb - bl sub_0200DC48 -_0223ECF2: - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - ldr r0, _0223ED28 ; =0x0001020F - str r3, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - str r3, [sp, #0xc] - bl sub_0201D78C - add r4, r0, #0 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223ED20: .word 0x000001D9 -_0223ED24: .word 0x000001F7 -_0223ED28: .word 0x0001020F - thumb_func_end ov88_0223ECBC - - thumb_func_start ov88_0223ED2C -ov88_0223ED2C: ; 0x0223ED2C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r2, #0 - add r5, r1, #0 - mov r6, #0 - ldr r1, [r4, #0] - mvn r6, r6 - cmp r1, #0 - beq _0223ED44 - cmp r1, #1 - beq _0223ED5C - b _0223ED72 -_0223ED44: - mov r1, #0x1a - str r1, [sp] - ldr r1, _0223ED78 ; =0x0223F148 - ldr r2, _0223ED7C ; =0x000001F7 - mov r3, #0xb - bl sub_02002100 - str r0, [r5, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223ED72 -_0223ED5C: - ldr r0, [r5, #0] - mov r1, #0x1a - bl sub_02002114 - add r6, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _0223ED72 - mov r0, #0 - str r0, [r4, #0] -_0223ED72: - add r0, r6, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223ED78: .word 0x0223F148 -_0223ED7C: .word 0x000001F7 - thumb_func_end ov88_0223ED2C - - thumb_func_start ov88_0223ED80 -ov88_0223ED80: ; 0x0223ED80 - push {r3, lr} - ldr r2, _0223ED90 ; =0x000001F7 - mov r1, #0 - mov r3, #0xb - bl sub_0200DC48 - pop {r3, pc} - nop -_0223ED90: .word 0x000001F7 - thumb_func_end ov88_0223ED80 - - thumb_func_start ov88_0223ED94 -ov88_0223ED94: ; 0x0223ED94 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0xc - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0223EE04 ; =0x0000014D - add r4, r2, #0 - add r6, r1, #0 - str r0, [sp, #0x10] - add r0, r3, #0 - add r1, r4, #0 - mov r2, #0 - mov r3, #0x13 - bl sub_0201A7E8 - ldr r2, _0223EE08 ; =0x000001F7 - add r0, r4, #0 - mov r1, #0 - mov r3, #0xb - bl sub_0200DC48 - ldr r3, _0223EE0C ; =0x0223F150 - add r2, sp, #0x14 - add r7, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r1, r6, #1 - add r0, sp, #0x14 - strh r1, [r0, #0x10] - mov r1, #5 - strh r1, [r0, #0x12] - ldr r0, _0223EE10 ; =ov88_0223EE14 - mov r1, #0 - str r0, [sp, #0x18] - add r0, r7, #0 - add r2, r1, #0 - mov r3, #0x1a - str r5, [sp, #0x14] - str r4, [sp, #0x20] - bl sub_0200112C - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0223EE04: .word 0x0000014D -_0223EE08: .word 0x000001F7 -_0223EE0C: .word 0x0223F150 -_0223EE10: .word ov88_0223EE14 - thumb_func_end ov88_0223ED94 - - thumb_func_start ov88_0223EE14 -ov88_0223EE14: ; 0x0223EE14 - push {r3, lr} - cmp r2, #0 - bne _0223EE20 - ldr r0, _0223EE24 ; =0x000005DC - bl sub_02005748 -_0223EE20: - pop {r3, pc} - nop -_0223EE24: .word 0x000005DC - thumb_func_end ov88_0223EE14 - ; 0x0223EE28 - - .rodata - .incbin "incbin/overlay88_rodata.bin" - .bss - .space 0x0 + .global Unk_ov88_0223EE28 +Unk_ov88_0223EE28: ; 0x0223EE28 + .incbin "incbin/overlay88_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov88_0223EE30 +Unk_ov88_0223EE30: ; 0x0223EE30 + .incbin "incbin/overlay88_rodata.bin", 0x8, 0x18 - 0x8 + + .global Unk_ov88_0223EE40 +Unk_ov88_0223EE40: ; 0x0223EE40 + .incbin "incbin/overlay88_rodata.bin", 0x18, 0x28 - 0x18 + + .global Unk_ov88_0223EE50 +Unk_ov88_0223EE50: ; 0x0223EE50 + .incbin "incbin/overlay88_rodata.bin", 0x28, 0x40 - 0x28 + + .global Unk_ov88_0223EE68 +Unk_ov88_0223EE68: ; 0x0223EE68 + .incbin "incbin/overlay88_rodata.bin", 0x40, 0x5C - 0x40 + + .global Unk_ov88_0223EE84 +Unk_ov88_0223EE84: ; 0x0223EE84 + .incbin "incbin/overlay88_rodata.bin", 0x5C, 0x78 - 0x5C + + .global Unk_ov88_0223EEA0 +Unk_ov88_0223EEA0: ; 0x0223EEA0 + .incbin "incbin/overlay88_rodata.bin", 0x78, 0x94 - 0x78 + + .global Unk_ov88_0223EEBC +Unk_ov88_0223EEBC: ; 0x0223EEBC + .incbin "incbin/overlay88_rodata.bin", 0x94, 0xB0 - 0x94 + + .global Unk_ov88_0223EED8 +Unk_ov88_0223EED8: ; 0x0223EED8 + .incbin "incbin/overlay88_rodata.bin", 0xB0, 0xCC - 0xB0 + + .global Unk_ov88_0223EEF4 +Unk_ov88_0223EEF4: ; 0x0223EEF4 + .incbin "incbin/overlay88_rodata.bin", 0xCC, 0xE8 - 0xCC + + .global Unk_ov88_0223EF10 +Unk_ov88_0223EF10: ; 0x0223EF10 + .incbin "incbin/overlay88_rodata.bin", 0xE8, 0x104 - 0xE8 + + .global Unk_ov88_0223EF2C +Unk_ov88_0223EF2C: ; 0x0223EF2C + .incbin "incbin/overlay88_rodata.bin", 0x104, 0x12C - 0x104 + + .global Unk_ov88_0223EF54 +Unk_ov88_0223EF54: ; 0x0223EF54 + .incbin "incbin/overlay88_rodata.bin", 0x12C, 0x174 - 0x12C + + .global Unk_ov88_0223EF9C +Unk_ov88_0223EF9C: ; 0x0223EF9C + .incbin "incbin/overlay88_rodata.bin", 0x174, 0x1DC - 0x174 + + .global Unk_ov88_0223F004 +Unk_ov88_0223F004: ; 0x0223F004 + .incbin "incbin/overlay88_rodata.bin", 0x1DC, 0x314 - 0x1DC + + .global Unk_ov88_0223F13C +Unk_ov88_0223F13C: ; 0x0223F13C + .incbin "incbin/overlay88_rodata.bin", 0x314, 0x9 + diff --git a/asm/ov88_0223E9C4.s b/asm/ov88_0223E9C4.s new file mode 100644 index 000000000..5e4b91d26 --- /dev/null +++ b/asm/ov88_0223E9C4.s @@ -0,0 +1,569 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov88_0223E9C4 +ov88_0223E9C4: ; 0x0223E9C4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + add r4, r2, #0 + mov r2, #1 + str r2, [sp] + mov r3, #0xa + str r3, [sp, #4] + mov r3, #2 + str r3, [sp, #8] + mov r6, #8 + str r6, [sp, #0xc] + add r5, r1, #0 + str r0, [sp, #0x14] + str r2, [sp, #0x10] + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + mov r2, #1 + add r1, r5, #0 + str r2, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + add r0, r6, #0 + str r0, [sp, #0xc] + mov r0, #0x15 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r1, #0x10 + mov r3, #0x14 + bl sub_0201A7E8 + add r0, r5, #0 + add r0, #0x10 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x15 + str r0, [sp] + mov r0, #5 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + add r0, r6, #0 + str r0, [sp, #0xc] + mov r0, #0x29 + str r0, [sp, #0x10] + add r1, r5, #0 + ldr r0, [sp, #0x14] + add r1, #0x60 + mov r2, #1 + mov r3, #0x1a + bl sub_0201A7E8 + add r0, r5, #0 + add r0, #0x60 + mov r1, #0 + bl sub_0201ADA4 + add r0, r4, #0 + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x1a + str r0, [sp, #4] + ldr r0, [sp, #0x14] + ldr r2, _0223EBF4 ; =0x000001D9 + mov r1, #0 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x1a + str r0, [sp, #4] + ldr r0, [sp, #0x14] + ldr r2, _0223EBF8 ; =0x000001F7 + mov r3, #0xb + bl sub_0200DAA4 + mov r1, #0x15 + str r1, [sp] + mov r0, #0x14 + str r0, [sp, #4] + mov r3, #2 + lsl r1, r1, #4 + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #1 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + add r1, r5, r1 + mov r2, #0 + bl sub_0201A7E8 + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x13 + str r0, [sp] + mov r0, #0xe + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + mov r1, #0x16 + str r0, [sp, #0x10] + lsl r1, r1, #4 + ldr r0, [sp, #0x14] + add r1, r5, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + mov r0, #0x16 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x38 + mov r1, #0x17 + str r0, [sp, #0x10] + lsl r1, r1, #4 + ldr r0, [sp, #0x14] + add r1, r5, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + mov r0, #0x17 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x11 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r1, #0xa4 + str r1, [sp, #0x10] + add r1, #0xdc + ldr r0, [sp, #0x14] + add r1, r5, r1 + mov r2, #0 + mov r3, #0x14 + bl sub_0201A7E8 + mov r0, #6 + lsl r0, r0, #6 + add r0, r5, r0 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0x13 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r1, #0xe6 + str r1, [sp, #0x10] + add r1, #0xaa + ldr r0, [sp, #0x14] + add r1, r5, r1 + mov r2, #0 + mov r3, #0x14 + bl sub_0201A7E8 + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r5, r0 + mov r1, #0 + bl sub_0201ADA4 + ldr r4, _0223EBFC ; =0x0223F170 + mov r7, #0 + mov r6, #0x33 +_0223EB5E: + add r0, r7, #7 + lsl r0, r0, #4 + str r0, [sp, #0x18] + ldrh r0, [r4, #2] + ldr r1, [sp, #0x18] + mov r2, #1 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [sp, #0x14] + add r1, r5, r1 + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [sp, #0x18] + mov r1, #0 + add r0, r5, r0 + bl sub_0201ADA4 + add r7, r7, #1 + add r6, #0x10 + add r4, r4, #4 + cmp r7, #0xe + blt _0223EB5E + ldr r4, _0223EC00 ; =0x0223F1A8 + mov r6, #0 +_0223EBA8: + add r0, r6, #0 + add r0, #0x1a + lsl r7, r0, #4 + ldrh r0, [r4, #2] + add r1, r5, r7 + mov r2, #4 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldrh r0, [r4, #4] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldrh r0, [r4, #6] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #8 + str r0, [sp, #0xc] + ldrh r0, [r4, #8] + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [sp, #0x14] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, r7 + mov r1, #0 + bl sub_0201ADA4 + add r6, r6, #1 + add r4, #0xa + cmp r6, #8 + blt _0223EBA8 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_0223EBF4: .word 0x000001D9 +_0223EBF8: .word 0x000001F7 +_0223EBFC: .word 0x0223F170 +_0223EC00: .word 0x0223F1A8 + thumb_func_end ov88_0223E9C4 + + thumb_func_start ov88_0223EC04 +ov88_0223EC04: ; 0x0223EC04 + push {r3, r4, r5, lr} + add r4, r0, #0 + mov r5, #0 +_0223EC0A: + add r0, r5, #7 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + add r5, r5, #1 + cmp r5, #0xe + blt _0223EC0A + mov r5, #0 +_0223EC1C: + add r0, r5, #0 + add r0, #0x1a + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + add r5, r5, #1 + cmp r5, #8 + blt _0223EC1C + add r0, r4, #0 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x10 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x60 + bl sub_0201A8FC + mov r0, #0x15 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #0x16 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #0x17 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #6 + lsl r0, r0, #6 + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #0x19 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0201A8FC + pop {r3, r4, r5, pc} + thumb_func_end ov88_0223EC04 + + thumb_func_start ov88_0223EC78 +ov88_0223EC78: ; 0x0223EC78 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r3, #0 + ldr r3, [sp, #0x20] + add r5, r0, #0 + add r6, r1, #0 + cmp r3, #1 + bne _0223EC9C + mov r0, #0 + add r2, r0, #0 + bl sub_02002D7C + ldrb r1, [r5, #7] + lsl r1, r1, #3 + sub r1, r1, r0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r3, r0, #1 +_0223EC9C: + ldr r0, [sp, #0x24] + mov r1, #0 + str r0, [sp] + ldr r0, _0223ECB8 ; =0x000B0C00 + str r4, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223ECB8: .word 0x000B0C00 + thumb_func_end ov88_0223EC78 + + thumb_func_start ov88_0223ECBC +ov88_0223ECBC: ; 0x0223ECBC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r5, r0, #0 + add r6, r1, #0 + add r4, r2, #0 + add r1, r3, #0 + ldr r0, [sp, #0x20] + add r2, r6, #0 + mov r3, #0x1a + bl sub_0200B29C + add r6, r0, #0 + cmp r4, #1 + bne _0223ECE6 + ldr r2, _0223ED20 ; =0x000001D9 + add r0, r5, #0 + mov r1, #0 + mov r3, #0xa + bl sub_0200E060 + b _0223ECF2 +_0223ECE6: + ldr r2, _0223ED24 ; =0x000001F7 + add r0, r5, #0 + mov r1, #0 + mov r3, #0xb + bl sub_0200DC48 +_0223ECF2: + add r0, r5, #0 + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + ldr r0, _0223ED28 ; =0x0001020F + str r3, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r1, r4, #0 + add r2, r6, #0 + str r3, [sp, #0xc] + bl sub_0201D78C + add r4, r0, #0 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + add sp, #0x10 + pop {r4, r5, r6, pc} + nop +_0223ED20: .word 0x000001D9 +_0223ED24: .word 0x000001F7 +_0223ED28: .word 0x0001020F + thumb_func_end ov88_0223ECBC + + thumb_func_start ov88_0223ED2C +ov88_0223ED2C: ; 0x0223ED2C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r4, r2, #0 + add r5, r1, #0 + mov r6, #0 + ldr r1, [r4, #0] + mvn r6, r6 + cmp r1, #0 + beq _0223ED44 + cmp r1, #1 + beq _0223ED5C + b _0223ED72 +_0223ED44: + mov r1, #0x1a + str r1, [sp] + ldr r1, _0223ED78 ; =0x0223F148 + ldr r2, _0223ED7C ; =0x000001F7 + mov r3, #0xb + bl sub_02002100 + str r0, [r5, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0223ED72 +_0223ED5C: + ldr r0, [r5, #0] + mov r1, #0x1a + bl sub_02002114 + add r6, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r6, r0 + beq _0223ED72 + mov r0, #0 + str r0, [r4, #0] +_0223ED72: + add r0, r6, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223ED78: .word 0x0223F148 +_0223ED7C: .word 0x000001F7 + thumb_func_end ov88_0223ED2C + + thumb_func_start ov88_0223ED80 +ov88_0223ED80: ; 0x0223ED80 + push {r3, lr} + ldr r2, _0223ED90 ; =0x000001F7 + mov r1, #0 + mov r3, #0xb + bl sub_0200DC48 + pop {r3, pc} + nop +_0223ED90: .word 0x000001F7 + thumb_func_end ov88_0223ED80 + + thumb_func_start ov88_0223ED94 +ov88_0223ED94: ; 0x0223ED94 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + mov r0, #1 + str r0, [sp] + mov r0, #0xc + str r0, [sp, #4] + mov r0, #0xa + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _0223EE04 ; =0x0000014D + add r4, r2, #0 + add r6, r1, #0 + str r0, [sp, #0x10] + add r0, r3, #0 + add r1, r4, #0 + mov r2, #0 + mov r3, #0x13 + bl sub_0201A7E8 + ldr r2, _0223EE08 ; =0x000001F7 + add r0, r4, #0 + mov r1, #0 + mov r3, #0xb + bl sub_0200DC48 + ldr r3, _0223EE0C ; =0x0223F150 + add r2, sp, #0x14 + add r7, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r1, r6, #1 + add r0, sp, #0x14 + strh r1, [r0, #0x10] + mov r1, #5 + strh r1, [r0, #0x12] + ldr r0, _0223EE10 ; =ov88_0223EE14 + mov r1, #0 + str r0, [sp, #0x18] + add r0, r7, #0 + add r2, r1, #0 + mov r3, #0x1a + str r5, [sp, #0x14] + str r4, [sp, #0x20] + bl sub_0200112C + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0223EE04: .word 0x0000014D +_0223EE08: .word 0x000001F7 +_0223EE0C: .word 0x0223F150 +_0223EE10: .word ov88_0223EE14 + thumb_func_end ov88_0223ED94 + + thumb_func_start ov88_0223EE14 +ov88_0223EE14: ; 0x0223EE14 + push {r3, lr} + cmp r2, #0 + bne _0223EE20 + ldr r0, _0223EE24 ; =0x000005DC + bl sub_02005748 +_0223EE20: + pop {r3, pc} + nop +_0223EE24: .word 0x000005DC + thumb_func_end ov88_0223EE14 + + .rodata + + + .global Unk_ov88_0223F148 +Unk_ov88_0223F148: ; 0x0223F148 + .incbin "incbin/overlay88_rodata.bin", 0x320, 0x328 - 0x320 + + .global Unk_ov88_0223F150 +Unk_ov88_0223F150: ; 0x0223F150 + .incbin "incbin/overlay88_rodata.bin", 0x328, 0x348 - 0x328 + + .global Unk_ov88_0223F170 +Unk_ov88_0223F170: ; 0x0223F170 + .incbin "incbin/overlay88_rodata.bin", 0x348, 0x380 - 0x348 + + .global Unk_ov88_0223F1A8 +Unk_ov88_0223F1A8: ; 0x0223F1A8 + .incbin "incbin/overlay88_rodata.bin", 0x380, 0x50 + diff --git a/asm/overlay8.s b/asm/ov8_02249960.s similarity index 94% rename from asm/overlay8.s rename to asm/ov8_02249960.s index 8bf06d613..47c92c16f 100644 --- a/asm/overlay8.s +++ b/asm/ov8_02249960.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov8_02249960 ov8_02249960: ; 0x02249960 asr r1, r0 @@ -5854,14 +5857,199 @@ _0224C6C6: _0224C6D0: .word 0x0224C8D4 _0224C6D4: .word 0x0224C708 thumb_func_end ov8_0224C62C - ; 0x0224C6D8 - .rodata - .incbin "incbin/overlay8_rodata.bin" + + + .global Unk_ov8_0224C6D8 +Unk_ov8_0224C6D8: ; 0x0224C6D8 + .incbin "incbin/overlay8_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov8_0224C6E0 +Unk_ov8_0224C6E0: ; 0x0224C6E0 + .incbin "incbin/overlay8_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov8_0224C6E8 +Unk_ov8_0224C6E8: ; 0x0224C6E8 + .incbin "incbin/overlay8_rodata.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov8_0224C6F0 +Unk_ov8_0224C6F0: ; 0x0224C6F0 + .incbin "incbin/overlay8_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov8_0224C6F8 +Unk_ov8_0224C6F8: ; 0x0224C6F8 + .incbin "incbin/overlay8_rodata.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov8_0224C700 +Unk_ov8_0224C700: ; 0x0224C700 + .incbin "incbin/overlay8_rodata.bin", 0x28, 0x30 - 0x28 + + .global Unk_ov8_0224C708 +Unk_ov8_0224C708: ; 0x0224C708 + .incbin "incbin/overlay8_rodata.bin", 0x30, 0x38 - 0x30 + + .global Unk_ov8_0224C710 +Unk_ov8_0224C710: ; 0x0224C710 + .incbin "incbin/overlay8_rodata.bin", 0x38, 0x44 - 0x38 + + .global Unk_ov8_0224C71C +Unk_ov8_0224C71C: ; 0x0224C71C + .incbin "incbin/overlay8_rodata.bin", 0x44, 0x50 - 0x44 + + .global Unk_ov8_0224C728 +Unk_ov8_0224C728: ; 0x0224C728 + .incbin "incbin/overlay8_rodata.bin", 0x50, 0x5C - 0x50 + + .global Unk_ov8_0224C734 +Unk_ov8_0224C734: ; 0x0224C734 + .incbin "incbin/overlay8_rodata.bin", 0x5C, 0x68 - 0x5C + + .global Unk_ov8_0224C740 +Unk_ov8_0224C740: ; 0x0224C740 + .incbin "incbin/overlay8_rodata.bin", 0x68, 0x74 - 0x68 + + .global Unk_ov8_0224C74C +Unk_ov8_0224C74C: ; 0x0224C74C + .incbin "incbin/overlay8_rodata.bin", 0x74, 0x80 - 0x74 + + .global Unk_ov8_0224C758 +Unk_ov8_0224C758: ; 0x0224C758 + .incbin "incbin/overlay8_rodata.bin", 0x80, 0x8C - 0x80 + + .global Unk_ov8_0224C764 +Unk_ov8_0224C764: ; 0x0224C764 + .incbin "incbin/overlay8_rodata.bin", 0x8C, 0x9C - 0x8C + + .global Unk_ov8_0224C774 +Unk_ov8_0224C774: ; 0x0224C774 + .incbin "incbin/overlay8_rodata.bin", 0x9C, 0xB0 - 0x9C + + .global Unk_ov8_0224C788 +Unk_ov8_0224C788: ; 0x0224C788 + .incbin "incbin/overlay8_rodata.bin", 0xB0, 0xC8 - 0xB0 + + .global Unk_ov8_0224C7A0 +Unk_ov8_0224C7A0: ; 0x0224C7A0 + .incbin "incbin/overlay8_rodata.bin", 0xC8, 0xE0 - 0xC8 + + .global Unk_ov8_0224C7B8 +Unk_ov8_0224C7B8: ; 0x0224C7B8 + .incbin "incbin/overlay8_rodata.bin", 0xE0, 0xF8 - 0xE0 + + .global Unk_ov8_0224C7D0 +Unk_ov8_0224C7D0: ; 0x0224C7D0 + .incbin "incbin/overlay8_rodata.bin", 0xF8, 0x118 - 0xF8 + + .global Unk_ov8_0224C7F0 +Unk_ov8_0224C7F0: ; 0x0224C7F0 + .incbin "incbin/overlay8_rodata.bin", 0x118, 0x140 - 0x118 + + .global Unk_ov8_0224C818 +Unk_ov8_0224C818: ; 0x0224C818 + .incbin "incbin/overlay8_rodata.bin", 0x140, 0x16C - 0x140 + + .global Unk_ov8_0224C844 +Unk_ov8_0224C844: ; 0x0224C844 + .incbin "incbin/overlay8_rodata.bin", 0x16C, 0x19C - 0x16C + + .global Unk_ov8_0224C874 +Unk_ov8_0224C874: ; 0x0224C874 + .incbin "incbin/overlay8_rodata.bin", 0x19C, 0x1CC - 0x19C + + .global Unk_ov8_0224C8A4 +Unk_ov8_0224C8A4: ; 0x0224C8A4 + .incbin "incbin/overlay8_rodata.bin", 0x1CC, 0x1FC - 0x1CC + + .global Unk_ov8_0224C8D4 +Unk_ov8_0224C8D4: ; 0x0224C8D4 + .incbin "incbin/overlay8_rodata.bin", 0x1FC, 0x234 - 0x1FC + + .global Unk_ov8_0224C90C +Unk_ov8_0224C90C: ; 0x0224C90C + .incbin "incbin/overlay8_rodata.bin", 0x234, 0x27C - 0x234 + + .global Unk_ov8_0224C954 +Unk_ov8_0224C954: ; 0x0224C954 + .incbin "incbin/overlay8_rodata.bin", 0x27C, 0x2C4 - 0x27C + + .global Unk_ov8_0224C99C +Unk_ov8_0224C99C: ; 0x0224C99C + .incbin "incbin/overlay8_rodata.bin", 0x2C4, 0x31C - 0x2C4 + + .global Unk_ov8_0224C9F4 +Unk_ov8_0224C9F4: ; 0x0224C9F4 + .incbin "incbin/overlay8_rodata.bin", 0x31C, 0x384 - 0x31C + + .global Unk_ov8_0224CA5C +Unk_ov8_0224CA5C: ; 0x0224CA5C + .incbin "incbin/overlay8_rodata.bin", 0x384, 0x3ED - 0x384 + + .global Unk_ov8_0224CAC5 +Unk_ov8_0224CAC5: ; 0x0224CAC5 + .incbin "incbin/overlay8_rodata.bin", 0x3ED, 0x490 - 0x3ED + + .global Unk_ov8_0224CB68 +Unk_ov8_0224CB68: ; 0x0224CB68 + .incbin "incbin/overlay8_rodata.bin", 0x490, 0x610 - 0x490 + + .global Unk_ov8_0224CCE8 +Unk_ov8_0224CCE8: ; 0x0224CCE8 + .incbin "incbin/overlay8_rodata.bin", 0x610, 0x95D - 0x610 + + .global Unk_ov8_0224D035 +Unk_ov8_0224D035: ; 0x0224D035 + .incbin "incbin/overlay8_rodata.bin", 0x95D, 0x1960 - 0x95D + + .global Unk_ov8_0224E038 +Unk_ov8_0224E038: ; 0x0224E038 + .incbin "incbin/overlay8_rodata.bin", 0x1960, 0x196C - 0x1960 + + .global Unk_ov8_0224E044 +Unk_ov8_0224E044: ; 0x0224E044 + .incbin "incbin/overlay8_rodata.bin", 0x196C, 0x1978 - 0x196C + + .global Unk_ov8_0224E050 +Unk_ov8_0224E050: ; 0x0224E050 + .incbin "incbin/overlay8_rodata.bin", 0x1978, 0x1984 - 0x1978 + + .global Unk_ov8_0224E05C +Unk_ov8_0224E05C: ; 0x0224E05C + .incbin "incbin/overlay8_rodata.bin", 0x1984, 0x1990 - 0x1984 + + .global Unk_ov8_0224E068 +Unk_ov8_0224E068: ; 0x0224E068 + .incbin "incbin/overlay8_rodata.bin", 0x1990, 0x19A0 - 0x1990 + + .global Unk_ov8_0224E078 +Unk_ov8_0224E078: ; 0x0224E078 + .incbin "incbin/overlay8_rodata.bin", 0x19A0, 0x19B0 - 0x19A0 + + .global Unk_ov8_0224E088 +Unk_ov8_0224E088: ; 0x0224E088 + .incbin "incbin/overlay8_rodata.bin", 0x19B0, 0x19C0 - 0x19B0 + + .global Unk_ov8_0224E098 +Unk_ov8_0224E098: ; 0x0224E098 + .incbin "incbin/overlay8_rodata.bin", 0x19C0, 0x19D0 - 0x19C0 + + .global Unk_ov8_0224E0A8 +Unk_ov8_0224E0A8: ; 0x0224E0A8 + .incbin "incbin/overlay8_rodata.bin", 0x19D0, 0x1A48 - 0x19D0 + + .global Unk_ov8_0224E120 +Unk_ov8_0224E120: ; 0x0224E120 + .incbin "incbin/overlay8_rodata.bin", 0x1A48, 0x1C64 - 0x1A48 + + .global Unk_ov8_0224E33C +Unk_ov8_0224E33C: ; 0x0224E33C + .incbin "incbin/overlay8_rodata.bin", 0x1C64, 0x400 + .data - .incbin "incbin/overlay8_data.bin" - .bss - .space 0x0 + + .global Unk_ov8_0224E740 +Unk_ov8_0224E740: ; 0x0224E740 + .incbin "incbin/overlay8_data.bin", 0x0, 0x3C + diff --git a/asm/overlay90.s b/asm/ov90_021D0D80.s similarity index 95% rename from asm/overlay90.s rename to asm/ov90_021D0D80.s index 1c7b67adc..ab5c5f724 100644 --- a/asm/overlay90.s +++ b/asm/ov90_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov90_021D0D80 ov90_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -2006,14 +2009,67 @@ _021D1D3C: bl sub_0200D494 pop {r3, r4, r5, r6, r7, pc} thumb_func_end ov90_021D1C90 - ; 0x021D1D5C - .rodata - .incbin "incbin/overlay90_rodata.bin" + + + .global Unk_ov90_021D1D5C +Unk_ov90_021D1D5C: ; 0x021D1D5C + .incbin "incbin/overlay90_rodata.bin", 0x0, 0x10 - 0x0 + + .global Unk_ov90_021D1D6C +Unk_ov90_021D1D6C: ; 0x021D1D6C + .incbin "incbin/overlay90_rodata.bin", 0x10, 0x24 - 0x10 + + .global Unk_ov90_021D1D80 +Unk_ov90_021D1D80: ; 0x021D1D80 + .incbin "incbin/overlay90_rodata.bin", 0x24, 0x3C - 0x24 + + .global Unk_ov90_021D1D98 +Unk_ov90_021D1D98: ; 0x021D1D98 + .incbin "incbin/overlay90_rodata.bin", 0x3C, 0x58 - 0x3C + + .global Unk_ov90_021D1DB4 +Unk_ov90_021D1DB4: ; 0x021D1DB4 + .incbin "incbin/overlay90_rodata.bin", 0x58, 0x78 - 0x58 + + .global Unk_ov90_021D1DD4 +Unk_ov90_021D1DD4: ; 0x021D1DD4 + .incbin "incbin/overlay90_rodata.bin", 0x78, 0xA0 - 0x78 + + .global Unk_ov90_021D1DFC +Unk_ov90_021D1DFC: ; 0x021D1DFC + .incbin "incbin/overlay90_rodata.bin", 0xA0, 0xD0 - 0xA0 + + .global Unk_ov90_021D1E2C +Unk_ov90_021D1E2C: ; 0x021D1E2C + .incbin "incbin/overlay90_rodata.bin", 0xD0, 0x124 - 0xD0 + + .global Unk_ov90_021D1E80 +Unk_ov90_021D1E80: ; 0x021D1E80 + .incbin "incbin/overlay90_rodata.bin", 0x124, 0xA0 + .data - .incbin "incbin/overlay90_data.bin" - .bss - .space 0x0 + + .global Unk_ov90_021D1F40 +Unk_ov90_021D1F40: ; 0x021D1F40 + .incbin "incbin/overlay90_data.bin", 0x0, 0x18 - 0x0 + + .global Unk_ov90_021D1F58 +Unk_ov90_021D1F58: ; 0x021D1F58 + .incbin "incbin/overlay90_data.bin", 0x18, 0x30 - 0x18 + + .global Unk_ov90_021D1F70 +Unk_ov90_021D1F70: ; 0x021D1F70 + .incbin "incbin/overlay90_data.bin", 0x30, 0x48 - 0x30 + + .global Unk_ov90_021D1F88 +Unk_ov90_021D1F88: ; 0x021D1F88 + .incbin "incbin/overlay90_data.bin", 0x48, 0x60 - 0x48 + + .global Unk_ov90_021D1FA0 +Unk_ov90_021D1FA0: ; 0x021D1FA0 + .incbin "incbin/overlay90_data.bin", 0x60, 0x19 + diff --git a/asm/overlay91.s b/asm/ov91_021D0D80.s similarity index 97% rename from asm/overlay91.s rename to asm/ov91_021D0D80.s index df0df4732..cc9359159 100644 --- a/asm/overlay91.s +++ b/asm/ov91_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov91_021D0D80 ov91_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -3233,12 +3236,63 @@ _021D26FE: nop _021D2704: .word 0x00000162 thumb_func_end ov91_021D26AC - ; 0x021D2708 - .rodata - .incbin "incbin/overlay91_rodata.bin" - .bss - .space 0x0 + .global Unk_ov91_021D2708 +Unk_ov91_021D2708: ; 0x021D2708 + .incbin "incbin/overlay91_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov91_021D270C +Unk_ov91_021D270C: ; 0x021D270C + .incbin "incbin/overlay91_rodata.bin", 0x4, 0x14 - 0x4 + + .global Unk_ov91_021D271C +Unk_ov91_021D271C: ; 0x021D271C + .incbin "incbin/overlay91_rodata.bin", 0x14, 0x28 - 0x14 + + .global Unk_ov91_021D2730 +Unk_ov91_021D2730: ; 0x021D2730 + .incbin "incbin/overlay91_rodata.bin", 0x28, 0x40 - 0x28 + + .global Unk_ov91_021D2748 +Unk_ov91_021D2748: ; 0x021D2748 + .incbin "incbin/overlay91_rodata.bin", 0x40, 0x5C - 0x40 + + .global Unk_ov91_021D2764 +Unk_ov91_021D2764: ; 0x021D2764 + .incbin "incbin/overlay91_rodata.bin", 0x5C, 0x78 - 0x5C + + .global Unk_ov91_021D2780 +Unk_ov91_021D2780: ; 0x021D2780 + .incbin "incbin/overlay91_rodata.bin", 0x78, 0x94 - 0x78 + + .global Unk_ov91_021D279C +Unk_ov91_021D279C: ; 0x021D279C + .incbin "incbin/overlay91_rodata.bin", 0x94, 0xB4 - 0x94 + + .global Unk_ov91_021D27BC +Unk_ov91_021D27BC: ; 0x021D27BC + .incbin "incbin/overlay91_rodata.bin", 0xB4, 0xD4 - 0xB4 + + .global Unk_ov91_021D27DC +Unk_ov91_021D27DC: ; 0x021D27DC + .incbin "incbin/overlay91_rodata.bin", 0xD4, 0xFC - 0xD4 + + .global Unk_ov91_021D2804 +Unk_ov91_021D2804: ; 0x021D2804 + .incbin "incbin/overlay91_rodata.bin", 0xFC, 0x124 - 0xFC + + .global Unk_ov91_021D282C +Unk_ov91_021D282C: ; 0x021D282C + .incbin "incbin/overlay91_rodata.bin", 0x124, 0x17C - 0x124 + + .global Unk_ov91_021D2884 +Unk_ov91_021D2884: ; 0x021D2884 + .incbin "incbin/overlay91_rodata.bin", 0x17C, 0x1F4 - 0x17C + + .global Unk_ov91_021D28FC +Unk_ov91_021D28FC: ; 0x021D28FC + .incbin "incbin/overlay91_rodata.bin", 0x1F4, 0x2A4 + diff --git a/asm/overlay92.s b/asm/ov92_021D0D80.s similarity index 96% rename from asm/overlay92.s rename to asm/ov92_021D0D80.s index 384f79fde..9b8958f05 100644 --- a/asm/overlay92.s +++ b/asm/ov92_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov92_021D0D80 ov92_021D0D80: ; 0x021D0D80 push {r3, r4, r5, lr} @@ -3372,12 +3375,79 @@ _021D28F2: nop _021D2908: .word 0x0000FFFF thumb_func_end ov92_021D28C0 - ; 0x021D290C - .rodata - .incbin "incbin/overlay92_rodata.bin" - .bss - .space 0x0 + .global Unk_ov92_021D290C +Unk_ov92_021D290C: ; 0x021D290C + .incbin "incbin/overlay92_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov92_021D2914 +Unk_ov92_021D2914: ; 0x021D2914 + .incbin "incbin/overlay92_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov92_021D291C +Unk_ov92_021D291C: ; 0x021D291C + .incbin "incbin/overlay92_rodata.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov92_021D2924 +Unk_ov92_021D2924: ; 0x021D2924 + .incbin "incbin/overlay92_rodata.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov92_021D292C +Unk_ov92_021D292C: ; 0x021D292C + .incbin "incbin/overlay92_rodata.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov92_021D2934 +Unk_ov92_021D2934: ; 0x021D2934 + .incbin "incbin/overlay92_rodata.bin", 0x28, 0x30 - 0x28 + + .global Unk_ov92_021D293C +Unk_ov92_021D293C: ; 0x021D293C + .incbin "incbin/overlay92_rodata.bin", 0x30, 0x3C - 0x30 + + .global Unk_ov92_021D2948 +Unk_ov92_021D2948: ; 0x021D2948 + .incbin "incbin/overlay92_rodata.bin", 0x3C, 0x4C - 0x3C + + .global Unk_ov92_021D2958 +Unk_ov92_021D2958: ; 0x021D2958 + .incbin "incbin/overlay92_rodata.bin", 0x4C, 0x64 - 0x4C + + .global Unk_ov92_021D2970 +Unk_ov92_021D2970: ; 0x021D2970 + .incbin "incbin/overlay92_rodata.bin", 0x64, 0x80 - 0x64 + + .global Unk_ov92_021D298C +Unk_ov92_021D298C: ; 0x021D298C + .incbin "incbin/overlay92_rodata.bin", 0x80, 0x9C - 0x80 + + .global Unk_ov92_021D29A8 +Unk_ov92_021D29A8: ; 0x021D29A8 + .incbin "incbin/overlay92_rodata.bin", 0x9C, 0xBC - 0x9C + + .global Unk_ov92_021D29C8 +Unk_ov92_021D29C8: ; 0x021D29C8 + .incbin "incbin/overlay92_rodata.bin", 0xBC, 0xDC - 0xBC + + .global Unk_ov92_021D29E8 +Unk_ov92_021D29E8: ; 0x021D29E8 + .incbin "incbin/overlay92_rodata.bin", 0xDC, 0x100 - 0xDC + + .global Unk_ov92_021D2A0C +Unk_ov92_021D2A0C: ; 0x021D2A0C + .incbin "incbin/overlay92_rodata.bin", 0x100, 0x124 - 0x100 + + .global Unk_ov92_021D2A30 +Unk_ov92_021D2A30: ; 0x021D2A30 + .incbin "incbin/overlay92_rodata.bin", 0x124, 0x148 - 0x124 + + .global Unk_ov92_021D2A54 +Unk_ov92_021D2A54: ; 0x021D2A54 + .incbin "incbin/overlay92_rodata.bin", 0x148, 0x16C - 0x148 + + .global Unk_ov92_021D2A78 +Unk_ov92_021D2A78: ; 0x021D2A78 + .incbin "incbin/overlay92_rodata.bin", 0x16C, 0x28 + diff --git a/asm/overlay93.s b/asm/ov93_021D0D80.s similarity index 50% rename from asm/overlay93.s rename to asm/ov93_021D0D80.s index 43156d6e6..e69a757c7 100644 --- a/asm/overlay93.s +++ b/asm/ov93_021D0D80.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov93_021D0D80 ov93_021D0D80: ; 0x021D0D80 push {r3, r4, r5, r6, r7, lr} @@ -435,430 +438,34 @@ _021D10AE: _021D1118: .word 0x021D15A0 thumb_func_end ov93_021D102C - thumb_func_start ov93_021D111C -ov93_021D111C: ; 0x021D111C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r2, #2 - add r5, r0, #0 - mov r0, #3 - mov r1, #0x48 - lsl r2, r2, #0x10 - bl sub_02017FC8 - add r0, r5, #0 - mov r1, #0x98 - mov r2, #0x48 - bl sub_0200681C - mov r1, #0 - mov r2, #0x98 - add r4, r0, #0 - bl sub_020D5124 - add r0, r5, #0 - bl sub_02006840 - add r5, r0, #0 - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x94 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0x95 - strb r1, [r0] - mov r0, #0x48 - bl sub_020203AC - str r0, [r4, #0] - bl ov93_021D133C - add r0, r4, #0 - bl ov93_021D13C0 - add r0, sp, #0xc - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [sp] - str r1, [sp, #4] - ldr r1, [r4, #0] - ldr r2, _021D1200 ; =0x021D1538 - str r1, [sp, #8] - ldr r1, _021D1204 ; =0x0029AEC1 - ldr r3, _021D1208 ; =0x000005C1 - bl sub_020206D0 - ldr r0, [r4, #0] - bl sub_020203D4 - mov r4, #0 - mov r7, #2 - mov r6, #4 -_021D1194: - ldr r2, [r5, #4] - mov r0, #6 - add r1, r4, #0 - mul r1, r0 - add r3, r2, r1 - ldrsh r1, [r2, r1] - ldrsh r2, [r3, r7] - ldrsh r3, [r3, r6] - add r0, r4, #0 - bl sub_020AF51C - ldr r2, [r5, #4] - lsl r1, r4, #1 - add r1, r2, r1 - ldrh r1, [r1, #0x18] - add r0, r4, #0 - bl sub_020AF558 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021D1194 - ldr r2, [r5, #4] - ldrh r0, [r2, #0x20] - ldrh r1, [r2, #0x22] - ldr r2, [r2, #0x28] - bl sub_020AF56C - ldr r2, [r5, #4] - ldrh r0, [r2, #0x24] - ldrh r1, [r2, #0x26] - ldr r2, [r2, #0x2c] - bl sub_020AF590 - ldr r3, [r5, #4] - ldr r0, [r3, #0x40] - str r0, [sp] - ldr r0, [r3, #0x44] - str r0, [sp, #4] - ldr r0, [r3, #0x30] - ldr r1, [r3, #0x34] - ldr r2, [r3, #0x38] - ldr r3, [r3, #0x3c] - bl sub_020AF5B4 - mov r0, #0 - mov r1, #0x48 - bl sub_0208C120 - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1200: .word 0x021D1538 -_021D1204: .word 0x0029AEC1 -_021D1208: .word 0x000005C1 - thumb_func_end ov93_021D111C - - thumb_func_start ov93_021D120C -ov93_021D120C: ; 0x021D120C - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - ldr r6, _021D12E4 ; =0x021D1548 - add r2, r0, #0 - add r5, r1, #0 - add r4, sp, #0x18 - mov r3, #4 -_021D121A: - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _021D121A - ldr r0, [r6, #0] - add r3, sp, #0xc - str r0, [r4, #0] - ldr r4, _021D12E8 ; =0x021D1518 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - add r1, sp, #0 - str r0, [r3, #0] - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r2, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D1250 - cmp r0, #1 - beq _021D125E - b _021D129A -_021D1250: - ldr r0, _021D12EC ; =0x000006DC - bl sub_02005748 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D129A -_021D125E: - add r0, r4, #0 - add r0, #0x95 - ldrb r0, [r0] - cmp r0, #0 - bne _021D128C - ldr r2, [r4, #0x7c] - mov r0, #1 - ldr r1, [r2, #0] - lsl r0, r0, #0xc - add r1, r1, r0 - ldr r0, [r2, #8] - ldrh r0, [r0, #4] - lsl r0, r0, #0xc - cmp r1, r0 - bne _021D129A - add r1, r4, #0 - mov r0, #1 - add r1, #0x95 - strb r0, [r1] - mov r1, #0x48 - bl sub_0208C120 - b _021D129A -_021D128C: - bl sub_0200F2AC - cmp r0, #0 - beq _021D129A - add sp, #0x3c - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D129A: - mov r3, #1 - mov r2, #0 - lsl r3, r3, #0xc -_021D12A0: - lsl r0, r2, #2 - add r0, r4, r0 - ldr r1, [r0, #0x7c] - ldr r5, [r1, #8] - ldr r0, [r1, #0] - ldrh r5, [r5, #4] - add r0, r0, r3 - lsl r5, r5, #0xc - cmp r0, r5 - bge _021D12B6 - str r0, [r1, #0] -_021D12B6: - add r0, r2, #1 - lsl r0, r0, #0x18 - lsr r2, r0, #0x18 - cmp r2, #3 - blo _021D12A0 - bl sub_020241B4 - bl sub_020203EC - add r0, r4, #4 - add r1, sp, #0 - add r2, sp, #0x18 - add r3, sp, #0xc - bl sub_0201CA74 - mov r0, #1 - add r1, r0, #0 - bl sub_020241BC - mov r0, #0 - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - nop -_021D12E4: .word 0x021D1548 -_021D12E8: .word 0x021D1518 -_021D12EC: .word 0x000006DC - thumb_func_end ov93_021D120C - - thumb_func_start ov93_021D12F0 -ov93_021D12F0: ; 0x021D12F0 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - bl sub_0200682C - add r6, r0, #0 - add r7, r6, #0 - mov r4, #0 - add r7, #0x6c -_021D1300: - lsl r0, r4, #2 - add r5, r6, r0 - ldr r1, [r5, #0x7c] - add r0, r7, #0 - bl sub_020B2CD8 - ldr r0, [r5, #0x60] - bl sub_020181C4 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D1300 - ldr r0, [r6, #0x5c] - bl sub_020181C4 - ldr r0, [r6, #0] - bl sub_020203B8 - ldr r0, [sp] - bl sub_02006830 - bl sub_0201CBA0 - mov r0, #0x48 - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov93_021D12F0 - - thumb_func_start ov93_021D133C -ov93_021D133C: ; 0x021D133C - push {r3, lr} - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D138C ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D1390 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - bl ov93_021D13A0 - mov r0, #0x48 - bl sub_0201CAF4 - ldr r2, _021D1394 ; =0x04000060 - ldr r0, _021D1398 ; =0xFFFFCFFF - ldrh r1, [r2] - and r1, r0 - mov r0, #0x20 - orr r0, r1 - strh r0, [r2] - ldr r0, _021D139C ; =0x021D1524 - bl sub_020BFD2C - bl sub_0201FFE8 - pop {r3, pc} - nop -_021D138C: .word 0xFFFFE0FF -_021D1390: .word 0x04001000 -_021D1394: .word 0x04000060 -_021D1398: .word 0xFFFFCFFF -_021D139C: .word 0x021D1524 - thumb_func_end ov93_021D133C - - thumb_func_start ov93_021D13A0 -ov93_021D13A0: ; 0x021D13A0 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D13BC ; =0x021D156C - add r3, sp, #0 - mov r2, #5 -_021D13AA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D13AA - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D13BC: .word 0x021D156C - thumb_func_end ov93_021D13A0 - - thumb_func_start ov93_021D13C0 -ov93_021D13C0: ; 0x021D13C0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x9c - mov r1, #0x48 - bl sub_02006C24 - str r0, [sp] - add r0, r5, #0 - add r0, #0x6c - mov r1, #0x48 - mov r2, #4 - bl sub_020182CC - add r1, r5, #0 - add r1, #0x94 - ldrb r1, [r1] - ldr r0, [sp] - lsl r2, r1, #3 - ldr r1, _021D1498 ; =0x021D15C8 - ldrh r1, [r1, r2] - mov r2, #0x48 - bl sub_02006CB8 - add r1, r5, #0 - add r2, r5, #0 - str r0, [r5, #0x5c] - add r0, r5, #4 - add r1, #0x58 - add r2, #0x5c - bl sub_0201CA3C - ldr r0, [r5, #0x5c] - bl sub_020B3C1C - str r0, [sp, #4] - ldr r0, [r5, #0x58] - mov r1, #0 - mov r2, #0x40 - bl sub_020B2CE4 - ldr r0, [r5, #0x58] - mov r1, #0 - mov r2, #0x80 - bl sub_020B2CE4 - mov r2, #2 - ldr r0, [r5, #0x58] - mov r1, #0 - lsl r2, r2, #8 - bl sub_020B2CE4 - mov r2, #1 - ldr r0, [r5, #0x58] - mov r1, #0 - lsl r2, r2, #0xa - bl sub_020B2CE4 - add r0, r5, #0 - str r0, [sp, #8] - add r0, #0x6c - mov r4, #0 - str r0, [sp, #8] -_021D143E: - add r1, r5, #0 - add r1, #0x94 - ldrb r1, [r1] - lsl r0, r4, #2 - add r6, r5, r0 - lsl r3, r1, #3 - ldr r1, _021D1498 ; =0x021D15C8 - lsl r2, r4, #1 - add r1, r1, r3 - add r1, r2, r1 - ldrh r1, [r1, #2] - ldr r0, [sp] - mov r2, #0x48 - bl sub_02006CB8 - str r0, [r6, #0x60] - mov r1, #0 - bl sub_020B3C5C - add r7, r0, #0 - ldr r0, [sp, #8] - ldr r2, [r5, #0x58] - add r1, r7, #0 - bl sub_020B2CB4 - str r0, [r6, #0x7c] - ldr r2, [r5, #0x58] - ldr r3, [sp, #4] - add r1, r7, #0 - bl sub_020AE4F0 - ldr r1, [r6, #0x7c] - add r0, r5, #4 - bl sub_020AE77C - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D143E - ldr r0, [sp] - bl sub_02006CA8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1498: .word 0x021D15C8 - thumb_func_end ov93_021D13C0 - ; 0x021D149C - - .rodata - .incbin "incbin/overlay93_rodata.bin" + + + .global Unk_ov93_021D149C +Unk_ov93_021D149C: ; 0x021D149C + .incbin "incbin/overlay93_rodata.bin", 0x0, 0xC - 0x0 + + .global Unk_ov93_021D14A8 +Unk_ov93_021D14A8: ; 0x021D14A8 + .incbin "incbin/overlay93_rodata.bin", 0xC, 0x1C - 0xC + + .global Unk_ov93_021D14B8 +Unk_ov93_021D14B8: ; 0x021D14B8 + .incbin "incbin/overlay93_rodata.bin", 0x1C, 0x30 - 0x1C + + .global Unk_ov93_021D14CC +Unk_ov93_021D14CC: ; 0x021D14CC + .incbin "incbin/overlay93_rodata.bin", 0x30, 0x54 - 0x30 + + .global Unk_ov93_021D14F0 +Unk_ov93_021D14F0: ; 0x021D14F0 + .incbin "incbin/overlay93_rodata.bin", 0x54, 0x28 + .data - .incbin "incbin/overlay93_data.bin" - .bss - .space 0x0 + + .global Unk_ov93_021D15A0 +Unk_ov93_021D15A0: ; 0x021D15A0 + .incbin "incbin/overlay93_data.bin", 0x0, 0x28 + diff --git a/asm/ov93_021D111C.s b/asm/ov93_021D111C.s new file mode 100644 index 000000000..e2fbd2871 --- /dev/null +++ b/asm/ov93_021D111C.s @@ -0,0 +1,456 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov93_021D111C +ov93_021D111C: ; 0x021D111C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r2, #2 + add r5, r0, #0 + mov r0, #3 + mov r1, #0x48 + lsl r2, r2, #0x10 + bl sub_02017FC8 + add r0, r5, #0 + mov r1, #0x98 + mov r2, #0x48 + bl sub_0200681C + mov r1, #0 + mov r2, #0x98 + add r4, r0, #0 + bl sub_020D5124 + add r0, r5, #0 + bl sub_02006840 + add r5, r0, #0 + add r0, r4, #0 + ldrb r1, [r5] + add r0, #0x94 + strb r1, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0x95 + strb r1, [r0] + mov r0, #0x48 + bl sub_020203AC + str r0, [r4, #0] + bl ov93_021D133C + add r0, r4, #0 + bl ov93_021D13C0 + add r0, sp, #0xc + mov r1, #0 + str r1, [r0, #0] + str r1, [r0, #4] + str r1, [r0, #8] + str r1, [sp] + str r1, [sp, #4] + ldr r1, [r4, #0] + ldr r2, _021D1200 ; =0x021D1538 + str r1, [sp, #8] + ldr r1, _021D1204 ; =0x0029AEC1 + ldr r3, _021D1208 ; =0x000005C1 + bl sub_020206D0 + ldr r0, [r4, #0] + bl sub_020203D4 + mov r4, #0 + mov r7, #2 + mov r6, #4 +_021D1194: + ldr r2, [r5, #4] + mov r0, #6 + add r1, r4, #0 + mul r1, r0 + add r3, r2, r1 + ldrsh r1, [r2, r1] + ldrsh r2, [r3, r7] + ldrsh r3, [r3, r6] + add r0, r4, #0 + bl sub_020AF51C + ldr r2, [r5, #4] + lsl r1, r4, #1 + add r1, r2, r1 + ldrh r1, [r1, #0x18] + add r0, r4, #0 + bl sub_020AF558 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #4 + blo _021D1194 + ldr r2, [r5, #4] + ldrh r0, [r2, #0x20] + ldrh r1, [r2, #0x22] + ldr r2, [r2, #0x28] + bl sub_020AF56C + ldr r2, [r5, #4] + ldrh r0, [r2, #0x24] + ldrh r1, [r2, #0x26] + ldr r2, [r2, #0x2c] + bl sub_020AF590 + ldr r3, [r5, #4] + ldr r0, [r3, #0x40] + str r0, [sp] + ldr r0, [r3, #0x44] + str r0, [sp, #4] + ldr r0, [r3, #0x30] + ldr r1, [r3, #0x34] + ldr r2, [r3, #0x38] + ldr r3, [r3, #0x3c] + bl sub_020AF5B4 + mov r0, #0 + mov r1, #0x48 + bl sub_0208C120 + mov r0, #1 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_021D1200: .word 0x021D1538 +_021D1204: .word 0x0029AEC1 +_021D1208: .word 0x000005C1 + thumb_func_end ov93_021D111C + + thumb_func_start ov93_021D120C +ov93_021D120C: ; 0x021D120C + push {r3, r4, r5, r6, lr} + sub sp, #0x3c + ldr r6, _021D12E4 ; =0x021D1548 + add r2, r0, #0 + add r5, r1, #0 + add r4, sp, #0x18 + mov r3, #4 +_021D121A: + ldmia r6!, {r0, r1} + stmia r4!, {r0, r1} + sub r3, r3, #1 + bne _021D121A + ldr r0, [r6, #0] + add r3, sp, #0xc + str r0, [r4, #0] + ldr r4, _021D12E8 ; =0x021D1518 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r4, #0] + add r1, sp, #0 + str r0, [r3, #0] + mov r0, #0 + str r0, [r1, #0] + str r0, [r1, #4] + str r0, [r1, #8] + add r0, r2, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _021D1250 + cmp r0, #1 + beq _021D125E + b _021D129A +_021D1250: + ldr r0, _021D12EC ; =0x000006DC + bl sub_02005748 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _021D129A +_021D125E: + add r0, r4, #0 + add r0, #0x95 + ldrb r0, [r0] + cmp r0, #0 + bne _021D128C + ldr r2, [r4, #0x7c] + mov r0, #1 + ldr r1, [r2, #0] + lsl r0, r0, #0xc + add r1, r1, r0 + ldr r0, [r2, #8] + ldrh r0, [r0, #4] + lsl r0, r0, #0xc + cmp r1, r0 + bne _021D129A + add r1, r4, #0 + mov r0, #1 + add r1, #0x95 + strb r0, [r1] + mov r1, #0x48 + bl sub_0208C120 + b _021D129A +_021D128C: + bl sub_0200F2AC + cmp r0, #0 + beq _021D129A + add sp, #0x3c + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_021D129A: + mov r3, #1 + mov r2, #0 + lsl r3, r3, #0xc +_021D12A0: + lsl r0, r2, #2 + add r0, r4, r0 + ldr r1, [r0, #0x7c] + ldr r5, [r1, #8] + ldr r0, [r1, #0] + ldrh r5, [r5, #4] + add r0, r0, r3 + lsl r5, r5, #0xc + cmp r0, r5 + bge _021D12B6 + str r0, [r1, #0] +_021D12B6: + add r0, r2, #1 + lsl r0, r0, #0x18 + lsr r2, r0, #0x18 + cmp r2, #3 + blo _021D12A0 + bl sub_020241B4 + bl sub_020203EC + add r0, r4, #4 + add r1, sp, #0 + add r2, sp, #0x18 + add r3, sp, #0xc + bl sub_0201CA74 + mov r0, #1 + add r1, r0, #0 + bl sub_020241BC + mov r0, #0 + add sp, #0x3c + pop {r3, r4, r5, r6, pc} + nop +_021D12E4: .word 0x021D1548 +_021D12E8: .word 0x021D1518 +_021D12EC: .word 0x000006DC + thumb_func_end ov93_021D120C + + thumb_func_start ov93_021D12F0 +ov93_021D12F0: ; 0x021D12F0 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + bl sub_0200682C + add r6, r0, #0 + add r7, r6, #0 + mov r4, #0 + add r7, #0x6c +_021D1300: + lsl r0, r4, #2 + add r5, r6, r0 + ldr r1, [r5, #0x7c] + add r0, r7, #0 + bl sub_020B2CD8 + ldr r0, [r5, #0x60] + bl sub_020181C4 + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D1300 + ldr r0, [r6, #0x5c] + bl sub_020181C4 + ldr r0, [r6, #0] + bl sub_020203B8 + ldr r0, [sp] + bl sub_02006830 + bl sub_0201CBA0 + mov r0, #0x48 + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov93_021D12F0 + + thumb_func_start ov93_021D133C +ov93_021D133C: ; 0x021D133C + push {r3, lr} + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _021D138C ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _021D1390 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + bl ov93_021D13A0 + mov r0, #0x48 + bl sub_0201CAF4 + ldr r2, _021D1394 ; =0x04000060 + ldr r0, _021D1398 ; =0xFFFFCFFF + ldrh r1, [r2] + and r1, r0 + mov r0, #0x20 + orr r0, r1 + strh r0, [r2] + ldr r0, _021D139C ; =0x021D1524 + bl sub_020BFD2C + bl sub_0201FFE8 + pop {r3, pc} + nop +_021D138C: .word 0xFFFFE0FF +_021D1390: .word 0x04001000 +_021D1394: .word 0x04000060 +_021D1398: .word 0xFFFFCFFF +_021D139C: .word 0x021D1524 + thumb_func_end ov93_021D133C + + thumb_func_start ov93_021D13A0 +ov93_021D13A0: ; 0x021D13A0 + push {r4, lr} + sub sp, #0x28 + ldr r4, _021D13BC ; =0x021D156C + add r3, sp, #0 + mov r2, #5 +_021D13AA: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _021D13AA + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_021D13BC: .word 0x021D156C + thumb_func_end ov93_021D13A0 + + thumb_func_start ov93_021D13C0 +ov93_021D13C0: ; 0x021D13C0 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #0x9c + mov r1, #0x48 + bl sub_02006C24 + str r0, [sp] + add r0, r5, #0 + add r0, #0x6c + mov r1, #0x48 + mov r2, #4 + bl sub_020182CC + add r1, r5, #0 + add r1, #0x94 + ldrb r1, [r1] + ldr r0, [sp] + lsl r2, r1, #3 + ldr r1, _021D1498 ; =0x021D15C8 + ldrh r1, [r1, r2] + mov r2, #0x48 + bl sub_02006CB8 + add r1, r5, #0 + add r2, r5, #0 + str r0, [r5, #0x5c] + add r0, r5, #4 + add r1, #0x58 + add r2, #0x5c + bl sub_0201CA3C + ldr r0, [r5, #0x5c] + bl sub_020B3C1C + str r0, [sp, #4] + ldr r0, [r5, #0x58] + mov r1, #0 + mov r2, #0x40 + bl sub_020B2CE4 + ldr r0, [r5, #0x58] + mov r1, #0 + mov r2, #0x80 + bl sub_020B2CE4 + mov r2, #2 + ldr r0, [r5, #0x58] + mov r1, #0 + lsl r2, r2, #8 + bl sub_020B2CE4 + mov r2, #1 + ldr r0, [r5, #0x58] + mov r1, #0 + lsl r2, r2, #0xa + bl sub_020B2CE4 + add r0, r5, #0 + str r0, [sp, #8] + add r0, #0x6c + mov r4, #0 + str r0, [sp, #8] +_021D143E: + add r1, r5, #0 + add r1, #0x94 + ldrb r1, [r1] + lsl r0, r4, #2 + add r6, r5, r0 + lsl r3, r1, #3 + ldr r1, _021D1498 ; =0x021D15C8 + lsl r2, r4, #1 + add r1, r1, r3 + add r1, r2, r1 + ldrh r1, [r1, #2] + ldr r0, [sp] + mov r2, #0x48 + bl sub_02006CB8 + str r0, [r6, #0x60] + mov r1, #0 + bl sub_020B3C5C + add r7, r0, #0 + ldr r0, [sp, #8] + ldr r2, [r5, #0x58] + add r1, r7, #0 + bl sub_020B2CB4 + str r0, [r6, #0x7c] + ldr r2, [r5, #0x58] + ldr r3, [sp, #4] + add r1, r7, #0 + bl sub_020AE4F0 + ldr r1, [r6, #0x7c] + add r0, r5, #4 + bl sub_020AE77C + add r0, r4, #1 + lsl r0, r0, #0x18 + lsr r4, r0, #0x18 + cmp r4, #3 + blo _021D143E + ldr r0, [sp] + bl sub_02006CA8 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_021D1498: .word 0x021D15C8 + thumb_func_end ov93_021D13C0 + + .rodata + + + .global Unk_ov93_021D1518 +Unk_ov93_021D1518: ; 0x021D1518 + .incbin "incbin/overlay93_rodata.bin", 0x7C, 0x88 - 0x7C + + .global Unk_ov93_021D1524 +Unk_ov93_021D1524: ; 0x021D1524 + .incbin "incbin/overlay93_rodata.bin", 0x88, 0x98 - 0x88 + + .global Unk_ov93_021D1534 +Unk_ov93_021D1534: ; 0x021D1534 + .incbin "incbin/overlay93_rodata.bin", 0x98, 0xAC - 0x98 + + .global Unk_ov93_021D1548 +Unk_ov93_021D1548: ; 0x021D1548 + .incbin "incbin/overlay93_rodata.bin", 0xAC, 0xD0 - 0xAC + + .global Unk_ov93_021D156C +Unk_ov93_021D156C: ; 0x021D156C + .incbin "incbin/overlay93_rodata.bin", 0xD0, 0x28 + + + .data + + + .global Unk_ov93_021D15C8 +Unk_ov93_021D15C8: ; 0x021D15C8 + .incbin "incbin/overlay93_data.bin", 0x28, 0x20 + diff --git a/asm/ov94_0223B140.s b/asm/ov94_0223B140.s new file mode 100644 index 000000000..fd32f5a11 --- /dev/null +++ b/asm/ov94_0223B140.s @@ -0,0 +1,1598 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223B140 +ov94_0223B140: ; 0x0223B140 + push {r3, r4} + ldr r3, _0223B158 ; =0x02246AC0 + mov r4, #1 + str r4, [r3, #0] + mov r4, #0 + str r4, [r3, #4] + str r0, [r3, #8] + str r1, [r3, #0xc] + str r2, [r3, #0x10] + pop {r3, r4} + bx lr + nop +_0223B158: .word 0x02246AC0 + thumb_func_end ov94_0223B140 + + thumb_func_start ov94_0223B15C +ov94_0223B15C: ; 0x0223B15C + push {r3, lr} + ldr r1, _0223B440 ; =0x02246AC0 + ldr r0, [r1, #0] + cmp r0, #0x18 + bls _0223B168 + b _0223B7A4 +_0223B168: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B174: ; jump table + .short _0223B7A4 - _0223B174 - 2 ; case 0 + .short _0223B7A4 - _0223B174 - 2 ; case 1 + .short _0223B1A6 - _0223B174 - 2 ; case 2 + .short _0223B798 - _0223B174 - 2 ; case 3 + .short _0223B254 - _0223B174 - 2 ; case 4 + .short _0223B798 - _0223B174 - 2 ; case 5 + .short _0223B2DA - _0223B174 - 2 ; case 6 + .short _0223B798 - _0223B174 - 2 ; case 7 + .short _0223B35A - _0223B174 - 2 ; case 8 + .short _0223B798 - _0223B174 - 2 ; case 9 + .short _0223B3EE - _0223B174 - 2 ; case 10 + .short _0223B798 - _0223B174 - 2 ; case 11 + .short _0223B46C - _0223B174 - 2 ; case 12 + .short _0223B798 - _0223B174 - 2 ; case 13 + .short _0223B4F2 - _0223B174 - 2 ; case 14 + .short _0223B798 - _0223B174 - 2 ; case 15 + .short _0223B56A - _0223B174 - 2 ; case 16 + .short _0223B798 - _0223B174 - 2 ; case 17 + .short _0223B63C - _0223B174 - 2 ; case 18 + .short _0223B798 - _0223B174 - 2 ; case 19 + .short _0223B690 - _0223B174 - 2 ; case 20 + .short _0223B798 - _0223B174 - 2 ; case 21 + .short _0223B700 - _0223B174 - 2 ; case 22 + .short _0223B798 - _0223B174 - 2 ; case 23 + .short _0223B7A4 - _0223B174 - 2 ; case 24 +_0223B1A6: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B1B4 + cmp r0, #7 + beq _0223B1CC + pop {r3, pc} +_0223B1B4: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B440 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B1CC: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + ldr r2, _0223B444 ; =0x02246BE0 + str r1, [r0, #0] + ldrb r2, [r2, #0x1c] + cmp r2, #0xe + bhi _0223B246 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0223B1E6: ; jump table + .short _0223B246 - _0223B1E6 - 2 ; case 0 + .short _0223B204 - _0223B1E6 - 2 ; case 1 + .short _0223B20A - _0223B1E6 - 2 ; case 2 + .short _0223B210 - _0223B1E6 - 2 ; case 3 + .short _0223B246 - _0223B1E6 - 2 ; case 4 + .short _0223B246 - _0223B1E6 - 2 ; case 5 + .short _0223B246 - _0223B1E6 - 2 ; case 6 + .short _0223B216 - _0223B1E6 - 2 ; case 7 + .short _0223B228 - _0223B1E6 - 2 ; case 8 + .short _0223B22E - _0223B1E6 - 2 ; case 9 + .short _0223B234 - _0223B1E6 - 2 ; case 10 + .short _0223B23A - _0223B1E6 - 2 ; case 11 + .short _0223B21C - _0223B1E6 - 2 ; case 12 + .short _0223B222 - _0223B1E6 - 2 ; case 13 + .short _0223B240 - _0223B1E6 - 2 ; case 14 +_0223B204: + mov r1, #0 + str r1, [r0, #4] + b _0223B24E +_0223B20A: + sub r1, #0x1d + str r1, [r0, #4] + b _0223B24E +_0223B210: + sub r1, #0x1c + str r1, [r0, #4] + b _0223B24E +_0223B216: + sub r1, #0x19 + str r1, [r0, #4] + b _0223B24E +_0223B21C: + sub r1, #0x1e + str r1, [r0, #4] + b _0223B24E +_0223B222: + sub r1, #0x1f + str r1, [r0, #4] + b _0223B24E +_0223B228: + sub r1, #0x20 + str r1, [r0, #4] + b _0223B24E +_0223B22E: + sub r1, #0x21 + str r1, [r0, #4] + b _0223B24E +_0223B234: + sub r1, #0x22 + str r1, [r0, #4] + b _0223B24E +_0223B23A: + sub r1, #0x23 + str r1, [r0, #4] + b _0223B24E +_0223B240: + sub r1, #0x1a + str r1, [r0, #4] + b _0223B24E +_0223B246: + mov r1, #0xc + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B24E: + bl ov60_0221FDEC + pop {r3, pc} +_0223B254: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B262 + cmp r0, #7 + beq _0223B27A + pop {r3, pc} +_0223B262: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B440 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B27A: + ldr r0, _0223B440 ; =0x02246AC0 + mov r2, #0x18 + ldr r1, _0223B444 ; =0x02246BE0 + str r2, [r0, #0] + ldrb r1, [r1, #0x1c] + cmp r1, #5 + bgt _0223B2A4 + cmp r1, #0 + blt _0223B2CC + add r3, r1, r1 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_0223B298: ; jump table + .short _0223B2CC - _0223B298 - 2 ; case 0 + .short _0223B2AA - _0223B298 - 2 ; case 1 + .short _0223B2B0 - _0223B298 - 2 ; case 2 + .short _0223B2B6 - _0223B298 - 2 ; case 3 + .short _0223B2CC - _0223B298 - 2 ; case 4 + .short _0223B2BC - _0223B298 - 2 ; case 5 +_0223B2A4: + cmp r1, #0xe + beq _0223B2C2 + b _0223B2CC +_0223B2AA: + mov r1, #0 + str r1, [r0, #4] + b _0223B2D4 +_0223B2B0: + sub r2, #0x1d + str r2, [r0, #4] + b _0223B2D4 +_0223B2B6: + sub r2, #0x1c + str r2, [r0, #4] + b _0223B2D4 +_0223B2BC: + sub r2, #0x1b + str r2, [r0, #4] + b _0223B2D4 +_0223B2C2: + mov r1, #1 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B2D4 +_0223B2CC: + mov r1, #0xc + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B2D4: + bl ov60_0221FDEC + pop {r3, pc} +_0223B2DA: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B2E8 + cmp r0, #7 + beq _0223B300 + pop {r3, pc} +_0223B2E8: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B440 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B300: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE20 + mov r1, #0x49 + lsl r1, r1, #2 + cmp r0, r1 + bne _0223B31A + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #4] + b _0223B354 +_0223B31A: + ldr r0, _0223B448 ; =0x02246BC0 + ldr r0, [r0, #0x40] + ldrb r0, [r0] + cmp r0, #3 + beq _0223B338 + cmp r0, #5 + beq _0223B32E + cmp r0, #0xe + beq _0223B342 + b _0223B34C +_0223B32E: + mov r1, #2 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B354 +_0223B338: + mov r1, #3 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B354 +_0223B342: + mov r1, #1 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B354 +_0223B34C: + mov r1, #0xc + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B354: + bl ov60_0221FDEC + pop {r3, pc} +_0223B35A: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B368 + cmp r0, #7 + beq _0223B380 + pop {r3, pc} +_0223B368: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B440 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B380: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE20 + mov r1, #0x49 + lsl r1, r1, #2 + cmp r0, r1 + bne _0223B39A + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #1 + str r1, [r0, #4] + b _0223B3E8 +_0223B39A: + ldr r0, _0223B448 ; =0x02246BC0 + ldr r0, [r0, #0x40] + ldrb r0, [r0] + cmp r0, #5 + bgt _0223B3B4 + cmp r0, #3 + blt _0223B3E0 + beq _0223B3C4 + cmp r0, #4 + beq _0223B3CE + cmp r0, #5 + beq _0223B3BA + b _0223B3E0 +_0223B3B4: + cmp r0, #0xe + beq _0223B3D6 + b _0223B3E0 +_0223B3BA: + mov r1, #2 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B3E8 +_0223B3C4: + mov r1, #3 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B3E8 +_0223B3CE: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #4] + b _0223B3E8 +_0223B3D6: + mov r1, #1 + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B3E8 +_0223B3E0: + mov r1, #0xc + ldr r0, _0223B440 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B3E8: + bl ov60_0221FDEC + pop {r3, pc} +_0223B3EE: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B3FC + cmp r0, #7 + beq _0223B414 + pop {r3, pc} +_0223B3FC: + ldr r0, _0223B440 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B440 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B414: + ldr r1, _0223B440 ; =0x02246AC0 + mov r2, #0x18 + ldr r0, _0223B444 ; =0x02246BE0 + str r2, [r1, #0] + ldrb r0, [r0, #0x1c] + cmp r0, #5 + bgt _0223B432 + cmp r0, #1 + blt _0223B45E + beq _0223B438 + cmp r0, #3 + beq _0223B452 + cmp r0, #5 + beq _0223B44C + b _0223B45E +_0223B432: + cmp r0, #0xe + beq _0223B458 + b _0223B45E +_0223B438: + mov r0, #0 + str r0, [r1, #4] + b _0223B466 + nop +_0223B440: .word 0x02246AC0 +_0223B444: .word 0x02246BE0 +_0223B448: .word 0x02246BC0 +_0223B44C: + sub r2, #0x1b + str r2, [r1, #4] + b _0223B466 +_0223B452: + sub r2, #0x1c + str r2, [r1, #4] + b _0223B466 +_0223B458: + sub r2, #0x1a + str r2, [r1, #4] + b _0223B466 +_0223B45E: + mov r1, #0xc + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B466: + bl ov60_0221FDEC + pop {r3, pc} +_0223B46C: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B47A + cmp r0, #7 + beq _0223B492 + pop {r3, pc} +_0223B47A: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B492: + ldr r0, _0223B740 ; =0x02246AC0 + mov r2, #0x18 + ldr r1, _0223B744 ; =0x02246BE0 + str r2, [r0, #0] + ldrb r1, [r1, #0x1c] + cmp r1, #5 + bgt _0223B4BC + cmp r1, #0 + blt _0223B4E4 + add r3, r1, r1 + add r3, pc + ldrh r3, [r3, #6] + lsl r3, r3, #0x10 + asr r3, r3, #0x10 + add pc, r3 +_0223B4B0: ; jump table + .short _0223B4E4 - _0223B4B0 - 2 ; case 0 + .short _0223B4C2 - _0223B4B0 - 2 ; case 1 + .short _0223B4CE - _0223B4B0 - 2 ; case 2 + .short _0223B4D4 - _0223B4B0 - 2 ; case 3 + .short _0223B4E4 - _0223B4B0 - 2 ; case 4 + .short _0223B4C8 - _0223B4B0 - 2 ; case 5 +_0223B4BC: + cmp r1, #0xe + beq _0223B4DA + b _0223B4E4 +_0223B4C2: + mov r1, #0 + str r1, [r0, #4] + b _0223B4EC +_0223B4C8: + sub r2, #0x1b + str r2, [r0, #4] + b _0223B4EC +_0223B4CE: + sub r2, #0x1d + str r2, [r0, #4] + b _0223B4EC +_0223B4D4: + sub r2, #0x1c + str r2, [r0, #4] + b _0223B4EC +_0223B4DA: + mov r1, #1 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B4EC +_0223B4E4: + mov r1, #0xc + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B4EC: + bl ov60_0221FDEC + pop {r3, pc} +_0223B4F2: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B500 + cmp r0, #7 + beq _0223B518 + pop {r3, pc} +_0223B500: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B518: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE20 + mov r1, #0x49 + lsl r1, r1, #2 + cmp r0, r1 + blo _0223B53C + bl ov60_0221FE20 + mov r1, #0x49 + lsl r1, r1, #2 + bl sub_020E2178 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + b _0223B564 +_0223B53C: + cmp r0, #0 + bne _0223B548 + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #4] + b _0223B564 +_0223B548: + ldr r0, _0223B748 ; =0x02246BC0 + ldr r0, [r0, #0x40] + ldrb r0, [r0] + cmp r0, #0xe + bne _0223B55C + mov r1, #1 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B564 +_0223B55C: + mov r1, #0xc + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B564: + bl ov60_0221FDEC + pop {r3, pc} +_0223B56A: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B578 + cmp r0, #7 + beq _0223B590 + pop {r3, pc} +_0223B578: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B590: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE20 + mov r1, #0x49 + lsl r1, r1, #2 + cmp r0, r1 + bne _0223B5AA + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #4] + b _0223B636 +_0223B5AA: + ldr r0, _0223B748 ; =0x02246BC0 + ldr r0, [r0, #0x40] + ldrb r0, [r0] + cmp r0, #0xe + bhi _0223B62E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B5C0: ; jump table + .short _0223B62E - _0223B5C0 - 2 ; case 0 + .short _0223B62E - _0223B5C0 - 2 ; case 1 + .short _0223B5DE - _0223B5C0 - 2 ; case 2 + .short _0223B62E - _0223B5C0 - 2 ; case 3 + .short _0223B62E - _0223B5C0 - 2 ; case 4 + .short _0223B62E - _0223B5C0 - 2 ; case 5 + .short _0223B62E - _0223B5C0 - 2 ; case 6 + .short _0223B62E - _0223B5C0 - 2 ; case 7 + .short _0223B5FC - _0223B5C0 - 2 ; case 8 + .short _0223B606 - _0223B5C0 - 2 ; case 9 + .short _0223B610 - _0223B5C0 - 2 ; case 10 + .short _0223B61A - _0223B5C0 - 2 ; case 11 + .short _0223B5E8 - _0223B5C0 - 2 ; case 12 + .short _0223B5F2 - _0223B5C0 - 2 ; case 13 + .short _0223B624 - _0223B5C0 - 2 ; case 14 +_0223B5DE: + mov r1, #4 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B5E8: + mov r1, #5 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B5F2: + mov r1, #6 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B5FC: + mov r1, #7 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B606: + mov r1, #8 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B610: + mov r1, #9 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B61A: + mov r1, #0xa + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B624: + mov r1, #1 + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B636 +_0223B62E: + mov r1, #0xc + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B636: + bl ov60_0221FDEC + pop {r3, pc} +_0223B63C: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B64A + cmp r0, #7 + beq _0223B662 + pop {r3, pc} +_0223B64A: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B662: + ldr r1, _0223B740 ; =0x02246AC0 + mov r2, #0x18 + ldr r0, _0223B744 ; =0x02246BE0 + str r2, [r1, #0] + ldrb r0, [r0, #0x1c] + cmp r0, #1 + beq _0223B67A + cmp r0, #2 + beq _0223B686 + cmp r0, #0xe + beq _0223B680 + b _0223B68A +_0223B67A: + mov r0, #0 + str r0, [r1, #4] + b _0223B68A +_0223B680: + sub r2, #0x1a + str r2, [r1, #4] + b _0223B68A +_0223B686: + sub r2, #0x1d + str r2, [r1, #4] +_0223B68A: + bl ov60_0221FDEC + pop {r3, pc} +_0223B690: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B69E + cmp r0, #7 + beq _0223B6B6 + pop {r3, pc} +_0223B69E: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B6B6: + ldr r1, _0223B740 ; =0x02246AC0 + mov r2, #0x18 + ldr r0, _0223B744 ; =0x02246BE0 + str r2, [r1, #0] + ldrb r0, [r0, #0x1c] + cmp r0, #7 + bgt _0223B6D4 + cmp r0, #1 + blt _0223B6F2 + beq _0223B6DA + cmp r0, #6 + beq _0223B6E0 + cmp r0, #7 + beq _0223B6E6 + b _0223B6F2 +_0223B6D4: + cmp r0, #0xe + beq _0223B6EC + b _0223B6F2 +_0223B6DA: + mov r0, #0 + str r0, [r1, #4] + b _0223B6FA +_0223B6E0: + mov r0, #1 + str r0, [r1, #4] + b _0223B6FA +_0223B6E6: + mov r0, #2 + str r0, [r1, #4] + b _0223B6FA +_0223B6EC: + sub r2, #0x1a + str r2, [r1, #4] + b _0223B6FA +_0223B6F2: + mov r1, #0xc + ldr r0, _0223B740 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B6FA: + bl ov60_0221FDEC + pop {r3, pc} +_0223B700: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B70E + cmp r0, #7 + beq _0223B726 + pop {r3, pc} +_0223B70E: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov94_0223BC18 + ldr r1, _0223B740 ; =0x02246AC0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B726: + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + bl ov60_0221FE20 + cmp r0, #8 + bne _0223B73C + ldr r0, _0223B740 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #4] + b _0223B792 +_0223B73C: + ldr r0, _0223B744 ; =0x02246BE0 + b _0223B74C + ; .align 2, 0 +_0223B740: .word 0x02246AC0 +_0223B744: .word 0x02246BE0 +_0223B748: .word 0x02246BC0 +_0223B74C: + ldrb r0, [r0, #0x1c] + cmp r0, #7 + bgt _0223B762 + cmp r0, #1 + blt _0223B78A + beq _0223B768 + cmp r0, #6 + beq _0223B770 + cmp r0, #7 + beq _0223B778 + b _0223B78A +_0223B762: + cmp r0, #0xe + beq _0223B780 + b _0223B78A +_0223B768: + ldr r0, _0223B7A8 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #4] + b _0223B792 +_0223B770: + ldr r0, _0223B7A8 ; =0x02246AC0 + mov r1, #1 + str r1, [r0, #4] + b _0223B792 +_0223B778: + ldr r0, _0223B7A8 ; =0x02246AC0 + mov r1, #2 + str r1, [r0, #4] + b _0223B792 +_0223B780: + mov r1, #1 + ldr r0, _0223B7A8 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B792 +_0223B78A: + mov r1, #0xc + ldr r0, _0223B7A8 ; =0x02246AC0 + mvn r1, r1 + str r1, [r0, #4] +_0223B792: + bl ov60_0221FDEC + pop {r3, pc} +_0223B798: + mov r0, #0x18 + str r0, [r1, #0] + sub r0, #0x24 + str r0, [r1, #4] + bl ov60_0221FDEC +_0223B7A4: + pop {r3, pc} + nop +_0223B7A8: .word 0x02246AC0 + thumb_func_end ov94_0223B15C + + thumb_func_start ov94_0223B7AC +ov94_0223B7AC: ; 0x0223B7AC + ldr r0, _0223B7B4 ; =0x02246AC0 + mov r1, #0 + str r1, [r0, #0] + bx lr + ; .align 2, 0 +_0223B7B4: .word 0x02246AC0 + thumb_func_end ov94_0223B7AC + + thumb_func_start ov94_0223B7B8 +ov94_0223B7B8: ; 0x0223B7B8 + ldr r1, _0223B7D4 ; =0x02246AC0 + ldr r0, [r1, #0] + cmp r0, #1 + beq _0223B7C6 + cmp r0, #0x18 + beq _0223B7CA + b _0223B7D0 +_0223B7C6: + mov r0, #1 + bx lr +_0223B7CA: + mov r0, #1 + str r0, [r1, #0] + bx lr +_0223B7D0: + mov r0, #0 + bx lr + ; .align 2, 0 +_0223B7D4: .word 0x02246AC0 + thumb_func_end ov94_0223B7B8 + + thumb_func_start ov94_0223B7D8 +ov94_0223B7D8: ; 0x0223B7D8 + ldr r0, _0223B7E0 ; =0x02246AC0 + ldr r0, [r0, #4] + bx lr + nop +_0223B7E0: .word 0x02246AC0 + thumb_func_end ov94_0223B7D8 + + thumb_func_start ov94_0223B7E4 +ov94_0223B7E4: ; 0x0223B7E4 + push {r3, lr} + add r1, r0, #0 + mov r2, #0x49 + ldr r0, _0223B824 ; =0x02246AD4 + lsl r2, r2, #2 + bl sub_020D50B8 + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + mov r2, #0x49 + ldr r0, _0223B828 ; =0x02246400 + ldr r1, _0223B824 ; =0x02246AD4 + ldr r3, _0223B82C ; =0x02246BFC + lsl r2, r2, #2 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223B814 + ldr r0, _0223B830 ; =0x02246AC0 + mov r1, #2 + str r1, [r0, #0] + pop {r3, pc} +_0223B814: + ldr r0, _0223B830 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + ; .align 2, 0 +_0223B824: .word 0x02246AD4 +_0223B828: .word 0x02246400 +_0223B82C: .word 0x02246BFC +_0223B830: .word 0x02246AC0 + thumb_func_end ov94_0223B7E4 + + thumb_func_start ov94_0223B834 +ov94_0223B834: ; 0x0223B834 + push {r3, lr} + ldr r0, _0223B874 ; =0x02246ACC + ldr r2, _0223B878 ; =0x02246AD4 + ldr r1, [r0, #0] + ldr r0, [r0, #4] + str r1, [r2, #0] + str r0, [r2, #4] + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + ldr r0, _0223B87C ; =0x0224644C + ldr r1, _0223B878 ; =0x02246AD4 + ldr r3, _0223B880 ; =0x02246BFC + mov r2, #8 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223B862 + ldr r0, _0223B884 ; =0x02246AC0 + mov r1, #4 + str r1, [r0, #0] + pop {r3, pc} +_0223B862: + ldr r0, _0223B884 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + nop +_0223B874: .word 0x02246ACC +_0223B878: .word 0x02246AD4 +_0223B87C: .word 0x0224644C +_0223B880: .word 0x02246BFC +_0223B884: .word 0x02246AC0 + thumb_func_end ov94_0223B834 + + thumb_func_start ov94_0223B888 +ov94_0223B888: ; 0x0223B888 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, _0223B8C8 ; =0x02246BC0 + str r4, [r0, #0x40] + bl ov60_0221FC84 + mov r0, #0x49 + lsl r0, r0, #2 + str r0, [sp] + ldr r0, _0223B8CC ; =0x0224649C + ldr r1, _0223B8D0 ; =0x02246AD4 + mov r2, #0 + add r3, r4, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223B8B6 + ldr r0, _0223B8D4 ; =0x02246AC0 + mov r1, #6 + str r1, [r0, #0] + add sp, #4 + pop {r3, r4, pc} +_0223B8B6: + ldr r0, _0223B8D4 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223B8C8: .word 0x02246BC0 +_0223B8CC: .word 0x0224649C +_0223B8D0: .word 0x02246AD4 +_0223B8D4: .word 0x02246AC0 + thumb_func_end ov94_0223B888 + + thumb_func_start ov94_0223B8D8 +ov94_0223B8D8: ; 0x0223B8D8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, _0223B918 ; =0x02246BC0 + str r4, [r0, #0x40] + bl ov60_0221FC84 + mov r0, #0x49 + lsl r0, r0, #2 + str r0, [sp] + ldr r0, _0223B91C ; =0x022464E4 + ldr r1, _0223B920 ; =0x02246AD4 + mov r2, #0 + add r3, r4, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223B906 + ldr r0, _0223B924 ; =0x02246AC0 + mov r1, #8 + str r1, [r0, #0] + add sp, #4 + pop {r3, r4, pc} +_0223B906: + ldr r0, _0223B924 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223B918: .word 0x02246BC0 +_0223B91C: .word 0x022464E4 +_0223B920: .word 0x02246AD4 +_0223B924: .word 0x02246AC0 + thumb_func_end ov94_0223B8D8 + + thumb_func_start ov94_0223B928 +ov94_0223B928: ; 0x0223B928 + push {r3, lr} + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + ldr r0, _0223B95C ; =0x02246530 + ldr r1, _0223B960 ; =0x02246AD4 + ldr r3, _0223B964 ; =0x02246BFC + mov r2, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223B94A + ldr r0, _0223B968 ; =0x02246AC0 + mov r1, #0xa + str r1, [r0, #0] + pop {r3, pc} +_0223B94A: + ldr r0, _0223B968 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + nop +_0223B95C: .word 0x02246530 +_0223B960: .word 0x02246AD4 +_0223B964: .word 0x02246BFC +_0223B968: .word 0x02246AC0 + thumb_func_end ov94_0223B928 + + thumb_func_start ov94_0223B96C +ov94_0223B96C: ; 0x0223B96C + push {r3, lr} + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + ldr r0, _0223B9A0 ; =0x0224657C + ldr r1, _0223B9A4 ; =0x02246AD4 + ldr r3, _0223B9A8 ; =0x02246BFC + mov r2, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223B98E + ldr r0, _0223B9AC ; =0x02246AC0 + mov r1, #0xc + str r1, [r0, #0] + pop {r3, pc} +_0223B98E: + ldr r0, _0223B9AC ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + nop +_0223B9A0: .word 0x0224657C +_0223B9A4: .word 0x02246AD4 +_0223B9A8: .word 0x02246BFC +_0223B9AC: .word 0x02246AC0 + thumb_func_end ov94_0223B96C + + thumb_func_start ov94_0223B9B0 +ov94_0223B9B0: ; 0x0223B9B0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _0223BA14 ; =0x02246BC0 + add r6, r2, #0 + str r6, [r0, #0x40] + add r4, r1, #0 + bl ov60_0221FC84 + ldrb r0, [r5] + ldr r1, _0223BA18 ; =0x02246AD4 + mov r2, #7 + strb r0, [r1] + ldrb r0, [r5, #1] + add r3, r6, #0 + strb r0, [r1, #1] + ldrb r0, [r5, #2] + strb r0, [r1, #2] + ldrb r0, [r5, #3] + strb r0, [r1, #3] + ldrb r0, [r5, #4] + strb r0, [r1, #4] + ldrb r0, [r5, #5] + strb r0, [r1, #5] + ldr r0, _0223BA1C ; =0x02246AC0 + strb r4, [r0, #0x1a] + mov r0, #0x49 + lsl r0, r0, #2 + mul r0, r4 + str r0, [sp] + ldr r0, _0223BA20 ; =0x022465C8 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223BA00 + ldr r0, _0223BA1C ; =0x02246AC0 + mov r1, #0xe + str r1, [r0, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0223BA00: + ldr r0, _0223BA1C ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + add sp, #4 + pop {r3, r4, r5, r6, pc} + nop +_0223BA14: .word 0x02246BC0 +_0223BA18: .word 0x02246AD4 +_0223BA1C: .word 0x02246AC0 +_0223BA20: .word 0x022465C8 + thumb_func_end ov94_0223B9B0 + + thumb_func_start ov94_0223BA24 +ov94_0223BA24: ; 0x0223BA24 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223BA78 ; =0x02246BC0 + add r4, r1, #0 + str r4, [r0, #0x40] + bl ov60_0221FC84 + ldr r3, _0223BA7C ; =0x02246AD4 + add r2, r5, #0 + mov r1, #8 +_0223BA38: + ldrb r0, [r2] + add r2, r2, #1 + strb r0, [r3] + add r3, r3, #1 + sub r1, r1, #1 + bne _0223BA38 + mov r0, #6 + ldrsb r1, [r5, r0] + mov r0, #0x49 + lsl r0, r0, #2 + mul r0, r1 + str r0, [sp] + ldr r0, _0223BA80 ; =0x022465C8 + ldr r1, _0223BA7C ; =0x02246AD4 + mov r2, #8 + add r3, r4, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223BA68 + ldr r0, _0223BA84 ; =0x02246AC0 + mov r1, #0xe + str r1, [r0, #0] + pop {r3, r4, r5, pc} +_0223BA68: + ldr r0, _0223BA84 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223BA78: .word 0x02246BC0 +_0223BA7C: .word 0x02246AD4 +_0223BA80: .word 0x022465C8 +_0223BA84: .word 0x02246AC0 + thumb_func_end ov94_0223BA24 + + thumb_func_start ov94_0223BA88 +ov94_0223BA88: ; 0x0223BA88 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _0223BADC ; =0x02246BC0 + add r6, r2, #0 + add r4, r1, #0 + str r6, [r0, #0x40] + bl ov60_0221FC84 + mov r2, #0x49 + ldr r0, _0223BAE0 ; =0x02246AD4 + add r1, r4, #0 + lsl r2, r2, #2 + bl sub_020D50B8 + ldr r0, _0223BADC ; =0x02246BC0 + mov r2, #0x49 + str r5, [r0, #0x38] + lsl r2, r2, #2 + str r2, [sp] + ldr r0, _0223BAE4 ; =0x02246614 + ldr r1, _0223BAE0 ; =0x02246AD4 + add r2, r2, #4 + add r3, r6, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223BACA + ldr r0, _0223BAE8 ; =0x02246AC0 + mov r1, #0x10 + str r1, [r0, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0223BACA: + ldr r0, _0223BAE8 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223BADC: .word 0x02246BC0 +_0223BAE0: .word 0x02246AD4 +_0223BAE4: .word 0x02246614 +_0223BAE8: .word 0x02246AC0 + thumb_func_end ov94_0223BA88 + + thumb_func_start ov94_0223BAEC +ov94_0223BAEC: ; 0x0223BAEC + push {r3, lr} + ldr r0, _0223BB2C ; =0x02246ACC + ldr r2, _0223BB30 ; =0x02246AD4 + ldr r1, [r0, #0] + ldr r0, [r0, #4] + str r1, [r2, #0] + str r0, [r2, #4] + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + ldr r0, _0223BB34 ; =0x02246664 + ldr r1, _0223BB30 ; =0x02246AD4 + ldr r3, _0223BB38 ; =0x02246BFC + mov r2, #8 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223BB1A + ldr r0, _0223BB3C ; =0x02246AC0 + mov r1, #0x12 + str r1, [r0, #0] + pop {r3, pc} +_0223BB1A: + ldr r0, _0223BB3C ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + nop +_0223BB2C: .word 0x02246ACC +_0223BB30: .word 0x02246AD4 +_0223BB34: .word 0x02246664 +_0223BB38: .word 0x02246BFC +_0223BB3C: .word 0x02246AC0 + thumb_func_end ov94_0223BAEC + + thumb_func_start ov94_0223BB40 +ov94_0223BB40: ; 0x0223BB40 + push {r3, lr} + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + ldr r0, _0223BB74 ; =0x022466B8 + ldr r1, _0223BB78 ; =0x02246AD4 + ldr r3, _0223BB7C ; =0x02246BFC + mov r2, #0 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223BB62 + ldr r0, _0223BB80 ; =0x02246AC0 + mov r1, #0x14 + str r1, [r0, #0] + pop {r3, pc} +_0223BB62: + ldr r0, _0223BB80 ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + nop +_0223BB74: .word 0x022466B8 +_0223BB78: .word 0x02246AD4 +_0223BB7C: .word 0x02246BFC +_0223BB80: .word 0x02246AC0 + thumb_func_end ov94_0223BB40 + + thumb_func_start ov94_0223BB84 +ov94_0223BB84: ; 0x0223BB84 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x1c + add r4, r1, #0 + bl sub_020C3FA0 + ldr r0, _0223BBD0 ; =0x02246AD4 + add r1, r5, #0 + mov r2, #0x64 + bl sub_020D50B8 + ldr r0, _0223BBD4 ; =0x02246BC0 + str r4, [r0, #0x40] + bl ov60_0221FC84 + mov r0, #8 + str r0, [sp] + ldr r3, _0223BBD4 ; =0x02246BC0 + ldr r0, _0223BBD8 ; =0x02246704 + ldr r1, _0223BBD0 ; =0x02246AD4 + ldr r3, [r3, #0x40] + mov r2, #0x64 + bl ov94_0223BBE0 + cmp r0, #0 + beq _0223BBC0 + ldr r0, _0223BBDC ; =0x02246AC0 + mov r1, #0x16 + str r1, [r0, #0] + pop {r3, r4, r5, pc} +_0223BBC0: + ldr r0, _0223BBDC ; =0x02246AC0 + mov r1, #0x18 + str r1, [r0, #0] + sub r1, #0x25 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223BBD0: .word 0x02246AD4 +_0223BBD4: .word 0x02246BC0 +_0223BBD8: .word 0x02246704 +_0223BBDC: .word 0x02246AC0 + thumb_func_end ov94_0223BB84 + + thumb_func_start ov94_0223BBE0 +ov94_0223BBE0: ; 0x0223BBE0 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, [sp, #0x18] + str r3, [sp] + str r1, [sp, #4] + add r4, r2, #0 + ldr r1, _0223BC14 ; =0x02246AC0 + add r2, r5, #0 + ldr r1, [r1, #8] + add r3, r4, #0 + bl ov60_0221FCA8 + cmp r0, #0 + beq _0223BC06 + cmp r0, #1 + beq _0223BC0C + cmp r0, #2 + b _0223BC0C +_0223BC06: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223BC0C: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223BC14: .word 0x02246AC0 + thumb_func_end ov94_0223BBE0 + + thumb_func_start ov94_0223BC18 +ov94_0223BC18: ; 0x0223BC18 + push {r4, lr} + cmp r0, #0x20 + bhi _0223BC90 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223BC2A: ; jump table + .short _0223BC6C - _0223BC2A - 2 ; case 0 + .short _0223BC6C - _0223BC2A - 2 ; case 1 + .short _0223BC72 - _0223BC2A - 2 ; case 2 + .short _0223BC6C - _0223BC2A - 2 ; case 3 + .short _0223BC6C - _0223BC2A - 2 ; case 4 + .short _0223BC6C - _0223BC2A - 2 ; case 5 + .short _0223BC6C - _0223BC2A - 2 ; case 6 + .short _0223BC90 - _0223BC2A - 2 ; case 7 + .short _0223BC72 - _0223BC2A - 2 ; case 8 + .short _0223BC6C - _0223BC2A - 2 ; case 9 + .short _0223BC6C - _0223BC2A - 2 ; case 10 + .short _0223BC78 - _0223BC2A - 2 ; case 11 + .short _0223BC7E - _0223BC2A - 2 ; case 12 + .short _0223BC7E - _0223BC2A - 2 ; case 13 + .short _0223BC6C - _0223BC2A - 2 ; case 14 + .short _0223BC8A - _0223BC2A - 2 ; case 15 + .short _0223BC84 - _0223BC2A - 2 ; case 16 + .short _0223BC84 - _0223BC2A - 2 ; case 17 + .short _0223BC84 - _0223BC2A - 2 ; case 18 + .short _0223BC84 - _0223BC2A - 2 ; case 19 + .short _0223BC6C - _0223BC2A - 2 ; case 20 + .short _0223BC6C - _0223BC2A - 2 ; case 21 + .short _0223BC6C - _0223BC2A - 2 ; case 22 + .short _0223BC6C - _0223BC2A - 2 ; case 23 + .short _0223BC90 - _0223BC2A - 2 ; case 24 + .short _0223BC72 - _0223BC2A - 2 ; case 25 + .short _0223BC84 - _0223BC2A - 2 ; case 26 + .short _0223BC84 - _0223BC2A - 2 ; case 27 + .short _0223BC84 - _0223BC2A - 2 ; case 28 + .short _0223BC84 - _0223BC2A - 2 ; case 29 + .short _0223BC8A - _0223BC2A - 2 ; case 30 + .short _0223BC84 - _0223BC2A - 2 ; case 31 + .short _0223BC6C - _0223BC2A - 2 ; case 32 +_0223BC6C: + mov r4, #0xc + mvn r4, r4 + b _0223BC94 +_0223BC72: + mov r4, #0xc + mvn r4, r4 + b _0223BC94 +_0223BC78: + mov r4, #0xe + mvn r4, r4 + b _0223BC94 +_0223BC7E: + mov r4, #0xe + mvn r4, r4 + b _0223BC94 +_0223BC84: + mov r4, #1 + mvn r4, r4 + b _0223BC94 +_0223BC8A: + mov r4, #1 + mvn r4, r4 + b _0223BC94 +_0223BC90: + mov r4, #0xc + mvn r4, r4 +_0223BC94: + mov r0, #0xc + mvn r0, r0 + cmp r4, r0 + beq _0223BCAC + bl ov4_02213898 + cmp r0, #9 + beq _0223BCA8 + mov r4, #0xd + mvn r4, r4 +_0223BCA8: + bl ov4_021D76E8 +_0223BCAC: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov94_0223BC18 + .data + + + .global Unk_ov94_02246400 +Unk_ov94_02246400: ; 0x02246400 + .incbin "incbin/overlay94_data.bin", 0x0, 0x4C - 0x0 + + .global Unk_ov94_0224644C +Unk_ov94_0224644C: ; 0x0224644C + .incbin "incbin/overlay94_data.bin", 0x4C, 0x9C - 0x4C + + .global Unk_ov94_0224649C +Unk_ov94_0224649C: ; 0x0224649C + .incbin "incbin/overlay94_data.bin", 0x9C, 0xE4 - 0x9C + + .global Unk_ov94_022464E4 +Unk_ov94_022464E4: ; 0x022464E4 + .incbin "incbin/overlay94_data.bin", 0xE4, 0x130 - 0xE4 + + .global Unk_ov94_02246530 +Unk_ov94_02246530: ; 0x02246530 + .incbin "incbin/overlay94_data.bin", 0x130, 0x17C - 0x130 + + .global Unk_ov94_0224657C +Unk_ov94_0224657C: ; 0x0224657C + .incbin "incbin/overlay94_data.bin", 0x17C, 0x1C8 - 0x17C + + .global Unk_ov94_022465C8 +Unk_ov94_022465C8: ; 0x022465C8 + .incbin "incbin/overlay94_data.bin", 0x1C8, 0x214 - 0x1C8 + + .global Unk_ov94_02246614 +Unk_ov94_02246614: ; 0x02246614 + .incbin "incbin/overlay94_data.bin", 0x214, 0x264 - 0x214 + + .global Unk_ov94_02246664 +Unk_ov94_02246664: ; 0x02246664 + .incbin "incbin/overlay94_data.bin", 0x264, 0x2B8 - 0x264 + + .global Unk_ov94_022466B8 +Unk_ov94_022466B8: ; 0x022466B8 + .incbin "incbin/overlay94_data.bin", 0x2B8, 0x304 - 0x2B8 + + .global Unk_ov94_02246704 +Unk_ov94_02246704: ; 0x02246704 + .incbin "incbin/overlay94_data.bin", 0x304, 0x48 + + + .bss + + + .global Unk_ov94_02246AC0 +Unk_ov94_02246AC0: ; 0x02246AC0 + .space 0x144 + diff --git a/asm/ov94_0223BCB0.s b/asm/ov94_0223BCB0.s new file mode 100644 index 000000000..3ea296655 --- /dev/null +++ b/asm/ov94_0223BCB0.s @@ -0,0 +1,1201 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223BCB0 +ov94_0223BCB0: ; 0x0223BCB0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223BCC6 + cmp r0, #1 + bne _0223BCC4 + b _0223BDD4 +_0223BCC4: + b _0223BDEA +_0223BCC6: + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _0223BDF0 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _0223BDF4 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r2, #7 + mov r0, #3 + mov r1, #0x3e + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, _0223BDF8 ; =0x00001488 + add r0, r6, #0 + mov r2, #0x3e + bl sub_0200681C + ldr r2, _0223BDF8 ; =0x00001488 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x3e + bl sub_02018340 + str r0, [r4, #4] + ldr r0, _0223BDFC ; =0x02246C04 + add r2, sp, #0 + ldr r3, _0223BE00 ; =0x02245A00 + str r4, [r0, #4] + add r7, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r7, #0 + bl sub_02018368 + mov r0, #0xb + mov r1, #0x40 + mov r2, #0x3e + bl sub_0200B368 + mov r1, #0xb9 + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r2, _0223BE04 ; =0x0000029F + mov r0, #0 + mov r1, #0x1a + mov r3, #0x3e + bl sub_0200B144 + ldr r1, _0223BE08 ; =0x00000B94 + ldr r2, _0223BE0C ; =0x000002A2 + str r0, [r4, r1] + mov r0, #0 + mov r1, #0x1a + mov r3, #0x3e + bl sub_0200B144 + ldr r1, _0223BE10 ; =0x00000B9C + ldr r2, _0223BE14 ; =0x000002B7 + str r0, [r4, r1] + mov r0, #0 + mov r1, #0x1a + mov r3, #0x3e + bl sub_0200B144 + mov r1, #0xba + lsl r1, r1, #4 + str r0, [r4, r1] + mov r2, #0x67 + mov r0, #0 + mov r1, #0x1a + lsl r2, r2, #2 + mov r3, #0x3e + bl sub_0200B144 + ldr r1, _0223BE18 ; =0x00000B98 + ldr r2, _0223BE1C ; =0x000002B6 + str r0, [r4, r1] + mov r0, #0 + mov r1, #0x1a + mov r3, #0x3e + bl sub_0200B144 + ldr r1, _0223BE20 ; =0x00000BA4 + str r0, [r4, r1] + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + add r0, r4, #0 + add r1, r6, #0 + bl ov94_0223C03C + add r0, r4, #0 + bl ov94_0223C4E0 + ldr r1, _0223BE24 ; =0x00000497 + mov r0, #0xb + mov r2, #1 + bl sub_02004550 + ldr r1, _0223BE28 ; =0x00020020 + mov r0, #0x3e + bl sub_02018144 + str r0, [r4, #0x4c] + add r0, #0x1f + mov r1, #0x1f + bic r0, r1 + mov r1, #2 + lsl r1, r1, #0x10 + mov r2, #0 + bl sub_020A5404 + str r0, [r4, #0x50] + mov r0, #1 + str r0, [r5, #0] + b _0223BDEA +_0223BDD4: + bl sub_02099550 + bl sub_020995B4 + bl sub_02033478 + mov r0, #0 + str r0, [r5, #0] + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223BDEA: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BDF0: .word 0xFFFFE0FF +_0223BDF4: .word 0x04001000 +_0223BDF8: .word 0x00001488 +_0223BDFC: .word 0x02246C04 +_0223BE00: .word 0x02245A00 +_0223BE04: .word 0x0000029F +_0223BE08: .word 0x00000B94 +_0223BE0C: .word 0x000002A2 +_0223BE10: .word 0x00000B9C +_0223BE14: .word 0x000002B7 +_0223BE18: .word 0x00000B98 +_0223BE1C: .word 0x000002B6 +_0223BE20: .word 0x00000BA4 +_0223BE24: .word 0x00000497 +_0223BE28: .word 0x00020020 + thumb_func_end ov94_0223BCB0 + + thumb_func_start ov94_0223BE2C +ov94_0223BE2C: ; 0x0223BE2C + push {r4, r5, r6, lr} + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + bl ov4_021D8018 + bl ov94_0223B15C + ldr r1, [r5, #0] + cmp r1, #5 + bhi _0223BF1C + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223BE50: ; jump table + .short _0223BE5C - _0223BE50 - 2 ; case 0 + .short _0223BE78 - _0223BE50 - 2 ; case 1 + .short _0223BE9C - _0223BE50 - 2 ; case 2 + .short _0223BEAA - _0223BE50 - 2 ; case 3 + .short _0223BEBE - _0223BE50 - 2 ; case 4 + .short _0223BF18 - _0223BE50 - 2 ; case 5 +_0223BE5C: + bl sub_020334A4 + cmp r0, #0 + beq _0223BF1C + ldr r1, [r4, #0x50] + ldr r0, _0223BF38 ; =0x02246C04 + str r1, [r0, #0] + ldr r0, _0223BF3C ; =ov94_0223C468 + ldr r1, _0223BF40 ; =ov94_0223C490 + bl ov4_021D776C + mov r0, #1 + str r0, [r5, #0] + b _0223BF1C +_0223BE78: + ldr r3, [r4, #0x14] + mov r2, #0xc + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223BF44 ; =0x0224674C + add r0, r4, #0 + ldr r2, [r2, r6] + blx r2 + str r0, [r5, #0] + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223BF1C + add r0, r4, #0 + bl ov94_0223C508 + b _0223BF1C +_0223BE9C: + bl sub_0200F2AC + cmp r0, #0 + beq _0223BF1C + mov r0, #3 + str r0, [r5, #0] + b _0223BF1C +_0223BEAA: + ldr r3, [r4, #0x14] + mov r2, #0xc + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223BF48 ; =0x02246750 + add r0, r4, #0 + ldr r2, [r2, r6] + blx r2 + str r0, [r5, #0] + b _0223BF1C +_0223BEBE: + bl sub_0200F2AC + cmp r0, #0 + beq _0223BF1C + mov r0, #0x42 + lsl r0, r0, #2 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223BF02 + add r0, r4, #0 + bl ov94_0223C4E0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025F30 + add r1, r0, #0 + add r0, r4, #0 + bl ov94_02243EF8 + mov r1, #0x47 + lsl r1, r1, #2 + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0 + bl ov94_02244234 + add r0, r4, #0 + bl ov94_0223D068 + mov r0, #0x42 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_0223BF02: + ldr r3, [r4, #0x14] + mov r2, #0xc + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223BF4C ; =0x02246754 + ldr r1, [r5, #0] + ldr r2, [r2, r6] + add r0, r4, #0 + blx r2 + str r0, [r5, #0] + b _0223BF1C +_0223BF18: + mov r0, #1 + pop {r4, r5, r6, pc} +_0223BF1C: + add r0, r4, #0 + bl ov94_0223C578 + add r0, r4, #0 + bl ov94_0223C598 + ldr r0, _0223BF50 ; =0x00000BE8 + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223BF34 + bl sub_020219F8 +_0223BF34: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223BF38: .word 0x02246C04 +_0223BF3C: .word ov94_0223C468 +_0223BF40: .word ov94_0223C490 +_0223BF44: .word 0x0224674C +_0223BF48: .word 0x02246750 +_0223BF4C: .word 0x02246754 +_0223BF50: .word 0x00000BE8 + thumb_func_end ov94_0223BE2C + + thumb_func_start ov94_0223BF54 +ov94_0223BF54: ; 0x0223BF54 + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0x4c] + bl sub_020181C4 + bl sub_020995C4 + bl sub_02099560 + add r0, r4, #0 + bl ov94_0223C508 + ldr r0, _0223BFD4 ; =0x00000B98 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0xba + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _0223BFD8 ; =0x00000B9C + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _0223BFDC ; =0x00000B94 + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _0223BFE0 ; =0x00000BA4 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200B3F0 + add r0, r4, #0 + bl ov94_0223C0A0 + bl sub_020334CC + ldr r0, [r4, #4] + bl sub_020181C4 + ldr r0, [r4, #0] + bl sub_020181C4 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + mov r0, #0x3e + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223BFD4: .word 0x00000B98 +_0223BFD8: .word 0x00000B9C +_0223BFDC: .word 0x00000B94 +_0223BFE0: .word 0x00000BA4 + thumb_func_end ov94_0223BF54 + + thumb_func_start ov94_0223BFE4 +ov94_0223BFE4: ; 0x0223BFE4 + push {r4, lr} + ldr r1, _0223C010 ; =0x000010B8 + add r4, r0, #0 + ldr r1, [r4, r1] + cmp r1, #0 + beq _0223BFF8 + blx r1 + ldr r0, _0223C010 ; =0x000010B8 + mov r1, #0 + str r1, [r4, r0] +_0223BFF8: + bl sub_0201DCAC + bl sub_0200A858 + ldr r3, _0223C014 ; =0x027E0000 + ldr r1, _0223C018 ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r4, pc} + nop +_0223C010: .word 0x000010B8 +_0223C014: .word 0x027E0000 +_0223C018: .word 0x00003FF8 + thumb_func_end ov94_0223BFE4 + + thumb_func_start ov94_0223C01C +ov94_0223C01C: ; 0x0223C01C + push {r4, lr} + sub sp, #0x28 + ldr r4, _0223C038 ; =0x02245A20 + add r3, sp, #0 + mov r2, #5 +_0223C026: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223C026 + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_0223C038: .word 0x02245A20 + thumb_func_end ov94_0223C01C + + thumb_func_start ov94_0223C03C +ov94_0223C03C: ; 0x0223C03C + push {r3, r4, r5, lr} + add r4, r0, #0 + add r0, r1, #0 + bl sub_02006840 + mov r1, #0 + str r0, [r4, #0] + add r0, r4, #0 + add r2, r1, #0 + str r1, [r4, #0x14] + bl ov94_0223C4C0 + mov r2, #0x11 + ldr r0, _0223C098 ; =0x00000B7E + mov r1, #0 + lsl r2, r2, #4 + strh r1, [r4, r2] + strh r1, [r4, r0] + mov r5, #3 + add r3, r0, #2 + strb r5, [r4, r3] + add r3, r0, #3 + strb r1, [r4, r3] + add r3, r0, #4 + strb r1, [r4, r3] + add r0, r0, #6 + strh r1, [r4, r0] + ldr r0, _0223C09C ; =0x00001090 + mov r3, #0x12 + strh r1, [r4, r0] + add r2, r2, #4 + strh r3, [r4, r2] + add r2, r0, #0 + add r2, #0x1c + strh r1, [r4, r2] + add r2, r0, #0 + add r2, #0x1e + strh r1, [r4, r2] + add r2, r0, #2 + strh r1, [r4, r2] + add r2, r0, #0 + sub r2, #0x14 + str r1, [r4, r2] + add r0, #0xc0 + str r1, [r4, r0] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223C098: .word 0x00000B7E +_0223C09C: .word 0x00001090 + thumb_func_end ov94_0223C03C + + thumb_func_start ov94_0223C0A0 +ov94_0223C0A0: ; 0x0223C0A0 + bx lr + ; .align 2, 0 + thumb_func_end ov94_0223C0A0 + + thumb_func_start ov94_0223C0A4 +ov94_0223C0A4: ; 0x0223C0A4 + push {r4, lr} + sub sp, #0x10 + ldr r4, _0223C0D0 ; =0x02245A10 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_0201E86C + mov r0, #0x14 + mov r1, #0x3e + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0223C0D0: .word 0x02245A10 + thumb_func_end ov94_0223C0A4 + + thumb_func_start ov94_0223C0D4 +ov94_0223C0D4: ; 0x0223C0D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + mov r0, #0x68 + mov r1, #0x3e + bl sub_02006C24 + str r0, [sp, #0x18] + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7e + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r2, #0x3e + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + ldr r1, _0223C2DC ; =0x00000BEC + mov r0, #0x4e + add r1, r5, r1 + mov r2, #0x3e + bl sub_020095C4 + ldr r1, _0223C2E0 ; =0x00000BE8 + mov r2, #1 + str r0, [r5, r1] + add r0, r1, #4 + add r0, r5, r0 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + ldr r7, _0223C2E4 ; =0x00000D14 + mov r6, #0 + add r4, r5, #0 +_0223C124: + mov r0, #3 + add r1, r6, #0 + mov r2, #0x3e + bl sub_02009714 + str r0, [r4, r7] + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #4 + blt _0223C124 + mov r0, #0 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + ldr r0, _0223C2E4 ; =0x00000D14 + ldr r1, [sp, #0x18] + ldr r0, [r5, r0] + mov r2, #0x12 + bl sub_02009A4C + ldr r1, _0223C2E8 ; =0x00000D24 + mov r3, #0 + str r0, [r5, r1] + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x3e + sub r1, #0xc + str r0, [sp, #0xc] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r2, #9 + bl sub_02009B04 + ldr r1, _0223C2EC ; =0x00000D28 + mov r2, #0x13 + str r0, [r5, r1] + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x3e + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r3, #1 + bl sub_02009BC4 + ldr r1, _0223C2F0 ; =0x00000D2C + mov r2, #0x14 + str r0, [r5, r1] + mov r0, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x3e + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r3, #1 + bl sub_02009BC4 + mov r1, #0xd3 + lsl r1, r1, #4 + str r0, [r5, r1] + mov r3, #1 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x3e + sub r1, #0x1c + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r2, #0x20 + bl sub_02009A4C + ldr r1, _0223C2F4 ; =0x00000D34 + mov r2, #8 + str r0, [r5, r1] + mov r0, #1 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #9 + str r0, [sp, #8] + mov r0, #0x3e + sub r1, #0x1c + str r0, [sp, #0xc] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r3, #0 + bl sub_02009B04 + ldr r1, _0223C2F8 ; =0x00000D38 + mov r3, #1 + str r0, [r5, r1] + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x3e + sub r1, #0x1c + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r2, #0x21 + bl sub_02009BC4 + ldr r1, _0223C2FC ; =0x00000D3C + mov r3, #1 + str r0, [r5, r1] + str r3, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x3e + sub r1, #0x1c + str r0, [sp, #8] + ldr r0, [r5, r1] + ldr r1, [sp, #0x18] + mov r2, #0x22 + bl sub_02009BC4 + mov r1, #0x35 + lsl r1, r1, #6 + str r0, [r5, r1] + sub r1, #0x1c + ldr r0, [r5, r1] + bl sub_0200A328 + ldr r0, _0223C2F4 ; =0x00000D34 + ldr r0, [r5, r0] + bl sub_0200A328 + ldr r0, _0223C2EC ; =0x00000D28 + ldr r0, [r5, r0] + bl sub_0200A5C8 + ldr r0, _0223C2F8 ; =0x00000D38 + ldr r0, [r5, r0] + bl sub_0200A5C8 + bl sub_02079FD0 + add r1, r0, #0 + mov r0, #0x13 + add r2, sp, #0x1c + mov r3, #0x3e + bl sub_02006F88 + str r0, [sp, #0x14] + ldr r0, [sp, #0x1c] + mov r1, #0x60 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [sp, #0x1c] + mov r1, #0x60 + ldr r0, [r0, #0xc] + add r2, r1, #0 + bl sub_020C0160 + ldr r0, [sp, #0x1c] + mov r7, #0x1f + ldr r4, [r0, #0xc] + mov r3, #0 + add r5, r7, #0 +_0223C27C: + ldrh r2, [r4] + mov r0, #0x1f + add r3, r3, #1 + add r1, r2, #0 + and r1, r0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r1, r0, #1 + asr r0, r2, #0xa + add r6, r0, #0 + and r6, r7 + lsr r0, r6, #0x1f + add r0, r6, r0 + asr r2, r2, #5 + add r6, r2, #0 + and r6, r5 + lsr r2, r6, #0x1f + add r2, r6, r2 + asr r0, r0, #1 + asr r2, r2, #1 + lsl r0, r0, #0xa + lsl r2, r2, #5 + orr r0, r2 + orr r0, r1 + strh r0, [r4] + add r4, r4, #2 + cmp r3, #0x30 + blt _0223C27C + ldr r0, [sp, #0x1c] + mov r1, #0x60 + ldr r0, [r0, #0xc] + bl sub_020C2C54 + ldr r0, [sp, #0x1c] + mov r1, #0xc0 + ldr r0, [r0, #0xc] + mov r2, #0x60 + bl sub_020C0160 + ldr r0, [sp, #0x14] + bl sub_020181C4 + ldr r0, [sp, #0x18] + bl sub_02006CA8 + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223C2DC: .word 0x00000BEC +_0223C2E0: .word 0x00000BE8 +_0223C2E4: .word 0x00000D14 +_0223C2E8: .word 0x00000D24 +_0223C2EC: .word 0x00000D28 +_0223C2F0: .word 0x00000D2C +_0223C2F4: .word 0x00000D34 +_0223C2F8: .word 0x00000D38 +_0223C2FC: .word 0x00000D3C + thumb_func_end ov94_0223C0D4 + + thumb_func_start ov94_0223C300 +ov94_0223C300: ; 0x0223C300 + push {r3, r4} + ldr r4, _0223C328 ; =0x00000BE8 + ldr r1, [r1, r4] + str r1, [r0, #0] + str r2, [r0, #4] + mov r2, #0 + mov r1, #1 + str r2, [r0, #0x10] + lsl r1, r1, #0xc + str r1, [r0, #0x14] + str r1, [r0, #0x18] + str r1, [r0, #0x1c] + strh r2, [r0, #0x20] + mov r1, #1 + str r1, [r0, #0x24] + str r3, [r0, #0x28] + mov r1, #0x3e + str r1, [r0, #0x2c] + pop {r3, r4} + bx lr + ; .align 2, 0 +_0223C328: .word 0x00000BE8 + thumb_func_end ov94_0223C300 + + thumb_func_start ov94_0223C32C +ov94_0223C32C: ; 0x0223C32C + push {r3, r4, lr} + sub sp, #0x2c + mov r1, #0 + add r4, r0, #0 + str r1, [sp] + sub r0, r1, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, _0223C3BC ; =0x00000D14 + str r1, [sp, #0x10] + ldr r0, [r4, r2] + add r3, r1, #0 + str r0, [sp, #0x14] + add r0, r2, #4 + ldr r0, [r4, r0] + str r0, [sp, #0x18] + add r0, r2, #0 + add r0, #8 + ldr r0, [r4, r0] + str r0, [sp, #0x1c] + add r0, r2, #0 + add r0, #0xc + ldr r0, [r4, r0] + add r2, #0x40 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r4, r2 + add r2, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + mov r1, #1 + str r1, [sp] + sub r0, r1, #2 + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r3, _0223C3BC ; =0x00000D14 + str r0, [sp, #0x10] + ldr r2, [r4, r3] + str r2, [sp, #0x14] + add r2, r3, #4 + ldr r2, [r4, r2] + str r2, [sp, #0x18] + add r2, r3, #0 + add r2, #8 + ldr r2, [r4, r2] + str r2, [sp, #0x1c] + add r2, r3, #0 + add r2, #0xc + ldr r2, [r4, r2] + add r3, #0x64 + str r2, [sp, #0x20] + str r0, [sp, #0x24] + str r0, [sp, #0x28] + add r0, r4, r3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_020093B4 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x2c + pop {r3, r4, pc} + ; .align 2, 0 +_0223C3BC: .word 0x00000D14 + thumb_func_end ov94_0223C32C + + thumb_func_start ov94_0223C3C0 +ov94_0223C3C0: ; 0x0223C3C0 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r5, _0223C3F0 ; =0x022459F8 + add r4, sp, #4 + ldrh r6, [r5] + add r3, sp, #4 + strh r6, [r4] + ldrh r6, [r5, #2] + strh r6, [r4, #2] + ldrh r6, [r5, #4] + ldrh r5, [r5, #6] + strh r6, [r4, #4] + strh r5, [r4, #6] + strb r1, [r4, #2] + strh r2, [r4, #6] + mov r1, #0x3e + str r1, [sp] + add r1, r3, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_02002100 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223C3F0: .word 0x022459F8 + thumb_func_end ov94_0223C3C0 + + thumb_func_start ov94_0223C3F4 +ov94_0223C3F4: ; 0x0223C3F4 + str r1, [r0, #0x2c] + str r2, [r0, #0x30] + bx lr + ; .align 2, 0 + thumb_func_end ov94_0223C3F4 + + thumb_func_start ov94_0223C3FC +ov94_0223C3FC: ; 0x0223C3FC + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + add r5, r2, #0 + cmp r1, #0 + ble _0223C41A + lsl r0, r1, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0223C428 +_0223C41A: + lsl r0, r1, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0223C428: + bl sub_020E1740 + str r0, [sp] + cmp r5, #0 + ble _0223C444 + lsl r0, r5, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _0223C452 +_0223C444: + lsl r0, r5, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_0223C452: + bl sub_020E1740 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov94_0223C3FC + + thumb_func_start ov94_0223C468 +ov94_0223C468: ; 0x0223C468 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_020C3D98 + add r6, r0, #0 + ldr r0, _0223C48C ; =0x02246C04 + add r1, r5, #0 + ldr r0, [r0, #0] + add r2, r4, #0 + bl sub_020A5448 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020C3DAC + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223C48C: .word 0x02246C04 + thumb_func_end ov94_0223C468 + + thumb_func_start ov94_0223C490 +ov94_0223C490: ; 0x0223C490 + push {r3, r4, r5, lr} + add r5, r1, #0 + beq _0223C4AC + bl sub_020C3D98 + add r4, r0, #0 + ldr r0, _0223C4B0 ; =0x02246C04 + add r1, r5, #0 + ldr r0, [r0, #0] + bl sub_020A55D8 + add r0, r4, #0 + bl sub_020C3DAC +_0223C4AC: + pop {r3, r4, r5, pc} + nop +_0223C4B0: .word 0x02246C04 + thumb_func_end ov94_0223C490 + + thumb_func_start ov94_0223C4B4 +ov94_0223C4B4: ; 0x0223C4B4 + push {r3, lr} + bl ov4_021D7EAC + mov r1, #3 + sub r0, r1, r0 + pop {r3, pc} + thumb_func_end ov94_0223C4B4 + + thumb_func_start ov94_0223C4C0 +ov94_0223C4C0: ; 0x0223C4C0 + str r1, [r0, #0x18] + str r2, [r0, #0x24] + bx lr + ; .align 2, 0 + thumb_func_end ov94_0223C4C0 + + thumb_func_start ov94_0223C4C8 +ov94_0223C4C8: ; 0x0223C4C8 + ldr r1, [r0, #0x14] + str r1, [r0, #0x20] + ldr r1, [r0, #0x18] + str r1, [r0, #0x14] + bx lr + ; .align 2, 0 + thumb_func_end ov94_0223C4C8 + + thumb_func_start ov94_0223C4D4 +ov94_0223C4D4: ; 0x0223C4D4 + ldr r0, [r0, #0] + ldr r3, _0223C4DC ; =sub_02027AC0 + ldr r0, [r0, #0x24] + bx r3 + ; .align 2, 0 +_0223C4DC: .word sub_02027AC0 + thumb_func_end ov94_0223C4D4 + + thumb_func_start ov94_0223C4E0 +ov94_0223C4E0: ; 0x0223C4E0 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223C01C + bl ov94_0223C0A4 + add r0, r4, #0 + bl ov94_0223C0D4 + add r0, r4, #0 + bl ov94_0223C32C + ldr r0, _0223C504 ; =ov94_0223BFE4 + add r1, r4, #0 + bl sub_02017798 + pop {r4, pc} + nop +_0223C504: .word ov94_0223BFE4 + thumb_func_end ov94_0223C4E0 + + thumb_func_start ov94_0223C508 +ov94_0223C508: ; 0x0223C508 + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + bl ov94_022443B8 + ldr r0, _0223C560 ; =0x00000D24 + ldr r0, [r6, r0] + bl sub_0200A4E4 + ldr r0, _0223C564 ; =0x00000D34 + ldr r0, [r6, r0] + bl sub_0200A4E4 + ldr r0, _0223C568 ; =0x00000D28 + ldr r0, [r6, r0] + bl sub_0200A6DC + ldr r0, _0223C56C ; =0x00000D38 + ldr r0, [r6, r0] + bl sub_0200A6DC + ldr r7, _0223C570 ; =0x00000D14 + mov r4, #0 + add r5, r6, #0 +_0223C536: + ldr r0, [r5, r7] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223C536 + ldr r0, _0223C574 ; =0x00000BE8 + ldr r0, [r6, r0] + bl sub_02021964 + ldr r0, _0223C574 ; =0x00000BE8 + mov r1, #0 + str r1, [r6, r0] + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223C560: .word 0x00000D24 +_0223C564: .word 0x00000D34 +_0223C568: .word 0x00000D28 +_0223C56C: .word 0x00000D38 +_0223C570: .word 0x00000D14 +_0223C574: .word 0x00000BE8 + thumb_func_end ov94_0223C508 + + thumb_func_start ov94_0223C578 +ov94_0223C578: ; 0x0223C578 + ldrh r1, [r0, #0x3a] + cmp r1, #0 + beq _0223C582 + sub r1, r1, #1 + strh r1, [r0, #0x3a] +_0223C582: + bx lr + thumb_func_end ov94_0223C578 + + thumb_func_start ov94_0223C584 +ov94_0223C584: ; 0x0223C584 + ldr r1, _0223C594 ; =0x000010AE + mov r2, #1 + strh r2, [r0, r1] + mov r2, #0 + sub r1, r1, #2 + strh r2, [r0, r1] + bx lr + nop +_0223C594: .word 0x000010AE + thumb_func_end ov94_0223C584 + + thumb_func_start ov94_0223C598 +ov94_0223C598: ; 0x0223C598 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223C5D0 ; =0x000010AE + ldrh r1, [r4, r0] + cmp r1, #0 + beq _0223C5CC + ldr r0, [r4, #0] + sub r1, r1, #1 + ldr r0, [r0, #0xc] + bl sub_02079B54 + ldr r1, _0223C5D4 ; =0x000010AC + ldrh r2, [r4, r1] + add r0, r2, r0 + strh r0, [r4, r1] + add r0, r1, #2 + ldrh r0, [r4, r0] + add r2, r0, #1 + add r0, r1, #2 + strh r2, [r4, r0] + ldrh r0, [r4, r0] + cmp r0, #0x13 + bne _0223C5CC + mov r2, #0 + add r0, r1, #2 + strh r2, [r4, r0] +_0223C5CC: + pop {r4, pc} + nop +_0223C5D0: .word 0x000010AE +_0223C5D4: .word 0x000010AC + thumb_func_end ov94_0223C598 + + thumb_func_start ov94_0223C5D8 +ov94_0223C5D8: ; 0x0223C5D8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223C5EC ; =0x00000EFC + mov r1, #1 + add r0, r4, r0 + bl sub_0200E7FC + ldr r1, _0223C5F0 ; =0x0000107C + str r0, [r4, r1] + pop {r4, pc} + ; .align 2, 0 +_0223C5EC: .word 0x00000EFC +_0223C5F0: .word 0x0000107C + thumb_func_end ov94_0223C5D8 + + thumb_func_start ov94_0223C5F4 +ov94_0223C5F4: ; 0x0223C5F4 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223C60C ; =0x0000107C + ldr r0, [r4, r0] + cmp r0, #0 + beq _0223C60A + bl sub_0200EBA0 + ldr r0, _0223C60C ; =0x0000107C + mov r1, #0 + str r1, [r4, r0] +_0223C60A: + pop {r4, pc} + ; .align 2, 0 +_0223C60C: .word 0x0000107C + thumb_func_end ov94_0223C5F4 + + .rodata + + + .global Unk_ov94_022459F8 +Unk_ov94_022459F8: ; 0x022459F8 + .incbin "incbin/overlay94_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov94_02245A00 +Unk_ov94_02245A00: ; 0x02245A00 + .incbin "incbin/overlay94_rodata.bin", 0x8, 0x18 - 0x8 + + .global Unk_ov94_02245A10 +Unk_ov94_02245A10: ; 0x02245A10 + .incbin "incbin/overlay94_rodata.bin", 0x18, 0x28 - 0x18 + + .global Unk_ov94_02245A20 +Unk_ov94_02245A20: ; 0x02245A20 + .incbin "incbin/overlay94_rodata.bin", 0x28, 0x28 + + + .data + + + .global Unk_ov94_0224674C +Unk_ov94_0224674C: ; 0x0224674C + .incbin "incbin/overlay94_data.bin", 0x34C, 0x78 + + + .bss + + + .global Unk_ov94_02246C04 +Unk_ov94_02246C04: ; 0x02246C04 + .space 0x4 + + .global Unk_ov94_02246C08 +Unk_ov94_02246C08: ; 0x02246C08 + .space 0x4 + diff --git a/asm/ov94_0223C610.s b/asm/ov94_0223C610.s new file mode 100644 index 000000000..396e83039 --- /dev/null +++ b/asm/ov94_0223C610.s @@ -0,0 +1,1392 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223C610 +ov94_0223C610: ; 0x0223C610 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_0223CB0C + ldr r0, [r4, #4] + bl ov94_0223C720 + add r0, r4, #0 + bl ov94_0223C888 + add r0, r4, #0 + bl ov94_0223C9C0 + add r0, r4, #0 + bl ov94_0223C950 + add r0, r4, #0 + bl ov94_02245934 + add r0, r4, #0 + bl ov94_0223CF3C + ldr r1, _0223C6CC ; =0x00000449 + mov r0, #0x17 + mov r2, #1 + bl sub_02004550 + ldrh r0, [r4, #0x34] + cmp r0, #0 + bne _0223C684 + add r0, r4, #0 + bl ov94_0223C85C + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #1 + strh r0, [r4, #0x34] + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025F30 + add r1, r0, #0 + add r0, r4, #0 + bl ov94_02243FA8 + b _0223C6BE +_0223C684: + ldr r0, _0223C6D0 ; =0x000010B0 + ldr r0, [r4, r0] + cmp r0, #1 + bne _0223C6A4 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + b _0223C6BA +_0223C6A4: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 +_0223C6BA: + mov r0, #5 + str r0, [r4, #0x2c] +_0223C6BE: + ldr r0, _0223C6D0 ; =0x000010B0 + mov r1, #0 + str r1, [r4, r0] + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + nop +_0223C6CC: .word 0x00000449 +_0223C6D0: .word 0x000010B0 + thumb_func_end ov94_0223C610 + + thumb_func_start ov94_0223C6D4 +ov94_0223C6D4: ; 0x0223C6D4 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223C4B4 + bl sub_020397B0 + ldr r1, [r4, #0x2c] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _0223C6F0 ; =0x022467C4 + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_0223C6F0: .word 0x022467C4 + thumb_func_end ov94_0223C6D4 + + thumb_func_start ov94_0223C6F4 +ov94_0223C6F4: ; 0x0223C6F4 + push {r4, lr} + add r4, r0, #0 + bl sub_02039794 + add r0, r4, #0 + bl ov94_0223C9B0 + add r0, r4, #0 + bl ov94_0223CB34 + add r0, r4, #0 + bl ov94_0223CAC8 + ldr r0, [r4, #4] + bl ov94_0223C830 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_0223C6F4 + + thumb_func_start ov94_0223C720 +ov94_0223C720: ; 0x0223C720 + push {r4, r5, lr} + sub sp, #0x9c + ldr r5, _0223C818 ; =0x02245A54 + add r3, sp, #0x8c + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223C81C ; =0x02245AB4 + add r3, sp, #0x70 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _0223C820 ; =0x02245A98 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _0223C824 ; =0x02245AD0 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _0223C828 ; =0x02245AEC + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _0223C82C ; =0x02245A7C + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + add r0, r4, #0 + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x9c + pop {r4, r5, pc} + nop +_0223C818: .word 0x02245A54 +_0223C81C: .word 0x02245AB4 +_0223C820: .word 0x02245A98 +_0223C824: .word 0x02245AD0 +_0223C828: .word 0x02245AEC +_0223C82C: .word 0x02245A7C + thumb_func_end ov94_0223C720 + + thumb_func_start ov94_0223C830 +ov94_0223C830: ; 0x0223C830 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_0223C830 + + thumb_func_start ov94_0223C85C +ov94_0223C85C: ; 0x0223C85C + push {r4, lr} + add r4, r0, #0 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CAC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_0223C85C + + thumb_func_start ov94_0223C888 +ov94_0223C888: ; 0x0223C888 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + ldr r5, [r6, #4] + mov r0, #0x68 + mov r1, #0x3e + bl sub_02006C24 + mov r1, #0x60 + str r1, [sp] + mov r1, #0x3e + mov r2, #0 + str r1, [sp, #4] + mov r1, #4 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [r6, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + mov r0, #3 + lsl r0, r0, #0xa + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0xe + add r2, r5, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x1e + add r2, r5, #0 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x1d + add r2, r5, #0 + mov r3, #2 + bl sub_0200710C + add r0, r6, #0 + bl ov94_0223D068 + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov94_0223C888 + + thumb_func_start ov94_0223C950 +ov94_0223C950: ; 0x0223C950 + push {r4, lr} + sub sp, #0x30 + ldr r2, _0223C9A4 ; =0x00000D54 + add r4, r0, #0 + add r0, sp, #0 + add r1, r4, #0 + add r2, r4, r2 + mov r3, #1 + bl ov94_0223C300 + mov r0, #0x11 + lsl r0, r0, #4 + ldrh r1, [r4, r0] + lsl r2, r1, #2 + ldr r1, _0223C9A8 ; =0x02245A48 + ldrh r1, [r1, r2] + lsl r1, r1, #0xc + str r1, [sp, #8] + ldrh r0, [r4, r0] + lsl r1, r0, #2 + ldr r0, _0223C9AC ; =0x02245A4A + ldrh r0, [r0, r1] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0x37 + lsl r1, r1, #6 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021D6C + add sp, #0x30 + pop {r4, pc} + ; .align 2, 0 +_0223C9A4: .word 0x00000D54 +_0223C9A8: .word 0x02245A48 +_0223C9AC: .word 0x02245A4A + thumb_func_end ov94_0223C950 + + thumb_func_start ov94_0223C9B0 +ov94_0223C9B0: ; 0x0223C9B0 + mov r1, #0x37 + lsl r1, r1, #6 + ldr r3, _0223C9BC ; =sub_02021BD4 + ldr r0, [r0, r1] + bx r3 + nop +_0223C9BC: .word sub_02021BD4 + thumb_func_end ov94_0223C9B0 + + thumb_func_start ov94_0223C9C0 +ov94_0223C9C0: ; 0x0223C9C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r3, #1 + add r7, r0, #0 + str r3, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + ldr r1, _0223CAB0 ; =0x00000F1C + str r0, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r7, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _0223CAB0 ; =0x00000F1C + mov r1, #0 + add r0, r7, r0 + bl sub_0201ADA4 + mov r0, #2 + str r0, [sp] + mov r3, #0 + ldr r0, _0223CAB4 ; =0x000F0400 + str r3, [sp, #4] + str r0, [sp, #8] + ldr r0, _0223CAB0 ; =0x00000F1C + ldr r2, _0223CAB8 ; =0x00000BB4 + str r3, [sp, #0xc] + ldr r2, [r7, r2] + add r0, r7, r0 + mov r1, #1 + bl sub_0201D78C + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, _0223CABC ; =0x00000F3C + mov r6, #0x61 + mov r4, #6 + add r5, r7, r0 +_0223CA18: + lsl r0, r4, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xf + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r5, #0 + mov r2, #1 + mov r3, #9 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r0, [sp, #0x14] + add r6, #0x1e + add r0, r0, #1 + add r4, r4, #5 + add r5, #0x10 + str r0, [sp, #0x14] + cmp r0, #3 + blt _0223CA18 + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + ldr r1, _0223CAC0 ; =0x00000EFC + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x60 + str r0, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r7, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _0223CAC0 ; =0x00000EFC + mov r1, #0xf + add r0, r7, r0 + bl sub_0201ADA4 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x96 + ldr r1, _0223CAC4 ; =0x0000103C + str r0, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r7, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, _0223CAC4 ; =0x0000103C + mov r1, #0xf + add r0, r7, r0 + bl sub_0201ADA4 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223CAB0: .word 0x00000F1C +_0223CAB4: .word 0x000F0400 +_0223CAB8: .word 0x00000BB4 +_0223CABC: .word 0x00000F3C +_0223CAC0: .word 0x00000EFC +_0223CAC4: .word 0x0000103C + thumb_func_end ov94_0223C9C0 + + thumb_func_start ov94_0223CAC8 +ov94_0223CAC8: ; 0x0223CAC8 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _0223CAFC ; =0x0000103C + add r0, r6, r0 + bl sub_0201A8FC + ldr r0, _0223CB00 ; =0x00000EFC + add r0, r6, r0 + bl sub_0201A8FC + ldr r0, _0223CB04 ; =0x00000F3C + mov r4, #0 + add r5, r6, r0 +_0223CAE2: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #3 + blt _0223CAE2 + ldr r0, _0223CB08 ; =0x00000F1C + add r0, r6, r0 + bl sub_0201A8FC + pop {r4, r5, r6, pc} + nop +_0223CAFC: .word 0x0000103C +_0223CB00: .word 0x00000EFC +_0223CB04: .word 0x00000F3C +_0223CB08: .word 0x00000F1C + thumb_func_end ov94_0223CAC8 + + thumb_func_start ov94_0223CB0C +ov94_0223CB0C: ; 0x0223CB0C + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r4, r1] + sub r1, #0x1c + ldr r0, [r4, r1] + mov r1, #0x27 + bl sub_0200B1EC + ldr r1, _0223CB30 ; =0x00000BB4 + str r0, [r4, r1] + pop {r4, pc} + nop +_0223CB30: .word 0x00000BB4 + thumb_func_end ov94_0223CB0C + + thumb_func_start ov94_0223CB34 +ov94_0223CB34: ; 0x0223CB34 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _0223CB4C ; =0x00000BB4 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 +_0223CB4C: .word 0x00000BB4 + thumb_func_end ov94_0223CB34 + + thumb_func_start ov94_0223CB50 +ov94_0223CB50: ; 0x0223CB50 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223CB8C ; =0x00001090 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _0223CB86 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + mov r0, #4 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + mov r1, #7 + mov r2, #0xb + bl ov94_0223C4C0 + mov r0, #1 + str r0, [r4, #0x1c] + mov r0, #9 + str r0, [r4, #0x2c] +_0223CB86: + mov r0, #3 + pop {r4, pc} + nop +_0223CB8C: .word 0x00001090 + thumb_func_end ov94_0223CB50 + + thumb_func_start ov94_0223CB90 +ov94_0223CB90: ; 0x0223CB90 + push {r3, lr} + mov r1, #0xa + mov r2, #2 + bl ov94_0223C3F4 + mov r0, #3 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov94_0223CB90 + + thumb_func_start ov94_0223CBA0 +ov94_0223CBA0: ; 0x0223CBA0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #3 + str r0, [r4, #0x2c] + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov94_0223CBA0 + + thumb_func_start ov94_0223CBC4 +ov94_0223CBC4: ; 0x0223CBC4 + push {r4, lr} + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _0223CBD4 + mov r0, #5 + str r0, [r4, #0x2c] +_0223CBD4: + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_0223CBC4 + + thumb_func_start ov94_0223CBD8 +ov94_0223CBD8: ; 0x0223CBD8 + push {r4, lr} + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _0223CBE8 + mov r0, #5 + str r0, [r4, #0x2c] +_0223CBE8: + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_0223CBD8 + + thumb_func_start ov94_0223CBEC +ov94_0223CBEC: ; 0x0223CBEC + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223CC24 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #4 + mov r2, #1 + mov r3, #0 + bl ov94_0223CF80 + add r0, r4, #0 + mov r1, #0xa + mov r2, #6 + bl ov94_0223C3F4 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + add r0, r4, #0 + bl ov94_0223C584 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0223CC24: .word 0x00000F0F + thumb_func_end ov94_0223CBEC + + thumb_func_start ov94_0223CC28 +ov94_0223CC28: ; 0x0223CC28 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223CDBC ; =0x021BF67C + mov r2, #2 + ldr r1, [r1, #0x48] + add r4, r0, #0 + tst r2, r1 + beq _0223CC64 + bl ov94_0223C4D4 + add r2, r0, #0 + ldr r0, _0223CDC0 ; =0x00000F0F + mov r1, #7 + str r0, [sp] + add r0, r4, #0 + mov r3, #0 + bl ov94_0223CFD8 + add r0, r4, #0 + mov r1, #0xa + mov r2, #0xc + bl ov94_0223C3F4 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CC8 + b _0223CDB4 +_0223CC64: + mov r2, #1 + tst r2, r1 + beq _0223CD36 + mov r1, #0x11 + lsl r1, r1, #4 + ldrh r1, [r4, r1] + cmp r1, #0 + beq _0223CC7E + cmp r1, #1 + beq _0223CCF0 + cmp r1, #2 + beq _0223CD04 + b _0223CDB4 +_0223CC7E: + ldrh r1, [r4, #0x36] + cmp r1, #0 + bne _0223CC98 + mov r1, #5 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #9 + str r0, [r4, #0x2c] + ldr r0, _0223CDC4 ; =0x000005DC + bl sub_02005748 + b _0223CDB4 +_0223CC98: + ldrh r1, [r4, #0x3a] + cmp r1, #0 + bne _0223CCBA + mov r1, #7 + mov r2, #0xb + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r4, #0x1c] + mov r0, #9 + str r0, [r4, #0x2c] + ldr r0, _0223CDC8 ; =0x00000708 + strh r0, [r4, #0x3a] + ldr r0, _0223CDC4 ; =0x000005DC + bl sub_02005748 + b _0223CDB4 +_0223CCBA: + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CC8 + ldr r0, _0223CDC0 ; =0x00000F0F + mov r1, #0x22 + str r0, [sp] + add r0, r4, #0 + mov r2, #1 + mov r3, #0 + bl ov94_0223CF80 + add r0, r4, #0 + mov r1, #0xb + mov r2, #5 + bl ov94_0223C3F4 + ldr r0, _0223CDCC ; =0x000005F3 + bl sub_02005748 + mov r0, #0x42 + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] + b _0223CDB4 +_0223CCF0: + mov r1, #4 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #9 + str r0, [r4, #0x2c] + ldr r0, _0223CDC4 ; =0x000005DC + bl sub_02005748 + b _0223CDB4 +_0223CD04: + bl ov94_0223C4D4 + add r2, r0, #0 + ldr r0, _0223CDC0 ; =0x00000F0F + mov r1, #7 + str r0, [sp] + add r0, r4, #0 + mov r3, #0 + bl ov94_0223CFD8 + add r0, r4, #0 + mov r1, #0xa + mov r2, #0xc + bl ov94_0223C3F4 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021CC8 + ldr r0, _0223CDC4 ; =0x000005DC + bl sub_02005748 + b _0223CDB4 +_0223CD36: + mov r2, #0x40 + add r0, r1, #0 + tst r0, r2 + beq _0223CD76 + add r0, r2, #0 + add r0, #0xd0 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _0223CDB4 + add r0, r2, #0 + add r0, #0xd0 + ldrh r0, [r4, r0] + add r2, #0xd0 + sub r0, r0, #1 + strh r0, [r4, r2] + ldr r0, _0223CDC4 ; =0x000005DC + bl sub_02005748 + mov r0, #0x11 + lsl r0, r0, #4 + ldrh r0, [r4, r0] + ldr r1, _0223CDD0 ; =0x02245A48 + ldr r2, _0223CDD4 ; =0x02245A4A + lsl r3, r0, #2 + mov r0, #0x37 + lsl r0, r0, #6 + ldrh r1, [r1, r3] + ldrh r2, [r2, r3] + ldr r0, [r4, r0] + bl ov94_0223C3FC + b _0223CDB4 +_0223CD76: + mov r2, #0x80 + add r0, r1, #0 + tst r0, r2 + beq _0223CDB4 + add r0, r2, #0 + add r0, #0x90 + ldrh r0, [r4, r0] + cmp r0, #2 + bhs _0223CDB4 + add r0, r2, #0 + add r0, #0x90 + ldrh r0, [r4, r0] + add r2, #0x90 + add r0, r0, #1 + strh r0, [r4, r2] + ldr r0, _0223CDC4 ; =0x000005DC + bl sub_02005748 + mov r0, #0x11 + lsl r0, r0, #4 + ldrh r0, [r4, r0] + ldr r1, _0223CDD0 ; =0x02245A48 + ldr r2, _0223CDD4 ; =0x02245A4A + lsl r3, r0, #2 + mov r0, #0x37 + lsl r0, r0, #6 + ldrh r1, [r1, r3] + ldrh r2, [r2, r3] + ldr r0, [r4, r0] + bl ov94_0223C3FC +_0223CDB4: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0223CDBC: .word 0x021BF67C +_0223CDC0: .word 0x00000F0F +_0223CDC4: .word 0x000005DC +_0223CDC8: .word 0x00000708 +_0223CDCC: .word 0x000005F3 +_0223CDD0: .word 0x02245A48 +_0223CDD4: .word 0x02245A4A + thumb_func_end ov94_0223CC28 + + thumb_func_start ov94_0223CDD8 +ov94_0223CDD8: ; 0x0223CDD8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025F30 + add r1, r0, #0 + add r0, r4, #0 + bl ov94_022440B8 + mov r0, #8 + str r0, [r4, #0x2c] + ldr r0, _0223CDFC ; =0x00001090 + mov r1, #0 + strh r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_0223CDFC: .word 0x00001090 + thumb_func_end ov94_0223CDD8 + + thumb_func_start ov94_0223CE00 +ov94_0223CE00: ; 0x0223CE00 + ldr r1, _0223CE10 ; =0x00001090 + ldrh r1, [r0, r1] + cmp r1, #0 + beq _0223CE0C + mov r1, #9 + str r1, [r0, #0x2c] +_0223CE0C: + mov r0, #3 + bx lr + ; .align 2, 0 +_0223CE10: .word 0x00001090 + thumb_func_end ov94_0223CE00 + + thumb_func_start ov94_0223CE14 +ov94_0223CE14: ; 0x0223CE14 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _0223CE3A + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + b _0223CE52 +_0223CE3A: + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 +_0223CE52: + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov94_0223CE14 + + thumb_func_start ov94_0223CE5C +ov94_0223CE5C: ; 0x0223CE5C + push {r4, lr} + add r4, r0, #0 + mov r1, #0xd + add r2, r1, #0 + ldr r0, [r4, #4] + add r2, #0xf5 + bl ov94_0223C3C0 + ldr r1, _0223CE78 ; =0x00001070 + str r0, [r4, r1] + mov r0, #0xd + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223CE78: .word 0x00001070 + thumb_func_end ov94_0223CE5C + + thumb_func_start ov94_0223CE7C +ov94_0223CE7C: ; 0x0223CE7C + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223CEE0 ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0223CEDA + sub r1, r1, #1 + cmp r0, r1 + ldr r0, _0223CEE4 ; =0x0000103C + bne _0223CEBC + add r0, r4, r0 + mov r1, #1 + bl sub_0200E084 + ldr r0, _0223CEE4 ; =0x0000103C + add r0, r4, r0 + bl sub_0201ACF4 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #5 + str r0, [r4, #0x2c] + b _0223CEDA +_0223CEBC: + add r0, r4, r0 + mov r1, #1 + bl sub_0200E084 + ldr r0, _0223CEE4 ; =0x0000103C + add r0, r4, r0 + bl sub_0201ACF4 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #7 + str r0, [r4, #0x2c] +_0223CEDA: + mov r0, #3 + pop {r4, pc} + nop +_0223CEE0: .word 0x00001070 +_0223CEE4: .word 0x0000103C + thumb_func_end ov94_0223CE7C + + thumb_func_start ov94_0223CEE8 +ov94_0223CEE8: ; 0x0223CEE8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223CF04 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223CF00 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223CF00: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223CF04: .word 0x00000BE4 + thumb_func_end ov94_0223CEE8 + + thumb_func_start ov94_0223CF08 +ov94_0223CF08: ; 0x0223CF08 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223CF38 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223CF34 + mov r0, #0x42 + lsl r0, r0, #6 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0x2d + ble _0223CF34 + mov r1, #0 + str r1, [r4, r0] + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223CF34: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223CF38: .word 0x00000BE4 + thumb_func_end ov94_0223CF08 + + thumb_func_start ov94_0223CF3C +ov94_0223CF3C: ; 0x0223CF3C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldrh r1, [r7, #0x36] + mov r0, #0xc + ldr r2, _0223CF70 ; =0x02245A64 + mul r0, r1 + add r4, r2, r0 + ldr r0, _0223CF74 ; =0x00000F3C + mov r6, #0 + add r5, r7, r0 +_0223CF50: + ldr r1, _0223CF78 ; =0x00000B94 + ldr r2, [r4, #0] + ldr r1, [r7, r1] + ldr r3, _0223CF7C ; =0x00000F0F + add r0, r5, #0 + bl ov94_0223D030 + add r0, r5, #0 + bl sub_0201A954 + add r6, r6, #1 + add r4, r4, #4 + add r5, #0x10 + cmp r6, #3 + blt _0223CF50 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223CF70: .word 0x02245A64 +_0223CF74: .word 0x00000F3C +_0223CF78: .word 0x00000B94 +_0223CF7C: .word 0x00000F0F + thumb_func_end ov94_0223CF3C + + thumb_func_start ov94_0223CF80 +ov94_0223CF80: ; 0x0223CF80 + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r2, _0223CFCC ; =0x00000B94 + add r5, r0, #0 + ldr r0, [r5, r2] + add r2, #0x1c + ldr r2, [r5, r2] + bl sub_0200B1B8 + ldr r0, _0223CFD0 ; =0x00000EFC + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _0223CFD0 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _0223CFD0 ; =0x00000EFC + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _0223CFD4 ; =0x00000BE4 + str r0, [r5, r1] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223CFCC: .word 0x00000B94 +_0223CFD0: .word 0x00000EFC +_0223CFD4: .word 0x00000BE4 + thumb_func_end ov94_0223CF80 + + thumb_func_start ov94_0223CFD8 +ov94_0223CFD8: ; 0x0223CFD8 + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r2, _0223D024 ; =0x00000B94 + add r5, r0, #0 + ldr r0, [r5, r2] + add r2, #0x1c + ldr r2, [r5, r2] + bl sub_0200B1B8 + ldr r0, _0223D028 ; =0x0000103C + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _0223D028 ; =0x0000103C + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _0223D028 ; =0x0000103C + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _0223D02C ; =0x00000BE4 + str r0, [r5, r1] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223D024: .word 0x00000B94 +_0223D028: .word 0x0000103C +_0223D02C: .word 0x00000BE4 + thumb_func_end ov94_0223CFD8 + + thumb_func_start ov94_0223D030 +ov94_0223D030: ; 0x0223D030 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r0, r1, #0 + add r4, r3, #0 + add r1, r2, #0 + bl sub_0200B1EC + lsl r1, r4, #0x18 + add r6, r0, #0 + add r0, r5, #0 + lsr r1, r1, #0x18 + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + add r0, r5, #0 + mov r1, #1 + add r2, r6, #0 + str r3, [sp, #8] + bl sub_0201D738 + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + thumb_func_end ov94_0223D030 + + thumb_func_start ov94_0223D068 +ov94_0223D068: ; 0x0223D068 + push {r4, lr} + sub sp, #0x10 + ldr r4, [r0, #4] + mov r0, #2 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + mov r0, #0x68 + mov r1, #5 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + mov r0, #0x2a + lsl r0, r0, #0xa + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + mov r0, #0x68 + mov r1, #0xf + add r2, r4, #0 + mov r3, #5 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + mov r0, #0x68 + mov r1, #0x1f + add r2, r4, #0 + mov r3, #5 + bl sub_02006E60 + add sp, #0x10 + pop {r4, pc} + thumb_func_end ov94_0223D068 + + .rodata + + + .global Unk_ov94_02245A48 +Unk_ov94_02245A48: ; 0x02245A48 + .incbin "incbin/overlay94_rodata.bin", 0x50, 0x5C - 0x50 + + .global Unk_ov94_02245A54 +Unk_ov94_02245A54: ; 0x02245A54 + .incbin "incbin/overlay94_rodata.bin", 0x5C, 0x6C - 0x5C + + .global Unk_ov94_02245A64 +Unk_ov94_02245A64: ; 0x02245A64 + .incbin "incbin/overlay94_rodata.bin", 0x6C, 0x84 - 0x6C + + .global Unk_ov94_02245A7C +Unk_ov94_02245A7C: ; 0x02245A7C + .incbin "incbin/overlay94_rodata.bin", 0x84, 0xA0 - 0x84 + + .global Unk_ov94_02245A98 +Unk_ov94_02245A98: ; 0x02245A98 + .incbin "incbin/overlay94_rodata.bin", 0xA0, 0xBC - 0xA0 + + .global Unk_ov94_02245AB4 +Unk_ov94_02245AB4: ; 0x02245AB4 + .incbin "incbin/overlay94_rodata.bin", 0xBC, 0xD8 - 0xBC + + .global Unk_ov94_02245AD0 +Unk_ov94_02245AD0: ; 0x02245AD0 + .incbin "incbin/overlay94_rodata.bin", 0xD8, 0xF4 - 0xD8 + + .global Unk_ov94_02245AEC +Unk_ov94_02245AEC: ; 0x02245AEC + .incbin "incbin/overlay94_rodata.bin", 0xF4, 0x1C + + + .data + + + .global Unk_ov94_022467C4 +Unk_ov94_022467C4: ; 0x022467C4 + .incbin "incbin/overlay94_data.bin", 0x3C4, 0x38 + diff --git a/asm/ov94_0223D0C4.s b/asm/ov94_0223D0C4.s new file mode 100644 index 000000000..ca84ab704 --- /dev/null +++ b/asm/ov94_0223D0C4.s @@ -0,0 +1,1416 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223D0C4 +ov94_0223D0C4: ; 0x0223D0C4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_0223D53C + ldr r0, [r4, #4] + bl ov94_0223D1D4 + add r0, r4, #0 + bl ov94_0223D2E8 + add r0, r4, #0 + bl ov94_0223D438 + add r0, r4, #0 + bl ov94_0223D3DC + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_02076B10 + str r0, [sp] + mov r0, #0x87 + lsl r0, r0, #2 + ldr r2, _0223D188 ; =0x00000B94 + add r0, r4, r0 + str r0, [sp, #4] + add r1, r2, #4 + ldr r0, [r4, r2] + sub r2, r2, #4 + ldr r3, _0223D18C ; =0x00000F6C + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r3, r4, r3 + bl ov94_0223D910 + ldr r1, _0223D190 ; =0x0000100C + mov r2, #0x8f + add r0, r4, r1 + str r0, [sp] + ldr r0, _0223D188 ; =0x00000B94 + mov r3, #0x13 + sub r1, #0x50 + lsl r2, r2, #2 + lsl r3, r3, #4 + ldr r0, [r4, r0] + add r1, r4, r1 + add r2, r4, r2 + add r3, r4, r3 + bl ov94_0223DA78 + ldr r1, _0223D194 ; =0x00000223 + mov r2, #0 + ldrsb r0, [r4, r1] + add r1, r1, #1 + ldrsb r1, [r4, r1] + bl ov94_02242970 + mov r1, #0x22 + lsl r1, r1, #4 + ldrsh r2, [r4, r1] + ldr r3, _0223D198 ; =0x00000FDC + add r1, r1, #2 + str r2, [sp] + ldrsb r1, [r4, r1] + ldr r2, _0223D188 ; =0x00000B94 + add r3, r4, r3 + str r1, [sp, #4] + str r0, [sp, #8] + add r1, r2, #4 + ldr r0, [r4, r2] + sub r2, r2, #4 + ldr r1, [r4, r1] + ldr r2, [r4, r2] + bl ov94_02242368 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_0223DB2C + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0223D188: .word 0x00000B94 +_0223D18C: .word 0x00000F6C +_0223D190: .word 0x0000100C +_0223D194: .word 0x00000223 +_0223D198: .word 0x00000FDC + thumb_func_end ov94_0223D0C4 + + thumb_func_start ov94_0223D19C +ov94_0223D19C: ; 0x0223D19C + push {r3, lr} + ldr r1, [r0, #0x2c] + lsl r2, r1, #2 + ldr r1, _0223D1AC ; =0x02246808 + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + nop +_0223D1AC: .word 0x02246808 + thumb_func_end ov94_0223D19C + + thumb_func_start ov94_0223D1B0 +ov94_0223D1B0: ; 0x0223D1B0 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223D428 + add r0, r4, #0 + bl ov94_0223D57C + add r0, r4, #0 + bl ov94_0223D504 + ldr r0, [r4, #4] + bl ov94_0223D2BC + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov94_0223D1B0 + + thumb_func_start ov94_0223D1D4 +ov94_0223D1D4: ; 0x0223D1D4 + push {r4, r5, lr} + sub sp, #0x8c + ldr r5, _0223D2A8 ; =0x02245B78 + add r4, r0, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x70 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _0223D2AC ; =0x02245B5C + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _0223D2B0 ; =0x02245B40 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _0223D2B4 ; =0x02245B24 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _0223D2B8 ; =0x02245B08 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + add sp, #0x8c + pop {r4, r5, pc} + nop +_0223D2A8: .word 0x02245B78 +_0223D2AC: .word 0x02245B5C +_0223D2B0: .word 0x02245B40 +_0223D2B4: .word 0x02245B24 +_0223D2B8: .word 0x02245B08 + thumb_func_end ov94_0223D1D4 + + thumb_func_start ov94_0223D2BC +ov94_0223D2BC: ; 0x0223D2BC + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_0223D2BC + + thumb_func_start ov94_0223D2E8 +ov94_0223D2E8: ; 0x0223D2E8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + ldr r5, [r6, #4] + mov r0, #0x68 + mov r1, #0x3e + bl sub_02006C24 + mov r1, #0x60 + str r1, [sp] + mov r1, #0x3e + mov r2, #0 + str r1, [sp, #4] + mov r1, #7 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #5 + mov r2, #4 + mov r3, #0 + bl sub_02007130 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [r6, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x11 + add r2, r5, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x19 + add r2, r5, #0 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + mov r0, #0x2a + lsl r0, r0, #0xa + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0xf + add r2, r5, #0 + mov r3, #5 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x1f + add r2, r5, #0 + mov r3, #5 + bl sub_0200710C + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov94_0223D2E8 + + thumb_func_start ov94_0223D3DC +ov94_0223D3DC: ; 0x0223D3DC + push {r4, lr} + sub sp, #0x30 + ldr r2, _0223D424 ; =0x00000D54 + add r4, r0, #0 + add r0, sp, #0 + add r1, r4, #0 + add r2, r4, r2 + mov r3, #1 + bl ov94_0223C300 + mov r0, #0xd + lsl r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0x3a + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0xed + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0xed + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x25 + bl sub_02021D6C + bl sub_02039734 + add sp, #0x30 + pop {r4, pc} + ; .align 2, 0 +_0223D424: .word 0x00000D54 + thumb_func_end ov94_0223D3DC + + thumb_func_start ov94_0223D428 +ov94_0223D428: ; 0x0223D428 + mov r1, #0xed + lsl r1, r1, #4 + ldr r3, _0223D434 ; =sub_02021BD4 + ldr r0, [r0, r1] + bx r3 + nop +_0223D434: .word sub_02021BD4 + thumb_func_end ov94_0223D428 + + thumb_func_start ov94_0223D438 +ov94_0223D438: ; 0x0223D438 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #0x14] + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, _0223D4F4 ; =0x00000EFC + ldr r1, [sp, #0x14] + ldr r0, [r0, #4] + add r1, r1, r2 + mov r2, #0 + bl sub_0201A7E8 + ldr r1, _0223D4F4 ; =0x00000EFC + ldr r0, [sp, #0x14] + add r0, r0, r1 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0xf + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x5e + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, _0223D4F8 ; =0x00000F3C + ldr r1, [sp, #0x14] + ldr r0, [r0, #4] + add r1, r1, r2 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + ldr r1, _0223D4FC ; =0x00000F6C + ldr r0, [sp, #0x14] + ldr r4, _0223D500 ; =0x02245B94 + mov r6, #0x86 + mov r7, #0 + add r5, r0, r1 +_0223D4A0: + ldr r0, [r4, #4] + add r1, r5, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r4, #8] + mov r2, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r4, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r4, #0] + ldr r0, [r0, #4] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r1, [r4, #8] + ldr r0, [r4, #0xc] + add r7, r7, #1 + mul r0, r1 + add r6, r6, r0 + add r4, #0x10 + add r5, #0x10 + cmp r7, #0xc + blt _0223D4A0 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D4F4: .word 0x00000EFC +_0223D4F8: .word 0x00000F3C +_0223D4FC: .word 0x00000F6C +_0223D500: .word 0x02245B94 + thumb_func_end ov94_0223D438 + + thumb_func_start ov94_0223D504 +ov94_0223D504: ; 0x0223D504 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223D530 ; =0x00000EFC + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223D534 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223D538 ; =0x00000F6C + mov r4, #0 + add r5, r5, r0 +_0223D51E: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xc + blt _0223D51E + pop {r3, r4, r5, pc} + nop +_0223D530: .word 0x00000EFC +_0223D534: .word 0x00000F3C +_0223D538: .word 0x00000F6C + thumb_func_end ov94_0223D504 + + thumb_func_start ov94_0223D53C +ov94_0223D53C: ; 0x0223D53C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r5, r1] + sub r1, #0x1c + ldr r0, [r5, r1] + mov r1, #0x27 + bl sub_0200B1EC + ldr r1, _0223D578 ; =0x00000BB4 + mov r4, #0 + str r0, [r5, r1] + mov r7, #0x14 + add r6, r1, #4 +_0223D562: + add r0, r7, #0 + mov r1, #0x3e + bl sub_02023790 + str r0, [r5, r6] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xa + blt _0223D562 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223D578: .word 0x00000BB4 + thumb_func_end ov94_0223D53C + + thumb_func_start ov94_0223D57C +ov94_0223D57C: ; 0x0223D57C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + ldr r6, _0223D5A8 ; =0x00000BB8 + mov r4, #0 + add r5, r7, #0 +_0223D586: + ldr r0, [r5, r6] + bl sub_020237BC + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #0xa + blt _0223D586 + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r7, r0] + bl sub_020237BC + ldr r0, _0223D5AC ; =0x00000BB4 + ldr r0, [r7, r0] + bl sub_020237BC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223D5A8: .word 0x00000BB8 +_0223D5AC: .word 0x00000BB4 + thumb_func_end ov94_0223D57C + + thumb_func_start ov94_0223D5B0 +ov94_0223D5B0: ; 0x0223D5B0 + mov r1, #1 + str r1, [r0, #0x2c] + mov r0, #3 + bx lr + thumb_func_end ov94_0223D5B0 + + thumb_func_start ov94_0223D5B8 +ov94_0223D5B8: ; 0x0223D5B8 + push {r4, lr} + sub sp, #8 + ldr r1, _0223D60C ; =0x021BF67C + mov r2, #1 + ldr r3, [r1, #0x48] + add r4, r0, #0 + add r1, r3, #0 + tst r1, r2 + beq _0223D5F0 + ldr r1, _0223D610 ; =0x00000F0F + mov r3, #0 + str r1, [sp] + mov r1, #0x13 + lsl r1, r1, #4 + add r1, r4, r1 + str r1, [sp, #4] + mov r1, #5 + bl ov94_0223D88C + add r0, r4, #0 + mov r1, #3 + mov r2, #7 + bl ov94_0223C3F4 + ldr r0, _0223D614 ; =0x000005DC + bl sub_02005748 + b _0223D606 +_0223D5F0: + mov r1, #2 + tst r3, r1 + beq _0223D606 + str r1, [r4, #0x2c] + add r1, r2, #0 + mov r2, #0 + bl ov94_0223C4C0 + ldr r0, _0223D614 ; =0x000005DC + bl sub_02005748 +_0223D606: + mov r0, #3 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_0223D60C: .word 0x021BF67C +_0223D610: .word 0x00000F0F +_0223D614: .word 0x000005DC + thumb_func_end ov94_0223D5B8 + + thumb_func_start ov94_0223D618 +ov94_0223D618: ; 0x0223D618 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #6 + mov r1, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov94_0223D618 + + thumb_func_start ov94_0223D640 +ov94_0223D640: ; 0x0223D640 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _0223D65C ; =0x0000015A + mov r1, #0xf + bl ov94_0223C3C0 + ldr r1, _0223D660 ; =0x00001070 + str r0, [r4, r1] + mov r0, #6 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_0223D65C: .word 0x0000015A +_0223D660: .word 0x00001070 + thumb_func_end ov94_0223D640 + + thumb_func_start ov94_0223D664 +ov94_0223D664: ; 0x0223D664 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223D6AC ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0223D6A8 + sub r1, r1, #1 + cmp r0, r1 + bne _0223D68E + ldr r0, _0223D6B0 ; =0x00000EFC + mov r1, #0 + add r0, r4, r0 + str r1, [r4, #0x2c] + bl sub_0200E084 + b _0223D6A2 +_0223D68E: + mov r0, #2 + str r0, [r4, #0x2c] + ldr r0, _0223D6B4 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #7 + mov r2, #8 + bl ov94_0223C4C0 +_0223D6A2: + add r0, r4, #0 + bl ov94_0223DBBC +_0223D6A8: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223D6AC: .word 0x00001070 +_0223D6B0: .word 0x00000EFC +_0223D6B4: .word 0x000010B0 + thumb_func_end ov94_0223D664 + + thumb_func_start ov94_0223D6B8 +ov94_0223D6B8: ; 0x0223D6B8 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0 + add r2, sp, #8 + strb r0, [r2, #8] + mov r0, #1 + strb r0, [r2, #9] + mov r0, #2 + strb r0, [r2, #0xa] + ldrb r3, [r2, #0xb] + mov r1, #0xf + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0x30 + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0xc0 + bic r3, r1 + mov r1, #0x3e + strb r3, [r2, #0xb] + bl sub_02013A04 + ldr r1, _0223D744 ; =0x0000106C + mov r2, #0x36 + str r0, [r4, r1] + ldr r0, [r4, r1] + ldr r1, _0223D748 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl sub_02013A4C + ldr r0, _0223D744 ; =0x0000106C + ldr r1, _0223D748 ; =0x00000B94 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + mov r2, #0x37 + mov r3, #2 + bl sub_02013A4C + ldr r0, _0223D744 ; =0x0000106C + mov r1, #0 + ldr r0, [r4, r0] + mov r2, #0x1f + str r0, [sp, #8] + ldr r0, _0223D74C ; =0x00000F3C + mov r3, #0xb + add r0, r4, r0 + str r0, [sp, #0xc] + bl sub_0200DC48 + mov r0, #0x3e + str r0, [sp] + mov r0, #2 + mov r2, #0 + str r0, [sp, #4] + add r0, sp, #8 + mov r1, #9 + add r3, r2, #0 + bl sub_02001B7C + ldr r1, _0223D750 ; =0x00001074 + str r0, [r4, r1] + mov r0, #8 + str r0, [r4, #0x2c] + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_0223D744: .word 0x0000106C +_0223D748: .word 0x00000B94 +_0223D74C: .word 0x00000F3C +_0223D750: .word 0x00001074 + thumb_func_end ov94_0223D6B8 + + thumb_func_start ov94_0223D754 +ov94_0223D754: ; 0x0223D754 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _0223D828 ; =0x00001074 + ldr r0, [r5, r0] + bl sub_02001BE0 + cmp r0, #1 + beq _0223D774 + cmp r0, #2 + beq _0223D7F2 + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0223D7F2 + b _0223D822 +_0223D774: + ldr r0, _0223D828 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _0223D82C ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223D830 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + mov r0, #0x13 + lsl r0, r0, #4 + add r4, r5, r0 + add r0, r4, #0 + bl ov94_02241498 + cmp r0, #0 + beq _0223D7CE + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + cmp r0, #6 + bne _0223D7CE + ldr r0, _0223D834 ; =0x00000F0F + mov r1, #0x24 + str r0, [sp] + add r0, r5, #0 + mov r2, #1 + mov r3, #0 + str r4, [sp, #4] + bl ov94_0223D88C + add r0, r5, #0 + mov r1, #3 + mov r2, #1 + bl ov94_0223C3F4 + add sp, #8 + mov r0, #3 + pop {r3, r4, r5, pc} +_0223D7CE: + ldr r0, _0223D834 ; =0x00000F0F + mov r1, #6 + str r0, [sp] + add r0, r5, #0 + mov r2, #1 + mov r3, #0 + str r4, [sp, #4] + bl ov94_0223D88C + add r0, r5, #0 + mov r1, #3 + mov r2, #5 + bl ov94_0223C3F4 + add r0, r5, #0 + bl ov94_0223DBBC + b _0223D822 +_0223D7F2: + ldr r0, _0223D828 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _0223D82C ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223D830 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + mov r0, #2 + str r0, [r5, #0x2c] + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + add r0, r5, #0 + bl ov94_0223DBBC +_0223D822: + mov r0, #3 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223D828: .word 0x00001074 +_0223D82C: .word 0x0000106C +_0223D830: .word 0x00000F3C +_0223D834: .word 0x00000F0F + thumb_func_end ov94_0223D754 + + thumb_func_start ov94_0223D838 +ov94_0223D838: ; 0x0223D838 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223D854 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223D850 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223D850: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223D854: .word 0x00000BE4 + thumb_func_end ov94_0223D838 + + thumb_func_start ov94_0223D858 +ov94_0223D858: ; 0x0223D858 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223D888 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223D884 + mov r0, #0x42 + lsl r0, r0, #6 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0x2d + ble _0223D884 + mov r1, #0 + str r1, [r4, r0] + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223D884: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223D888: .word 0x00000BE4 + thumb_func_end ov94_0223D858 + + thumb_func_start ov94_0223D88C +ov94_0223D88C: ; 0x0223D88C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, [sp, #0x24] + add r6, r1, #0 + add r4, r2, #0 + bl sub_02076B10 + add r2, r0, #0 + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200B538 + ldr r0, _0223D904 ; =0x00000B94 + add r1, r6, #0 + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0xb9 + add r6, r0, #0 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, #0x20 + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + ldr r0, _0223D908 ; =0x00000EFC + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _0223D908 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _0223D908 ; =0x00000EFC + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _0223D90C ; =0x00000BE4 + str r0, [r5, r1] + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223D904: .word 0x00000B94 +_0223D908: .word 0x00000EFC +_0223D90C: .word 0x00000BE4 + thumb_func_end ov94_0223D88C + + thumb_func_start ov94_0223D910 +ov94_0223D910: ; 0x0223D910 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r5, r0, #0 + str r1, [sp, #8] + mov r0, #0x16 + mov r1, #0x3e + add r7, r2, #0 + add r6, r3, #0 + ldr r4, [sp, #0x4c] + bl sub_02023790 + str r0, [sp, #0x1c] + mov r0, #0x12 + mov r1, #0x3e + bl sub_02023790 + str r0, [sp, #0x18] + ldr r0, [sp, #0x48] + ldr r2, [sp, #0x1c] + mov r1, #0x77 + bl sub_02074570 + mov r2, #0 + ldrsh r0, [r4, r2] + mov r1, #6 + str r0, [sp, #0x10] + mov r0, #2 + ldrsb r0, [r4, r0] + str r0, [sp, #0x14] + mov r0, #3 + ldrsb r4, [r4, r0] + ldr r0, [sp, #0x48] + bl sub_02074570 + str r0, [sp, #0x30] + add r0, r5, #0 + mov r1, #0x46 + bl sub_0200B1EC + str r0, [sp, #0x20] + ldr r0, [sp, #0x14] + ldr r2, _0223DA6C ; =0x02245FD8 + lsl r0, r0, #2 + str r0, [sp, #0xc] + ldr r1, [sp, #0xc] + add r0, r5, #0 + ldr r1, [r2, r1] + bl sub_0200B1EC + str r0, [sp, #0x28] + mov r0, #0 + str r0, [sp] + mov r0, #1 + mov r1, #3 + str r0, [sp, #4] + add r0, r7, #0 + add r2, r4, #0 + add r3, r1, #0 + bl sub_0200B60C + add r0, r7, #0 + add r1, r5, #0 + mov r2, #0x66 + mov r3, #0x3e + bl sub_0200B29C + str r0, [sp, #0x24] + ldr r0, [sp, #8] + ldr r1, [sp, #0x10] + bl sub_0200B1EC + ldr r1, [sp, #0x30] + str r0, [sp, #0x2c] + lsl r1, r1, #0x10 + ldr r0, [sp, #0x18] + lsr r1, r1, #0x10 + mov r2, #0x3e + bl sub_0207CFA0 + mov r4, #0 + add r5, r6, #0 + add r7, r4, #0 +_0223D9B4: + add r0, r5, #0 + add r1, r7, #0 + bl sub_0201ADA4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #5 + blt _0223D9B4 + mov r2, #0 + ldr r0, _0223DA70 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x1c] + add r0, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + ldr r0, [sp, #0x14] + cmp r0, #3 + beq _0223D9F2 + mov r3, #0 + ldr r1, _0223DA74 ; =0x022467FC + ldr r0, [sp, #0xc] + str r3, [sp] + ldr r0, [r1, r0] + ldr r1, [sp, #0x28] + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #0x46 + bl ov94_02245900 +_0223D9F2: + mov r2, #0 + ldr r0, _0223DA70 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r6, #0 + ldr r1, [sp, #0x2c] + add r0, #0x10 + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0223DA70 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r6, #0 + ldr r1, [sp, #0x24] + add r0, #0x20 + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0223DA70 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r6, #0 + ldr r1, [sp, #0x20] + add r0, #0x30 + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0223DA70 ; =0x000F0200 + str r2, [sp] + add r6, #0x40 + str r0, [sp, #4] + ldr r1, [sp, #0x18] + add r0, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + ldr r0, [sp, #0x20] + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x24] + bl sub_020237BC + ldr r0, [sp, #0x28] + bl sub_020237BC + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x2c] + bl sub_020237BC + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + nop +_0223DA6C: .word 0x02245FD8 +_0223DA70: .word 0x000F0200 +_0223DA74: .word 0x022467FC + thumb_func_end ov94_0223D910 + + thumb_func_start ov94_0223DA78 +ov94_0223DA78: ; 0x0223DA78 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r7, r0, #0 + add r5, r1, #0 + mov r0, #0x10 + mov r1, #0x3e + str r2, [sp, #8] + str r3, [sp, #0xc] + bl sub_02023790 + add r4, r0, #0 + mov r0, #0x10 + mov r1, #0x3e + bl sub_02023790 + add r6, r0, #0 + add r0, r7, #0 + mov r1, #0x30 + bl sub_0200B1EC + str r0, [sp, #0x10] + ldr r1, [sp, #8] + add r0, r4, #0 + bl sub_02023D28 + add r0, r7, #0 + mov r1, #0xac + bl sub_0200B1EC + add r7, r0, #0 + ldr r0, [sp, #0xc] + mov r1, #0x91 + add r2, r6, #0 + bl sub_02074470 + mov r2, #0 + ldr r0, _0223DB28 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x10] + add r0, r5, #0 + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0223DB28 ; =0x000F0200 + str r2, [sp] + add r5, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0223DB28 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x28] + add r1, r7, #0 + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0223DB28 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x28] + add r1, r6, #0 + add r0, #0x10 + add r3, r2, #0 + bl ov94_02245900 + ldr r0, [sp, #0x10] + bl sub_020237BC + add r0, r4, #0 + bl sub_020237BC + add r0, r7, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + nop +_0223DB28: .word 0x000F0200 + thumb_func_end ov94_0223DA78 + + thumb_func_start ov94_0223DB2C +ov94_0223DB2C: ; 0x0223DB2C + push {r4, r5, r6, lr} + sub sp, #0x30 + mov r1, #0x32 + add r5, r0, #0 + mov r0, #0x3e + lsl r1, r1, #6 + bl sub_02018144 + add r4, r0, #0 + add r0, sp, #0x20 + add r1, r5, #0 + mov r2, #2 + bl sub_02075EF4 + mov r1, #0 + add r0, r5, #0 + add r2, r1, #0 + bl sub_02074470 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + mov r3, #0 + str r3, [sp] + mov r1, #0xa + str r1, [sp, #4] + str r1, [sp, #8] + str r4, [sp, #0xc] + str r6, [sp, #0x10] + str r3, [sp, #0x14] + mov r1, #2 + str r1, [sp, #0x18] + str r0, [sp, #0x1c] + add r1, sp, #0x20 + ldrh r0, [r1] + ldrh r1, [r1, #2] + mov r2, #0x3e + bl sub_020136A4 + mov r1, #0x32 + add r0, r4, #0 + lsl r1, r1, #6 + bl sub_020C2C54 + mov r1, #0x4a + mov r2, #0x32 + add r0, r4, #0 + lsl r1, r1, #8 + lsl r2, r2, #6 + bl sub_020C02BC + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3e + mov r3, #0x1a + str r0, [sp, #4] + add r1, sp, #0x20 + ldrh r0, [r1] + ldrh r1, [r1, #4] + mov r2, #1 + lsl r3, r3, #4 + bl sub_02006E84 + add r0, r4, #0 + bl sub_020181C4 + add sp, #0x30 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov94_0223DB2C + + thumb_func_start ov94_0223DBBC +ov94_0223DBBC: ; 0x0223DBBC + push {r3, r4, lr} + sub sp, #0xc + ldr r1, _0223DBF8 ; =0x00000223 + add r4, r0, #0 + ldrsb r0, [r4, r1] + add r1, r1, #1 + ldrsb r1, [r4, r1] + mov r2, #0 + bl ov94_02242970 + mov r1, #0x22 + lsl r1, r1, #4 + ldrsh r2, [r4, r1] + add r1, r1, #2 + ldr r3, _0223DBFC ; =0x00000FDC + str r2, [sp] + ldrsb r1, [r4, r1] + ldr r2, _0223DC00 ; =0x00000B94 + add r3, r4, r3 + str r1, [sp, #4] + str r0, [sp, #8] + add r1, r2, #4 + ldr r0, [r4, r2] + sub r2, r2, #4 + ldr r1, [r4, r1] + ldr r2, [r4, r2] + bl ov94_02242368 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0223DBF8: .word 0x00000223 +_0223DBFC: .word 0x00000FDC +_0223DC00: .word 0x00000B94 + thumb_func_end ov94_0223DBBC + + .rodata + + + .global Unk_ov94_02245B08 +Unk_ov94_02245B08: ; 0x02245B08 + .incbin "incbin/overlay94_rodata.bin", 0x110, 0x12C - 0x110 + + .global Unk_ov94_02245B24 +Unk_ov94_02245B24: ; 0x02245B24 + .incbin "incbin/overlay94_rodata.bin", 0x12C, 0x148 - 0x12C + + .global Unk_ov94_02245B40 +Unk_ov94_02245B40: ; 0x02245B40 + .incbin "incbin/overlay94_rodata.bin", 0x148, 0x164 - 0x148 + + .global Unk_ov94_02245B5C +Unk_ov94_02245B5C: ; 0x02245B5C + .incbin "incbin/overlay94_rodata.bin", 0x164, 0x180 - 0x164 + + .global Unk_ov94_02245B78 +Unk_ov94_02245B78: ; 0x02245B78 + .incbin "incbin/overlay94_rodata.bin", 0x180, 0x19C - 0x180 + + .global Unk_ov94_02245B94 +Unk_ov94_02245B94: ; 0x02245B94 + .incbin "incbin/overlay94_rodata.bin", 0x19C, 0xC0 + + + .data + + + .global Unk_ov94_022467FC +Unk_ov94_022467FC: ; 0x022467FC + .incbin "incbin/overlay94_data.bin", 0x3FC, 0x408 - 0x3FC + + .global Unk_ov94_02246808 +Unk_ov94_02246808: ; 0x02246808 + .incbin "incbin/overlay94_data.bin", 0x408, 0x24 + diff --git a/asm/ov94_0223DC04.s b/asm/ov94_0223DC04.s new file mode 100644 index 000000000..913671f3e --- /dev/null +++ b/asm/ov94_0223DC04.s @@ -0,0 +1,1089 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223DC04 +ov94_0223DC04: ; 0x0223DC04 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_0223DFDC + ldr r0, [r4, #4] + bl ov94_0223DD1C + add r0, r4, #0 + bl ov94_0223DE04 + add r0, r4, #0 + bl ov94_0223DED8 + add r0, r4, #0 + bl ov94_0223DE7C + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, r0, #4 + add r5, r1, #0 + mul r5, r0 + mov r0, #0x95 + lsl r0, r0, #2 + add r0, r4, r0 + add r0, r0, r5 + bl sub_02076B10 + str r0, [sp] + mov r0, #0xd + lsl r0, r0, #6 + add r0, r4, r0 + ldr r2, _0223DCD4 ; =0x00000B94 + add r0, r0, r5 + str r0, [sp, #4] + add r1, r2, #4 + ldr r0, [r4, r2] + sub r2, r2, #4 + ldr r3, _0223DCD8 ; =0x00000F6C + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r3, r4, r3 + bl ov94_0223D910 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + mov r2, #0x36 + add r3, r1, #0 + add r0, r0, #4 + mov r5, #0x95 + lsl r2, r2, #4 + lsl r5, r5, #2 + ldr r1, _0223DCDC ; =0x0000100C + mul r3, r0 + add r0, r4, r1 + str r0, [sp] + ldr r0, _0223DCD4 ; =0x00000B94 + sub r1, #0x50 + add r2, r4, r2 + ldr r0, [r4, r0] + add r5, r4, r5 + add r2, r2, r3 + add r1, r4, r1 + add r3, r5, r3 + bl ov94_0223DA78 + mov r0, #0x95 + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, r0, #4 + mul r0, r1 + add r0, r2, r0 + bl ov94_0223DB2C + ldr r0, _0223DCD4 ; =0x00000B94 + ldr r1, _0223DCE0 ; =0x00000FDC + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_0223E358 + add r0, r4, #0 + bl ov94_0223E240 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #2 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223DCD4: .word 0x00000B94 +_0223DCD8: .word 0x00000F6C +_0223DCDC: .word 0x0000100C +_0223DCE0: .word 0x00000FDC + thumb_func_end ov94_0223DC04 + + thumb_func_start ov94_0223DCE4 +ov94_0223DCE4: ; 0x0223DCE4 + push {r3, lr} + ldr r1, [r0, #0x2c] + lsl r2, r1, #2 + ldr r1, _0223DCF4 ; =0x0224682C + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + nop +_0223DCF4: .word 0x0224682C + thumb_func_end ov94_0223DCE4 + + thumb_func_start ov94_0223DCF8 +ov94_0223DCF8: ; 0x0223DCF8 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223DEC8 + add r0, r4, #0 + bl ov94_0223E074 + add r0, r4, #0 + bl ov94_0223DFA4 + ldr r0, [r4, #4] + bl ov94_0223DDE0 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov94_0223DCF8 + + thumb_func_start ov94_0223DD1C +ov94_0223DD1C: ; 0x0223DD1C + push {r3, r4, r5, lr} + sub sp, #0x70 + ldr r5, _0223DDD0 ; =0x02245CA8 + add r4, r0, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x54 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _0223DDD4 ; =0x02245C8C + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _0223DDD8 ; =0x02245C70 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _0223DDDC ; =0x02245C54 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + add sp, #0x70 + pop {r3, r4, r5, pc} + nop +_0223DDD0: .word 0x02245CA8 +_0223DDD4: .word 0x02245C8C +_0223DDD8: .word 0x02245C70 +_0223DDDC: .word 0x02245C54 + thumb_func_end ov94_0223DD1C + + thumb_func_start ov94_0223DDE0 +ov94_0223DDE0: ; 0x0223DDE0 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_0223DDE0 + + thumb_func_start ov94_0223DE04 +ov94_0223DE04: ; 0x0223DE04 + push {r3, r4, r5, lr} + sub sp, #0x10 + mov r1, #0x1a + add r5, r0, #0 + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + ldr r4, [r5, #4] + bl sub_02002E98 + ldr r0, [r5, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + mov r0, #0x68 + mov r1, #0x11 + add r2, r4, #0 + bl sub_02006E3C + mov r0, #0x60 + str r0, [sp] + mov r0, #0x3e + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x68 + mov r1, #7 + add r3, r2, #0 + bl sub_02006E84 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov94_0223DE04 + + thumb_func_start ov94_0223DE7C +ov94_0223DE7C: ; 0x0223DE7C + push {r4, lr} + sub sp, #0x30 + ldr r2, _0223DEC4 ; =0x00000D54 + add r4, r0, #0 + add r0, sp, #0 + add r1, r4, #0 + add r2, r4, r2 + mov r3, #1 + bl ov94_0223C300 + mov r0, #0xd + lsl r0, r0, #0x10 + str r0, [sp, #8] + mov r0, #0x3a + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0xed + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0xed + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0x25 + bl sub_02021D6C + bl sub_02039734 + add sp, #0x30 + pop {r4, pc} + ; .align 2, 0 +_0223DEC4: .word 0x00000D54 + thumb_func_end ov94_0223DE7C + + thumb_func_start ov94_0223DEC8 +ov94_0223DEC8: ; 0x0223DEC8 + mov r1, #0xed + lsl r1, r1, #4 + ldr r3, _0223DED4 ; =sub_02021BD4 + ldr r0, [r0, r1] + bx r3 + nop +_0223DED4: .word sub_02021BD4 + thumb_func_end ov94_0223DEC8 + + thumb_func_start ov94_0223DED8 +ov94_0223DED8: ; 0x0223DED8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r0, [sp, #0x14] + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, _0223DF94 ; =0x00000EFC + ldr r1, [sp, #0x14] + ldr r0, [r0, #4] + add r1, r1, r2 + mov r2, #0 + bl sub_0201A7E8 + ldr r1, _0223DF94 ; =0x00000EFC + ldr r0, [sp, #0x14] + add r0, r0, r1 + mov r1, #0 + bl sub_0201ADA4 + mov r0, #0xf + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x5e + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, _0223DF98 ; =0x00000F3C + ldr r1, [sp, #0x14] + ldr r0, [r0, #4] + add r1, r1, r2 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + ldr r1, _0223DF9C ; =0x00000F6C + ldr r0, [sp, #0x14] + ldr r4, _0223DFA0 ; =0x02245CC4 + mov r6, #0x86 + mov r7, #0 + add r5, r0, r1 +_0223DF40: + ldr r0, [r4, #4] + add r1, r5, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + ldr r0, [r4, #8] + mov r2, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #4] + ldr r0, [r4, #0xc] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r3, [r4, #0] + ldr r0, [r0, #4] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + ldr r1, [r4, #8] + ldr r0, [r4, #0xc] + add r7, r7, #1 + mul r0, r1 + add r6, r6, r0 + add r4, #0x10 + add r5, #0x10 + cmp r7, #0xc + blo _0223DF40 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223DF94: .word 0x00000EFC +_0223DF98: .word 0x00000F3C +_0223DF9C: .word 0x00000F6C +_0223DFA0: .word 0x02245CC4 + thumb_func_end ov94_0223DED8 + + thumb_func_start ov94_0223DFA4 +ov94_0223DFA4: ; 0x0223DFA4 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, _0223DFD0 ; =0x00000EFC + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223DFD4 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223DFD8 ; =0x00000F6C + mov r4, #0 + add r5, r5, r0 +_0223DFBE: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #0xc + blo _0223DFBE + pop {r3, r4, r5, pc} + nop +_0223DFD0: .word 0x00000EFC +_0223DFD4: .word 0x00000F3C +_0223DFD8: .word 0x00000F6C + thumb_func_end ov94_0223DFA4 + + thumb_func_start ov94_0223DFDC +ov94_0223DFDC: ; 0x0223DFDC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x95 + lsl r0, r0, #2 + add r2, r5, r0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r5, r0] + add r0, r0, #4 + mul r0, r1 + add r4, r2, r0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r5, r1] + sub r1, #0x20 + ldr r0, [r5, r1] + bl sub_0200C41C + ldr r0, _0223E064 ; =0x0000011E + ldrb r2, [r4, r0] + cmp r2, #0 + beq _0223E01C + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #8 + bl sub_0200BDD0 +_0223E01C: + ldr r2, _0223E068 ; =0x0000011F + ldrb r3, [r4, r2] + cmp r3, #0 + beq _0223E034 + mov r0, #0xb9 + sub r2, r2, #1 + lsl r0, r0, #4 + ldrb r2, [r4, r2] + ldr r0, [r5, r0] + mov r1, #9 + bl sub_0200BE08 +_0223E034: + mov r1, #0xb9 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, r1, #4 + ldr r1, [r5, r1] + mov r2, #0x4f + mov r3, #0x3e + bl sub_0200B29C + ldr r1, _0223E06C ; =0x00000BB8 + mov r2, #0x50 + str r0, [r5, r1] + add r0, r1, #0 + sub r0, #0x28 + sub r1, #0x24 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + mov r3, #0x3e + bl sub_0200B29C + ldr r1, _0223E070 ; =0x00000BBC + str r0, [r5, r1] + pop {r3, r4, r5, pc} + nop +_0223E064: .word 0x0000011E +_0223E068: .word 0x0000011F +_0223E06C: .word 0x00000BB8 +_0223E070: .word 0x00000BBC + thumb_func_end ov94_0223DFDC + + thumb_func_start ov94_0223E074 +ov94_0223E074: ; 0x0223E074 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223E094 ; =0x00000BB8 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _0223E098 ; =0x00000BBC + ldr r0, [r4, r0] + bl sub_020237BC + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 +_0223E094: .word 0x00000BB8 +_0223E098: .word 0x00000BBC + thumb_func_end ov94_0223E074 + + thumb_func_start ov94_0223E09C +ov94_0223E09C: ; 0x0223E09C + mov r1, #1 + str r1, [r0, #0x2c] + mov r0, #3 + bx lr + thumb_func_end ov94_0223E09C + + thumb_func_start ov94_0223E0A4 +ov94_0223E0A4: ; 0x0223E0A4 + push {r3, r4, r5, lr} + ldr r1, _0223E174 ; =0x021BF67C + mov r2, #1 + ldr r1, [r1, #0x48] + add r4, r0, #0 + add r3, r1, #0 + tst r3, r2 + beq _0223E0D2 + ldr r1, _0223E178 ; =0x00000F0F + mov r3, #0 + str r1, [sp] + mov r1, #0x10 + bl ov94_0223E300 + add r0, r4, #0 + mov r1, #3 + mov r2, #4 + bl ov94_0223C3F4 + ldr r0, _0223E17C ; =0x000005DC + bl sub_02005748 + b _0223E170 +_0223E0D2: + mov r3, #2 + add r5, r1, #0 + tst r5, r3 + beq _0223E0EC + mov r1, #4 + mov r2, #0 + str r3, [r4, #0x2c] + bl ov94_0223C4C0 + ldr r0, _0223E17C ; =0x000005DC + bl sub_02005748 + b _0223E170 +_0223E0EC: + mov r0, #0x10 + tst r0, r1 + beq _0223E108 + ldr r0, _0223E180 ; =0x00000112 + ldrh r1, [r4, r0] + cmp r1, #0 + bne _0223E170 + strh r2, [r4, r0] + mov r0, #6 + str r0, [r4, #0x2c] + ldr r0, _0223E17C ; =0x000005DC + bl sub_02005748 + b _0223E170 +_0223E108: + mov r2, #0x20 + add r0, r1, #0 + tst r0, r2 + beq _0223E12C + add r0, r2, #0 + add r0, #0xf2 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _0223E170 + mov r0, #0 + add r2, #0xf2 + strh r0, [r4, r2] + mov r0, #6 + str r0, [r4, #0x2c] + ldr r0, _0223E17C ; =0x000005DC + bl sub_02005748 + b _0223E170 +_0223E12C: + add r2, #0xfc + ldr r0, [r4, r2] + bl ov94_02244214 + add r5, r0, #0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r0, [r4, r0] + cmp r5, r0 + beq _0223E170 + cmp r5, #0 + blt _0223E170 + add r0, r5, #1 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _0223E184 ; =0x00000ED4 + ldr r0, [r1, r0] + lsl r1, r5, #2 + add r1, #0x10 + bl sub_02021D6C + mov r0, #2 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #3 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #0x12 + lsl r0, r0, #4 + str r5, [r4, r0] + ldr r0, _0223E17C ; =0x000005DC + bl sub_02005748 +_0223E170: + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223E174: .word 0x021BF67C +_0223E178: .word 0x00000F0F +_0223E17C: .word 0x000005DC +_0223E180: .word 0x00000112 +_0223E184: .word 0x00000ED4 + thumb_func_end ov94_0223E0A4 + + thumb_func_start ov94_0223E188 +ov94_0223E188: ; 0x0223E188 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #6 + mov r1, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov94_0223E188 + + thumb_func_start ov94_0223E1B0 +ov94_0223E1B0: ; 0x0223E1B0 + push {r4, lr} + add r4, r0, #0 + mov r2, #0x1f + ldr r0, [r4, #4] + mov r1, #0xf + lsl r2, r2, #4 + bl ov94_0223C3C0 + ldr r1, _0223E1CC ; =0x00001070 + str r0, [r4, r1] + mov r0, #5 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223E1CC: .word 0x00001070 + thumb_func_end ov94_0223E1B0 + + thumb_func_start ov94_0223E1D0 +ov94_0223E1D0: ; 0x0223E1D0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223E234 ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0223E22E + sub r1, r1, #1 + cmp r0, r1 + bne _0223E20E + mov r0, #2 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #4 + mov r2, #0 + bl ov94_0223C4C0 + ldr r0, _0223E238 ; =0x00000B94 + ldr r1, _0223E23C ; =0x00000FDC + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_0223E358 + add r0, r4, #0 + bl ov94_0223E240 + b _0223E22E +_0223E20E: + mov r0, #2 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #5 + mov r2, #6 + bl ov94_0223C4C0 + ldr r0, _0223E238 ; =0x00000B94 + ldr r1, _0223E23C ; =0x00000FDC + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_0223E358 + add r0, r4, #0 + bl ov94_0223E240 +_0223E22E: + mov r0, #3 + pop {r4, pc} + nop +_0223E234: .word 0x00001070 +_0223E238: .word 0x00000B94 +_0223E23C: .word 0x00000FDC + thumb_func_end ov94_0223E1D0 + + thumb_func_start ov94_0223E240 +ov94_0223E240: ; 0x0223E240 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _0223E2C0 ; =0x00000112 + ldrh r0, [r4, r0] + cmp r0, #0 + bne _0223E290 + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x68 + mov r1, #0x1b + bl sub_02006E60 + ldr r2, _0223E2C4 ; =0x00000B94 + mov r5, #0x12 + ldr r0, _0223E2C8 ; =0x00000FFC + mov r3, #0xd1 + lsl r5, r5, #4 + ldr r1, [r4, r2] + add r2, r2, #4 + lsl r3, r3, #2 + ldr r6, [r4, r5] + add r0, r4, r0 + ldr r2, [r4, r2] + add r3, r4, r3 + add r4, r5, #4 + mul r4, r6 + add r3, r3, r4 + bl ov94_0223E3B0 + add sp, #0x10 + pop {r4, r5, r6, pc} +_0223E290: + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + ldr r2, [r4, #4] + mov r0, #0x68 + mov r1, #0x1c + bl sub_02006E60 + ldr r2, _0223E2CC ; =0x00000BB8 + ldr r0, _0223E2C8 ; =0x00000FFC + ldr r1, [r4, r2] + add r2, r2, #4 + ldr r2, [r4, r2] + add r0, r4, r0 + bl ov94_0223E424 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223E2C0: .word 0x00000112 +_0223E2C4: .word 0x00000B94 +_0223E2C8: .word 0x00000FFC +_0223E2CC: .word 0x00000BB8 + thumb_func_end ov94_0223E240 + + thumb_func_start ov94_0223E2D0 +ov94_0223E2D0: ; 0x0223E2D0 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223E240 + mov r0, #1 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_0223E2D0 + + thumb_func_start ov94_0223E2E0 +ov94_0223E2E0: ; 0x0223E2E0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223E2FC ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223E2F8 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223E2F8: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223E2FC: .word 0x00000BE4 + thumb_func_end ov94_0223E2E0 + + thumb_func_start ov94_0223E300 +ov94_0223E300: ; 0x0223E300 + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r2, _0223E34C ; =0x00000B94 + add r5, r0, #0 + ldr r0, [r5, r2] + add r2, #0x1c + ldr r2, [r5, r2] + bl sub_0200B1B8 + ldr r0, _0223E350 ; =0x00000EFC + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _0223E350 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _0223E350 ; =0x00000EFC + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _0223E354 ; =0x00000BE4 + str r0, [r5, r1] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223E34C: .word 0x00000B94 +_0223E350: .word 0x00000EFC +_0223E354: .word 0x00000BE4 + thumb_func_end ov94_0223E300 + + thumb_func_start ov94_0223E358 +ov94_0223E358: ; 0x0223E358 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + add r6, r0, #0 + mov r1, #0x4a + bl sub_0200B1EC + add r4, r0, #0 + add r0, r6, #0 + mov r1, #0x4e + bl sub_0200B1EC + add r6, r0, #0 + mov r2, #0 + ldr r0, _0223E3AC ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + mov r3, #2 + bl ov94_02245900 + mov r0, #1 + str r0, [sp] + ldr r0, _0223E3AC ; =0x000F0200 + add r5, #0x10 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + mov r2, #0 + mov r3, #2 + bl ov94_02245900 + add r0, r4, #0 + bl sub_020237BC + add r0, r6, #0 + bl sub_020237BC + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0223E3AC: .word 0x000F0200 + thumb_func_end ov94_0223E358 + + thumb_func_start ov94_0223E3B0 +ov94_0223E3B0: ; 0x0223E3B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r6, r1, #0 + mov r1, #0 + add r5, r0, #0 + add r7, r2, #0 + add r4, r3, #0 + bl sub_0201ADA4 + mov r0, #3 + str r0, [sp] + ldr r0, _0223E420 ; =0x000F0200 + mov r3, #0 + str r0, [sp, #4] + ldrsh r2, [r4, r3] + add r0, r5, #0 + add r1, r7, #0 + bl ov94_02242158 + mov r0, #3 + str r0, [sp] + mov r0, #0x46 + str r0, [sp, #4] + ldr r0, _0223E420 ; =0x000F0200 + mov r2, #2 + str r0, [sp, #8] + ldrsb r2, [r4, r2] + add r0, r5, #0 + add r1, r6, #0 + mov r3, #0 + bl ov94_02242204 + mov r0, #3 + mov r1, #4 + ldrsb r0, [r4, r0] + ldrsb r1, [r4, r1] + mov r2, #0 + bl ov94_02242970 + add r2, r0, #0 + mov r0, #0x13 + str r0, [sp] + ldr r0, _0223E420 ; =0x000F0200 + mov r3, #0 + str r0, [sp, #4] + str r3, [sp, #8] + mov r0, #8 + add r5, #0x10 + str r0, [sp, #0xc] + add r0, r5, #0 + add r1, r6, #0 + bl ov94_0224226C + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223E420: .word 0x000F0200 + thumb_func_end ov94_0223E3B0 + + thumb_func_start ov94_0223E424 +ov94_0223E424: ; 0x0223E424 + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r1, #0 + mov r1, #0 + add r6, r0, #0 + add r4, r2, #0 + bl sub_0201ADA4 + cmp r5, #0 + beq _0223E44A + mov r2, #0 + ldr r0, _0223E468 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r6, #0 + add r1, r5, #0 + mov r3, #3 + bl ov94_02245900 +_0223E44A: + cmp r4, #0 + beq _0223E462 + mov r0, #0 + str r0, [sp] + ldr r0, _0223E468 ; =0x000F0200 + add r1, r4, #0 + str r0, [sp, #4] + add r0, r6, #0 + mov r2, #8 + mov r3, #0x13 + bl ov94_02245900 +_0223E462: + add sp, #8 + pop {r4, r5, r6, pc} + nop +_0223E468: .word 0x000F0200 + thumb_func_end ov94_0223E424 + + .rodata + + + .global Unk_ov94_02245C54 +Unk_ov94_02245C54: ; 0x02245C54 + .incbin "incbin/overlay94_rodata.bin", 0x25C, 0x278 - 0x25C + + .global Unk_ov94_02245C70 +Unk_ov94_02245C70: ; 0x02245C70 + .incbin "incbin/overlay94_rodata.bin", 0x278, 0x294 - 0x278 + + .global Unk_ov94_02245C8C +Unk_ov94_02245C8C: ; 0x02245C8C + .incbin "incbin/overlay94_rodata.bin", 0x294, 0x2B0 - 0x294 + + .global Unk_ov94_02245CA8 +Unk_ov94_02245CA8: ; 0x02245CA8 + .incbin "incbin/overlay94_rodata.bin", 0x2B0, 0x2CC - 0x2B0 + + .global Unk_ov94_02245CC4 +Unk_ov94_02245CC4: ; 0x02245CC4 + .incbin "incbin/overlay94_rodata.bin", 0x2CC, 0xC0 + + + .data + + + .global Unk_ov94_0224682C +Unk_ov94_0224682C: ; 0x0224682C + .incbin "incbin/overlay94_data.bin", 0x42C, 0x1C + diff --git a/asm/ov94_0223E46C.s b/asm/ov94_0223E46C.s new file mode 100644 index 000000000..afc0daacc --- /dev/null +++ b/asm/ov94_0223E46C.s @@ -0,0 +1,2821 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223E46C +ov94_0223E46C: ; 0x0223E46C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_0223E9B8 + ldr r0, [r4, #4] + bl ov94_0223E598 + add r0, r4, #0 + bl ov94_0223E6B8 + add r0, r4, #0 + bl ov94_0223E7D4 + add r0, r4, #0 + bl ov94_0223E770 + ldr r1, _0223E538 ; =0x00000F6C + ldr r2, _0223E53C ; =0x00000B94 + add r0, r4, r1 + add r1, #0xe0 + ldr r2, [r4, r2] + add r1, r4, r1 + bl ov94_0223F9FC + mov r3, #0 + ldr r0, _0223E540 ; =0x00010200 + str r3, [sp] + str r0, [sp, #4] + ldr r2, _0223E544 ; =0x00000B98 + ldr r0, _0223E548 ; =0x00000F7C + ldr r1, [r4, r2] + sub r2, #0x1a + ldrsh r2, [r4, r2] + add r0, r4, r0 + bl ov94_02242158 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223E540 ; =0x00010200 + ldr r2, _0223E53C ; =0x00000B94 + str r0, [sp, #8] + ldr r1, [r4, r2] + sub r2, #0x14 + ldr r0, _0223E54C ; =0x00000F9C + ldrsb r2, [r4, r2] + add r0, r4, r0 + mov r3, #1 + bl ov94_02242204 + ldr r1, _0223E550 ; =0x00000B81 + mov r2, #1 + ldrsb r0, [r4, r1] + add r1, r1, #1 + ldrsb r1, [r4, r1] + bl ov94_02242970 + add r2, r0, #0 + mov r3, #0 + ldr r0, _0223E540 ; =0x00010200 + str r3, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r1, _0223E53C ; =0x00000B94 + ldr r0, _0223E554 ; =0x00000FBC + ldr r1, [r4, r1] + add r0, r4, r0 + bl ov94_022422B8 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223E540 ; =0x00010200 + ldr r3, _0223E558 ; =0x0000105C + str r0, [sp, #8] + ldr r2, _0223E55C ; =0x00000BA4 + add r0, r4, r3 + ldr r1, [r4, r2] + sub r2, #0x10 + add r3, #0xf4 + ldr r2, [r4, r2] + ldr r3, [r4, r3] + bl ov94_0224218C + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0223E538: .word 0x00000F6C +_0223E53C: .word 0x00000B94 +_0223E540: .word 0x00010200 +_0223E544: .word 0x00000B98 +_0223E548: .word 0x00000F7C +_0223E54C: .word 0x00000F9C +_0223E550: .word 0x00000B81 +_0223E554: .word 0x00000FBC +_0223E558: .word 0x0000105C +_0223E55C: .word 0x00000BA4 + thumb_func_end ov94_0223E46C + + thumb_func_start ov94_0223E560 +ov94_0223E560: ; 0x0223E560 + push {r3, lr} + ldr r1, [r0, #0x2c] + lsl r2, r1, #2 + ldr r1, _0223E570 ; =0x02246860 + ldr r1, [r1, r2] + blx r1 + pop {r3, pc} + nop +_0223E570: .word 0x02246860 + thumb_func_end ov94_0223E560 + + thumb_func_start ov94_0223E574 +ov94_0223E574: ; 0x0223E574 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223E7C4 + add r0, r4, #0 + bl ov94_0223EA20 + add r0, r4, #0 + bl ov94_0223E968 + ldr r0, [r4, #4] + bl ov94_0223E684 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov94_0223E574 + + thumb_func_start ov94_0223E598 +ov94_0223E598: ; 0x0223E598 + push {r3, r4, r5, lr} + sub sp, #0x70 + ldr r5, _0223E674 ; =0x02245DC8 + add r4, r0, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x54 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _0223E678 ; =0x02245DAC + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + ldr r5, _0223E67C ; =0x02245DE4 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + ldr r5, _0223E680 ; =0x02245E00 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #3 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #3 + bl sub_02019EBC + mov r0, #2 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #3 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + add sp, #0x70 + pop {r3, r4, r5, pc} + nop +_0223E674: .word 0x02245DC8 +_0223E678: .word 0x02245DAC +_0223E67C: .word 0x02245DE4 +_0223E680: .word 0x02245E00 + thumb_func_end ov94_0223E598 + + thumb_func_start ov94_0223E684 +ov94_0223E684: ; 0x0223E684 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + add r0, r4, #0 + mov r1, #3 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_0223E684 + + thumb_func_start ov94_0223E6B8 +ov94_0223E6B8: ; 0x0223E6B8 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + ldr r5, [r6, #4] + mov r0, #0x68 + mov r1, #0x3e + bl sub_02006C24 + mov r1, #0x60 + str r1, [sp] + mov r1, #0x3e + mov r2, #0 + str r1, [sp, #4] + mov r1, #3 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #5 + mov r2, #4 + mov r3, #0 + bl sub_02007130 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [r6, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0xd + add r2, r5, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x1a + add r2, r5, #0 + bl sub_0200710C + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov94_0223E6B8 + + thumb_func_start ov94_0223E770 +ov94_0223E770: ; 0x0223E770 + push {r4, lr} + sub sp, #0x30 + ldr r2, _0223E7C0 ; =0x00000D54 + add r4, r0, #0 + add r0, sp, #0 + add r1, r4, #0 + add r2, r4, r2 + mov r3, #1 + bl ov94_0223C300 + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #8] + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0x37 + lsl r1, r1, #6 + str r0, [r4, r1] + ldr r0, [r4, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02021D6C + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021E80 + bl sub_02039734 + add sp, #0x30 + pop {r4, pc} + ; .align 2, 0 +_0223E7C0: .word 0x00000D54 + thumb_func_end ov94_0223E770 + + thumb_func_start ov94_0223E7C4 +ov94_0223E7C4: ; 0x0223E7C4 + mov r1, #0x37 + lsl r1, r1, #6 + ldr r3, _0223E7D0 ; =sub_02021BD4 + ldr r0, [r0, r1] + bx r3 + nop +_0223E7D0: .word sub_02021BD4 + thumb_func_end ov94_0223E7C4 + + thumb_func_start ov94_0223E7D4 +ov94_0223E7D4: ; 0x0223E7D4 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + mov r3, #1 + str r0, [sp, #0x14] + str r3, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, _0223E944 ; =0x00000F1C + ldr r1, [sp, #0x14] + ldr r0, [r0, #4] + add r1, r1, r2 + mov r2, #0 + bl sub_0201A7E8 + ldr r1, _0223E944 ; =0x00000F1C + ldr r0, [sp, #0x14] + add r0, r0, r1 + mov r1, #0 + bl sub_0201ADA4 + mov r2, #0 + ldr r0, _0223E948 ; =0x000F0D00 + str r2, [sp] + str r0, [sp, #4] + ldr r1, _0223E944 ; =0x00000F1C + ldr r0, [sp, #0x14] + ldr r3, _0223E94C ; =0x00000BB4 + add r0, r0, r1 + ldr r1, [sp, #0x14] + ldr r1, [r1, r3] + mov r3, #1 + bl ov94_022458CC + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x60 + str r0, [sp, #0x10] + ldr r0, [sp, #0x14] + ldr r2, _0223E950 ; =0x00000EFC + ldr r1, [sp, #0x14] + ldr r0, [r0, #4] + add r1, r1, r2 + mov r2, #0 + bl sub_0201A7E8 + ldr r1, _0223E950 ; =0x00000EFC + ldr r0, [sp, #0x14] + add r0, r0, r1 + mov r1, #0 + bl sub_0201ADA4 + ldr r1, _0223E954 ; =0x00000F6C + ldr r0, [sp, #0x14] + ldr r4, _0223E958 ; =0x02245D94 + mov r7, #0 + mov r6, #1 + add r5, r0, r1 +_0223E860: + ldrh r0, [r4, #2] + add r1, r5, #0 + mov r2, #3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [sp, #0x14] + lsl r3, r3, #0x18 + ldr r0, [r0, #4] + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r7, r7, #1 + add r6, #0x16 + add r4, r4, #4 + add r5, #0x10 + cmp r7, #6 + blt _0223E860 + ldr r1, _0223E954 ; =0x00000F6C + ldr r0, [sp, #0x14] + ldr r4, _0223E95C ; =0x02245D84 + add r0, r0, r1 + mov r5, #0 + mov r6, #0x96 + str r0, [sp, #0x18] +_0223E8AE: + add r0, r5, #6 + lsl r7, r0, #4 + ldrh r0, [r4, #2] + ldr r1, [sp, #0x18] + mov r2, #2 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #8 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [sp, #0x14] + add r1, r1, r7 + lsl r3, r3, #0x18 + ldr r0, [r0, #4] + lsr r3, r3, #0x18 + bl sub_0201A7E8 + ldr r0, [sp, #0x18] + mov r1, #0 + add r0, r0, r7 + bl sub_0201ADA4 + add r5, r5, #1 + add r6, #0x10 + add r4, r4, #4 + cmp r5, #2 + blt _0223E8AE + ldr r1, _0223E960 ; =0x0000104C + ldr r0, [sp, #0x14] + ldr r4, _0223E964 ; =0x02245D8C + mov r7, #0 + mov r6, #0x85 + add r5, r0, r1 +_0223E900: + ldrh r0, [r4, #2] + add r1, r5, #0 + mov r2, #3 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [sp, #0x14] + lsl r3, r3, #0x18 + ldr r0, [r0, #4] + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r7, r7, #1 + add r6, #0x38 + add r4, r4, #4 + add r5, #0x10 + cmp r7, #2 + blt _0223E900 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223E944: .word 0x00000F1C +_0223E948: .word 0x000F0D00 +_0223E94C: .word 0x00000BB4 +_0223E950: .word 0x00000EFC +_0223E954: .word 0x00000F6C +_0223E958: .word 0x02245D94 +_0223E95C: .word 0x02245D84 +_0223E960: .word 0x0000104C +_0223E964: .word 0x02245D8C + thumb_func_end ov94_0223E7D4 + + thumb_func_start ov94_0223E968 +ov94_0223E968: ; 0x0223E968 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _0223E9A8 ; =0x00000EFC + add r0, r6, r0 + bl sub_0201A8FC + ldr r0, _0223E9AC ; =0x00000F1C + add r0, r6, r0 + bl sub_0201A8FC + ldr r0, _0223E9B0 ; =0x00000F6C + mov r4, #0 + add r5, r6, r0 +_0223E982: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #8 + blt _0223E982 + ldr r0, _0223E9B4 ; =0x0000104C + mov r4, #0 + add r5, r6, r0 +_0223E996: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #2 + blt _0223E996 + pop {r4, r5, r6, pc} + nop +_0223E9A8: .word 0x00000EFC +_0223E9AC: .word 0x00000F1C +_0223E9B0: .word 0x00000F6C +_0223E9B4: .word 0x0000104C + thumb_func_end ov94_0223E968 + + thumb_func_start ov94_0223E9B8 +ov94_0223E9B8: ; 0x0223E9B8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r4, r1] + sub r1, #0x1c + ldr r0, [r4, r1] + mov r1, #0x29 + bl sub_0200B1EC + ldr r1, _0223EA18 ; =0x00000BB4 + str r0, [r4, r1] + mov r0, #0x3e + mov r1, #0x30 + bl sub_02018144 + ldr r1, _0223EA1C ; =0x00001084 + mov r2, #0x30 + str r0, [r4, r1] + ldr r1, [r4, r1] + mov r0, #0 + bl sub_020C4BB8 + ldr r2, _0223EA1C ; =0x00001084 + mov r0, #0x3e + ldr r2, [r4, r2] + mov r1, #0 + add r2, #0x1c + bl ov94_02242524 + ldr r1, _0223EA1C ; =0x00001084 + ldr r1, [r4, r1] + str r0, [r1, #0x18] + mov r0, #0x3e + bl ov94_02242548 + ldr r1, _0223EA1C ; =0x00001084 + ldr r2, [r4, r1] + add r1, #0x38 + str r0, [r2, #0x14] + add r0, r4, r1 + bl ov94_02242AAC + pop {r4, pc} + ; .align 2, 0 +_0223EA18: .word 0x00000BB4 +_0223EA1C: .word 0x00001084 + thumb_func_end ov94_0223E9B8 + + thumb_func_start ov94_0223EA20 +ov94_0223EA20: ; 0x0223EA20 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223EA54 ; =0x00001084 + ldr r0, [r4, r0] + ldr r0, [r0, #0x14] + bl sub_020181C4 + ldr r0, _0223EA54 ; =0x00001084 + ldr r0, [r4, r0] + ldr r0, [r0, #0x18] + bl sub_020181C4 + ldr r0, _0223EA54 ; =0x00001084 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _0223EA58 ; =0x00000BB4 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 +_0223EA54: .word 0x00001084 +_0223EA58: .word 0x00000BB4 + thumb_func_end ov94_0223EA20 + + thumb_func_start ov94_0223EA5C +ov94_0223EA5C: ; 0x0223EA5C + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223EA80 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #8 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223EA80: .word 0x00000F0F + thumb_func_end ov94_0223EA5C + + thumb_func_start ov94_0223EA84 +ov94_0223EA84: ; 0x0223EA84 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov94_0223EFAC + ldr r0, _0223EBB0 ; =0x021BF67C + mov r2, #1 + ldr r1, [r0, #0x48] + add r0, r1, #0 + tst r0, r2 + beq _0223EB42 + add r0, r4, #0 + bl ov94_0223EF94 + cmp r0, #5 + bls _0223EAA4 + b _0223EBAC +_0223EAA4: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223EAB0: ; jump table + .short _0223EABC - _0223EAB0 - 2 ; case 0 + .short _0223EAC8 - _0223EAB0 - 2 ; case 1 + .short _0223EB02 - _0223EAB0 - 2 ; case 2 + .short _0223EB0E - _0223EAB0 - 2 ; case 3 + .short _0223EB1A - _0223EAB0 - 2 ; case 4 + .short _0223EB20 - _0223EAB0 - 2 ; case 5 +_0223EABC: + mov r0, #3 + str r0, [r4, #0x2c] + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + b _0223EBAC +_0223EAC8: + ldr r0, _0223EBB8 ; =0x00000B7E + ldrsh r0, [r4, r0] + cmp r0, #0 + beq _0223EAF6 + mov r1, #0x12 + bl sub_020759F0 + ldr r1, _0223EBBC ; =0x00001084 + ldr r2, [r4, r1] + str r0, [r2, #0x20] + ldr r1, [r4, r1] + ldr r0, _0223EBB8 ; =0x00000B7E + ldr r1, [r1, #0x20] + add r0, r4, r0 + bl ov94_02241B80 + cmp r0, #0 + beq _0223EAF6 + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + mov r0, #3 + pop {r3, r4, r5, pc} +_0223EAF6: + mov r0, #8 + str r0, [r4, #0x2c] + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + b _0223EBAC +_0223EB02: + mov r0, #0xb + str r0, [r4, #0x2c] + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + b _0223EBAC +_0223EB0E: + mov r0, #0xe + str r0, [r4, #0x2c] + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + b _0223EBAC +_0223EB1A: + mov r0, #0x11 + str r0, [r4, #0x2c] + b _0223EBAC +_0223EB20: + ldr r0, _0223EBC0 ; =0x00000F0F + mov r1, #0xf + str r0, [sp] + add r0, r4, #0 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #0x19 + bl ov94_0223C3F4 + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + b _0223EBAC +_0223EB42: + mov r0, #2 + tst r0, r1 + beq _0223EB68 + ldr r0, _0223EBC0 ; =0x00000F0F + mov r1, #0xf + str r0, [sp] + add r0, r4, #0 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #0x19 + bl ov94_0223C3F4 + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 + b _0223EBAC +_0223EB68: + mov r0, #0x47 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl ov94_02244214 + add r5, r0, #0 + ldr r0, _0223EBC4 ; =0x00001092 + ldrh r0, [r4, r0] + cmp r0, #0 + beq _0223EBAC + cmp r5, #0 + blt _0223EBAC + add r0, r5, #1 + lsl r0, r0, #2 + add r1, r4, r0 + ldr r0, _0223EBC8 ; =0x00000ED4 + ldr r0, [r1, r0] + lsl r1, r5, #2 + add r1, #0x10 + bl sub_02021D6C + mov r0, #2 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #3 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #0x12 + lsl r0, r0, #4 + str r5, [r4, r0] + ldr r0, _0223EBB4 ; =0x000005DC + bl sub_02005748 +_0223EBAC: + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223EBB0: .word 0x021BF67C +_0223EBB4: .word 0x000005DC +_0223EBB8: .word 0x00000B7E +_0223EBBC: .word 0x00001084 +_0223EBC0: .word 0x00000F0F +_0223EBC4: .word 0x00001092 +_0223EBC8: .word 0x00000ED4 + thumb_func_end ov94_0223EA84 + + thumb_func_start ov94_0223EBCC +ov94_0223EBCC: ; 0x0223EBCC + push {r3, r4, lr} + sub sp, #4 + ldr r3, _0223EC60 ; =0x00000B7E + add r4, r0, #0 + ldrsh r1, [r4, r3] + cmp r1, #0 + bne _0223EBFA + ldr r1, _0223EC64 ; =0x00000F0F + mov r2, #1 + str r1, [sp] + mov r1, #0xc + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + ldr r0, _0223EC68 ; =0x000005F3 + bl sub_02005748 + b _0223EC58 +_0223EBFA: + ldr r2, _0223EC6C ; =0x00001150 + add r1, r3, #6 + add r0, r4, r3 + add r3, #0xe + ldr r2, [r4, r2] + ldr r3, [r4, r3] + add r1, r4, r1 + bl ov94_0223FB0C + cmp r0, #0 + beq _0223EC32 + ldr r0, _0223EC64 ; =0x00000F0F + mov r1, #0x21 + str r0, [sp] + add r0, r4, #0 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + ldr r0, _0223EC68 ; =0x000005F3 + bl sub_02005748 + b _0223EC58 +_0223EC32: + ldr r0, _0223EC70 ; =0x000005FF + bl sub_02005748 + ldr r0, _0223EC64 ; =0x00000F0F + mov r1, #0xd + str r0, [sp] + add r0, r4, #0 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #0x12 + bl ov94_0223C3F4 + add r0, r4, #0 + bl ov94_022442E4 +_0223EC58: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0223EC60: .word 0x00000B7E +_0223EC64: .word 0x00000F0F +_0223EC68: .word 0x000005F3 +_0223EC6C: .word 0x00001150 +_0223EC70: .word 0x000005FF + thumb_func_end ov94_0223EBCC + + thumb_func_start ov94_0223EC74 +ov94_0223EC74: ; 0x0223EC74 + push {r3, r4, lr} + sub sp, #0x2c + cmp r1, #1 + ldr r0, [r0, #0] + bne _0223EC86 + ldr r0, [r0, #0] + bl sub_0202DA9C + b _0223EC8C +_0223EC86: + ldr r0, [r0, #0] + bl sub_0202DA8C +_0223EC8C: + lsr r1, r0, #0x18 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp, #0x1c] + lsr r1, r0, #0x10 + lsl r1, r1, #0x18 + lsr r1, r1, #0x18 + str r1, [sp, #0x20] + lsr r1, r0, #8 + lsl r1, r1, #0x18 + lsl r0, r0, #0x18 + lsr r1, r1, #0x18 + lsr r0, r0, #0x18 + str r1, [sp, #0x24] + str r0, [sp, #0x28] + add r0, sp, #0xc + add r1, sp, #0 + bl ov4_021D806C + add r0, sp, #0xc + bl sub_020CC16C + add r4, r0, #0 + add r0, sp, #0x1c + bl sub_020CC16C + sub r0, r4, r0 + bmi _0223ECCE + cmp r0, #3 + bge _0223ECCE + add sp, #0x2c + mov r0, #1 + pop {r3, r4, pc} +_0223ECCE: + mov r0, #0 + add sp, #0x2c + pop {r3, r4, pc} + thumb_func_end ov94_0223EC74 + + thumb_func_start ov94_0223ECD4 +ov94_0223ECD4: ; 0x0223ECD4 + push {r3, r4, r5, lr} + sub sp, #8 + mov r1, #1 + add r5, r0, #0 + mov r4, #3 + bl ov94_0223EC74 + cmp r0, #0 + beq _0223ECE8 + add r4, r4, #2 +_0223ECE8: + add r0, r5, #0 + mov r1, #0 + bl ov94_0223EC74 + cmp r0, #0 + beq _0223ECF6 + add r4, r4, #2 +_0223ECF6: + ldr r0, _0223ED88 ; =0x00001150 + ldr r0, [r5, r0] + cmp r0, #0 + bne _0223ED10 + ldr r0, _0223ED8C ; =0x00000B7E + mov r2, #0x95 + lsl r2, r2, #2 + add r0, r5, r0 + add r1, r4, #0 + add r2, r5, r2 + bl ov94_0223B9B0 + b _0223ED4E +_0223ED10: + add r0, sp, #0 + mov r1, #0 + mov r2, #8 + bl sub_020C4CF4 + ldr r1, _0223ED8C ; =0x00000B7E + add r0, sp, #0 + ldrsh r2, [r5, r1] + strh r2, [r0] + add r2, r1, #2 + ldrsb r2, [r5, r2] + strb r2, [r0, #2] + add r2, r1, #3 + ldrsb r2, [r5, r2] + strb r2, [r0, #3] + add r2, r1, #4 + ldrsb r2, [r5, r2] + add r1, r1, #5 + strb r2, [r0, #4] + ldrsb r1, [r5, r1] + strb r1, [r0, #5] + ldr r1, _0223ED88 ; =0x00001150 + strb r4, [r0, #6] + ldr r1, [r5, r1] + strb r1, [r0, #7] + mov r1, #0x95 + lsl r1, r1, #2 + add r0, sp, #0 + add r1, r5, r1 + bl ov94_0223BA24 +_0223ED4E: + ldr r1, _0223ED8C ; =0x00000B7E + ldrh r2, [r5, r1] + add r0, r1, #6 + strh r2, [r5, r0] + add r0, r1, #2 + ldrh r2, [r5, r0] + add r0, r1, #0 + add r0, #8 + strh r2, [r5, r0] + add r0, r1, #4 + ldrh r2, [r5, r0] + add r0, r1, #0 + add r0, #0xa + strh r2, [r5, r0] + ldr r2, _0223ED88 ; =0x00001150 + add r1, #0xe + ldr r0, [r5, r2] + sub r2, #0xbe + str r0, [r5, r1] + ldr r0, _0223ED90 ; =0x00001484 + mov r1, #0 + str r1, [r5, r0] + mov r0, #0x13 + str r0, [r5, #0x2c] + strh r1, [r5, r2] + mov r0, #3 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223ED88: .word 0x00001150 +_0223ED8C: .word 0x00000B7E +_0223ED90: .word 0x00001484 + thumb_func_end ov94_0223ECD4 + + thumb_func_start ov94_0223ED94 +ov94_0223ED94: ; 0x0223ED94 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _0223EE1C + bl ov94_0223B7D8 + add r5, r0, #0 + ldr r0, _0223EE38 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + add r0, r5, #0 + add r0, #0xf + cmp r0, #0x16 + bhi _0223EE32 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223EDC0: ; jump table + .short _0223EE16 - _0223EDC0 - 2 ; case 0 + .short _0223EE0A - _0223EDC0 - 2 ; case 1 + .short _0223EE10 - _0223EDC0 - 2 ; case 2 + .short _0223EE16 - _0223EDC0 - 2 ; case 3 + .short _0223EE32 - _0223EDC0 - 2 ; case 4 + .short _0223EE32 - _0223EDC0 - 2 ; case 5 + .short _0223EE32 - _0223EDC0 - 2 ; case 6 + .short _0223EE32 - _0223EDC0 - 2 ; case 7 + .short _0223EE32 - _0223EDC0 - 2 ; case 8 + .short _0223EE32 - _0223EDC0 - 2 ; case 9 + .short _0223EE32 - _0223EDC0 - 2 ; case 10 + .short _0223EE32 - _0223EDC0 - 2 ; case 11 + .short _0223EE32 - _0223EDC0 - 2 ; case 12 + .short _0223EE0A - _0223EDC0 - 2 ; case 13 + .short _0223EE32 - _0223EDC0 - 2 ; case 14 + .short _0223EDEE - _0223EDC0 - 2 ; case 15 + .short _0223EDEE - _0223EDC0 - 2 ; case 16 + .short _0223EDEE - _0223EDC0 - 2 ; case 17 + .short _0223EDEE - _0223EDC0 - 2 ; case 18 + .short _0223EDEE - _0223EDC0 - 2 ; case 19 + .short _0223EDEE - _0223EDC0 - 2 ; case 20 + .short _0223EDEE - _0223EDC0 - 2 ; case 21 + .short _0223EDEE - _0223EDC0 - 2 ; case 22 +_0223EDEE: + mov r0, #0x47 + lsl r0, r0, #2 + str r5, [r4, r0] + ldr r0, _0223EE3C ; =0x000005FF + bl sub_020057A4 + add r0, r4, #0 + add r1, r5, #0 + mov r2, #1 + bl ov94_02244234 + mov r0, #0x14 + str r0, [r4, #0x2c] + b _0223EE32 +_0223EE0A: + mov r0, #0x1d + str r0, [r4, #0x2c] + b _0223EE32 +_0223EE10: + bl sub_02038A0C + b _0223EE32 +_0223EE16: + mov r0, #0x16 + str r0, [r4, #0x2c] + b _0223EE32 +_0223EE1C: + ldr r0, _0223EE38 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _0223EE32 + bl sub_02038A0C +_0223EE32: + mov r0, #3 + pop {r3, r4, r5, pc} + nop +_0223EE38: .word 0x00001484 +_0223EE3C: .word 0x000005FF + thumb_func_end ov94_0223ED94 + + thumb_func_start ov94_0223EE40 +ov94_0223EE40: ; 0x0223EE40 + push {r3, r4, lr} + sub sp, #4 + mov r1, #0x47 + add r4, r0, #0 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + ldr r1, _0223EE94 ; =0x00000F0F + bne _0223EE70 + str r1, [sp] + mov r1, #0xe + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + ldr r0, _0223EE98 ; =0x000005F3 + bl sub_02005748 + b _0223EE8E +_0223EE70: + str r1, [sp] + mov r1, #0x1e + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #0x15 + bl ov94_0223C3F4 + mov r0, #0x42 + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] +_0223EE8E: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223EE94: .word 0x00000F0F +_0223EE98: .word 0x000005F3 + thumb_func_end ov94_0223EE40 + + thumb_func_start ov94_0223EE9C +ov94_0223EE9C: ; 0x0223EE9C + push {r3, r4, lr} + sub sp, #4 + mov r1, #0x42 + add r4, r0, #0 + lsl r1, r1, #6 + ldr r2, [r4, r1] + add r2, r2, #1 + str r2, [r4, r1] + ldr r1, [r4, r1] + cmp r1, #0x2d + ble _0223EED0 + ldr r1, _0223EED8 ; =0x00000F0F + mov r2, #1 + str r1, [sp] + mov r1, #0x20 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + ldr r0, _0223EEDC ; =0x00001092 + mov r1, #1 + strh r1, [r4, r0] +_0223EED0: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0223EED8: .word 0x00000F0F +_0223EEDC: .word 0x00001092 + thumb_func_end ov94_0223EE9C + + thumb_func_start ov94_0223EEE0 +ov94_0223EEE0: ; 0x0223EEE0 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223EF10 ; =0x00000B84 + add r4, r0, #0 + mov r3, #0 + strh r3, [r4, r1] + ldr r1, _0223EF14 ; =0x00000F0F + mov r2, #1 + str r1, [sp] + mov r1, #0x26 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + ldr r0, _0223EF18 ; =0x000005F3 + bl sub_02005748 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0223EF10: .word 0x00000B84 +_0223EF14: .word 0x00000F0F +_0223EF18: .word 0x000005F3 + thumb_func_end ov94_0223EEE0 + + thumb_func_start ov94_0223EF1C +ov94_0223EF1C: ; 0x0223EF1C + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223EF50 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0x93 + mov r2, #4 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x18 + mov r2, #0x1e + bl ov94_0223C3F4 + mov r0, #0x42 + mov r1, #0 + lsl r0, r0, #6 + str r1, [r4, r0] + ldr r0, _0223EF54 ; =0x000005F3 + bl sub_02005748 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0223EF50: .word 0x00000F0F +_0223EF54: .word 0x000005F3 + thumb_func_end ov94_0223EF1C + + thumb_func_start ov94_0223EF58 +ov94_0223EF58: ; 0x0223EF58 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223EF8C ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0x98 + mov r2, #4 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x18 + mov r2, #2 + bl ov94_0223C3F4 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + ldr r0, _0223EF90 ; =0x000005F3 + bl sub_02005748 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223EF8C: .word 0x00000F0F +_0223EF90: .word 0x000005F3 + thumb_func_end ov94_0223EF58 + + thumb_func_start ov94_0223EF94 +ov94_0223EF94: ; 0x0223EF94 + ldr r1, _0223EFA8 ; =0x00001084 + ldr r1, [r0, r1] + ldr r0, [r1, #0x24] + cmp r0, #0 + bne _0223EFA2 + ldr r0, [r1, #0x28] + bx lr +_0223EFA2: + ldr r0, [r1, #0x2c] + add r0, r0, #4 + bx lr + ; .align 2, 0 +_0223EFA8: .word 0x00001084 + thumb_func_end ov94_0223EF94 + + thumb_func_start ov94_0223EFAC +ov94_0223EFAC: ; 0x0223EFAC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, _0223F094 ; =0x021BF67C + mov r1, #0x40 + ldr r0, [r0, #0x48] + tst r1, r0 + beq _0223EFEE + ldr r0, _0223F098 ; =0x00001084 + ldr r1, [r4, r0] + ldr r0, [r1, #0x24] + cmp r0, #0 + bne _0223EFD8 + ldr r0, [r1, #0x28] + cmp r0, #0 + ble _0223F064 + sub r0, r0, #1 + str r0, [r1, #0x28] + ldr r0, _0223F09C ; =0x000005DC + bl sub_02005748 + b _0223F064 +_0223EFD8: + ldr r0, [r1, #0x2c] + cmp r0, #0 + beq _0223EFE4 + ldr r0, _0223F09C ; =0x000005DC + bl sub_02005748 +_0223EFE4: + ldr r0, _0223F098 ; =0x00001084 + mov r1, #0 + ldr r0, [r4, r0] + str r1, [r0, #0x2c] + b _0223F064 +_0223EFEE: + mov r1, #0x80 + tst r1, r0 + beq _0223F026 + ldr r0, _0223F098 ; =0x00001084 + ldr r1, [r4, r0] + ldr r0, [r1, #0x24] + cmp r0, #0 + bne _0223F010 + ldr r0, [r1, #0x28] + cmp r0, #3 + bge _0223F064 + add r0, r0, #1 + str r0, [r1, #0x28] + ldr r0, _0223F09C ; =0x000005DC + bl sub_02005748 + b _0223F064 +_0223F010: + ldr r0, [r1, #0x2c] + cmp r0, #1 + beq _0223F01C + ldr r0, _0223F09C ; =0x000005DC + bl sub_02005748 +_0223F01C: + ldr r0, _0223F098 ; =0x00001084 + mov r1, #1 + ldr r0, [r4, r0] + str r1, [r0, #0x2c] + b _0223F064 +_0223F026: + mov r1, #0x10 + tst r1, r0 + beq _0223F046 + ldr r0, _0223F098 ; =0x00001084 + ldr r0, [r4, r0] + ldr r0, [r0, #0x24] + cmp r0, #1 + beq _0223F03C + ldr r0, _0223F09C ; =0x000005DC + bl sub_02005748 +_0223F03C: + ldr r0, _0223F098 ; =0x00001084 + mov r1, #1 + ldr r0, [r4, r0] + str r1, [r0, #0x24] + b _0223F064 +_0223F046: + mov r1, #0x20 + tst r0, r1 + beq _0223F064 + ldr r0, _0223F098 ; =0x00001084 + ldr r0, [r4, r0] + ldr r0, [r0, #0x24] + cmp r0, #0 + beq _0223F05C + ldr r0, _0223F09C ; =0x000005DC + bl sub_02005748 +_0223F05C: + ldr r0, _0223F098 ; =0x00001084 + mov r1, #0 + ldr r0, [r4, r0] + str r1, [r0, #0x24] +_0223F064: + add r0, r4, #0 + bl ov94_0223EF94 + lsl r1, r0, #2 + ldr r0, _0223F0A0 ; =0x02246848 + ldrh r0, [r0, r1] + lsl r0, r0, #0xc + str r0, [sp] + add r0, r4, #0 + bl ov94_0223EF94 + lsl r1, r0, #2 + ldr r0, _0223F0A4 ; =0x0224684A + ldrh r0, [r0, r1] + add r1, sp, #0 + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r4, r0] + bl sub_02021C50 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0223F094: .word 0x021BF67C +_0223F098: .word 0x00001084 +_0223F09C: .word 0x000005DC +_0223F0A0: .word 0x02246848 +_0223F0A4: .word 0x0224684A + thumb_func_end ov94_0223EFAC + + thumb_func_start ov94_0223F0A8 +ov94_0223F0A8: ; 0x0223F0A8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #6 + mov r1, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + thumb_func_end ov94_0223F0A8 + + thumb_func_start ov94_0223F0D0 +ov94_0223F0D0: ; 0x0223F0D0 + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _0223F148 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #9 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #4 + bl ov94_0223C3F4 + mov r0, #5 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0xb6 + ldr r1, _0223F14C ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0xf + bl sub_0201A7E8 + ldr r0, _0223F14C ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #5 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0xea + ldr r1, _0223F150 ; =0x00000F4C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + ldr r0, _0223F150 ; =0x00000F4C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_0223F148: .word 0x00000F0F +_0223F14C: .word 0x00000F3C +_0223F150: .word 0x00000F4C + thumb_func_end ov94_0223F0D0 + + thumb_func_start ov94_0223F154 +ov94_0223F154: ; 0x0223F154 + push {r4, lr} + ldr r3, _0223F17C ; =0x00000B94 + add r4, r0, #0 + ldr r1, _0223F180 ; =0x0000106C + ldr r2, _0223F184 ; =0x00000F3C + ldr r3, [r4, r3] + add r1, r4, r1 + add r2, r4, r2 + bl ov94_022426A8 + ldr r1, _0223F188 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _0223F18C ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #5 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223F17C: .word 0x00000B94 +_0223F180: .word 0x0000106C +_0223F184: .word 0x00000F3C +_0223F188: .word 0x00001078 +_0223F18C: .word 0x0000FFFF + thumb_func_end ov94_0223F154 + + thumb_func_start ov94_0223F190 +ov94_0223F190: ; 0x0223F190 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223F240 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_02242A6C + cmp r0, #9 + bhi _0223F1C6 + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0223F1B2: ; jump table + .short _0223F23A - _0223F1B2 - 2 ; case 0 + .short _0223F1D0 - _0223F1B2 - 2 ; case 1 + .short _0223F1D0 - _0223F1B2 - 2 ; case 2 + .short _0223F1D0 - _0223F1B2 - 2 ; case 3 + .short _0223F1D0 - _0223F1B2 - 2 ; case 4 + .short _0223F1D0 - _0223F1B2 - 2 ; case 5 + .short _0223F1D0 - _0223F1B2 - 2 ; case 6 + .short _0223F1D0 - _0223F1B2 - 2 ; case 7 + .short _0223F1D0 - _0223F1B2 - 2 ; case 8 + .short _0223F1D0 - _0223F1B2 - 2 ; case 9 +_0223F1C6: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _0223F1F4 + b _0223F23A +_0223F1D0: + ldr r0, _0223F244 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #6 + ldr r0, [r4, r0] + add r2, r2, #4 + bl sub_02001384 + ldr r0, _0223F248 ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _0223F24C ; =0x000005DC + bl sub_02005748 + mov r0, #6 + str r0, [r4, #0x2c] + b _0223F23A +_0223F1F4: + ldr r0, _0223F244 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #6 + ldr r0, [r4, r0] + add r2, r2, #4 + bl sub_02001384 + ldr r0, _0223F248 ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _0223F250 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _0223F254 ; =0x00000EFC + mov r1, #0 + add r0, r4, r0 + bl sub_0200E084 + ldr r0, _0223F250 ; =0x00000F3C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _0223F258 ; =0x00000F4C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _0223F24C ; =0x000005DC + bl sub_02005748 + mov r0, #0 + str r0, [r4, #0x2c] +_0223F23A: + mov r0, #3 + pop {r4, pc} + nop +_0223F240: .word 0x00001078 +_0223F244: .word 0x00001084 +_0223F248: .word 0x0000106C +_0223F24C: .word 0x000005DC +_0223F250: .word 0x00000F3C +_0223F254: .word 0x00000EFC +_0223F258: .word 0x00000F4C + thumb_func_end ov94_0223F190 + + thumb_func_start ov94_0223F25C +ov94_0223F25C: ; 0x0223F25C + push {r3, r4, lr} + sub sp, #0xc + ldr r3, _0223F29C ; =0x00000B98 + add r4, r0, #0 + ldr r1, [r4, r3] + sub r3, r3, #4 + str r1, [sp] + ldr r1, _0223F2A0 ; =0x00001084 + ldr r2, [r4, r1] + sub r1, #0x18 + str r2, [sp, #4] + ldr r2, [r4, #0] + add r1, r4, r1 + ldr r2, [r2, #0x10] + str r2, [sp, #8] + ldr r2, _0223F2A4 ; =0x00000F4C + ldr r3, [r4, r3] + add r2, r4, r2 + bl ov94_022427C0 + ldr r1, _0223F2A8 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _0223F2AC ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #7 + str r0, [r4, #0x2c] + mov r0, #3 + add sp, #0xc + pop {r3, r4, pc} + nop +_0223F29C: .word 0x00000B98 +_0223F2A0: .word 0x00001084 +_0223F2A4: .word 0x00000F4C +_0223F2A8: .word 0x00001078 +_0223F2AC: .word 0x0000FFFF + thumb_func_end ov94_0223F25C + + thumb_func_start ov94_0223F2B0 +ov94_0223F2B0: ; 0x0223F2B0 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, _0223F3EC ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_02242A6C + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _0223F2D8 + add r0, r0, #1 + cmp r5, r0 + bne _0223F2D6 + b _0223F3E4 +_0223F2D6: + b _0223F31E +_0223F2D8: + ldr r0, _0223F3F0 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #0 + ldr r0, [r4, r0] + add r1, #0xa + add r2, #8 + bl sub_02001384 + ldr r0, _0223F3F4 ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _0223F3F8 ; =0x00000F4C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _0223F3FC ; =0x000005DC + bl sub_02005748 + mov r0, #4 + str r0, [r4, #0x2c] + ldr r0, _0223F3F0 ; =0x00001084 + ldr r3, [r4, r0] + add r0, #0x38 + ldrh r2, [r3, #6] + ldrh r1, [r3, #4] + add r0, r4, r0 + add r1, r2, r1 + ldrh r2, [r3, #0xa] + ldrh r3, [r3, #8] + bl ov94_02242AC4 + b _0223F3E4 +_0223F31E: + ldr r0, _0223F3F0 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #0 + ldr r0, [r4, r0] + add r1, #0xa + add r2, #8 + bl sub_02001384 + ldr r0, _0223F3F4 ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _0223F400 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _0223F3F8 ; =0x00000F4C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _0223F400 ; =0x00000F3C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _0223F3F8 ; =0x00000F4C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _0223F404 ; =0x00000B7E + strh r5, [r4, r0] + mov r0, #0 + str r0, [r4, #0x2c] + ldr r0, _0223F3FC ; =0x000005DC + bl sub_02005748 + ldr r0, _0223F408 ; =0x00000F7C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r3, #0 + ldr r0, _0223F40C ; =0x00010200 + str r3, [sp] + str r0, [sp, #4] + ldr r1, _0223F410 ; =0x00000B98 + ldr r0, _0223F408 ; =0x00000F7C + ldr r1, [r4, r1] + add r0, r4, r0 + add r2, r5, #0 + bl ov94_02242158 + add r0, r5, #0 + mov r1, #0x12 + bl sub_020759F0 + ldr r1, _0223F3F0 ; =0x00001084 + ldr r2, [r4, r1] + str r0, [r2, #0x20] + ldr r3, [r4, r1] + add r1, #0x38 + add r0, r4, r1 + ldrh r2, [r3, #6] + ldrh r1, [r3, #4] + add r1, r2, r1 + ldrh r2, [r3, #0xa] + ldrh r3, [r3, #8] + bl ov94_02242AC4 + ldr r1, _0223F3F0 ; =0x00001084 + ldr r0, _0223F404 ; =0x00000B7E + ldr r1, [r4, r1] + add r0, r4, r0 + ldr r1, [r1, #0x20] + bl ov94_02241B80 + cmp r0, #0 + beq _0223F3E4 + ldr r0, _0223F414 ; =0x00000F9C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223F40C ; =0x00010200 + ldr r2, _0223F418 ; =0x00000B94 + str r0, [sp, #8] + ldr r1, [r4, r2] + sub r2, #0x14 + ldr r0, _0223F414 ; =0x00000F9C + ldrsb r2, [r4, r2] + add r0, r4, r0 + mov r3, #1 + bl ov94_02242204 +_0223F3E4: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223F3EC: .word 0x00001078 +_0223F3F0: .word 0x00001084 +_0223F3F4: .word 0x0000106C +_0223F3F8: .word 0x00000F4C +_0223F3FC: .word 0x000005DC +_0223F400: .word 0x00000F3C +_0223F404: .word 0x00000B7E +_0223F408: .word 0x00000F7C +_0223F40C: .word 0x00010200 +_0223F410: .word 0x00000B98 +_0223F414: .word 0x00000F9C +_0223F418: .word 0x00000B94 + thumb_func_end ov94_0223F2B0 + + thumb_func_start ov94_0223F41C +ov94_0223F41C: ; 0x0223F41C + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _0223F46C ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #9 + bl ov94_0223C3F4 + mov r0, #0xa + str r0, [sp] + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0xb6 + ldr r1, _0223F470 ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + ldr r0, _0223F470 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + nop +_0223F46C: .word 0x00000F0F +_0223F470: .word 0x00000F3C + thumb_func_end ov94_0223F41C + + thumb_func_start ov94_0223F474 +ov94_0223F474: ; 0x0223F474 + push {r4, lr} + ldr r2, _0223F49C ; =0x00000B94 + add r4, r0, #0 + ldr r0, _0223F4A0 ; =0x0000106C + ldr r1, _0223F4A4 ; =0x00000F3C + ldr r2, [r4, r2] + add r0, r4, r0 + add r1, r4, r1 + bl ov94_02242840 + ldr r1, _0223F4A8 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _0223F4AC ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #0xa + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223F49C: .word 0x00000B94 +_0223F4A0: .word 0x0000106C +_0223F4A4: .word 0x00000F3C +_0223F4A8: .word 0x00001078 +_0223F4AC: .word 0x0000FFFF + thumb_func_end ov94_0223F474 + + thumb_func_start ov94_0223F4B0 +ov94_0223F4B0: ; 0x0223F4B0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0223F580 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r5, r0] + add r1, r5, r1 + bl ov94_02242A6C + add r4, r0, #0 + cmp r4, #2 + bhi _0223F4D8 + cmp r4, #0 + beq _0223F51C + cmp r4, #1 + beq _0223F51C + cmp r4, #2 + beq _0223F51C + b _0223F578 +_0223F4D8: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _0223F578 + ldr r0, _0223F580 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _0223F584 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223F588 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0223F58C ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + ldr r0, _0223F588 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223F590 ; =0x000005DC + bl sub_02005748 + mov r0, #0 + str r0, [r5, #0x2c] + b _0223F578 +_0223F51C: + ldr r0, _0223F580 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _0223F584 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223F588 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0223F588 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223F590 ; =0x000005DC + bl sub_02005748 + mov r0, #0x2e + add r1, r4, #1 + lsl r0, r0, #6 + strb r1, [r5, r0] + ldr r0, _0223F594 ; =0x00000F9C + mov r1, #0 + add r0, r5, r0 + str r1, [r5, #0x2c] + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223F598 ; =0x00010200 + ldr r2, _0223F59C ; =0x00000B94 + str r0, [sp, #8] + ldr r1, [r5, r2] + sub r2, #0x14 + ldr r0, _0223F594 ; =0x00000F9C + ldrsb r2, [r5, r2] + add r0, r5, r0 + mov r3, #1 + bl ov94_02242204 +_0223F578: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223F580: .word 0x00001078 +_0223F584: .word 0x0000106C +_0223F588: .word 0x00000F3C +_0223F58C: .word 0x00000EFC +_0223F590: .word 0x000005DC +_0223F594: .word 0x00000F9C +_0223F598: .word 0x00010200 +_0223F59C: .word 0x00000B94 + thumb_func_end ov94_0223F4B0 + + thumb_func_start ov94_0223F5A0 +ov94_0223F5A0: ; 0x0223F5A0 + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _0223F5F0 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xb + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #0xc + bl ov94_0223C3F4 + mov r0, #5 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0xb6 + ldr r1, _0223F5F4 ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0xf + bl sub_0201A7E8 + ldr r0, _0223F5F4 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + nop +_0223F5F0: .word 0x00000F0F +_0223F5F4: .word 0x00000F3C + thumb_func_end ov94_0223F5A0 + + thumb_func_start ov94_0223F5F8 +ov94_0223F5F8: ; 0x0223F5F8 + push {r4, lr} + ldr r2, _0223F624 ; =0x00000B94 + add r4, r0, #0 + ldr r0, _0223F628 ; =0x0000106C + ldr r1, _0223F62C ; =0x00000F3C + ldr r2, [r4, r2] + add r0, r4, r0 + add r1, r4, r1 + mov r3, #1 + bl ov94_022428B0 + ldr r1, _0223F630 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _0223F634 ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #0xd + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_0223F624: .word 0x00000B94 +_0223F628: .word 0x0000106C +_0223F62C: .word 0x00000F3C +_0223F630: .word 0x00001078 +_0223F634: .word 0x0000FFFF + thumb_func_end ov94_0223F5F8 + + thumb_func_start ov94_0223F638 +ov94_0223F638: ; 0x0223F638 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0223F704 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r5, r0] + add r1, r5, r1 + bl ov94_02242A6C + add r4, r0, #0 + cmp r4, #0xb + beq _0223F662 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _0223F662 + add r0, r0, #1 + cmp r4, r0 + beq _0223F6FC + b _0223F69E +_0223F662: + ldr r0, _0223F704 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _0223F708 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223F70C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0223F710 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + ldr r0, _0223F70C ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223F714 ; =0x000005DC + bl sub_02005748 + mov r0, #0 + str r0, [r5, #0x2c] + b _0223F6FC +_0223F69E: + ldr r0, _0223F704 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _0223F708 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223F70C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0223F70C ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223F714 ; =0x000005DC + bl sub_02005748 + ldr r0, _0223F718 ; =0x00000B7E + add r1, r4, #0 + add r0, r5, r0 + mov r2, #1 + bl ov94_02242934 + ldr r0, _0223F71C ; =0x00000FBC + mov r1, #0 + add r0, r5, r0 + str r1, [r5, #0x2c] + bl sub_0201ADA4 + mov r3, #0 + ldr r0, _0223F720 ; =0x00010200 + str r3, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + ldr r1, _0223F724 ; =0x00000B94 + ldr r0, _0223F71C ; =0x00000FBC + ldr r1, [r5, r1] + add r0, r5, r0 + add r2, r4, #0 + bl ov94_022422B8 +_0223F6FC: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223F704: .word 0x00001078 +_0223F708: .word 0x0000106C +_0223F70C: .word 0x00000F3C +_0223F710: .word 0x00000EFC +_0223F714: .word 0x000005DC +_0223F718: .word 0x00000B7E +_0223F71C: .word 0x00000FBC +_0223F720: .word 0x00010200 +_0223F724: .word 0x00000B94 + thumb_func_end ov94_0223F638 + + thumb_func_start ov94_0223F728 +ov94_0223F728: ; 0x0223F728 + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _0223F778 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xa9 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #0xf + bl ov94_0223C3F4 + mov r0, #5 + str r0, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0xb6 + ldr r1, _0223F77C ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, _0223F77C ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + nop +_0223F778: .word 0x00000F0F +_0223F77C: .word 0x00000F3C + thumb_func_end ov94_0223F728 + + thumb_func_start ov94_0223F780 +ov94_0223F780: ; 0x0223F780 + push {r4, lr} + ldr r3, _0223F7AC ; =0x00000BA4 + add r4, r0, #0 + ldr r0, _0223F7B0 ; =0x0000106C + ldr r1, _0223F7B4 ; =0x00000F3C + ldr r2, [r4, r3] + sub r3, #0x10 + ldr r3, [r4, r3] + add r0, r4, r0 + add r1, r4, r1 + bl ov94_022429B4 + ldr r1, _0223F7B8 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _0223F7BC ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #0x10 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223F7AC: .word 0x00000BA4 +_0223F7B0: .word 0x0000106C +_0223F7B4: .word 0x00000F3C +_0223F7B8: .word 0x00001078 +_0223F7BC: .word 0x0000FFFF + thumb_func_end ov94_0223F780 + + thumb_func_start ov94_0223F7C0 +ov94_0223F7C0: ; 0x0223F7C0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0223F890 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r5, r0] + add r1, r5, r1 + bl ov94_02242A6C + add r4, r0, #0 + mov r0, #0 + mvn r0, r0 + cmp r4, r0 + beq _0223F888 + sub r0, r0, #1 + cmp r4, r0 + beq _0223F7EE + ldr r0, _0223F894 ; =0x02245FD4 + ldr r0, [r0, #0] + add r0, r0, #1 + cmp r4, r0 + bne _0223F82A +_0223F7EE: + ldr r0, _0223F890 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _0223F898 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223F89C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0223F8A0 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + ldr r0, _0223F89C ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223F8A4 ; =0x000005DC + bl sub_02005748 + mov r0, #0 + str r0, [r5, #0x2c] + b _0223F888 +_0223F82A: + ldr r0, _0223F890 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _0223F898 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _0223F89C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0223F89C ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0223F8A4 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + add r1, r4, #0 + bl ov94_02242A44 + ldr r0, _0223F8A8 ; =0x0000105C + mov r1, #0 + add r0, r5, r0 + str r1, [r5, #0x2c] + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + ldr r0, _0223F8AC ; =0x00010200 + ldr r3, _0223F8A8 ; =0x0000105C + str r0, [sp, #8] + ldr r2, _0223F8B0 ; =0x00000BA4 + add r0, r5, r3 + ldr r1, [r5, r2] + sub r2, #0x10 + add r3, #0xf4 + ldr r2, [r5, r2] + ldr r3, [r5, r3] + bl ov94_0224218C +_0223F888: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + nop +_0223F890: .word 0x00001078 +_0223F894: .word 0x02245FD4 +_0223F898: .word 0x0000106C +_0223F89C: .word 0x00000F3C +_0223F8A0: .word 0x00000EFC +_0223F8A4: .word 0x000005DC +_0223F8A8: .word 0x0000105C +_0223F8AC: .word 0x00010200 +_0223F8B0: .word 0x00000BA4 + thumb_func_end ov94_0223F7C0 + + thumb_func_start ov94_0223F8B4 +ov94_0223F8B4: ; 0x0223F8B4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _0223F8D0 ; =0x00000186 + mov r1, #0xf + bl ov94_0223C3C0 + ldr r1, _0223F8D4 ; =0x00001070 + str r0, [r4, r1] + mov r0, #0x1a + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_0223F8D0: .word 0x00000186 +_0223F8D4: .word 0x00001070 + thumb_func_end ov94_0223F8B4 + + thumb_func_start ov94_0223F8D8 +ov94_0223F8D8: ; 0x0223F8D8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223F91C ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0223F916 + sub r1, r1, #1 + cmp r0, r1 + bne _0223F8FA + mov r0, #0 + str r0, [r4, #0x2c] + b _0223F916 +_0223F8FA: + mov r0, #2 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + add r0, r4, #0 + bl ov94_022442E4 + mov r0, #0x47 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] +_0223F916: + mov r0, #3 + pop {r4, pc} + nop +_0223F91C: .word 0x00001070 + thumb_func_end ov94_0223F8D8 + + thumb_func_start ov94_0223F920 +ov94_0223F920: ; 0x0223F920 + mov r1, #1 + str r1, [r0, #0x2c] + mov r0, #3 + bx lr + thumb_func_end ov94_0223F920 + + thumb_func_start ov94_0223F928 +ov94_0223F928: ; 0x0223F928 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _0223F94C ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0x92 + mov r2, #1 + mov r3, #0 + bl ov94_0223F9A4 + add r0, r4, #0 + mov r1, #0x17 + mov r2, #1 + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223F94C: .word 0x00000F0F + thumb_func_end ov94_0223F928 + + thumb_func_start ov94_0223F950 +ov94_0223F950: ; 0x0223F950 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223F96C ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223F968 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223F968: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223F96C: .word 0x00000BE4 + thumb_func_end ov94_0223F950 + + thumb_func_start ov94_0223F970 +ov94_0223F970: ; 0x0223F970 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0223F9A0 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _0223F99C + mov r0, #0x42 + lsl r0, r0, #6 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + cmp r1, #0x2d + ble _0223F99C + mov r1, #0 + str r1, [r4, r0] + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_0223F99C: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0223F9A0: .word 0x00000BE4 + thumb_func_end ov94_0223F970 + + thumb_func_start ov94_0223F9A4 +ov94_0223F9A4: ; 0x0223F9A4 + push {r4, r5, lr} + sub sp, #0xc + add r4, r2, #0 + ldr r2, _0223F9F0 ; =0x00000B94 + add r5, r0, #0 + ldr r0, [r5, r2] + add r2, #0x1c + ldr r2, [r5, r2] + bl sub_0200B1B8 + ldr r0, _0223F9F4 ; =0x00000EFC + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _0223F9F4 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _0223F9F4 ; =0x00000EFC + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _0223F9F8 ; =0x00000BE4 + str r0, [r5, r1] + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0223F9F0: .word 0x00000B94 +_0223F9F4: .word 0x00000EFC +_0223F9F8: .word 0x00000BE4 + thumb_func_end ov94_0223F9A4 + + thumb_func_start ov94_0223F9FC +ov94_0223F9FC: ; 0x0223F9FC + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r4, r2, #0 + add r5, r0, #0 + add r7, r1, #0 + add r0, r4, #0 + mov r1, #0x3b + bl sub_0200B1EC + add r6, r0, #0 + mov r2, #0 + ldr r0, _0223FB04 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r1, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + mov r1, #0x3d + bl sub_0200B1EC + add r6, r0, #0 + mov r2, #0 + ldr r0, _0223FB04 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x20 + add r1, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + mov r1, #0x3f + bl sub_0200B1EC + add r6, r0, #0 + mov r2, #0 + ldr r0, _0223FB04 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x40 + add r1, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + mov r1, #0xa5 + bl sub_0200B1EC + add r6, r0, #0 + mov r2, #0 + ldr r0, _0223FB04 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + add r0, r7, #0 + add r1, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + mov r1, #0x41 + bl sub_0200B1EC + add r6, r0, #0 + add r3, r5, #0 + add r3, #0x67 + ldrb r3, [r3] + mov r0, #0 + add r1, r6, #0 + add r2, r0, #0 + lsl r3, r3, #3 + bl sub_02002EEC + add r2, r0, #0 + mov r3, #0 + ldr r0, _0223FB08 ; =0x00010200 + str r3, [sp] + str r0, [sp, #4] + add r0, r5, #0 + add r0, #0x60 + add r1, r6, #0 + bl ov94_02245900 + add r0, r6, #0 + bl sub_020237BC + add r0, r4, #0 + mov r1, #0x42 + bl sub_0200B1EC + add r4, r0, #0 + add r3, r5, #0 + add r3, #0x77 + ldrb r3, [r3] + mov r0, #0 + add r1, r4, #0 + add r2, r0, #0 + lsl r3, r3, #3 + bl sub_02002EEC + add r2, r0, #0 + mov r3, #0 + ldr r0, _0223FB08 ; =0x00010200 + str r3, [sp] + add r5, #0x70 + str r0, [sp, #4] + add r0, r5, #0 + add r1, r4, #0 + bl ov94_02245900 + add r0, r4, #0 + bl sub_020237BC + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FB04: .word 0x000F0200 +_0223FB08: .word 0x00010200 + thumb_func_end ov94_0223F9FC + + thumb_func_start ov94_0223FB0C +ov94_0223FB0C: ; 0x0223FB0C + push {r4, r5} + mov r4, #0 + ldrsh r5, [r0, r4] + ldrsh r4, [r1, r4] + cmp r5, r4 + bne _0223FB40 + mov r4, #2 + ldrsb r5, [r0, r4] + ldrsb r4, [r1, r4] + cmp r5, r4 + bne _0223FB40 + mov r4, #3 + ldrsb r5, [r0, r4] + ldrsb r4, [r1, r4] + cmp r5, r4 + bne _0223FB40 + mov r4, #4 + ldrsb r5, [r0, r4] + ldrsb r0, [r1, r4] + cmp r5, r0 + bne _0223FB40 + cmp r2, r3 + bne _0223FB40 + mov r0, #1 + pop {r4, r5} + bx lr +_0223FB40: + mov r0, #0 + pop {r4, r5} + bx lr + ; .align 2, 0 + thumb_func_end ov94_0223FB0C + + .rodata + + + .global Unk_ov94_02245D84 +Unk_ov94_02245D84: ; 0x02245D84 + .incbin "incbin/overlay94_rodata.bin", 0x38C, 0x394 - 0x38C + + .global Unk_ov94_02245D8C +Unk_ov94_02245D8C: ; 0x02245D8C + .incbin "incbin/overlay94_rodata.bin", 0x394, 0x39C - 0x394 + + .global Unk_ov94_02245D94 +Unk_ov94_02245D94: ; 0x02245D94 + .incbin "incbin/overlay94_rodata.bin", 0x39C, 0x3B4 - 0x39C + + .global Unk_ov94_02245DAC +Unk_ov94_02245DAC: ; 0x02245DAC + .incbin "incbin/overlay94_rodata.bin", 0x3B4, 0x3D0 - 0x3B4 + + .global Unk_ov94_02245DC8 +Unk_ov94_02245DC8: ; 0x02245DC8 + .incbin "incbin/overlay94_rodata.bin", 0x3D0, 0x3EC - 0x3D0 + + .global Unk_ov94_02245DE4 +Unk_ov94_02245DE4: ; 0x02245DE4 + .incbin "incbin/overlay94_rodata.bin", 0x3EC, 0x408 - 0x3EC + + .global Unk_ov94_02245E00 +Unk_ov94_02245E00: ; 0x02245E00 + .incbin "incbin/overlay94_rodata.bin", 0x408, 0x1C + + + .data + + + .global Unk_ov94_02246848 +Unk_ov94_02246848: ; 0x02246848 + .incbin "incbin/overlay94_data.bin", 0x448, 0x460 - 0x448 + + .global Unk_ov94_02246860 +Unk_ov94_02246860: ; 0x02246860 + .incbin "incbin/overlay94_data.bin", 0x460, 0x7C + diff --git a/asm/ov94_0223FB48.s b/asm/ov94_0223FB48.s new file mode 100644 index 000000000..e8ae0ae81 --- /dev/null +++ b/asm/ov94_0223FB48.s @@ -0,0 +1,3209 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_0223FB48 +ov94_0223FB48: ; 0x0223FB48 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_022401E0 + ldr r0, [r4, #4] + bl ov94_0223FC08 + add r0, r4, #0 + bl ov94_0223FD4C + add r0, r4, #0 + bl ov94_02240028 + add r0, r4, #0 + bl ov94_0223FE24 + ldr r0, [r4, #0x20] + cmp r0, #8 + bne _0223FB88 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + b _0223FB9E +_0223FB88: + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 +_0223FB9E: + mov r1, #0x45 + lsl r1, r1, #2 + ldrh r1, [r4, r1] + add r0, r4, #0 + bl ov94_02240FA0 + add r0, r4, #0 + bl ov94_02245934 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov94_0223FB48 + + thumb_func_start ov94_0223FBBC +ov94_0223FBBC: ; 0x0223FBBC + push {r4, lr} + add r4, r0, #0 + bl ov94_0223C4B4 + bl sub_020397B0 + ldr r1, [r4, #0x2c] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _0223FBD8 ; =0x022468DC + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_0223FBD8: .word 0x022468DC + thumb_func_end ov94_0223FBBC + + thumb_func_start ov94_0223FBDC +ov94_0223FBDC: ; 0x0223FBDC + push {r4, lr} + add r4, r0, #0 + bl sub_02039794 + add r0, r4, #0 + bl ov94_0223FFC8 + add r0, r4, #0 + bl ov94_02240268 + add r0, r4, #0 + bl ov94_02240190 + ldr r0, [r4, #4] + bl ov94_0223FD20 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_0223FBDC + + thumb_func_start ov94_0223FC08 +ov94_0223FC08: ; 0x0223FC08 + push {r4, r5, lr} + sub sp, #0x9c + ldr r5, _0223FD08 ; =0x02245E24 + add r3, sp, #0x8c + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _0223FD0C ; =0x02245E9C + add r3, sp, #0x70 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _0223FD10 ; =0x02245EB8 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _0223FD14 ; =0x02245E80 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + ldr r5, _0223FD18 ; =0x02245E48 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _0223FD1C ; =0x02245E64 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + str r0, [r3, #0] + add r0, r4, #0 + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x9c + pop {r4, r5, pc} + nop +_0223FD08: .word 0x02245E24 +_0223FD0C: .word 0x02245E9C +_0223FD10: .word 0x02245EB8 +_0223FD14: .word 0x02245E80 +_0223FD18: .word 0x02245E48 +_0223FD1C: .word 0x02245E64 + thumb_func_end ov94_0223FC08 + + thumb_func_start ov94_0223FD20 +ov94_0223FD20: ; 0x0223FD20 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_0223FD20 + + thumb_func_start ov94_0223FD4C +ov94_0223FD4C: ; 0x0223FD4C + push {r4, r5, r6, lr} + sub sp, #0x10 + add r6, r0, #0 + ldr r5, [r6, #4] + mov r0, #0x68 + mov r1, #0x3e + bl sub_02006C24 + mov r1, #0x60 + str r1, [sp] + mov r1, #0x3e + mov r2, #0 + str r1, [sp, #4] + mov r1, #2 + add r3, r2, #0 + add r4, r0, #0 + bl sub_02007130 + mov r0, #1 + lsl r0, r0, #8 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #5 + mov r2, #4 + mov r3, #0 + bl sub_02007130 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [r6, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r5, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0xc + add r2, r5, #0 + bl sub_020070E8 + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x18 + add r2, r5, #0 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + add r0, r4, #0 + mov r1, #0x1d + add r2, r5, #0 + mov r3, #2 + bl sub_0200710C + add r0, r4, #0 + bl sub_02006CA8 + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov94_0223FD4C + + thumb_func_start ov94_0223FE24 +ov94_0223FE24: ; 0x0223FE24 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + ldr r2, _0223FFA8 ; =0x00000D54 + add r5, r0, #0 + add r0, sp, #0 + add r1, r5, #0 + add r2, r5, r2 + mov r3, #1 + bl ov94_0223C300 + ldr r0, _0223FFAC ; =0x00000116 + ldrh r1, [r5, r0] + lsl r2, r1, #2 + ldr r1, _0223FFB0 ; =0x02245ED4 + ldrh r1, [r1, r2] + lsl r1, r1, #0xc + str r1, [sp, #8] + ldrh r0, [r5, r0] + lsl r1, r0, #2 + ldr r0, _0223FFB4 ; =0x02245ED6 + ldrh r0, [r0, r1] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0x37 + lsl r1, r1, #6 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #4 + bl sub_02021D6C + ldr r0, _0223FFAC ; =0x00000116 + ldrh r0, [r5, r0] + cmp r0, #0x1f + beq _0223FE7E + cmp r0, #5 + bhi _0223FE8C +_0223FE7E: + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021E80 + b _0223FE98 +_0223FE8C: + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021E80 +_0223FE98: + ldr r6, _0223FFB0 ; =0x02245ED4 + mov r7, #0 + add r4, r5, #0 +_0223FE9E: + ldrh r0, [r6] + lsl r0, r0, #0xc + str r0, [sp, #8] + ldrh r0, [r6, #2] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + mov r0, #0x14 + str r0, [sp, #0x24] + add r0, sp, #0 + bl sub_02021AA0 + ldr r1, _0223FFB8 ; =0x00000DC8 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + add r1, r7, #6 + bl sub_02021D6C + ldr r0, _0223FFB8 ; =0x00000DC8 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_02021E80 + add r7, r7, #1 + add r6, r6, #4 + add r4, r4, #4 + cmp r7, #0x1e + blt _0223FE9E + ldr r6, _0223FFB0 ; =0x02245ED4 + mov r7, #0 + add r4, r5, #0 +_0223FEDC: + ldrh r0, [r6] + add r0, r0, #4 + lsl r0, r0, #0xc + str r0, [sp, #8] + ldrh r0, [r6, #2] + add r0, r0, #6 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + mov r0, #0xa + str r0, [sp, #0x24] + add r0, sp, #0 + bl sub_02021AA0 + mov r1, #0x39 + lsl r1, r1, #6 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + mov r1, #0x28 + bl sub_02021D6C + mov r0, #0x39 + lsl r0, r0, #6 + ldr r0, [r4, r0] + mov r1, #1 + bl sub_02021E80 + add r7, r7, #1 + add r6, r6, #4 + add r4, r4, #4 + cmp r7, #0x1e + blt _0223FEDC + ldr r6, _0223FFB0 ; =0x02245ED4 + mov r7, #0 + add r4, r5, #0 +_0223FF22: + ldrh r0, [r6] + add r0, #0xc + lsl r0, r0, #0xc + str r0, [sp, #8] + ldrh r0, [r6, #2] + add r0, r0, #6 + lsl r0, r0, #0xc + str r0, [sp, #0xc] + mov r0, #0xa + str r0, [sp, #0x24] + add r0, sp, #0 + bl sub_02021AA0 + ldr r1, _0223FFBC ; =0x00000EB8 + str r0, [r4, r1] + add r0, r1, #0 + ldr r0, [r4, r0] + mov r1, #0x2a + bl sub_02021D6C + ldr r0, _0223FFBC ; =0x00000EB8 + mov r1, #1 + ldr r0, [r4, r0] + bl sub_02021E80 + add r7, r7, #1 + add r6, r6, #4 + add r4, r4, #4 + cmp r7, #6 + blt _0223FF22 + ldr r4, _0223FFC0 ; =0x02245E1C + ldr r7, _0223FFC4 ; =0x00000EF4 + mov r6, #0 +_0223FF64: + ldrh r0, [r4] + lsl r0, r0, #0xc + str r0, [sp, #8] + ldrh r0, [r4, #2] + lsl r0, r0, #0xc + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + ldr r1, _0223FFC4 ; =0x00000EF4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, _0223FFC4 ; =0x00000EF4 + add r1, r6, #0 + ldr r0, [r5, r0] + add r1, #0x26 + bl sub_02021D6C + ldr r0, [r5, r7] + mov r1, #1 + bl sub_02021E80 + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #2 + blt _0223FF64 + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_0223FFA8: .word 0x00000D54 +_0223FFAC: .word 0x00000116 +_0223FFB0: .word 0x02245ED4 +_0223FFB4: .word 0x02245ED6 +_0223FFB8: .word 0x00000DC8 +_0223FFBC: .word 0x00000EB8 +_0223FFC0: .word 0x02245E1C +_0223FFC4: .word 0x00000EF4 + thumb_func_end ov94_0223FE24 + + thumb_func_start ov94_0223FFC8 +ov94_0223FFC8: ; 0x0223FFC8 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r7, _0224001C ; =0x00000EF4 + mov r6, #0 + add r4, r5, #0 +_0223FFD2: + ldr r0, [r4, r7] + bl sub_02021BD4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #2 + blt _0223FFD2 + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r5, r0] + bl sub_02021BD4 + mov r7, #0x39 + mov r6, #0 + add r4, r5, #0 + lsl r7, r7, #6 +_0223FFF2: + ldr r0, _02240020 ; =0x00000DC8 + ldr r0, [r4, r0] + bl sub_02021BD4 + ldr r0, [r4, r7] + bl sub_02021BD4 + add r6, r6, #1 + add r4, r4, #4 + cmp r6, #0x1e + blt _0223FFF2 + ldr r6, _02240024 ; =0x00000EB8 + mov r4, #0 +_0224000C: + ldr r0, [r5, r6] + bl sub_02021BD4 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #6 + blt _0224000C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224001C: .word 0x00000EF4 +_02240020: .word 0x00000DC8 +_02240024: .word 0x00000EB8 + thumb_func_end ov94_0223FFC8 + + thumb_func_start ov94_02240028 +ov94_02240028: ; 0x02240028 + push {r3, r4, lr} + sub sp, #0x14 + mov r3, #1 + add r4, r0, #0 + str r3, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + ldr r1, _0224015C ; =0x00000F1C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _0224015C ; =0x00000F1C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r2, #0 + ldr r0, _02240160 ; =0x000F0E00 + str r2, [sp] + str r0, [sp, #4] + ldr r1, _02240164 ; =0x00000BB4 + ldr r0, _0224015C ; =0x00000F1C + ldr r1, [r4, r1] + add r0, r4, r0 + mov r3, #1 + bl ov94_02245900 + mov r1, #3 + str r1, [sp] + mov r0, #0xd + str r0, [sp, #4] + str r1, [sp, #8] + str r0, [sp, #0xc] + mov r0, #0x60 + ldr r1, _02240168 ; =0x00000F2C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #5 + bl sub_0201A7E8 + ldr r0, _02240168 ; =0x00000F2C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + ldr r0, _02240168 ; =0x00000F2C + add r0, r4, r0 + bl sub_0201A954 + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + ldr r1, _0224016C ; =0x00000EFC + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + add r0, #0xfc + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _0224016C ; =0x00000EFC + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02240170 ; =0x0000013F + ldr r1, _02240174 ; =0x0000103C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, _02240174 ; =0x0000103C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #0x15 + str r0, [sp] + mov r0, #6 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + ldr r0, _02240178 ; =0x00000165 + ldr r1, _0224017C ; =0x00000F4C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #1 + mov r3, #0x19 + bl sub_0201A7E8 + ldr r0, _0224017C ; =0x00000F4C + mov r1, #6 + add r0, r4, r0 + bl sub_0201ADA4 + mov r3, #1 + ldr r0, _02240180 ; =0x00010306 + str r3, [sp] + str r0, [sp, #4] + ldr r1, _02240184 ; =0x00000BAC + ldr r0, _0224017C ; =0x00000F4C + ldr r1, [r4, r1] + add r0, r4, r0 + mov r2, #0 + bl ov94_02245900 + mov r1, #0xd + str r1, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #6 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, _02240188 ; =0x00000171 + ldr r1, _0224018C ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + add sp, #0x14 + pop {r3, r4, pc} + nop +_0224015C: .word 0x00000F1C +_02240160: .word 0x000F0E00 +_02240164: .word 0x00000BB4 +_02240168: .word 0x00000F2C +_0224016C: .word 0x00000EFC +_02240170: .word 0x0000013F +_02240174: .word 0x0000103C +_02240178: .word 0x00000165 +_0224017C: .word 0x00000F4C +_02240180: .word 0x00010306 +_02240184: .word 0x00000BAC +_02240188: .word 0x00000171 +_0224018C: .word 0x00000F3C + thumb_func_end ov94_02240028 + + thumb_func_start ov94_02240190 +ov94_02240190: ; 0x02240190 + push {r4, lr} + add r4, r0, #0 + ldr r0, _022401C8 ; =0x0000103C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _022401CC ; =0x00000F4C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _022401D0 ; =0x00000F3C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _022401D4 ; =0x00000EFC + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _022401D8 ; =0x00000F2C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _022401DC ; =0x00000F1C + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + nop +_022401C8: .word 0x0000103C +_022401CC: .word 0x00000F4C +_022401D0: .word 0x00000F3C +_022401D4: .word 0x00000EFC +_022401D8: .word 0x00000F2C +_022401DC: .word 0x00000F1C + thumb_func_end ov94_02240190 + + thumb_func_start ov94_022401E0 +ov94_022401E0: ; 0x022401E0 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x12 + mov r1, #0x3e + bl sub_02023790 + ldr r1, _02240250 ; =0x00000BA8 + str r0, [r4, r1] + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r0, [r4, #0x24] + cmp r0, #5 + bne _02240214 + sub r1, #0x1c + ldr r0, [r4, r1] + mov r1, #0x15 + bl sub_0200B1EC + ldr r1, _02240254 ; =0x00000BB4 + str r0, [r4, r1] + b _02240226 +_02240214: + cmp r0, #6 + bne _02240226 + sub r1, #0x1c + ldr r0, [r4, r1] + mov r1, #0x11 + bl sub_0200B1EC + ldr r1, _02240254 ; =0x00000BB4 + str r0, [r4, r1] +_02240226: + ldr r0, _02240258 ; =0x00000B94 + mov r1, #0x67 + ldr r0, [r4, r0] + bl sub_0200B1EC + ldr r1, _0224025C ; =0x00000BAC + str r0, [r4, r1] + ldr r0, _02240260 ; =0x00000116 + ldrh r1, [r4, r0] + cmp r1, #0x1e + bne _02240240 + mov r1, #0 + strh r1, [r4, r0] +_02240240: + mov r0, #0x3e + mov r1, #0x78 + bl sub_02018144 + ldr r1, _02240264 ; =0x000010A8 + str r0, [r4, r1] + pop {r4, pc} + nop +_02240250: .word 0x00000BA8 +_02240254: .word 0x00000BB4 +_02240258: .word 0x00000B94 +_0224025C: .word 0x00000BAC +_02240260: .word 0x00000116 +_02240264: .word 0x000010A8 + thumb_func_end ov94_022401E0 + + thumb_func_start ov94_02240268 +ov94_02240268: ; 0x02240268 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02240298 ; =0x000010A8 + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r0, _0224029C ; =0x00000BA8 + ldr r0, [r4, r0] + bl sub_020237BC + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _022402A0 ; =0x00000BAC + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _022402A4 ; =0x00000BB4 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 +_02240298: .word 0x000010A8 +_0224029C: .word 0x00000BA8 +_022402A0: .word 0x00000BAC +_022402A4: .word 0x00000BB4 + thumb_func_end ov94_02240268 + + thumb_func_start ov94_022402A8 +ov94_022402A8: ; 0x022402A8 + push {r4, lr} + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _022402B8 + mov r0, #1 + str r0, [r4, #0x2c] +_022402B8: + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_022402A8 + + thumb_func_start ov94_022402BC +ov94_022402BC: ; 0x022402BC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + bl ov94_022404F0 + ldr r0, [r5, #0x24] + cmp r0, #5 + bne _022403CC + ldr r0, _022404E0 ; =0x021BF67C + ldr r2, [r0, #0x48] + mov r0, #2 + tst r0, r2 + beq _022402EC + add r0, r5, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r5, #0x2c] + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + b _022404DA +_022402EC: + mov r1, #1 + add r0, r2, #0 + tst r0, r1 + beq _02240336 + ldr r0, _022404E8 ; =0x00000116 + ldrh r0, [r5, r0] + cmp r0, #0x1e + bne _02240310 + add r0, r5, #0 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r5, #0x2c] + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + b _022404DA +_02240310: + cmp r0, #0x1f + beq _02240336 + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_022412F4 + cmp r0, #1 + beq _02240338 + cmp r0, #2 + beq _022403AE +_02240336: + b _022404DA +_02240338: + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_0224121C + cmp r0, #0 + beq _02240390 + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + add r2, r0, #0 + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_0200B5CC + ldr r0, _022404EC ; =0x00000F0F + mov r3, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x16 + mov r2, #1 + str r3, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #3 + mov r2, #7 + bl ov94_0223C3F4 + b _022404DA +_02240390: + ldr r0, _022404EC ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x1a + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _022404DA +_022403AE: + ldr r0, _022404EC ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x1b + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _022404DA +_022403CC: + cmp r0, #6 + bne _02240432 + ldr r0, _022404E0 ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #2 + tst r0, r1 + beq _022403F0 + add r0, r5, #0 + mov r1, #3 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r5, #0x2c] + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + b _022404DA +_022403F0: + mov r0, #1 + tst r0, r1 + beq _022404DA + ldr r2, _022404E8 ; =0x00000116 + ldrh r3, [r5, r2] + cmp r3, #0x1e + bne _02240414 + add r0, r5, #0 + mov r1, #3 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r5, #0x2c] + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + b _022404DA +_02240414: + cmp r3, #0x1f + beq _022404DA + ldr r1, [r5, #0] + sub r2, r2, #2 + ldr r0, [r1, #8] + ldrh r2, [r5, r2] + ldr r1, [r1, #0xc] + bl ov94_022412F4 + cmp r0, #0 + beq _022404D4 + cmp r0, #1 + beq _02240434 + cmp r0, #2 + beq _022404D4 +_02240432: + b _022404DA +_02240434: + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + mov r2, #0x12 + lsl r2, r2, #4 + mov r1, #0xd1 + ldr r3, [r5, r2] + lsl r1, r1, #2 + add r2, r2, #4 + add r1, r5, r1 + mul r2, r3 + add r1, r1, r2 + add r4, r0, #0 + bl ov94_02241384 + cmp r0, #0 + beq _022404CC + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_0224121C + cmp r0, #0 + beq _022404AE + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + add r2, r4, #0 + bl sub_0200B5CC + ldr r0, _022404EC ; =0x00000F0F + mov r3, #0 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x12 + mov r2, #1 + str r3, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #3 + mov r2, #9 + bl ov94_0223C3F4 + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + b _022404DA +_022404AE: + ldr r0, _022404EC ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x1a + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _022404DA +_022404CC: + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 + b _022404DA +_022404D4: + ldr r0, _022404E4 ; =0x000005DC + bl sub_02005748 +_022404DA: + mov r0, #3 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022404E0: .word 0x021BF67C +_022404E4: .word 0x000005DC +_022404E8: .word 0x00000116 +_022404EC: .word 0x00000F0F + thumb_func_end ov94_022402BC + + thumb_func_start ov94_022404F0 +ov94_022404F0: ; 0x022404F0 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _022405B4 ; =0x021BF67C + mov r4, #0 + ldr r0, [r0, #0x48] + mov r1, #0x40 + add r6, r4, #0 + tst r1, r0 + beq _02240506 + mov r6, #1 + b _02240522 +_02240506: + mov r1, #0x80 + tst r1, r0 + beq _02240510 + mov r6, #2 + b _02240522 +_02240510: + mov r1, #0x20 + tst r1, r0 + beq _0224051A + mov r6, #3 + b _02240522 +_0224051A: + mov r1, #0x10 + tst r0, r1 + beq _02240522 + mov r6, #4 +_02240522: + cmp r6, #0 + beq _02240568 + ldr r0, _022405B8 ; =0x00000116 + ldr r1, _022405BC ; =0x02245F54 + ldrh r3, [r5, r0] + sub r6, r6, #1 + lsl r2, r3, #2 + add r1, r1, r2 + ldrb r2, [r6, r1] + cmp r2, r3 + beq _02240568 + cmp r2, #0x63 + beq _02240540 + cmp r2, #0x65 + bne _02240564 +_02240540: + mov r0, #0x45 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + mov r1, #0x13 + sub r2, #0x64 + bl ov94_022405CC + mov r1, #0x45 + lsl r1, r1, #2 + strh r0, [r5, r1] + ldrh r1, [r5, r1] + add r0, r5, #0 + bl ov94_02240FA0 + ldr r0, _022405C0 ; =0x000005DC + bl sub_02005748 + b _02240568 +_02240564: + mov r4, #1 + strh r2, [r5, r0] +_02240568: + cmp r4, #0 + beq _0224058A + ldr r0, _022405C0 ; =0x000005DC + bl sub_02005748 + ldr r0, _022405B8 ; =0x00000116 + ldr r1, _022405C4 ; =0x02245ED4 + ldrh r0, [r5, r0] + ldr r2, _022405C8 ; =0x02245ED6 + lsl r3, r0, #2 + mov r0, #0x37 + lsl r0, r0, #6 + ldrh r1, [r1, r3] + ldrh r2, [r2, r3] + ldr r0, [r5, r0] + bl ov94_0223C3FC +_0224058A: + ldr r0, _022405B8 ; =0x00000116 + ldrh r0, [r5, r0] + cmp r0, #0x1f + beq _02240596 + cmp r0, #5 + bhi _022405A4 +_02240596: + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #0 + bl sub_02021E80 + pop {r4, r5, r6, pc} +_022405A4: + mov r0, #0x37 + lsl r0, r0, #6 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021E80 + pop {r4, r5, r6, pc} + nop +_022405B4: .word 0x021BF67C +_022405B8: .word 0x00000116 +_022405BC: .word 0x02245F54 +_022405C0: .word 0x000005DC +_022405C4: .word 0x02245ED4 +_022405C8: .word 0x02245ED6 + thumb_func_end ov94_022404F0 + + thumb_func_start ov94_022405CC +ov94_022405CC: ; 0x022405CC + add r0, r0, r2 + bpl _022405D4 + sub r0, r1, #1 + bx lr +_022405D4: + cmp r0, r1 + bne _022405DA + mov r0, #0 +_022405DA: + bx lr + thumb_func_end ov94_022405CC + + thumb_func_start ov94_022405DC +ov94_022405DC: ; 0x022405DC + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0 + add r2, sp, #8 + strb r0, [r2, #8] + mov r0, #1 + strb r0, [r2, #9] + mov r0, #3 + strb r0, [r2, #0xa] + ldrb r3, [r2, #0xb] + mov r1, #0xf + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0x30 + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0xc0 + bic r3, r1 + mov r1, #0x3e + strb r3, [r2, #0xb] + bl sub_02013A04 + ldr r1, _02240678 ; =0x0000106C + mov r2, #0x5e + str r0, [r4, r1] + ldr r0, [r4, r1] + ldr r1, _0224067C ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl sub_02013A4C + ldr r0, _02240678 ; =0x0000106C + ldr r1, _0224067C ; =0x00000B94 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + mov r2, #0x5f + mov r3, #2 + bl sub_02013A4C + ldr r0, _02240678 ; =0x0000106C + ldr r1, _0224067C ; =0x00000B94 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + mov r2, #0x60 + mov r3, #3 + bl sub_02013A4C + ldr r0, _02240678 ; =0x0000106C + mov r1, #1 + ldr r0, [r4, r0] + mov r2, #0x1f + str r0, [sp, #8] + ldr r0, _02240680 ; =0x00000F3C + mov r3, #0xb + add r0, r4, r0 + str r0, [sp, #0xc] + bl sub_0200DC48 + mov r0, #0x3e + str r0, [sp] + mov r0, #2 + mov r2, #0 + str r0, [sp, #4] + add r0, sp, #8 + mov r1, #9 + add r3, r2, #0 + bl sub_02001B7C + ldr r1, _02240684 ; =0x00001074 + str r0, [r4, r1] + mov r0, #8 + str r0, [r4, #0x2c] + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_02240678: .word 0x0000106C +_0224067C: .word 0x00000B94 +_02240680: .word 0x00000F3C +_02240684: .word 0x00001074 + thumb_func_end ov94_022405DC + + thumb_func_start ov94_02240688 +ov94_02240688: ; 0x02240688 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _02240818 ; =0x00001074 + ldr r0, [r5, r0] + bl sub_02001BE0 + cmp r0, #3 + bhi _022406AA + cmp r0, #1 + blo _022406A8 + beq _022406B6 + cmp r0, #2 + beq _022406E2 + cmp r0, #3 + beq _022406B2 +_022406A8: + b _02240810 +_022406AA: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + bne _022406B4 +_022406B2: + b _022407E6 +_022406B4: + b _02240810 +_022406B6: + ldr r0, _02240818 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _0224081C ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02240820 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + mov r0, #2 + str r0, [r5, #0x2c] + add r0, r5, #0 + mov r1, #8 + mov r2, #5 + bl ov94_0223C4C0 + b _02240810 +_022406E2: + ldr r0, _02240818 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _0224081C ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02240820 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + add r4, r0, #0 + bl ov94_0224123C + cmp r0, #0 + beq _0224073A + ldr r0, _02240824 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x25 + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _02240810 +_0224073A: + add r0, r4, #0 + bl ov94_02241278 + cmp r0, #0 + beq _02240762 + ldr r0, _02240824 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0xaa + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _02240810 +_02240762: + add r0, r4, #0 + bl ov94_022412C8 + cmp r0, #0 + beq _0224078A + ldr r0, _02240824 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0xab + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _02240810 +_0224078A: + mov r0, #0x45 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + mov r4, #0 + bl ov94_022411D0 + cmp r0, #0 + beq _022407B8 + ldr r1, _02240828 ; =0x00000116 + ldr r0, [r5, #0] + ldrh r1, [r5, r1] + ldr r0, [r0, #8] + bl sub_0207A0FC + mov r1, #0xa2 + add r2, r4, #0 + bl sub_02074470 + cmp r0, #0 + beq _022407B8 + mov r0, #0xe + mov r4, #1 + str r0, [r5, #0x2c] +_022407B8: + cmp r4, #0 + bne _02240810 + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r5, r1] + mov r0, #2 + str r0, [r5, #0x2c] + add r0, r5, #0 + mov r1, #6 + mov r2, #0 + bl ov94_0223C4C0 + b _02240810 +_022407E6: + ldr r0, _02240818 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _0224081C ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02240820 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _0224082C ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + mov r0, #1 + str r0, [r5, #0x2c] +_02240810: + mov r0, #3 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_02240818: .word 0x00001074 +_0224081C: .word 0x0000106C +_02240820: .word 0x00000F3C +_02240824: .word 0x00000F0F +_02240828: .word 0x00000116 +_0224082C: .word 0x00000EFC + thumb_func_end ov94_02240688 + + thumb_func_start ov94_02240830 +ov94_02240830: ; 0x02240830 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0 + add r2, sp, #8 + strb r0, [r2, #8] + mov r0, #1 + strb r0, [r2, #9] + mov r0, #3 + strb r0, [r2, #0xa] + ldrb r3, [r2, #0xb] + mov r1, #0xf + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0x30 + bic r3, r1 + strb r3, [r2, #0xb] + ldrb r3, [r2, #0xb] + mov r1, #0xc0 + bic r3, r1 + mov r1, #0x3e + strb r3, [r2, #0xb] + bl sub_02013A04 + ldr r1, _022408D8 ; =0x0000106C + mov r2, #0x54 + str r0, [r4, r1] + ldr r0, [r4, r1] + ldr r1, _022408DC ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl sub_02013A4C + ldr r0, _022408D8 ; =0x0000106C + ldr r1, _022408DC ; =0x00000B94 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + mov r2, #0x55 + mov r3, #2 + bl sub_02013A4C + ldr r0, _022408D8 ; =0x0000106C + ldr r1, _022408DC ; =0x00000B94 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + mov r2, #0x56 + mov r3, #3 + bl sub_02013A4C + ldr r0, _022408D8 ; =0x0000106C + mov r1, #0xf + ldr r0, [r4, r0] + str r0, [sp, #8] + ldr r0, _022408E0 ; =0x00000F3C + add r0, r4, r0 + str r0, [sp, #0xc] + bl sub_0201ADA4 + ldr r0, _022408E0 ; =0x00000F3C + mov r1, #1 + add r0, r4, r0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + mov r0, #0x3e + str r0, [sp] + mov r0, #2 + mov r2, #0 + str r0, [sp, #4] + add r0, sp, #8 + mov r1, #9 + add r3, r2, #0 + bl sub_02001B7C + ldr r1, _022408E4 ; =0x00001074 + str r0, [r4, r1] + mov r0, #0xa + str r0, [r4, #0x2c] + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + nop +_022408D8: .word 0x0000106C +_022408DC: .word 0x00000B94 +_022408E0: .word 0x00000F3C +_022408E4: .word 0x00001074 + thumb_func_end ov94_02240830 + + thumb_func_start ov94_022408E8 +ov94_022408E8: ; 0x022408E8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, _02240A54 ; =0x00001074 + ldr r0, [r5, r0] + bl sub_02001BE0 + cmp r0, #3 + bhi _0224090A + cmp r0, #1 + blo _02240908 + beq _02240916 + cmp r0, #2 + beq _02240942 + cmp r0, #3 + beq _02240912 +_02240908: + b _02240A4E +_0224090A: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + bne _02240914 +_02240912: + b _02240A24 +_02240914: + b _02240A4E +_02240916: + ldr r0, _02240A54 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _02240A58 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02240A5C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + mov r0, #2 + str r0, [r5, #0x2c] + add r0, r5, #0 + mov r1, #8 + mov r2, #6 + bl ov94_0223C4C0 + b _02240A4E +_02240942: + ldr r0, _02240A54 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _02240A58 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02240A5C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r5, #0] + ldrh r2, [r5, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r5, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + add r4, r0, #0 + bl ov94_0224123C + cmp r0, #0 + beq _0224099A + ldr r0, _02240A60 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0x25 + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _02240A4E +_0224099A: + add r0, r4, #0 + bl ov94_02241278 + cmp r0, #0 + beq _022409C2 + ldr r0, _02240A60 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0xaa + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _02240A4E +_022409C2: + add r0, r4, #0 + bl ov94_022412C8 + cmp r0, #0 + beq _022409EA + ldr r0, _02240A60 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + mov r1, #0xab + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r5, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + b _02240A4E +_022409EA: + mov r0, #0x45 + lsl r0, r0, #2 + ldrh r0, [r5, r0] + mov r4, #0 + bl ov94_022411D0 + cmp r0, #0 + beq _02240A18 + ldr r1, _02240A64 ; =0x00000116 + ldr r0, [r5, #0] + ldrh r1, [r5, r1] + ldr r0, [r0, #8] + bl sub_0207A0FC + mov r1, #0xa2 + add r2, r4, #0 + bl sub_02074470 + cmp r0, #0 + beq _02240A18 + mov r0, #0xb + mov r4, #1 + str r0, [r5, #0x2c] +_02240A18: + cmp r4, #0 + bne _02240A4E + add r0, r5, #0 + bl ov94_02240BB0 + b _02240A4E +_02240A24: + ldr r0, _02240A54 ; =0x00001074 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02001BC4 + ldr r0, _02240A58 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02240A5C ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _02240A68 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + mov r0, #1 + str r0, [r5, #0x2c] +_02240A4E: + mov r0, #3 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02240A54: .word 0x00001074 +_02240A58: .word 0x0000106C +_02240A5C: .word 0x00000F3C +_02240A60: .word 0x00000F0F +_02240A64: .word 0x00000116 +_02240A68: .word 0x00000EFC + thumb_func_end ov94_022408E8 + + thumb_func_start ov94_02240A6C +ov94_02240A6C: ; 0x02240A6C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + beq _02240A7C + cmp r0, #8 + bne _02240A9C +_02240A7C: + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, _02240AC0 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + b _02240AB4 +_02240A9C: + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 +_02240AB4: + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + nop +_02240AC0: .word 0x000010B0 + thumb_func_end ov94_02240A6C + + thumb_func_start ov94_02240AC4 +ov94_02240AC4: ; 0x02240AC4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _02240AE0 ; =0x000001AD + mov r1, #0xf + bl ov94_0223C3C0 + ldr r1, _02240AE4 ; =0x00001070 + str r0, [r4, r1] + mov r0, #6 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_02240AE0: .word 0x000001AD +_02240AE4: .word 0x00001070 + thumb_func_end ov94_02240AC4 + + thumb_func_start ov94_02240AE8 +ov94_02240AE8: ; 0x02240AE8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02240B1C ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02240B18 + sub r1, r1, #1 + cmp r0, r1 + bne _02240B0A + mov r0, #0 + str r0, [r4, #0x2c] + b _02240B18 +_02240B0A: + mov r0, #2 + mov r1, #0 + str r0, [r4, #0x2c] + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 +_02240B18: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02240B1C: .word 0x00001070 + thumb_func_end ov94_02240AE8 + + thumb_func_start ov94_02240B20 +ov94_02240B20: ; 0x02240B20 + push {r4, lr} + sub sp, #8 + ldr r1, _02240B48 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r2, #1 + mov r1, #0x19 + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r4, #0 + mov r1, #3 + mov r2, #0xc + bl ov94_0223C3F4 + mov r0, #3 + add sp, #8 + pop {r4, pc} + nop +_02240B48: .word 0x00000F0F + thumb_func_end ov94_02240B20 + + thumb_func_start ov94_02240B4C +ov94_02240B4C: ; 0x02240B4C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _02240B68 ; =0x000001AD + mov r1, #0xd + bl ov94_0223C3C0 + ldr r1, _02240B6C ; =0x00001070 + str r0, [r4, r1] + mov r0, #0xd + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_02240B68: .word 0x000001AD +_02240B6C: .word 0x00001070 + thumb_func_end ov94_02240B4C + + thumb_func_start ov94_02240B70 +ov94_02240B70: ; 0x02240B70 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02240BA8 ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02240BA2 + sub r1, r1, #1 + cmp r0, r1 + bne _02240B9C + ldr r0, _02240BAC ; =0x0000103C + mov r1, #0 + add r0, r4, r0 + bl sub_0200E084 + mov r0, #1 + str r0, [r4, #0x2c] + b _02240BA2 +_02240B9C: + add r0, r4, #0 + bl ov94_02240BB0 +_02240BA2: + mov r0, #3 + pop {r4, pc} + nop +_02240BA8: .word 0x00001070 +_02240BAC: .word 0x0000103C + thumb_func_end ov94_02240B70 + + thumb_func_start ov94_02240BB0 +ov94_02240BB0: ; 0x02240BB0 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + mov r0, #0x95 + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, r0, #4 + mul r0, r1 + add r0, r2, r0 + bl ov94_02241498 + cmp r0, #0 + beq _02240C08 + mov r0, #0x45 + lsl r0, r0, #2 + ldrh r0, [r4, r0] + cmp r0, #0x12 + beq _02240C08 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + cmp r0, #6 + bne _02240C08 + ldr r0, _02240C50 ; =0x00000F0F + mov r2, #1 + str r0, [sp] + add r0, r4, #0 + mov r1, #0x1c + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r4, #0 + mov r1, #4 + mov r2, #1 + bl ov94_0223C3F4 + add sp, #8 + mov r0, #0 + pop {r4, pc} +_02240C08: + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r4, #0] + ldrh r2, [r4, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r4, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #2 + str r0, [r4, #0x2c] + ldr r0, _02240C54 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #7 + mov r2, #9 + bl ov94_0223C4C0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r4, #0 + bl ov94_022413BC + mov r0, #0x47 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #1 + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_02240C50: .word 0x00000F0F +_02240C54: .word 0x000010B0 + thumb_func_end ov94_02240BB0 + + thumb_func_start ov94_02240C58 +ov94_02240C58: ; 0x02240C58 + push {r4, lr} + sub sp, #8 + ldr r1, _02240C80 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r2, #1 + mov r1, #0x19 + mov r3, #0 + str r2, [sp, #4] + bl ov94_02240D58 + add r0, r4, #0 + mov r1, #3 + mov r2, #0xf + bl ov94_0223C3F4 + mov r0, #3 + add sp, #8 + pop {r4, pc} + nop +_02240C80: .word 0x00000F0F + thumb_func_end ov94_02240C58 + + thumb_func_start ov94_02240C84 +ov94_02240C84: ; 0x02240C84 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _02240CA0 ; =0x000001AD + mov r1, #0xd + bl ov94_0223C3C0 + ldr r1, _02240CA4 ; =0x00001070 + str r0, [r4, r1] + mov r0, #0x10 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_02240CA0: .word 0x000001AD +_02240CA4: .word 0x00001070 + thumb_func_end ov94_02240C84 + + thumb_func_start ov94_02240CA8 +ov94_02240CA8: ; 0x02240CA8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02240D00 ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02240CFC + sub r1, r1, #1 + cmp r0, r1 + bne _02240CD4 + ldr r0, _02240D04 ; =0x0000103C + mov r1, #0 + add r0, r4, r0 + bl sub_0200E084 + mov r0, #1 + str r0, [r4, #0x2c] + b _02240CFC +_02240CD4: + mov r3, #0x45 + lsl r3, r3, #2 + ldr r1, [r4, #0] + ldrh r2, [r4, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r4, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + mov r1, #0x46 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #2 + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + bl ov94_0223C4C0 +_02240CFC: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02240D00: .word 0x00001070 +_02240D04: .word 0x0000103C + thumb_func_end ov94_02240CA8 + + thumb_func_start ov94_02240D08 +ov94_02240D08: ; 0x02240D08 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02240D24 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02240D20 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_02240D20: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02240D24: .word 0x00000BE4 + thumb_func_end ov94_02240D08 + + thumb_func_start ov94_02240D28 +ov94_02240D28: ; 0x02240D28 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02240D50 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02240D4A + ldr r0, _02240D54 ; =0x0000103C + mov r1, #0 + add r0, r4, r0 + bl sub_0200E084 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_02240D4A: + mov r0, #3 + pop {r4, pc} + nop +_02240D50: .word 0x00000BE4 +_02240D54: .word 0x0000103C + thumb_func_end ov94_02240D28 + + thumb_func_start ov94_02240D58 +ov94_02240D58: ; 0x02240D58 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _02240DC0 ; =0x00000B94 + add r6, r2, #0 + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0xb9 + add r7, r0, #0 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, #0x20 + ldr r1, [r5, r1] + add r2, r7, #0 + bl sub_0200C388 + ldr r0, [sp, #0x24] + cmp r0, #0 + bne _02240D84 + ldr r0, _02240DC4 ; =0x00000EFC + b _02240D86 +_02240D84: + ldr r0, _02240DC8 ; =0x0000103C +_02240D86: + add r4, r5, r0 + add r0, r4, #0 + mov r1, #0xf + bl sub_0201ADA4 + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r6, [sp, #4] + mov r2, #0xbb + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r4, #0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _02240DCC ; =0x00000BE4 + str r0, [r5, r1] + add r0, r7, #0 + bl sub_020237BC + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02240DC0: .word 0x00000B94 +_02240DC4: .word 0x00000EFC +_02240DC8: .word 0x0000103C +_02240DCC: .word 0x00000BE4 + thumb_func_end ov94_02240D58 + + thumb_func_start ov94_02240DD0 +ov94_02240DD0: ; 0x02240DD0 + push {r3, r4, r5, lr} + add r5, r2, #0 + add r2, r3, #0 + bl sub_02006CB8 + add r4, r0, #0 + beq _02240DF2 + add r1, r5, #0 + bl sub_020A7164 + cmp r0, #0 + bne _02240DF2 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #0 + pop {r3, r4, r5, pc} +_02240DF2: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov94_02240DD0 + + thumb_func_start ov94_02240DF8 +ov94_02240DF8: ; 0x02240DF8 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + add r5, r1, #0 + add r6, r2, #0 + add r1, r6, #0 + add r2, r5, #0 + str r0, [sp] + add r7, r3, #0 + ldr r4, [sp, #0x28] + bl sub_02079D8C + add r1, r0, #0 + ldr r0, [sp, #0x24] + add r2, sp, #8 + mov r3, #0x3e + bl ov94_02240DD0 + str r0, [sp, #4] + ldr r0, [sp, #8] + add r1, r4, #0 + mov r2, #2 + ldr r0, [r0, #0x14] + add r1, #0xc + lsl r2, r2, #8 + bl sub_020C4C14 + lsl r0, r7, #4 + add r0, #0xc + lsl r0, r0, #5 + str r0, [r4, #0] + ldr r0, [sp, #0x20] + add r1, r5, #0 + str r0, [r4, #8] + ldr r0, [sp] + add r2, r6, #0 + bl sub_02079EDC + add r0, r0, #3 + str r0, [r4, #4] + ldr r0, [sp, #4] + bl sub_020181C4 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + thumb_func_end ov94_02240DF8 + + thumb_func_start ov94_02240E50 +ov94_02240E50: ; 0x02240E50 + push {r4, lr} + add r4, r1, #0 + bl sub_02075B40 + strb r0, [r4, #3] + pop {r4, pc} + thumb_func_end ov94_02240E50 + + thumb_func_start ov94_02240E5C +ov94_02240E5C: ; 0x02240E5C + push {r3, r4, r5, r6, r7, lr} + ldr r1, _02240EA8 ; =0x000010B4 + mov r6, #2 + lsl r6, r6, #8 + add r7, r6, #0 + ldr r5, [r0, r1] + str r0, [sp] + mov r4, #0 + add r7, #0xc +_02240E6E: + ldr r0, [r5, #8] + cmp r0, #0 + beq _02240E92 + add r0, r5, #0 + add r0, #0xc + add r1, r6, #0 + bl sub_020C2C54 + add r0, r5, #0 + ldr r1, [r5, #0] + add r0, #0xc + add r2, r6, #0 + bl sub_020C02BC + ldr r0, [r5, #8] + ldr r1, [r5, #4] + bl sub_02021E90 +_02240E92: + add r4, r4, #1 + add r5, r5, r7 + cmp r4, #0x1e + blt _02240E6E + ldr r1, _02240EA8 ; =0x000010B4 + ldr r0, [sp] + ldr r0, [r0, r1] + bl sub_020181C4 + pop {r3, r4, r5, r6, r7, pc} + nop +_02240EA8: .word 0x000010B4 + thumb_func_end ov94_02240E5C + + thumb_func_start ov94_02240EAC +ov94_02240EAC: ; 0x02240EAC + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + str r1, [sp, #0xc] + add r7, r2, #0 + add r6, r3, #0 + ldr r4, [sp, #0x40] + bl sub_02073D20 + add r0, r5, #0 + mov r1, #0xac + mov r2, #0 + bl sub_02074570 + str r0, [sp, #0x1c] + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + strh r0, [r6] + add r0, r5, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + str r0, [sp, #0x10] + add r0, r5, #0 + mov r1, #0x4c + mov r2, #0 + bl sub_02074570 + str r0, [sp, #0x14] + add r0, r5, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074570 + str r0, [sp, #0x18] + ldrh r0, [r6] + mov r1, #0x6f + mov r2, #0 + strh r0, [r4] + add r0, r5, #0 + bl sub_02074570 + add r0, r0, #1 + strb r0, [r4, #2] + ldr r0, [sp, #0x14] + cmp r0, #0 + beq _02240F16 + mov r0, #0 + strb r0, [r4, #3] +_02240F16: + add r0, r5, #0 + mov r1, #1 + bl sub_02073D48 + ldr r0, [sp, #0x1c] + cmp r0, #0 + beq _02240F84 + ldr r0, [sp, #0xc] + ldr r1, [sp, #0x10] + str r0, [sp] + ldr r0, [sp, #0x3c] + ldr r2, [sp, #0x14] + str r0, [sp, #4] + ldr r0, [sp, #0x44] + ldr r3, [sp, #0x38] + str r0, [sp, #8] + ldrh r0, [r6] + bl ov94_02240DF8 + ldr r0, [sp, #0xc] + mov r1, #1 + bl sub_02021CAC + ldr r0, [sp, #0x18] + cmp r0, #0 + beq _02240F78 + add r0, r7, #0 + mov r1, #1 + bl sub_02021CAC + ldr r0, [sp, #0x18] + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _02240F6C + add r0, r7, #0 + mov r1, #0x29 + bl sub_02021D6C + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_02240F6C: + add r0, r7, #0 + mov r1, #0x28 + bl sub_02021D6C + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_02240F78: + add r0, r7, #0 + mov r1, #0 + bl sub_02021CAC + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} +_02240F84: + ldr r0, [sp, #0xc] + mov r1, #0 + bl sub_02021CAC + add r0, r7, #0 + mov r1, #0 + bl sub_02021CAC + ldr r0, [sp, #0x44] + mov r1, #0 + str r1, [r0, #8] + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov94_02240EAC + + thumb_func_start ov94_02240FA0 +ov94_02240FA0: ; 0x02240FA0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x68 + add r5, r0, #0 + ldr r0, [r5, #0] + str r1, [sp, #0x10] + ldr r0, [r0, #0xc] + ldr r1, _022411A4 ; =0x00003D68 + str r0, [sp, #0x20] + mov r0, #3 + bl sub_02018184 + ldr r1, _022411A8 ; =0x000010B4 + str r0, [sp, #0x18] + str r0, [r5, r1] + mov r0, #0x13 + mov r1, #0x3e + bl sub_02006C24 + str r0, [sp, #0x1c] + ldr r0, [sp, #0x10] + cmp r0, #0 + blt _02241060 + cmp r0, #0x12 + bge _02241060 + ldr r6, _022411AC ; =0x000010A8 + mov r4, #0 +_02240FD4: + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x10] + add r2, r4, #0 + bl sub_02079C9C + ldr r2, [r5, r6] + lsl r1, r4, #2 + add r1, r2, r1 + bl ov94_02240E50 + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x1e + blo _02240FD4 + mov r4, #0 +_02240FF4: + ldr r0, _022411AC ; =0x000010A8 + lsl r6, r4, #2 + ldr r1, [r5, r0] + mov r0, #0 + strh r0, [r1, r6] + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x10] + add r2, r4, #0 + add r7, r5, r6 + bl sub_02079C9C + ldr r1, [sp, #0x1c] + str r4, [sp] + str r1, [sp, #4] + ldr r1, _022411AC ; =0x000010A8 + add r2, r4, #0 + ldr r1, [r5, r1] + add r3, sp, #0x2c + add r1, r1, r6 + str r1, [sp, #8] + mov r1, #0x83 + lsl r1, r1, #2 + mul r2, r1 + ldr r1, [sp, #0x18] + lsl r6, r4, #1 + add r1, r1, r2 + str r1, [sp, #0xc] + ldr r1, _022411B0 ; =0x00000DC8 + mov r2, #0x39 + lsl r2, r2, #6 + ldr r1, [r7, r1] + ldr r2, [r7, r2] + add r3, r3, r6 + bl ov94_02240EAC + cmp r4, #6 + bhs _02241048 + ldr r0, _022411B4 ; =0x00000EB8 + mov r1, #0 + ldr r0, [r7, r0] + bl sub_02021CAC +_02241048: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x1e + blo _02240FF4 + ldr r2, _022411B8 ; =0x00000BA8 + ldr r0, [sp, #0x20] + ldr r1, [sp, #0x10] + ldr r2, [r5, r2] + bl sub_02079AF4 + b _0224114C +_02241060: + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + mov r4, #0 + str r0, [sp, #0x14] + cmp r0, #0 + ble _022410F0 +_02241070: + ldr r0, [r5, #0] + add r1, r4, #0 + ldr r0, [r0, #8] + bl sub_0207A0FC + str r0, [sp, #0x24] + bl sub_02076B10 + ldr r1, _022411AC ; =0x000010A8 + lsl r6, r4, #2 + ldr r1, [r5, r1] + str r0, [sp, #0x28] + add r1, r1, r6 + bl ov94_02240E50 + mov r2, #0x39 + ldr r0, [sp, #0x1c] + str r4, [sp] + str r0, [sp, #4] + ldr r0, _022411AC ; =0x000010A8 + add r1, r4, #0 + ldr r0, [r5, r0] + add r7, r5, r6 + add r0, r0, r6 + str r0, [sp, #8] + mov r0, #0x83 + lsl r0, r0, #2 + mul r1, r0 + ldr r0, [sp, #0x18] + lsl r2, r2, #6 + add r0, r0, r1 + str r0, [sp, #0xc] + ldr r1, _022411B0 ; =0x00000DC8 + ldr r0, [sp, #0x28] + ldr r1, [r7, r1] + ldr r2, [r7, r2] + lsl r6, r4, #1 + add r3, sp, #0x2c + add r3, r3, r6 + bl ov94_02240EAC + ldr r0, [sp, #0x24] + mov r1, #0xa2 + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + ldr r0, _022411B4 ; =0x00000EB8 + beq _022410DC + ldr r0, [r7, r0] + mov r1, #1 + bl sub_02021CAC + b _022410E4 +_022410DC: + ldr r0, [r7, r0] + mov r1, #0 + bl sub_02021CAC +_022410E4: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + ldr r0, [sp, #0x14] + cmp r4, r0 + blt _02241070 +_022410F0: + cmp r4, #0x1e + bhs _0224113E + mov r7, #0 +_022410F6: + ldr r0, _022411AC ; =0x000010A8 + lsl r1, r4, #2 + ldr r0, [r5, r0] + add r6, r5, r1 + strh r7, [r0, r1] + ldr r0, _022411B0 ; =0x00000DC8 + add r1, r7, #0 + ldr r0, [r6, r0] + bl sub_02021CAC + mov r0, #0x39 + lsl r0, r0, #6 + ldr r0, [r6, r0] + mov r1, #0 + bl sub_02021CAC + mov r0, #0x83 + lsl r0, r0, #2 + add r1, r4, #0 + mul r1, r0 + ldr r0, [sp, #0x18] + add r1, r0, r1 + mov r0, #0 + str r0, [r1, #8] + cmp r4, #6 + bhs _02241134 + ldr r0, _022411B4 ; =0x00000EB8 + mov r1, #0 + ldr r0, [r6, r0] + bl sub_02021CAC +_02241134: + add r0, r4, #1 + lsl r0, r0, #0x10 + lsr r4, r0, #0x10 + cmp r4, #0x1e + blo _022410F6 +_0224113E: + ldr r2, _022411BC ; =0x00000B94 + mov r1, #0x59 + ldr r0, [r5, r2] + add r2, #0x14 + ldr r2, [r5, r2] + bl sub_0200B1B8 +_0224114C: + ldr r0, [sp, #0x1c] + bl sub_02006CA8 + ldr r0, _022411C0 ; =0x00000F2C + mov r1, #0 + add r0, r5, r0 + bl sub_0201ADA4 + mov r0, #1 + str r0, [sp] + ldr r0, _022411C4 ; =0x00010200 + ldr r1, _022411B8 ; =0x00000BA8 + str r0, [sp, #4] + ldr r0, _022411C0 ; =0x00000F2C + ldr r1, [r5, r1] + add r0, r5, r0 + mov r2, #0 + mov r3, #5 + bl ov94_02245900 + ldr r0, [r5, #0x24] + cmp r0, #6 + bne _0224119A + mov r3, #0x12 + lsl r3, r3, #4 + mov r2, #0xd1 + ldr r4, [r5, r3] + ldr r0, _022411AC ; =0x000010A8 + lsl r2, r2, #2 + add r3, r3, #4 + ldr r1, _022411B0 ; =0x00000DC8 + add r2, r5, r2 + mul r3, r4 + add r2, r2, r3 + ldr r0, [r5, r0] + ldr r3, [sp, #0x18] + add r1, r5, r1 + bl ov94_02241464 +_0224119A: + ldr r1, _022411C8 ; =ov94_02240E5C + ldr r0, _022411CC ; =0x000010B8 + str r1, [r5, r0] + add sp, #0x68 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022411A4: .word 0x00003D68 +_022411A8: .word 0x000010B4 +_022411AC: .word 0x000010A8 +_022411B0: .word 0x00000DC8 +_022411B4: .word 0x00000EB8 +_022411B8: .word 0x00000BA8 +_022411BC: .word 0x00000B94 +_022411C0: .word 0x00000F2C +_022411C4: .word 0x00010200 +_022411C8: .word ov94_02240E5C +_022411CC: .word 0x000010B8 + thumb_func_end ov94_02240FA0 + + thumb_func_start ov94_022411D0 +ov94_022411D0: ; 0x022411D0 + cmp r0, #0x12 + bne _022411D8 + mov r0, #1 + bx lr +_022411D8: + mov r0, #0 + bx lr + thumb_func_end ov94_022411D0 + + thumb_func_start ov94_022411DC +ov94_022411DC: ; 0x022411DC + push {r3, r4, r5, r6, r7, lr} + add r6, r2, #0 + add r5, r0, #0 + add r0, r6, #0 + add r7, r1, #0 + add r4, r3, #0 + bl ov94_022411D0 + cmp r0, #0 + beq _0224120E + add r0, r5, #0 + bl sub_0207A0F8 + sub r0, r0, #1 + cmp r4, r0 + ble _02241200 + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} +_02241200: + add r0, r5, #0 + add r1, r4, #0 + bl sub_0207A0FC + bl sub_02076B10 + pop {r3, r4, r5, r6, r7, pc} +_0224120E: + add r0, r7, #0 + add r1, r6, #0 + add r2, r4, #0 + bl sub_02079C9C + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov94_022411DC + + thumb_func_start ov94_0224121C +ov94_0224121C: ; 0x0224121C + push {r4, lr} + add r4, r0, #0 + add r0, r2, #0 + bl ov94_022411D0 + cmp r0, #0 + beq _02241238 + add r0, r4, #0 + bl sub_0207A0F8 + cmp r0, #2 + bge _02241238 + mov r0, #0 + pop {r4, pc} +_02241238: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov94_0224121C + + thumb_func_start ov94_0224123C +ov94_0224123C: ; 0x0224123C + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + mov r4, #0 + bl sub_02073D20 + ldr r5, _02241274 ; =0x02245E34 + str r0, [sp] + add r6, r4, #0 +_0224124C: + ldrh r1, [r5] + add r0, r7, #0 + mov r2, #0 + bl sub_02074570 + add r6, r6, #1 + add r4, r4, r0 + add r5, r5, #2 + cmp r6, #0xa + blt _0224124C + ldr r1, [sp] + add r0, r7, #0 + bl sub_02073D48 + cmp r4, #0 + beq _02241270 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_02241270: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241274: .word 0x02245E34 + thumb_func_end ov94_0224123C + + thumb_func_start ov94_02241278 +ov94_02241278: ; 0x02241278 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + bl sub_02073D20 + add r7, r0, #0 + add r0, r5, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + add r6, r0, #0 + add r0, r5, #0 + add r1, r7, #0 + bl sub_02073D48 + cmp r6, #0 + ble _022412BE + ldr r1, _022412C4 ; =0x000001DF + cmp r4, r1 + beq _022412BA + add r0, r1, #0 + add r0, #8 + cmp r4, r0 + beq _022412BA + add r1, #0xd + cmp r4, r1 + bne _022412BE +_022412BA: + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_022412BE: + mov r0, #0 + pop {r3, r4, r5, r6, r7, pc} + nop +_022412C4: .word 0x000001DF + thumb_func_end ov94_02241278 + + thumb_func_start ov94_022412C8 +ov94_022412C8: ; 0x022412C8 + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_02073D20 + add r6, r0, #0 + add r0, r5, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074570 + add r4, r0, #0 + add r0, r5, #0 + add r1, r6, #0 + bl sub_02073D48 + cmp r4, #0x70 + bne _022412EE + mov r0, #1 + pop {r4, r5, r6, pc} +_022412EE: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov94_022412C8 + + thumb_func_start ov94_022412F4 +ov94_022412F4: ; 0x022412F4 + push {r4, lr} + bl ov94_022411DC + add r4, r0, #0 + bne _02241302 + mov r0, #0 + pop {r4, pc} +_02241302: + mov r1, #0xac + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _02241312 + mov r0, #0 + pop {r4, pc} +_02241312: + add r0, r4, #0 + mov r1, #0xad + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + beq _02241324 + mov r0, #2 + pop {r4, pc} +_02241324: + mov r0, #1 + pop {r4, pc} + thumb_func_end ov94_022412F4 + + thumb_func_start ov94_02241328 +ov94_02241328: ; 0x02241328 + push {r3, r4} + mov r4, #0 + ldrsh r3, [r0, r4] + ldrsh r2, [r1, r4] + cmp r3, r2 + beq _0224133A + add r0, r4, #0 + pop {r3, r4} + bx lr +_0224133A: + mov r2, #2 + ldrsb r3, [r1, r2] + cmp r3, #3 + beq _0224134E + ldrsb r2, [r0, r2] + cmp r3, r2 + beq _0224134E + add r0, r4, #0 + pop {r3, r4} + bx lr +_0224134E: + mov r2, #3 + ldrsb r3, [r0, r2] + cmp r3, #0 + bne _0224135C + mov r0, #0 + pop {r3, r4} + bx lr +_0224135C: + ldrsb r0, [r1, r2] + cmp r0, #0 + beq _0224136C + cmp r0, r3 + ble _0224136C + mov r0, #0 + pop {r3, r4} + bx lr +_0224136C: + mov r0, #4 + ldrsb r0, [r1, r0] + cmp r0, #0 + beq _0224137E + cmp r0, r3 + bge _0224137E + mov r0, #0 + pop {r3, r4} + bx lr +_0224137E: + mov r0, #1 + pop {r3, r4} + bx lr + thumb_func_end ov94_02241328 + + thumb_func_start ov94_02241384 +ov94_02241384: ; 0x02241384 + push {r3, r4, r5, lr} + add r4, r1, #0 + mov r1, #5 + mov r2, #0 + add r5, r0, #0 + bl sub_02074570 + add r1, sp, #0 + strh r0, [r1] + add r0, r5, #0 + mov r1, #0x6f + mov r2, #0 + bl sub_02074570 + add r1, r0, #1 + add r0, sp, #0 + strb r1, [r0, #2] + add r0, r5, #0 + bl sub_02075B40 + add r1, sp, #0 + strb r0, [r1, #3] + add r0, sp, #0 + add r1, r4, #0 + bl ov94_02241328 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov94_02241384 + + thumb_func_start ov94_022413BC +ov94_022413BC: ; 0x022413BC + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + mov r0, #0x46 + add r5, r1, #0 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + add r1, sp, #0 + strh r0, [r1, #6] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + mov r1, #0x6f + mov r2, #0 + bl sub_02074570 + add r1, r0, #1 + add r0, sp, #0 + strb r1, [r0, #8] + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r5, r0] + bl sub_02075B40 + add r1, sp, #0 + strb r0, [r1, #9] + add r0, r4, #0 + ldrh r2, [r1, #6] + add r0, #0xec + strh r2, [r0] + add r0, r4, #0 + ldrh r1, [r1, #8] + add r0, #0xee + strh r1, [r0] + add r0, r4, #0 + add r1, r5, #0 + bl ov94_022425A8 + mov r0, #0x95 + lsl r0, r0, #2 + add r2, r5, r0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r5, r0] + add r0, r0, #4 + mul r0, r1 + add r0, r2, r0 + bl sub_02076B10 + mov r1, #5 + mov r2, #0 + add r5, r0, #0 + bl sub_02074570 + add r1, sp, #0 + strh r0, [r1] + add r0, r5, #0 + mov r1, #0x6f + mov r2, #0 + bl sub_02074570 + add r0, r0, #1 + add r1, sp, #0 + strb r0, [r1, #2] + mov r0, #0 + strb r0, [r1, #3] + strb r0, [r1, #4] + add r0, r4, #0 + ldrh r2, [r1] + add r0, #0xf0 + strh r2, [r0] + add r0, r4, #0 + ldrh r2, [r1, #2] + add r0, #0xf2 + add r4, #0xf4 + strh r2, [r0] + ldrh r0, [r1, #4] + strh r0, [r4] + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov94_022413BC + + thumb_func_start ov94_02241464 +ov94_02241464: ; 0x02241464 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r7, r2, #0 + add r4, r3, #0 + mov r6, #0 +_0224146E: + mov r0, #0 + ldrsh r0, [r5, r0] + cmp r0, #0 + beq _02241488 + add r0, r5, #0 + add r1, r7, #0 + bl ov94_02241328 + cmp r0, #0 + bne _02241488 + ldr r0, [r4, #4] + add r0, r0, #3 + str r0, [r4, #4] +_02241488: + mov r0, #0x83 + lsl r0, r0, #2 + add r6, r6, #1 + add r5, r5, #4 + add r4, r4, r0 + cmp r6, #0x1e + blt _0224146E + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov94_02241464 + + thumb_func_start ov94_02241498 +ov94_02241498: ; 0x02241498 + push {r3, lr} + mov r1, #6 + mov r2, #0 + bl sub_02074470 + lsl r0, r0, #0x10 + lsr r0, r0, #0x10 + bl sub_0207D2D0 + cmp r0, #0 + beq _022414B2 + mov r0, #1 + pop {r3, pc} +_022414B2: + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov94_02241498 + + .rodata + + + .global Unk_ov94_02245E1C +Unk_ov94_02245E1C: ; 0x02245E1C + .incbin "incbin/overlay94_rodata.bin", 0x424, 0x42C - 0x424 + + .global Unk_ov94_02245E24 +Unk_ov94_02245E24: ; 0x02245E24 + .incbin "incbin/overlay94_rodata.bin", 0x42C, 0x43C - 0x42C + + .global Unk_ov94_02245E34 +Unk_ov94_02245E34: ; 0x02245E34 + .incbin "incbin/overlay94_rodata.bin", 0x43C, 0x450 - 0x43C + + .global Unk_ov94_02245E48 +Unk_ov94_02245E48: ; 0x02245E48 + .incbin "incbin/overlay94_rodata.bin", 0x450, 0x46C - 0x450 + + .global Unk_ov94_02245E64 +Unk_ov94_02245E64: ; 0x02245E64 + .incbin "incbin/overlay94_rodata.bin", 0x46C, 0x488 - 0x46C + + .global Unk_ov94_02245E80 +Unk_ov94_02245E80: ; 0x02245E80 + .incbin "incbin/overlay94_rodata.bin", 0x488, 0x4A4 - 0x488 + + .global Unk_ov94_02245E9C +Unk_ov94_02245E9C: ; 0x02245E9C + .incbin "incbin/overlay94_rodata.bin", 0x4A4, 0x4C0 - 0x4A4 + + .global Unk_ov94_02245EB8 +Unk_ov94_02245EB8: ; 0x02245EB8 + .incbin "incbin/overlay94_rodata.bin", 0x4C0, 0x4DC - 0x4C0 + + .global Unk_ov94_02245ED4 +Unk_ov94_02245ED4: ; 0x02245ED4 + .incbin "incbin/overlay94_rodata.bin", 0x4DC, 0x55C - 0x4DC + + .global Unk_ov94_02245F54 +Unk_ov94_02245F54: ; 0x02245F54 + .incbin "incbin/overlay94_rodata.bin", 0x55C, 0x80 + + + .data + + + .global Unk_ov94_022468DC +Unk_ov94_022468DC: ; 0x022468DC + .incbin "incbin/overlay94_data.bin", 0x4DC, 0x44 + diff --git a/asm/ov94_022414B8.s b/asm/ov94_022414B8.s new file mode 100644 index 000000000..339c1a04d --- /dev/null +++ b/asm/ov94_022414B8.s @@ -0,0 +1,2838 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_022414B8 +ov94_022414B8: ; 0x022414B8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_022418B8 + ldr r0, [r4, #4] + bl ov94_022415F8 + add r0, r4, #0 + bl ov94_0224170C + add r0, r4, #0 + bl ov94_022417A0 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + add r0, r4, #0 + bl ov94_02245934 + mov r0, #0 + str r0, [sp] + mov r0, #3 + ldr r2, _02241538 ; =0x00000B94 + str r0, [sp, #4] + sub r0, r0, #4 + str r0, [sp, #8] + add r1, r2, #4 + ldr r0, [r4, r2] + sub r2, r2, #4 + ldr r3, _0224153C ; =0x00000F6C + ldr r1, [r4, r1] + ldr r2, [r4, r2] + add r3, r4, r3 + bl ov94_022422D4 + ldr r1, _02241540 ; =0x00000B74 + mov r3, #0x46 + add r0, r4, r1 + str r0, [sp] + add r0, r1, #0 + add r0, #0x20 + add r1, #0x1c + ldr r2, _02241544 ; =0x00000F9C + lsl r3, r3, #2 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + ldr r3, [r4, r3] + add r2, r4, r2 + bl ov94_022423FC + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_02241538: .word 0x00000B94 +_0224153C: .word 0x00000F6C +_02241540: .word 0x00000B74 +_02241544: .word 0x00000F9C + thumb_func_end ov94_022414B8 + + thumb_func_start ov94_02241548 +ov94_02241548: ; 0x02241548 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223C4B4 + bl sub_020397B0 + ldr r1, [r4, #0x2c] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02241564 ; =0x0224695C + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_02241564: .word 0x0224695C + thumb_func_end ov94_02241548 + + thumb_func_start ov94_02241568 +ov94_02241568: ; 0x02241568 + push {r4, lr} + add r4, r0, #0 + bl sub_02039794 + add r0, r4, #0 + bl ov94_02241920 + add r0, r4, #0 + bl ov94_02241880 + ldr r0, [r4, #4] + bl ov94_022416E0 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + thumb_func_end ov94_02241568 + + thumb_func_start ov94_0224158C +ov94_0224158C: ; 0x0224158C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _022415EC ; =0x00000B94 + add r4, r2, #0 + ldr r0, [r5, r0] + bl sub_0200B1EC + mov r1, #0xb9 + add r6, r0, #0 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, #0x20 + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + ldr r0, _022415F0 ; =0x00000EFC + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _022415F0 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _022415F0 ; =0x00000EFC + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _022415F4 ; =0x00000BE4 + str r0, [r5, r1] + add r0, r6, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022415EC: .word 0x00000B94 +_022415F0: .word 0x00000EFC +_022415F4: .word 0x00000BE4 + thumb_func_end ov94_0224158C + + thumb_func_start ov94_022415F8 +ov94_022415F8: ; 0x022415F8 + push {r4, r5, lr} + sub sp, #0x8c + ldr r5, _022416CC ; =0x0224601C + add r4, r0, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x70 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _022416D0 ; =0x02246038 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _022416D4 ; =0x02246054 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + ldr r5, _022416D8 ; =0x02246070 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _022416DC ; =0x02246000 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + add sp, #0x8c + pop {r4, r5, pc} + nop +_022416CC: .word 0x0224601C +_022416D0: .word 0x02246038 +_022416D4: .word 0x02246054 +_022416D8: .word 0x02246070 +_022416DC: .word 0x02246000 + thumb_func_end ov94_022415F8 + + thumb_func_start ov94_022416E0 +ov94_022416E0: ; 0x022416E0 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_022416E0 + + thumb_func_start ov94_0224170C +ov94_0224170C: ; 0x0224170C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r5, r0, #0 + ldr r4, [r5, #4] + mov r0, #0x60 + str r0, [sp] + mov r0, #0x3e + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x68 + mov r1, #1 + add r3, r2, #0 + bl sub_02006E84 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [r5, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + mov r0, #0xa + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + mov r0, #0x68 + mov r1, #0xb + add r2, r4, #0 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + mov r0, #6 + lsl r0, r0, #8 + str r0, [sp, #4] + mov r3, #1 + str r3, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + mov r0, #0x68 + mov r1, #0x17 + add r2, r4, #0 + bl sub_02006E60 + add sp, #0x10 + pop {r3, r4, r5, pc} + thumb_func_end ov94_0224170C + + thumb_func_start ov94_022417A0 +ov94_022417A0: ; 0x022417A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + mov r3, #1 + add r7, r0, #0 + str r3, [sp] + mov r0, #0x1c + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + ldr r1, _02241868 ; =0x00000F1C + str r0, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r7, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _02241868 ; =0x00000F1C + mov r1, #0 + add r0, r7, r0 + bl sub_0201ADA4 + mov r2, #0 + ldr r0, _0224186C ; =0x000F0E00 + str r2, [sp] + str r0, [sp, #4] + ldr r1, _02241870 ; =0x00000BB4 + ldr r0, _02241868 ; =0x00000F1C + ldr r1, [r7, r1] + add r0, r7, r0 + mov r3, #1 + bl ov94_022458CC + mov r0, #0x15 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r3, #2 + ldr r1, _02241874 ; =0x00000EFC + str r3, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x60 + str r0, [sp, #0x10] + ldr r0, [r7, #4] + add r1, r7, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _02241874 ; =0x00000EFC + mov r1, #0 + add r0, r7, r0 + bl sub_0201ADA4 + mov r0, #0 + str r0, [sp, #0x14] + ldr r0, _02241878 ; =0x00000F6C + ldr r4, _0224187C ; =0x02245FE8 + mov r6, #0x96 + add r5, r7, r0 +_0224181C: + ldrh r0, [r4, #2] + add r1, r5, #0 + mov r2, #0 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0xb + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + lsl r0, r6, #0x10 + lsr r0, r0, #0x10 + str r0, [sp, #0x10] + ldrh r3, [r4] + ldr r0, [r7, #4] + lsl r3, r3, #0x18 + lsr r3, r3, #0x18 + bl sub_0201A7E8 + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r0, r5, #0 + bl sub_0201A954 + ldr r0, [sp, #0x14] + add r6, #0x16 + add r0, r0, #1 + add r4, r4, #4 + add r5, #0x10 + str r0, [sp, #0x14] + cmp r0, #6 + blt _0224181C + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02241868: .word 0x00000F1C +_0224186C: .word 0x000F0E00 +_02241870: .word 0x00000BB4 +_02241874: .word 0x00000EFC +_02241878: .word 0x00000F6C +_0224187C: .word 0x02245FE8 + thumb_func_end ov94_022417A0 + + thumb_func_start ov94_02241880 +ov94_02241880: ; 0x02241880 + push {r4, r5, r6, lr} + add r6, r0, #0 + ldr r0, _022418AC ; =0x00000F6C + mov r4, #0 + add r5, r6, r0 +_0224188A: + add r0, r5, #0 + bl sub_0201A8FC + add r4, r4, #1 + add r5, #0x10 + cmp r4, #6 + blt _0224188A + ldr r0, _022418B0 ; =0x00000EFC + add r0, r6, r0 + bl sub_0201A8FC + ldr r0, _022418B4 ; =0x00000F1C + add r0, r6, r0 + bl sub_0201A8FC + pop {r4, r5, r6, pc} + nop +_022418AC: .word 0x00000F6C +_022418B0: .word 0x00000EFC +_022418B4: .word 0x00000F1C + thumb_func_end ov94_02241880 + + thumb_func_start ov94_022418B8 +ov94_022418B8: ; 0x022418B8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r4, r1] + sub r1, #0x1c + ldr r0, [r4, r1] + mov r1, #0x5a + bl sub_0200B1EC + ldr r1, _02241918 ; =0x00000BB4 + str r0, [r4, r1] + mov r0, #0x3e + mov r1, #0x30 + bl sub_02018144 + ldr r1, _0224191C ; =0x00001084 + mov r2, #0x30 + str r0, [r4, r1] + ldr r1, [r4, r1] + mov r0, #0 + bl sub_020C4BB8 + ldr r2, _0224191C ; =0x00001084 + mov r0, #0x3e + ldr r2, [r4, r2] + mov r1, #0 + add r2, #0x1c + bl ov94_02242524 + ldr r1, _0224191C ; =0x00001084 + ldr r1, [r4, r1] + str r0, [r1, #0x18] + mov r0, #0x3e + bl ov94_02242548 + ldr r1, _0224191C ; =0x00001084 + ldr r2, [r4, r1] + add r1, #0x38 + str r0, [r2, #0x14] + add r0, r4, r1 + bl ov94_02242AAC + pop {r4, pc} + ; .align 2, 0 +_02241918: .word 0x00000BB4 +_0224191C: .word 0x00001084 + thumb_func_end ov94_022418B8 + + thumb_func_start ov94_02241920 +ov94_02241920: ; 0x02241920 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02241954 ; =0x00001084 + ldr r0, [r4, r0] + ldr r0, [r0, #0x14] + bl sub_020181C4 + ldr r0, _02241954 ; =0x00001084 + ldr r0, [r4, r0] + ldr r0, [r0, #0x18] + bl sub_020181C4 + ldr r0, _02241954 ; =0x00001084 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + ldr r0, _02241958 ; =0x00000BB4 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + ; .align 2, 0 +_02241954: .word 0x00001084 +_02241958: .word 0x00000BB4 + thumb_func_end ov94_02241920 + + thumb_func_start ov94_0224195C +ov94_0224195C: ; 0x0224195C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + beq _02241984 + ldr r0, _0224198C ; =0x00000F0F + mov r1, #9 + str r0, [sp] + add r0, r4, #0 + mov r2, #1 + mov r3, #0 + bl ov94_0224158C + add r0, r4, #0 + mov r1, #0x10 + mov r2, #1 + bl ov94_0223C3F4 +_02241984: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0224198C: .word 0x00000F0F + thumb_func_end ov94_0224195C + + thumb_func_start ov94_02241990 +ov94_02241990: ; 0x02241990 + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _02241A08 ; =0x021BF67C + add r4, r0, #0 + ldr r2, [r1, #0x48] + mov r1, #2 + tst r1, r2 + beq _022419AC + mov r1, #5 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r4, #0x2c] +_022419AC: + mov r0, #5 + str r0, [sp] + mov r0, #4 + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, _02241A0C ; =0x0000011A + ldr r1, _02241A10 ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0xf + bl sub_0201A7E8 + ldr r0, _02241A10 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #5 + str r0, [sp] + mov r0, #0xa + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, _02241A14 ; =0x0000014E + ldr r1, _02241A18 ; =0x00000F4C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + ldr r0, _02241A18 ; =0x00000F4C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + str r0, [r4, #0x2c] + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_02241A08: .word 0x021BF67C +_02241A0C: .word 0x0000011A +_02241A10: .word 0x00000F3C +_02241A14: .word 0x0000014E +_02241A18: .word 0x00000F4C + thumb_func_end ov94_02241990 + + thumb_func_start ov94_02241A1C +ov94_02241A1C: ; 0x02241A1C + push {r4, lr} + ldr r3, _02241A44 ; =0x00000B94 + add r4, r0, #0 + ldr r1, _02241A48 ; =0x0000106C + ldr r2, _02241A4C ; =0x00000F3C + ldr r3, [r4, r3] + add r1, r4, r1 + add r2, r4, r2 + bl ov94_022426A8 + ldr r1, _02241A50 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _02241A54 ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #4 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02241A44: .word 0x00000B94 +_02241A48: .word 0x0000106C +_02241A4C: .word 0x00000F3C +_02241A50: .word 0x00001078 +_02241A54: .word 0x0000FFFF + thumb_func_end ov94_02241A1C + + thumb_func_start ov94_02241A58 +ov94_02241A58: ; 0x02241A58 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02241B10 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_02242A6C + cmp r0, #9 + bhi _02241A8E + add r1, r0, r0 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02241A7A: ; jump table + .short _02241B0C - _02241A7A - 2 ; case 0 + .short _02241A98 - _02241A7A - 2 ; case 1 + .short _02241A98 - _02241A7A - 2 ; case 2 + .short _02241A98 - _02241A7A - 2 ; case 3 + .short _02241A98 - _02241A7A - 2 ; case 4 + .short _02241A98 - _02241A7A - 2 ; case 5 + .short _02241A98 - _02241A7A - 2 ; case 6 + .short _02241A98 - _02241A7A - 2 ; case 7 + .short _02241A98 - _02241A7A - 2 ; case 8 + .short _02241A98 - _02241A7A - 2 ; case 9 +_02241A8E: + mov r1, #1 + mvn r1, r1 + cmp r0, r1 + beq _02241ABC + b _02241B0C +_02241A98: + ldr r0, _02241B14 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #6 + ldr r0, [r4, r0] + add r2, r2, #4 + bl sub_02001384 + ldr r0, _02241B18 ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + mov r0, #5 + str r0, [r4, #0x2c] + ldr r0, _02241B1C ; =0x000005DC + bl sub_02005748 + b _02241B0C +_02241ABC: + ldr r0, _02241B14 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #6 + ldr r0, [r4, r0] + add r2, r2, #4 + bl sub_02001384 + ldr r0, _02241B18 ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _02241B20 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _02241B24 ; =0x00000EFC + mov r1, #0 + add r0, r4, r0 + bl sub_0200E084 + ldr r0, _02241B20 ; =0x00000F3C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _02241B28 ; =0x00000F4C + add r0, r4, r0 + bl sub_0201A8FC + mov r1, #5 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r4, #0x2c] + ldr r0, _02241B1C ; =0x000005DC + bl sub_02005748 +_02241B0C: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02241B10: .word 0x00001078 +_02241B14: .word 0x00001084 +_02241B18: .word 0x0000106C +_02241B1C: .word 0x000005DC +_02241B20: .word 0x00000F3C +_02241B24: .word 0x00000EFC +_02241B28: .word 0x00000F4C + thumb_func_end ov94_02241A58 + + thumb_func_start ov94_02241B2C +ov94_02241B2C: ; 0x02241B2C + push {r3, r4, lr} + sub sp, #0xc + ldr r3, _02241B6C ; =0x00000B98 + add r4, r0, #0 + ldr r1, [r4, r3] + sub r3, r3, #4 + str r1, [sp] + ldr r1, _02241B70 ; =0x00001084 + ldr r2, [r4, r1] + sub r1, #0x18 + str r2, [sp, #4] + ldr r2, [r4, #0] + add r1, r4, r1 + ldr r2, [r2, #0x10] + str r2, [sp, #8] + ldr r2, _02241B74 ; =0x00000F4C + ldr r3, [r4, r3] + add r2, r4, r2 + bl ov94_022427C0 + ldr r1, _02241B78 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _02241B7C ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #6 + str r0, [r4, #0x2c] + mov r0, #3 + add sp, #0xc + pop {r3, r4, pc} + nop +_02241B6C: .word 0x00000B98 +_02241B70: .word 0x00001084 +_02241B74: .word 0x00000F4C +_02241B78: .word 0x00001078 +_02241B7C: .word 0x0000FFFF + thumb_func_end ov94_02241B2C + + thumb_func_start ov94_02241B80 +ov94_02241B80: ; 0x02241B80 + cmp r1, #0 + beq _02241B8E + cmp r1, #0xfe + beq _02241B96 + cmp r1, #0xff + beq _02241B9E + b _02241BA6 +_02241B8E: + mov r1, #1 + strb r1, [r0, #2] + add r0, r1, #0 + bx lr +_02241B96: + mov r1, #2 + strb r1, [r0, #2] + mov r0, #1 + bx lr +_02241B9E: + mov r1, #3 + strb r1, [r0, #2] + mov r0, #1 + bx lr +_02241BA6: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov94_02241B80 + + thumb_func_start ov94_02241BAC +ov94_02241BAC: ; 0x02241BAC + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, _02241CE4 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r4, r0] + add r1, r4, r1 + bl ov94_02242A6C + add r5, r0, #0 + mov r0, #1 + mvn r0, r0 + cmp r5, r0 + beq _02241BD4 + add r0, r0, #1 + cmp r5, r0 + bne _02241BD2 + b _02241CDC +_02241BD2: + b _02241C2A +_02241BD4: + ldr r0, _02241CE8 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #0 + ldr r0, [r4, r0] + add r1, #0xa + add r2, #8 + bl sub_02001384 + ldr r0, _02241CEC ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _02241CF0 ; =0x00000F4C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _02241CF4 ; =0x00000F3C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _02241CF0 ; =0x00000F4C + add r0, r4, r0 + bl sub_0201A8FC + mov r0, #0 + str r0, [r4, #0x2c] + ldr r0, _02241CF8 ; =0x000005DC + bl sub_02005748 + ldr r0, _02241CE8 ; =0x00001084 + ldr r3, [r4, r0] + add r0, #0x38 + ldrh r2, [r3, #6] + ldrh r1, [r3, #4] + add r0, r4, r0 + add r1, r2, r1 + ldrh r2, [r3, #0xa] + ldrh r3, [r3, #8] + bl ov94_02242AC4 + b _02241CDC +_02241C2A: + ldr r0, _02241CE8 ; =0x00001084 + ldr r2, [r4, r0] + sub r0, #0xc + add r1, r2, #0 + ldr r0, [r4, r0] + add r1, #0xa + add r2, #8 + bl sub_02001384 + ldr r0, _02241CEC ; =0x0000106C + ldr r0, [r4, r0] + bl sub_02013A3C + ldr r0, _02241CF4 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _02241CF0 ; =0x00000F4C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + ldr r0, _02241CF4 ; =0x00000F3C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _02241CF0 ; =0x00000F4C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _02241CFC ; =0x00000B78 + strh r5, [r4, r0] + ldr r0, _02241CF8 ; =0x000005DC + bl sub_02005748 + add r0, r5, #0 + mov r1, #0x12 + bl sub_020759F0 + ldr r1, _02241CE8 ; =0x00001084 + ldr r2, [r4, r1] + str r0, [r2, #0x20] + ldr r1, [r4, r1] + ldr r0, _02241CFC ; =0x00000B78 + ldr r1, [r1, #0x20] + add r0, r4, r0 + bl ov94_02241B80 + cmp r0, #0 + beq _02241C9A + mov r0, #0xa + str r0, [r4, #0x2c] + ldr r0, _02241D00 ; =0x00000B7A + ldrsb r1, [r4, r0] + b _02241CA0 +_02241C9A: + mov r0, #7 + str r0, [r4, #0x2c] + mov r1, #3 +_02241CA0: + ldr r2, _02241CFC ; =0x00000B78 + ldr r3, _02241D04 ; =0x00000F6C + ldrsh r0, [r4, r2] + add r3, r4, r3 + str r0, [sp] + mov r0, #0 + str r1, [sp, #4] + mvn r0, r0 + str r0, [sp, #8] + add r0, r2, #0 + add r1, r2, #0 + add r0, #0x1c + add r1, #0x20 + add r2, #0x18 + ldr r0, [r4, r0] + ldr r1, [r4, r1] + ldr r2, [r4, r2] + bl ov94_022422D4 + ldr r0, _02241CE8 ; =0x00001084 + ldr r3, [r4, r0] + add r0, #0x38 + ldrh r2, [r3, #6] + ldrh r1, [r3, #4] + add r0, r4, r0 + add r1, r2, r1 + ldrh r2, [r3, #0xa] + ldrh r3, [r3, #8] + bl ov94_02242AC4 +_02241CDC: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + nop +_02241CE4: .word 0x00001078 +_02241CE8: .word 0x00001084 +_02241CEC: .word 0x0000106C +_02241CF0: .word 0x00000F4C +_02241CF4: .word 0x00000F3C +_02241CF8: .word 0x000005DC +_02241CFC: .word 0x00000B78 +_02241D00: .word 0x00000B7A +_02241D04: .word 0x00000F6C + thumb_func_end ov94_02241BAC + + thumb_func_start ov94_02241D08 +ov94_02241D08: ; 0x02241D08 + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _02241D58 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl ov94_0224158C + add r0, r4, #0 + mov r1, #0x10 + mov r2, #8 + bl ov94_0223C3F4 + mov r0, #0xa + str r0, [sp] + str r0, [sp, #4] + mov r0, #8 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + ldr r0, _02241D5C ; =0x0000011A + ldr r1, _02241D60 ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0x15 + bl sub_0201A7E8 + ldr r0, _02241D60 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + nop +_02241D58: .word 0x00000F0F +_02241D5C: .word 0x0000011A +_02241D60: .word 0x00000F3C + thumb_func_end ov94_02241D08 + + thumb_func_start ov94_02241D64 +ov94_02241D64: ; 0x02241D64 + push {r4, lr} + ldr r2, _02241D8C ; =0x00000B94 + add r4, r0, #0 + ldr r0, _02241D90 ; =0x0000106C + ldr r1, _02241D94 ; =0x00000F3C + ldr r2, [r4, r2] + add r0, r4, r0 + add r1, r4, r1 + bl ov94_02242840 + ldr r1, _02241D98 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _02241D9C ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #9 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02241D8C: .word 0x00000B94 +_02241D90: .word 0x0000106C +_02241D94: .word 0x00000F3C +_02241D98: .word 0x00001078 +_02241D9C: .word 0x0000FFFF + thumb_func_end ov94_02241D64 + + thumb_func_start ov94_02241DA0 +ov94_02241DA0: ; 0x02241DA0 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _02241E70 ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r5, r0] + add r1, r5, r1 + bl ov94_02242A6C + add r4, r0, #0 + cmp r4, #2 + bhi _02241DC8 + cmp r4, #0 + beq _02241E0C + cmp r4, #1 + beq _02241E0C + cmp r4, #2 + beq _02241E0C + b _02241E68 +_02241DC8: + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + bne _02241E68 + ldr r0, _02241E70 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _02241E74 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02241E78 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _02241E7C ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + ldr r0, _02241E78 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _02241E80 ; =0x000005DC + bl sub_02005748 + mov r0, #0 + str r0, [r5, #0x2c] + b _02241E68 +_02241E0C: + ldr r0, _02241E70 ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _02241E74 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02241E78 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _02241E78 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _02241E80 ; =0x000005DC + bl sub_02005748 + ldr r3, _02241E84 ; =0x00000F6C + ldr r2, _02241E88 ; =0x00000B7A + add r0, r4, #1 + strb r0, [r5, r2] + mov r1, #0xa + str r1, [r5, #0x2c] + sub r0, r2, #2 + ldrsh r0, [r5, r0] + sub r1, #0xb + add r3, r5, r3 + str r0, [sp] + ldrsb r0, [r5, r2] + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r2, #0 + add r1, r2, #0 + add r0, #0x1a + add r1, #0x1e + add r2, #0x16 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + ldr r2, [r5, r2] + bl ov94_022422D4 +_02241E68: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + nop +_02241E70: .word 0x00001078 +_02241E74: .word 0x0000106C +_02241E78: .word 0x00000F3C +_02241E7C: .word 0x00000EFC +_02241E80: .word 0x000005DC +_02241E84: .word 0x00000F6C +_02241E88: .word 0x00000B7A + thumb_func_end ov94_02241DA0 + + thumb_func_start ov94_02241E8C +ov94_02241E8C: ; 0x02241E8C + push {r3, r4, lr} + sub sp, #0x14 + ldr r1, _02241EDC ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xb + mov r2, #1 + mov r3, #0 + bl ov94_0224158C + add r0, r4, #0 + mov r1, #0x10 + mov r2, #0xb + bl ov94_0223C3F4 + mov r0, #5 + str r0, [sp] + mov r0, #0x10 + str r0, [sp, #4] + mov r0, #0xd + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, _02241EE0 ; =0x0000011A + ldr r1, _02241EE4 ; =0x00000F3C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #0xf + bl sub_0201A7E8 + ldr r0, _02241EE4 ; =0x00000F3C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #3 + add sp, #0x14 + pop {r3, r4, pc} + nop +_02241EDC: .word 0x00000F0F +_02241EE0: .word 0x0000011A +_02241EE4: .word 0x00000F3C + thumb_func_end ov94_02241E8C + + thumb_func_start ov94_02241EE8 +ov94_02241EE8: ; 0x02241EE8 + push {r4, lr} + ldr r2, _02241F14 ; =0x00000B94 + add r4, r0, #0 + ldr r0, _02241F18 ; =0x0000106C + ldr r1, _02241F1C ; =0x00000F3C + ldr r2, [r4, r2] + add r0, r4, r0 + add r1, r4, r1 + mov r3, #0 + bl ov94_022428B0 + ldr r1, _02241F20 ; =0x00001078 + str r0, [r4, r1] + mov r0, #0x43 + ldr r1, _02241F24 ; =0x0000FFFF + lsl r0, r0, #2 + strh r1, [r4, r0] + mov r0, #0xc + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_02241F14: .word 0x00000B94 +_02241F18: .word 0x0000106C +_02241F1C: .word 0x00000F3C +_02241F20: .word 0x00001078 +_02241F24: .word 0x0000FFFF + thumb_func_end ov94_02241EE8 + + thumb_func_start ov94_02241F28 +ov94_02241F28: ; 0x02241F28 + push {r4, r5, lr} + sub sp, #0xc + add r5, r0, #0 + ldr r0, _0224201C ; =0x00001078 + mov r1, #0x43 + lsl r1, r1, #2 + ldr r0, [r5, r0] + add r1, r5, r1 + bl ov94_02242A6C + add r4, r0, #0 + cmp r4, #0xc + beq _02241F52 + mov r0, #1 + mvn r0, r0 + cmp r4, r0 + beq _02241F52 + add r0, r0, #1 + cmp r4, r0 + beq _02242016 + b _02241FA6 +_02241F52: + ldr r0, _0224201C ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _02242020 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02242024 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _02242028 ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + bl sub_0200E084 + ldr r0, _02242024 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _0224202C ; =0x000005DC + bl sub_02005748 + ldr r1, _02242030 ; =0x00001084 + ldr r0, _02242034 ; =0x00000B78 + ldr r1, [r5, r1] + add r0, r5, r0 + ldr r1, [r1, #0x20] + bl ov94_02241B80 + cmp r0, #0 + beq _02241FA0 + mov r0, #0 + str r0, [r5, #0x2c] + b _02242016 +_02241FA0: + mov r0, #7 + str r0, [r5, #0x2c] + b _02242016 +_02241FA6: + ldr r0, _0224202C ; =0x000005DC + bl sub_02005748 + ldr r0, _0224201C ; =0x00001078 + mov r1, #0 + ldr r0, [r5, r0] + add r2, r1, #0 + bl sub_02001384 + ldr r0, _02242020 ; =0x0000106C + ldr r0, [r5, r0] + bl sub_02013A3C + ldr r0, _02242024 ; =0x00000F3C + mov r1, #0 + add r0, r5, r0 + bl sub_0200DC9C + ldr r0, _02242024 ; =0x00000F3C + add r0, r5, r0 + bl sub_0201A8FC + ldr r0, _02242034 ; =0x00000B78 + add r1, r4, #0 + add r0, r5, r0 + mov r2, #0 + bl ov94_02242934 + mov r0, #0xd + ldr r1, _02242038 ; =0x00000B7B + str r0, [r5, #0x2c] + ldrsb r0, [r5, r1] + add r1, r1, #1 + ldrsb r1, [r5, r1] + mov r2, #0 + bl ov94_02242970 + ldr r2, _02242034 ; =0x00000B78 + ldr r3, _0224203C ; =0x00000F6C + ldrsh r1, [r5, r2] + add r3, r5, r3 + str r1, [sp] + add r1, r2, #2 + ldrsb r1, [r5, r1] + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r2, #0 + add r1, r2, #0 + add r0, #0x1c + add r1, #0x20 + add r2, #0x18 + ldr r0, [r5, r0] + ldr r1, [r5, r1] + ldr r2, [r5, r2] + bl ov94_022422D4 +_02242016: + mov r0, #3 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224201C: .word 0x00001078 +_02242020: .word 0x0000106C +_02242024: .word 0x00000F3C +_02242028: .word 0x00000EFC +_0224202C: .word 0x000005DC +_02242030: .word 0x00001084 +_02242034: .word 0x00000B78 +_02242038: .word 0x00000B7B +_0224203C: .word 0x00000F6C + thumb_func_end ov94_02241F28 + + thumb_func_start ov94_02242040 +ov94_02242040: ; 0x02242040 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _02242064 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0x17 + mov r2, #1 + mov r3, #0 + bl ov94_0224158C + add r0, r4, #0 + mov r1, #0x10 + mov r2, #0xe + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02242064: .word 0x00000F0F + thumb_func_end ov94_02242040 + + thumb_func_start ov94_02242068 +ov94_02242068: ; 0x02242068 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + ldr r2, _02242084 ; =0x000001EA + mov r1, #0xf + bl ov94_0223C3C0 + ldr r1, _02242088 ; =0x00001070 + str r0, [r4, r1] + mov r0, #0xf + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + nop +_02242084: .word 0x000001EA +_02242088: .word 0x00001070 + thumb_func_end ov94_02242068 + + thumb_func_start ov94_0224208C +ov94_0224208C: ; 0x0224208C + push {r4, lr} + add r4, r0, #0 + ldr r0, _022420DC ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _022420D8 + sub r1, r1, #1 + cmp r0, r1 + bne _022420B8 + mov r1, #5 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r4, #0x2c] + b _022420D8 +_022420B8: + mov r1, #7 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #2 + str r0, [r4, #0x2c] + ldr r0, _022420E0 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + add r1, r4, #0 + bl ov94_02242668 +_022420D8: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_022420DC: .word 0x00001070 +_022420E0: .word 0x000010B0 + thumb_func_end ov94_0224208C + + thumb_func_start ov94_022420E4 +ov94_022420E4: ; 0x022420E4 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + ldr r0, [r4, #0x18] + cmp r0, #0 + bne _02242110 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, _02242134 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + b _02242128 +_02242110: + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 +_02242128: + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + nop +_02242134: .word 0x000010B0 + thumb_func_end ov94_022420E4 + + thumb_func_start ov94_02242138 +ov94_02242138: ; 0x02242138 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02242154 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02242150 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_02242150: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02242154: .word 0x00000BE4 + thumb_func_end ov94_02242138 + + thumb_func_start ov94_02242158 +ov94_02242158: ; 0x02242158 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + add r5, r3, #0 + cmp r2, #0 + beq _02242186 + add r0, r1, #0 + add r1, r2, #0 + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [sp, #0x1c] + str r5, [sp] + str r0, [sp, #4] + ldr r3, [sp, #0x18] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + bl ov94_02245900 + add r0, r4, #0 + bl sub_020237BC +_02242186: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov94_02242158 + + thumb_func_start ov94_0224218C +ov94_0224218C: ; 0x0224218C + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r0, #0 + cmp r3, #0 + beq _022421BE + add r0, r1, #0 + add r1, r3, #0 + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x1c] + str r0, [sp] + ldr r0, [sp, #0x20] + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0 + bl ov94_02245900 + add r0, r5, #0 + bl sub_020237BC + add sp, #8 + pop {r3, r4, r5, pc} +_022421BE: + add r0, r2, #0 + mov r1, #0xa7 + bl sub_0200B1EC + add r5, r0, #0 + ldr r0, [sp, #0x18] + ldr r3, [sp, #0x1c] + str r0, [sp] + ldr r0, [sp, #0x20] + add r1, r5, #0 + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0 + bl ov94_02245900 + add r0, r5, #0 + bl sub_020237BC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov94_0224218C + + thumb_func_start ov94_022421E8 +ov94_022421E8: ; 0x022421E8 + cmp r0, #1 + bne _022421F2 + ldr r0, _02242200 ; =0x02246920 + ldr r0, [r0, #0] + bx lr +_022421F2: + cmp r0, #2 + bne _022421FA + ldr r0, _02242200 ; =0x02246920 + ldr r1, [r0, #4] +_022421FA: + add r0, r1, #0 + bx lr + nop +_02242200: .word 0x02246920 + thumb_func_end ov94_022421E8 + + thumb_func_start ov94_02242204 +ov94_02242204: ; 0x02242204 + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + add r5, r2, #0 + cmp r3, #0 + bne _02242214 + cmp r5, #3 + beq _02242264 +_02242214: + add r0, r1, #0 + ldr r1, _02242268 ; =0x02245FD8 + lsl r2, r5, #2 + ldr r1, [r1, r2] + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [sp, #0x1c] + cmp r0, #3 + ble _02242244 + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov94_022421E8 + mov r1, #0 + str r1, [sp] + str r0, [sp, #4] + ldr r2, [sp, #0x1c] + ldr r3, [sp, #0x18] + add r0, r6, #0 + add r1, r4, #0 + bl ov94_02245900 + b _0224225E +_02242244: + ldr r1, [sp, #0x20] + add r0, r5, #0 + bl ov94_022421E8 + ldr r1, [sp, #0x1c] + ldr r3, [sp, #0x18] + str r1, [sp] + str r0, [sp, #4] + add r0, r6, #0 + add r1, r4, #0 + mov r2, #0 + bl ov94_02245900 +_0224225E: + add r0, r4, #0 + bl sub_020237BC +_02242264: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02242268: .word 0x02245FD8 + thumb_func_end ov94_02242204 + + thumb_func_start ov94_0224226C +ov94_0224226C: ; 0x0224226C + push {r4, r5, r6, lr} + sub sp, #8 + add r6, r0, #0 + mov r0, #0 + mvn r0, r0 + add r5, r3, #0 + cmp r2, r0 + beq _022422AC + ldr r0, [sp, #0x20] + cmp r0, #0 + bne _02242286 + ldr r3, _022422B0 ; =0x0224610C + b _02242288 +_02242286: + ldr r3, _022422B4 ; =0x022460AC +_02242288: + add r0, r1, #0 + lsl r1, r2, #3 + ldr r1, [r3, r1] + bl sub_0200B1EC + add r4, r0, #0 + ldr r0, [sp, #0x1c] + str r5, [sp] + str r0, [sp, #4] + ldr r2, [sp, #0x24] + ldr r3, [sp, #0x18] + add r0, r6, #0 + add r1, r4, #0 + bl ov94_02245900 + add r0, r4, #0 + bl sub_020237BC +_022422AC: + add sp, #8 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_022422B0: .word 0x0224610C +_022422B4: .word 0x022460AC + thumb_func_end ov94_0224226C + + thumb_func_start ov94_022422B8 +ov94_022422B8: ; 0x022422B8 + push {r4, lr} + sub sp, #0x10 + ldr r4, [sp, #0x18] + str r4, [sp] + ldr r4, [sp, #0x1c] + str r4, [sp, #4] + ldr r4, [sp, #0x20] + str r4, [sp, #8] + mov r4, #0 + str r4, [sp, #0xc] + bl ov94_0224226C + add sp, #0x10 + pop {r4, pc} + thumb_func_end ov94_022422B8 + + thumb_func_start ov94_022422D4 +ov94_022422D4: ; 0x022422D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0x10] + mov r1, #0x61 + str r0, [sp, #0xc] + add r6, r3, #0 + bl sub_0200B1EC + str r0, [sp, #0x14] + mov r2, #0 + ldr r0, _02242364 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x14] + add r0, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + add r5, r6, #0 + mov r4, #1 + add r5, #0x10 + mov r7, #0 +_02242300: + add r0, r5, #0 + add r1, r7, #0 + bl sub_0201ADA4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #3 + blt _02242300 + mov r3, #0 + ldr r0, _02242364 ; =0x000F0200 + str r3, [sp] + str r0, [sp, #4] + add r0, r6, #0 + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x30] + add r0, #0x10 + bl ov94_02242158 + ldr r2, [sp, #0x34] + sub r0, r2, #1 + cmp r0, #1 + bhi _02242342 + mov r3, #0 + str r3, [sp] + mov r0, #0x46 + str r0, [sp, #4] + ldr r0, _02242364 ; =0x000F0200 + ldr r1, [sp, #0xc] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x10 + bl ov94_02242204 +_02242342: + mov r1, #0 + ldr r0, _02242364 ; =0x000F0200 + str r1, [sp] + str r0, [sp, #4] + str r1, [sp, #8] + add r6, #0x20 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x38] + add r0, r6, #0 + mov r3, #2 + bl ov94_022422B8 + ldr r0, [sp, #0x14] + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242364: .word 0x000F0200 + thumb_func_end ov94_022422D4 + + thumb_func_start ov94_02242368 +ov94_02242368: ; 0x02242368 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + str r1, [sp, #0x10] + mov r1, #0x61 + str r0, [sp, #0xc] + add r6, r3, #0 + bl sub_0200B1EC + str r0, [sp, #0x14] + mov r2, #0 + ldr r0, _022423F8 ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r1, [sp, #0x14] + add r0, r6, #0 + add r3, r2, #0 + bl ov94_02245900 + add r5, r6, #0 + mov r4, #1 + add r5, #0x10 + mov r7, #0 +_02242394: + add r0, r5, #0 + add r1, r7, #0 + bl sub_0201ADA4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #3 + blt _02242394 + mov r3, #0 + ldr r0, _022423F8 ; =0x000F0200 + str r3, [sp] + str r0, [sp, #4] + add r0, r6, #0 + ldr r1, [sp, #0x10] + ldr r2, [sp, #0x30] + add r0, #0x10 + bl ov94_02242158 + ldr r2, [sp, #0x34] + sub r0, r2, #1 + cmp r0, #1 + bhi _022423D6 + mov r3, #0 + str r3, [sp] + mov r0, #0x46 + str r0, [sp, #4] + ldr r0, _022423F8 ; =0x000F0200 + ldr r1, [sp, #0xc] + str r0, [sp, #8] + add r0, r6, #0 + add r0, #0x10 + bl ov94_02242204 +_022423D6: + mov r1, #0 + ldr r0, _022423F8 ; =0x000F0200 + str r1, [sp] + str r0, [sp, #4] + str r1, [sp, #8] + add r6, #0x20 + ldr r1, [sp, #0xc] + ldr r2, [sp, #0x38] + add r0, r6, #0 + mov r3, #2 + bl ov94_022422B8 + ldr r0, [sp, #0x14] + bl sub_020237BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022423F8: .word 0x000F0200 + thumb_func_end ov94_02242368 + + thumb_func_start ov94_022423FC +ov94_022423FC: ; 0x022423FC + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r4, r0, #0 + add r5, r1, #0 + mov r0, #0xb + mov r1, #0x3e + str r2, [sp, #8] + str r3, [sp, #0xc] + ldr r7, [sp, #0x38] + bl sub_02023790 + str r0, [sp, #0x18] + mov r0, #0xb + mov r1, #0x3e + bl sub_02023790 + str r0, [sp, #0x14] + ldr r0, [sp, #0xc] + ldr r2, [sp, #0x18] + mov r1, #0x77 + bl sub_02074570 + ldr r0, [sp, #0xc] + mov r1, #0x6f + mov r2, #0 + bl sub_02074570 + add r6, r0, #1 + ldr r0, [sp, #0xc] + bl sub_02075B40 + str r0, [sp, #0x10] + add r0, r4, #0 + mov r1, #0x64 + bl sub_0200B1EC + str r0, [sp, #0x20] + mov r0, #0 + str r0, [sp] + mov r0, #1 + mov r1, #3 + str r0, [sp, #4] + ldr r2, [sp, #0x10] + add r0, r5, #0 + add r3, r1, #0 + bl sub_0200B60C + add r0, r5, #0 + add r1, r4, #0 + mov r2, #0x66 + mov r3, #0x3e + bl sub_0200B29C + str r0, [sp, #0x1c] + cmp r6, #3 + beq _0224247A + ldr r1, _02242518 ; =0x02245FD8 + lsl r2, r6, #2 + ldr r1, [r1, r2] + ldr r2, [sp, #0x14] + add r0, r4, #0 + bl sub_0200B1B8 +_0224247A: + ldr r5, [sp, #8] + mov r4, #0 +_0224247E: + add r0, r5, #0 + mov r1, #0 + bl sub_0201ADA4 + add r4, r4, #1 + add r5, #0x10 + cmp r4, #3 + blt _0224247E + mov r2, #0 + ldr r0, _0224251C ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [sp, #0x20] + add r3, r2, #0 + bl ov94_02245900 + mov r2, #0 + ldr r0, _0224251C ; =0x000F0200 + str r2, [sp] + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [sp, #0x18] + add r0, #0x10 + add r3, r2, #0 + bl ov94_02245900 + mov r0, #2 + str r0, [sp] + ldr r0, _0224251C ; =0x000F0200 + mov r2, #0 + str r0, [sp, #4] + ldr r0, [sp, #8] + ldr r1, [sp, #0x1c] + add r0, #0x20 + add r3, r2, #0 + bl ov94_02245900 + cmp r6, #3 + beq _022424EA + sub r0, r6, #1 + mov r3, #0 + lsl r1, r0, #2 + ldr r0, _02242520 ; =0x02246920 + str r3, [sp] + ldr r0, [r0, r1] + ldr r1, [sp, #0x14] + str r0, [sp, #4] + ldr r0, [sp, #8] + mov r2, #0x46 + add r0, #0x10 + str r0, [sp, #8] + bl ov94_02245900 +_022424EA: + ldr r0, [sp, #0xc] + mov r1, #5 + mov r2, #0 + bl sub_02074570 + strh r0, [r7] + ldr r0, [sp, #0x10] + strb r6, [r7, #2] + strb r0, [r7, #3] + ldr r0, [sp, #0x1c] + bl sub_020237BC + ldr r0, [sp, #0x14] + bl sub_020237BC + ldr r0, [sp, #0x18] + bl sub_020237BC + ldr r0, [sp, #0x20] + bl sub_020237BC + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242518: .word 0x02245FD8 +_0224251C: .word 0x000F0200 +_02242520: .word 0x02246920 + thumb_func_end ov94_022423FC + + thumb_func_start ov94_02242524 +ov94_02242524: ; 0x02242524 + push {r3, r4, lr} + sub sp, #0xc + add r4, r2, #0 + mov r2, #0 + add r3, r0, #0 + str r2, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0x4b + mov r1, #0xd + bl sub_02007068 + ldr r1, [sp, #8] + lsr r1, r1, #1 + str r1, [r4, #0] + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02242524 + + thumb_func_start ov94_02242548 +ov94_02242548: ; 0x02242548 + push {r4, r5, r6, r7, lr} + sub sp, #0xc + ldr r1, _022425A0 ; =0x000001EE + add r5, r0, #0 + mov r0, #0x3e + bl sub_02018144 + add r4, r0, #0 + ldr r2, _022425A0 ; =0x000001EE + mov r0, #0 + add r1, r4, #0 + bl sub_020C4BB8 + mov r2, #0 + str r2, [sp] + add r0, sp, #8 + str r0, [sp, #4] + mov r0, #0x4b + mov r1, #0xc + add r3, r5, #0 + bl sub_02007068 + add r7, r0, #0 + ldr r0, [sp, #8] + ldr r5, _022425A4 ; =0x00000000 + lsr r3, r0, #1 + beq _02242594 + ldr r0, _022425A0 ; =0x000001EE + add r6, r7, #0 + mov r1, #1 +_02242584: + ldrh r2, [r6] + cmp r2, r0 + bhs _0224258C + strb r1, [r4, r2] +_0224258C: + add r5, r5, #1 + add r6, r6, #2 + cmp r5, r3 + blo _02242584 +_02242594: + add r0, r7, #0 + bl sub_020181C4 + add r0, r4, #0 + add sp, #0xc + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022425A0: .word 0x000001EE +_022425A4: .word 0x00000000 + thumb_func_end ov94_02242548 + + thumb_func_start ov94_022425A8 +ov94_022425A8: ; 0x022425A8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x45 + add r4, r1, #0 + lsl r0, r0, #2 + ldrh r0, [r4, r0] + bl ov94_022411D0 + cmp r0, #0 + beq _022425DC + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02077ACC + bl sub_02073C70 + add r2, r0, #0 + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + bl sub_020C4C14 + b _022425F4 +_022425DC: + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_02077ADC + mov r0, #0x46 + lsl r0, r0, #2 + ldr r0, [r4, r0] + add r1, r5, #0 + bl sub_020774C8 +_022425F4: + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025EF0 + add r1, r0, #0 + mov r0, #0x43 + lsl r0, r0, #2 + add r0, r5, r0 + mov r2, #8 + bl sub_020021D0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025F24 + mov r1, #0x47 + lsl r1, r1, #2 + strh r0, [r5, r1] + ldr r0, [r4, #0] + ldr r0, [r0, #0x18] + bl sub_0202C8C0 + ldr r1, _0224265C ; =0x0000011E + strb r0, [r5, r1] + ldr r0, [r4, #0] + ldr r0, [r0, #0x18] + bl sub_0202C8C4 + ldr r1, _02242660 ; =0x0000011F + strb r0, [r5, r1] + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025F8C + mov r1, #0x12 + lsl r1, r1, #4 + strb r0, [r5, r1] + ldr r0, [r4, #0] + ldr r0, [r0, #0x1c] + bl sub_02025F30 + add r1, r5, #0 + add r1, #0xf6 + strb r0, [r1] + ldr r0, _02242664 ; =0x00000122 + mov r1, #0xc + strb r1, [r5, r0] + mov r1, #2 + add r0, r0, #1 + strb r1, [r5, r0] + pop {r3, r4, r5, pc} + nop +_0224265C: .word 0x0000011E +_02242660: .word 0x0000011F +_02242664: .word 0x00000122 + thumb_func_end ov94_022425A8 + + thumb_func_start ov94_02242668 +ov94_02242668: ; 0x02242668 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov94_022425A8 + ldr r0, _022426A4 ; =0x00000B74 + add r1, r5, #0 + ldrh r2, [r4, r0] + add r1, #0xec + strh r2, [r1] + add r1, r0, #2 + ldrh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xee + strh r2, [r1] + add r1, r0, #4 + ldrh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xf0 + strh r2, [r1] + add r1, r0, #6 + ldrh r2, [r4, r1] + add r1, r5, #0 + add r1, #0xf2 + strh r2, [r1] + add r0, #8 + ldrh r0, [r4, r0] + add r5, #0xf4 + strh r0, [r5] + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022426A4: .word 0x00000B74 + thumb_func_end ov94_02242668 + + thumb_func_start ov94_022426A8 +ov94_022426A8: ; 0x022426A8 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r7, r0, #0 + add r5, r1, #0 + mov r0, #9 + mov r1, #0x3e + str r2, [sp] + add r6, r3, #0 + bl sub_02013A04 + str r0, [r5, #0] + mov r4, #0 +_022426C0: + add r2, r4, #0 + ldr r0, [r5, #0] + add r1, r6, #0 + add r2, #0x68 + add r3, r4, #1 + bl sub_02013A4C + add r4, r4, #1 + cmp r4, #9 + blt _022426C0 + ldr r3, _02242710 ; =0x0224608C + add r2, sp, #4 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [sp, #4] + ldr r0, [sp] + mov r2, #0x1f + mov r3, #0xb + str r0, [sp, #0x10] + bl sub_0200DC48 + ldr r0, _02242714 ; =0x00001084 + mov r3, #0x3e + ldr r2, [r7, r0] + add r0, sp, #4 + ldrh r1, [r2, #6] + ldrh r2, [r2, #4] + bl sub_0200112C + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + nop +_02242710: .word 0x0224608C +_02242714: .word 0x00001084 + thumb_func_end ov94_022426A8 + + thumb_func_start ov94_02242718 +ov94_02242718: ; 0x02242718 + push {r4, r5, r6, r7, lr} + sub sp, #0x1c + str r2, [sp, #8] + str r1, [sp, #4] + ldr r2, [sp, #0x38] + str r0, [sp] + ldr r1, _022427BC ; =0x02246928 + lsl r0, r2, #1 + ldrh r0, [r1, r0] + mov r7, #0 + str r3, [sp, #0xc] + str r0, [sp, #0x14] + add r0, r2, #1 + lsl r0, r0, #1 + ldrh r1, [r1, r0] + ldr r0, [sp, #0x14] + ldr r6, [sp, #0x3c] + sub r4, r1, r0 + str r7, [sp, #0x18] + cmp r4, #0 + ble _02242762 + lsl r1, r0, #1 + add r0, r3, #0 + add r5, r0, r1 +_02242748: + ldrh r1, [r5] + add r0, r6, #0 + bl sub_02026FE8 + cmp r0, #0 + beq _02242756 + add r7, r7, #1 +_02242756: + ldr r0, [sp, #0x18] + add r5, r5, #2 + add r0, r0, #1 + str r0, [sp, #0x18] + cmp r0, r4 + blt _02242748 +_02242762: + add r0, r7, #1 + mov r1, #0x3e + bl sub_02013A04 + ldr r1, [sp] + str r0, [r1, #0] + mov r0, #0 + str r0, [sp, #0x10] + cmp r4, #0 + ble _022427A4 + ldr r0, [sp, #0x14] + lsl r1, r0, #1 + ldr r0, [sp, #0xc] + add r5, r0, r1 +_0224277E: + ldrh r1, [r5] + add r0, r6, #0 + bl sub_02026FE8 + cmp r0, #0 + beq _02242798 + ldrh r2, [r5] + ldr r0, [sp] + ldr r1, [sp, #4] + ldr r0, [r0, #0] + add r3, r2, #0 + bl sub_02013A4C +_02242798: + ldr r0, [sp, #0x10] + add r5, r5, #2 + add r0, r0, #1 + str r0, [sp, #0x10] + cmp r0, r4 + blt _0224277E +_022427A4: + ldr r0, [sp] + mov r2, #0x79 + add r3, r2, #0 + ldr r0, [r0, #0] + ldr r1, [sp, #8] + sub r3, #0x7b + bl sub_02013A4C + add r0, r7, #1 + add sp, #0x1c + pop {r4, r5, r6, r7, pc} + nop +_022427BC: .word 0x02246928 + thumb_func_end ov94_02242718 + + thumb_func_start ov94_022427C0 +ov94_022427C0: ; 0x022427C0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x38 + ldr r5, [sp, #0x54] + add r7, r0, #0 + add r6, r1, #0 + add r0, r2, #0 + mov r1, #0xf + str r2, [sp, #0x10] + str r3, [sp, #0x14] + bl sub_0201ADA4 + ldrh r1, [r5, #6] + ldrh r0, [r5, #4] + ldr r2, [sp, #0x14] + add r4, r1, r0 + ldr r0, [r5, #0x14] + ldr r1, [sp, #0x50] + str r0, [sp] + ldr r0, [r5, #0x1c] + str r0, [sp, #4] + ldr r0, [sp, #0x58] + str r4, [sp, #8] + str r0, [sp, #0xc] + ldr r3, [r5, #0x18] + add r0, r6, #0 + bl ov94_02242718 + ldr r3, _0224283C ; =0x0224608C + add r5, r0, #0 + add r2, sp, #0x18 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, sp, #0x18 + strh r5, [r0, #0x10] + ldr r0, [r6, #0] + mov r1, #0 + str r0, [sp, #0x18] + ldr r0, [sp, #0x10] + mov r2, #0x1f + mov r3, #0xb + str r0, [sp, #0x24] + bl sub_0200DC48 + lsl r1, r4, #1 + mov r2, #0x43 + add r3, r7, r1 + lsl r2, r2, #6 + ldrh r1, [r3, r2] + add r2, #0x12 + ldrh r2, [r3, r2] + add r0, sp, #0x18 + mov r3, #0x3e + bl sub_0200112C + add sp, #0x38 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224283C: .word 0x0224608C + thumb_func_end ov94_022427C0 + + thumb_func_start ov94_02242840 +ov94_02242840: ; 0x02242840 + push {r4, r5, r6, r7, lr} + sub sp, #0x24 + add r6, r0, #0 + str r1, [sp] + mov r0, #4 + mov r1, #0x3e + add r7, r2, #0 + bl sub_02013A04 + ldr r5, _022428A8 ; =0x0224693C + str r0, [r6, #0] + mov r4, #0 +_02242858: + ldr r0, [r6, #0] + ldr r2, [r5, #0] + ldr r3, [r5, #4] + add r1, r7, #0 + bl sub_02013A4C + add r4, r4, #1 + add r5, #8 + cmp r4, #4 + blt _02242858 + ldr r3, _022428AC ; =0x0224608C + add r2, sp, #4 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + mov r1, #4 + add r0, sp, #4 + strh r1, [r0, #0x10] + ldr r0, [r6, #0] + mov r1, #0 + str r0, [sp, #4] + ldr r0, [sp] + mov r2, #0x1f + mov r3, #0xb + str r0, [sp, #0x10] + bl sub_0200DC48 + mov r1, #0 + add r0, sp, #4 + add r2, r1, #0 + mov r3, #0x3e + bl sub_0200112C + add sp, #0x24 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022428A8: .word 0x0224693C +_022428AC: .word 0x0224608C + thumb_func_end ov94_02242840 + + thumb_func_start ov94_022428B0 +ov94_022428B0: ; 0x022428B0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r7, r0, #0 + str r1, [sp] + str r2, [sp, #4] + cmp r3, #0 + bne _022428C4 + ldr r5, _02242928 ; =0x0224610C + mov r6, #0xd + b _022428C8 +_022428C4: + ldr r5, _0224292C ; =0x022460AC + mov r6, #0xc +_022428C8: + add r0, r6, #0 + mov r1, #0x3e + bl sub_02013A04 + mov r4, #0 + str r0, [r7, #0] + cmp r6, #0 + ble _022428EC +_022428D8: + ldr r0, [r7, #0] + ldr r1, [sp, #4] + ldr r2, [r5, #0] + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 + add r5, #8 + cmp r4, r6 + blt _022428D8 +_022428EC: + ldr r3, _02242930 ; =0x0224608C + add r2, sp, #8 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, sp, #8 + strh r6, [r0, #0x10] + ldr r0, [r7, #0] + mov r1, #0 + str r0, [sp, #8] + ldr r0, [sp] + mov r2, #0x1f + mov r3, #0xb + str r0, [sp, #0x14] + bl sub_0200DC48 + mov r1, #0 + add r0, sp, #8 + add r2, r1, #0 + mov r3, #0x3e + bl sub_0200112C + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + nop +_02242928: .word 0x0224610C +_0224292C: .word 0x022460AC +_02242930: .word 0x0224608C + thumb_func_end ov94_022428B0 + + thumb_func_start ov94_02242934 +ov94_02242934: ; 0x02242934 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + cmp r2, #0 + bne _0224294A + ldr r6, _02242968 ; =0x0224610C + cmp r4, #0xc + blt _02242954 + bl sub_02022974 + b _02242954 +_0224294A: + ldr r6, _0224296C ; =0x022460AC + cmp r4, #0xb + blo _02242954 + bl sub_02022974 +_02242954: + lsl r0, r4, #3 + add r1, r6, r0 + mov r0, #4 + ldrsh r0, [r1, r0] + strb r0, [r5, #3] + mov r0, #6 + ldrsh r0, [r1, r0] + strb r0, [r5, #4] + pop {r4, r5, r6, pc} + nop +_02242968: .word 0x0224610C +_0224296C: .word 0x022460AC + thumb_func_end ov94_02242934 + + thumb_func_start ov94_02242970 +ov94_02242970: ; 0x02242970 + push {r4, r5, r6, r7} + cmp r2, #0 + bne _0224297C + ldr r4, _022429AC ; =0x0224610C + mov r3, #0xd + b _02242980 +_0224297C: + ldr r4, _022429B0 ; =0x022460AC + mov r3, #0xc +_02242980: + mov r2, #0 + cmp r3, #0 + ble _022429A4 + mov r5, #6 + mov r6, #4 +_0224298A: + ldrsh r7, [r4, r6] + cmp r0, r7 + bne _0224299C + ldrsh r7, [r4, r5] + cmp r1, r7 + bne _0224299C + add r0, r2, #0 + pop {r4, r5, r6, r7} + bx lr +_0224299C: + add r2, r2, #1 + add r4, #8 + cmp r2, r3 + blt _0224298A +_022429A4: + mov r0, #0 + pop {r4, r5, r6, r7} + bx lr + nop +_022429AC: .word 0x0224610C +_022429B0: .word 0x022460AC + thumb_func_end ov94_02242970 + + thumb_func_start ov94_022429B4 +ov94_022429B4: ; 0x022429B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x28 + add r5, r0, #0 + str r1, [sp] + str r3, [sp, #4] + mov r0, #0x84 + mov r1, #0x3e + add r7, r2, #0 + bl sub_02013A04 + ldr r1, [sp, #4] + mov r2, #0xa7 + mov r3, #0 + str r0, [r5, #0] + bl sub_02013A4C + mov r0, #0x84 + mov r4, #1 + sub r6, r0, #1 + b _022429F0 +_022429DC: + sub r2, r4, #1 + lsl r3, r2, #1 + ldr r2, _02242A3C ; =0x02246174 + ldr r0, [r5, #0] + ldrh r2, [r2, r3] + add r1, r7, #0 + add r3, r4, #0 + bl sub_02013A4C + add r4, r4, #1 +_022429F0: + cmp r4, r6 + blt _022429DC + ldr r0, [r5, #0] + ldr r1, [sp, #4] + mov r2, #0xa8 + add r3, r6, #0 + bl sub_02013A4C + ldr r3, _02242A40 ; =0x0224608C + add r2, sp, #8 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r1, sp, #8 + mov r0, #0x84 + strh r0, [r1, #0x10] + ldr r0, [r5, #0] + mov r1, #1 + str r0, [sp, #8] + ldr r0, [sp] + mov r2, #0x1f + mov r3, #0xb + str r0, [sp, #0x14] + bl sub_0200DC48 + mov r1, #0 + add r0, sp, #8 + add r2, r1, #0 + mov r3, #0x3e + bl sub_0200112C + add sp, #0x28 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02242A3C: .word 0x02246174 +_02242A40: .word 0x0224608C + thumb_func_end ov94_022429B4 + + thumb_func_start ov94_02242A44 +ov94_02242A44: ; 0x02242A44 + cmp r1, #0 + bne _02242A50 + ldr r1, _02242A64 ; =0x00001150 + mov r2, #0 + str r2, [r0, r1] + bx lr +_02242A50: + sub r1, r1, #1 + cmp r1, #0x82 + bhs _02242A60 + lsl r2, r1, #1 + ldr r1, _02242A68 ; =0x02246174 + ldrh r2, [r1, r2] + ldr r1, _02242A64 ; =0x00001150 + str r2, [r0, r1] +_02242A60: + bx lr + nop +_02242A64: .word 0x00001150 +_02242A68: .word 0x02246174 + thumb_func_end ov94_02242A44 + + thumb_func_start ov94_02242A6C +ov94_02242A6C: ; 0x02242A6C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + bl sub_02001288 + add r6, r0, #0 + add r0, r5, #0 + add r1, sp, #0 + bl sub_020014D0 + add r0, sp, #0 + ldrh r1, [r4] + ldrh r0, [r0] + cmp r1, r0 + beq _02242A9E + ldr r0, _02242AA4 ; =0x0000FFFF + cmp r1, r0 + beq _02242A98 + ldr r0, _02242AA8 ; =0x000005DC + bl sub_02005748 +_02242A98: + add r0, sp, #0 + ldrh r0, [r0] + strh r0, [r4] +_02242A9E: + add r0, r6, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_02242AA4: .word 0x0000FFFF +_02242AA8: .word 0x000005DC + thumb_func_end ov94_02242A6C + + thumb_func_start ov94_02242AAC +ov94_02242AAC: ; 0x02242AAC + mov r2, #0 + add r3, r0, #0 + add r1, r2, #0 +_02242AB2: + strh r1, [r3, #4] + strh r1, [r3, #0x16] + add r2, r2, #1 + add r3, r3, #2 + cmp r2, #9 + blt _02242AB2 + strh r1, [r0] + strh r1, [r0, #2] + bx lr + thumb_func_end ov94_02242AAC + + thumb_func_start ov94_02242AC4 +ov94_02242AC4: ; 0x02242AC4 + lsl r1, r1, #1 + add r0, r0, r1 + strh r2, [r0, #4] + strh r3, [r0, #0x16] + bx lr + ; .align 2, 0 + thumb_func_end ov94_02242AC4 + + .rodata + + + .global Unk_ov94_02245FD4 +Unk_ov94_02245FD4: ; 0x02245FD4 + .incbin "incbin/overlay94_rodata.bin", 0x5DC, 0x5E0 - 0x5DC + + .global Unk_ov94_02245FD8 +Unk_ov94_02245FD8: ; 0x02245FD8 + .incbin "incbin/overlay94_rodata.bin", 0x5E0, 0x5F0 - 0x5E0 + + .global Unk_ov94_02245FE8 +Unk_ov94_02245FE8: ; 0x02245FE8 + .incbin "incbin/overlay94_rodata.bin", 0x5F0, 0x608 - 0x5F0 + + .global Unk_ov94_02246000 +Unk_ov94_02246000: ; 0x02246000 + .incbin "incbin/overlay94_rodata.bin", 0x608, 0x624 - 0x608 + + .global Unk_ov94_0224601C +Unk_ov94_0224601C: ; 0x0224601C + .incbin "incbin/overlay94_rodata.bin", 0x624, 0x640 - 0x624 + + .global Unk_ov94_02246038 +Unk_ov94_02246038: ; 0x02246038 + .incbin "incbin/overlay94_rodata.bin", 0x640, 0x65C - 0x640 + + .global Unk_ov94_02246054 +Unk_ov94_02246054: ; 0x02246054 + .incbin "incbin/overlay94_rodata.bin", 0x65C, 0x678 - 0x65C + + .global Unk_ov94_02246070 +Unk_ov94_02246070: ; 0x02246070 + .incbin "incbin/overlay94_rodata.bin", 0x678, 0x694 - 0x678 + + .global Unk_ov94_0224608C +Unk_ov94_0224608C: ; 0x0224608C + .incbin "incbin/overlay94_rodata.bin", 0x694, 0x6B4 - 0x694 + + .global Unk_ov94_022460AC +Unk_ov94_022460AC: ; 0x022460AC + .incbin "incbin/overlay94_rodata.bin", 0x6B4, 0x714 - 0x6B4 + + .global Unk_ov94_0224610C +Unk_ov94_0224610C: ; 0x0224610C + .incbin "incbin/overlay94_rodata.bin", 0x714, 0x77C - 0x714 + + .global Unk_ov94_02246174 +Unk_ov94_02246174: ; 0x02246174 + .incbin "incbin/overlay94_rodata.bin", 0x77C, 0x104 + + + .data + + + .global Unk_ov94_02246920 +Unk_ov94_02246920: ; 0x02246920 + .incbin "incbin/overlay94_data.bin", 0x520, 0x528 - 0x520 + + .global Unk_ov94_02246928 +Unk_ov94_02246928: ; 0x02246928 + .incbin "incbin/overlay94_data.bin", 0x528, 0x53C - 0x528 + + .global Unk_ov94_0224693C +Unk_ov94_0224693C: ; 0x0224693C + .incbin "incbin/overlay94_data.bin", 0x53C, 0x55C - 0x53C + + .global Unk_ov94_0224695C +Unk_ov94_0224695C: ; 0x0224695C + .incbin "incbin/overlay94_data.bin", 0x55C, 0x44 + diff --git a/asm/ov94_02242AD0.s b/asm/ov94_02242AD0.s new file mode 100644 index 000000000..2a9b25862 --- /dev/null +++ b/asm/ov94_02242AD0.s @@ -0,0 +1,2683 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_02242AD0 +ov94_02242AD0: ; 0x02242AD0 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_02242D84 + ldr r0, [r4, #4] + bl ov94_02242B54 + add r0, r4, #0 + bl ov94_02242CAC + add r0, r4, #0 + bl ov94_02242D38 + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + add r0, r4, #0 + bl ov94_02245934 + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02242AD0 + + thumb_func_start ov94_02242B14 +ov94_02242B14: ; 0x02242B14 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223C4B4 + bl sub_020397B0 + ldr r1, [r4, #0x2c] + add r0, r4, #0 + lsl r2, r1, #2 + ldr r1, _02242B30 ; =0x022469A0 + ldr r1, [r1, r2] + blx r1 + pop {r4, pc} + nop +_02242B30: .word 0x022469A0 + thumb_func_end ov94_02242B14 + + thumb_func_start ov94_02242B34 +ov94_02242B34: ; 0x02242B34 + push {r4, lr} + add r4, r0, #0 + bl ov94_02242D98 + add r0, r4, #0 + bl ov94_02242D74 + ldr r0, [r4, #4] + bl ov94_02242C80 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02242B34 + + thumb_func_start ov94_02242B54 +ov94_02242B54: ; 0x02242B54 + push {r4, r5, lr} + sub sp, #0x9c + ldr r5, _02242C68 ; =0x02246278 + add r3, sp, #0x8c + add r4, r0, #0 + add r2, r3, #0 + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_02018368 + ldr r5, _02242C6C ; =0x022462C0 + add r3, sp, #0x70 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _02242C70 ; =0x022462A4 + add r3, sp, #0x54 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #1 + bl sub_02019EBC + ldr r5, _02242C74 ; =0x022462F8 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #2 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #2 + bl sub_02019EBC + ldr r5, _02242C78 ; =0x022462DC + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _02242C7C ; =0x02246288 + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #1 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x9c + pop {r4, r5, pc} + nop +_02242C68: .word 0x02246278 +_02242C6C: .word 0x022462C0 +_02242C70: .word 0x022462A4 +_02242C74: .word 0x022462F8 +_02242C78: .word 0x022462DC +_02242C7C: .word 0x02246288 + thumb_func_end ov94_02242B54 + + thumb_func_start ov94_02242C80 +ov94_02242C80: ; 0x02242C80 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_02242C80 + + thumb_func_start ov94_02242CAC +ov94_02242CAC: ; 0x02242CAC + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r4, [r5, #4] + mov r0, #0x60 + mov r1, #0 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + mov r0, #0x68 + add r2, r1, #0 + add r3, r1, #0 + bl sub_02006E84 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [r5, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + ldr r0, _02242D34 ; =0x00001090 + ldrh r0, [r5, r0] + cmp r0, #0 + bne _02242D24 + mov r0, #4 + mov r1, #0 + bl sub_02019120 + mov r0, #5 + mov r1, #0 + bl sub_02019120 + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF74 +_02242D24: + ldr r0, [r5, #0x20] + cmp r0, #9 + bne _02242D30 + add r0, r5, #0 + bl ov94_0223D068 +_02242D30: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02242D34: .word 0x00001090 + thumb_func_end ov94_02242CAC + + thumb_func_start ov94_02242D38 +ov94_02242D38: ; 0x02242D38 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + ldr r1, _02242D70 ; =0x00000EFC + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, _02242D70 ; =0x00000EFC + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + add sp, #0x14 + pop {r3, r4, pc} + nop +_02242D70: .word 0x00000EFC + thumb_func_end ov94_02242D38 + + thumb_func_start ov94_02242D74 +ov94_02242D74: ; 0x02242D74 + ldr r1, _02242D7C ; =0x00000EFC + ldr r3, _02242D80 ; =sub_0201A8FC + add r0, r0, r1 + bx r3 + ; .align 2, 0 +_02242D7C: .word 0x00000EFC +_02242D80: .word sub_0201A8FC + thumb_func_end ov94_02242D74 + + thumb_func_start ov94_02242D84 +ov94_02242D84: ; 0x02242D84 + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r4, r1] + pop {r4, pc} + thumb_func_end ov94_02242D84 + + thumb_func_start ov94_02242D98 +ov94_02242D98: ; 0x02242D98 + mov r1, #0xbb + lsl r1, r1, #4 + ldr r3, _02242DA4 ; =sub_020237BC + ldr r0, [r0, r1] + bx r3 + nop +_02242DA4: .word sub_020237BC + thumb_func_end ov94_02242D98 + + thumb_func_start ov94_02242DA8 +ov94_02242DA8: ; 0x02242DA8 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r1, [r4, #0x24] + cmp r1, #0xc + bhi _02242E80 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242DC0: ; jump table + .short _02242E80 - _02242DC0 - 2 ; case 0 + .short _02242E80 - _02242DC0 - 2 ; case 1 + .short _02242E80 - _02242DC0 - 2 ; case 2 + .short _02242E80 - _02242DC0 - 2 ; case 3 + .short _02242E80 - _02242DC0 - 2 ; case 4 + .short _02242E80 - _02242DC0 - 2 ; case 5 + .short _02242E80 - _02242DC0 - 2 ; case 6 + .short _02242DDA - _02242DC0 - 2 ; case 7 + .short _02242DF6 - _02242DC0 - 2 ; case 8 + .short _02242E12 - _02242DC0 - 2 ; case 9 + .short _02242E2E - _02242DC0 - 2 ; case 10 + .short _02242E50 - _02242DC0 - 2 ; case 11 + .short _02242E66 - _02242DC0 - 2 ; case 12 +_02242DDA: + ldr r1, _02242E90 ; =0x00000F0F + mov r2, #0x18 + str r1, [sp] + ldr r1, _02242E94 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #2 + bl ov94_0223C3F4 + b _02242E84 +_02242DF6: + ldr r1, _02242E90 ; =0x00000F0F + mov r2, #0x18 + str r1, [sp] + ldr r1, _02242E94 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #7 + bl ov94_0223C3F4 + b _02242E84 +_02242E12: + ldr r1, _02242E90 ; =0x00000F0F + mov r2, #0x18 + str r1, [sp] + ldr r1, _02242E94 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0xc + bl ov94_0223C3F4 + b _02242E84 +_02242E2E: + ldr r1, _02242E90 ; =0x00000F0F + mov r2, #0x18 + str r1, [sp] + ldr r1, _02242E94 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x12 + bl ov94_0223C3F4 + ldr r0, _02242E98 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + b _02242E84 +_02242E50: + ldr r1, _02242E90 ; =0x00000F0F + mov r2, #0x18 + str r1, [sp] + ldr r1, _02242E94 ; =0x00000B94 + mov r3, #0 + ldr r1, [r4, r1] + bl ov94_02245824 + mov r0, #0x18 + str r0, [r4, #0x2c] + b _02242E84 +_02242E66: + ldr r1, _02242E90 ; =0x00000F0F + mov r2, #0x8e + str r1, [sp] + ldr r1, _02242E94 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + mov r0, #1 + str r0, [r4, #0x18] + mov r0, #0x1d + str r0, [r4, #0x2c] + b _02242E84 +_02242E80: + bl sub_02022974 +_02242E84: + add r0, r4, #0 + bl ov94_0223C5D8 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02242E90: .word 0x00000F0F +_02242E94: .word 0x00000B94 +_02242E98: .word 0x000010B0 + thumb_func_end ov94_02242DA8 + + thumb_func_start ov94_02242E9C +ov94_02242E9C: ; 0x02242E9C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0207893C + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_0223B7E4 + mov r0, #3 + str r0, [r4, #0x2c] + ldr r0, _02242ECC ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #4 + mov r2, #6 + bl ov94_02243EC8 + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02242ECC: .word 0x00001484 + thumb_func_end ov94_02242E9C + + thumb_func_start ov94_02242ED0 +ov94_02242ED0: ; 0x02242ED0 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _02242F58 + bl ov94_0223B7D8 + ldr r1, _02242F74 ; =0x00001484 + mov r2, #0 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0xf + cmp r1, #0xf + bhi _02242F6E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242EFA: ; jump table + .short _02242F4A - _02242EFA - 2 ; case 0 + .short _02242F4A - _02242EFA - 2 ; case 1 + .short _02242F52 - _02242EFA - 2 ; case 2 + .short _02242F42 - _02242EFA - 2 ; case 3 + .short _02242F3A - _02242EFA - 2 ; case 4 + .short _02242F3A - _02242EFA - 2 ; case 5 + .short _02242F3A - _02242EFA - 2 ; case 6 + .short _02242F3A - _02242EFA - 2 ; case 7 + .short _02242F3A - _02242EFA - 2 ; case 8 + .short _02242F3A - _02242EFA - 2 ; case 9 + .short _02242F3A - _02242EFA - 2 ; case 10 + .short _02242F42 - _02242EFA - 2 ; case 11 + .short _02242F6E - _02242EFA - 2 ; case 12 + .short _02242F4A - _02242EFA - 2 ; case 13 + .short _02242F32 - _02242EFA - 2 ; case 14 + .short _02242F1A - _02242EFA - 2 ; case 15 +_02242F1A: + add r0, r4, #0 + mov r1, #1 + bl ov94_02243B08 + ldr r0, [r4, #0] + mov r1, #0x2c + ldr r0, [r0, #0x28] + bl sub_0202CF28 + mov r0, #0x1e + str r0, [r4, #0x2c] + b _02242F6E +_02242F32: + str r0, [r4, #0x3c] + mov r0, #0x26 + str r0, [r4, #0x2c] + b _02242F6E +_02242F3A: + str r0, [r4, #0x3c] + mov r0, #0x27 + str r0, [r4, #0x2c] + b _02242F6E +_02242F42: + str r0, [r4, #0x3c] + mov r0, #0x27 + str r0, [r4, #0x2c] + b _02242F6E +_02242F4A: + str r0, [r4, #0x3c] + mov r0, #0x26 + str r0, [r4, #0x2c] + b _02242F6E +_02242F52: + bl sub_02038A0C + b _02242F6E +_02242F58: + ldr r0, _02242F74 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _02242F6E + bl sub_02038A0C +_02242F6E: + mov r0, #3 + pop {r4, pc} + nop +_02242F74: .word 0x00001484 + thumb_func_end ov94_02242ED0 + + thumb_func_start ov94_02242F78 +ov94_02242F78: ; 0x02242F78 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B834 + mov r0, #5 + str r0, [r4, #0x2c] + ldr r0, _02242F94 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #1 + strh r0, [r4, #0x36] + mov r0, #3 + pop {r4, pc} + nop +_02242F94: .word 0x00001484 + thumb_func_end ov94_02242F78 + + thumb_func_start ov94_02242F98 +ov94_02242F98: ; 0x02242F98 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _02242FFE + bl ov94_0223B7D8 + ldr r1, _02243018 ; =0x00001484 + mov r2, #0 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0xf + cmp r1, #0xf + bhi _02243014 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02242FC2: ; jump table + .short _02242FF0 - _02242FC2 - 2 ; case 0 + .short _02242FF0 - _02242FC2 - 2 ; case 1 + .short _02242FF8 - _02242FC2 - 2 ; case 2 + .short _02242FE8 - _02242FC2 - 2 ; case 3 + .short _02243014 - _02242FC2 - 2 ; case 4 + .short _02243014 - _02242FC2 - 2 ; case 5 + .short _02243014 - _02242FC2 - 2 ; case 6 + .short _02243014 - _02242FC2 - 2 ; case 7 + .short _02243014 - _02242FC2 - 2 ; case 8 + .short _02243014 - _02242FC2 - 2 ; case 9 + .short _02242FF0 - _02242FC2 - 2 ; case 10 + .short _02242FE8 - _02242FC2 - 2 ; case 11 + .short _02242FF0 - _02242FC2 - 2 ; case 12 + .short _02242FF0 - _02242FC2 - 2 ; case 13 + .short _02242FF0 - _02242FC2 - 2 ; case 14 + .short _02242FE2 - _02242FC2 - 2 ; case 15 +_02242FE2: + mov r0, #0x21 + str r0, [r4, #0x2c] + b _02243014 +_02242FE8: + str r0, [r4, #0x3c] + mov r0, #0x27 + str r0, [r4, #0x2c] + b _02243014 +_02242FF0: + mov r0, #4 + bl sub_02038AE0 + b _02243014 +_02242FF8: + bl sub_02038A0C + b _02243014 +_02242FFE: + ldr r0, _02243018 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _02243014 + bl sub_02038A0C +_02243014: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02243018: .word 0x00001484 + thumb_func_end ov94_02242F98 + + thumb_func_start ov94_0224301C +ov94_0224301C: ; 0x0224301C + push {r4, lr} + add r4, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_0223B888 + mov r0, #8 + str r0, [r4, #0x2c] + ldr r0, _02243044 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + add r0, r4, #0 + mov r1, #9 + mov r2, #0xb + bl ov94_02243EC8 + mov r0, #3 + pop {r4, pc} + nop +_02243044: .word 0x00001484 + thumb_func_end ov94_0224301C + + thumb_func_start ov94_02243048 +ov94_02243048: ; 0x02243048 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _022430E0 + bl ov94_0223B7D8 + ldr r1, _022430FC ; =0x00001484 + mov r2, #0 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0xf + cmp r1, #0xf + bhi _022430F6 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02243072: ; jump table + .short _022430D2 - _02243072 - 2 ; case 0 + .short _022430D2 - _02243072 - 2 ; case 1 + .short _022430DA - _02243072 - 2 ; case 2 + .short _022430CA - _02243072 - 2 ; case 3 + .short _022430F6 - _02243072 - 2 ; case 4 + .short _022430F6 - _02243072 - 2 ; case 5 + .short _022430F6 - _02243072 - 2 ; case 6 + .short _022430F6 - _02243072 - 2 ; case 7 + .short _022430F6 - _02243072 - 2 ; case 8 + .short _022430F6 - _02243072 - 2 ; case 9 + .short _022430F6 - _02243072 - 2 ; case 10 + .short _022430C4 - _02243072 - 2 ; case 11 + .short _022430BE - _02243072 - 2 ; case 12 + .short _022430D2 - _02243072 - 2 ; case 13 + .short _022430F6 - _02243072 - 2 ; case 14 + .short _02243092 - _02243072 - 2 ; case 15 +_02243092: + ldr r0, _02243100 ; =0x00000251 + ldrsb r5, [r4, r0] + cmp r5, #0 + beq _022430A0 + mov r0, #0x18 + str r0, [r4, #0x2c] + b _022430F6 +_022430A0: + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0202DAAC + mov r1, #0x13 + lsl r1, r1, #4 + add r2, r0, #0 + add r0, r4, #0 + add r1, r4, r1 + add r3, r5, #0 + bl ov94_02243BC4 + mov r0, #0x1e + str r0, [r4, #0x2c] + b _022430F6 +_022430BE: + mov r0, #0x26 + str r0, [r4, #0x2c] + b _022430F6 +_022430C4: + mov r0, #0x26 + str r0, [r4, #0x2c] + b _022430F6 +_022430CA: + str r0, [r4, #0x3c] + mov r0, #0x27 + str r0, [r4, #0x2c] + b _022430F6 +_022430D2: + str r0, [r4, #0x3c] + mov r0, #0x26 + str r0, [r4, #0x2c] + b _022430F6 +_022430DA: + bl sub_02038A0C + b _022430F6 +_022430E0: + ldr r0, _022430FC ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _022430F6 + bl sub_02038A0C +_022430F6: + mov r0, #3 + pop {r3, r4, r5, pc} + nop +_022430FC: .word 0x00001484 +_02243100: .word 0x00000251 + thumb_func_end ov94_02243048 + + thumb_func_start ov94_02243104 +ov94_02243104: ; 0x02243104 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B96C + mov r0, #0xa + str r0, [r4, #0x2c] + ldr r0, _0224311C ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_0224311C: .word 0x00001484 + thumb_func_end ov94_02243104 + + thumb_func_start ov94_02243120 +ov94_02243120: ; 0x02243120 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _02243184 + bl ov94_0223B7D8 + ldr r1, _022431A0 ; =0x00001484 + mov r2, #0 + add r0, #0xf + str r2, [r4, r1] + cmp r0, #0xf + bhi _0224319A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02243148: ; jump table + .short _02243176 - _02243148 - 2 ; case 0 + .short _02243176 - _02243148 - 2 ; case 1 + .short _0224317E - _02243148 - 2 ; case 2 + .short _02243176 - _02243148 - 2 ; case 3 + .short _0224319A - _02243148 - 2 ; case 4 + .short _0224319A - _02243148 - 2 ; case 5 + .short _0224319A - _02243148 - 2 ; case 6 + .short _0224319A - _02243148 - 2 ; case 7 + .short _0224319A - _02243148 - 2 ; case 8 + .short _0224319A - _02243148 - 2 ; case 9 + .short _0224316E - _02243148 - 2 ; case 10 + .short _0224316E - _02243148 - 2 ; case 11 + .short _0224316E - _02243148 - 2 ; case 12 + .short _02243176 - _02243148 - 2 ; case 13 + .short _0224319A - _02243148 - 2 ; case 14 + .short _02243168 - _02243148 - 2 ; case 15 +_02243168: + mov r0, #0x21 + str r0, [r4, #0x2c] + b _0224319A +_0224316E: + mov r0, #3 + bl sub_02038AE0 + b _0224319A +_02243176: + mov r0, #4 + bl sub_02038AE0 + b _0224319A +_0224317E: + bl sub_02038A0C + b _0224319A +_02243184: + ldr r0, _022431A0 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _0224319A + bl sub_02038A0C +_0224319A: + mov r0, #3 + pop {r4, pc} + nop +_022431A0: .word 0x00001484 + thumb_func_end ov94_02243120 + + thumb_func_start ov94_022431A4 +ov94_022431A4: ; 0x022431A4 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_0207893C + mov r1, #0x12 + lsl r1, r1, #4 + ldr r2, [r4, r1] + add r0, r1, #4 + mul r0, r2 + add r2, r4, r0 + mov r0, #0xd7 + lsl r0, r0, #2 + ldr r0, [r2, r0] + mov r2, #0xa5 + add r1, #0x10 + lsl r2, r2, #4 + add r1, r4, r1 + add r2, r4, r2 + bl ov94_0223BA88 + add r0, r4, #0 + mov r1, #0xe + mov r2, #0x10 + bl ov94_02243EC8 + mov r0, #0xd + str r0, [r4, #0x2c] + ldr r0, _022431EC ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_022431EC: .word 0x00001484 + thumb_func_end ov94_022431A4 + + thumb_func_start ov94_022431F0 +ov94_022431F0: ; 0x022431F0 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _022432BA + bl ov94_0223B7D8 + ldr r2, _022432D4 ; =0x00001484 + mov r1, #0 + str r1, [r4, r2] + add r2, r0, #0 + add r2, #0xf + cmp r2, #0xf + bhi _022432D0 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224321A: ; jump table + .short _022432AC - _0224321A - 2 ; case 0 + .short _022432AC - _0224321A - 2 ; case 1 + .short _022432B4 - _0224321A - 2 ; case 2 + .short _022432A4 - _0224321A - 2 ; case 3 + .short _0224329C - _0224321A - 2 ; case 4 + .short _0224329C - _0224321A - 2 ; case 5 + .short _0224329C - _0224321A - 2 ; case 6 + .short _0224329C - _0224321A - 2 ; case 7 + .short _0224329C - _0224321A - 2 ; case 8 + .short _0224329C - _0224321A - 2 ; case 9 + .short _02243294 - _0224321A - 2 ; case 10 + .short _022432D0 - _0224321A - 2 ; case 11 + .short _022432D0 - _0224321A - 2 ; case 12 + .short _022432AC - _0224321A - 2 ; case 13 + .short _022432D0 - _0224321A - 2 ; case 14 + .short _0224323A - _0224321A - 2 ; case 15 +_0224323A: + mov r0, #0x1e + str r0, [r4, #0x2c] + add r0, r4, #0 + bl ov94_02243B08 + mov r2, #0x45 + lsl r2, r2, #2 + mov r1, #0xa5 + lsl r1, r1, #4 + ldrh r2, [r4, r2] + add r0, r4, #0 + add r1, r4, r1 + bl ov94_02243CE4 + ldr r0, [r4, #0] + mov r1, #0xa5 + lsl r1, r1, #4 + ldr r0, [r0, #0x18] + add r1, r4, r1 + bl ov94_02243E2C + ldr r0, [r4, #0] + mov r1, #0x19 + ldr r0, [r0, #0x28] + bl sub_0202CFEC + ldr r0, [r4, #0] + mov r1, #0xa5 + lsl r1, r1, #4 + ldr r0, [r0, #0x2c] + add r1, r4, r1 + bl ov94_02243E48 + ldr r0, [r4, #0] + mov r1, #0x18 + ldr r0, [r0, #0x28] + bl sub_0202CF28 + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_0202440C + bl sub_0206D104 + b _022432D0 +_02243294: + str r0, [r4, #0x3c] + mov r0, #0x11 + str r0, [r4, #0x2c] + b _022432D0 +_0224329C: + str r0, [r4, #0x3c] + mov r0, #0x27 + str r0, [r4, #0x2c] + b _022432D0 +_022432A4: + str r0, [r4, #0x3c] + mov r0, #0x27 + str r0, [r4, #0x2c] + b _022432D0 +_022432AC: + str r0, [r4, #0x3c] + mov r0, #0x26 + str r0, [r4, #0x2c] + b _022432D0 +_022432B4: + bl sub_02038A0C + b _022432D0 +_022432BA: + ldr r0, _022432D4 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _022432D0 + bl sub_02038A0C +_022432D0: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_022432D4: .word 0x00001484 + thumb_func_end ov94_022431F0 + + thumb_func_start ov94_022432D8 +ov94_022432D8: ; 0x022432D8 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223BAEC + mov r0, #0xf + str r0, [r4, #0x2c] + ldr r0, _022432F0 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_022432F0: .word 0x00001484 + thumb_func_end ov94_022432D8 + + thumb_func_start ov94_022432F4 +ov94_022432F4: ; 0x022432F4 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _02243358 + bl ov94_0223B7D8 + ldr r1, _02243374 ; =0x00001484 + mov r2, #0 + add r0, #0xf + str r2, [r4, r1] + cmp r0, #0xf + bhi _0224336E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224331C: ; jump table + .short _0224334A - _0224331C - 2 ; case 0 + .short _0224334A - _0224331C - 2 ; case 1 + .short _02243352 - _0224331C - 2 ; case 2 + .short _0224334A - _0224331C - 2 ; case 3 + .short _0224336E - _0224331C - 2 ; case 4 + .short _0224336E - _0224331C - 2 ; case 5 + .short _0224336E - _0224331C - 2 ; case 6 + .short _0224336E - _0224331C - 2 ; case 7 + .short _0224336E - _0224331C - 2 ; case 8 + .short _0224336E - _0224331C - 2 ; case 9 + .short _02243342 - _0224331C - 2 ; case 10 + .short _0224336E - _0224331C - 2 ; case 11 + .short _0224336E - _0224331C - 2 ; case 12 + .short _0224334A - _0224331C - 2 ; case 13 + .short _0224336E - _0224331C - 2 ; case 14 + .short _0224333C - _0224331C - 2 ; case 15 +_0224333C: + mov r0, #0x21 + str r0, [r4, #0x2c] + b _0224336E +_02243342: + mov r0, #3 + bl sub_02038AE0 + b _0224336E +_0224334A: + mov r0, #4 + bl sub_02038AE0 + b _0224336E +_02243352: + bl sub_02038A0C + b _0224336E +_02243358: + ldr r0, _02243374 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _0224336E + bl sub_02038A0C +_0224336E: + mov r0, #3 + pop {r4, pc} + nop +_02243374: .word 0x00001484 + thumb_func_end ov94_022432F4 + + thumb_func_start ov94_02243378 +ov94_02243378: ; 0x02243378 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_0223B8D8 + mov r0, #0x19 + str r0, [r4, #0x2c] + ldr r0, _02243394 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02243394: .word 0x00001484 + thumb_func_end ov94_02243378 + + thumb_func_start ov94_02243398 +ov94_02243398: ; 0x02243398 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + bne _022433A6 + b _02243528 +_022433A6: + bl ov94_0223B7D8 + ldr r1, _02243544 ; =0x00001484 + mov r2, #0 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0xf + cmp r1, #0x10 + bhi _02243408 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022433C4: ; jump table + .short _02243516 - _022433C4 - 2 ; case 0 + .short _02243516 - _022433C4 - 2 ; case 1 + .short _0224351E - _022433C4 - 2 ; case 2 + .short _02243516 - _022433C4 - 2 ; case 3 + .short _0224353E - _022433C4 - 2 ; case 4 + .short _0224353E - _022433C4 - 2 ; case 5 + .short _0224353E - _022433C4 - 2 ; case 6 + .short _0224353E - _022433C4 - 2 ; case 7 + .short _0224353E - _022433C4 - 2 ; case 8 + .short _0224353E - _022433C4 - 2 ; case 9 + .short _0224353E - _022433C4 - 2 ; case 10 + .short _022434C8 - _022433C4 - 2 ; case 11 + .short _0224345E - _022433C4 - 2 ; case 12 + .short _02243516 - _022433C4 - 2 ; case 13 + .short _0224353E - _022433C4 - 2 ; case 14 + .short _022433E6 - _022433C4 - 2 ; case 15 + .short _022433EC - _022433C4 - 2 ; case 16 +_022433E6: + mov r0, #0x1a + str r0, [r4, #0x2c] + b _0224353E +_022433EC: + mov r1, #0x13 + mov r0, #1 + lsl r1, r1, #4 + strh r0, [r4, #0x36] + add r0, r4, #0 + add r1, r4, r1 + bl ov94_02243E84 + cmp r0, #0 + beq _02243452 + cmp r0, #1 + beq _0224340A + cmp r0, #2 + beq _0224342E +_02243408: + b _0224353E +_0224340A: + add r0, r4, #0 + bl ov94_0223C5F4 + ldr r0, _02243548 ; =0x00000F0F + ldr r1, _0224354C ; =0x00000B94 + str r0, [sp] + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x1d + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x1c + bl ov94_0223C3F4 + b _0224353E +_0224342E: + add r0, r4, #0 + bl ov94_0223C5F4 + ldr r0, _02243548 ; =0x00000F0F + ldr r1, _0224354C ; =0x00000B94 + str r0, [sp] + ldr r1, [r4, r1] + add r0, r4, #0 + mov r2, #0x23 + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x1c + bl ov94_0223C3F4 + b _0224353E +_02243452: + mov r0, #0x12 + str r0, [r4, #0x2c] + ldr r0, _02243550 ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + b _0224353E +_0224345E: + strh r2, [r4, #0x36] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0202DA60 + cmp r0, #0 + beq _022434C0 + mov r0, #0x3e + bl sub_02073C74 + add r5, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + ldr r0, [r0, #0] + bl sub_0202DA70 + add r0, r5, #0 + bl sub_02076B10 + add r2, r0, #0 + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B5CC + mov r0, #2 + str r0, [r4, #0x28] + mov r0, #0x22 + str r0, [r4, #0x2c] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0202DAAC + add r2, r0, #0 + add r0, r4, #0 + add r1, r5, #0 + mov r3, #0 + bl ov94_02243BC4 + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0202DA68 + add r0, r5, #0 + bl sub_020181C4 + b _0224353E +_022434C0: + add r0, r4, #0 + bl ov94_0224362C + b _0224353E +_022434C8: + strh r2, [r4, #0x36] + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0202DA60 + cmp r0, #0 + beq _0224353E + mov r0, #0x3e + bl sub_02073C74 + add r5, r0, #0 + ldr r0, [r4, #0] + add r1, r5, #0 + ldr r0, [r0, #0] + bl sub_0202DA70 + add r0, r5, #0 + bl sub_02076B10 + add r2, r0, #0 + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #0 + bl sub_0200B5CC + mov r0, #3 + str r0, [r4, #0x28] + mov r0, #0x22 + str r0, [r4, #0x2c] + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0202DA68 + add r0, r5, #0 + bl sub_020181C4 + b _0224353E +_02243516: + str r0, [r4, #0x3c] + mov r0, #0x26 + str r0, [r4, #0x2c] + b _0224353E +_0224351E: + mov r0, #3 + mov r1, #1 + bl sub_02039834 + b _0224353E +_02243528: + ldr r0, _02243544 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _0224353E + bl sub_02038A0C +_0224353E: + mov r0, #3 + pop {r3, r4, r5, pc} + nop +_02243544: .word 0x00001484 +_02243548: .word 0x00000F0F +_0224354C: .word 0x00000B94 +_02243550: .word 0x000010B0 + thumb_func_end ov94_02243398 + + thumb_func_start ov94_02243554 +ov94_02243554: ; 0x02243554 + push {r4, lr} + mov r1, #1 + mov r2, #0 + add r4, r0, #0 + bl ov94_0223C4C0 + mov r0, #0x24 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_02243554 + + thumb_func_start ov94_02243568 +ov94_02243568: ; 0x02243568 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_0223B888 + mov r0, #0x1b + str r0, [r4, #0x2c] + ldr r0, _02243584 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02243584: .word 0x00001484 + thumb_func_end ov94_02243568 + + thumb_func_start ov94_02243588 +ov94_02243588: ; 0x02243588 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _0224360C + bl ov94_0223B7D8 + ldr r2, _02243628 ; =0x00001484 + mov r1, #0 + str r1, [r4, r2] + add r2, r0, #0 + add r2, #0xf + cmp r2, #0xf + bhi _02243604 + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_022435B2: ; jump table + .short _022435F2 - _022435B2 - 2 ; case 0 + .short _022435F2 - _022435B2 - 2 ; case 1 + .short _022435FC - _022435B2 - 2 ; case 2 + .short _022435F2 - _022435B2 - 2 ; case 3 + .short _02243604 - _022435B2 - 2 ; case 4 + .short _02243604 - _022435B2 - 2 ; case 5 + .short _02243604 - _022435B2 - 2 ; case 6 + .short _02243604 - _022435B2 - 2 ; case 7 + .short _02243604 - _022435B2 - 2 ; case 8 + .short _02243604 - _022435B2 - 2 ; case 9 + .short _02243604 - _022435B2 - 2 ; case 10 + .short _02243604 - _022435B2 - 2 ; case 11 + .short _022435EE - _022435B2 - 2 ; case 12 + .short _022435F2 - _022435B2 - 2 ; case 13 + .short _02243604 - _022435B2 - 2 ; case 14 + .short _022435D2 - _022435B2 - 2 ; case 15 +_022435D2: + add r0, r4, #0 + bl ov94_02243ED8 + cmp r0, #0 + beq _022435E8 + mov r0, #0x16 + str r0, [r4, #0x2c] + mov r0, #0 + strh r0, [r4, #0x36] + mov r0, #3 + pop {r4, pc} +_022435E8: + mov r0, #1 + strh r0, [r4, #0x36] + b _02243604 +_022435EE: + strh r1, [r4, #0x36] + b _02243604 +_022435F2: + str r0, [r4, #0x3c] + mov r0, #0x26 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} +_022435FC: + bl sub_02038A0C + mov r0, #3 + pop {r4, pc} +_02243604: + add r0, r4, #0 + bl ov94_0224362C + b _02243622 +_0224360C: + ldr r0, _02243628 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _02243622 + bl sub_02038A0C +_02243622: + mov r0, #3 + pop {r4, pc} + nop +_02243628: .word 0x00001484 + thumb_func_end ov94_02243588 + + thumb_func_start ov94_0224362C +ov94_0224362C: ; 0x0224362C + push {r4, lr} + add r4, r0, #0 + ldr r1, [r4, #0x1c] + cmp r1, #1 + beq _0224363C + cmp r1, #2 + beq _0224364A + pop {r4, pc} +_0224363C: + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #0x24 + str r0, [r4, #0x2c] + pop {r4, pc} +_0224364A: + mov r1, #2 + mov r2, #3 + bl ov94_0223C4C0 + mov r0, #0x24 + str r0, [r4, #0x2c] + pop {r4, pc} + thumb_func_end ov94_0224362C + + thumb_func_start ov94_02243658 +ov94_02243658: ; 0x02243658 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0202DAAC + ldr r3, _022436D0 ; =0x00000251 + mov r1, #0x13 + lsl r1, r1, #4 + add r2, r0, #0 + ldrsb r3, [r4, r3] + add r0, r4, #0 + add r1, r4, r1 + bl ov94_02243BC4 + ldr r0, [r4, #0] + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, #0x18] + add r1, r4, r1 + bl ov94_02243E2C + ldr r0, [r4, #0] + mov r1, #0x19 + ldr r0, [r0, #0x28] + bl sub_0202CFEC + ldr r0, [r4, #0] + mov r1, #0x13 + lsl r1, r1, #4 + ldr r0, [r0, #0x2c] + add r1, r4, r1 + bl ov94_02243E48 + ldr r0, [r4, #0] + mov r1, #0x18 + ldr r0, [r0, #0x28] + bl sub_0202CF28 + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_0202440C + bl sub_0206D104 + ldr r0, [r4, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0202DA68 + mov r0, #0x1e + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #0x13 + mov r2, #0xb + bl ov94_02243EC8 + mov r0, #3 + pop {r4, pc} + nop +_022436D0: .word 0x00000251 + thumb_func_end ov94_02243658 + + thumb_func_start ov94_022436D4 +ov94_022436D4: ; 0x022436D4 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B928 + mov r0, #0x14 + str r0, [r4, #0x2c] + ldr r0, _022436EC ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_022436EC: .word 0x00001484 + thumb_func_end ov94_022436D4 + + thumb_func_start ov94_022436F0 +ov94_022436F0: ; 0x022436F0 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _02243758 + bl ov94_0223B7D8 + ldr r1, _02243774 ; =0x00001484 + mov r2, #0 + str r2, [r4, r1] + add r1, r0, #0 + add r1, #0xf + cmp r1, #0xf + bhi _0224376E + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224371A: ; jump table + .short _0224374A - _0224371A - 2 ; case 0 + .short _0224374A - _0224371A - 2 ; case 1 + .short _02243752 - _0224371A - 2 ; case 2 + .short _02243748 - _0224371A - 2 ; case 3 + .short _0224376E - _0224371A - 2 ; case 4 + .short _0224376E - _0224371A - 2 ; case 5 + .short _0224376E - _0224371A - 2 ; case 6 + .short _0224376E - _0224371A - 2 ; case 7 + .short _0224376E - _0224371A - 2 ; case 8 + .short _0224376E - _0224371A - 2 ; case 9 + .short _0224376E - _0224371A - 2 ; case 10 + .short _02243748 - _0224371A - 2 ; case 11 + .short _02243740 - _0224371A - 2 ; case 12 + .short _0224374A - _0224371A - 2 ; case 13 + .short _0224376E - _0224371A - 2 ; case 14 + .short _0224373A - _0224371A - 2 ; case 15 +_0224373A: + mov r0, #0x21 + str r0, [r4, #0x2c] + b _0224376E +_02243740: + mov r0, #3 + bl sub_02038AE0 + b _0224376E +_02243748: + str r0, [r4, #0x3c] +_0224374A: + mov r0, #4 + bl sub_02038AE0 + b _0224376E +_02243752: + bl sub_02038A0C + b _0224376E +_02243758: + ldr r0, _02243774 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _0224376E + bl sub_02038A0C +_0224376E: + mov r0, #3 + pop {r4, pc} + nop +_02243774: .word 0x00001484 + thumb_func_end ov94_022436F0 + + thumb_func_start ov94_02243778 +ov94_02243778: ; 0x02243778 + mov r0, #3 + bx lr + thumb_func_end ov94_02243778 + + thumb_func_start ov94_0224377C +ov94_0224377C: ; 0x0224377C + push {r4, lr} + add r4, r0, #0 + mov r1, #1 + strh r1, [r4, #0x36] + mov r1, #9 + mov r2, #7 + bl ov94_0223C4C0 + mov r0, #0x24 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_0224377C + + thumb_func_start ov94_02243794 +ov94_02243794: ; 0x02243794 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + strh r1, [r4, #0x36] + mov r1, #9 + mov r2, #8 + bl ov94_0223C4C0 + mov r0, #0x24 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_02243794 + + thumb_func_start ov94_022437AC +ov94_022437AC: ; 0x022437AC + push {r4, lr} + mov r1, #9 + add r2, r1, #0 + add r4, r0, #0 + bl ov94_0223C4C0 + mov r0, #0x24 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_022437AC + + thumb_func_start ov94_022437C0 +ov94_022437C0: ; 0x022437C0 + push {r4, lr} + add r4, r0, #0 + mov r1, #0 + strh r1, [r4, #0x36] + mov r1, #9 + mov r2, #0xa + bl ov94_0223C4C0 + mov r0, #0x1e + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_022437C0 + + thumb_func_start ov94_022437D8 +ov94_022437D8: ; 0x022437D8 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B96C + mov r0, #0x17 + str r0, [r4, #0x2c] + ldr r0, _022437F0 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_022437F0: .word 0x00001484 + thumb_func_end ov94_022437D8 + + thumb_func_start ov94_022437F4 +ov94_022437F4: ; 0x022437F4 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _02243866 + bl ov94_0223B7D8 + ldr r1, _02243880 ; =0x00001484 + mov r2, #0 + add r0, #0xf + str r2, [r4, r1] + cmp r0, #0xf + bhi _0224387C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224381C: ; jump table + .short _02243858 - _0224381C - 2 ; case 0 + .short _02243858 - _0224381C - 2 ; case 1 + .short _02243860 - _0224381C - 2 ; case 2 + .short _02243858 - _0224381C - 2 ; case 3 + .short _0224387C - _0224381C - 2 ; case 4 + .short _0224387C - _0224381C - 2 ; case 5 + .short _0224387C - _0224381C - 2 ; case 6 + .short _0224387C - _0224381C - 2 ; case 7 + .short _0224387C - _0224381C - 2 ; case 8 + .short _0224387C - _0224381C - 2 ; case 9 + .short _02243850 - _0224381C - 2 ; case 10 + .short _0224384A - _0224381C - 2 ; case 11 + .short _02243844 - _0224381C - 2 ; case 12 + .short _02243858 - _0224381C - 2 ; case 13 + .short _0224387C - _0224381C - 2 ; case 14 + .short _0224383C - _0224381C - 2 ; case 15 +_0224383C: + add r0, r4, #0 + bl ov94_0224362C + b _0224387C +_02243844: + add r0, r4, #0 + bl ov94_0224362C +_0224384A: + add r0, r4, #0 + bl ov94_0224362C +_02243850: + mov r0, #3 + bl sub_02038AE0 + b _0224387C +_02243858: + mov r0, #4 + bl sub_02038AE0 + b _0224387C +_02243860: + bl sub_02038A0C + b _0224387C +_02243866: + ldr r0, _02243880 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _0224387C + bl sub_02038A0C +_0224387C: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02243880: .word 0x00001484 + thumb_func_end ov94_022437F4 + + thumb_func_start ov94_02243884 +ov94_02243884: ; 0x02243884 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _022438C0 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + ldr r1, _022438C4 ; =0x00000B94 + mov r2, #0x8d + ldr r1, [r4, r1] + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x24 + bl ov94_0223C3F4 + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + add r0, r4, #0 + bl ov94_0223C5F4 + add r0, r4, #0 + bl ov94_022442E4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_022438C0: .word 0x00000F0F +_022438C4: .word 0x00000B94 + thumb_func_end ov94_02243884 + + thumb_func_start ov94_022438C8 +ov94_022438C8: ; 0x022438C8 + push {r3, lr} + ldr r1, [r0, #0x3c] + mov r2, #0x94 + add r1, #0xf + cmp r1, #0xe + bhi _02243908 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022438E0: ; jump table + .short _02243908 - _022438E0 - 2 ; case 0 + .short _02243906 - _022438E0 - 2 ; case 1 + .short _02243908 - _022438E0 - 2 ; case 2 + .short _02243908 - _022438E0 - 2 ; case 3 + .short _022438FE - _022438E0 - 2 ; case 4 + .short _022438FE - _022438E0 - 2 ; case 5 + .short _022438FE - _022438E0 - 2 ; case 6 + .short _022438FE - _022438E0 - 2 ; case 7 + .short _022438FE - _022438E0 - 2 ; case 8 + .short _022438FE - _022438E0 - 2 ; case 9 + .short _02243908 - _022438E0 - 2 ; case 10 + .short _02243908 - _022438E0 - 2 ; case 11 + .short _02243908 - _022438E0 - 2 ; case 12 + .short _02243906 - _022438E0 - 2 ; case 13 + .short _02243902 - _022438E0 - 2 ; case 14 +_022438FE: + mov r2, #0x1a + b _02243908 +_02243902: + mov r2, #0x91 + b _02243908 +_02243906: + mov r2, #0x96 +_02243908: + ldr r1, _02243918 ; =0x00000F0F + mov r3, #1 + str r1, [sp] + ldr r1, _0224391C ; =0x00000B94 + ldr r1, [r0, r1] + bl ov94_02245824 + pop {r3, pc} + ; .align 2, 0 +_02243918: .word 0x00000F0F +_0224391C: .word 0x00000B94 + thumb_func_end ov94_022438C8 + + thumb_func_start ov94_02243920 +ov94_02243920: ; 0x02243920 + push {r4, lr} + add r4, r0, #0 + bl ov94_022438C8 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x24 + bl ov94_0223C3F4 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + add r0, r4, #0 + bl ov94_0223C5F4 + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02243920 + + thumb_func_start ov94_02243948 +ov94_02243948: ; 0x02243948 + push {r4, lr} + add r4, r0, #0 + bl ov94_022438C8 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x24 + bl ov94_0223C3F4 + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + add r0, r4, #0 + bl ov94_0223C5F4 + add r0, r4, #0 + bl ov94_022442E4 + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_02243948 + + thumb_func_start ov94_02243974 +ov94_02243974: ; 0x02243974 + push {r4, lr} + add r4, r0, #0 + mov r1, #0x25 + mov r2, #0x1e + bl ov94_0223C3F4 + add r0, r4, #0 + mov r1, #0x21 + mov r2, #0x24 + bl ov94_02243EC8 + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02243974 + + thumb_func_start ov94_02243990 +ov94_02243990: ; 0x02243990 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl sub_02024804 + ldr r0, [r4, #0] + mov r1, #2 + ldr r0, [r0, #0x20] + bl sub_02024814 + mov r0, #0x1f + str r0, [r4, #0x2c] + bl sub_0201D2E8 + ldr r1, _022439C8 ; =0x00000445 + bl sub_020E1F6C + lsl r0, r0, #0x10 + lsr r5, r0, #0x10 + cmp r5, #0x3c + blo _022439BC + bl sub_02022974 +_022439BC: + mov r0, #0x42 + add r1, r5, #2 + lsl r0, r0, #6 + str r1, [r4, r0] + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022439C8: .word 0x00000445 + thumb_func_end ov94_02243990 + + thumb_func_start ov94_022439CC +ov94_022439CC: ; 0x022439CC + mov r1, #0x42 + lsl r1, r1, #6 + ldr r2, [r0, r1] + sub r2, r2, #1 + str r2, [r0, r1] + ldr r1, [r0, r1] + cmp r1, #0 + bne _022439E0 + mov r1, #0x20 + str r1, [r0, #0x2c] +_022439E0: + mov r0, #3 + bx lr + thumb_func_end ov94_022439CC + + thumb_func_start ov94_022439E4 +ov94_022439E4: ; 0x022439E4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_02024828 + cmp r0, #1 + bne _022439FA + ldr r0, _02243A00 ; =0x00001088 + ldrh r0, [r4, r0] + str r0, [r4, #0x2c] +_022439FA: + mov r0, #3 + pop {r4, pc} + nop +_02243A00: .word 0x00001088 + thumb_func_end ov94_022439E4 + + thumb_func_start ov94_02243A04 +ov94_02243A04: ; 0x02243A04 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_02024828 + cmp r0, #2 + bne _02243A20 + ldr r0, _02243A24 ; =0x0000108A + ldrh r0, [r4, r0] + str r0, [r4, #0x2c] + add r0, r4, #0 + bl ov94_0223C5F4 +_02243A20: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02243A24: .word 0x0000108A + thumb_func_end ov94_02243A04 + + thumb_func_start ov94_02243A28 +ov94_02243A28: ; 0x02243A28 + push {r4, lr} + add r4, r0, #0 + bl sub_02024804 + ldr r0, [r4, #0] + mov r1, #2 + ldr r0, [r0, #0x20] + bl sub_02024814 + mov r0, #0x23 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02243A28 + + thumb_func_start ov94_02243A44 +ov94_02243A44: ; 0x02243A44 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_02024828 + cmp r0, #2 + bne _02243A82 + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + add r0, r4, #0 + bl ov94_0223C5F4 + ldr r0, _02243A88 ; =0x00000F0F + ldr r1, _02243A8C ; =0x00000B94 + str r0, [sp] + ldr r1, [r4, r1] + ldr r2, [r4, #0x28] + add r0, r4, #0 + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x25 + mov r2, #0x1c + bl ov94_0223C3F4 +_02243A82: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02243A88: .word 0x00000F0F +_02243A8C: .word 0x00000B94 + thumb_func_end ov94_02243A44 + + thumb_func_start ov94_02243A90 +ov94_02243A90: ; 0x02243A90 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_0223C5F4 + bl sub_02039794 + ldr r0, _02243AE4 ; =0x000010B0 + ldr r0, [r4, r0] + cmp r0, #1 + bne _02243AC0 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + b _02243AD8 +_02243AC0: + mov r0, #6 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 +_02243AD8: + mov r0, #0 + str r0, [r4, #0x2c] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + nop +_02243AE4: .word 0x000010B0 + thumb_func_end ov94_02243A90 + + thumb_func_start ov94_02243AE8 +ov94_02243AE8: ; 0x02243AE8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02243B04 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02243B00 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_02243B00: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02243B04: .word 0x00000BE4 + thumb_func_end ov94_02243AE8 + + thumb_func_start ov94_02243B08 +ov94_02243B08: ; 0x02243B08 + push {r4, r5, r6, lr} + add r6, r1, #0 + mov r1, #0x45 + add r5, r0, #0 + lsl r1, r1, #2 + ldrh r0, [r5, r1] + cmp r0, #0x12 + beq _02243B62 + mov r0, #0x3e + bl sub_02073C74 + mov r2, #0x45 + lsl r2, r2, #2 + add r4, r0, #0 + ldr r0, [r5, #0] + ldrh r1, [r5, r2] + add r2, r2, #2 + ldrh r2, [r5, r2] + ldr r0, [r0, #0xc] + bl sub_02079C9C + add r1, r4, #0 + bl sub_020774C8 + mov r2, #0x45 + ldr r0, [r5, #0] + lsl r2, r2, #2 + ldrh r2, [r5, r2] + ldr r0, [r0, #0] + add r1, r4, #0 + bl sub_0202DA7C + mov r2, #0x45 + lsl r2, r2, #2 + ldr r0, [r5, #0] + ldrh r1, [r5, r2] + add r2, r2, #2 + ldrh r2, [r5, r2] + ldr r0, [r0, #0xc] + bl sub_02079968 + add r0, r4, #0 + bl sub_020181C4 + b _02243BAA +_02243B62: + ldr r0, [r5, #0] + add r1, r1, #2 + ldrh r1, [r5, r1] + ldr r0, [r0, #8] + bl sub_0207A0FC + add r4, r0, #0 + bl sub_0207893C + mov r2, #0x45 + ldr r0, [r5, #0] + lsl r2, r2, #2 + ldrh r2, [r5, r2] + ldr r0, [r0, #0] + add r1, r4, #0 + bl sub_0202DA7C + ldr r1, _02243BBC ; =0x00000116 + ldr r0, [r5, #0] + ldrh r1, [r5, r1] + ldr r0, [r0, #8] + bl sub_0207A080 + ldr r0, [r5, #0] + ldr r1, _02243BC0 ; =0x000001B9 + ldr r0, [r0, #8] + bl sub_0207A230 + cmp r0, #0 + bne _02243BAA + ldr r0, [r5, #0] + ldr r0, [r0, #0x20] + bl sub_0202CC98 + bl sub_0202CCA8 +_02243BAA: + cmp r6, #0 + beq _02243BB8 + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl sub_0202DA68 +_02243BB8: + pop {r4, r5, r6, pc} + nop +_02243BBC: .word 0x00000116 +_02243BC0: .word 0x000001B9 + thumb_func_end ov94_02243B08 + + thumb_func_start ov94_02243BC4 +ov94_02243BC4: ; 0x02243BC4 + push {r0, r1, r2, r3} + push {r4, r5, r6, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #6 + mov r2, #0 + add r6, r3, #0 + bl sub_02074470 + ldr r0, [r5, #0] + add r1, r4, #0 + ldr r0, [r0, #0x20] + bl sub_0202F180 + mov r0, #0x12 + str r0, [sp, #0x20] + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + cmp r0, #6 + bne _02243BF8 + mov r0, #0 + str r0, [sp, #0x20] +_02243BF8: + cmp r6, #0 + beq _02243C74 + mov r1, #0x46 + add r0, sp, #0 + strb r1, [r0] + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + ldr r1, _02243CE0 ; =0x000001ED + cmp r0, r1 + bne _02243C56 + add r0, r4, #0 + mov r1, #0x6e + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _02243C3C + add r0, r4, #0 + mov r1, #0x99 + mov r2, #0 + bl sub_02074470 + cmp r0, #0x56 + bne _02243C56 + add r0, r4, #0 + mov r1, #0x6e + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _02243C56 +_02243C3C: + ldr r0, [r5, #0] + ldr r0, [r0, #0x20] + bl sub_020507E4 + add r6, r0, #0 + bl sub_0206B5F8 + cmp r0, #0 + bne _02243C56 + add r0, r6, #0 + mov r1, #1 + bl sub_0206B608 +_02243C56: + add r0, r4, #0 + mov r1, #9 + add r2, sp, #0 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0x6f + mov r2, #0 + bl sub_02074B30 + ldr r0, [r5, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl ov94_02243DE8 +_02243C74: + ldr r0, [sp, #0x20] + cmp r0, #0x12 + bne _02243C9C + ldr r0, [r5, #0] + add r1, r4, #0 + ldr r0, [r0, #8] + bl sub_0207A048 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + mov r1, #0x4a + mov r2, #0x12 + lsl r1, r1, #2 + str r2, [r5, r1] + sub r2, r0, #1 + add r0, r1, #4 + str r2, [r5, r0] + b _02243CCC +_02243C9C: + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r1, sp, #0x20 + ldr r0, [r0, #0xc] + add r2, sp, #4 + bl sub_020799F0 + add r0, r4, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r5, #0] + ldr r1, [sp, #0x20] + ldr r0, [r0, #0xc] + bl sub_020798A0 + mov r0, #0x4a + ldr r1, [sp, #0x20] + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r1, [sp, #4] + add r0, r0, #4 + str r1, [r5, r0] +_02243CCC: + ldr r0, [r5, #0] + mov r1, #0 + ldr r0, [r0, #0] + bl sub_0202DA68 + add sp, #8 + pop {r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 +_02243CE0: .word 0x000001ED + thumb_func_end ov94_02243BC4 + + thumb_func_start ov94_02243CE4 +ov94_02243CE4: ; 0x02243CE4 + push {r0, r1, r2, r3} + push {r4, r5, r6, lr} + sub sp, #8 + add r5, r0, #0 + ldr r0, [r5, #0] + add r4, r1, #0 + ldr r0, [r0, #0x20] + bl sub_0202F180 + mov r0, #0x12 + str r0, [sp, #0x20] + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + cmp r0, #6 + bne _02243D0A + mov r0, #0 + str r0, [sp, #0x20] +_02243D0A: + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + ldr r1, _02243DE4 ; =0x000001ED + cmp r0, r1 + bne _02243D5E + add r0, r4, #0 + mov r1, #0x6e + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _02243D44 + add r0, r4, #0 + mov r1, #0x99 + mov r2, #0 + bl sub_02074470 + cmp r0, #0x56 + bne _02243D5E + add r0, r4, #0 + mov r1, #0x6e + mov r2, #0 + bl sub_02074470 + cmp r0, #0 + bne _02243D5E +_02243D44: + ldr r0, [r5, #0] + ldr r0, [r0, #0x20] + bl sub_020507E4 + add r6, r0, #0 + bl sub_0206B5F8 + cmp r0, #0 + bne _02243D5E + add r0, r6, #0 + mov r1, #1 + bl sub_0206B608 +_02243D5E: + mov r1, #0x46 + add r0, sp, #0 + strb r1, [r0] + add r0, r4, #0 + mov r1, #9 + add r2, sp, #0 + bl sub_02074B30 + add r0, r4, #0 + mov r1, #0x6f + mov r2, #0 + bl sub_02074B30 + ldr r0, [sp, #0x20] + cmp r0, #0x12 + bne _02243DA0 + ldr r0, [r5, #0] + add r1, r4, #0 + ldr r0, [r0, #8] + bl sub_0207A048 + ldr r0, [r5, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + mov r1, #0x4a + mov r2, #0x12 + lsl r1, r1, #2 + str r2, [r5, r1] + sub r2, r0, #1 + add r0, r1, #4 + str r2, [r5, r0] + b _02243DD0 +_02243DA0: + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r5, #0] + add r1, sp, #0x20 + ldr r0, [r0, #0xc] + add r2, sp, #4 + bl sub_020799F0 + add r0, r4, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r5, #0] + ldr r1, [sp, #0x20] + ldr r0, [r0, #0xc] + bl sub_020798A0 + mov r0, #0x4a + ldr r1, [sp, #0x20] + lsl r0, r0, #2 + str r1, [r5, r0] + ldr r1, [sp, #4] + add r0, r0, #4 + str r1, [r5, r0] +_02243DD0: + ldr r0, [r5, #0] + mov r1, #1 + ldr r0, [r0, #0] + bl ov94_02243DE8 + add sp, #8 + pop {r4, r5, r6} + pop {r3} + add sp, #0x10 + bx r3 + ; .align 2, 0 +_02243DE4: .word 0x000001ED + thumb_func_end ov94_02243CE4 + + thumb_func_start ov94_02243DE8 +ov94_02243DE8: ; 0x02243DE8 + push {r4, r5, lr} + sub sp, #0x1c + add r5, r0, #0 + add r4, r1, #0 + add r0, sp, #0xc + add r1, sp, #0 + bl ov4_021D806C + ldr r0, [sp, #0x14] + ldr r3, [sp, #0x10] + lsl r0, r0, #0x18 + lsr r1, r0, #0x10 + ldr r0, [sp, #0xc] + lsl r3, r3, #0x18 + ldr r2, [sp, #0x18] + lsl r0, r0, #0x18 + lsr r3, r3, #8 + orr r0, r3 + orr r0, r1 + add r1, r2, #0 + orr r1, r0 + cmp r4, #1 + bne _02243E20 + add r0, r5, #0 + bl sub_0202DAA4 + add sp, #0x1c + pop {r4, r5, pc} +_02243E20: + add r0, r5, #0 + bl sub_0202DA94 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov94_02243DE8 + + thumb_func_start ov94_02243E2C +ov94_02243E2C: ; 0x02243E2C + push {r4, lr} + ldr r3, _02243E44 ; =0x0000011E + add r4, r1, #0 + add r2, r3, #1 + ldrb r1, [r4, r3] + add r3, r3, #5 + ldrb r2, [r4, r2] + ldrb r3, [r4, r3] + bl sub_02038FDC + pop {r4, pc} + nop +_02243E44: .word 0x0000011E + thumb_func_end ov94_02243E2C + + thumb_func_start ov94_02243E48 +ov94_02243E48: ; 0x02243E48 + push {r4, r5, lr} + sub sp, #0x1c + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + mov r1, #0x75 + add r2, sp, #4 + bl sub_02074470 + add r0, r4, #0 + bl sub_02075D6C + add r3, r0, #0 + mov r0, #0x3e + str r0, [sp] + add r0, #0xce + add r0, r4, r0 + add r4, #0xf6 + ldrb r1, [r4] + add r2, sp, #4 + bl sub_0202C1EC + add r1, r0, #0 + add r0, r5, #0 + mov r2, #4 + bl sub_0202B758 + add sp, #0x1c + pop {r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov94_02243E48 + + thumb_func_start ov94_02243E84 +ov94_02243E84: ; 0x02243E84 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl ov94_02241498 + cmp r0, #0 + beq _02243EA2 + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + cmp r0, #6 + bne _02243EA2 + mov r0, #2 + pop {r4, pc} +_02243EA2: + ldr r0, _02243EC4 ; =0x000010AC + ldrh r1, [r4, r0] + mov r0, #0x87 + lsl r0, r0, #2 + cmp r1, r0 + bne _02243EBE + ldr r0, [r4, #0] + ldr r0, [r0, #8] + bl sub_0207A0F8 + cmp r0, #6 + bne _02243EBE + mov r0, #1 + pop {r4, pc} +_02243EBE: + mov r0, #0 + pop {r4, pc} + nop +_02243EC4: .word 0x000010AC + thumb_func_end ov94_02243E84 + + thumb_func_start ov94_02243EC8 +ov94_02243EC8: ; 0x02243EC8 + ldr r3, _02243ED4 ; =0x00001088 + strh r1, [r0, r3] + add r1, r3, #2 + strh r2, [r0, r1] + bx lr + nop +_02243ED4: .word 0x00001088 + thumb_func_end ov94_02243EC8 + + thumb_func_start ov94_02243ED8 +ov94_02243ED8: ; 0x02243ED8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r0, [r0, #0] + bl sub_0202DA60 + cmp r0, #0 + bne _02243EF2 + ldrh r0, [r4, #0x36] + cmp r0, #0 + beq _02243EF2 + mov r0, #1 + pop {r4, pc} +_02243EF2: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02243ED8 + + .rodata + + + .global Unk_ov94_02246278 +Unk_ov94_02246278: ; 0x02246278 + .incbin "incbin/overlay94_rodata.bin", 0x880, 0x890 - 0x880 + + .global Unk_ov94_02246288 +Unk_ov94_02246288: ; 0x02246288 + .incbin "incbin/overlay94_rodata.bin", 0x890, 0x8AC - 0x890 + + .global Unk_ov94_022462A4 +Unk_ov94_022462A4: ; 0x022462A4 + .incbin "incbin/overlay94_rodata.bin", 0x8AC, 0x8C8 - 0x8AC + + .global Unk_ov94_022462C0 +Unk_ov94_022462C0: ; 0x022462C0 + .incbin "incbin/overlay94_rodata.bin", 0x8C8, 0x8E4 - 0x8C8 + + .global Unk_ov94_022462DC +Unk_ov94_022462DC: ; 0x022462DC + .incbin "incbin/overlay94_rodata.bin", 0x8E4, 0x900 - 0x8E4 + + .global Unk_ov94_022462F8 +Unk_ov94_022462F8: ; 0x022462F8 + .incbin "incbin/overlay94_rodata.bin", 0x900, 0x1C + + + .data + + + .global Unk_ov94_022469A0 +Unk_ov94_022469A0: ; 0x022469A0 + .incbin "incbin/overlay94_data.bin", 0x5A0, 0xA0 + diff --git a/asm/ov94_02243EF8.s b/asm/ov94_02243EF8.s new file mode 100644 index 000000000..686cba866 --- /dev/null +++ b/asm/ov94_02243EF8.s @@ -0,0 +1,647 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_02243EF8 +ov94_02243EF8: ; 0x02243EF8 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x30 + add r5, r0, #0 + add r4, r1, #0 + bl ov94_0224432C + ldr r2, _02243F94 ; =0x00000D78 + add r0, sp, #0 + add r1, r5, #0 + add r2, r5, r2 + mov r3, #2 + bl ov94_0223C300 + mov r0, #2 + str r0, [sp, #0x28] + lsl r0, r0, #0x12 + str r0, [sp, #8] + ldr r0, _02243F98 ; =0x00182000 + str r0, [sp, #0xc] + add r0, sp, #0 + bl sub_02021AA0 + ldr r1, _02243F9C ; =0x00000ED4 + str r0, [r5, r1] + ldr r0, [r5, r1] + mov r1, #1 + bl sub_02021CC8 + ldr r0, _02243F9C ; =0x00000ED4 + mov r1, #7 + mul r1, r4 + ldr r0, [r5, r0] + add r1, r1, #3 + bl sub_02021D6C + ldr r0, _02243F9C ; =0x00000ED4 + mov r1, #1 + ldr r0, [r5, r0] + bl sub_02021CAC + ldr r4, _02243FA0 ; =0x02246322 + mov r7, #0 + mov r6, #0xe +_02243F4E: + add r0, sp, #0 + bl sub_02021AA0 + ldr r1, _02243FA4 ; =0x00000ED8 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + ldr r0, _02243FA4 ; =0x00000ED8 + add r1, r6, #0 + ldr r0, [r5, r0] + bl sub_02021D6C + ldr r0, _02243FA4 ; =0x00000ED8 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02021CAC + ldr r0, _02243FA4 ; =0x00000ED8 + ldrh r1, [r4] + ldrh r2, [r4, #2] + ldr r0, [r5, r0] + bl ov94_022441A0 + add r7, r7, #1 + add r5, r5, #4 + add r6, r6, #4 + add r4, r4, #4 + cmp r7, #7 + blt _02243F4E + add sp, #0x30 + pop {r3, r4, r5, r6, r7, pc} + nop +_02243F94: .word 0x00000D78 +_02243F98: .word 0x00182000 +_02243F9C: .word 0x00000ED4 +_02243FA0: .word 0x02246322 +_02243FA4: .word 0x00000ED8 + thumb_func_end ov94_02243EF8 + + thumb_func_start ov94_02243FA8 +ov94_02243FA8: ; 0x02243FA8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + bl ov94_02243EF8 + ldr r0, _02243FE4 ; =ov94_0224400C + mov r1, #0x10 + mov r2, #5 + mov r3, #0x3e + bl sub_0200679C + ldr r1, _02243FE8 ; =0x0000108C + str r0, [r5, r1] + ldr r0, [r5, r1] + bl sub_0201CED0 + mov r1, #0 + add r2, r1, #0 + str r1, [r0, #0] + sub r2, #0x28 + str r2, [r0, #4] + str r4, [r0, #8] + str r5, [r0, #0xc] + bl ov94_02243FF0 + ldr r0, _02243FEC ; =0x0000062F + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_02243FE4: .word ov94_0224400C +_02243FE8: .word 0x0000108C +_02243FEC: .word 0x0000062F + thumb_func_end ov94_02243FA8 + + thumb_func_start ov94_02243FF0 +ov94_02243FF0: ; 0x02243FF0 + add r3, r0, #0 + ldr r2, [r3, #0xc] + ldr r0, _02244004 ; =0x00000ED4 + ldr r3, [r3, #8] + ldr r0, [r2, r0] + mov r2, #7 + mul r2, r3 + ldr r3, _02244008 ; =sub_02021D6C + add r1, r1, r2 + bx r3 + ; .align 2, 0 +_02244004: .word 0x00000ED4 +_02244008: .word sub_02021D6C + thumb_func_end ov94_02243FF0 + + thumb_func_start ov94_0224400C +ov94_0224400C: ; 0x0224400C + push {r4, r5, r6, lr} + add r4, r1, #0 + add r6, r0, #0 + ldr r0, [r4, #0] + ldr r5, [r4, #0xc] + cmp r0, #3 + bhi _022440A8 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02244026: ; jump table + .short _0224402E - _02244026 - 2 ; case 0 + .short _02244054 - _02244026 - 2 ; case 1 + .short _0224406E - _02244026 - 2 ; case 2 + .short _02244094 - _02244026 - 2 ; case 3 +_0224402E: + ldr r0, [r4, #4] + cmp r0, #0xa0 + ble _02244042 + mov r0, #0xa0 + str r0, [r4, #4] + mov r1, #1 + add r0, r4, #0 + str r1, [r4, #0] + bl ov94_02243FF0 +_02244042: + ldr r0, [r4, #4] + mov r1, #0x80 + add r2, r0, #5 + ldr r0, _022440AC ; =0x00000ED4 + str r2, [r4, #4] + ldr r0, [r5, r0] + bl ov94_022441A0 + pop {r4, r5, r6, pc} +_02244054: + ldr r0, _022440AC ; =0x00000ED4 + ldr r0, [r5, r0] + bl sub_02021FD0 + cmp r0, #0 + bne _022440A8 + add r0, r4, #0 + mov r1, #2 + bl ov94_02243FF0 + mov r0, #2 + str r0, [r4, #0] + pop {r4, r5, r6, pc} +_0224406E: + ldr r0, [r4, #4] + cmp r0, #0x82 + bge _02244082 + mov r0, #0x82 + str r0, [r4, #4] + mov r1, #3 + add r0, r4, #0 + str r1, [r4, #0] + bl ov94_02243FF0 +_02244082: + ldr r0, [r4, #4] + mov r1, #0x80 + sub r2, r0, #2 + ldr r0, _022440AC ; =0x00000ED4 + str r2, [r4, #4] + ldr r0, [r5, r0] + bl ov94_022441A0 + pop {r4, r5, r6, pc} +_02244094: + ldr r0, _022440B0 ; =0x0000060D + bl sub_02005748 + ldr r1, [r4, #0xc] + ldr r0, _022440B4 ; =0x00001090 + mov r2, #1 + strh r2, [r1, r0] + add r0, r6, #0 + bl sub_020067D0 +_022440A8: + pop {r4, r5, r6, pc} + nop +_022440AC: .word 0x00000ED4 +_022440B0: .word 0x0000060D +_022440B4: .word 0x00001090 + thumb_func_end ov94_0224400C + + thumb_func_start ov94_022440B8 +ov94_022440B8: ; 0x022440B8 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r1, #0 + ldr r0, _022440F0 ; =ov94_022440FC + mov r1, #0x10 + mov r2, #5 + mov r3, #0x3e + bl sub_0200679C + ldr r1, _022440F4 ; =0x0000108C + str r0, [r5, r1] + ldr r0, [r5, r1] + bl sub_0201CED0 + mov r1, #0 + str r1, [r0, #0] + mov r1, #0x82 + str r1, [r0, #4] + str r4, [r0, #8] + mov r1, #5 + str r5, [r0, #0xc] + bl ov94_02243FF0 + ldr r0, _022440F8 ; =0x0000060E + bl sub_02005748 + pop {r3, r4, r5, pc} + nop +_022440F0: .word ov94_022440FC +_022440F4: .word 0x0000108C +_022440F8: .word 0x0000060E + thumb_func_end ov94_022440B8 + + thumb_func_start ov94_022440FC +ov94_022440FC: ; 0x022440FC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + ldr r5, [r4, #0xc] + cmp r1, #3 + bhi _02244196 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02244114: ; jump table + .short _0224411C - _02244114 - 2 ; case 0 + .short _02244144 - _02244114 - 2 ; case 1 + .short _02244166 - _02244114 - 2 ; case 2 + .short _0224418C - _02244114 - 2 ; case 3 +_0224411C: + ldr r0, [r4, #4] + cmp r0, #0xa0 + ble _02244132 + mov r0, #0xa0 + str r0, [r4, #4] + mov r0, #1 + str r0, [r4, #0] + add r0, r4, #0 + mov r1, #6 + bl ov94_02243FF0 +_02244132: + ldr r0, [r4, #4] + mov r1, #0x80 + add r2, r0, #2 + ldr r0, _02244198 ; =0x00000ED4 + str r2, [r4, #4] + ldr r0, [r5, r0] + bl ov94_022441A0 + pop {r3, r4, r5, pc} +_02244144: + ldr r0, _02244198 ; =0x00000ED4 + ldr r0, [r5, r0] + bl sub_02021FD0 + cmp r0, #0 + bne _02244196 + add r0, r4, #0 + mov r1, #0 + bl ov94_02243FF0 + mov r0, #2 + str r0, [r4, #0] + mov r0, #0x63 + lsl r0, r0, #4 + bl sub_02005748 + pop {r3, r4, r5, pc} +_02244166: + mov r0, #0x13 + ldr r1, [r4, #4] + mvn r0, r0 + cmp r1, r0 + bge _0224417A + mov r1, #3 + add r0, r4, #0 + str r1, [r4, #0] + bl ov94_02243FF0 +_0224417A: + ldr r0, [r4, #4] + mov r1, #0x80 + sub r2, r0, #5 + ldr r0, _02244198 ; =0x00000ED4 + str r2, [r4, #4] + ldr r0, [r5, r0] + bl ov94_022441A0 + pop {r3, r4, r5, pc} +_0224418C: + ldr r1, _0224419C ; =0x00001090 + mov r2, #1 + strh r2, [r5, r1] + bl sub_020067D0 +_02244196: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244198: .word 0x00000ED4 +_0224419C: .word 0x00001090 + thumb_func_end ov94_022440FC + + thumb_func_start ov94_022441A0 +ov94_022441A0: ; 0x022441A0 + push {r4, r5, lr} + sub sp, #0xc + add r4, r0, #0 + add r5, r2, #0 + cmp r1, #0 + ble _022441BE + lsl r0, r1, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _022441CC +_022441BE: + lsl r0, r1, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_022441CC: + bl sub_020E1740 + sub r5, #8 + str r0, [sp] + cmp r5, #0 + ble _022441EA + lsl r0, r5, #0xc + bl sub_020E17B4 + add r1, r0, #0 + mov r0, #0x3f + lsl r0, r0, #0x18 + bl sub_020E0B00 + b _022441F8 +_022441EA: + lsl r0, r5, #0xc + bl sub_020E17B4 + mov r1, #0x3f + lsl r1, r1, #0x18 + bl sub_020E1A9C +_022441F8: + bl sub_020E1740 + mov r1, #1 + lsl r1, r1, #0x14 + add r0, r0, r1 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + add r0, r4, #0 + add r1, sp, #0 + bl sub_02021C50 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov94_022441A0 + + thumb_func_start ov94_02244214 +ov94_02244214: ; 0x02244214 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02244230 ; =0x0224633E + bl sub_02022664 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _0224422A + cmp r0, r4 + blt _0224422E +_0224422A: + mov r0, #0 + mvn r0, r0 +_0224422E: + pop {r4, pc} + ; .align 2, 0 +_02244230: .word 0x0224633E + thumb_func_end ov94_02244214 + + thumb_func_start ov94_02244234 +ov94_02244234: ; 0x02244234 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + str r0, [sp, #4] + str r1, [sp, #8] + str r2, [sp, #0xc] + add r0, r1, #0 + beq _0224424E + add r0, r2, #0 + cmp r0, #1 + bne _0224424E + ldr r0, _022442C8 ; =0x0000064F + bl sub_02005748 +_0224424E: + ldr r4, [sp, #4] + mov r0, #0xe + mov r6, #0 + str r0, [sp, #0x10] + add r5, r4, #0 + mov r7, #0x11 +_0224425A: + ldr r0, [sp, #8] + cmp r6, r0 + bge _022442A4 + ldr r0, _022442CC ; =0x0000034A + ldr r1, [sp, #4] + ldrb r0, [r4, r0] + mov r3, #0xdd + add r2, r1, #0 + str r0, [sp] + ldr r0, _022442D0 ; =0x00001098 + lsl r3, r3, #2 + ldr r0, [r1, r0] + ldr r1, _022442D4 ; =0x000010A0 + ldrb r3, [r4, r3] + ldr r1, [r2, r1] + add r2, r6, #0 + bl ov94_02244378 + ldr r0, [sp, #0xc] + cmp r0, #0 + ldr r0, _022442D8 ; =0x00000ED8 + beq _02244290 + ldr r0, [r5, r0] + ldr r1, [sp, #0x10] + bl sub_02021D6C + b _02244298 +_02244290: + ldr r0, [r5, r0] + add r1, r7, #0 + bl sub_02021D6C +_02244298: + ldr r0, _022442D8 ; =0x00000ED8 + mov r1, #1 + ldr r0, [r5, r0] + bl sub_02021CAC + b _022442AE +_022442A4: + ldr r0, _022442D8 ; =0x00000ED8 + mov r1, #0 + ldr r0, [r5, r0] + bl sub_02021CAC +_022442AE: + mov r0, #0x49 + lsl r0, r0, #2 + add r4, r4, r0 + ldr r0, [sp, #0x10] + add r6, r6, #1 + add r0, r0, #4 + str r0, [sp, #0x10] + add r5, r5, #4 + add r7, r7, #4 + cmp r6, #7 + blt _0224425A + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022442C8: .word 0x0000064F +_022442CC: .word 0x0000034A +_022442D0: .word 0x00001098 +_022442D4: .word 0x000010A0 +_022442D8: .word 0x00000ED8 + thumb_func_end ov94_02244234 + + thumb_func_start ov94_022442DC +ov94_022442DC: ; 0x022442DC + lsl r0, r0, #2 + add r0, #0xe + bx lr + ; .align 2, 0 + thumb_func_end ov94_022442DC + + thumb_func_start ov94_022442E4 +ov94_022442E4: ; 0x022442E4 + push {r3, r4, r5, r6, r7, lr} + ldr r7, _02244328 ; =0x00000ED8 + add r5, r0, #0 + mov r4, #0 +_022442EC: + ldr r0, [r5, r7] + bl sub_02021D34 + cmp r0, #0 + beq _0224431E + ldr r0, _02244328 ; =0x00000ED8 + ldr r0, [r5, r0] + bl sub_02021E24 + add r6, r0, #0 + add r0, r4, #0 + bl ov94_022442DC + add r0, r0, #1 + cmp r6, r0 + beq _0224431E + add r0, r4, #0 + bl ov94_022442DC + add r1, r0, #0 + ldr r0, _02244328 ; =0x00000ED8 + add r1, r1, #1 + ldr r0, [r5, r0] + bl sub_02021D6C +_0224431E: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #7 + blt _022442EC + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244328: .word 0x00000ED8 + thumb_func_end ov94_022442E4 + + thumb_func_start ov94_0224432C +ov94_0224432C: ; 0x0224432C + push {r3, r4, lr} + sub sp, #4 + ldr r2, _0224436C ; =0x000010A0 + add r4, r0, #0 + mov r0, #0x56 + mov r1, #7 + add r2, r4, r2 + mov r3, #0x3e + bl sub_02006F88 + ldr r3, _02244370 ; =0x0000109C + mov r1, #9 + str r0, [r4, r3] + mov r0, #0x3e + sub r3, r3, #4 + str r0, [sp] + mov r0, #0x56 + mov r2, #1 + add r3, r4, r3 + bl sub_02006F50 + ldr r1, _02244374 ; =0x00001094 + str r0, [r4, r1] + add r0, r1, #4 + mov r1, #2 + ldr r0, [r4, r0] + lsl r1, r1, #0xe + bl sub_020C2C54 + add sp, #4 + pop {r3, r4, pc} + nop +_0224436C: .word 0x000010A0 +_02244370: .word 0x0000109C +_02244374: .word 0x00001094 + thumb_func_end ov94_0224432C + + thumb_func_start ov94_02244378 +ov94_02244378: ; 0x02244378 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r6, r1, #0 + ldr r0, [sp, #0x18] + add r1, r3, #0 + add r5, r2, #0 + bl sub_0205CA0C + add r4, r0, #0 + mov r0, #6 + lsl r0, r0, #8 + ldr r1, [r7, #0x14] + mul r0, r4 + add r0, r1, r0 + ldr r1, _022443B4 ; =0x02246314 + lsl r2, r5, #1 + ldrh r1, [r1, r2] + mov r2, #2 + ldr r6, [r6, #0xc] + lsl r2, r2, #8 + bl sub_020C0314 + lsl r0, r4, #5 + add r1, r5, #2 + add r0, r6, r0 + lsl r1, r1, #5 + mov r2, #0x20 + bl sub_020C01B8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022443B4: .word 0x02246314 + thumb_func_end ov94_02244378 + + thumb_func_start ov94_022443B8 +ov94_022443B8: ; 0x022443B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _022443D8 ; =0x00001090 + ldrh r1, [r4, r0] + cmp r1, #0 + beq _022443D4 + add r0, #0xc + ldr r0, [r4, r0] + bl sub_020181C4 + ldr r0, _022443DC ; =0x00001094 + ldr r0, [r4, r0] + bl sub_020181C4 +_022443D4: + pop {r4, pc} + nop +_022443D8: .word 0x00001090 +_022443DC: .word 0x00001094 + thumb_func_end ov94_022443B8 + + .rodata + + + .global Unk_ov94_02246314 +Unk_ov94_02246314: ; 0x02246314 + .incbin "incbin/overlay94_rodata.bin", 0x91C, 0x92A - 0x91C + + .global Unk_ov94_02246322 +Unk_ov94_02246322: ; 0x02246322 + .incbin "incbin/overlay94_rodata.bin", 0x92A, 0x946 - 0x92A + + .global Unk_ov94_0224633E +Unk_ov94_0224633E: ; 0x0224633E + .incbin "incbin/overlay94_rodata.bin", 0x946, 0x20 + diff --git a/asm/ov94_022443E0.s b/asm/ov94_022443E0.s new file mode 100644 index 000000000..a3e478232 --- /dev/null +++ b/asm/ov94_022443E0.s @@ -0,0 +1,132 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_022443E0 +ov94_022443E0: ; 0x022443E0 + push {r4, lr} + mov r3, #0x45 + add r4, r0, #0 + lsl r3, r3, #2 + ldr r1, [r4, #0] + ldrh r2, [r4, r3] + add r3, r3, #2 + ldr r0, [r1, #8] + ldrh r3, [r4, r3] + ldr r1, [r1, #0xc] + bl ov94_022411DC + add r1, r4, #0 + add r1, #0xbc + str r0, [r1, #0] + add r0, r4, #0 + mov r1, #2 + add r0, #0xcd + strb r1, [r0] + add r0, r4, #0 + mov r2, #1 + add r0, #0xcf + strb r2, [r0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xd0 + strb r1, [r0] + add r0, r4, #0 + add r0, #0xce + strb r2, [r0] + add r0, r4, #0 + add r0, #0xd4 + strh r1, [r0] + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_0208C324 + add r1, r4, #0 + add r1, #0xe8 + str r0, [r1, #0] + ldr r0, [r4, #0] + ldr r1, [r0, #0x34] + add r0, r4, #0 + add r0, #0xd8 + str r1, [r0, #0] + ldr r0, [r4, #0] + ldr r1, [r0, #0x24] + add r0, r4, #0 + add r0, #0xc0 + str r1, [r0, #0] + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_0202D79C + add r1, r4, #0 + add r1, #0xdc + str r0, [r1, #0] + add r0, r4, #0 + ldr r1, _02244488 ; =0x02246360 + add r0, #0xbc + bl sub_0208D720 + ldr r1, [r4, #0] + add r0, r4, #0 + ldr r1, [r1, #0x1c] + add r0, #0xbc + bl sub_0208E9C0 + add r1, r4, #0 + ldr r0, _0224448C ; =0x020F410C + add r1, #0xbc + mov r2, #0x3e + bl sub_020067E8 + add r1, r4, #0 + add r1, #0xb8 + str r0, [r1, #0] + mov r0, #0x42 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #2 + pop {r4, pc} + nop +_02244488: .word 0x02246360 +_0224448C: .word 0x020F410C + thumb_func_end ov94_022443E0 + + thumb_func_start ov94_02244490 +ov94_02244490: ; 0x02244490 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + mov r4, #3 + bl sub_02006844 + cmp r0, #0 + beq _022444B8 + add r0, r5, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl sub_02006814 + ldr r2, [r5, #0x24] + add r0, r5, #0 + mov r1, #5 + bl ov94_0223C4C0 + mov r4, #4 +_022444B8: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov94_02244490 + + thumb_func_start ov94_022444BC +ov94_022444BC: ; 0x022444BC + push {r3, lr} + bl ov94_0223C4C8 + mov r0, #1 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov94_022444BC + + .rodata + + + .global Unk_ov94_02246360 +Unk_ov94_02246360: ; 0x02246360 + .incbin "incbin/overlay94_rodata.bin", 0x968, 0x9 + diff --git a/asm/ov94_022444C8.s b/asm/ov94_022444C8.s new file mode 100644 index 000000000..1152f7721 --- /dev/null +++ b/asm/ov94_022444C8.s @@ -0,0 +1,584 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_022444C8 +ov94_022444C8: ; 0x022444C8 + push {r4, lr} + add r4, r0, #0 + mov r0, #0x3e + bl sub_02073C74 + ldr r1, _02244670 ; =0x000010A4 + str r0, [r4, r1] + ldr r0, [r4, #0x24] + cmp r0, #0xa + bls _022444DE + b _02244648 +_022444DE: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_022444EA: ; jump table + .short _02244648 - _022444EA - 2 ; case 0 + .short _02244648 - _022444EA - 2 ; case 1 + .short _02244648 - _022444EA - 2 ; case 2 + .short _02244648 - _022444EA - 2 ; case 3 + .short _02244648 - _022444EA - 2 ; case 4 + .short _02244648 - _022444EA - 2 ; case 5 + .short _02244648 - _022444EA - 2 ; case 6 + .short _02244500 - _022444EA - 2 ; case 7 + .short _02244546 - _022444EA - 2 ; case 8 + .short _022445E0 - _022444EA - 2 ; case 9 + .short _0224458C - _022444EA - 2 ; case 10 +_02244500: + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_02076B10 + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xec + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_02244870 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0xf4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #3 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #2 + add r0, #0xfc + str r1, [r0, #0] + b _02244648 +_02244546: + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_02076B10 + add r1, r4, #0 + add r1, #0xf0 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xf0 + ldr r1, [r0, #0] + add r0, r4, #0 + add r0, #0xec + str r1, [r0, #0] + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_02244870 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0xf4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #3 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #4 + add r0, #0xfc + str r1, [r0, #0] + b _02244648 +_0224458C: + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl sub_02076B10 + add r1, r4, #0 + add r1, #0xf0 + str r0, [r1, #0] + ldr r0, [r4, #0] + ldr r1, _02244670 ; =0x000010A4 + ldr r0, [r0, #0] + ldr r1, [r4, r1] + bl sub_0202DA70 + ldr r0, _02244670 ; =0x000010A4 + ldr r0, [r4, r0] + bl sub_02076B10 + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + mov r0, #0x13 + lsl r0, r0, #4 + add r0, r4, r0 + bl ov94_02244870 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0xf4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #3 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #1 + add r0, #0xfc + str r1, [r0, #0] + b _02244648 +_022445E0: + ldr r0, [r4, #0] + ldr r1, [r4, r1] + ldr r0, [r0, #0] + bl sub_0202DA70 + ldr r0, _02244670 ; =0x000010A4 + ldr r0, [r4, r0] + bl sub_02076B10 + add r1, r4, #0 + add r1, #0xec + str r0, [r1, #0] + mov r0, #0x95 + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, r0, #4 + mul r0, r1 + add r0, r2, r0 + bl sub_02076B10 + add r1, r4, #0 + add r1, #0xf0 + str r0, [r1, #0] + mov r0, #0x95 + lsl r0, r0, #2 + add r2, r4, r0 + mov r0, #0x12 + lsl r0, r0, #4 + ldr r1, [r4, r0] + add r0, r0, #4 + mul r0, r1 + add r0, r2, r0 + bl ov94_02244870 + mov r1, #0x49 + lsl r1, r1, #2 + str r0, [r4, r1] + add r0, r4, #0 + ldr r1, [r4, r1] + add r0, #0xf4 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #3 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r4, #0 + mov r1, #1 + add r0, #0xfc + str r1, [r0, #0] +_02244648: + ldr r0, [r4, #0] + mov r2, #0x3e + ldr r1, [r0, #0x24] + mov r0, #1 + lsl r0, r0, #8 + str r1, [r4, r0] + add r1, r4, #0 + ldr r0, _02244674 ; =0x0224636C + add r1, #0xec + bl sub_020067E8 + add r1, r4, #0 + add r1, #0xb8 + str r0, [r1, #0] + mov r0, #0x42 + mov r1, #1 + lsl r0, r0, #2 + str r1, [r4, r0] + mov r0, #2 + pop {r4, pc} + ; .align 2, 0 +_02244670: .word 0x000010A4 +_02244674: .word 0x0224636C + thumb_func_end ov94_022444C8 + + thumb_func_start ov94_02244678 +ov94_02244678: ; 0x02244678 + push {r4, r5, r6, r7, lr} + sub sp, #0x34 + add r4, r0, #0 + ldr r0, [r4, #0x2c] + mov r6, #3 + cmp r0, #0 + beq _0224468E + cmp r0, #1 + bne _0224468C + b _0224480C +_0224468C: + b _02244842 +_0224468E: + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl sub_02006844 + cmp r0, #0 + bne _0224469E + b _02244842 +_0224469E: + add r0, r4, #0 + add r0, #0xb8 + ldr r0, [r0, #0] + bl sub_02006814 + ldr r1, [r4, #0x24] + cmp r1, #9 + bne _02244724 + add r0, r4, #0 + bl ov94_022448AC + mov r1, #6 + mov r2, #0 + add r7, r0, #0 + bl sub_02074470 + add r3, r0, #0 + add r0, sp, #0x30 + lsl r3, r3, #0x10 + str r0, [sp] + mov r0, #0 + add r1, r7, #0 + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02076B94 + str r0, [sp, #0x24] + cmp r0, #0 + beq _02244716 + ldr r5, [r4, #0] + ldr r0, [r5, #0x20] + bl sub_02056B24 + ldr r1, [r5, #0x3c] + ldr r2, [sp, #0x24] + str r1, [sp] + ldr r1, [r5, #0x10] + str r1, [sp, #4] + ldr r1, [r5, #0x30] + str r1, [sp, #8] + ldr r1, [r5, #0x28] + str r1, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x30] + add r1, r7, #0 + str r0, [sp, #0x14] + mov r0, #4 + str r0, [sp, #0x18] + mov r0, #0x3e + str r0, [sp, #0x1c] + ldr r3, [r5, #0x24] + mov r0, #0 + bl sub_0207AE68 + mov r1, #0x41 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #1 + str r0, [r4, #0x2c] + b _02244842 +_02244716: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r6, #4 + b _02244842 +_02244724: + cmp r1, #8 + beq _0224472C + cmp r1, #0xa + bne _022447FE +_0224472C: + add r0, r4, #0 + bl ov94_022448AC + add r7, r0, #0 + mov r0, #0x3e + bl sub_02073C74 + str r0, [sp, #0x20] + ldr r0, [r4, #0] + ldr r1, [sp, #0x20] + ldr r0, [r0, #0] + bl sub_0202DA70 + add r0, r7, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074470 + add r5, r0, #0 + ldr r0, [sp, #0x20] + mov r1, #5 + mov r2, #0 + bl sub_02074470 + cmp r5, r0 + bne _0224477A + mov r1, #0 + add r0, r7, #0 + add r2, r1, #0 + bl sub_02074470 + add r5, r0, #0 + mov r1, #0 + ldr r0, [sp, #0x20] + add r2, r1, #0 + bl sub_02074470 + cmp r5, r0 + beq _022447EA +_0224477A: + add r0, r7, #0 + mov r1, #6 + mov r2, #0 + bl sub_02074470 + add r3, r0, #0 + add r0, sp, #0x2c + lsl r3, r3, #0x10 + str r0, [sp] + mov r0, #0 + add r1, r7, #0 + mov r2, #1 + lsr r3, r3, #0x10 + bl sub_02076B94 + str r0, [sp, #0x28] + cmp r0, #0 + beq _022447DC + ldr r5, [r4, #0] + ldr r0, [r5, #0x20] + bl sub_02056B24 + ldr r1, [r5, #0x3c] + ldr r2, [sp, #0x28] + str r1, [sp] + ldr r1, [r5, #0x10] + str r1, [sp, #4] + ldr r1, [r5, #0x30] + str r1, [sp, #8] + ldr r1, [r5, #0x28] + str r1, [sp, #0xc] + str r0, [sp, #0x10] + ldr r0, [sp, #0x2c] + add r1, r7, #0 + str r0, [sp, #0x14] + mov r0, #4 + str r0, [sp, #0x18] + mov r0, #0x3e + str r0, [sp, #0x1c] + ldr r3, [r5, #0x24] + mov r0, #0 + bl sub_0207AE68 + mov r1, #0x41 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #1 + str r0, [r4, #0x2c] + b _022447F6 +_022447DC: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r6, #4 + b _022447F6 +_022447EA: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r6, #4 +_022447F6: + ldr r0, [sp, #0x20] + bl sub_020181C4 + b _02244842 +_022447FE: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r6, #4 + b _02244842 +_0224480C: + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207B0D0 + cmp r0, #0 + beq _02244842 + mov r0, #0x41 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0207B0E0 + add r0, r4, #0 + bl ov94_022448E8 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02244848 ; =0xFFFF1FFF + and r0, r1 + str r0, [r2, #0] + add r0, r4, #0 + mov r1, #7 + mov r2, #0xc + bl ov94_0223C4C0 + mov r6, #4 +_02244842: + add r0, r6, #0 + add sp, #0x34 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02244848: .word 0xFFFF1FFF + thumb_func_end ov94_02244678 + + thumb_func_start ov94_0224484C +ov94_0224484C: ; 0x0224484C + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224486C ; =0x000010A4 + ldr r0, [r4, r0] + bl sub_020181C4 + mov r0, #0x49 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_020181C4 + add r0, r4, #0 + bl ov94_0223C4C8 + mov r0, #1 + pop {r4, pc} + ; .align 2, 0 +_0224486C: .word 0x000010A4 + thumb_func_end ov94_0224484C + + thumb_func_start ov94_02244870 +ov94_02244870: ; 0x02244870 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3e + bl sub_02025E6C + add r4, r0, #0 + bl sub_02025E8C + mov r1, #0x43 + lsl r1, r1, #2 + add r0, r4, #0 + add r1, r5, r1 + bl sub_02025EC0 + ldr r1, _022448A4 ; =0x00000122 + add r0, r4, #0 + ldrb r1, [r5, r1] + bl sub_02025FD0 + ldr r1, _022448A8 ; =0x00000123 + add r0, r4, #0 + ldrb r1, [r5, r1] + bl sub_02025FDC + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022448A4: .word 0x00000122 +_022448A8: .word 0x00000123 + thumb_func_end ov94_02244870 + + thumb_func_start ov94_022448AC +ov94_022448AC: ; 0x022448AC + push {r3, lr} + cmp r1, #9 + bne _022448C6 + mov r1, #0x95 + lsl r1, r1, #2 + add r3, r0, r1 + mov r1, #0x12 + lsl r1, r1, #4 + ldr r2, [r0, r1] + add r0, r1, #4 + mul r0, r2 + add r0, r3, r0 + pop {r3, pc} +_022448C6: + cmp r1, #0xa + bne _022448D2 + mov r1, #0x13 + lsl r1, r1, #4 + add r0, r0, r1 + pop {r3, pc} +_022448D2: + cmp r1, #8 + bne _022448DE + mov r1, #0x13 + lsl r1, r1, #4 + add r0, r0, r1 + pop {r3, pc} +_022448DE: + bl sub_02022974 + mov r0, #0 + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov94_022448AC + + thumb_func_start ov94_022448E8 +ov94_022448E8: ; 0x022448E8 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + ldr r1, [r5, #0x24] + bl ov94_022448AC + mov r2, #0x4a + lsl r2, r2, #2 + add r4, r0, #0 + ldr r0, [r5, r2] + cmp r0, #0x12 + bne _02244918 + ldr r0, [r5, #0] + add r1, r2, #4 + ldr r0, [r0, #8] + ldr r1, [r5, r1] + bl sub_0207A0FC + add r1, r0, #0 + add r0, r4, #0 + bl sub_020775EC + add sp, #8 + pop {r3, r4, r5, pc} +_02244918: + mov r0, #0 + str r0, [sp, #4] + str r0, [sp] + ldr r0, [r5, #0] + ldr r1, [r5, r2] + add r2, r2, #4 + ldr r0, [r0, #0xc] + ldr r2, [r5, r2] + bl sub_02079968 + ldr r0, [r5, #0] + add r1, sp, #4 + ldr r0, [r0, #0xc] + add r2, sp, #0 + bl sub_020799F0 + add r0, r4, #0 + bl sub_02076B10 + add r2, r0, #0 + ldr r0, [r5, #0] + ldr r1, [sp, #4] + ldr r0, [r0, #0xc] + bl sub_020798A0 + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov94_022448E8 + + .rodata + + + .global Unk_ov94_0224636C +Unk_ov94_0224636C: ; 0x0224636C + .incbin "incbin/overlay94_rodata.bin", 0x974, 0x10 + diff --git a/asm/ov94_02244950.s b/asm/ov94_02244950.s new file mode 100644 index 000000000..e50e7d926 --- /dev/null +++ b/asm/ov94_02244950.s @@ -0,0 +1,2182 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov94_02244950 +ov94_02244950: ; 0x02244950 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov94_02244F2C + mov r0, #6 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #4] + bl ov94_02244A7C + add r0, r4, #0 + bl ov94_02244B8C + add r0, r4, #0 + bl ov94_02244E48 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + mov r0, #2 + mov r1, #1 + bl sub_0201FF0C + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF74 + mov r0, #2 + mov r1, #1 + bl sub_0201FF74 + ldr r0, [r4, #0] + ldr r0, [r0, #0x20] + bl sub_02038438 + add r0, r4, #0 + bl ov94_02245934 + bl ov4_021D7A8C + cmp r0, #0 + bne _022449EA + ldr r0, [r4, #0] + ldr r0, [r0, #0x40] + cmp r0, #0 + beq _022449E4 + ldr r0, _022449F4 ; =0x00000F0F + ldr r1, _022449F8 ; =0x00000B9C + str r0, [sp] + mov r2, #1 + ldr r1, [r4, r1] + add r0, r4, #0 + add r3, r2, #0 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0xc + mov r2, #2 + bl ov94_0223C3F4 + add r0, r4, #0 + bl ov94_0223C5D8 + b _022449EE +_022449E4: + mov r0, #0 + str r0, [r4, #0x2c] + b _022449EE +_022449EA: + mov r0, #0x11 + str r0, [r4, #0x2c] +_022449EE: + mov r0, #2 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_022449F4: .word 0x00000F0F +_022449F8: .word 0x00000B9C + thumb_func_end ov94_02244950 + + thumb_func_start ov94_022449FC +ov94_022449FC: ; 0x022449FC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl ov94_0223C4B4 + bl sub_020397B0 + ldr r4, [r5, #0x2c] + ldr r1, _02244A28 ; =0x02246A40 + lsl r2, r4, #2 + ldr r1, [r1, r2] + add r0, r5, #0 + blx r1 + ldr r1, [r5, #0x2c] + cmp r4, r1 + beq _02244A26 + mov r1, #0x52 + mov r2, #0 + lsl r1, r1, #6 + strh r2, [r5, r1] + add r1, r1, #2 + strh r2, [r5, r1] +_02244A26: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02244A28: .word 0x02246A40 + thumb_func_end ov94_022449FC + + thumb_func_start ov94_02244A2C +ov94_02244A2C: ; 0x02244A2C + push {r4, lr} + add r4, r0, #0 + ldr r0, _02244A74 ; =0x00001154 + ldr r0, [r4, r0] + cmp r0, #0 + beq _02244A46 + bl sub_0200DA58 + ldr r0, _02244A74 ; =0x00001154 + mov r1, #0 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] +_02244A46: + add r0, r4, #0 + bl ov94_02244F64 + add r0, r4, #0 + bl ov94_02244F00 + ldr r0, [r4, #4] + bl ov94_02244B68 + ldr r0, _02244A78 ; =0x00001158 + mov r1, #0 + str r1, [r4, r0] + add r0, r4, #0 + bl ov94_0223C4C8 + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _02244A6E + mov r0, #5 + pop {r4, pc} +_02244A6E: + mov r0, #1 + pop {r4, pc} + nop +_02244A74: .word 0x00001154 +_02244A78: .word 0x00001158 + thumb_func_end ov94_02244A2C + + thumb_func_start ov94_02244A7C +ov94_02244A7C: ; 0x02244A7C + push {r3, r4, r5, lr} + sub sp, #0x70 + ldr r5, _02244B58 ; =0x022463B4 + add r4, r0, #0 + ldmia r5!, {r0, r1} + add r3, sp, #0x54 + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #0 + str r0, [r3, #0] + add r0, r4, #0 + add r3, r1, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0 + bl sub_0201FF0C + add r0, r4, #0 + mov r1, #0 + bl sub_02019EBC + ldr r5, _02244B5C ; =0x02246398 + add r3, sp, #0x38 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #1 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0 + bl sub_0201FF0C + ldr r5, _02244B60 ; =0x022463D0 + add r3, sp, #0x1c + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #4 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + mov r1, #0 + bl sub_0201FF74 + add r0, r4, #0 + mov r1, #4 + bl sub_02019EBC + ldr r5, _02244B64 ; =0x0224637C + add r3, sp, #0 + ldmia r5!, {r0, r1} + add r2, r3, #0 + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r5!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r5, #0] + mov r1, #5 + str r0, [r3, #0] + add r0, r4, #0 + mov r3, #0 + bl sub_020183C4 + mov r0, #2 + mov r1, #0 + bl sub_0201FF74 + mov r0, #0 + mov r1, #0x20 + add r2, r0, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #4 + mov r1, #0x20 + mov r2, #0 + mov r3, #0x3e + bl sub_02019690 + mov r0, #0x10 + mov r1, #0 + bl sub_0201FF74 + add sp, #0x70 + pop {r3, r4, r5, pc} + nop +_02244B58: .word 0x022463B4 +_02244B5C: .word 0x02246398 +_02244B60: .word 0x022463D0 +_02244B64: .word 0x0224637C + thumb_func_end ov94_02244A7C + + thumb_func_start ov94_02244B68 +ov94_02244B68: ; 0x02244B68 + push {r4, lr} + add r4, r0, #0 + mov r1, #5 + bl sub_02019044 + add r0, r4, #0 + mov r1, #4 + bl sub_02019044 + add r0, r4, #0 + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + mov r1, #0 + bl sub_02019044 + pop {r4, pc} + thumb_func_end ov94_02244B68 + + thumb_func_start ov94_02244B8C +ov94_02244B8C: ; 0x02244B8C + push {r4, r5, r6, r7, lr} + sub sp, #0x3c + str r0, [sp, #0x10] + ldr r4, [r0, #4] + mov r0, #0x5c + mov r1, #0x3e + bl sub_02006C24 + mov r2, #0 + str r2, [sp] + mov r1, #0x3e + str r1, [sp, #4] + mov r1, #3 + add r3, r2, #0 + str r0, [sp, #0x2c] + bl sub_02007130 + mov r3, #0 + str r3, [sp] + mov r0, #0x3e + str r0, [sp, #4] + ldr r0, [sp, #0x2c] + mov r1, #3 + mov r2, #4 + bl sub_02007130 + mov r1, #0x1a + mov r0, #0 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + mov r1, #0x1a + mov r0, #4 + lsl r1, r1, #4 + mov r2, #0x3e + bl sub_02002E98 + ldr r0, [sp, #0x10] + ldr r0, [r0, #0] + ldr r0, [r0, #0x24] + bl sub_02027B50 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r1, #0 + mov r2, #1 + mov r3, #0xa + bl sub_0200DD0C + mov r1, #0 + str r1, [sp] + mov r0, #0x3e + str r0, [sp, #4] + add r0, r4, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DAA4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + ldr r0, [sp, #0x2c] + mov r1, #2 + add r2, r4, #0 + mov r3, #1 + bl sub_020070E8 + mov r1, #0 + mov r0, #6 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + ldr r0, [sp, #0x2c] + mov r1, #5 + add r2, r4, #0 + mov r3, #1 + bl sub_0200710C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + str r0, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + ldr r0, [sp, #0x2c] + mov r1, #0xa + add r2, r4, #0 + mov r3, #5 + bl sub_020070E8 + mov r1, #0 + mov r0, #6 + str r1, [sp] + lsl r0, r0, #8 + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #0x3e + str r0, [sp, #0xc] + ldr r0, [sp, #0x2c] + mov r1, #0xb + add r2, r4, #0 + mov r3, #5 + bl sub_0200710C + mov r0, #0 + add r1, r0, #0 + bl sub_0201975C + mov r0, #4 + mov r1, #0 + bl sub_0201975C + mov r2, #0xcb + ldr r1, _02244DA0 ; =0x00001154 + ldr r0, [sp, #0x10] + lsl r2, r2, #2 + add r0, r0, r1 + mov r1, #0 + bl sub_020C4CF4 + ldr r0, [sp, #0x2c] + mov r1, #4 + add r2, sp, #0x38 + mov r3, #0x3e + bl sub_020071EC + add r4, r0, #0 + ldr r0, [sp, #0x38] + ldr r2, _02244DA4 ; =0x0000115C + ldr r1, [sp, #0x10] + ldr r0, [r0, #0xc] + add r1, r1, r2 + mov r2, #0x80 + bl sub_020C4B18 + ldr r0, [sp, #0x38] + ldr r2, _02244DA8 ; =0x000011DC + ldr r1, [sp, #0x10] + ldr r0, [r0, #0xc] + add r1, r1, r2 + mov r2, #0x80 + bl sub_020C4B18 + add r0, r4, #0 + bl sub_020181C4 + mov r0, #0 + str r0, [sp, #0x24] + str r0, [sp, #0x28] + ldr r1, _02244DA8 ; =0x000011DC + ldr r0, [sp, #0x10] + add r0, r0, r1 + str r0, [sp, #0x18] + ldr r0, [sp, #0x10] + sub r1, #0x80 + add r0, r0, r1 + str r0, [sp, #0x14] +_02244CDC: + mov r0, #0 + str r0, [sp, #0x20] + str r0, [sp, #0x1c] + ldr r0, [sp, #0x28] + add r0, r0, #1 + lsl r1, r0, #5 + ldr r0, [sp, #0x10] + add r0, r0, r1 + str r0, [sp, #0x30] +_02244CEE: + ldr r0, [sp, #0x24] + cmp r0, #0x15 + blt _02244CF8 + bl sub_02022974 +_02244CF8: + ldr r0, [sp, #0x30] + mov r7, #1 + add r4, r0, #2 + ldr r0, [sp, #0x18] + add r6, r0, #2 + ldr r0, [sp, #0x14] + add r5, r0, #2 + ldr r0, [sp, #0x20] + asr r0, r0, #8 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp, #0x34] +_02244D10: + ldr r0, _02244DA4 ; =0x0000115C + ldr r3, [sp, #0x34] + ldrh r0, [r4, r0] + add r1, r6, #0 + mov r2, #1 + str r0, [sp] + add r0, r5, #0 + bl sub_0200393C + add r7, r7, #1 + add r4, r4, #2 + add r6, r6, #2 + add r5, r5, #2 + cmp r7, #0x10 + blt _02244D10 + ldr r0, [sp, #0x18] + add r0, #0x20 + str r0, [sp, #0x18] + ldr r0, [sp, #0x24] + add r0, r0, #1 + str r0, [sp, #0x24] + ldr r0, [sp, #0x1c] + cmp r0, #1 + beq _02244D5A + mov r0, #3 + ldr r1, [sp, #0x20] + lsl r0, r0, #8 + add r1, r1, r0 + mov r0, #1 + lsl r0, r0, #0xc + str r1, [sp, #0x20] + cmp r1, r0 + blt _02244CEE + str r0, [sp, #0x20] + mov r0, #1 + str r0, [sp, #0x1c] + b _02244CEE +_02244D5A: + ldr r0, [sp, #0x14] + add r0, #0x20 + str r0, [sp, #0x14] + ldr r0, [sp, #0x28] + add r0, r0, #1 + str r0, [sp, #0x28] + cmp r0, #3 + blt _02244CDC + ldr r1, _02244DA8 ; =0x000011DC + ldr r0, [sp, #0x10] + add r0, r0, r1 + mov r1, #0x2a + lsl r1, r1, #4 + bl sub_020C2C54 + ldr r1, _02244DAC ; =0x00001158 + ldr r0, [sp, #0x10] + mov r2, #1 + str r2, [r0, r1] + sub r2, r1, #4 + ldr r1, [sp, #0x10] + ldr r0, _02244DB0 ; =ov94_02244DB4 + add r1, r1, r2 + mov r2, #0x14 + bl sub_0200DA04 + ldr r2, _02244DA0 ; =0x00001154 + ldr r1, [sp, #0x10] + str r0, [r1, r2] + ldr r0, [sp, #0x2c] + bl sub_02006CA8 + add sp, #0x3c + pop {r4, r5, r6, r7, pc} + nop +_02244DA0: .word 0x00001154 +_02244DA4: .word 0x0000115C +_02244DA8: .word 0x000011DC +_02244DAC: .word 0x00001158 +_02244DB0: .word ov94_02244DB4 + thumb_func_end ov94_02244B8C + + thumb_func_start ov94_02244DB4 +ov94_02244DB4: ; 0x02244DB4 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _02244E3C + ldr r0, _02244E40 ; =0x0000032B + mov r1, #1 + ldrb r2, [r4, r0] + eor r2, r1 + strb r2, [r4, r0] + ldrb r2, [r4, r0] + tst r1, r2 + bne _02244E3C + sub r0, r0, #3 + ldrsh r0, [r4, r0] + add r1, r4, #0 + add r1, #0x88 + lsl r0, r0, #5 + add r0, r1, r0 + mov r1, #0 + mov r2, #0x20 + bl sub_020C00B4 + mov r0, #0xca + lsl r0, r0, #2 + ldrsh r0, [r4, r0] + add r1, r4, #0 + add r1, #0x88 + lsl r0, r0, #5 + add r0, r1, r0 + mov r1, #0 + mov r2, #0x20 + bl sub_020C0108 + ldr r0, _02244E44 ; =0x0000032A + ldrsb r1, [r4, r0] + cmp r1, #0 + bne _02244E20 + sub r1, r0, #2 + ldrsh r1, [r4, r1] + add r2, r1, #1 + sub r1, r0, #2 + strh r2, [r4, r1] + ldrsh r1, [r4, r1] + cmp r1, #0x15 + blt _02244E3C + mov r2, #0x13 + sub r1, r0, #2 + strh r2, [r4, r1] + ldrsb r2, [r4, r0] + mov r1, #1 + eor r1, r2 + strb r1, [r4, r0] + pop {r4, pc} +_02244E20: + sub r1, r0, #2 + ldrsh r1, [r4, r1] + sub r2, r1, #1 + sub r1, r0, #2 + strh r2, [r4, r1] + ldrsh r1, [r4, r1] + cmp r1, #0 + bge _02244E3C + mov r2, #1 + sub r1, r0, #2 + strh r2, [r4, r1] + ldrsb r1, [r4, r0] + eor r1, r2 + strb r1, [r4, r0] +_02244E3C: + pop {r4, pc} + nop +_02244E40: .word 0x0000032B +_02244E44: .word 0x0000032A + thumb_func_end ov94_02244DB4 + + thumb_func_start ov94_02244E48 +ov94_02244E48: ; 0x02244E48 + push {r3, r4, lr} + sub sp, #0x14 + mov r3, #4 + add r4, r0, #0 + str r3, [sp] + mov r0, #0x17 + str r0, [sp, #4] + mov r0, #0x10 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x94 + ldr r1, _02244EEC ; =0x00000F2C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + bl sub_0201A7E8 + ldr r0, _02244EEC ; =0x00000F2C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r0, #1 + str r0, [sp] + mov r0, #0x18 + str r0, [sp, #4] + mov r0, #2 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x81 + lsl r0, r0, #2 + ldr r1, _02244EF0 ; =0x00000F1C + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #4 + bl sub_0201A7E8 + ldr r0, _02244EF0 ; =0x00000F1C + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + mov r3, #1 + ldr r0, _02244EF4 ; =0x000F0E00 + str r3, [sp] + str r0, [sp, #4] + ldr r1, _02244EF8 ; =0x00000BB4 + ldr r0, _02244EF0 ; =0x00000F1C + ldr r1, [r4, r1] + add r0, r4, r0 + mov r2, #0 + bl ov94_022458CC + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + str r0, [sp, #8] + mov r0, #0xd + str r0, [sp, #0xc] + mov r0, #0x28 + ldr r1, _02244EFC ; =0x00000EFC + str r0, [sp, #0x10] + ldr r0, [r4, #4] + add r1, r4, r1 + mov r2, #0 + mov r3, #2 + bl sub_0201A7E8 + ldr r0, _02244EFC ; =0x00000EFC + mov r1, #0 + add r0, r4, r0 + bl sub_0201ADA4 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_02244EEC: .word 0x00000F2C +_02244EF0: .word 0x00000F1C +_02244EF4: .word 0x000F0E00 +_02244EF8: .word 0x00000BB4 +_02244EFC: .word 0x00000EFC + thumb_func_end ov94_02244E48 + + thumb_func_start ov94_02244F00 +ov94_02244F00: ; 0x02244F00 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02244F20 ; =0x00000EFC + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _02244F24 ; =0x00000F1C + add r0, r4, r0 + bl sub_0201A8FC + ldr r0, _02244F28 ; =0x00000F2C + add r0, r4, r0 + bl sub_0201A8FC + pop {r4, pc} + nop +_02244F20: .word 0x00000EFC +_02244F24: .word 0x00000F1C +_02244F28: .word 0x00000F2C + thumb_func_end ov94_02244F00 + + thumb_func_start ov94_02244F2C +ov94_02244F2C: ; 0x02244F2C + push {r4, lr} + add r4, r0, #0 + mov r0, #0xb4 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbb + lsl r1, r1, #4 + str r0, [r4, r1] + mov r0, #1 + lsl r0, r0, #8 + mov r1, #0x3e + bl sub_02023790 + mov r1, #0xbe + lsl r1, r1, #4 + str r0, [r4, r1] + sub r1, #0x4c + ldr r0, [r4, r1] + mov r1, #0x1f + bl sub_0200B1EC + ldr r1, _02244F60 ; =0x00000BB4 + str r0, [r4, r1] + pop {r4, pc} + nop +_02244F60: .word 0x00000BB4 + thumb_func_end ov94_02244F2C + + thumb_func_start ov94_02244F64 +ov94_02244F64: ; 0x02244F64 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02244F88 ; =0x00000BB4 + ldr r0, [r4, r0] + bl sub_020237BC + mov r0, #0xbe + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + mov r0, #0xbb + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_020237BC + pop {r4, pc} + nop +_02244F88: .word 0x00000BB4 + thumb_func_end ov94_02244F64 + + thumb_func_start ov94_02244F8C +ov94_02244F8C: ; 0x02244F8C + push {r3, r4, lr} + sub sp, #4 + ldr r1, _02244FBC ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xba + lsl r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0x11 + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0xd + mov r2, #1 + bl ov94_0223C3F4 + ldr r0, _02244FC0 ; =0x000010AE + mov r1, #1 + strh r1, [r4, r0] + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_02244FBC: .word 0x00000F0F +_02244FC0: .word 0x000010AE + thumb_func_end ov94_02244F8C + + thumb_func_start ov94_02244FC4 +ov94_02244FC4: ; 0x02244FC4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + ldr r0, _02245020 ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02245018 + sub r1, r1, #1 + cmp r0, r1 + bne _02244FF6 + bl sub_0203848C + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #0xb + str r0, [r4, #0x2c] + b _02245018 +_02244FF6: + ldr r0, _02245024 ; =0x00000F0F + ldr r1, _02245028 ; =0x00000B9C + str r0, [sp] + mov r2, #1 + ldr r1, [r4, r1] + add r0, r4, #0 + add r3, r2, #0 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0xc + mov r2, #2 + bl ov94_0223C3F4 + add r0, r4, #0 + bl ov94_0223C5D8 +_02245018: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_02245020: .word 0x00001070 +_02245024: .word 0x00000F0F +_02245028: .word 0x00000B9C + thumb_func_end ov94_02244FC4 + + thumb_func_start ov94_0224502C +ov94_0224502C: ; 0x0224502C + push {r3, r4, lr} + sub sp, #4 + ldr r1, _02245054 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + ldr r1, _02245058 ; =0x00000B94 + mov r2, #7 + ldr r1, [r4, r1] + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0xd + mov r2, #0x10 + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_02245054: .word 0x00000F0F +_02245058: .word 0x00000B94 + thumb_func_end ov94_0224502C + + thumb_func_start ov94_0224505C +ov94_0224505C: ; 0x0224505C + push {r4, lr} + add r4, r0, #0 + ldr r0, _022450BC ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _022450B8 + sub r1, r1, #1 + cmp r0, r1 + bne _0224509A + bl ov4_021D7A8C + cmp r0, #0 + bne _02245086 + mov r0, #0 + str r0, [r4, #0x2c] + b _022450B8 +_02245086: + add r0, r4, #0 + mov r1, #7 + mov r2, #0xb + bl ov94_0223C4C0 + mov r0, #1 + str r0, [r4, #0x1c] + mov r0, #0xb + str r0, [r4, #0x2c] + b _022450B8 +_0224509A: + bl ov4_021D7A8C + cmp r0, #0 + beq _022450A6 + bl ov4_021D7DB0 +_022450A6: + bl sub_0203848C + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #0xb + str r0, [r4, #0x2c] +_022450B8: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_022450BC: .word 0x00001070 + thumb_func_end ov94_0224505C + + thumb_func_start ov94_022450C0 +ov94_022450C0: ; 0x022450C0 + push {r3, r4, lr} + sub sp, #4 + ldr r1, _022450E8 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xba + lsl r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0x1a + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0xc + mov r2, #0x12 + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_022450E8: .word 0x00000F0F + thumb_func_end ov94_022450C0 + + thumb_func_start ov94_022450EC +ov94_022450EC: ; 0x022450EC + push {r4, lr} + add r4, r0, #0 + bl sub_0203848C + bl ov4_021D7DB0 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #0x13 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_022450EC + + thumb_func_start ov94_0224510C +ov94_0224510C: ; 0x0224510C + push {r3, r4, lr} + sub sp, #4 + ldr r1, _02245134 ; =0x00000F0F + add r4, r0, #0 + str r1, [sp] + mov r1, #0xba + lsl r1, r1, #4 + ldr r1, [r4, r1] + mov r2, #0x1b + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0x14 + mov r2, #0xb + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_02245134: .word 0x00000F0F + thumb_func_end ov94_0224510C + + thumb_func_start ov94_02245138 +ov94_02245138: ; 0x02245138 + push {r4, lr} + add r4, r0, #0 + add r0, #0x54 + mov r1, #2 + mov r2, #1 + mov r3, #0x14 + bl ov4_021D78C8 + mov r0, #2 + bl ov4_021D792C + bl ov4_021D797C + mov r0, #3 + str r0, [r4, #0x2c] + pop {r4, pc} + thumb_func_end ov94_02245138 + + thumb_func_start ov94_02245158 +ov94_02245158: ; 0x02245158 + push {r4, lr} + sub sp, #0x48 + add r4, r0, #0 + bl ov4_021D7AE4 + bl ov4_021D7A8C + cmp r0, #0 + beq _022451D6 + bl ov4_021D7BFC + cmp r0, #8 + bhi _022451B6 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224517E: ; jump table + .short _022451B6 - _0224517E - 2 ; case 0 + .short _022451B6 - _0224517E - 2 ; case 1 + .short _022451B6 - _0224517E - 2 ; case 2 + .short _022451B6 - _0224517E - 2 ; case 3 + .short _022451CC - _0224517E - 2 ; case 4 + .short _022451B6 - _0224517E - 2 ; case 5 + .short _022451B6 - _0224517E - 2 ; case 6 + .short _02245190 - _0224517E - 2 ; case 7 + .short _022451B6 - _0224517E - 2 ; case 8 +_02245190: + add r0, sp, #8 + add r1, sp, #4 + bl ov4_021D75F4 + str r0, [r4, #0x40] + ldr r0, [sp, #8] + str r0, [r4, #0x44] + ldr r0, [sp, #4] + str r0, [r4, #0x48] + bl ov4_021D76E8 + bl ov4_021D7DB0 + add r0, r4, #0 + bl ov94_0223C5F4 + mov r0, #0x17 + str r0, [r4, #0x2c] + b _022451D6 +_022451B6: + add r0, sp, #0 + bl ov4_021D75D4 + add r0, r4, #0 + bl ov94_0223C5F4 + mov r0, #0x15 + str r0, [r4, #0x2c] + sub r0, #0x17 + str r0, [r4, #0x3c] + b _022451D6 +_022451CC: + add r0, sp, #0xc + bl ov4_021D7EB8 + mov r0, #4 + str r0, [r4, #0x2c] +_022451D6: + mov r0, #3 + add sp, #0x48 + pop {r4, pc} + thumb_func_end ov94_02245158 + + thumb_func_start ov94_022451DC +ov94_022451DC: ; 0x022451DC + push {r4, lr} + add r4, r0, #0 + bl ov4_021D81DC + mov r0, #5 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + thumb_func_end ov94_022451DC + + thumb_func_start ov94_022451EC +ov94_022451EC: ; 0x022451EC + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + bl ov4_021D82A0 + cmp r0, #5 + bhi _0224528C + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02245206: ; jump table + .short _02245218 - _02245206 - 2 ; case 0 + .short _0224528C - _02245206 - 2 ; case 1 + .short _0224528C - _02245206 - 2 ; case 2 + .short _02245212 - _02245206 - 2 ; case 3 + .short _02245218 - _02245206 - 2 ; case 4 + .short _02245218 - _02245206 - 2 ; case 5 +_02245212: + mov r0, #6 + str r0, [r4, #0x2c] + b _0224528C +_02245218: + add r0, r4, #0 + bl ov94_0223C5F4 + add r0, sp, #4 + add r1, sp, #0 + bl ov4_021D75F4 + str r0, [r4, #0x40] + ldr r0, [sp, #4] + str r0, [r4, #0x44] + bl ov4_021D76E8 + bl ov4_021D7DB0 + mov r0, #0x17 + str r0, [r4, #0x2c] + ldr r1, [sp] + cmp r1, #7 + bhi _0224527A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224524A: ; jump table + .short _0224527A - _0224524A - 2 ; case 0 + .short _0224525A - _0224524A - 2 ; case 1 + .short _0224525A - _0224524A - 2 ; case 2 + .short _0224526C - _0224524A - 2 ; case 3 + .short _0224525E - _0224524A - 2 ; case 4 + .short _02245276 - _0224524A - 2 ; case 5 + .short _02245268 - _0224524A - 2 ; case 6 + .short _02245276 - _0224524A - 2 ; case 7 +_0224525A: + str r0, [r4, #0x2c] + b _0224527A +_0224525E: + bl ov4_021E55B0 + mov r0, #0x17 + str r0, [r4, #0x2c] + b _0224527A +_02245268: + str r0, [r4, #0x2c] + b _0224527A +_0224526C: + bl ov4_021D8E8C + mov r0, #0x17 + str r0, [r4, #0x2c] + b _0224527A +_02245276: + bl sub_02038A0C +_0224527A: + ldr r1, [sp, #4] + ldr r0, _02245294 ; =0xFFFFB1E0 + cmp r1, r0 + bge _0224528C + ldr r0, _02245298 ; =0xFFFF8AD1 + cmp r1, r0 + blt _0224528C + mov r0, #0x17 + str r0, [r4, #0x2c] +_0224528C: + mov r0, #3 + add sp, #8 + pop {r4, pc} + nop +_02245294: .word 0xFFFFB1E0 +_02245298: .word 0xFFFF8AD1 + thumb_func_end ov94_022451EC + + thumb_func_start ov94_0224529C +ov94_0224529C: ; 0x0224529C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #0x14] + bl sub_0202AD28 + add r4, r0, #0 + ldr r0, [r5, #0] + ldr r0, [r0, #4] + bl sub_02025D74 + cmp r0, #0 + bne _022452C0 + ldr r1, [r5, #0] + ldr r0, [r1, #4] + ldr r1, [r1, #0x38] + bl sub_02025D78 +_022452C0: + ldr r0, [r5, #0] + ldr r0, [r0, #4] + bl sub_02025D74 + add r6, r0, #0 + add r0, r4, #0 + bl sub_020A471C + add r3, r0, #0 + add r2, r1, #0 + add r0, r6, #0 + add r1, r3, #0 + bl ov94_0223B140 + mov r0, #7 + str r0, [r5, #0x2c] + mov r0, #3 + pop {r4, r5, r6, pc} + thumb_func_end ov94_0224529C + + thumb_func_start ov94_022452E4 +ov94_022452E4: ; 0x022452E4 + push {r4, lr} + add r4, r0, #0 + bl ov94_0223BB40 + mov r0, #8 + str r0, [r4, #0x2c] + ldr r0, _022452FC ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_022452FC: .word 0x00001484 + thumb_func_end ov94_022452E4 + + thumb_func_start ov94_02245300 +ov94_02245300: ; 0x02245300 + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + beq _0224539A + bl ov94_0223B7D8 + add r5, r0, #0 + ldr r0, _022453B4 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + add r0, r5, #0 + add r0, #0xf + cmp r0, #0x11 + bhi _0224538E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224532C: ; jump table + .short _02245372 - _0224532C - 2 ; case 0 + .short _02245380 - _0224532C - 2 ; case 1 + .short _0224538E - _0224532C - 2 ; case 2 + .short _02245372 - _0224532C - 2 ; case 3 + .short _0224538E - _0224532C - 2 ; case 4 + .short _0224538E - _0224532C - 2 ; case 5 + .short _0224538E - _0224532C - 2 ; case 6 + .short _0224538E - _0224532C - 2 ; case 7 + .short _0224538E - _0224532C - 2 ; case 8 + .short _0224538E - _0224532C - 2 ; case 9 + .short _0224538E - _0224532C - 2 ; case 10 + .short _0224538E - _0224532C - 2 ; case 11 + .short _0224538E - _0224532C - 2 ; case 12 + .short _02245380 - _0224532C - 2 ; case 13 + .short _02245364 - _0224532C - 2 ; case 14 + .short _02245350 - _0224532C - 2 ; case 15 + .short _02245356 - _0224532C - 2 ; case 16 + .short _02245364 - _0224532C - 2 ; case 17 +_02245350: + mov r0, #9 + str r0, [r4, #0x2c] + b _022453B0 +_02245356: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _022453B0 +_02245364: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _022453B0 +_02245372: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _022453B0 +_02245380: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _022453B0 +_0224538E: + add r0, r4, #0 + bl ov94_0223C5F4 + bl sub_02038A0C + b _022453B0 +_0224539A: + ldr r0, _022453B4 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _022453B0 + bl sub_02038A0C +_022453B0: + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022453B4: .word 0x00001484 + thumb_func_end ov94_02245300 + + thumb_func_start ov94_022453B8 +ov94_022453B8: ; 0x022453B8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + ldr r1, _022453E4 ; =0x000010E4 + ldr r0, [r0, #0x20] + add r1, r4, r1 + bl sub_02030E78 + ldr r1, _022453E4 ; =0x000010E4 + add r0, r4, r1 + add r1, #0x64 + add r1, r4, r1 + bl ov94_0223BB84 + mov r0, #0xa + str r0, [r4, #0x2c] + ldr r0, _022453E8 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + mov r0, #3 + pop {r4, pc} + nop +_022453E4: .word 0x000010E4 +_022453E8: .word 0x00001484 + thumb_func_end ov94_022453B8 + + thumb_func_start ov94_022453EC +ov94_022453EC: ; 0x022453EC + push {r3, r4, r5, lr} + add r4, r0, #0 + bl ov94_0223B7B8 + cmp r0, #0 + bne _022453FA + b _0224550A +_022453FA: + bl ov94_0223B7D8 + add r5, r0, #0 + ldr r0, _02245524 ; =0x00001484 + mov r1, #0 + str r1, [r4, r0] + add r0, r5, #0 + add r0, #0xf + cmp r0, #0x11 + bhi _022454FE + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224541A: ; jump table + .short _022454E2 - _0224541A - 2 ; case 0 + .short _022454F0 - _0224541A - 2 ; case 1 + .short _022454FE - _0224541A - 2 ; case 2 + .short _022454E2 - _0224541A - 2 ; case 3 + .short _022454FE - _0224541A - 2 ; case 4 + .short _022454FE - _0224541A - 2 ; case 5 + .short _022454FE - _0224541A - 2 ; case 6 + .short _022454FE - _0224541A - 2 ; case 7 + .short _022454FE - _0224541A - 2 ; case 8 + .short _022454FE - _0224541A - 2 ; case 9 + .short _022454FE - _0224541A - 2 ; case 10 + .short _022454FE - _0224541A - 2 ; case 11 + .short _022454FE - _0224541A - 2 ; case 12 + .short _022454F0 - _0224541A - 2 ; case 13 + .short _022454D4 - _0224541A - 2 ; case 14 + .short _0224543E - _0224541A - 2 ; case 15 + .short _022454C6 - _0224541A - 2 ; case 16 + .short _022454D4 - _0224541A - 2 ; case 17 +_0224543E: + add r0, r4, #0 + bl ov94_0223C5F4 + ldr r0, _02245528 ; =0x00001148 + ldr r1, [r4, r0] + cmp r1, #0 + beq _02245456 + cmp r1, #1 + beq _022454A6 + cmp r1, #2 + beq _022454B0 + b _022454BA +_02245456: + add r0, r0, #4 + ldr r0, [r4, r0] + cmp r0, #3 + bhi _022454A0 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224546A: ; jump table + .short _02245472 - _0224546A - 2 ; case 0 + .short _0224548C - _0224546A - 2 ; case 1 + .short _02245496 - _0224546A - 2 ; case 2 + .short _02245482 - _0224546A - 2 ; case 3 +_02245472: + add r0, r4, #0 + mov r1, #1 + mov r2, #0 + bl ov94_0223C4C0 + mov r0, #0xb + str r0, [r4, #0x2c] + b _02245520 +_02245482: + ldr r0, _0224552C ; =0xFFFFEC75 + str r0, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_0224548C: + ldr r0, _02245530 ; =0xFFFFEC78 + str r0, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_02245496: + ldr r0, _02245534 ; =0xFFFFEC77 + str r0, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454A0: + bl sub_02038A0C + b _02245520 +_022454A6: + ldr r0, _02245538 ; =0xFFFFEC74 + str r0, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454B0: + ldr r0, _0224553C ; =0xFFFFEC73 + str r0, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454BA: + add r0, r4, #0 + bl ov94_0223C5F4 + bl sub_02038A0C + b _02245520 +_022454C6: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454D4: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454E2: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454F0: + add r0, r4, #0 + bl ov94_0223C5F4 + str r5, [r4, #0x3c] + mov r0, #0x15 + str r0, [r4, #0x2c] + b _02245520 +_022454FE: + add r0, r4, #0 + bl ov94_0223C5F4 + bl sub_02038A0C + b _02245520 +_0224550A: + ldr r0, _02245524 ; =0x00001484 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] + ldr r1, [r4, r0] + mov r0, #0xe1 + lsl r0, r0, #4 + cmp r1, r0 + bne _02245520 + bl sub_02038A0C +_02245520: + mov r0, #3 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02245524: .word 0x00001484 +_02245528: .word 0x00001148 +_0224552C: .word 0xFFFFEC75 +_02245530: .word 0xFFFFEC78 +_02245534: .word 0xFFFFEC77 +_02245538: .word 0xFFFFEC74 +_0224553C: .word 0xFFFFEC73 + thumb_func_end ov94_022453EC + + thumb_func_start ov94_02245540 +ov94_02245540: ; 0x02245540 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x44] + ldr r1, [r4, #0x48] + neg r0, r0 + bl ov4_021D1F3C + ldr r2, [r4, #0x44] + add r1, r0, #0 + add r0, r4, #0 + neg r2, r2 + bl ov94_022459B4 + mov r0, #0x18 + str r0, [r4, #0x2c] + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02245540 + + thumb_func_start ov94_02245564 +ov94_02245564: ; 0x02245564 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224558C ; =0x021BF67C + ldr r1, [r0, #0x48] + mov r0, #1 + tst r0, r1 + bne _02245578 + mov r0, #2 + tst r0, r1 + beq _02245586 +_02245578: + ldr r0, _02245590 ; =0x00000F2C + mov r1, #0 + add r0, r4, r0 + bl sub_0200DC9C + mov r0, #0 + str r0, [r4, #0x2c] +_02245586: + mov r0, #3 + pop {r4, pc} + nop +_0224558C: .word 0x021BF67C +_02245590: .word 0x00000F2C + thumb_func_end ov94_02245564 + + thumb_func_start ov94_02245594 +ov94_02245594: ; 0x02245594 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl sub_02039794 + add r0, r4, #0 + bl ov94_0223C5F4 + mov r0, #6 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3e + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #0 + str r0, [r4, #0x2c] + ldr r0, _022455CC ; =0x000010B0 + mov r1, #1 + str r1, [r4, r0] + mov r0, #4 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_022455CC: .word 0x000010B0 + thumb_func_end ov94_02245594 + + thumb_func_start ov94_022455D0 +ov94_022455D0: ; 0x022455D0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _02245604 ; =0x00001070 + mov r1, #0x3e + ldr r0, [r4, r0] + bl sub_02002114 + mov r1, #0 + mvn r1, r1 + cmp r0, r1 + beq _02245600 + sub r1, r1, #1 + cmp r0, r1 + bne _022455F2 + mov r0, #0 + str r0, [r4, #0x2c] + b _02245600 +_022455F2: + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #0xb + str r0, [r4, #0x2c] +_02245600: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_02245604: .word 0x00001070 + thumb_func_end ov94_022455D0 + + thumb_func_start ov94_02245608 +ov94_02245608: ; 0x02245608 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + mov r2, #0xd + ldr r0, [r4, #0x3c] + mvn r2, r2 + cmp r0, r2 + bgt _02245646 + bge _02245682 + ldr r1, _022456BC ; =0xFFFFEC78 + cmp r0, r1 + bgt _0224563E + ldr r1, _022456C0 ; =0x0000138D + add r1, r0, r1 + bmi _02245686 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02245632: ; jump table + .short _0224569A - _02245632 - 2 ; case 0 + .short _02245696 - _02245632 - 2 ; case 1 + .short _0224568A - _02245632 - 2 ; case 2 + .short _02245686 - _02245632 - 2 ; case 3 + .short _02245692 - _02245632 - 2 ; case 4 + .short _0224568E - _02245632 - 2 ; case 5 +_0224563E: + mov r1, #0xe + mvn r1, r1 + cmp r0, r1 + b _02245686 +_02245646: + add r1, r2, #0 + add r1, #9 + cmp r0, r1 + bgt _0224565C + add r1, r2, #0 + add r1, #9 + cmp r0, r1 + bge _02245686 + add r1, r2, #2 + cmp r0, r1 + b _02245686 +_0224565C: + add r0, r0, #3 + cmp r0, #5 + bhi _02245686 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224566E: ; jump table + .short _02245686 - _0224566E - 2 ; case 0 + .short _02245682 - _0224566E - 2 ; case 1 + .short _0224567E - _0224566E - 2 ; case 2 + .short _02245686 - _0224566E - 2 ; case 3 + .short _0224567A - _0224566E - 2 ; case 4 + .short _0224567E - _0224566E - 2 ; case 5 +_0224567A: + mov r2, #0x90 + b _0224569C +_0224567E: + mov r2, #0x91 + b _0224569C +_02245682: + mov r2, #0x96 + b _0224569C +_02245686: + mov r2, #0x95 + b _0224569C +_0224568A: + mov r2, #0xb1 + b _0224569C +_0224568E: + mov r2, #0xae + b _0224569C +_02245692: + mov r2, #0xae + b _0224569C +_02245696: + mov r2, #0xaf + b _0224569C +_0224569A: + mov r2, #0xb0 +_0224569C: + ldr r0, _022456C4 ; =0x00000F0F + ldr r1, _022456C8 ; =0x00000B94 + str r0, [sp] + ldr r1, [r4, r1] + add r0, r4, #0 + mov r3, #1 + bl ov94_02245824 + add r0, r4, #0 + mov r1, #0xc + mov r2, #0x16 + bl ov94_0223C3F4 + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_022456BC: .word 0xFFFFEC78 +_022456C0: .word 0x0000138D +_022456C4: .word 0x00000F0F +_022456C8: .word 0x00000B94 + thumb_func_end ov94_02245608 + + thumb_func_start ov94_022456CC +ov94_022456CC: ; 0x022456CC + push {r3, r4, lr} + sub sp, #4 + mov r1, #0x52 + add r4, r0, #0 + lsl r1, r1, #6 + ldrsh r1, [r4, r1] + cmp r1, #3 + bhi _02245768 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022456E8: ; jump table + .short _022456F0 - _022456E8 - 2 ; case 0 + .short _0224570C - _022456E8 - 2 ; case 1 + .short _02245730 - _022456E8 - 2 ; case 2 + .short _0224574C - _022456E8 - 2 ; case 3 +_022456F0: + ldr r1, _0224578C ; =0x00000F0F + mov r2, #0xb2 + str r1, [sp] + ldr r1, _02245790 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + mov r0, #0x52 + lsl r0, r0, #6 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + b _02245784 +_0224570C: + ldr r0, _02245794 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02245784 + bl sub_0203848C + bl ov4_021D7DB0 + mov r0, #0x52 + lsl r0, r0, #6 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + b _02245784 +_02245730: + ldr r1, _0224578C ; =0x00000F0F + mov r2, #0xb3 + str r1, [sp] + ldr r1, _02245790 ; =0x00000B94 + mov r3, #1 + ldr r1, [r4, r1] + bl ov94_02245824 + mov r0, #0x52 + lsl r0, r0, #6 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + b _02245784 +_0224574C: + ldr r0, _02245794 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02245784 + mov r0, #0x52 + lsl r0, r0, #6 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + b _02245784 +_02245768: + ldr r0, _02245798 ; =0x00001482 + ldrsh r1, [r4, r0] + add r1, r1, #1 + strh r1, [r4, r0] + ldrsh r0, [r4, r0] + cmp r0, #0x1e + ble _02245784 + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl ov94_0223C4C0 + mov r0, #0xb + str r0, [r4, #0x2c] +_02245784: + mov r0, #3 + add sp, #4 + pop {r3, r4, pc} + nop +_0224578C: .word 0x00000F0F +_02245790: .word 0x00000B94 +_02245794: .word 0x00000BE4 +_02245798: .word 0x00001482 + thumb_func_end ov94_022456CC + + thumb_func_start ov94_0224579C +ov94_0224579C: ; 0x0224579C + push {r4, lr} + add r4, r0, #0 + ldr r0, _022457B8 ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _022457B4 + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_022457B4: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_022457B8: .word 0x00000BE4 + thumb_func_end ov94_0224579C + + thumb_func_start ov94_022457BC +ov94_022457BC: ; 0x022457BC + push {r4, lr} + add r4, r0, #0 + ldr r0, _022457EC ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _022457E8 + mov r0, #0x42 + lsl r0, r0, #6 + ldr r0, [r4, r0] + cmp r0, #0x1e + ble _022457DE + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_022457DE: + mov r0, #0x42 + lsl r0, r0, #6 + ldr r1, [r4, r0] + add r1, r1, #1 + str r1, [r4, r0] +_022457E8: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_022457EC: .word 0x00000BE4 + thumb_func_end ov94_022457BC + + thumb_func_start ov94_022457F0 +ov94_022457F0: ; 0x022457F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, _0224581C ; =0x00000BE4 + ldr r0, [r4, r0] + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + bl sub_0201D724 + cmp r0, #0 + bne _02245818 + mov r2, #0x8d + ldr r0, [r4, #4] + mov r1, #0xd + lsl r2, r2, #2 + bl ov94_0223C3C0 + ldr r1, _02245820 ; =0x00001070 + str r0, [r4, r1] + ldr r0, [r4, #0x30] + str r0, [r4, #0x2c] +_02245818: + mov r0, #3 + pop {r4, pc} + ; .align 2, 0 +_0224581C: .word 0x00000BE4 +_02245820: .word 0x00001070 + thumb_func_end ov94_022457F0 + + thumb_func_start ov94_02245824 +ov94_02245824: ; 0x02245824 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + add r0, r1, #0 + add r1, r2, #0 + add r4, r3, #0 + bl sub_0200B1EC + mov r1, #0xb9 + add r6, r0, #0 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, #0x20 + ldr r1, [r5, r1] + add r2, r6, #0 + bl sub_0200C388 + add r0, r6, #0 + bl sub_020237BC + ldr r0, _0224588C ; =0x00000EFC + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _0224588C ; =0x00000EFC + mov r1, #0 + add r0, r5, r0 + mov r2, #1 + mov r3, #0xa + bl sub_0200E060 + mov r3, #0 + str r3, [sp] + str r4, [sp, #4] + mov r2, #0xbb + ldr r0, _0224588C ; =0x00000EFC + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _02245890 ; =0x00000BE4 + str r0, [r5, r1] + mov r0, #0x42 + mov r1, #0 + lsl r0, r0, #6 + str r1, [r5, r0] + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224588C: .word 0x00000EFC +_02245890: .word 0x00000BE4 + thumb_func_end ov94_02245824 + + thumb_func_start ov94_02245894 +ov94_02245894: ; 0x02245894 + push {r4, lr} + add r4, r0, #0 + cmp r3, #1 + beq _022458A2 + cmp r3, #2 + beq _022458B8 + b _022458C6 +_022458A2: + ldr r0, [sp, #0xc] + mov r2, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r1, r1, r0 + lsr r0, r1, #0x1f + add r0, r1, r0 + asr r2, r0, #1 + b _022458C6 +_022458B8: + ldr r0, [sp, #0xc] + mov r2, #0 + bl sub_02002D7C + ldrb r1, [r4, #7] + lsl r1, r1, #3 + sub r2, r1, r0 +_022458C6: + add r0, r2, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov94_02245894 + + thumb_func_start ov94_022458CC +ov94_022458CC: ; 0x022458CC + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r3, #0 + ldr r3, [sp, #0x24] + add r5, r0, #0 + str r3, [sp] + mov r3, #1 + str r3, [sp, #4] + ldr r3, [sp, #0x20] + add r6, r1, #0 + bl ov94_02245894 + add r3, r0, #0 + str r4, [sp] + mov r1, #0 + ldr r0, [sp, #0x24] + str r1, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + add r0, r5, #0 + mov r1, #1 + add r2, r6, #0 + bl sub_0201D78C + add sp, #0x10 + pop {r4, r5, r6, pc} + thumb_func_end ov94_022458CC + + thumb_func_start ov94_02245900 +ov94_02245900: ; 0x02245900 + push {r4, r5, r6, lr} + sub sp, #0x10 + add r4, r3, #0 + ldr r3, [sp, #0x24] + add r5, r0, #0 + str r3, [sp] + mov r3, #0 + str r3, [sp, #4] + ldr r3, [sp, #0x20] + add r6, r1, #0 + bl ov94_02245894 + add r3, r0, #0 + str r4, [sp] + mov r1, #0 + ldr r0, [sp, #0x24] + str r1, [sp, #4] + str r0, [sp, #8] + add r0, r5, #0 + add r2, r6, #0 + str r1, [sp, #0xc] + bl sub_0201D78C + add sp, #0x10 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov94_02245900 + + thumb_func_start ov94_02245934 +ov94_02245934: ; 0x02245934 + ldr r3, _02245938 ; =sub_02039734 + bx r3 + ; .align 2, 0 +_02245938: .word sub_02039734 + thumb_func_end ov94_02245934 + + thumb_func_start ov94_0224593C +ov94_0224593C: ; 0x0224593C + push {r3, r4, r5, r6, lr} + sub sp, #0xc + add r5, r0, #0 + mov r0, #1 + add r6, r1, #0 + lsl r0, r0, #8 + mov r1, #0x3e + bl sub_02023790 + add r4, r0, #0 + mov r0, #0xba + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r6, #0 + add r2, r4, #0 + bl sub_0200B1B8 + mov r1, #0xb9 + lsl r1, r1, #4 + ldr r0, [r5, r1] + add r1, #0x50 + ldr r1, [r5, r1] + add r2, r4, #0 + bl sub_0200C388 + ldr r0, _022459AC ; =0x00000F2C + mov r1, #0xf + add r0, r5, r0 + bl sub_0201ADA4 + ldr r0, _022459AC ; =0x00000F2C + mov r1, #1 + add r0, r5, r0 + mov r2, #0x1f + mov r3, #0xb + bl sub_0200DC48 + mov r3, #0 + str r3, [sp] + str r3, [sp, #4] + mov r2, #0xbe + ldr r0, _022459AC ; =0x00000F2C + str r3, [sp, #8] + lsl r2, r2, #4 + ldr r2, [r5, r2] + add r0, r5, r0 + mov r1, #1 + bl sub_0201D738 + ldr r1, _022459B0 ; =0x00000BE4 + str r0, [r5, r1] + add r0, r4, #0 + bl sub_020237BC + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_022459AC: .word 0x00000F2C +_022459B0: .word 0x00000BE4 + thumb_func_end ov94_0224593C + + thumb_func_start ov94_022459B4 +ov94_022459B4: ; 0x022459B4 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0 + add r4, r1, #0 + mvn r0, r0 + cmp r4, r0 + bne _022459C6 + mov r4, #0xb +_022459C6: + mov r0, #2 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0xb9 + lsl r0, r0, #4 + ldr r0, [r5, r0] + mov r1, #0 + mov r3, #5 + bl sub_0200B60C + ldr r0, _022459F4 ; =0x00000EFC + mov r1, #1 + add r0, r5, r0 + bl sub_0200E084 + add r0, r5, #0 + add r1, r4, #0 + bl ov94_0224593C + add sp, #8 + pop {r3, r4, r5, pc} + nop +_022459F4: .word 0x00000EFC + thumb_func_end ov94_022459B4 + + .rodata + + + .global Unk_ov94_0224637C +Unk_ov94_0224637C: ; 0x0224637C + .incbin "incbin/overlay94_rodata.bin", 0x984, 0x9A0 - 0x984 + + .global Unk_ov94_02246398 +Unk_ov94_02246398: ; 0x02246398 + .incbin "incbin/overlay94_rodata.bin", 0x9A0, 0x9BC - 0x9A0 + + .global Unk_ov94_022463B4 +Unk_ov94_022463B4: ; 0x022463B4 + .incbin "incbin/overlay94_rodata.bin", 0x9BC, 0x9D8 - 0x9BC + + .global Unk_ov94_022463D0 +Unk_ov94_022463D0: ; 0x022463D0 + .incbin "incbin/overlay94_rodata.bin", 0x9D8, 0x1C + + + .data + + + .global Unk_ov94_02246A40 +Unk_ov94_02246A40: ; 0x02246A40 + .incbin "incbin/overlay94_data.bin", 0x640, 0x64 + diff --git a/asm/ov95_02246C20.s b/asm/ov95_02246C20.s new file mode 100644 index 000000000..25899a74c --- /dev/null +++ b/asm/ov95_02246C20.s @@ -0,0 +1,1479 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_02246C20 +ov95_02246C20: ; 0x02246C20 + push {r4, r5, lr} + sub sp, #0x14 + add r5, r0, #0 + bl sub_0200F2AC + cmp r0, #0 + bne _02246C30 + b _02246DCA +_02246C30: + mov r0, #3 + mov r1, #0x39 + lsl r2, r0, #0xf + bl sub_02017FC8 + mov r0, #3 + mov r1, #0x3a + lsl r2, r0, #0xf + bl sub_02017FC8 + bl ov95_02247688 + ldr r1, _02246DD0 ; =0x00000492 + mov r0, #3 + mov r2, #1 + bl sub_02004550 + mov r1, #0x56 + add r0, r5, #0 + lsl r1, r1, #2 + mov r2, #0x39 + bl sub_0200681C + add r4, r0, #0 + bne _02246C64 + b _02246DC4 +_02246C64: + add r0, r5, #0 + bl sub_02006840 + str r0, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + mov r0, #0x39 + bl sub_02018340 + str r0, [r4, #8] + mov r0, #0x19 + lsl r0, r0, #4 + mov r1, #0x39 + bl sub_02023790 + str r0, [r4, #0x14] + ldr r2, _02246DD4 ; =0x0000015E + mov r0, #0 + mov r1, #0x1a + mov r3, #0x39 + bl sub_0200B144 + str r0, [r4, #0x10] + mov r0, #0x39 + bl sub_0200B358 + str r0, [r4, #0xc] + ldr r2, [r4, #0] + ldr r0, [r2, #0x10] + cmp r0, #1 + beq _02246CAC + cmp r0, #2 + beq _02246CDE + cmp r0, #4 + beq _02246CEA + b _02246D02 +_02246CAC: + ldr r0, [r4, #0xc] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200B5CC + ldr r2, [r4, #0] + ldr r0, [r4, #0xc] + ldr r2, [r2, #4] + mov r1, #1 + bl sub_0200B5CC + ldr r2, [r4, #0] + ldr r0, [r4, #0xc] + ldr r2, [r2, #8] + mov r1, #2 + bl sub_0200B498 + ldr r0, [r4, #0] + ldr r0, [r0, #4] + bl ov95_02246DEC + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r4, r1] + b _02246D02 +_02246CDE: + ldr r0, [r4, #0xc] + ldr r2, [r2, #0] + mov r1, #0 + bl sub_0200B5CC + b _02246D02 +_02246CEA: + ldr r0, [r4, #0xc] + ldr r2, [r2, #4] + mov r1, #1 + bl sub_0200B5CC + ldr r0, [r4, #0] + ldr r0, [r0, #4] + bl ov95_02246DEC + mov r1, #0x52 + lsl r1, r1, #2 + str r0, [r4, r1] +_02246D02: + bl sub_020A7944 + mov r0, #1 + str r0, [sp] + mov r0, #0x7f + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r1, #0x39 + str r1, [sp, #0x10] + mov r1, #0x80 + add r2, r0, #0 + bl sub_0200A784 + add r1, r4, #0 + mov r0, #0x40 + add r1, #0x1c + mov r2, #0x39 + bl sub_020095C4 + str r0, [r4, #0x18] + add r0, r4, #0 + mov r2, #0x3a + add r0, #0x1c + mov r1, #0 + lsl r2, r2, #0xe + bl sub_0200964C + ldr r0, [r4, #0] + mov r1, #5 + ldr r0, [r0, #0] + mov r2, #0 + bl sub_02074570 + mov r1, #0x53 + lsl r1, r1, #2 + strh r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #0x70 + ldr r0, [r0, #0] + mov r2, #0 + bl sub_02074570 + ldr r1, _02246DD8 ; =0x0000014E + mov r2, #0 + strh r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #5 + ldr r0, [r0, #4] + bl sub_02074570 + mov r1, #0x15 + lsl r1, r1, #4 + strh r0, [r4, r1] + ldr r0, [r4, #0] + mov r1, #0x70 + ldr r0, [r0, #4] + mov r2, #0 + bl sub_02074570 + ldr r1, _02246DDC ; =0x00000152 + strh r0, [r4, r1] + mov r0, #0 + add r1, r1, #2 + str r0, [r4, r1] + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _02246DE0 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _02246DE4 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + ldr r0, _02246DE8 ; =ov95_02246F0C + add r1, r4, #0 + mov r2, #1 + bl sub_0200DA20 + mov r1, #0x51 + lsl r1, r1, #2 + str r0, [r4, r1] + mov r0, #0 + add r1, #0x10 + str r0, [r4, r1] +_02246DC4: + add sp, #0x14 + mov r0, #1 + pop {r4, r5, pc} +_02246DCA: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, pc} + ; .align 2, 0 +_02246DD0: .word 0x00000492 +_02246DD4: .word 0x0000015E +_02246DD8: .word 0x0000014E +_02246DDC: .word 0x00000152 +_02246DE0: .word 0xFFFFE0FF +_02246DE4: .word 0x04001000 +_02246DE8: .word ov95_02246F0C + thumb_func_end ov95_02246C20 + + thumb_func_start ov95_02246DEC +ov95_02246DEC: ; 0x02246DEC + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + add r4, r0, #0 + add r0, r5, #0 + mov r1, #0x70 + mov r2, #0 + bl sub_02074570 + add r1, r0, #0 + add r0, r4, #0 + mov r2, #0x1c + bl sub_020759CC + cmp r0, #0 + bne _02246E16 + mov r0, #1 + pop {r3, r4, r5, pc} +_02246E16: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_02246DEC + + thumb_func_start ov95_02246E1C +ov95_02246E1C: ; 0x02246E1C + push {r4, r5, r6, lr} + add r5, r0, #0 + bl sub_020C3D98 + add r6, r0, #0 + add r0, r5, #0 + bl sub_0200682C + add r4, r0, #0 + mov r0, #0x51 + lsl r0, r0, #2 + ldr r0, [r4, r0] + bl sub_0200DA58 + bl sub_02039794 + ldr r0, [r4, #0xc] + bl sub_0200B3F0 + ldr r0, [r4, #0x10] + bl sub_0200B190 + ldr r0, [r4, #0x14] + bl sub_020237BC + ldr r0, [r4, #8] + bl sub_020181C4 + ldr r0, [r4, #0x18] + bl sub_02021964 + bl sub_0200A878 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0x39 + bl sub_0201807C + mov r0, #0x3a + bl sub_0201807C + add r0, r6, #0 + bl sub_020C3DAC + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov95_02246E1C + + thumb_func_start ov95_02246E7C +ov95_02246E7C: ; 0x02246E7C + push {r4, r5, r6, lr} + add r5, r1, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r3, [r4, #4] + cmp r3, #7 + bhs _02246EF8 + ldr r1, [r4, #0] + ldr r6, _02246EFC ; =0x0224BE98 + lsl r2, r3, #4 + ldr r1, [r1, #0x10] + ldr r6, [r6, r2] + tst r1, r6 + beq _02246EE8 + mov r1, #0x55 + lsl r1, r1, #2 + ldr r1, [r4, r1] + cmp r1, #0 + bne _02246EB0 + ldr r1, _02246F00 ; =0x0224BE8C + ldr r1, [r1, r2] + blx r1 + mov r1, #0x55 + lsl r1, r1, #2 + str r0, [r4, r1] +_02246EB0: + ldr r2, [r4, #4] + mov r0, #0x55 + lsl r3, r2, #4 + ldr r2, _02246F04 ; =0x0224BE90 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r2, [r2, r3] + add r1, r5, #0 + blx r2 + cmp r0, #0 + beq _02246EF0 + ldr r1, [r4, #4] + mov r0, #0x55 + lsl r2, r1, #4 + ldr r1, _02246F08 ; =0x0224BE94 + lsl r0, r0, #2 + ldr r0, [r4, r0] + ldr r1, [r1, r2] + blx r1 + mov r0, #0x55 + mov r1, #0 + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + str r1, [r5, #0] + b _02246EF0 +_02246EE8: + add r0, r3, #1 + str r0, [r4, #4] + mov r0, #0 + str r0, [r5, #0] +_02246EF0: + bl ov95_02247694 + mov r0, #0 + pop {r4, r5, r6, pc} +_02246EF8: + mov r0, #1 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_02246EFC: .word 0x0224BE98 +_02246F00: .word 0x0224BE8C +_02246F04: .word 0x0224BE90 +_02246F08: .word 0x0224BE94 + thumb_func_end ov95_02246E7C + + thumb_func_start ov95_02246F0C +ov95_02246F0C: ; 0x02246F0C + push {r3, lr} + ldr r0, [r1, #0x18] + bl sub_020219F8 + bl sub_0200A858 + ldr r3, _02246F28 ; =0x027E0000 + ldr r1, _02246F2C ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r3, pc} + nop +_02246F28: .word 0x027E0000 +_02246F2C: .word 0x00003FF8 + thumb_func_end ov95_02246F0C + + thumb_func_start ov95_02246F30 +ov95_02246F30: ; 0x02246F30 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + add r5, r0, #0 + mov r0, #0x39 + add r6, r1, #0 + add r1, r0, #0 + add r1, #0xc7 + bl sub_02018144 + add r4, r0, #0 + ldr r0, _02246FF4 ; =0x00000000 + str r0, [r5, #0] + beq _02246FEC + mov r0, #0x5d + mov r1, #6 + add r2, sp, #4 + mov r3, #0x39 + bl sub_02006F88 + add r7, r0, #0 + beq _02246F6A + mov r0, #0 + add r1, r4, #0 + mov r2, #0x60 + bl sub_020C4AF0 + add r0, r7, #0 + bl sub_020181C4 +_02246F6A: + add r1, r4, #0 + mov r0, #0 + add r1, #0xec + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xe8 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xf0 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xf4 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xe4 + str r5, [r1, #0] + add r1, r4, #0 + add r1, #0xf8 + str r0, [r1, #0] + add r1, r4, #0 + add r1, #0xfc + str r6, [r1, #0] + add r3, r4, #0 + add r2, r0, #0 +_02246F9A: + add r1, r3, #0 + add r1, #0xc4 + add r0, r0, #1 + add r3, r3, #4 + str r2, [r1, #0] + cmp r0, #8 + blt _02246F9A + mov r0, #8 + str r0, [sp] + ldr r0, _02246FF8 ; =0x04000050 + mov r1, #4 + mov r2, #0xc + mov r3, #0x10 + bl sub_020BF55C + mov r0, #8 + str r0, [sp] + ldr r0, _02246FFC ; =0x04001050 + mov r1, #4 + mov r2, #0xc + mov r3, #0x10 + bl sub_020BF55C + ldr r0, _02247000 ; =ov95_02247060 + add r1, r4, #0 + mov r2, #0x14 + bl sub_0200DA3C + add r1, r4, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02246FEC + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r1, #1 + str r1, [r0, #0] +_02246FEC: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02246FF4: .word 0x00000000 +_02246FF8: .word 0x04000050 +_02246FFC: .word 0x04001050 +_02247000: .word ov95_02247060 + thumb_func_end ov95_02246F30 + + thumb_func_start ov95_02247004 +ov95_02247004: ; 0x02247004 + add r1, r0, #0 + add r1, #0xe4 + ldr r1, [r1, #0] + ldr r1, [r1, #0] + cmp r1, #1 + bne _02247016 + mov r1, #1 + add r0, #0xe8 + str r1, [r0, #0] +_02247016: + bx lr + thumb_func_end ov95_02247004 + + thumb_func_start ov95_02247018 +ov95_02247018: ; 0x02247018 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + cmp r0, #1 + bne _0224705E + mov r4, #0 + add r5, r6, #0 +_0224702A: + add r0, r5, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224703C + add r0, r6, #0 + add r1, r4, #0 + bl ov95_02247224 +_0224703C: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #8 + blt _0224702A + add r0, r6, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r1, #0 + str r1, [r0, #0] + add r0, r6, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + bl sub_0200DA58 + add r0, r6, #0 + bl sub_020181C4 +_0224705E: + pop {r4, r5, r6, pc} + thumb_func_end ov95_02247018 + + thumb_func_start ov95_02247060 +ov95_02247060: ; 0x02247060 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xe8 + ldr r0, [r0, #0] + cmp r0, #0 + bne _022470DE + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0xf0 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xf0 + ldr r0, [r0, #0] + cmp r0, #0 + bgt _0224709C + ldr r0, _02247144 ; =0x000006AE + bl sub_02005748 + add r0, r4, #0 + mov r1, #0x1e + add r0, #0xf0 + str r1, [r0, #0] + add r0, r4, #0 + bl ov95_02247170 +_0224709C: + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #0 + beq _02247140 + bl sub_020C096C + bl sub_020C0BBC + add r0, r4, #0 + mov r1, #0x60 + bl sub_020C2C54 + mov r1, #6 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0A0C + mov r1, #6 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0BD4 + bl sub_020C0A7C + bl sub_020C0C38 + mov r0, #0 + add r4, #0xec + str r0, [r4, #0] + pop {r3, r4, r5, pc} +_022470DE: + add r0, r4, #0 + add r0, #0xec + ldr r0, [r0, #0] + cmp r0, #0 + beq _02247120 + bl sub_020C096C + bl sub_020C0BBC + add r0, r4, #0 + mov r1, #0x60 + bl sub_020C2C54 + mov r1, #6 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0A0C + mov r1, #6 + add r0, r4, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0BD4 + bl sub_020C0A7C + bl sub_020C0C38 + add r0, r4, #0 + mov r1, #0 + add r0, #0xec + str r1, [r0, #0] +_02247120: + add r0, r4, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02247140 + add r0, r4, #0 + add r0, #0xe4 + ldr r0, [r0, #0] + mov r1, #0 + str r1, [r0, #0] + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_02247140: + pop {r3, r4, r5, pc} + nop +_02247144: .word 0x000006AE + thumb_func_end ov95_02247060 + + thumb_func_start ov95_02247148 +ov95_02247148: ; 0x02247148 + push {r3, r4} + cmp r1, #0 + blt _02247158 + cmp r1, #0x60 + bge _02247158 + mov r4, #0 + lsl r1, r1, #1 + strh r4, [r0, r1] +_02247158: + cmp r2, #0 + blt _02247164 + cmp r2, #0x60 + bge _02247164 + lsl r1, r2, #1 + strh r3, [r0, r1] +_02247164: + mov r1, #1 + add r0, #0xec + str r1, [r0, #0] + pop {r3, r4} + bx lr + ; .align 2, 0 + thumb_func_end ov95_02247148 + + thumb_func_start ov95_02247170 +ov95_02247170: ; 0x02247170 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r5, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0224721C + mov r0, #0x39 + mov r1, #0x18 + bl sub_02018144 + add r4, r0, #0 + beq _0224721C + add r0, r5, #0 + str r5, [r4, #0] + add r0, #0xfc + ldr r0, [r0, #0] + cmp r0, #1 + bne _022471A2 + mov r0, #0 + mvn r0, r0 + b _022471A4 +_022471A2: + mov r0, #0xf +_022471A4: + str r0, [r4, #4] + mov r0, #0 + str r0, [r4, #0xc] + mov r0, #2 + str r0, [r4, #8] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r1, r4, #0 + str r0, [r4, #0x10] + add r0, r5, #0 + add r0, #0xfc + ldr r0, [r0, #0] + mov r2, #0xa + str r0, [r4, #0x14] + ldr r0, _02247220 ; =ov95_02247254 + bl sub_0200D9E8 + add r1, r5, #0 + add r1, #0xf8 + ldr r1, [r1, #0] + lsl r1, r1, #2 + add r1, r5, r1 + add r1, #0xc4 + str r0, [r1, #0] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + lsl r0, r0, #2 + add r0, r5, r0 + add r0, #0xc4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02247216 + add r0, r5, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xf4 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r5, #0 + add r0, #0xf8 + str r1, [r0, #0] + add r0, r5, #0 + add r0, #0xf8 + ldr r0, [r0, #0] + cmp r0, #8 + blt _0224721C + mov r0, #0 + add r5, #0xf8 + str r0, [r5, #0] + pop {r3, r4, r5, pc} +_02247216: + add r0, r4, #0 + bl sub_020181C4 +_0224721C: + pop {r3, r4, r5, pc} + nop +_02247220: .word ov95_02247254 + thumb_func_end ov95_02247170 + + thumb_func_start ov95_02247224 +ov95_02247224: ; 0x02247224 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r5, #0 + lsl r4, r1, #2 + add r6, #0xc4 + ldr r0, [r6, r4] + cmp r0, #0 + beq _02247252 + bl sub_0201CED0 + bl sub_020181C4 + ldr r0, [r6, r4] + bl sub_0200DA58 + mov r0, #0 + str r0, [r6, r4] + add r0, r5, #0 + add r0, #0xf4 + ldr r0, [r0, #0] + add r5, #0xf4 + sub r0, r0, #1 + str r0, [r5, #0] +_02247252: + pop {r4, r5, r6, pc} + thumb_func_end ov95_02247224 + + thumb_func_start ov95_02247254 +ov95_02247254: ; 0x02247254 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0xc] + add r1, r0, #1 + str r1, [r4, #0xc] + ldr r0, [r4, #8] + cmp r1, r0 + blt _022472BC + mov r3, #0 + str r3, [r4, #0xc] + ldr r0, [r4, #0x14] + cmp r0, #1 + bne _02247294 + ldr r1, [r4, #4] + ldr r0, [r4, #0] + add r2, r1, #1 + cmp r2, #0xf + blt _02247286 + bl ov95_02247148 + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + bl ov95_02247224 + pop {r4, pc} +_02247286: + ldr r3, _022472C0 ; =0x00007FFF + bl ov95_02247148 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r4, pc} +_02247294: + ldr r2, [r4, #4] + ldr r0, [r4, #0] + cmp r2, #0 + bge _022472AE + add r1, r2, #0 + add r2, r2, #1 + bl ov95_02247148 + ldr r0, [r4, #0] + ldr r1, [r4, #0x10] + bl ov95_02247224 + pop {r4, pc} +_022472AE: + ldr r3, _022472C0 ; =0x00007FFF + add r1, r2, #1 + bl ov95_02247148 + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] +_022472BC: + pop {r4, pc} + nop +_022472C0: .word 0x00007FFF + thumb_func_end ov95_02247254 + + thumb_func_start ov95_022472C4 +ov95_022472C4: ; 0x022472C4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + add r6, r1, #0 + mov r0, #0x39 + mov r1, #0x24 + add r7, r2, #0 + str r3, [sp, #4] + ldr r5, [sp, #0x28] + bl sub_02018144 + add r4, r0, #0 + ldr r0, _02247324 ; =0x00000001 + str r0, [r5, #0] + beq _0224731C + ldr r1, [sp] + str r1, [r4, #0] + str r6, [r4, #8] + ldr r1, [sp, #4] + str r7, [r4, #0xc] + str r1, [r4, #0x10] + ldr r1, [sp, #0x20] + str r1, [r4, #0x14] + cmp r6, r7 + bge _022472F8 + mov r0, #0 +_022472F8: + str r0, [r4, #0x18] + ldr r0, [sp, #0x24] + mov r2, #0 + str r0, [r4, #0x1c] + str r5, [r4, #4] + ldr r0, _02247328 ; =ov95_0224732C + add r1, r4, #0 + str r2, [r5, #0] + bl sub_0200DA04 + str r0, [r4, #0x20] + cmp r0, #0 + bne _0224731C + mov r0, #1 + str r0, [r5, #0] + add r0, r4, #0 + bl sub_020181C4 +_0224731C: + add r0, r4, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247324: .word 0x00000001 +_02247328: .word ov95_0224732C + thumb_func_end ov95_022472C4 + + thumb_func_start ov95_0224732C +ov95_0224732C: ; 0x0224732C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + ldr r1, [r4, #0x10] + mul r1, r0 + asr r2, r1, #0xc + asr r1, r2, #4 + lsr r1, r1, #0x1b + add r1, r2, r1 + asr r2, r1, #5 + ldr r1, [r4, #0x18] + cmp r1, #0 + beq _0224734E + cmp r1, #1 + beq _02247364 + b _02247378 +_0224734E: + ldr r1, [r4, #0xc] + add r0, r0, r2 + cmp r0, r1 + bge _0224735A + str r0, [r4, #8] + b _02247378 +_0224735A: + str r1, [r4, #8] + ldr r0, [r4, #4] + mov r1, #1 + str r1, [r0, #0] + b _02247378 +_02247364: + ldr r1, [r4, #0xc] + sub r0, r0, r2 + cmp r0, r1 + ble _02247370 + str r0, [r4, #8] + b _02247378 +_02247370: + str r1, [r4, #8] + ldr r0, [r4, #4] + mov r1, #1 + str r1, [r0, #0] +_02247378: + add r0, r4, #0 + bl ov95_022473A0 + ldr r0, [r4, #4] + ldr r0, [r0, #0] + cmp r0, #0 + beq _02247394 + add r0, r4, #0 + bl ov95_022476C8 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} +_02247394: + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0x10] + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224732C + + thumb_func_start ov95_022473A0 +ov95_022473A0: ; 0x022473A0 + push {r3, r4, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, [r4, #8] + add r2, sp, #4 + str r0, [sp, #4] + mov r0, #0 + str r0, [sp, #8] + str r0, [sp, #0xc] + ldr r0, [r4, #8] + mov r3, #0x80 + str r0, [sp, #0x10] + ldr r0, [r4, #0x1c] + lsl r1, r0, #2 + ldr r0, _022473E4 ; =0x0224BE74 + ldr r0, [r0, r1] + mov r1, #2 + str r0, [sp] + ldr r0, [r4, #0] + bl sub_02019348 + ldr r0, [r4, #0x1c] + add r2, sp, #4 + lsl r1, r0, #2 + ldr r0, _022473E4 ; =0x0224BE74 + mov r3, #0x80 + ldr r0, [r0, r1] + mov r1, #6 + str r0, [sp] + ldr r0, [r4, #0] + bl sub_02019348 + add sp, #0x14 + pop {r3, r4, pc} + ; .align 2, 0 +_022473E4: .word 0x0224BE74 + thumb_func_end ov95_022473A0 + + thumb_func_start ov95_022473E8 +ov95_022473E8: ; 0x022473E8 + push {r4, r5, r6, r7, lr} + sub sp, #0x44 + add r5, r0, #0 + ldr r0, [sp, #0x58] + add r4, r1, #0 + str r2, [sp, #0x14] + str r3, [sp, #0x18] + cmp r0, #0 + beq _02247400 + mov r6, #0x19 + lsl r6, r6, #8 + b _02247404 +_02247400: + mov r6, #0x32 + lsl r6, r6, #6 +_02247404: + mov r0, #0x39 + add r1, r6, #0 + bl sub_02018184 + add r7, r0, #0 + beq _022474AA + ldr r3, _022474D0 ; =0x0224BE7C + add r2, sp, #0x24 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + cmp r4, #0 + ldr r0, [r5, #0] + bne _02247426 + ldr r4, [r0, #0] + b _02247428 +_02247426: + ldr r4, [r0, #4] +_02247428: + add r0, r4, #0 + bl sub_02073D20 + str r0, [sp, #0x20] + add r0, sp, #0x34 + add r1, r4, #0 + mov r2, #2 + mov r3, #0 + bl sub_02075F0C + mov r1, #0 + add r0, r4, #0 + add r2, r1, #0 + bl sub_02074570 + str r0, [sp, #0x1c] + add r0, r4, #0 + mov r1, #5 + mov r2, #0 + bl sub_02074570 + lsl r0, r0, #0x10 + ldr r1, [sp, #0x58] + lsr r0, r0, #0x10 + cmp r1, #0 + beq _02247462 + ldr r1, [sp, #0x2c] + lsl r1, r1, #1 + str r1, [sp, #0x2c] +_02247462: + ldr r1, [sp, #0x1c] + str r7, [sp] + str r1, [sp, #4] + ldr r1, [sp, #0x58] + mov r2, #0x39 + str r1, [sp, #8] + mov r1, #2 + str r1, [sp, #0xc] + str r0, [sp, #0x10] + add r1, sp, #0x24 + ldrh r0, [r1, #0x10] + ldrh r1, [r1, #0x12] + add r3, sp, #0x24 + bl sub_02013720 + add r0, r7, #0 + add r1, r6, #0 + bl sub_020C2C54 + ldr r1, [sp, #0x14] + mov r0, #0 + str r0, [sp] + lsl r1, r1, #0x18 + ldr r0, [r5, #8] + lsr r1, r1, #0x18 + add r2, r7, #0 + add r3, r6, #0 + bl sub_0201958C + ldr r1, [sp, #0x20] + add r0, r4, #0 + bl sub_02073D48 + add r0, r7, #0 + bl sub_020181C4 +_022474AA: + ldr r0, [sp, #0x14] + cmp r0, #4 + blo _022474B4 + mov r2, #4 + b _022474B6 +_022474B4: + mov r2, #0 +_022474B6: + mov r0, #0x20 + str r0, [sp] + mov r0, #0x39 + ldr r3, [sp, #0x18] + str r0, [sp, #4] + add r1, sp, #0x24 + ldrh r0, [r1, #0x10] + ldrh r1, [r1, #0x14] + lsl r3, r3, #5 + bl sub_02006E84 + add sp, #0x44 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_022474D0: .word 0x0224BE7C + thumb_func_end ov95_022473E8 + + thumb_func_start ov95_022474D4 +ov95_022474D4: ; 0x022474D4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x20 + add r5, r0, #0 + add r4, r2, #0 + add r6, r3, #0 + cmp r1, #0 + bne _022474E6 + ldr r1, _02247564 ; =0x00000106 + b _022474F6 +_022474E6: + mov r1, #0x52 + lsl r1, r1, #2 + ldr r0, [r5, r1] + cmp r0, #0 + beq _022474F4 + sub r1, #0x41 + b _022474F6 +_022474F4: + sub r1, #0x42 +_022474F6: + mov r0, #0x39 + str r0, [sp] + mov r0, #7 + mov r2, #0 + add r3, sp, #0x1c + bl sub_02006F6C + add r7, r0, #0 + beq _0224755E + mov r0, #0xa + str r0, [sp] + str r0, [sp, #4] + ldr r0, [sp, #0x1c] + ldr r2, [sp, #0x38] + add r0, #0xc + str r0, [sp, #8] + mov r0, #0 + str r0, [sp, #0xc] + str r0, [sp, #0x10] + mov r0, #0x20 + ldr r3, [sp, #0x3c] + str r0, [sp, #0x14] + str r0, [sp, #0x18] + lsl r1, r4, #0x18 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r5, #8] + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_020198E8 + mov r0, #0xa + str r0, [sp] + str r0, [sp, #4] + lsl r0, r6, #0x18 + ldr r2, [sp, #0x38] + ldr r3, [sp, #0x3c] + lsr r0, r0, #0x18 + str r0, [sp, #8] + lsl r1, r4, #0x18 + lsl r2, r2, #0x18 + lsl r3, r3, #0x18 + ldr r0, [r5, #8] + lsr r1, r1, #0x18 + lsr r2, r2, #0x18 + lsr r3, r3, #0x18 + bl sub_02019E2C + add r0, r7, #0 + bl sub_020181C4 +_0224755E: + add sp, #0x20 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247564: .word 0x00000106 + thumb_func_end ov95_022474D4 + + thumb_func_start ov95_02247568 +ov95_02247568: ; 0x02247568 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + add r4, r1, #0 + add r6, r3, #0 + mov r0, #0x3a + add r3, r5, #0 + str r0, [sp] + add r1, r2, #0 + add r0, r4, #0 + mov r2, #1 + add r3, #8 + bl sub_02006FA0 + str r0, [r5, #0] + mov r0, #0x3a + add r3, r5, #0 + str r0, [sp] + add r0, r4, #0 + add r1, r6, #0 + mov r2, #1 + add r3, #0xc + bl sub_02006FBC + str r0, [r5, #4] + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov95_02247568 + + thumb_func_start ov95_022475A0 +ov95_022475A0: ; 0x022475A0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _022475B2 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] +_022475B2: + ldr r0, [r4, #4] + cmp r0, #0 + beq _022475C0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #4] +_022475C0: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_022475A0 + + thumb_func_start ov95_022475C4 +ov95_022475C4: ; 0x022475C4 + str r2, [r0, #0] + str r3, [r0, #8] + ldr r2, [r1, #8] + str r2, [r0, #0xc] + ldr r1, [r1, #0xc] + ldr r2, [sp] + str r1, [r0, #0x10] + add r1, r0, #0 + add r1, #0x20 + strb r2, [r1] + mov r1, #0 + str r1, [r0, #4] + str r1, [r0, #0x14] + str r1, [r0, #0x18] + str r1, [r0, #0x1c] + bx lr + thumb_func_end ov95_022475C4 + + thumb_func_start ov95_022475E4 +ov95_022475E4: ; 0x022475E4 + push {r4, lr} + sub sp, #0x20 + ldr r0, [r0, #0x18] + str r0, [sp] + lsl r0, r2, #0xc + str r0, [sp, #8] + lsl r0, r3, #0xc + str r0, [sp, #0xc] + mov r0, #0 + str r0, [sp, #0x10] + ldr r0, [sp, #0x28] + str r1, [sp, #4] + str r0, [sp, #0x14] + ldr r0, [sp, #0x2c] + str r0, [sp, #0x18] + mov r0, #0x39 + str r0, [sp, #0x1c] + add r0, sp, #0 + bl sub_02021B90 + add r4, r0, #0 + beq _02247620 + mov r1, #1 + bl sub_02021CC8 + mov r1, #1 + add r0, r4, #0 + lsl r1, r1, #0xc + bl sub_02021CE4 +_02247620: + add r0, r4, #0 + add sp, #0x20 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_022475E4 + + thumb_func_start ov95_02247628 +ov95_02247628: ; 0x02247628 + ldr r0, [r0, #8] + bx lr + thumb_func_end ov95_02247628 + + thumb_func_start ov95_0224762C +ov95_0224762C: ; 0x0224762C + ldr r0, [r0, #0xc] + bx lr + thumb_func_end ov95_0224762C + + thumb_func_start ov95_02247630 +ov95_02247630: ; 0x02247630 + ldr r0, [r0, #0x10] + bx lr + thumb_func_end ov95_02247630 + + thumb_func_start ov95_02247634 +ov95_02247634: ; 0x02247634 + ldr r0, [r0, #0] + ldr r0, [r0, #0] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02247634 + + thumb_func_start ov95_0224763C +ov95_0224763C: ; 0x0224763C + ldr r0, [r0, #0] + ldr r0, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov95_0224763C + + thumb_func_start ov95_02247644 +ov95_02247644: ; 0x02247644 + ldr r0, [r0, #0] + ldr r0, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02247644 + + thumb_func_start ov95_0224764C +ov95_0224764C: ; 0x0224764C + mov r1, #0x53 + lsl r1, r1, #2 + ldrh r0, [r0, r1] + bx lr + thumb_func_end ov95_0224764C + + thumb_func_start ov95_02247654 +ov95_02247654: ; 0x02247654 + ldr r1, _0224765C ; =0x0000014E + ldrh r0, [r0, r1] + bx lr + nop +_0224765C: .word 0x0000014E + thumb_func_end ov95_02247654 + + thumb_func_start ov95_02247660 +ov95_02247660: ; 0x02247660 + mov r1, #0x15 + lsl r1, r1, #4 + ldrh r0, [r0, r1] + bx lr + thumb_func_end ov95_02247660 + + thumb_func_start ov95_02247668 +ov95_02247668: ; 0x02247668 + ldr r1, _02247670 ; =0x00000152 + ldrh r0, [r0, r1] + bx lr + nop +_02247670: .word 0x00000152 + thumb_func_end ov95_02247668 + + thumb_func_start ov95_02247674 +ov95_02247674: ; 0x02247674 + ldr r0, [r0, #0] + ldr r3, _0224767C ; =sub_02027B50 + ldr r0, [r0, #0x14] + bx r3 + ; .align 2, 0 +_0224767C: .word sub_02027B50 + thumb_func_end ov95_02247674 + + thumb_func_start ov95_02247680 +ov95_02247680: ; 0x02247680 + ldr r0, [r0, #0] + ldr r0, [r0, #0x10] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02247680 + + thumb_func_start ov95_02247688 +ov95_02247688: ; 0x02247688 + ldr r0, _02247690 ; =0x0224C2E0 + mov r1, #0 + str r1, [r0, #0] + bx lr + ; .align 2, 0 +_02247690: .word 0x0224C2E0 + thumb_func_end ov95_02247688 + + thumb_func_start ov95_02247694 +ov95_02247694: ; 0x02247694 + push {r4, r5, r6, lr} + ldr r6, _022476C0 ; =0x0224C2E0 + ldr r0, [r6, #0] + cmp r0, #0 + beq _022476BC + mov r4, #0 + cmp r0, #0 + ble _022476B6 + ldr r5, _022476C4 ; =0x0224C2E4 +_022476A6: + ldr r0, [r5, #0] + bl sub_020181C4 + ldr r0, [r6, #0] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, r0 + blt _022476A6 +_022476B6: + ldr r0, _022476C0 ; =0x0224C2E0 + mov r1, #0 + str r1, [r0, #0] +_022476BC: + pop {r4, r5, r6, pc} + nop +_022476C0: .word 0x0224C2E0 +_022476C4: .word 0x0224C2E4 + thumb_func_end ov95_02247694 + + thumb_func_start ov95_022476C8 +ov95_022476C8: ; 0x022476C8 + push {r4, lr} + add r4, r0, #0 + ldr r0, _022476E8 ; =0x0224C2E0 + ldr r0, [r0, #0] + cmp r0, #0x20 + blt _022476D8 + bl sub_02022974 +_022476D8: + ldr r0, _022476E8 ; =0x0224C2E0 + ldr r2, [r0, #0] + add r1, r2, #1 + str r1, [r0, #0] + ldr r0, _022476EC ; =0x0224C2E4 + lsl r1, r2, #2 + str r4, [r0, r1] + pop {r4, pc} + ; .align 2, 0 +_022476E8: .word 0x0224C2E0 +_022476EC: .word 0x0224C2E4 + thumb_func_end ov95_022476C8 + + .rodata + + + .global Unk_ov95_0224BE74 +Unk_ov95_0224BE74: ; 0x0224BE74 + .incbin "incbin/overlay95_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov95_0224BE7C +Unk_ov95_0224BE7C: ; 0x0224BE7C + .incbin "incbin/overlay95_rodata.bin", 0x8, 0x18 - 0x8 + + .global Unk_ov95_0224BE8C +Unk_ov95_0224BE8C: ; 0x0224BE8C + .incbin "incbin/overlay95_rodata.bin", 0x18, 0x70 + + + .bss + + + .global Unk_ov95_0224C2E0 +Unk_ov95_0224C2E0: ; 0x0224C2E0 + .space 0x4 + + .global Unk_ov95_0224C2E4 +Unk_ov95_0224C2E4: ; 0x0224C2E4 + .space 0x80 + diff --git a/asm/ov95_022476F0.s b/asm/ov95_022476F0.s new file mode 100644 index 000000000..3939ff8e4 --- /dev/null +++ b/asm/ov95_022476F0.s @@ -0,0 +1,628 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_022476F0 +ov95_022476F0: ; 0x022476F0 + push {r3, r4, r5, r6, r7, lr} + add r7, r0, #0 + add r4, r1, #0 + mov r0, #0x3a + mov r1, #0x20 + add r5, r2, #0 + str r3, [sp] + bl sub_02018144 + add r6, r0, #0 + beq _02247736 + ldr r3, [sp] + add r1, r4, #0 + add r2, r5, #0 + bl ov95_02247AF0 + mov r1, #0x8c + mov r0, #0x3a + mul r1, r7 + bl sub_02018144 + str r0, [r6, #0x18] + mov r4, #0 + str r7, [r6, #0x1c] + cmp r7, #0 + bls _02247736 + add r5, r4, #0 +_02247726: + ldr r0, [r6, #0x18] + add r0, r0, r5 + bl ov95_02247868 + add r4, r4, #1 + add r5, #0x8c + cmp r4, r7 + blo _02247726 +_02247736: + add r0, r6, #0 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov95_022476F0 + + thumb_func_start ov95_0224773C +ov95_0224773C: ; 0x0224773C + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, [r5, #0x1c] + mov r6, #0 + cmp r0, #0 + bls _0224775C + add r4, r6, #0 +_0224774A: + ldr r0, [r5, #0x18] + add r0, r0, r4 + bl ov95_0224789C + ldr r0, [r5, #0x1c] + add r6, r6, #1 + add r4, #0x8c + cmp r6, r0 + blo _0224774A +_0224775C: + ldr r0, [r5, #0x18] + bl sub_020181C4 + add r0, r5, #0 + bl ov95_02247B5C + add r0, r5, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} + thumb_func_end ov95_0224773C + + thumb_func_start ov95_02247770 +ov95_02247770: ; 0x02247770 + push {r3, r4, r5, r6, lr} + sub sp, #4 + mov r1, #0 + add r5, r0, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + bl sub_020203EC + ldr r0, [r5, #0x1c] + mov r6, #0 + cmp r0, #0 + bls _022477A6 + add r4, r6, #0 +_0224778E: + ldr r0, [r5, #0x18] + add r0, r0, r4 + ldr r1, [r0, #0x64] + cmp r1, #0 + beq _0224779C + bl ov95_022477B8 +_0224779C: + ldr r0, [r5, #0x1c] + add r6, r6, #1 + add r4, #0x8c + cmp r6, r0 + blo _0224778E +_022477A6: + mov r2, #1 + mov r0, #0x12 + add r1, sp, #0 + str r2, [sp] + bl sub_020B275C + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov95_02247770 + + thumb_func_start ov95_022477B8 +ov95_022477B8: ; 0x022477B8 + push {r4, lr} + sub sp, #0x50 + add r4, r0, #0 + add r0, sp, #0x2c + bl sub_020BB4C8 + add r0, r4, #0 + add r0, #0x80 + ldrh r0, [r0] + ldr r3, _02247864 ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #8 + bl sub_020BB5AC + add r1, sp, #0x2c + add r0, sp, #8 + add r2, r1, #0 + bl sub_020BB8EC + add r0, r4, #0 + add r0, #0x82 + ldrh r0, [r0] + ldr r3, _02247864 ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #8 + bl sub_020BB5C8 + add r1, sp, #0x2c + add r0, sp, #8 + add r2, r1, #0 + bl sub_020BB8EC + add r0, r4, #0 + add r0, #0x84 + ldrh r0, [r0] + ldr r3, _02247864 ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #8 + bl sub_020BB5E4 + add r1, sp, #0x2c + add r0, sp, #8 + add r2, r1, #0 + bl sub_020BB8EC + add r0, r4, #0 + add r0, #0x88 + ldr r0, [r0, #0] + cmp r0, #0x1f + beq _02247850 + str r0, [sp] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + str r0, [sp, #4] + bl sub_020AF5B4 +_02247850: + add r1, r4, #0 + add r0, r4, #4 + add r4, #0x74 + add r1, #0x68 + add r2, sp, #0x2c + add r3, r4, #0 + bl sub_0201CA74 + add sp, #0x50 + pop {r4, pc} + ; .align 2, 0 +_02247864: .word 0x020F983C + thumb_func_end ov95_022477B8 + + thumb_func_start ov95_02247868 +ov95_02247868: ; 0x02247868 + mov r1, #0 + str r1, [r0, #0x64] + add r2, r0, #0 + str r1, [r0, #0] + add r2, #0x84 + strh r1, [r2] + mov r2, #0x84 + ldrsh r3, [r0, r2] + add r2, r0, #0 + add r2, #0x82 + strh r3, [r2] + mov r2, #0x82 + ldrsh r3, [r0, r2] + add r2, r0, #0 + add r2, #0x80 + strh r3, [r2] + mov r2, #1 + lsl r2, r2, #0xc + str r2, [r0, #0x7c] + str r2, [r0, #0x78] + str r2, [r0, #0x74] + str r1, [r0, #0x70] + str r1, [r0, #0x6c] + str r1, [r0, #0x68] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02247868 + + thumb_func_start ov95_0224789C +ov95_0224789C: ; 0x0224789C + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _022478B0 + bl sub_020181C4 + mov r0, #0 + str r0, [r4, #0] + str r0, [r4, #0x64] +_022478B0: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224789C + + thumb_func_start ov95_022478B4 +ov95_022478B4: ; 0x022478B4 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + ldr r4, [r0, #0x18] + add r6, r1, #0 + mov r0, #0x8c + mul r6, r0 + add r7, r2, #0 + mov r0, #1 + str r0, [sp] + str r3, [sp, #4] + add r1, r3, #0 + add r0, r7, #0 + mov r2, #0 + mov r3, #0x3a + add r5, r4, r6 + bl sub_02006FE8 + str r0, [r4, r6] + ldr r1, [sp, #4] + add r0, r7, #0 + bl sub_02006B58 + add r1, r0, #0 + ldr r0, [r4, r6] + bl sub_020C2C54 + ldr r0, [r4, r6] + cmp r0, #0 + beq _02247950 + bl sub_020B3C0C + str r0, [r5, #0x58] + cmp r0, #0 + beq _02247918 + add r2, r0, #0 + add r2, #8 + beq _0224790C + ldrb r1, [r0, #9] + cmp r1, #0 + bls _0224790C + ldrh r1, [r0, #0xe] + add r1, r2, r1 + add r1, r1, #4 + b _0224790E +_0224790C: + mov r1, #0 +_0224790E: + cmp r1, #0 + beq _02247918 + ldr r1, [r1, #0] + add r0, r0, r1 + b _0224791A +_02247918: + mov r0, #0 +_0224791A: + str r0, [r5, #0x5c] + ldr r0, [r5, #0] + bl sub_020B3C1C + str r0, [r5, #0x60] + bl sub_0201CBCC + ldr r0, [r5, #0] + ldr r1, [r5, #0x60] + bl sub_0201CBB0 + ldr r1, [r5, #0x5c] + add r0, r5, #4 + bl sub_020AE608 + ldr r0, [sp, #0x20] + mov r1, #0x1f + str r0, [r5, #0x68] + ldr r0, [sp, #0x24] + str r0, [r5, #0x6c] + ldr r0, [sp, #0x28] + str r0, [r5, #0x70] + add r0, r5, #0 + add r0, #0x88 + str r1, [r0, #0] + ldr r0, [sp, #0x2c] + str r0, [r5, #0x64] +_02247950: + add r0, r5, #0 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov95_022478B4 + + thumb_func_start ov95_02247958 +ov95_02247958: ; 0x02247958 + add r2, r0, #0 + add r2, #0x68 + add r3, r1, #0 + ldmia r2!, {r0, r1} + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + bx lr + thumb_func_end ov95_02247958 + + thumb_func_start ov95_02247968 +ov95_02247968: ; 0x02247968 + add r3, r1, #0 + add r2, r0, #0 + ldmia r3!, {r0, r1} + add r2, #0x68 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + bx lr + thumb_func_end ov95_02247968 + + thumb_func_start ov95_02247978 +ov95_02247978: ; 0x02247978 + add r2, r0, #0 + add r2, #0x80 + ldrh r2, [r2] + strh r2, [r1] + add r2, r0, #0 + add r2, #0x82 + ldrh r2, [r2] + add r0, #0x84 + strh r2, [r1, #2] + ldrh r0, [r0] + strh r0, [r1, #4] + bx lr + thumb_func_end ov95_02247978 + + thumb_func_start ov95_02247990 +ov95_02247990: ; 0x02247990 + ldrh r3, [r1] + add r2, r0, #0 + add r2, #0x80 + strh r3, [r2] + add r2, r0, #0 + ldrh r3, [r1, #2] + add r2, #0x82 + add r0, #0x84 + strh r3, [r2] + ldrh r1, [r1, #4] + strh r1, [r0] + bx lr + thumb_func_end ov95_02247990 + + thumb_func_start ov95_022479A8 +ov95_022479A8: ; 0x022479A8 + str r1, [r0, #0x64] + bx lr + thumb_func_end ov95_022479A8 + + thumb_func_start ov95_022479AC +ov95_022479AC: ; 0x022479AC + push {r3, lr} + add r2, r0, #0 + add r2, #0x88 + str r1, [r2, #0] + cmp r1, #0x1f + ldr r0, [r0, #0x5c] + beq _022479C6 + mov r2, #0x1f + mov r1, #0 + lsl r2, r2, #0x10 + bl sub_020B2D8C + pop {r3, pc} +_022479C6: + mov r2, #0x1f + mov r1, #1 + lsl r2, r2, #0x10 + bl sub_020B2D8C + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov95_022479AC + + thumb_func_start ov95_022479D4 +ov95_022479D4: ; 0x022479D4 + str r1, [r0, #0x74] + str r1, [r0, #0x78] + str r1, [r0, #0x7c] + bx lr + thumb_func_end ov95_022479D4 + + thumb_func_start ov95_022479DC +ov95_022479DC: ; 0x022479DC + push {r3, r4, lr} + sub sp, #0x4c + add r4, r0, #0 + add r0, sp, #0x28 + bl sub_020BB4C8 + add r0, r4, #0 + add r0, #0x80 + ldrh r0, [r0] + ldr r3, _02247A8C ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #4 + bl sub_020BB5AC + add r1, sp, #0x28 + add r0, sp, #4 + add r2, r1, #0 + bl sub_020BB8EC + add r0, r4, #0 + add r0, #0x82 + ldrh r0, [r0] + ldr r3, _02247A8C ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #4 + bl sub_020BB5C8 + add r1, sp, #0x28 + add r0, sp, #4 + add r2, r1, #0 + bl sub_020BB8EC + add r0, r4, #0 + add r0, #0x84 + ldrh r0, [r0] + ldr r3, _02247A8C ; =0x020F983C + asr r0, r0, #4 + lsl r2, r0, #1 + lsl r1, r2, #1 + add r2, r2, #1 + lsl r2, r2, #1 + ldrsh r1, [r3, r1] + ldrsh r2, [r3, r2] + add r0, sp, #4 + bl sub_020BB5E4 + add r1, sp, #0x28 + add r0, sp, #4 + add r2, r1, #0 + bl sub_020BB8EC + mov r1, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + bl sub_020203EC + add r1, r4, #0 + ldr r0, [r4, #0x5c] + add r4, #0x74 + add r1, #0x68 + add r2, sp, #0x28 + add r3, r4, #0 + bl sub_0201CED8 + add r4, r0, #0 + mov r2, #1 + mov r0, #0x12 + add r1, sp, #0 + str r2, [sp] + bl sub_020B275C + add r0, r4, #0 + add sp, #0x4c + pop {r3, r4, pc} + ; .align 2, 0 +_02247A8C: .word 0x020F983C + thumb_func_end ov95_022479DC + + thumb_func_start ov95_02247A90 +ov95_02247A90: ; 0x02247A90 + push {r3, r4, lr} + sub sp, #0xc + add r2, r0, #0 + add r4, r1, #0 + ldr r1, [r2, #0] + add r0, sp, #0 + bl sub_02020ABC + add r2, sp, #0 + ldmia r2!, {r0, r1} + stmia r4!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r4, #0] + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02247A90 + + thumb_func_start ov95_02247AB0 +ov95_02247AB0: ; 0x02247AB0 + ldr r3, _02247ABC ; =sub_020209D4 + add r2, r0, #0 + add r0, r1, #0 + ldr r1, [r2, #0] + bx r3 + nop +_02247ABC: .word sub_020209D4 + thumb_func_end ov95_02247AB0 + + thumb_func_start ov95_02247AC0 +ov95_02247AC0: ; 0x02247AC0 + ldr r3, _02247ACC ; =sub_020209F8 + add r2, r0, #0 + add r0, r1, #0 + ldr r1, [r2, #0] + bx r3 + nop +_02247ACC: .word sub_020209F8 + thumb_func_end ov95_02247AC0 + + thumb_func_start ov95_02247AD0 +ov95_02247AD0: ; 0x02247AD0 + ldr r3, _02247ADC ; =sub_02020854 + add r2, r0, #0 + add r0, r1, #0 + ldr r1, [r2, #0] + bx r3 + nop +_02247ADC: .word sub_02020854 + thumb_func_end ov95_02247AD0 + + thumb_func_start ov95_02247AE0 +ov95_02247AE0: ; 0x02247AE0 + ldr r3, _02247AEC ; =sub_02020910 + add r2, r0, #0 + add r0, r1, #0 + ldr r1, [r2, #0] + bx r3 + nop +_02247AEC: .word sub_02020910 + thumb_func_end ov95_02247AE0 + + thumb_func_start ov95_02247AF0 +ov95_02247AF0: ; 0x02247AF0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r5, r0, #0 + mov r0, #0x3a + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + bl sub_020203AC + str r0, [r5, #0] + str r4, [r5, #4] + str r6, [r5, #8] + mov r1, #0x4b + add r2, r5, #0 + str r7, [r5, #0xc] + mov r0, #0 + strh r0, [r5, #0x10] + strh r0, [r5, #0x12] + strh r0, [r5, #0x14] + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r5, #0] + ldr r3, _02247B58 ; =0x00000FA4 + str r0, [sp, #8] + add r0, r5, #4 + lsl r1, r1, #0xe + add r2, #0x10 + bl sub_020206D0 + mov r1, #0 + mov r0, #1 + lsl r0, r0, #0xc + str r0, [sp, #0x10] + str r1, [sp, #0xc] + str r1, [sp, #0x14] + ldr r1, [r5, #0] + add r0, sp, #0xc + bl sub_02020680 + ldr r0, [r5, #0] + bl sub_020203D4 + mov r1, #0xfa + ldr r2, [r5, #0] + mov r0, #0 + lsl r1, r1, #0xe + bl sub_020206BC + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + nop +_02247B58: .word 0x00000FA4 + thumb_func_end ov95_02247AF0 + + thumb_func_start ov95_02247B5C +ov95_02247B5C: ; 0x02247B5C + push {r4, lr} + add r4, r0, #0 + bl sub_020203E0 + ldr r0, [r4, #0] + bl sub_020203B8 + pop {r4, pc} + thumb_func_end ov95_02247B5C \ No newline at end of file diff --git a/asm/ov95_02247B6C.s b/asm/ov95_02247B6C.s new file mode 100644 index 000000000..55fe3feb8 --- /dev/null +++ b/asm/ov95_02247B6C.s @@ -0,0 +1,1284 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_02247B6C +ov95_02247B6C: ; 0x02247B6C + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0x84 + bl sub_02018144 + add r4, r0, #0 + beq _02247BC2 + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + str r0, [r4, #0x54] + mov r0, #0x3a + bl sub_0200762C + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x10] + mov r0, #0x4b + lsl r0, r0, #2 + mov r1, #0x3a + bl sub_02023790 + str r0, [r4, #0x68] + mov r0, #0x4b + lsl r0, r0, #2 + mov r1, #0x3a + bl sub_02023790 + str r0, [r4, #0x6c] + mov r0, #0 + str r0, [r4, #0x78] + str r0, [r4, #0x7c] + mov r0, #0x93 + mov r1, #0x3a + bl sub_02006C24 + add r1, r4, #0 + add r1, #0x80 + str r0, [r1, #0] +_02247BC2: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_02247B6C + + thumb_func_start ov95_02247BC8 +ov95_02247BC8: ; 0x02247BC8 + push {r4, lr} + add r4, r0, #0 + beq _02247C30 + bl ov95_022483C4 + add r0, r4, #0 + bl ov95_02248490 + add r0, r4, #0 + bl ov95_02248340 + ldr r0, [r4, #0x68] + bl sub_020237BC + ldr r0, [r4, #0x6c] + bl sub_020237BC + ldr r0, [r4, #0x70] + bl ov95_0224773C + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0x54] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0x54] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + add r0, #0x58 + bl sub_0201A8FC + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl sub_02006CA8 + ldr r0, [r4, #0x10] + cmp r0, #0 + beq _02247C24 + bl sub_02007DC8 +_02247C24: + ldr r0, [r4, #0xc] + bl sub_02007B6C + add r0, r4, #0 + bl sub_020181C4 +_02247C30: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02247BC8 + + thumb_func_start ov95_02247C34 +ov95_02247C34: ; 0x02247C34 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #4 + bhs _02247C62 + lsl r3, r2, #2 + ldr r2, _02247C68 ; =0x0224BF04 + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _02247C58 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_02247C58: + add r0, r5, #0 + bl ov95_02247C6C + mov r0, #0 + pop {r3, r4, r5, pc} +_02247C62: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_02247C68: .word 0x0224BF04 + thumb_func_end ov95_02247C34 + + thumb_func_start ov95_02247C6C +ov95_02247C6C: ; 0x02247C6C + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_020BFAB8 + mov r1, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + bl sub_020B2628 + bl sub_020A73C0 + ldr r0, [r4, #0xc] + bl sub_02008A94 + ldr r0, [r4, #0xc] + bl sub_02007768 + mov r2, #1 + str r2, [sp] + mov r0, #0x12 + add r1, sp, #0 + bl sub_020B275C + ldr r0, [r4, #0x70] + bl ov95_02247770 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02247C6C + + thumb_func_start ov95_02247CB4 +ov95_02247CB4: ; 0x02247CB4 + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, _02247EB0 ; =0x0224BF5C + bl sub_0201FE94 + ldr r2, _02247EB4 ; =0x04000304 + ldr r0, _02247EB8 ; =0xFFFF7FFF + ldrh r1, [r2] + and r0, r1 + strh r0, [r2] + ldr r0, _02247EBC ; =0x0224BF14 + bl sub_02018368 + ldr r0, [r4, #0x54] + ldr r2, _02247EC0 ; =0x0224BF24 + mov r1, #1 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x54] + ldr r2, _02247EC4 ; =0x0224BF40 + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x54] + ldr r2, _02247EC4 ; =0x0224BF40 + mov r1, #6 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r2, _02247EC8 ; =0x04000008 + mov r0, #3 + ldrh r3, [r2] + mov r1, #1 + bic r3, r0 + add r0, r3, #0 + orr r0, r1 + strh r0, [r2] + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0x54] + add r3, r1, #0 + bl sub_020196C0 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r4, #0x54] + mov r1, #1 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r4, #0] + bl ov95_02247674 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3a + str r0, [sp, #4] + ldr r0, [r4, #0x54] + mov r1, #1 + mov r2, #0x6d + mov r3, #2 + bl sub_0200DD0C + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + add r1, r4, #0 + str r0, [sp, #8] + mov r2, #1 + str r2, [sp, #0xc] + str r2, [sp, #0x10] + ldr r0, [r4, #0x54] + add r1, #0x58 + mov r3, #2 + bl sub_0201A7E8 + add r0, r4, #0 + add r0, #0x58 + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0x20 + str r3, [sp] + mov r0, #0x3a + str r0, [sp, #4] + mov r0, #0xe + mov r1, #7 + mov r2, #0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x54] + mov r0, #0x5d + mov r1, #0x16 + mov r3, #2 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x54] + mov r0, #0x5d + mov r1, #0x15 + mov r3, #2 + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0x17 + add r3, r2, #0 + bl sub_02006E84 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x54] + mov r0, #0x5d + mov r1, #0x16 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x54] + mov r0, #0x5d + mov r1, #0x15 + mov r3, #6 + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0x17 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + ldr r0, [r4, #0x54] + mov r1, #1 + bl sub_02019448 + add r0, r4, #0 + bl ov95_02248174 + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + add r3, r1, #0 + bl ov95_022476F0 + str r0, [r4, #0x70] + add r0, r4, #0 + bl ov95_02248240 + str r0, [r4, #0x10] + mov r1, #0 + mov r0, #0x6a + str r1, [sp] + lsl r0, r0, #0xa + str r0, [sp, #4] + ldr r0, _02247ECC ; =0x00073800 + mov r2, #0x5d + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r4, #0x70] + mov r3, #0x1b + bl ov95_022478B4 + ldr r2, _02247ED0 ; =0x0224BEFC + str r0, [r4, #0x74] + ldrh r3, [r2] + add r0, sp, #0x14 + add r1, sp, #0x14 + strh r3, [r0] + ldrh r3, [r2, #2] + ldrh r2, [r2, #4] + strh r3, [r0, #2] + strh r2, [r0, #4] + ldr r0, [r4, #0x74] + bl ov95_02247990 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add r0, r4, #0 + bl ov95_0224829C + ldr r0, _02247ED4 ; =0x04000050 + mov r1, #0 + strh r1, [r0] + bl sub_02039734 + mov r0, #1 + mov r1, #0x39 + bl sub_020397C8 + mov r0, #0x10 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_02247EB0: .word 0x0224BF5C +_02247EB4: .word 0x04000304 +_02247EB8: .word 0xFFFF7FFF +_02247EBC: .word 0x0224BF14 +_02247EC0: .word 0x0224BF24 +_02247EC4: .word 0x0224BF40 +_02247EC8: .word 0x04000008 +_02247ECC: .word 0x00073800 +_02247ED0: .word 0x0224BEFC +_02247ED4: .word 0x04000050 + thumb_func_end ov95_02247CB4 + + thumb_func_start ov95_02247ED8 +ov95_02247ED8: ; 0x02247ED8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0] + cmp r0, #0 + bne _02247EFE + bl sub_0200F2AC + cmp r0, #0 + beq _02247EFE + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r4, #0x3c] + mov r1, #1 + bl sub_02021CAC + mov r0, #1 + pop {r4, pc} +_02247EFE: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02247ED8 + + thumb_func_start ov95_02247F04 +ov95_02247F04: ; 0x02247F04 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + add r4, r0, #0 + ldr r0, [r5, #0] + cmp r0, #4 + bhi _02247F3E + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_02247F1E: ; jump table + .short _02247F28 - _02247F1E - 2 ; case 0 + .short _02247F34 - _02247F1E - 2 ; case 1 + .short _02247FA8 - _02247F1E - 2 ; case 2 + .short _02248058 - _02247F1E - 2 ; case 3 + .short _02248078 - _02247F1E - 2 ; case 4 +_02247F28: + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _02248088 +_02247F34: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0xa + bgt _02247F40 +_02247F3E: + b _02248088 +_02247F40: + ldr r0, [r4, #0] + bl ov95_02247630 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + bl ov95_0224762C + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov95_02247680 + cmp r0, #1 + bne _02247F60 + mov r1, #0 + mov r6, #2 + b _02247F64 +_02247F60: + mov r1, #4 + mov r6, #3 +_02247F64: + ldr r0, [sp, #0xc] + ldr r2, [r4, #0x68] + bl sub_0200B1B8 + ldr r1, [r4, #0x6c] + ldr r2, [r4, #0x68] + add r0, r7, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x6c] + add r0, #0x58 + mov r1, #1 + bl sub_0201D738 + add r0, r4, #0 + add r0, #0x58 + mov r1, #0x6d + mov r2, #2 + bl sub_0200E010 + add r0, r4, #0 + add r0, #0x58 + bl sub_0201A954 + mov r0, #0 + str r0, [r4, #8] + str r6, [r5, #0] + b _02248088 +_02247FA8: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x3c + ble _02248088 + ldr r0, [r4, #0] + bl ov95_02247630 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov95_0224762C + add r7, r0, #0 + ldr r2, [r4, #0x68] + add r0, r6, #0 + mov r1, #1 + bl sub_0200B1B8 + ldr r1, [r4, #0x6c] + ldr r2, [r4, #0x68] + add r0, r7, #0 + bl sub_0200C388 + ldr r0, [r4, #0] + bl ov95_02247634 + mov r1, #0x4c + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _02248024 + ldr r0, [r4, #0x10] + mov r1, #1 + bl sub_02007B98 + ldr r0, [r4, #0] + bl ov95_0224764C + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r1, sp, #0x10 + mov r3, #1 + bl sub_02078A4C + ldr r0, [r4, #0] + bl ov95_0224764C + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov95_02247654 + add r2, r0, #0 + add r1, sp, #0x10 + lsl r2, r2, #0x18 + ldrb r1, [r1] + add r0, r6, #0 + lsr r2, r2, #0x18 + bl sub_0200590C +_02248024: + add r0, r4, #0 + add r0, #0x58 + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x6c] + add r0, #0x58 + mov r1, #1 + bl sub_0201D738 + add r0, r4, #0 + add r0, #0x58 + bl sub_0201ACCC + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _02248088 +_02248058: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x3c + ble _02248088 + add r0, r4, #0 + add r0, #0x58 + mov r1, #0 + bl sub_0200E084 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _02248088 +_02248078: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x14 + ble _02248088 + add sp, #0x14 + mov r0, #1 + pop {r4, r5, r6, r7, pc} +_02248088: + mov r0, #0 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov95_02247F04 + + thumb_func_start ov95_02248090 +ov95_02248090: ; 0x02248090 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + ldr r1, [r4, #0] + add r5, r0, #0 + cmp r1, #4 + bhi _0224816A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022480AA: ; jump table + .short _022480B4 - _022480AA - 2 ; case 0 + .short _022480CE - _022480AA - 2 ; case 1 + .short _022480F4 - _022480AA - 2 ; case 2 + .short _02248120 - _022480AA - 2 ; case 3 + .short _02248152 - _022480AA - 2 ; case 4 +_022480B4: + ldr r0, _02248170 ; =0x000006A8 + bl sub_02005748 + add r0, r5, #0 + mov r1, #0 + mov r2, #0x10 + mov r3, #0xc + bl ov95_02248364 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224816A +_022480CE: + bl ov95_022483B4 + cmp r0, #0 + beq _0224816A + ldr r0, [r5, #0x10] + bl sub_02007DC8 + ldr r0, [r5, #0x40] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r5, #0x40] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224816A +_022480F4: + ldr r0, [r5, #0x40] + bl sub_02021FD0 + cmp r0, #0 + bne _0224816A + ldr r0, [r5, #0x74] + mov r1, #1 + bl ov95_022479A8 + mov r1, #0x10 + add r0, r5, #0 + mov r2, #0 + add r3, r1, #0 + bl ov95_02248364 + add r0, r5, #0 + bl ov95_02248420 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224816A +_02248120: + bl ov95_0224847C + cmp r0, #2 + bge _02248132 + add r0, r5, #0 + bl ov95_0224846C + cmp r0, #1 + bne _0224816A +_02248132: + mov r0, #0x18 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224816A +_02248152: + bl sub_0200F2AC + cmp r0, #0 + beq _0224816A + add r0, r5, #0 + bl ov95_0224846C + cmp r0, #0 + beq _0224816A + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0224816A: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_02248170: .word 0x000006A8 + thumb_func_end ov95_02248090 + + thumb_func_start ov95_02248174 +ov95_02248174: ; 0x02248174 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _0224821C ; =0x04000060 + ldr r2, _02248220 ; =0xFFFFCFFD + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + ldrh r3, [r0] + add r1, r2, #2 + and r3, r1 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0] + ldr r1, _02248224 ; =0x0000CFFB + and r1, r3 + strh r1, [r0] + add r1, r2, #2 + ldrh r3, [r0] + lsr r2, r2, #0x11 + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _02248228 ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _0224822C ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + ldr r3, _02248230 ; =0x02100DEC + mov r0, #1 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _02248234 ; =0x02100DF4 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + mov r1, #0 + mov r2, #1 + blx r3 + ldr r2, _02248238 ; =0x7FFF0000 + add r6, r0, #0 + and r2, r4 + lsl r1, r4, #0x10 + lsr r2, r2, #0x10 + ldr r0, [r5, #0xc] + lsr r1, r1, #0xd + lsl r2, r2, #4 + bl sub_02008A78 + ldr r2, _0224823C ; =0xFFFF0000 + lsl r1, r6, #0x10 + and r2, r6 + lsr r2, r2, #0x10 + ldr r0, [r5, #0xc] + lsr r1, r1, #0xd + lsl r2, r2, #3 + bl sub_02008A84 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224821C: .word 0x04000060 +_02248220: .word 0xFFFFCFFD +_02248224: .word 0x0000CFFB +_02248228: .word 0x04000540 +_0224822C: .word 0xBFFF0000 +_02248230: .word 0x02100DEC +_02248234: .word 0x02100DF4 +_02248238: .word 0x7FFF0000 +_0224823C: .word 0xFFFF0000 + thumb_func_end ov95_02248174 + + thumb_func_start ov95_02248240 +ov95_02248240: ; 0x02248240 + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov95_02247634 + add r4, r0, #0 + add r0, sp, #0x10 + add r1, r4, #0 + mov r2, #2 + mov r3, #0 + bl sub_02075F0C + ldr r0, [r5, #0] + bl ov95_0224764C + add r2, r0, #0 + add r0, r5, #0 + add r0, #0x80 + add r1, r5, #0 + ldr r0, [r0, #0] + add r1, #0x14 + mov r3, #1 + bl sub_020789BC + add r0, r4, #0 + mov r1, #2 + mov r2, #0 + bl sub_020765C4 + add r3, r0, #0 + mov r1, #0 + str r1, [sp] + add r0, r5, #0 + str r1, [sp, #4] + add r0, #0x14 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0xc] + add r3, #0x50 + add r1, sp, #0x10 + mov r2, #0x80 + bl sub_02007C34 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov95_02248240 + + thumb_func_start ov95_0224829C +ov95_0224829C: ; 0x0224829C + push {r4, lr} + sub sp, #0x70 + add r4, r0, #0 + add r0, #0x44 + mov r1, #0x5d + mov r2, #7 + mov r3, #8 + bl ov95_02247568 + add r0, sp, #0x5c + bl sub_020A81D0 + add r0, sp, #0x38 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r0, sp, #0x38 + str r0, [sp, #0x10] + mov r0, #0x5d + mov r1, #9 + bl sub_02006F00 + mov r0, #0x3a + str r0, [sp] + add r0, sp, #0x5c + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl sub_02006EE0 + mov r0, #2 + add r1, r4, #0 + str r0, [sp] + add r0, sp, #0x14 + add r1, #0x44 + add r2, sp, #0x38 + add r3, sp, #0x5c + bl ov95_022475C4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r2, #0x80 + mov r3, #0x64 + bl ov95_022475E4 + str r0, [r4, #0x3c] + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r2, #0x80 + mov r3, #0x5a + bl ov95_022475E4 + str r0, [r4, #0x40] + mov r1, #1 + bl sub_02021E80 + ldr r0, [r4, #0x3c] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_02021CAC + add sp, #0x70 + pop {r4, pc} + thumb_func_end ov95_0224829C + + thumb_func_start ov95_02248340 +ov95_02248340: ; 0x02248340 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02248348: + ldr r0, [r5, #0x3c] + cmp r0, #0 + beq _02248352 + bl sub_02021BD4 +_02248352: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _02248348 + add r6, #0x44 + add r0, r6, #0 + bl ov95_022475A0 + pop {r4, r5, r6, pc} + thumb_func_end ov95_02248340 + + thumb_func_start ov95_02248364 +ov95_02248364: ; 0x02248364 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x3a + mov r1, #0x14 + str r2, [sp] + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + beq _022483AA + str r5, [r4, #0] + lsl r0, r6, #0xc + str r0, [r4, #4] + ldr r0, [sp] + lsl r1, r0, #0xc + str r1, [r4, #8] + ldr r0, [r4, #4] + sub r0, r1, r0 + add r1, r7, #0 + bl sub_020E1F6C + str r0, [r4, #0xc] + ldr r0, _022483AC ; =ov95_022483E4 + str r7, [r4, #0x10] + add r1, r4, #0 + mov r2, #0 + bl sub_0200DA04 + str r0, [r5, #0x78] + ldr r0, _022483B0 ; =0x04000050 + mov r1, #1 + add r2, r6, #0 + bl sub_020BF578 +_022483AA: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_022483AC: .word ov95_022483E4 +_022483B0: .word 0x04000050 + thumb_func_end ov95_02248364 + + thumb_func_start ov95_022483B4 +ov95_022483B4: ; 0x022483B4 + ldr r0, [r0, #0x78] + cmp r0, #0 + bne _022483BE + mov r0, #1 + bx lr +_022483BE: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov95_022483B4 + + thumb_func_start ov95_022483C4 +ov95_022483C4: ; 0x022483C4 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x78] + cmp r0, #0 + beq _022483E0 + bl sub_0201CED0 + bl ov95_022476C8 + ldr r0, [r4, #0x78] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x78] +_022483E0: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_022483C4 + + thumb_func_start ov95_022483E4 +ov95_022483E4: ; 0x022483E4 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #0 + ble _02248406 + ldr r1, [r4, #4] + ldr r0, [r4, #0xc] + add r2, r1, r0 + str r2, [r4, #4] + ldr r0, _0224841C ; =0x04000050 + mov r1, #1 + asr r2, r2, #0xc + bl sub_020BF578 + pop {r4, pc} +_02248406: + ldr r2, [r4, #8] + ldr r0, _0224841C ; =0x04000050 + mov r1, #1 + asr r2, r2, #0xc + bl sub_020BF578 + ldr r0, [r4, #0] + bl ov95_022483C4 + pop {r4, pc} + nop +_0224841C: .word 0x04000050 + thumb_func_end ov95_022483E4 + + thumb_func_start ov95_02248420 +ov95_02248420: ; 0x02248420 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0x30 + bl sub_02018144 + add r4, r0, #0 + beq _02248460 + str r5, [r4, #0] + ldr r0, [r5, #0x74] + add r1, r4, #0 + str r0, [r4, #4] + add r1, #8 + bl ov95_02247958 + add r1, r4, #0 + ldr r0, [r4, #4] + add r1, #0x14 + bl ov95_02247978 + ldr r0, _02248464 ; =0x00002F60 + mov r2, #0 + str r0, [r4, #0x1c] + str r2, [r4, #0x20] + strh r2, [r4, #0x2c] + str r2, [r4, #0x24] + ldr r0, _02248468 ; =ov95_022484B0 + add r1, r4, #0 + str r2, [r4, #0x28] + bl sub_0200D9E8 + str r0, [r5, #0x7c] +_02248460: + pop {r3, r4, r5, pc} + nop +_02248464: .word 0x00002F60 +_02248468: .word ov95_022484B0 + thumb_func_end ov95_02248420 + + thumb_func_start ov95_0224846C +ov95_0224846C: ; 0x0224846C + ldr r0, [r0, #0x7c] + cmp r0, #0 + bne _02248476 + mov r0, #1 + bx lr +_02248476: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov95_0224846C + + thumb_func_start ov95_0224847C +ov95_0224847C: ; 0x0224847C + push {r3, lr} + ldr r0, [r0, #0x7c] + cmp r0, #0 + beq _0224848C + bl sub_0201CED0 + ldr r0, [r0, #0x20] + pop {r3, pc} +_0224848C: + mov r0, #0 + pop {r3, pc} + thumb_func_end ov95_0224847C + + thumb_func_start ov95_02248490 +ov95_02248490: ; 0x02248490 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x7c] + cmp r0, #0 + beq _022484AC + bl sub_0201CED0 + bl sub_020181C4 + ldr r0, [r4, #0x7c] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x7c] +_022484AC: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02248490 + + thumb_func_start ov95_022484B0 +ov95_022484B0: ; 0x022484B0 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r0, [r4, #0x24] + cmp r0, #0 + bne _02248524 + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x1c] + add r0, r1, r0 + str r0, [r4, #0xc] + ldr r1, [r4, #0x1c] + cmp r1, #0 + blt _022484D2 + mov r0, #0x1e + lsl r0, r0, #6 + sub r0, r1, r0 + str r0, [r4, #0x1c] + b _02248524 +_022484D2: + mov r0, #0x1e + lsl r0, r0, #6 + sub r0, r1, r0 + str r0, [r4, #0x1c] + ldr r1, [r4, #0xc] + ldr r0, _02248588 ; =0xFFFFC000 + cmp r1, r0 + bgt _02248524 + str r0, [r4, #0xc] + ldr r1, [r4, #0x1c] + mov r0, #0x2c + mul r0, r1 + mov r1, #0x64 + bl sub_020E1F6C + neg r1, r0 + mov r0, #0xfa + lsl r0, r0, #4 + str r1, [r4, #0x1c] + cmp r1, r0 + bge _02248500 + mov r0, #1 + str r0, [r4, #0x24] +_02248500: + ldr r0, _0224858C ; =0x000005E6 + bl sub_02005748 + ldr r0, [r4, #0x20] + add r0, r0, #1 + str r0, [r4, #0x20] + cmp r0, #1 + beq _02248516 + cmp r0, #3 + beq _0224851C + b _02248524 +_02248516: + mov r0, #0xb0 + strh r0, [r4, #0x2c] + b _02248524 +_0224851C: + mov r0, #0x2c + ldrsh r0, [r4, r0] + add r0, #0x50 + strh r0, [r4, #0x2c] +_02248524: + mov r0, #0x14 + mov r2, #0x2c + ldrsh r3, [r4, r0] + ldrsh r0, [r4, r2] + add r1, r4, #0 + add r1, #0x14 + add r0, r3, r0 + strh r0, [r4, #0x14] + mov r0, #0x18 + ldrsh r3, [r4, r0] + ldrsh r0, [r4, r2] + sub r0, r3, r0 + strh r0, [r4, #0x18] + ldr r0, [r4, #4] + bl ov95_02247990 + mov r2, #0x2c + ldrsh r3, [r4, r2] + ldr r5, [r4, #8] + add r1, r4, #0 + lsl r0, r3, #2 + add r0, r3, r0 + add r0, r5, r0 + str r0, [r4, #8] + ldrsh r2, [r4, r2] + ldr r3, [r4, #0x10] + add r1, #8 + lsl r0, r2, #2 + add r0, r2, r0 + add r0, r3, r0 + str r0, [r4, #0x10] + ldr r0, [r4, #4] + bl ov95_02247968 + ldr r0, [r4, #0x24] + cmp r0, #0 + beq _02248586 + mov r0, #0x2c + ldrsh r0, [r4, r0] + sub r0, #0xe + strh r0, [r4, #0x2c] + ldr r0, [r4, #0x28] + add r0, r0, #1 + str r0, [r4, #0x28] + cmp r0, #0x1e + ble _02248586 + ldr r0, [r4, #0] + bl ov95_02248490 +_02248586: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02248588: .word 0xFFFFC000 +_0224858C: .word 0x000005E6 + thumb_func_end ov95_022484B0 + + .rodata + + + .global Unk_ov95_0224BEFC +Unk_ov95_0224BEFC: ; 0x0224BEFC + .incbin "incbin/overlay95_rodata.bin", 0x88, 0x90 - 0x88 + + .global Unk_ov95_0224BF04 +Unk_ov95_0224BF04: ; 0x0224BF04 + .incbin "incbin/overlay95_rodata.bin", 0x90, 0xA0 - 0x90 + + .global Unk_ov95_0224BF14 +Unk_ov95_0224BF14: ; 0x0224BF14 + .incbin "incbin/overlay95_rodata.bin", 0xA0, 0xB0 - 0xA0 + + .global Unk_ov95_0224BF24 +Unk_ov95_0224BF24: ; 0x0224BF24 + .incbin "incbin/overlay95_rodata.bin", 0xB0, 0xCC - 0xB0 + + .global Unk_ov95_0224BF40 +Unk_ov95_0224BF40: ; 0x0224BF40 + .incbin "incbin/overlay95_rodata.bin", 0xCC, 0xE8 - 0xCC + + .global Unk_ov95_0224BF5C +Unk_ov95_0224BF5C: ; 0x0224BF5C + .incbin "incbin/overlay95_rodata.bin", 0xE8, 0x28 + diff --git a/asm/ov95_02248590.s b/asm/ov95_02248590.s new file mode 100644 index 000000000..8d8293367 --- /dev/null +++ b/asm/ov95_02248590.s @@ -0,0 +1,2297 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_02248590 +ov95_02248590: ; 0x02248590 + push {r3, r4, r5, lr} + mov r1, #0x5b + add r5, r0, #0 + mov r0, #0x3a + lsl r1, r1, #2 + bl sub_02018144 + add r4, r0, #0 + beq _022485F2 + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + add r1, r4, #0 + add r1, #0xc0 + str r0, [r1, #0] + add r0, r4, #0 + mov r1, #0 + add r0, #0xd4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xc4 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0xcc + str r1, [r0, #0] + mov r0, #0x16 + lsl r0, r0, #4 + str r1, [r4, r0] + add r0, r0, #4 + str r1, [r4, r0] + bl sub_0201D35C + add r1, r4, #0 + add r1, #0xbc + str r0, [r1, #0] + add r0, r4, #0 + mov r2, #0 + add r0, #0xd0 + str r2, [r0, #0] + mov r0, #0x5a + lsl r0, r0, #2 + str r2, [r4, r0] + ldr r0, _022485F8 ; =ov95_02248E00 + add r1, r4, #0 + bl sub_0200DA3C +_022485F2: + add r0, r4, #0 + pop {r3, r4, r5, pc} + nop +_022485F8: .word ov95_02248E00 + thumb_func_end ov95_02248590 + + thumb_func_start ov95_022485FC +ov95_022485FC: ; 0x022485FC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_020C3D98 + add r4, r0, #0 + cmp r5, #0 + beq _02248648 + add r0, r5, #0 + bl ov95_02248B3C + add r0, r5, #0 + bl ov95_02248C98 + add r0, r5, #0 + bl ov95_02248DC4 + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0224862A + bl sub_0200DA58 +_0224862A: + mov r0, #0x59 + lsl r0, r0, #2 + ldr r0, [r5, r0] + cmp r0, #0 + beq _02248638 + bl ov95_022490A4 +_02248638: + add r0, r5, #0 + add r0, #0xbc + ldr r0, [r0, #0] + bl sub_0201D318 + add r0, r5, #0 + bl sub_020181C4 +_02248648: + add r0, r4, #0 + bl sub_020C3DAC + pop {r3, r4, r5, pc} + thumb_func_end ov95_022485FC + + thumb_func_start ov95_02248650 +ov95_02248650: ; 0x02248650 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #4 + bhs _0224867E + lsl r3, r2, #2 + ldr r2, _02248684 ; =0x0224BF9C + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _02248674 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_02248674: + add r0, r5, #0 + bl ov95_02248688 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224867E: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_02248684: .word 0x0224BF9C + thumb_func_end ov95_02248650 + + thumb_func_start ov95_02248688 +ov95_02248688: ; 0x02248688 + push {r4, lr} + add r4, r0, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022486A8 + bl sub_020BFAB8 + add r4, #0xd4 + ldr r0, [r4, #0] + bl ov95_02247770 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_022486A8: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02248688 + + thumb_func_start ov95_022486AC +ov95_022486AC: ; 0x022486AC + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov95_022488A4 + add r0, r4, #0 + bl ov95_02248B84 + add r0, r4, #0 + bl ov95_02248CA8 + mov r0, #8 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + add r2, r1, #0 + add r3, r0, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov95_022486AC + + thumb_func_start ov95_022486E0 +ov95_022486E0: ; 0x022486E0 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0] + cmp r1, #0 + beq _022486F0 + cmp r1, #1 + beq _02248706 + b _0224871E +_022486F0: + bl sub_0200F2AC + cmp r0, #0 + beq _0224871E + ldr r0, _02248724 ; =0x0224C364 + mov r1, #0 + str r1, [r0, #0] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224871E +_02248706: + ldr r1, _02248724 ; =0x0224C364 + ldr r2, [r1, #0] + cmp r2, #0x1e + bge _02248712 + add r2, r2, #1 + str r2, [r1, #0] +_02248712: + add r0, #0xd0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224871E + mov r0, #1 + pop {r4, pc} +_0224871E: + mov r0, #0 + pop {r4, pc} + nop +_02248724: .word 0x0224C364 + thumb_func_end ov95_022486E0 + + thumb_func_start ov95_02248728 +ov95_02248728: ; 0x02248728 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #4 + bhi _022487CE + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02248740: ; jump table + .short _0224874A - _02248740 - 2 ; case 0 + .short _02248756 - _02248740 - 2 ; case 1 + .short _0224879A - _02248740 - 2 ; case 2 + .short _022487B0 - _02248740 - 2 ; case 3 + .short _022487C6 - _02248740 - 2 ; case 4 +_0224874A: + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022487CE +_02248756: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #8 + ble _022487CE + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r1, #0 + mov r2, #0x1f + mov r3, #0x18 + bl ov95_022490D0 + add r0, r4, #0 + bl ov95_02249154 + mov r1, #0x16 + lsl r1, r1, #4 + str r0, [r4, r1] + add r0, r4, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + mov r1, #0 + bl ov95_022479AC + add r4, #0xd8 + ldr r0, [r4, #0] + mov r1, #1 + bl ov95_022479A8 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022487CE +_0224879A: + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov95_02249500 + cmp r0, #0 + beq _022487CE + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022487CE +_022487B0: + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov95_022494F4 + cmp r0, #0 + beq _022487CE + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _022487CE +_022487C6: + bl ov95_02248DF4 + mov r0, #1 + pop {r3, r4, r5, pc} +_022487CE: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_02248728 + + thumb_func_start ov95_022487D4 +ov95_022487D4: ; 0x022487D4 + push {r4, r5, lr} + sub sp, #0xc + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #4 + bhi _0224889A + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_022487EE: ; jump table + .short _022487F8 - _022487EE - 2 ; case 0 + .short _0224880E - _022487EE - 2 ; case 1 + .short _0224882C - _022487EE - 2 ; case 2 + .short _02248848 - _022487EE - 2 ; case 3 + .short _0224888C - _022487EE - 2 ; case 4 +_022487F8: + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov95_0224950C + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224889A +_0224880E: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #2 + ble _0224889A + mov r0, #0 + str r0, [r4, #8] + add r4, #0xc4 + ldr r0, [r4, #0] + bl ov95_02247004 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224889A +_0224882C: + add r1, r4, #0 + add r1, #0xc8 + ldr r1, [r1, #0] + cmp r1, #0 + bne _0224889A + mov r1, #0x59 + lsl r1, r1, #2 + add r1, r4, r1 + bl ov95_02248FAC + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224889A +_02248848: + ldr r0, [r4, #8] + cmp r0, #0x28 + bge _0224885E + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x28 + bne _0224885E + mov r0, #0x6b + lsl r0, r0, #4 + bl sub_02005748 +_0224885E: + mov r0, #0x16 + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl ov95_022494F4 + cmp r0, #0 + beq _0224889A + mov r0, #4 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + ldr r3, _022488A0 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224889A +_0224888C: + bl sub_0200F2AC + cmp r0, #0 + beq _0224889A + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0224889A: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_022488A0: .word 0x00007FFF + thumb_func_end ov95_022487D4 + + thumb_func_start ov95_022488A4 +ov95_022488A4: ; 0x022488A4 + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _02248B20 ; =0x0224BFF4 + bl sub_0201FE94 + ldr r2, _02248B24 ; =0x04000304 + ldr r0, _02248B28 ; =0xFFFF7FFF + ldrh r1, [r2] + and r0, r1 + strh r0, [r2] + ldr r0, _02248B2C ; =0x0224BF8C + bl sub_02018368 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r2, _02248B30 ; =0x0224BFBC + mov r1, #2 + mov r3, #1 + bl sub_020183C4 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r2, _02248B30 ; =0x0224BFBC + mov r1, #6 + mov r3, #1 + bl sub_020183C4 + bl sub_020C3D98 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r2, _02248B34 ; =0x0224BFD8 + mov r1, #3 + mov r3, #2 + bl sub_020183C4 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + ldr r2, _02248B34 ; =0x0224BFD8 + mov r1, #7 + mov r3, #2 + bl sub_020183C4 + add r0, r5, #0 + bl sub_020C3DAC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + mov r1, #2 + ldr r2, [r2, #0] + mov r0, #0x5d + add r3, r1, #0 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r1, #2 + mov r3, #6 + bl sub_02006E3C + mov r1, #0 + str r1, [sp] + add r2, r4, #0 + str r1, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r3, #2 + bl sub_02006E60 + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r3, #6 + bl sub_02006E60 + ldr r0, [r4, #0] + bl ov95_02247644 + add r5, r0, #0 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #3 + add r3, r2, #0 + bl sub_02006E84 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #3 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + ldr r0, _02248B38 ; =0x0224BF84 + lsl r1, r5, #1 + ldrh r5, [r0, r1] + mov r0, #0x20 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + mov r1, #3 + mov r2, #0 + add r3, r5, #0 + bl sub_02006E9C + mov r0, #0x20 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + mov r1, #3 + mov r2, #4 + add r3, r5, #0 + bl sub_02006E9C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r1, #5 + mov r3, #3 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r1, #5 + mov r3, #7 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r1, #4 + mov r3, #3 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + add r2, r4, #0 + str r0, [sp, #0xc] + add r2, #0xc0 + ldr r2, [r2, #0] + mov r0, #0x5d + mov r1, #4 + mov r3, #7 + bl sub_02006E60 + mov r0, #0x3a + mov r1, #0x60 + bl sub_02018144 + add r5, r0, #0 + beq _02248AAA + mov r0, #0 + add r1, r5, #0 + mov r2, #0x60 + bl sub_020C4B4C + add r0, r5, #0 + mov r1, #0x60 + bl sub_020C2C54 + bl sub_020C096C + bl sub_020C0BBC + mov r1, #6 + add r0, r5, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0A0C + mov r1, #6 + add r0, r5, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0BD4 + bl sub_020C0A7C + bl sub_020C0C38 + add r0, r5, #0 + bl sub_020181C4 +_02248AAA: + add r0, r4, #0 + add r0, #0xc0 + mov r3, #0xff + ldr r0, [r0, #0] + mov r1, #6 + mov r2, #3 + mvn r3, r3 + bl sub_02019184 + mov r0, #7 + mov r1, #0 + bl sub_02019120 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add r0, r4, #0 + add r0, #0xc0 + mov r1, #3 + ldr r0, [r0, #0] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + add r0, r4, #0 + add r0, #0xc8 + mov r1, #1 + bl ov95_02246F30 + add r1, r4, #0 + add r1, #0xc4 + str r0, [r1, #0] + mov r0, #0x4a + lsl r0, r0, #2 + str r0, [sp] + mov r0, #0 + str r0, [sp, #4] + add r0, r4, #0 + add r0, #0xd0 + str r0, [sp, #8] + add r0, r4, #0 + add r0, #0xc0 + mov r1, #0x12 + mov r2, #1 + ldr r0, [r0, #0] + lsl r1, r1, #6 + lsl r2, r2, #0xc + mov r3, #1 + bl ov95_022472C4 + add r4, #0xcc + str r0, [r4, #0] + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02248B20: .word 0x0224BFF4 +_02248B24: .word 0x04000304 +_02248B28: .word 0xFFFF7FFF +_02248B2C: .word 0x0224BF8C +_02248B30: .word 0x0224BFBC +_02248B34: .word 0x0224BFD8 +_02248B38: .word 0x0224BF84 + thumb_func_end ov95_022488A4 + + thumb_func_start ov95_02248B3C +ov95_02248B3C: ; 0x02248B3C + push {r4, lr} + add r4, r0, #0 + add r0, #0xc8 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02248B52 + add r0, r4, #0 + add r0, #0xc4 + ldr r0, [r0, #0] + bl ov95_02247018 +_02248B52: + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r1, #2 + bl sub_02019044 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r1, #6 + bl sub_02019044 + add r0, r4, #0 + add r0, #0xc0 + ldr r0, [r0, #0] + mov r1, #3 + bl sub_02019044 + add r4, #0xc0 + ldr r0, [r4, #0] + mov r1, #7 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02248B3C + + thumb_func_start ov95_02248B84 +ov95_02248B84: ; 0x02248B84 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _02248C64 ; =0x04000060 + ldr r1, _02248C68 ; =0xFFFFCFFD + ldrh r2, [r0] + and r2, r1 + strh r2, [r0] + ldrh r3, [r0] + add r2, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _02248C6C ; =0x0000CFFB + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #8 + orr r2, r3 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldr r0, _02248C70 ; =0x0224BFAC + bl sub_020BFD2C + mov r1, #0 + ldr r0, _02248C74 ; =0x000043FF + ldr r2, _02248C78 ; =0x00007FFF + mov r3, #0x3f + str r1, [sp] + bl sub_020BFD58 + ldr r1, _02248C7C ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _02248C80 ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r1, _02248C84 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + strh r2, [r1] + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + add r3, r1, #0 + bl ov95_022476F0 + add r1, r4, #0 + add r1, #0xd4 + str r0, [r1, #0] + mov r1, #0 + ldr r0, _02248C88 ; =0xFFFC8800 + str r1, [sp] + str r0, [sp, #4] + str r1, [sp, #8] + add r0, r4, #0 + str r1, [sp, #0xc] + add r0, #0xd4 + ldr r0, [r0, #0] + mov r2, #0x5d + mov r3, #0x1b + bl ov95_022478B4 + add r1, r4, #0 + add r1, #0xd8 + str r0, [r1, #0] + ldr r1, _02248C8C ; =0x0000EBE0 + ldr r0, _02248C90 ; =0x0224C364 + strh r1, [r0, #4] + mov r1, #0 + strh r1, [r0, #6] + strh r1, [r0, #8] + add r0, r4, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + ldr r1, _02248C94 ; =0x0224C368 + bl ov95_02247AB0 + add r4, #0xd8 + mov r1, #7 + ldr r0, [r4, #0] + lsl r1, r1, #0xa + bl ov95_022479D4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_02248C64: .word 0x04000060 +_02248C68: .word 0xFFFFCFFD +_02248C6C: .word 0x0000CFFB +_02248C70: .word 0x0224BFAC +_02248C74: .word 0x000043FF +_02248C78: .word 0x00007FFF +_02248C7C: .word 0x04000540 +_02248C80: .word 0xBFFF0000 +_02248C84: .word 0x04000008 +_02248C88: .word 0xFFFC8800 +_02248C8C: .word 0x0000EBE0 +_02248C90: .word 0x0224C364 +_02248C94: .word 0x0224C368 + thumb_func_end ov95_02248B84 + + thumb_func_start ov95_02248C98 +ov95_02248C98: ; 0x02248C98 + push {r3, lr} + add r0, #0xd4 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02248CA6 + bl ov95_0224773C +_02248CA6: + pop {r3, pc} + thumb_func_end ov95_02248C98 + + thumb_func_start ov95_02248CA8 +ov95_02248CA8: ; 0x02248CA8 + push {r4, r5, r6, r7, lr} + sub sp, #0x74 + add r7, r0, #0 + add r0, #0xc + mov r1, #0x5d + mov r2, #0xb + mov r3, #0xc + bl ov95_02247568 + add r0, sp, #0x60 + bl sub_020A81D0 + add r0, sp, #0x3c + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r0, sp, #0x3c + str r0, [sp, #0x10] + mov r0, #0x5d + mov r1, #0xd + bl sub_02006F00 + mov r3, #0 + str r3, [sp] + mov r0, #2 + str r0, [sp, #4] + str r3, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r0, sp, #0x3c + str r0, [sp, #0x10] + mov r0, #0x5d + mov r1, #0xd + mov r2, #1 + bl sub_02006F00 + mov r0, #0x3a + str r0, [sp] + add r0, sp, #0x60 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0xe + mov r2, #1 + mov r3, #0 + bl sub_02006EE0 + mov r0, #0x3a + str r0, [sp] + add r0, sp, #0x60 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0xe + mov r2, #2 + mov r3, #0 + bl sub_02006EE0 + mov r0, #1 + add r1, r7, #0 + str r0, [sp] + add r0, sp, #0x18 + add r1, #0xc + add r2, sp, #0x3c + add r3, sp, #0x60 + bl ov95_022475C4 + ldr r0, _02248DC0 ; =0x035947D1 + bl sub_0201D318 + mov r0, #0 + str r0, [sp, #0x14] + add r4, r7, #0 +_02248D42: + bl sub_0201D35C + mov r1, #0xe8 + bl sub_020E2178 + add r6, r1, #0 + add r6, #0xc + bl sub_0201D35C + mov r1, #0x71 + lsl r1, r1, #2 + bl sub_020E2178 + add r5, r1, #0 + mov r0, #0 + str r0, [sp] + mov r0, #1 + sub r5, #0x1c + str r0, [sp, #4] + ldr r0, [r7, #0] + add r1, sp, #0x18 + add r2, r6, #0 + add r3, r5, #0 + bl ov95_022475E4 + str r0, [r4, #0x1c] + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + add r5, #0x38 + ldr r0, [r7, #0] + add r1, sp, #0x18 + add r2, r6, #0 + add r3, r5, #0 + bl ov95_022475E4 + str r0, [r4, #0x20] + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_02021D6C + ldr r0, [r4, #0x20] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r4, #0x1c] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x20] + mov r1, #0 + bl sub_02021CAC + ldr r0, [sp, #0x14] + add r4, #8 + add r0, r0, #1 + str r0, [sp, #0x14] + cmp r0, #0x14 + blt _02248D42 + add sp, #0x74 + pop {r4, r5, r6, r7, pc} + nop +_02248DC0: .word 0x035947D1 + thumb_func_end ov95_02248CA8 + + thumb_func_start ov95_02248DC4 +ov95_02248DC4: ; 0x02248DC4 + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_02248DCC: + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _02248DD6 + bl sub_02021BD4 +_02248DD6: + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _02248DE0 + bl sub_02021BD4 +_02248DE0: + add r4, r4, #1 + add r5, #8 + cmp r4, #0x14 + blt _02248DCC + add r6, #0xc + add r0, r6, #0 + bl ov95_022475A0 + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov95_02248DC4 + + thumb_func_start ov95_02248DF4 +ov95_02248DF4: ; 0x02248DF4 + mov r1, #0x5a + mov r2, #1 + lsl r1, r1, #2 + str r2, [r0, r1] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02248DF4 + + thumb_func_start ov95_02248E00 +ov95_02248E00: ; 0x02248E00 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x5a + add r4, r1, #0 + lsl r0, r0, #2 + ldr r1, [r4, r0] + cmp r1, #0 + beq _02248E54 + mov r1, #0 + str r1, [r4, r0] + add r0, r4, #0 + add r0, #0xc0 + mov r3, #0xff + ldr r0, [r0, #0] + mov r1, #2 + mov r2, #3 + mvn r3, r3 + bl sub_02019184 + add r4, #0xc0 + ldr r0, [r4, #0] + mov r1, #6 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r0, #3 + mov r1, #0 + bl sub_02019120 + mov r0, #7 + mov r1, #1 + bl sub_02019120 + ldr r2, _02248E58 ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + add r0, r5, #0 + bl sub_0200DA58 +_02248E54: + pop {r3, r4, r5, pc} + nop +_02248E58: .word 0x04000304 + thumb_func_end ov95_02248E00 + + thumb_func_start ov95_02248E5C +ov95_02248E5C: ; 0x02248E5C + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + str r5, [r2, #4] + add r0, r2, #0 + str r1, [r0, #0] + mov r1, #0x52 + mov r7, #0 + lsl r1, r1, #2 + str r7, [r0, r1] + add r1, r1, #4 + str r2, [sp] + str r7, [r0, r1] + add r4, r2, #0 + add r6, r2, #0 +_02248E78: + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0x1c] + bl sub_02021D28 + add r2, r6, #0 + add r3, r0, #0 + ldmia r3!, {r0, r1} + add r2, #0x58 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + add r7, r7, #1 + str r0, [r2, #0] + add r4, r4, #4 + add r5, #8 + add r6, #0xc + cmp r7, #0x14 + blt _02248E78 + ldr r0, _02248EC0 ; =ov95_02248EC4 + ldr r1, [sp] + mov r2, #0 + bl sub_0200D9E8 + ldr r1, [sp] + ldr r1, [r1, #0] + str r0, [r1, #0] + ldr r0, [sp] + ldr r0, [r0, #0] + ldr r0, [r0, #0] + cmp r0, #0 + bne _02248EBC + ldr r0, [sp] + bl sub_020181C4 +_02248EBC: + pop {r3, r4, r5, r6, r7, pc} + nop +_02248EC0: .word ov95_02248EC4 + thumb_func_end ov95_02248E5C + + thumb_func_start ov95_02248EC4 +ov95_02248EC4: ; 0x02248EC4 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r5, r1, #0 + mov r1, #0x52 + lsl r1, r1, #2 + ldr r0, [r5, r1] + add r0, r0, #1 + str r0, [r5, r1] + ldr r0, [r5, r1] + cmp r0, #0xc + ble _02248EF8 + mov r0, #0 + str r0, [r5, r1] + add r0, r1, #4 + ldr r0, [r5, r0] + cmp r0, #0x14 + bge _02248EF8 + lsl r0, r0, #2 + mov r2, #1 + add r0, r5, r0 + str r2, [r0, #8] + add r0, r1, #4 + ldr r0, [r5, r0] + add r2, r0, #1 + add r0, r1, #4 + str r2, [r5, r0] +_02248EF8: + mov r0, #0 + add r7, r5, #0 + str r0, [sp, #4] + add r6, r5, #0 + str r5, [sp] + add r4, r0, #0 + add r7, #0x58 +_02248F06: + mov r1, #0x21 + ldr r2, [r6, #0x5c] + lsl r1, r1, #0xc + add r2, r2, r1 + mov r1, #0x6a + add r0, r6, #0 + lsl r1, r1, #0xe + add r0, #0x5c + str r2, [r6, #0x5c] + cmp r2, r1 + blt _02248F46 + mov r1, #0x71 + ldr r2, [r0, #0] + lsl r1, r1, #0xe + sub r1, r2, r1 + str r1, [r0, #0] + ldr r0, [sp] + ldr r0, [r0, #8] + cmp r0, #0 + beq _02248F46 + ldr r0, [r5, #4] + mov r1, #1 + add r0, r0, r4 + ldr r0, [r0, #0x1c] + bl sub_02021CAC + ldr r0, [r5, #4] + mov r1, #1 + add r0, r0, r4 + ldr r0, [r0, #0x20] + bl sub_02021CAC +_02248F46: + ldr r0, [r5, #4] + add r1, r7, #0 + add r0, r0, r4 + ldr r0, [r0, #0x1c] + bl sub_02021C50 + add r2, r6, #0 + add r2, #0x58 + add r3, sp, #8 + ldmia r2!, {r0, r1} + mov ip, r3 + stmia r3!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r3, #0] + mov r0, #0xe + ldr r1, [sp, #0xc] + lsl r0, r0, #0xe + add r0, r1, r0 + str r0, [sp, #0xc] + ldr r0, [r5, #4] + mov r1, ip + add r0, r0, r4 + ldr r0, [r0, #0x20] + bl sub_02021C50 + ldr r0, [sp] + add r6, #0xc + add r0, r0, #4 + str r0, [sp] + ldr r0, [sp, #4] + add r4, #8 + add r0, r0, #1 + add r7, #0xc + str r0, [sp, #4] + cmp r0, #0x14 + blt _02248F06 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov95_02248EC4 + + thumb_func_start ov95_02248F94 +ov95_02248F94: ; 0x02248F94 + push {r4, lr} + add r4, r0, #0 + beq _02248FAA + bl sub_0201CED0 + ldr r0, [r0, #0] + mov r1, #0 + str r1, [r0, #0] + add r0, r4, #0 + bl sub_0200DA58 +_02248FAA: + pop {r4, pc} + thumb_func_end ov95_02248F94 + + thumb_func_start ov95_02248FAC +ov95_02248FAC: ; 0x02248FAC + push {r4, r5, r6, lr} + add r5, r1, #0 + mov r1, #0x17 + add r6, r0, #0 + mov r0, #0x3a + lsl r1, r1, #4 + bl sub_02018144 + add r4, r0, #0 + beq _02249018 + str r6, [r4, #0] + add r6, #0xc0 + mov r0, #0x55 + ldr r1, [r6, #0] + lsl r0, r0, #2 + str r1, [r4, r0] + ldr r0, [r4, r0] + mov r1, #2 + bl sub_020192F8 + lsl r1, r0, #0xc + mov r0, #0x56 + lsl r0, r0, #2 + str r1, [r4, r0] + sub r0, r0, #4 + ldr r0, [r4, r0] + mov r1, #6 + bl sub_020192F8 + mov r1, #0x57 + lsl r0, r0, #0xc + lsl r1, r1, #2 + str r0, [r4, r1] + mov r2, #0 + add r0, r1, #4 + str r2, [r4, r0] + add r0, r1, #0 + add r0, #8 + str r2, [r4, r0] + add r0, r1, #0 + add r0, #0xc + str r5, [r4, r0] + add r1, #0x10 + str r2, [r4, r1] + ldr r0, _0224901C ; =ov95_02249020 + add r1, r4, #0 + bl sub_0200DA04 + str r0, [r5, #0] + cmp r0, #0 + bne _02249018 + add r0, r4, #0 + bl sub_020181C4 +_02249018: + pop {r4, r5, r6, pc} + nop +_0224901C: .word ov95_02249020 + thumb_func_end ov95_02248FAC + + thumb_func_start ov95_02249020 +ov95_02249020: ; 0x02249020 + push {r4, r5, r6, lr} + mov r3, #0x59 + add r4, r1, #0 + lsl r3, r3, #2 + mov r0, #2 + ldr r1, [r4, r3] + lsl r0, r0, #0x14 + cmp r1, r0 + bge _022490A2 + sub r0, r3, #4 + ldr r1, [r4, r0] + add r0, r3, #0 + sub r0, #0x44 + add r1, r1, r0 + sub r0, r3, #4 + str r1, [r4, r0] + add r5, r3, #0 + ldr r1, [r4, r3] + ldr r0, [r4, r0] + sub r5, #0xc + add r0, r1, r0 + str r0, [r4, r3] + add r0, r3, #0 + sub r0, #0x10 + ldr r5, [r4, r5] + ldr r3, [r4, r3] + ldr r0, [r4, r0] + sub r3, r5, r3 + mov r1, #2 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + mov r5, #0x55 + lsl r5, r5, #2 + add r3, r5, #0 + ldr r0, [r4, r5] + add r3, #8 + add r5, #0x10 + ldr r6, [r4, r3] + ldr r3, [r4, r5] + mov r1, #6 + sub r3, r6, r3 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + mov r1, #0x59 + lsl r1, r1, #2 + mov r0, #2 + ldr r2, [r4, r1] + lsl r0, r0, #0x12 + cmp r2, r0 + blt _022490A2 + add r0, r1, #0 + add r0, #8 + ldr r0, [r4, r0] + cmp r0, #0 + bne _022490A2 + add r1, #8 + ldr r0, [r4, #0] + add r1, r4, r1 + add r2, r4, #4 + bl ov95_02248E5C +_022490A2: + pop {r4, r5, r6, pc} + thumb_func_end ov95_02249020 + + thumb_func_start ov95_022490A4 +ov95_022490A4: ; 0x022490A4 + push {r3, r4, r5, lr} + add r5, r0, #0 + beq _022490CE + bl sub_0201CED0 + add r4, r0, #0 + mov r0, #0x5a + lsl r0, r0, #2 + ldr r1, [r4, r0] + mov r2, #0 + str r2, [r1, #0] + add r0, r0, #4 + ldr r0, [r4, r0] + bl ov95_02248F94 + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 +_022490CE: + pop {r3, r4, r5, pc} + thumb_func_end ov95_022490A4 + + thumb_func_start ov95_022490D0 +ov95_022490D0: ; 0x022490D0 + push {r3, r4, r5, r6, r7, lr} + str r0, [sp] + add r5, r1, #0 + mov r0, #0x3a + mov r1, #0x14 + add r7, r2, #0 + add r6, r3, #0 + bl sub_02018144 + add r4, r0, #0 + beq _02249110 + lsl r0, r5, #0xc + str r0, [r4, #0] + lsl r1, r7, #0xc + str r1, [r4, #8] + ldr r0, [r4, #0] + sub r0, r1, r0 + add r1, r6, #0 + bl sub_020E1F6C + str r0, [r4, #4] + ldr r0, [sp] + str r6, [r4, #0xc] + add r1, r5, #0 + str r0, [r4, #0x10] + bl ov95_022479AC + ldr r0, _02249114 ; =ov95_02249118 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 +_02249110: + pop {r3, r4, r5, r6, r7, pc} + nop +_02249114: .word ov95_02249118 + thumb_func_end ov95_022490D0 + + thumb_func_start ov95_02249118 +ov95_02249118: ; 0x02249118 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + sub r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0 + ble _0224913A + ldr r1, [r4, #0] + ldr r0, [r4, #4] + add r1, r1, r0 + str r1, [r4, #0] + ldr r0, [r4, #0x10] + asr r1, r1, #0xc + bl ov95_022479AC + pop {r3, r4, r5, pc} +_0224913A: + ldr r1, [r4, #8] + ldr r0, [r4, #0x10] + asr r1, r1, #0xc + bl ov95_022479AC + add r0, r4, #0 + bl sub_020181C4 + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_02249118 + + thumb_func_start ov95_02249154 +ov95_02249154: ; 0x02249154 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r5, #0 + add r4, #0xdc + add r0, #0xd8 + add r1, r4, #0 + ldr r0, [r0, #0] + add r1, #8 + bl ov95_02247958 + add r0, r5, #0 + add r0, #0xd8 + add r1, r4, #0 + ldr r0, [r0, #0] + add r1, #0x20 + bl ov95_02247978 + add r3, r4, #0 + add r3, #8 + add r2, r4, #0 + ldmia r3!, {r0, r1} + add r2, #0x14 + stmia r2!, {r0, r1} + ldr r0, [r3, #0] + str r0, [r2, #0] + add r0, r5, #0 + add r0, #0xd4 + ldr r0, [r0, #0] + str r0, [r4, #4] + add r0, r5, #0 + add r0, #0xd8 + ldr r0, [r0, #0] + add r5, #0xdc + str r0, [r5, #0] + ldr r0, [r4, #0xc] + str r0, [r4, #0x28] + ldr r1, [r4, #0xc] + ldr r0, _02249224 ; =0xFFFF8000 + sub r0, r0, r1 + mov r1, #0x1e + bl sub_020E1F6C + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r2, #1 + mov r1, #0x1e + add r0, #0x80 + str r1, [r0, #0] + mov r1, #0 + str r1, [r4, #0x38] + str r1, [r4, #0x3c] + str r1, [r4, #0x40] + add r0, r4, #0 + str r1, [r4, #0x44] + add r0, #0x54 + strh r1, [r0] + add r0, r4, #0 + lsl r2, r2, #0xe + add r0, #0x56 + strh r2, [r0] + add r0, r4, #0 + add r0, #0x5a + strh r1, [r0] + str r1, [r4, #0x7c] + add r2, r4, #0 + add r0, r1, #0 +_022491D8: + add r3, r2, #0 + add r3, #0x5c + strh r0, [r3] + add r3, r2, #0 + add r3, #0x5e + strh r0, [r3] + add r3, r2, #0 + add r3, #0x60 + strh r0, [r3] + add r3, r2, #0 + add r3, #0x62 + add r1, r1, #1 + add r2, #8 + strh r0, [r3] + cmp r1, #3 + blt _022491D8 + mov r1, #0xd + str r0, [r4, #0x78] + add r0, r4, #0 + lsl r1, r1, #8 + mov r2, #0x1e + bl ov95_0224922C + mov r1, #0x29 + mov r2, #5 + add r0, r4, #0 + lsl r1, r1, #0xc + lsl r2, r2, #0xe + mov r3, #0x1e + bl ov95_02249268 + ldr r0, _02249228 ; =ov95_02249424 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + pop {r3, r4, r5, pc} + nop +_02249224: .word 0xFFFF8000 +_02249228: .word ov95_02249424 + thumb_func_end ov95_02249154 + + thumb_func_start ov95_0224922C +ov95_0224922C: ; 0x0224922C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + beq _0224925A + mov r0, #0x56 + ldrsh r0, [r5, r0] + add r1, r6, #0 + sub r0, r4, r0 + bl sub_020E1F6C + add r1, r5, #0 + add r1, #0x5a + strh r0, [r1] + mov r0, #0x56 + ldrsh r1, [r5, r0] + mov r0, #0x5a + ldrsh r0, [r5, r0] + add r1, r1, r0 + add r0, r5, #0 + add r0, #0x56 + strh r1, [r0] + b _0224925E +_0224925A: + add r0, #0x56 + strh r4, [r0] +_0224925E: + add r0, r5, #0 + add r0, #0x58 + strh r4, [r0] + str r6, [r5, #0x74] + pop {r4, r5, r6, pc} + thumb_func_end ov95_0224922C + + thumb_func_start ov95_02249268 +ov95_02249268: ; 0x02249268 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + beq _022492A0 + ldr r0, [r5, #0x38] + add r1, r7, #0 + sub r0, r4, r0 + bl sub_020E1F6C + str r0, [r5, #0x40] + ldr r0, [r5, #0x3c] + add r1, r7, #0 + sub r0, r6, r0 + bl sub_020E1F6C + str r0, [r5, #0x44] + ldr r1, [r5, #0x38] + ldr r0, [r5, #0x40] + add r0, r1, r0 + str r0, [r5, #0x38] + ldr r1, [r5, #0x3c] + ldr r0, [r5, #0x44] + add r0, r1, r0 + str r0, [r5, #0x3c] + str r4, [r5, #0x48] + str r6, [r5, #0x4c] +_022492A0: + str r7, [r5, #0x50] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov95_02249268 + + thumb_func_start ov95_022492A4 +ov95_022492A4: ; 0x022492A4 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + beq _022492CA + lsl r0, r4, #3 + str r0, [sp] + add r1, r5, r0 + mov r0, #0x5c + ldrsh r0, [r1, r0] + add r1, r7, #0 + sub r0, r6, r0 + bl sub_020E1F6C + ldr r1, [sp] + add r1, r5, r1 + add r1, #0x5e + strh r0, [r1] +_022492CA: + lsl r1, r4, #3 + add r0, r5, r1 + add r0, #0x60 + strh r6, [r0] + add r0, r5, r1 + add r0, #0x62 + strh r7, [r0] + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov95_022492A4 + + thumb_func_start ov95_022492DC +ov95_022492DC: ; 0x022492DC + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [r5, #0x74] + cmp r0, #0 + beq _02249308 + sub r0, r0, #1 + str r0, [r5, #0x74] + beq _022492FE + mov r0, #0x56 + ldrsh r1, [r5, r0] + mov r0, #0x5a + ldrsh r0, [r5, r0] + add r1, r1, r0 + add r0, r5, #0 + add r0, #0x56 + strh r1, [r0] + b _02249308 +_022492FE: + mov r0, #0x58 + ldrsh r1, [r5, r0] + add r0, r5, #0 + add r0, #0x56 + strh r1, [r0] +_02249308: + mov r0, #0x54 + ldrsh r1, [r5, r0] + mov r0, #0x56 + ldrsh r0, [r5, r0] + add r1, r1, r0 + add r0, r5, #0 + add r0, #0x54 + strh r1, [r0] + add r0, r5, #0 + add r0, #0x54 + ldrh r0, [r0] + mov r1, #0xb6 + bl sub_020E1F6C + add r4, r0, #0 + mov r0, #0x5a + lsl r0, r0, #2 + cmp r4, r0 + blt _02249330 + sub r4, r4, r0 +_02249330: + ldr r0, [r5, #0x50] + cmp r0, #0 + beq _02249356 + ldr r1, [r5, #0x38] + ldr r0, [r5, #0x40] + add r0, r1, r0 + str r0, [r5, #0x38] + ldr r1, [r5, #0x3c] + ldr r0, [r5, #0x44] + add r0, r1, r0 + str r0, [r5, #0x3c] + ldr r0, [r5, #0x50] + sub r0, r0, #1 + str r0, [r5, #0x50] + bne _02249356 + ldr r0, [r5, #0x48] + str r0, [r5, #0x38] + ldr r0, [r5, #0x4c] + str r0, [r5, #0x3c] +_02249356: + lsl r0, r4, #0x10 + ldr r6, [r5, #0x38] + lsr r0, r0, #0x10 + bl sub_0201D1D4 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r3, #2 + mov r6, #0 + lsl r3, r3, #0xa + add r3, r0, r3 + adc r1, r6 + lsl r0, r1, #0x14 + lsr r1, r3, #0xc + ldr r2, [r5, #8] + orr r1, r0 + add r0, r2, r1 + str r0, [r5, #0x14] + lsl r0, r4, #0x10 + ldr r6, [r5, #0x3c] + lsr r0, r0, #0x10 + bl sub_0201D15C + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r4, #2 + mov r3, #0 + lsl r4, r4, #0xa + add r4, r0, r4 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r4, #0xc + ldr r2, [r5, #0x10] + orr r1, r0 + add r0, r2, r1 + str r0, [r5, #0x1c] + mov r0, #0x22 + ldrsh r1, [r5, r0] + mov r0, #0x56 + ldrsh r0, [r5, r0] + mov r2, #0x5e + mov r6, #0x60 + add r0, r1, r0 + strh r0, [r5, #0x22] + add r0, r5, #0 + mov r1, #0x5c +_022493BE: + add r4, r0, #0 + add r4, #0x62 + ldrh r4, [r4] + cmp r4, #0 + beq _022493F6 + add r4, r0, #0 + add r4, #0x62 + ldrh r4, [r4] + sub r7, r4, #1 + add r4, r0, #0 + add r4, #0x62 + strh r7, [r4] + add r4, r0, #0 + add r4, #0x62 + ldrh r4, [r4] + cmp r4, #0 + bne _022493EA + ldrsh r7, [r0, r6] + add r4, r0, #0 + add r4, #0x5c + strh r7, [r4] + b _022493F6 +_022493EA: + ldrsh r7, [r0, r1] + ldrsh r4, [r0, r2] + add r7, r7, r4 + add r4, r0, #0 + add r4, #0x5c + strh r7, [r4] +_022493F6: + add r3, r3, #1 + add r0, #8 + cmp r3, #3 + blt _022493BE + mov r0, #0x20 + ldrsh r1, [r5, r0] + mov r0, #0x5c + ldrsh r0, [r5, r0] + add r0, r1, r0 + strh r0, [r5, #0x20] + mov r0, #0x22 + ldrsh r1, [r5, r0] + mov r0, #0x64 + ldrsh r0, [r5, r0] + add r0, r1, r0 + strh r0, [r5, #0x22] + mov r0, #0x24 + ldrsh r1, [r5, r0] + mov r0, #0x6c + ldrsh r0, [r5, r0] + add r0, r1, r0 + strh r0, [r5, #0x24] + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov95_022492DC + + thumb_func_start ov95_02249424 +ov95_02249424: ; 0x02249424 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02249484 + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x2c] + add r0, r1, r0 + str r0, [r4, #0x28] + str r0, [r4, #0x18] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + bgt _02249484 + mov r1, #2 + lsl r1, r1, #8 + str r1, [r4, #0x30] + mov r0, #0 + lsl r1, r1, #5 + str r0, [r4, #0x2c] + add r0, r4, #0 + add r2, r1, #0 + mov r3, #0x3c + bl ov95_02249268 + ldr r2, _022494A0 ; =0xFFFFF800 + add r0, r4, #0 + mov r1, #0 + mov r3, #0x1e + bl ov95_022492A4 + mov r0, #1 + str r0, [r4, #0x7c] + ldr r1, _022494A4 ; =ov95_022494A8 + add r0, r5, #0 + bl sub_0201CECC +_02249484: + add r0, r4, #0 + bl ov95_022492DC + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + ldr r0, [r4, #0] + add r4, #0x20 + add r1, r4, #0 + bl ov95_02247990 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022494A0: .word 0xFFFFF800 +_022494A4: .word ov95_022494A8 + thumb_func_end ov95_02249424 + + thumb_func_start ov95_022494A8 +ov95_022494A8: ; 0x022494A8 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x78] + cmp r0, #0 + bne _022494F2 + ldr r1, [r4, #0x2c] + ldr r0, [r4, #0x30] + add r1, r1, r0 + str r1, [r4, #0x2c] + ldr r0, [r4, #0x28] + add r0, r0, r1 + str r0, [r4, #0x28] + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_022492DC + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x20 + bl ov95_02247990 + ldr r0, [r4, #0] + bl ov95_022479DC + cmp r0, #0 + bne _022494F2 + ldr r0, [r4, #0] + mov r1, #0 + bl ov95_022479A8 + mov r0, #1 + str r0, [r4, #0x78] +_022494F2: + pop {r4, pc} + thumb_func_end ov95_022494A8 + + thumb_func_start ov95_022494F4 +ov95_022494F4: ; 0x022494F4 + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #0x78] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov95_022494F4 + + thumb_func_start ov95_02249500 +ov95_02249500: ; 0x02249500 + push {r3, lr} + bl sub_0201CED0 + ldr r0, [r0, #0x7c] + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov95_02249500 + + thumb_func_start ov95_0224950C +ov95_0224950C: ; 0x0224950C + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r0, #0 + bl sub_0201CED0 + add r4, r0, #0 + mov r1, #0 + str r1, [r4, #0x78] + add r0, sp, #0 + strh r1, [r0, #4] + ldrh r1, [r0, #4] + strh r1, [r0, #2] + strh r1, [r0] + ldr r0, [r4, #4] + mov r1, #1 + bl ov95_02247AD0 + ldr r0, [r4, #4] + add r1, sp, #0 + bl ov95_02247AB0 + ldr r1, _02249594 ; =0x000058CC + mov r0, #2 + lsl r0, r0, #0x12 + str r1, [r4, #0x2c] + sub r0, r1, r0 + str r0, [r4, #0x28] + add r0, r4, #0 + mov r1, #0 + mov r3, #0x14 + add r0, #0x80 + str r3, [r0, #0] + ldr r0, [r4, #0x28] + add r2, r1, #0 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_02249268 + mov r2, #0x56 + ldrsh r2, [r4, r2] + add r0, r4, #0 + mov r1, #1 + neg r2, r2 + mov r3, #0x1e + bl ov95_022492A4 + mov r1, #2 + add r2, r1, #0 + add r0, r4, #0 + add r2, #0xfe + mov r3, #0x32 + bl ov95_022492A4 + mov r1, #2 + ldr r0, [r4, #0] + lsl r1, r1, #0xc + bl ov95_022479D4 + ldr r0, [r4, #0] + mov r1, #1 + bl ov95_022479A8 + ldr r1, _02249598 ; =ov95_0224959C + add r0, r5, #0 + bl sub_0201CECC + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02249594: .word 0x000058CC +_02249598: .word ov95_0224959C + thumb_func_end ov95_0224950C + + thumb_func_start ov95_0224959C +ov95_0224959C: ; 0x0224959C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov95_022492DC + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + beq _022495DC + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x2c] + add r0, r1, r0 + str r0, [r4, #0x28] + str r0, [r4, #0x18] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + bne _022495DC + ldr r1, _022495F4 ; =ov95_022495F8 + add r0, r5, #0 + bl sub_0201CECC +_022495DC: + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + ldr r0, [r4, #0] + add r4, #0x20 + add r1, r4, #0 + bl ov95_02247990 + pop {r3, r4, r5, pc} + nop +_022495F4: .word ov95_022495F8 + thumb_func_end ov95_0224959C + + thumb_func_start ov95_022495F8 +ov95_022495F8: ; 0x022495F8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov95_022492DC + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0x6e + ble _0224963A + ldr r1, [r4, #0x28] + ldr r0, _02249650 ; =0xFFFC5800 + sub r0, r0, r1 + mov r1, #0x35 + bl sub_020E1F6C + str r0, [r4, #0x2c] + add r0, r4, #0 + mov r1, #0x35 + add r0, #0x80 + str r1, [r0, #0] + ldr r1, _02249654 ; =ov95_02249658 + add r0, r5, #0 + bl sub_0201CECC +_0224963A: + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + ldr r0, [r4, #0] + add r4, #0x20 + add r1, r4, #0 + bl ov95_02247990 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02249650: .word 0xFFFC5800 +_02249654: .word ov95_02249658 + thumb_func_end ov95_022495F8 + + thumb_func_start ov95_02249658 +ov95_02249658: ; 0x02249658 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov95_022492DC + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + beq _02249698 + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x2c] + add r0, r1, r0 + str r0, [r4, #0x28] + str r0, [r4, #0x18] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + sub r1, r0, #1 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + bne _02249698 + ldr r1, _022496B0 ; =ov95_022496B4 + add r0, r5, #0 + bl sub_0201CECC +_02249698: + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + ldr r0, [r4, #0] + add r4, #0x20 + add r1, r4, #0 + bl ov95_02247990 + pop {r3, r4, r5, pc} + nop +_022496B0: .word ov95_022496B4 + thumb_func_end ov95_02249658 + + thumb_func_start ov95_022496B4 +ov95_022496B4: ; 0x022496B4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov95_022492DC + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + add r1, r0, #1 + add r0, r4, #0 + add r0, #0x80 + str r1, [r0, #0] + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #1 + ble _022496E6 + mov r0, #2 + lsl r0, r0, #0x10 + str r0, [r4, #0x2c] + ldr r1, _022496FC ; =ov95_02249700 + add r0, r5, #0 + bl sub_0201CECC +_022496E6: + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + ldr r0, [r4, #0] + add r4, #0x20 + add r1, r4, #0 + bl ov95_02247990 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_022496FC: .word ov95_02249700 + thumb_func_end ov95_022496B4 + + thumb_func_start ov95_02249700 +ov95_02249700: ; 0x02249700 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x78] + cmp r0, #0 + bne _0224973C + add r0, r4, #0 + bl ov95_022492DC + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x2c] + add r0, r1, r0 + str r0, [r4, #0x28] + str r0, [r4, #0x18] + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x14 + bl ov95_02247968 + add r1, r4, #0 + ldr r0, [r4, #0] + add r1, #0x20 + bl ov95_02247990 + ldr r0, [r4, #0] + bl ov95_022479DC + cmp r0, #0 + bne _0224973C + mov r0, #1 + str r0, [r4, #0x78] +_0224973C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02249700 + + .rodata + + + .global Unk_ov95_0224BF84 +Unk_ov95_0224BF84: ; 0x0224BF84 + .incbin "incbin/overlay95_rodata.bin", 0x110, 0x118 - 0x110 + + .global Unk_ov95_0224BF8C +Unk_ov95_0224BF8C: ; 0x0224BF8C + .incbin "incbin/overlay95_rodata.bin", 0x118, 0x128 - 0x118 + + .global Unk_ov95_0224BF9C +Unk_ov95_0224BF9C: ; 0x0224BF9C + .incbin "incbin/overlay95_rodata.bin", 0x128, 0x138 - 0x128 + + .global Unk_ov95_0224BFAC +Unk_ov95_0224BFAC: ; 0x0224BFAC + .incbin "incbin/overlay95_rodata.bin", 0x138, 0x148 - 0x138 + + .global Unk_ov95_0224BFBC +Unk_ov95_0224BFBC: ; 0x0224BFBC + .incbin "incbin/overlay95_rodata.bin", 0x148, 0x164 - 0x148 + + .global Unk_ov95_0224BFD8 +Unk_ov95_0224BFD8: ; 0x0224BFD8 + .incbin "incbin/overlay95_rodata.bin", 0x164, 0x180 - 0x164 + + .global Unk_ov95_0224BFF4 +Unk_ov95_0224BFF4: ; 0x0224BFF4 + .incbin "incbin/overlay95_rodata.bin", 0x180, 0x28 + + + .bss + + + .global Unk_ov95_0224C364 +Unk_ov95_0224C364: ; 0x0224C364 + .space 0x4 + + .global Unk_ov95_0224C368 +Unk_ov95_0224C368: ; 0x0224C368 + .space 0x8 + diff --git a/asm/ov95_02249740.s b/asm/ov95_02249740.s new file mode 100644 index 000000000..cbe33dfb6 --- /dev/null +++ b/asm/ov95_02249740.s @@ -0,0 +1,1083 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_02249740 +ov95_02249740: ; 0x02249740 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0xa4 + bl sub_02018144 + add r4, r0, #0 + beq _0224976A + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + str r0, [r4, #0x24] + mov r0, #0 + str r0, [r4, #0x28] + add r0, r4, #0 + add r0, #0x34 + bl ov95_02249C28 +_0224976A: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_02249740 + + thumb_func_start ov95_02249770 +ov95_02249770: ; 0x02249770 + push {r4, lr} + add r4, r0, #0 + beq _0224979E + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + add r0, r4, #0 + bl ov95_02249A68 + add r0, r4, #0 + bl ov95_02249B80 + add r0, r4, #0 + bl ov95_02249C10 + add r0, r4, #0 + add r0, #0x34 + bl ov95_02249C30 + add r0, r4, #0 + bl sub_020181C4 +_0224979E: + pop {r4, pc} + thumb_func_end ov95_02249770 + + thumb_func_start ov95_022497A0 +ov95_022497A0: ; 0x022497A0 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #2 + bhs _022497CE + lsl r3, r2, #2 + ldr r2, _022497D4 ; =0x0224C01C + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _022497C4 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_022497C4: + add r0, r5, #0 + bl ov95_022497D8 + mov r0, #0 + pop {r3, r4, r5, pc} +_022497CE: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_022497D4: .word 0x0224C01C + thumb_func_end ov95_022497A0 + + thumb_func_start ov95_022497D8 +ov95_022497D8: ; 0x022497D8 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _022497F4 + bl sub_020BFAB8 + ldr r0, [r4, #0x28] + bl ov95_02247770 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_022497F4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_022497D8 + + thumb_func_start ov95_022497F8 +ov95_022497F8: ; 0x022497F8 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov95_02249910 + add r0, r4, #0 + bl ov95_02249A80 + add r0, r4, #0 + bl ov95_02249B90 + mov r2, #0 + ldr r0, _02249838 ; =ov95_02249F38 + add r1, r4, #0 + str r2, [r4, #0xc] + bl sub_0200DA3C + mov r0, #3 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + ldr r3, _0224983C ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + nop +_02249838: .word ov95_02249F38 +_0224983C: .word 0x00007FFF + thumb_func_end ov95_022497F8 + + thumb_func_start ov95_02249840 +ov95_02249840: ; 0x02249840 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #4 + bhi _022498FC + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224985A: ; jump table + .short _02249864 - _0224985A - 2 ; case 0 + .short _02249870 - _0224985A - 2 ; case 1 + .short _0224989A - _0224985A - 2 ; case 2 + .short _022498C4 - _0224985A - 2 ; case 3 + .short _022498EE - _0224985A - 2 ; case 4 +_02249864: + mov r0, #0 + str r0, [r5, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022498FC +_02249870: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + cmp r0, #0xa + ble _022498FC + ldr r0, _02249904 ; =0x000006AC + bl sub_02005748 + add r1, r5, #0 + add r0, r5, #0 + add r1, #0x34 + bl ov95_02249C44 + ldr r0, [r5, #0x2c] + mov r1, #1 + bl ov95_022479A8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022498FC +_0224989A: + add r0, r5, #0 + add r0, #0x34 + bl ov95_02249CF0 + cmp r0, #0 + beq _022498FC + ldr r0, _02249908 ; =0x000006AD + bl sub_02005748 + ldr r0, [r5, #0x20] + mov r1, #3 + bl sub_02021D6C + ldr r0, [r5, #0x20] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022498FC +_022498C4: + ldr r0, [r5, #0x20] + bl sub_02021FD0 + cmp r0, #0 + bne _022498FC + mov r0, #0x10 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + ldr r3, _0224990C ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _022498FC +_022498EE: + bl sub_0200F2AC + cmp r0, #0 + beq _022498FC + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_022498FC: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_02249904: .word 0x000006AC +_02249908: .word 0x000006AD +_0224990C: .word 0x00007FFF + thumb_func_end ov95_02249840 + + thumb_func_start ov95_02249910 +ov95_02249910: ; 0x02249910 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, _02249A54 ; =0x0224C060 + bl sub_0201FE94 + ldr r2, _02249A58 ; =0x04000304 + ldr r0, _02249A5C ; =0xFFFF7FFF + ldrh r1, [r2] + and r0, r1 + strh r0, [r2] + ldr r0, _02249A60 ; =0x0224C024 + bl sub_02018368 + ldr r0, [r4, #0x24] + ldr r2, _02249A64 ; =0x0224C044 + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x24] + ldr r2, _02249A64 ; =0x0224C044 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0] + bl ov95_02247644 + cmp r0, #3 + bhi _02249962 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224995A: ; jump table + .short _02249962 - _0224995A - 2 ; case 0 + .short _0224996E - _0224995A - 2 ; case 1 + .short _0224997A - _0224995A - 2 ; case 2 + .short _02249986 - _0224995A - 2 ; case 3 +_02249962: + mov r0, #0xf + str r0, [sp, #0x10] + mov r7, #0x10 + mov r6, #0x11 + mov r5, #0 + b _02249990 +_0224996E: + mov r0, #0xf + str r0, [sp, #0x10] + mov r7, #0x10 + mov r6, #0x11 + mov r5, #0x20 + b _02249990 +_0224997A: + mov r0, #0xf + str r0, [sp, #0x10] + mov r7, #0x10 + mov r6, #0x11 + mov r5, #0x40 + b _02249990 +_02249986: + mov r0, #0x18 + str r0, [sp, #0x10] + mov r7, #0x19 + mov r6, #0x1a + mov r5, #0 +_02249990: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x24] + mov r0, #0x5d + add r1, r7, #0 + mov r3, #3 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x24] + mov r0, #0x5d + add r1, r7, #0 + mov r3, #7 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r2, [r4, #0x24] + mov r0, #0x5d + mov r3, #3 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r2, [r4, #0x24] + mov r0, #0x5d + mov r3, #7 + bl sub_02006E60 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + add r1, r6, #0 + add r3, r5, #0 + bl sub_02006E9C + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + add r1, r6, #0 + mov r2, #4 + add r3, r5, #0 + bl sub_02006E9C + mov r1, #3 + add r3, r1, #0 + ldr r0, [r4, #0x24] + add r2, r1, #0 + add r3, #0xfd + bl sub_02019184 + ldr r0, [r4, #0x24] + mov r1, #7 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_02249A54: .word 0x0224C060 +_02249A58: .word 0x04000304 +_02249A5C: .word 0xFFFF7FFF +_02249A60: .word 0x0224C024 +_02249A64: .word 0x0224C044 + thumb_func_end ov95_02249910 + + thumb_func_start ov95_02249A68 +ov95_02249A68: ; 0x02249A68 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02249A68 + + thumb_func_start ov95_02249A80 +ov95_02249A80: ; 0x02249A80 + push {r3, r4, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _02249B54 ; =0x04000060 + ldr r1, _02249B58 ; =0xFFFFCFFD + ldrh r2, [r0] + and r2, r1 + strh r2, [r0] + ldrh r3, [r0] + add r2, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _02249B5C ; =0x0000CFFB + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #8 + orr r2, r3 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldr r0, _02249B60 ; =0x0224C034 + bl sub_020BFD2C + mov r1, #0 + ldr r0, _02249B64 ; =0x000043FF + ldr r2, _02249B68 ; =0x00007FFF + mov r3, #0x3f + str r1, [sp] + bl sub_020BFD58 + ldr r1, _02249B6C ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _02249B70 ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r1, _02249B74 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + strh r2, [r1] + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + add r3, r1, #0 + bl ov95_022476F0 + str r0, [r4, #0x28] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r4, #0x28] + mov r2, #0x5d + mov r3, #0x1b + bl ov95_022478B4 + ldr r1, _02249B78 ; =0x000018E3 + str r0, [r4, #0x2c] + add r0, sp, #0x10 + strh r1, [r0] + mov r1, #0 + strh r1, [r0, #2] + strh r1, [r0, #4] + ldr r0, [r4, #0x28] + add r1, sp, #0x10 + bl ov95_02247AB0 + ldr r0, [r4, #0x28] + ldr r1, _02249B7C ; =0x000007D2 + bl ov95_02247AE0 + ldr r0, [r4, #0x28] + add r1, sp, #0x18 + bl ov95_02247A90 + add sp, #0x24 + pop {r3, r4, pc} + nop +_02249B54: .word 0x04000060 +_02249B58: .word 0xFFFFCFFD +_02249B5C: .word 0x0000CFFB +_02249B60: .word 0x0224C034 +_02249B64: .word 0x000043FF +_02249B68: .word 0x00007FFF +_02249B6C: .word 0x04000540 +_02249B70: .word 0xBFFF0000 +_02249B74: .word 0x04000008 +_02249B78: .word 0x000018E3 +_02249B7C: .word 0x000007D2 + thumb_func_end ov95_02249A80 + + thumb_func_start ov95_02249B80 +ov95_02249B80: ; 0x02249B80 + push {r3, lr} + ldr r0, [r0, #0x28] + cmp r0, #0 + beq _02249B8C + bl ov95_0224773C +_02249B8C: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov95_02249B80 + + thumb_func_start ov95_02249B90 +ov95_02249B90: ; 0x02249B90 + push {r4, lr} + sub sp, #0x70 + add r4, r0, #0 + add r0, #0x10 + mov r1, #0x5d + mov r2, #7 + mov r3, #8 + bl ov95_02247568 + add r0, sp, #0x5c + bl sub_020A81D0 + add r0, sp, #0x38 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r0, sp, #0x38 + str r0, [sp, #0x10] + mov r0, #0x5d + mov r1, #9 + bl sub_02006F00 + mov r0, #0x3a + str r0, [sp] + add r0, sp, #0x5c + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl sub_02006EE0 + mov r0, #0 + add r1, r4, #0 + str r0, [sp] + add r0, sp, #0x14 + add r1, #0x10 + add r2, sp, #0x38 + add r3, sp, #0x5c + bl ov95_022475C4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r2, #0x80 + mov r3, #0x60 + bl ov95_022475E4 + mov r1, #0 + str r0, [r4, #0x20] + bl sub_02021CAC + add sp, #0x70 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02249B90 + + thumb_func_start ov95_02249C10 +ov95_02249C10: ; 0x02249C10 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _02249C1E + bl sub_02021BD4 +_02249C1E: + add r4, #0x10 + add r0, r4, #0 + bl ov95_022475A0 + pop {r4, pc} + thumb_func_end ov95_02249C10 + + thumb_func_start ov95_02249C28 +ov95_02249C28: ; 0x02249C28 + mov r1, #0 + str r1, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02249C28 + + thumb_func_start ov95_02249C30 +ov95_02249C30: ; 0x02249C30 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _02249C42 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] +_02249C42: + pop {r4, pc} + thumb_func_end ov95_02249C30 + + thumb_func_start ov95_02249C44 +ov95_02249C44: ; 0x02249C44 + push {r4, lr} + add r4, r1, #0 + str r0, [r4, #0] + ldr r1, [r0, #0x2c] + ldr r2, _02249CD4 ; =0xFFFFD870 + str r1, [r4, #0xc] + ldr r0, [r0, #0x28] + ldr r1, _02249CD8 ; =0xFFF50E00 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0x10] + str r1, [r4, #0x14] + mov r1, #0xe2 + lsl r1, r1, #0xc + str r1, [r4, #0x18] + add r1, r4, #0 + add r1, #0x6c + strh r2, [r1] + add r1, r4, #0 + ldr r2, _02249CDC ; =0xFFFFF550 + add r1, #0x6e + strh r2, [r1] + ldr r1, _02249CE0 ; =0x000134C4 + str r1, [r4, #0x3c] + ldr r1, _02249CE4 ; =0xFFFF4D56 + str r1, [r4, #0x40] + str r0, [r4, #0x60] + str r0, [r4, #0x64] + mov r1, #2 + str r0, [r4, #0x68] + lsl r1, r1, #0xc + strh r1, [r4, #0x34] + ldr r1, _02249CE8 ; =0xFFFFE000 + strh r1, [r4, #0x36] + strh r0, [r4, #0x38] + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x34 + bl ov95_02247990 + mov r0, #1 + lsl r0, r0, #0xc + str r0, [r4, #0x54] + mov r0, #0x4a + lsl r0, r0, #0xa + str r0, [r4, #0x44] + mov r0, #0x63 + lsl r0, r0, #0xa + str r0, [r4, #0x48] + mov r0, #0 + str r0, [r4, #0x5c] + add r0, r4, #0 + bl ov95_02249D38 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x34 + bl ov95_02247978 + ldr r0, _02249CEC ; =ov95_02249E04 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + pop {r4, pc} + nop +_02249CD4: .word 0xFFFFD870 +_02249CD8: .word 0xFFF50E00 +_02249CDC: .word 0xFFFFF550 +_02249CE0: .word 0x000134C4 +_02249CE4: .word 0xFFFF4D56 +_02249CE8: .word 0xFFFFE000 +_02249CEC: .word ov95_02249E04 + thumb_func_end ov95_02249C44 + + thumb_func_start ov95_02249CF0 +ov95_02249CF0: ; 0x02249CF0 + ldr r0, [r0, #4] + cmp r0, #0 + bne _02249CFA + mov r0, #1 + bx lr +_02249CFA: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov95_02249CF0 + + thumb_func_start ov95_02249D00 +ov95_02249D00: ; 0x02249D00 + push {r3, r4, r5, r6, r7, lr} + ldr r4, [sp, #0x18] + add r5, r0, #0 + add r6, r2, #0 + add r7, r3, #0 + cmp r4, #0 + beq _02249D36 + ldr r0, [r5, #0x44] + sub r0, r1, r0 + add r1, r4, #0 + bl sub_020E1F6C + str r0, [r5, #0x4c] + ldr r0, [r5, #0x48] + add r1, r4, #0 + sub r0, r6, r0 + bl sub_020E1F6C + str r0, [r5, #0x50] + ldr r0, [r5, #0x54] + add r1, r4, #0 + sub r0, r7, r0 + bl sub_020E1F6C + str r0, [r5, #0x58] + ldr r0, [sp, #0x18] + str r0, [r5, #0x5c] +_02249D36: + pop {r3, r4, r5, r6, r7, pc} + thumb_func_end ov95_02249D00 + + thumb_func_start ov95_02249D38 +ov95_02249D38: ; 0x02249D38 + push {r4, r5, r6, lr} + add r5, r0, #0 + add r0, #0x6c + ldrh r0, [r0] + mov r1, #0xb6 + bl sub_020E1F6C + add r4, r0, #0 + mov r0, #0x5a + lsl r0, r0, #2 + cmp r4, r0 + blt _02249D52 + sub r4, r4, r0 +_02249D52: + mov r0, #0x6c + ldrsh r1, [r5, r0] + mov r0, #0x6e + ldrsh r0, [r5, r0] + add r1, r1, r0 + add r0, r5, #0 + add r0, #0x6c + strh r1, [r0] + ldr r0, [r5, #0x5c] + cmp r0, #0 + beq _02249D8C + ldr r1, [r5, #0x44] + ldr r0, [r5, #0x4c] + add r0, r1, r0 + str r0, [r5, #0x44] + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x50] + add r0, r1, r0 + str r0, [r5, #0x48] + ldr r1, [r5, #0x54] + ldr r0, [r5, #0x58] + add r1, r1, r0 + str r1, [r5, #0x54] + ldr r0, [r5, #0xc] + bl ov95_022479D4 + ldr r0, [r5, #0x5c] + sub r0, r0, #1 + str r0, [r5, #0x5c] +_02249D8C: + lsl r0, r4, #0x10 + ldr r6, [r5, #0x44] + lsr r0, r0, #0x10 + bl sub_0201D1D4 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r5, #0x1c] + lsl r0, r4, #0x10 + ldr r6, [r5, #0x48] + lsr r0, r0, #0x10 + bl sub_0201D15C + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r5, #0x20] + add r1, r5, #0 + str r3, [r5, #0x24] + mov r0, #0x34 + ldrsh r2, [r5, r0] + mov r0, #3 + lsl r0, r0, #8 + add r0, r2, r0 + strh r0, [r5, #0x34] + ldr r0, [r5, #0xc] + add r1, #0x34 + bl ov95_02247990 + add r0, r5, #0 + add r1, r5, #0 + add r5, #0x28 + add r0, #0x1c + add r1, #0x10 + add r2, r5, #0 + bl sub_020BD17C + pop {r4, r5, r6, pc} + ; .align 2, 0 + thumb_func_end ov95_02249D38 + + thumb_func_start ov95_02249E04 +ov95_02249E04: ; 0x02249E04 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + ldr r1, [r4, #0x68] + cmp r1, #0x3c + bge _02249E14 + add r1, r1, #1 + str r1, [r4, #0x68] +_02249E14: + ldr r1, [r4, #0x60] + cmp r1, #4 + bls _02249E1C + b _02249F2C +_02249E1C: + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_02249E28: ; jump table + .short _02249E32 - _02249E28 - 2 ; case 0 + .short _02249E66 - _02249E28 - 2 ; case 1 + .short _02249EA4 - _02249E28 - 2 ; case 2 + .short _02249EEA - _02249E28 - 2 ; case 3 + .short _02249F1A - _02249E28 - 2 ; case 4 +_02249E32: + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x3c] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x40] + add r0, r1, r0 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_02249D38 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + ldr r0, [r4, #0xc] + bl ov95_022479DC + cmp r0, #0 + beq _02249F2C + ldr r0, [r4, #0x60] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0x60] + pop {r3, r4, pc} +_02249E66: + ldr r0, [r4, #0xc] + bl ov95_022479DC + cmp r0, #0 + bne _02249E80 + ldr r0, [r4, #0] + bl ov95_02249F30 + ldr r0, [r4, #0x60] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0x60] + pop {r3, r4, pc} +_02249E80: + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x3c] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x40] + add r0, r1, r0 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_02249D38 + ldr r0, [r4, #0xc] + add r4, #0x28 + add r1, r4, #0 + bl ov95_02247968 + add sp, #4 + pop {r3, r4, pc} +_02249EA4: + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x3c] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x40] + add r0, r1, r0 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_02249D38 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + ldr r0, [r4, #0x68] + cmp r0, #0x3c + blt _02249F2C + mov r1, #2 + lsl r1, r1, #0xa + mov r0, #0xc + str r0, [sp] + add r0, r4, #0 + add r2, r1, #0 + lsr r3, r1, #2 + bl ov95_02249D00 + mov r0, #0 + str r0, [r4, #0x64] + ldr r0, [r4, #0x60] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0x60] + pop {r3, r4, pc} +_02249EEA: + add r0, r4, #0 + bl ov95_02249D38 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + ldr r0, [r4, #0x64] + add r0, r0, #1 + str r0, [r4, #0x64] + cmp r0, #0xc + blt _02249F2C + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov95_022479A8 + mov r0, #0 + str r0, [r4, #0x64] + ldr r0, [r4, #0x60] + add sp, #4 + add r0, r0, #1 + str r0, [r4, #0x60] + pop {r3, r4, pc} +_02249F1A: + ldr r1, [r4, #0x64] + add r1, r1, #1 + str r1, [r4, #0x64] + cmp r1, #8 + ble _02249F2C + mov r1, #0 + str r1, [r4, #4] + bl sub_0200DA58 +_02249F2C: + add sp, #4 + pop {r3, r4, pc} + thumb_func_end ov95_02249E04 + + thumb_func_start ov95_02249F30 +ov95_02249F30: ; 0x02249F30 + mov r1, #1 + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov95_02249F30 + + thumb_func_start ov95_02249F38 +ov95_02249F38: ; 0x02249F38 + push {r3, r4, r5, lr} + sub sp, #8 + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _02249F84 + mov r3, #0 + ldr r1, _02249F88 ; =0x00001150 + str r3, [r4, #0xc] + add r0, sp, #0 + strh r1, [r0] + strh r3, [r0, #2] + strh r3, [r0, #4] + mov r1, #3 + ldr r0, [r4, #0x24] + add r2, r1, #0 + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x24] + mov r1, #7 + add r3, #0xfd + bl sub_02019184 + ldr r0, [r4, #0x28] + add r1, sp, #0 + bl ov95_02247AC0 + ldr r2, _02249F8C ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + add r0, r5, #0 + bl sub_0200DA58 +_02249F84: + add sp, #8 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02249F88: .word 0x00001150 +_02249F8C: .word 0x04000304 + thumb_func_end ov95_02249F38 + + .rodata + + + .global Unk_ov95_0224C01C +Unk_ov95_0224C01C: ; 0x0224C01C + .incbin "incbin/overlay95_rodata.bin", 0x1A8, 0x1B0 - 0x1A8 + + .global Unk_ov95_0224C024 +Unk_ov95_0224C024: ; 0x0224C024 + .incbin "incbin/overlay95_rodata.bin", 0x1B0, 0x1C0 - 0x1B0 + + .global Unk_ov95_0224C034 +Unk_ov95_0224C034: ; 0x0224C034 + .incbin "incbin/overlay95_rodata.bin", 0x1C0, 0x1D0 - 0x1C0 + + .global Unk_ov95_0224C044 +Unk_ov95_0224C044: ; 0x0224C044 + .incbin "incbin/overlay95_rodata.bin", 0x1D0, 0x1EC - 0x1D0 + + .global Unk_ov95_0224C060 +Unk_ov95_0224C060: ; 0x0224C060 + .incbin "incbin/overlay95_rodata.bin", 0x1EC, 0x28 + diff --git a/asm/ov95_02249F90.s b/asm/ov95_02249F90.s new file mode 100644 index 000000000..464e109ed --- /dev/null +++ b/asm/ov95_02249F90.s @@ -0,0 +1,525 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_02249F90 +ov95_02249F90: ; 0x02249F90 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0x24 + bl sub_02018144 + add r4, r0, #0 + beq _02249FAE + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + str r0, [r4, #0xc] +_02249FAE: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_02249F90 + + thumb_func_start ov95_02249FB4 +ov95_02249FB4: ; 0x02249FB4 + push {r4, lr} + add r4, r0, #0 + beq _02249FC4 + bl ov95_0224A320 + add r0, r4, #0 + bl sub_020181C4 +_02249FC4: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_02249FB4 + + thumb_func_start ov95_02249FC8 +ov95_02249FC8: ; 0x02249FC8 + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #2 + bhs _02249FF0 + lsl r3, r2, #2 + ldr r2, _02249FF4 ; =0x0224C088 + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _02249FEC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_02249FEC: + mov r0, #0 + pop {r3, r4, r5, pc} +_02249FF0: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_02249FF4: .word 0x0224C088 + thumb_func_end ov95_02249FC8 + + thumb_func_start ov95_02249FF8 +ov95_02249FF8: ; 0x02249FF8 + push {lr} + sub sp, #0xc + bl ov95_0224A10C + mov r0, #8 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + ldr r3, _0224A01C ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0xc + pop {pc} + ; .align 2, 0 +_0224A01C: .word 0x00007FFF + thumb_func_end ov95_02249FF8 + + thumb_func_start ov95_0224A020 +ov95_0224A020: ; 0x0224A020 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0224A038 + cmp r0, #1 + beq _0224A06A + cmp r0, #2 + beq _0224A096 + b _0224A0A4 +_0224A038: + bl sub_0200F2AC + cmp r0, #0 + beq _0224A0A4 + ldr r0, _0224A0AC ; =0xFFE80000 + mov r2, #0 + str r0, [r5, #0x10] + mov r0, #5 + lsl r0, r0, #0x10 + str r0, [r5, #0x14] + ldr r0, _0224A0B0 ; =0x00005999 + add r1, r5, #0 + str r0, [r5, #0x18] + ldr r0, _0224A0B4 ; =0xFFFFDDDE + str r0, [r5, #0x1c] + mov r0, #0x3c + str r0, [r5, #8] + ldr r0, _0224A0B8 ; =ov95_0224A0C4 + str r2, [r5, #0x20] + bl sub_0200DA04 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224A0A4 +_0224A06A: + ldr r0, [r5, #0x20] + cmp r0, #0 + beq _0224A0A4 + ldr r0, _0224A0BC ; =0x000006A9 + bl sub_02005748 + mov r0, #0x10 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + ldr r3, _0224A0C0 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224A0A4 +_0224A096: + bl sub_0200F2AC + cmp r0, #0 + beq _0224A0A4 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0224A0A4: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + nop +_0224A0AC: .word 0xFFE80000 +_0224A0B0: .word 0x00005999 +_0224A0B4: .word 0xFFFFDDDE +_0224A0B8: .word ov95_0224A0C4 +_0224A0BC: .word 0x000006A9 +_0224A0C0: .word 0x00007FFF + thumb_func_end ov95_0224A020 + + thumb_func_start ov95_0224A0C4 +ov95_0224A0C4: ; 0x0224A0C4 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _0224A0F2 + sub r0, r0, #1 + str r0, [r4, #8] + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x1c] + add r2, r1, r0 + str r2, [r4, #0x14] + ldr r1, [r4, #0x10] + ldr r0, [r4, #0xc] + asr r1, r1, #0xc + asr r2, r2, #0xc + bl ov95_0224A358 + pop {r3, r4, r5, pc} +_0224A0F2: + mov r1, #0x2f + mvn r1, r1 + ldr r0, [r4, #0xc] + add r2, r1, #0 + bl ov95_0224A358 + mov r0, #1 + str r0, [r4, #0x20] + add r0, r5, #0 + bl sub_0200DA58 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224A0C4 + + thumb_func_start ov95_0224A10C +ov95_0224A10C: ; 0x0224A10C + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _0224A304 ; =0x0224C0F4 + bl sub_0201FE94 + ldr r2, _0224A308 ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + ldr r0, _0224A30C ; =0x0224C090 + bl sub_02018368 + ldr r0, [r4, #0xc] + ldr r2, _0224A310 ; =0x0224C0A0 + mov r1, #1 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + ldr r2, _0224A310 ; =0x0224C0A0 + mov r1, #5 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + ldr r2, _0224A314 ; =0x0224C0BC + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + ldr r2, _0224A318 ; =0x0224C0D8 + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0xc] + ldr r2, _0224A318 ; =0x0224C0D8 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #0x13 + mov r3, #3 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #0x13 + mov r3, #7 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #0x12 + mov r3, #3 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #0x12 + mov r3, #7 + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0x14 + add r3, r2, #0 + bl sub_02006E84 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0x14 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + mov r0, #0xc8 + str r0, [sp] + mov r1, #1 + ldr r0, [r4, #0xc] + mov r2, #0 + add r3, r1, #0 + bl sub_020196C0 + mov r0, #0xc8 + str r0, [sp] + ldr r0, [r4, #0xc] + mov r1, #5 + mov r2, #0 + mov r3, #1 + bl sub_020196C0 + mov r0, #0xc8 + str r0, [sp] + ldr r0, [r4, #0xc] + mov r1, #2 + mov r2, #0 + mov r3, #1 + bl sub_020196C0 + mov r1, #0 + str r1, [sp] + ldr r0, [r4, #0] + mov r2, #1 + mov r3, #0xe + bl ov95_022473E8 + mov r1, #0 + str r1, [sp] + ldr r0, [r4, #0] + mov r2, #5 + mov r3, #0xe + bl ov95_022473E8 + mov r0, #0 + str r0, [sp] + ldr r0, [r4, #0] + mov r1, #1 + mov r2, #2 + mov r3, #0xf + bl ov95_022473E8 + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x40 + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r4, #0xc] + mov r1, #1 + mov r2, #0xc8 + bl sub_02019CB8 + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x40 + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r4, #0xc] + mov r1, #5 + mov r2, #0xc8 + bl sub_02019CB8 + mov r3, #0 + str r3, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x40 + str r0, [sp, #8] + str r3, [sp, #0xc] + ldr r0, [r4, #0xc] + mov r1, #2 + mov r2, #0xc8 + bl sub_02019CB8 + mov r0, #0x14 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + ldr r0, [r4, #0] + mov r2, #1 + mov r3, #0xe + bl ov95_022474D4 + mov r0, #0x14 + str r0, [sp] + mov r1, #0 + str r1, [sp, #4] + ldr r0, [r4, #0] + mov r2, #5 + mov r3, #0xe + bl ov95_022474D4 + mov r2, #2 + str r2, [sp] + mov r0, #0 + str r0, [sp, #4] + ldr r0, [r4, #0] + mov r1, #1 + mov r3, #0xf + bl ov95_022474D4 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02019448 + ldr r0, [r4, #0xc] + mov r1, #5 + bl sub_02019448 + ldr r0, [r4, #0xc] + mov r1, #2 + bl sub_02019448 + ldr r0, [r4, #0xc] + ldr r2, _0224A31C ; =0xFFFFFE80 + mov r1, #0x50 + bl ov95_0224A358 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0224A304: .word 0x0224C0F4 +_0224A308: .word 0x04000304 +_0224A30C: .word 0x0224C090 +_0224A310: .word 0x0224C0A0 +_0224A314: .word 0x0224C0BC +_0224A318: .word 0x0224C0D8 +_0224A31C: .word 0xFFFFFE80 + thumb_func_end ov95_0224A10C + + thumb_func_start ov95_0224A320 +ov95_0224A320: ; 0x0224A320 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0xc] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #7 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #6 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #1 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #5 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224A320 + + thumb_func_start ov95_0224A358 +ov95_0224A358: ; 0x0224A358 + push {r4, r5, r6, lr} + ldr r3, _0224A38C ; =0x000001FF + add r4, r1, #0 + add r6, r2, #0 + and r4, r3 + add r5, r0, #0 + mov r1, #2 + mov r2, #3 + and r3, r6 + bl sub_02019184 + add r0, r5, #0 + mov r1, #1 + mov r2, #3 + add r3, r4, #0 + bl sub_02019184 + add r4, #0xc0 + add r0, r5, #0 + mov r1, #5 + mov r2, #3 + add r3, r4, #0 + bl sub_02019184 + pop {r4, r5, r6, pc} + nop +_0224A38C: .word 0x000001FF + thumb_func_end ov95_0224A358 + + .rodata + + + .global Unk_ov95_0224C088 +Unk_ov95_0224C088: ; 0x0224C088 + .incbin "incbin/overlay95_rodata.bin", 0x214, 0x21C - 0x214 + + .global Unk_ov95_0224C090 +Unk_ov95_0224C090: ; 0x0224C090 + .incbin "incbin/overlay95_rodata.bin", 0x21C, 0x22C - 0x21C + + .global Unk_ov95_0224C0A0 +Unk_ov95_0224C0A0: ; 0x0224C0A0 + .incbin "incbin/overlay95_rodata.bin", 0x22C, 0x248 - 0x22C + + .global Unk_ov95_0224C0BC +Unk_ov95_0224C0BC: ; 0x0224C0BC + .incbin "incbin/overlay95_rodata.bin", 0x248, 0x264 - 0x248 + + .global Unk_ov95_0224C0D8 +Unk_ov95_0224C0D8: ; 0x0224C0D8 + .incbin "incbin/overlay95_rodata.bin", 0x264, 0x280 - 0x264 + + .global Unk_ov95_0224C0F4 +Unk_ov95_0224C0F4: ; 0x0224C0F4 + .incbin "incbin/overlay95_rodata.bin", 0x280, 0x28 + diff --git a/asm/ov95_0224A390.s b/asm/ov95_0224A390.s new file mode 100644 index 000000000..ecf357929 --- /dev/null +++ b/asm/ov95_0224A390.s @@ -0,0 +1,1075 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_0224A390 +ov95_0224A390: ; 0x0224A390 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0xb0 + bl sub_02018144 + add r4, r0, #0 + beq _0224A3C4 + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + str r0, [r4, #0x24] + mov r0, #0 + str r0, [r4, #0x28] + str r0, [r4, #0xc] + add r0, r4, #0 + add r0, #0x34 + bl ov95_0224A848 + ldr r0, _0224A3C8 ; =ov95_0224AB50 + add r1, r4, #0 + bl sub_02017798 +_0224A3C4: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224A3C8: .word ov95_0224AB50 + thumb_func_end ov95_0224A390 + + thumb_func_start ov95_0224A3CC +ov95_0224A3CC: ; 0x0224A3CC + push {r4, lr} + add r4, r0, #0 + beq _0224A3FA + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + add r0, r4, #0 + bl ov95_0224A678 + add r0, r4, #0 + bl ov95_0224A7A0 + add r0, r4, #0 + bl ov95_0224A830 + add r0, r4, #0 + add r0, #0x34 + bl ov95_0224A850 + add r0, r4, #0 + bl sub_020181C4 +_0224A3FA: + pop {r4, pc} + thumb_func_end ov95_0224A3CC + + thumb_func_start ov95_0224A3FC +ov95_0224A3FC: ; 0x0224A3FC + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #2 + bhs _0224A424 + lsl r3, r2, #2 + ldr r2, _0224A428 ; =0x0224C11C + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _0224A420 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_0224A420: + mov r0, #0 + pop {r3, r4, r5, pc} +_0224A424: + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224A428: .word 0x0224C11C + thumb_func_end ov95_0224A3FC + + thumb_func_start ov95_0224A42C +ov95_0224A42C: ; 0x0224A42C + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov95_0224A518 + add r0, r4, #0 + bl ov95_0224A690 + add r0, r4, #0 + bl ov95_0224A7B0 + mov r0, #8 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + ldr r3, _0224A460 ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + nop +_0224A460: .word 0x00007FFF + thumb_func_end ov95_0224A42C + + thumb_func_start ov95_0224A464 +ov95_0224A464: ; 0x0224A464 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #3 + bhi _0224A50A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224A47E: ; jump table + .short _0224A486 - _0224A47E - 2 ; case 0 + .short _0224A4A6 - _0224A47E - 2 ; case 1 + .short _0224A4D0 - _0224A47E - 2 ; case 2 + .short _0224A4FC - _0224A47E - 2 ; case 3 +_0224A486: + bl sub_0200F2AC + cmp r0, #0 + beq _0224A50A + ldr r0, [r5, #0x20] + mov r1, #3 + bl sub_02021D6C + ldr r0, [r5, #0x20] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224A50A +_0224A4A6: + ldr r0, [r5, #0x20] + bl sub_02021FD0 + cmp r0, #0 + bne _0224A50A + ldr r0, _0224A510 ; =0x000006AB + bl sub_02005748 + add r1, r5, #0 + add r0, r5, #0 + add r1, #0x34 + bl ov95_0224A864 + ldr r0, [r5, #0x2c] + mov r1, #1 + bl ov95_022479A8 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224A50A +_0224A4D0: + add r5, #0x34 + add r0, r5, #0 + bl ov95_0224A924 + cmp r0, #0 + beq _0224A50A + mov r0, #0x10 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + ldr r3, _0224A514 ; =0x00007FFF + add r1, r0, #0 + add r2, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224A50A +_0224A4FC: + bl sub_0200F2AC + cmp r0, #0 + beq _0224A50A + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0224A50A: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + ; .align 2, 0 +_0224A510: .word 0x000006AB +_0224A514: .word 0x00007FFF + thumb_func_end ov95_0224A464 + + thumb_func_start ov95_0224A518 +ov95_0224A518: ; 0x0224A518 + push {r4, r5, r6, r7, lr} + sub sp, #0x14 + add r4, r0, #0 + ldr r0, _0224A668 ; =0x0224C160 + bl sub_0201FE94 + ldr r2, _0224A66C ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + ldr r0, _0224A670 ; =0x0224C124 + bl sub_02018368 + ldr r0, [r4, #0x24] + ldr r2, _0224A674 ; =0x0224C144 + mov r1, #3 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x24] + ldr r2, _0224A674 ; =0x0224C144 + mov r1, #7 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0] + bl ov95_02247644 + cmp r0, #3 + bhi _0224A56A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224A562: ; jump table + .short _0224A56A - _0224A562 - 2 ; case 0 + .short _0224A576 - _0224A562 - 2 ; case 1 + .short _0224A582 - _0224A562 - 2 ; case 2 + .short _0224A58E - _0224A562 - 2 ; case 3 +_0224A56A: + mov r0, #0xf + str r0, [sp, #0x10] + mov r7, #0x10 + mov r6, #0x11 + mov r5, #0 + b _0224A598 +_0224A576: + mov r0, #0xf + str r0, [sp, #0x10] + mov r7, #0x10 + mov r6, #0x11 + mov r5, #0x20 + b _0224A598 +_0224A582: + mov r0, #0xf + str r0, [sp, #0x10] + mov r7, #0x10 + mov r6, #0x11 + mov r5, #0x40 + b _0224A598 +_0224A58E: + mov r0, #0x18 + str r0, [sp, #0x10] + mov r7, #0x19 + mov r6, #0x1a + mov r5, #0 +_0224A598: + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x24] + mov r0, #0x5d + add r1, r7, #0 + mov r3, #3 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x24] + mov r0, #0x5d + add r1, r7, #0 + mov r3, #7 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r2, [r4, #0x24] + mov r0, #0x5d + mov r3, #3 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r1, [sp, #0x10] + ldr r2, [r4, #0x24] + mov r0, #0x5d + mov r3, #7 + bl sub_02006E60 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + add r1, r6, #0 + add r3, r5, #0 + bl sub_02006E9C + mov r0, #0 + str r0, [sp] + mov r0, #0x20 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + add r1, r6, #0 + mov r2, #4 + add r3, r5, #0 + bl sub_02006E9C + mov r1, #3 + ldr r0, [r4, #0x24] + add r2, r1, #0 + mov r3, #0 + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0x24] + mov r1, #7 + add r3, #0xfd + bl sub_02019184 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + bl sub_02039734 + mov r0, #1 + mov r1, #0x39 + bl sub_020397C8 + add sp, #0x14 + pop {r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224A668: .word 0x0224C160 +_0224A66C: .word 0x04000304 +_0224A670: .word 0x0224C124 +_0224A674: .word 0x0224C144 + thumb_func_end ov95_0224A518 + + thumb_func_start ov95_0224A678 +ov95_0224A678: ; 0x0224A678 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x24] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0x24] + mov r1, #7 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224A678 + + thumb_func_start ov95_0224A690 +ov95_0224A690: ; 0x0224A690 + push {r3, r4, lr} + sub sp, #0x24 + add r4, r0, #0 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _0224A770 ; =0x04000060 + ldr r1, _0224A774 ; =0xFFFFCFFD + ldrh r2, [r0] + and r2, r1 + strh r2, [r0] + ldrh r3, [r0] + add r2, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0224A778 ; =0x0000CFFB + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #8 + orr r2, r3 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldr r0, _0224A77C ; =0x0224C134 + bl sub_020BFD2C + mov r1, #0 + ldr r0, _0224A780 ; =0x000043FF + ldr r2, _0224A784 ; =0x00007FFF + mov r3, #0x3f + str r1, [sp] + bl sub_020BFD58 + ldr r1, _0224A788 ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _0224A78C ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r1, _0224A790 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + strh r2, [r1] + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + add r3, r1, #0 + bl ov95_022476F0 + str r0, [r4, #0x28] + mov r1, #0 + str r1, [sp] + str r1, [sp, #4] + str r1, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r4, #0x28] + mov r2, #0x5d + mov r3, #0x1b + bl ov95_022478B4 + ldr r1, _0224A794 ; =0x000018E3 + str r0, [r4, #0x2c] + add r0, sp, #0x10 + strh r1, [r0] + mov r1, #0 + strh r1, [r0, #2] + strh r1, [r0, #4] + ldr r0, [r4, #0x28] + add r1, sp, #0x10 + bl ov95_02247AB0 + ldr r1, _0224A798 ; =0x00001150 + add r0, sp, #0x10 + strh r1, [r0] + ldr r0, [r4, #0x28] + add r1, sp, #0x10 + bl ov95_02247AC0 + ldr r0, [r4, #0x28] + ldr r1, _0224A79C ; =0x000007D2 + bl ov95_02247AE0 + ldr r0, [r4, #0x28] + add r1, sp, #0x18 + bl ov95_02247A90 + add sp, #0x24 + pop {r3, r4, pc} + ; .align 2, 0 +_0224A770: .word 0x04000060 +_0224A774: .word 0xFFFFCFFD +_0224A778: .word 0x0000CFFB +_0224A77C: .word 0x0224C134 +_0224A780: .word 0x000043FF +_0224A784: .word 0x00007FFF +_0224A788: .word 0x04000540 +_0224A78C: .word 0xBFFF0000 +_0224A790: .word 0x04000008 +_0224A794: .word 0x000018E3 +_0224A798: .word 0x00001150 +_0224A79C: .word 0x000007D2 + thumb_func_end ov95_0224A690 + + thumb_func_start ov95_0224A7A0 +ov95_0224A7A0: ; 0x0224A7A0 + push {r3, lr} + ldr r0, [r0, #0x28] + cmp r0, #0 + beq _0224A7AC + bl ov95_0224773C +_0224A7AC: + pop {r3, pc} + ; .align 2, 0 + thumb_func_end ov95_0224A7A0 + + thumb_func_start ov95_0224A7B0 +ov95_0224A7B0: ; 0x0224A7B0 + push {r4, lr} + sub sp, #0x70 + add r4, r0, #0 + add r0, #0x10 + mov r1, #0x5d + mov r2, #7 + mov r3, #8 + bl ov95_02247568 + add r0, sp, #0x5c + bl sub_020A81D0 + add r0, sp, #0x38 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r0, sp, #0x38 + str r0, [sp, #0x10] + mov r0, #0x5d + mov r1, #9 + bl sub_02006F00 + mov r0, #0x3a + str r0, [sp] + add r0, sp, #0x5c + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl sub_02006EE0 + mov r0, #1 + add r1, r4, #0 + str r0, [sp] + add r0, sp, #0x14 + add r1, #0x10 + add r2, sp, #0x38 + add r3, sp, #0x5c + bl ov95_022475C4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r2, #0x80 + mov r3, #0x60 + bl ov95_022475E4 + mov r1, #0 + str r0, [r4, #0x20] + bl sub_02021CAC + add sp, #0x70 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224A7B0 + + thumb_func_start ov95_0224A830 +ov95_0224A830: ; 0x0224A830 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224A83E + bl sub_02021BD4 +_0224A83E: + add r4, #0x10 + add r0, r4, #0 + bl ov95_022475A0 + pop {r4, pc} + thumb_func_end ov95_0224A830 + + thumb_func_start ov95_0224A848 +ov95_0224A848: ; 0x0224A848 + mov r1, #0 + str r1, [r0, #4] + bx lr + ; .align 2, 0 + thumb_func_end ov95_0224A848 + + thumb_func_start ov95_0224A850 +ov95_0224A850: ; 0x0224A850 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _0224A862 + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #4] +_0224A862: + pop {r4, pc} + thumb_func_end ov95_0224A850 + + thumb_func_start ov95_0224A864 +ov95_0224A864: ; 0x0224A864 + push {r3, r4, lr} + sub sp, #4 + add r4, r1, #0 + str r0, [r4, #0] + ldr r1, [r0, #0x2c] + ldr r2, _0224A904 ; =0xFFFFD870 + str r1, [r4, #0xc] + ldr r0, [r0, #0x28] + ldr r1, _0224A908 ; =0x003D6C00 + str r0, [r4, #8] + mov r0, #0 + str r0, [r4, #0x10] + str r1, [r4, #0x14] + ldr r1, _0224A90C ; =0xFFE44000 + str r1, [r4, #0x18] + add r1, r4, #0 + add r1, #0x78 + strh r2, [r1] + add r1, r4, #0 + ldr r2, _0224A910 ; =0xFFFFF550 + add r1, #0x7a + strh r2, [r1] + ldr r1, _0224A914 ; =0xFFFEF2C6 + str r1, [r4, #0x3c] + ldr r1, _0224A918 ; =0x0000936D + str r1, [r4, #0x40] + str r0, [r4, #0x6c] + str r0, [r4, #0x70] + mov r1, #2 + str r0, [r4, #0x74] + lsl r1, r1, #0xc + strh r1, [r4, #0x34] + ldr r1, _0224A91C ; =0xFFFFE000 + strh r1, [r4, #0x36] + strh r0, [r4, #0x38] + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x34 + bl ov95_02247990 + mov r3, #2 + lsl r3, r3, #8 + mov r1, #0x4a + mov r2, #0x63 + str r3, [r4, #0x5c] + lsl r0, r3, #2 + str r0, [r4, #0x44] + str r0, [r4, #0x48] + mov r0, #0 + str r0, [r4, #0x68] + mov r0, #0xc + str r0, [sp] + add r0, r4, #0 + lsl r1, r1, #0xa + lsl r2, r2, #0xa + lsl r3, r3, #3 + bl ov95_0224A934 + add r0, r4, #0 + bl ov95_0224A978 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x34 + bl ov95_02247978 + ldr r0, _0224A920 ; =ov95_0224AA70 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r4, #4] + add sp, #4 + pop {r3, r4, pc} + nop +_0224A904: .word 0xFFFFD870 +_0224A908: .word 0x003D6C00 +_0224A90C: .word 0xFFE44000 +_0224A910: .word 0xFFFFF550 +_0224A914: .word 0xFFFEF2C6 +_0224A918: .word 0x0000936D +_0224A91C: .word 0xFFFFE000 +_0224A920: .word ov95_0224AA70 + thumb_func_end ov95_0224A864 + + thumb_func_start ov95_0224A924 +ov95_0224A924: ; 0x0224A924 + ldr r0, [r0, #4] + cmp r0, #0 + bne _0224A92E + mov r0, #1 + bx lr +_0224A92E: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov95_0224A924 + + thumb_func_start ov95_0224A934 +ov95_0224A934: ; 0x0224A934 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + ldr r0, [sp, #0x18] + add r4, r1, #0 + add r6, r2, #0 + add r7, r3, #0 + str r0, [sp] + cmp r0, #0 + beq _0224A974 + ldr r0, [r5, #0x44] + ldr r1, [sp] + sub r0, r4, r0 + bl sub_020E1F6C + str r0, [r5, #0x4c] + ldr r0, [r5, #0x48] + ldr r1, [sp] + sub r0, r6, r0 + bl sub_020E1F6C + str r0, [r5, #0x50] + ldr r0, [r5, #0x5c] + ldr r1, [sp] + sub r0, r7, r0 + bl sub_020E1F6C + str r0, [r5, #0x60] + str r4, [r5, #0x54] + str r6, [r5, #0x58] + ldr r0, [sp, #0x18] + str r7, [r5, #0x64] + str r0, [r5, #0x68] +_0224A974: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 + thumb_func_end ov95_0224A934 + + thumb_func_start ov95_0224A978 +ov95_0224A978: ; 0x0224A978 + push {r4, r5, r6, lr} + add r5, r0, #0 + ldr r0, _0224AA6C ; =0x0224C2C0 + ldr r0, [r0, #0] + cmp r0, #0 + beq _0224AA5A + add r0, r5, #0 + add r0, #0x78 + ldrh r0, [r0] + mov r1, #0xb6 + bl sub_020E1F6C + add r4, r0, #0 + mov r0, #0x5a + lsl r0, r0, #2 + cmp r4, r0 + blt _0224A99C + sub r4, r4, r0 +_0224A99C: + mov r0, #0x78 + ldrsh r1, [r5, r0] + mov r0, #0x7a + ldrsh r0, [r5, r0] + sub r1, r1, r0 + add r0, r5, #0 + add r0, #0x78 + strh r1, [r0] + ldr r0, [r5, #0x68] + cmp r0, #0 + beq _0224A9E4 + sub r0, r0, #1 + str r0, [r5, #0x68] + beq _0224A9D0 + ldr r1, [r5, #0x44] + ldr r0, [r5, #0x4c] + add r0, r1, r0 + str r0, [r5, #0x44] + ldr r1, [r5, #0x48] + ldr r0, [r5, #0x50] + add r0, r1, r0 + str r0, [r5, #0x48] + ldr r1, [r5, #0x5c] + ldr r0, [r5, #0x60] + add r0, r1, r0 + b _0224A9DA +_0224A9D0: + ldr r0, [r5, #0x54] + str r0, [r5, #0x44] + ldr r0, [r5, #0x58] + str r0, [r5, #0x48] + ldr r0, [r5, #0x64] +_0224A9DA: + str r0, [r5, #0x5c] + ldr r0, [r5, #0xc] + ldr r1, [r5, #0x5c] + bl ov95_022479D4 +_0224A9E4: + lsl r0, r4, #0x10 + ldr r6, [r5, #0x44] + lsr r0, r0, #0x10 + bl sub_0201D1D4 + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r5, #0x1c] + lsl r0, r4, #0x10 + ldr r6, [r5, #0x48] + lsr r0, r0, #0x10 + bl sub_0201D15C + asr r1, r0, #0x1f + asr r3, r6, #0x1f + add r2, r6, #0 + bl sub_020E1F1C + mov r2, #2 + mov r3, #0 + lsl r2, r2, #0xa + add r2, r0, r2 + adc r1, r3 + lsl r0, r1, #0x14 + lsr r1, r2, #0xc + orr r1, r0 + str r1, [r5, #0x20] + add r1, r5, #0 + str r3, [r5, #0x24] + mov r0, #0x34 + ldrsh r2, [r5, r0] + mov r0, #3 + lsl r0, r0, #8 + sub r0, r2, r0 + strh r0, [r5, #0x34] + ldr r0, [r5, #0xc] + add r1, #0x34 + bl ov95_02247990 + add r0, r5, #0 + add r1, r5, #0 + add r5, #0x28 + add r0, #0x1c + add r1, #0x10 + add r2, r5, #0 + bl sub_020BD17C + pop {r4, r5, r6, pc} +_0224AA5A: + add r2, r5, #0 + add r2, #0x10 + ldmia r2!, {r0, r1} + add r5, #0x28 + stmia r5!, {r0, r1} + ldr r0, [r2, #0] + str r0, [r5, #0] + pop {r4, r5, r6, pc} + nop +_0224AA6C: .word 0x0224C2C0 + thumb_func_end ov95_0224A978 + + thumb_func_start ov95_0224AA70 +ov95_0224AA70: ; 0x0224AA70 + push {r4, lr} + add r4, r1, #0 + ldr r1, [r4, #0x74] + cmp r1, #0x46 + bge _0224AA7E + add r1, r1, #1 + str r1, [r4, #0x74] +_0224AA7E: + ldr r1, [r4, #0x6c] + cmp r1, #3 + bhi _0224AB44 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224AA90: ; jump table + .short _0224AA98 - _0224AA90 - 2 ; case 0 + .short _0224AABE - _0224AA90 - 2 ; case 1 + .short _0224AAF8 - _0224AA90 - 2 ; case 2 + .short _0224AB32 - _0224AA90 - 2 ; case 3 +_0224AA98: + add r0, r4, #0 + bl ov95_0224A978 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + ldr r0, [r4, #0x74] + add r0, r0, #1 + str r0, [r4, #0x74] + cmp r0, #0xc + blt _0224AB44 + mov r0, #0 + str r0, [r4, #0x74] + ldr r0, [r4, #0x6c] + add r0, r0, #1 + str r0, [r4, #0x6c] + pop {r4, pc} +_0224AABE: + ldr r0, [r4, #0xc] + bl ov95_022479DC + cmp r0, #0 + bne _0224AAD6 + ldr r0, [r4, #0] + bl ov95_0224AB48 + ldr r0, [r4, #0x6c] + add r0, r0, #1 + str r0, [r4, #0x6c] + pop {r4, pc} +_0224AAD6: + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x3c] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x40] + add r0, r1, r0 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_0224A978 + ldr r0, [r4, #0xc] + add r4, #0x28 + add r1, r4, #0 + bl ov95_02247968 + pop {r4, pc} +_0224AAF8: + ldr r1, [r4, #0x14] + ldr r0, [r4, #0x3c] + add r0, r1, r0 + str r0, [r4, #0x14] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x40] + add r0, r1, r0 + str r0, [r4, #0x18] + add r0, r4, #0 + bl ov95_0224A978 + add r1, r4, #0 + ldr r0, [r4, #0xc] + add r1, #0x28 + bl ov95_02247968 + ldr r0, [r4, #0x74] + cmp r0, #0x46 + blt _0224AB44 + ldr r0, [r4, #0xc] + mov r1, #0 + bl ov95_022479A8 + mov r0, #0 + str r0, [r4, #0x70] + ldr r0, [r4, #0x6c] + add r0, r0, #1 + str r0, [r4, #0x6c] + pop {r4, pc} +_0224AB32: + ldr r1, [r4, #0x70] + add r1, r1, #1 + str r1, [r4, #0x70] + cmp r1, #8 + ble _0224AB44 + mov r1, #0 + str r1, [r4, #4] + bl sub_0200DA58 +_0224AB44: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224AA70 + + thumb_func_start ov95_0224AB48 +ov95_0224AB48: ; 0x0224AB48 + mov r1, #1 + str r1, [r0, #0xc] + bx lr + ; .align 2, 0 + thumb_func_end ov95_0224AB48 + + thumb_func_start ov95_0224AB50 +ov95_0224AB50: ; 0x0224AB50 + push {r4, lr} + sub sp, #8 + add r4, r0, #0 + ldr r0, [r4, #0x28] + cmp r0, #0 + beq _0224AB6E + bl sub_020BFAB8 + ldr r0, [r4, #0x28] + bl ov95_02247770 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_0224AB6E: + ldr r0, [r4, #0xc] + cmp r0, #0 + beq _0224ABB0 + ldr r1, _0224ABB4 ; =0x0000EEB0 + add r0, sp, #0 + strh r1, [r0] + mov r1, #0 + strh r1, [r0, #2] + strh r1, [r0, #4] + mov r1, #3 + add r3, r1, #0 + ldr r0, [r4, #0x24] + add r2, r1, #0 + add r3, #0xfd + bl sub_02019184 + ldr r0, [r4, #0x24] + mov r1, #7 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #0x28] + add r1, sp, #0 + bl ov95_02247AC0 + ldr r2, _0224ABB8 ; =0x04000304 + ldr r0, _0224ABBC ; =0xFFFF7FFF + ldrh r1, [r2] + and r0, r1 + strh r0, [r2] + mov r0, #0 + str r0, [r4, #0xc] +_0224ABB0: + add sp, #8 + pop {r4, pc} + ; .align 2, 0 +_0224ABB4: .word 0x0000EEB0 +_0224ABB8: .word 0x04000304 +_0224ABBC: .word 0xFFFF7FFF + thumb_func_end ov95_0224AB50 + + .rodata + + + .global Unk_ov95_0224C11C +Unk_ov95_0224C11C: ; 0x0224C11C + .incbin "incbin/overlay95_rodata.bin", 0x2A8, 0x2B0 - 0x2A8 + + .global Unk_ov95_0224C124 +Unk_ov95_0224C124: ; 0x0224C124 + .incbin "incbin/overlay95_rodata.bin", 0x2B0, 0x2C0 - 0x2B0 + + .global Unk_ov95_0224C134 +Unk_ov95_0224C134: ; 0x0224C134 + .incbin "incbin/overlay95_rodata.bin", 0x2C0, 0x2D0 - 0x2C0 + + .global Unk_ov95_0224C144 +Unk_ov95_0224C144: ; 0x0224C144 + .incbin "incbin/overlay95_rodata.bin", 0x2D0, 0x2EC - 0x2D0 + + .global Unk_ov95_0224C160 +Unk_ov95_0224C160: ; 0x0224C160 + .incbin "incbin/overlay95_rodata.bin", 0x2EC, 0x28 + + + .data + + + .global Unk_ov95_0224C2C0 +Unk_ov95_0224C2C0: ; 0x0224C2C0 + .incbin "incbin/overlay95_data.bin", 0x0, 0x4 + diff --git a/asm/ov95_0224ABC0.s b/asm/ov95_0224ABC0.s new file mode 100644 index 000000000..050cdc976 --- /dev/null +++ b/asm/ov95_0224ABC0.s @@ -0,0 +1,1062 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_0224ABC0 +ov95_0224ABC0: ; 0x0224ABC0 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0x3c + bl sub_02018144 + add r4, r0, #0 + beq _0224ABEE + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + str r0, [r4, #0xc] + mov r0, #0 + str r0, [r4, #0x20] + str r0, [r4, #0x10] + str r0, [r4, #0x14] + str r0, [r4, #0x18] + str r0, [r4, #0x30] + str r0, [r4, #0x34] + str r0, [r4, #0x38] +_0224ABEE: + add r0, r4, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224ABC0 + + thumb_func_start ov95_0224ABF4 +ov95_0224ABF4: ; 0x0224ABF4 + push {r4, lr} + add r4, r0, #0 + beq _0224AC28 + bl ov95_0224B050 + add r0, r4, #0 + bl ov95_0224B194 + ldr r0, [r4, #0x30] + cmp r0, #0 + beq _0224AC0E + bl ov95_0224B308 +_0224AC0E: + ldr r0, [r4, #0x34] + cmp r0, #0 + beq _0224AC18 + bl ov95_0224B258 +_0224AC18: + ldr r0, [r4, #0x38] + cmp r0, #0 + beq _0224AC22 + bl ov95_0224B3BC +_0224AC22: + add r0, r4, #0 + bl sub_020181C4 +_0224AC28: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224ABF4 + + thumb_func_start ov95_0224AC2C +ov95_0224AC2C: ; 0x0224AC2C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #3 + bhs _0224AC5A + lsl r3, r2, #2 + ldr r2, _0224AC60 ; =0x0224C190 + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _0224AC50 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_0224AC50: + add r0, r5, #0 + bl ov95_0224AC64 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224AC5A: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_0224AC60: .word 0x0224C190 + thumb_func_end ov95_0224AC2C + + thumb_func_start ov95_0224AC64 +ov95_0224AC64: ; 0x0224AC64 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224AC96 + mov r0, #0x2a + ldrsh r1, [r4, r0] + mov r0, #1 + lsl r0, r0, #0xc + add r0, r1, r0 + strh r0, [r4, #0x2a] + add r1, r4, #0 + ldr r0, [r4, #0x24] + add r1, #0x28 + bl ov95_02247990 + bl sub_020BFAB8 + ldr r0, [r4, #0x20] + bl ov95_02247770 + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC +_0224AC96: + pop {r4, pc} + thumb_func_end ov95_0224AC64 + + thumb_func_start ov95_0224AC98 +ov95_0224AC98: ; 0x0224AC98 + push {r3, r4, lr} + sub sp, #0xc + add r4, r0, #0 + bl ov95_0224AE1C + add r0, r4, #0 + bl ov95_0224B084 + mov r0, #8 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + ldr r3, _0224ACC4 ; =0x00007FFF + mov r0, #0 + add r2, r1, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0xc + pop {r3, r4, pc} + ; .align 2, 0 +_0224ACC4: .word 0x00007FFF + thumb_func_end ov95_0224AC98 + + thumb_func_start ov95_0224ACC8 +ov95_0224ACC8: ; 0x0224ACC8 + push {r3, r4, r5, lr} + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #6 + bhi _0224AD92 + add r2, r1, r1 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0224ACE0: ; jump table + .short _0224ACEE - _0224ACE0 - 2 ; case 0 + .short _0224AD0C - _0224ACE0 - 2 ; case 1 + .short _0224AD26 - _0224ACE0 - 2 ; case 2 + .short _0224AD38 - _0224ACE0 - 2 ; case 3 + .short _0224AD50 - _0224ACE0 - 2 ; case 4 + .short _0224AD74 - _0224ACE0 - 2 ; case 5 + .short _0224AD88 - _0224ACE0 - 2 ; case 6 +_0224ACEE: + bl sub_0200F2AC + cmp r0, #0 + beq _0224AD92 + mov r0, #0 + str r0, [r4, #8] + add r0, r4, #0 + add r4, #0x30 + add r1, r4, #0 + bl ov95_0224B274 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224AD92 +_0224AD0C: + ldr r1, [r4, #8] + add r1, r1, #1 + str r1, [r4, #8] + cmp r1, #8 + ble _0224AD92 + add r4, #0x34 + add r1, r4, #0 + bl ov95_0224B1A8 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224AD92 +_0224AD26: + ldr r0, [r4, #0x34] + cmp r0, #0 + bne _0224AD92 + ldr r0, [r4, #0x30] + cmp r0, #0 + bne _0224AD92 + add r0, r1, #1 + str r0, [r5, #0] + b _0224AD92 +_0224AD38: + mov r1, #0 + add r0, #0x14 + mvn r1, r1 + bl ov95_02246F30 + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224AD92 +_0224AD50: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x1e + ble _0224AD92 + add r0, r4, #0 + add r0, #0x38 + str r0, [sp] + ldr r0, [r4, #0x24] + mov r1, #0x1f + mov r2, #0 + mov r3, #0x28 + bl ov95_0224B324 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224AD92 +_0224AD74: + ldr r0, [r4, #0x38] + cmp r0, #0 + bne _0224AD92 + ldr r0, [r4, #0x10] + bl ov95_02247004 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224AD92 +_0224AD88: + ldr r0, [r4, #0x14] + cmp r0, #0 + bne _0224AD92 + mov r0, #1 + pop {r3, r4, r5, pc} +_0224AD92: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224ACC8 + + thumb_func_start ov95_0224AD98 +ov95_0224AD98: ; 0x0224AD98 + push {r4, r5, lr} + sub sp, #0xc + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #0] + cmp r0, #0 + beq _0224ADB0 + cmp r0, #1 + beq _0224ADD8 + cmp r0, #2 + beq _0224AE02 + b _0224AE16 +_0224ADB0: + mov r0, #0x4a + lsl r0, r0, #2 + mov r3, #1 + str r0, [sp] + add r0, r5, #0 + str r3, [sp, #4] + add r0, #0x1c + str r0, [sp, #8] + ldr r0, [r5, #0xc] + lsl r1, r3, #0xc + lsl r2, r3, #0xa + bl ov95_022472C4 + str r0, [r5, #0x18] + mov r0, #0 + str r0, [r5, #8] + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224AE16 +_0224ADD8: + ldr r0, [r5, #8] + add r0, r0, #1 + str r0, [r5, #8] + cmp r0, #0xd + ble _0224AE16 + mov r0, #8 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0 + add r1, r0, #0 + add r2, r0, #0 + add r3, r0, #0 + bl sub_0200F174 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + b _0224AE16 +_0224AE02: + bl sub_0200F2AC + cmp r0, #0 + beq _0224AE16 + ldr r0, [r5, #0x1c] + cmp r0, #0 + beq _0224AE16 + add sp, #0xc + mov r0, #1 + pop {r4, r5, pc} +_0224AE16: + mov r0, #0 + add sp, #0xc + pop {r4, r5, pc} + thumb_func_end ov95_0224AD98 + + thumb_func_start ov95_0224AE1C +ov95_0224AE1C: ; 0x0224AE1C + push {r3, r4, r5, lr} + sub sp, #0x10 + add r4, r0, #0 + ldr r0, _0224B034 ; =0x0224C1F4 + bl sub_0201FE94 + ldr r2, _0224B038 ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + ldr r0, _0224B03C ; =0x0224C19C + bl sub_02018368 + ldr r0, [r4, #0xc] + ldr r2, _0224B040 ; =0x0224C1BC + mov r1, #2 + mov r3, #1 + bl sub_020183C4 + ldr r0, [r4, #0xc] + ldr r2, _0224B040 ; =0x0224C1BC + mov r1, #6 + mov r3, #1 + bl sub_020183C4 + bl sub_020C3D98 + add r5, r0, #0 + ldr r0, [r4, #0xc] + ldr r2, _0224B044 ; =0x0224C1D8 + mov r1, #3 + mov r3, #2 + bl sub_020183C4 + ldr r0, [r4, #0xc] + ldr r2, _0224B044 ; =0x0224C1D8 + mov r1, #7 + mov r3, #2 + bl sub_020183C4 + add r0, r5, #0 + bl sub_020C3DAC + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + mov r1, #2 + ldr r2, [r4, #0xc] + mov r0, #0x5d + add r3, r1, #0 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #2 + mov r3, #6 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r3, #2 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r1, #1 + str r1, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r3, #6 + bl sub_02006E60 + ldr r0, [r4, #0] + bl ov95_02247644 + add r5, r0, #0 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #3 + add r3, r2, #0 + bl sub_02006E84 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #3 + mov r2, #4 + mov r3, #0 + bl sub_02006E84 + ldr r0, _0224B048 ; =0x0224C188 + lsl r1, r5, #1 + ldrh r5, [r0, r1] + mov r0, #0x20 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + mov r1, #3 + mov r2, #0 + add r3, r5, #0 + bl sub_02006E9C + mov r0, #0x20 + str r0, [sp] + mov r0, #0x40 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #0x5d + mov r1, #3 + mov r2, #4 + add r3, r5, #0 + bl sub_02006E9C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #5 + mov r3, #3 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #5 + mov r3, #7 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #4 + mov r3, #3 + bl sub_02006E60 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0xc] + mov r0, #0x5d + mov r1, #4 + mov r3, #7 + bl sub_02006E60 + mov r0, #0x3a + mov r1, #0x60 + bl sub_02018144 + add r5, r0, #0 + beq _0224AFF2 + mov r0, #0 + add r1, r5, #0 + mov r2, #0x60 + bl sub_020C4B4C + add r0, r5, #0 + mov r1, #0x60 + bl sub_020C2C54 + bl sub_020C096C + bl sub_020C0BBC + mov r1, #6 + add r0, r5, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0A0C + mov r1, #6 + add r0, r5, #0 + lsl r1, r1, #0xc + mov r2, #0x60 + bl sub_020C0BD4 + bl sub_020C0A7C + bl sub_020C0C38 + add r0, r5, #0 + bl sub_020181C4 +_0224AFF2: + ldr r0, [r4, #0xc] + ldr r3, _0224B04C ; =0xFFFFFE80 + mov r1, #2 + mov r2, #3 + bl sub_02019184 + mov r2, #3 + add r3, r2, #0 + ldr r0, [r4, #0xc] + mov r1, #6 + sub r3, #0xc3 + bl sub_02019184 + mov r1, #3 + ldr r0, [r4, #0xc] + add r2, r1, #0 + mov r3, #0x43 + bl sub_02019184 + mov r0, #7 + mov r1, #0 + bl sub_02019120 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + add sp, #0x10 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224B034: .word 0x0224C1F4 +_0224B038: .word 0x04000304 +_0224B03C: .word 0x0224C19C +_0224B040: .word 0x0224C1BC +_0224B044: .word 0x0224C1D8 +_0224B048: .word 0x0224C188 +_0224B04C: .word 0xFFFFFE80 + thumb_func_end ov95_0224AE1C + + thumb_func_start ov95_0224B050 +ov95_0224B050: ; 0x0224B050 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0224B060 + ldr r0, [r4, #0x10] + bl ov95_02247018 +_0224B060: + ldr r0, [r4, #0xc] + mov r1, #2 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #6 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #3 + bl sub_02019044 + ldr r0, [r4, #0xc] + mov r1, #7 + bl sub_02019044 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B050 + + thumb_func_start ov95_0224B084 +ov95_0224B084: ; 0x0224B084 + push {r4, lr} + sub sp, #0x10 + add r4, r0, #0 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _0224B168 ; =0x04000060 + ldr r1, _0224B16C ; =0xFFFFCFFD + ldrh r2, [r0] + and r2, r1 + strh r2, [r0] + ldrh r3, [r0] + add r2, r1, #2 + and r3, r2 + mov r2, #0x10 + orr r2, r3 + strh r2, [r0] + ldrh r3, [r0] + ldr r2, _0224B170 ; =0x0000CFFB + and r2, r3 + strh r2, [r0] + add r2, r1, #2 + ldrh r3, [r0] + add r1, r1, #2 + and r3, r2 + mov r2, #8 + orr r2, r3 + strh r2, [r0] + ldrh r2, [r0] + and r2, r1 + mov r1, #0x20 + orr r1, r2 + strh r1, [r0] + ldr r0, _0224B174 ; =0x0224C1AC + bl sub_020BFD2C + mov r1, #0 + ldr r0, _0224B178 ; =0x000043FF + ldr r2, _0224B17C ; =0x00007FFF + mov r3, #0x3f + str r1, [sp] + bl sub_020BFD58 + ldr r1, _0224B180 ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _0224B184 ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r1, _0224B188 ; =0x04000008 + mov r0, #3 + ldrh r2, [r1] + bic r2, r0 + strh r2, [r1] + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + add r3, r1, #0 + bl ov95_022476F0 + str r0, [r4, #0x20] + mov r1, #0 + mov r0, #0x23 + str r1, [sp] + lsl r0, r0, #0xe + str r0, [sp, #4] + str r1, [sp, #8] + mov r0, #1 + str r0, [sp, #0xc] + ldr r0, [r4, #0x20] + mov r2, #0x5d + mov r3, #0x1b + bl ov95_022478B4 + str r0, [r4, #0x24] + ldr r0, _0224B18C ; =0x0224C370 + mov r1, #0 + strh r1, [r0] + strh r1, [r0, #2] + strh r1, [r0, #4] + ldr r0, [r4, #0x20] + ldr r1, _0224B190 ; =0x0224C370 + bl ov95_02247AB0 + ldr r0, [r4, #0x20] + mov r1, #1 + bl ov95_02247AD0 + mov r1, #2 + ldr r0, [r4, #0x24] + lsl r1, r1, #0xc + bl ov95_022479D4 + ldr r0, [r4, #0x24] + add r4, #0x28 + add r1, r4, #0 + bl ov95_02247978 + add sp, #0x10 + pop {r4, pc} + nop +_0224B168: .word 0x04000060 +_0224B16C: .word 0xFFFFCFFD +_0224B170: .word 0x0000CFFB +_0224B174: .word 0x0224C1AC +_0224B178: .word 0x000043FF +_0224B17C: .word 0x00007FFF +_0224B180: .word 0x04000540 +_0224B184: .word 0xBFFF0000 +_0224B188: .word 0x04000008 +_0224B18C: .word 0x0224C370 +_0224B190: .word 0x0224C370 + thumb_func_end ov95_0224B084 + + thumb_func_start ov95_0224B194 +ov95_0224B194: ; 0x0224B194 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224B1A6 + bl ov95_0224773C + mov r0, #0 + str r0, [r4, #0x20] +_0224B1A6: + pop {r4, pc} + thumb_func_end ov95_0224B194 + + thumb_func_start ov95_0224B1A8 +ov95_0224B1A8: ; 0x0224B1A8 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #0x3a + mov r1, #0x24 + bl sub_02018144 + add r4, r0, #0 + beq _0224B1E8 + str r6, [r4, #0] + ldr r0, [r6, #0xc] + add r1, r4, #0 + str r0, [r4, #4] + ldr r0, _0224B1EC ; =0xFFE80000 + mov r2, #0 + str r0, [r4, #0xc] + asr r0, r0, #1 + str r0, [r4, #0x10] + ldr r0, _0224B1F0 ; =0x00009999 + str r0, [r4, #0x14] + mov r0, #0x28 + str r0, [r4, #8] + ldr r0, _0224B1F4 ; =ov95_0224B1F8 + str r5, [r4, #0x1c] + bl sub_0200DA04 + str r0, [r5, #0] + cmp r0, #0 + bne _0224B1E8 + add r0, r4, #0 + bl sub_020181C4 +_0224B1E8: + pop {r4, r5, r6, pc} + nop +_0224B1EC: .word 0xFFE80000 +_0224B1F0: .word 0x00009999 +_0224B1F4: .word ov95_0224B1F8 + thumb_func_end ov95_0224B1A8 + + thumb_func_start ov95_0224B1F8 +ov95_0224B1F8: ; 0x0224B1F8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #8] + cmp r0, #0 + beq _0224B238 + ldr r1, [r4, #0xc] + ldr r0, [r4, #0x14] + mov r2, #3 + add r0, r1, r0 + str r0, [r4, #0xc] + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x14] + add r0, r1, r0 + str r0, [r4, #0x10] + ldr r3, [r4, #0xc] + ldr r0, [r4, #4] + mov r1, #2 + asr r3, r3, #0xc + bl sub_02019184 + ldr r3, [r4, #0x10] + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #3 + asr r3, r3, #0xc + bl sub_02019184 + ldr r0, [r4, #8] + sub r0, r0, #1 + str r0, [r4, #8] + pop {r3, r4, r5, pc} +_0224B238: + ldr r0, [r4, #4] + mov r1, #2 + mov r2, #3 + mov r3, #0 + bl sub_02019184 + ldr r0, [r4, #4] + mov r1, #6 + mov r2, #3 + mov r3, #0xc0 + bl sub_02019184 + add r0, r5, #0 + bl ov95_0224B258 + pop {r3, r4, r5, pc} + thumb_func_end ov95_0224B1F8 + + thumb_func_start ov95_0224B258 +ov95_0224B258: ; 0x0224B258 + push {r4, lr} + add r4, r0, #0 + beq _0224B272 + bl sub_0201CED0 + ldr r1, [r0, #0x1c] + mov r2, #0 + str r2, [r1, #0] + bl ov95_022476C8 + add r0, r4, #0 + bl sub_0200DA58 +_0224B272: + pop {r4, pc} + thumb_func_end ov95_0224B258 + + thumb_func_start ov95_0224B274 +ov95_0224B274: ; 0x0224B274 + push {r4, r5, r6, lr} + add r6, r0, #0 + add r5, r1, #0 + mov r0, #0x3a + mov r1, #0x1c + bl sub_02018144 + add r4, r0, #0 + beq _0224B2C0 + str r5, [r4, #0] + ldr r0, [r6, #0x24] + add r1, r4, #0 + str r0, [r4, #8] + add r1, #0xc + bl ov95_02247958 + mov r0, #0x32 + ldr r1, [r4, #0x10] + lsl r0, r0, #0xc + sub r1, r0, r1 + asr r0, r1, #3 + lsr r0, r0, #0x1c + add r0, r1, r0 + asr r0, r0, #4 + str r0, [r4, #0x18] + mov r0, #0x10 + str r0, [r4, #4] + ldr r0, _0224B2C4 ; =ov95_0224B2C8 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r5, #0] + cmp r0, #0 + bne _0224B2C0 + add r0, r4, #0 + bl sub_020181C4 +_0224B2C0: + pop {r4, r5, r6, pc} + nop +_0224B2C4: .word ov95_0224B2C8 + thumb_func_end ov95_0224B274 + + thumb_func_start ov95_0224B2C8 +ov95_0224B2C8: ; 0x0224B2C8 + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + ldr r0, [r4, #4] + cmp r0, #0 + beq _0224B2EE + ldr r1, [r4, #0x10] + ldr r0, [r4, #0x18] + add r0, r1, r0 + str r0, [r4, #0x10] + add r1, r4, #0 + ldr r0, [r4, #8] + add r1, #0xc + bl ov95_02247968 + ldr r0, [r4, #4] + sub r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0224B2EE: + mov r0, #0x32 + lsl r0, r0, #0xc + str r0, [r4, #0x10] + ldr r0, [r4, #8] + add r4, #0xc + add r1, r4, #0 + bl ov95_02247968 + add r0, r5, #0 + bl ov95_0224B308 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B2C8 + + thumb_func_start ov95_0224B308 +ov95_0224B308: ; 0x0224B308 + push {r4, lr} + add r4, r0, #0 + beq _0224B322 + bl sub_0201CED0 + ldr r1, [r0, #0] + mov r2, #0 + str r2, [r1, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224B322: + pop {r4, pc} + thumb_func_end ov95_0224B308 + + thumb_func_start ov95_0224B324 +ov95_0224B324: ; 0x0224B324 + push {r3, r4, r5, r6, r7, lr} + sub sp, #8 + str r0, [sp] + add r6, r1, #0 + mov r0, #0x3a + mov r1, #0x18 + str r2, [sp, #4] + add r7, r3, #0 + ldr r5, [sp, #0x20] + bl sub_02018144 + add r4, r0, #0 + beq _0224B37C + str r5, [r4, #0] + lsl r0, r6, #0xc + str r0, [r4, #4] + ldr r0, [sp, #4] + lsl r1, r0, #0xc + str r1, [r4, #0xc] + ldr r0, [r4, #4] + sub r0, r1, r0 + add r1, r7, #0 + bl sub_020E1F6C + str r0, [r4, #8] + ldr r0, [sp] + str r7, [r4, #0x10] + add r1, r6, #0 + str r0, [r4, #0x14] + bl ov95_022479AC + ldr r0, _0224B384 ; =ov95_0224B388 + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r5, #0] + cmp r0, #0 + bne _0224B380 + add r0, r4, #0 + bl sub_020181C4 + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} +_0224B37C: + mov r0, #0 + str r0, [r5, #0] +_0224B380: + add sp, #8 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B384: .word ov95_0224B388 + thumb_func_end ov95_0224B324 + + thumb_func_start ov95_0224B388 +ov95_0224B388: ; 0x0224B388 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0x10] + sub r0, r0, #1 + str r0, [r1, #0x10] + cmp r0, #0 + ble _0224B3A8 + ldr r2, [r1, #4] + ldr r0, [r1, #8] + add r2, r2, r0 + str r2, [r1, #4] + ldr r0, [r1, #0x14] + asr r1, r2, #0xc + bl ov95_022479AC + pop {r4, pc} +_0224B3A8: + ldr r0, [r1, #0x14] + ldr r1, [r1, #0xc] + asr r1, r1, #0xc + bl ov95_022479AC + add r0, r4, #0 + bl ov95_0224B3BC + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B388 + + thumb_func_start ov95_0224B3BC +ov95_0224B3BC: ; 0x0224B3BC + push {r4, lr} + add r4, r0, #0 + beq _0224B3D6 + bl sub_0201CED0 + ldr r1, [r0, #0] + mov r2, #0 + str r2, [r1, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224B3D6: + pop {r4, pc} + thumb_func_end ov95_0224B3BC + + .rodata + + + .global Unk_ov95_0224C188 +Unk_ov95_0224C188: ; 0x0224C188 + .incbin "incbin/overlay95_rodata.bin", 0x314, 0x31C - 0x314 + + .global Unk_ov95_0224C190 +Unk_ov95_0224C190: ; 0x0224C190 + .incbin "incbin/overlay95_rodata.bin", 0x31C, 0x328 - 0x31C + + .global Unk_ov95_0224C19C +Unk_ov95_0224C19C: ; 0x0224C19C + .incbin "incbin/overlay95_rodata.bin", 0x328, 0x338 - 0x328 + + .global Unk_ov95_0224C1AC +Unk_ov95_0224C1AC: ; 0x0224C1AC + .incbin "incbin/overlay95_rodata.bin", 0x338, 0x348 - 0x338 + + .global Unk_ov95_0224C1BC +Unk_ov95_0224C1BC: ; 0x0224C1BC + .incbin "incbin/overlay95_rodata.bin", 0x348, 0x364 - 0x348 + + .global Unk_ov95_0224C1D8 +Unk_ov95_0224C1D8: ; 0x0224C1D8 + .incbin "incbin/overlay95_rodata.bin", 0x364, 0x380 - 0x364 + + .global Unk_ov95_0224C1F4 +Unk_ov95_0224C1F4: ; 0x0224C1F4 + .incbin "incbin/overlay95_rodata.bin", 0x380, 0x28 + + + .bss + + + .global Unk_ov95_0224C370 +Unk_ov95_0224C370: ; 0x0224C370 + .space 0x8 + diff --git a/asm/ov95_0224B3D8.s b/asm/ov95_0224B3D8.s new file mode 100644 index 000000000..541792874 --- /dev/null +++ b/asm/ov95_0224B3D8.s @@ -0,0 +1,1360 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov95_0224B3D8 +ov95_0224B3D8: ; 0x0224B3D8 + push {r3, r4, r5, lr} + add r5, r0, #0 + mov r0, #0x3a + mov r1, #0x88 + bl sub_02018144 + add r4, r0, #0 + beq _0224B434 + str r5, [r4, #0] + mov r0, #0 + str r0, [r4, #4] + add r0, r5, #0 + bl ov95_02247628 + str r0, [r4, #0x58] + mov r0, #0x3a + bl sub_0200762C + str r0, [r4, #0x10] + mov r0, #0 + str r0, [r4, #0x14] + mov r0, #0x4b + lsl r0, r0, #2 + mov r1, #0x3a + bl sub_02023790 + str r0, [r4, #0x6c] + mov r0, #0x4b + lsl r0, r0, #2 + mov r1, #0x3a + bl sub_02023790 + str r0, [r4, #0x70] + mov r1, #0 + add r0, r4, #0 + str r1, [r4, #0x7c] + add r0, #0x80 + str r1, [r0, #0] + str r1, [r4, #0x74] + mov r0, #0x93 + mov r1, #0x3a + bl sub_02006C24 + add r1, r4, #0 + add r1, #0x84 + str r0, [r1, #0] +_0224B434: + add r0, r4, #0 + pop {r3, r4, r5, pc} + thumb_func_end ov95_0224B3D8 + + thumb_func_start ov95_0224B438 +ov95_0224B438: ; 0x0224B438 + push {r4, lr} + add r4, r0, #0 + beq _0224B498 + bl ov95_0224BC10 + add r0, r4, #0 + bl ov95_0224BB8C + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + bl ov95_0224BCE8 + ldr r0, [r4, #0x6c] + bl sub_020237BC + ldr r0, [r4, #0x70] + bl sub_020237BC + ldr r0, [r4, #0x74] + cmp r0, #0 + beq _0224B468 + bl ov95_0224773C +_0224B468: + ldr r0, [r4, #0x58] + mov r1, #1 + bl sub_02019044 + add r0, r4, #0 + add r0, #0x5c + bl sub_0201A8FC + ldr r0, [r4, #0x14] + cmp r0, #0 + beq _0224B482 + bl sub_02007DC8 +_0224B482: + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + bl sub_02006CA8 + ldr r0, [r4, #0x10] + bl sub_02007B6C + add r0, r4, #0 + bl sub_020181C4 +_0224B498: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B438 + + thumb_func_start ov95_0224B49C +ov95_0224B49C: ; 0x0224B49C + push {r3, r4, r5, lr} + add r4, r1, #0 + ldr r2, [r4, #0] + add r5, r0, #0 + cmp r2, #4 + bhs _0224B4CA + lsl r3, r2, #2 + ldr r2, _0224B4D0 ; =0x0224C224 + add r1, r5, #4 + ldr r2, [r2, r3] + blx r2 + cmp r0, #0 + beq _0224B4C0 + ldr r0, [r4, #0] + add r0, r0, #1 + str r0, [r4, #0] + mov r0, #0 + str r0, [r5, #4] +_0224B4C0: + add r0, r5, #0 + bl ov95_0224B4D4 + mov r0, #0 + pop {r3, r4, r5, pc} +_0224B4CA: + mov r0, #1 + pop {r3, r4, r5, pc} + nop +_0224B4D0: .word 0x0224C224 + thumb_func_end ov95_0224B49C + + thumb_func_start ov95_0224B4D4 +ov95_0224B4D4: ; 0x0224B4D4 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl sub_020BFAB8 + mov r1, #0 + mov r0, #0x11 + add r2, r1, #0 + bl sub_020B275C + bl sub_020B2628 + bl sub_020A73C0 + ldr r0, [r4, #0x10] + bl sub_02008A94 + ldr r0, [r4, #0x10] + bl sub_02007768 + mov r2, #1 + str r2, [sp] + mov r0, #0x12 + add r1, sp, #0 + bl sub_020B275C + ldr r0, [r4, #0x74] + cmp r0, #0 + beq _0224B512 + bl ov95_02247770 +_0224B512: + mov r0, #0 + add r1, r0, #0 + bl sub_020241BC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B4D4 + + thumb_func_start ov95_0224B520 +ov95_0224B520: ; 0x0224B520 + push {r3, r4, lr} + sub sp, #0x1c + add r4, r0, #0 + ldr r0, _0224B6D0 ; =0x0224C27C + bl sub_0201FE94 + ldr r2, _0224B6D4 ; =0x04000304 + ldrh r1, [r2] + lsr r0, r2, #0xb + orr r0, r1 + strh r0, [r2] + ldr r0, _0224B6D8 ; =0x0224C234 + bl sub_02018368 + ldr r0, [r4, #0x58] + ldr r2, _0224B6DC ; =0x0224C244 + mov r1, #1 + mov r3, #0 + bl sub_020183C4 + ldr r0, [r4, #0x58] + ldr r2, _0224B6E0 ; =0x0224C260 + mov r1, #2 + mov r3, #0 + bl sub_020183C4 + mov r0, #1 + add r1, r0, #0 + bl sub_0201FF0C + ldr r2, _0224B6E4 ; =0x04000008 + mov r0, #3 + ldrh r3, [r2] + mov r1, #1 + bic r3, r0 + add r0, r3, #0 + orr r0, r1 + strh r0, [r2] + mov r2, #0 + str r2, [sp] + ldr r0, [r4, #0x58] + add r3, r1, #0 + bl sub_020196C0 + mov r2, #0 + str r2, [sp] + mov r0, #0x20 + str r0, [sp, #4] + str r0, [sp, #8] + str r2, [sp, #0xc] + ldr r0, [r4, #0x58] + mov r1, #1 + add r3, r2, #0 + bl sub_02019CB8 + ldr r0, [r4, #0] + bl ov95_02247674 + lsl r0, r0, #0x18 + lsr r0, r0, #0x18 + str r0, [sp] + mov r0, #0x3a + str r0, [sp, #4] + ldr r0, [r4, #0x58] + mov r1, #1 + mov r2, #0x6d + mov r3, #2 + bl sub_0200DD0C + mov r0, #0x13 + str r0, [sp] + mov r0, #0x1b + str r0, [sp, #4] + mov r0, #4 + add r1, r4, #0 + str r0, [sp, #8] + mov r2, #1 + str r2, [sp, #0xc] + str r2, [sp, #0x10] + ldr r0, [r4, #0x58] + add r1, #0x5c + mov r3, #2 + bl sub_0201A7E8 + add r0, r4, #0 + add r0, #0x5c + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0x20 + str r3, [sp] + mov r0, #0x3a + str r0, [sp, #4] + mov r0, #0xe + mov r1, #7 + mov r2, #0 + bl sub_02006E84 + ldr r0, [r4, #0x58] + mov r1, #1 + bl sub_02019448 + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x58] + mov r0, #0x5d + mov r1, #0x16 + mov r3, #2 + bl sub_02006E3C + mov r0, #0 + str r0, [sp] + str r0, [sp, #4] + mov r0, #1 + str r0, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + ldr r2, [r4, #0x58] + mov r0, #0x5d + mov r1, #0x15 + mov r3, #2 + bl sub_02006E60 + mov r0, #0x20 + str r0, [sp] + mov r0, #0x3a + mov r2, #0 + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0x17 + add r3, r2, #0 + bl sub_02006E84 + add r0, r4, #0 + bl ov95_0224B9C0 + mov r1, #0 + mov r0, #1 + add r2, r1, #0 + add r3, r1, #0 + bl ov95_022476F0 + str r0, [r4, #0x74] + add r0, r4, #0 + bl ov95_0224BA8C + mov r1, #6 + mov r2, #1 + str r0, [r4, #0x14] + bl sub_02007DEC + mov r1, #0 + mov r0, #0x13 + str r1, [sp] + lsl r0, r0, #0xc + str r0, [sp, #4] + mov r0, #0x1e + lsl r0, r0, #0xe + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r4, #0x74] + mov r2, #0x5d + mov r3, #0x1b + bl ov95_022478B4 + ldr r2, _0224B6E8 ; =0x0224C21C + str r0, [r4, #0x78] + ldrh r3, [r2] + add r0, sp, #0x14 + add r1, sp, #0x14 + strh r3, [r0] + ldrh r3, [r2, #2] + ldrh r2, [r2, #4] + strh r3, [r0, #2] + strh r2, [r0, #4] + ldr r0, [r4, #0x78] + bl ov95_02247990 + add r0, r4, #0 + bl ov95_0224BAE8 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + mov r0, #0 + str r0, [sp] + ldr r0, _0224B6EC ; =0x04000050 + mov r1, #1 + mov r2, #4 + mov r3, #0x10 + bl sub_020BF55C + mov r0, #0x10 + str r0, [sp] + mov r1, #1 + str r1, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + mov r3, #0 + bl sub_0200F174 + mov r0, #1 + add sp, #0x1c + pop {r3, r4, pc} + ; .align 2, 0 +_0224B6D0: .word 0x0224C27C +_0224B6D4: .word 0x04000304 +_0224B6D8: .word 0x0224C234 +_0224B6DC: .word 0x0224C244 +_0224B6E0: .word 0x0224C260 +_0224B6E4: .word 0x04000008 +_0224B6E8: .word 0x0224C21C +_0224B6EC: .word 0x04000050 + thumb_func_end ov95_0224B520 + + thumb_func_start ov95_0224B6F0 +ov95_0224B6F0: ; 0x0224B6F0 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r1, #0] + cmp r0, #0 + bne _0224B716 + bl sub_0200F2AC + cmp r0, #0 + beq _0224B716 + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02021D6C + ldr r0, [r4, #0x40] + mov r1, #1 + bl sub_02021CAC + mov r0, #1 + pop {r4, pc} +_0224B716: + mov r0, #0 + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B6F0 + + thumb_func_start ov95_0224B71C +ov95_0224B71C: ; 0x0224B71C + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #4 + bhi _0224B816 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224B736: ; jump table + .short _0224B740 - _0224B736 - 2 ; case 0 + .short _0224B74E - _0224B736 - 2 ; case 1 + .short _0224B77C - _0224B736 - 2 ; case 2 + .short _0224B7A4 - _0224B736 - 2 ; case 3 + .short _0224B806 - _0224B736 - 2 ; case 4 +_0224B740: + add r1, r4, #0 + add r1, #0x80 + bl ov95_0224BC6C + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] +_0224B74E: + add r0, r4, #0 + add r0, #0x80 + ldr r0, [r0, #0] + cmp r0, #0 + bne _0224B816 + ldr r0, [r4, #0x44] + mov r1, #2 + bl sub_02021D6C + ldr r0, [r4, #0x44] + mov r1, #1 + bl sub_02021CAC + ldr r0, [r4, #0x78] + mov r1, #0 + bl ov95_022479A8 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224B816 +_0224B77C: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0xa + ble _0224B816 + ldr r0, [r4, #0x14] + mov r1, #6 + mov r2, #0 + bl sub_02007DEC + add r0, r4, #0 + mov r1, #0x10 + mov r2, #0 + mov r3, #0xc + bl ov95_0224BBB0 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + b _0224B816 +_0224B7A4: + bl ov95_0224BC00 + cmp r0, #0 + beq _0224B816 + ldr r0, [r4, #0] + bl ov95_0224763C + mov r1, #0x4c + mov r2, #0 + bl sub_02074570 + cmp r0, #0 + bne _0224B7FA + ldr r0, [r4, #0] + bl ov95_02247660 + add r2, r0, #0 + add r0, r4, #0 + add r0, #0x84 + ldr r0, [r0, #0] + add r1, sp, #0 + mov r3, #1 + bl sub_02078A4C + ldr r0, [r4, #0] + bl ov95_02247660 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov95_02247668 + add r2, r0, #0 + add r1, sp, #0 + lsl r2, r2, #0x18 + ldrb r1, [r1] + add r0, r6, #0 + lsr r2, r2, #0x18 + bl sub_0200590C + ldr r0, [r4, #0x14] + mov r1, #1 + bl sub_02007B98 +_0224B7FA: + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224B816 +_0224B806: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0x1e + ble _0224B816 + add sp, #4 + mov r0, #1 + pop {r3, r4, r5, r6, pc} +_0224B816: + mov r0, #0 + add sp, #4 + pop {r3, r4, r5, r6, pc} + thumb_func_end ov95_0224B71C + + thumb_func_start ov95_0224B81C +ov95_0224B81C: ; 0x0224B81C + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + ldr r1, [r5, #0] + add r4, r0, #0 + cmp r1, #5 + bhi _0224B858 + add r1, r1, r1 + add r1, pc + ldrh r1, [r1, #6] + lsl r1, r1, #0x10 + asr r1, r1, #0x10 + add pc, r1 +_0224B836: ; jump table + .short _0224B842 - _0224B836 - 2 ; case 0 + .short _0224B84E - _0224B836 - 2 ; case 1 + .short _0224B8CC - _0224B836 - 2 ; case 2 + .short _0224B92E - _0224B836 - 2 ; case 3 + .short _0224B94E - _0224B836 - 2 ; case 4 + .short _0224B978 - _0224B836 - 2 ; case 5 +_0224B842: + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224B986 +_0224B84E: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0xa + bgt _0224B85A +_0224B858: + b _0224B986 +_0224B85A: + ldr r0, [r4, #0] + bl ov95_02247630 + str r0, [sp, #0xc] + ldr r0, [r4, #0] + bl ov95_0224762C + add r7, r0, #0 + ldr r0, [r4, #0] + bl ov95_02247680 + cmp r0, #1 + bne _0224B87A + mov r1, #2 + add r6, r1, #0 + b _0224B87E +_0224B87A: + mov r1, #5 + mov r6, #3 +_0224B87E: + ldr r0, [sp, #0xc] + ldr r2, [r4, #0x6c] + bl sub_0200B1B8 + ldr r1, [r4, #0x70] + ldr r2, [r4, #0x6c] + add r0, r7, #0 + bl sub_0200C388 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x70] + add r0, #0x5c + mov r1, #1 + bl sub_0201D738 + add r0, r4, #0 + add r0, #0x5c + mov r1, #0x6d + mov r2, #2 + bl sub_0200E010 + add r0, r4, #0 + add r0, #0x5c + bl sub_0201A954 + ldr r0, _0224B98C ; =0x00000484 + bl sub_02006150 + mov r0, #0 + str r0, [r4, #8] + mov r0, #1 + str r0, [r4, #0xc] + str r6, [r5, #0] + b _0224B986 +_0224B8CC: + mov r1, #0x3c + bl ov95_0224B990 + cmp r0, #0 + beq _0224B986 + ldr r0, [r4, #0] + bl ov95_02247630 + add r6, r0, #0 + ldr r0, [r4, #0] + bl ov95_0224762C + add r7, r0, #0 + ldr r2, [r4, #0x6c] + add r0, r6, #0 + mov r1, #3 + bl sub_0200B1B8 + ldr r1, [r4, #0x70] + ldr r2, [r4, #0x6c] + add r0, r7, #0 + bl sub_0200C388 + add r0, r4, #0 + add r0, #0x5c + mov r1, #0xf + bl sub_0201ADA4 + mov r3, #0 + str r3, [sp] + mov r0, #0xff + str r0, [sp, #4] + str r3, [sp, #8] + add r0, r4, #0 + ldr r2, [r4, #0x70] + add r0, #0x5c + mov r1, #1 + bl sub_0201D738 + add r0, r4, #0 + add r0, #0x5c + bl sub_0201ACCC + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224B986 +_0224B92E: + mov r1, #0x3c + bl ov95_0224B990 + cmp r0, #0 + beq _0224B986 + add r0, r4, #0 + add r0, #0x5c + mov r1, #0 + bl sub_0200E084 + mov r0, #0 + str r0, [r4, #8] + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224B986 +_0224B94E: + ldr r0, [r4, #8] + add r0, r0, #1 + str r0, [r4, #8] + cmp r0, #0xa + ble _0224B986 + mov r0, #0x10 + str r0, [sp] + mov r1, #0 + mov r0, #1 + str r0, [sp, #4] + mov r0, #0x3a + str r0, [sp, #8] + mov r0, #3 + add r2, r1, #0 + add r3, r1, #0 + bl sub_0200F174 + ldr r0, [r5, #0] + add r0, r0, #1 + str r0, [r5, #0] + b _0224B986 +_0224B978: + bl sub_0200F2AC + cmp r0, #0 + beq _0224B986 + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0224B986: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224B98C: .word 0x00000484 + thumb_func_end ov95_0224B81C + + thumb_func_start ov95_0224B990 +ov95_0224B990: ; 0x0224B990 + push {r3, r4, r5, lr} + add r5, r0, #0 + ldr r0, [r5, #0xc] + add r4, r1, #0 + cmp r0, #0 + beq _0224B9A2 + bl sub_020061E4 + str r0, [r5, #0xc] +_0224B9A2: + ldr r0, [r5, #8] + cmp r0, r4 + bge _0224B9B0 + add r0, r0, #1 + str r0, [r5, #8] + mov r0, #0 + pop {r3, r4, r5, pc} +_0224B9B0: + ldr r0, [r5, #0xc] + cmp r0, #0 + bne _0224B9BA + mov r0, #1 + pop {r3, r4, r5, pc} +_0224B9BA: + mov r0, #0 + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224B990 + + thumb_func_start ov95_0224B9C0 +ov95_0224B9C0: ; 0x0224B9C0 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + bl sub_020B28CC + bl sub_020BFB4C + ldr r0, _0224BA68 ; =0x04000060 + ldr r2, _0224BA6C ; =0xFFFFCFFD + ldrh r1, [r0] + and r1, r2 + strh r1, [r0] + ldrh r3, [r0] + add r1, r2, #2 + and r3, r1 + mov r1, #0x10 + orr r1, r3 + strh r1, [r0] + ldrh r3, [r0] + ldr r1, _0224BA70 ; =0x0000CFFB + and r1, r3 + strh r1, [r0] + add r1, r2, #2 + ldrh r3, [r0] + lsr r2, r2, #0x11 + and r3, r1 + mov r1, #8 + orr r1, r3 + strh r1, [r0] + mov r0, #0 + add r1, r0, #0 + mov r3, #0x3f + str r0, [sp] + bl sub_020BFD58 + ldr r1, _0224BA74 ; =0x04000540 + mov r0, #2 + str r0, [r1, #0] + ldr r0, _0224BA78 ; =0xBFFF0000 + str r0, [r1, #0x40] + mov r0, #1 + add r1, r0, #0 + bl sub_020A5A94 + mov r0, #1 + lsl r0, r0, #0xe + mov r1, #1 + bl sub_020A5D88 + ldr r3, _0224BA7C ; =0x02100DEC + mov r0, #1 + mov r1, #0 + ldr r3, [r3, #0] + lsl r0, r0, #0xe + add r2, r1, #0 + blx r3 + ldr r3, _0224BA80 ; =0x02100DF4 + add r4, r0, #0 + ldr r3, [r3, #0] + mov r0, #0x80 + mov r1, #0 + mov r2, #1 + blx r3 + ldr r2, _0224BA84 ; =0x7FFF0000 + add r6, r0, #0 + and r2, r4 + lsl r1, r4, #0x10 + lsr r2, r2, #0x10 + ldr r0, [r5, #0x10] + lsr r1, r1, #0xd + lsl r2, r2, #4 + bl sub_02008A78 + ldr r2, _0224BA88 ; =0xFFFF0000 + lsl r1, r6, #0x10 + and r2, r6 + lsr r2, r2, #0x10 + ldr r0, [r5, #0x10] + lsr r1, r1, #0xd + lsl r2, r2, #3 + bl sub_02008A84 + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0224BA68: .word 0x04000060 +_0224BA6C: .word 0xFFFFCFFD +_0224BA70: .word 0x0000CFFB +_0224BA74: .word 0x04000540 +_0224BA78: .word 0xBFFF0000 +_0224BA7C: .word 0x02100DEC +_0224BA80: .word 0x02100DF4 +_0224BA84: .word 0x7FFF0000 +_0224BA88: .word 0xFFFF0000 + thumb_func_end ov95_0224B9C0 + + thumb_func_start ov95_0224BA8C +ov95_0224BA8C: ; 0x0224BA8C + push {r3, r4, r5, lr} + sub sp, #0x20 + add r5, r0, #0 + ldr r0, [r5, #0] + bl ov95_0224763C + add r4, r0, #0 + add r0, sp, #0x10 + add r1, r4, #0 + mov r2, #2 + mov r3, #0 + bl sub_02075F0C + ldr r0, [r5, #0] + bl ov95_02247660 + add r2, r0, #0 + add r0, r5, #0 + add r0, #0x84 + add r1, r5, #0 + ldr r0, [r0, #0] + add r1, #0x18 + mov r3, #1 + bl sub_020789BC + add r0, r4, #0 + mov r1, #2 + mov r2, #0 + bl sub_020765C4 + add r3, r0, #0 + mov r1, #0 + str r1, [sp] + add r0, r5, #0 + str r1, [sp, #4] + add r0, #0x18 + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r0, [r5, #0x10] + add r3, #0x50 + add r1, sp, #0x10 + mov r2, #0x80 + bl sub_02007C34 + add sp, #0x20 + pop {r3, r4, r5, pc} + thumb_func_end ov95_0224BA8C + + thumb_func_start ov95_0224BAE8 +ov95_0224BAE8: ; 0x0224BAE8 + push {r4, lr} + sub sp, #0x70 + add r4, r0, #0 + add r0, #0x48 + mov r1, #0x5d + mov r2, #7 + mov r3, #8 + bl ov95_02247568 + add r0, sp, #0x5c + bl sub_020A81D0 + add r0, sp, #0x38 + bl sub_020A818C + mov r3, #0 + str r3, [sp] + mov r2, #1 + str r2, [sp, #4] + str r3, [sp, #8] + mov r0, #0x3a + str r0, [sp, #0xc] + add r0, sp, #0x38 + str r0, [sp, #0x10] + mov r0, #0x5d + mov r1, #9 + bl sub_02006F00 + mov r0, #0x3a + str r0, [sp] + add r0, sp, #0x5c + str r0, [sp, #4] + mov r0, #0x5d + mov r1, #0xa + mov r2, #1 + mov r3, #0 + bl sub_02006EE0 + mov r0, #2 + add r1, r4, #0 + str r0, [sp] + add r0, sp, #0x14 + add r1, #0x48 + add r2, sp, #0x38 + add r3, sp, #0x5c + bl ov95_022475C4 + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r2, #0x80 + mov r3, #0x64 + bl ov95_022475E4 + str r0, [r4, #0x40] + mov r0, #0 + str r0, [sp] + mov r0, #1 + str r0, [sp, #4] + ldr r0, [r4, #0] + add r1, sp, #0x14 + mov r2, #0x80 + mov r3, #0x5a + bl ov95_022475E4 + str r0, [r4, #0x44] + mov r1, #1 + bl sub_02021E80 + ldr r0, [r4, #0x40] + mov r1, #0 + bl sub_02021CAC + ldr r0, [r4, #0x44] + mov r1, #0 + bl sub_02021CAC + add sp, #0x70 + pop {r4, pc} + thumb_func_end ov95_0224BAE8 + + thumb_func_start ov95_0224BB8C +ov95_0224BB8C: ; 0x0224BB8C + push {r4, r5, r6, lr} + add r6, r0, #0 + mov r4, #0 + add r5, r6, #0 +_0224BB94: + ldr r0, [r5, #0x40] + cmp r0, #0 + beq _0224BB9E + bl sub_02021BD4 +_0224BB9E: + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #2 + blt _0224BB94 + add r6, #0x48 + add r0, r6, #0 + bl ov95_022475A0 + pop {r4, r5, r6, pc} + thumb_func_end ov95_0224BB8C + + thumb_func_start ov95_0224BBB0 +ov95_0224BBB0: ; 0x0224BBB0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x3a + mov r1, #0x14 + str r2, [sp] + add r7, r3, #0 + bl sub_02018144 + add r4, r0, #0 + beq _0224BBF6 + str r5, [r4, #0] + lsl r0, r6, #0xc + str r0, [r4, #4] + ldr r0, [sp] + lsl r1, r0, #0xc + str r1, [r4, #8] + ldr r0, [r4, #4] + sub r0, r1, r0 + add r1, r7, #0 + bl sub_020E1F6C + str r0, [r4, #0xc] + ldr r0, _0224BBF8 ; =ov95_0224BC30 + str r7, [r4, #0x10] + add r1, r4, #0 + mov r2, #0 + bl sub_0200DA04 + str r0, [r5, #0x7c] + ldr r0, _0224BBFC ; =0x04000050 + mov r1, #1 + add r2, r6, #0 + bl sub_020BF578 +_0224BBF6: + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0224BBF8: .word ov95_0224BC30 +_0224BBFC: .word 0x04000050 + thumb_func_end ov95_0224BBB0 + + thumb_func_start ov95_0224BC00 +ov95_0224BC00: ; 0x0224BC00 + ldr r0, [r0, #0x7c] + cmp r0, #0 + bne _0224BC0A + mov r0, #1 + bx lr +_0224BC0A: + mov r0, #0 + bx lr + ; .align 2, 0 + thumb_func_end ov95_0224BC00 + + thumb_func_start ov95_0224BC10 +ov95_0224BC10: ; 0x0224BC10 + push {r4, lr} + add r4, r0, #0 + ldr r0, [r4, #0x7c] + cmp r0, #0 + beq _0224BC2C + bl sub_0201CED0 + bl ov95_022476C8 + ldr r0, [r4, #0x7c] + bl sub_0200DA58 + mov r0, #0 + str r0, [r4, #0x7c] +_0224BC2C: + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov95_0224BC10 + + thumb_func_start ov95_0224BC30 +ov95_0224BC30: ; 0x0224BC30 + push {r4, lr} + add r4, r1, #0 + ldr r0, [r4, #0x10] + sub r0, r0, #1 + str r0, [r4, #0x10] + cmp r0, #0 + ble _0224BC52 + ldr r1, [r4, #4] + ldr r0, [r4, #0xc] + add r2, r1, r0 + str r2, [r4, #4] + ldr r0, _0224BC68 ; =0x04000050 + mov r1, #1 + asr r2, r2, #0xc + bl sub_020BF578 + pop {r4, pc} +_0224BC52: + ldr r2, [r4, #8] + ldr r0, _0224BC68 ; =0x04000050 + mov r1, #1 + asr r2, r2, #0xc + bl sub_020BF578 + ldr r0, [r4, #0] + bl ov95_0224BC10 + pop {r4, pc} + nop +_0224BC68: .word 0x04000050 + thumb_func_end ov95_0224BC30 + + thumb_func_start ov95_0224BC6C +ov95_0224BC6C: ; 0x0224BC6C + push {r4, r5, r6, lr} + add r5, r0, #0 + add r6, r1, #0 + mov r0, #0x3a + mov r1, #0x44 + bl sub_02018144 + add r4, r0, #0 + beq _0224BCDA + mov r1, #0 + str r1, [r4, #4] + str r6, [r4, #0] + ldr r0, [r5, #0x74] + str r0, [r4, #0x10] + ldr r0, [r5, #0x78] + str r0, [r4, #0x14] + str r5, [r4, #8] + ldr r0, _0224BCE0 ; =0x000018CC + str r1, [r4, #0x18] + str r0, [r4, #0x1c] + mov r0, #0x14 + str r0, [r4, #0x20] + mov r0, #1 + lsl r0, r0, #0xc + strh r0, [r4, #0x3a] + str r1, [r4, #0x40] + ldr r0, [r4, #0x14] + bl ov95_022479AC + ldr r0, [r4, #0x14] + mov r1, #1 + bl ov95_022479A8 + add r1, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x24 + bl ov95_02247958 + add r1, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x34 + bl ov95_02247978 + ldr r0, _0224BCE4 ; =ov95_0224BD5C + add r1, r4, #0 + mov r2, #0 + bl sub_0200D9E8 + str r0, [r6, #0] + cmp r0, #0 + bne _0224BCDE + add r0, r4, #0 + bl sub_020181C4 + pop {r4, r5, r6, pc} +_0224BCDA: + mov r0, #0 + str r0, [r6, #0] +_0224BCDE: + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0224BCE0: .word 0x000018CC +_0224BCE4: .word ov95_0224BD5C + thumb_func_end ov95_0224BC6C + + thumb_func_start ov95_0224BCE8 +ov95_0224BCE8: ; 0x0224BCE8 + push {r4, lr} + add r4, r0, #0 + beq _0224BD02 + bl sub_0201CED0 + ldr r1, [r0, #0] + mov r2, #0 + str r2, [r1, #0] + bl sub_020181C4 + add r0, r4, #0 + bl sub_0200DA58 +_0224BD02: + pop {r4, pc} + thumb_func_end ov95_0224BCE8 + + thumb_func_start ov95_0224BD04 +ov95_0224BD04: ; 0x0224BD04 + add r1, r0, #0 + ldr r0, [r1, #0x40] + cmp r0, #0 + beq _0224BD26 + mov r0, #0x3a + ldrsh r2, [r1, r0] + mov r0, #0x3c + ldrsh r0, [r1, r0] + add r0, r2, r0 + strh r0, [r1, #0x3a] + ldr r0, [r1, #0x40] + sub r0, r0, #1 + str r0, [r1, #0x40] + bne _0224BD26 + mov r0, #0x3e + ldrsh r0, [r1, r0] + strh r0, [r1, #0x3a] +_0224BD26: + mov r0, #0x36 + ldrsh r2, [r1, r0] + mov r0, #0x3a + ldrsh r0, [r1, r0] + ldr r3, _0224BD3C ; =ov95_02247990 + add r0, r2, r0 + strh r0, [r1, #0x36] + ldr r0, [r1, #0x14] + add r1, #0x34 + bx r3 + nop +_0224BD3C: .word ov95_02247990 + thumb_func_end ov95_0224BD04 + + thumb_func_start ov95_0224BD40 +ov95_0224BD40: ; 0x0224BD40 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r4, r2, #0 + beq _0224BD58 + mov r0, #0x3a + ldrsh r0, [r5, r0] + sub r0, r1, r0 + add r1, r4, #0 + bl sub_020E1F6C + strh r0, [r5, #0x3c] + str r4, [r5, #0x40] +_0224BD58: + pop {r3, r4, r5, pc} + ; .align 2, 0 + thumb_func_end ov95_0224BD40 + + thumb_func_start ov95_0224BD5C +ov95_0224BD5C: ; 0x0224BD5C + push {r3, r4, r5, lr} + add r4, r1, #0 + add r5, r0, #0 + add r0, r4, #0 + bl ov95_0224BD04 + ldr r0, [r4, #4] + cmp r0, #5 + bhi _0224BE6A + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0224BD7A: ; jump table + .short _0224BD86 - _0224BD7A - 2 ; case 0 + .short _0224BDB6 - _0224BD7A - 2 ; case 1 + .short _0224BDCE - _0224BD7A - 2 ; case 2 + .short _0224BDE4 - _0224BD7A - 2 ; case 3 + .short _0224BE2C - _0224BD7A - 2 ; case 4 + .short _0224BE5A - _0224BD7A - 2 ; case 5 +_0224BD86: + ldr r0, [r4, #0x20] + cmp r0, #0 + beq _0224BDA6 + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x1c] + add r0, r1, r0 + str r0, [r4, #0x18] + ldr r0, [r4, #0x20] + sub r0, r0, #1 + str r0, [r4, #0x20] + ldr r1, [r4, #0x18] + ldr r0, [r4, #0x14] + asr r1, r1, #0xc + bl ov95_022479AC + pop {r3, r4, r5, pc} +_0224BDA6: + ldr r0, [r4, #0x14] + mov r1, #0x1f + bl ov95_022479AC + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0224BDB6: + mov r1, #6 + add r0, r4, #0 + lsl r1, r1, #6 + mov r2, #0x1e + bl ov95_0224BD40 + mov r0, #0 + str r0, [r4, #0xc] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0224BDCE: + ldr r0, [r4, #0xc] + add r0, r0, #1 + str r0, [r4, #0xc] + cmp r0, #0xa + ble _0224BE6A + mov r0, #0 + str r0, [r4, #0x30] + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0224BDE4: + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x30] + add r0, r1, r0 + str r0, [r4, #0x28] + mov r0, #0x1e + ldr r1, [r4, #0x30] + lsl r0, r0, #6 + sub r0, r1, r0 + str r0, [r4, #0x30] + add r1, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x24 + bl ov95_02247968 + ldr r1, [r4, #0x28] + ldr r0, _0224BE6C ; =0xFFFF5000 + cmp r1, r0 + bge _0224BE6A + ldr r0, _0224BE70 ; =0x000005E6 + bl sub_02005748 + mov r0, #0 + ldr r1, [r4, #0x30] + mvn r0, r0 + mul r0, r1 + str r0, [r4, #0x30] + ldr r0, [r4, #8] + mov r1, #0 + mov r2, #0x10 + mov r3, #8 + bl ov95_0224BBB0 + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0224BE2C: + ldr r1, [r4, #0x28] + ldr r0, [r4, #0x30] + add r1, r1, r0 + mov r0, #0x13 + lsl r0, r0, #0xc + str r1, [r4, #0x28] + cmp r1, r0 + blt _0224BE3E + str r0, [r4, #0x28] +_0224BE3E: + add r1, r4, #0 + ldr r0, [r4, #0x14] + add r1, #0x24 + bl ov95_02247968 + mov r0, #0x13 + ldr r1, [r4, #0x28] + lsl r0, r0, #0xc + cmp r1, r0 + bne _0224BE6A + ldr r0, [r4, #4] + add r0, r0, #1 + str r0, [r4, #4] + pop {r3, r4, r5, pc} +_0224BE5A: + ldr r0, [r4, #8] + bl ov95_0224BC00 + cmp r0, #0 + beq _0224BE6A + add r0, r5, #0 + bl ov95_0224BCE8 +_0224BE6A: + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0224BE6C: .word 0xFFFF5000 +_0224BE70: .word 0x000005E6 + thumb_func_end ov95_0224BD5C + + .rodata + + + .global Unk_ov95_0224C21C +Unk_ov95_0224C21C: ; 0x0224C21C + .incbin "incbin/overlay95_rodata.bin", 0x3A8, 0x3B0 - 0x3A8 + + .global Unk_ov95_0224C224 +Unk_ov95_0224C224: ; 0x0224C224 + .incbin "incbin/overlay95_rodata.bin", 0x3B0, 0x3C0 - 0x3B0 + + .global Unk_ov95_0224C234 +Unk_ov95_0224C234: ; 0x0224C234 + .incbin "incbin/overlay95_rodata.bin", 0x3C0, 0x3D0 - 0x3C0 + + .global Unk_ov95_0224C244 +Unk_ov95_0224C244: ; 0x0224C244 + .incbin "incbin/overlay95_rodata.bin", 0x3D0, 0x3EC - 0x3D0 + + .global Unk_ov95_0224C260 +Unk_ov95_0224C260: ; 0x0224C260 + .incbin "incbin/overlay95_rodata.bin", 0x3EC, 0x408 - 0x3EC + + .global Unk_ov95_0224C27C +Unk_ov95_0224C27C: ; 0x0224C27C + .incbin "incbin/overlay95_rodata.bin", 0x408, 0x28 + diff --git a/asm/ov96_0223B140.s b/asm/ov96_0223B140.s new file mode 100644 index 000000000..83fdc90e9 --- /dev/null +++ b/asm/ov96_0223B140.s @@ -0,0 +1,763 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov96_0223B140 +ov96_0223B140: ; 0x0223B140 + push {r3, r4} + ldr r3, _0223B158 ; =0x0223DDE0 + mov r4, #1 + str r4, [r3, #0] + mov r4, #0 + str r4, [r3, #4] + str r0, [r3, #8] + str r1, [r3, #0xc] + str r2, [r3, #0x10] + pop {r3, r4} + bx lr + nop +_0223B158: .word 0x0223DDE0 + thumb_func_end ov96_0223B140 + + thumb_func_start ov96_0223B15C +ov96_0223B15C: ; 0x0223B15C + push {r3, lr} + ldr r1, _0223B3C8 ; =0x0223DDE0 + ldr r0, [r1, #0] + cmp r0, #0xc + bls _0223B168 + b _0223B3C4 +_0223B168: + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B174: ; jump table + .short _0223B3C4 - _0223B174 - 2 ; case 0 + .short _0223B3C4 - _0223B174 - 2 ; case 1 + .short _0223B18E - _0223B174 - 2 ; case 2 + .short _0223B3B8 - _0223B174 - 2 ; case 3 + .short _0223B1D8 - _0223B174 - 2 ; case 4 + .short _0223B3B8 - _0223B174 - 2 ; case 5 + .short _0223B248 - _0223B174 - 2 ; case 6 + .short _0223B3B8 - _0223B174 - 2 ; case 7 + .short _0223B2BA - _0223B174 - 2 ; case 8 + .short _0223B3B8 - _0223B174 - 2 ; case 9 + .short _0223B32C - _0223B174 - 2 ; case 10 + .short _0223B3B8 - _0223B174 - 2 ; case 11 + .short _0223B3C4 - _0223B174 - 2 ; case 12 +_0223B18E: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B19C + cmp r0, #7 + beq _0223B1B4 + pop {r3, pc} +_0223B19C: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov96_0223B608 + ldr r1, _0223B3C8 ; =0x0223DDE0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B1B4: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE20 + cmp r0, #0 + ble _0223B1CA + ldr r0, _0223B3CC ; =0x0223DEE0 + ldrb r1, [r0, #3] + ldr r0, _0223B3C8 ; =0x0223DDE0 + b _0223B1D0 +_0223B1CA: + mov r1, #1 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 +_0223B1D0: + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B1D8: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B1E6 + cmp r0, #7 + beq _0223B1FE + pop {r3, pc} +_0223B1E6: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov96_0223B608 + ldr r1, _0223B3C8 ; =0x0223DDE0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B1FE: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE20 + ldr r1, _0223B3D0 ; =0x00000A38 + cmp r0, r1 + bne _0223B216 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0 + str r1, [r0, #4] + b _0223B242 +_0223B216: + ldr r0, _0223B3CC ; =0x0223DEE0 + ldr r0, [r0, #8] + ldrb r0, [r0] + cmp r0, #2 + beq _0223B226 + cmp r0, #5 + beq _0223B230 + b _0223B23A +_0223B226: + mov r1, #2 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B242 +_0223B230: + mov r1, #1 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B242 +_0223B23A: + mov r1, #4 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] +_0223B242: + bl ov60_0221FDEC + pop {r3, pc} +_0223B248: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B256 + cmp r0, #7 + beq _0223B26E + pop {r3, pc} +_0223B256: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov96_0223B608 + ldr r1, _0223B3C8 ; =0x0223DDE0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B26E: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + ldr r2, _0223B3CC ; =0x0223DEE0 + str r1, [r0, #0] + ldrb r2, [r2, #3] + cmp r2, #5 + bhi _0223B2AC + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0223B288: ; jump table + .short _0223B2AC - _0223B288 - 2 ; case 0 + .short _0223B294 - _0223B288 - 2 ; case 1 + .short _0223B29A - _0223B288 - 2 ; case 2 + .short _0223B2AC - _0223B288 - 2 ; case 3 + .short _0223B2A0 - _0223B288 - 2 ; case 4 + .short _0223B2A6 - _0223B288 - 2 ; case 5 +_0223B294: + mov r1, #0 + str r1, [r0, #4] + b _0223B2B4 +_0223B29A: + sub r1, #0xf + str r1, [r0, #4] + b _0223B2B4 +_0223B2A0: + sub r1, #0xd + str r1, [r0, #4] + b _0223B2B4 +_0223B2A6: + sub r1, #0xe + str r1, [r0, #4] + b _0223B2B4 +_0223B2AC: + mov r1, #4 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] +_0223B2B4: + bl ov60_0221FDEC + pop {r3, pc} +_0223B2BA: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B2C8 + cmp r0, #7 + beq _0223B2E0 + pop {r3, pc} +_0223B2C8: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov96_0223B608 + ldr r1, _0223B3C8 ; =0x0223DDE0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B2E0: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + ldr r2, _0223B3CC ; =0x0223DEE0 + str r1, [r0, #0] + ldrb r2, [r2, #3] + cmp r2, #5 + bhi _0223B31E + add r2, r2, r2 + add r2, pc + ldrh r2, [r2, #6] + lsl r2, r2, #0x10 + asr r2, r2, #0x10 + add pc, r2 +_0223B2FA: ; jump table + .short _0223B31E - _0223B2FA - 2 ; case 0 + .short _0223B306 - _0223B2FA - 2 ; case 1 + .short _0223B31E - _0223B2FA - 2 ; case 2 + .short _0223B30C - _0223B2FA - 2 ; case 3 + .short _0223B312 - _0223B2FA - 2 ; case 4 + .short _0223B318 - _0223B2FA - 2 ; case 5 +_0223B306: + mov r1, #0 + str r1, [r0, #4] + b _0223B326 +_0223B30C: + mov r1, #1 + str r1, [r0, #4] + b _0223B326 +_0223B312: + mov r1, #2 + str r1, [r0, #4] + b _0223B326 +_0223B318: + sub r1, #0xe + str r1, [r0, #4] + b _0223B326 +_0223B31E: + mov r1, #4 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] +_0223B326: + bl ov60_0221FDEC + pop {r3, pc} +_0223B32C: + bl ov60_0221FD48 + cmp r0, #1 + beq _0223B33A + cmp r0, #7 + beq _0223B352 + pop {r3, pc} +_0223B33A: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE14 + bl ov96_0223B608 + ldr r1, _0223B3C8 ; =0x0223DDE0 + str r0, [r1, #4] + bl ov60_0221FDEC + pop {r3, pc} +_0223B352: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + bl ov60_0221FE20 + cmp r0, #8 + bne _0223B368 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0 + str r1, [r0, #4] + b _0223B3B2 +_0223B368: + ldr r0, _0223B3CC ; =0x0223DEE0 + ldrb r0, [r0, #3] + cmp r0, #5 + bhi _0223B3AA + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B37C: ; jump table + .short _0223B3AA - _0223B37C - 2 ; case 0 + .short _0223B388 - _0223B37C - 2 ; case 1 + .short _0223B3AA - _0223B37C - 2 ; case 2 + .short _0223B390 - _0223B37C - 2 ; case 3 + .short _0223B398 - _0223B37C - 2 ; case 4 + .short _0223B3A0 - _0223B37C - 2 ; case 5 +_0223B388: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #0 + str r1, [r0, #4] + b _0223B3B2 +_0223B390: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #1 + str r1, [r0, #4] + b _0223B3B2 +_0223B398: + ldr r0, _0223B3C8 ; =0x0223DDE0 + mov r1, #2 + str r1, [r0, #4] + b _0223B3B2 +_0223B3A0: + mov r1, #1 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] + b _0223B3B2 +_0223B3AA: + mov r1, #4 + ldr r0, _0223B3C8 ; =0x0223DDE0 + mvn r1, r1 + str r1, [r0, #4] +_0223B3B2: + bl ov60_0221FDEC + pop {r3, pc} +_0223B3B8: + mov r0, #0xc + str r0, [r1, #0] + sub r0, #0x10 + str r0, [r1, #4] + bl ov60_0221FDEC +_0223B3C4: + pop {r3, pc} + nop +_0223B3C8: .word 0x0223DDE0 +_0223B3CC: .word 0x0223DEE0 +_0223B3D0: .word 0x00000A38 + thumb_func_end ov96_0223B15C + + thumb_func_start ov96_0223B3D4 +ov96_0223B3D4: ; 0x0223B3D4 + ldr r1, _0223B3F0 ; =0x0223DDE0 + ldr r0, [r1, #0] + cmp r0, #1 + beq _0223B3E2 + cmp r0, #0xc + beq _0223B3E6 + b _0223B3EC +_0223B3E2: + mov r0, #1 + bx lr +_0223B3E6: + mov r0, #1 + str r0, [r1, #0] + bx lr +_0223B3EC: + mov r0, #0 + bx lr + ; .align 2, 0 +_0223B3F0: .word 0x0223DDE0 + thumb_func_end ov96_0223B3D4 + + thumb_func_start ov96_0223B3F4 +ov96_0223B3F4: ; 0x0223B3F4 + ldr r0, _0223B3FC ; =0x0223DDE0 + ldr r0, [r0, #4] + bx lr + nop +_0223B3FC: .word 0x0223DDE0 + thumb_func_end ov96_0223B3F4 + + thumb_func_start ov96_0223B400 +ov96_0223B400: ; 0x0223B400 + push {r3, r4, lr} + sub sp, #4 + add r4, r0, #0 + bl ov60_0221FC84 + ldr r0, _0223B440 ; =0x0223DDE0 + sub r1, r4, #1 + strb r1, [r0, #0x14] + mov r0, #2 + str r0, [sp] + ldr r0, _0223B444 ; =0x0223DB60 + ldr r1, _0223B448 ; =0x0223DDF4 + ldr r3, _0223B44C ; =0x0223DEE3 + mov r2, #1 + bl ov96_0223B5D0 + cmp r0, #0 + beq _0223B42E + ldr r0, _0223B440 ; =0x0223DDE0 + mov r1, #2 + str r1, [r0, #0] + add sp, #4 + pop {r3, r4, pc} +_0223B42E: + ldr r0, _0223B440 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + sub r1, #0x11 + str r1, [r0, #4] + bl ov60_0221FDEC + add sp, #4 + pop {r3, r4, pc} + ; .align 2, 0 +_0223B440: .word 0x0223DDE0 +_0223B444: .word 0x0223DB60 +_0223B448: .word 0x0223DDF4 +_0223B44C: .word 0x0223DEE3 + thumb_func_end ov96_0223B400 + + thumb_func_start ov96_0223B450 +ov96_0223B450: ; 0x0223B450 + push {r3, r4, r5, r6, lr} + sub sp, #4 + add r5, r0, #0 + ldr r0, _0223B49C ; =0x0223DEE0 + add r6, r2, #0 + add r4, r1, #0 + str r6, [r0, #8] + bl ov60_0221FC84 + ldr r0, _0223B4A0 ; =0x0223DDE0 + sub r1, r5, #1 + strb r1, [r0, #0x14] + sub r1, r4, #1 + strb r1, [r0, #0x15] + ldr r0, _0223B4A4 ; =0x00000A38 + ldr r1, _0223B4A8 ; =0x0223DDF4 + str r0, [sp] + ldr r0, _0223B4AC ; =0x0223DBAC + mov r2, #2 + add r3, r6, #0 + bl ov96_0223B5D0 + cmp r0, #0 + beq _0223B48A + ldr r0, _0223B4A0 ; =0x0223DDE0 + mov r1, #4 + str r1, [r0, #0] + add sp, #4 + pop {r3, r4, r5, r6, pc} +_0223B48A: + ldr r0, _0223B4A0 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + sub r1, #0x11 + str r1, [r0, #4] + bl ov60_0221FDEC + add sp, #4 + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223B49C: .word 0x0223DEE0 +_0223B4A0: .word 0x0223DDE0 +_0223B4A4: .word 0x00000A38 +_0223B4A8: .word 0x0223DDF4 +_0223B4AC: .word 0x0223DBAC + thumb_func_end ov96_0223B450 + + thumb_func_start ov96_0223B4B0 +ov96_0223B4B0: ; 0x0223B4B0 + push {r3, r4, r5, r6, r7, lr} + add r5, r0, #0 + add r6, r1, #0 + add r7, r2, #0 + add r4, r3, #0 + bl ov60_0221FC84 + ldr r0, _0223B514 ; =0x0223DDF4 + add r1, r4, #0 + mov r2, #0xe4 + bl sub_020D50B8 + ldr r0, _0223B518 ; =0x0223DEC0 + sub r1, r5, #1 + strb r1, [r0, #0x18] + sub r1, r6, #1 + strb r1, [r0, #0x19] + ldr r3, _0223B51C ; =0x0223DEDB + ldr r2, _0223B520 ; =0x0223DDEC + strb r7, [r0, #0x1a] + mov r1, #8 +_0223B4DA: + ldrb r0, [r2] + add r2, r2, #1 + strb r0, [r3] + add r3, r3, #1 + sub r1, r1, #1 + bne _0223B4DA + mov r0, #2 + str r0, [sp] + ldr r0, _0223B524 ; =0x0223DBF8 + ldr r1, _0223B514 ; =0x0223DDF4 + ldr r3, _0223B528 ; =0x0223DEE3 + mov r2, #0xef + bl ov96_0223B5D0 + cmp r0, #0 + beq _0223B502 + ldr r0, _0223B52C ; =0x0223DDE0 + mov r1, #6 + str r1, [r0, #0] + pop {r3, r4, r5, r6, r7, pc} +_0223B502: + ldr r0, _0223B52C ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + sub r1, #0x11 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, r4, r5, r6, r7, pc} + nop +_0223B514: .word 0x0223DDF4 +_0223B518: .word 0x0223DEC0 +_0223B51C: .word 0x0223DEDB +_0223B520: .word 0x0223DDEC +_0223B524: .word 0x0223DBF8 +_0223B528: .word 0x0223DEE3 +_0223B52C: .word 0x0223DDE0 + thumb_func_end ov96_0223B4B0 + + thumb_func_start ov96_0223B530 +ov96_0223B530: ; 0x0223B530 + push {r3, lr} + bl ov60_0221FC84 + mov r0, #2 + str r0, [sp] + ldr r0, _0223B564 ; =0x0223DC44 + ldr r1, _0223B568 ; =0x0223DDF4 + ldr r3, _0223B56C ; =0x0223DEE3 + mov r2, #0 + bl ov96_0223B5D0 + cmp r0, #0 + beq _0223B552 + ldr r0, _0223B570 ; =0x0223DDE0 + mov r1, #8 + str r1, [r0, #0] + pop {r3, pc} +_0223B552: + ldr r0, _0223B570 ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + sub r1, #0x11 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, pc} + nop +_0223B564: .word 0x0223DC44 +_0223B568: .word 0x0223DDF4 +_0223B56C: .word 0x0223DEE3 +_0223B570: .word 0x0223DDE0 + thumb_func_end ov96_0223B530 + + thumb_func_start ov96_0223B574 +ov96_0223B574: ; 0x0223B574 + push {r3, r4, r5, lr} + add r5, r0, #0 + add r0, #0x1c + add r4, r1, #0 + bl sub_020C3FA0 + ldr r0, _0223B5C0 ; =0x0223DDF4 + add r1, r5, #0 + mov r2, #0x64 + bl sub_020D50B8 + ldr r0, _0223B5C4 ; =0x0223DEE0 + str r4, [r0, #8] + bl ov60_0221FC84 + mov r0, #8 + str r0, [sp] + ldr r3, _0223B5C4 ; =0x0223DEE0 + ldr r0, _0223B5C8 ; =0x0223DC8C + ldr r1, _0223B5C0 ; =0x0223DDF4 + ldr r3, [r3, #8] + mov r2, #0x64 + bl ov96_0223B5D0 + cmp r0, #0 + beq _0223B5B0 + ldr r0, _0223B5CC ; =0x0223DDE0 + mov r1, #0xa + str r1, [r0, #0] + pop {r3, r4, r5, pc} +_0223B5B0: + ldr r0, _0223B5CC ; =0x0223DDE0 + mov r1, #0xc + str r1, [r0, #0] + sub r1, #0x11 + str r1, [r0, #4] + bl ov60_0221FDEC + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223B5C0: .word 0x0223DDF4 +_0223B5C4: .word 0x0223DEE0 +_0223B5C8: .word 0x0223DC8C +_0223B5CC: .word 0x0223DDE0 + thumb_func_end ov96_0223B574 + + thumb_func_start ov96_0223B5D0 +ov96_0223B5D0: ; 0x0223B5D0 + push {r3, r4, r5, lr} + sub sp, #8 + add r5, r1, #0 + ldr r1, [sp, #0x18] + str r3, [sp] + str r1, [sp, #4] + add r4, r2, #0 + ldr r1, _0223B604 ; =0x0223DDE0 + add r2, r5, #0 + ldr r1, [r1, #8] + add r3, r4, #0 + bl ov60_0221FCA8 + cmp r0, #0 + beq _0223B5F6 + cmp r0, #1 + beq _0223B5FC + cmp r0, #2 + b _0223B5FC +_0223B5F6: + add sp, #8 + mov r0, #1 + pop {r3, r4, r5, pc} +_0223B5FC: + mov r0, #0 + add sp, #8 + pop {r3, r4, r5, pc} + nop +_0223B604: .word 0x0223DDE0 + thumb_func_end ov96_0223B5D0 + + thumb_func_start ov96_0223B608 +ov96_0223B608: ; 0x0223B608 + push {r4, lr} + cmp r0, #0x20 + bhi _0223B680 + add r0, r0, r0 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B61A: ; jump table + .short _0223B65C - _0223B61A - 2 ; case 0 + .short _0223B65C - _0223B61A - 2 ; case 1 + .short _0223B662 - _0223B61A - 2 ; case 2 + .short _0223B65C - _0223B61A - 2 ; case 3 + .short _0223B65C - _0223B61A - 2 ; case 4 + .short _0223B65C - _0223B61A - 2 ; case 5 + .short _0223B65C - _0223B61A - 2 ; case 6 + .short _0223B680 - _0223B61A - 2 ; case 7 + .short _0223B662 - _0223B61A - 2 ; case 8 + .short _0223B65C - _0223B61A - 2 ; case 9 + .short _0223B65C - _0223B61A - 2 ; case 10 + .short _0223B668 - _0223B61A - 2 ; case 11 + .short _0223B66E - _0223B61A - 2 ; case 12 + .short _0223B66E - _0223B61A - 2 ; case 13 + .short _0223B65C - _0223B61A - 2 ; case 14 + .short _0223B67A - _0223B61A - 2 ; case 15 + .short _0223B674 - _0223B61A - 2 ; case 16 + .short _0223B674 - _0223B61A - 2 ; case 17 + .short _0223B674 - _0223B61A - 2 ; case 18 + .short _0223B674 - _0223B61A - 2 ; case 19 + .short _0223B65C - _0223B61A - 2 ; case 20 + .short _0223B65C - _0223B61A - 2 ; case 21 + .short _0223B65C - _0223B61A - 2 ; case 22 + .short _0223B65C - _0223B61A - 2 ; case 23 + .short _0223B680 - _0223B61A - 2 ; case 24 + .short _0223B662 - _0223B61A - 2 ; case 25 + .short _0223B674 - _0223B61A - 2 ; case 26 + .short _0223B674 - _0223B61A - 2 ; case 27 + .short _0223B674 - _0223B61A - 2 ; case 28 + .short _0223B674 - _0223B61A - 2 ; case 29 + .short _0223B67A - _0223B61A - 2 ; case 30 + .short _0223B674 - _0223B61A - 2 ; case 31 + .short _0223B65C - _0223B61A - 2 ; case 32 +_0223B65C: + mov r4, #4 + mvn r4, r4 + b _0223B684 +_0223B662: + mov r4, #4 + mvn r4, r4 + b _0223B684 +_0223B668: + mov r4, #6 + mvn r4, r4 + b _0223B684 +_0223B66E: + mov r4, #6 + mvn r4, r4 + b _0223B684 +_0223B674: + mov r4, #1 + mvn r4, r4 + b _0223B684 +_0223B67A: + mov r4, #1 + mvn r4, r4 + b _0223B684 +_0223B680: + mov r4, #4 + mvn r4, r4 +_0223B684: + mov r0, #4 + mvn r0, r0 + cmp r4, r0 + beq _0223B69C + bl ov4_02213898 + cmp r0, #9 + beq _0223B698 + mov r4, #5 + mvn r4, r4 +_0223B698: + bl ov4_021D76E8 +_0223B69C: + add r0, r4, #0 + pop {r4, pc} + thumb_func_end ov96_0223B608 + .data + + + .global Unk_ov96_0223DB60 +Unk_ov96_0223DB60: ; 0x0223DB60 + .incbin "incbin/overlay96_data.bin", 0x0, 0x4C - 0x0 + + .global Unk_ov96_0223DBAC +Unk_ov96_0223DBAC: ; 0x0223DBAC + .incbin "incbin/overlay96_data.bin", 0x4C, 0x98 - 0x4C + + .global Unk_ov96_0223DBF8 +Unk_ov96_0223DBF8: ; 0x0223DBF8 + .incbin "incbin/overlay96_data.bin", 0x98, 0xE4 - 0x98 + + .global Unk_ov96_0223DC44 +Unk_ov96_0223DC44: ; 0x0223DC44 + .incbin "incbin/overlay96_data.bin", 0xE4, 0x12C - 0xE4 + + .global Unk_ov96_0223DC8C +Unk_ov96_0223DC8C: ; 0x0223DC8C + .incbin "incbin/overlay96_data.bin", 0x12C, 0x48 + + + .bss + + + .global Unk_ov96_0223DDE0 +Unk_ov96_0223DDE0: ; 0x0223DDE0 + .space 0x10C + diff --git a/asm/ov96_0223B6A0.s b/asm/ov96_0223B6A0.s new file mode 100644 index 000000000..c065e219e --- /dev/null +++ b/asm/ov96_0223B6A0.s @@ -0,0 +1,812 @@ + .include "macros/function.inc" + .include "global.inc" + + + + .text + + + thumb_func_start ov96_0223B6A0 +ov96_0223B6A0: ; 0x0223B6A0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x10 + add r5, r1, #0 + add r6, r0, #0 + ldr r0, [r5, #0] + cmp r0, #0 + beq _0223B6B4 + cmp r0, #1 + beq _0223B7A8 + b _0223B7BE +_0223B6B4: + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + bl sub_020177A4 + bl sub_0201FF00 + bl sub_0201FF68 + mov r2, #1 + lsl r2, r2, #0x1a + ldr r1, [r2, #0] + ldr r0, _0223B7C4 ; =0xFFFFE0FF + and r1, r0 + str r1, [r2, #0] + ldr r2, _0223B7C8 ; =0x04001000 + ldr r1, [r2, #0] + and r0, r1 + str r0, [r2, #0] + mov r2, #5 + mov r0, #3 + mov r1, #0x44 + lsl r2, r2, #0x10 + bl sub_02017FC8 + ldr r1, _0223B7CC ; =0x000012C4 + add r0, r6, #0 + mov r2, #0x44 + bl sub_0200681C + ldr r2, _0223B7CC ; =0x000012C4 + mov r1, #0 + add r4, r0, #0 + bl sub_020D5124 + mov r0, #0x44 + bl sub_02018340 + str r0, [r4, #4] + ldr r0, _0223B7D0 ; =0x0223DEEC + add r2, sp, #0 + ldr r3, _0223B7D4 ; =0x0223DA88 + str r4, [r0, #0] + add r7, r2, #0 + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + ldmia r3!, {r0, r1} + stmia r2!, {r0, r1} + add r0, r7, #0 + bl sub_02018368 + mov r0, #0xb + mov r1, #0x20 + mov r2, #0x44 + bl sub_0200B368 + mov r1, #0xbd + lsl r1, r1, #4 + str r0, [r4, r1] + ldr r2, _0223B7D8 ; =0x0000029E + mov r0, #0 + mov r1, #0x1a + mov r3, #0x44 + bl sub_0200B144 + ldr r1, _0223B7DC ; =0x00000BD4 + ldr r2, _0223B7E0 ; =0x000002A2 + str r0, [r4, r1] + mov r0, #0 + mov r1, #0x1a + mov r3, #0x44 + bl sub_0200B144 + ldr r1, _0223B7E4 ; =0x00000BD8 + ldr r2, _0223B7E8 ; =0x000002B7 + str r0, [r4, r1] + mov r0, #0 + mov r1, #0x1a + mov r3, #0x44 + bl sub_0200B144 + ldr r1, _0223B7EC ; =0x00000BDC + str r0, [r4, r1] + mov r0, #4 + mov r1, #8 + bl sub_02017DD4 + add r0, r4, #0 + add r1, r6, #0 + bl ov96_0223B980 + add r0, r4, #0 + bl ov96_0223BC64 + mov r1, #0 + mov r0, #0x34 + add r2, r1, #0 + bl sub_02004550 + ldr r1, _0223B7F0 ; =0x00020020 + mov r0, #0x44 + bl sub_02018144 + str r0, [r4, #0x24] + add r0, #0x1f + mov r1, #0x1f + bic r0, r1 + mov r1, #2 + lsl r1, r1, #0x10 + mov r2, #0 + bl sub_020A5404 + str r0, [r4, #0x28] + ldr r1, _0223B7F4 ; =0x00000497 + mov r0, #0xb + mov r2, #1 + bl sub_02004550 + mov r0, #1 + str r0, [r5, #0] + b _0223B7BE +_0223B7A8: + bl sub_02099550 + bl sub_020995B4 + bl sub_02033478 + mov r0, #0 + str r0, [r5, #0] + add sp, #0x10 + mov r0, #1 + pop {r3, r4, r5, r6, r7, pc} +_0223B7BE: + mov r0, #0 + add sp, #0x10 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223B7C4: .word 0xFFFFE0FF +_0223B7C8: .word 0x04001000 +_0223B7CC: .word 0x000012C4 +_0223B7D0: .word 0x0223DEEC +_0223B7D4: .word 0x0223DA88 +_0223B7D8: .word 0x0000029E +_0223B7DC: .word 0x00000BD4 +_0223B7E0: .word 0x000002A2 +_0223B7E4: .word 0x00000BD8 +_0223B7E8: .word 0x000002B7 +_0223B7EC: .word 0x00000BDC +_0223B7F0: .word 0x00020020 +_0223B7F4: .word 0x00000497 + thumb_func_end ov96_0223B6A0 + + thumb_func_start ov96_0223B7F8 +ov96_0223B7F8: ; 0x0223B7F8 + push {r4, r5, r6, lr} + add r4, r1, #0 + bl sub_0200682C + add r5, r0, #0 + bl ov4_021D8018 + bl ov96_0223B15C + bl ov4_021D8018 + ldr r1, [r4, #0] + cmp r1, #5 + bhi _0223B8A0 + add r0, r1, r1 + add r0, pc + ldrh r0, [r0, #6] + lsl r0, r0, #0x10 + asr r0, r0, #0x10 + add pc, r0 +_0223B820: ; jump table + .short _0223B82C - _0223B820 - 2 ; case 0 + .short _0223B848 - _0223B820 - 2 ; case 1 + .short _0223B85C - _0223B820 - 2 ; case 2 + .short _0223B86A - _0223B820 - 2 ; case 3 + .short _0223B87E - _0223B820 - 2 ; case 4 + .short _0223B89C - _0223B820 - 2 ; case 5 +_0223B82C: + bl sub_020334A4 + cmp r0, #0 + beq _0223B8A0 + ldr r1, [r5, #0x28] + ldr r0, _0223B8B0 ; =0x0223DEEC + str r1, [r0, #4] + ldr r0, _0223B8B4 ; =ov96_0223BC04 + ldr r1, _0223B8B8 ; =ov96_0223BC2C + bl ov4_021D776C + mov r0, #1 + str r0, [r4, #0] + b _0223B8A0 +_0223B848: + ldr r3, [r5, #0x10] + mov r2, #0xc + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223B8BC ; =0x0223DCD4 + add r0, r5, #0 + ldr r2, [r2, r6] + blx r2 + str r0, [r4, #0] + b _0223B8A0 +_0223B85C: + bl sub_0200F2AC + cmp r0, #0 + beq _0223B8A0 + mov r0, #3 + str r0, [r4, #0] + b _0223B8A0 +_0223B86A: + ldr r3, [r5, #0x10] + mov r2, #0xc + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223B8C0 ; =0x0223DCD8 + add r0, r5, #0 + ldr r2, [r2, r6] + blx r2 + str r0, [r4, #0] + b _0223B8A0 +_0223B87E: + bl sub_0200F2AC + cmp r0, #0 + beq _0223B8A0 + ldr r3, [r5, #0x10] + mov r2, #0xc + add r6, r3, #0 + mul r6, r2 + ldr r2, _0223B8C4 ; =0x0223DCDC + ldr r1, [r4, #0] + ldr r2, [r2, r6] + add r0, r5, #0 + blx r2 + str r0, [r4, #0] + b _0223B8A0 +_0223B89C: + mov r0, #1 + pop {r4, r5, r6, pc} +_0223B8A0: + ldr r0, _0223B8C8 ; =0x00000BF8 + ldr r0, [r5, r0] + cmp r0, #0 + beq _0223B8AC + bl sub_020219F8 +_0223B8AC: + mov r0, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223B8B0: .word 0x0223DEEC +_0223B8B4: .word ov96_0223BC04 +_0223B8B8: .word ov96_0223BC2C +_0223B8BC: .word 0x0223DCD4 +_0223B8C0: .word 0x0223DCD8 +_0223B8C4: .word 0x0223DCDC +_0223B8C8: .word 0x00000BF8 + thumb_func_end ov96_0223B7F8 + + thumb_func_start ov96_0223B8CC +ov96_0223B8CC: ; 0x0223B8CC + push {r3, r4, r5, lr} + add r5, r0, #0 + bl sub_0200682C + add r4, r0, #0 + ldr r0, [r4, #0x24] + bl sub_020181C4 + bl sub_020995C4 + bl sub_02099560 + add r0, r4, #0 + bl ov96_0223BC8C + ldr r0, _0223B934 ; =0x00000BDC + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _0223B938 ; =0x00000BD8 + ldr r0, [r4, r0] + bl sub_0200B190 + ldr r0, _0223B93C ; =0x00000BD4 + ldr r0, [r4, r0] + bl sub_0200B190 + mov r0, #0xbd + lsl r0, r0, #4 + ldr r0, [r4, r0] + bl sub_0200B3F0 + add r0, r4, #0 + bl ov96_0223B99C + bl sub_020334CC + ldr r0, [r4, #4] + bl sub_020181C4 + add r0, r5, #0 + bl sub_02006830 + mov r0, #0 + add r1, r0, #0 + bl sub_02017798 + mov r0, #0x44 + bl sub_0201807C + mov r0, #1 + pop {r3, r4, r5, pc} + ; .align 2, 0 +_0223B934: .word 0x00000BDC +_0223B938: .word 0x00000BD8 +_0223B93C: .word 0x00000BD4 + thumb_func_end ov96_0223B8CC + + thumb_func_start ov96_0223B940 +ov96_0223B940: ; 0x0223B940 + push {r3, lr} + bl sub_0201DCAC + bl sub_0200A858 + ldr r3, _0223B958 ; =0x027E0000 + ldr r1, _0223B95C ; =0x00003FF8 + mov r0, #1 + ldr r2, [r3, r1] + orr r0, r2 + str r0, [r3, r1] + pop {r3, pc} + ; .align 2, 0 +_0223B958: .word 0x027E0000 +_0223B95C: .word 0x00003FF8 + thumb_func_end ov96_0223B940 + + thumb_func_start ov96_0223B960 +ov96_0223B960: ; 0x0223B960 + push {r4, lr} + sub sp, #0x28 + ldr r4, _0223B97C ; =0x0223DAA8 + add r3, sp, #0 + mov r2, #5 +_0223B96A: + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + sub r2, r2, #1 + bne _0223B96A + add r0, sp, #0 + bl sub_0201FE94 + add sp, #0x28 + pop {r4, pc} + ; .align 2, 0 +_0223B97C: .word 0x0223DAA8 + thumb_func_end ov96_0223B960 + + thumb_func_start ov96_0223B980 +ov96_0223B980: ; 0x0223B980 + push {r4, lr} + add r4, r0, #0 + add r0, r1, #0 + bl sub_02006840 + mov r1, #0 + str r0, [r4, #0] + add r0, r4, #0 + add r2, r1, #0 + str r1, [r4, #0x10] + bl ov96_0223BC5C + pop {r4, pc} + ; .align 2, 0 + thumb_func_end ov96_0223B980 + + thumb_func_start ov96_0223B99C +ov96_0223B99C: ; 0x0223B99C + bx lr + ; .align 2, 0 + thumb_func_end ov96_0223B99C + + thumb_func_start ov96_0223B9A0 +ov96_0223B9A0: ; 0x0223B9A0 + push {r4, lr} + sub sp, #0x10 + ldr r4, _0223B9CC ; =0x0223DA98 + add r3, sp, #0 + add r2, r3, #0 + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + ldmia r4!, {r0, r1} + stmia r3!, {r0, r1} + add r0, r2, #0 + bl sub_0201E86C + mov r0, #0x14 + mov r1, #0x44 + bl sub_0201F834 + bl sub_0201E994 + bl sub_0201F8E4 + add sp, #0x10 + pop {r4, pc} + ; .align 2, 0 +_0223B9CC: .word 0x0223DA98 + thumb_func_end ov96_0223B9A0 + + thumb_func_start ov96_0223B9D0 +ov96_0223B9D0: ; 0x0223B9D0 + push {r3, r4, r5, r6, r7, lr} + sub sp, #0x18 + add r6, r0, #0 + mov r0, #0x68 + mov r1, #0x44 + bl sub_02006C24 + str r0, [sp, #0x14] + bl sub_020A7944 + mov r0, #0 + str r0, [sp] + mov r1, #0x7e + str r1, [sp, #4] + str r0, [sp, #8] + mov r3, #0x20 + str r3, [sp, #0xc] + mov r2, #0x44 + str r2, [sp, #0x10] + add r2, r0, #0 + bl sub_0200A784 + ldr r1, _0223BAC8 ; =0x00000BFC + mov r0, #0xa + add r1, r6, r1 + mov r2, #0x44 + bl sub_020095C4 + ldr r1, _0223BACC ; =0x00000BF8 + mov r2, #1 + str r0, [r6, r1] + add r0, r1, #4 + add r0, r6, r0 + mov r1, #0 + lsl r2, r2, #0x14 + bl sub_0200964C + ldr r7, _0223BAD0 ; =0x00000D24 + mov r4, #0 + add r5, r6, #0 +_0223BA20: + mov r0, #2 + add r1, r4, #0 + mov r2, #0x44 + bl sub_02009714 + str r0, [r5, r7] + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223BA20 + mov r0, #0 + str r0, [sp] + mov r3, #1 + str r3, [sp, #4] + mov r0, #0x44 + str r0, [sp, #8] + ldr r0, _0223BAD0 ; =0x00000D24 + ldr r1, [sp, #0x14] + ldr r0, [r6, r0] + mov r2, #0x23 + bl sub_02009A4C + ldr r1, _0223BAD4 ; =0x00000D34 + mov r3, #0 + str r0, [r6, r1] + str r3, [sp] + mov r0, #1 + str r0, [sp, #4] + mov r0, #3 + str r0, [sp, #8] + mov r0, #0x44 + sub r1, #0xc + str r0, [sp, #0xc] + ldr r0, [r6, r1] + ldr r1, [sp, #0x14] + mov r2, #9 + bl sub_02009B04 + ldr r1, _0223BAD8 ; =0x00000D38 + mov r2, #0x24 + str r0, [r6, r1] + mov r0, #0 + str r0, [sp] + mov r0, #2 + str r0, [sp, #4] + mov r0, #0x44 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r6, r1] + ldr r1, [sp, #0x14] + mov r3, #1 + bl sub_02009BC4 + ldr r1, _0223BADC ; =0x00000D3C + mov r2, #0x25 + str r0, [r6, r1] + mov r0, #0 + str r0, [sp] + mov r0, #3 + str r0, [sp, #4] + mov r0, #0x44 + sub r1, #0xc + str r0, [sp, #8] + ldr r0, [r6, r1] + ldr r1, [sp, #0x14] + mov r3, #1 + bl sub_02009BC4 + mov r1, #0x35 + lsl r1, r1, #6 + str r0, [r6, r1] + sub r1, #0xc + ldr r0, [r6, r1] + bl sub_0200A328 + ldr r0, _0223BAD8 ; =0x00000D38 + ldr r0, [r6, r0] + bl sub_0200A5C8 + ldr r0, [sp, #0x14] + bl sub_02006CA8 + add sp, #0x18 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BAC8: .word 0x00000BFC +_0223BACC: .word 0x00000BF8 +_0223BAD0: .word 0x00000D24 +_0223BAD4: .word 0x00000D34 +_0223BAD8: .word 0x00000D38 +_0223BADC: .word 0x00000D3C + thumb_func_end ov96_0223B9D0 + + thumb_func_start ov96_0223BAE0 +ov96_0223BAE0: ; 0x0223BAE0 + push {r3, r4} + ldr r4, _0223BB08 ; =0x00000BF8 + ldr r1, [r1, r4] + str r1, [r0, #0] + str r2, [r0, #4] + mov r2, #0 + mov r1, #1 + str r2, [r0, #0x10] + lsl r1, r1, #0xc + str r1, [r0, #0x14] + str r1, [r0, #0x18] + str r1, [r0, #0x1c] + strh r2, [r0, #0x20] + mov r1, #1 + str r1, [r0, #0x24] + str r3, [r0, #0x28] + mov r1, #0x44 + str r1, [r0, #0x2c] + pop {r3, r4} + bx lr + ; .align 2, 0 +_0223BB08: .word 0x00000BF8 + thumb_func_end ov96_0223BAE0 + + thumb_func_start ov96_0223BB0C +ov96_0223BB0C: ; 0x0223BB0C + push {r4, r5, r6, r7, lr} + sub sp, #0x5c + mov r1, #0 + add r5, r0, #0 + str r1, [sp] + sub r0, r1, #1 + str r0, [sp, #4] + str r0, [sp, #8] + str r1, [sp, #0xc] + ldr r2, _0223BBBC ; =0x00000D24 + str r1, [sp, #0x10] + ldr r0, [r5, r2] + add r3, r1, #0 + str r0, [sp, #0x14] + add r0, r2, #4 + ldr r0, [r5, r0] + str r0, [sp, #0x18] + add r0, r2, #0 + add r0, #8 + ldr r0, [r5, r0] + str r0, [sp, #0x1c] + add r0, r2, #0 + add r0, #0xc + ldr r0, [r5, r0] + add r2, #0x40 + str r0, [sp, #0x20] + str r1, [sp, #0x24] + add r0, r5, r2 + add r2, r1, #0 + str r1, [sp, #0x28] + bl sub_020093B4 + ldr r2, _0223BBC0 ; =0x00000D64 + add r0, sp, #0x2c + add r1, r5, #0 + add r2, r5, r2 + mov r3, #1 + bl ov96_0223BAE0 + mov r7, #0xdd + ldr r4, _0223BBC4 ; =0x0223DA80 + mov r6, #0 + lsl r7, r7, #4 +_0223BB62: + ldrh r0, [r4] + lsl r0, r0, #0xc + str r0, [sp, #0x34] + ldrh r0, [r4, #2] + lsl r0, r0, #0xc + str r0, [sp, #0x38] + add r0, sp, #0x2c + bl sub_02021AA0 + mov r1, #0xdd + lsl r1, r1, #4 + str r0, [r5, r1] + add r0, r1, #0 + ldr r0, [r5, r0] + mov r1, #1 + bl sub_02021CC8 + mov r0, #0xdd + lsl r0, r0, #4 + ldr r0, [r5, r0] + add r1, r6, #0 + bl sub_02021D6C + ldr r0, [r5, r7] + mov r1, #0 + bl sub_02021CAC + add r6, r6, #1 + add r4, r4, #4 + add r5, r5, #4 + cmp r6, #2 + blt _0223BB62 + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF0C + mov r0, #0x10 + mov r1, #1 + bl sub_0201FF74 + bl sub_02039734 + add sp, #0x5c + pop {r4, r5, r6, r7, pc} + nop +_0223BBBC: .word 0x00000D24 +_0223BBC0: .word 0x00000D64 +_0223BBC4: .word 0x0223DA80 + thumb_func_end ov96_0223BB0C + + thumb_func_start ov96_0223BBC8 +ov96_0223BBC8: ; 0x0223BBC8 + push {r3, r4, r5, r6, lr} + sub sp, #0xc + ldr r5, _0223BBF8 ; =0x0223DA78 + add r4, sp, #4 + ldrh r6, [r5] + add r3, sp, #4 + strh r6, [r4] + ldrh r6, [r5, #2] + strh r6, [r4, #2] + ldrh r6, [r5, #4] + ldrh r5, [r5, #6] + strh r6, [r4, #4] + strh r5, [r4, #6] + strb r1, [r4, #2] + strh r2, [r4, #6] + mov r1, #0x44 + str r1, [sp] + add r1, r3, #0 + mov r2, #0x1f + mov r3, #0xb + bl sub_02002100 + add sp, #0xc + pop {r3, r4, r5, r6, pc} + ; .align 2, 0 +_0223BBF8: .word 0x0223DA78 + thumb_func_end ov96_0223BBC8 + + thumb_func_start ov96_0223BBFC +ov96_0223BBFC: ; 0x0223BBFC + str r1, [r0, #0x1c] + str r2, [r0, #0x20] + bx lr + ; .align 2, 0 + thumb_func_end ov96_0223BBFC + + thumb_func_start ov96_0223BC04 +ov96_0223BC04: ; 0x0223BC04 + push {r4, r5, r6, lr} + add r5, r1, #0 + add r4, r2, #0 + bl sub_020C3D98 + add r6, r0, #0 + ldr r0, _0223BC28 ; =0x0223DEEC + add r1, r5, #0 + ldr r0, [r0, #4] + add r2, r4, #0 + bl sub_020A5448 + add r4, r0, #0 + add r0, r6, #0 + bl sub_020C3DAC + add r0, r4, #0 + pop {r4, r5, r6, pc} + ; .align 2, 0 +_0223BC28: .word 0x0223DEEC + thumb_func_end ov96_0223BC04 + + thumb_func_start ov96_0223BC2C +ov96_0223BC2C: ; 0x0223BC2C + push {r3, r4, r5, lr} + add r5, r1, #0 + beq _0223BC48 + bl sub_020C3D98 + add r4, r0, #0 + ldr r0, _0223BC4C ; =0x0223DEEC + add r1, r5, #0 + ldr r0, [r0, #4] + bl sub_020A55D8 + add r0, r4, #0 + bl sub_020C3DAC +_0223BC48: + pop {r3, r4, r5, pc} + nop +_0223BC4C: .word 0x0223DEEC + thumb_func_end ov96_0223BC2C + + thumb_func_start ov96_0223BC50 +ov96_0223BC50: ; 0x0223BC50 + push {r3, lr} + bl ov4_021D7EAC + mov r1, #3 + sub r0, r1, r0 + pop {r3, pc} + thumb_func_end ov96_0223BC50 + + thumb_func_start ov96_0223BC5C +ov96_0223BC5C: ; 0x0223BC5C + str r1, [r0, #0x14] + str r2, [r0, #0x18] + bx lr + ; .align 2, 0 + thumb_func_end ov96_0223BC5C + + thumb_func_start ov96_0223BC64 +ov96_0223BC64: ; 0x0223BC64 + push {r4, lr} + add r4, r0, #0 + bl ov96_0223B960 + bl ov96_0223B9A0 + add r0, r4, #0 + bl ov96_0223B9D0 + add r0, r4, #0 + bl ov96_0223BB0C + ldr r0, _0223BC88 ; =ov96_0223B940 + add r1, r4, #0 + bl sub_02017798 + pop {r4, pc} + nop +_0223BC88: .word ov96_0223B940 + thumb_func_end ov96_0223BC64 + + thumb_func_start ov96_0223BC8C +ov96_0223BC8C: ; 0x0223BC8C + push {r3, r4, r5, r6, r7, lr} + add r6, r0, #0 + ldr r0, _0223BCD0 ; =0x00000D34 + ldr r0, [r6, r0] + bl sub_0200A4E4 + ldr r0, _0223BCD4 ; =0x00000D38 + ldr r0, [r6, r0] + bl sub_0200A6DC + ldr r7, _0223BCD8 ; =0x00000D24 + mov r4, #0 + add r5, r6, #0 +_0223BCA6: + ldr r0, [r5, r7] + bl sub_02009754 + add r4, r4, #1 + add r5, r5, #4 + cmp r4, #4 + blt _0223BCA6 + ldr r0, _0223BCDC ; =0x00000BF8 + ldr r0, [r6, r0] + bl sub_02021964 + ldr r0, _0223BCDC ; =0x00000BF8 + mov r1, #0 + str r1, [r6, r0] + bl sub_0200A878 + bl sub_0201E958 + bl sub_0201F8B4 + pop {r3, r4, r5, r6, r7, pc} + ; .align 2, 0 +_0223BCD0: .word 0x00000D34 +_0223BCD4: .word 0x00000D38 +_0223BCD8: .word 0x00000D24 +_0223BCDC: .word 0x00000BF8 + thumb_func_end ov96_0223BC8C + + .rodata + + + .global Unk_ov96_0223DA78 +Unk_ov96_0223DA78: ; 0x0223DA78 + .incbin "incbin/overlay96_rodata.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov96_0223DA80 +Unk_ov96_0223DA80: ; 0x0223DA80 + .incbin "incbin/overlay96_rodata.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov96_0223DA88 +Unk_ov96_0223DA88: ; 0x0223DA88 + .incbin "incbin/overlay96_rodata.bin", 0x10, 0x20 - 0x10 + + .global Unk_ov96_0223DA98 +Unk_ov96_0223DA98: ; 0x0223DA98 + .incbin "incbin/overlay96_rodata.bin", 0x20, 0x30 - 0x20 + + .global Unk_ov96_0223DAA8 +Unk_ov96_0223DAA8: ; 0x0223DAA8 + .incbin "incbin/overlay96_rodata.bin", 0x30, 0x28 + + + .data + + + .global Unk_ov96_0223DCD4 +Unk_ov96_0223DCD4: ; 0x0223DCD4 + .incbin "incbin/overlay96_data.bin", 0x174, 0xC + + + .bss + + + .global Unk_ov96_0223DEEC +Unk_ov96_0223DEEC: ; 0x0223DEEC + .space 0x4 + + .global Unk_ov96_0223DEF0 +Unk_ov96_0223DEF0: ; 0x0223DEF0 + .space 0x4 + diff --git a/asm/overlay96.s b/asm/ov96_0223BCE0.s similarity index 70% rename from asm/overlay96.s rename to asm/ov96_0223BCE0.s index c4ef830d9..ba90d15fc 100644 --- a/asm/overlay96.s +++ b/asm/ov96_0223BCE0.s @@ -1,1493 +1,10 @@ .include "macros/function.inc" .include "global.inc" + + .text - thumb_func_start ov96_0223B140 -ov96_0223B140: ; 0x0223B140 - push {r3, r4} - ldr r3, _0223B158 ; =0x0223DDE0 - mov r4, #1 - str r4, [r3, #0] - mov r4, #0 - str r4, [r3, #4] - str r0, [r3, #8] - str r1, [r3, #0xc] - str r2, [r3, #0x10] - pop {r3, r4} - bx lr - nop -_0223B158: .word 0x0223DDE0 - thumb_func_end ov96_0223B140 - - thumb_func_start ov96_0223B15C -ov96_0223B15C: ; 0x0223B15C - push {r3, lr} - ldr r1, _0223B3C8 ; =0x0223DDE0 - ldr r0, [r1, #0] - cmp r0, #0xc - bls _0223B168 - b _0223B3C4 -_0223B168: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B174: ; jump table - .short _0223B3C4 - _0223B174 - 2 ; case 0 - .short _0223B3C4 - _0223B174 - 2 ; case 1 - .short _0223B18E - _0223B174 - 2 ; case 2 - .short _0223B3B8 - _0223B174 - 2 ; case 3 - .short _0223B1D8 - _0223B174 - 2 ; case 4 - .short _0223B3B8 - _0223B174 - 2 ; case 5 - .short _0223B248 - _0223B174 - 2 ; case 6 - .short _0223B3B8 - _0223B174 - 2 ; case 7 - .short _0223B2BA - _0223B174 - 2 ; case 8 - .short _0223B3B8 - _0223B174 - 2 ; case 9 - .short _0223B32C - _0223B174 - 2 ; case 10 - .short _0223B3B8 - _0223B174 - 2 ; case 11 - .short _0223B3C4 - _0223B174 - 2 ; case 12 -_0223B18E: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B19C - cmp r0, #7 - beq _0223B1B4 - pop {r3, pc} -_0223B19C: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov96_0223B608 - ldr r1, _0223B3C8 ; =0x0223DDE0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B1B4: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE20 - cmp r0, #0 - ble _0223B1CA - ldr r0, _0223B3CC ; =0x0223DEE0 - ldrb r1, [r0, #3] - ldr r0, _0223B3C8 ; =0x0223DDE0 - b _0223B1D0 -_0223B1CA: - mov r1, #1 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 -_0223B1D0: - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B1D8: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B1E6 - cmp r0, #7 - beq _0223B1FE - pop {r3, pc} -_0223B1E6: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov96_0223B608 - ldr r1, _0223B3C8 ; =0x0223DDE0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B1FE: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE20 - ldr r1, _0223B3D0 ; =0x00000A38 - cmp r0, r1 - bne _0223B216 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0 - str r1, [r0, #4] - b _0223B242 -_0223B216: - ldr r0, _0223B3CC ; =0x0223DEE0 - ldr r0, [r0, #8] - ldrb r0, [r0] - cmp r0, #2 - beq _0223B226 - cmp r0, #5 - beq _0223B230 - b _0223B23A -_0223B226: - mov r1, #2 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B242 -_0223B230: - mov r1, #1 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B242 -_0223B23A: - mov r1, #4 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] -_0223B242: - bl ov60_0221FDEC - pop {r3, pc} -_0223B248: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B256 - cmp r0, #7 - beq _0223B26E - pop {r3, pc} -_0223B256: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov96_0223B608 - ldr r1, _0223B3C8 ; =0x0223DDE0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B26E: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - ldr r2, _0223B3CC ; =0x0223DEE0 - str r1, [r0, #0] - ldrb r2, [r2, #3] - cmp r2, #5 - bhi _0223B2AC - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0223B288: ; jump table - .short _0223B2AC - _0223B288 - 2 ; case 0 - .short _0223B294 - _0223B288 - 2 ; case 1 - .short _0223B29A - _0223B288 - 2 ; case 2 - .short _0223B2AC - _0223B288 - 2 ; case 3 - .short _0223B2A0 - _0223B288 - 2 ; case 4 - .short _0223B2A6 - _0223B288 - 2 ; case 5 -_0223B294: - mov r1, #0 - str r1, [r0, #4] - b _0223B2B4 -_0223B29A: - sub r1, #0xf - str r1, [r0, #4] - b _0223B2B4 -_0223B2A0: - sub r1, #0xd - str r1, [r0, #4] - b _0223B2B4 -_0223B2A6: - sub r1, #0xe - str r1, [r0, #4] - b _0223B2B4 -_0223B2AC: - mov r1, #4 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] -_0223B2B4: - bl ov60_0221FDEC - pop {r3, pc} -_0223B2BA: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B2C8 - cmp r0, #7 - beq _0223B2E0 - pop {r3, pc} -_0223B2C8: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov96_0223B608 - ldr r1, _0223B3C8 ; =0x0223DDE0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B2E0: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - ldr r2, _0223B3CC ; =0x0223DEE0 - str r1, [r0, #0] - ldrb r2, [r2, #3] - cmp r2, #5 - bhi _0223B31E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0223B2FA: ; jump table - .short _0223B31E - _0223B2FA - 2 ; case 0 - .short _0223B306 - _0223B2FA - 2 ; case 1 - .short _0223B31E - _0223B2FA - 2 ; case 2 - .short _0223B30C - _0223B2FA - 2 ; case 3 - .short _0223B312 - _0223B2FA - 2 ; case 4 - .short _0223B318 - _0223B2FA - 2 ; case 5 -_0223B306: - mov r1, #0 - str r1, [r0, #4] - b _0223B326 -_0223B30C: - mov r1, #1 - str r1, [r0, #4] - b _0223B326 -_0223B312: - mov r1, #2 - str r1, [r0, #4] - b _0223B326 -_0223B318: - sub r1, #0xe - str r1, [r0, #4] - b _0223B326 -_0223B31E: - mov r1, #4 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] -_0223B326: - bl ov60_0221FDEC - pop {r3, pc} -_0223B32C: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B33A - cmp r0, #7 - beq _0223B352 - pop {r3, pc} -_0223B33A: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov96_0223B608 - ldr r1, _0223B3C8 ; =0x0223DDE0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B352: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - bl ov60_0221FE20 - cmp r0, #8 - bne _0223B368 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0 - str r1, [r0, #4] - b _0223B3B2 -_0223B368: - ldr r0, _0223B3CC ; =0x0223DEE0 - ldrb r0, [r0, #3] - cmp r0, #5 - bhi _0223B3AA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B37C: ; jump table - .short _0223B3AA - _0223B37C - 2 ; case 0 - .short _0223B388 - _0223B37C - 2 ; case 1 - .short _0223B3AA - _0223B37C - 2 ; case 2 - .short _0223B390 - _0223B37C - 2 ; case 3 - .short _0223B398 - _0223B37C - 2 ; case 4 - .short _0223B3A0 - _0223B37C - 2 ; case 5 -_0223B388: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #0 - str r1, [r0, #4] - b _0223B3B2 -_0223B390: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #1 - str r1, [r0, #4] - b _0223B3B2 -_0223B398: - ldr r0, _0223B3C8 ; =0x0223DDE0 - mov r1, #2 - str r1, [r0, #4] - b _0223B3B2 -_0223B3A0: - mov r1, #1 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B3B2 -_0223B3AA: - mov r1, #4 - ldr r0, _0223B3C8 ; =0x0223DDE0 - mvn r1, r1 - str r1, [r0, #4] -_0223B3B2: - bl ov60_0221FDEC - pop {r3, pc} -_0223B3B8: - mov r0, #0xc - str r0, [r1, #0] - sub r0, #0x10 - str r0, [r1, #4] - bl ov60_0221FDEC -_0223B3C4: - pop {r3, pc} - nop -_0223B3C8: .word 0x0223DDE0 -_0223B3CC: .word 0x0223DEE0 -_0223B3D0: .word 0x00000A38 - thumb_func_end ov96_0223B15C - - thumb_func_start ov96_0223B3D4 -ov96_0223B3D4: ; 0x0223B3D4 - ldr r1, _0223B3F0 ; =0x0223DDE0 - ldr r0, [r1, #0] - cmp r0, #1 - beq _0223B3E2 - cmp r0, #0xc - beq _0223B3E6 - b _0223B3EC -_0223B3E2: - mov r0, #1 - bx lr -_0223B3E6: - mov r0, #1 - str r0, [r1, #0] - bx lr -_0223B3EC: - mov r0, #0 - bx lr - ; .align 2, 0 -_0223B3F0: .word 0x0223DDE0 - thumb_func_end ov96_0223B3D4 - - thumb_func_start ov96_0223B3F4 -ov96_0223B3F4: ; 0x0223B3F4 - ldr r0, _0223B3FC ; =0x0223DDE0 - ldr r0, [r0, #4] - bx lr - nop -_0223B3FC: .word 0x0223DDE0 - thumb_func_end ov96_0223B3F4 - - thumb_func_start ov96_0223B400 -ov96_0223B400: ; 0x0223B400 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl ov60_0221FC84 - ldr r0, _0223B440 ; =0x0223DDE0 - sub r1, r4, #1 - strb r1, [r0, #0x14] - mov r0, #2 - str r0, [sp] - ldr r0, _0223B444 ; =0x0223DB60 - ldr r1, _0223B448 ; =0x0223DDF4 - ldr r3, _0223B44C ; =0x0223DEE3 - mov r2, #1 - bl ov96_0223B5D0 - cmp r0, #0 - beq _0223B42E - ldr r0, _0223B440 ; =0x0223DDE0 - mov r1, #2 - str r1, [r0, #0] - add sp, #4 - pop {r3, r4, pc} -_0223B42E: - ldr r0, _0223B440 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - sub r1, #0x11 - str r1, [r0, #4] - bl ov60_0221FDEC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223B440: .word 0x0223DDE0 -_0223B444: .word 0x0223DB60 -_0223B448: .word 0x0223DDF4 -_0223B44C: .word 0x0223DEE3 - thumb_func_end ov96_0223B400 - - thumb_func_start ov96_0223B450 -ov96_0223B450: ; 0x0223B450 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _0223B49C ; =0x0223DEE0 - add r6, r2, #0 - add r4, r1, #0 - str r6, [r0, #8] - bl ov60_0221FC84 - ldr r0, _0223B4A0 ; =0x0223DDE0 - sub r1, r5, #1 - strb r1, [r0, #0x14] - sub r1, r4, #1 - strb r1, [r0, #0x15] - ldr r0, _0223B4A4 ; =0x00000A38 - ldr r1, _0223B4A8 ; =0x0223DDF4 - str r0, [sp] - ldr r0, _0223B4AC ; =0x0223DBAC - mov r2, #2 - add r3, r6, #0 - bl ov96_0223B5D0 - cmp r0, #0 - beq _0223B48A - ldr r0, _0223B4A0 ; =0x0223DDE0 - mov r1, #4 - str r1, [r0, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0223B48A: - ldr r0, _0223B4A0 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - sub r1, #0x11 - str r1, [r0, #4] - bl ov60_0221FDEC - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223B49C: .word 0x0223DEE0 -_0223B4A0: .word 0x0223DDE0 -_0223B4A4: .word 0x00000A38 -_0223B4A8: .word 0x0223DDF4 -_0223B4AC: .word 0x0223DBAC - thumb_func_end ov96_0223B450 - - thumb_func_start ov96_0223B4B0 -ov96_0223B4B0: ; 0x0223B4B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - bl ov60_0221FC84 - ldr r0, _0223B514 ; =0x0223DDF4 - add r1, r4, #0 - mov r2, #0xe4 - bl sub_020D50B8 - ldr r0, _0223B518 ; =0x0223DEC0 - sub r1, r5, #1 - strb r1, [r0, #0x18] - sub r1, r6, #1 - strb r1, [r0, #0x19] - ldr r3, _0223B51C ; =0x0223DEDB - ldr r2, _0223B520 ; =0x0223DDEC - strb r7, [r0, #0x1a] - mov r1, #8 -_0223B4DA: - ldrb r0, [r2] - add r2, r2, #1 - strb r0, [r3] - add r3, r3, #1 - sub r1, r1, #1 - bne _0223B4DA - mov r0, #2 - str r0, [sp] - ldr r0, _0223B524 ; =0x0223DBF8 - ldr r1, _0223B514 ; =0x0223DDF4 - ldr r3, _0223B528 ; =0x0223DEE3 - mov r2, #0xef - bl ov96_0223B5D0 - cmp r0, #0 - beq _0223B502 - ldr r0, _0223B52C ; =0x0223DDE0 - mov r1, #6 - str r1, [r0, #0] - pop {r3, r4, r5, r6, r7, pc} -_0223B502: - ldr r0, _0223B52C ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - sub r1, #0x11 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, r4, r5, r6, r7, pc} - nop -_0223B514: .word 0x0223DDF4 -_0223B518: .word 0x0223DEC0 -_0223B51C: .word 0x0223DEDB -_0223B520: .word 0x0223DDEC -_0223B524: .word 0x0223DBF8 -_0223B528: .word 0x0223DEE3 -_0223B52C: .word 0x0223DDE0 - thumb_func_end ov96_0223B4B0 - - thumb_func_start ov96_0223B530 -ov96_0223B530: ; 0x0223B530 - push {r3, lr} - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - ldr r0, _0223B564 ; =0x0223DC44 - ldr r1, _0223B568 ; =0x0223DDF4 - ldr r3, _0223B56C ; =0x0223DEE3 - mov r2, #0 - bl ov96_0223B5D0 - cmp r0, #0 - beq _0223B552 - ldr r0, _0223B570 ; =0x0223DDE0 - mov r1, #8 - str r1, [r0, #0] - pop {r3, pc} -_0223B552: - ldr r0, _0223B570 ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - sub r1, #0x11 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - nop -_0223B564: .word 0x0223DC44 -_0223B568: .word 0x0223DDF4 -_0223B56C: .word 0x0223DEE3 -_0223B570: .word 0x0223DDE0 - thumb_func_end ov96_0223B530 - - thumb_func_start ov96_0223B574 -ov96_0223B574: ; 0x0223B574 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x1c - add r4, r1, #0 - bl sub_020C3FA0 - ldr r0, _0223B5C0 ; =0x0223DDF4 - add r1, r5, #0 - mov r2, #0x64 - bl sub_020D50B8 - ldr r0, _0223B5C4 ; =0x0223DEE0 - str r4, [r0, #8] - bl ov60_0221FC84 - mov r0, #8 - str r0, [sp] - ldr r3, _0223B5C4 ; =0x0223DEE0 - ldr r0, _0223B5C8 ; =0x0223DC8C - ldr r1, _0223B5C0 ; =0x0223DDF4 - ldr r3, [r3, #8] - mov r2, #0x64 - bl ov96_0223B5D0 - cmp r0, #0 - beq _0223B5B0 - ldr r0, _0223B5CC ; =0x0223DDE0 - mov r1, #0xa - str r1, [r0, #0] - pop {r3, r4, r5, pc} -_0223B5B0: - ldr r0, _0223B5CC ; =0x0223DDE0 - mov r1, #0xc - str r1, [r0, #0] - sub r1, #0x11 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223B5C0: .word 0x0223DDF4 -_0223B5C4: .word 0x0223DEE0 -_0223B5C8: .word 0x0223DC8C -_0223B5CC: .word 0x0223DDE0 - thumb_func_end ov96_0223B574 - - thumb_func_start ov96_0223B5D0 -ov96_0223B5D0: ; 0x0223B5D0 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, [sp, #0x18] - str r3, [sp] - str r1, [sp, #4] - add r4, r2, #0 - ldr r1, _0223B604 ; =0x0223DDE0 - add r2, r5, #0 - ldr r1, [r1, #8] - add r3, r4, #0 - bl ov60_0221FCA8 - cmp r0, #0 - beq _0223B5F6 - cmp r0, #1 - beq _0223B5FC - cmp r0, #2 - b _0223B5FC -_0223B5F6: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223B5FC: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223B604: .word 0x0223DDE0 - thumb_func_end ov96_0223B5D0 - - thumb_func_start ov96_0223B608 -ov96_0223B608: ; 0x0223B608 - push {r4, lr} - cmp r0, #0x20 - bhi _0223B680 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B61A: ; jump table - .short _0223B65C - _0223B61A - 2 ; case 0 - .short _0223B65C - _0223B61A - 2 ; case 1 - .short _0223B662 - _0223B61A - 2 ; case 2 - .short _0223B65C - _0223B61A - 2 ; case 3 - .short _0223B65C - _0223B61A - 2 ; case 4 - .short _0223B65C - _0223B61A - 2 ; case 5 - .short _0223B65C - _0223B61A - 2 ; case 6 - .short _0223B680 - _0223B61A - 2 ; case 7 - .short _0223B662 - _0223B61A - 2 ; case 8 - .short _0223B65C - _0223B61A - 2 ; case 9 - .short _0223B65C - _0223B61A - 2 ; case 10 - .short _0223B668 - _0223B61A - 2 ; case 11 - .short _0223B66E - _0223B61A - 2 ; case 12 - .short _0223B66E - _0223B61A - 2 ; case 13 - .short _0223B65C - _0223B61A - 2 ; case 14 - .short _0223B67A - _0223B61A - 2 ; case 15 - .short _0223B674 - _0223B61A - 2 ; case 16 - .short _0223B674 - _0223B61A - 2 ; case 17 - .short _0223B674 - _0223B61A - 2 ; case 18 - .short _0223B674 - _0223B61A - 2 ; case 19 - .short _0223B65C - _0223B61A - 2 ; case 20 - .short _0223B65C - _0223B61A - 2 ; case 21 - .short _0223B65C - _0223B61A - 2 ; case 22 - .short _0223B65C - _0223B61A - 2 ; case 23 - .short _0223B680 - _0223B61A - 2 ; case 24 - .short _0223B662 - _0223B61A - 2 ; case 25 - .short _0223B674 - _0223B61A - 2 ; case 26 - .short _0223B674 - _0223B61A - 2 ; case 27 - .short _0223B674 - _0223B61A - 2 ; case 28 - .short _0223B674 - _0223B61A - 2 ; case 29 - .short _0223B67A - _0223B61A - 2 ; case 30 - .short _0223B674 - _0223B61A - 2 ; case 31 - .short _0223B65C - _0223B61A - 2 ; case 32 -_0223B65C: - mov r4, #4 - mvn r4, r4 - b _0223B684 -_0223B662: - mov r4, #4 - mvn r4, r4 - b _0223B684 -_0223B668: - mov r4, #6 - mvn r4, r4 - b _0223B684 -_0223B66E: - mov r4, #6 - mvn r4, r4 - b _0223B684 -_0223B674: - mov r4, #1 - mvn r4, r4 - b _0223B684 -_0223B67A: - mov r4, #1 - mvn r4, r4 - b _0223B684 -_0223B680: - mov r4, #4 - mvn r4, r4 -_0223B684: - mov r0, #4 - mvn r0, r0 - cmp r4, r0 - beq _0223B69C - bl ov4_02213898 - cmp r0, #9 - beq _0223B698 - mov r4, #5 - mvn r4, r4 -_0223B698: - bl ov4_021D76E8 -_0223B69C: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov96_0223B608 - - thumb_func_start ov96_0223B6A0 -ov96_0223B6A0: ; 0x0223B6A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223B6B4 - cmp r0, #1 - beq _0223B7A8 - b _0223B7BE -_0223B6B4: - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _0223B7C4 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _0223B7C8 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r2, #5 - mov r0, #3 - mov r1, #0x44 - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, _0223B7CC ; =0x000012C4 - add r0, r6, #0 - mov r2, #0x44 - bl sub_0200681C - ldr r2, _0223B7CC ; =0x000012C4 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x44 - bl sub_02018340 - str r0, [r4, #4] - ldr r0, _0223B7D0 ; =0x0223DEEC - add r2, sp, #0 - ldr r3, _0223B7D4 ; =0x0223DA88 - str r4, [r0, #0] - add r7, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r7, #0 - bl sub_02018368 - mov r0, #0xb - mov r1, #0x20 - mov r2, #0x44 - bl sub_0200B368 - mov r1, #0xbd - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r2, _0223B7D8 ; =0x0000029E - mov r0, #0 - mov r1, #0x1a - mov r3, #0x44 - bl sub_0200B144 - ldr r1, _0223B7DC ; =0x00000BD4 - ldr r2, _0223B7E0 ; =0x000002A2 - str r0, [r4, r1] - mov r0, #0 - mov r1, #0x1a - mov r3, #0x44 - bl sub_0200B144 - ldr r1, _0223B7E4 ; =0x00000BD8 - ldr r2, _0223B7E8 ; =0x000002B7 - str r0, [r4, r1] - mov r0, #0 - mov r1, #0x1a - mov r3, #0x44 - bl sub_0200B144 - ldr r1, _0223B7EC ; =0x00000BDC - str r0, [r4, r1] - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - add r0, r4, #0 - add r1, r6, #0 - bl ov96_0223B980 - add r0, r4, #0 - bl ov96_0223BC64 - mov r1, #0 - mov r0, #0x34 - add r2, r1, #0 - bl sub_02004550 - ldr r1, _0223B7F0 ; =0x00020020 - mov r0, #0x44 - bl sub_02018144 - str r0, [r4, #0x24] - add r0, #0x1f - mov r1, #0x1f - bic r0, r1 - mov r1, #2 - lsl r1, r1, #0x10 - mov r2, #0 - bl sub_020A5404 - str r0, [r4, #0x28] - ldr r1, _0223B7F4 ; =0x00000497 - mov r0, #0xb - mov r2, #1 - bl sub_02004550 - mov r0, #1 - str r0, [r5, #0] - b _0223B7BE -_0223B7A8: - bl sub_02099550 - bl sub_020995B4 - bl sub_02033478 - mov r0, #0 - str r0, [r5, #0] - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223B7BE: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B7C4: .word 0xFFFFE0FF -_0223B7C8: .word 0x04001000 -_0223B7CC: .word 0x000012C4 -_0223B7D0: .word 0x0223DEEC -_0223B7D4: .word 0x0223DA88 -_0223B7D8: .word 0x0000029E -_0223B7DC: .word 0x00000BD4 -_0223B7E0: .word 0x000002A2 -_0223B7E4: .word 0x00000BD8 -_0223B7E8: .word 0x000002B7 -_0223B7EC: .word 0x00000BDC -_0223B7F0: .word 0x00020020 -_0223B7F4: .word 0x00000497 - thumb_func_end ov96_0223B6A0 - - thumb_func_start ov96_0223B7F8 -ov96_0223B7F8: ; 0x0223B7F8 - push {r4, r5, r6, lr} - add r4, r1, #0 - bl sub_0200682C - add r5, r0, #0 - bl ov4_021D8018 - bl ov96_0223B15C - bl ov4_021D8018 - ldr r1, [r4, #0] - cmp r1, #5 - bhi _0223B8A0 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B820: ; jump table - .short _0223B82C - _0223B820 - 2 ; case 0 - .short _0223B848 - _0223B820 - 2 ; case 1 - .short _0223B85C - _0223B820 - 2 ; case 2 - .short _0223B86A - _0223B820 - 2 ; case 3 - .short _0223B87E - _0223B820 - 2 ; case 4 - .short _0223B89C - _0223B820 - 2 ; case 5 -_0223B82C: - bl sub_020334A4 - cmp r0, #0 - beq _0223B8A0 - ldr r1, [r5, #0x28] - ldr r0, _0223B8B0 ; =0x0223DEEC - str r1, [r0, #4] - ldr r0, _0223B8B4 ; =ov96_0223BC04 - ldr r1, _0223B8B8 ; =ov96_0223BC2C - bl ov4_021D776C - mov r0, #1 - str r0, [r4, #0] - b _0223B8A0 -_0223B848: - ldr r3, [r5, #0x10] - mov r2, #0xc - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223B8BC ; =0x0223DCD4 - add r0, r5, #0 - ldr r2, [r2, r6] - blx r2 - str r0, [r4, #0] - b _0223B8A0 -_0223B85C: - bl sub_0200F2AC - cmp r0, #0 - beq _0223B8A0 - mov r0, #3 - str r0, [r4, #0] - b _0223B8A0 -_0223B86A: - ldr r3, [r5, #0x10] - mov r2, #0xc - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223B8C0 ; =0x0223DCD8 - add r0, r5, #0 - ldr r2, [r2, r6] - blx r2 - str r0, [r4, #0] - b _0223B8A0 -_0223B87E: - bl sub_0200F2AC - cmp r0, #0 - beq _0223B8A0 - ldr r3, [r5, #0x10] - mov r2, #0xc - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223B8C4 ; =0x0223DCDC - ldr r1, [r4, #0] - ldr r2, [r2, r6] - add r0, r5, #0 - blx r2 - str r0, [r4, #0] - b _0223B8A0 -_0223B89C: - mov r0, #1 - pop {r4, r5, r6, pc} -_0223B8A0: - ldr r0, _0223B8C8 ; =0x00000BF8 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223B8AC - bl sub_020219F8 -_0223B8AC: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223B8B0: .word 0x0223DEEC -_0223B8B4: .word ov96_0223BC04 -_0223B8B8: .word ov96_0223BC2C -_0223B8BC: .word 0x0223DCD4 -_0223B8C0: .word 0x0223DCD8 -_0223B8C4: .word 0x0223DCDC -_0223B8C8: .word 0x00000BF8 - thumb_func_end ov96_0223B7F8 - - thumb_func_start ov96_0223B8CC -ov96_0223B8CC: ; 0x0223B8CC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0x24] - bl sub_020181C4 - bl sub_020995C4 - bl sub_02099560 - add r0, r4, #0 - bl ov96_0223BC8C - ldr r0, _0223B934 ; =0x00000BDC - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _0223B938 ; =0x00000BD8 - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _0223B93C ; =0x00000BD4 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0xbd - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200B3F0 - add r0, r4, #0 - bl ov96_0223B99C - bl sub_020334CC - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - mov r0, #0x44 - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223B934: .word 0x00000BDC -_0223B938: .word 0x00000BD8 -_0223B93C: .word 0x00000BD4 - thumb_func_end ov96_0223B8CC - - thumb_func_start ov96_0223B940 -ov96_0223B940: ; 0x0223B940 - push {r3, lr} - bl sub_0201DCAC - bl sub_0200A858 - ldr r3, _0223B958 ; =0x027E0000 - ldr r1, _0223B95C ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r3, pc} - ; .align 2, 0 -_0223B958: .word 0x027E0000 -_0223B95C: .word 0x00003FF8 - thumb_func_end ov96_0223B940 - - thumb_func_start ov96_0223B960 -ov96_0223B960: ; 0x0223B960 - push {r4, lr} - sub sp, #0x28 - ldr r4, _0223B97C ; =0x0223DAA8 - add r3, sp, #0 - mov r2, #5 -_0223B96A: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223B96A - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_0223B97C: .word 0x0223DAA8 - thumb_func_end ov96_0223B960 - - thumb_func_start ov96_0223B980 -ov96_0223B980: ; 0x0223B980 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl sub_02006840 - mov r1, #0 - str r0, [r4, #0] - add r0, r4, #0 - add r2, r1, #0 - str r1, [r4, #0x10] - bl ov96_0223BC5C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov96_0223B980 - - thumb_func_start ov96_0223B99C -ov96_0223B99C: ; 0x0223B99C - bx lr - ; .align 2, 0 - thumb_func_end ov96_0223B99C - - thumb_func_start ov96_0223B9A0 -ov96_0223B9A0: ; 0x0223B9A0 - push {r4, lr} - sub sp, #0x10 - ldr r4, _0223B9CC ; =0x0223DA98 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_0201E86C - mov r0, #0x14 - mov r1, #0x44 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0223B9CC: .word 0x0223DA98 - thumb_func_end ov96_0223B9A0 - - thumb_func_start ov96_0223B9D0 -ov96_0223B9D0: ; 0x0223B9D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - mov r0, #0x68 - mov r1, #0x44 - bl sub_02006C24 - str r0, [sp, #0x14] - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7e - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r2, #0x44 - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - ldr r1, _0223BAC8 ; =0x00000BFC - mov r0, #0xa - add r1, r6, r1 - mov r2, #0x44 - bl sub_020095C4 - ldr r1, _0223BACC ; =0x00000BF8 - mov r2, #1 - str r0, [r6, r1] - add r0, r1, #4 - add r0, r6, r0 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - ldr r7, _0223BAD0 ; =0x00000D24 - mov r4, #0 - add r5, r6, #0 -_0223BA20: - mov r0, #2 - add r1, r4, #0 - mov r2, #0x44 - bl sub_02009714 - str r0, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223BA20 - mov r0, #0 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - mov r0, #0x44 - str r0, [sp, #8] - ldr r0, _0223BAD0 ; =0x00000D24 - ldr r1, [sp, #0x14] - ldr r0, [r6, r0] - mov r2, #0x23 - bl sub_02009A4C - ldr r1, _0223BAD4 ; =0x00000D34 - mov r3, #0 - str r0, [r6, r1] - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x44 - sub r1, #0xc - str r0, [sp, #0xc] - ldr r0, [r6, r1] - ldr r1, [sp, #0x14] - mov r2, #9 - bl sub_02009B04 - ldr r1, _0223BAD8 ; =0x00000D38 - mov r2, #0x24 - str r0, [r6, r1] - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x44 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r6, r1] - ldr r1, [sp, #0x14] - mov r3, #1 - bl sub_02009BC4 - ldr r1, _0223BADC ; =0x00000D3C - mov r2, #0x25 - str r0, [r6, r1] - mov r0, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x44 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r6, r1] - ldr r1, [sp, #0x14] - mov r3, #1 - bl sub_02009BC4 - mov r1, #0x35 - lsl r1, r1, #6 - str r0, [r6, r1] - sub r1, #0xc - ldr r0, [r6, r1] - bl sub_0200A328 - ldr r0, _0223BAD8 ; =0x00000D38 - ldr r0, [r6, r0] - bl sub_0200A5C8 - ldr r0, [sp, #0x14] - bl sub_02006CA8 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BAC8: .word 0x00000BFC -_0223BACC: .word 0x00000BF8 -_0223BAD0: .word 0x00000D24 -_0223BAD4: .word 0x00000D34 -_0223BAD8: .word 0x00000D38 -_0223BADC: .word 0x00000D3C - thumb_func_end ov96_0223B9D0 - - thumb_func_start ov96_0223BAE0 -ov96_0223BAE0: ; 0x0223BAE0 - push {r3, r4} - ldr r4, _0223BB08 ; =0x00000BF8 - ldr r1, [r1, r4] - str r1, [r0, #0] - str r2, [r0, #4] - mov r2, #0 - mov r1, #1 - str r2, [r0, #0x10] - lsl r1, r1, #0xc - str r1, [r0, #0x14] - str r1, [r0, #0x18] - str r1, [r0, #0x1c] - strh r2, [r0, #0x20] - mov r1, #1 - str r1, [r0, #0x24] - str r3, [r0, #0x28] - mov r1, #0x44 - str r1, [r0, #0x2c] - pop {r3, r4} - bx lr - ; .align 2, 0 -_0223BB08: .word 0x00000BF8 - thumb_func_end ov96_0223BAE0 - - thumb_func_start ov96_0223BB0C -ov96_0223BB0C: ; 0x0223BB0C - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - mov r1, #0 - add r5, r0, #0 - str r1, [sp] - sub r0, r1, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, _0223BBBC ; =0x00000D24 - str r1, [sp, #0x10] - ldr r0, [r5, r2] - add r3, r1, #0 - str r0, [sp, #0x14] - add r0, r2, #4 - ldr r0, [r5, r0] - str r0, [sp, #0x18] - add r0, r2, #0 - add r0, #8 - ldr r0, [r5, r0] - str r0, [sp, #0x1c] - add r0, r2, #0 - add r0, #0xc - ldr r0, [r5, r0] - add r2, #0x40 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r5, r2 - add r2, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - ldr r2, _0223BBC0 ; =0x00000D64 - add r0, sp, #0x2c - add r1, r5, #0 - add r2, r5, r2 - mov r3, #1 - bl ov96_0223BAE0 - mov r7, #0xdd - ldr r4, _0223BBC4 ; =0x0223DA80 - mov r6, #0 - lsl r7, r7, #4 -_0223BB62: - ldrh r0, [r4] - lsl r0, r0, #0xc - str r0, [sp, #0x34] - ldrh r0, [r4, #2] - lsl r0, r0, #0xc - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021AA0 - mov r1, #0xdd - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0xdd - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_02021D6C - ldr r0, [r5, r7] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #2 - blt _0223BB62 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - bl sub_02039734 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_0223BBBC: .word 0x00000D24 -_0223BBC0: .word 0x00000D64 -_0223BBC4: .word 0x0223DA80 - thumb_func_end ov96_0223BB0C - - thumb_func_start ov96_0223BBC8 -ov96_0223BBC8: ; 0x0223BBC8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r5, _0223BBF8 ; =0x0223DA78 - add r4, sp, #4 - ldrh r6, [r5] - add r3, sp, #4 - strh r6, [r4] - ldrh r6, [r5, #2] - strh r6, [r4, #2] - ldrh r6, [r5, #4] - ldrh r5, [r5, #6] - strh r6, [r4, #4] - strh r5, [r4, #6] - strb r1, [r4, #2] - strh r2, [r4, #6] - mov r1, #0x44 - str r1, [sp] - add r1, r3, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_02002100 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223BBF8: .word 0x0223DA78 - thumb_func_end ov96_0223BBC8 - - thumb_func_start ov96_0223BBFC -ov96_0223BBFC: ; 0x0223BBFC - str r1, [r0, #0x1c] - str r2, [r0, #0x20] - bx lr - ; .align 2, 0 - thumb_func_end ov96_0223BBFC - - thumb_func_start ov96_0223BC04 -ov96_0223BC04: ; 0x0223BC04 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_020C3D98 - add r6, r0, #0 - ldr r0, _0223BC28 ; =0x0223DEEC - add r1, r5, #0 - ldr r0, [r0, #4] - add r2, r4, #0 - bl sub_020A5448 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020C3DAC - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223BC28: .word 0x0223DEEC - thumb_func_end ov96_0223BC04 - - thumb_func_start ov96_0223BC2C -ov96_0223BC2C: ; 0x0223BC2C - push {r3, r4, r5, lr} - add r5, r1, #0 - beq _0223BC48 - bl sub_020C3D98 - add r4, r0, #0 - ldr r0, _0223BC4C ; =0x0223DEEC - add r1, r5, #0 - ldr r0, [r0, #4] - bl sub_020A55D8 - add r0, r4, #0 - bl sub_020C3DAC -_0223BC48: - pop {r3, r4, r5, pc} - nop -_0223BC4C: .word 0x0223DEEC - thumb_func_end ov96_0223BC2C - - thumb_func_start ov96_0223BC50 -ov96_0223BC50: ; 0x0223BC50 - push {r3, lr} - bl ov4_021D7EAC - mov r1, #3 - sub r0, r1, r0 - pop {r3, pc} - thumb_func_end ov96_0223BC50 - - thumb_func_start ov96_0223BC5C -ov96_0223BC5C: ; 0x0223BC5C - str r1, [r0, #0x14] - str r2, [r0, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov96_0223BC5C - - thumb_func_start ov96_0223BC64 -ov96_0223BC64: ; 0x0223BC64 - push {r4, lr} - add r4, r0, #0 - bl ov96_0223B960 - bl ov96_0223B9A0 - add r0, r4, #0 - bl ov96_0223B9D0 - add r0, r4, #0 - bl ov96_0223BB0C - ldr r0, _0223BC88 ; =ov96_0223B940 - add r1, r4, #0 - bl sub_02017798 - pop {r4, pc} - nop -_0223BC88: .word ov96_0223B940 - thumb_func_end ov96_0223BC64 - - thumb_func_start ov96_0223BC8C -ov96_0223BC8C: ; 0x0223BC8C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _0223BCD0 ; =0x00000D34 - ldr r0, [r6, r0] - bl sub_0200A4E4 - ldr r0, _0223BCD4 ; =0x00000D38 - ldr r0, [r6, r0] - bl sub_0200A6DC - ldr r7, _0223BCD8 ; =0x00000D24 - mov r4, #0 - add r5, r6, #0 -_0223BCA6: - ldr r0, [r5, r7] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223BCA6 - ldr r0, _0223BCDC ; =0x00000BF8 - ldr r0, [r6, r0] - bl sub_02021964 - ldr r0, _0223BCDC ; =0x00000BF8 - mov r1, #0 - str r1, [r6, r0] - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BCD0: .word 0x00000D34 -_0223BCD4: .word 0x00000D38 -_0223BCD8: .word 0x00000D24 -_0223BCDC: .word 0x00000BF8 - thumb_func_end ov96_0223BC8C thumb_func_start ov96_0223BCE0 ov96_0223BCE0: ; 0x0223BCE0 @@ -5294,14 +3811,31 @@ _0223DA46: nop _0223DA74: .word 0x00000DD8 thumb_func_end ov96_0223DA34 - ; 0x0223DA78 - .rodata - .incbin "incbin/overlay96_rodata.bin" + + + .global Unk_ov96_0223DAD0 +Unk_ov96_0223DAD0: ; 0x0223DAD0 + .incbin "incbin/overlay96_rodata.bin", 0x58, 0x74 - 0x58 + + .global Unk_ov96_0223DAEC +Unk_ov96_0223DAEC: ; 0x0223DAEC + .incbin "incbin/overlay96_rodata.bin", 0x74, 0x90 - 0x74 + + .global Unk_ov96_0223DB08 +Unk_ov96_0223DB08: ; 0x0223DB08 + .incbin "incbin/overlay96_rodata.bin", 0x90, 0xAC - 0x90 + + .global Unk_ov96_0223DB24 +Unk_ov96_0223DB24: ; 0x0223DB24 + .incbin "incbin/overlay96_rodata.bin", 0xAC, 0x1C + .data - .incbin "incbin/overlay96_data.bin" - .bss - .space 0x120 + + .global Unk_ov96_0223DCE0 +Unk_ov96_0223DCE0: ; 0x0223DCE0 + .incbin "incbin/overlay96_data.bin", 0x180, 0xE4 + diff --git a/asm/overlay9.s b/asm/ov9_02249960.s similarity index 88% rename from asm/overlay9.s rename to asm/ov9_02249960.s index 2542df24c..f71c4cb50 100644 --- a/asm/overlay9.s +++ b/asm/ov9_02249960.s @@ -1,8 +1,11 @@ .include "macros/function.inc" .include "global.inc" + + .text + thumb_func_start ov9_02249960 ov9_02249960: ; 0x02249960 push {r4, r5, r6, lr} @@ -16160,14 +16163,1291 @@ _0225120C: pop {r4, pc} ; .align 2, 0 thumb_func_end ov9_022511F4 - ; 0x02251210 - .rodata - .incbin "incbin/overlay9_rodata.bin" + + + .global Unk_ov9_02251210 +Unk_ov9_02251210: ; 0x02251210 + .incbin "incbin/overlay9_rodata.bin", 0x0, 0x4 - 0x0 + + .global Unk_ov9_02251214 +Unk_ov9_02251214: ; 0x02251214 + .incbin "incbin/overlay9_rodata.bin", 0x4, 0x8 - 0x4 + + .global Unk_ov9_02251218 +Unk_ov9_02251218: ; 0x02251218 + .incbin "incbin/overlay9_rodata.bin", 0x8, 0xC - 0x8 + + .global Unk_ov9_0225121C +Unk_ov9_0225121C: ; 0x0225121C + .incbin "incbin/overlay9_rodata.bin", 0xC, 0x10 - 0xC + + .global Unk_ov9_02251220 +Unk_ov9_02251220: ; 0x02251220 + .incbin "incbin/overlay9_rodata.bin", 0x10, 0x14 - 0x10 + + .global Unk_ov9_02251224 +Unk_ov9_02251224: ; 0x02251224 + .incbin "incbin/overlay9_rodata.bin", 0x14, 0x18 - 0x14 + + .global Unk_ov9_02251228 +Unk_ov9_02251228: ; 0x02251228 + .incbin "incbin/overlay9_rodata.bin", 0x18, 0x1C - 0x18 + + .global Unk_ov9_0225122C +Unk_ov9_0225122C: ; 0x0225122C + .incbin "incbin/overlay9_rodata.bin", 0x1C, 0x20 - 0x1C + + .global Unk_ov9_02251230 +Unk_ov9_02251230: ; 0x02251230 + .incbin "incbin/overlay9_rodata.bin", 0x20, 0x24 - 0x20 + + .global Unk_ov9_02251234 +Unk_ov9_02251234: ; 0x02251234 + .incbin "incbin/overlay9_rodata.bin", 0x24, 0x28 - 0x24 + + .global Unk_ov9_02251238 +Unk_ov9_02251238: ; 0x02251238 + .incbin "incbin/overlay9_rodata.bin", 0x28, 0x2C - 0x28 + + .global Unk_ov9_0225123C +Unk_ov9_0225123C: ; 0x0225123C + .incbin "incbin/overlay9_rodata.bin", 0x2C, 0x30 - 0x2C + + .global Unk_ov9_02251240 +Unk_ov9_02251240: ; 0x02251240 + .incbin "incbin/overlay9_rodata.bin", 0x30, 0x34 - 0x30 + + .global Unk_ov9_02251244 +Unk_ov9_02251244: ; 0x02251244 + .incbin "incbin/overlay9_rodata.bin", 0x34, 0x38 - 0x34 + + .global Unk_ov9_02251248 +Unk_ov9_02251248: ; 0x02251248 + .incbin "incbin/overlay9_rodata.bin", 0x38, 0x3C - 0x38 + + .global Unk_ov9_0225124C +Unk_ov9_0225124C: ; 0x0225124C + .incbin "incbin/overlay9_rodata.bin", 0x3C, 0x40 - 0x3C + + .global Unk_ov9_02251250 +Unk_ov9_02251250: ; 0x02251250 + .incbin "incbin/overlay9_rodata.bin", 0x40, 0x44 - 0x40 + + .global Unk_ov9_02251254 +Unk_ov9_02251254: ; 0x02251254 + .incbin "incbin/overlay9_rodata.bin", 0x44, 0x48 - 0x44 + + .global Unk_ov9_02251258 +Unk_ov9_02251258: ; 0x02251258 + .incbin "incbin/overlay9_rodata.bin", 0x48, 0x4C - 0x48 + + .global Unk_ov9_0225125C +Unk_ov9_0225125C: ; 0x0225125C + .incbin "incbin/overlay9_rodata.bin", 0x4C, 0x50 - 0x4C + + .global Unk_ov9_02251260 +Unk_ov9_02251260: ; 0x02251260 + .incbin "incbin/overlay9_rodata.bin", 0x50, 0x54 - 0x50 + + .global Unk_ov9_02251264 +Unk_ov9_02251264: ; 0x02251264 + .incbin "incbin/overlay9_rodata.bin", 0x54, 0x58 - 0x54 + + .global Unk_ov9_02251268 +Unk_ov9_02251268: ; 0x02251268 + .incbin "incbin/overlay9_rodata.bin", 0x58, 0x5C - 0x58 + + .global Unk_ov9_0225126C +Unk_ov9_0225126C: ; 0x0225126C + .incbin "incbin/overlay9_rodata.bin", 0x5C, 0x60 - 0x5C + + .global Unk_ov9_02251270 +Unk_ov9_02251270: ; 0x02251270 + .incbin "incbin/overlay9_rodata.bin", 0x60, 0x64 - 0x60 + + .global Unk_ov9_02251274 +Unk_ov9_02251274: ; 0x02251274 + .incbin "incbin/overlay9_rodata.bin", 0x64, 0x68 - 0x64 + + .global Unk_ov9_02251278 +Unk_ov9_02251278: ; 0x02251278 + .incbin "incbin/overlay9_rodata.bin", 0x68, 0x70 - 0x68 + + .global Unk_ov9_02251280 +Unk_ov9_02251280: ; 0x02251280 + .incbin "incbin/overlay9_rodata.bin", 0x70, 0x78 - 0x70 + + .global Unk_ov9_02251288 +Unk_ov9_02251288: ; 0x02251288 + .incbin "incbin/overlay9_rodata.bin", 0x78, 0x80 - 0x78 + + .global Unk_ov9_02251290 +Unk_ov9_02251290: ; 0x02251290 + .incbin "incbin/overlay9_rodata.bin", 0x80, 0x88 - 0x80 + + .global Unk_ov9_02251298 +Unk_ov9_02251298: ; 0x02251298 + .incbin "incbin/overlay9_rodata.bin", 0x88, 0x90 - 0x88 + + .global Unk_ov9_022512A0 +Unk_ov9_022512A0: ; 0x022512A0 + .incbin "incbin/overlay9_rodata.bin", 0x90, 0x98 - 0x90 + + .global Unk_ov9_022512A8 +Unk_ov9_022512A8: ; 0x022512A8 + .incbin "incbin/overlay9_rodata.bin", 0x98, 0xA0 - 0x98 + + .global Unk_ov9_022512B0 +Unk_ov9_022512B0: ; 0x022512B0 + .incbin "incbin/overlay9_rodata.bin", 0xA0, 0xA8 - 0xA0 + + .global Unk_ov9_022512B8 +Unk_ov9_022512B8: ; 0x022512B8 + .incbin "incbin/overlay9_rodata.bin", 0xA8, 0xB0 - 0xA8 + + .global Unk_ov9_022512C0 +Unk_ov9_022512C0: ; 0x022512C0 + .incbin "incbin/overlay9_rodata.bin", 0xB0, 0xB8 - 0xB0 + + .global Unk_ov9_022512C8 +Unk_ov9_022512C8: ; 0x022512C8 + .incbin "incbin/overlay9_rodata.bin", 0xB8, 0xC0 - 0xB8 + + .global Unk_ov9_022512D0 +Unk_ov9_022512D0: ; 0x022512D0 + .incbin "incbin/overlay9_rodata.bin", 0xC0, 0xC8 - 0xC0 + + .global Unk_ov9_022512D8 +Unk_ov9_022512D8: ; 0x022512D8 + .incbin "incbin/overlay9_rodata.bin", 0xC8, 0xD0 - 0xC8 + + .global Unk_ov9_022512E0 +Unk_ov9_022512E0: ; 0x022512E0 + .incbin "incbin/overlay9_rodata.bin", 0xD0, 0xD8 - 0xD0 + + .global Unk_ov9_022512E8 +Unk_ov9_022512E8: ; 0x022512E8 + .incbin "incbin/overlay9_rodata.bin", 0xD8, 0xE0 - 0xD8 + + .global Unk_ov9_022512F0 +Unk_ov9_022512F0: ; 0x022512F0 + .incbin "incbin/overlay9_rodata.bin", 0xE0, 0xE8 - 0xE0 + + .global Unk_ov9_022512F8 +Unk_ov9_022512F8: ; 0x022512F8 + .incbin "incbin/overlay9_rodata.bin", 0xE8, 0xF0 - 0xE8 + + .global Unk_ov9_02251300 +Unk_ov9_02251300: ; 0x02251300 + .incbin "incbin/overlay9_rodata.bin", 0xF0, 0xF8 - 0xF0 + + .global Unk_ov9_02251308 +Unk_ov9_02251308: ; 0x02251308 + .incbin "incbin/overlay9_rodata.bin", 0xF8, 0x100 - 0xF8 + + .global Unk_ov9_02251310 +Unk_ov9_02251310: ; 0x02251310 + .incbin "incbin/overlay9_rodata.bin", 0x100, 0x108 - 0x100 + + .global Unk_ov9_02251318 +Unk_ov9_02251318: ; 0x02251318 + .incbin "incbin/overlay9_rodata.bin", 0x108, 0x110 - 0x108 + + .global Unk_ov9_02251320 +Unk_ov9_02251320: ; 0x02251320 + .incbin "incbin/overlay9_rodata.bin", 0x110, 0x118 - 0x110 + + .global Unk_ov9_02251328 +Unk_ov9_02251328: ; 0x02251328 + .incbin "incbin/overlay9_rodata.bin", 0x118, 0x120 - 0x118 + + .global Unk_ov9_02251330 +Unk_ov9_02251330: ; 0x02251330 + .incbin "incbin/overlay9_rodata.bin", 0x120, 0x128 - 0x120 + + .global Unk_ov9_02251338 +Unk_ov9_02251338: ; 0x02251338 + .incbin "incbin/overlay9_rodata.bin", 0x128, 0x130 - 0x128 + + .global Unk_ov9_02251340 +Unk_ov9_02251340: ; 0x02251340 + .incbin "incbin/overlay9_rodata.bin", 0x130, 0x138 - 0x130 + + .global Unk_ov9_02251348 +Unk_ov9_02251348: ; 0x02251348 + .incbin "incbin/overlay9_rodata.bin", 0x138, 0x140 - 0x138 + + .global Unk_ov9_02251350 +Unk_ov9_02251350: ; 0x02251350 + .incbin "incbin/overlay9_rodata.bin", 0x140, 0x148 - 0x140 + + .global Unk_ov9_02251358 +Unk_ov9_02251358: ; 0x02251358 + .incbin "incbin/overlay9_rodata.bin", 0x148, 0x150 - 0x148 + + .global Unk_ov9_02251360 +Unk_ov9_02251360: ; 0x02251360 + .incbin "incbin/overlay9_rodata.bin", 0x150, 0x15C - 0x150 + + .global Unk_ov9_0225136C +Unk_ov9_0225136C: ; 0x0225136C + .incbin "incbin/overlay9_rodata.bin", 0x15C, 0x168 - 0x15C + + .global Unk_ov9_02251378 +Unk_ov9_02251378: ; 0x02251378 + .incbin "incbin/overlay9_rodata.bin", 0x168, 0x174 - 0x168 + + .global Unk_ov9_02251384 +Unk_ov9_02251384: ; 0x02251384 + .incbin "incbin/overlay9_rodata.bin", 0x174, 0x180 - 0x174 + + .global Unk_ov9_02251390 +Unk_ov9_02251390: ; 0x02251390 + .incbin "incbin/overlay9_rodata.bin", 0x180, 0x18C - 0x180 + + .global Unk_ov9_0225139C +Unk_ov9_0225139C: ; 0x0225139C + .incbin "incbin/overlay9_rodata.bin", 0x18C, 0x198 - 0x18C + + .global Unk_ov9_022513A8 +Unk_ov9_022513A8: ; 0x022513A8 + .incbin "incbin/overlay9_rodata.bin", 0x198, 0x1A8 - 0x198 + + .global Unk_ov9_022513B8 +Unk_ov9_022513B8: ; 0x022513B8 + .incbin "incbin/overlay9_rodata.bin", 0x1A8, 0x1B8 - 0x1A8 + + .global Unk_ov9_022513C8 +Unk_ov9_022513C8: ; 0x022513C8 + .incbin "incbin/overlay9_rodata.bin", 0x1B8, 0x1C8 - 0x1B8 + + .global Unk_ov9_022513D8 +Unk_ov9_022513D8: ; 0x022513D8 + .incbin "incbin/overlay9_rodata.bin", 0x1C8, 0x1D8 - 0x1C8 + + .global Unk_ov9_022513E8 +Unk_ov9_022513E8: ; 0x022513E8 + .incbin "incbin/overlay9_rodata.bin", 0x1D8, 0x1E8 - 0x1D8 + + .global Unk_ov9_022513F8 +Unk_ov9_022513F8: ; 0x022513F8 + .incbin "incbin/overlay9_rodata.bin", 0x1E8, 0x1F8 - 0x1E8 + + .global Unk_ov9_02251408 +Unk_ov9_02251408: ; 0x02251408 + .incbin "incbin/overlay9_rodata.bin", 0x1F8, 0x208 - 0x1F8 + + .global Unk_ov9_02251418 +Unk_ov9_02251418: ; 0x02251418 + .incbin "incbin/overlay9_rodata.bin", 0x208, 0x218 - 0x208 + + .global Unk_ov9_02251428 +Unk_ov9_02251428: ; 0x02251428 + .incbin "incbin/overlay9_rodata.bin", 0x218, 0x228 - 0x218 + + .global Unk_ov9_02251438 +Unk_ov9_02251438: ; 0x02251438 + .incbin "incbin/overlay9_rodata.bin", 0x228, 0x238 - 0x228 + + .global Unk_ov9_02251448 +Unk_ov9_02251448: ; 0x02251448 + .incbin "incbin/overlay9_rodata.bin", 0x238, 0x248 - 0x238 + + .global Unk_ov9_02251458 +Unk_ov9_02251458: ; 0x02251458 + .incbin "incbin/overlay9_rodata.bin", 0x248, 0x258 - 0x248 + + .global Unk_ov9_02251468 +Unk_ov9_02251468: ; 0x02251468 + .incbin "incbin/overlay9_rodata.bin", 0x258, 0x26C - 0x258 + + .global Unk_ov9_0225147C +Unk_ov9_0225147C: ; 0x0225147C + .incbin "incbin/overlay9_rodata.bin", 0x26C, 0x280 - 0x26C + + .global Unk_ov9_02251490 +Unk_ov9_02251490: ; 0x02251490 + .incbin "incbin/overlay9_rodata.bin", 0x280, 0x294 - 0x280 + + .global Unk_ov9_022514A4 +Unk_ov9_022514A4: ; 0x022514A4 + .incbin "incbin/overlay9_rodata.bin", 0x294, 0x2A8 - 0x294 + + .global Unk_ov9_022514B8 +Unk_ov9_022514B8: ; 0x022514B8 + .incbin "incbin/overlay9_rodata.bin", 0x2A8, 0x2BC - 0x2A8 + + .global Unk_ov9_022514CC +Unk_ov9_022514CC: ; 0x022514CC + .incbin "incbin/overlay9_rodata.bin", 0x2BC, 0x2D0 - 0x2BC + + .global Unk_ov9_022514E0 +Unk_ov9_022514E0: ; 0x022514E0 + .incbin "incbin/overlay9_rodata.bin", 0x2D0, 0x2E4 - 0x2D0 + + .global Unk_ov9_022514F4 +Unk_ov9_022514F4: ; 0x022514F4 + .incbin "incbin/overlay9_rodata.bin", 0x2E4, 0x2F8 - 0x2E4 + + .global Unk_ov9_02251508 +Unk_ov9_02251508: ; 0x02251508 + .incbin "incbin/overlay9_rodata.bin", 0x2F8, 0x30C - 0x2F8 + + .global Unk_ov9_0225151C +Unk_ov9_0225151C: ; 0x0225151C + .incbin "incbin/overlay9_rodata.bin", 0x30C, 0x320 - 0x30C + + .global Unk_ov9_02251530 +Unk_ov9_02251530: ; 0x02251530 + .incbin "incbin/overlay9_rodata.bin", 0x320, 0x334 - 0x320 + + .global Unk_ov9_02251544 +Unk_ov9_02251544: ; 0x02251544 + .incbin "incbin/overlay9_rodata.bin", 0x334, 0x348 - 0x334 + + .global Unk_ov9_02251558 +Unk_ov9_02251558: ; 0x02251558 + .incbin "incbin/overlay9_rodata.bin", 0x348, 0x360 - 0x348 + + .global Unk_ov9_02251570 +Unk_ov9_02251570: ; 0x02251570 + .incbin "incbin/overlay9_rodata.bin", 0x360, 0x378 - 0x360 + + .global Unk_ov9_02251588 +Unk_ov9_02251588: ; 0x02251588 + .incbin "incbin/overlay9_rodata.bin", 0x378, 0x390 - 0x378 + + .global Unk_ov9_022515A0 +Unk_ov9_022515A0: ; 0x022515A0 + .incbin "incbin/overlay9_rodata.bin", 0x390, 0x3A8 - 0x390 + + .global Unk_ov9_022515B8 +Unk_ov9_022515B8: ; 0x022515B8 + .incbin "incbin/overlay9_rodata.bin", 0x3A8, 0x3C0 - 0x3A8 + + .global Unk_ov9_022515D0 +Unk_ov9_022515D0: ; 0x022515D0 + .incbin "incbin/overlay9_rodata.bin", 0x3C0, 0x3D8 - 0x3C0 + + .global Unk_ov9_022515E8 +Unk_ov9_022515E8: ; 0x022515E8 + .incbin "incbin/overlay9_rodata.bin", 0x3D8, 0x3F0 - 0x3D8 + + .global Unk_ov9_02251600 +Unk_ov9_02251600: ; 0x02251600 + .incbin "incbin/overlay9_rodata.bin", 0x3F0, 0x408 - 0x3F0 + + .global Unk_ov9_02251618 +Unk_ov9_02251618: ; 0x02251618 + .incbin "incbin/overlay9_rodata.bin", 0x408, 0x420 - 0x408 + + .global Unk_ov9_02251630 +Unk_ov9_02251630: ; 0x02251630 + .incbin "incbin/overlay9_rodata.bin", 0x420, 0x438 - 0x420 + + .global Unk_ov9_02251648 +Unk_ov9_02251648: ; 0x02251648 + .incbin "incbin/overlay9_rodata.bin", 0x438, 0x450 - 0x438 + + .global Unk_ov9_02251660 +Unk_ov9_02251660: ; 0x02251660 + .incbin "incbin/overlay9_rodata.bin", 0x450, 0x468 - 0x450 + + .global Unk_ov9_02251678 +Unk_ov9_02251678: ; 0x02251678 + .incbin "incbin/overlay9_rodata.bin", 0x468, 0x480 - 0x468 + + .global Unk_ov9_02251690 +Unk_ov9_02251690: ; 0x02251690 + .incbin "incbin/overlay9_rodata.bin", 0x480, 0x498 - 0x480 + + .global Unk_ov9_022516A8 +Unk_ov9_022516A8: ; 0x022516A8 + .incbin "incbin/overlay9_rodata.bin", 0x498, 0x4B0 - 0x498 + + .global Unk_ov9_022516C0 +Unk_ov9_022516C0: ; 0x022516C0 + .incbin "incbin/overlay9_rodata.bin", 0x4B0, 0x4C8 - 0x4B0 + + .global Unk_ov9_022516D8 +Unk_ov9_022516D8: ; 0x022516D8 + .incbin "incbin/overlay9_rodata.bin", 0x4C8, 0x4E0 - 0x4C8 + + .global Unk_ov9_022516F0 +Unk_ov9_022516F0: ; 0x022516F0 + .incbin "incbin/overlay9_rodata.bin", 0x4E0, 0x4F8 - 0x4E0 + + .global Unk_ov9_02251708 +Unk_ov9_02251708: ; 0x02251708 + .incbin "incbin/overlay9_rodata.bin", 0x4F8, 0x510 - 0x4F8 + + .global Unk_ov9_02251720 +Unk_ov9_02251720: ; 0x02251720 + .incbin "incbin/overlay9_rodata.bin", 0x510, 0x528 - 0x510 + + .global Unk_ov9_02251738 +Unk_ov9_02251738: ; 0x02251738 + .incbin "incbin/overlay9_rodata.bin", 0x528, 0x540 - 0x528 + + .global Unk_ov9_02251750 +Unk_ov9_02251750: ; 0x02251750 + .incbin "incbin/overlay9_rodata.bin", 0x540, 0x558 - 0x540 + + .global Unk_ov9_02251768 +Unk_ov9_02251768: ; 0x02251768 + .incbin "incbin/overlay9_rodata.bin", 0x558, 0x570 - 0x558 + + .global Unk_ov9_02251780 +Unk_ov9_02251780: ; 0x02251780 + .incbin "incbin/overlay9_rodata.bin", 0x570, 0x588 - 0x570 + + .global Unk_ov9_02251798 +Unk_ov9_02251798: ; 0x02251798 + .incbin "incbin/overlay9_rodata.bin", 0x588, 0x5A0 - 0x588 + + .global Unk_ov9_022517B0 +Unk_ov9_022517B0: ; 0x022517B0 + .incbin "incbin/overlay9_rodata.bin", 0x5A0, 0x5B8 - 0x5A0 + + .global Unk_ov9_022517C8 +Unk_ov9_022517C8: ; 0x022517C8 + .incbin "incbin/overlay9_rodata.bin", 0x5B8, 0x5D0 - 0x5B8 + + .global Unk_ov9_022517E0 +Unk_ov9_022517E0: ; 0x022517E0 + .incbin "incbin/overlay9_rodata.bin", 0x5D0, 0x5E8 - 0x5D0 + + .global Unk_ov9_022517F8 +Unk_ov9_022517F8: ; 0x022517F8 + .incbin "incbin/overlay9_rodata.bin", 0x5E8, 0x600 - 0x5E8 + + .global Unk_ov9_02251810 +Unk_ov9_02251810: ; 0x02251810 + .incbin "incbin/overlay9_rodata.bin", 0x600, 0x618 - 0x600 + + .global Unk_ov9_02251828 +Unk_ov9_02251828: ; 0x02251828 + .incbin "incbin/overlay9_rodata.bin", 0x618, 0x630 - 0x618 + + .global Unk_ov9_02251840 +Unk_ov9_02251840: ; 0x02251840 + .incbin "incbin/overlay9_rodata.bin", 0x630, 0x648 - 0x630 + + .global Unk_ov9_02251858 +Unk_ov9_02251858: ; 0x02251858 + .incbin "incbin/overlay9_rodata.bin", 0x648, 0x660 - 0x648 + + .global Unk_ov9_02251870 +Unk_ov9_02251870: ; 0x02251870 + .incbin "incbin/overlay9_rodata.bin", 0x660, 0x678 - 0x660 + + .global Unk_ov9_02251888 +Unk_ov9_02251888: ; 0x02251888 + .incbin "incbin/overlay9_rodata.bin", 0x678, 0x690 - 0x678 + + .global Unk_ov9_022518A0 +Unk_ov9_022518A0: ; 0x022518A0 + .incbin "incbin/overlay9_rodata.bin", 0x690, 0x6A8 - 0x690 + + .global Unk_ov9_022518B8 +Unk_ov9_022518B8: ; 0x022518B8 + .incbin "incbin/overlay9_rodata.bin", 0x6A8, 0x6C0 - 0x6A8 + + .global Unk_ov9_022518D0 +Unk_ov9_022518D0: ; 0x022518D0 + .incbin "incbin/overlay9_rodata.bin", 0x6C0, 0x6D8 - 0x6C0 + + .global Unk_ov9_022518E8 +Unk_ov9_022518E8: ; 0x022518E8 + .incbin "incbin/overlay9_rodata.bin", 0x6D8, 0x6F0 - 0x6D8 + + .global Unk_ov9_02251900 +Unk_ov9_02251900: ; 0x02251900 + .incbin "incbin/overlay9_rodata.bin", 0x6F0, 0x708 - 0x6F0 + + .global Unk_ov9_02251918 +Unk_ov9_02251918: ; 0x02251918 + .incbin "incbin/overlay9_rodata.bin", 0x708, 0x720 - 0x708 + + .global Unk_ov9_02251930 +Unk_ov9_02251930: ; 0x02251930 + .incbin "incbin/overlay9_rodata.bin", 0x720, 0x738 - 0x720 + + .global Unk_ov9_02251948 +Unk_ov9_02251948: ; 0x02251948 + .incbin "incbin/overlay9_rodata.bin", 0x738, 0x750 - 0x738 + + .global Unk_ov9_02251960 +Unk_ov9_02251960: ; 0x02251960 + .incbin "incbin/overlay9_rodata.bin", 0x750, 0x768 - 0x750 + + .global Unk_ov9_02251978 +Unk_ov9_02251978: ; 0x02251978 + .incbin "incbin/overlay9_rodata.bin", 0x768, 0x780 - 0x768 + + .global Unk_ov9_02251990 +Unk_ov9_02251990: ; 0x02251990 + .incbin "incbin/overlay9_rodata.bin", 0x780, 0x798 - 0x780 + + .global Unk_ov9_022519A8 +Unk_ov9_022519A8: ; 0x022519A8 + .incbin "incbin/overlay9_rodata.bin", 0x798, 0x7B0 - 0x798 + + .global Unk_ov9_022519C0 +Unk_ov9_022519C0: ; 0x022519C0 + .incbin "incbin/overlay9_rodata.bin", 0x7B0, 0x7C8 - 0x7B0 + + .global Unk_ov9_022519D8 +Unk_ov9_022519D8: ; 0x022519D8 + .incbin "incbin/overlay9_rodata.bin", 0x7C8, 0x7E0 - 0x7C8 + + .global Unk_ov9_022519F0 +Unk_ov9_022519F0: ; 0x022519F0 + .incbin "incbin/overlay9_rodata.bin", 0x7E0, 0x7F8 - 0x7E0 + + .global Unk_ov9_02251A08 +Unk_ov9_02251A08: ; 0x02251A08 + .incbin "incbin/overlay9_rodata.bin", 0x7F8, 0x810 - 0x7F8 + + .global Unk_ov9_02251A20 +Unk_ov9_02251A20: ; 0x02251A20 + .incbin "incbin/overlay9_rodata.bin", 0x810, 0x828 - 0x810 + + .global Unk_ov9_02251A38 +Unk_ov9_02251A38: ; 0x02251A38 + .incbin "incbin/overlay9_rodata.bin", 0x828, 0x840 - 0x828 + + .global Unk_ov9_02251A50 +Unk_ov9_02251A50: ; 0x02251A50 + .incbin "incbin/overlay9_rodata.bin", 0x840, 0x858 - 0x840 + + .global Unk_ov9_02251A68 +Unk_ov9_02251A68: ; 0x02251A68 + .incbin "incbin/overlay9_rodata.bin", 0x858, 0x870 - 0x858 + + .global Unk_ov9_02251A80 +Unk_ov9_02251A80: ; 0x02251A80 + .incbin "incbin/overlay9_rodata.bin", 0x870, 0x888 - 0x870 + + .global Unk_ov9_02251A98 +Unk_ov9_02251A98: ; 0x02251A98 + .incbin "incbin/overlay9_rodata.bin", 0x888, 0x8A0 - 0x888 + + .global Unk_ov9_02251AB0 +Unk_ov9_02251AB0: ; 0x02251AB0 + .incbin "incbin/overlay9_rodata.bin", 0x8A0, 0x8B8 - 0x8A0 + + .global Unk_ov9_02251AC8 +Unk_ov9_02251AC8: ; 0x02251AC8 + .incbin "incbin/overlay9_rodata.bin", 0x8B8, 0x8D0 - 0x8B8 + + .global Unk_ov9_02251AE0 +Unk_ov9_02251AE0: ; 0x02251AE0 + .incbin "incbin/overlay9_rodata.bin", 0x8D0, 0x8E8 - 0x8D0 + + .global Unk_ov9_02251AF8 +Unk_ov9_02251AF8: ; 0x02251AF8 + .incbin "incbin/overlay9_rodata.bin", 0x8E8, 0x900 - 0x8E8 + + .global Unk_ov9_02251B10 +Unk_ov9_02251B10: ; 0x02251B10 + .incbin "incbin/overlay9_rodata.bin", 0x900, 0x918 - 0x900 + + .global Unk_ov9_02251B28 +Unk_ov9_02251B28: ; 0x02251B28 + .incbin "incbin/overlay9_rodata.bin", 0x918, 0x930 - 0x918 + + .global Unk_ov9_02251B40 +Unk_ov9_02251B40: ; 0x02251B40 + .incbin "incbin/overlay9_rodata.bin", 0x930, 0x948 - 0x930 + + .global Unk_ov9_02251B58 +Unk_ov9_02251B58: ; 0x02251B58 + .incbin "incbin/overlay9_rodata.bin", 0x948, 0x960 - 0x948 + + .global Unk_ov9_02251B70 +Unk_ov9_02251B70: ; 0x02251B70 + .incbin "incbin/overlay9_rodata.bin", 0x960, 0x978 - 0x960 + + .global Unk_ov9_02251B88 +Unk_ov9_02251B88: ; 0x02251B88 + .incbin "incbin/overlay9_rodata.bin", 0x978, 0x990 - 0x978 + + .global Unk_ov9_02251BA0 +Unk_ov9_02251BA0: ; 0x02251BA0 + .incbin "incbin/overlay9_rodata.bin", 0x990, 0x9A8 - 0x990 + + .global Unk_ov9_02251BB8 +Unk_ov9_02251BB8: ; 0x02251BB8 + .incbin "incbin/overlay9_rodata.bin", 0x9A8, 0x9C0 - 0x9A8 + + .global Unk_ov9_02251BD0 +Unk_ov9_02251BD0: ; 0x02251BD0 + .incbin "incbin/overlay9_rodata.bin", 0x9C0, 0x9D8 - 0x9C0 + + .global Unk_ov9_02251BE8 +Unk_ov9_02251BE8: ; 0x02251BE8 + .incbin "incbin/overlay9_rodata.bin", 0x9D8, 0x9F0 - 0x9D8 + + .global Unk_ov9_02251C00 +Unk_ov9_02251C00: ; 0x02251C00 + .incbin "incbin/overlay9_rodata.bin", 0x9F0, 0xA08 - 0x9F0 + + .global Unk_ov9_02251C18 +Unk_ov9_02251C18: ; 0x02251C18 + .incbin "incbin/overlay9_rodata.bin", 0xA08, 0xA20 - 0xA08 + + .global Unk_ov9_02251C30 +Unk_ov9_02251C30: ; 0x02251C30 + .incbin "incbin/overlay9_rodata.bin", 0xA20, 0xA38 - 0xA20 + + .global Unk_ov9_02251C48 +Unk_ov9_02251C48: ; 0x02251C48 + .incbin "incbin/overlay9_rodata.bin", 0xA38, 0xA50 - 0xA38 + + .global Unk_ov9_02251C60 +Unk_ov9_02251C60: ; 0x02251C60 + .incbin "incbin/overlay9_rodata.bin", 0xA50, 0xA68 - 0xA50 + + .global Unk_ov9_02251C78 +Unk_ov9_02251C78: ; 0x02251C78 + .incbin "incbin/overlay9_rodata.bin", 0xA68, 0xA80 - 0xA68 + + .global Unk_ov9_02251C90 +Unk_ov9_02251C90: ; 0x02251C90 + .incbin "incbin/overlay9_rodata.bin", 0xA80, 0xA98 - 0xA80 + + .global Unk_ov9_02251CA8 +Unk_ov9_02251CA8: ; 0x02251CA8 + .incbin "incbin/overlay9_rodata.bin", 0xA98, 0xAB0 - 0xA98 + + .global Unk_ov9_02251CC0 +Unk_ov9_02251CC0: ; 0x02251CC0 + .incbin "incbin/overlay9_rodata.bin", 0xAB0, 0xAC8 - 0xAB0 + + .global Unk_ov9_02251CD8 +Unk_ov9_02251CD8: ; 0x02251CD8 + .incbin "incbin/overlay9_rodata.bin", 0xAC8, 0xAE0 - 0xAC8 + + .global Unk_ov9_02251CF0 +Unk_ov9_02251CF0: ; 0x02251CF0 + .incbin "incbin/overlay9_rodata.bin", 0xAE0, 0xAF8 - 0xAE0 + + .global Unk_ov9_02251D08 +Unk_ov9_02251D08: ; 0x02251D08 + .incbin "incbin/overlay9_rodata.bin", 0xAF8, 0xB10 - 0xAF8 + + .global Unk_ov9_02251D20 +Unk_ov9_02251D20: ; 0x02251D20 + .incbin "incbin/overlay9_rodata.bin", 0xB10, 0xB28 - 0xB10 + + .global Unk_ov9_02251D38 +Unk_ov9_02251D38: ; 0x02251D38 + .incbin "incbin/overlay9_rodata.bin", 0xB28, 0xB40 - 0xB28 + + .global Unk_ov9_02251D50 +Unk_ov9_02251D50: ; 0x02251D50 + .incbin "incbin/overlay9_rodata.bin", 0xB40, 0xB58 - 0xB40 + + .global Unk_ov9_02251D68 +Unk_ov9_02251D68: ; 0x02251D68 + .incbin "incbin/overlay9_rodata.bin", 0xB58, 0xB70 - 0xB58 + + .global Unk_ov9_02251D80 +Unk_ov9_02251D80: ; 0x02251D80 + .incbin "incbin/overlay9_rodata.bin", 0xB70, 0xB88 - 0xB70 + + .global Unk_ov9_02251D98 +Unk_ov9_02251D98: ; 0x02251D98 + .incbin "incbin/overlay9_rodata.bin", 0xB88, 0xBA0 - 0xB88 + + .global Unk_ov9_02251DB0 +Unk_ov9_02251DB0: ; 0x02251DB0 + .incbin "incbin/overlay9_rodata.bin", 0xBA0, 0xBB8 - 0xBA0 + + .global Unk_ov9_02251DC8 +Unk_ov9_02251DC8: ; 0x02251DC8 + .incbin "incbin/overlay9_rodata.bin", 0xBB8, 0xBD0 - 0xBB8 + + .global Unk_ov9_02251DE0 +Unk_ov9_02251DE0: ; 0x02251DE0 + .incbin "incbin/overlay9_rodata.bin", 0xBD0, 0xBE8 - 0xBD0 + + .global Unk_ov9_02251DF8 +Unk_ov9_02251DF8: ; 0x02251DF8 + .incbin "incbin/overlay9_rodata.bin", 0xBE8, 0xC00 - 0xBE8 + + .global Unk_ov9_02251E10 +Unk_ov9_02251E10: ; 0x02251E10 + .incbin "incbin/overlay9_rodata.bin", 0xC00, 0xC18 - 0xC00 + + .global Unk_ov9_02251E28 +Unk_ov9_02251E28: ; 0x02251E28 + .incbin "incbin/overlay9_rodata.bin", 0xC18, 0xC30 - 0xC18 + + .global Unk_ov9_02251E40 +Unk_ov9_02251E40: ; 0x02251E40 + .incbin "incbin/overlay9_rodata.bin", 0xC30, 0xC48 - 0xC30 + + .global Unk_ov9_02251E58 +Unk_ov9_02251E58: ; 0x02251E58 + .incbin "incbin/overlay9_rodata.bin", 0xC48, 0xC64 - 0xC48 + + .global Unk_ov9_02251E74 +Unk_ov9_02251E74: ; 0x02251E74 + .incbin "incbin/overlay9_rodata.bin", 0xC64, 0xC80 - 0xC64 + + .global Unk_ov9_02251E90 +Unk_ov9_02251E90: ; 0x02251E90 + .incbin "incbin/overlay9_rodata.bin", 0xC80, 0xC9C - 0xC80 + + .global Unk_ov9_02251EAC +Unk_ov9_02251EAC: ; 0x02251EAC + .incbin "incbin/overlay9_rodata.bin", 0xC9C, 0xCB8 - 0xC9C + + .global Unk_ov9_02251EC8 +Unk_ov9_02251EC8: ; 0x02251EC8 + .incbin "incbin/overlay9_rodata.bin", 0xCB8, 0xCD4 - 0xCB8 + + .global Unk_ov9_02251EE4 +Unk_ov9_02251EE4: ; 0x02251EE4 + .incbin "incbin/overlay9_rodata.bin", 0xCD4, 0xCF4 - 0xCD4 + + .global Unk_ov9_02251F04 +Unk_ov9_02251F04: ; 0x02251F04 + .incbin "incbin/overlay9_rodata.bin", 0xCF4, 0xD14 - 0xCF4 + + .global Unk_ov9_02251F24 +Unk_ov9_02251F24: ; 0x02251F24 + .incbin "incbin/overlay9_rodata.bin", 0xD14, 0xD34 - 0xD14 + + .global Unk_ov9_02251F44 +Unk_ov9_02251F44: ; 0x02251F44 + .incbin "incbin/overlay9_rodata.bin", 0xD34, 0xD54 - 0xD34 + + .global Unk_ov9_02251F64 +Unk_ov9_02251F64: ; 0x02251F64 + .incbin "incbin/overlay9_rodata.bin", 0xD54, 0xD74 - 0xD54 + + .global Unk_ov9_02251F84 +Unk_ov9_02251F84: ; 0x02251F84 + .incbin "incbin/overlay9_rodata.bin", 0xD74, 0xD94 - 0xD74 + + .global Unk_ov9_02251FA4 +Unk_ov9_02251FA4: ; 0x02251FA4 + .incbin "incbin/overlay9_rodata.bin", 0xD94, 0xDB4 - 0xD94 + + .global Unk_ov9_02251FC4 +Unk_ov9_02251FC4: ; 0x02251FC4 + .incbin "incbin/overlay9_rodata.bin", 0xDB4, 0xDD4 - 0xDB4 + + .global Unk_ov9_02251FE4 +Unk_ov9_02251FE4: ; 0x02251FE4 + .incbin "incbin/overlay9_rodata.bin", 0xDD4, 0xDF4 - 0xDD4 + + .global Unk_ov9_02252004 +Unk_ov9_02252004: ; 0x02252004 + .incbin "incbin/overlay9_rodata.bin", 0xDF4, 0xE14 - 0xDF4 + + .global Unk_ov9_02252024 +Unk_ov9_02252024: ; 0x02252024 + .incbin "incbin/overlay9_rodata.bin", 0xE14, 0xE34 - 0xE14 + + .global Unk_ov9_02252044 +Unk_ov9_02252044: ; 0x02252044 + .incbin "incbin/overlay9_rodata.bin", 0xE34, 0xE54 - 0xE34 + + .global Unk_ov9_02252064 +Unk_ov9_02252064: ; 0x02252064 + .incbin "incbin/overlay9_rodata.bin", 0xE54, 0xE74 - 0xE54 + + .global Unk_ov9_02252084 +Unk_ov9_02252084: ; 0x02252084 + .incbin "incbin/overlay9_rodata.bin", 0xE74, 0xE94 - 0xE74 + + .global Unk_ov9_022520A4 +Unk_ov9_022520A4: ; 0x022520A4 + .incbin "incbin/overlay9_rodata.bin", 0xE94, 0xEB4 - 0xE94 + + .global Unk_ov9_022520C4 +Unk_ov9_022520C4: ; 0x022520C4 + .incbin "incbin/overlay9_rodata.bin", 0xEB4, 0xED4 - 0xEB4 + + .global Unk_ov9_022520E4 +Unk_ov9_022520E4: ; 0x022520E4 + .incbin "incbin/overlay9_rodata.bin", 0xED4, 0xEF4 - 0xED4 + + .global Unk_ov9_02252104 +Unk_ov9_02252104: ; 0x02252104 + .incbin "incbin/overlay9_rodata.bin", 0xEF4, 0xF14 - 0xEF4 + + .global Unk_ov9_02252124 +Unk_ov9_02252124: ; 0x02252124 + .incbin "incbin/overlay9_rodata.bin", 0xF14, 0xF34 - 0xF14 + + .global Unk_ov9_02252144 +Unk_ov9_02252144: ; 0x02252144 + .incbin "incbin/overlay9_rodata.bin", 0xF34, 0xF54 - 0xF34 + + .global Unk_ov9_02252164 +Unk_ov9_02252164: ; 0x02252164 + .incbin "incbin/overlay9_rodata.bin", 0xF54, 0xF74 - 0xF54 + + .global Unk_ov9_02252184 +Unk_ov9_02252184: ; 0x02252184 + .incbin "incbin/overlay9_rodata.bin", 0xF74, 0xF94 - 0xF74 + + .global Unk_ov9_022521A4 +Unk_ov9_022521A4: ; 0x022521A4 + .incbin "incbin/overlay9_rodata.bin", 0xF94, 0xFB4 - 0xF94 + + .global Unk_ov9_022521C4 +Unk_ov9_022521C4: ; 0x022521C4 + .incbin "incbin/overlay9_rodata.bin", 0xFB4, 0xFD4 - 0xFB4 + + .global Unk_ov9_022521E4 +Unk_ov9_022521E4: ; 0x022521E4 + .incbin "incbin/overlay9_rodata.bin", 0xFD4, 0xFF4 - 0xFD4 + + .global Unk_ov9_02252204 +Unk_ov9_02252204: ; 0x02252204 + .incbin "incbin/overlay9_rodata.bin", 0xFF4, 0x1014 - 0xFF4 + + .global Unk_ov9_02252224 +Unk_ov9_02252224: ; 0x02252224 + .incbin "incbin/overlay9_rodata.bin", 0x1014, 0x1034 - 0x1014 + + .global Unk_ov9_02252244 +Unk_ov9_02252244: ; 0x02252244 + .incbin "incbin/overlay9_rodata.bin", 0x1034, 0x1054 - 0x1034 + + .global Unk_ov9_02252264 +Unk_ov9_02252264: ; 0x02252264 + .incbin "incbin/overlay9_rodata.bin", 0x1054, 0x1074 - 0x1054 + + .global Unk_ov9_02252284 +Unk_ov9_02252284: ; 0x02252284 + .incbin "incbin/overlay9_rodata.bin", 0x1074, 0x1094 - 0x1074 + + .global Unk_ov9_022522A4 +Unk_ov9_022522A4: ; 0x022522A4 + .incbin "incbin/overlay9_rodata.bin", 0x1094, 0x10B4 - 0x1094 + + .global Unk_ov9_022522C4 +Unk_ov9_022522C4: ; 0x022522C4 + .incbin "incbin/overlay9_rodata.bin", 0x10B4, 0x10D4 - 0x10B4 + + .global Unk_ov9_022522E4 +Unk_ov9_022522E4: ; 0x022522E4 + .incbin "incbin/overlay9_rodata.bin", 0x10D4, 0x10F4 - 0x10D4 + + .global Unk_ov9_02252304 +Unk_ov9_02252304: ; 0x02252304 + .incbin "incbin/overlay9_rodata.bin", 0x10F4, 0x1114 - 0x10F4 + + .global Unk_ov9_02252324 +Unk_ov9_02252324: ; 0x02252324 + .incbin "incbin/overlay9_rodata.bin", 0x1114, 0x1134 - 0x1114 + + .global Unk_ov9_02252344 +Unk_ov9_02252344: ; 0x02252344 + .incbin "incbin/overlay9_rodata.bin", 0x1134, 0x1154 - 0x1134 + + .global Unk_ov9_02252364 +Unk_ov9_02252364: ; 0x02252364 + .incbin "incbin/overlay9_rodata.bin", 0x1154, 0x1174 - 0x1154 + + .global Unk_ov9_02252384 +Unk_ov9_02252384: ; 0x02252384 + .incbin "incbin/overlay9_rodata.bin", 0x1174, 0x1198 - 0x1174 + + .global Unk_ov9_022523A8 +Unk_ov9_022523A8: ; 0x022523A8 + .incbin "incbin/overlay9_rodata.bin", 0x1198, 0x11BC - 0x1198 + + .global Unk_ov9_022523CC +Unk_ov9_022523CC: ; 0x022523CC + .incbin "incbin/overlay9_rodata.bin", 0x11BC, 0x11E0 - 0x11BC + + .global Unk_ov9_022523F0 +Unk_ov9_022523F0: ; 0x022523F0 + .incbin "incbin/overlay9_rodata.bin", 0x11E0, 0x1204 - 0x11E0 + + .global Unk_ov9_02252414 +Unk_ov9_02252414: ; 0x02252414 + .incbin "incbin/overlay9_rodata.bin", 0x1204, 0x1228 - 0x1204 + + .global Unk_ov9_02252438 +Unk_ov9_02252438: ; 0x02252438 + .incbin "incbin/overlay9_rodata.bin", 0x1228, 0x124C - 0x1228 + + .global Unk_ov9_0225245C +Unk_ov9_0225245C: ; 0x0225245C + .incbin "incbin/overlay9_rodata.bin", 0x124C, 0x1270 - 0x124C + + .global Unk_ov9_02252480 +Unk_ov9_02252480: ; 0x02252480 + .incbin "incbin/overlay9_rodata.bin", 0x1270, 0x1298 - 0x1270 + + .global Unk_ov9_022524A8 +Unk_ov9_022524A8: ; 0x022524A8 + .incbin "incbin/overlay9_rodata.bin", 0x1298, 0x12C0 - 0x1298 + + .global Unk_ov9_022524D0 +Unk_ov9_022524D0: ; 0x022524D0 + .incbin "incbin/overlay9_rodata.bin", 0x12C0, 0x12E8 - 0x12C0 + + .global Unk_ov9_022524F8 +Unk_ov9_022524F8: ; 0x022524F8 + .incbin "incbin/overlay9_rodata.bin", 0x12E8, 0x1310 - 0x12E8 + + .global Unk_ov9_02252520 +Unk_ov9_02252520: ; 0x02252520 + .incbin "incbin/overlay9_rodata.bin", 0x1310, 0x1338 - 0x1310 + + .global Unk_ov9_02252548 +Unk_ov9_02252548: ; 0x02252548 + .incbin "incbin/overlay9_rodata.bin", 0x1338, 0x1360 - 0x1338 + + .global Unk_ov9_02252570 +Unk_ov9_02252570: ; 0x02252570 + .incbin "incbin/overlay9_rodata.bin", 0x1360, 0x1388 - 0x1360 + + .global Unk_ov9_02252598 +Unk_ov9_02252598: ; 0x02252598 + .incbin "incbin/overlay9_rodata.bin", 0x1388, 0x13B0 - 0x1388 + + .global Unk_ov9_022525C0 +Unk_ov9_022525C0: ; 0x022525C0 + .incbin "incbin/overlay9_rodata.bin", 0x13B0, 0x13D8 - 0x13B0 + + .global Unk_ov9_022525E8 +Unk_ov9_022525E8: ; 0x022525E8 + .incbin "incbin/overlay9_rodata.bin", 0x13D8, 0x1400 - 0x13D8 + + .global Unk_ov9_02252610 +Unk_ov9_02252610: ; 0x02252610 + .incbin "incbin/overlay9_rodata.bin", 0x1400, 0x1428 - 0x1400 + + .global Unk_ov9_02252638 +Unk_ov9_02252638: ; 0x02252638 + .incbin "incbin/overlay9_rodata.bin", 0x1428, 0x1450 - 0x1428 + + .global Unk_ov9_02252660 +Unk_ov9_02252660: ; 0x02252660 + .incbin "incbin/overlay9_rodata.bin", 0x1450, 0x1478 - 0x1450 + + .global Unk_ov9_02252688 +Unk_ov9_02252688: ; 0x02252688 + .incbin "incbin/overlay9_rodata.bin", 0x1478, 0x14A0 - 0x1478 + + .global Unk_ov9_022526B0 +Unk_ov9_022526B0: ; 0x022526B0 + .incbin "incbin/overlay9_rodata.bin", 0x14A0, 0x14C8 - 0x14A0 + + .global Unk_ov9_022526D8 +Unk_ov9_022526D8: ; 0x022526D8 + .incbin "incbin/overlay9_rodata.bin", 0x14C8, 0x14F0 - 0x14C8 + + .global Unk_ov9_02252700 +Unk_ov9_02252700: ; 0x02252700 + .incbin "incbin/overlay9_rodata.bin", 0x14F0, 0x1518 - 0x14F0 + + .global Unk_ov9_02252728 +Unk_ov9_02252728: ; 0x02252728 + .incbin "incbin/overlay9_rodata.bin", 0x1518, 0x1540 - 0x1518 + + .global Unk_ov9_02252750 +Unk_ov9_02252750: ; 0x02252750 + .incbin "incbin/overlay9_rodata.bin", 0x1540, 0x1568 - 0x1540 + + .global Unk_ov9_02252778 +Unk_ov9_02252778: ; 0x02252778 + .incbin "incbin/overlay9_rodata.bin", 0x1568, 0x1590 - 0x1568 + + .global Unk_ov9_022527A0 +Unk_ov9_022527A0: ; 0x022527A0 + .incbin "incbin/overlay9_rodata.bin", 0x1590, 0x15B8 - 0x1590 + + .global Unk_ov9_022527C8 +Unk_ov9_022527C8: ; 0x022527C8 + .incbin "incbin/overlay9_rodata.bin", 0x15B8, 0x15E0 - 0x15B8 + + .global Unk_ov9_022527F0 +Unk_ov9_022527F0: ; 0x022527F0 + .incbin "incbin/overlay9_rodata.bin", 0x15E0, 0x1608 - 0x15E0 + + .global Unk_ov9_02252818 +Unk_ov9_02252818: ; 0x02252818 + .incbin "incbin/overlay9_rodata.bin", 0x1608, 0x1630 - 0x1608 + + .global Unk_ov9_02252840 +Unk_ov9_02252840: ; 0x02252840 + .incbin "incbin/overlay9_rodata.bin", 0x1630, 0x1658 - 0x1630 + + .global Unk_ov9_02252868 +Unk_ov9_02252868: ; 0x02252868 + .incbin "incbin/overlay9_rodata.bin", 0x1658, 0x1680 - 0x1658 + + .global Unk_ov9_02252890 +Unk_ov9_02252890: ; 0x02252890 + .incbin "incbin/overlay9_rodata.bin", 0x1680, 0x16A8 - 0x1680 + + .global Unk_ov9_022528B8 +Unk_ov9_022528B8: ; 0x022528B8 + .incbin "incbin/overlay9_rodata.bin", 0x16A8, 0x16D0 - 0x16A8 + + .global Unk_ov9_022528E0 +Unk_ov9_022528E0: ; 0x022528E0 + .incbin "incbin/overlay9_rodata.bin", 0x16D0, 0x16F8 - 0x16D0 + + .global Unk_ov9_02252908 +Unk_ov9_02252908: ; 0x02252908 + .incbin "incbin/overlay9_rodata.bin", 0x16F8, 0x1720 - 0x16F8 + + .global Unk_ov9_02252930 +Unk_ov9_02252930: ; 0x02252930 + .incbin "incbin/overlay9_rodata.bin", 0x1720, 0x1748 - 0x1720 + + .global Unk_ov9_02252958 +Unk_ov9_02252958: ; 0x02252958 + .incbin "incbin/overlay9_rodata.bin", 0x1748, 0x1770 - 0x1748 + + .global Unk_ov9_02252980 +Unk_ov9_02252980: ; 0x02252980 + .incbin "incbin/overlay9_rodata.bin", 0x1770, 0x1798 - 0x1770 + + .global Unk_ov9_022529A8 +Unk_ov9_022529A8: ; 0x022529A8 + .incbin "incbin/overlay9_rodata.bin", 0x1798, 0x17C0 - 0x1798 + + .global Unk_ov9_022529D0 +Unk_ov9_022529D0: ; 0x022529D0 + .incbin "incbin/overlay9_rodata.bin", 0x17C0, 0x17E8 - 0x17C0 + + .global Unk_ov9_022529F8 +Unk_ov9_022529F8: ; 0x022529F8 + .incbin "incbin/overlay9_rodata.bin", 0x17E8, 0x1810 - 0x17E8 + + .global Unk_ov9_02252A20 +Unk_ov9_02252A20: ; 0x02252A20 + .incbin "incbin/overlay9_rodata.bin", 0x1810, 0x1838 - 0x1810 + + .global Unk_ov9_02252A48 +Unk_ov9_02252A48: ; 0x02252A48 + .incbin "incbin/overlay9_rodata.bin", 0x1838, 0x1860 - 0x1838 + + .global Unk_ov9_02252A70 +Unk_ov9_02252A70: ; 0x02252A70 + .incbin "incbin/overlay9_rodata.bin", 0x1860, 0x1888 - 0x1860 + + .global Unk_ov9_02252A98 +Unk_ov9_02252A98: ; 0x02252A98 + .incbin "incbin/overlay9_rodata.bin", 0x1888, 0x18B0 - 0x1888 + + .global Unk_ov9_02252AC0 +Unk_ov9_02252AC0: ; 0x02252AC0 + .incbin "incbin/overlay9_rodata.bin", 0x18B0, 0x18D8 - 0x18B0 + + .global Unk_ov9_02252AE8 +Unk_ov9_02252AE8: ; 0x02252AE8 + .incbin "incbin/overlay9_rodata.bin", 0x18D8, 0x1900 - 0x18D8 + + .global Unk_ov9_02252B10 +Unk_ov9_02252B10: ; 0x02252B10 + .incbin "incbin/overlay9_rodata.bin", 0x1900, 0x1928 - 0x1900 + + .global Unk_ov9_02252B38 +Unk_ov9_02252B38: ; 0x02252B38 + .incbin "incbin/overlay9_rodata.bin", 0x1928, 0x1950 - 0x1928 + + .global Unk_ov9_02252B60 +Unk_ov9_02252B60: ; 0x02252B60 + .incbin "incbin/overlay9_rodata.bin", 0x1950, 0x1978 - 0x1950 + + .global Unk_ov9_02252B88 +Unk_ov9_02252B88: ; 0x02252B88 + .incbin "incbin/overlay9_rodata.bin", 0x1978, 0x19A0 - 0x1978 + + .global Unk_ov9_02252BB0 +Unk_ov9_02252BB0: ; 0x02252BB0 + .incbin "incbin/overlay9_rodata.bin", 0x19A0, 0x19C8 - 0x19A0 + + .global Unk_ov9_02252BD8 +Unk_ov9_02252BD8: ; 0x02252BD8 + .incbin "incbin/overlay9_rodata.bin", 0x19C8, 0x19F8 - 0x19C8 + + .global Unk_ov9_02252C08 +Unk_ov9_02252C08: ; 0x02252C08 + .incbin "incbin/overlay9_rodata.bin", 0x19F8, 0x1A28 - 0x19F8 + + .global Unk_ov9_02252C38 +Unk_ov9_02252C38: ; 0x02252C38 + .incbin "incbin/overlay9_rodata.bin", 0x1A28, 0x1A68 - 0x1A28 + + .global Unk_ov9_02252C78 +Unk_ov9_02252C78: ; 0x02252C78 + .incbin "incbin/overlay9_rodata.bin", 0x1A68, 0x1AA8 - 0x1A68 + + .global Unk_ov9_02252CB8 +Unk_ov9_02252CB8: ; 0x02252CB8 + .incbin "incbin/overlay9_rodata.bin", 0x1AA8, 0x1AE8 - 0x1AA8 + + .global Unk_ov9_02252CF8 +Unk_ov9_02252CF8: ; 0x02252CF8 + .incbin "incbin/overlay9_rodata.bin", 0x1AE8, 0x1B28 - 0x1AE8 + + .global Unk_ov9_02252D38 +Unk_ov9_02252D38: ; 0x02252D38 + .incbin "incbin/overlay9_rodata.bin", 0x1B28, 0x1B70 - 0x1B28 + + .global Unk_ov9_02252D80 +Unk_ov9_02252D80: ; 0x02252D80 + .incbin "incbin/overlay9_rodata.bin", 0x1B70, 0x1BB8 - 0x1B70 + + .global Unk_ov9_02252DC8 +Unk_ov9_02252DC8: ; 0x02252DC8 + .incbin "incbin/overlay9_rodata.bin", 0x1BB8, 0x1C04 - 0x1BB8 + + .global Unk_ov9_02252E14 +Unk_ov9_02252E14: ; 0x02252E14 + .incbin "incbin/overlay9_rodata.bin", 0x1C04, 0x1C54 - 0x1C04 + + .global Unk_ov9_02252E64 +Unk_ov9_02252E64: ; 0x02252E64 + .incbin "incbin/overlay9_rodata.bin", 0x1C54, 0x1CA4 - 0x1C54 + + .global Unk_ov9_02252EB4 +Unk_ov9_02252EB4: ; 0x02252EB4 + .incbin "incbin/overlay9_rodata.bin", 0x1CA4, 0x1CFC - 0x1CA4 + + .global Unk_ov9_02252F0C +Unk_ov9_02252F0C: ; 0x02252F0C + .incbin "incbin/overlay9_rodata.bin", 0x1CFC, 0x1D5C - 0x1CFC + + .global Unk_ov9_02252F6C +Unk_ov9_02252F6C: ; 0x02252F6C + .incbin "incbin/overlay9_rodata.bin", 0x1D5C, 0x1DC0 - 0x1D5C + + .global Unk_ov9_02252FD0 +Unk_ov9_02252FD0: ; 0x02252FD0 + .incbin "incbin/overlay9_rodata.bin", 0x1DC0, 0x1E24 - 0x1DC0 + + .global Unk_ov9_02253034 +Unk_ov9_02253034: ; 0x02253034 + .incbin "incbin/overlay9_rodata.bin", 0x1E24, 0x1E94 - 0x1E24 + + .global Unk_ov9_022530A4 +Unk_ov9_022530A4: ; 0x022530A4 + .incbin "incbin/overlay9_rodata.bin", 0x1E94, 0x1F0C - 0x1E94 + + .global Unk_ov9_0225311C +Unk_ov9_0225311C: ; 0x0225311C + .incbin "incbin/overlay9_rodata.bin", 0x1F0C, 0x1FC0 - 0x1F0C + + .global Unk_ov9_022531D0 +Unk_ov9_022531D0: ; 0x022531D0 + .incbin "incbin/overlay9_rodata.bin", 0x1FC0, 0x2088 - 0x1FC0 + + .global Unk_ov9_02253298 +Unk_ov9_02253298: ; 0x02253298 + .incbin "incbin/overlay9_rodata.bin", 0x2088, 0x21B4 - 0x2088 + + .global Unk_ov9_022533C4 +Unk_ov9_022533C4: ; 0x022533C4 + .incbin "incbin/overlay9_rodata.bin", 0x21B4, 0x22E0 - 0x21B4 + + .global Unk_ov9_022534F0 +Unk_ov9_022534F0: ; 0x022534F0 + .incbin "incbin/overlay9_rodata.bin", 0x22E0, 0x2470 - 0x22E0 + + .global Unk_ov9_02253680 +Unk_ov9_02253680: ; 0x02253680 + .incbin "incbin/overlay9_rodata.bin", 0x2470, 0x2620 - 0x2470 + + .global Unk_ov9_02253830 +Unk_ov9_02253830: ; 0x02253830 + .incbin "incbin/overlay9_rodata.bin", 0x2620, 0x2C0 + .data - .incbin "incbin/overlay9_data.bin" - .bss - .space 0x0 + + .global Unk_ov9_02253B00 +Unk_ov9_02253B00: ; 0x02253B00 + .incbin "incbin/overlay9_data.bin", 0x0, 0x8 - 0x0 + + .global Unk_ov9_02253B08 +Unk_ov9_02253B08: ; 0x02253B08 + .incbin "incbin/overlay9_data.bin", 0x8, 0x10 - 0x8 + + .global Unk_ov9_02253B10 +Unk_ov9_02253B10: ; 0x02253B10 + .incbin "incbin/overlay9_data.bin", 0x10, 0x18 - 0x10 + + .global Unk_ov9_02253B18 +Unk_ov9_02253B18: ; 0x02253B18 + .incbin "incbin/overlay9_data.bin", 0x18, 0x20 - 0x18 + + .global Unk_ov9_02253B20 +Unk_ov9_02253B20: ; 0x02253B20 + .incbin "incbin/overlay9_data.bin", 0x20, 0x28 - 0x20 + + .global Unk_ov9_02253B28 +Unk_ov9_02253B28: ; 0x02253B28 + .incbin "incbin/overlay9_data.bin", 0x28, 0x34 - 0x28 + + .global Unk_ov9_02253B34 +Unk_ov9_02253B34: ; 0x02253B34 + .incbin "incbin/overlay9_data.bin", 0x34, 0x40 - 0x34 + + .global Unk_ov9_02253B40 +Unk_ov9_02253B40: ; 0x02253B40 + .incbin "incbin/overlay9_data.bin", 0x40, 0x4C - 0x40 + + .global Unk_ov9_02253B4C +Unk_ov9_02253B4C: ; 0x02253B4C + .incbin "incbin/overlay9_data.bin", 0x4C, 0x58 - 0x4C + + .global Unk_ov9_02253B58 +Unk_ov9_02253B58: ; 0x02253B58 + .incbin "incbin/overlay9_data.bin", 0x58, 0x64 - 0x58 + + .global Unk_ov9_02253B64 +Unk_ov9_02253B64: ; 0x02253B64 + .incbin "incbin/overlay9_data.bin", 0x64, 0x74 - 0x64 + + .global Unk_ov9_02253B74 +Unk_ov9_02253B74: ; 0x02253B74 + .incbin "incbin/overlay9_data.bin", 0x74, 0x84 - 0x74 + + .global Unk_ov9_02253B84 +Unk_ov9_02253B84: ; 0x02253B84 + .incbin "incbin/overlay9_data.bin", 0x84, 0x98 - 0x84 + + .global Unk_ov9_02253B98 +Unk_ov9_02253B98: ; 0x02253B98 + .incbin "incbin/overlay9_data.bin", 0x98, 0xB0 - 0x98 + + .global Unk_ov9_02253BB0 +Unk_ov9_02253BB0: ; 0x02253BB0 + .incbin "incbin/overlay9_data.bin", 0xB0, 0xC8 - 0xB0 + + .global Unk_ov9_02253BC8 +Unk_ov9_02253BC8: ; 0x02253BC8 + .incbin "incbin/overlay9_data.bin", 0xC8, 0xE4 - 0xC8 + + .global Unk_ov9_02253BE4 +Unk_ov9_02253BE4: ; 0x02253BE4 + .incbin "incbin/overlay9_data.bin", 0xE4, 0x12C - 0xE4 + + .global Unk_ov9_02253C2C +Unk_ov9_02253C2C: ; 0x02253C2C + .incbin "incbin/overlay9_data.bin", 0x12C, 0x178 - 0x12C + + .global Unk_ov9_02253C78 +Unk_ov9_02253C78: ; 0x02253C78 + .incbin "incbin/overlay9_data.bin", 0x178, 0x54 + diff --git a/asm/overlay12.s b/asm/overlay12.s deleted file mode 100644 index f38d7f633..000000000 --- a/asm/overlay12.s +++ /dev/null @@ -1,50831 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov12_0221FC20 -ov12_0221FC20: ; 0x0221FC20 - add r1, r0, #0 - add r1, #0x8d - ldrb r1, [r1] - cmp r1, #0 - bne _0221FC32 - ldr r1, _0221FC40 ; =ov12_0221FC44 - add r0, #0xbc - str r1, [r0, #0] - bx lr -_0221FC32: - add r1, r0, #0 - add r1, #0x8d - ldrb r1, [r1] - add r0, #0x8d - sub r1, r1, #1 - strb r1, [r0] - bx lr - ; .align 2, 0 -_0221FC40: .word ov12_0221FC44 - thumb_func_end ov12_0221FC20 - - thumb_func_start ov12_0221FC44 -ov12_0221FC44: ; 0x0221FC44 - push {r4, lr} - add r4, r0, #0 -_0221FC48: - ldr r0, [r4, #0x18] - ldr r0, [r0, #0] - bl ov12_02223164 - add r1, r0, #0 - add r0, r4, #0 - blx r1 - add r0, r4, #0 - add r0, #0x8d - ldrb r0, [r0] - cmp r0, #0 - bne _0221FC66 - ldr r0, [r4, #0x10] - cmp r0, #1 - beq _0221FC48 -_0221FC66: - pop {r4, pc} - thumb_func_end ov12_0221FC44 - - thumb_func_start ov12_0221FC68 -ov12_0221FC68: ; 0x0221FC68 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - cmp r0, #1 - beq _0221FC78 - cmp r0, #2 - beq _0221FC86 - b _0221FC94 -_0221FC78: - add r0, r1, #0 - add r0, #0x8e - ldrh r0, [r0] - add r1, #0x8e - add r0, r0, #1 - strh r0, [r1] - b _0221FC98 -_0221FC86: - add r0, r1, #0 - add r0, #0x90 - ldrh r0, [r0] - add r1, #0x90 - add r0, r0, #1 - strh r0, [r1] - b _0221FC98 -_0221FC94: - bl sub_02022974 -_0221FC98: - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - thumb_func_end ov12_0221FC68 - - thumb_func_start ov12_0221FCA4 -ov12_0221FCA4: ; 0x0221FCA4 - push {r4, lr} - add r4, r2, #0 - cmp r0, #1 - beq _0221FCB2 - cmp r0, #2 - beq _0221FCC0 - b _0221FCCE -_0221FCB2: - add r0, r1, #0 - add r0, #0x8e - ldrh r0, [r0] - add r1, #0x8e - sub r0, r0, #1 - strh r0, [r1] - b _0221FCD2 -_0221FCC0: - add r0, r1, #0 - add r0, #0x90 - ldrh r0, [r0] - add r1, #0x90 - sub r0, r0, #1 - strh r0, [r1] - b _0221FCD2 -_0221FCCE: - bl sub_02022974 -_0221FCD2: - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0221FCA4 - - thumb_func_start ov12_0221FCDC -ov12_0221FCDC: ; 0x0221FCDC - push {r3, r4, r5, lr} - mov r1, #0x6f - lsl r1, r1, #2 - add r5, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _0221FCF8 - cmp r4, #0 - bne _0221FCF4 - bl sub_02022974 -_0221FCF4: - mov r0, #0 - pop {r3, r4, r5, pc} -_0221FCF8: - mov r2, #0x6f - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - mov r1, #0x47 - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - lsl r1, r1, #2 - bl sub_02018144 - add r1, r4, #0 - add r1, #0xc0 - str r0, [r1, #0] - mov r0, #7 - add r1, r5, #0 - bl sub_02006C24 - mov r1, #0x69 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x1b - add r1, r5, #0 - bl sub_02006C24 - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x15 - add r1, r5, #0 - bl sub_02006C24 - mov r1, #0x6b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x16 - add r1, r5, #0 - bl sub_02006C24 - mov r1, #0x1b - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #0x17 - add r1, r5, #0 - bl sub_02006C24 - mov r1, #0x6d - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x18 - add r1, r5, #0 - bl sub_02006C24 - mov r2, #0x6e - lsl r2, r2, #2 - str r0, [r4, r2] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0221FD80 - bne _0221FD7C - bl sub_02022974 -_0221FD7C: - mov r0, #0 - pop {r3, r4, r5, pc} -_0221FD80: - mov r1, #0 - sub r2, #0x9c - bl sub_020D5124 - mov r1, #0 - str r1, [r4, #0xc] - str r1, [r4, #0x18] - add r2, r4, #0 - add r3, r1, #0 -_0221FD92: - add r0, r2, #0 - add r0, #0xcc - add r1, r1, #1 - add r2, r2, #4 - str r3, [r0, #0] - cmp r1, #4 - blt _0221FD92 - mov r0, #0x59 - add r2, r4, #0 - mov r1, #0 - lsl r0, r0, #2 -_0221FDA8: - add r3, r3, #1 - str r1, [r2, r0] - add r2, r2, #4 - cmp r3, #5 - blt _0221FDA8 - mov r0, #0x5e - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #1 - str r0, [r4, #0xc] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_0221FCDC - - thumb_func_start ov12_0221FDC0 -ov12_0221FDC0: ; 0x0221FDC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _0221FDCE - bl sub_02022974 -_0221FDCE: - str r4, [r5, #8] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0221FDC0 - - thumb_func_start ov12_0221FDD4 -ov12_0221FDD4: ; 0x0221FDD4 - push {r4, lr} - add r4, r0, #0 - bne _0221FDDE - bl sub_02022974 -_0221FDDE: - ldr r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0221FDD4 - - thumb_func_start ov12_0221FDE4 -ov12_0221FDE4: ; 0x0221FDE4 - push {r4, lr} - add r4, r0, #0 - bne _0221FDEE - bl sub_02022974 -_0221FDEE: - ldr r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0221FDE4 - - thumb_func_start ov12_0221FDF4 -ov12_0221FDF4: ; 0x0221FDF4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl ov12_022201B4 - cmp r0, #0 - bne _0221FE04 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0221FE04: - mov r6, #0x69 - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #2 -_0221FE0C: - ldr r0, [r5, r6] - bl sub_02006CA8 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _0221FE0C - add r0, r7, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r7, #0 - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_0221FDF4 - - thumb_func_start ov12_0221FE30 -ov12_0221FE30: ; 0x0221FE30 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r4, r0, #0 - add r5, r1, #0 - str r2, [sp] - str r3, [sp, #4] - bl ov12_02220474 - add r0, r4, #0 - bl ov12_022201B4 - cmp r0, #0 - bne _0221FE50 - add sp, #0x3c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0221FE50: - mov r3, #0 - mov r2, #1 - add r1, r3, #0 -_0221FE56: - add r0, r4, r3 - add r0, #0x6c - strb r2, [r0] - add r0, r4, r3 - add r0, #0x7c - add r3, r3, #1 - strb r1, [r0] - cmp r3, #0x10 - blt _0221FE56 - add r3, r4, #0 - mov r0, #0 -_0221FE6C: - add r2, r3, #0 - add r2, #0x94 - add r1, r1, #1 - add r3, r3, #4 - str r0, [r2, #0] - cmp r1, #0xa - blt _0221FE6C - add r3, r4, #0 - mov r2, #0 -_0221FE7E: - str r2, [r3, #0x30] - add r1, r3, #0 - str r2, [r3, #0x28] - add r1, #0x2c - strb r2, [r1] - add r1, r3, #0 - add r1, #0x2d - add r0, r0, #1 - add r3, #0xc - strb r2, [r1] - cmp r0, #3 - blt _0221FE7E - add r0, r4, #0 - add r0, #0xc0 - ldrb r1, [r5] - ldr r0, [r0, #0] - strb r1, [r0] - add r0, r4, #0 - add r0, #0xc0 - ldrb r1, [r5, #1] - ldr r0, [r0, #0] - strb r1, [r0, #1] - add r0, r4, #0 - add r0, #0xc0 - ldrh r1, [r5, #2] - ldr r0, [r0, #0] - strh r1, [r0, #2] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r5, #4] - ldr r0, [r0, #0] - str r1, [r0, #4] - add r0, r4, #0 - add r0, #0xc0 - ldrh r1, [r5, #8] - ldr r0, [r0, #0] - strh r1, [r0, #8] - add r0, r4, #0 - add r0, #0xc0 - ldrh r1, [r5, #0xc] - ldr r0, [r0, #0] - strh r1, [r0, #0xa] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r5, #0x10] - ldr r0, [r0, #0] - str r1, [r0, #0xc] - add r0, r4, #0 - add r0, #0xc0 - ldrh r1, [r5, #0xa] - ldr r0, [r0, #0] - strh r1, [r0, #0x10] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r5, #0x54] - ldr r0, [r0, #0] - strh r1, [r0, #0x12] - add r0, r4, #0 - add r0, #0xc0 - ldrh r1, [r5, #0x14] - ldr r0, [r0, #0] - strh r1, [r0, #0x14] - add r0, r4, #0 - add r0, #0xc0 - ldrh r1, [r5, #0x16] - ldr r0, [r0, #0] - strh r1, [r0, #0x16] - ldrh r0, [r5, #0xe] - lsl r0, r0, #0x1e - lsr r2, r0, #0x1f - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - str r2, [r1, r0] - ldr r0, [sp, #4] - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - str r1, [r0, #0] - ldr r0, [sp, #4] - ldr r0, [r0, #0] - cmp r0, #0 - bne _0221FF30 - bl sub_02022974 -_0221FF30: - ldr r0, [sp, #4] - mov r2, #0 - ldr r1, [r0, #4] - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r7, r2, #0 - ldr r1, [r0, #8] - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] - ldr r0, [sp, #4] - ldr r1, [r0, #0x30] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xd4 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r1, r2, #0 - add r3, r0, #0 - mov ip, r3 -_0221FF5E: - add r5, r4, #0 - add r5, #0xc0 - ldr r5, [r5, #0] - ldr r3, [r0, #0xc] - add r5, r5, r1 - add r5, #0xb0 - str r3, [r5, #0] - ldr r3, [sp, #4] - add r5, r4, #0 - add r5, #0xc0 - add r6, r3, r2 - ldr r5, [r5, #0] - ldrb r3, [r6, #0x1c] - add r5, r5, r2 - add r5, #0xc0 - strb r3, [r5] - add r5, r4, #0 - add r5, #0xc0 - ldr r5, [r5, #0] - ldr r3, [r0, #0x20] - add r5, r5, r1 - add r5, #0xc4 - str r3, [r5, #0] - add r5, r4, #0 - add r5, #0xc0 - mov r3, ip - ldr r5, [r5, #0] - ldrh r3, [r3, #0x34] - add r5, r5, r7 - add r5, #0xd8 - strh r3, [r5] - add r5, r4, #0 - add r3, r6, #0 - add r5, #0xc0 - add r3, #0x3c - ldr r5, [r5, #0] - ldrb r3, [r3] - add r5, r5, r2 - add r5, #0xe0 - strb r3, [r5] - add r3, r6, #0 - add r5, r4, #0 - add r5, #0xc0 - add r3, #0x40 - ldr r5, [r5, #0] - ldrb r3, [r3] - add r5, r5, r2 - add r5, #0xe4 - strb r3, [r5] - add r5, r4, #0 - add r5, #0xc0 - add r6, #0x44 - ldr r5, [r5, #0] - ldrb r3, [r6] - add r5, r5, r2 - add r5, #0xe8 - strb r3, [r5] - add r5, r4, #0 - add r5, #0xc0 - ldr r5, [r5, #0] - ldr r3, [r0, #0x48] - add r5, r5, r1 - add r5, #0xec - str r3, [r5, #0] - add r5, r4, #0 - add r5, #0xc0 - ldr r5, [r5, #0] - ldr r3, [r0, #0x58] - add r5, r5, r1 - add r5, #0xfc - str r3, [r5, #0] - mov r3, ip - add r3, r3, #2 - add r2, r2, #1 - add r0, r0, #4 - add r1, r1, #4 - add r7, r7, #2 - mov ip, r3 - cmp r2, #4 - blt _0221FF5E - ldr r5, [sp, #4] - mov r2, #0x61 - lsl r2, r2, #2 - add r5, #0x6c - add r3, r4, r2 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [sp, #4] - add r0, #0x84 - ldr r3, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - add r0, r2, #0 - sub r0, #0x78 - str r3, [r1, r0] - ldr r0, [sp, #4] - add r0, #0x8c - ldr r3, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - add r0, r2, #0 - sub r0, #0x70 - str r3, [r1, r0] - ldr r0, [sp, #4] - add r0, #0x88 - ldr r3, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - add r0, r2, #0 - sub r0, #0x74 - str r3, [r1, r0] - ldr r0, [sp] - sub r2, #0x62 - cmp r0, r2 - bne _0222007E - ldr r5, _02220154 ; =0x02238680 - add r3, sp, #8 - mov r2, #6 -_02220058: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02220058 - ldr r0, [r5, #0] - str r0, [r3, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #0x12] - cmp r0, #0x18 - blo _02220076 - mov r0, #0xa1 - str r0, [sp] - b _0222007E -_02220076: - lsl r1, r0, #2 - add r0, sp, #8 - ldr r0, [r0, r1] - str r0, [sp] -_0222007E: - ldr r0, [sp] - cmp r0, #0 - beq _0222008A - ldr r1, _02220158 ; =0x000001D3 - cmp r0, r1 - ble _0222008E -_0222008A: - mov r0, #1 - str r0, [sp] -_0222008E: - ldr r0, [sp, #4] - ldr r0, [r0, #0x68] - str r0, [r4, #4] - ldr r1, [sp] - ldr r2, [r4, #0] - bl sub_02006AC0 - str r0, [r4, #0x14] - cmp r0, #0 - bne _022200AE - bne _022200A8 - bl sub_02022974 -_022200A8: - add sp, #0x3c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022200AE: - str r0, [r4, #0x18] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0201A008 - mov r1, #0x1a - lsl r1, r1, #4 - strb r0, [r4, r1] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0201A008 - ldr r1, _0222015C ; =0x000001A1 - strb r0, [r4, r1] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_0201A008 - ldr r1, _02220160 ; =0x000001A2 - strb r0, [r4, r1] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_0201A008 - ldr r1, _02220164 ; =0x000001A3 - mov r3, #0 - strb r0, [r4, r1] - add r2, r4, #0 - add r1, r3, #0 -_022200F8: - add r0, r2, #0 - add r0, #0xdc - add r3, r3, #1 - add r2, r2, #4 - str r1, [r0, #0] - cmp r3, #0xa - blt _022200F8 - mov r2, #0x4f - lsl r2, r2, #2 - add r3, r2, #0 - add r5, r4, #0 - mov r0, #0 - add r3, #0x14 -_02220112: - str r0, [r5, r2] - str r0, [r5, r3] - add r1, r1, #1 - add r5, r5, #4 - cmp r1, #5 - blt _02220112 - mov r1, #6 - lsl r1, r1, #6 - str r0, [r4, r1] - add r1, r4, #0 - ldr r2, _02220168 ; =ov12_0221FC44 - add r1, #0xbc - str r2, [r1, #0] - add r1, r4, #0 - add r1, #0x8d - strb r0, [r1] - add r0, r4, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02220144 - mov r0, #0x67 - mov r1, #7 - lsl r0, r0, #2 - b _0222014A -_02220144: - mov r1, #0xff - add r0, r1, #0 - add r0, #0x9d -_0222014A: - str r1, [r4, r0] - mov r0, #1 - str r0, [r4, #0x10] - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02220154: .word 0x02238680 -_02220158: .word 0x000001D3 -_0222015C: .word 0x000001A1 -_02220160: .word 0x000001A2 -_02220164: .word 0x000001A3 -_02220168: .word ov12_0221FC44 - thumb_func_end ov12_0221FE30 - - thumb_func_start ov12_0222016C -ov12_0222016C: ; 0x0222016C - push {r4, lr} - add r4, r0, #0 - bl ov12_022201B4 - cmp r0, #0 - bne _0222017C - mov r0, #0 - pop {r4, pc} -_0222017C: - add r0, r4, #0 - add r4, #0xbc - ldr r1, [r4, #0] - blx r1 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_0222016C - - thumb_func_start ov12_02220188 -ov12_02220188: ; 0x02220188 - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _02220192 - mov r0, #1 - bx lr -_02220192: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220188 - - thumb_func_start ov12_02220198 -ov12_02220198: ; 0x02220198 - push {r3, lr} - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _022201AA - bne _022201A6 - bl sub_02022974 -_022201A6: - mov r0, #0 - pop {r3, pc} -_022201AA: - bl sub_020181C4 - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02220198 - - thumb_func_start ov12_022201B4 -ov12_022201B4: ; 0x022201B4 - cmp r0, #0 - bne _022201BC - mov r0, #0 - bx lr -_022201BC: - ldr r0, [r0, #0xc] - cmp r0, #1 - bne _022201C6 - mov r0, #1 - bx lr -_022201C6: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_022201B4 - - thumb_func_start ov12_022201CC -ov12_022201CC: ; 0x022201CC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - str r3, [sp] - mov r0, #1 - add r1, r6, #0 - add r2, r5, #0 - add r3, r4, #0 - bl ov12_0221FC68 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov12_022201CC - - thumb_func_start ov12_022201E8 -ov12_022201E8: ; 0x022201E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _02220200 ; =0x0000044C - add r4, r1, #0 - add r3, r2, #0 - str r0, [sp] - mov r0, #1 - add r1, r5, #0 - add r2, r4, #0 - bl ov12_0221FC68 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02220200: .word 0x0000044C - thumb_func_end ov12_022201E8 - - thumb_func_start ov12_02220204 -ov12_02220204: ; 0x02220204 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - str r3, [sp] - mov r0, #2 - add r1, r6, #0 - add r2, r5, #0 - add r3, r4, #0 - bl ov12_0221FC68 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov12_02220204 - - thumb_func_start ov12_02220220 -ov12_02220220: ; 0x02220220 - add r3, r0, #0 - add r2, r1, #0 - add r1, r3, #0 - ldr r3, _0222022C ; =ov12_0221FCA4 - mov r0, #1 - bx r3 - ; .align 2, 0 -_0222022C: .word ov12_0221FCA4 - thumb_func_end ov12_02220220 - - thumb_func_start ov12_02220230 -ov12_02220230: ; 0x02220230 - add r3, r0, #0 - add r2, r1, #0 - add r1, r3, #0 - ldr r3, _0222023C ; =ov12_0221FCA4 - mov r0, #2 - bx r3 - ; .align 2, 0 -_0222023C: .word ov12_0221FCA4 - thumb_func_end ov12_02220230 - - thumb_func_start ov12_02220240 -ov12_02220240: ; 0x02220240 - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #0x14] - bx lr - thumb_func_end ov12_02220240 - - thumb_func_start ov12_02220248 -ov12_02220248: ; 0x02220248 - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #0x16] - bx lr - thumb_func_end ov12_02220248 - - thumb_func_start ov12_02220250 -ov12_02220250: ; 0x02220250 - add r0, #0xc0 - ldr r1, [r0, #0] - ldr r0, [r1, #0x18] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x1c] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220250 - - thumb_func_start ov12_02220260 -ov12_02220260: ; 0x02220260 - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - ldr r0, [r0, #0x1c] - bx lr - thumb_func_end ov12_02220260 - - thumb_func_start ov12_0222026C -ov12_0222026C: ; 0x0222026C - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - ldr r0, [r0, #0x5c] - bx lr - thumb_func_end ov12_0222026C - - thumb_func_start ov12_02220278 -ov12_02220278: ; 0x02220278 - add r0, #0xc4 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220278 - - thumb_func_start ov12_02220280 -ov12_02220280: ; 0x02220280 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #0xa - blt _0222028E - bl sub_02022974 -_0222028E: - lsl r0, r5, #2 - add r0, r4, r0 - add r0, #0x94 - ldr r0, [r0, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02220280 - - thumb_func_start ov12_02220298 -ov12_02220298: ; 0x02220298 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0xa - blt _022202A6 - bl sub_02022974 -_022202A6: - cmp r5, #0 - bne _022202AE - bl sub_02022974 -_022202AE: - add r5, #0xdc - lsl r4, r4, #2 - ldr r0, [r5, r4] - cmp r0, #0 - bne _022202BC - bl sub_02022974 -_022202BC: - ldr r0, [r5, r4] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02220298 - - thumb_func_start ov12_022202C0 -ov12_022202C0: ; 0x022202C0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #5 - blt _022202CE - bl sub_02022974 -_022202CE: - cmp r5, #0 - bne _022202D6 - bl sub_02022974 -_022202D6: - mov r0, #0x4f - lsl r0, r0, #2 - add r5, r5, r0 - lsl r4, r4, #2 - ldr r0, [r5, r4] - cmp r0, #0 - bne _022202E8 - bl sub_02022974 -_022202E8: - ldr r0, [r5, r4] - pop {r3, r4, r5, pc} - thumb_func_end ov12_022202C0 - - thumb_func_start ov12_022202EC -ov12_022202EC: ; 0x022202EC - push {r4, lr} - add r4, r0, #0 - bne _022202F6 - bl sub_02022974 -_022202F6: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022202EC - - thumb_func_start ov12_02220300 -ov12_02220300: ; 0x02220300 - add r0, #0xcc - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220300 - - thumb_func_start ov12_02220308 -ov12_02220308: ; 0x02220308 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220308 - - thumb_func_start ov12_02220314 -ov12_02220314: ; 0x02220314 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x3c - bl sub_02018144 - add r4, r0, #0 - bne _0222032C - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, pc} -_0222032C: - mov r1, #0 - mov r2, #0x3c - bl sub_020D5124 - add r0, r5, #0 - add r0, #0x90 - ldrh r0, [r0] - add r5, #0x90 - add r0, r0, #1 - strh r0, [r5] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02220314 - - thumb_func_start ov12_02220344 -ov12_02220344: ; 0x02220344 - ldr r3, _02220350 ; =sub_0200D9E8 - str r0, [r1, #0x38] - ldr r0, _02220354 ; =ov12_0222035C - ldr r2, _02220358 ; =0x0000044C - bx r3 - nop -_02220350: .word sub_0200D9E8 -_02220354: .word ov12_0222035C -_02220358: .word 0x0000044C - thumb_func_end ov12_02220344 - - thumb_func_start ov12_0222035C -ov12_0222035C: ; 0x0222035C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02220398 ; =0x0223862C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - bne _02220396 - ldr r0, [r4, #0x38] - add r1, r0, #0 - add r1, #0x90 - ldrh r1, [r1] - cmp r1, #0 - beq _0222038A - add r1, r0, #0 - add r1, #0x90 - ldrh r1, [r1] - add r0, #0x90 - sub r1, r1, #1 - strh r1, [r0] -_0222038A: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02220396: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02220398: .word 0x0223862C - thumb_func_end ov12_0222035C - - thumb_func_start ov12_0222039C -ov12_0222039C: ; 0x0222039C - mov r0, #0 - bx lr - thumb_func_end ov12_0222039C - - thumb_func_start ov12_022203A0 -ov12_022203A0: ; 0x022203A0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r1, [r5, #4] - add r0, r1, #1 - strb r0, [r5, #4] - ldrb r0, [r5, #3] - cmp r1, r0 - bhs _022203B4 - mov r0, #1 - pop {r3, r4, r5, pc} -_022203B4: - mov r0, #0 - strb r0, [r5, #4] - ldr r2, [r5, #0x14] - ldr r1, [r5, #0x10] - mov r4, #1 - add r1, r2, r1 - str r1, [r5, #0x14] - ldr r1, [r5, #0x10] - cmp r1, #0 - bne _022203CC - add r4, r0, #0 - b _022203E4 -_022203CC: - ldr r2, [r5, #0xc] - ldr r1, [r5, #8] - cmp r1, r2 - ldr r1, [r5, #0x14] - bge _022203DE - cmp r1, r2 - blt _022203E4 - add r4, r0, #0 - b _022203E4 -_022203DE: - cmp r1, r2 - bgt _022203E4 - add r4, r0, #0 -_022203E4: - ldr r0, [r5, #0x14] - bl sub_02005818 - ldrh r0, [r5, #0x1a] - bl sub_020057D4 - cmp r0, #0 - bne _022203F6 - mov r4, #0 -_022203F6: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022203A0 - - thumb_func_start ov12_022203FC -ov12_022203FC: ; 0x022203FC - ldr r3, _02220400 ; =ov12_022203A0 - bx r3 - ; .align 2, 0 -_02220400: .word ov12_022203A0 - thumb_func_end ov12_022203FC - - thumb_func_start ov12_02220404 -ov12_02220404: ; 0x02220404 - ldr r3, _02220408 ; =ov12_022203A0 - bx r3 - ; .align 2, 0 -_02220408: .word ov12_022203A0 - thumb_func_end ov12_02220404 - - thumb_func_start ov12_0222040C -ov12_0222040C: ; 0x0222040C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r1, [r5, #4] - add r0, r1, #1 - strb r0, [r5, #4] - ldrb r0, [r5, #3] - cmp r1, r0 - bhs _02220420 - mov r0, #1 - pop {r3, r4, r5, pc} -_02220420: - mov r0, #0 - strb r0, [r5, #4] - ldrb r0, [r5, #0x18] - mov r4, #1 - sub r0, r0, #1 - strb r0, [r5, #0x18] - ldrh r0, [r5, #0x1a] - bl sub_02005748 - ldrh r0, [r5, #0x1a] - ldr r1, _02220448 ; =0x0000FFFF - ldr r2, [r5, #0x14] - bl sub_020057FC - ldrb r0, [r5, #0x18] - cmp r0, #0 - bne _02220444 - mov r4, #0 -_02220444: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02220448: .word 0x0000FFFF - thumb_func_end ov12_0222040C - - thumb_func_start ov12_0222044C -ov12_0222044C: ; 0x0222044C - push {r4, lr} - add r4, r0, #0 - ldrb r2, [r4, #3] - mov r0, #1 - sub r1, r2, #1 - strb r1, [r4, #3] - cmp r2, #0 - bne _0222046E - ldrh r0, [r4, #0x1a] - bl sub_02005748 - ldrh r0, [r4, #0x1a] - ldr r1, _02220470 ; =0x0000FFFF - ldr r2, [r4, #0x14] - bl sub_020057FC - mov r0, #0 -_0222046E: - pop {r4, pc} - ; .align 2, 0 -_02220470: .word 0x0000FFFF - thumb_func_end ov12_0222044C - - thumb_func_start ov12_02220474 -ov12_02220474: ; 0x02220474 - push {r3, lr} - ldr r0, _02220488 ; =0x04000050 - mov r3, #8 - mov r1, #0 - mov r2, #0x3f - str r3, [sp] - bl sub_020BF55C - pop {r3, pc} - nop -_02220488: .word 0x04000050 - thumb_func_end ov12_02220474 - - thumb_func_start ov12_0222048C -ov12_0222048C: ; 0x0222048C - push {r3, r4} - add r2, r0, #0 - mov r1, #1 - add r2, #0x8d - strb r1, [r2] - ldr r3, _022204C0 ; =0x021BF67C - lsl r2, r1, #9 - ldr r4, [r3, #0x44] - tst r2, r4 - beq _022204BC - add r2, r1, #0 - add r2, #0xff - tst r2, r4 - beq _022204BC - ldr r2, [r3, #0x48] - lsl r1, r1, #0xa - tst r1, r2 - beq _022204BC - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - mov r1, #0 - add r0, #0x8d - strb r1, [r0] -_022204BC: - pop {r3, r4} - bx lr - ; .align 2, 0 -_022204C0: .word 0x021BF67C - thumb_func_end ov12_0222048C - - thumb_func_start ov12_022204C4 -ov12_022204C4: ; 0x022204C4 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0x8d - strb r2, [r1] - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r1, _022204E0 ; =ov12_0221FC20 - add r0, #0xbc - str r1, [r0, #0] - bx lr - ; .align 2, 0 -_022204E0: .word ov12_0221FC20 - thumb_func_end ov12_022204C4 - - thumb_func_start ov12_022204E4 -ov12_022204E4: ; 0x022204E4 - add r1, r0, #0 - add r1, #0x8e - ldrh r1, [r1] - cmp r1, #0 - bne _022204FC - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - mov r1, #0 - add r0, #0x8d - strb r1, [r0] - bx lr -_022204FC: - mov r1, #1 - add r0, #0x8d - strb r1, [r0] - bx lr - thumb_func_end ov12_022204E4 - - thumb_func_start ov12_02220504 -ov12_02220504: ; 0x02220504 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - cmp r3, #0xa - bhs _02220522 - lsl r1, r3, #2 - add r0, r0, r1 - add r0, #0x94 - str r2, [r0, #0] -_02220522: - bx lr - thumb_func_end ov12_02220504 - - thumb_func_start ov12_02220524 -ov12_02220524: ; 0x02220524 - ldr r1, [r0, #0x18] - mov r3, #0 - add r1, r1, #4 - str r1, [r0, #0x18] - add r2, r3, #0 -_0222052E: - add r1, r0, #0 - add r1, #0x94 - add r3, r3, #1 - add r0, r0, #4 - str r2, [r1, #0] - cmp r3, #0xa - blt _0222052E - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220524 - - thumb_func_start ov12_02220540 -ov12_02220540: ; 0x02220540 - cmp r1, #5 - bhi _0222058C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02220550: ; jump table - .short _0222055C - _02220550 - 2 ; case 0 - .short _02220564 - _02220550 - 2 ; case 1 - .short _0222056C - _02220550 - 2 ; case 2 - .short _02220574 - _02220550 - 2 ; case 3 - .short _0222057C - _02220550 - 2 ; case 4 - .short _02220584 - _02220550 - 2 ; case 5 -_0222055C: - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bx lr -_02220564: - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #8] - bx lr -_0222056C: - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #0xa] - bx lr -_02220574: - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bx lr -_0222057C: - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #0x10] - bx lr -_02220584: - add r0, #0xc0 - ldr r0, [r0, #0] - ldrh r0, [r0, #0x12] - bx lr -_0222058C: - mov r0, #0 - bx lr - thumb_func_end ov12_02220540 - - thumb_func_start ov12_02220590 -ov12_02220590: ; 0x02220590 - push {r3, r4, r5, r6, r7, lr} - add r3, r0, #0 - mov r0, #0 - str r2, [sp] - add r6, r0, #0 - add r5, r1, #0 - mov ip, r0 - add r7, r1, #0 -_022205A0: - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r2, r2, r6 - add r2, #0xb0 - ldr r2, [r2, #0] - str r2, [r5, #8] - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r2, r2, r6 - add r2, #0xc4 - ldr r2, [r2, #0] - str r2, [r5, #0x18] - add r2, r3, #0 - add r2, #0xc0 - ldr r4, [r2, #0] - mov r2, ip - add r2, r4, r2 - add r2, #0xd8 - ldrh r2, [r2] - strh r2, [r7, #0x28] - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r7, r7, #2 - add r2, r2, r0 - add r2, #0xe0 - ldrb r4, [r2] - add r2, r1, r0 - add r2, #0x30 - strb r4, [r2] - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r2, r2, r0 - add r2, #0xe4 - ldrb r4, [r2] - add r2, r1, r0 - add r2, #0x34 - strb r4, [r2] - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r2, r2, r0 - add r2, #0xe8 - ldrb r4, [r2] - add r2, r1, r0 - add r2, #0x38 - strb r4, [r2] - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r2, r2, r6 - add r2, #0xec - ldr r2, [r2, #0] - add r6, r6, #4 - str r2, [r5, #0x3c] - add r2, r3, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r5, r5, #4 - add r2, r2, r0 - add r2, #0xc0 - ldrb r4, [r2] - add r2, r1, r0 - add r2, #0x4c - strb r4, [r2] - mov r2, ip - add r2, r2, #2 - add r0, r0, #1 - mov ip, r2 - cmp r0, #4 - blt _022205A0 - ldr r0, [sp] - cmp r0, #3 - bhi _0222069E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02220646: ; jump table - .short _0222064E - _02220646 - 2 ; case 0 - .short _02220662 - _02220646 - 2 ; case 1 - .short _02220676 - _02220646 - 2 ; case 2 - .short _0222068A - _02220646 - 2 ; case 3 -_0222064E: - add r0, r3, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r3, #0xc0 - ldrh r0, [r0, #0x14] - str r0, [r1, #0] - ldr r0, [r3, #0] - ldrh r0, [r0, #0x16] - str r0, [r1, #4] - pop {r3, r4, r5, r6, r7, pc} -_02220662: - add r0, r3, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r3, #0xc0 - ldrh r0, [r0, #0x14] - str r0, [r1, #0] - ldr r0, [r3, #0] - ldrh r0, [r0, #0x14] - str r0, [r1, #4] - pop {r3, r4, r5, r6, r7, pc} -_02220676: - add r0, r3, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r3, #0xc0 - ldrh r0, [r0, #0x14] - str r0, [r1, #0] - ldr r0, [r3, #0] - ldrh r0, [r0, #0x14] - str r0, [r1, #4] - pop {r3, r4, r5, r6, r7, pc} -_0222068A: - add r0, r3, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r3, #0xc0 - ldrh r0, [r0, #0x14] - str r0, [r1, #0] - ldr r0, [r3, #0] - ldrh r0, [r0, #0x14] - str r0, [r1, #4] - pop {r3, r4, r5, r6, r7, pc} -_0222069E: - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02220590 - - thumb_func_start ov12_022206A4 -ov12_022206A4: ; 0x022206A4 - push {r3, r4, r5, lr} - sub sp, #0x50 - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r4, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - add r1, sp, #0 - add r2, r4, #0 - bl ov12_02220590 - cmp r4, #2 - add r0, sp, #0 - bne _022206CE - ldr r1, [r5, #0] - bl ov12_02238390 - add sp, #0x50 - pop {r3, r4, r5, pc} -_022206CE: - cmp r4, #3 - bne _022206DC - ldr r1, [r5, #0] - bl ov12_022380CC - add sp, #0x50 - pop {r3, r4, r5, pc} -_022206DC: - ldr r1, [r5, #0] - bl ov12_022380BC - add sp, #0x50 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022206A4 - - thumb_func_start ov12_022206E8 -ov12_022206E8: ; 0x022206E8 - push {r4, lr} - sub sp, #0x50 - add r4, r0, #0 - ldr r1, [r4, #0x18] - add r1, r1, #4 - str r1, [r4, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r4, #0x18] - add r1, sp, #0 - bl ov12_02220590 - ldr r1, [r4, #0] - add r0, sp, #0 - bl ov12_022382BC - add sp, #0x50 - pop {r4, pc} - thumb_func_end ov12_022206E8 - - thumb_func_start ov12_0222070C -ov12_0222070C: ; 0x0222070C - ldr r1, [r0, #0x18] - mov r2, #0 - add r1, r1, #4 - str r1, [r0, #0x18] - add r3, r0, #0 -_02220716: - ldr r1, [r3, #0x30] - cmp r1, #1 - beq _02220742 - mov r1, #0xc - mul r1, r2 - mov r2, #1 - add r1, r0, r1 - str r2, [r1, #0x30] - add r2, r1, #0 - mov r3, #0 - add r2, #0x2c - strb r3, [r2] - ldr r2, [r0, #0x18] - ldr r3, [r2, #0] - add r2, r1, #0 - add r2, #0x2d - strb r3, [r2] - ldr r2, [r0, #0x18] - add r2, r2, #4 - str r2, [r0, #0x18] - str r2, [r1, #0x28] - bx lr -_02220742: - add r2, r2, #1 - add r3, #0xc - cmp r2, #3 - blt _02220716 - bx lr - thumb_func_end ov12_0222070C - - thumb_func_start ov12_0222074C -ov12_0222074C: ; 0x0222074C - push {r3, r4} - ldr r1, [r0, #0x18] - add r3, r0, #0 - add r1, r1, #4 - add r3, #0x18 - str r1, [r0, #0x18] - mov r2, #2 -_0222075A: - ldr r1, [r3, #0x30] - cmp r1, #0 - beq _0222078E - add r4, r2, #0 - mov r1, #0xc - add r2, r0, #0 - mul r4, r1 - add r2, #0x2c - ldrb r1, [r2, r4] - add r1, r1, #1 - strb r1, [r2, r4] - ldrb r3, [r2, r4] - add r2, r0, r4 - add r1, r2, #0 - add r1, #0x2d - ldrb r1, [r1] - cmp r3, r1 - bne _02220786 - mov r0, #0 - str r0, [r2, #0x30] - pop {r3, r4} - bx lr -_02220786: - ldr r1, [r2, #0x28] - str r1, [r0, #0x18] - pop {r3, r4} - bx lr -_0222078E: - sub r3, #0xc - sub r2, r2, #1 - bpl _0222075A - pop {r3, r4} - bx lr - thumb_func_end ov12_0222074C - - thumb_func_start ov12_02220798 -ov12_02220798: ; 0x02220798 - push {r3, r4, r5, r6, r7, lr} - ldr r1, _02220994 ; =0x0000017E - add r5, r0, #0 - ldrb r0, [r5, r1] - mov r6, #0 - cmp r0, #1 - bhs _022207B6 - add r0, r5, #0 - mov r2, #1 - add r0, #0x8d - strb r2, [r0] - ldrb r0, [r5, r1] - add r0, r0, #1 - strb r0, [r5, r1] - pop {r3, r4, r5, r6, r7, pc} -_022207B6: - add r7, r6, #0 - add r4, r6, #0 -_022207BA: - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r4 - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _022207CE - bl sub_02014710 - add r6, r6, r0 -_022207CE: - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #0x10 - blt _022207BA - cmp r6, #0 - bne _022207EE - add r0, r5, #0 - add r0, #0x8e - ldrh r0, [r0] - cmp r0, #0 - bne _022207EE - add r0, r5, #0 - add r0, #0x90 - ldrh r0, [r0] - cmp r0, #0 - beq _022207FE -_022207EE: - add r0, r5, #0 - mov r1, #1 - add r0, #0x8d - strb r1, [r0] - ldr r0, _02220998 ; =0x0000017D - mov r1, #0 - strb r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_022207FE: - bl sub_020057E0 - cmp r0, #0 - beq _02220828 - ldr r0, _02220998 ; =0x0000017D - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - ldrb r1, [r5, r0] - cmp r1, #0x5a - bls _02220820 - mov r1, #0 - strb r1, [r5, r0] - add r0, r5, #0 - add r0, #0x8d - strb r1, [r0] - b _02220828 -_02220820: - mov r0, #1 - add r5, #0x8d - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_02220828: - ldr r0, _02220998 ; =0x0000017D - mov r1, #0 - strb r1, [r5, r0] - add r0, r0, #1 - strb r1, [r5, r0] - add r0, r5, #0 - add r2, r1, #0 -_02220836: - add r1, r1, #1 - str r2, [r0, #0x1c] - add r0, r0, #4 - cmp r1, #3 - blt _02220836 - add r1, r5, #0 - mov r4, #0 -_02220844: - add r0, r1, #0 - str r4, [r1, #0x28] - add r0, #0x2c - strb r4, [r0] - add r0, r1, #0 - add r0, #0x2d - strb r4, [r0] - str r4, [r1, #0x30] - add r2, r2, #1 - add r1, #0xc - cmp r2, #3 - blt _02220844 - add r7, r5, #0 - mov r6, #0 -_02220860: - add r0, r7, #0 - add r0, #0xcc - ldr r1, [r0, #0] - cmp r1, #0 - beq _02220878 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200D0B0 -_02220878: - add r0, r7, #0 - add r0, #0xcc - add r4, r4, #1 - add r7, r7, #4 - str r6, [r0, #0] - cmp r4, #4 - blt _02220860 -_02220886: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02221238 - add r6, r6, #1 - cmp r6, #5 - blt _02220886 - mov r6, #0 - add r4, r6, #0 - add r7, r6, #0 -_0222089A: - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r4 - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _022208B6 - bl ov12_02223894 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r4 - str r7, [r0, #0x1c] -_022208B6: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #0x10 - blt _0222089A - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - cmp r1, #0 - beq _022208CC - mov r1, #0 - str r1, [r5, r0] -_022208CC: - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #0 - bne _02220920 - bl ov16_0223F9F0 - add r0, r5, #0 - mov r1, #1 - bl ov12_022233B0 - add r4, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - add r3, r0, #0 - lsl r0, r4, #0x18 - mov r1, #1 - lsr r0, r0, #0x18 - lsl r1, r1, #0xe - mov r2, #0 - bl sub_02019690 - add r0, r5, #0 - bl ov12_02220278 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov12_022233B0 - add r1, r0, #0 - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl sub_02019EBC - mov r0, #2 - mov r1, #1 - bl sub_02019120 - b _02220924 -_02220920: - bl ov17_022413D8 -_02220924: - mov r1, #0x1a - lsl r1, r1, #4 - ldrb r1, [r5, r1] - mov r0, #0 - bl sub_02019060 - ldr r1, _0222099C ; =0x000001A1 - mov r0, #1 - ldrb r1, [r5, r1] - bl sub_02019060 - ldr r1, _022209A0 ; =0x000001A2 - mov r0, #2 - ldrb r1, [r5, r1] - bl sub_02019060 - ldr r1, _022209A4 ; =0x000001A3 - mov r0, #3 - ldrb r1, [r5, r1] - bl sub_02019060 - add r0, r5, #0 - add r0, #0xc4 - mov r2, #0 - ldr r0, [r0, #0] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r5, #0 - add r0, #0xc4 - mov r2, #0 - ldr r0, [r0, #0] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - add r0, r5, #0 - add r0, #0xc4 - mov r1, #3 - ldr r0, [r0, #0] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - mov r0, #0 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02220994: .word 0x0000017E -_02220998: .word 0x0000017D -_0222099C: .word 0x000001A1 -_022209A0: .word 0x000001A2 -_022209A4: .word 0x000001A3 - thumb_func_end ov12_02220798 - - thumb_func_start ov12_022209A8 -ov12_022209A8: ; 0x022209A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r4, [r0, #0] - add r1, r0, #4 - str r1, [r5, #0x18] - ldr r0, [r1, #0] - str r0, [sp] - add r0, r1, #4 - str r0, [r5, #0x18] - ldr r7, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - str r4, [r0, #0x18] - add r0, r5, r4 - add r0, #0x7c - ldrb r0, [r0] - cmp r0, #0 - beq _02220A06 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - add r1, sp, #4 - bl sub_02014734 - mov r0, #0 - ldr r1, [sp, #8] - mvn r0, r0 - mul r0, r1 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, sp, #4 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - bl sub_02014744 -_02220A06: - add r0, r5, #0 - add r0, #0xc0 - add r1, r5, r4 - add r1, #0x6c - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldrb r1, [r1] - ldr r0, [r0, #0x1c] - bl sub_02014788 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r1, [sp] - add r0, r0, r6 - ldr r0, [r0, #0x1c] - add r2, r7, #0 - add r3, r5, #0 - bl ov12_02223880 - add r5, #0xc0 - ldr r1, [r5, #0] - str r0, [r1, #0x5c] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022209A8 - - thumb_func_start ov12_02220A3C -ov12_02220A3C: ; 0x02220A3C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r4, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r7, [r0, #0] - add r1, r0, #4 - str r1, [r5, #0x18] - ldr r0, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - str r0, [sp, #4] - ldr r0, [r1, #0] - str r0, [sp] - add r0, r1, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - str r4, [r0, #0x18] - add r0, r5, r4 - add r0, #0x7c - ldrb r0, [r0] - cmp r0, #0 - beq _02220AA2 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - add r1, sp, #8 - bl sub_02014734 - mov r0, #0 - ldr r1, [sp, #0xc] - mvn r0, r0 - mul r0, r1 - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, sp, #8 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - bl sub_02014744 -_02220AA2: - add r0, r5, #0 - add r0, #0xc0 - add r1, r5, r4 - add r1, #0x6c - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldrb r1, [r1] - ldr r0, [r0, #0x1c] - bl sub_02014788 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r1, [sp, #4] - add r0, r0, r6 - ldr r0, [r0, #0x1c] - ldr r2, [sp] - add r3, r5, #0 - bl ov12_02223880 - add r5, #0xc0 - ldr r2, [r5, #0] - lsl r1, r7, #2 - add r1, r2, r1 - str r0, [r1, #0x5c] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02220A3C - - thumb_func_start ov12_02220ADC -ov12_02220ADC: ; 0x02220ADC - push {r4, r5, r6, lr} - sub sp, #0x90 - ldr r5, _02220B30 ; =0x022386B4 - add r4, r0, #0 - add r3, sp, #0 - mov r2, #0x12 -_02220AE8: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02220AE8 - add r0, r4, #0 - bl ov12_02220240 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_02220248 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov12_02235254 - mov r1, #0x18 - add r3, r5, #0 - mul r3, r1 - add r2, sp, #0 - lsl r1, r0, #2 - add r0, r2, r3 - ldr r4, [r1, r0] - cmp r4, #0xff - bne _02220B28 - bl sub_02022974 -_02220B28: - sub r0, r4, #1 - add sp, #0x90 - pop {r4, r5, r6, pc} - nop -_02220B30: .word 0x022386B4 - thumb_func_end ov12_02220ADC - - thumb_func_start ov12_02220B34 -ov12_02220B34: ; 0x02220B34 - push {r4, r5, r6, lr} - sub sp, #0x90 - ldr r5, _02220B88 ; =0x02238744 - add r4, r0, #0 - add r3, sp, #0 - mov r2, #0x12 -_02220B40: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02220B40 - add r0, r4, #0 - bl ov12_02220240 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_02220248 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov12_02235254 - mov r1, #0x18 - add r3, r5, #0 - mul r3, r1 - add r2, sp, #0 - lsl r1, r0, #2 - add r0, r2, r3 - ldr r4, [r1, r0] - cmp r4, #0xff - bne _02220B80 - bl sub_02022974 -_02220B80: - add r0, r4, #0 - add sp, #0x90 - pop {r4, r5, r6, pc} - nop -_02220B88: .word 0x02238744 - thumb_func_end ov12_02220B34 - - thumb_func_start ov12_02220B8C -ov12_02220B8C: ; 0x02220B8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r0, #0x18 - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r4, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - mov r1, #0 - add r2, sp, #0x10 -_02220BA4: - ldr r3, [r5, #0x18] - add r1, r1, #1 - ldr r3, [r3, #0] - str r3, [r2, #0] - ldr r3, [r0, #0] - add r2, r2, #4 - add r3, r3, #4 - str r3, [r0, #0] - cmp r1, #6 - blt _02220BA4 - ldr r1, [r5, #0x18] - ldr r1, [r1, #0] - str r1, [sp] - ldr r1, [r0, #0] - add r1, r1, #4 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - str r4, [r0, #0x18] - add r0, r5, r4 - add r0, #0x7c - ldrb r0, [r0] - cmp r0, #0 - beq _02220C02 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - add r1, sp, #4 - bl sub_02014734 - mov r0, #0 - ldr r1, [sp, #8] - mvn r0, r0 - mul r0, r1 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, sp, #4 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - bl sub_02014744 -_02220C02: - add r0, r5, #0 - bl ov12_02220ADC - add r7, r0, #0 - add r0, r5, #0 - add r0, #0xc0 - add r1, r5, r4 - add r1, #0x6c - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldrb r1, [r1] - ldr r0, [r0, #0x1c] - bl sub_02014788 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r2, r7, #2 - add r0, r0, r6 - add r1, sp, #0x10 - ldr r1, [r1, r2] - ldr r0, [r0, #0x1c] - ldr r2, [sp] - add r3, r5, #0 - bl ov12_02223880 - add r5, #0xc0 - ldr r1, [r5, #0] - str r0, [r1, #0x5c] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02220B8C - - thumb_func_start ov12_02220C44 -ov12_02220C44: ; 0x02220C44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r0, #0x18 - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r4, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - mov r1, #0 - add r2, sp, #0x10 -_02220C5C: - ldr r3, [r5, #0x18] - add r1, r1, #1 - ldr r3, [r3, #0] - str r3, [r2, #0] - ldr r3, [r0, #0] - add r2, r2, #4 - add r3, r3, #4 - str r3, [r0, #0] - cmp r1, #4 - blt _02220C5C - ldr r1, [r5, #0x18] - ldr r1, [r1, #0] - str r1, [sp] - ldr r1, [r0, #0] - add r1, r1, #4 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - str r4, [r0, #0x18] - add r0, r5, r4 - add r0, #0x7c - ldrb r0, [r0] - cmp r0, #0 - beq _02220CBA - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - add r1, sp, #4 - bl sub_02014734 - mov r0, #0 - ldr r1, [sp, #8] - mvn r0, r0 - mul r0, r1 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, sp, #4 - add r0, r0, r6 - ldr r0, [r0, #0x1c] - bl sub_02014744 -_02220CBA: - add r0, r5, #0 - bl ov12_02220B34 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0xc0 - add r1, r5, r4 - add r1, #0x6c - ldr r0, [r0, #0] - lsl r6, r4, #2 - add r0, r0, r6 - ldrb r1, [r1] - ldr r0, [r0, #0x1c] - bl sub_02014788 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r2, r7, #2 - add r0, r0, r6 - add r1, sp, #0x10 - ldr r1, [r1, r2] - ldr r0, [r0, #0x1c] - ldr r2, [sp] - add r3, r5, #0 - bl ov12_02223880 - add r5, #0xc0 - ldr r1, [r5, #0] - str r0, [r1, #0x5c] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02220C44 - - thumb_func_start ov12_02220CFC -ov12_02220CFC: ; 0x02220CFC - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r5, r0, #0 - add r7, r6, #0 - add r4, r6, #0 -_02220D06: - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r4 - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _02220D1A - bl sub_02014710 - add r6, r6, r0 -_02220D1A: - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #0x10 - blt _02220D06 - cmp r6, #0 - bne _02220D34 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - mov r0, #0 - add r5, #0x8d - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_02220D34: - mov r0, #1 - add r5, #0x8d - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02220CFC - - thumb_func_start ov12_02220D3C -ov12_02220D3C: ; 0x02220D3C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r4, r1, #2 - add r0, r0, r4 - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _02220D60 - bl sub_02022974 -_02220D60: - ldr r0, [r5, #0x18] - mov r2, #0 - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r5, #0] - bl ov12_022237F0 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r1, r1, r4 - str r0, [r1, #0x1c] - add r0, r5, #0 - mov r1, #2 - add r0, #0x8d - strb r1, [r0] - ldr r0, _02220D8C ; =ov12_0221FC20 - add r5, #0xbc - str r0, [r5, #0] - pop {r3, r4, r5, pc} - nop -_02220D8C: .word ov12_0221FC20 - thumb_func_end ov12_02220D3C - - thumb_func_start ov12_02220D90 -ov12_02220D90: ; 0x02220D90 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r4, r1, #2 - add r0, r0, r4 - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _02220DB6 - bl sub_02022974 -_02220DB6: - ldr r0, [r5, #0x18] - mov r1, #0x64 - ldr r2, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r5, #0] - mov r3, #0 - bl ov12_02223818 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r1, r1, r4 - str r0, [r1, #0x1c] - add r0, r5, #0 - mov r1, #2 - add r0, #0x8d - strb r1, [r0] - ldr r0, _02220DE4 ; =ov12_0221FC20 - add r5, #0xbc - str r0, [r5, #0] - pop {r3, r4, r5, pc} - nop -_02220DE4: .word ov12_0221FC20 - thumb_func_end ov12_02220D90 - - thumb_func_start ov12_02220DE8 -ov12_02220DE8: ; 0x02220DE8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r4, r1, #2 - add r0, r0, r4 - ldr r0, [r0, #0x1c] - bl ov12_02223894 - add r5, #0xc0 - ldr r0, [r5, #0] - mov r1, #0 - add r0, r0, r4 - str r1, [r0, #0x1c] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02220DE8 - - thumb_func_start ov12_02220E14 -ov12_02220E14: ; 0x02220E14 - ldr r1, [r0, #0x18] - mov r3, #0 - add r1, r1, #4 - str r1, [r0, #0x18] - add r2, r0, #0 -_02220E1E: - ldr r1, [r2, #0x1c] - cmp r1, #0 - bne _02220E3A - ldr r1, [r0, #0x18] - add r2, r1, #4 - lsl r1, r3, #2 - add r1, r0, r1 - str r2, [r1, #0x1c] - ldr r2, [r0, #0x18] - ldr r1, [r2, #0] - lsl r1, r1, #2 - add r1, r2, r1 - str r1, [r0, #0x18] - bx lr -_02220E3A: - add r3, r3, #1 - add r2, r2, #4 - cmp r3, #3 - blt _02220E1E - bx lr - thumb_func_end ov12_02220E14 - - thumb_func_start ov12_02220E44 -ov12_02220E44: ; 0x02220E44 - ldr r1, [r0, #0x18] - add r3, r0, #0 - add r1, r1, #4 - str r1, [r0, #0x18] - mov r2, #2 - add r3, #8 -_02220E50: - ldr r1, [r3, #0x1c] - cmp r1, #0 - beq _02220E66 - add r3, r0, #0 - add r3, #0x1c - lsl r2, r2, #2 - ldr r1, [r3, r2] - str r1, [r0, #0x18] - mov r0, #0 - str r0, [r3, r2] - bx lr -_02220E66: - sub r3, r3, #4 - sub r2, r2, #1 - bpl _02220E50 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220E44 - - thumb_func_start ov12_02220E70 -ov12_02220E70: ; 0x02220E70 - push {r3, r4} - ldr r2, [r0, #0x18] - add r1, r0, #0 - add r2, r2, #4 - str r2, [r0, #0x18] - ldr r4, [r2, #0] - add r2, r2, #4 - str r2, [r0, #0x18] - ldr r3, [r2, #0] - add r2, r2, #4 - str r2, [r0, #0x18] - lsl r2, r4, #2 - add r2, r0, r2 - add r2, #0x94 - ldr r2, [r2, #0] - add r1, #0x18 - cmp r3, r2 - bne _02220E9E - ldr r1, [r0, #0x18] - ldr r1, [r1, #0] - str r1, [r0, #0x18] - pop {r3, r4} - bx lr -_02220E9E: - ldr r0, [r1, #0] - add r0, r0, #4 - str r0, [r1, #0] - pop {r3, r4} - bx lr - thumb_func_end ov12_02220E70 - - thumb_func_start ov12_02220EA8 -ov12_02220EA8: ; 0x02220EA8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - bl ov12_02223178 - cmp r0, #0 - ldr r0, [r4, #0x18] - beq _02220EC8 - ldr r0, [r0, #0] - str r0, [r4, #0x18] - pop {r4, pc} -_02220EC8: - add r0, r0, #4 - str r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02220EA8 - - thumb_func_start ov12_02220ED0 -ov12_02220ED0: ; 0x02220ED0 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r1, r0, #4 - str r1, [r4, #0x18] - ldr r0, [r1, #0] - add r1, r1, #4 - str r1, [r4, #0x18] - bl ov12_02226998 - add r7, r0, #0 - ldr r0, [r4, #0x18] - add r2, r4, #0 - ldr r5, [r0, #0] - add r0, r0, #4 - add r2, #0x18 - mov r3, #0 - str r0, [r4, #0x18] - cmp r5, #0 - bls _02220F12 - add r6, r4, #0 -_02220EFA: - ldr r0, [r4, #0x18] - add r3, r3, #1 - ldr r1, [r0, #0] - add r0, r6, #0 - add r0, #0x94 - str r1, [r0, #0] - ldr r0, [r2, #0] - add r6, r6, #4 - add r0, r0, #4 - str r0, [r2, #0] - cmp r3, r5 - blo _02220EFA -_02220F12: - cmp r3, #0xa - bge _02220F2A - lsl r0, r3, #2 - add r2, r4, r0 - mov r1, #0 -_02220F1C: - add r0, r2, #0 - add r0, #0x94 - add r3, r3, #1 - add r2, r2, #4 - str r1, [r0, #0] - cmp r3, #0xa - blt _02220F1C -_02220F2A: - add r0, r4, #0 - blx r7 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02220ED0 - - thumb_func_start ov12_02220F30 -ov12_02220F30: ; 0x02220F30 - ldr r2, [r0, #0x18] - add r1, r0, #0 - add r2, r2, #4 - str r2, [r0, #0x18] - add r2, r0, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r1, #0x18 - ldrh r3, [r2, #0x10] - mov r2, #1 - tst r2, r3 - beq _02220F4E - ldr r2, [r1, #0] - add r2, r2, #4 - str r2, [r1, #0] -_02220F4E: - ldr r2, [r0, #0x18] - ldr r1, [r2, #0] - lsl r1, r1, #2 - add r1, r2, r1 - str r1, [r0, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02220F30 - - thumb_func_start ov12_02220F5C -ov12_02220F5C: ; 0x02220F5C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x18] - add r1, r1, #4 - str r1, [r4, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r4, #0x18] - cmp r2, #0 - bne _02220F7E - add r1, r4, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - ldrh r1, [r1, #0x14] - bl ov12_0223525C - b _02220F8A -_02220F7E: - add r1, r4, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - ldrh r1, [r1, #0x16] - bl ov12_0223525C -_02220F8A: - cmp r0, #4 - bne _02220F94 - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] -_02220F94: - ldr r1, [r4, #0x18] - ldr r0, [r1, #0] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov12_02220F5C - - thumb_func_start ov12_02220FA0 -ov12_02220FA0: ; 0x02220FA0 - push {r4, r5} - sub sp, #0x10 - ldr r5, _02220FF8 ; =0x022385A4 - add r2, sp, #0 - add r4, r0, #0 - add r3, r2, #0 - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldr r1, [r4, #0x18] - add r0, r4, #0 - add r1, r1, #4 - str r1, [r4, #0x18] - add r1, r4, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r0, #0x18 - ldr r1, [r1, #0xc] - cmp r1, #0 - beq _02220FE6 - ldr r2, [r0, #0] - add r2, r2, #4 - str r2, [r0, #0] - mov r2, #0 -_02220FD2: - ldr r5, [r3, #0] - tst r5, r1 - bne _02220FE6 - ldr r5, [r0, #0] - add r2, r2, #1 - add r5, r5, #4 - add r3, r3, #4 - str r5, [r0, #0] - cmp r2, #4 - blo _02220FD2 -_02220FE6: - ldr r1, [r4, #0x18] - ldr r0, [r1, #0] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [r4, #0x18] - add sp, #0x10 - pop {r4, r5} - bx lr - nop -_02220FF8: .word 0x022385A4 - thumb_func_end ov12_02220FA0 - - thumb_func_start ov12_02220FFC -ov12_02220FFC: ; 0x02220FFC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x18] - add r1, r1, #4 - str r1, [r4, #0x18] - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222101A - ldr r1, [r4, #0x18] - ldr r0, [r1, #0] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [r4, #0x18] - pop {r4, pc} -_0222101A: - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02220FFC - - thumb_func_start ov12_02221024 -ov12_02221024: ; 0x02221024 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r1, r1, #4 - str r1, [r5, #0x18] - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - ldrh r1, [r1, #0x14] - bl ov12_0223525C - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r4, r0, #0 - ldrh r1, [r1, #0x16] - add r0, r5, #0 - bl ov12_0223525C - cmp r4, r0 - bne _0222105A - ldr r1, [r5, #0x18] - ldr r0, [r1, #0] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [r5, #0x18] - pop {r3, r4, r5, pc} -_0222105A: - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02221024 - - thumb_func_start ov12_02221064 -ov12_02221064: ; 0x02221064 - ldr r2, [r0, #0x18] - add r1, r0, #0 - add r2, r2, #4 - str r2, [r0, #0x18] - ldr r3, [r2, #0] - add r2, r2, #4 - str r2, [r0, #0x18] - add r2, r0, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r1, #0x18 - ldrh r2, [r2, #0x10] - cmp r3, r2 - bne _0222108E - ldr r0, [r0, #0x18] - ldr r2, [r1, #0] - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r2, r0 - str r0, [r1, #0] - bx lr -_0222108E: - ldr r0, [r1, #0] - add r0, r0, #4 - str r0, [r1, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221064 - - thumb_func_start ov12_02221098 -ov12_02221098: ; 0x02221098 - ldr r1, [r0, #0x18] - add r2, r1, #4 - str r2, [r0, #0x18] - ldr r1, [r2, #0] - lsl r1, r1, #2 - add r1, r2, r1 - str r1, [r0, #0x18] - bx lr - thumb_func_end ov12_02221098 - - thumb_func_start ov12_022210A8 -ov12_022210A8: ; 0x022210A8 - push {r4, r5, r6, lr} - add r4, r0, #0 - cmp r1, #7 - bhi _02221186 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022210BC: ; jump table - .short _022210CC - _022210BC - 2 ; case 0 - .short _022210D4 - _022210BC - 2 ; case 1 - .short _022210DC - _022210BC - 2 ; case 2 - .short _022210EA - _022210BC - 2 ; case 3 - .short _022210F8 - _022210BC - 2 ; case 4 - .short _0222111E - _022210BC - 2 ; case 5 - .short _02221144 - _022210BC - 2 ; case 6 - .short _02221166 - _022210BC - 2 ; case 7 -_022210CC: - add r4, #0xc0 - ldr r0, [r4, #0] - ldrh r6, [r0, #0x14] - b _02221186 -_022210D4: - add r4, #0xc0 - ldr r0, [r4, #0] - ldrh r6, [r0, #0x16] - b _02221186 -_022210DC: - add r4, #0xc0 - ldr r1, [r4, #0] - ldrh r1, [r1, #0x14] - bl ov12_022352AC - add r6, r0, #0 - b _02221186 -_022210EA: - add r4, #0xc0 - ldr r1, [r4, #0] - ldrh r1, [r1, #0x16] - bl ov12_022352AC - add r6, r0, #0 - b _02221186 -_022210F8: - mov r6, #0xff - mov r5, #0 -_022210FC: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #0 - beq _0222110C - cmp r0, #2 - bne _02221110 -_0222110C: - add r6, r5, #0 - b _02221116 -_02221110: - add r5, r5, #1 - cmp r5, #4 - blt _022210FC -_02221116: - cmp r6, #0xff - bne _02221186 - mov r6, #0 - b _02221186 -_0222111E: - mov r6, #0xff - mov r5, #0 -_02221122: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #1 - beq _02221132 - cmp r0, #3 - bne _02221136 -_02221132: - add r6, r5, #0 - b _0222113C -_02221136: - add r5, r5, #1 - cmp r5, #4 - blt _02221122 -_0222113C: - cmp r6, #0xff - bne _02221186 - mov r6, #0 - b _02221186 -_02221144: - mov r6, #0xff - mov r5, #0 -_02221148: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #4 - bne _02221158 - add r6, r5, #0 - b _0222115E -_02221158: - add r5, r5, #1 - cmp r5, #4 - blt _02221148 -_0222115E: - cmp r6, #0xff - bne _02221186 - mov r6, #0 - b _02221186 -_02221166: - mov r6, #0xff - mov r5, #0 -_0222116A: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #5 - bne _0222117A - add r6, r5, #0 - b _02221180 -_0222117A: - add r5, r5, #1 - cmp r5, #4 - blt _0222116A -_02221180: - cmp r6, #0xff - bne _02221186 - mov r6, #0 -_02221186: - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_022210A8 - - thumb_func_start ov12_0222118C -ov12_0222118C: ; 0x0222118C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldrb r0, [r5, #5] - cmp r0, #0 - beq _022211A8 - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - ldrb r1, [r5, #4] - ldrb r0, [r5, #5] - cmp r1, r0 - bne _022211D6 - mov r0, #0 - strb r0, [r5, #4] -_022211A8: - ldr r0, [r5, #8] - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r5, #8] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - ldr r0, [r5, #8] - mov r1, #0x29 - bl sub_020080C0 - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_0200D4C4 -_022211D6: - pop {r4, r5, r6, pc} - thumb_func_end ov12_0222118C - - thumb_func_start ov12_022211D8 -ov12_022211D8: ; 0x022211D8 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldrb r0, [r5, #5] - cmp r0, #0 - beq _022211F4 - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - ldrb r1, [r5, #4] - ldrb r0, [r5, #5] - cmp r1, r0 - bne _02221236 - mov r0, #0 - strb r0, [r5, #4] -_022211F4: - ldr r0, [r5, #8] - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r5, #8] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - ldr r0, [r5, #8] - mov r1, #0x29 - bl sub_020080C0 - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - sub r6, #0x28 - ldr r0, [r5, #0] - mov r1, #2 - mov r2, #0 - neg r3, r6 - bl sub_02019184 - sub r4, #0x28 - ldr r0, [r5, #0] - mov r1, #2 - mov r2, #3 - neg r3, r4 - bl sub_02019184 -_02221236: - pop {r4, r5, r6, pc} - thumb_func_end ov12_022211D8 - - thumb_func_start ov12_02221238 -ov12_02221238: ; 0x02221238 - push {r3, r4, r5, lr} - add r4, r0, #0 - cmp r1, #4 - bne _02221264 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02221282 - ldr r0, [r0, #0xc] - bl sub_0200DA58 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x5e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r3, r4, r5, pc} -_02221264: - mov r0, #0x59 - lsl r0, r0, #2 - lsl r5, r1, #2 - add r4, r4, r0 - ldr r0, [r4, r5] - cmp r0, #0 - beq _02221282 - ldr r0, [r0, #0xc] - bl sub_0200DA58 - ldr r0, [r4, r5] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, r5] -_02221282: - pop {r3, r4, r5, pc} - thumb_func_end ov12_02221238 - - thumb_func_start ov12_02221284 -ov12_02221284: ; 0x02221284 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221284 - - thumb_func_start ov12_02221288 -ov12_02221288: ; 0x02221288 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221288 - - thumb_func_start ov12_0222128C -ov12_0222128C: ; 0x0222128C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r2, r1, #4 - str r2, [r5, #0x18] - ldr r1, [r2, #0] - add r2, r2, #4 - str r2, [r5, #0x18] - ldr r6, [r2, #0] - add r2, r2, #4 - str r2, [r5, #0x18] - bl ov12_022210A8 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r4, #2 - add r1, r0, r1 - add r1, #0xb0 - ldr r2, [r1, #0] - add r0, r0, r4 - ldr r1, [r2, #4] - add r0, #0xe8 - str r1, [sp, #0x14] - ldr r1, [r2, #8] - ldrb r7, [r0] - str r1, [sp, #0x10] - ldr r1, [r2, #0] - add r0, r5, #0 - str r1, [sp, #0x18] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022212EA - add r0, r5, #0 - add r1, r4, #0 - bl ov12_022232D0 - add r1, r7, #0 - bl ov12_022384F0 - cmp r0, #1 - bne _022212EA - ldr r7, _02221418 ; =0x00000109 - b _022212EE -_022212EA: - mov r7, #0x42 - lsl r7, r7, #2 -_022212EE: - mov r0, #2 - bl sub_02019F28 - mov r2, #0x19 - mov r1, #0 - lsl r2, r2, #8 - bl sub_020C4CF4 - mov r0, #2 - mov r1, #0 - bl sub_02019120 - mov r0, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xc4 - mov r3, #0x32 - ldr r0, [r0, #0] - ldr r2, [sp, #0x18] - mov r1, #2 - lsl r3, r3, #6 - bl sub_0201958C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x80 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - ldr r3, [r5, #0] - bl sub_02003050 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #0] - add r2, r5, #0 - str r0, [sp, #0xc] - mov r0, #0x69 - lsl r0, r0, #2 - add r2, #0xc4 - ldr r0, [r5, r0] - ldr r2, [r2, #0] - add r1, r7, #0 - mov r3, #2 - bl sub_0200710C - cmp r6, #1 - bne _0222139E - ldr r0, [r5, #0] - mov r1, #0x10 - bl sub_02018144 - mov r1, #0x5e - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r5, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - ldr r0, [r5, r1] - add r1, r4, #0 - str r2, [r0, #0] - add r0, r5, #0 - bl ov12_022232FC - mov r1, #0x5e - lsl r1, r1, #2 - ldr r2, [r5, r1] - str r0, [r2, #8] - ldr r0, [r5, r1] - mov r2, #0 - strb r2, [r0, #4] - ldr r0, [r5, r1] - strb r2, [r0, #5] - ldr r0, _0222141C ; =ov12_022211D8 - ldr r1, [r5, r1] - ldr r2, _02221420 ; =0x00001001 - bl sub_0200D9E8 - mov r1, #0x5e - lsl r1, r1, #2 - ldr r1, [r5, r1] - str r0, [r1, #0xc] -_0222139E: - add r0, r5, #0 - add r1, r4, #0 - bl ov12_022232FC - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_022232FC - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_022232FC - mov r1, #0x29 - bl sub_020080C0 - sub r0, r6, r0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - add r0, r5, #0 - add r0, #0xc4 - sub r7, #0x28 - ldr r0, [r0, #0] - mov r1, #2 - mov r2, #0 - neg r3, r7 - bl sub_02019184 - add r0, r5, #0 - add r0, #0xc4 - sub r6, #0x28 - ldr r0, [r0, #0] - mov r1, #2 - mov r2, #3 - neg r3, r6 - bl sub_02019184 - mov r0, #2 - mov r1, #1 - bl sub_02019120 - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - lsl r1, r1, #0x18 - mov r0, #2 - lsr r1, r1, #0x18 - bl sub_02019060 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02221418: .word 0x00000109 -_0222141C: .word ov12_022211D8 -_02221420: .word 0x00001001 - thumb_func_end ov12_0222128C - - thumb_func_start ov12_02221424 -ov12_02221424: ; 0x02221424 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r0, r0, #4 - add r0, r0, #4 - str r0, [r4, #0x18] - mov r0, #2 - bl sub_02019F28 - mov r2, #0x19 - mov r1, #0 - lsl r2, r2, #8 - bl sub_020C4CF4 - add r0, r4, #0 - mov r1, #4 - bl ov12_02221238 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02221424 - - thumb_func_start ov12_0222144C -ov12_0222144C: ; 0x0222144C - push {r4, lr} - sub sp, #0x18 - ldr r3, _022214C0 ; =0x022385E4 - add r2, sp, #0 - add r4, r0, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200C704 - mov r1, #0x4e - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - add r0, #0xac - ldr r0, [r0, #0] - mov r2, #5 - bl sub_0200C7C0 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200C738 - mov r2, #0x11 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r1, #0x4e - add r0, #0xac - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - add r2, sp, #0 - bl sub_0200CB30 - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 -_022214C0: .word 0x022385E4 - thumb_func_end ov12_0222144C - - thumb_func_start ov12_022214C4 -ov12_022214C4: ; 0x022214C4 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0x18] - ldr r1, _0222157C ; =0x00004E21 - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r2, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r4, r2, r1 - ldrh r3, [r0, #0x14] - lsr r2, r1, #2 - add r0, #0xac - mul r2, r3 - add r4, r4, r2 - mov r2, #0 - str r2, [sp] - mov r2, #1 - str r2, [sp, #4] - mov r2, #0x6a - str r4, [sp, #8] - lsr r1, r1, #6 - lsl r2, r2, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - ldr r2, [r5, r2] - mov r3, #0x4c - bl sub_0200CC3C - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r5, #0 - str r0, [sp] - mov r3, #0x4b - str r3, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - add r0, r5, #0 - str r4, [sp, #0x14] - add r2, #0xc0 - ldr r2, [r2, #0] - add r0, #0xc8 - add r2, #0xac - add r3, #0xed - ldr r0, [r0, #0] - ldr r2, [r2, #0] - ldr r3, [r5, r3] - mov r1, #2 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - add r0, r5, #0 - mov r2, #0x4e - str r4, [sp, #4] - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r2, r2, #2 - add r0, #0xac - ldr r1, [r5, r2] - add r2, #0x70 - ldr r0, [r0, #0] - ldr r2, [r5, r2] - mov r3, #0x4d - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - add r0, r5, #0 - mov r2, #0x4e - str r4, [sp, #4] - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r2, r2, #2 - add r0, #0xac - ldr r1, [r5, r2] - add r2, #0x70 - ldr r0, [r0, #0] - ldr r2, [r5, r2] - mov r3, #0x4e - bl sub_0200CE54 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222157C: .word 0x00004E21 - thumb_func_end ov12_022214C4 - - thumb_func_start ov12_02221580 -ov12_02221580: ; 0x02221580 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x78 - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r7, [r1, #0] - add r2, r1, #4 - str r2, [r5, #0x18] - ldr r1, [r2, #0] - add r2, r2, #4 - str r2, [r5, #0x18] - str r1, [sp, #0x10] - ldr r1, [r2, #0] - str r1, [sp, #0xc] - add r1, r2, #4 - str r1, [r5, #0x18] - ldr r3, [r1, #0] - add r1, r1, #4 - ldr r2, _022217A8 ; =0x00004E21 - str r1, [r5, #0x18] - add r1, r3, r2 - add r3, r5, #0 - add r3, #0xc0 - ldr r3, [r3, #0] - ldrh r6, [r3, #0x14] - lsr r3, r2, #2 - mul r3, r6 - add r3, r1, r3 - str r3, [sp, #0x60] - add r3, r5, #0 - add r3, #0xc0 - ldr r3, [r3, #0] - ldrh r6, [r3, #0x14] - lsr r3, r2, #2 - mul r3, r6 - add r3, r1, r3 - str r3, [sp, #0x64] - add r3, r5, #0 - add r3, #0xc0 - ldr r3, [r3, #0] - ldrh r6, [r3, #0x14] - lsr r3, r2, #2 - lsr r2, r2, #2 - mul r3, r6 - add r3, r1, r3 - str r3, [sp, #0x68] - add r3, r5, #0 - add r3, #0xc0 - ldr r3, [r3, #0] - ldrh r3, [r3, #0x14] - mul r2, r3 - add r1, r1, r2 - str r1, [sp, #0x6c] - mov r1, #0 - str r1, [sp, #0x70] - str r1, [sp, #0x74] - add r1, r7, #0 - bl ov12_022210A8 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r7, #2 - add r1, r0, r1 - add r1, #0xb0 - ldr r2, [r1, #0] - add r0, r0, r7 - ldr r1, [r2, #4] - add r0, #0xe8 - str r1, [sp, #0x20] - ldr r1, [r2, #8] - ldrb r0, [r0] - str r1, [sp, #0x1c] - ldr r1, [r2, #0] - str r0, [sp, #0x18] - str r1, [sp, #0x28] - add r0, r5, #0 - add r1, r7, #0 - bl ov12_022232FC - add r6, r0, #0 - beq _0222164E - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - add r0, r6, #0 - mov r1, #0x29 - bl sub_020080C0 - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_0222164E: - ldr r0, [sp, #0x14] - add r1, sp, #0x2c - strh r0, [r1] - strh r4, [r1, #2] - mov r0, #0 - strh r0, [r1, #4] - strh r0, [r1, #6] - mov r1, #0x64 - str r1, [sp, #0x34] - mov r1, #1 - str r0, [sp, #0x38] - str r1, [sp, #0x3c] - str r1, [sp, #0x58] - str r0, [sp, #0x5c] - add r2, sp, #0x60 - add r3, sp, #0x2c -_0222166E: - ldr r1, [r2, #0] - add r0, r0, #1 - str r1, [r3, #0x14] - add r2, r2, #4 - add r3, r3, #4 - cmp r0, #6 - blt _0222166E - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r1, #0x4e - add r0, #0xac - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - add r2, sp, #0x2c - bl sub_0200CE6C - str r0, [sp, #0x24] - cmp r6, #0 - bne _022216A0 - mov r1, #0 - bl sub_0200D3F4 - b _022216B4 -_022216A0: - add r0, r6, #0 - mov r1, #6 - bl sub_020080C0 - cmp r0, #1 - bne _022216B4 - ldr r0, [sp, #0x24] - mov r1, #0 - bl sub_0200D3F4 -_022216B4: - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _022216D8 - add r0, r5, #0 - add r1, r7, #0 - bl ov12_022232D0 - ldr r1, [sp, #0x18] - bl ov12_022384F0 - cmp r0, #1 - bne _022216D8 - ldr r0, [sp, #0x24] - mov r1, #1 - bl sub_0200D7D4 -_022216D8: - add r0, r5, #0 - add r1, r7, #0 - bl ov12_022232FC - cmp r0, #0 - beq _022216FC - ldr r0, [sp, #0x24] - ldr r0, [r0, #0] - bl sub_02021F98 - add r1, r0, #0 - mov r3, #0x32 - ldr r1, [r1, #4] - ldr r2, [sp, #0x28] - mov r0, #0x13 - lsl r3, r3, #6 - bl sub_0201DC68 -_022216FC: - add r0, r5, #0 - add r1, r7, #0 - bl ov12_022232FC - cmp r0, #0 - beq _02221734 - ldr r0, [sp, #0x24] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - mov r1, #2 - str r1, [sp] - mov r1, #0x20 - lsl r0, r0, #0x14 - str r1, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x1c] - ldr r3, [r5, #0] - bl sub_02003050 -_02221734: - ldr r0, [sp, #0xc] - lsl r4, r0, #2 - mov r0, #0x4f - lsl r0, r0, #2 - add r6, r5, r0 - ldr r0, [r6, r4] - cmp r0, #0 - beq _02221748 - bl sub_02022974 -_02221748: - ldr r0, [sp, #0x24] - mov r2, #1 - str r0, [r6, r4] - mov r0, #0x15 - add r1, r5, r4 - lsl r0, r0, #4 - str r2, [r1, r0] - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _022217A2 - add r0, r5, #0 - add r1, r7, #0 - bl ov12_022232FC - cmp r0, #0 - beq _022217A2 - mov r0, #0x59 - lsl r0, r0, #2 - add r6, r5, r0 - ldr r0, [r5, #0] - mov r1, #0x10 - bl sub_02018144 - str r0, [r6, r4] - ldr r1, [r6, r4] - ldr r0, [sp, #0x24] - str r0, [r1, #0] - add r0, r5, #0 - add r1, r7, #0 - bl ov12_022232FC - ldr r1, [r6, r4] - ldr r2, _022217AC ; =0x00001001 - str r0, [r1, #8] - ldr r0, [r6, r4] - mov r1, #0 - strb r1, [r0, #4] - ldr r0, [r6, r4] - strb r1, [r0, #5] - ldr r0, _022217B0 ; =ov12_0222118C - ldr r1, [r6, r4] - bl sub_0200D9E8 - ldr r1, [r6, r4] - str r0, [r1, #0xc] -_022217A2: - add sp, #0x78 - pop {r3, r4, r5, r6, r7, pc} - nop -_022217A8: .word 0x00004E21 -_022217AC: .word 0x00001001 -_022217B0: .word ov12_0222118C - thumb_func_end ov12_02221580 - - thumb_func_start ov12_022217B4 -ov12_022217B4: ; 0x022217B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] - mov r0, #0x4e - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _022217D6 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200D0B0 -_022217D6: - mov r0, #0x4e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} - thumb_func_end ov12_022217B4 - - thumb_func_start ov12_022217E0 -ov12_022217E0: ; 0x022217E0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - mov r0, #0x4f - lsl r0, r0, #2 - lsl r4, r1, #2 - add r6, r5, r0 - ldr r0, [r6, r4] - cmp r0, #0 - beq _02221802 - bl sub_0200D0F4 -_02221802: - mov r0, #0x15 - mov r2, #0 - add r1, r5, r4 - lsl r0, r0, #4 - str r2, [r1, r0] - str r2, [r6, r4] - pop {r4, r5, r6, pc} - thumb_func_end ov12_022217E0 - - thumb_func_start ov12_02221810 -ov12_02221810: ; 0x02221810 - push {r3, lr} - ldr r2, [r1, #0xc] - cmp r2, #0 - bne _0222181E - bl sub_0200DA58 - pop {r3, pc} -_0222181E: - mov r0, #0x4e - ldr r2, [r1, #0] - lsl r0, r0, #2 - ldr r0, [r2, r0] - cmp r0, #0 - beq _02221830 - ldr r0, [r1, #4] - bl sub_0200C7EC -_02221830: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02221810 - - thumb_func_start ov12_02221834 -ov12_02221834: ; 0x02221834 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r6, r5, #0 - add r1, r0, #4 - str r1, [r5, #0x18] - ldr r0, [r1, #0] - add r6, #0x54 - str r0, [sp] - add r0, r1, #4 - str r0, [r5, #0x18] - ldr r2, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - lsl r4, r2, #4 - str r0, [sp, #8] - add r0, #0x4c - lsl r1, r1, #2 - str r0, [sp, #8] - str r5, [r0, r4] - mov r0, #0x4e - lsl r0, r0, #2 - ldr r3, [r5, r0] - add r2, r5, r4 - str r3, [r2, #0x50] - add r1, r5, r1 - add r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0 - str r0, [r6, r4] - mov r0, #1 - str r0, [r2, #0x58] - ldr r0, [r6, r4] - bl sub_0200D3F4 - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - beq _02221890 - b _022219DE -_02221890: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_02235254 - str r0, [sp, #4] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_02235254 - add r7, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - bl ov12_022210A8 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022232FC - cmp r0, #0 - beq _022218CC - mov r1, #6 - bl sub_020080C0 - b _022218CE -_022218CC: - mov r0, #0 -_022218CE: - cmp r0, #1 - ldr r0, [r6, r4] - bne _022218DC - mov r1, #0 - bl sub_0200D3F4 - b _022218E2 -_022218DC: - mov r1, #1 - bl sub_0200D3F4 -_022218E2: - ldr r0, [sp] - cmp r0, #3 - bhi _022219D0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022218F4: ; jump table - .short _022218FC - _022218F4 - 2 ; case 0 - .short _0222194A - _022218F4 - 2 ; case 1 - .short _02221922 - _022218F4 - 2 ; case 2 - .short _0222198E - _022218F4 - 2 ; case 3 -_022218FC: - ldr r0, [sp, #4] - sub r0, r0, #3 - cmp r0, #1 - bhi _0222190E - ldr r0, [r6, r4] - mov r1, #1 - bl sub_0200D474 - b _022219D0 -_0222190E: - add r5, #0x54 - ldr r0, [r5, r4] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, r4] - mov r1, #0xff - bl sub_0200D474 - b _022219D0 -_02221922: - ldr r0, [sp, #4] - cmp r0, #5 - beq _0222192C - cmp r0, #2 - bne _02221936 -_0222192C: - ldr r0, [r6, r4] - mov r1, #1 - bl sub_0200D474 - b _022219D0 -_02221936: - add r5, #0x54 - ldr r0, [r5, r4] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, r4] - mov r1, #0xff - bl sub_0200D474 - b _022219D0 -_0222194A: - cmp r7, #5 - bhi _022219D0 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222195A: ; jump table - .short _022219D0 - _0222195A - 2 ; case 0 - .short _022219D0 - _0222195A - 2 ; case 1 - .short _02221966 - _0222195A - 2 ; case 2 - .short _02221970 - _0222195A - 2 ; case 3 - .short _0222197A - _0222195A - 2 ; case 4 - .short _02221984 - _0222195A - 2 ; case 5 -_02221966: - ldr r0, [r6, r4] - mov r1, #0xff - bl sub_0200D474 - b _022219D0 -_02221970: - ldr r0, [r6, r4] - mov r1, #1 - bl sub_0200D474 - b _022219D0 -_0222197A: - ldr r0, [r6, r4] - mov r1, #1 - bl sub_0200D474 - b _022219D0 -_02221984: - ldr r0, [r6, r4] - mov r1, #0xff - bl sub_0200D474 - b _022219D0 -_0222198E: - cmp r7, #5 - bhi _022219D0 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222199E: ; jump table - .short _022219D0 - _0222199E - 2 ; case 0 - .short _022219D0 - _0222199E - 2 ; case 1 - .short _022219AA - _0222199E - 2 ; case 2 - .short _022219B4 - _0222199E - 2 ; case 3 - .short _022219BE - _0222199E - 2 ; case 4 - .short _022219C8 - _0222199E - 2 ; case 5 -_022219AA: - ldr r0, [r6, r4] - mov r1, #1 - bl sub_0200D474 - b _022219D0 -_022219B4: - ldr r0, [r6, r4] - mov r1, #0xff - bl sub_0200D474 - b _022219D0 -_022219BE: - ldr r0, [r6, r4] - mov r1, #0xff - bl sub_0200D474 - b _022219D0 -_022219C8: - ldr r0, [r6, r4] - mov r1, #1 - bl sub_0200D474 -_022219D0: - ldr r1, [sp, #8] - mov r2, #1 - ldr r0, _022219E4 ; =ov12_02221810 - add r1, r1, r4 - lsl r2, r2, #0xc - bl sub_0200D9E8 -_022219DE: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022219E4: .word ov12_02221810 - thumb_func_end ov12_02221834 - - thumb_func_start ov12_022219E8 -ov12_022219E8: ; 0x022219E8 - ldr r1, [r0, #0x18] - mov r2, #0 - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - lsl r1, r3, #4 - add r0, r0, r1 - str r2, [r0, #0x58] - bx lr - ; .align 2, 0 - thumb_func_end ov12_022219E8 - - thumb_func_start ov12_02221A00 -ov12_02221A00: ; 0x02221A00 - ldr r1, [r0, #0x18] - ldr r3, _02221A10 ; =ov12_02221238 - add r2, r1, #4 - str r2, [r0, #0x18] - ldr r1, [r2, #0] - add r2, r2, #4 - str r2, [r0, #0x18] - bx r3 - ; .align 2, 0 -_02221A10: .word ov12_02221238 - thumb_func_end ov12_02221A00 - - thumb_func_start ov12_02221A14 -ov12_02221A14: ; 0x02221A14 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - add r0, r0, r3 - add r0, #0x6c - strb r2, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221A14 - - thumb_func_start ov12_02221A30 -ov12_02221A30: ; 0x02221A30 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - add r0, r0, r3 - add r0, #0x7c - strb r2, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221A30 - - thumb_func_start ov12_02221A4C -ov12_02221A4C: ; 0x02221A4C - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221A4C - - thumb_func_start ov12_02221A50 -ov12_02221A50: ; 0x02221A50 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02221A50 - - thumb_func_start ov12_02221A54 -ov12_02221A54: ; 0x02221A54 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r5, r0, #0 - ldrh r1, [r1, #0x14] - add r0, r4, #0 - add r6, r2, #0 - bl ov12_0223525C - add r7, r0, #0 - add r0, r4, #0 - add r4, #0xc0 - ldr r1, [r4, #0] - ldrh r1, [r1, #0x16] - bl ov12_0223525C - lsl r1, r6, #2 - add r1, r5, r1 - ldr r1, [r1, #0x1c] - cmp r1, #2 - bne _02221A98 - cmp r7, r0 - bne _02221A90 - cmp r0, #3 - beq _02221A8C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02221A8C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02221A90: - cmp r0, #3 - bne _02221AA4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02221A98: - cmp r1, #0 - beq _02221AA4 - cmp r0, #3 - bne _02221AA4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02221AA4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02221A54 - - thumb_func_start ov12_02221AA8 -ov12_02221AA8: ; 0x02221AA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r1, #0 - add r0, r3, #0 - mov r1, #0 - add r4, r2, #0 - str r3, [sp, #0x10] - bl ov12_022234E4 - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r2, r5, #0 - str r0, [sp, #0xc] - add r2, #0xc4 - ldr r2, [r2, #0] - mov r0, #7 - add r3, r4, #0 - bl sub_02006E3C - ldr r0, [sp, #0x10] - mov r1, #1 - bl ov12_022234E4 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x90 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - ldr r3, [r5, #0] - mov r1, #7 - bl sub_02003050 - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - bl sub_02019EBC - add r0, r5, #0 - mov r6, #2 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02221B1C - mov r6, #4 - b _02221B2C -_02221B1C: - add r0, r7, #0 - add r1, r5, #0 - mov r2, #7 - bl ov12_02221A54 - cmp r0, #1 - bne _02221B2C - mov r6, #3 -_02221B2C: - ldr r0, [sp, #0x10] - add r1, r6, #0 - bl ov12_022234E4 - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r5, #0xc4 - str r0, [sp, #0xc] - ldr r2, [r5, #0] - mov r0, #7 - add r3, r4, #0 - bl sub_02006E60 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_02221AA8 - - thumb_func_start ov12_02221B54 -ov12_02221B54: ; 0x02221B54 - lsl r0, r0, #0x10 - and r0, r1 - cmp r1, r0 - bne _02221B60 - mov r0, #1 - bx lr -_02221B60: - mov r0, #0 - bx lr - thumb_func_end ov12_02221B54 - - thumb_func_start ov12_02221B64 -ov12_02221B64: ; 0x02221B64 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r3, _02221BB4 ; =0x02238594 - add r2, sp, #0 - add r5, r0, #0 - add r4, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r7, _02221BB8 ; =0x02238644 - mov r6, #0 -_02221B7C: - ldr r0, [r5, #0x18] - ldr r1, [r4, #0] - bl ov12_02221B54 - cmp r0, #0 - beq _02221BA6 - ldr r0, [r4, #0] - mov r1, #0 - lsr r2, r0, #0x10 - cmp r2, #2 - blt _02221B9E -_02221B92: - lsr r0, r2, #0x1f - add r0, r2, r0 - asr r2, r0, #1 - add r1, r1, #1 - cmp r2, #2 - bge _02221B92 -_02221B9E: - lsl r1, r1, #2 - ldr r1, [r7, r1] - add r0, r5, #0 - blx r1 -_02221BA6: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blo _02221B7C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02221BB4: .word 0x02238594 -_02221BB8: .word 0x02238644 - thumb_func_end ov12_02221B64 - - thumb_func_start ov12_02221BBC -ov12_02221BBC: ; 0x02221BBC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x4c - bl sub_02018144 - add r4, r0, #0 - bne _02221BD4 - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, pc} -_02221BD4: - mov r1, #0 - mov r2, #0x4c - bl sub_020D5124 - mov r0, #0 - str r0, [r4, #0] - strb r0, [r4, #5] - str r5, [r4, #0x48] - strb r0, [r4, #9] - mov r0, #0x1f - strb r0, [r4, #0xa] - mov r0, #0x1d - strb r0, [r4, #0xb] - mov r0, #2 - strb r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - cmp r0, #1 - bne _02221C0E - mov r0, #0 - strb r0, [r4, #9] - mov r0, #0x1f - strb r0, [r4, #0xa] - mov r0, #0xf - strb r0, [r4, #0xb] - mov r0, #7 - strb r0, [r4, #0xc] -_02221C0E: - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - cmp r0, #2 - bne _02221C2A - mov r0, #7 - strb r0, [r4, #9] - mov r0, #0xf - strb r0, [r4, #0xa] - mov r0, #0x1d - strb r0, [r4, #0xb] - mov r0, #2 - strb r0, [r4, #0xc] -_02221C2A: - mov r1, #0 - add r2, r5, #0 - add r3, r4, #0 -_02221C30: - add r0, r2, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, r1, #1 - str r0, [r3, #0x1c] - add r2, r2, #4 - add r3, r3, #4 - cmp r1, #0xa - blt _02221C30 - mov r0, #0x5f - mov r1, #1 - lsl r0, r0, #2 - strb r1, [r5, r0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02221BBC - - thumb_func_start ov12_02221C50 -ov12_02221C50: ; 0x02221C50 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrb r0, [r5, #5] - cmp r0, #0 - beq _02221C64 - cmp r0, #1 - beq _02221CA2 - cmp r0, #2 - beq _02221CF4 - b _02221D3E -_02221C64: - ldr r0, [r5, #0x48] - mov r1, #2 - bl ov12_02222590 - ldr r0, [r5, #0x48] - mov r1, #2 - bl ov12_02223428 - add r4, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #1 - bl ov12_02223428 - lsl r1, r4, #0x18 - mov r0, #3 - lsr r1, r1, #0x18 - bl sub_02019060 - lsl r1, r4, #0x18 - mov r0, #2 - lsr r1, r1, #0x18 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019120 - ldrb r0, [r5, #5] - add r0, r0, #1 - strb r0, [r5, #5] - b _02221D42 -_02221CA2: - ldr r0, [r5, #0x48] - mov r1, #3 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r2, #2 - add r3, r1, #0 - bl sub_02018898 - ldr r0, [r5, #0x48] - bl ov12_0221FDD4 - cmp r0, #1 - beq _02221CCC - ldr r0, [r5, #0x48] - mov r2, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #3 - add r3, r2, #0 - bl sub_02018898 -_02221CCC: - ldr r1, [r5, #0x48] - ldr r3, [r5, #0x10] - add r0, r5, #0 - mov r2, #3 - bl ov12_02221AA8 - ldrb r0, [r5, #9] - mov r1, #4 - mov r2, #8 - str r0, [sp] - ldrb r3, [r5, #0xa] - ldr r0, _02221D48 ; =0x04000050 - bl sub_020BF55C - add r0, r5, #0 - bl ov12_02221B64 - ldrb r0, [r5, #5] - add r0, r0, #1 - strb r0, [r5, #5] -_02221CF4: - ldrb r1, [r5, #9] - ldrb r0, [r5, #0xb] - mov r2, #0 - cmp r1, r0 - bhs _02221D04 - add r0, r1, #2 - strb r0, [r5, #9] - b _02221D06 -_02221D04: - add r2, r2, #1 -_02221D06: - ldrb r1, [r5, #0xa] - ldrb r0, [r5, #0xc] - cmp r1, r0 - bls _02221D14 - sub r0, r1, #2 - strb r0, [r5, #0xa] - b _02221D16 -_02221D14: - add r2, r2, #1 -_02221D16: - cmp r2, #2 - bne _02221D28 - ldrb r0, [r5, #0xb] - strb r0, [r5, #9] - ldrb r0, [r5, #0xc] - strb r0, [r5, #0xa] - ldrb r0, [r5, #5] - add r0, r0, #1 - strb r0, [r5, #5] -_02221D28: - ldrb r0, [r5, #9] - ldrb r1, [r5, #0xa] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02221D4C ; =0x04000052 - strh r1, [r0] - ldrb r0, [r5, #5] - cmp r0, #2 - beq _02221D42 - mov r0, #0 - pop {r3, r4, r5, pc} -_02221D3E: - mov r0, #0 - pop {r3, r4, r5, pc} -_02221D42: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_02221D48: .word 0x04000050 -_02221D4C: .word 0x04000052 - thumb_func_end ov12_02221C50 - - thumb_func_start ov12_02221D50 -ov12_02221D50: ; 0x02221D50 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - ldrb r0, [r4, #5] - cmp r0, #4 - bls _02221D5E - b _02221F30 -_02221D5E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02221D6A: ; jump table - .short _02221D74 - _02221D6A - 2 ; case 0 - .short _02221D82 - _02221D6A - 2 ; case 1 - .short _02221DC4 - _02221D6A - 2 ; case 2 - .short _02221E0A - _02221D6A - 2 ; case 3 - .short _02221F0C - _02221D6A - 2 ; case 4 -_02221D74: - mov r0, #2 - mov r1, #1 - bl sub_02019120 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02221D82: - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov12_02223428 - add r5, r0, #0 - ldr r0, [r4, #0x48] - mov r1, #1 - bl ov12_02223428 - lsl r1, r5, #0x18 - mov r0, #3 - lsr r1, r1, #0x18 - bl sub_02019060 - lsl r1, r5, #0x18 - mov r0, #2 - lsr r1, r1, #0x18 - bl sub_02019060 - ldrb r0, [r4, #0xa] - mov r1, #4 - mov r2, #8 - str r0, [sp] - ldrb r3, [r4, #9] - ldr r0, _02221F3C ; =0x04000050 - bl sub_020BF55C - add r0, r4, #0 - bl ov12_02221B64 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02221DC4: - ldrb r1, [r4, #9] - ldrb r0, [r4, #0xb] - mov r2, #0 - cmp r1, r0 - bhs _02221DD4 - add r0, r1, #2 - strb r0, [r4, #9] - b _02221DD6 -_02221DD4: - add r2, r2, #1 -_02221DD6: - ldrb r1, [r4, #0xa] - ldrb r0, [r4, #0xc] - cmp r1, r0 - bls _02221DE4 - sub r0, r1, #2 - strb r0, [r4, #0xa] - b _02221DE6 -_02221DE4: - add r2, r2, #1 -_02221DE6: - cmp r2, #2 - bne _02221DFC - ldrb r0, [r4, #0xb] - add r0, r0, #2 - strb r0, [r4, #9] - ldrb r0, [r4, #0xc] - sub r0, r0, #2 - strb r0, [r4, #0xa] - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02221DFC: - ldrb r0, [r4, #0xa] - ldrb r1, [r4, #9] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02221F40 ; =0x04000052 - strh r1, [r0] - b _02221F36 -_02221E0A: - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _02221E1E - ldr r0, [r4, #0x48] - bl ov12_02222338 -_02221E1E: - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _02221E32 - ldr r0, [r4, #0x48] - bl ov12_02222338 -_02221E32: - ldr r0, [r4, #0x48] - mov r2, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - ldr r0, [r4, #0x48] - mov r1, #3 - add r0, #0xc4 - ldr r0, [r0, #0] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #0x48] - mov r1, #3 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r2, #2 - mov r3, #4 - bl sub_02018898 - ldr r0, [r4, #0x48] - bl ov12_0221FDD4 - cmp r0, #0 - bne _02221E8C - ldr r0, [r4, #0x48] - mov r1, #3 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r2, #0 - mov r3, #1 - bl sub_02018898 - ldr r0, [r4, #0x48] - mov r1, #3 - bl ov12_02223460 - ldr r0, [r4, #0x48] - bl ov12_02223488 - b _02221EE0 -_02221E8C: - ldr r2, [r4, #0x48] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r2, #0] - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [sp, #0xc] - ldr r0, [r2, r1] - add r1, r1, #4 - ldr r1, [r2, r1] - add r2, #0xc4 - ldr r2, [r2, #0] - mov r3, #3 - bl sub_02006E3C - mov r2, #0x66 - lsl r2, r2, #2 - add r1, r2, #0 - ldr r3, [r4, #0x48] - mov r0, #0 - str r0, [sp] - ldr r0, [r3, r2] - sub r1, #0x14 - lsl r0, r0, #5 - str r0, [sp, #4] - sub r0, r2, #4 - ldr r0, [r3, r0] - sub r2, #0xc - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r3, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - ldr r1, [r3, r1] - ldr r2, [r3, r2] - ldr r3, [r3, #0] - bl sub_02003050 -_02221EE0: - ldr r2, [r4, #0x48] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r2, #0] - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [sp, #0xc] - ldr r0, [r2, r1] - add r1, #0xc - ldr r1, [r2, r1] - add r2, #0xc4 - ldr r2, [r2, #0] - mov r3, #3 - bl sub_02006E60 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - b _02221F36 -_02221F0C: - ldr r0, [r4, #0x48] - bl ov12_0221FDD4 - cmp r0, #0 - bne _02221F1C - bl ov16_0223F9F0 - b _02221F20 -_02221F1C: - bl ov17_022413D8 -_02221F20: - ldr r0, [r4, #0x48] - mov r1, #2 - bl ov12_02222664 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - b _02221F36 -_02221F30: - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, pc} -_02221F36: - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02221F3C: .word 0x04000050 -_02221F40: .word 0x04000052 - thumb_func_end ov12_02221D50 - - thumb_func_start ov12_02221F44 -ov12_02221F44: ; 0x02221F44 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - ldrb r0, [r4, #5] - cmp r0, #0 - beq _02221F56 - cmp r0, #1 - beq _02221FD2 - b _0222204E -_02221F56: - ldrb r0, [r4, #0xd] - ldr r2, [r4, #0x48] - cmp r0, #0 - bne _02221F94 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r5, #0x67 - add r0, r2, #0 - str r3, [sp, #8] - lsl r5, r5, #2 - ldr r2, [r2, r5] - add r0, #0xc8 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - mov r1, #1 - lsr r2, r2, #0x10 - bl sub_02003178 - mov r1, #0 - str r1, [sp] - ldr r0, [r4, #0x48] - add r2, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - add r2, #0x64 - mov r3, #0x10 - bl sub_02003A2C - b _02221FCC -_02221F94: - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _02222068 ; =0x0000FFFF - mov r5, #0x67 - str r0, [sp, #8] - add r0, r2, #0 - lsl r5, r5, #2 - ldr r2, [r2, r5] - add r0, #0xc8 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - mov r1, #1 - lsr r2, r2, #0x10 - bl sub_02003178 - ldr r0, _02222068 ; =0x0000FFFF - add r2, r5, #0 - str r0, [sp] - ldr r0, [r4, #0x48] - mov r1, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - add r2, #0x64 - mov r3, #0x10 - bl sub_02003A2C -_02221FCC: - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02221FD2: - ldr r0, [r4, #0x48] - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02222062 - ldr r0, [r4, #0x48] - mov r2, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #3 - add r3, r2, #0 - bl sub_02018898 - ldr r1, [r4, #0x48] - ldr r3, [r4, #0x10] - add r0, r4, #0 - mov r2, #3 - bl ov12_02221AA8 - ldrb r0, [r4, #0xd] - cmp r0, #0 - bne _0222201C - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - str r3, [sp, #8] - ldr r0, [r4, #0x48] - mov r1, #1 - add r0, #0xc8 - ldr r0, [r0, #0] - lsl r2, r1, #9 - bl sub_02003178 - b _02222036 -_0222201C: - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - ldr r0, _02222068 ; =0x0000FFFF - str r3, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0x48] - mov r1, #1 - add r0, #0xc8 - ldr r0, [r0, #0] - lsl r2, r1, #9 - bl sub_02003178 -_02222036: - add r0, r4, #0 - bl ov12_02221B64 - mov r0, #0x5f - ldr r1, [r4, #0x48] - mov r2, #2 - lsl r0, r0, #2 - strb r2, [r1, r0] - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - b _02222062 -_0222204E: - ldr r0, [r4, #0x48] - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02222062 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_02222062: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02222068: .word 0x0000FFFF - thumb_func_end ov12_02221F44 - - thumb_func_start ov12_0222206C -ov12_0222206C: ; 0x0222206C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - ldrb r0, [r4, #5] - cmp r0, #3 - bls _0222207A - b _02222276 -_0222207A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02222086: ; jump table - .short _0222208E - _02222086 - 2 ; case 0 - .short _0222209A - _02222086 - 2 ; case 1 - .short _02222114 - _02222086 - 2 ; case 2 - .short _02222204 - _02222086 - 2 ; case 3 -_0222208E: - add r0, r4, #0 - bl ov12_02221B64 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_0222209A: - ldrb r0, [r4, #0xd] - cmp r0, #0 - bne _022220D6 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r3, [sp, #8] - ldr r0, [r4, #0x48] - mov r1, #1 - add r0, #0xc8 - ldr r0, [r0, #0] - lsl r2, r1, #9 - bl sub_02003178 - ldr r3, [r4, #0x48] - mov r1, #0 - mov r2, #0x67 - add r0, r3, #0 - str r1, [sp] - lsl r2, r2, #2 - ldr r2, [r3, r2] - add r0, #0xc8 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - lsr r2, r2, #0x10 - mov r3, #0x10 - bl sub_02003A2C - b _0222210E -_022220D6: - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _022222A0 ; =0x0000FFFF - mov r1, #1 - str r0, [sp, #8] - ldr r0, [r4, #0x48] - lsl r2, r1, #9 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_02003178 - mov r2, #0x67 - ldr r3, [r4, #0x48] - ldr r0, _022222A0 ; =0x0000FFFF - lsl r2, r2, #2 - str r0, [sp] - add r0, r3, #0 - ldr r2, [r3, r2] - add r0, #0xc8 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - mov r1, #0 - lsr r2, r2, #0x10 - mov r3, #0x10 - bl sub_02003A2C -_0222210E: - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02222114: - ldr r0, [r4, #0x48] - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - beq _02222124 - b _0222229A -_02222124: - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _02222138 - ldr r0, [r4, #0x48] - bl ov12_02222338 -_02222138: - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0222214C - ldr r0, [r4, #0x48] - bl ov12_02222338 -_0222214C: - mov r0, #3 - mov r1, #0 - bl sub_02019120 - ldr r0, [r4, #0x48] - bl ov12_0221FDD4 - cmp r0, #0 - bne _0222217E - ldr r0, [r4, #0x48] - mov r1, #3 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r2, #0 - mov r3, #1 - bl sub_02018898 - ldr r0, [r4, #0x48] - mov r1, #3 - bl ov12_02223460 - ldr r0, [r4, #0x48] - bl ov12_02223488 - b _022221D2 -_0222217E: - ldr r2, [r4, #0x48] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r2, #0] - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [sp, #0xc] - ldr r0, [r2, r1] - add r1, r1, #4 - ldr r1, [r2, r1] - add r2, #0xc4 - ldr r2, [r2, #0] - mov r3, #3 - bl sub_02006E3C - mov r2, #0x66 - lsl r2, r2, #2 - add r1, r2, #0 - ldr r3, [r4, #0x48] - mov r0, #0 - str r0, [sp] - ldr r0, [r3, r2] - sub r1, #0x14 - lsl r0, r0, #5 - str r0, [sp, #4] - sub r0, r2, #4 - ldr r0, [r3, r0] - sub r2, #0xc - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r3, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - ldr r1, [r3, r1] - ldr r2, [r3, r2] - ldr r3, [r3, #0] - bl sub_02003050 -_022221D2: - ldr r2, [r4, #0x48] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r2, #0] - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [sp, #0xc] - ldr r0, [r2, r1] - add r1, #0xc - ldr r1, [r2, r1] - add r2, #0xc4 - ldr r2, [r2, #0] - mov r3, #3 - bl sub_02006E60 - mov r0, #3 - mov r1, #1 - bl sub_02019120 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02222204: - ldr r0, [r4, #0x48] - mov r2, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - ldr r0, [r4, #0x48] - mov r1, #3 - add r0, #0xc4 - ldr r0, [r0, #0] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldrb r0, [r4, #0xd] - ldr r2, [r4, #0x48] - cmp r0, #0 - bne _0222224E - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - mov r5, #0x67 - add r0, r2, #0 - str r3, [sp, #8] - lsl r5, r5, #2 - ldr r2, [r2, r5] - add r0, #0xc8 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - mov r1, #1 - lsr r2, r2, #0x10 - bl sub_02003178 - b _02222270 -_0222224E: - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - mov r5, #0x67 - ldr r0, _022222A0 ; =0x0000FFFF - str r3, [sp, #4] - str r0, [sp, #8] - add r0, r2, #0 - lsl r5, r5, #2 - ldr r2, [r2, r5] - add r0, #0xc8 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - mov r1, #1 - lsr r2, r2, #0x10 - bl sub_02003178 -_02222270: - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02222276: - ldr r0, [r4, #0x48] - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0222229A - mov r0, #0x5f - ldr r1, [r4, #0x48] - mov r2, #2 - lsl r0, r0, #2 - strb r2, [r1, r0] - ldrb r0, [r4, #5] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #5] - mov r0, #0 - pop {r3, r4, r5, pc} -_0222229A: - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022222A0: .word 0x0000FFFF - thumb_func_end ov12_0222206C - - thumb_func_start ov12_022222A4 -ov12_022222A4: ; 0x022222A4 - push {r3, lr} - add r0, r1, #0 - bl ov12_02221B64 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov12_022222A4 - - thumb_func_start ov12_022222B0 -ov12_022222B0: ; 0x022222B0 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov12_02221B64 - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _022222CE - ldr r0, [r4, #0x48] - bl ov12_02222338 -_022222CE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022222B0 - - thumb_func_start ov12_022222D4 -ov12_022222D4: ; 0x022222D4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #1 - bne _022222EE - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} -_022222EE: - mov r3, #4 - mov r1, #8 - ldrsh r2, [r4, r3] - ldrsh r0, [r4, r1] - add r0, r2, r0 - strh r0, [r4, #4] - mov r0, #6 - ldrsh r2, [r4, r0] - mov r0, #0xa - ldrsh r0, [r4, r0] - add r0, r2, r0 - strh r0, [r4, #6] - ldrsh r0, [r4, r1] - cmp r0, #0 - beq _0222231C - ldr r1, [r4, #0xc] - ldrsh r3, [r4, r3] - lsl r1, r1, #0x18 - ldr r0, [r4, #0] - lsr r1, r1, #0x18 - mov r2, #0 - bl sub_02019184 -_0222231C: - mov r0, #0xa - ldrsh r0, [r4, r0] - cmp r0, #0 - beq _02222336 - ldr r1, [r4, #0xc] - mov r3, #6 - lsl r1, r1, #0x18 - ldrsh r3, [r4, r3] - ldr r0, [r4, #0] - lsr r1, r1, #0x18 - mov r2, #3 - bl sub_02019184 -_02222336: - pop {r3, r4, r5, pc} - thumb_func_end ov12_022222D4 - - thumb_func_start ov12_02222338 -ov12_02222338: ; 0x02222338 - push {r4, lr} - add r4, r0, #0 - bne _02222342 - bl sub_02022974 -_02222342: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - cmp r1, #0 - beq _02222350 - mov r0, #1 - str r0, [r1, #0x18] -_02222350: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02222338 - - thumb_func_start ov12_02222354 -ov12_02222354: ; 0x02222354 - mov r1, #0x67 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov12_02222354 - - thumb_func_start ov12_0222235C -ov12_0222235C: ; 0x0222235C - mov r0, #0 - bx lr - thumb_func_end ov12_0222235C - - thumb_func_start ov12_02222360 -ov12_02222360: ; 0x02222360 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #0x20 - ldr r0, [r0, #0] - bl sub_02018144 - add r4, r0, #0 - ldr r0, [r5, #0x48] - mov r2, #6 - add r0, #0xc4 - ldr r0, [r0, #0] - str r0, [r4, #0] - ldr r0, [r5, #0x48] - add r0, #0x9c - ldr r0, [r0, #0] - strh r0, [r4, #4] - ldr r0, [r5, #0x48] - add r0, #0xa0 - ldr r0, [r0, #0] - strh r0, [r4, #6] - ldr r0, [r5, #0x48] - add r0, #0x94 - ldr r0, [r0, #0] - strh r0, [r4, #8] - ldr r0, [r5, #0x48] - add r0, #0x98 - ldr r0, [r0, #0] - strh r0, [r4, #0xa] - mov r0, #3 - str r0, [r4, #0xc] - str r0, [r4, #0x10] - ldr r1, [r5, #0x48] - add r0, r5, #0 - bl ov12_02221A54 - cmp r0, #1 - bne _022223D4 - mov r0, #8 - ldrsh r1, [r4, r0] - sub r0, #9 - mul r0, r1 - strh r0, [r4, #8] - mov r0, #0xa - ldrsh r1, [r4, r0] - sub r0, #0xb - mul r0, r1 - strh r0, [r4, #0xa] - mov r0, #4 - ldrsh r1, [r4, r0] - sub r0, r0, #5 - mul r0, r1 - strh r0, [r4, #4] - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r0, #7 - mul r0, r1 - strh r0, [r4, #6] -_022223D4: - mov r0, #1 - str r0, [r4, #0x14] - mov r1, #0 - str r1, [r4, #0x18] - mov r1, #6 - ldr r2, [r5, #0x48] - lsl r1, r1, #6 - str r4, [r2, r1] - add r1, r5, #0 - add r1, #0x44 - ldrh r2, [r1] - mov r1, #1 - add r5, #0x44 - bic r2, r1 - orr r0, r2 - strh r0, [r5] - ldr r0, _02222404 ; =ov12_022222D4 - ldr r2, _02222408 ; =0x00001001 - add r1, r4, #0 - bl sub_0200D9E8 - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02222404: .word ov12_022222D4 -_02222408: .word 0x00001001 - thumb_func_end ov12_02222360 - - thumb_func_start ov12_0222240C -ov12_0222240C: ; 0x0222240C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r4, [r0, #0x48] - str r0, [sp] - ldr r0, [r4, #0] - mov r1, #0x20 - bl sub_02018144 - add r6, r0, #0 - ldr r0, [r4, #0] - mov r1, #0xc4 - bl sub_02018144 - str r0, [r6, #0x1c] - mov r0, #6 - lsl r0, r0, #6 - str r6, [r4, r0] - ldr r0, [sp] - mov r1, #2 - add r0, #0x44 - ldrh r0, [r0] - add r2, r0, #0 - ldr r0, [sp] - orr r2, r1 - add r0, #0x44 - strh r2, [r0] - mov r0, #0 - str r0, [r6, #0x18] - add r0, r4, #0 - bl ov12_022233EC - bl ov12_022266F0 - add r5, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl ov12_022266E8 - add r1, r0, #0 - ldr r2, [r4, #0] - add r0, r5, #0 - bl ov12_02226544 - mov r4, #0 - ldr r1, [r6, #0x1c] - ldr r7, _022224DC ; =0x02238660 - add r1, #0xc0 - str r0, [r1, #0] - str r4, [sp, #4] - add r5, r4, #0 -_02222470: - ldr r0, [r6, #0x1c] - strh r4, [r0, r5] - ldr r0, [r6, #0x1c] - add r1, r0, r5 - ldrsh r0, [r0, r5] - add r0, #8 - strh r0, [r1, #2] - mov r0, #0 - ldrsh r1, [r7, r0] - ldr r0, [r6, #0x1c] - add r0, r0, r5 - strh r1, [r0, #4] - ldr r0, [r6, #0x1c] - add r1, r0, r5 - mov r0, #0 - strh r0, [r1, #6] - add r1, r0, #0 - bl ov12_022266E8 - ldr r1, [r6, #0x1c] - mov r2, #6 - add r1, r1, r5 - str r0, [r1, #8] - ldr r0, [sp] - add r1, r0, #0 - ldr r1, [r1, #0x48] - bl ov12_02221A54 - cmp r0, #1 - bne _022224BA - ldr r0, [r6, #0x1c] - mov r1, #4 - add r0, r0, r5 - ldrsh r2, [r0, r1] - sub r1, r1, #5 - mul r1, r2 - strh r1, [r0, #4] -_022224BA: - ldr r0, [sp, #4] - add r4, #8 - add r0, r0, #1 - add r5, #0xc - add r7, r7, #2 - str r0, [sp, #4] - cmp r0, #0x10 - blt _02222470 - mov r2, #1 - ldr r0, _022224E0 ; =ov12_022224F8 - add r1, r6, #0 - lsl r2, r2, #0xc - bl sub_0200D9E8 - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022224DC: .word 0x02238660 -_022224E0: .word ov12_022224F8 - thumb_func_end ov12_0222240C - - thumb_func_start ov12_022224E4 -ov12_022224E4: ; 0x022224E4 - add r1, r0, #0 - add r1, #0x44 - ldrh r2, [r1] - mov r1, #2 - add r0, #0x44 - orr r1, r2 - strh r1, [r0] - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_022224E4 - - thumb_func_start ov12_022224F8 -ov12_022224F8: ; 0x022224F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x18] - ldr r4, [r5, #0x1c] - cmp r0, #1 - bne _02222526 - add r4, #0xc0 - ldr r0, [r4, #0] - bl ov12_022265C0 - ldr r0, [r5, #0x1c] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02222526: - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - bl ov12_022265E4 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] -_02222536: - mov r0, #6 - ldrsh r1, [r4, r0] - mov r0, #4 - ldrsh r0, [r4, r0] - add r0, r1, r0 - strh r0, [r4, #6] - mov r0, #0 - ldrsh r6, [r4, r0] - mov r0, #2 - ldrsh r0, [r4, r0] - cmp r6, r0 - bge _0222257E - ldr r0, [sp] - lsl r1, r6, #2 - add r5, r0, r1 - mov r7, #2 -_02222556: - ldr r1, [r4, #8] - mov r2, #6 - lsl r0, r1, #0x10 - asr r1, r1, #0x10 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - lsl r1, r1, #0x10 - ldrsh r2, [r4, r2] - asr r0, r0, #0x10 - lsr r1, r1, #0x10 - add r0, r0, r2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov12_022266E8 - stmia r5!, {r0} - ldrsh r0, [r4, r7] - add r6, r6, #1 - cmp r6, r0 - blt _02222556 -_0222257E: - ldr r0, [sp, #4] - add r4, #0xc - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #0x10 - blt _02222536 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022224F8 - - thumb_func_start ov12_02222590 -ov12_02222590: ; 0x02222590 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - bl ov12_02223428 - add r1, r0, #0 - lsl r0, r4, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - mov r1, #0 - bl sub_02019120 - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _022225D4 - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - mov r2, #2 - mov r3, #4 - bl sub_02018898 - b _022225F8 -_022225D4: - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - mov r2, #0 - mov r3, #1 - bl sub_02018898 - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - mov r2, #2 - mov r3, #4 - bl sub_02018898 -_022225F8: - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - bl sub_02019EBC - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02222636 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #0] - mov r1, #0x61 - add r2, r5, #0 - lsl r1, r1, #2 - str r0, [sp, #0xc] - ldr r0, [r5, r1] - add r1, r1, #4 - add r2, #0xc4 - ldr r1, [r5, r1] - ldr r2, [r2, #0] - add r3, r4, #0 - bl sub_02006E3C - b _0222263E -_02222636: - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02223460 -_0222263E: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #0] - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [sp, #0xc] - ldr r0, [r5, r1] - add r1, #0xc - ldr r1, [r5, r1] - add r5, #0xc4 - ldr r2, [r5, #0] - add r3, r4, #0 - bl sub_02006E60 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02222590 - - thumb_func_start ov12_02222664 -ov12_02222664: ; 0x02222664 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #1 - add r5, r0, #0 - bl ov12_02223428 - add r1, r0, #0 - lsl r0, r4, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222269C - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - mov r2, #2 - mov r3, #3 - bl sub_02018898 - b _022226C0 -_0222269C: - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - mov r2, #0 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02018898 - add r0, r5, #0 - add r0, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - mov r2, #2 - mov r3, #3 - bl sub_02018898 -_022226C0: - add r5, #0xc4 - lsl r1, r4, #0x18 - ldr r0, [r5, #0] - lsr r1, r1, #0x18 - bl sub_02019EBC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02222664 - - thumb_func_start ov12_022226D0 -ov12_022226D0: ; 0x022226D0 - add r1, r0, #0 - add r1, #0x44 - ldrh r2, [r1] - mov r1, #1 - add r0, #0x44 - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_022226D0 - - thumb_func_start ov12_022226E8 -ov12_022226E8: ; 0x022226E8 - push {r3, lr} - ldr r0, [r0, #0x48] - bl ov12_02222338 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov12_022226E8 - - thumb_func_start ov12_022226F4 -ov12_022226F4: ; 0x022226F4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0x14] - add r5, r0, #0 - lsl r3, r2, #2 - ldr r2, _02222720 ; =0x022385CC - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - bne _0222271E - mov r0, #0x5f - ldr r1, [r4, #0x48] - mov r2, #0 - lsl r0, r0, #2 - strb r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0222271E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02222720: .word 0x022385CC - thumb_func_end ov12_022226F4 - - thumb_func_start ov12_02222724 -ov12_02222724: ; 0x02222724 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02221BBC - add r4, r0, #0 - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strb r0, [r4, #0xd] - ldr r0, [r5, #0x18] - ldr r2, _02222768 ; =0x0000044C - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - str r0, [r4, #0x10] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - lsl r0, r1, #0x10 - lsr r0, r0, #0x10 - str r0, [r4, #0x14] - ldr r0, _0222276C ; =0xFFFF0000 - and r0, r1 - lsr r0, r0, #0x10 - str r0, [r4, #0x18] - ldr r0, _02222770 ; =ov12_022226F4 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02222768: .word 0x0000044C -_0222276C: .word 0xFFFF0000 -_02222770: .word ov12_022226F4 - thumb_func_end ov12_02222724 - - thumb_func_start ov12_02222774 -ov12_02222774: ; 0x02222774 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r2, r1, #4 - str r2, [r0, #0x18] - ldr r1, [r2, #0] - add r2, r2, #4 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - str r2, [r0, #0x18] - cmp r3, #3 - bhi _022227C8 - add r2, r3, r3 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0222279A: ; jump table - .short _022227A2 - _0222279A - 2 ; case 0 - .short _022227AC - _0222279A - 2 ; case 1 - .short _022227B6 - _0222279A - 2 ; case 2 - .short _022227C0 - _0222279A - 2 ; case 3 -_022227A2: - mov r2, #6 - lsl r2, r2, #6 - ldr r0, [r0, r2] - strh r1, [r0, #8] - bx lr -_022227AC: - mov r2, #6 - lsl r2, r2, #6 - ldr r0, [r0, r2] - strh r1, [r0, #0xa] - bx lr -_022227B6: - mov r2, #6 - lsl r2, r2, #6 - ldr r0, [r0, r2] - strh r1, [r0, #4] - bx lr -_022227C0: - mov r2, #6 - lsl r2, r2, #6 - ldr r0, [r0, r2] - strh r1, [r0, #4] -_022227C8: - bx lr - ; .align 2, 0 - thumb_func_end ov12_02222774 - - thumb_func_start ov12_022227CC -ov12_022227CC: ; 0x022227CC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02221BBC - add r4, r0, #0 - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strb r0, [r4, #0xd] - ldr r0, [r5, #0x18] - ldr r2, _02222814 ; =0x0000044C - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - str r0, [r4, #0x10] - ldr r0, [r5, #0x18] - add r1, r0, #4 - str r1, [r5, #0x18] - ldr r0, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - lsl r1, r0, #0x10 - lsr r1, r1, #0x10 - add r1, r1, #3 - str r1, [r4, #0x14] - ldr r1, _02222818 ; =0xFFFF0000 - and r0, r1 - lsr r0, r0, #0x10 - str r0, [r4, #0x18] - ldr r0, _0222281C ; =ov12_022226F4 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_02222814: .word 0x0000044C -_02222818: .word 0xFFFF0000 -_0222281C: .word ov12_022226F4 - thumb_func_end ov12_022227CC - - thumb_func_start ov12_02222820 -ov12_02222820: ; 0x02222820 - mov r1, #0x5f - lsl r1, r1, #2 - ldrb r1, [r0, r1] - cmp r1, #2 - bne _02222838 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - mov r1, #0 - add r0, #0x8d - strb r1, [r0] - bx lr -_02222838: - mov r1, #1 - add r0, #0x8d - strb r1, [r0] - bx lr - thumb_func_end ov12_02222820 - - thumb_func_start ov12_02222840 -ov12_02222840: ; 0x02222840 - mov r1, #0x5f - lsl r1, r1, #2 - ldrb r1, [r0, r1] - cmp r1, #0 - bne _02222858 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - mov r1, #0 - add r0, #0x8d - strb r1, [r0] - bx lr -_02222858: - mov r1, #1 - add r0, #0x8d - strb r1, [r0] - bx lr - thumb_func_end ov12_02222840 - - thumb_func_start ov12_02222860 -ov12_02222860: ; 0x02222860 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x18] - mov r1, #0 - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r4, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r4, #0 - bl ov12_022234E4 - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r2, r5, #0 - str r0, [sp, #0xc] - add r2, #0xc4 - ldr r2, [r2, #0] - mov r0, #7 - mov r3, #3 - bl sub_02006E3C - add r0, r4, #0 - mov r1, #1 - bl ov12_022234E4 - mov r2, #0 - str r2, [sp] - add r1, r0, #0 - ldr r0, [r5, #0] - add r3, r2, #0 - str r0, [sp, #4] - mov r0, #7 - bl sub_02006E84 - add r0, r4, #0 - mov r1, #2 - bl ov12_022234E4 - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r5, #0xc4 - str r0, [sp, #0xc] - ldr r2, [r5, #0] - mov r0, #7 - mov r3, #3 - bl sub_02006E60 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02222860 - - thumb_func_start ov12_022228DC -ov12_022228DC: ; 0x022228DC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov12_02221BBC - add r4, r0, #0 - ldr r0, [r5, #0x18] - add r1, r0, #4 - str r1, [r5, #0x18] - ldr r0, [r1, #0] - str r0, [sp] - add r0, r1, #4 - str r0, [r5, #0x18] - ldr r7, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r6, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222290E - str r6, [r4, #0x10] - b _02222926 -_0222290E: - add r0, r5, #0 - add r5, #0xc0 - ldr r1, [r5, #0] - ldrh r1, [r1, #0x16] - bl ov12_0223525C - cmp r0, #3 - bne _02222922 - str r7, [r4, #0x10] - b _02222926 -_02222922: - ldr r0, [sp] - str r0, [r4, #0x10] -_02222926: - ldr r0, _02222934 ; =ov12_022226F4 - ldr r2, _02222938 ; =0x0000044C - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02222934: .word ov12_022226F4 -_02222938: .word 0x0000044C - thumb_func_end ov12_022228DC - - thumb_func_start ov12_0222293C -ov12_0222293C: ; 0x0222293C - bx lr - ; .align 2, 0 - thumb_func_end ov12_0222293C - - thumb_func_start ov12_02222940 -ov12_02222940: ; 0x02222940 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02222940 - - thumb_func_start ov12_02222944 -ov12_02222944: ; 0x02222944 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02222944 - - thumb_func_start ov12_02222948 -ov12_02222948: ; 0x02222948 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02222948 - - thumb_func_start ov12_0222294C -ov12_0222294C: ; 0x0222294C - bx lr - ; .align 2, 0 - thumb_func_end ov12_0222294C - - thumb_func_start ov12_02222950 -ov12_02222950: ; 0x02222950 - ldr r1, [r0, #0x18] - ldr r3, _02222964 ; =sub_02005748 - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - lsl r0, r2, #0x10 - lsr r0, r0, #0x10 - bx r3 - ; .align 2, 0 -_02222964: .word sub_02005748 - thumb_func_end ov12_02222950 - - thumb_func_start ov12_02222968 -ov12_02222968: ; 0x02222968 - ldr r1, [r0, #0x18] - ldr r3, _02222980 ; =sub_020057A4 - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - lsl r0, r2, #0x10 - lsr r0, r0, #0x10 - mov r1, #0 - bx r3 - nop -_02222980: .word sub_020057A4 - thumb_func_end ov12_02222968 - - thumb_func_start ov12_02222984 -ov12_02222984: ; 0x02222984 - push {r3, r4, r5, lr} - ldr r1, [r0, #0x18] - add r2, r1, #4 - str r2, [r0, #0x18] - ldr r1, [r2, #0] - lsl r1, r1, #0x10 - lsr r4, r1, #0x10 - add r1, r2, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - lsl r1, r2, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - add r5, r0, #0 - add r0, r4, #0 - bl sub_02005748 - ldr r1, _022229B8 ; =0x0000FFFF - add r0, r4, #0 - add r2, r5, #0 - bl sub_020057FC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022229B8: .word 0x0000FFFF - thumb_func_end ov12_02222984 - - thumb_func_start ov12_022229BC -ov12_022229BC: ; 0x022229BC - push {r3, lr} - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - lsl r1, r2, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - bl sub_02005818 - pop {r3, pc} - thumb_func_end ov12_022229BC - - thumb_func_start ov12_022229D8 -ov12_022229D8: ; 0x022229D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02220314 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020D5124 - mov r0, #1 - strb r0, [r4] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strh r0, [r4, #0x1a] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - str r0, [r4, #8] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - str r0, [r4, #0xc] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - str r0, [r4, #0x10] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strb r0, [r4, #3] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r4, #8] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #8] - ldr r1, [r4, #0xc] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #0xc] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x10] - lsl r0, r0, #0x18 - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - asr r0, r0, #0x18 - asr r1, r1, #0x18 - asr r2, r2, #0x18 - bl ov12_02223234 - str r0, [r4, #0x10] - ldrh r0, [r4, #0x1a] - bl sub_02005748 - ldrh r0, [r4, #0x1a] - ldr r1, _02222A74 ; =0x0000FFFF - ldr r2, [r4, #8] - bl sub_020057FC - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02220344 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02222A74: .word 0x0000FFFF - thumb_func_end ov12_022229D8 - - thumb_func_start ov12_02222A78 -ov12_02222A78: ; 0x02222A78 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02220314 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020D5124 - mov r0, #2 - strb r0, [r4] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strh r0, [r4, #0x1a] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #8] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #0xc] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #0x10] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strb r0, [r4, #3] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldrh r0, [r4, #0x1a] - bl sub_02005748 - ldrh r0, [r4, #0x1a] - ldr r1, _02222AEC ; =0x0000FFFF - ldr r2, [r4, #8] - bl sub_020057FC - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02220344 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02222AEC: .word 0x0000FFFF - thumb_func_end ov12_02222A78 - - thumb_func_start ov12_02222AF0 -ov12_02222AF0: ; 0x02222AF0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02220314 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020D5124 - mov r0, #1 - strb r0, [r4] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strh r0, [r4, #0x1a] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #8] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #0xc] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #0x10] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strb r0, [r4, #3] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r4, #8] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #8] - ldr r1, [r4, #0xc] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #0x10] - ldrh r0, [r4, #0x1a] - bl sub_02005748 - ldrh r0, [r4, #0x1a] - ldr r1, _02222B90 ; =0x0000FFFF - ldr r2, [r4, #8] - bl sub_020057FC - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02220344 - pop {r3, r4, r5, pc} - nop -_02222B90: .word 0x0000FFFF - thumb_func_end ov12_02222AF0 - - thumb_func_start ov12_02222B94 -ov12_02222B94: ; 0x02222B94 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02220314 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020D5124 - mov r0, #4 - strb r0, [r4] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strh r0, [r4, #0x1a] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #0x14] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strb r0, [r4, #3] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strb r0, [r4, #0x18] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldrb r0, [r4, #3] - strb r0, [r4, #4] - ldr r1, [r4, #0x14] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #0x14] - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02220344 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02222B94 - - thumb_func_start ov12_02222BF8 -ov12_02222BF8: ; 0x02222BF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_02220314 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020D5124 - mov r0, #5 - strb r0, [r4] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strh r0, [r4, #0x1a] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [r4, #0x14] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r0, [r0, #0] - strb r0, [r4, #3] - ldr r0, [r5, #0x18] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r4, #0x14] - add r0, r5, #0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - str r0, [r4, #0x14] - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02220344 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02222BF8 - - thumb_func_start ov12_02222C50 -ov12_02222C50: ; 0x02222C50 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02222C50 - - thumb_func_start ov12_02222C54 -ov12_02222C54: ; 0x02222C54 - push {r4, lr} - add r4, r0, #0 - add r0, #0x90 - ldrh r0, [r0] - cmp r0, #0 - beq _02222C70 - add r0, r4, #0 - mov r1, #1 - add r0, #0x8d - strb r1, [r0] - ldr r0, _02222CA8 ; =0x0000017D - mov r1, #0 - strb r1, [r4, r0] - pop {r4, pc} -_02222C70: - bl sub_020057E0 - cmp r0, #0 - beq _02222C94 - ldr r0, _02222CA8 ; =0x0000017D - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r1, [r4, r0] - cmp r1, #0x5a - bls _02222C8C - mov r1, #0 - strb r1, [r4, r0] - pop {r4, pc} -_02222C8C: - mov r0, #1 - add r4, #0x8d - strb r0, [r4] - pop {r4, pc} -_02222C94: - add r0, r4, #0 - mov r1, #0 - add r0, #0x8d - strb r1, [r0] - ldr r0, _02222CA8 ; =0x0000017D - strb r1, [r4, r0] - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 -_02222CA8: .word 0x0000017D - thumb_func_end ov12_02222C54 - - thumb_func_start ov12_02222CAC -ov12_02222CAC: ; 0x02222CAC - push {r3, lr} - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - str r1, [r0, #0x18] - lsl r0, r2, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #0x10 - ldr r0, _02222CD8 ; =0x04001050 - mov r1, #1 - mov r2, #2 - lsr r3, r3, #0x10 - bl sub_020BF55C - pop {r3, pc} - nop -_02222CD8: .word 0x04001050 - thumb_func_end ov12_02222CAC - - thumb_func_start ov12_02222CDC -ov12_02222CDC: ; 0x02222CDC - ldr r3, _02222CE0 ; =ov12_02220474 - bx r3 - ; .align 2, 0 -_02222CE0: .word ov12_02220474 - thumb_func_end ov12_02222CDC - - thumb_func_start ov12_02222CE4 -ov12_02222CE4: ; 0x02222CE4 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02222CE4 - - thumb_func_start ov12_02222CE8 -ov12_02222CE8: ; 0x02222CE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r6, r5, #0 - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r5, #0x18] - ldr r7, [r0, #0] - add r0, r0, #4 - lsl r4, r1, #2 - add r6, #0xcc - str r0, [r5, #0x18] - ldr r0, [r6, r4] - cmp r0, #0 - beq _02222D10 - bl sub_02022974 -_02222D10: - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200C704 - str r0, [r6, r4] - ldr r0, [r6, r4] - cmp r0, #0 - bne _02222D2A - bl sub_02022974 -_02222D2A: - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r1, [r6, r4] - add r0, #0xac - ldr r0, [r0, #0] - add r2, r7, #0 - bl sub_0200C7C0 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200C738 - mov r2, #0x11 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C - add r0, r5, #0 - mov r1, #0 - add r2, sp, #0 - add r0, #0x18 -_02222D5C: - ldr r3, [r5, #0x18] - add r1, r1, #1 - ldr r3, [r3, #0] - str r3, [r2, #0] - ldr r3, [r0, #0] - add r2, r2, #4 - add r3, r3, #4 - str r3, [r0, #0] - cmp r1, #6 - blt _02222D5C - add r5, #0xc0 - ldr r0, [r5, #0] - ldr r1, [r6, r4] - add r0, #0xac - ldr r0, [r0, #0] - add r2, sp, #0 - bl sub_0200CB30 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02222CE8 - - thumb_func_start ov12_02222D84 -ov12_02222D84: ; 0x02222D84 - push {r3, r4, lr} - sub sp, #0xc - add r2, r0, #0 - ldr r0, [r2, #0x18] - mov r4, #0x6b - add r0, r0, #4 - str r0, [r2, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r2, #0x18] - ldr r3, [r0, #0] - add r0, r0, #4 - str r0, [r2, #0x18] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02222DC8 ; =0x00001388 - lsl r1, r1, #2 - add r0, r3, r0 - str r0, [sp, #8] - add r0, r2, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, r2, r1 - add r0, #0xac - add r1, #0xcc - lsl r4, r4, #2 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, r4] - bl sub_0200CC3C - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02222DC8: .word 0x00001388 - thumb_func_end ov12_02222D84 - - thumb_func_start ov12_02222DCC -ov12_02222DCC: ; 0x02222DCC - push {r4, lr} - sub sp, #0x18 - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r0, r0, #4 - str r0, [r4, #0x18] - ldr r3, [r0, #0] - add r0, r0, #4 - str r0, [r4, #0x18] - ldr r1, [r0, #0] - add r2, r0, #4 - str r2, [r4, #0x18] - ldr r0, [r2, #0] - add r2, r2, #4 - str r2, [r4, #0x18] - mov r2, #0x1b - lsl r2, r2, #4 - ldr r2, [r4, r2] - lsl r3, r3, #2 - str r2, [sp] - str r1, [sp, #4] - mov r2, #0 - str r2, [sp, #8] - mov r2, #1 - str r2, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02222E28 ; =0x00001388 - add r2, r4, #0 - add r0, r1, r0 - str r0, [sp, #0x14] - add r2, #0xc0 - ldr r2, [r2, #0] - add r0, r4, #0 - add r3, r4, r3 - add r0, #0xc8 - add r2, #0xac - add r3, #0xcc - ldr r0, [r0, #0] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - mov r1, #2 - bl sub_0200CDC4 - add sp, #0x18 - pop {r4, pc} - nop -_02222E28: .word 0x00001388 - thumb_func_end ov12_02222DCC - - thumb_func_start ov12_02222E2C -ov12_02222E2C: ; 0x02222E2C - push {r4, lr} - sub sp, #8 - add r2, r0, #0 - ldr r0, [r2, #0x18] - mov r4, #0x6d - add r0, r0, #4 - str r0, [r2, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r2, #0x18] - ldr r3, [r0, #0] - add r0, r0, #4 - str r0, [r2, #0x18] - mov r0, #1 - str r0, [sp] - ldr r0, _02222E70 ; =0x00001388 - lsl r1, r1, #2 - add r0, r3, r0 - str r0, [sp, #4] - add r0, r2, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, r2, r1 - add r0, #0xac - add r1, #0xcc - lsl r4, r4, #2 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, r4] - bl sub_0200CE24 - add sp, #8 - pop {r4, pc} - nop -_02222E70: .word 0x00001388 - thumb_func_end ov12_02222E2C - - thumb_func_start ov12_02222E74 -ov12_02222E74: ; 0x02222E74 - push {r4, lr} - sub sp, #8 - add r2, r0, #0 - ldr r0, [r2, #0x18] - mov r4, #0x6e - add r0, r0, #4 - str r0, [r2, #0x18] - ldr r1, [r0, #0] - add r0, r0, #4 - str r0, [r2, #0x18] - ldr r3, [r0, #0] - add r0, r0, #4 - str r0, [r2, #0x18] - mov r0, #1 - str r0, [sp] - ldr r0, _02222EB8 ; =0x00001388 - lsl r1, r1, #2 - add r0, r3, r0 - str r0, [sp, #4] - add r0, r2, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, r2, r1 - add r0, #0xac - add r1, #0xcc - lsl r4, r4, #2 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, r4] - bl sub_0200CE54 - add sp, #8 - pop {r4, pc} - nop -_02222EB8: .word 0x00001388 - thumb_func_end ov12_02222E74 - - thumb_func_start ov12_02222EBC -ov12_02222EBC: ; 0x02222EBC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r4, r0, #0 - ldr r1, [r4, #0x18] - add r1, r1, #4 - str r1, [r4, #0x18] - ldr r5, [r1, #0] - add r2, r1, #4 - str r2, [r4, #0x18] - ldr r1, [r2, #0] - str r1, [sp] - add r1, r2, #4 - str r1, [r4, #0x18] - bl ov12_02220248 - add r6, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #0 - bl ov12_022258E0 - add r1, sp, #0xc - strh r0, [r1] - add r0, r4, #0 - add r1, r6, #0 - mov r2, #1 - bl ov12_022258E0 - add r2, sp, #0xc - strh r0, [r2, #2] - mov r1, #0 - strh r1, [r2, #4] - strh r1, [r2, #6] - mov r0, #0x64 - str r0, [sp, #0x14] - mov r0, #1 - str r0, [sp, #0x1c] - str r0, [sp, #0x38] - add r0, r4, #0 - ldr r3, _02222FC4 ; =0x00001388 - str r1, [sp, #0x18] - str r1, [sp, #0x3c] - add r2, sp, #0xc - add r0, #0x18 -_02222F14: - ldr r6, [r4, #0x18] - add r1, r1, #1 - ldr r6, [r6, #0] - add r6, r6, r3 - str r6, [r2, #0x14] - ldr r6, [r0, #0] - add r2, r2, #4 - add r6, r6, #4 - str r6, [r0, #0] - cmp r1, #6 - blt _02222F14 - mov r0, #0x41 - lsl r0, r0, #2 - add r3, sp, #0xc - add r2, r4, r0 - mov r6, #6 -_02222F34: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _02222F34 - ldr r0, [r3, #0] - lsl r7, r5, #2 - str r0, [r2, #0] - add r0, r4, #0 - str r0, [sp, #8] - add r0, #0xcc - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r1, [sp, #8] - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r1, r7] - add r2, sp, #0xc - bl sub_0200CE6C - str r0, [sp, #4] - ldr r0, [r4, #0x18] - add r2, r4, #0 - ldr r3, [r0, #0] - add r0, r0, #4 - add r2, #0x18 - mov r6, #0 - str r0, [r4, #0x18] - cmp r3, #0 - ble _02222F8C - add r5, r4, #0 -_02222F74: - ldr r0, [r4, #0x18] - add r6, r6, #1 - ldr r1, [r0, #0] - add r0, r5, #0 - add r0, #0x94 - str r1, [r0, #0] - ldr r0, [r2, #0] - add r5, r5, #4 - add r0, r0, #4 - str r0, [r2, #0] - cmp r6, r3 - blt _02222F74 -_02222F8C: - cmp r6, #0xa - bge _02222FA4 - lsl r0, r6, #2 - add r2, r4, r0 - mov r1, #0 -_02222F96: - add r0, r2, #0 - add r0, #0x94 - add r6, r6, #1 - add r2, r2, #4 - str r1, [r0, #0] - cmp r6, #0xa - blt _02222F96 -_02222FA4: - ldr r0, [sp] - bl ov12_022269AC - add r5, r0, #0 - add r0, r4, #0 - add r4, #0xc0 - ldr r1, [r4, #0] - ldr r2, [sp, #8] - add r1, #0xac - ldr r1, [r1, #0] - ldr r2, [r2, r7] - ldr r3, [sp, #4] - blx r5 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_02222FC4: .word 0x00001388 - thumb_func_end ov12_02222EBC - - thumb_func_start ov12_02222FC8 -ov12_02222FC8: ; 0x02222FC8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r4, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r7, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - bl ov12_02220248 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov12_022258E0 - add r1, sp, #0 - strh r0, [r1] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - bl ov12_022258E0 - add r2, sp, #0 - strh r0, [r2, #2] - mov r1, #0 - strh r1, [r2, #4] - strh r1, [r2, #6] - mov r0, #0x64 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0x10] - str r0, [sp, #0x2c] - add r0, r5, #0 - ldr r3, _02223078 ; =0x00001388 - str r1, [sp, #0xc] - str r1, [sp, #0x30] - add r2, sp, #0 - add r0, #0x18 -_0222301E: - ldr r6, [r5, #0x18] - add r1, r1, #1 - ldr r6, [r6, #0] - add r6, r6, r3 - str r6, [r2, #0x14] - ldr r6, [r0, #0] - add r2, r2, #4 - add r6, r6, #4 - str r6, [r0, #0] - cmp r1, #6 - blt _0222301E - mov r0, #0x41 - lsl r0, r0, #2 - add r6, sp, #0 - add r3, r5, r0 - mov r2, #6 -_0222303E: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0222303E - ldr r0, [r6, #0] - lsl r1, r4, #2 - str r0, [r3, #0] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r1, r5, r1 - add r0, #0xac - add r1, #0xcc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, sp, #0 - bl sub_0200CE6C - add r5, #0xdc - lsl r4, r7, #2 - add r6, r0, #0 - ldr r0, [r5, r4] - cmp r0, #0 - beq _02223072 - bl sub_02022974 -_02223072: - str r6, [r5, r4] - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02223078: .word 0x00001388 - thumb_func_end ov12_02222FC8 - - thumb_func_start ov12_0222307C -ov12_0222307C: ; 0x0222307C - push {r3, r4, r5, lr} - ldr r1, [r0, #0x18] - add r5, r0, #0 - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r2, [r1, #0] - add r1, r1, #4 - add r5, #0xcc - lsl r4, r2, #2 - str r1, [r0, #0x18] - ldr r1, [r5, r4] - cmp r1, #0 - beq _022230A2 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200D0B0 -_022230A2: - mov r0, #0 - str r0, [r5, r4] - pop {r3, r4, r5, pc} - thumb_func_end ov12_0222307C - - thumb_func_start ov12_022230A8 -ov12_022230A8: ; 0x022230A8 - ldr r1, [r0, #0x18] - add r1, r1, #4 - str r1, [r0, #0x18] - ldr r3, [r1, #0] - add r2, r1, #4 - str r2, [r0, #0x18] - ldr r1, [r2, #0] - add r2, r2, #4 - str r2, [r0, #0x18] - lsl r2, r3, #2 - add r2, r0, r2 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r3, _022230C8 ; =sub_0200D3F4 - ldr r0, [r2, r0] - bx r3 - ; .align 2, 0 -_022230C8: .word sub_0200D3F4 - thumb_func_end ov12_022230A8 - - thumb_func_start ov12_022230CC -ov12_022230CC: ; 0x022230CC - ldr r3, _022230D0 ; =sub_02022974 - bx r3 - ; .align 2, 0 -_022230D0: .word sub_02022974 - thumb_func_end ov12_022230CC - - thumb_func_start ov12_022230D4 -ov12_022230D4: ; 0x022230D4 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r1, [r5, #0x18] - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r4, [r1, #0] - add r1, r1, #4 - str r1, [r5, #0x18] - ldr r1, [r1, #0] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - bl ov12_0222317C - ldr r1, [r5, #0x18] - add r2, r1, #4 - str r2, [r5, #0x18] - ldr r1, [r2, #0] - add r2, r2, #4 - str r2, [r5, #0x18] - add r2, r5, #0 - add r2, #0xc0 - ldr r6, [r2, #0] - ldrh r3, [r6, #0x14] - str r0, [sp] - lsl r2, r3, #1 - mov r0, #0x46 - add r2, r6, r2 - add r3, r6, r3 - lsl r0, r0, #2 - str r1, [sp, #4] - ldr r1, [r6, r0] - add r2, #0xd8 - str r1, [sp, #8] - ldr r1, [r5, #0] - add r3, #0xe8 - str r1, [sp, #0xc] - sub r0, #0xc - ldrh r2, [r2] - ldrb r3, [r3] - ldr r0, [r6, r0] - add r1, r4, #0 - bl sub_02077D3C - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov12_022230D4 - - thumb_func_start ov12_02223134 -ov12_02223134: ; 0x02223134 - push {r4, lr} - add r4, r0, #0 - bl sub_0200598C - cmp r0, #0 - bne _02223158 - ldr r0, [r4, #0x18] - add r1, r0, #4 - str r1, [r4, #0x18] - ldr r0, [r1, #0] - add r1, r1, #4 - str r1, [r4, #0x18] - mov r1, #0 - add r4, #0x8d - strb r1, [r4] - bl sub_0200592C - pop {r4, pc} -_02223158: - mov r0, #1 - add r4, #0x8d - strb r0, [r4] - pop {r4, pc} - thumb_func_end ov12_02223134 - - thumb_func_start ov12_02223160 -ov12_02223160: ; 0x02223160 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02223160 - - thumb_func_start ov12_02223164 -ov12_02223164: ; 0x02223164 - cmp r0, #0x55 - bls _0222316C - mov r0, #0 - bx lr -_0222316C: - lsl r1, r0, #2 - ldr r0, _02223174 ; =0x022387D4 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_02223174: .word 0x022387D4 - thumb_func_end ov12_02223164 - - thumb_func_start ov12_02223178 -ov12_02223178: ; 0x02223178 - ldrb r0, [r0, #1] - bx lr - thumb_func_end ov12_02223178 - - thumb_func_start ov12_0222317C -ov12_0222317C: ; 0x0222317C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02220240 - add r7, r0, #0 - add r0, r5, #0 - bl ov12_02220248 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - bl ov12_0223525C - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223525C - add r0, r5, #0 - add r1, r7, #0 - bl ov12_0223525C - cmp r0, #3 - bne _022231B8 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #4 - beq _0222321E -_022231B8: - add r0, r5, #0 - add r1, r7, #0 - bl ov12_0223525C - cmp r0, #4 - bne _022231D8 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #3 - bne _022231D8 - mov r0, #0 - mvn r0, r0 - mul r4, r0 - b _0222321E -_022231D8: - add r0, r5, #0 - add r1, r7, #0 - bl ov12_0223525C - cmp r0, #3 - bne _022231FC - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #3 - bne _022231FC - cmp r4, #0 - ble _0222321E - mov r0, #0 - mvn r0, r0 - mul r4, r0 - b _0222321E -_022231FC: - add r0, r5, #0 - add r1, r7, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222321E - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222321E - cmp r4, #0 - bge _0222321E - mov r0, #0 - mvn r0, r0 - mul r4, r0 -_0222321E: - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222322E - mov r0, #0 - mvn r0, r0 - mul r4, r0 -_0222322E: - lsl r0, r4, #0x18 - asr r0, r0, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_0222317C - - thumb_func_start ov12_02223234 -ov12_02223234: ; 0x02223234 - push {r3, lr} - cmp r0, r1 - bge _02223246 - add r0, r2, #0 - bl sub_020D4070 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - pop {r3, pc} -_02223246: - cmp r0, r1 - ble _02223258 - add r0, r2, #0 - bl sub_020D4070 - neg r0, r0 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - pop {r3, pc} -_02223258: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov12_02223234 - - thumb_func_start ov12_0222325C -ov12_0222325C: ; 0x0222325C - push {r3, r4, r5, lr} - ldr r4, [r0, #0x18] - add r3, r0, #0 - add r4, r4, #4 - str r4, [r0, #0x18] - ldr r5, [r4, #0] - add r4, r4, #4 - add r3, #0x18 - str r4, [r0, #0x18] - cmp r5, r2 - beq _0222327E - cmp r5, r2 - beq _0222327A - bl sub_02022974 -_0222327A: - mov r0, #0 - pop {r3, r4, r5, pc} -_0222327E: - mov r4, #0 - cmp r2, #0 - ble _02223298 -_02223284: - ldr r5, [r0, #0x18] - add r4, r4, #1 - ldr r5, [r5, #0] - str r5, [r1, #0] - ldr r5, [r3, #0] - add r1, r1, #4 - add r5, r5, #4 - str r5, [r3, #0] - cmp r4, r2 - blt _02223284 -_02223298: - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov12_0222325C - - thumb_func_start ov12_0222329C -ov12_0222329C: ; 0x0222329C - push {r3, r4} - add r4, r0, #0 - mov r0, #0x41 - lsl r0, r0, #2 - add r3, r1, r0 - mov r2, #6 -_022232A8: - ldmia r3!, {r0, r1} - stmia r4!, {r0, r1} - sub r2, r2, #1 - bne _022232A8 - ldr r0, [r3, #0] - str r0, [r4, #0] - pop {r3, r4} - bx lr - thumb_func_end ov12_0222329C - - thumb_func_start ov12_022232B8 -ov12_022232B8: ; 0x022232B8 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r1 - add r0, #0xc0 - ldrb r0, [r0] - bx lr - thumb_func_end ov12_022232B8 - - thumb_func_start ov12_022232C4 -ov12_022232C4: ; 0x022232C4 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r1 - add r0, #0xe0 - ldrb r0, [r0] - bx lr - thumb_func_end ov12_022232C4 - - thumb_func_start ov12_022232D0 -ov12_022232D0: ; 0x022232D0 - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #1 - add r0, r2, r0 - add r0, #0xd8 - ldrh r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_022232D0 - - thumb_func_start ov12_022232E0 -ov12_022232E0: ; 0x022232E0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r1 - add r0, #0xe8 - ldrb r0, [r0] - bx lr - thumb_func_end ov12_022232E0 - - thumb_func_start ov12_022232EC -ov12_022232EC: ; 0x022232EC - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - add r0, #0xec - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_022232EC - - thumb_func_start ov12_022232FC -ov12_022232FC: ; 0x022232FC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r4, r1, #2 - add r0, r0, r4 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02223314 - mov r0, #0 - pop {r3, r4, r5, pc} -_02223314: - bl sub_02008B38 - cmp r0, #0 - beq _02223328 - add r5, #0xc0 - ldr r0, [r5, #0] - add r0, r0, r4 - add r0, #0xc4 - ldr r0, [r0, #0] - pop {r3, r4, r5, pc} -_02223328: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_022232FC - - thumb_func_start ov12_0222332C -ov12_0222332C: ; 0x0222332C - add r0, #0xc8 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_0222332C - - thumb_func_start ov12_02223334 -ov12_02223334: ; 0x02223334 - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bx lr - thumb_func_end ov12_02223334 - - thumb_func_start ov12_02223344 -ov12_02223344: ; 0x02223344 - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bx lr - thumb_func_end ov12_02223344 - - thumb_func_start ov12_02223354 -ov12_02223354: ; 0x02223354 - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov12_02223354 - - thumb_func_start ov12_02223364 -ov12_02223364: ; 0x02223364 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, #0xd4 - ldr r1, [r0, #0] - mov r0, #2 - tst r0, r1 - beq _02223376 - mov r0, #1 - bx lr -_02223376: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_02223364 - - thumb_func_start ov12_0222337C -ov12_0222337C: ; 0x0222337C - add r0, #0xc0 - ldr r2, [r0, #0] - lsl r0, r1, #2 - add r0, r2, r0 - add r0, #0xfc - ldr r1, [r0, #0] - ldr r0, _02223398 ; =0x200400C0 - tst r0, r1 - beq _02223392 - mov r0, #1 - bx lr -_02223392: - mov r0, #0 - bx lr - nop -_02223398: .word 0x200400C0 - thumb_func_end ov12_0222337C - - thumb_func_start ov12_0222339C -ov12_0222339C: ; 0x0222339C - push {r3, lr} - bl ov12_0221FDD4 - cmp r0, #1 - bne _022233AA - mov r0, #2 - pop {r3, pc} -_022233AA: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_0222339C - - thumb_func_start ov12_022233B0 -ov12_022233B0: ; 0x022233B0 - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _022233E8 ; =0x02238614 - add r2, sp, #0 - add r5, r0, #0 - add r4, r1, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _022233DC - add r0, sp, #0xc - lsl r1, r4, #2 - add sp, #0x18 - ldr r0, [r0, r1] - pop {r3, r4, r5, pc} -_022233DC: - lsl r1, r4, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_022233E8: .word 0x02238614 - thumb_func_end ov12_022233B0 - - thumb_func_start ov12_022233EC -ov12_022233EC: ; 0x022233EC - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _02223424 ; =0x022385FC - add r2, sp, #0 - add r5, r0, #0 - add r4, r1, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02223418 - add r0, sp, #0xc - lsl r1, r4, #2 - add sp, #0x18 - ldr r0, [r0, r1] - pop {r3, r4, r5, pc} -_02223418: - lsl r1, r4, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_02223424: .word 0x022385FC - thumb_func_end ov12_022233EC - - thumb_func_start ov12_02223428 -ov12_02223428: ; 0x02223428 - push {r3, lr} - cmp r1, #3 - bhi _0222345E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222343A: ; jump table - .short _02223442 - _0222343A - 2 ; case 0 - .short _0222344A - _0222343A - 2 ; case 1 - .short _02223452 - _0222343A - 2 ; case 2 - .short _0222345A - _0222343A - 2 ; case 3 -_02223442: - bl ov12_0221FDD4 - mov r0, #0 - pop {r3, pc} -_0222344A: - bl ov12_0221FDD4 - mov r0, #1 - pop {r3, pc} -_02223452: - bl ov12_0221FDD4 - mov r0, #3 - pop {r3, pc} -_0222345A: - bl ov12_0222339C -_0222345E: - pop {r3, pc} - thumb_func_end ov12_02223428 - - thumb_func_start ov12_02223460 -ov12_02223460: ; 0x02223460 - push {r3, lr} - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - add r0, r2, #0 - add r2, #0xc0 - ldr r3, [r2, #0] - mov r2, #0x11 - add r0, #0xc4 - lsl r2, r2, #4 - lsl r1, r1, #0x18 - ldr r2, [r3, r2] - mov r3, #1 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - lsl r3, r3, #0x10 - bl sub_0201958C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02223460 - - thumb_func_start ov12_02223488 -ov12_02223488: ; 0x02223488 - push {r3, lr} - mov r2, #2 - add r1, r0, #0 - lsl r2, r2, #8 - str r2, [sp] - add r1, #0xc0 - add r0, #0xc8 - ldr r1, [r1, #0] - sub r2, #0xec - ldr r1, [r1, r2] - mov r2, #0 - ldr r0, [r0, #0] - add r3, r2, #0 - bl sub_02002FBC - pop {r3, pc} - thumb_func_end ov12_02223488 - - thumb_func_start ov12_022234A8 -ov12_022234A8: ; 0x022234A8 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl ov12_022210A8 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r0, r0, r4 - add r0, #0xe8 - ldrb r6, [r0] - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _022234DE - add r0, r5, #0 - add r1, r4, #0 - bl ov12_022232D0 - add r1, r6, #0 - bl ov12_022384F0 - cmp r0, #1 - bne _022234DE - mov r0, #1 - pop {r4, r5, r6, pc} -_022234DE: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_022234A8 - - thumb_func_start ov12_022234E4 -ov12_022234E4: ; 0x022234E4 - mov r2, #0x14 - mul r2, r0 - ldr r0, _022234F4 ; =0x02238928 - lsl r1, r1, #2 - add r0, r0, r2 - ldr r0, [r1, r0] - bx lr - nop -_022234F4: .word 0x02238928 - thumb_func_end ov12_022234E4 - - thumb_func_start ov12_022234F8 -ov12_022234F8: ; 0x022234F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x98 - ldr r3, _02223758 ; =0x022385B4 - add r5, r2, #0 - add r2, sp, #0x80 - add r7, r0, #0 - str r1, [sp, #0x18] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp, #0x18] - mov r1, #0x58 - bl sub_02018144 - add r4, r0, #0 - ldr r0, [sp, #0x18] - str r0, [r4, #0] - str r5, [r4, #4] - add r0, r7, #0 - bl ov16_0223E010 - str r0, [r4, #8] - add r0, r7, #0 - bl ov16_0223E018 - str r0, [r4, #0xc] - add r0, r7, #0 - bl ov16_0223E064 - str r0, [r4, #0x10] - mov r6, #0 - add r5, r4, #0 -_0222353E: - mov r0, #0 - str r0, [r5, #0x24] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0223F2AC - str r0, [r5, #0x34] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0222353E - add r1, r4, #0 - add r0, r7, #0 - add r1, #0x44 - bl ov16_0223F87C - add r1, r4, #0 - add r0, r7, #0 - add r1, #0x48 - bl ov16_0223F8AC - ldr r1, [sp, #0x18] - mov r0, #0x1b - bl sub_02006C24 - add r6, r0, #0 - mov r7, #0 - str r4, [sp, #0x1c] -_02223576: - ldr r0, [r4, #4] - cmp r7, r0 - beq _02223580 - cmp r0, #0xff - bne _022235EA -_02223580: - ldr r1, [sp, #0x1c] - ldr r1, [r1, #0x48] - cmp r1, #0 - beq _022235EA - ldr r1, _0222375C ; =0x0000D903 - mov r3, #0x4c - add r2, r7, r1 - ldr r1, _02223760 ; =0x00001388 - mul r1, r0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - add r5, r2, r1 - str r0, [sp, #4] - str r5, [sp, #8] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - add r2, r6, #0 - bl sub_0200CC3C - str r6, [sp] - mov r0, #0x4b - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r5, [sp, #0x14] - ldr r0, [r4, #0x10] - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - mov r1, #2 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - str r5, [sp, #4] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - add r2, r6, #0 - mov r3, #0x4d - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - str r5, [sp, #4] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - add r2, r6, #0 - mov r3, #0x4e - bl sub_0200CE54 -_022235EA: - ldr r0, [sp, #0x1c] - add r7, r7, #1 - add r0, r0, #4 - str r0, [sp, #0x1c] - cmp r7, #4 - blt _02223576 - add r0, r6, #0 - bl sub_02006CA8 - mov r0, #0 - str r0, [sp, #0x2c] - add r7, r4, #0 -_02223602: - ldr r1, [r4, #4] - ldr r0, [sp, #0x2c] - cmp r0, r1 - beq _02223610 - cmp r1, #0xff - beq _02223610 - b _02223744 -_02223610: - ldr r2, _0222375C ; =0x0000D903 - ldr r0, [sp, #0x2c] - add r3, r1, #0 - add r0, r0, r2 - ldr r2, _02223760 ; =0x00001388 - mul r3, r2 - add r1, r0, r3 - str r1, [r7, #0x14] - ldr r1, [r4, #4] - add r3, r1, #0 - mul r3, r2 - add r1, r0, r3 - str r1, [sp, #0x68] - ldr r1, [r4, #4] - add r3, r1, #0 - mul r3, r2 - add r1, r0, r3 - str r1, [sp, #0x6c] - ldr r1, [r4, #4] - add r3, r1, #0 - mul r3, r2 - add r1, r0, r3 - str r1, [sp, #0x70] - ldr r1, [r4, #4] - mul r2, r1 - mov r1, #0 - add r0, r0, r2 - str r0, [sp, #0x74] - str r1, [sp, #0x78] - str r1, [sp, #0x7c] - ldr r2, [r7, #0x34] - ldr r5, [r7, #0x48] - ldr r0, [r2, #4] - cmp r5, #0 - str r0, [sp, #0x28] - ldr r0, [r2, #8] - str r0, [sp, #0x24] - ldr r0, [r2, #0] - str r0, [sp, #0x20] - beq _02223744 - add r0, r5, #0 - bl sub_020080C0 - str r0, [sp, #0x30] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - add r0, r5, #0 - mov r1, #0x29 - bl sub_020080C0 - sub r2, r6, r0 - ldr r0, [sp, #0x30] - add r1, sp, #0x34 - strh r0, [r1] - strh r2, [r1, #2] - mov r0, #0 - strh r0, [r1, #4] - strh r0, [r1, #6] - ldr r1, [sp, #0x2c] - add r3, sp, #0x34 - add r1, r4, r1 - add r1, #0x44 - ldrb r1, [r1] - lsl r2, r1, #2 - add r1, sp, #0x80 - ldr r1, [r1, r2] - str r0, [sp, #0x40] - str r1, [sp, #0x3c] - mov r1, #1 - str r1, [sp, #0x44] - str r1, [sp, #0x60] - str r0, [sp, #0x64] - add r2, sp, #0x68 -_022236AA: - ldr r1, [r2, #0] - add r0, r0, #1 - str r1, [r3, #0x14] - add r2, r2, #4 - add r3, r3, #4 - cmp r0, #6 - blt _022236AA - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - add r2, sp, #0x34 - bl sub_0200CE6C - add r6, r0, #0 - bl sub_0200D330 - str r6, [r7, #0x24] - cmp r5, #0 - bne _022236D8 - add r0, r6, #0 - mov r1, #0 - bl sub_0200D3F4 - b _02223700 -_022236D8: - add r0, r5, #0 - bl sub_02008B38 - cmp r0, #0 - bne _022236EC - add r0, r6, #0 - mov r1, #0 - bl sub_0200D3F4 - b _02223700 -_022236EC: - add r0, r5, #0 - mov r1, #6 - bl sub_020080C0 - cmp r0, #1 - bne _02223700 - add r0, r6, #0 - mov r1, #0 - bl sub_0200D3F4 -_02223700: - cmp r5, #0 - beq _0222371A - ldr r0, [r6, #0] - bl sub_02021F98 - add r1, r0, #0 - mov r3, #0x32 - ldr r1, [r1, #4] - ldr r2, [sp, #0x20] - mov r0, #0x13 - lsl r3, r3, #6 - bl sub_0201DC68 -_0222371A: - cmp r5, #0 - beq _02223744 - ldr r0, [r6, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - mov r1, #2 - str r1, [sp] - mov r1, #0x20 - lsl r0, r0, #0x14 - str r1, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #0x10] - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x24] - ldr r3, [r4, #0] - bl sub_02003050 -_02223744: - ldr r0, [sp, #0x2c] - add r7, r7, #4 - add r0, r0, #1 - str r0, [sp, #0x2c] - cmp r0, #4 - bge _02223752 - b _02223602 -_02223752: - add r0, r4, #0 - add sp, #0x98 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02223758: .word 0x022385B4 -_0222375C: .word 0x0000D903 -_02223760: .word 0x00001388 - thumb_func_end ov12_022234F8 - - thumb_func_start ov12_02223764 -ov12_02223764: ; 0x02223764 - ldr r3, _0222376C ; =ov12_022234F8 - mov r2, #0xff - bx r3 - nop -_0222376C: .word ov12_022234F8 - thumb_func_end ov12_02223764 - - thumb_func_start ov12_02223770 -ov12_02223770: ; 0x02223770 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 -_02223778: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _02223794 - ldr r0, [r5, #0xc] - ldr r1, [r4, #0x14] - bl sub_0200D070 - ldr r0, [r5, #0xc] - ldr r1, [r4, #0x14] - bl sub_0200D080 - ldr r0, [r4, #0x24] - bl sub_0200D0F4 -_02223794: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _02223778 - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02223770 - - thumb_func_start ov12_022237A4 -ov12_022237A4: ; 0x022237A4 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 -_022237AC: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _022237C8 - ldr r0, [r5, #0xc] - ldr r1, [r4, #0x14] - bl sub_0200D070 - ldr r0, [r5, #0xc] - ldr r1, [r4, #0x14] - bl sub_0200D080 - ldr r0, [r4, #0x24] - bl sub_0200D0F4 -_022237C8: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _022237AC - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov12_022237A4 - - thumb_func_start ov12_022237D8 -ov12_022237D8: ; 0x022237D8 - push {r4, lr} - add r4, r0, #0 - bne _022237E2 - bl sub_02022974 -_022237E2: - ldr r0, [r4, #4] - add r0, r4, r0 - add r0, #0x44 - ldrb r0, [r0] - pop {r4, pc} - thumb_func_end ov12_022237D8 - - thumb_func_start ov12_022237EC -ov12_022237EC: ; 0x022237EC - bx lr - ; .align 2, 0 - thumb_func_end ov12_022237EC - - thumb_func_start ov12_022237F0 -ov12_022237F0: ; 0x022237F0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - bl ov11_0221F840 - add r4, r0, #0 - mov r0, #0x1d - add r1, r6, #0 - add r2, r5, #0 - bl sub_020144C4 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0xa - add r3, r7, #0 - bl sub_020144CC - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022237F0 - - thumb_func_start ov12_02223818 -ov12_02223818: ; 0x02223818 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - bl ov11_0221F840 - add r4, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_020144C4 - add r1, r0, #0 - ldr r3, [sp] - add r0, r4, #0 - mov r2, #0xa - bl sub_020144CC - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02223818 - - thumb_func_start ov12_02223844 -ov12_02223844: ; 0x02223844 - ldr r3, _02223848 ; =sub_02006CB8 - bx r3 - ; .align 2, 0 -_02223848: .word sub_02006CB8 - thumb_func_end ov12_02223844 - - thumb_func_start ov12_0222384C -ov12_0222384C: ; 0x0222384C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r7, r2, #0 - str r3, [sp] - bl ov11_0221F888 - add r4, r0, #0 - bne _02223864 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02223864: - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov12_02223844 - add r1, r0, #0 - ldr r3, [sp] - add r0, r4, #0 - mov r2, #0xa - bl sub_020144CC - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_0222384C - - thumb_func_start ov12_02223880 -ov12_02223880: ; 0x02223880 - push {r4, lr} - lsl r4, r2, #2 - ldr r2, _02223890 ; =0x02238DB0 - ldr r2, [r2, r4] - bl sub_020146F4 - pop {r4, pc} - nop -_02223890: .word 0x02238DB0 - thumb_func_end ov12_02223880 - - thumb_func_start ov12_02223894 -ov12_02223894: ; 0x02223894 - ldr r3, _02223898 ; =ov11_0221F8D8 - bx r3 - ; .align 2, 0 -_02223898: .word ov11_0221F8D8 - thumb_func_end ov12_02223894 - - thumb_func_start ov12_0222389C -ov12_0222389C: ; 0x0222389C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r2, #0 - mov r4, #1 - bl ov12_02235254 - add r5, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov12_02235254 - cmp r5, #5 - bhi _022238D8 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022238C2: ; jump table - .short _022238D8 - _022238C2 - 2 ; case 0 - .short _022238CE - _022238C2 - 2 ; case 1 - .short _022238D8 - _022238C2 - 2 ; case 2 - .short _022238D2 - _022238C2 - 2 ; case 3 - .short _022238D8 - _022238C2 - 2 ; case 4 - .short _022238D6 - _022238C2 - 2 ; case 5 -_022238CE: - sub r4, r4, #2 - b _022238D8 -_022238D2: - sub r4, r4, #2 - b _022238D8 -_022238D6: - sub r4, r4, #2 -_022238D8: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_0222389C - - thumb_func_start ov12_022238DC -ov12_022238DC: ; 0x022238DC - bx lr - ; .align 2, 0 - thumb_func_end ov12_022238DC - - thumb_func_start ov12_022238E0 -ov12_022238E0: ; 0x022238E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - bl sub_02014764 - add r4, r0, #0 - bl ov12_02220240 - add r0, r4, #0 - bl ov12_02220248 - add r0, r4, #0 - bl ov12_02220250 - add r6, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov12_0223525C - cmp r0, #3 - bne _02223916 - add r0, r4, #0 - mov r1, #1 - add r2, sp, #0x28 - bl ov12_02235508 - b _0222394E -_02223916: - add r0, r4, #0 - mov r1, #1 - bl ov12_02235254 - str r0, [sp] - bl ov12_02235310 - str r0, [sp, #4] - add r0, r6, #0 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r4, r0, #0 - ldr r0, [sp, #4] - add r1, sp, #0x28 - add r2, r4, #0 - add r3, r7, #0 - bl ov12_02235448 - ldr r0, [sp] - add r1, sp, #0x1c - add r2, r4, #0 - add r3, r7, #0 - bl ov12_02235448 -_0222394E: - ldr r0, [r5, #0x20] - ldr r1, [sp, #0x28] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0x2c] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0x30] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - mov r0, #1 - add r1, sp, #0x10 - bl ov12_02235760 - add r0, r6, #0 - bl sub_02014784 - add r4, r0, #0 - add r0, sp, #8 - add r1, r4, #0 - bl sub_02020A94 - add r0, sp, #8 - add r1, r4, #0 - bl sub_020209D4 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022238E0 - - thumb_func_start ov12_02223998 -ov12_02223998: ; 0x02223998 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - bl sub_02014764 - add r4, r0, #0 - bl ov12_02220248 - add r6, r0, #0 - add r0, r4, #0 - bl ov12_02220250 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #0 - add r2, sp, #0xc - bl ov12_02235508 - ldr r0, [r5, #0x20] - ldr r1, [sp, #0xc] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0x10] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0x14] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add r0, r6, #0 - add r1, sp, #0 - bl ov12_02235760 - add r0, r7, #0 - add r1, sp, #0 - bl sub_02014744 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02223998 - - thumb_func_start ov12_022239F4 -ov12_022239F4: ; 0x022239F4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - bl sub_02014764 - add r5, r0, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - add r2, sp, #0 - bl ov12_02235508 - ldr r0, [r4, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r4, #0x30] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022239F4 - - thumb_func_start ov12_02223A38 -ov12_02223A38: ; 0x02223A38 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - bl sub_02014764 - add r5, r0, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - add r2, sp, #0 - bl ov12_02235508 - ldr r0, [r4, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r4, #0x30] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02223A38 - - thumb_func_start ov12_02223A7C -ov12_02223A7C: ; 0x02223A7C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02014764 - add r4, r0, #0 - bl ov12_02220240 - add r6, r0, #0 - add r0, r4, #0 - bl ov12_02220248 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0 - bl ov12_02235508 - ldr r0, [r5, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02223A7C - - thumb_func_start ov12_02223AC8 -ov12_02223AC8: ; 0x02223AC8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02014764 - add r6, r0, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_0223525C - cmp r0, #3 - beq _02223AF4 - mov r4, #1 - b _02223AF6 -_02223AF4: - mov r4, #0 -_02223AF6: - add r0, r6, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r4, #0 - add r1, sp, #0 - add r3, r7, #0 - bl ov12_02235448 - ldr r0, [r5, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_02223AC8 - - thumb_func_start ov12_02223B30 -ov12_02223B30: ; 0x02223B30 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02014764 - add r6, r0, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_0223525C - cmp r0, #3 - beq _02223B5C - mov r4, #1 - b _02223B5E -_02223B5C: - mov r4, #0 -_02223B5E: - add r0, r6, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r4, #0 - add r1, sp, #0 - add r3, r7, #0 - bl ov12_02235448 - ldr r0, [r5, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_02223B30 - - thumb_func_start ov12_02223B98 -ov12_02223B98: ; 0x02223B98 - push {r4, r5, r6, r7, lr} - sub sp, #0x9c - add r5, r0, #0 - add r1, sp, #0 - mov r0, #0 - strh r0, [r1] - strh r0, [r1, #2] - strh r0, [r1, #4] - strh r0, [r1, #6] - strh r0, [r1, #8] - strh r0, [r1, #0xa] - ldr r3, _02223C38 ; =0x02238E0C - add r2, sp, #0x54 - mov r1, #0x24 -_02223BB4: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _02223BB4 - ldr r3, _02223C3C ; =0x02238E54 - add r2, sp, #0xc - mov r1, #0x24 -_02223BC6: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _02223BC6 - bl sub_02014764 - add r4, r0, #0 - bl ov12_02220240 - add r6, r0, #0 - add r0, r4, #0 - bl ov12_02220248 - add r7, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov12_02235254 - add r6, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov12_02235254 - lsl r2, r0, #1 - mov r0, #0xc - add r1, r6, #0 - mul r1, r0 - add r0, sp, #0x54 - add r0, r0, r1 - ldrsh r4, [r2, r0] - mov r3, #0xac - add r0, r4, #0 - ldr r4, [r5, #0x20] - mul r0, r3 - ldr r4, [r4, #0] - ldr r4, [r4, #4] - add r0, r0, r4 - str r0, [r5, #0x28] - add r0, sp, #0xc - add r0, r0, r1 - ldrsh r0, [r2, r0] - add r1, r0, #0 - ldr r0, [r5, #0x20] - mul r1, r3 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - str r0, [r5, #0x30] - add sp, #0x9c - pop {r4, r5, r6, r7, pc} - nop -_02223C38: .word 0x02238E0C -_02223C3C: .word 0x02238E54 - thumb_func_end ov12_02223B98 - - thumb_func_start ov12_02223C40 -ov12_02223C40: ; 0x02223C40 - push {r3, r4} - add r3, r2, #0 - add r3, #8 - cmp r0, #7 - bhi _02223CD0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02223C56: ; jump table - .short _02223CD0 - _02223C56 - 2 ; case 0 - .short _02223C66 - _02223C56 - 2 ; case 1 - .short _02223C70 - _02223C56 - 2 ; case 2 - .short _02223C7A - _02223C56 - 2 ; case 3 - .short _02223C84 - _02223C56 - 2 ; case 4 - .short _02223C96 - _02223C56 - 2 ; case 5 - .short _02223CA8 - _02223C56 - 2 ; case 6 - .short _02223CBA - _02223C56 - 2 ; case 7 -_02223C66: - ldr r0, [r2, #0] - mul r1, r0 - str r1, [r2, #0] - pop {r3, r4} - bx lr -_02223C70: - ldr r0, [r2, #4] - mul r1, r0 - str r1, [r2, #4] - pop {r3, r4} - bx lr -_02223C7A: - ldr r0, [r3, #0] - mul r1, r0 - str r1, [r3, #0] - pop {r3, r4} - bx lr -_02223C84: - ldr r0, [r2, #0] - add r3, r0, #0 - mul r3, r1 - str r3, [r2, #0] - ldr r0, [r2, #4] - mul r1, r0 - str r1, [r2, #4] - pop {r3, r4} - bx lr -_02223C96: - ldr r0, [r2, #0] - add r4, r0, #0 - mul r4, r1 - str r4, [r2, #0] - ldr r0, [r3, #0] - mul r1, r0 - str r1, [r3, #0] - pop {r3, r4} - bx lr -_02223CA8: - ldr r0, [r2, #4] - add r4, r0, #0 - mul r4, r1 - str r4, [r2, #4] - ldr r0, [r3, #0] - mul r1, r0 - str r1, [r3, #0] - pop {r3, r4} - bx lr -_02223CBA: - ldr r0, [r2, #0] - add r4, r0, #0 - mul r4, r1 - str r4, [r2, #0] - ldr r0, [r2, #4] - add r4, r0, #0 - mul r4, r1 - str r4, [r2, #4] - ldr r0, [r3, #0] - mul r1, r0 - str r1, [r3, #0] -_02223CD0: - pop {r3, r4} - bx lr - thumb_func_end ov12_02223C40 - - thumb_func_start ov12_02223CD4 -ov12_02223CD4: ; 0x02223CD4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r2, #0 - add r5, r1, #0 - add r1, r3, #0 - add r7, sp, #0x10 - mov r2, #0 - str r2, [r7, #0] - ldr r3, [sp, #0x30] - str r2, [r7, #4] - ldr r4, [sp, #0x38] - str r2, [r7, #8] - cmp r3, #5 - bhi _02223D7E - add r3, r3, r3 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_02223CFC: ; jump table - .short _02223D7E - _02223CFC - 2 ; case 0 - .short _02223D08 - _02223CFC - 2 ; case 1 - .short _02223D2E - _02223CFC - 2 ; case 2 - .short _02223D42 - _02223CFC - 2 ; case 3 - .short _02223D4A - _02223CFC - 2 ; case 4 - .short _02223D54 - _02223CFC - 2 ; case 5 -_02223D08: - add r0, r5, #0 - add r1, r7, #0 - bl sub_02014988 - add r1, sp, #0x20 - mov r0, #0x14 - ldrsb r0, [r1, r0] - ldr r1, [sp, #0x10] - add r2, r1, #0 - mul r2, r0 - ldr r1, [sp, #0x14] - str r2, [sp, #0x10] - add r2, r1, #0 - mul r2, r0 - ldr r1, [sp, #0x18] - str r2, [sp, #0x14] - mul r0, r1 - str r0, [sp, #0x18] - b _02223D7E -_02223D2E: - str r2, [sp, #0x10] - add r1, sp, #0x20 - mov r0, #0x14 - ldrsb r1, [r1, r0] - mov r0, #0x32 - lsl r0, r0, #6 - mul r0, r1 - str r0, [sp, #0x14] - str r2, [sp, #0x18] - b _02223D7E -_02223D42: - add r2, r7, #0 - bl ov12_02235508 - b _02223D7E -_02223D4A: - add r1, r6, #0 - add r2, r7, #0 - bl ov12_02235508 - b _02223D7E -_02223D54: - add r1, sp, #0 - str r2, [r1, #0] - str r2, [r1, #4] - str r2, [r1, #8] - str r2, [r1, #0xc] - mov r2, #4 - bl ov12_0222325C - ldr r0, [sp] - add r2, sp, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - mov r1, #0x14 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - str r0, [sp, #0x18] - ldrsb r1, [r2, r1] - ldr r0, [sp, #0xc] - add r2, r7, #0 - bl ov12_02223C40 -_02223D7E: - ldr r1, [sp, #0x10] - ldr r0, [r4, #0] - sub r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [r4, #4] - sub r0, r1, r0 - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [r4, #8] - sub r0, r1, r0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #0x10 - bl sub_02014970 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02223CD4 - - thumb_func_start ov12_02223DA4 -ov12_02223DA4: ; 0x02223DA4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r2, #0 - add r5, r1, #0 - add r1, r3, #0 - add r7, sp, #0x10 - mov r2, #0 - str r2, [r7, #0] - ldr r3, [sp, #0x30] - str r2, [r7, #4] - ldr r4, [sp, #0x38] - str r2, [r7, #8] - cmp r3, #5 - bhi _02223E4E - add r3, r3, r3 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_02223DCC: ; jump table - .short _02223E4E - _02223DCC - 2 ; case 0 - .short _02223DD8 - _02223DCC - 2 ; case 1 - .short _02223DFE - _02223DCC - 2 ; case 2 - .short _02223E12 - _02223DCC - 2 ; case 3 - .short _02223E1A - _02223DCC - 2 ; case 4 - .short _02223E24 - _02223DCC - 2 ; case 5 -_02223DD8: - add r0, r5, #0 - add r1, r7, #0 - bl sub_020148A8 - add r1, sp, #0x20 - mov r0, #0x14 - ldrsb r0, [r1, r0] - ldr r1, [sp, #0x10] - add r2, r1, #0 - mul r2, r0 - ldr r1, [sp, #0x14] - str r2, [sp, #0x10] - add r2, r1, #0 - mul r2, r0 - ldr r1, [sp, #0x18] - str r2, [sp, #0x14] - mul r0, r1 - str r0, [sp, #0x18] - b _02223E4E -_02223DFE: - str r2, [sp, #0x10] - add r1, sp, #0x20 - mov r0, #0x14 - ldrsb r1, [r1, r0] - mov r0, #0x32 - lsl r0, r0, #6 - mul r0, r1 - str r0, [sp, #0x14] - str r2, [sp, #0x18] - b _02223E4E -_02223E12: - add r2, r7, #0 - bl ov12_02235508 - b _02223E4E -_02223E1A: - add r1, r6, #0 - add r2, r7, #0 - bl ov12_02235508 - b _02223E4E -_02223E24: - add r1, sp, #0 - str r2, [r1, #0] - str r2, [r1, #4] - str r2, [r1, #8] - str r2, [r1, #0xc] - mov r2, #4 - bl ov12_0222325C - ldr r0, [sp] - add r2, sp, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - mov r1, #0x14 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - str r0, [sp, #0x18] - ldrsb r1, [r2, r1] - ldr r0, [sp, #0xc] - add r2, r7, #0 - bl ov12_02223C40 -_02223E4E: - ldr r1, [sp, #0x10] - ldr r0, [r4, #0] - sub r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [r4, #4] - sub r0, r1, r0 - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [r4, #8] - sub r0, r1, r0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #0x10 - bl sub_02014890 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02223DA4 - - thumb_func_start ov12_02223E74 -ov12_02223E74: ; 0x02223E74 - push {r4, r5, r6, r7, lr} - sub sp, #0x94 - add r6, r0, #0 - add r7, r2, #0 - add r4, r1, #0 - str r3, [sp, #0xc] - bl ov12_02220250 - add r0, r6, #0 - add r1, r7, #0 - bl ov12_02235254 - str r0, [sp, #0x10] - ldr r1, [sp, #0xc] - add r0, r6, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r6, #0 - add r1, sp, #0x7c - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, sp, #0x70 - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, sp, #0x58 - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, sp, #0x64 - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, sp, #0x40 - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, sp, #0x34 - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, sp, #0x4c - mov r2, #3 - bl ov12_0222325C - ldr r0, [sp, #0x10] - cmp r0, #5 - bhi _02223EFC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02223EF0: ; jump table - .short _02223EFC - _02223EF0 - 2 ; case 0 - .short _02223F0C - _02223EF0 - 2 ; case 1 - .short _02223F22 - _02223EF0 - 2 ; case 2 - .short _02223F56 - _02223EF0 - 2 ; case 3 - .short _02223FA0 - _02223EF0 - 2 ; case 4 - .short _02223FD4 - _02223EF0 - 2 ; case 5 -_02223EFC: - ldr r1, [sp, #0x7c] - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x80] - strh r1, [r0, #2] - ldr r1, [sp, #0x84] - strh r1, [r0, #4] - b _0222401C -_02223F0C: - ldr r0, [sp, #0x7c] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x80] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x84] - neg r1, r1 - strh r1, [r0, #4] - b _0222401C -_02223F22: - cmp r5, #3 - add r0, sp, #0x14 - bne _02223F36 - ldr r1, [sp, #0x70] - strh r1, [r0] - ldr r1, [sp, #0x74] - strh r1, [r0, #2] - ldr r1, [sp, #0x78] - strh r1, [r0, #4] - b _0222401C -_02223F36: - cmp r5, #5 - bne _02223F48 - ldr r1, [sp, #0x58] - strh r1, [r0] - ldr r1, [sp, #0x5c] - strh r1, [r0, #2] - ldr r1, [sp, #0x60] - strh r1, [r0, #4] - b _0222401C -_02223F48: - ldr r1, [sp, #0x64] - strh r1, [r0] - ldr r1, [sp, #0x68] - strh r1, [r0, #2] - ldr r1, [sp, #0x6c] - strh r1, [r0, #4] - b _0222401C -_02223F56: - cmp r5, #2 - bne _02223F70 - ldr r0, [sp, #0x70] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x74] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x78] - neg r1, r1 - strh r1, [r0, #4] - b _0222401C -_02223F70: - cmp r5, #5 - bne _02223F8A - ldr r0, [sp, #0x64] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x68] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x6c] - neg r1, r1 - strh r1, [r0, #4] - b _0222401C -_02223F8A: - ldr r0, [sp, #0x40] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x44] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x48] - neg r1, r1 - strh r1, [r0, #4] - b _0222401C -_02223FA0: - cmp r5, #3 - add r0, sp, #0x14 - bne _02223FB4 - ldr r1, [sp, #0x40] - strh r1, [r0] - ldr r1, [sp, #0x44] - strh r1, [r0, #2] - ldr r1, [sp, #0x48] - strh r1, [r0, #4] - b _0222401C -_02223FB4: - cmp r5, #5 - bne _02223FC6 - ldr r1, [sp, #0x34] - strh r1, [r0] - ldr r1, [sp, #0x38] - strh r1, [r0, #2] - ldr r1, [sp, #0x3c] - strh r1, [r0, #4] - b _0222401C -_02223FC6: - ldr r1, [sp, #0x4c] - strh r1, [r0] - ldr r1, [sp, #0x50] - strh r1, [r0, #2] - ldr r1, [sp, #0x54] - strh r1, [r0, #4] - b _0222401C -_02223FD4: - cmp r5, #3 - bne _02223FEE - ldr r0, [sp, #0x4c] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x50] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x54] - neg r1, r1 - strh r1, [r0, #4] - b _0222401C -_02223FEE: - cmp r5, #2 - bne _02224008 - ldr r0, [sp, #0x58] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x5c] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x60] - neg r1, r1 - strh r1, [r0, #4] - b _0222401C -_02224008: - ldr r0, [sp, #0x34] - neg r1, r0 - add r0, sp, #0x14 - strh r1, [r0] - ldr r1, [sp, #0x38] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x3c] - neg r1, r1 - strh r1, [r0, #4] -_0222401C: - ldr r2, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - bl ov12_0222389C - add r5, r0, #0 - add r1, sp, #0x28 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r6, #0 - mov r2, #3 - bl ov12_0222325C - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #0x1c - bl ov12_02235508 - ldr r0, [sp, #0x28] - cmp r0, #0 - bne _02224088 - ldr r0, [sp, #0x2c] - cmp r0, #0 - bne _02224088 - ldr r0, [sp, #0x30] - cmp r0, #0 - bne _02224088 - add r3, sp, #0x1c - ldmia r3!, {r0, r1} - add r2, sp, #0x88 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [r4, #0x20] - ldr r0, [sp, #0x1c] - ldr r1, [r1, #0] - ldr r1, [r1, #4] - add r0, r0, r1 - str r0, [r4, #0x28] - ldr r1, [r4, #0x20] - ldr r0, [sp, #0x20] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r0, r0, r1 - str r0, [r4, #0x2c] - ldr r1, [r4, #0x20] - ldr r0, [sp, #0x24] - ldr r1, [r1, #0] - ldr r1, [r1, #0xc] - add r0, r0, r1 - str r0, [r4, #0x30] - b _022240DC -_02224088: - ldr r2, [sp, #0x28] - ldr r1, [sp, #0x2c] - ldr r0, [sp, #0x30] - str r2, [sp, #0x88] - str r1, [sp, #0x8c] - str r0, [sp, #0x90] - cmp r2, #0 - bne _022240A2 - mov r0, #0x32 - lsl r0, r0, #6 - cmp r1, r0 - bne _022240A2 - mov r5, #1 -_022240A2: - ldr r1, [sp, #0x88] - add r0, r1, #0 - ldr r1, [sp, #0x8c] - mul r0, r5 - add r2, r1, #0 - mul r2, r5 - ldr r1, [sp, #0x24] - str r2, [sp, #0x8c] - add r2, r1, #0 - mul r2, r5 - str r0, [sp, #0x88] - str r2, [sp, #0x90] - ldr r1, [r4, #0x20] - ldr r1, [r1, #0] - ldr r1, [r1, #4] - add r0, r0, r1 - str r0, [r4, #0x28] - ldr r1, [r4, #0x20] - ldr r0, [sp, #0x8c] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r0, r0, r1 - str r0, [r4, #0x2c] - ldr r1, [r4, #0x20] - ldr r0, [sp, #0x90] - ldr r1, [r1, #0] - ldr r1, [r1, #0xc] - add r0, r0, r1 - str r0, [r4, #0x30] -_022240DC: - ldr r0, [sp, #0xa8] - cmp r0, #0 - beq _0222411A - cmp r0, #1 - beq _022240EC - cmp r0, #2 - beq _02224104 - b _0222411A -_022240EC: - ldr r0, [sp, #0xac] - ldr r3, [sp, #0xc] - str r0, [sp] - str r5, [sp, #4] - add r0, sp, #0x88 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov12_02223CD4 - b _0222411A -_02224104: - ldr r0, [sp, #0xac] - ldr r3, [sp, #0xc] - str r0, [sp] - str r5, [sp, #4] - add r0, sp, #0x88 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov12_02223DA4 -_0222411A: - add r1, sp, #0x14 - ldrh r2, [r1] - add r0, r4, #0 - add r0, #0x50 - strh r2, [r0] - add r0, r4, #0 - ldrh r2, [r1, #2] - add r0, #0x52 - add r4, #0x54 - strh r2, [r0] - ldrh r0, [r1, #4] - strh r0, [r4] - add sp, #0x94 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02223E74 - - thumb_func_start ov12_02224138 -ov12_02224138: ; 0x02224138 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - bl sub_02014764 - add r6, r0, #0 - bl ov12_02220240 - str r0, [sp, #8] - add r0, r6, #0 - bl ov12_02220248 - add r3, r0, #0 - str r5, [sp] - ldr r2, [sp, #8] - add r0, r6, #0 - add r1, r7, #0 - str r4, [sp, #4] - bl ov12_02223E74 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_02224138 - - thumb_func_start ov12_02224168 -ov12_02224168: ; 0x02224168 - ldr r3, _02224170 ; =ov12_02224138 - mov r1, #0 - add r2, r1, #0 - bx r3 - ; .align 2, 0 -_02224170: .word ov12_02224138 - thumb_func_end ov12_02224168 - - thumb_func_start ov12_02224174 -ov12_02224174: ; 0x02224174 - ldr r3, _0222417C ; =ov12_02224138 - mov r1, #1 - add r2, r1, #0 - bx r3 - ; .align 2, 0 -_0222417C: .word ov12_02224138 - thumb_func_end ov12_02224174 - - thumb_func_start ov12_02224180 -ov12_02224180: ; 0x02224180 - ldr r3, _02224188 ; =ov12_02224138 - mov r1, #1 - mov r2, #2 - bx r3 - ; .align 2, 0 -_02224188: .word ov12_02224138 - thumb_func_end ov12_02224180 - - thumb_func_start ov12_0222418C -ov12_0222418C: ; 0x0222418C - ldr r3, _02224194 ; =ov12_02224138 - mov r1, #1 - mov r2, #3 - bx r3 - ; .align 2, 0 -_02224194: .word ov12_02224138 - thumb_func_end ov12_0222418C - - thumb_func_start ov12_02224198 -ov12_02224198: ; 0x02224198 - ldr r3, _022241A0 ; =ov12_02224138 - mov r1, #1 - mov r2, #4 - bx r3 - ; .align 2, 0 -_022241A0: .word ov12_02224138 - thumb_func_end ov12_02224198 - - thumb_func_start ov12_022241A4 -ov12_022241A4: ; 0x022241A4 - ldr r3, _022241AC ; =ov12_02224138 - mov r1, #1 - mov r2, #5 - bx r3 - ; .align 2, 0 -_022241AC: .word ov12_02224138 - thumb_func_end ov12_022241A4 - - thumb_func_start ov12_022241B0 -ov12_022241B0: ; 0x022241B0 - ldr r3, _022241B8 ; =ov12_02224138 - mov r1, #2 - mov r2, #1 - bx r3 - ; .align 2, 0 -_022241B8: .word ov12_02224138 - thumb_func_end ov12_022241B0 - - thumb_func_start ov12_022241BC -ov12_022241BC: ; 0x022241BC - ldr r3, _022241C4 ; =ov12_02224138 - mov r1, #2 - add r2, r1, #0 - bx r3 - ; .align 2, 0 -_022241C4: .word ov12_02224138 - thumb_func_end ov12_022241BC - - thumb_func_start ov12_022241C8 -ov12_022241C8: ; 0x022241C8 - ldr r3, _022241D0 ; =ov12_02224138 - mov r1, #2 - mov r2, #3 - bx r3 - ; .align 2, 0 -_022241D0: .word ov12_02224138 - thumb_func_end ov12_022241C8 - - thumb_func_start ov12_022241D4 -ov12_022241D4: ; 0x022241D4 - ldr r3, _022241DC ; =ov12_02224138 - mov r1, #2 - mov r2, #4 - bx r3 - ; .align 2, 0 -_022241DC: .word ov12_02224138 - thumb_func_end ov12_022241D4 - - thumb_func_start ov12_022241E0 -ov12_022241E0: ; 0x022241E0 - ldr r3, _022241E8 ; =ov12_02224138 - mov r1, #2 - mov r2, #5 - bx r3 - ; .align 2, 0 -_022241E8: .word ov12_02224138 - thumb_func_end ov12_022241E0 - - thumb_func_start ov12_022241EC -ov12_022241EC: ; 0x022241EC - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - bl sub_02014764 - add r4, r0, #0 - bl ov12_02220240 - add r6, r0, #0 - add r0, r4, #0 - bl ov12_02220248 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r0, r4, #0 - add r1, r5, #0 - add r3, r6, #0 - bl ov12_02223E74 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_022241EC - - thumb_func_start ov12_0222421C -ov12_0222421C: ; 0x0222421C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0x14] - add r5, r0, #0 - cmp r2, #0 - beq _0222422C - bl ov12_022242E0 -_0222422C: - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _0222423A - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02224614 -_0222423A: - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _02224248 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02224E74 -_02224248: - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02224EA8 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0222425E - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02224EB8 -_0222425E: - pop {r3, r4, r5, pc} - thumb_func_end ov12_0222421C - - thumb_func_start ov12_02224260 -ov12_02224260: ; 0x02224260 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [r1, #0] - add r6, r2, #0 - add r0, r4, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r4, #0 - bl ov12_0223525C - cmp r0, #3 - beq _02224288 - mov r5, #1 - b _0222428A -_02224288: - mov r5, #0 -_0222428A: - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235448 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02224260 - - thumb_func_start ov12_022242A0 -ov12_022242A0: ; 0x022242A0 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [r1, #0] - add r6, r2, #0 - add r0, r4, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r4, #0 - bl ov12_0223525C - cmp r0, #3 - beq _022242C8 - mov r5, #1 - b _022242CA -_022242C8: - mov r5, #0 -_022242CA: - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235448 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022242A0 - - thumb_func_start ov12_022242E0 -ov12_022242E0: ; 0x022242E0 - push {r3, r4, r5, r6, lr} - sub sp, #0xbc - add r4, r1, #0 - ldr r2, [r4, #0x14] - add r5, r0, #0 - cmp r2, #0x64 - bgt _02224348 - blt _022242F2 - b _022244BC -_022242F2: - cmp r2, #0x22 - bhi _0222434E - add r3, r2, r2 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_02224302: ; jump table - .short _022245C6 - _02224302 - 2 ; case 0 - .short _02224350 - _02224302 - 2 ; case 1 - .short _0222435C - _02224302 - 2 ; case 2 - .short _02224458 - _02224302 - 2 ; case 3 - .short _02224494 - _02224302 - 2 ; case 4 - .short _022244A8 - _02224302 - 2 ; case 5 - .short _02224368 - _02224302 - 2 ; case 6 - .short _02224374 - _02224302 - 2 ; case 7 - .short _02224440 - _02224302 - 2 ; case 8 - .short _0222444C - _02224302 - 2 ; case 9 - .short _02224380 - _02224302 - 2 ; case 10 - .short _0222438C - _02224302 - 2 ; case 11 - .short _022244E8 - _02224302 - 2 ; case 12 - .short _022244F8 - _02224302 - 2 ; case 13 - .short _02224398 - _02224302 - 2 ; case 14 - .short _022243A4 - _02224302 - 2 ; case 15 - .short _022243B0 - _02224302 - 2 ; case 16 - .short _022243BC - _02224302 - 2 ; case 17 - .short _022243C8 - _02224302 - 2 ; case 18 - .short _022243D4 - _02224302 - 2 ; case 19 - .short _022243E0 - _02224302 - 2 ; case 20 - .short _022243EC - _02224302 - 2 ; case 21 - .short _022243F8 - _02224302 - 2 ; case 22 - .short _02224404 - _02224302 - 2 ; case 23 - .short _02224410 - _02224302 - 2 ; case 24 - .short _0222441C - _02224302 - 2 ; case 25 - .short _02224428 - _02224302 - 2 ; case 26 - .short _02224434 - _02224302 - 2 ; case 27 - .short _02224508 - _02224302 - 2 ; case 28 - .short _022245C6 - _02224302 - 2 ; case 29 - .short _02224558 - _02224302 - 2 ; case 30 - .short _0222452E - _02224302 - 2 ; case 31 - .short _02224590 - _02224302 - 2 ; case 32 - .short _02224514 - _02224302 - 2 ; case 33 - .short _02224522 - _02224302 - 2 ; case 34 -_02224348: - cmp r2, #0x65 - bne _0222434E - b _022244D2 -_0222434E: - b _022245C6 -_02224350: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235508 - b _022245C6 -_0222435C: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235508 - b _022245C6 -_02224368: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235538 - b _022245C6 -_02224374: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235538 - b _022245C6 -_02224380: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235568 - b _022245C6 -_0222438C: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235568 - b _022245C6 -_02224398: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235598 - b _022245C6 -_022243A4: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235598 - b _022245C6 -_022243B0: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_022355C8 - b _022245C6 -_022243BC: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_022355C8 - b _022245C6 -_022243C8: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_022355F8 - b _022245C6 -_022243D4: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_022355F8 - b _022245C6 -_022243E0: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235628 - b _022245C6 -_022243EC: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235628 - b _022245C6 -_022243F8: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235658 - b _022245C6 -_02224404: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235658 - b _022245C6 -_02224410: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235688 - b _022245C6 -_0222441C: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235688 - b _022245C6 -_02224428: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_022356B8 - b _022245C6 -_02224434: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_022356B8 - b _022245C6 -_02224440: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235718 - b _022245C6 -_0222444C: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235718 - b _022245C6 -_02224458: - ldr r0, [r4, #0] - add r1, sp, #0xa0 - mov r2, #4 - bl ov12_0222325C - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #0xa4] - str r0, [sp, #0xb0] - ldr r0, [sp, #0xa8] - str r0, [sp, #0xb4] - ldr r0, [sp, #0xac] - str r0, [sp, #0xb8] - ldr r0, [sp, #0xa0] - cmp r0, #1 - bne _02224480 - mov r0, #1 - strb r0, [r4, #8] -_02224480: - mov r0, #8 - ldrsb r1, [r4, r0] - ldr r2, [sp, #0xb0] - mul r1, r2 - str r1, [sp, #0xb0] - ldrsb r0, [r4, r0] - ldr r1, [sp, #0xb4] - mul r0, r1 - str r0, [sp, #0xb4] - b _022245C6 -_02224494: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235508 - add r0, r4, #0 - add r1, sp, #0xb0 - bl ov12_02225094 - b _022245C6 -_022244A8: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235508 - add r0, r4, #0 - add r1, sp, #0xb0 - bl ov12_02225094 - b _022245C6 -_022244BC: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235508 - ldr r1, [r4, #0x24] - add r0, r4, #0 - add r2, sp, #0xb0 - bl ov12_02225008 - b _022245C6 -_022244D2: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0xb0 - bl ov12_02235508 - ldr r1, [r4, #0x28] - add r0, r4, #0 - add r2, sp, #0xb0 - bl ov12_02225008 - b _022245C6 -_022244E8: - add r2, sp, #0xb0 - bl ov12_022242A0 - add r0, r4, #0 - add r1, sp, #0xb0 - bl ov12_02225094 - b _022245C6 -_022244F8: - add r2, sp, #0xb0 - bl ov12_02224260 - add r0, r4, #0 - add r1, sp, #0xb0 - bl ov12_02225094 - b _022245C6 -_02224508: - ldr r0, _022245FC ; =0x00002CE0 - str r0, [sp, #0xb0] - mov r0, #0 - str r0, [sp, #0xb4] - str r0, [sp, #0xb8] - b _022245C6 -_02224514: - ldr r0, _02224600 ; =0xFFFFEC78 - str r0, [sp, #0xb0] - ldr r0, _02224604 ; =0xFFFFE890 - str r0, [sp, #0xb4] - mov r0, #0 - str r0, [sp, #0xb8] - b _022245C6 -_02224522: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0xb0 - bl ov12_02235508 - b _022245C6 -_0222452E: - ldr r6, _02224608 ; =0x02238EAC - add r3, sp, #0x70 - mov r2, #6 -_02224534: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02224534 - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - bl ov12_02235254 - lsl r1, r0, #3 - add r0, sp, #0x70 - ldr r0, [r0, r1] - str r0, [sp, #0xb0] - add r0, sp, #0x74 - ldr r0, [r0, r1] - str r0, [sp, #0xb4] - mov r0, #0 - str r0, [sp, #0xb8] - b _022245C6 -_02224558: - ldr r6, _0222460C ; =0x02238F44 - add r3, sp, #0x38 - mov r2, #7 -_0222455E: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0222455E - ldr r0, [r4, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02224574 - mov r0, #6 - b _0222457C -_02224574: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - bl ov12_02235254 -_0222457C: - lsl r1, r0, #3 - add r0, sp, #0x38 - ldr r0, [r0, r1] - str r0, [sp, #0xb0] - add r0, sp, #0x3c - ldr r0, [r0, r1] - str r0, [sp, #0xb4] - mov r0, #0 - str r0, [sp, #0xb8] - b _022245C6 -_02224590: - ldr r6, _02224610 ; =0x02238F0C - add r3, sp, #0 - mov r2, #7 -_02224596: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02224596 - ldr r0, [r4, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022245AC - mov r0, #6 - b _022245B4 -_022245AC: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - bl ov12_02235254 -_022245B4: - lsl r1, r0, #3 - add r0, sp, #0 - ldr r0, [r0, r1] - str r0, [sp, #0xb0] - add r0, sp, #4 - ldr r0, [r0, r1] - str r0, [sp, #0xb4] - mov r0, #0 - str r0, [sp, #0xb8] -_022245C6: - add r2, sp, #0xb0 - ldmia r2!, {r0, r1} - add r4, #0x2c - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0xb0] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0xb4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #0xb8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add sp, #0xbc - pop {r3, r4, r5, r6, pc} - nop -_022245FC: .word 0x00002CE0 -_02224600: .word 0xFFFFEC78 -_02224604: .word 0xFFFFE890 -_02224608: .word 0x02238EAC -_0222460C: .word 0x02238F44 -_02224610: .word 0x02238F0C - thumb_func_end ov12_022242E0 - - thumb_func_start ov12_02224614 -ov12_02224614: ; 0x02224614 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x148 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r1, #0] - ldr r1, [r1, #0x24] - bl ov12_02235254 - str r0, [sp, #0x18] - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x28] - bl ov12_02235254 - str r0, [sp, #0x14] - ldr r0, [sp, #4] - ldr r0, [r0, #0x18] - cmp r0, #0x1a - bls _0222463E - b _02224E38 -_0222463E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222464A: ; jump table - .short _02224680 - _0222464A - 2 ; case 0 - .short _0222468C - _0222464A - 2 ; case 1 - .short _0222468C - _0222464A - 2 ; case 2 - .short _02224DA2 - _0222464A - 2 ; case 3 - .short _022246F4 - _0222464A - 2 ; case 4 - .short _022247AE - _0222464A - 2 ; case 5 - .short _02224AE0 - _0222464A - 2 ; case 6 - .short _02224AE0 - _0222464A - 2 ; case 7 - .short _02224868 - _0222464A - 2 ; case 8 - .short _02224868 - _0222464A - 2 ; case 9 - .short _022248D0 - _0222464A - 2 ; case 10 - .short _022248D0 - _0222464A - 2 ; case 11 - .short _0222491E - _0222464A - 2 ; case 12 - .short _0222491E - _0222464A - 2 ; case 13 - .short _02224966 - _0222464A - 2 ; case 14 - .short _02224966 - _0222464A - 2 ; case 15 - .short _022249AE - _0222464A - 2 ; case 16 - .short _022249AE - _0222464A - 2 ; case 17 - .short _02224A50 - _0222464A - 2 ; case 18 - .short _02224A50 - _0222464A - 2 ; case 19 - .short _02224A98 - _0222464A - 2 ; case 20 - .short _02224A98 - _0222464A - 2 ; case 21 - .short _02224DB6 - _0222464A - 2 ; case 22 - .short _02224E38 - _0222464A - 2 ; case 23 - .short _02224E0A - _0222464A - 2 ; case 24 - .short _02224DC6 - _0222464A - 2 ; case 25 - .short _02224DD8 - _0222464A - 2 ; case 26 -_02224680: - mov r1, #0 - add r0, sp, #0x20 - strh r1, [r0] - strh r1, [r0, #2] - strh r1, [r0, #4] - b _02224E38 -_0222468C: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022246C6 - ldr r0, [sp, #4] - ldr r0, [r0, #0x10] - cmp r0, #2 - add r0, sp, #0x20 - bne _022246B4 - ldr r1, _022249E8 ; =0xFFFFF2F8 - strh r1, [r0] - mov r1, #0x73 - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_022246B4: - mov r1, #0x92 - lsl r1, r1, #4 - strh r1, [r0] - ldr r1, _022249EC ; =0xFFFFFA60 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_022246C6: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _022249F0 ; =0x022396AC - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _022249F4 ; =0x022396B0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _022249F8 ; =0x022396B4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_022246F4: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02224730 - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _022249F0 ; =0x022396AC - add r2, r2, r0 - ldr r2, [r1, r2] - neg r3, r2 - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _022249F4 ; =0x022396B0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _022249F8 ; =0x022396B4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_02224730: - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x24] - bl ov12_0223525C - add r4, r0, #0 - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x28] - bl ov12_0223525C - cmp r4, r0 - bne _0222477C - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _022249F0 ; =0x022396AC - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _022249F4 ; =0x022396B0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _022249F8 ; =0x022396B4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_0222477C: - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x24] - bl ov12_0223525C - cmp r0, #3 - add r0, sp, #0x20 - bne _022247A0 - mov r1, #0x3b - lsl r1, r1, #6 - strh r1, [r0] - mov r1, #0x21 - lsl r1, r1, #6 - strh r1, [r0, #2] - ldr r1, _022249FC ; =0x000005FC - strh r1, [r0, #4] - b _02224E38 -_022247A0: - ldr r1, _02224A00 ; =0xFFFFEF7C - strh r1, [r0] - ldr r1, _02224A04 ; =0xFFFFF558 - strh r1, [r0, #2] - ldr r1, _022249FC ; =0x000005FC - strh r1, [r0, #4] - b _02224E38 -_022247AE: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022247EA - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _022249F0 ; =0x022396AC - add r2, r2, r0 - ldr r2, [r1, r2] - neg r3, r2 - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _022249F4 ; =0x022396B0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _022249F8 ; =0x022396B4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_022247EA: - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x24] - bl ov12_0223525C - add r4, r0, #0 - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x28] - bl ov12_0223525C - cmp r4, r0 - bne _02224836 - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _022249F0 ; =0x022396AC - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _022249F4 ; =0x022396B0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _022249F8 ; =0x022396B4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_02224836: - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x24] - bl ov12_0223525C - cmp r0, #3 - add r0, sp, #0x20 - bne _0222485A - mov r1, #0x3b - lsl r1, r1, #6 - strh r1, [r0] - mov r1, #0x21 - lsl r1, r1, #6 - strh r1, [r0, #2] - ldr r1, _022249FC ; =0x000005FC - strh r1, [r0, #4] - b _02224E38 -_0222485A: - ldr r1, _02224A00 ; =0xFFFFEF7C - strh r1, [r0] - ldr r1, _02224A04 ; =0xFFFFF558 - strh r1, [r0, #2] - ldr r1, _022249FC ; =0x000005FC - strh r1, [r0, #4] - b _02224E38 -_02224868: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022248A2 - ldr r0, [sp, #4] - ldr r0, [r0, #0x10] - cmp r0, #2 - add r0, sp, #0x20 - bne _02224890 - ldr r1, _02224A08 ; =0xFFFFF6E0 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_02224890: - mov r1, #0x92 - lsl r1, r1, #4 - strh r1, [r0] - ldr r1, _022249EC ; =0xFFFFFA60 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_022248A2: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224A0C ; =0x02238FEC - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224A10 ; =0x02238FF0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224A14 ; =0x02238FF4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_022248D0: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022248F0 - ldr r1, _02224A08 ; =0xFFFFF6E0 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_022248F0: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224A18 ; =0x0223919C - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224A10 ; =0x02238FF0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224A14 ; =0x02238FF4 - add r0, r3, r0 - ldr r1, [r1, r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r2, #4] - b _02224E38 -_0222491E: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222493E - ldr r1, _02224A1C ; =0xFFFFF488 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_0222493E: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224A20 ; =0x022394FC - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224A24 ; =0x02239500 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224A28 ; =0x02239504 - add r0, r3, r0 - ldr r0, [r1, r0] - strh r0, [r2, #4] - b _02224E38 -_02224966: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02224986 - ldr r1, _02224A08 ; =0xFFFFF6E0 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_02224986: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224A2C ; =0x0223985C - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224A30 ; =0x02239860 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224A34 ; =0x02239864 - add r0, r3, r0 - ldr r0, [r1, r0] - strh r0, [r2, #4] - b _02224E38 -_022249AE: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _022249CE - ldr r1, _02224A08 ; =0xFFFFF6E0 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_022249CE: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224A38 ; =0x0223934C - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224A3C ; =0x02239350 - b _02224A40 - ; .align 2, 0 -_022249E8: .word 0xFFFFF2F8 -_022249EC: .word 0xFFFFFA60 -_022249F0: .word 0x022396AC -_022249F4: .word 0x022396B0 -_022249F8: .word 0x022396B4 -_022249FC: .word 0x000005FC -_02224A00: .word 0xFFFFEF7C -_02224A04: .word 0xFFFFF558 -_02224A08: .word 0xFFFFF6E0 -_02224A0C: .word 0x02238FEC -_02224A10: .word 0x02238FF0 -_02224A14: .word 0x02238FF4 -_02224A18: .word 0x0223919C -_02224A1C: .word 0xFFFFF488 -_02224A20: .word 0x022394FC -_02224A24: .word 0x02239500 -_02224A28: .word 0x02239504 -_02224A2C: .word 0x0223985C -_02224A30: .word 0x02239860 -_02224A34: .word 0x02239864 -_02224A38: .word 0x0223934C -_02224A3C: .word 0x02239350 -_02224A40: - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224D60 ; =0x02239354 - add r0, r3, r0 - ldr r0, [r1, r0] - strh r0, [r2, #4] - b _02224E38 -_02224A50: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02224A70 - ldr r1, _02224D64 ; =0xFFFFF6E0 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_02224A70: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224D68 ; =0x02239A0C - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224D6C ; =0x02239A10 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224D70 ; =0x02239A14 - add r0, r3, r0 - ldr r0, [r1, r0] - strh r0, [r2, #4] - b _02224E38 -_02224A98: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02224AB8 - ldr r1, _02224D74 ; =0xFFFFEF10 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x5a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x2e - lsl r1, r1, #4 - strh r1, [r0, #4] - b _02224E38 -_02224AB8: - ldr r0, [sp, #0x14] - mov r1, #0xc - mul r1, r0 - ldr r2, [sp, #0x18] - mov r0, #0x48 - mul r0, r2 - ldr r2, _02224D78 ; =0x02239BBC - add r2, r2, r0 - ldr r3, [r1, r2] - add r2, sp, #0x20 - strh r3, [r2] - ldr r3, _02224D7C ; =0x02239BC0 - add r3, r3, r0 - ldr r3, [r1, r3] - strh r3, [r2, #2] - ldr r3, _02224D80 ; =0x02239BC4 - add r0, r3, r0 - ldr r0, [r1, r0] - strh r0, [r2, #4] - b _02224E38 -_02224AE0: - ldr r4, _02224D84 ; =0x02238F7C - add r3, sp, #0xd8 - mov r2, #0xe -_02224AE6: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02224AE6 - ldr r3, _02224D88 ; =0x02238E9C - add r2, sp, #0x58 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r1, sp, #0xc8 - mov r0, #0 - str r1, [sp, #0xc] - add r1, sp, #0xb8 - mov ip, r0 - str r1, [sp, #0x1c] - add r0, sp, #0xd8 - add r7, sp, #0xa8 - add r6, sp, #0x98 - add r5, sp, #0x88 - add r1, sp, #0x78 - add r2, sp, #0x68 -_02224B12: - ldr r4, [r0, #0] - ldr r3, [sp, #0xc] - str r4, [r3, #0] - ldr r4, [r0, #0x10] - ldr r3, [sp, #0x1c] - str r4, [r3, #0] - ldr r3, [r0, #0x20] - stmia r7!, {r3} - ldr r3, [r0, #0x30] - stmia r6!, {r3} - ldr r3, [r0, #0x40] - stmia r5!, {r3} - ldr r3, [r0, #0x50] - stmia r1!, {r3} - ldr r3, [r0, #0x60] - add r0, r0, #4 - stmia r2!, {r3} - ldr r3, [sp, #0xc] - add r3, r3, #4 - str r3, [sp, #0xc] - ldr r3, [sp, #0x1c] - add r3, r3, #4 - str r3, [sp, #0x1c] - mov r3, ip - add r3, r3, #1 - mov ip, r3 - cmp r3, #4 - blt _02224B12 - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02224B8E - mov r0, #0 - str r0, [sp, #8] - add r0, sp, #0x58 - str r0, [sp, #0x10] - add r7, sp, #0xc8 - add r6, sp, #0xb8 - add r0, sp, #0xa8 - add r1, sp, #0x98 - add r2, sp, #0x88 - add r3, sp, #0x78 - add r4, sp, #0x68 -_02224B6C: - ldr r5, [sp, #0x10] - ldr r5, [r5, #0] - stmia r7!, {r5} - stmia r6!, {r5} - stmia r0!, {r5} - stmia r1!, {r5} - stmia r2!, {r5} - stmia r3!, {r5} - stmia r4!, {r5} - ldr r5, [sp, #0x10] - add r5, r5, #4 - str r5, [sp, #0x10] - ldr r5, [sp, #8] - add r5, r5, #1 - str r5, [sp, #8] - cmp r5, #4 - blt _02224B6C -_02224B8E: - ldr r0, [sp, #0x18] - cmp r0, #5 - bhi _02224BAC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02224BA0: ; jump table - .short _02224BAC - _02224BA0 - 2 ; case 0 - .short _02224BBC - _02224BA0 - 2 ; case 1 - .short _02224BE8 - _02224BA0 - 2 ; case 2 - .short _02224C20 - _02224BA0 - 2 ; case 3 - .short _02224CAE - _02224BA0 - 2 ; case 4 - .short _02224CE6 - _02224BA0 - 2 ; case 5 -_02224BAC: - ldr r1, [sp, #0xc8] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0xcc] - strh r1, [r0, #2] - ldr r1, [sp, #0xd0] - strh r1, [r0, #4] - b _02224E38 -_02224BBC: - ldr r0, [sp, #0xd4] - cmp r0, #1 - bne _02224BD2 - ldr r1, [sp, #0xc8] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0xcc] - strh r1, [r0, #2] - ldr r1, [sp, #0xd0] - strh r1, [r0, #4] - b _02224E38 -_02224BD2: - ldr r0, [sp, #0xc8] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0xcc] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0xd0] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224BE8: - ldr r0, [sp, #0x14] - cmp r0, #3 - bne _02224BFE - ldr r1, [sp, #0xb8] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0xbc] - strh r1, [r0, #2] - ldr r1, [sp, #0xc0] - strh r1, [r0, #4] - b _02224E38 -_02224BFE: - cmp r0, #5 - add r0, sp, #0x20 - bne _02224C12 - ldr r1, [sp, #0x98] - strh r1, [r0] - ldr r1, [sp, #0x9c] - strh r1, [r0, #2] - ldr r1, [sp, #0xa0] - strh r1, [r0, #4] - b _02224E38 -_02224C12: - ldr r1, [sp, #0xa8] - strh r1, [r0] - ldr r1, [sp, #0xac] - strh r1, [r0, #2] - ldr r1, [sp, #0xb0] - strh r1, [r0, #4] - b _02224E38 -_02224C20: - ldr r0, [sp, #0x14] - cmp r0, #2 - bne _02224C52 - ldr r0, [sp, #0xc4] - cmp r0, #1 - bne _02224C3C - ldr r1, [sp, #0xb8] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0xbc] - strh r1, [r0, #2] - ldr r1, [sp, #0xc0] - strh r1, [r0, #4] - b _02224E38 -_02224C3C: - ldr r0, [sp, #0xb8] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0xbc] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0xc0] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224C52: - cmp r0, #5 - bne _02224C82 - ldr r0, [sp, #0xb4] - cmp r0, #1 - bne _02224C72 - ldr r0, [sp, #0x88] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x8c] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x90] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224C72: - ldr r1, [sp, #0x88] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x8c] - strh r1, [r0, #2] - ldr r1, [sp, #0x90] - strh r1, [r0, #4] - b _02224E38 -_02224C82: - ldr r0, [sp, #0x84] - cmp r0, #1 - bne _02224C98 - ldr r1, [sp, #0x78] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x7c] - strh r1, [r0, #2] - ldr r1, [sp, #0x80] - strh r1, [r0, #4] - b _02224E38 -_02224C98: - ldr r0, [sp, #0x78] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x7c] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x80] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224CAE: - ldr r0, [sp, #0x14] - cmp r0, #3 - bne _02224CC4 - ldr r1, [sp, #0x78] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x7c] - strh r1, [r0, #2] - ldr r1, [sp, #0x80] - strh r1, [r0, #4] - b _02224E38 -_02224CC4: - cmp r0, #5 - add r0, sp, #0x20 - bne _02224CD8 - ldr r1, [sp, #0x68] - strh r1, [r0] - ldr r1, [sp, #0x6c] - strh r1, [r0, #2] - ldr r1, [sp, #0x70] - strh r1, [r0, #4] - b _02224E38 -_02224CD8: - ldr r1, [sp, #0x88] - strh r1, [r0] - ldr r1, [sp, #0x8c] - strh r1, [r0, #2] - ldr r1, [sp, #0x90] - strh r1, [r0, #4] - b _02224E38 -_02224CE6: - ldr r0, [sp, #0x14] - cmp r0, #3 - bne _02224D18 - ldr r0, [sp, #0xc4] - cmp r0, #1 - bne _02224D02 - ldr r1, [sp, #0x88] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x8c] - strh r1, [r0, #2] - ldr r1, [sp, #0x90] - strh r1, [r0, #4] - b _02224E38 -_02224D02: - ldr r0, [sp, #0x88] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x8c] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x90] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224D18: - cmp r0, #2 - bne _02224D48 - ldr r0, [sp, #0xc4] - cmp r0, #1 - bne _02224D32 - ldr r1, [sp, #0x98] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x9c] - strh r1, [r0, #2] - ldr r1, [sp, #0xa0] - strh r1, [r0, #4] - b _02224E38 -_02224D32: - ldr r0, [sp, #0x98] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x9c] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0xa0] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224D48: - ldr r0, [sp, #0xc4] - cmp r0, #1 - bne _02224D8C - ldr r1, [sp, #0x68] - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x6c] - strh r1, [r0, #2] - ldr r1, [sp, #0x70] - strh r1, [r0, #4] - b _02224E38 - nop -_02224D60: .word 0x02239354 -_02224D64: .word 0xFFFFF6E0 -_02224D68: .word 0x02239A0C -_02224D6C: .word 0x02239A10 -_02224D70: .word 0x02239A14 -_02224D74: .word 0xFFFFEF10 -_02224D78: .word 0x02239BBC -_02224D7C: .word 0x02239BC0 -_02224D80: .word 0x02239BC4 -_02224D84: .word 0x02238F7C -_02224D88: .word 0x02238E9C -_02224D8C: - ldr r0, [sp, #0x68] - neg r1, r0 - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, [sp, #0x6c] - neg r1, r1 - strh r1, [r0, #2] - ldr r1, [sp, #0x70] - neg r1, r1 - strh r1, [r0, #4] - b _02224E38 -_02224DA2: - ldr r1, _02224E58 ; =0xFFFFFCE0 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x4b - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0x7d - lsl r1, r1, #2 - strh r1, [r0, #4] - b _02224E38 -_02224DB6: - ldr r1, _02224E5C ; =0xFFFFF2AE - add r0, sp, #0x20 - strh r1, [r0] - ldr r1, _02224E60 ; =0xFFFFF5AC - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - b _02224E38 -_02224DC6: - ldr r1, _02224E64 ; =0xFFFFF290 - add r0, sp, #0x20 - strh r1, [r0] - mov r1, #0x7a - lsl r1, r1, #4 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - b _02224E38 -_02224DD8: - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x24] - bl ov12_0223525C - cmp r0, #3 - add r0, sp, #0x20 - bne _02224DFC - mov r1, #0x3b - lsl r1, r1, #6 - strh r1, [r0] - mov r1, #0x21 - lsl r1, r1, #6 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - b _02224E38 -_02224DFC: - ldr r1, _02224E68 ; =0xFFFFE890 - strh r1, [r0] - ldr r1, _02224E6C ; =0xFFFFF768 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - b _02224E38 -_02224E0A: - ldr r4, _02224E70 ; =0x02238EDC - add r3, sp, #0x28 - mov r2, #6 -_02224E10: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02224E10 - ldr r0, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r1, [r1, #0x24] - bl ov12_02235254 - lsl r2, r0, #3 - add r0, sp, #0x28 - ldr r1, [r0, r2] - add r0, sp, #0x20 - strh r1, [r0] - add r1, sp, #0x2c - ldr r1, [r1, r2] - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] -_02224E38: - add r1, sp, #0x20 - ldr r0, [sp] - ldrh r2, [r1] - add r0, #0x50 - strh r2, [r0] - ldr r0, [sp] - ldrh r2, [r1, #2] - add r0, #0x52 - strh r2, [r0] - ldr r0, [sp] - ldrh r1, [r1, #4] - add r0, #0x54 - str r0, [sp] - strh r1, [r0] - add sp, #0x148 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02224E58: .word 0xFFFFFCE0 -_02224E5C: .word 0xFFFFF2AE -_02224E60: .word 0xFFFFF5AC -_02224E64: .word 0xFFFFF290 -_02224E68: .word 0xFFFFE890 -_02224E6C: .word 0xFFFFF768 -_02224E70: .word 0x02238EDC - thumb_func_end ov12_02224614 - - thumb_func_start ov12_02224E74 -ov12_02224E74: ; 0x02224E74 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - bl ov12_02225614 - add r6, r0, #0 - mov r4, #0 - cmp r6, #0 - ble _02224EA4 -_02224E86: - add r0, r4, #0 - bl ov12_022255EC - ldr r1, [r5, #0x1c] - and r1, r0 - cmp r0, r1 - bne _02224E9E - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov12_022255D4 -_02224E9E: - add r4, r4, #1 - cmp r4, r6 - blt _02224E86 -_02224EA4: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02224E74 - - thumb_func_start ov12_02224EA8 -ov12_02224EA8: ; 0x02224EA8 - add r3, r0, #0 - add r2, r1, #0 - add r1, r3, #0 - ldr r3, _02224EB4 ; =ov12_0222584C - ldr r0, [r2, #0x20] - bx r3 - ; .align 2, 0 -_02224EB4: .word ov12_0222584C - thumb_func_end ov12_02224EA8 - - thumb_func_start ov12_02224EB8 -ov12_02224EB8: ; 0x02224EB8 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #0] - ldr r1, [r6, #0x24] - bl ov12_02235254 - ldr r0, [r6, #0] - ldr r1, [r6, #0x28] - bl ov12_02235254 - ldr r1, [r6, #0xc] - cmp r1, #3 - bhi _02224F00 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02224EE0: ; jump table - .short _02224F00 - _02224EE0 - 2 ; case 0 - .short _02224EE8 - _02224EE0 - 2 ; case 1 - .short _02224EF6 - _02224EE0 - 2 ; case 2 - .short _02224F00 - _02224EE0 - 2 ; case 3 -_02224EE8: - cmp r0, #0 - bne _02224EF2 - mov r4, #1 - lsl r4, r4, #8 - b _02224F00 -_02224EF2: - ldr r4, _02224F0C ; =0xFFFFEC00 - b _02224F00 -_02224EF6: - cmp r0, #0 - bne _02224EFE - mov r4, #0 - b _02224F00 -_02224EFE: - ldr r4, _02224F10 ; =0xFFFFEB00 -_02224F00: - ldr r0, [r5, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r4, r0 - str r0, [r5, #0x30] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02224F0C: .word 0xFFFFEC00 -_02224F10: .word 0xFFFFEB00 - thumb_func_end ov12_02224EB8 - - thumb_func_start ov12_02224F14 -ov12_02224F14: ; 0x02224F14 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl sub_02014764 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x38 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_02220250 - str r0, [r4, #4] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0xc - mov r2, #6 - bl ov12_0222325C - ldr r0, [r4, #0x10] - cmp r0, #4 - bhi _02224F5C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02224F52: ; jump table - .short _02224F5C - _02224F52 - 2 ; case 0 - .short _02224F6E - _02224F52 - 2 ; case 1 - .short _02224F80 - _02224F52 - 2 ; case 2 - .short _02224F92 - _02224F52 - 2 ; case 3 - .short _02224FA4 - _02224F52 - 2 ; case 4 -_02224F5C: - ldr r0, [r4, #0] - bl ov12_02220240 - str r0, [r4, #0x24] - ldr r0, [r4, #0] - bl ov12_02220248 - str r0, [r4, #0x28] - b _02224FB4 -_02224F6E: - ldr r0, [r4, #0] - bl ov12_02220248 - str r0, [r4, #0x24] - ldr r0, [r4, #0] - bl ov12_02220240 - str r0, [r4, #0x28] - b _02224FB4 -_02224F80: - ldr r0, [r4, #0] - bl ov12_02220240 - str r0, [r4, #0x24] - ldr r0, [r4, #0] - bl ov12_02220248 - str r0, [r4, #0x28] - b _02224FB4 -_02224F92: - ldr r0, [r4, #0] - bl ov12_02220248 - str r0, [r4, #0x24] - ldr r0, [r4, #0] - bl ov12_02220240 - str r0, [r4, #0x28] - b _02224FB4 -_02224FA4: - ldr r0, [r4, #0] - bl ov12_02220240 - str r0, [r4, #0x24] - ldr r0, [r4, #0] - bl ov12_02220248 - str r0, [r4, #0x28] -_02224FB4: - add r0, r6, #0 - add r1, r4, #0 - bl ov12_0222421C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02224F14 - - thumb_func_start ov12_02224FC4 -ov12_02224FC4: ; 0x02224FC4 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - ldr r1, [r6, #0x24] - mov r4, #1 - bl ov12_02235254 - add r5, r0, #0 - ldr r0, [r6, #0] - ldr r1, [r6, #0x28] - bl ov12_02235254 - cmp r5, #5 - bhi _02225002 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02224FEC: ; jump table - .short _02225002 - _02224FEC - 2 ; case 0 - .short _02224FF8 - _02224FEC - 2 ; case 1 - .short _02225002 - _02224FEC - 2 ; case 2 - .short _02224FFC - _02224FEC - 2 ; case 3 - .short _02225002 - _02224FEC - 2 ; case 4 - .short _02225000 - _02224FEC - 2 ; case 5 -_02224FF8: - sub r4, r4, #2 - b _02225002 -_02224FFC: - sub r4, r4, #2 - b _02225002 -_02225000: - sub r4, r4, #2 -_02225002: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02224FC4 - - thumb_func_start ov12_02225008 -ov12_02225008: ; 0x02225008 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r0, sp, #0x20 - mov r4, #0 - str r4, [r0, #0] - str r4, [r0, #4] - add r6, r1, #0 - add r7, r2, #0 - str r4, [r0, #8] -_0222501C: - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov12_02235254 - cmp r4, r0 - ldr r0, [r5, #0] - bne _02225034 - add r1, sp, #0x10 - mov r2, #4 - bl ov12_0222325C - b _0222503C -_02225034: - add r1, sp, #0 - mov r2, #4 - bl ov12_0222325C -_0222503C: - add r4, r4, #1 - cmp r4, #6 - blt _0222501C - add r0, r5, #0 - bl ov12_02224FC4 - strb r0, [r5, #8] - ldr r0, [sp, #0x14] - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - str r0, [sp, #0x24] - ldr r0, [sp, #0x1c] - str r0, [sp, #0x28] - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _02225060 - mov r0, #1 - strb r0, [r5, #8] -_02225060: - mov r1, #8 - ldrsb r0, [r5, r1] - ldr r2, [sp, #0x20] - ldr r3, [sp, #0x24] - mul r0, r2 - str r0, [sp, #0x20] - ldrsb r2, [r5, r1] - mul r2, r3 - str r2, [sp, #0x24] - ldrsb r1, [r5, r1] - ldr r2, [sp, #0x28] - mul r1, r2 - str r1, [sp, #0x28] - ldr r1, [r7, #0] - add r0, r1, r0 - str r0, [r7, #0] - ldr r1, [r7, #4] - ldr r0, [sp, #0x24] - add r0, r1, r0 - str r0, [r7, #4] - ldr r1, [r7, #8] - ldr r0, [sp, #0x28] - add r0, r1, r0 - str r0, [r7, #8] - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_02225008 - - thumb_func_start ov12_02225094 -ov12_02225094: ; 0x02225094 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - add r4, r1, #0 - add r1, sp, #0 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - ldr r0, [r5, #0] - add r1, sp, #0xc - mov r2, #4 - bl ov12_0222325C - add r0, r5, #0 - bl ov12_02224FC4 - strb r0, [r5, #8] - ldr r0, [sp, #0x10] - str r0, [sp] - ldr r0, [sp, #0x14] - str r0, [sp, #4] - ldr r0, [sp, #0x18] - str r0, [sp, #8] - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _022250CE - mov r0, #1 - strb r0, [r5, #8] -_022250CE: - mov r1, #8 - ldrsb r0, [r5, r1] - ldr r2, [sp] - ldr r3, [sp, #4] - mul r0, r2 - str r0, [sp] - ldrsb r2, [r5, r1] - mul r2, r3 - str r2, [sp, #4] - ldrsb r1, [r5, r1] - ldr r2, [sp, #8] - mul r1, r2 - str r1, [sp, #8] - ldr r1, [r4, #0] - add r0, r1, r0 - str r0, [r4, #0] - ldr r1, [r4, #4] - ldr r0, [sp, #4] - add r0, r1, r0 - str r0, [r4, #4] - ldr r1, [r4, #8] - ldr r0, [sp, #8] - add r0, r1, r0 - str r0, [r4, #8] - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02225094 - - thumb_func_start ov12_02225104 -ov12_02225104: ; 0x02225104 - ldr r3, _0222510C ; =ov12_0222325C - ldr r0, [r0, #0] - mov r2, #5 - bx r3 - ; .align 2, 0 -_0222510C: .word ov12_0222325C - thumb_func_end ov12_02225104 - - thumb_func_start ov12_02225110 -ov12_02225110: ; 0x02225110 - mov r0, #1 - bx lr - thumb_func_end ov12_02225110 - - thumb_func_start ov12_02225114 -ov12_02225114: ; 0x02225114 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - add r4, r1, #0 - add r1, sp, #0 - mov r0, #0 - strh r0, [r1] - strh r0, [r1, #2] - strh r0, [r1, #4] - add r0, r4, #0 - add r1, sp, #8 - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _02225140 - mov r0, #1 - strb r0, [r4, #8] -_02225140: - ldr r0, [sp, #8] - cmp r0, #3 - bgt _0222515E - cmp r0, #0 - blt _022251CA - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02225156: ; jump table - .short _02225162 - _02225156 - 2 ; case 0 - .short _0222518E - _02225156 - 2 ; case 1 - .short _022251CA - _02225156 - 2 ; case 2 - .short _022251CA - _02225156 - 2 ; case 3 -_0222515E: - cmp r0, #0xff - b _022251CA -_02225162: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014874 - add r2, sp, #0 - mov r0, #0 - mov r1, #8 - ldrsh r3, [r2, r0] - ldrsb r0, [r4, r1] - mul r0, r3 - strh r0, [r2] - mov r0, #2 - ldrsh r3, [r2, r0] - ldrsb r0, [r4, r1] - mul r0, r3 - strh r0, [r2, #2] - mov r0, #4 - ldrsh r3, [r2, r0] - ldrsb r0, [r4, r1] - mul r0, r3 - strh r0, [r2, #4] - b _022251CA -_0222518E: - ldr r0, [sp, #0x10] - add r2, sp, #0 - strh r0, [r2] - ldr r0, [sp, #0x14] - mov r1, #8 - strh r0, [r2, #2] - ldr r0, [sp, #0x18] - strh r0, [r2, #4] - mov r0, #0 - ldrsh r3, [r2, r0] - ldrsb r0, [r4, r1] - mul r0, r3 - strh r0, [r2] - mov r0, #2 - ldrsh r3, [r2, r0] - ldrsb r0, [r4, r1] - mul r0, r3 - strh r0, [r2, #2] - mov r0, #4 - ldrsh r3, [r2, r0] - ldrsb r0, [r4, r1] - add r1, sp, #0 - mul r0, r3 - strh r0, [r2, #4] - add r0, r5, #0 - bl sub_02014874 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, pc} -_022251CA: - add r1, sp, #0 - mov r0, #0 - ldrsh r2, [r1, r0] - ldr r0, [r4, #0x2c] - sub r0, r2, r0 - strh r0, [r1] - mov r0, #2 - ldrsh r2, [r1, r0] - ldr r0, [r4, #0x30] - sub r0, r2, r0 - strh r0, [r1, #2] - mov r0, #4 - ldrsh r2, [r1, r0] - ldr r0, [r4, #0x34] - sub r0, r2, r0 - strh r0, [r1, #4] - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014874 - mov r0, #1 - add sp, #0x1c - pop {r4, r5, pc} - thumb_func_end ov12_02225114 - - thumb_func_start ov12_022251F8 -ov12_022251F8: ; 0x022251F8 - mov r0, #1 - bx lr - thumb_func_end ov12_022251F8 - - thumb_func_start ov12_022251FC -ov12_022251FC: ; 0x022251FC - mov r0, #1 - bx lr - thumb_func_end ov12_022251FC - - thumb_func_start ov12_02225200 -ov12_02225200: ; 0x02225200 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r5, r0, #0 - add r4, r1, #0 - add r1, sp, #0 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - add r1, sp, #0xc - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _0222522C - mov r0, #1 - strb r0, [r4, #8] -_0222522C: - ldr r0, [sp, #0xc] - cmp r0, #3 - bgt _0222524A - cmp r0, #0 - blt _022252AA - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02225242: ; jump table - .short _0222524E - _02225242 - 2 ; case 0 - .short _02225272 - _02225242 - 2 ; case 1 - .short _02225294 - _02225242 - 2 ; case 2 - .short _022252A0 - _02225242 - 2 ; case 3 -_0222524A: - cmp r0, #0xff - b _022252AA -_0222524E: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020148A8 - mov r0, #8 - ldrsb r1, [r4, r0] - ldr r2, [sp] - mul r1, r2 - str r1, [sp] - ldrsb r1, [r4, r0] - ldr r2, [sp, #4] - mul r1, r2 - str r1, [sp, #4] - ldrsb r0, [r4, r0] - ldr r1, [sp, #8] - mul r0, r1 - str r0, [sp, #8] - b _022252AA -_02225272: - ldr r2, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x1c] - str r2, [sp] - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #8 - ldrsb r6, [r4, r3] - mul r6, r2 - str r6, [sp] - ldrsb r2, [r4, r3] - mul r2, r1 - str r2, [sp, #4] - ldrsb r1, [r4, r3] - mul r1, r0 - str r1, [sp, #8] - b _022252AA -_02225294: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0 - bl ov12_02235508 - b _022252AA -_022252A0: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0 - bl ov12_02235508 -_022252AA: - ldr r1, [sp] - ldr r0, [r4, #0x2c] - sub r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r4, #0x30] - sub r0, r1, r0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014890 - mov r0, #1 - add sp, #0x20 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02225200 - - thumb_func_start ov12_022252C8 -ov12_022252C8: ; 0x022252C8 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - add r0, sp, #0 - strh r1, [r0] - add r0, r4, #0 - add r1, sp, #4 - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #8] - cmp r0, #1 - bne _022252F0 - mov r0, #1 - strb r0, [r4, #8] -_022252F0: - ldr r0, [sp, #4] - cmp r0, #3 - bgt _0222530E - cmp r0, #0 - blt _0222533C - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02225306: ; jump table - .short _02225312 - _02225306 - 2 ; case 0 - .short _0222532A - _02225306 - 2 ; case 1 - .short _0222533C - _02225306 - 2 ; case 2 - .short _0222533C - _02225306 - 2 ; case 3 -_0222530E: - cmp r0, #0xff - b _0222533C -_02225312: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020148F4 - add r1, sp, #0 - mov r0, #0 - ldrsh r2, [r1, r0] - mov r0, #8 - ldrsb r0, [r4, r0] - mul r0, r2 - strh r0, [r1] - b _0222533C -_0222532A: - ldr r0, [sp, #0xc] - add r1, sp, #0 - strh r0, [r1] - mov r0, #0 - ldrsh r2, [r1, r0] - mov r0, #8 - ldrsb r0, [r4, r0] - mul r0, r2 - strh r0, [r1] -_0222533C: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020148DC - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022252C8 - - thumb_func_start ov12_0222534C -ov12_0222534C: ; 0x0222534C - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - add r0, sp, #0 - strh r1, [r0] - add r0, r4, #0 - add r1, sp, #4 - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #8] - cmp r0, #1 - bne _02225374 - mov r0, #1 - strb r0, [r4, #8] -_02225374: - ldr r0, [sp, #4] - cmp r0, #3 - bgt _02225392 - cmp r0, #0 - blt _022253BC - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222538A: ; jump table - .short _02225396 - _0222538A - 2 ; case 0 - .short _022253AC - _0222538A - 2 ; case 1 - .short _022253BC - _0222538A - 2 ; case 2 - .short _022253BC - _0222538A - 2 ; case 3 -_02225392: - cmp r0, #0xff - b _022253BC -_02225396: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014924 - add r1, sp, #0 - mov r0, #8 - ldrh r2, [r1] - ldrsb r0, [r4, r0] - mul r0, r2 - strh r0, [r1] - b _022253BC -_022253AC: - ldr r0, [sp, #0xc] - add r1, sp, #0 - strh r0, [r1] - mov r0, #8 - ldrh r2, [r1] - ldrsb r0, [r4, r0] - mul r0, r2 - strh r0, [r1] -_022253BC: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014910 - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222534C - - thumb_func_start ov12_022253CC -ov12_022253CC: ; 0x022253CC - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - add r0, sp, #0 - strh r1, [r0] - add r0, r4, #0 - add r1, sp, #4 - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #8] - cmp r0, #1 - bne _022253F4 - mov r0, #1 - strb r0, [r4, #8] -_022253F4: - ldr r1, [sp, #4] - cmp r1, #3 - bgt _02225412 - cmp r1, #0 - blt _02225426 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222540A: ; jump table - .short _02225416 - _0222540A - 2 ; case 0 - .short _02225420 - _0222540A - 2 ; case 1 - .short _02225426 - _0222540A - 2 ; case 2 - .short _02225426 - _0222540A - 2 ; case 3 -_02225412: - cmp r1, #0xff - b _02225426 -_02225416: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014954 - b _02225426 -_02225420: - ldr r1, [sp, #0xc] - add r0, sp, #0 - strh r1, [r0] -_02225426: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02014940 - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov12_022253CC - - thumb_func_start ov12_02225434 -ov12_02225434: ; 0x02225434 - mov r0, #1 - bx lr - thumb_func_end ov12_02225434 - - thumb_func_start ov12_02225438 -ov12_02225438: ; 0x02225438 - mov r0, #1 - bx lr - thumb_func_end ov12_02225438 - - thumb_func_start ov12_0222543C -ov12_0222543C: ; 0x0222543C - mov r0, #1 - bx lr - thumb_func_end ov12_0222543C - - thumb_func_start ov12_02225440 -ov12_02225440: ; 0x02225440 - mov r0, #1 - bx lr - thumb_func_end ov12_02225440 - - thumb_func_start ov12_02225444 -ov12_02225444: ; 0x02225444 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r7, r0, #0 - add r4, r1, #0 - add r1, sp, #0 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - add r1, sp, #0xc - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _02225470 - mov r0, #1 - strb r0, [r4, #8] -_02225470: - ldr r0, [sp, #0xc] - cmp r0, #4 - bgt _02225490 - cmp r0, #0 - blt _0222552A - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02225486: ; jump table - .short _02225494 - _02225486 - 2 ; case 0 - .short _022254B8 - _02225486 - 2 ; case 1 - .short _02225514 - _02225486 - 2 ; case 2 - .short _02225520 - _02225486 - 2 ; case 3 - .short _022254DA - _02225486 - 2 ; case 4 -_02225490: - cmp r0, #0xff - b _0222552A -_02225494: - add r0, r7, #0 - add r1, sp, #0 - bl sub_02014988 - mov r0, #8 - ldrsb r1, [r4, r0] - ldr r2, [sp] - mul r1, r2 - str r1, [sp] - ldrsb r1, [r4, r0] - ldr r2, [sp, #4] - mul r1, r2 - str r1, [sp, #4] - ldrsb r0, [r4, r0] - ldr r1, [sp, #8] - mul r0, r1 - str r0, [sp, #8] - b _0222552A -_022254B8: - ldr r2, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x1c] - str r2, [sp] - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #8 - ldrsb r5, [r4, r3] - mul r5, r2 - str r5, [sp] - ldrsb r2, [r4, r3] - mul r2, r1 - str r2, [sp, #4] - ldrsb r1, [r4, r3] - mul r1, r0 - str r1, [sp, #8] - b _0222552A -_022254DA: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0 - bl ov12_02235508 - ldr r1, [sp] - ldr r5, [sp, #0x14] - add r0, r1, #0 - ldr r6, [sp, #0x18] - mul r0, r5 - add r1, r6, #0 - bl sub_020E1F6C - ldr r1, [sp, #4] - str r0, [sp] - add r0, r1, #0 - mul r0, r5 - add r1, r6, #0 - bl sub_020E1F6C - ldr r1, [sp, #8] - str r0, [sp, #4] - add r0, r1, #0 - mul r0, r5 - add r1, r6, #0 - bl sub_020E1F6C - str r0, [sp, #8] - b _0222552A -_02225514: - ldr r0, [r4, #0] - ldr r1, [r4, #0x24] - add r2, sp, #0 - bl ov12_02235508 - b _0222552A -_02225520: - ldr r0, [r4, #0] - ldr r1, [r4, #0x28] - add r2, sp, #0 - bl ov12_02235508 -_0222552A: - ldr r1, [sp] - ldr r0, [r4, #0x2c] - sub r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r4, #0x30] - sub r0, r1, r0 - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [r4, #0x34] - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r7, #0 - add r1, sp, #0 - bl sub_02014970 - mov r0, #1 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02225444 - - thumb_func_start ov12_02225550 -ov12_02225550: ; 0x02225550 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - add r0, sp, #0 - strh r1, [r0] - add r0, r4, #0 - add r1, sp, #4 - bl ov12_02225104 - add r0, r4, #0 - bl ov12_02224FC4 - strb r0, [r4, #8] - ldr r0, [sp, #8] - cmp r0, #1 - bne _02225578 - mov r0, #1 - strb r0, [r4, #8] -_02225578: - ldr r0, [sp, #4] - cmp r0, #3 - bgt _02225596 - cmp r0, #0 - blt _022255C4 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222558E: ; jump table - .short _0222559A - _0222558E - 2 ; case 0 - .short _022255B2 - _0222558E - 2 ; case 1 - .short _022255C4 - _0222558E - 2 ; case 2 - .short _022255C4 - _0222558E - 2 ; case 3 -_02225596: - cmp r0, #0xff - b _022255C4 -_0222559A: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020149D4 - add r1, sp, #0 - mov r0, #0 - ldrsh r2, [r1, r0] - mov r0, #8 - ldrsb r0, [r4, r0] - mul r0, r2 - strh r0, [r1] - b _022255C4 -_022255B2: - ldr r0, [sp, #0xc] - add r1, sp, #0 - strh r0, [r1] - mov r0, #0 - ldrsh r2, [r1, r0] - mov r0, #8 - ldrsb r0, [r4, r0] - mul r0, r2 - strh r0, [r1] -_022255C4: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020149BC - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02225550 - - thumb_func_start ov12_022255D4 -ov12_022255D4: ; 0x022255D4 - push {r3, lr} - add r3, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - ldr r2, _022255E8 ; =0x02239D6C - lsl r3, r3, #2 - ldr r2, [r2, r3] - blx r2 - pop {r3, pc} - nop -_022255E8: .word 0x02239D6C - thumb_func_end ov12_022255D4 - - thumb_func_start ov12_022255EC -ov12_022255EC: ; 0x022255EC - push {r3, r4, r5} - sub sp, #0x3c - ldr r4, _02225610 ; =0x02239DA4 - add r5, r0, #0 - add r3, sp, #0 - mov r2, #7 -_022255F8: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _022255F8 - ldr r0, [r4, #0] - lsl r1, r5, #2 - str r0, [r3, #0] - add r0, sp, #0 - ldr r0, [r0, r1] - add sp, #0x3c - pop {r3, r4, r5} - bx lr - ; .align 2, 0 -_02225610: .word 0x02239DA4 - thumb_func_end ov12_022255EC - - thumb_func_start ov12_02225614 -ov12_02225614: ; 0x02225614 - push {r4, r5, r6, lr} - mov r4, #0 - ldr r6, _0222563C ; =0x0000FEFE - add r5, r4, #0 -_0222561C: - add r0, r4, #0 - bl ov12_022255EC - add r4, r4, #1 - cmp r0, r6 - beq _0222562E - add r5, r5, #1 - cmp r5, #0xff - blt _0222561C -_0222562E: - cmp r5, #0xff - blt _02225636 - mov r0, #0 - pop {r4, r5, r6, pc} -_02225636: - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_0222563C: .word 0x0000FEFE - thumb_func_end ov12_02225614 - - thumb_func_start ov12_02225640 -ov12_02225640: ; 0x02225640 - ldr r3, _02225648 ; =ov12_0222325C - ldr r0, [r0, #0] - mov r2, #4 - bx r3 - ; .align 2, 0 -_02225648: .word ov12_0222325C - thumb_func_end ov12_02225640 - - thumb_func_start ov12_0222564C -ov12_0222564C: ; 0x0222564C - push {r3, lr} - sub sp, #8 - add r2, sp, #0 - mov r0, #0 - strh r0, [r2] - strh r0, [r2, #2] - strh r0, [r2, #4] - strh r0, [r2, #6] - ldr r0, [r1, #4] - bl sub_02014784 - add r1, r0, #0 - add r0, sp, #0 - bl sub_020209D4 - mov r0, #1 - add sp, #8 - pop {r3, pc} - thumb_func_end ov12_0222564C - - thumb_func_start ov12_02225670 -ov12_02225670: ; 0x02225670 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldr r1, _022256A8 ; =0x02239DE0 - add r0, sp, #0 - ldrh r2, [r1, #0x20] - strh r2, [r0] - ldrh r2, [r1, #0x22] - strh r2, [r0, #2] - ldrh r2, [r1, #0x24] - ldrh r1, [r1, #0x26] - strh r2, [r0, #4] - strh r1, [r0, #6] - ldr r0, [r4, #4] - bl sub_02014784 - add r5, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02014788 - add r0, sp, #0 - add r1, r5, #0 - bl sub_020209D4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022256A8: .word 0x02239DE0 - thumb_func_end ov12_02225670 - - thumb_func_start ov12_022256AC -ov12_022256AC: ; 0x022256AC - push {r4, lr} - sub sp, #0x18 - add r4, r1, #0 - add r1, sp, #0 - mov r0, #0 - strh r0, [r1] - strh r0, [r1, #2] - strh r0, [r1, #4] - strh r0, [r1, #6] - add r0, r4, #0 - add r1, sp, #8 - bl ov12_02225640 - ldr r1, [sp, #0xc] - add r0, sp, #0 - strh r1, [r0] - ldr r1, [sp, #0x10] - strh r1, [r0, #2] - ldr r1, [sp, #0x14] - strh r1, [r0, #4] - ldr r0, [r4, #4] - bl sub_02014784 - add r1, r0, #0 - add r0, sp, #0 - bl sub_020209D4 - mov r0, #1 - add sp, #0x18 - pop {r4, pc} - thumb_func_end ov12_022256AC - - thumb_func_start ov12_022256E8 -ov12_022256E8: ; 0x022256E8 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldr r1, _02225720 ; =0x02239DE0 - add r0, sp, #0 - ldrh r2, [r1, #0x18] - strh r2, [r0] - ldrh r2, [r1, #0x1a] - strh r2, [r0, #2] - ldrh r2, [r1, #0x1c] - ldrh r1, [r1, #0x1e] - strh r2, [r0, #4] - strh r1, [r0, #6] - ldr r0, [r4, #4] - bl sub_02014784 - add r5, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02014788 - add r0, sp, #0 - add r1, r5, #0 - bl sub_020209D4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02225720: .word 0x02239DE0 - thumb_func_end ov12_022256E8 - - thumb_func_start ov12_02225724 -ov12_02225724: ; 0x02225724 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r1, _02225780 ; =0x02239DE0 - add r0, sp, #0 - ldrh r2, [r1, #0x10] - strh r2, [r0, #8] - ldrh r2, [r1, #0x12] - strh r2, [r0, #0xa] - ldrh r2, [r1, #0x14] - strh r2, [r0, #0xc] - ldrh r2, [r1, #0x16] - strh r2, [r0, #0xe] - ldrh r2, [r1, #0x28] - strh r2, [r0] - ldrh r2, [r1, #0x2a] - strh r2, [r0, #2] - ldrh r2, [r1, #0x2c] - strh r2, [r0, #4] - ldrh r1, [r1, #0x2e] - strh r1, [r0, #6] - ldr r0, [r4, #4] - bl sub_02014784 - add r5, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02014788 - ldr r0, [r4, #0] - bl ov12_0221FDD4 - cmp r0, #1 - bne _02225772 - add r0, sp, #8 - add r1, r5, #0 - bl sub_020209D4 - b _0222577A -_02225772: - add r0, sp, #0 - add r1, r5, #0 - bl sub_020209D4 -_0222577A: - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02225780: .word 0x02239DE0 - thumb_func_end ov12_02225724 - - thumb_func_start ov12_02225784 -ov12_02225784: ; 0x02225784 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldr r1, _022257BC ; =0x02239DE0 - add r0, sp, #0 - ldrh r2, [r1] - strh r2, [r0] - ldrh r2, [r1, #2] - strh r2, [r0, #2] - ldrh r2, [r1, #4] - ldrh r1, [r1, #6] - strh r2, [r0, #4] - strh r1, [r0, #6] - ldr r0, [r4, #4] - bl sub_02014784 - add r5, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02014788 - add r0, sp, #0 - add r1, r5, #0 - bl sub_020209D4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022257BC: .word 0x02239DE0 - thumb_func_end ov12_02225784 - - thumb_func_start ov12_022257C0 -ov12_022257C0: ; 0x022257C0 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldr r1, _022257F8 ; =0x02239DE0 - add r0, sp, #0 - ldrh r2, [r1, #8] - strh r2, [r0] - ldrh r2, [r1, #0xa] - strh r2, [r0, #2] - ldrh r2, [r1, #0xc] - ldrh r1, [r1, #0xe] - strh r2, [r0, #4] - strh r1, [r0, #6] - ldr r0, [r4, #4] - bl sub_02014784 - add r5, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02014788 - add r0, sp, #0 - add r1, r5, #0 - bl sub_020209D4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022257F8: .word 0x02239DE0 - thumb_func_end ov12_022257C0 - - thumb_func_start ov12_022257FC -ov12_022257FC: ; 0x022257FC - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r0, [r5, #4] - bl sub_02014784 - add r4, r0, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #0x24] - add r2, sp, #0 - bl ov12_022356E8 - add r0, sp, #0 - add r1, r4, #0 - bl sub_02020ACC - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022257FC - - thumb_func_start ov12_02225824 -ov12_02225824: ; 0x02225824 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r0, [r5, #4] - bl sub_02014784 - add r4, r0, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #0x28] - add r2, sp, #0 - bl ov12_022356E8 - add r0, sp, #0 - add r1, r4, #0 - bl sub_02020ACC - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02225824 - - thumb_func_start ov12_0222584C -ov12_0222584C: ; 0x0222584C - push {r3, lr} - add r3, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - ldr r2, _02225860 ; =0x02239E10 - lsl r3, r3, #2 - ldr r2, [r2, r3] - blx r2 - pop {r3, pc} - nop -_02225860: .word 0x02239E10 - thumb_func_end ov12_0222584C - - thumb_func_start ov12_02225864 -ov12_02225864: ; 0x02225864 - push {r3, r4, r5, r6} - cmp r2, #0 - beq _0222587A - mov r4, #0x18 - add r6, r0, #0 - mul r6, r4 - ldr r4, _02225890 ; =0x02239E34 - lsl r5, r1, #2 - add r4, r4, r6 - ldrsh r4, [r5, r4] - strh r4, [r2] -_0222587A: - cmp r3, #0 - beq _0222588C - mov r2, #0x18 - mul r2, r0 - ldr r0, _02225894 ; =0x02239E36 - lsl r1, r1, #2 - add r0, r0, r2 - ldrsh r0, [r1, r0] - strh r0, [r3] -_0222588C: - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_02225890: .word 0x02239E34 -_02225894: .word 0x02239E36 - thumb_func_end ov12_02225864 - - thumb_func_start ov12_02225898 -ov12_02225898: ; 0x02225898 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _022258B8 - mov r0, #0 - add r1, r5, #2 - add r2, r4, #0 - add r3, r6, #0 - bl ov12_02225864 - pop {r3, r4, r5, r6, r7, pc} -_022258B8: - add r0, r7, #0 - bl ov12_02223364 - cmp r0, #1 - bne _022258D0 - mov r0, #1 - sub r1, r5, #2 - add r2, r4, #0 - add r3, r6, #0 - bl ov12_02225864 - pop {r3, r4, r5, r6, r7, pc} -_022258D0: - mov r0, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov12_02225864 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02225898 - - thumb_func_start ov12_022258E0 -ov12_022258E0: ; 0x022258E0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r2, #0 - bl ov12_02235254 - add r4, r0, #0 - add r0, r7, #0 - bl ov12_02223364 - cmp r0, #1 - bne _022258FA - mov r5, #1 - b _022258FC -_022258FA: - mov r5, #0 -_022258FC: - add r0, r7, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02225908 - add r4, r4, #2 -_02225908: - cmp r6, #3 - bhi _02225940 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02225918: ; jump table - .short _02225920 - _02225918 - 2 ; case 0 - .short _02225930 - _02225918 - 2 ; case 1 - .short _02225920 - _02225918 - 2 ; case 2 - .short _02225930 - _02225918 - 2 ; case 3 -_02225920: - mov r0, #0x18 - add r2, r5, #0 - mul r2, r0 - ldr r0, _02225948 ; =0x02239E34 - lsl r1, r4, #2 - add r0, r0, r2 - ldrsh r0, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_02225930: - mov r0, #0x18 - add r2, r5, #0 - mul r2, r0 - ldr r0, _0222594C ; =0x02239E36 - lsl r1, r4, #2 - add r0, r0, r2 - ldrsh r0, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_02225940: - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02225948: .word 0x02239E34 -_0222594C: .word 0x02239E36 - thumb_func_end ov12_022258E0 - - thumb_func_start ov12_02225950 -ov12_02225950: ; 0x02225950 - push {r3, lr} - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, pc} - thumb_func_end ov12_02225950 - - thumb_func_start ov12_02225964 -ov12_02225964: ; 0x02225964 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r5, #1 - bl ov12_0223525C - add r4, r0, #0 - add r0, r6, #0 - bl ov12_0221FDD4 - cmp r0, #0 - beq _02225982 - cmp r4, #3 - bne _02225988 - sub r5, r5, #2 - b _02225988 -_02225982: - cmp r4, #4 - bne _02225988 - sub r5, r5, #2 -_02225988: - add r0, r5, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02225964 - - thumb_func_start ov12_0222598C -ov12_0222598C: ; 0x0222598C - push {r4, lr} - mov r4, #1 - bl ov12_0223525C - cmp r0, #4 - bne _0222599A - sub r4, r4, #2 -_0222599A: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222598C - - thumb_func_start ov12_022259A0 -ov12_022259A0: ; 0x022259A0 - ldr r3, _022259A8 ; =sub_020BCFD0 - sub r0, r1, r0 - lsl r1, r2, #0xc - bx r3 - ; .align 2, 0 -_022259A8: .word sub_020BCFD0 - thumb_func_end ov12_022259A0 - - thumb_func_start ov12_022259AC -ov12_022259AC: ; 0x022259AC - push {r3, lr} - sub r0, r1, r0 - add r1, r2, #0 - bl sub_020BCFD0 - add r1, sp, #0 - str r0, [sp] - bl sub_020BDBCC - cmp r0, #0 - beq _022259CC - mov r0, #1 - ldr r1, [sp] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] -_022259CC: - ldr r0, [sp] - cmp r0, #0 - bge _022259D4 - neg r0, r0 -_022259D4: - str r0, [sp] - asr r0, r0, #0xc - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_022259AC - - thumb_func_start ov12_022259DC -ov12_022259DC: ; 0x022259DC - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #0 - ldrsh r1, [r4, r1] - add r1, r2, r1 - mov r2, #2 - ldrsh r2, [r4, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, pc} - thumb_func_end ov12_022259DC - - thumb_func_start ov12_022259FC -ov12_022259FC: ; 0x022259FC - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov12_02225FA4 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl sub_0200D6E8 - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_022259FC - - thumb_func_start ov12_02225A18 -ov12_02225A18: ; 0x02225A18 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - add r6, r3, #0 - ldrsh r3, [r5, r1] - add r0, r4, #0 - add r2, r2, r3 - bl sub_02007DEC - mov r2, #2 - ldrsh r2, [r5, r2] - add r0, r4, #0 - mov r1, #1 - add r2, r6, r2 - bl sub_02007DEC - pop {r4, r5, r6, pc} - thumb_func_end ov12_02225A18 - - thumb_func_start ov12_02225A3C -ov12_02225A3C: ; 0x02225A3C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r2, #0 - add r4, r1, #0 - ldrsh r2, [r5, r2] - add r0, r4, #0 - mov r1, #0xc - bl sub_02007DEC - mov r2, #2 - ldrsh r2, [r5, r2] - add r0, r4, #0 - mov r1, #0xd - bl sub_02007DEC - pop {r3, r4, r5, pc} - thumb_func_end ov12_02225A3C - - thumb_func_start ov12_02225A5C -ov12_02225A5C: ; 0x02225A5C - push {r3, r4, r5, lr} - add r4, r3, #0 - add r5, r0, #0 - ldr r3, [sp, #0x1c] - ldr r0, [sp, #0x14] - str r3, [r5, #4] - str r1, [r5, #8] - str r0, [r5, #0xc] - ldr r0, [sp, #0x18] - str r4, [r5, #0x10] - str r0, [r5, #0x14] - sub r0, r2, r1 - add r1, r3, #0 - bl sub_020E1F6C - str r0, [r5, #0x18] - add r0, sp, #0 - ldrh r0, [r0, #0x10] - ldr r1, [sp, #0x1c] - sub r0, r0, r4 - bl sub_020E1F6C - str r0, [r5, #0x1c] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02225A5C - - thumb_func_start ov12_02225A8C -ov12_02225A8C: ; 0x02225A8C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - str r3, [sp] - cmp r5, #0 - bne _02225A9E - bl sub_02022974 -_02225A9E: - cmp r4, r7 - bls _02225AAA - add r0, sp, #8 - ldrh r1, [r0, #0x1c] - neg r1, r1 - strh r1, [r0, #0x1c] -_02225AAA: - add r1, sp, #8 - mov r0, #0x1c - ldrsh r6, [r1, r0] - lsl r0, r4, #0xc - lsl r1, r7, #0xc - lsl r2, r6, #0xc - bl ov12_022259AC - str r0, [r5, #4] - ldr r0, [sp, #0x1c] - str r4, [r5, #8] - str r0, [r5, #0xc] - ldr r0, [sp] - str r0, [r5, #0x10] - ldr r0, [sp, #0x20] - str r0, [r5, #0x14] - str r6, [r5, #0x18] - add r0, sp, #8 - ldrh r1, [r0, #0x10] - ldr r0, [sp] - sub r0, r1, r0 - ldr r1, [r5, #4] - bl sub_020E1F6C - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02225A8C - - thumb_func_start ov12_02225AE0 -ov12_02225AE0: ; 0x02225AE0 - push {r4, lr} - add r4, r0, #0 - bne _02225AEA - bl sub_02022974 -_02225AEA: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225B6E - ldr r1, [r4, #8] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [r4, #8] - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x1c] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r0, [r4, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [r4, #8] - ldr r0, [r4, #0x10] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [r4, #0x10] - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #8] - ldr r2, [r4, #0xc] - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02225B74 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - asr r0, r1, #0xc - strh r0, [r4] - ldr r0, [r4, #0x10] - ldr r2, [r4, #0x14] - asr r0, r0, #4 - lsl r0, r0, #1 - add r0, r0, #1 - lsl r1, r0, #1 - ldr r0, _02225B74 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - asr r0, r1, #0xc - strh r0, [r4, #2] - mov r0, #1 - pop {r4, pc} -_02225B6E: - mov r0, #0 - pop {r4, pc} - nop -_02225B74: .word 0x020F983C - thumb_func_end ov12_02225AE0 - - thumb_func_start ov12_02225B78 -ov12_02225B78: ; 0x02225B78 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov12_02225AE0 - cmp r0, #0 - beq _02225B9A - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov12_022259DC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02225B9A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02225B78 - - thumb_func_start ov12_02225BA0 -ov12_02225BA0: ; 0x02225BA0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov12_02225AE0 - cmp r0, #0 - beq _02225BC2 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov12_02225A18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02225BC2: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02225BA0 - - thumb_func_start ov12_02225BC8 -ov12_02225BC8: ; 0x02225BC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - str r2, [sp] - cmp r5, #0 - bne _02225BDC - bl sub_02022974 -_02225BDC: - strh r4, [r5] - strh r6, [r5, #2] - add r0, sp, #0x10 - ldrh r7, [r0, #0x14] - lsl r0, r4, #0xc - str r0, [sp, #4] - str r7, [r5, #4] - ldr r1, [sp] - add r2, r7, #0 - lsl r1, r1, #0xc - bl ov12_022259A0 - str r0, [r5, #8] - lsl r4, r6, #0xc - add r2, sp, #0x10 - mov r1, #0x10 - ldrsh r1, [r2, r1] - add r0, r4, #0 - add r2, r7, #0 - lsl r1, r1, #0xc - bl ov12_022259A0 - str r0, [r5, #0xc] - ldr r0, [sp, #4] - str r0, [r5, #0x10] - str r4, [r5, #0x14] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02225BC8 - - thumb_func_start ov12_02225C14 -ov12_02225C14: ; 0x02225C14 - push {r4, lr} - add r4, r0, #0 - bne _02225C1E - bl sub_02022974 -_02225C1E: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225C4A - ldr r1, [r4, #0x10] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r1, [r4, #0x14] - ldr r0, [r4, #0xc] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r0, [r4, #0x10] - asr r0, r0, #0xc - strh r0, [r4] - ldr r0, [r4, #0x14] - asr r0, r0, #0xc - strh r0, [r4, #2] - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} -_02225C4A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02225C14 - - thumb_func_start ov12_02225C50 -ov12_02225C50: ; 0x02225C50 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02225C14 - cmp r0, #0 - beq _02225C6E - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov12_022259DC - mov r0, #1 - pop {r3, r4, r5, pc} -_02225C6E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02225C50 - - thumb_func_start ov12_02225C74 -ov12_02225C74: ; 0x02225C74 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02225C14 - cmp r0, #0 - beq _02225C92 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov12_02225A18 - mov r0, #1 - pop {r3, r4, r5, pc} -_02225C92: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02225C74 - - thumb_func_start ov12_02225C98 -ov12_02225C98: ; 0x02225C98 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r4, sp, #0x10 - mov r1, #0x14 - ldrsh r1, [r4, r1] - str r1, [sp] - ldrh r1, [r4, #0x18] - str r1, [sp, #4] - add r1, r2, #0 - add r2, r3, #0 - mov r3, #0x10 - ldrsh r3, [r4, r3] - bl ov12_02225BC8 - mov r1, #0 - strh r1, [r5] - ldr r0, _02225CDC ; =0x0000BFFF - strh r1, [r5, #2] - str r0, [sp] - ldr r0, [sp, #0x2c] - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r4, #0 - ldrh r0, [r0, #0x18] - ldr r3, _02225CE0 ; =0x00003FFF - add r2, r1, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - bl ov12_02225A5C - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02225CDC: .word 0x0000BFFF -_02225CE0: .word 0x00003FFF - thumb_func_end ov12_02225C98 - - thumb_func_start ov12_02225CE4 -ov12_02225CE4: ; 0x02225CE4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _02225CF2 - bl sub_02022974 -_02225CF2: - cmp r4, #0 - bne _02225CFA - bl sub_02022974 -_02225CFA: - add r0, r5, #0 - bl ov12_02225C14 - add r6, r0, #0 - add r0, r4, #0 - bl ov12_02225AE0 - mov r2, #0 - ldrsh r3, [r5, r2] - ldrsh r1, [r4, r2] - add r1, r3, r1 - strh r1, [r5] - mov r1, #2 - ldrsh r3, [r5, r1] - ldrsh r1, [r4, r1] - add r1, r3, r1 - strh r1, [r5, #2] - cmp r6, r0 - bne _02225D28 - cmp r6, #0 - bne _02225D28 - add r0, r2, #0 - pop {r4, r5, r6, pc} -_02225D28: - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02225CE4 - - thumb_func_start ov12_02225D2C -ov12_02225D2C: ; 0x02225D2C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - bl ov12_02225CE4 - cmp r0, #0 - beq _02225D4A - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov12_022259DC - mov r0, #1 - pop {r3, r4, r5, pc} -_02225D4A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02225D2C - - thumb_func_start ov12_02225D50 -ov12_02225D50: ; 0x02225D50 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - cmp r5, #0 - bne _02225D62 - bl sub_02022974 -_02225D62: - str r6, [r5, #0] - lsl r0, r6, #0xc - lsl r1, r7, #0xc - add r2, r4, #0 - str r4, [r5, #4] - bl ov12_022259A0 - asr r0, r0, #0xc - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02225D50 - - thumb_func_start ov12_02225D78 -ov12_02225D78: ; 0x02225D78 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - cmp r5, #0 - bne _02225D8A - bl sub_02022974 -_02225D8A: - str r6, [r5, #0] - lsl r6, r6, #0xc - add r0, r6, #0 - lsl r1, r7, #0xc - add r2, r4, #0 - str r4, [r5, #4] - bl ov12_022259A0 - str r0, [r5, #8] - str r6, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02225D78 - - thumb_func_start ov12_02225DA0 -ov12_02225DA0: ; 0x02225DA0 - push {r4, lr} - add r4, r0, #0 - bne _02225DAA - bl sub_02022974 -_02225DAA: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225DC2 - ldr r1, [r4, #0] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [r4, #0] - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} -_02225DC2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02225DA0 - - thumb_func_start ov12_02225DC8 -ov12_02225DC8: ; 0x02225DC8 - push {r4, lr} - add r4, r0, #0 - bne _02225DD2 - bl sub_02022974 -_02225DD2: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225DEE - ldr r1, [r4, #0xc] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [r4, #0xc] - asr r0, r0, #0xc - str r0, [r4, #0] - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} -_02225DEE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02225DC8 - - thumb_func_start ov12_02225DF4 -ov12_02225DF4: ; 0x02225DF4 - push {r3, r4, r5, lr} - ldr r4, [sp, #0x10] - add r5, r0, #0 - str r4, [r5, #4] - str r1, [r5, #8] - sub r0, r2, r1 - add r1, r4, #0 - str r3, [r5, #0xc] - bl sub_020E2178 - str r0, [r5, #0x10] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02225DF4 - - thumb_func_start ov12_02225E0C -ov12_02225E0C: ; 0x02225E0C - push {r4, lr} - add r4, r0, #0 - bne _02225E16 - bl sub_02022974 -_02225E16: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225E5E - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [r4, #8] - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #8] - ldr r2, [r4, #0xc] - asr r0, r0, #4 - lsl r0, r0, #1 - add r0, r0, #1 - lsl r1, r0, #1 - ldr r0, _02225E64 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - asr r0, r1, #0xc - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} -_02225E5E: - mov r0, #0 - pop {r4, pc} - nop -_02225E64: .word 0x020F983C - thumb_func_end ov12_02225E0C - - thumb_func_start ov12_02225E68 -ov12_02225E68: ; 0x02225E68 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r4, #0 - bne _02225E7A - bl sub_02022974 -_02225E7A: - ldr r0, [sp, #0x18] - add r1, r6, #0 - str r0, [r4, #4] - lsl r0, r5, #8 - bl sub_020E1F6C - add r5, r0, #0 - lsl r0, r7, #8 - add r1, r6, #0 - bl sub_020E1F6C - add r1, r0, #0 - ldr r2, [sp, #0x18] - lsl r0, r5, #0xc - lsl r1, r1, #0xc - bl ov12_022259A0 - str r0, [r4, #8] - lsl r0, r5, #0x10 - asr r0, r0, #0x10 - strh r0, [r4] - strh r0, [r4, #2] - mov r0, #0 - ldrsh r0, [r4, r0] - lsl r0, r0, #0xc - str r0, [r4, #0x10] - mov r0, #2 - ldrsh r0, [r4, r0] - lsl r0, r0, #0xc - str r0, [r4, #0x14] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02225E68 - - thumb_func_start ov12_02225EB8 -ov12_02225EB8: ; 0x02225EB8 - push {r4, lr} - add r4, r0, #0 - bne _02225EC2 - bl sub_02022974 -_02225EC2: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225EEC - sub r0, r0, #1 - str r0, [r4, #4] - ldr r1, [r4, #0x10] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r1, [r4, #0x14] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r0, [r4, #0x10] - asr r0, r0, #0xc - strh r0, [r4] - ldr r0, [r4, #0x14] - asr r0, r0, #0xc - strh r0, [r4, #2] - mov r0, #1 - pop {r4, pc} -_02225EEC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov12_02225EB8 - - thumb_func_start ov12_02225EF0 -ov12_02225EF0: ; 0x02225EF0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - cmp r5, #0 - bne _02225F02 - bl sub_02022974 -_02225F02: - ldr r0, [sp, #0x20] - add r1, sp, #8 - str r0, [r5, #4] - mov r0, #0x14 - ldrsh r4, [r1, r0] - lsl r0, r6, #8 - add r1, r4, #0 - bl sub_020E1F6C - add r6, r0, #0 - lsl r0, r7, #8 - add r1, r4, #0 - bl sub_020E1F6C - add r1, r0, #0 - ldr r2, [sp, #0x20] - lsl r0, r6, #0xc - lsl r1, r1, #0xc - bl ov12_022259A0 - str r0, [r5, #8] - ldr r0, [sp] - add r1, r4, #0 - lsl r0, r0, #8 - bl sub_020E1F6C - add r7, r0, #0 - add r1, sp, #8 - mov r0, #0x10 - ldrsh r0, [r1, r0] - add r1, r4, #0 - lsl r0, r0, #8 - bl sub_020E1F6C - add r1, r0, #0 - ldr r2, [sp, #0x20] - lsl r0, r7, #0xc - lsl r1, r1, #0xc - bl ov12_022259A0 - str r0, [r5, #0xc] - strh r6, [r5] - strh r7, [r5, #2] - mov r0, #0 - ldrsh r0, [r5, r0] - lsl r0, r0, #0xc - str r0, [r5, #0x10] - mov r0, #2 - ldrsh r0, [r5, r0] - lsl r0, r0, #0xc - str r0, [r5, #0x14] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02225EF0 - - thumb_func_start ov12_02225F6C -ov12_02225F6C: ; 0x02225F6C - push {r4, lr} - add r4, r0, #0 - bne _02225F76 - bl sub_02022974 -_02225F76: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02225FA0 - sub r0, r0, #1 - str r0, [r4, #4] - ldr r1, [r4, #0x10] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r1, [r4, #0x14] - ldr r0, [r4, #0xc] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r0, [r4, #0x10] - asr r0, r0, #0xc - strh r0, [r4] - ldr r0, [r4, #0x14] - asr r0, r0, #0xc - strh r0, [r4, #2] - mov r0, #1 - pop {r4, pc} -_02225FA0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov12_02225F6C - - thumb_func_start ov12_02225FA4 -ov12_02225FA4: ; 0x02225FA4 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0 - ldrsh r0, [r5, r0] - add r4, r1, #0 - add r6, r2, #0 - bl sub_020E17B4 - ldr r1, _02225FD0 ; =0x43800000 - bl sub_020E1304 - str r0, [r4, #0] - mov r0, #2 - ldrsh r0, [r5, r0] - bl sub_020E17B4 - ldr r1, _02225FD0 ; =0x43800000 - bl sub_020E1304 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - nop -_02225FD0: .word 0x43800000 - thumb_func_end ov12_02225FA4 - - thumb_func_start ov12_02225FD4 -ov12_02225FD4: ; 0x02225FD4 - push {r3, r4, lr} - sub sp, #4 - lsl r1, r1, #1 - mov r0, #0x50 - sub r0, r0, r1 - lsl r4, r0, #0xc - asr r1, r4, #0x1f - add r0, r4, #0 - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - lsl r1, r2, #9 - bl sub_020BCFD0 - sub r0, r4, r0 - add r1, sp, #0 - bl sub_020BDBCC - cmp r0, #0 - beq _02226012 - mov r1, #2 - lsl r1, r1, #0xa - add r0, r0, r1 -_02226012: - ldr r1, [sp] - add r0, r1, r0 - asr r1, r0, #0xc - lsr r0, r1, #0x1f - add r0, r1, r0 - lsl r0, r0, #0xf - asr r0, r0, #0x10 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02225FD4 - - thumb_func_start ov12_02226024 -ov12_02226024: ; 0x02226024 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r3, #0 - bl ov12_02225FD4 - add r2, r0, #0 - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _0222604E - mov r0, #0 - mvn r0, r0 - mul r0, r2 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - sub r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_0222604E: - add r0, r5, #0 - mov r1, #1 - add r2, r4, r2 - bl sub_02007DEC - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02226024 - - thumb_func_start ov12_0222605C -ov12_0222605C: ; 0x0222605C - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r3, #0 - bl ov12_02225FD4 - add r4, r0, #0 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _02226086 - mov r0, #0 - mvn r0, r0 - mul r0, r4 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - sub r0, r5, r7 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 -_02226086: - add r1, sp, #0 - add r0, r6, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r2, sp, #0 - mov r1, #2 - ldrsh r1, [r2, r1] - add r2, r5, r4 - lsl r2, r2, #0x10 - add r0, r6, #0 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_0222605C - - thumb_func_start ov12_022260A8 -ov12_022260A8: ; 0x022260A8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02225EB8 - cmp r0, #0 - beq _022260C2 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_022259FC - mov r0, #1 - pop {r3, r4, r5, pc} -_022260C2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022260A8 - - thumb_func_start ov12_022260C8 -ov12_022260C8: ; 0x022260C8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02225EB8 - cmp r0, #0 - beq _022260E2 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02225A3C - mov r0, #1 - pop {r3, r4, r5, pc} -_022260E2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022260C8 - - thumb_func_start ov12_022260E8 -ov12_022260E8: ; 0x022260E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02225F6C - cmp r0, #0 - beq _02226102 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02225A3C - mov r0, #1 - pop {r3, r4, r5, pc} -_02226102: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022260E8 - - thumb_func_start ov12_02226108 -ov12_02226108: ; 0x02226108 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _0222611A - bl sub_02022974 -_0222611A: - str r7, [r5, #4] - ldr r0, [sp, #0x18] - str r7, [r5, #8] - str r0, [r5, #0xc] - mov r1, #0 - str r1, [r5, #0x10] - str r6, [r5, #0x14] - str r4, [r5, #0x18] - neg r0, r6 - str r0, [r5, #0x1c] - neg r0, r4 - str r0, [r5, #0x20] - strh r1, [r5] - strh r1, [r5, #2] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02226108 - - thumb_func_start ov12_02226138 -ov12_02226138: ; 0x02226138 - push {r4, lr} - add r4, r0, #0 - bne _02226142 - bl sub_02022974 -_02226142: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02226196 - ldr r0, [r4, #4] - add r1, r0, #1 - str r1, [r4, #4] - ldr r0, [r4, #8] - cmp r1, r0 - blt _02226192 - mov r2, #0 - str r2, [r4, #4] - ldrsh r0, [r4, r2] - ldr r1, [r4, #0x1c] - str r0, [r4, #0x1c] - cmp r1, #0 - bne _02226166 - strh r2, [r4] - b _0222616A -_02226166: - neg r0, r1 - strh r0, [r4] -_0222616A: - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x20] - str r0, [r4, #0x20] - cmp r1, #0 - bne _0222617A - mov r0, #0 - b _0222617C -_0222617A: - neg r0, r1 -_0222617C: - strh r0, [r4, #2] - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #4 - blt _02226192 - mov r0, #0 - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - sub r0, r0, #1 - str r0, [r4, #0xc] -_02226192: - mov r0, #1 - pop {r4, pc} -_02226196: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02226138 - - thumb_func_start ov12_0222619C -ov12_0222619C: ; 0x0222619C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov12_02226138 - cmp r0, #0 - beq _022261BE - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov12_02225A18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022261BE: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_0222619C - - thumb_func_start ov12_022261C4 -ov12_022261C4: ; 0x022261C4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - strh r3, [r7] - add r0, sp, #8 - mov r1, #0x10 - ldrsh r1, [r0, r1] - mov r6, #0 - strh r1, [r7, #2] - add r1, r7, #0 - add r1, #0x94 - str r2, [r1, #0] - add r1, r7, #0 - ldrh r2, [r0, #0x14] - add r1, #0xa8 - strh r2, [r1] - add r1, r7, #0 - add r1, #0xaa - strh r6, [r1] - ldrb r1, [r0, #0x18] - add r2, r7, #0 - add r2, #0xac - mov ip, r1 - strb r1, [r2] - add r1, r7, #0 - add r1, #0xad - strb r6, [r1] - ldrb r1, [r0, #0x1c] - add r0, r7, #0 - add r0, #0xae - strb r1, [r0] - mov r0, ip - cmp r0, #0 - ble _02226226 - add r5, r7, #0 -_0222620A: - ldr r4, [sp] - add r3, r5, #4 - mov r2, #4 -_02226210: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02226210 - ldr r0, [r4, #0] - add r6, r6, #1 - str r0, [r3, #0] - mov r0, ip - add r5, #0x24 - cmp r6, r0 - blt _0222620A -_02226226: - add r0, r7, #0 - ldr r1, [sp, #0x28] - add r0, #0x98 - str r1, [r0, #0] - add r0, r7, #0 - ldr r1, [sp, #0x2c] - add r0, #0x9c - str r1, [r0, #0] - add r0, r7, #0 - ldr r1, [sp, #0x30] - add r0, #0xa0 - str r1, [r0, #0] - add r0, r7, #0 - ldr r1, [sp, #0x34] - add r0, #0xa4 - str r1, [r0, #0] - add r0, r7, #0 - add r0, #0xac - ldrb r0, [r0] - mov r5, #0 - cmp r0, #0 - ble _02226270 - add r4, r7, #0 - add r6, r5, #0 -_02226256: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_0200D3F4 - add r0, r7, #0 - add r0, #0xac - ldrb r0, [r0] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, r0 - blt _02226256 -_02226270: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022261C4 - - thumb_func_start ov12_02226274 -ov12_02226274: ; 0x02226274 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0 - add r2, sp, #0x10 - mov r1, #1 -_02226280: - add r0, r0, #1 - stmia r2!, {r1} - cmp r0, #4 - blt _02226280 - add r0, r5, #0 - add r0, #0xa8 - ldrh r2, [r0] - add r0, r5, #0 - add r0, #0xaa - ldrh r0, [r0] - cmp r2, r0 - bhi _022262C0 - add r0, r5, #0 - add r0, #0xad - ldrb r0, [r0] - lsl r0, r0, #2 - add r0, r5, r0 - add r0, #0x98 - ldr r0, [r0, #0] - bl sub_0200D3F4 - add r0, r5, #0 - add r0, #0xad - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xad - strb r1, [r0] - add r0, r5, #0 - mov r1, #0 - add r0, #0xaa - strh r1, [r0] -_022262C0: - add r0, r5, #0 - add r0, #0xad - ldrb r1, [r0] - add r0, r5, #0 - add r0, #0xac - ldrb r0, [r0] - cmp r1, r0 - bhs _022262DE - add r0, r5, #0 - add r0, #0xaa - ldrh r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xaa - strh r1, [r0] -_022262DE: - mov r0, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xad - ldrb r0, [r0] - cmp r0, #0 - ble _0222637E - add r0, sp, #0x10 - add r7, r5, #4 - str r0, [sp, #4] - add r6, r5, #0 - add r4, r5, #0 -_022262F6: - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r7, #0 - blx r1 - ldr r1, [sp, #4] - cmp r0, #0 - str r0, [r1, #0] - beq _02226354 - add r0, r5, #0 - add r0, #0xae - ldrb r0, [r0] - cmp r0, #0 - bne _0222633A - mov r1, #0 - mov r2, #4 - ldrsh r1, [r5, r1] - ldrsh r2, [r6, r2] - add r0, r4, #0 - add r0, #0x98 - add r1, r1, r2 - mov r2, #2 - ldrsh r3, [r5, r2] - mov r2, #6 - ldrsh r2, [r6, r2] - lsl r1, r1, #0x10 - ldr r0, [r0, #0] - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - b _02226360 -_0222633A: - add r0, r7, #0 - add r1, sp, #0xc - add r2, sp, #8 - bl ov12_02225FA4 - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - bl sub_0200D6E8 - b _02226360 -_02226354: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 -_02226360: - ldr r0, [sp, #4] - add r7, #0x24 - add r0, r0, #4 - str r0, [sp, #4] - ldr r0, [sp] - add r6, #0x24 - add r0, r0, #1 - str r0, [sp] - add r0, r5, #0 - add r0, #0xad - ldrb r1, [r0] - ldr r0, [sp] - add r4, r4, #4 - cmp r0, r1 - blt _022262F6 -_0222637E: - add r5, #0xac - ldrb r2, [r5] - mov r3, #0 - cmp r2, #0 - ble _0222639E - add r1, sp, #0x10 -_0222638A: - ldr r0, [r1, #0] - cmp r0, #1 - bne _02226396 - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02226396: - add r3, r3, #1 - add r1, r1, #4 - cmp r3, r2 - blt _0222638A -_0222639E: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02226274 - - thumb_func_start ov12_022263A4 -ov12_022263A4: ; 0x022263A4 - push {r3, r4, r5, lr} - sub sp, #0x10 - ldr r3, _022263D4 ; =0x0000FFFF - add r4, r1, #0 - mov r1, #2 - str r3, [sp] - lsl r1, r1, #0x10 - str r1, [sp, #4] - ldr r1, _022263D8 ; =0xFFFF8000 - add r5, r0, #0 - str r1, [sp, #8] - str r2, [sp, #0xc] - mov r1, #0 - add r2, r3, #0 - add r3, r1, #0 - bl ov12_02225A5C - ldr r0, [r5, #4] - add r1, r0, #0 - mul r1, r4 - str r1, [r5, #4] - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_022263D4: .word 0x0000FFFF -_022263D8: .word 0xFFFF8000 - thumb_func_end ov12_022263A4 - - thumb_func_start ov12_022263DC -ov12_022263DC: ; 0x022263DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_02225C14 - cmp r0, #0 - bne _022263F8 - mov r0, #1 - str r0, [r4, #0x24] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} -_022263F8: - mov r0, #0 - ldrsh r1, [r4, r0] - cmp r1, #0 - bge _02226402 - strh r0, [r4] -_02226402: - mov r0, #2 - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _0222640E - mov r0, #0 - strh r0, [r4, #2] -_0222640E: - mov r0, #0 - ldrsh r1, [r4, r0] - mov r0, #2 - ldrsh r0, [r4, r0] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02226420 ; =0x04000052 - strh r1, [r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02226420: .word 0x04000052 - thumb_func_end ov12_022263DC - - thumb_func_start ov12_02226424 -ov12_02226424: ; 0x02226424 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, sp, #8 - mov r5, #0x10 - ldrsh r5, [r6, r5] - add r4, r0, #0 - str r5, [sp] - ldr r5, [sp, #0x1c] - lsl r5, r5, #0x10 - lsr r5, r5, #0x10 - str r5, [sp, #4] - bl ov12_02225BC8 - mov r2, #0 - ldr r0, _02226450 ; =ov12_022263DC - add r1, r4, #0 - str r2, [r4, #0x24] - bl sub_0200D9E8 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_02226450: .word ov12_022263DC - thumb_func_end ov12_02226424 - - thumb_func_start ov12_02226454 -ov12_02226454: ; 0x02226454 - ldr r0, [r0, #0x24] - bx lr - thumb_func_end ov12_02226454 - - thumb_func_start ov12_02226458 -ov12_02226458: ; 0x02226458 - push {r3, lr} - ldr r0, [r1, #8] - cmp r0, #0 - beq _0222646C - mov r0, #1 - str r0, [r1, #0xc] - ldr r0, [r1, #0x18] - ldr r1, [r1, #0x10] - blx r1 - pop {r3, pc} -_0222646C: - bl sub_02013BA8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02226458 - - thumb_func_start ov12_02226474 -ov12_02226474: ; 0x02226474 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _0222648E - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0222648E - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x14] - blx r1 - mov r0, #0 - str r0, [r4, #0xc] -_0222648E: - pop {r4, pc} - thumb_func_end ov12_02226474 - - thumb_func_start ov12_02226490 -ov12_02226490: ; 0x02226490 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _022264A2 - bl sub_02022974 -_022264A2: - mov r0, #1 - str r0, [r5, #8] - mov r2, #0 - str r2, [r5, #0xc] - str r4, [r5, #0x18] - str r6, [r5, #0x10] - ldr r0, _022264C8 ; =ov12_02226458 - str r7, [r5, #0x14] - add r1, r5, #0 - bl sub_0200DA3C - str r0, [r5, #4] - ldr r0, _022264CC ; =ov12_02226474 - add r1, r5, #0 - mov r2, #0 - bl sub_0200DA04 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022264C8: .word ov12_02226458 -_022264CC: .word ov12_02226474 - thumb_func_end ov12_02226490 - - thumb_func_start ov12_022264D0 -ov12_022264D0: ; 0x022264D0 - push {r4, lr} - add r4, r0, #0 - bne _022264DA - bl sub_02022974 -_022264DA: - ldr r0, [r4, #4] - cmp r0, #0 - beq _022264E4 - bl sub_0200DA58 -_022264E4: - ldr r0, [r4, #0] - cmp r0, #0 - beq _022264EE - bl sub_0200DA58 -_022264EE: - bl sub_02013BA8 - pop {r4, pc} - thumb_func_end ov12_022264D0 - - thumb_func_start ov12_022264F4 -ov12_022264F4: ; 0x022264F4 - push {r4, lr} - add r4, r0, #0 - bne _022264FE - bl sub_02022974 -_022264FE: - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} - thumb_func_end ov12_022264F4 - - thumb_func_start ov12_02226504 -ov12_02226504: ; 0x02226504 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_02013B68 - add r5, r0, #0 - bl sub_02013BA8 - mov r1, #0x62 - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r5, #0 - mov r2, #4 - mov r3, #1 - bl sub_02013BB8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02226504 - - thumb_func_start ov12_02226528 -ov12_02226528: ; 0x02226528 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_02013B94 - add r0, r4, #0 - bl ov12_02226504 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02226528 - - thumb_func_start ov12_0222653C -ov12_0222653C: ; 0x0222653C - ldr r3, _02226540 ; =ov12_02226504 - bx r3 - ; .align 2, 0 -_02226540: .word ov12_02226504 - thumb_func_end ov12_0222653C - - thumb_func_start ov12_02226544 -ov12_02226544: ; 0x02226544 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r2, #0 - add r5, r0, #0 - ldr r1, _022265B4 ; =0x00000624 - add r0, r7, #0 - bl sub_02018144 - ldr r2, _022265B4 ; =0x00000624 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - cmp r4, #0 - bne _02226566 - bl sub_02022974 -_02226566: - mov r2, #0x32 - add r1, r4, #0 - lsl r2, r2, #4 - add r0, r7, #0 - add r1, #0x20 - add r2, r4, r2 - bl sub_02013B10 - str r0, [r4, #0x1c] - cmp r0, #0 - bne _02226580 - bl sub_02022974 -_02226580: - mov r0, #0x62 - lsl r0, r0, #4 - add r1, r4, #0 - mov r2, #3 - str r5, [r4, r0] - add r0, r6, #0 - add r1, #0x20 - lsl r2, r2, #8 - bl sub_020C4B4C - mov r2, #0x32 - lsl r2, r2, #4 - add r1, r4, r2 - add r0, r6, #0 - sub r2, #0x20 - bl sub_020C4B4C - ldr r2, _022265B8 ; =ov12_02226528 - ldr r3, _022265BC ; =ov12_0222653C - add r0, r4, #0 - add r1, r4, #0 - bl ov12_02226490 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022265B4: .word 0x00000624 -_022265B8: .word ov12_02226528 -_022265BC: .word ov12_0222653C - thumb_func_end ov12_02226544 - - thumb_func_start ov12_022265C0 -ov12_022265C0: ; 0x022265C0 - push {r4, lr} - add r4, r0, #0 - bne _022265CA - bl sub_02022974 -_022265CA: - add r0, r4, #0 - bl ov12_022264D0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _022265DA - bl sub_02013B40 -_022265DA: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022265C0 - - thumb_func_start ov12_022265E4 -ov12_022265E4: ; 0x022265E4 - push {r4, lr} - add r4, r0, #0 - bne _022265EE - bl sub_02022974 -_022265EE: - ldr r0, [r4, #0x1c] - bl sub_02013B54 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022265E4 - - thumb_func_start ov12_022265F8 -ov12_022265F8: ; 0x022265F8 - push {r4, lr} - add r4, r0, #0 - bne _02226602 - bl sub_02022974 -_02226602: - add r0, r4, #0 - bl ov12_022264F4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022265F8 - - thumb_func_start ov12_0222660C -ov12_0222660C: ; 0x0222660C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_02013DA4 - ldr r0, [r4, #0x1c] - bl sub_02013DDC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222660C - - thumb_func_start ov12_02226620 -ov12_02226620: ; 0x02226620 - ldr r3, _02226628 ; =sub_02013DDC - ldr r0, [r0, #0x1c] - bx r3 - nop -_02226628: .word sub_02013DDC - thumb_func_end ov12_02226620 - - thumb_func_start ov12_0222662C -ov12_0222662C: ; 0x0222662C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - str r1, [sp, #0x14] - ldr r0, [sp, #0x40] - mov r1, #0x20 - str r2, [sp, #0x18] - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - bne _02226648 - bl sub_02022974 -_02226648: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - ldr r0, [sp, #0x34] - bl ov12_022266F0 - add r6, r0, #0 - ldr r0, [sp, #0x40] - bl sub_02013BE0 - str r0, [r4, #0x1c] - str r5, [sp] - add r1, sp, #0x20 - mov r0, #0x10 - ldrsh r0, [r1, r0] - add r1, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x3c] - str r6, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x38] - str r0, [sp, #0x10] - ldr r0, [r4, #0x1c] - ldr r2, [sp, #0x14] - ldr r3, [sp, #0x18] - bl sub_02013C10 - ldr r2, _02226694 ; =ov12_0222660C - ldr r3, _02226698 ; =ov12_02226620 - add r0, r4, #0 - add r1, r4, #0 - bl ov12_02226490 - add r0, r4, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02226694: .word ov12_0222660C -_02226698: .word ov12_02226620 - thumb_func_end ov12_0222662C - - thumb_func_start ov12_0222669C -ov12_0222669C: ; 0x0222669C - push {r4, lr} - add r4, r0, #0 - bne _022266A6 - bl sub_02022974 -_022266A6: - add r0, r4, #0 - bl ov12_022264D0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _022266B6 - bl sub_02013D74 -_022266B6: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222669C - - thumb_func_start ov12_022266C0 -ov12_022266C0: ; 0x022266C0 - push {r4, lr} - add r4, r0, #0 - bne _022266CA - bl sub_02022974 -_022266CA: - ldr r0, [r4, #0x1c] - bl sub_02013D94 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022266C0 - - thumb_func_start ov12_022266D4 -ov12_022266D4: ; 0x022266D4 - push {r4, lr} - add r4, r0, #0 - bne _022266DE - bl sub_02022974 -_022266DE: - add r0, r4, #0 - bl ov12_022264F4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022266D4 - - thumb_func_start ov12_022266E8 -ov12_022266E8: ; 0x022266E8 - lsl r1, r1, #0x10 - orr r0, r1 - bx lr - ; .align 2, 0 - thumb_func_end ov12_022266E8 - - thumb_func_start ov12_022266F0 -ov12_022266F0: ; 0x022266F0 - cmp r0, #3 - bhi _02226716 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02226700: ; jump table - .short _02226708 - _02226700 - 2 ; case 0 - .short _0222670C - _02226700 - 2 ; case 1 - .short _02226710 - _02226700 - 2 ; case 2 - .short _02226714 - _02226700 - 2 ; case 3 -_02226708: - ldr r0, _02226718 ; =0x04000010 - bx lr -_0222670C: - ldr r0, _0222671C ; =0x04000014 - bx lr -_02226710: - ldr r0, _02226720 ; =0x04000018 - bx lr -_02226714: - ldr r0, _02226724 ; =0x0400001C -_02226716: - bx lr - ; .align 2, 0 -_02226718: .word 0x04000010 -_0222671C: .word 0x04000014 -_02226720: .word 0x04000018 -_02226724: .word 0x0400001C - thumb_func_end ov12_022266F0 - - thumb_func_start ov12_02226728 -ov12_02226728: ; 0x02226728 - add r2, r0, r2 - lsr r0, r2, #0x1f - add r0, r2, r0 - asr r2, r0, #1 - ldr r0, [sp] - add r1, r1, r3 - strh r2, [r0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - ldr r0, [sp, #4] - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02226728 - - thumb_func_start ov12_02226744 -ov12_02226744: ; 0x02226744 - push {r3, lr} - sub r1, r1, r3 - neg r1, r1 - sub r0, r0, r2 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - asr r1, r1, #0x10 - add r2, r1, #0 - asr r0, r0, #0x10 - mul r2, r1 - add r1, r0, #0 - mul r1, r0 - add r0, r2, r1 - lsl r0, r0, #0xc - bl sub_020BCFF0 - ldr r1, [sp, #8] - str r0, [r1, #0] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02226744 - - thumb_func_start ov12_0222676C -ov12_0222676C: ; 0x0222676C - push {r4, r5, r6, lr} - add r6, r0, #0 - sub r0, r1, r3 - neg r0, r0 - lsl r0, r0, #0x10 - sub r1, r6, r2 - asr r4, r0, #0x10 - lsl r1, r1, #0x10 - ldr r5, [sp, #0x10] - lsl r0, r4, #0xc - asr r1, r1, #4 - bl sub_020BDA20 - strh r0, [r5] - ldrh r1, [r5] - cmp r1, #0 - beq _0222679C - cmp r4, #0 - bge _0222679C - ldr r0, _022267A0 ; =0x00007FFF - sub r1, r1, r0 - ldr r0, _022267A4 ; =0x0000FFFF - mul r0, r1 - strh r0, [r5] -_0222679C: - pop {r4, r5, r6, pc} - nop -_022267A0: .word 0x00007FFF -_022267A4: .word 0x0000FFFF - thumb_func_end ov12_0222676C - - thumb_func_start ov12_022267A8 -ov12_022267A8: ; 0x022267A8 - cmp r2, #0 - ldr r3, [r0, #0] - bge _022267C0 - add r2, r3, r2 - cmp r2, r1 - ble _022267BA - str r2, [r0, #0] - mov r0, #0 - bx lr -_022267BA: - str r1, [r0, #0] - mov r0, #1 - bx lr -_022267C0: - add r2, r3, r2 - cmp r2, r1 - bge _022267CC - str r2, [r0, #0] - mov r0, #0 - bx lr -_022267CC: - str r1, [r0, #0] - mov r0, #1 - bx lr - ; .align 2, 0 - thumb_func_end ov12_022267A8 - - thumb_func_start ov12_022267D4 -ov12_022267D4: ; 0x022267D4 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02226844 - mov r0, #0x17 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0x17] - ldrsb r1, [r4, r0] - mov r0, #0x16 - ldrsb r0, [r4, r0] - cmp r1, r0 - blt _02226844 - mov r0, #0 - strb r0, [r4, #0x17] - ldrb r0, [r4, #0x14] - str r0, [sp] - ldrh r0, [r4, #0x10] - str r0, [sp, #4] - ldrh r2, [r4, #0xc] - ldrh r3, [r4, #0xe] - ldr r0, [r4, #0x18] - ldr r1, [r4, #8] - bl sub_020039B0 - ldrb r3, [r4, #0x13] - ldrb r1, [r4, #0x14] - cmp r1, r3 - bne _0222681A - mov r0, #0 - add sp, #8 - str r0, [r4, #0] - pop {r4, pc} -_0222681A: - mov r0, #0x15 - ldrsb r2, [r4, r0] - add r1, r1, r2 - lsl r0, r1, #0x18 - asr r0, r0, #0x18 - cmp r2, #0 - ble _02226838 - cmp r0, r3 - ble _02226832 - add sp, #8 - strb r3, [r4, #0x14] - pop {r4, pc} -_02226832: - add sp, #8 - strb r1, [r4, #0x14] - pop {r4, pc} -_02226838: - cmp r0, r3 - bge _02226842 - add sp, #8 - strb r3, [r4, #0x14] - pop {r4, pc} -_02226842: - strb r1, [r4, #0x14] -_02226844: - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_022267D4 - - thumb_func_start ov12_02226848 -ov12_02226848: ; 0x02226848 - push {r4, lr} - add r4, r0, #0 - bne _02226852 - bl sub_02022974 -_02226852: - ldr r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02226848 - - thumb_func_start ov12_02226858 -ov12_02226858: ; 0x02226858 - push {r4, lr} - add r4, r0, #0 - bne _02226862 - bl sub_02022974 -_02226862: - ldr r0, [r4, #4] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov12_02226858 - - thumb_func_start ov12_02226870 -ov12_02226870: ; 0x02226870 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, r1, #0 - mov r1, #0x1c - add r6, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - bne _02226888 - bl sub_02022974 -_02226888: - str r5, [r4, #0x18] - str r6, [r4, #8] - strh r7, [r4, #0xc] - add r1, sp, #8 - ldrh r0, [r1, #0x10] - strh r0, [r4, #0xe] - ldrh r0, [r1, #0x24] - strh r0, [r4, #0x10] - ldrb r2, [r1, #0x1c] - add r0, sp, #0x28 - ldrb r0, [r0] - strb r2, [r4, #0x12] - strb r0, [r4, #0x13] - strb r2, [r4, #0x14] - mov r0, #0x14 - ldrsb r0, [r1, r0] - strb r0, [r4, #0x16] - strb r0, [r4, #0x17] - ldrb r2, [r4, #0x12] - ldrb r0, [r4, #0x13] - cmp r2, r0 - bhs _022268BA - mov r0, #0x18 - ldrsb r0, [r1, r0] - b _022268C0 -_022268BA: - mov r0, #0x18 - ldrsb r0, [r1, r0] - neg r0, r0 -_022268C0: - strb r0, [r4, #0x15] - mov r0, #1 - str r0, [r4, #0] - ldr r0, _022268D8 ; =ov12_022267D4 - ldr r2, [sp, #0x30] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022268D8: .word ov12_022267D4 - thumb_func_end ov12_02226870 - - thumb_func_start ov12_022268DC -ov12_022268DC: ; 0x022268DC - push {r4, r5, r6, r7} - mov r7, #0 - cmp r1, #0 - ble _0222691E - mov r2, #0x97 -_022268E6: - ldrh r6, [r0] - mov r3, #0x1f - add r7, r7, #1 - asr r4, r6, #0xa - and r4, r3 - add r5, r4, #0 - mov r3, #0x1d - mul r5, r3 - mov r3, #0x1f - and r3, r6 - mov r4, #0x4c - mul r4, r3 - asr r6, r6, #5 - mov r3, #0x1f - and r3, r6 - add r6, r3, #0 - mul r6, r2 - add r3, r4, r6 - add r3, r5, r3 - asr r5, r3, #8 - lsl r4, r5, #0xa - lsl r3, r5, #5 - orr r3, r4 - orr r3, r5 - strh r3, [r0] - add r0, r0, #2 - cmp r7, r1 - blt _022268E6 -_0222691E: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov12_022268DC - - thumb_func_start ov12_02226924 -ov12_02226924: ; 0x02226924 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_0222332C - mov r1, #0 - bl sub_0200316C - add r4, r0, #0 - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02226948 - add r0, r4, #0 - mov r1, #0x30 - bl ov12_022268DC - pop {r3, r4, r5, pc} -_02226948: - add r0, r4, #0 - mov r1, #0x80 - bl ov12_022268DC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02226924 - - thumb_func_start ov12_02226954 -ov12_02226954: ; 0x02226954 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - bl ov12_0222332C - add r4, r0, #0 - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02226980 - mov r1, #0 - str r1, [sp] - mov r0, #0x60 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02003120 - add sp, #8 - pop {r3, r4, r5, pc} -_02226980: - mov r1, #0 - mov r0, #1 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02003120 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02226954 - - thumb_func_start ov12_02226998 -ov12_02226998: ; 0x02226998 - cmp r0, #0x54 - blo _022269A0 - mov r0, #0 - bx lr -_022269A0: - lsl r1, r0, #2 - ldr r0, _022269A8 ; =0x02239EEC - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_022269A8: .word 0x02239EEC - thumb_func_end ov12_02226998 - - thumb_func_start ov12_022269AC -ov12_022269AC: ; 0x022269AC - cmp r0, #0x21 - blo _022269B4 - mov r0, #0 - bx lr -_022269B4: - lsl r1, r0, #2 - ldr r0, _022269BC ; =0x02239E68 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_022269BC: .word 0x02239E68 - thumb_func_end ov12_022269AC - - thumb_func_start ov12_022269C0 -ov12_022269C0: ; 0x022269C0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_022269C0 - - thumb_func_start ov12_022269C4 -ov12_022269C4: ; 0x022269C4 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _022269D6 - cmp r0, #1 - beq _022269DC - pop {r4, pc} -_022269D6: - add r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_022269DC: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov12_022269C4 - - thumb_func_start ov12_022269EC -ov12_022269EC: ; 0x022269EC - push {r4, lr} - add r4, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r2, r0, #0 - mov r0, #0 - strb r0, [r2] - mov r3, #1 - ldr r1, _02226A10 ; =ov12_022269C4 - add r0, r4, #0 - lsl r3, r3, #0xc - str r4, [r2, #4] - bl ov12_022201CC - pop {r4, pc} - nop -_02226A10: .word ov12_022269C4 - thumb_func_end ov12_022269EC - - thumb_func_start ov12_02226A14 -ov12_02226A14: ; 0x02226A14 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _02226A26 - cmp r0, #1 - beq _02226A2C - pop {r4, pc} -_02226A26: - add r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_02226A2C: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220230 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov12_02226A14 - - thumb_func_start ov12_02226A3C -ov12_02226A3C: ; 0x02226A3C - push {r4, lr} - add r4, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r2, r0, #0 - mov r0, #0 - strb r0, [r2] - mov r3, #1 - ldr r1, _02226A60 ; =ov12_02226A14 - add r0, r4, #0 - lsl r3, r3, #0xc - str r4, [r2, #4] - bl ov12_02220204 - pop {r4, pc} - nop -_02226A60: .word ov12_02226A14 - thumb_func_end ov12_02226A3C - - thumb_func_start ov12_02226A64 -ov12_02226A64: ; 0x02226A64 - push {r4, lr} - add r4, r1, #0 - ldrb r1, [r4] - cmp r1, #0 - beq _02226A74 - cmp r1, #1 - beq _02226A7A - pop {r4, pc} -_02226A74: - add r0, r1, #1 - strb r0, [r4] - pop {r4, pc} -_02226A7A: - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02226A64 - - thumb_func_start ov12_02226A88 -ov12_02226A88: ; 0x02226A88 - push {r4, lr} - add r4, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r1, r0, #0 - mov r0, #0 - strb r0, [r1] - mov r2, #1 - ldr r0, _02226AA8 ; =ov12_02226A64 - lsl r2, r2, #0xc - str r4, [r1, #4] - bl sub_0200D9E8 - pop {r4, pc} - ; .align 2, 0 -_02226AA8: .word ov12_02226A64 - thumb_func_end ov12_02226A88 - - thumb_func_start ov12_02226AAC -ov12_02226AAC: ; 0x02226AAC - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldrb r0, [r5] - cmp r0, #0 - beq _02226ABE - cmp r0, #1 - beq _02226B04 - pop {r4, r5, r6, pc} -_02226ABE: - ldr r0, [r5, #0x14] - ldr r0, [r0, #0] - bl sub_0200D324 - ldr r0, [r5, #0x18] - ldr r0, [r0, #0] - bl sub_0200D324 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0200D324 - ldr r0, [r5, #0x14] - mov r1, #1 - ldr r0, [r0, #0] - mov r2, #0 - bl sub_0200D5AC - ldr r0, [r5, #0x18] - mov r1, #0 - ldr r0, [r0, #0] - mvn r1, r1 - mov r2, #0 - bl sub_0200D5AC - ldr r0, [r5, #0x1c] - mov r1, #1 - ldr r0, [r0, #0] - add r2, r1, #0 - bl sub_0200D5AC - ldr r0, [r5, #0xc] - bl sub_0200C7EC - pop {r4, r5, r6, pc} -_02226B04: - ldr r0, [r5, #0x10] - ldr r4, [r5, #4] - bl sub_0200D0F4 - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - add r1, r6, #0 - bl ov12_02220220 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02226AAC - - thumb_func_start ov12_02226B1C -ov12_02226B1C: ; 0x02226B1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r6, r1, #0 - mov r1, #0x73 - str r0, [sp] - mov r0, #5 - lsl r1, r1, #2 - add r7, r2, #0 - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - bne _02226B3A - bl sub_02022974 -_02226B3A: - mov r0, #0 - strb r0, [r4] - str r6, [r4, #8] - str r7, [r4, #0xc] - ldr r0, [sp] - str r5, [r4, #0x10] - str r0, [r4, #4] - ldr r1, [sp] - add r0, sp, #4 - bl ov12_0222329C - str r5, [r4, #0x14] - mov r6, #1 - add r5, r4, #4 - add r7, sp, #4 -_02226B58: - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - add r2, r7, #0 - bl sub_0200CE6C - str r0, [r5, #0x14] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _02226B58 - mov r3, #1 - ldr r0, [sp] - ldr r1, _02226B80 ; =ov12_02226AAC - add r2, r4, #0 - lsl r3, r3, #0xc - bl ov12_022201CC - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02226B80: .word ov12_02226AAC - thumb_func_end ov12_02226B1C - - thumb_func_start ov12_02226B84 -ov12_02226B84: ; 0x02226B84 - push {r4, lr} - mov r1, #0xc - add r2, r1, #0 - add r2, #0xf4 - add r4, r0, #0 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - pop {r4, pc} - thumb_func_end ov12_02226B84 - - thumb_func_start ov12_02226BA0 -ov12_02226BA0: ; 0x02226BA0 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r2, r0, #0 - ldrb r0, [r5, #4] - cmp r0, #0 - beq _02226BB2 - cmp r0, #1 - beq _02226BD4 - b _02226C9E -_02226BB2: - mov r0, #0x26 - ldrsh r0, [r5, r0] - mov r1, #0x20 - mov r2, #0x22 - str r0, [sp] - mov r3, #0x24 - add r0, r5, #0 - ldrsh r1, [r5, r1] - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - add r0, #0x7c - bl ov12_02226108 - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_02226BD4: - add r0, r5, #0 - add r0, #0x7c - bl ov12_02226138 - cmp r0, #0 - bne _02226BE8 - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_02226BE8: - ldr r2, [r5, #0x28] - mov r1, #1 - lsl r1, r1, #8 - add r0, r2, #0 - and r0, r1 - cmp r0, r1 - bne _02226C34 - ldr r0, [r5, #0] - mov r6, #0 - cmp r0, #0 - ble _02226C82 - add r4, r5, #0 - mov r7, #0x32 -_02226C02: - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _02226C28 - mov r2, #0x7c - mov r3, #0x30 - ldrsh r2, [r5, r2] - ldrsh r3, [r4, r3] - mov r1, #0 - add r2, r2, r3 - bl sub_02007DEC - mov r2, #0x7e - ldrsh r3, [r5, r2] - ldrsh r2, [r4, r7] - ldr r0, [r4, #0x34] - mov r1, #1 - add r2, r3, r2 - bl sub_02007DEC -_02226C28: - ldr r0, [r5, #0] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _02226C02 - b _02226C82 -_02226C34: - lsl r0, r1, #1 - and r2, r0 - cmp r2, r0 - bne _02226C82 - ldr r0, [r5, #0] - mov r6, #0 - cmp r0, #0 - ble _02226C7C - add r4, r5, #0 - mov r7, #0x32 -_02226C48: - ldr r0, [r4, #0x38] - cmp r0, #0 - beq _02226C72 - mov r1, #0x7c - mov r2, #0x30 - ldrsh r1, [r5, r1] - ldrsh r2, [r4, r2] - add r1, r1, r2 - mov r2, #0x7e - ldrsh r3, [r5, r2] - ldrsh r2, [r4, r7] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #0x38] - bl sub_0200D330 -_02226C72: - ldr r0, [r5, #0] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _02226C48 -_02226C7C: - ldr r0, [r5, #0x10] - bl sub_0200C7EC -_02226C82: - mov r0, #1 - ldr r1, [r5, #0x28] - lsl r0, r0, #0xa - and r1, r0 - cmp r1, r0 - bne _02226CAC - mov r3, #0x7c - ldrsh r3, [r5, r3] - ldr r0, [r5, #0x18] - mov r1, #3 - mov r2, #0 - bl sub_02019184 - pop {r3, r4, r5, r6, r7, pc} -_02226C9E: - ldr r0, [r5, #8] - add r1, r2, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 -_02226CAC: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02226BA0 - - thumb_func_start ov12_02226CB0 -ov12_02226CB0: ; 0x02226CB0 - push {r3, r4, r5, lr} - mov r1, #0xa0 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #4 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - strh r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0x22] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - strh r0, [r4, #0x24] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #0x26] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - mov r2, #1 - lsl r2, r2, #8 - str r0, [r4, #0x28] - add r1, r0, #0 - and r0, r2 - cmp r0, r2 - bne _02226D10 - add r2, r4, #0 - add r0, r5, #0 - add r2, #0x2c - add r3, r4, #0 - bl ov12_02235998 - b _02226D26 -_02226D10: - lsl r0, r2, #1 - add r3, r1, #0 - and r3, r0 - cmp r3, r0 - bne _02226D26 - add r2, r4, #0 - add r0, r5, #0 - add r2, #0x2c - add r3, r4, #0 - bl ov12_02235D74 -_02226D26: - ldr r0, [r4, #8] - ldr r1, _02226D34 ; =ov12_02226BA0 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_02226D34: .word ov12_02226BA0 - thumb_func_end ov12_02226CB0 - - thumb_func_start ov12_02226D38 -ov12_02226D38: ; 0x02226D38 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x1c] - cmp r0, #3 - bhi _02226E02 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02226D50: ; jump table - .short _02226D58 - _02226D50 - 2 ; case 0 - .short _02226D76 - _02226D50 - 2 ; case 1 - .short _02226DB8 - _02226D50 - 2 ; case 2 - .short _02226DC4 - _02226D50 - 2 ; case 3 -_02226D58: - ldrh r0, [r4, #0x18] - mov r1, #4 - mov r2, #0x39 - str r0, [sp] - ldrh r3, [r4, #0x16] - ldr r0, _02226EA4 ; =0x04000050 - bl sub_020BF55C - mov r0, #2 - mov r1, #1 - bl sub_02019120 - ldrb r0, [r4, #0x1c] - add r0, r0, #1 - strb r0, [r4, #0x1c] -_02226D76: - ldrh r1, [r4, #8] - ldrh r2, [r4, #0x16] - mov r0, #0 - sub r1, r1, #2 - cmp r2, r1 - bge _02226D88 - add r1, r2, #2 - strh r1, [r4, #0x16] - b _02226D8A -_02226D88: - add r0, r0, #1 -_02226D8A: - ldrh r1, [r4, #0x18] - cmp r1, #9 - bls _02226D96 - sub r1, r1, #2 - strh r1, [r4, #0x18] - b _02226D98 -_02226D96: - add r0, r0, #1 -_02226D98: - cmp r0, #2 - bne _02226DAA - ldrh r0, [r4, #8] - strh r0, [r4, #0x16] - mov r0, #7 - strh r0, [r4, #0x18] - ldrb r0, [r4, #0x1c] - add r0, r0, #1 - strb r0, [r4, #0x1c] -_02226DAA: - ldrh r0, [r4, #0x18] - ldrh r1, [r4, #0x16] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02226EA8 ; =0x04000052 - strh r1, [r0] - b _02226E1A -_02226DB8: - ldr r1, [r4, #4] - cmp r1, #0 - beq _02226E1A - add r0, r0, #1 - strb r0, [r4, #0x1c] - b _02226E1A -_02226DC4: - ldrh r0, [r4, #0x16] - mov r1, #0 - cmp r0, #2 - bls _02226DD2 - sub r0, r0, #2 - strh r0, [r4, #0x16] - b _02226DD4 -_02226DD2: - add r1, r1, #1 -_02226DD4: - ldrh r0, [r4, #0x18] - cmp r0, #0x1d - bhs _02226DE0 - add r0, r0, #2 - strh r0, [r4, #0x18] - b _02226DE2 -_02226DE0: - add r1, r1, #1 -_02226DE2: - cmp r1, #2 - bne _02226DF4 - mov r0, #0 - strh r0, [r4, #0x16] - mov r0, #0x1f - strh r0, [r4, #0x18] - ldrb r0, [r4, #0x1c] - add r0, r0, #1 - strb r0, [r4, #0x1c] -_02226DF4: - ldrh r0, [r4, #0x18] - ldrh r1, [r4, #0x16] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02226EA8 ; =0x04000052 - strh r1, [r0] - b _02226E1A -_02226E02: - mov r0, #2 - mov r1, #0 - bl sub_02019120 - ldr r0, [r4, #0x20] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_02226E1A: - mov r1, #0x10 - ldrsh r3, [r4, r1] - cmp r3, #0 - ble _02226E2C - mov r0, #0xc - ldrsh r2, [r4, r0] - lsl r0, r1, #5 - cmp r2, r0 - bge _02226E3A -_02226E2C: - cmp r3, #0 - bge _02226E3E - mov r0, #0xc - ldrsh r1, [r4, r0] - ldr r0, _02226EAC ; =0xFFFFFE64 - cmp r1, r0 - bgt _02226E3E -_02226E3A: - mov r0, #1 - str r0, [r4, #4] -_02226E3E: - mov r0, #0xa - ldrsh r1, [r4, r0] - mov r0, #0xe - ldrsh r0, [r4, r0] - add r0, r1, r0 - strh r0, [r4, #0xa] - mov r0, #0xc - ldrsh r2, [r4, r0] - mov r0, #0x10 - ldrsh r1, [r4, r0] - add r1, r2, r1 - strh r1, [r4, #0xc] - ldrh r2, [r4, #0x12] - ldrh r1, [r4, #0x14] - cmp r2, r1 - bhs _02226E82 - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _02226E68 - add r0, r0, #1 - b _02226E6A -_02226E68: - mov r0, #0 -_02226E6A: - strh r0, [r4, #0x10] - mov r0, #0xe - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _02226E78 - add r0, r0, #1 - b _02226E7A -_02226E78: - mov r0, #0 -_02226E7A: - strh r0, [r4, #0xe] - mov r0, #0 - strh r0, [r4, #0x14] - b _02226E86 -_02226E82: - add r0, r1, #1 - strh r0, [r4, #0x14] -_02226E86: - mov r3, #0xa - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #3 - bl sub_02019184 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02226EA4: .word 0x04000050 -_02226EA8: .word 0x04000052 -_02226EAC: .word 0xFFFFFE64 - thumb_func_end ov12_02226D38 - - thumb_func_start ov12_02226EB0 -ov12_02226EB0: ; 0x02226EB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0xb8 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x1c - bl ov12_0223595C - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #0xe] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strh r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - strh r0, [r4, #8] - add r0, r5, #0 - mov r1, #7 - bl ov12_02220280 - strh r0, [r4, #0x12] - mov r0, #0 - strh r0, [r4, #0x14] - ldr r0, [r4, #0] - cmp r0, #0 - beq _02226F5C - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - bne _02226F5C - mov r0, #0xa - ldrsh r1, [r4, r0] - sub r0, #0xb - mul r0, r1 - strh r0, [r4, #0xa] - mov r1, #0xc - add r0, r1, #0 - ldrsh r2, [r4, r1] - sub r0, #0xd - mul r0, r2 - strh r0, [r4, #0xc] - mov r0, #0xe - ldrsh r2, [r4, r0] - sub r0, #0xf - mul r0, r2 - strh r0, [r4, #0xe] - mov r0, #0x10 - ldrsh r2, [r4, r0] - sub r0, #0x11 - mul r0, r2 - strh r0, [r4, #0x10] - ldrsh r0, [r4, r1] - sub r0, #0x54 - strh r0, [r4, #0xc] - b _02226F64 -_02226F5C: - mov r0, #0xc - ldrsh r0, [r4, r0] - add r0, #0x54 - strh r0, [r4, #0xc] -_02226F64: - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02226F78 - mov r0, #0xe - ldrsh r1, [r4, r0] - sub r0, #0xf - mul r0, r1 - strh r0, [r4, #0xe] -_02226F78: - mov r1, #0 - strh r1, [r4, #0x16] - mov r0, #0x1f - strh r0, [r4, #0x18] - mov r0, #2 - str r1, [r4, #4] - bl sub_02019120 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - mov r1, #0 - add r7, r0, #0 - bl ov12_022234E4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r2, [r4, #0x30] - mov r0, #7 - add r1, r6, #0 - mov r3, #2 - bl sub_02006E3C - add r0, r7, #0 - mov r1, #1 - bl ov12_022234E4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x90 - str r0, [sp, #8] - ldr r0, [r4, #0x34] - mov r1, #7 - add r2, r6, #0 - bl sub_02003050 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_02019EBC - add r0, r5, #0 - mov r6, #2 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02226FF8 - mov r6, #4 - b _0222700C -_02226FF8: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222700C - mov r6, #3 -_0222700C: - add r0, r7, #0 - add r1, r6, #0 - bl ov12_022234E4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r2, [r4, #0x30] - mov r0, #7 - add r1, r6, #0 - mov r3, #2 - bl sub_02006E60 - mov r3, #0xa - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #3 - bl sub_02019184 - ldr r0, [r4, #0x20] - ldr r1, _02227060 ; =ov12_02226D38 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02227060: .word ov12_02226D38 - thumb_func_end ov12_02226EB0 - - thumb_func_start ov12_02227064 -ov12_02227064: ; 0x02227064 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x1c] - cmp r0, #3 - bhi _0222712A - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222707C: ; jump table - .short _02227084 - _0222707C - 2 ; case 0 - .short _022270A2 - _0222707C - 2 ; case 1 - .short _022270E0 - _0222707C - 2 ; case 2 - .short _022270EC - _0222707C - 2 ; case 3 -_02227084: - ldrh r0, [r4, #0x18] - mov r1, #4 - mov r2, #0x39 - str r0, [sp] - ldrh r3, [r4, #0x16] - ldr r0, _022271CC ; =0x04000050 - bl sub_020BF55C - mov r0, #2 - mov r1, #1 - bl sub_02019120 - ldrb r0, [r4, #0x1c] - add r0, r0, #1 - strb r0, [r4, #0x1c] -_022270A2: - ldrh r0, [r4, #0x16] - mov r1, #0 - cmp r0, #0x10 - bhs _022270B0 - add r0, r0, #2 - strh r0, [r4, #0x16] - b _022270B2 -_022270B0: - add r1, r1, #1 -_022270B2: - ldrh r0, [r4, #0x18] - cmp r0, #4 - bls _022270BE - sub r0, r0, #2 - strh r0, [r4, #0x18] - b _022270C0 -_022270BE: - add r1, r1, #1 -_022270C0: - cmp r1, #2 - bne _022270D2 - mov r0, #0x10 - strh r0, [r4, #0x16] - mov r0, #4 - strh r0, [r4, #0x18] - ldrb r0, [r4, #0x1c] - add r0, r0, #1 - strb r0, [r4, #0x1c] -_022270D2: - ldrh r0, [r4, #0x18] - ldrh r1, [r4, #0x16] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _022271D0 ; =0x04000052 - strh r1, [r0] - b _02227142 -_022270E0: - ldr r1, [r4, #4] - cmp r1, #0 - beq _02227142 - add r0, r0, #1 - strb r0, [r4, #0x1c] - b _02227142 -_022270EC: - ldrh r0, [r4, #0x16] - mov r1, #0 - cmp r0, #2 - bls _022270FA - sub r0, r0, #2 - strh r0, [r4, #0x16] - b _022270FC -_022270FA: - add r1, r1, #1 -_022270FC: - ldrh r0, [r4, #0x18] - cmp r0, #0x10 - bhs _02227108 - add r0, r0, #2 - strh r0, [r4, #0x18] - b _0222710A -_02227108: - add r1, r1, #1 -_0222710A: - cmp r1, #2 - bne _0222711C - mov r0, #0 - strh r0, [r4, #0x16] - mov r0, #0x1f - strh r0, [r4, #0x18] - ldrb r0, [r4, #0x1c] - add r0, r0, #1 - strb r0, [r4, #0x1c] -_0222711C: - ldrh r0, [r4, #0x18] - ldrh r1, [r4, #0x16] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _022271D0 ; =0x04000052 - strh r1, [r0] - b _02227142 -_0222712A: - mov r0, #2 - mov r1, #0 - bl sub_02019120 - ldr r0, [r4, #0x20] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_02227142: - mov r1, #0x10 - ldrsh r3, [r4, r1] - cmp r3, #0 - ble _02227154 - mov r0, #0xc - ldrsh r2, [r4, r0] - lsl r0, r1, #5 - cmp r2, r0 - bge _02227162 -_02227154: - cmp r3, #0 - bge _02227166 - mov r0, #0xc - ldrsh r1, [r4, r0] - ldr r0, _022271D4 ; =0xFFFFFE64 - cmp r1, r0 - bgt _02227166 -_02227162: - mov r0, #1 - str r0, [r4, #4] -_02227166: - mov r0, #0xa - ldrsh r1, [r4, r0] - mov r0, #0xe - ldrsh r0, [r4, r0] - add r0, r1, r0 - strh r0, [r4, #0xa] - mov r0, #0xc - ldrsh r2, [r4, r0] - mov r0, #0x10 - ldrsh r1, [r4, r0] - add r1, r2, r1 - strh r1, [r4, #0xc] - ldrh r2, [r4, #0x12] - ldrh r1, [r4, #0x14] - cmp r2, r1 - bhs _022271AA - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _02227190 - add r0, r0, #1 - b _02227192 -_02227190: - mov r0, #0 -_02227192: - strh r0, [r4, #0x10] - mov r0, #0xe - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _022271A0 - add r0, r0, #1 - b _022271A2 -_022271A0: - mov r0, #0 -_022271A2: - strh r0, [r4, #0xe] - mov r0, #0 - strh r0, [r4, #0x14] - b _022271AE -_022271AA: - add r0, r1, #1 - strh r0, [r4, #0x14] -_022271AE: - mov r3, #0xa - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #3 - bl sub_02019184 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022271CC: .word 0x04000050 -_022271D0: .word 0x04000052 -_022271D4: .word 0xFFFFFE64 - thumb_func_end ov12_02227064 - - thumb_func_start ov12_022271D8 -ov12_022271D8: ; 0x022271D8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0xb8 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x1c - bl ov12_0223595C - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #0xe] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strh r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - strh r0, [r4, #8] - add r0, r5, #0 - mov r1, #7 - bl ov12_02220280 - strh r0, [r4, #0x12] - mov r0, #0 - strh r0, [r4, #0x14] - ldr r0, [r4, #0] - cmp r0, #0 - beq _02227284 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - bne _02227284 - mov r0, #0xa - ldrsh r1, [r4, r0] - sub r0, #0xb - mul r0, r1 - strh r0, [r4, #0xa] - mov r1, #0xc - add r0, r1, #0 - ldrsh r2, [r4, r1] - sub r0, #0xd - mul r0, r2 - strh r0, [r4, #0xc] - mov r0, #0xe - ldrsh r2, [r4, r0] - sub r0, #0xf - mul r0, r2 - strh r0, [r4, #0xe] - mov r0, #0x10 - ldrsh r2, [r4, r0] - sub r0, #0x11 - mul r0, r2 - strh r0, [r4, #0x10] - ldrsh r0, [r4, r1] - sub r0, #0x54 - strh r0, [r4, #0xc] - b _0222728C -_02227284: - mov r0, #0xc - ldrsh r0, [r4, r0] - add r0, #0x54 - strh r0, [r4, #0xc] -_0222728C: - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _022272A0 - mov r0, #0xe - ldrsh r1, [r4, r0] - sub r0, #0xf - mul r0, r1 - strh r0, [r4, #0xe] -_022272A0: - mov r0, #4 - strh r0, [r4, #0x16] - mov r0, #0x10 - strh r0, [r4, #0x18] - mov r1, #0 - strh r1, [r4, #0x16] - strh r0, [r4, #0x18] - mov r0, #2 - str r1, [r4, #4] - bl sub_02019120 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - mov r1, #0 - add r7, r0, #0 - bl ov12_022234E4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r2, [r4, #0x30] - mov r0, #7 - add r1, r6, #0 - mov r3, #2 - bl sub_02006E3C - add r0, r7, #0 - mov r1, #1 - bl ov12_022234E4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x90 - str r0, [sp, #8] - ldr r0, [r4, #0x34] - mov r1, #7 - add r2, r6, #0 - bl sub_02003050 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_02019EBC - add r0, r5, #0 - mov r6, #2 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02227326 - mov r6, #4 - b _0222733A -_02227326: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222733A - mov r6, #3 -_0222733A: - add r0, r7, #0 - add r1, r6, #0 - bl ov12_022234E4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r2, [r4, #0x30] - mov r0, #7 - add r1, r6, #0 - mov r3, #2 - bl sub_02006E60 - mov r3, #0xa - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x30] - mov r1, #2 - mov r2, #3 - bl sub_02019184 - ldr r0, [r4, #0x20] - ldr r1, _0222738C ; =ov12_02227064 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222738C: .word ov12_02227064 - thumb_func_end ov12_022271D8 - - thumb_func_start ov12_02227390 -ov12_02227390: ; 0x02227390 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _022273A6 - cmp r0, #1 - beq _022273A6 - cmp r0, #2 - beq _022273D8 - pop {r3, r4, r5, pc} -_022273A6: - add r0, r4, #0 - add r0, #0xc - bl ov12_02225DA0 - cmp r0, #1 - bne _022273C2 - ldr r2, [r4, #0xc] - ldr r0, [r4, #8] - lsl r2, r2, #0x10 - mov r1, #9 - lsr r2, r2, #0x10 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_022273C2: - add r0, r4, #0 - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x20] - ldr r3, [r4, #0x24] - add r0, #0xc - bl ov12_02225D50 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_022273D8: - ldr r0, [r4, #8] - mov r1, #0xa - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #0xb - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #9 - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02227390 - - thumb_func_start ov12_02227408 -ov12_02227408: ; 0x02227408 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x2c - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - str r5, [r4, #4] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #0x24] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - add r7, r0, #0 - beq _02227442 - cmp r7, #2 - bne _0222744C -_02227442: - ldr r0, [r4, #4] - bl ov12_02220248 - str r0, [sp] - b _02227454 -_0222744C: - ldr r0, [r4, #4] - bl ov12_02220240 - str r0, [sp] -_02227454: - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r2, r0, #0 - add r0, r4, #0 - ldr r1, [r4, #0x20] - ldr r3, [r4, #0x24] - add r0, #0xc - bl ov12_02225D50 - ldr r1, [sp] - add r0, r5, #0 - bl ov12_02225964 - add r6, r0, #0 - ldr r0, [r4, #0x14] - add r1, r0, #0 - mul r1, r6 - str r1, [r4, #0x14] - cmp r7, #2 - bne _02227486 - mov r0, #0 - mvn r0, r0 - mul r6, r0 -_02227486: - ldr r0, [r4, #4] - ldr r1, [sp] - bl ov12_022232FC - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - cmp r0, #1 - bne _022274B0 - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strh r0, [r4, #0x28] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - b _022274B8 -_022274B0: - mov r0, #0x28 - add r1, r6, #0 - mul r1, r0 - strh r1, [r4, #0x28] -_022274B8: - strh r0, [r4, #0x2a] - mov r2, #0x28 - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #0xa - bl sub_02007DEC - mov r2, #0x2a - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #0xb - bl sub_02007DEC - ldr r0, [r4, #4] - ldr r1, _022274E0 ; =ov12_02227390 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022274E0: .word ov12_02227390 - thumb_func_end ov12_02227408 - - thumb_func_start ov12_022274E4 -ov12_022274E4: ; 0x022274E4 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x2c - mov r2, #0x2e - add r5, r0, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x28] - add r0, r4, #4 - bl ov12_02225BA0 - cmp r0, #0 - bne _02227530 - mov r2, #0x2c - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x2e - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x28] - mov r1, #1 - sub r2, #8 - bl sub_02007DEC - ldr r0, [r4, #0x28] - mov r1, #9 - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02227530: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022274E4 - - thumb_func_start ov12_02227534 -ov12_02227534: ; 0x02227534 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - str r5, [r4, #0] - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r2, r0, #0 - add r0, r4, #4 - add r1, r6, #0 - bl ov12_022263A4 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - cmp r0, #8 - bgt _0222757E - cmp r0, #2 - blt _022275F0 - beq _02227584 - cmp r0, #4 - beq _022275A0 - cmp r0, #8 - beq _022275C4 - b _022275F0 -_0222757E: - cmp r0, #0x10 - beq _022275D6 - b _022275F0 -_02227584: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x28] - mov r0, #0 - ldr r1, [r4, #0x10] - mvn r0, r0 - mul r0, r1 - str r0, [r4, #0x10] - b _022275F4 -_022275A0: - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022352AC - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x28] - mov r0, #0 - ldr r1, [r4, #0x10] - mvn r0, r0 - mul r0, r1 - str r0, [r4, #0x10] - b _022275F4 -_022275C4: - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x28] - b _022275F4 -_022275D6: - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022352AC - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x28] - b _022275F4 -_022275F0: - bl sub_02022974 -_022275F4: - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x2c] - ldr r0, [r4, #0x28] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x2e] - mov r0, #0x2e - ldrsh r0, [r4, r0] - ldr r1, _0222761C ; =ov12_022274E4 - add r2, r4, #0 - add r0, #8 - strh r0, [r4, #0x2e] - ldr r0, [r4, #0] - bl ov12_022201E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222761C: .word ov12_022274E4 - thumb_func_end ov12_02227534 - - thumb_func_start ov12_02227620 -ov12_02227620: ; 0x02227620 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, [r5, #0x14] - add r4, r1, #0 - mov r1, #1 - add r6, r2, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x14] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200D4C4 - mov r0, #0 - str r0, [r5, #0x40] - mov r0, #4 - mov r1, #0xa - add r5, #0x18 - str r0, [sp] - add r0, r5, #0 - add r2, r1, #0 - mov r3, #0xe - bl ov12_02225E68 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02227620 - - thumb_func_start ov12_02227658 -ov12_02227658: ; 0x02227658 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r1, [r4, #0x14] - add r0, #0x18 - bl ov12_022260A8 - cmp r0, #0 - bne _02227694 - ldr r0, [r4, #0x40] - cmp r0, #0 - beq _0222767E - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D3F4 - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_0222767E: - mov r0, #1 - str r0, [r4, #0x40] - mov r0, #2 - add r4, #0x18 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xe - mov r2, #0xa - mov r3, #0xc - bl ov12_02225E68 -_02227694: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02227658 - - thumb_func_start ov12_0222769C -ov12_0222769C: ; 0x0222769C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r1, [r4, #0x48] - mov r5, #0 - cmp r1, #4 - bhi _02227734 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022276B4: ; jump table - .short _022276BE - _022276B4 - 2 ; case 0 - .short _022276E4 - _022276B4 - 2 ; case 1 - .short _022276F4 - _022276B4 - 2 ; case 2 - .short _02227722 - _022276B4 - 2 ; case 3 - .short _02227732 - _022276B4 - 2 ; case 4 -_022276BE: - mov r1, #0x4c - ldrsh r3, [r4, r1] - ldr r2, [r4, #0x3c] - mov r1, #0x18 - mul r1, r2 - mov r2, #0x4e - ldrsh r2, [r4, r2] - add r1, r3, r1 - lsl r1, r1, #0x10 - sub r2, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02227620 - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] - b _02227734 -_022276E4: - bl ov12_02227658 - cmp r0, #0 - beq _02227734 - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] - b _02227734 -_022276F4: - ldr r1, [r4, #0x44] - sub r1, r1, #1 - str r1, [r4, #0x44] - bpl _02227734 - ldr r1, [r4, #0x48] - add r1, r1, #1 - str r1, [r4, #0x48] - mov r1, #0x4c - ldrsh r3, [r4, r1] - ldr r2, [r4, #0x3c] - mov r1, #0x18 - mul r1, r2 - mov r2, #0x4e - ldrsh r2, [r4, r2] - sub r1, r3, r1 - lsl r1, r1, #0x10 - sub r2, #0x18 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02227620 - b _02227734 -_02227722: - bl ov12_02227658 - cmp r0, #0 - beq _02227734 - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] - b _02227734 -_02227732: - mov r5, #1 -_02227734: - add r0, r5, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_0222769C - - thumb_func_start ov12_02227738 -ov12_02227738: ; 0x02227738 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0222774A - cmp r0, #1 - beq _0222775C - b _02227772 -_0222774A: - add r0, r4, #0 - bl ov12_0222769C - cmp r0, #0 - beq _02227772 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02227772 -_0222775C: - ldr r0, [r4, #0x14] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_02227772: - ldr r0, [r4, #8] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02227738 - - thumb_func_start ov12_0222777C -ov12_0222777C: ; 0x0222777C - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x50 - add r5, r0, #0 - str r2, [sp] - add r6, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - ldr r0, [sp] - str r7, [r4, #4] - str r0, [r4, #8] - str r6, [r4, #0x14] - add r0, r6, #0 - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x14] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #4 - str r0, [r4, #0x44] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - add r5, r0, #0 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x4c - strh r0, [r1] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x4e - strh r0, [r1] - ldr r0, [r4, #0] - ldr r1, _02227804 ; =ov12_02227738 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02227804: .word ov12_02227738 - thumb_func_end ov12_0222777C - - thumb_func_start ov12_02227808 -ov12_02227808: ; 0x02227808 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl sub_0200384C - cmp r0, #0 - bne _02227826 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_02227826: - pop {r3, r4, r5, pc} - thumb_func_end ov12_02227808 - - thumb_func_start ov12_02227828 -ov12_02227828: ; 0x02227828 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r1, #8 - add r5, r0, #0 - bl ov12_02235E50 - add r6, r0, #0 - str r5, [r6, #0] - add r0, r5, #0 - bl ov12_0222332C - str r0, [r6, #4] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - cmp r0, #0 - beq _02227856 - cmp r0, #1 - beq _02227862 - cmp r0, #2 - beq _02227868 - b _0222786E -_02227856: - add r0, r5, #0 - bl ov12_02222354 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - b _02227872 -_02227862: - mov r4, #1 - lsl r4, r4, #8 - b _02227872 -_02227868: - mov r4, #2 - lsl r4, r4, #8 - b _02227872 -_0222786E: - bl sub_02022974 -_02227872: - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - ldr r1, [sp, #0xc] - lsl r0, r0, #0x10 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - ldr r1, [sp, #0x10] - lsl r3, r7, #0x18 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [r6, #4] - mov r1, #1 - add r2, r4, #0 - asr r3, r3, #0x18 - bl sub_02003178 - ldr r0, [r6, #0] - ldr r1, _022278CC ; =ov12_02227808 - add r2, r6, #0 - bl ov12_022201E8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_022278CC: .word ov12_02227808 - thumb_func_end ov12_02227828 - - thumb_func_start ov12_022278D0 -ov12_022278D0: ; 0x022278D0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #5 - bhi _02227978 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022278E8: ; jump table - .short _022278F4 - _022278E8 - 2 ; case 0 - .short _0222790C - _022278E8 - 2 ; case 1 - .short _0222791E - _022278E8 - 2 ; case 2 - .short _02227930 - _022278E8 - 2 ; case 3 - .short _02227948 - _022278E8 - 2 ; case 4 - .short _0222796A - _022278E8 - 2 ; case 5 -_022278F4: - ldr r0, [r4, #0x14] - mov r1, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r2, [r4, #0x18] - ldr r3, [r4, #0x10] - bl sub_020086FC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0222790C: - ldr r0, [r4, #4] - bl sub_020087B4 - cmp r0, #0 - bne _02227978 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0222791E: - ldr r1, [r4, #0x1c] - cmp r1, #0 - bne _0222792A - add r0, r0, #1 - str r0, [r4, #8] - b _02227930 -_0222792A: - sub r0, r1, #1 - str r0, [r4, #0x1c] - pop {r3, r4, r5, pc} -_02227930: - ldr r0, [r4, #0x14] - mov r2, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r1, [r4, #0x18] - ldr r3, [r4, #0x10] - bl sub_020086FC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_02227948: - ldr r0, [r4, #4] - bl sub_020087B4 - cmp r0, #0 - bne _02227978 - ldr r0, [r4, #0xc] - sub r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0 - bgt _02227964 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_02227964: - mov r0, #0 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0222796A: - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_02227978: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_022278D0 - - thumb_func_start ov12_0222797C -ov12_0222797C: ; 0x0222797C - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x20 - add r4, r0, #0 - bl ov12_02235E50 - add r6, r0, #0 - str r4, [r6, #0] - mov r1, #0 - add r0, r4, #0 - str r1, [r6, #4] - bl ov12_02220280 - ldr r2, _02227B44 ; =0x00000802 - cmp r0, r2 - bgt _022279B6 - bge _02227A3C - cmp r0, #8 - bgt _022279B0 - cmp r0, #2 - blt _022279AE - beq _022279CE - cmp r0, #4 - beq _022279E0 - cmp r0, #8 - beq _02227A06 -_022279AE: - b _02227AF4 -_022279B0: - cmp r0, #0x10 - beq _02227A18 - b _02227AF4 -_022279B6: - add r1, r2, #6 - cmp r0, r1 - bgt _022279C6 - bge _02227A98 - add r1, r2, #2 - cmp r0, r1 - beq _02227A6C - b _02227AF4 -_022279C6: - add r2, #0xe - cmp r0, r2 - beq _02227AC8 - b _02227AF4 -_022279CE: - add r0, r4, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_022279E0: - add r0, r4, #0 - bl ov12_02223364 - cmp r0, #1 - beq _022279EC - b _02227AF8 -_022279EC: - ldr r0, [r6, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022352AC - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227A06: - add r0, r4, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227A18: - add r0, r4, #0 - bl ov12_02223364 - cmp r0, #1 - bne _02227AF8 - ldr r0, [r6, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022352AC - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227A3C: - mov r7, #0xff - mov r5, #0 -_02227A40: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #0 - beq _02227A50 - cmp r0, #2 - bne _02227A54 -_02227A50: - add r7, r5, #0 - b _02227A5A -_02227A54: - add r5, r5, #1 - cmp r5, #4 - blt _02227A40 -_02227A5A: - cmp r7, #0xff - bne _02227A60 - mov r7, #0 -_02227A60: - ldr r0, [r6, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227A6C: - mov r7, #0xff - mov r5, #0 -_02227A70: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #4 - bne _02227A80 - add r7, r5, #0 - b _02227A86 -_02227A80: - add r5, r5, #1 - cmp r5, #4 - blt _02227A70 -_02227A86: - cmp r7, #0xff - bne _02227A8C - mov r7, #0 -_02227A8C: - ldr r0, [r6, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227A98: - mov r7, #0xff - mov r5, #0 -_02227A9C: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #1 - beq _02227AAC - cmp r0, #3 - bne _02227AB0 -_02227AAC: - add r7, r5, #0 - b _02227AB6 -_02227AB0: - add r5, r5, #1 - cmp r5, #4 - blt _02227A9C -_02227AB6: - cmp r7, #0xff - bne _02227ABC - mov r7, #0 -_02227ABC: - ldr r0, [r6, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227AC8: - mov r7, #0xff - mov r5, #0 -_02227ACC: - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022232B8 - cmp r0, #5 - bne _02227ADC - add r7, r5, #0 - b _02227AE2 -_02227ADC: - add r5, r5, #1 - cmp r5, #4 - blt _02227ACC -_02227AE2: - cmp r7, #0xff - bne _02227AE8 - mov r7, #0 -_02227AE8: - ldr r0, [r6, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r6, #4] - b _02227AF8 -_02227AF4: - bl sub_02022974 -_02227AF8: - ldr r0, [r6, #4] - cmp r0, #0 - bne _02227B06 - add r0, r6, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_02227B06: - add r0, r4, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r6, #0x10] - add r0, r4, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r6, #0xc] - add r0, r4, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r6, #0x14] - add r0, r4, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r6, #0x18] - add r0, r4, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r6, #0x1c] - ldr r0, [r6, #0] - ldr r1, _02227B48 ; =ov12_022278D0 - add r2, r6, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02227B44: .word 0x00000802 -_02227B48: .word ov12_022278D0 - thumb_func_end ov12_0222797C - - thumb_func_start ov12_02227B4C -ov12_02227B4C: ; 0x02227B4C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #4 - bls _02227B5C - b _02227CB0 -_02227B5C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02227B68: ; jump table - .short _02227B72 - _02227B68 - 2 ; case 0 - .short _02227BC0 - _02227B68 - 2 ; case 1 - .short _02227C12 - _02227B68 - 2 ; case 2 - .short _02227C3C - _02227B68 - 2 ; case 3 - .short _02227C9E - _02227B68 - 2 ; case 4 -_02227B72: - ldr r0, [r4, #0x4c] - asr r0, r0, #0x10 - str r0, [sp] - ldr r1, [r4, #0x3c] - ldr r2, [r4, #0x44] - ldr r3, [r4, #0x40] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x14 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225E68 - add r0, r4, #0 - add r0, #0x14 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x50] - cmp r0, #1 - bne _02227BAE - ldr r1, [sp, #8] - mov r0, #0 - bl sub_020E1A9C - str r0, [sp, #8] -_02227BAE: - ldr r0, [r4, #0x10] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - bl sub_0200D6E8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02227CB0 -_02227BC0: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x14 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x50] - cmp r0, #1 - bne _02227BE6 - ldr r1, [sp, #8] - mov r0, #0 - bl sub_020E1A9C - str r0, [sp, #8] -_02227BE6: - ldr r0, [r4, #0x10] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - bl sub_0200D6E8 - cmp r5, #0 - beq _02227C0A - mov r0, #0 - str r0, [sp] - mov r1, #0xc - mov r2, #0xe - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r3, [r4, #0x28] - bl ov12_0222605C - b _02227CB0 -_02227C0A: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02227CB0 -_02227C12: - ldr r0, [r4, #0x4c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r1, [r4, #0x40] - ldr r2, [r4, #0x44] - ldr r3, [r4, #0x3c] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x14 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225E68 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02227CB0 -_02227C3C: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x14 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x50] - cmp r0, #1 - bne _02227C62 - ldr r1, [sp, #8] - mov r0, #0 - bl sub_020E1A9C - str r0, [sp, #8] -_02227C62: - ldr r0, [r4, #0x10] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - bl sub_0200D6E8 - cmp r5, #0 - beq _02227C86 - mov r0, #0 - str r0, [sp] - mov r1, #0xc - mov r2, #0xe - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r3, [r4, #0x28] - bl ov12_0222605C - b _02227CB0 -_02227C86: - ldr r0, [r4, #0x48] - sub r0, r0, #1 - str r0, [r4, #0x48] - cmp r0, #0 - bgt _02227C98 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02227CB0 -_02227C98: - mov r0, #0 - str r0, [r4, #8] - b _02227CB0 -_02227C9E: - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add sp, #0xc - pop {r4, r5, pc} -_02227CB0: - ldr r0, [r4, #4] - bl sub_0200C7EC - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02227B4C - - thumb_func_start ov12_02227CBC -ov12_02227CBC: ; 0x02227CBC - push {r4, r5, r6, lr} - mov r1, #0x54 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - cmp r0, #0 - bne _02227CFE - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 - b _02227D1C -_02227CFE: - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 -_02227D1C: - strh r0, [r4, #0xe] - add r0, r6, #0 - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #0x29 - bl sub_020080C0 - mov r1, #0xc - ldrsh r1, [r4, r1] - sub r0, r1, r0 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r4, #0x38] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #0x3c] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #0x40] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r4, #0x44] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0x48] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - str r0, [r4, #0x4c] - add r0, r5, #0 - mov r1, #7 - bl ov12_02220280 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022202C0 - str r0, [r4, #0x10] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x10] - mov r1, #2 - bl sub_0200D6A4 - ldr r1, [r4, #0x38] - mov r2, #0x10 - ldr r0, [r4, #0] - sub r2, r2, r1 - bl ov12_02235780 - ldr r0, [r4, #0] - ldr r1, _02227DDC ; =ov12_02227B4C - add r2, r4, #0 - bl ov12_022201E8 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - cmp r0, #0 - beq _02227DCA - mov r1, #1 - b _02227DCC -_02227DCA: - mov r1, #0 -_02227DCC: - ldr r0, [r4, #0] - bl ov12_022234A8 - cmp r0, #1 - bne _02227DDA - mov r0, #1 - str r0, [r4, #0x50] -_02227DDA: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02227DDC: .word ov12_02227B4C - thumb_func_end ov12_02227CBC - - thumb_func_start ov12_02227DE0 -ov12_02227DE0: ; 0x02227DE0 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #5 - bls _02227DF0 - b _02227F2C -_02227DF0: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02227DFC: ; jump table - .short _02227E08 - _02227DFC - 2 ; case 0 - .short _02227E4C - _02227DFC - 2 ; case 1 - .short _02227E7C - _02227DFC - 2 ; case 2 - .short _02227E90 - _02227DFC - 2 ; case 3 - .short _02227ED6 - _02227DFC - 2 ; case 4 - .short _02227F18 - _02227DFC - 2 ; case 5 -_02227E08: - ldr r0, [r4, #0x40] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x44] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #0x4c] - asr r0, r0, #0x10 - str r0, [sp, #8] - ldr r1, [r4, #0x34] - ldr r2, [r4, #0x38] - ldr r3, [r4, #0x3c] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225EF0 - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_022260C8 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02227E4C: - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_022260E8 - cmp r0, #0 - beq _02227E72 - mov r0, #0 - str r0, [sp] - mov r1, #8 - mov r2, #0xa - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - bl ov12_02226024 - add sp, #0xc - pop {r4, r5, pc} -_02227E72: - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02227E7C: - ldr r1, [r4, #0x50] - cmp r1, #0 - bne _02227E88 - add r0, r0, #1 - str r0, [r4, #4] - b _02227E90 -_02227E88: - sub r0, r1, #1 - add sp, #0xc - str r0, [r4, #0x50] - pop {r4, r5, pc} -_02227E90: - ldr r0, [r4, #0x3c] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x44] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #0x4c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r1, [r4, #0x38] - ldr r2, [r4, #0x34] - ldr r3, [r4, #0x40] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225EF0 - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_022260E8 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02227ED6: - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_022260E8 - cmp r0, #0 - beq _02227EFC - mov r0, #0 - str r0, [sp] - mov r1, #8 - mov r2, #0xa - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - bl ov12_02226024 - add sp, #0xc - pop {r4, r5, pc} -_02227EFC: - ldr r0, [r4, #0x48] - sub r0, r0, #1 - str r0, [r4, #0x48] - cmp r0, #0 - bgt _02227F10 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02227F10: - mov r0, #0 - add sp, #0xc - str r0, [r4, #4] - pop {r4, r5, pc} -_02227F18: - ldr r0, [r4, #0xc] - bl ov12_02226B84 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_02227F2C: - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov12_02227DE0 - - thumb_func_start ov12_02227F30 -ov12_02227F30: ; 0x02227F30 - push {r4, r5, r6, r7, lr} - sub sp, #0x54 - add r5, r0, #0 - mov r1, #0x54 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - str r5, [r4, #0] - bl ov12_02220280 - ldr r2, _02228134 ; =0x00000802 - cmp r0, r2 - bgt _02227F74 - bge _02227FE0 - mov r2, #0x42 - lsl r2, r2, #2 - cmp r0, r2 - bgt _02227F6C - sub r1, r2, #6 - cmp r0, r1 - blt _02227F6A - beq _02227F8C - sub r1, r2, #4 - cmp r0, r1 - beq _02227F8C - cmp r0, r2 - beq _02227FB6 -_02227F6A: - b _02228096 -_02227F6C: - add r2, #8 - cmp r0, r2 - beq _02227FB6 - b _02228096 -_02227F74: - add r1, r2, #6 - cmp r0, r1 - bgt _02227F84 - bge _0222803C - add r1, r2, #2 - cmp r0, r1 - beq _02228010 - b _02228096 -_02227F84: - add r2, #0xe - cmp r0, r2 - beq _0222806C - b _02228096 -_02227F8C: - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 - strh r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r1, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #4 - add r3, sp, #0 - bl ov12_02235998 - ldr r0, [sp, #0xc] - str r0, [r4, #0xc] - b _02228096 -_02227FB6: - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 - strh r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r1, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #4 - add r3, sp, #0 - bl ov12_02235998 - ldr r0, [sp, #0xc] - str r0, [r4, #0xc] - b _02228096 -_02227FE0: - mov r7, #0xff - mov r6, #0 -_02227FE4: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232B8 - cmp r0, #0 - beq _02227FF4 - cmp r0, #2 - bne _02227FF8 -_02227FF4: - add r7, r6, #0 - b _02227FFE -_02227FF8: - add r6, r6, #1 - cmp r6, #4 - blt _02227FE4 -_02227FFE: - cmp r7, #0xff - bne _02228004 - mov r7, #0 -_02228004: - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r4, #0xc] - b _02228096 -_02228010: - mov r7, #0xff - mov r6, #0 -_02228014: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232B8 - cmp r0, #4 - bne _02228024 - add r7, r6, #0 - b _0222802A -_02228024: - add r6, r6, #1 - cmp r6, #4 - blt _02228014 -_0222802A: - cmp r7, #0xff - bne _02228030 - mov r7, #0 -_02228030: - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r4, #0xc] - b _02228096 -_0222803C: - mov r7, #0xff - mov r6, #0 -_02228040: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232B8 - cmp r0, #1 - beq _02228050 - cmp r0, #3 - bne _02228054 -_02228050: - add r7, r6, #0 - b _0222805A -_02228054: - add r6, r6, #1 - cmp r6, #4 - blt _02228040 -_0222805A: - cmp r7, #0xff - bne _02228060 - mov r7, #0 -_02228060: - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r4, #0xc] - b _02228096 -_0222806C: - mov r7, #0xff - mov r6, #0 -_02228070: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232B8 - cmp r0, #5 - bne _02228080 - add r7, r6, #0 - b _02228086 -_02228080: - add r6, r6, #1 - cmp r6, #4 - blt _02228070 -_02228086: - cmp r7, #0xff - bne _0222808C - mov r7, #0 -_0222808C: - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_022232FC - str r0, [r4, #0xc] -_02228096: - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022280A6 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x54 - pop {r4, r5, r6, r7, pc} -_022280A6: - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #8] - ldr r0, [r4, #0xc] - mov r1, #0x29 - bl sub_020080C0 - strh r0, [r4, #0xa] - mov r0, #0xa - ldrsh r0, [r4, r0] - mov r1, #1 - add r0, #0x10 - strh r0, [r4, #0xa] - add r0, r5, #0 - bl ov12_02220280 - str r0, [r4, #0x34] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #0x38] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #0x3c] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r4, #0x40] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0x44] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - str r0, [r4, #0x48] - add r0, r5, #0 - mov r1, #7 - bl ov12_02220280 - str r0, [r4, #0x4c] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [r4, #0x48] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - asr r0, r0, #0x10 - str r0, [r4, #0x50] - ldr r0, [r4, #0] - ldr r1, _02228138 ; =ov12_02227DE0 - add r2, r4, #0 - bl ov12_022201E8 - add r1, r4, #0 - bl ov12_02227DE0 - add sp, #0x54 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02228134: .word 0x00000802 -_02228138: .word ov12_02227DE0 - thumb_func_end ov12_02227F30 - - thumb_func_start ov12_0222813C -ov12_0222813C: ; 0x0222813C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #8 - bl ov12_02226454 - cmp r0, #0 - beq _0222815E - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - pop {r3, r4, r5, pc} -_0222815E: - ldr r0, [r4, #4] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222813C - - thumb_func_start ov12_02228168 -ov12_02228168: ; 0x02228168 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0x30 - add r7, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r7, [r4, #0] - add r0, r7, #0 - bl ov12_022202EC - str r0, [r4, #4] - add r0, r7, #0 - mov r1, #0 - bl ov12_02220280 - add r6, r0, #0 - mov r5, #0 -_0222818C: - mov r0, #1 - lsl r0, r5 - tst r0, r6 - beq _022281A2 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_022202C0 - mov r1, #1 - bl sub_0200D810 -_022281A2: - add r5, r5, #1 - cmp r5, #4 - blt _0222818C - add r0, r7, #0 - mov r1, #1 - bl ov12_02220280 - add r5, r0, #0 - add r0, r7, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r2, [sp, #8] - add r1, r5, #0 - bl ov12_02235780 - add r0, r7, #0 - mov r1, #2 - bl ov12_02220280 - add r6, r0, #0 - add r0, r7, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [sp, #0xc] - add r0, r7, #0 - mov r1, #5 - bl ov12_02220280 - ldr r1, [sp, #0xc] - ldr r3, [sp, #8] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - str r1, [sp] - str r0, [sp, #4] - add r0, r4, #0 - lsl r1, r5, #0x10 - lsl r2, r6, #0x10 - lsl r3, r3, #0x10 - add r0, #8 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02226424 - ldr r0, [r4, #0] - ldr r1, _02228210 ; =ov12_0222813C - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02228210: .word ov12_0222813C - thumb_func_end ov12_02228168 - - thumb_func_start ov12_02228214 -ov12_02228214: ; 0x02228214 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - mov r1, #1 - bl ov12_02220280 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0 - bl ov12_02220280 - add r1, r0, #0 - add r0, r6, #0 - add r2, sp, #4 - add r3, sp, #0 - bl ov12_02235998 - ldr r0, [sp] - mov r4, #0 - cmp r0, #0 - ble _02228262 - mov r7, #6 -_02228240: - ldr r1, [sp, #0x14] - add r0, r6, #0 - bl ov12_0222337C - cmp r0, #1 - bne _02228250 - cmp r5, #0 - beq _0222825A -_02228250: - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r2, r5, #0 - bl sub_02007DEC -_0222825A: - ldr r0, [sp] - add r4, r4, #1 - cmp r4, r0 - blt _02228240 -_02228262: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02228214 - - thumb_func_start ov12_02228268 -ov12_02228268: ; 0x02228268 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, [r4, #4] - ldr r0, [r4, #8] - cmp r1, r0 - blt _022282B6 - ldr r0, [r4, #0] - cmp r0, #0 - ldr r0, [r4, #0x14] - bne _02228296 - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0x3c] - add r1, r5, #0 - bl ov12_02220220 - pop {r3, r4, r5, pc} -_02228296: - mov r1, #6 - bl sub_020080C0 - add r3, r0, #0 - mov r2, #1 - ldr r0, [r4, #0x14] - mov r1, #6 - eor r2, r3 - bl sub_02007DEC - ldr r0, [r4, #0] - sub r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_022282B6: - add r0, r1, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02228268 - - thumb_func_start ov12_022282BC -ov12_022282BC: ; 0x022282BC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x40 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - str r5, [r4, #0x3c] - bl ov12_02220280 - lsl r0, r0, #1 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r1, r4, #0 - str r0, [r4, #8] - add r0, r5, #0 - add r1, #0x20 - bl ov12_0223595C - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022232FC - str r0, [r4, #0x14] - ldr r0, [r4, #0x3c] - ldr r1, _02228308 ; =ov12_02228268 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_02228308: .word ov12_02228268 - thumb_func_end ov12_022282BC - - thumb_func_start ov12_0222830C -ov12_0222830C: ; 0x0222830C - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - cmp r0, #0 - beq _02228324 - cmp r0, #1 - beq _02228358 - b _02228382 -_02228324: - mov r0, #0x16 - ldrsh r3, [r4, r0] - mov r0, #0x14 - ldrsh r1, [r4, r0] - mov r2, #0xc - str r3, [sp] - ldr r0, [r4, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldrsh r2, [r4, r2] - add r0, r4, #0 - add r0, #0x40 - add r2, r1, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - add r4, #0x24 - add sp, #8 - add r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_02228358: - add r0, r4, #0 - add r0, #0x40 - bl ov12_02225C14 - cmp r0, #0 - bne _02228372 - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] -_02228372: - mov r2, #0x40 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_02228382: - ldr r0, [r4, #0x64] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_0222830C - - thumb_func_start ov12_02228394 -ov12_02228394: ; 0x02228394 - push {r4, r5, r6, lr} - mov r1, #0x68 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0x64] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - mov r6, #0xff - add r1, r6, #0 - add r1, #9 - cmp r0, r1 - bgt _022283E0 - add r1, r6, #3 - cmp r0, r1 - blt _02228436 - beq _022283EA - add r1, r6, #5 - cmp r0, r1 - beq _022283F4 - add r1, r6, #0 - add r1, #9 - cmp r0, r1 - beq _02228410 - b _02228436 -_022283E0: - add r1, r6, #0 - add r1, #0x11 - cmp r0, r1 - beq _0222841A - b _02228436 -_022283EA: - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - b _0222843A -_022283F4: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - bne _0222843A - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _0222843A -_02228410: - add r0, r5, #0 - bl ov12_02220248 - add r6, r0, #0 - b _0222843A -_0222841A: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - bne _0222843A - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _0222843A -_02228436: - bl sub_02022974 -_0222843A: - cmp r6, #0xff - bne _02228446 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_02228446: - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x24 - bl ov12_0223595C - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232FC - add r1, r4, #0 - add r1, #0x14 - str r0, [r4, #0x18] - bl ov12_02235918 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - cmp r0, #0 - bgt _02228478 - mov r0, #0xc - ldrsh r1, [r4, r0] - sub r0, #0xd - mul r0, r1 - strh r0, [r4, #0xc] -_02228478: - ldr r0, [r4, #0x64] - ldr r1, _02228484 ; =ov12_0222830C - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02228484: .word ov12_0222830C - thumb_func_end ov12_02228394 - - thumb_func_start ov12_02228488 -ov12_02228488: ; 0x02228488 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _022284A0 - cmp r0, #1 - beq _022284E2 - b _0222850C -_022284A0: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _022284B0 - mov r0, #0xff - add r4, #0x20 - add sp, #8 - strb r0, [r4] - pop {r4, pc} -_022284B0: - mov r0, #0x12 - ldrsh r3, [r4, r0] - mov r0, #0x10 - ldrsh r1, [r4, r0] - mov r2, #0x64 - str r3, [sp] - ldr r0, [r4, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldrsh r2, [r4, r2] - add r0, r4, #0 - add r0, #0x3c - add r2, r1, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] -_022284E2: - add r0, r4, #0 - add r0, #0x3c - bl ov12_02225C14 - cmp r0, #0 - bne _022284FC - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] -_022284FC: - mov r2, #0x3c - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_0222850C: - ldr r0, [r4, #0x60] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02228488 - - thumb_func_start ov12_02228520 -ov12_02228520: ; 0x02228520 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x68 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0x60] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x64 - strh r0, [r1] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r1, r4, #0 - add r7, r0, #0 - add r0, r5, #0 - add r1, #0x20 - bl ov12_0223595C - mov r6, #0xff - add r0, r6, #0 - add r0, #9 - cmp r7, r0 - bgt _0222857C - add r0, r6, #3 - cmp r7, r0 - blt _022285D2 - beq _02228586 - add r0, r6, #5 - cmp r7, r0 - beq _02228590 - add r0, r6, #0 - add r0, #9 - cmp r7, r0 - beq _022285AC - b _022285D2 -_0222857C: - add r0, r6, #0 - add r0, #0x11 - cmp r7, r0 - beq _022285B6 - b _022285D2 -_02228586: - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - b _022285D6 -_02228590: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - bne _022285D6 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _022285D6 -_022285AC: - add r0, r5, #0 - bl ov12_02220248 - add r6, r0, #0 - b _022285D6 -_022285B6: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - bne _022285D6 - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _022285D6 -_022285D2: - bl sub_02022974 -_022285D6: - cmp r6, #0xff - bne _022285E2 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_022285E2: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232FC - add r1, r4, #0 - add r1, #0x10 - str r0, [r4, #0x14] - bl ov12_02235918 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - cmp r0, #0 - bgt _02228610 - mov r0, #0x64 - ldrsh r1, [r4, r0] - sub r0, #0x65 - add r2, r1, #0 - mul r2, r0 - add r0, r4, #0 - add r0, #0x64 - strh r2, [r0] -_02228610: - add r0, r5, #0 - bl ov12_0221FDD4 - ldr r0, [r4, #0x60] - ldr r1, _02228628 ; =ov12_02228488 - add r2, r4, #0 - bl ov12_022201E8 - add r1, r4, #0 - bl ov12_02228488 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02228628: .word ov12_02228488 - thumb_func_end ov12_02228520 - - thumb_func_start ov12_0222862C -ov12_0222862C: ; 0x0222862C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bls _0222863C - b _022287BA -_0222863C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02228648: ; jump table - .short _02228650 - _02228648 - 2 ; case 0 - .short _022286B2 - _02228648 - 2 ; case 1 - .short _022286FC - _02228648 - 2 ; case 2 - .short _0222874A - _02228648 - 2 ; case 3 -_02228650: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - bne _022286A8 - add r0, r4, #0 - add r0, #0x38 - bl ov12_02226138 - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xd - bl sub_02007DEC - mov r2, #0x38 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02008274 - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x28] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_022286A8: - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_022286B2: - ldrb r0, [r4, #9] - add r0, r0, #1 - strb r0, [r4, #9] - ldrb r1, [r4, #9] - ldrb r0, [r4, #0xa] - cmp r1, r0 - bhi _022286C2 - b _022287C8 -_022286C2: - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov12_02220280 - add r5, r0, #0 - ldr r0, [r4, #0xc] - mov r1, #1 - bl ov12_02220280 - add r6, r0, #0 - ldr r0, [r4, #0xc] - mov r1, #3 - bl ov12_02220280 - str r0, [sp] - add r0, r4, #0 - lsl r1, r5, #0x10 - lsl r3, r6, #0x10 - add r0, #0x14 - asr r1, r1, #0x10 - mov r2, #0x64 - asr r3, r3, #0x10 - bl ov12_02225E68 - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_022286FC: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - bne _02228740 - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x28] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02228740: - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222874A: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - ldr r0, [r4, #0x10] - bne _0222878E - mov r2, #0x14 - ldrsh r2, [r4, r2] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x28] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222878E: - mov r1, #0xc - add r2, r1, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0x10] - add r2, #0xf3 - bl sub_02007DEC - mov r2, #2 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007DEC - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_022287BA: - ldr r0, [r4, #0xc] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_022287C8: - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov12_0222862C - - thumb_func_start ov12_022287CC -ov12_022287CC: ; 0x022287CC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x5c - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4, #8] - strb r0, [r4] - str r5, [r4, #0xc] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r0, #0 - strb r0, [r4, #9] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strb r0, [r4, #0xa] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - ldr r0, [r4, #0xc] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_02223354 - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x64 - lsl r3, r6, #0x10 - add r0, #0x14 - add r2, r1, #0 - asr r3, r3, #0x10 - bl ov12_02225E68 - mov r0, #0xa - str r0, [sp] - add r0, r4, #0 - mov r2, #0 - add r0, #0x38 - mov r1, #2 - add r3, r2, #0 - bl ov12_02226108 - ldr r0, [r4, #0xc] - ldr r1, _02228864 ; =ov12_0222862C - add r2, r4, #0 - bl ov12_022201E8 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02228864: .word ov12_0222862C - thumb_func_end ov12_022287CC - - thumb_func_start ov12_02228868 -ov12_02228868: ; 0x02228868 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bls _02228878 - b _022289F8 -_02228878: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02228884: ; jump table - .short _0222888C - _02228884 - 2 ; case 0 - .short _022288EE - _02228884 - 2 ; case 1 - .short _0222893A - _02228884 - 2 ; case 2 - .short _02228988 - _02228884 - 2 ; case 3 -_0222888C: - add r0, r4, #0 - add r0, #0x20 - bl ov12_02225F6C - cmp r0, #1 - bne _022288E4 - add r0, r4, #0 - add r0, #0x44 - bl ov12_02226138 - mov r2, #0x20 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x22 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xd - bl sub_02007DEC - mov r2, #0x44 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_02008274 - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x34] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_022288E4: - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_022288EE: - ldrb r0, [r4, #9] - add r0, r0, #1 - strb r0, [r4, #9] - ldrb r1, [r4, #9] - ldrb r0, [r4, #0xa] - cmp r1, r0 - bhi _022288FE - b _02228A06 -_022288FE: - ldr r3, [r4, #0x10] - ldr r2, [r4, #0xc] - lsl r0, r3, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - asr r1, r2, #0x10 - mov r0, #0x64 - str r0, [sp, #4] - ldr r0, [r4, #0x14] - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - asr r3, r3, #0x10 - str r0, [sp, #8] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x20 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225EF0 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222893A: - add r0, r4, #0 - add r0, #0x20 - bl ov12_02225F6C - cmp r0, #1 - bne _0222897E - mov r2, #0x20 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x22 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x34] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_0222897E: - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_02228988: - add r0, r4, #0 - add r0, #0x20 - bl ov12_02225F6C - cmp r0, #1 - ldr r0, [r4, #0x1c] - bne _022289CC - mov r2, #0x20 - ldrsh r2, [r4, r2] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x22 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x34] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_022289CC: - mov r1, #0xc - add r2, r1, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0x1c] - add r2, #0xf3 - bl sub_02007DEC - mov r2, #2 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_02007DEC - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_022289F8: - ldr r0, [r4, #0x18] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02228A06: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02228868 - - thumb_func_start ov12_02228A0C -ov12_02228A0C: ; 0x02228A0C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x68 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4, #8] - strb r0, [r4] - str r5, [r4, #0x18] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0x18] - bl ov12_022232FC - str r0, [r4, #0x1c] - mov r0, #0 - strb r0, [r4, #9] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - strb r0, [r4, #0xa] - ldr r0, [r4, #0x18] - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #0xc] - ldr r0, [r4, #0x18] - mov r1, #4 - bl ov12_02220280 - str r0, [r4, #0x10] - ldr r0, [r4, #0x18] - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0x14] - ldr r0, [r4, #0x18] - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0 - add r3, r4, #2 - bl ov12_02225898 - ldr r0, [r4, #0x18] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0x18] - bl ov12_02223354 - str r0, [r4, #4] - mov r1, #2 - ldrsh r1, [r4, r1] - add r0, r1, r0 - strh r0, [r4, #2] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - asr r0, r0, #0x10 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - asr r0, r0, #0x10 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r6, [sp] - mov r1, #0x64 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r3, [sp, #0xc] - add r0, #0x20 - add r2, r7, #0 - bl ov12_02225EF0 - mov r0, #0xa - str r0, [sp] - add r0, r4, #0 - mov r2, #0 - add r0, #0x44 - mov r1, #2 - add r3, r2, #0 - bl ov12_02226108 - ldr r0, [r4, #0x18] - ldr r1, _02228B0C ; =ov12_02228868 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02228B0C: .word ov12_02228868 - thumb_func_end ov12_02228A0C - - thumb_func_start ov12_02228B10 -ov12_02228B10: ; 0x02228B10 - push {r3, r4, r5, lr} - mov r2, #1 - lsl r2, r2, #0x1a - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r2, #0] - ldr r0, _02228B3C ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - ldr r0, [r4, #8] - mov r1, #2 - bl ov12_02222664 - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - nop -_02228B3C: .word 0xFFFF1FFF - thumb_func_end ov12_02228B10 - - thumb_func_start ov12_02228B40 -ov12_02228B40: ; 0x02228B40 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x28 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r0, r5, #0 - add r1, r4, #4 - bl ov12_0223595C - ldr r0, [r4, #8] - mov r1, #2 - bl ov12_02222590 - ldr r0, [r4, #8] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x24] - mov r1, #2 - bl sub_0200D810 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_0200D6A4 - ldr r1, _02228BC0 ; =0x3F99999A - ldr r0, [r4, #0x24] - add r2, r1, #0 - bl sub_0200D6E8 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _02228BC4 ; =0xFFFF1FFF - and r2, r1 - lsr r1, r0, #0xb - orr r1, r2 - str r1, [r0, #0] - add r0, #0x4a - ldrh r2, [r0] - mov r1, #0x3f - bic r2, r1 - mov r1, #0x1b - orr r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _02228BC8 ; =0xFFFFC0FF - and r2, r1 - mov r1, #7 - lsl r1, r1, #8 - orr r1, r2 - strh r1, [r0] - ldr r0, [r4, #8] - ldr r1, _02228BCC ; =ov12_02228B10 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_02228BC0: .word 0x3F99999A -_02228BC4: .word 0xFFFF1FFF -_02228BC8: .word 0xFFFFC0FF -_02228BCC: .word ov12_02228B10 - thumb_func_end ov12_02228B40 - - thumb_func_start ov12_02228BD0 -ov12_02228BD0: ; 0x02228BD0 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _02228BE8 - cmp r0, #1 - beq _02228C24 - b _02228C5A -_02228BE8: - mov r0, #0x12 - ldrsh r3, [r4, r0] - mov r0, #0x10 - ldrsh r1, [r4, r0] - mov r0, #0x66 - ldrsh r0, [r4, r0] - mov r2, #0x64 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldrsh r2, [r4, r2] - add r0, r4, #0 - add r0, #0x3c - add r2, r1, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] -_02228C24: - add r0, r4, #0 - add r0, #0x3c - bl ov12_02225C14 - cmp r0, #0 - bne _02228C3E - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] -_02228C3E: - mov r2, #0x3c - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x3e - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_02228C5A: - ldr r0, [r4, #0x60] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_02228BD0 - - thumb_func_start ov12_02228C6C -ov12_02228C6C: ; 0x02228C6C - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x68 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0x60] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x64 - strh r0, [r1] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x66 - strh r0, [r1] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - add r1, r4, #0 - add r7, r0, #0 - add r0, r5, #0 - add r1, #0x20 - bl ov12_0223595C - mov r6, #0xff - add r0, r6, #0 - add r0, #9 - cmp r7, r0 - bgt _02228CD6 - add r0, r6, #3 - cmp r7, r0 - blt _02228D2C - beq _02228CE0 - add r0, r6, #5 - cmp r7, r0 - beq _02228CEA - add r0, r6, #0 - add r0, #9 - cmp r7, r0 - beq _02228D06 - b _02228D2C -_02228CD6: - add r0, r6, #0 - add r0, #0x11 - cmp r7, r0 - beq _02228D10 - b _02228D2C -_02228CE0: - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - b _02228D30 -_02228CEA: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - bne _02228D30 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _02228D30 -_02228D06: - add r0, r5, #0 - bl ov12_02220248 - add r6, r0, #0 - b _02228D30 -_02228D10: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - bne _02228D30 - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _02228D30 -_02228D2C: - bl sub_02022974 -_02228D30: - cmp r6, #0xff - bne _02228D3C - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_02228D3C: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x14] - cmp r0, #0 - bne _02228D52 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_02228D52: - add r1, r4, #0 - add r1, #0x10 - bl ov12_02235918 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - cmp r0, #0 - bgt _02228D86 - mov r0, #0x64 - ldrsh r1, [r4, r0] - sub r0, #0x65 - add r2, r1, #0 - mul r2, r0 - add r0, r4, #0 - add r0, #0x64 - strh r2, [r0] - mov r0, #0x66 - ldrsh r1, [r4, r0] - sub r0, #0x67 - add r2, r1, #0 - mul r2, r0 - add r0, r4, #0 - add r0, #0x66 - strh r2, [r0] -_02228D86: - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02228DA0 - mov r0, #0x66 - ldrsh r1, [r4, r0] - sub r0, #0x67 - add r2, r1, #0 - mul r2, r0 - add r0, r4, #0 - add r0, #0x66 - strh r2, [r0] -_02228DA0: - ldr r0, [r4, #0x60] - ldr r1, _02228DB4 ; =ov12_02228BD0 - add r2, r4, #0 - bl ov12_022201E8 - add r1, r4, #0 - bl ov12_02228BD0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02228DB4: .word ov12_02228BD0 - thumb_func_end ov12_02228C6C - - thumb_func_start ov12_02228DB8 -ov12_02228DB8: ; 0x02228DB8 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x20 - mov r2, #0x22 - add r5, r0, #0 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x24] - add r0, #0x30 - bl ov12_02225BA0 - cmp r0, #0 - bne _02228DFC - mov r2, #0x20 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x24] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x22 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x24] - mov r1, #1 - sub r2, #8 - bl sub_02007DEC - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02228DFC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02228DB8 - - thumb_func_start ov12_02228E00 -ov12_02228E00: ; 0x02228E00 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0x54 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r2, r4, #0 - add r1, r0, #0 - add r0, r5, #0 - add r2, #0x1c - add r3, sp, #0 - bl ov12_02235998 - mov r0, #0x22 - ldrsh r0, [r4, r0] - mov r1, #1 - add r0, #8 - strh r0, [r4, #0x22] - add r0, r5, #0 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x30 - add r1, r6, #0 - bl ov12_022263A4 - ldr r1, [r4, #0x3c] - add r2, r4, #0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r4, #0x3c] - ldr r1, [r4, #0x44] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r4, #0x44] - ldr r0, [r4, #4] - ldr r1, _02228E74 ; =ov12_02228DB8 - bl ov12_022201E8 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02228E74: .word ov12_02228DB8 - thumb_func_end ov12_02228E00 - - thumb_func_start ov12_02228E78 -ov12_02228E78: ; 0x02228E78 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - bne _02228EB0 - add r0, r4, #0 - add r0, #0x30 - bl ov12_02225C14 - cmp r0, #0 - bne _02228E96 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_02228E96: - mov r2, #0x30 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x24] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x32 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_02007DEC - pop {r4, pc} -_02228EB0: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov12_02228E78 - - thumb_func_start ov12_02228EC0 -ov12_02228EC0: ; 0x02228EC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0x5c - add r6, r0, #0 - bl ov12_02235E50 - add r5, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - bl ov12_0223595C - add r0, r6, #0 - mov r1, #0 - bl ov12_02220280 - add r4, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov12_02220280 - add r7, r0, #0 - cmp r4, #8 - bgt _02228EFE - cmp r4, #2 - blt _02228F3C - beq _02228F04 - cmp r4, #4 - beq _02228F0E - cmp r4, #8 - beq _02228F20 - b _02228F3C -_02228EFE: - cmp r4, #0x10 - beq _02228F2A - b _02228F3C -_02228F04: - add r0, r6, #0 - bl ov12_02220240 - str r0, [sp, #8] - b _02228F40 -_02228F0E: - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022352AC - str r0, [sp, #8] - b _02228F40 -_02228F20: - add r0, r6, #0 - bl ov12_02220248 - str r0, [sp, #8] - b _02228F40 -_02228F2A: - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022352AC - str r0, [sp, #8] - b _02228F40 -_02228F3C: - bl sub_02022974 -_02228F40: - add r2, r5, #0 - ldr r1, [sp, #8] - add r0, r6, #0 - add r2, #0x54 - bl ov12_022353AC - add r2, r5, #0 - add r0, r6, #0 - add r1, r4, #0 - add r2, #0x1c - add r3, sp, #0xc - bl ov12_02235998 - add r0, r5, #0 - mov r1, #0 - add r0, #0x58 - strh r1, [r0] - add r0, r5, #0 - add r0, #0x5a - strh r1, [r0] - ldr r0, [r5, #4] - ldr r1, [sp, #8] - bl ov12_0223525C - cmp r0, #3 - bne _02228F7A - mov r1, #0x4f - mvn r1, r1 - b _02228F7E -_02228F7A: - mov r1, #0x15 - lsl r1, r1, #4 -_02228F7E: - add r0, r5, #0 - add r0, #0x58 - strh r1, [r0] - mov r0, #0x22 - ldrsh r3, [r5, r0] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r3, [sp] - str r0, [sp, #4] - mov r1, #0x20 - mov r2, #0x58 - add r0, r5, #0 - ldrsh r1, [r5, r1] - ldrsh r2, [r5, r2] - add r0, #0x30 - bl ov12_02225BC8 - ldr r0, [r5, #4] - ldr r1, _02228FB0 ; =ov12_02228E78 - add r2, r5, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02228FB0: .word ov12_02228E78 - thumb_func_end ov12_02228EC0 - - thumb_func_start ov12_02228FB4 -ov12_02228FB4: ; 0x02228FB4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r1, #0x5c - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r7, r0, #0 - cmp r6, #8 - bgt _02228FFC - cmp r6, #2 - blt _0222903A - beq _02229002 - cmp r6, #4 - beq _0222900C - cmp r6, #8 - beq _0222901E - b _0222903A -_02228FFC: - cmp r6, #0x10 - beq _02229028 - b _0222903A -_02229002: - add r0, r5, #0 - bl ov12_02220240 - str r0, [sp, #8] - b _0222903E -_0222900C: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - str r0, [sp, #8] - b _0222903E -_0222901E: - add r0, r5, #0 - bl ov12_02220248 - str r0, [sp, #8] - b _0222903E -_02229028: - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - str r0, [sp, #8] - b _0222903E -_0222903A: - bl sub_02022974 -_0222903E: - add r2, r4, #0 - ldr r1, [sp, #8] - add r0, r5, #0 - add r2, #0x54 - bl ov12_022353AC - add r2, r4, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, #0x1c - add r3, sp, #0x10 - bl ov12_02235998 - add r0, r4, #0 - mov r1, #0 - add r0, #0x58 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x5a - strh r1, [r0] - ldr r0, [r4, #4] - ldr r1, [sp, #8] - bl ov12_0223525C - cmp r0, #3 - bne _02229078 - mov r1, #0x4f - mvn r1, r1 - b _0222907C -_02229078: - mov r1, #0x15 - lsl r1, r1, #4 -_0222907C: - add r0, r4, #0 - add r0, #0x58 - strh r1, [r0] - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _022290A6 - mov r0, #0x22 - ldrsh r3, [r4, r0] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r3, [sp] - str r0, [sp, #4] - mov r1, #0x20 - mov r2, #0x58 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - add r0, #0x30 - bl ov12_02225BC8 - b _022290CA -_022290A6: - ldr r1, [sp, #8] - add r0, r5, #0 - mov r2, #0 - bl ov12_022258E0 - add r2, r0, #0 - mov r0, #0x22 - ldrsh r3, [r4, r0] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r3, [sp] - str r0, [sp, #4] - mov r1, #0x58 - add r0, r4, #0 - ldrsh r1, [r4, r1] - add r0, #0x30 - bl ov12_02225BC8 -_022290CA: - ldr r0, [r4, #4] - ldr r1, _022290D8 ; =ov12_02228E78 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022290D8: .word ov12_02228E78 - thumb_func_end ov12_02228FB4 - - thumb_func_start ov12_022290DC -ov12_022290DC: ; 0x022290DC - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - mov r1, #0 - add r5, r0, #0 - bl ov12_02220280 - add r4, r0, #0 - cmp r4, #8 - bgt _022290FE - cmp r4, #2 - blt _0222913C - beq _02229104 - cmp r4, #4 - beq _0222910E - cmp r4, #8 - beq _02229120 - b _0222913C -_022290FE: - cmp r4, #0x10 - beq _0222912A - b _0222913C -_02229104: - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - b _02229140 -_0222910E: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _02229140 -_02229120: - add r0, r5, #0 - bl ov12_02220248 - add r6, r0, #0 - b _02229140 -_0222912A: - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r6, r0, #0 - b _02229140 -_0222913C: - bl sub_02022974 -_02229140: - add r0, r5, #0 - add r1, r6, #0 - add r2, sp, #0 - bl ov12_022353AC - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #8 - add r3, sp, #4 - bl ov12_02235998 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02223354 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - mov r1, #0 - add r2, sp, #0 - ldrsh r2, [r2, r1] - ldr r0, [sp, #0x10] - bl sub_02007DEC - add r3, sp, #0 - mov r2, #2 - ldrsh r2, [r3, r2] - ldr r0, [sp, #0x10] - mov r1, #1 - add r2, r2, r4 - bl sub_02007DEC - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_022290DC - - thumb_func_start ov12_02229184 -ov12_02229184: ; 0x02229184 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - bl ov12_02226848 - cmp r0, #0 - bne _022291A8 - ldr r0, [r4, #0x30] - bl ov12_02226858 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_022291A8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02229184 - - thumb_func_start ov12_022291AC -ov12_022291AC: ; 0x022291AC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - mov r1, #0x34 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [sp, #0x1c] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [sp, #0x20] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [sp, #0x24] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - add r2, r4, #0 - str r0, [sp, #0x28] - add r0, r5, #0 - add r1, r7, #0 - add r2, #0x1c - add r3, sp, #0x2c - bl ov12_02235D74 - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r7, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - lsl r0, r6, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - lsl r3, r7, #0x14 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [sp, #0x20] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x24] - lsr r3, r3, #0x10 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - ldr r0, [sp, #0x28] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x14] - ldr r0, _02229270 ; =0x0000044C - str r0, [sp, #0x18] - ldr r0, [r4, #0x18] - bl ov12_02226870 - str r0, [r4, #0x30] - ldr r0, [r4, #4] - ldr r1, _02229274 ; =ov12_02229184 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_02229270: .word 0x0000044C -_02229274: .word ov12_02229184 - thumb_func_end ov12_022291AC - - thumb_func_start ov12_02229278 -ov12_02229278: ; 0x02229278 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - bne _022292EC - ldr r0, [r4, #0x4c] - add r1, r0, #1 - str r1, [r4, #0x4c] - ldr r0, [r4, #0x44] - cmp r1, r0 - blt _02229300 - mov r1, #0 - str r1, [r4, #0x4c] - ldr r0, [r4, #0x48] - cmp r0, #0 - ldr r0, [r4, #0x54] - bne _022292B0 - cmp r0, #0 - bge _022292A2 - str r1, [r4, #0x54] -_022292A2: - ldr r0, [r4, #0x54] - cmp r0, #0 - bne _022292C4 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _022292C4 -_022292B0: - cmp r0, #0x50 - ble _022292B8 - mov r0, #0x50 - str r0, [r4, #0x54] -_022292B8: - ldr r0, [r4, #0x54] - cmp r0, #0x50 - bne _022292C4 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_022292C4: - ldr r0, [r4, #0x24] - ldr r2, [r4, #0x54] - mov r1, #0x12 - bl sub_02007DEC - ldr r0, [r4, #0x24] - ldr r2, [r4, #0x50] - mov r1, #1 - bl sub_02007DEC - mov r0, #0x42 - ldrsh r1, [r4, r0] - ldr r2, [r4, #0x50] - sub r1, r2, r1 - str r1, [r4, #0x50] - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x54] - add r0, r1, r0 - str r0, [r4, #0x54] - pop {r3, r4, r5, pc} -_022292EC: - ldr r0, [r4, #0x24] - bl ov12_02226B84 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02229300: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02229278 - - thumb_func_start ov12_02229304 -ov12_02229304: ; 0x02229304 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x58 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r6, r0, #0 - add r2, r4, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, #0x1c - add r3, sp, #4 - bl ov12_02235998 - cmp r6, #8 - bgt _02229346 - cmp r6, #2 - blt _02229384 - beq _0222934C - cmp r6, #4 - beq _02229356 - cmp r6, #8 - beq _02229368 - b _02229384 -_02229346: - cmp r6, #0x10 - beq _02229372 - b _02229384 -_0222934C: - add r0, r5, #0 - bl ov12_02220240 - add r7, r0, #0 - b _02229388 -_02229356: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r7, r0, #0 - b _02229388 -_02229368: - add r0, r5, #0 - bl ov12_02220248 - add r7, r0, #0 - b _02229388 -_02229372: - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r7, r0, #0 - b _02229388 -_02229384: - bl sub_02022974 -_02229388: - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r4, #0x48] - cmp r0, #0 - ldr r0, [r4, #0x24] - bne _022293DC - mov r1, #1 - bl sub_020080C0 - str r0, [r4, #0x50] - ldr r0, [r4, #0x24] - mov r1, #0x12 - bl sub_020080C0 - mov r1, #0x50 - sub r0, r1, r0 - str r0, [r4, #0x54] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x40 - strh r0, [r1] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x42 - strh r0, [r1] - mov r0, #0x42 - ldrsh r1, [r4, r0] - sub r0, #0x43 - add r2, r1, #0 - mul r2, r0 - add r0, r4, #0 - add r0, #0x42 - strh r2, [r0] - b _0222940A -_022293DC: - mov r1, #1 - bl sub_020080C0 - str r0, [r4, #0x50] - ldr r0, [r4, #0x24] - mov r1, #0x12 - bl sub_020080C0 - str r0, [r4, #0x54] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x40 - strh r0, [r1] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - add r1, r4, #0 - add r1, #0x42 - strh r0, [r1] -_0222940A: - mov r0, #0 - str r0, [r4, #0x30] - str r0, [r4, #0x34] - mov r0, #0x50 - str r0, [r4, #0x38] - add r0, r5, #0 - add r1, r7, #0 - bl ov12_02223354 - mov r1, #0x50 - sub r0, r1, r0 - str r0, [r4, #0x3c] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r4, #0x44] - mov r0, #0 - str r0, [r4, #0x4c] - ldr r0, [r4, #0x3c] - str r0, [sp] - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x30] - ldr r2, [r4, #0x34] - ldr r3, [r4, #0x38] - bl sub_020086D4 - ldr r0, [r4, #4] - ldr r1, _02229450 ; =ov12_02229278 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02229450: .word ov12_02229278 - thumb_func_end ov12_02229304 - - thumb_func_start ov12_02229454 -ov12_02229454: ; 0x02229454 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - cmp r1, #8 - bgt _0222946E - cmp r1, #2 - blt _022294A4 - beq _02229474 - cmp r1, #4 - beq _0222947C - cmp r1, #8 - beq _0222948C - b _022294A4 -_0222946E: - cmp r1, #0x10 - beq _02229494 - b _022294A4 -_02229474: - bl ov12_02220240 - add r4, r0, #0 - b _022294A8 -_0222947C: - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r4, r0, #0 - b _022294A8 -_0222948C: - bl ov12_02220248 - add r4, r0, #0 - b _022294A8 -_02229494: - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022352AC - add r4, r0, #0 - b _022294A8 -_022294A4: - bl sub_02022974 -_022294A8: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02229454 - - thumb_func_start ov12_022294AC -ov12_022294AC: ; 0x022294AC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _022294BE - cmp r0, #1 - beq _02229504 - pop {r3, r4, r5, pc} -_022294BE: - ldr r0, [r4, #0x24] - add r1, r0, #1 - str r1, [r4, #0x24] - ldr r0, [r4, #0x20] - cmp r1, r0 - blt _02229536 - mov r0, #0 - str r0, [r4, #0x24] - mov r0, #0x1c - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x44] - add r2, r1, r0 - str r2, [r4, #0x44] - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_02007DEC - mov r0, #0x1c - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x3c] - sub r1, r1, r0 - str r1, [r4, #0x3c] - ldr r0, [r4, #0x40] - cmp r1, r0 - ble _022294F8 - str r0, [r4, #0x3c] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_022294F8: - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x3c] - mov r1, #0x12 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_02229504: - ldr r0, [r4, #0x30] - mov r1, #0xe - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x48] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x40] - mov r1, #0x12 - bl sub_02007DEC - ldr r0, [r4, #0x30] - bl ov12_02226B84 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02229536: - pop {r3, r4, r5, pc} - thumb_func_end ov12_022294AC - - thumb_func_start ov12_02229538 -ov12_02229538: ; 0x02229538 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222954A - cmp r0, #1 - beq _0222958E - pop {r3, r4, r5, pc} -_0222954A: - ldr r0, [r4, #0x24] - add r1, r0, #1 - str r1, [r4, #0x24] - ldr r0, [r4, #0x20] - cmp r1, r0 - blt _022295C0 - mov r0, #0 - str r0, [r4, #0x24] - mov r0, #0x1c - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x44] - add r2, r1, r0 - str r2, [r4, #0x44] - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_02007DEC - mov r0, #0x1c - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x3c] - sub r0, r1, r0 - str r0, [r4, #0x3c] - bpl _02229582 - mov r0, #0 - str r0, [r4, #0x3c] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_02229582: - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x3c] - mov r1, #0x12 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_0222958E: - ldr r0, [r4, #0x30] - mov r1, #0xe - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x48] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x40] - mov r1, #0x12 - bl sub_02007DEC - ldr r0, [r4, #0x30] - bl ov12_02226B84 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_022295C0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02229538 - - thumb_func_start ov12_022295C4 -ov12_022295C4: ; 0x022295C4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _022295D6 - cmp r0, #1 - beq _02229618 - pop {r3, r4, r5, pc} -_022295D6: - ldr r0, [r4, #0x24] - add r1, r0, #1 - str r1, [r4, #0x24] - ldr r0, [r4, #0x20] - cmp r1, r0 - blt _02229636 - mov r0, #0 - str r0, [r4, #0x24] - mov r1, #0x1c - ldrsh r2, [r4, r1] - ldr r3, [r4, #0x3c] - sub r2, r3, r2 - str r2, [r4, #0x3c] - ldrsh r1, [r4, r1] - ldr r2, [r4, #0x40] - add r1, r2, r1 - str r1, [r4, #0x40] - ldr r1, [r4, #0x3c] - cmp r1, #0 - bge _02229606 - str r0, [r4, #0x3c] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_02229606: - ldr r0, [r4, #0x40] - mov r1, #0 - str r0, [sp] - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x3c] - mov r3, #0x50 - bl sub_020086D4 - pop {r3, r4, r5, pc} -_02229618: - ldr r0, [r4, #0x30] - mov r1, #0xe - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0x30] - bl ov12_02226B84 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02229636: - pop {r3, r4, r5, pc} - thumb_func_end ov12_022295C4 - - thumb_func_start ov12_02229638 -ov12_02229638: ; 0x02229638 - push {r4, r5, r6, lr} - sub sp, #8 - mov r1, #0x50 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #0x1c] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r6, r0, #0 - add r2, r4, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, #0x28 - add r3, sp, #4 - bl ov12_02235998 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02229454 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - cmp r0, #0 - beq _022296BA - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02223354 - mov r3, #0x50 - sub r0, r3, r0 - str r0, [r4, #0x3c] - mov r1, #0 - str r1, [r4, #0x40] - str r1, [sp] - ldr r0, [r4, #0x30] - ldr r2, [r4, #0x3c] - bl sub_020086D4 - ldr r0, [r4, #4] - ldr r1, _0222972C ; =ov12_022295C4 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r4, r5, r6, pc} -_022296BA: - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_020080C0 - str r0, [r4, #0x44] - str r0, [r4, #0x48] - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02223354 - mov r3, #0x50 - sub r0, r3, r0 - str r0, [r4, #0x3c] - str r0, [r4, #0x40] - mov r0, #0x1c - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _022296FA - ldr r0, [r4, #0x3c] - mov r1, #0 - str r0, [sp] - ldr r0, [r4, #0x30] - add r2, r1, #0 - bl sub_020086D4 - ldr r0, [r4, #4] - ldr r1, _02229730 ; =ov12_02229538 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r4, r5, r6, pc} -_022296FA: - mov r0, #0 - str r0, [r4, #0x3c] - ldr r1, [r4, #0x44] - ldr r0, [r4, #0x40] - add r2, r1, r0 - str r2, [r4, #0x44] - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0x3c] - mov r1, #0 - str r0, [sp] - ldr r0, [r4, #0x30] - add r2, r1, #0 - mov r3, #0x50 - bl sub_020086D4 - ldr r0, [r4, #4] - ldr r1, _02229734 ; =ov12_022294AC - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222972C: .word ov12_022295C4 -_02229730: .word ov12_02229538 -_02229734: .word ov12_022294AC - thumb_func_end ov12_02229638 - - thumb_func_start ov12_02229738 -ov12_02229738: ; 0x02229738 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222974C - cmp r0, #1 - beq _0222976C - b _022297FC -_0222974C: - ldr r0, [r4, #0x10] - str r0, [sp] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r3, [r4, #0xc] - add r0, #0xd4 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02226108 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222976C: - add r0, r4, #0 - add r0, #0xd4 - bl ov12_02226138 - cmp r0, #0 - bne _022297C0 - ldrb r1, [r4, #1] - ldr r0, [r4, #0x18] - cmp r1, r0 - ldrb r0, [r4] - blt _02229786 - add r0, r0, #1 - b _02229788 -_02229786: - sub r0, r0, #1 -_02229788: - strb r0, [r4] - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _022297A0 - ldr r1, [r4, #0x1c] - mov r2, #0 - lsl r1, r1, #0x18 - ldr r0, [r4, #0x28] - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02019184 -_022297A0: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _022297B6 - ldr r1, [r4, #0x1c] - ldr r0, [r4, #0x28] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #3 - mov r3, #0 - bl sub_02019184 -_022297B6: - ldrb r0, [r4, #1] - add sp, #4 - add r0, r0, #1 - strb r0, [r4, #1] - pop {r3, r4, pc} -_022297C0: - mov r3, #0xd4 - ldrsh r0, [r4, r3] - cmp r0, #0 - beq _022297DC - mov r0, #1 - str r0, [r4, #0x20] - ldr r1, [r4, #0x1c] - ldrsh r3, [r4, r3] - lsl r1, r1, #0x18 - ldr r0, [r4, #0x28] - lsr r1, r1, #0x18 - mov r2, #0 - bl sub_02019184 -_022297DC: - mov r3, #0xd6 - ldrsh r0, [r4, r3] - cmp r0, #0 - beq _0222980A - mov r0, #1 - str r0, [r4, #0x24] - ldr r1, [r4, #0x1c] - ldrsh r3, [r4, r3] - lsl r1, r1, #0x18 - ldr r0, [r4, #0x28] - lsr r1, r1, #0x18 - mov r2, #3 - bl sub_02019184 - add sp, #4 - pop {r3, r4, pc} -_022297FC: - ldr r0, [r4, #0x2c] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222980A: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02229738 - - thumb_func_start ov12_02229810 -ov12_02229810: ; 0x02229810 - push {r3, r4, r5, lr} - mov r1, #0xf8 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - str r5, [r4, #0x2c] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #0x30] - ldr r0, [r4, #0x2c] - bl ov12_02220278 - str r0, [r4, #0x28] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r4, #0x18] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - cmp r0, #0 - bne _02229876 - mov r0, #3 - b _02229878 -_02229876: - mov r0, #2 -_02229878: - str r0, [r4, #0x1c] - ldr r0, [r4, #0x2c] - ldr r1, _02229888 ; =ov12_02229738 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_02229888: .word ov12_02229738 - thumb_func_end ov12_02229810 - - thumb_func_start ov12_0222988C -ov12_0222988C: ; 0x0222988C - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #0x2c] - ldr r3, [r4, #0x24] - cmp r3, r0 - beq _022298A0 - ldr r1, [r4, #0x28] - cmp r1, r0 - bne _022298B0 -_022298A0: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} -_022298B0: - mov r1, #0x20 - ldrsh r2, [r4, r1] - cmp r2, #0 - bge _022298D2 - add r2, r3, r2 - cmp r2, #0 - ble _022298CA - str r2, [r4, #0x24] - ldrsh r0, [r4, r1] - ldr r2, [r4, #0x28] - add r0, r2, r0 - str r0, [r4, #0x28] - b _022298EA -_022298CA: - str r0, [r4, #0x24] - ldr r0, [r4, #0x2c] - str r0, [r4, #0x28] - b _022298EA -_022298D2: - add r2, r3, r2 - cmp r2, #0xf - bge _022298E4 - str r2, [r4, #0x24] - ldrsh r0, [r4, r1] - ldr r2, [r4, #0x28] - add r0, r2, r0 - str r0, [r4, #0x28] - b _022298EA -_022298E4: - str r0, [r4, #0x24] - ldr r0, [r4, #0x2c] - str r0, [r4, #0x28] -_022298EA: - ldr r0, [r4, #0x1c] - bl sub_0200D330 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x24] - lsl r0, r0, #4 - orr r1, r0 - ldr r0, _02229904 ; =0x0400004D - strb r1, [r0] - ldr r0, [r4, #0xc] - bl sub_0200C7EC - pop {r4, pc} - ; .align 2, 0 -_02229904: .word 0x0400004D - thumb_func_end ov12_0222988C - - thumb_func_start ov12_02229908 -ov12_02229908: ; 0x02229908 - push {r3, r4, r5, lr} - mov r1, #0x30 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r0, [r4, #4] - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0x20] - ldr r0, [r4, #4] - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #0x24] - ldr r0, [r4, #4] - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #0x28] - ldr r0, [r4, #4] - mov r1, #0 - bl ov12_02220280 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022202C0 - mov r1, #1 - str r0, [r4, #0x1c] - bl sub_0200D3F4 - mov r0, #0x20 - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _0222995E - mov r0, #0 - b _02229960 -_0222995E: - mov r0, #0xf -_02229960: - str r0, [r4, #0x2c] - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_0200D7FC - ldr r0, [r4, #4] - ldr r1, _0222997C ; =ov12_0222988C - add r2, r4, #0 - bl ov12_022201E8 - add r1, r4, #0 - bl ov12_0222988C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222997C: .word ov12_0222988C - thumb_func_end ov12_02229908 - - thumb_func_start ov12_02229980 -ov12_02229980: ; 0x02229980 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - strh r0, [r4, #0xe] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #4] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strh r0, [r4, #6] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - str r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #8 - bl ov12_02220280 - str r0, [r4, #0x30] - add r0, r5, #0 - mov r1, #7 - bl ov12_02220280 - ldr r2, _02229A4C ; =0xFFFF0000 - mov r1, #0 - and r2, r0 - lsl r0, r0, #0x10 - str r1, [r4, #0x1c] - lsr r2, r2, #0x10 - str r2, [r4, #0x20] - lsr r0, r0, #0x10 - str r0, [r4, #0x24] - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _022299F6 - str r1, [r4, #0x20] -_022299F6: - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _02229A00 - mov r0, #0xff - str r0, [r4, #0x24] -_02229A00: - ldr r1, [r4, #0] - add r0, r5, #0 - bl ov12_0222026C - str r0, [r4, #0x38] - add r0, r5, #0 - bl ov12_02220250 - str r0, [r4, #0x34] - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _02229A2A - add r0, r5, #0 - bl ov12_02220240 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov12_02220248 - str r0, [r4, #0x18] - b _02229A3E -_02229A2A: - cmp r0, #1 - bne _02229A3E - add r0, r5, #0 - bl ov12_02220248 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov12_02220240 - str r0, [r4, #0x18] -_02229A3E: - ldr r0, [r4, #0x38] - cmp r0, #0 - bne _02229A48 - bl sub_02022974 -_02229A48: - pop {r3, r4, r5, pc} - nop -_02229A4C: .word 0xFFFF0000 - thumb_func_end ov12_02229980 - - thumb_func_start ov12_02229A50 -ov12_02229A50: ; 0x02229A50 - ldr r0, [r0, #8] - mov r1, #0 - cmp r0, #0 - beq _02229A62 -_02229A58: - ldrh r2, [r0, #0x26] - ldrh r3, [r0, #0x24] - ldr r0, [r0, #0] - cmp r0, #0 - bne _02229A58 -_02229A62: - cmp r2, r3 - beq _02229A68 - mov r1, #1 -_02229A68: - add r0, r1, #0 - bx lr - thumb_func_end ov12_02229A50 - - thumb_func_start ov12_02229A6C -ov12_02229A6C: ; 0x02229A6C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x38] - bl ov12_02229A50 - add r4, r0, #0 - mov r0, #4 - ldrsh r0, [r5, r0] - ldr r1, [r5, #0x28] - cmp r1, r0 - bge _02229A8A - add r0, r1, #1 - str r0, [r5, #0x28] - pop {r4, r5, r6, pc} -_02229A8A: - add r0, r5, #0 - add r0, #0xa8 - bl ov12_02225C14 - cmp r0, #0 - bne _02229AB2 - cmp r4, #0 - bne _02229AB2 - ldr r0, [r5, #0x34] - ldr r1, [r5, #0x38] - bl sub_02014724 - ldr r0, [r5, #0x40] - add r1, r6, #0 - bl ov12_02220220 - add r0, r5, #0 - bl ov12_02235E80 - pop {r4, r5, r6, pc} -_02229AB2: - ldr r1, [r5, #0x1c] - ldr r0, [r5, #0x20] - cmp r0, r1 - bgt _02229AC0 - ldr r0, [r5, #0x24] - cmp r0, r1 - bge _02229AC6 -_02229AC0: - ldr r0, [r5, #0x24] - cmp r0, #0xff - bne _02229B24 -_02229AC6: - mov r0, #0xa8 - ldrsh r2, [r5, r0] - ldr r1, [r5, #0x38] - mov r3, #0xac - add r0, r2, #0 - ldr r2, [r1, #0x20] - mul r0, r3 - ldr r2, [r2, #0] - ldr r2, [r2, #4] - add r0, r0, r2 - str r0, [r1, #0x28] - mov r0, #0xaa - ldrsh r4, [r5, r0] - ldr r2, [r5, #0x38] - add r1, r4, #0 - mul r1, r3 - ldr r3, [r2, #0x20] - ldr r3, [r3, #0] - ldr r3, [r3, #8] - add r1, r1, r3 - str r1, [r2, #0x2c] - ldr r1, [r5, #0x30] - cmp r1, #0 - beq _02229B24 - mov r1, #6 - ldrsh r1, [r5, r1] - add r0, #0xbe - bl sub_020E1F6C - ldr r1, [r5, #0x2c] - add r0, r1, r0 - str r0, [r5, #0x2c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - mov r1, #0xaa - ldrsh r2, [r5, r1] - mov r1, #0xac - mul r1, r2 - add r2, r1, r0 - ldr r1, [r5, #0x38] - ldr r0, [r1, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r2, r0 - str r0, [r1, #0x2c] -_02229B24: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02229A6C - - thumb_func_start ov12_02229B28 -ov12_02229B28: ; 0x02229B28 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - mov r1, #0x41 - lsl r1, r1, #2 - add r6, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x3c - bl ov12_0223595C - add r0, r6, #0 - add r1, r4, #0 - bl ov12_02229980 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_02225964 - add r5, r0, #0 - ldr r1, [r4, #0x14] - add r0, r6, #0 - add r2, sp, #0x18 - bl ov12_02235508 - ldr r1, [r4, #0x18] - add r0, r6, #0 - add r2, sp, #0xc - bl ov12_02235508 - ldr r0, [sp, #0x18] - mov r1, #0xac - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [sp, #0xc] - mov r1, #0xac - bl sub_020E1F6C - add r7, r0, #0 - ldr r0, [sp, #0x1c] - mov r1, #0xac - bl sub_020E1F6C - str r0, [sp, #8] - ldr r0, [sp, #0x10] - mov r1, #0xac - bl sub_020E1F6C - mov r1, #0xe - ldrsh r1, [r4, r1] - add r2, r1, #0 - mul r2, r5 - add r0, r0, r2 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldrh r0, [r4, #6] - lsl r1, r6, #0x10 - mov r2, #0xc - str r0, [sp, #4] - ldrsh r2, [r4, r2] - add r0, r4, #0 - add r0, #0xa8 - add r3, r2, #0 - mul r3, r5 - add r2, r7, r3 - ldr r3, [sp, #8] - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - cmp r5, #0 - ldr r2, _02229C4C ; =0x00005C71 - ble _02229BE0 - ldr r1, _02229C50 ; =0x00000E38 - add r0, r4, #0 - add r0, #0xf0 - mul r1, r5 - mul r2, r5 - mov r3, #0xa - bl ov12_02225D50 - b _02229BF0 -_02229BE0: - ldr r1, _02229C54 ; =0x00003FFF - add r0, r4, #0 - add r0, #0xf0 - mul r1, r5 - mul r2, r5 - mov r3, #0xa - bl ov12_02225D50 -_02229BF0: - ldr r0, [r4, #0x20] - mov r5, #0 - cmp r0, #0 - ble _02229C0A - add r6, r4, #0 - add r6, #0xa8 -_02229BFC: - add r0, r6, #0 - bl ov12_02225C14 - ldr r0, [r4, #0x20] - add r5, r5, #1 - cmp r5, r0 - blt _02229BFC -_02229C0A: - ldr r0, [r4, #0x24] - cmp r0, #0xff - beq _02229C14 - add r0, r0, #1 - str r0, [r4, #0x1c] -_02229C14: - mov r0, #0xa8 - ldrsh r3, [r4, r0] - ldr r1, [r4, #0x38] - mov r2, #0xac - add r0, r3, #0 - ldr r3, [r1, #0x20] - mul r0, r2 - ldr r3, [r3, #0] - ldr r3, [r3, #4] - add r0, r0, r3 - str r0, [r1, #0x28] - mov r1, #0xaa - ldrsh r1, [r4, r1] - ldr r0, [r4, #0x38] - mul r2, r1 - ldr r1, [r0, #0x20] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r1, r2, r1 - str r1, [r0, #0x2c] - ldr r0, [r4, #0x40] - ldr r1, _02229C58 ; =ov12_02229A6C - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02229C4C: .word 0x00005C71 -_02229C50: .word 0x00000E38 -_02229C54: .word 0x00003FFF -_02229C58: .word ov12_02229A6C - thumb_func_end ov12_02229B28 - - thumb_func_start ov12_02229C5C -ov12_02229C5C: ; 0x02229C5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - mov r1, #0x41 - lsl r1, r1, #2 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x3c - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #6] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strh r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0x28] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - ldr r2, _02229DE8 ; =0xFFFF0000 - mov r1, #0 - and r2, r0 - lsl r0, r0, #0x10 - str r1, [r4, #0x1c] - lsr r2, r2, #0x10 - str r2, [r4, #0x20] - lsr r0, r0, #0x10 - str r0, [r4, #0x24] - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _02229CCE - str r1, [r4, #0x20] -_02229CCE: - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _02229CD8 - mov r0, #0xff - str r0, [r4, #0x24] -_02229CD8: - ldr r1, [r4, #0] - add r0, r5, #0 - bl ov12_0222026C - str r0, [r4, #0x38] - add r0, r5, #0 - bl ov12_02220250 - str r0, [r4, #0x34] - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _02229D00 - add r0, r5, #0 - bl ov12_02220240 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov12_02220240 - b _02229D0E -_02229D00: - add r0, r5, #0 - bl ov12_02220248 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov12_02220248 -_02229D0E: - str r0, [r4, #0x18] - ldr r0, [r4, #0x38] - cmp r0, #0 - bne _02229D1A - bl sub_02022974 -_02229D1A: - ldr r1, [r4, #0x14] - add r0, r5, #0 - add r2, sp, #0x14 - bl ov12_02235508 - ldr r1, [r4, #0x18] - add r0, r5, #0 - add r2, sp, #8 - bl ov12_02235508 - cmp r6, #0 - bne _02229D3E - add r0, sp, #0x14 - bl ov12_02235748 - ldr r0, [sp, #8] - str r0, [sp, #0x14] - b _02229D48 -_02229D3E: - add r0, sp, #8 - bl ov12_02235748 - ldr r0, [sp, #0x14] - str r0, [sp, #8] -_02229D48: - ldr r0, [sp, #0x14] - mov r1, #0xac - bl sub_020E1F6C - add r5, r0, #0 - ldr r0, [sp, #8] - mov r1, #0xac - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [sp, #0x18] - mov r1, #0xac - bl sub_020E1F6C - add r7, r0, #0 - ldr r0, [sp, #0xc] - mov r1, #0xac - bl sub_020E1F6C - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldrh r0, [r4, #6] - lsl r1, r5, #0x10 - lsl r2, r6, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - lsl r3, r7, #0x10 - add r0, #0xa8 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - ldr r0, [r4, #0x20] - mov r5, #0 - cmp r0, #0 - ble _02229DA6 - add r6, r4, #0 - add r6, #0xa8 -_02229D98: - add r0, r6, #0 - bl ov12_02225C14 - ldr r0, [r4, #0x20] - add r5, r5, #1 - cmp r5, r0 - blt _02229D98 -_02229DA6: - ldr r0, [r4, #0x24] - cmp r0, #0xff - beq _02229DB0 - add r0, r0, #1 - str r0, [r4, #0x1c] -_02229DB0: - mov r0, #0xa8 - ldrsh r3, [r4, r0] - ldr r1, [r4, #0x38] - mov r2, #0xac - add r0, r3, #0 - ldr r3, [r1, #0x20] - mul r0, r2 - ldr r3, [r3, #0] - ldr r3, [r3, #4] - add r0, r0, r3 - str r0, [r1, #0x28] - mov r1, #0xaa - ldrsh r1, [r4, r1] - ldr r0, [r4, #0x38] - mul r2, r1 - ldr r1, [r0, #0x20] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r1, r2, r1 - str r1, [r0, #0x2c] - ldr r0, [r4, #0x40] - ldr r1, _02229DEC ; =ov12_02229A6C - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02229DE8: .word 0xFFFF0000 -_02229DEC: .word ov12_02229A6C - thumb_func_end ov12_02229C5C - - thumb_func_start ov12_02229DF0 -ov12_02229DF0: ; 0x02229DF0 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x38] - bl ov12_02229A50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xa8 - add r1, #0xcc - bl ov12_02225CE4 - cmp r0, #0 - bne _02229E2A - cmp r4, #0 - bne _02229E2A - ldr r0, [r5, #0x34] - ldr r1, [r5, #0x38] - bl sub_02014724 - ldr r0, [r5, #0x40] - add r1, r6, #0 - bl ov12_02220220 - add r0, r5, #0 - bl ov12_02235E80 - pop {r4, r5, r6, pc} -_02229E2A: - mov r1, #0xa8 - ldrsh r1, [r5, r1] - ldr r0, [r5, #0x38] - mov r2, #0xac - add r3, r1, #0 - ldr r1, [r0, #0x20] - mul r3, r2 - ldr r1, [r1, #0] - ldr r1, [r1, #4] - add r1, r3, r1 - str r1, [r0, #0x28] - mov r1, #0xaa - ldrsh r1, [r5, r1] - ldr r0, [r5, #0x38] - mul r2, r1 - ldr r1, [r0, #0x20] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r1, r2, r1 - str r1, [r0, #0x2c] - pop {r4, r5, r6, pc} - thumb_func_end ov12_02229DF0 - - thumb_func_start ov12_02229E54 -ov12_02229E54: ; 0x02229E54 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - mov r1, #0x41 - lsl r1, r1, #2 - add r6, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x3c - bl ov12_0223595C - add r0, r6, #0 - add r1, r4, #0 - bl ov12_02229980 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_02225964 - add r5, r0, #0 - ldr r1, [r4, #0x14] - add r0, r6, #0 - add r2, sp, #0x20 - bl ov12_02235508 - ldr r1, [r4, #0x18] - add r0, r6, #0 - add r2, sp, #0x14 - bl ov12_02235508 - ldr r0, [sp, #0x20] - mov r1, #0xac - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0xac - bl sub_020E1F6C - str r0, [sp, #0x10] - ldr r0, [sp, #0x24] - mov r1, #0xac - bl sub_020E1F6C - add r7, r0, #0 - ldr r0, [sp, #0x18] - mov r1, #0xac - bl sub_020E1F6C - lsl r1, r7, #0x10 - asr r1, r1, #0x10 - str r1, [sp] - mov r1, #0xe - ldrsh r1, [r4, r1] - mov r3, #0xc - add r2, r1, #0 - mul r2, r5 - add r0, r0, r2 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldrh r0, [r4, #6] - lsl r2, r6, #0x10 - add r1, r4, #0 - str r0, [sp, #8] - ldr r0, [r4, #8] - add r1, #0xcc - lsl r0, r0, #0xc - neg r0, r0 - str r0, [sp, #0xc] - ldrsh r6, [r4, r3] - add r0, r4, #0 - add r0, #0xa8 - add r3, r6, #0 - ldr r6, [sp, #0x10] - mul r3, r5 - add r3, r6, r3 - lsl r3, r3, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225C98 - cmp r5, #0 - ldr r2, _02229F8C ; =0x00005C71 - ble _02229F1A - ldr r1, _02229F90 ; =0x00000E38 - add r0, r4, #0 - add r0, #0xf0 - mul r1, r5 - mul r2, r5 - mov r3, #0xa - bl ov12_02225D50 - b _02229F2A -_02229F1A: - ldr r1, _02229F94 ; =0x00003FFF - add r0, r4, #0 - add r0, #0xf0 - mul r1, r5 - mul r2, r5 - mov r3, #0xa - bl ov12_02225D50 -_02229F2A: - ldr r0, [r4, #0x20] - mov r5, #0 - cmp r0, #0 - ble _02229F4A - add r6, r4, #0 - add r7, r4, #0 - add r6, #0xa8 - add r7, #0xcc -_02229F3A: - add r0, r6, #0 - add r1, r7, #0 - bl ov12_02225CE4 - ldr r0, [r4, #0x20] - add r5, r5, #1 - cmp r5, r0 - blt _02229F3A -_02229F4A: - ldr r0, [r4, #0x24] - cmp r0, #0xff - beq _02229F54 - add r0, r0, #1 - str r0, [r4, #0x1c] -_02229F54: - mov r0, #0xa8 - ldrsh r3, [r4, r0] - ldr r1, [r4, #0x38] - mov r2, #0xac - add r0, r3, #0 - ldr r3, [r1, #0x20] - mul r0, r2 - ldr r3, [r3, #0] - ldr r3, [r3, #4] - add r0, r0, r3 - str r0, [r1, #0x28] - mov r1, #0xaa - ldrsh r1, [r4, r1] - ldr r0, [r4, #0x38] - mul r2, r1 - ldr r1, [r0, #0x20] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r1, r2, r1 - str r1, [r0, #0x2c] - ldr r0, [r4, #0x40] - ldr r1, _02229F98 ; =ov12_02229DF0 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_02229F8C: .word 0x00005C71 -_02229F90: .word 0x00000E38 -_02229F94: .word 0x00003FFF -_02229F98: .word ov12_02229DF0 - thumb_func_end ov12_02229E54 - - thumb_func_start ov12_02229F9C -ov12_02229F9C: ; 0x02229F9C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x38] - bl ov12_02229A50 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x58 - bl ov12_02225AE0 - cmp r0, #0 - bne _02229FD2 - cmp r4, #0 - bne _02229FD2 - ldr r0, [r5, #0x34] - ldr r1, [r5, #0x38] - bl sub_02014724 - ldr r0, [r5, #0x40] - add r1, r6, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_02229FD2: - add r0, r5, #0 - add r0, #0x8c - ldr r2, [r0, #0] - mov r0, #0x5a - ldrsh r0, [r5, r0] - mov r3, #0xac - add r1, r0, #0 - mul r1, r3 - add r1, r2, r1 - add r2, r5, #0 - add r2, #0x88 - ldr r4, [r2, #0] - mov r2, #0x58 - ldrsh r2, [r5, r2] - ldr r0, [r5, #0x38] - mul r3, r2 - ldr r2, [r0, #0x20] - add r3, r4, r3 - ldr r2, [r2, #0] - ldr r2, [r2, #4] - add r2, r3, r2 - str r2, [r0, #0x28] - ldr r2, [r5, #0x38] - ldr r0, [r2, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r2, #0x2c] - pop {r4, r5, r6, pc} - thumb_func_end ov12_02229F9C - - thumb_func_start ov12_0222A00C -ov12_0222A00C: ; 0x0222A00C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0x94 - add r4, r0, #0 - bl ov12_02235E50 - add r5, r0, #0 - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x3c - bl ov12_0223595C - add r0, r4, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r5, #0] - add r0, r4, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r5, #4] - add r0, r4, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r5, #0xc] - add r0, r4, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r5, #8] - add r0, r4, #0 - mov r1, #4 - bl ov12_02220280 - str r0, [r5, #0x10] - add r0, r4, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r5, #0x14] - add r0, r4, #0 - mov r1, #6 - bl ov12_02220280 - str r0, [r5, #0x18] - add r0, r4, #0 - mov r1, #7 - bl ov12_02220280 - str r0, [r5, #0x1c] - add r0, r4, #0 - mov r1, #8 - bl ov12_02220280 - str r0, [r5, #0x20] - cmp r0, #0 - bne _0222A08A - add r0, r4, #0 - bl ov12_02220240 - b _0222A090 -_0222A08A: - add r0, r4, #0 - bl ov12_02220248 -_0222A090: - str r0, [r5, #0x24] - add r2, r5, #0 - ldr r1, [r5, #0x24] - add r0, r4, #0 - add r2, #0x88 - bl ov12_02235508 - ldr r1, [r5, #0] - add r0, r4, #0 - bl ov12_0222026C - str r0, [r5, #0x38] - add r0, r4, #0 - mov r1, #9 - bl ov12_02220280 - add r1, r0, #0 - add r0, r4, #0 - bl ov12_02220260 - str r0, [r5, #0x34] - ldr r1, [r5, #4] - ldr r0, _0222A170 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - add r4, r0, #0 - ldr r1, [r5, #0xc] - ldr r0, _0222A170 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - add r6, r0, #0 - ldr r1, [r5, #8] - ldr r0, _0222A170 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - add r7, r0, #0 - ldr r1, [r5, #0x10] - ldr r0, _0222A170 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x14] - lsl r1, r4, #0x10 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r0, [r5, #0x18] - lsl r2, r6, #0x10 - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [r5, #0x1c] - lsl r3, r7, #0x10 - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0x58 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl ov12_02225A5C - add r0, r5, #0 - add r0, #0x58 - bl ov12_02225AE0 - add r0, r5, #0 - add r0, #0x8c - ldr r2, [r0, #0] - mov r0, #0x5a - ldrsh r0, [r5, r0] - mov r3, #0x58 - mov r4, #0xac - add r1, r0, #0 - add r0, r5, #0 - mul r1, r4 - ldrsh r3, [r5, r3] - add r0, #0x88 - add r2, r2, r1 - ldr r1, [r5, #0x38] - ldr r0, [r0, #0] - mul r4, r3 - add r3, r0, r4 - ldr r0, [r1, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r3, r0 - str r0, [r1, #0x28] - ldr r1, [r5, #0x38] - ldr r0, [r1, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r2, r0 - str r0, [r1, #0x2c] - ldr r0, [r5, #0x40] - ldr r1, _0222A174 ; =ov12_02229F9C - add r2, r5, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222A170: .word 0x0000FFFF -_0222A174: .word ov12_02229F9C - thumb_func_end ov12_0222A00C - - thumb_func_start ov12_0222A178 -ov12_0222A178: ; 0x0222A178 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D3B8 - cmp r0, #0 - ldr r0, [r4, #0x1c] - bne _0222A19E - bl sub_0200D0F4 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_0222A19E: - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222A178 - - thumb_func_start ov12_0222A1AC -ov12_0222A1AC: ; 0x0222A1AC - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x20 - add r5, r0, #0 - add r4, r3, #0 - bl ov12_02235E50 - add r7, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - str r4, [r7, #0x1c] - bl ov12_02220280 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200D5DC - ldr r0, [r7, #4] - ldr r1, _0222A1F0 ; =ov12_0222A178 - add r2, r7, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222A1F0: .word ov12_0222A178 - thumb_func_end ov12_0222A1AC - - thumb_func_start ov12_0222A1F4 -ov12_0222A1F4: ; 0x0222A1F4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222A206 - cmp r0, #1 - beq _0222A284 - b _0222A31C -_0222A206: - ldr r1, [r4, #0x34] - ldr r0, _0222A340 ; =0x0223A03C - lsl r2, r1, #1 - ldrsh r6, [r0, r2] - add r0, r1, #1 - str r0, [r4, #0x34] - cmp r6, #0xff - beq _0222A256 - cmp r6, #0 - bne _0222A24A - ldr r0, [r4, #0x1c] - bl sub_0200D454 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov12_0222339C - cmp r5, r0 - ldr r0, [r4, #4] - bne _0222A23E - mov r1, #2 - bl ov12_02223428 - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D460 - b _0222A24A -_0222A23E: - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D460 -_0222A24A: - ldr r0, [r4, #0x1c] - add r1, r6, #0 - mov r2, #0 - bl sub_0200D5DC - b _0222A332 -_0222A256: - ldr r0, [r4, #0x1c] - mov r1, #2 - bl sub_0200D6A4 - add r0, r4, #0 - ldr r2, _0222A344 ; =0x00000E38 - add r0, #0x20 - mov r1, #0 - mov r3, #4 - bl ov12_02225D50 - mov r1, #7 - ldr r0, [r4, #0x1c] - mvn r1, r1 - mov r2, #0x10 - bl sub_0200D7E0 - mov r0, #0 - str r0, [r4, #0x34] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222A332 -_0222A284: - add r0, r4, #0 - add r0, #0x20 - bl ov12_02225DA0 - cmp r0, #1 - bne _0222A29E - ldr r1, [r4, #0x20] - ldr r0, [r4, #0x1c] - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0200D79C - b _0222A332 -_0222A29E: - ldr r0, [r4, #0x34] - cmp r0, #5 - ble _0222A2AC - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222A332 -_0222A2AC: - add r0, r0, #1 - str r0, [r4, #0x34] - cmp r0, #5 - bhi _0222A332 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222A2C0: ; jump table - .short _0222A332 - _0222A2C0 - 2 ; case 0 - .short _0222A2CC - _0222A2C0 - 2 ; case 1 - .short _0222A2DC - _0222A2C0 - 2 ; case 2 - .short _0222A2EC - _0222A2C0 - 2 ; case 3 - .short _0222A2FC - _0222A2C0 - 2 ; case 4 - .short _0222A30C - _0222A2C0 - 2 ; case 5 -_0222A2CC: - add r0, r4, #0 - ldr r1, _0222A344 ; =0x00000E38 - ldr r2, _0222A348 ; =0xFFFFF1C8 - add r0, #0x20 - mov r3, #4 - bl ov12_02225D50 - b _0222A332 -_0222A2DC: - add r0, r4, #0 - ldr r1, _0222A348 ; =0xFFFFF1C8 - ldr r2, _0222A344 ; =0x00000E38 - add r0, #0x20 - mov r3, #4 - bl ov12_02225D50 - b _0222A332 -_0222A2EC: - add r0, r4, #0 - ldr r1, _0222A344 ; =0x00000E38 - ldr r2, _0222A348 ; =0xFFFFF1C8 - add r0, #0x20 - mov r3, #4 - bl ov12_02225D50 - b _0222A332 -_0222A2FC: - add r0, r4, #0 - ldr r1, _0222A348 ; =0xFFFFF1C8 - ldr r2, _0222A344 ; =0x00000E38 - add r0, #0x20 - mov r3, #4 - bl ov12_02225D50 - b _0222A332 -_0222A30C: - add r0, r4, #0 - ldr r1, _0222A344 ; =0x00000E38 - add r0, #0x20 - mov r2, #0 - mov r3, #2 - bl ov12_02225D50 - b _0222A332 -_0222A31C: - ldr r0, [r4, #0x1c] - bl sub_0200D0F4 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_0222A332: - ldr r0, [r4, #0x1c] - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200C7EC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222A340: .word 0x0223A03C -_0222A344: .word 0x00000E38 -_0222A348: .word 0xFFFFF1C8 - thumb_func_end ov12_0222A1F4 - - thumb_func_start ov12_0222A34C -ov12_0222A34C: ; 0x0222A34C - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x38 - add r5, r0, #0 - add r6, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - str r6, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0x34] - add r0, r5, #0 - bl ov12_02220248 - add r7, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #0 - bl ov12_022258E0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #1 - bl ov12_022258E0 - add r2, r0, #0 - ldr r0, [r4, #0x1c] - add r1, r6, #0 - bl sub_0200D4C4 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - ldr r0, [r4, #0x1c] - bne _0222A3AC - mov r1, #1 - bl sub_0200D364 - b _0222A3B2 -_0222A3AC: - mov r1, #0 - bl sub_0200D364 -_0222A3B2: - ldr r0, [r4, #4] - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D460 - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #0xc - bl sub_0200D5DC - ldr r0, [r4, #4] - ldr r1, _0222A3D8 ; =ov12_0222A1F4 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222A3D8: .word ov12_0222A1F4 - thumb_func_end ov12_0222A34C - - thumb_func_start ov12_0222A3DC -ov12_0222A3DC: ; 0x0222A3DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D3B8 - cmp r0, #0 - ldr r0, [r4, #0x1c] - bne _0222A402 - bl sub_0200D0F4 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_0222A402: - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222A3DC - - thumb_func_start ov12_0222A410 -ov12_0222A410: ; 0x0222A410 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x38 - add r5, r0, #0 - add r6, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - str r6, [r4, #0x1c] - bl ov12_02220248 - add r7, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #0 - bl ov12_022258E0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #1 - bl ov12_022258E0 - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222A458 - mov r6, #0x48 - mov r2, #0x20 - mov r5, #0 - b _0222A46E -_0222A458: - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov12_0223525C - cmp r0, #3 - bne _0222A46A - mov r2, #0x7e - mov r5, #1 - b _0222A46E -_0222A46A: - mov r2, #0x20 - mov r5, #0 -_0222A46E: - ldr r0, [r4, #0x1c] - add r1, r6, #0 - bl sub_0200D4C4 - ldr r0, [r4, #0x1c] - add r1, r5, #0 - bl sub_0200D364 - ldr r0, [r4, #4] - mov r1, #2 - bl ov12_02223428 - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D460 - ldr r0, [r4, #4] - ldr r1, _0222A49C ; =ov12_0222A3DC - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222A49C: .word ov12_0222A3DC - thumb_func_end ov12_0222A410 - - thumb_func_start ov12_0222A4A0 -ov12_0222A4A0: ; 0x0222A4A0 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhi _0222A592 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222A4BA: ; jump table - .short _0222A4C2 - _0222A4BA - 2 ; case 0 - .short _0222A4E8 - _0222A4BA - 2 ; case 1 - .short _0222A500 - _0222A4BA - 2 ; case 2 - .short _0222A53C - _0222A4BA - 2 ; case 3 -_0222A4C2: - mov r0, #0xa0 - str r0, [sp] - mov r3, #0x70 - mov r0, #1 - str r3, [sp, #4] - mov r2, #0x15 - str r2, [sp, #8] - lsl r0, r0, #0x12 - str r0, [sp, #0xc] - add r0, r4, #0 - add r0, #0x24 - add r1, #0x48 - sub r2, #0x33 - bl ov12_02225C98 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222A5AA -_0222A4E8: - add r0, r4, #0 - ldr r2, [r4, #0x1c] - add r0, #0x24 - add r1, #0x48 - bl ov12_02225D2C - cmp r0, #0 - bne _0222A5AA - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222A5AA -_0222A500: - ldr r0, [r4, #0x1c] - bl sub_0200D3B8 - cmp r0, #0 - bne _0222A5AA - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_0200D810 - add r0, r4, #0 - add r2, r4, #0 - mov r1, #0x10 - add r0, #0x20 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0x21 - strb r1, [r0] - add r1, r4, #0 - add r1, #0x20 - add r2, #0x21 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #4] - bl ov12_02235780 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222A5AA -_0222A53C: - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _0222A554 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] -_0222A554: - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - cmp r0, #0x10 - bhs _0222A56C - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x21 - strb r1, [r0] -_0222A56C: - add r0, r4, #0 - add r0, #0x20 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222A5BC ; =0x04000052 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - bne _0222A5AA - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222A5AA -_0222A592: - ldr r0, [r4, #0x1c] - bl sub_0200D0F4 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x10 - pop {r3, r4, r5, pc} -_0222A5AA: - ldr r0, [r4, #0x1c] - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200C7EC - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0222A5BC: .word 0x04000052 - thumb_func_end ov12_0222A4A0 - - thumb_func_start ov12_0222A5C0 -ov12_0222A5C0: ; 0x0222A5C0 - push {r4, r5, r6, lr} - mov r1, #0x6c - add r6, r0, #0 - add r5, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl ov12_0223595C - mov r1, #0x1d - str r5, [r4, #0x1c] - add r0, r5, #0 - mvn r1, r1 - mov r2, #0xa0 - bl sub_0200D4C4 - ldr r0, [r4, #4] - mov r1, #2 - bl ov12_02223428 - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D460 - ldr r0, [r4, #4] - ldr r1, _0222A600 ; =ov12_0222A4A0 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222A600: .word ov12_0222A4A0 - thumb_func_end ov12_0222A5C0 - - thumb_func_start ov12_0222A604 -ov12_0222A604: ; 0x0222A604 - push {r4, lr} - mov r1, #0 - add r4, r0, #0 - bl ov12_02220280 - cmp r0, #0 - beq _0222A61A - add r0, r4, #0 - bl ov12_02226924 - pop {r4, pc} -_0222A61A: - add r0, r4, #0 - bl ov12_02226954 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222A604 - - thumb_func_start ov12_0222A624 -ov12_0222A624: ; 0x0222A624 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r0, #0 - ldrb r0, [r4] - cmp r0, #0x18 - bls _0222A632 - b _0222A826 -_0222A632: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222A63E: ; jump table - .short _0222A670 - _0222A63E - 2 ; case 0 - .short _0222A826 - _0222A63E - 2 ; case 1 - .short _0222A826 - _0222A63E - 2 ; case 2 - .short _0222A826 - _0222A63E - 2 ; case 3 - .short _0222A826 - _0222A63E - 2 ; case 4 - .short _0222A71C - _0222A63E - 2 ; case 5 - .short _0222A71C - _0222A63E - 2 ; case 6 - .short _0222A746 - _0222A63E - 2 ; case 7 - .short _0222A826 - _0222A63E - 2 ; case 8 - .short _0222A826 - _0222A63E - 2 ; case 9 - .short _0222A760 - _0222A63E - 2 ; case 10 - .short _0222A760 - _0222A63E - 2 ; case 11 - .short _0222A78A - _0222A63E - 2 ; case 12 - .short _0222A826 - _0222A63E - 2 ; case 13 - .short _0222A826 - _0222A63E - 2 ; case 14 - .short _0222A7A2 - _0222A63E - 2 ; case 15 - .short _0222A7A2 - _0222A63E - 2 ; case 16 - .short _0222A7CC - _0222A63E - 2 ; case 17 - .short _0222A826 - _0222A63E - 2 ; case 18 - .short _0222A826 - _0222A63E - 2 ; case 19 - .short _0222A826 - _0222A63E - 2 ; case 20 - .short _0222A826 - _0222A63E - 2 ; case 21 - .short _0222A7E4 - _0222A63E - 2 ; case 22 - .short _0222A7E4 - _0222A63E - 2 ; case 23 - .short _0222A80E - _0222A63E - 2 ; case 24 -_0222A670: - ldr r0, [r4, #0x34] - ldr r1, _0222A86C ; =0xFFFF1FFF - cmp r0, #0 - bne _0222A6CA - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - add r5, r0, #0 - and r2, r1 - lsr r1, r0, #0xd - orr r1, r2 - str r1, [r0, #0] - add r5, #0x48 - ldrh r3, [r5] - mov r2, #0x3f - mov r1, #0xf - bic r3, r2 - orr r1, r3 - mov r3, #0x20 - orr r1, r3 - strh r1, [r5] - add r5, r0, #0 - add r5, #0x4a - ldrh r6, [r5] - mov r1, #0x1f - bic r6, r2 - orr r1, r6 - orr r1, r3 - strh r1, [r5] - add r1, r0, #0 - mov r2, #0x80 - add r1, #0x40 - strh r2, [r1] - ldr r1, _0222A870 ; =0x0000A0C0 - add r0, #0x44 - strh r1, [r0] - bl sub_0201D2E8 - mov r1, #5 - bl sub_020E1F6C - add r1, #0x23 - add sp, #4 - str r1, [r4, #0x3c] - pop {r3, r4, r5, r6, pc} -_0222A6CA: - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - add r5, r0, #0 - and r2, r1 - lsr r1, r0, #0xd - orr r1, r2 - str r1, [r0, #0] - add r5, #0x48 - ldrh r3, [r5] - mov r2, #0x3f - mov r1, #0xf - bic r3, r2 - orr r1, r3 - mov r3, #0x20 - orr r1, r3 - strh r1, [r5] - add r5, r0, #0 - add r5, #0x4a - ldrh r6, [r5] - mov r1, #0x1f - bic r6, r2 - orr r1, r6 - orr r1, r3 - strh r1, [r5] - add r1, r0, #0 - lsl r2, r3, #0xa - add r1, #0x40 - strh r2, [r1] - ldr r1, _0222A874 ; =0x000056C0 - add r0, #0x44 - strh r1, [r0] - bl sub_0201D2E8 - mov r1, #5 - bl sub_020E1F6C - add r1, #0x23 - add sp, #4 - str r1, [r4, #0x3c] - pop {r3, r4, r5, r6, pc} -_0222A71C: - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _0222A74C - ldr r0, [r4, #0x38] - cmp r0, #0 - bne _0222A74C - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A746: - ldr r0, [r4, #0x38] - cmp r0, #1 - bne _0222A74E -_0222A74C: - b _0222A868 -_0222A74E: - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A760: - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _0222A868 - ldr r0, [r4, #0x38] - cmp r0, #1 - bne _0222A868 - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A78A: - ldr r0, [r4, #0x38] - cmp r0, #2 - beq _0222A868 - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A7A2: - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _0222A868 - ldr r0, [r4, #0x38] - cmp r0, #2 - bne _0222A868 - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A7CC: - ldr r0, [r4, #0x38] - cmp r0, #3 - beq _0222A868 - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A7E4: - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _0222A868 - ldr r0, [r4, #0x38] - cmp r0, #3 - bne _0222A868 - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #8 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A80E: - ldr r0, [r4, #0x38] - cmp r0, #4 - beq _0222A868 - add r0, r0, #1 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #8 - bl sub_0200D5DC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222A826: - ldr r1, [r4, #0x3c] - cmp r0, r1 - ble _0222A868 - ldr r0, [r4, #0x38] - cmp r0, #0x14 - ldr r0, [r4, #0x1c] - bge _0222A862 - mov r1, #0 - mov r2, #4 - bl sub_0200D5DC - add r1, sp, #0 - ldr r0, [r4, #0x1c] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r0, sp, #0 - mov r1, #0 - ldrsh r0, [r0, r1] - cmp r0, #0x82 - ble _0222A858 - ldr r0, [r4, #0x1c] - bl sub_0200D3F4 -_0222A858: - ldr r0, [r4, #0x38] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0x38] - pop {r3, r4, r5, r6, pc} -_0222A862: - mov r1, #0 - bl sub_0200D3F4 -_0222A868: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0222A86C: .word 0xFFFF1FFF -_0222A870: .word 0x0000A0C0 -_0222A874: .word 0x000056C0 - thumb_func_end ov12_0222A624 - - thumb_func_start ov12_0222A878 -ov12_0222A878: ; 0x0222A878 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _0222A88A - add r0, r4, #0 - bl ov12_0222A624 -_0222A88A: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - ldrb r1, [r4] - ldr r0, [r4, #0x24] - cmp r1, r0 - blt _0222A8E2 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _0222A8F0 ; =0xFFFF1FFF - and r1, r2 - add r2, r0, #0 - str r1, [r0, #0] - add r2, #0x48 - ldrh r3, [r2] - mov r1, #0x3f - bic r3, r1 - strh r3, [r2] - add r2, r0, #0 - add r2, #0x4a - ldrh r3, [r2] - bic r3, r1 - strh r3, [r2] - add r2, r0, #0 - mov r1, #0 - add r2, #0x40 - strh r1, [r2] - add r0, #0x44 - strh r1, [r0] - ldr r0, [r4, #0x1c] - bl sub_0200D3F4 - ldr r0, [r4, #0xc] - bl sub_0200C7EC - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_0222A8E2: - ldr r0, [r4, #0x1c] - bl sub_0200D330 - ldr r0, [r4, #0xc] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222A8F0: .word 0xFFFF1FFF - thumb_func_end ov12_0222A878 - - thumb_func_start ov12_0222A8F4 -ov12_0222A8F4: ; 0x0222A8F4 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x40 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r4, #0x24] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #0x28] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #0x2c] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0x30] - add r0, r5, #0 - mov r1, #6 - bl ov12_02220280 - str r0, [r4, #0x34] - ldr r0, [r4, #4] - ldr r1, [r4, #0x20] - bl ov12_022202C0 - str r0, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0x38] - ldr r1, [r4, #0x28] - cmp r1, #0xff - beq _0222A966 - add r0, r5, #0 - bl ov12_02223428 - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_0200D460 -_0222A966: - ldr r1, [r4, #0x2c] - cmp r1, #0xff - beq _0222A972 - ldr r0, [r4, #0x1c] - bl sub_0200D474 -_0222A972: - add r0, r5, #0 - bl ov12_02223364 - cmp r0, #1 - beq _0222A9A4 - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - cmp r0, #2 - beq _0222A994 - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - cmp r0, #3 - bne _0222A9A4 -_0222A994: - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_0200D3F4 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_0222A9A4: - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - add r7, r0, #0 - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_02220248 - str r0, [sp] - ldr r0, [r4, #0x2c] - cmp r0, #0xff - beq _0222A9F2 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02235254 - add r6, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - bl ov12_02235254 - cmp r7, #3 - bhi _0222A9F2 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222A9E6: ; jump table - .short _0222A9EE - _0222A9E6 - 2 ; case 0 - .short _0222AA78 - _0222A9E6 - 2 ; case 1 - .short _0222AA34 - _0222A9E6 - 2 ; case 2 - .short _0222AABC - _0222A9E6 - 2 ; case 3 -_0222A9EE: - cmp r6, #5 - bls _0222A9F4 -_0222A9F2: - b _0222AAFE -_0222A9F4: - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222AA00: ; jump table - .short _0222AAFE - _0222AA00 - 2 ; case 0 - .short _0222AAFE - _0222AA00 - 2 ; case 1 - .short _0222AA0C - _0222AA00 - 2 ; case 2 - .short _0222AA16 - _0222AA00 - 2 ; case 3 - .short _0222AA20 - _0222AA00 - 2 ; case 4 - .short _0222AA2A - _0222AA00 - 2 ; case 5 -_0222AA0C: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AA16: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AA20: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AA2A: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AA34: - cmp r6, #5 - bhi _0222AAFE - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222AA44: ; jump table - .short _0222AAFE - _0222AA44 - 2 ; case 0 - .short _0222AAFE - _0222AA44 - 2 ; case 1 - .short _0222AA50 - _0222AA44 - 2 ; case 2 - .short _0222AA5A - _0222AA44 - 2 ; case 3 - .short _0222AA64 - _0222AA44 - 2 ; case 4 - .short _0222AA6E - _0222AA44 - 2 ; case 5 -_0222AA50: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AA5A: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AA64: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AA6E: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AA78: - cmp r0, #5 - bhi _0222AAFE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222AA88: ; jump table - .short _0222AAFE - _0222AA88 - 2 ; case 0 - .short _0222AAFE - _0222AA88 - 2 ; case 1 - .short _0222AA94 - _0222AA88 - 2 ; case 2 - .short _0222AA9E - _0222AA88 - 2 ; case 3 - .short _0222AAA8 - _0222AA88 - 2 ; case 4 - .short _0222AAB2 - _0222AA88 - 2 ; case 5 -_0222AA94: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AA9E: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AAA8: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AAB2: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AABC: - cmp r0, #5 - bhi _0222AAFE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222AACC: ; jump table - .short _0222AAFE - _0222AACC - 2 ; case 0 - .short _0222AAFE - _0222AACC - 2 ; case 1 - .short _0222AAD8 - _0222AACC - 2 ; case 2 - .short _0222AAE2 - _0222AACC - 2 ; case 3 - .short _0222AAEC - _0222AACC - 2 ; case 4 - .short _0222AAF6 - _0222AACC - 2 ; case 5 -_0222AAD8: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - b _0222AAFE -_0222AAE2: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AAEC: - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - b _0222AAFE -_0222AAF6: - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 -_0222AAFE: - ldr r0, [r4, #4] - ldr r1, _0222AB0C ; =ov12_0222A878 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222AB0C: .word ov12_0222A878 - thumb_func_end ov12_0222A8F4 - - thumb_func_start ov12_0222AB10 -ov12_0222AB10: ; 0x0222AB10 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r2, r0, #0 - ldr r0, [r6, #0x2c] - cmp r0, #0 - bne _0222AB2C - ldr r0, [r6, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_0222AB2C: - sub r0, r0, #1 - str r0, [r6, #0x2c] - mov r4, #0 - add r5, r6, #0 -_0222AB34: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _0222AB3E - bl sub_0200D330 -_0222AB3E: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0222AB34 - ldr r0, [r6, #0xc] - bl sub_0200C7EC - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_0222AB10 - - thumb_func_start ov12_0222AB50 -ov12_0222AB50: ; 0x0222AB50 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x34 - add r4, r0, #0 - bl ov12_02235E50 - add r7, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov12_0223595C - add r0, r4, #0 - mov r1, #0 - bl ov12_02220280 - cmp r0, #0 - bne _0222AB74 - mov r0, #3 - b _0222AB7C -_0222AB74: - add r0, r4, #0 - mov r1, #0 - bl ov12_02220280 -_0222AB7C: - ldr r5, _0222ABB4 ; =0x0223B120 - str r0, [r7, #0x2c] - mov r6, #0 - add r4, r7, #0 -_0222AB84: - ldr r0, [r7, #4] - add r1, r6, #0 - bl ov12_022202C0 - str r0, [r4, #0x1c] - cmp r0, #0 - beq _0222AB98 - ldr r1, [r5, #0] - bl sub_0200D474 -_0222AB98: - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #4 - blt _0222AB84 - ldr r0, [r7, #4] - ldr r1, _0222ABB8 ; =ov12_0222AB10 - add r2, r7, #0 - bl ov12_022201E8 - add r1, r7, #0 - bl ov12_0222AB10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222ABB4: .word 0x0223B120 -_0222ABB8: .word ov12_0222AB10 - thumb_func_end ov12_0222AB50 - - thumb_func_start ov12_0222ABBC -ov12_0222ABBC: ; 0x0222ABBC - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5, #8] - cmp r0, #0 - beq _0222ABD0 - cmp r0, #1 - beq _0222AC16 - b _0222AC2E -_0222ABD0: - mov r0, #0 - str r0, [r5, #0] - ldr r0, [r5, #0xc] - mov r1, #2 - bl ov12_022233EC - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl ov12_022266E8 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl ov12_0221FDE4 - mov r1, #0xc8 - str r1, [sp] - mov r3, #2 - str r4, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - str r6, [sp, #0xc] - str r0, [sp, #0x10] - add r0, r1, #0 - mov r1, #0xa0 - mov r2, #0xb6 - lsl r3, r3, #0x10 - bl ov12_0222662C - str r0, [r5, #0x24] - ldrb r0, [r5, #8] - add sp, #0x14 - add r0, r0, #1 - strb r0, [r5, #8] - pop {r3, r4, r5, r6, pc} -_0222AC16: - ldr r0, [r5, #0] - add r1, r0, #1 - str r1, [r5, #0] - ldr r0, [r5, #4] - cmp r1, r0 - blt _0222AC3C - ldr r0, [r5, #0x24] - bl ov12_0222669C - ldrb r0, [r5, #8] - add r0, r0, #1 - strb r0, [r5, #8] -_0222AC2E: - ldr r0, [r5, #0xc] - add r1, r4, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 -_0222AC3C: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov12_0222ABBC - - thumb_func_start ov12_0222AC40 -ov12_0222AC40: ; 0x0222AC40 - push {r3, r4, r5, lr} - mov r1, #0x28 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #8 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #4] - ldr r0, [r4, #0xc] - ldr r1, _0222AC6C ; =ov12_0222ABBC - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222AC6C: .word ov12_0222ABBC - thumb_func_end ov12_0222AC40 - - thumb_func_start ov12_0222AC70 -ov12_0222AC70: ; 0x0222AC70 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - str r0, [sp, #0xc] - ldrb r0, [r4] - cmp r0, #3 - bls _0222AC80 - b _0222ADF2 -_0222AC80: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222AC8C: ; jump table - .short _0222AC94 - _0222AC8C - 2 ; case 0 - .short _0222AD46 - _0222AC8C - 2 ; case 1 - .short _0222AD64 - _0222AC8C - 2 ; case 2 - .short _0222ADBE - _0222AC8C - 2 ; case 3 -_0222AC94: - ldrb r0, [r4, #4] - mov r7, #0 - add r1, r7, #0 - add r0, r0, #1 - strb r0, [r4, #4] - ldr r0, [r4, #8] - bl ov12_02220280 - cmp r0, #0 - ble _0222AD0A - ldr r6, _0222AE60 ; =0x0223A09E - add r5, r4, #0 -_0222ACAC: - add r1, sp, #0x10 - ldr r0, [r5, #0x14] - add r1, #2 - add r2, sp, #0x10 - bl sub_0200D550 - ldrb r1, [r4, #4] - ldrb r0, [r6] - cmp r1, r0 - blo _0222ACF0 - add r0, r4, r7 - ldrb r1, [r0, #1] - add r1, r1, #1 - strb r1, [r0, #1] - ldrb r2, [r0, #1] - ldrb r1, [r6, #1] - cmp r2, r1 - blo _0222ACF8 - mov r1, #0 - strb r1, [r0, #1] - ldr r0, [r5, #0x14] - bl sub_0200D408 - cmp r0, #1 - ldr r0, [r5, #0x14] - bne _0222ACE8 - mov r1, #0 - bl sub_0200D3F4 - b _0222ACF8 -_0222ACE8: - mov r1, #1 - bl sub_0200D3F4 - b _0222ACF8 -_0222ACF0: - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D3F4 -_0222ACF8: - ldr r0, [r4, #8] - mov r1, #0 - add r5, r5, #4 - add r6, r6, #2 - add r7, r7, #1 - bl ov12_02220280 - cmp r7, r0 - blt _0222ACAC -_0222AD0A: - ldrb r0, [r4, #4] - cmp r0, #0x2d - blo _0222ADA8 - mov r5, #0 - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222AD3A - add r6, r4, #0 - mov r7, #1 -_0222AD22: - ldr r0, [r6, #0x14] - add r1, r7, #0 - bl sub_0200D3F4 - ldr r0, [r4, #8] - mov r1, #0 - add r6, r6, #4 - add r5, r5, #1 - bl ov12_02220280 - cmp r5, r0 - blt _0222AD22 -_0222AD3A: - mov r0, #0 - strb r0, [r4, #4] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222AE2C -_0222AD46: - mov r1, #0x64 - str r1, [sp] - str r1, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x20 - mov r2, #0x3c - add r3, r1, #0 - bl ov12_02225EF0 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222AE2C -_0222AD64: - add r0, r4, #0 - add r0, #0x20 - bl ov12_02225F6C - cmp r0, #1 - bne _0222ADAA - mov r5, #0 - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222AE2C - add r7, r4, #0 - add r6, r4, #0 - add r7, #0x20 -_0222AD84: - add r0, r7, #0 - add r1, sp, #0x18 - add r2, sp, #0x14 - bl ov12_02225FA4 - ldr r0, [r6, #0x14] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x14] - bl sub_0200D6E8 - ldr r0, [r4, #8] - mov r1, #0 - add r6, r6, #4 - add r5, r5, #1 - bl ov12_02220280 - cmp r5, r0 - blt _0222AD84 -_0222ADA8: - b _0222AE2C -_0222ADAA: - ldrb r0, [r4, #4] - add r0, r0, #1 - strb r0, [r4, #4] - ldrb r0, [r4, #4] - cmp r0, #0x2d - blo _0222AE2C - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222AE2C -_0222ADBE: - ldrb r0, [r4, #5] - cmp r0, #0 - beq _0222ADC8 - sub r0, r0, #1 - strb r0, [r4, #5] -_0222ADC8: - ldrb r0, [r4, #6] - cmp r0, #0xf - bhs _0222ADD2 - add r0, r0, #1 - strb r0, [r4, #6] -_0222ADD2: - ldrb r0, [r4, #5] - cmp r0, #0 - bne _0222ADE4 - ldrb r0, [r4, #6] - cmp r0, #0xf - bne _0222ADE4 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222ADE4: - ldrb r0, [r4, #6] - ldrb r1, [r4, #5] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222AE64 ; =0x04000052 - strh r1, [r0] - b _0222AE2C -_0222ADF2: - mov r5, #0 - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222AE1A - add r6, r4, #0 - add r7, r5, #0 -_0222AE04: - ldr r0, [r6, #0x14] - bl sub_0200D0F4 - ldr r0, [r4, #8] - add r1, r7, #0 - add r6, r6, #4 - add r5, r5, #1 - bl ov12_02220280 - cmp r5, r0 - blt _0222AE04 -_0222AE1A: - ldr r0, [r4, #8] - ldr r1, [sp, #0xc] - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} -_0222AE2C: - mov r5, #0 - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222AE56 - add r6, r4, #0 - add r7, r5, #0 -_0222AE3E: - ldr r0, [r6, #0x14] - ldr r0, [r0, #0] - bl sub_0200D324 - ldr r0, [r4, #8] - add r1, r7, #0 - add r6, r6, #4 - add r5, r5, #1 - bl ov12_02220280 - cmp r5, r0 - blt _0222AE3E -_0222AE56: - ldr r0, [r4, #0x10] - bl sub_0200C7EC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222AE60: .word 0x0223A09E -_0222AE64: .word 0x04000052 - thumb_func_end ov12_0222AC70 - - thumb_func_start ov12_0222AE68 -ov12_0222AE68: ; 0x0222AE68 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r0, [sp] - add r5, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov12_0221FDE4 - mov r1, #0x44 - bl sub_02018144 - add r4, r0, #0 - bne _0222AE86 - bl sub_02022974 -_0222AE86: - mov r0, #0 - strb r0, [r4, #4] - strb r0, [r4] - str r5, [r4, #0xc] - ldr r0, [sp] - str r6, [r4, #0x10] - str r0, [r4, #8] - ldr r1, [sp] - add r0, sp, #8 - bl ov12_0222329C - mov r1, #0 - mvn r1, r1 - ldr r0, [r4, #8] - add r2, r1, #0 - bl ov12_02235780 - mov r0, #0xf - strb r0, [r4, #5] - mov r0, #0 - strb r0, [r4, #6] - ldrb r0, [r4, #6] - ldrb r1, [r4, #5] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222AF98 ; =0x04000052 - strh r1, [r0] - ldr r0, [sp] - str r7, [r4, #0x14] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [sp] - bl ov12_0223525C - cmp r0, #3 - bne _0222AEE2 - ldr r0, [sp] - bl ov12_0221FDD4 - add r1, r0, #0 - mov r0, #0 - add r2, sp, #4 - bl ov12_02235350 - b _0222AEF2 -_0222AEE2: - ldr r0, [sp] - bl ov12_0221FDD4 - add r1, r0, #0 - mov r0, #1 - add r2, sp, #4 - bl ov12_02235350 -_0222AEF2: - ldr r0, [r4, #8] - mov r1, #0 - mov r6, #1 - bl ov12_02220280 - cmp r0, #1 - ble _0222AF2C - add r5, r4, #4 - add r7, sp, #4 -_0222AF04: - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r2, sp, #8 - bl sub_0200CE6C - str r0, [r5, #0x14] - mov r1, #0 - mov r2, #2 - ldrsh r1, [r7, r1] - ldrsh r2, [r7, r2] - bl sub_0200D4C4 - ldr r0, [r4, #8] - mov r1, #0 - add r5, r5, #4 - add r6, r6, #1 - bl ov12_02220280 - cmp r6, r0 - blt _0222AF04 -_0222AF2C: - add r3, sp, #4 - mov r1, #0 - mov r2, #2 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #0x14] - bl sub_0200D4C4 - mov r6, #0 - ldr r0, [r4, #8] - add r1, r6, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222AF86 - add r5, r4, #0 - add r7, r6, #0 -_0222AF4E: - add r1, r4, r6 - mov r0, #0 - strb r0, [r1, #1] - ldr r0, [r5, #0x14] - mov r1, #2 - bl sub_0200D6A4 - mov r2, #0x20 - sub r2, r2, r7 - lsl r2, r2, #0x10 - ldr r0, [r5, #0x14] - mov r1, #0 - asr r2, r2, #0x10 - bl sub_0200D5DC - ldr r0, [r5, #0x14] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #8] - mov r1, #0 - add r5, r5, #4 - add r7, r7, #4 - add r6, r6, #1 - bl ov12_02220280 - cmp r6, r0 - blt _0222AF4E -_0222AF86: - mov r3, #1 - ldr r0, [sp] - ldr r1, _0222AF9C ; =ov12_0222AC70 - add r2, r4, #0 - lsl r3, r3, #0xc - bl ov12_022201CC - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222AF98: .word 0x04000052 -_0222AF9C: .word ov12_0222AC70 - thumb_func_end ov12_0222AE68 - - thumb_func_start ov12_0222AFA0 -ov12_0222AFA0: ; 0x0222AFA0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #5 - bls _0222AFB0 - b _0222B180 -_0222AFB0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222AFBC: ; jump table - .short _0222AFC8 - _0222AFBC - 2 ; case 0 - .short _0222B02A - _0222AFBC - 2 ; case 1 - .short _0222B044 - _0222AFBC - 2 ; case 2 - .short _0222B068 - _0222AFBC - 2 ; case 3 - .short _0222B0C2 - _0222AFBC - 2 ; case 4 - .short _0222B110 - _0222AFBC - 2 ; case 5 -_0222AFC8: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - bne _0222B020 - add r0, r4, #0 - add r0, #0x38 - bl ov12_02226138 - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xd - bl sub_02007DEC - mov r2, #0x38 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02008274 - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x28] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222B020: - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B02A: - mov r0, #0x1f - str r0, [sp] - mov r1, #0 - ldr r0, [r4, #0x10] - mov r2, #0xa - add r3, r1, #0 - bl sub_020086FC - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B044: - ldr r0, [r4, #0x10] - bl sub_020087B4 - cmp r0, #0 - bne _0222B072 - mov r0, #0x1f - str r0, [sp] - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #0xa - add r3, r2, #0 - bl sub_020086FC - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B068: - ldr r0, [r4, #0x10] - bl sub_020087B4 - cmp r0, #0 - beq _0222B074 -_0222B072: - b _0222B18E -_0222B074: - ldrb r0, [r4, #8] - add r0, r0, #1 - strb r0, [r4, #8] - ldrb r0, [r4, #8] - cmp r0, #3 - blo _0222B0BA - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov12_02220280 - add r5, r0, #0 - ldr r0, [r4, #0xc] - mov r1, #1 - bl ov12_02220280 - add r6, r0, #0 - ldr r0, [r4, #0xc] - mov r1, #3 - bl ov12_02220280 - str r0, [sp] - add r0, r4, #0 - lsl r1, r5, #0x10 - lsl r3, r6, #0x10 - add r0, #0x14 - asr r1, r1, #0x10 - mov r2, #0x64 - asr r3, r3, #0x10 - bl ov12_02225E68 - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B0BA: - mov r0, #1 - add sp, #4 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B0C2: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - bne _0222B106 - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x28] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222B106: - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B110: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - ldr r0, [r4, #0x10] - bne _0222B154 - mov r2, #0x14 - ldrsh r2, [r4, r2] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x28] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222B154: - mov r1, #0xc - add r2, r1, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0x10] - add r2, #0xf3 - bl sub_02007DEC - mov r2, #2 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007DEC - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222B180: - ldr r0, [r4, #0xc] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222B18E: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_0222AFA0 - - thumb_func_start ov12_0222B194 -ov12_0222B194: ; 0x0222B194 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x5c - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4, #8] - strb r0, [r4] - str r5, [r4, #0xc] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - ldr r0, [r4, #0xc] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_02223354 - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x64 - lsl r3, r6, #0x10 - add r0, #0x14 - add r2, r1, #0 - asr r3, r3, #0x10 - bl ov12_02225E68 - mov r0, #0xa - str r0, [sp] - add r0, r4, #0 - mov r2, #0 - add r0, #0x38 - mov r1, #2 - add r3, r2, #0 - bl ov12_02226108 - ldr r0, [r4, #0xc] - ldr r1, _0222B21C ; =ov12_0222AFA0 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0222B21C: .word ov12_0222AFA0 - thumb_func_end ov12_0222B194 - - thumb_func_start ov12_0222B220 -ov12_0222B220: ; 0x0222B220 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #4 - bls _0222B230 - b _0222B448 -_0222B230: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222B23C: ; jump table - .short _0222B246 - _0222B23C - 2 ; case 0 - .short _0222B2AC - _0222B23C - 2 ; case 1 - .short _0222B310 - _0222B23C - 2 ; case 2 - .short _0222B374 - _0222B23C - 2 ; case 3 - .short _0222B3D8 - _0222B23C - 2 ; case 4 -_0222B246: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #1 - bne _0222B28A - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x24] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_0222B28A: - mov r1, #0x96 - str r1, [sp] - mov r0, #0x64 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - add r0, r4, #0 - mov r2, #0x32 - add r0, #0x10 - add r3, r2, #0 - bl ov12_02225EF0 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222B2AC: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #1 - bne _0222B2F0 - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x24] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_0222B2F0: - mov r2, #0x64 - str r2, [sp] - str r2, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - mov r1, #0x32 - mov r3, #0x96 - bl ov12_02225EF0 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222B310: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #1 - bne _0222B354 - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x24] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_0222B354: - mov r2, #0x96 - mov r1, #0x64 - str r2, [sp] - str r1, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - add r3, r1, #0 - bl ov12_02225EF0 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222B374: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #1 - bne _0222B3B8 - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x24] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_0222B3B8: - mov r2, #0x64 - str r2, [sp] - str r2, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0x96 - add r0, #0x10 - add r3, r1, #0 - bl ov12_02225EF0 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222B3D8: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #1 - ldr r0, [r4, #0xc] - bne _0222B41C - mov r2, #0x10 - ldrsh r2, [r4, r2] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - ldrsh r0, [r4, r0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x24] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r3, r4, pc} -_0222B41C: - mov r1, #0xc - add r2, r1, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0xc] - add r2, #0xf3 - bl sub_02007DEC - mov r2, #2 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02007DEC - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222B448: - ldr r0, [r4, #8] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222B220 - - thumb_func_start ov12_0222B45C -ov12_0222B45C: ; 0x0222B45C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x58 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - str r5, [r4, #8] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_02223354 - str r0, [r4, #4] - mov r0, #0x32 - str r0, [sp] - mov r1, #0x64 - str r1, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - mov r2, #0x96 - add r3, r1, #0 - bl ov12_02225EF0 - ldr r0, [r4, #8] - ldr r1, _0222B4C4 ; =ov12_0222B220 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0xc - pop {r4, r5, pc} - nop -_0222B4C4: .word ov12_0222B220 - thumb_func_end ov12_0222B45C - - thumb_func_start ov12_0222B4C8 -ov12_0222B4C8: ; 0x0222B4C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - add r2, r0, #0 - ldrb r0, [r5, #1] - cmp r0, #0 - beq _0222B4E2 - cmp r0, #1 - beq _0222B5C8 - cmp r0, #2 - bne _0222B4E0 - b _0222B62A -_0222B4E0: - b _0222B65E -_0222B4E2: - ldrb r3, [r5] - mov r0, #0x1f - lsr r2, r3, #0x1f - lsl r1, r3, #0x1f - sub r1, r1, r2 - ror r1, r0 - add r0, r2, r1 - lsl r0, r0, #1 - add r1, r3, #1 - str r0, [sp, #0xc] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp, #8] - ldr r1, [sp, #0xc] - mov r0, #6 - mul r0, r1 - ldr r1, _0222B67C ; =0x0223A102 - ldrsh r2, [r1, r0] - ldr r1, [sp, #8] - sub r7, r2, r1 - mov r1, #0xa - ldrsh r3, [r5, r1] - ldr r1, _0222B680 ; =0x0223A100 - ldrsh r6, [r1, r0] - mov r1, #8 - ldrsh r2, [r5, r1] - ldr r1, _0222B684 ; =0x0223A0FE - ldrsh r4, [r1, r0] - lsl r0, r7, #0x10 - str r3, [sp] - add r1, r2, r4 - lsr r0, r0, #0x10 - add r2, r2, r6 - str r0, [sp, #4] - add r0, r5, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, #0x28 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - mov r0, #0xa - ldrsh r3, [r5, r0] - mov r0, #8 - ldrsh r2, [r5, r0] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - sub r1, r2, r4 - str r3, [sp] - sub r2, r2, r6 - str r0, [sp, #4] - add r0, r5, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, #0x4c - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - ldr r0, [sp, #0xc] - add r1, r0, #1 - mov r0, #6 - mul r0, r1 - ldr r1, _0222B67C ; =0x0223A102 - ldrsh r2, [r1, r0] - ldr r1, [sp, #8] - sub r7, r2, r1 - mov r1, #0xa - ldrsh r3, [r5, r1] - ldr r1, _0222B680 ; =0x0223A100 - ldrsh r6, [r1, r0] - mov r1, #8 - ldrsh r2, [r5, r1] - ldr r1, _0222B684 ; =0x0223A0FE - ldrsh r4, [r1, r0] - lsl r0, r7, #0x10 - str r3, [sp] - add r1, r2, r4 - lsr r0, r0, #0x10 - add r2, r2, r6 - str r0, [sp, #4] - add r0, r5, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, #0x70 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - mov r0, #0xa - ldrsh r3, [r5, r0] - mov r0, #8 - ldrsh r2, [r5, r0] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - sub r1, r2, r4 - str r3, [sp] - sub r2, r2, r6 - str r0, [sp, #4] - add r0, r5, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, #0x94 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02225BC8 - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] -_0222B5C8: - mov r0, #0 - add r7, r5, #0 - str r0, [sp, #0x10] - str r0, [sp, #0x14] - add r7, #0x28 - add r6, r5, #0 - add r4, r5, #0 -_0222B5D6: - add r0, r7, #0 - bl ov12_02225C14 - cmp r0, #0 - bne _0222B5EC - ldr r0, [sp, #0x10] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - b _0222B5FA -_0222B5EC: - mov r1, #0x28 - mov r2, #0x2a - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r4, #0x18] - bl sub_0200D4C4 -_0222B5FA: - ldr r0, [r4, #0x18] - bl sub_0200D330 - ldr r0, [sp, #0x14] - add r7, #0x24 - add r0, r0, #1 - add r6, #0x24 - add r4, r4, #4 - str r0, [sp, #0x14] - cmp r0, #4 - blt _0222B5D6 - ldr r0, [sp, #0x10] - cmp r0, #4 - bne _0222B670 - ldrb r0, [r5] - cmp r0, #9 - bne _0222B624 - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] - b _0222B670 -_0222B624: - mov r0, #0 - strb r0, [r5, #1] - b _0222B670 -_0222B62A: - ldrb r0, [r5, #4] - cmp r0, #0 - beq _0222B634 - sub r0, r0, #1 - strb r0, [r5, #4] -_0222B634: - ldrb r0, [r5, #5] - cmp r0, #0xf - bhs _0222B63E - add r0, r0, #1 - strb r0, [r5, #5] -_0222B63E: - ldrb r0, [r5, #4] - cmp r0, #0 - bne _0222B650 - ldrb r0, [r5, #5] - cmp r0, #0xf - bne _0222B650 - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] -_0222B650: - ldrb r0, [r5, #5] - ldrb r1, [r5, #4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222B688 ; =0x04000052 - strh r1, [r0] - b _0222B670 -_0222B65E: - ldr r0, [r5, #0xc] - add r1, r2, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_0222B670: - ldr r0, [r5, #0x14] - bl sub_0200C7EC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222B67C: .word 0x0223A102 -_0222B680: .word 0x0223A100 -_0222B684: .word 0x0223A0FE -_0222B688: .word 0x04000052 - thumb_func_end ov12_0222B4C8 - - thumb_func_start ov12_0222B68C -ov12_0222B68C: ; 0x0222B68C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x18] - bl ov12_0221FDE4 - mov r1, #0xb8 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4, #1] - strb r0, [r4] - ldr r0, [sp, #0x18] - str r0, [r4, #0xc] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #8] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0xa] - ldr r0, [r4, #0x10] - mov r1, #0x29 - bl sub_020080C0 - mov r1, #0xa - ldrsh r1, [r4, r1] - sub r0, r1, r0 - strh r0, [r4, #0xa] - ldr r0, [r4, #0xc] - bl ov12_022202EC - str r0, [r4, #0x14] - mov r0, #8 - strb r0, [r4, #4] - mov r1, #6 - strb r1, [r4, #5] - sub r1, r1, #7 - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl ov12_02235780 - ldrb r0, [r4, #5] - ldrb r1, [r4, #4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222B90C ; =0x04000052 - strh r1, [r0] - ldr r0, [r4, #0xc] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_02223334 - str r0, [sp, #0x20] - ldr r0, [r4, #0xc] - bl ov12_0222339C - add r7, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_02223344 - str r0, [sp, #0x1c] - mov r6, #0 - add r5, r4, #0 -_0222B72A: - ldr r0, [r4, #0xc] - add r1, r6, #0 - bl ov12_022202C0 - mov r1, #1 - str r0, [r5, #0x18] - bl sub_0200D810 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0222B72A - ldr r0, [r4, #0xc] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_0223525C - cmp r0, #3 - ldr r0, [r4, #0x18] - bne _0222B81A - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x20] - mov r1, #0x14 - bl sub_0200D474 - ldr r0, [r4, #0x24] - mov r1, #0x14 - bl sub_0200D474 - ldr r0, [r4, #0x18] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x1c] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x20] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x24] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x18] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [r4, #0xc] - bl ov12_0222332C - add r6, r0, #0 - ldr r0, [sp, #0x18] - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r5, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - add r0, r6, #0 - bl sub_02003B08 - ldr r0, [r4, #0x20] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [r4, #0xc] - bl ov12_0222332C - add r6, r0, #0 - ldr r0, [sp, #0x18] - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r5, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0xc4 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - add r0, r6, #0 - bl sub_02003B08 - b _0222B8FC -_0222B81A: - mov r1, #0x14 - bl sub_0200D474 - ldr r0, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200D474 - ldr r0, [r4, #0x20] - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x24] - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x18] - add r1, r7, #1 - bl sub_0200D460 - ldr r0, [r4, #0x1c] - add r1, r7, #1 - bl sub_0200D460 - ldr r0, [r4, #0x20] - add r1, r7, #1 - bl sub_0200D460 - ldr r0, [r4, #0x24] - add r1, r7, #1 - bl sub_0200D460 - ldr r0, [r4, #0x18] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x1c] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x20] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x24] - add r1, r7, #0 - bl sub_0200D460 - ldr r0, [r4, #0x18] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [r4, #0xc] - bl ov12_0222332C - add r6, r0, #0 - ldr r0, [sp, #0x18] - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r5, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0xc4 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - add r0, r6, #0 - bl sub_02003B08 - ldr r0, [r4, #0x20] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [r4, #0xc] - bl ov12_0222332C - add r6, r0, #0 - ldr r0, [sp, #0x18] - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r5, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - add r0, r6, #0 - bl sub_02003B08 -_0222B8FC: - ldr r0, [r4, #0xc] - ldr r1, _0222B910 ; =ov12_0222B4C8 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_0222B90C: .word 0x04000052 -_0222B910: .word ov12_0222B4C8 - thumb_func_end ov12_0222B68C - - thumb_func_start ov12_0222B914 -ov12_0222B914: ; 0x0222B914 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222B926 - cmp r0, #1 - beq _0222B980 - b _0222B9C0 -_0222B926: - ldrb r1, [r4, #2] - ldr r5, _0222B9D0 ; =0x0223A099 - mov r2, #0x64 - lsl r0, r1, #1 - add r3, r1, r0 - ldr r0, _0222B9D4 ; =0x0223A09A - ldr r1, _0222B9D8 ; =0x0223A098 - ldrb r0, [r0, r3] - ldrb r1, [r1, r3] - ldrb r3, [r5, r3] - str r0, [sp] - add r0, r4, #0 - add r0, #0xc - bl ov12_02225E68 - ldrb r0, [r4, #2] - cmp r0, #0 - ldr r0, _0222B9DC ; =0x00007FFF - bne _0222B95C - str r0, [sp] - mov r1, #0 - ldr r0, [r4, #8] - mov r2, #6 - add r3, r1, #0 - bl sub_020086FC - b _0222B96A -_0222B95C: - str r0, [sp] - mov r2, #0 - ldr r0, [r4, #8] - mov r1, #6 - add r3, r2, #0 - bl sub_020086FC -_0222B96A: - ldrb r1, [r4, #2] - mov r0, #1 - eor r0, r1 - strb r0, [r4, #2] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0222B980: - add r0, r4, #0 - add r0, #0xc - bl ov12_02225EB8 - cmp r0, #0 - bne _0222B9A8 - ldr r0, [r4, #8] - bl sub_020087B4 - cmp r0, #0 - bne _0222B9A8 - ldrb r0, [r4, #1] - cmp r0, #4 - ldrb r0, [r4] - bhs _0222B9A4 - sub r0, r0, #1 - strb r0, [r4] - b _0222B9A8 -_0222B9A4: - add r0, r0, #1 - strb r0, [r4] -_0222B9A8: - mov r1, #0xc - ldrsh r2, [r4, r1] - ldr r0, [r4, #8] - bl sub_02007DEC - mov r2, #0xe - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #0xd - bl sub_02007DEC - pop {r3, r4, r5, pc} -_0222B9C0: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222B9D0: .word 0x0223A099 -_0222B9D4: .word 0x0223A09A -_0222B9D8: .word 0x0223A098 -_0222B9DC: .word 0x00007FFF - thumb_func_end ov12_0222B914 - - thumb_func_start ov12_0222B9E0 -ov12_0222B9E0: ; 0x0222B9E0 - push {r3, r4, r5, lr} - mov r1, #0x30 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #2] - strb r0, [r4, #1] - str r5, [r4, #4] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #8] - ldr r0, [r4, #4] - ldr r1, _0222BA14 ; =ov12_0222B914 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_0222BA14: .word ov12_0222B914 - thumb_func_end ov12_0222B9E0 - - thumb_func_start ov12_0222BA18 -ov12_0222BA18: ; 0x0222BA18 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222BA2C - cmp r0, #1 - beq _0222BA66 - b _0222BABE -_0222BA2C: - ldrb r1, [r4, #1] - ldr r2, _0222BAD0 ; =0x0223A0E0 - ldr r5, _0222BAD4 ; =0x0223A0E1 - lsl r0, r1, #2 - add r3, r1, r0 - ldr r0, _0222BAD8 ; =0x0223A0E2 - ldr r1, _0222BADC ; =0x0223A0DF - ldrb r0, [r0, r3] - ldrb r1, [r1, r3] - ldrb r2, [r2, r3] - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - ldr r0, _0222BAE0 ; =0x0223A0E3 - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225EF0 - ldrb r0, [r4, #1] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0222BA66: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #0 - bne _0222BA84 - ldrb r0, [r4, #1] - cmp r0, #3 - ldrb r0, [r4] - bhs _0222BA80 - sub r0, r0, #1 - strb r0, [r4] - b _0222BA84 -_0222BA80: - add r0, r0, #1 - strb r0, [r4] -_0222BA84: - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #2 - mov r1, #4 - ldrsh r0, [r4, r0] - ldrsh r1, [r4, r1] - ldr r2, [r4, #0x24] - bl ov12_02225FD4 - mov r2, #2 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - add sp, #0xc - pop {r4, r5, pc} -_0222BABE: - ldr r0, [r4, #8] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0222BAD0: .word 0x0223A0E0 -_0222BAD4: .word 0x0223A0E1 -_0222BAD8: .word 0x0223A0E2 -_0222BADC: .word 0x0223A0DF -_0222BAE0: .word 0x0223A0E3 - thumb_func_end ov12_0222BA18 - - thumb_func_start ov12_0222BAE4 -ov12_0222BAE4: ; 0x0222BAE4 - push {r3, r4, r5, lr} - mov r1, #0x34 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - str r5, [r4, #8] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_02223354 - strh r0, [r4, #4] - ldr r0, [r4, #8] - ldr r1, _0222BB2C ; =ov12_0222BA18 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222BB2C: .word ov12_0222BA18 - thumb_func_end ov12_0222BAE4 - - thumb_func_start ov12_0222BB30 -ov12_0222BB30: ; 0x0222BB30 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #5 - bls _0222BB40 - b _0222BCA0 -_0222BB40: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222BB4C: ; jump table - .short _0222BB58 - _0222BB4C - 2 ; case 0 - .short _0222BB92 - _0222BB4C - 2 ; case 1 - .short _0222BBD4 - _0222BB4C - 2 ; case 2 - .short _0222BBFE - _0222BB4C - 2 ; case 3 - .short _0222BC20 - _0222BB4C - 2 ; case 4 - .short _0222BC5E - _0222BB4C - 2 ; case 5 -_0222BB58: - ldrb r1, [r4, #1] - ldr r2, _0222BCE0 ; =0x0223A0B8 - ldr r5, _0222BCE4 ; =0x0223A0B9 - lsl r0, r1, #2 - add r3, r1, r0 - ldr r0, _0222BCE8 ; =0x0223A0BA - ldr r1, _0222BCEC ; =0x0223A0B7 - ldrb r0, [r0, r3] - ldrb r1, [r1, r3] - ldrb r2, [r2, r3] - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - ldr r0, _0222BCF0 ; =0x0223A0BB - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225EF0 - ldrb r0, [r4, #1] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0222BB92: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #0 - bne _0222BBA4 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222BBA4: - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #0 - str r0, [sp] - mov r1, #2 - mov r2, #6 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - bl ov12_02226024 - add sp, #0xc - pop {r4, r5, pc} -_0222BBD4: - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - mov r1, #0 - add r3, r0, #0 - lsl r3, r3, #0x10 - str r1, [sp] - mov r0, #5 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x10 - add r2, r1, #0 - asr r3, r3, #0x10 - bl ov12_02225BC8 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0222BBFE: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225C14 - cmp r0, #0 - bne _0222BC10 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222BC10: - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02007DEC - add sp, #0xc - pop {r4, r5, pc} -_0222BC20: - ldrb r1, [r4, #1] - ldr r2, _0222BCE0 ; =0x0223A0B8 - ldr r5, _0222BCE4 ; =0x0223A0B9 - lsl r0, r1, #2 - add r3, r1, r0 - ldr r0, _0222BCE8 ; =0x0223A0BA - ldr r1, _0222BCEC ; =0x0223A0B7 - ldrb r0, [r0, r3] - ldrb r1, [r1, r3] - ldrb r2, [r2, r3] - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - ldr r0, _0222BCF0 ; =0x0223A0BB - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225EF0 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0222BC5E: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225F6C - cmp r0, #0 - bne _0222BC70 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222BC70: - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #1 - str r0, [sp] - mov r1, #2 - mov r2, #6 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - bl ov12_02226024 - add sp, #0xc - pop {r4, r5, pc} -_0222BCA0: - mov r2, #4 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0xc] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #0xc] - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0xc] - add r2, #0xf3 - bl sub_02007DEC - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0222BCE0: .word 0x0223A0B8 -_0222BCE4: .word 0x0223A0B9 -_0222BCE8: .word 0x0223A0BA -_0222BCEC: .word 0x0223A0B7 -_0222BCF0: .word 0x0223A0BB - thumb_func_end ov12_0222BB30 - - thumb_func_start ov12_0222BCF4 -ov12_0222BCF4: ; 0x0222BCF4 - push {r3, r4, r5, lr} - mov r1, #0x34 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - str r5, [r4, #8] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - mov r0, #2 - ldrsh r0, [r4, r0] - strh r0, [r4, #4] - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_02223354 - strh r0, [r4, #6] - ldr r0, [r4, #8] - ldr r1, _0222BD44 ; =ov12_0222BB30 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_0222BD44: .word ov12_0222BB30 - thumb_func_end ov12_0222BCF4 - - thumb_func_start ov12_0222BD48 -ov12_0222BD48: ; 0x0222BD48 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #4 - bhi _0222BE32 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222BD62: ; jump table - .short _0222BD6C - _0222BD62 - 2 ; case 0 - .short _0222BDA6 - _0222BD62 - 2 ; case 1 - .short _0222BDC4 - _0222BD62 - 2 ; case 2 - .short _0222BDDA - _0222BD62 - 2 ; case 3 - .short _0222BE14 - _0222BD62 - 2 ; case 4 -_0222BD6C: - ldr r0, [r4, #8] - bl ov12_02222354 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _0222BE44 ; =0x00007FFF - mov r1, #1 - str r0, [sp, #8] - lsl r2, r2, #0x10 - ldr r0, [r4, #4] - lsr r2, r2, #0x10 - sub r3, r1, #3 - bl sub_02003178 - mov r1, #0 - str r1, [sp] - ldr r0, [r4, #0x10] - mov r2, #0x10 - add r3, r1, #0 - bl sub_020086FC - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222BDA6: - ldr r0, [r4, #4] - bl sub_0200384C - cmp r0, #0 - bne _0222BE40 - ldr r0, [r4, #0x10] - bl sub_020087B4 - cmp r0, #0 - bne _0222BE40 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222BDC4: - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #5 - bls _0222BE40 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222BDDA: - ldr r0, [r4, #8] - bl ov12_02222354 - add r2, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0222BE44 ; =0x00007FFF - mov r1, #1 - str r0, [sp, #8] - lsl r2, r2, #0x10 - ldr r0, [r4, #4] - lsr r2, r2, #0x10 - sub r3, r1, #3 - bl sub_02003178 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0x10] - mov r1, #0x10 - add r3, r2, #0 - bl sub_020086FC - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222BE14: - ldr r0, [r4, #4] - bl sub_0200384C - cmp r0, #0 - bne _0222BE40 - ldr r0, [r4, #0x10] - bl sub_020087B4 - cmp r0, #0 - bne _0222BE40 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222BE32: - ldr r0, [r4, #8] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222BE40: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0222BE44: .word 0x00007FFF - thumb_func_end ov12_0222BD48 - - thumb_func_start ov12_0222BE48 -ov12_0222BE48: ; 0x0222BE48 - push {r3, r4, r5, lr} - mov r1, #0x14 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #8] - add r0, r5, #0 - bl ov12_0222332C - str r0, [r4, #4] - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - str r0, [r4, #0x10] - ldr r0, [r4, #8] - ldr r1, _0222BE7C ; =ov12_0222BD48 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_0222BE7C: .word ov12_0222BD48 - thumb_func_end ov12_0222BE48 - - thumb_func_start ov12_0222BE80 -ov12_0222BE80: ; 0x0222BE80 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222BE94 - cmp r0, #1 - beq _0222BF00 - b _0222BF74 -_0222BE94: - ldrb r1, [r4, #1] - ldr r2, _0222BF88 ; =0x0223A0C2 - ldr r5, _0222BF8C ; =0x0223A0C3 - lsl r0, r1, #2 - add r3, r1, r0 - ldr r0, _0222BF90 ; =0x0223A0C4 - ldr r1, _0222BF94 ; =0x0223A0C1 - ldrb r0, [r0, r3] - ldrb r1, [r1, r3] - ldrb r2, [r2, r3] - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - ldr r0, _0222BF98 ; =0x0223A0C5 - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225EF0 - ldrb r1, [r4, #1] - ldr r6, _0222BF9C ; =0x0223A0A4 - lsl r0, r1, #1 - add r5, r1, r0 - mov r0, #4 - ldrsh r3, [r4, r0] - ldr r0, _0222BFA0 ; =0x0223A0A5 - mov r1, #0 - ldrb r0, [r0, r5] - add r2, r1, #0 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, _0222BFA4 ; =0x0223A0A6 - ldrb r0, [r0, r5] - ldrb r5, [r6, r5] - str r0, [sp, #4] - add r3, r3, r5 - add r0, r4, #0 - lsl r3, r3, #0x10 - add r0, #0x34 - asr r3, r3, #0x10 - bl ov12_02225BC8 - ldrb r0, [r4, #1] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222BF00: - add r0, r4, #0 - add r0, #0x10 - mov r5, #0 - bl ov12_02225F6C - cmp r0, #0 - bne _0222BF10 - add r5, r5, #1 -_0222BF10: - add r0, r4, #0 - add r0, #0x34 - bl ov12_02225C14 - cmp r0, #0 - bne _0222BF1E - add r5, r5, #1 -_0222BF1E: - cmp r5, #2 - blt _0222BF44 - ldrb r0, [r4, #1] - cmp r0, #3 - blo _0222BF40 - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] - mov r0, #0 - strb r0, [r4, #1] - ldrb r0, [r4, #2] - cmp r0, #3 - blo _0222BF44 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222BF44 -_0222BF40: - mov r0, #0 - strb r0, [r4] -_0222BF44: - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0xd - bl sub_02007DEC - mov r0, #0 - str r0, [sp] - mov r1, #0x36 - mov r2, #6 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - bl ov12_02226024 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0222BF74: - ldr r0, [r4, #8] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0222BF88: .word 0x0223A0C2 -_0222BF8C: .word 0x0223A0C3 -_0222BF90: .word 0x0223A0C4 -_0222BF94: .word 0x0223A0C1 -_0222BF98: .word 0x0223A0C5 -_0222BF9C: .word 0x0223A0A4 -_0222BFA0: .word 0x0223A0A5 -_0222BFA4: .word 0x0223A0A6 - thumb_func_end ov12_0222BE80 - - thumb_func_start ov12_0222BFA8 -ov12_0222BFA8: ; 0x0222BFA8 - push {r3, r4, r5, lr} - mov r1, #0x58 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - str r5, [r4, #8] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #4] - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_02223354 - strh r0, [r4, #6] - ldr r0, [r4, #8] - ldr r1, _0222BFF0 ; =ov12_0222BE80 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222BFF0: .word ov12_0222BE80 - thumb_func_end ov12_0222BFA8 - - thumb_func_start ov12_0222BFF4 -ov12_0222BFF4: ; 0x0222BFF4 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222C00A - cmp r0, #1 - beq _0222C022 - cmp r0, #2 - beq _0222C042 - b _0222C084 -_0222C00A: - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #0xa - blo _0222C0A0 - mov r0, #0 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C0A0 -_0222C022: - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x10] - mov r1, #2 - bl sub_0200D810 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C0A0 -_0222C042: - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #0xa - blo _0222C0A0 - ldr r0, _0222C0B4 ; =0x0400004A - mov r1, #0x3f - ldrh r2, [r0] - bic r2, r1 - mov r1, #0x1f - orr r2, r1 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0222C0B8 ; =0xFFFFC0FF - lsl r1, r1, #8 - and r2, r3 - orr r1, r2 - strh r1, [r0] - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C0A0 -_0222C084: - mov r3, #1 - lsl r3, r3, #0x1a - ldr r1, [r3, #0] - ldr r0, _0222C0BC ; =0xFFFF1FFF - and r0, r1 - str r0, [r3, #0] - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} -_0222C0A0: - ldr r0, [r4, #0xc] - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200D330 - ldr r0, [r4, #8] - bl sub_0200C7EC - pop {r4, pc} - ; .align 2, 0 -_0222C0B4: .word 0x0400004A -_0222C0B8: .word 0xFFFFC0FF -_0222C0BC: .word 0xFFFF1FFF - thumb_func_end ov12_0222BFF4 - - thumb_func_start ov12_0222C0C0 -ov12_0222C0C0: ; 0x0222C0C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - mov r1, #0x14 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #4] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #8] - ldr r0, [r4, #4] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0xc] - ldr r0, [r4, #4] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x10] - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _0222C198 ; =0xFFFF1FFF - and r2, r1 - lsr r1, r0, #0xb - orr r1, r2 - str r1, [r0, #0] - add r0, #0x4a - ldrh r2, [r0] - mov r1, #0x3f - bic r2, r1 - mov r1, #0x1f - orr r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _0222C19C ; =0xFFFFC0FF - and r2, r1 - mov r1, #0x12 - lsl r1, r1, #8 - orr r1, r2 - strh r1, [r0] - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02223334 - add r7, r0, #0 - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02223344 - str r0, [sp, #0x18] - ldr r0, [r4, #0xc] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov12_0222332C - str r0, [sp, #0x1c] - add r0, r5, #0 - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r1, #0x20 - lsl r0, r6, #0x14 - str r1, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r1, #0xe0 - str r1, [sp, #0xc] - str r1, [sp, #0x10] - str r1, [sp, #0x14] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - add r2, r7, #0 - bl sub_02003B08 - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #4] - ldr r1, _0222C1A0 ; =ov12_0222BFF4 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222C198: .word 0xFFFF1FFF -_0222C19C: .word 0xFFFFC0FF -_0222C1A0: .word ov12_0222BFF4 - thumb_func_end ov12_0222C0C0 - - thumb_func_start ov12_0222C1A4 -ov12_0222C1A4: ; 0x0222C1A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bls _0222C1B4 - b _0222C396 -_0222C1B4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222C1C0: ; jump table - .short _0222C1C8 - _0222C1C0 - 2 ; case 0 - .short _0222C1DA - _0222C1C0 - 2 ; case 1 - .short _0222C2F2 - _0222C1C0 - 2 ; case 2 - .short _0222C32A - _0222C1C0 - 2 ; case 3 -_0222C1C8: - ldr r0, [r4, #0xc] - mov r1, #0xe - mov r2, #1 - bl sub_02007DEC - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C3B2 -_0222C1DA: - mov r0, #0 - add r6, r4, #0 - ldr r7, _0222C3BC ; =0x0223A094 - str r0, [sp, #0x10] - str r0, [sp, #0x14] - add r5, r4, #0 - add r6, #0x20 -_0222C1E8: - ldrb r0, [r5, #0x18] - cmp r0, #0 - beq _0222C1F4 - cmp r0, #1 - beq _0222C222 - b _0222C270 -_0222C1F4: - ldrb r0, [r5, #0x19] - add r0, r0, #1 - strb r0, [r5, #0x19] - ldrb r1, [r5, #0x19] - ldrb r0, [r7] - cmp r1, r0 - blo _0222C276 - mov r0, #5 - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - mov r0, #5 - mov r1, #0x64 - str r0, [sp, #8] - add r0, r6, #0 - mov r2, #5 - add r3, r1, #0 - bl ov12_02225EF0 - ldrb r0, [r5, #0x18] - add r0, r0, #1 - strb r0, [r5, #0x18] - b _0222C276 -_0222C222: - add r0, r6, #0 - bl ov12_02225F6C - cmp r0, #0 - bne _0222C234 - ldrb r0, [r5, #0x18] - add r0, r0, #1 - strb r0, [r5, #0x18] - b _0222C276 -_0222C234: - add r0, r6, #0 - add r1, sp, #0x28 - add r2, sp, #0x24 - bl ov12_02225FA4 - mov r0, #8 - ldrsb r0, [r4, r0] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, [sp, #0x28] - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [r5, #0x1c] - ldr r2, [sp, #0x24] - bl sub_0200D6E8 - mov r0, #0 - str r0, [sp] - mov r1, #2 - ldr r2, [r4, #4] - ldrsh r1, [r4, r1] - lsl r2, r2, #0x10 - ldr r0, [r5, #0x1c] - ldr r3, [r5, #0x34] - asr r2, r2, #0x10 - bl ov12_0222605C - b _0222C276 -_0222C270: - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] -_0222C276: - ldr r0, [r5, #0x1c] - bl sub_0200D330 - ldr r0, [sp, #0x14] - add r5, #0x2c - add r0, r0, #1 - add r7, r7, #1 - add r6, #0x2c - str r0, [sp, #0x14] - cmp r0, #3 - blt _0222C1E8 - ldr r0, [sp, #0x10] - cmp r0, #3 - bge _0222C294 - b _0222C3B2 -_0222C294: - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #3 - bhs _0222C2EA - mov r6, #0 - add r5, r4, #0 - add r7, r6, #0 -_0222C2A6: - add r1, sp, #0x18 - ldr r0, [r5, #0x1c] - add r1, #2 - add r2, sp, #0x18 - bl sub_0200D550 - add r2, sp, #0x18 - mov r1, #2 - ldrsh r1, [r2, r1] - mov r2, #2 - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x1c] - bl sub_0200D4C4 - mov r0, #8 - ldrsb r0, [r4, r0] - bl sub_020E17B4 - add r1, r0, #0 - mov r2, #0xfe - ldr r0, [r5, #0x1c] - lsl r2, r2, #0x16 - bl sub_0200D6E8 - strb r7, [r5, #0x18] - strb r7, [r5, #0x19] - add r6, r6, #1 - add r5, #0x2c - cmp r6, #3 - blt _0222C2A6 - ldrb r0, [r4] - sub r0, r0, #1 - strb r0, [r4] - b _0222C3B2 -_0222C2EA: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C3B2 -_0222C2F2: - add r5, r4, #0 - mov r7, #0 - add r6, r4, #0 - add r5, #0x20 -_0222C2FA: - ldr r0, [r6, #0x1c] - mov r1, #0 - bl sub_0200D810 - mov r0, #0x64 - str r0, [sp] - str r0, [sp, #4] - mov r0, #5 - mov r1, #5 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #0x64 - add r3, r1, #0 - bl ov12_02225EF0 - add r7, r7, #1 - add r6, #0x2c - add r5, #0x2c - cmp r7, #3 - blt _0222C2FA - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C3B2 -_0222C32A: - mov r7, #0 - add r6, r4, #0 - str r7, [sp, #0xc] - add r6, #0x20 - add r5, r4, #0 -_0222C334: - add r0, r6, #0 - bl ov12_02225F6C - cmp r0, #0 - bne _0222C342 - add r7, r7, #1 - b _0222C37C -_0222C342: - add r0, r6, #0 - add r1, sp, #0x20 - add r2, sp, #0x1c - bl ov12_02225FA4 - mov r0, #8 - ldrsb r0, [r4, r0] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, [sp, #0x20] - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [r5, #0x1c] - ldr r2, [sp, #0x1c] - bl sub_0200D6E8 - mov r0, #0 - str r0, [sp] - mov r1, #2 - ldr r2, [r4, #4] - ldrsh r1, [r4, r1] - lsl r2, r2, #0x10 - ldr r0, [r5, #0x1c] - ldr r3, [r5, #0x34] - asr r2, r2, #0x10 - bl ov12_0222605C -_0222C37C: - ldr r0, [sp, #0xc] - add r6, #0x2c - add r0, r0, #1 - add r5, #0x2c - str r0, [sp, #0xc] - cmp r0, #3 - blt _0222C334 - cmp r7, #3 - blt _0222C3B2 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222C3B2 -_0222C396: - ldr r0, [r4, #0xc] - mov r1, #0xe - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0x10] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} -_0222C3B2: - ldr r0, [r4, #0x14] - bl sub_0200C7EC - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222C3BC: .word 0x0223A094 - thumb_func_end ov12_0222C1A4 - - thumb_func_start ov12_0222C3C0 -ov12_0222C3C0: ; 0x0222C3C0 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x9c - str r0, [sp] - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - ldr r0, [sp] - str r0, [r4, #0x10] - bl ov12_022202EC - str r0, [r4, #0x14] - ldr r0, [r4, #0x10] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - ldr r0, [r4, #0xc] - mov r1, #0x29 - bl sub_020080C0 - mov r1, #2 - ldrsh r1, [r4, r1] - sub r0, r1, r0 - strh r0, [r4, #2] - ldr r0, [r4, #0x10] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl ov12_02223354 - mov r1, #0 - str r0, [r4, #4] - mvn r1, r1 - ldr r0, [r4, #0x10] - add r2, r1, #0 - bl ov12_02235780 - mov r6, #0 - ldr r1, _0222C49C ; =0x0000060C - ldr r0, _0222C4A0 ; =0x04000052 - add r5, r4, #0 - strh r1, [r0] - add r7, r6, #0 -_0222C42C: - strb r7, [r5, #0x18] - strb r7, [r5, #0x19] - ldr r0, [r4, #0x10] - add r1, r6, #0 - bl ov12_022202C0 - str r0, [r5, #0x1c] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r5, #0x1c] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x1c] - add r1, r6, #1 - bl sub_0200D474 - add r6, r6, #1 - add r5, #0x2c - cmp r6, #3 - blt _0222C42C - ldr r0, [sp] - mov r1, #0 - bl ov12_022234A8 - cmp r0, #1 - bne _0222C46A - mov r0, #0 - mvn r0, r0 - b _0222C46C -_0222C46A: - mov r0, #1 -_0222C46C: - strb r0, [r4, #8] - mov r6, #0 - add r5, r4, #0 - mov r7, #8 -_0222C474: - ldrsb r0, [r4, r7] - bl sub_020E17B4 - add r1, r0, #0 - mov r2, #0xfe - ldr r0, [r5, #0x1c] - lsl r2, r2, #0x16 - bl sub_0200D6E8 - add r6, r6, #1 - add r5, #0x2c - cmp r6, #3 - blt _0222C474 - ldr r0, [r4, #0x10] - ldr r1, _0222C4A4 ; =ov12_0222C1A4 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222C49C: .word 0x0000060C -_0222C4A0: .word 0x04000052 -_0222C4A4: .word ov12_0222C1A4 - thumb_func_end ov12_0222C3C0 - - thumb_func_start ov12_0222C4A8 -ov12_0222C4A8: ; 0x0222C4A8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bls _0222C4B8 - b _0222C5E2 -_0222C4B8: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222C4C4: ; jump table - .short _0222C4CC - _0222C4C4 - 2 ; case 0 - .short _0222C4FE - _0222C4C4 - 2 ; case 1 - .short _0222C512 - _0222C4C4 - 2 ; case 2 - .short _0222C56E - _0222C4C4 - 2 ; case 3 -_0222C4CC: - ldr r0, [r4, #0xc] - bl ov12_0222332C - add r5, r0, #0 - ldr r0, [r4, #0xc] - bl ov12_02222354 - add r2, r0, #0 - mov r1, #0 - lsl r2, r2, #0x10 - str r1, [sp] - mov r0, #0xa - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #1 - add r0, r5, #0 - lsr r2, r2, #0x10 - add r3, r1, #0 - bl sub_02003178 - ldrb r0, [r4] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, r7, pc} -_0222C4FE: - ldr r0, [r4, #0xc] - bl ov12_0222332C - bl sub_0200384C - cmp r0, #0 - bne _0222C5F0 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222C512: - mov r0, #5 - str r0, [sp] - ldrb r1, [r4, #1] - add r0, r4, #0 - add r0, #0xb4 - lsl r2, r1, #1 - ldr r1, _0222C5F4 ; =0x0223A0EE - ldrsh r1, [r1, r2] - mov r2, #0 - add r3, r2, #0 - bl ov12_02226108 - ldrb r0, [r4, #2] - cmp r0, #0 - ldr r0, [r4, #0xc] - bne _0222C544 - bl ov12_0222332C - mov r1, #0 - mov r2, #0xff - mov r3, #0xa - str r1, [sp] - bl sub_02003A2C - b _0222C556 -_0222C544: - bl ov12_0222332C - ldr r1, _0222C5F8 ; =0x00007FFF - mov r2, #0xff - str r1, [sp] - mov r1, #0 - mov r3, #0xa - bl sub_02003A2C -_0222C556: - mov r0, #3 - strb r0, [r4, #3] - ldrb r1, [r4, #2] - mov r0, #1 - eor r0, r1 - strb r0, [r4, #2] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222C56E: - add r0, r4, #0 - add r0, #0xb4 - bl ov12_02226138 - cmp r0, #0 - bne _0222C58C - ldrb r0, [r4, #1] - cmp r0, #8 - ldrb r0, [r4] - blo _0222C588 - add r0, r0, #1 - strb r0, [r4] - b _0222C58C -_0222C588: - sub r0, r0, #1 - strb r0, [r4] -_0222C58C: - ldrb r0, [r4, #3] - cmp r0, #0 - beq _0222C5AE - sub r0, r0, #1 - strb r0, [r4, #3] - ldrb r0, [r4, #3] - cmp r0, #0 - bne _0222C5AE - ldr r0, [r4, #0xc] - bl ov12_0222332C - mov r1, #0 - mov r2, #0xff - add r3, r1, #0 - str r1, [sp] - bl sub_02003A2C -_0222C5AE: - mov r6, #0 - add r5, r4, #0 - mov r7, #0x14 -_0222C5B4: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _0222C5C8 - mov r2, #0xb4 - ldrsh r3, [r4, r2] - ldrsh r2, [r5, r7] - mov r1, #0 - add r2, r3, r2 - bl sub_02007DEC -_0222C5C8: - add r6, r6, #1 - add r5, #0x14 - cmp r6, #4 - blt _0222C5B4 - mov r3, #0xb4 - ldrsh r3, [r4, r3] - ldr r0, [r4, #8] - mov r1, #3 - mov r2, #0 - bl sub_02019184 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0222C5E2: - ldr r0, [r4, #0xc] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222C5F0: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222C5F4: .word 0x0223A0EE -_0222C5F8: .word 0x00007FFF - thumb_func_end ov12_0222C4A8 - - thumb_func_start ov12_0222C5FC -ov12_0222C5FC: ; 0x0222C5FC - push {r3, r4, r5, r6, r7, lr} - mov r1, #0xd8 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - str r5, [r4, #0xc] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - bl ov12_02220278 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - bl ov12_02223364 - cmp r0, #1 - bne _0222C62E - mov r1, #0x40 - b _0222C630 -_0222C62E: - mov r1, #0xa -_0222C630: - add r2, r4, #0 - add r0, r5, #0 - add r2, #0x14 - add r3, r4, #4 - bl ov12_02235998 - ldr r0, [r4, #4] - mov r6, #0 - cmp r0, #0 - ble _0222C666 - add r5, r4, #0 - add r7, r6, #0 -_0222C648: - ldr r0, [r5, #0x1c] - add r1, r7, #0 - bl sub_020080C0 - strh r0, [r5, #0x14] - ldr r0, [r5, #0x1c] - mov r1, #1 - bl sub_020080C0 - strh r0, [r5, #0x16] - ldr r0, [r4, #4] - add r6, r6, #1 - add r5, #0x14 - cmp r6, r0 - blt _0222C648 -_0222C666: - ldr r0, [r4, #0xc] - ldr r1, _0222C674 ; =ov12_0222C4A8 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222C674: .word ov12_0222C4A8 - thumb_func_end ov12_0222C5FC - - thumb_func_start ov12_0222C678 -ov12_0222C678: ; 0x0222C678 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - bne _0222C6C2 - add r0, r4, #0 - add r0, #0x40 - bl ov12_02225C14 - cmp r0, #0 - bne _0222C696 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222C696: - add r0, r4, #0 - add r0, #0x1c - bl ov12_02226138 - add r0, r4, #0 - add r0, #0x64 - bl ov12_02226454 - mov r1, #0x40 - mov r2, #0x42 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - bl sub_0200D4C4 - ldr r0, [r4, #0x18] - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200C7EC - pop {r4, pc} -_0222C6C2: - ldr r0, [r4, #0xc] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222C678 - - thumb_func_start ov12_0222C6D4 -ov12_0222C6D4: ; 0x0222C6D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x8c - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - str r5, [r4, #0xc] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - bl ov12_02220278 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x18] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - cmp r0, #0 - ldr r0, [r4, #0xc] - bne _0222C718 - bl ov12_02220248 - b _0222C71C -_0222C718: - bl ov12_02220240 -_0222C71C: - add r6, r0, #0 - ldr r0, [r4, #0xc] - add r1, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x14] - add r1, r4, #4 - bl ov12_02235918 - ldr r0, [r4, #0x14] - mov r1, #0x29 - bl sub_020080C0 - mov r1, #6 - ldrsh r1, [r4, r1] - sub r0, r1, r0 - strh r0, [r4, #6] - ldr r0, [r4, #0xc] - add r1, r6, #0 - bl ov12_02225964 - add r7, r0, #0 - ldr r0, [r4, #0xc] - add r1, r6, #0 - bl ov12_0222598C - add r6, r0, #0 - mov r0, #6 - ldrsh r3, [r4, r0] - mov r0, #4 - ldrsh r1, [r4, r0] - mov r2, #0x14 - add r0, r6, #0 - mul r0, r2 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - str r2, [sp, #4] - sub r2, #0x28 - mul r2, r7 - add r2, r1, r2 - add r0, r4, #0 - lsl r2, r2, #0x10 - add r0, #0x40 - asr r2, r2, #0x10 - bl ov12_02225BC8 - add r0, r5, #0 - mov r1, #2 - bl ov12_022233EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov12_022233EC - mov r5, #1 - add r3, r5, #0 - lsl r3, r6 - add r1, r0, #0 - add r6, r3, #0 - mov r2, #0x20 - add r3, r5, #0 - orr r6, r2 - lsl r3, r1 - add r1, r6, #0 - orr r1, r3 - sub r2, #0x21 - ldr r0, [r4, #0xc] - orr r1, r5 - add r3, r2, #0 - bl ov12_022357BC - mov r1, #0x1f - mov r2, #0 - str r1, [sp] - mov r0, #0xf - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x64 - add r3, r2, #0 - bl ov12_02226424 - ldr r0, [r4, #0x18] - add r1, r5, #0 - bl sub_0200D810 - ldr r0, [r4, #0xc] - ldr r1, _0222C7DC ; =ov12_0222C678 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222C7DC: .word ov12_0222C678 - thumb_func_end ov12_0222C6D4 - - thumb_func_start ov12_0222C7E0 -ov12_0222C7E0: ; 0x0222C7E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222C7F2 - cmp r0, #1 - beq _0222C832 - b _0222C862 -_0222C7F2: - ldrb r0, [r4, #1] - cmp r0, #0 - ldrb r0, [r4, #2] - bne _0222C804 - lsl r3, r0, #3 - ldr r0, _0222C87C ; =0x0223A118 - ldr r2, [r0, r3] - neg r1, r2 - b _0222C80C -_0222C804: - lsl r3, r0, #3 - ldr r0, _0222C87C ; =0x0223A118 - ldr r1, [r0, r3] - neg r2, r1 -_0222C80C: - ldr r5, _0222C880 ; =0x0223A11C - add r0, r4, #0 - ldr r3, [r5, r3] - add r0, #0x5c - bl ov12_02225D50 - ldrb r0, [r4, #1] - cmp r0, #1 - bne _0222C824 - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] -_0222C824: - ldrb r1, [r4, #1] - mov r0, #1 - eor r0, r1 - strb r0, [r4, #1] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222C832: - add r0, r4, #0 - add r0, #0x5c - bl ov12_02225DA0 - cmp r0, #1 - bne _0222C84E - ldr r2, [r4, #0x5c] - ldr r0, [r4, #0x28] - lsl r2, r2, #0x10 - mov r1, #9 - lsr r2, r2, #0x10 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_0222C84E: - ldrb r0, [r4, #2] - cmp r0, #5 - ldrb r0, [r4] - blo _0222C85C - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0222C85C: - sub r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0222C862: - ldr r0, [r4, #0x28] - mov r1, #9 - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222C87C: .word 0x0223A118 -_0222C880: .word 0x0223A11C - thumb_func_end ov12_0222C7E0 - - thumb_func_start ov12_0222C884 -ov12_0222C884: ; 0x0222C884 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222C898 - cmp r0, #1 - beq _0222C8BC - b _0222C8E6 -_0222C898: - mov r0, #0x22 - ldrsh r0, [r4, r0] - mov r1, #0x1c - mov r2, #0x1e - str r0, [sp] - mov r3, #0x20 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - add r0, #0x38 - bl ov12_02226108 - ldrb r0, [r4] - add sp, #8 - add r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_0222C8BC: - ldr r0, [r4, #0x2c] - add r1, sp, #4 - bl ov12_02235918 - add r0, r4, #0 - add r3, sp, #4 - mov r1, #0 - mov r2, #2 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r3, [r4, #0x2c] - add r0, #0x38 - bl ov12_0222619C - cmp r0, #0 - bne _0222C8F4 - ldrb r0, [r4] - add sp, #8 - add r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_0222C8E6: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222C8F4: - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_0222C884 - - thumb_func_start ov12_0222C8F8 -ov12_0222C8F8: ; 0x0222C8F8 - push {r4, r5, r6, lr} - mov r1, #0x70 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0x28] - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0x2c] - ldr r0, [r4, #0x28] - mov r1, #0xb - mov r2, #0x64 - bl sub_02007DEC - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0x1c] - add r0, r5, #0 - mov r1, #2 - bl ov12_02220280 - strh r0, [r4, #0x1e] - add r0, r5, #0 - mov r1, #3 - bl ov12_02220280 - strh r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #4 - bl ov12_02220280 - strh r0, [r4, #0x22] - add r0, r5, #0 - mov r1, #5 - bl ov12_02220280 - str r0, [r4, #0x24] - cmp r6, #0 - ldr r0, [r4, #4] - bne _0222C982 - ldr r1, _0222C98C ; =ov12_0222C7E0 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} -_0222C982: - ldr r1, _0222C990 ; =ov12_0222C884 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222C98C: .word ov12_0222C7E0 -_0222C990: .word ov12_0222C884 - thumb_func_end ov12_0222C8F8 - - thumb_func_start ov12_0222C994 -ov12_0222C994: ; 0x0222C994 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r2, r0, #0 - ldrb r0, [r5] - cmp r0, #0 - beq _0222C9A6 - cmp r0, #1 - beq _0222C9C8 - b _0222CA1C -_0222C9A6: - ldr r2, [r5, #0x48] - mov r0, #0xa - add r1, r2, #2 - str r0, [sp] - add r0, r5, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, #0x4c - asr r1, r1, #0x10 - asr r2, r2, #0x10 - mov r3, #0 - bl ov12_02226108 - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_0222C9C8: - add r0, r5, #0 - add r0, #0x4c - bl ov12_02226138 - cmp r0, #0 - bne _0222C9DC - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_0222C9DC: - mov r6, #0 - add r4, r5, #0 - mov r7, #0x28 -_0222C9E2: - ldr r0, [r4, #0x38] - cmp r0, #0 - beq _0222C9F6 - mov r2, #0x4c - ldrsh r3, [r5, r2] - ldrsh r2, [r4, r7] - mov r1, #0 - add r2, r3, r2 - bl sub_02007DEC -_0222C9F6: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0222C9E2 - mov r3, #0x4c - ldrsh r3, [r5, r3] - ldr r0, [r5, #0x14] - mov r1, #3 - mov r2, #0 - bl sub_02019184 - mov r3, #0x4e - mov r1, #3 - ldrsh r3, [r5, r3] - ldr r0, [r5, #0x14] - add r2, r1, #0 - bl sub_02019184 - pop {r3, r4, r5, r6, r7, pc} -_0222CA1C: - ldr r0, [r5, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_0222C994 - - thumb_func_start ov12_0222CA2C -ov12_0222CA2C: ; 0x0222CA2C - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x70 - add r4, r0, #0 - bl ov12_02235E50 - add r7, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov12_0223595C - ldr r0, [r7, #4] - mov r1, #1 - bl ov12_02220540 - cmp r0, #0x46 - bgt _0222CA5C - bge _0222CA7E - cmp r0, #0x1e - bgt _0222CA56 - beq _0222CA8A - b _0222CA90 -_0222CA56: - cmp r0, #0x32 - beq _0222CA84 - b _0222CA90 -_0222CA5C: - cmp r0, #0x6e - bgt _0222CA68 - bge _0222CA72 - cmp r0, #0x5a - beq _0222CA78 - b _0222CA90 -_0222CA68: - cmp r0, #0x96 - bne _0222CA90 - mov r0, #6 - str r0, [r7, #0x48] - b _0222CA94 -_0222CA72: - mov r0, #5 - str r0, [r7, #0x48] - b _0222CA94 -_0222CA78: - mov r0, #4 - str r0, [r7, #0x48] - b _0222CA94 -_0222CA7E: - mov r0, #3 - str r0, [r7, #0x48] - b _0222CA94 -_0222CA84: - mov r0, #2 - str r0, [r7, #0x48] - b _0222CA94 -_0222CA8A: - mov r0, #1 - str r0, [r7, #0x48] - b _0222CA94 -_0222CA90: - mov r0, #0 - str r0, [r7, #0x48] -_0222CA94: - add r5, r7, #0 - mov r6, #0 - add r4, r7, #0 - add r5, #0x28 -_0222CA9C: - ldr r0, [r7, #4] - add r1, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x38] - cmp r0, #0 - beq _0222CAB0 - add r1, r5, #0 - bl ov12_02235918 -_0222CAB0: - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #4 - blt _0222CA9C - ldr r0, [r7, #4] - ldr r1, _0222CAC8 ; =ov12_0222C994 - add r2, r7, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222CAC8: .word ov12_0222C994 - thumb_func_end ov12_0222CA2C - - thumb_func_start ov12_0222CACC -ov12_0222CACC: ; 0x0222CACC - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222CAE0 - cmp r0, #1 - beq _0222CB0E - b _0222CB7C -_0222CAE0: - mov r0, #0xa - str r0, [sp] - add r0, r4, #0 - mov r2, #0 - add r0, #0x40 - mov r1, #0x14 - add r3, r2, #0 - bl ov12_02226108 - mov r0, #0xa - str r0, [sp] - add r0, r4, #0 - mov r2, #0 - add r0, #0x64 - mov r1, #2 - add r3, r2, #0 - bl ov12_02226108 - ldrb r0, [r4] - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, pc} -_0222CB0E: - add r0, r4, #0 - add r0, #0x40 - bl ov12_02226138 - cmp r0, #0 - bne _0222CB22 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222CB72 -_0222CB22: - mov r1, #0x2c - ldrsh r2, [r4, r1] - mov r1, #0x40 - ldrsh r1, [r4, r1] - ldr r0, [r4, #0x38] - add r1, r2, r1 - mov r2, #0x2e - ldrsh r3, [r4, r2] - mov r2, #0x42 - ldrsh r2, [r4, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r1, #0x40 - ldrsh r2, [r4, r1] - mov r1, #0x2c - ldrsh r1, [r4, r1] - ldr r0, [r4, #0x3c] - sub r1, r2, r1 - mov r2, #0x2e - ldrsh r3, [r4, r2] - mov r2, #0x42 - ldrsh r2, [r4, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #0x38] - bl sub_0200D330 - ldr r0, [r4, #0x3c] - bl sub_0200D330 -_0222CB72: - ldr r0, [r4, #0xc] - bl sub_0200C7EC - add sp, #4 - pop {r3, r4, pc} -_0222CB7C: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0222CACC - - thumb_func_start ov12_0222CB90 -ov12_0222CB90: ; 0x0222CB90 - push {r3, r4, r5, lr} - mov r1, #0x88 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r0, [r4, #4] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x38] - ldr r0, [r4, #4] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x3c] - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0x30] - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0x34] - add r1, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0x28 - bl ov12_02235918 - add r1, r4, #0 - ldr r0, [r4, #0x34] - add r1, #0x2c - bl ov12_02235918 - ldr r0, [r4, #4] - ldr r1, _0222CBF8 ; =ov12_0222CACC - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222CBF8: .word ov12_0222CACC - thumb_func_end ov12_0222CB90 - - thumb_func_start ov12_0222CBFC -ov12_0222CBFC: ; 0x0222CBFC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - ldr r2, [r4, #0x38] - add r0, #0x8c - add r1, #0xb0 - bl ov12_02225D2C - cmp r0, #0 - bne _0222CC28 - ldr r0, [r4, #0x38] - bl sub_0200D0F4 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl ov12_02235E80 - pop {r3, r4, r5, pc} -_0222CC28: - add r0, r4, #0 - add r0, #0xd4 - bl ov12_02225DA0 - cmp r0, #1 - bne _0222CC44 - add r1, r4, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - ldr r0, [r4, #0x38] - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0200D79C -_0222CC44: - ldr r0, [r4, #0x38] - bl sub_0200D330 - ldr r0, [r4, #0x20] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222CBFC - - thumb_func_start ov12_0222CC54 -ov12_0222CC54: ; 0x0222CC54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0xe8 - add r6, r0, #0 - add r7, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x10 - bl ov12_0223595C - add r0, r6, #0 - mov r1, #0 - bl ov12_02220280 - strh r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #1 - bl ov12_02220280 - strh r0, [r4, #0xe] - add r0, r6, #0 - mov r1, #2 - bl ov12_02220280 - str r0, [r4, #4] - add r0, r6, #0 - mov r1, #3 - bl ov12_02220280 - str r0, [r4, #8] - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_02225964 - add r5, r0, #0 - add r0, r7, #0 - mov r1, #2 - str r7, [r4, #0x38] - bl sub_0200D6A4 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x44] - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x58] - add r1, r4, #0 - ldr r0, [r4, #0x44] - add r1, #0x40 - bl ov12_02235918 - add r1, r4, #0 - ldr r0, [r4, #0x58] - add r1, #0x54 - bl ov12_02235918 - mov r0, #0x42 - ldrsh r0, [r4, r0] - mov r3, #0x54 - str r0, [sp] - mov r0, #0x56 - ldrsh r2, [r4, r0] - mov r0, #0xe - ldrsh r0, [r4, r0] - add r1, r0, #0 - mul r1, r5 - add r0, r2, r1 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #4] - add r1, r4, #0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #8] - mov r2, #0x40 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldrsh r3, [r4, r3] - add r0, r4, #0 - ldrsh r2, [r4, r2] - mov ip, r3 - mov r3, #0xc - ldrsh r3, [r4, r3] - add r0, #0x8c - add r1, #0xb0 - add r7, r3, #0 - mul r7, r5 - mov r3, ip - add r3, r3, r7 - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - bl ov12_02225C98 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232B8 - cmp r0, #4 - bne _0222CD5C - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232B8 - cmp r0, #2 - bne _0222CD5C - mov r0, #0 - mvn r0, r0 - mul r5, r0 -_0222CD5C: - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232B8 - cmp r0, #5 - bne _0222CD86 - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232B8 - cmp r0, #3 - bne _0222CD86 - mov r0, #0 - mvn r0, r0 - mul r5, r0 -_0222CD86: - cmp r5, #0 - ldr r2, _0222CDE0 ; =0x00005C71 - ble _0222CD9E - ldr r1, _0222CDE4 ; =0x00000E38 - add r0, r4, #0 - add r0, #0xd4 - mul r1, r5 - mul r2, r5 - mov r3, #0xa - bl ov12_02225D50 - b _0222CDAE -_0222CD9E: - ldr r1, _0222CDE8 ; =0x00003FFF - add r0, r4, #0 - add r0, #0xd4 - mul r1, r5 - mul r2, r5 - mov r3, #0xa - bl ov12_02225D50 -_0222CDAE: - add r1, r4, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - ldr r0, [r4, #0x38] - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0200D79C - add r0, r4, #0 - add r1, r4, #0 - ldr r2, [r4, #0x38] - add r0, #0x8c - add r1, #0xb0 - bl ov12_02225D2C - ldr r0, [r4, #0x38] - bl sub_0200D330 - ldr r0, [r4, #0x14] - ldr r1, _0222CDEC ; =ov12_0222CBFC - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222CDE0: .word 0x00005C71 -_0222CDE4: .word 0x00000E38 -_0222CDE8: .word 0x00003FFF -_0222CDEC: .word ov12_0222CBFC - thumb_func_end ov12_0222CC54 - - thumb_func_start ov12_0222CDF0 -ov12_0222CDF0: ; 0x0222CDF0 - push {r4, r5, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x18] - cmp r0, #3 - bls _0222CE00 - b _0222CF6C -_0222CE00: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222CE0C: ; jump table - .short _0222CE14 - _0222CE0C - 2 ; case 0 - .short _0222CE44 - _0222CE0C - 2 ; case 1 - .short _0222CEE4 - _0222CE0C - 2 ; case 2 - .short _0222CEF6 - _0222CE0C - 2 ; case 3 -_0222CE14: - mov r0, #0x12 - ldrsh r2, [r4, r0] - mov r0, #0x96 - mov r3, #0x3c - str r0, [sp] - mov r1, #0x64 - str r1, [sp, #4] - mov r0, #0xc - mul r1, r2 - mul r3, r2 - lsl r2, r3, #0x10 - str r0, [sp, #8] - add r0, r4, #0 - lsl r1, r1, #0x10 - add r0, #0x9c - asr r1, r1, #0x10 - asr r2, r2, #0x10 - mov r3, #5 - bl ov12_02225EF0 - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] - b _0222CF8A -_0222CE44: - add r0, r4, #0 - add r0, #0x9c - bl ov12_02225F6C - cmp r0, #0 - bne _0222CE82 - mov r0, #0x12 - ldrsh r2, [r4, r0] - mov r0, #0xa - mov r1, #0x3c - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - mov r0, #0xc - mul r1, r2 - str r0, [sp, #8] - add r0, r4, #0 - lsl r1, r1, #0x10 - mov r3, #0x96 - add r5, r2, #0 - mul r5, r3 - lsl r2, r5, #0x10 - add r0, #0x9c - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02225EF0 - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] - b _0222CF8A -_0222CE82: - add r0, r4, #0 - add r0, #0x9c - add r1, sp, #0x18 - add r2, sp, #0x14 - bl ov12_02225FA4 - ldr r0, [r4, #0x40] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x14] - bl sub_0200D6E8 - mov r0, #0x16 - add r2, r4, #0 - add r2, #0xb0 - ldrsh r0, [r4, r0] - ldr r2, [r2, #0] - mov r1, #0x10 - bl ov12_02225FD4 - mov r2, #0x16 - add r3, r0, #0 - ldrsh r2, [r4, r2] - mov r1, #0x14 - ldrsh r1, [r4, r1] - add r2, r2, r3 - lsl r2, r2, #0x10 - ldr r0, [r4, #0x40] - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldrb r1, [r4, #0xc] - ldrb r0, [r4, #0x10] - cmp r1, r0 - bhs _0222CECA - add r0, r1, #1 - strb r0, [r4, #0xc] -_0222CECA: - ldrb r1, [r4, #0xd] - ldrb r0, [r4, #0x11] - cmp r1, r0 - bls _0222CED6 - sub r0, r1, #1 - strb r0, [r4, #0xd] -_0222CED6: - ldrb r0, [r4, #0xd] - ldrb r1, [r4, #0xc] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222CF9C ; =0x04000052 - strh r1, [r0] - b _0222CF8A -_0222CEE4: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #4 - blt _0222CF8A - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] - b _0222CF8A -_0222CEF6: - add r0, r4, #0 - add r0, #0x9c - bl ov12_02225F6C - cmp r0, #0 - bne _0222CF0A - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] - b _0222CF8A -_0222CF0A: - add r0, r4, #0 - add r0, #0x9c - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov12_02225FA4 - ldr r0, [r4, #0x40] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl sub_0200D6E8 - mov r0, #0x16 - add r2, r4, #0 - add r2, #0xb0 - ldrsh r0, [r4, r0] - ldr r2, [r2, #0] - mov r1, #0x10 - bl ov12_02225FD4 - mov r2, #0x16 - add r3, r0, #0 - ldrsh r2, [r4, r2] - mov r1, #0x14 - ldrsh r1, [r4, r1] - add r2, r2, r3 - lsl r2, r2, #0x10 - ldr r0, [r4, #0x40] - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldrb r1, [r4, #0xc] - ldrb r0, [r4, #0xe] - cmp r1, r0 - bls _0222CF52 - sub r0, r1, #1 - strb r0, [r4, #0xc] -_0222CF52: - ldrb r1, [r4, #0xd] - ldrb r0, [r4, #0xf] - cmp r1, r0 - bhs _0222CF5E - add r0, r1, #1 - strb r0, [r4, #0xd] -_0222CF5E: - ldrb r0, [r4, #0xd] - ldrb r1, [r4, #0xc] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222CF9C ; =0x04000052 - strh r1, [r0] - b _0222CF8A -_0222CF6C: - ldr r0, [r4, #0x44] - bl sub_0200D0F4 - ldr r0, [r4, #0x48] - bl sub_0200D0F4 - ldr r0, [r4, #0x1c] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl ov12_02235E80 - add sp, #0x1c - pop {r4, r5, pc} -_0222CF8A: - ldr r0, [r4, #0x40] - bl sub_0200D330 - ldr r0, [r4, #0x28] - bl sub_0200C7EC - add sp, #0x1c - pop {r4, r5, pc} - nop -_0222CF9C: .word 0x04000052 - thumb_func_end ov12_0222CDF0 - - thumb_func_start ov12_0222CFA0 -ov12_0222CFA0: ; 0x0222CFA0 - push {r4, r5, lr} - sub sp, #0x14 - mov r1, #0xd4 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x18 - bl ov12_0223595C - add r0, r5, #0 - mov r1, #0 - bl ov12_02220298 - str r0, [r4, #0x44] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220298 - mov r1, #0 - str r0, [r4, #0x48] - mvn r1, r1 - ldr r0, [r4, #0x1c] - add r2, r1, #0 - bl ov12_02235780 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - mov r1, #0 - strb r1, [r4, #0xc] - mov r0, #0x1f - strb r0, [r4, #0xd] - strb r1, [r4, #0xe] - strb r0, [r4, #0xf] - strb r0, [r4, #0x10] - mov r0, #4 - strb r0, [r4, #0x11] - add r0, r5, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222D030 - ldr r0, [r4, #0x44] - mov r1, #0 - str r0, [r4, #0x40] - ldr r0, [r4, #0x48] - bl sub_0200D3F4 - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_0200D364 - mov r0, #0xb3 - strh r0, [r4, #0x14] - mov r0, #0x78 - strh r0, [r4, #0x16] - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x40] - add r1, r1, #1 - bl sub_0200D460 - mov r0, #0 - mvn r0, r0 - strh r0, [r4, #0x12] - b _0222D090 -_0222D030: - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222D060 - ldr r0, [r4, #0x48] - mov r1, #0 - str r0, [r4, #0x40] - ldr r0, [r4, #0x44] - bl sub_0200D3F4 - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_0200D364 - mov r0, #0x90 - strh r0, [r4, #0x14] - mov r0, #0x40 - strh r0, [r4, #0x16] - b _0222D08C -_0222D060: - ldr r0, [r4, #0x44] - mov r1, #0 - str r0, [r4, #0x40] - ldr r0, [r4, #0x48] - bl sub_0200D3F4 - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4c - strh r0, [r4, #0x14] - mov r0, #0x78 - strh r0, [r4, #0x16] - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x40] - add r1, r1, #1 - bl sub_0200D460 -_0222D08C: - mov r0, #1 - strh r0, [r4, #0x12] -_0222D090: - mov r1, #0x14 - mov r2, #0x16 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x40] - bl sub_0200D4C4 - ldr r0, [r4, #0x40] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_0200D810 - mov r0, #0x12 - ldrsh r0, [r4, r0] - mov r3, #0x64 - add r1, r0, #0 - mov r0, #5 - str r0, [sp] - mul r1, r3 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - str r3, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x9c - add r2, r1, #0 - bl ov12_02225EF0 - add r0, r4, #0 - add r0, #0x9c - bl ov12_02225F6C - add r0, r4, #0 - add r0, #0x9c - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov12_02225FA4 - ldr r0, [r4, #0x40] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl sub_0200D6E8 - mov r0, #0x16 - add r2, r4, #0 - add r2, #0xb0 - ldrsh r0, [r4, r0] - ldr r2, [r2, #0] - mov r1, #0x10 - bl ov12_02225FD4 - mov r2, #0x16 - add r3, r0, #0 - ldrsh r2, [r4, r2] - mov r1, #0x14 - ldrsh r1, [r4, r1] - add r2, r2, r3 - lsl r2, r2, #0x10 - ldr r0, [r4, #0x40] - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #0x1c] - ldr r1, _0222D124 ; =ov12_0222CDF0 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x14 - pop {r4, r5, pc} - nop -_0222D124: .word ov12_0222CDF0 - thumb_func_end ov12_0222CFA0 - - thumb_func_start ov12_0222D128 -ov12_0222D128: ; 0x0222D128 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r4, r1, #0 - str r0, [sp, #0x10] - ldrb r0, [r4] - cmp r0, #8 - bls _0222D138 - b _0222D48C -_0222D138: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222D144: ; jump table - .short _0222D156 - _0222D144 - 2 ; case 0 - .short _0222D18E - _0222D144 - 2 ; case 1 - .short _0222D1E8 - _0222D144 - 2 ; case 2 - .short _0222D202 - _0222D144 - 2 ; case 3 - .short _0222D236 - _0222D144 - 2 ; case 4 - .short _0222D2BA - _0222D144 - 2 ; case 5 - .short _0222D34C - _0222D144 - 2 ; case 6 - .short _0222D3EA - _0222D144 - 2 ; case 7 - .short _0222D432 - _0222D144 - 2 ; case 8 -_0222D156: - ldrb r1, [r4, #0xc] - ldr r2, _0222D470 ; =0x0223A0D1 - ldr r5, _0222D474 ; =0x0223A0D2 - lsl r0, r1, #2 - add r3, r1, r0 - ldr r0, _0222D478 ; =0x0223A0D3 - ldr r1, _0222D47C ; =0x0223A0D0 - ldrb r0, [r0, r3] - ldrb r1, [r1, r3] - ldrb r2, [r2, r3] - str r0, [sp] - mov r0, #0x64 - str r0, [sp, #4] - ldr r0, _0222D480 ; =0x0223A0D4 - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xcc - bl ov12_02225EF0 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D18E: - add r0, r4, #0 - add r0, #0xcc - bl ov12_02225F6C - cmp r0, #1 - bne _0222D1D4 - mov r2, #0xcc - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xc - bl sub_02007DEC - mov r2, #0xce - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #0xd - bl sub_02007DEC - mov r0, #0x20 - add r2, r4, #0 - add r2, #0xe0 - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x24] - ldr r2, [r2, #0] - bl ov12_02225FD4 - mov r2, #0x20 - add r3, r0, #0 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r2, r2, r3 - bl sub_02007DEC - b _0222D4C6 -_0222D1D4: - ldrb r0, [r4, #0xc] - cmp r0, #3 - ldrb r0, [r4] - blo _0222D1E2 - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D1E2: - sub r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D1E8: - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #1 - blo _0222D2C6 - mov r0, #0 - strb r0, [r4, #1] - strb r0, [r4, #0xc] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D202: - add r1, sp, #0x2c - ldr r0, [r4, #0x30] - add r1, #2 - add r2, sp, #0x2c - bl sub_0200D550 - add r1, sp, #0x14 - mov r0, #0x18 - ldrsh r0, [r1, r0] - cmp r0, #0x68 - bgt _0222D22E - ldr r0, [r4, #0x30] - mov r1, #0 - mov r2, #2 - bl sub_0200D5DC - ldr r0, [r4, #0x7c] - mov r1, #0 - mov r2, #2 - bl sub_0200D5DC - b _0222D4C6 -_0222D22E: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D236: - add r1, sp, #0x28 - ldr r0, [r4, #0x30] - add r1, #2 - add r2, sp, #0x28 - bl sub_0200D550 - add r1, sp, #0x14 - mov r0, #0x14 - ldrsh r0, [r1, r0] - cmp r0, #0x68 - bgt _0222D262 - ldr r0, [r4, #0x30] - mov r1, #0 - mov r2, #2 - bl sub_0200D5DC - ldr r0, [r4, #0x7c] - mov r1, #0 - mov r2, #2 - bl sub_0200D5DC - b _0222D26E -_0222D262: - ldr r0, _0222D484 ; =0x04000052 - mov r1, #0x10 - strh r1, [r0] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222D26E: - ldrb r0, [r4, #1] - mov r1, #0x10 - add r2, r1, #0 - add r0, r0, #1 - strb r0, [r4, #1] - add r0, r4, #4 - bl ov12_022267A8 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - add r0, #8 - sub r2, #0x10 - bl ov12_022267A8 - ldr r0, [r4, #8] - ldr r1, [r4, #4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222D484 ; =0x04000052 - strh r1, [r0] - ldrb r0, [r4, #1] - cmp r0, #0xa - bne _0222D2A8 - ldr r0, [r4, #0x30] - mov r1, #0 - mov r2, #0x10 - bl sub_0200D5DC -_0222D2A8: - ldrb r0, [r4, #1] - cmp r0, #0xc - bne _0222D2C6 - ldr r0, [r4, #0x7c] - mov r1, #0 - mov r2, #0x10 - bl sub_0200D5DC - b _0222D4C6 -_0222D2BA: - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #1 - bhs _0222D2C8 -_0222D2C6: - b _0222D4C6 -_0222D2C8: - mov r0, #0 - strb r0, [r4, #1] - add r1, sp, #0x24 - ldr r0, [r4, #0x30] - add r1, #2 - add r2, sp, #0x24 - bl sub_0200D550 - add r1, sp, #0x20 - ldr r0, [r4, #0x7c] - add r1, #2 - add r2, sp, #0x20 - bl sub_0200D550 - add r0, r4, #0 - add r0, #0xc8 - str r0, [sp] - add r0, r4, #0 - add r0, #0xca - str r0, [sp, #4] - add r3, sp, #0x14 - mov r0, #0x12 - mov r1, #0x10 - mov r2, #0xe - mov r5, #0xc - ldrsh r0, [r3, r0] - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldrsh r3, [r3, r5] - bl ov12_02226728 - add r0, r4, #0 - add r0, #0x2c - str r0, [sp] - mov r3, #0xca - add r2, sp, #0x14 - mov r0, #0x12 - mov r1, #0x10 - ldrsh r0, [r2, r0] - ldrsh r1, [r2, r1] - mov r2, #0xc8 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - bl ov12_02226744 - add r0, r4, #0 - add r0, #0x28 - str r0, [sp] - mov r3, #0xca - add r2, sp, #0x14 - mov r0, #0x12 - mov r1, #0x10 - ldrsh r0, [r2, r0] - ldrsh r1, [r2, r1] - mov r2, #0xc8 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - bl ov12_0222676C - mov r0, #0xa - lsl r0, r0, #0xe - str r0, [r4, #0x2c] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D34C: - ldr r3, _0222D488 ; =0x0223A0AD - add r2, sp, #0x30 - mov r1, #0xa -_0222D352: - ldrb r0, [r3] - add r3, r3, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0222D352 - add r1, sp, #0x1c - ldr r0, [r4, #0x30] - add r1, #2 - add r2, sp, #0x1c - bl sub_0200D550 - add r1, sp, #0x18 - ldr r0, [r4, #0x7c] - add r1, #2 - add r2, sp, #0x18 - bl sub_0200D550 - add r3, sp, #0x14 - mov r0, #8 - ldrsh r0, [r3, r0] - mov r2, #0xa - str r0, [sp] - mov r0, #4 - ldrsh r0, [r3, r0] - str r0, [sp, #4] - str r2, [sp, #8] - ldrb r1, [r4, #0xc] - ldr r0, [r4, #0x2c] - lsl r5, r1, #1 - add r1, sp, #0x30 - ldrsb r1, [r1, r5] - mov r5, #6 - mul r1, r0 - str r1, [sp, #0xc] - ldrsh r2, [r3, r2] - add r0, r4, #0 - add r1, r4, #0 - ldrsh r3, [r3, r5] - add r0, #0x34 - add r1, #0x58 - bl ov12_02225C98 - add r3, sp, #0x14 - mov r0, #4 - ldrsh r0, [r3, r0] - mov r5, #0xa - str r0, [sp] - mov r0, #8 - ldrsh r0, [r3, r0] - str r0, [sp, #4] - str r5, [sp, #8] - ldrb r1, [r4, #0xc] - ldr r0, [r4, #0x2c] - lsl r2, r1, #1 - add r1, sp, #0x30 - add r1, #1 - ldrsb r1, [r1, r2] - mov r2, #6 - mul r1, r0 - str r1, [sp, #0xc] - ldrsh r2, [r3, r2] - add r0, r4, #0 - add r1, r4, #0 - ldrsh r3, [r3, r5] - add r0, #0x80 - add r1, #0xa4 - bl ov12_02225C98 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D3EA: - add r0, r4, #0 - ldr r2, [r4, #0x30] - add r0, #0x34 - add r1, #0x58 - mov r5, #0 - bl ov12_02225D2C - cmp r0, #0 - bne _0222D402 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 -_0222D402: - add r0, r4, #0 - add r1, r4, #0 - ldr r2, [r4, #0x7c] - add r0, #0x80 - add r1, #0xa4 - bl ov12_02225D2C - cmp r0, #0 - bne _0222D41A - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 -_0222D41A: - cmp r5, #2 - bne _0222D4C6 - ldrb r0, [r4, #0xc] - cmp r0, #5 - ldrb r0, [r4] - bne _0222D42C - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D42C: - sub r0, r0, #1 - strb r0, [r4] - b _0222D4C6 -_0222D432: - mov r5, #0 - add r0, r4, #4 - add r1, r5, #0 - sub r2, r5, #2 - bl ov12_022267A8 - cmp r0, #1 - bne _0222D444 - add r5, r5, #1 -_0222D444: - add r0, r4, #0 - add r0, #8 - mov r1, #0x10 - mov r2, #2 - bl ov12_022267A8 - cmp r0, #1 - bne _0222D456 - add r5, r5, #1 -_0222D456: - ldr r0, [r4, #8] - ldr r1, [r4, #4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222D484 ; =0x04000052 - cmp r5, #2 - strh r1, [r0] - bne _0222D4C6 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222D4C6 - nop -_0222D470: .word 0x0223A0D1 -_0222D474: .word 0x0223A0D2 -_0222D478: .word 0x0223A0D3 -_0222D47C: .word 0x0223A0D0 -_0222D480: .word 0x0223A0D4 -_0222D484: .word 0x04000052 -_0222D488: .word 0x0223A0AD -_0222D48C: - mov r6, #0 - ldr r0, [r4, #0x10] - add r1, r6, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222D4B4 - add r5, r4, #0 - add r7, r6, #0 -_0222D49E: - ldr r0, [r5, #0x30] - bl sub_0200D0F4 - ldr r0, [r4, #0x10] - add r1, r7, #0 - add r5, #0x4c - add r6, r6, #1 - bl ov12_02220280 - cmp r6, r0 - blt _0222D49E -_0222D4B4: - ldr r0, [r4, #0x10] - ldr r1, [sp, #0x10] - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} -_0222D4C6: - mov r6, #0 - ldr r0, [r4, #0x10] - add r1, r6, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222D532 - add r5, r4, #0 - add r7, sp, #0x14 -_0222D4D8: - add r1, sp, #0x14 - ldr r0, [r5, #0x30] - add r1, #2 - add r2, sp, #0x14 - bl sub_0200D550 - mov r0, #0 - ldrsh r0, [r7, r0] - cmp r0, #0x50 - bge _0222D4FC - ldr r0, [r4, #0x10] - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r5, #0x30] - bl sub_0200D460 - b _0222D522 -_0222D4FC: - mov r0, #2 - ldrsh r0, [r7, r0] - cmp r0, #0x80 - ldr r0, [r4, #0x10] - ble _0222D514 - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r5, #0x30] - bl sub_0200D460 - b _0222D522 -_0222D514: - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r5, #0x30] - add r1, r1, #1 - bl sub_0200D460 -_0222D522: - ldr r0, [r4, #0x10] - mov r1, #0 - add r5, #0x4c - add r6, r6, #1 - bl ov12_02220280 - cmp r6, r0 - blt _0222D4D8 -_0222D532: - ldrb r0, [r4] - cmp r0, #4 - blo _0222D566 - mov r5, #0 - ldr r0, [r4, #0x10] - add r1, r5, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222D560 - add r6, r4, #0 - add r7, r5, #0 -_0222D54A: - ldr r0, [r6, #0x30] - bl sub_0200D330 - ldr r0, [r4, #0x10] - add r1, r7, #0 - add r6, #0x4c - add r5, r5, #1 - bl ov12_02220280 - cmp r5, r0 - blt _0222D54A -_0222D560: - ldr r0, [r4, #0x18] - bl sub_0200C7EC -_0222D566: - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_0222D128 - - thumb_func_start ov12_0222D56C -ov12_0222D56C: ; 0x0222D56C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r1, #0 - mov r1, #0xf0 - str r0, [sp] - add r6, r2, #0 - add r7, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r1, #0 - strb r1, [r4] - ldr r0, [sp] - strb r1, [r4, #1] - str r0, [r4, #0x10] - str r6, [r4, #0x18] - str r5, [r4, #0x14] - str r1, [r4, #4] - mov r0, #0x10 - str r0, [r4, #8] - ldr r0, [r4, #0x10] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl ov12_022232FC - str r0, [r4, #0x1c] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x20] - ldr r0, [r4, #0x10] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl ov12_02223354 - str r0, [r4, #0x24] - ldr r0, [sp] - mov r1, #2 - bl ov12_022233EC - add r5, r0, #0 - ldr r0, [sp] - mov r1, #1 - bl ov12_022233EC - mov r2, #1 - add r1, r2, #0 - add r3, r0, #0 - lsl r1, r5 - add r5, r2, #0 - lsl r5, r3 - orr r1, r5 - orr r1, r2 - sub r2, r2, #2 - ldr r0, [r4, #0x10] - add r3, r2, #0 - bl ov12_022357BC - ldr r0, [r4, #8] - ldr r1, [r4, #4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222D6A8 ; =0x04000052 - strh r1, [r0] - ldr r1, [sp] - add r0, sp, #4 - bl ov12_0222329C - str r7, [r4, #0x30] - ldr r0, [r4, #0x10] - mov r1, #0 - mov r6, #1 - bl ov12_02220280 - cmp r0, #1 - ble _0222D62E - add r5, r4, #0 - add r5, #0x4c - add r7, sp, #4 -_0222D612: - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - add r2, r7, #0 - bl sub_0200CE6C - str r0, [r5, #0x30] - ldr r0, [r4, #0x10] - mov r1, #0 - add r5, #0x4c - add r6, r6, #1 - bl ov12_02220280 - cmp r6, r0 - blt _0222D612 -_0222D62E: - mov r6, #0 - ldr r0, [r4, #0x10] - add r1, r6, #0 - bl ov12_02220280 - cmp r0, #0 - ble _0222D668 - add r5, r4, #0 - mov r7, #1 -_0222D640: - ldr r0, [r5, #0x30] - add r1, r7, #0 - bl sub_0200D810 - ldr r0, [r4, #0x10] - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r5, #0x30] - add r1, r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x10] - mov r1, #0 - add r5, #0x4c - add r6, r6, #1 - bl ov12_02220280 - cmp r6, r0 - blt _0222D640 -_0222D668: - ldr r0, [sp] - bl ov12_0221FDD4 - cmp r0, #1 - ldr r0, [r4, #0x30] - bne _0222D688 - mov r1, #0xa0 - mov r2, #0x36 - bl sub_0200D4C4 - ldr r0, [r4, #0x7c] - mov r1, #0x50 - mov r2, #0x27 - bl sub_0200D4C4 - b _0222D69A -_0222D688: - mov r1, #0x64 - mov r2, #0x36 - bl sub_0200D4C4 - ldr r0, [r4, #0x7c] - mov r1, #0xb4 - mov r2, #0x27 - bl sub_0200D4C4 -_0222D69A: - ldr r0, [r4, #0x10] - ldr r1, _0222D6AC ; =ov12_0222D128 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222D6A8: .word 0x04000052 -_0222D6AC: .word ov12_0222D128 - thumb_func_end ov12_0222D56C - - thumb_func_start ov12_0222D6B0 -ov12_0222D6B0: ; 0x0222D6B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - ldrb r0, [r5] - cmp r0, #0 - beq _0222D6C2 - cmp r0, #1 - beq _0222D736 - b _0222D76A -_0222D6C2: - ldrb r0, [r5, #6] - cmp r0, #0xf - bhs _0222D6CC - add r0, r0, #1 - strb r0, [r5, #6] -_0222D6CC: - ldrb r0, [r5, #7] - cmp r0, #0 - beq _0222D6D6 - sub r0, r0, #1 - strb r0, [r5, #7] -_0222D6D6: - ldrb r0, [r5, #7] - ldrb r1, [r5, #6] - mov r6, #0 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222D7B8 ; =0x04000052 - strh r1, [r0] - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - ldrb r0, [r5, #5] - cmp r0, #0 - ble _0222D728 - ldr r4, _0222D7BC ; =0x0223A144 - add r7, r5, #0 -_0222D6F4: - add r1, sp, #0 - ldr r0, [r7, #0x14] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - ldrb r1, [r5, #4] - ldrb r0, [r4] - cmp r1, r0 - blo _0222D71C - add r0, r5, r6 - ldrb r1, [r0, #1] - add r1, r1, #1 - strb r1, [r0, #1] - ldrb r2, [r0, #1] - ldrb r1, [r4, #1] - cmp r2, r1 - blo _0222D71C - mov r1, #0 - strb r1, [r0, #1] -_0222D71C: - ldrb r0, [r5, #5] - add r6, r6, #1 - add r7, r7, #4 - add r4, r4, #2 - cmp r6, r0 - blt _0222D6F4 -_0222D728: - ldrb r0, [r5, #4] - cmp r0, #0x2d - blo _0222D794 - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - b _0222D794 -_0222D736: - ldrb r0, [r5, #6] - cmp r0, #0 - beq _0222D740 - sub r0, r0, #1 - strb r0, [r5, #6] -_0222D740: - ldrb r0, [r5, #7] - cmp r0, #0xf - bhs _0222D74A - add r0, r0, #1 - strb r0, [r5, #7] -_0222D74A: - ldrb r0, [r5, #6] - cmp r0, #0 - bne _0222D75C - ldrb r0, [r5, #7] - cmp r0, #0xf - bne _0222D75C - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] -_0222D75C: - ldrb r0, [r5, #7] - ldrb r1, [r5, #6] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222D7B8 ; =0x04000052 - strh r1, [r0] - b _0222D794 -_0222D76A: - ldrb r0, [r5, #5] - mov r6, #0 - cmp r0, #0 - ble _0222D784 - add r4, r5, #0 -_0222D774: - ldr r0, [r4, #0x14] - bl sub_0200D0F4 - ldrb r0, [r5, #5] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _0222D774 -_0222D784: - ldr r0, [r5, #8] - add r1, r7, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_0222D794: - ldrb r0, [r5, #5] - mov r6, #0 - cmp r0, #0 - ble _0222D7B0 - add r4, r5, #0 -_0222D79E: - ldr r0, [r4, #0x14] - ldr r0, [r0, #0] - bl sub_0200D324 - ldrb r0, [r5, #5] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _0222D79E -_0222D7B0: - ldr r0, [r5, #0x10] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222D7B8: .word 0x04000052 -_0222D7BC: .word 0x0223A144 - thumb_func_end ov12_0222D6B0 - - thumb_func_start ov12_0222D7C0 -ov12_0222D7C0: ; 0x0222D7C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r7, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - str r3, [sp] - bl ov12_0221FDE4 - mov r1, #0x44 - bl sub_02018144 - add r4, r0, #0 - bne _0222D7DE - bl sub_02022974 -_0222D7DE: - mov r0, #0 - strb r0, [r4, #4] - strb r0, [r4] - str r5, [r4, #0xc] - str r6, [r4, #0x10] - add r0, sp, #4 - add r1, r7, #0 - str r7, [r4, #8] - bl ov12_0222329C - mov r1, #0 - mvn r1, r1 - ldr r0, [r4, #8] - add r2, r1, #0 - bl ov12_02235780 - ldr r0, [r4, #8] - mov r1, #0 - bl ov12_02220280 - strb r0, [r4, #5] - mov r0, #0 - strb r0, [r4, #6] - mov r0, #0xf - strb r0, [r4, #7] - ldrb r0, [r4, #7] - ldrb r1, [r4, #6] - mov r6, #1 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222D924 ; =0x04000052 - strh r1, [r0] - ldr r0, [sp] - str r0, [r4, #0x14] - ldrb r0, [r4, #5] - cmp r0, #1 - ble _0222D840 - add r5, r4, #4 -_0222D82A: - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r2, sp, #4 - bl sub_0200CE6C - str r0, [r5, #0x14] - ldrb r0, [r4, #5] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0222D82A -_0222D840: - add r0, r7, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r7, #0 - bl ov12_0223525C - cmp r0, #3 - bne _0222D894 - add r0, r7, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r7, #0 - bl ov12_0223525C - cmp r0, #3 - bne _0222D880 - add r0, r7, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r7, #0 - bl ov12_0223525C - cmp r0, #3 - bne _0222D880 - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D364 - b _0222D888 -_0222D880: - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D364 -_0222D888: - ldr r0, [r4, #0x14] - mov r1, #0x80 - mov r2, #0x50 - bl sub_0200D4C4 - b _0222D8D4 -_0222D894: - add r0, r7, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r7, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222D8C2 - add r0, r7, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r7, #0 - bl ov12_0223525C - cmp r0, #4 - bne _0222D8C2 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D364 - b _0222D8CA -_0222D8C2: - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D364 -_0222D8CA: - ldr r0, [r4, #0x14] - mov r1, #0x80 - mov r2, #0x50 - bl sub_0200D4C4 -_0222D8D4: - ldrb r0, [r4, #5] - mov r6, #0 - cmp r0, #0 - ble _0222D914 - add r5, r4, #0 -_0222D8DE: - add r1, r4, r6 - mov r0, #0 - strb r0, [r1, #1] - ldr r0, [r5, #0x14] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r5, #0x14] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #8] - bl ov12_0221FDD4 - cmp r0, #1 - bne _0222D90A - mov r2, #0xfe - ldr r0, [r5, #0x14] - ldr r1, _0222D928 ; =0xBF800000 - lsl r2, r2, #0x16 - bl sub_0200D6E8 -_0222D90A: - ldrb r0, [r4, #5] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0222D8DE -_0222D914: - ldr r1, _0222D92C ; =ov12_0222D6B0 - ldr r3, _0222D930 ; =0x0000044C - add r0, r7, #0 - add r2, r4, #0 - bl ov12_022201CC - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222D924: .word 0x04000052 -_0222D928: .word 0xBF800000 -_0222D92C: .word ov12_0222D6B0 -_0222D930: .word 0x0000044C - thumb_func_end ov12_0222D7C0 - - thumb_func_start ov12_0222D934 -ov12_0222D934: ; 0x0222D934 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r7, r0, #0 - ldrb r0, [r4] - mov r6, #0 - cmp r0, #3 - bls _0222D946 - b _0222DAEC -_0222D946: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222D952: ; jump table - .short _0222D95A - _0222D952 - 2 ; case 0 - .short _0222D98E - _0222D952 - 2 ; case 1 - .short _0222DA66 - _0222D952 - 2 ; case 2 - .short _0222DAB2 - _0222D952 - 2 ; case 3 -_0222D95A: - ldrb r0, [r4, #9] - cmp r0, #0xf - bhs _0222D964 - add r0, r0, #1 - strb r0, [r4, #9] -_0222D964: - ldrb r0, [r4, #0xa] - cmp r0, #0 - beq _0222D96E - sub r0, r0, #1 - strb r0, [r4, #0xa] -_0222D96E: - ldrb r0, [r4, #9] - cmp r0, #0xf - bne _0222D980 - ldrb r0, [r4, #0xa] - cmp r0, #0 - bne _0222D980 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222D980: - ldrb r0, [r4, #0xa] - ldrb r1, [r4, #9] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222DB48 ; =0x04000052 - strh r1, [r0] - b _0222DB18 -_0222D98E: - ldr r0, [r4, #0x30] - cmp r0, #3 - bhi _0222D9F4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222D9A0: ; jump table - .short _0222D9A8 - _0222D9A0 - 2 ; case 0 - .short _0222D9C2 - _0222D9A0 - 2 ; case 1 - .short _0222D9DC - _0222D9A0 - 2 ; case 2 - .short _0222D9DC - _0222D9A0 - 2 ; case 3 -_0222D9A8: - ldr r0, [r4, #0x18] - mov r1, #1 - str r0, [r4, #0x34] - ldr r0, [r4, #0x24] - str r0, [r4, #0x38] - ldr r0, [r4, #0x34] - bl sub_0200D3F4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl sub_0200D3F4 - b _0222D9F4 -_0222D9C2: - ldr r0, [r4, #0x1c] - mov r1, #1 - str r0, [r4, #0x34] - ldr r0, [r4, #0x20] - str r0, [r4, #0x38] - ldr r0, [r4, #0x34] - bl sub_0200D3F4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl sub_0200D3F4 - b _0222D9F4 -_0222D9DC: - ldr r0, [r4, #0x28] - mov r1, #1 - str r0, [r4, #0x34] - ldr r0, [r4, #0x2c] - str r0, [r4, #0x38] - ldr r0, [r4, #0x34] - bl sub_0200D3F4 - ldr r0, [r4, #0x38] - mov r1, #1 - bl sub_0200D3F4 -_0222D9F4: - add r1, sp, #8 - ldr r0, [r4, #0x34] - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - ldr r1, [r4, #0x30] - ldr r0, _0222DB4C ; =0x0223A17C - lsl r2, r1, #3 - ldrsh r0, [r0, r2] - ldr r5, _0222DB50 ; =0x0223A17A - add r3, sp, #8 - str r0, [sp] - ldr r0, _0222DB54 ; =0x0223A140 - ldrsh r2, [r5, r2] - ldrb r0, [r0, r1] - mov r1, #2 - mov r5, #0 - str r0, [sp, #4] - ldrsh r1, [r3, r1] - add r0, r4, #0 - ldrsh r3, [r3, r5] - add r0, #0x3c - bl ov12_02225BC8 - add r1, sp, #8 - ldr r0, [r4, #0x38] - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - ldr r1, [r4, #0x30] - ldr r0, _0222DB58 ; =0x0223A180 - lsl r2, r1, #3 - ldrsh r0, [r0, r2] - ldr r5, _0222DB5C ; =0x0223A17E - add r3, sp, #8 - str r0, [sp] - ldr r0, _0222DB54 ; =0x0223A140 - ldrsh r2, [r5, r2] - ldrb r0, [r0, r1] - mov r1, #2 - mov r5, #0 - str r0, [sp, #4] - ldrsh r1, [r3, r1] - add r0, r4, #0 - ldrsh r3, [r3, r5] - add r0, #0x60 - bl ov12_02225BC8 - ldr r0, [r4, #0x30] - add r0, r0, #1 - str r0, [r4, #0x30] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222DB18 -_0222DA66: - add r0, r4, #0 - ldr r1, [r4, #0x34] - add r0, #0x3c - add r5, r6, #0 - bl ov12_02225C50 - cmp r0, #0 - bne _0222DA78 - add r5, r5, #1 -_0222DA78: - add r0, r4, #0 - ldr r1, [r4, #0x38] - add r0, #0x60 - bl ov12_02225C50 - cmp r0, #0 - bne _0222DA88 - add r5, r5, #1 -_0222DA88: - cmp r5, #2 - blt _0222DB18 - ldr r0, [r4, #0x30] - cmp r0, #3 - bgt _0222DAAA - ldr r0, [r4, #0x34] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x38] - mov r1, #0 - bl sub_0200D3F4 - ldrb r0, [r4] - sub r0, r0, #1 - strb r0, [r4] - b _0222DB18 -_0222DAAA: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222DB18 -_0222DAB2: - ldrb r0, [r4, #9] - cmp r0, #0 - beq _0222DABC - sub r0, r0, #1 - strb r0, [r4, #9] -_0222DABC: - ldrb r0, [r4, #0xa] - cmp r0, #0xf - bhs _0222DAC6 - add r0, r0, #1 - strb r0, [r4, #0xa] -_0222DAC6: - ldrb r1, [r4, #0xa] - cmp r1, #7 - blo _0222DACE - mov r6, #1 -_0222DACE: - ldrb r0, [r4, #9] - cmp r0, #0 - bne _0222DADE - cmp r1, #0xf - bne _0222DADE - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222DADE: - ldrb r0, [r4, #0xa] - ldrb r1, [r4, #9] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222DB48 ; =0x04000052 - strh r1, [r0] - b _0222DB18 -_0222DAEC: - ldrb r0, [r4, #8] - mov r6, #0 - cmp r0, #0 - ble _0222DB06 - add r5, r4, #0 -_0222DAF6: - ldr r0, [r5, #0x18] - bl sub_0200D0F4 - ldrb r0, [r4, #8] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0222DAF6 -_0222DB06: - ldr r0, [r4, #0xc] - add r1, r7, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0222DB18: - ldrb r0, [r4] - cmp r0, #3 - bhs _0222DB3E - cmp r6, #0 - bne _0222DB3E - ldrb r0, [r4, #8] - mov r6, #0 - cmp r0, #0 - ble _0222DB3E - add r5, r4, #0 -_0222DB2C: - ldr r0, [r5, #0x18] - ldr r0, [r0, #0] - bl sub_0200D324 - ldrb r0, [r4, #8] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0222DB2C -_0222DB3E: - ldr r0, [r4, #0x14] - bl sub_0200C7EC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222DB48: .word 0x04000052 -_0222DB4C: .word 0x0223A17C -_0222DB50: .word 0x0223A17A -_0222DB54: .word 0x0223A140 -_0222DB58: .word 0x0223A180 -_0222DB5C: .word 0x0223A17E - thumb_func_end ov12_0222D934 - - thumb_func_start ov12_0222DB60 -ov12_0222DB60: ; 0x0222DB60 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - str r0, [sp] - add r5, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov12_0221FDE4 - mov r1, #0x84 - bl sub_02018144 - add r4, r0, #0 - bne _0222DB7E - bl sub_02022974 -_0222DB7E: - mov r0, #0 - strb r0, [r4, #7] - strb r0, [r4] - str r5, [r4, #0x10] - str r6, [r4, #0x14] - str r0, [r4, #0x30] - ldr r0, [sp] - ldr r1, [sp] - str r0, [r4, #0xc] - add r0, sp, #4 - bl ov12_0222329C - mov r1, #0 - mvn r1, r1 - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl ov12_02235780 - mov r1, #0 - strb r1, [r4, #9] - mov r0, #0xf - strb r0, [r4, #0xa] - ldrb r0, [r4, #0xa] - ldrb r2, [r4, #9] - lsl r0, r0, #8 - orr r2, r0 - ldr r0, _0222DC88 ; =0x04000052 - strh r2, [r0] - ldr r0, [r4, #0xc] - bl ov12_02220280 - strb r0, [r4, #8] - str r7, [r4, #0x18] - ldrb r0, [r4, #8] - mov r6, #1 - cmp r0, #1 - ble _0222DBE2 - add r5, r4, #4 - add r7, sp, #4 -_0222DBCC: - ldr r0, [r4, #0x10] - ldr r1, [r4, #0x14] - add r2, r7, #0 - bl sub_0200CE6C - str r0, [r5, #0x18] - ldrb r0, [r4, #8] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0222DBCC -_0222DBE2: - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x20] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r4, #0x28] - mov r1, #2 - bl sub_0200D364 - ldr r0, [r4, #0x2c] - mov r1, #3 - bl sub_0200D364 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_0200D7D4 - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_0200D7D4 - ldrb r0, [r4, #8] - mov r7, #0 - cmp r0, #0 - ble _0222DC58 - ldr r6, _0222DC8C ; =0x0223A162 - add r5, r4, #0 -_0222DC2E: - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D390 - mov r1, #0 - mov r2, #2 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r5, #0x18] - bl sub_0200D4C4 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D810 - ldrb r0, [r4, #8] - add r7, r7, #1 - add r5, r5, #4 - add r6, r6, #4 - cmp r7, r0 - blt _0222DC2E -_0222DC58: - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x20] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x2c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [sp] - ldr r1, _0222DC90 ; =ov12_0222D934 - ldr r3, _0222DC94 ; =0x0000044C - add r2, r4, #0 - bl ov12_022201CC - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222DC88: .word 0x04000052 -_0222DC8C: .word 0x0223A162 -_0222DC90: .word ov12_0222D934 -_0222DC94: .word 0x0000044C - thumb_func_end ov12_0222DB60 - - thumb_func_start ov12_0222DC98 -ov12_0222DC98: ; 0x0222DC98 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #7 - bls _0222DCA8 - b _0222DE00 -_0222DCA8: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222DCB4: ; jump table - .short _0222DCC4 - _0222DCB4 - 2 ; case 0 - .short _0222DCD8 - _0222DCB4 - 2 ; case 1 - .short _0222DCFA - _0222DCB4 - 2 ; case 2 - .short _0222DD28 - _0222DCB4 - 2 ; case 3 - .short _0222DD56 - _0222DCB4 - 2 ; case 4 - .short _0222DD74 - _0222DCB4 - 2 ; case 5 - .short _0222DD9C - _0222DCB4 - 2 ; case 6 - .short _0222DDE4 - _0222DCB4 - 2 ; case 7 -_0222DCC4: - ldrb r0, [r4, #0xe] - sub r0, r0, #1 - strb r0, [r4, #0xe] - ldrb r0, [r4, #0xe] - cmp r0, #0xa - bhi _0222DCE4 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DCD8: - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xd] - cmp r0, #3 - bhs _0222DCE6 -_0222DCE4: - b _0222DE0E -_0222DCE6: - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #0 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DCFA: - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xd] - cmp r0, #3 - bhi _0222DD1C - ldr r0, [r4, #0x38] - ldr r1, _0222DE18 ; =0x3DCCCCCD - bl sub_020E0B00 - str r0, [r4, #0x38] - ldr r1, [r4, #0x38] - ldr r0, [r4, #0x10] - add r2, r1, #0 - bl sub_0200D6E8 - b _0222DE0E -_0222DD1C: - mov r0, #0 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DD28: - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xd] - cmp r0, #3 - bhi _0222DD4A - ldr r0, [r4, #0x38] - ldr r1, _0222DE18 ; =0x3DCCCCCD - bl sub_020E1A9C - str r0, [r4, #0x38] - ldr r1, [r4, #0x38] - ldr r0, [r4, #0x10] - add r2, r1, #0 - bl sub_0200D6E8 - b _0222DE0E -_0222DD4A: - mov r0, #0 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DD56: - ldrb r0, [r4, #0xe] - sub r0, r0, #1 - strb r0, [r4, #0xe] - ldrb r0, [r4, #0xe] - cmp r0, #0xa - bhi _0222DE0E - ldr r0, [r4, #0x3c] - mov r1, #1 - str r1, [r0, #0] - mov r0, #0 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DD74: - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xd] - cmp r0, #0x1e - bls _0222DD8C - mov r0, #0 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DD8C: - ldr r0, [r4, #0x3c] - ldr r0, [r0, #0] - cmp r0, #2 - bne _0222DE0E - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DD9C: - bl sub_0201D2E8 - mov r1, #0xa - bl sub_020E1F6C - add r5, r1, #0 - add r2, sp, #8 - ldr r0, [r4, #0x10] - add r1, sp, #8 - add r2, #2 - add r5, #0xa - bl sub_0200D550 - ldrb r0, [r4, #0xf] - add r3, sp, #8 - mov r1, #0 - lsl r2, r0, #2 - ldr r0, _0222DE1C ; =0x0223A14C - ldrsh r0, [r0, r2] - str r0, [sp] - lsl r0, r5, #0x10 - ldr r5, _0222DE20 ; =0x0223A14A - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldrsh r2, [r5, r2] - add r0, r4, #0 - mov r5, #2 - ldrsh r1, [r3, r1] - ldrsh r3, [r3, r5] - add r0, #0x14 - bl ov12_02225BC8 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - b _0222DE0E -_0222DDE4: - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x14 - bl ov12_02225C50 - cmp r0, #0 - bne _0222DE0E - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_0200D3F4 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_0222DE00: - ldr r0, [r4, #0x3c] - mov r1, #3 - str r1, [r0, #0] - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_0222DE0E: - ldr r0, [r4, #0x10] - bl sub_0200D330 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0222DE18: .word 0x3DCCCCCD -_0222DE1C: .word 0x0223A14C -_0222DE20: .word 0x0223A14A - thumb_func_end ov12_0222DC98 - - thumb_func_start ov12_0222DE24 -ov12_0222DE24: ; 0x0222DE24 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #3 - bhi _0222DEE0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222DE3C: ; jump table - .short _0222DE44 - _0222DE3C - 2 ; case 0 - .short _0222DE70 - _0222DE3C - 2 ; case 1 - .short _0222DE92 - _0222DE3C - 2 ; case 2 - .short _0222DEBE - _0222DE3C - 2 ; case 3 -_0222DE44: - ldrb r6, [r4, #2] - mov r3, #1 - mov r2, #0 - cmp r6, #0 - ble _0222DE64 - ldr r0, _0222DEF8 ; =0x00000514 - add r5, r4, #0 -_0222DE52: - ldr r1, [r5, r0] - cmp r1, #1 - beq _0222DE5C - mov r3, #0 - b _0222DE64 -_0222DE5C: - add r2, r2, #1 - add r5, r5, #4 - cmp r2, r6 - blt _0222DE52 -_0222DE64: - cmp r3, #1 - bne _0222DEF0 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222DEF0 -_0222DE70: - ldrb r0, [r4, #2] - mov r5, #0 - cmp r0, #0 - ble _0222DE8A - ldr r0, _0222DEF8 ; =0x00000514 - add r3, r4, #0 - mov r2, #2 -_0222DE7E: - str r2, [r3, r0] - ldrb r1, [r4, #2] - add r5, r5, #1 - add r3, r3, #4 - cmp r5, r1 - blt _0222DE7E -_0222DE8A: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222DEF0 -_0222DE92: - ldrb r5, [r4, #2] - mov r2, #1 - mov r6, #0 - cmp r5, #0 - ble _0222DEB2 - ldr r0, _0222DEF8 ; =0x00000514 - add r3, r4, #0 -_0222DEA0: - ldr r1, [r3, r0] - cmp r1, #3 - beq _0222DEAA - mov r2, #0 - b _0222DEB2 -_0222DEAA: - add r6, r6, #1 - add r3, r3, #4 - cmp r6, r5 - blt _0222DEA0 -_0222DEB2: - cmp r2, #1 - bne _0222DEF0 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222DEF0 -_0222DEBE: - ldrb r0, [r4, #2] - mov r6, #0 - cmp r0, #0 - ble _0222DED8 - add r5, r4, #0 -_0222DEC8: - ldr r0, [r5, #0x24] - bl sub_0200D0F4 - ldrb r0, [r4, #2] - add r6, r6, #1 - add r5, #0x40 - cmp r6, r0 - blt _0222DEC8 -_0222DED8: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222DEF0 -_0222DEE0: - ldr r0, [r4, #8] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_0222DEF0: - ldr r0, [r4, #0x10] - bl sub_0200C7EC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222DEF8: .word 0x00000514 - thumb_func_end ov12_0222DE24 - - thumb_func_start ov12_0222DEFC -ov12_0222DEFC: ; 0x0222DEFC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - str r0, [sp] - add r4, r1, #0 - add r5, r2, #0 - add r7, r3, #0 - bl ov12_0221FDE4 - ldr r1, _0222E064 ; =0x00000564 - bl sub_02018144 - add r6, r0, #0 - bne _0222DF1A - bl sub_02022974 -_0222DF1A: - mov r0, #0 - strb r0, [r6, #1] - strb r0, [r6] - str r4, [r6, #0xc] - ldr r0, [sp] - str r5, [r6, #0x10] - str r0, [r6, #8] - ldr r1, [sp] - add r0, sp, #0x1c - bl ov12_0222329C - mov r1, #0 - mvn r1, r1 - ldr r0, [r6, #8] - add r2, r1, #0 - bl ov12_02235780 - ldr r0, [r6, #8] - mov r1, #0 - bl ov12_02220280 - strb r0, [r6, #2] - mov r0, #0xc - strb r0, [r6, #2] - str r7, [r6, #0x24] - mov r4, #0 - ldrb r0, [r6, #2] - str r4, [sp, #4] - cmp r0, #0 - ble _0222E052 - ldr r0, _0222E068 ; =0x00000514 - add r5, r6, #0 - add r0, r6, r0 - str r0, [sp, #0x10] - add r0, r6, #0 - str r0, [sp, #0xc] - add r0, #0x14 - str r0, [sp, #0xc] -_0222DF66: - cmp r4, #0 - beq _0222DF76 - ldr r0, [r6, #0xc] - ldr r1, [r6, #0x10] - add r2, sp, #0x1c - bl sub_0200CE6C - str r0, [r5, #0x24] -_0222DF76: - add r1, r5, #0 - ldr r7, [r5, #0x24] - add r1, #0x20 - mov r0, #0 - strb r0, [r1] - add r1, r5, #0 - add r1, #0x21 - strb r0, [r1] - bl sub_0201D2E8 - mov r1, #0xa - bl sub_020E1F6C - add r1, #0xa - add r0, r5, #0 - add r1, r4, r1 - add r0, #0x22 - strb r1, [r0] - bl sub_0201D2E8 - mov r1, #6 - bl sub_020E1F6C - add r0, r5, #0 - add r0, #0x23 - strb r1, [r0] - mov r0, #0xfe - lsl r0, r0, #0x16 - str r0, [r5, #0x4c] - ldr r0, [r6, #8] - ldr r1, _0222E06C ; =0x0223A19A - str r0, [r5, #0x14] - ldr r0, [r6, #0xc] - str r0, [r5, #0x18] - ldr r0, [r6, #0x10] - str r0, [r5, #0x1c] - ldr r0, [sp, #0x10] - str r0, [r5, #0x50] - ldr r0, [sp, #4] - lsl r0, r0, #3 - str r0, [sp, #0x18] - add r0, r1, r0 - str r0, [sp, #8] - bl sub_0201D2E8 - ldr r2, [sp, #8] - mov r1, #6 - ldrsh r1, [r2, r1] - bl sub_020E1F6C - ldr r2, [sp, #8] - mov r0, #2 - ldrsh r0, [r2, r0] - add r0, r0, r1 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0x14] - bl sub_0201D2E8 - ldr r2, [sp, #8] - mov r1, #4 - ldrsh r1, [r2, r1] - bl sub_020E1F6C - ldr r2, _0222E06C ; =0x0223A19A - ldr r0, [sp, #0x18] - ldrsh r0, [r2, r0] - add r0, r0, r1 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl sub_0200D4C4 - add r0, r7, #0 - mov r1, #2 - bl sub_0200D6A4 - ldr r1, [r5, #0x4c] - add r0, r7, #0 - add r2, r1, #0 - bl sub_0200D6E8 - add r0, r7, #0 - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [sp] - ldr r1, _0222E070 ; =ov12_0222DC98 - ldr r2, [sp, #0xc] - ldr r3, _0222E074 ; =0x0000044B - bl ov12_022201CC - ldr r0, [sp, #4] - mov r1, #6 - add r0, r0, #1 - bl sub_020E1F6C - ldr r0, [sp, #0x10] - add r4, r4, #1 - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - str r1, [sp, #4] - add r0, #0x40 - str r0, [sp, #0xc] - ldrb r0, [r6, #2] - add r5, #0x40 - cmp r4, r0 - blt _0222DF66 -_0222E052: - ldr r0, [sp] - ldr r1, _0222E078 ; =ov12_0222DE24 - ldr r3, _0222E07C ; =0x0000044D - add r2, r6, #0 - bl ov12_022201CC - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222E064: .word 0x00000564 -_0222E068: .word 0x00000514 -_0222E06C: .word 0x0223A19A -_0222E070: .word ov12_0222DC98 -_0222E074: .word 0x0000044B -_0222E078: .word ov12_0222DE24 -_0222E07C: .word 0x0000044D - thumb_func_end ov12_0222DEFC - - thumb_func_start ov12_0222E080 -ov12_0222E080: ; 0x0222E080 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #4] - cmp r0, #3 - bhi _0222E166 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222E09A: ; jump table - .short _0222E0A2 - _0222E09A - 2 ; case 0 - .short _0222E0C0 - _0222E09A - 2 ; case 1 - .short _0222E112 - _0222E09A - 2 ; case 2 - .short _0222E13C - _0222E09A - 2 ; case 3 -_0222E0A2: - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - ldrb r0, [r4, #4] - add r0, r0, #1 - strb r0, [r4, #4] - b _0222E18C -_0222E0C0: - add r0, r4, #0 - add r0, #0x2c - bl ov12_02226454 - cmp r0, #0 - beq _0222E18C - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #8] - mov r1, #1 - bl ov12_022233EC - add r5, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl ov12_022266E8 - add r6, r0, #0 - ldr r0, [r4, #8] - bl ov12_0221FDE4 - mov r1, #0xc8 - str r1, [sp] - mov r3, #3 - str r5, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - str r6, [sp, #0xc] - str r0, [sp, #0x10] - add r0, r1, #0 - mov r1, #0xa0 - add r2, r1, #0 - add r2, #0xcc - lsl r3, r3, #0xe - bl ov12_0222662C - str r0, [r4, #0x28] - ldrb r0, [r4, #4] - add r0, r0, #1 - strb r0, [r4, #4] - b _0222E18C -_0222E112: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - cmp r0, #0x78 - blt _0222E18C - ldr r0, [r4, #0x28] - bl ov12_0222669C - mov r1, #2 - mov r2, #0x10 - str r1, [sp] - add r0, r4, #0 - str r2, [sp, #4] - add r0, #0x2c - add r3, r2, #0 - bl ov12_02226424 - ldrb r0, [r4, #4] - add r0, r0, #1 - strb r0, [r4, #4] - b _0222E18C -_0222E13C: - add r0, r4, #0 - add r0, #0x2c - bl ov12_02226454 - cmp r0, #0 - beq _0222E18C - ldr r0, [r4, #8] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov12_022232FC - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - ldrb r0, [r4, #4] - add r0, r0, #1 - strb r0, [r4, #4] - b _0222E18C -_0222E166: - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _0222E1A4 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - ldr r0, [r4, #8] - mov r1, #2 - bl ov12_02222664 - ldr r0, [r4, #8] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_0222E18C: - ldr r0, [r4, #0x24] - bl sub_0200D330 - ldr r0, [r4, #0x20] - bl sub_0200D330 - ldr r0, [r4, #0x10] - bl sub_0200C7EC - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_0222E1A4: .word 0xFFFF1FFF - thumb_func_end ov12_0222E080 - - thumb_func_start ov12_0222E1A8 -ov12_0222E1A8: ; 0x0222E1A8 - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #0x54 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #4 - bl ov12_0223595C - ldr r0, [r4, #8] - mov r1, #0 - bl ov12_022202C0 - mov r1, #2 - str r0, [r4, #0x20] - bl sub_0200D810 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _0222E23C ; =0xFFFF1FFF - and r2, r1 - lsr r1, r0, #0xb - orr r1, r2 - str r1, [r0, #0] - add r0, #0x4a - ldrh r2, [r0] - mov r1, #0x3f - bic r2, r1 - mov r1, #0x1b - orr r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _0222E240 ; =0xFFFFC0FF - and r2, r1 - mov r1, #0x17 - lsl r1, r1, #8 - orr r1, r2 - strh r1, [r0] - ldr r0, [r4, #8] - mov r1, #1 - bl ov12_022202C0 - mov r1, #1 - str r0, [r4, #0x24] - bl sub_0200D810 - mov r1, #0x10 - str r1, [sp] - add r0, r4, #0 - mov r2, #2 - str r1, [sp, #4] - add r0, #0x2c - add r3, r2, #0 - bl ov12_02226424 - ldr r0, [r4, #8] - mov r1, #2 - bl ov12_02222590 - mov r0, #2 - mov r1, #1 - bl sub_02019120 - ldr r0, [r4, #8] - ldr r1, _0222E244 ; =ov12_0222E080 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0222E23C: .word 0xFFFF1FFF -_0222E240: .word 0xFFFFC0FF -_0222E244: .word ov12_0222E080 - thumb_func_end ov12_0222E1A8 - - thumb_func_start ov12_0222E248 -ov12_0222E248: ; 0x0222E248 - push {r4, lr} - add r4, r0, #0 - bl sub_0200D408 - cmp r0, #1 - bne _0222E25A - add r0, r4, #0 - bl sub_0200D330 -_0222E25A: - pop {r4, pc} - thumb_func_end ov12_0222E248 - - thumb_func_start ov12_0222E25C -ov12_0222E25C: ; 0x0222E25C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r1, [sp, #4] - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #0x1c - ldrsh r0, [r0, r1] - cmp r0, #0 - bgt _0222E280 - ldr r0, [sp, #4] - ldr r0, [r0, #0x30] - bl ov12_0222E248 - ldr r0, [sp, #4] - ldr r0, [r0, #0x34] - bl ov12_0222E248 - b _0222E286 -_0222E280: - sub r1, r0, #1 - ldr r0, [sp, #4] - strh r1, [r0, #0x1c] -_0222E286: - ldr r0, [sp, #4] - ldr r0, [r0, #0x28] - bl ov12_0222E248 - ldr r0, [sp, #4] - ldr r0, [r0, #0x2c] - bl ov12_0222E248 - ldr r4, [sp, #4] - mov r6, #0 - add r7, r6, #0 - add r5, r4, #0 -_0222E29E: - mov r0, #0x1e - ldrsh r0, [r4, r0] - add r0, r0, #1 - strh r0, [r4, #0x1e] - mov r0, #0x1e - ldrsh r0, [r4, r0] - cmp r0, #0x28 - blt _0222E2B8 - ldr r0, [r5, #0x28] - mov r1, #0 - bl sub_0200D3F4 - add r6, r6, #1 -_0222E2B8: - add r7, r7, #1 - add r4, r4, #2 - add r5, r5, #4 - cmp r7, #4 - blt _0222E29E - cmp r6, #4 - bne _0222E2EC - ldr r4, [sp, #4] - mov r5, #0 -_0222E2CA: - ldr r0, [r4, #0x28] - bl sub_0200D0F4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #4 - blt _0222E2CA - ldr r0, [sp, #4] - ldr r1, [sp] - ldr r0, [r0, #4] - bl ov12_02220220 - ldr r0, [sp, #4] - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0222E2EC: - ldr r0, [sp, #4] - ldr r0, [r0, #0x10] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_0222E25C - - thumb_func_start ov12_0222E2F8 -ov12_0222E2F8: ; 0x0222E2F8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - mov r1, #0x38 - add r5, r0, #0 - add r4, r3, #0 - bl ov12_02235E50 - add r6, r0, #0 - mov r0, #0xa - strh r0, [r6, #0x1c] - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223595C - ldr r1, [r6, #4] - add r0, sp, #0 - bl ov12_0222329C - str r4, [r6, #0x28] - mov r0, #0 - strh r0, [r6, #0x1e] - mov r7, #1 - add r4, r6, #2 - add r5, r6, #4 -_0222E328: - mov r0, #0 - strh r0, [r4, #0x1e] - ldr r0, [r6, #8] - ldr r1, [r6, #0x10] - add r2, sp, #0 - bl sub_0200CE6C - str r0, [r5, #0x28] - add r7, r7, #1 - add r4, r4, #2 - add r5, r5, #4 - cmp r7, #4 - blt _0222E328 - ldr r0, [r6, #0x28] - mov r1, #1 - bl sub_0200D7D4 - ldr r0, [r6, #0x2c] - mov r1, #1 - bl sub_0200D7D4 - mov r1, #0x1f - ldr r0, [r6, #0x28] - mvn r1, r1 - mov r2, #0 - bl sub_0200D5DC - mov r1, #0x1f - ldr r0, [r6, #0x2c] - mvn r1, r1 - mov r2, #0x20 - bl sub_0200D5DC - ldr r0, [r6, #0x30] - mov r1, #0x20 - mov r2, #0 - bl sub_0200D5DC - mov r1, #0x20 - ldr r0, [r6, #0x34] - add r2, r1, #0 - bl sub_0200D5DC - ldr r0, [r6, #4] - ldr r1, _0222E38C ; =ov12_0222E25C - add r2, r6, #0 - bl ov12_022201E8 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222E38C: .word ov12_0222E25C - thumb_func_end ov12_0222E2F8 - - thumb_func_start ov12_0222E390 -ov12_0222E390: ; 0x0222E390 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r1, #0 - mov r4, #0 - str r0, [sp, #0x1c] - str r4, [sp, #0x20] - add r6, r5, #0 - add r7, r5, #0 -_0222E3A0: - mov r0, #0x22 - ldrsh r0, [r6, r0] - add r0, r0, #1 - strh r0, [r6, #0x22] - mov r0, #0x22 - ldrsh r0, [r6, r0] - cmp r0, #0x14 - blt _0222E3F2 - ldr r0, [r7, #0x2c] - bl ov12_0222E248 - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x6e - bne _0222E3F2 - mov r1, #0 - mvn r1, r1 - ldr r0, [r5, #4] - add r2, r1, #0 - bl ov12_02235780 - ldr r0, [r5, #0x2c] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x34] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x38] - mov r1, #1 - bl sub_0200D810 - mov r0, #0xf - str r0, [r5, #0x54] - mov r0, #0 - str r0, [r5, #0x58] -_0222E3F2: - add r4, r4, #1 - add r6, r6, #2 - add r7, r7, #4 - cmp r4, #4 - blt _0222E3A0 - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x32 - bne _0222E436 - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _0222E610 ; =0x0000FFFF - str r0, [sp, #0x14] - ldr r0, _0222E614 ; =0x000003EA - str r0, [sp, #0x18] - ldr r3, [r5, #0x1c] - ldr r0, [r5, #0x18] - lsl r3, r3, #0x14 - lsr r3, r3, #0x10 - bl ov12_02226870 - str r0, [r5, #0x3c] -_0222E436: - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x3c - bne _0222E470 - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _0222E610 ; =0x0000FFFF - str r0, [sp, #0x14] - ldr r0, _0222E614 ; =0x000003EA - str r0, [sp, #0x18] - ldr r3, [r5, #0x1c] - ldr r0, [r5, #0x18] - lsl r3, r3, #0x14 - lsr r3, r3, #0x10 - bl ov12_02226870 - str r0, [r5, #0x40] -_0222E470: - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x46 - bne _0222E4AA - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _0222E610 ; =0x0000FFFF - str r0, [sp, #0x14] - ldr r0, _0222E614 ; =0x000003EA - str r0, [sp, #0x18] - ldr r3, [r5, #0x1c] - ldr r0, [r5, #0x18] - lsl r3, r3, #0x14 - lsr r3, r3, #0x10 - bl ov12_02226870 - str r0, [r5, #0x44] -_0222E4AA: - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x50 - bne _0222E4E4 - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _0222E610 ; =0x0000FFFF - str r0, [sp, #0x14] - ldr r0, _0222E614 ; =0x000003EA - str r0, [sp, #0x18] - ldr r3, [r5, #0x1c] - ldr r0, [r5, #0x18] - lsl r3, r3, #0x14 - lsr r3, r3, #0x10 - bl ov12_02226870 - str r0, [r5, #0x48] -_0222E4E4: - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x5a - bne _0222E51E - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _0222E610 ; =0x0000FFFF - str r0, [sp, #0x14] - ldr r0, _0222E614 ; =0x000003EA - str r0, [sp, #0x18] - ldr r3, [r5, #0x1c] - ldr r0, [r5, #0x18] - lsl r3, r3, #0x14 - lsr r3, r3, #0x10 - bl ov12_02226870 - str r0, [r5, #0x4c] -_0222E51E: - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x64 - bne _0222E558 - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _0222E610 ; =0x0000FFFF - str r0, [sp, #0x14] - ldr r0, _0222E614 ; =0x000003EA - str r0, [sp, #0x18] - ldr r3, [r5, #0x1c] - ldr r0, [r5, #0x18] - lsl r3, r3, #0x14 - lsr r3, r3, #0x10 - bl ov12_02226870 - str r0, [r5, #0x50] -_0222E558: - mov r1, #0x22 - ldrsh r0, [r5, r1] - cmp r0, #0x6e - bne _0222E592 - sub r1, #0x23 - ldr r0, [r5, #4] - add r2, r1, #0 - bl ov12_02235780 - ldr r0, [r5, #0x2c] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x34] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x38] - mov r1, #1 - bl sub_0200D810 - mov r0, #0xf - str r0, [r5, #0x54] - mov r0, #0 - str r0, [r5, #0x58] -_0222E592: - mov r0, #0x22 - ldrsh r0, [r5, r0] - cmp r0, #0x6e - blt _0222E5CA - ldr r0, [r5, #0x54] - cmp r0, #0 - ble _0222E5A4 - sub r0, r0, #1 - str r0, [r5, #0x54] -_0222E5A4: - ldr r0, [r5, #0x58] - cmp r0, #0xf - bge _0222E5AE - add r0, r0, #1 - str r0, [r5, #0x58] -_0222E5AE: - ldr r0, [r5, #0x58] - ldr r1, [r5, #0x54] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222E618 ; =0x04000052 - strh r1, [r0] - ldr r0, [r5, #0x54] - cmp r0, #0 - bne _0222E5CA - ldr r0, [r5, #0x58] - cmp r0, #0xf - bne _0222E5CA - mov r0, #4 - str r0, [sp, #0x20] -_0222E5CA: - ldr r0, [sp, #0x20] - cmp r0, #4 - bne _0222E606 - mov r6, #0 - add r4, r5, #0 -_0222E5D4: - ldr r0, [r4, #0x2c] - bl sub_0200D0F4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0222E5D4 - mov r6, #0 - add r4, r5, #0 -_0222E5E6: - ldr r0, [r4, #0x3c] - bl ov12_02226858 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #6 - blt _0222E5E6 - ldr r0, [r5, #4] - ldr r1, [sp, #0x1c] - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} -_0222E606: - ldr r0, [r5, #0x10] - bl sub_0200C7EC - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222E610: .word 0x0000FFFF -_0222E614: .word 0x000003EA -_0222E618: .word 0x04000052 - thumb_func_end ov12_0222E390 - - thumb_func_start ov12_0222E61C -ov12_0222E61C: ; 0x0222E61C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - mov r1, #0x5c - str r0, [sp] - add r5, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0xa - strh r0, [r4, #0x20] - ldr r0, [sp] - add r1, r4, #0 - bl ov12_0223595C - ldr r1, [r4, #4] - add r0, sp, #0xc - bl ov12_0222329C - str r5, [r4, #0x2c] - mov r0, #0 - strh r0, [r4, #0x22] - mov r0, #1 - str r0, [sp, #8] - mov r7, #5 - add r6, r4, #2 - add r5, r4, #4 -_0222E650: - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r2, r0, #0x1e - sub r2, r2, r1 - mov r0, #0x1e - ror r2, r0 - add r0, r1, r2 - add r0, r7, r0 - strh r0, [r6, #0x22] - ldr r0, [r4, #8] - ldr r1, [r4, #0x10] - add r2, sp, #0xc - bl sub_0200CE6C - str r0, [r5, #0x2c] - ldr r0, [sp, #8] - add r7, r7, #5 - add r0, r0, #1 - add r6, r6, #2 - add r5, r5, #4 - str r0, [sp, #8] - cmp r0, #4 - blt _0222E650 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D7D4 - ldr r0, [r4, #0x34] - mov r1, #1 - bl sub_0200D7D4 - ldr r0, [sp] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [sp] - bl ov12_022232FC - mov r1, #0 - add r5, r0, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - add r0, r5, #0 - mov r1, #0x29 - bl sub_020080C0 - ldr r0, [sp] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [sp] - bl ov12_0223525C - cmp r0, #3 - bne _0222E6D2 - mov r7, #0x8c - b _0222E6D4 -_0222E6D2: - mov r7, #0x54 -_0222E6D4: - mov r6, #0 - add r5, r4, #0 -_0222E6D8: - ldr r0, [r5, #0x2c] - ldr r1, [sp, #4] - add r2, r7, #0 - bl sub_0200D4C4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0222E6D8 - ldr r0, [sp] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [sp] - bl ov12_0223525C - cmp r0, #3 - ldr r0, [r4, #0x2c] - bne _0222E71E - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x34] - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x30] - mov r1, #0x12 - bl sub_0200D474 - ldr r0, [r4, #0x38] - mov r1, #0x12 - bl sub_0200D474 - b _0222E73C -_0222E71E: - mov r1, #0x12 - bl sub_0200D474 - ldr r0, [r4, #0x34] - mov r1, #0x12 - bl sub_0200D474 - ldr r0, [r4, #0x30] - mov r1, #0xa - bl sub_0200D474 - ldr r0, [r4, #0x38] - mov r1, #0xa - bl sub_0200D474 -_0222E73C: - mov r1, #0x1f - ldr r0, [r4, #0x2c] - mvn r1, r1 - mov r2, #0 - bl sub_0200D5DC - mov r1, #0x27 - ldr r0, [r4, #0x38] - mvn r1, r1 - mov r2, #4 - bl sub_0200D5DC - ldr r0, [r4, #0x34] - mov r1, #0x20 - mov r2, #0 - bl sub_0200D5DC - ldr r0, [r4, #0x30] - mov r1, #0x28 - mov r2, #4 - bl sub_0200D5DC - ldr r0, [r4, #0x2c] - bl sub_0200D43C - str r0, [r4, #0x1c] - ldr r0, [r4, #4] - ldr r1, _0222E780 ; =ov12_0222E390 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222E780: .word ov12_0222E390 - thumb_func_end ov12_0222E61C - - thumb_func_start ov12_0222E784 -ov12_0222E784: ; 0x0222E784 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - bne _0222E80A - add r0, r4, #0 - add r0, #0x60 - bl ov12_02225F6C - cmp r0, #0 - bne _0222E7C8 - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl ov12_02235E80 - add sp, #0xc - pop {r4, r5, pc} -_0222E7C8: - add r0, r4, #0 - add r0, #0x60 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x28] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - bl sub_0200D6E8 - mov r0, #0 - str r0, [sp] - mov r1, #0x58 - mov r2, #0x5a - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x28] - ldr r3, [r4, #0x74] - bl ov12_0222605C - ldr r0, [r4, #0x28] - bl sub_0200D330 - ldr r0, [r4, #0x3c] - bl sub_0200D330 - ldr r0, [r4, #0x50] - bl sub_0200D330 - ldr r0, [r4, #0xc] - bl sub_0200C7EC -_0222E80A: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222E784 - - thumb_func_start ov12_0222E810 -ov12_0222E810: ; 0x0222E810 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x84 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - mov r1, #1 - str r0, [r4, #0x24] - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x58 - strh r0, [r1] - mov r0, #0x58 - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0x5c - strh r1, [r0] - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02223354 - add r1, r4, #0 - add r1, #0x5a - strh r0, [r1] - add r0, r5, #0 - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x28] - add r0, r5, #0 - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x3c] - add r0, r5, #0 - mov r1, #2 - bl ov12_022202C0 - str r0, [r4, #0x50] - ldr r0, [r4, #0x28] - mov r1, #2 - bl sub_0200D6A4 - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200D460 - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0200D460 - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x50] - bl sub_0200D460 - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232B8 - sub r0, r0, #3 - cmp r0, #1 - ldr r0, [r4, #0x28] - bhi _0222E8DE - mov r1, #0x1e - bl sub_0200D474 - ldr r0, [r4, #0x3c] - mov r1, #0x32 - bl sub_0200D474 - ldr r0, [r4, #0x50] - mov r1, #0x46 - bl sub_0200D474 - b _0222E8F4 -_0222E8DE: - mov r1, #0x3c - bl sub_0200D474 - ldr r0, [r4, #0x3c] - mov r1, #0x46 - bl sub_0200D474 - ldr r0, [r4, #0x50] - mov r1, #0x32 - bl sub_0200D474 -_0222E8F4: - mov r2, #0x14 - mov r1, #0x64 - str r2, [sp] - str r1, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x60 - add r3, r1, #0 - bl ov12_02225EF0 - ldr r0, [r4, #4] - ldr r1, _0222E918 ; =ov12_0222E784 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0222E918: .word ov12_0222E784 - thumb_func_end ov12_0222E810 - - thumb_func_start ov12_0222E91C -ov12_0222E91C: ; 0x0222E91C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222E930 - cmp r0, #1 - beq _0222EA2E - b _0222EA7C -_0222E930: - add r0, r4, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - bne _0222E9AA - mov r0, #0x22 - ldrsh r3, [r4, r0] - mov r0, #0x20 - ldrsh r1, [r4, r0] - mov r0, #3 - add r2, r1, #0 - str r3, [sp] - add r2, #0x30 - str r0, [sp, #4] - add r0, r4, #0 - lsl r2, r2, #0x10 - add r0, #0x34 - asr r2, r2, #0x10 - bl ov12_02225BC8 - mov r0, #0x22 - ldrsh r1, [r4, r0] - mov r0, #0xa4 - ldrsh r0, [r4, r0] - add r2, r1, r0 - mov r0, #0x20 - ldrsh r1, [r4, r0] - lsl r0, r2, #0x10 - asr r3, r0, #0x10 - add r2, r1, #0 - add r2, #0x30 - lsl r2, r2, #0x10 - str r3, [sp] - mov r0, #6 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x58 - asr r2, r2, #0x10 - bl ov12_02225BC8 - mov r0, #0x22 - ldrsh r1, [r4, r0] - mov r0, #0xa4 - ldrsh r0, [r4, r0] - add r2, r1, r0 - mov r0, #0x20 - ldrsh r1, [r4, r0] - lsl r0, r2, #0x10 - asr r3, r0, #0x10 - add r2, r1, #0 - add r2, #0x30 - lsl r2, r2, #0x10 - str r3, [sp] - mov r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x7c - asr r2, r2, #0x10 - bl ov12_02225BC8 - b _0222EA18 -_0222E9AA: - mov r0, #0x22 - ldrsh r3, [r4, r0] - mov r0, #0x20 - ldrsh r2, [r4, r0] - mov r0, #3 - add r1, r2, #0 - str r3, [sp] - add r1, #0x30 - str r0, [sp, #4] - add r0, r4, #0 - lsl r1, r1, #0x10 - add r0, #0x34 - asr r1, r1, #0x10 - bl ov12_02225BC8 - mov r0, #0x22 - ldrsh r1, [r4, r0] - mov r0, #0xa4 - ldrsh r0, [r4, r0] - add r1, r1, r0 - mov r0, #0x20 - ldrsh r2, [r4, r0] - lsl r0, r1, #0x10 - asr r3, r0, #0x10 - add r1, r2, #0 - add r1, #0x30 - lsl r1, r1, #0x10 - str r3, [sp] - mov r0, #6 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x58 - asr r1, r1, #0x10 - bl ov12_02225BC8 - mov r0, #0x22 - ldrsh r1, [r4, r0] - mov r0, #0xa4 - ldrsh r0, [r4, r0] - add r1, r1, r0 - mov r0, #0x20 - ldrsh r2, [r4, r0] - lsl r0, r1, #0x10 - asr r3, r0, #0x10 - add r1, r2, #0 - add r1, #0x30 - lsl r1, r1, #0x10 - str r3, [sp] - mov r0, #9 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x7c - asr r1, r1, #0x10 - bl ov12_02225BC8 -_0222EA18: - add r0, r4, #0 - add r0, #0xa0 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xa0 - strb r1, [r0] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222EA8E -_0222EA2E: - add r0, r4, #0 - ldr r1, [r4, #0x28] - add r0, #0x58 - mov r5, #0 - bl ov12_02225C50 - cmp r0, #0 - bne _0222EA40 - add r5, r5, #1 -_0222EA40: - add r0, r4, #0 - ldr r1, [r4, #0x24] - add r0, #0x34 - bl ov12_02225C74 - cmp r0, #0 - bne _0222EA50 - add r5, r5, #1 -_0222EA50: - add r0, r4, #0 - ldr r1, [r4, #0x30] - add r0, #0x7c - bl ov12_02225C50 - cmp r0, #0 - bne _0222EA60 - add r5, r5, #1 -_0222EA60: - cmp r5, #3 - blt _0222EA8E - add r0, r4, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #1 - ldrb r0, [r4] - bne _0222EA76 - sub r0, r0, #1 - strb r0, [r4] - b _0222EA8E -_0222EA76: - add r0, r0, #1 - strb r0, [r4] - b _0222EA8E -_0222EA7C: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl ov12_02235E80 - add sp, #8 - pop {r3, r4, r5, pc} -_0222EA8E: - ldr r0, [r4, #0x28] - bl sub_0200D330 - ldr r0, [r4, #0xc] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222E91C - - thumb_func_start ov12_0222EAA0 -ov12_0222EAA0: ; 0x0222EAA0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - mov r1, #0xa8 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - add r0, r4, #0 - mov r1, #0 - add r0, #0xa1 - strb r1, [r0] - add r0, r4, #0 - mov r1, #8 - add r0, #0xa2 - strb r1, [r0] - add r0, r4, #0 - add r0, #0xa3 - strb r1, [r0] - sub r1, #9 - ldr r0, [r4, #4] - add r2, r1, #0 - bl ov12_02235780 - add r0, r4, #0 - add r0, #0xa2 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0xa3 - ldrb r0, [r0] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222EC10 ; =0x04000052 - strh r1, [r0] - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0x24] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x20] - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x22] - ldr r0, [r4, #4] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x28] - ldr r0, [r4, #4] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x30] - ldr r0, [r4, #0x24] - mov r1, #0x29 - bl sub_020080C0 - neg r1, r0 - add r0, r4, #0 - add r0, #0xa4 - strh r1, [r0] - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02223334 - add r7, r0, #0 - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02223344 - str r0, [sp, #0x18] - ldr r0, [r4, #4] - ldr r5, [r4, #0x28] - bl ov12_0222339C - add r1, r0, #0 - add r0, r5, #0 - add r1, r1, #1 - bl sub_0200D460 - ldr r0, [r5, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov12_0222332C - str r0, [sp, #0x1c] - ldr r0, [r4, #4] - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r6, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0xc4 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - add r2, r7, #0 - bl sub_02003B08 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #4] - ldr r5, [r4, #0x30] - bl ov12_0222339C - add r1, r0, #0 - add r0, r5, #0 - add r1, r1, #1 - bl sub_0200D460 - ldr r0, [r5, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov12_0222332C - str r0, [sp, #0x20] - ldr r0, [r4, #4] - bl ov12_0221FDE4 - add r3, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r6, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0xc4 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x18] - add r2, r7, #0 - bl sub_02003B08 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #4] - ldr r1, _0222EC14 ; =ov12_0222E91C - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_0222EC10: .word 0x04000052 -_0222EC14: .word ov12_0222E91C - thumb_func_end ov12_0222EAA0 - - thumb_func_start ov12_0222EC18 -ov12_0222EC18: ; 0x0222EC18 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r6, #0 - str r0, [sp] - str r1, [sp, #4] - add r7, r6, #0 - add r4, r1, #0 - add r5, r1, #0 -_0222EC28: - mov r0, #0x1e - ldrsh r0, [r4, r0] - add r0, r0, #1 - strh r0, [r4, #0x1e] - mov r0, #0x1e - ldrsh r0, [r4, r0] - cmp r0, #0x20 - blt _0222EC50 - ldr r0, [r5, #0x30] - bl ov12_0222E248 - mov r0, #0x1e - ldrsh r0, [r4, r0] - cmp r0, #0xa0 - blt _0222EC50 - ldr r0, [r5, #0x30] - mov r1, #0 - bl sub_0200D3F4 - add r6, r6, #1 -_0222EC50: - add r7, r7, #1 - add r4, r4, #2 - add r5, r5, #4 - cmp r7, #8 - blt _0222EC28 - cmp r6, #8 - bne _0222EC84 - ldr r4, [sp, #4] - mov r5, #0 -_0222EC62: - ldr r0, [r4, #0x30] - bl sub_0200D0F4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #8 - blt _0222EC62 - ldr r0, [sp, #4] - ldr r1, [sp] - ldr r0, [r0, #4] - bl ov12_02220220 - ldr r0, [sp, #4] - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0222EC84: - ldr r0, [sp, #4] - ldr r0, [r0, #0x10] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_0222EC18 - - thumb_func_start ov12_0222EC90 -ov12_0222EC90: ; 0x0222EC90 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - mov r1, #0x74 - add r6, r0, #0 - add r5, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - mov r0, #0xa - strh r0, [r4, #0x1c] - add r0, r6, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r1, [r4, #4] - add r0, sp, #0x24 - bl ov12_0222329C - str r5, [r4, #0x30] - mov r6, #1 - add r5, r4, #4 - mov r7, #0x1f -_0222ECBC: - ldr r0, [r4, #8] - ldr r1, [r4, #0x10] - add r2, sp, #0x24 - bl sub_0200CE6C - str r0, [r5, #0x30] - lsr r1, r6, #0x1f - lsl r0, r6, #0x1f - sub r0, r0, r1 - ror r0, r7 - add r0, r1, r0 - beq _0222ECDC - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D7D4 -_0222ECDC: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #8 - blt _0222ECBC - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - mov r1, #0 - add r5, r0, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - mov r1, #0 - str r0, [sp, #0x1c] - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [sp, #0x1c] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r0, #0x14 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x50 - add r1, r7, #0 - add r2, r6, #0 - add r3, r5, #0 - bl ov12_02225BC8 - mov r7, #0 - ldr r0, [r4, #4] - add r6, r7, #0 - str r7, [sp, #0x14] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_0223525C - cmp r0, #4 - bne _0222ED60 - mov r0, #1 - str r0, [sp, #0x14] -_0222ED60: - add r0, r4, #0 - str r0, [sp, #0x20] - add r0, #0x50 - add r5, r4, #0 - str r0, [sp, #0x20] -_0222ED6A: - ldr r0, [sp, #0x20] - bl ov12_02225C14 - str r0, [sp, #0x18] - lsr r2, r7, #0x1f - lsl r1, r7, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _0222EDA2 - ldr r0, [sp, #0x14] - cmp r0, #0 - bne _0222ED9E - cmp r6, #8 - bge _0222EDA2 - mov r1, #0x50 - mov r2, #0x52 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x30] - bl sub_0200D4C4 - add r5, r5, #4 - add r6, r6, #1 - b _0222EDA2 -_0222ED9E: - mov r0, #0 - str r0, [sp, #0x14] -_0222EDA2: - ldr r0, [sp, #0x18] - add r7, r7, #1 - cmp r0, #1 - beq _0222ED6A - ldr r0, [r4, #4] - mov r1, #1 - bl ov12_02223428 - str r0, [sp, #0x10] - ldr r0, [r4, #4] - mov r1, #2 - bl ov12_02223428 - add r7, r0, #0 - mov r6, #0 - str r4, [sp, #0xc] - add r5, r4, #0 -_0222EDC4: - mov r0, #8 - sub r0, r0, r6 - str r0, [sp, #8] - lsl r1, r0, #2 - ldr r0, [sp, #0xc] - strh r1, [r0, #0x1e] - ldr r0, [r4, #4] - bl ov12_0221FDD4 - cmp r0, #0 - bne _0222EE20 - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_0223525C - cmp r0, #3 - bne _0222EE02 - cmp r6, #4 - ldr r0, [r5, #0x30] - bge _0222EDFA - add r1, r7, #0 - bl sub_0200D460 - b _0222EE16 -_0222EDFA: - ldr r1, [sp, #0x10] - bl sub_0200D460 - b _0222EE16 -_0222EE02: - cmp r6, #4 - ldr r0, [r5, #0x30] - blt _0222EE10 - add r1, r7, #0 - bl sub_0200D460 - b _0222EE16 -_0222EE10: - ldr r1, [sp, #0x10] - bl sub_0200D460 -_0222EE16: - ldr r0, [r5, #0x30] - ldr r1, [sp, #8] - bl sub_0200D474 - b _0222EE30 -_0222EE20: - ldr r0, [r5, #0x30] - add r1, r6, #0 - bl sub_0200D474 - ldr r0, [r5, #0x30] - add r1, r7, #0 - bl sub_0200D460 -_0222EE30: - ldr r0, [sp, #0xc] - add r6, r6, #1 - add r0, r0, #2 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r6, #8 - blt _0222EDC4 - ldr r0, [r4, #4] - ldr r1, _0222EE4C ; =ov12_0222EC18 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222EE4C: .word ov12_0222EC18 - thumb_func_end ov12_0222EC90 - - thumb_func_start ov12_0222EE50 -ov12_0222EE50: ; 0x0222EE50 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5] - cmp r0, #0 - beq _0222EE66 - cmp r0, #1 - beq _0222EEF4 - cmp r0, #2 - b _0222EF52 -_0222EE66: - ldr r0, [r5, #0x28] - cmp r0, #0xe - ble _0222EEBC - ldr r0, [r5, #0x30] - ldr r1, _0222EF98 ; =0x3E4CCCCD - bl sub_020E1A9C - str r0, [r5, #0x30] - ldr r0, [r5, #0x2c] - ldr r1, _0222EF98 ; =0x3E4CCCCD - bl sub_020E0B00 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x30] - bl sub_020E16BC - ldr r2, _0222EF9C ; =0x9999999A - ldr r3, _0222EFA0 ; =0x3FC99999 - bl sub_020E0E54 - bhi _0222EEA0 - ldrb r0, [r5] - mov r1, #0 - add r0, r0, #1 - strb r0, [r5] - ldr r0, [r5, #0x1c] - bl sub_0200D3F4 - b _0222EF7A -_0222EEA0: - mov r0, #0x36 - ldrsb r0, [r5, r0] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, [r5, #0x2c] - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [r5, #0x1c] - ldr r2, [r5, #0x30] - bl sub_0200D6E8 - b _0222EF7A -_0222EEBC: - add r0, r5, #0 - add r0, #0x34 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x34 - strb r1, [r0] - add r0, r5, #0 - add r0, #0x35 - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0x35 - strb r1, [r0] - add r0, r5, #0 - add r0, #0x34 - ldrb r1, [r0] - add r0, r5, #0 - add r0, #0x35 - ldrb r0, [r0] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222EFA4 ; =0x04000052 - strh r1, [r0] - ldr r0, [r5, #0x28] - add r0, r0, #1 - str r0, [r5, #0x28] - b _0222EF7A -_0222EEF4: - ldr r0, [r5, #0x3c] - bl ov12_02226848 - cmp r0, #0 - bne _0222EF7A - ldr r0, [r5, #0x38] - bl ov12_02226858 - ldr r0, [r5, #0x3c] - bl ov12_02226858 - ldr r0, [r5, #0x24] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r4, r0, #0 - ldr r0, [r5, #4] - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - lsl r3, r4, #0x14 - str r2, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - str r2, [sp, #0x10] - ldr r0, _0222EFA8 ; =0x0000FFFF - mov r2, #2 - str r0, [sp, #0x14] - ldr r0, _0222EFAC ; =0x0000044C - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - ldr r0, [r5, #0x18] - bl ov12_02226870 - str r0, [r5, #0x3c] - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - b _0222EF7A -_0222EF52: - ldr r0, [r5, #0x3c] - bl ov12_02226848 - cmp r0, #0 - bne _0222EF7A - ldr r0, [r5, #0x20] - bl sub_0200D330 - ldr r0, [r5, #0x3c] - bl ov12_02226858 - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 - add sp, #0x1c - pop {r4, r5, pc} -_0222EF7A: - ldr r0, [r5, #0x1c] - bl sub_0200D330 - ldr r0, [r5, #0x20] - bl sub_0200D330 - ldr r0, [r5, #0x24] - bl sub_0200D330 - ldr r0, [r5, #0xc] - bl sub_0200C7EC - add sp, #0x1c - pop {r4, r5, pc} - nop -_0222EF98: .word 0x3E4CCCCD -_0222EF9C: .word 0x9999999A -_0222EFA0: .word 0x3FC99999 -_0222EFA4: .word 0x04000052 -_0222EFA8: .word 0x0000FFFF -_0222EFAC: .word 0x0000044C - thumb_func_end ov12_0222EE50 - - thumb_func_start ov12_0222EFB0 -ov12_0222EFB0: ; 0x0222EFB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - mov r1, #0x40 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r0, [r4, #4] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x1c] - ldr r0, [r4, #4] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x20] - ldr r0, [r4, #4] - mov r1, #2 - bl ov12_022202C0 - str r0, [r4, #0x24] - mov r6, #0 - str r6, [r4, #0x28] - add r0, r5, #0 - sub r6, #0x20 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_02225964 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - mul r0, r6 - add r6, r0, #0 - mov r0, #0xfe - lsl r0, r0, #0x16 - str r0, [r4, #0x2c] - str r0, [r4, #0x30] - add r0, r5, #0 - mov r1, #1 - bl ov12_022234A8 - cmp r0, #1 - bne _0222F01A - mov r1, #0 - mvn r1, r1 - b _0222F01C -_0222F01A: - mov r1, #1 -_0222F01C: - add r0, r4, #0 - add r0, #0x36 - strb r1, [r0] - add r1, sp, #0x24 - ldr r0, [r4, #0x20] - add r1, #2 - add r2, sp, #0x24 - bl sub_0200D550 - add r2, sp, #0x24 - mov r1, #2 - ldrsh r1, [r2, r1] - mov r3, #0 - ldrsh r2, [r2, r3] - add r1, r1, r6 - lsl r1, r1, #0x10 - ldr r0, [r4, #0x1c] - asr r1, r1, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #0x1c] - mov r1, #2 - bl sub_0200D6A4 - mov r0, #0x36 - ldrsb r0, [r4, r0] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, [r4, #0x2c] - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [r4, #0x1c] - ldr r2, [r4, #0x30] - bl sub_0200D6E8 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - lsl r3, r6, #0x14 - str r2, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r2, [sp, #0xc] - mov r0, #0xf - str r0, [sp, #0x10] - ldr r0, _0222F1F8 ; =0x0000FFFF - mov r2, #2 - str r0, [sp, #0x14] - ldr r0, _0222F1FC ; =0x0000044C - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - ldr r0, [r4, #0x18] - bl ov12_02226870 - str r0, [r4, #0x38] - ldr r0, [r4, #0x24] - ldr r0, [r0, #0] - bl sub_02021F9C - mov r1, #1 - bl sub_0201FAB4 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDE4 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - lsl r3, r6, #0x14 - str r2, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r2, [sp, #0xc] - mov r0, #0xf - str r0, [sp, #0x10] - ldr r0, _0222F1F8 ; =0x0000FFFF - mov r2, #2 - str r0, [sp, #0x14] - ldr r0, _0222F1FC ; =0x0000044C - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - ldr r0, [r4, #0x18] - bl ov12_02226870 - str r0, [r4, #0x3c] - ldr r0, [r4, #4] - bl ov12_02220240 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_02235254 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldr r0, [r4, #4] - bl ov12_0221FDD4 - add r1, r0, #0 - add r0, r5, #0 - add r2, sp, #0x2c - bl ov12_02235350 - add r2, sp, #0x28 - ldr r0, [r4, #0x1c] - add r1, sp, #0x28 - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #3 - bne _0222F138 - ldr r0, [r4, #0x1c] - mov r1, #1 - mov r5, #0 - bl sub_0200D460 - ldr r0, [r4, #0x1c] - add r1, r5, #0 - bl sub_0200D474 - b _0222F14A -_0222F138: - ldr r0, [r4, #0x1c] - mov r1, #2 - bl sub_0200D460 - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_0200D474 - mov r5, #2 -_0222F14A: - ldr r0, [r4, #4] - bl ov12_02220248 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_022232D0 - add r7, r0, #0 - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_022232C4 - str r0, [sp, #0x1c] - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_022232E0 - str r0, [sp, #0x20] - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_022232EC - ldr r1, [sp, #0x1c] - ldr r3, [sp, #0x20] - str r0, [sp] - lsl r0, r7, #0x10 - lsl r1, r1, #0x18 - lsl r2, r5, #0x18 - lsl r3, r3, #0x18 - lsr r0, r0, #0x10 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_02076648 - add r2, r0, #0 - add r5, sp, #0x24 - mov r3, #0xa - ldrsh r3, [r5, r3] - mov r1, #4 - ldrsh r1, [r5, r1] - add r2, r3, r2 - lsl r2, r2, #0x10 - ldr r0, [r4, #0x1c] - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_0200D3F4 - add r0, r4, #0 - mov r1, #0 - add r0, #0x34 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0xf - add r0, #0x35 - strb r1, [r0] - sub r1, #0x10 - ldr r0, [r4, #4] - add r2, r1, #0 - bl ov12_02235780 - add r0, r4, #0 - add r0, #0x34 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - add r2, r4, #0 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0222F200 ; =0x04000052 - strh r1, [r0] - ldr r0, [r4, #4] - ldr r1, _0222F204 ; =ov12_0222EE50 - bl ov12_022201E8 - add r1, r4, #0 - bl ov12_0222EE50 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222F1F8: .word 0x0000FFFF -_0222F1FC: .word 0x0000044C -_0222F200: .word 0x04000052 -_0222F204: .word ov12_0222EE50 - thumb_func_end ov12_0222EFB0 - - thumb_func_start ov12_0222F208 -ov12_0222F208: ; 0x0222F208 - push {r3, r4, r5, lr} - sub sp, #0x58 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0222F21C - cmp r0, #1 - beq _0222F262 - b _0222F2DC -_0222F21C: - ldr r0, [r4, #0x68] - mov r1, #0x20 - lsl r0, r0, #2 - add r2, r4, r0 - ldr r0, [r2, #0x78] - lsl r0, r0, #0x10 - asr r3, r0, #0x10 - str r3, [sp] - mov r0, #0xf - str r0, [sp, #4] - ldr r2, [r2, #0x6c] - add r0, r4, #0 - lsl r2, r2, #0x10 - ldrsh r1, [r4, r1] - add r0, #0x30 - asr r2, r2, #0x10 - bl ov12_02225BC8 - ldr r2, [r4, #0x68] - ldr r0, [r4, #0x24] - lsl r2, r2, #2 - add r2, r4, r2 - add r2, #0x84 - ldr r2, [r2, #0] - mov r1, #2 - bl sub_02007DEC - ldr r0, [r4, #0x24] - mov r1, #0x2c - mov r2, #1 - bl sub_02007DEC - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_0222F262: - add r0, r4, #0 - add r0, #0x30 - bl ov12_02225C14 - cmp r0, #0 - bne _0222F2C0 - ldr r0, [r4, #0x68] - add r0, r0, #1 - str r0, [r4, #0x68] - cmp r0, #2 - ble _0222F280 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _0222F2B6 -_0222F280: - ldr r0, [r4, #0x58] - cmp r0, #0 - bne _0222F2B2 - ldr r0, [r4, #4] - add r1, sp, #8 - mov r2, #3 - bl ov12_02220590 - ldr r0, [r4, #0x68] - cmp r0, #2 - ldr r0, [r4, #4] - bne _0222F2A6 - bl ov12_0221FDE4 - add r1, r0, #0 - add r0, sp, #8 - bl ov12_022382BC - b _0222F2B2 -_0222F2A6: - bl ov12_0221FDE4 - add r1, r0, #0 - add r0, sp, #8 - bl ov12_022380CC -_0222F2B2: - mov r0, #0 - strb r0, [r4] -_0222F2B6: - ldr r0, [r4, #0x24] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x20] -_0222F2C0: - mov r2, #0x30 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x24] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x32 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_02007DEC - add sp, #0x58 - pop {r3, r4, r5, pc} -_0222F2DC: - ldr r0, [r4, #0x24] - mov r1, #0x2c - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x58 - pop {r3, r4, r5, pc} - thumb_func_end ov12_0222F208 - - thumb_func_start ov12_0222F2F8 -ov12_0222F2F8: ; 0x0222F2F8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0x90 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223595C - ldr r0, [r4, #4] - bl ov12_02220240 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - add r2, r4, #0 - ldr r0, [r4, #4] - add r2, #0x5c - bl ov12_022353AC - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - add r2, r4, #0 - ldr r0, [r4, #4] - add r2, #0x60 - bl ov12_022353AC - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #3 - bne _0222F34A - mov r1, #1 - b _0222F34E -_0222F34A: - mov r1, #0 - mvn r1, r1 -_0222F34E: - add r0, r4, #0 - add r0, #0x54 - strh r1, [r0] - ldr r0, [r4, #4] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_0223525C - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_0223525C - cmp r6, r0 - bne _0222F37A - mov r0, #1 - b _0222F37C -_0222F37A: - mov r0, #0 -_0222F37C: - str r0, [r4, #0x58] - mov r1, #0 - add r0, r5, #0 - str r1, [r4, #0x68] - bl ov12_02220280 - add r2, r4, #0 - add r1, r0, #0 - add r0, r5, #0 - add r2, #0x1c - add r3, sp, #0 - bl ov12_02235998 - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_020080C0 - mov r1, #0x5e - ldrsh r2, [r4, r1] - mov r3, #0x54 - sub r0, r0, r2 - ldrsh r2, [r4, r3] - cmp r2, #0 - ble _0222F3EE - add r2, r3, #0 - add r2, #0xfb - str r2, [r4, #0x6c] - sub r3, #0xa4 - str r3, [r4, #0x70] - mov r2, #0x5c - ldrsh r2, [r4, r2] - str r2, [r4, #0x74] - ldrsh r2, [r4, r1] - add r2, r2, r0 - str r2, [r4, #0x78] - mov r2, #0x62 - ldrsh r2, [r4, r2] - add r2, r2, r0 - str r2, [r4, #0x7c] - ldrsh r1, [r4, r1] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0xa - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0222F444 ; =0xFFFFFD76 - add r0, #0x88 - str r1, [r0, #0] - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_020080C0 - b _0222F42E -_0222F3EE: - add r2, r3, #0 - sub r2, #0xa4 - str r2, [r4, #0x6c] - add r3, #0xfb - str r3, [r4, #0x70] - mov r2, #0x5c - ldrsh r2, [r4, r2] - str r2, [r4, #0x74] - ldrsh r2, [r4, r1] - add r2, r2, r0 - str r2, [r4, #0x78] - mov r2, #0x62 - ldrsh r2, [r4, r2] - add r2, r2, r0 - str r2, [r4, #0x7c] - ldrsh r1, [r4, r1] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0222F444 ; =0xFFFFFD76 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0xa - add r0, #0x88 - str r1, [r0, #0] - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_020080C0 -_0222F42E: - add r1, r4, #0 - add r1, #0x8c - str r0, [r1, #0] - ldr r0, [r4, #4] - ldr r1, _0222F448 ; =ov12_0222F208 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0222F444: .word 0xFFFFFD76 -_0222F448: .word ov12_0222F208 - thumb_func_end ov12_0222F2F8 - - thumb_func_start ov12_0222F44C -ov12_0222F44C: ; 0x0222F44C - push {r3, r4, lr} - sub sp, #4 - add r4, r2, #0 - ldr r2, [sp, #0x10] - str r2, [sp] - mov r2, #0x50 - sub r2, r2, r3 - add r3, r4, #0 - bl sub_020086D4 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_0222F44C - - thumb_func_start ov12_0222F464 -ov12_0222F464: ; 0x0222F464 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #3 - bls _0222F478 - b _0222F59A -_0222F478: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222F484: ; jump table - .short _0222F48C - _0222F484 - 2 ; case 0 - .short _0222F4E8 - _0222F484 - 2 ; case 1 - .short _0222F52A - _0222F484 - 2 ; case 2 - .short _0222F580 - _0222F484 - 2 ; case 3 -_0222F48C: - ldr r2, [r4, #0x10] - add r2, #0x4f - str r2, [r4, #0x10] - cmp r2, #0x50 - blt _0222F4B4 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add sp, #4 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] - ldr r1, [r4, #0x14] - mov r0, #1 - eor r0, r1 - str r0, [r4, #0x14] - mov r0, #0 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, pc} -_0222F4B4: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _0222F4D0 - mov r0, #2 - str r0, [sp] - ldr r3, [r4, #0] - ldr r0, [r4, #0x1c] - add r3, r3, #2 - mov r1, #0 - lsl r3, r3, #1 - bl ov12_0222F44C - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222F4D0: - mov r0, #2 - str r0, [sp] - ldr r3, [r4, #0] - mov r1, #0x50 - add r3, r3, #2 - ldr r0, [r4, #0x1c] - sub r1, r1, r2 - lsl r3, r3, #1 - bl ov12_0222F44C - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222F4E8: - ldr r0, [r4, #4] - mov r3, #0xff - sub r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0xc] - lsl r3, r3, #8 - add r2, r0, #1 - str r2, [r4, #0xc] - ldr r6, [r4, #8] - ldr r1, [r4, #4] - lsl r0, r6, #8 - add r5, r0, #0 - add r6, #0x50 - lsl r0, r6, #0x18 - and r5, r3 - lsr r0, r0, #0x18 - lsl r1, r1, #8 - orr r5, r0 - ldr r0, _0222F5E4 ; =0x04000040 - and r3, r1 - lsl r1, r2, #0x18 - lsr r1, r1, #0x18 - strh r5, [r0] - orr r1, r3 - strh r1, [r0, #4] - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222F52A: - ldr r0, [r4, #4] - mov r3, #0xff - sub r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0xc] - lsl r3, r3, #8 - add r2, r0, #1 - str r2, [r4, #0xc] - ldr r6, [r4, #8] - ldr r1, [r4, #4] - lsl r0, r6, #8 - add r5, r0, #0 - add r6, #0x50 - lsl r0, r6, #0x18 - and r5, r3 - lsr r0, r0, #0x18 - lsl r1, r1, #8 - orr r5, r0 - ldr r0, _0222F5E4 ; =0x04000040 - and r3, r1 - lsl r1, r2, #0x18 - lsr r1, r1, #0x18 - strh r5, [r0] - orr r1, r3 - strh r1, [r0, #4] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - cmp r0, #0x26 - ble _0222F576 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222F576: - mov r0, #0 - add r4, #0x20 - add sp, #4 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222F580: - ldr r0, [r4, #0x1c] - mov r1, #0xe - mov r2, #0 - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #4 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0222F59A: - mov r0, #1 - lsl r0, r0, #0x1a - ldr r3, [r0, #0] - ldr r1, _0222F5E8 ; =0xFFFF1FFF - and r1, r3 - add r3, r0, #0 - str r1, [r0, #0] - add r3, #0x48 - ldrh r5, [r3] - mov r1, #0x3f - bic r5, r1 - strh r5, [r3] - add r3, r0, #0 - add r3, #0x4a - ldrh r5, [r3] - bic r5, r1 - add r1, r0, #0 - strh r5, [r3] - mov r3, #0 - add r1, #0x40 - strh r3, [r1] - add r0, #0x44 - strh r3, [r0] - ldr r0, [r4, #0x24] - add r1, r2, #0 - bl ov12_02220220 - ldr r0, [r4, #0x1c] - ldr r2, [r4, #0x18] - mov r1, #0x17 - bl sub_02007DEC - add r0, r4, #0 - bl sub_020181C4 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0222F5E4: .word 0x04000040 -_0222F5E8: .word 0xFFFF1FFF - thumb_func_end ov12_0222F464 - - thumb_func_start ov12_0222F5EC -ov12_0222F5EC: ; 0x0222F5EC - push {r4, r5, r6, lr} - mov r1, #0x50 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x20 - bl ov12_0223595C - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_022232FC - str r0, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_02235254 - cmp r0, #3 - beq _0222F62C - cmp r0, #4 - bne _0222F640 -_0222F62C: - add r0, r5, #0 - bl ov12_0222339C - add r1, r0, #0 - sub r1, r1, #1 - lsl r1, r1, #0x18 - mov r0, #2 - lsr r1, r1, #0x18 - bl sub_02019060 -_0222F640: - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0x1c] - mov r1, #0x29 - bl sub_020080C0 - sub r0, r5, r0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0x1c] - mov r1, #0x17 - bl sub_020080C0 - str r0, [r4, #0x18] - ldr r0, [r4, #0x1c] - mov r1, #0x17 - mov r2, #8 - bl sub_02007DEC - sub r6, #0x28 - str r6, [r4, #8] - add r5, #0x28 - mov r6, #1 - lsl r6, r6, #0x1a - add r3, r6, #0 - str r5, [r4, #4] - mov r1, #0 - str r1, [r4, #0x10] - ldr r0, [r4, #4] - add r3, #0x48 - str r0, [r4, #0xc] - str r1, [r4, #0x14] - ldr r1, [r6, #0] - ldr r0, _0222F6F8 ; =0xFFFF1FFF - and r1, r0 - lsr r0, r6, #0xd - orr r0, r1 - str r0, [r6, #0] - ldrh r2, [r3] - mov r1, #0x3f - mov r0, #0x1f - bic r2, r1 - orr r0, r2 - mov r2, #0x20 - orr r0, r2 - strh r0, [r3] - add r3, r6, #0 - add r3, #0x4a - ldrh r5, [r3] - mov r0, #0x1b - bic r5, r1 - orr r0, r5 - orr r0, r2 - strh r0, [r3] - ldr r2, [r4, #8] - mov r0, #0xff - lsl r1, r2, #8 - add r2, #0x50 - lsl r0, r0, #8 - lsl r2, r2, #0x18 - and r1, r0 - lsr r2, r2, #0x18 - orr r2, r1 - add r1, r6, #0 - ldr r5, [r4, #0xc] - ldr r3, [r4, #4] - add r1, #0x40 - strh r2, [r1] - lsl r1, r3, #8 - and r1, r0 - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - orr r0, r1 - add r6, #0x44 - strh r0, [r6] - ldr r0, [r4, #0x24] - ldr r1, _0222F6FC ; =ov12_0222F464 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - nop -_0222F6F8: .word 0xFFFF1FFF -_0222F6FC: .word ov12_0222F464 - thumb_func_end ov12_0222F5EC - - thumb_func_start ov12_0222F700 -ov12_0222F700: ; 0x0222F700 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - mov r1, #0xe8 - mov r2, #0xea - add r5, r0, #0 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #8] - add r0, #0xc - bl ov12_02225BA0 - str r0, [sp] - add r0, r4, #0 - add r0, #0x38 - bl ov12_02226274 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_0200C7EC - mov r1, #0 - add r2, sp, #0 -_0222F734: - ldr r0, [r2, #0] - cmp r0, #1 - beq _0222F76A - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #3 - blt _0222F734 - mov r2, #0xe8 - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02007DEC - mov r2, #0xea - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #1 - sub r2, #8 - bl sub_02007DEC - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222F76A: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222F700 - - thumb_func_start ov12_0222F770 -ov12_0222F770: ; 0x0222F770 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0xf0 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #4] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #8] - bl sub_020080C0 - add r1, r4, #0 - add r1, #0xe8 - strh r0, [r1] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0xea - strh r0, [r1] - ldr r0, [r4, #8] - mov r1, #0x29 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0xec - strh r0, [r1] - mov r0, #0xea - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xea - add r1, #8 - strh r1, [r0] - add r0, r4, #0 - add r0, #0xc - mov r1, #1 - mov r2, #8 - bl ov12_022263A4 - add r0, sp, #0x20 - mov r1, #1 - mov r2, #0xa - bl ov12_022263A4 - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - ldr r1, [r4, #0x18] - mov r6, #0 - add r2, r1, #0 - mul r2, r0 - str r2, [r4, #0x18] - ldr r1, [sp, #0x2c] - add r5, r4, #0 - mul r0, r1 - str r0, [sp, #0x2c] - mov r7, #0x64 -_0222F808: - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov12_022202C0 - str r0, [r5, #0x30] - add r1, r7, #0 - bl sub_0200D474 - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D810 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _0222F808 - mov r0, #0xea - ldrsh r1, [r4, r0] - mov r0, #0xec - ldrsh r0, [r4, r0] - mov r3, #0xe8 - ldr r2, _0222F880 ; =ov12_02225AE0 - sub r0, r1, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0x30] - str r0, [sp, #0x10] - ldr r0, [r4, #0x34] - str r0, [sp, #0x14] - str r1, [sp, #0x18] - str r1, [sp, #0x1c] - add r0, r4, #0 - ldrsh r3, [r4, r3] - add r0, #0x38 - add r1, sp, #0x20 - bl ov12_022261C4 - mov r1, #0 - mvn r1, r1 - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov12_02235780 - ldr r0, [r4, #0] - ldr r1, _0222F884 ; =ov12_0222F700 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222F880: .word ov12_02225AE0 -_0222F884: .word ov12_0222F700 - thumb_func_end ov12_0222F770 - - thumb_func_start ov12_0222F888 -ov12_0222F888: ; 0x0222F888 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #6 - bls _0222F898 - b _0222F9DE -_0222F898: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222F8A4: ; jump table - .short _0222F8B2 - _0222F8A4 - 2 ; case 0 - .short _0222F8F4 - _0222F8A4 - 2 ; case 1 - .short _0222F92A - _0222F8A4 - 2 ; case 2 - .short _0222F942 - _0222F8A4 - 2 ; case 3 - .short _0222F972 - _0222F8A4 - 2 ; case 4 - .short _0222F98A - _0222F8A4 - 2 ; case 5 - .short _0222F9AE - _0222F8A4 - 2 ; case 6 -_0222F8B2: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225C14 - cmp r0, #0 - beq _0222F8D4 - mov r2, #0x48 - mov r3, #0x4a - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_02225A18 - add sp, #8 - pop {r3, r4, r5, pc} -_0222F8D4: - mov r2, #0 - str r2, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0x10 - add r0, r4, #0 - ldrsh r1, [r4, r1] - add r0, #0x10 - add r3, r2, #0 - bl ov12_02225BC8 - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0222F8F4: - add r0, r4, #0 - add r0, #0x34 - bl ov12_02225DA0 - cmp r0, #0 - beq _0222F90E - ldr r0, [r4, #0xc] - ldr r2, [r4, #0x34] - mov r1, #9 - bl sub_02007DEC - add sp, #8 - pop {r3, r4, r5, pc} -_0222F90E: - add r0, r4, #0 - ldr r1, [r4, #0x34] - add r0, #0x34 - mov r2, #0 - mov r3, #4 - bl ov12_02225D50 - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #2 - strh r0, [r4, #8] - pop {r3, r4, r5, pc} -_0222F92A: - mov r0, #8 - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, #8] - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _0222F9DE - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0222F942: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225C14 - cmp r0, #0 - beq _0222F964 - mov r2, #0x48 - mov r3, #0x4a - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_02225A18 - add sp, #8 - pop {r3, r4, r5, pc} -_0222F964: - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0x20 - strh r0, [r4, #8] - pop {r3, r4, r5, pc} -_0222F972: - mov r0, #8 - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, #8] - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _0222F9DE - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0222F98A: - add r0, r4, #0 - add r0, #0x34 - bl ov12_02225DA0 - cmp r0, #0 - beq _0222F9A4 - ldr r0, [r4, #0xc] - ldr r2, [r4, #0x34] - mov r1, #9 - bl sub_02007DEC - add sp, #8 - pop {r3, r4, r5, pc} -_0222F9A4: - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0222F9AE: - mov r2, #0x48 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x4a - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0xc] - mov r1, #9 - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0222F9DE: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0222F888 - - thumb_func_start ov12_0222F9E4 -ov12_0222F9E4: ; 0x0222F9E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0xf0 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #0xc] - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x48 - strh r0, [r1] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x4a - strh r0, [r1] - mov r1, #0 - add r0, r4, #0 - str r1, [sp] - mov r2, #3 - str r2, [sp, #4] - add r0, #0x10 - sub r2, #0x23 - add r3, r1, #0 - bl ov12_02225BC8 - add r0, r4, #0 - ldr r2, _0222FAF4 ; =0x00000E38 - add r0, #0x34 - mov r1, #0 - mov r3, #8 - bl ov12_02225D50 - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - ldr r1, [r4, #0x18] - add r2, r1, #0 - mul r2, r0 - str r2, [r4, #0x18] - ldr r1, [r4, #0x3c] - mul r0, r1 - str r0, [r4, #0x3c] - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r6, #3 - bne _0222FAB2 - cmp r0, #3 - bne _0222FAB2 - mov r1, #0xa - add r2, r1, #0 - ldr r0, [r4, #0xc] - sub r2, #0x32 - bl sub_02007DEC - ldr r0, [r4, #0xc] - mov r1, #0xb - mov r2, #0x28 - bl sub_02007DEC - b _0222FAE6 -_0222FAB2: - cmp r6, #4 - bne _0222FAD0 - cmp r0, #4 - bne _0222FAD0 - ldr r0, [r4, #0xc] - mov r1, #0xa - mov r2, #0x28 - bl sub_02007DEC - ldr r0, [r4, #0xc] - mov r1, #0xb - mov r2, #0x28 - bl sub_02007DEC - b _0222FAE6 -_0222FAD0: - mov r2, #0x28 - ldr r0, [r4, #0xc] - mov r1, #0xa - mul r2, r7 - bl sub_02007DEC - ldr r0, [r4, #0xc] - mov r1, #0xb - mov r2, #0x28 - bl sub_02007DEC -_0222FAE6: - ldr r0, [r4, #0] - ldr r1, _0222FAF8 ; =ov12_0222F888 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222FAF4: .word 0x00000E38 -_0222FAF8: .word ov12_0222F888 - thumb_func_end ov12_0222F9E4 - - thumb_func_start ov12_0222FAFC -ov12_0222FAFC: ; 0x0222FAFC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r4, [sp, #0x10] - bl sub_0200CE6C - str r0, [r5, #0] - add r6, r4, #4 - add r3, r5, #4 - mov r2, #4 -_0222FB14: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0222FB14 - ldr r0, [r6, #0] - add r2, r5, #0 - str r0, [r3, #0] - add r3, r4, #0 - add r3, #0x28 - ldmia r3!, {r0, r1} - add r2, #0x28 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - mov r0, #0x3c - ldrsh r0, [r4, r0] - strh r0, [r5, #0x3c] - mov r0, #0x3e - ldrsh r0, [r4, r0] - strh r0, [r5, #0x3e] - mov r0, #0x40 - ldrsh r1, [r4, r0] - add r0, r5, #0 - add r0, #0x40 - strh r1, [r0] - ldr r0, [r4, #0x44] - mov r1, #0 - str r0, [r5, #0x44] - str r1, [r5, #0x48] - ldr r0, [r5, #0] - bl sub_0200D3F4 - ldr r0, [r5, #0] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_0200D460 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_0222FAFC - - thumb_func_start ov12_0222FB6C -ov12_0222FB6C: ; 0x0222FB6C - ldr r3, _0222FB74 ; =sub_0200D0F4 - ldr r0, [r0, #0] - bx r3 - nop -_0222FB74: .word sub_0200D0F4 - thumb_func_end ov12_0222FB6C - - thumb_func_start ov12_0222FB78 -ov12_0222FB78: ; 0x0222FB78 - ldr r3, _0222FB80 ; =sub_0200D3F4 - ldr r0, [r0, #0] - bx r3 - nop -_0222FB80: .word sub_0200D3F4 - thumb_func_end ov12_0222FB78 - - thumb_func_start ov12_0222FB84 -ov12_0222FB84: ; 0x0222FB84 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #0x48] - cmp r0, #0 - bne _0222FB96 - add sp, #0x10 - mov r0, #1 - pop {r4, pc} -_0222FB96: - ldr r0, [r4, #0x44] - cmp r0, #0 - beq _0222FBA6 - cmp r0, #1 - beq _0222FBA6 - cmp r0, #2 - beq _0222FC28 - b _0222FC2E -_0222FBA6: - add r0, r4, #4 - bl ov12_02225AE0 - cmp r0, #0 - beq _0222FBE6 - add r0, r4, #0 - add r0, #0x28 - bl ov12_02225E0C - mov r0, #0x3c - ldrsh r1, [r4, r0] - ldr r0, [r4, #0x28] - add r0, r1, r0 - str r0, [r4, #0x1c] - mov r1, #0x3e - ldrsh r2, [r4, r1] - mov r1, #4 - ldrsh r1, [r4, r1] - ldr r0, [r4, #0] - add r1, r2, r1 - mov r2, #0x40 - ldrsh r3, [r4, r2] - mov r2, #6 - ldrsh r2, [r4, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - b _0222FC2E -_0222FBE6: - ldr r0, [r4, #0x44] - cmp r0, #1 - bge _0222FC20 - cmp r0, #0 - bne _0222FC0E - ldr r1, [r4, #0xc] - ldr r2, _0222FC34 ; =0x00007FFF - lsl r1, r1, #0x10 - str r2, [sp] - ldr r0, [r4, #0x10] - lsr r1, r1, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #0x18] - add r3, r1, #0 - str r0, [sp, #8] - ldr r0, _0222FC38 ; =0x0000071C - str r0, [sp, #0xc] - add r0, r4, #4 - bl ov12_02225A8C -_0222FC0E: - ldr r0, [r4, #8] - ldr r2, _0222FC3C ; =0x0000FFFF - str r0, [sp] - add r0, r4, #0 - ldr r3, _0222FC40 ; =0xFFFFF000 - add r0, #0x28 - mov r1, #0 - bl ov12_02225DF4 -_0222FC20: - ldr r0, [r4, #0x44] - add r0, r0, #1 - str r0, [r4, #0x44] - b _0222FC2E -_0222FC28: - add sp, #0x10 - mov r0, #0 - pop {r4, pc} -_0222FC2E: - mov r0, #1 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0222FC34: .word 0x00007FFF -_0222FC38: .word 0x0000071C -_0222FC3C: .word 0x0000FFFF -_0222FC40: .word 0xFFFFF000 - thumb_func_end ov12_0222FB84 - - thumb_func_start ov12_0222FC44 -ov12_0222FC44: ; 0x0222FC44 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - cmp r0, #6 - bhi _0222FCB8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222FC60: ; jump table - .short _0222FC6E - _0222FC60 - 2 ; case 0 - .short _0222FC86 - _0222FC60 - 2 ; case 1 - .short _0222FCD2 - _0222FC60 - 2 ; case 2 - .short _0222FCE8 - _0222FC60 - 2 ; case 3 - .short _0222FD88 - _0222FC60 - 2 ; case 4 - .short _0222FDB2 - _0222FC60 - 2 ; case 5 - .short _0222FDF2 - _0222FC60 - 2 ; case 6 -_0222FC6E: - add r0, r4, #0 - add r0, #0xc - bl ov12_0222FB84 - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - b _0222FE1C -_0222FC86: - add r0, r4, #0 - add r0, #0xfc - ldr r1, [r0, #0] - add r0, r4, #0 - add r1, #0xa - add r0, #0xfc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xfc - ldr r0, [r0, #0] - mov r1, #0xa - bl sub_020E1F6C - mov r1, #0x1f - sub r1, r1, r0 - lsl r1, r1, #8 - orr r1, r0 - ldr r0, _0222FE24 ; =0x04000052 - strh r1, [r0] - add r0, r4, #0 - add r0, #0xfc - ldr r1, [r0, #0] - ldr r0, _0222FE28 ; =0x00000136 - cmp r1, r0 - bge _0222FCBA -_0222FCB8: - b _0222FE1C -_0222FCBA: - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_0200D810 - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - b _0222FE1C -_0222FCD2: - ldr r1, _0222FE2C ; =0x0000FFFF - ldr r0, _0222FE24 ; =0x04000052 - strh r1, [r0] - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - b _0222FE1C -_0222FCE8: - add r0, r4, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - cmp r0, #0 - bgt _0222FD2C - add r0, r4, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - mov r2, #0x4c - add r3, r0, #0 - mul r3, r2 - add r0, r4, r3 - mov r1, #1 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - mul r2, r0 - add r0, r4, r2 - ldr r0, [r0, #0x58] - bl sub_0200D3F4 - add r0, r4, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #8 - add r0, #0xf4 - str r1, [r0, #0] -_0222FD2C: - add r0, r4, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - cmp r0, #2 - bge _0222FD44 - add r0, r4, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xf4 - str r1, [r0, #0] -_0222FD44: - add r0, r4, #0 - add r0, #0xc - bl ov12_0222FB84 - add r5, r4, #0 - add r6, r0, #0 - mov r7, #0 - add r5, #0x58 -_0222FD54: - add r0, r5, #0 - bl ov12_0222FB84 - str r0, [sp] - cmp r0, #0 - bne _0222FD68 - add r0, r5, #0 - mov r1, #0 - bl ov12_0222FB78 -_0222FD68: - ldr r0, [sp] - add r7, r7, #1 - orr r6, r0 - add r5, #0x4c - cmp r7, #2 - blt _0222FD54 - cmp r6, #0 - bne _0222FE1C - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - b _0222FE1C -_0222FD88: - ldr r0, [r4, #0xc] - bl sub_0200D330 - ldr r0, [r4, #0xc] - ldr r0, [r0, #0] - bl sub_02021FD0 - cmp r0, #0 - bne _0222FE1C - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0200D810 - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - b _0222FE1C -_0222FDB2: - add r0, r4, #0 - add r0, #0xfc - ldr r1, [r0, #0] - add r0, r4, #0 - sub r1, #0xa - add r0, #0xfc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xfc - ldr r0, [r0, #0] - mov r1, #0xa - bl sub_020E1F6C - mov r1, #0x1f - sub r1, r1, r0 - lsl r1, r1, #8 - orr r1, r0 - ldr r0, _0222FE24 ; =0x04000052 - strh r1, [r0] - add r0, r4, #0 - add r0, #0xfc - ldr r0, [r0, #0] - cmp r0, #0 - bgt _0222FE1C - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - b _0222FE1C -_0222FDF2: - add r5, r4, #0 - mov r6, #0 - add r5, #0x58 -_0222FDF8: - add r0, r5, #0 - bl ov12_0222FB6C - add r6, r6, #1 - add r5, #0x4c - cmp r6, #2 - blt _0222FDF8 - ldr r0, [r4, #0xc] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_0222FE1C: - ldr r0, [r4, #8] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222FE24: .word 0x04000052 -_0222FE28: .word 0x00000136 -_0222FE2C: .word 0x0000FFFF - thumb_func_end ov12_0222FC44 - - thumb_func_start ov12_0222FE30 -ov12_0222FE30: ; 0x0222FE30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp, #0x10] - bl ov12_0221FDE4 - mov r1, #1 - lsl r1, r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - mov r1, #8 - add r0, #0xf4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - ldr r1, [sp, #0x10] - lsl r0, r0, #0x11 - str r1, [r4, #0xc] - mov r1, #0 - str r1, [r4, #0x50] - ldr r2, _0222FF68 ; =0x0000BFFF - neg r0, r0 - str r2, [sp] - str r0, [sp, #4] - ldr r1, _0222FF6C ; =0xFFFF8000 - ldr r0, _0222FF70 ; =0x0000071C - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - lsr r1, r1, #0x12 - add r0, #0x10 - add r3, r1, #0 - bl ov12_02225A8C - ldr r0, [r4, #0x14] - ldr r2, _0222FF74 ; =0x0000FFFF - str r0, [sp] - add r0, r4, #0 - ldr r3, _0222FF78 ; =0xFFFFF000 - add r0, #0x34 - mov r1, #0 - bl ov12_02225DF4 - add r0, r4, #0 - ldr r1, [r4, #0x28] - add r0, #0x48 - strh r1, [r0] - mov r0, #1 - str r0, [r4, #0x54] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov12_022258E0 - add r1, r4, #0 - add r1, #0x4a - strh r0, [r1] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - bl ov12_022258E0 - add r1, r4, #0 - add r1, #0x4c - strh r0, [r1] - mov r1, #0x4a - mov r2, #0x4c - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - bl sub_0200D4C4 - ldr r0, [r4, #0xc] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0200D460 - ldr r1, [r4, #0] - add r0, sp, #0x14 - bl ov12_0222329C - mov r0, #0x4a - ldrsh r0, [r4, r0] - add r1, sp, #0x14 - add r5, r4, #0 - strh r0, [r1] - mov r0, #0x4c - ldrsh r0, [r4, r0] - add r7, r4, #0 - mov r6, #0 - strh r0, [r1, #2] - add r5, #0x58 - add r7, #0xc -_0222FF16: - str r7, [sp] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - add r0, r5, #0 - add r3, sp, #0x14 - bl ov12_0222FAFC - add r6, r6, #1 - add r5, #0x4c - cmp r6, #2 - blt _0222FF16 - add r0, r4, #0 - mov r1, #0 - add r0, #0xfc - str r1, [r0, #0] - ldr r0, [r4, #0] - mov r2, #0x1f - bl ov12_02235780 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0200D810 - mov r6, #0 - add r5, r4, #0 - mov r7, #1 -_0222FF4A: - ldr r0, [r5, #0x58] - add r1, r7, #0 - bl sub_0200D810 - add r6, r6, #1 - add r5, #0x4c - cmp r6, #2 - blt _0222FF4A - ldr r0, [r4, #0] - ldr r1, _0222FF7C ; =ov12_0222FC44 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222FF68: .word 0x0000BFFF -_0222FF6C: .word 0xFFFF8000 -_0222FF70: .word 0x0000071C -_0222FF74: .word 0x0000FFFF -_0222FF78: .word 0xFFFFF000 -_0222FF7C: .word ov12_0222FC44 - thumb_func_end ov12_0222FE30 - - thumb_func_start ov12_0222FF80 -ov12_0222FF80: ; 0x0222FF80 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r2, #0x60 - ldrsh r3, [r4, r2] - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x5c] - mov r1, #0 - add r2, r3, r2 - bl sub_02007DEC - mov r2, #0x62 - ldrsh r3, [r4, r2] - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x5c] - mov r1, #1 - add r2, r3, r2 - bl sub_02007DEC - mov r1, #0x60 - ldrsh r2, [r4, r1] - mov r1, #0x10 - ldrsh r1, [r4, r1] - ldr r0, [r4, #0x58] - add r1, r2, r1 - mov r2, #0x62 - ldrsh r3, [r4, r2] - mov r2, #0x12 - ldrsh r2, [r4, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r3, r3, r2 - mov r2, #0x66 - ldrsh r2, [r4, r2] - sub r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add r0, r4, #0 - add r0, #0x34 - add r1, sp, #4 - add r2, sp, #0 - bl ov12_02225FA4 - mov r0, #0x64 - ldrsh r0, [r4, r0] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, _02230014 ; =0x3DCCCCCD - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [sp, #4] - bl sub_020E0B00 - add r1, r0, #0 - str r1, [sp, #4] - ldr r0, [r4, #0x58] - ldr r2, [sp] - bl sub_0200D6E8 - mov r0, #0x64 - ldrsh r1, [r4, r0] - sub r0, #0x65 - add r4, #0x64 - mul r0, r1 - strh r0, [r4] - add sp, #8 - pop {r4, pc} - nop -_02230014: .word 0x3DCCCCCD - thumb_func_end ov12_0222FF80 - - thumb_func_start ov12_02230018 -ov12_02230018: ; 0x02230018 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02230030 - cmp r0, #1 - beq _0223006A - cmp r0, #2 - beq _022300A6 - b _022300B8 -_02230030: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02226138 - add r0, r4, #0 - add r0, #0x34 - bl ov12_02225F6C - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0222FF80 - cmp r5, #0 - bne _022300B8 - mov r2, #0xa - str r2, [sp] - str r2, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x34 - mov r1, #0xc - mov r3, #0xf - bl ov12_02225EF0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022300B8 -_0223006A: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02226138 - add r0, r4, #0 - add r0, #0x34 - bl ov12_02225F6C - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0222FF80 - cmp r5, #0 - bne _022300B8 - mov r2, #0x60 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x5c] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x62 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022300B8 -_022300A6: - ldr r0, [r4, #0] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, pc} -_022300B8: - ldr r0, [r4, #4] - bl sub_0200C7EC - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02230018 - - thumb_func_start ov12_022300C4 -ov12_022300C4: ; 0x022300C4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x68 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #8] - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #0x5c] - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x60 - strh r0, [r1] - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x62 - strh r0, [r1] - ldr r0, [r4, #0x5c] - mov r1, #0x29 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x66 - strh r0, [r1] - mov r0, #6 - str r0, [sp] - add r0, r4, #0 - add r0, #0x10 - mov r1, #2 - mov r2, #0 - mov r3, #1 - bl ov12_02226108 - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x58] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x58] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x58] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x58] - mov r1, #1 - bl sub_0200D460 - mov r0, #0xf - str r0, [sp] - mov r1, #0xa - str r1, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x34 - mov r2, #0xc - add r3, r1, #0 - bl ov12_02225EF0 - add r0, r4, #0 - mov r1, #1 - add r0, #0x64 - strh r1, [r0] - ldr r0, [r4, #0] - mov r1, #0x1c - mov r2, #0xf - bl ov12_02235780 - ldr r0, [r4, #0] - ldr r1, _02230190 ; =ov12_02230018 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02230190: .word ov12_02230018 - thumb_func_end ov12_022300C4 - - thumb_func_start ov12_02230194 -ov12_02230194: ; 0x02230194 - mov r2, #0x12 - ldrsh r2, [r0, r2] - mov r3, #0x10 - ldrsh r0, [r0, r3] - neg r2, r2 - lsl r2, r2, #0x10 - neg r0, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - orr r0, r2 - mov r2, #3 - ldr r3, _022301B0 ; =sub_020C4B4C - lsl r2, r2, #8 - bx r3 - ; .align 2, 0 -_022301B0: .word sub_020C4B4C - thumb_func_end ov12_02230194 - - thumb_func_start ov12_022301B4 -ov12_022301B4: ; 0x022301B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x18] - bl ov12_022266C0 - str r0, [sp, #0xc] - ldr r1, [sp, #0xc] - add r0, r5, #0 - bl ov12_02230194 - add r0, r5, #0 - add r0, #0x1c - bl ov12_02225C14 - str r0, [sp, #8] - mov r0, #0x14 - ldrsh r4, [r5, r0] - mov r0, #0x16 - ldrsh r0, [r5, r0] - cmp r4, r0 - bgt _02230254 - ldr r1, [sp, #0xc] - lsl r2, r4, #2 - add r1, r1, r2 - str r1, [sp] -_022301E8: - ldr r1, [sp] - sub r0, r0, r4 - ldr r2, [r1, #0] - lsl r1, r2, #0x10 - asr r1, r1, #0x10 - str r1, [sp, #4] - lsr r1, r2, #0x10 - lsl r1, r1, #0x10 - asr r7, r1, #0x10 - mov r1, #0x1e - ldrsh r1, [r5, r1] - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - sub r0, r7, r0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - mov r0, #0x1c - ldrsh r1, [r5, r0] - mov r0, #0x14 - ldrsh r0, [r5, r0] - add r0, #0x28 - sub r0, r0, r4 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [sp, #4] - sub r0, r1, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - sub r6, r4, #1 - bpl _02230230 - add r6, #0xc0 -_02230230: - ldr r0, [sp, #4] - lsl r1, r7, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - bl ov12_022266E8 - ldr r1, [sp, #0xc] - lsl r2, r6, #2 - str r0, [r1, r2] - ldr r0, [sp] - add r4, r4, #1 - add r0, r0, #4 - str r0, [sp] - mov r0, #0x16 - ldrsh r0, [r5, r0] - cmp r4, r0 - ble _022301E8 -_02230254: - ldr r0, [sp, #8] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022301B4 - - thumb_func_start ov12_0223025C -ov12_0223025C: ; 0x0223025C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #4] - cmp r0, #4 - bhi _022302C4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02230276: ; jump table - .short _02230280 - _02230276 - 2 ; case 0 - .short _022302B2 - _02230276 - 2 ; case 1 - .short _022302DA - _02230276 - 2 ; case 2 - .short _0223032A - _02230276 - 2 ; case 3 - .short _0223034A - _02230276 - 2 ; case 4 -_02230280: - add r0, r4, #0 - bl ov12_022301B4 - cmp r0, #0 - bne _022302C4 - ldr r0, [r4, #4] - mov r1, #0x1f - add r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0] - mov r2, #0 - bl ov12_022357EC - mov r1, #0x1f - mov r2, #0 - str r1, [sp] - mov r0, #0x10 - add r4, #0x40 - str r0, [sp, #4] - add r0, r4, #0 - add r3, r2, #0 - bl ov12_02226424 - add sp, #8 - pop {r4, r5, r6, pc} -_022302B2: - add r0, r4, #0 - bl ov12_022301B4 - add r0, r4, #0 - add r0, #0x40 - bl ov12_02226454 - cmp r0, #0 - bne _022302C6 -_022302C4: - b _022303CC -_022302C6: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0x18] - bl ov12_022266D4 - mov r0, #0 - add sp, #8 - str r0, [r4, #8] - pop {r4, r5, r6, pc} -_022302DA: - ldr r0, [r4, #0] - bl ov12_02220278 - mov r3, #0x10 - ldrsh r3, [r4, r3] - mov r1, #2 - mov r2, #0 - neg r3, r3 - bl sub_02019184 - ldr r0, [r4, #0] - bl ov12_02220278 - mov r3, #0x12 - ldrsh r3, [r4, r3] - mov r1, #2 - mov r2, #3 - neg r3, r3 - bl sub_02019184 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #8 - ble _022303CC - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1f - add r0, #0x40 - add r3, r2, #0 - bl ov12_02226424 - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, r6, pc} -_0223032A: - add r0, r4, #0 - add r0, #0x40 - bl ov12_02226454 - cmp r0, #0 - beq _022303CC - ldr r0, [r4, #0xc] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, r6, pc} -_0223034A: - ldr r0, [r4, #0x18] - bl ov12_0222669C - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_02223428 - add r1, r0, #0 - lsl r0, r5, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - lsl r1, r1, #0x18 - mov r0, #0 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_0221FDE4 - add r3, r0, #0 - lsl r0, r5, #0x18 - mov r1, #1 - lsr r0, r0, #0x18 - lsl r1, r1, #0xe - mov r2, #0 - bl sub_02019690 - ldr r0, [r4, #0] - bl ov12_02220278 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r1, r0, #0 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019EBC - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_022303CC: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov12_0223025C - - thumb_func_start ov12_022303D0 -ov12_022303D0: ; 0x022303D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x68 - bl sub_02018144 - mov r1, #0 - mov r2, #0x68 - add r4, r0, #0 - bl sub_020D5124 - ldr r1, _02230538 ; =ov12_0223025C - str r5, [r4, #0] - add r0, r5, #0 - add r2, r4, #0 - bl ov12_022201E8 - str r0, [sp, #0x14] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x10] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x12] - ldr r0, [r4, #0xc] - mov r1, #0x29 - bl sub_020080C0 - mov r1, #0x12 - ldrsh r2, [r4, r1] - sub r0, r2, r0 - strh r0, [r4, #0x12] - mov r0, #0x10 - ldrsh r0, [r4, r0] - mov r2, #1 - sub r0, #0x28 - strh r0, [r4, #0x10] - ldrsh r0, [r4, r1] - mov r1, #6 - sub r0, #0x28 - strh r0, [r4, #0x12] - ldr r0, [r4, #0xc] - bl sub_02007DEC - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - add r6, r0, #0 - mov r0, #0x12 - ldrsh r1, [r4, r0] - sub r1, #8 - strh r1, [r4, #0x14] - ldrsh r0, [r4, r0] - add r0, #0x58 - strh r0, [r4, #0x16] - mov r0, #0x14 - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _0223046C - mov r0, #0 - strh r0, [r4, #0x14] -_0223046C: - mov r0, #0x16 - ldrsh r0, [r4, r0] - cmp r0, #0xc0 - ble _02230478 - mov r0, #0xc0 - strh r0, [r4, #0x16] -_02230478: - add r0, r5, #0 - mov r1, #1 - bl ov12_022233EC - add r7, r0, #0 - ldr r0, [sp, #0x14] - bl sub_0201CED4 - str r0, [sp, #0x18] - ldrh r0, [r4, #0x10] - ldrh r1, [r4, #0x12] - bl ov12_022266E8 - str r0, [sp, #0x1c] - add r0, r5, #0 - bl ov12_0221FDE4 - mov r1, #0x50 - str r1, [sp] - ldr r1, [sp, #0x18] - str r7, [sp, #4] - add r1, r1, #1 - str r1, [sp, #8] - ldr r1, [sp, #0x1c] - ldr r2, _0223053C ; =0x0000038E - str r1, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0x14 - mov r1, #0x16 - ldrsh r0, [r4, r0] - ldrsh r1, [r4, r1] - lsl r3, r6, #0xf - lsl r0, r0, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl ov12_0222662C - str r0, [r4, #0x18] - mov r0, #0x28 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - add r0, #0x1c - mov r2, #0x50 - add r3, r1, #0 - bl ov12_02225BC8 - ldr r0, [r4, #0x24] - add r1, r0, #0 - mul r1, r6 - str r1, [r4, #0x24] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - sub r0, r0, #3 - cmp r0, #1 - bhi _0223052A - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - lsl r0, r5, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x18 - mov r0, #0 - lsr r1, r1, #0x18 - bl sub_02019060 -_0223052A: - ldr r0, [sp, #0x14] - add r1, r4, #0 - bl ov12_0223025C - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02230538: .word ov12_0223025C -_0223053C: .word 0x0000038E - thumb_func_end ov12_022303D0 - - thumb_func_start ov12_02230540 -ov12_02230540: ; 0x02230540 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bhi _022305F0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223055A: ; jump table - .short _02230562 - _0223055A - 2 ; case 0 - .short _02230588 - _0223055A - 2 ; case 1 - .short _0223059A - _0223055A - 2 ; case 2 - .short _022305DE - _0223055A - 2 ; case 3 -_02230562: - add r0, r4, #0 - add r0, #0x38 - bl ov12_02225DC8 - ldr r2, [r4, #0x38] - mov r1, #0x1f - sub r1, r1, r2 - lsl r1, r1, #8 - orr r2, r1 - ldr r1, _022305FC ; =0x04000052 - cmp r0, #0 - strh r2, [r1] - bne _022305F0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0xc] - b _022305F0 -_02230588: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0x20 - ble _022305F0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022305F0 -_0223059A: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x14 - add r1, sp, #4 - add r2, sp, #0 - bl ov12_02225FA4 - ldr r0, [r4, #0x4c] - cmp r0, #1 - bne _022305C0 - ldr r1, [sp, #4] - mov r0, #0 - bl sub_020E1A9C - str r0, [sp, #4] -_022305C0: - ldr r0, [r4, #0x10] - ldr r1, [sp, #4] - ldr r2, [sp] - bl sub_0200D6E8 - cmp r5, #0 - bne _022305F0 - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022305F0 -_022305DE: - ldr r0, [r4, #0] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, pc} -_022305F0: - ldr r0, [r4, #4] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - nop -_022305FC: .word 0x04000052 - thumb_func_end ov12_02230540 - - thumb_func_start ov12_02230600 -ov12_02230600: ; 0x02230600 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - add r2, r0, #0 - ldr r0, [r5, #4] - cmp r0, #0 - beq _0223061C - cmp r0, #1 - beq _022306A4 - cmp r0, #2 - bne _02230618 - b _02230742 -_02230618: - add sp, #0xc - pop {r4, r5, pc} -_0223061C: - add r0, r5, #0 - add r0, #0x14 - bl ov12_02226138 - mov r2, #0x38 - mov r3, #0x3a - add r0, r5, #0 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - ldr r1, [r5, #8] - add r0, #0x14 - bl ov12_02225A18 - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _02230656 - mov r3, #0x3a - ldrsh r4, [r5, r3] - ldr r3, [r5, #0x3c] - mov r2, #0x38 - sub r3, r4, r3 - add r0, r5, #0 - lsl r3, r3, #0x10 - ldrsh r2, [r5, r2] - ldr r1, [r5, #0xc] - add r0, #0x14 - asr r3, r3, #0x10 - bl ov12_022259DC -_02230656: - ldr r0, [r5, #8] - bl sub_020087B4 - cmp r0, #0 - bne _02230750 - mov r2, #0 - str r2, [sp] - ldr r0, [r5, #8] - mov r1, #0x10 - add r3, r2, #0 - bl sub_020086FC - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _0223069A - ldr r0, [r5, #0xc] - bl ov12_02225950 - mov r1, #1 - add r4, r1, #0 - lsl r4, r0 - ldr r0, [r5, #0] - bl ov12_0222332C - mov r1, #0x10 - str r1, [sp] - mov r3, #0 - lsl r2, r4, #0x10 - str r3, [sp, #4] - mov r1, #4 - lsr r2, r2, #0x10 - str r3, [sp, #8] - bl sub_02003178 -_0223069A: - ldr r0, [r5, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r5, #4] - pop {r4, r5, pc} -_022306A4: - add r0, r5, #0 - add r0, #0x14 - bl ov12_02226138 - mov r2, #0x38 - mov r3, #0x3a - add r0, r5, #0 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - ldr r1, [r5, #8] - add r0, #0x14 - bl ov12_02225A18 - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _022306DE - mov r3, #0x3a - ldrsh r4, [r5, r3] - ldr r3, [r5, #0x3c] - mov r2, #0x38 - sub r3, r4, r3 - add r0, r5, #0 - lsl r3, r3, #0x10 - ldrsh r2, [r5, r2] - ldr r1, [r5, #0xc] - add r0, #0x14 - asr r3, r3, #0x10 - bl ov12_022259DC -_022306DE: - ldr r0, [r5, #8] - bl sub_020087B4 - cmp r0, #0 - bne _02230750 - mov r2, #0x38 - ldrsh r2, [r5, r2] - ldr r0, [r5, #8] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x3a - ldrsh r2, [r5, r2] - ldr r0, [r5, #8] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _02230738 - ldr r0, [r5, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r5, #0] - bl ov12_0222337C - cmp r0, #0 - bne _02230722 - ldr r0, [r5, #8] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC -_02230722: - mov r2, #0x3a - ldrsh r3, [r5, r2] - ldr r2, [r5, #0x3c] - mov r1, #0x38 - sub r2, r3, r2 - lsl r2, r2, #0x10 - ldrsh r1, [r5, r1] - ldr r0, [r5, #0xc] - asr r2, r2, #0x10 - bl sub_0200D4C4 -_02230738: - ldr r0, [r5, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r5, #4] - pop {r4, r5, pc} -_02230742: - ldr r0, [r5, #0] - add r1, r2, #0 - bl ov12_02220220 - add r0, r5, #0 - bl sub_020181C4 -_02230750: - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov12_02230600 - - thumb_func_start ov12_02230754 -ov12_02230754: ; 0x02230754 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x50 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x50 - bl sub_020D5124 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #4] - add r0, r5, #0 - bl ov12_0221FDD4 - str r0, [r4, #0x4c] - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x10] - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - mov r2, #0xa - add r0, #0x14 - mov r1, #0xe - add r3, r2, #0 - bl ov12_02225E68 - add r0, r4, #0 - add r0, #0x38 - mov r1, #0 - mov r2, #0x10 - mov r3, #8 - bl ov12_02225D78 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x1f - bl ov12_02235780 - ldr r0, [r4, #0x10] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x4c] - cmp r0, #1 - ldr r0, [r4, #0x10] - bne _022307D4 - ldr r1, _022307F8 ; =0xBFB33333 - ldr r2, _022307FC ; =0x3FB33333 - bl sub_0200D6E8 - b _022307DC -_022307D4: - ldr r1, _022307FC ; =0x3FB33333 - add r2, r1, #0 - bl sub_0200D6E8 -_022307DC: - ldr r0, [r4, #0x10] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0] - ldr r1, _02230800 ; =ov12_02230540 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022307F8: .word 0xBFB33333 -_022307FC: .word 0x3FB33333 -_02230800: .word ov12_02230540 - thumb_func_end ov12_02230754 - - thumb_func_start ov12_02230804 -ov12_02230804: ; 0x02230804 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl ov12_0221FDE4 - mov r1, #0x40 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x40 - bl sub_020D5124 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x38] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x3a] - ldr r0, [r4, #8] - mov r1, #0x29 - bl sub_020080C0 - str r0, [r4, #0x3c] - mov r1, #4 - add r0, r4, #0 - str r1, [sp] - add r0, #0x14 - mov r2, #0 - mov r3, #1 - bl ov12_02226108 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - mov r1, #0x14 - ldrsh r1, [r4, r1] - mov r2, #0x10 - add r0, r1, r0 - mov r1, #0 - strh r0, [r4, #0x14] - str r1, [sp] - ldr r0, [r4, #8] - add r3, r1, #0 - bl sub_020086FC - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - cmp r5, #2 - bne _022308B0 - cmp r0, #4 - beq _022308B8 -_022308B0: - cmp r5, #5 - bne _022308FE - cmp r0, #3 - bne _022308FE -_022308B8: - ldr r0, [r4, #0xc] - bl ov12_02225950 - mov r1, #1 - add r5, r1, #0 - lsl r5, r0 - ldr r0, [r4, #0] - bl ov12_0222332C - mov r3, #0 - lsl r2, r5, #0x10 - str r3, [sp] - mov r1, #0x10 - str r1, [sp, #4] - mov r1, #4 - lsr r2, r2, #0x10 - str r3, [sp, #8] - bl sub_02003178 - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222337C - cmp r0, #0 - bne _022308FE - ldr r0, [r4, #8] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC -_022308FE: - ldr r0, [r4, #0] - ldr r1, _0223090C ; =ov12_02230600 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223090C: .word ov12_02230600 - thumb_func_end ov12_02230804 - - thumb_func_start ov12_02230910 -ov12_02230910: ; 0x02230910 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #8] - mov r5, #0 - cmp r0, #3 - bhi _0223098C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223092A: ; jump table - .short _02230932 - _0223092A - 2 ; case 0 - .short _0223094A - _0223092A - 2 ; case 1 - .short _02230970 - _0223092A - 2 ; case 2 - .short _0223098A - _0223092A - 2 ; case 3 -_02230932: - add r0, r4, #0 - add r0, #0x1c - bl ov12_02226454 - cmp r0, #1 - bne _0223098C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0x20 - str r0, [r4, #0x44] - b _0223098C -_0223094A: - ldr r0, [r4, #0x44] - sub r0, r0, #1 - str r0, [r4, #0x44] - bpl _0223098C - ldr r0, [r4, #8] - mov r1, #8 - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0x10 - str r0, [sp] - mov r0, #0x18 - add r4, #0x1c - str r0, [sp, #4] - add r0, r4, #0 - add r2, r5, #0 - add r3, r1, #0 - bl ov12_02226424 - b _0223098C -_02230970: - add r0, r4, #0 - add r0, #0x1c - bl ov12_02226454 - cmp r0, #1 - bne _0223098C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - ldr r0, [r4, #0x14] - bl ov12_0222669C - b _0223098C -_0223098A: - mov r5, #1 -_0223098C: - add r0, r5, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02230910 - - thumb_func_start ov12_02230994 -ov12_02230994: ; 0x02230994 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _022309AA - cmp r0, #1 - beq _022309DE - cmp r0, #2 - beq _022309F0 - pop {r4, r5, r6, pc} -_022309AA: - add r0, r4, #0 - bl ov12_02230910 - ldr r0, [r4, #0x48] - bl sub_0200D408 - cmp r0, #1 - bne _022309D6 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222337C - cmp r0, #0 - bne _022309D6 - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC -_022309D6: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, r6, pc} -_022309DE: - add r0, r4, #0 - bl ov12_02230910 - cmp r0, #0 - beq _02230A88 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, r6, pc} -_022309F0: - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_02223428 - add r1, r0, #0 - lsl r0, r5, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - lsl r1, r1, #0x18 - mov r0, #0 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222337C - cmp r0, #0 - bne _02230A3E - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC -_02230A3E: - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_0221FDE4 - add r3, r0, #0 - lsl r0, r5, #0x18 - mov r1, #1 - lsr r0, r0, #0x18 - lsl r1, r1, #0xe - mov r2, #0 - bl sub_02019690 - ldr r0, [r4, #0] - bl ov12_02220278 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r1, r0, #0 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019EBC - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02230A88: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02230994 - - thumb_func_start ov12_02230A8C -ov12_02230A8C: ; 0x02230A8C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - mov r1, #0x4c - add r7, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r7, [r4, #0] - add r0, r7, #0 - bl ov12_0222332C - str r0, [r4, #0x18] - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x10 - bl ov12_022357EC - mov r2, #8 - str r2, [sp] - mov r0, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x1c - mov r1, #0 - mov r3, #0x10 - bl ov12_02226424 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #0x10] - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0x10] - mov r1, #0x29 - bl sub_020080C0 - sub r0, r5, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - sub r0, #0x28 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x48] - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - cmp r0, #5 - beq _02230B1C - cmp r0, #2 - bne _02230B2E -_02230B1C: - ldr r0, [r4, #0x48] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x48] - mov r1, #2 - bl sub_0200D460 - b _02230B6A -_02230B2E: - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - str r0, [sp, #0x14] - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [sp, #0x14] - lsl r1, r1, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x18 - mov r0, #0 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0x48] - mov r1, #0 - bl sub_0200D3F4 -_02230B6A: - add r0, r7, #0 - mov r1, #1 - bl ov12_022233EC - neg r1, r5 - lsl r1, r1, #0x10 - sub r6, #0x28 - str r0, [sp, #0x18] - lsl r0, r6, #0x10 - asr r0, r0, #0x10 - neg r0, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - bl ov12_022266E8 - add r6, r0, #0 - add r0, r7, #0 - bl ov12_0221FDE4 - mov r1, #0x64 - str r1, [sp] - ldr r1, [sp, #0x18] - mov r3, #5 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - str r6, [sp, #0xc] - str r0, [sp, #0x10] - lsl r0, r5, #0x18 - add r5, #0x50 - lsl r1, r5, #0x18 - ldr r2, _02230BD8 ; =0x0000038E - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - lsl r3, r3, #0xc - bl ov12_0222662C - mov r2, #1 - str r0, [r4, #0x14] - mov r1, #0 - str r1, [sp] - ldr r0, [r4, #0x18] - lsl r2, r2, #8 - mov r3, #8 - bl sub_02003A2C - ldr r0, [r4, #0] - ldr r1, _02230BDC ; =ov12_02230994 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02230BD8: .word 0x0000038E -_02230BDC: .word ov12_02230994 - thumb_func_end ov12_02230A8C - - thumb_func_start ov12_02230BE0 -ov12_02230BE0: ; 0x02230BE0 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #3 - bhi _02230CE2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02230BFA: ; jump table - .short _02230C02 - _02230BFA - 2 ; case 0 - .short _02230C52 - _02230BFA - 2 ; case 1 - .short _02230C90 - _02230BFA - 2 ; case 2 - .short _02230CCA - _02230BFA - 2 ; case 3 -_02230C02: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - bne _02230C34 - add r0, r4, #0 - add r0, #0x14 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x54] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, [sp, #8] - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [r4, #0x10] - ldr r2, [sp, #4] - bl sub_0200D6E8 - b _02230CE2 -_02230C34: - ldr r0, [r4, #0xc] - mov r1, #0xa - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #5 - str r0, [r4, #0x4c] - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - add r0, #0x14 - add r2, r1, #0 - mov r3, #1 - bl ov12_02225E68 - b _02230CE2 -_02230C52: - add r0, r4, #0 - add r0, #0x38 - bl ov12_02225DA0 - ldr r1, [r4, #0x38] - add r5, r0, #0 - lsl r1, r1, #0x10 - ldr r0, [r4, #0x10] - lsr r1, r1, #0x10 - bl sub_0200D79C - cmp r5, #0 - bne _02230CE2 - ldr r0, [r4, #0x4c] - cmp r0, #0 - ble _02230C88 - sub r0, r0, #1 - str r0, [r4, #0x4c] - add r0, r4, #0 - ldr r1, [r4, #0x38] - ldr r2, [r4, #0x50] - add r0, #0x38 - mov r3, #4 - str r1, [r4, #0x50] - bl ov12_02225D50 - b _02230CE2 -_02230C88: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02230CE2 -_02230C90: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #1 - bne _02230CC2 - add r0, r4, #0 - add r0, #0x14 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x54] - bl sub_020E17B4 - add r1, r0, #0 - ldr r0, [sp, #8] - bl sub_020E18B0 - add r1, r0, #0 - ldr r0, [r4, #0x10] - ldr r2, [sp, #4] - bl sub_0200D6E8 - b _02230CE2 -_02230CC2: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02230CE2 -_02230CCA: - ldr r0, [r4, #0x10] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, pc} -_02230CE2: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov12_02230BE0 - - thumb_func_start ov12_02230CEC -ov12_02230CEC: ; 0x02230CEC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - mov r1, #0x58 - add r5, r0, #0 - add r7, r2, #0 - str r3, [sp, #4] - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - add r7, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_022234A8 - cmp r0, #1 - bne _02230D2C - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x54] - neg r6, r7 - b _02230D32 -_02230D2C: - mov r0, #1 - str r0, [r4, #0x54] - add r6, r7, #0 -_02230D32: - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0 - bl ov12_022258E0 - str r0, [sp, #8] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #1 - bl ov12_022258E0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - mov r1, #2 - str r0, [r4, #0x10] - bl sub_0200D6A4 - mov r1, #0xfe - lsl r1, r1, #0x16 - ldr r0, [r4, #0x10] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r0, [r4, #0x10] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - bl sub_0200D4C4 - mov r1, #0x28 - mul r1, r7 - lsl r1, r1, #0x10 - ldr r0, [r4, #0x10] - asr r1, r1, #0x10 - mov r2, #0 - bl sub_0200D5DC - ldr r0, [r4, #0x10] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D460 - mov r1, #0xb - mvn r1, r1 - mul r1, r6 - lsl r1, r1, #0x10 - ldr r0, [r4, #0x10] - asr r1, r1, #0x10 - mov r2, #0xc - bl sub_0200D7E0 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - bl ov12_0223525C - cmp r0, #4 - ldr r0, [r4, #0x10] - bne _02230DC4 - mov r1, #1 - bl sub_0200D364 - b _02230DCA -_02230DC4: - mov r1, #0 - bl sub_0200D364 -_02230DCA: - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - mov r2, #0xa - add r0, #0x14 - mov r1, #1 - add r3, r2, #0 - bl ov12_02225E68 - cmp r6, #0 - blt _02230DF2 - add r0, r4, #0 - ldr r1, _02230E14 ; =0x0000FF48 - ldr r2, _02230E18 ; =0x0000E38D - add r0, #0x38 - mov r3, #4 - bl ov12_02225D50 - ldr r0, _02230E14 ; =0x0000FF48 - b _02230E02 -_02230DF2: - add r0, r4, #0 - ldr r2, _02230E1C ; =0x00001C71 - add r0, #0x38 - mov r1, #0 - mov r3, #4 - bl ov12_02225D50 - mov r0, #0 -_02230E02: - str r0, [r4, #0x50] - ldr r0, [r4, #0] - ldr r1, _02230E20 ; =ov12_02230BE0 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02230E14: .word 0x0000FF48 -_02230E18: .word 0x0000E38D -_02230E1C: .word 0x00001C71 -_02230E20: .word ov12_02230BE0 - thumb_func_end ov12_02230CEC - - thumb_func_start ov12_02230E24 -ov12_02230E24: ; 0x02230E24 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - str r1, [r5, #0] - add r6, r3, #0 - mov r3, #8 - mov r1, #0xa - add r4, r2, #0 - add r0, r5, #4 - add r2, r1, #0 - str r3, [sp] - bl ov12_02225E68 - mov r0, #3 - str r0, [r5, #0x2c] - mov r0, #8 - str r0, [r5, #0x30] - mov r0, #0xa - str r0, [r5, #0x34] - ldr r0, [sp, #0x18] - add r1, r4, #0 - str r0, [r5, #0x28] - ldr r0, [r5, #0] - add r2, r6, #0 - bl sub_0200D4C4 - ldr r0, [r5, #0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200D4C4 - ldr r0, [r5, #0] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r5, #0] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_0200D460 - ldr r0, [sp, #0x18] - cmp r0, #0 - beq _02230E8C - mov r2, #0xfe - ldr r0, [r5, #0] - ldr r1, _02230E98 ; =0xBF800000 - lsl r2, r2, #0x16 - bl sub_0200D6E8 -_02230E8C: - ldr r0, [r5, #0] - mov r1, #0 - bl sub_0200D3F4 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02230E98: .word 0xBF800000 - thumb_func_end ov12_02230E24 - - thumb_func_start ov12_02230E9C -ov12_02230E9C: ; 0x02230E9C - ldr r3, _02230EA4 ; =sub_0200D0F4 - ldr r0, [r0, #0] - bx r3 - nop -_02230EA4: .word sub_0200D0F4 - thumb_func_end ov12_02230E9C - - thumb_func_start ov12_02230EA8 -ov12_02230EA8: ; 0x02230EA8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200D390 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02230EA8 - - thumb_func_start ov12_02230EC0 -ov12_02230EC0: ; 0x02230EC0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, r4, #4 - bl ov12_02225EB8 - cmp r0, #1 - bne _02230F04 - add r0, r4, #4 - add r1, sp, #8 - add r2, sp, #4 - bl ov12_02225FA4 - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _02230EF6 - ldr r1, [sp, #8] - mov r0, #0 - bl sub_020E1A9C - add r1, r0, #0 - mov r2, #0xfe - ldr r0, [r4, #0] - lsl r2, r2, #0x16 - bl sub_0200D6E8 - b _02230F36 -_02230EF6: - mov r2, #0xfe - ldr r0, [r4, #0] - ldr r1, [sp, #8] - lsl r2, r2, #0x16 - bl sub_0200D6E8 - b _02230F36 -_02230F04: - ldr r0, [r4, #0x2c] - cmp r0, #0 - ble _02230F30 - sub r0, r0, #1 - str r0, [r4, #0x2c] - mov r0, #8 - str r0, [sp] - ldr r1, [r4, #0x30] - ldr r3, [r4, #0x34] - lsl r1, r1, #0x10 - lsl r3, r3, #0x10 - add r0, r4, #4 - asr r1, r1, #0x10 - mov r2, #0xa - asr r3, r3, #0x10 - bl ov12_02225E68 - ldr r1, [r4, #0x30] - ldr r0, [r4, #0x34] - str r0, [r4, #0x30] - str r1, [r4, #0x34] - b _02230F36 -_02230F30: - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_02230F36: - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov12_02230EC0 - - thumb_func_start ov12_02230F3C -ov12_02230F3C: ; 0x02230F3C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #3 - bhi _02231008 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02230F54: ; jump table - .short _02230F5C - _02230F54 - 2 ; case 0 - .short _02230F8E - _02230F54 - 2 ; case 1 - .short _02230FAC - _02230F54 - 2 ; case 2 - .short _02230FCC - _02230F54 - 2 ; case 3 -_02230F5C: - ldr r0, [r4, #0x10] - cmp r0, #4 - blt _02230F86 - mov r0, #0 - str r0, [r4, #0x10] - ldr r1, [r4, #0x14] - add r2, r4, #0 - mov r0, #0x38 - add r2, #0x44 - mul r0, r1 - add r0, r2, r0 - bl ov12_02230EA8 - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - cmp r0, #4 - blt _02230F86 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] -_02230F86: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _02231008 -_02230F8E: - mov r1, #0x1c - mov r2, #0x1e - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x18] - add r0, #0x20 - bl ov12_0222619C - cmp r0, #0 - bne _02231008 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231008 -_02230FAC: - add r6, r4, #0 - mov r5, #0 - add r6, #0x44 -_02230FB2: - add r0, r6, #0 - bl ov12_02230EC0 - add r5, r5, #1 - add r6, #0x38 - cmp r5, #4 - blt _02230FB2 - cmp r0, #0 - bne _02231008 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231008 -_02230FCC: - mov r2, #0x1c - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x1e - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_02007DEC - add r5, r4, #0 - mov r6, #0 - add r5, #0x44 -_02230FEA: - add r0, r5, #0 - bl ov12_02230E9C - add r6, r6, #1 - add r5, #0x38 - cmp r6, #4 - blt _02230FEA - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_02231008: - ldr r0, [r4, #8] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02230F3C - - thumb_func_start ov12_02231010 -ov12_02231010: ; 0x02231010 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - str r1, [sp, #4] - mov r1, #0x4a - lsl r1, r1, #2 - add r4, r0, #0 - str r2, [sp, #8] - str r3, [sp, #0xc] - bl ov12_02235E50 - add r7, r0, #0 - ldr r0, [sp, #4] - str r4, [r7, #0] - str r0, [r7, #4] - ldr r0, [sp, #8] - str r0, [r7, #8] - add r0, r4, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r7, #0] - bl ov12_022232FC - str r0, [r7, #0x18] - mov r1, #0 - bl sub_020080C0 - strh r0, [r7, #0x1c] - ldr r0, [r7, #0x18] - mov r1, #1 - bl sub_020080C0 - strh r0, [r7, #0x1e] - add r0, r7, #0 - mov r3, #1 - add r0, #0x20 - mov r1, #4 - mov r2, #0 - str r3, [sp] - bl ov12_02226108 - mov r0, #0x1e - ldrsh r4, [r7, r0] - ldr r1, [r7, #0] - add r0, sp, #0x14 - add r4, #0x10 - mov r5, #0 - bl ov12_0222329C - add r0, r5, #0 - add r6, r7, #0 - str r0, [sp, #0x10] - add r6, #0x44 -_0223107A: - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02231094 - str r5, [sp] - mov r2, #0x1c - lsl r3, r4, #0x10 - ldrsh r2, [r7, r2] - ldr r1, [sp, #0xc] - add r0, r6, #0 - asr r3, r3, #0x10 - bl ov12_02230E24 - b _022310B0 -_02231094: - ldr r0, [sp, #4] - ldr r1, [sp, #8] - add r2, sp, #0x14 - bl sub_0200CE6C - lsl r3, r4, #0x10 - add r1, r0, #0 - str r5, [sp] - mov r2, #0x1c - ldrsh r2, [r7, r2] - add r0, r6, #0 - asr r3, r3, #0x10 - bl ov12_02230E24 -_022310B0: - mov r0, #1 - eor r5, r0 - ldr r0, [sp, #0x10] - sub r4, #0xa - add r0, r0, #1 - add r6, #0x38 - str r0, [sp, #0x10] - cmp r0, #4 - blt _0223107A - ldr r0, [r7, #0] - ldr r1, _022310D0 ; =ov12_02230F3C - add r2, r7, #0 - bl ov12_022201E8 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022310D0: .word ov12_02230F3C - thumb_func_end ov12_02231010 - - thumb_func_start ov12_022310D4 -ov12_022310D4: ; 0x022310D4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #6 - bls _022310E4 - b _02231296 -_022310E4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022310F0: ; jump table - .short _022310FE - _022310F0 - 2 ; case 0 - .short _02231140 - _022310F0 - 2 ; case 1 - .short _022311A0 - _022310F0 - 2 ; case 2 - .short _022311E0 - _022310F0 - 2 ; case 3 - .short _02231200 - _022310F0 - 2 ; case 4 - .short _0223123E - _022310F0 - 2 ; case 5 - .short _0223127E - _022310F0 - 2 ; case 6 -_022310FE: - add r0, r4, #0 - add r0, #0x18 - bl ov12_02225C14 - cmp r0, #0 - beq _02231120 - mov r2, #0x14 - mov r3, #0x16 - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0x10] - add r0, #0x18 - bl ov12_02225A18 - add sp, #0x10 - pop {r3, r4, r5, pc} -_02231120: - mov r2, #0 - str r2, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0x18 - add r0, r4, #0 - ldrsh r1, [r4, r1] - add r0, #0x18 - add r3, r2, #0 - bl ov12_02225BC8 - ldr r0, [r4, #0xc] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02231140: - add r0, r4, #0 - add r0, #0x18 - bl ov12_02225C14 - cmp r0, #0 - beq _02231162 - mov r2, #0x14 - mov r3, #0x16 - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0x10] - add r0, #0x18 - bl ov12_02225A18 - add sp, #0x10 - pop {r3, r4, r5, pc} -_02231162: - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007DEC - mov r1, #0 - str r1, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r2, [r4, #0x3c] - add r0, r4, #0 - lsl r2, r2, #5 - neg r2, r2 - lsl r2, r2, #0x10 - add r0, #0x18 - asr r2, r2, #0x10 - add r3, r1, #0 - bl ov12_02225BC8 - ldr r0, [r4, #0xc] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022311A0: - add r0, r4, #0 - ldr r2, [r4, #0x48] - add r0, #0x4c - add r1, #0x70 - bl ov12_02225D2C - cmp r0, #0 - bne _02231296 - mov r0, #0x46 - ldrsh r0, [r4, r0] - add r1, r4, #0 - mov r2, #0x44 - str r0, [sp] - mov r0, #0x16 - ldrsh r0, [r4, r0] - mov r3, #0x14 - add r1, #0x70 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - ldr r0, _022312A0 ; =0xFFFE0000 - str r0, [sp, #0xc] - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - add r0, #0x4c - bl ov12_02225C98 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231296 -_022311E0: - add r0, r4, #0 - ldr r2, [r4, #0x48] - add r0, #0x4c - add r1, #0x70 - bl ov12_02225D2C - cmp r0, #0 - bne _02231296 - ldr r0, [r4, #0x48] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231296 -_02231200: - add r0, r4, #0 - add r0, #0x18 - bl ov12_02225C14 - cmp r0, #0 - beq _02231220 - mov r2, #0x14 - mov r3, #0x16 - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0x10] - add r0, #0x18 - bl ov12_02225A18 - b _02231296 -_02231220: - mov r2, #0 - str r2, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r1, #0x18 - add r0, r4, #0 - ldrsh r1, [r4, r1] - add r0, #0x18 - add r3, r2, #0 - bl ov12_02225BC8 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231296 -_0223123E: - add r0, r4, #0 - add r0, #0x18 - bl ov12_02225C14 - cmp r0, #0 - beq _0223125E - mov r2, #0x14 - mov r3, #0x16 - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0x10] - add r0, #0x18 - bl ov12_02225A18 - b _02231296 -_0223125E: - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231296 -_0223127E: - ldr r0, [r4, #0x48] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x10 - pop {r3, r4, r5, pc} -_02231296: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022312A0: .word 0xFFFE0000 - thumb_func_end ov12_022310D4 - - thumb_func_start ov12_022312A4 -ov12_022312A4: ; 0x022312A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - mov r1, #0x94 - add r5, r0, #0 - str r2, [sp, #0x10] - add r6, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - ldr r0, [sp, #0x10] - str r7, [r4, #4] - str r0, [r4, #8] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x14] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x16] - mov r1, #0 - str r1, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r2, [r4, #0x3c] - add r0, r4, #0 - lsl r2, r2, #4 - neg r2, r2 - lsl r2, r2, #0x10 - add r0, #0x18 - asr r2, r2, #0x10 - add r3, r1, #0 - bl ov12_02225BC8 - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #0x40] - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x44 - strh r0, [r1] - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x46 - strh r0, [r1] - add r0, r6, #0 - mov r1, #1 - str r6, [r4, #0x48] - bl sub_0200D390 - ldr r0, [r4, #0x48] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x48] - mov r1, #1 - bl sub_0200D460 - mov r0, #0x16 - ldrsh r0, [r4, r0] - add r1, r4, #0 - mov r2, #0x14 - str r0, [sp] - mov r0, #0x46 - ldrsh r0, [r4, r0] - mov r3, #0x44 - add r1, #0x70 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #2 - lsl r0, r0, #0x10 - str r0, [sp, #0xc] - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - add r0, #0x4c - bl ov12_02225C98 - ldr r0, [r4, #0] - ldr r1, _0223138C ; =ov12_022310D4 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223138C: .word ov12_022310D4 - thumb_func_end ov12_022312A4 - - thumb_func_start ov12_02231390 -ov12_02231390: ; 0x02231390 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bhi _0223143A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022313AA: ; jump table - .short _022313B2 - _022313AA - 2 ; case 0 - .short _022313DE - _022313AA - 2 ; case 1 - .short _02231402 - _022313AA - 2 ; case 2 - .short _02231428 - _022313AA - 2 ; case 3 -_022313B2: - mov r2, #0x1a - ldrsh r3, [r4, r2] - mov r2, #0x68 - ldrsh r2, [r4, r2] - mov r1, #0x18 - ldrsh r1, [r4, r1] - sub r2, r3, r2 - add r0, r4, #0 - lsl r2, r2, #0x10 - ldr r3, [r4, #0x14] - add r0, #0x1c - asr r2, r2, #0x10 - bl ov12_02225B78 - cmp r0, #0 - bne _0223143A - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0x10 - str r0, [r4, #0xc] - b _0223143A -_022313DE: - ldr r0, [r4, #0xc] - sub r0, r0, #1 - str r0, [r4, #0xc] - bpl _0223143A - ldr r0, [r4, #8] - mov r2, #0x10 - add r0, r0, #1 - str r0, [r4, #8] - mov r1, #0 - str r1, [sp] - mov r0, #0x20 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x40 - add r3, r2, #0 - bl ov12_02226424 - b _0223143A -_02231402: - add r0, r4, #0 - add r0, #0x40 - bl ov12_02226454 - cmp r0, #0 - beq _0223143A - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223143A -_02231428: - ldr r0, [r4, #0] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r4, pc} -_0223143A: - ldr r0, [r4, #4] - bl sub_0200C7EC - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_02231390 - - thumb_func_start ov12_02231444 -ov12_02231444: ; 0x02231444 - push {r4, r5, r6, lr} - sub sp, #8 - mov r1, #0x6c - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #4] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x18] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x1a] - ldr r0, [r4, #0x10] - mov r1, #0x29 - bl sub_020080C0 - add r1, r4, #0 - add r1, #0x68 - strh r0, [r1] - mov r0, #0x1a - ldrsh r0, [r4, r0] - mov r1, #0 - add r0, #8 - strh r0, [r4, #0x1a] - ldr r0, [r4, #0] - bl ov12_022202C0 - str r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x1c - mov r1, #2 - mov r2, #0x10 - bl ov12_022263A4 - ldr r0, [r4, #0] - mov r1, #0x10 - mov r2, #0 - bl ov12_02235780 - mov r1, #0x10 - str r1, [sp] - mov r0, #0x20 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0 - add r0, #0x40 - add r3, r2, #0 - bl ov12_02226424 - ldr r0, [r4, #0x28] - add r2, r4, #0 - add r1, r0, #0 - mul r1, r6 - str r1, [r4, #0x28] - ldr r0, [r4, #0] - ldr r1, _02231504 ; =ov12_02231390 - bl ov12_022201E8 - ldr r0, [r4, #4] - bl sub_0200C7EC - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02231504: .word ov12_02231390 - thumb_func_end ov12_02231444 - - thumb_func_start ov12_02231508 -ov12_02231508: ; 0x02231508 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x38] - mov r4, #0 - cmp r0, #0 - beq _0223151E - cmp r0, #1 - beq _02231552 - cmp r0, #2 - beq _0223157E - b _02231580 -_0223151E: - add r0, r5, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #0 - beq _02231538 - mov r2, #0x16 - ldrsh r2, [r5, r2] - ldr r0, [r5, #0x10] - mov r1, #0xd - bl sub_02007DEC - b _02231580 -_02231538: - ldr r0, [r5, #0x38] - mov r2, #0xa - add r0, r0, #1 - str r0, [r5, #0x38] - mov r0, #0xc - add r5, #0x14 - str r0, [sp] - add r0, r5, #0 - mov r1, #0xf - add r3, r2, #0 - bl ov12_02225E68 - b _02231580 -_02231552: - add r0, r5, #0 - add r0, #0x14 - bl ov12_02225EB8 - cmp r0, #0 - ldr r0, [r5, #0x10] - beq _0223156C - mov r2, #0x16 - ldrsh r2, [r5, r2] - mov r1, #0xd - bl sub_02007DEC - b _02231580 -_0223156C: - mov r1, #0xd - add r2, r1, #0 - add r2, #0xf3 - bl sub_02007DEC - ldr r0, [r5, #0x38] - add r0, r0, #1 - str r0, [r5, #0x38] - b _02231580 -_0223157E: - mov r4, #1 -_02231580: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02231508 - - thumb_func_start ov12_02231584 -ov12_02231584: ; 0x02231584 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x40] - mov r4, #0 - cmp r0, #0 - beq _0223159C - cmp r0, #1 - beq _022315E2 - cmp r0, #2 - beq _022315FE - b _02231600 -_0223159C: - add r0, r5, #0 - ldr r1, [r5, #0x3c] - add r0, #0x44 - bl ov12_022260A8 - add r0, r5, #0 - add r0, #0x68 - bl ov12_02225C14 - cmp r0, #0 - beq _022315C6 - mov r2, #0xb4 - mov r3, #0xb6 - add r0, r5, #0 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - ldr r1, [r5, #0x3c] - add r0, #0x68 - bl ov12_022259DC - b _02231600 -_022315C6: - ldr r0, [r5, #0x40] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r5, #0x40] - str r1, [sp] - mov r0, #8 - add r5, #0x8c - str r0, [sp, #4] - add r0, r5, #0 - add r2, r4, #0 - mov r3, #0xe - bl ov12_02226424 - b _02231600 -_022315E2: - add r0, r5, #0 - add r0, #0x8c - bl ov12_02226454 - cmp r0, #0 - beq _02231600 - ldr r0, [r5, #0x3c] - add r1, r4, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x40] - add r0, r0, #1 - str r0, [r5, #0x40] - b _02231600 -_022315FE: - mov r4, #1 -_02231600: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02231584 - - thumb_func_start ov12_02231608 -ov12_02231608: ; 0x02231608 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0223161A - cmp r0, #1 - beq _02231632 - b _02231648 -_0223161A: - add r0, r4, #0 - bl ov12_02231508 - add r0, r4, #0 - bl ov12_02231584 - cmp r0, #0 - beq _02231648 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231648 -_02231632: - ldr r0, [r4, #0x3c] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_02231648: - ldr r0, [r4, #8] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - thumb_func_end ov12_02231608 - - thumb_func_start ov12_02231650 -ov12_02231650: ; 0x02231650 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - mov r1, #0xb8 - add r6, r0, #0 - add r7, r2, #0 - str r3, [sp, #8] - bl ov12_02235E50 - add r4, r0, #0 - str r6, [r4, #0] - str r5, [r4, #4] - str r7, [r4, #8] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02225964 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222598C - add r5, r0, #0 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #0x10] - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - mov r0, #0xc - str r0, [sp] - add r0, r4, #0 - mov r1, #0xa - add r0, #0x14 - add r2, r1, #0 - mov r3, #0xf - bl ov12_02225E68 - ldr r0, [sp, #8] - mov r1, #1 - str r0, [r4, #0x3c] - bl sub_0200D390 - ldr r0, [r4, #0x3c] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x3c] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_0200D460 - ldr r0, [sp, #0xc] - lsl r0, r0, #5 - add r1, r7, r0 - add r0, r4, #0 - add r0, #0xb4 - strh r1, [r0] - add r0, r4, #0 - add r0, #0xb6 - strh r6, [r0] - cmp r5, #0 - bge _02231706 - mov r1, #7 - b _02231708 -_02231706: - mov r1, #0x17 -_02231708: - mvn r1, r1 - add r0, r1, #0 - mul r0, r5 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r1, #0 - mov r0, #0x20 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x68 - add r2, r1, #0 - add r3, r1, #0 - bl ov12_02225BC8 - mov r0, #0x20 - str r0, [sp] - add r0, r4, #0 - add r0, #0x44 - mov r1, #5 - mov r2, #0xa - mov r3, #0xc - bl ov12_02225E68 - mov r0, #0x1a - str r0, [sp] - ldr r0, _02231758 ; =0x04000050 - mov r1, #0 - mov r2, #0x3f - mov r3, #0x1f - bl sub_020BF55C - ldr r0, [r4, #0] - ldr r1, _0223175C ; =ov12_02231608 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02231758: .word 0x04000050 -_0223175C: .word ov12_02231608 - thumb_func_end ov12_02231650 - - thumb_func_start ov12_02231760 -ov12_02231760: ; 0x02231760 - push {r3, lr} - sub sp, #8 - ldr r1, [r0, #0x68] - cmp r1, #5 - bhi _02231814 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02231776: ; jump table - .short _02231782 - _02231776 - 2 ; case 0 - .short _02231798 - _02231776 - 2 ; case 1 - .short _022317B2 - _02231776 - 2 ; case 2 - .short _022317CC - _02231776 - 2 ; case 3 - .short _022317E6 - _02231776 - 2 ; case 4 - .short _022317FC - _02231776 - 2 ; case 5 -_02231782: - mov r2, #0x28 - str r2, [sp] - mov r1, #8 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x18 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_02231798: - mov r1, #0x4f - mvn r1, r1 - str r1, [sp] - mov r1, #8 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x18 - add r2, r1, #0 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_022317B2: - mov r1, #0x50 - str r1, [sp] - mov r1, #8 - str r1, [sp, #4] - mov r1, #0 - add r2, r1, #0 - add r0, #0x18 - sub r2, #0x50 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_022317CC: - mov r1, #0x4f - mvn r1, r1 - str r1, [sp] - mov r1, #8 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x18 - add r2, r1, #0 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_022317E6: - mov r2, #0x50 - str r2, [sp] - mov r1, #8 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x18 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_022317FC: - mov r2, #0x27 - mvn r2, r2 - str r2, [sp] - mov r1, #8 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x18 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_02231814: - bl sub_02022974 - add sp, #8 - pop {r3, pc} - thumb_func_end ov12_02231760 - - thumb_func_start ov12_0223181C -ov12_0223181C: ; 0x0223181C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #4 - bls _0223182C - b _02231940 -_0223182C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02231838: ; jump table - .short _02231842 - _02231838 - 2 ; case 0 - .short _0223185E - _02231838 - 2 ; case 1 - .short _022318E0 - _02231838 - 2 ; case 2 - .short _02231916 - _02231838 - 2 ; case 3 - .short _02231928 - _02231838 - 2 ; case 4 -_02231842: - ldr r0, [r4, #0x6c] - add r0, r0, #1 - str r0, [r4, #0x6c] - cmp r0, #4 - ble _02231940 - add r0, r4, #0 - bl ov12_02231760 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x6c] - b _02231940 -_0223185E: - add r0, r4, #0 - add r0, #0x18 - bl ov12_02225C14 - cmp r0, #0 - beq _0223187E - mov r2, #0x64 - mov r3, #0x66 - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0x14] - add r0, #0x18 - bl ov12_022259DC - b _02231940 -_0223187E: - ldr r0, [r4, #0x68] - add r0, r0, #1 - str r0, [r4, #0x68] - cmp r0, #6 - bge _022318AE - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #0x64 - ldrsh r1, [r4, r0] - mov r0, #0x18 - ldrsh r0, [r4, r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x64 - strh r1, [r0] - mov r0, #0x66 - ldrsh r1, [r4, r0] - mov r0, #0x1a - ldrsh r0, [r4, r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x66 - strh r1, [r0] - b _02231940 -_022318AE: - ldr r0, [r4, #0xc] - mov r1, #1 - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0x14] - bl sub_0200D810 - mov r1, #0x10 - add r0, r4, #0 - mov r2, #0 - str r1, [sp] - add r0, #0x3c - add r3, r2, #0 - str r1, [sp, #4] - bl ov12_02226424 - ldr r0, _0223194C ; =0x00007FFF - mov r1, #0 - str r0, [sp] - ldr r0, [r4, #0x10] - mov r2, #0xa - add r3, r1, #0 - bl sub_020086FC - b _02231940 -_022318E0: - add r0, r4, #0 - add r0, #0x3c - bl ov12_02226454 - cmp r0, #0 - beq _022318F4 - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D3F4 -_022318F4: - ldr r0, [r4, #0x10] - bl sub_020087B4 - cmp r0, #0 - bne _02231940 - ldr r0, [r4, #0xc] - mov r2, #0 - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, _0223194C ; =0x00007FFF - mov r1, #0xa - str r0, [sp] - ldr r0, [r4, #0x10] - add r3, r2, #0 - bl sub_020086FC - b _02231940 -_02231916: - ldr r0, [r4, #0x10] - bl sub_020087B4 - cmp r0, #0 - bne _02231940 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231940 -_02231928: - ldr r0, [r4, #0x14] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, pc} -_02231940: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223194C: .word 0x00007FFF - thumb_func_end ov12_0223181C - - thumb_func_start ov12_02231950 -ov12_02231950: ; 0x02231950 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x70 - add r5, r0, #0 - str r2, [sp] - add r6, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - ldr r0, [sp] - str r7, [r4, #4] - str r0, [r4, #8] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x10] - str r6, [r4, #0x14] - add r0, r6, #0 - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D460 - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x64 - add r2, #0x66 - bl sub_0200D550 - ldr r0, [r4, #0] - ldr r1, _022319A8 ; =ov12_0223181C - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022319A8: .word ov12_0223181C - thumb_func_end ov12_02231950 - - thumb_func_start ov12_022319AC -ov12_022319AC: ; 0x022319AC - push {r3, lr} - sub sp, #8 - ldr r1, [r0, #0x50] - cmp r1, #3 - bhi _02231A2E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022319C2: ; jump table - .short _022319CA - _022319C2 - 2 ; case 0 - .short _022319E0 - _022319C2 - 2 ; case 1 - .short _022319FA - _022319C2 - 2 ; case 2 - .short _02231A14 - _022319C2 - 2 ; case 3 -_022319CA: - mov r2, #0x50 - str r2, [sp] - mov r1, #4 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x28 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_022319E0: - mov r1, #0x4f - mvn r1, r1 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x28 - add r2, r1, #0 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_022319FA: - mov r1, #0x50 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - mov r1, #0 - add r2, r1, #0 - add r0, #0x28 - sub r2, #0x50 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_02231A14: - mov r1, #0x27 - mvn r1, r1 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x28 - mov r2, #0x28 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_02231A2E: - bl sub_02022974 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_022319AC - - thumb_func_start ov12_02231A38 -ov12_02231A38: ; 0x02231A38 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #6 - bhi _02231B42 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02231A52: ; jump table - .short _02231A60 - _02231A52 - 2 ; case 0 - .short _02231A7C - _02231A52 - 2 ; case 1 - .short _02231AE8 - _02231A52 - 2 ; case 2 - .short _02231B44 - _02231A52 - 2 ; case 3 - .short _02231BA6 - _02231A52 - 2 ; case 4 - .short _02231BC6 - _02231A52 - 2 ; case 5 - .short _02231BF4 - _02231A52 - 2 ; case 6 -_02231A60: - ldr r0, [r4, #0x54] - add r0, r0, #1 - str r0, [r4, #0x54] - cmp r0, #1 - ble _02231B42 - add r0, r4, #0 - bl ov12_022319AC - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x54] - b _02231C0C -_02231A7C: - add r0, r4, #0 - add r0, #0x28 - bl ov12_02225C14 - cmp r0, #0 - beq _02231A9C - mov r2, #0x4c - mov r3, #0x4e - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #0x24] - add r0, #0x28 - bl ov12_022259DC - b _02231C0C -_02231A9C: - ldr r0, [r4, #0x50] - add r0, r0, #1 - str r0, [r4, #0x50] - cmp r0, #4 - bge _02231ACC - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #0x4c - ldrsh r1, [r4, r0] - mov r0, #0x28 - ldrsh r0, [r4, r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x4c - strh r1, [r0] - mov r0, #0x4e - ldrsh r1, [r4, r0] - mov r0, #0x2a - ldrsh r0, [r4, r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x4e - strh r1, [r0] - b _02231C0C -_02231ACC: - ldr r0, [r4, #0xc] - mov r1, #1 - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #8 - str r0, [r4, #0x54] - ldr r0, [r4, #0x24] - bl sub_0200D364 - ldr r0, [r4, #0x24] - mov r1, #1 - bl sub_0200D390 - b _02231C0C -_02231AE8: - ldr r0, [r4, #0x54] - sub r0, r0, #1 - str r0, [r4, #0x54] - bpl _02231B42 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl ov12_0222332C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_02222354 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _02231C18 ; =0x0000FFFF - mov r1, #1 - lsl r2, r2, #0x10 - add r3, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - lsr r2, r2, #0x10 - sub r3, #9 - bl sub_02003178 - ldr r7, _02231C18 ; =0x0000FFFF - mov r6, #0 - add r5, r4, #0 -_02231B28: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _02231B3A - mov r1, #0xe - mov r2, #0x10 - mov r3, #0 - str r7, [sp] - bl sub_020086FC -_02231B3A: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _02231B28 -_02231B42: - b _02231C0C -_02231B44: - ldr r0, [r4, #0] - bl ov12_0222332C - bl sub_0200384C - cmp r0, #0 - bne _02231C0C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl ov12_0222332C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_02222354 - add r2, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02231C18 ; =0x0000FFFF - mov r1, #1 - lsl r2, r2, #0x10 - add r3, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - lsr r2, r2, #0x10 - sub r3, #9 - bl sub_02003178 - ldr r7, _02231C18 ; =0x0000FFFF - mov r6, #0 - add r5, r4, #0 -_02231B8A: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _02231B9C - mov r2, #0 - mov r1, #2 - add r3, r2, #0 - str r7, [sp] - bl sub_020086FC -_02231B9C: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _02231B8A - b _02231C0C -_02231BA6: - ldr r0, [r4, #0] - bl ov12_0222332C - bl sub_0200384C - cmp r0, #0 - bne _02231C0C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #4 - str r0, [r4, #0x54] - str r0, [r4, #0x50] - mov r0, #0 - str r0, [r4, #0x58] - b _02231C0C -_02231BC6: - ldr r0, [r4, #0x54] - sub r0, r0, #1 - str r0, [r4, #0x54] - bpl _02231C0C - mov r0, #4 - str r0, [r4, #0x54] - ldr r0, [r4, #0x50] - sub r0, r0, #1 - str r0, [r4, #0x50] - bpl _02231BE2 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02231C0C -_02231BE2: - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x58] - bl sub_0200D3F4 - ldr r1, [r4, #0x58] - mov r0, #1 - eor r0, r1 - str r0, [r4, #0x58] - b _02231C0C -_02231BF4: - ldr r0, [r4, #0x24] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_02231C0C: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02231C18: .word 0x0000FFFF - thumb_func_end ov12_02231A38 - - thumb_func_start ov12_02231C1C -ov12_02231C1C: ; 0x02231C1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - mov r1, #0x5c - add r4, r0, #0 - str r2, [sp, #4] - add r7, r3, #0 - bl ov12_02235E50 - add r6, r0, #0 - str r4, [r6, #0] - ldr r0, [sp, #4] - str r5, [r6, #4] - str r0, [r6, #8] - add r0, r4, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - str r0, [r6, #0x10] - mov r4, #0 - add r5, r6, #0 -_02231C4C: - ldr r0, [r6, #0] - add r1, r4, #0 - bl ov12_022232FC - str r0, [r5, #0x14] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02231C4C - str r7, [r6, #0x24] - add r0, r7, #0 - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r6, #0x24] - mov r1, #1 - bl sub_0200D460 - add r1, r6, #0 - add r2, r6, #0 - ldr r0, [r6, #0x24] - add r1, #0x4c - add r2, #0x4e - bl sub_0200D550 - mov r1, #0x4c - ldrsh r2, [r6, r1] - add r0, r6, #0 - add r0, #0x4c - sub r2, #0x28 - strh r2, [r0] - mov r2, #0x4e - ldrsh r3, [r6, r2] - add r0, r6, #0 - add r0, #0x4e - sub r3, #0x28 - strh r3, [r0] - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r6, #0x24] - bl sub_0200D4C4 - ldr r0, [r6, #0x24] - mov r1, #1 - bl sub_0200D810 - mov r0, #0xf - mvn r0, r0 - str r0, [r6, #0x54] - mov r0, #0x1a - str r0, [sp] - ldr r0, _02231CCC ; =0x04000050 - mov r1, #0 - mov r2, #0x3f - mov r3, #0x1f - bl sub_020BF55C - ldr r0, [r6, #0] - ldr r1, _02231CD0 ; =ov12_02231A38 - add r2, r6, #0 - bl ov12_022201E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02231CCC: .word 0x04000050 -_02231CD0: .word ov12_02231A38 - thumb_func_end ov12_02231C1C - - thumb_func_start ov12_02231CD4 -ov12_02231CD4: ; 0x02231CD4 - push {r3, r4, r5, lr} - ldr r2, _02231D14 ; =0x00000AAA - add r4, r0, #0 - add r5, r1, #0 - add r0, #0x10 - mov r1, #0 - mov r3, #3 - bl ov12_02225D78 - cmp r5, #0 - beq _02231D00 - mov r0, #0 - ldr r1, [r4, #0x18] - mvn r0, r0 - mul r0, r1 - str r0, [r4, #0x18] - ldr r0, [r4, #8] - mov r1, #0xa - mov r2, #0x10 - bl sub_02007DEC - b _02231D0C -_02231D00: - mov r1, #0xa - add r2, r1, #0 - ldr r0, [r4, #8] - sub r2, #0x1a - bl sub_02007DEC -_02231D0C: - mov r0, #0 - str r0, [r4, #0x4c] - str r0, [r4, #0x50] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02231D14: .word 0x00000AAA - thumb_func_end ov12_02231CD4 - - thumb_func_start ov12_02231D18 -ov12_02231D18: ; 0x02231D18 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x4c] - mov r5, #0 - cmp r0, #3 - bhi _02231E22 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02231D32: ; jump table - .short _02231D3A - _02231D32 - 2 ; case 0 - .short _02231D7A - _02231D32 - 2 ; case 1 - .short _02231DD6 - _02231D32 - 2 ; case 2 - .short _02231E20 - _02231D32 - 2 ; case 3 -_02231D3A: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225DC8 - ldr r0, [r4, #8] - ldr r2, [r4, #0x10] - mov r1, #9 - bl sub_02007DEC - ldr r0, [r4, #0x50] - sub r0, r0, #1 - str r0, [r4, #0x50] - bpl _02231E22 - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] - mov r0, #0xe - ldrsh r3, [r4, r0] - mov r0, #0xc - ldrsh r1, [r4, r0] - add r0, r3, #2 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r0, #2 - add r4, #0x24 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r1, #0 - bl ov12_02225BC8 - b _02231E22 -_02231D7A: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225DC8 - cmp r0, #0 - beq _02231D90 - ldr r0, [r4, #8] - ldr r2, [r4, #0x10] - mov r1, #9 - bl sub_02007DEC -_02231D90: - add r0, r4, #0 - ldr r1, [r4, #8] - add r0, #0x24 - bl ov12_02225C74 - cmp r0, #0 - bne _02231E22 - ldr r0, [r4, #0x4c] - mov r2, #0 - add r0, r0, #1 - str r0, [r4, #0x4c] - ldr r1, [r4, #0x10] - add r0, r4, #0 - lsl r1, r1, #0x10 - add r0, #0x10 - asr r1, r1, #0x10 - mov r3, #3 - bl ov12_02225D78 - mov r0, #0xe - ldrsh r3, [r4, r0] - mov r0, #0xc - ldrsh r1, [r4, r0] - mov r0, #2 - add r4, #0x24 - str r3, [sp] - add r3, r3, #2 - lsl r3, r3, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r1, #0 - asr r3, r3, #0x10 - bl ov12_02225BC8 - b _02231E22 -_02231DD6: - add r0, r4, #0 - ldr r1, [r4, #8] - add r0, #0x24 - bl ov12_02225C74 - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225DC8 - cmp r0, #0 - ldr r0, [r4, #8] - beq _02231DF8 - ldr r2, [r4, #0x10] - mov r1, #9 - bl sub_02007DEC - b _02231E22 -_02231DF8: - mov r2, #0xc - ldrsh r2, [r4, r2] - add r1, r5, #0 - bl sub_02007DEC - mov r2, #0xe - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #9 - add r2, r5, #0 - bl sub_02007DEC - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] - b _02231E22 -_02231E20: - mov r5, #1 -_02231E22: - add r0, r5, #0 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02231D18 - - thumb_func_start ov12_02231E28 -ov12_02231E28: ; 0x02231E28 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02231E3A - cmp r0, #1 - beq _02231E6C - pop {r4, pc} -_02231E3A: - add r0, r4, #0 - bl ov12_02231D18 - cmp r0, #0 - beq _02231E7A - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] - cmp r0, #4 - bge _02231E64 - ldr r1, [r4, #0x54] - mov r0, #1 - eor r1, r0 - add r0, r4, #0 - str r1, [r4, #0x54] - bl ov12_02231CD4 - add r0, r4, #0 - bl ov12_02231D18 - pop {r4, pc} -_02231E64: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02231E6C: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02231E7A: - pop {r4, pc} - thumb_func_end ov12_02231E28 - - thumb_func_start ov12_02231E7C -ov12_02231E7C: ; 0x02231E7C - push {r4, r5, r6, lr} - mov r1, #0x58 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #4] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02225964 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220280 - cmp r0, #0 - bne _02231EC8 - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0xc] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - b _02231EE8 -_02231EC8: - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0xc] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 -_02231EE8: - strh r0, [r4, #0xe] - ldr r0, [r4, #8] - mov r1, #0xb - mov r2, #0x32 - bl sub_02007DEC - cmp r6, #1 - bne _02231EFC - mov r0, #0 - b _02231EFE -_02231EFC: - mov r0, #1 -_02231EFE: - str r0, [r4, #0x54] - ldr r1, [r4, #0x54] - add r0, r4, #0 - bl ov12_02231CD4 - ldr r0, [r4, #4] - ldr r1, _02231F14 ; =ov12_02231E28 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02231F14: .word ov12_02231E28 - thumb_func_end ov12_02231E7C - - thumb_func_start ov12_02231F18 -ov12_02231F18: ; 0x02231F18 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x38] - mov r5, #0 - cmp r0, #3 - bhi _02231FD4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02231F30: ; jump table - .short _02231F38 - _02231F30 - 2 ; case 0 - .short _02231F68 - _02231F30 - 2 ; case 1 - .short _02231F8A - _02231F30 - 2 ; case 2 - .short _02231FBA - _02231F30 - 2 ; case 3 -_02231F38: - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_022260C8 - cmp r0, #0 - beq _02231F60 - add r0, r5, #0 - str r0, [sp] - ldr r1, [r4, #0x3c] - ldr r2, [r4, #0x40] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02226024 - b _02231FD4 -_02231F60: - ldr r0, [r4, #0x38] - add r0, r0, #1 - str r0, [r4, #0x38] - b _02231FD4 -_02231F68: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bpl _02231FD4 - ldr r0, [r4, #0x38] - mov r2, #0xa - add r0, r0, #1 - str r0, [r4, #0x38] - mov r0, #8 - add r4, #0x10 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xf - add r3, r2, #0 - bl ov12_02225E68 - b _02231FD4 -_02231F8A: - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - bl ov12_022260C8 - cmp r0, #0 - beq _02231FB2 - add r0, r5, #0 - str r0, [sp] - ldr r1, [r4, #0x3c] - ldr r2, [r4, #0x40] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x24] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02226024 - b _02231FD4 -_02231FB2: - ldr r0, [r4, #0x38] - add r0, r0, #1 - str r0, [r4, #0x38] - b _02231FD4 -_02231FBA: - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #0xc] - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0xc] - add r2, #0xf3 - bl sub_02007DEC - mov r5, #1 -_02231FD4: - add r0, r5, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02231F18 - - thumb_func_start ov12_02231FD8 -ov12_02231FD8: ; 0x02231FD8 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _02231FEE - cmp r0, #1 - beq _02232004 - cmp r0, #2 - beq _02232014 - pop {r4, pc} -_02231FEE: - add r0, r4, #0 - bl ov12_02231F18 - cmp r0, #0 - beq _02232022 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0x10 - str r0, [r4, #8] - pop {r4, pc} -_02232004: - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - bpl _02232022 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, pc} -_02232014: - ldr r0, [r4, #0] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_02232022: - pop {r4, pc} - thumb_func_end ov12_02231FD8 - - thumb_func_start ov12_02232024 -ov12_02232024: ; 0x02232024 - push {r3, r4, r5, lr} - mov r1, #0x44 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xa - add r0, #0x10 - add r2, r1, #0 - mov r3, #0xf - bl ov12_02225E68 - mov r0, #4 - str r0, [r4, #0x34] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 - str r0, [r4, #0x40] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - str r0, [r4, #0x3c] - ldr r0, [r4, #0] - ldr r1, _02232080 ; =ov12_02231FD8 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_02232080: .word ov12_02231FD8 - thumb_func_end ov12_02232024 - - thumb_func_start ov12_02232084 -ov12_02232084: ; 0x02232084 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x74] - mov r1, #0x64 - bl sub_020E1F6C - add r4, r0, #0 - ldr r0, [r5, #0x78] - mov r1, #0x64 - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [r5, #0x70] - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp] - add r0, r5, #0 - lsl r1, r4, #0x10 - lsl r3, r6, #0x10 - add r0, #0x18 - asr r1, r1, #0x10 - mov r2, #0xa - asr r3, r3, #0x10 - bl ov12_02225E68 - ldr r0, [r5, #0] - mov r1, #0x10 - mov r2, #0 - bl ov12_02235780 - ldr r0, [r5, #0x70] - mov r1, #0x64 - bl sub_020E1F6C - mov r1, #6 - str r1, [sp] - lsl r0, r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x3c - mov r1, #0x10 - mov r2, #0xa - mov r3, #0 - bl ov12_02226424 - mov r0, #0 - str r0, [r5, #0x64] - str r0, [r5, #0x68] - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02232084 - - thumb_func_start ov12_022320EC -ov12_022320EC: ; 0x022320EC - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [r4, #0x64] - mov r5, #0 - cmp r0, #3 - bhi _022321C0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02232104: ; jump table - .short _0223210C - _02232104 - 2 ; case 0 - .short _02232152 - _02232104 - 2 ; case 1 - .short _022321A8 - _02232104 - 2 ; case 2 - .short _022321BE - _02232104 - 2 ; case 3 -_0223210C: - add r0, r4, #0 - ldr r1, [r4, #0x14] - add r0, #0x18 - bl ov12_022260A8 - cmp r0, #0 - bne _022321C0 - ldr r0, [r4, #0x78] - mov r1, #0x64 - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [r4, #0x74] - mov r1, #0x64 - bl sub_020E1F6C - add r7, r0, #0 - ldr r0, [r4, #0x70] - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp] - add r0, r4, #0 - lsl r1, r6, #0x10 - lsl r3, r7, #0x10 - add r0, #0x18 - asr r1, r1, #0x10 - mov r2, #0xa - asr r3, r3, #0x10 - bl ov12_02225E68 - ldr r0, [r4, #0x64] - add r0, r0, #1 - str r0, [r4, #0x64] - b _022321C0 -_02232152: - add r0, r4, #0 - ldr r1, [r4, #0x14] - add r0, #0x18 - bl ov12_022260A8 - cmp r0, #0 - bne _022321C0 - ldr r0, [r4, #0x68] - add r0, r0, #1 - str r0, [r4, #0x68] - cmp r0, #2 - bge _022321A0 - add r0, r5, #0 - str r0, [r4, #0x64] - ldr r0, [r4, #0x74] - mov r1, #0x64 - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [r4, #0x78] - mov r1, #0x64 - bl sub_020E1F6C - add r7, r0, #0 - ldr r0, [r4, #0x70] - mov r1, #0x64 - bl sub_020E1F6C - lsl r1, r6, #0x10 - lsl r3, r7, #0x10 - add r4, #0x18 - str r0, [sp] - add r0, r4, #0 - asr r1, r1, #0x10 - mov r2, #0xa - asr r3, r3, #0x10 - bl ov12_02225E68 - b _022321C0 -_022321A0: - ldr r0, [r4, #0x64] - add r0, r0, #1 - str r0, [r4, #0x64] - b _022321C0 -_022321A8: - add r0, r4, #0 - add r0, #0x3c - bl ov12_02226454 - cmp r0, #0 - beq _022321C0 - ldr r0, [r4, #0x64] - mov r5, #1 - add r0, r0, #1 - str r0, [r4, #0x64] - b _022321C0 -_022321BE: - mov r5, #1 -_022321C0: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022320EC - - thumb_func_start ov12_022321C4 -ov12_022321C4: ; 0x022321C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0x7c] - mov r4, #0 - cmp r1, #0 - beq _022321DA - cmp r1, #1 - beq _022321EC - cmp r1, #2 - beq _02232236 - b _02232238 -_022321DA: - bl ov12_02232084 - add r0, r5, #0 - bl ov12_022320EC - ldr r0, [r5, #0x7c] - add r0, r0, #1 - str r0, [r5, #0x7c] - b _02232238 -_022321EC: - bl ov12_022320EC - cmp r0, #0 - beq _02232238 - ldr r0, [r5, #0x6c] - sub r0, r0, #1 - str r0, [r5, #0x6c] - bmi _0223222C - ldr r0, [r5, #0x70] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [r5, #0x70] - sub r0, r1, r0 - str r0, [r5, #0x70] - ldr r0, [r5, #0x74] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [r5, #0x74] - sub r0, r1, r0 - str r0, [r5, #0x74] - ldr r0, [r5, #0x78] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [r5, #0x78] - sub r0, r1, r0 - str r0, [r5, #0x78] - add r0, r4, #0 - str r0, [r5, #0x7c] - b _02232238 -_0223222C: - ldr r0, [r5, #0x7c] - mov r4, #1 - add r0, r0, #1 - str r0, [r5, #0x7c] - b _02232238 -_02232236: - mov r4, #1 -_02232238: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_022321C4 - - thumb_func_start ov12_0223223C -ov12_0223223C: ; 0x0223223C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #4 - bls _0223224C - b _0223236C -_0223224C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02232258: ; jump table - .short _02232262 - _02232258 - 2 ; case 0 - .short _022322A8 - _02232258 - 2 ; case 1 - .short _02232308 - _02232258 - 2 ; case 2 - .short _02232338 - _02232258 - 2 ; case 3 - .short _02232354 - _02232258 - 2 ; case 4 -_02232262: - add r0, r4, #0 - bl ov12_022321C4 - cmp r0, #0 - beq _0223236C - ldr r0, [r4, #0xc] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0x1e - str r0, [r4, #0x10] - ldr r0, [r4, #0x14] - bl sub_0200D364 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D390 - mov r1, #0xfe - lsl r1, r1, #0x16 - ldr r0, [r4, #0x14] - add r2, r1, #0 - bl sub_0200D6E8 - mov r1, #0 - mov r2, #0x10 - str r1, [sp] - mov r0, #4 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x3c - add r3, r2, #0 - bl ov12_02226424 - b _0223236C -_022322A8: - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _022322C6 - mov r0, #1 - str r0, [sp] - mov r0, #8 - mov r1, #0x10 - mov r2, #0 - mov r3, #0xd - bl sub_0200AAE0 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x10] - b _022322CC -_022322C6: - ble _022322CC - sub r0, r0, #1 - str r0, [r4, #0x10] -_022322CC: - mov r0, #0 - ldr r1, [r4, #0x10] - mvn r0, r0 - cmp r1, r0 - bne _022322F6 - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _022322F6 - mov r0, #1 - str r0, [sp] - mov r0, #8 - mov r1, #0 - mov r2, #0x10 - mov r3, #0xd - bl sub_0200AAE0 - mov r0, #1 - mvn r0, r0 - str r0, [r4, #0x10] -_022322F6: - ldr r0, [r4, #0x14] - bl sub_0200D3B8 - cmp r0, #0 - bne _0223236C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223236C -_02232308: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _0223236C - ldr r0, [r4, #0xc] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - mov r2, #0 - bl ov12_02235780 - mov r1, #0x10 - mov r2, #0 - str r1, [sp] - mov r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x3c - add r3, r2, #0 - bl ov12_02226424 - b _0223236C -_02232338: - add r0, r4, #0 - add r0, #0x3c - bl ov12_02226454 - cmp r0, #0 - beq _0223236C - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223236C -_02232354: - ldr r0, [r4, #0x14] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, pc} -_0223236C: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0223223C - - thumb_func_start ov12_02232378 -ov12_02232378: ; 0x02232378 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x80 - add r6, r0, #0 - str r2, [sp] - add r5, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r6, [r4, #0] - ldr r0, [sp] - str r7, [r4, #4] - str r0, [r4, #8] - str r5, [r4, #0x14] - add r0, r5, #0 - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x14] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x14] - mov r1, #4 - bl sub_0200D3CC - mov r0, #3 - str r0, [r4, #0x6c] - mov r0, #0x19 - lsl r0, r0, #4 - str r0, [r4, #0x70] - ldr r0, _022323DC ; =0x000005DC - ldr r1, _022323E0 ; =ov12_0223223C - str r0, [r4, #0x74] - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [r4, #0x78] - ldr r0, [r4, #0] - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022323DC: .word 0x000005DC -_022323E0: .word ov12_0223223C - thumb_func_end ov12_02232378 - - thumb_func_start ov12_022323E4 -ov12_022323E4: ; 0x022323E4 - push {r3, lr} - sub sp, #8 - ldr r1, [r0, #0x34] - cmp r1, #3 - bhi _0223242C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022323FA: ; jump table - .short _02232402 - _022323FA - 2 ; case 0 - .short _0223241A - _022323FA - 2 ; case 1 - .short _02232402 - _022323FA - 2 ; case 2 - .short _0223241A - _022323FA - 2 ; case 3 -_02232402: - mov r1, #0x20 - str r1, [sp] - mov r1, #6 - str r1, [sp, #4] - mov r1, #0 - add r0, #0x10 - add r2, r1, #0 - add r3, r1, #0 - bl ov12_02225BC8 - add sp, #8 - pop {r3, pc} -_0223241A: - mov r1, #0 - str r1, [sp] - mov r2, #6 - str r2, [sp, #4] - add r0, #0x10 - add r2, r1, #0 - mov r3, #0x20 - bl ov12_02225BC8 -_0223242C: - add sp, #8 - pop {r3, pc} - thumb_func_end ov12_022323E4 - - thumb_func_start ov12_02232430 -ov12_02232430: ; 0x02232430 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02232446 - cmp r0, #1 - beq _02232454 - cmp r0, #2 - beq _0223248C - pop {r4, pc} -_02232446: - add r0, r4, #0 - bl ov12_022323E4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02232454: - add r0, r4, #0 - add r0, #0x10 - bl ov12_02225C14 - cmp r0, #0 - beq _02232474 - mov r2, #0xc - mov r3, #0xe - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - ldr r1, [r4, #8] - add r0, #0x10 - bl ov12_02225A18 - pop {r4, pc} -_02232474: - ldr r0, [r4, #0x34] - add r0, r0, #1 - str r0, [r4, #0x34] - cmp r0, #4 - bge _02232484 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} -_02232484: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_0223248C: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov12_02232430 - - thumb_func_start ov12_0223249C -ov12_0223249C: ; 0x0223249C - push {r3, r4, r5, lr} - mov r1, #0x38 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #4] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0xc] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0xe] - mov r0, #0 - str r0, [r4, #0x34] - ldr r0, [r4, #4] - ldr r1, _022324DC ; =ov12_02232430 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022324DC: .word ov12_02232430 - thumb_func_end ov12_0223249C - - thumb_func_start ov12_022324E0 -ov12_022324E0: ; 0x022324E0 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #0] - cmp r0, #6 - bhi _02232542 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022324FA: ; jump table - .short _02232508 - _022324FA - 2 ; case 0 - .short _02232526 - _022324FA - 2 ; case 1 - .short _0223259E - _022324FA - 2 ; case 2 - .short _022325E2 - _022324FA - 2 ; case 3 - .short _02232620 - _022324FA - 2 ; case 4 - .short _02232668 - _022324FA - 2 ; case 5 - .short _02232698 - _022324FA - 2 ; case 6 -_02232508: - add r0, r4, #0 - add r0, #0x14 - mov r1, #1 - mov r2, #0x40 - bl ov12_022263A4 - ldr r1, [r4, #0x20] - ldr r0, [r4, #8] - add sp, #8 - mul r0, r1 - str r0, [r4, #0x20] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02232526: - mov r2, #0x12 - ldrsh r2, [r4, r2] - mov r1, #0x10 - add r0, r4, #0 - add r2, #8 - lsl r2, r2, #0x10 - ldrsh r1, [r4, r1] - ldr r3, [r4, #0xc] - add r0, #0x14 - asr r2, r2, #0x10 - bl ov12_02225BA0 - cmp r0, #0 - beq _02232544 -_02232542: - b _022326A6 -_02232544: - mov r2, #0x10 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x12 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02007DEC - mov r0, #0x10 - ldrsh r1, [r4, r0] - mov r3, #0 - mov r0, #2 - add r2, r1, #0 - str r3, [sp] - add r2, #0x20 - str r0, [sp, #4] - add r0, r4, #0 - lsl r2, r2, #0x10 - add r0, #0x14 - asr r2, r2, #0x10 - bl ov12_02225BC8 - ldr r1, [r4, #0x1c] - ldr r0, [r4, #8] - mul r0, r1 - str r0, [r4, #0x1c] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225C14 - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_0223259E: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225C14 - cmp r0, #0 - beq _022325BA - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_022325BA: - mov r0, #0x3c - ldrsh r1, [r4, r0] - mov r3, #0 - mov r0, #2 - str r3, [sp] - str r0, [sp, #4] - ldr r2, [r4, #8] - add r0, r4, #0 - lsl r2, r2, #5 - add r2, r1, r2 - lsl r2, r2, #0x10 - add r0, #0x40 - asr r2, r2, #0x10 - bl ov12_02225BC8 - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_022325E2: - add r0, r4, #0 - add r0, #0x40 - bl ov12_02225C14 - cmp r0, #0 - beq _022325FE - mov r2, #0x40 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x38] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_022325FE: - mov r3, #0 - str r3, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r1, #0x14 - mov r2, #0x10 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - add r0, #0x14 - bl ov12_02225BC8 - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02232620: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02225C14 - cmp r0, #0 - ldr r0, [r4, #0xc] - beq _0223263C - mov r2, #0x14 - ldrsh r2, [r4, r2] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_0223263C: - mov r2, #0x10 - ldrsh r2, [r4, r2] - mov r1, #0 - bl sub_02007DEC - mov r3, #0 - str r3, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r1, #0x40 - mov r2, #0x3c - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - add r0, #0x40 - bl ov12_02225BC8 - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02232668: - add r0, r4, #0 - add r0, #0x40 - bl ov12_02225C14 - cmp r0, #0 - ldr r0, [r4, #0x38] - beq _02232684 - mov r2, #0x40 - ldrsh r2, [r4, r2] - mov r1, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, pc} -_02232684: - mov r2, #0x3c - ldrsh r2, [r4, r2] - mov r1, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02232698: - ldr r0, [r4, #4] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_022326A6: - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_022324E0 - - thumb_func_start ov12_022326AC -ov12_022326AC: ; 0x022326AC - push {r3, r4, r5, lr} - mov r1, #0x64 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #4] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_02225964 - str r0, [r4, #8] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0xc] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x10] - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x12] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov12_022232FC - str r0, [r4, #0x38] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x3c] - ldr r0, [r4, #0x38] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x3e] - ldr r0, [r4, #4] - ldr r1, _0223271C ; =ov12_022324E0 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_0223271C: .word ov12_022324E0 - thumb_func_end ov12_022326AC - - thumb_func_start ov12_02232720 -ov12_02232720: ; 0x02232720 - push {lr} - sub sp, #0xc - mov r1, #0 - str r1, [r0, #0x40] - mov r1, #8 - str r1, [sp] - mov r1, #0xa - str r1, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - add r0, #0x1c - mov r2, #9 - add r3, r1, #0 - bl ov12_02225EF0 - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov12_02232720 - - thumb_func_start ov12_02232744 -ov12_02232744: ; 0x02232744 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x40] - mov r5, #0 - cmp r0, #3 - bhi _02232836 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223275E: ; jump table - .short _02232766 - _0223275E - 2 ; case 0 - .short _022327AC - _0223275E - 2 ; case 1 - .short _022327EE - _0223275E - 2 ; case 2 - .short _02232834 - _0223275E - 2 ; case 3 -_02232766: - add r0, r4, #0 - ldr r1, [r4, #0x18] - add r0, #0x1c - bl ov12_022260E8 - cmp r0, #0 - beq _0223278A - add r0, r5, #0 - str r0, [sp] - mov r1, #0x44 - mov r2, #0x46 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - ldr r3, [r4, #0x30] - bl ov12_02226024 - b _02232836 -_0223278A: - ldr r0, [r4, #0x40] - mov r1, #9 - add r0, r0, #1 - str r0, [r4, #0x40] - mov r0, #0xf - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - add r4, #0x1c - str r0, [sp, #8] - add r0, r4, #0 - mov r2, #0xb - mov r3, #8 - bl ov12_02225EF0 - b _02232836 -_022327AC: - add r0, r4, #0 - ldr r1, [r4, #0x18] - add r0, #0x1c - bl ov12_022260E8 - cmp r0, #0 - beq _022327D0 - add r0, r5, #0 - str r0, [sp] - mov r1, #0x44 - mov r2, #0x46 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - ldr r3, [r4, #0x30] - bl ov12_02226024 - b _02232836 -_022327D0: - ldr r0, [r4, #0x40] - mov r2, #0xa - add r0, r0, #1 - str r0, [r4, #0x40] - str r2, [sp] - str r2, [sp, #4] - mov r0, #2 - add r4, #0x1c - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xb - mov r3, #0xf - bl ov12_02225EF0 - b _02232836 -_022327EE: - add r0, r4, #0 - ldr r1, [r4, #0x18] - add r0, #0x1c - bl ov12_022260E8 - cmp r0, #0 - beq _02232812 - add r0, r5, #0 - str r0, [sp] - mov r1, #0x44 - mov r2, #0x46 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x18] - ldr r3, [r4, #0x30] - bl ov12_02226024 - b _02232836 -_02232812: - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #0x18] - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0x18] - add r2, #0xf3 - bl sub_02007DEC - ldr r0, [r4, #0x40] - mov r5, #1 - add r0, r0, #1 - str r0, [r4, #0x40] - b _02232836 -_02232834: - mov r5, #1 -_02232836: - add r0, r5, #0 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov12_02232744 - - thumb_func_start ov12_0223283C -ov12_0223283C: ; 0x0223283C - push {r3, r4, r5, lr} - add r4, r2, #0 - mov r2, #0 - str r2, [r1, #0] - add r5, r0, #0 - mov r1, #0x64 - bl sub_0200D474 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D460 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D3F4 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D390 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D3A4 - add r0, r5, #0 - mov r1, #0 - bl sub_0200D364 - add r0, r5, #0 - mov r1, #0 - bl sub_0200D3CC - mov r1, #0x37 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_0200D34C - pop {r3, r4, r5, pc} - thumb_func_end ov12_0223283C - - thumb_func_start ov12_02232888 -ov12_02232888: ; 0x02232888 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - mov r4, #0 - cmp r1, #0 - beq _0223289A - cmp r1, #1 - beq _022328AC - b _022328B0 -_0223289A: - bl sub_0200D3B8 - cmp r0, #0 - bne _022328B2 - ldr r0, [r5, #0] - mov r4, #1 - add r0, r0, #1 - str r0, [r5, #0] - b _022328B2 -_022328AC: - mov r4, #1 - b _022328B2 -_022328B0: - mov r4, #1 -_022328B2: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02232888 - - thumb_func_start ov12_022328B8 -ov12_022328B8: ; 0x022328B8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - ldr r0, [r6, #0xc] - cmp r0, #5 - bls _022328C6 - b _022329D8 -_022328C6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022328D2: ; jump table - .short _022328DE - _022328D2 - 2 ; case 0 - .short _02232902 - _022328D2 - 2 ; case 1 - .short _0223293A - _022328D2 - 2 ; case 2 - .short _0223296A - _022328D2 - 2 ; case 3 - .short _02232990 - _022328D2 - 2 ; case 4 - .short _022329B6 - _022328D2 - 2 ; case 5 -_022328DE: - add r0, r6, #0 - bl ov12_02232720 - ldr r0, [r6, #0x10] - add r1, r6, #0 - lsl r2, r0, #2 - add r0, r6, r2 - add r1, #0x60 - add r1, r1, r2 - mov r2, #2 - ldr r0, [r0, #0x48] - lsl r2, r2, #0xc - bl ov12_0223283C - ldr r0, [r6, #0xc] - add r0, r0, #1 - str r0, [r6, #0xc] - b _022329D8 -_02232902: - add r0, r6, #0 - bl ov12_02232744 - add r4, r0, #0 - ldr r0, [r6, #0x10] - add r1, r6, #0 - lsl r2, r0, #2 - add r0, r6, r2 - add r1, #0x60 - ldr r0, [r0, #0x48] - add r1, r1, r2 - bl ov12_02232888 - cmp r4, r0 - bne _022329D8 - cmp r4, #1 - bne _022329D8 - ldr r0, [r6, #0x10] - mov r1, #1 - lsl r0, r0, #2 - add r0, r6, r0 - ldr r0, [r0, #0x48] - bl sub_0200D364 - ldr r0, [r6, #0xc] - add r0, r0, #1 - str r0, [r6, #0xc] - b _022329D8 -_0223293A: - ldr r0, [r6, #0x10] - add r2, r6, #0 - add r2, #0x78 - lsl r1, r0, #2 - ldr r0, [r2, r1] - sub r0, r0, #1 - str r0, [r2, r1] - ldr r1, [r6, #0x10] - lsl r0, r1, #2 - add r0, r6, r0 - ldr r0, [r0, #0x78] - cmp r0, #0 - bge _022329D8 - add r0, r1, #1 - str r0, [r6, #0x10] - cmp r0, #6 - bge _02232962 - mov r0, #0 - str r0, [r6, #0xc] - b _022329D8 -_02232962: - ldr r0, [r6, #0xc] - add r0, r0, #1 - str r0, [r6, #0xc] - b _022329D8 -_0223296A: - add r4, r6, #0 - mov r7, #0 - add r4, #0x60 - add r5, r6, #0 -_02232972: - mov r2, #2 - ldr r0, [r5, #0x48] - add r1, r4, #0 - lsl r2, r2, #0xc - bl ov12_0223283C - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #6 - blt _02232972 - ldr r0, [r6, #0xc] - add r0, r0, #1 - str r0, [r6, #0xc] - b _022329D8 -_02232990: - add r4, r6, #0 - mov r7, #0 - add r4, #0x60 - add r5, r6, #0 -_02232998: - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl ov12_02232888 - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #6 - blt _02232998 - cmp r0, #1 - bne _022329D8 - ldr r0, [r6, #0xc] - add r0, r0, #1 - str r0, [r6, #0xc] - b _022329D8 -_022329B6: - mov r5, #0 - add r4, r6, #0 -_022329BA: - ldr r0, [r4, #0x48] - bl sub_0200D0F4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #6 - blt _022329BA - ldr r0, [r6, #0] - add r1, r7, #0 - bl ov12_02220220 - add r0, r6, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_022329D8: - ldr r0, [r6, #8] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022328B8 - - thumb_func_start ov12_022329E0 -ov12_022329E0: ; 0x022329E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - str r1, [sp] - mov r1, #0x90 - add r4, r0, #0 - str r2, [sp, #4] - str r3, [sp, #8] - bl ov12_02235E50 - ldr r1, [sp] - str r4, [r0, #0] - str r1, [r0, #4] - ldr r1, [sp, #4] - str r0, [sp, #0x14] - str r1, [r0, #8] - ldr r0, [r0, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - bl ov12_022232FC - ldr r1, [sp, #0x14] - str r0, [r1, #0x18] - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - ldr r0, [sp, #0x14] - mov r1, #1 - ldr r0, [r0, #0x18] - bl sub_020080C0 - ldr r1, [sp, #0x14] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add r1, #0x44 - str r0, [sp, #0xc] - strh r0, [r1] - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - bl ov12_02223354 - ldr r1, [sp, #0x14] - add r1, #0x46 - strh r0, [r1] - ldr r1, [sp, #0x14] - add r0, sp, #0x1c - ldr r1, [r1, #0] - bl ov12_0222329C - ldr r5, [sp, #0x14] - mov r4, #0 -_02232A58: - cmp r4, #0 - bne _02232A60 - ldr r0, [sp, #8] - b _02232A6A -_02232A60: - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, sp, #0x1c - bl sub_0200CE6C -_02232A6A: - str r0, [r5, #0x48] - ldr r0, [r5, #0x48] - mov r1, #0 - bl sub_0200D3F4 - lsr r0, r4, #0x1f - add r0, r4, r0 - asr r1, r0, #1 - ldr r0, _02232B30 ; =0x00001555 - mov r2, #3 - mul r0, r1 - asr r0, r0, #4 - lsl r0, r0, #2 - ldr r1, _02232B34 ; =0x020F983C - str r0, [sp, #0x18] - add r1, r1, r0 - mov r0, #2 - ldrsh r0, [r1, r0] - lsl r2, r2, #0x10 - mov r3, #0 - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r2, r0, r2 - ldr r0, _02232B38 ; =0x00000000 - adc r1, r0 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - lsl r0, r1, #4 - asr r6, r0, #0x10 - mov r2, #3 - ldr r1, _02232B34 ; =0x020F983C - ldr r0, [sp, #0x18] - lsl r2, r2, #0x10 - ldrsh r0, [r1, r0] - mov r3, #0 - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _02232B38 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - lsl r0, r0, #4 - asr r0, r0, #0x10 - str r0, [sp, #0x10] - lsr r2, r4, #0x1f - lsl r1, r4, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - bne _02232AF2 - add r0, r7, r6 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r5, #0x48] - mov r1, #1 - bl sub_0200D7D4 - b _02232AF8 -_02232AF2: - sub r0, r7, r6 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 -_02232AF8: - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x10] - sub r0, r1, r0 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - ldr r0, [r5, #0x48] - add r1, r6, #0 - bl sub_0200D4C4 - cmp r4, #2 - bge _02232B12 - mov r0, #8 - b _02232B14 -_02232B12: - mov r0, #0 -_02232B14: - add r4, r4, #1 - str r0, [r5, #0x78] - add r5, r5, #4 - cmp r4, #6 - blt _02232A58 - ldr r0, [sp, #0x14] - ldr r1, _02232B3C ; =ov12_022328B8 - ldr r0, [r0, #0] - ldr r2, [sp, #0x14] - bl ov12_022201E8 - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - nop -_02232B30: .word 0x00001555 -_02232B34: .word 0x020F983C -_02232B38: .word 0x00000000 -_02232B3C: .word ov12_022328B8 - thumb_func_end ov12_022329E0 - - thumb_func_start ov12_02232B40 -ov12_02232B40: ; 0x02232B40 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #5 - bhi _02232B80 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02232B5A: ; jump table - .short _02232B66 - _02232B5A - 2 ; case 0 - .short _02232B76 - _02232B5A - 2 ; case 1 - .short _02232BD6 - _02232B5A - 2 ; case 2 - .short _02232C32 - _02232B5A - 2 ; case 3 - .short _02232C62 - _02232B5A - 2 ; case 4 - .short _02232C86 - _02232B5A - 2 ; case 5 -_02232B66: - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_0200D390 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02232C9E -_02232B76: - ldr r0, [r4, #0x5c] - bl sub_0200D3B8 - cmp r0, #0 - beq _02232B82 -_02232B80: - b _02232C9E -_02232B82: - ldr r0, [r4, #0x5c] - mov r1, #0 - bl sub_0200D390 - ldr r0, [r4, #0xc] - mov r1, #0xa - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - add r0, #0x14 - add r2, r1, #0 - mov r3, #0 - bl ov12_02225E68 - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - add r5, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - add r3, r0, #0 - mov r0, #0x8a - ldrsh r0, [r4, r0] - lsl r1, r5, #0x10 - lsl r3, r3, #0x10 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r2, #0x88 - add r0, r4, #0 - ldrsh r2, [r4, r2] - add r0, #0x38 - asr r1, r1, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - b _02232C9E -_02232BD6: - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x38 - bl ov12_02225C74 - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x14 - bl ov12_022260C8 - cmp r0, #0 - bne _02232C9E - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #0x10] - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0x10] - add r2, #0xf3 - bl sub_02007DEC - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_0200D364 - mov r1, #1 - ldr r0, [r4, #0x5c] - lsl r1, r1, #0xc - bl sub_0200D3A4 - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_0200D390 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02232C9E -_02232C32: - ldr r0, [r4, #0x5c] - bl sub_0200D3B8 - cmp r0, #0 - bne _02232C9E - ldr r0, [r4, #0x5c] - mov r1, #0 - bl sub_0200D390 - ldr r0, [r4, #0xc] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #0xc] - str r1, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r3, #0x8a - add r0, r4, #0 - ldrsh r3, [r4, r3] - add r0, #0x60 - add r2, r1, #0 - bl ov12_02225BC8 - b _02232C9E -_02232C62: - add r0, r4, #0 - add r0, #0x60 - bl ov12_02225C14 - cmp r0, #0 - beq _02232C7E - mov r1, #0x88 - mov r2, #0x62 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x5c] - bl sub_0200D4C4 - b _02232C9E -_02232C7E: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02232C9E -_02232C86: - ldr r0, [r4, #0x5c] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, pc} -_02232C9E: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02232B40 - - thumb_func_start ov12_02232CA8 -ov12_02232CA8: ; 0x02232CA8 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x8c - add r5, r0, #0 - str r2, [sp] - add r6, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - ldr r0, [sp] - str r7, [r4, #4] - str r0, [r4, #8] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #6 - mov r2, #0 - str r0, [r4, #0x10] - bl sub_02007DEC - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0 - bl ov12_022258E0 - add r1, r4, #0 - add r1, #0x88 - strh r0, [r1] - add r0, r5, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #1 - bl ov12_022258E0 - add r1, r4, #0 - add r1, #0x8a - strh r0, [r1] - str r6, [r4, #0x5c] - add r0, r6, #0 - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_0200D460 - mov r1, #0x88 - mov r2, #0x8a - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x5c] - bl sub_0200D4C4 - ldr r0, [r4, #0] - ldr r1, _02232D34 ; =ov12_02232B40 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02232D34: .word ov12_02232B40 - thumb_func_end ov12_02232CA8 - - thumb_func_start ov12_02232D38 -ov12_02232D38: ; 0x02232D38 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - add r0, r1, #0 - bl ov12_02225950 - mov r1, #1 - add r2, r1, #0 - lsl r2, r0 - mov r0, #0 - lsl r2, r2, #0x10 - add r4, #0xc4 - str r0, [sp] - ldr r0, [r4, #0] - mov r1, #2 - lsr r2, r2, #0x10 - mov r3, #8 - bl sub_02003A2C - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02232D38 - - thumb_func_start ov12_02232D64 -ov12_02232D64: ; 0x02232D64 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r1, #0xa - mov r0, #0x14 - str r0, [sp] - str r1, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x28 - add r2, r1, #0 - add r3, r1, #0 - bl ov12_02225EF0 - mov r0, #4 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xa - add r0, #0x4c - add r2, r1, #0 - mov r3, #1 - bl ov12_02225E68 - add r0, r4, #0 - mov r1, #0 - add r0, #0x94 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #6 - add r0, #0x98 - str r1, [r0, #0] - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - add r1, r0, #0 - lsl r2, r1, #1 - ldr r1, _02232E00 ; =0x0223A1CC - ldr r0, [r4, #0x20] - ldrh r1, [r1, r2] - bl sub_0200D3F4 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_0200D3F4 - add r0, r4, #0 - add r0, #0x28 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov12_02225FA4 - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _02232DE8 - ldr r1, [sp, #0x10] - mov r0, #0 - bl sub_020E1A9C - str r0, [sp, #0x10] -_02232DE8: - ldr r0, [r4, #0x18] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl sub_0200D6E8 - ldr r1, [r4, #0x18] - add r0, r4, #0 - bl ov12_02232D38 - add sp, #0x14 - pop {r3, r4, pc} - nop -_02232E00: .word 0x0223A1CC - thumb_func_end ov12_02232D64 - - thumb_func_start ov12_02232E04 -ov12_02232E04: ; 0x02232E04 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - add r0, #0x94 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - beq _02232E20 - cmp r0, #1 - beq _02232EA8 - cmp r0, #2 - bne _02232E1E - b _02232F28 -_02232E1E: - b _02232F2A -_02232E20: - add r0, r5, #0 - add r0, #0x28 - bl ov12_02225F6C - add r0, r5, #0 - add r0, #0x28 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov12_02225FA4 - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _02232E48 - ldr r1, [sp, #0x10] - add r0, r4, #0 - bl sub_020E1A9C - str r0, [sp, #0x10] -_02232E48: - ldr r0, [r5, #0x18] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl sub_0200D6E8 - mov r0, #0 - str r0, [sp] - ldr r1, [r5, #0x14] - ldr r2, [r5, #0x10] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #0x18] - ldr r3, [r5, #0x3c] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_0222605C - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - bge _02232F2A - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - mov r3, #0x14 - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x94 - str r1, [r0, #0] - str r3, [sp] - mov r1, #0xa - str r1, [sp, #4] - mov r0, #4 - add r5, #0x28 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #1 - bl ov12_02225EF0 - b _02232F2A -_02232EA8: - add r0, r5, #0 - add r0, #0x28 - bl ov12_02225F6C - add r0, r5, #0 - add r0, #0x4c - bl ov12_02225EB8 - cmp r0, #0 - beq _02232F06 - mov r0, #0x4c - ldrsh r0, [r5, r0] - add r1, sp, #0x10 - add r2, sp, #0xc - strh r0, [r5, #0x28] - add r0, r5, #0 - add r0, #0x28 - bl ov12_02225FA4 - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _02232EE2 - ldr r1, [sp, #0x10] - add r0, r4, #0 - bl sub_020E1A9C - str r0, [sp, #0x10] -_02232EE2: - ldr r0, [r5, #0x18] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl sub_0200D6E8 - mov r0, #0 - str r0, [sp] - ldr r1, [r5, #0x14] - ldr r2, [r5, #0x10] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #0x18] - ldr r3, [r5, #0x3c] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_0222605C - b _02232F2A -_02232F06: - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x94 - str r1, [r0, #0] - ldr r0, [r5, #0x20] - add r1, r4, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x18] - add r1, r4, #0 - bl sub_0200D3F4 - mov r4, #1 - b _02232F2A -_02232F28: - mov r4, #1 -_02232F2A: - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov12_02232E04 - - thumb_func_start ov12_02232F30 -ov12_02232F30: ; 0x02232F30 - push {r4, lr} - sub sp, #0x18 - add r4, r0, #0 - add r1, sp, #0xc - ldr r0, [r4, #0x1c] - add r1, #2 - add r2, sp, #0xc - bl sub_0200D550 - add r1, sp, #0xc - mov r0, #0 - ldrsh r3, [r1, r0] - mov r0, #2 - ldrsh r1, [r1, r0] - mov r0, #8 - str r3, [sp] - sub r3, #0x40 - str r0, [sp, #4] - add r0, r4, #0 - lsl r3, r3, #0x10 - add r0, #0x70 - add r2, r1, #0 - asr r3, r3, #0x10 - bl ov12_02225BC8 - mov r2, #0xa - str r2, [sp] - str r2, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x28 - mov r1, #2 - mov r3, #0x14 - bl ov12_02225EF0 - add r0, r4, #0 - add r0, #0x28 - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov12_02225FA4 - add r0, r4, #0 - add r0, #0xcc - ldr r0, [r0, #0] - cmp r0, #1 - bne _02232F98 - ldr r1, [sp, #0x14] - mov r0, #0 - bl sub_020E1A9C - str r0, [sp, #0x14] -_02232F98: - ldr r0, [r4, #0x1c] - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - bl sub_0200D6E8 - add r0, r4, #0 - ldr r1, [r4, #0x1c] - add r0, #0x70 - bl ov12_02225C50 - add r0, r4, #0 - mov r1, #0 - add r0, #0x94 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #6 - add r0, #0x98 - str r1, [r0, #0] - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - add r1, r0, #0 - lsl r2, r1, #1 - ldr r1, _02232FEC ; =0x0223A1CC - ldr r0, [r4, #0x24] - ldrh r1, [r1, r2] - bl sub_0200D3F4 - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_0200D3F4 - ldr r1, [r4, #0x1c] - add r0, r4, #0 - bl ov12_02232D38 - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 -_02232FEC: .word 0x0223A1CC - thumb_func_end ov12_02232F30 - - thumb_func_start ov12_02232FF0 -ov12_02232FF0: ; 0x02232FF0 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r0, #0x94 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - beq _0223300A - cmp r0, #1 - beq _0223303A - cmp r0, #2 - beq _0223308C - b _0223308E -_0223300A: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x1c] - add r0, #0x70 - bl ov12_02225C50 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - bge _0223308E - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r5, #0x94 - add r0, r0, #1 - str r0, [r5, #0] - b _0223308E -_0223303A: - add r0, r5, #0 - ldr r1, [r5, #0x1c] - add r0, #0x70 - bl ov12_02225C50 - add r0, r5, #0 - add r0, #0x28 - bl ov12_02225F6C - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x28 - add r1, sp, #4 - add r2, sp, #0 - bl ov12_02225FA4 - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - cmp r0, #1 - bne _0223306E - ldr r1, [sp, #4] - add r0, r4, #0 - bl sub_020E1A9C - str r0, [sp, #4] -_0223306E: - ldr r0, [r5, #0x1c] - ldr r1, [sp, #4] - ldr r2, [sp] - bl sub_0200D6E8 - cmp r6, #0 - bne _0223308E - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r5, #0x94 - add r0, r0, #1 - str r0, [r5, #0] - mov r4, #1 - b _0223308E -_0223308C: - mov r4, #1 -_0223308E: - add r0, r4, #0 - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02232FF0 - - thumb_func_start ov12_02233094 -ov12_02233094: ; 0x02233094 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r0, #6 - bhi _0223316E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022330AE: ; jump table - .short _022330BC - _022330AE - 2 ; case 0 - .short _022330E0 - _022330AE - 2 ; case 1 - .short _022330FA - _022330AE - 2 ; case 2 - .short _02233110 - _022330AE - 2 ; case 3 - .short _02233126 - _022330AE - 2 ; case 4 - .short _0223314C - _022330AE - 2 ; case 5 - .short _02233160 - _022330AE - 2 ; case 6 -_022330BC: - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x10 - bl ov12_02235780 - mov r2, #8 - str r2, [sp] - add r0, r4, #0 - str r2, [sp, #4] - add r0, #0x9c - mov r1, #0 - mov r3, #0x10 - bl ov12_02226424 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223316E -_022330E0: - add r0, r4, #0 - add r0, #0x9c - bl ov12_02226454 - cmp r0, #0 - beq _0223316E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - bl ov12_02232D64 - b _0223316E -_022330FA: - add r0, r4, #0 - bl ov12_02232E04 - cmp r0, #0 - beq _0223316E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #2 - str r0, [r4, #0xc] - b _0223316E -_02233110: - ldr r0, [r4, #0xc] - sub r0, r0, #1 - str r0, [r4, #0xc] - bpl _0223316E - add r0, r4, #0 - bl ov12_02232F30 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223316E -_02233126: - add r0, r4, #0 - bl ov12_02232FF0 - cmp r0, #0 - beq _0223316E - ldr r0, [r4, #8] - mov r1, #8 - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0x10 - str r0, [sp] - add r0, r4, #0 - add r0, #0x9c - mov r2, #0 - add r3, r1, #0 - str r1, [sp, #4] - bl ov12_02226424 - b _0223316E -_0223314C: - add r0, r4, #0 - add r0, #0x9c - bl ov12_02226454 - cmp r0, #0 - beq _0223316E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223316E -_02233160: - ldr r0, [r4, #0] - add r1, r2, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 -_0223316E: - ldr r0, [r4, #4] - bl sub_0200C7EC - add sp, #8 - pop {r4, pc} - thumb_func_end ov12_02233094 - - thumb_func_start ov12_02233178 -ov12_02233178: ; 0x02233178 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0xd0 - add r6, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r6, [r4, #0] - add r0, r6, #0 - bl ov12_022202EC - str r0, [r4, #4] - ldr r0, [r4, #0] - bl ov12_0222332C - add r1, r4, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - add r7, r0, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - add r0, r7, #0 - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - add r0, r7, #0 - mov r1, #0x29 - bl sub_020080C0 - sub r0, r5, r0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [sp, #4] - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - ldr r0, [sp, #4] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [sp, #4] - mov r1, #0x29 - bl sub_020080C0 - sub r0, r6, r0 - lsl r0, r0, #0x10 - str r5, [r4, #0x14] - asr r6, r0, #0x10 - ldr r0, [r4, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x18] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x18] - ldr r1, [sp] - add r2, r5, #0 - bl sub_0200D4C4 - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x18] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x1c] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x1c] - add r1, r7, #0 - add r2, r6, #0 - bl sub_0200D4C4 - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x1c] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x1c] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x1c] - mov r1, #0 - mov r2, #0x28 - bl sub_0200D7E0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_022234A8 - add r1, r4, #0 - add r1, #0xc8 - str r0, [r1, #0] - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022234A8 - add r1, r4, #0 - add r1, #0xcc - str r0, [r1, #0] - ldr r0, [r4, #0] - mov r1, #2 - bl ov12_022202C0 - str r0, [r4, #0x20] - ldr r0, [r4, #0] - mov r1, #3 - bl ov12_022202C0 - str r0, [r4, #0x24] - ldr r0, [r4, #0x20] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x24] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0] - ldr r1, _022332E4 ; =ov12_02233094 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022332E4: .word ov12_02233094 - thumb_func_end ov12_02233178 - - thumb_func_start ov12_022332E8 -ov12_022332E8: ; 0x022332E8 - push {r4, lr} - sub sp, #0x20 - mov r2, #0xa - add r4, r0, #0 - add r0, #0xf8 - mov r1, #0x19 - add r3, r2, #0 - str r2, [sp] - bl ov12_02225E68 - mov r0, #0x3a - ldrsh r0, [r4, r0] - add r1, r4, #0 - mov r3, #0x38 - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - ldr r0, [r4, #0x44] - ldr r2, _02233334 ; =ov12_02225EB8 - str r0, [sp, #0x10] - ldr r0, [r4, #0x40] - add r1, #0xf8 - str r0, [sp, #0x14] - ldr r0, [r4, #0x3c] - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp, #0x1c] - add r0, r4, #0 - ldrsh r3, [r4, r3] - add r0, #0x48 - bl ov12_022261C4 - add sp, #0x20 - pop {r4, pc} - ; .align 2, 0 -_02233334: .word ov12_02225EB8 - thumb_func_end ov12_022332E8 - - thumb_func_start ov12_02233338 -ov12_02233338: ; 0x02233338 - push {r4, lr} - sub sp, #0x20 - add r4, r0, #0 - mov r0, #6 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xa - add r0, #0xf8 - add r2, r1, #0 - mov r3, #0x19 - bl ov12_02225E68 - mov r0, #0x3a - ldrsh r0, [r4, r0] - add r1, r4, #0 - mov r3, #0x38 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - ldr r0, [r4, #0x3c] - ldr r2, _02233390 ; =ov12_02225EB8 - str r0, [sp, #0x10] - ldr r0, [r4, #0x40] - add r1, #0xf8 - str r0, [sp, #0x14] - ldr r0, [r4, #0x44] - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp, #0x1c] - add r0, r4, #0 - ldrsh r3, [r4, r3] - add r0, #0x48 - bl ov12_022261C4 - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_0200D3F4 - add sp, #0x20 - pop {r4, pc} - ; .align 2, 0 -_02233390: .word ov12_02225EB8 - thumb_func_end ov12_02233338 - - thumb_func_start ov12_02233394 -ov12_02233394: ; 0x02233394 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #4 - bhi _0223344C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022333AC: ; jump table - .short _022333B6 - _022333AC - 2 ; case 0 - .short _022333C4 - _022333AC - 2 ; case 1 - .short _022333F2 - _022333AC - 2 ; case 2 - .short _02233416 - _022333AC - 2 ; case 3 - .short _0223342A - _022333AC - 2 ; case 4 -_022333B6: - add r0, r4, #0 - bl ov12_022332E8 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223344C -_022333C4: - add r0, r4, #0 - add r0, #0x48 - bl ov12_02226274 - cmp r0, #0 - bne _0223344C - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0xc] - mov r1, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #6 - str r0, [sp] - add r0, r4, #0 - add r0, #0x14 - mov r2, #0 - mov r3, #1 - bl ov12_02226108 - b _0223344C -_022333F2: - mov r1, #0x38 - mov r2, #0x3a - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x10] - add r0, #0x14 - bl ov12_0222619C - cmp r0, #0 - bne _0223344C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - add r0, r4, #0 - bl ov12_02233338 - b _0223344C -_02233416: - add r0, r4, #0 - add r0, #0x48 - bl ov12_02226274 - cmp r0, #0 - bne _0223344C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223344C -_0223342A: - mov r6, #0 - add r5, r4, #0 -_0223342E: - ldr r0, [r5, #0x3c] - bl sub_0200D0F4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _0223342E - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_02220220 - pop {r3, r4, r5, r6, r7, pc} -_0223344C: - ldr r0, [r4, #8] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02233394 - - thumb_func_start ov12_02233454 -ov12_02233454: ; 0x02233454 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r6, r1, #0 - mov r1, #0x47 - lsl r1, r1, #2 - add r5, r0, #0 - str r2, [sp] - add r7, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - ldr r0, [sp] - str r6, [r4, #4] - str r0, [r4, #8] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x38] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x3a] - ldr r0, [r4, #0x10] - mov r1, #0x29 - bl sub_020080C0 - mov r1, #0x3a - ldrsh r1, [r4, r1] - sub r0, r1, r0 - strh r0, [r4, #0x3a] - add r0, sp, #4 - add r1, r5, #0 - bl ov12_0222329C - mov r6, #0 - add r5, r4, #0 -_022334B0: - cmp r6, #0 - bne _022334C0 - add r0, r7, #0 - mov r1, #1 - str r7, [r5, #0x3c] - bl sub_0200D364 - b _022334D2 -_022334C0: - ldr r0, [r4, #4] - ldr r1, [r4, #8] - add r2, sp, #4 - bl sub_0200CE6C - mov r1, #1 - str r0, [r5, #0x3c] - bl sub_0200D810 -_022334D2: - ldr r0, [r5, #0x3c] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0x3c] - mov r1, #1 - bl sub_0200D460 - mov r1, #0x38 - mov r2, #0x3a - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x3c] - bl sub_0200D4C4 - ldr r0, [r5, #0x3c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x3c] - mov r1, #2 - bl sub_0200D6A4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _022334B0 - ldr r0, [r4, #0] - ldr r1, _02233518 ; =ov12_02233394 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02233518: .word ov12_02233394 - thumb_func_end ov12_02233454 - - thumb_func_start ov12_0223351C -ov12_0223351C: ; 0x0223351C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r7, #0 - add r6, r5, #0 - str r1, [sp, #0x10] - add r6, #0x30 - add r4, r7, #0 -_0223352C: - mov r0, #0 - str r0, [sp] - mov r0, #0x32 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0 - str r0, [sp, #0xc] - ldr r2, _0223356C ; =0x00007FFF - add r0, r6, #0 - add r3, r1, #0 - bl ov12_02225A5C - ldr r0, [r5, #0x38] - add r7, r7, #1 - add r0, r0, r4 - str r0, [r5, #0x38] - ldr r1, [r5, #0x48] - ldr r0, [sp, #0x10] - add r6, #0x24 - mul r0, r1 - str r0, [r5, #0x48] - ldr r0, _02233570 ; =0x00002AAA - add r5, #0x24 - add r4, r4, r0 - cmp r7, #6 - blt _0223352C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223356C: .word 0x00007FFF -_02233570: .word 0x00002AAA - thumb_func_end ov12_0223351C - - thumb_func_start ov12_02233574 -ov12_02233574: ; 0x02233574 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - mov r0, #0 - str r0, [sp, #4] - add r0, r6, #0 - str r0, [sp] - add r0, #0x30 - str r0, [sp] - add r5, r6, #0 - add r4, r6, #0 -_0223358A: - ldr r0, [sp] - bl ov12_02225AE0 - ldr r1, [r5, #0x38] - mov r2, #0xa - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02233630 ; =0x020F983C - ldr r3, [r6, #0x14] - ldrsh r0, [r0, r1] - lsl r2, r2, #0xc - mul r2, r3 - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r3, r1, #0 - mov r1, #0x13 - lsl r1, r1, #4 - mov r2, #0x30 - add r7, r0, #0 - ldrsh r1, [r6, r1] - ldrsh r2, [r5, r2] - ldr r0, [r4, #0x18] - add r1, r1, r2 - ldr r2, _02233634 ; =0x00000132 - lsl r1, r1, #0x10 - ldrsh r2, [r6, r2] - asr r1, r1, #0x10 - mov ip, r2 - mov r2, #2 - lsl r2, r2, #0xa - add r7, r7, r2 - ldr r2, _02233638 ; =0x00000000 - adc r3, r2 - lsl r2, r3, #0x14 - lsr r3, r7, #0xc - orr r3, r2 - lsl r2, r3, #4 - asr r2, r2, #0x10 - mov r3, ip - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r1, [r5, #0x38] - ldr r0, _0223363C ; =0x00003FFF - cmp r1, r0 - blt _02233606 - ldr r0, _02233640 ; =0x0000BF49 - cmp r1, r0 - bgt _02233606 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_0200D460 - b _02233616 -_02233606: - ldr r0, [r6, #0] - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r4, #0x18] - add r1, r1, #1 - bl sub_0200D460 -_02233616: - ldr r0, [sp] - add r5, #0x24 - add r0, #0x24 - str r0, [sp] - ldr r0, [sp, #4] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #6 - blt _0223358A - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02233630: .word 0x020F983C -_02233634: .word 0x00000132 -_02233638: .word 0x00000000 -_0223363C: .word 0x00003FFF -_02233640: .word 0x0000BF49 - thumb_func_end ov12_02233574 - - thumb_func_start ov12_02233644 -ov12_02233644: ; 0x02233644 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #4 - bhi _0223372A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223365E: ; jump table - .short _02233668 - _0223365E - 2 ; case 0 - .short _0223369E - _0223365E - 2 ; case 1 - .short _022336BE - _0223365E - 2 ; case 2 - .short _022336EA - _0223365E - 2 ; case 3 - .short _02233706 - _0223365E - 2 ; case 4 -_02233668: - ldr r0, [r4, #0] - mov r1, #1 - mov r2, #0xf - bl ov12_02235780 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, #0xfe - add r0, r4, r0 - mov r1, #1 - mov r2, #0x10 - mov r3, #0xf - bl ov12_02226424 - ldr r1, [r4, #0x14] - add r0, r4, #0 - bl ov12_0223351C - add r0, r4, #0 - bl ov12_02233574 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223372A -_0223369E: - add r0, r4, #0 - bl ov12_02233574 - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov12_02226454 - cmp r0, #0 - beq _0223372A - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0x1c - str r0, [r4, #0x10] - b _0223372A -_022336BE: - add r0, r4, #0 - bl ov12_02233574 - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - bpl _0223372A - ldr r0, [r4, #0xc] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0xf - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, #0xfe - add r0, r4, r0 - mov r2, #1 - mov r3, #0 - bl ov12_02226424 - b _0223372A -_022336EA: - add r0, r4, #0 - bl ov12_02233574 - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov12_02226454 - cmp r0, #0 - beq _0223372A - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223372A -_02233706: - mov r6, #0 - add r5, r4, #0 -_0223370A: - ldr r0, [r5, #0x18] - bl sub_0200D0F4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #6 - blt _0223370A - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_02220220 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0223372A: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02233644 - - thumb_func_start ov12_02233734 -ov12_02233734: ; 0x02233734 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r1, #0 - mov r1, #0x4d - lsl r1, r1, #2 - add r4, r0, #0 - str r2, [sp] - add r7, r3, #0 - bl ov12_02235E50 - add r6, r0, #0 - str r4, [r6, #0] - ldr r0, [sp] - str r5, [r6, #4] - str r0, [r6, #8] - add r0, r4, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - mov r1, #0 - add r5, r0, #0 - bl sub_020080C0 - mov r1, #0x13 - lsl r1, r1, #4 - strh r0, [r6, r1] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - ldr r1, _022337D8 ; =0x00000132 - strh r0, [r6, r1] - add r0, sp, #4 - add r1, r4, #0 - bl ov12_0222329C - mov r4, #0 - add r5, r6, #0 -_02233786: - cmp r4, #0 - bne _0223378E - str r7, [r5, #0x18] - b _0223379A -_0223378E: - ldr r0, [r6, #4] - ldr r1, [r6, #8] - add r2, sp, #4 - bl sub_0200CE6C - str r0, [r5, #0x18] -_0223379A: - ldr r0, [r5, #0x18] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D390 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02233786 - ldr r0, [r6, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_02225964 - str r0, [r6, #0x14] - ldr r0, [r6, #0] - ldr r1, _022337DC ; =ov12_02233644 - add r2, r6, #0 - bl ov12_022201E8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022337D8: .word 0x00000132 -_022337DC: .word ov12_02233644 - thumb_func_end ov12_02233734 - - thumb_func_start ov12_022337E0 -ov12_022337E0: ; 0x022337E0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r1, #0 - add r1, sp, #8 - add r5, r2, #0 - add r1, #2 - add r2, sp, #8 - add r6, r0, #0 - add r4, r3, #0 - bl sub_0200D550 - add r0, sp, #8 - mov r1, #0 - ldrsh r3, [r0, r1] - mov r1, #2 - ldrsh r2, [r0, r1] - lsl r0, r4, #7 - neg r0, r0 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - lsl r1, r2, #0x10 - lsl r4, r5, #8 - add r2, r2, r4 - str r0, [sp] - mov r0, #0x3b - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - add r0, r6, #0 - mov r1, #1 - bl sub_0200D3F4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_022337E0 - - thumb_func_start ov12_02233834 -ov12_02233834: ; 0x02233834 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - bl ov12_02225C50 - cmp r0, #0 - beq _022338EE - add r1, sp, #8 - add r0, r4, #0 - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - add r1, sp, #8 - mov r0, #2 - ldrsh r0, [r1, r0] - mov r1, #0x5b - lsl r1, r1, #2 - str r0, [sp] - ldr r0, [sp] - mov r2, #0xe - mul r1, r0 - lsl r0, r1, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _022338F4 ; =0x020F983C - lsl r2, r2, #0xc - ldrsh r0, [r0, r1] - mov r3, #0 - asr r7, r0, #0x1f - add r1, r7, #0 - str r0, [sp, #4] - bl sub_020E1F1C - add r3, r0, #0 - add r5, r1, #0 - add r6, sp, #8 - mov r2, #0 - ldrsh r2, [r6, r2] - mov r6, #2 - lsl r6, r6, #0xa - add r0, r4, #0 - add r6, r3, r6 - ldr r3, _022338F8 ; =0x00000000 - ldr r1, [sp] - adc r5, r3 - lsl r3, r5, #0x14 - lsr r5, r6, #0xc - orr r5, r3 - lsl r3, r5, #4 - asr r3, r3, #0x10 - add r2, r2, r3 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r2, #0xae - ldr r0, [sp, #4] - add r1, r7, #0 - lsl r2, r2, #2 - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - neg r0, r1 - bl sub_020E17B4 - ldr r1, _022338FC ; =0x45800000 - bl sub_020E1304 - add r1, r0, #0 - mov r0, #0xfe - lsl r0, r0, #0x16 - bl sub_020E0B00 - add r1, r0, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_0200D6E8 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022338EE: - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022338F4: .word 0x020F983C -_022338F8: .word 0x00000000 -_022338FC: .word 0x45800000 - thumb_func_end ov12_02233834 - - thumb_func_start ov12_02233900 -ov12_02233900: ; 0x02233900 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x9d - add r7, r0, #0 - lsl r1, r1, #2 - ldr r0, [r7, r1] - cmp r0, #0xf - bge _02233948 - sub r0, r1, #4 - ldr r0, [r7, r0] - add r2, r0, #1 - sub r0, r1, #4 - str r2, [r7, r0] - ldr r0, [r7, r0] - cmp r0, #6 - ble _02233948 - mov r2, #0 - sub r0, r1, #4 - str r2, [r7, r0] - ldr r1, [r7, r1] - add r3, r7, #0 - lsl r0, r1, #2 - mov r2, #0x24 - add r0, r7, r0 - add r3, #0x54 - mul r2, r1 - add r1, r3, r2 - ldr r0, [r0, #0x18] - ldr r2, [r7, #0x10] - ldr r3, [r7, #0x14] - bl ov12_022337E0 - mov r0, #0x9d - lsl r0, r0, #2 - ldr r1, [r7, r0] - add r1, r1, #1 - str r1, [r7, r0] -_02233948: - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r4, #0 - cmp r0, #0 - ble _02233974 - add r6, r7, #0 - add r6, #0x54 - add r5, r7, #0 -_0223395A: - ldr r0, [r5, #0x18] - add r1, r6, #0 - bl ov12_02233834 - str r0, [sp] - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r7, r0] - add r4, r4, #1 - add r6, #0x24 - add r5, r5, #4 - cmp r4, r0 - blt _0223395A -_02233974: - cmp r0, #0xf - blt _02233982 - ldr r0, [sp] - cmp r0, #1 - bne _02233982 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02233982: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02233900 - - thumb_func_start ov12_02233988 -ov12_02233988: ; 0x02233988 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - add r0, r6, #0 - bl ov12_02233900 - cmp r0, #0 - beq _022339BA - mov r4, #0 - add r5, r6, #0 -_0223399C: - ldr r0, [r5, #0x18] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _0223399C - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r6, #0] - add r1, r7, #0 - bl ov12_02220220 - pop {r3, r4, r5, r6, r7, pc} -_022339BA: - ldr r0, [r6, #8] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02233988 - - thumb_func_start ov12_022339C4 -ov12_022339C4: ; 0x022339C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r5, r1, #0 - mov r1, #0x9e - lsl r1, r1, #2 - add r4, r0, #0 - str r2, [sp] - add r7, r3, #0 - bl ov12_02235E50 - add r6, r0, #0 - str r4, [r6, #0] - ldr r0, [sp] - str r5, [r6, #4] - str r0, [r6, #8] - add r0, r4, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - mov r1, #0 - add r5, r0, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - add r0, sp, #0xc - add r1, r4, #0 - bl ov12_0222329C - mov r4, #0 - add r5, r6, #0 -_02233A18: - cmp r4, #0 - bne _02233A20 - str r7, [r5, #0x18] - b _02233A2C -_02233A20: - ldr r0, [r6, #4] - ldr r1, [r6, #8] - add r2, sp, #0xc - bl sub_0200CE6C - str r0, [r5, #0x18] -_02233A2C: - ldr r0, [r5, #0x18] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r5, #0x18] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r5, #0x18] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x18] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - bl sub_0200D4C4 - add r0, r4, #0 - mov r1, #3 - bl sub_020E1F6C - ldr r0, [r5, #0x18] - bl sub_0200D364 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _02233A18 - ldr r0, [r6, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_02225964 - str r0, [r6, #0x10] - ldr r0, [r6, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_0222598C - str r0, [r6, #0x14] - ldr r0, [r6, #0] - ldr r1, _02233A9C ; =ov12_02233988 - add r2, r6, #0 - bl ov12_022201E8 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_02233A9C: .word ov12_02233988 - thumb_func_end ov12_022339C4 - - thumb_func_start ov12_02233AA0 -ov12_02233AA0: ; 0x02233AA0 - ldr r1, [r0, #0x2c] - cmp r1, #0 - beq _02233AB0 - cmp r1, #1 - beq _02233AC4 - cmp r1, #2 - beq _02233AD8 - bx lr -_02233AB0: - ldr r1, _02233AEC ; =0x00007FFF - str r1, [r0, #0x18] - mov r1, #5 - str r1, [r0, #0x24] - mov r1, #1 - lsl r1, r1, #0x10 - str r1, [r0, #0x1c] - mov r1, #0x10 - str r1, [r0, #0x28] - bx lr -_02233AC4: - ldr r1, _02233AEC ; =0x00007FFF - str r1, [r0, #0x18] - mov r1, #4 - mvn r1, r1 - str r1, [r0, #0x24] - ldr r1, _02233AF0 ; =0xFFFF0000 - str r1, [r0, #0x1c] - mov r1, #0x10 - str r1, [r0, #0x28] - bx lr -_02233AD8: - ldr r1, _02233AEC ; =0x00007FFF - str r1, [r0, #0x18] - mov r1, #0xa - str r1, [r0, #0x24] - lsl r1, r1, #0xd - str r1, [r0, #0x1c] - mov r1, #0x10 - str r1, [r0, #0x28] - bx lr - nop -_02233AEC: .word 0x00007FFF -_02233AF0: .word 0xFFFF0000 - thumb_func_end ov12_02233AA0 - - thumb_func_start ov12_02233AF4 -ov12_02233AF4: ; 0x02233AF4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #4] - bl ov12_022265E4 - str r0, [sp, #8] - ldr r0, [r5, #0x10] - str r0, [sp] - str r0, [sp, #4] - sub r0, #8 - str r0, [sp, #4] - ldr r0, [sp] - add r0, #0x58 - str r0, [sp] - ldr r0, [sp, #4] - cmp r0, #0 - bge _02233B1C - mov r0, #0 - str r0, [sp, #4] -_02233B1C: - ldr r0, [sp] - cmp r0, #0xc0 - ble _02233B26 - mov r0, #0xc0 - str r0, [sp] -_02233B26: - mov r0, #0 - ldr r1, [r5, #0x20] - mvn r0, r0 - mul r0, r1 - ldr r4, [sp, #4] - str r0, [r5, #0x20] - ldr r0, [sp] - add r1, r4, #0 - cmp r1, r0 - bge _02233BC6 -_02233B3A: - mov r0, #2 - tst r0, r4 - ldr r1, [r5, #0x1c] - beq _02233B4A - ldr r0, [r5, #0x20] - lsl r0, r0, #0xc - add r2, r1, r0 - b _02233B50 -_02233B4A: - ldr r0, [r5, #0x20] - lsl r0, r0, #0xc - sub r2, r1, r0 -_02233B50: - ldr r1, [sp, #4] - ldr r0, [r5, #0x18] - sub r3, r4, r1 - ldr r1, _02233BCC ; =0x00000199 - mul r1, r3 - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02233BD0 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r2, r0, r2 - ldr r0, _02233BD4 ; =0x00000000 - adc r1, r0 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - lsl r0, r1, #4 - asr r7, r0, #0x10 - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x24] - sub r0, r4, r0 - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - add r0, r7, r0 - lsl r0, r0, #0x10 - ldr r1, [r5, #0x30] - asr r7, r0, #0x10 - lsl r0, r1, #0x10 - lsr r1, r1, #0x10 - lsl r1, r1, #0x10 - asr r0, r0, #0x10 - asr r1, r1, #0x10 - sub r6, r4, #1 - bpl _02233BAA - add r6, #0xc0 -_02233BAA: - add r0, r0, r7 - lsl r0, r0, #0x10 - lsl r1, r1, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - bl ov12_022266E8 - ldr r1, [sp, #8] - lsl r2, r6, #2 - str r0, [r1, r2] - ldr r0, [sp] - add r4, r4, #1 - cmp r4, r0 - blt _02233B3A -_02233BC6: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02233BCC: .word 0x00000199 -_02233BD0: .word 0x020F983C -_02233BD4: .word 0x00000000 - thumb_func_end ov12_02233AF4 - - thumb_func_start ov12_02233BD8 -ov12_02233BD8: ; 0x02233BD8 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02233BEE - cmp r0, #1 - beq _02233C02 - cmp r0, #2 - beq _02233C2C - pop {r4, r5, r6, pc} -_02233BEE: - add r0, r4, #0 - bl ov12_02233AA0 - add r0, r4, #0 - bl ov12_02233AF4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r4, r5, r6, pc} -_02233C02: - ldr r0, [r4, #0x28] - sub r0, r0, #1 - str r0, [r4, #0x28] - add r0, r4, #0 - bl ov12_02233AF4 - ldr r0, [r4, #0x28] - cmp r0, #0 - bge _02233CD0 - ldr r0, [r4, #0x2c] - add r0, r0, #1 - str r0, [r4, #0x2c] - cmp r0, #3 - bge _02233C24 - mov r0, #0 - str r0, [r4, #8] - pop {r4, r5, r6, pc} -_02233C24: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r4, r5, r6, pc} -_02233C2C: - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222337C - cmp r0, #0 - bne _02233C48 - ldr r0, [r4, #0xc] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC -_02233C48: - ldr r0, [r4, #4] - bl ov12_022265F8 - ldr r0, [r4, #4] - bl ov12_022265C0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_02223428 - add r1, r0, #0 - lsl r0, r5, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - lsl r1, r1, #0x18 - mov r0, #0 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_0221FDE4 - add r3, r0, #0 - lsl r0, r5, #0x18 - mov r1, #1 - lsr r0, r0, #0x18 - lsl r1, r1, #0xe - mov r2, #0 - bl sub_02019690 - ldr r0, [r4, #0] - bl ov12_02220278 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r1, r0, #0 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019EBC - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov12_02220220 -_02233CD0: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02233BD8 - - thumb_func_start ov12_02233CD4 -ov12_02233CD4: ; 0x02233CD4 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x34 - add r7, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r7, [r4, #0] - add r0, r7, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - mov r1, #0 - str r0, [r4, #0xc] - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0xc] - mov r1, #0x29 - bl sub_020080C0 - sub r0, r5, r0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222337C - cmp r0, #0 - bne _02233D32 - ldr r0, [r4, #0xc] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC -_02233D32: - sub r6, #0x28 - lsl r0, r6, #0x10 - str r5, [r4, #0x14] - sub r5, #0x28 - asr r0, r0, #0x10 - neg r0, r0 - neg r1, r5 - lsl r0, r0, #0x10 - lsl r1, r1, #0x10 - str r5, [r4, #0x10] - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - bl ov12_022266E8 - str r0, [r4, #0x30] - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233EC - bl ov12_022266F0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_0221FDE4 - add r2, r0, #0 - ldr r1, [r4, #0x30] - add r0, r5, #0 - bl ov12_02226544 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #0x20] - add r0, r7, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02235254 - sub r0, r0, #3 - cmp r0, #1 - bhi _02233DBA - ldr r0, [r4, #0] - mov r1, #1 - bl ov12_022233B0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - lsl r0, r5, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - ldr r0, [r4, #0] - bl ov12_0222339C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x18 - mov r0, #0 - lsr r1, r1, #0x18 - bl sub_02019060 -_02233DBA: - ldr r0, [r4, #0] - ldr r1, _02233DC8 ; =ov12_02233BD8 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02233DC8: .word ov12_02233BD8 - thumb_func_end ov12_02233CD4 - - thumb_func_start ov12_02233DCC -ov12_02233DCC: ; 0x02233DCC - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #5 - bls _02233DDC - b _02233F20 -_02233DDC: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02233DE8: ; jump table - .short _02233DF4 - _02233DE8 - 2 ; case 0 - .short _02233E3A - _02233DE8 - 2 ; case 1 - .short _02233E74 - _02233DE8 - 2 ; case 2 - .short _02233EAE - _02233DE8 - 2 ; case 3 - .short _02233EFA - _02233DE8 - 2 ; case 4 - .short _02233F12 - _02233DE8 - 2 ; case 5 -_02233DF4: - mov r2, #0 - str r2, [sp] - mov r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xc - mov r1, #0x7f - add r3, r2, #0 - bl ov12_02225BC8 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02233F24 ; =0xFFFF1FFF - and r1, r0 - lsr r0, r2, #0xd - orr r0, r1 - str r0, [r2, #0] - mov r1, #0 - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov12_02235838 - ldr r1, _02233F28 ; =0x04000040 - mov r0, #0xff - strh r0, [r1] - mov r0, #0xbf - strh r0, [r1, #4] - mov r0, #7 - str r0, [r4, #8] - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02233E3A: - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - bpl _02233F20 - ldr r0, [r4, #0] - bl ov12_0222332C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_02222354 - add r2, r0, #0 - mov r3, #0 - lsl r2, r2, #0x10 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _02233F2C ; =0x0000FFFF - mov r1, #1 - str r0, [sp, #8] - add r0, r5, #0 - lsr r2, r2, #0x10 - bl sub_02003178 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02233E74: - add r0, r4, #0 - add r0, #0xc - bl ov12_02225C14 - cmp r0, #0 - beq _02233EA4 - mov r0, #0xc - ldrsh r2, [r4, r0] - mov r0, #0x7f - add sp, #0xc - sub r0, r0, r2 - lsl r1, r0, #8 - mov r0, #0xff - lsl r0, r0, #8 - add r2, #0x80 - and r1, r0 - lsl r0, r2, #0x18 - lsr r0, r0, #0x18 - orr r0, r1 - ldr r1, _02233F28 ; =0x04000040 - strh r0, [r1] - mov r0, #0xbf - strh r0, [r1, #4] - pop {r4, r5, pc} -_02233EA4: - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02233EAE: - ldr r0, [r4, #0] - bl ov12_0222332C - bl sub_0200384C - cmp r0, #0 - bne _02233F20 - ldr r0, [r4, #4] - mov r2, #1 - add r0, r0, #1 - str r0, [r4, #4] - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02233F24 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - ldr r0, [r4, #0] - bl ov12_0222332C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov12_02222354 - add r2, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - lsl r2, r2, #0x10 - ldr r0, _02233F2C ; =0x0000FFFF - str r3, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #1 - lsr r2, r2, #0x10 - bl sub_02003178 - add sp, #0xc - pop {r4, r5, pc} -_02233EFA: - ldr r0, [r4, #0] - bl ov12_0222332C - bl sub_0200384C - cmp r0, #0 - bne _02233F20 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02233F12: - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_02233F20: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02233F24: .word 0xFFFF1FFF -_02233F28: .word 0x04000040 -_02233F2C: .word 0x0000FFFF - thumb_func_end ov12_02233DCC - - thumb_func_start ov12_02233F30 -ov12_02233F30: ; 0x02233F30 - push {r4, lr} - mov r1, #0x34 - add r4, r0, #0 - bl ov12_02235E50 - add r2, r0, #0 - ldr r1, _02233F48 ; =ov12_02233DCC - add r0, r4, #0 - str r4, [r2, #0] - bl ov12_022201E8 - pop {r4, pc} - ; .align 2, 0 -_02233F48: .word ov12_02233DCC - thumb_func_end ov12_02233F30 - - thumb_func_start ov12_02233F4C -ov12_02233F4C: ; 0x02233F4C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #4 - bhi _02233FFC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02233F66: ; jump table - .short _02233F70 - _02233F66 - 2 ; case 0 - .short _02233F96 - _02233F66 - 2 ; case 1 - .short _02233FAA - _02233F66 - 2 ; case 2 - .short _02233FD0 - _02233F66 - 2 ; case 3 - .short _02233FE4 - _02233F66 - 2 ; case 4 -_02233F70: - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x10 - bl ov12_02235780 - mov r1, #0 - mov r2, #0x10 - str r1, [sp] - mov r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x14 - add r3, r2, #0 - bl ov12_02226424 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02233FFC -_02233F96: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02226454 - cmp r0, #0 - beq _02233FFC - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02233FFC -_02233FAA: - ldr r0, [r4, #0x10] - bl sub_0200D3B8 - cmp r0, #0 - bne _02233FFC - ldr r0, [r4, #0xc] - mov r2, #0 - add r0, r0, #1 - str r0, [r4, #0xc] - mov r1, #0x10 - str r1, [sp] - mov r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x14 - add r3, r2, #0 - bl ov12_02226424 - b _02233FFC -_02233FD0: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02226454 - cmp r0, #0 - beq _02233FFC - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02233FFC -_02233FE4: - ldr r0, [r4, #0x10] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, pc} -_02233FFC: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02233F4C - - thumb_func_start ov12_02234008 -ov12_02234008: ; 0x02234008 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x3c - add r6, r0, #0 - str r2, [sp] - add r5, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r6, [r4, #0] - ldr r0, [sp] - str r7, [r4, #4] - str r0, [r4, #8] - str r5, [r4, #0x10] - add r0, r5, #0 - mov r1, #1 - bl sub_0200D390 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0] - ldr r1, _02234040 ; =ov12_02233F4C - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02234040: .word ov12_02233F4C - thumb_func_end ov12_02234008 - - thumb_func_start ov12_02234044 -ov12_02234044: ; 0x02234044 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #4 - bhi _02234108 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223405E: ; jump table - .short _02234068 - _0223405E - 2 ; case 0 - .short _022340D2 - _0223405E - 2 ; case 1 - .short _02234114 - _0223405E - 2 ; case 2 - .short _02234180 - _0223405E - 2 ; case 3 - .short _022341D2 - _0223405E - 2 ; case 4 -_02234068: - ldr r0, [r4, #0x68] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x6c] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #0x74] - asr r0, r0, #0x10 - str r0, [sp, #8] - ldr r1, [r4, #0x5c] - ldr r2, [r4, #0x60] - ldr r3, [r4, #0x64] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x14 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225EF0 - mov r1, #0xa - mov r2, #8 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x10] - add r0, #0x38 - bl ov12_0222619C - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x14 - bl ov12_022260E8 - mov r0, #0 - str r0, [sp] - mov r1, #8 - mov r2, #0xc - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r3, [r4, #0x28] - bl ov12_02226024 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_022340D2: - mov r1, #0xa - mov r2, #8 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x10] - add r0, #0x38 - bl ov12_0222619C - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x14 - bl ov12_022260E8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - mov r1, #8 - mov r2, #0xc - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r3, [r4, #0x28] - bl ov12_02226024 - cmp r5, #0 - beq _0223410A -_02234108: - b _02234210 -_0223410A: - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02234114: - ldr r0, [r4, #0x64] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x6c] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #0x74] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r1, [r4, #0x60] - ldr r2, [r4, #0x5c] - ldr r3, [r4, #0x68] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, #0x14 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225EF0 - mov r1, #0xa - mov r2, #8 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x10] - add r0, #0x38 - bl ov12_0222619C - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x14 - bl ov12_022260E8 - mov r0, #0 - str r0, [sp] - mov r1, #8 - mov r2, #0xc - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r3, [r4, #0x28] - bl ov12_02226024 - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_02234180: - mov r1, #0xa - mov r2, #8 - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x10] - add r0, #0x38 - bl ov12_0222619C - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x14 - bl ov12_022260E8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - mov r1, #8 - mov r2, #0xc - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r3, [r4, #0x28] - bl ov12_02226024 - cmp r5, #0 - bne _02234210 - ldr r0, [r4, #0x70] - sub r0, r0, #1 - str r0, [r4, #0x70] - cmp r0, #0 - bgt _022341CA - ldr r0, [r4, #4] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, pc} -_022341CA: - mov r0, #0 - add sp, #0xc - str r0, [r4, #4] - pop {r4, r5, pc} -_022341D2: - mov r2, #0xa - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02007DEC - mov r2, #8 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007DEC - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #0x10] - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0x10] - add r2, #0xf3 - bl sub_02007DEC - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_02234210: - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov12_02234044 - - thumb_func_start ov12_02234214 -ov12_02234214: ; 0x02234214 - push {r3, r4, r5, lr} - mov r1, #0x78 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_02223354 - strh r0, [r4, #0xc] - ldr r0, [r4, #0] - bl ov12_02220248 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #8] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0xa] - mov r1, #0xa - str r1, [r4, #0x5c] - mov r0, #7 - str r0, [r4, #0x60] - str r1, [r4, #0x64] - mov r0, #0x1e - str r0, [r4, #0x68] - str r1, [r4, #0x6c] - mov r3, #1 - ldr r0, _02234288 ; =0x00040003 - str r3, [r4, #0x70] - str r0, [r4, #0x74] - mov r1, #2 - add r0, r4, #0 - str r1, [sp] - add r0, #0x38 - mov r2, #0 - bl ov12_02226108 - ldr r0, [r4, #0] - ldr r1, _0223428C ; =ov12_02234044 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, pc} - nop -_02234288: .word 0x00040003 -_0223428C: .word ov12_02234044 - thumb_func_end ov12_02234214 - - thumb_func_start ov12_02234290 -ov12_02234290: ; 0x02234290 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r4, #0x2c] - add r0, #8 - bl ov12_02225C50 - cmp r0, #0 - bne _022342BA - ldr r0, [r4, #0x2c] - bl sub_0200D0F4 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - pop {r3, r4, r5, pc} -_022342BA: - ldr r0, [r4, #4] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02234290 - - thumb_func_start ov12_022342C4 -ov12_022342C4: ; 0x022342C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r1, #0x30 - add r5, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r5, [r4, #0] - add r0, r5, #0 - bl ov12_02220300 - str r0, [r4, #4] - add r0, r5, #0 - bl ov12_02220240 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0223525C - cmp r0, #3 - bne _02234308 - add r0, r5, #0 - mov r1, #0 - bl ov12_02220298 - str r0, [r4, #0x2c] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220298 - bl sub_0200D0F4 - b _0223431E -_02234308: - add r0, r5, #0 - mov r1, #1 - bl ov12_02220298 - str r0, [r4, #0x2c] - add r0, r5, #0 - mov r1, #0 - bl ov12_02220298 - bl sub_0200D0F4 -_0223431E: - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - add r7, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0222598C - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov12_022258E0 - str r0, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - bl ov12_022258E0 - ldr r1, [sp, #0x10] - lsl r2, r7, #6 - add r6, r1, r2 - ldr r1, [sp, #0xc] - lsl r1, r1, #4 - neg r1, r1 - add r5, r0, r1 - str r1, [sp, #8] - lsl r1, r6, #0x10 - lsl r2, r5, #0x10 - ldr r0, [r4, #0x2c] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [sp, #8] - mov r2, #0x30 - add r0, r5, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - mul r2, r7 - str r0, [sp] - mov r0, #6 - add r2, r6, r2 - str r0, [sp, #4] - add r0, r4, #0 - lsl r1, r6, #0x10 - lsl r2, r2, #0x10 - lsl r3, r5, #0x10 - add r0, #8 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - ldr r0, [r4, #0] - ldr r1, _0223439C ; =ov12_02234290 - add r2, r4, #0 - bl ov12_022201E8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223439C: .word ov12_02234290 - thumb_func_end ov12_022342C4 - - thumb_func_start ov12_022343A0 -ov12_022343A0: ; 0x022343A0 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #5 - bls _022343B0 - b _022344CC -_022343B0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022343BC: ; jump table - .short _022343C8 - _022343BC - 2 ; case 0 - .short _022343E2 - _022343BC - 2 ; case 1 - .short _02234430 - _022343BC - 2 ; case 2 - .short _0223444C - _022343BC - 2 ; case 3 - .short _0223448E - _022343BC - 2 ; case 4 - .short _022344A6 - _022343BC - 2 ; case 5 -_022343C8: - mov r1, #4 - add r0, r4, #0 - str r1, [sp] - add r0, #0x40 - mov r2, #0 - mov r3, #1 - bl ov12_02226108 - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, r6, pc} -_022343E2: - mov r1, #0x18 - mov r2, #0x1a - add r0, r4, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x14] - add r0, #0x40 - bl ov12_0222619C - cmp r0, #0 - bne _022344CC - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0x1a - ldrsh r3, [r4, r0] - mov r0, #0x18 - ldrsh r1, [r4, r0] - ldr r2, [r4, #0x10] - sub r0, #0x1f - mul r0, r2 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - add r0, r4, #0 - ldr r4, [r4, #0xc] - mov r2, #0x28 - mul r2, r4 - add r2, r1, r2 - lsl r2, r2, #0x10 - add r0, #0x1c - asr r2, r2, #0x10 - bl ov12_02225BC8 - add sp, #8 - pop {r4, r5, r6, pc} -_02234430: - add r0, r4, #0 - ldr r1, [r4, #0x14] - add r0, #0x1c - bl ov12_02225C74 - cmp r0, #0 - bne _022344CC - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #8 - str r0, [r4, #8] - pop {r4, r5, r6, pc} -_0223444C: - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - bpl _022344CC - ldr r0, [r4, #4] - mov r5, #0x28 - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0x1a - ldrsh r3, [r4, r0] - mov r0, #0x18 - ldrsh r2, [r4, r0] - mov r0, #4 - str r3, [sp] - str r0, [sp, #4] - ldr r1, [r4, #0xc] - add r0, r4, #0 - add r6, r1, #0 - mul r6, r5 - add r1, r2, r6 - lsl r1, r1, #0x10 - ldr r4, [r4, #0x10] - sub r5, #0x2f - mul r5, r4 - add r3, r3, r5 - lsl r3, r3, #0x10 - add r0, #0x1c - asr r1, r1, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - add sp, #8 - pop {r4, r5, r6, pc} -_0223448E: - add r0, r4, #0 - ldr r1, [r4, #0x14] - add r0, #0x1c - bl ov12_02225C74 - cmp r0, #0 - bne _022344CC - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, r5, r6, pc} -_022344A6: - mov r2, #0x18 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x1a - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_02007DEC - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_022344CC: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov12_022343A0 - - thumb_func_start ov12_022344D0 -ov12_022344D0: ; 0x022344D0 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r1, #0x64 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - str r5, [r4, #0] - bl ov12_02220240 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x14] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x18] - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x1a] - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - str r0, [r4, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0222598C - str r0, [r4, #0x10] - ldr r0, [r4, #0] - ldr r1, _02234524 ; =ov12_022343A0 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - nop -_02234524: .word ov12_022343A0 - thumb_func_end ov12_022344D0 - - thumb_func_start ov12_02234528 -ov12_02234528: ; 0x02234528 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #4 - bls _02234538 - b _02234648 -_02234538: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02234544: ; jump table - .short _0223454E - _02234544 - 2 ; case 0 - .short _02234584 - _02234544 - 2 ; case 1 - .short _022345AC - _02234544 - 2 ; case 2 - .short _0223460A - _02234544 - 2 ; case 3 - .short _02234622 - _02234544 - 2 ; case 4 -_0223454E: - mov r0, #0x16 - ldrsh r3, [r4, r0] - mov r0, #0x14 - ldrsh r1, [r4, r0] - ldr r0, [r4, #0xc] - mov r5, #4 - lsl r0, r0, #4 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - str r5, [sp, #4] - ldr r2, [r4, #8] - sub r5, #0x2c - mul r5, r2 - add r2, r1, r5 - add r0, r4, #0 - lsl r2, r2, #0x10 - add r0, #0x18 - asr r2, r2, #0x10 - bl ov12_02225BC8 - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_02234584: - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x18 - bl ov12_02225C74 - cmp r0, #0 - bne _02234648 - ldr r0, [r4, #4] - mov r1, #4 - add r0, r0, #1 - str r0, [r4, #4] - add r4, #0x3c - add r0, r4, #0 - mov r2, #0 - mov r3, #1 - str r1, [sp] - bl ov12_02226108 - add sp, #8 - pop {r3, r4, r5, pc} -_022345AC: - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r5, r0, #0x10 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - add r0, r4, #0 - ldr r3, [r4, #0x10] - add r0, #0x3c - add r1, r5, #0 - bl ov12_0222619C - cmp r0, #0 - bne _02234648 - ldr r0, [r4, #4] - mov r5, #4 - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0x16 - ldrsh r3, [r4, r0] - mov r0, #0x14 - ldrsh r2, [r4, r0] - add r0, r4, #0 - add r0, #0x18 - str r3, [sp] - str r5, [sp, #4] - ldr r1, [r4, #8] - ldr r4, [r4, #0xc] - sub r5, #0x2c - mul r5, r1 - lsl r4, r4, #4 - add r1, r2, r5 - add r3, r3, r4 - lsl r1, r1, #0x10 - lsl r3, r3, #0x10 - asr r1, r1, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - add sp, #8 - pop {r3, r4, r5, pc} -_0223460A: - add r0, r4, #0 - ldr r1, [r4, #0x10] - add r0, #0x18 - bl ov12_02225C74 - cmp r0, #0 - bne _02234648 - ldr r0, [r4, #4] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_02234622: - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02007DEC - mov r2, #0x16 - ldrsh r2, [r4, r2] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007DEC - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 -_02234648: - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02234528 - - thumb_func_start ov12_0223464C -ov12_0223464C: ; 0x0223464C - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r1, #0x60 - bl ov12_02235E50 - add r4, r0, #0 - add r0, r5, #0 - str r5, [r4, #0] - bl ov12_02220248 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov12_022232FC - str r0, [r4, #0x10] - mov r1, #0 - bl sub_020080C0 - strh r0, [r4, #0x14] - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #0x16] - add r0, r5, #0 - add r1, r6, #0 - bl ov12_02225964 - str r0, [r4, #8] - add r0, r5, #0 - add r1, r6, #0 - bl ov12_0222598C - str r0, [r4, #0xc] - ldr r0, [r4, #0] - ldr r1, _022346A0 ; =ov12_02234528 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - nop -_022346A0: .word ov12_02234528 - thumb_func_end ov12_0223464C - - thumb_func_start ov12_022346A4 -ov12_022346A4: ; 0x022346A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r7, r1, #0 - add r4, r0, #0 - mov r1, #0xac - add r6, r2, #0 - str r3, [sp] - bl ov12_02235E50 - str r4, [r0, #0] - str r0, [sp, #4] - str r6, [r0, #0xc] - add r0, r4, #0 - bl ov12_02220240 - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02225964 - ldr r1, [sp, #4] - str r0, [r1, #0x10] - ldr r1, [r1, #0] - add r0, sp, #8 - bl ov12_0222329C - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov12_022258E0 - add r1, sp, #8 - strh r0, [r1] - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov12_022258E0 - add r1, sp, #8 - ldr r5, [sp, #4] - strh r0, [r1, #2] - mov r4, #0 -_022346F8: - cmp r4, #0 - add r2, sp, #8 - bne _02234712 - ldr r0, [sp] - mov r1, #0 - str r0, [r5, #0x14] - ldrsh r1, [r2, r1] - add r3, r2, #0 - mov r2, #2 - ldrsh r2, [r3, r2] - bl sub_0200D4C4 - b _0223471C -_02234712: - add r0, r7, #0 - add r1, r6, #0 - bl sub_0200CE6C - str r0, [r5, #0x14] -_0223471C: - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x14] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0x14] - mov r1, #1 - bl sub_0200D460 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _022346F8 - ldr r0, [sp, #4] - ldr r1, _0223474C ; =ov12_02234750 - ldr r0, [r0, #0] - ldr r2, [sp, #4] - bl ov12_022201E8 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223474C: .word ov12_02234750 - thumb_func_end ov12_022346A4 - - thumb_func_start ov12_02234750 -ov12_02234750: ; 0x02234750 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #4] - cmp r0, #4 - bhi _02234834 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02234768: ; jump table - .short _02234772 - _02234768 - 2 ; case 0 - .short _0223479A - _02234768 - 2 ; case 1 - .short _022347BA - _02234768 - 2 ; case 2 - .short _022347EC - _02234768 - 2 ; case 3 - .short _02234812 - _02234768 - 2 ; case 4 -_02234772: - add r2, r4, #0 - ldr r0, [r4, #0x14] - ldr r3, [r4, #0x10] - add r1, #0x1c - add r2, #0x64 - bl ov12_0223483C - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x1c - add r2, #0x64 - bl ov12_0223489C - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #8 - str r0, [r4, #8] - b _02234834 -_0223479A: - ldr r0, [r4, #8] - add r2, r4, #0 - sub r0, r0, #1 - str r0, [r4, #8] - ldr r0, [r4, #0x14] - add r1, #0x1c - add r2, #0x64 - bl ov12_0223489C - ldr r0, [r4, #8] - cmp r0, #0 - bge _02234834 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _02234834 -_022347BA: - add r2, r4, #0 - ldr r0, [r4, #0x18] - ldr r3, [r4, #0x10] - add r1, #0x40 - add r2, #0x88 - bl ov12_0223483C - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x18] - add r1, #0x40 - add r2, #0x88 - bl ov12_0223489C - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x1c - add r2, #0x64 - bl ov12_0223489C - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _02234834 -_022347EC: - add r2, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x1c - add r2, #0x64 - bl ov12_0223489C - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x18] - add r1, #0x40 - add r2, #0x88 - bl ov12_0223489C - cmp r0, #0 - beq _02234834 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _02234834 -_02234812: - mov r6, #0 - add r5, r4, #0 -_02234816: - ldr r0, [r5, #0x14] - bl sub_0200D0F4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _02234816 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_02234834: - ldr r0, [r4, #0xc] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02234750 - - thumb_func_start ov12_0223483C -ov12_0223483C: ; 0x0223483C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - add r5, r0, #0 - mov r1, #2 - add r7, r2, #0 - add r4, r3, #0 - bl sub_0200D6A4 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D3F4 - add r1, sp, #8 - add r0, r5, #0 - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - add r1, sp, #8 - mov r0, #0 - ldrsh r3, [r1, r0] - mov r0, #2 - ldrsh r1, [r1, r0] - add r0, r3, #0 - sub r0, #0x20 - lsl r0, r0, #0x10 - lsl r2, r4, #4 - asr r0, r0, #0x10 - add r2, r1, r2 - str r0, [sp] - mov r0, #0x20 - lsl r2, r2, #0x10 - str r0, [sp, #4] - add r0, r6, #0 - asr r2, r2, #0x10 - bl ov12_02225BC8 - mov r0, #0x20 - mov r2, #0xa - str r0, [sp] - add r0, r7, #0 - mov r1, #2 - add r3, r2, #0 - bl ov12_02225E68 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_0223483C - - thumb_func_start ov12_0223489C -ov12_0223489C: ; 0x0223489C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - add r1, r5, #0 - bl ov12_02225C50 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_022260A8 - cmp r0, #0 - beq _022348BA - mov r0, #0 - pop {r3, r4, r5, pc} -_022348BA: - add r0, r5, #0 - mov r1, #0 - bl sub_0200D3F4 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0223489C - - thumb_func_start ov12_022348C8 -ov12_022348C8: ; 0x022348C8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x3c - add r6, r0, #0 - add r7, r2, #0 - add r5, r3, #0 - bl ov12_02235E50 - add r4, r0, #0 - str r6, [r4, #0] - str r7, [r4, #0xc] - str r5, [r4, #0x10] - add r0, r5, #0 - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #0x10] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r4, #0x10] - bl sub_0200D43C - str r0, [r4, #8] - ldr r0, [r4, #0] - ldr r1, _02234914 ; =ov12_02234918 - add r2, r4, #0 - bl ov12_022201E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02234914: .word ov12_02234918 - thumb_func_end ov12_022348C8 - - thumb_func_start ov12_02234918 -ov12_02234918: ; 0x02234918 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #4 - bhi _02234A04 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02234932: ; jump table - .short _0223493C - _02234932 - 2 ; case 0 - .short _0223496C - _02234932 - 2 ; case 1 - .short _02234992 - _02234932 - 2 ; case 2 - .short _022349D0 - _02234932 - 2 ; case 3 - .short _022349EC - _02234932 - 2 ; case 4 -_0223493C: - mov r0, #4 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x14 - mov r1, #0 - mov r2, #0x10 - mov r3, #0x14 - bl ov12_02226424 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x14 - bl ov12_02235780 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _02234A04 -_0223496C: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02226454 - cmp r0, #0 - beq _02234A04 - ldr r0, [r4, #4] - mov r1, #1 - add r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0x10] - bl sub_0200D390 - mov r1, #1 - ldr r0, [r4, #0x10] - lsl r1, r1, #0xc - bl sub_0200D3A4 - b _02234A04 -_02234992: - ldr r0, [r4, #0x10] - bl sub_0200D3E0 - mov r1, #3 - bl sub_020E1F6C - ldr r2, [r4, #8] - ldr r0, [r4, #0x10] - add r1, r2, r1 - bl sub_0200D430 - ldr r0, [r4, #0x10] - bl sub_0200D3B8 - cmp r0, #0 - bne _02234A04 - ldr r0, [r4, #4] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0x14 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x14 - mov r2, #0 - mov r3, #4 - bl ov12_02226424 - b _02234A04 -_022349D0: - add r0, r4, #0 - add r0, #0x14 - bl ov12_02226454 - cmp r0, #0 - beq _02234A04 - ldr r0, [r4, #4] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0x10] - bl sub_0200D3F4 - b _02234A04 -_022349EC: - ldr r0, [r4, #0x10] - bl sub_0200D0F4 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, pc} -_02234A04: - ldr r0, [r4, #0xc] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02234918 - - thumb_func_start ov12_02234A10 -ov12_02234A10: ; 0x02234A10 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - str r1, [sp, #4] - str r2, [sp, #8] - mov r1, #0x54 - add r5, r0, #0 - str r3, [sp, #0xc] - bl ov12_02235E50 - ldr r1, [sp, #8] - str r5, [r0, #0] - str r0, [sp, #0x14] - str r1, [r0, #8] - ldr r0, [r0, #0] - bl ov12_02220240 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_02225964 - ldr r1, [sp, #0x14] - str r0, [sp, #0x10] - ldr r1, [r1, #0] - add r0, sp, #0x18 - bl ov12_0222329C - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov12_022258E0 - add r1, sp, #0x18 - strh r0, [r1] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov12_022258E0 - ldr r7, [sp, #0x14] - ldr r6, [sp, #0x14] - ldr r5, [sp, #0x14] - add r1, sp, #0x18 - add r7, #0x3c - add r6, #0x24 - strh r0, [r1, #2] - mov r4, #5 - add r5, #0x14 - add r7, #0x14 - add r6, #0x14 -_02234A74: - cmp r4, #5 - add r2, sp, #0x18 - bne _02234A8E - ldr r0, [sp, #0xc] - mov r1, #0 - str r0, [r5, #0xc] - ldrsh r1, [r2, r1] - add r3, r2, #0 - mov r2, #2 - ldrsh r2, [r3, r2] - bl sub_0200D4C4 - b _02234A98 -_02234A8E: - ldr r0, [sp, #4] - ldr r1, [sp, #8] - bl sub_0200CE6C - str r0, [r5, #0xc] -_02234A98: - ldr r0, [r5, #0xc] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0xc] - mov r1, #1 - bl sub_0200D460 - ldr r0, [r5, #0xc] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [sp, #0x10] - add r1, r6, #0 - str r0, [sp] - ldr r0, [r5, #0xc] - add r2, r7, #0 - add r3, r4, #0 - bl ov12_02234AE0 - sub r5, r5, #4 - sub r7, r7, #4 - sub r6, r6, #4 - sub r4, r4, #1 - bpl _02234A74 - ldr r0, [sp, #0x14] - ldr r1, _02234ADC ; =ov12_02234B64 - ldr r0, [r0, #0] - ldr r2, [sp, #0x14] - bl ov12_022201E8 - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - nop -_02234ADC: .word ov12_02234B64 - thumb_func_end ov12_02234A10 - - thumb_func_start ov12_02234AE0 -ov12_02234AE0: ; 0x02234AE0 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r6, r1, #0 - lsr r1, r4, #0x1f - add r1, r4, r1 - asr r1, r1, #1 - add r5, r0, #0 - add r7, r2, #0 - bl sub_0200D364 - lsl r0, r4, #1 - str r0, [r7, #0] - mov r0, #0x10 - add r1, sp, #0 - str r0, [r6, #0] - add r0, r5, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - mov r1, #2 - add r6, r1, #0 - add r2, sp, #0 - sub r6, #0xe - mul r6, r4 - ldr r0, [sp, #0x18] - ldrsh r3, [r2, r1] - add r6, #0x28 - add r4, r0, #0 - mul r4, r6 - add r0, r3, r4 - mov r3, #0 - strh r0, [r2, #2] - ldrsh r0, [r2, r3] - add r0, #0x28 - strh r0, [r2] - ldrsh r1, [r2, r1] - ldrsh r2, [r2, r3] - add r0, r5, #0 - bl sub_0200D4C4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02234AE0 - - thumb_func_start ov12_02234B34 -ov12_02234B34: ; 0x02234B34 - push {r3, lr} - ldr r3, [r2, #0] - cmp r3, #0 - ble _02234B4A - sub r1, r3, #1 - str r1, [r2, #0] - bne _02234B60 - mov r1, #1 - bl sub_0200D3F4 - b _02234B60 -_02234B4A: - ldr r2, [r1, #0] - cmp r2, #0 - ble _02234B56 - sub r0, r2, #1 - str r0, [r1, #0] - b _02234B60 -_02234B56: - mov r1, #0 - bl sub_0200D3F4 - mov r0, #1 - pop {r3, pc} -_02234B60: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov12_02234B34 - - thumb_func_start ov12_02234B64 -ov12_02234B64: ; 0x02234B64 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r1, #4] - str r1, [sp] - cmp r0, #0 - beq _02234B76 - cmp r0, #1 - beq _02234BA8 - b _02234BCC -_02234B76: - add r6, r1, #0 - add r4, r1, #0 - mov r7, #0 - add r6, #0x3c - add r4, #0x24 - add r5, r1, #0 -_02234B82: - ldr r0, [r5, #0xc] - add r1, r4, #0 - add r2, r6, #0 - bl ov12_02234B34 - add r7, r7, #1 - add r6, r6, #4 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #6 - blt _02234B82 - cmp r0, #0 - beq _02234BCC - ldr r0, [sp] - ldr r0, [r0, #4] - add r1, r0, #1 - ldr r0, [sp] - str r1, [r0, #4] - b _02234BCC -_02234BA8: - mov r5, #0 - add r4, r1, #0 -_02234BAC: - ldr r0, [r4, #0xc] - bl sub_0200D0F4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #6 - blt _02234BAC - ldr r0, [sp] - add r1, r6, #0 - ldr r0, [r0, #0] - bl ov12_02220220 - ldr r0, [sp] - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_02234BCC: - ldr r0, [sp] - ldr r0, [r0, #8] - bl sub_0200C7EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02234B64 - - thumb_func_start ov12_02234BD8 -ov12_02234BD8: ; 0x02234BD8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r7, #0 - add r6, r5, #0 - str r1, [sp, #0x10] - add r6, #0x30 - add r4, r7, #0 -_02234BE8: - mov r0, #0 - str r0, [sp] - mov r0, #0x32 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0 - str r0, [sp, #0xc] - ldr r2, _02234C28 ; =0x00007FFF - add r0, r6, #0 - add r3, r1, #0 - bl ov12_02225A5C - ldr r0, [r5, #0x38] - add r7, r7, #1 - add r0, r0, r4 - str r0, [r5, #0x38] - ldr r1, [r5, #0x48] - ldr r0, [sp, #0x10] - add r6, #0x24 - mul r0, r1 - str r0, [r5, #0x48] - ldr r0, _02234C2C ; =0x00002AAA - add r5, #0x24 - add r4, r4, r0 - cmp r7, #6 - blt _02234BE8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02234C28: .word 0x00007FFF -_02234C2C: .word 0x00002AAA - thumb_func_end ov12_02234BD8 - - thumb_func_start ov12_02234C30 -ov12_02234C30: ; 0x02234C30 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0 - add r7, r6, #0 - str r0, [sp] - add r7, #0x30 - add r4, r6, #0 - add r5, r6, #0 -_02234C40: - add r0, r7, #0 - bl ov12_02225AE0 - mov r1, #0x13 - lsl r1, r1, #4 - mov r2, #0x30 - ldrsh r1, [r6, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x18] - add r1, r1, r2 - ldr r2, _02234C9C ; =0x00000132 - lsl r1, r1, #0x10 - ldrsh r2, [r6, r2] - asr r1, r1, #0x10 - bl sub_0200D4C4 - ldr r1, [r4, #0x38] - ldr r0, _02234CA0 ; =0x00003FFF - cmp r1, r0 - blt _02234C78 - ldr r0, _02234CA4 ; =0x0000BF49 - cmp r1, r0 - bgt _02234C78 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D460 - b _02234C88 -_02234C78: - ldr r0, [r6, #0] - bl ov12_0222339C - add r1, r0, #0 - ldr r0, [r5, #0x18] - add r1, r1, #1 - bl sub_0200D460 -_02234C88: - ldr r0, [sp] - add r7, #0x24 - add r0, r0, #1 - add r4, #0x24 - add r5, r5, #4 - str r0, [sp] - cmp r0, #6 - blt _02234C40 - pop {r3, r4, r5, r6, r7, pc} - nop -_02234C9C: .word 0x00000132 -_02234CA0: .word 0x00003FFF -_02234CA4: .word 0x0000BF49 - thumb_func_end ov12_02234C30 - - thumb_func_start ov12_02234CA8 -ov12_02234CA8: ; 0x02234CA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #4 - bhi _02234D8E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02234CC2: ; jump table - .short _02234CCC - _02234CC2 - 2 ; case 0 - .short _02234D02 - _02234CC2 - 2 ; case 1 - .short _02234D22 - _02234CC2 - 2 ; case 2 - .short _02234D4E - _02234CC2 - 2 ; case 3 - .short _02234D6A - _02234CC2 - 2 ; case 4 -_02234CCC: - ldr r0, [r4, #0] - mov r1, #1 - mov r2, #0xf - bl ov12_02235780 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, #0xfe - add r0, r4, r0 - mov r1, #1 - mov r2, #0x10 - mov r3, #0xf - bl ov12_02226424 - ldr r1, [r4, #0x14] - add r0, r4, #0 - bl ov12_02234BD8 - add r0, r4, #0 - bl ov12_02234C30 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02234D8E -_02234D02: - add r0, r4, #0 - bl ov12_02234C30 - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov12_02226454 - cmp r0, #0 - beq _02234D8E - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0x1c - str r0, [r4, #0x10] - b _02234D8E -_02234D22: - add r0, r4, #0 - bl ov12_02234C30 - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - bpl _02234D8E - ldr r0, [r4, #0xc] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0xf - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, #0xfe - add r0, r4, r0 - mov r2, #1 - mov r3, #0 - bl ov12_02226424 - b _02234D8E -_02234D4E: - add r0, r4, #0 - bl ov12_02234C30 - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov12_02226454 - cmp r0, #0 - beq _02234D8E - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02234D8E -_02234D6A: - mov r6, #0 - add r5, r4, #0 -_02234D6E: - ldr r0, [r5, #0x18] - bl sub_0200D0F4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #6 - blt _02234D6E - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov12_02220220 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02234D8E: - ldr r0, [r4, #8] - bl sub_0200C7EC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02234CA8 - - thumb_func_start ov12_02234D98 -ov12_02234D98: ; 0x02234D98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r1, #0 - mov r1, #0x4d - lsl r1, r1, #2 - add r4, r0, #0 - str r2, [sp] - add r7, r3, #0 - bl ov12_02235E50 - add r6, r0, #0 - str r4, [r6, #0] - ldr r0, [sp] - str r5, [r6, #4] - str r0, [r6, #8] - add r0, r4, #0 - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_022232FC - mov r1, #0 - add r5, r0, #0 - bl sub_020080C0 - mov r1, #0x13 - lsl r1, r1, #4 - strh r0, [r6, r1] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - ldr r1, _02234E3C ; =0x00000132 - strh r0, [r6, r1] - add r0, sp, #4 - add r1, r4, #0 - bl ov12_0222329C - mov r4, #0 - add r5, r6, #0 -_02234DEA: - cmp r4, #0 - bne _02234DF2 - str r7, [r5, #0x18] - b _02234DFE -_02234DF2: - ldr r0, [r6, #4] - ldr r1, [r6, #8] - add r2, sp, #4 - bl sub_0200CE6C - str r0, [r5, #0x18] -_02234DFE: - ldr r0, [r5, #0x18] - mov r1, #0x64 - bl sub_0200D474 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_0200D390 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02234DEA - ldr r0, [r6, #0] - bl ov12_02220240 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov12_02225964 - str r0, [r6, #0x14] - ldr r0, [r6, #0] - ldr r1, _02234E40 ; =ov12_02234CA8 - add r2, r6, #0 - bl ov12_022201E8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02234E3C: .word 0x00000132 -_02234E40: .word ov12_02234CA8 - thumb_func_end ov12_02234D98 - - thumb_func_start ov12_02234E44 -ov12_02234E44: ; 0x02234E44 - strh r1, [r0, #0xc] - strh r2, [r0, #0xe] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02234E44 - - thumb_func_start ov12_02234E4C -ov12_02234E4C: ; 0x02234E4C - strh r1, [r0, #0x14] - strh r2, [r0, #0x16] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02234E4C - - thumb_func_start ov12_02234E54 -ov12_02234E54: ; 0x02234E54 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x1c] - add r4, r1, #0 - bl ov12_0221FDE4 - add r6, r0, #0 - ldr r0, [r5, #0x1c] - mov r1, #3 - bl ov12_02223428 - add r1, r0, #0 - lsl r0, r4, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r6, [sp, #0xc] - ldr r1, [r5, #4] - ldr r0, [r5, #0] - lsl r2, r1, #4 - ldr r1, _02234EE4 ; =0x0223A1D8 - add r3, r4, #0 - ldr r1, [r1, r2] - ldr r2, [r5, #0x2c] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x80 - str r0, [sp, #8] - ldr r2, [r5, #4] - ldr r0, [r5, #0x30] - lsl r3, r2, #4 - ldr r2, _02234EE8 ; =0x0223A1DC - ldr r1, [r5, #0] - ldr r2, [r2, r3] - add r3, r6, #0 - bl sub_02003050 - lsl r1, r4, #0x18 - ldr r0, [r5, #0x2c] - lsr r1, r1, #0x18 - bl sub_02019EBC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r6, [sp, #0xc] - ldr r1, [r5, #4] - ldr r0, [r5, #0] - lsl r2, r1, #4 - ldr r1, _02234EEC ; =0x0223A1E0 - add r3, r4, #0 - ldr r1, [r1, r2] - ldr r2, [r5, #0x2c] - bl sub_02006E60 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02234EE4: .word 0x0223A1D8 -_02234EE8: .word 0x0223A1DC -_02234EEC: .word 0x0223A1E0 - thumb_func_end ov12_02234E54 - - thumb_func_start ov12_02234EF0 -ov12_02234EF0: ; 0x02234EF0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x18] - cmp r0, #3 - bhi _02234FAC - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02234F08: ; jump table - .short _02234F10 - _02234F08 - 2 ; case 0 - .short _02234F20 - _02234F08 - 2 ; case 1 - .short _02234F38 - _02234F08 - 2 ; case 2 - .short _02234F58 - _02234F08 - 2 ; case 3 -_02234F10: - add r0, r4, #0 - mov r1, #2 - bl ov12_02234E54 - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] - b _02234FFA -_02234F20: - ldrh r0, [r4, #0x16] - mov r1, #4 - mov r2, #0x39 - str r0, [sp] - ldrh r3, [r4, #0x14] - ldr r0, _02235048 ; =0x04000050 - bl sub_020BF55C - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] - b _02234FFA -_02234F38: - add r1, r4, #0 - add r1, #0x40 - ldrb r1, [r1] - cmp r1, #0x14 - bls _02234F48 - add r0, r0, #1 - strb r0, [r4, #0x18] - b _02234FFA -_02234F48: - add r0, r4, #0 - add r0, #0x40 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x40 - strb r1, [r0] - b _02234FFA -_02234F58: - ldrh r0, [r4, #0x14] - cmp r0, #0 - beq _02234F62 - sub r0, r0, #1 - strh r0, [r4, #0x14] -_02234F62: - ldrh r0, [r4, #0x16] - cmp r0, #0x10 - bhs _02234F6C - add r0, r0, #1 - strh r0, [r4, #0x16] -_02234F6C: - ldrh r0, [r4, #0x14] - cmp r0, #0 - bne _02234F9E - ldrh r0, [r4, #0x16] - cmp r0, #0x10 - bne _02234F9E - ldr r0, [r4, #0x2c] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x34] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x38] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_0200D3F4 - ldrb r0, [r4, #0x18] - add r0, r0, #1 - strb r0, [r4, #0x18] -_02234F9E: - ldrh r0, [r4, #0x16] - ldrh r1, [r4, #0x14] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0223504C ; =0x04000052 - strh r1, [r0] - b _02234FFA -_02234FAC: - ldr r0, _02235050 ; =0x0400004A - mov r1, #0x3f - ldrh r2, [r0] - bic r2, r1 - mov r1, #0x1f - orr r2, r1 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _02235054 ; =0xFFFFC0FF - lsl r1, r1, #8 - and r2, r3 - orr r1, r2 - strh r1, [r0] - mov r2, #0 - ldr r0, [r4, #0x2c] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - ldr r0, [r4, #0x2c] - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02235058 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - ldr r0, [r4, #0x1c] - add r1, r5, #0 - bl ov12_02220220 - add r0, r4, #0 - bl ov12_02235E80 - pop {r3, r4, r5, pc} -_02234FFA: - mov r3, #0x10 - mov r0, #0xc - ldrsh r1, [r4, r3] - ldrsh r0, [r4, r0] - mov r2, #0 - add r0, r1, r0 - strh r0, [r4, #0x10] - mov r0, #0x12 - ldrsh r1, [r4, r0] - mov r0, #0xe - ldrsh r0, [r4, r0] - add r0, r1, r0 - strh r0, [r4, #0x12] - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x2c] - mov r1, #2 - bl sub_02019184 - mov r3, #0x12 - ldrsh r3, [r4, r3] - ldr r0, [r4, #0x2c] - mov r1, #2 - mov r2, #3 - bl sub_02019184 - ldr r0, [r4, #0x34] - bl sub_0200D330 - ldr r0, [r4, #0x38] - bl sub_0200D330 - ldr r0, [r4, #0x3c] - bl sub_0200D330 - ldr r0, [r4, #0x24] - bl sub_0200C7EC - pop {r3, r4, r5, pc} - nop -_02235048: .word 0x04000050 -_0223504C: .word 0x04000052 -_02235050: .word 0x0400004A -_02235054: .word 0xFFFFC0FF -_02235058: .word 0xFFFF1FFF - thumb_func_end ov12_02234EF0 - - thumb_func_start ov12_0223505C -ov12_0223505C: ; 0x0223505C - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #7 - str r1, [r4, #0] - add r5, r0, #0 - mov r1, #0 - bl ov12_02220280 - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #1 - bl ov12_02220280 - str r0, [r4, #8] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0223505C - - thumb_func_start ov12_0223507C -ov12_0223507C: ; 0x0223507C - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x44 - add r6, r0, #0 - bl ov12_02235E50 - add r4, r0, #0 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x18 - bl ov12_0223595C - add r2, r4, #0 - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x1c] - mov r1, #0 - bl ov12_022202C0 - str r0, [r4, #0x34] - ldr r0, [r4, #0x1c] - mov r1, #1 - bl ov12_022202C0 - str r0, [r4, #0x38] - ldr r0, [r4, #0x1c] - mov r1, #2 - bl ov12_022202C0 - str r0, [r4, #0x3c] - ldr r0, [r4, #0x1c] - mov r1, #2 - bl ov12_02223428 - ldr r0, [r4, #0x34] - mov r1, #2 - bl sub_0200D460 - ldr r0, [r4, #0x38] - mov r1, #2 - bl sub_0200D460 - ldr r0, [r4, #8] - cmp r0, #0 - bne _022350E6 - add r0, r6, #0 - bl ov12_02220240 - b _022350EC -_022350E6: - add r0, r6, #0 - bl ov12_02220248 -_022350EC: - add r1, r0, #0 - add r0, r6, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r6, #0 - bl ov12_0221FDD4 - cmp r0, #1 - bne _02235124 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x1c] - mov r1, #2 - bl ov12_02223428 - add r5, r0, #0 - ldr r0, [r4, #0x34] - add r1, r5, #0 - bl sub_0200D460 - ldr r0, [r4, #0x38] - add r1, r5, #0 - bl sub_0200D460 - b _02235148 -_02235124: - cmp r5, #1 - bhi _02235132 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_0200D3F4 - b _02235148 -_02235132: - sub r0, r5, #3 - cmp r0, #1 - ldr r0, [r4, #0x3c] - bhi _02235142 - mov r1, #3 - bl sub_0200D460 - b _02235148 -_02235142: - mov r1, #1 - bl sub_0200D460 -_02235148: - ldr r0, _02235194 ; =0x0400004A - ldr r1, _02235198 ; =0xFFFFC0FF - ldrh r2, [r0] - and r2, r1 - mov r1, #0x16 - lsl r1, r1, #8 - orr r2, r1 - lsr r1, r0, #0xd - orr r1, r2 - strh r1, [r0] - ldrh r2, [r0] - mov r1, #0x3f - bic r2, r1 - mov r1, #0x1b - orr r2, r1 - mov r1, #0x20 - orr r2, r1 - strh r2, [r0] - lsl r3, r1, #0x15 - ldr r2, [r3, #0] - ldr r0, _0223519C ; =0xFFFF1FFF - and r2, r0 - lsl r0, r1, #0xa - orr r0, r2 - str r0, [r3, #0] - ldr r0, [r4, #0x38] - mov r1, #2 - bl sub_0200D810 - mov r0, #0 - strh r0, [r4, #0x10] - strh r0, [r4, #0x12] - ldr r0, [r4, #0x1c] - ldr r1, _022351A0 ; =ov12_02234EF0 - add r2, r4, #0 - bl ov12_022201E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02235194: .word 0x0400004A -_02235198: .word 0xFFFFC0FF -_0223519C: .word 0xFFFF1FFF -_022351A0: .word ov12_02234EF0 - thumb_func_end ov12_0223507C - - thumb_func_start ov12_022351A4 -ov12_022351A4: ; 0x022351A4 - push {r4, lr} - sub sp, #0x18 - add r1, sp, #0 - add r4, r0, #0 - bl ov12_0223505C - add r0, sp, #0 - mov r1, #0 - mov r2, #3 - bl ov12_02234E44 - add r0, sp, #0 - mov r1, #0xc - mov r2, #4 - bl ov12_02234E4C - add r0, r4, #0 - add r1, sp, #0 - bl ov12_0223507C - add sp, #0x18 - pop {r4, pc} - thumb_func_end ov12_022351A4 - - thumb_func_start ov12_022351D0 -ov12_022351D0: ; 0x022351D0 - push {r4, lr} - sub sp, #0x18 - add r1, sp, #0 - add r4, r0, #0 - bl ov12_0223505C - mov r1, #0 - add r0, sp, #0 - sub r2, r1, #3 - bl ov12_02234E44 - add r0, sp, #0 - mov r1, #0xc - mov r2, #4 - bl ov12_02234E4C - add r0, r4, #0 - add r1, sp, #0 - bl ov12_0223507C - add sp, #0x18 - pop {r4, pc} - thumb_func_end ov12_022351D0 - - thumb_func_start ov12_022351FC -ov12_022351FC: ; 0x022351FC - push {r4, lr} - sub sp, #0x18 - add r1, sp, #0 - add r4, r0, #0 - bl ov12_0223505C - add r0, sp, #0 - mov r1, #0 - mov r2, #3 - bl ov12_02234E44 - add r0, sp, #0 - mov r1, #0xc - mov r2, #4 - bl ov12_02234E4C - add r0, r4, #0 - add r1, sp, #0 - bl ov12_0223507C - add sp, #0x18 - pop {r4, pc} - thumb_func_end ov12_022351FC - - thumb_func_start ov12_02235228 -ov12_02235228: ; 0x02235228 - push {r4, lr} - sub sp, #0x18 - add r1, sp, #0 - add r4, r0, #0 - bl ov12_0223505C - mov r1, #0 - add r0, sp, #0 - sub r2, r1, #6 - bl ov12_02234E44 - add r0, sp, #0 - mov r1, #0xc - mov r2, #4 - bl ov12_02234E4C - add r0, r4, #0 - add r1, sp, #0 - bl ov12_0223507C - add sp, #0x18 - pop {r4, pc} - thumb_func_end ov12_02235228 - - thumb_func_start ov12_02235254 -ov12_02235254: ; 0x02235254 - ldr r3, _02235258 ; =ov12_022232B8 - bx r3 - ; .align 2, 0 -_02235258: .word ov12_022232B8 - thumb_func_end ov12_02235254 - - thumb_func_start ov12_0223525C -ov12_0223525C: ; 0x0223525C - push {r4, lr} - bl ov12_022232B8 - cmp r0, #5 - bhi _02235284 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02235272: ; jump table - .short _0223527E - _02235272 - 2 ; case 0 - .short _02235282 - _02235272 - 2 ; case 1 - .short _0223527E - _02235272 - 2 ; case 2 - .short _02235282 - _02235272 - 2 ; case 3 - .short _0223527E - _02235272 - 2 ; case 4 - .short _02235282 - _02235272 - 2 ; case 5 -_0223527E: - mov r4, #3 - b _02235284 -_02235282: - mov r4, #4 -_02235284: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov12_0223525C - - thumb_func_start ov12_02235288 -ov12_02235288: ; 0x02235288 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r4, #0 -_02235290: - add r0, r6, #0 - add r1, r4, #0 - bl ov12_022232B8 - cmp r0, r5 - bne _022352A0 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_022352A0: - add r4, r4, #1 - cmp r4, #4 - blt _02235290 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02235288 - - thumb_func_start ov12_022352AC -ov12_022352AC: ; 0x022352AC - push {r4, r5, r6, lr} - add r6, r0, #0 - bl ov12_022232B8 - add r5, r0, #0 - cmp r5, #1 - bls _0223530C - mov r4, #0 -_022352BC: - add r0, r6, #0 - add r1, r4, #0 - bl ov12_022232B8 - cmp r5, #5 - bhi _02235300 - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022352D4: ; jump table - .short _02235300 - _022352D4 - 2 ; case 0 - .short _02235300 - _022352D4 - 2 ; case 1 - .short _022352E0 - _022352D4 - 2 ; case 2 - .short _022352F0 - _022352D4 - 2 ; case 3 - .short _022352E8 - _022352D4 - 2 ; case 4 - .short _022352F8 - _022352D4 - 2 ; case 5 -_022352E0: - cmp r0, #4 - bne _02235300 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_022352E8: - cmp r0, #2 - bne _02235300 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_022352F0: - cmp r0, #5 - bne _02235300 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_022352F8: - cmp r0, #3 - bne _02235300 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_02235300: - add r4, r4, #1 - cmp r4, #4 - blt _022352BC - bl sub_02022974 - add r0, r5, #0 -_0223530C: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_022352AC - - thumb_func_start ov12_02235310 -ov12_02235310: ; 0x02235310 - push {r3, lr} - cmp r0, #5 - bhi _02235346 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02235322: ; jump table - .short _0223532E - _02235322 - 2 ; case 0 - .short _02235332 - _02235322 - 2 ; case 1 - .short _02235336 - _02235322 - 2 ; case 2 - .short _0223533A - _02235322 - 2 ; case 3 - .short _0223533E - _02235322 - 2 ; case 4 - .short _02235342 - _02235322 - 2 ; case 5 -_0223532E: - mov r0, #1 - pop {r3, pc} -_02235332: - mov r0, #0 - pop {r3, pc} -_02235336: - mov r0, #3 - pop {r3, pc} -_0223533A: - mov r0, #2 - pop {r3, pc} -_0223533E: - mov r0, #5 - pop {r3, pc} -_02235342: - mov r0, #4 - pop {r3, pc} -_02235346: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02235310 - - thumb_func_start ov12_02235350 -ov12_02235350: ; 0x02235350 - push {r3, r4, r5, r6} - sub sp, #0x30 - ldr r6, _022353A4 ; =0x0223A230 - add r5, sp, #0x18 - mov r4, #0xc -_0223535A: - ldrh r3, [r6] - add r6, r6, #2 - strh r3, [r5] - add r5, r5, #2 - sub r4, r4, #1 - bne _0223535A - ldr r6, _022353A8 ; =0x0223A248 - add r5, sp, #0 - mov r4, #0xc -_0223536C: - ldrh r3, [r6] - add r6, r6, #2 - strh r3, [r5] - add r5, r5, #2 - sub r4, r4, #1 - bne _0223536C - cmp r1, #0 - beq _02235390 - lsl r3, r0, #2 - add r0, sp, #0 - add r1, r0, r3 - ldrh r0, [r0, r3] - add sp, #0x30 - strh r0, [r2] - ldrh r0, [r1, #2] - strh r0, [r2, #2] - pop {r3, r4, r5, r6} - bx lr -_02235390: - lsl r3, r0, #2 - add r0, sp, #0x18 - add r1, r0, r3 - ldrh r0, [r0, r3] - strh r0, [r2] - ldrh r0, [r1, #2] - strh r0, [r2, #2] - add sp, #0x30 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_022353A4: .word 0x0223A230 -_022353A8: .word 0x0223A248 - thumb_func_end ov12_02235350 - - thumb_func_start ov12_022353AC -ov12_022353AC: ; 0x022353AC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - bl ov12_02235254 - add r6, r0, #0 - add r0, r5, #0 - bl ov12_0221FDD4 - add r1, r0, #0 - add r0, r6, #0 - add r2, r4, #0 - bl ov12_02235350 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_022353AC - - thumb_func_start ov12_022353CC -ov12_022353CC: ; 0x022353CC - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x114 - add r7, r2, #0 - mov r2, #0x12 - str r3, [sp] - ldr r6, _02235440 ; =0x0223A260 - add r5, r0, #0 - add r4, r1, #0 - add r3, sp, #4 - lsl r2, r2, #4 -_022353E8: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _022353E8 - cmp r7, #1 - bne _0223540A - cmp r5, #0 - beq _022353FE - cmp r5, #1 - beq _02235402 - b _02235406 -_022353FE: - mov r5, #6 - b _0223540A -_02235402: - mov r5, #7 - b _0223540A -_02235406: - bl sub_02022974 -_0223540A: - mov r0, #0x12 - lsl r0, r0, #4 - add r1, sp, #4 - mul r0, r5 - add r0, r1, r0 - ldr r1, _02235444 ; =0x00000908 - add r1, sp - ldr r1, [r1, #0x10] - lsl r2, r1, #1 - ldr r1, [sp] - add r2, r1, r2 - mov r1, #0xc - add r3, r2, #0 - mul r3, r1 - add r1, r0, r3 - ldr r2, [r1, #8] - ldr r1, [r1, #4] - ldr r0, [r0, r3] - str r0, [r4, #0] - str r1, [r4, #4] - str r2, [r4, #8] - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x114 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02235440: .word 0x0223A260 -_02235444: .word 0x00000908 - thumb_func_end ov12_022353CC - - thumb_func_start ov12_02235448 -ov12_02235448: ; 0x02235448 - push {r3, r4, lr} - sub sp, #4 - mov r4, #0 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02235448 - - thumb_func_start ov12_02235458 -ov12_02235458: ; 0x02235458 - push {r3, r4, lr} - sub sp, #4 - mov r4, #1 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02235458 - - thumb_func_start ov12_02235468 -ov12_02235468: ; 0x02235468 - push {r3, r4, lr} - sub sp, #4 - mov r4, #2 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02235468 - - thumb_func_start ov12_02235478 -ov12_02235478: ; 0x02235478 - push {r3, r4, lr} - sub sp, #4 - mov r4, #3 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02235478 - - thumb_func_start ov12_02235488 -ov12_02235488: ; 0x02235488 - push {r3, r4, lr} - sub sp, #4 - mov r4, #4 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02235488 - - thumb_func_start ov12_02235498 -ov12_02235498: ; 0x02235498 - push {r3, r4, lr} - sub sp, #4 - mov r4, #5 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02235498 - - thumb_func_start ov12_022354A8 -ov12_022354A8: ; 0x022354A8 - push {r3, r4, lr} - sub sp, #4 - mov r4, #6 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_022354A8 - - thumb_func_start ov12_022354B8 -ov12_022354B8: ; 0x022354B8 - push {r3, r4, lr} - sub sp, #4 - mov r4, #7 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_022354B8 - - thumb_func_start ov12_022354C8 -ov12_022354C8: ; 0x022354C8 - push {r3, r4, lr} - sub sp, #4 - mov r4, #8 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_022354C8 - - thumb_func_start ov12_022354D8 -ov12_022354D8: ; 0x022354D8 - push {r3, r4, lr} - sub sp, #4 - mov r4, #9 - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_022354D8 - - thumb_func_start ov12_022354E8 -ov12_022354E8: ; 0x022354E8 - push {r3, r4, lr} - sub sp, #4 - mov r4, #0xa - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_022354E8 - - thumb_func_start ov12_022354F8 -ov12_022354F8: ; 0x022354F8 - push {r3, r4, lr} - sub sp, #4 - mov r4, #0xb - str r4, [sp] - bl ov12_022353CC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_022354F8 - - thumb_func_start ov12_02235508 -ov12_02235508: ; 0x02235508 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235448 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235508 - - thumb_func_start ov12_02235538 -ov12_02235538: ; 0x02235538 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235458 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235538 - - thumb_func_start ov12_02235568 -ov12_02235568: ; 0x02235568 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235468 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235568 - - thumb_func_start ov12_02235598 -ov12_02235598: ; 0x02235598 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235478 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235598 - - thumb_func_start ov12_022355C8 -ov12_022355C8: ; 0x022355C8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235488 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022355C8 - - thumb_func_start ov12_022355F8 -ov12_022355F8: ; 0x022355F8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_02235498 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022355F8 - - thumb_func_start ov12_02235628 -ov12_02235628: ; 0x02235628 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_022354A8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235628 - - thumb_func_start ov12_02235658 -ov12_02235658: ; 0x02235658 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_022354B8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235658 - - thumb_func_start ov12_02235688 -ov12_02235688: ; 0x02235688 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_022354C8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235688 - - thumb_func_start ov12_022356B8 -ov12_022356B8: ; 0x022356B8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_022354D8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022356B8 - - thumb_func_start ov12_022356E8 -ov12_022356E8: ; 0x022356E8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_022354E8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022356E8 - - thumb_func_start ov12_02235718 -ov12_02235718: ; 0x02235718 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov12_02220250 - bl sub_02014790 - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov12_02235254 - add r5, r0, #0 - add r0, r4, #0 - bl ov12_0221FDD4 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov12_022354F8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_02235718 - - thumb_func_start ov12_02235748 -ov12_02235748: ; 0x02235748 - mov r2, #0 - ldr r1, _02235754 ; =0x000068D0 - str r2, [r0, #0] - str r1, [r0, #4] - str r2, [r0, #8] - bx lr - ; .align 2, 0 -_02235754: .word 0x000068D0 - thumb_func_end ov12_02235748 - - thumb_func_start ov12_02235758 -ov12_02235758: ; 0x02235758 - push {r3, lr} - bl ov12_02235448 - pop {r3, pc} - thumb_func_end ov12_02235758 - - thumb_func_start ov12_02235760 -ov12_02235760: ; 0x02235760 - push {r3, lr} - add r3, r1, #0 - cmp r0, #0 - bne _02235770 - add r0, r3, #0 - bl sub_02014770 - pop {r3, pc} -_02235770: - ldr r2, _0223577C ; =0x0223A224 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - pop {r3, pc} - ; .align 2, 0 -_0223577C: .word 0x0223A224 - thumb_func_end ov12_02235760 - - thumb_func_start ov12_02235780 -ov12_02235780: ; 0x02235780 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0 - mvn r1, r1 - add r4, r2, #0 - cmp r5, r1 - bne _02235790 - mov r5, #0x1a -_02235790: - mov r1, #0 - mvn r1, r1 - cmp r4, r1 - bne _0223579A - mov r4, #5 -_0223579A: - mov r1, #2 - bl ov12_022233EC - mov r1, #1 - add r2, r1, #0 - lsl r2, r0 - orr r2, r1 - ldr r0, _022357B8 ; =0x04000050 - mov r1, #0 - add r3, r5, #0 - str r4, [sp] - bl sub_020BF55C - pop {r3, r4, r5, pc} - nop -_022357B8: .word 0x04000050 - thumb_func_end ov12_02235780 - - thumb_func_start ov12_022357BC -ov12_022357BC: ; 0x022357BC - push {r3, r4, r5, lr} - mov r0, #0 - add r4, r2, #0 - mvn r0, r0 - add r5, r1, #0 - cmp r4, r0 - bne _022357CC - mov r4, #0x1a -_022357CC: - mov r0, #0 - mvn r0, r0 - cmp r3, r0 - bne _022357D6 - mov r3, #5 -_022357D6: - ldr r0, _022357E8 ; =0x04000050 - str r3, [sp] - mov r1, #0 - add r2, r5, #0 - add r3, r4, #0 - bl sub_020BF55C - pop {r3, r4, r5, pc} - nop -_022357E8: .word 0x04000050 - thumb_func_end ov12_022357BC - - thumb_func_start ov12_022357EC -ov12_022357EC: ; 0x022357EC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0 - add r5, r1, #0 - mvn r0, r0 - add r4, r2, #0 - cmp r5, r0 - bne _022357FE - mov r5, #0x1a -_022357FE: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _02235808 - mov r4, #5 -_02235808: - add r0, r6, #0 - mov r1, #2 - bl ov12_022233EC - mov r1, #1 - add r2, r1, #0 - lsl r2, r0 - mov r0, #0x11 - add r7, r2, #0 - orr r7, r0 - add r0, r6, #0 - bl ov12_022233EC - mov r1, #1 - lsl r1, r0 - ldr r0, _02235834 ; =0x04000050 - add r2, r7, #0 - add r3, r5, #0 - str r4, [sp] - bl sub_020BF55C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02235834: .word 0x04000050 - thumb_func_end ov12_022357EC - - thumb_func_start ov12_02235838 -ov12_02235838: ; 0x02235838 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #0 - bne _0223588C - mov r1, #1 - bl ov12_022233EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_022233EC - add r7, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov12_022233EC - add r2, r0, #0 - mov r0, #1 - add r3, r0, #0 - add r1, r0, #0 - lsl r3, r7 - lsl r0, r2 - lsl r1, r6 - orr r0, r3 - orr r1, r0 - mov r0, #0x11 - add r2, r1, #0 - orr r2, r0 - ldr r0, _0223590C ; =0x04000048 - ldrh r1, [r0] - mov r0, #0x3f - bic r1, r0 - orr r1, r2 - cmp r4, #0 - beq _02235886 - mov r0, #0x20 - orr r1, r0 -_02235886: - ldr r0, _0223590C ; =0x04000048 - strh r1, [r0] - b _022358D6 -_0223588C: - mov r1, #1 - bl ov12_022233EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl ov12_022233EC - add r7, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov12_022233EC - add r2, r0, #0 - mov r0, #1 - add r3, r0, #0 - add r1, r0, #0 - lsl r0, r2 - lsl r3, r7 - lsl r1, r6 - orr r0, r3 - orr r1, r0 - ldr r2, _0223590C ; =0x04000048 - add r3, r1, #0 - mov r0, #0x11 - orr r3, r0 - ldrh r1, [r2] - ldr r0, _02235910 ; =0xFFFFC0FF - and r1, r0 - lsl r0, r3, #8 - orr r1, r0 - cmp r4, #0 - beq _022358D2 - lsr r0, r2, #0xd - orr r1, r0 -_022358D2: - ldr r0, _0223590C ; =0x04000048 - strh r1, [r0] -_022358D6: - add r0, r5, #0 - mov r1, #0 - bl ov12_022233EC - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov12_022233EC - mov r1, #1 - add r2, r1, #0 - lsl r1, r0 - lsl r2, r4 - orr r1, r2 - add r3, r1, #0 - ldr r1, _02235914 ; =0x0400004A - mov r0, #0x11 - orr r3, r0 - ldrh r2, [r1] - mov r0, #0x3f - bic r2, r0 - orr r2, r3 - mov r0, #0x20 - orr r0, r2 - strh r0, [r1] - pop {r3, r4, r5, r6, r7, pc} - nop -_0223590C: .word 0x04000048 -_02235910: .word 0xFFFFC0FF -_02235914: .word 0x0400004A - thumb_func_end ov12_02235838 - - thumb_func_start ov12_02235918 -ov12_02235918: ; 0x02235918 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _0223592A - mov r0, #0 - strh r0, [r4] - strh r0, [r4, #2] - pop {r3, r4, r5, pc} -_0223592A: - bl sub_02008B38 - cmp r0, #0 - bne _0223593A - mov r0, #0 - strh r0, [r4] - strh r0, [r4, #2] - pop {r3, r4, r5, pc} -_0223593A: - add r0, r5, #0 - mov r1, #0 - bl sub_020080C0 - strh r0, [r4] - add r0, r5, #0 - mov r1, #1 - bl sub_020080C0 - strh r0, [r4, #2] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02235918 - - thumb_func_start ov12_02235950 -ov12_02235950: ; 0x02235950 - ldr r3, _02235958 ; =sub_0200D550 - add r2, r1, #2 - bx r3 - nop -_02235958: .word sub_0200D550 - thumb_func_end ov12_02235950 - - thumb_func_start ov12_0223595C -ov12_0223595C: ; 0x0223595C - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0 - strb r1, [r4] - strb r1, [r4, #1] - strb r1, [r4, #2] - add r5, r0, #0 - strb r1, [r4, #3] - str r5, [r4, #4] - bl ov12_02220308 - str r0, [r4, #8] - add r0, r5, #0 - bl ov12_022202EC - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov12_02220300 - str r0, [r4, #0x10] - add r0, r5, #0 - bl ov12_02220278 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov12_0222332C - str r0, [r4, #0x18] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_0223595C - - thumb_func_start ov12_02235998 -ov12_02235998: ; 0x02235998 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - add r4, r3, #0 - mov r1, #0 - str r1, [r4, #0] - mov r1, #0x40 - and r1, r7 - add r6, r0, #0 - add r5, r2, #0 - cmp r1, #0x40 - beq _022359B2 - b _02235AD4 -_022359B2: - bl ov12_02220240 - add r7, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - cmp r0, #0 - beq _022359F4 - str r7, [r1, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_022359F4: - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022352AC - str r0, [sp, #4] - ldr r1, [sp, #4] - add r0, r6, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - ldr r1, [r0, #8] - cmp r1, #0 - beq _02235A3C - ldr r1, [sp, #4] - str r1, [r0, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235A3C: - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022232B8 - bl ov12_02235310 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_02235288 - add r7, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - cmp r0, #0 - beq _02235A8E - str r7, [r1, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235A8E: - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022352AC - add r7, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022232FC - ldr r2, [r4, #0] - mov r1, #0x14 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - str r0, [r2, #8] - ldr r0, [r4, #0] - add r2, r0, #0 - mul r2, r1 - add r2, r5, r2 - ldr r0, [r2, #8] - cmp r0, #0 - beq _02235BB6 - str r7, [r2, #0x10] - ldr r0, [r4, #0] - mul r1, r0 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02235AD4: - mov r1, #0x20 - and r1, r7 - cmp r1, #0x20 - bne _02235BD4 - bl ov12_02220240 - add r7, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022352AC - str r0, [sp, #8] - cmp r0, r7 - beq _02235B2E - ldr r1, [sp, #8] - add r0, r6, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - ldr r1, [r0, #8] - cmp r1, #0 - beq _02235B2E - ldr r1, [sp, #8] - str r1, [r0, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235B2E: - add r0, r6, #0 - add r1, r7, #0 - bl ov12_022232B8 - bl ov12_02235310 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_02235288 - str r0, [sp] - cmp r0, r7 - beq _02235B86 - ldr r1, [sp] - add r0, r6, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - ldr r1, [r0, #8] - cmp r1, #0 - beq _02235B86 - ldr r1, [sp] - str r1, [r0, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235B86: - ldr r1, [sp] - add r0, r6, #0 - bl ov12_022352AC - str r0, [sp, #0xc] - cmp r0, r7 - beq _02235BB6 - ldr r1, [sp, #0xc] - add r0, r6, #0 - bl ov12_022232FC - ldr r2, [r4, #0] - mov r1, #0x14 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - str r0, [r2, #8] - ldr r0, [r4, #0] - add r2, r0, #0 - mul r2, r1 - add r2, r5, r2 - ldr r0, [r2, #8] - cmp r0, #0 - bne _02235BB8 -_02235BB6: - b _02235D6E -_02235BB8: - ldr r0, [sp, #0xc] - str r0, [r2, #0x10] - ldr r0, [r4, #0] - mul r1, r0 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02235BD4: - mov r1, #2 - and r1, r7 - cmp r1, #2 - bne _02235C2E - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - ldr r0, [r0, #8] - cmp r0, #0 - beq _02235C2E - add r0, r6, #0 - bl ov12_02220240 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235C2E: - add r0, r6, #0 - bl ov12_02223364 - cmp r0, #1 - bne _02235CA4 - mov r0, #4 - and r0, r7 - cmp r0, #4 - bne _02235CA4 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022352AC - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - ldr r0, [r0, #8] - cmp r0, #0 - beq _02235CA4 - add r0, r6, #0 - bl ov12_02220240 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022352AC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235CA4: - mov r0, #8 - and r0, r7 - cmp r0, #8 - bne _02235D00 - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232FC - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #8] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - ldr r0, [r0, #8] - cmp r0, #0 - beq _02235D00 - add r0, r6, #0 - bl ov12_02220248 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #0x10] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235D00: - add r0, r6, #0 - bl ov12_02223364 - cmp r0, #1 - bne _02235D6E - mov r0, #0x10 - and r0, r7 - cmp r0, #0x10 - bne _02235D6E - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022352AC - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022232FC - ldr r2, [r4, #0] - mov r1, #0x14 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - str r0, [r2, #8] - ldr r0, [r4, #0] - mul r1, r0 - add r0, r5, r1 - ldr r0, [r0, #8] - cmp r0, #0 - beq _02235D6E - add r0, r6, #0 - bl ov12_02220248 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022352AC - ldr r2, [r4, #0] - mov r1, #0x14 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - str r0, [r2, #0x10] - ldr r0, [r4, #0] - mul r1, r0 - add r1, r5, r1 - ldr r0, [r1, #8] - add r1, r1, #4 - bl ov12_02235918 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235D6E: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02235998 - - thumb_func_start ov12_02235D74 -ov12_02235D74: ; 0x02235D74 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r3, #0 - mov r1, #0 - str r1, [r4, #0] - mov r1, #2 - and r1, r6 - add r7, r0, #0 - add r5, r2, #0 - cmp r1, #2 - bne _02235DB4 - ldr r1, [r4, #0] - bl ov12_022202C0 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #0xc] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #0xc] - add r1, r1, #4 - bl ov12_02235950 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235DB4: - mov r0, #4 - and r0, r6 - cmp r0, #4 - bne _02235DE8 - ldr r1, [r4, #0] - add r0, r7, #0 - bl ov12_022202C0 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #0xc] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #0xc] - add r1, r1, #4 - bl ov12_02235950 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235DE8: - mov r0, #8 - and r0, r6 - cmp r0, #8 - bne _02235E1C - ldr r1, [r4, #0] - add r0, r7, #0 - bl ov12_022202C0 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r3, #0x14 - add r1, r0, #0 - mul r1, r3 - add r0, r5, r1 - str r2, [r0, #0xc] - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r3 - add r1, r5, r1 - ldr r0, [r1, #0xc] - add r1, r1, #4 - bl ov12_02235950 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235E1C: - mov r0, #0x10 - and r0, r6 - cmp r0, #0x10 - bne _02235E4C - ldr r1, [r4, #0] - add r0, r7, #0 - bl ov12_022202C0 - ldr r2, [r4, #0] - mov r1, #0x14 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - str r0, [r2, #0xc] - ldr r0, [r4, #0] - mul r1, r0 - add r1, r5, r1 - ldr r0, [r1, #0xc] - add r1, r1, #4 - bl ov12_02235950 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02235E4C: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02235D74 - - thumb_func_start ov12_02235E50 -ov12_02235E50: ; 0x02235E50 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r4, #0 - bne _02235E5E - bl sub_02022974 -_02235E5E: - add r0, r4, #0 - bl ov12_0221FDE4 - add r1, r5, #0 - bl sub_02018144 - add r4, r0, #0 - bne _02235E72 - bl sub_02022974 -_02235E72: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02235E50 - - thumb_func_start ov12_02235E80 -ov12_02235E80: ; 0x02235E80 - push {r4, lr} - add r4, r0, #0 - bne _02235E8A - bl sub_02022974 -_02235E8A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02235E80 - - thumb_func_start ov12_02235E94 -ov12_02235E94: ; 0x02235E94 - cmp r0, #1 - blt _02235E9E - ldr r1, _02235EAC ; =0x00000113 - cmp r0, r1 - ble _02235EA2 -_02235E9E: - mov r0, #4 - b _02235EA8 -_02235EA2: - cmp r0, #0xff - blt _02235EA8 - sub r0, #0xff -_02235EA8: - sub r0, r0, #1 - bx lr - ; .align 2, 0 -_02235EAC: .word 0x00000113 - thumb_func_end ov12_02235E94 - - thumb_func_start ov12_02235EB0 -ov12_02235EB0: ; 0x02235EB0 - push {r3, r4, r5} - sub sp, #0x2c - ldr r5, _02235EEC ; =0x0223AC0C - add r2, r0, #0 - add r4, sp, #0 - mov r3, #5 -_02235EBC: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _02235EBC - ldr r0, [r5, #0] - str r0, [r4, #0] - mov r0, #0 - add r3, r0, #0 - add r4, sp, #0 -_02235ECE: - ldr r1, [r4, #0] - cmp r2, r1 - bne _02235EDC - add sp, #0x2c - mov r0, #1 - pop {r3, r4, r5} - bx lr -_02235EDC: - add r3, r3, #1 - add r4, r4, #4 - cmp r3, #0xb - blo _02235ECE - add sp, #0x2c - pop {r3, r4, r5} - bx lr - nop -_02235EEC: .word 0x0223AC0C - thumb_func_end ov12_02235EB0 - - thumb_func_start ov12_02235EF0 -ov12_02235EF0: ; 0x02235EF0 - push {r4, r5} - sub sp, #0x18 - ldr r3, _02235F28 ; =0x0223AB6C - add r2, sp, #0 - add r5, r0, #0 - add r4, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0 - add r2, r0, #0 -_02235F0C: - ldr r1, [r4, #0] - cmp r5, r1 - bne _02235F1A - add sp, #0x18 - mov r0, #1 - pop {r4, r5} - bx lr -_02235F1A: - add r2, r2, #1 - add r4, r4, #4 - cmp r2, #6 - blo _02235F0C - add sp, #0x18 - pop {r4, r5} - bx lr - ; .align 2, 0 -_02235F28: .word 0x0223AB6C - thumb_func_end ov12_02235EF0 - - thumb_func_start ov12_02235F2C -ov12_02235F2C: ; 0x02235F2C - push {r3, r4, r5} - sub sp, #0xc - ldr r5, _02235F60 ; =0x0223AB60 - add r3, r0, #0 - ldmia r5!, {r0, r1} - add r4, sp, #0 - add r2, r4, #0 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r4, #0] - mov r0, #1 - mov r4, #0 -_02235F44: - ldr r1, [r2, #0] - cmp r3, r1 - bne _02235F52 - add sp, #0xc - mov r0, #0 - pop {r3, r4, r5} - bx lr -_02235F52: - add r4, r4, #1 - add r2, r2, #4 - cmp r4, #3 - blo _02235F44 - add sp, #0xc - pop {r3, r4, r5} - bx lr - ; .align 2, 0 -_02235F60: .word 0x0223AB60 - thumb_func_end ov12_02235F2C - - thumb_func_start ov12_02235F64 -ov12_02235F64: ; 0x02235F64 - push {r3, lr} - bl ov12_02235E94 - lsl r1, r0, #3 - ldr r0, _02235F74 ; =0x0223AD70 - ldr r0, [r0, r1] - pop {r3, pc} - nop -_02235F74: .word 0x0223AD70 - thumb_func_end ov12_02235F64 - - thumb_func_start ov12_02235F78 -ov12_02235F78: ; 0x02235F78 - push {r3, lr} - bl ov12_02235E94 - lsl r1, r0, #3 - ldr r0, _02235F88 ; =0x0223AD74 - ldr r0, [r0, r1] - pop {r3, pc} - nop -_02235F88: .word 0x0223AD74 - thumb_func_end ov12_02235F78 - - thumb_func_start ov12_02235F8C -ov12_02235F8C: ; 0x02235F8C - push {r3, lr} - bl ov12_02235E94 - mov r1, #0xc - mul r1, r0 - ldr r0, _02235F9C ; =0x0223AE10 - ldr r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 -_02235F9C: .word 0x0223AE10 - thumb_func_end ov12_02235F8C - - thumb_func_start ov12_02235FA0 -ov12_02235FA0: ; 0x02235FA0 - push {r3, lr} - bl ov12_02235E94 - mov r1, #0xc - mul r1, r0 - ldr r0, _02235FB0 ; =0x0223AE18 - ldr r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 -_02235FB0: .word 0x0223AE18 - thumb_func_end ov12_02235FA0 - - thumb_func_start ov12_02235FB4 -ov12_02235FB4: ; 0x02235FB4 - push {r3, lr} - bl ov12_02235E94 - mov r1, #0xc - mul r1, r0 - ldr r0, _02235FC4 ; =0x0223AE14 - ldr r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 -_02235FC4: .word 0x0223AE14 - thumb_func_end ov12_02235FB4 - - thumb_func_start ov12_02235FC8 -ov12_02235FC8: ; 0x02235FC8 - push {r4, lr} - add r4, r1, #0 - bl ov12_02235E94 - lsl r2, r0, #4 - ldr r0, _02235FDC ; =0x0223AF00 - lsl r1, r4, #2 - add r0, r0, r2 - ldr r0, [r1, r0] - pop {r4, pc} - ; .align 2, 0 -_02235FDC: .word 0x0223AF00 - thumb_func_end ov12_02235FC8 - - thumb_func_start ov12_02235FE0 -ov12_02235FE0: ; 0x02235FE0 - push {r4, lr} - mov r1, #0xb8 - add r4, r0, #0 - bl sub_02018144 - cmp r0, #0 - bne _02235FF6 - bl sub_02022974 - mov r0, #0 - pop {r4, pc} -_02235FF6: - add r1, r0, #0 - str r4, [r0, #0] - mov r2, #0 - add r1, #0x88 - str r2, [r1, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02235FE0 - - thumb_func_start ov12_02236004 -ov12_02236004: ; 0x02236004 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl ov12_02235FE0 - add r1, r5, #0 - add r4, r0, #0 - bl ov12_02236030 - mov r1, #0 - str r1, [r4, #0x10] - add r2, r4, #0 - add r0, r1, #0 -_0223601C: - str r0, [r2, #0x14] - str r0, [r2, #0x38] - str r0, [r2, #0x5c] - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #9 - blt _0223601C - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02236004 - - thumb_func_start ov12_02236030 -ov12_02236030: ; 0x02236030 - push {r4, lr} - add r3, r1, #0 - add r4, r0, #0 - ldmia r3!, {r0, r1} - add r2, r4, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #0xa2 - str r0, [r2, #0] - ldr r0, [r4, #0xc] - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - cmp r0, #0xd - blt _0223605E - bl sub_02022974 -_0223605E: - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - cmp r0, #0 - bne _0223608A - add r0, r4, #0 - mov r2, #0 - add r0, #0x94 - str r2, [r0, #0] - ldr r0, [r4, #8] - cmp r0, #0 - beq _0223607C - add r4, #0x98 - str r0, [r4, #0] - pop {r4, pc} -_0223607C: - ldr r0, [r4, #0xc] - mov r1, #0x9b - bl sub_02074470 - add r4, #0x98 - str r0, [r4, #0] - pop {r4, pc} -_0223608A: - add r0, r4, #0 - mov r1, #1 - add r0, #0x94 - str r1, [r0, #0] - ldr r0, [r4, #0xc] - add r4, #0xa0 - mov r1, #0xab - add r2, r4, #0 - bl sub_02074470 - pop {r4, pc} - thumb_func_end ov12_02236030 - - thumb_func_start ov12_022360A0 -ov12_022360A0: ; 0x022360A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r1, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #3 - bls _022360B4 - b _0223631C -_022360B4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022360C0: ; jump table - .short _022360C8 - _022360C0 - 2 ; case 0 - .short _02236166 - _022360C0 - 2 ; case 1 - .short _022361F6 - _022360C0 - 2 ; case 2 - .short _02236286 - _022360C0 - 2 ; case 3 -_022360C8: - ldr r1, [r4, #0] - mov r0, #0x63 - bl sub_02006C24 - add r1, r4, #0 - add r1, #0x8c - str r0, [r1, #0] - add r0, r4, #0 - add r6, r4, #0 - str r0, [sp, #0x14] - add r0, #0xa0 - mov r5, #0 - add r6, #0x10 - str r0, [sp, #0x14] -_022360E4: - ldr r0, [sp, #0x14] - add r1, r5, #0 - bl sub_0202CA64 - add r7, r0, #0 - beq _02236150 - bl sub_0202CA7C - cmp r0, #0 - beq _02236150 - cmp r0, #0x51 - bge _02236150 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02098188 - str r0, [sp, #0x10] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - str r7, [r0, #0x38] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _0223611E - bl sub_02022974 -_0223611E: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [r4, #0] - ldr r2, [sp, #0x10] - mov r3, #0 - bl ov12_0222384C - ldr r1, [r4, #0x10] - lsl r1, r1, #2 - add r1, r4, r1 - str r0, [r1, #0x14] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _0223614A - bne _02236150 - bl sub_02022974 - b _02236150 -_0223614A: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] -_02236150: - add r5, r5, #1 - cmp r5, #2 - blt _022360E4 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r4, #0x90 - add r0, r0, #1 - add sp, #0x24 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_02236166: - add r0, r4, #0 - add r6, r4, #0 - str r0, [sp, #0x18] - add r0, #0xa0 - mov r5, #2 - add r6, #0x10 - str r0, [sp, #0x18] -_02236174: - ldr r0, [sp, #0x18] - add r1, r5, #0 - bl sub_0202CA64 - add r7, r0, #0 - beq _022361E0 - bl sub_0202CA7C - cmp r0, #0 - beq _022361E0 - cmp r0, #0x51 - bge _022361E0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02098188 - str r0, [sp, #4] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - str r7, [r0, #0x38] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _022361AE - bl sub_02022974 -_022361AE: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [r4, #0] - ldr r2, [sp, #4] - mov r3, #0 - bl ov12_0222384C - ldr r1, [r4, #0x10] - lsl r1, r1, #2 - add r1, r4, r1 - str r0, [r1, #0x14] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _022361DA - bne _022361E0 - bl sub_02022974 - b _022361E0 -_022361DA: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] -_022361E0: - add r5, r5, #1 - cmp r5, #4 - blt _02236174 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r4, #0x90 - add r0, r0, #1 - add sp, #0x24 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_022361F6: - add r0, r4, #0 - add r6, r4, #0 - str r0, [sp, #0x1c] - add r0, #0xa0 - mov r5, #4 - add r6, #0x10 - str r0, [sp, #0x1c] -_02236204: - ldr r0, [sp, #0x1c] - add r1, r5, #0 - bl sub_0202CA64 - add r7, r0, #0 - beq _02236270 - bl sub_0202CA7C - cmp r0, #0 - beq _02236270 - cmp r0, #0x51 - bge _02236270 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02098188 - str r0, [sp, #8] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - str r7, [r0, #0x38] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _0223623E - bl sub_02022974 -_0223623E: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [r4, #0] - ldr r2, [sp, #8] - mov r3, #0 - bl ov12_0222384C - ldr r1, [r4, #0x10] - lsl r1, r1, #2 - add r1, r4, r1 - str r0, [r1, #0x14] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _0223626A - bne _02236270 - bl sub_02022974 - b _02236270 -_0223626A: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] -_02236270: - add r5, r5, #1 - cmp r5, #6 - blt _02236204 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r4, #0x90 - add r0, r0, #1 - add sp, #0x24 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_02236286: - add r0, r4, #0 - add r6, r4, #0 - str r0, [sp, #0x20] - add r0, #0xa0 - mov r5, #6 - add r6, #0x10 - str r0, [sp, #0x20] -_02236294: - ldr r0, [sp, #0x20] - add r1, r5, #0 - bl sub_0202CA64 - add r7, r0, #0 - beq _02236300 - bl sub_0202CA7C - cmp r0, #0 - beq _02236300 - cmp r0, #0x51 - bge _02236300 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02098188 - str r0, [sp, #0xc] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - str r7, [r0, #0x38] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _022362CE - bl sub_02022974 -_022362CE: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [r4, #0] - ldr r2, [sp, #0xc] - mov r3, #0 - bl ov12_0222384C - ldr r1, [r4, #0x10] - lsl r1, r1, #2 - add r1, r4, r1 - str r0, [r1, #0x14] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _022362FA - bne _02236300 - bl sub_02022974 - b _02236300 -_022362FA: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] -_02236300: - add r5, r5, #1 - cmp r5, #8 - blt _02236294 - add r0, r4, #0 - mov r1, #0xff - add r0, #0x90 - add r4, #0x8c - str r1, [r0, #0] - ldr r0, [r4, #0] - bl sub_02006CA8 - ldr r0, [sp] - bl sub_0200DA58 -_0223631C: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov12_022360A0 - - thumb_func_start ov12_02236320 -ov12_02236320: ; 0x02236320 - push {r4, lr} - add r4, r0, #0 - add r0, #0x94 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02236350 - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - bl ov12_02235F64 - add r2, r0, #0 - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - mov r1, #0x63 - mov r3, #0 - bl ov12_02223818 - str r0, [r4, #0x14] - mov r0, #0xff - add r4, #0x90 - str r0, [r4, #0] - pop {r4, pc} -_02236350: - mov r1, #0 - add r0, r4, #0 - mov r2, #0xfa - str r1, [r4, #0x10] - add r0, #0x90 - str r1, [r0, #0] - ldr r0, _02236370 ; =ov12_022360A0 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - add r1, r4, #0 - bl ov12_022360A0 - pop {r4, pc} - nop -_02236370: .word ov12_022360A0 - thumb_func_end ov12_02236320 - - thumb_func_start ov12_02236374 -ov12_02236374: ; 0x02236374 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0xff - bne _02236380 - mov r0, #1 - bx lr -_02236380: - mov r0, #0 - bx lr - thumb_func_end ov12_02236374 - - thumb_func_start ov12_02236384 -ov12_02236384: ; 0x02236384 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r1, #1 - add r0, #0x88 - str r1, [r0, #0] - bl ov12_02220474 - add r0, r5, #0 - add r1, r4, #0 - bl ov12_0223646C - mov r2, #0xfa - ldr r0, _022363B0 ; =ov12_022363CC - add r1, r5, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - add r5, #0x84 - str r0, [r5, #0] - pop {r3, r4, r5, pc} - nop -_022363B0: .word ov12_022363CC - thumb_func_end ov12_02236384 - - thumb_func_start ov12_022363B4 -ov12_022363B4: ; 0x022363B4 - ldr r3, _022363BC ; =ov12_02236384 - ldr r1, _022363C0 ; =ov12_02236598 - bx r3 - nop -_022363BC: .word ov12_02236384 -_022363C0: .word ov12_02236598 - thumb_func_end ov12_022363B4 - - thumb_func_start ov12_022363C4 -ov12_022363C4: ; 0x022363C4 - add r0, #0x88 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_022363C4 - - thumb_func_start ov12_022363CC -ov12_022363CC: ; 0x022363CC - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - str r0, [sp] - ldr r0, [r6, #0x10] - mov r7, #0 - cmp r0, #9 - ble _022363DE - bl sub_02022974 -_022363DE: - ldr r0, [r6, #0x10] - mov r4, #0 - cmp r0, #0 - ble _02236416 - add r5, r6, #0 -_022363E8: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _0223640C - bl sub_02014710 - cmp r0, #0 - bne _0223640A - ldr r0, [r5, #0x5c] - cmp r0, #0 - beq _0223640A - ldr r0, [r5, #0x14] - bl ov12_02223894 - mov r0, #0 - str r0, [r5, #0x14] - str r0, [r5, #0x5c] - b _0223640C -_0223640A: - mov r7, #1 -_0223640C: - ldr r0, [r6, #0x10] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _022363E8 -_02236416: - cmp r7, #0 - bne _02236426 - mov r0, #0 - add r6, #0x88 - str r0, [r6, #0] - ldr r0, [sp] - bl sub_0200DA58 -_02236426: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022363CC - - thumb_func_start ov12_02236428 -ov12_02236428: ; 0x02236428 - ldr r3, _0223642C ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_0223642C: .word sub_020181C4 - thumb_func_end ov12_02236428 - - thumb_func_start ov12_02236430 -ov12_02236430: ; 0x02236430 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _02236464 - ldr r0, [r4, #0xc] - mov r1, #1 - str r1, [r0, #0] - ldr r0, [r4, #0x10] - ldr r2, [r4, #0x18] - mov r1, #0 - add r3, r4, #0 - bl sub_020146F4 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02014788 - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_02236464: - sub r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02236430 - - thumb_func_start ov12_0223646C -ov12_0223646C: ; 0x0223646C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r7, r1, #0 - cmp r0, #0 - bne _022364AA - add r0, r6, #0 - add r0, #0x98 - ldr r0, [r0, #0] - bl ov12_02235F78 - add r5, r0, #0 - mov r4, #0 - cmp r5, #0 - ble _0223649E -_0223648C: - ldr r0, [r6, #0x14] - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl sub_020146F4 - add r4, r4, #1 - cmp r4, r5 - blt _0223648C -_0223649E: - mov r1, #1 - str r1, [r6, #0x5c] - ldr r0, [r6, #0x14] - bl sub_02014788 - pop {r3, r4, r5, r6, r7, pc} -_022364AA: - ldr r0, [r6, #0x10] - mov r7, #0 - cmp r0, #0 - ble _02236510 - add r0, r6, #0 - str r0, [sp] - add r0, #0x5c - add r5, r6, #0 - str r0, [sp] -_022364BC: - ldr r0, [r6, #0] - mov r1, #0x1c - bl sub_02018144 - add r4, r0, #0 - bne _022364CC - bl sub_02022974 -_022364CC: - str r7, [r4, #0] - ldr r0, [r6, #4] - str r0, [r4, #8] - ldr r0, _02236514 ; =ov12_022365D4 - str r0, [r4, #0x18] - mov r0, #0 - str r0, [r5, #0x5c] - ldr r0, [sp] - str r0, [r4, #0xc] - ldr r0, [r5, #0x14] - str r0, [r4, #0x10] - ldr r0, [r5, #0x38] - str r0, [r4, #0x14] - cmp r0, #0 - bne _022364EE - bl sub_02022974 -_022364EE: - ldr r0, [r4, #0x14] - bl ov12_02237EA0 - str r0, [r4, #4] - ldr r0, _02236518 ; =ov12_02236430 - ldr r2, _0223651C ; =0x000003E9 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r0, [sp] - add r7, r7, #1 - add r0, r0, #4 - str r0, [sp] - ldr r0, [r6, #0x10] - add r5, r5, #4 - cmp r7, r0 - blt _022364BC -_02236510: - pop {r3, r4, r5, r6, r7, pc} - nop -_02236514: .word ov12_022365D4 -_02236518: .word ov12_02236430 -_0223651C: .word 0x000003E9 - thumb_func_end ov12_0223646C - - thumb_func_start ov12_02236520 -ov12_02236520: ; 0x02236520 - push {r3, r4, r5, lr} - mov r2, #0 - mov r3, #1 - add r5, r0, #0 - add r4, r1, #0 - bl ov12_02235758 - cmp r5, #5 - bhi _02236576 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223653E: ; jump table - .short _0223654A - _0223653E - 2 ; case 0 - .short _02236552 - _0223653E - 2 ; case 1 - .short _0223655C - _0223653E - 2 ; case 2 - .short _02236564 - _0223653E - 2 ; case 3 - .short _0223656E - _0223653E - 2 ; case 4 - .short _02236576 - _0223653E - 2 ; case 5 -_0223654A: - mov r5, #0 - add r0, r5, #0 - sub r0, #0x10 - b _0223657E -_02236552: - mov r5, #0xe - mvn r5, r5 - add r0, r5, #0 - sub r0, #0xa - b _0223657E -_0223655C: - mov r5, #7 - mvn r5, r5 - sub r0, r5, #4 - b _0223657E -_02236564: - mov r5, #0xd - mvn r5, r5 - add r0, r5, #0 - sub r0, #0xb - b _0223657E -_0223656E: - mov r5, #7 - mvn r5, r5 - sub r0, r5, #4 - b _0223657E -_02236576: - mov r5, #0xf - mvn r5, r5 - add r0, r5, #0 - sub r0, #0xd -_0223657E: - add r5, #0xa - ldr r3, [r4, #0] - mov r1, #0xac - add r2, r5, #0 - mul r2, r1 - sub r2, r3, r2 - str r2, [r4, #0] - add r0, #0x20 - ldr r2, [r4, #4] - mul r1, r0 - sub r0, r2, r1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} - thumb_func_end ov12_02236520 - - thumb_func_start ov12_02236598 -ov12_02236598: ; 0x02236598 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl sub_02014764 - ldr r0, [r0, #4] - add r1, sp, #0 - bl ov12_02236520 - ldr r0, [r4, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r4, #0x30] - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02236598 - - thumb_func_start ov12_022365D4 -ov12_022365D4: ; 0x022365D4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02014764 - add r4, r0, #0 - ldr r0, [r4, #8] - add r1, sp, #0 - bl ov12_02236520 - ldr r0, [r4, #0x14] - bl sub_0202CA7C - bl sub_020981AC - ldr r0, [r4, #0x14] - bl sub_0202CA80 - add r6, r0, #0 - ldr r0, [r4, #0x14] - bl sub_0202CA84 - sub r6, #0xbe - lsl r1, r6, #0x10 - asr r3, r1, #0x10 - ldr r2, [sp] - mov r1, #0xac - add r4, r3, #0 - mul r4, r1 - add r3, r2, r4 - mov r4, #0x64 - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - ldr r2, [sp, #4] - mul r1, r0 - add r0, r2, r1 - str r3, [sp] - str r0, [sp, #4] - ldr r0, [r5, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r3, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov12_022365D4 - - thumb_func_start ov12_02236648 -ov12_02236648: ; 0x02236648 - push {r4, lr} - add r4, r0, #0 - bl sub_02014764 - mov r1, #2 - ldrsh r2, [r0, r1] - mov r1, #0x64 - mov r3, #0xac - sub r1, r1, r2 - lsl r1, r1, #0x10 - asr r2, r1, #0x10 - add r1, r2, #0 - mov r2, #0 - ldrsh r0, [r0, r2] - mul r1, r3 - sub r0, #0x81 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add r2, r0, #0 - ldr r0, [r4, #0x20] - mul r2, r3 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r2, r0 - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x20] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - str r0, [r4, #0x30] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02236648 - - thumb_func_start ov12_02236690 -ov12_02236690: ; 0x02236690 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - mov r1, #0x24 - bl sub_02018144 - add r4, r0, #0 - bne _022366A4 - bl sub_02022974 -_022366A4: - ldmia r5!, {r0, r1} - add r2, r4, #0 - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _022366C8 - ldr r0, _022366EC ; =0x00000113 - bl ov12_02235F8C - str r0, [r4, #0x20] - ldr r0, _022366EC ; =0x00000113 - bl ov12_02235FA0 - b _022366D6 -_022366C8: - ldr r0, [r4, #4] - bl ov12_02235F8C - str r0, [r4, #0x20] - ldr r0, [r4, #4] - bl ov12_02235FA0 -_022366D6: - str r0, [r4, #0x1c] - ldr r0, [r4, #8] - ldr r2, [r4, #0x20] - mov r1, #0x63 - mov r3, #0 - bl ov12_02223818 - str r0, [r4, #0x18] - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_022366EC: .word 0x00000113 - thumb_func_end ov12_02236690 - - thumb_func_start ov12_022366F0 -ov12_022366F0: ; 0x022366F0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r1, [r5, #0xc] - cmp r1, #0xff - bne _0223674A - ldr r0, [r5, #0x10] - cmp r0, #0 - beq _02236720 - ldr r0, [r5, #0x1c] - mov r4, #0 - cmp r0, #0 - ble _02236754 - ldr r6, _02236760 ; =ov12_02236648 -_0223670A: - ldr r0, [r5, #0x18] - add r1, r4, #0 - add r2, r6, #0 - add r3, r5, #0 - bl sub_020146F4 - ldr r0, [r5, #0x1c] - add r4, r4, #1 - cmp r4, r0 - blt _0223670A - b _02236754 -_02236720: - ldr r0, [r5, #0x1c] - mov r4, #0 - cmp r0, #0 - ble _02236754 - ldr r6, _02236760 ; =ov12_02236648 -_0223672A: - ldr r0, [r5, #4] - bl ov12_02235FB4 - cmp r4, r0 - beq _02236740 - ldr r0, [r5, #0x18] - add r1, r4, #0 - add r2, r6, #0 - add r3, r5, #0 - bl sub_020146F4 -_02236740: - ldr r0, [r5, #0x1c] - add r4, r4, #1 - cmp r4, r0 - blt _0223672A - b _02236754 -_0223674A: - ldr r0, [r5, #0x18] - ldr r2, _02236760 ; =ov12_02236648 - add r3, r5, #0 - bl sub_020146F4 -_02236754: - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_02014788 - pop {r4, r5, r6, pc} - nop -_02236760: .word ov12_02236648 - thumb_func_end ov12_022366F0 - - thumb_func_start ov12_02236764 -ov12_02236764: ; 0x02236764 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl sub_02014710 - cmp r0, #0 - bne _0223677C - ldr r0, [r4, #0x18] - bl ov12_02223894 - mov r0, #0 - pop {r4, pc} -_0223677C: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_02236764 - - thumb_func_start ov12_02236780 -ov12_02236780: ; 0x02236780 - ldr r3, _02236784 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_02236784: .word sub_020181C4 - thumb_func_end ov12_02236780 - - thumb_func_start ov12_02236788 -ov12_02236788: ; 0x02236788 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _0223679C - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #1 - bl ov12_02237828 -_0223679C: - add r0, r4, #0 - mov r1, #2 - bl ov12_0223782C - cmp r0, #1 - bne _022367AC - mov r0, #0 - pop {r4, pc} -_022367AC: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_02236788 - - thumb_func_start ov12_022367B0 -ov12_022367B0: ; 0x022367B0 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _022367C4 - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #3 - bl ov12_02237828 -_022367C4: - add r0, r4, #0 - mov r1, #4 - bl ov12_0223782C - cmp r0, #1 - bne _022367D4 - mov r0, #0 - pop {r4, pc} -_022367D4: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_022367B0 - - thumb_func_start ov12_022367D8 -ov12_022367D8: ; 0x022367D8 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _022367EC - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #5 - bl ov12_02237828 -_022367EC: - add r0, r4, #0 - mov r1, #6 - bl ov12_0223782C - cmp r0, #1 - bne _022367FC - mov r0, #0 - pop {r4, pc} -_022367FC: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_022367D8 - - thumb_func_start ov12_02236800 -ov12_02236800: ; 0x02236800 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _02236814 - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #7 - bl ov12_02237828 -_02236814: - add r0, r4, #0 - mov r1, #0xe - bl ov12_0223782C - cmp r0, #1 - bne _02236824 - mov r0, #0 - pop {r4, pc} -_02236824: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_02236800 - - thumb_func_start ov12_02236828 -ov12_02236828: ; 0x02236828 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _0223683C - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #0xf - bl ov12_02237828 -_0223683C: - add r0, r4, #0 - mov r1, #0x12 - bl ov12_0223782C - cmp r0, #1 - bne _0223684C - mov r0, #0 - pop {r4, pc} -_0223684C: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_02236828 - - thumb_func_start ov12_02236850 -ov12_02236850: ; 0x02236850 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _02236864 - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #0x13 - bl ov12_02237828 -_02236864: - add r0, r4, #0 - mov r1, #0x1b - bl ov12_0223782C - cmp r0, #1 - bne _02236874 - mov r0, #0 - pop {r4, pc} -_02236874: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_02236850 - - thumb_func_start ov12_02236878 -ov12_02236878: ; 0x02236878 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _0223688C - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #0x15 - bl ov12_02237828 -_0223688C: - add r0, r4, #0 - mov r1, #0x16 - bl ov12_0223782C - cmp r0, #1 - bne _0223689C - mov r0, #0 - pop {r4, pc} -_0223689C: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_02236878 - - thumb_func_start ov12_022368A0 -ov12_022368A0: ; 0x022368A0 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _022368B4 - add r1, r1, #1 - str r1, [r4, #4] - mov r1, #0x17 - bl ov12_02237828 -_022368B4: - add r0, r4, #0 - mov r1, #0x1b - bl ov12_0223782C - cmp r0, #1 - bne _022368C4 - mov r0, #0 - pop {r4, pc} -_022368C4: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_022368A0 - - thumb_func_start ov12_022368C8 -ov12_022368C8: ; 0x022368C8 - str r1, [r0, #0] - mov r1, #0 - str r1, [r0, #4] - bx lr - thumb_func_end ov12_022368C8 - - thumb_func_start ov12_022368D0 -ov12_022368D0: ; 0x022368D0 - push {r3, lr} - ldr r1, [r0, #0] - lsl r2, r1, #2 - ldr r1, _022368E0 ; =0x0223AB9C - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - nop -_022368E0: .word 0x0223AB9C - thumb_func_end ov12_022368D0 - - thumb_func_start ov12_022368E4 -ov12_022368E4: ; 0x022368E4 - str r1, [r0, #0x14] - mov r1, #0 - str r1, [r0, #8] - str r1, [r0, #0xc] - str r1, [r0, #0x10] - bx lr - thumb_func_end ov12_022368E4 - - thumb_func_start ov12_022368F0 -ov12_022368F0: ; 0x022368F0 - mov r0, #1 - bx lr - thumb_func_end ov12_022368F0 - - thumb_func_start ov12_022368F4 -ov12_022368F4: ; 0x022368F4 - push {r4, lr} - add r4, r0, #0 - bl ov12_02236F24 - cmp r0, #0 - bne _02236908 - add r0, r4, #0 - mov r1, #2 - bl ov12_022368E4 -_02236908: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_022368F4 - - thumb_func_start ov12_0223690C -ov12_0223690C: ; 0x0223690C - push {r3, lr} - mov r1, #3 - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_0223690C - - thumb_func_start ov12_02236918 -ov12_02236918: ; 0x02236918 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bhi _022369E8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02236930: ; jump table - .short _02236938 - _02236930 - 2 ; case 0 - .short _0223698E - _02236930 - 2 ; case 1 - .short _022369A4 - _02236930 - 2 ; case 2 - .short _022369C0 - _02236930 - 2 ; case 3 -_02236938: - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D364 - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - add r2, sp, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, sp, #0 - str r0, [sp, #8] - mov r0, #0xff - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0x30] - add r2, #2 - bl sub_0200D550 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xb4 - add r1, #0x94 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov12_02223764 - add r1, r4, #0 - add r1, #0xd8 - str r0, [r1, #0] - add r0, sp, #0 - bl ov12_02236690 - add r1, r4, #0 - add r1, #0xd0 - str r0, [r1, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022369F0 -_0223698E: - ldr r0, [r4, #0x30] - bl sub_0200D3E0 - cmp r0, #2 - blt _022369F0 - mov r0, #0 - str r0, [r4, #0x24] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022369F0 -_022369A4: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_022366F0 - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - bl ov12_02223770 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022369F0 -_022369C0: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_02236764 - cmp r0, #0 - bne _022369F0 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3CC - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_02236780 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022369F0 -_022369E8: - add r0, r4, #0 - mov r1, #4 - bl ov12_022368E4 -_022369F0: - mov r0, #1 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02236918 - - thumb_func_start ov12_022369F8 -ov12_022369F8: ; 0x022369F8 - mov r0, #1 - bx lr - thumb_func_end ov12_022369F8 - - thumb_func_start ov12_022369FC -ov12_022369FC: ; 0x022369FC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0xc] - cmp r1, #0 - bne _02236A3C - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0xb8 - add r2, #0xba - bl sub_0200D550 - add r0, r4, #0 - mov r1, #0x3c - add r0, #0xbc - strh r1, [r0] - add r0, r4, #0 - mov r1, #0xb4 - add r0, #0xbe - strh r1, [r0] - add r0, r4, #0 - mov r1, #0xa - add r0, #0xc0 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0xc - add r0, #0xc8 - str r1, [r0, #0] - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _02236A4C -_02236A3C: - bl ov12_02236F24 - cmp r0, #0 - bne _02236A4C - add r0, r4, #0 - mov r1, #6 - bl ov12_022368E4 -_02236A4C: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov12_022369FC - - thumb_func_start ov12_02236A50 -ov12_02236A50: ; 0x02236A50 - mov r0, #1 - bx lr - thumb_func_end ov12_02236A50 - - thumb_func_start ov12_02236A54 -ov12_02236A54: ; 0x02236A54 - push {r3, lr} - mov r1, #8 - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236A54 - - thumb_func_start ov12_02236A60 -ov12_02236A60: ; 0x02236A60 - push {r3, lr} - mov r1, #9 - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236A60 - - thumb_func_start ov12_02236A6C -ov12_02236A6C: ; 0x02236A6C - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02236A7E - cmp r0, #1 - beq _02236AB2 - b _02236AF4 -_02236A7E: - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xc - str r0, [sp, #4] - ldr r0, _02236B10 ; =0x0000037F - mov r3, #1 - add r5, r3, #0 - str r0, [sp, #8] - add r0, r4, #0 - lsl r5, r2 - add r0, #0xb0 - lsl r2, r5, #0x10 - ldr r0, [r0, #0] - mov r1, #4 - lsr r2, r2, #0x10 - sub r3, r3, #2 - bl sub_02003178 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236B0A -_02236AB2: - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02236B0A - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r2, r0, #0 - mov r0, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02236B10 ; =0x0000037F - mov r3, #1 - add r5, r3, #0 - str r0, [sp, #8] - add r0, r4, #0 - lsl r5, r2 - add r0, #0xb0 - lsl r2, r5, #0x10 - ldr r0, [r0, #0] - mov r1, #4 - lsr r2, r2, #0x10 - sub r3, r3, #2 - bl sub_02003178 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236B0A -_02236AF4: - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02236B0A - add r0, r4, #0 - mov r1, #0xa - bl ov12_022368E4 -_02236B0A: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02236B10: .word 0x0000037F - thumb_func_end ov12_02236A6C - - thumb_func_start ov12_02236B14 -ov12_02236B14: ; 0x02236B14 - push {r3, lr} - mov r1, #0xb - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236B14 - - thumb_func_start ov12_02236B20 -ov12_02236B20: ; 0x02236B20 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02236B32 - cmp r0, #1 - beq _02236B72 - b _02236B8E -_02236B32: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #1 - blt _02236B8E - add r1, sp, #8 - ldr r0, [r4, #0x30] - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - add r1, sp, #8 - mov r0, #0 - ldrsh r3, [r1, r0] - mov r0, #2 - ldrsh r1, [r1, r0] - add r0, r3, #0 - add r0, #0x20 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x48 - add r2, r1, #0 - bl ov12_02225BC8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236B8E -_02236B72: - add r0, r4, #0 - ldr r1, [r4, #0x30] - add r0, #0x48 - bl ov12_02225C50 - cmp r0, #0 - bne _02236B8E - ldr r0, [r4, #8] - mov r1, #0xd - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - bl ov12_022368E4 -_02236B8E: - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov12_02236B20 - - thumb_func_start ov12_02236B94 -ov12_02236B94: ; 0x02236B94 - mov r0, #1 - bx lr - thumb_func_end ov12_02236B94 - - thumb_func_start ov12_02236B98 -ov12_02236B98: ; 0x02236B98 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r1, [r5, #8] - cmp r1, #0 - beq _02236BA8 - cmp r1, #1 - beq _02236BBE - b _02236C1E -_02236BA8: - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #0 - bl sub_0200D3CC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02236BBE: - ldr r1, [r5, #0xc] - mov r0, #6 - add r2, r1, #0 - mul r2, r0 - ldr r0, _02236C28 ; =0x0223ACF2 - ldr r1, _02236C2C ; =0x0223ACF4 - ldrsh r0, [r0, r2] - ldrh r1, [r1, r2] - str r0, [sp] - ldr r0, [r5, #0x30] - bl sub_0200D3CC - ldr r0, [r5, #0xc] - ldr r4, _02236C30 ; =0x0223ABE4 - add r0, r0, #1 - str r0, [r5, #0xc] - mov r6, #0 - mov r7, #0x75 -_02236BE2: - ldr r1, [r5, #0xc] - ldr r0, [r4, #0] - cmp r1, r0 - bne _02236BF6 - ldr r0, [r4, #4] - add r1, r7, #0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_02005728 -_02236BF6: - add r6, r6, #1 - add r4, #8 - cmp r6, #5 - blt _02236BE2 - ldr r0, [r5, #0xc] - cmp r0, #0x14 - bgt _02236C0A - ldr r0, [sp] - cmp r0, #0xff - bne _02236C12 -_02236C0A: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02236C24 -_02236C12: - ldr r0, [r5, #0x30] - ldr r2, [sp] - mov r1, #0 - bl sub_0200D5DC - b _02236C24 -_02236C1E: - mov r1, #0xe - bl ov12_022368E4 -_02236C24: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02236C28: .word 0x0223ACF2 -_02236C2C: .word 0x0223ACF4 -_02236C30: .word 0x0223ABE4 - thumb_func_end ov12_02236B98 - - thumb_func_start ov12_02236C34 -ov12_02236C34: ; 0x02236C34 - mov r0, #1 - bx lr - thumb_func_end ov12_02236C34 - - thumb_func_start ov12_02236C38 -ov12_02236C38: ; 0x02236C38 - push {r3, lr} - ldr r1, [r0, #0xc] - add r1, r1, #1 - str r1, [r0, #0xc] - cmp r1, #0xe - blt _02236C54 - ldr r1, [r0, #8] - add r1, r1, #1 - str r1, [r0, #8] - mov r1, #0 - str r1, [r0, #0xc] - mov r1, #0x10 - bl ov12_022368E4 -_02236C54: - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236C38 - - thumb_func_start ov12_02236C58 -ov12_02236C58: ; 0x02236C58 - push {r3, lr} - mov r1, #0x11 - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236C58 - - thumb_func_start ov12_02236C64 -ov12_02236C64: ; 0x02236C64 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - cmp r0, #0 - beq _02236C74 - cmp r0, #1 - beq _02236C84 - b _02236CEC -_02236C74: - ldr r0, [r5, #0x18] - cmp r0, #3 - blt _02236C7E - bl sub_02022974 -_02236C7E: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02236C84: - ldr r1, [r5, #0x18] - mov r0, #0x18 - add r3, r1, #0 - mul r3, r0 - ldr r0, _02236CF0 ; =0x0223AC38 - ldr r1, [r5, #0xc] - add r0, r0, r3 - lsl r2, r1, #1 - ldrsh r4, [r2, r0] - add r0, r1, #1 - str r0, [r5, #0xc] - cmp r0, #0xb - bgt _02236CA2 - cmp r4, #0xff - bne _02236CC2 -_02236CA2: - ldr r0, [r5, #8] - mov r1, #0 - add r0, r0, #1 - str r0, [r5, #8] - ldr r0, [r5, #0x18] - add r0, r0, #1 - str r0, [r5, #0x18] - ldr r0, [r5, #0x30] - bl sub_0200D79C - add r0, r5, #0 - mov r1, #0x12 - bl ov12_022368E4 - mov r0, #1 - pop {r3, r4, r5, pc} -_02236CC2: - cmp r0, #5 - bne _02236CCE - ldr r0, _02236CF4 ; =0x000005FE - mov r1, #0x75 - bl sub_02005728 -_02236CCE: - ldr r0, [r5, #0x30] - add r1, r4, #0 - mov r2, #0 - bl sub_0200D5DC - ldr r0, _02236CF8 ; =0x0001FFFE - mov r1, #0x5a - mul r0, r4 - lsl r1, r1, #2 - bl sub_020E1F6C - add r1, r0, #0 - ldr r0, [r5, #0x30] - bl sub_0200D7C0 -_02236CEC: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02236CF0: .word 0x0223AC38 -_02236CF4: .word 0x000005FE -_02236CF8: .word 0x0001FFFE - thumb_func_end ov12_02236C64 - - thumb_func_start ov12_02236CFC -ov12_02236CFC: ; 0x02236CFC - mov r0, #1 - bx lr - thumb_func_end ov12_02236CFC - - thumb_func_start ov12_02236D00 -ov12_02236D00: ; 0x02236D00 - push {r3, lr} - mov r1, #0x14 - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236D00 - - thumb_func_start ov12_02236D0C -ov12_02236D0C: ; 0x02236D0C - push {r3, lr} - mov r1, #0x1b - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236D0C - - thumb_func_start ov12_02236D18 -ov12_02236D18: ; 0x02236D18 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bhi _02236DEC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02236D30: ; jump table - .short _02236D38 - _02236D30 - 2 ; case 0 - .short _02236D6A - _02236D30 - 2 ; case 1 - .short _02236DB2 - _02236D30 - 2 ; case 2 - .short _02236DC4 - _02236D30 - 2 ; case 3 -_02236D38: - ldr r0, [r4, #0x30] - bl sub_0200D43C - mov r1, #0 - mov r3, #1 - add r2, r0, #0 - add r5, r3, #0 - lsl r5, r2 - lsl r2, r5, #0x10 - str r1, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - str r1, [sp, #8] - add r0, #0xb0 - ldr r0, [r0, #0] - mov r1, #4 - lsr r2, r2, #0x10 - sub r3, r3, #6 - bl sub_02003178 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236E02 -_02236D6A: - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02236E02 - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - add r1, r4, #0 - str r0, [sp, #0x10] - add r1, #0x94 - ldr r1, [r1, #0] - str r1, [sp, #0x14] - bl ov12_02235FB4 - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp, #0x1c] - add r2, sp, #0xc - ldr r0, [r4, #0x30] - add r1, sp, #0xc - add r2, #2 - bl sub_0200D550 - add r0, sp, #0xc - bl ov12_02236690 - add r1, r4, #0 - add r1, #0xd0 - str r0, [r1, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236E02 -_02236DB2: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_022366F0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236E02 -_02236DC4: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_02236764 - cmp r0, #0 - bne _02236E02 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3CC - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_02236780 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236E02 -_02236DEC: - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02236E02 - add r0, r4, #0 - mov r1, #0x16 - bl ov12_022368E4 -_02236E02: - mov r0, #1 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov12_02236D18 - - thumb_func_start ov12_02236E08 -ov12_02236E08: ; 0x02236E08 - mov r0, #1 - bx lr - thumb_func_end ov12_02236E08 - - thumb_func_start ov12_02236E0C -ov12_02236E0C: ; 0x02236E0C - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _02236E1E - cmp r1, #1 - beq _02236E50 - b _02236E64 -_02236E1E: - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r2, r0, #0 - mov r0, #0xa - str r0, [sp] - mov r0, #0 - mov r3, #1 - add r5, r3, #0 - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r4, #0 - lsl r5, r2 - add r0, #0xb0 - lsl r2, r5, #0x10 - ldr r0, [r0, #0] - mov r1, #4 - lsr r2, r2, #0x10 - sub r3, r3, #6 - bl sub_02003178 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236E6A -_02236E50: - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _02236E6A - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236E6A -_02236E64: - mov r1, #0x18 - bl ov12_022368E4 -_02236E6A: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov12_02236E0C - - thumb_func_start ov12_02236E70 -ov12_02236E70: ; 0x02236E70 - push {r3, lr} - mov r1, #0x19 - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236E70 - - thumb_func_start ov12_02236E7C -ov12_02236E7C: ; 0x02236E7C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _02236E8C - cmp r1, #1 - beq _02236E9A - b _02236EF2 -_02236E8C: - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D810 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02236E9A: - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _02236EC2 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x21 - strb r1, [r0] - b _02236EDE -_02236EC2: - add r0, r4, #0 - mov r1, #0 - add r0, #0x20 - strb r1, [r0] - add r0, r4, #0 - mov r2, #0xf - add r0, #0x21 - strb r2, [r0] - ldr r0, [r4, #0x30] - bl sub_0200D3F4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02236EDE: - add r0, r4, #0 - add r0, #0x20 - add r4, #0x21 - ldrb r1, [r0] - ldrb r0, [r4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02236EFC ; =0x04000052 - strh r1, [r0] - b _02236EF8 -_02236EF2: - mov r1, #0x1a - bl ov12_022368E4 -_02236EF8: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_02236EFC: .word 0x04000052 - thumb_func_end ov12_02236E7C - - thumb_func_start ov12_02236F00 -ov12_02236F00: ; 0x02236F00 - push {r3, lr} - mov r1, #0x1b - bl ov12_022368E4 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov12_02236F00 - - thumb_func_start ov12_02236F0C -ov12_02236F0C: ; 0x02236F0C - mov r0, #0 - bx lr - thumb_func_end ov12_02236F0C - - thumb_func_start ov12_02236F10 -ov12_02236F10: ; 0x02236F10 - push {r3, lr} - ldr r1, [r0, #0x14] - lsl r2, r1, #2 - ldr r1, _02236F20 ; =0x0223AC80 - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - nop -_02236F20: .word 0x0223AC80 - thumb_func_end ov12_02236F10 - - thumb_func_start ov12_02236F24 -ov12_02236F24: ; 0x02236F24 - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bls _02236F32 - b _02237132 -_02236F32: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02236F3E: ; jump table - .short _02236F46 - _02236F3E - 2 ; case 0 - .short _02236FB4 - _02236F3E - 2 ; case 1 - .short _022370AE - _02236F3E - 2 ; case 2 - .short _02237112 - _02236F3E - 2 ; case 3 -_02236F46: - mov r0, #0xba - ldrsh r0, [r4, r0] - add r1, r4, #0 - mov r2, #0xb8 - str r0, [sp] - mov r0, #0xbe - ldrsh r0, [r4, r0] - mov r3, #0xbc - add r1, #0x6c - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - add r0, #0x48 - bl ov12_02225C98 - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EB0 - cmp r0, #1 - bne _0223709C - bl sub_0201D2E8 - mov r1, #0x14 - bl sub_020E1F6C - add r1, #0xa - ldr r0, [r4, #0x30] - lsl r1, r1, #0xd - bl sub_0200D7C0 - b _022371CE -_02236FB4: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EB0 - cmp r0, #1 - bne _02237052 - mov r1, #2 - ldr r0, [r4, #0x30] - lsl r1, r1, #0xc - bl sub_0200D7C0 - add r0, r4, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, #0xa - cmp r2, r0 - ble _02236FEE - mov r1, #2 - ldr r0, [r4, #0x30] - lsl r1, r1, #0xc - bl sub_0200D7C0 -_02236FEE: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EF0 - cmp r0, #1 - bne _02237052 - add r0, r4, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, #0xa - cmp r2, r0 - bne _02237052 - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - add r1, r4, #0 - lsl r3, r3, #0x14 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _022371D4 ; =0x0000FFFF - add r1, #0x94 - str r0, [sp, #0x14] - ldr r0, _022371D8 ; =0x000003EA - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov12_02226870 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] -_02237052: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #6 - blt _0223708A - cmp r0, #8 - bgt _0223708A - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r2, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - cmp r1, r2 - ble _0223708A - add r0, r2, #5 - cmp r1, r0 - blt _0223709C -_0223708A: - add r0, r4, #0 - add r1, r4, #0 - ldr r2, [r4, #0x30] - add r0, #0x48 - add r1, #0x6c - bl ov12_02225D2C - cmp r0, #0 - beq _0223709E -_0223709C: - b _022371CE -_0223709E: - add r0, r4, #0 - mov r1, #0 - bl ov12_02237E24 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022371CE -_022370AE: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EF0 - cmp r0, #1 - bne _022370E2 - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022370E2 - bl ov12_02226848 - cmp r0, #1 - beq _022371CE - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl ov12_02226858 - mov r0, #1 - str r0, [r4, #0x28] - add sp, #0x1c - mov r0, #0 - pop {r3, r4, pc} -_022370E2: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0xf - blt _022370F6 - mov r0, #1 - str r0, [r4, #0x28] - add sp, #0x1c - mov r0, #0 - pop {r3, r4, pc} -_022370F6: - add r0, r4, #0 - add r0, #0xa0 - ldr r1, [r0, #0] - ldr r0, _022371DC ; =0x00000111 - cmp r1, r0 - bne _0223710A - ldr r0, _022371E0 ; =0x000007E8 - mov r1, #0x75 - bl sub_02005728 -_0223710A: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022371CE -_02237112: - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D364 - add r0, r4, #0 - mov r1, #1 - bl ov12_02237E30 - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022371CE -_02237132: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #5 - bne _0223718C - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0xc - beq _02237188 - cmp r0, #0xd - beq _02237188 - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - add r1, r4, #0 - lsl r3, r3, #0x14 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _022371D4 ; =0x0000FFFF - add r1, #0x94 - str r0, [sp, #0x14] - ldr r0, _022371D8 ; =0x000003EA - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov12_02226870 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] -_02237188: - mov r0, #1 - str r0, [r4, #0x28] -_0223718C: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0xf - ble _022371CE - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0xc - beq _022371C8 - cmp r0, #0xd - beq _022371C8 - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl ov12_02226848 - cmp r0, #1 - beq _022371CE - add r4, #0xd4 - ldr r0, [r4, #0] - bl ov12_02226858 -_022371C8: - add sp, #0x1c - mov r0, #0 - pop {r3, r4, pc} -_022371CE: - mov r0, #1 - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_022371D4: .word 0x0000FFFF -_022371D8: .word 0x000003EA -_022371DC: .word 0x00000111 -_022371E0: .word 0x000007E8 - thumb_func_end ov12_02236F24 - - thumb_func_start ov12_022371E4 -ov12_022371E4: ; 0x022371E4 - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bls _022371F2 - b _022373DE -_022371F2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022371FE: ; jump table - .short _02237206 - _022371FE - 2 ; case 0 - .short _02237274 - _022371FE - 2 ; case 1 - .short _0223736E - _022371FE - 2 ; case 2 - .short _022373BE - _022371FE - 2 ; case 3 -_02237206: - mov r0, #0xba - ldrsh r0, [r4, r0] - add r1, r4, #0 - mov r2, #0xb8 - str r0, [sp] - mov r0, #0xbe - ldrsh r0, [r4, r0] - mov r3, #0xbc - add r1, #0x6c - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, r4, #0 - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - add r0, #0x48 - bl ov12_02225C98 - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EB0 - cmp r0, #1 - bne _0223735C - bl sub_0201D2E8 - mov r1, #0x14 - bl sub_020E1F6C - add r1, #0xa - ldr r0, [r4, #0x30] - lsl r1, r1, #0xd - bl sub_0200D7C0 - b _02237466 -_02237274: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EB0 - cmp r0, #1 - bne _02237312 - mov r1, #2 - ldr r0, [r4, #0x30] - lsl r1, r1, #0xc - bl sub_0200D7C0 - add r0, r4, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, #0xa - cmp r2, r0 - ble _022372AE - mov r1, #2 - ldr r0, [r4, #0x30] - lsl r1, r1, #0xc - bl sub_0200D7C0 -_022372AE: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EF0 - cmp r0, #1 - bne _02237312 - add r0, r4, #0 - add r0, #0xc4 - ldr r2, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, #0xa - cmp r2, r0 - bne _02237312 - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - add r1, r4, #0 - lsl r3, r3, #0x14 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _0223746C ; =0x0000FFFF - add r1, #0x94 - str r0, [sp, #0x14] - ldr r0, _02237470 ; =0x000003EA - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov12_02226870 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] -_02237312: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #6 - blt _0223734A - cmp r0, #8 - bgt _0223734A - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r2, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - cmp r1, r2 - ble _0223734A - add r0, r2, #5 - cmp r1, r0 - blt _0223735C -_0223734A: - add r0, r4, #0 - add r1, r4, #0 - ldr r2, [r4, #0x30] - add r0, #0x48 - add r1, #0x6c - bl ov12_02225D2C - cmp r0, #0 - beq _0223735E -_0223735C: - b _02237466 -_0223735E: - add r0, r4, #0 - mov r1, #0 - bl ov12_02237E24 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237466 -_0223736E: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235EF0 - cmp r0, #1 - bne _022373A2 - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022373A2 - bl ov12_02226848 - cmp r0, #1 - beq _02237466 - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl ov12_02226858 - mov r0, #1 - str r0, [r4, #0x28] - add sp, #0x1c - mov r0, #0 - pop {r3, r4, pc} -_022373A2: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0xf - blt _022373B6 - mov r0, #1 - str r0, [r4, #0x28] - add sp, #0x1c - mov r0, #0 - pop {r3, r4, pc} -_022373B6: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237466 -_022373BE: - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D364 - add r0, r4, #0 - mov r1, #0 - bl ov12_02237E30 - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237466 -_022373DE: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #5 - bne _02237432 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_0200D3CC - ldr r0, [r4, #0x30] - bl sub_0200D43C - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - sub r0, #0x12 - str r0, [sp, #4] - mov r2, #2 - add r1, r4, #0 - lsl r3, r3, #0x14 - str r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0xe - str r0, [sp, #0x10] - ldr r0, _0223746C ; =0x0000FFFF - add r1, #0x94 - str r0, [sp, #0x14] - ldr r0, _02237470 ; =0x000003EA - lsr r3, r3, #0x10 - str r0, [sp, #0x18] - add r0, r4, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov12_02226870 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] - mov r0, #1 - str r0, [r4, #0x28] -_02237432: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0xf - ble _02237466 - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl ov12_02226848 - cmp r0, #1 - beq _02237466 - add r4, #0xd4 - ldr r0, [r4, #0] - bl ov12_02226858 - add sp, #0x1c - mov r0, #0 - pop {r3, r4, pc} -_02237466: - mov r0, #1 - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_0223746C: .word 0x0000FFFF -_02237470: .word 0x000003EA - thumb_func_end ov12_022371E4 - - thumb_func_start ov12_02237474 -ov12_02237474: ; 0x02237474 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #7 - bls _02237482 - b _022375FA -_02237482: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223748E: ; jump table - .short _0223749E - _0223748E - 2 ; case 0 - .short _022374DC - _0223748E - 2 ; case 1 - .short _0223750C - _0223748E - 2 ; case 2 - .short _02237542 - _0223748E - 2 ; case 3 - .short _02237552 - _0223748E - 2 ; case 4 - .short _02237580 - _0223748E - 2 ; case 5 - .short _022375AE - _0223748E - 2 ; case 6 - .short _022375DC - _0223748E - 2 ; case 7 -_0223749E: - mov r1, #0 - bl ov12_02237E30 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D364 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #2 - blt _022374F2 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3CC - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_022374DC: - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #2 - bge _022374F4 -_022374F2: - b _02237600 -_022374F4: - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_0200D3CC - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_0223750C: - add r0, #0xa0 - ldr r0, [r0, #0] - add r2, sp, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, sp, #0 - str r0, [sp, #8] - mov r0, #0xff - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0x30] - add r2, #2 - bl sub_0200D550 - add r0, sp, #0 - bl ov12_02236690 - add r1, r4, #0 - add r1, #0xd0 - str r0, [r1, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_02237542: - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_022366F0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_02237552: - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #6 - blt _02237600 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_0200D3CC - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_02237580: - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #6 - blt _02237600 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D3CC - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_022375AE: - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #6 - blt _02237600 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3CC - add r0, r4, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_022375DC: - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_02236764 - cmp r0, #0 - bne _02237600 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl ov12_02236780 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237600 -_022375FA: - add sp, #0x14 - mov r0, #0 - pop {r3, r4, pc} -_02237600: - mov r0, #1 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02237474 - - thumb_func_start ov12_02237608 -ov12_02237608: ; 0x02237608 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02237618 - cmp r0, #1 - beq _0223764C - b _0223767E -_02237618: - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0223762E - ldr r1, _0223768C ; =0xFFFFE001 - add r0, r4, #0 - add r0, #0x34 - lsr r2, r1, #0x13 - mov r3, #0xa - bl ov12_02225D50 - b _0223763C -_0223762E: - add r0, r4, #0 - ldr r1, _02237690 ; =0x00001FFF - ldr r2, _0223768C ; =0xFFFFE001 - add r0, #0x34 - mov r3, #0xa - bl ov12_02225D50 -_0223763C: - ldr r1, [r4, #0x10] - mov r0, #1 - eor r0, r1 - str r0, [r4, #0x10] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237686 -_0223764C: - ldr r1, [r4, #0x34] - ldr r0, [r4, #0x30] - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0200D79C - add r0, r4, #0 - add r0, #0x34 - bl ov12_02225DA0 - cmp r0, #0 - bne _02237686 - ldr r0, [r4, #0xc] - cmp r0, #1 - blt _02237672 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237686 -_02237672: - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - b _02237686 -_0223767E: - mov r0, #0 - add r4, #0xc4 - str r0, [r4, #0] - pop {r4, pc} -_02237686: - mov r0, #1 - pop {r4, pc} - nop -_0223768C: .word 0xFFFFE001 -_02237690: .word 0x00001FFF - thumb_func_end ov12_02237608 - - thumb_func_start ov12_02237694 -ov12_02237694: ; 0x02237694 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0xff - bne _022376A6 - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_022376A6: - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _022376CA - add r1, sp, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r2, [r1, r0] - add r0, r4, #0 - add r0, #0xb8 - strh r2, [r0] - mov r0, #0 - ldrsh r0, [r1, r0] - add r4, #0xba - strh r0, [r4] -_022376CA: - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov12_02237694 - - thumb_func_start ov12_022376D0 -ov12_022376D0: ; 0x022376D0 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _02237722 - add r0, r4, #0 - add r0, #0xdc - ldr r0, [r0, #0] - cmp r0, #0 - ble _022376FA - add r0, r4, #0 - add r0, #0xdc - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xdc - str r1, [r0, #0] - ldr r0, [r4, #0x2c] - bl sub_0200C7EC - pop {r4, pc} -_022376FA: - add r1, #0x98 - ldr r1, [r1, #0] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02237724 ; =0x0223AB84 - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - bne _02237710 - mov r0, #0 - str r0, [r4, #0x1c] -_02237710: - ldr r0, [r4, #0x24] - cmp r0, #1 - bne _0223771C - ldr r0, [r4, #0x30] - bl sub_0200D330 -_0223771C: - ldr r0, [r4, #0x2c] - bl sub_0200C7EC -_02237722: - pop {r4, pc} - ; .align 2, 0 -_02237724: .word 0x0223AB84 - thumb_func_end ov12_022376D0 - - thumb_func_start ov12_02237728 -ov12_02237728: ; 0x02237728 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - mov r1, #0xe0 - bl sub_02018144 - mov r1, #0 - mov r2, #0xe0 - add r4, r0, #0 - bl sub_020C4CF4 - cmp r4, #0 - bne _02237746 - bl sub_02022974 -_02237746: - add r3, r4, #0 - add r3, #0x90 - mov r2, #5 -_0223774C: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223774C - mov r0, #0 - str r0, [r4, #8] - str r0, [r4, #0x10] - str r0, [r4, #0xc] - str r0, [r4, #0x14] - str r0, [r4, #0x18] - str r0, [r4, #0] - str r0, [r4, #4] - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200C704 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #0 - add r0, #0xdc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl ov12_02235F2C - str r0, [r4, #0x24] - add r0, r4, #0 - mov r2, #0 - add r0, #0xc4 - str r2, [r0, #0] - add r0, r4, #0 - mov r1, #0x10 - add r0, #0x20 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x21 - strb r2, [r0] - bl ov12_02220474 - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r0, r0, #0x1f - sub r0, r0, r1 - mov r2, #0x1f - ror r0, r2 - add r0, r1, r0 - beq _022377BA - add r0, r4, #0 - mov r1, #1 - add r0, #0x22 - strb r1, [r0] - b _022377C2 -_022377BA: - add r0, r4, #0 - sub r2, #0x20 - add r0, #0x22 - strb r2, [r0] -_022377C2: - add r0, r4, #0 - bl ov12_02237C54 - add r0, r4, #0 - bl ov12_02237D8C - add r0, r4, #0 - bl ov12_022378A0 - mov r0, #1 - str r0, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0x28] - mov r2, #0xfa - ldr r0, _022377F4 ; =ov12_022376D0 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - add r1, r4, #0 - add r1, #0xcc - str r0, [r1, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_022377F4: .word ov12_022376D0 - thumb_func_end ov12_02237728 - - thumb_func_start ov12_022377F8 -ov12_022377F8: ; 0x022377F8 - push {r4, lr} - add r4, r0, #0 - bne _02237802 - bl sub_02022974 -_02237802: - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0223780C - mov r0, #1 - pop {r4, pc} -_0223780C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov12_022377F8 - - thumb_func_start ov12_02237810 -ov12_02237810: ; 0x02237810 - push {r4, lr} - add r4, r0, #0 - bne _0223781A - bl sub_02022974 -_0223781A: - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _02237824 - mov r0, #1 - pop {r4, pc} -_02237824: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov12_02237810 - - thumb_func_start ov12_02237828 -ov12_02237828: ; 0x02237828 - str r1, [r0, #0x14] - bx lr - thumb_func_end ov12_02237828 - - thumb_func_start ov12_0223782C -ov12_0223782C: ; 0x0223782C - ldr r0, [r0, #0x14] - cmp r0, r1 - bne _02237836 - mov r0, #1 - bx lr -_02237836: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov12_0223782C - - thumb_func_start ov12_0223783C -ov12_0223783C: ; 0x0223783C - push {r4, lr} - add r4, r0, #0 - bne _02237846 - bl sub_02022974 -_02237846: - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r4, #0x2c] - bl sub_0200D0B0 - ldr r0, [r4, #0x30] - bl sub_0200D0F4 - add r0, r4, #0 - add r0, #0xcc - ldr r0, [r0, #0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_0223783C - - thumb_func_start ov12_0223786C -ov12_0223786C: ; 0x0223786C - add r2, r0, #0 - add r0, #0x98 - str r1, [r0, #0] - mov r0, #0 - str r0, [r2, #8] - str r0, [r2, #0xc] - str r0, [r2, #0x10] - mov r0, #1 - add r1, r2, #0 - str r0, [r2, #0x1c] - ldr r0, [r2, #0x30] - ldr r3, _0223788C ; =sub_0200D550 - add r1, #0xb8 - add r2, #0xba - bx r3 - nop -_0223788C: .word sub_0200D550 - thumb_func_end ov12_0223786C - - thumb_func_start ov12_02237890 -ov12_02237890: ; 0x02237890 - push {r4, lr} - add r4, r0, #0 - bne _0223789A - bl sub_02022974 -_0223789A: - add r4, #0x98 - ldr r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov12_02237890 - - thumb_func_start ov12_022378A0 -ov12_022378A0: ; 0x022378A0 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0xb8 - add r2, #0xba - bl sub_0200D550 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0x11 - bls _022378BE - b _02237B0C -_022378BE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022378CA: ; jump table - .short _022378EE - _022378CA - 2 ; case 0 - .short _022378EE - _022378CA - 2 ; case 1 - .short _022378EE - _022378CA - 2 ; case 2 - .short _022378EE - _022378CA - 2 ; case 3 - .short _022378EE - _022378CA - 2 ; case 4 - .short _022378EE - _022378CA - 2 ; case 5 - .short _0223790C - _022378CA - 2 ; case 6 - .short _02237932 - _022378CA - 2 ; case 7 - .short _02237966 - _022378CA - 2 ; case 8 - .short _0223798C - _022378CA - 2 ; case 9 - .short _022379B2 - _022378CA - 2 ; case 10 - .short _022379D8 - _022378CA - 2 ; case 11 - .short _022379FE - _022378CA - 2 ; case 12 - .short _02237A2A - _022378CA - 2 ; case 13 - .short _02237A62 - _022378CA - 2 ; case 14 - .short _02237A88 - _022378CA - 2 ; case 15 - .short _02237AB4 - _022378CA - 2 ; case 16 - .short _02237AE0 - _022378CA - 2 ; case 17 -_022378EE: - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0xbc - add r2, #0xbe - bl sub_0200D550 - add r0, r4, #0 - mov r1, #0 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xc - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} -_0223790C: - mov r0, #0 - add r2, r4, #0 - add r3, r4, #0 - add r1, r0, #0 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x30 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_02237932: - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0xb8 - add r2, #0xba - bl sub_0200D550 - add r2, r4, #0 - add r3, r4, #0 - mov r0, #1 - mov r1, #4 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x30 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_02237966: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #1 - mov r1, #2 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x30 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_0223798C: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0 - mov r1, #1 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x30 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_022379B2: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #1 - mov r1, #3 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x30 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_022379D8: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #1 - mov r1, #5 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x30 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_022379FE: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0 - mov r1, #1 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x10 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x10 - strh r1, [r0] - mov r0, #0xc - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} -_02237A2A: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0 - mov r1, #1 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x20 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbc - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbc - sub r1, #0x14 - strh r1, [r0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x26 - strh r1, [r0] - mov r0, #0x10 - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} -_02237A62: - add r0, r4, #0 - mov r1, #0x80 - add r0, #0xbc - strh r1, [r0] - add r0, r4, #0 - mov r1, #0x40 - add r0, #0xbe - strh r1, [r0] - add r0, r4, #0 - mov r1, #0x20 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #0x20 - strh r1, [r0] - b _02237B0C -_02237A88: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0 - mov r1, #1 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x40 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #8 - strh r1, [r0] - mov r0, #0x10 - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} -_02237AB4: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #1 - mov r1, #3 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x40 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #8 - strh r1, [r0] - mov r0, #0x10 - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} -_02237AE0: - add r2, r4, #0 - add r3, r4, #0 - mov r0, #1 - mov r1, #5 - add r2, #0xbc - add r3, #0xbe - bl ov12_02225864 - add r0, r4, #0 - mov r1, #0x40 - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0xbe - ldrsh r1, [r4, r0] - add r0, r4, #0 - add r0, #0xbe - add r1, #8 - strh r1, [r0] - mov r0, #0x10 - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} -_02237B0C: - mov r0, #0x14 - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov12_022378A0 - - thumb_func_start ov12_02237B14 -ov12_02237B14: ; 0x02237B14 - push {r4, lr} - add r0, #0x90 - ldr r0, [r0, #0] - add r3, r1, #0 - add r4, r2, #0 - cmp r0, #0x11 - bls _02237B24 - b _02237C50 -_02237B24: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02237B30: ; jump table - .short _02237B54 - _02237B30 - 2 ; case 0 - .short _02237B6A - _02237B30 - 2 ; case 1 - .short _02237B80 - _02237B30 - 2 ; case 2 - .short _02237BAC - _02237B30 - 2 ; case 3 - .short _02237B96 - _02237B30 - 2 ; case 4 - .short _02237BC2 - _02237B30 - 2 ; case 5 - .short _02237BD8 - _02237B30 - 2 ; case 6 - .short _02237BE2 - _02237B30 - 2 ; case 7 - .short _02237BEC - _02237B30 - 2 ; case 8 - .short _02237BF6 - _02237B30 - 2 ; case 9 - .short _02237C04 - _02237B30 - 2 ; case 10 - .short _02237C12 - _02237B30 - 2 ; case 11 - .short _02237C20 - _02237B30 - 2 ; case 12 - .short _02237C2E - _02237B30 - 2 ; case 13 - .short _02237C3C - _02237B30 - 2 ; case 14 - .short _02237C46 - _02237B30 - 2 ; case 15 - .short _02237C46 - _02237B30 - 2 ; case 16 - .short _02237C46 - _02237B30 - 2 ; case 17 -_02237B54: - mov r0, #0 - add r2, r3, #0 - add r1, r0, #0 - add r3, r4, #0 - bl ov12_02225864 - mov r0, #0 - ldrsh r0, [r4, r0] - add r0, #0x28 - strh r0, [r4] - pop {r4, pc} -_02237B6A: - add r2, r3, #0 - mov r0, #0 - mov r1, #1 - add r3, r4, #0 - bl ov12_02225864 - mov r0, #0 - ldrsh r0, [r4, r0] - add r0, #0x26 - strh r0, [r4] - pop {r4, pc} -_02237B80: - add r2, r3, #0 - mov r0, #1 - mov r1, #2 - add r3, r4, #0 - bl ov12_02225864 - mov r0, #0 - ldrsh r0, [r4, r0] - add r0, #0x28 - strh r0, [r4] - pop {r4, pc} -_02237B96: - add r2, r3, #0 - mov r0, #1 - mov r1, #4 - add r3, r4, #0 - bl ov12_02225864 - mov r0, #0 - ldrsh r0, [r4, r0] - add r0, #0x28 - strh r0, [r4] - pop {r4, pc} -_02237BAC: - add r2, r3, #0 - mov r0, #1 - mov r1, #3 - add r3, r4, #0 - bl ov12_02225864 - mov r0, #0 - ldrsh r0, [r4, r0] - add r0, #0x26 - strh r0, [r4] - pop {r4, pc} -_02237BC2: - add r2, r3, #0 - mov r0, #1 - mov r1, #5 - add r3, r4, #0 - bl ov12_02225864 - mov r0, #0 - ldrsh r0, [r4, r0] - add r0, #0x26 - strh r0, [r4] - pop {r4, pc} -_02237BD8: - mov r0, #0xa - strh r0, [r3] - mov r0, #0x64 - strh r0, [r4] - pop {r4, pc} -_02237BE2: - mov r0, #0xa - strh r0, [r3] - mov r0, #0x64 - strh r0, [r4] - pop {r4, pc} -_02237BEC: - mov r0, #0xa - strh r0, [r3] - mov r0, #0x64 - strh r0, [r4] - pop {r4, pc} -_02237BF6: - mov r0, #0 - add r2, r3, #0 - add r1, r0, #0 - add r3, r4, #0 - bl ov12_02225864 - pop {r4, pc} -_02237C04: - mov r0, #0 - add r2, r3, #0 - add r1, r0, #0 - add r3, r4, #0 - bl ov12_02225864 - pop {r4, pc} -_02237C12: - mov r0, #0 - add r2, r3, #0 - add r1, r0, #0 - add r3, r4, #0 - bl ov12_02225864 - pop {r4, pc} -_02237C20: - mov r0, #0 - add r2, r3, #0 - add r1, r0, #0 - add r3, r4, #0 - bl ov12_02225864 - pop {r4, pc} -_02237C2E: - mov r0, #0 - add r2, r3, #0 - add r1, r0, #0 - add r3, r4, #0 - bl ov12_02225864 - pop {r4, pc} -_02237C3C: - mov r0, #0xe6 - strh r0, [r3] - mov r0, #0x20 - strh r0, [r4] - pop {r4, pc} -_02237C46: - mov r0, #0x1d - mvn r0, r0 - strh r0, [r3] - mov r0, #0xa0 - strh r0, [r4] -_02237C50: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov12_02237B14 - - thumb_func_start ov12_02237C54 -ov12_02237C54: ; 0x02237C54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r5, #0x2c] - mov r2, #0xa - bl sub_0200C7C0 - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02237C84 - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200C738 - mov r2, #0x11 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C -_02237C84: - mov r1, #0 - add r2, sp, #0x20 - mov r0, #0xa -_02237C8A: - add r1, r1, #1 - stmia r2!, {r0} - cmp r1, #6 - blt _02237C8A - mov r0, #0 - str r0, [sp, #0x30] - str r0, [sp, #0x34] - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r5, #0x2c] - add r2, sp, #0x20 - bl sub_0200CB30 - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - mov r1, #0 - bl ov12_02235FC8 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - mov r1, #1 - bl ov12_02235FC8 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - mov r1, #2 - bl ov12_02235FC8 - str r0, [sp, #0x18] - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - mov r1, #3 - bl ov12_02235FC8 - add r1, r5, #0 - add r1, #0x94 - str r0, [sp, #0x1c] - ldr r1, [r1, #0] - mov r0, #0x1b - bl sub_02006C24 - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x9c - ldr r1, [r0, #0] - ldr r0, _02237D88 ; =0x00001770 - add r2, r4, #0 - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r5, #0x2c] - add r3, r7, #0 - bl sub_0200CC3C - str r4, [sp] - add r2, r5, #0 - str r6, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - add r0, r5, #0 - add r0, #0x9c - ldr r1, [r0, #0] - ldr r0, _02237D88 ; =0x00001770 - add r2, #0xac - add r0, r1, r0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - ldr r2, [r2, #0] - ldr r3, [r5, #0x2c] - mov r1, #2 - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - add r0, r5, #0 - add r0, #0x9c - ldr r1, [r0, #0] - ldr r0, _02237D88 ; =0x00001770 - ldr r3, [sp, #0x18] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r5, #0x2c] - add r2, r4, #0 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - add r0, r5, #0 - add r0, #0x9c - ldr r1, [r0, #0] - ldr r0, _02237D88 ; =0x00001770 - ldr r3, [sp, #0x1c] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r5, #0x2c] - add r2, r4, #0 - bl sub_0200CE54 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02237D88: .word 0x00001770 - thumb_func_end ov12_02237C54 - - thumb_func_start ov12_02237D8C -ov12_02237D8C: ; 0x02237D8C - push {r3, r4, lr} - sub sp, #0x34 - add r2, sp, #0 - add r1, sp, #0 - add r2, #2 - add r4, r0, #0 - bl ov12_02237B14 - mov r0, #0 - add r1, sp, #0 - strh r0, [r1, #4] - strh r0, [r1, #6] - mov r1, #1 - str r1, [sp, #0x10] - add r1, r4, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - add r1, #0xa4 - ldr r1, [r1, #0] - ldr r2, _02237E08 ; =0x00001770 - str r1, [sp, #0x2c] - str r0, [sp, #0x30] - add r3, sp, #0 -_02237DBA: - add r1, r4, #0 - add r1, #0x9c - ldr r1, [r1, #0] - add r0, r0, #1 - add r1, r1, r2 - str r1, [r3, #0x14] - add r3, r3, #4 - cmp r0, #6 - blt _02237DBA - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - ldr r1, [r4, #0x2c] - add r2, sp, #0 - bl sub_0200CE6C - str r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3CC - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x30] - bl sub_0200D330 - bl ov12_02220474 - add sp, #0x34 - pop {r3, r4, pc} - ; .align 2, 0 -_02237E08: .word 0x00001770 - thumb_func_end ov12_02237D8C - - thumb_func_start ov12_02237E0C -ov12_02237E0C: ; 0x02237E0C - ldr r3, _02237E14 ; =sub_0200D3F4 - ldr r0, [r0, #0x30] - bx r3 - nop -_02237E14: .word sub_0200D3F4 - thumb_func_end ov12_02237E0C - - thumb_func_start ov12_02237E18 -ov12_02237E18: ; 0x02237E18 - ldr r3, _02237E20 ; =sub_0200D4C4 - ldr r0, [r0, #0x30] - bx r3 - nop -_02237E20: .word sub_0200D4C4 - thumb_func_end ov12_02237E18 - - thumb_func_start ov12_02237E24 -ov12_02237E24: ; 0x02237E24 - ldr r3, _02237E2C ; =sub_0200D79C - ldr r0, [r0, #0x30] - bx r3 - nop -_02237E2C: .word sub_0200D79C - thumb_func_end ov12_02237E24 - - thumb_func_start ov12_02237E30 -ov12_02237E30: ; 0x02237E30 - str r1, [r0, #0x24] - bx lr - thumb_func_end ov12_02237E30 - - thumb_func_start ov12_02237E34 -ov12_02237E34: ; 0x02237E34 - ldr r3, _02237E3C ; =sub_0200D474 - ldr r0, [r0, #0x30] - bx r3 - nop -_02237E3C: .word sub_0200D474 - thumb_func_end ov12_02237E34 - - thumb_func_start ov12_02237E40 -ov12_02237E40: ; 0x02237E40 - ldr r3, _02237E48 ; =sub_0200D460 - ldr r0, [r0, #0x30] - bx r3 - nop -_02237E48: .word sub_0200D460 - thumb_func_end ov12_02237E40 - - thumb_func_start ov12_02237E4C -ov12_02237E4C: ; 0x02237E4C - add r0, #0xdc - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov12_02237E4C - - thumb_func_start ov12_02237E54 -ov12_02237E54: ; 0x02237E54 - push {r3, lr} - sub r1, r1, r3 - neg r1, r1 - sub r0, r0, r2 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - asr r1, r1, #0x10 - add r2, r1, #0 - asr r0, r0, #0x10 - mul r2, r1 - add r1, r0, #0 - mul r1, r0 - add r0, r2, r1 - lsl r0, r0, #0xc - bl sub_020BCFF0 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_02237E54 - - thumb_func_start ov12_02237E80 -ov12_02237E80: ; 0x02237E80 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0202CA80 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0202CA84 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0xbe - mov r3, #0x46 - bl ov12_02237E54 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02237E80 - - thumb_func_start ov12_02237EA0 -ov12_02237EA0: ; 0x02237EA0 - push {r4, lr} - sub sp, #8 - ldr r3, _02237EF8 ; =0x0223B040 - add r4, r0, #0 - add r2, sp, #0 - mov r1, #7 -_02237EAC: - ldrb r0, [r3] - add r3, r3, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _02237EAC - add r0, r4, #0 - bl sub_0202CA7C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_020981AC - cmp r0, #0 - bne _02237EEE - add r0, r4, #0 - bl ov12_02237E80 - cmp r0, #0x38 - blt _02237ED8 - mov r0, #3 - b _02237EE6 -_02237ED8: - add r0, r0, #1 - mov r1, #0x14 - bl sub_020E1F6C - cmp r0, #3 - blt _02237EE6 - mov r0, #3 -_02237EE6: - add r1, sp, #0 - add sp, #8 - ldrb r0, [r1, r0] - pop {r4, pc} -_02237EEE: - add r0, sp, #0 - ldrb r0, [r0, #1] - add sp, #8 - pop {r4, pc} - nop -_02237EF8: .word 0x0223B040 - thumb_func_end ov12_02237EA0 - - thumb_func_start ov12_02237EFC -ov12_02237EFC: ; 0x02237EFC - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x48 - add r6, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _02237F14 - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} -_02237F14: - bl ov12_02220474 - str r6, [r4, #0] - cmp r5, #0 - beq _02237F22 - ldr r0, [r5, #0] - str r0, [r4, #4] -_02237F22: - mov r1, #0 - add r2, r4, #0 - add r0, r1, #0 -_02237F28: - add r1, r1, #1 - str r0, [r2, #8] - add r2, r2, #4 - cmp r1, #0x10 - blt _02237F28 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02237EFC - - thumb_func_start ov12_02237F38 -ov12_02237F38: ; 0x02237F38 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r4, #0 - add r3, r0, #0 -_02237F40: - ldr r2, [r3, #8] - cmp r2, #0 - bne _02237F60 - add r4, r0, #0 - ldr r0, [r0, #0] - add r4, #8 - lsl r6, r5, #2 - bl ov12_02237FC8 - str r0, [r4, r6] - ldr r0, [r4, r6] - mov r1, #0 - str r1, [r0, #0x18] - ldr r4, [r4, r6] - str r5, [r4, #0] - b _02237F68 -_02237F60: - add r5, r5, #1 - add r3, r3, #4 - cmp r5, #0x10 - blt _02237F40 -_02237F68: - cmp r4, #0 - bne _02237F70 - bl sub_02022974 -_02237F70: - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02237F38 - - thumb_func_start ov12_02237F74 -ov12_02237F74: ; 0x02237F74 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02237F7C: - ldr r0, [r5, #8] - cmp r0, #0 - beq _02237F86 - bl sub_020181C4 -_02237F86: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x10 - blt _02237F7C - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02237F74 - - thumb_func_start ov12_02237F98 -ov12_02237F98: ; 0x02237F98 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_02237F9E: - ldr r0, [r5, #8] - cmp r0, #0 - beq _02237FBC - ldr r0, [r0, #0x10] - bl ov12_02223894 - ldr r1, [r5, #8] - ldr r0, [r1, #0x20] - cmp r0, #0 - beq _02237FBC - ldr r0, [r1, #0x18] - cmp r0, #0 - beq _02237FBC - bl sub_0200DA58 -_02237FBC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x10 - blt _02237F9E - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02237F98 - - thumb_func_start ov12_02237FC8 -ov12_02237FC8: ; 0x02237FC8 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x24 - add r5, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _02237FE0 - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} -_02237FE0: - str r5, [r4, #4] - ldr r1, [r6, #0] - ldr r0, [r6, #4] - str r1, [r4, #8] - str r0, [r4, #0xc] - ldr r0, [r4, #8] - bl ov12_02238088 - str r0, [r4, #0x1c] - ldr r0, [r4, #4] - ldr r1, [r4, #8] - mov r2, #1 - bl ov12_022237F0 - str r0, [r4, #0x10] - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov12_02237FC8 - - thumb_func_start ov12_02238004 -ov12_02238004: ; 0x02238004 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - str r1, [r4, #0x20] - ldr r1, _02238024 ; =ov12_02238080 - bl ov12_02238054 - mov r2, #0xfa - ldr r0, _02238028 ; =ov12_02238030 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0x18] - pop {r4, pc} - nop -_02238024: .word ov12_02238080 -_02238028: .word ov12_02238030 - thumb_func_end ov12_02238004 - - thumb_func_start ov12_0223802C -ov12_0223802C: ; 0x0223802C - ldr r0, [r0, #0x20] - bx lr - thumb_func_end ov12_0223802C - - thumb_func_start ov12_02238030 -ov12_02238030: ; 0x02238030 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x10] - bl sub_02014710 - cmp r0, #0 - bne _02238050 - mov r0, #0 - str r0, [r4, #0x20] - ldr r0, [r4, #0x10] - bl ov12_02223894 - add r0, r5, #0 - bl sub_0200DA58 -_02238050: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov12_02238030 - - thumb_func_start ov12_02238054 -ov12_02238054: ; 0x02238054 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x1c] - add r6, r1, #0 - mov r4, #0 - cmp r0, #0 - ble _02238076 -_02238062: - ldr r0, [r5, #0x10] - add r1, r4, #0 - add r2, r6, #0 - add r3, r5, #0 - bl sub_020146F4 - ldr r0, [r5, #0x1c] - add r4, r4, #1 - cmp r4, r0 - blt _02238062 -_02238076: - ldr r0, [r5, #0x10] - ldr r1, [r5, #0xc] - bl sub_02014788 - pop {r4, r5, r6, pc} - thumb_func_end ov12_02238054 - - thumb_func_start ov12_02238080 -ov12_02238080: ; 0x02238080 - ldr r3, _02238084 ; =sub_02014764 - bx r3 - ; .align 2, 0 -_02238084: .word sub_02014764 - thumb_func_end ov12_02238080 - - thumb_func_start ov12_02238088 -ov12_02238088: ; 0x02238088 - push {r3, r4, r5, lr} - sub sp, #0x58 - ldr r4, _022380B8 ; =0x0223B048 - add r5, r0, #0 - add r3, sp, #0 - mov r2, #0xb -_02238094: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02238094 - sub r0, r5, #5 - cmp r0, #0x16 - blo _022380AC - bl sub_02022974 - add sp, #0x58 - mov r0, #0 - pop {r3, r4, r5, pc} -_022380AC: - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - add sp, #0x58 - pop {r3, r4, r5, pc} - nop -_022380B8: .word 0x0223B048 - thumb_func_end ov12_02238088 - - thumb_func_start ov12_022380BC -ov12_022380BC: ; 0x022380BC - push {r3, lr} - add r3, r1, #0 - ldr r1, [r0, #0] - mov r2, #0 - bl ov12_022380DC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_022380BC - - thumb_func_start ov12_022380CC -ov12_022380CC: ; 0x022380CC - push {r3, lr} - add r3, r1, #0 - ldr r1, [r0, #4] - mov r2, #1 - bl ov12_022380DC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov12_022380CC - - thumb_func_start ov12_022380DC -ov12_022380DC: ; 0x022380DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - add r7, r2, #0 - str r3, [sp, #0x10] - bl sub_020089B0 - ldr r0, [r5, #4] - lsl r1, r0, #1 - add r1, r5, r1 - ldrh r6, [r1, #0x28] - add r1, r5, r0 - add r1, #0x30 - ldrb r1, [r1] - add r2, r5, r0 - add r2, #0x38 - str r1, [sp, #0x1c] - add r1, r5, r0 - lsl r0, r0, #2 - ldrb r2, [r2] - add r0, r5, r0 - add r1, #0x34 - ldr r0, [r0, #0x3c] - ldrb r1, [r1] - str r2, [sp, #0x18] - str r0, [sp, #0x14] - cmp r7, #0 - beq _02238132 - add r0, r5, r4 - add r0, #0x4c - ldrb r2, [r0] - mov r0, #1 - tst r0, r2 - beq _0223812E - mov r4, #0 - b _02238144 -_0223812E: - mov r4, #2 - b _02238144 -_02238132: - add r0, r5, r4 - add r0, #0x4c - ldrb r2, [r0] - mov r0, #1 - tst r0, r2 - beq _02238142 - mov r4, #2 - b _02238144 -_02238142: - mov r4, #0 -_02238144: - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x14] - lsl r1, r6, #0x10 - lsl r2, r2, #0x18 - lsl r3, r4, #0x18 - str r0, [sp, #8] - add r0, sp, #0x28 - lsr r1, r1, #0x10 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_02075FB4 - ldr r0, [r5, #0] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_02008A90 - add r7, r0, #0 - add r3, sp, #0x28 - add r2, r7, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_020089A0 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r4, [sp, #8] - ldrh r0, [r7, #6] - str r0, [sp, #0xc] - ldr r3, [r5, #0] - ldrh r0, [r7] - lsl r3, r3, #2 - add r3, r5, r3 - ldr r3, [r3, #8] - ldrh r1, [r7, #2] - ldr r3, [r3, #0] - bl sub_02013750 - ldr r1, [r5, #0] - ldr r3, [sp, #0x18] - lsl r1, r1, #2 - add r1, r5, r1 - lsl r2, r4, #0x18 - lsl r3, r3, #0x18 - ldrh r0, [r7] - ldr r1, [r1, #8] - lsr r2, r2, #0x18 - str r0, [r1, #4] - ldr r1, [r5, #0] - ldrh r0, [r7, #4] - lsl r1, r1, #2 - add r1, r5, r1 - ldr r1, [r1, #8] - lsr r3, r3, #0x18 - str r0, [r1, #8] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - str r0, [sp] - lsl r0, r6, #0x10 - lsl r1, r1, #0x18 - lsr r0, r0, #0x10 - lsr r1, r1, #0x18 - bl sub_02076648 - ldr r1, [r5, #0] - lsl r1, r1, #2 - add r1, r5, r1 - ldr r1, [r1, #8] - str r0, [r1, #0xc] - ldr r0, [r5, #0] - lsl r1, r0, #2 - add r1, r5, r1 - ldr r1, [r1, #8] - add r0, r5, r0 - ldr r1, [r1, #0xc] - add r0, #0x4c - lsl r1, r1, #0x18 - asr r7, r1, #0x18 - ldrb r0, [r0] - mov r1, #1 - bl ov12_022384CC - str r0, [sp, #0x20] - ldr r0, [r5, #0] - ldr r2, [sp, #0x20] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - mov r1, #1 - add r2, r2, r7 - bl sub_02007DEC - cmp r4, #2 - bne _022382B8 - ldr r1, [sp, #0x10] - mov r0, #0x93 - bl sub_02006C24 - add r1, sp, #0x24 - lsl r2, r6, #0x10 - add r1, #2 - lsr r2, r2, #0x10 - add r4, r0, #0 - bl sub_02078A80 - add r1, sp, #0x24 - lsl r2, r6, #0x10 - add r0, r4, #0 - add r1, #1 - lsr r2, r2, #0x10 - bl sub_02078AA4 - lsl r2, r6, #0x10 - add r0, r4, #0 - add r1, sp, #0x24 - lsr r2, r2, #0x10 - bl sub_02078AC8 - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, [r5, #0] - add r2, sp, #0x24 - lsl r0, r0, #2 - add r0, r5, r0 - ldrb r2, [r2] - ldr r0, [r0, #0x18] - mov r1, #0x2e - bl sub_02007DEC - ldr r0, [r5, #0] - ldr r2, [sp, #0x20] - lsl r0, r0, #2 - add r0, r5, r0 - add r2, #0x24 - ldr r0, [r0, #0x18] - mov r1, #0x14 - str r2, [sp, #0x20] - bl sub_02007DEC - ldr r0, [r5, #0] - add r3, sp, #0x24 - lsl r0, r0, #2 - mov r2, #1 - add r0, r5, r0 - ldrsb r2, [r3, r2] - ldr r0, [r0, #0x18] - mov r1, #0x15 - bl sub_02007DEC - ldr r0, [r5, #0] - mov r2, #0x24 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - mov r1, #0x16 - sub r2, r2, r7 - bl sub_02007DEC - ldr r0, [r5, #0] - add r3, sp, #0x24 - lsl r0, r0, #2 - mov r2, #2 - add r0, r5, r0 - ldrsb r2, [r3, r2] - ldr r0, [r0, #0x18] - mov r1, #0x29 - bl sub_02007DEC -_022382B8: - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022380DC - - thumb_func_start ov12_022382BC -ov12_022382BC: ; 0x022382BC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0] - str r1, [sp, #0x10] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_02008A0C - ldr r0, [r5, #0] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_02008A90 - add r4, r0, #0 - ldr r0, [r5, #0] - lsl r1, r0, #1 - add r1, r5, r1 - ldrh r1, [r1, #0x28] - lsl r3, r0, #2 - str r1, [sp, #0x1c] - add r1, r5, r0 - add r1, #0x30 - ldrb r1, [r1] - str r1, [sp, #0x18] - add r1, r5, r0 - add r1, #0x38 - ldrb r1, [r1] - add r0, r5, r0 - add r0, #0x4c - str r1, [sp, #0x14] - add r1, r5, r3 - ldr r7, [r1, #0x3c] - ldrb r1, [r0] - mov r0, #1 - tst r0, r1 - beq _0223830E - mov r6, #2 - b _02238310 -_0223830E: - mov r6, #0 -_02238310: - str r7, [sp] - mov r0, #0 - str r0, [sp, #4] - str r6, [sp, #8] - ldrh r0, [r4, #6] - add r3, r5, r3 - ldr r2, [sp, #0x10] - str r0, [sp, #0xc] - ldr r3, [r3, #8] - ldrh r0, [r4] - ldrh r1, [r4, #2] - ldr r3, [r3, #0] - bl sub_02013750 - ldr r1, [r5, #0] - ldrh r0, [r4] - lsl r1, r1, #2 - add r1, r5, r1 - ldr r1, [r1, #8] - ldr r3, [sp, #0x14] - str r0, [r1, #4] - ldr r1, [r5, #0] - lsl r2, r6, #0x18 - lsl r1, r1, #2 - add r1, r5, r1 - lsl r3, r3, #0x18 - ldrh r0, [r4, #4] - ldr r1, [r1, #8] - lsr r2, r2, #0x18 - str r0, [r1, #8] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - lsl r0, r0, #0x10 - lsl r1, r1, #0x18 - str r7, [sp] - lsr r0, r0, #0x10 - lsr r1, r1, #0x18 - lsr r3, r3, #0x18 - bl sub_02076648 - ldr r1, [r5, #0] - lsl r1, r1, #2 - add r1, r5, r1 - ldr r1, [r1, #8] - str r0, [r1, #0xc] - ldr r0, [r5, #0] - mov r1, #1 - lsl r4, r0, #2 - add r0, r5, r0 - add r0, #0x4c - ldrb r0, [r0] - bl ov12_022384CC - add r1, r5, r4 - add r2, r0, #0 - ldr r0, [r1, #8] - ldr r3, [r0, #0xc] - ldr r0, [r1, #0x18] - mov r1, #1 - add r2, r3, r2 - bl sub_02007DEC - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov12_022382BC - - thumb_func_start ov12_02238390 -ov12_02238390: ; 0x02238390 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_020089B0 - mov r0, #0x75 - add r2, sp, #0 - strh r0, [r2, #4] - mov r0, #0xfa - strh r0, [r2, #8] - mov r0, #0 - strh r0, [r2, #0xa] - strb r0, [r2, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, r5, r0 - add r1, #0x4c - ldrb r3, [r1] - mov r1, #1 - tst r1, r3 - beq _022383CC - mov r1, #0xf9 - strh r1, [r2, #6] - mov r4, #0x87 - b _022383D2 -_022383CC: - mov r1, #0xf8 - strh r1, [r2, #6] - mov r4, #0x86 -_022383D2: - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_02008A90 - add r7, r0, #0 - add r3, sp, #4 - add r2, r7, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - bl sub_020089A0 - ldr r3, [r5, #0] - ldrh r0, [r7] - lsl r3, r3, #2 - add r3, r5, r3 - ldr r3, [r3, #8] - ldrh r1, [r7, #2] - ldr r3, [r3, #0] - add r2, r6, #0 - bl sub_02013610 - ldr r2, [r5, #0] - add r1, sp, #0 - lsl r2, r2, #2 - add r2, r5, r2 - ldrh r0, [r1, #4] - ldr r2, [r2, #8] - str r0, [r2, #4] - ldr r0, [r5, #0] - ldrh r1, [r1, #8] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #8] - add r2, r4, #0 - str r1, [r0, #8] - add r0, sp, #0 - mov r1, #0x79 - bl sub_02006AA4 - add r0, sp, #0 - ldrb r1, [r0] - ldr r0, [r5, #0] - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #8] - str r1, [r0, #0xc] - ldr r0, [r5, #0] - mov r1, #1 - lsl r4, r0, #2 - add r0, r5, r0 - add r0, #0x4c - ldrb r0, [r0] - bl ov12_022384CC - add r2, r5, r4 - ldr r1, [r2, #8] - ldr r1, [r1, #0xc] - add r4, r1, r0 - ldr r0, [r2, #0x18] - mov r1, #1 - add r2, r4, #0 - bl sub_02007DEC - ldr r1, [r5, #0] - mov r2, #1 - add r0, r5, r1 - add r0, #0x4c - ldrb r0, [r0] - tst r0, r2 - beq _022384C6 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - mov r1, #0x2e - bl sub_02007DEC - ldr r0, [r5, #0] - add r2, sp, #0 - ldrb r3, [r2] - lsl r0, r0, #2 - add r0, r5, r0 - mov r2, #0x24 - sub r2, r2, r3 - ldr r0, [r0, #0x18] - mov r1, #0x14 - add r2, r4, r2 - bl sub_02007DEC - ldr r0, [r5, #0] - mov r1, #0x15 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r5, #0] - add r2, sp, #0 - lsl r0, r0, #2 - ldrb r3, [r2] - add r0, r5, r0 - mov r2, #0x24 - ldr r0, [r0, #0x18] - mov r1, #0x16 - sub r2, r2, r3 - bl sub_02007DEC - ldr r0, [r5, #0] - mov r1, #0x29 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - mov r2, #0 - bl sub_02007DEC -_022384C6: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov12_02238390 - - thumb_func_start ov12_022384CC -ov12_022384CC: ; 0x022384CC - cmp r1, #0 - bne _022384D8 - lsl r1, r0, #2 - ldr r0, _022384E8 ; =0x0223B0A0 - ldrsh r0, [r0, r1] - bx lr -_022384D8: - mov r2, #6 - mul r2, r0 - ldr r0, _022384EC ; =0x0223B0B8 - lsl r1, r1, #1 - add r0, r0, r2 - ldrsh r0, [r1, r0] - bx lr - nop -_022384E8: .word 0x0223B0A0 -_022384EC: .word 0x0223B0B8 - thumb_func_end ov12_022384CC - - thumb_func_start ov12_022384F0 -ov12_022384F0: ; 0x022384F0 - ldr r2, _02238590 ; =0x0000013B - cmp r0, r2 - bhi _0223851E - bhs _0223857E - cmp r0, #0x7d - bhi _0223850C - bhs _0223857E - cmp r0, #0x63 - bhi _02238506 - beq _0223857E - b _0223858A -_02238506: - cmp r0, #0x78 - beq _0223857E - b _0223858A -_0223850C: - cmp r0, #0xc9 - bhi _02238518 - bhs _0223857E - cmp r0, #0x9f - beq _0223857E - b _0223858A -_02238518: - cmp r0, #0xd7 - beq _0223857E - b _0223858A -_0223851E: - add r3, r2, #0 - add r3, #0x5c - cmp r0, r3 - bhi _0223855E - add r1, r2, #0 - add r1, #0x5b - cmp r0, r1 - blo _0223853E - add r1, r2, #0 - add r1, #0x5b - cmp r0, r1 - beq _0223857E - add r2, #0x5c - cmp r0, r2 - beq _0223857E - b _0223858A -_0223853E: - add r1, r2, #0 - add r1, #0x2c - cmp r0, r1 - bhi _02238556 - add r1, r2, #0 - add r1, #0x2c - cmp r0, r1 - bhs _0223857E - add r2, #0x14 - cmp r0, r2 - beq _0223857E - b _0223858A -_02238556: - add r2, #0x4a - cmp r0, r2 - beq _0223857E - b _0223858A -_0223855E: - add r3, r2, #0 - add r3, #0x99 - cmp r0, r3 - bhi _02238576 - add r1, r2, #0 - add r1, #0x99 - cmp r0, r1 - bhs _0223857E - add r2, #0x98 - cmp r0, r2 - beq _0223857E - b _0223858A -_02238576: - add r2, #0xb1 - cmp r0, r2 - beq _02238582 - b _0223858A -_0223857E: - mov r0, #0 - bx lr -_02238582: - cmp r1, #1 - bne _0223858A - mov r0, #0 - bx lr -_0223858A: - mov r0, #1 - bx lr - nop -_02238590: .word 0x0000013B - thumb_func_end ov12_022384F0 - ; 0x02238594 - - - .rodata - .incbin "incbin/overlay12_rodata.bin" - - .data - .incbin "incbin/overlay12_data.bin" - - .bss - .space 0x0 diff --git a/asm/overlay13.s b/asm/overlay13.s deleted file mode 100644 index 88808a725..000000000 --- a/asm/overlay13.s +++ /dev/null @@ -1,17981 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov13_0221FC20 -ov13_0221FC20: ; 0x0221FC20 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r0, [r5, #0x11] - cmp r0, #5 - bls _0221FC2E - mov r0, #0 - strb r0, [r5, #0x11] -_0221FC2E: - ldr r0, _0221FC98 ; =ov13_0221FCAC - ldr r1, _0221FC9C ; =0x00002090 - ldr r3, [r5, #0xc] - mov r2, #0 - bl sub_0200679C - bl sub_0201CED0 - ldr r2, _0221FC9C ; =0x00002090 - add r4, r0, #0 - mov r1, #0 - bl sub_020D5124 - str r5, [r4, #0] - ldr r0, [r5, #8] - bl ov16_0223DF00 - mov r1, #0x79 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #8] - bl ov16_0223E064 - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, _0221FCA0 ; =0x00002078 - mov r1, #0 - strb r1, [r4, r0] - ldrb r1, [r5, #0x11] - sub r0, r0, #2 - strb r1, [r4, r0] - ldr r0, [r5, #8] - bl ov16_0223F1F8 - ldr r3, _0221FCA4 ; =0x00002077 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1c - ldrb r1, [r4, r3] - mov r2, #0xf0 - lsr r0, r0, #0x18 - bic r1, r2 - orr r0, r1 - strb r0, [r4, r3] - ldr r0, [r5, #8] - ldr r1, [r5, #0x28] - bl ov16_0223E1F8 - ldr r1, _0221FCA8 ; =0x0000208F - strb r0, [r4, r1] - pop {r3, r4, r5, pc} - nop -_0221FC98: .word ov13_0221FCAC -_0221FC9C: .word 0x00002090 -_0221FCA0: .word 0x00002078 -_0221FCA4: .word 0x00002077 -_0221FCA8: .word 0x0000208F - thumb_func_end ov13_0221FC20 - - thumb_func_start ov13_0221FCAC -ov13_0221FCAC: ; 0x0221FCAC - push {r4, lr} - ldr r2, _0221FE54 ; =0x00002078 - add r4, r1, #0 - ldrb r2, [r4, r2] - cmp r2, #0x1a - bls _0221FCBA - b _0221FE3C -_0221FCBA: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0221FCC6: ; jump table - .short _0221FCFC - _0221FCC6 - 2 ; case 0 - .short _0221FD08 - _0221FCC6 - 2 ; case 1 - .short _0221FD14 - _0221FCC6 - 2 ; case 2 - .short _0221FD20 - _0221FCC6 - 2 ; case 3 - .short _0221FD2C - _0221FCC6 - 2 ; case 4 - .short _0221FD38 - _0221FCC6 - 2 ; case 5 - .short _0221FD44 - _0221FCC6 - 2 ; case 6 - .short _0221FD50 - _0221FCC6 - 2 ; case 7 - .short _0221FD5C - _0221FCC6 - 2 ; case 8 - .short _0221FD68 - _0221FCC6 - 2 ; case 9 - .short _0221FD74 - _0221FCC6 - 2 ; case 10 - .short _0221FD80 - _0221FCC6 - 2 ; case 11 - .short _0221FD8C - _0221FCC6 - 2 ; case 12 - .short _0221FD98 - _0221FCC6 - 2 ; case 13 - .short _0221FDA4 - _0221FCC6 - 2 ; case 14 - .short _0221FDB0 - _0221FCC6 - 2 ; case 15 - .short _0221FDBC - _0221FCC6 - 2 ; case 16 - .short _0221FDC8 - _0221FCC6 - 2 ; case 17 - .short _0221FDD4 - _0221FCC6 - 2 ; case 18 - .short _0221FDE0 - _0221FCC6 - 2 ; case 19 - .short _0221FDEC - _0221FCC6 - 2 ; case 20 - .short _0221FDF8 - _0221FCC6 - 2 ; case 21 - .short _0221FE04 - _0221FCC6 - 2 ; case 22 - .short _0221FE10 - _0221FCC6 - 2 ; case 23 - .short _0221FE1C - _0221FCC6 - 2 ; case 24 - .short _0221FE28 - _0221FCC6 - 2 ; case 25 - .short _0221FE34 - _0221FCC6 - 2 ; case 26 -_0221FCFC: - add r0, r4, #0 - bl ov13_0221FE5C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD08: - add r0, r4, #0 - bl ov13_0221FF60 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD14: - add r0, r4, #0 - bl ov13_0222012C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD20: - add r0, r4, #0 - bl ov13_022201DC - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD2C: - add r0, r4, #0 - bl ov13_0222029C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD38: - add r0, r4, #0 - bl ov13_022203A0 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD44: - add r0, r4, #0 - bl ov13_0222072C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD50: - add r0, r4, #0 - bl ov13_02220738 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD5C: - add r0, r4, #0 - bl ov13_02220744 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD68: - add r0, r4, #0 - bl ov13_02220750 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD74: - add r0, r4, #0 - bl ov13_0222075C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD80: - add r0, r4, #0 - bl ov13_02220768 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD8C: - add r0, r4, #0 - bl ov13_0222078C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FD98: - add r0, r4, #0 - bl ov13_022207B8 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDA4: - add r0, r4, #0 - bl ov13_022207DC - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDB0: - add r0, r4, #0 - bl ov13_0222081C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDBC: - add r0, r4, #0 - bl ov13_02220834 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDC8: - add r0, r4, #0 - bl ov13_02220848 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDD4: - add r0, r4, #0 - bl ov13_02220864 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDE0: - add r0, r4, #0 - bl ov13_02220418 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDEC: - add r0, r4, #0 - bl ov13_0222050C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FDF8: - add r0, r4, #0 - bl ov13_02220628 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FE04: - add r0, r4, #0 - bl ov13_0222088C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FE10: - add r0, r4, #0 - bl ov13_022208A4 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FE1C: - add r0, r4, #0 - bl ov13_02220A4C - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FE28: - add r0, r4, #0 - bl ov13_02220B78 - ldr r1, _0221FE54 ; =0x00002078 - strb r0, [r4, r1] - b _0221FE3C -_0221FE34: - bl ov13_02220BA4 - cmp r0, #1 - beq _0221FE50 -_0221FE3C: - add r0, r4, #0 - bl ov13_0222537C - ldr r0, _0221FE58 ; =0x00001FB4 - ldr r0, [r4, r0] - bl sub_0200C7EC - add r0, r4, #0 - bl ov13_0222601C -_0221FE50: - pop {r4, pc} - nop -_0221FE54: .word 0x00002078 -_0221FE58: .word 0x00001FB4 - thumb_func_end ov13_0221FCAC - - thumb_func_start ov13_0221FE5C -ov13_0221FE5C: ; 0x0221FE5C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0221FF50 ; =0x04001050 - mov r1, #0 - strh r1, [r0] - ldr r0, [r5, #0] - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #3 - ldr r0, _0221FF54 ; =0x0000207A - bne _0221FE7C - mov r1, #6 - strb r1, [r5, r0] - mov r4, #0x13 - b _0221FE80 -_0221FE7C: - strb r1, [r5, r0] - mov r4, #1 -_0221FE80: - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - bl ov13_02228A38 - ldr r1, _0221FF58 ; =0x00002088 - str r0, [r5, r1] - add r0, r5, #0 - bl ov13_02220F98 - add r0, r5, #0 - bl ov13_02220C0C - add r0, r5, #0 - bl ov13_02220D4C - add r0, r5, #0 - bl ov13_02220F08 - ldr r1, [r5, #0] - mov r0, #2 - ldr r1, [r1, #0xc] - bl sub_02002BB8 - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_02221738 - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_022260EC - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_02226444 - add r0, r5, #0 - bl ov13_02224500 - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_02224B7C - add r0, r5, #0 - bl ov13_02221A88 - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_02221BF8 - ldr r0, [r5, #0] - add r0, #0x32 - ldrb r0, [r0] - cmp r0, #0 - beq _0221FF00 - ldr r0, _0221FF58 ; =0x00002088 - mov r1, #1 - ldr r0, [r5, r0] - bl ov13_02228A60 -_0221FF00: - ldr r0, _0221FF54 ; =0x0000207A - ldrb r0, [r5, r0] - cmp r0, #0 - bne _0221FF1A - add r0, r5, #0 - mov r1, #0 - bl ov13_022219AC - cmp r0, #1 - bne _0221FF1A - ldr r0, [r5, #0] - mov r1, #1 - strb r1, [r0, #0x11] -_0221FF1A: - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_0222563C - ldr r1, _0221FF54 ; =0x0000207A - add r0, r5, #0 - ldrb r1, [r5, r1] - bl ov13_022214E0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x7a - lsl r0, r0, #2 - mov r1, #0xa - add r3, r1, #0 - ldr r0, [r5, r0] - ldr r2, _0221FF5C ; =0x0000FFFF - sub r3, #0x12 - bl sub_02003178 - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0221FF50: .word 0x04001050 -_0221FF54: .word 0x0000207A -_0221FF58: .word 0x00002088 -_0221FF5C: .word 0x0000FFFF - thumb_func_end ov13_0221FE5C - - thumb_func_start ov13_0221FF60 -ov13_0221FF60: ; 0x0221FF60 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200384C - cmp r0, #0 - beq _0221FF76 - mov r0, #1 - pop {r4, pc} -_0221FF76: - add r0, r4, #0 - bl ov13_0222124C - cmp r0, #1 - bne _0221FFCE - ldr r1, [r4, #0] - ldrb r0, [r1, #0x11] - cmp r0, #6 - bne _0221FFA2 - add r1, #0x35 - ldrb r0, [r1] - cmp r0, #1 - beq _0221FFCE - ldr r0, _0221FFD4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - mov r0, #0x19 - pop {r4, pc} -_0221FFA2: - ldr r0, _0221FFD4 ; =0x000005DD - bl sub_02005748 - ldr r1, [r4, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - bl ov13_02225FCC - ldr r0, [r4, #0] - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #2 - bne _0221FFC4 - add r0, r4, #0 - bl ov13_0221FFDC - pop {r4, pc} -_0221FFC4: - ldr r0, _0221FFD8 ; =0x00002079 - mov r1, #7 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_0221FFCE: - mov r0, #1 - pop {r4, pc} - nop -_0221FFD4: .word 0x000005DD -_0221FFD8: .word 0x00002079 - thumb_func_end ov13_0221FF60 - - thumb_func_start ov13_0221FFDC -ov13_0221FFDC: ; 0x0221FFDC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r5, #0] - ldrb r1, [r4, #0x11] - cmp r1, #0 - bne _0221FFEE - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _0221FFF8 -_0221FFEE: - cmp r1, #1 - bne _02220014 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _02220014 -_0221FFF8: - add r0, r5, #0 - bl ov13_0222449C - add r0, r5, #0 - bl ov13_022240E0 - ldr r0, [r5, #0] - mov r1, #6 - strb r1, [r0, #0x11] - ldr r0, _02220120 ; =0x00002079 - mov r1, #0x19 - strb r1, [r5, r0] - mov r0, #0x11 - pop {r3, r4, r5, pc} -_02220014: - ldrh r0, [r4, #0x22] - ldr r2, [r4, #0xc] - mov r1, #0x24 - bl sub_0207CFF0 - cmp r0, #0 - beq _0222004A - ldrh r0, [r4, #0x22] - ldr r2, [r4, #0xc] - mov r1, #0x25 - bl sub_0207CFF0 - cmp r0, #0 - bne _0222004A - ldrb r1, [r4, #0x11] - mov r0, #0x50 - mul r0, r1 - add r0, r5, r0 - ldrb r0, [r0, #0x1b] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _0222004A - ldr r0, _02220120 ; =0x00002079 - mov r1, #0xd - strb r1, [r5, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_0222004A: - ldrh r0, [r4, #0x22] - mov r3, #0 - str r0, [sp] - ldrb r2, [r4, #0x11] - ldr r0, [r4, #8] - ldr r1, [r4, #0x28] - add r2, r4, r2 - add r2, #0x2c - ldrb r2, [r2] - bl ov16_0223E30C - cmp r0, #1 - bne _022200FA - ldrh r0, [r4, #0x22] - ldr r2, [r4, #0xc] - mov r1, #0x25 - bl sub_0207CFF0 - cmp r0, #0 - beq _0222007A - ldr r0, _02220120 ; =0x00002079 - mov r1, #0xd - strb r1, [r5, r0] - b _022200F0 -_0222007A: - ldrb r1, [r4, #0x11] - add r0, r5, #0 - bl ov13_022213F0 - cmp r0, #1 - bne _022200EA - ldrh r0, [r4, #0x22] - ldr r2, [r4, #0xc] - mov r1, #0x17 - bl sub_0207CFF0 - cmp r0, #0 - bne _022200EA - add r2, r4, #0 - add r2, #0x33 - ldrh r1, [r4, #0x22] - ldrb r2, [r2] - ldr r0, [r4, #8] - ldr r3, [r4, #0xc] - bl ov13_02221A54 - ldrb r2, [r4, #0x11] - ldr r0, [r4, #8] - ldr r1, [r4, #0x28] - add r2, r4, r2 - add r2, #0x2c - ldrb r2, [r2] - bl ov16_0223DFAC - ldrb r2, [r4, #0x11] - mov r1, #0x50 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - str r0, [r2, #4] - ldrb r0, [r4, #0x11] - mov r2, #0 - mul r1, r0 - add r0, r5, r1 - ldr r0, [r0, #4] - mov r1, #0xa3 - bl sub_02074470 - strh r0, [r4, #0x20] - ldrb r1, [r4, #0x11] - mov r0, #0x50 - ldrh r2, [r4, #0x20] - mul r0, r1 - add r0, r5, r0 - ldrh r0, [r0, #0x14] - mov r1, #0x19 - sub r0, r2, r0 - strh r0, [r4, #0x20] - ldr r0, _02220120 ; =0x00002079 - strb r1, [r5, r0] - b _022200F0 -_022200EA: - ldr r0, _02220120 ; =0x00002079 - mov r1, #0x17 - strb r1, [r5, r0] -_022200F0: - ldr r0, _02220124 ; =0x0000207C - mov r1, #0 - strb r1, [r5, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_022200FA: - ldr r2, _02220128 ; =0x00001FA8 - mov r1, #0x51 - ldr r0, [r5, r2] - add r2, #8 - ldr r2, [r5, r2] - bl sub_0200B1B8 - add r0, r5, #0 - bl ov13_022240E0 - ldr r0, [r5, #0] - mov r1, #6 - strb r1, [r0, #0x11] - ldr r0, _02220120 ; =0x00002079 - mov r1, #0x19 - strb r1, [r5, r0] - mov r0, #0x11 - pop {r3, r4, r5, pc} - nop -_02220120: .word 0x00002079 -_02220124: .word 0x0000207C -_02220128: .word 0x00001FA8 - thumb_func_end ov13_0221FFDC - - thumb_func_start ov13_0222012C -ov13_0222012C: ; 0x0222012C - push {r4, lr} - add r4, r0, #0 - bl ov13_022212C4 - cmp r0, #3 - bhi _022201CE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02220144: ; jump table - .short _0222014C - _02220144 - 2 ; case 0 - .short _02220172 - _02220144 - 2 ; case 1 - .short _02220194 - _02220144 - 2 ; case 2 - .short _022201B6 - _02220144 - 2 ; case 3 -_0222014C: - ldr r0, _022201D4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #7 - bl ov13_02225FCC - add r0, r4, #0 - bl ov13_022217A4 - cmp r0, #1 - bne _02220168 - mov r0, #0x19 - pop {r4, pc} -_02220168: - ldr r0, _022201D8 ; =0x00002079 - mov r1, #0xf - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_02220172: - add r0, r4, #0 - bl ov13_0222194C - cmp r0, #1 - beq _022201CE - ldr r0, _022201D4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #8 - bl ov13_02225FCC - ldr r0, _022201D8 ; =0x00002079 - mov r1, #8 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_02220194: - add r0, r4, #0 - bl ov13_0222194C - cmp r0, #1 - beq _022201CE - ldr r0, _022201D4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xa - bl ov13_02225FCC - ldr r0, _022201D8 ; =0x00002079 - mov r1, #9 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_022201B6: - ldr r0, _022201D4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _022201D8 ; =0x00002079 - mov r1, #6 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_022201CE: - mov r0, #2 - pop {r4, pc} - nop -_022201D4: .word 0x000005DD -_022201D8: .word 0x00002079 - thumb_func_end ov13_0222012C - - thumb_func_start ov13_022201DC -ov13_022201DC: ; 0x022201DC - push {r4, lr} - add r4, r0, #0 - bl ov13_0222130C - cmp r0, #3 - bhi _0222028C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022201F4: ; jump table - .short _022201FC - _022201F4 - 2 ; case 0 - .short _0222022A - _022201F4 - 2 ; case 1 - .short _02220256 - _022201F4 - 2 ; case 2 - .short _0222026E - _022201F4 - 2 ; case 3 -_022201FC: - ldr r1, [r4, #0] - mov r2, #0 - ldrb r1, [r1, #0x11] - add r0, r4, #0 - mvn r2, r2 - bl ov13_02221428 - cmp r0, #0xff - beq _0222028C - ldr r1, [r4, #0] - strb r0, [r1, #0x11] - ldr r0, _02220290 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xc - bl ov13_02225FCC - ldr r0, _02220294 ; =0x00002079 - mov r1, #0xe - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_0222022A: - ldr r1, [r4, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - mov r2, #1 - bl ov13_02221428 - cmp r0, #0xff - beq _0222028C - ldr r1, [r4, #0] - strb r0, [r1, #0x11] - ldr r0, _02220290 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xd - bl ov13_02225FCC - ldr r0, _02220294 ; =0x00002079 - mov r1, #0xe - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_02220256: - ldr r0, _02220290 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xb - bl ov13_02225FCC - ldr r0, _02220294 ; =0x00002079 - mov r1, #9 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_0222026E: - ldr r0, _02220290 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _02220298 ; =0x0000208C - mov r1, #1 - strb r1, [r4, r0] - mov r1, #7 - sub r0, #0x13 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r4, pc} -_0222028C: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02220290: .word 0x000005DD -_02220294: .word 0x00002079 -_02220298: .word 0x0000208C - thumb_func_end ov13_022201DC - - thumb_func_start ov13_0222029C -ov13_0222029C: ; 0x0222029C - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov13_02221354 - add r5, r0, #0 - cmp r5, #7 - bhi _0222038E - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022202B6: ; jump table - .short _022202C6 - _022202B6 - 2 ; case 0 - .short _022202C6 - _022202B6 - 2 ; case 1 - .short _022202C6 - _022202B6 - 2 ; case 2 - .short _022202C6 - _022202B6 - 2 ; case 3 - .short _022202FE - _022202B6 - 2 ; case 4 - .short _0222032C - _022202B6 - 2 ; case 5 - .short _02220358 - _022202B6 - 2 ; case 6 - .short _02220370 - _022202B6 - 2 ; case 7 -_022202C6: - ldr r0, [r4, #0] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r1, r4, r0 - lsl r0, r5, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x34] - cmp r0, #0 - beq _0222038E - ldr r0, _02220394 ; =0x000005DD - bl sub_02005748 - add r1, r5, #0 - add r1, #0xe - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl ov13_02225FCC - ldr r0, [r4, #0] - mov r1, #0xa - add r0, #0x34 - strb r5, [r0] - ldr r0, _02220398 ; =0x00002079 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_022202FE: - ldr r1, [r4, #0] - mov r2, #0 - ldrb r1, [r1, #0x11] - add r0, r4, #0 - mvn r2, r2 - bl ov13_02221428 - cmp r0, #0xff - beq _0222038E - ldr r1, [r4, #0] - strb r0, [r1, #0x11] - ldr r0, _02220394 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xc - bl ov13_02225FCC - ldr r0, _02220398 ; =0x00002079 - mov r1, #0xe - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_0222032C: - ldr r1, [r4, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - mov r2, #1 - bl ov13_02221428 - cmp r0, #0xff - beq _0222038E - ldr r1, [r4, #0] - strb r0, [r1, #0x11] - ldr r0, _02220394 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xd - bl ov13_02225FCC - ldr r0, _02220398 ; =0x00002079 - mov r1, #0xe - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_02220358: - ldr r0, _02220394 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #9 - bl ov13_02225FCC - ldr r0, _02220398 ; =0x00002079 - mov r1, #8 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_02220370: - ldr r0, _02220394 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _0222039C ; =0x0000208C - mov r1, #2 - strb r1, [r4, r0] - mov r1, #7 - sub r0, #0x13 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_0222038E: - mov r0, #4 - pop {r3, r4, r5, pc} - nop -_02220394: .word 0x000005DD -_02220398: .word 0x00002079 -_0222039C: .word 0x0000208C - thumb_func_end ov13_0222029C - - thumb_func_start ov13_022203A0 -ov13_022203A0: ; 0x022203A0 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov13_0222139C - add r5, r0, #0 - cmp r5, #4 - bhi _0222040A - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022203BA: ; jump table - .short _022203C4 - _022203BA - 2 ; case 0 - .short _022203C4 - _022203BA - 2 ; case 1 - .short _022203C4 - _022203BA - 2 ; case 2 - .short _022203C4 - _022203BA - 2 ; case 3 - .short _022203F2 - _022203BA - 2 ; case 4 -_022203C4: - ldr r1, [r4, #0] - add r0, r1, #0 - add r0, #0x34 - ldrb r0, [r0] - cmp r0, r5 - beq _022203E2 - ldrb r1, [r1, #0x11] - mov r0, #0x50 - mul r0, r1 - add r1, r4, r0 - lsl r0, r5, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x34] - cmp r0, #0 - beq _0222040A -_022203E2: - ldr r0, _02220410 ; =0x000005DD - bl sub_02005748 - ldr r0, [r4, #0] - add r0, #0x34 - strb r5, [r0] - mov r0, #0xa - pop {r3, r4, r5, pc} -_022203F2: - ldr r0, _02220410 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _02220414 ; =0x00002079 - mov r1, #9 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_0222040A: - mov r0, #5 - pop {r3, r4, r5, pc} - nop -_02220410: .word 0x000005DD -_02220414: .word 0x00002079 - thumb_func_end ov13_022203A0 - - thumb_func_start ov13_02220418 -ov13_02220418: ; 0x02220418 - push {r3, r4, r5, lr} - ldr r1, _022204F4 ; =0x02228E0C - add r4, r0, #0 - bl ov13_022213E4 - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _02220442 - ldr r0, _022204F8 ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228B64 - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _02220448 - mov r5, #6 - b _02220448 -_02220442: - add r0, r4, #0 - bl ov13_022256E8 -_02220448: - cmp r5, #6 - bhi _022204F0 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02220458: ; jump table - .short _02220466 - _02220458 - 2 ; case 0 - .short _02220466 - _02220458 - 2 ; case 1 - .short _02220466 - _02220458 - 2 ; case 2 - .short _02220466 - _02220458 - 2 ; case 3 - .short _02220466 - _02220458 - 2 ; case 4 - .short _02220490 - _02220458 - 2 ; case 5 - .short _022204D0 - _02220458 - 2 ; case 6 -_02220466: - lsl r0, r5, #0x18 - lsr r1, r0, #0x18 - ldr r0, [r4, #0] - add r0, #0x34 - strb r1, [r0] - ldr r0, _022204FC ; =0x0000208D - strb r1, [r4, r0] - ldr r0, _02220500 ; =0x000005DD - bl sub_02005748 - add r5, #0x17 - lsl r1, r5, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl ov13_02225FCC - ldr r0, _02220504 ; =0x00002079 - mov r1, #0xc - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_02220490: - ldr r0, _02220508 ; =0x00002077 - ldrb r3, [r4, r0] - lsl r1, r3, #0x18 - lsr r1, r1, #0x1c - beq _022204F0 - mov r2, #0xf - add r1, r3, #0 - bic r1, r2 - lsl r2, r3, #0x1c - lsr r3, r2, #0x1c - mov r2, #1 - eor r2, r3 - lsl r2, r2, #0x18 - lsr r3, r2, #0x18 - mov r2, #0xf - and r2, r3 - orr r1, r2 - strb r1, [r4, r0] - add r0, #0x16 - strb r5, [r4, r0] - ldr r0, _02220500 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x12 - bl ov13_02225FCC - ldr r0, _02220504 ; =0x00002079 - mov r1, #0xb - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_022204D0: - ldr r0, [r4, #0] - mov r1, #4 - add r0, #0x34 - strb r1, [r0] - ldr r0, _02220500 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _02220504 ; =0x00002079 - mov r1, #0x19 - strb r1, [r4, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_022204F0: - mov r0, #0x13 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022204F4: .word 0x02228E0C -_022204F8: .word 0x00002088 -_022204FC: .word 0x0000208D -_02220500: .word 0x000005DD -_02220504: .word 0x00002079 -_02220508: .word 0x00002077 - thumb_func_end ov13_02220418 - - thumb_func_start ov13_0222050C -ov13_0222050C: ; 0x0222050C - push {r3, r4, r5, lr} - ldr r1, _02220610 ; =0x02228D14 - add r5, r0, #0 - bl ov13_022213E4 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _02220536 - ldr r0, _02220614 ; =0x00002088 - ldr r0, [r5, r0] - bl ov13_02228B64 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _0222053C - mov r4, #2 - b _0222053C -_02220536: - add r0, r5, #0 - bl ov13_022256E8 -_0222053C: - cmp r4, #0 - beq _0222054A - cmp r4, #1 - beq _022205A6 - cmp r4, #2 - beq _022205EC - b _0222060A -_0222054A: - ldr r0, _02220618 ; =0x000005DD - bl sub_02005748 - ldr r0, _0222061C ; =0x00002077 - ldrb r0, [r5, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - bne _02220564 - add r0, r5, #0 - mov r1, #0x1c - bl ov13_02225FCC - b _0222056C -_02220564: - add r0, r5, #0 - mov r1, #0x1d - bl ov13_02225FCC -_0222056C: - add r0, r5, #0 - bl ov13_022219DC - cmp r0, #1 - bne _0222059C - add r0, r5, #0 - bl ov13_02223118 - ldr r0, _0222061C ; =0x00002077 - ldrb r0, [r5, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - bne _0222058E - add r0, r5, #0 - bl ov13_02221A04 - b _02220594 -_0222058E: - add r0, r5, #0 - bl ov13_02221A3C -_02220594: - ldr r0, _02220620 ; =0x00002079 - mov r1, #0x14 - strb r1, [r5, r0] - b _022205A2 -_0222059C: - ldr r0, _02220620 ; =0x00002079 - mov r1, #0x19 - strb r1, [r5, r0] -_022205A2: - mov r0, #0x16 - pop {r3, r4, r5, pc} -_022205A6: - ldr r0, _0222061C ; =0x00002077 - ldrb r0, [r5, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - beq _0222060A - ldr r0, _02220618 ; =0x000005DD - bl sub_02005748 - add r0, r5, #0 - mov r1, #0x12 - bl ov13_02225FCC - ldr r2, _0222061C ; =0x00002077 - mov r1, #0xf - ldrb r3, [r5, r2] - add r0, r3, #0 - bic r0, r1 - lsl r1, r3, #0x1c - lsr r3, r1, #0x1c - mov r1, #1 - eor r1, r3 - lsl r1, r1, #0x18 - lsr r3, r1, #0x18 - mov r1, #0xf - and r1, r3 - orr r0, r1 - strb r0, [r5, r2] - add r0, r2, #0 - add r0, #0x17 - strb r4, [r5, r0] - mov r1, #0xc - add r0, r2, #2 - strb r1, [r5, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_022205EC: - ldr r0, _02220618 ; =0x000005DD - bl sub_02005748 - add r0, r5, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _02220624 ; =0x0000208E - mov r1, #0 - strb r1, [r5, r0] - mov r1, #0xb - sub r0, #0x15 - strb r1, [r5, r0] - mov r0, #0x16 - pop {r3, r4, r5, pc} -_0222060A: - mov r0, #0x14 - pop {r3, r4, r5, pc} - nop -_02220610: .word 0x02228D14 -_02220614: .word 0x00002088 -_02220618: .word 0x000005DD -_0222061C: .word 0x00002077 -_02220620: .word 0x00002079 -_02220624: .word 0x0000208E - thumb_func_end ov13_0222050C - - thumb_func_start ov13_02220628 -ov13_02220628: ; 0x02220628 - push {r3, r4, r5, r6, lr} - sub sp, #4 - ldr r1, _02220714 ; =0x02228D64 - add r4, r0, #0 - ldr r6, [r4, #0] - bl ov13_022213E4 - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _02220656 - ldr r0, _02220718 ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228B64 - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _0222065C - mov r5, #4 - b _0222065C -_02220656: - add r0, r4, #0 - bl ov13_022256E8 -_0222065C: - cmp r5, #4 - bhi _0222070E - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222066C: ; jump table - .short _02220676 - _0222066C - 2 ; case 0 - .short _02220676 - _0222066C - 2 ; case 1 - .short _02220676 - _0222066C - 2 ; case 2 - .short _02220676 - _0222066C - 2 ; case 3 - .short _022206F4 - _0222066C - 2 ; case 4 -_02220676: - ldrb r1, [r6, #0x11] - mov r0, #0x50 - mul r0, r1 - add r1, r4, r0 - lsl r0, r5, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x34] - cmp r0, #0 - beq _0222070E - ldr r0, [r4, #0] - add r0, #0x34 - strb r5, [r0] - ldr r0, _0222071C ; =0x000005DD - bl sub_02005748 - add r1, r5, #0 - add r1, #0x13 - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl ov13_02225FCC - ldrh r0, [r6, #0x22] - add r3, r5, #0 - str r0, [sp] - ldrb r2, [r6, #0x11] - ldr r0, [r6, #8] - ldr r1, [r6, #0x28] - add r2, r6, r2 - add r2, #0x2c - ldrb r2, [r2] - bl ov16_0223E30C - cmp r0, #1 - bne _022206CE - ldr r0, _02220720 ; =0x0000207C - mov r1, #0 - strb r1, [r4, r0] - mov r1, #0x17 - sub r0, r0, #3 - strb r1, [r4, r0] - add sp, #4 - mov r0, #0x16 - pop {r3, r4, r5, r6, pc} -_022206CE: - ldr r2, _02220724 ; =0x00001FA8 - mov r1, #0x51 - ldr r0, [r4, r2] - add r2, #8 - ldr r2, [r4, r2] - bl sub_0200B1B8 - add r0, r4, #0 - bl ov13_022240E0 - ldr r0, [r4, #0] - mov r1, #6 - strb r1, [r0, #0x11] - ldr r0, _02220728 ; =0x00002079 - mov r1, #0x19 - strb r1, [r4, r0] - add sp, #4 - mov r0, #0x11 - pop {r3, r4, r5, r6, pc} -_022206F4: - ldr r0, _0222071C ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov13_02225FCC - ldr r0, _02220728 ; =0x00002079 - mov r1, #6 - strb r1, [r4, r0] - add sp, #4 - mov r0, #0x16 - pop {r3, r4, r5, r6, pc} -_0222070E: - mov r0, #0x15 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02220714: .word 0x02228D64 -_02220718: .word 0x00002088 -_0222071C: .word 0x000005DD -_02220720: .word 0x0000207C -_02220724: .word 0x00001FA8 -_02220728: .word 0x00002079 - thumb_func_end ov13_02220628 - - thumb_func_start ov13_0222072C -ov13_0222072C: ; 0x0222072C - push {r3, lr} - mov r1, #0 - bl ov13_022216C0 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov13_0222072C - - thumb_func_start ov13_02220738 -ov13_02220738: ; 0x02220738 - push {r3, lr} - mov r1, #1 - bl ov13_022216C0 - mov r0, #2 - pop {r3, pc} - thumb_func_end ov13_02220738 - - thumb_func_start ov13_02220744 -ov13_02220744: ; 0x02220744 - push {r3, lr} - mov r1, #2 - bl ov13_022216C0 - mov r0, #3 - pop {r3, pc} - thumb_func_end ov13_02220744 - - thumb_func_start ov13_02220750 -ov13_02220750: ; 0x02220750 - push {r3, lr} - mov r1, #3 - bl ov13_022216C0 - mov r0, #4 - pop {r3, pc} - thumb_func_end ov13_02220750 - - thumb_func_start ov13_0222075C -ov13_0222075C: ; 0x0222075C - push {r3, lr} - mov r1, #4 - bl ov13_022216C0 - mov r0, #5 - pop {r3, pc} - thumb_func_end ov13_0222075C - - thumb_func_start ov13_02220768 -ov13_02220768: ; 0x02220768 - push {r3, lr} - ldr r1, _02220788 ; =0x00002077 - ldrb r1, [r0, r1] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - bne _0222077C - mov r1, #6 - bl ov13_022216C0 - b _02220782 -_0222077C: - mov r1, #8 - bl ov13_022216C0 -_02220782: - mov r0, #0x13 - pop {r3, pc} - nop -_02220788: .word 0x00002077 - thumb_func_end ov13_02220768 - - thumb_func_start ov13_0222078C -ov13_0222078C: ; 0x0222078C - push {r4, lr} - add r4, r0, #0 - bl ov13_022252E8 - ldr r0, _022207B4 ; =0x00002077 - ldrb r0, [r4, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - bne _022207A8 - add r0, r4, #0 - mov r1, #7 - bl ov13_022216C0 - b _022207B0 -_022207A8: - add r0, r4, #0 - mov r1, #9 - bl ov13_022216C0 -_022207B0: - mov r0, #0x14 - pop {r4, pc} - ; .align 2, 0 -_022207B4: .word 0x00002077 - thumb_func_end ov13_0222078C - - thumb_func_start ov13_022207B8 -ov13_022207B8: ; 0x022207B8 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl ov13_022216C0 - ldr r2, [r4, #0] - mov r1, #0x25 - ldrh r0, [r2, #0x22] - ldr r2, [r2, #0xc] - bl sub_0207CFF0 - cmp r0, #0 - beq _022207D6 - mov r0, #0x18 - pop {r4, pc} -_022207D6: - mov r0, #0x15 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_022207B8 - - thumb_func_start ov13_022207DC -ov13_022207DC: ; 0x022207DC - push {r4, lr} - ldr r1, _02220818 ; =0x0000207A - add r4, r0, #0 - ldrb r1, [r4, r1] - bl ov13_02224B7C - ldr r1, _02220818 ; =0x0000207A - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02221BF8 - ldr r1, _02220818 ; =0x0000207A - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_022260EC - ldr r1, _02220818 ; =0x0000207A - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_022214E0 - ldr r0, _02220818 ; =0x0000207A - ldrb r0, [r4, r0] - cmp r0, #2 - bne _02220812 - mov r0, #3 - pop {r4, pc} -_02220812: - mov r0, #4 - pop {r4, pc} - nop -_02220818: .word 0x0000207A - thumb_func_end ov13_022207DC - - thumb_func_start ov13_0222081C -ov13_0222081C: ; 0x0222081C - push {r4, lr} - add r4, r0, #0 - bl ov13_022240E0 - ldr r0, _02220830 ; =0x00002079 - mov r1, #0x10 - strb r1, [r4, r0] - mov r0, #0x11 - pop {r4, pc} - nop -_02220830: .word 0x00002079 - thumb_func_end ov13_0222081C - - thumb_func_start ov13_02220834 -ov13_02220834: ; 0x02220834 - push {r3, lr} - ldr r1, _02220844 ; =0x00002060 - add r0, r0, r1 - mov r1, #0 - bl sub_0200E084 - mov r0, #2 - pop {r3, pc} - ; .align 2, 0 -_02220844: .word 0x00002060 - thumb_func_end ov13_02220834 - - thumb_func_start ov13_02220848 -ov13_02220848: ; 0x02220848 - push {r3, lr} - ldr r1, _02220860 ; =0x0000207B - ldrb r0, [r0, r1] - bl sub_0201D724 - cmp r0, #0 - bne _0222085A - mov r0, #0x12 - pop {r3, pc} -_0222085A: - mov r0, #0x11 - pop {r3, pc} - nop -_02220860: .word 0x0000207B - thumb_func_end ov13_02220848 - - thumb_func_start ov13_02220864 -ov13_02220864: ; 0x02220864 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02220884 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _0222087A - bl sub_02022798 - cmp r0, #1 - bne _02220880 -_0222087A: - ldr r0, _02220888 ; =0x00002079 - ldrb r0, [r4, r0] - pop {r4, pc} -_02220880: - mov r0, #0x12 - pop {r4, pc} - ; .align 2, 0 -_02220884: .word 0x021BF67C -_02220888: .word 0x00002079 - thumb_func_end ov13_02220864 - - thumb_func_start ov13_0222088C -ov13_0222088C: ; 0x0222088C - ldr r1, _022208A0 ; =0x00001FA3 - ldrb r2, [r0, r1] - lsl r2, r2, #0x18 - lsr r2, r2, #0x1f - bne _0222089C - add r1, #0xd6 - ldrb r0, [r0, r1] - bx lr -_0222089C: - mov r0, #0x16 - bx lr - ; .align 2, 0 -_022208A0: .word 0x00001FA3 - thumb_func_end ov13_0222088C - - thumb_func_start ov13_022208A4 -ov13_022208A4: ; 0x022208A4 - push {r3, r4, r5, r6, r7, lr} - ldr r7, _02220A3C ; =0x0000207C - add r4, r0, #0 - ldrb r1, [r4, r7] - ldr r5, [r4, #0] - cmp r1, #4 - bls _022208B4 - b _02220A38 -_022208B4: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022208C0: ; jump table - .short _022208CA - _022208C0 - 2 ; case 0 - .short _0222098E - _022208C0 - 2 ; case 1 - .short _022209B6 - _022208C0 - 2 ; case 2 - .short _022209EE - _022208C0 - 2 ; case 3 - .short _02220A0E - _022208C0 - 2 ; case 4 -_022208CA: - ldrb r2, [r5, #0x11] - ldr r0, [r5, #8] - ldr r1, [r5, #0x28] - add r2, r5, r2 - add r2, #0x2c - ldrb r2, [r2] - bl ov16_0223DFAC - ldrb r2, [r5, #0x11] - mov r1, #0x50 - mul r1, r2 - add r1, r4, r1 - str r0, [r1, #4] - add r0, r4, #0 - bl ov13_02224144 - sub r0, r7, #2 - ldrb r0, [r4, r0] - ldrb r1, [r5, #0x11] - cmp r0, #5 - bne _02220914 - mov r0, #0x50 - mul r0, r1 - add r5, #0x34 - ldrb r1, [r5] - add r0, r4, r0 - ldr r0, [r0, #4] - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - add r1, r7, #4 - strh r0, [r4, r1] - mov r2, #2 - sub r0, r1, #4 - strb r2, [r4, r0] - b _02220986 -_02220914: - mov r0, #0x50 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #4] - bl sub_0208E9F0 - add r6, r0, #0 - ldrb r0, [r5, #0x11] - add r3, r4, #0 - mov r7, #0x50 - add r2, r0, #0 - add r3, #0x1b - mul r2, r7 - ldrb r1, [r3, r2] - mov r0, #0x78 - bic r1, r0 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1c - lsr r0, r0, #0x19 - orr r0, r1 - strb r0, [r3, r2] - ldrb r0, [r5, #0x11] - add r1, r0, #0 - mul r1, r7 - add r1, r4, r1 - ldrb r1, [r1, #0x1b] - lsl r1, r1, #0x19 - lsr r1, r1, #0x1c - cmp r1, #7 - bne _0222096A - add r0, #0xd - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02220A40 ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D3F4 - ldrb r1, [r5, #0x11] - add r0, r4, #0 - bl ov13_022234A8 -_0222096A: - ldrb r1, [r5, #0x11] - mov r0, #0x50 - mov r2, #0 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #4] - mov r1, #0xa3 - bl sub_02074470 - ldr r1, _02220A44 ; =0x0000207E - mov r2, #4 - strh r0, [r4, r1] - sub r0, r1, #2 - strb r2, [r4, r0] -_02220986: - ldr r0, _02220A48 ; =0x000005EC - bl sub_02005748 - b _02220A38 -_0222098E: - ldrb r1, [r5, #0x11] - add r6, r4, #0 - mov r2, #0x50 - add r3, r1, #0 - add r6, #0x14 - mul r3, r2 - add r1, r7, #2 - ldrh r2, [r4, r1] - ldrh r1, [r6, r3] - cmp r2, r1 - beq _022209B0 - add r1, r1, #1 - strh r1, [r6, r3] - ldrb r1, [r5, #0x11] - bl ov13_02223448 - b _02220A38 -_022209B0: - mov r0, #3 - strb r0, [r4, r7] - b _02220A38 -_022209B6: - ldrb r3, [r5, #0x11] - add r1, r4, #0 - mov r2, #0x50 - add r1, #0x36 - mul r2, r3 - add r6, r1, r2 - add r1, r5, #0 - add r1, #0x34 - ldrb r1, [r1] - lsl r3, r1, #3 - add r1, r7, #4 - ldrh r2, [r4, r1] - ldrb r1, [r6, r3] - cmp r2, r1 - beq _022209E8 - add r1, r1, #1 - strb r1, [r6, r3] - add r5, #0x34 - ldrb r2, [r5] - add r1, r2, #1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl ov13_02223F5C - b _02220A38 -_022209E8: - mov r0, #3 - strb r0, [r4, r7] - b _02220A38 -_022209EE: - add r2, r5, #0 - add r2, #0x33 - ldrh r1, [r5, #0x22] - ldrb r2, [r2] - ldr r0, [r5, #8] - ldr r3, [r5, #0xc] - bl ov13_02221A54 - add r0, r4, #0 - bl ov13_022240E0 - mov r1, #0x19 - sub r0, r7, #3 - strb r1, [r4, r0] - mov r0, #0x11 - pop {r3, r4, r5, r6, r7, pc} -_02220A0E: - ldrb r1, [r5, #0x11] - add r3, r4, #0 - mov r2, #0x50 - mul r2, r1 - add r1, r7, #2 - add r3, #0x14 - ldrh r6, [r4, r1] - ldrh r1, [r3, r2] - cmp r6, r1 - beq _02220A32 - add r1, r1, #1 - strh r1, [r3, r2] - ldrb r1, [r5, #0x11] - bl ov13_02223448 - add r0, r4, #0 - bl ov13_022264C4 -_02220A32: - ldr r0, _02220A3C ; =0x0000207C - mov r1, #1 - strb r1, [r4, r0] -_02220A38: - mov r0, #0x17 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02220A3C: .word 0x0000207C -_02220A40: .word 0x00001FB8 -_02220A44: .word 0x0000207E -_02220A48: .word 0x000005EC - thumb_func_end ov13_022208A4 - - thumb_func_start ov13_02220A4C -ov13_02220A4C: ; 0x02220A4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - str r0, [sp, #4] - ldr r0, _02220B6C ; =0x0000207C - ldrb r0, [r5, r0] - cmp r0, #0 - beq _02220A68 - cmp r0, #1 - beq _02220AD2 - cmp r0, #2 - beq _02220B3C - b _02220B64 -_02220A68: - ldr r2, [sp, #4] - ldr r0, [sp, #4] - ldrb r3, [r2, #0x11] - ldr r1, [sp, #4] - ldr r0, [r0, #8] - add r2, r2, r3 - add r2, #0x2c - ldrb r2, [r2] - ldr r1, [r1, #0x28] - bl ov16_0223DFAC - ldr r1, [sp, #4] - mov r7, #0 - ldrb r2, [r1, #0x11] - mov r1, #0x50 - add r6, r7, #0 - mul r1, r2 - add r1, r5, r1 - str r0, [r1, #4] - add r4, r5, #0 -_02220A90: - ldr r0, [sp, #4] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r1, r5, r0 - add r0, r1, r6 - ldrh r0, [r0, #0x34] - cmp r0, #0 - beq _02220AB4 - ldr r0, [r1, #4] - add r1, r7, #0 - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - mov r1, #0x82 - lsl r1, r1, #6 - strh r0, [r4, r1] -_02220AB4: - add r7, r7, #1 - add r6, #8 - add r4, r4, #2 - cmp r7, #4 - blo _02220A90 - add r0, r5, #0 - bl ov13_02224144 - ldr r0, _02220B70 ; =0x000005EC - bl sub_02005748 - ldr r0, _02220B6C ; =0x0000207C - mov r1, #1 - strb r1, [r5, r0] - b _02220B64 -_02220AD2: - mov r6, #0 - add r4, r6, #0 - str r6, [sp] - add r7, r5, #0 -_02220ADA: - ldr r0, [sp, #4] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r1, r5, r0 - ldr r0, [sp] - add r1, r1, r0 - ldrh r0, [r1, #0x34] - cmp r0, #0 - bne _02220AF2 - add r6, r6, #1 - b _02220B22 -_02220AF2: - mov r0, #0x82 - add r2, r1, #0 - lsl r0, r0, #6 - add r2, #0x36 - ldrh r0, [r7, r0] - ldrb r2, [r2] - cmp r0, r2 - beq _02220B20 - add r0, r1, #0 - add r0, #0x36 - ldrb r0, [r0] - lsl r2, r4, #0x10 - add r1, #0x36 - add r0, r0, #1 - strb r0, [r1] - add r1, r4, #1 - lsl r1, r1, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov13_02223F5C - b _02220B22 -_02220B20: - add r6, r6, #1 -_02220B22: - ldr r0, [sp] - add r4, r4, #1 - add r0, #8 - add r7, r7, #2 - str r0, [sp] - cmp r4, #4 - blo _02220ADA - cmp r6, #4 - bne _02220B64 - ldr r0, _02220B6C ; =0x0000207C - mov r1, #2 - strb r1, [r5, r0] - b _02220B64 -_02220B3C: - ldr r2, [sp, #4] - ldr r1, [sp, #4] - ldr r0, [sp, #4] - add r2, #0x33 - ldr r3, [sp, #4] - ldrh r1, [r1, #0x22] - ldrb r2, [r2] - ldr r0, [r0, #8] - ldr r3, [r3, #0xc] - bl ov13_02221A54 - add r0, r5, #0 - bl ov13_022240E0 - ldr r0, _02220B74 ; =0x00002079 - mov r1, #0x19 - strb r1, [r5, r0] - add sp, #8 - mov r0, #0x11 - pop {r3, r4, r5, r6, r7, pc} -_02220B64: - mov r0, #0x18 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02220B6C: .word 0x0000207C -_02220B70: .word 0x000005EC -_02220B74: .word 0x00002079 - thumb_func_end ov13_02220A4C - - thumb_func_start ov13_02220B78 -ov13_02220B78: ; 0x02220B78 - push {lr} - sub sp, #0xc - mov r2, #0 - str r2, [sp] - mov r1, #0x10 - str r1, [sp, #4] - mov r1, #0x7a - str r2, [sp, #8] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0xa - add r3, r1, #0 - ldr r2, _02220BA0 ; =0x0000FFFF - sub r3, #0x12 - bl sub_02003178 - mov r0, #0x1a - add sp, #0xc - pop {pc} - nop -_02220BA0: .word 0x0000FFFF - thumb_func_end ov13_02220B78 - - thumb_func_start ov13_02220BA4 -ov13_02220BA4: ; 0x02220BA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x7a - add r4, r1, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200384C - cmp r0, #0 - beq _02220BBC - mov r0, #0 - pop {r3, r4, r5, pc} -_02220BBC: - add r0, r4, #0 - bl ov13_02220F60 - add r0, r4, #0 - bl ov13_02224970 - add r0, r4, #0 - bl ov13_02221BC8 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov13_02220D1C - ldr r0, _02220C08 ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228A5C - ldr r1, [r4, #0] - add r1, #0x32 - strb r0, [r1] - ldr r0, _02220C08 ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228A50 - mov r0, #2 - bl sub_02002C60 - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x36 - strb r1, [r0] - add r0, r5, #0 - bl sub_020067D0 - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_02220C08: .word 0x00002088 - thumb_func_end ov13_02220BA4 - - thumb_func_start ov13_02220C0C -ov13_02220C0C: ; 0x02220C0C - push {r3, r4, r5, lr} - sub sp, #0x80 - ldr r5, _02220D08 ; =0x02228D04 - add r3, sp, #0x70 - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - mov r1, #1 - bl sub_020183A0 - ldr r5, _02220D0C ; =0x02228D7C - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #7 - str r0, [r3, #0] - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r3, #0 - bl sub_020183C4 - ldr r5, _02220D10 ; =0x02228DB4 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #6 - str r0, [r3, #0] - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r3, #0 - bl sub_020183C4 - ldr r5, _02220D14 ; =0x02228DD0 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r3, #0 - bl sub_020183C4 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019EBC - ldr r5, _02220D18 ; =0x02228D98 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r3, #0 - bl sub_020183C4 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_02019EBC - ldr r3, [r4, #0] - mov r0, #5 - ldr r3, [r3, #0xc] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [r4, #0] - mov r0, #4 - ldr r3, [r3, #0xc] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_0201C3C0 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_0201C3C0 - add sp, #0x80 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02220D08: .word 0x02228D04 -_02220D0C: .word 0x02228D7C -_02220D10: .word 0x02228DB4 -_02220D14: .word 0x02228DD0 -_02220D18: .word 0x02228D98 - thumb_func_end ov13_02220C0C - - thumb_func_start ov13_02220D1C -ov13_02220D1C: ; 0x02220D1C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x1f - mov r1, #0 - bl sub_0201FF74 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - mov r1, #7 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02220D1C - - thumb_func_start ov13_02220D4C -ov13_02220D4C: ; 0x02220D4C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #0x48 - ldr r1, [r1, #0xc] - bl sub_02006C24 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldr r1, [r5, #0] - mov r2, #0x79 - ldr r1, [r1, #0xc] - lsl r2, r2, #2 - str r1, [sp, #0xc] - ldr r2, [r5, r2] - mov r1, #0x16 - mov r3, #7 - add r4, r0, #0 - bl sub_020070E8 - ldr r2, [r5, #0] - add r0, r4, #0 - ldr r2, [r2, #0xc] - mov r1, #0x14 - bl sub_02006CB8 - add r1, sp, #0x10 - add r6, r0, #0 - bl sub_020A7248 - ldr r1, [sp, #0x10] - add r0, r5, #0 - add r1, #0xc - bl ov13_02225710 - add r0, r6, #0 - bl sub_020181C4 - ldr r2, [r5, #0] - add r0, r4, #0 - ldr r2, [r2, #0xc] - mov r1, #0x15 - bl sub_02006CB8 - add r1, sp, #0x10 - add r6, r0, #0 - bl sub_020A7248 - ldr r1, [sp, #0x10] - add r0, r5, #0 - add r1, #0xc - bl ov13_02225A3C - add r0, r6, #0 - bl sub_020181C4 - mov r0, #1 - str r0, [sp] - lsl r0, r0, #9 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #0x7a - ldr r3, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r3, #0xc] - mov r1, #0x48 - mov r2, #0x17 - bl sub_02003050 - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02003164 - add r2, r0, #0 - ldr r0, _02220F04 ; =0x00001F60 - mov r1, #6 - lsl r1, r1, #6 - add r1, r2, r1 - add r0, r5, r0 - mov r2, #0x40 - bl sub_020D50B8 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - mov r0, #0x7a - ldr r3, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r3, #0xc] - mov r1, #0xe - mov r2, #6 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xf0 - str r0, [sp, #8] - ldr r3, [r5, #0] - add r0, #0xf8 - ldr r0, [r5, r0] - ldr r3, [r3, #0xc] - mov r1, #0xe - mov r2, #7 - bl sub_02003050 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223EDE0 - add r4, r0, #0 - bl sub_0200DD04 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #0] - mov r2, #0x79 - ldr r0, [r0, #0xc] - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r2, [r5, r2] - mov r0, #0x26 - mov r3, #4 - bl sub_02006E3C - add r0, r4, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - mov r0, #0x7a - ldr r3, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r3, #0xc] - mov r1, #0x26 - bl sub_02003050 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02003164 - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x20 - ldr r0, [r0, #0xc] - bl sub_02018144 - mov r1, #0x1a - lsl r1, r1, #4 - add r1, r6, r1 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020D50B8 - mov r0, #0x4d - lsl r0, r0, #2 - add r1, r6, r0 - ldrb r3, [r1] - add r2, r4, #0 - add r2, #0xe - strb r3, [r4, #0xe] - ldrb r3, [r1, #1] - strb r3, [r2, #1] - ldrb r3, [r1, #2] - strb r3, [r2, #2] - ldrb r1, [r1, #3] - mov r3, #0xd0 - strb r1, [r2, #3] - add r2, r0, #4 - add r1, r0, #4 - ldrb r2, [r6, r2] - add r1, r6, r1 - add r0, #0xb4 - strb r2, [r4, #6] - ldrb r2, [r1, #1] - strb r2, [r4, #7] - ldrb r2, [r1, #2] - strb r2, [r4, #8] - ldrb r1, [r1, #3] - mov r2, #1 - strb r1, [r4, #9] - mov r1, #0x20 - str r1, [sp] - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02002FBC - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_02220F04: .word 0x00001F60 - thumb_func_end ov13_02220D4C - - thumb_func_start ov13_02220F08 -ov13_02220F08: ; 0x02220F08 - push {r4, lr} - add r4, r0, #0 - ldr r3, [r4, #0] - mov r0, #0 - ldr r3, [r3, #0xc] - mov r1, #0x1a - mov r2, #3 - bl sub_0200B144 - ldr r1, _02220F50 ; =0x00001FA8 - mov r2, #0 - str r0, [r4, r1] - ldr r3, [r4, #0] - mov r0, #0xf - ldr r3, [r3, #0xc] - mov r1, #0xe - bl sub_0200C440 - ldr r1, _02220F54 ; =0x00001FA4 - str r0, [r4, r1] - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - bl sub_0200B358 - ldr r1, _02220F58 ; =0x00001FAC - str r0, [r4, r1] - ldr r1, [r4, #0] - mov r0, #2 - ldr r1, [r1, #0xc] - lsl r0, r0, #8 - bl sub_02023790 - ldr r1, _02220F5C ; =0x00001FB0 - str r0, [r4, r1] - pop {r4, pc} - nop -_02220F50: .word 0x00001FA8 -_02220F54: .word 0x00001FA4 -_02220F58: .word 0x00001FAC -_02220F5C: .word 0x00001FB0 - thumb_func_end ov13_02220F08 - - thumb_func_start ov13_02220F60 -ov13_02220F60: ; 0x02220F60 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02220F88 ; =0x00001FA8 - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _02220F8C ; =0x00001FA4 - ldr r0, [r4, r0] - bl sub_0200C560 - ldr r0, _02220F90 ; =0x00001FAC - ldr r0, [r4, r0] - bl sub_0200B3F0 - ldr r0, _02220F94 ; =0x00001FB0 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - nop -_02220F88: .word 0x00001FA8 -_02220F8C: .word 0x00001FA4 -_02220F90: .word 0x00001FAC -_02220F94: .word 0x00001FB0 - thumb_func_end ov13_02220F60 - - thumb_func_start ov13_02220F98 -ov13_02220F98: ; 0x02220F98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0207A0F8 - cmp r0, #0 - bgt _02220FB2 - b _02221246 -_02220FB2: - ldr r0, [sp, #8] - mov r1, #0x50 - mul r1, r0 - ldr r0, [sp] - str r1, [sp, #4] - add r4, r0, r1 - ldr r0, [r0, #0] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - bl sub_0207A0FC - str r0, [r4, #4] - mov r1, #5 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #8] - ldrh r0, [r4, #8] - cmp r0, #0 - bne _02220FDC - b _0222122A -_02220FDC: - ldr r0, [sp, #8] - mov r1, #0x50 - add r5, r0, #0 - mul r5, r1 - ldr r0, [sp] - mov r1, #0xa5 - add r4, r0, r5 - ldr r0, [r4, #4] - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xa] - ldr r0, [r4, #4] - mov r1, #0xa6 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xc] - ldr r0, [r4, #4] - mov r1, #0xa7 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xe] - ldr r0, [r4, #4] - mov r1, #0xa8 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x10] - ldr r0, [r4, #4] - mov r1, #0xa9 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x12] - ldr r0, [r4, #4] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x14] - ldr r0, [r4, #4] - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x16] - ldr r0, [r4, #4] - mov r1, #0xb1 - mov r2, #0 - bl sub_02074470 - strb r0, [r4, #0x18] - ldr r0, [r4, #4] - mov r1, #0xb2 - mov r2, #0 - bl sub_02074470 - ldr r6, [sp] - strb r0, [r4, #0x19] - ldr r0, [r4, #4] - add r6, #0x1a - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - ldrb r1, [r6, r5] - mov r2, #0x7f - lsl r0, r0, #0x18 - bic r1, r2 - lsr r2, r0, #0x18 - mov r0, #0x7f - and r0, r2 - orr r0, r1 - strb r0, [r6, r5] - ldr r0, [r4, #4] - mov r1, #0xb0 - mov r2, #0 - bl sub_02074470 - cmp r0, #1 - ldrb r1, [r6, r5] - bne _0222108C - mov r0, #0x80 - bic r1, r0 - strb r1, [r6, r5] - b _02221092 -_0222108C: - mov r0, #0x80 - orr r0, r1 - strb r0, [r6, r5] -_02221092: - ldr r0, [sp] - add r4, r0, r5 - add r6, r0, #0 - ldr r0, [r4, #4] - add r6, #0x1b - bl sub_02075D6C - ldrb r1, [r6, r5] - mov r2, #7 - bic r1, r2 - mov r2, #7 - and r0, r2 - orr r0, r1 - strb r0, [r6, r5] - ldr r0, [r4, #4] - bl sub_0208E9F0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1c - ldrb r1, [r6, r5] - mov r2, #0x78 - lsr r0, r0, #0x19 - bic r1, r2 - orr r0, r1 - strb r0, [r6, r5] - ldr r0, [r4, #4] - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1f - ldrb r1, [r6, r5] - mov r2, #0x80 - lsr r0, r0, #0x18 - bic r1, r2 - orr r0, r1 - strb r0, [r6, r5] - ldr r0, [r4, #4] - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x1c] - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x1e] - ldr r0, [r4, #4] - mov r1, #8 - mov r2, #0 - bl sub_02074470 - ldr r6, [sp] - str r0, [r4, #0x20] - add r6, #0x1a - ldrb r1, [r6, r5] - ldrh r0, [r4, #8] - lsl r1, r1, #0x19 - lsr r1, r1, #0x19 - bl sub_02075AD0 - str r0, [r4, #0x24] - ldrb r0, [r6, r5] - lsl r0, r0, #0x19 - lsr r1, r0, #0x19 - cmp r1, #0x64 - bne _0222112A - ldr r0, [sp] - add r4, r0, r5 - ldr r0, [r4, #0x24] - b _02221136 -_0222112A: - ldr r0, [sp] - add r1, r1, #1 - add r4, r0, r5 - ldrh r0, [r4, #8] - bl sub_02075AD0 -_02221136: - str r0, [r4, #0x28] - ldr r0, [r4, #4] - mov r1, #0x13 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x2c - strb r0, [r1] - ldr r0, [r4, #4] - mov r1, #0x14 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x2d - strb r0, [r1] - ldr r0, [r4, #4] - mov r1, #0x15 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x2e - strb r0, [r1] - ldr r0, [r4, #4] - mov r1, #0x16 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x2f - strb r0, [r1] - ldr r0, [r4, #4] - mov r1, #0x17 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x30 - strb r0, [r1] - ldr r0, [r4, #4] - mov r1, #0xa2 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x31 - strb r0, [r1] - ldr r0, [r4, #4] - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r4, #0x32 - strb r0, [r4] - ldr r1, [sp] - ldr r0, [sp, #4] - add r1, #0x34 - add r7, r1, r0 - ldr r1, [sp] - mov r4, #0 - add r6, r1, r0 -_022211B4: - lsl r0, r4, #3 - add r1, r4, #0 - str r0, [sp, #0xc] - add r5, r7, r0 - ldr r0, [r6, #4] - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #0xc] - strh r0, [r7, r1] - add r0, r1, #0 - ldrh r0, [r7, r0] - cmp r0, #0 - beq _02221220 - add r1, r4, #0 - ldr r0, [r6, #4] - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - strb r0, [r5, #2] - add r1, r4, #0 - ldr r0, [r6, #4] - add r1, #0x3e - mov r2, #0 - bl sub_02074470 - strb r0, [r5, #3] - ldrh r0, [r5] - ldrb r1, [r5, #3] - bl sub_020790DC - strb r0, [r5, #3] - ldrh r0, [r5] - mov r1, #3 - bl sub_020790C4 - strb r0, [r5, #4] - ldrh r0, [r5] - mov r1, #1 - bl sub_020790C4 - strb r0, [r5, #5] - ldrh r0, [r5] - mov r1, #4 - bl sub_020790C4 - strb r0, [r5, #6] - ldrh r0, [r5] - mov r1, #2 - bl sub_020790C4 - strb r0, [r5, #7] -_02221220: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #4 - blo _022211B4 -_0222122A: - ldr r0, [sp, #8] - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0207A0F8 - ldr r1, [sp, #8] - cmp r1, r0 - bge _02221246 - b _02220FB2 -_02221246: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02220F98 - - thumb_func_start ov13_0222124C -ov13_0222124C: ; 0x0222124C - push {r3, r4, r5, lr} - ldr r1, _022212BC ; =0x02228DEC - add r4, r0, #0 - bl ov13_022213E4 - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _02221298 - ldr r0, _022212C0 ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228B64 - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _02221276 - mov r5, #6 - b _02221280 -_02221276: - add r0, r0, #1 - cmp r5, r0 - bne _02221280 - mov r0, #0 - pop {r3, r4, r5, pc} -_02221280: - cmp r5, #6 - beq _02221290 - add r0, r4, #0 - add r1, r5, #0 - bl ov13_022213F0 - cmp r0, #0 - beq _022212B6 -_02221290: - ldr r0, [r4, #0] - strb r5, [r0, #0x11] - mov r0, #1 - pop {r3, r4, r5, pc} -_02221298: - cmp r5, #6 - beq _022212A8 - add r0, r4, #0 - add r1, r5, #0 - bl ov13_022213F0 - cmp r0, #0 - beq _022212B6 -_022212A8: - ldr r0, [r4, #0] - strb r5, [r0, #0x11] - add r0, r4, #0 - bl ov13_022256E8 - mov r0, #1 - pop {r3, r4, r5, pc} -_022212B6: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022212BC: .word 0x02228DEC -_022212C0: .word 0x00002088 - thumb_func_end ov13_0222124C - - thumb_func_start ov13_022212C4 -ov13_022212C4: ; 0x022212C4 - push {r3, r4, r5, lr} - ldr r1, _02221304 ; =0x02228D24 - add r5, r0, #0 - bl ov13_022213E4 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _022212F8 - ldr r0, _02221308 ; =0x00002088 - ldr r0, [r5, r0] - bl ov13_02228B64 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022212EE - mov r4, #3 - b _022212FE -_022212EE: - add r0, r0, #1 - cmp r4, r0 - bne _022212FE - mov r0, #0xff - pop {r3, r4, r5, pc} -_022212F8: - add r0, r5, #0 - bl ov13_022256E8 -_022212FE: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02221304: .word 0x02228D24 -_02221308: .word 0x00002088 - thumb_func_end ov13_022212C4 - - thumb_func_start ov13_0222130C -ov13_0222130C: ; 0x0222130C - push {r3, r4, r5, lr} - ldr r1, _0222134C ; =0x02228D38 - add r5, r0, #0 - bl ov13_022213E4 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _02221340 - ldr r0, _02221350 ; =0x00002088 - ldr r0, [r5, r0] - bl ov13_02228B64 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _02221336 - mov r4, #3 - b _02221346 -_02221336: - add r0, r0, #1 - cmp r4, r0 - bne _02221346 - mov r0, #0xff - pop {r3, r4, r5, pc} -_02221340: - add r0, r5, #0 - bl ov13_022256E8 -_02221346: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222134C: .word 0x02228D38 -_02221350: .word 0x00002088 - thumb_func_end ov13_0222130C - - thumb_func_start ov13_02221354 -ov13_02221354: ; 0x02221354 - push {r3, r4, r5, lr} - ldr r1, _02221394 ; =0x02228E2C - add r5, r0, #0 - bl ov13_022213E4 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _02221388 - ldr r0, _02221398 ; =0x00002088 - ldr r0, [r5, r0] - bl ov13_02228B64 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _0222137E - mov r4, #7 - b _0222138E -_0222137E: - add r0, r0, #1 - cmp r4, r0 - bne _0222138E - mov r0, #0xff - pop {r3, r4, r5, pc} -_02221388: - add r0, r5, #0 - bl ov13_022256E8 -_0222138E: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02221394: .word 0x02228E2C -_02221398: .word 0x00002088 - thumb_func_end ov13_02221354 - - thumb_func_start ov13_0222139C -ov13_0222139C: ; 0x0222139C - push {r3, r4, r5, lr} - ldr r1, _022213DC ; =0x02228D4C - add r5, r0, #0 - bl ov13_022213E4 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _022213D0 - ldr r0, _022213E0 ; =0x00002088 - ldr r0, [r5, r0] - bl ov13_02228B64 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022213C6 - mov r4, #4 - b _022213D6 -_022213C6: - add r0, r0, #1 - cmp r4, r0 - bne _022213D6 - mov r0, #0xff - pop {r3, r4, r5, pc} -_022213D0: - add r0, r5, #0 - bl ov13_022256E8 -_022213D6: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022213DC: .word 0x02228D4C -_022213E0: .word 0x00002088 - thumb_func_end ov13_0222139C - - thumb_func_start ov13_022213E4 -ov13_022213E4: ; 0x022213E4 - ldr r3, _022213EC ; =sub_02022664 - add r0, r1, #0 - bx r3 - nop -_022213EC: .word sub_02022664 - thumb_func_end ov13_022213E4 - - thumb_func_start ov13_022213F0 -ov13_022213F0: ; 0x022213F0 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x50 - add r5, r0, #0 - mul r1, r4 - add r1, r5, r1 - ldrh r1, [r1, #8] - cmp r1, #0 - bne _02221406 - mov r0, #0 - pop {r3, r4, r5, pc} -_02221406: - cmp r4, #0 - beq _02221420 - bl ov13_0222196C - cmp r0, #0 - bne _0222141C - add r0, r5, #0 - bl ov13_0222198C - cmp r0, #0 - beq _02221424 -_0222141C: - cmp r4, #1 - bne _02221424 -_02221420: - mov r0, #1 - pop {r3, r4, r5, pc} -_02221424: - mov r0, #2 - pop {r3, r4, r5, pc} - thumb_func_end ov13_022213F0 - - thumb_func_start ov13_02221428 -ov13_02221428: ; 0x02221428 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r7, r2, #0 - add r6, r4, #0 - bl ov13_0222198C - cmp r0, #1 - bne _022214A0 - ldr r2, _022214DC ; =0x02228CFC - add r1, sp, #0 - ldrb r3, [r2] - add r0, sp, #0 - mov r4, #0 - strb r3, [r1] - ldrb r3, [r2, #1] - strb r3, [r1, #1] - ldrb r3, [r2, #2] - strb r3, [r1, #2] - ldrb r3, [r2, #3] - strb r3, [r1, #3] - ldrb r3, [r2, #4] - ldrb r2, [r2, #5] - strb r3, [r1, #4] - strb r2, [r1, #5] -_0222145C: - ldrb r1, [r0] - cmp r6, r1 - beq _0222146A - add r4, r4, #1 - add r0, r0, #1 - cmp r4, #6 - blt _0222145C -_0222146A: - add r4, r4, r7 - bpl _02221472 - mov r4, #5 - b _02221478 -_02221472: - cmp r4, #6 - blt _02221478 - mov r4, #0 -_02221478: - add r0, sp, #0 - ldrb r1, [r0, r4] - cmp r6, r1 - beq _022214D4 - add r0, r5, #0 - bl ov13_022213F0 - cmp r0, #0 - beq _0222146A - add r0, sp, #0 - ldrb r0, [r0, r4] - mov r1, #0x50 - mul r1, r0 - add r1, r5, r1 - ldrb r1, [r1, #0x1b] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1f - bne _0222146A - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022214A0: - add r4, r4, r7 - bpl _022214A8 - mov r4, #5 - b _022214AE -_022214A8: - cmp r4, #6 - blt _022214AE - mov r4, #0 -_022214AE: - cmp r6, r4 - beq _022214D4 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_022213F0 - cmp r0, #0 - beq _022214A0 - mov r0, #0x50 - mul r0, r4 - add r0, r5, r0 - ldrb r0, [r0, #0x1b] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _022214A0 - lsl r0, r4, #0x18 - add sp, #8 - lsr r0, r0, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_022214D4: - mov r0, #0xff - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022214DC: .word 0x02228CFC - thumb_func_end ov13_02221428 - - thumb_func_start ov13_022214E0 -ov13_022214E0: ; 0x022214E0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - cmp r1, #2 - bne _0222155E - ldr r0, [r6, #0] - add r2, r6, #4 - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r0, r2, r0 - ldrb r1, [r0, #0x16] - lsl r1, r1, #0x19 - lsr r1, r1, #0x19 - cmp r1, #0x64 - bhs _0222150A - ldr r2, [r0, #0x20] - ldr r1, [r0, #0x24] - ldr r0, [r0, #0x1c] - sub r1, r1, r2 - sub r0, r0, r2 - b _0222150E -_0222150A: - mov r1, #0 - add r0, r1, #0 -_0222150E: - mov r2, #0x40 - bl sub_0208C0BC - add r4, r0, #0 - mov r5, #0 - mov r7, #0x1e -_0222151A: - cmp r4, #8 - blo _02221522 - add r1, r7, #0 - b _0222152A -_02221522: - add r0, r4, #0 - add r0, #0x16 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 -_0222152A: - add r2, r5, #0 - add r2, #0xa - lsl r2, r2, #0x10 - add r0, r6, #0 - lsr r2, r2, #0x10 - mov r3, #8 - bl ov13_02221560 - cmp r4, #8 - bhs _02221542 - mov r4, #0 - b _02221548 -_02221542: - sub r4, #8 - lsl r0, r4, #0x18 - lsr r4, r0, #0x18 -_02221548: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #8 - blo _0222151A - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r1, #7 - bl sub_0201C3C0 -_0222155E: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_022214E0 - - thumb_func_start ov13_02221560 -ov13_02221560: ; 0x02221560 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - lsl r1, r3, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #1 - str r1, [sp, #4] - add r4, r2, #0 - str r1, [sp, #8] - mov r1, #0x10 - str r1, [sp, #0xc] - mov r1, #0x79 - lsl r1, r1, #2 - ldr r0, [r0, r1] - lsl r3, r4, #0x18 - mov r1, #7 - add r2, r5, #0 - lsr r3, r3, #0x18 - bl sub_02019CB8 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov13_02221560 - - thumb_func_start ov13_02221590 -ov13_02221590: ; 0x02221590 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0xe - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x10 - lsl r6, r2, #1 - add r4, r1, #0 - str r0, [sp, #0xc] - mov r0, #0x79 - add r7, r6, #2 - lsl r0, r0, #2 - lsl r3, r7, #0x18 - ldr r0, [r5, r0] - mov r1, #7 - add r2, r4, #0 - lsr r3, r3, #0x18 - bl sub_02019CB8 - mov r0, #0xe - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - mov r0, #0x79 - add r6, r6, #3 - lsl r0, r0, #2 - add r2, r4, #1 - lsl r2, r2, #0x10 - lsl r3, r6, #0x18 - ldr r0, [r5, r0] - mov r1, #7 - lsr r2, r2, #0x10 - lsr r3, r3, #0x18 - bl sub_02019CB8 - mov r0, #0xf - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - mov r0, #0x79 - add r2, r4, #0 - lsl r0, r0, #2 - add r2, #0x20 - lsl r2, r2, #0x10 - lsl r3, r7, #0x18 - ldr r0, [r5, r0] - mov r1, #7 - lsr r2, r2, #0x10 - lsr r3, r3, #0x18 - bl sub_02019CB8 - mov r0, #0xf - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - mov r0, #0x79 - lsl r0, r0, #2 - add r4, #0x21 - lsl r2, r4, #0x10 - lsl r3, r6, #0x18 - ldr r0, [r5, r0] - mov r1, #7 - lsr r2, r2, #0x10 - lsr r3, r3, #0x18 - bl sub_02019CB8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_02221590 - - thumb_func_start ov13_02221630 -ov13_02221630: ; 0x02221630 - push {r4, r5, r6, lr} - ldr r6, _02221650 ; =0x00000125 - add r5, r0, #0 - mov r4, #0 -_02221638: - lsl r2, r4, #0x18 - add r0, r5, #0 - add r1, r6, #0 - lsr r2, r2, #0x18 - bl ov13_02221590 - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #6 - blo _02221638 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02221650: .word 0x00000125 - thumb_func_end ov13_02221630 - - thumb_func_start ov13_02221654 -ov13_02221654: ; 0x02221654 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - cmp r1, #9 - bne _022216BE - bl ov13_02221630 - ldr r1, [r5, #0] - add r0, r1, #0 - add r0, #0x34 - ldrb r2, [r0] - cmp r2, #4 - bhs _0222167C - ldrb r1, [r1, #0x11] - mov r0, #0x50 - mul r0, r1 - add r1, r5, r0 - lsl r0, r2, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x34] - b _0222167E -_0222167C: - ldrh r0, [r1, #0x24] -_0222167E: - mov r1, #0xa - bl sub_020790C4 - bl sub_02095734 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x18 - asr r6, r0, #0x18 - mov r4, #0 - cmp r6, #0 - ble _022216B2 - mov r7, #5 - lsl r7, r7, #6 -_0222169C: - lsl r2, r4, #0x18 - add r0, r5, #0 - add r1, r7, #0 - lsr r2, r2, #0x18 - bl ov13_02221590 - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, r6 - blt _0222169C -_022216B2: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #7 - bl sub_0201C3C0 -_022216BE: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_02221654 - - thumb_func_start ov13_022216C0 -ov13_022216C0: ; 0x022216C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov13_02221738 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #4 - mov r2, #0 - bl sub_02019F04 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #5 - mov r2, #0 - bl sub_02019F04 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02224B7C - add r0, r5, #0 - bl ov13_02221BB0 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02221AC4 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02221BF8 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_022214E0 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02221654 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_0222563C - add r0, r5, #0 - add r1, r4, #0 - bl ov13_022260EC - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02226444 - ldr r0, _02221734 ; =0x0000207A - strb r4, [r5, r0] - pop {r3, r4, r5, pc} - nop -_02221734: .word 0x0000207A - thumb_func_end ov13_022216C0 - - thumb_func_start ov13_02221738 -ov13_02221738: ; 0x02221738 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r2, _022217A0 ; =0x02228E50 - add r5, r0, #0 - lsl r0, r1, #3 - mov r4, #0 - add r6, r2, r0 -_02221746: - ldr r2, [r5, #0] - ldr r1, [r6, #0] - ldr r2, [r2, #0xc] - mov r0, #0x48 - bl sub_02006AC0 - add r1, sp, #0xc - add r7, r0, #0 - bl sub_020A7248 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - mov r0, #0x79 - lsl r0, r0, #2 - add r1, r4, #6 - ldr r2, [sp, #0xc] - lsl r1, r1, #0x18 - ldr r0, [r5, r0] - lsr r1, r1, #0x18 - add r2, #0xc - mov r3, #0 - bl sub_020198C0 - mov r0, #0x79 - lsl r0, r0, #2 - add r1, r4, #6 - lsl r1, r1, #0x18 - ldr r0, [r5, r0] - lsr r1, r1, #0x18 - bl sub_0201C3C0 - add r0, r7, #0 - bl sub_020181C4 - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #2 - blo _02221746 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022217A0: .word 0x02228E50 - thumb_func_end ov13_02221738 - - thumb_func_start ov13_022217A4 -ov13_022217A4: ; 0x022217A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - mov r2, #0x50 - ldrb r1, [r1, #0x11] - add r3, r5, #4 - mul r2, r1 - add r4, r3, r2 - bl ov13_022219AC - cmp r0, #1 - bne _02221800 - ldr r0, _02221940 ; =0x00001FA8 - mov r1, #0x50 - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - add r4, r0, #0 - ldr r0, [r1, #8] - ldr r1, [r1, #0x28] - bl ov16_0223E258 - add r1, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E120 - add r2, r0, #0 - ldr r0, _02221944 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200BA74 - ldr r1, _02221944 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02221800: - ldrh r0, [r4, #0x10] - cmp r0, #0 - bne _0222183C - ldr r0, _02221940 ; =0x00001FA8 - mov r1, #0x4d - ldr r0, [r5, r0] - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, [r4, #0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02221944 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02221944 ; =0x00001FAC - add r2, r6, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0222183C: - ldr r2, [r5, #0] - ldrb r0, [r2, #0x11] - add r0, r2, r0 - add r0, #0x2c - ldrb r1, [r0] - ldrb r0, [r2, #0x14] - cmp r0, r1 - beq _02221852 - ldrb r0, [r2, #0x15] - cmp r0, r1 - bne _02221888 -_02221852: - ldr r0, _02221940 ; =0x00001FA8 - mov r1, #0x4c - ldr r0, [r5, r0] - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, [r4, #0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02221944 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02221944 ; =0x00001FAC - add r2, r6, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02221888: - add r0, r5, #0 - bl ov13_0222194C - cmp r0, #1 - bne _022218A4 - ldr r2, _02221940 ; =0x00001FA8 - mov r1, #0x4f - ldr r0, [r5, r2] - add r2, #8 - ldr r2, [r5, r2] - bl sub_0200B1B8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022218A4: - ldr r2, [r5, #0] - ldrb r1, [r2, #0x12] - cmp r1, #6 - beq _022218F4 - ldrb r4, [r2, #0x11] - add r0, r2, r4 - add r0, #0x2c - ldrb r0, [r0] - cmp r1, r0 - bne _022218F4 - ldr r0, _02221940 ; =0x00001FA8 - mov r1, #0x5d - ldr r0, [r5, r0] - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #0x50 - mul r0, r4 - add r0, r5, r0 - ldr r0, [r0, #4] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02221944 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02221944 ; =0x00001FAC - add r2, r6, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022218F4: - ldrh r0, [r2, #0x24] - cmp r0, #0 - beq _0222193C - ldr r1, _02221948 ; =0x00002076 - mov r0, #0x50 - ldrb r2, [r5, r1] - sub r1, #0xce - add r4, r5, #4 - add r6, r2, #0 - mul r6, r0 - ldr r0, [r5, r1] - mov r1, #0x4e - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [r4, r6] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02221944 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02221944 ; =0x00001FAC - add r2, r7, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r7, #0 - bl sub_020237BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0222193C: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02221940: .word 0x00001FA8 -_02221944: .word 0x00001FAC -_02221948: .word 0x00002076 - thumb_func_end ov13_022217A4 - - thumb_func_start ov13_0222194C -ov13_0222194C: ; 0x0222194C - ldr r1, [r0, #0] - ldrb r2, [r1, #0x11] - mov r1, #0x50 - mul r1, r2 - add r0, r0, r1 - ldrb r0, [r0, #0x1b] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - beq _02221962 - mov r0, #1 - b _02221964 -_02221962: - mov r0, #0 -_02221964: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr - ; .align 2, 0 - thumb_func_end ov13_0222194C - - thumb_func_start ov13_0222196C -ov13_0222196C: ; 0x0222196C - push {r3, lr} - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl ov16_0223DF0C - cmp r0, #0x4a - beq _02221988 - cmp r0, #0x4b - beq _02221988 - mov r1, #0x12 - tst r0, r1 - beq _02221988 - mov r0, #1 - pop {r3, pc} -_02221988: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov13_0222196C - - thumb_func_start ov13_0222198C -ov13_0222198C: ; 0x0222198C - push {r3, lr} - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl ov16_0223DF0C - cmp r0, #0x4a - beq _022219A8 - cmp r0, #0x4b - beq _022219A8 - mov r1, #8 - tst r0, r1 - beq _022219A8 - mov r0, #1 - pop {r3, pc} -_022219A8: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov13_0222198C - - thumb_func_start ov13_022219AC -ov13_022219AC: ; 0x022219AC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov13_0222198C - cmp r0, #1 - bne _022219D4 - ldr r0, _022219D8 ; =0x0000208F - ldrb r0, [r5, r0] - cmp r0, #2 - bne _022219CC - mov r0, #1 - add r1, r4, #0 - tst r1, r0 - beq _022219D4 - pop {r3, r4, r5, pc} -_022219CC: - mov r0, #1 - add r1, r4, #0 - tst r1, r0 - beq _022219D6 -_022219D4: - mov r0, #0 -_022219D6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022219D8: .word 0x0000208F - thumb_func_end ov13_022219AC - - thumb_func_start ov13_022219DC -ov13_022219DC: ; 0x022219DC - ldr r2, [r0, #0] - add r1, r2, #0 - add r1, #0x34 - ldrb r3, [r1] - cmp r3, #4 - bne _022219EC - ldrh r0, [r2, #0x24] - b _022219FA -_022219EC: - ldrb r2, [r2, #0x11] - mov r1, #0x50 - mul r1, r2 - add r1, r0, r1 - lsl r0, r3, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x34] -_022219FA: - ldr r3, _02221A00 ; =sub_0207D28C - bx r3 - nop -_02221A00: .word sub_0207D28C - thumb_func_end ov13_022219DC - - thumb_func_start ov13_02221A04 -ov13_02221A04: ; 0x02221A04 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02221A34 ; =0x00002020 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0200D3F4 - ldr r0, _02221A38 ; =0x00002070 - ldr r0, [r4, r0] - add r0, #0xa0 - bl sub_0201AD10 - ldr r0, _02221A38 ; =0x00002070 - ldr r0, [r4, r0] - add r0, #0x60 - bl sub_0201AD10 - ldr r0, _02221A38 ; =0x00002070 - ldr r0, [r4, r0] - add r0, #0x70 - bl sub_0201AD10 - pop {r4, pc} - nop -_02221A34: .word 0x00002020 -_02221A38: .word 0x00002070 - thumb_func_end ov13_02221A04 - - thumb_func_start ov13_02221A3C -ov13_02221A3C: ; 0x02221A3C - push {r4, lr} - add r4, r0, #0 - bl ov13_02221630 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #7 - bl sub_0201C3C0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02221A3C - - thumb_func_start ov13_02221A54 -ov13_02221A54: ; 0x02221A54 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r4, #0x41 - beq _02221A78 - cmp r4, #0x43 - beq _02221A78 - cmp r4, #0x42 - beq _02221A78 - bl ov16_0223E1AC - add r1, r4, #0 - mov r2, #1 - add r3, r7, #0 - bl sub_0207D60C -_02221A78: - add r0, r5, #0 - bl ov16_0223E1B0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0207DA1C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_02221A54 - - thumb_func_start ov13_02221A88 -ov13_02221A88: ; 0x02221A88 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, _02221AB8 ; =0x00002050 - ldr r4, _02221ABC ; =0x02228EA0 - mov r6, #0 - add r5, r7, r0 -_02221A94: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r7, r0] - add r1, r5, #0 - add r2, r4, #0 - bl sub_0201A8D4 - add r6, r6, #1 - add r4, #8 - add r5, #0x10 - cmp r6, #2 - blo _02221A94 - ldr r1, _02221AC0 ; =0x0000207A - add r0, r7, #0 - ldrb r1, [r7, r1] - bl ov13_02221AC4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02221AB8: .word 0x00002050 -_02221ABC: .word 0x02228EA0 -_02221AC0: .word 0x0000207A - thumb_func_end ov13_02221A88 - - thumb_func_start ov13_02221AC4 -ov13_02221AC4: ; 0x02221AC4 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - cmp r1, #9 - bhi _02221B44 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02221AD8: ; jump table - .short _02221AEC - _02221AD8 - 2 ; case 0 - .short _02221AF6 - _02221AD8 - 2 ; case 1 - .short _02221B00 - _02221AD8 - 2 ; case 2 - .short _02221B0A - _02221AD8 - 2 ; case 3 - .short _02221B14 - _02221AD8 - 2 ; case 4 - .short _02221B1E - _02221AD8 - 2 ; case 5 - .short _02221B28 - _02221AD8 - 2 ; case 6 - .short _02221B32 - _02221AD8 - 2 ; case 7 - .short _02221B28 - _02221AD8 - 2 ; case 8 - .short _02221B3C - _02221AD8 - 2 ; case 9 -_02221AEC: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #6 - ldr r6, _02221B88 ; =0x02228F54 - strb r1, [r4, r0] - b _02221B44 -_02221AF6: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #4 - ldr r6, _02221B8C ; =0x02228EDC - strb r1, [r4, r0] - b _02221B44 -_02221B00: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #0x23 - ldr r6, _02221B90 ; =0x022290FC - strb r1, [r4, r0] - b _02221B44 -_02221B0A: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #0xb - ldr r6, _02221B94 ; =0x02228FBC - strb r1, [r4, r0] - b _02221B44 -_02221B14: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #0x11 - ldr r6, _02221B98 ; =0x02229074 - strb r1, [r4, r0] - b _02221B44 -_02221B1E: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #5 - ldr r6, _02221B9C ; =0x02228EFC - strb r1, [r4, r0] - b _02221B44 -_02221B28: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #6 - ldr r6, _02221BA0 ; =0x02228F24 - strb r1, [r4, r0] - b _02221B44 -_02221B32: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #0xc - ldr r6, _02221BA4 ; =0x02229014 - strb r1, [r4, r0] - b _02221B44 -_02221B3C: - ldr r0, _02221B84 ; =0x00002074 - mov r1, #7 - ldr r6, _02221BA8 ; =0x02228F84 - strb r1, [r4, r0] -_02221B44: - ldr r1, _02221B84 ; =0x00002074 - ldr r0, [r4, #0] - ldrb r1, [r4, r1] - ldr r0, [r0, #0xc] - bl sub_0201A778 - ldr r1, _02221BAC ; =0x00002070 - mov r5, #0 - str r0, [r4, r1] - add r0, r1, #4 - ldrb r0, [r4, r0] - cmp r0, #0 - bls _02221B82 - add r7, r1, #4 -_02221B60: - ldr r1, _02221BAC ; =0x00002070 - mov r0, #0x79 - ldr r2, [r4, r1] - lsl r0, r0, #2 - lsl r1, r5, #4 - add r1, r2, r1 - lsl r2, r5, #3 - ldr r0, [r4, r0] - add r2, r6, r2 - bl sub_0201A8D4 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldrb r0, [r4, r7] - cmp r5, r0 - blo _02221B60 -_02221B82: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02221B84: .word 0x00002074 -_02221B88: .word 0x02228F54 -_02221B8C: .word 0x02228EDC -_02221B90: .word 0x022290FC -_02221B94: .word 0x02228FBC -_02221B98: .word 0x02229074 -_02221B9C: .word 0x02228EFC -_02221BA0: .word 0x02228F24 -_02221BA4: .word 0x02229014 -_02221BA8: .word 0x02228F84 -_02221BAC: .word 0x00002070 - thumb_func_end ov13_02221AC4 - - thumb_func_start ov13_02221BB0 -ov13_02221BB0: ; 0x02221BB0 - ldr r1, _02221BC0 ; =0x00002070 - add r2, r0, #0 - ldr r0, [r2, r1] - add r1, r1, #4 - ldr r3, _02221BC4 ; =sub_0201A928 - ldrb r1, [r2, r1] - bx r3 - nop -_02221BC0: .word 0x00002070 -_02221BC4: .word sub_0201A928 - thumb_func_end ov13_02221BB0 - - thumb_func_start ov13_02221BC8 -ov13_02221BC8: ; 0x02221BC8 - push {r3, r4, r5, lr} - ldr r1, _02221BF0 ; =0x00002070 - add r5, r0, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldrb r1, [r5, r1] - bl sub_0201A928 - ldr r0, _02221BF4 ; =0x00002050 - mov r4, #0 - add r5, r5, r0 -_02221BDE: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #2 - blo _02221BDE - pop {r3, r4, r5, pc} - nop -_02221BF0: .word 0x00002070 -_02221BF4: .word 0x00002050 - thumb_func_end ov13_02221BC8 - - thumb_func_start ov13_02221BF8 -ov13_02221BF8: ; 0x02221BF8 - push {r3, lr} - cmp r1, #9 - bhi _02221C52 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02221C0A: ; jump table - .short _02221C1E - _02221C0A - 2 ; case 0 - .short _02221C24 - _02221C0A - 2 ; case 1 - .short _02221C2A - _02221C0A - 2 ; case 2 - .short _02221C30 - _02221C0A - 2 ; case 3 - .short _02221C36 - _02221C0A - 2 ; case 4 - .short _02221C3C - _02221C0A - 2 ; case 5 - .short _02221C42 - _02221C0A - 2 ; case 6 - .short _02221C48 - _02221C0A - 2 ; case 7 - .short _02221C42 - _02221C0A - 2 ; case 8 - .short _02221C4E - _02221C0A - 2 ; case 9 -_02221C1E: - bl ov13_0222339C - pop {r3, pc} -_02221C24: - bl ov13_022234C8 - pop {r3, pc} -_02221C2A: - bl ov13_022237F8 - pop {r3, pc} -_02221C30: - bl ov13_022236B8 - pop {r3, pc} -_02221C36: - bl ov13_02223A10 - pop {r3, pc} -_02221C3C: - bl ov13_02223E68 - pop {r3, pc} -_02221C42: - bl ov13_02223B74 - pop {r3, pc} -_02221C48: - bl ov13_02223C9C - pop {r3, pc} -_02221C4E: - bl ov13_02223F7C -_02221C52: - pop {r3, pc} - thumb_func_end ov13_02221BF8 - - thumb_func_start ov13_02221C54 -ov13_02221C54: ; 0x02221C54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r6, r0, #0 - ldr r0, _02221DE4 ; =0x00002070 - str r3, [sp, #0x14] - ldr r5, [r6, r0] - lsl r4, r1, #4 - ldr r0, [sp, #0x14] - mov r1, #0x50 - mul r1, r0 - add r7, r6, #4 - add r0, r7, r1 - str r1, [sp, #0x24] - ldr r1, [r6, #0] - str r0, [sp, #0x20] - ldr r1, [r1, #0xc] - mov r0, #0xc - str r2, [sp, #0x10] - bl sub_02023790 - ldr r1, [sp, #0x14] - str r0, [sp, #0x1c] - ldr r0, _02221DE8 ; =0x00001FA8 - lsl r2, r1, #2 - ldr r1, _02221DEC ; =0x02228EC4 - ldr r0, [r6, r0] - ldr r1, [r1, r2] - bl sub_0200B1EC - str r0, [sp, #0x18] - ldr r0, [sp, #0x24] - ldr r0, [r7, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02221DF0 ; =0x00001FAC - mov r1, #0 - ldr r0, [r6, r0] - bl sub_0200B5CC - ldr r0, _02221DF0 ; =0x00001FAC - ldr r1, [sp, #0x1c] - ldr r0, [r6, r0] - ldr r2, [sp, #0x18] - bl sub_0200C388 - ldr r0, [sp, #0x10] - add r3, sp, #0x38 - cmp r0, #0 - bne _02221CD6 - ldrb r7, [r3, #0x14] - mov r0, #0xff - ldr r1, [sp, #0x10] - str r7, [sp] - str r0, [sp, #4] - ldr r0, _02221DF4 ; =0x000F0E00 - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldrb r3, [r3, #0x10] - add r0, r5, r4 - bl sub_0201D78C - b _02221CF2 -_02221CD6: - ldrb r7, [r3, #0x14] - mov r0, #0xff - ldr r1, [sp, #0x10] - str r7, [sp] - str r0, [sp, #4] - ldr r0, _02221DF8 ; =0x00070809 - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldrb r3, [r3, #0x10] - add r0, r5, r4 - bl sub_0201D78C -_02221CF2: - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x20] - ldrb r0, [r0, #0x16] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _02221DD8 - ldr r0, [sp, #0x20] - ldrb r0, [r0, #0x17] - lsl r1, r0, #0x18 - lsr r1, r1, #0x1f - bne _02221DD8 - lsl r0, r0, #0x1d - lsr r0, r0, #0x1d - bne _02221D76 - ldr r0, _02221DE8 ; =0x00001FA8 - mov r1, #0x10 - ldr r0, [r6, r0] - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, r4 - bl sub_0201C294 - str r0, [sp, #0x28] - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - ldr r1, [sp, #0x28] - str r7, [sp] - lsl r1, r1, #3 - sub r3, r1, r0 - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02221D5A - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02221DFC ; =0x00070800 - mov r1, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - b _02221D6E -_02221D5A: - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02221E00 ; =0x000A0B00 - mov r1, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C -_02221D6E: - add r0, r6, #0 - bl sub_020237BC - b _02221DD8 -_02221D76: - cmp r0, #1 - bne _02221DD8 - ldr r0, _02221DE8 ; =0x00001FA8 - mov r1, #0x11 - ldr r0, [r6, r0] - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, r4 - bl sub_0201C294 - str r0, [sp, #0x2c] - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - ldr r1, [sp, #0x2c] - str r7, [sp] - lsl r1, r1, #3 - sub r3, r1, r0 - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02221DBE - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0xc1 - lsl r0, r0, #0xa - str r0, [sp, #8] - mov r1, #0 - add r0, r5, r4 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - b _02221DD2 -_02221DBE: - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02221E04 ; =0x000C0D00 - mov r1, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C -_02221DD2: - add r0, r6, #0 - bl sub_020237BC -_02221DD8: - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_02221DE4: .word 0x00002070 -_02221DE8: .word 0x00001FA8 -_02221DEC: .word 0x02228EC4 -_02221DF0: .word 0x00001FAC -_02221DF4: .word 0x000F0E00 -_02221DF8: .word 0x00070809 -_02221DFC: .word 0x00070800 -_02221E00: .word 0x000A0B00 -_02221E04: .word 0x000C0D00 - thumb_func_end ov13_02221C54 - - thumb_func_start ov13_02221E08 -ov13_02221E08: ; 0x02221E08 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02221E4C ; =0x00002070 - lsl r4, r1, #4 - ldr r1, [r5, r0] - add r3, #8 - add r1, r1, r4 - str r1, [sp, #4] - str r3, [sp, #8] - add r1, sp, #0x10 - ldrb r1, [r1, #0x10] - mov r3, #0x50 - mul r3, r2 - str r1, [sp, #0xc] - add r2, r5, r3 - ldrb r2, [r2, #0x1a] - sub r0, #0xcc - ldr r0, [r5, r0] - lsl r2, r2, #0x19 - mov r1, #1 - lsr r2, r2, #0x19 - mov r3, #3 - bl sub_0200C648 - ldr r0, _02221E4C ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02221E4C: .word 0x00002070 - thumb_func_end ov13_02221E08 - - thumb_func_start ov13_02221E50 -ov13_02221E50: ; 0x02221E50 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x50 - add r7, r3, #0 - mul r0, r2 - add r3, r5, #4 - add r0, r3, r0 - str r0, [sp, #0xc] - add r0, sp, #0x18 - ldrb r6, [r0, #0x10] - ldr r0, _02221EC8 ; =0x00002070 - lsl r4, r1, #4 - ldr r1, [r5, r0] - sub r0, #0xcc - add r1, r1, r4 - str r1, [sp] - str r7, [sp, #4] - str r6, [sp, #8] - ldr r1, [sp, #0xc] - ldr r0, [r5, r0] - ldrh r1, [r1, #0x10] - mov r2, #3 - mov r3, #1 - bl sub_0200C5BC - add r3, r7, #0 - ldr r2, _02221ECC ; =0x00001FA4 - str r6, [sp] - ldr r0, [r5, r2] - add r2, #0xcc - ldr r2, [r5, r2] - mov r1, #0 - add r2, r2, r4 - add r3, #0x18 - bl sub_0200C578 - ldr r0, _02221EC8 ; =0x00002070 - add r7, #0x20 - ldr r1, [r5, r0] - sub r0, #0xcc - add r1, r1, r4 - str r1, [sp] - str r7, [sp, #4] - str r6, [sp, #8] - ldr r1, [sp, #0xc] - ldr r0, [r5, r0] - ldrh r1, [r1, #0x12] - mov r2, #3 - mov r3, #0 - bl sub_0200C5BC - ldr r0, _02221EC8 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02221EC8: .word 0x00002070 -_02221ECC: .word 0x00001FA4 - thumb_func_end ov13_02221E50 - - thumb_func_start ov13_02221ED0 -ov13_02221ED0: ; 0x02221ED0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r0, #0 - mov r0, #0x50 - str r1, [sp, #8] - mul r0, r2 - add r1, r4, #4 - str r3, [sp, #0xc] - add r5, r1, r0 - ldrh r0, [r5, #0x10] - ldrh r1, [r5, #0x12] - mov r2, #0x30 - mov r7, #1 - bl sub_0208C0BC - str r0, [sp, #0x14] - ldrh r0, [r5, #0x10] - ldrh r1, [r5, #0x12] - mov r2, #0x30 - bl sub_0208C104 - cmp r0, #4 - bhi _02221F2E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02221F0A: ; jump table - .short _02221F14 - _02221F0A - 2 ; case 0 - .short _02221F2C - _02221F0A - 2 ; case 1 - .short _02221F28 - _02221F0A - 2 ; case 2 - .short _02221F26 - _02221F0A - 2 ; case 3 - .short _02221F26 - _02221F0A - 2 ; case 4 -_02221F14: - ldr r0, _02221FA4 ; =0x00002070 - ldr r1, [r4, r0] - ldr r0, [sp, #8] - lsl r0, r0, #4 - add r0, r1, r0 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02221F26: - b _02221F2E -_02221F28: - mov r7, #3 - b _02221F2E -_02221F2C: - mov r7, #5 -_02221F2E: - add r0, sp, #0x20 - ldrb r6, [r0, #0x10] - add r0, r7, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - lsl r5, r0, #4 - ldr r0, [sp, #0x14] - add r3, r6, #1 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02221FA4 ; =0x00002070 - lsl r1, r1, #0x18 - ldr r0, [r4, r0] - lsl r3, r3, #0x10 - ldr r2, [sp, #0xc] - add r0, r0, r5 - lsr r1, r1, #0x18 - lsr r3, r3, #0x10 - bl sub_0201AE78 - ldr r0, [sp, #0x14] - add r3, r6, #2 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02221FA4 ; =0x00002070 - lsl r3, r3, #0x10 - ldr r0, [r4, r0] - ldr r2, [sp, #0xc] - add r0, r0, r5 - add r1, r7, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x10] - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02221FA4 ; =0x00002070 - add r3, r6, #4 - ldr r0, [r4, r0] - lsl r1, r1, #0x18 - lsl r3, r3, #0x10 - ldr r2, [sp, #0xc] - add r0, r0, r5 - lsr r1, r1, #0x18 - lsr r3, r3, #0x10 - bl sub_0201AE78 - ldr r0, _02221FA4 ; =0x00002070 - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02221FA4: .word 0x00002070 - thumb_func_end ov13_02221ED0 - - thumb_func_start ov13_02221FA8 -ov13_02221FA8: ; 0x02221FA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0] - mov r0, #0x10 - ldr r1, [r1, #0xc] - add r7, r2, #0 - bl sub_02023790 - add r6, r0, #0 - ldr r0, _02222020 ; =0x00001FA8 - mov r1, #8 - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r2, #0x50 - mul r2, r7 - str r0, [sp, #0x10] - ldr r0, _02222024 ; =0x00001FAC - add r2, r5, r2 - ldrh r2, [r2, #0x1c] - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200B6A0 - ldr r0, _02222024 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222028 ; =0x000F0E00 - lsl r4, r4, #4 - str r0, [sp, #8] - ldr r0, _0222202C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r2, r6, #0 - add r0, r0, r4 - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0222202C ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222020: .word 0x00001FA8 -_02222024: .word 0x00001FAC -_02222028: .word 0x000F0E00 -_0222202C: .word 0x00002070 - thumb_func_end ov13_02221FA8 - - thumb_func_start ov13_02222030 -ov13_02222030: ; 0x02222030 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0x50 - add r7, r1, #0 - add r1, r4, #4 - mul r0, r2 - add r5, r1, r0 - ldrh r0, [r5, #0x1a] - cmp r0, #0 - bne _02222054 - ldr r0, _022220BC ; =0x00001FA8 - mov r1, #0x14 - ldr r0, [r4, r0] - bl sub_0200B1EC - add r6, r0, #0 - b _0222208A -_02222054: - ldr r1, [r4, #0] - mov r0, #0x12 - ldr r1, [r1, #0xc] - bl sub_02023790 - add r6, r0, #0 - ldr r0, _022220BC ; =0x00001FA8 - mov r1, #9 - ldr r0, [r4, r0] - bl sub_0200B1EC - str r0, [sp, #0x10] - ldr r0, _022220C0 ; =0x00001FAC - ldrh r2, [r5, #0x1a] - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B70C - ldr r0, _022220C0 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r4, r0] - add r1, r6, #0 - bl sub_0200C388 - ldr r0, [sp, #0x10] - bl sub_020237BC -_0222208A: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022220C4 ; =0x000F0E00 - lsl r5, r7, #4 - str r0, [sp, #8] - ldr r0, _022220C8 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r4, r0] - add r2, r6, #0 - add r0, r0, r5 - add r3, r1, #0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _022220C8 ; =0x00002070 - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022220BC: .word 0x00001FA8 -_022220C0: .word 0x00001FAC -_022220C4: .word 0x000F0E00 -_022220C8: .word 0x00002070 - thumb_func_end ov13_02222030 - - thumb_func_start ov13_022220CC -ov13_022220CC: ; 0x022220CC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - str r1, [sp, #0x10] - ldr r1, [r5, #0] - ldr r0, _02222164 ; =0x00002070 - ldr r1, [r1, #0xc] - ldr r4, [r5, r0] - mov r0, #0x10 - str r3, [sp, #0x14] - lsl r6, r2, #4 - bl sub_02023790 - add r7, r0, #0 - ldr r0, _02222168 ; =0x00001FA8 - ldr r1, [sp, #0x14] - ldr r0, [r5, r0] - bl sub_0200B1EC - str r0, [sp, #0x18] - ldr r0, _0222216C ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200B630 - ldr r0, _0222216C ; =0x00001FAC - ldr r2, [sp, #0x18] - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_0200C388 - add r0, sp, #0x20 - ldrh r0, [r0, #0x10] - cmp r0, #2 - bne _02222130 - add r0, r4, r6 - bl sub_0201C294 - add r5, r0, #0 - add r0, sp, #0x20 - ldrh r0, [r0, #0x10] - add r1, r7, #0 - mov r2, #0 - bl sub_02002D7C - lsl r1, r5, #3 - sub r0, r1, r0 - lsr r3, r0, #1 - b _02222132 -_02222130: - mov r3, #0 -_02222132: - add r1, sp, #0x20 - ldrh r0, [r1, #0x14] - add r2, r7, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x38] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldrh r1, [r1, #0x10] - add r0, r4, r6 - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222164: .word 0x00002070 -_02222168: .word 0x00001FA8 -_0222216C: .word 0x00001FAC - thumb_func_end ov13_022220CC - - thumb_func_start ov13_02222170 -ov13_02222170: ; 0x02222170 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, _022221BC ; =0x00001FA8 - str r2, [sp, #0x10] - add r5, r1, #0 - ldr r0, [r4, r0] - add r6, r3, #0 - mov r1, #0xe - bl sub_0200B1EC - add r7, r0, #0 - str r6, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022221C0 ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, _022221C4 ; =0x00002070 - lsl r5, r5, #4 - ldr r0, [r4, r0] - ldr r3, [sp, #0x10] - add r0, r0, r5 - add r2, r7, #0 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, _022221C4 ; =0x00002070 - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_022221BC: .word 0x00001FA8 -_022221C0: .word 0x000F0E00 -_022221C4: .word 0x00002070 - thumb_func_end ov13_02222170 - - thumb_func_start ov13_022221C8 -ov13_022221C8: ; 0x022221C8 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _02222220 ; =0x00002050 - add r5, r1, #0 - mov r1, #1 - add r0, r4, r0 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - ldr r0, _02222220 ; =0x00002050 - mov r1, #0xf - add r0, r4, r0 - bl sub_0201ADA4 - ldr r0, _02222224 ; =0x00001FA8 - add r1, r5, #0 - ldr r0, [r4, r0] - bl sub_0200B1EC - add r5, r0, #0 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222228 ; =0x00010200 - mov r1, #1 - str r0, [sp, #8] - ldr r0, _02222220 ; =0x00002050 - add r2, r5, #0 - add r0, r4, r0 - str r3, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - ldr r0, _02222220 ; =0x00002050 - add r0, r4, r0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02222220: .word 0x00002050 -_02222224: .word 0x00001FA8 -_02222228: .word 0x00010200 - thumb_func_end ov13_022221C8 - - thumb_func_start ov13_0222222C -ov13_0222222C: ; 0x0222222C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r3, _02222288 ; =0x00002070 - lsl r4, r1, #4 - ldr r5, [r0, r3] - sub r3, #0xc8 - ldr r0, [r0, r3] - add r1, r2, #0 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #2 - add r1, r7, #0 - mov r2, #0 - bl sub_02002D7C - add r6, r0, #0 - add r0, r5, r4 - bl sub_0201C294 - add r3, r0, #0 - mov r0, #6 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222228C ; =0x00070809 - lsl r3, r3, #3 - str r0, [sp, #8] - mov r0, #0 - sub r3, r3, r6 - str r0, [sp, #0xc] - add r0, r5, r4 - mov r1, #2 - add r2, r7, #0 - lsr r3, r3, #1 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02222288: .word 0x00002070 -_0222228C: .word 0x00070809 - thumb_func_end ov13_0222222C - - thumb_func_start ov13_02222290 -ov13_02222290: ; 0x02222290 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - mov r0, #0x50 - mul r0, r1 - add r2, r5, #4 - add r4, r2, r0 - ldr r1, _0222244C ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r5, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldr r0, [r5, r1] - mov r1, #0x17 - bl sub_0200B1EC - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r2, _02222450 ; =0x000F0E00 - add r0, #0x31 - str r2, [sp, #8] - ldr r2, _02222454 ; =0x00002070 - str r1, [sp, #0xc] - ldr r2, [r5, r2] - add r3, r1, #0 - add r0, r2, r0 - add r2, r7, #0 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, _02222458 ; =0x00001FA8 - mov r1, #0x18 - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x18] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - str r0, [sp, #0x1c] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldrb r2, [r4, #0x16] - ldr r0, _0222245C ; =0x00001FAC - mov r3, #3 - lsl r2, r2, #0x19 - ldr r0, [r5, r0] - lsr r2, r2, #0x19 - bl sub_0200B60C - ldr r0, _0222245C ; =0x00001FAC - ldr r1, [sp, #0x1c] - ldr r0, [r5, r0] - ldr r2, [sp, #0x18] - bl sub_0200C388 - mov r1, #0 - add r0, r6, #0 - add r0, #0xb - lsl r7, r0, #4 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222450 ; =0x000F0E00 - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - ldr r0, _02222454 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r1, #0 - add r0, r0, r7 - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, _02222458 ; =0x00001FA8 - mov r1, #0x19 - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0 - str r0, [sp, #0x20] - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r2, _02222450 ; =0x000F0E00 - add r0, #0x41 - str r2, [sp, #8] - ldr r2, _02222454 ; =0x00002070 - str r1, [sp, #0xc] - ldr r2, [r5, r2] - add r3, r1, #0 - add r0, r2, r0 - ldr r2, [sp, #0x20] - bl sub_0201D78C - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, _02222458 ; =0x00001FA8 - mov r1, #0x1a - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x14] - ldr r1, [r1, #0xc] - mov r0, #0xe - bl sub_02023790 - str r0, [sp, #0x10] - ldrb r0, [r4, #0x16] - lsl r0, r0, #0x19 - lsr r0, r0, #0x19 - cmp r0, #0x64 - bhs _022223B0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222245C ; =0x00001FAC - ldr r2, [r4, #0x24] - ldr r3, [r4, #0x1c] - ldr r0, [r5, r0] - sub r2, r2, r3 - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - b _022223C4 -_022223B0: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222245C ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - mov r3, #6 - bl sub_0200B60C -_022223C4: - ldr r0, _0222245C ; =0x00001FAC - ldr r1, [sp, #0x10] - ldr r0, [r5, r0] - ldr r2, [sp, #0x14] - bl sub_0200C388 - ldr r0, _02222454 ; =0x00002070 - add r6, #0xc - ldr r0, [r5, r0] - lsl r4, r6, #4 - add r0, r0, r4 - bl sub_0201C294 - add r6, r0, #0 - mov r0, #0 - ldr r1, [sp, #0x10] - add r2, r0, #0 - bl sub_02002D7C - lsl r1, r6, #3 - sub r0, r1, r0 - lsl r0, r0, #0x10 - mov r1, #0 - lsr r3, r0, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222460 ; =0x00010200 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - ldr r0, _02222454 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, [sp, #0x10] - bl sub_020237BC - ldr r0, _02222454 ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _02222454 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r7 - bl sub_0201A9A4 - ldr r0, _02222454 ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #5 - lsl r0, r0, #6 - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _02222454 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222244C: .word 0x00002075 -_02222450: .word 0x000F0E00 -_02222454: .word 0x00002070 -_02222458: .word 0x00001FA8 -_0222245C: .word 0x00001FAC -_02222460: .word 0x00010200 - thumb_func_end ov13_02222290 - - thumb_func_start ov13_02222464 -ov13_02222464: ; 0x02222464 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - add r5, r0, #0 - ldr r1, _02222548 ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r5, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, r1] - mov r1, #0x20 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222254C ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _02222550 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r1, #0 - add r0, #0xe0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222554 ; =0x00001FA8 - mov r1, #0x21 - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x10] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - mov r2, #0x50 - add r6, r0, #0 - mul r2, r7 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222558 ; =0x00001FAC - add r2, r5, r2 - ldrh r2, [r2, #0xa] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222558 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r4, #5 - lsl r4, r0, #4 - ldr r0, _02222550 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsl r0, r0, #0x18 - mov r1, #0 - lsr r3, r0, #0x18 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222255C ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _02222550 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222550 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0xe0 - bl sub_0201A9A4 - ldr r0, _02222550 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02222548: .word 0x00002075 -_0222254C: .word 0x000F0E00 -_02222550: .word 0x00002070 -_02222554: .word 0x00001FA8 -_02222558: .word 0x00001FAC -_0222255C: .word 0x00010200 - thumb_func_end ov13_02222464 - - thumb_func_start ov13_02222560 -ov13_02222560: ; 0x02222560 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - add r5, r0, #0 - ldr r1, _02222644 ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r5, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, r1] - mov r1, #0x22 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222648 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _0222264C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r1, #0 - add r0, #0xf0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222650 ; =0x00001FA8 - mov r1, #0x23 - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x10] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - mov r2, #0x50 - add r6, r0, #0 - mul r2, r7 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222654 ; =0x00001FAC - add r2, r5, r2 - ldrh r2, [r2, #0xc] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222654 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r4, #6 - lsl r4, r0, #4 - ldr r0, _0222264C ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsl r0, r0, #0x18 - mov r1, #0 - lsr r3, r0, #0x18 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222658 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _0222264C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0222264C ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0xf0 - bl sub_0201A9A4 - ldr r0, _0222264C ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02222644: .word 0x00002075 -_02222648: .word 0x000F0E00 -_0222264C: .word 0x00002070 -_02222650: .word 0x00001FA8 -_02222654: .word 0x00001FAC -_02222658: .word 0x00010200 - thumb_func_end ov13_02222560 - - thumb_func_start ov13_0222265C -ov13_0222265C: ; 0x0222265C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - add r5, r0, #0 - ldr r1, _02222744 ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r5, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, r1] - mov r1, #0x28 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r2, #0xff - str r2, [sp, #4] - ldr r0, _02222748 ; =0x000F0E00 - add r2, r2, #1 - str r0, [sp, #8] - ldr r0, _0222274C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r1, #0 - add r0, r0, r2 - add r2, r6, #0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222750 ; =0x00001FA8 - mov r1, #0x29 - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x10] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - mov r2, #0x50 - add r6, r0, #0 - mul r2, r7 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222754 ; =0x00001FAC - add r2, r5, r2 - ldrh r2, [r2, #0xe] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222754 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r4, #7 - lsl r4, r0, #4 - ldr r0, _0222274C ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsl r0, r0, #0x18 - mov r1, #0 - lsr r3, r0, #0x18 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222758 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _0222274C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0222274C ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _0222274C ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222744: .word 0x00002075 -_02222748: .word 0x000F0E00 -_0222274C: .word 0x00002070 -_02222750: .word 0x00001FA8 -_02222754: .word 0x00001FAC -_02222758: .word 0x00010200 - thumb_func_end ov13_0222265C - - thumb_func_start ov13_0222275C -ov13_0222275C: ; 0x0222275C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - add r4, r0, #0 - ldr r1, _02222844 ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r4, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [r4, r1] - mov r1, #0x24 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r2, _02222848 ; =0x000F0E00 - add r0, #0x11 - str r2, [sp, #8] - ldr r2, _0222284C ; =0x00002070 - str r1, [sp, #0xc] - ldr r2, [r4, r2] - add r3, r1, #0 - add r0, r2, r0 - add r2, r6, #0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222850 ; =0x00001FA8 - mov r1, #0x25 - ldr r0, [r4, r0] - bl sub_0200B1EC - ldr r1, [r4, #0] - str r0, [sp, #0x10] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - mov r2, #0x50 - add r6, r0, #0 - mul r2, r7 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222854 ; =0x00001FAC - add r2, r4, r2 - ldrh r2, [r2, #0x10] - ldr r0, [r4, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222854 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r4, r0] - add r1, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, _0222284C ; =0x00002070 - add r5, #8 - ldr r0, [r4, r0] - lsl r5, r5, #4 - add r0, r0, r5 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsl r0, r0, #0x18 - mov r1, #0 - lsr r3, r0, #0x18 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222858 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _0222284C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0222284C ; =0x00002070 - ldr r1, [r4, r0] - mov r0, #0x11 - lsl r0, r0, #4 - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _0222284C ; =0x00002070 - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222844: .word 0x00002075 -_02222848: .word 0x000F0E00 -_0222284C: .word 0x00002070 -_02222850: .word 0x00001FA8 -_02222854: .word 0x00001FAC -_02222858: .word 0x00010200 - thumb_func_end ov13_0222275C - - thumb_func_start ov13_0222285C -ov13_0222285C: ; 0x0222285C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - add r4, r0, #0 - ldr r1, _02222944 ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r4, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [r4, r1] - mov r1, #0x26 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r2, _02222948 ; =0x000F0E00 - add r0, #0x21 - str r2, [sp, #8] - ldr r2, _0222294C ; =0x00002070 - str r1, [sp, #0xc] - ldr r2, [r4, r2] - add r3, r1, #0 - add r0, r2, r0 - add r2, r6, #0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222950 ; =0x00001FA8 - mov r1, #0x27 - ldr r0, [r4, r0] - bl sub_0200B1EC - ldr r1, [r4, #0] - str r0, [sp, #0x10] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - mov r2, #0x50 - add r6, r0, #0 - mul r2, r7 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222954 ; =0x00001FAC - add r2, r4, r2 - ldrh r2, [r2, #0x12] - ldr r0, [r4, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222954 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r4, r0] - add r1, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, _0222294C ; =0x00002070 - add r5, #9 - ldr r0, [r4, r0] - lsl r5, r5, #4 - add r0, r0, r5 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsl r0, r0, #0x18 - mov r1, #0 - lsr r3, r0, #0x18 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222958 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _0222294C ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0222294C ; =0x00002070 - ldr r1, [r4, r0] - mov r0, #0x12 - lsl r0, r0, #4 - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _0222294C ; =0x00002070 - ldr r0, [r4, r0] - add r0, r0, r5 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222944: .word 0x00002075 -_02222948: .word 0x000F0E00 -_0222294C: .word 0x00002070 -_02222950: .word 0x00001FA8 -_02222954: .word 0x00001FAC -_02222958: .word 0x00010200 - thumb_func_end ov13_0222285C - - thumb_func_start ov13_0222295C -ov13_0222295C: ; 0x0222295C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - mov r0, #0x50 - mul r0, r1 - add r2, r5, #4 - add r7, r2, r0 - ldr r1, _02222ADC ; =0x00002075 - mov r0, #0x16 - ldrb r2, [r5, r1] - sub r1, #0xcd - mul r0, r2 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, r1] - mov r1, #0x1c - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222AE0 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _02222AE4 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r1, #0 - add r0, #0xd0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, _02222AE8 ; =0x00001FA8 - mov r1, #0x1f - ldr r0, [r5, r0] - bl sub_0200B1EC - str r0, [sp, #0x10] - mov r0, #0 - ldr r1, [sp, #0x10] - add r2, r0, #0 - bl sub_02002D7C - str r0, [sp, #0x14] - ldr r0, _02222AE4 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201C294 - lsl r1, r0, #3 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - sub r0, r1, r0 - lsl r0, r0, #0xf - lsr r6, r0, #0x10 - add r0, r4, #4 - mov r1, #0 - lsl r4, r0, #4 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222AEC ; =0x00010200 - add r3, r6, #0 - str r0, [sp, #8] - ldr r0, _02222AE4 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - ldr r0, _02222AE8 ; =0x00001FA8 - mov r1, #0x1d - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x18] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - str r0, [sp, #0x1c] - mov r1, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222AF0 ; =0x00001FAC - ldrh r2, [r7, #0x10] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222AF0 ; =0x00001FAC - ldr r1, [sp, #0x1c] - ldr r0, [r5, r0] - ldr r2, [sp, #0x18] - bl sub_0200C388 - mov r0, #0 - ldr r1, [sp, #0x1c] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222AEC ; =0x00010200 - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - ldr r0, _02222AE4 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - sub r3, r6, r3 - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, _02222AE8 ; =0x00001FA8 - mov r1, #0x1e - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x20] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - str r0, [sp, #0x24] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222AF0 ; =0x00001FAC - ldrh r2, [r7, #0x12] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222AF0 ; =0x00001FAC - ldr r1, [sp, #0x24] - ldr r0, [r5, r0] - ldr r2, [sp, #0x20] - bl sub_0200C388 - mov r1, #0 - ldr r3, [sp, #0x14] - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222AEC ; =0x00010200 - ldr r2, [sp, #0x24] - str r0, [sp, #8] - ldr r0, _02222AE4 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r6, r3 - add r0, r0, r4 - bl sub_0201D78C - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, [sp, #0x24] - bl sub_020237BC - ldr r0, _02222AE4 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0xd0 - bl sub_0201A9A4 - ldr r0, _02222AE4 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222ADC: .word 0x00002075 -_02222AE0: .word 0x000F0E00 -_02222AE4: .word 0x00002070 -_02222AE8: .word 0x00001FA8 -_02222AEC: .word 0x00010200 -_02222AF0: .word 0x00001FAC - thumb_func_end ov13_0222295C - - thumb_func_start ov13_02222AF4 -ov13_02222AF4: ; 0x02222AF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _02222B60 ; =0x00002075 - add r6, r1, #0 - ldrb r1, [r5, r0] - ldr r3, [r5, #0] - mov r2, #0x99 - add r4, r1, #0 - mov r0, #0x16 - mul r4, r0 - ldr r3, [r3, #0xc] - mov r0, #1 - mov r1, #0x1a - lsl r2, r2, #2 - bl sub_0200B144 - mov r1, #0x50 - mul r1, r6 - add r1, r5, r1 - ldrh r1, [r1, #0x1c] - add r7, r0, #0 - bl sub_0200B1EC - add r6, r0, #0 - mov r1, #0 - add r0, r4, #2 - lsl r4, r0, #4 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222B64 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _02222B68 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r3, r1, #0 - add r0, r0, r4 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - ldr r0, _02222B68 ; =0x00002070 - ldr r0, [r5, r0] - add r0, r0, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222B60: .word 0x00002075 -_02222B64: .word 0x00010200 -_02222B68: .word 0x00002070 - thumb_func_end ov13_02222AF4 - - thumb_func_start ov13_02222B6C -ov13_02222B6C: ; 0x02222B6C - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r2, _02222BAC ; =0x00002070 - lsl r4, r1, #4 - ldr r5, [r0, r2] - sub r2, #0xc8 - ldr r0, [r0, r2] - mov r1, #0x33 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222BB0 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02222BAC: .word 0x00002070 -_02222BB0: .word 0x000F0E00 - thumb_func_end ov13_02222B6C - - thumb_func_start ov13_02222BB4 -ov13_02222BB4: ; 0x02222BB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r2, [sp, #0x10] - add r5, r0, #0 - ldr r2, _02222C90 ; =0x00002070 - ldr r0, [sp, #0x10] - lsl r6, r1, #4 - ldr r4, [r5, r2] - cmp r0, #0 - bne _02222C0E - sub r2, #0xc8 - ldr r0, [r5, r2] - mov r1, #0x32 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r4, r6 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r5 - lsl r0, r0, #0x10 - mov r1, #0 - lsr r3, r0, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222C94 ; =0x00010200 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - b _02222C84 -_02222C0E: - sub r2, #0xc8 - ldr r0, [r5, r2] - mov r1, #0x34 - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x14] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222C98 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222C98 ; =0x00001FAC - ldr r2, [sp, #0x14] - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r4, r6 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r5 - lsl r0, r0, #0x10 - mov r1, #0 - lsr r3, r0, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222C94 ; =0x00010200 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC -_02222C84: - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02222C90: .word 0x00002070 -_02222C94: .word 0x00010200 -_02222C98: .word 0x00001FAC - thumb_func_end ov13_02222BB4 - - thumb_func_start ov13_02222C9C -ov13_02222C9C: ; 0x02222C9C - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r2, _02222CDC ; =0x00002070 - lsl r4, r1, #4 - ldr r5, [r0, r2] - sub r2, #0xc8 - ldr r0, [r0, r2] - mov r1, #0x30 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222CE0 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02222CDC: .word 0x00002070 -_02222CE0: .word 0x000F0E00 - thumb_func_end ov13_02222C9C - - thumb_func_start ov13_02222CE4 -ov13_02222CE4: ; 0x02222CE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r2, [sp, #0x10] - add r5, r0, #0 - ldr r2, _02222DC0 ; =0x00002070 - ldr r0, [sp, #0x10] - lsl r6, r1, #4 - ldr r4, [r5, r2] - cmp r0, #1 - bhi _02222D3E - sub r2, #0xc8 - ldr r0, [r5, r2] - mov r1, #0x32 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r4, r6 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r5 - lsl r0, r0, #0x10 - mov r1, #0 - lsr r3, r0, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222DC4 ; =0x00010200 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - b _02222DB4 -_02222D3E: - sub r2, #0xc8 - ldr r0, [r5, r2] - mov r1, #0x31 - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x14] - ldr r1, [r1, #0xc] - mov r0, #8 - bl sub_02023790 - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02222DC8 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _02222DC8 ; =0x00001FAC - ldr r2, [sp, #0x14] - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r4, r6 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r5 - lsl r0, r0, #0x10 - mov r1, #0 - lsr r3, r0, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222DC4 ; =0x00010200 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC -_02222DB4: - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02222DC0: .word 0x00002070 -_02222DC4: .word 0x00010200 -_02222DC8: .word 0x00001FAC - thumb_func_end ov13_02222CE4 - - thumb_func_start ov13_02222DCC -ov13_02222DCC: ; 0x02222DCC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r3, r0, #0 - ldr r0, _02222E20 ; =0x00002070 - add r6, r2, #0 - ldr r5, [r3, r0] - ldr r3, [r3, #0] - lsl r4, r1, #4 - ldr r2, _02222E24 ; =0x00000286 - ldr r3, [r3, #0xc] - mov r0, #1 - mov r1, #0x1a - bl sub_0200B144 - add r1, r6, #0 - add r7, r0, #0 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222E28 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222E20: .word 0x00002070 -_02222E24: .word 0x00000286 -_02222E28: .word 0x00010200 - thumb_func_end ov13_02222DCC - - thumb_func_start ov13_02222E2C -ov13_02222E2C: ; 0x02222E2C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldr r0, _02222E8C ; =0x00002070 - lsl r4, r1, #4 - ldr r5, [r6, r0] - add r0, r2, #0 - mov r1, #0xa - bl sub_020790C4 - bl sub_0209577C - ldr r3, [r6, #0] - add r7, r0, #0 - ldr r3, [r3, #0xc] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xd2 - bl sub_0200B144 - add r1, r7, #0 - str r0, [sp, #0x10] - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222E90 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x10] - bl sub_0200B190 - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222E8C: .word 0x00002070 -_02222E90: .word 0x00010200 - thumb_func_end ov13_02222E2C - - thumb_func_start ov13_02222E94 -ov13_02222E94: ; 0x02222E94 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r2, _02222EF0 ; =0x00002070 - lsl r4, r1, #4 - ldr r5, [r0, r2] - sub r2, #0xc8 - ldr r0, [r0, r2] - mov r1, #0x35 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r5, r4 - bl sub_0201C294 - lsl r0, r0, #3 - sub r1, r0, r6 - lsr r0, r1, #0x1f - add r0, r1, r0 - lsl r0, r0, #0xf - mov r1, #0 - lsr r3, r0, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222EF4 ; =0x000F0E00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r5, r4 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02222EF0: .word 0x00002070 -_02222EF4: .word 0x000F0E00 - thumb_func_end ov13_02222E94 - - thumb_func_start ov13_02222EF8 -ov13_02222EF8: ; 0x02222EF8 - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r3, _02222F6C ; =0x00002070 - lsl r4, r1, #4 - ldr r5, [r0, r3] - cmp r2, #0 - beq _02222F10 - cmp r2, #1 - beq _02222F1E - cmp r2, #2 - beq _02222F2C - b _02222F38 -_02222F10: - sub r3, #0xc8 - ldr r0, [r0, r3] - mov r1, #0x36 - bl sub_0200B1EC - add r6, r0, #0 - b _02222F38 -_02222F1E: - sub r3, #0xc8 - ldr r0, [r0, r3] - mov r1, #0x38 - bl sub_0200B1EC - add r6, r0, #0 - b _02222F38 -_02222F2C: - sub r3, #0xc8 - ldr r0, [r0, r3] - mov r1, #0x37 - bl sub_0200B1EC - add r6, r0, #0 -_02222F38: - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - mov r3, #0x38 - bl sub_02002EEC - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02222F70 ; =0x00010200 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02222F6C: .word 0x00002070 -_02222F70: .word 0x00010200 - thumb_func_end ov13_02222EF8 - - thumb_func_start ov13_02222F74 -ov13_02222F74: ; 0x02222F74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, _02223098 ; =0x00002070 - lsl r6, r1, #4 - ldr r4, [r5, r0] - sub r0, #0xc8 - ldr r0, [r5, r0] - mov r1, #0x2e - str r2, [sp, #0x10] - str r3, [sp, #0x14] - bl sub_0200B1EC - str r0, [sp, #0x18] - mov r0, #0 - ldr r1, [sp, #0x18] - add r2, r0, #0 - bl sub_02002D7C - str r0, [sp, #0x1c] - add r0, r4, r6 - bl sub_0201C294 - lsl r1, r0, #3 - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x18] - sub r0, r1, r0 - lsr r7, r0, #1 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222309C ; =0x000F0E00 - add r3, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, _022230A0 ; =0x00001FA8 - mov r1, #0x2c - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x20] - ldr r1, [r1, #0xc] - mov r0, #6 - bl sub_02023790 - mov r1, #0 - str r0, [sp, #0x24] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022230A4 ; =0x00001FAC - ldr r2, [sp, #0x10] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _022230A4 ; =0x00001FAC - ldr r1, [sp, #0x24] - ldr r0, [r5, r0] - ldr r2, [sp, #0x20] - bl sub_0200C388 - mov r0, #0 - ldr r1, [sp, #0x24] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222309C ; =0x000F0E00 - ldr r2, [sp, #0x24] - str r0, [sp, #8] - add r0, r4, r6 - sub r3, r7, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, [sp, #0x24] - bl sub_020237BC - ldr r0, _022230A0 ; =0x00001FA8 - mov r1, #0x2d - ldr r0, [r5, r0] - bl sub_0200B1EC - ldr r1, [r5, #0] - str r0, [sp, #0x28] - ldr r1, [r1, #0xc] - mov r0, #6 - bl sub_02023790 - mov r1, #0 - str r0, [sp, #0x2c] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022230A4 ; =0x00001FAC - ldr r2, [sp, #0x14] - ldr r0, [r5, r0] - mov r3, #3 - bl sub_0200B60C - ldr r0, _022230A4 ; =0x00001FAC - ldr r1, [sp, #0x2c] - ldr r0, [r5, r0] - ldr r2, [sp, #0x28] - bl sub_0200C388 - mov r1, #0 - ldr r3, [sp, #0x1c] - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222309C ; =0x000F0E00 - ldr r2, [sp, #0x2c] - str r0, [sp, #8] - add r0, r4, r6 - add r3, r7, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x2c] - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02223098: .word 0x00002070 -_0222309C: .word 0x000F0E00 -_022230A0: .word 0x00001FA8 -_022230A4: .word 0x00001FAC - thumb_func_end ov13_02222F74 - - thumb_func_start ov13_022230A8 -ov13_022230A8: ; 0x022230A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - lsl r4, r1, #4 - ldr r1, [r0, #0] - ldr r2, _02223110 ; =0x00002070 - add r1, #0x34 - ldrb r1, [r1] - ldr r5, [r0, r2] - cmp r1, #4 - bne _022230C8 - sub r2, #0xc8 - ldr r0, [r0, r2] - mov r1, #0x3b - bl sub_0200B1EC - b _022230D2 -_022230C8: - sub r2, #0xc8 - ldr r0, [r0, r2] - mov r1, #0x3a - bl sub_0200B1EC -_022230D2: - add r6, r0, #0 - mov r0, #2 - add r1, r6, #0 - mov r2, #0 - bl sub_02002D7C - add r7, r0, #0 - mov r0, #6 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02223114 ; =0x00070809 - mov r3, #0x60 - str r0, [sp, #8] - mov r0, #0 - sub r3, r3, r7 - str r0, [sp, #0xc] - add r0, r5, r4 - mov r1, #2 - add r2, r6, #0 - lsr r3, r3, #1 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02223110: .word 0x00002070 -_02223114: .word 0x00070809 - thumb_func_end ov13_022230A8 - - thumb_func_start ov13_02223118 -ov13_02223118: ; 0x02223118 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _02223170 ; =0x0000207A - ldrb r1, [r4, r0] - cmp r1, #7 - bne _0222312E - sub r0, #0xa - ldr r5, [r4, r0] - add r5, #0x80 - b _02223134 -_0222312E: - sub r0, #0xa - ldr r5, [r4, r0] - add r5, #0x50 -_02223134: - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223174 ; =0x00001FA8 - mov r1, #0x3c - ldr r0, [r4, r0] - bl sub_0200B1EC - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02223178 ; =0x00010200 - add r2, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02223170: .word 0x0000207A -_02223174: .word 0x00001FA8 -_02223178: .word 0x00010200 - thumb_func_end ov13_02223118 - - thumb_func_start ov13_0222317C -ov13_0222317C: ; 0x0222317C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - str r1, [sp, #0x10] - ldr r1, [r5, #0] - ldr r0, _022232B8 ; =0x00002070 - ldr r1, [r1, #0xc] - ldr r4, [r5, r0] - mov r0, #6 - lsl r6, r2, #4 - bl sub_02023790 - add r7, r0, #0 - ldr r0, _022232BC ; =0x00001FA8 - mov r1, #0x2b - ldr r0, [r5, r0] - bl sub_0200B1EC - str r0, [sp, #0x14] - mov r0, #0x18 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022232C0 ; =0x000F0E00 - ldr r2, [sp, #0x14] - str r0, [sp, #8] - mov r1, #0 - add r0, r4, r6 - mov r3, #0x28 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, _022232BC ; =0x00001FA8 - mov r1, #0x2e - ldr r0, [r5, r0] - bl sub_0200B1EC - str r0, [sp, #0x18] - mov r0, #0 - ldr r1, [sp, #0x18] - add r2, r0, #0 - bl sub_02002D7C - str r0, [sp, #0x1c] - mov r0, #0x18 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022232C0 ; =0x000F0E00 - ldr r2, [sp, #0x18] - str r0, [sp, #8] - mov r1, #0 - add r0, r4, r6 - mov r3, #0x50 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, _022232BC ; =0x00001FA8 - mov r1, #0x2d - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0 - str r0, [sp, #0x20] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - ldr r0, _022232C4 ; =0x00001FAC - ldrb r2, [r2, #3] - ldr r0, [r5, r0] - mov r3, #2 - bl sub_0200B60C - ldr r0, _022232C4 ; =0x00001FAC - ldr r2, [sp, #0x20] - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_0200C388 - mov r0, #0x18 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022232C0 ; =0x000F0E00 - ldr r3, [sp, #0x1c] - str r0, [sp, #8] - mov r1, #0 - add r3, #0x50 - add r0, r4, r6 - add r2, r7, #0 - str r1, [sp, #0xc] - str r3, [sp, #0x1c] - bl sub_0201D78C - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, _022232BC ; =0x00001FA8 - mov r1, #0x2c - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0 - str r0, [sp, #0x24] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - ldr r0, _022232C4 ; =0x00001FAC - ldrb r2, [r2, #2] - ldr r0, [r5, r0] - mov r3, #2 - bl sub_0200B60C - ldr r0, _022232C4 ; =0x00001FAC - ldr r2, [sp, #0x24] - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - add r5, r0, #0 - mov r0, #0x18 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022232C0 ; =0x000F0E00 - mov r3, #0x50 - str r0, [sp, #8] - mov r1, #0 - add r0, r4, r6 - add r2, r7, #0 - sub r3, r3, r5 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x24] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022232B8: .word 0x00002070 -_022232BC: .word 0x00001FA8 -_022232C0: .word 0x000F0E00 -_022232C4: .word 0x00001FAC - thumb_func_end ov13_0222317C - - thumb_func_start ov13_022232C8 -ov13_022232C8: ; 0x022232C8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - str r1, [sp, #0x10] - ldr r1, [r5, #0] - ldr r0, _0222338C ; =0x00002070 - ldr r1, [r1, #0xc] - ldr r4, [r5, r0] - mov r0, #6 - lsl r6, r2, #4 - bl sub_02023790 - str r0, [sp, #0x14] - ldr r0, _02223390 ; =0x00001FA8 - mov r1, #0x2b - ldr r0, [r5, r0] - bl sub_0200B1EC - str r0, [sp, #0x18] - mov r0, #0 - ldr r1, [sp, #0x18] - add r2, r0, #0 - bl sub_02002D7C - add r7, r0, #0 - ldr r0, [sp, #0x18] - bl sub_020237BC - add r7, #0x28 - mov r0, #0x50 - sub r0, r0, r7 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - mov r0, #0x10 - lsl r2, r7, #0x10 - str r0, [sp, #4] - add r0, r4, r6 - mov r1, #0 - lsr r2, r2, #0x10 - mov r3, #0x18 - bl sub_0201AE78 - ldr r0, _02223390 ; =0x00001FA8 - mov r1, #0x2c - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - ldr r0, _02223394 ; =0x00001FAC - ldrb r2, [r2, #2] - ldr r0, [r5, r0] - mov r3, #2 - bl sub_0200B60C - ldr r0, _02223394 ; =0x00001FAC - ldr r1, [sp, #0x14] - ldr r0, [r5, r0] - add r2, r7, #0 - bl sub_0200C388 - mov r0, #0 - ldr r1, [sp, #0x14] - add r2, r0, #0 - bl sub_02002D7C - add r5, r0, #0 - mov r0, #0x18 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02223398 ; =0x000F0E00 - mov r3, #0x50 - str r0, [sp, #8] - mov r1, #0 - ldr r2, [sp, #0x14] - add r0, r4, r6 - sub r3, r3, r5 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0222338C: .word 0x00002070 -_02223390: .word 0x00001FA8 -_02223394: .word 0x00001FAC -_02223398: .word 0x000F0E00 - thumb_func_end ov13_022232C8 - - thumb_func_start ov13_0222339C -ov13_0222339C: ; 0x0222339C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0] - mov r4, #0 - ldr r0, [r0, #0] - bl sub_0207A0F8 - cmp r0, #0 - ble _02223422 - add r0, r4, #0 - add r7, r5, #0 - str r0, [sp, #8] - add r6, r5, #0 - add r7, #0x1b -_022233BA: - ldr r0, _02223444 ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #8] - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldrh r0, [r6, #8] - cmp r0, #0 - beq _0222340A - mov r0, #0x20 - str r0, [sp] - mov r0, #8 - lsl r3, r4, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - lsr r3, r3, #0x10 - bl ov13_02221C54 - ldrb r0, [r7] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _022233F6 - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov13_02223448 -_022233F6: - ldr r0, [r6, #4] - bl sub_0208E9F0 - cmp r0, #7 - bne _0222340A - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov13_022234A8 -_0222340A: - ldr r0, [sp, #8] - add r6, #0x50 - add r0, #0x10 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r7, #0x50 - ldr r0, [r0, #0] - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _022233BA -_02223422: - ldr r0, [r5, #0] - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #2 - bne _02223438 - add r0, r5, #0 - mov r1, #7 - bl ov13_022221C8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_02223438: - add r0, r5, #0 - mov r1, #6 - bl ov13_022221C8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02223444: .word 0x00002070 - thumb_func_end ov13_0222339C - - thumb_func_start ov13_02223448 -ov13_02223448: ; 0x02223448 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x18 - str r0, [sp] - mov r0, #8 - add r6, r1, #0 - str r0, [sp, #4] - ldr r0, _022234A4 ; =0x00002070 - lsl r4, r6, #4 - ldr r0, [r5, r0] - mov r1, #0 - add r0, r0, r4 - mov r2, #0x38 - mov r3, #0x20 - bl sub_0201AE78 - mov r2, #0x40 - str r2, [sp] - mov r0, #8 - str r0, [sp, #4] - ldr r0, _022234A4 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - mov r3, #0x18 - add r0, r0, r4 - bl sub_0201AE78 - mov r0, #0x20 - str r0, [sp] - add r0, r5, #0 - add r1, r6, #0 - add r2, r6, #0 - mov r3, #0x38 - bl ov13_02221E50 - mov r0, #0x18 - str r0, [sp] - add r0, r5, #0 - add r1, r6, #0 - add r2, r6, #0 - mov r3, #0x40 - bl ov13_02221ED0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022234A4: .word 0x00002070 - thumb_func_end ov13_02223448 - - thumb_func_start ov13_022234A8 -ov13_022234A8: ; 0x022234A8 - push {r3, lr} - mov r2, #0x50 - mul r2, r1 - add r2, r0, r2 - ldrb r2, [r2, #0x1b] - lsl r2, r2, #0x18 - lsr r2, r2, #0x1f - bne _022234C4 - mov r2, #0x20 - str r2, [sp] - add r2, r1, #0 - mov r3, #0 - bl ov13_02221E08 -_022234C4: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov13_022234A8 - - thumb_func_start ov13_022234C8 -ov13_022234C8: ; 0x022234C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0222354C ; =0x00002070 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0201ADA4 - ldr r0, _0222354C ; =0x00002070 - mov r1, #0 - ldr r0, [r4, r0] - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, _0222354C ; =0x00002070 - mov r1, #0 - ldr r0, [r4, r0] - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, _0222354C ; =0x00002070 - mov r1, #0 - ldr r0, [r4, r0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r1, [r4, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - bl ov13_02223550 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf - bl ov13_0222222C - ldr r0, [r4, #0] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r0, r4, r0 - ldrb r0, [r0, #0x1b] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _02223536 - add r0, r4, #0 - mov r1, #2 - mov r2, #0x12 - bl ov13_0222222C - add r0, r4, #0 - mov r1, #3 - mov r2, #0x13 - bl ov13_0222222C - pop {r4, pc} -_02223536: - ldr r0, _0222354C ; =0x00002070 - ldr r0, [r4, r0] - add r0, #0x20 - bl sub_0201A9A4 - ldr r0, _0222354C ; =0x00002070 - ldr r0, [r4, r0] - add r0, #0x30 - bl sub_0201A9A4 - pop {r4, pc} - ; .align 2, 0 -_0222354C: .word 0x00002070 - thumb_func_end ov13_022234C8 - - thumb_func_start ov13_02223550 -ov13_02223550: ; 0x02223550 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, _0222369C ; =0x00002070 - add r6, r1, #0 - ldr r0, [r4, r0] - ldr r1, [r4, #0] - str r0, [sp, #0x18] - mov r0, #0x50 - add r7, r6, #0 - add r5, r4, #4 - mul r7, r0 - add r0, r5, r7 - str r0, [sp, #0x14] - ldr r1, [r1, #0xc] - mov r0, #0xc - bl sub_02023790 - str r0, [sp, #0x10] - ldr r0, _022236A0 ; =0x00001FA8 - ldr r1, _022236A4 ; =0x02228EC4 - lsl r2, r6, #2 - ldr r0, [r4, r0] - ldr r1, [r1, r2] - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, [r5, r7] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _022236A8 ; =0x00001FAC - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0200B5CC - ldr r0, _022236A8 ; =0x00001FAC - ldr r1, [sp, #0x10] - ldr r0, [r4, r0] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - mov r5, #0 - ldrb r0, [r0, #0x16] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _022235E4 - ldr r0, [sp, #0x14] - ldrb r0, [r0, #0x17] - lsl r1, r0, #0x18 - lsr r1, r1, #0x1f - bne _022235E4 - lsl r0, r0, #0x1d - lsr r0, r0, #0x1d - bne _022235D4 - ldr r0, _022236A0 ; =0x00001FA8 - mov r1, #0x10 - ldr r0, [r4, r0] - bl sub_0200B1EC - add r5, r0, #0 - b _022235E4 -_022235D4: - cmp r0, #1 - bne _022235E4 - ldr r0, _022236A0 ; =0x00001FA8 - mov r1, #0x11 - ldr r0, [r4, r0] - bl sub_0200B1EC - add r5, r0, #0 -_022235E4: - ldr r1, [sp, #0x10] - mov r0, #2 - mov r2, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r5, #0 - bne _022235FC - mov r7, #0 - add r4, r7, #0 - b _0222360C -_022235FC: - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - mov r4, #8 -_0222360C: - ldr r0, [sp, #0x18] - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r6 - sub r0, r0, r7 - sub r1, r0, r4 - lsr r0, r1, #0x1f - add r0, r1, r0 - lsl r0, r0, #0x17 - lsr r7, r0, #0x18 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022236AC ; =0x00070809 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - mov r1, #2 - add r3, r7, #0 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - cmp r5, #0 - beq _02223692 - ldr r0, [sp, #0x14] - ldrb r0, [r0, #0x17] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1d - bne _02223670 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022236B0 ; =0x000A0B00 - add r3, r7, r6 - str r0, [sp, #8] - mov r1, #0 - ldr r0, [sp, #0x18] - add r2, r5, #0 - add r3, r4, r3 - str r1, [sp, #0xc] - bl sub_0201D78C - b _0222368C -_02223670: - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022236B4 ; =0x000C0D00 - add r3, r7, r6 - str r0, [sp, #8] - mov r1, #0 - ldr r0, [sp, #0x18] - add r2, r5, #0 - add r3, r4, r3 - str r1, [sp, #0xc] - bl sub_0201D78C -_0222368C: - add r0, r5, #0 - bl sub_020237BC -_02223692: - ldr r0, [sp, #0x18] - bl sub_0201A9A4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222369C: .word 0x00002070 -_022236A0: .word 0x00001FA8 -_022236A4: .word 0x02228EC4 -_022236A8: .word 0x00001FAC -_022236AC: .word 0x00070809 -_022236B0: .word 0x000A0B00 -_022236B4: .word 0x000C0D00 - thumb_func_end ov13_02223550 - - thumb_func_start ov13_022236B8 -ov13_022236B8: ; 0x022236B8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - ldr r0, _022237E8 ; =0x00002075 - mov r1, #6 - ldrb r2, [r5, r0] - sub r0, r0, #5 - mul r1, r2 - lsl r1, r1, #0x10 - lsr r6, r1, #0x10 - ldr r1, [r5, r0] - lsl r0, r6, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r6, #1 - lsl r0, r0, #4 - str r0, [sp, #0x18] - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0x18] - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r6, #2 - lsl r0, r0, #4 - str r0, [sp, #0x14] - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0x14] - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r6, #3 - lsl r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0x10] - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r6, #4 - lsl r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0xc] - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _022237EC ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x50 - bl sub_0201ADA4 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r3, [r5, #0] - add r0, r5, #0 - ldrb r3, [r3, #0x11] - add r1, r6, #0 - bl ov13_02221C54 - add r0, r5, #0 - str r0, [sp, #0x1c] - add r0, #0x34 - mov r4, #0 - add r7, r6, #1 - str r0, [sp, #0x1c] -_02223752: - ldr r0, [r5, #0] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x1c] - lsl r1, r4, #3 - add r0, r0, r2 - str r1, [sp, #0x20] - ldrh r1, [r0, r1] - str r0, [sp, #0x24] - cmp r1, #0 - beq _02223794 - mov r0, #2 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - ldr r0, _022237F0 ; =0x00070809 - ldr r3, _022237F4 ; =0x02228EB0 - lsl r6, r4, #2 - str r0, [sp, #8] - ldr r3, [r3, r6] - add r0, r5, #0 - add r2, r7, r4 - bl ov13_022220CC - ldr r2, [sp, #0x20] - ldr r1, [sp, #0x24] - add r0, r5, #0 - add r1, r1, r2 - add r2, r7, r4 - bl ov13_0222317C -_02223794: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #4 - blo _02223752 - add r0, r5, #0 - mov r1, #5 - mov r2, #0x12 - bl ov13_0222222C - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0x18] - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0x14] - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0x10] - add r0, r1, r0 - bl sub_0201A9A4 - ldr r0, _022237EC ; =0x00002070 - ldr r1, [r5, r0] - ldr r0, [sp, #0xc] - add r0, r1, r0 - bl sub_0201A9A4 - ldr r1, _022237E8 ; =0x00002075 - mov r0, #1 - ldrb r2, [r5, r1] - eor r0, r2 - strb r0, [r5, r1] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_022237E8: .word 0x00002075 -_022237EC: .word 0x00002070 -_022237F0: .word 0x00070809 -_022237F4: .word 0x02228EB0 - thumb_func_end ov13_022236B8 - - thumb_func_start ov13_022237F8 -ov13_022237F8: ; 0x022237F8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _02223A08 ; =0x00002075 - mov r1, #0x16 - ldrb r2, [r5, r0] - sub r0, r0, #5 - add r4, r2, #0 - mul r4, r1 - ldr r1, [r5, r0] - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #5 - lsl r0, r0, #6 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0xe0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0xf0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #0x11 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #0x12 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0xd0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - lsl r0, r4, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #0 - add r0, #0xa - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #0 - add r0, #0xb - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #0 - add r0, #0xc - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #5 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #6 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #7 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #0 - add r0, #8 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #0 - add r0, #9 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #4 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #1 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #2 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223A0C ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #3 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r3, [r5, #0] - add r0, r5, #0 - ldrb r3, [r3, #0x11] - add r1, r4, #0 - bl ov13_02221C54 - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_0222295C - mov r3, #0 - str r3, [sp] - ldr r2, [r5, #0] - add r1, r4, #0 - ldrb r2, [r2, #0x11] - add r0, r5, #0 - add r1, #0xa - bl ov13_02221ED0 - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_02222290 - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_02222464 - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_02222560 - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_0222265C - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_0222275C - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_0222285C - ldr r2, [r5, #0] - add r0, r5, #0 - ldrb r2, [r2, #0x11] - add r1, r4, #1 - bl ov13_02221FA8 - ldr r2, [r5, #0] - add r0, r5, #0 - ldrb r2, [r2, #0x11] - add r1, r4, #3 - bl ov13_02222030 - ldr r1, [r5, #0] - add r0, r5, #0 - ldrb r1, [r1, #0x11] - bl ov13_02222AF4 - add r0, r5, #0 - mov r1, #0x15 - mov r2, #0x13 - bl ov13_0222222C - ldr r1, _02223A08 ; =0x00002075 - mov r0, #1 - ldrb r2, [r5, r1] - eor r0, r2 - strb r0, [r5, r1] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02223A08: .word 0x00002075 -_02223A0C: .word 0x00002070 - thumb_func_end ov13_022237F8 - - thumb_func_start ov13_02223A10 -ov13_02223A10: ; 0x02223A10 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _02223B64 ; =0x00002075 - mov r1, #0xb - ldrb r2, [r5, r0] - sub r0, r0, #5 - ldr r0, [r5, r0] - add r4, r2, #0 - mul r4, r1 - add r0, #0x60 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x70 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x80 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x90 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0xa0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #1 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - ldr r1, [r5, r0] - lsl r0, r4, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #2 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #3 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #5 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02223B68 ; =0x00002070 - ldr r1, [r5, r0] - add r0, r4, #4 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0] - add r2, r5, #0 - ldrb r3, [r0, #0x11] - add r0, #0x34 - ldrb r0, [r0] - mov r1, #0x50 - add r2, #0x34 - mul r1, r3 - add r1, r2, r1 - lsl r0, r0, #3 - add r7, r1, r0 - mov r2, #0 - str r2, [sp] - add r0, r5, #0 - mov r1, #6 - str r2, [sp, #4] - bl ov13_02221C54 - mov r2, #0 - add r0, r5, #0 - mov r1, #7 - add r3, r2, #0 - bl ov13_02222170 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02223B6C ; =0x000F0E00 - add r2, r4, #0 - str r0, [sp, #8] - ldr r3, [r5, #0] - ldrh r1, [r7] - add r3, #0x34 - ldrb r3, [r3] - add r0, r5, #0 - lsl r6, r3, #2 - ldr r3, _02223B70 ; =0x02228EB0 - ldr r3, [r3, r6] - bl ov13_022220CC - add r0, r5, #0 - mov r1, #8 - bl ov13_02222B6C - ldrb r2, [r7, #6] - add r0, r5, #0 - add r1, r4, #2 - bl ov13_02222BB4 - add r0, r5, #0 - mov r1, #9 - bl ov13_02222C9C - ldrb r2, [r7, #7] - add r0, r5, #0 - add r1, r4, #3 - bl ov13_02222CE4 - ldrh r2, [r7] - add r0, r5, #0 - add r1, r4, #4 - bl ov13_02222DCC - add r0, r5, #0 - mov r1, #0xa - bl ov13_02222E94 - ldrb r2, [r7, #5] - add r0, r5, #0 - add r1, r4, #5 - bl ov13_02222EF8 - ldrb r2, [r7, #2] - ldrb r3, [r7, #3] - add r0, r5, #0 - add r1, r4, #1 - bl ov13_02222F74 - ldr r1, _02223B64 ; =0x00002075 - mov r0, #1 - ldrb r2, [r5, r1] - eor r0, r2 - strb r0, [r5, r1] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02223B64: .word 0x00002075 -_02223B68: .word 0x00002070 -_02223B6C: .word 0x000F0E00 -_02223B70: .word 0x02228EB0 - thumb_func_end ov13_02223A10 - - thumb_func_start ov13_02223B74 -ov13_02223B74: ; 0x02223B74 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, _02223C90 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0201ADA4 - ldr r0, _02223C90 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, _02223C90 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, _02223C90 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _02223C90 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201ADA4 - ldr r0, _02223C90 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x50 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - ldr r3, [r5, #0] - add r0, r5, #0 - ldrb r3, [r3, #0x11] - add r2, r1, #0 - bl ov13_02221C54 - add r0, r5, #0 - mov r6, #0 - str r0, [sp, #0x10] - add r0, #0x34 - ldr r7, _02223C94 ; =0x02228EB0 - add r4, r6, #0 - str r0, [sp, #0x10] -_02223BE0: - ldr r0, [r5, #0] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x10] - add r0, r0, r2 - ldrh r1, [r0, r4] - str r0, [sp, #0xc] - cmp r1, #0 - beq _02223C18 - mov r0, #2 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - ldr r0, _02223C98 ; =0x00070809 - add r2, r6, #1 - str r0, [sp, #8] - ldr r3, [r7, #0] - add r0, r5, #0 - bl ov13_022220CC - ldr r1, [sp, #0xc] - add r0, r5, #0 - add r1, r1, r4 - add r2, r6, #1 - bl ov13_0222317C -_02223C18: - add r6, r6, #1 - add r4, #8 - add r7, r7, #4 - cmp r6, #4 - blo _02223BE0 - mov r0, #2 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - ldr r0, _02223C98 ; =0x00070809 - mov r2, #5 - str r0, [sp, #8] - ldr r1, [r5, #0] - add r0, r5, #0 - ldrh r1, [r1, #0x24] - mov r3, #0x49 - bl ov13_022220CC - ldr r0, [r5, #0] - mov r1, #5 - ldrh r0, [r0, #0x24] - bl sub_020790C4 - add r1, sp, #0x14 - strb r0, [r1, #2] - ldrb r0, [r1, #2] - mov r2, #5 - strb r0, [r1, #3] - add r0, r5, #0 - add r1, sp, #0x14 - bl ov13_0222317C - ldr r0, _02223C90 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x10 - bl sub_0201A9A4 - ldr r0, _02223C90 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x20 - bl sub_0201A9A4 - ldr r0, _02223C90 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x30 - bl sub_0201A9A4 - ldr r0, _02223C90 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201A9A4 - ldr r0, _02223C90 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x50 - bl sub_0201A9A4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02223C90: .word 0x00002070 -_02223C94: .word 0x02228EB0 -_02223C98: .word 0x00070809 - thumb_func_end ov13_02223B74 - - thumb_func_start ov13_02223C9C -ov13_02223C9C: ; 0x02223C9C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x60 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x50 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x70 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x90 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0xa0 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x80 - bl sub_0201ADA4 - ldr r0, _02223E5C ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0xb0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - ldr r3, [r5, #0] - add r0, r5, #0 - ldrb r3, [r3, #0x11] - add r2, r1, #0 - bl ov13_02221C54 - mov r2, #0 - add r0, r5, #0 - mov r1, #2 - add r3, r2, #0 - bl ov13_02222170 - add r0, r5, #0 - mov r1, #4 - bl ov13_02222B6C - add r0, r5, #0 - mov r1, #5 - bl ov13_02222C9C - add r0, r5, #0 - mov r1, #9 - bl ov13_02222E94 - ldr r1, [r5, #0] - add r0, r1, #0 - add r0, #0x34 - ldrb r3, [r0] - cmp r3, #4 - bhs _02223DD8 - ldrb r1, [r1, #0x11] - add r2, r5, #0 - mov r0, #0x50 - add r2, #0x34 - mul r0, r1 - add r7, r2, r0 - lsl r0, r3, #3 - str r0, [sp, #0xc] - add r4, r7, r0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02223E60 ; =0x000F0E00 - lsl r6, r3, #2 - str r0, [sp, #8] - ldr r1, [sp, #0xc] - ldr r3, _02223E64 ; =0x02228EB0 - ldrh r1, [r7, r1] - ldr r3, [r3, r6] - add r0, r5, #0 - mov r2, #1 - bl ov13_022220CC - ldrb r2, [r4, #6] - add r0, r5, #0 - mov r1, #6 - bl ov13_02222BB4 - ldrb r2, [r4, #7] - add r0, r5, #0 - mov r1, #7 - bl ov13_02222CE4 - ldr r2, [sp, #0xc] - add r0, r5, #0 - ldrh r2, [r7, r2] - mov r1, #8 - bl ov13_02222DCC - ldrb r2, [r4, #5] - add r0, r5, #0 - mov r1, #0xa - bl ov13_02222EF8 - ldrb r2, [r4, #2] - ldrb r3, [r4, #3] - add r0, r5, #0 - mov r1, #3 - bl ov13_02222F74 - b _02223E4E -_02223DD8: - ldrh r0, [r1, #0x24] - mov r1, #5 - bl sub_020790C4 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02223E60 ; =0x000F0E00 - mov r2, #1 - str r0, [sp, #8] - ldr r1, [r5, #0] - add r0, r5, #0 - ldrh r1, [r1, #0x24] - mov r3, #0x49 - bl ov13_022220CC - ldr r2, [r5, #0] - add r0, r5, #0 - ldrh r2, [r2, #0x24] - mov r1, #8 - bl ov13_02222DCC - ldr r0, [r5, #0] - mov r1, #4 - ldrh r0, [r0, #0x24] - bl sub_020790C4 - add r2, r0, #0 - add r0, r5, #0 - mov r1, #6 - bl ov13_02222BB4 - ldr r0, [r5, #0] - mov r1, #2 - ldrh r0, [r0, #0x24] - bl sub_020790C4 - add r2, r0, #0 - add r0, r5, #0 - mov r1, #7 - bl ov13_02222CE4 - ldr r0, [r5, #0] - mov r1, #1 - ldrh r0, [r0, #0x24] - bl sub_020790C4 - add r2, r0, #0 - add r0, r5, #0 - mov r1, #0xa - bl ov13_02222EF8 - add r0, r5, #0 - mov r1, #3 - add r2, r4, #0 - add r3, r4, #0 - bl ov13_02222F74 -_02223E4E: - add r0, r5, #0 - mov r1, #0xb - bl ov13_022230A8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02223E5C: .word 0x00002070 -_02223E60: .word 0x000F0E00 -_02223E64: .word 0x02228EB0 - thumb_func_end ov13_02223C9C - - thumb_func_start ov13_02223E68 -ov13_02223E68: ; 0x02223E68 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, _02223F50 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0201ADA4 - ldr r0, _02223F50 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, _02223F50 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, _02223F50 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _02223F50 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - ldr r3, [r5, #0] - add r0, r5, #0 - ldrb r3, [r3, #0x11] - add r2, r1, #0 - bl ov13_02221C54 - add r0, r5, #0 - mov r6, #0 - str r0, [sp, #0x10] - add r0, #0x34 - ldr r7, _02223F54 ; =0x02228EB0 - add r4, r6, #0 - str r0, [sp, #0x10] -_02223EC8: - ldr r0, [r5, #0] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x10] - add r0, r0, r2 - ldrh r1, [r0, r4] - str r0, [sp, #0xc] - cmp r1, #0 - beq _02223F00 - mov r0, #2 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - ldr r0, _02223F58 ; =0x00070809 - add r2, r6, #1 - str r0, [sp, #8] - ldr r3, [r7, #0] - add r0, r5, #0 - bl ov13_022220CC - ldr r1, [sp, #0xc] - add r0, r5, #0 - add r1, r1, r4 - add r2, r6, #1 - bl ov13_0222317C -_02223F00: - add r6, r6, #1 - add r4, #8 - add r7, r7, #4 - cmp r6, #4 - blo _02223EC8 - ldr r2, [r5, #0] - mov r1, #0x25 - ldrh r0, [r2, #0x22] - ldr r2, [r2, #0xc] - bl sub_0207CFF0 - cmp r0, #0 - bne _02223F22 - add r0, r5, #0 - mov r1, #0x5e - bl ov13_022221C8 -_02223F22: - ldr r0, _02223F50 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x10 - bl sub_0201A9A4 - ldr r0, _02223F50 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x20 - bl sub_0201A9A4 - ldr r0, _02223F50 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x30 - bl sub_0201A9A4 - ldr r0, _02223F50 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02223F50: .word 0x00002070 -_02223F54: .word 0x02228EB0 -_02223F58: .word 0x00070809 - thumb_func_end ov13_02223E68 - - thumb_func_start ov13_02223F5C -ov13_02223F5C: ; 0x02223F5C - push {r3, r4, r5, lr} - ldr r4, [r0, #0] - add r3, r1, #0 - ldrb r5, [r4, #0x11] - add r1, r0, #0 - mov r4, #0x50 - add r1, #0x34 - mul r4, r5 - add r4, r1, r4 - lsl r1, r2, #3 - add r1, r4, r1 - add r2, r3, #0 - bl ov13_022232C8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov13_02223F5C - - thumb_func_start ov13_02223F7C -ov13_02223F7C: ; 0x02223F7C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0201ADA4 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201ADA4 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x50 - bl sub_0201ADA4 - ldr r0, _022240D0 ; =0x00002070 - mov r1, #0 - ldr r0, [r5, r0] - add r0, #0x60 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - ldr r3, [r5, #0] - add r0, r5, #0 - ldrb r3, [r3, #0x11] - add r2, r1, #0 - bl ov13_02221C54 - mov r2, #0 - add r0, r5, #0 - mov r1, #2 - add r3, r2, #0 - bl ov13_02222170 - ldr r0, _022240D4 ; =0x00001FA8 - mov r1, #0x39 - ldr r0, [r5, r0] - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - mov r3, #0x60 - bl sub_02002EEC - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022240D8 ; =0x000F0E00 - add r2, r4, #0 - str r0, [sp, #8] - ldr r0, _022240D0 ; =0x00002070 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - ldr r0, _022240D0 ; =0x00002070 - ldr r0, [r5, r0] - add r0, #0x40 - bl sub_0201A9A4 - ldr r1, [r5, #0] - add r0, r1, #0 - add r0, #0x34 - ldrb r3, [r0] - cmp r3, #4 - bhs _0222408A - ldrb r1, [r1, #0x11] - add r2, r5, #0 - mov r0, #0x50 - add r2, #0x34 - mul r0, r1 - add r4, r2, r0 - lsl r7, r3, #3 - add r0, r4, r7 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022240D8 ; =0x000F0E00 - lsl r6, r3, #2 - str r0, [sp, #8] - ldr r3, _022240DC ; =0x02228EB0 - ldrh r1, [r4, r7] - ldr r3, [r3, r6] - add r0, r5, #0 - mov r2, #1 - bl ov13_022220CC - ldrh r2, [r4, r7] - add r0, r5, #0 - mov r1, #5 - bl ov13_02222E2C - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x10] - ldrb r2, [r2, #2] - ldrb r3, [r3, #3] - add r0, r5, #0 - mov r1, #3 - bl ov13_02222F74 - b _022240C4 -_0222408A: - ldrh r0, [r1, #0x24] - mov r1, #5 - bl sub_020790C4 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022240D8 ; =0x000F0E00 - mov r2, #1 - str r0, [sp, #8] - ldr r1, [r5, #0] - add r0, r5, #0 - ldrh r1, [r1, #0x24] - mov r3, #0x49 - bl ov13_022220CC - ldr r2, [r5, #0] - add r0, r5, #0 - ldrh r2, [r2, #0x24] - mov r1, #5 - bl ov13_02222E2C - add r0, r5, #0 - mov r1, #3 - add r2, r4, #0 - add r3, r4, #0 - bl ov13_02222F74 -_022240C4: - add r0, r5, #0 - mov r1, #6 - bl ov13_022230A8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022240D0: .word 0x00002070 -_022240D4: .word 0x00001FA8 -_022240D8: .word 0x000F0E00 -_022240DC: .word 0x02228EB0 - thumb_func_end ov13_02223F7C - - thumb_func_start ov13_022240E0 -ov13_022240E0: ; 0x022240E0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02224104 ; =0x00002060 - mov r1, #1 - add r0, r4, r0 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - ldr r0, _02224104 ; =0x00002060 - mov r1, #0xf - add r0, r4, r0 - bl sub_0201ADA4 - add r0, r4, #0 - bl ov13_02224108 - pop {r4, pc} - ; .align 2, 0 -_02224104: .word 0x00002060 - thumb_func_end ov13_022240E0 - - thumb_func_start ov13_02224108 -ov13_02224108: ; 0x02224108 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #1 - bl sub_02002AC8 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl ov16_0223EDF0 - mov r3, #0 - str r3, [sp] - str r0, [sp, #4] - ldr r2, _0222413C ; =0x00002060 - str r3, [sp, #8] - add r0, r4, r2 - sub r2, #0xb0 - ldr r2, [r4, r2] - mov r1, #1 - bl sub_0201D738 - ldr r1, _02224140 ; =0x0000207B - strb r0, [r4, r1] - add sp, #0xc - pop {r3, r4, pc} - nop -_0222413C: .word 0x00002060 -_02224140: .word 0x0000207B - thumb_func_end ov13_02224108 - - thumb_func_start ov13_02224144 -ov13_02224144: ; 0x02224144 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - mov r1, #0 - str r0, [sp, #0xc] - ldr r2, [sp, #0xc] - ldrh r0, [r0, #0x22] - ldr r2, [r2, #0xc] - bl sub_0207CF48 - ldr r2, [sp, #0xc] - add r6, r0, #0 - ldrb r3, [r2, #0x11] - ldr r0, [sp, #0xc] - ldr r1, [sp, #0xc] - add r2, r2, r3 - add r2, #0x2c - ldrb r2, [r2] - ldr r0, [r0, #8] - ldr r1, [r1, #0x28] - bl ov16_0223DFAC - mov r1, #0xa3 - mov r2, #0 - add r7, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r6, #0 - mov r1, #0xf - mov r4, #0 - bl sub_0207D014 - cmp r0, #0 - beq _02224198 - mov r0, #1 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_02224198: - add r0, r6, #0 - mov r1, #0x10 - bl sub_0207D014 - cmp r0, #0 - beq _022241AC - mov r0, #2 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_022241AC: - add r0, r6, #0 - mov r1, #0x11 - bl sub_0207D014 - cmp r0, #0 - beq _022241C0 - mov r0, #4 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_022241C0: - add r0, r6, #0 - mov r1, #0x12 - bl sub_0207D014 - cmp r0, #0 - beq _022241D4 - mov r0, #8 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_022241D4: - add r0, r6, #0 - mov r1, #0x13 - bl sub_0207D014 - cmp r0, #0 - beq _022241E8 - mov r0, #0x10 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_022241E8: - add r0, r6, #0 - mov r1, #0x14 - bl sub_0207D014 - cmp r0, #0 - beq _022241FC - mov r0, #0x20 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_022241FC: - add r0, r6, #0 - mov r1, #0x15 - bl sub_0207D014 - cmp r0, #0 - beq _02224210 - mov r0, #0x40 - orr r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_02224210: - ldr r0, [sp, #0xc] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r0, r5, r0 - ldrh r1, [r0, #0x14] - cmp r1, #0 - bne _0222425A - ldr r0, [sp, #8] - cmp r0, #0 - beq _0222425A - ldr r0, _02224494 ; =0x00001FA8 - mov r1, #0x58 - ldr r0, [r5, r0] - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_0222425A: - ldr r0, [sp, #8] - cmp r0, r1 - beq _022242B6 - ldr r0, _02224494 ; =0x00001FA8 - mov r1, #0x52 - ldr r0, [r5, r0] - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - mov r0, #0 - str r0, [sp] - mov r1, #1 - ldr r2, [sp, #0xc] - str r1, [sp, #4] - ldrb r3, [r2, #0x11] - mov r2, #0x50 - ldr r0, _02224498 ; =0x00001FAC - mul r2, r3 - add r2, r5, r2 - ldrh r3, [r2, #0x14] - ldr r2, [sp, #8] - ldr r0, [r5, r0] - sub r2, r2, r3 - mov r3, #3 - bl sub_0200B60C - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_022242B6: - add r0, r6, #0 - mov r1, #0x24 - bl sub_0207D014 - cmp r0, #0 - bne _022242CE - add r0, r6, #0 - mov r1, #0x25 - bl sub_0207D014 - cmp r0, #0 - beq _022242DE -_022242CE: - ldr r2, _02224494 ; =0x00001FA8 - mov r1, #0x57 - ldr r0, [r5, r2] - add r2, #8 - ldr r2, [r5, r2] - bl sub_0200B1B8 - b _0222448A -_022242DE: - cmp r4, #1 - ldr r0, _02224494 ; =0x00001FA8 - bne _02224316 - ldr r0, [r5, r0] - mov r1, #0x5c - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_02224316: - cmp r4, #2 - bne _0222434C - ldr r0, [r5, r0] - mov r1, #0x53 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_0222434C: - cmp r4, #4 - bne _02224382 - ldr r0, [r5, r0] - mov r1, #0x55 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_02224382: - cmp r4, #8 - bne _022243B8 - ldr r0, [r5, r0] - mov r1, #0x56 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_022243B8: - cmp r4, #0x10 - bne _022243EE - ldr r0, [r5, r0] - mov r1, #0x54 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_022243EE: - cmp r4, #0x20 - bne _02224424 - ldr r0, [r5, r0] - mov r1, #0x5a - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_02224424: - cmp r4, #0x40 - bne _0222445A - ldr r0, [r5, r0] - mov r1, #0x5b - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - b _0222448A -_0222445A: - ldr r0, [r5, r0] - mov r1, #0x59 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r7, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _02224498 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r1, _02224498 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC -_0222448A: - add r0, r6, #0 - bl sub_020181C4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02224494: .word 0x00001FA8 -_02224498: .word 0x00001FAC - thumb_func_end ov13_02224144 - - thumb_func_start ov13_0222449C -ov13_0222449C: ; 0x0222449C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r3, [r5, #0] - ldrb r2, [r3, #0x11] - ldr r0, [r3, #8] - ldr r1, [r3, #0x28] - add r2, r3, r2 - add r2, #0x2c - ldrb r2, [r2] - bl ov16_0223DFAC - add r6, r0, #0 - ldr r0, _022244F4 ; =0x00001FA8 - mov r1, #0x5f - ldr r0, [r5, r0] - bl sub_0200B1EC - add r4, r0, #0 - add r0, r6, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, _022244F8 ; =0x00001FAC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200B5CC - ldr r0, _022244F8 ; =0x00001FAC - ldr r2, _022244FC ; =0x00000175 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0200B630 - ldr r1, _022244F8 ; =0x00001FAC - add r2, r4, #0 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022244F4: .word 0x00001FA8 -_022244F8: .word 0x00001FAC -_022244FC: .word 0x00000175 - thumb_func_end ov13_0222449C - - thumb_func_start ov13_02224500 -ov13_02224500: ; 0x02224500 - push {r4, lr} - add r4, r0, #0 - bl ov13_0222453C - add r0, r4, #0 - bl ov13_02224588 - add r0, r4, #0 - bl ov13_02224670 - add r0, r4, #0 - bl ov13_02224720 - add r0, r4, #0 - bl ov13_02224798 - add r0, r4, #0 - bl ov13_02224848 - add r0, r4, #0 - bl ov13_02224948 - add r0, r4, #0 - bl ov13_0222554C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - pop {r4, pc} - thumb_func_end ov13_02224500 - - thumb_func_start ov13_0222453C -ov13_0222453C: ; 0x0222453C - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _02224580 ; =0x022292EC - add r2, sp, #0 - add r5, r0, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - add r4, r0, #0 - bl sub_0200C704 - ldr r1, _02224584 ; =0x00001FB4 - mov r2, #0x2b - str r0, [r5, r1] - ldr r1, [r5, r1] - add r0, r4, #0 - bl sub_0200C7C0 - ldr r1, _02224584 ; =0x00001FB4 - add r0, r4, #0 - ldr r1, [r5, r1] - add r2, sp, #0 - bl sub_0200CB30 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_02224580: .word 0x022292EC -_02224584: .word 0x00001FB4 - thumb_func_end ov13_0222453C - - thumb_func_start ov13_02224588 -ov13_02224588: ; 0x02224588 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - ldr r1, [r6, #0] - mov r0, #0x13 - ldr r1, [r1, #0xc] - bl sub_02006C24 - add r7, r0, #0 - ldr r0, [r6, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - str r0, [sp, #0x18] - bl sub_02079FD0 - str r7, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _02224668 ; =0x0000B007 - ldr r3, _0222466C ; =0x00001FB4 - str r0, [sp, #0x14] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [sp, #0x18] - ldr r3, [r6, r3] - bl sub_0200CDC4 - bl sub_02079FD8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02224668 ; =0x0000B007 - ldr r1, _0222466C ; =0x00001FB4 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CE24 - bl sub_02079FE4 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02224668 ; =0x0000B007 - ldr r1, _0222466C ; =0x00001FB4 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CE54 - mov r4, #0 - add r5, r6, #0 -_02224604: - ldrh r0, [r5, #8] - cmp r0, #0 - beq _0222462E - ldr r0, [r5, #4] - bl sub_02079D80 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02224668 ; =0x0000B007 - ldr r1, _0222466C ; =0x00001FB4 - add r0, r4, r0 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CC3C - b _02224654 -_0222462E: - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - bl sub_02079D8C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02224668 ; =0x0000B007 - ldr r1, _0222466C ; =0x00001FB4 - add r0, r4, r0 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CC3C -_02224654: - add r4, r4, #1 - add r5, #0x50 - cmp r4, #6 - blo _02224604 - add r0, r7, #0 - bl sub_02006CA8 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02224668: .word 0x0000B007 -_0222466C: .word 0x00001FB4 - thumb_func_end ov13_02224588 - - thumb_func_start ov13_02224670 -ov13_02224670: ; 0x02224670 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - ldr r1, [r5, #0] - add r4, r0, #0 - ldr r1, [r1, #0xc] - mov r0, #0x27 - bl sub_02006C24 - add r6, r0, #0 - bl sub_0208E9E4 - str r6, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _02224714 ; =0x0000B008 - ldr r3, _02224718 ; =0x00001FB4 - str r0, [sp, #0x14] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r5, r3] - mov r1, #3 - add r2, r4, #0 - bl sub_0200CDC4 - bl sub_0208E9E8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02224714 ; =0x0000B008 - ldr r1, _02224718 ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - add r0, r4, #0 - add r2, r6, #0 - bl sub_0200CE24 - bl sub_0208E9EC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02224714 ; =0x0000B008 - ldr r1, _02224718 ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - add r0, r4, #0 - add r2, r6, #0 - bl sub_0200CE54 - bl sub_0208E9E0 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0222471C ; =0x0000B00D - ldr r1, _02224718 ; =0x00001FB4 - str r0, [sp, #8] - ldr r1, [r5, r1] - add r0, r4, #0 - add r2, r6, #0 - bl sub_0200CC3C - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_02224714: .word 0x0000B008 -_02224718: .word 0x00001FB4 -_0222471C: .word 0x0000B00D - thumb_func_end ov13_02224670 - - thumb_func_start ov13_02224720 -ov13_02224720: ; 0x02224720 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - add r6, r0, #0 - mov r0, #2 - str r0, [sp] - ldr r0, _02224788 ; =0x0000B009 - ldr r3, _0222478C ; =0x00001FB4 - str r0, [sp, #4] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r5, r3] - mov r1, #3 - add r2, r6, #0 - bl sub_0207C9B0 - ldr r1, _0222478C ; =0x00001FB4 - ldr r2, _02224788 ; =0x0000B009 - ldr r1, [r5, r1] - add r0, r6, #0 - add r3, r2, #0 - bl sub_0207C9EC - ldr r4, _02224790 ; =0x0000B00E - add r7, r4, #6 -_0222475C: - ldr r1, _0222478C ; =0x00001FB4 - str r4, [sp] - ldr r1, [r5, r1] - add r0, r6, #0 - mov r2, #2 - mov r3, #0 - bl sub_0207C948 - add r4, r4, #1 - cmp r4, r7 - bls _0222475C - ldr r0, _02224794 ; =0x0000B015 - ldr r1, _0222478C ; =0x00001FB4 - str r0, [sp] - ldr r1, [r5, r1] - add r0, r6, #0 - mov r2, #2 - mov r3, #0 - bl sub_0207CAC4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02224788: .word 0x0000B009 -_0222478C: .word 0x00001FB4 -_02224790: .word 0x0000B00E -_02224794: .word 0x0000B015 - thumb_func_end ov13_02224720 - - thumb_func_start ov13_02224798 -ov13_02224798: ; 0x02224798 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #0x14 - ldr r1, [r1, #0xc] - bl sub_02006C24 - add r4, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - add r6, r0, #0 - bl sub_02081934 - str r4, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0222483C ; =0x0000B00A - ldr r3, _02224840 ; =0x00001FB4 - str r0, [sp, #0x14] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r5, r3] - mov r1, #3 - add r2, r6, #0 - bl sub_0200CDC4 - bl sub_02081938 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0222483C ; =0x0000B00A - ldr r1, _02224840 ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0200CE24 - bl sub_0208193C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0222483C ; =0x0000B00A - ldr r1, _02224840 ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0200CE54 - bl sub_02081930 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02224844 ; =0x0000B016 - ldr r1, _02224840 ; =0x00001FB4 - str r0, [sp, #8] - ldr r1, [r5, r1] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0200CC3C - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_0222483C: .word 0x0000B00A -_02224840: .word 0x00001FB4 -_02224844: .word 0x0000B016 - thumb_func_end ov13_02224798 - - thumb_func_start ov13_02224848 -ov13_02224848: ; 0x02224848 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - add r4, r0, #0 - mov r0, #0x48 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _022248CC ; =0x0000B00B - ldr r3, _022248D0 ; =0x00001FB4 - str r0, [sp, #0x14] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r3, [r5, r3] - mov r1, #3 - add r2, r4, #0 - bl sub_0200CD7C - mov r0, #0 - str r0, [sp] - ldr r0, _022248CC ; =0x0000B00B - ldr r1, _022248D0 ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - add r0, r4, #0 - mov r2, #0x48 - mov r3, #0x19 - bl sub_0200CE0C - mov r0, #0 - str r0, [sp] - ldr r0, _022248CC ; =0x0000B00B - ldr r1, _022248D0 ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - add r0, r4, #0 - mov r2, #0x48 - mov r3, #0x18 - bl sub_0200CE3C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _022248D4 ; =0x0000B017 - ldr r1, _022248D0 ; =0x00001FB4 - str r0, [sp, #8] - ldr r1, [r5, r1] - add r0, r4, #0 - mov r2, #0x48 - mov r3, #0x1a - bl sub_0200CBDC - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022248CC: .word 0x0000B00B -_022248D0: .word 0x00001FB4 -_022248D4: .word 0x0000B017 - thumb_func_end ov13_02224848 - - thumb_func_start ov13_022248D8 -ov13_022248D8: ; 0x022248D8 - push {r4, r5, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - ldr r0, [r0, #8] - bl ov16_0223E010 - mov r2, #0 - add r1, sp, #0 - strh r2, [r1] - strh r2, [r1, #2] - strh r2, [r1, #4] - strh r2, [r1, #6] - mov r1, #0x14 - ldr r3, _02224930 ; =0x02229524 - mul r1, r4 - ldr r3, [r3, r1] - str r2, [sp, #0xc] - str r3, [sp, #8] - mov r3, #2 - str r3, [sp, #0x10] - ldr r3, _02224934 ; =0x02229514 - str r2, [sp, #0x30] - ldr r3, [r3, r1] - add r2, sp, #0 - str r3, [sp, #0x14] - ldr r3, _02224938 ; =0x02229518 - ldr r3, [r3, r1] - str r3, [sp, #0x18] - ldr r3, _0222493C ; =0x0222951C - ldr r3, [r3, r1] - str r3, [sp, #0x1c] - ldr r3, _02224940 ; =0x02229520 - ldr r1, [r3, r1] - str r1, [sp, #0x20] - mov r1, #1 - str r1, [sp, #0x2c] - ldr r1, _02224944 ; =0x00001FB4 - ldr r1, [r5, r1] - bl sub_0200CE6C - add sp, #0x34 - pop {r4, r5, pc} - ; .align 2, 0 -_02224930: .word 0x02229524 -_02224934: .word 0x02229514 -_02224938: .word 0x02229518 -_0222493C: .word 0x0222951C -_02224940: .word 0x02229520 -_02224944: .word 0x00001FB4 - thumb_func_end ov13_022248D8 - - thumb_func_start ov13_02224948 -ov13_02224948: ; 0x02224948 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r7, _0222496C ; =0x00001FB8 - mov r4, #0 - add r5, r6, #0 -_02224952: - add r0, r6, #0 - add r1, r4, #0 - bl ov13_022248D8 - str r0, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x26 - blo _02224952 - add r0, r6, #0 - bl ov13_022249CC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222496C: .word 0x00001FB8 - thumb_func_end ov13_02224948 - - thumb_func_start ov13_02224970 -ov13_02224970: ; 0x02224970 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - ldr r6, _022249A4 ; =0x00001FB8 - str r0, [sp] - mov r4, #0 - add r5, r7, #0 -_02224984: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x26 - blo _02224984 - add r0, r7, #0 - bl ov13_022255B8 - ldr r1, _022249A8 ; =0x00001FB4 - ldr r0, [sp] - ldr r1, [r7, r1] - bl sub_0200D0B0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022249A4: .word 0x00001FB8 -_022249A8: .word 0x00001FB4 - thumb_func_end ov13_02224970 - - thumb_func_start ov13_022249AC -ov13_022249AC: ; 0x022249AC - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - mov r1, #1 - add r6, r0, #0 - bl sub_0200D3F4 - lsl r1, r5, #0x10 - lsl r2, r4, #0x10 - add r0, r6, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov13_022249AC - - thumb_func_start ov13_022249CC -ov13_022249CC: ; 0x022249CC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r5, #0 - mov r7, #0 - add r4, #0x1b - add r6, r5, #0 -_022249D8: - ldrh r0, [r5, #8] - cmp r0, #0 - beq _022249F8 - add r1, r5, #0 - ldrb r2, [r4] - add r1, #0x32 - ldrb r1, [r1] - lsl r2, r2, #0x18 - lsr r2, r2, #0x1f - bl sub_02079EDC - add r1, r0, #0 - ldr r0, _02224A08 ; =0x00001FD4 - ldr r0, [r6, r0] - bl sub_0200D41C -_022249F8: - add r7, r7, #1 - add r5, #0x50 - add r4, #0x50 - add r6, r6, #4 - cmp r7, #6 - blt _022249D8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02224A08: .word 0x00001FD4 - thumb_func_end ov13_022249CC - - thumb_func_start ov13_02224A0C -ov13_02224A0C: ; 0x02224A0C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r3, #0 - ldr r0, [r0, #8] - add r7, r1, #0 - add r4, r2, #0 - bl ov16_0223E010 - str r0, [sp, #8] - bl sub_0207C944 - str r0, [sp, #0xc] - add r0, r6, #0 - bl sub_0207C908 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r1, _02224A58 ; =0x00001FB4 - str r4, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [r5, r1] - ldr r2, [sp, #0xc] - bl sub_0200D948 - add r0, r6, #0 - bl sub_0207C92C - add r1, r0, #0 - add r0, r7, #0 - add r1, r1, #4 - bl sub_0200D41C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02224A58: .word 0x00001FB4 - thumb_func_end ov13_02224A0C - - thumb_func_start ov13_02224A5C -ov13_02224A5C: ; 0x02224A5C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r2, #0 - ldr r0, [r0, #8] - add r6, r1, #0 - bl ov16_0223E010 - add r7, r0, #0 - bl sub_0207CAC0 - str r0, [sp, #8] - add r0, r4, #0 - bl sub_0207CA90 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, _02224AA8 ; =0x0000B015 - ldr r1, _02224AAC ; =0x00001FB4 - str r0, [sp, #4] - ldr r1, [r5, r1] - ldr r2, [sp, #8] - add r0, r7, #0 - bl sub_0200D948 - add r0, r4, #0 - bl sub_0207CAA8 - add r1, r0, #0 - add r0, r6, #0 - add r1, r1, #4 - bl sub_0200D41C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02224AA8: .word 0x0000B015 -_02224AAC: .word 0x00001FB4 - thumb_func_end ov13_02224A5C - - thumb_func_start ov13_02224AB0 -ov13_02224AB0: ; 0x02224AB0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - cmp r6, #7 - beq _02224AD0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200D364 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov13_022249AC -_02224AD0: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02224AB0 - - thumb_func_start ov13_02224AD4 -ov13_02224AD4: ; 0x02224AD4 - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, _02224B18 ; =0x00002004 - add r5, r0, #0 - add r6, r2, #0 - ldrb r3, [r4, #0x14] - ldr r1, [r5, r1] - ldr r2, _02224B1C ; =0x0000B00E - bl ov13_02224A0C - ldr r0, _02224B18 ; =0x00002004 - ldr r1, [r6, #0] - ldr r0, [r5, r0] - ldr r2, [r6, #4] - bl ov13_022249AC - ldrb r3, [r4, #0x15] - ldrb r0, [r4, #0x14] - cmp r0, r3 - beq _02224B14 - ldr r1, _02224B20 ; =0x00002008 - ldr r2, _02224B24 ; =0x0000B00F - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov13_02224A0C - ldr r0, _02224B20 ; =0x00002008 - ldr r1, [r6, #8] - ldr r0, [r5, r0] - ldr r2, [r6, #0xc] - bl ov13_022249AC -_02224B14: - pop {r4, r5, r6, pc} - nop -_02224B18: .word 0x00002004 -_02224B1C: .word 0x0000B00E -_02224B20: .word 0x00002008 -_02224B24: .word 0x0000B00F - thumb_func_end ov13_02224AD4 - - thumb_func_start ov13_02224B28 -ov13_02224B28: ; 0x02224B28 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r0, #0 - beq _02224B58 - bl sub_0207D2D0 - cmp r0, #1 - bne _02224B46 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D364 - b _02224B4E -_02224B46: - add r0, r5, #0 - mov r1, #0 - bl sub_0200D364 -_02224B4E: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov13_022249AC -_02224B58: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov13_02224B28 - - thumb_func_start ov13_02224B5C -ov13_02224B5C: ; 0x02224B5C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r0, #0 - beq _02224B7A - add r0, r5, #0 - mov r1, #2 - bl sub_0200D364 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov13_022249AC -_02224B7A: - pop {r4, r5, r6, pc} - thumb_func_end ov13_02224B5C - - thumb_func_start ov13_02224B7C -ov13_02224B7C: ; 0x02224B7C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r7, _02224C10 ; =0x00001FB8 - str r1, [sp] - mov r5, #0 - add r4, r6, #0 -_02224B88: - ldr r0, [r4, r7] - mov r1, #0 - bl sub_0200D3F4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #0x26 - blo _02224B88 - ldr r0, [sp] - cmp r0, #9 - bhi _02224C0C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02224BAA: ; jump table - .short _02224BBE - _02224BAA - 2 ; case 0 - .short _02224BC6 - _02224BAA - 2 ; case 1 - .short _02224BCE - _02224BAA - 2 ; case 2 - .short _02224BD6 - _02224BAA - 2 ; case 3 - .short _02224BDE - _02224BAA - 2 ; case 4 - .short _02224BE6 - _02224BAA - 2 ; case 5 - .short _02224BEE - _02224BAA - 2 ; case 6 - .short _02224BF6 - _02224BAA - 2 ; case 7 - .short _02224BFE - _02224BAA - 2 ; case 8 - .short _02224C06 - _02224BAA - 2 ; case 9 -_02224BBE: - add r0, r6, #0 - bl ov13_02224C14 - pop {r3, r4, r5, r6, r7, pc} -_02224BC6: - add r0, r6, #0 - bl ov13_02224CB0 - pop {r3, r4, r5, r6, r7, pc} -_02224BCE: - add r0, r6, #0 - bl ov13_02224D08 - pop {r3, r4, r5, r6, r7, pc} -_02224BD6: - add r0, r6, #0 - bl ov13_02224DA0 - pop {r3, r4, r5, r6, r7, pc} -_02224BDE: - add r0, r6, #0 - bl ov13_02224E78 - pop {r3, r4, r5, r6, r7, pc} -_02224BE6: - add r0, r6, #0 - bl ov13_0222506C - pop {r3, r4, r5, r6, r7, pc} -_02224BEE: - add r0, r6, #0 - bl ov13_02224F3C - pop {r3, r4, r5, r6, r7, pc} -_02224BF6: - add r0, r6, #0 - bl ov13_02224FA8 - pop {r3, r4, r5, r6, r7, pc} -_02224BFE: - add r0, r6, #0 - bl ov13_02225150 - pop {r3, r4, r5, r6, r7, pc} -_02224C06: - add r0, r6, #0 - bl ov13_022250D8 -_02224C0C: - pop {r3, r4, r5, r6, r7, pc} - nop -_02224C10: .word 0x00001FB8 - thumb_func_end ov13_02224B7C - - thumb_func_start ov13_02224C14 -ov13_02224C14: ; 0x02224C14 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - mov r0, #0 - str r0, [sp, #4] - add r0, r6, #0 - str r0, [sp] - add r0, #0x1b - ldr r4, _02224C98 ; =0x02229404 - ldr r7, _02224C9C ; =0x02229434 - add r5, r6, #0 - str r0, [sp] -_02224C2C: - ldrh r0, [r6, #8] - cmp r0, #0 - beq _02224C7A - ldr r0, _02224CA0 ; =0x00001FD4 - ldr r1, [r4, #0] - ldr r0, [r5, r0] - ldr r2, [r4, #4] - bl ov13_022249AC - ldr r0, [sp] - ldr r1, _02224CA4 ; =0x00001FEC - ldrb r0, [r0] - ldr r1, [r5, r1] - ldr r2, [r7, #0] - lsl r0, r0, #0x19 - ldr r3, [r7, #4] - lsr r0, r0, #0x1c - bl ov13_02224AB0 - ldr r1, _02224CA8 ; =0x00001FB8 - ldr r2, [r4, #0] - ldr r3, [r4, #4] - ldrh r0, [r6, #0x1e] - ldr r1, [r5, r1] - add r2, #8 - add r3, #8 - bl ov13_02224B28 - add r0, r6, #0 - add r0, #0x31 - ldr r1, _02224CAC ; =0x00002038 - ldr r2, [r4, #0] - ldr r3, [r4, #4] - ldrb r0, [r0] - ldr r1, [r5, r1] - add r2, #0x10 - add r3, #8 - bl ov13_02224B5C -_02224C7A: - ldr r0, [sp] - add r6, #0x50 - add r0, #0x50 - str r0, [sp] - ldr r0, [sp, #4] - add r4, #8 - add r0, r0, #1 - add r5, r5, #4 - add r7, #8 - str r0, [sp, #4] - cmp r0, #6 - blt _02224C2C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02224C98: .word 0x02229404 -_02224C9C: .word 0x02229434 -_02224CA0: .word 0x00001FD4 -_02224CA4: .word 0x00001FEC -_02224CA8: .word 0x00001FB8 -_02224CAC: .word 0x00002038 - thumb_func_end ov13_02224C14 - - thumb_func_start ov13_02224CB0 -ov13_02224CB0: ; 0x02224CB0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02224D04 ; =0x00001FB8 - mov r2, #0x48 - ldr r0, [r1, r0] - mov r1, #0x80 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x50 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224D04 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x88 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r4, #0x2d - ldrb r1, [r1, #0x11] - ldrb r0, [r4] - mov r3, #0x50 - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224D04 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x90 - bl ov13_02224B5C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02224D04: .word 0x00001FB8 - thumb_func_end ov13_02224CB0 - - thumb_func_start ov13_02224D08 -ov13_02224D08: ; 0x02224D08 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02224D94 ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrb r0, [r4, #0x17] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r0, r0, #0x19 - add r1, #0xd - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224D94 ; =0x00001FB8 - lsr r0, r0, #0x1c - ldr r1, [r2, r1] - mov r2, #0xc6 - bl ov13_02224AB0 - ldr r2, _02224D98 ; =0x022292C4 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02224AD4 - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224D94 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - add r0, #0x2d - ldrb r0, [r0] - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224D94 ; =0x00001FB8 - mov r3, #0x14 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - ldr r1, _02224D9C ; =0x00001FD0 - ldrh r0, [r4, #0x1a] - ldr r1, [r5, r1] - mov r2, #0x14 - mov r3, #0x84 - bl ov13_02224B28 - pop {r3, r4, r5, pc} - nop -_02224D94: .word 0x00001FB8 -_02224D98: .word 0x022292C4 -_02224D9C: .word 0x00001FD0 - thumb_func_end ov13_02224D08 - - thumb_func_start ov13_02224DA0 -ov13_02224DA0: ; 0x02224DA0 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - ldr r0, [r0, #0] - ldrb r2, [r0, #0x11] - ldr r0, [sp] - add r1, r0, #4 - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r1, r0, #2 - ldr r0, [sp] - mov r2, #0xc - add r1, r0, r1 - ldr r0, _02224E64 ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r1, [sp] - ldrb r0, [r4, #0x17] - ldr r1, [r1, #0] - mov r3, #0x14 - ldrb r1, [r1, #0x11] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1c - add r1, #0xd - lsl r2, r1, #2 - ldr r1, [sp] - add r2, r1, r2 - ldr r1, _02224E64 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0xc6 - bl ov13_02224AB0 - ldr r0, [sp] - ldr r2, _02224E68 ; =0x022292A4 - add r1, r4, #0 - bl ov13_02224AD4 - ldr r1, [sp] - ldrh r0, [r4, #0x1a] - ldr r1, [r1, #0] - mov r3, #0x14 - ldrb r1, [r1, #0x11] - lsl r2, r1, #2 - ldr r1, [sp] - add r2, r1, r2 - ldr r1, _02224E64 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [sp] - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0x2d - ldrb r1, [r1, #0x11] - ldrb r0, [r0] - mov r3, #0x14 - add r1, #0x20 - lsl r2, r1, #2 - ldr r1, [sp] - add r2, r1, r2 - ldr r1, _02224E64 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - ldr r5, [sp] - ldr r6, _02224E6C ; =0x02229324 - mov r7, #0 -_02224E30: - ldrh r0, [r4, #0x30] - cmp r0, #0 - beq _02224E56 - add r3, r4, #0 - ldr r1, _02224E70 ; =0x0000200C - add r3, #0x34 - ldr r2, _02224E74 ; =0x0000B010 - ldrb r3, [r3] - ldr r0, [sp] - ldr r1, [r5, r1] - add r2, r7, r2 - bl ov13_02224A0C - ldr r0, _02224E70 ; =0x0000200C - ldr r1, [r6, #0] - ldr r0, [r5, r0] - ldr r2, [r6, #4] - bl ov13_022249AC -_02224E56: - add r7, r7, #1 - add r4, #8 - add r5, r5, #4 - add r6, #8 - cmp r7, #4 - blo _02224E30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02224E64: .word 0x00001FB8 -_02224E68: .word 0x022292A4 -_02224E6C: .word 0x02229324 -_02224E70: .word 0x0000200C -_02224E74: .word 0x0000B010 - thumb_func_end ov13_02224DA0 - - thumb_func_start ov13_02224E78 -ov13_02224E78: ; 0x02224E78 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02224F30 ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrb r0, [r4, #0x17] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r0, r0, #0x19 - add r1, #0xd - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224F30 ; =0x00001FB8 - lsr r0, r0, #0x1c - ldr r1, [r2, r1] - mov r2, #0xc6 - bl ov13_02224AB0 - ldr r2, _02224F34 ; =0x022292B4 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02224AD4 - ldr r0, [r5, #0] - mov r2, #0x30 - add r0, #0x34 - ldrb r0, [r0] - add r0, #0x15 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02224F30 ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0x88 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224F30 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - add r0, #0x2d - ldrb r0, [r0] - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224F30 ; =0x00001FB8 - mov r3, #0x14 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - ldr r2, [r5, #0] - ldr r1, _02224F38 ; =0x00002020 - add r2, #0x34 - ldrb r2, [r2] - ldr r1, [r5, r1] - add r0, r5, #0 - lsl r2, r2, #3 - add r2, r4, r2 - add r2, #0x35 - ldrb r2, [r2] - bl ov13_02224A5C - ldr r0, _02224F38 ; =0x00002020 - mov r1, #0x18 - ldr r0, [r5, r0] - mov r2, #0x58 - bl ov13_022249AC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02224F30: .word 0x00001FB8 -_02224F34: .word 0x022292B4 -_02224F38: .word 0x00002020 - thumb_func_end ov13_02224E78 - - thumb_func_start ov13_02224F3C -ov13_02224F3C: ; 0x02224F3C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02224FA0 ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r2, _02224FA4 ; =0x02229294 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02224AD4 - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224FA0 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r4, #0x2d - ldrb r1, [r1, #0x11] - ldrb r0, [r4] - mov r3, #0x14 - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02224FA0 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - add r0, r5, #0 - bl ov13_022252E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02224FA0: .word 0x00001FB8 -_02224FA4: .word 0x02229294 - thumb_func_end ov13_02224F3C - - thumb_func_start ov13_02224FA8 -ov13_02224FA8: ; 0x02224FA8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02225060 ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r2, _02225064 ; =0x02229284 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02224AD4 - ldr r0, [r5, #0] - mov r2, #0x30 - add r0, #0x34 - ldrb r0, [r0] - add r0, #0x15 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _02225060 ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0x88 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02225060 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - add r0, #0x2d - ldrb r0, [r0] - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _02225060 ; =0x00001FB8 - mov r3, #0x14 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - ldr r1, [r5, #0] - add r0, r1, #0 - add r0, #0x34 - ldrb r2, [r0] - cmp r2, #4 - bhs _0222503E - lsl r2, r2, #3 - add r2, r4, r2 - ldr r1, _02225068 ; =0x00002020 - add r2, #0x35 - ldrb r2, [r2] - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov13_02224A5C - b _02225052 -_0222503E: - ldrh r0, [r1, #0x24] - mov r1, #1 - bl sub_020790C4 - ldr r1, _02225068 ; =0x00002020 - add r2, r0, #0 - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov13_02224A5C -_02225052: - ldr r0, _02225068 ; =0x00002020 - mov r1, #0x18 - ldr r0, [r5, r0] - mov r2, #0x58 - bl ov13_022249AC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02225060: .word 0x00001FB8 -_02225064: .word 0x02229284 -_02225068: .word 0x00002020 - thumb_func_end ov13_02224FA8 - - thumb_func_start ov13_0222506C -ov13_0222506C: ; 0x0222506C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _022250D0 ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r2, _022250D4 ; =0x02229294 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02224AD4 - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _022250D0 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r4, #0x2d - ldrb r1, [r1, #0x11] - ldrb r0, [r4] - mov r3, #0x14 - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _022250D0 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - add r0, r5, #0 - bl ov13_022252E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022250D0: .word 0x00001FB8 -_022250D4: .word 0x02229294 - thumb_func_end ov13_0222506C - - thumb_func_start ov13_022250D8 -ov13_022250D8: ; 0x022250D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0222514C ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r0, [r5, #0] - mov r2, #0x48 - add r0, #0x34 - ldrb r0, [r0] - add r0, #0x15 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0222514C ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0x88 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _0222514C ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r4, #0x2d - ldrb r1, [r1, #0x11] - ldrb r0, [r4] - mov r3, #0x14 - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _0222514C ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - add r0, r5, #0 - bl ov13_02225420 - pop {r3, r4, r5, pc} - nop -_0222514C: .word 0x00001FB8 - thumb_func_end ov13_022250D8 - - thumb_func_start ov13_02225150 -ov13_02225150: ; 0x02225150 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r1, r5, #4 - ldrb r2, [r0, #0x11] - mov r0, #0x50 - mul r0, r2 - add r4, r1, r0 - add r0, r2, #7 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _022251B0 ; =0x00001FB8 - mov r2, #0xc - ldr r0, [r1, r0] - mov r1, #0x18 - bl ov13_022249AC - ldr r1, [r5, #0] - ldrh r0, [r4, #0x1a] - ldrb r1, [r1, #0x11] - mov r3, #0x14 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _022251B0 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x20 - bl ov13_02224B28 - ldr r1, [r5, #0] - add r4, #0x2d - ldrb r1, [r1, #0x11] - ldrb r0, [r4] - mov r3, #0x14 - add r1, #0x20 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _022251B0 ; =0x00001FB8 - ldr r1, [r2, r1] - mov r2, #0x28 - bl ov13_02224B5C - add r0, r5, #0 - bl ov13_022252E8 - add r0, r5, #0 - bl ov13_02225420 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022251B0: .word 0x00001FB8 - thumb_func_end ov13_02225150 - - thumb_func_start ov13_022251B4 -ov13_022251B4: ; 0x022251B4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - add r2, r6, #4 - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mov r4, #0 - mul r0, r1 - add r0, r2, r0 - str r0, [sp] -_022251C8: - ldr r0, [sp] - lsl r5, r4, #3 - add r3, r0, r5 - ldrh r0, [r3, #0x30] - cmp r0, #0 - beq _022251FC - lsl r0, r4, #2 - add r3, #0x34 - add r7, r6, r0 - ldr r1, _02225234 ; =0x0000200C - ldr r2, _02225238 ; =0x0000B010 - ldrb r3, [r3] - ldr r1, [r7, r1] - add r0, r6, #0 - add r2, r4, r2 - bl ov13_02224A0C - ldr r0, _0222523C ; =0x022293DC - ldr r1, _0222523C ; =0x022293DC - add r2, r0, r5 - ldr r0, _02225234 ; =0x0000200C - ldr r1, [r1, r5] - ldr r0, [r7, r0] - ldr r2, [r2, #4] - bl ov13_022249AC -_022251FC: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #4 - blo _022251C8 - ldr r0, [r6, #0] - ldrh r0, [r0, #0x24] - cmp r0, #0 - beq _02225232 - mov r1, #3 - bl sub_020790C4 - add r3, r0, #0 - ldr r1, _02225240 ; =0x0000201C - lsl r3, r3, #0x18 - ldr r1, [r6, r1] - ldr r2, _02225244 ; =0x0000B014 - add r0, r6, #0 - lsr r3, r3, #0x18 - bl ov13_02224A0C - ldr r0, _02225240 ; =0x0000201C - mov r1, #0x58 - ldr r0, [r6, r0] - mov r2, #0xb0 - bl ov13_022249AC -_02225232: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02225234: .word 0x0000200C -_02225238: .word 0x0000B010 -_0222523C: .word 0x022293DC -_02225240: .word 0x0000201C -_02225244: .word 0x0000B014 - thumb_func_end ov13_022251B4 - - thumb_func_start ov13_02225248 -ov13_02225248: ; 0x02225248 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0] - add r2, r7, #4 - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mov r4, #0 - mul r0, r1 - add r0, r2, r0 - str r0, [sp] -_0222525C: - ldr r0, [sp] - lsl r5, r4, #3 - add r0, r0, r5 - ldrh r0, [r0, #0x30] - cmp r0, #0 - beq _0222529A - lsl r1, r4, #2 - add r6, r7, r1 - mov r1, #0xb - bl sub_020790C4 - add r3, r0, #0 - ldr r1, _022252D4 ; =0x0000200C - ldr r2, _022252D8 ; =0x0000B010 - add r3, #0x12 - lsl r3, r3, #0x18 - ldr r1, [r6, r1] - add r0, r7, #0 - add r2, r4, r2 - lsr r3, r3, #0x18 - bl ov13_02224A0C - ldr r0, _022252DC ; =0x022293DC - ldr r1, _022252DC ; =0x022293DC - add r2, r0, r5 - ldr r0, _022252D4 ; =0x0000200C - ldr r1, [r1, r5] - ldr r0, [r6, r0] - ldr r2, [r2, #4] - bl ov13_022249AC -_0222529A: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #4 - blo _0222525C - ldr r0, [r7, #0] - ldrh r0, [r0, #0x24] - cmp r0, #0 - beq _022252D2 - mov r1, #0xb - bl sub_020790C4 - add r3, r0, #0 - ldr r1, _022252E0 ; =0x0000201C - add r3, #0x12 - lsl r3, r3, #0x18 - ldr r1, [r7, r1] - ldr r2, _022252E4 ; =0x0000B014 - add r0, r7, #0 - lsr r3, r3, #0x18 - bl ov13_02224A0C - ldr r0, _022252E0 ; =0x0000201C - mov r1, #0x58 - ldr r0, [r7, r0] - mov r2, #0xb0 - bl ov13_022249AC -_022252D2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022252D4: .word 0x0000200C -_022252D8: .word 0x0000B010 -_022252DC: .word 0x022293DC -_022252E0: .word 0x0000201C -_022252E4: .word 0x0000B014 - thumb_func_end ov13_02225248 - - thumb_func_start ov13_022252E8 -ov13_022252E8: ; 0x022252E8 - push {r3, lr} - ldr r1, _02225300 ; =0x00002077 - ldrb r1, [r0, r1] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - bne _022252FA - bl ov13_022251B4 - pop {r3, pc} -_022252FA: - bl ov13_02225248 - pop {r3, pc} - ; .align 2, 0 -_02225300: .word 0x00002077 - thumb_func_end ov13_022252E8 - - thumb_func_start ov13_02225304 -ov13_02225304: ; 0x02225304 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_0200D37C - cmp r4, r0 - beq _02225322 - add r0, r5, #0 - mov r1, #0 - bl sub_0200D3CC - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D364 -_02225322: - pop {r3, r4, r5, pc} - thumb_func_end ov13_02225304 - - thumb_func_start ov13_02225324 -ov13_02225324: ; 0x02225324 - push {r3, lr} - add r2, r0, #0 - ldrh r0, [r2, #0x10] - cmp r0, #0 - bne _02225332 - mov r0, #0 - pop {r3, pc} -_02225332: - ldrb r1, [r2, #0x17] - lsl r1, r1, #0x19 - lsr r1, r1, #0x1c - cmp r1, #7 - beq _02225344 - cmp r1, #6 - beq _02225344 - mov r0, #5 - pop {r3, pc} -_02225344: - ldrh r1, [r2, #0x12] - mov r2, #0x30 - bl sub_0208C104 - cmp r0, #4 - bhi _02225376 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222535C: ; jump table - .short _02225376 - _0222535C - 2 ; case 0 - .short _02225372 - _0222535C - 2 ; case 1 - .short _0222536E - _0222535C - 2 ; case 2 - .short _0222536A - _0222535C - 2 ; case 3 - .short _02225366 - _0222535C - 2 ; case 4 -_02225366: - mov r0, #1 - pop {r3, pc} -_0222536A: - mov r0, #2 - pop {r3, pc} -_0222536E: - mov r0, #3 - pop {r3, pc} -_02225372: - mov r0, #4 - pop {r3, pc} -_02225376: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov13_02225324 - - thumb_func_start ov13_0222537C -ov13_0222537C: ; 0x0222537C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - mov r4, #0 - ldr r0, [r0, #0] - bl sub_0207A0F8 - cmp r0, #0 - ble _022253D4 - add r7, r5, #4 -_02225390: - mov r0, #0x50 - add r1, r4, #0 - mul r1, r0 - add r0, r5, r1 - ldrh r0, [r0, #8] - cmp r0, #0 - beq _022253C2 - add r0, r7, r1 - bl ov13_02225324 - add r1, r0, #0 - lsl r0, r4, #2 - add r6, r5, r0 - ldr r0, _022253D8 ; =0x00001FD4 - lsl r1, r1, #0x18 - ldr r0, [r6, r0] - lsr r1, r1, #0x18 - bl ov13_02225304 - ldr r0, _022253D8 ; =0x00001FD4 - mov r1, #1 - ldr r0, [r6, r0] - lsl r1, r1, #0xc - bl sub_0200D34C -_022253C2: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_0207A0F8 - cmp r4, r0 - blt _02225390 -_022253D4: - pop {r3, r4, r5, r6, r7, pc} - nop -_022253D8: .word 0x00001FD4 - thumb_func_end ov13_0222537C - - thumb_func_start ov13_022253DC -ov13_022253DC: ; 0x022253DC - push {r4, lr} - add r4, r2, #0 - cmp r4, r1 - ble _02225402 - add r0, #0x2c - sub r1, r4, r1 - mul r1, r0 - lsl r0, r1, #0x10 - mov r1, #0x4b - lsl r1, r1, #2 - bl sub_020E2178 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - pop {r4, pc} -_02225402: - add r0, #0x2c - sub r1, r1, r4 - mul r1, r0 - lsl r0, r1, #0x10 - mov r1, #0x4b - lsl r1, r1, #2 - bl sub_020E2178 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add r0, r4, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - pop {r4, pc} - thumb_func_end ov13_022253DC - - thumb_func_start ov13_02225420 -ov13_02225420: ; 0x02225420 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - add r5, r6, #4 - ldrb r1, [r0, #0x11] - mov r0, #0x50 - add r4, r1, #0 - mul r4, r0 - ldr r0, _02225538 ; =0x00002024 - mov r1, #0 - ldr r0, [r6, r0] - bl ov13_02225304 - ldr r0, _0222553C ; =0x00002028 - mov r1, #1 - ldr r0, [r6, r0] - bl ov13_02225304 - ldr r0, _02225540 ; =0x0000202C - mov r1, #3 - ldr r0, [r6, r0] - bl ov13_02225304 - ldr r0, _02225544 ; =0x00002030 - mov r1, #4 - ldr r0, [r6, r0] - bl ov13_02225304 - ldr r0, _02225548 ; =0x00002034 - mov r1, #2 - ldr r0, [r6, r0] - bl ov13_02225304 - add r0, r5, r4 - add r0, #0x28 - mov r1, #0x90 - ldrb r0, [r0] - add r2, r1, #0 - bl ov13_022253DC - add r7, r0, #0 - add r0, r5, r4 - add r0, #0x28 - ldrb r0, [r0] - mov r1, #2 - mov r2, #0x18 - bl ov13_022253DC - add r2, r0, #0 - ldr r0, _02225538 ; =0x00002024 - add r1, r7, #0 - ldr r0, [r6, r0] - bl ov13_022249AC - add r0, r5, r4 - add r0, #0x29 - ldrb r0, [r0] - mov r1, #0xa4 - mov r2, #0x90 - bl ov13_022253DC - add r7, r0, #0 - add r0, r5, r4 - add r0, #0x29 - ldrb r0, [r0] - mov r1, #0x10 - mov r2, #0x18 - bl ov13_022253DC - add r2, r0, #0 - ldr r0, _0222553C ; =0x00002028 - add r1, r7, #0 - ldr r0, [r6, r0] - bl ov13_022249AC - add r0, r5, r4 - add r0, #0x2a - ldrb r0, [r0] - mov r1, #0x9c - mov r2, #0x90 - bl ov13_022253DC - add r7, r0, #0 - add r0, r5, r4 - add r0, #0x2a - ldrb r0, [r0] - mov r1, #0x29 - mov r2, #0x18 - bl ov13_022253DC - add r2, r0, #0 - ldr r0, _02225540 ; =0x0000202C - add r1, r7, #0 - ldr r0, [r6, r0] - bl ov13_022249AC - add r0, r5, r4 - add r0, #0x2b - ldrb r0, [r0] - mov r1, #0x83 - mov r2, #0x8f - bl ov13_022253DC - add r7, r0, #0 - add r0, r5, r4 - add r0, #0x2b - ldrb r0, [r0] - mov r1, #0x29 - mov r2, #0x18 - bl ov13_022253DC - add r2, r0, #0 - ldr r0, _02225544 ; =0x00002030 - add r1, r7, #0 - ldr r0, [r6, r0] - bl ov13_022249AC - add r0, r5, r4 - add r0, #0x2c - ldrb r0, [r0] - mov r1, #0x7b - mov r2, #0x8f - bl ov13_022253DC - add r7, r0, #0 - add r0, r5, r4 - add r0, #0x2c - ldrb r0, [r0] - mov r1, #0x10 - mov r2, #0x18 - bl ov13_022253DC - add r2, r0, #0 - ldr r0, _02225548 ; =0x00002034 - add r1, r7, #0 - ldr r0, [r6, r0] - bl ov13_022249AC - pop {r3, r4, r5, r6, r7, pc} - nop -_02225538: .word 0x00002024 -_0222553C: .word 0x00002028 -_02225540: .word 0x0000202C -_02225544: .word 0x00002030 -_02225548: .word 0x00002034 - thumb_func_end ov13_02225420 - - thumb_func_start ov13_0222554C -ov13_0222554C: ; 0x0222554C - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl ov16_0223E010 - ldr r1, _022255A8 ; =0x0000B018 - mov r2, #0x7a - str r1, [sp] - sub r1, #0xc - str r1, [sp, #4] - str r1, [sp, #8] - str r1, [sp, #0xc] - ldr r1, _022255AC ; =0x00001FB4 - ldr r3, [r5, #0] - lsl r2, r2, #2 - ldr r1, [r5, r1] - ldr r2, [r5, r2] - ldr r3, [r3, #0xc] - add r4, r0, #0 - bl ov16_0226DB7C - ldr r3, _022255B0 ; =0x0000B00C - mov r0, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r1, _022255AC ; =0x00001FB4 - ldr r2, [r5, #0] - ldr r1, [r5, r1] - ldr r2, [r2, #0xc] - add r0, r4, #0 - add r3, #0xc - bl ov16_0226DC24 - add r1, r0, #0 - ldr r0, _022255B4 ; =0x00002088 - ldr r0, [r5, r0] - bl ov13_02228A64 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_022255A8: .word 0x0000B018 -_022255AC: .word 0x00001FB4 -_022255B0: .word 0x0000B00C -_022255B4: .word 0x00002088 - thumb_func_end ov13_0222554C - - thumb_func_start ov13_022255B8 -ov13_022255B8: ; 0x022255B8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, _022255E0 ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228A58 - bl ov16_0226DCA8 - ldr r2, _022255E4 ; =0x0000B00C - ldr r0, _022255E8 ; =0x00001FB4 - str r2, [sp] - add r1, r2, #0 - ldr r0, [r4, r0] - add r1, #0xc - add r3, r2, #0 - bl ov16_0226DBFC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_022255E0: .word 0x00002088 -_022255E4: .word 0x0000B00C -_022255E8: .word 0x00001FB4 - thumb_func_end ov13_022255B8 - - thumb_func_start ov13_022255EC -ov13_022255EC: ; 0x022255EC - push {r3, lr} - ldr r1, _02225610 ; =0x00002077 - ldrb r2, [r0, r1] - lsl r2, r2, #0x18 - lsr r2, r2, #0x1c - bne _02225604 - add r1, #0x11 - ldr r0, [r0, r1] - mov r1, #0x5f - bl ov13_02228AC8 - pop {r3, pc} -_02225604: - add r1, #0x11 - ldr r0, [r0, r1] - mov r1, #0x7f - bl ov13_02228AC8 - pop {r3, pc} - ; .align 2, 0 -_02225610: .word 0x00002077 - thumb_func_end ov13_022255EC - - thumb_func_start ov13_02225614 -ov13_02225614: ; 0x02225614 - push {r3, lr} - ldr r1, _02225638 ; =0x00002077 - ldrb r2, [r0, r1] - lsl r2, r2, #0x18 - lsr r2, r2, #0x1c - bne _0222562C - add r1, #0x11 - ldr r0, [r0, r1] - mov r1, #5 - bl ov13_02228AC8 - pop {r3, pc} -_0222562C: - add r1, #0x11 - ldr r0, [r0, r1] - mov r1, #7 - bl ov13_02228AC8 - pop {r3, pc} - ; .align 2, 0 -_02225638: .word 0x00002077 - thumb_func_end ov13_02225614 - - thumb_func_start ov13_0222563C -ov13_0222563C: ; 0x0222563C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, _022256DC ; =0x00002088 - ldr r1, _022256E0 ; =0x0222938C - lsl r2, r5, #2 - ldr r0, [r4, r0] - ldr r1, [r1, r2] - bl ov13_02228A9C - cmp r5, #9 - bhi _022256DA - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02225660: ; jump table - .short _02225674 - _02225660 - 2 ; case 0 - .short _0222568E - _02225660 - 2 ; case 1 - .short _022256DA - _02225660 - 2 ; case 2 - .short _022256A4 - _02225660 - 2 ; case 3 - .short _022256A4 - _02225660 - 2 ; case 4 - .short _022256DA - _02225660 - 2 ; case 5 - .short _022256B4 - _02225660 - 2 ; case 6 - .short _022256C8 - _02225660 - 2 ; case 7 - .short _022256B4 - _02225660 - 2 ; case 8 - .short _022256C8 - _02225660 - 2 ; case 9 -_02225674: - ldr r1, [r4, #0] - ldr r0, _022256DC ; =0x00002088 - ldrb r1, [r1, #0x11] - ldr r0, [r4, r0] - bl ov13_02228A68 - ldr r0, _022256E4 ; =0x0000208C - mov r1, #0 - strb r1, [r4, r0] - ldr r0, [r4, #0] - add r0, #0x34 - strb r1, [r0] - pop {r3, r4, r5, pc} -_0222568E: - ldr r1, _022256DC ; =0x00002088 - ldr r0, [r4, r1] - add r1, r1, #4 - ldrb r1, [r4, r1] - bl ov13_02228A68 - ldr r0, [r4, #0] - mov r1, #0 - add r0, #0x34 - strb r1, [r0] - pop {r3, r4, r5, pc} -_022256A4: - ldr r1, [r4, #0] - ldr r0, _022256DC ; =0x00002088 - add r1, #0x34 - ldrb r1, [r1] - ldr r0, [r4, r0] - bl ov13_02228A68 - pop {r3, r4, r5, pc} -_022256B4: - add r0, r4, #0 - bl ov13_022255EC - ldr r1, _022256DC ; =0x00002088 - ldr r0, [r4, r1] - add r1, r1, #5 - ldrb r1, [r4, r1] - bl ov13_02228A68 - pop {r3, r4, r5, pc} -_022256C8: - add r0, r4, #0 - bl ov13_02225614 - ldr r1, _022256DC ; =0x00002088 - ldr r0, [r4, r1] - add r1, r1, #6 - ldrb r1, [r4, r1] - bl ov13_02228A68 -_022256DA: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022256DC: .word 0x00002088 -_022256E0: .word 0x0222938C -_022256E4: .word 0x0000208C - thumb_func_end ov13_0222563C - - thumb_func_start ov13_022256E8 -ov13_022256E8: ; 0x022256E8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0222570C ; =0x00002088 - mov r1, #0 - ldr r0, [r4, r0] - bl ov13_02228A60 - ldr r0, _0222570C ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228A90 - ldr r0, _0222570C ; =0x00002088 - ldr r0, [r4, r0] - bl ov13_02228A58 - bl ov16_0226DDE8 - pop {r4, pc} - ; .align 2, 0 -_0222570C: .word 0x00002088 - thumb_func_end ov13_022256E8 - - thumb_func_start ov13_02225710 -ov13_02225710: ; 0x02225710 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x7b - lsl r0, r0, #2 - mov r2, #0 - add r0, r5, r0 - add r3, r2, #0 - add r4, r1, #0 - bl ov13_02225AF0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xab - lsl r0, r0, #2 - mov r3, #6 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - str r3, [sp, #4] - bl ov13_02225AF0 - mov r0, #0x10 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0xdb - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - mov r3, #0xc - bl ov13_02225AF0 - mov r0, #0x10 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _022259D0 ; =0x0000042C - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x12 - bl ov13_02225AF0 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _022259D4 ; =0x000004EC - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0 - bl ov13_02225AF0 - ldr r0, _022259D8 ; =0x000005AC - mov r2, #0x10 - str r2, [sp] - mov r3, #6 - add r0, r5, r0 - add r1, r4, #0 - str r3, [sp, #4] - bl ov13_02225AF0 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _022259DC ; =0x0000066C - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0xc - bl ov13_02225AF0 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _022259E0 ; =0x0000072C - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0x12 - bl ov13_02225AF0 - mov r0, #0xd - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _022259E4 ; =0x000007EC - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x27 - bl ov13_02225AF0 - mov r0, #0xd - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _022259E8 ; =0x0000086E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x2c - bl ov13_02225AF0 - mov r2, #0xd - str r2, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #0x8f - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x27 - bl ov13_02225AF0 - mov r2, #0xd - str r2, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _022259EC ; =0x00000972 - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0x2c - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022259F0 ; =0x000009F4 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x31 - bl ov13_02225AF0 - ldr r0, _022259F4 ; =0x00000A26 - mov r2, #5 - str r2, [sp] - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x31 - str r2, [sp, #4] - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022259F8 ; =0x00000A58 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xa - mov r3, #0x31 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022259FC ; =0x00000A8A - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xf - mov r3, #0x31 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02225A00 ; =0x00000ABC - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x36 - bl ov13_02225AF0 - ldr r0, _02225A04 ; =0x00000AEE - mov r2, #5 - str r2, [sp] - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x36 - str r2, [sp, #4] - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0xb2 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0xa - mov r3, #0x36 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02225A08 ; =0x00000B52 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xf - mov r3, #0x36 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02225A0C ; =0x00000B84 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1a - mov r3, #0x18 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02225A10 ; =0x00000BB6 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1a - mov r3, #0x1d - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02225A14 ; =0x00000BE8 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1a - mov r3, #0x22 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02225A18 ; =0x00000C1A - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1a - mov r3, #0x27 - bl ov13_02225AF0 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #0x6d - lsl r0, r0, #6 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - mov r3, #0x18 - bl ov13_02225AF0 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _02225A1C ; =0x00001C44 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x1d - bl ov13_02225AF0 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _02225A20 ; =0x00001D48 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x22 - bl ov13_02225AF0 - mov r0, #9 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _02225A24 ; =0x00001E4C - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x31 - bl ov13_02225AF0 - mov r0, #9 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _02225A28 ; =0x00001E94 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x35 - bl ov13_02225AF0 - mov r0, #9 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _02225A2C ; =0x00001EDC - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x39 - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02225A30 ; =0x00001F24 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x3b - bl ov13_02225AF0 - mov r2, #5 - str r2, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02225A34 ; =0x00001F38 - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0x3b - bl ov13_02225AF0 - mov r0, #5 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02225A38 ; =0x00001F4C - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xa - mov r3, #0x3b - bl ov13_02225AF0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_022259D0: .word 0x0000042C -_022259D4: .word 0x000004EC -_022259D8: .word 0x000005AC -_022259DC: .word 0x0000066C -_022259E0: .word 0x0000072C -_022259E4: .word 0x000007EC -_022259E8: .word 0x0000086E -_022259EC: .word 0x00000972 -_022259F0: .word 0x000009F4 -_022259F4: .word 0x00000A26 -_022259F8: .word 0x00000A58 -_022259FC: .word 0x00000A8A -_02225A00: .word 0x00000ABC -_02225A04: .word 0x00000AEE -_02225A08: .word 0x00000B52 -_02225A0C: .word 0x00000B84 -_02225A10: .word 0x00000BB6 -_02225A14: .word 0x00000BE8 -_02225A18: .word 0x00000C1A -_02225A1C: .word 0x00001C44 -_02225A20: .word 0x00001D48 -_02225A24: .word 0x00001E4C -_02225A28: .word 0x00001E94 -_02225A2C: .word 0x00001EDC -_02225A30: .word 0x00001F24 -_02225A34: .word 0x00001F38 -_02225A38: .word 0x00001F4C - thumb_func_end ov13_02225710 - - thumb_func_start ov13_02225A3C -ov13_02225A3C: ; 0x02225A3C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x1e - str r0, [sp] - mov r0, #0x11 - str r0, [sp, #4] - ldr r0, _02225AE4 ; =0x00000C4C - mov r2, #0 - add r0, r5, r0 - add r3, r2, #0 - add r4, r1, #0 - bl ov13_02225AF0 - mov r0, #0x1e - str r0, [sp] - ldr r0, _02225AE8 ; =0x00001048 - mov r3, #0x11 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - str r3, [sp, #4] - bl ov13_02225AF0 - mov r0, #0x1e - str r0, [sp] - mov r0, #0x11 - str r0, [sp, #4] - ldr r0, _02225AEC ; =0x00001444 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x22 - bl ov13_02225AF0 - mov r0, #0x10 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x61 - lsl r0, r0, #6 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - mov r3, #0x33 - bl ov13_02225AF0 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x19 - lsl r0, r0, #8 - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x33 - bl ov13_02225AF0 - mov r0, #0x10 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x67 - lsl r0, r0, #6 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - mov r3, #0x39 - bl ov13_02225AF0 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x6a - lsl r0, r0, #6 - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x39 - bl ov13_02225AF0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02225AE4: .word 0x00000C4C -_02225AE8: .word 0x00001048 -_02225AEC: .word 0x00001444 - thumb_func_end ov13_02225A3C - - thumb_func_start ov13_02225AF0 -ov13_02225AF0: ; 0x02225AF0 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r0, sp, #8 - mov lr, r3 - ldrb r3, [r0, #0x14] - mov r6, #0 - mov ip, r3 - cmp r3, #0 - ble _02225B3C - ldrb r3, [r0, #0x10] - lsl r2, r2, #1 - add r7, r1, r2 -_02225B08: - mov r2, #0 - cmp r3, #0 - ble _02225B30 - mov r0, lr - add r0, r0, r6 - lsl r0, r0, #6 - add r5, r7, r0 - add r0, r6, #0 - mul r0, r3 - lsl r1, r0, #1 - ldr r0, [sp] - add r4, r0, r1 -_02225B20: - lsl r1, r2, #1 - ldrh r0, [r5, r1] - strh r0, [r4, r1] - add r0, r2, #1 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - cmp r2, r3 - blt _02225B20 -_02225B30: - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - mov r0, ip - cmp r6, r0 - blt _02225B08 -_02225B3C: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02225AF0 - - thumb_func_start ov13_02225B40 -ov13_02225B40: ; 0x02225B40 - cmp r1, #0x21 - bhi _02225C26 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02225B50: ; jump table - .short _02225B94 - _02225B50 - 2 ; case 0 - .short _02225B94 - _02225B50 - 2 ; case 1 - .short _02225B94 - _02225B50 - 2 ; case 2 - .short _02225B94 - _02225B50 - 2 ; case 3 - .short _02225B94 - _02225B50 - 2 ; case 4 - .short _02225B94 - _02225B50 - 2 ; case 5 - .short _02225BB2 - _02225B50 - 2 ; case 6 - .short _02225BBE - _02225B50 - 2 ; case 7 - .short _02225BCC - _02225B50 - 2 ; case 8 - .short _02225BCC - _02225B50 - 2 ; case 9 - .short _02225BCC - _02225B50 - 2 ; case 10 - .short _02225BCC - _02225B50 - 2 ; case 11 - .short _02225BD8 - _02225B50 - 2 ; case 12 - .short _02225BE4 - _02225B50 - 2 ; case 13 - .short _02225BF0 - _02225B50 - 2 ; case 14 - .short _02225BF0 - _02225B50 - 2 ; case 15 - .short _02225BF0 - _02225B50 - 2 ; case 16 - .short _02225BF0 - _02225B50 - 2 ; case 17 - .short _02225C0E - _02225B50 - 2 ; case 18 - .short _02225BF0 - _02225B50 - 2 ; case 19 - .short _02225BF0 - _02225B50 - 2 ; case 20 - .short _02225BF0 - _02225B50 - 2 ; case 21 - .short _02225BF0 - _02225B50 - 2 ; case 22 - .short _02225BF0 - _02225B50 - 2 ; case 23 - .short _02225BF0 - _02225B50 - 2 ; case 24 - .short _02225BF0 - _02225B50 - 2 ; case 25 - .short _02225BF0 - _02225B50 - 2 ; case 26 - .short _02225BF0 - _02225B50 - 2 ; case 27 - .short _02225BFE - _02225B50 - 2 ; case 28 - .short _02225BFE - _02225B50 - 2 ; case 29 - .short _02225C1A - _02225B50 - 2 ; case 30 - .short _02225C1A - _02225B50 - 2 ; case 31 - .short _02225C1A - _02225B50 - 2 ; case 32 - .short _02225C1A - _02225B50 - 2 ; case 33 -_02225B94: - cmp r3, #0 - bne _02225BA6 - mov r1, #0x7b - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0xc0 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BA6: - ldr r1, _02225C2C ; =0x000004EC - add r1, r0, r1 - mov r0, #0xc0 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BB2: - ldr r1, _02225C30 ; =0x00000B84 - add r1, r0, r1 - mov r0, #0x32 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BBE: - ldr r1, _02225C34 ; =0x00000C4C - add r1, r0, r1 - mov r0, #0xff - lsl r0, r0, #2 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BCC: - ldr r1, _02225C38 ; =0x000007EC - add r1, r0, r1 - mov r0, #0x82 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BD8: - ldr r1, _02225C3C ; =0x000009F4 - add r1, r0, r1 - mov r0, #0x32 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BE4: - ldr r1, _02225C40 ; =0x00000ABC - add r1, r0, r1 - mov r0, #0x32 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BF0: - mov r1, #0x61 - lsl r1, r1, #6 - add r1, r0, r1 - mov r0, #0xc0 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225BFE: - mov r1, #0x6d - lsl r1, r1, #6 - add r1, r0, r1 - lsl r0, r2, #6 - add r0, r2, r0 - lsl r0, r0, #2 - add r0, r1, r0 - bx lr -_02225C0E: - ldr r1, _02225C44 ; =0x00001E4C - add r1, r0, r1 - mov r0, #0x48 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225C1A: - ldr r1, _02225C48 ; =0x00001F24 - add r1, r0, r1 - mov r0, #0x14 - mul r0, r2 - add r0, r1, r0 - bx lr -_02225C26: - mov r0, #0 - bx lr - nop -_02225C2C: .word 0x000004EC -_02225C30: .word 0x00000B84 -_02225C34: .word 0x00000C4C -_02225C38: .word 0x000007EC -_02225C3C: .word 0x000009F4 -_02225C40: .word 0x00000ABC -_02225C44: .word 0x00001E4C -_02225C48: .word 0x00001F24 - thumb_func_end ov13_02225B40 - - thumb_func_start ov13_02225C4C -ov13_02225C4C: ; 0x02225C4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r2, #0 - add r2, r3, #0 - add r3, sp, #0x10 - add r4, r1, #0 - ldrb r3, [r3, #0x10] - add r1, r7, #0 - str r0, [sp] - bl ov13_02225B40 - add r1, r0, #0 - ldr r2, _02225D80 ; =0x02229926 - lsl r0, r7, #2 - ldrb r6, [r2, r0] - ldr r2, _02225D84 ; =0x02229927 - ldrb r0, [r2, r0] - add r5, r6, #0 - mul r5, r0 - add r0, r4, #0 - lsl r2, r5, #1 - bl sub_020D50B8 - cmp r7, #5 - bgt _02225C9A - cmp r7, #0 - blt _02225D7C - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02225C8E: ; jump table - .short _02225CA2 - _02225C8E - 2 ; case 0 - .short _02225CA2 - _02225C8E - 2 ; case 1 - .short _02225CA2 - _02225C8E - 2 ; case 2 - .short _02225CA2 - _02225C8E - 2 ; case 3 - .short _02225CA2 - _02225C8E - 2 ; case 4 - .short _02225CA2 - _02225C8E - 2 ; case 5 -_02225C9A: - cmp r7, #0x1b - beq _02225D5C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02225CA2: - mov r0, #0x50 - add r1, r7, #0 - mul r1, r0 - ldr r0, [sp] - add r0, r0, r1 - ldrh r1, [r0, #8] - cmp r1, #0 - beq _02225D7C - ldrb r1, [r0, #0x1b] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1f - beq _02225D02 - lsl r2, r6, #1 - add r0, r2, #5 - lsl r0, r0, #1 - ldrh r1, [r4, r0] - add r0, sp, #4 - strh r1, [r0] - add r1, r6, r2 - add r1, r1, #5 - lsl r1, r1, #1 - ldrh r1, [r4, r1] - strh r1, [r0, #2] - mov r1, #0 - add r0, sp, #4 -_02225CD4: - add r5, r1, #2 - lsl r3, r1, #1 - add r7, r5, #0 - mul r7, r6 - lsl r5, r7, #1 - ldrh r3, [r0, r3] - mov r2, #0 - add r5, r4, r5 -_02225CE4: - lsl r7, r2, #1 - add r2, r2, #1 - lsl r2, r2, #0x18 - add r7, r5, r7 - lsr r2, r2, #0x18 - strh r3, [r7, #0xc] - cmp r2, #9 - blo _02225CE4 - add r1, r1, #1 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - cmp r1, #2 - blo _02225CD4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02225D02: - ldrh r0, [r0, #0x14] - cmp r0, #0 - bne _02225D2C - mov r1, #0 - cmp r5, #0 - ble _02225D7C - mov r3, #2 - ldr r2, _02225D88 ; =0x00000FFF - lsl r3, r3, #0xc -_02225D14: - lsl r0, r1, #1 - ldrh r6, [r4, r0] - and r6, r2 - orr r6, r3 - strh r6, [r4, r0] - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, r5 - blt _02225D14 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02225D2C: - lsl r1, r7, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - bl ov13_022219AC - cmp r0, #1 - bne _02225D7C - mov r1, #0 - cmp r5, #0 - ble _02225D7C - ldr r2, _02225D88 ; =0x00000FFF - add r3, r2, #1 -_02225D44: - lsl r0, r1, #1 - ldrh r6, [r4, r0] - and r6, r2 - orr r6, r3 - strh r6, [r4, r0] - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, r5 - blt _02225D44 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02225D5C: - mov r1, #0 - cmp r5, #0 - ble _02225D7C - mov r3, #0xa - ldr r2, _02225D88 ; =0x00000FFF - lsl r3, r3, #0xc -_02225D68: - lsl r0, r1, #1 - ldrh r6, [r4, r0] - and r6, r2 - orr r6, r3 - strh r6, [r4, r0] - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, r5 - blt _02225D68 -_02225D7C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02225D80: .word 0x02229926 -_02225D84: .word 0x02229927 -_02225D88: .word 0x00000FFF - thumb_func_end ov13_02225C4C - - thumb_func_start ov13_02225D8C -ov13_02225D8C: ; 0x02225D8C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r1, [sp, #0xc] - str r2, [sp, #0x10] - str r3, [sp, #0x14] - add r5, r0, #0 - ldr r0, [sp, #0xc] - lsl r4, r0, #2 - ldr r0, _02225DF8 ; =0x02229927 - ldrb r7, [r0, r4] - ldr r0, _02225DFC ; =0x02229926 - ldrb r6, [r0, r4] - ldr r0, [r5, #0] - add r1, r6, #0 - mul r1, r7 - ldr r0, [r0, #0xc] - lsl r1, r1, #1 - bl sub_02018144 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - add r0, r5, #0 - bl ov13_02225C4C - ldr r0, _02225E00 ; =0x02229925 - ldr r3, _02225E04 ; =0x02229924 - ldrb r0, [r0, r4] - ldrb r3, [r3, r4] - ldr r2, [sp, #0x18] - str r0, [sp] - str r6, [sp, #4] - mov r0, #0x79 - str r7, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl sub_020198C0 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl sub_0201C3C0 - ldr r0, [sp, #0x18] - bl sub_020181C4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02225DF8: .word 0x02229927 -_02225DFC: .word 0x02229926 -_02225E00: .word 0x02229925 -_02225E04: .word 0x02229924 - thumb_func_end ov13_02225D8C - - thumb_func_start ov13_02225E08 -ov13_02225E08: ; 0x02225E08 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02225EA8 ; =0x0222989C - lsl r3, r1, #2 - ldr r6, [r0, r3] - cmp r6, #0 - beq _02225EA6 - cmp r1, #5 - bhi _02225E22 - ldr r0, _02225EAC ; =0x0222988C - ldrb r0, [r0, r2] - str r0, [sp] - b _02225E28 -_02225E22: - ldr r0, _02225EB0 ; =0x0222987C - ldrb r0, [r0, r2] - str r0, [sp] -_02225E28: - cmp r2, #0 - beq _02225E36 - cmp r2, #1 - beq _02225E3A - cmp r2, #2 - beq _02225E3E - b _02225E40 -_02225E36: - mov r7, #1 - b _02225E40 -_02225E3A: - mov r7, #0 - b _02225E40 -_02225E3E: - mov r7, #1 -_02225E40: - cmp r1, #0xe - blo _02225E74 - cmp r1, #0x11 - bhi _02225E74 - ldr r1, _02225EB4 ; =0x00002070 - ldr r2, [sp] - ldr r0, [r5, r1] - add r1, r1, #5 - ldrb r1, [r5, r1] - mov r3, #0 - ldrb r1, [r6, r1] - lsl r1, r1, #4 - add r0, r0, r1 - add r1, r7, #0 - bl sub_0201C04C - ldr r1, _02225EB4 ; =0x00002070 - ldr r0, [r5, r1] - add r1, r1, #5 - ldrb r1, [r5, r1] - ldrb r1, [r6, r1] - lsl r1, r1, #4 - add r0, r0, r1 - bl sub_0201A9A4 - pop {r3, r4, r5, r6, r7, pc} -_02225E74: - mov r4, #0 -_02225E76: - ldrb r2, [r6, r4] - cmp r2, #0xff - beq _02225EA6 - ldr r0, _02225EB4 ; =0x00002070 - mov r3, #0 - ldr r1, [r5, r0] - lsl r0, r2, #4 - add r0, r1, r0 - ldr r2, [sp] - add r1, r7, #0 - bl sub_0201C04C - ldr r0, _02225EB4 ; =0x00002070 - ldr r1, [r5, r0] - ldrb r0, [r6, r4] - lsl r0, r0, #4 - add r0, r1, r0 - bl sub_0201A9A4 - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #8 - blo _02225E76 -_02225EA6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02225EA8: .word 0x0222989C -_02225EAC: .word 0x0222988C -_02225EB0: .word 0x0222987C -_02225EB4: .word 0x00002070 - thumb_func_end ov13_02225E08 - - thumb_func_start ov13_02225EB8 -ov13_02225EB8: ; 0x02225EB8 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #0x1b - bhi _02225FBC - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02225ECE: ; jump table - .short _02225F06 - _02225ECE - 2 ; case 0 - .short _02225F06 - _02225ECE - 2 ; case 1 - .short _02225F06 - _02225ECE - 2 ; case 2 - .short _02225F06 - _02225ECE - 2 ; case 3 - .short _02225F06 - _02225ECE - 2 ; case 4 - .short _02225F06 - _02225ECE - 2 ; case 5 - .short _02225FBC - _02225ECE - 2 ; case 6 - .short _02225F44 - _02225ECE - 2 ; case 7 - .short _02225FBC - _02225ECE - 2 ; case 8 - .short _02225FBC - _02225ECE - 2 ; case 9 - .short _02225FBC - _02225ECE - 2 ; case 10 - .short _02225FBC - _02225ECE - 2 ; case 11 - .short _02225FBC - _02225ECE - 2 ; case 12 - .short _02225FBC - _02225ECE - 2 ; case 13 - .short _02225F76 - _02225ECE - 2 ; case 14 - .short _02225F76 - _02225ECE - 2 ; case 15 - .short _02225F76 - _02225ECE - 2 ; case 16 - .short _02225F76 - _02225ECE - 2 ; case 17 - .short _02225FBC - _02225ECE - 2 ; case 18 - .short _02225F8E - _02225ECE - 2 ; case 19 - .short _02225F8E - _02225ECE - 2 ; case 20 - .short _02225F8E - _02225ECE - 2 ; case 21 - .short _02225F8E - _02225ECE - 2 ; case 22 - .short _02225FA6 - _02225ECE - 2 ; case 23 - .short _02225FA6 - _02225ECE - 2 ; case 24 - .short _02225FA6 - _02225ECE - 2 ; case 25 - .short _02225FA6 - _02225ECE - 2 ; case 26 - .short _02225FA6 - _02225ECE - 2 ; case 27 -_02225F06: - ldr r0, _02225FC0 ; =0x02229896 - lsl r1, r2, #1 - ldrsh r6, [r0, r1] - add r0, r5, #0 - add r0, #0xd - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - add r2, r6, #0 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - lsl r0, r5, #2 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - add r2, r6, #0 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - add r0, r5, #7 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - add r2, r6, #0 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - pop {r4, r5, r6, pc} -_02225F44: - ldr r0, _02225FC8 ; =0x02229890 - lsl r1, r2, #1 - ldrsh r5, [r0, r1] - ldr r0, [r4, #0] - ldrb r0, [r0, #0x11] - add r2, r5, #0 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - ldr r0, [r4, #0] - add r2, r5, #0 - ldrb r0, [r0, #0x11] - add r0, r0, #7 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - pop {r4, r5, r6, pc} -_02225F76: - add r0, r5, #7 - lsl r0, r0, #2 - lsl r3, r2, #1 - ldr r2, _02225FC8 ; =0x02229890 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - ldrsh r2, [r2, r3] - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - pop {r4, r5, r6, pc} -_02225F8E: - add r0, r5, #2 - lsl r0, r0, #2 - lsl r3, r2, #1 - ldr r2, _02225FC8 ; =0x02229890 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - ldrsh r2, [r2, r3] - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC - pop {r4, r5, r6, pc} -_02225FA6: - sub r0, r5, #2 - lsl r0, r0, #2 - lsl r3, r2, #1 - ldr r2, _02225FC8 ; =0x02229890 - add r1, r4, r0 - ldr r0, _02225FC4 ; =0x00001FB8 - ldrsh r2, [r2, r3] - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D5DC -_02225FBC: - pop {r4, r5, r6, pc} - nop -_02225FC0: .word 0x02229896 -_02225FC4: .word 0x00001FB8 -_02225FC8: .word 0x02229890 - thumb_func_end ov13_02225EB8 - - thumb_func_start ov13_02225FCC -ov13_02225FCC: ; 0x02225FCC - push {r4, r5, r6, lr} - ldr r3, _02226014 ; =0x00001FA3 - add r5, r0, #0 - ldrb r6, [r5, r3] - mov r2, #0x70 - add r4, r1, #0 - bic r6, r2 - strb r6, [r5, r3] - cmp r4, #5 - bhi _02225FF6 - bl ov13_022213F0 - cmp r0, #2 - bne _02225FF6 - ldr r1, _02226014 ; =0x00001FA3 - mov r0, #0x70 - ldrb r2, [r5, r1] - bic r2, r0 - mov r0, #0x10 - orr r0, r2 - strb r0, [r5, r1] -_02225FF6: - ldr r0, _02226018 ; =0x00001FA0 - mov r2, #0 - strb r2, [r5, r0] - add r1, r0, #1 - strb r2, [r5, r1] - add r1, r0, #2 - strb r4, [r5, r1] - add r1, r0, #3 - ldrb r2, [r5, r1] - mov r1, #0x80 - add r0, r0, #3 - orr r1, r2 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} - nop -_02226014: .word 0x00001FA3 -_02226018: .word 0x00001FA0 - thumb_func_end ov13_02225FCC - - thumb_func_start ov13_0222601C -ov13_0222601C: ; 0x0222601C - push {r4, lr} - ldr r2, _022260E0 ; =0x00001FA3 - add r4, r0, #0 - ldrb r3, [r4, r2] - lsl r1, r3, #0x18 - lsr r1, r1, #0x1f - beq _022260DC - sub r1, r2, #3 - ldrb r1, [r4, r1] - cmp r1, #0 - beq _0222603C - cmp r1, #1 - beq _02226070 - cmp r1, #2 - beq _022260A4 - pop {r4, pc} -_0222603C: - sub r1, r2, #1 - ldrb r1, [r4, r1] - lsl r3, r3, #0x19 - mov r2, #1 - lsr r3, r3, #0x1d - bl ov13_02225D8C - ldr r1, _022260E4 ; =0x00001FA2 - add r0, r4, #0 - ldrb r1, [r4, r1] - mov r2, #1 - bl ov13_02225E08 - ldr r1, _022260E4 ; =0x00001FA2 - add r0, r4, #0 - ldrb r1, [r4, r1] - mov r2, #1 - bl ov13_02225EB8 - ldr r0, _022260E8 ; =0x00001FA1 - mov r1, #0 - strb r1, [r4, r0] - mov r1, #1 - sub r0, r0, #1 - strb r1, [r4, r0] - pop {r4, pc} -_02226070: - sub r1, r2, #1 - ldrb r1, [r4, r1] - lsl r3, r3, #0x19 - mov r2, #2 - lsr r3, r3, #0x1d - bl ov13_02225D8C - ldr r1, _022260E4 ; =0x00001FA2 - add r0, r4, #0 - ldrb r1, [r4, r1] - mov r2, #2 - bl ov13_02225E08 - ldr r1, _022260E4 ; =0x00001FA2 - add r0, r4, #0 - ldrb r1, [r4, r1] - mov r2, #2 - bl ov13_02225EB8 - ldr r0, _022260E8 ; =0x00001FA1 - mov r1, #0 - strb r1, [r4, r0] - mov r1, #2 - sub r0, r0, #1 - strb r1, [r4, r0] - pop {r4, pc} -_022260A4: - sub r1, r2, #1 - ldrb r1, [r4, r1] - lsl r3, r3, #0x19 - mov r2, #0 - lsr r3, r3, #0x1d - bl ov13_02225D8C - ldr r1, _022260E4 ; =0x00001FA2 - add r0, r4, #0 - ldrb r1, [r4, r1] - mov r2, #0 - bl ov13_02225E08 - ldr r1, _022260E4 ; =0x00001FA2 - add r0, r4, #0 - ldrb r1, [r4, r1] - mov r2, #0 - bl ov13_02225EB8 - ldr r0, _022260E8 ; =0x00001FA1 - mov r1, #0 - strb r1, [r4, r0] - add r1, r0, #2 - ldrb r2, [r4, r1] - mov r1, #0x80 - add r0, r0, #2 - bic r2, r1 - strb r2, [r4, r0] -_022260DC: - pop {r4, pc} - nop -_022260E0: .word 0x00001FA3 -_022260E4: .word 0x00001FA2 -_022260E8: .word 0x00001FA1 - thumb_func_end ov13_0222601C - - thumb_func_start ov13_022260EC -ov13_022260EC: ; 0x022260EC - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - cmp r1, #9 - bls _022260F6 - b _0222643E -_022260F6: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02226102: ; jump table - .short _02226116 - _02226102 - 2 ; case 0 - .short _0222618E - _02226102 - 2 ; case 1 - .short _022261EA - _02226102 - 2 ; case 2 - .short _0222623E - _02226102 - 2 ; case 3 - .short _022262DC - _02226102 - 2 ; case 4 - .short _02226328 - _02226102 - 2 ; case 5 - .short _02226380 - _02226102 - 2 ; case 6 - .short _022263E0 - _02226102 - 2 ; case 7 - .short _02226380 - _02226102 - 2 ; case 8 - .short _02226410 - _02226102 - 2 ; case 9 -_02226116: - mov r5, #0 - mov r6, #3 - mov r7, #1 -_0222611C: - add r0, r4, #0 - add r1, r5, #0 - bl ov13_022213F0 - cmp r0, #0 - bne _02226138 - lsl r1, r5, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r2, r6, #0 - add r3, r7, #0 - bl ov13_02225D8C - b _0222615E -_02226138: - cmp r0, #1 - bne _0222614C - lsl r1, r5, #0x18 - mov r2, #0 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl ov13_02225D8C - b _0222615E -_0222614C: - cmp r0, #2 - bne _0222615E - lsl r1, r5, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - mov r2, #0 - mov r3, #1 - bl ov13_02225D8C -_0222615E: - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #6 - blo _0222611C - ldr r0, [r4, #0] - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #1 - bne _02226180 - add r0, r4, #0 - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_02226180: - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_0222618E: - mov r2, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #7 - add r3, r2, #0 - bl ov13_02225D8C - ldr r0, [r4, #0] - ldrb r1, [r0, #0x11] - mov r0, #0x50 - mul r0, r1 - add r0, r4, r0 - ldrb r0, [r0, #0x1b] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - beq _022261D0 - add r0, r4, #0 - mov r1, #8 - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C - add r0, r4, #0 - mov r1, #0xa - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_022261D0: - mov r2, #0 - add r0, r4, #0 - mov r1, #8 - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0xa - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_022261EA: - bl ov13_02226484 - cmp r0, #1 - bne _0222620C - mov r2, #0 - add r0, r4, #0 - mov r1, #0xc - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0xd - add r3, r2, #0 - bl ov13_02225D8C - b _02226224 -_0222620C: - add r0, r4, #0 - mov r1, #0xc - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C - add r0, r4, #0 - mov r1, #0xd - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C -_02226224: - mov r2, #0 - add r0, r4, #0 - mov r1, #0xb - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_0222623E: - bl ov13_02226484 - cmp r0, #1 - bne _02226260 - mov r2, #0 - add r0, r4, #0 - mov r1, #0xc - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0xd - add r3, r2, #0 - bl ov13_02225D8C - b _02226278 -_02226260: - add r0, r4, #0 - mov r1, #0xc - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C - add r0, r4, #0 - mov r1, #0xd - mov r2, #3 - mov r3, #0 - bl ov13_02225D8C -_02226278: - mov r5, #0 - mov r7, #3 - mov r6, #0x50 -_0222627E: - ldr r0, [r4, #0] - lsl r1, r5, #3 - ldrb r0, [r0, #0x11] - add r2, r0, #0 - mul r2, r6 - add r0, r4, r2 - add r0, r1, r0 - ldrh r0, [r0, #0x34] - cmp r0, #0 - beq _022262A6 - add r1, r5, #0 - add r1, #0xe - lsl r1, r1, #0x18 - mov r2, #0 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl ov13_02225D8C - b _022262B8 -_022262A6: - add r1, r5, #0 - add r1, #0xe - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r2, r7, #0 - mov r3, #0 - bl ov13_02225D8C -_022262B8: - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #4 - blo _0222627E - mov r2, #0 - add r0, r4, #0 - mov r1, #9 - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_022262DC: - mov r2, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - mov r5, #0 - mov r6, #2 - add r7, r5, #0 -_022262EC: - ldr r0, [r4, #0] - add r0, #0x34 - ldrb r0, [r0] - cmp r0, r5 - bne _0222630A - add r1, r5, #0 - add r1, #0x1e - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r2, r6, #0 - add r3, r7, #0 - bl ov13_02225D8C - b _0222631C -_0222630A: - add r1, r5, #0 - add r1, #0x1e - lsl r1, r1, #0x18 - mov r2, #0 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl ov13_02225D8C -_0222631C: - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #4 - blo _022262EC - pop {r3, r4, r5, r6, r7, pc} -_02226328: - mov r5, #0 - mov r7, #3 - mov r6, #0x50 -_0222632E: - ldr r0, [r4, #0] - lsl r1, r5, #3 - ldrb r0, [r0, #0x11] - add r2, r0, #0 - mul r2, r6 - add r0, r4, r2 - add r0, r1, r0 - ldrh r0, [r0, #0x34] - cmp r0, #0 - beq _02226356 - add r1, r5, #0 - add r1, #0x13 - lsl r1, r1, #0x18 - mov r2, #0 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl ov13_02225D8C - b _02226368 -_02226356: - add r1, r5, #0 - add r1, #0x13 - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - add r2, r7, #0 - mov r3, #0 - bl ov13_02225D8C -_02226368: - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #4 - blo _0222632E - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_02226380: - mov r2, #0 - mov r1, #0x17 - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0x18 - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0x19 - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0x1a - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #0x1b - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - ldr r0, _02226440 ; =0x00002077 - ldrb r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - cmp r0, #1 - bne _0222643E - mov r2, #0 - add r0, r4, #0 - mov r1, #0x12 - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_022263E0: - mov r2, #0 - mov r1, #0x1c - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - ldr r0, _02226440 ; =0x00002077 - ldrb r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - cmp r0, #1 - bne _0222643E - mov r2, #0 - add r0, r4, #0 - mov r1, #0x12 - add r3, r2, #0 - bl ov13_02225D8C - pop {r3, r4, r5, r6, r7, pc} -_02226410: - mov r2, #0 - mov r1, #0x1d - add r3, r2, #0 - bl ov13_02225D8C - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl ov13_02225D8C - ldr r0, _02226440 ; =0x00002077 - ldrb r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - cmp r0, #1 - bne _0222643E - mov r2, #0 - add r0, r4, #0 - mov r1, #0x12 - add r3, r2, #0 - bl ov13_02225D8C -_0222643E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02226440: .word 0x00002077 - thumb_func_end ov13_022260EC - - thumb_func_start ov13_02226444 -ov13_02226444: ; 0x02226444 - push {r3, lr} - add r2, r0, #0 - cmp r1, #3 - bne _02226466 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x7a - lsl r0, r0, #2 - mov r1, #0x7e - lsl r1, r1, #6 - ldr r0, [r2, r0] - add r1, r2, r1 - mov r2, #1 - mov r3, #0xc0 - bl sub_02002FBC - pop {r3, pc} -_02226466: - mov r0, #0x20 - str r0, [sp] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r1, _02226480 ; =0x00001F60 - ldr r0, [r2, r0] - add r1, r2, r1 - mov r2, #1 - mov r3, #0xc0 - bl sub_02002FBC - pop {r3, pc} - nop -_02226480: .word 0x00001F60 - thumb_func_end ov13_02226444 - - thumb_func_start ov13_02226484 -ov13_02226484: ; 0x02226484 - push {r4, r5} - mov r2, #0 - add r1, r2, #0 - mov r3, #0x50 -_0222648C: - add r4, r1, #0 - mul r4, r3 - add r5, r0, r4 - ldrh r4, [r5, #8] - cmp r4, #0 - beq _022264A6 - ldrb r4, [r5, #0x1b] - lsl r4, r4, #0x18 - lsr r4, r4, #0x1f - bne _022264A6 - add r2, r2, #1 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 -_022264A6: - add r1, r1, #1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - cmp r1, #6 - blo _0222648C - cmp r2, #2 - blo _022264B8 - mov r0, #1 - b _022264BA -_022264B8: - mov r0, #0 -_022264BA: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov13_02226484 - - thumb_func_start ov13_022264C4 -ov13_022264C4: ; 0x022264C4 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - ldrb r1, [r1, #0x11] - bl ov13_022213F0 - cmp r0, #2 - bne _022264E4 - ldr r1, [r4, #0] - add r0, r4, #0 - ldrb r1, [r1, #0x11] - mov r2, #0 - mov r3, #1 - bl ov13_02225D8C - pop {r4, pc} -_022264E4: - ldr r1, [r4, #0] - mov r2, #0 - ldrb r1, [r1, #0x11] - add r0, r4, #0 - add r3, r2, #0 - bl ov13_02225D8C - pop {r4, pc} - thumb_func_end ov13_022264C4 - - thumb_func_start ov13_022264F4 -ov13_022264F4: ; 0x022264F4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _02226584 ; =ov13_02226590 - ldr r1, _02226588 ; =0x0000115C - ldr r3, [r5, #0xc] - mov r2, #0x64 - bl sub_0200679C - bl sub_0201CED0 - ldr r2, _02226588 ; =0x0000115C - add r4, r0, #0 - mov r1, #0 - bl sub_020D5124 - str r5, [r4, #0] - ldr r0, [r5, #0] - bl ov16_0223DF00 - str r0, [r4, #4] - ldr r0, [r5, #0] - bl ov16_0223E064 - str r0, [r4, #8] - ldr r0, _0222658C ; =0x0000114A - mov r1, #0 - strb r1, [r4, r0] - ldr r0, [r5, #0] - bl ov16_0223E1B0 - add r6, r0, #0 - mov r5, #0 -_02226534: - ldr r3, [r4, #0] - add r0, r6, #0 - add r2, r3, #0 - add r2, #0x27 - add r3, #0x2c - add r1, r5, #0 - add r2, r2, r5 - add r3, r3, r5 - bl sub_0207D9D8 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #5 - blo _02226534 - add r0, r6, #0 - bl sub_0207D9E4 - ldr r1, [r4, #0] - strh r0, [r1, #0x20] - add r0, r6, #0 - bl sub_0207D9E8 - ldr r1, [r4, #0] - strb r0, [r1, #0x1f] - add r0, r4, #0 - bl ov13_02227A4C - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - beq _02226582 - ldr r0, [r4, #0] - mov r1, #1 - str r1, [r0, #0x14] -_02226582: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02226584: .word ov13_02226590 -_02226588: .word 0x0000115C -_0222658C: .word 0x0000114A - thumb_func_end ov13_022264F4 - - thumb_func_start ov13_02226590 -ov13_02226590: ; 0x02226590 - push {r4, lr} - ldr r2, _02226688 ; =0x0000114A - add r4, r1, #0 - ldrb r2, [r4, r2] - cmp r2, #0xe - bhi _02226676 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022265A8: ; jump table - .short _022265C6 - _022265A8 - 2 ; case 0 - .short _022265D2 - _022265A8 - 2 ; case 1 - .short _022265DE - _022265A8 - 2 ; case 2 - .short _022265EA - _022265A8 - 2 ; case 3 - .short _022265F6 - _022265A8 - 2 ; case 4 - .short _02226602 - _022265A8 - 2 ; case 5 - .short _0222660E - _022265A8 - 2 ; case 6 - .short _0222661A - _022265A8 - 2 ; case 7 - .short _02226626 - _022265A8 - 2 ; case 8 - .short _02226632 - _022265A8 - 2 ; case 9 - .short _0222663E - _022265A8 - 2 ; case 10 - .short _0222664A - _022265A8 - 2 ; case 11 - .short _02226656 - _022265A8 - 2 ; case 12 - .short _02226662 - _022265A8 - 2 ; case 13 - .short _0222666E - _022265A8 - 2 ; case 14 -_022265C6: - add r0, r4, #0 - bl ov13_0222668C - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_022265D2: - add r0, r4, #0 - bl ov13_02226760 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_022265DE: - add r0, r4, #0 - bl ov13_02226838 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_022265EA: - add r0, r4, #0 - bl ov13_022269C0 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_022265F6: - add r0, r4, #0 - bl ov13_02226C48 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_02226602: - add r0, r4, #0 - bl ov13_02226C54 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_0222660E: - add r0, r4, #0 - bl ov13_02226C60 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_0222661A: - add r0, r4, #0 - bl ov13_02226948 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_02226626: - add r0, r4, #0 - bl ov13_02226C6C - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_02226632: - add r0, r4, #0 - bl ov13_02226C7C - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_0222663E: - add r0, r4, #0 - bl ov13_02226C94 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_0222664A: - add r0, r4, #0 - bl ov13_02226CBC - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_02226656: - add r0, r4, #0 - bl ov13_02226D94 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_02226662: - add r0, r4, #0 - bl ov13_02226CD4 - ldr r1, _02226688 ; =0x0000114A - strb r0, [r4, r1] - b _02226676 -_0222666E: - bl ov13_02226CFC - cmp r0, #1 - beq _02226686 -_02226676: - add r0, r4, #0 - bl ov13_02228848 - mov r0, #0xc3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200C7EC -_02226686: - pop {r4, pc} - ; .align 2, 0 -_02226688: .word 0x0000114A - thumb_func_end ov13_02226590 - - thumb_func_start ov13_0222668C -ov13_0222668C: ; 0x0222668C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, _02226750 ; =0x04001050 - mov r1, #0 - strh r1, [r0] - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - bl ov13_02228A38 - str r0, [r4, #0x34] - add r0, r4, #0 - bl ov13_02226ED0 - add r0, r4, #0 - bl ov13_02226FC4 - add r0, r4, #0 - bl ov13_022270B8 - ldr r1, [r4, #0] - mov r0, #2 - ldr r1, [r1, #0xc] - bl sub_02002BB8 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl ov16_0223E1B0 - bl sub_0207D9EC - ldr r1, _02226754 ; =0x0000114D - strb r0, [r4, r1] - add r0, r4, #0 - bl ov13_02227AC8 - ldr r1, _02226758 ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02228924 - add r0, r4, #0 - bl ov13_02227288 - ldr r1, _02226758 ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02227350 - add r0, r4, #0 - bl ov13_02227BDC - ldr r1, _02226758 ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02227E68 - ldr r0, [r4, #0] - add r0, #0x25 - ldrb r0, [r0] - cmp r0, #0 - beq _02226710 - ldr r0, [r4, #0x34] - mov r1, #1 - bl ov13_02228A60 -_02226710: - ldr r1, _02226758 ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02228008 - ldr r1, _02226758 ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_022280F0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r1, #0xa - str r0, [sp, #8] - add r3, r1, #0 - ldr r0, [r4, #8] - ldr r2, _0222675C ; =0x0000FFFF - sub r3, #0x12 - bl sub_02003178 - ldr r0, [r4, #0] - ldr r0, [r0, #0x14] - cmp r0, #1 - bne _0222674A - add sp, #0xc - mov r0, #0xc - pop {r3, r4, pc} -_0222674A: - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02226750: .word 0x04001050 -_02226754: .word 0x0000114D -_02226758: .word 0x0000114C -_0222675C: .word 0x0000FFFF - thumb_func_end ov13_0222668C - - thumb_func_start ov13_02226760 -ov13_02226760: ; 0x02226760 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0200384C - cmp r0, #0 - beq _02226772 - mov r0, #1 - pop {r3, r4, r5, pc} -_02226772: - ldr r1, _0222682C ; =0x02229A1C - add r0, r4, #0 - bl ov13_02227238 - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _02226798 - ldr r0, [r4, #0x34] - bl ov13_02228B64 - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _0222679E - mov r5, #5 - b _0222679E -_02226798: - add r0, r4, #0 - bl ov13_02228050 -_0222679E: - cmp r5, #5 - bhi _02226828 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022267AE: ; jump table - .short _022267BA - _022267AE - 2 ; case 0 - .short _022267BA - _022267AE - 2 ; case 1 - .short _022267BA - _022267AE - 2 ; case 2 - .short _022267BA - _022267AE - 2 ; case 3 - .short _022267DA - _022267AE - 2 ; case 4 - .short _0222680A - _022267AE - 2 ; case 5 -_022267BA: - ldr r0, _02226830 ; =0x000005DD - bl sub_02005748 - lsl r0, r5, #0x18 - lsr r1, r0, #0x18 - ldr r0, _02226834 ; =0x0000114D - mov r2, #5 - strb r1, [r4, r0] - sub r0, r0, #2 - strb r2, [r4, r0] - add r0, r4, #0 - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_022267DA: - ldr r0, [r4, #0] - ldrh r0, [r0, #0x20] - cmp r0, #0 - beq _02226828 - ldr r0, _02226830 ; =0x000005DD - bl sub_02005748 - ldr r0, [r4, #0] - ldrb r1, [r0, #0x1f] - ldr r0, _02226834 ; =0x0000114D - strb r1, [r4, r0] - mov r1, #6 - sub r0, r0, #2 - strb r1, [r4, r0] - add r0, r4, #0 - bl ov13_02227A7C - add r0, r4, #0 - mov r1, #4 - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_0222680A: - ldr r0, _02226830 ; =0x000005DD - bl sub_02005748 - ldr r0, [r4, #0] - mov r2, #0 - strh r2, [r0, #0x1c] - ldr r0, [r4, #0] - mov r1, #4 - strb r1, [r0, #0x1e] - add r0, r4, #0 - mov r1, #5 - bl ov13_0222880C - mov r0, #0xd - pop {r3, r4, r5, pc} -_02226828: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0222682C: .word 0x02229A1C -_02226830: .word 0x000005DD -_02226834: .word 0x0000114D - thumb_func_end ov13_02226760 - - thumb_func_start ov13_02226838 -ov13_02226838: ; 0x02226838 - push {r3, r4, r5, lr} - ldr r1, _02226938 ; =0x02229A38 - add r4, r0, #0 - bl ov13_02227238 - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _02226860 - ldr r0, [r4, #0x34] - bl ov13_02228B64 - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _02226866 - mov r5, #8 - b _02226866 -_02226860: - add r0, r4, #0 - bl ov13_02228050 -_02226866: - cmp r5, #8 - bhi _02226934 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02226876: ; jump table - .short _02226888 - _02226876 - 2 ; case 0 - .short _02226888 - _02226876 - 2 ; case 1 - .short _02226888 - _02226876 - 2 ; case 2 - .short _02226888 - _02226876 - 2 ; case 3 - .short _02226888 - _02226876 - 2 ; case 4 - .short _02226888 - _02226876 - 2 ; case 5 - .short _022268BE - _02226876 - 2 ; case 6 - .short _022268EC - _02226876 - 2 ; case 7 - .short _0222691A - _02226876 - 2 ; case 8 -_02226888: - add r0, r4, #0 - add r1, r5, #0 - bl ov13_02227BA8 - cmp r0, #0 - beq _02226934 - ldr r0, _0222693C ; =0x000005DD - bl sub_02005748 - ldr r0, _02226940 ; =0x0000114D - ldr r2, [r4, #0] - ldrb r1, [r4, r0] - sub r0, r0, #2 - add r1, r2, r1 - add r1, #0x27 - strb r5, [r1] - mov r1, #6 - strb r1, [r4, r0] - add r1, r5, #6 - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_022268BE: - ldr r0, _02226940 ; =0x0000114D - ldrb r1, [r4, r0] - add r0, r0, #7 - add r1, r4, r1 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02226934 - ldr r0, _0222693C ; =0x000005DD - bl sub_02005748 - ldr r0, _02226944 ; =0x0000114B - mov r1, #7 - strb r1, [r4, r0] - sub r1, #8 - add r0, r0, #3 - strb r1, [r4, r0] - add r0, r4, #0 - mov r1, #0xc - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_022268EC: - ldr r0, _02226940 ; =0x0000114D - ldrb r1, [r4, r0] - add r0, r0, #7 - add r1, r4, r1 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02226934 - ldr r0, _0222693C ; =0x000005DD - bl sub_02005748 - ldr r0, _02226944 ; =0x0000114B - mov r1, #7 - strb r1, [r4, r0] - mov r1, #1 - add r0, r0, #3 - strb r1, [r4, r0] - add r0, r4, #0 - mov r1, #0xd - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_0222691A: - ldr r0, _0222693C ; =0x000005DD - bl sub_02005748 - ldr r0, _02226944 ; =0x0000114B - mov r1, #4 - strb r1, [r4, r0] - add r0, r4, #0 - mov r1, #0xe - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_02226934: - mov r0, #2 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02226938: .word 0x02229A38 -_0222693C: .word 0x000005DD -_02226940: .word 0x0000114D -_02226944: .word 0x0000114B - thumb_func_end ov13_02226838 - - thumb_func_start ov13_02226948 -ov13_02226948: ; 0x02226948 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, _022269B8 ; =0x0000114D - ldr r1, [r4, #0] - ldrb r2, [r4, r0] - mov r3, #0 - add r5, r1, r2 - mov r1, #0x2c - ldrsb r2, [r5, r1] - add r5, #0x27 - add r1, r0, #1 - strb r3, [r5] - ldrsb r1, [r4, r1] - add r1, r2, r1 - lsl r1, r1, #0x18 - asr r2, r1, #0x18 - ldrb r1, [r4, r0] - add r0, r0, #7 - add r5, r4, r1 - ldrb r5, [r5, r0] - cmp r2, r5 - ble _0222697E - ldr r0, [r4, #0] - add r0, r0, r1 - add r0, #0x2c - strb r3, [r0] - b _02226992 -_0222697E: - cmp r2, #0 - ldr r0, [r4, #0] - bge _0222698C - add r0, r0, r1 - add r0, #0x2c - strb r5, [r0] - b _02226992 -_0222698C: - add r0, r0, r1 - add r0, #0x2c - strb r2, [r0] -_02226992: - add r0, r4, #0 - bl ov13_02227650 - add r0, r4, #0 - bl ov13_02227698 - ldr r1, _022269BC ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02227E68 - ldr r1, _022269BC ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_02228924 - mov r0, #2 - pop {r3, r4, r5, pc} - nop -_022269B8: .word 0x0000114D -_022269BC: .word 0x0000114C - thumb_func_end ov13_02226948 - - thumb_func_start ov13_022269C0 -ov13_022269C0: ; 0x022269C0 - push {r3, r4, r5, lr} - ldr r1, _02226A4C ; =0x022299AC - add r5, r0, #0 - bl ov13_02227238 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _022269E8 - ldr r0, [r5, #0x34] - bl ov13_02228B64 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022269EE - mov r4, #1 - b _022269EE -_022269E8: - add r0, r5, #0 - bl ov13_02228050 -_022269EE: - cmp r4, #0 - beq _022269F8 - cmp r4, #1 - beq _02226A2E - b _02226A48 -_022269F8: - ldr r0, _02226A50 ; =0x000005DD - bl sub_02005748 - ldr r1, _02226A54 ; =0x0000114D - ldr r2, [r5, #0] - ldrb r1, [r5, r1] - add r0, r5, #0 - add r1, r2, r1 - add r1, #0x27 - ldrb r1, [r1] - bl ov13_02227BA8 - ldr r1, [r5, #0] - mov r2, #0 - strh r0, [r1, #0x1c] - ldr r0, _02226A54 ; =0x0000114D - ldrb r1, [r5, r0] - ldr r0, [r5, #0] - strb r1, [r0, #0x1e] - add r0, r5, #0 - mov r1, #0xf - bl ov13_0222880C - add r0, r5, #0 - bl ov13_02226A5C - pop {r3, r4, r5, pc} -_02226A2E: - ldr r0, _02226A50 ; =0x000005DD - bl sub_02005748 - ldr r0, _02226A58 ; =0x0000114B - mov r1, #5 - strb r1, [r5, r0] - add r0, r5, #0 - mov r1, #0x10 - mov r2, #0 - bl ov13_0222880C - mov r0, #0xb - pop {r3, r4, r5, pc} -_02226A48: - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02226A4C: .word 0x022299AC -_02226A50: .word 0x000005DD -_02226A54: .word 0x0000114D -_02226A58: .word 0x0000114B - thumb_func_end ov13_022269C0 - - thumb_func_start ov13_02226A5C -ov13_02226A5C: ; 0x02226A5C - push {r3, r4, r5, r6, r7, lr} - ldr r1, _02226C3C ; =0x0000114D - add r5, r0, #0 - ldrb r1, [r5, r1] - ldr r4, [r5, #0] - cmp r1, #3 - beq _02226A6C - b _02226B86 -_02226A6C: - bl ov13_02227244 - add r7, r0, #0 - ldrh r0, [r4, #0x1c] - ldr r2, [r4, #0xc] - mov r1, #7 - bl sub_0207CFF0 - add r6, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _02226ADE - ldrh r0, [r4, #0x1c] - cmp r0, #0x37 - beq _02226ADE - cmp r6, #3 - beq _02226ADE - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - add r2, r7, #0 - bl ov16_0223DFAC - add r6, r0, #0 - ldr r0, [r5, #0x10] - mov r1, #0x2e - bl sub_0200B1EC - add r4, r0, #0 - add r0, r6, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200B5CC - ldr r0, [r5, #0x14] - ldr r2, _02226C40 ; =0x00000175 - mov r1, #1 - bl sub_0200B630 - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226ADE: - ldrh r0, [r4, #0x1c] - add r2, r7, #0 - mov r3, #0 - str r0, [sp] - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - bl ov16_0223E30C - cmp r0, #1 - bne _02226B04 - ldr r2, _02226C3C ; =0x0000114D - ldrh r1, [r4, #0x1c] - ldrb r2, [r5, r2] - ldr r0, [r4, #0] - ldr r3, [r4, #0xc] - bl ov13_02227260 - mov r0, #0xd - pop {r3, r4, r5, r6, r7, pc} -_02226B04: - cmp r6, #3 - bne _02226B6C - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - bne _02226B26 - ldr r2, _02226C3C ; =0x0000114D - ldrh r1, [r4, #0x1c] - ldrb r2, [r5, r2] - ldr r0, [r4, #0] - ldr r3, [r4, #0xc] - bl ov13_02227260 - mov r0, #0xd - pop {r3, r4, r5, r6, r7, pc} -_02226B26: - ldr r3, [r4, #0xc] - add r0, r1, #0 - mov r1, #0x1a - mov r2, #0xd5 - bl sub_0200B144 - mov r1, #0x24 - add r7, r0, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, [r5, #0x14] - ldr r2, [r4, #4] - mov r1, #0 - bl sub_0200B498 - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226B6C: - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x18] - mov r1, #0x22 - bl sub_0200B1B8 - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226B86: - cmp r1, #2 - bne _02226C36 - add r0, r4, #0 - add r0, #0x22 - ldrb r0, [r0] - cmp r0, #1 - bne _02226BAE - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x18] - mov r1, #0x2c - bl sub_0200B1B8 - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226BAE: - add r0, r4, #0 - add r0, #0x23 - ldrb r0, [r0] - cmp r0, #1 - bne _02226BD2 - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x18] - mov r1, #0x2f - bl sub_0200B1B8 - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226BD2: - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - cmp r0, #1 - bne _02226BF6 - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x18] - mov r1, #0x30 - bl sub_0200B1B8 - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226BF6: - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - bl ov16_0223DF20 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E228 - add r4, r0, #0 - add r0, r6, #0 - bl sub_0207A0F8 - cmp r0, #6 - bne _02226C36 - add r0, r4, #0 - bl sub_020799A0 - cmp r0, #0x12 - bne _02226C36 - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x18] - mov r1, #0x2d - bl sub_0200B1B8 - add r0, r5, #0 - bl ov13_022279F4 - ldr r0, _02226C44 ; =0x0000114B - mov r1, #8 - strb r1, [r5, r0] - mov r0, #9 - pop {r3, r4, r5, r6, r7, pc} -_02226C36: - mov r0, #0xd - pop {r3, r4, r5, r6, r7, pc} - nop -_02226C3C: .word 0x0000114D -_02226C40: .word 0x00000175 -_02226C44: .word 0x0000114B - thumb_func_end ov13_02226A5C - - thumb_func_start ov13_02226C48 -ov13_02226C48: ; 0x02226C48 - push {r3, lr} - mov r1, #0 - bl ov13_022271D0 - mov r0, #1 - pop {r3, pc} - thumb_func_end ov13_02226C48 - - thumb_func_start ov13_02226C54 -ov13_02226C54: ; 0x02226C54 - push {r3, lr} - mov r1, #1 - bl ov13_022271D0 - mov r0, #2 - pop {r3, pc} - thumb_func_end ov13_02226C54 - - thumb_func_start ov13_02226C60 -ov13_02226C60: ; 0x02226C60 - push {r3, lr} - mov r1, #2 - bl ov13_022271D0 - mov r0, #3 - pop {r3, pc} - thumb_func_end ov13_02226C60 - - thumb_func_start ov13_02226C6C -ov13_02226C6C: ; 0x02226C6C - push {r3, lr} - add r0, #0x1c - mov r1, #0 - bl sub_0200E084 - mov r0, #3 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov13_02226C6C - - thumb_func_start ov13_02226C7C -ov13_02226C7C: ; 0x02226C7C - push {r3, lr} - add r0, #0x32 - ldrb r0, [r0] - bl sub_0201D724 - cmp r0, #0 - bne _02226C8E - mov r0, #0xa - pop {r3, pc} -_02226C8E: - mov r0, #9 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov13_02226C7C - - thumb_func_start ov13_02226C94 -ov13_02226C94: ; 0x02226C94 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02226CB4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _02226CAA - bl sub_02022798 - cmp r0, #1 - bne _02226CB0 -_02226CAA: - ldr r0, _02226CB8 ; =0x0000114B - ldrb r0, [r4, r0] - pop {r4, pc} -_02226CB0: - mov r0, #0xa - pop {r4, pc} - ; .align 2, 0 -_02226CB4: .word 0x021BF67C -_02226CB8: .word 0x0000114B - thumb_func_end ov13_02226C94 - - thumb_func_start ov13_02226CBC -ov13_02226CBC: ; 0x02226CBC - ldr r1, _02226CD0 ; =0x0000113E - ldrb r2, [r0, r1] - cmp r2, #2 - bne _02226CCA - add r1, #0xd - ldrb r0, [r0, r1] - bx lr -_02226CCA: - mov r0, #0xb - bx lr - nop -_02226CD0: .word 0x0000113E - thumb_func_end ov13_02226CBC - - thumb_func_start ov13_02226CD4 -ov13_02226CD4: ; 0x02226CD4 - push {lr} - sub sp, #0xc - mov r2, #0 - str r2, [sp] - mov r1, #0x10 - str r1, [sp, #4] - str r2, [sp, #8] - mov r1, #0xa - add r3, r1, #0 - ldr r0, [r0, #8] - ldr r2, _02226CF8 ; =0x0000FFFF - sub r3, #0x12 - bl sub_02003178 - mov r0, #0xe - add sp, #0xc - pop {pc} - nop -_02226CF8: .word 0x0000FFFF - thumb_func_end ov13_02226CD4 - - thumb_func_start ov13_02226CFC -ov13_02226CFC: ; 0x02226CFC - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #8] - bl sub_0200384C - cmp r0, #0 - beq _02226D10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02226D10: - add r0, r5, #0 - bl ov13_02227E08 - add r0, r5, #0 - bl ov13_02227334 - add r0, r5, #0 - bl ov13_022270F8 - ldr r0, [r5, #4] - bl ov13_02226F9C - ldr r0, [r5, #0x34] - bl ov13_02228A5C - ldr r1, [r5, #0] - add r1, #0x25 - strb r0, [r1] - ldr r0, [r5, #0x34] - bl ov13_02228A50 - mov r0, #2 - bl sub_02002C60 - ldr r1, [r5, #0] - ldrh r0, [r1, #0x1c] - cmp r0, #0 - beq _02226D7C - ldr r0, [r1, #0] - bl ov16_0223E1B0 - add r6, r0, #0 - mov r4, #0 -_02226D52: - ldr r3, [r5, #0] - add r0, r6, #0 - add r2, r3, r4 - add r3, r3, r4 - add r2, #0x27 - add r3, #0x2c - ldrb r2, [r2] - ldrb r3, [r3] - add r1, r4, #0 - bl sub_0207D9F0 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #5 - blo _02226D52 - ldr r1, _02226D90 ; =0x0000114D - add r0, r6, #0 - ldrb r1, [r5, r1] - bl sub_0207DA24 -_02226D7C: - ldr r0, [r5, #0] - mov r1, #1 - add r0, #0x26 - strb r1, [r0] - add r0, r7, #0 - bl sub_020067D0 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_02226D90: .word 0x0000114D - thumb_func_end ov13_02226CFC - - thumb_func_start ov13_02226D94 -ov13_02226D94: ; 0x02226D94 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0200384C - cmp r0, #0 - beq _02226DA6 - mov r0, #0xc - pop {r4, pc} -_02226DA6: - ldr r0, _02226EC0 ; =0x00001159 - ldrb r0, [r4, r0] - cmp r0, #4 - bls _02226DB0 - b _02226EBA -_02226DB0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02226DBC: ; jump table - .short _02226DC6 - _02226DBC - 2 ; case 0 - .short _02226E08 - _02226DBC - 2 ; case 1 - .short _02226E18 - _02226DBC - 2 ; case 2 - .short _02226E62 - _02226DBC - 2 ; case 3 - .short _02226E72 - _02226DBC - 2 ; case 4 -_02226DC6: - ldr r0, [r4, #0x38] - bl ov16_0226DFD4 - cmp r0, #1 - bne _02226DFE - ldr r0, _02226EC4 ; =0x000005DD - bl sub_02005748 - ldr r0, _02226EC8 ; =0x0000114D - mov r1, #2 - strb r1, [r4, r0] - mov r2, #0xc - sub r0, r0, #2 - strb r2, [r4, r0] - add r0, r4, #0 - mov r2, #0 - bl ov13_0222880C - ldr r0, _02226ECC ; =0x0000115A - mov r1, #0 - strb r1, [r4, r0] - sub r1, r0, #1 - ldrb r1, [r4, r1] - sub r0, r0, #1 - add r1, r1, #1 - strb r1, [r4, r0] - mov r0, #0xb - pop {r4, pc} -_02226DFE: - ldr r0, _02226ECC ; =0x0000115A - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _02226EBA -_02226E08: - add r0, r4, #0 - bl ov13_02226C54 - ldr r0, _02226EC0 ; =0x00001159 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _02226EBA -_02226E18: - ldr r0, [r4, #0x38] - bl ov16_0226DFD4 - cmp r0, #1 - bne _02226E58 - ldr r0, _02226EC4 ; =0x000005DD - bl sub_02005748 - ldr r0, _02226EC8 ; =0x0000114D - ldr r3, [r4, #0] - ldrb r1, [r4, r0] - mov r2, #0 - sub r0, r0, #2 - add r1, r3, r1 - add r1, #0x27 - strb r2, [r1] - mov r1, #0xc - strb r1, [r4, r0] - add r0, r4, #0 - mov r1, #6 - bl ov13_0222880C - ldr r0, _02226ECC ; =0x0000115A - mov r1, #0 - strb r1, [r4, r0] - sub r1, r0, #1 - ldrb r1, [r4, r1] - sub r0, r0, #1 - add r1, r1, #1 - strb r1, [r4, r0] - mov r0, #0xb - pop {r4, pc} -_02226E58: - ldr r0, _02226ECC ; =0x0000115A - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _02226EBA -_02226E62: - add r0, r4, #0 - bl ov13_02226C60 - ldr r0, _02226EC0 ; =0x00001159 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _02226EBA -_02226E72: - ldr r0, [r4, #0x38] - bl ov16_0226DFD4 - cmp r0, #1 - bne _02226EB2 - ldr r0, _02226EC4 ; =0x000005DD - bl sub_02005748 - ldr r1, _02226EC8 ; =0x0000114D - ldr r2, [r4, #0] - ldrb r1, [r4, r1] - add r0, r4, #0 - add r1, r2, r1 - add r1, #0x27 - ldrb r1, [r1] - bl ov13_02227BA8 - ldr r1, [r4, #0] - mov r2, #0 - strh r0, [r1, #0x1c] - ldr r0, _02226EC8 ; =0x0000114D - ldrb r1, [r4, r0] - ldr r0, [r4, #0] - strb r1, [r0, #0x1e] - add r0, r4, #0 - mov r1, #0xf - bl ov13_0222880C - add r0, r4, #0 - bl ov13_02226A5C - pop {r4, pc} -_02226EB2: - ldr r0, _02226ECC ; =0x0000115A - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] -_02226EBA: - mov r0, #0xc - pop {r4, pc} - nop -_02226EC0: .word 0x00001159 -_02226EC4: .word 0x000005DD -_02226EC8: .word 0x0000114D -_02226ECC: .word 0x0000115A - thumb_func_end ov13_02226D94 - - thumb_func_start ov13_02226ED0 -ov13_02226ED0: ; 0x02226ED0 - push {r4, r5, lr} - sub sp, #0x64 - ldr r5, _02226F8C ; =0x022299B8 - add r3, sp, #0x54 - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - mov r1, #1 - bl sub_020183A0 - ldr r5, _02226F90 ; =0x02229A00 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #6 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r5, _02226F94 ; =0x022299E4 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #4] - mov r1, #5 - bl sub_02019EBC - ldr r5, _02226F98 ; =0x022299C8 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02019EBC - ldr r3, [r4, #0] - mov r0, #5 - ldr r3, [r3, #0xc] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r3, [r4, #0] - mov r0, #4 - ldr r3, [r3, #0xc] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r0, [r4, #4] - mov r1, #5 - bl sub_0201C3C0 - ldr r0, [r4, #4] - mov r1, #4 - bl sub_0201C3C0 - add sp, #0x64 - pop {r4, r5, pc} - ; .align 2, 0 -_02226F8C: .word 0x022299B8 -_02226F90: .word 0x02229A00 -_02226F94: .word 0x022299E4 -_02226F98: .word 0x022299C8 - thumb_func_end ov13_02226ED0 - - thumb_func_start ov13_02226F9C -ov13_02226F9C: ; 0x02226F9C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x17 - mov r1, #0 - bl sub_0201FF74 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #6 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02226F9C - - thumb_func_start ov13_02226FC4 -ov13_02226FC4: ; 0x02226FC4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #0x4d - ldr r1, [r1, #0xc] - bl sub_02006C24 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldr r1, [r5, #0] - mov r3, #6 - ldr r1, [r1, #0xc] - add r4, r0, #0 - str r1, [sp, #0xc] - ldr r2, [r5, #4] - mov r1, #2 - bl sub_020070E8 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldr r0, [r5, #0] - mov r3, #6 - ldr r0, [r0, #0xc] - str r0, [sp, #0xc] - ldr r2, [r5, #4] - add r0, r4, #0 - bl sub_0200710C - ldr r2, [r5, #0] - add r0, r4, #0 - ldr r2, [r2, #0xc] - mov r1, #1 - bl sub_02006CB8 - add r1, sp, #0x10 - add r6, r0, #0 - bl sub_020A7248 - ldr r1, [sp, #0x10] - add r0, r5, #0 - add r1, #0xc - bl ov13_02228128 - add r0, r6, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #1 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #6 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r3, [r5, #0] - ldr r0, [r5, #8] - ldr r3, [r3, #0xc] - mov r1, #0x4d - mov r2, #3 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xf0 - str r0, [sp, #8] - ldr r3, [r5, #0] - ldr r0, [r5, #8] - ldr r3, [r3, #0xc] - mov r1, #0xe - mov r2, #7 - bl sub_02003050 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl ov16_0223EDE0 - add r4, r0, #0 - bl sub_0200DD04 - add r1, r0, #0 - ldr r0, _022270B4 ; =0x000003E2 - mov r3, #4 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0x26 - bl sub_02006E3C - add r0, r4, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - ldr r3, [r5, #0] - ldr r0, [r5, #8] - ldr r3, [r3, #0xc] - mov r1, #0x26 - bl sub_02003050 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022270B4: .word 0x000003E2 - thumb_func_end ov13_02226FC4 - - thumb_func_start ov13_022270B8 -ov13_022270B8: ; 0x022270B8 - push {r4, lr} - add r4, r0, #0 - ldr r3, [r4, #0] - mov r0, #0 - ldr r3, [r3, #0xc] - mov r1, #0x1a - mov r2, #2 - bl sub_0200B144 - str r0, [r4, #0x10] - ldr r3, [r4, #0] - mov r0, #0xf - ldr r3, [r3, #0xc] - mov r1, #0xe - mov r2, #0 - bl sub_0200C440 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - bl sub_0200B358 - str r0, [r4, #0x14] - ldr r1, [r4, #0] - mov r0, #2 - ldr r1, [r1, #0xc] - lsl r0, r0, #8 - bl sub_02023790 - str r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_022270B8 - - thumb_func_start ov13_022270F8 -ov13_022270F8: ; 0x022270F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl sub_0200B190 - ldr r0, [r4, #0xc] - bl sub_0200C560 - ldr r0, [r4, #0x14] - bl sub_0200B3F0 - ldr r0, [r4, #0x18] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_022270F8 - - thumb_func_start ov13_02227118 -ov13_02227118: ; 0x02227118 - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - beq _0222712A - cmp r1, #1 - beq _02227144 - cmp r1, #2 - beq _02227160 - pop {r4, pc} -_0222712A: - mov r2, #0 - ldr r0, [r4, #4] - mov r1, #6 - add r3, r2, #0 - bl sub_0201C63C - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - pop {r4, pc} -_02227144: - mov r1, #6 - add r3, r1, #0 - ldr r0, [r4, #4] - mov r2, #0 - add r3, #0xfa - bl sub_0201C63C - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - pop {r4, pc} -_02227160: - mov r2, #0 - ldr r0, [r4, #4] - mov r1, #6 - add r3, r2, #0 - bl sub_0201C63C - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #4] - mov r1, #6 - add r3, #0xfd - bl sub_0201C63C - pop {r4, pc} - thumb_func_end ov13_02227118 - - thumb_func_start ov13_0222717C -ov13_0222717C: ; 0x0222717C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - cmp r1, #2 - bne _022271C6 - mov r0, #0x1c - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _022271CC ; =0x0000114D - mov r1, #6 - ldrb r0, [r4, r0] - mov r2, #2 - mov r3, #0x23 - add r0, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_02019E2C - mov r0, #0x1c - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - ldr r0, _022271CC ; =0x0000114D - mov r1, #6 - ldrb r0, [r4, r0] - mov r2, #2 - mov r3, #0x28 - add r0, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_02019E2C -_022271C6: - add sp, #0xc - pop {r3, r4, pc} - nop -_022271CC: .word 0x0000114D - thumb_func_end ov13_0222717C - - thumb_func_start ov13_022271D0 -ov13_022271D0: ; 0x022271D0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov13_0222717C - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02227118 - ldr r0, [r5, #4] - mov r1, #4 - mov r2, #0 - bl sub_02019F04 - ldr r0, [r5, #4] - mov r1, #5 - mov r2, #0 - bl sub_02019F04 - add r0, r5, #0 - bl ov13_02227324 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_022272AC - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02227350 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02228924 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02228008 - add r0, r5, #0 - add r1, r4, #0 - bl ov13_022280F0 - ldr r1, _02227234 ; =0x0000114C - add r0, r5, #0 - strb r4, [r5, r1] - ldrb r1, [r5, r1] - bl ov13_02227E68 - pop {r3, r4, r5, pc} - nop -_02227234: .word 0x0000114C - thumb_func_end ov13_022271D0 - - thumb_func_start ov13_02227238 -ov13_02227238: ; 0x02227238 - ldr r3, _02227240 ; =sub_02022664 - add r0, r1, #0 - bx r3 - nop -_02227240: .word sub_02022664 - thumb_func_end ov13_02227238 - - thumb_func_start ov13_02227244 -ov13_02227244: ; 0x02227244 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #0] - bl ov16_0223DF10 - add r1, r0, #0 - ldr r0, [r5, #0] - ldr r3, [r4, #0x10] - ldr r0, [r0, #0] - mov r2, #2 - bl ov16_0225B45C - pop {r3, r4, r5, pc} - thumb_func_end ov13_02227244 - - thumb_func_start ov13_02227260 -ov13_02227260: ; 0x02227260 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r3, #0 - add r6, r0, #0 - add r7, r2, #0 - bl ov16_0223E1AC - add r1, r5, #0 - mov r2, #1 - add r3, r4, #0 - bl sub_0207D60C - add r0, r6, #0 - bl ov16_0223E1B0 - add r1, r5, #0 - add r2, r7, #0 - bl sub_0207DA1C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_02227260 - - thumb_func_start ov13_02227288 -ov13_02227288: ; 0x02227288 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #4] - ldr r2, _022272A4 ; =0x02229A60 - add r1, #0x1c - bl sub_0201A8D4 - ldr r1, _022272A8 ; =0x0000114C - add r0, r4, #0 - ldrb r1, [r4, r1] - bl ov13_022272AC - pop {r4, pc} - ; .align 2, 0 -_022272A4: .word 0x02229A60 -_022272A8: .word 0x0000114C - thumb_func_end ov13_02227288 - - thumb_func_start ov13_022272AC -ov13_022272AC: ; 0x022272AC - push {r4, r5, r6, lr} - add r5, r0, #0 - cmp r1, #0 - beq _022272BE - cmp r1, #1 - beq _022272C8 - cmp r1, #2 - beq _022272D2 - b _022272DA -_022272BE: - mov r1, #5 - add r0, #0x30 - ldr r6, _02227318 ; =0x02229A88 - strb r1, [r0] - b _022272DA -_022272C8: - mov r1, #0x1a - add r0, #0x30 - ldr r6, _0222731C ; =0x02229AE0 - strb r1, [r0] - b _022272DA -_022272D2: - ldr r6, _02227320 ; =0x02229A68 - mov r1, #4 - add r0, #0x30 - strb r1, [r0] -_022272DA: - add r1, r5, #0 - ldr r0, [r5, #0] - add r1, #0x30 - ldrb r1, [r1] - ldr r0, [r0, #0xc] - bl sub_0201A778 - str r0, [r5, #0x2c] - add r0, r5, #0 - add r0, #0x30 - ldrb r0, [r0] - mov r4, #0 - cmp r0, #0 - bls _02227316 -_022272F6: - ldr r2, [r5, #0x2c] - lsl r1, r4, #4 - add r1, r2, r1 - lsl r2, r4, #3 - ldr r0, [r5, #4] - add r2, r6, r2 - bl sub_0201A8D4 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, r5, #0 - add r0, #0x30 - ldrb r0, [r0] - cmp r4, r0 - blo _022272F6 -_02227316: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02227318: .word 0x02229A88 -_0222731C: .word 0x02229AE0 -_02227320: .word 0x02229A68 - thumb_func_end ov13_022272AC - - thumb_func_start ov13_02227324 -ov13_02227324: ; 0x02227324 - add r1, r0, #0 - ldr r0, [r1, #0x2c] - add r1, #0x30 - ldr r3, _02227330 ; =sub_0201A928 - ldrb r1, [r1] - bx r3 - ; .align 2, 0 -_02227330: .word sub_0201A928 - thumb_func_end ov13_02227324 - - thumb_func_start ov13_02227334 -ov13_02227334: ; 0x02227334 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x30 - ldrb r1, [r1] - ldr r0, [r4, #0x2c] - bl sub_0201A928 - add r4, #0x1c - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02227334 - - thumb_func_start ov13_02227350 -ov13_02227350: ; 0x02227350 - push {r3, lr} - cmp r1, #0 - beq _02227360 - cmp r1, #1 - beq _02227366 - cmp r1, #2 - beq _0222736C - pop {r3, pc} -_02227360: - bl ov13_022273CC - pop {r3, pc} -_02227366: - bl ov13_02227888 - pop {r3, pc} -_0222736C: - bl ov13_02227974 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov13_02227350 - - thumb_func_start ov13_02227374 -ov13_02227374: ; 0x02227374 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r5, [r0, #0x2c] - lsl r4, r1, #4 - ldr r0, [r0, #0x10] - add r1, r2, #0 - add r6, r3, #0 - bl sub_0200B1EC - str r0, [sp, #0x10] - ldr r1, [sp, #0x10] - add r0, r6, #0 - mov r2, #0 - bl sub_02002D7C - add r7, r0, #0 - add r0, r5, r4 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsr r3, r0, #1 - ldr r0, [sp, #0x28] - ldr r2, [sp, #0x10] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - add r1, r6, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r5, r4 - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02227374 - - thumb_func_start ov13_022273CC -ov13_022273CC: ; 0x022273CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r6, #0 - add r5, r0, #0 - add r4, r6, #0 - add r7, r6, #0 -_022273D8: - ldr r0, [r5, #0x2c] - add r1, r7, #0 - add r0, r0, r4 - bl sub_0201ADA4 - add r6, r6, #1 - add r4, #0x10 - cmp r6, #5 - blo _022273D8 - mov r0, #8 - str r0, [sp] - ldr r0, _022274A4 ; =0x00030201 - mov r1, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r1, #0 - mov r3, #2 - bl ov13_02227374 - mov r0, #0x18 - str r0, [sp] - ldr r0, _022274A4 ; =0x00030201 - mov r1, #0 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #1 - mov r3, #2 - bl ov13_02227374 - mov r0, #8 - str r0, [sp] - ldr r0, _022274A4 ; =0x00030201 - mov r2, #2 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - add r3, r2, #0 - bl ov13_02227374 - mov r0, #0x18 - str r0, [sp] - ldr r0, _022274A4 ; =0x00030201 - mov r1, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #3 - mov r3, #2 - bl ov13_02227374 - mov r0, #8 - str r0, [sp] - ldr r0, _022274A4 ; =0x00030201 - mov r1, #2 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #7 - add r3, r1, #0 - bl ov13_02227374 - mov r0, #8 - str r0, [sp] - ldr r0, _022274A4 ; =0x00030201 - mov r1, #3 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #6 - mov r3, #2 - bl ov13_02227374 - ldr r0, [r5, #0] - ldrh r0, [r0, #0x20] - cmp r0, #0 - beq _0222749E - ldr r0, [r5, #0x10] - mov r1, #8 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #6 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022274A4 ; =0x00030201 - mov r3, #0 - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r5, #0x2c] - mov r1, #2 - add r0, #0x40 - add r2, r4, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - ldr r0, [r5, #0x2c] - add r0, #0x40 - bl sub_0201A9A4 -_0222749E: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022274A4: .word 0x00030201 - thumb_func_end ov13_022273CC - - thumb_func_start ov13_022274A8 -ov13_022274A8: ; 0x022274A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r4, [r5, #0x2c] - lsl r6, r3, #4 - add r7, r1, #0 - add r0, r4, r6 - mov r1, #0 - str r2, [sp, #0x10] - bl sub_0201ADA4 - ldr r0, _02227544 ; =0x0000114D - lsl r7, r7, #2 - ldrb r1, [r5, r0] - mov r0, #0x90 - mul r0, r1 - add r0, r5, r0 - add r0, r0, r7 - ldrh r0, [r0, #0x3c] - cmp r0, #0 - beq _0222753A - ldr r1, [sp, #0x10] - ldr r0, [r5, #0x10] - lsl r2, r1, #3 - ldr r1, _02227548 ; =0x02229AB0 - ldr r1, [r1, r2] - bl sub_0200B1EC - ldr r2, _02227544 ; =0x0000114D - str r0, [sp, #0x14] - ldrb r3, [r5, r2] - mov r2, #0x90 - ldr r0, [r5, #0x14] - mul r2, r3 - add r2, r5, r2 - add r2, r2, r7 - ldrh r2, [r2, #0x3c] - mov r1, #0 - bl sub_0200B70C - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r2, [sp, #0x14] - bl sub_0200C388 - ldr r0, [sp, #0x30] - ldr r1, [r5, #0x18] - mov r2, #0 - bl sub_02002D7C - add r7, r0, #0 - add r0, r4, r6 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsr r3, r0, #1 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x34] - ldr r1, [sp, #0x30] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r5, #0x18] - add r0, r4, r6 - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC -_0222753A: - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02227544: .word 0x0000114D -_02227548: .word 0x02229AB0 - thumb_func_end ov13_022274A8 - - thumb_func_start ov13_0222754C -ov13_0222754C: ; 0x0222754C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r4, [r5, #0x2c] - lsl r7, r3, #4 - add r6, r1, #0 - add r0, r4, r7 - mov r1, #0 - str r2, [sp, #0x10] - bl sub_0201ADA4 - ldr r0, _022275D8 ; =0x0000114D - lsl r6, r6, #2 - ldrb r1, [r5, r0] - mov r0, #0x90 - mul r0, r1 - add r0, r5, r0 - add r0, r0, r6 - ldrh r0, [r0, #0x3e] - cmp r0, #0 - beq _022275CE - ldr r1, [sp, #0x10] - ldr r0, [r5, #0x10] - lsl r2, r1, #3 - ldr r1, _022275DC ; =0x02229AB4 - ldr r1, [r1, r2] - bl sub_0200B1EC - mov r1, #0 - str r0, [sp, #0x14] - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, _022275D8 ; =0x0000114D - ldr r0, [r5, #0x14] - ldrb r3, [r5, r2] - mov r2, #0x90 - mul r2, r3 - add r2, r5, r2 - add r2, r2, r6 - ldrh r2, [r2, #0x3e] - mov r3, #3 - bl sub_0200B60C - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r2, [sp, #0x14] - bl sub_0200C388 - ldr r0, [sp, #0x34] - mov r3, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x30] - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r2, [r5, #0x18] - add r0, r4, r7 - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC -_022275CE: - add r0, r4, r7 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022275D8: .word 0x0000114D -_022275DC: .word 0x02229AB4 - thumb_func_end ov13_0222754C - - thumb_func_start ov13_022275E0 -ov13_022275E0: ; 0x022275E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r0, #0 - ldr r0, _02227644 ; =0x0000114D - add r5, r1, #0 - ldrb r0, [r6, r0] - ldr r1, [r6, #0] - add r0, r1, r0 - add r0, #0x2c - ldrb r1, [r0] - mov r0, #6 - mul r0, r1 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0x31 - ldrb r0, [r0] - cmp r0, #0 - bne _02227608 - mov r4, #0 - b _0222760A -_02227608: - mov r4, #0xc -_0222760A: - mov r0, #2 - str r0, [sp] - ldr r0, _02227648 ; =0x00030201 - ldr r1, [sp, #0xc] - lsl r7, r5, #1 - str r0, [sp, #4] - add r0, r6, #0 - add r1, r5, r1 - add r2, r5, #0 - add r3, r4, r7 - bl ov13_022274A8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _0222764C ; =0x00010200 - ldr r1, [sp, #0xc] - add r3, r4, #1 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, r1 - add r2, r5, #0 - add r3, r3, r7 - bl ov13_0222754C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02227644: .word 0x0000114D -_02227648: .word 0x00030201 -_0222764C: .word 0x00010200 - thumb_func_end ov13_022275E0 - - thumb_func_start ov13_02227650 -ov13_02227650: ; 0x02227650 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x13 - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r0, [r4, #4] - mov r1, #5 - add r3, r2, #0 - bl sub_02019CB8 - mov r5, #0 -_02227672: - add r0, r4, #0 - add r1, r5, #0 - bl ov13_022275E0 - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #6 - blo _02227672 - add r0, r4, #0 - add r0, #0x31 - ldrb r1, [r0] - mov r0, #1 - add r4, #0x31 - eor r0, r1 - strb r0, [r4] - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov13_02227650 - - thumb_func_start ov13_02227698 -ov13_02227698: ; 0x02227698 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0x19 - ldr r1, [r5, #0x2c] - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x10] - mov r1, #0x1c - ldr r4, [r5, #0x2c] - bl sub_0200B1EC - str r0, [sp, #0x10] - mov r0, #0 - ldr r1, [sp, #0x10] - add r2, r0, #0 - bl sub_02002D7C - add r7, r0, #0 - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, r0, r7 - lsr r6, r0, #1 - mov r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022277C0 ; =0x00010200 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - mov r0, #0x19 - lsl r0, r0, #4 - mov r1, #0 - add r0, r4, r0 - add r3, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - ldr r0, [r5, #0x10] - mov r1, #0x1d - bl sub_0200B1EC - mov r1, #0 - str r0, [sp, #0x14] - ldr r3, _022277C4 ; =0x0000114D - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, _022277C4 ; =0x0000114D - add r3, r3, #7 - ldrb r2, [r5, r2] - ldr r0, [r5, #0x14] - add r2, r5, r2 - ldrb r2, [r2, r3] - mov r3, #2 - add r2, r2, #1 - bl sub_0200B60C - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r2, [sp, #0x14] - bl sub_0200C388 - mov r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022277C0 ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r2, [r5, #0x18] - add r0, r4, r0 - add r3, r6, r7 - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, [r5, #0x10] - mov r1, #0x1e - bl sub_0200B1EC - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r3, _022277C4 ; =0x0000114D - ldr r2, [r5, #0] - ldrb r3, [r5, r3] - ldr r0, [r5, #0x14] - add r2, r2, r3 - add r2, #0x2c - ldrb r2, [r2] - mov r3, #2 - add r2, r2, #1 - bl sub_0200B60C - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - add r2, r7, #0 - bl sub_0200C388 - mov r0, #0 - ldr r1, [r5, #0x18] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022277C0 ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r2, [r5, #0x18] - add r0, r4, r0 - sub r3, r6, r3 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_022277C0: .word 0x00010200 -_022277C4: .word 0x0000114D - thumb_func_end ov13_02227698 - - thumb_func_start ov13_022277C8 -ov13_022277C8: ; 0x022277C8 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #6 - ldr r1, [r4, #0x2c] - lsl r0, r0, #6 - add r0, r1, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _02227880 ; =0x0000114D - ldrb r0, [r4, r0] - cmp r0, #3 - bhi _0222787C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022277F0: ; jump table - .short _022277F8 - _022277F0 - 2 ; case 0 - .short _02227824 - _022277F0 - 2 ; case 1 - .short _02227850 - _022277F0 - 2 ; case 2 - .short _02227868 - _022277F0 - 2 ; case 3 -_022277F8: - mov r0, #4 - str r0, [sp] - ldr r0, _02227884 ; =0x00010200 - mov r1, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x16 - mov r3, #0 - bl ov13_02227374 - mov r0, #0x14 - str r0, [sp] - ldr r0, _02227884 ; =0x00010200 - mov r1, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x17 - mov r3, #0 - bl ov13_02227374 - add sp, #8 - pop {r4, pc} -_02227824: - mov r0, #4 - str r0, [sp] - ldr r0, _02227884 ; =0x00010200 - mov r1, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0 - bl ov13_02227374 - mov r0, #0x14 - str r0, [sp] - ldr r0, _02227884 ; =0x00010200 - mov r1, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x19 - mov r3, #0 - bl ov13_02227374 - add sp, #8 - pop {r4, pc} -_02227850: - mov r0, #0xc - str r0, [sp] - ldr r0, _02227884 ; =0x00010200 - mov r1, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1a - mov r3, #0 - bl ov13_02227374 - add sp, #8 - pop {r4, pc} -_02227868: - mov r0, #0xc - str r0, [sp] - ldr r0, _02227884 ; =0x00010200 - mov r1, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov13_02227374 -_0222787C: - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_02227880: .word 0x0000114D -_02227884: .word 0x00010200 - thumb_func_end ov13_022277C8 - - thumb_func_start ov13_02227888 -ov13_02227888: ; 0x02227888 - push {r4, lr} - add r4, r0, #0 - bl ov13_02227650 - add r0, r4, #0 - bl ov13_022277C8 - add r0, r4, #0 - bl ov13_02227698 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02227888 - - thumb_func_start ov13_022278A0 -ov13_022278A0: ; 0x022278A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r6, r1, #0 - mov r1, #9 - ldr r4, [r5, #0x2c] - bl sub_0200B1EC - ldr r2, _02227908 ; =0x0000114D - add r7, r0, #0 - ldrb r3, [r5, r2] - mov r2, #0x90 - ldr r0, [r5, #0x14] - mul r2, r3 - add r2, r5, r2 - lsl r3, r6, #2 - add r2, r2, r3 - ldrh r2, [r2, #0x3c] - mov r1, #0 - bl sub_0200B70C - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - add r2, r7, #0 - bl sub_0200C388 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0222790C ; =0x00010200 - add r3, r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r5, #0x18] - add r0, r4, #0 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02227908: .word 0x0000114D -_0222790C: .word 0x00010200 - thumb_func_end ov13_022278A0 - - thumb_func_start ov13_02227910 -ov13_02227910: ; 0x02227910 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0] - ldr r4, [r5, #0x2c] - ldr r1, [r1, #0xc] - mov r0, #0x82 - add r4, #0x20 - bl sub_02023790 - ldr r1, _0222796C ; =0x0000114D - add r7, r0, #0 - ldrb r2, [r5, r1] - mov r1, #0x90 - mul r1, r2 - add r2, r5, r1 - lsl r1, r6, #2 - add r1, r2, r1 - ldr r2, [r5, #0] - ldrh r1, [r1, #0x3c] - ldr r2, [r2, #0xc] - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - bl sub_0207CFC8 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02227970 ; =0x00010200 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, #0 - mov r3, #4 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222796C: .word 0x0000114D -_02227970: .word 0x00010200 - thumb_func_end ov13_02227910 - - thumb_func_start ov13_02227974 -ov13_02227974: ; 0x02227974 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r6, #0 - add r5, r0, #0 - add r4, r6, #0 - add r7, r6, #0 -_02227980: - ldr r0, [r5, #0x2c] - add r1, r7, #0 - add r0, r0, r4 - bl sub_0201ADA4 - add r6, r6, #1 - add r4, #0x10 - cmp r6, #4 - blo _02227980 - ldr r0, _022279E8 ; =0x0000114D - ldr r1, [r5, #0] - ldrb r2, [r5, r0] - add r0, r1, r2 - add r0, #0x27 - ldrb r4, [r0] - add r0, r1, r2 - add r0, #0x2c - ldrb r1, [r0] - mov r0, #6 - add r6, r1, #0 - mul r6, r0 - add r0, r5, #0 - add r1, r4, r6 - bl ov13_022278A0 - mov r2, #0 - str r2, [sp] - ldr r0, _022279EC ; =0x00010200 - str r2, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, r6 - mov r3, #1 - bl ov13_0222754C - add r0, r5, #0 - add r1, r4, r6 - bl ov13_02227910 - mov r0, #6 - str r0, [sp] - ldr r0, _022279F0 ; =0x00030201 - mov r1, #3 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1f - mov r3, #2 - bl ov13_02227374 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022279E8: .word 0x0000114D -_022279EC: .word 0x00010200 -_022279F0: .word 0x00030201 - thumb_func_end ov13_02227974 - - thumb_func_start ov13_022279F4 -ov13_022279F4: ; 0x022279F4 - push {r4, lr} - ldr r2, _02227A18 ; =0x000003E2 - add r4, r0, #0 - add r0, #0x1c - mov r1, #1 - mov r3, #0xe - bl sub_0200E060 - add r0, r4, #0 - add r0, #0x1c - mov r1, #0xf - bl sub_0201ADA4 - add r0, r4, #0 - bl ov13_02227A1C - pop {r4, pc} - nop -_02227A18: .word 0x000003E2 - thumb_func_end ov13_022279F4 - - thumb_func_start ov13_02227A1C -ov13_02227A1C: ; 0x02227A1C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #1 - bl sub_02002AC8 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl ov16_0223EDF0 - mov r3, #0 - str r3, [sp] - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x18] - add r0, #0x1c - mov r1, #1 - bl sub_0201D738 - add r4, #0x32 - strb r0, [r4] - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov13_02227A1C - - thumb_func_start ov13_02227A4C -ov13_02227A4C: ; 0x02227A4C - push {r4, lr} - add r4, r0, #0 - ldr r3, [r4, #0] - ldrh r1, [r3, #0x20] - cmp r1, #0 - bne _02227A5C - mov r0, #0 - pop {r4, pc} -_02227A5C: - ldr r0, [r3, #8] - ldr r3, [r3, #0xc] - mov r2, #1 - bl sub_0207D688 - cmp r0, #0 - bne _02227A76 - ldr r1, [r4, #0] - mov r0, #0 - strh r0, [r1, #0x20] - ldr r1, [r4, #0] - strb r0, [r1, #0x1f] - pop {r4, pc} -_02227A76: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02227A4C - - thumb_func_start ov13_02227A7C -ov13_02227A7C: ; 0x02227A7C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02227AC4 ; =0x0000114D - ldr r6, [r5, #0] - ldrb r7, [r5, r0] - mov r0, #0x90 - ldrh r2, [r6, #0x20] - mul r0, r7 - mov r4, #0 - add r1, r5, r0 -_02227A90: - ldrh r0, [r1, #0x3c] - cmp r2, r0 - bne _02227ABA - add r0, r4, #0 - mov r1, #6 - bl sub_020E2178 - add r0, r6, r7 - add r0, #0x27 - strb r1, [r0] - add r0, r4, #0 - mov r1, #6 - bl sub_020E2178 - ldr r1, _02227AC4 ; =0x0000114D - ldr r2, [r5, #0] - ldrb r1, [r5, r1] - add r1, r2, r1 - add r1, #0x2c - strb r0, [r1] - pop {r3, r4, r5, r6, r7, pc} -_02227ABA: - add r4, r4, #1 - add r1, r1, #4 - cmp r4, #0x24 - blo _02227A90 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02227AC4: .word 0x0000114D - thumb_func_end ov13_02227A7C - - thumb_func_start ov13_02227AC8 -ov13_02227AC8: ; 0x02227AC8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0 - str r0, [sp, #4] -_02227AD2: - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] -_02227ADE: - ldr r0, [r4, #0] - ldr r2, [sp] - ldr r0, [r0, #8] - lsl r2, r2, #0x10 - ldr r1, [sp, #8] - lsr r2, r2, #0x10 - bl sub_0207D910 - add r5, r0, #0 - beq _02227B50 - ldrh r0, [r5] - cmp r0, #0 - beq _02227B48 - ldrh r1, [r5, #2] - cmp r1, #0 - beq _02227B48 - ldr r2, [r4, #0] - mov r1, #0xd - ldr r2, [r2, #0xc] - bl sub_0207CFF0 - add r7, r0, #0 - ldr r1, _02227B9C ; =0x02229BB0 - mov r0, #0 -_02227B0E: - mov r2, #1 - lsl r2, r0 - tst r2, r7 - beq _02227B40 - ldrb r2, [r1] - mov r3, #0x90 - add r6, r2, #0 - mul r6, r3 - add r3, r4, r2 - ldr r2, _02227BA0 ; =0x0000114F - ldrb r2, [r3, r2] - add r3, r4, r6 - lsl r2, r2, #2 - add r2, r2, r3 - ldrh r3, [r5] - strh r3, [r2, #0x3c] - ldrh r3, [r5, #2] - strh r3, [r2, #0x3e] - ldrb r2, [r1] - add r6, r4, r2 - ldr r2, _02227BA0 ; =0x0000114F - ldrb r2, [r6, r2] - add r3, r2, #1 - ldr r2, _02227BA0 ; =0x0000114F - strb r3, [r6, r2] -_02227B40: - add r0, r0, #1 - add r1, r1, #1 - cmp r0, #5 - blo _02227B0E -_02227B48: - ldr r0, [sp] - add r0, r0, #1 - str r0, [sp] - b _02227ADE -_02227B50: - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #8 - blo _02227AD2 - mov r5, #0 - add r7, r5, #0 -_02227B5E: - ldr r0, _02227BA0 ; =0x0000114F - add r6, r4, r5 - ldrb r0, [r6, r0] - cmp r0, #0 - bne _02227B6E - ldr r0, _02227BA4 ; =0x00001154 - strb r7, [r6, r0] - b _02227B7A -_02227B6E: - sub r0, r0, #1 - mov r1, #6 - bl sub_020E1F6C - ldr r1, _02227BA4 ; =0x00001154 - strb r0, [r6, r1] -_02227B7A: - ldr r1, [r4, #0] - ldr r0, _02227BA4 ; =0x00001154 - add r2, r1, r5 - add r2, #0x2c - ldrb r0, [r6, r0] - ldrb r2, [r2] - cmp r0, r2 - bhs _02227B90 - add r1, r1, r5 - add r1, #0x2c - strb r0, [r1] -_02227B90: - add r5, r5, #1 - cmp r5, #5 - blo _02227B5E - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02227B9C: .word 0x02229BB0 -_02227BA0: .word 0x0000114F -_02227BA4: .word 0x00001154 - thumb_func_end ov13_02227AC8 - - thumb_func_start ov13_02227BA8 -ov13_02227BA8: ; 0x02227BA8 - push {r3, r4} - ldr r2, _02227BD8 ; =0x0000114D - ldr r3, [r0, #0] - ldrb r2, [r0, r2] - add r3, r3, r2 - add r3, #0x2c - ldrb r4, [r3] - mov r3, #6 - mul r3, r4 - add r1, r1, r3 - lsl r3, r1, #2 - mov r1, #0x90 - mul r1, r2 - add r0, r0, r1 - add r1, r0, r3 - ldrh r0, [r1, #0x3c] - cmp r0, #0 - beq _02227BD2 - ldrh r1, [r1, #0x3e] - cmp r1, #0 - bne _02227BD4 -_02227BD2: - mov r0, #0 -_02227BD4: - pop {r3, r4} - bx lr - ; .align 2, 0 -_02227BD8: .word 0x0000114D - thumb_func_end ov13_02227BA8 - - thumb_func_start ov13_02227BDC -ov13_02227BDC: ; 0x02227BDC - push {r4, lr} - add r4, r0, #0 - bl ov13_02227C08 - add r0, r4, #0 - bl ov13_02227C54 - add r0, r4, #0 - bl ov13_02227DE8 - add r0, r4, #0 - bl ov13_02227F7C - add r0, r4, #0 - bl ov13_02228070 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02227BDC - - thumb_func_start ov13_02227C08 -ov13_02227C08: ; 0x02227C08 - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _02227C50 ; =0x02229BE4 - add r2, sp, #0 - add r5, r0, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl ov16_0223E010 - add r4, r0, #0 - bl sub_0200C704 - mov r1, #0xc3 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r1, [r5, r1] - add r0, r4, #0 - mov r2, #0xc - bl sub_0200C7C0 - mov r1, #0xc3 - lsl r1, r1, #2 - ldr r1, [r5, r1] - add r0, r4, #0 - add r2, sp, #0 - bl sub_0200CB30 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_02227C50: .word 0x02229BE4 - thumb_func_end ov13_02227C08 - - thumb_func_start ov13_02227C54 -ov13_02227C54: ; 0x02227C54 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - ldr r1, [r6, #0] - mov r0, #0x10 - ldr r1, [r1, #0xc] - bl sub_02006C24 - add r7, r0, #0 - ldr r0, [r6, #0] - ldr r0, [r0, #0] - bl ov16_0223E010 - str r0, [sp, #0x18] - mov r4, #0 -_02227C72: - ldr r0, _02227D0C ; =0x0000B4B7 - add r5, r4, r0 - mov r0, #1 - add r1, r0, #0 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0xc3 - str r5, [sp, #8] - lsl r1, r1, #2 - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CC3C - mov r0, #1 - mov r1, #2 - bl sub_0207CE78 - str r7, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - mov r3, #0xc3 - str r5, [sp, #0x14] - lsl r3, r3, #2 - ldr r0, [r6, #8] - ldr r2, [sp, #0x18] - ldr r3, [r6, r3] - mov r1, #3 - bl sub_0200CDC4 - add r4, r4, #1 - cmp r4, #6 - blo _02227C72 - bl sub_0207CF40 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02227D0C ; =0x0000B4B7 - mov r1, #0xc3 - str r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CE24 - bl sub_0207CF44 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02227D0C ; =0x0000B4B7 - mov r1, #0xc3 - str r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [sp, #0x18] - ldr r1, [r6, r1] - add r2, r7, #0 - bl sub_0200CE54 - add r0, r7, #0 - bl sub_02006CA8 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02227D0C: .word 0x0000B4B7 - thumb_func_end ov13_02227C54 - - thumb_func_start ov13_02227D10 -ov13_02227D10: ; 0x02227D10 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - ldr r0, [r0, #0] - add r4, r2, #0 - bl ov16_0223E010 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r1, #0xc3 - str r4, [sp, #4] - lsl r1, r1, #2 - ldr r1, [r5, r1] - add r0, r7, #0 - mov r2, #0x10 - bl sub_0200D948 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02227D10 - - thumb_func_start ov13_02227D48 -ov13_02227D48: ; 0x02227D48 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r0, r1, #0 - mov r1, #2 - add r4, r2, #0 - bl sub_0207CE78 - add r2, r0, #0 - mov r0, #3 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - lsl r0, r4, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r3, [r5, #0] - ldr r0, [r5, #8] - ldr r3, [r3, #0xc] - mov r1, #0x10 - bl sub_02003050 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov13_02227D48 - - thumb_func_start ov13_02227D78 -ov13_02227D78: ; 0x02227D78 - push {r4, r5, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - ldr r0, [r0, #0] - bl ov16_0223E010 - mov r2, #0 - add r1, sp, #0 - strh r2, [r1] - strh r2, [r1, #2] - strh r2, [r1, #4] - strh r2, [r1, #6] - mov r1, #0x14 - ldr r3, _02227DD4 ; =0x02229CCC - mul r1, r4 - ldr r3, [r3, r1] - str r2, [sp, #0xc] - str r3, [sp, #8] - mov r3, #2 - str r3, [sp, #0x10] - ldr r3, _02227DD8 ; =0x02229CBC - str r2, [sp, #0x30] - ldr r3, [r3, r1] - add r2, sp, #0 - str r3, [sp, #0x14] - ldr r3, _02227DDC ; =0x02229CC0 - ldr r3, [r3, r1] - str r3, [sp, #0x18] - ldr r3, _02227DE0 ; =0x02229CC4 - ldr r3, [r3, r1] - str r3, [sp, #0x1c] - ldr r3, _02227DE4 ; =0x02229CC8 - ldr r1, [r3, r1] - str r1, [sp, #0x20] - mov r1, #1 - str r1, [sp, #0x2c] - mov r1, #0xc3 - lsl r1, r1, #2 - ldr r1, [r5, r1] - bl sub_0200CE6C - add sp, #0x34 - pop {r4, r5, pc} - nop -_02227DD4: .word 0x02229CCC -_02227DD8: .word 0x02229CBC -_02227DDC: .word 0x02229CC0 -_02227DE0: .word 0x02229CC4 -_02227DE4: .word 0x02229CC8 - thumb_func_end ov13_02227D78 - - thumb_func_start ov13_02227DE8 -ov13_02227DE8: ; 0x02227DE8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r7, #0x31 - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #4 -_02227DF4: - add r0, r6, #0 - add r1, r4, #0 - bl ov13_02227D78 - str r0, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blo _02227DF4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_02227DE8 - - thumb_func_start ov13_02227E08 -ov13_02227E08: ; 0x02227E08 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0] - ldr r0, [r0, #0] - bl ov16_0223E010 - mov r6, #0x31 - str r0, [sp] - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #4 -_02227E1E: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blo _02227E1E - add r0, r7, #0 - bl ov13_02227FDC - add r0, r7, #0 - bl ov13_022280C8 - mov r1, #0xc3 - lsl r1, r1, #2 - ldr r0, [sp] - ldr r1, [r7, r1] - bl sub_0200D0B0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02227E08 - - thumb_func_start ov13_02227E48 -ov13_02227E48: ; 0x02227E48 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - mov r1, #1 - add r6, r0, #0 - bl sub_0200D3F4 - lsl r1, r5, #0x10 - lsl r2, r4, #0x10 - add r0, r6, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov13_02227E48 - - thumb_func_start ov13_02227E68 -ov13_02227E68: ; 0x02227E68 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0x31 - str r0, [sp] - add r7, r1, #0 - mov r4, #0 - add r5, r0, #0 - lsl r6, r6, #4 -_02227E76: - ldr r0, [r5, r6] - mov r1, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blo _02227E76 - cmp r7, #0 - beq _02227E94 - cmp r7, #1 - beq _02227E9C - cmp r7, #2 - beq _02227EA4 - pop {r3, r4, r5, r6, r7, pc} -_02227E94: - ldr r0, [sp] - bl ov13_02227EAC - pop {r3, r4, r5, r6, r7, pc} -_02227E9C: - ldr r0, [sp] - bl ov13_02227EE0 - pop {r3, r4, r5, r6, r7, pc} -_02227EA4: - ldr r0, [sp] - bl ov13_02227F38 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov13_02227E68 - - thumb_func_start ov13_02227EAC -ov13_02227EAC: ; 0x02227EAC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - ldrh r1, [r1, #0x20] - cmp r1, #0 - beq _02227EDA - ldr r2, _02227EDC ; =0x0000B4B7 - bl ov13_02227D10 - ldr r1, [r4, #0] - ldr r3, _02227EDC ; =0x0000B4B7 - ldrh r1, [r1, #0x20] - add r0, r4, #0 - mov r2, #0 - bl ov13_02227D48 - mov r0, #0x31 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x18 - mov r2, #0xb2 - bl ov13_02227E48 -_02227EDA: - pop {r4, pc} - ; .align 2, 0 -_02227EDC: .word 0x0000B4B7 - thumb_func_end ov13_02227EAC - - thumb_func_start ov13_02227EE0 -ov13_02227EE0: ; 0x02227EE0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r6, _02227F30 ; =0x02229C44 - mov r4, #0 - add r7, r5, #0 -_02227EEA: - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02227BA8 - str r0, [sp] - cmp r0, #0 - beq _02227F22 - ldr r2, _02227F34 ; =0x0000B4B7 - ldr r1, [sp] - add r0, r5, #0 - add r2, r4, r2 - bl ov13_02227D10 - ldr r3, _02227F34 ; =0x0000B4B7 - lsl r2, r4, #0x10 - ldr r1, [sp] - add r0, r5, #0 - lsr r2, r2, #0x10 - add r3, r4, r3 - bl ov13_02227D48 - mov r0, #0x31 - lsl r0, r0, #4 - ldr r0, [r7, r0] - ldr r1, [r6, #0] - ldr r2, [r6, #4] - bl ov13_02227E48 -_02227F22: - add r4, r4, #1 - add r6, #8 - add r7, r7, #4 - cmp r4, #6 - blo _02227EEA - pop {r3, r4, r5, r6, r7, pc} - nop -_02227F30: .word 0x02229C44 -_02227F34: .word 0x0000B4B7 - thumb_func_end ov13_02227EE0 - - thumb_func_start ov13_02227F38 -ov13_02227F38: ; 0x02227F38 - push {r3, r4, r5, lr} - ldr r1, _02227F74 ; =0x0000114D - add r4, r0, #0 - ldrb r1, [r4, r1] - ldr r2, [r4, #0] - add r1, r2, r1 - add r1, #0x27 - ldrb r1, [r1] - bl ov13_02227BA8 - add r5, r0, #0 - ldr r2, _02227F78 ; =0x0000B4B7 - add r0, r4, #0 - add r1, r5, #0 - bl ov13_02227D10 - ldr r3, _02227F78 ; =0x0000B4B7 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov13_02227D48 - mov r0, #0x31 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x28 - mov r2, #0x2c - bl ov13_02227E48 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02227F74: .word 0x0000114D -_02227F78: .word 0x0000B4B7 - thumb_func_end ov13_02227F38 - - thumb_func_start ov13_02227F7C -ov13_02227F7C: ; 0x02227F7C - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl ov16_0223E010 - ldr r1, _02227FD8 ; =0x0000B4BE - add r4, r0, #0 - str r1, [sp] - str r1, [sp, #4] - sub r1, r1, #5 - str r1, [sp, #8] - str r1, [sp, #0xc] - mov r1, #0xc3 - ldr r3, [r5, #0] - lsl r1, r1, #2 - ldr r1, [r5, r1] - ldr r2, [r5, #8] - ldr r3, [r3, #0xc] - bl ov16_0226DB7C - ldr r3, _02227FD8 ; =0x0000B4BE - mov r1, #0xc3 - str r3, [sp] - sub r0, r3, #5 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r2, [r5, #0] - lsl r1, r1, #2 - ldr r1, [r5, r1] - ldr r2, [r2, #0xc] - add r0, r4, #0 - bl ov16_0226DC24 - add r1, r0, #0 - ldr r0, [r5, #0x34] - bl ov13_02228A64 - add sp, #0x14 - pop {r4, r5, pc} - nop -_02227FD8: .word 0x0000B4BE - thumb_func_end ov13_02227F7C - - thumb_func_start ov13_02227FDC -ov13_02227FDC: ; 0x02227FDC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x34] - bl ov13_02228A58 - bl ov16_0226DCA8 - ldr r3, _02228004 ; =0x0000B4B9 - mov r0, #0xc3 - add r1, r3, #5 - str r3, [sp] - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r2, r1, #0 - bl ov16_0226DBFC - add sp, #4 - pop {r3, r4, pc} - nop -_02228004: .word 0x0000B4B9 - thumb_func_end ov13_02227FDC - - thumb_func_start ov13_02228008 -ov13_02228008: ; 0x02228008 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, _02228048 ; =0x02229BC8 - lsl r2, r4, #2 - ldr r0, [r5, #0x34] - ldr r1, [r1, r2] - bl ov13_02228A9C - cmp r4, #0 - beq _02228026 - cmp r4, #1 - beq _02228032 - cmp r4, #2 - pop {r3, r4, r5, pc} -_02228026: - ldr r1, _0222804C ; =0x0000114D - ldr r0, [r5, #0x34] - ldrb r1, [r5, r1] - bl ov13_02228A68 - pop {r3, r4, r5, pc} -_02228032: - ldr r1, _0222804C ; =0x0000114D - ldr r2, [r5, #0] - ldrb r1, [r5, r1] - ldr r0, [r5, #0x34] - add r1, r2, r1 - add r1, #0x27 - ldrb r1, [r1] - bl ov13_02228A68 - pop {r3, r4, r5, pc} - nop -_02228048: .word 0x02229BC8 -_0222804C: .word 0x0000114D - thumb_func_end ov13_02228008 - - thumb_func_start ov13_02228050 -ov13_02228050: ; 0x02228050 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x34] - mov r1, #0 - bl ov13_02228A60 - ldr r0, [r4, #0x34] - bl ov13_02228A90 - ldr r0, [r4, #0x34] - bl ov13_02228A58 - bl ov16_0226DDE8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov13_02228050 - - thumb_func_start ov13_02228070 -ov13_02228070: ; 0x02228070 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl ov16_0223E010 - ldr r1, _022280C4 ; =0x0000B4BD - add r4, r0, #0 - str r1, [sp] - str r1, [sp, #4] - sub r1, r1, #5 - str r1, [sp, #8] - str r1, [sp, #0xc] - mov r1, #0xc3 - ldr r2, [r5, #0] - lsl r1, r1, #2 - ldr r1, [r5, r1] - ldr r2, [r2, #0xc] - ldr r3, [r5, #8] - bl ov16_0226DE44 - ldr r3, _022280C4 ; =0x0000B4BD - mov r1, #0xc3 - str r3, [sp] - sub r0, r3, #5 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r2, [r5, #0] - lsl r1, r1, #2 - ldr r1, [r5, r1] - ldr r2, [r2, #0xc] - add r0, r4, #0 - bl ov16_0226DEEC - str r0, [r5, #0x38] - add sp, #0x14 - pop {r4, r5, pc} - nop -_022280C4: .word 0x0000B4BD - thumb_func_end ov13_02228070 - - thumb_func_start ov13_022280C8 -ov13_022280C8: ; 0x022280C8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x38] - bl ov16_0226DF68 - ldr r3, _022280EC ; =0x0000B4B8 - mov r0, #0xc3 - add r1, r3, #5 - str r3, [sp] - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r2, r1, #0 - bl ov16_0226DEC4 - add sp, #4 - pop {r3, r4, pc} - nop -_022280EC: .word 0x0000B4B8 - thumb_func_end ov13_022280C8 - - thumb_func_start ov13_022280F0 -ov13_022280F0: ; 0x022280F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x14] - cmp r0, #1 - bne _02228116 - lsl r3, r1, #3 - ldr r1, _02228120 ; =0x02229BFC - ldr r2, _02228124 ; =0x02229C00 - ldr r0, [r4, #0x38] - ldr r1, [r1, r3] - ldr r2, [r2, r3] - bl ov16_0226DFB0 - ldr r0, [r4, #0x38] - mov r1, #0x3c - bl ov16_0226DFD0 - pop {r4, pc} -_02228116: - ldr r0, [r4, #0x38] - bl ov16_0226DFBC - pop {r4, pc} - nop -_02228120: .word 0x02229BFC -_02228124: .word 0x02229C00 - thumb_func_end ov13_022280F0 - - thumb_func_start ov13_02228128 -ov13_02228128: ; 0x02228128 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #0xca - lsl r0, r0, #2 - mov r2, #0 - add r0, r5, r0 - add r3, r2, #0 - add r4, r1, #0 - bl ov13_02228460 - mov r0, #0x10 - str r0, [sp] - ldr r0, _022283E4 ; =0x00000448 - mov r3, #9 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - str r3, [sp, #4] - bl ov13_02228460 - mov r0, #0x10 - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - ldr r0, _022283E8 ; =0x00000568 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x12 - bl ov13_02228460 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _022283EC ; =0x00000688 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x1b - bl ov13_02228460 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _022283F0 ; =0x0000078C - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x20 - bl ov13_02228460 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #0x89 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - mov r2, #0 - mov r3, #0x25 - bl ov13_02228460 - mov r0, #0x1a - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r0, _022283F4 ; =0x00000994 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x25 - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022283F8 ; =0x00000A98 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x39 - bl ov13_02228460 - ldr r0, _022283FC ; =0x00000ACA - mov r2, #5 - str r2, [sp] - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x39 - str r2, [sp, #4] - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228400 ; =0x00000AFC - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xa - mov r3, #0x39 - bl ov13_02228460 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _02228404 ; =0x00000B2E - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0 - bl ov13_02228460 - ldr r0, _02228408 ; =0x00000BEE - mov r2, #0x10 - str r2, [sp] - mov r3, #6 - add r0, r5, r0 - add r1, r4, #0 - str r3, [sp, #4] - bl ov13_02228460 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _0222840C ; =0x00000CAE - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0xc - bl ov13_02228460 - mov r2, #0x10 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _02228410 ; =0x00000D6E - add r1, r4, #0 - add r0, r5, r0 - mov r3, #0x12 - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228414 ; =0x00000E2E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x2f - bl ov13_02228460 - mov r0, #0xe6 - mov r2, #5 - lsl r0, r0, #4 - str r2, [sp] - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x2f - str r2, [sp, #4] - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228418 ; =0x00000E92 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xa - mov r3, #0x2f - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222841C ; =0x00000EC4 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xf - mov r3, #0x2f - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228420 ; =0x00000EF6 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - mov r3, #0x34 - bl ov13_02228460 - ldr r0, _02228424 ; =0x00000F28 - mov r2, #5 - str r2, [sp] - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0x34 - str r2, [sp, #4] - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228428 ; =0x00000F5A - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xa - mov r3, #0x34 - bl ov13_02228460 - mov r0, #5 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222842C ; =0x00000F8C - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0xf - mov r3, #0x34 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228430 ; =0x00000FBE - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x2f - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228434 ; =0x00000FDE - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x18 - mov r3, #0x2f - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228438 ; =0x00000FFE - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1c - mov r3, #0x2f - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222843C ; =0x0000101E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x33 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228440 ; =0x0000103E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x18 - mov r3, #0x33 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228444 ; =0x0000105E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1c - mov r3, #0x33 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228448 ; =0x0000107E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x37 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222844C ; =0x0000109E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x18 - mov r3, #0x37 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228450 ; =0x000010BE - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1c - mov r3, #0x37 - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228454 ; =0x000010DE - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x14 - mov r3, #0x3b - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02228458 ; =0x000010FE - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x18 - mov r3, #0x3b - bl ov13_02228460 - mov r0, #4 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0222845C ; =0x0000111E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0x1c - mov r3, #0x3b - bl ov13_02228460 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022283E4: .word 0x00000448 -_022283E8: .word 0x00000568 -_022283EC: .word 0x00000688 -_022283F0: .word 0x0000078C -_022283F4: .word 0x00000994 -_022283F8: .word 0x00000A98 -_022283FC: .word 0x00000ACA -_02228400: .word 0x00000AFC -_02228404: .word 0x00000B2E -_02228408: .word 0x00000BEE -_0222840C: .word 0x00000CAE -_02228410: .word 0x00000D6E -_02228414: .word 0x00000E2E -_02228418: .word 0x00000E92 -_0222841C: .word 0x00000EC4 -_02228420: .word 0x00000EF6 -_02228424: .word 0x00000F28 -_02228428: .word 0x00000F5A -_0222842C: .word 0x00000F8C -_02228430: .word 0x00000FBE -_02228434: .word 0x00000FDE -_02228438: .word 0x00000FFE -_0222843C: .word 0x0000101E -_02228440: .word 0x0000103E -_02228444: .word 0x0000105E -_02228448: .word 0x0000107E -_0222844C: .word 0x0000109E -_02228450: .word 0x000010BE -_02228454: .word 0x000010DE -_02228458: .word 0x000010FE -_0222845C: .word 0x0000111E - thumb_func_end ov13_02228128 - - thumb_func_start ov13_02228460 -ov13_02228460: ; 0x02228460 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r0, sp, #8 - mov lr, r3 - ldrb r3, [r0, #0x14] - mov r6, #0 - mov ip, r3 - cmp r3, #0 - ble _022284AC - ldrb r3, [r0, #0x10] - lsl r2, r2, #1 - add r7, r1, r2 -_02228478: - mov r2, #0 - cmp r3, #0 - ble _022284A0 - mov r0, lr - add r0, r0, r6 - lsl r0, r0, #6 - add r5, r7, r0 - add r0, r6, #0 - mul r0, r3 - lsl r1, r0, #1 - ldr r0, [sp] - add r4, r0, r1 -_02228490: - lsl r1, r2, #1 - ldrh r0, [r5, r1] - strh r0, [r4, r1] - add r0, r2, #1 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - cmp r2, r3 - blt _02228490 -_022284A0: - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - mov r0, ip - cmp r6, r0 - blt _02228478 -_022284AC: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_02228460 - - thumb_func_start ov13_022284B0 -ov13_022284B0: ; 0x022284B0 - cmp r1, #0x10 - bhi _0222853E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022284C0: ; jump table - .short _022284E2 - _022284C0 - 2 ; case 0 - .short _022284E2 - _022284C0 - 2 ; case 1 - .short _022284E2 - _022284C0 - 2 ; case 2 - .short _022284E2 - _022284C0 - 2 ; case 3 - .short _022284F2 - _022284C0 - 2 ; case 4 - .short _02228500 - _022284C0 - 2 ; case 5 - .short _0222850C - _022284C0 - 2 ; case 6 - .short _0222850C - _022284C0 - 2 ; case 7 - .short _0222850C - _022284C0 - 2 ; case 8 - .short _0222850C - _022284C0 - 2 ; case 9 - .short _0222850C - _022284C0 - 2 ; case 10 - .short _0222850C - _022284C0 - 2 ; case 11 - .short _02228518 - _022284C0 - 2 ; case 12 - .short _02228524 - _022284C0 - 2 ; case 13 - .short _02228500 - _022284C0 - 2 ; case 14 - .short _02228530 - _022284C0 - 2 ; case 15 - .short _02228500 - _022284C0 - 2 ; case 16 -_022284E2: - mov r1, #0xca - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0x12 - lsl r0, r0, #4 - mul r0, r2 - add r0, r1, r0 - bx lr -_022284F2: - ldr r1, _02228544 ; =0x00000688 - add r1, r0, r1 - lsl r0, r2, #6 - add r0, r2, r0 - lsl r0, r0, #2 - add r0, r1, r0 - bx lr -_02228500: - ldr r1, _02228548 ; =0x00000A98 - add r1, r0, r1 - mov r0, #0x32 - mul r0, r2 - add r0, r1, r0 - bx lr -_0222850C: - ldr r1, _0222854C ; =0x00000B2E - add r1, r0, r1 - mov r0, #0xc0 - mul r0, r2 - add r0, r1, r0 - bx lr -_02228518: - ldr r1, _02228550 ; =0x00000E2E - add r1, r0, r1 - mov r0, #0x32 - mul r0, r2 - add r0, r1, r0 - bx lr -_02228524: - ldr r1, _02228554 ; =0x00000EF6 - add r1, r0, r1 - mov r0, #0x32 - mul r0, r2 - add r0, r1, r0 - bx lr -_02228530: - ldr r1, _02228544 ; =0x00000688 - add r1, r0, r1 - lsl r0, r2, #6 - add r0, r2, r0 - lsl r0, r0, #2 - add r0, r1, r0 - bx lr -_0222853E: - mov r0, #0 - bx lr - nop -_02228544: .word 0x00000688 -_02228548: .word 0x00000A98 -_0222854C: .word 0x00000B2E -_02228550: .word 0x00000E2E -_02228554: .word 0x00000EF6 - thumb_func_end ov13_022284B0 - - thumb_func_start ov13_02228558 -ov13_02228558: ; 0x02228558 - cmp r2, #3 - bne _02228560 - mov r0, #5 - bx lr -_02228560: - cmp r1, #0x10 - bhi _022285BE - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02228570: ; jump table - .short _02228592 - _02228570 - 2 ; case 0 - .short _02228592 - _02228570 - 2 ; case 1 - .short _02228592 - _02228570 - 2 ; case 2 - .short _02228592 - _02228570 - 2 ; case 3 - .short _02228596 - _02228570 - 2 ; case 4 - .short _0222859A - _02228570 - 2 ; case 5 - .short _0222859E - _02228570 - 2 ; case 6 - .short _0222859E - _02228570 - 2 ; case 7 - .short _0222859E - _02228570 - 2 ; case 8 - .short _0222859E - _02228570 - 2 ; case 9 - .short _0222859E - _02228570 - 2 ; case 10 - .short _0222859E - _02228570 - 2 ; case 11 - .short _0222859A - _02228570 - 2 ; case 12 - .short _0222859A - _02228570 - 2 ; case 13 - .short _0222859A - _02228570 - 2 ; case 14 - .short _022285AA - _02228570 - 2 ; case 15 - .short _0222859A - _02228570 - 2 ; case 16 -_02228592: - mov r0, #0 - bx lr -_02228596: - mov r0, #3 - bx lr -_0222859A: - mov r0, #2 - bx lr -_0222859E: - ldr r1, _022285C4 ; =0x0000114D - ldrb r0, [r0, r1] - add r0, #8 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bx lr -_022285AA: - cmp r3, #2 - bne _022285BA - ldr r1, _022285C4 ; =0x0000114D - ldrb r0, [r0, r1] - add r0, #8 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bx lr -_022285BA: - mov r0, #1 - bx lr -_022285BE: - mov r0, #0 - bx lr - nop -_022285C4: .word 0x0000114D - thumb_func_end ov13_02228558 - - thumb_func_start ov13_022285C8 -ov13_022285C8: ; 0x022285C8 - push {r4, r5, r6, r7} - cmp r2, #0 - bne _022285D8 - ldr r2, _0222862C ; =0x00000FBE - add r2, r0, r2 - lsl r0, r3, #5 - add r0, r2, r0 - b _02228600 -_022285D8: - cmp r2, #1 - bne _022285E6 - ldr r2, _02228630 ; =0x0000101E - add r2, r0, r2 - lsl r0, r3, #5 - add r0, r2, r0 - b _02228600 -_022285E6: - cmp r2, #2 - bne _022285F4 - ldr r2, _02228634 ; =0x0000107E - add r2, r0, r2 - lsl r0, r3, #5 - add r0, r2, r0 - b _02228600 -_022285F4: - cmp r2, #3 - bne _02228628 - ldr r2, _02228638 ; =0x000010DE - add r2, r0, r2 - lsl r0, r3, #5 - add r0, r2, r0 -_02228600: - mov r2, #0 -_02228602: - lsl r4, r2, #3 - lsl r5, r2, #5 - mov r3, #0 - add r4, r0, r4 - add r5, r1, r5 -_0222860C: - lsl r6, r3, #1 - ldrh r7, [r4, r6] - add r3, r3, #1 - lsl r3, r3, #0x10 - add r6, r5, r6 - lsr r3, r3, #0x10 - strh r7, [r6, #0xc] - cmp r3, #4 - blo _0222860C - add r2, r2, #1 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - cmp r2, #4 - blo _02228602 -_02228628: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_0222862C: .word 0x00000FBE -_02228630: .word 0x0000101E -_02228634: .word 0x0000107E -_02228638: .word 0x000010DE - thumb_func_end ov13_022285C8 - - thumb_func_start ov13_0222863C -ov13_0222863C: ; 0x0222863C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r2, [sp, #4] - str r3, [sp, #8] - add r5, r1, #0 - ldr r1, [sp, #4] - ldr r2, [sp, #8] - str r0, [sp] - bl ov13_022284B0 - add r3, sp, #0x10 - add r4, r0, #0 - ldrb r3, [r3, #0x10] - ldr r0, [sp] - ldr r1, [sp, #4] - ldr r2, [sp, #8] - bl ov13_02228558 - lsl r0, r0, #0x1c - lsr r2, r0, #0x10 - ldr r0, [sp, #4] - ldr r6, _022286A8 ; =0x02229D7F - lsl r3, r0, #2 - ldr r0, _022286AC ; =0x02229D7E - ldrb r6, [r6, r3] - ldrb r0, [r0, r3] - mov r1, #0 - mul r6, r0 - cmp r6, #0 - ble _02228698 - ldr r0, _022286B0 ; =0x02229D7C - ldr r7, _022286B4 ; =0x00000FFF - add r3, r0, r3 -_0222867E: - lsl r0, r1, #1 - ldrh r6, [r4, r0] - and r6, r7 - orr r6, r2 - strh r6, [r5, r0] - add r0, r1, #1 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldrb r6, [r3, #2] - ldrb r0, [r3, #3] - mul r0, r6 - cmp r1, r0 - blt _0222867E -_02228698: - ldr r0, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r1, r5, #0 - bl ov13_022285C8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022286A8: .word 0x02229D7F -_022286AC: .word 0x02229D7E -_022286B0: .word 0x02229D7C -_022286B4: .word 0x00000FFF - thumb_func_end ov13_0222863C - - thumb_func_start ov13_022286B8 -ov13_022286B8: ; 0x022286B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r1, [sp, #0xc] - str r2, [sp, #0x10] - str r3, [sp, #0x14] - add r5, r0, #0 - ldr r0, [sp, #0xc] - lsl r4, r0, #2 - ldr r0, _0222871C ; =0x02229D7F - ldrb r7, [r0, r4] - ldr r0, _02228720 ; =0x02229D7E - ldrb r6, [r0, r4] - ldr r0, [r5, #0] - add r1, r6, #0 - mul r1, r7 - ldr r0, [r0, #0xc] - lsl r1, r1, #1 - bl sub_02018144 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - add r0, r5, #0 - bl ov13_0222863C - ldr r0, _02228724 ; =0x02229D7D - ldr r3, _02228728 ; =0x02229D7C - ldrb r0, [r0, r4] - ldrb r3, [r3, r4] - ldr r2, [sp, #0x18] - str r0, [sp] - str r6, [sp, #4] - str r7, [sp, #8] - ldr r0, [r5, #4] - mov r1, #6 - bl sub_020198C0 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_0201C3C0 - ldr r0, [sp, #0x18] - bl sub_020181C4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0222871C: .word 0x02229D7F -_02228720: .word 0x02229D7E -_02228724: .word 0x02229D7D -_02228728: .word 0x02229D7C - thumb_func_end ov13_022286B8 - - thumb_func_start ov13_0222872C -ov13_0222872C: ; 0x0222872C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - cmp r1, #6 - blo _0222874A - cmp r1, #0xb - bhi _0222874A - add r0, #0x31 - ldrb r0, [r0] - cmp r0, #0 - bne _0222874A - add r1, #0xb - ldr r0, _022287A0 ; =0x02229DC0 - lsl r1, r1, #2 - ldr r4, [r0, r1] - b _02228750 -_0222874A: - ldr r0, _022287A0 ; =0x02229DC0 - lsl r1, r1, #2 - ldr r4, [r0, r1] -_02228750: - cmp r4, #0 - beq _0222879C - cmp r2, #0 - beq _02228760 - cmp r2, #1 - beq _02228768 - cmp r2, #2 - bne _0222876E -_02228760: - mov r0, #1 - str r0, [sp] - mov r7, #2 - b _0222876E -_02228768: - mov r0, #0 - str r0, [sp] - mov r7, #4 -_0222876E: - mov r5, #0 -_02228770: - ldrb r0, [r4, r5] - cmp r0, #0xff - beq _0222879C - ldr r1, [r6, #0x2c] - lsl r0, r0, #4 - add r0, r1, r0 - ldr r1, [sp] - add r2, r7, #0 - mov r3, #0 - bl sub_0201C04C - ldrb r0, [r4, r5] - ldr r1, [r6, #0x2c] - lsl r0, r0, #4 - add r0, r1, r0 - bl sub_0201A9A4 - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #8 - blo _02228770 -_0222879C: - pop {r3, r4, r5, r6, r7, pc} - nop -_022287A0: .word 0x02229DC0 - thumb_func_end ov13_0222872C - - thumb_func_start ov13_022287A4 -ov13_022287A4: ; 0x022287A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - cmp r1, #6 - blo _022287C0 - cmp r1, #0xb - bhi _022287C0 - sub r0, r1, #6 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x31 - lsl r0, r0, #4 - ldr r6, [r1, r0] - b _022287E4 -_022287C0: - cmp r1, #4 - bne _02228808 - mov r7, #0x31 - mov r4, #0 - lsl r7, r7, #4 -_022287CA: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r6, [r0, r7] - add r0, r6, #0 - bl sub_0200D408 - cmp r0, #0 - bne _022287E4 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #6 - blo _022287CA -_022287E4: - ldr r0, [sp] - cmp r0, #0 - beq _022287F2 - cmp r0, #1 - beq _022287FE - cmp r0, #2 - bne _02228808 -_022287F2: - add r0, r6, #0 - mov r1, #0 - mov r2, #2 - bl sub_0200D5DC - pop {r3, r4, r5, r6, r7, pc} -_022287FE: - mov r1, #0 - add r0, r6, #0 - sub r2, r1, #4 - bl sub_0200D5DC -_02228808: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov13_022287A4 - - thumb_func_start ov13_0222880C -ov13_0222880C: ; 0x0222880C - push {r4, r5} - ldr r3, _02228844 ; =0x0000113E - mov r5, #0 - strb r5, [r0, r3] - add r4, r3, #1 - strb r5, [r0, r4] - add r4, r3, #2 - strb r1, [r0, r4] - add r1, r3, #3 - ldrb r4, [r0, r1] - mov r1, #0xf0 - bic r4, r1 - lsl r1, r2, #0x1c - lsr r1, r1, #0x18 - add r2, r4, #0 - orr r2, r1 - add r1, r3, #3 - strb r2, [r0, r1] - ldrb r2, [r0, r1] - mov r1, #0xf - bic r2, r1 - mov r1, #1 - orr r2, r1 - add r1, r3, #3 - strb r2, [r0, r1] - pop {r4, r5} - bx lr - nop -_02228844: .word 0x0000113E - thumb_func_end ov13_0222880C - - thumb_func_start ov13_02228848 -ov13_02228848: ; 0x02228848 - push {r4, lr} - ldr r3, _0222891C ; =0x00001141 - add r4, r0, #0 - ldrb r1, [r4, r3] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - beq _02228918 - sub r1, r3, #3 - ldrb r1, [r4, r1] - cmp r1, #0 - beq _02228868 - cmp r1, #1 - beq _022288A0 - cmp r1, #2 - beq _022288D8 - pop {r4, pc} -_02228868: - sub r1, r3, #1 - add r3, #0xb - ldrb r1, [r4, r1] - ldrb r3, [r4, r3] - mov r2, #1 - bl ov13_022286B8 - mov r1, #0x45 - lsl r1, r1, #6 - ldrb r1, [r4, r1] - add r0, r4, #0 - mov r2, #1 - bl ov13_0222872C - mov r1, #0x45 - lsl r1, r1, #6 - ldrb r1, [r4, r1] - add r0, r4, #0 - mov r2, #1 - bl ov13_022287A4 - ldr r0, _02228920 ; =0x0000113F - mov r1, #0 - strb r1, [r4, r0] - mov r1, #1 - sub r0, r0, #1 - strb r1, [r4, r0] - pop {r4, pc} -_022288A0: - sub r1, r3, #1 - add r3, #0xb - ldrb r1, [r4, r1] - ldrb r3, [r4, r3] - mov r2, #2 - bl ov13_022286B8 - mov r1, #0x45 - lsl r1, r1, #6 - ldrb r1, [r4, r1] - add r0, r4, #0 - mov r2, #2 - bl ov13_0222872C - mov r1, #0x45 - lsl r1, r1, #6 - ldrb r1, [r4, r1] - add r0, r4, #0 - mov r2, #2 - bl ov13_022287A4 - ldr r0, _02228920 ; =0x0000113F - mov r1, #0 - strb r1, [r4, r0] - mov r1, #2 - sub r0, r0, #1 - strb r1, [r4, r0] - pop {r4, pc} -_022288D8: - sub r1, r3, #1 - add r3, #0xb - ldrb r1, [r4, r1] - ldrb r3, [r4, r3] - mov r2, #0 - bl ov13_022286B8 - mov r1, #0x45 - lsl r1, r1, #6 - ldrb r1, [r4, r1] - add r0, r4, #0 - mov r2, #0 - bl ov13_0222872C - mov r1, #0x45 - lsl r1, r1, #6 - ldrb r1, [r4, r1] - add r0, r4, #0 - mov r2, #0 - bl ov13_022287A4 - ldr r0, _02228920 ; =0x0000113F - mov r2, #0 - strb r2, [r4, r0] - sub r1, r0, #1 - strb r2, [r4, r1] - add r1, r0, #2 - ldrb r2, [r4, r1] - mov r1, #0xf - add r0, r0, #2 - bic r2, r1 - strb r2, [r4, r0] -_02228918: - pop {r4, pc} - nop -_0222891C: .word 0x00001141 -_02228920: .word 0x0000113F - thumb_func_end ov13_02228848 - - thumb_func_start ov13_02228924 -ov13_02228924: ; 0x02228924 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - beq _02228936 - cmp r6, #1 - beq _02228994 - cmp r6, #2 - beq _02228A1A - pop {r3, r4, r5, r6, r7, pc} -_02228936: - mov r1, #0 - add r2, r1, #0 - add r3, r6, #0 - bl ov13_022286B8 - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - add r0, r5, #0 - mov r1, #2 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - add r0, r5, #0 - mov r1, #3 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - ldr r0, [r5, #0] - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0222897A - add r0, r5, #0 - mov r1, #4 - mov r2, #3 - add r3, r6, #0 - bl ov13_022286B8 - b _02228986 -_0222897A: - add r0, r5, #0 - mov r1, #4 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 -_02228986: - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - pop {r3, r4, r5, r6, r7, pc} -_02228994: - mov r4, #0 - mov r7, #3 -_02228998: - add r0, r5, #0 - add r1, r4, #0 - bl ov13_02227BA8 - cmp r0, #0 - bne _022289B6 - add r1, r4, #6 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r2, r7, #0 - add r3, r6, #0 - bl ov13_022286B8 - b _022289C6 -_022289B6: - add r1, r4, #6 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 -_022289C6: - add r4, r4, #1 - cmp r4, #6 - blo _02228998 - ldr r0, _02228A34 ; =0x0000114D - ldrb r1, [r5, r0] - add r0, r0, #7 - add r1, r5, r1 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _022289F4 - add r0, r5, #0 - mov r1, #0xc - mov r2, #3 - add r3, r6, #0 - bl ov13_022286B8 - add r0, r5, #0 - mov r1, #0xd - mov r2, #3 - add r3, r6, #0 - bl ov13_022286B8 - b _02228A0C -_022289F4: - add r0, r5, #0 - mov r1, #0xc - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - add r0, r5, #0 - mov r1, #0xd - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 -_02228A0C: - add r0, r5, #0 - mov r1, #0xe - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - pop {r3, r4, r5, r6, r7, pc} -_02228A1A: - mov r1, #0xf - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - add r0, r5, #0 - mov r1, #0x10 - mov r2, #0 - add r3, r6, #0 - bl ov13_022286B8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02228A34: .word 0x0000114D - thumb_func_end ov13_02228924 - - thumb_func_start ov13_02228A38 -ov13_02228A38: ; 0x02228A38 - push {r3, lr} - mov r1, #0x10 - bl sub_02018144 - add r3, r0, #0 - mov r2, #0x10 - mov r1, #0 -_02228A46: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _02228A46 - pop {r3, pc} - thumb_func_end ov13_02228A38 - - thumb_func_start ov13_02228A50 -ov13_02228A50: ; 0x02228A50 - ldr r3, _02228A54 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_02228A54: .word sub_020181C4 - thumb_func_end ov13_02228A50 - - thumb_func_start ov13_02228A58 -ov13_02228A58: ; 0x02228A58 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov13_02228A58 - - thumb_func_start ov13_02228A5C -ov13_02228A5C: ; 0x02228A5C - ldrb r0, [r0, #8] - bx lr - thumb_func_end ov13_02228A5C - - thumb_func_start ov13_02228A60 -ov13_02228A60: ; 0x02228A60 - strb r1, [r0, #8] - bx lr - thumb_func_end ov13_02228A60 - - thumb_func_start ov13_02228A64 -ov13_02228A64: ; 0x02228A64 - str r1, [r0, #0] - bx lr - thumb_func_end ov13_02228A64 - - thumb_func_start ov13_02228A68 -ov13_02228A68: ; 0x02228A68 - push {r3, r4, lr} - sub sp, #4 - strb r1, [r0, #9] - ldrb r1, [r0, #8] - cmp r1, #1 - bne _02228A8C - ldrb r1, [r0, #9] - ldr r2, [r0, #4] - lsl r4, r1, #3 - add r3, r2, r4 - ldrb r1, [r3, #3] - str r1, [sp] - ldrb r1, [r2, r4] - ldrb r2, [r3, #2] - ldrb r3, [r3, #1] - ldr r0, [r0, #0] - bl ov16_0226DD7C -_02228A8C: - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov13_02228A68 - - thumb_func_start ov13_02228A90 -ov13_02228A90: ; 0x02228A90 - mov r1, #0 - strb r1, [r0, #9] - mov r1, #0xff - strb r1, [r0, #0xa] - bx lr - ; .align 2, 0 - thumb_func_end ov13_02228A90 - - thumb_func_start ov13_02228A9C -ov13_02228A9C: ; 0x02228A9C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - bl ov13_02228A90 - mov r0, #0 - str r5, [r4, #4] - mvn r0, r0 - str r0, [r4, #0xc] - ldrb r0, [r4, #8] - cmp r0, #1 - bne _02228AC6 - ldr r3, [r4, #4] - ldrb r0, [r3, #3] - str r0, [sp] - ldrb r1, [r3] - ldrb r2, [r3, #2] - ldrb r3, [r3, #1] - ldr r0, [r4, #0] - bl ov16_0226DD7C -_02228AC6: - pop {r3, r4, r5, pc} - thumb_func_end ov13_02228A9C - - thumb_func_start ov13_02228AC8 -ov13_02228AC8: ; 0x02228AC8 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov13_02228AC8 - - thumb_func_start ov13_02228ACC -ov13_02228ACC: ; 0x02228ACC - push {r3, r4, lr} - sub sp, #4 - ldrb r1, [r0, #8] - cmp r1, #1 - bne _02228ADC - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_02228ADC: - ldr r1, _02228B10 ; =0x021BF67C - ldr r2, [r1, #0x48] - mov r1, #0xf3 - tst r1, r2 - beq _02228B08 - mov r1, #1 - strb r1, [r0, #8] - ldrb r1, [r0, #9] - ldr r2, [r0, #4] - lsl r4, r1, #3 - add r3, r2, r4 - ldrb r1, [r3, #3] - str r1, [sp] - ldrb r1, [r2, r4] - ldrb r2, [r3, #2] - ldrb r3, [r3, #1] - ldr r0, [r0, #0] - bl ov16_0226DD7C - ldr r0, _02228B14 ; =0x000005DC - bl sub_02005748 -_02228B08: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_02228B10: .word 0x021BF67C -_02228B14: .word 0x000005DC - thumb_func_end ov13_02228ACC - - thumb_func_start ov13_02228B18 -ov13_02228B18: ; 0x02228B18 - cmp r1, #3 - bhi _02228B60 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02228B28: ; jump table - .short _02228B30 - _02228B28 - 2 ; case 0 - .short _02228B3C - _02228B28 - 2 ; case 1 - .short _02228B48 - _02228B28 - 2 ; case 2 - .short _02228B54 - _02228B28 - 2 ; case 3 -_02228B30: - ldrb r1, [r0, #5] - mov r0, #0x80 - tst r0, r1 - beq _02228B60 - mov r0, #1 - bx lr -_02228B3C: - ldrb r1, [r0, #4] - mov r0, #0x80 - tst r0, r1 - beq _02228B60 - mov r0, #1 - bx lr -_02228B48: - ldrb r1, [r0, #7] - mov r0, #0x80 - tst r0, r1 - beq _02228B60 - mov r0, #1 - bx lr -_02228B54: - ldrb r1, [r0, #6] - mov r0, #0x80 - tst r0, r1 - beq _02228B60 - mov r0, #1 - bx lr -_02228B60: - mov r0, #0 - bx lr - thumb_func_end ov13_02228B18 - - thumb_func_start ov13_02228B64 -ov13_02228B64: ; 0x02228B64 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - bl ov13_02228ACC - cmp r0, #0 - bne _02228B7A - mov r0, #0 - add sp, #0x14 - mvn r0, r0 - pop {r4, r5, r6, r7, pc} -_02228B7A: - ldr r0, _02228CF0 ; =0x021BF67C - mov r1, #0x40 - ldr r0, [r0, #0x48] - tst r1, r0 - beq _02228B9E - mov r1, #0 - str r1, [sp] - ldrb r0, [r5, #9] - add r2, r1, #0 - add r3, r1, #0 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r5, #4] - bl sub_0201E028 - add r4, r0, #0 - mov r6, #0 - b _02228C06 -_02228B9E: - mov r1, #0x80 - tst r1, r0 - beq _02228BC0 - mov r1, #0 - str r1, [sp] - ldrb r0, [r5, #9] - add r2, r1, #0 - add r3, r1, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_0201E028 - add r4, r0, #0 - mov r6, #1 - b _02228C06 -_02228BC0: - mov r1, #0x20 - tst r1, r0 - beq _02228BE2 - mov r1, #0 - str r1, [sp] - ldrb r0, [r5, #9] - add r2, r1, #0 - add r3, r1, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_0201E028 - add r4, r0, #0 - mov r6, #2 - b _02228C06 -_02228BE2: - mov r1, #0x10 - tst r0, r1 - beq _02228C04 - mov r1, #0 - str r1, [sp] - ldrb r0, [r5, #9] - add r2, r1, #0 - add r3, r1, #0 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_0201E028 - add r4, r0, #0 - mov r6, #3 - b _02228C06 -_02228C04: - mov r4, #0xff -_02228C06: - cmp r4, #0xff - beq _02228CC6 - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #0x80 - add r1, r4, #0 - tst r1, r0 - beq _02228C26 - ldrb r1, [r5, #0xa] - cmp r1, #0xff - beq _02228C20 - add r4, r1, #0 - b _02228C26 -_02228C20: - eor r0, r4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_02228C26: - mov r7, #0 -_02228C28: - mov r0, #1 - ldr r1, [r5, #0xc] - lsl r0, r4 - tst r0, r1 - bne _02228C60 - str r7, [sp, #0xc] - str r7, [sp] - str r4, [sp, #4] - str r6, [sp, #8] - ldr r0, [r5, #4] - add r1, r7, #0 - add r2, r7, #0 - add r3, r7, #0 - bl sub_0201E028 - mov r1, #0x7f - and r0, r1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, r4 - beq _02228C58 - ldrb r0, [r5, #9] - cmp r1, r0 - bne _02228C5C -_02228C58: - ldrb r4, [r5, #9] - b _02228C60 -_02228C5C: - add r4, r1, #0 - b _02228C28 -_02228C60: - ldrb r0, [r5, #9] - cmp r0, r4 - beq _02228CBE - ldr r0, [r5, #4] - lsl r7, r4, #3 - add r1, sp, #0x10 - add r2, sp, #0x10 - add r0, r0, r7 - add r1, #3 - add r2, #2 - bl sub_0201E010 - ldr r0, [r5, #4] - add r1, sp, #0x10 - add r0, r0, r7 - add r1, #1 - add r2, sp, #0x10 - bl sub_0201E01C - ldr r0, [r5, #4] - add r1, r6, #0 - add r0, r0, r7 - bl ov13_02228B18 - cmp r0, #1 - bne _02228CA0 - ldr r0, [sp, #0xc] - cmp r0, #0 - beq _02228CA0 - ldrb r0, [r5, #9] - strb r0, [r5, #0xa] - b _02228CA4 -_02228CA0: - mov r0, #0xff - strb r0, [r5, #0xa] -_02228CA4: - strb r4, [r5, #9] - add r3, sp, #0x10 - ldrb r0, [r3] - str r0, [sp] - ldrb r1, [r3, #3] - ldrb r2, [r3, #1] - ldrb r3, [r3, #2] - ldr r0, [r5, #0] - bl ov16_0226DD7C - ldr r0, _02228CF4 ; =0x000005DC - bl sub_02005748 -_02228CBE: - mov r0, #0 - add sp, #0x14 - mvn r0, r0 - pop {r4, r5, r6, r7, pc} -_02228CC6: - ldr r0, _02228CF0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _02228CD6 - add sp, #0x14 - ldrb r0, [r5, #9] - pop {r4, r5, r6, r7, pc} -_02228CD6: - mov r0, #2 - tst r1, r0 - beq _02228CEA - ldr r0, _02228CF8 ; =0x000005DD - bl sub_02005748 - mov r0, #1 - add sp, #0x14 - mvn r0, r0 - pop {r4, r5, r6, r7, pc} -_02228CEA: - sub r0, r0, #3 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02228CF0: .word 0x021BF67C -_02228CF4: .word 0x000005DC -_02228CF8: .word 0x000005DD - thumb_func_end ov13_02228B64 - ; 0x02228CFC - - - .rodata - .incbin "incbin/overlay13_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay16.s b/asm/overlay16.s deleted file mode 100644 index 5e1ba7b04..000000000 --- a/asm/overlay16.s +++ /dev/null @@ -1,105437 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov16_0223B140 -ov16_0223B140: ; 0x0223B140 - push {r4, r5, r6, lr} - sub sp, #0x28 - add r4, r1, #0 - add r6, r0, #0 - bl sub_02006840 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0xf - bls _0223B156 - b _0223B370 -_0223B156: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223B162: ; jump table - .short _0223B182 - _0223B162 - 2 ; case 0 - .short _0223B1AE - _0223B162 - 2 ; case 1 - .short _0223B1E8 - _0223B162 - 2 ; case 2 - .short _0223B1FE - _0223B162 - 2 ; case 3 - .short _0223B214 - _0223B162 - 2 ; case 4 - .short _0223B224 - _0223B162 - 2 ; case 5 - .short _0223B23A - _0223B162 - 2 ; case 6 - .short _0223B256 - _0223B162 - 2 ; case 7 - .short _0223B268 - _0223B162 - 2 ; case 8 - .short _0223B284 - _0223B162 - 2 ; case 9 - .short _0223B29A - _0223B162 - 2 ; case 10 - .short _0223B2B6 - _0223B162 - 2 ; case 11 - .short _0223B2D2 - _0223B162 - 2 ; case 12 - .short _0223B2D8 - _0223B162 - 2 ; case 13 - .short _0223B348 - _0223B162 - 2 ; case 14 - .short _0223B36A - _0223B162 - 2 ; case 15 -_0223B182: - mov r2, #0xb - mov r0, #3 - mov r1, #5 - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, [r5, #0] - mov r0, #4 - tst r0, r1 - beq _0223B1A8 - mov r0, #0x63 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0x10 - tst r0, r1 - bne _0223B1A8 - mov r0, #1 - str r0, [r4, #0] - b _0223B370 -_0223B1A8: - mov r0, #3 - str r0, [r4, #0] - b _0223B370 -_0223B1AE: - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223D10C - mov r0, #0x4b - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02038F8C - bl sub_020389B8 - cmp r0, #0 - bne _0223B1D6 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x14 - bl sub_0202CF28 - b _0223B1E2 -_0223B1D6: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x19 - bl sub_0202CF28 -_0223B1E2: - mov r0, #2 - str r0, [r4, #0] - b _0223B370 -_0223B1E8: - add r0, r6, #0 - bl ov16_0223D354 - cmp r0, #1 - bne _0223B260 - add r0, r6, #0 - bl ov16_0223D7B4 - mov r0, #3 - str r0, [r4, #0] - b _0223B370 -_0223B1FE: - add r0, r6, #0 - bl ov16_0223D800 - cmp r0, #1 - bne _0223B20E - mov r0, #4 - str r0, [r4, #0] - b _0223B370 -_0223B20E: - mov r0, #5 - str r0, [r4, #0] - b _0223B370 -_0223B214: - add r0, r6, #0 - bl ov16_0223D944 - cmp r0, #1 - bne _0223B260 - mov r0, #5 - str r0, [r4, #0] - b _0223B370 -_0223B224: - add r0, r6, #0 - bl ov16_0223D98C - cmp r0, #1 - bne _0223B234 - mov r0, #6 - str r0, [r4, #0] - b _0223B370 -_0223B234: - mov r0, #8 - str r0, [r4, #0] - b _0223B370 -_0223B23A: - add r0, r6, #0 - bl ov16_0223DAD4 - cmp r0, #1 - bne _0223B260 - ldr r0, _0223B378 ; =0x0000000A - bl sub_02006514 - mov r0, #7 - str r0, [r4, #0] - mov r0, #0x3d - bl sub_020364F0 - b _0223B370 -_0223B256: - mov r0, #0x3d - bl sub_02036540 - cmp r0, #0 - bne _0223B262 -_0223B260: - b _0223B370 -_0223B262: - mov r0, #8 - str r0, [r4, #0] - b _0223B370 -_0223B268: - ldr r0, _0223B37C ; =0x0000000B - mov r1, #2 - bl sub_02006590 - ldr r0, _0223B380 ; =0x0000000C - mov r1, #2 - bl sub_02006590 - add r0, r6, #0 - bl ov16_0223B790 - mov r0, #9 - str r0, [r4, #0] - b _0223B370 -_0223B284: - add r0, r6, #0 - bl ov16_0223BBD0 - cmp r0, #1 - bne _0223B370 - add r0, r6, #0 - bl ov16_0223BCB4 - mov r0, #0xa - str r0, [r4, #0] - b _0223B370 -_0223B29A: - add r0, r6, #0 - bl ov16_0223DB1C - cmp r0, #1 - bne _0223B2AA - mov r0, #0xb - str r0, [r4, #0] - b _0223B370 -_0223B2AA: - mov r0, #5 - bl sub_0201807C - mov r0, #0xd - str r0, [r4, #0] - b _0223B370 -_0223B2B6: - add r0, r6, #0 - bl ov16_0223DD10 - cmp r0, #1 - bne _0223B370 - ldr r0, _0223B378 ; =0x0000000A - bl sub_02006514 - mov r0, #5 - bl sub_0201807C - mov r0, #0xc - str r0, [r4, #0] - b _0223B370 -_0223B2D2: - mov r0, #0xf - str r0, [r4, #0] - b _0223B370 -_0223B2D8: - add r1, sp, #0x24 - add r2, sp, #0x20 - bl ov16_0223ECC4 - add r6, r0, #0 - beq _0223B342 - mov r0, #3 - mov r1, #0x49 - lsl r2, r0, #0x10 - bl sub_02017FC8 - ldr r0, [r5, #4] - ldr r1, [sp, #0x24] - bl sub_0207A0FC - add r1, r0, #0 - mov r0, #0x5a - lsl r0, r0, #2 - ldr r2, [r5, r0] - mov r3, #0x49 - str r2, [sp] - add r2, r0, #0 - sub r2, #0x58 - ldr r2, [r5, r2] - str r2, [sp, #4] - add r2, r0, #0 - sub r2, #0x60 - ldr r2, [r5, r2] - str r2, [sp, #8] - add r2, r0, #0 - sub r2, #0x24 - ldr r2, [r5, r2] - sub r0, #0x40 - str r2, [sp, #0xc] - ldr r0, [r5, r0] - add r2, r6, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x20] - str r0, [sp, #0x14] - mov r0, #3 - str r0, [sp, #0x18] - str r3, [sp, #0x1c] - add r3, #0xe7 - ldr r0, [r5, #4] - ldr r3, [r5, r3] - bl sub_0207AE68 - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xe - str r0, [r4, #0] - b _0223B370 -_0223B342: - mov r0, #0xf - str r0, [r4, #0] - b _0223B370 -_0223B348: - mov r0, #0x66 - lsl r0, r0, #2 - ldr r5, [r5, r0] - add r0, r5, #0 - bl sub_0207B0D0 - cmp r0, #1 - bne _0223B370 - add r0, r5, #0 - bl sub_0207B0E0 - mov r0, #0x49 - bl sub_0201807C - mov r0, #0xd - str r0, [r4, #0] - b _0223B370 -_0223B36A: - add sp, #0x28 - mov r0, #1 - pop {r4, r5, r6, pc} -_0223B370: - mov r0, #0 - add sp, #0x28 - pop {r4, r5, r6, pc} - nop -_0223B378: .word 0x0000000A -_0223B37C: .word 0x0000000B -_0223B380: .word 0x0000000C - thumb_func_end ov16_0223B140 - - thumb_func_start ov16_0223B384 -ov16_0223B384: ; 0x0223B384 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov16_02268A14 - ldr r0, [r4, #4] - bl ov16_022687A0 - ldr r1, _0223B3D0 ; =0x000023FF - mov r0, #4 - ldrb r2, [r4, r1] - orr r0, r2 - strb r0, [r4, r1] - mov r0, #2 - bl sub_02002C60 - add r0, r4, #0 - mov r1, #3 - bl ov16_0223F314 - ldr r0, _0223B3D4 ; =0x00002445 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0223B3C0 - ldr r0, _0223B3D8 ; =0x0000000C - bl sub_02006514 - b _0223B3C6 -_0223B3C0: - ldr r0, _0223B3DC ; =0x0000000E - bl sub_02006514 -_0223B3C6: - ldr r0, _0223B3E0 ; =0x0000000D - mov r1, #2 - bl sub_02006590 - pop {r4, pc} - ; .align 2, 0 -_0223B3D0: .word 0x000023FF -_0223B3D4: .word 0x00002445 -_0223B3D8: .word 0x0000000C -_0223B3DC: .word 0x0000000E -_0223B3E0: .word 0x0000000D - thumb_func_end ov16_0223B384 - - thumb_func_start ov16_0223B3E4 -ov16_0223B3E4: ; 0x0223B3E4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov16_02268A14 - ldr r0, [r4, #8] - bl sub_0201A8FC - ldr r0, [r4, #4] - bl ov16_0223C288 - add r0, r4, #0 - bl ov16_0223C2BC - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x90 - add r1, #0x94 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200D0B0 - add r4, #0x90 - ldr r0, [r4, #0] - bl sub_0200C8D4 - bl sub_0201DC3C - mov r0, #2 - bl sub_02002C60 - pop {r4, pc} - thumb_func_end ov16_0223B3E4 - - thumb_func_start ov16_0223B430 -ov16_0223B430: ; 0x0223B430 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _0223B528 ; =0x0000000D - bl sub_02006514 - ldr r0, _0223B52C ; =0x00002445 - ldrb r0, [r5, r0] - cmp r0, #0 - bne _0223B44E - ldr r0, _0223B530 ; =0x0000000C - mov r1, #2 - bl sub_02006590 - b _0223B456 -_0223B44E: - ldr r0, _0223B534 ; =0x0000000E - mov r1, #2 - bl sub_02006590 -_0223B456: - add r0, r5, #0 - mov r1, #0 - bl ov16_0223F314 - bl sub_02024208 - add r4, r0, #0 - bl sub_02024200 - add r1, r0, #0 - mov r0, #0 - add r2, r4, #0 - bl sub_020C4AF0 - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_0223F6E4 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_0223E1B4 - add r3, r0, #0 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - add r1, r4, #0 - str r0, [sp] - add r0, r6, #0 - add r2, r5, #0 - bl ov16_022687C8 - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #2 - mov r1, #5 - bl sub_02002BB8 - ldr r1, _0223B538 ; =0x000023FF - mov r0, #2 - ldrb r2, [r5, r1] - orr r0, r2 - strb r0, [r5, r1] - ldr r0, [r5, #4] - bl ov16_02268744 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov16_02268A88 - mov r0, #1 - str r0, [sp] - mov r3, #0 - mov r2, #0x67 - str r3, [sp, #4] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r6, #0 - add r1, r4, #0 - bl ov16_02268C04 - mov r1, #0x67 - lsl r1, r1, #2 - ldr r1, [r5, r1] - add r0, r4, #0 - bl ov16_02268D40 - add r0, r6, #0 - bl sub_02006CA8 - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #1 - bl sub_020027A8 - add r0, r5, #0 - bl ov16_0223DD4C - add r5, #0x90 - ldr r0, [r5, #0] - bl sub_0200C738 - mov r2, #0x11 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223B528: .word 0x0000000D -_0223B52C: .word 0x00002445 -_0223B530: .word 0x0000000C -_0223B534: .word 0x0000000E -_0223B538: .word 0x000023FF - thumb_func_end ov16_0223B430 - - thumb_func_start ov16_0223B53C -ov16_0223B53C: ; 0x0223B53C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0201A8FC - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #3 - bl sub_02019044 - add r0, r4, #0 - bl ov16_0223F3EC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0223B53C - - thumb_func_start ov16_0223B578 -ov16_0223B578: ; 0x0223B578 - push {r4, r5, r6, lr} - sub sp, #0x68 - ldr r1, _0223B72C ; =0x000023FF - add r5, r0, #0 - ldrb r2, [r5, r1] - mov r0, #1 - ldr r4, _0223B730 ; =0x0226E3A4 - bic r2, r0 - mov r0, #1 - orr r0, r2 - strb r0, [r5, r1] - add r3, sp, #0x14 - mov r2, #0xa -_0223B592: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223B592 - ldr r0, [r4, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r5, #4] - add r2, sp, #0x14 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02019EBC - ldr r0, [r5, #4] - mov r1, #2 - add r2, sp, #0x30 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #4] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #4] - mov r1, #3 - add r2, sp, #0x4c - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #4] - mov r1, #3 - bl sub_02019EBC - ldr r1, _0223B734 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r2, r0 - strh r2, [r1] - add r1, r0, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl ov16_0223EDE0 - add r4, r0, #0 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r1, #1 - ldr r0, [r5, #4] - add r2, r1, #0 - mov r3, #0xa - bl sub_0200E218 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - ldr r1, _0223B738 ; =0x00002404 - ldr r2, [r5, #4] - ldr r1, [r5, r1] - mov r0, #7 - add r1, r1, #3 - mov r3, #3 - bl sub_02006E3C - add r0, r5, #0 - bl ov16_0223EC04 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r3, _0223B738 ; =0x00002404 - ldr r0, [r5, #0x28] - ldr r6, [r5, r3] - mov r1, #7 - lsl r3, r6, #1 - add r3, r6, r3 - add r3, #0xac - add r2, r3, r2 - mov r3, #5 - bl sub_02003050 - add r0, r4, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xa0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - mov r1, #0x26 - mov r3, #5 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xb0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - mov r1, #0xe - mov r2, #7 - mov r3, #5 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #7 - mov r1, #2 - mov r3, #3 - bl sub_02006E60 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _0223B73C ; =0xFFFF1FFF - ldr r3, _0223B740 ; =0x04001000 - and r2, r1 - str r2, [r0, #0] - ldr r2, [r3, #0] - and r1, r2 - add r2, r0, #0 - str r1, [r3, #0] - add r2, #0x48 - ldrh r3, [r2] - mov r1, #0x3f - add r0, #0x4a - bic r3, r1 - strh r3, [r2] - ldrh r2, [r0] - bic r2, r1 - strh r2, [r0] - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r0, _0223B744 ; =ov16_0223CE68 - add r1, r5, #0 - bl sub_02017798 - ldr r0, _0223B72C ; =0x000023FF - mov r3, #2 - ldrb r1, [r5, r0] - mov r2, #1 - orr r1, r3 - strb r1, [r5, r0] - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r5, #4] - ldr r1, [r5, #8] - bl sub_0201A7E8 - ldr r0, [r5, #8] - mov r1, #0xff - bl sub_0201ADA4 - ldr r0, [r5, #8] - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - add r0, r5, #0 - bl ov16_0223DD4C - add sp, #0x68 - pop {r4, r5, r6, pc} - nop -_0223B72C: .word 0x000023FF -_0223B730: .word 0x0226E3A4 -_0223B734: .word 0x04000008 -_0223B738: .word 0x00002404 -_0223B73C: .word 0xFFFF1FFF -_0223B740: .word 0x04001000 -_0223B744: .word ov16_0223CE68 - thumb_func_end ov16_0223B578 - - thumb_func_start ov16_0223B748 -ov16_0223B748: ; 0x0223B748 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223B784 ; =0x00002445 - add r4, r1, #0 - ldrb r0, [r5, r0] - cmp r0, r4 - bne _0223B75A - bl sub_02022974 -_0223B75A: - ldr r0, _0223B784 ; =0x00002445 - cmp r4, #0 - strb r4, [r5, r0] - bne _0223B772 - ldr r0, _0223B788 ; =0x0000000E - bl sub_02006514 - ldr r0, _0223B78C ; =0x0000000C - mov r1, #2 - bl sub_02006590 - pop {r3, r4, r5, pc} -_0223B772: - ldr r0, _0223B78C ; =0x0000000C - bl sub_02006514 - ldr r0, _0223B788 ; =0x0000000E - mov r1, #2 - bl sub_02006590 - pop {r3, r4, r5, pc} - nop -_0223B784: .word 0x00002445 -_0223B788: .word 0x0000000E -_0223B78C: .word 0x0000000C - thumb_func_end ov16_0223B748 - - thumb_func_start ov16_0223B790 -ov16_0223B790: ; 0x0223B790 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - add r7, r0, #0 - bl sub_020241F8 - add r5, r0, #0 - bl sub_020241F0 - add r1, r0, #0 - mov r0, #0 - add r2, r5, #0 - bl sub_020C4AF0 - bl sub_02024208 - add r5, r0, #0 - bl sub_02024200 - add r1, r0, #0 - mov r0, #0 - add r2, r5, #0 - bl sub_020C4AF0 - bl ov16_0223CD7C - str r0, [r4, #0] - bl sub_020177A4 - mov r0, #2 - mov r1, #5 - bl sub_02002BB8 - mov r0, #0xe - mov r1, #2 - mov r2, #0xf - mov r3, #5 - bl sub_0200C440 - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r2, [r4, r1] - add r0, r1, #4 - str r2, [r4, r0] - mov r0, #5 - bl sub_02002F38 - str r0, [r4, #0x28] - mov r1, #1 - bl sub_02003858 - mov r2, #2 - ldr r0, [r4, #0x28] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #5 - bl sub_02002F70 - mov r1, #1 - ldr r0, [r4, #0x28] - lsl r2, r1, #9 - mov r3, #5 - bl sub_02002F70 - mov r2, #7 - ldr r0, [r4, #0x28] - mov r1, #2 - lsl r2, r2, #6 - mov r3, #5 - bl sub_02002F70 - mov r2, #2 - ldr r0, [r4, #0x28] - mov r1, #3 - lsl r2, r2, #8 - mov r3, #5 - bl sub_02002F70 - mov r0, #5 - bl sub_02018340 - str r0, [r4, #4] - mov r0, #5 - mov r1, #3 - bl sub_0201A778 - str r0, [r4, #8] - mov r6, #0 - add r5, r4, #0 -_0223B850: - mov r1, #0x32 - mov r0, #5 - lsl r1, r1, #6 - bl sub_02018144 - mov r1, #0x1d - lsl r1, r1, #4 - str r0, [r5, r1] - add r6, r6, #1 - add r5, #0x10 - cmp r6, #4 - blt _0223B850 - mov r0, #0x40 - mov r1, #5 - bl sub_0201DBEC - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_0223F6E4 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_0223E1B4 - add r3, r0, #0 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r4, r0] - add r1, r6, #0 - str r0, [sp] - add r0, r5, #0 - add r2, r4, #0 - bl ov16_022687C8 - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r5, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - ldr r1, [r4, #4] - add r0, r4, #0 - bl ov16_0223C004 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r4, #4] - ldr r1, [r4, #8] - mov r2, #1 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, [r4, #8] - mov r1, #0xff - bl sub_0201ADA4 - ldr r0, [r4, #8] - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r0, #5 - bl sub_0200C6E4 - add r1, r4, #0 - add r1, #0x90 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - ldr r1, _0223BB90 ; =0x0226E2E4 - ldr r2, _0223BB94 ; =0x0226E29C - mov r3, #0x20 - bl sub_0200C73C - ldr r1, _0223BB98 ; =0x00100010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl sub_0200C704 - add r1, r4, #0 - add r1, #0x94 - str r0, [r1, #0] - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x90 - add r1, #0x94 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x80 - bl sub_0200C7C0 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x90 - add r1, #0x94 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, _0223BB9C ; =0x0226E2B0 - bl sub_0200CB30 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl sub_0200C738 - mov r2, #0x11 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov16_02268A88 - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r3, #0 - mov r2, #0x67 - str r3, [sp, #4] - lsl r2, r2, #2 - ldr r2, [r4, r2] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02268C04 - mov r1, #0x67 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov16_02268D40 - add r0, r6, #0 - bl sub_02006CA8 - add r0, r5, #0 - bl sub_02006CA8 - mov r0, #5 - bl sub_0200762C - add r1, r4, #0 - add r1, #0x88 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0 - mov r2, #0xc0 - bl sub_02008A84 - add r0, r4, #0 - bl ov16_0223F36C - bl ov16_0223CE28 - mov r0, #5 - bl ov12_0221FCDC - add r1, r4, #0 - add r1, #0x8c - str r0, [r1, #0] - add r0, r4, #0 - bl ov16_0223C210 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r2, #0x17 - mov r0, #1 - mov r1, #0x1a - lsl r2, r2, #4 - mov r3, #5 - bl sub_0200B144 - str r0, [r4, #0xc] - mov r0, #1 - mov r1, #0x1a - mov r2, #0 - mov r3, #5 - bl sub_0200B144 - str r0, [r4, #0x10] - mov r0, #5 - bl sub_0200B358 - str r0, [r4, #0x14] - mov r0, #5 - lsl r0, r0, #6 - mov r1, #5 - bl sub_02023790 - str r0, [r4, #0x18] - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_02003164 - ldr r1, _0223BBA0 ; =0x00002228 - mov r2, #0xe0 - add r1, r4, r1 - bl sub_020C4B18 - ldr r0, [r4, #0x28] - mov r1, #2 - bl sub_02003164 - ldr r1, _0223BBA4 ; =0x00002308 - mov r2, #0xe0 - add r1, r4, r1 - bl sub_020C4B18 - add r0, r4, #0 - bl ov16_0223EC04 - mov r1, #0 - lsl r6, r0, #2 - str r1, [sp] - mov r0, #0x70 - str r0, [sp, #4] - ldr r3, _0223BBA8 ; =0x00002404 - mov r5, #0xc - ldr r3, [r4, r3] - ldr r0, [r4, #0x28] - mul r5, r3 - ldr r3, _0223BBAC ; =0x0226E44C - mov r2, #2 - add r3, r3, r5 - ldr r3, [r6, r3] - lsl r3, r3, #0x10 - lsr r3, r3, #0x10 - bl sub_020038B0 - mov r0, #0xc0 - str r0, [sp] - add r0, #0x40 - str r0, [sp, #4] - ldr r3, _0223BBA8 ; =0x00002404 - mov r5, #0xc - ldr r3, [r4, r3] - ldr r0, [r4, #0x28] - mul r5, r3 - ldr r3, _0223BBAC ; =0x0226E44C - mov r1, #0 - add r3, r3, r5 - ldr r3, [r6, r3] - mov r2, #2 - lsl r3, r3, #0x10 - lsr r3, r3, #0x10 - bl sub_020038B0 - mov r0, #0 - str r0, [sp] - mov r0, #0xdf - str r0, [sp, #4] - ldr r3, _0223BBA8 ; =0x00002404 - mov r5, #0xc - ldr r3, [r4, r3] - mov r1, #2 - mul r5, r3 - ldr r3, _0223BBAC ; =0x0226E44C - ldr r0, [r4, #0x28] - add r3, r3, r5 - ldr r3, [r6, r3] - add r2, r1, #0 - lsl r3, r3, #0x10 - lsr r3, r3, #0x10 - bl sub_020038B0 - mov r1, #0 - mov r0, #0xa0 - str r0, [sp] - mov r0, #0xc0 - str r0, [sp, #4] - ldr r0, [r4, #0x28] - add r2, r1, #0 - add r3, r1, #0 - bl sub_020038B0 - mov r2, #0 - str r2, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [r4, #0x28] - mov r1, #1 - add r3, r2, #0 - bl sub_020038B0 - mov r2, #0 - str r2, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [r4, #0x28] - ldr r3, _0223BBB0 ; =0x0000FFFF - mov r1, #3 - bl sub_020038B0 - ldr r0, [r4, #0x28] - mov r1, #0 - mov r2, #0xb - mov r3, #5 - bl sub_0201567C - mov r1, #0x1b - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02015738 - ldr r0, _0223BBB4 ; =ov16_0223CF48 - ldr r2, _0223BBB8 ; =0x0000EA60 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x1c] - ldr r0, _0223BBBC ; =ov16_0223CF8C - ldr r2, _0223BBC0 ; =0x0000C350 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x20] - mov r2, #0x4b - ldr r0, _0223BBC4 ; =ov16_0223D0C4 - add r1, r4, #0 - lsl r2, r2, #4 - bl sub_0200DA04 - str r0, [r4, #0x24] - mov r1, #0x32 - ldr r0, _0223BBC8 ; =0x00002438 - mvn r1, r1 - str r1, [r4, r0] - add r0, r4, #0 - bl ov16_0223DD4C - add r0, r4, #0 - bl ov16_0223E1B0 - bl sub_0207D9F8 - mov r0, #5 - mov r1, #4 - mov r2, #0 - bl sub_02015F84 - mov r1, #0x72 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #4 - mov r1, #5 - bl sub_0201DCC8 - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, _0223BBCC ; =0x0000240C - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - beq _0223BB8A - mov r0, #0x6f - mov r1, #0x92 - mov r5, #0 - lsl r0, r0, #2 - lsl r1, r1, #6 -_0223BB7C: - add r2, r7, r5 - ldrb r3, [r2, r0] - add r2, r4, r5 - add r5, r5, #1 - strb r3, [r2, r1] - cmp r5, #4 - blt _0223BB7C -_0223BB8A: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223BB90: .word 0x0226E2E4 -_0223BB94: .word 0x0226E29C -_0223BB98: .word 0x00100010 -_0223BB9C: .word 0x0226E2B0 -_0223BBA0: .word 0x00002228 -_0223BBA4: .word 0x00002308 -_0223BBA8: .word 0x00002404 -_0223BBAC: .word 0x0226E44C -_0223BBB0: .word 0x0000FFFF -_0223BBB4: .word ov16_0223CF48 -_0223BBB8: .word 0x0000EA60 -_0223BBBC: .word ov16_0223CF8C -_0223BBC0: .word 0x0000C350 -_0223BBC4: .word ov16_0223D0C4 -_0223BBC8: .word 0x00002438 -_0223BBCC: .word 0x0000240C - thumb_func_end ov16_0223B790 - - thumb_func_start ov16_0223BBD0 -ov16_0223BBD0: ; 0x0223BBD0 - push {r3, r4, r5, r6, r7, lr} - bl sub_0200682C - add r4, r0, #0 - ldr r2, [r4, #0x2c] - mov r1, #4 - tst r1, r2 - beq _0223BC16 - ldr r1, _0223BCA8 ; =0x0000240C - mov r2, #0x10 - ldr r3, [r4, r1] - tst r2, r3 - bne _0223BC16 - sub r1, #0x10 - ldrb r1, [r4, r1] - cmp r1, #0 - beq _0223BBF8 - ldr r1, [r4, #0x30] - bl ov16_0224B990 -_0223BBF8: - ldr r0, [r4, #0x44] - mov r6, #0 - cmp r0, #0 - ble _0223BCA2 - add r5, r4, #0 -_0223BC02: - ldr r1, [r5, #0x34] - add r0, r4, #0 - bl ov16_0225C0DC - ldr r0, [r4, #0x44] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0223BC02 - b _0223BCA2 -_0223BC16: - ldr r0, _0223BCAC ; =0x000023FC - ldrb r0, [r4, r0] - cmp r0, #0 - beq _0223BC32 - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0224B990 - ldr r1, _0223BCB0 ; =0x000023FE - strb r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02264988 -_0223BC32: - ldr r0, [r4, #0x44] - mov r6, #0 - cmp r0, #0 - ble _0223BC58 - add r5, r4, #0 - add r7, r6, #0 -_0223BC3E: - ldr r1, [r5, #0x34] - add r0, r4, #0 - bl ov16_0225C0DC - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02264988 - ldr r0, [r4, #0x44] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0223BC3E -_0223BC58: - ldr r0, _0223BCB0 ; =0x000023FE - ldrb r1, [r4, r0] - cmp r1, #0 - bne _0223BCA2 - sub r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _0223BC7C - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0224B990 - ldr r1, _0223BCB0 ; =0x000023FE - strb r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02264988 -_0223BC7C: - ldr r0, [r4, #0x44] - mov r6, #0 - cmp r0, #0 - ble _0223BCA2 - add r5, r4, #0 - add r7, r6, #0 -_0223BC88: - ldr r1, [r5, #0x34] - add r0, r4, #0 - bl ov16_0225C0DC - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02264988 - ldr r0, [r4, #0x44] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0223BC88 -_0223BCA2: - ldr r0, _0223BCB0 ; =0x000023FE - ldrb r0, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BCA8: .word 0x0000240C -_0223BCAC: .word 0x000023FC -_0223BCB0: .word 0x000023FE - thumb_func_end ov16_0223BBD0 - - thumb_func_start ov16_0223BCB4 -ov16_0223BCB4: ; 0x0223BCB4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - ldr r3, _0223BFD4 ; =0x0000244C - mov r2, #0x67 - ldr r1, [r4, r3] - add r7, r0, #0 - lsl r2, r2, #2 - str r1, [r7, r2] - add r1, r3, #0 - sub r1, #0x40 - ldr r1, [r4, r1] - sub r2, #0x10 - str r1, [r7, r2] - sub r3, #0x40 - ldr r2, [r4, r3] - mov r1, #0x10 - tst r1, r2 - bne _0223BCE8 - bl sub_0202F8AC -_0223BCE8: - ldr r0, _0223BFD8 ; =0x00002445 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _0223BCF8 - add r0, r4, #0 - mov r1, #0 - bl ov16_0223B748 -_0223BCF8: - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - add r0, r4, #0 - bl ov16_0223EE70 - ldr r0, _0223BFDC ; =0x00002420 - ldrb r0, [r4, r0] - cmp r0, #4 - beq _0223BD26 - ldr r0, [r4, #0x6c] - mov r1, #0 - bl sub_0207A0FC - add r1, r0, #0 - add r0, r4, #0 - bl ov16_0223EF68 -_0223BD26: - mov r0, #0 - str r0, [sp] - add r6, r7, #0 - add r5, r4, #0 -_0223BD2E: - ldr r0, [r5, #0x68] - ldr r1, [r6, #4] - bl sub_0207A21C - ldr r0, [r5, #0x68] - bl sub_020181C4 - add r1, r6, #0 - add r1, #0xf8 - ldr r0, [r5, #0x48] - ldr r1, [r1, #0] - bl sub_02025E80 - ldr r0, [r5, #0x48] - bl sub_020181C4 - ldr r0, [sp] - add r6, r6, #4 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp] - cmp r0, #4 - blt _0223BD2E - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02015760 - mov r1, #0x42 - lsl r1, r1, #2 - ldr r0, [r4, #0x58] - ldr r1, [r7, r1] - bl sub_0207D3EC - ldr r0, [r4, #0x58] - bl sub_020181C4 - mov r1, #0x11 - lsl r1, r1, #4 - ldr r0, [r4, #0x60] - ldr r1, [r7, r1] - bl sub_02026338 - ldr r0, [r4, #0x60] - bl sub_020181C4 - mov r0, #0x45 - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - str r1, [r7, r0] - add r1, r0, #0 - ldr r2, [r4, #0x5c] - sub r1, #8 - str r2, [r7, r1] - add r1, r0, #0 - add r1, #0xac - ldr r2, [r4, r1] - add r1, r0, #0 - add r1, #0xa4 - str r2, [r7, r1] - add r1, r4, #0 - add r1, #0x98 - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0x14 - str r2, [r7, r1] - add r1, r4, #0 - add r1, #0x9c - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0x20 - str r2, [r7, r1] - add r1, r0, #0 - ldr r2, _0223BFE0 ; =0x00002414 - add r1, #0x7c - ldr r3, [r4, r2] - add r0, #0x5c - str r3, [r7, r1] - add r1, r2, #0 - add r1, #0xc - ldrb r3, [r4, r1] - mov r1, #0x3f - add r2, #0x28 - and r1, r3 - str r1, [r7, #0x14] - ldr r1, [r4, r2] - mov r2, #4 - str r1, [r7, r0] - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r3, #0 - bl ov16_0225B45C - mov r1, #0x5e - lsl r1, r1, #2 - str r0, [r7, r1] - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #3 - mov r3, #0 - bl ov16_0225B45C - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r7, r1] - mov r3, #0 - add r0, r2, r0 - str r0, [r7, r1] - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #6 - bl ov16_0225B45C - add r5, r0, #0 - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #6 - mov r3, #2 - bl ov16_0225B45C - mov r1, #0x4f - lsl r1, r1, #2 - ldr r2, [r7, r1] - add r0, r5, r0 - add r0, r2, r0 - str r0, [r7, r1] - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #7 - mov r3, #0 - bl ov16_0225B45C - add r5, r0, #0 - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #7 - mov r3, #2 - bl ov16_0225B45C - mov r1, #5 - lsl r1, r1, #6 - ldr r2, [r7, r1] - add r0, r5, r0 - add r0, r2, r0 - str r0, [r7, r1] - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #3 - mov r3, #0 - bl ov16_0225B45C - mov r1, #0x6d - lsl r1, r1, #2 - str r0, [r7, r1] - ldr r0, _0223BFE4 ; =0x00002478 - add r1, #0x10 - ldr r0, [r4, r0] - mov r6, #0 - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - str r0, [r7, r1] - mov r7, #0x1d - add r5, r4, #0 - lsl r7, r7, #4 -_0223BE76: - ldr r0, [r5, r7] - bl sub_020181C4 - add r6, r6, #1 - add r5, #0x10 - cmp r6, #4 - blt _0223BE76 - ldr r0, [r4, #0x18] - bl sub_020181C4 - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_02002FA0 - ldr r0, [r4, #0x28] - mov r1, #1 - bl sub_02002FA0 - ldr r0, [r4, #0x28] - mov r1, #2 - bl sub_02002FA0 - ldr r0, [r4, #0x28] - mov r1, #3 - bl sub_02002FA0 - ldr r0, [r4, #0x28] - bl sub_02002F54 - ldr r0, [r4, #0xc] - bl sub_0200B190 - ldr r0, [r4, #0x10] - bl sub_0200B190 - ldr r0, [r4, #0x14] - bl sub_0200B3F0 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02015FB8 - bl sub_020141E4 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl ov12_0221FDF4 - ldr r0, [r4, #0x30] - bl ov16_0224B9DC - ldr r0, [r4, #0x44] - mov r6, #0 - cmp r0, #0 - ble _0223BF00 - ldr r7, _0223BFE8 ; =0x000023FD - add r5, r4, #0 -_0223BEEC: - ldrb r2, [r4, r7] - ldr r1, [r5, #0x34] - add r0, r4, #0 - bl ov16_0225C104 - ldr r0, [r4, #0x44] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r0 - blt _0223BEEC -_0223BF00: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_02007B6C - ldr r0, _0223BFE8 ; =0x000023FD - ldrb r0, [r4, r0] - cmp r0, #2 - beq _0223BF18 - add r0, r4, #0 - bl ov16_0223B3E4 -_0223BF18: - mov r0, #0 - bl sub_02002AC8 - mov r0, #0 - bl sub_02002AE4 - mov r0, #0 - bl sub_02002B20 - ldr r0, [r4, #8] - mov r1, #3 - bl sub_0201A928 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200C560 - mov r0, #2 - bl sub_02002C60 - ldr r0, [r4, #0x1c] - bl sub_0200DA58 - ldr r0, [r4, #0x20] - bl sub_0200DA58 - bl sub_0201E530 - ldr r0, [r4, #0] - bl ov16_0223CE20 - ldr r0, _0223BFEC ; =0x00002434 - ldr r0, [r4, r0] - bl sub_0201D2DC - add r0, r4, #0 - bl ov16_0223F450 - cmp r0, #0 - beq _0223BF8C - ldr r0, _0223BFF0 ; =0x00000704 - mov r1, #0 - bl sub_020057A4 -_0223BF8C: - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201DCF0 - add r0, r4, #0 - bl ov16_0223F710 - cmp r0, #0 - beq _0223BFA6 - mov r0, #0x7f - bl sub_0200500C -_0223BFA6: - ldr r0, _0223BFF4 ; =0x0000247C - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223BFB2 - bl ov16_0226E174 -_0223BFB2: - add r0, r4, #0 - bl sub_020181C4 - ldr r0, _0223BFF8 ; =0x0000000B - bl sub_02006514 - ldr r0, _0223BFFC ; =0x0000000C - bl sub_02006514 - bl sub_020389B8 - cmp r0, #0 - bne _0223BFD2 - ldr r0, _0223C000 ; =0x00000015 - bl sub_02006514 -_0223BFD2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BFD4: .word 0x0000244C -_0223BFD8: .word 0x00002445 -_0223BFDC: .word 0x00002420 -_0223BFE0: .word 0x00002414 -_0223BFE4: .word 0x00002478 -_0223BFE8: .word 0x000023FD -_0223BFEC: .word 0x00002434 -_0223BFF0: .word 0x00000704 -_0223BFF4: .word 0x0000247C -_0223BFF8: .word 0x0000000B -_0223BFFC: .word 0x0000000C -_0223C000: .word 0x00000015 - thumb_func_end ov16_0223BCB4 - - thumb_func_start ov16_0223C004 -ov16_0223C004: ; 0x0223C004 - push {r4, r5, r6, r7, lr} - sub sp, #0x9c - add r5, r0, #0 - add r4, r1, #0 - bl sub_0201FF00 - mov r0, #0 - bl sub_0200F338 - mov r0, #1 - bl sub_0200F338 - ldr r6, _0223C1EC ; =0x0226E32C - add r3, sp, #0x20 - mov r2, #5 -_0223C022: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223C022 - add r0, sp, #0x20 - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - ldr r6, _0223C1F0 ; =0x0226E26C - add r3, sp, #0x10 - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r1, _0223C1F4 ; =0x000023FF - mov r0, #1 - ldrb r2, [r5, r1] - ldr r6, _0223C1F8 ; =0x0226E3F8 - add r3, sp, #0x48 - bic r2, r0 - mov r0, #1 - orr r0, r2 - strb r0, [r5, r1] - mov r2, #0xa -_0223C090: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223C090 - ldr r0, [r6, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - add r2, sp, #0x48 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #2 - add r2, sp, #0x64 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #3 - add r2, sp, #0x80 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - ldr r1, _0223C1FC ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r2, r0 - strh r2, [r1] - add r1, r0, #0 - bl sub_0201FF0C - add r0, r4, #0 - bl ov16_02268744 - add r0, r5, #0 - bl ov16_0223EDE0 - add r7, r0, #0 - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #5 - mov r1, #1 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0xa - bl sub_0200E218 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - ldr r1, _0223C200 ; =0x00002404 - mov r0, #7 - ldr r1, [r5, r1] - add r2, r4, #0 - add r1, r1, #3 - mov r3, #3 - bl sub_02006E3C - add r0, r5, #0 - bl ov16_0223EC04 - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r2, _0223C200 ; =0x00002404 - ldr r0, [r5, #0x28] - ldr r3, [r5, r2] - mov r1, #7 - lsl r2, r3, #1 - add r2, r3, r2 - add r2, #0xac - add r2, r2, r6 - mov r3, #5 - bl sub_02003050 - add r0, r7, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xa0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - mov r1, #0x26 - mov r3, #5 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xb0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - mov r1, #0xe - mov r2, #7 - mov r3, #5 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #7 - mov r1, #2 - add r2, r4, #0 - mov r3, #3 - bl sub_02006E60 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _0223C204 ; =0xFFFF1FFF - ldr r3, _0223C208 ; =0x04001000 - and r2, r1 - str r2, [r0, #0] - ldr r2, [r3, #0] - and r1, r2 - add r2, r0, #0 - str r1, [r3, #0] - add r2, #0x48 - ldrh r3, [r2] - mov r1, #0x3f - add r0, #0x4a - bic r3, r1 - strh r3, [r2] - ldrh r2, [r0] - bic r2, r1 - strh r2, [r0] - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r0, _0223C20C ; =ov16_0223CE68 - add r1, r5, #0 - bl sub_02017798 - add sp, #0x9c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223C1EC: .word 0x0226E32C -_0223C1F0: .word 0x0226E26C -_0223C1F4: .word 0x000023FF -_0223C1F8: .word 0x0226E3F8 -_0223C1FC: .word 0x04000008 -_0223C200: .word 0x00002404 -_0223C204: .word 0xFFFF1FFF -_0223C208: .word 0x04001000 -_0223C20C: .word ov16_0223CE68 - thumb_func_end ov16_0223C004 - - thumb_func_start ov16_0223C210 -ov16_0223C210: ; 0x0223C210 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov16_0223E22C - add r4, r0, #0 - mov r0, #0x5f - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0 - add r3, r4, #0 - bl ov16_022686CC - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #1 - add r3, r4, #0 - bl ov16_022686CC - add r0, r5, #0 - bl ov16_0223DF10 - str r0, [sp] - ldr r0, [r5, #0x44] - mov r4, #0 - cmp r0, #0 - ble _0223C282 - add r6, r5, #0 -_0223C24C: - ldr r1, [sp] - add r0, r5, #0 - mov r2, #2 - add r3, r4, #0 - bl ov16_0225B45C - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0223DFAC - mov r1, #0x9b - mov r2, #0 - bl sub_02074470 - add r2, r0, #0 - ldr r1, [r6, #0x34] - add r0, r5, #0 - add r3, r7, #0 - bl ov16_0225C038 - ldr r0, [r5, #0x44] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, r0 - blt _0223C24C -_0223C282: - bl ov16_0223DECC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0223C210 - - thumb_func_start ov16_0223C288 -ov16_0223C288: ; 0x0223C288 - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #3 - bl sub_02019044 - add r0, r4, #0 - bl ov16_022687A0 - pop {r4, pc} - thumb_func_end ov16_0223C288 - - thumb_func_start ov16_0223C2BC -ov16_0223C2BC: ; 0x0223C2BC - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223C2BC - - thumb_func_start ov16_0223C2C0 -ov16_0223C2C0: ; 0x0223C2C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - add r4, r0, #0 - ldr r0, [r1, #0] - str r1, [sp, #4] - str r0, [r4, #0x2c] - mov r7, #0 - add r6, r4, #0 - add r5, r1, #0 -_0223C2D2: - mov r0, #5 - bl sub_02025E6C - add r1, r0, #0 - add r0, r5, #0 - str r1, [r6, #0x48] - add r0, #0xf8 - ldr r0, [r0, #0] - bl sub_02025E80 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r7, r7, #1 - str r0, [r6, #0x78] - add r6, r6, #4 - add r5, r5, #4 - cmp r7, #4 - blt _0223C2D2 - mov r1, #0x1b - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldrh r1, [r0, r1] - ldr r0, _0223C62C ; =0x00002446 - ldr r3, [sp, #4] - strh r1, [r4, r0] - mov r0, #0x1a - ldr r1, _0223C630 ; =0x00002468 - mov r6, #0 - add r5, r4, #0 - lsl r0, r0, #4 -_0223C310: - ldr r2, [r3, r0] - add r6, r6, #1 - str r2, [r5, r1] - add r3, r3, #4 - add r5, r5, #4 - cmp r6, #4 - blt _0223C310 - bl sub_0201D2D0 - ldr r1, _0223C634 ; =0x00002434 - ldr r2, [sp, #4] - str r0, [r4, r1] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r3, [r2, r0] - add r2, r1, #0 - add r2, #0x14 - str r3, [r4, r2] - ldr r2, [sp, #4] - ldr r3, [r2, r0] - add r2, r1, #0 - add r2, #0x18 - str r3, [r4, r2] - ldr r2, [sp, #4] - sub r0, #0x10 - ldr r0, [r2, r0] - sub r1, #0x28 - str r0, [r4, r1] - mov r0, #5 - bl sub_0207D3C0 - str r0, [r4, #0x58] - mov r1, #0x42 - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - ldr r1, [r4, #0x58] - bl sub_0207D3EC - mov r0, #5 - bl sub_02026324 - str r0, [r4, #0x60] - mov r1, #0x11 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - ldr r1, [r4, #0x60] - bl sub_02026338 - mov r1, #0x45 - lsl r1, r1, #2 - ldr r0, [sp, #4] - add r2, r1, #0 - ldr r0, [r0, r1] - add r3, r1, #0 - str r0, [r4, #0x64] - ldr r0, [sp, #4] - add r2, #0x1c - ldr r2, [r0, r2] - add r0, r1, #0 - add r0, #0xa0 - str r2, [r4, r0] - add r2, r1, #0 - ldr r0, [sp, #4] - add r2, #0x38 - ldr r2, [r0, r2] - add r0, r1, #0 - add r0, #0xa4 - str r2, [r4, r0] - add r2, r1, #0 - ldr r0, [sp, #4] - sub r2, #8 - ldr r0, [r0, r2] - add r2, r1, #0 - str r0, [r4, #0x5c] - ldr r0, [sp, #4] - add r2, #0xa4 - ldr r2, [r0, r2] - add r0, r1, #0 - add r0, #0xac - str r2, [r4, r0] - add r2, r1, #0 - ldr r0, [sp, #4] - add r2, #0x14 - ldr r2, [r0, r2] - add r0, r4, #0 - add r0, #0x98 - str r2, [r0, #0] - add r2, r1, #0 - ldr r0, [sp, #4] - add r2, #0x50 - ldr r2, [r0, r2] - ldr r0, _0223C638 ; =0x00002424 - add r3, #0x20 - str r2, [r4, r0] - ldr r2, [sp, #4] - ldr r3, [r2, r3] - add r2, r4, #0 - add r2, #0x9c - str r3, [r2, #0] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x7c - ldr r3, [r2, r3] - add r2, r0, #0 - sub r2, #0x10 - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x40 - ldr r3, [r2, r3] - add r2, r0, #0 - sub r2, #0x24 - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x3c - ldr r3, [r2, r3] - add r2, r0, #0 - sub r2, #0x20 - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x44 - ldr r3, [r2, r3] - add r2, r0, #0 - sub r2, #0x1c - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x4c - ldr r3, [r2, r3] - add r2, r0, #0 - sub r2, #0x14 - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x80 - ldr r3, [r2, r3] - add r2, r0, #0 - sub r2, #8 - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x54 - ldr r3, [r2, r3] - add r2, r0, #4 - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x58 - ldr r3, [r2, r3] - add r2, r0, #0 - add r2, #0xc - str r3, [r4, r2] - add r3, r1, #0 - ldr r2, [sp, #4] - add r3, #0x60 - ldr r2, [r2, r3] - add r0, #8 - str r2, [r4, r0] - ldr r0, [sp, #4] - add r1, #0x30 - ldr r0, [r0, r1] - mov r1, #0x87 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp, #4] - sub r1, #0xd8 - ldr r0, [r0, r1] - cmp r0, #0 - bne _0223C46E - bl sub_02022974 -_0223C46E: - ldr r5, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r4, [sp, #0x34] - add r6, r5, #0 - add r7, r4, #0 -_0223C47A: - ldr r0, [sp, #0x34] - ldr r1, [r5, #0x18] - add r0, #0xa0 - strh r1, [r0] - add r3, r6, #0 - add r2, r7, #0 - mov r0, #6 - add r3, #0x28 - add r2, #0xac - mov ip, r0 -_0223C48E: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, ip - sub r0, r0, #1 - mov ip, r0 - bne _0223C48E - ldr r0, [r3, #0] - add r5, r5, #4 - str r0, [r2, #0] - ldr r0, [sp, #0x34] - add r6, #0x34 - add r0, r0, #2 - str r0, [sp, #0x34] - ldr r0, [sp, #8] - add r7, #0x34 - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #4 - blt _0223C47A - add r0, r4, #0 - bl ov16_0224B940 - str r0, [r4, #0x30] - mov r6, #0 - add r5, r4, #0 - mov r7, #5 -_0223C4C2: - add r0, r7, #0 - bl sub_02079FF4 - str r0, [r5, #0x68] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0223C4C2 - mov r0, #0 - ldr r6, [sp, #4] - str r0, [sp, #0xc] -_0223C4D8: - ldr r0, [r6, #4] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223C50A -_0223C4E4: - ldr r0, [r6, #4] - add r1, r5, #0 - bl sub_0207A0FC - add r7, r0, #0 - bl sub_02075D6C - str r0, [sp, #0x44] - add r0, r7, #0 - mov r1, #0x6f - add r2, sp, #0x44 - bl sub_02074B30 - ldr r0, [r6, #4] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223C4E4 -_0223C50A: - ldr r0, [sp, #0xc] - add r6, r6, #4 - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #4 - blt _0223C4D8 - ldr r0, [r4, #0x2c] - mov r1, #4 - tst r1, r0 - bne _0223C520 - b _0223C8CC -_0223C520: - add r0, r4, #0 - bl sub_0207A6DC - add r0, r4, #0 - bl ov16_0223F6E4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x38] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_0223DD90 - ldr r1, [r4, #0x2c] - mov r0, #0x80 - tst r0, r1 - beq _0223C606 - ldr r6, _0223C63C ; =0x0226E560 - mov r5, #0 - add r7, r4, #0 -_0223C548: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - str r0, [r7, #0x34] - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #4 - blt _0223C548 - str r5, [r4, #0x44] - mov r6, #0 - add r5, r4, #0 -_0223C56A: - ldr r1, [r5, #0x34] - add r0, r4, #0 - bl ov16_02263730 - ldr r0, [sp, #4] - ldr r1, [r5, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [sp, #4] - add r6, r6, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223C56A - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0x44] - cmp r0, #0 - ble _0223C5FC - add r7, r4, #0 -_0223C596: - ldr r0, [r7, #0x68] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223C5E0 -_0223C5A2: - ldr r0, [r7, #0x68] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C5D4 - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C5D4 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C5E0 -_0223C5D4: - ldr r0, [r7, #0x68] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223C5A2 -_0223C5E0: - str r5, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x10] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #0x10] - ldr r1, [r4, #0x44] - add r0, r0, #1 - add r7, r7, #4 - str r0, [sp, #0x10] - cmp r0, r1 - blt _0223C596 -_0223C5FC: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - b _0223C8C2 -_0223C606: - mov r0, #8 - tst r0, r1 - beq _0223C702 - mov r5, #0 - add r6, r4, #0 -_0223C610: - add r0, sp, #0x40 - strb r5, [r0] - ldr r1, [sp, #0x38] - add r0, r4, #0 - bl ov16_0223F6F0 - lsl r1, r5, #0x10 - add r7, r0, #0 - add r0, r4, #0 - lsr r1, r1, #0x10 - bl ov16_0223F6F0 - ldr r1, _0223C640 ; =0x0226E28C - b _0223C644 - ; .align 2, 0 -_0223C62C: .word 0x00002446 -_0223C630: .word 0x00002468 -_0223C634: .word 0x00002434 -_0223C638: .word 0x00002424 -_0223C63C: .word 0x0226E560 -_0223C640: .word 0x0226E28C -_0223C644: - lsl r2, r7, #2 - add r1, r1, r2 - ldrb r1, [r0, r1] - add r0, sp, #0x40 - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - str r0, [r6, #0x34] - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #4 - blt _0223C610 - str r5, [r4, #0x44] - mov r6, #0 - add r5, r4, #0 -_0223C666: - ldr r1, [r5, #0x34] - add r0, r4, #0 - bl ov16_02263730 - ldr r0, [sp, #4] - ldr r1, [r5, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [sp, #4] - add r6, r6, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223C666 - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r4, #0x44] - cmp r0, #0 - ble _0223C6F8 - add r7, r4, #0 -_0223C692: - ldr r0, [r7, #0x68] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223C6DC -_0223C69E: - ldr r0, [r7, #0x68] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C6D0 - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C6D0 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C6DC -_0223C6D0: - ldr r0, [r7, #0x68] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223C69E -_0223C6DC: - str r5, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x14] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #0x14] - ldr r1, [r4, #0x44] - add r0, r0, #1 - add r7, r7, #4 - str r0, [sp, #0x14] - cmp r0, r1 - blt _0223C692 -_0223C6F8: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - b _0223C8C2 -_0223C702: - mov r0, #2 - tst r0, r1 - bne _0223C70A - b _0223C816 -_0223C70A: - ldr r0, [sp, #0x38] - ldr r1, _0223C9DC ; =0x0226E264 - lsl r0, r0, #2 - mov r5, #0 - add r6, r1, r0 - add r7, r4, #0 -_0223C716: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - add r1, r0, #0 - add r0, r4, #0 - str r1, [r7, #0x34] - bl ov16_02263730 - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #4 - blt _0223C716 - str r5, [r4, #0x44] - mov r6, #0 - add r5, r4, #0 -_0223C740: - ldr r0, [sp, #4] - ldr r1, [r5, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [sp, #4] - add r6, r6, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223C740 - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #0x44] - cmp r0, #0 - ble _0223C814 -_0223C762: - ldr r0, [sp, #0x18] - mov r1, #1 - and r0, r1 - str r0, [sp, #0x30] - lsl r0, r0, #2 - add r7, r4, r0 - ldr r0, [r7, #0x68] - mov r6, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223C7FA -_0223C77A: - ldr r0, [r7, #0x68] - add r1, r6, #0 - bl sub_0207A0FC - ldr r1, [sp, #0x18] - add r5, r0, #0 - cmp r1, #1 - ble _0223C7C6 - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x30] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B45C - cmp r6, r0 - beq _0223C7EE - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C7EE - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C7EE - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C7FA - b _0223C7EE -_0223C7C6: - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C7EE - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C7EE - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C7FA -_0223C7EE: - ldr r0, [r7, #0x68] - add r6, r6, #1 - bl sub_0207A0F8 - cmp r6, r0 - blt _0223C77A -_0223C7FA: - str r6, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x18] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #0x18] - ldr r1, [r4, #0x44] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, r1 - blt _0223C762 -_0223C814: - b _0223C8C2 -_0223C816: - ldr r0, [sp, #0x38] - ldr r1, _0223C9E0 ; =0x0226E260 - lsl r0, r0, #1 - mov r5, #0 - add r6, r1, r0 - add r7, r4, #0 -_0223C822: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - add r1, r0, #0 - add r0, r4, #0 - str r1, [r7, #0x34] - bl ov16_02263730 - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #2 - blt _0223C822 - mov r0, #0 - str r5, [r4, #0x44] - str r0, [sp, #0x1c] - add r7, r4, #0 -_0223C84E: - ldr r0, [sp, #4] - ldr r1, [r7, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [r7, #0x68] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223C8A2 -_0223C864: - ldr r0, [r7, #0x68] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C896 - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C896 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C8A2 -_0223C896: - ldr r0, [r7, #0x68] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223C864 -_0223C8A2: - str r5, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x1c] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #4] - add r7, r7, #4 - add r0, r0, #4 - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #4 - blt _0223C84E -_0223C8C2: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - b _0223CC84 -_0223C8CC: - mov r1, #0x10 - tst r1, r0 - beq _0223C9D2 - ldr r6, _0223C9E4 ; =0x0226E560 - mov r5, #0 - add r7, r4, #0 -_0223C8D8: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - add r1, r0, #0 - add r0, r4, #0 - str r1, [r7, #0x34] - bl ov16_02263730 - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #4 - blt _0223C8D8 - str r5, [r4, #0x44] - mov r6, #0 - add r5, r4, #0 -_0223C902: - ldr r0, [sp, #4] - ldr r1, [r5, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [sp, #4] - add r6, r6, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223C902 - ldr r0, [r4, #0x44] - mov r7, #0 - cmp r0, #0 - ble _0223C9C2 -_0223C922: - add r0, r4, #0 - add r1, r7, #0 - mov r5, #0 - bl ov16_0223DF60 - cmp r0, #0 - ble _0223C9A6 -_0223C930: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov16_0223DFAC - add r6, r0, #0 - cmp r7, #2 - bne _0223C970 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C998 - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C998 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C998 - ldr r0, [sp, #0x3c] - cmp r0, r5 - bne _0223C9A6 - b _0223C998 -_0223C970: - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223C998 - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C998 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223C9A6 -_0223C998: - add r0, r4, #0 - add r1, r7, #0 - add r5, r5, #1 - bl ov16_0223DF60 - cmp r5, r0 - blt _0223C930 -_0223C9A6: - str r5, [sp] - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #2 - add r3, r7, #0 - bl ov16_0225B540 - cmp r7, #0 - bne _0223C9BA - str r5, [sp, #0x3c] -_0223C9BA: - ldr r0, [r4, #0x44] - add r7, r7, #1 - cmp r7, r0 - blt _0223C922 -_0223C9C2: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - ldr r0, _0223C9E8 ; =0x000023FC - mov r1, #1 - strb r1, [r4, r0] - b _0223CC84 -_0223C9D2: - mov r1, #8 - tst r1, r0 - beq _0223CAB4 - ldr r6, _0223C9E4 ; =0x0226E560 - b _0223C9EC - ; .align 2, 0 -_0223C9DC: .word 0x0226E264 -_0223C9E0: .word 0x0226E260 -_0223C9E4: .word 0x0226E560 -_0223C9E8: .word 0x000023FC -_0223C9EC: - mov r5, #0 - add r7, r4, #0 -_0223C9F0: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - add r1, r0, #0 - add r0, r4, #0 - str r1, [r7, #0x34] - bl ov16_02263730 - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #4 - blt _0223C9F0 - str r5, [r4, #0x44] - mov r6, #0 - add r5, r4, #0 -_0223CA1A: - ldr r0, [sp, #4] - ldr r1, [r5, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [sp, #4] - add r6, r6, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223CA1A - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [r4, #0x44] - cmp r0, #0 - ble _0223CAA4 - add r7, r4, #0 -_0223CA3E: - ldr r0, [r7, #0x68] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223CA88 -_0223CA4A: - ldr r0, [r7, #0x68] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223CA7C - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CA7C - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CA88 -_0223CA7C: - ldr r0, [r7, #0x68] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223CA4A -_0223CA88: - str r5, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x20] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #0x20] - ldr r1, [r4, #0x44] - add r0, r0, #1 - add r7, r7, #4 - str r0, [sp, #0x20] - cmp r0, r1 - blt _0223CA3E -_0223CAA4: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - ldr r0, _0223CD28 ; =0x000023FC - mov r1, #1 - strb r1, [r4, r0] - b _0223CC84 -_0223CAB4: - mov r1, #2 - tst r0, r1 - bne _0223CABC - b _0223CBD0 -_0223CABC: - ldr r6, _0223CD2C ; =0x0226E560 - mov r5, #0 - add r7, r4, #0 -_0223CAC2: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - add r1, r0, #0 - add r0, r4, #0 - str r1, [r7, #0x34] - bl ov16_02263730 - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #4 - blt _0223CAC2 - str r5, [r4, #0x44] - mov r6, #0 - add r5, r4, #0 -_0223CAEC: - ldr r0, [sp, #4] - ldr r1, [r5, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [sp, #4] - add r6, r6, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223CAEC - mov r0, #0 - str r0, [sp, #0x24] - ldr r0, [r4, #0x44] - cmp r0, #0 - ble _0223CBC0 -_0223CB0E: - ldr r0, [sp, #0x24] - mov r1, #1 - and r0, r1 - str r0, [sp, #0x2c] - lsl r0, r0, #2 - add r7, r4, r0 - ldr r0, [r7, #0x68] - mov r6, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223CBA6 -_0223CB26: - ldr r0, [r7, #0x68] - add r1, r6, #0 - bl sub_0207A0FC - ldr r1, [sp, #0x24] - add r5, r0, #0 - cmp r1, #1 - ble _0223CB72 - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x2c] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B45C - cmp r6, r0 - beq _0223CB9A - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223CB9A - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CB9A - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CBA6 - b _0223CB9A -_0223CB72: - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223CB9A - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CB9A - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CBA6 -_0223CB9A: - ldr r0, [r7, #0x68] - add r6, r6, #1 - bl sub_0207A0F8 - cmp r6, r0 - blt _0223CB26 -_0223CBA6: - str r6, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x24] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #0x24] - ldr r1, [r4, #0x44] - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, r1 - blt _0223CB0E -_0223CBC0: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - ldr r0, _0223CD28 ; =0x000023FC - mov r1, #1 - strb r1, [r4, r0] - b _0223CC84 -_0223CBD0: - ldr r6, _0223CD30 ; =0x0226E25C - mov r5, #0 - add r7, r4, #0 -_0223CBD6: - add r0, sp, #0x40 - strb r5, [r0] - ldrb r1, [r6] - strb r1, [r0, #1] - add r0, r4, #0 - add r1, sp, #0x40 - bl ov16_0225BFFC - add r1, r0, #0 - add r0, r4, #0 - str r1, [r7, #0x34] - bl ov16_02263730 - add r5, r5, #1 - add r6, r6, #1 - add r7, r7, #4 - cmp r5, #2 - blt _0223CBD6 - mov r0, #0 - str r5, [r4, #0x44] - str r0, [sp, #0x28] - add r7, r4, #0 -_0223CC02: - ldr r0, [sp, #4] - ldr r1, [r7, #0x68] - ldr r0, [r0, #4] - bl sub_0207A21C - ldr r0, [r7, #0x68] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223CC56 -_0223CC18: - ldr r0, [r7, #0x68] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0223CC4A - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CC4A - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223CC56 -_0223CC4A: - ldr r0, [r7, #0x68] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223CC18 -_0223CC56: - str r5, [sp] - ldr r1, [r4, #0x30] - ldr r3, [sp, #0x28] - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B540 - ldr r0, [sp, #4] - add r7, r7, #4 - add r0, r0, #4 - str r0, [sp, #4] - ldr r0, [sp, #0x28] - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, #4 - blt _0223CC02 - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_0225A1B0 - ldr r0, _0223CD28 ; =0x000023FC - mov r1, #1 - strb r1, [r4, r0] -_0223CC84: - mov r0, #2 - ldr r1, [r4, #0x2c] - lsl r0, r0, #8 - tst r0, r1 - beq _0223CCA0 - ldr r0, [r4, #0x6c] - mov r1, #0 - bl sub_0207A0FC - add r2, r4, #0 - mov r1, #0x90 - add r2, #0xf4 - bl sub_02074470 -_0223CCA0: - ldr r1, [r4, #0x2c] - mov r0, #1 - tst r0, r1 - beq _0223CD22 - add r0, r4, #0 - add r0, #0xe1 - ldrb r0, [r0] - bl ov16_0223CD3C - cmp r0, #1 - beq _0223CCC2 - ldr r0, _0223CD34 ; =0x00000149 - ldrb r0, [r4, r0] - bl ov16_0223CD3C - cmp r0, #1 - bne _0223CD22 -_0223CCC2: - ldr r0, [r4, #0x68] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223CCF2 - ldr r6, _0223CD38 ; =0x00002408 - mov r7, #3 -_0223CCD2: - ldr r0, [r4, #0x68] - add r1, r5, #0 - bl sub_0207A0FC - ldr r2, [r4, r6] - add r1, r7, #0 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - bl sub_02075C74 - ldr r0, [r4, #0x68] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223CCD2 -_0223CCF2: - ldr r0, [r4, #0x70] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0223CD22 - ldr r6, _0223CD38 ; =0x00002408 - mov r7, #3 -_0223CD02: - ldr r0, [r4, #0x70] - add r1, r5, #0 - bl sub_0207A0FC - ldr r2, [r4, r6] - add r1, r7, #0 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - bl sub_02075C74 - ldr r0, [r4, #0x70] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0223CD02 -_0223CD22: - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CD28: .word 0x000023FC -_0223CD2C: .word 0x0226E560 -_0223CD30: .word 0x0226E25C -_0223CD34: .word 0x00000149 -_0223CD38: .word 0x00002408 - thumb_func_end ov16_0223C2C0 - - thumb_func_start ov16_0223CD3C -ov16_0223CD3C: ; 0x0223CD3C - sub r0, #0x3e - cmp r0, #0x11 - bhi _0223CD76 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223CD4E: ; jump table - .short _0223CD72 - _0223CD4E - 2 ; case 0 - .short _0223CD76 - _0223CD4E - 2 ; case 1 - .short _0223CD72 - _0223CD4E - 2 ; case 2 - .short _0223CD72 - _0223CD4E - 2 ; case 3 - .short _0223CD72 - _0223CD4E - 2 ; case 4 - .short _0223CD72 - _0223CD4E - 2 ; case 5 - .short _0223CD72 - _0223CD4E - 2 ; case 6 - .short _0223CD72 - _0223CD4E - 2 ; case 7 - .short _0223CD76 - _0223CD4E - 2 ; case 8 - .short _0223CD76 - _0223CD4E - 2 ; case 9 - .short _0223CD76 - _0223CD4E - 2 ; case 10 - .short _0223CD76 - _0223CD4E - 2 ; case 11 - .short _0223CD72 - _0223CD4E - 2 ; case 12 - .short _0223CD72 - _0223CD4E - 2 ; case 13 - .short _0223CD72 - _0223CD4E - 2 ; case 14 - .short _0223CD72 - _0223CD4E - 2 ; case 15 - .short _0223CD72 - _0223CD4E - 2 ; case 16 - .short _0223CD72 - _0223CD4E - 2 ; case 17 -_0223CD72: - mov r0, #1 - bx lr -_0223CD76: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223CD3C - - thumb_func_start ov16_0223CD7C -ov16_0223CD7C: ; 0x0223CD7C - push {r3, lr} - sub sp, #8 - mov r2, #2 - mov r1, #0 - ldr r0, _0223CD98 ; =ov16_0223CD9C - str r2, [sp] - str r0, [sp, #4] - mov r0, #5 - add r3, r1, #0 - bl sub_02024220 - add sp, #8 - pop {r3, pc} - nop -_0223CD98: .word ov16_0223CD9C - thumb_func_end ov16_0223CD7C - - thumb_func_start ov16_0223CD9C -ov16_0223CD9C: ; 0x0223CD9C - push {r3, lr} - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _0223CE08 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r2, [r0] - ldr r1, _0223CE0C ; =0xFFFFCFFD - and r2, r1 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0223CE10 ; =0x0000CFFB - and r3, r2 - strh r3, [r0] - ldrh r3, [r0] - sub r2, #0x1c - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r0, #0 - ldr r2, _0223CE14 ; =0x00007FFF - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _0223CE18 ; =0xBFFF0000 - ldr r0, _0223CE1C ; =0x04000580 - str r1, [r0, #0] - pop {r3, pc} - ; .align 2, 0 -_0223CE08: .word 0x04000008 -_0223CE0C: .word 0xFFFFCFFD -_0223CE10: .word 0x0000CFFB -_0223CE14: .word 0x00007FFF -_0223CE18: .word 0xBFFF0000 -_0223CE1C: .word 0x04000580 - thumb_func_end ov16_0223CD9C - - thumb_func_start ov16_0223CE20 -ov16_0223CE20: ; 0x0223CE20 - ldr r3, _0223CE24 ; =sub_020242C4 - bx r3 - ; .align 2, 0 -_0223CE24: .word sub_020242C4 - thumb_func_end ov16_0223CE20 - - thumb_func_start ov16_0223CE28 -ov16_0223CE28: ; 0x0223CE28 - push {r3, r4, r5, lr} - ldr r3, _0223CE60 ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _0223CE64 ; =0x02100DF4 - mov r1, #0 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0xc0 - add r2, r1, #0 - blx r3 - add r5, r0, #0 - cmp r4, #0 - bne _0223CE50 - bl sub_02022974 -_0223CE50: - cmp r5, #0 - bne _0223CE58 - bl sub_02022974 -_0223CE58: - bl sub_02014000 - pop {r3, r4, r5, pc} - nop -_0223CE60: .word 0x02100DEC -_0223CE64: .word 0x02100DF4 - thumb_func_end ov16_0223CE28 - - thumb_func_start ov16_0223CE68 -ov16_0223CE68: ; 0x0223CE68 - push {r3, r4, r5, lr} - sub sp, #0x50 - ldr r1, _0223CF00 ; =0x000023FF - add r4, r0, #0 - ldrb r2, [r4, r1] - lsl r0, r2, #0x1f - lsr r0, r0, #0x1f - beq _0223CE88 - mov r0, #1 - bic r2, r0 - strb r2, [r4, r1] - ldr r0, _0223CF04 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, _0223CF08 ; =0x04001050 - strh r1, [r0] -_0223CE88: - ldr r1, _0223CF00 ; =0x000023FF - ldrb r2, [r4, r1] - lsl r0, r2, #0x1e - lsr r0, r0, #0x1f - beq _0223CEAC - mov r0, #2 - bic r2, r0 - strb r2, [r4, r1] - ldr r5, _0223CF0C ; =0x0226E354 - add r3, sp, #0x28 - mov r2, #5 -_0223CE9E: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223CE9E - add r0, sp, #0x28 - bl sub_0201FE94 -_0223CEAC: - ldr r1, _0223CF00 ; =0x000023FF - ldrb r2, [r4, r1] - lsl r0, r2, #0x1d - lsr r0, r0, #0x1f - beq _0223CED0 - mov r0, #4 - bic r2, r0 - strb r2, [r4, r1] - ldr r5, _0223CF10 ; =0x0226E37C - add r3, sp, #0 - mov r2, #5 -_0223CEC2: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223CEC2 - add r0, sp, #0 - bl sub_0201FE94 -_0223CED0: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_02008A94 - bl sub_0201DCAC - bl sub_0200C800 - ldr r0, [r4, #0x28] - bl sub_02003694 - ldr r0, [r4, #4] - bl sub_0201C2B8 - ldr r3, _0223CF14 ; =0x027E0000 - ldr r1, _0223CF18 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - add sp, #0x50 - pop {r3, r4, r5, pc} - nop -_0223CF00: .word 0x000023FF -_0223CF04: .word 0x04000050 -_0223CF08: .word 0x04001050 -_0223CF0C: .word 0x0226E354 -_0223CF10: .word 0x0226E37C -_0223CF14: .word 0x027E0000 -_0223CF18: .word 0x00003FF8 - thumb_func_end ov16_0223CE68 - - thumb_func_start ov16_0223CF1C -ov16_0223CF1C: ; 0x0223CF1C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02003694 - bl sub_0201DCAC - ldr r0, [r4, #4] - bl sub_0201C2B8 - ldr r3, _0223CF40 ; =0x027E0000 - ldr r1, _0223CF44 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_0223CF40: .word 0x027E0000 -_0223CF44: .word 0x00003FF8 - thumb_func_end ov16_0223CF1C - - thumb_func_start ov16_0223CF48 -ov16_0223CF48: ; 0x0223CF48 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #4] - mov r0, #5 - bl sub_02038A1C - ldr r0, _0223CF88 ; =0x000023FD - ldrb r0, [r4, r0] - cmp r0, #0 - beq _0223CF60 - cmp r0, #3 - bne _0223CF86 -_0223CF60: - cmp r0, #0 - bne _0223CF68 - bl ov11_0221F8F0 -_0223CF68: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_02007768 - add r4, #0x94 - ldr r0, [r4, #0] - bl sub_0200C7EC - bl sub_0200C808 - mov r0, #1 - mov r1, #0 - bl sub_020241BC -_0223CF86: - pop {r4, pc} - ; .align 2, 0 -_0223CF88: .word 0x000023FD - thumb_func_end ov16_0223CF48 - - thumb_func_start ov16_0223CF8C -ov16_0223CF8C: ; 0x0223CF8C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov16_0223DF1C - str r0, [sp] - add r0, r5, #0 - mov r6, #0 - bl ov16_0223F450 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - beq _0223CFB2 - b _0223D0BC -_0223CFB2: - mov r0, #2 - tst r0, r4 - beq _0223CFD0 - mov r0, #1 - tst r0, r4 - beq _0223D0BC - ldr r0, _0223D0C0 ; =0x00000704 - add r1, r6, #0 - bl sub_020057A4 - add r0, r5, #0 - mov r1, #2 - bl ov16_0223F460 - pop {r3, r4, r5, r6, r7, pc} -_0223CFD0: - ldr r0, [sp] - add r4, r6, #0 - cmp r0, #0 - ble _0223D03E -_0223CFD8: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223DF14 - add r7, r0, #0 - bl ov16_02263AF0 - cmp r0, #0 - bne _0223CFF6 - add r0, r5, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0223D00E -_0223CFF6: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223E208 - cmp r0, #0 - bne _0223D036 - add r0, r5, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0223D036 -_0223D00E: - add r0, r7, #0 - bl ov16_02263B08 - add r1, r0, #0 - beq _0223D036 - ldr r0, [r1, #0x28] - ldr r1, [r1, #0x2c] - lsl r0, r0, #0x10 - lsl r1, r1, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - mov r2, #0x30 - bl sub_0208C104 - cmp r0, #1 - bne _0223D036 - add r0, r4, #0 - bl sub_020787CC - orr r6, r0 -_0223D036: - ldr r0, [sp] - add r4, r4, #1 - cmp r4, r0 - blt _0223CFD8 -_0223D03E: - cmp r6, #0 - beq _0223D064 - add r0, r5, #0 - bl ov16_0223F450 - cmp r0, #0 - bne _0223D064 - ldr r0, _0223D0C0 ; =0x00000704 - bl sub_02005748 - add r0, r5, #0 - mov r1, #1 - bl ov16_0223F460 - add r0, r5, #0 - mov r1, #4 - bl ov16_0223F48C - b _0223D082 -_0223D064: - cmp r6, #0 - bne _0223D082 - add r0, r5, #0 - bl ov16_0223F450 - cmp r0, #0 - beq _0223D082 - ldr r0, _0223D0C0 ; =0x00000704 - mov r1, #0 - bl sub_020057A4 - add r0, r5, #0 - mov r1, #0 - bl ov16_0223F460 -_0223D082: - add r0, r5, #0 - bl ov16_0223F450 - cmp r0, #0 - beq _0223D0BC - add r0, r5, #0 - bl ov16_0223F47C - add r4, r0, #0 - ldr r0, _0223D0C0 ; =0x00000704 - bl sub_020057D4 - cmp r0, #0 - bne _0223D0BC - sub r1, r4, #1 - bne _0223D0B2 - ldr r0, _0223D0C0 ; =0x00000704 - bl sub_02005748 - add r0, r5, #0 - mov r1, #4 - bl ov16_0223F48C - pop {r3, r4, r5, r6, r7, pc} -_0223D0B2: - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov16_0223F48C -_0223D0BC: - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D0C0: .word 0x00000704 - thumb_func_end ov16_0223CF8C - - thumb_func_start ov16_0223D0C4 -ov16_0223D0C4: ; 0x0223D0C4 - push {r3, r4, r5, lr} - ldr r3, _0223D0F0 ; =0x00002438 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, r3] - mov r1, #1 - add r0, r0, #3 - str r0, [r4, r3] - ldr r0, [r4, #4] - ldr r3, [r4, r3] - mov r2, #3 - bl sub_02019184 - ldr r0, _0223D0F0 ; =0x00002438 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223D0EC - add r0, r5, #0 - bl sub_0200DA58 -_0223D0EC: - pop {r3, r4, r5, pc} - nop -_0223D0F0: .word 0x00002438 - thumb_func_end ov16_0223D0C4 - - thumb_func_start ov16_0223D0F4 -ov16_0223D0F4: ; 0x0223D0F4 - push {r3, lr} - bl sub_020389B8 - cmp r0, #0 - bne _0223D106 - ldr r0, _0223D108 ; =0x00000015 - mov r1, #2 - bl sub_02006590 -_0223D106: - pop {r3, pc} - ; .align 2, 0 -_0223D108: .word 0x00000015 - thumb_func_end ov16_0223D0F4 - - thumb_func_start ov16_0223D10C -ov16_0223D10C: ; 0x0223D10C - push {r4, r5, r6, lr} - sub sp, #0x68 - add r4, r1, #0 - ldr r1, _0223D330 ; =0x00001028 - mov r2, #5 - bl sub_0200681C - add r5, r0, #0 - ldr r0, _0223D334 ; =0x00001020 - str r4, [r5, #0] - mov r2, #0 - strb r2, [r5, r0] - add r1, r0, #1 - strb r2, [r5, r1] - add r0, r0, #2 - strh r2, [r5, r0] - mov r0, #5 - bl sub_02002F38 - str r0, [r5, #0xc] - mov r1, #1 - bl sub_02003858 - mov r2, #2 - ldr r0, [r5, #0xc] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #5 - bl sub_02002F70 - mov r1, #0 - mov r0, #1 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - mov r2, #2 - add r3, r1, #0 - bl sub_020038B0 - mov r0, #5 - bl sub_02018340 - str r0, [r5, #4] - mov r0, #5 - mov r1, #1 - bl sub_0201A778 - str r0, [r5, #8] - add r0, r5, #0 - bl sub_0207A744 - bl sub_0201FF00 - ldr r6, _0223D338 ; =0x0226E304 - add r3, sp, #0x40 - mov r2, #5 -_0223D17E: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223D17E - add r0, sp, #0x40 - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #5 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #8 - bl sub_020C4AF0 - ldr r6, _0223D33C ; =0x0226E27C - add r3, sp, #0x30 - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r6, _0223D340 ; =0x0226E2C8 - add r3, sp, #0x14 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r5, #4] - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02019EBC - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02027B50 - add r4, r0, #0 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r1, #1 - ldr r0, [r5, #4] - add r2, r1, #0 - mov r3, #0xa - bl sub_0200E218 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xb0 - str r0, [sp, #8] - ldr r0, [r5, #0xc] - mov r1, #0xe - mov r2, #7 - mov r3, #5 - bl sub_02003050 - add r0, r4, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xa0 - str r0, [sp, #8] - ldr r0, [r5, #0xc] - mov r1, #0x26 - mov r3, #5 - bl sub_02003050 - mov r1, #0 - mov r0, #1 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - add r2, r1, #0 - add r3, r1, #0 - bl sub_020038B0 - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r5, #4] - ldr r1, [r5, #8] - mov r2, #1 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, [r5, #8] - mov r1, #0xff - bl sub_0201ADA4 - ldr r0, [r5, #8] - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r2, #0x17 - mov r0, #1 - mov r1, #0x1a - lsl r2, r2, #4 - mov r3, #5 - bl sub_0200B144 - add r4, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - mov r1, #5 - bl sub_02023790 - add r6, r0, #0 - ldr r1, _0223D344 ; =0x0000039B - add r0, r4, #0 - add r2, r6, #0 - bl sub_0200B1B8 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - ldr r0, [r5, #8] - mov r1, #1 - add r2, r6, #0 - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B190 - ldr r0, _0223D348 ; =ov16_0223CF1C - add r1, r5, #0 - bl sub_02017798 - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - str r3, [sp, #8] - ldr r0, [r5, #0xc] - ldr r2, _0223D34C ; =0x0000FFFF - mov r1, #5 - bl sub_02003178 - ldr r0, [r5, #8] - mov r1, #1 - bl sub_0200E7FC - ldr r1, _0223D350 ; =0x00001024 - str r0, [r5, r1] - bl ov16_0223DECC - add sp, #0x68 - pop {r4, r5, r6, pc} - nop -_0223D330: .word 0x00001028 -_0223D334: .word 0x00001020 -_0223D338: .word 0x0226E304 -_0223D33C: .word 0x0226E27C -_0223D340: .word 0x0226E2C8 -_0223D344: .word 0x0000039B -_0223D348: .word ov16_0223CF1C -_0223D34C: .word 0x0000FFFF -_0223D350: .word 0x00001024 - thumb_func_end ov16_0223D10C - - thumb_func_start ov16_0223D354 -ov16_0223D354: ; 0x0223D354 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - bl sub_0200682C - add r4, r0, #0 - ldr r1, [r4, #4] - mov r0, #5 - bl sub_02038A1C - ldr r0, _0223D658 ; =0x00001021 - mov r7, #0 - ldrb r1, [r4, r0] - cmp r1, #0x21 - bls _0223D372 - b _0223D798 -_0223D372: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223D37E: ; jump table - .short _0223D3C2 - _0223D37E - 2 ; case 0 - .short _0223D3D8 - _0223D37E - 2 ; case 1 - .short _0223D3EC - _0223D37E - 2 ; case 2 - .short _0223D3FC - _0223D37E - 2 ; case 3 - .short _0223D436 - _0223D37E - 2 ; case 4 - .short _0223D70E - _0223D37E - 2 ; case 5 - .short _0223D44E - _0223D37E - 2 ; case 6 - .short _0223D468 - _0223D37E - 2 ; case 7 - .short _0223D70E - _0223D37E - 2 ; case 8 - .short _0223D47C - _0223D37E - 2 ; case 9 - .short _0223D498 - _0223D37E - 2 ; case 10 - .short _0223D70E - _0223D37E - 2 ; case 11 - .short _0223D4AC - _0223D37E - 2 ; case 12 - .short _0223D4C6 - _0223D37E - 2 ; case 13 - .short _0223D70E - _0223D37E - 2 ; case 14 - .short _0223D4DA - _0223D37E - 2 ; case 15 - .short _0223D4F4 - _0223D37E - 2 ; case 16 - .short _0223D70E - _0223D37E - 2 ; case 17 - .short _0223D508 - _0223D37E - 2 ; case 18 - .short _0223D522 - _0223D37E - 2 ; case 19 - .short _0223D70E - _0223D37E - 2 ; case 20 - .short _0223D536 - _0223D37E - 2 ; case 21 - .short _0223D57A - _0223D37E - 2 ; case 22 - .short _0223D70E - _0223D37E - 2 ; case 23 - .short _0223D5B6 - _0223D37E - 2 ; case 24 - .short _0223D5EA - _0223D37E - 2 ; case 25 - .short _0223D70E - _0223D37E - 2 ; case 26 - .short _0223D624 - _0223D37E - 2 ; case 27 - .short _0223D664 - _0223D37E - 2 ; case 28 - .short _0223D70E - _0223D37E - 2 ; case 29 - .short _0223D6A0 - _0223D37E - 2 ; case 30 - .short _0223D6D4 - _0223D37E - 2 ; case 31 - .short _0223D70E - _0223D37E - 2 ; case 32 - .short _0223D77E - _0223D37E - 2 ; case 33 -_0223D3C2: - add r0, r7, #0 - bl sub_0200F338 - mov r0, #1 - bl sub_02036378 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D3D8: - ldr r0, [r4, #0xc] - bl sub_0200384C - cmp r0, #0 - bne _0223D486 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D3EC: - mov r0, #0x32 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D3FC: - mov r0, #0x32 - bl sub_02036540 - cmp r0, #0 - beq _0223D41E - mov r0, #0x33 - bl sub_020364F0 - ldr r0, _0223D65C ; =0x00001022 - add r1, r7, #0 - strh r1, [r4, r0] - sub r1, r0, #1 - ldrb r1, [r4, r1] - sub r0, r0, #1 - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D41E: - ldr r0, _0223D65C ; =0x00001022 - ldrh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - ldrh r1, [r4, r0] - ldr r0, _0223D660 ; =0x00000708 - cmp r1, r0 - bls _0223D486 - mov r0, #1 - bl sub_02038AE0 - b _0223D798 -_0223D436: - mov r1, #5 - add r0, r4, #0 - lsl r1, r1, #6 - bl sub_0207A8F4 - cmp r0, #1 - bne _0223D486 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D44E: - add r0, r4, #0 - bl sub_0207A960 - cmp r0, #1 - bne _0223D486 - mov r0, #0x34 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D468: - add r0, r4, #0 - bl sub_0207A988 - cmp r0, #1 - bne _0223D486 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D47C: - add r0, r4, #0 - bl sub_0207A9CC - cmp r0, #1 - beq _0223D488 -_0223D486: - b _0223D798 -_0223D488: - mov r0, #0x35 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D498: - add r0, r4, #0 - bl sub_0207A9F8 - cmp r0, #1 - bne _0223D592 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D4AC: - add r0, r4, #0 - bl sub_0207AA38 - cmp r0, #1 - bne _0223D592 - mov r0, #0x36 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D4C6: - add r0, r4, #0 - bl sub_0207AA5C - cmp r0, #1 - bne _0223D592 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D4DA: - add r0, r4, #0 - bl sub_0207AAA0 - cmp r0, #1 - bne _0223D592 - mov r0, #0x37 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D4F4: - add r0, r4, #0 - bl sub_0207AAC8 - cmp r0, #1 - bne _0223D592 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D508: - add r0, r4, #0 - bl sub_0207AAFC - cmp r0, #1 - bne _0223D592 - mov r0, #0x38 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D522: - add r0, r4, #0 - bl sub_0207AB58 - cmp r0, #1 - bne _0223D592 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D536: - ldr r1, [r4, #0] - ldr r2, [r1, #0] - mov r1, #0x80 - tst r1, r2 - bne _0223D546 - mov r1, #0x21 - strb r1, [r4, r0] - b _0223D798 -_0223D546: - bl sub_0203608C - cmp r0, #0 - beq _0223D55E - mov r0, #0x39 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D55E: - add r0, r4, #0 - mov r1, #1 - bl sub_0207AB9C - cmp r0, #1 - bne _0223D592 - mov r0, #0x39 - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D57A: - mov r1, #1 - sub r0, r0, #1 - strb r1, [r4, r0] - bl sub_0203608C - cmp r0, #0 - beq _0223D59E - mov r0, #0x39 - bl sub_02036540 - cmp r0, #1 - beq _0223D594 -_0223D592: - b _0223D798 -_0223D594: - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D59E: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x39 - bl sub_0207ABD0 - cmp r0, #1 - bne _0223D694 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D5B6: - bl sub_0203608C - cmp r0, #0 - beq _0223D5CE - mov r0, #0x3a - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D5CE: - add r0, r4, #0 - mov r1, #3 - bl sub_0207AB9C - cmp r0, #1 - bne _0223D694 - mov r0, #0x3a - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D5EA: - mov r1, #1 - sub r0, r0, #1 - strb r1, [r4, r0] - bl sub_0203608C - cmp r0, #0 - beq _0223D60C - mov r0, #0x3a - bl sub_02036540 - cmp r0, #1 - bne _0223D694 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D60C: - add r0, r4, #0 - mov r1, #3 - mov r2, #0x3a - bl sub_0207ABD0 - cmp r0, #1 - bne _0223D694 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D624: - bl sub_0203608C - cmp r0, #0 - beq _0223D63C - mov r0, #0x3b - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D63C: - add r0, r4, #0 - mov r1, #1 - bl sub_0207AC28 - cmp r0, #1 - bne _0223D694 - mov r0, #0x3b - bl sub_020364F0 - ldr r0, _0223D658 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 - ; .align 2, 0 -_0223D658: .word 0x00001021 -_0223D65C: .word 0x00001022 -_0223D660: .word 0x00000708 -_0223D664: - mov r1, #1 - sub r0, r0, #1 - strb r1, [r4, r0] - bl sub_0203608C - cmp r0, #0 - beq _0223D686 - mov r0, #0x3b - bl sub_02036540 - cmp r0, #1 - bne _0223D694 - ldr r0, _0223D7A0 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D686: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x3b - bl sub_0207AC54 - cmp r0, #1 - beq _0223D696 -_0223D694: - b _0223D798 -_0223D696: - ldr r0, _0223D7A0 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D6A0: - bl sub_0203608C - cmp r0, #0 - beq _0223D6B8 - mov r0, #0x3c - bl sub_020364F0 - ldr r0, _0223D7A0 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D6B8: - add r0, r4, #0 - mov r1, #3 - bl sub_0207AC28 - cmp r0, #1 - bne _0223D798 - mov r0, #0x3c - bl sub_020364F0 - ldr r0, _0223D7A0 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D6D4: - mov r1, #1 - sub r0, r0, #1 - strb r1, [r4, r0] - bl sub_0203608C - cmp r0, #0 - beq _0223D6F6 - mov r0, #0x3c - bl sub_02036540 - cmp r0, #1 - bne _0223D798 - ldr r0, _0223D7A0 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D6F6: - add r0, r4, #0 - mov r1, #3 - mov r2, #0x3c - bl sub_0207AC54 - cmp r0, #1 - bne _0223D798 - ldr r0, _0223D7A0 ; =0x00001021 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0223D798 -_0223D70E: - bl sub_02035E18 - ldr r1, _0223D7A4 ; =0x00001020 - ldrb r2, [r4, r1] - cmp r2, r0 - bne _0223D764 - add r0, r1, #1 - ldrb r0, [r4, r0] - cmp r0, #0x14 - bne _0223D734 - add r6, r7, #0 - add r5, r4, #0 -_0223D726: - ldr r0, [r5, #0x10] - bl sub_020181C4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0223D726 -_0223D734: - ldr r0, _0223D7A4 ; =0x00001020 - mov r3, #0 - strb r3, [r4, r0] - add r1, r0, #2 - strh r3, [r4, r1] - add r1, r0, #1 - ldrb r1, [r4, r1] - add r2, r1, #1 - add r1, r0, #1 - strb r2, [r4, r1] - add r0, r0, #1 - ldrb r0, [r4, r0] - cmp r0, #0x21 - bne _0223D798 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r3, [sp, #8] - ldr r0, [r4, #0xc] - ldr r2, _0223D7A8 ; =0x0000FFFF - mov r1, #5 - bl sub_02003178 - b _0223D798 -_0223D764: - add r0, r1, #2 - ldrh r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrh r1, [r4, r0] - ldr r0, _0223D7AC ; =0x00000708 - cmp r1, r0 - bls _0223D798 - mov r0, #1 - bl sub_02038AE0 - b _0223D798 -_0223D77E: - ldr r0, [r4, #0xc] - bl sub_0200384C - cmp r0, #0 - bne _0223D798 - ldr r0, _0223D7B0 ; =0x00001024 - mov r7, #1 - ldr r0, [r4, r0] - bl sub_0200EBA0 - mov r0, #0 - bl sub_02036378 -_0223D798: - add r0, r7, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0223D7A0: .word 0x00001021 -_0223D7A4: .word 0x00001020 -_0223D7A8: .word 0x0000FFFF -_0223D7AC: .word 0x00000708 -_0223D7B0: .word 0x00001024 - thumb_func_end ov16_0223D354 - - thumb_func_start ov16_0223D7B4 -ov16_0223D7B4: ; 0x0223D7B4 - push {r4, lr} - bl sub_0200682C - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02002FA0 - ldr r0, [r4, #0xc] - bl sub_02002F54 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_0201A928 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov16_0223D7B4 - - thumb_func_start ov16_0223D800 -ov16_0223D800: ; 0x0223D800 - push {r3, r4, r5, lr} - ldr r1, _0223D938 ; =0x00002484 - add r5, r0, #0 - mov r2, #5 - bl sub_0200681C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - add r5, r0, #0 - ldr r2, _0223D938 ; =0x00002484 - mov r0, #0 - add r1, r4, #0 - bl sub_020C4BB8 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223C2C0 - ldr r0, [r4, #0x2c] - mov r1, #4 - tst r1, r0 - beq _0223D840 - ldr r1, _0223D93C ; =0x0000240C - ldr r2, [r4, r1] - mov r1, #0x10 - tst r1, r2 - bne _0223D840 - mov r1, #0x80 - tst r0, r1 - beq _0223D848 -_0223D840: - bl sub_02039794 - mov r0, #0 - pop {r3, r4, r5, pc} -_0223D848: - ldr r0, _0223D940 ; =0x0000000A - mov r1, #2 - bl sub_02006590 - ldr r1, [r4, #0x2c] - mov r0, #8 - tst r0, r1 - bne _0223D85C - mov r0, #0 - pop {r3, r4, r5, pc} -_0223D85C: - mov r0, #5 - mov r1, #0x30 - bl sub_02018144 - mov r1, #0x71 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [r4, r1] - mov r0, #0 - mov r2, #0x30 - bl sub_020C4BB8 - bl sub_0203608C - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - add r0, r5, #0 - bl sub_020362F4 - cmp r0, #3 - bhi _0223D8E0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223D892: ; jump table - .short _0223D89A - _0223D892 - 2 ; case 0 - .short _0223D8C0 - _0223D892 - 2 ; case 1 - .short _0223D8C0 - _0223D892 - 2 ; case 2 - .short _0223D89A - _0223D892 - 2 ; case 3 -_0223D89A: - lsl r0, r5, #2 - add r0, r4, r0 - ldr r1, [r0, #0x68] - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r1, [r0, #4] - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223E258 - lsl r0, r0, #2 - add r0, r4, r0 - ldr r1, [r0, #0x68] - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r1, [r0, #0xc] - b _0223D8E0 -_0223D8C0: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223E258 - lsl r0, r0, #2 - add r0, r4, r0 - ldr r2, [r0, #0x68] - mov r0, #0x71 - lsl r0, r0, #2 - ldr r1, [r4, r0] - str r2, [r1, #4] - lsl r1, r5, #2 - add r1, r4, r1 - ldr r1, [r1, #0x68] - ldr r0, [r4, r0] - str r1, [r0, #0xc] -_0223D8E0: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r2, #5 - str r2, [r1, #0x24] - ldr r0, [r4, r0] - mov r1, #0 - add r0, #0x28 - strb r1, [r0] - add r0, r5, #0 - bl sub_020362F4 - cmp r0, #3 - bhi _0223D92A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223D908: ; jump table - .short _0223D910 - _0223D908 - 2 ; case 0 - .short _0223D91E - _0223D908 - 2 ; case 1 - .short _0223D91E - _0223D908 - 2 ; case 2 - .short _0223D910 - _0223D908 - 2 ; case 3 -_0223D910: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - add r0, #0x29 - strb r1, [r0] - b _0223D92A -_0223D91E: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - add r0, #0x29 - strb r1, [r0] -_0223D92A: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov11_0221F800 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D938: .word 0x00002484 -_0223D93C: .word 0x0000240C -_0223D940: .word 0x0000000A - thumb_func_end ov16_0223D800 - - thumb_func_start ov16_0223D944 -ov16_0223D944: ; 0x0223D944 - push {r3, r4, r5, r6, r7, lr} - bl sub_0200682C - add r6, r0, #0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #0 - beq _0223D986 - mov r4, #0 - mov r7, #0x71 - add r5, r4, #0 - lsl r7, r7, #2 -_0223D962: - ldr r0, [r6, r7] - add r0, r0, r5 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _0223D970 - bl sub_020181C4 -_0223D970: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223D962 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223D986: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223D944 - - thumb_func_start ov16_0223D98C -ov16_0223D98C: ; 0x0223D98C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - ldr r0, [r4, #0x2c] - mov r1, #4 - tst r1, r0 - beq _0223D9B4 - ldr r1, _0223DAD0 ; =0x0000240C - ldr r2, [r4, r1] - mov r1, #0x10 - tst r1, r2 - bne _0223D9B4 - mov r1, #0x80 - tst r0, r1 - beq _0223D9BC -_0223D9B4: - bl sub_02039794 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0223D9BC: - bl sub_0203608C - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - mov r0, #5 - mov r1, #0x30 - bl sub_02018144 - mov r1, #0x71 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [r4, r1] - mov r0, #0 - mov r2, #0x30 - bl sub_020C4BB8 - ldr r1, [r4, #0x2c] - mov r0, #8 - tst r0, r1 - beq _0223DA3A - mov r6, #0 - add r5, r4, #0 -_0223D9E8: - add r0, r6, #0 - bl sub_020362F4 - mov r2, #0x71 - lsl r2, r2, #2 - ldr r2, [r4, r2] - lsl r0, r0, #2 - ldr r1, [r5, #0x68] - add r0, r2, r0 - str r1, [r0, #4] - add r0, r6, #0 - bl sub_020362F4 - add r7, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #5 - bl sub_02025F04 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r2, [r4, r1] - lsl r1, r7, #2 - add r1, r2, r1 - add r6, r6, #1 - add r5, r5, #4 - str r0, [r1, #0x14] - cmp r6, #4 - blt _0223D9E8 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r2, #5 - str r2, [r1, #0x24] - ldr r1, [r4, r0] - mov r2, #1 - add r1, #0x28 - strb r2, [r1] - ldr r0, [r4, r0] - add r0, #0x29 - strb r2, [r0] - b _0223DAC0 -_0223DA3A: - add r0, r5, #0 - lsl r7, r5, #2 - bl sub_020362F4 - mov r2, #0x71 - lsl r2, r2, #2 - add r1, r4, r7 - ldr r2, [r4, r2] - lsl r0, r0, #2 - ldr r1, [r1, #0x68] - add r0, r2, r0 - str r1, [r0, #4] - mov r0, #1 - eor r0, r5 - lsl r6, r0, #2 - str r0, [sp] - bl sub_020362F4 - add r1, r4, r6 - ldr r2, [r1, #0x68] - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r4, r1] - lsl r0, r0, #2 - add r0, r1, r0 - str r2, [r0, #4] - add r0, r5, #0 - bl sub_020362F4 - add r5, r0, #0 - add r0, r4, r7 - ldr r0, [r0, #0x48] - mov r1, #5 - bl sub_02025F04 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r2, [r4, r1] - lsl r1, r5, #2 - add r1, r2, r1 - str r0, [r1, #0x14] - ldr r0, [sp] - bl sub_020362F4 - add r5, r0, #0 - add r0, r4, r6 - ldr r0, [r0, #0x48] - mov r1, #5 - bl sub_02025F04 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r3, [r4, r1] - lsl r2, r5, #2 - add r2, r3, r2 - str r0, [r2, #0x14] - ldr r0, [r4, r1] - mov r2, #5 - str r2, [r0, #0x24] - ldr r0, [r4, r1] - mov r2, #1 - add r0, #0x28 - strb r2, [r0] - ldr r0, [r4, r1] - mov r2, #0 - add r0, #0x29 - strb r2, [r0] -_0223DAC0: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov11_0221F800 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223DAD0: .word 0x0000240C - thumb_func_end ov16_0223D98C - - thumb_func_start ov16_0223DAD4 -ov16_0223DAD4: ; 0x0223DAD4 - push {r3, r4, r5, r6, r7, lr} - bl sub_0200682C - add r6, r0, #0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #0 - beq _0223DB16 - mov r4, #0 - mov r7, #0x71 - add r5, r4, #0 - lsl r7, r7, #2 -_0223DAF2: - ldr r0, [r6, r7] - add r0, r0, r5 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _0223DB00 - bl sub_020181C4 -_0223DB00: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223DAF2 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223DB16: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223DAD4 - - thumb_func_start ov16_0223DB1C -ov16_0223DB1C: ; 0x0223DB1C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - bl sub_02006840 - add r7, r0, #0 - ldr r0, [r7, #0] - mov r1, #4 - tst r1, r0 - beq _0223DB40 - mov r1, #0x63 - lsl r1, r1, #2 - ldr r2, [r7, r1] - mov r1, #0x10 - tst r1, r2 - bne _0223DB40 - mov r1, #0x80 - tst r0, r1 - beq _0223DB46 -_0223DB40: - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223DB46: - bl sub_0203608C - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - ldr r0, _0223DD08 ; =0x0000000A - mov r1, #2 - bl sub_02006590 - mov r0, #5 - mov r1, #0x30 - bl sub_02018144 - add r6, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - str r6, [r7, r0] - mov r0, #0 - add r1, r6, #0 - mov r2, #0x30 - bl sub_020C4BB8 - str r7, [r6, #0] - ldr r0, [r7, #0x14] - cmp r0, #5 - bhi _0223DBFA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223DB84: ; jump table - .short _0223DBFA - _0223DB84 - 2 ; case 0 - .short _0223DB90 - _0223DB84 - 2 ; case 1 - .short _0223DBB4 - _0223DB84 - 2 ; case 2 - .short _0223DBD8 - _0223DB84 - 2 ; case 3 - .short _0223DBFA - _0223DB84 - 2 ; case 4 - .short _0223DBD8 - _0223DB84 - 2 ; case 5 -_0223DB90: - bl sub_020389B8 - cmp r0, #0 - bne _0223DBA6 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #0x15 - bl sub_0202CF28 - b _0223DBFA -_0223DBA6: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #0x1a - bl sub_0202CF28 - b _0223DBFA -_0223DBB4: - bl sub_020389B8 - cmp r0, #0 - bne _0223DBCA - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #0x16 - bl sub_0202CF28 - b _0223DBFA -_0223DBCA: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #0x1b - bl sub_0202CF28 - b _0223DBFA -_0223DBD8: - bl sub_020389B8 - cmp r0, #0 - bne _0223DBEE - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #0x17 - bl sub_0202CF28 - b _0223DBFA -_0223DBEE: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #0x1c - bl sub_0202CF28 -_0223DBFA: - ldr r1, [r7, #0] - mov r0, #8 - tst r0, r1 - beq _0223DC64 - mov r4, #0 - add r5, r7, #0 -_0223DC06: - add r0, r4, #0 - bl sub_020362F4 - lsl r0, r0, #2 - ldr r1, [r5, #4] - add r0, r6, r0 - str r1, [r0, #4] - add r0, r4, #0 - bl sub_020362F4 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - mov r1, #5 - bl sub_02025F04 - ldr r1, [sp, #8] - add r4, r4, #1 - lsl r1, r1, #2 - add r1, r6, r1 - add r5, r5, #4 - str r0, [r1, #0x14] - cmp r4, #4 - blt _0223DC06 - mov r0, #5 - str r0, [r6, #0x24] - add r0, r6, #0 - mov r1, #2 - add r0, #0x28 - strb r1, [r0] - add r0, r6, #0 - mov r1, #1 - add r0, #0x29 - strb r1, [r0] - ldr r1, [r7, #0x14] - cmp r1, #5 - beq _0223DC5A - add r0, r6, #0 - add r0, #0x2a - strb r1, [r0] - b _0223DCF0 -_0223DC5A: - add r0, r6, #0 - mov r1, #3 - add r0, #0x2a - strb r1, [r0] - b _0223DCF0 -_0223DC64: - lsl r0, r4, #2 - str r0, [sp] - add r0, r4, #0 - bl sub_020362F4 - ldr r1, [sp] - lsl r0, r0, #2 - add r1, r7, r1 - ldr r1, [r1, #4] - add r0, r6, r0 - str r1, [r0, #4] - mov r0, #1 - eor r0, r4 - lsl r5, r0, #2 - str r0, [sp, #4] - bl sub_020362F4 - add r1, r7, r5 - lsl r0, r0, #2 - ldr r1, [r1, #4] - add r0, r6, r0 - str r1, [r0, #4] - add r0, r4, #0 - bl sub_020362F4 - add r4, r0, #0 - ldr r0, [sp] - mov r1, #5 - add r0, r7, r0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl sub_02025F04 - lsl r1, r4, #2 - add r1, r6, r1 - str r0, [r1, #0x14] - ldr r0, [sp, #4] - bl sub_020362F4 - add r4, r0, #0 - add r0, r7, r5 - add r0, #0xf8 - ldr r0, [r0, #0] - mov r1, #5 - bl sub_02025F04 - lsl r1, r4, #2 - add r1, r6, r1 - str r0, [r1, #0x14] - mov r0, #5 - str r0, [r6, #0x24] - add r0, r6, #0 - mov r1, #2 - add r0, #0x28 - strb r1, [r0] - add r0, r6, #0 - mov r1, #0 - add r0, #0x29 - strb r1, [r0] - ldr r1, [r7, #0x14] - cmp r1, #5 - beq _0223DCE8 - add r0, r6, #0 - add r0, #0x2a - strb r1, [r0] - b _0223DCF0 -_0223DCE8: - add r0, r6, #0 - mov r1, #3 - add r0, #0x2a - strb r1, [r0] -_0223DCF0: - ldr r0, _0223DD0C ; =0x000001B2 - ldrb r1, [r7, r0] - add r0, r6, #0 - add r0, #0x2c - strb r1, [r0] - add r0, r6, #0 - bl ov11_0221F800 - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0223DD08: .word 0x0000000A -_0223DD0C: .word 0x000001B2 - thumb_func_end ov16_0223DB1C - - thumb_func_start ov16_0223DD10 -ov16_0223DD10: ; 0x0223DD10 - push {r4, r5, r6, lr} - bl sub_02006840 - mov r1, #0x66 - lsl r1, r1, #2 - ldr r6, [r0, r1] - add r0, r6, #0 - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #0 - beq _0223DD46 - mov r4, #0 - add r5, r6, #0 -_0223DD2A: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _0223DD34 - bl sub_020181C4 -_0223DD34: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223DD2A - add r0, r6, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, r5, r6, pc} -_0223DD46: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0223DD10 - - thumb_func_start ov16_0223DD4C -ov16_0223DD4C: ; 0x0223DD4C - push {r3, lr} - ldr r2, [r0, #0x2c] - ldr r1, _0223DD88 ; =0x00000404 - tst r1, r2 - bne _0223DD60 - ldr r1, _0223DD8C ; =0x0000240C - ldr r1, [r0, r1] - mov r0, #0x10 - tst r0, r1 - beq _0223DD74 -_0223DD60: - mov r0, #1 - bl sub_02002AE4 - mov r0, #1 - bl sub_02002AC8 - mov r0, #0 - bl sub_02002B20 - pop {r3, pc} -_0223DD74: - mov r0, #3 - bl sub_02002AE4 - mov r0, #1 - bl sub_02002AC8 - mov r0, #1 - bl sub_02002B20 - pop {r3, pc} - ; .align 2, 0 -_0223DD88: .word 0x00000404 -_0223DD8C: .word 0x0000240C - thumb_func_end ov16_0223DD4C - - thumb_func_start ov16_0223DD90 -ov16_0223DD90: ; 0x0223DD90 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - ldr r2, _0223DEC4 ; =0x0000240C - str r0, [sp] - ldr r3, [r0, r2] - mov r0, #0x10 - tst r0, r3 - beq _0223DDAC - ldr r0, [sp] - mov r1, #1 - sub r2, #0x10 - strb r1, [r0, r2] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} -_0223DDAC: - mov r0, #0x5f - mov r3, #0 - add r4, sp, #0x30 - add r5, sp, #0x20 - lsl r0, r0, #2 -_0223DDB6: - stmia r4!, {r3} - ldr r2, [r1, r0] - add r3, r3, #1 - add r1, r1, #4 - stmia r5!, {r2} - cmp r3, #4 - blt _0223DDB6 - bl sub_0203608C - str r0, [sp, #0x10] - bl sub_02035E18 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - sub r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #0 - ble _0223DE36 - add r0, sp, #0x30 - add r2, sp, #0x20 - str r0, [sp, #8] - str r2, [sp, #0x18] - mov ip, r0 -_0223DDE8: - ldr r0, [sp, #4] - add r5, r0, #1 - ldr r0, [sp, #0xc] - cmp r5, r0 - bge _0223DE22 - ldr r1, [sp, #0x18] - lsl r0, r5, #2 - add r3, r1, r0 - mov r1, ip - add r4, r1, r0 -_0223DDFC: - ldr r0, [r3, #0] - ldr r7, [r2, #0] - str r0, [sp, #0x1c] - cmp r7, r0 - bge _0223DE16 - ldr r0, [sp, #8] - ldr r1, [r4, #0] - ldr r6, [r0, #0] - str r1, [r0, #0] - ldr r0, [sp, #0x1c] - str r6, [r4, #0] - str r0, [r2, #0] - str r7, [r3, #0] -_0223DE16: - ldr r0, [sp, #0xc] - add r5, r5, #1 - add r3, r3, #4 - add r4, r4, #4 - cmp r5, r0 - blt _0223DDFC -_0223DE22: - ldr r0, [sp, #8] - add r2, r2, #4 - add r0, r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r1, r0, #1 - ldr r0, [sp, #0x14] - str r1, [sp, #4] - cmp r1, r0 - blt _0223DDE8 -_0223DE36: - ldr r1, [sp, #0x30] - ldr r0, [sp, #0x10] - cmp r1, r0 - bne _0223DE4A - ldr r0, [sp] - ldr r1, _0223DEC8 ; =0x000023FC - mov r2, #1 - strb r2, [r0, r1] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} -_0223DE4A: - ldr r0, [sp] - ldr r1, [r0, #0x2c] - mov r0, #0x80 - tst r0, r1 - bne _0223DEBE - mov r0, #8 - tst r0, r1 - beq _0223DEB0 - ldr r0, [sp, #0x10] - bl sub_020362F4 - add r4, r0, #0 - ldr r0, [sp, #0x30] - bl sub_020362F4 - cmp r0, #3 - bhi _0223DEBE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223DE78: ; jump table - .short _0223DE80 - _0223DE78 - 2 ; case 0 - .short _0223DE98 - _0223DE78 - 2 ; case 1 - .short _0223DE80 - _0223DE78 - 2 ; case 2 - .short _0223DE98 - _0223DE78 - 2 ; case 3 -_0223DE80: - mov r0, #1 - tst r0, r4 - beq _0223DEBE - ldr r1, _0223DEC4 ; =0x0000240C - ldr r0, [sp] - ldr r2, [r0, r1] - mov r0, #0x20 - orr r2, r0 - ldr r0, [sp] - add sp, #0x40 - str r2, [r0, r1] - pop {r3, r4, r5, r6, r7, pc} -_0223DE98: - mov r0, #1 - tst r0, r4 - bne _0223DEBE - ldr r1, _0223DEC4 ; =0x0000240C - ldr r0, [sp] - ldr r2, [r0, r1] - mov r0, #0x20 - orr r2, r0 - ldr r0, [sp] - add sp, #0x40 - str r2, [r0, r1] - pop {r3, r4, r5, r6, r7, pc} -_0223DEB0: - ldr r1, _0223DEC4 ; =0x0000240C - ldr r0, [sp] - ldr r2, [r0, r1] - mov r0, #0x20 - orr r2, r0 - ldr r0, [sp] - str r2, [r0, r1] -_0223DEBE: - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223DEC4: .word 0x0000240C -_0223DEC8: .word 0x000023FC - thumb_func_end ov16_0223DD90 - - thumb_func_start ov16_0223DECC -ov16_0223DECC: ; 0x0223DECC - push {r3, lr} - bl sub_02039734 - bl sub_020389B8 - cmp r0, #0 - beq _0223DEE8 - bl ov4_021D7EAC - mov r1, #3 - sub r0, r1, r0 - bl sub_020397B0 - pop {r3, pc} -_0223DEE8: - bl sub_02033E1C - cmp r0, #0 - beq _0223DEFC - bl sub_020CE814 - mov r1, #3 - sub r0, r1, r0 - bl sub_020397B0 -_0223DEFC: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_0223DECC - - thumb_func_start ov16_0223DF00 -ov16_0223DF00: ; 0x0223DF00 - ldr r0, [r0, #4] - bx lr - thumb_func_end ov16_0223DF00 - - thumb_func_start ov16_0223DF04 -ov16_0223DF04: ; 0x0223DF04 - ldr r2, [r0, #8] - lsl r0, r1, #4 - add r0, r2, r0 - bx lr - thumb_func_end ov16_0223DF04 - - thumb_func_start ov16_0223DF0C -ov16_0223DF0C: ; 0x0223DF0C - ldr r0, [r0, #0x2c] - bx lr - thumb_func_end ov16_0223DF0C - - thumb_func_start ov16_0223DF10 -ov16_0223DF10: ; 0x0223DF10 - ldr r0, [r0, #0x30] - bx lr - thumb_func_end ov16_0223DF10 - - thumb_func_start ov16_0223DF14 -ov16_0223DF14: ; 0x0223DF14 - lsl r1, r1, #2 - add r0, r0, r1 - ldr r0, [r0, #0x34] - bx lr - thumb_func_end ov16_0223DF14 - - thumb_func_start ov16_0223DF1C -ov16_0223DF1C: ; 0x0223DF1C - ldr r0, [r0, #0x44] - bx lr - thumb_func_end ov16_0223DF1C - - thumb_func_start ov16_0223DF20 -ov16_0223DF20: ; 0x0223DF20 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223DF3E - mov r3, #0x10 - tst r2, r3 - beq _0223DF46 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223DF46 -_0223DF3E: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x68] - pop {r3, r4, r5, pc} -_0223DF46: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223DF58 - lsl r0, r4, #0x1f - lsr r0, r0, #0x1d - add r0, r5, r0 - ldr r0, [r0, #0x68] - pop {r3, r4, r5, pc} -_0223DF58: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x68] - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223DF20 - - thumb_func_start ov16_0223DF60 -ov16_0223DF60: ; 0x0223DF60 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223DF7E - mov r3, #0x10 - tst r2, r3 - beq _0223DF8A - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223DF8A -_0223DF7E: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x68] - bl sub_0207A0F8 - pop {r3, r4, r5, pc} -_0223DF8A: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223DFA0 - lsl r0, r4, #0x1f - lsr r0, r0, #0x1d - add r0, r5, r0 - ldr r0, [r0, #0x68] - bl sub_0207A0F8 - pop {r3, r4, r5, pc} -_0223DFA0: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x68] - bl sub_0207A0F8 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223DF60 - - thumb_func_start ov16_0223DFAC -ov16_0223DFAC: ; 0x0223DFAC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r2, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223DFCC - mov r3, #0x10 - tst r2, r3 - beq _0223DFDA - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223DFDA -_0223DFCC: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x68] - add r1, r6, #0 - bl sub_0207A0FC - pop {r4, r5, r6, pc} -_0223DFDA: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223DFF2 - lsl r0, r4, #0x1f - lsr r0, r0, #0x1d - add r0, r5, r0 - ldr r0, [r0, #0x68] - add r1, r6, #0 - bl sub_0207A0FC - pop {r4, r5, r6, pc} -_0223DFF2: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x68] - add r1, r6, #0 - bl sub_0207A0FC - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223DFAC - - thumb_func_start ov16_0223E000 -ov16_0223E000: ; 0x0223E000 - add r0, #0x88 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223E000 - - thumb_func_start ov16_0223E008 -ov16_0223E008: ; 0x0223E008 - add r0, #0x8c - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223E008 - - thumb_func_start ov16_0223E010 -ov16_0223E010: ; 0x0223E010 - add r0, #0x90 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223E010 - - thumb_func_start ov16_0223E018 -ov16_0223E018: ; 0x0223E018 - add r0, #0x94 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223E018 - - thumb_func_start ov16_0223E020 -ov16_0223E020: ; 0x0223E020 - mov r2, #0x5f - lsl r2, r2, #2 - add r2, r0, r2 - lsl r0, r1, #4 - add r0, r2, r0 - bx lr - thumb_func_end ov16_0223E020 - - thumb_func_start ov16_0223E02C -ov16_0223E02C: ; 0x0223E02C - mov r1, #0x67 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223E02C - - thumb_func_start ov16_0223E034 -ov16_0223E034: ; 0x0223E034 - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r1, r0] - bx lr - thumb_func_end ov16_0223E034 - - thumb_func_start ov16_0223E040 -ov16_0223E040: ; 0x0223E040 - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0x1a - lsl r0, r0, #4 - str r2, [r1, r0] - bx lr - thumb_func_end ov16_0223E040 - - thumb_func_start ov16_0223E04C -ov16_0223E04C: ; 0x0223E04C - mov r1, #0x6a - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223E04C - - thumb_func_start ov16_0223E054 -ov16_0223E054: ; 0x0223E054 - mov r1, #0x6b - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223E054 - - thumb_func_start ov16_0223E05C -ov16_0223E05C: ; 0x0223E05C - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov16_0223E05C - - thumb_func_start ov16_0223E060 -ov16_0223E060: ; 0x0223E060 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov16_0223E060 - - thumb_func_start ov16_0223E064 -ov16_0223E064: ; 0x0223E064 - ldr r0, [r0, #0x28] - bx lr - thumb_func_end ov16_0223E064 - - thumb_func_start ov16_0223E068 -ov16_0223E068: ; 0x0223E068 - ldr r0, [r0, #0x60] - bx lr - thumb_func_end ov16_0223E068 - - thumb_func_start ov16_0223E06C -ov16_0223E06C: ; 0x0223E06C - mov r1, #0x8a - lsl r1, r1, #2 - add r0, r0, r1 - bx lr - thumb_func_end ov16_0223E06C - - thumb_func_start ov16_0223E074 -ov16_0223E074: ; 0x0223E074 - ldr r1, _0223E07C ; =0x00001228 - add r0, r0, r1 - bx lr - nop -_0223E07C: .word 0x00001228 - thumb_func_end ov16_0223E074 - - thumb_func_start ov16_0223E080 -ov16_0223E080: ; 0x0223E080 - ldr r1, _0223E088 ; =0x000023E8 - add r0, r0, r1 - bx lr - nop -_0223E088: .word 0x000023E8 - thumb_func_end ov16_0223E080 - - thumb_func_start ov16_0223E08C -ov16_0223E08C: ; 0x0223E08C - ldr r1, _0223E094 ; =0x000023EA - add r0, r0, r1 - bx lr - nop -_0223E094: .word 0x000023EA - thumb_func_end ov16_0223E08C - - thumb_func_start ov16_0223E098 -ov16_0223E098: ; 0x0223E098 - ldr r1, _0223E0A0 ; =0x000023EC - add r0, r0, r1 - bx lr - nop -_0223E0A0: .word 0x000023EC - thumb_func_end ov16_0223E098 - - thumb_func_start ov16_0223E0A4 -ov16_0223E0A4: ; 0x0223E0A4 - ldr r1, _0223E0AC ; =0x000023EE - add r0, r0, r1 - bx lr - nop -_0223E0AC: .word 0x000023EE - thumb_func_end ov16_0223E0A4 - - thumb_func_start ov16_0223E0B0 -ov16_0223E0B0: ; 0x0223E0B0 - ldr r1, _0223E0B8 ; =0x000023F0 - add r0, r0, r1 - bx lr - nop -_0223E0B8: .word 0x000023F0 - thumb_func_end ov16_0223E0B0 - - thumb_func_start ov16_0223E0BC -ov16_0223E0BC: ; 0x0223E0BC - ldr r1, _0223E0C4 ; =0x000023F2 - add r0, r0, r1 - bx lr - nop -_0223E0C4: .word 0x000023F2 - thumb_func_end ov16_0223E0BC - - thumb_func_start ov16_0223E0C8 -ov16_0223E0C8: ; 0x0223E0C8 - mov r1, #0x1d - lsl r1, r1, #4 - add r0, r0, r1 - bx lr - thumb_func_end ov16_0223E0C8 - - thumb_func_start ov16_0223E0D0 -ov16_0223E0D0: ; 0x0223E0D0 - ldr r0, [r0, #0x14] - bx lr - thumb_func_end ov16_0223E0D0 - - thumb_func_start ov16_0223E0D4 -ov16_0223E0D4: ; 0x0223E0D4 - ldr r0, [r0, #0x18] - bx lr - thumb_func_end ov16_0223E0D4 - - thumb_func_start ov16_0223E0D8 -ov16_0223E0D8: ; 0x0223E0D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223E0F6 - mov r3, #0x10 - tst r2, r3 - beq _0223E100 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223E100 -_0223E0F6: - lsl r0, r4, #1 - add r0, r5, r0 - add r0, #0xa0 - ldrh r0, [r0] - pop {r3, r4, r5, pc} -_0223E100: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223E114 - lsl r0, r4, #0x1f - lsr r0, r0, #0x1e - add r0, r5, r0 - add r0, #0xa0 - ldrh r0, [r0] - pop {r3, r4, r5, pc} -_0223E114: - lsl r0, r4, #1 - add r0, r5, r0 - add r0, #0xa0 - ldrh r0, [r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0223E0D8 - - thumb_func_start ov16_0223E120 -ov16_0223E120: ; 0x0223E120 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223E13E - mov r3, #0x10 - tst r2, r3 - beq _0223E148 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223E148 -_0223E13E: - mov r0, #0x34 - add r5, #0xac - mul r0, r4 - add r0, r5, r0 - pop {r3, r4, r5, pc} -_0223E148: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223E160 - mov r0, #1 - add r1, r4, #0 - and r1, r0 - mov r0, #0x34 - add r5, #0xac - mul r0, r1 - add r0, r5, r0 - pop {r3, r4, r5, pc} -_0223E160: - mov r0, #0x34 - add r5, #0xac - mul r0, r4 - add r0, r5, r0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0223E120 - - thumb_func_start ov16_0223E16C -ov16_0223E16C: ; 0x0223E16C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223E18A - mov r3, #0x10 - tst r2, r3 - beq _0223E192 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223E192 -_0223E18A: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x48] - pop {r3, r4, r5, pc} -_0223E192: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223E1A4 - lsl r0, r4, #0x1f - lsr r0, r0, #0x1d - add r0, r5, r0 - ldr r0, [r0, #0x48] - pop {r3, r4, r5, pc} -_0223E1A4: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x48] - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223E16C - - thumb_func_start ov16_0223E1AC -ov16_0223E1AC: ; 0x0223E1AC - ldr r0, [r0, #0x58] - bx lr - thumb_func_end ov16_0223E1AC - - thumb_func_start ov16_0223E1B0 -ov16_0223E1B0: ; 0x0223E1B0 - ldr r0, [r0, #0x5c] - bx lr - thumb_func_end ov16_0223E1B0 - - thumb_func_start ov16_0223E1B4 -ov16_0223E1B4: ; 0x0223E1B4 - lsl r1, r1, #2 - add r0, r0, r1 - ldr r3, _0223E1C0 ; =sub_02025F30 - ldr r0, [r0, #0x48] - bx r3 - nop -_0223E1C0: .word sub_02025F30 - thumb_func_end ov16_0223E1B4 - - thumb_func_start ov16_0223E1C4 -ov16_0223E1C4: ; 0x0223E1C4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - add r7, r1, #0 - mov r4, #0 - cmp r0, #0 - ble _0223E1E8 - add r5, r6, #0 -_0223E1D4: - ldr r0, [r5, #0x34] - bl ov16_02263AE4 - cmp r7, r0 - beq _0223E1E8 - ldr r0, [r6, #0x44] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0223E1D4 -_0223E1E8: - ldr r0, [r6, #0x44] - cmp r4, r0 - blt _0223E1F2 - bl sub_02022974 -_0223E1F2: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223E1C4 - - thumb_func_start ov16_0223E1F8 -ov16_0223E1F8: ; 0x0223E1F8 - lsl r1, r1, #2 - add r0, r0, r1 - ldr r3, _0223E204 ; =ov16_02263AE4 - ldr r0, [r0, #0x34] - bx r3 - nop -_0223E204: .word ov16_02263AE4 - thumb_func_end ov16_0223E1F8 - - thumb_func_start ov16_0223E208 -ov16_0223E208: ; 0x0223E208 - push {r3, lr} - lsl r1, r1, #2 - add r0, r0, r1 - ldr r0, [r0, #0x34] - bl ov16_02263AE4 - mov r1, #1 - and r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_0223E208 - - thumb_func_start ov16_0223E220 -ov16_0223E220: ; 0x0223E220 - mov r1, #0x1b - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223E220 - - thumb_func_start ov16_0223E228 -ov16_0223E228: ; 0x0223E228 - ldr r0, [r0, #0x64] - bx lr - thumb_func_end ov16_0223E228 - - thumb_func_start ov16_0223E22C -ov16_0223E22C: ; 0x0223E22C - mov r1, #9 - lsl r1, r1, #0xa - ldr r0, [r0, r1] - cmp r0, #0x18 - bgt _0223E23A - cmp r0, #0 - bge _0223E23C -_0223E23A: - mov r0, #0x18 -_0223E23C: - bx lr - ; .align 2, 0 - thumb_func_end ov16_0223E22C - - thumb_func_start ov16_0223E240 -ov16_0223E240: ; 0x0223E240 - ldr r1, _0223E248 ; =0x00002404 - ldr r0, [r0, r1] - bx lr - nop -_0223E248: .word 0x00002404 - thumb_func_end ov16_0223E240 - - thumb_func_start ov16_0223E24C -ov16_0223E24C: ; 0x0223E24C - ldr r1, _0223E254 ; =0x00002408 - ldr r0, [r0, r1] - bx lr - nop -_0223E254: .word 0x00002408 - thumb_func_end ov16_0223E24C - - thumb_func_start ov16_0223E258 -ov16_0223E258: ; 0x0223E258 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - bl ov16_0223DF1C - str r0, [sp] - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _0223E274 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_0223E274: - ldr r0, [sp] - mov r4, #0 - cmp r0, #0 - ble _0223E29E -_0223E27C: - cmp r4, r5 - beq _0223E296 - add r0, r6, #0 - add r1, r4, #0 - bl ov16_0223E208 - add r7, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223E208 - cmp r7, r0 - beq _0223E29E -_0223E296: - ldr r0, [sp] - add r4, r4, #1 - cmp r4, r0 - blt _0223E27C -_0223E29E: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223E258 - - thumb_func_start ov16_0223E2A4 -ov16_0223E2A4: ; 0x0223E2A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - str r2, [sp] - bl ov16_0223DF1C - str r0, [sp, #4] - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _0223E2C8 - mov r0, #1 - add sp, #8 - eor r0, r6 - pop {r3, r4, r5, r6, r7, pc} -_0223E2C8: - ldr r0, [sp, #4] - mov r4, #0 - cmp r0, #0 - ble _0223E304 -_0223E2D0: - cmp r4, r6 - beq _0223E2FC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223E1F8 - mov r1, #2 - and r1, r0 - ldr r0, [sp] - cmp r0, r1 - bne _0223E2FC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223E208 - add r7, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223E208 - cmp r7, r0 - bne _0223E304 -_0223E2FC: - ldr r0, [sp, #4] - add r4, r4, #1 - cmp r4, r0 - blt _0223E2D0 -_0223E304: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223E2A4 - - thumb_func_start ov16_0223E30C -ov16_0223E30C: ; 0x0223E30C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r1, #0 - ldr r1, [sp, #0x38] - add r6, r2, #0 - str r1, [sp, #0x38] - add r1, r0, #0 - ldr r1, [r1, #0x30] - add r4, r3, #0 - str r1, [sp, #0x1c] - mov r1, #0 - str r1, [sp, #0x14] - ldr r1, [sp, #0x1c] - str r0, [sp, #4] - mov r2, #2 - add r3, r7, #0 - bl ov16_0225B45C - str r0, [sp, #0x10] - ldr r0, [sp, #4] - bl ov16_0223DF0C - cmp r0, #3 - beq _0223E356 - ldr r0, [sp, #4] - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - beq _0223E37C - ldr r0, [sp, #4] - add r1, r7, #0 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - bne _0223E37C -_0223E356: - ldr r0, [sp, #4] - add r1, r7, #0 - bl ov16_0223E258 - add r3, r0, #0 - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - mov r2, #2 - bl ov16_0225B45C - str r0, [sp, #0xc] - cmp r0, r6 - bne _0223E380 - ldr r0, [sp, #4] - add r1, r7, #0 - bl ov16_0223E258 - add r7, r0, #0 - b _0223E380 -_0223E37C: - ldr r0, [sp, #0x10] - str r0, [sp, #0xc] -_0223E380: - ldr r0, [sp, #4] - add r1, r7, #0 - add r2, r6, #0 - bl ov16_0223DFAC - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x38] - mov r1, #0xf - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E414 - ldr r0, [sp, #0x18] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - mov r1, #7 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E414 - mov r1, #7 - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - mov r1, #0xa0 - add r2, sp, #0x20 - bl sub_02074B30 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E3D0 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E410 -_0223E3D0: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - mov r1, #7 - str r0, [sp, #0x20] - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - add r3, sp, #0x20 - bl ov16_022523E8 - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - ldr r1, _0223E624 ; =0xF7FFFFFF - str r0, [sp, #0x20] - and r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - add r3, sp, #0x20 - bl ov16_022523E8 -_0223E410: - mov r0, #1 - str r0, [sp, #0x14] -_0223E414: - ldr r0, [sp, #0x38] - mov r1, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E478 - ldr r0, [sp, #0x18] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - ldr r1, _0223E628 ; =0x00000F88 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E478 - ldr r1, _0223E62C ; =0xFFFFF077 - add r2, sp, #0x20 - and r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - mov r1, #0xa0 - bl sub_02074B30 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E454 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E474 -_0223E454: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - ldr r1, _0223E62C ; =0xFFFFF077 - str r0, [sp, #0x20] - and r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - add r3, sp, #0x20 - bl ov16_022523E8 -_0223E474: - mov r0, #1 - str r0, [sp, #0x14] -_0223E478: - ldr r0, [sp, #0x38] - mov r1, #0x11 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E4DC - ldr r0, [sp, #0x18] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - mov r1, #0x10 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E4DC - mov r1, #0x10 - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - mov r1, #0xa0 - add r2, sp, #0x20 - bl sub_02074B30 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E4B8 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E4D8 -_0223E4B8: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - mov r1, #0x10 - str r0, [sp, #0x20] - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - add r3, sp, #0x20 - bl ov16_022523E8 -_0223E4D8: - mov r0, #1 - str r0, [sp, #0x14] -_0223E4DC: - ldr r0, [sp, #0x38] - mov r1, #0x12 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E540 - ldr r0, [sp, #0x18] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - mov r1, #0x20 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E540 - mov r1, #0x20 - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - mov r1, #0xa0 - add r2, sp, #0x20 - bl sub_02074B30 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E51C - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E53C -_0223E51C: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - mov r1, #0x20 - str r0, [sp, #0x20] - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - add r3, sp, #0x20 - bl ov16_022523E8 -_0223E53C: - mov r0, #1 - str r0, [sp, #0x14] -_0223E540: - ldr r0, [sp, #0x38] - mov r1, #0x13 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E5A4 - ldr r0, [sp, #0x18] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - mov r1, #0x40 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E5A4 - mov r1, #0x40 - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - mov r1, #0xa0 - add r2, sp, #0x20 - bl sub_02074B30 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E580 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E5A0 -_0223E580: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - mov r1, #0x40 - str r0, [sp, #0x20] - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x34 - add r3, sp, #0x20 - bl ov16_022523E8 -_0223E5A0: - mov r0, #1 - str r0, [sp, #0x14] -_0223E5A4: - ldr r0, [sp, #0x38] - mov r1, #0x14 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E5EC - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E5C2 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E5EC -_0223E5C2: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - mov r1, #7 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E5EC - mov r1, #7 - bic r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - add r3, sp, #0x20 - bl ov16_022523E8 - mov r0, #1 - str r0, [sp, #0x14] -_0223E5EC: - ldr r0, [sp, #0x38] - mov r1, #0x15 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E648 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E60A - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E648 -_0223E60A: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - mov r1, #0xf - lsl r1, r1, #0x10 - str r0, [sp, #0x20] - tst r1, r0 - beq _0223E648 - ldr r1, _0223E630 ; =0xFFF0FFFF - b _0223E634 - ; .align 2, 0 -_0223E624: .word 0xF7FFFFFF -_0223E628: .word 0x00000F88 -_0223E62C: .word 0xFFFFF077 -_0223E630: .word 0xFFF0FFFF -_0223E634: - mov r2, #0x35 - and r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - add r3, sp, #0x20 - bl ov16_022523E8 - mov r0, #1 - str r0, [sp, #0x14] -_0223E648: - ldr r0, [sp, #0x38] - mov r1, #0x16 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E6A2 - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - mov r2, #1 - add r3, r7, #0 - bl ov16_0225B45C - str r0, [sp, #0x20] - cmp r0, #0 - bne _0223E6A2 - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - mov r2, #0 - add r3, r7, #0 - bl ov16_0225B45C - mov r1, #0x40 - str r0, [sp, #0x20] - orr r0, r1 - str r0, [sp, #0x20] - str r0, [sp] - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - mov r2, #0 - add r3, r7, #0 - bl ov16_0225B540 - mov r0, #5 - str r0, [sp] - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - mov r2, #1 - add r3, r7, #0 - bl ov16_0225B540 - mov r0, #1 - str r0, [sp, #0x14] -_0223E6A2: - ldr r0, [sp, #0x38] - mov r1, #0x1b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E6E0 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E6C0 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E6E0 -_0223E6C0: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x13 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0xc - bge _0223E6E0 - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x13 - mov r3, #1 - bl ov16_02252A14 - mov r0, #1 - str r0, [sp, #0x14] -_0223E6E0: - ldr r0, [sp, #0x38] - mov r1, #0x1c - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E71E - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E6FE - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E71E -_0223E6FE: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x14 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0xc - bge _0223E71E - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x14 - mov r3, #1 - bl ov16_02252A14 - mov r0, #1 - str r0, [sp, #0x14] -_0223E71E: - ldr r0, [sp, #0x38] - mov r1, #0x1d - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E75C - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E73C - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E75C -_0223E73C: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x16 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0xc - bge _0223E75C - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x16 - mov r3, #1 - bl ov16_02252A14 - mov r0, #1 - str r0, [sp, #0x14] -_0223E75C: - ldr r0, [sp, #0x38] - mov r1, #0x1e - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E79A - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E77A - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E79A -_0223E77A: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x17 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0xc - bge _0223E79A - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x17 - mov r3, #1 - bl ov16_02252A14 - mov r0, #1 - str r0, [sp, #0x14] -_0223E79A: - ldr r0, [sp, #0x38] - mov r1, #0x1f - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E7D8 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E7B8 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E7D8 -_0223E7B8: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x15 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0xc - bge _0223E7D8 - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x15 - mov r3, #1 - bl ov16_02252A14 - mov r0, #1 - str r0, [sp, #0x14] -_0223E7D8: - ldr r0, [sp, #0x38] - mov r1, #0x20 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E816 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E7F6 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E816 -_0223E7F6: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x18 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0xc - bge _0223E816 - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x18 - mov r3, #1 - bl ov16_02252A14 - mov r0, #1 - str r0, [sp, #0x14] -_0223E816: - ldr r0, [sp, #0x38] - mov r1, #0x21 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E860 - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E834 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E860 -_0223E834: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - mov r1, #1 - lsl r1, r1, #0x14 - add r2, r0, #0 - str r0, [sp, #0x20] - tst r2, r1 - bne _0223E860 - orr r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - add r3, sp, #0x20 - bl ov16_022523E8 - mov r0, #1 - str r0, [sp, #0x14] -_0223E860: - ldr r0, [sp, #0x38] - mov r1, #0x24 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E8F6 - ldr r0, [sp, #0x38] - mov r1, #0x37 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #0x20] - add r1, r4, #0 - ldr r0, [sp, #0x18] - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - add r5, r0, #0 - add r1, r4, #0 - ldr r0, [sp, #0x18] - add r1, #0x42 - mov r2, #0 - bl sub_02074470 - cmp r5, r0 - beq _0223E8F6 - add r1, r4, #0 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x20] - add r1, #0x3a - bl sub_0207536C - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E8B8 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E8F2 -_0223E8B8: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - mov r1, #2 - lsl r1, r1, #0x14 - tst r0, r1 - bne _0223E8F2 - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x4b - mov r3, #0 - bl ov16_02252060 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020787CC - tst r0, r5 - bne _0223E8F2 - add r4, #0x1f - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r1, r7, #0 - add r2, r4, #0 - bl ov16_02252A14 -_0223E8F2: - mov r0, #1 - str r0, [sp, #0x14] -_0223E8F6: - ldr r0, [sp, #0x38] - mov r1, #0x25 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E994 - ldr r0, [sp, #0x38] - mov r1, #0x37 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #0x20] - mov r4, #0 -_0223E91A: - add r1, r4, #0 - ldr r0, [sp, #0x18] - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - add r5, r0, #0 - add r1, r4, #0 - ldr r0, [sp, #0x18] - add r1, #0x42 - mov r2, #0 - bl sub_02074470 - cmp r5, r0 - beq _0223E98E - add r1, r4, #0 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x20] - add r1, #0x3a - bl sub_0207536C - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223E950 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223E98A -_0223E950: - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - mov r1, #2 - lsl r1, r1, #0x14 - tst r0, r1 - bne _0223E98A - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x4b - mov r3, #0 - bl ov16_02252060 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020787CC - tst r0, r5 - bne _0223E98A - add r2, r4, #0 - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r1, r7, #0 - add r2, #0x1f - bl ov16_02252A14 -_0223E98A: - mov r0, #1 - str r0, [sp, #0x14] -_0223E98E: - add r4, r4, #1 - cmp r4, #4 - blt _0223E91A -_0223E994: - ldr r0, [sp, #0x38] - mov r1, #0x26 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - bne _0223E9A8 - b _0223EAB0 -_0223E9A8: - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x38] - mov r1, #0x17 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223E9D2 - ldr r0, [sp, #0x18] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223E9DE - mov r0, #1 - str r0, [sp, #0x20] - b _0223E9DE -_0223E9D2: - ldr r0, [sp, #0x18] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x20] -_0223E9DE: - ldr r0, [sp, #0x20] - cmp r0, #0 - beq _0223EAB0 - ldr r0, [sp, #0x18] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r4, r0, #0 - ldr r0, [sp, #0x18] - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - cmp r4, r0 - beq _0223EAB0 - ldr r0, [sp, #0x38] - mov r1, #0x36 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #0x20] - cmp r0, #0xfd - beq _0223EA3E - cmp r0, #0xfe - beq _0223EA28 - cmp r0, #0xff - bne _0223EA5E - ldr r0, [sp, #0x18] - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x20] - b _0223EA5E -_0223EA28: - ldr r0, [sp, #0x18] - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - lsr r0, r0, #1 - str r0, [sp, #0x20] - bne _0223EA5E - mov r0, #1 - str r0, [sp, #0x20] - b _0223EA5E -_0223EA3E: - ldr r0, [sp, #0x18] - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - mov r1, #0x19 - mul r1, r0 - add r0, r1, #0 - mov r1, #0x64 - bl sub_020E2178 - str r0, [sp, #0x20] - cmp r0, #0 - bne _0223EA5E - mov r0, #1 - str r0, [sp, #0x20] -_0223EA5E: - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x20] - mov r1, #0xa3 - bl sub_0207536C - ldr r0, [sp, #0x38] - mov r1, #0x17 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - bne _0223EAAC - ldr r0, [sp, #4] - add r1, r7, #0 - bl ov16_0223E208 - cmp r0, #0 - beq _0223EA94 - ldr r0, [sp, #0x1c] - add r1, r7, #0 - mov r2, #0x5f - add r3, sp, #0x20 - bl ov16_022523E8 - b _0223EAAC -_0223EA94: - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223EAA0 - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223EAAC -_0223EAA0: - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r1, r7, #0 - mov r2, #0x2f - bl ov16_02252A14 -_0223EAAC: - mov r0, #1 - str r0, [sp, #0x14] -_0223EAB0: - ldr r0, [sp, #0x38] - mov r1, #0x2d - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223EAE6 - ldr r0, [sp, #0x18] - mov r1, #9 - mov r2, #0 - bl sub_02074470 - cmp r0, #0x64 - bhs _0223EAE6 - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _0223EAE6 - ldr r0, [sp, #0x38] - mov r1, #0x38 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #8] -_0223EAE6: - ldr r0, [sp, #0x38] - mov r1, #0x2e - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223EB2A - ldr r0, [sp, #0x18] - mov r1, #9 - mov r2, #0 - bl sub_02074470 - cmp r0, #0x64 - blo _0223EB2A - ldr r0, [sp, #0x18] - mov r1, #9 - mov r2, #0 - bl sub_02074470 - cmp r0, #0xc8 - bhs _0223EB2A - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _0223EB2A - ldr r0, [sp, #0x38] - mov r1, #0x39 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #8] -_0223EB2A: - ldr r0, [sp, #0x38] - mov r1, #0x2f - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _0223EB60 - ldr r0, [sp, #0x18] - mov r1, #9 - mov r2, #0 - bl sub_02074470 - cmp r0, #0xc8 - blo _0223EB60 - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _0223EB60 - ldr r0, [sp, #0x38] - mov r1, #0x3a - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #8] -_0223EB60: - ldr r0, [sp, #8] - cmp r0, #0 - beq _0223EBE6 - ble _0223EBC4 - ldr r0, [sp, #0x18] - mov r1, #0x9b - mov r2, #0 - bl sub_02074470 - cmp r0, #0xb - bne _0223EB7C - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_0223EB7C: - ldr r0, [sp, #0x18] - mov r1, #0x98 - mov r2, #0 - bl sub_02074470 - add r4, r0, #0 - ldr r0, [sp, #4] - bl ov16_0223E24C - cmp r4, r0 - bne _0223EB98 - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_0223EB98: - ldr r0, [sp, #0x18] - mov r1, #6 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x20] - ldr r0, [sp, #0x38] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0x35 - bne _0223EBC4 - ldr r1, [sp, #8] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp, #8] -_0223EBC4: - ldr r0, [sp, #0x18] - ldr r2, [sp, #8] - mov r1, #9 - bl sub_0207536C - ldr r0, [sp, #0x10] - cmp r0, r6 - beq _0223EBDA - ldr r0, [sp, #0xc] - cmp r0, r6 - bne _0223EBE6 -_0223EBDA: - ldr r0, [sp, #0x1c] - ldr r3, [sp, #8] - add r1, r7, #0 - mov r2, #0x2c - bl ov16_02252A14 -_0223EBE6: - ldr r0, [sp, #0x14] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_0223E30C - - thumb_func_start ov16_0223EBEC -ov16_0223EBEC: ; 0x0223EBEC - ldr r1, _0223EBF4 ; =0x0000240C - ldr r0, [r0, r1] - bx lr - nop -_0223EBF4: .word 0x0000240C - thumb_func_end ov16_0223EBEC - - thumb_func_start ov16_0223EBF8 -ov16_0223EBF8: ; 0x0223EBF8 - ldr r1, _0223EC00 ; =0x00002410 - ldr r0, [r0, r1] - bx lr - nop -_0223EC00: .word 0x00002410 - thumb_func_end ov16_0223EBF8 - - thumb_func_start ov16_0223EC04 -ov16_0223EC04: ; 0x0223EC04 - ldr r2, _0223EC54 ; =0x00002404 - ldr r1, [r0, r2] - cmp r1, #5 - bhi _0223EC4E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223EC18: ; jump table - .short _0223EC24 - _0223EC18 - 2 ; case 0 - .short _0223EC24 - _0223EC18 - 2 ; case 1 - .short _0223EC24 - _0223EC18 - 2 ; case 2 - .short _0223EC24 - _0223EC18 - 2 ; case 3 - .short _0223EC24 - _0223EC18 - 2 ; case 4 - .short _0223EC24 - _0223EC18 - 2 ; case 5 -_0223EC24: - add r2, #0xc - ldr r1, [r0, r2] - cmp r1, #4 - bhi _0223EC50 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223EC38: ; jump table - .short _0223EC42 - _0223EC38 - 2 ; case 0 - .short _0223EC42 - _0223EC38 - 2 ; case 1 - .short _0223EC46 - _0223EC38 - 2 ; case 2 - .short _0223EC4A - _0223EC38 - 2 ; case 3 - .short _0223EC4A - _0223EC38 - 2 ; case 4 -_0223EC42: - mov r0, #0 - bx lr -_0223EC46: - mov r0, #1 - bx lr -_0223EC4A: - mov r0, #2 - bx lr -_0223EC4E: - mov r0, #0 -_0223EC50: - bx lr - nop -_0223EC54: .word 0x00002404 - thumb_func_end ov16_0223EC04 - - thumb_func_start ov16_0223EC58 -ov16_0223EC58: ; 0x0223EC58 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov16_0223E1F8 - cmp r0, #4 - bne _0223ECC0 - ldr r1, [r5, #0x2c] - mov r0, #8 - tst r0, r1 - bne _0223ECC0 - mov r0, #4 - tst r0, r1 - beq _0223EC8A - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223E258 - bl sub_020787CC - tst r0, r4 - bne _0223ECC0 - mov r0, #1 - pop {r4, r5, r6, pc} -_0223EC8A: - ldr r1, [r5, #0x30] - add r0, r5, #0 - mov r2, #0xc - mov r3, #0 - bl ov16_0225B45C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldr r1, [r5, #0x30] - add r0, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_0225B45C - cmp r0, #0xe - bne _0223ECAE - cmp r6, #0x10 - bhi _0223ECB8 -_0223ECAE: - mov r0, #0 - bl sub_020787CC - tst r0, r4 - beq _0223ECBC -_0223ECB8: - mov r0, #0 - pop {r4, r5, r6, pc} -_0223ECBC: - mov r0, #1 - pop {r4, r5, r6, pc} -_0223ECC0: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223EC58 - - thumb_func_start ov16_0223ECC4 -ov16_0223ECC4: ; 0x0223ECC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x14] - add r4, r1, #0 - add r7, r2, #0 - cmp r0, #1 - beq _0223ECE6 - cmp r0, #4 - beq _0223ECE6 - cmp r0, #5 - beq _0223ECE6 - ldr r0, [sp, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0223ECE6: - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223ED5A -_0223ECF0: - mov r0, #0 - str r0, [r4, #0] - cmp r0, #6 - bge _0223ED28 - mov r6, #0x5e - lsl r6, r6, #2 -_0223ECFC: - bl sub_020787CC - ldr r1, [r5, r6] - tst r0, r1 - beq _0223ED1E - ldr r0, [r4, #0] - bl sub_020787CC - mov r3, #0x5e - lsl r3, r3, #2 - mov r2, #0 - mvn r2, r2 - ldr r1, [r5, r3] - eor r0, r2 - and r0, r1 - str r0, [r5, r3] - b _0223ED28 -_0223ED1E: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - cmp r0, #6 - blt _0223ECFC -_0223ED28: - ldr r1, [r4, #0] - cmp r1, #6 - bge _0223ED50 - ldr r0, [r5, #4] - bl sub_0207A0FC - mov r3, #0x59 - str r7, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - add r1, r0, #0 - lsl r3, r3, #0x10 - ldr r0, [r5, #4] - mov r2, #0 - lsr r3, r3, #0x10 - bl sub_02076B94 - str r0, [sp, #4] - cmp r0, #0 - bne _0223ED5C -_0223ED50: - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223ECF0 -_0223ED5A: - ldr r0, [sp, #4] -_0223ED5C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0223ECC4 - - thumb_func_start ov16_0223ED60 -ov16_0223ED60: ; 0x0223ED60 - ldr r1, _0223ED68 ; =0x000023FC - ldrb r0, [r0, r1] - bx lr - nop -_0223ED68: .word 0x000023FC - thumb_func_end ov16_0223ED60 - - thumb_func_start ov16_0223ED6C -ov16_0223ED6C: ; 0x0223ED6C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #0 - bne _0223ED7A - bl sub_02022974 -_0223ED7A: - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #5 - mov r3, #0 - bl ov16_0225B45C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r4, pc} - thumb_func_end ov16_0223ED6C - - thumb_func_start ov16_0223ED8C -ov16_0223ED8C: ; 0x0223ED8C - ldr r1, _0223ED94 ; =0x00002414 - ldr r0, [r0, r1] - bx lr - nop -_0223ED94: .word 0x00002414 - thumb_func_end ov16_0223ED8C - - thumb_func_start ov16_0223ED98 -ov16_0223ED98: ; 0x0223ED98 - ldr r2, _0223EDA0 ; =0x00002414 - str r1, [r0, r2] - bx lr - nop -_0223EDA0: .word 0x00002414 - thumb_func_end ov16_0223ED98 - - thumb_func_start ov16_0223EDA4 -ov16_0223EDA4: ; 0x0223EDA4 - mov r1, #0x6d - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223EDA4 - - thumb_func_start ov16_0223EDAC -ov16_0223EDAC: ; 0x0223EDAC - push {r3, lr} - ldr r2, [r0, #0x2c] - mov r1, #4 - tst r1, r2 - beq _0223EDC4 - ldr r1, _0223EDDC ; =0x0000240C - ldr r2, [r0, r1] - mov r1, #0x10 - tst r1, r2 - bne _0223EDC4 - mov r0, #1 - pop {r3, pc} -_0223EDC4: - mov r1, #0x6d - lsl r1, r1, #2 - ldr r0, [r0, r1] - bl sub_02027AF8 - cmp r0, #0 - bne _0223EDD6 - mov r0, #1 - pop {r3, pc} -_0223EDD6: - mov r0, #0 - pop {r3, pc} - nop -_0223EDDC: .word 0x0000240C - thumb_func_end ov16_0223EDAC - - thumb_func_start ov16_0223EDE0 -ov16_0223EDE0: ; 0x0223EDE0 - mov r1, #0x6d - lsl r1, r1, #2 - ldr r3, _0223EDEC ; =sub_02027B50 - ldr r0, [r0, r1] - bx r3 - nop -_0223EDEC: .word sub_02027B50 - thumb_func_end ov16_0223EDE0 - - thumb_func_start ov16_0223EDF0 -ov16_0223EDF0: ; 0x0223EDF0 - push {r3, lr} - ldr r2, [r0, #0x2c] - mov r1, #4 - tst r1, r2 - beq _0223EE08 - ldr r1, _0223EE14 ; =0x0000240C - ldr r2, [r0, r1] - mov r1, #0x10 - tst r1, r2 - bne _0223EE08 - mov r0, #1 - pop {r3, pc} -_0223EE08: - mov r1, #0x6d - lsl r1, r1, #2 - ldr r0, [r0, r1] - bl sub_02027AC0 - pop {r3, pc} - ; .align 2, 0 -_0223EE14: .word 0x0000240C - thumb_func_end ov16_0223EDF0 - - thumb_func_start ov16_0223EE18 -ov16_0223EE18: ; 0x0223EE18 - mov r1, #0x6d - lsl r1, r1, #2 - ldr r3, _0223EE24 ; =sub_02027B14 - ldr r0, [r0, r1] - bx r3 - nop -_0223EE24: .word sub_02027B14 - thumb_func_end ov16_0223EE18 - - thumb_func_start ov16_0223EE28 -ov16_0223EE28: ; 0x0223EE28 - mov r1, #0x72 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223EE28 - - thumb_func_start ov16_0223EE30 -ov16_0223EE30: ; 0x0223EE30 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223EE4E - mov r3, #0x10 - tst r2, r3 - beq _0223EE56 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223EE56 -_0223EE4E: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x78] - pop {r3, r4, r5, pc} -_0223EE56: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223EE68 - lsl r0, r4, #0x1f - lsr r0, r0, #0x1d - add r0, r5, r0 - ldr r0, [r0, #0x78] - pop {r3, r4, r5, pc} -_0223EE68: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x78] - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223EE30 - - thumb_func_start ov16_0223EE70 -ov16_0223EE70: ; 0x0223EE70 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r1, #0xa9 - ldr r2, [r5, #0x2c] - lsl r1, r1, #2 - tst r1, r2 - bne _0223EF26 - mov r4, #0 - add r1, r4, #0 - bl ov16_0223DF60 - cmp r0, #0 - ble _0223EF26 - add r7, r4, #0 -_0223EE8C: - add r0, r5, #0 - mov r1, #0 - add r2, r4, #0 - bl ov16_0223DFAC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - mov r0, #0x67 - lsl r0, r0, #2 - cmp r1, r0 - bne _0223EF18 - add r0, r4, #0 - bl sub_020787CC - ldr r1, _0223EF28 ; =0x00002418 - ldrb r1, [r5, r1] - tst r0, r1 - beq _0223EF18 - add r0, r5, #0 - bl ov16_0223E22C - cmp r0, #0x17 - bhi _0223EF00 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223EED0: ; jump table - .short _0223EF04 - _0223EED0 - 2 ; case 0 - .short _0223EF04 - _0223EED0 - 2 ; case 1 - .short _0223EF00 - _0223EED0 - 2 ; case 2 - .short _0223EF00 - _0223EED0 - 2 ; case 3 - .short _0223EF04 - _0223EED0 - 2 ; case 4 - .short _0223EF04 - _0223EED0 - 2 ; case 5 - .short _0223EF00 - _0223EED0 - 2 ; case 6 - .short _0223EF00 - _0223EED0 - 2 ; case 7 - .short _0223EF00 - _0223EED0 - 2 ; case 8 - .short _0223EF0A - _0223EED0 - 2 ; case 9 - .short _0223EF00 - _0223EED0 - 2 ; case 10 - .short _0223EF0A - _0223EED0 - 2 ; case 11 - .short _0223EF0A - _0223EED0 - 2 ; case 12 - .short _0223EF0A - _0223EED0 - 2 ; case 13 - .short _0223EF0A - _0223EED0 - 2 ; case 14 - .short _0223EF0A - _0223EED0 - 2 ; case 15 - .short _0223EF0A - _0223EED0 - 2 ; case 16 - .short _0223EF04 - _0223EED0 - 2 ; case 17 - .short _0223EF0A - _0223EED0 - 2 ; case 18 - .short _0223EF0A - _0223EED0 - 2 ; case 19 - .short _0223EF0A - _0223EED0 - 2 ; case 20 - .short _0223EF0A - _0223EED0 - 2 ; case 21 - .short _0223EF0A - _0223EED0 - 2 ; case 22 - .short _0223EF04 - _0223EED0 - 2 ; case 23 -_0223EF00: - str r7, [sp] - b _0223EF0E -_0223EF04: - mov r0, #1 - str r0, [sp] - b _0223EF0E -_0223EF0A: - mov r0, #2 - str r0, [sp] -_0223EF0E: - add r0, r6, #0 - mov r1, #0x70 - add r2, sp, #0 - bl sub_02074B30 -_0223EF18: - add r0, r5, #0 - mov r1, #0 - add r4, r4, #1 - bl ov16_0223DF60 - cmp r4, r0 - blt _0223EE8C -_0223EF26: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223EF28: .word 0x00002418 - thumb_func_end ov16_0223EE70 - - thumb_func_start ov16_0223EF2C -ov16_0223EF2C: ; 0x0223EF2C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r2, #0 - add r4, r1, #0 - bl sub_020787CC - ldr r1, _0223EF44 ; =0x00002418 - add r2, r5, r1 - ldrb r1, [r2, r4] - orr r0, r1 - strb r0, [r2, r4] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223EF44: .word 0x00002418 - thumb_func_end ov16_0223EF2C - - thumb_func_start ov16_0223EF48 -ov16_0223EF48: ; 0x0223EF48 - push {r4, lr} - add r4, r0, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223EF64 - add r0, r1, #0 - bl sub_02076B10 - add r4, #0x98 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_02056A48 -_0223EF64: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0223EF48 - - thumb_func_start ov16_0223EF68 -ov16_0223EF68: ; 0x0223EF68 - push {r3, r4, lr} - sub sp, #4 - add r3, r0, #0 - mov r0, #5 - str r0, [sp] - ldr r4, _0223EF88 ; =0x00002420 - add r0, r3, #0 - ldrb r2, [r3, r4] - add r4, r4, #2 - add r0, #0x9c - ldrh r3, [r3, r4] - ldr r0, [r0, #0] - bl sub_0206D160 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223EF88: .word 0x00002420 - thumb_func_end ov16_0223EF68 - - thumb_func_start ov16_0223EF8C -ov16_0223EF8C: ; 0x0223EF8C - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - mov r1, #1 - add r4, r0, #0 - mov r0, #5 - lsl r1, r1, #0x10 - bl sub_02018144 - mov r1, #0x22 - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #5 - sub r1, #0x20 - bl sub_02018144 - mov r1, #0x89 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, r1, #4 - mov r2, #1 - ldr r0, _0223F1E4 ; =0x06010000 - ldr r1, [r4, r1] - lsl r2, r2, #0x10 - bl sub_020C4B68 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r5, [r4, r0] - ldr r0, [r4, #0x28] - mov r1, #0 - bl sub_02003164 - mov r2, #2 - add r1, r5, #0 - lsl r2, r2, #8 - bl sub_020C4B68 - mov r0, #0x19 - lsl r0, r0, #0x16 - str r0, [sp, #0x24] - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl sub_02021F98 - ldr r1, [r0, #4] - ldr r0, [sp, #0x24] - add r0, r0, r1 - str r0, [sp, #0x24] - mov r0, #0x14 - str r0, [sp, #0x28] - lsl r0, r0, #0xb - str r0, [sp, #0xc] -_0223EFF8: - mov r0, #0x10 - mov ip, r0 - lsl r0, r0, #6 - str r0, [sp, #0x14] - ldr r0, [sp, #0x28] - mov r7, #1 - sub r0, #0x14 - lsl r1, r0, #8 - ldr r0, [sp, #0x24] - add r0, r0, r1 - str r0, [sp, #0x10] -_0223F00E: - mov r0, ip - sub r0, #0x10 - ldr r1, [sp, #0x10] - lsl r3, r0, #5 - add r3, r1, r3 - ldr r5, [sp, #0xc] - ldr r1, [sp, #0x14] - mov r2, #0 - add r6, r5, r1 -_0223F020: - cmp r0, #8 - bge _0223F048 - add r1, r2, #0 - tst r1, r7 - beq _0223F03A - lsr r1, r2, #0x1f - add r1, r2, r1 - asr r1, r1, #1 - ldrb r5, [r3, r1] - mov r1, #0xf0 - and r1, r5 - asr r1, r1, #4 - b _0223F076 -_0223F03A: - lsr r1, r2, #0x1f - add r1, r2, r1 - asr r1, r1, #1 - ldrb r5, [r3, r1] - mov r1, #0xf - and r1, r5 - b _0223F076 -_0223F048: - mov r1, #1 - tst r1, r2 - beq _0223F064 - lsr r1, r2, #0x1f - add r1, r2, r1 - asr r1, r1, #1 - add r5, r3, r1 - mov r1, #7 - lsl r1, r1, #8 - ldrb r5, [r5, r1] - mov r1, #0xf0 - and r1, r5 - asr r1, r1, #4 - b _0223F076 -_0223F064: - lsr r1, r2, #0x1f - add r1, r2, r1 - asr r1, r1, #1 - add r5, r3, r1 - mov r1, #7 - lsl r1, r1, #8 - ldrb r5, [r5, r1] - mov r1, #0xf - and r1, r5 -_0223F076: - cmp r1, #0 - beq _0223F086 - mov r5, #0x22 - lsl r5, r5, #4 - ldr r5, [r4, r5] - add r1, #0x70 - add r5, r6, r5 - strb r1, [r2, r5] -_0223F086: - add r2, r2, #1 - cmp r2, #0x40 - blt _0223F020 - ldr r0, [sp, #0x14] - add r0, #0x40 - str r0, [sp, #0x14] - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #0x20 - blt _0223F00E - mov r1, #2 - ldr r0, [sp, #0xc] - lsl r1, r1, #0xa - add r0, r0, r1 - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, #0x1c - blt _0223EFF8 - mov r0, #0x19 - lsl r0, r0, #0x16 - str r0, [sp, #8] - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl sub_02021F98 - ldr r1, [r0, #4] - ldr r0, [sp, #8] - mov r7, #0x26 - add r0, r0, r1 - str r0, [sp, #8] - mov r3, #0 - mov r0, #0xf - mov r1, #0xf0 - lsl r7, r7, #0xa - mov r2, #1 -_0223F0D6: - add r5, r3, #0 - tst r5, r2 - beq _0223F0EC - lsr r5, r3, #0x1f - add r5, r3, r5 - asr r6, r5, #1 - ldr r5, [sp, #8] - ldrb r5, [r5, r6] - and r5, r1 - asr r5, r5, #4 - b _0223F0F8 -_0223F0EC: - lsr r5, r3, #0x1f - add r5, r3, r5 - asr r6, r5, #1 - ldr r5, [sp, #8] - ldrb r5, [r5, r6] - and r5, r0 -_0223F0F8: - cmp r5, #0 - beq _0223F108 - mov r6, #0x22 - lsl r6, r6, #4 - ldr r6, [r4, r6] - add r5, #0x70 - add r6, r6, r3 - strb r5, [r6, r7] -_0223F108: - mov r5, #2 - add r3, r3, #1 - lsl r5, r5, #0xa - cmp r3, r5 - blt _0223F0D6 - mov r0, #0x1c - str r0, [sp, #4] - lsl r0, r0, #0xb - str r0, [sp, #0x18] -_0223F11A: - ldr r0, [sp, #4] - mov r2, #0 - sub r0, #0x1c - lsl r1, r0, #8 - ldr r0, [sp, #8] - str r2, [sp, #0x20] - add r0, r0, r1 - str r0, [sp, #0x1c] - mov r7, #1 -_0223F12C: - asr r0, r2, #2 - lsr r0, r0, #0x1d - add r0, r2, r0 - asr r0, r0, #3 - lsl r1, r0, #0xa - ldr r0, [sp, #0x1c] - lsr r5, r2, #0x1f - add r6, r0, r1 - lsl r1, r2, #0x1d - sub r1, r1, r5 - mov r0, #0x1d - ror r1, r0 - add r0, r5, r1 - lsl r0, r0, #5 - ldr r5, [sp, #0x18] - ldr r1, [sp, #0x20] - mov r3, #0 - add r0, r6, r0 - add r1, r5, r1 -_0223F152: - add r5, r3, #0 - tst r5, r7 - beq _0223F16E - lsr r5, r3, #0x1f - add r5, r3, r5 - asr r5, r5, #1 - add r6, r0, r5 - mov r5, #1 - lsl r5, r5, #0xa - ldrb r6, [r6, r5] - mov r5, #0xf0 - and r5, r6 - asr r5, r5, #4 - b _0223F180 -_0223F16E: - lsr r5, r3, #0x1f - add r5, r3, r5 - asr r5, r5, #1 - add r6, r0, r5 - mov r5, #1 - lsl r5, r5, #0xa - ldrb r6, [r6, r5] - mov r5, #0xf - and r5, r6 -_0223F180: - cmp r5, #0 - beq _0223F190 - mov r6, #0x22 - lsl r6, r6, #4 - ldr r6, [r4, r6] - add r5, #0x70 - add r6, r1, r6 - strb r5, [r3, r6] -_0223F190: - add r3, r3, #1 - cmp r3, #0x40 - blt _0223F152 - ldr r0, [sp, #0x20] - add r2, r2, #1 - add r0, #0x40 - str r0, [sp, #0x20] - cmp r2, #0x18 - blt _0223F12C - mov r3, #2 - ldr r0, [sp, #0x18] - lsl r3, r3, #0xa - add r0, r0, r3 - str r0, [sp, #0x18] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #0x20 - blt _0223F11A - mov r0, #0 - mov r2, #0x22 - str r0, [sp] - lsl r2, r2, #4 - ldr r0, [r4, #4] - ldr r2, [r4, r2] - mov r1, #3 - lsl r3, r3, #5 - bl sub_0201958C - mov r0, #0x5f - lsl r0, r0, #2 - add r0, r4, r0 - bl ov16_02268700 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov16_02268700 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_0223F1E4: .word 0x06010000 - thumb_func_end ov16_0223EF8C - - thumb_func_start ov16_0223F1E8 -ov16_0223F1E8: ; 0x0223F1E8 - mov r1, #0x22 - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223F1E8 - - thumb_func_start ov16_0223F1F0 -ov16_0223F1F0: ; 0x0223F1F0 - mov r1, #0x89 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223F1F0 - - thumb_func_start ov16_0223F1F8 -ov16_0223F1F8: ; 0x0223F1F8 - ldr r1, _0223F200 ; =0x00002428 - ldr r0, [r0, r1] - bx lr - nop -_0223F200: .word 0x00002428 - thumb_func_end ov16_0223F1F8 - - thumb_func_start ov16_0223F204 -ov16_0223F204: ; 0x0223F204 - ldr r1, _0223F20C ; =0x00002228 - add r0, r0, r1 - bx lr - nop -_0223F20C: .word 0x00002228 - thumb_func_end ov16_0223F204 - - thumb_func_start ov16_0223F210 -ov16_0223F210: ; 0x0223F210 - ldr r1, _0223F218 ; =0x00002308 - add r0, r0, r1 - bx lr - nop -_0223F218: .word 0x00002308 - thumb_func_end ov16_0223F210 - - thumb_func_start ov16_0223F21C -ov16_0223F21C: ; 0x0223F21C - ldr r1, _0223F224 ; =0x0000242C - ldr r0, [r0, r1] - bx lr - nop -_0223F224: .word 0x0000242C - thumb_func_end ov16_0223F21C - - thumb_func_start ov16_0223F228 -ov16_0223F228: ; 0x0223F228 - ldr r1, _0223F230 ; =0x00002421 - ldrb r0, [r0, r1] - bx lr - nop -_0223F230: .word 0x00002421 - thumb_func_end ov16_0223F228 - - thumb_func_start ov16_0223F234 -ov16_0223F234: ; 0x0223F234 - ldr r2, _0223F23C ; =0x00002421 - strb r1, [r0, r2] - bx lr - nop -_0223F23C: .word 0x00002421 - thumb_func_end ov16_0223F234 - - thumb_func_start ov16_0223F240 -ov16_0223F240: ; 0x0223F240 - ldr r1, _0223F248 ; =0x00002430 - ldr r0, [r0, r1] - bx lr - nop -_0223F248: .word 0x00002430 - thumb_func_end ov16_0223F240 - - thumb_func_start ov16_0223F24C -ov16_0223F24C: ; 0x0223F24C - push {r3, lr} - ldr r2, _0223F264 ; =0x0000240C - ldr r3, [r0, r2] - mov r2, #0x10 - tst r2, r3 - bne _0223F262 - mov r2, #0x87 - lsl r2, r2, #2 - ldr r0, [r0, r2] - bl sub_0202CF28 -_0223F262: - pop {r3, pc} - ; .align 2, 0 -_0223F264: .word 0x0000240C - thumb_func_end ov16_0223F24C - - thumb_func_start ov16_0223F268 -ov16_0223F268: ; 0x0223F268 - push {r3, lr} - ldr r1, _0223F284 ; =0x0000240C - ldr r2, [r0, r1] - mov r1, #0x10 - tst r1, r2 - bne _0223F280 - mov r1, #0x87 - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0x16 - bl sub_0202CFEC -_0223F280: - pop {r3, pc} - nop -_0223F284: .word 0x0000240C - thumb_func_end ov16_0223F268 - - thumb_func_start ov16_0223F288 -ov16_0223F288: ; 0x0223F288 - mov r2, #0x91 - lsl r2, r2, #6 - str r1, [r0, r2] - bx lr - thumb_func_end ov16_0223F288 - - thumb_func_start ov16_0223F290 -ov16_0223F290: ; 0x0223F290 - ldr r2, _0223F298 ; =0x00002444 - strb r1, [r0, r2] - bx lr - nop -_0223F298: .word 0x00002444 - thumb_func_end ov16_0223F290 - - thumb_func_start ov16_0223F29C -ov16_0223F29C: ; 0x0223F29C - mov r1, #0x6f - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov16_0223F29C - - thumb_func_start ov16_0223F2A4 -ov16_0223F2A4: ; 0x0223F2A4 - mov r2, #0x6f - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov16_0223F2A4 - - thumb_func_start ov16_0223F2AC -ov16_0223F2AC: ; 0x0223F2AC - mov r2, #0x1d - lsl r2, r2, #4 - add r2, r0, r2 - lsl r0, r1, #4 - add r0, r2, r0 - bx lr - thumb_func_end ov16_0223F2AC - - thumb_func_start ov16_0223F2B8 -ov16_0223F2B8: ; 0x0223F2B8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #4 - blt _0223F2C6 - bl sub_02022974 -_0223F2C6: - lsl r0, r5, #4 - ldr r0, [r4, r0] - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223F2B8 - - thumb_func_start ov16_0223F2CC -ov16_0223F2CC: ; 0x0223F2CC - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #4 - blt _0223F2DC - bl sub_02022974 -_0223F2DC: - lsl r0, r4, #4 - add r0, r5, r0 - str r6, [r0, #4] - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223F2CC - - thumb_func_start ov16_0223F2E4 -ov16_0223F2E4: ; 0x0223F2E4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #4 - blt _0223F2F4 - bl sub_02022974 -_0223F2F4: - lsl r0, r4, #4 - add r0, r5, r0 - str r6, [r0, #8] - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223F2E4 - - thumb_func_start ov16_0223F2FC -ov16_0223F2FC: ; 0x0223F2FC - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #4 - blt _0223F30C - bl sub_02022974 -_0223F30C: - lsl r0, r4, #4 - add r0, r5, r0 - str r6, [r0, #0xc] - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223F2FC - - thumb_func_start ov16_0223F314 -ov16_0223F314: ; 0x0223F314 - ldr r2, _0223F31C ; =0x000023FD - strb r1, [r0, r2] - bx lr - nop -_0223F31C: .word 0x000023FD - thumb_func_end ov16_0223F314 - - thumb_func_start ov16_0223F320 -ov16_0223F320: ; 0x0223F320 - ldr r2, _0223F328 ; =0x000023F4 - str r1, [r0, r2] - bx lr - nop -_0223F328: .word 0x000023F4 - thumb_func_end ov16_0223F320 - - thumb_func_start ov16_0223F32C -ov16_0223F32C: ; 0x0223F32C - ldr r2, _0223F334 ; =0x000023F8 - str r1, [r0, r2] - bx lr - nop -_0223F334: .word 0x000023F8 - thumb_func_end ov16_0223F32C - - thumb_func_start ov16_0223F338 -ov16_0223F338: ; 0x0223F338 - ldr r2, _0223F340 ; =0x000023F4 - ldr r0, [r0, r2] - strb r1, [r0] - bx lr - ; .align 2, 0 -_0223F340: .word 0x000023F4 - thumb_func_end ov16_0223F338 - - thumb_func_start ov16_0223F344 -ov16_0223F344: ; 0x0223F344 - ldr r2, _0223F34C ; =0x000023F8 - ldr r0, [r0, r2] - strb r1, [r0] - bx lr - ; .align 2, 0 -_0223F34C: .word 0x000023F8 - thumb_func_end ov16_0223F344 - - thumb_func_start ov16_0223F350 -ov16_0223F350: ; 0x0223F350 - ldr r2, _0223F358 ; =0x000023FE - strb r1, [r0, r2] - bx lr - nop -_0223F358: .word 0x000023FE - thumb_func_end ov16_0223F350 - - thumb_func_start ov16_0223F35C -ov16_0223F35C: ; 0x0223F35C - lsl r1, r1, #2 - add r0, r0, r1 - ldr r3, _0223F368 ; =ov16_02263B08 - ldr r0, [r0, #0x34] - bx r3 - nop -_0223F368: .word ov16_02263B08 - thumb_func_end ov16_0223F35C - - thumb_func_start ov16_0223F36C -ov16_0223F36C: ; 0x0223F36C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - mov r7, #0 - cmp r0, #0 - ble _0223F3B8 - add r5, r6, #0 -_0223F37A: - ldr r0, [r5, #0x34] - bl ov16_02263B08 - add r4, r0, #0 - str r6, [r4, #0xc] - ldr r0, [r5, #0x34] - bl ov16_02263AE4 - str r0, [sp] - add r0, r6, #0 - bl ov16_0223DF0C - add r1, r0, #0 - ldr r0, [sp] - bl ov16_0226825C - add r1, r4, #0 - add r1, #0x25 - strb r0, [r1] - add r0, r4, #0 - bl ov16_022672C4 - add r0, r4, #0 - mov r1, #0 - bl ov16_02267620 - ldr r0, [r6, #0x44] - add r7, r7, #1 - add r5, r5, #4 - cmp r7, r0 - blt _0223F37A -_0223F3B8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223F36C - - thumb_func_start ov16_0223F3BC -ov16_0223F3BC: ; 0x0223F3BC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - mov r4, #0 - cmp r0, #0 - ble _0223F3E8 - add r5, r6, #0 - mov r7, #1 -_0223F3CC: - ldr r0, [r5, #0x34] - bl ov16_02263B08 - ldr r1, [r0, #0x28] - cmp r1, #0 - beq _0223F3DE - add r1, r7, #0 - bl ov16_02267620 -_0223F3DE: - ldr r0, [r6, #0x44] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0223F3CC -_0223F3E8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223F3BC - - thumb_func_start ov16_0223F3EC -ov16_0223F3EC: ; 0x0223F3EC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - mov r4, #0 - cmp r0, #0 - ble _0223F412 - add r5, r6, #0 - add r7, r4, #0 -_0223F3FC: - ldr r0, [r5, #0x34] - bl ov16_02263B08 - add r1, r7, #0 - bl ov16_02267620 - ldr r0, [r6, #0x44] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0223F3FC -_0223F412: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0223F3EC - - thumb_func_start ov16_0223F414 -ov16_0223F414: ; 0x0223F414 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - mov r4, #0 - cmp r0, #0 - ble _0223F436 - add r5, r6, #0 -_0223F422: - ldr r0, [r5, #0x34] - bl ov16_02263B08 - bl ov16_02267360 - ldr r0, [r6, #0x44] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0223F422 -_0223F436: - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223F414 - - thumb_func_start ov16_0223F438 -ov16_0223F438: ; 0x0223F438 - ldr r1, _0223F440 ; =0x00002420 - ldrb r0, [r0, r1] - bx lr - nop -_0223F440: .word 0x00002420 - thumb_func_end ov16_0223F438 - - thumb_func_start ov16_0223F444 -ov16_0223F444: ; 0x0223F444 - ldr r2, _0223F44C ; =0x00002420 - strb r1, [r0, r2] - bx lr - nop -_0223F44C: .word 0x00002420 - thumb_func_end ov16_0223F444 - - thumb_func_start ov16_0223F450 -ov16_0223F450: ; 0x0223F450 - ldr r1, _0223F45C ; =0x000023FF - ldrb r0, [r0, r1] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1e - bx lr - nop -_0223F45C: .word 0x000023FF - thumb_func_end ov16_0223F450 - - thumb_func_start ov16_0223F460 -ov16_0223F460: ; 0x0223F460 - push {r3, r4} - ldr r3, _0223F478 ; =0x000023FF - lsl r1, r1, #0x1e - ldrb r4, [r0, r3] - mov r2, #0x18 - lsr r1, r1, #0x1b - bic r4, r2 - orr r1, r4 - strb r1, [r0, r3] - pop {r3, r4} - bx lr - nop -_0223F478: .word 0x000023FF - thumb_func_end ov16_0223F460 - - thumb_func_start ov16_0223F47C -ov16_0223F47C: ; 0x0223F47C - ldr r1, _0223F488 ; =0x000023FF - ldrb r0, [r0, r1] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1d - bx lr - nop -_0223F488: .word 0x000023FF - thumb_func_end ov16_0223F47C - - thumb_func_start ov16_0223F48C -ov16_0223F48C: ; 0x0223F48C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0xf - blo _0223F49A - bl sub_02022974 -_0223F49A: - ldr r1, _0223F4AC ; =0x000023FF - mov r0, #0xe0 - ldrb r2, [r5, r1] - bic r2, r0 - lsl r0, r4, #0x1d - lsr r0, r0, #0x18 - orr r0, r2 - strb r0, [r5, r1] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223F4AC: .word 0x000023FF - thumb_func_end ov16_0223F48C - - thumb_func_start ov16_0223F4B0 -ov16_0223F4B0: ; 0x0223F4B0 - ldr r2, _0223F4B8 ; =0x0000243C - str r1, [r0, r2] - bx lr - nop -_0223F4B8: .word 0x0000243C - thumb_func_end ov16_0223F4B0 - - thumb_func_start ov16_0223F4BC -ov16_0223F4BC: ; 0x0223F4BC - push {r3, r4} - ldr r2, _0223F4DC ; =0x00002448 - ldr r1, _0223F4E0 ; =0x41C64E6D - ldr r3, [r0, r2] - add r4, r3, #0 - mul r4, r1 - ldr r1, _0223F4E4 ; =0x00006073 - add r1, r4, r1 - str r1, [r0, r2] - ldr r0, [r0, r2] - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - pop {r3, r4} - bx lr - nop -_0223F4DC: .word 0x00002448 -_0223F4E0: .word 0x41C64E6D -_0223F4E4: .word 0x00006073 - thumb_func_end ov16_0223F4BC - - thumb_func_start ov16_0223F4E8 -ov16_0223F4E8: ; 0x0223F4E8 - ldr r1, _0223F4F0 ; =0x0000244C - ldr r0, [r0, r1] - bx lr - nop -_0223F4F0: .word 0x0000244C - thumb_func_end ov16_0223F4E8 - - thumb_func_start ov16_0223F4F4 -ov16_0223F4F4: ; 0x0223F4F4 - ldr r2, _0223F4FC ; =0x0000244C - str r1, [r0, r2] - bx lr - nop -_0223F4FC: .word 0x0000244C - thumb_func_end ov16_0223F4F4 - - thumb_func_start ov16_0223F500 -ov16_0223F500: ; 0x0223F500 - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r1, _0223F52C ; =0x0000240C - mov r3, #0x10 - ldr r4, [r0, r1] - tst r4, r3 - bne _0223F528 - add r1, #0x54 - add r4, r0, r1 - lsl r5, r6, #1 - ldrh r1, [r4, r5] - lsl r0, r3, #6 - cmp r1, r0 - bhs _0223F528 - add r0, r6, #0 - bl sub_0202F868 - ldrh r0, [r4, r5] - add r0, r0, #1 - strh r0, [r4, r5] -_0223F528: - pop {r4, r5, r6, pc} - nop -_0223F52C: .word 0x0000240C - thumb_func_end ov16_0223F500 - - thumb_func_start ov16_0223F530 -ov16_0223F530: ; 0x0223F530 - push {r3, r4, r5, r6, r7, lr} - str r2, [sp] - add r3, r1, #0 - ldr r1, [sp] - mov r2, #0xff - strb r2, [r1] - ldr r1, _0223F584 ; =0x0000240C - mov r6, #0x10 - ldr r2, [r0, r1] - and r2, r6 - beq _0223F568 - add r1, #0x54 - lsl r5, r3, #1 - add r4, r0, r1 - ldrh r1, [r4, r5] - lsl r6, r6, #6 - cmp r1, r6 - bhs _0223F568 - add r0, r3, #0 - bl sub_0202F884 - ldr r1, [sp] - mov r7, #0 - strb r0, [r1] - ldrh r0, [r4, r5] - add r0, r0, #1 - strh r0, [r4, r5] - b _0223F57E -_0223F568: - cmp r2, #0 - beq _0223F57E - lsl r1, r3, #1 - add r1, r0, r1 - ldr r0, _0223F588 ; =0x00002460 - ldrh r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0xa - cmp r1, r0 - blo _0223F57E - mov r7, #1 -_0223F57E: - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F584: .word 0x0000240C -_0223F588: .word 0x00002460 - thumb_func_end ov16_0223F530 - - thumb_func_start ov16_0223F58C -ov16_0223F58C: ; 0x0223F58C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - mov r6, #0 - ldr r0, [r0, #0x44] - add r7, r6, #0 - str r1, [sp, #4] - cmp r0, #0 - ble _0223F620 -_0223F59E: - ldr r0, [sp] - lsl r1, r7, #1 - add r5, r0, r1 - ldr r0, _0223F630 ; =0x00002460 - add r1, r0, #0 - sub r1, #0x10 - ldrh r2, [r5, r0] - ldrh r1, [r5, r1] - cmp r2, r1 - beq _0223F612 - add r1, r6, #1 - lsl r1, r1, #0x18 - lsr r2, r1, #0x18 - ldr r1, [sp, #4] - add r3, r0, #0 - strb r7, [r1, r6] - add r1, r2, #1 - lsl r1, r1, #0x18 - sub r3, #0x10 - lsr r6, r1, #0x18 - ldrh r1, [r5, r0] - ldrh r3, [r5, r3] - mov r4, #0 - sub r3, r1, r3 - ldr r1, [sp, #4] - strb r3, [r1, r2] - ldrh r1, [r5, r0] - sub r0, #0x10 - ldrh r0, [r5, r0] - sub r0, r1, r0 - cmp r0, #0 - ble _0223F60A -_0223F5DE: - ldr r1, _0223F634 ; =0x00002450 - add r0, r7, #0 - ldrh r1, [r5, r1] - add r1, r4, r1 - bl sub_0202F884 - add r2, r6, #1 - lsl r2, r2, #0x18 - add r1, r6, #0 - lsr r6, r2, #0x18 - ldr r2, [sp, #4] - strb r0, [r2, r1] - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - ldr r0, _0223F630 ; =0x00002460 - ldrh r1, [r5, r0] - sub r0, #0x10 - ldrh r0, [r5, r0] - sub r0, r1, r0 - cmp r4, r0 - blt _0223F5DE -_0223F60A: - ldr r0, _0223F630 ; =0x00002460 - ldrh r1, [r5, r0] - sub r0, #0x10 - strh r1, [r5, r0] -_0223F612: - add r0, r7, #1 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, [sp] - ldr r0, [r0, #0x44] - cmp r7, r0 - blt _0223F59E -_0223F620: - cmp r6, #0x1c - bls _0223F628 - bl sub_02022974 -_0223F628: - add r0, r6, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F630: .word 0x00002460 -_0223F634: .word 0x00002450 - thumb_func_end ov16_0223F58C - - thumb_func_start ov16_0223F638 -ov16_0223F638: ; 0x0223F638 - push {r0, r1, r2, r3} - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - mov r1, #0 - add r0, sp, #8 - strb r1, [r0] - ldr r0, [sp] - add r6, r2, #0 - ldr r1, [r0, #0x2c] - mov r0, #4 - tst r0, r1 - beq _0223F6C2 - ldr r1, _0223F6CC ; =0x000023FC - ldr r0, [sp] - ldrb r0, [r0, r1] - cmp r0, #0 - bne _0223F6C2 - add r0, sp, #0x20 - ldrh r0, [r0, #4] - cmp r0, #0 - beq _0223F6C2 -_0223F664: - add r0, r6, #0 - add r1, sp, #8 - add r2, sp, #0x24 - bl ov16_0223F6D4 - add r5, r0, #0 - add r0, r6, #0 - add r1, sp, #8 - add r2, sp, #0x24 - bl ov16_0223F6D4 - add r7, r0, #0 - mov r4, #0 - cmp r7, #0 - ble _0223F6AA - ldr r0, [sp] - lsl r1, r5, #1 - add r0, r0, r1 - str r0, [sp, #4] -_0223F68A: - add r0, r6, #0 - add r1, sp, #8 - add r2, sp, #0x24 - bl ov16_0223F6D4 - add r2, r0, #0 - ldr r3, [sp, #4] - ldr r1, _0223F6D0 ; =0x00002458 - add r0, r5, #0 - ldrh r1, [r3, r1] - add r1, r4, r1 - bl sub_0202F868 - add r4, r4, #1 - cmp r4, r7 - blt _0223F68A -_0223F6AA: - ldr r0, [sp] - lsl r1, r5, #1 - add r2, r0, r1 - ldr r0, _0223F6D0 ; =0x00002458 - ldrh r0, [r2, r0] - add r1, r0, r7 - ldr r0, _0223F6D0 ; =0x00002458 - strh r1, [r2, r0] - add r0, sp, #0x20 - ldrh r0, [r0, #4] - cmp r0, #0 - bne _0223F664 -_0223F6C2: - add sp, #0xc - pop {r4, r5, r6, r7} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 -_0223F6CC: .word 0x000023FC -_0223F6D0: .word 0x00002458 - thumb_func_end ov16_0223F638 - - thumb_func_start ov16_0223F6D4 -ov16_0223F6D4: ; 0x0223F6D4 - ldrh r3, [r2] - sub r3, r3, #1 - strh r3, [r2] - ldrb r3, [r1] - add r2, r3, #1 - strb r2, [r1] - ldrb r0, [r0, r3] - bx lr - thumb_func_end ov16_0223F6D4 - - thumb_func_start ov16_0223F6E4 -ov16_0223F6E4: ; 0x0223F6E4 - ldr r1, _0223F6EC ; =0x00002446 - ldrh r0, [r0, r1] - bx lr - nop -_0223F6EC: .word 0x00002446 - thumb_func_end ov16_0223F6E4 - - thumb_func_start ov16_0223F6F0 -ov16_0223F6F0: ; 0x0223F6F0 - lsl r1, r1, #2 - add r1, r0, r1 - ldr r0, _0223F6FC ; =0x00002468 - ldr r0, [r1, r0] - bx lr - nop -_0223F6FC: .word 0x00002468 - thumb_func_end ov16_0223F6F0 - - thumb_func_start ov16_0223F700 -ov16_0223F700: ; 0x0223F700 - mov r3, #0x34 - mul r3, r1 - add r1, r0, r3 - lsl r0, r2, #1 - add r0, r1, r0 - add r0, #0xb0 - ldrh r0, [r0] - bx lr - thumb_func_end ov16_0223F700 - - thumb_func_start ov16_0223F710 -ov16_0223F710: ; 0x0223F710 - ldr r1, _0223F71C ; =0x00002478 - ldr r0, [r0, r1] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bx lr - nop -_0223F71C: .word 0x00002478 - thumb_func_end ov16_0223F710 - - thumb_func_start ov16_0223F720 -ov16_0223F720: ; 0x0223F720 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, _0223F79C ; =0x0000240C - add r5, r0, #0 - ldr r3, [r5, r1] - mov r2, #0x10 - tst r2, r3 - beq _0223F796 - add r1, #0x6c - ldr r1, [r5, r1] - lsl r1, r1, #0x1f - lsr r1, r1, #0x1f - bne _0223F796 - ldr r1, [r5, #0x30] - mov r2, #0xd - mov r3, #0 - bl ov16_0225B45C - cmp r0, #0x2b - beq _0223F796 - ldr r1, [r5, #0x30] - add r0, r5, #0 - mov r2, #0xe - mov r3, #0 - bl ov16_0225B45C - cmp r0, #0x2b - beq _0223F796 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov16_0226CEB0 - mov r1, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - bl sub_0200569C - mov r0, #0 - bl sub_0200500C - ldr r1, _0223F7A0 ; =0x00002478 - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r5, r1] -_0223F796: - add sp, #0xc - pop {r4, r5, pc} - nop -_0223F79C: .word 0x0000240C -_0223F7A0: .word 0x00002478 - thumb_func_end ov16_0223F720 - - thumb_func_start ov16_0223F7A4 -ov16_0223F7A4: ; 0x0223F7A4 - push {r4, lr} - ldr r1, _0223F7E4 ; =0x0000240C - add r4, r0, #0 - ldr r3, [r4, r1] - mov r2, #0x10 - tst r2, r3 - beq _0223F7DA - add r1, #0x6c - ldr r1, [r4, r1] - lsl r1, r1, #0x1f - lsr r1, r1, #0x1f - bne _0223F7DA - ldr r1, [r4, #0x30] - mov r2, #0xd - mov r3, #0 - bl ov16_0225B45C - cmp r0, #0x2b - beq _0223F7DA - ldr r1, [r4, #0x30] - add r0, r4, #0 - mov r2, #0xe - mov r3, #0 - bl ov16_0225B45C - cmp r0, #0x2b - bne _0223F7DE -_0223F7DA: - mov r0, #0 - pop {r4, pc} -_0223F7DE: - mov r0, #1 - pop {r4, pc} - nop -_0223F7E4: .word 0x0000240C - thumb_func_end ov16_0223F7A4 - - thumb_func_start ov16_0223F7E8 -ov16_0223F7E8: ; 0x0223F7E8 - push {r4, lr} - ldr r1, _0223F808 ; =0x0000240C - add r4, r0, #0 - ldr r3, [r4, r1] - mov r2, #0x10 - tst r2, r3 - beq _0223F806 - add r1, #0x70 - ldr r1, [r4, r1] - cmp r1, #0 - bne _0223F806 - bl ov16_0226E148 - ldr r1, _0223F80C ; =0x0000247C - str r0, [r4, r1] -_0223F806: - pop {r4, pc} - ; .align 2, 0 -_0223F808: .word 0x0000240C -_0223F80C: .word 0x0000247C - thumb_func_end ov16_0223F7E8 - - thumb_func_start ov16_0223F810 -ov16_0223F810: ; 0x0223F810 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r2, [r5, #0x2c] - mov r3, #8 - add r4, r1, #0 - tst r3, r2 - bne _0223F82E - mov r3, #0x10 - tst r2, r3 - beq _0223F838 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _0223F838 -_0223F82E: - mov r0, #0x92 - add r1, r5, r4 - lsl r0, r0, #6 - ldrb r0, [r1, r0] - pop {r3, r4, r5, pc} -_0223F838: - ldr r1, [r5, #0x2c] - mov r0, #2 - tst r0, r1 - beq _0223F84E - mov r0, #1 - and r0, r4 - add r1, r5, r0 - mov r0, #0x92 - lsl r0, r0, #6 - ldrb r0, [r1, r0] - pop {r3, r4, r5, pc} -_0223F84E: - mov r0, #0x92 - add r1, r5, r4 - lsl r0, r0, #6 - ldrb r0, [r1, r0] - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223F810 - - thumb_func_start ov16_0223F858 -ov16_0223F858: ; 0x0223F858 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - add r7, r1, #0 - mov r4, #0 - cmp r0, #0 - ble _0223F87A - add r5, r6, #0 -_0223F868: - ldr r0, [r5, #0x34] - bl ov16_02263AE4 - strb r4, [r7, r0] - ldr r0, [r6, #0x44] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0223F868 -_0223F87A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0223F858 - - thumb_func_start ov16_0223F87C -ov16_0223F87C: ; 0x0223F87C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - mov r1, #0 - mov r0, #0xff -_0223F886: - strb r0, [r6, r1] - add r1, r1, #1 - cmp r1, #4 - blt _0223F886 - ldr r0, [r7, #0x44] - mov r5, #0 - cmp r0, #0 - ble _0223F8AA - add r4, r7, #0 -_0223F898: - ldr r0, [r4, #0x34] - bl ov16_02263AE4 - strb r0, [r6, r5] - ldr r0, [r7, #0x44] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, r0 - blt _0223F898 -_0223F8AA: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0223F87C - - thumb_func_start ov16_0223F8AC -ov16_0223F8AC: ; 0x0223F8AC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0 - add r6, r1, #0 - add r5, r0, #0 -_0223F8B6: - add r0, r0, #1 - stmia r1!, {r5} - cmp r0, #4 - blt _0223F8B6 - ldr r0, [r7, #0x44] - cmp r0, #0 - ble _0223F8D8 - add r4, r7, #0 -_0223F8C6: - ldr r0, [r4, #0x34] - bl ov16_02263AFC - stmia r6!, {r0} - ldr r0, [r7, #0x44] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, r0 - blt _0223F8C6 -_0223F8D8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0223F8AC - - thumb_func_start ov16_0223F8DC -ov16_0223F8DC: ; 0x0223F8DC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x44] - add r7, r1, #0 - mov r4, #0 - cmp r0, #0 - ble _0223F902 - add r5, r6, #0 -_0223F8EC: - ldr r0, [r5, #0x34] - bl ov16_02263B08 - add r1, r7, #0 - bl ov16_022675D8 - ldr r0, [r6, #0x44] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0223F8EC -_0223F902: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0223F8DC - - thumb_func_start ov16_0223F904 -ov16_0223F904: ; 0x0223F904 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02025F58 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, r5, #0 - bl sub_02077550 - ldr r1, _0223F934 ; =0x0226E564 - lsl r0, r0, #2 - ldrb r1, [r1, r4] - add r4, r1, #0 - mul r4, r0 - add r0, r6, #0 - bl sub_02025F74 - cmp r4, r0 - bls _0223F930 - add r4, r0, #0 -_0223F930: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223F934: .word 0x0226E564 - thumb_func_end ov16_0223F904 - - thumb_func_start ov16_0223F938 -ov16_0223F938: ; 0x0223F938 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - lsl r0, r6, #2 - add r0, r5, r0 - ldr r0, [r0, #0x34] - bl ov16_02263AE4 - add r4, r0, #0 - ldr r1, [r5, #0x30] - add r0, r5, #0 - mov r2, #2 - add r3, r6, #0 - bl ov16_0225B45C - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223DFAC - add r6, r0, #0 - ldr r0, [r5, #0x2c] - mov r1, #0x84 - tst r1, r0 - bne _0223F97E - mov r1, #1 - tst r1, r4 - bne _0223F976 - sub r0, #0x4a - cmp r0, #1 - bhi _0223F97E -_0223F976: - ldr r0, [r5, #0x60] - add r1, r6, #0 - bl sub_020272A4 -_0223F97E: - mov r0, #1 - tst r0, r4 - bne _0223F99E - add r0, r6, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - mov r1, #0x67 - lsl r1, r1, #2 - cmp r0, r1 - bne _0223F99E - ldr r0, [r5, #0x60] - add r1, r6, #0 - bl sub_0202736C -_0223F99E: - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223F938 - - thumb_func_start ov16_0223F9A0 -ov16_0223F9A0: ; 0x0223F9A0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x34] - bl ov16_02263AE4 - ldr r2, [r5, #0x2c] - mov r1, #0x84 - tst r1, r2 - bne _0223F9DC - mov r1, #1 - tst r0, r1 - beq _0223F9DC - ldr r1, [r5, #0x30] - add r0, r5, #0 - mov r2, #2 - add r3, r4, #0 - bl ov16_0225B45C - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223DFAC - add r1, r0, #0 - ldr r0, [r5, #0x60] - bl sub_0202736C -_0223F9DC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0223F9A0 - - thumb_func_start ov16_0223F9E0 -ov16_0223F9E0: ; 0x0223F9E0 - ldr r3, _0223F9EC ; =sub_02026F9C - lsl r1, r1, #0x10 - ldr r0, [r0, #0x60] - lsr r1, r1, #0x10 - bx r3 - nop -_0223F9EC: .word sub_02026F9C - thumb_func_end ov16_0223F9E0 - - thumb_func_start ov16_0223F9F0 -ov16_0223F9F0: ; 0x0223F9F0 - ldr r0, _0223F9F8 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - bx lr - ; .align 2, 0 -_0223F9F8: .word 0x04000050 - thumb_func_end ov16_0223F9F0 - - thumb_func_start ov16_0223F9FC -ov16_0223F9FC: ; 0x0223F9FC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r4, r0, #0 - mov r1, #0 - str r2, [sp, #0xc] - add r7, r3, #0 - bl ov16_0223DF04 - add r6, r0, #0 - ldr r1, [r4, #0x2c] - mov r0, #0x80 - tst r0, r1 - beq _0223FAE0 - ldr r0, _0223FB14 ; =0x00002710 - cmp r5, r0 - bne _0223FA6E - cmp r7, #0x64 - bne _0223FA34 - ldr r0, [sp, #0xc] - mov r1, #0x34 - add r4, #0xd0 - mul r1, r0 - add r0, r4, r1 - mov r1, #5 - bl sub_02014B34 - b _0223FA44 -_0223FA34: - ldr r0, [sp, #0xc] - mov r1, #0x34 - add r4, #0xd8 - mul r1, r0 - add r0, r4, r1 - mov r1, #5 - bl sub_02014B34 -_0223FA44: - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - ldr r0, [sp, #0x28] - str r3, [sp] - str r0, [sp, #4] - ldr r0, _0223FB18 ; =ov16_022405A4 - mov r1, #1 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0201D738 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020237BC - b _0223FB0C -_0223FA6E: - cmp r7, #0x64 - bne _0223FA7A - lsl r0, r5, #1 - add r0, r5, r0 - add r7, r0, #1 - b _0223FA80 -_0223FA7A: - lsl r0, r5, #1 - add r0, r5, r0 - add r7, r0, #2 -_0223FA80: - mov r5, #0 -_0223FA82: - ldr r0, [r4, #0x48] - bl sub_02025FCC - cmp r0, #0 - beq _0223FA94 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #4 - blt _0223FA82 -_0223FA94: - cmp r5, #4 - bne _0223FA9C - ldr r2, _0223FB1C ; =0x00000266 - b _0223FA9E -_0223FA9C: - ldr r2, _0223FB20 ; =0x00000265 -_0223FA9E: - mov r0, #0 - mov r1, #0x1a - mov r3, #5 - bl sub_0200B144 - add r1, r7, #0 - str r0, [sp, #0x10] - bl sub_0200B1EC - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - ldr r0, [sp, #0x28] - str r3, [sp] - str r0, [sp, #4] - ldr r0, _0223FB18 ; =ov16_022405A4 - mov r1, #1 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0201D738 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x10] - bl sub_0200B190 - b _0223FB0C -_0223FAE0: - ldr r2, [r4, #0x18] - add r0, r5, #0 - add r1, r7, #0 - mov r3, #5 - bl sub_020792F8 - add r0, r6, #0 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - ldr r0, [sp, #0x28] - str r3, [sp] - str r0, [sp, #4] - ldr r0, _0223FB18 ; =ov16_022405A4 - mov r1, #1 - str r0, [sp, #8] - ldr r2, [r4, #0x18] - add r0, r6, #0 - bl sub_0201D738 - add r5, r0, #0 -_0223FB0C: - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FB14: .word 0x00002710 -_0223FB18: .word ov16_022405A4 -_0223FB1C: .word 0x00000266 -_0223FB20: .word 0x00000265 - thumb_func_end ov16_0223F9FC - - thumb_func_start ov16_0223FB24 -ov16_0223FB24: ; 0x0223FB24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp, #0xc] - add r5, r0, #0 - add r4, r2, #0 - mov r1, #0 - add r6, r3, #0 - bl ov16_0223DF04 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223FBE8 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223FDE4 - ldr r1, [sp, #0xc] - add r0, r5, #0 - add r2, r4, #0 - bl ov16_02240584 - add r0, r7, #0 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - ldr r0, _0223FB74 ; =ov16_022405A4 - str r6, [sp, #4] - str r0, [sp, #8] - ldr r2, [r5, #0x18] - add r0, r7, #0 - mov r1, #1 - bl sub_0201D738 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FB74: .word ov16_022405A4 - thumb_func_end ov16_0223FB24 - - thumb_func_start ov16_0223FB78 -ov16_0223FB78: ; 0x0223FB78 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r3, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r7, #0 - add r6, r2, #0 - bl ov16_0223FBE8 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_0223FDE4 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_02240584 - ldr r1, [sp, #0x28] - mov r0, #1 - tst r0, r1 - beq _0223FBAC - add r0, r4, #0 - mov r1, #0xff - bl sub_0201ADA4 -_0223FBAC: - ldr r1, [sp, #0x28] - mov r0, #2 - tst r0, r1 - beq _0223FBC4 - mov r0, #0 - ldr r1, [r5, #0x18] - add r2, r0, #0 - bl sub_02002D7C - ldr r1, [sp, #0x2c] - sub r3, r1, r0 - b _0223FBC6 -_0223FBC4: - mov r3, #0 -_0223FBC6: - ldr r0, [sp, #0x24] - mov r1, #0 - str r0, [sp] - ldr r0, [sp, #0x30] - str r0, [sp, #4] - ldr r0, _0223FBE4 ; =ov16_022405A4 - str r0, [sp, #8] - add r0, r4, #0 - ldr r4, [sp, #0x20] - ldr r2, [r5, #0x18] - add r3, r4, r3 - bl sub_0201D738 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FBE4: .word ov16_022405A4 - thumb_func_end ov16_0223FB78 - - thumb_func_start ov16_0223FBE8 -ov16_0223FBE8: ; 0x0223FBE8 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - bl ov16_0223DF0C - add r5, r0, #0 - ldrb r0, [r4, #1] - mov r1, #0x80 - tst r1, r0 - bne _0223FC0E - mov r1, #0x40 - tst r1, r0 - beq _0223FC18 - ldr r1, [r4, #0x20] - add r0, r6, #0 - bl ov16_0223E208 - cmp r0, #0 - bne _0223FC10 -_0223FC0E: - b _0223FDE2 -_0223FC10: - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FC18: - mov r1, #0x3f - and r0, r1 - cmp r0, #0x3c - bls _0223FC22 - b _0223FDDE -_0223FC22: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223FC2E: ; jump table - .short _0223FDE2 - _0223FC2E - 2 ; case 0 - .short _0223FCA8 - _0223FC2E - 2 ; case 1 - .short _0223FCC0 - _0223FC2E - 2 ; case 2 - .short _0223FDE2 - _0223FC2E - 2 ; case 3 - .short _0223FDE2 - _0223FC2E - 2 ; case 4 - .short _0223FDE2 - _0223FC2E - 2 ; case 5 - .short _0223FDE2 - _0223FC2E - 2 ; case 6 - .short _0223FDE2 - _0223FC2E - 2 ; case 7 - .short _0223FDE2 - _0223FC2E - 2 ; case 8 - .short _0223FD22 - _0223FC2E - 2 ; case 9 - .short _0223FCC0 - _0223FC2E - 2 ; case 10 - .short _0223FCC0 - _0223FC2E - 2 ; case 11 - .short _0223FCC0 - _0223FC2E - 2 ; case 12 - .short _0223FCC0 - _0223FC2E - 2 ; case 13 - .short _0223FCC0 - _0223FC2E - 2 ; case 14 - .short _0223FCC0 - _0223FC2E - 2 ; case 15 - .short _0223FCC0 - _0223FC2E - 2 ; case 16 - .short _0223FCC0 - _0223FC2E - 2 ; case 17 - .short _0223FCC0 - _0223FC2E - 2 ; case 18 - .short _0223FCC0 - _0223FC2E - 2 ; case 19 - .short _0223FCE6 - _0223FC2E - 2 ; case 20 - .short _0223FCFE - _0223FC2E - 2 ; case 21 - .short _0223FDE2 - _0223FC2E - 2 ; case 22 - .short _0223FCFE - _0223FC2E - 2 ; case 23 - .short _0223FDE2 - _0223FC2E - 2 ; case 24 - .short _0223FDE2 - _0223FC2E - 2 ; case 25 - .short _0223FDE2 - _0223FC2E - 2 ; case 26 - .short _0223FDE2 - _0223FC2E - 2 ; case 27 - .short _0223FDE2 - _0223FC2E - 2 ; case 28 - .short _0223FDE2 - _0223FC2E - 2 ; case 29 - .short _0223FDE2 - _0223FC2E - 2 ; case 30 - .short _0223FD22 - _0223FC2E - 2 ; case 31 - .short _0223FD22 - _0223FC2E - 2 ; case 32 - .short _0223FD22 - _0223FC2E - 2 ; case 33 - .short _0223FCC0 - _0223FC2E - 2 ; case 34 - .short _0223FCC0 - _0223FC2E - 2 ; case 35 - .short _0223FD80 - _0223FC2E - 2 ; case 36 - .short _0223FCC0 - _0223FC2E - 2 ; case 37 - .short _0223FCC0 - _0223FC2E - 2 ; case 38 - .short _0223FCC0 - _0223FC2E - 2 ; case 39 - .short _0223FCC0 - _0223FC2E - 2 ; case 40 - .short _0223FCC0 - _0223FC2E - 2 ; case 41 - .short _0223FCC0 - _0223FC2E - 2 ; case 42 - .short _0223FD80 - _0223FC2E - 2 ; case 43 - .short _0223FCC0 - _0223FC2E - 2 ; case 44 - .short _0223FCC0 - _0223FC2E - 2 ; case 45 - .short _0223FCC0 - _0223FC2E - 2 ; case 46 - .short _0223FCC0 - _0223FC2E - 2 ; case 47 - .short _0223FCFE - _0223FC2E - 2 ; case 48 - .short _0223FDE2 - _0223FC2E - 2 ; case 49 - .short _0223FDE2 - _0223FC2E - 2 ; case 50 - .short _0223FDE2 - _0223FC2E - 2 ; case 51 - .short _0223FD80 - _0223FC2E - 2 ; case 52 - .short _0223FD80 - _0223FC2E - 2 ; case 53 - .short _0223FD80 - _0223FC2E - 2 ; case 54 - .short _0223FD80 - _0223FC2E - 2 ; case 55 - .short _0223FDE2 - _0223FC2E - 2 ; case 56 - .short _0223FDE2 - _0223FC2E - 2 ; case 57 - .short _0223FDE2 - _0223FC2E - 2 ; case 58 - .short _0223FDE2 - _0223FC2E - 2 ; case 59 - .short _0223FDE2 - _0223FC2E - 2 ; case 60 -_0223FCA8: - ldr r1, [r4, #4] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FCDC - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FCC0: - ldr r1, [r4, #4] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FCDC - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - mov r0, #1 - tst r0, r5 - bne _0223FCDE -_0223FCDC: - b _0223FDE2 -_0223FCDE: - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FCE6: - ldr r1, [r4, #8] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FCFE: - ldr r1, [r4, #8] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - mov r0, #1 - tst r0, r5 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FD22: - ldr r1, [r4, #4] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FD5C - ldrh r0, [r4, #2] - add r0, r0, #3 - strh r0, [r4, #2] - mov r0, #1 - tst r0, r5 - beq _0223FD44 - ldrh r0, [r4, #2] - add r0, r0, #2 - strh r0, [r4, #2] -_0223FD44: - ldr r1, [r4, #8] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FD5C: - ldr r1, [r4, #8] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - mov r0, #1 - tst r0, r5 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FD80: - ldr r1, [r4, #4] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDBA - ldrh r0, [r4, #2] - add r0, r0, #3 - strh r0, [r4, #2] - mov r0, #1 - tst r0, r5 - beq _0223FDA2 - ldrh r0, [r4, #2] - add r0, r0, #2 - strh r0, [r4, #2] -_0223FDA2: - ldr r1, [r4, #0xc] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FDBA: - ldr r1, [r4, #0xc] - add r0, r6, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223E208 - cmp r0, #0 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - mov r0, #1 - tst r0, r5 - beq _0223FDE2 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_0223FDDE: - bl sub_02022974 -_0223FDE2: - pop {r4, r5, r6, pc} - thumb_func_end ov16_0223FBE8 - - thumb_func_start ov16_0223FDE4 -ov16_0223FDE4: ; 0x0223FDE4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r2, [r4, #1] - mov r1, #0x3f - add r5, r0, #0 - and r1, r2 - cmp r1, #0x3c - bls _0223FDF6 - b _0224045A -_0223FDF6: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223FE02: ; jump table - .short _0224045E - _0223FE02 - 2 ; case 0 - .short _0224045E - _0223FE02 - 2 ; case 1 - .short _0223FE7C - _0223FE02 - 2 ; case 2 - .short _0223FE86 - _0223FE02 - 2 ; case 3 - .short _0223FE90 - _0223FE02 - 2 ; case 4 - .short _0223FE9A - _0223FE02 - 2 ; case 5 - .short _0223FEA4 - _0223FE02 - 2 ; case 6 - .short _0223FEAE - _0223FE02 - 2 ; case 7 - .short _0223FEBA - _0223FE02 - 2 ; case 8 - .short _0223FEC4 - _0223FE02 - 2 ; case 9 - .short _0223FED8 - _0223FE02 - 2 ; case 10 - .short _0223FEEC - _0223FE02 - 2 ; case 11 - .short _0223FF00 - _0223FE02 - 2 ; case 12 - .short _0223FF14 - _0223FE02 - 2 ; case 13 - .short _0223FF28 - _0223FE02 - 2 ; case 14 - .short _0223FF3C - _0223FE02 - 2 ; case 15 - .short _0223FF50 - _0223FE02 - 2 ; case 16 - .short _0223FF64 - _0223FE02 - 2 ; case 17 - .short _0223FF78 - _0223FE02 - 2 ; case 18 - .short _0223FF8C - _0223FE02 - 2 ; case 19 - .short _0223FE86 - _0223FE02 - 2 ; case 20 - .short _0223FFA0 - _0223FE02 - 2 ; case 21 - .short _0223FFB4 - _0223FE02 - 2 ; case 22 - .short _0223FFC8 - _0223FE02 - 2 ; case 23 - .short _0223FFDC - _0223FE02 - 2 ; case 24 - .short _0223FFF0 - _0223FE02 - 2 ; case 25 - .short _02240004 - _0223FE02 - 2 ; case 26 - .short _02240018 - _0223FE02 - 2 ; case 27 - .short _0224002C - _0223FE02 - 2 ; case 28 - .short _02240040 - _0223FE02 - 2 ; case 29 - .short _02240054 - _0223FE02 - 2 ; case 30 - .short _02240068 - _0223FE02 - 2 ; case 31 - .short _02240086 - _0223FE02 - 2 ; case 32 - .short _022400A4 - _0223FE02 - 2 ; case 33 - .short _022400C2 - _0223FE02 - 2 ; case 34 - .short _022400E0 - _0223FE02 - 2 ; case 35 - .short _022400FE - _0223FE02 - 2 ; case 36 - .short _0224011C - _0223FE02 - 2 ; case 37 - .short _0224013A - _0223FE02 - 2 ; case 38 - .short _02240158 - _0223FE02 - 2 ; case 39 - .short _02240176 - _0223FE02 - 2 ; case 40 - .short _02240194 - _0223FE02 - 2 ; case 41 - .short _022401B2 - _0223FE02 - 2 ; case 42 - .short _022401D0 - _0223FE02 - 2 ; case 43 - .short _022401EE - _0223FE02 - 2 ; case 44 - .short _0224020C - _0223FE02 - 2 ; case 45 - .short _0224022A - _0223FE02 - 2 ; case 46 - .short _02240248 - _0223FE02 - 2 ; case 47 - .short _02240266 - _0223FE02 - 2 ; case 48 - .short _02240284 - _0223FE02 - 2 ; case 49 - .short _022402A2 - _0223FE02 - 2 ; case 50 - .short _022402C0 - _0223FE02 - 2 ; case 51 - .short _022402DE - _0223FE02 - 2 ; case 52 - .short _02240306 - _0223FE02 - 2 ; case 53 - .short _0224032E - _0223FE02 - 2 ; case 54 - .short _02240356 - _0223FE02 - 2 ; case 55 - .short _0224037E - _0223FE02 - 2 ; case 56 - .short _022403A6 - _0223FE02 - 2 ; case 57 - .short _022403CE - _0223FE02 - 2 ; case 58 - .short _022403F6 - _0223FE02 - 2 ; case 59 - .short _0224041E - _0223FE02 - 2 ; case 60 -_0223FE7C: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0223FE86: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_0223FE90: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_022404F8 - pop {r3, r4, r5, pc} -_0223FE9A: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_0223FEA4: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224049C - pop {r3, r4, r5, pc} -_0223FEAE: - ldr r2, [r4, #4] - ldr r3, [r4, #0x1c] - mov r1, #0 - bl ov16_022404B4 - pop {r3, r4, r5, pc} -_0223FEBA: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - pop {r3, r4, r5, pc} -_0223FEC4: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0223FED8: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_0223FEEC: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - pop {r3, r4, r5, pc} -_0223FF00: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404F8 - pop {r3, r4, r5, pc} -_0223FF14: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404E0 - pop {r3, r4, r5, pc} -_0223FF28: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240510 - pop {r3, r4, r5, pc} -_0223FF3C: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_0223FF50: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240534 - pop {r3, r4, r5, pc} -_0223FF64: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224049C - pop {r3, r4, r5, pc} -_0223FF78: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - pop {r3, r4, r5, pc} -_0223FF8C: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240574 - pop {r3, r4, r5, pc} -_0223FFA0: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240484 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0223FFB4: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240484 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_0223FFC8: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_022404EC - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0223FFDC: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240490 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_0223FFF0: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224049C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224049C - pop {r3, r4, r5, pc} -_02240004: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - pop {r3, r4, r5, pc} -_02240018: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0224002C: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_02240040: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224049C - pop {r3, r4, r5, pc} -_02240054: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - pop {r3, r4, r5, pc} -_02240068: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_02240086: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_022404EC - pop {r3, r4, r5, pc} -_022400A4: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_022400C2: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240484 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_022400E0: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240484 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_0224049C - pop {r3, r4, r5, pc} -_022400FE: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0224011C: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_0224013A: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_02240158: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_022404F8 - pop {r3, r4, r5, pc} -_02240176: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_022404E0 - pop {r3, r4, r5, pc} -_02240194: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240504 - pop {r3, r4, r5, pc} -_022401B2: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_0224049C - pop {r3, r4, r5, pc} -_022401D0: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_022401EE: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_0224020C: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_022404F8 - pop {r3, r4, r5, pc} -_0224022A: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240504 - pop {r3, r4, r5, pc} -_02240248: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240574 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240574 - pop {r3, r4, r5, pc} -_02240266: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240490 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240538 - pop {r3, r4, r5, pc} -_02240284: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_022402A2: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_022402C0: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_022402DE: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_02240484 - pop {r3, r4, r5, pc} -_02240306: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_022404EC - pop {r3, r4, r5, pc} -_0224032E: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_022404EC - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_022404F8 - pop {r3, r4, r5, pc} -_02240356: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240460 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240490 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_02240490 - pop {r3, r4, r5, pc} -_0224037E: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_0224055C - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_02240460 - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_0224055C - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_022403A6: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_022403CE: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_0224055C - pop {r3, r4, r5, pc} -_022403F6: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240544 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_0224055C - pop {r3, r4, r5, pc} -_0224041E: - ldr r2, [r4, #4] - mov r1, #0 - bl ov16_02240544 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov16_0224055C - ldr r2, [r4, #0xc] - add r0, r5, #0 - mov r1, #2 - bl ov16_02240460 - ldr r2, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl ov16_02240544 - ldr r2, [r4, #0x14] - add r0, r5, #0 - mov r1, #4 - bl ov16_0224055C - ldr r2, [r4, #0x18] - add r0, r5, #0 - mov r1, #5 - bl ov16_02240460 - pop {r3, r4, r5, pc} -_0224045A: - bl sub_02022974 -_0224045E: - pop {r3, r4, r5, pc} - thumb_func_end ov16_0223FDE4 - - thumb_func_start ov16_02240460 -ov16_02240460: ; 0x02240460 - push {r3, r4, r5, lr} - mov r3, #0xff - lsl r3, r3, #8 - add r4, r1, #0 - lsl r1, r2, #0x18 - and r2, r3 - add r5, r0, #0 - lsr r1, r1, #0x18 - asr r2, r2, #8 - bl ov16_0223DFAC - add r2, r0, #0 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl sub_0200B5CC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02240460 - - thumb_func_start ov16_02240484 -ov16_02240484: ; 0x02240484 - ldr r3, _0224048C ; =sub_0200B630 - ldr r0, [r0, #0x14] - bx r3 - nop -_0224048C: .word sub_0200B630 - thumb_func_end ov16_02240484 - - thumb_func_start ov16_02240490 -ov16_02240490: ; 0x02240490 - ldr r3, _02240498 ; =sub_0200B70C - ldr r0, [r0, #0x14] - bx r3 - nop -_02240498: .word sub_0200B70C - thumb_func_end ov16_02240490 - - thumb_func_start ov16_0224049C -ov16_0224049C: ; 0x0224049C - push {r3, lr} - sub sp, #8 - mov r3, #0 - str r3, [sp] - mov r3, #1 - str r3, [sp, #4] - ldr r0, [r0, #0x14] - mov r3, #5 - bl sub_0200B60C - add sp, #8 - pop {r3, pc} - thumb_func_end ov16_0224049C - - thumb_func_start ov16_022404B4 -ov16_022404B4: ; 0x022404B4 - push {r4, lr} - sub sp, #8 - cmp r3, #0 - beq _022404CC - mov r4, #1 - str r4, [sp] - str r4, [sp, #4] - ldr r0, [r0, #0x14] - bl sub_0200B60C - add sp, #8 - pop {r4, pc} -_022404CC: - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r0, [r0, #0x14] - mov r3, #5 - bl sub_0200B60C - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_022404B4 - - thumb_func_start ov16_022404E0 -ov16_022404E0: ; 0x022404E0 - ldr r3, _022404E8 ; =sub_0200B7EC - ldr r0, [r0, #0x14] - bx r3 - nop -_022404E8: .word sub_0200B7EC - thumb_func_end ov16_022404E0 - - thumb_func_start ov16_022404EC -ov16_022404EC: ; 0x022404EC - ldr r3, _022404F4 ; =sub_0200B6A0 - ldr r0, [r0, #0x14] - bx r3 - nop -_022404F4: .word sub_0200B6A0 - thumb_func_end ov16_022404EC - - thumb_func_start ov16_022404F8 -ov16_022404F8: ; 0x022404F8 - ldr r3, _02240500 ; =sub_0200B824 - ldr r0, [r0, #0x14] - bx r3 - nop -_02240500: .word sub_0200B824 - thumb_func_end ov16_022404F8 - - thumb_func_start ov16_02240504 -ov16_02240504: ; 0x02240504 - ldr r3, _0224050C ; =sub_0200B85C - ldr r0, [r0, #0x14] - bx r3 - nop -_0224050C: .word sub_0200B85C - thumb_func_end ov16_02240504 - - thumb_func_start ov16_02240510 -ov16_02240510: ; 0x02240510 - push {r3, r4, r5, lr} - mov r3, #0xff - lsl r3, r3, #8 - add r4, r1, #0 - lsl r1, r2, #0x18 - and r2, r3 - add r5, r0, #0 - lsr r1, r1, #0x18 - asr r2, r2, #8 - bl ov16_0223DFAC - add r2, r0, #0 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl sub_0200B538 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02240510 - - thumb_func_start ov16_02240534 -ov16_02240534: ; 0x02240534 - bx lr - ; .align 2, 0 - thumb_func_end ov16_02240534 - - thumb_func_start ov16_02240538 -ov16_02240538: ; 0x02240538 - ldr r3, _02240540 ; =sub_0200B890 - ldr r0, [r0, #0x14] - bx r3 - nop -_02240540: .word sub_0200B890 - thumb_func_end ov16_02240538 - - thumb_func_start ov16_02240544 -ov16_02240544: ; 0x02240544 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r1, r2, #0 - bl ov16_0223E120 - add r2, r0, #0 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl sub_0200B9D0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02240544 - - thumb_func_start ov16_0224055C -ov16_0224055C: ; 0x0224055C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r1, r2, #0 - bl ov16_0223E120 - add r2, r0, #0 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl sub_0200BA74 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0224055C - - thumb_func_start ov16_02240574 -ov16_02240574: ; 0x02240574 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x64] - bl sub_0200BD40 - pop {r4, pc} - thumb_func_end ov16_02240574 - - thumb_func_start ov16_02240584 -ov16_02240584: ; 0x02240584 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - ldrh r1, [r2, #2] - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - pop {r3, r4, r5, pc} - thumb_func_end ov16_02240584 - - thumb_func_start ov16_022405A4 -ov16_022405A4: ; 0x022405A4 - push {r4, lr} - mov r4, #0 - cmp r1, #5 - bhi _022405EA - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022405B8: ; jump table - .short _022405EA - _022405B8 - 2 ; case 0 - .short _022405C4 - _022405B8 - 2 ; case 1 - .short _022405CC - _022405B8 - 2 ; case 2 - .short _022405D4 - _022405B8 - 2 ; case 3 - .short _022405DC - _022405B8 - 2 ; case 4 - .short _022405E4 - _022405B8 - 2 ; case 5 -_022405C4: - bl sub_020057E0 - add r4, r0, #0 - b _022405EA -_022405CC: - bl sub_020061E4 - add r4, r0, #0 - b _022405EA -_022405D4: - ldr r0, _022405F0 ; =0x00000484 - bl sub_02006150 - b _022405EA -_022405DC: - ldr r0, _022405F4 ; =0x000005E6 - bl sub_02005748 - b _022405EA -_022405E4: - ldr r0, _022405F8 ; =0x00000483 - bl sub_02006150 -_022405EA: - add r0, r4, #0 - pop {r4, pc} - nop -_022405F0: .word 0x00000484 -_022405F4: .word 0x000005E6 -_022405F8: .word 0x00000483 - thumb_func_end ov16_022405A4 - - thumb_func_start ov16_022405FC -ov16_022405FC: ; 0x022405FC - push {r3, r4, r5, r6, r7, lr} - ldr r7, _02240644 ; =0x0226E72C - add r5, r0, #0 - add r4, r1, #0 -_02240604: - add r2, r4, #0 - add r2, #0xb4 - ldr r2, [r2, #0] - add r0, r5, #0 - lsl r2, r2, #2 - add r3, r4, r2 - mov r2, #0x27 - lsl r2, r2, #8 - ldr r2, [r3, r2] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r2, [r7, r2] - blx r2 - add r6, r0, #0 - ldr r0, _02240648 ; =0x00003154 - ldr r0, [r4, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _02240636 - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - beq _02240604 -_02240636: - ldr r1, _02240648 ; =0x00003154 - mov r0, #1 - ldr r2, [r4, r1] - bic r2, r0 - str r2, [r4, r1] - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240644: .word 0x0226E72C -_02240648: .word 0x00003154 - thumb_func_end ov16_022405FC - - thumb_func_start ov16_0224064C -ov16_0224064C: ; 0x0224064C - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - mov r1, #0 - bl ov16_02264A8C - mov r0, #0 - pop {r4, pc} - thumb_func_end ov16_0224064C - - thumb_func_start ov16_02240664 -ov16_02240664: ; 0x02240664 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - cmp r0, #0 - beq _0224068A - cmp r0, #3 - beq _022406D6 - cmp r0, #4 - beq _022406A8 -_0224068A: - mov r5, #0 - cmp r6, #0 - ble _022406D6 -_02240690: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02264AB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 - add r5, r5, #1 - cmp r5, r6 - blt _02240690 - b _022406D6 -_022406A8: - mov r5, #0 - cmp r6, #0 - ble _022406D6 - mov r7, #1 -_022406B0: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _022406DC ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _022406D0 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02264AB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 -_022406D0: - add r5, r5, #1 - cmp r5, r6 - blt _022406B0 -_022406D6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022406DC: .word 0x00000195 - thumb_func_end ov16_02240664 - - thumb_func_start ov16_022406E0 -ov16_022406E0: ; 0x022406E0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r7, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - cmp r0, #6 - bhi _02240718 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224070A: ; jump table - .short _02240718 - _0224070A - 2 ; case 0 - .short _022407BC - _0224070A - 2 ; case 1 - .short _02240806 - _0224070A - 2 ; case 2 - .short _02240736 - _0224070A - 2 ; case 3 - .short _0224077A - _0224070A - 2 ; case 4 - .short _02240718 - _0224070A - 2 ; case 5 - .short _02240850 - _0224070A - 2 ; case 6 -_02240718: - mov r5, #0 - cmp r7, #0 - ble _02240734 -_0224071E: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02264BB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 - add r5, r5, #1 - cmp r5, r7 - blt _0224071E -_02240734: - b _02240898 -_02240736: - mov r5, #0 - cmp r7, #0 - ble _02240764 -_0224073C: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _0224089C ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _0224075E - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02264BB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 -_0224075E: - add r5, r5, #1 - cmp r5, r7 - blt _0224073C -_02240764: - add r0, r4, #0 - add r1, r6, #0 - mov r2, #1 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _02240898 -_0224077A: - mov r5, #0 - cmp r7, #0 - ble _022407BA -_02240780: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _0224089C ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _022407B4 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_022535E0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02264BB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 -_022407B4: - add r5, r5, #1 - cmp r5, r7 - blt _02240780 -_022407BA: - b _02240898 -_022407BC: - ldr r1, [r6, #0x64] - add r0, r4, #0 - bl ov16_0223DF14 - ldr r1, _0224089C ; =0x00000195 - mov r2, #1 - ldrb r0, [r0, r1] - tst r0, r2 - bne _022407E2 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _022407F4 -_022407E2: - ldr r1, [r6, #0x64] - add r0, r6, #0 - bl ov16_022535E0 - ldr r2, [r6, #0x64] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 -_022407F4: - ldr r1, [r6, #0x64] - add r0, r4, #0 - bl ov16_0223F938 - ldr r1, [r6, #0x64] - add r0, r4, #0 - bl ov16_02264BB4 - b _02240898 -_02240806: - ldr r1, [r6, #0x6c] - add r0, r4, #0 - bl ov16_0223DF14 - ldr r1, _0224089C ; =0x00000195 - mov r2, #1 - ldrb r0, [r0, r1] - tst r0, r2 - bne _0224082C - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _0224083E -_0224082C: - ldr r1, [r6, #0x6c] - add r0, r6, #0 - bl ov16_022535E0 - ldr r2, [r6, #0x6c] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 -_0224083E: - ldr r1, [r6, #0x6c] - add r0, r4, #0 - bl ov16_0223F938 - ldr r1, [r6, #0x6c] - add r0, r4, #0 - bl ov16_02264BB4 - b _02240898 -_02240850: - ldr r1, [r6, #0x78] - add r0, r4, #0 - bl ov16_0223DF14 - ldr r1, _0224089C ; =0x00000195 - mov r2, #1 - ldrb r0, [r0, r1] - tst r0, r2 - bne _02240876 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _02240888 -_02240876: - ldr r1, [r6, #0x78] - add r0, r6, #0 - bl ov16_022535E0 - ldr r2, [r6, #0x78] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 -_02240888: - ldr r1, [r6, #0x78] - add r0, r4, #0 - bl ov16_0223F938 - ldr r1, [r6, #0x78] - add r0, r4, #0 - bl ov16_02264BB4 -_02240898: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224089C: .word 0x00000195 - thumb_func_end ov16_022406E0 - - thumb_func_start ov16_022408A0 -ov16_022408A0: ; 0x022408A0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r7, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - cmp r0, #6 - bhi _022408D8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022408CA: ; jump table - .short _022408D8 - _022408CA - 2 ; case 0 - .short _0224098A - _022408CA - 2 ; case 1 - .short _022409D8 - _022408CA - 2 ; case 2 - .short _022408FC - _022408CA - 2 ; case 3 - .short _02240944 - _022408CA - 2 ; case 4 - .short _022408D8 - _022408CA - 2 ; case 5 - .short _02240A26 - _022408CA - 2 ; case 6 -_022408D8: - mov r5, #0 - cmp r7, #0 - ble _022408FA - add r6, r5, #0 -_022408E0: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - add r3, r6, #0 - bl ov16_02264CE8 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 - add r5, r5, #1 - cmp r5, r7 - blt _022408E0 -_022408FA: - b _02240A72 -_022408FC: - mov r5, #0 - cmp r7, #0 - ble _0224092E -_02240902: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02240A78 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _02240928 - mov r2, #0 - add r0, r4, #0 - add r1, r5, #0 - add r3, r2, #0 - bl ov16_02264CE8 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 -_02240928: - add r5, r5, #1 - cmp r5, r7 - blt _02240902 -_0224092E: - add r0, r4, #0 - add r1, r6, #0 - mov r2, #1 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _02240A72 -_02240944: - mov r5, #0 - cmp r7, #0 - ble _02240988 -_0224094A: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02240A78 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _02240982 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_022535E0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov16_022535F0 - mov r2, #0 - add r0, r4, #0 - add r1, r5, #0 - add r3, r2, #0 - bl ov16_02264CE8 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223F938 -_02240982: - add r5, r5, #1 - cmp r5, r7 - blt _0224094A -_02240988: - b _02240A72 -_0224098A: - ldr r1, [r6, #0x64] - add r0, r4, #0 - bl ov16_0223DF14 - ldr r1, _02240A78 ; =0x00000195 - mov r2, #1 - ldrb r0, [r0, r1] - tst r0, r2 - bne _022409B0 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _022409C2 -_022409B0: - ldr r1, [r6, #0x64] - add r0, r6, #0 - bl ov16_022535E0 - ldr r2, [r6, #0x64] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 -_022409C2: - ldr r1, [r6, #0x64] - add r0, r4, #0 - bl ov16_0223F938 - mov r2, #0 - ldr r1, [r6, #0x64] - add r0, r4, #0 - add r3, r2, #0 - bl ov16_02264CE8 - b _02240A72 -_022409D8: - ldr r1, [r6, #0x6c] - add r0, r4, #0 - bl ov16_0223DF14 - ldr r1, _02240A78 ; =0x00000195 - mov r2, #1 - ldrb r0, [r0, r1] - tst r0, r2 - bne _022409FE - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _02240A10 -_022409FE: - ldr r1, [r6, #0x6c] - add r0, r6, #0 - bl ov16_022535E0 - ldr r2, [r6, #0x6c] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 -_02240A10: - ldr r1, [r6, #0x6c] - add r0, r4, #0 - bl ov16_0223F938 - mov r2, #0 - ldr r1, [r6, #0x6c] - add r0, r4, #0 - add r3, r2, #0 - bl ov16_02264CE8 - b _02240A72 -_02240A26: - ldr r1, [r6, #0x78] - add r0, r4, #0 - bl ov16_0223DF14 - ldr r1, _02240A78 ; =0x00000195 - mov r2, #1 - ldrb r0, [r0, r1] - tst r0, r2 - bne _02240A4C - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022535F0 - b _02240A5E -_02240A4C: - ldr r1, [r6, #0x78] - add r0, r6, #0 - bl ov16_022535E0 - ldr r2, [r6, #0x78] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_022535F0 -_02240A5E: - ldr r1, [r6, #0x78] - add r0, r4, #0 - bl ov16_0223F938 - mov r2, #0 - ldr r1, [r6, #0x78] - add r0, r4, #0 - add r3, r2, #0 - bl ov16_02264CE8 -_02240A72: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240A78: .word 0x00000195 - thumb_func_end ov16_022408A0 - - thumb_func_start ov16_02240A7C -ov16_02240A7C: ; 0x02240A7C - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - bl ov16_0223DF1C - add r7, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r2, r0, #0 - beq _02240AA4 - cmp r2, #3 - beq _02240ABC - cmp r2, #4 - beq _02240AE6 - b _02240B1E -_02240AA4: - mov r4, #0 - cmp r7, #0 - ble _02240B30 -_02240AAA: - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov16_02264EF8 - add r4, r4, #1 - cmp r4, r7 - blt _02240AAA - b _02240B30 -_02240ABC: - mov r4, #0 - cmp r7, #0 - ble _02240B30 -_02240AC2: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223DF14 - ldr r1, _02240B34 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _02240ADE - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov16_02264EF8 -_02240ADE: - add r4, r4, #1 - cmp r4, r7 - blt _02240AC2 - b _02240B30 -_02240AE6: - mov r4, #0 - cmp r7, #0 - ble _02240B30 -_02240AEC: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223DF14 - ldr r1, _02240B34 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _02240B16 - add r0, r4, #0 - bl sub_020787CC - ldr r1, _02240B38 ; =0x00003108 - ldrb r1, [r6, r1] - tst r0, r1 - bne _02240B16 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov16_02264EF8 -_02240B16: - add r4, r4, #1 - cmp r4, r7 - blt _02240AEC - b _02240B30 -_02240B1E: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02264EF8 -_02240B30: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240B34: .word 0x00000195 -_02240B38: .word 0x00003108 - thumb_func_end ov16_02240A7C - - thumb_func_start ov16_02240B3C -ov16_02240B3C: ; 0x02240B3C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_02265108 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02240B3C - - thumb_func_start ov16_02240B68 -ov16_02240B68: ; 0x02240B68 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - cmp r0, #0 - beq _02240B8E - cmp r0, #3 - beq _02240BF2 - cmp r0, #4 - beq _02240C32 -_02240B8E: - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - beq _02240BC0 - mov r5, #0 - cmp r6, #0 - ble _02240C7C - ldr r7, _02240C80 ; =0x00000195 -_02240BA2: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #4 - beq _02240BB8 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265124 -_02240BB8: - add r5, r5, #1 - cmp r5, r6 - blt _02240BA2 - b _02240C7C -_02240BC0: - mov r5, #0 - cmp r6, #0 - ble _02240C7C - mov r7, #8 -_02240BC8: - add r0, r4, #0 - bl ov16_0223DF0C - tst r0, r7 - bne _02240BE2 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02240BE2 - cmp r5, #1 - bgt _02240C7C -_02240BE2: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265124 - add r5, r5, #1 - cmp r5, r6 - blt _02240BC8 - b _02240C7C -_02240BF2: - mov r5, #0 - cmp r6, #0 - ble _02240C7C - mov r7, #1 -_02240BFA: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02240C80 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - bne _02240C2A - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265124 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240C2A - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02240C7C -_02240C2A: - add r5, r5, #1 - cmp r5, r6 - blt _02240BFA - b _02240C7C -_02240C32: - mov r5, #0 - cmp r6, #0 - ble _02240C7C - mov r7, #1 -_02240C3A: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02240C80 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _02240C76 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265124 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240C76 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - bne _02240C76 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02240C7C -_02240C76: - add r5, r5, #1 - cmp r5, r6 - blt _02240C3A -_02240C7C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240C80: .word 0x00000195 - thumb_func_end ov16_02240B68 - - thumb_func_start ov16_02240C84 -ov16_02240C84: ; 0x02240C84 - push {r3, r4, r5, r6, r7, lr} - str r1, [sp] - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - ldr r0, [sp] - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [sp] - bl ov16_02248AD0 - add r5, r0, #0 - ldr r0, [sp] - bl ov16_02248AD0 - add r7, r0, #0 - cmp r5, #0 - beq _02240CB4 - cmp r5, #3 - beq _02240CE8 - cmp r5, #4 - beq _02240D2A -_02240CB4: - mov r5, #0 - cmp r6, #0 - ble _02240D76 -_02240CBA: - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240CD6 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02240CD6 - cmp r5, #1 - bgt _02240D76 -_02240CD6: - add r0, r4, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02265154 - add r5, r5, #1 - cmp r5, r6 - blt _02240CBA - b _02240D76 -_02240CE8: - mov r5, #0 - cmp r6, #0 - ble _02240D76 -_02240CEE: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02240D8C ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _02240D22 - add r0, r4, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02265154 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240D22 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02240D76 -_02240D22: - add r5, r5, #1 - cmp r5, r6 - blt _02240CEE - b _02240D76 -_02240D2A: - mov r5, #0 - cmp r6, #0 - ble _02240D76 -_02240D30: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02240D8C ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _02240D70 - add r0, r4, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02265154 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240D70 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - bne _02240D70 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02240D76 -_02240D70: - add r5, r5, #1 - cmp r5, r6 - blt _02240D30 -_02240D76: - ldr r1, _02240D90 ; =0x00003154 - ldr r0, [sp] - ldr r2, [r0, r1] - mov r0, #1 - bic r2, r0 - mov r0, #1 - orr r2, r0 - ldr r0, [sp] - str r2, [r0, r1] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240D8C: .word 0x00000195 -_02240D90: .word 0x00003154 - thumb_func_end ov16_02240C84 - - thumb_func_start ov16_02240D94 -ov16_02240D94: ; 0x02240D94 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r5, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - cmp r0, #0xc - bhi _02240DD8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02240DBE: ; jump table - .short _02240DD8 - _02240DBE - 2 ; case 0 - .short _02240DD8 - _02240DBE - 2 ; case 1 - .short _02240DD8 - _02240DBE - 2 ; case 2 - .short _02240E0A - _02240DBE - 2 ; case 3 - .short _02240E4A - _02240DBE - 2 ; case 4 - .short _02240DD8 - _02240DBE - 2 ; case 5 - .short _02240DD8 - _02240DBE - 2 ; case 6 - .short _02240DD8 - _02240DBE - 2 ; case 7 - .short _02240DD8 - _02240DBE - 2 ; case 8 - .short _02240E96 - _02240DBE - 2 ; case 9 - .short _02240EC2 - _02240DBE - 2 ; case 10 - .short _02240EEE - _02240DBE - 2 ; case 11 - .short _02240F16 - _02240DBE - 2 ; case 12 -_02240DD8: - mov r6, #0 - cmp r5, #0 - ble _02240E08 - mov r7, #8 -_02240DE0: - add r0, r4, #0 - bl ov16_0223DF0C - tst r0, r7 - bne _02240DFA - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02240DFA - cmp r6, #1 - bgt _02240E08 -_02240DFA: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - add r6, r6, #1 - cmp r6, r5 - blt _02240DE0 -_02240E08: - b _02240F3C -_02240E0A: - mov r6, #0 - cmp r5, #0 - ble _02240E48 - mov r7, #1 -_02240E12: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _02240F40 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - bne _02240E42 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240E42 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02240F3C -_02240E42: - add r6, r6, #1 - cmp r6, r5 - blt _02240E12 -_02240E48: - b _02240F3C -_02240E4A: - mov r6, #0 - cmp r5, #0 - ble _02240F3C - mov r7, #1 -_02240E52: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _02240F40 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _02240E8E - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02240E8E - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - bne _02240E8E - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02240F3C -_02240E8E: - add r6, r6, #1 - cmp r6, r5 - blt _02240E52 - b _02240F3C -_02240E96: - mov r6, #0 - cmp r5, #0 - ble _02240F3C - ldr r7, _02240F40 ; =0x00000195 -_02240E9E: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #0 - beq _02240EB0 - cmp r0, #2 - bne _02240EBA -_02240EB0: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - b _02240F3C -_02240EBA: - add r6, r6, #1 - cmp r6, r5 - blt _02240E9E - b _02240F3C -_02240EC2: - mov r6, #0 - cmp r5, #0 - ble _02240F3C - ldr r7, _02240F40 ; =0x00000195 -_02240ECA: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #1 - beq _02240EDC - cmp r0, #3 - bne _02240EE6 -_02240EDC: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - b _02240F3C -_02240EE6: - add r6, r6, #1 - cmp r6, r5 - blt _02240ECA - b _02240F3C -_02240EEE: - mov r6, #0 - cmp r5, #0 - ble _02240F3C - ldr r7, _02240F40 ; =0x00000195 -_02240EF6: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #4 - bne _02240F0E - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - b _02240F3C -_02240F0E: - add r6, r6, #1 - cmp r6, r5 - blt _02240EF6 - b _02240F3C -_02240F16: - mov r6, #0 - cmp r5, #0 - ble _02240F3C - ldr r7, _02240F40 ; =0x00000195 -_02240F1E: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #5 - bne _02240F36 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0226518C - b _02240F3C -_02240F36: - add r6, r6, #1 - cmp r6, r5 - blt _02240F1E -_02240F3C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240F40: .word 0x00000195 - thumb_func_end ov16_02240D94 - - thumb_func_start ov16_02240F44 -ov16_02240F44: ; 0x02240F44 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r5, r0, #0 - add r0, r7, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r7, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r7, #0 - bl ov16_02248AD0 - add r7, r0, #0 - cmp r6, #0xc - bhi _02240F92 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02240F78: ; jump table - .short _02240F92 - _02240F78 - 2 ; case 0 - .short _02240F92 - _02240F78 - 2 ; case 1 - .short _02240F92 - _02240F78 - 2 ; case 2 - .short _02240FBA - _02240F78 - 2 ; case 3 - .short _02240FF0 - _02240F78 - 2 ; case 4 - .short _02240F92 - _02240F78 - 2 ; case 5 - .short _02240F92 - _02240F78 - 2 ; case 6 - .short _02240F92 - _02240F78 - 2 ; case 7 - .short _02240F92 - _02240F78 - 2 ; case 8 - .short _02241026 - _02240F78 - 2 ; case 9 - .short _02241054 - _02240F78 - 2 ; case 10 - .short _02241082 - _02240F78 - 2 ; case 11 - .short _022410AC - _02240F78 - 2 ; case 12 -_02240F92: - mov r6, #0 - cmp r5, #0 - ble _02240FB8 -_02240F98: - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02240FA8 - cmp r6, #1 - bgt _02240FB8 -_02240FA8: - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - add r6, r6, #1 - cmp r6, r5 - blt _02240F98 -_02240FB8: - b _022410D4 -_02240FBA: - mov r6, #0 - cmp r5, #0 - ble _02240FEE -_02240FC0: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _022410D8 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _02240FE8 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _022410D4 -_02240FE8: - add r6, r6, #1 - cmp r6, r5 - blt _02240FC0 -_02240FEE: - b _022410D4 -_02240FF0: - mov r6, #0 - cmp r5, #0 - ble _022410D4 -_02240FF6: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _022410D8 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _0224101E - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _022410D4 -_0224101E: - add r6, r6, #1 - cmp r6, r5 - blt _02240FF6 - b _022410D4 -_02241026: - mov r6, #0 - cmp r5, #0 - ble _022410D4 -_0224102C: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _022410D8 ; =0x00000195 - ldrb r0, [r0, r1] - cmp r0, #0 - beq _02241040 - cmp r0, #2 - bne _0224104C -_02241040: - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - b _022410D4 -_0224104C: - add r6, r6, #1 - cmp r6, r5 - blt _0224102C - b _022410D4 -_02241054: - mov r6, #0 - cmp r5, #0 - ble _022410D4 -_0224105A: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _022410D8 ; =0x00000195 - ldrb r0, [r0, r1] - cmp r0, #1 - beq _0224106E - cmp r0, #3 - bne _0224107A -_0224106E: - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - b _022410D4 -_0224107A: - add r6, r6, #1 - cmp r6, r5 - blt _0224105A - b _022410D4 -_02241082: - mov r6, #0 - cmp r5, #0 - ble _022410D4 -_02241088: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _022410D8 ; =0x00000195 - ldrb r0, [r0, r1] - cmp r0, #4 - bne _022410A4 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - b _022410D4 -_022410A4: - add r6, r6, #1 - cmp r6, r5 - blt _02241088 - b _022410D4 -_022410AC: - mov r6, #0 - cmp r5, #0 - ble _022410D4 -_022410B2: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _022410D8 ; =0x00000195 - ldrb r0, [r0, r1] - cmp r0, #5 - bne _022410CE - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_022651A8 - b _022410D4 -_022410CE: - add r6, r6, #1 - cmp r6, r5 - blt _022410B2 -_022410D4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022410D8: .word 0x00000195 - thumb_func_end ov16_02240F44 - - thumb_func_start ov16_022410DC -ov16_022410DC: ; 0x022410DC - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - bl ov16_0223DF1C - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r4, #0 - cmp r5, #0 - ble _02241104 -_022410F6: - add r0, r6, #0 - add r1, r4, #0 - bl ov16_02266460 - add r4, r4, #1 - cmp r4, r5 - blt _022410F6 -_02241104: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_022410DC - - thumb_func_start ov16_02241108 -ov16_02241108: ; 0x02241108 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - add r0, r7, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r7, #0 - bl ov16_02248AD0 - add r2, r0, #0 - beq _02241130 - cmp r2, #3 - beq _0224114A - cmp r2, #4 - beq _02241176 - b _022411A2 -_02241130: - mov r5, #0 - cmp r6, #0 - ble _022411B6 -_02241136: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #0 - bl ov16_022651DC - add r5, r5, #1 - cmp r5, r6 - blt _02241136 - b _022411B6 -_0224114A: - mov r5, #0 - cmp r6, #0 - ble _022411B6 -_02241150: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _022411BC ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _0224116E - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #0 - bl ov16_022651DC -_0224116E: - add r5, r5, #1 - cmp r5, r6 - blt _02241150 - b _022411B6 -_02241176: - mov r5, #0 - cmp r6, #0 - ble _022411B6 -_0224117C: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _022411BC ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _0224119A - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #0 - bl ov16_022651DC -_0224119A: - add r5, r5, #1 - cmp r5, r6 - blt _0224117C - b _022411B6 -_022411A2: - add r0, r4, #0 - add r1, r7, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - mov r3, #0 - bl ov16_022651DC -_022411B6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022411BC: .word 0x00000195 - thumb_func_end ov16_02241108 - - thumb_func_start ov16_022411C0 -ov16_022411C0: ; 0x022411C0 - push {r3, r4, r5, r6, r7, lr} - str r1, [sp] - add r5, r0, #0 - bl ov16_0223DF1C - add r7, r0, #0 - ldr r0, [sp] - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [sp] - bl ov16_02248AD0 - add r2, r0, #0 - ldr r4, _02241280 ; =0x00000000 - beq _022411EA - cmp r2, #3 - beq _02241204 - cmp r2, #4 - beq _02241236 - b _02241268 -_022411EA: - cmp r7, #0 - ble _0224127C - add r6, r4, #0 -_022411F0: - ldr r1, [sp] - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov16_022651DC - add r4, r4, #1 - cmp r4, r7 - blt _022411F0 - b _0224127C -_02241204: - add r6, r4, #0 - cmp r7, #0 - ble _0224127C -_0224120A: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _02241284 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _0224122E - ldr r1, [sp] - add r0, r5, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov16_022651DC - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_0224122E: - add r6, r6, #1 - cmp r6, r7 - blt _0224120A - b _0224127C -_02241236: - add r6, r4, #0 - cmp r7, #0 - ble _0224127C -_0224123C: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223DF14 - ldr r1, _02241284 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - beq _02241260 - ldr r1, [sp] - add r0, r5, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov16_022651DC - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_02241260: - add r6, r6, #1 - cmp r6, r7 - blt _0224123C - b _0224127C -_02241268: - ldr r1, [sp] - add r0, r5, #0 - bl ov16_0224A984 - add r2, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - add r3, r4, #0 - bl ov16_022651DC -_0224127C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241280: .word 0x00000000 -_02241284: .word 0x00000195 - thumb_func_end ov16_022411C0 - - thumb_func_start ov16_02241288 -ov16_02241288: ; 0x02241288 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - add r0, r7, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r7, #0 - bl ov16_02248AD0 - add r2, r0, #0 - beq _022412B0 - cmp r2, #3 - beq _022412C6 - cmp r2, #4 - beq _022412FC - b _02241324 -_022412B0: - mov r5, #0 - cmp r6, #0 - ble _02241334 -_022412B6: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265314 - add r5, r5, #1 - cmp r5, r6 - blt _022412B6 - b _02241334 -_022412C6: - mov r5, #0 - cmp r6, #0 - ble _02241334 -_022412CC: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02241338 ; =0x00000195 - ldrb r1, [r0, r1] - mov r0, #1 - tst r0, r1 - bne _022412F4 - add r0, r5, #0 - bl sub_020787CC - ldr r1, _0224133C ; =0x00003108 - ldrb r1, [r7, r1] - tst r0, r1 - bne _022412F4 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265314 -_022412F4: - add r5, r5, #1 - cmp r5, r6 - blt _022412CC - b _02241334 -_022412FC: - mov r5, #0 - cmp r6, #0 - ble _02241334 - mov r7, #1 -_02241304: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02241338 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _0224131C - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02265314 -_0224131C: - add r5, r5, #1 - cmp r5, r6 - blt _02241304 - b _02241334 -_02241324: - add r0, r4, #0 - add r1, r7, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_02265314 -_02241334: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241338: .word 0x00000195 -_0224133C: .word 0x00003108 - thumb_func_end ov16_02241288 - - thumb_func_start ov16_02241340 -ov16_02241340: ; 0x02241340 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov16_02251FC8 - cmp r0, #0 - beq _02241358 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - b _0224135E -_02241358: - add r0, r4, #0 - bl ov16_0225201C -_0224135E: - ldr r1, _02241370 ; =0x00003154 - mov r0, #1 - ldr r2, [r4, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r4, r1] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02241370: .word 0x00003154 - thumb_func_end ov16_02241340 - - thumb_func_start ov16_02241374 -ov16_02241374: ; 0x02241374 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r1, #0 - ldr r1, [r5, #0x64] - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x60 - bne _0224138C - mov r4, #0 - b _022413A0 -_0224138C: - ldr r0, _022414C0 ; =0x00002160 - ldr r4, [r5, r0] - cmp r4, #0 - bne _022413A0 - ldr r0, _022414C4 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022414C8 ; =0x000003E2 - ldrb r4, [r1, r0] -_022413A0: - ldr r0, [r5, #0x6c] - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r7, #0 - bl ov16_0223E208 - mov r3, #6 - lsl r3, r3, #6 - add r6, r0, #0 - ldr r0, [r5, r3] - ldr r1, _022414CC ; =0x00002154 - str r0, [sp] - ldr r0, [r5, r1] - ldr r2, _022414C4 ; =0x00003044 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0x64] - lsl r4, r6, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - add r4, r5, r4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - sub r0, r1, #4 - ldr r0, [r5, r0] - add r3, #0x3c - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x14] - ldr r2, [r5, r2] - ldr r3, [r4, r3] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0225A280 - ldr r1, _022414D0 ; =0x00002144 - str r0, [r5, r1] - add r0, r1, #0 - add r0, #0xc - ldr r2, [r5, r1] - ldr r0, [r5, r0] - mul r0, r2 - str r0, [r5, r1] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02258AB8 - cmp r0, #0x62 - bne _0224142C - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - ldr r1, _022414D0 ; =0x00002144 - add r0, #0x64 - ldr r1, [r5, r1] - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, _022414D0 ; =0x00002144 - str r0, [r5, r1] -_0224142C: - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02258AB8 - cmp r0, #0x69 - bne _0224145A - ldr r0, _022414D0 ; =0x00002144 - ldr r2, [r5, #0x64] - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r2 - add r2, r5, r0 - ldr r0, _022414D4 ; =0x00002DCC - ldr r0, [r2, r0] - lsl r0, r0, #5 - lsr r0, r0, #0x1c - add r0, #0xa - mul r0, r1 - mov r1, #0xa - bl sub_020E2178 - ldr r1, _022414D0 ; =0x00002144 - str r0, [r5, r1] -_0224145A: - ldr r2, [r5, #0x64] - mov r1, #0xc0 - add r0, r2, #0 - mul r0, r1 - ldr r2, _022414D4 ; =0x00002DCC - add r3, r5, r0 - ldr r3, [r3, r2] - lsl r3, r3, #1 - lsr r3, r3, #0x1f - beq _022414BA - add r2, #0x10 - add r3, r5, r2 - add r1, #0xb4 - ldr r2, [r5, r1] - ldr r1, [r3, r0] - cmp r2, r1 - bne _02241480 - sub r1, r1, #1 - str r1, [r3, r0] -_02241480: - ldr r2, [r5, #0x64] - mov r1, #0xc0 - add r0, r2, #0 - mul r0, r1 - add r1, #0xb4 - ldr r3, [r5, r1] - ldr r1, _022414D8 ; =0x00002DDC - add r2, r5, r0 - ldr r2, [r2, r1] - sub r2, r3, r2 - cmp r2, #2 - bge _022414AE - ldr r0, _022414D0 ; =0x00002144 - ldr r1, [r5, r0] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, _022414D0 ; =0x00002144 - add sp, #0x1c - str r0, [r5, r1] - pop {r4, r5, r6, r7, pc} -_022414AE: - sub r1, #0x10 - add r3, r5, r1 - ldr r2, [r3, r0] - ldr r1, _022414DC ; =0xBFFFFFFF - and r1, r2 - str r1, [r3, r0] -_022414BA: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_022414C0: .word 0x00002160 -_022414C4: .word 0x00003044 -_022414C8: .word 0x000003E2 -_022414CC: .word 0x00002154 -_022414D0: .word 0x00002144 -_022414D4: .word 0x00002DCC -_022414D8: .word 0x00002DDC -_022414DC: .word 0xBFFFFFFF - thumb_func_end ov16_02241374 - - thumb_func_start ov16_022414E0 -ov16_022414E0: ; 0x022414E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02241374 - ldr r2, _02241514 ; =0x00002144 - add r0, r5, #0 - ldr r2, [r4, r2] - add r1, r4, #0 - bl ov16_0225AEB8 - ldr r1, _02241514 ; =0x00002144 - str r0, [r4, r1] - mov r0, #0 - ldr r2, [r4, r1] - mvn r0, r0 - mul r0, r2 - str r0, [r4, r1] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02241514: .word 0x00002144 - thumb_func_end ov16_022414E0 - - thumb_func_start ov16_02241518 -ov16_02241518: ; 0x02241518 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02241374 - ldr r1, _02241540 ; =0x00002144 - mov r0, #0 - ldr r2, [r4, r1] - mvn r0, r0 - mul r0, r2 - str r0, [r4, r1] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02241540: .word 0x00002144 - thumb_func_end ov16_02241518 - - thumb_func_start ov16_02241544 -ov16_02241544: ; 0x02241544 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, _02241580 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #1 - tst r0, r1 - bne _02241564 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02265B68 -_02241564: - ldr r1, _02241580 ; =0x0000213C - mov r0, #1 - ldr r2, [r4, r1] - orr r0, r2 - str r0, [r4, r1] - add r0, r1, #4 - ldr r2, [r4, r0] - mov r0, #4 - orr r2, r0 - add r0, r1, #4 - str r2, [r4, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02241580: .word 0x0000213C - thumb_func_end ov16_02241544 - - thumb_func_start ov16_02241584 -ov16_02241584: ; 0x02241584 - push {r4, r5, lr} - sub sp, #0x44 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - add r1, sp, #0x24 - bl ov16_0224ABEC - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x24 - add r3, sp, #0 - bl ov16_0224ACB8 - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0 - bl ov16_02265BA0 - mov r0, #0 - add sp, #0x44 - pop {r4, r5, pc} - thumb_func_end ov16_02241584 - - thumb_func_start ov16_022415B8 -ov16_022415B8: ; 0x022415B8 - push {r4, r5, lr} - sub sp, #0x44 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - add r1, sp, #0x24 - bl ov16_0224ABEC - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x24 - add r3, sp, #0 - bl ov16_0224ACB8 - add r1, sp, #0 - ldrb r2, [r1, #1] - mov r0, #0x80 - orr r0, r2 - strb r0, [r1, #1] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0 - bl ov16_02265BA0 - mov r0, #0 - add sp, #0x44 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022415B8 - - thumb_func_start ov16_022415F8 -ov16_022415F8: ; 0x022415F8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r1, r4, #0 - add r4, #0xf4 - add r0, r5, #0 - add r2, r4, #0 - bl ov16_02265BA0 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022415F8 - - thumb_func_start ov16_02241618 -ov16_02241618: ; 0x02241618 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - add r1, sp, #0 - bl ov16_0224ABEC - add r1, r4, #0 - add r4, #0xf4 - add r0, r5, #0 - add r2, sp, #0 - add r3, r4, #0 - bl ov16_0224ACB8 - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02241618 - - thumb_func_start ov16_02241644 -ov16_02241644: ; 0x02241644 - push {r3, r4, r5, r6, lr} - sub sp, #0x44 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - add r1, sp, #0x24 - bl ov16_0224ABEC - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x24 - add r3, sp, #0 - bl ov16_0224ACB8 - add r1, sp, #0 - ldrb r2, [r1, #1] - mov r0, #0x40 - orr r0, r2 - strb r0, [r1, #1] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - str r0, [sp, #0x20] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0 - bl ov16_02265BA0 - mov r0, #0 - add sp, #0x44 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02241644 - - thumb_func_start ov16_02241698 -ov16_02241698: ; 0x02241698 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - cmp r0, #0xff - bne _022416B6 - mov r0, #0x49 - lsl r0, r0, #2 - b _022416B8 -_022416B6: - ldr r0, _02241708 ; =0x00003044 -_022416B8: - ldr r0, [r5, r0] - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, _0224170C ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #1 - lsl r0, r0, #0xe - tst r0, r1 - bne _022416D4 - add r0, r6, #0 - bl ov16_0223EDAC - cmp r0, #1 - beq _022416D8 -_022416D4: - cmp r4, #0x90 - bne _022416EE -_022416D8: - ldr r1, _0224170C ; =0x0000213C - mov r0, #1 - ldr r2, [r5, r1] - lsl r0, r0, #0xe - orr r0, r2 - str r0, [r5, r1] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_02265BBC -_022416EE: - add r0, r6, #0 - bl ov16_0223EDAC - cmp r0, #0 - bne _02241702 - ldr r2, _02241710 ; =0x00000123 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248B08 -_02241702: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02241708: .word 0x00003044 -_0224170C: .word 0x0000213C -_02241710: .word 0x00000123 - thumb_func_end ov16_02241698 - - thumb_func_start ov16_02241714 -ov16_02241714: ; 0x02241714 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - cmp r6, #0xff - bne _02241746 - mov r0, #0x49 - lsl r0, r0, #2 - b _02241748 -_02241746: - ldr r0, _022417B4 ; =0x00003044 -_02241748: - ldr r0, [r4, r0] - add r1, r4, #0 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r5, #0 - add r2, r7, #0 - bl ov16_0224A984 - str r0, [sp, #4] - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r7, r0, #0 - ldr r0, _022417B8 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #1 - lsl r0, r0, #0xe - tst r0, r1 - bne _0224177C - add r0, r5, #0 - bl ov16_0223EDAC - cmp r0, #1 - beq _02241780 -_0224177C: - cmp r6, #0x90 - bne _0224179A -_02241780: - ldr r1, _022417B8 ; =0x0000213C - mov r0, #1 - ldr r2, [r4, r1] - lsl r0, r0, #0xe - orr r0, r2 - str r0, [r4, r1] - ldr r3, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - str r7, [sp] - bl ov16_02265BEC -_0224179A: - add r0, r5, #0 - bl ov16_0223EDAC - cmp r0, #0 - bne _022417AE - ldr r2, _022417BC ; =0x00000123 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248B08 -_022417AE: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022417B4: .word 0x00003044 -_022417B8: .word 0x0000213C -_022417BC: .word 0x00000123 - thumb_func_end ov16_02241714 - - thumb_func_start ov16_022417C0 -ov16_022417C0: ; 0x022417C0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - ldr r2, _022417F0 ; =0x0000216C - add r1, r0, #0 - ldr r2, [r4, r2] - add r0, r5, #0 - bl ov16_02265C1C - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022417F0: .word 0x0000216C - thumb_func_end ov16_022417C0 - - thumb_func_start ov16_022417F4 -ov16_022417F4: ; 0x022417F4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - ldr r0, _02241888 ; =0x00002D8C - add r7, r2, #0 - add r5, r4, r0 - mov r0, #0xc0 - mul r7, r0 - ldr r0, _0224188C ; =0x0000215C - ldr r6, [r5, r7] - ldr r3, [r4, r0] - add r1, r3, r6 - cmp r1, #0 - bgt _02241832 - neg r1, r6 - sub r0, #0x14 - str r1, [r4, r0] - b _02241836 -_02241832: - sub r0, #0x14 - str r3, [r4, r0] -_02241836: - ldr r0, _02241890 ; =0x00002148 - ldr r6, [r4, r0] - cmp r6, #0 - bge _0224184C - mov r0, #0x59 - lsl r0, r0, #2 - add r3, r4, r0 - lsl r1, r2, #2 - ldr r0, [r3, r1] - sub r0, r0, r6 - str r0, [r3, r1] -_0224184C: - mov r0, #0xc0 - add r3, r2, #0 - mul r3, r0 - ldr r0, _02241888 ; =0x00002D8C - ldr r6, _0224188C ; =0x0000215C - add r1, r4, r0 - ldr r0, [r1, r3] - ldr r6, [r4, r6] - add r0, r0, r6 - str r0, [r1, r3] - ldr r1, [r1, r3] - cmp r1, #0 - bge _0224186C - mov r0, #0 - str r0, [r5, r7] - b _0224187A -_0224186C: - add r0, r4, r3 - ldr r3, _02241888 ; =0x00002D8C - add r3, r3, #4 - ldr r0, [r0, r3] - cmp r1, r0 - bls _0224187A - str r0, [r5, r7] -_0224187A: - ldr r0, [sp] - add r1, r4, #0 - bl ov16_02253EC0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241888: .word 0x00002D8C -_0224188C: .word 0x0000215C -_02241890: .word 0x00002148 - thumb_func_end ov16_022417F4 - - thumb_func_start ov16_02241894 -ov16_02241894: ; 0x02241894 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02265C38 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02241894 - - thumb_func_start ov16_022418C0 -ov16_022418C0: ; 0x022418C0 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0224A984 - add r4, r0, #0 - mov r1, #0xc0 - mul r1, r4 - add r2, r5, r1 - ldr r1, _0224191C ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - bne _02241916 - str r4, [r5, #0x74] - bl sub_020787CC - ldr r1, _02241920 ; =0x0000213C - lsl r0, r0, #0x18 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] - mov r0, #0x55 - lsl r0, r0, #2 - add r2, r5, r0 - lsl r1, r4, #2 - ldr r0, [r2, r1] - add r0, r0, #1 - str r0, [r2, r1] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224B850 -_02241916: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_0224191C: .word 0x00002D8C -_02241920: .word 0x0000213C - thumb_func_end ov16_022418C0 - - thumb_func_start ov16_02241924 -ov16_02241924: ; 0x02241924 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r2, [r4, #0x74] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02265D98 - ldr r0, [r4, #0x74] - bl sub_020787CC - ldr r2, _02241980 ; =0x0000213C - lsl r3, r0, #0x18 - mov r0, #0 - mvn r0, r0 - ldr r1, [r4, r2] - eor r0, r3 - and r0, r1 - str r0, [r4, r2] - ldr r0, [r4, #0x74] - bl sub_020787CC - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r4, r1] - lsl r0, r0, #0x1c - orr r0, r2 - str r0, [r4, r1] - ldr r0, [r4, #0x74] - mov r2, #0x27 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, #0x68 - str r2, [r0, r1] - ldr r2, [r4, #0x74] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02254744 - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02241980: .word 0x0000213C - thumb_func_end ov16_02241924 - - thumb_func_start ov16_02241984 -ov16_02241984: ; 0x02241984 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - bne _022419BE - ldr r0, _02241A10 ; =0x021BF67C - ldr r1, [r0, #0x48] - ldr r0, _02241A14 ; =0x00000C03 - tst r0, r1 - bne _022419B8 - bl sub_02022798 - cmp r0, #0 - beq _022419BE -_022419B8: - add r0, r5, #0 - add r0, #0xf0 - str r6, [r0, #0] -_022419BE: - ldr r1, [r4, #0x2c] - mov r0, #4 - tst r0, r1 - beq _022419D4 - ldr r0, _02241A18 ; =0x0000240C - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - bne _022419D4 - mov r4, #2 - b _022419D6 -_022419D4: - mov r4, #1 -_022419D6: - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - cmp r6, r0 - ble _022419F4 - mov r1, #1 - add r0, r5, #0 - mvn r1, r1 - bl ov16_02248AF0 - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, r4 - b _022419F6 -_022419F4: - mov r1, #0 -_022419F6: - add r0, r5, #0 - add r0, #0xf0 - str r1, [r0, #0] - ldr r1, _02241A1C ; =0x00003154 - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r5, r1] - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02241A10: .word 0x021BF67C -_02241A14: .word 0x00000C03 -_02241A18: .word 0x0000240C -_02241A1C: .word 0x00003154 - thumb_func_end ov16_02241984 - - thumb_func_start ov16_02241A20 -ov16_02241A20: ; 0x02241A20 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r3, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_02265EAC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02241A20 - - thumb_func_start ov16_02241A58 -ov16_02241A58: ; 0x02241A58 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r6, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r6, #0 - bl ov16_02248B10 - cmp r7, #6 - bhi _02241AF6 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02241AA2: ; jump table - .short _02241AB0 - _02241AA2 - 2 ; case 0 - .short _02241ABA - _02241AA2 - 2 ; case 1 - .short _02241AC4 - _02241AA2 - 2 ; case 2 - .short _02241ACE - _02241AA2 - 2 ; case 3 - .short _02241AD8 - _02241AA2 - 2 ; case 4 - .short _02241AE2 - _02241AA2 - 2 ; case 5 - .short _02241AEC - _02241AA2 - 2 ; case 6 -_02241AB0: - ldr r0, [r0, #0] - cmp r0, r4 - beq _02241AF6 - mov r5, #0 - b _02241AF6 -_02241ABA: - ldr r0, [r0, #0] - cmp r0, r4 - bne _02241AF6 - mov r5, #0 - b _02241AF6 -_02241AC4: - ldr r0, [r0, #0] - cmp r0, r4 - bgt _02241AF6 - mov r5, #0 - b _02241AF6 -_02241ACE: - ldr r0, [r0, #0] - cmp r0, r4 - ble _02241AF6 - mov r5, #0 - b _02241AF6 -_02241AD8: - ldr r0, [r0, #0] - tst r0, r4 - bne _02241AF6 - mov r5, #0 - b _02241AF6 -_02241AE2: - ldr r0, [r0, #0] - tst r0, r4 - beq _02241AF6 - mov r5, #0 - b _02241AF6 -_02241AEC: - ldr r0, [r0, #0] - and r0, r4 - cmp r4, r0 - beq _02241AF6 - mov r5, #0 -_02241AF6: - cmp r5, #0 - beq _02241B02 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02248AF0 -_02241B02: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02241A58 - - thumb_func_start ov16_02241B08 -ov16_02241B08: ; 0x02241B08 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r6, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - ldr r2, [sp, #8] - add r0, r6, #0 - mov r3, #0 - bl ov16_02252060 - cmp r7, #6 - bhi _02241BAC - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02241B66: ; jump table - .short _02241B74 - _02241B66 - 2 ; case 0 - .short _02241B7C - _02241B66 - 2 ; case 1 - .short _02241B84 - _02241B66 - 2 ; case 2 - .short _02241B8C - _02241B66 - 2 ; case 3 - .short _02241B94 - _02241B66 - 2 ; case 4 - .short _02241B9C - _02241B66 - 2 ; case 5 - .short _02241BA4 - _02241B66 - 2 ; case 6 -_02241B74: - cmp r0, r4 - beq _02241BAC - mov r5, #0 - b _02241BAC -_02241B7C: - cmp r0, r4 - bne _02241BAC - mov r5, #0 - b _02241BAC -_02241B84: - cmp r0, r4 - bgt _02241BAC - mov r5, #0 - b _02241BAC -_02241B8C: - cmp r0, r4 - ble _02241BAC - mov r5, #0 - b _02241BAC -_02241B94: - tst r0, r4 - bne _02241BAC - mov r5, #0 - b _02241BAC -_02241B9C: - tst r0, r4 - beq _02241BAC - mov r5, #0 - b _02241BAC -_02241BA4: - and r0, r4 - cmp r4, r0 - beq _02241BAC - mov r5, #0 -_02241BAC: - cmp r5, #0 - beq _02241BB8 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02248AF0 -_02241BB8: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02241B08 - - thumb_func_start ov16_02241BC0 -ov16_02241BC0: ; 0x02241BC0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02265ECC - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02241BC0 - - thumb_func_start ov16_02241BDC -ov16_02241BDC: ; 0x02241BDC - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248B00 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov16_02241BDC - - thumb_func_start ov16_02241BFC -ov16_02241BFC: ; 0x02241BFC - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r2, _02241C20 ; =0x00003044 - add r0, r4, #0 - ldr r2, [r4, r2] - mov r1, #0x1e - lsl r2, r2, #4 - add r3, r4, r2 - ldr r2, _02241C24 ; =0x000003DE - ldrh r2, [r3, r2] - bl ov16_02248B00 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02241C20: .word 0x00003044 -_02241C24: .word 0x000003DE - thumb_func_end ov16_02241BFC - - thumb_func_start ov16_02241C28 -ov16_02241C28: ; 0x02241C28 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - ldr r2, _02241CC0 ; =0x0000213C - mov r1, #1 - ldr r3, [r4, r2] - bic r3, r1 - str r3, [r4, r2] - ldr r3, [r4, r2] - ldr r1, _02241CC4 ; =0xFFFFBFFF - and r1, r3 - mov r3, #0x49 - lsl r3, r3, #2 - str r1, [r4, r2] - ldr r2, [r4, r3] - ldr r1, _02241CC8 ; =0x00003044 - cmp r0, #0 - str r2, [r4, r1] - bne _02241C98 - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r3, [r4, r3] - ldr r2, [r4, #0x64] - lsl r3, r3, #0x10 - add r0, r5, #0 - add r1, r4, #0 - lsr r3, r3, #0x10 - bl ov16_02253954 - str r0, [r4, #0x6c] - mov r3, #0x49 - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r2, [r4, #0x64] - lsl r3, r3, #0x10 - add r0, r5, #0 - add r1, r4, #0 - lsr r3, r3, #0x10 - bl ov16_02253C98 - ldr r0, [r4, #0x64] - ldr r2, [r4, #0x6c] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02241CCC ; =0x000021AC - str r2, [r1, r0] -_02241C98: - ldr r0, [r4, #0x6c] - cmp r0, #0xff - bne _02241CAE - mov r2, #0x26 - str r2, [r4, #0xc] - add r0, r4, #0 - mov r1, #1 - add r2, #0xf3 - bl ov16_02248B00 - b _02241CBA -_02241CAE: - ldr r2, _02241CC8 ; =0x00003044 - add r0, r4, #0 - ldr r2, [r4, r2] - mov r1, #0 - bl ov16_02248B00 -_02241CBA: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02241CC0: .word 0x0000213C -_02241CC4: .word 0xFFFFBFFF -_02241CC8: .word 0x00003044 -_02241CCC: .word 0x000021AC - thumb_func_end ov16_02241C28 - - thumb_func_start ov16_02241CD0 -ov16_02241CD0: ; 0x02241CD0 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - bne _02241CFA - add r0, r5, #0 - bl ov16_0223EBEC - mov r1, #1 - tst r0, r1 - beq _02241D02 -_02241CFA: - ldr r0, _02241D2C ; =0x00002150 - mov r1, #1 - str r1, [r4, r0] - b _02241D26 -_02241D02: - ldr r3, [r4, #0x6c] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov16_0225B45C - ldr r1, _02241D30 ; =0x0000214C - ldr r1, [r4, r1] - str r1, [sp] - str r0, [sp, #4] - ldr r2, [r4, #0x64] - ldr r3, [r4, #0x6c] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225AEE4 - ldr r1, _02241D2C ; =0x00002150 - str r0, [r4, r1] -_02241D26: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02241D2C: .word 0x00002150 -_02241D30: .word 0x0000214C - thumb_func_end ov16_02241CD0 - - thumb_func_start ov16_02241D34 -ov16_02241D34: ; 0x02241D34 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r7, r0, #0 - bl ov16_0223DF0C - add r4, r0, #0 - ldr r1, [r5, #0x74] - add r0, r7, #0 - bl ov16_0223DF14 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r1, r0, #0 - ldr r0, _02241EA8 ; =0x00000195 - ldrb r2, [r6, r0] - mov r0, #1 - tst r0, r2 - beq _02241D6E - mov r0, #0xa9 - lsl r0, r0, #2 - tst r0, r4 - beq _02241D70 -_02241D6E: - b _02241E9C -_02241D70: - mov r0, #0 - str r0, [sp, #4] - ldr r1, [sp, #4] - str r0, [sp] - add r4, r0, #0 - add r0, r7, #0 - bl ov16_0223DF20 - bl sub_0207A0F8 - cmp r0, #0 - ble _02241DFE -_02241D88: - add r0, r7, #0 - mov r1, #0 - add r2, r4, #0 - bl ov16_0223DFAC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02241DEC - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02241DEC - add r0, r4, #0 - bl sub_020787CC - ldr r1, [r5, #0x74] - asr r1, r1, #1 - lsl r1, r1, #0x1f - lsr r1, r1, #0x1d - add r1, r5, r1 - add r1, #0xa4 - ldr r1, [r1, #0] - tst r0, r1 - beq _02241DCC - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_02241DCC: - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - add r0, r5, #0 - mov r2, #1 - bl ov16_0225B0FC - cmp r0, #0x33 - bne _02241DEC - ldr r0, [sp] - add r0, r0, #1 - str r0, [sp] -_02241DEC: - add r0, r7, #0 - mov r1, #0 - add r4, r4, #1 - bl ov16_0223DF20 - bl sub_0207A0F8 - cmp r4, r0 - blt _02241D88 -_02241DFE: - ldr r1, [r5, #0x74] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r1, r0] - mov r1, #9 - bl sub_020759F0 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r2, [r5, #0x74] - mov r0, #0xc0 - mul r0, r2 - add r2, r5, r0 - ldr r0, _02241EAC ; =0x00002D74 - ldrb r0, [r2, r0] - mul r0, r1 - mov r1, #7 - bl sub_020E1F6C - lsl r0, r0, #0x10 - ldr r1, [sp] - lsr r0, r0, #0x10 - cmp r1, #0 - beq _02241E76 - lsr r4, r0, #1 - ldr r1, [sp, #4] - add r0, r4, #0 - bl sub_020E1F6C - add r1, r5, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x9c - ldr r0, [r0, #0] - cmp r0, #0 - bne _02241E56 - add r0, r5, #0 - mov r1, #1 - add r0, #0x9c - str r1, [r0, #0] -_02241E56: - ldr r1, [sp] - add r0, r4, #0 - bl sub_020E1F6C - add r1, r5, #0 - add r1, #0xa0 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02241EA2 - mov r0, #1 - add r5, #0xa0 - str r0, [r5, #0] - b _02241EA2 -_02241E76: - ldr r1, [sp, #4] - bl sub_020E1F6C - add r1, r5, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x9c - ldr r0, [r0, #0] - cmp r0, #0 - bne _02241E94 - add r0, r5, #0 - mov r1, #1 - add r0, #0x9c - str r1, [r0, #0] -_02241E94: - mov r0, #0 - add r5, #0xa0 - str r0, [r5, #0] - b _02241EA2 -_02241E9C: - add r0, r5, #0 - bl ov16_02248AF0 -_02241EA2: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241EA8: .word 0x00000195 -_02241EAC: .word 0x00002D74 - thumb_func_end ov16_02241D34 - - thumb_func_start ov16_02241EB0 -ov16_02241EB0: ; 0x02241EB0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #5 - mov r1, #0x58 - bl sub_02018144 - mov r1, #0x5e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r2, #0 - str r5, [r0, #0] - ldr r0, [r4, r1] - str r4, [r0, #4] - ldr r0, [r4, r1] - str r2, [r0, #0x28] - ldr r0, [r4, r1] - str r2, [r0, #0x48] - ldr r0, _02241EEC ; =ov16_02248E74 - ldr r1, [r4, r1] - bl sub_0200D9E8 - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02241EEC: .word ov16_02248E74 - thumb_func_end ov16_02241EB0 - - thumb_func_start ov16_02241EF0 -ov16_02241EF0: ; 0x02241EF0 - push {r4, lr} - mov r0, #0x5e - add r4, r1, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02241F06 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 -_02241F06: - ldr r1, _02241F18 ; =0x00003154 - mov r0, #1 - ldr r2, [r4, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r4, r1] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02241F18: .word 0x00003154 - thumb_func_end ov16_02241EF0 - - thumb_func_start ov16_02241F1C -ov16_02241F1C: ; 0x02241F1C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02241F1C - - thumb_func_start ov16_02241F34 -ov16_02241F34: ; 0x02241F34 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #8] - add r6, r0, #0 - bl ov16_0223DF1C - add r7, r0, #0 - ldr r0, [sp, #8] - mov r1, #1 - bl ov16_02248AF0 - mov r4, #0 - add r5, r4, #0 - cmp r7, #0 - ble _02241F8C - ldr r0, [sp, #8] - str r0, [sp, #0xc] -_02241F56: - mov r0, #0x4f - ldr r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _02241F80 - add r0, r5, #0 - bl sub_020787CC - orr r4, r0 - mov r0, #0 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r1, [sp, #8] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #1 - bl ov16_02265A8C -_02241F80: - ldr r0, [sp, #0xc] - add r5, r5, #1 - add r0, r0, #4 - str r0, [sp, #0xc] - cmp r5, r7 - blt _02241F56 -_02241F8C: - mov r5, #0 - cmp r7, #0 - ble _02241FE4 -_02241F92: - add r0, r6, #0 - bl ov16_0223DF0C - cmp r0, #7 - bne _02241FCC - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223E258 - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_020787CC - tst r0, r4 - bne _02241FDE - ldr r0, [sp, #0x10] - bl sub_020787CC - tst r0, r4 - bne _02241FDE - add r0, r5, #0 - bl sub_020787CC - orr r4, r0 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_022666E0 - b _02241FDE -_02241FCC: - add r0, r5, #0 - bl sub_020787CC - tst r0, r4 - bne _02241FDE - add r0, r6, #0 - add r1, r5, #0 - bl ov16_022666E0 -_02241FDE: - add r5, r5, #1 - cmp r5, r7 - blt _02241F92 -_02241FE4: - mov r0, #0 - cmp r7, #0 - ble _02242006 - mov r1, #0x4f - ldr r4, [sp, #8] - lsl r1, r1, #2 - mov r2, #1 -_02241FF2: - ldr r3, [r4, r1] - tst r3, r2 - beq _02241FFE - ldr r1, [sp, #8] - str r0, [r1, #0x78] - b _02242006 -_02241FFE: - add r0, r0, #1 - add r4, r4, #4 - cmp r0, r7 - blt _02241FF2 -_02242006: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_02241F34 - - thumb_func_start ov16_0224200C -ov16_0224200C: ; 0x0224200C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - add r5, r1, #0 - bl ov16_0223DF1C - add r7, r0, #0 - mov r6, #0 - add r0, r6, #0 - cmp r7, #0 - ble _0224203A - mov r4, #0x4f - add r1, r5, #0 - lsl r4, r4, #2 - mov r2, #1 -_0224202A: - ldr r3, [r1, r4] - tst r3, r2 - beq _02242032 - add r6, r6, #1 -_02242032: - add r0, r0, #1 - add r1, r1, #4 - cmp r0, r7 - blt _0224202A -_0224203A: - mov r4, #0 - cmp r7, #0 - ble _022420B6 - str r5, [sp, #8] - str r5, [sp, #4] -_02242044: - mov r0, #0x4f - ldr r1, [sp, #8] - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022420A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _022420A0 - mov r0, #0x23 - ldr r1, [sp, #4] - lsl r0, r0, #8 - ldrb r0, [r1, r0] - add r1, r5, r4 - sub r6, r6, #1 - sub r2, r0, #1 - ldr r0, _02242128 ; =0x000021A0 - strb r2, [r1, r0] - add r0, r4, #0 - bl sub_020787CC - mov r1, #0x85 - lsl r1, r1, #6 - ldr r1, [r5, r1] - lsl r0, r0, #0x18 - tst r0, r1 - bne _022420A0 - add r0, r4, #0 - bl sub_020787CC - mov r1, #0x85 - lsl r1, r1, #6 - ldr r1, [r5, r1] - lsl r0, r0, #0x18 - orr r1, r0 - mov r0, #0x85 - lsl r0, r0, #6 - str r1, [r5, r0] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_022666E0 -_022420A0: - ldr r0, [sp, #8] - ldr r1, [sp, #4] - add r0, r0, #4 - str r0, [sp, #8] - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - add r4, r4, #1 - str r0, [sp, #4] - cmp r4, r7 - blt _02242044 -_022420B6: - cmp r6, #0 - bne _02242112 - mov r4, #0 - cmp r7, #0 - ble _022420FE - str r5, [sp, #0xc] - add r6, r5, #0 -_022420C4: - mov r0, #0x4f - ldr r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022420EC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _022420EC - mov r2, #0x23 - lsl r2, r2, #8 - ldrb r2, [r6, r2] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223F500 -_022420EC: - ldr r0, [sp, #0xc] - add r4, r4, #1 - add r0, r0, #4 - str r0, [sp, #0xc] - mov r0, #1 - lsl r0, r0, #8 - add r6, r6, r0 - cmp r4, r7 - blt _022420C4 -_022420FE: - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r5, r1] - ldr r0, _0224212C ; =0xF0FFFFFF - and r0, r2 - str r0, [r5, r1] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 -_02242112: - ldr r1, _02242130 ; =0x00003154 - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r5, r1] - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02242128: .word 0x000021A0 -_0224212C: .word 0xF0FFFFFF -_02242130: .word 0x00003154 - thumb_func_end ov16_0224200C - - thumb_func_start ov16_02242134 -ov16_02242134: ; 0x02242134 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - cmp r0, #1 - beq _02242156 - cmp r0, #6 - beq _0224215A - cmp r0, #0x12 - beq _0224215E - b _02242160 -_02242156: - ldr r4, [r5, #0x64] - b _02242160 -_0224215A: - ldr r4, [r5, #0x78] - b _02242160 -_0224215E: - ldr r4, [r5, #0x6c] -_02242160: - mov r0, #0x4f - lsl r0, r0, #2 - add r3, r5, r0 - lsl r2, r4, #2 - ldr r1, [r3, r2] - mov r0, #1 - bic r1, r0 - add r0, r4, #0 - str r1, [r3, r2] - bl sub_020787CC - ldr r3, _022421C4 ; =0x00003108 - mov r2, #0 - mvn r2, r2 - eor r0, r2 - ldrb r1, [r5, r3] - add r2, r4, #0 - and r0, r1 - ldr r1, _022421C8 ; =0x000021A0 - strb r0, [r5, r3] - add r0, r5, r1 - sub r1, r1, #4 - add r6, r5, r1 - ldrb r1, [r0, r4] - strb r1, [r6, r4] - mov r1, #6 - strb r1, [r0, r4] - ldrb r3, [r6, r4] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0225177C - ldrb r3, [r6, r4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0225A200 - ldr r0, _022421CC ; =0x00002E4C - add r2, r4, #0 - ldr r1, [r5, r0] - ldr r0, _022421D0 ; =0x00003122 - strh r1, [r5, r0] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0225433C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022421C4: .word 0x00003108 -_022421C8: .word 0x000021A0 -_022421CC: .word 0x00002E4C -_022421D0: .word 0x00003122 - thumb_func_end ov16_02242134 - - thumb_func_start ov16_022421D4 -ov16_022421D4: ; 0x022421D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - bl ov16_0223DF1C - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - mov r0, #0 - cmp r4, #0 - ble _02242216 - mov r2, #0x4f - add r1, r5, #0 - lsl r2, r2, #2 - mov r3, #1 -_022421FC: - ldr r6, [r1, r2] - tst r6, r3 - beq _0224220E - str r0, [r5, #0x78] - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _02242216 -_0224220E: - add r0, r0, #1 - add r1, r1, #4 - cmp r0, r4 - blt _022421FC -_02242216: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_022421D4 - - thumb_func_start ov16_0224221C -ov16_0224221C: ; 0x0224221C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - mov r0, #5 - mov r1, #0x58 - bl sub_02018144 - mov r1, #0x5e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r2, #0 - str r5, [r0, #0] - ldr r0, [r4, r1] - str r4, [r0, #4] - ldr r0, [r4, r1] - str r2, [r0, #0x28] - ldr r0, [r4, r1] - str r6, [r0, #0x24] - add r0, r1, #0 - sub r0, #0x50 - ldr r3, [r4, r0] - ldr r0, [r4, r1] - str r3, [r0, #0x2c] - ldr r0, _02242268 ; =ov16_02249B80 - ldr r1, [r4, r1] - bl sub_0200D9E8 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02242268: .word ov16_02249B80 - thumb_func_end ov16_0224221C - - thumb_func_start ov16_0224226C -ov16_0224226C: ; 0x0224226C - push {r4, lr} - mov r0, #0x5e - add r4, r1, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02242282 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 -_02242282: - ldr r1, _02242294 ; =0x00003154 - mov r0, #1 - ldr r2, [r4, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r4, r1] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02242294: .word 0x00003154 - thumb_func_end ov16_0224226C - - thumb_func_start ov16_02242298 -ov16_02242298: ; 0x02242298 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - ldr r0, _02242304 ; =0x0000217D - ldrb r0, [r5, r0] - cmp r0, #0 - bne _02242300 - cmp r4, #0 - bne _022422F0 - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x5c - bne _022422D2 - mov r4, #5 - b _022422F0 -_022422D2: - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #3 - and r0, r1 - cmp r0, #2 - bge _022422E4 - add r4, r0, #2 - b _022422F0 -_022422E4: - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #3 - and r0, r1 - add r4, r0, #2 -_022422F0: - lsl r0, r4, #0x18 - ldr r1, _02242308 ; =0x0000217C - lsr r2, r0, #0x18 - strb r2, [r5, r1] - add r0, r1, #1 - strb r2, [r5, r0] - add r1, #0xc - str r7, [r5, r1] -_02242300: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242304: .word 0x0000217D -_02242308: .word 0x0000217C - thumb_func_end ov16_02242298 - - thumb_func_start ov16_0224230C -ov16_0224230C: ; 0x0224230C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r4, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r2, [sp] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_02248B10 - add r4, r0, #0 - cmp r6, #0x14 - bhi _022423F6 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224234E: ; jump table - .short _022423F6 - _0224234E - 2 ; case 0 - .short _022423F6 - _0224234E - 2 ; case 1 - .short _022423F6 - _0224234E - 2 ; case 2 - .short _022423F6 - _0224234E - 2 ; case 3 - .short _022423F6 - _0224234E - 2 ; case 4 - .short _022423F6 - _0224234E - 2 ; case 5 - .short _022423F6 - _0224234E - 2 ; case 6 - .short _02242378 - _0224234E - 2 ; case 7 - .short _0224237C - _0224234E - 2 ; case 8 - .short _02242384 - _0224234E - 2 ; case 9 - .short _0224238C - _0224234E - 2 ; case 10 - .short _02242394 - _0224234E - 2 ; case 11 - .short _022423A2 - _0224234E - 2 ; case 12 - .short _022423AC - _0224234E - 2 ; case 13 - .short _022423B8 - _0224234E - 2 ; case 14 - .short _022423C0 - _0224234E - 2 ; case 15 - .short _022423C8 - _0224234E - 2 ; case 16 - .short _022423D2 - _0224234E - 2 ; case 17 - .short _022423D8 - _0224234E - 2 ; case 18 - .short _022423E6 - _0224234E - 2 ; case 19 - .short _022423EE - _0224234E - 2 ; case 20 -_02242378: - str r5, [r4, #0] - b _022423FA -_0224237C: - ldr r0, [r4, #0] - add r0, r0, r5 - str r0, [r4, #0] - b _022423FA -_02242384: - ldr r0, [r4, #0] - sub r0, r0, r5 - str r0, [r4, #0] - b _022423FA -_0224238C: - ldr r0, [r4, #0] - orr r0, r5 - str r0, [r4, #0] - b _022423FA -_02242394: - mov r0, #0 - mvn r0, r0 - ldr r1, [r4, #0] - eor r0, r5 - and r0, r1 - str r0, [r4, #0] - b _022423FA -_022423A2: - ldr r0, [r4, #0] - add r1, r0, #0 - mul r1, r5 - str r1, [r4, #0] - b _022423FA -_022423AC: - ldr r0, [r4, #0] - add r1, r5, #0 - bl sub_020E1F6C - str r0, [r4, #0] - b _022423FA -_022423B8: - ldr r0, [r4, #0] - lsl r0, r5 - str r0, [r4, #0] - b _022423FA -_022423C0: - ldr r0, [r4, #0] - lsr r0, r5 - str r0, [r4, #0] - b _022423FA -_022423C8: - add r0, r5, #0 - bl sub_020787CC - str r0, [r4, #0] - b _022423FA -_022423D2: - bl sub_02022974 - b _022423FA -_022423D8: - ldr r0, [r4, #0] - sub r0, r0, r5 - str r0, [r4, #0] - bpl _022423FA - mov r0, #0 - str r0, [r4, #0] - b _022423FA -_022423E6: - ldr r0, [r4, #0] - eor r0, r5 - str r0, [r4, #0] - b _022423FA -_022423EE: - ldr r0, [r4, #0] - and r0, r5 - str r0, [r4, #0] - b _022423FA -_022423F6: - bl sub_02022974 -_022423FA: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224230C - - thumb_func_start ov16_02242400 -ov16_02242400: ; 0x02242400 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - mov r0, #0xb5 - add r5, r1, #0 - lsl r0, r0, #6 - add r2, r5, r0 - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r6, r2, r0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #0x14] - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #0x10] - add r0, r5, #0 - bl ov16_02248AD0 - ldr r1, _02242764 ; =0x0000213C - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #8] - ldr r2, [r5, r1] - ldr r0, _02242768 ; =0xFFFDFFFF - and r2, r0 - str r2, [r5, r1] - add r1, r5, #0 - add r1, #0x8c - ldr r4, [r1, #0] - cmp r4, #0x2e - blt _02242460 - asr r7, r0, #0x11 - mov r0, #0x4e - mov r1, #0xd - lsl r0, r0, #2 - sub r4, #0x2e - str r1, [r5, r0] - b _02242490 -_02242460: - cmp r4, #0x27 - blt _02242472 - mov r0, #0x4e - mov r1, #0xc - lsl r0, r0, #2 - sub r4, #0x27 - mov r7, #2 - str r1, [r5, r0] - b _02242490 -_02242472: - cmp r4, #0x16 - blt _02242484 - asr r7, r0, #0x12 - mov r0, #0x4e - mov r1, #0xd - lsl r0, r0, #2 - sub r4, #0x16 - str r1, [r5, r0] - b _02242490 -_02242484: - mov r0, #0x4e - mov r1, #0xc - lsl r0, r0, #2 - sub r4, #0xf - mov r7, #1 - str r1, [r5, r0] -_02242490: - cmp r7, #0 - bgt _02242496 - b _022425CE -_02242496: - add r1, r4, #1 - add r6, #0x18 - add r0, r6, r1 - str r0, [sp, #4] - ldrsb r0, [r6, r1] - cmp r0, #0xc - bne _022424FA - ldr r1, _02242764 ; =0x0000213C - mov r0, #2 - ldr r2, [r5, r1] - lsl r0, r0, #0x10 - orr r0, r2 - str r0, [r5, r1] - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - sub r0, r0, #2 - cmp r0, #1 - bhi _022424C6 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02248AF0 - b _022429F4 -_022424C6: - add r0, r5, #0 - mov r1, #0x8e - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0xc - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r1, r4, #1 - add r0, #0xfc - str r1, [r0, #0] - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov16_02248AF0 - b _022429F4 -_022424FA: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #3 - bne _02242546 - add r0, r5, #0 - ldr r1, _0224276C ; =0x0000026E - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x27 - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02242770 ; =0x00002D67 - add r2, r5, r2 - ldrb r2, [r2, r0] - add r0, r5, #0 - add r0, #0xfc - str r2, [r0, #0] - add r0, r4, #1 - add r1, #0x40 - str r0, [r5, r1] - b _022425B2 -_02242546: - cmp r0, #5 - bne _02242582 - mov r1, #0xbd - add r0, r5, #0 - lsl r1, r1, #2 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x2d - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - mov r1, #0x4a - lsl r1, r1, #2 - ldr r2, [r5, r1] - add r0, r5, #0 - add r0, #0xfc - str r2, [r0, #0] - add r0, r4, #1 - sub r1, #0x28 - str r0, [r5, r1] - b _022425B2 -_02242582: - cmp r7, #1 - bne _0224258A - ldr r1, _02242774 ; =0x000002EE - b _0224258C -_0224258A: - ldr r1, _02242778 ; =0x000002F1 -_0224258C: - add r0, r5, #0 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0xc - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r4, #1 - add r5, #0xfc - str r0, [r5, #0] -_022425B2: - ldr r0, [sp, #4] - mov r1, #0 - ldrsb r0, [r0, r1] - add r2, r0, r7 - ldr r0, [sp, #4] - strb r2, [r0] - ldrsb r0, [r0, r1] - cmp r0, #0xc - bgt _022425C6 - b _022429F4 -_022425C6: - ldr r0, [sp, #4] - mov r1, #0xc - strb r1, [r0] - b _022429F4 -_022425CE: - add r0, r5, #0 - add r0, #0x90 - ldr r1, [r0, #0] - mov r0, #2 - lsl r0, r0, #0x1a - tst r1, r0 - beq _022425DE - b _02242958 -_022425DE: - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - ldr r2, [r5, #0x64] - cmp r2, r1 - bne _022425EC - b _022428A0 -_022425EC: - ldr r0, [sp] - bl ov16_0223E208 - lsl r0, r0, #3 - mov r1, #0x71 - add r0, r5, r0 - lsl r1, r1, #2 - ldr r0, [r0, r1] - lsl r0, r0, #0x11 - lsr r0, r0, #0x1d - beq _0224262A - add r0, r5, #0 - sub r1, #0xb3 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #2 - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - mov r0, #1 - str r0, [sp, #8] - b _02242908 -_0224262A: - add r2, r5, #0 - add r2, #0x94 - ldr r1, [r5, #0x64] - ldr r2, [r2, #0] - add r0, r5, #0 - mov r3, #0x1d - bl ov16_02255AB4 - cmp r0, #1 - beq _02242652 - add r2, r5, #0 - add r2, #0x94 - ldr r1, [r5, #0x64] - ldr r2, [r2, #0] - add r0, r5, #0 - mov r3, #0x49 - bl ov16_02255AB4 - cmp r0, #1 - bne _022426F4 -_02242652: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #3 - bne _022426B6 - add r0, r5, #0 - ldr r1, _0224277C ; =0x000002D7 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x35 - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02242770 ; =0x00002D67 - ldrb r1, [r1, r0] - add r0, r5, #0 - add r0, #0xfc - str r1, [r0, #0] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255560 - mov r1, #1 - lsl r1, r1, #8 - str r0, [r5, r1] - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02242770 ; =0x00002D67 - add r2, r5, r2 - ldrb r0, [r2, r0] - add r1, #0x44 - str r0, [r5, r1] - b _022426EE -_022426B6: - add r0, r5, #0 - ldr r1, _02242780 ; =0x0000029D - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0xb - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02242770 ; =0x00002D67 - ldrb r1, [r1, r0] - add r0, r5, #0 - add r0, #0xfc - str r1, [r0, #0] -_022426EE: - mov r0, #1 - str r0, [sp, #8] - b _02242908 -_022426F4: - add r2, r5, #0 - add r2, #0x94 - ldr r1, [r5, #0x64] - ldr r2, [r2, #0] - add r0, r5, #0 - mov r3, #0x33 - bl ov16_02255AB4 - cmp r0, #1 - bne _0224270E - add r0, r4, #1 - cmp r0, #6 - beq _02242726 -_0224270E: - add r2, r5, #0 - add r2, #0x94 - ldr r1, [r5, #0x64] - ldr r2, [r2, #0] - add r0, r5, #0 - mov r3, #0x34 - bl ov16_02255AB4 - cmp r0, #1 - bne _022427F4 - cmp r4, #0 - bne _022427F4 -_02242726: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #3 - bne _022427AC - add r0, r5, #0 - ldr r1, _0224277C ; =0x000002D7 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x35 - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02242770 ; =0x00002D67 - b _02242784 - nop -_02242764: .word 0x0000213C -_02242768: .word 0xFFFDFFFF -_0224276C: .word 0x0000026E -_02242770: .word 0x00002D67 -_02242774: .word 0x000002EE -_02242778: .word 0x000002F1 -_0224277C: .word 0x000002D7 -_02242780: .word 0x0000029D -_02242784: - ldrb r1, [r1, r0] - add r0, r5, #0 - add r0, #0xfc - str r1, [r0, #0] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255560 - mov r1, #1 - lsl r1, r1, #8 - str r0, [r5, r1] - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _022429FC ; =0x00002D67 - add r2, r5, r2 - ldrb r0, [r2, r0] - add r1, #0x44 - b _022427EC -_022427AC: - mov r1, #0xb - add r0, r5, #0 - lsl r1, r1, #6 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x27 - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _022429FC ; =0x00002D67 - add r2, r5, r2 - ldrb r2, [r2, r0] - add r0, r5, #0 - add r0, #0xfc - str r2, [r0, #0] - add r0, r4, #1 - add r1, #0x40 -_022427EC: - str r0, [r5, r1] - mov r0, #1 - str r0, [sp, #8] - b _02242908 -_022427F4: - add r0, r4, #1 - add r1, r6, r0 - mov r0, #0x18 - ldrsb r0, [r1, r0] - cmp r0, #0 - bne _0224285E - ldr r1, _02242A00 ; =0x0000213C - mov r0, #2 - ldr r2, [r5, r1] - lsl r0, r0, #0x10 - orr r0, r2 - str r0, [r5, r1] - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - sub r0, r0, #2 - cmp r0, #1 - bhi _02242826 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242826: - add r0, r5, #0 - mov r1, #0x91 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0xc - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r1, r4, #1 - add r0, #0xfc - str r1, [r0, #0] - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224285E: - add r2, r5, #0 - add r2, #0x94 - ldr r1, [r5, #0x64] - ldr r2, [r2, #0] - add r0, r5, #0 - mov r3, #0x13 - bl ov16_02255AB4 - cmp r0, #1 - bne _02242882 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #2 - bne _02242882 - mov r0, #1 - str r0, [sp, #8] - b _02242908 -_02242882: - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02242A04 ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x18 - tst r0, r1 - beq _02242908 - mov r0, #2 - str r0, [sp, #8] - b _02242908 -_022428A0: - add r1, r4, #1 - add r2, r6, r1 - mov r1, #0x18 - ldrsb r1, [r2, r1] - cmp r1, #0 - bne _02242908 - ldr r1, _02242A00 ; =0x0000213C - lsr r0, r0, #0xa - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - sub r0, r0, #2 - cmp r0, #1 - bhi _022428D0 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022428D0: - add r0, r5, #0 - mov r1, #0x91 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0xc - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - add r1, r4, #1 - add r0, #0xfc - str r1, [r0, #0] - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242908: - ldr r0, [sp, #8] - cmp r0, #2 - bne _02242926 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #1 - bne _02242926 - ldr r1, [sp, #0xc] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242926: - ldr r0, [sp, #8] - cmp r0, #0 - beq _02242944 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #2 - bne _02242944 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242944: - ldr r0, [sp, #8] - cmp r0, #0 - beq _02242958 - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242958: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #3 - bne _022429AC - add r0, r5, #0 - ldr r1, _02242A08 ; =0x00000296 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x36 - add r0, #0xf5 - strb r1, [r0] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _022429FC ; =0x00002D67 - ldrb r1, [r1, r0] - add r0, r5, #0 - add r0, #0xfc - str r1, [r0, #0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - mov r1, #1 - lsl r1, r1, #8 - str r0, [r5, r1] - add r2, r4, #1 - add r0, r1, #4 - str r2, [r5, r0] - b _022429E0 -_022429AC: - mov r0, #0 - mvn r0, r0 - cmp r7, r0 - bne _022429B8 - ldr r1, _02242A0C ; =0x000002FA - b _022429BA -_022429B8: - ldr r1, _02242A10 ; =0x000002FD -_022429BA: - add r0, r5, #0 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0xc - add r0, #0xf5 - strb r1, [r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r4, #1 - add r5, #0xfc - str r0, [r5, #0] -_022429E0: - add r6, #0x18 - add r1, r4, #1 - ldrsb r0, [r6, r1] - add r0, r0, r7 - strb r0, [r6, r1] - ldrsb r0, [r6, r1] - cmp r0, #0 - bge _022429F4 - mov r0, #0 - strb r0, [r6, r1] -_022429F4: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_022429FC: .word 0x00002D67 -_02242A00: .word 0x0000213C -_02242A04: .word 0x00002DB0 -_02242A08: .word 0x00000296 -_02242A0C: .word 0x000002FA -_02242A10: .word 0x000002FD - thumb_func_end ov16_02242400 - - thumb_func_start ov16_02242A14 -ov16_02242A14: ; 0x02242A14 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - ldr r0, [sp] - ldr r2, [sp, #8] - add r1, r5, #0 - bl ov16_0224A984 - str r0, [sp, #4] - ldr r1, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02252060 - str r0, [sp, #0xc] - cmp r7, #0x14 - bhi _02242B00 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242A6E: ; jump table - .short _02242B00 - _02242A6E - 2 ; case 0 - .short _02242B00 - _02242A6E - 2 ; case 1 - .short _02242B00 - _02242A6E - 2 ; case 2 - .short _02242B00 - _02242A6E - 2 ; case 3 - .short _02242B00 - _02242A6E - 2 ; case 4 - .short _02242B00 - _02242A6E - 2 ; case 5 - .short _02242B00 - _02242A6E - 2 ; case 6 - .short _02242A98 - _02242A6E - 2 ; case 7 - .short _02242A9C - _02242A6E - 2 ; case 8 - .short _02242AA2 - _02242A6E - 2 ; case 9 - .short _02242AA8 - _02242A6E - 2 ; case 10 - .short _02242AAE - _02242A6E - 2 ; case 11 - .short _02242ABA - _02242A6E - 2 ; case 12 - .short _02242AC2 - _02242A6E - 2 ; case 13 - .short _02242ACC - _02242A6E - 2 ; case 14 - .short _02242AD2 - _02242A6E - 2 ; case 15 - .short _02242AD8 - _02242A6E - 2 ; case 16 - .short _02242AE2 - _02242A6E - 2 ; case 17 - .short _02242AE8 - _02242A6E - 2 ; case 18 - .short _02242AF4 - _02242A6E - 2 ; case 19 - .short _02242AFA - _02242A6E - 2 ; case 20 -_02242A98: - str r4, [sp, #0xc] - b _02242B04 -_02242A9C: - add r0, r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242AA2: - sub r0, r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242AA8: - orr r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242AAE: - mov r1, #0 - mvn r1, r1 - eor r1, r4 - and r0, r1 - str r0, [sp, #0xc] - b _02242B04 -_02242ABA: - add r1, r0, #0 - mul r1, r4 - str r1, [sp, #0xc] - b _02242B04 -_02242AC2: - add r1, r4, #0 - bl sub_020E1F6C - str r0, [sp, #0xc] - b _02242B04 -_02242ACC: - lsl r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242AD2: - lsr r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242AD8: - add r0, r4, #0 - bl sub_020787CC - str r0, [sp, #0xc] - b _02242B04 -_02242AE2: - bl sub_02022974 - b _02242B04 -_02242AE8: - sub r0, r0, r4 - str r0, [sp, #0xc] - bpl _02242B04 - mov r0, #0 - str r0, [sp, #0xc] - b _02242B04 -_02242AF4: - eor r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242AFA: - and r0, r4 - str r0, [sp, #0xc] - b _02242B04 -_02242B00: - bl sub_02022974 -_02242B04: - cmp r6, #0x1a - bne _02242B1A - ldr r1, [sp, #4] - ldr r2, [sp, #0xc] - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl ov16_0224B928 -_02242B1A: - ldr r1, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - add r3, sp, #0xc - bl ov16_022523E8 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r5, #0 - bl ov16_02253EC0 - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02242A14 - - thumb_func_start ov16_02242B38 -ov16_02242B38: ; 0x02242B38 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_0224A984 - ldr r1, _02242B70 ; =0x0000218C - add r2, r5, r1 - lsl r1, r0, #2 - ldr r0, [r2, r1] - orr r0, r4 - str r0, [r2, r1] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242B70: .word 0x0000218C - thumb_func_end ov16_02242B38 - - thumb_func_start ov16_02242B74 -ov16_02242B74: ; 0x02242B74 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - add r2, r7, #0 - bl ov16_02265EE8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02242B74 - - thumb_func_start ov16_02242BAC -ov16_02242BAC: ; 0x02242BAC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - cmp r4, #0 - bne _02242C22 - ldr r0, [sp] - bl ov16_0223DF1C - mov r4, #0 - str r0, [sp, #4] - cmp r0, #0 - ble _02242C64 -_02242BEE: - cmp r7, #0 - bne _02242C0C - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _02242C18 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] - b _02242C64 -_02242C0C: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r6, r0 - beq _02242C64 -_02242C18: - ldr r0, [sp, #4] - add r4, r4, #1 - cmp r4, r0 - blt _02242BEE - b _02242C64 -_02242C22: - ldr r0, [sp] - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r4, r0, #0 - cmp r7, #0 - bne _02242C4C - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _02242C64 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] - b _02242C64 -_02242C4C: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r6, r0 - beq _02242C64 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] -_02242C64: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02242BAC - - thumb_func_start ov16_02242C6C -ov16_02242C6C: ; 0x02242C6C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r7, #0 - bl ov16_0223F4BC - add r1, r4, #1 - bl sub_020E1F6C - mov r0, #0x4d - add r1, r6, r1 - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02242C6C - - thumb_func_start ov16_02242CA4 -ov16_02242CA4: ; 0x02242CA4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_02248B10 - add r4, r0, #0 - ldr r2, [sp] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_02248B10 - add r1, r0, #0 - cmp r6, #0x14 - bhi _02242DB2 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02242CF2: ; jump table - .short _02242DB2 - _02242CF2 - 2 ; case 0 - .short _02242DB2 - _02242CF2 - 2 ; case 1 - .short _02242DB2 - _02242CF2 - 2 ; case 2 - .short _02242DB2 - _02242CF2 - 2 ; case 3 - .short _02242DB2 - _02242CF2 - 2 ; case 4 - .short _02242DB2 - _02242CF2 - 2 ; case 5 - .short _02242DB2 - _02242CF2 - 2 ; case 6 - .short _02242D1C - _02242CF2 - 2 ; case 7 - .short _02242D22 - _02242CF2 - 2 ; case 8 - .short _02242D2C - _02242CF2 - 2 ; case 9 - .short _02242D36 - _02242CF2 - 2 ; case 10 - .short _02242D40 - _02242CF2 - 2 ; case 11 - .short _02242D50 - _02242CF2 - 2 ; case 12 - .short _02242D5A - _02242CF2 - 2 ; case 13 - .short _02242D66 - _02242CF2 - 2 ; case 14 - .short _02242D72 - _02242CF2 - 2 ; case 15 - .short _02242D7E - _02242CF2 - 2 ; case 16 - .short _02242D88 - _02242CF2 - 2 ; case 17 - .short _02242D8E - _02242CF2 - 2 ; case 18 - .short _02242D9E - _02242CF2 - 2 ; case 19 - .short _02242DA8 - _02242CF2 - 2 ; case 20 -_02242D1C: - ldr r0, [r1, #0] - str r0, [r4, #0] - b _02242DB6 -_02242D22: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - add r0, r2, r0 - str r0, [r4, #0] - b _02242DB6 -_02242D2C: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - sub r0, r2, r0 - str r0, [r4, #0] - b _02242DB6 -_02242D36: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - orr r0, r2 - str r0, [r4, #0] - b _02242DB6 -_02242D40: - mov r0, #0 - ldr r1, [r1, #0] - mvn r0, r0 - ldr r2, [r4, #0] - eor r0, r1 - and r0, r2 - str r0, [r4, #0] - b _02242DB6 -_02242D50: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - mul r0, r2 - str r0, [r4, #0] - b _02242DB6 -_02242D5A: - ldr r0, [r4, #0] - ldr r1, [r1, #0] - bl sub_020E1F6C - str r0, [r4, #0] - b _02242DB6 -_02242D66: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - add r1, r2, #0 - lsl r1, r0 - str r1, [r4, #0] - b _02242DB6 -_02242D72: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - add r1, r2, #0 - lsr r1, r0 - str r1, [r4, #0] - b _02242DB6 -_02242D7E: - ldr r0, [r1, #0] - bl sub_020787CC - str r0, [r4, #0] - b _02242DB6 -_02242D88: - ldr r0, [r4, #0] - str r0, [r1, #0] - b _02242DB6 -_02242D8E: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - sub r0, r2, r0 - str r0, [r4, #0] - bpl _02242DB6 - mov r0, #0 - str r0, [r4, #0] - b _02242DB6 -_02242D9E: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - eor r0, r2 - str r0, [r4, #0] - b _02242DB6 -_02242DA8: - ldr r2, [r4, #0] - ldr r0, [r1, #0] - and r0, r2 - str r0, [r4, #0] - b _02242DB6 -_02242DB2: - bl sub_02022974 -_02242DB6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02242CA4 - - thumb_func_start ov16_02242DBC -ov16_02242DBC: ; 0x02242DBC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r5, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - ldr r2, [sp, #4] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0224A984 - str r0, [sp] - ldr r1, [sp] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02252060 - str r0, [sp, #0xc] - ldr r2, [sp, #8] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_02248B10 - add r1, r0, #0 - cmp r5, #0x14 - bhi _02242EE2 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02242E22: ; jump table - .short _02242EE2 - _02242E22 - 2 ; case 0 - .short _02242EE2 - _02242E22 - 2 ; case 1 - .short _02242EE2 - _02242E22 - 2 ; case 2 - .short _02242EE2 - _02242E22 - 2 ; case 3 - .short _02242EE2 - _02242E22 - 2 ; case 4 - .short _02242EE2 - _02242E22 - 2 ; case 5 - .short _02242EE2 - _02242E22 - 2 ; case 6 - .short _02242E4C - _02242E22 - 2 ; case 7 - .short _02242E52 - _02242E22 - 2 ; case 8 - .short _02242E5C - _02242E22 - 2 ; case 9 - .short _02242E66 - _02242E22 - 2 ; case 10 - .short _02242E70 - _02242E22 - 2 ; case 11 - .short _02242E80 - _02242E22 - 2 ; case 12 - .short _02242E8A - _02242E22 - 2 ; case 13 - .short _02242E96 - _02242E22 - 2 ; case 14 - .short _02242EA2 - _02242E22 - 2 ; case 15 - .short _02242EAE - _02242E22 - 2 ; case 16 - .short _02242EB8 - _02242E22 - 2 ; case 17 - .short _02242EBE - _02242E22 - 2 ; case 18 - .short _02242ECE - _02242E22 - 2 ; case 19 - .short _02242ED8 - _02242E22 - 2 ; case 20 -_02242E4C: - ldr r0, [r1, #0] - str r0, [sp, #0xc] - b _02242EE6 -_02242E52: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - add r0, r2, r0 - str r0, [sp, #0xc] - b _02242EE6 -_02242E5C: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - sub r0, r2, r0 - str r0, [sp, #0xc] - b _02242EE6 -_02242E66: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - orr r0, r2 - str r0, [sp, #0xc] - b _02242EE6 -_02242E70: - ldr r2, [r1, #0] - mov r1, #0 - mvn r1, r1 - ldr r0, [sp, #0xc] - eor r1, r2 - and r0, r1 - str r0, [sp, #0xc] - b _02242EE6 -_02242E80: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - mul r0, r2 - str r0, [sp, #0xc] - b _02242EE6 -_02242E8A: - ldr r0, [sp, #0xc] - ldr r1, [r1, #0] - bl sub_020E1F6C - str r0, [sp, #0xc] - b _02242EE6 -_02242E96: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - add r1, r2, #0 - lsl r1, r0 - str r1, [sp, #0xc] - b _02242EE6 -_02242EA2: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - add r1, r2, #0 - lsr r1, r0 - str r1, [sp, #0xc] - b _02242EE6 -_02242EAE: - ldr r0, [r1, #0] - bl sub_020787CC - str r0, [sp, #0xc] - b _02242EE6 -_02242EB8: - ldr r0, [sp, #0xc] - str r0, [r1, #0] - b _02242EE6 -_02242EBE: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - sub r0, r2, r0 - str r0, [sp, #0xc] - bpl _02242EE6 - mov r0, #0 - str r0, [sp, #0xc] - b _02242EE6 -_02242ECE: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - eor r0, r2 - str r0, [sp, #0xc] - b _02242EE6 -_02242ED8: - ldr r2, [sp, #0xc] - ldr r0, [r1, #0] - and r0, r2 - str r0, [sp, #0xc] - b _02242EE6 -_02242EE2: - bl sub_02022974 -_02242EE6: - cmp r5, #0x11 - beq _02242F16 - cmp r6, #0x1a - bne _02242F00 - ldr r1, [sp] - ldr r2, [sp, #0xc] - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl ov16_0224B928 -_02242F00: - ldr r1, [sp] - add r0, r4, #0 - add r2, r6, #0 - add r3, sp, #0xc - bl ov16_022523E8 - ldr r2, [sp] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_02253EC0 -_02242F16: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02242DBC - - thumb_func_start ov16_02242F1C -ov16_02242F1C: ; 0x02242F1C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_02248AF0 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02242F1C - - thumb_func_start ov16_02242F3C -ov16_02242F3C: ; 0x02242F3C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248B08 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov16_02242F3C - - thumb_func_start ov16_02242F5C -ov16_02242F5C: ; 0x02242F5C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248B10 - add r2, r0, #0 - ldr r2, [r2, #0] - add r0, r4, #0 - mov r1, #1 - bl ov16_02248B08 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02242F5C - - thumb_func_start ov16_02242F8C -ov16_02242F8C: ; 0x02242F8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - mov r4, #0 - bl ov16_0223DF0C - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r5, #0x64] - lsl r0, r1, #1 - add r2, r5, r0 - ldr r0, _0224308C ; =0x00003084 - ldrh r2, [r2, r0] - cmp r2, #0 - beq _02242FB6 - add r4, r2, #0 - b _02243002 -_02242FB6: - mov r2, #2 - tst r2, r7 - beq _02243002 - lsl r1, r1, #3 - add r4, r5, r1 - add r1, r0, #0 - add r1, #0xe - ldrh r3, [r4, r1] - add r1, r0, #0 - add r1, #0xc - ldrh r2, [r4, r1] - add r1, r0, #0 - add r1, #8 - add r0, #0xa - ldrh r1, [r4, r1] - ldrh r0, [r4, r0] - add r0, r1, r0 - add r0, r2, r0 - add r4, r3, r0 - beq _02243002 - ldr r7, _02243090 ; =0x0000308C -_02242FE0: - add r0, r6, #0 - bl ov16_0223F4BC - ldr r1, [r5, #0x64] - lsl r3, r0, #0x1e - lsl r2, r1, #3 - lsr r1, r0, #0x1f - sub r3, r3, r1 - mov r0, #0x1e - ror r3, r0 - add r0, r1, r3 - lsl r1, r0, #1 - add r0, r5, r2 - add r0, r1, r0 - ldrh r4, [r0, r7] - cmp r4, #0 - beq _02242FE0 -_02243002: - cmp r4, #0 - beq _0224306C - lsl r1, r4, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - bl ov16_0225B084 - cmp r0, #1 - bne _0224306C - ldr r1, _02243094 ; =0x0000213C - lsl r3, r4, #0x10 - ldr r2, [r5, r1] - mov r0, #1 - bic r2, r0 - str r2, [r5, r1] - ldr r2, [r5, r1] - ldr r0, _02243098 ; =0xFFFFBFFF - lsr r3, r3, #0x10 - and r0, r2 - str r0, [r5, r1] - ldr r0, _0224309C ; =0x00003044 - add r1, r5, #0 - str r4, [r5, r0] - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r2, [r5, #0x64] - add r0, r6, #0 - bl ov16_02253954 - str r0, [r5, #0x6c] - cmp r0, #0xff - bne _02243056 - mov r2, #0x26 - str r2, [r5, #0xc] - add r0, r5, #0 - mov r1, #1 - add r2, #0xf3 - bl ov16_02248B00 - b _02243086 -_02243056: - ldr r1, [r5, #0x64] - lsl r1, r1, #4 - add r2, r5, r1 - ldr r1, _022430A0 ; =0x000021AC - str r0, [r2, r1] - add r0, r5, #0 - mov r1, #0 - add r2, r4, #0 - bl ov16_02248B00 - b _02243086 -_0224306C: - ldr r2, [r5, #0x64] - mov r0, #0xb5 - lsl r0, r0, #2 - mov r1, #0x1c - add r3, r2, #0 - mul r3, r1 - add r0, r5, r0 - ldr r2, [r0, r3] - mov r1, #1 - bic r2, r1 - mov r1, #1 - orr r1, r2 - str r1, [r0, r3] -_02243086: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224308C: .word 0x00003084 -_02243090: .word 0x0000308C -_02243094: .word 0x0000213C -_02243098: .word 0xFFFFBFFF -_0224309C: .word 0x00003044 -_022430A0: .word 0x000021AC - thumb_func_end ov16_02242F8C - - thumb_func_start ov16_022430A4 -ov16_022430A4: ; 0x022430A4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_0223DF1C - mov r2, #0 - cmp r0, #0 - ble _022430E4 - ldr r6, _022430E8 ; =0x00002D58 - mov r1, #6 - add r5, r6, #0 - add r5, #0x58 -_022430C6: - mov r7, #0 -_022430C8: - add r3, r4, r7 - add r7, r7, #1 - strb r1, [r3, r6] - cmp r7, #8 - blt _022430C8 - ldr r3, _022430EC ; =0x00002DB0 - add r2, r2, #1 - ldr r7, [r4, r3] - ldr r3, _022430F0 ; =0xFFEFFFFF - and r3, r7 - str r3, [r4, r5] - add r4, #0xc0 - cmp r2, r0 - blt _022430C6 -_022430E4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022430E8: .word 0x00002D58 -_022430EC: .word 0x00002DB0 -_022430F0: .word 0xFFEFFFFF - thumb_func_end ov16_022430A4 - - thumb_func_start ov16_022430F4 -ov16_022430F4: ; 0x022430F4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02253EF0 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_022430F4 - - thumb_func_start ov16_02243120 -ov16_02243120: ; 0x02243120 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02253F20 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02243120 - - thumb_func_start ov16_0224314C -ov16_0224314C: ; 0x0224314C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - add r2, r7, #0 - bl ov16_02265FB8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224314C - - thumb_func_start ov16_02243184 -ov16_02243184: ; 0x02243184 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - add r2, r7, #0 - bl ov16_02265FD8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02243184 - - thumb_func_start ov16_022431BC -ov16_022431BC: ; 0x022431BC - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r7, r0, #0 - add r5, r1, #0 - str r2, [sp] - mov r0, #5 - mov r1, #0x6c - bl sub_02018144 - add r4, r0, #0 - ldr r0, [sp] - add r6, r7, #0 - lsl r0, r0, #1 - add r6, #0xa0 - str r0, [sp, #4] - ldrh r0, [r6, r0] - add r1, sp, #8 - bl sub_0207938C - ldr r0, [sp, #4] - add r1, r4, #0 - ldrh r0, [r6, r0] - bl sub_0207939C - add r0, sp, #8 - ldrb r1, [r0] - cmp r1, #3 - bhi _02243208 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02243200: ; jump table - .short _02243208 - _02243200 - 2 ; case 0 - .short _0224321A - _02243200 - 2 ; case 1 - .short _0224322A - _02243200 - 2 ; case 2 - .short _0224323C - _02243200 - 2 ; case 3 -_02243208: - add r0, sp, #8 - ldrb r0, [r0, #3] - sub r0, r0, #1 - lsl r0, r0, #3 - add r0, r4, r0 - ldrh r0, [r0, #2] - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - b _0224324C -_0224321A: - ldrb r0, [r0, #3] - sub r0, r0, #1 - lsl r0, r0, #4 - add r0, r4, r0 - ldrh r0, [r0, #2] - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - b _0224324C -_0224322A: - ldrb r0, [r0, #3] - sub r1, r0, #1 - mov r0, #0xa - mul r0, r1 - add r0, r4, r0 - ldrh r0, [r0, #2] - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - b _0224324C -_0224323C: - ldrb r0, [r0, #3] - sub r1, r0, #1 - mov r0, #0x12 - mul r0, r1 - add r0, r4, r0 - ldrh r0, [r0, #2] - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 -_0224324C: - ldr r2, [r7, #0x2c] - mov r0, #0x10 - tst r0, r2 - bne _02243258 - cmp r2, #0x4b - bne _0224326E -_02243258: - add r0, sp, #8 - ldrb r2, [r0, #1] - ldr r0, _022432AC ; =0x02270B20 - lsl r1, r1, #2 - ldrb r0, [r0, r2] - ldr r2, _022432B0 ; =0x00002168 - ldr r2, [r5, r2] - add r5, r0, #0 - mul r1, r2 - mul r5, r1 - b _0224329E -_0224326E: - mov r0, #2 - tst r0, r2 - add r0, sp, #8 - beq _0224328C - ldrb r2, [r0, #1] - ldr r0, _022432AC ; =0x02270B20 - lsl r1, r1, #2 - ldrb r0, [r0, r2] - ldr r2, _022432B0 ; =0x00002168 - ldr r2, [r5, r2] - add r5, r0, #0 - mul r1, r2 - lsl r1, r1, #1 - mul r5, r1 - b _0224329E -_0224328C: - ldrb r2, [r0, #1] - ldr r0, _022432AC ; =0x02270B20 - lsl r1, r1, #2 - ldrb r0, [r0, r2] - ldr r2, _022432B0 ; =0x00002168 - ldr r2, [r5, r2] - add r5, r0, #0 - mul r1, r2 - mul r5, r1 -_0224329E: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_022432AC: .word 0x02270B20 -_022432B0: .word 0x00002168 - thumb_func_end ov16_022431BC - - thumb_func_start ov16_022432B4 -ov16_022432B4: ; 0x022432B4 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, _02243330 ; =0x00002420 - ldrb r0, [r5, r0] - cmp r0, #1 - bne _022432FE - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - bl ov16_022431BC - add r4, r0, #0 - ldr r1, [r5, #0x2c] - mov r0, #0x10 - tst r0, r1 - bne _022432E2 - cmp r1, #0x4b - bne _022432EE -_022432E2: - add r0, r5, #0 - add r1, r6, #0 - mov r2, #3 - bl ov16_022431BC - add r4, r4, r0 -_022432EE: - add r0, r5, #0 - mov r1, #0 - bl ov16_0223E16C - add r1, r4, #0 - bl sub_02025F94 - b _02243316 -_022432FE: - ldr r0, [r5, #0x68] - ldr r1, [r5, #0x48] - bl ov16_0223F904 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov16_0223E16C - add r1, r4, #0 - bl sub_02025FB8 -_02243316: - cmp r4, #0 - beq _02243322 - mov r0, #0x13 - lsl r0, r0, #4 - str r4, [r6, r0] - b _0224332A -_02243322: - mov r0, #0x13 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r6, r0] -_0224332A: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02243330: .word 0x00002420 - thumb_func_end ov16_022432B4 - - thumb_func_start ov16_02243334 -ov16_02243334: ; 0x02243334 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_0223EDAC - cmp r0, #1 - beq _0224336C - cmp r4, #0xf - beq _0224336C - cmp r4, #0x10 - beq _0224336C - add r0, r4, #0 - sub r0, #0x19 - cmp r0, #1 - bhi _02243392 -_0224336C: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_0224A984 - add r7, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov16_0225B1DC - cmp r0, #1 - bne _02243392 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov16_02265FF8 -_02243392: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02243334 - - thumb_func_start ov16_02243398 -ov16_02243398: ; 0x02243398 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_0223EDAC - cmp r0, #1 - beq _022433DA - cmp r4, #0xf - beq _022433DA - cmp r4, #0x10 - beq _022433DA - add r0, r4, #0 - sub r0, #0x19 - cmp r0, #1 - bhi _0224341C -_022433DA: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_0224A984 - add r7, r0, #0 - ldr r2, [sp, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0224A984 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov16_0225B1DC - cmp r0, #1 - bne _0224341C - ldr r1, [sp, #8] - add r0, r5, #0 - add r2, r4, #0 - bl ov16_0225B1DC - cmp r0, #1 - bne _0224341C - ldr r3, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - str r4, [sp] - bl ov16_02266028 -_0224341C: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02243398 - - thumb_func_start ov16_02243424 -ov16_02243424: ; 0x02243424 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov16_02248B10 - add r4, r0, #0 - add r0, r7, #0 - bl ov16_0223EDAC - cmp r0, #1 - beq _02243474 - cmp r6, #0xf - beq _02243474 - cmp r6, #0x10 - beq _02243474 - ldr r0, [r4, #0] - sub r0, #0x19 - cmp r0, #1 - bhi _0224348E -_02243474: - ldr r1, [sp] - ldr r2, [r4, #0] - add r0, r5, #0 - bl ov16_0225B1DC - cmp r0, #1 - bne _0224348E - ldr r2, [sp] - ldr r3, [r4, #0] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_02265FF8 -_0224348E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02243424 - - thumb_func_start ov16_02243494 -ov16_02243494: ; 0x02243494 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r1, r4, #0 - ldr r3, _022434C8 ; =0x0000219C - add r4, r4, r2 - ldrb r3, [r4, r3] - add r0, r5, #0 - bl ov16_02266058 - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022434C8: .word 0x0000219C - thumb_func_end ov16_02243494 - - thumb_func_start ov16_022434CC -ov16_022434CC: ; 0x022434CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r1, r4, #0 - ldr r3, _02243500 ; =0x0000219C - add r4, r4, r2 - ldrb r3, [r4, r3] - add r0, r5, #0 - bl ov16_0226609C - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02243500: .word 0x0000219C - thumb_func_end ov16_022434CC - - thumb_func_start ov16_02243504 -ov16_02243504: ; 0x02243504 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_022660E8 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02243504 - - thumb_func_start ov16_02243530 -ov16_02243530: ; 0x02243530 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02266100 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02243530 - - thumb_func_start ov16_0224355C -ov16_0224355C: ; 0x0224355C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - mov r2, #0x13 - lsl r2, r2, #4 - add r1, r0, #0 - ldr r2, [r4, r2] - add r0, r5, #0 - bl ov16_02265FD8 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0224355C - - thumb_func_start ov16_0224358C -ov16_0224358C: ; 0x0224358C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x79 - bne _022435BE - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02248AF0 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022435BE: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _022436FC ; =0x00002D4C - mov r6, #0 -_022435CA: - ldrh r1, [r2, r0] - cmp r1, #0 - beq _022435D8 - add r6, r6, #1 - add r2, r2, #2 - cmp r6, #4 - blt _022435CA -_022435D8: - mov r0, #0 - str r0, [sp, #8] - cmp r6, #0 - ble _02243650 - add r7, r0, #0 -_022435E2: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r0, r4, r0 - add r2, r7, r0 - ldr r0, _022436FC ; =0x00002D4C - ldrh r0, [r2, r0] - cmp r0, #0xa0 - beq _02243644 - lsl r0, r0, #4 - add r2, r4, r0 - ldr r0, _02243700 ; =0x000003E2 - ldrb r5, [r2, r0] - cmp r5, #9 - bne _02243624 - add r0, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #7 - beq _0224361E - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #7 - bne _02243622 -_0224361E: - mov r5, #7 - b _02243624 -_02243622: - mov r5, #0 -_02243624: - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r5, r0 - beq _02243644 - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r5, r0 - bne _02243650 -_02243644: - ldr r0, [sp, #8] - add r7, r7, #2 - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, r6 - blt _022435E2 -_02243650: - ldr r0, [sp, #8] - cmp r0, r6 - bne _02243660 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02248AF0 - b _022436F4 -_02243660: - ldr r7, _022436FC ; =0x00002D4C -_02243662: - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r6, #0 - bl sub_020E1F6C - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - lsl r1, r1, #1 - add r0, r4, r0 - add r0, r1, r0 - ldrh r0, [r0, r7] - cmp r0, #0xa0 - beq _02243662 - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02243700 ; =0x000003E2 - ldrb r5, [r1, r0] - cmp r5, #9 - bne _022436B2 - add r1, r2, #0 - add r0, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #7 - beq _022436AC - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #7 - bne _022436B0 -_022436AC: - mov r5, #7 - b _022436B2 -_022436B0: - mov r5, #0 -_022436B2: - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r5, r0 - beq _02243662 - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r5, r0 - beq _02243662 - ldr r1, [r4, #0x64] - lsl r0, r5, #0x18 - add r3, r1, #0 - mov r2, #0xc0 - mul r3, r2 - ldr r1, _02243704 ; =0x00002D64 - lsr r0, r0, #0x18 - add r3, r4, r3 - strb r0, [r3, r1] - ldr r3, [r4, #0x64] - add r1, r1, #1 - add r6, r3, #0 - mul r6, r2 - add r3, r4, r6 - strb r0, [r3, r1] - add r2, #0x70 - str r5, [r4, r2] -_022436F4: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022436FC: .word 0x00002D4C -_02243700: .word 0x000003E2 -_02243704: .word 0x00002D64 - thumb_func_end ov16_0224358C - - thumb_func_start ov16_02243708 -ov16_02243708: ; 0x02243708 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r6, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r0, [sp] - add r1, r6, #0 - add r2, r4, #0 - bl ov16_02248B10 - add r4, r0, #0 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r6, #0 - bl ov16_02248B10 - cmp r7, #6 - bhi _022437C0 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224375E: ; jump table - .short _0224376C - _0224375E - 2 ; case 0 - .short _02243778 - _0224375E - 2 ; case 1 - .short _02243784 - _0224375E - 2 ; case 2 - .short _02243790 - _0224375E - 2 ; case 3 - .short _0224379C - _0224375E - 2 ; case 4 - .short _022437A8 - _0224375E - 2 ; case 5 - .short _022437B4 - _0224375E - 2 ; case 6 -_0224376C: - ldr r1, [r4, #0] - ldr r0, [r0, #0] - cmp r1, r0 - beq _022437C0 - mov r5, #0 - b _022437C0 -_02243778: - ldr r1, [r4, #0] - ldr r0, [r0, #0] - cmp r1, r0 - bne _022437C0 - mov r5, #0 - b _022437C0 -_02243784: - ldr r1, [r4, #0] - ldr r0, [r0, #0] - cmp r1, r0 - bhi _022437C0 - mov r5, #0 - b _022437C0 -_02243790: - ldr r1, [r4, #0] - ldr r0, [r0, #0] - cmp r1, r0 - bls _022437C0 - mov r5, #0 - b _022437C0 -_0224379C: - ldr r1, [r4, #0] - ldr r0, [r0, #0] - tst r0, r1 - bne _022437C0 - mov r5, #0 - b _022437C0 -_022437A8: - ldr r1, [r4, #0] - ldr r0, [r0, #0] - tst r0, r1 - beq _022437C0 - mov r5, #0 - b _022437C0 -_022437B4: - ldr r1, [r0, #0] - ldr r0, [r4, #0] - and r0, r1 - cmp r1, r0 - beq _022437C0 - mov r5, #0 -_022437C0: - cmp r5, #0 - beq _022437CC - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02248AF0 -_022437CC: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02243708 - - thumb_func_start ov16_022437D4 -ov16_022437D4: ; 0x022437D4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r6, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r0, [sp] - add r1, r6, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - ldr r2, [sp, #4] - add r0, r6, #0 - mov r3, #0 - bl ov16_02252060 - add r4, r0, #0 - ldr r0, [sp] - ldr r2, [sp, #8] - add r1, r6, #0 - bl ov16_02248B10 - cmp r7, #6 - bhi _02243894 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224383E: ; jump table - .short _0224384C - _0224383E - 2 ; case 0 - .short _02243856 - _0224383E - 2 ; case 1 - .short _02243860 - _0224383E - 2 ; case 2 - .short _0224386A - _0224383E - 2 ; case 3 - .short _02243874 - _0224383E - 2 ; case 4 - .short _0224387E - _0224383E - 2 ; case 5 - .short _02243888 - _0224383E - 2 ; case 6 -_0224384C: - ldr r0, [r0, #0] - cmp r4, r0 - beq _02243894 - mov r5, #0 - b _02243894 -_02243856: - ldr r0, [r0, #0] - cmp r4, r0 - bne _02243894 - mov r5, #0 - b _02243894 -_02243860: - ldr r0, [r0, #0] - cmp r4, r0 - bhi _02243894 - mov r5, #0 - b _02243894 -_0224386A: - ldr r0, [r0, #0] - cmp r4, r0 - bls _02243894 - mov r5, #0 - b _02243894 -_02243874: - ldr r0, [r0, #0] - tst r0, r4 - bne _02243894 - mov r5, #0 - b _02243894 -_0224387E: - ldr r0, [r0, #0] - tst r0, r4 - beq _02243894 - mov r5, #0 - b _02243894 -_02243888: - ldr r1, [r0, #0] - add r0, r1, #0 - and r0, r4 - cmp r1, r0 - beq _02243894 - mov r5, #0 -_02243894: - cmp r5, #0 - beq _022438A0 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02248AF0 -_022438A0: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_022437D4 - - thumb_func_start ov16_022438A8 -ov16_022438A8: ; 0x022438A8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r1, _022438F0 ; =0x00002168 - ldr r2, [r4, r0] - ldr r1, [r4, r1] - add r3, r2, #0 - mul r3, r1 - add r1, r0, #0 - sub r1, #0x1c - str r3, [r4, r1] - add r1, r0, #0 - sub r1, #0x1c - ldr r2, [r4, r1] - ldr r1, _022438F4 ; =0x0000FFFF - cmp r2, r1 - ble _022438DA - sub r0, #0x1c - str r1, [r4, r0] -_022438DA: - add r0, r5, #0 - mov r1, #0 - bl ov16_0223E16C - mov r1, #0x13 - lsl r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02025F94 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022438F0: .word 0x00002168 -_022438F4: .word 0x0000FFFF - thumb_func_end ov16_022438A8 - - thumb_func_start ov16_022438F8 -ov16_022438F8: ; 0x022438F8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - ldr r1, [r5, #0x64] - add r0, r7, #0 - bl ov16_0223E208 - add r6, r0, #0 - mov r0, #0x6f - lsl r0, r0, #2 - add r3, r5, r0 - lsl r2, r6, #2 - ldr r1, [r3, r2] - mov r4, #2 - tst r4, r1 - beq _0224393C - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 - ldr r1, _022439CC ; =0x0000216C - mov r0, #0x40 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] - b _022439C8 -_0224393C: - mov r4, #2 - orr r1, r4 - str r1, [r3, r2] - add r1, r0, #0 - add r1, #8 - add r4, r5, r1 - lsl r6, r6, #3 - ldr r2, [r4, r6] - ldr r1, _022439D0 ; =0xFFFFFC7F - add r0, #0xc4 - and r1, r2 - orr r0, r1 - str r0, [r4, r6] - ldr r0, [r4, r6] - mov r1, #0x60 - bic r0, r1 - ldr r1, [r5, #0x64] - lsl r1, r1, #0x1e - lsr r1, r1, #0x19 - orr r0, r1 - str r0, [r4, r6] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02258AB8 - cmp r0, #0x61 - bne _02243990 - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - ldr r1, [r4, r6] - ldr r2, _022439D0 ; =0xFFFFFC7F - and r2, r1 - lsl r1, r1, #0x16 - lsr r1, r1, #0x1d - add r0, r1, r0 - lsl r0, r0, #0x1d - lsr r0, r0, #0x16 - orr r0, r2 - str r0, [r4, r6] -_02243990: - add r0, r5, #0 - mov r1, #0x14 - add r0, #0xf5 - strb r1, [r0] - ldr r0, _022439D4 ; =0x00003044 - mov r2, #1 - ldr r1, [r5, r0] - add r0, r5, #0 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0xfc - str r1, [r0, #0] - ldr r3, [r5, #0x64] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_022554E0 - cmp r0, #2 - bne _022439C2 - mov r0, #0xc0 - add r5, #0xf6 - strh r0, [r5] - b _022439C8 -_022439C2: - mov r0, #0xbe - add r5, #0xf6 - strh r0, [r5] -_022439C8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022439CC: .word 0x0000216C -_022439D0: .word 0xFFFFFC7F -_022439D4: .word 0x00003044 - thumb_func_end ov16_022438F8 - - thumb_func_start ov16_022439D8 -ov16_022439D8: ; 0x022439D8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - ldr r1, [r5, #0x64] - add r0, r7, #0 - bl ov16_0223E208 - add r6, r0, #0 - mov r0, #0x6f - lsl r0, r0, #2 - add r3, r5, r0 - lsl r2, r6, #2 - ldr r1, [r3, r2] - mov r4, #1 - tst r4, r1 - beq _02243A1C - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 - ldr r1, _02243AB0 ; =0x0000216C - mov r0, #0x40 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] - b _02243AAA -_02243A1C: - mov r4, #1 - orr r1, r4 - add r0, #8 - add r4, r5, r0 - lsl r6, r6, #3 - str r1, [r3, r2] - ldr r1, [r4, r6] - mov r0, #0x1c - bic r1, r0 - mov r0, #0x14 - orr r0, r1 - str r0, [r4, r6] - ldr r0, [r4, r6] - mov r1, #3 - bic r0, r1 - ldr r2, [r5, #0x64] - mov r1, #3 - and r1, r2 - orr r0, r1 - str r0, [r4, r6] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02258AB8 - cmp r0, #0x61 - bne _02243A72 - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - ldr r1, [r4, r6] - add r3, r0, #0 - mov r0, #0x1c - add r2, r1, #0 - bic r2, r0 - lsl r0, r1, #0x1b - lsr r0, r0, #0x1d - add r0, r0, r3 - lsl r0, r0, #0x1d - lsr r0, r0, #0x1b - orr r0, r2 - str r0, [r4, r6] -_02243A72: - add r0, r5, #0 - mov r1, #0x14 - add r0, #0xf5 - strb r1, [r0] - ldr r0, _02243AB4 ; =0x00003044 - mov r2, #1 - ldr r1, [r5, r0] - add r0, r5, #0 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0xfc - str r1, [r0, #0] - ldr r3, [r5, #0x64] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_022554E0 - cmp r0, #2 - bne _02243AA4 - mov r0, #0xc4 - add r5, #0xf6 - strh r0, [r5] - b _02243AAA -_02243AA4: - mov r0, #0xc2 - add r5, #0xf6 - strh r0, [r5] -_02243AAA: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243AB0: .word 0x0000216C -_02243AB4: .word 0x00003044 - thumb_func_end ov16_022439D8 - - thumb_func_start ov16_02243AB8 -ov16_02243AB8: ; 0x02243AB8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - mov r5, #0x6f - add r2, r0, #0 - lsl r5, r5, #2 - add r1, r4, r5 - lsl r0, r2, #2 - ldr r6, [r1, r0] - mov r3, #0x40 - tst r3, r6 - beq _02243AFC - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02248AF0 - ldr r1, _02243B2C ; =0x0000216C - mov r0, #0x40 - ldr r2, [r4, r1] - orr r0, r2 - str r0, [r4, r1] - b _02243B26 -_02243AFC: - mov r3, #0x40 - orr r3, r6 - str r3, [r1, r0] - add r5, #8 - lsl r0, r2, #3 - add r1, r4, r5 - ldr r3, [r1, r0] - ldr r2, _02243B30 ; =0xFFFF8FFF - and r3, r2 - mov r2, #5 - lsl r2, r2, #0xc - orr r2, r3 - str r2, [r1, r0] - ldr r3, [r1, r0] - ldr r2, _02243B34 ; =0xFFFFF3FF - and r3, r2 - ldr r2, [r4, #0x64] - lsl r2, r2, #0x1e - lsr r2, r2, #0x14 - orr r2, r3 - str r2, [r1, r0] -_02243B26: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243B2C: .word 0x0000216C -_02243B30: .word 0xFFFF8FFF -_02243B34: .word 0xFFFFF3FF - thumb_func_end ov16_02243AB8 - - thumb_func_start ov16_02243B38 -ov16_02243B38: ; 0x02243B38 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, _02243D0C ; =0x0000213C - mov r0, #1 - ldr r2, [r4, r1] - lsl r0, r0, #0xa - orr r0, r2 - str r0, [r4, r1] - ldr r1, [r4, #0x64] - ldr r2, [r4, #0x6c] - add r0, r4, #0 - mov r3, #5 - bl ov16_02255AB4 - cmp r0, #1 - bne _02243B70 - ldr r1, _02243D10 ; =0x0000216C - mov r0, #2 - ldr r2, [r4, r1] - lsl r0, r0, #0x12 - orr r0, r2 - str r0, [r4, r1] - b _02243D08 -_02243B70: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r1, [r1, r0] - mov r0, #0x18 - tst r0, r1 - bne _02243BF8 - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x63 - beq _02243BF8 - ldr r1, [r4, #0x6c] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x63 - beq _02243BF8 - ldr r0, _02243D14 ; =0x00003044 - mov r2, #0xc0 - ldr r0, [r4, r0] - ldr r5, [r4, #0x6c] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02243D18 ; =0x000003E3 - ldrb r1, [r1, r0] - ldr r0, [r4, #0x64] - add r3, r0, #0 - mul r3, r2 - add r0, r4, r3 - ldr r3, _02243D1C ; =0x00002D74 - mul r2, r5 - add r2, r4, r2 - ldrb r0, [r0, r3] - ldrb r2, [r2, r3] - sub r0, r0, r2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r5 - bge _02243BF4 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _02243D1C ; =0x00002D74 - add r2, r4, r2 - ldrb r3, [r2, r1] - ldr r2, [r4, #0x6c] - mul r0, r2 - add r0, r4, r0 - ldrb r0, [r0, r1] - cmp r3, r0 - blo _02243BF4 - mov r3, #1 - b _02243CB2 -_02243BF4: - mov r3, #0 - b _02243CB2 -_02243BF8: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r3, r4, r0 - ldr r0, _02243D20 ; =0x00002DCC - ldr r1, [r4, #0x64] - ldr r2, [r3, r0] - lsl r2, r2, #0x1e - lsr r2, r2, #0x1e - cmp r1, r2 - bne _02243C18 - sub r0, #0xc - ldr r2, [r3, r0] - mov r0, #0x18 - tst r0, r2 - bne _02243C2E -_02243C18: - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x63 - beq _02243C2E - ldr r1, [r4, #0x6c] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x63 - bne _02243C4C -_02243C2E: - ldr r0, [r4, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r3, [r4, #0x6c] - add r0, r4, r2 - ldr r2, _02243D1C ; =0x00002D74 - mul r1, r3 - add r1, r4, r1 - ldrb r0, [r0, r2] - ldrb r1, [r1, r2] - cmp r0, r1 - blo _02243C4C - mov r3, #1 - b _02243CA6 -_02243C4C: - ldr r0, _02243D14 ; =0x00003044 - mov r2, #0xc0 - ldr r0, [r4, r0] - ldr r5, [r4, #0x6c] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02243D18 ; =0x000003E3 - ldrb r1, [r1, r0] - ldr r0, [r4, #0x64] - add r3, r0, #0 - mul r3, r2 - add r0, r4, r3 - ldr r3, _02243D1C ; =0x00002D74 - mul r2, r5 - add r2, r4, r2 - ldrb r0, [r0, r3] - ldrb r2, [r2, r3] - sub r0, r0, r2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r5 - bge _02243CA4 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _02243D1C ; =0x00002D74 - add r2, r4, r2 - ldrb r3, [r2, r1] - ldr r2, [r4, #0x6c] - mul r0, r2 - add r0, r4, r0 - ldrb r0, [r0, r1] - cmp r3, r0 - blo _02243CA4 - mov r3, #1 - b _02243CA6 -_02243CA4: - mov r3, #0 -_02243CA6: - ldr r1, _02243D10 ; =0x0000216C - mov r0, #1 - ldr r2, [r4, r1] - lsl r0, r0, #0xa - orr r0, r2 - str r0, [r4, r1] -_02243CB2: - cmp r3, #0 - beq _02243CD8 - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02243D24 ; =0x00002D8C - ldr r0, [r1, r0] - ldr r1, _02243D28 ; =0x00002144 - neg r0, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x28 - ldr r2, [r4, r0] - mov r0, #0x20 - orr r0, r2 - add r1, #0x28 - str r0, [r4, r1] - b _02243D08 -_02243CD8: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _02243D1C ; =0x00002D74 - add r2, r4, r2 - ldrb r3, [r2, r1] - ldr r2, [r4, #0x6c] - mul r0, r2 - add r0, r4, r0 - ldrb r0, [r0, r1] - cmp r3, r0 - ldr r1, _02243D10 ; =0x0000216C - blo _02243CFE - ldr r2, [r4, r1] - mov r0, #1 - orr r0, r2 - str r0, [r4, r1] - b _02243D08 -_02243CFE: - mov r0, #1 - ldr r2, [r4, r1] - lsl r0, r0, #0xc - orr r0, r2 - str r0, [r4, r1] -_02243D08: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02243D0C: .word 0x0000213C -_02243D10: .word 0x0000216C -_02243D14: .word 0x00003044 -_02243D18: .word 0x000003E3 -_02243D1C: .word 0x00002D74 -_02243D20: .word 0x00002DCC -_02243D24: .word 0x00002D8C -_02243D28: .word 0x00002144 - thumb_func_end ov16_02243B38 - - thumb_func_start ov16_02243D2C -ov16_02243D2C: ; 0x02243D2C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_02248B10 - add r4, r0, #0 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_022563F8 - str r0, [r4, #0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02243D2C - - thumb_func_start ov16_02243D64 -ov16_02243D64: ; 0x02243D64 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_02248B10 - add r4, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02248B10 - add r1, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bge _02243DA6 - mov r5, #0 - mvn r5, r5 - b _02243DA8 -_02243DA6: - mov r5, #1 -_02243DA8: - ldr r0, [r4, #0] - ldr r1, [r1, #0] - bl sub_020E1F6C - str r0, [r4, #0] - cmp r0, #0 - bne _02243DB8 - str r5, [r4, #0] -_02243DB8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02243D64 - - thumb_func_start ov16_02243DBC -ov16_02243DBC: ; 0x02243DBC - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - str r0, [sp] - ldr r0, [r6, #0x6c] - lsl r0, r0, #1 - add r1, r6, r0 - ldr r0, _02243EE0 ; =0x0000307C - ldrh r0, [r1, r0] - bl ov16_0225AFF4 - cmp r0, #0 - beq _02243E16 - ldr r0, [r6, #0x64] - mov r2, #2 - mov r3, #0xc0 - add r1, r0, #0 - mul r1, r3 - add r0, r6, r1 - ldr r1, _02243EE4 ; =0x00002DB0 - mov ip, r0 - ldr r0, [r0, r1] - lsl r2, r2, #0x14 - tst r0, r2 - bne _02243E16 - ldr r0, [r6, #0x6c] - add r4, r0, #0 - mul r4, r3 - add r4, r6, r4 - ldr r4, [r4, r1] - lsl r1, r2, #3 - tst r1, r4 - bne _02243E16 - lsl r0, r0, #1 - add r1, r6, r0 - ldr r0, _02243EE0 ; =0x0000307C - ldrh r7, [r1, r0] - cmp r7, #0 - bne _02243E20 -_02243E16: - ldr r1, [sp] - add r0, r6, #0 - bl ov16_02248AF0 - b _02243EDC -_02243E20: - mov r2, #0 - sub r3, #0xc1 - mov r4, ip - add r5, r2, #0 -_02243E28: - ldr r0, _02243EE8 ; =0x00002D4C - ldrh r0, [r4, r0] - cmp r7, r0 - beq _02243E50 - mov r0, ip - add r1, r0, r5 - ldr r0, _02243EE8 ; =0x00002D4C - ldrh r0, [r1, r0] - cmp r0, #0x66 - bne _02243E46 - mov r0, #0 - mvn r0, r0 - cmp r3, r0 - bne _02243E46 - add r3, r2, #0 -_02243E46: - add r2, r2, #1 - add r4, r4, #2 - add r5, r5, #2 - cmp r2, #4 - blt _02243E28 -_02243E50: - cmp r2, #4 - bne _02243ED4 - mov r4, #0x49 - lsl r4, r4, #2 - str r7, [r6, r4] - ldr r2, [r6, #0x64] - mov r1, #0xc0 - add r5, r2, #0 - mul r5, r1 - add r5, r6, r5 - lsl r2, r3, #1 - add r5, r5, r2 - ldr r0, [r6, r4] - ldr r2, _02243EE8 ; =0x00002D4C - strh r0, [r5, r2] - ldr r0, [r6, r4] - lsl r0, r0, #4 - add r4, r6, r0 - mov r0, #0xf9 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #5 - bhs _02243E80 - b _02243E82 -_02243E80: - mov r0, #5 -_02243E82: - ldr r4, [r6, #0x64] - add r2, #0x20 - mul r1, r4 - add r1, r6, r1 - add r1, r1, r3 - strb r0, [r1, r2] - add r0, r3, #0 - bl sub_020787CC - ldr r1, _02243EEC ; =0x00002DCC - mov r4, #0xc0 - add r3, r6, r1 - ldr r1, [r6, #0x64] - mov r5, #0x3c - add r2, r1, #0 - mul r2, r4 - ldr r7, [r3, r2] - add r1, r7, #0 - bic r1, r5 - lsl r5, r7, #0x1a - lsr r5, r5, #0x1c - orr r0, r5 - lsl r0, r0, #0x1c - lsr r0, r0, #0x1a - orr r0, r1 - str r0, [r3, r2] - add r0, r4, #0 - add r0, #0x64 - ldr r1, [r6, r0] - add r0, r4, #0 - add r0, #0xc3 - cmp r1, r0 - bne _02243EDC - ldr r0, [r6, #0x64] - add r2, r0, #0 - mul r2, r4 - ldr r1, [r3, r2] - ldr r0, _02243EF0 ; =0xFFFFE3FF - and r0, r1 - str r0, [r3, r2] - b _02243EDC -_02243ED4: - ldr r1, [sp] - add r0, r6, #0 - bl ov16_02248AF0 -_02243EDC: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243EE0: .word 0x0000307C -_02243EE4: .word 0x00002DB0 -_02243EE8: .word 0x00002D4C -_02243EEC: .word 0x00002DCC -_02243EF0: .word 0xFFFFE3FF - thumb_func_end ov16_02243DBC - - thumb_func_start ov16_02243EF4 -ov16_02243EF4: ; 0x02243EF4 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r4, _02243F4C ; =0x00002D4C -_02243F04: - add r0, r7, #0 - bl ov16_0223F4BC - ldr r1, _02243F50 ; =0x000001D3 - bl sub_020E1F6C - add r0, r1, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r3, [r6, #0x64] - mov r0, #0xc0 - mul r0, r3 - mov r1, #0 - add r2, r6, r0 -_02243F20: - ldrh r0, [r2, r4] - cmp r5, r0 - beq _02243F2E - add r1, r1, #1 - add r2, r2, #2 - cmp r1, #4 - blt _02243F20 -_02243F2E: - cmp r1, #4 - bne _02243F04 - add r2, r3, #0 - add r0, r7, #0 - add r1, r6, #0 - add r3, r5, #0 - bl ov16_0225B02C - cmp r0, #0 - beq _02243F04 - mov r0, #0x49 - lsl r0, r0, #2 - str r5, [r6, r0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243F4C: .word 0x00002D4C -_02243F50: .word 0x000001D3 - thumb_func_end ov16_02243EF4 - - thumb_func_start ov16_02243F54 -ov16_02243F54: ; 0x02243F54 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - mov r0, #0xb5 - lsl r0, r0, #6 - add r2, r4, r0 - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - lsl r1, r1, #1 - add r0, r2, r0 - add r2, r4, r1 - ldr r1, _02244008 ; =0x0000307C - ldrh r1, [r2, r1] - bl ov16_02254EE0 - add r3, r0, #0 - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - ldr r7, _0224400C ; =0x00002DE8 - add r1, r4, r0 - ldrh r0, [r1, r7] - cmp r0, #0 - bne _02243FFA - cmp r3, #4 - beq _02243FFA - add r0, r7, #0 - add r1, r1, r3 - sub r0, #0x7c - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02243FFA - lsl r0, r2, #1 - add r1, r4, r0 - ldr r0, _02244008 ; =0x0000307C - ldrh r1, [r1, r0] - cmp r1, #0 - beq _02243FFA - mov r0, #0xc0 - add r0, #0x64 - str r1, [r4, r0] - mov r0, #0xc0 - add r0, #0x64 - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - ldr r0, [r4, r0] - add r1, r4, r1 - strh r0, [r1, r7] - add r0, r5, #0 - bl ov16_0223F4BC - add r1, r7, #0 - sub r1, #0x20 - add r3, r4, r1 - ldr r4, [r4, #0x6c] - mov r1, #0xc0 - add r2, r4, #0 - mul r2, r1 - ldr r1, [r3, r2] - mov r4, #7 - bic r1, r4 - lsr r5, r0, #0x1f - lsl r4, r0, #0x1e - sub r4, r4, r5 - mov r0, #0x1e - ror r4, r0 - add r0, r5, r4 - add r4, r0, #3 - mov r0, #7 - and r0, r4 - orr r0, r1 - str r0, [r3, r2] - b _02244002 -_02243FFA: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02244002: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244008: .word 0x0000307C -_0224400C: .word 0x00002DE8 - thumb_func_end ov16_02243F54 - - thumb_func_start ov16_02244010 -ov16_02244010: ; 0x02244010 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r5, #0x64] - lsl r0, r1, #6 - add r2, r5, r0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r4, [r2, r0] - ldr r0, [sp] - bl ov16_0223E208 - str r0, [sp, #4] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223E208 - ldr r6, [r5, #0x64] - add r3, r0, #0 - lsl r0, r6, #6 - add r1, r5, r0 - lsl r0, r4, #2 - add r0, r1, r0 - mov r1, #0x76 - lsl r1, r1, #2 - ldr r7, [r0, r1] - cmp r7, #0 - beq _022440D6 - ldr r0, [sp, #4] - cmp r0, r3 - beq _022440D6 - mov r0, #0xc0 - mul r0, r4 - add r2, r5, r0 - ldr r0, _02244100 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _022440D6 - ldr r0, _02244104 ; =0x00002144 - lsl r2, r7, #1 - sub r1, #0x14 - str r2, [r5, r0] - add r1, r5, r1 - lsl r0, r3, #3 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _02244090 - lsl r0, r0, #9 - lsr r0, r0, #0x1e - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - ldr r1, _02244100 ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _02244090 - str r0, [r5, #0x6c] - b _02244092 -_02244090: - str r4, [r5, #0x6c] -_02244092: - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02244100 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - bne _022440CA - ldr r0, [sp] - ldr r2, [r5, #0x64] - add r1, r5, #0 - bl ov16_02257028 - mov r1, #0xc0 - mul r1, r0 - str r0, [r5, #0x6c] - ldr r0, _02244100 ; =0x00002D8C - add r1, r5, r1 - ldr r0, [r1, r0] - cmp r0, #0 - bne _022440CA - mov r2, #0x26 - str r2, [r5, #0xc] - add r0, r5, #0 - mov r1, #1 - add r2, #0xf3 - bl ov16_02248B00 -_022440CA: - ldr r1, [r5, #0x64] - ldr r2, [r5, #0x6c] - add r0, r5, #0 - bl ov16_0225B408 - b _022440F8 -_022440D6: - mov r0, #0xb5 - lsl r0, r0, #2 - mov r1, #0x1c - add r3, r6, #0 - mul r3, r1 - add r0, r5, r0 - ldr r2, [r0, r3] - mov r1, #1 - bic r2, r1 - mov r1, #1 - orr r1, r2 - str r1, [r0, r3] - ldr r1, _02244108 ; =0x0000216C - mov r0, #0x40 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] -_022440F8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244100: .word 0x00002D8C -_02244104: .word 0x00002144 -_02244108: .word 0x0000216C - thumb_func_end ov16_02244010 - - thumb_func_start ov16_0224410C -ov16_0224410C: ; 0x0224410C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r5, #0x64] - lsl r0, r1, #6 - add r2, r5, r0 - mov r0, #2 - lsl r0, r0, #8 - ldr r4, [r2, r0] - ldr r0, [sp] - bl ov16_0223E208 - str r0, [sp, #4] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223E208 - ldr r6, [r5, #0x64] - add r3, r0, #0 - lsl r0, r6, #6 - add r1, r5, r0 - lsl r0, r4, #2 - add r0, r1, r0 - mov r1, #0x1f - lsl r1, r1, #4 - ldr r7, [r0, r1] - cmp r7, #0 - beq _022441D2 - ldr r0, [sp, #4] - cmp r0, r3 - beq _022441D2 - mov r0, #0xc0 - mul r0, r4 - add r2, r5, r0 - ldr r0, _022441FC ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _022441D2 - ldr r0, _02244200 ; =0x00002144 - lsl r2, r7, #1 - sub r1, #0x2c - str r2, [r5, r0] - add r1, r5, r1 - lsl r0, r3, #3 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _0224418C - lsl r0, r0, #9 - lsr r0, r0, #0x1e - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - ldr r1, _022441FC ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _0224418C - str r0, [r5, #0x6c] - b _0224418E -_0224418C: - str r4, [r5, #0x6c] -_0224418E: - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _022441FC ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - bne _022441C6 - ldr r0, [sp] - ldr r2, [r5, #0x64] - add r1, r5, #0 - bl ov16_02257028 - mov r1, #0xc0 - mul r1, r0 - str r0, [r5, #0x6c] - ldr r0, _022441FC ; =0x00002D8C - add r1, r5, r1 - ldr r0, [r1, r0] - cmp r0, #0 - bne _022441C6 - mov r2, #0x26 - str r2, [r5, #0xc] - add r0, r5, #0 - mov r1, #1 - add r2, #0xf3 - bl ov16_02248B00 -_022441C6: - ldr r1, [r5, #0x64] - ldr r2, [r5, #0x6c] - add r0, r5, #0 - bl ov16_0225B408 - b _022441F4 -_022441D2: - mov r0, #0xb5 - lsl r0, r0, #2 - mov r1, #0x1c - add r3, r6, #0 - mul r3, r1 - add r0, r5, r0 - ldr r2, [r0, r3] - mov r1, #1 - bic r2, r1 - mov r1, #1 - orr r1, r2 - str r1, [r0, r3] - ldr r1, _02244204 ; =0x0000216C - mov r0, #0x40 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] -_022441F4: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022441FC: .word 0x00002D8C -_02244200: .word 0x00002144 -_02244204: .word 0x0000216C - thumb_func_end ov16_0224410C - - thumb_func_start ov16_02244208 -ov16_02244208: ; 0x02244208 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - mov r0, #0xb5 - lsl r0, r0, #6 - add r2, r5, r0 - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - lsl r1, r1, #1 - add r0, r2, r0 - add r2, r5, r1 - ldr r1, _022442E0 ; =0x0000307C - ldrh r1, [r2, r1] - bl ov16_02254EE0 - ldr r1, [r5, #0x6c] - add r4, r0, #0 - lsl r1, r1, #1 - add r2, r5, r1 - ldr r1, _022442E0 ; =0x0000307C - add r0, r5, #0 - ldrh r1, [r2, r1] - bl ov16_0225B084 - cmp r0, #0 - bne _02244250 - mov r4, #4 -_02244250: - ldr r0, [r5, #0x6c] - mov r2, #0xc0 - add r1, r0, #0 - mul r1, r2 - ldr r3, _022442E4 ; =0x00002DEC - add r6, r5, r1 - ldrh r1, [r6, r3] - cmp r1, #0 - bne _022442CA - cmp r4, #4 - beq _022442CA - add r1, r3, #0 - add r6, r6, r4 - sub r1, #0x80 - ldrb r1, [r6, r1] - cmp r1, #0 - beq _022442CA - lsl r0, r0, #1 - add r1, r5, r0 - ldr r0, _022442E0 ; =0x0000307C - ldrh r1, [r1, r0] - cmp r1, #0 - beq _022442CA - add r0, r2, #0 - add r0, #0x64 - str r1, [r5, r0] - ldr r1, [r5, #0x6c] - add r0, r2, #0 - add r0, #0x64 - add r6, r1, #0 - mul r6, r2 - ldr r0, [r5, r0] - add r1, r5, r6 - strh r0, [r1, r3] - ldr r0, [r5, #0x6c] - add r1, r0, #0 - mul r1, r2 - add r1, r5, r1 - add r0, r3, #2 - strh r4, [r1, r0] - ldr r0, [sp] - bl ov16_0223F4BC - ldr r1, _022442E8 ; =0x00002DC8 - ldr r2, [r5, #0x6c] - add r4, r5, r1 - mov r1, #0xc0 - add r5, r2, #0 - mul r5, r1 - mov r1, #5 - bl sub_020E1F6C - ldr r2, [r4, r5] - mov r0, #0x38 - bic r2, r0 - add r0, r1, #3 - lsl r0, r0, #0x1d - lsr r0, r0, #0x1a - orr r0, r2 - str r0, [r4, r5] - b _022442DC -_022442CA: - ldr r1, _022442EC ; =0x0000216C - mov r0, #0x40 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_022442DC: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022442E0: .word 0x0000307C -_022442E4: .word 0x00002DEC -_022442E8: .word 0x00002DC8 -_022442EC: .word 0x0000216C - thumb_func_end ov16_02244208 - - thumb_func_start ov16_022442F0 -ov16_022442F0: ; 0x022442F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x79 - bne _02244322 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02244322: - ldr r0, [r5, #0x64] - lsl r0, r0, #1 - add r2, r5, r0 - ldr r0, _02244498 ; =0x000030C4 - ldrh r1, [r2, r0] - cmp r1, #0 - beq _02244338 - add r0, #8 - ldrh r0, [r2, r0] - cmp r0, #0xff - bne _0224433A -_02244338: - b _02244488 -_0224433A: - add r0, r5, #0 - bl ov16_0225582C - cmp r0, #0 - beq _0224436E - ldr r0, [r5, #0x64] - lsl r0, r0, #1 - add r1, r5, r0 - ldr r0, _0224449C ; =0x000030CC - ldrh r1, [r1, r0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _022444A0 ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0xc - tst r0, r1 - beq _0224436E - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224436E: - ldr r0, [r5, #0x64] - mov r6, #0 - lsl r0, r0, #1 - add r1, r5, r0 - ldr r0, _022444A4 ; =0x000030D4 - ldrh r7, [r1, r0] -_0224437A: - add r0, sp, #0xc - str r0, [sp] - add r2, sp, #0xc - add r3, sp, #0xc - ldr r0, [sp, #4] - ldr r1, _022444A8 ; =0x0000FFFF - add r2, #2 - add r3, #1 - bl ov16_0225588C - add r0, sp, #0xc - ldrb r0, [r0, #2] - cmp r0, r7 - bne _022443EC - add r0, sp, #0xc - ldrb r0, [r0] - cmp r0, #5 - bhi _022443EC - add r0, sp, #0xc - ldrb r4, [r0, #1] - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r4, r0 - beq _022443EC - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r4, r0 - beq _022443EC - ldr r0, [r5, #0x64] - add r3, sp, #0xc - mov r2, #0xc0 - add r1, r0, #0 - mul r1, r2 - add r0, r5, r1 - ldr r1, _022444AC ; =0x00002D64 - add sp, #0x10 - strb r4, [r0, r1] - ldr r4, [r5, #0x64] - ldrb r0, [r3, #1] - add r6, r4, #0 - mul r6, r2 - add r4, r5, r6 - add r1, r1, #1 - strb r0, [r4, r1] - ldrb r0, [r3, #1] - add r2, #0x70 - str r0, [r5, r2] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022443EC: - mov r0, #0xfa - add r6, r6, #1 - lsl r0, r0, #2 - cmp r6, r0 - blt _0224437A - add r0, sp, #0xc - mov r6, #0 - str r0, [sp] - add r2, sp, #0xc - add r3, sp, #0xc - ldr r0, [sp, #4] - add r1, r6, #0 - add r2, #2 - add r3, #1 - bl ov16_0225588C - cmp r0, #1 - bne _02244488 -_02244410: - add r0, sp, #0xc - ldrb r0, [r0, #2] - cmp r0, r7 - bne _0224446E - add r0, sp, #0xc - ldrb r0, [r0] - cmp r0, #5 - bhi _0224446E - add r0, sp, #0xc - ldrb r4, [r0, #1] - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r4, r0 - beq _0224446E - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r4, r0 - beq _0224446E - ldr r0, [r5, #0x64] - add r3, sp, #0xc - mov r2, #0xc0 - add r1, r0, #0 - mul r1, r2 - add r0, r5, r1 - ldr r1, _022444AC ; =0x00002D64 - add sp, #0x10 - strb r4, [r0, r1] - ldr r4, [r5, #0x64] - ldrb r0, [r3, #1] - add r6, r4, #0 - mul r6, r2 - add r4, r5, r6 - add r1, r1, #1 - strb r0, [r4, r1] - ldrb r0, [r3, #1] - add r2, #0x70 - str r0, [r5, r2] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224446E: - add r0, sp, #0xc - add r6, r6, #1 - str r0, [sp] - add r2, sp, #0xc - add r3, sp, #0xc - ldr r0, [sp, #4] - add r1, r6, #0 - add r2, #2 - add r3, #1 - bl ov16_0225588C - cmp r0, #1 - beq _02244410 -_02244488: - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244498: .word 0x000030C4 -_0224449C: .word 0x000030CC -_022444A0: .word 0x00002DB0 -_022444A4: .word 0x000030D4 -_022444A8: .word 0x0000FFFF -_022444AC: .word 0x00002D64 - thumb_func_end ov16_022442F0 - - thumb_func_start ov16_022444B0 -ov16_022444B0: ; 0x022444B0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - mov r0, #0 - add r6, r1, #0 - mvn r0, r0 - str r0, [sp, #8] - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - mov ip, r0 - ldr r1, [r6, #0x64] - mov r0, #0xc0 - mul r0, r1 - str r0, [sp, #4] - add r3, r6, r0 - ldr r0, _022445C0 ; =0x00002DB0 - ldr r1, [r3, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r1 - bne _02244502 - ldr r0, [r6, #0x6c] - lsl r0, r0, #1 - add r1, r6, r0 - ldr r0, _022445C4 ; =0x000030AC - ldrh r7, [r1, r0] - cmp r7, #0xa5 - beq _02244502 - cmp r7, #0xa6 - beq _02244502 - mov r0, #7 - lsl r0, r0, #6 - cmp r7, r0 - beq _02244502 - cmp r7, #0 - bne _0224450C -_02244502: - add r0, r6, #0 - mov r1, ip - bl ov16_02248AF0 - b _022445BA -_0224450C: - mov r0, #0 - add r1, r3, #0 - add r2, r0, #0 -_02244512: - ldr r4, _022445C8 ; =0x00002D4C - ldrh r4, [r1, r4] - cmp r4, #0xa6 - beq _02244524 - ldr r4, _022445C8 ; =0x00002D4C - add r5, r3, r2 - ldrh r4, [r5, r4] - cmp r7, r4 - beq _02244544 -_02244524: - ldr r4, _022445C8 ; =0x00002D4C - add r5, r3, r2 - ldrh r4, [r5, r4] - cmp r4, #0xa6 - bne _0224453A - mov r5, #0 - ldr r4, [sp, #8] - mvn r5, r5 - cmp r4, r5 - bne _0224453A - str r0, [sp, #8] -_0224453A: - add r0, r0, #1 - add r1, r1, #2 - add r2, r2, #2 - cmp r0, #4 - blt _02244512 -_02244544: - cmp r0, #4 - bne _022445B2 - ldr r0, [sp, #4] - add r1, r6, r0 - ldr r0, [sp, #8] - lsl r0, r0, #1 - add r1, r1, r0 - ldr r0, _022445C8 ; =0x00002D4C - strh r7, [r1, r0] - ldr r1, [r6, #0x6c] - ldr r3, [r6, #0x64] - lsl r1, r1, #1 - add r2, r6, r1 - ldr r1, _022445C4 ; =0x000030AC - add r0, #0x20 - ldrh r1, [r2, r1] - lsl r1, r1, #4 - add r2, r6, r1 - mov r1, #0xf9 - lsl r1, r1, #2 - ldrb r1, [r2, r1] - mov r2, #0xc0 - mul r2, r3 - add r3, r6, r2 - ldr r2, [sp, #8] - add r2, r3, r2 - strb r1, [r2, r0] - ldr r0, [sp] - ldr r2, [r6, #0x64] - add r1, r6, #0 - bl ov16_022662FC - ldr r0, [r6, #0x6c] - lsl r0, r0, #1 - add r1, r6, r0 - ldr r0, _022445C4 ; =0x000030AC - ldrh r1, [r1, r0] - mov r0, #0x49 - lsl r0, r0, #2 - str r1, [r6, r0] - ldr r1, [r6, r0] - add r0, #0x5f - cmp r1, r0 - bne _022445BA - ldr r0, _022445CC ; =0x00002DCC - ldr r1, [r6, #0x64] - add r3, r6, r0 - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, [r3, r2] - ldr r0, _022445D0 ; =0xFFFFE3FF - and r0, r1 - str r0, [r3, r2] - b _022445BA -_022445B2: - add r0, r6, #0 - mov r1, ip - bl ov16_02248AF0 -_022445BA: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022445C0: .word 0x00002DB0 -_022445C4: .word 0x000030AC -_022445C8: .word 0x00002D4C -_022445CC: .word 0x00002DCC -_022445D0: .word 0xFFFFE3FF - thumb_func_end ov16_022444B0 - - thumb_func_start ov16_022445D4 -ov16_022445D4: ; 0x022445D4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - mov r7, #0 - str r0, [sp, #8] - add r6, r7, #0 - add r4, r7, #0 -_022445F2: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r0, r5, r0 - add r1, r4, r0 - ldr r0, _0224469C ; =0x00002D4C - ldrh r0, [r1, r0] - bl ov16_02255918 - cmp r0, #0 - bne _02244632 - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r0, r5, r0 - add r1, r4, r0 - ldr r0, _0224469C ; =0x00002D4C - ldrh r1, [r1, r0] - mov r0, #0x42 - lsl r0, r0, #2 - cmp r1, r0 - beq _02244632 - cmp r1, #0xfd - beq _02244632 - add r0, #0xb8 - cmp r1, r0 - beq _02244632 - add r0, r5, #0 - bl ov16_0225582C - cmp r0, #0 - beq _0224463A -_02244632: - add r0, r6, #0 - bl sub_020787CC - orr r7, r0 -_0224463A: - add r6, r6, #1 - add r4, r4, #2 - cmp r6, #4 - blt _022445F2 - mov r0, #2 - mvn r0, r0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [r5, #0x64] - add r1, r5, #0 - add r3, r7, #0 - bl ov16_02254A6C - add r4, r0, #0 - cmp r4, #0xf - bne _02244664 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 - b _02244696 -_02244664: - mov r7, #0x1e -_02244666: - ldr r0, [sp, #4] - bl ov16_0223F4BC - lsr r1, r0, #0x1f - lsl r0, r0, #0x1e - sub r0, r0, r1 - ror r0, r7 - add r6, r1, r0 - add r0, r6, #0 - bl sub_020787CC - tst r0, r4 - bne _02244666 - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - add r2, r5, r2 - lsl r0, r6, #1 - add r2, r2, r0 - ldr r0, _0224469C ; =0x00002D4C - add r1, #0x64 - ldrh r0, [r2, r0] - str r0, [r5, r1] -_02244696: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224469C: .word 0x00002D4C - thumb_func_end ov16_022445D4 - - thumb_func_start ov16_022446A0 -ov16_022446A0: ; 0x022446A0 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _022446E4 ; =0x00002D8C - add r2, r4, r0 - ldr r0, [r2, r1] - add r1, r1, #4 - ldr r1, [r2, r1] - mov r2, #0x40 - bl sub_0208C0BC - ldr r3, _022446E8 ; =0x0226E584 - mov r2, #0 -_022446C6: - ldrb r1, [r3] - cmp r0, r1 - ble _022446D4 - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #6 - blo _022446C6 -_022446D4: - ldr r0, _022446EC ; =0x0226E585 - lsl r1, r2, #1 - ldrb r1, [r0, r1] - ldr r0, _022446F0 ; =0x00002154 - str r1, [r4, r0] - mov r0, #0 - pop {r4, pc} - nop -_022446E4: .word 0x00002D8C -_022446E8: .word 0x0226E584 -_022446EC: .word 0x0226E585 -_022446F0: .word 0x00002154 - thumb_func_end ov16_022446A0 - - thumb_func_start ov16_022446F4 -ov16_022446F4: ; 0x022446F4 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - ldr r2, [r5, #0x6c] - add r4, r0, #0 - lsl r0, r2, #1 - add r1, r5, r0 - ldr r0, _02244790 ; =0x0000307C - ldrh r1, [r1, r0] - cmp r1, #0 - beq _02244782 - mov r0, #0xb5 - lsl r0, r0, #6 - mov r3, #0xc0 - add r0, r5, r0 - mul r3, r2 - add r0, r0, r3 - bl ov16_02254EE0 - add r2, r0, #0 - cmp r2, #4 - beq _02244740 - ldr r0, [r5, #0x6c] - mov r1, #0xc0 - mul r1, r0 - add r1, r5, r1 - add r3, r1, r2 - ldr r1, _02244794 ; =0x00002D6C - ldrb r3, [r3, r1] - cmp r3, #0 - bne _0224474A -_02244740: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _0224478A -_0224474A: - mov r1, #4 - cmp r3, #4 - bge _02244752 - add r1, r3, #0 -_02244752: - lsl r0, r0, #1 - add r3, r5, r0 - ldr r0, _02244790 ; =0x0000307C - ldrh r3, [r3, r0] - mov r0, #0x49 - lsl r0, r0, #2 - str r3, [r5, r0] - add r0, #0xc - str r1, [r5, r0] - ldr r0, _02244794 ; =0x00002D6C - ldr r4, [r5, #0x6c] - mov r3, #0xc0 - add r0, r5, r0 - mul r3, r4 - add r3, r0, r3 - ldrb r0, [r3, r2] - sub r0, r0, r1 - strb r0, [r3, r2] - ldr r2, [r5, #0x6c] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02253EC0 - b _0224478A -_02244782: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 -_0224478A: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02244790: .word 0x0000307C -_02244794: .word 0x00002D6C - thumb_func_end ov16_022446F4 - - thumb_func_start ov16_02244798 -ov16_02244798: ; 0x02244798 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - bl ov16_0223DF0C - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r1, #0x4d - mov r0, #0 - lsl r1, r1, #2 - ldr r2, _022448D8 ; =0x00003044 - str r0, [r5, r1] - ldr r2, [r5, r2] - cmp r2, #0xd7 - bne _02244866 - sub r1, #0x10 - str r2, [r5, r1] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x2b - beq _022447EE - ldr r2, [r5, #0x64] - mov r0, #0xc0 - add r3, r2, #0 - mul r3, r0 - ldr r2, _022448DC ; =0x00002DAC - mov r1, #0 - add r3, r5, r3 - str r1, [r3, r2] - add r1, r2, #4 - ldr r2, [r5, #0x64] - add r1, r5, r1 - mul r0, r2 - ldr r3, [r1, r0] - ldr r2, _022448E0 ; =0xF7FFFFFF - and r2, r3 - str r2, [r1, r0] - b _022447FA -_022447EE: - mov r1, #0x4d - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r0, #5 - orr r0, r2 - str r0, [r5, r1] -_022447FA: - mov r0, #2 - tst r0, r4 - beq _02244858 - add r0, r7, #0 - add r1, r5, #0 - mov r2, #0x10 - bl ov16_0224A984 - add r4, r0, #0 - bl sub_020787CC - ldr r1, _022448E4 ; =0x00003108 - ldrb r1, [r5, r1] - tst r0, r1 - bne _022448C6 - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r4, #0 - mov r3, #0x2b - bl ov16_02255AB4 - cmp r0, #0 - bne _02244842 - mov r0, #0xc0 - mul r0, r4 - ldr r1, _022448DC ; =0x00002DAC - mov r3, #0 - add r2, r5, r0 - str r3, [r2, r1] - add r1, r1, #4 - add r3, r5, r1 - ldr r2, [r3, r0] - ldr r1, _022448E0 ; =0xF7FFFFFF - and r1, r2 - str r1, [r3, r0] - b _022448C6 -_02244842: - mov r1, #0x46 - lsl r1, r1, #2 - add r0, r1, #0 - str r4, [r5, r1] - add r0, #0x1c - ldr r2, [r5, r0] - mov r0, #0xa - orr r0, r2 - add r1, #0x1c - str r0, [r5, r1] - b _022448C6 -_02244858: - mov r1, #0x4d - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r0, #8 - orr r0, r2 - str r0, [r5, r1] - b _022448C6 -_02244866: - ldr r3, [r5, #0x64] - mov r2, #0xc0 - mul r2, r3 - add r3, r5, r2 - ldr r2, _022448DC ; =0x00002DAC - str r0, [r3, r2] - add r0, r2, #4 - add r6, r5, r0 - ldr r0, [r5, #0x64] - mov r2, #0xc0 - add r3, r0, #0 - mul r3, r2 - ldr r2, [r6, r3] - ldr r0, _022448E0 ; =0xF7FFFFFF - and r0, r2 - str r0, [r6, r3] - mov r0, #2 - tst r0, r4 - beq _022448BE - add r0, r7, #0 - add r1, r5, #0 - mov r2, #0x10 - bl ov16_0224A984 - add r4, r0, #0 - bl sub_020787CC - ldr r1, _022448E4 ; =0x00003108 - ldrb r1, [r5, r1] - tst r0, r1 - bne _022448C6 - mov r0, #0xc0 - mul r0, r4 - ldr r1, _022448DC ; =0x00002DAC - mov r3, #0 - add r2, r5, r0 - str r3, [r2, r1] - add r1, r1, #4 - add r3, r5, r1 - ldr r2, [r3, r0] - ldr r1, _022448E0 ; =0xF7FFFFFF - and r1, r2 - str r1, [r3, r0] - b _022448C6 -_022448BE: - ldr r2, [r5, r1] - mov r0, #8 - orr r0, r2 - str r0, [r5, r1] -_022448C6: - ldr r3, _022448D8 ; =0x00003044 - ldr r2, [r5, #0x64] - ldr r3, [r5, r3] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_02266498 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022448D8: .word 0x00003044 -_022448DC: .word 0x00002DAC -_022448E0: .word 0xF7FFFFFF -_022448E4: .word 0x00003108 - thumb_func_end ov16_02244798 - - thumb_func_start ov16_022448E8 -ov16_022448E8: ; 0x022448E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r6, #0 - bl ov16_0223DF0C - str r0, [sp, #4] - ldr r1, [r5, #0x64] - add r0, r6, #0 - bl ov16_0223E208 - add r7, r0, #0 - ldr r1, [r5, #0x64] - add r0, r6, #0 - bl ov16_0223E208 - cmp r0, #0 - beq _02244938 - ldr r0, [sp, #4] - mov r1, #0x84 - tst r0, r1 - bne _02244938 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _022449FC -_02244938: - ldr r0, [r5, #0x64] - add r1, r5, r0 - ldr r0, _02244A04 ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - lsl r1, r7, #3 - add r2, r5, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #3 - lsr r1, r1, #0x1a - tst r0, r1 - beq _02244960 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _022449FC -_02244960: - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x79 - beq _02244978 - ldr r1, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x79 - bne _02244982 -_02244978: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _022449FC -_02244982: - ldr r2, [r5, #0x6c] - mov r0, #0xc0 - add r1, r2, #0 - mul r1, r0 - ldr r3, _02244A08 ; =0x00002DB8 - add r0, r5, r1 - ldrh r0, [r0, r3] - cmp r0, #0x70 - bne _0224499E - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _022449FC -_0224499E: - add r3, #0x14 - add r3, r5, r3 - ldr r1, [r3, r1] - lsl r3, r1, #3 - lsr r3, r3, #0x1f - bne _022449B0 - lsl r1, r1, #2 - lsr r1, r1, #0x1f - beq _022449BA -_022449B0: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _022449FC -_022449BA: - cmp r0, #0 - beq _022449D6 - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r3, #0x3c - bl ov16_02255AB4 - cmp r0, #1 - bne _022449D6 - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 - b _022449FC -_022449D6: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02244A08 ; =0x00002DB8 - ldrh r0, [r1, r0] - cmp r0, #0 - bne _022449F4 - ldr r2, [r5, #0x6c] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02255980 - cmp r0, #0 - bne _022449FC -_022449F4: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 -_022449FC: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244A04: .word 0x0000219C -_02244A08: .word 0x00002DB8 - thumb_func_end ov16_022448E8 - - thumb_func_start ov16_02244A0C -ov16_02244A0C: ; 0x02244A0C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - ldr r1, [r5, #0x64] - str r0, [sp, #8] - lsl r0, r1, #1 - add r2, r5, r0 - ldr r0, _02244B2C ; =0x0000305C - ldrh r0, [r2, r0] - cmp r0, #0xb6 - beq _02244A4C - cmp r0, #0xc5 - beq _02244A4C - cmp r0, #0xcb - beq _02244A4C - ldr r0, _02244B30 ; =0x00002DC8 - add r3, r1, #0 - mov r2, #0xc0 - add r0, r5, r0 - mul r3, r2 - ldr r2, [r0, r3] - ldr r1, _02244B34 ; =0xFFFFE7FF - and r1, r2 - str r1, [r0, r3] -_02244A4C: - ldr r0, _02244B38 ; =0x00003150 - ldr r0, [r5, r0] - cmp r0, #1 - beq _02244A5A - mov r0, #1 - str r0, [sp, #4] - b _02244A5E -_02244A5A: - mov r0, #0 - str r0, [sp, #4] -_02244A5E: - ldr r6, [r5, #0x64] - ldr r0, _02244B30 ; =0x00002DC8 - add r7, r6, #0 - add r4, r5, r0 - mov r0, #0xc0 - mul r7, r0 - ldr r0, [sp] - bl ov16_0223F4BC - ldr r1, [r4, r7] - lsl r1, r1, #0x13 - lsr r1, r1, #0x1e - lsl r2, r1, #1 - ldr r1, _02244B3C ; =0x0226E57C - ldrh r1, [r1, r2] - cmp r1, r0 - blo _02244B16 - ldr r0, [sp, #4] - cmp r0, #0 - beq _02244B16 - ldr r0, _02244B40 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02244B44 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x6f - bne _02244AAE - mov r2, #0x75 - lsl r2, r2, #2 - add r0, r5, r2 - lsl r4, r6, #6 - ldr r3, [r0, r4] - mov r1, #4 - orr r1, r3 - str r1, [r0, r4] - add r0, r5, #0 - sub r2, #0xba - add r0, #0xf6 - strh r2, [r0] -_02244AAE: - ldr r0, _02244B40 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02244B44 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x74 - bne _02244ADA - mov r2, #0x75 - ldr r1, [r5, #0x64] - lsl r2, r2, #2 - lsl r4, r1, #6 - add r0, r5, r2 - add r1, r2, #0 - ldr r3, [r0, r4] - add r1, #0x2c - orr r1, r3 - str r1, [r0, r4] - add r0, r5, #0 - sub r2, #0x1a - add r0, #0xf6 - strh r2, [r0] -_02244ADA: - add r0, r5, #0 - mov r1, #2 - add r0, #0xf5 - strb r1, [r0] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - ldr r2, [r5, #0x64] - mov r0, #0xc0 - add r1, r2, #0 - mul r1, r0 - ldr r0, _02244B30 ; =0x00002DC8 - add r0, r5, r0 - ldr r3, [r0, r1] - lsl r2, r3, #0x13 - lsr r4, r2, #0x1e - cmp r4, #3 - bhs _02244B26 - ldr r2, _02244B34 ; =0xFFFFE7FF - and r3, r2 - add r2, r4, #1 - lsl r2, r2, #0x1e - lsr r2, r2, #0x13 - orr r2, r3 - str r2, [r0, r1] - b _02244B26 -_02244B16: - ldr r1, [r4, r7] - ldr r0, _02244B34 ; =0xFFFFE7FF - and r0, r1 - str r0, [r4, r7] - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02248AF0 -_02244B26: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244B2C: .word 0x0000305C -_02244B30: .word 0x00002DC8 -_02244B34: .word 0xFFFFE7FF -_02244B38: .word 0x00003150 -_02244B3C: .word 0x0226E57C -_02244B40: .word 0x00003044 -_02244B44: .word 0x000003DE - thumb_func_end ov16_02244A0C - - thumb_func_start ov16_02244B48 -ov16_02244B48: ; 0x02244B48 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02244BB4 ; =0x00002D90 - ldr r0, [r1, r0] - mov r1, #4 - bl ov16_022563F8 - ldr r1, [r5, #0x64] - mov r2, #0xc0 - add r3, r1, #0 - mul r3, r2 - add r1, r5, r3 - ldr r3, _02244BB8 ; =0x00002D8C - ldr r1, [r1, r3] - cmp r1, r0 - bgt _02244B8A - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 - b _02244BAE -_02244B8A: - ldr r1, _02244BBC ; =0x0000215C - neg r4, r0 - str r4, [r5, r1] - ldr r1, [r5, #0x64] - add r4, r1, #0 - add r1, r3, #0 - mul r4, r2 - add r3, #0x24 - add r4, r5, r4 - add r1, #0x54 - str r0, [r4, r1] - ldr r0, [r5, #0x64] - add r3, r5, r3 - mul r2, r0 - ldr r1, [r3, r2] - ldr r0, _02244BC0 ; =0xFFFF1FFF - and r0, r1 - str r0, [r3, r2] -_02244BAE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02244BB4: .word 0x00002D90 -_02244BB8: .word 0x00002D8C -_02244BBC: .word 0x0000215C -_02244BC0: .word 0xFFFF1FFF - thumb_func_end ov16_02244B48 - - thumb_func_start ov16_02244BC4 -ov16_02244BC4: ; 0x02244BC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp] - str r1, [sp, #4] - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [sp, #4] - bl ov16_02248AD0 - str r0, [sp, #0x1c] - ldr r0, [sp] - bl ov16_0223DF0C - add r4, r0, #0 - mov r0, #1 - tst r0, r4 - bne _02244BEC - b _02244D3E -_02244BEC: - ldr r1, [sp, #4] - ldr r0, [sp] - ldr r1, [r1, #0x6c] - mov r7, #0 - bl ov16_0223DF20 - ldr r1, [sp, #4] - str r0, [sp, #0x18] - ldr r0, [sp] - ldr r1, [r1, #0x6c] - bl ov16_0223DF60 - add r6, r0, #0 - mov r0, #8 - tst r0, r4 - bne _02244C20 - mov r0, #0x10 - tst r0, r4 - beq _02244C38 - ldr r1, [sp, #4] - ldr r0, [sp] - ldr r1, [r1, #0x6c] - bl ov16_0223E208 - cmp r0, #0 - beq _02244C38 -_02244C20: - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #4] - ldr r1, [r0, #0x6c] - add r1, r0, r1 - ldr r0, _02244D58 ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #0xc] - str r0, [sp, #8] - b _02244C78 -_02244C38: - mov r0, #2 - str r0, [sp, #0x14] - tst r0, r4 - beq _02244C62 - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - ldr r1, [r0, #0x6c] - add r2, r0, r1 - ldr r0, _02244D58 ; =0x0000219C - ldrb r0, [r2, r0] - str r0, [sp, #0xc] - ldr r0, [sp] - bl ov16_0223E258 - ldr r1, [sp, #4] - add r1, r1, r0 - ldr r0, _02244D58 ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #8] - b _02244C78 -_02244C62: - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #4] - ldr r1, [r0, #0x6c] - add r1, r0, r1 - ldr r0, _02244D58 ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #0xc] - str r0, [sp, #8] -_02244C78: - ldr r5, [sp, #0x10] - add r0, r5, #0 - cmp r0, r6 - bge _02244CBA -_02244C80: - ldr r0, [sp, #0x18] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02244CB4 - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _02244CB4 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02244CB4 - add r7, r7, #1 -_02244CB4: - add r5, r5, #1 - cmp r5, r6 - blt _02244C80 -_02244CBA: - ldr r0, [sp, #0x14] - cmp r7, r0 - bgt _02244CCA - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - bl ov16_02248AF0 - b _02244D52 -_02244CCA: - ldr r0, [sp] - ldr r1, [sp, #4] - bl ov16_022559FC - cmp r0, #0 - beq _02244D34 - mov r7, #5 -_02244CD8: - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r6, #0 - bl sub_020E1F6C - ldr r0, [sp, #0x10] - add r5, r1, #0 - add r5, r5, r0 - ldr r0, [sp, #0xc] - cmp r5, r0 - beq _02244CD8 - ldr r0, [sp, #8] - cmp r5, r0 - beq _02244CD8 - ldr r0, [sp, #0x18] - add r1, r5, #0 - bl sub_0207A0FC - add r1, r7, #0 - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02244CD8 - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #1 - beq _02244CD8 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02244CD8 - ldr r0, [sp, #4] - ldr r1, [r0, #0x6c] - add r1, r0, r1 - ldr r0, _02244D5C ; =0x000021A0 - strb r5, [r1, r0] - b _02244D52 -_02244D34: - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - bl ov16_02248AF0 - b _02244D52 -_02244D3E: - ldr r0, [sp] - ldr r1, [sp, #4] - bl ov16_022559FC - cmp r0, #0 - bne _02244D52 - ldr r0, [sp, #4] - ldr r1, [sp, #0x1c] - bl ov16_02248AF0 -_02244D52: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244D58: .word 0x0000219C -_02244D5C: .word 0x000021A0 - thumb_func_end ov16_02244BC4 - - thumb_func_start ov16_02244D60 -ov16_02244D60: ; 0x02244D60 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r5, [r4, #0x64] - ldr r1, _02244F30 ; =0x00002DB0 - add r0, r5, #0 - mov r2, #0xc0 - mov r5, #2 - add r3, r4, r1 - mul r0, r2 - ldr r6, [r3, r0] - lsl r5, r5, #0x14 - orr r5, r6 - str r5, [r3, r0] - ldr r3, [r4, #0x64] - mov r0, #0 - add r5, r3, #0 - mul r5, r2 - add r3, r1, #0 - add r5, r4, r5 - add r3, #0x38 - strh r0, [r5, r3] - add r3, r1, #0 - add r3, #0x18 - ldr r6, [r4, #0x64] - add r5, r4, r3 - add r3, r6, #0 - mul r3, r2 - ldr r7, [r5, r3] - mov r6, #7 - bic r7, r6 - str r7, [r5, r3] - ldr r3, [r4, #0x6c] - add r5, r3, #0 - mul r5, r2 - add r3, r1, #0 - add r5, r4, r5 - sub r3, #8 - ldr r3, [r5, r3] - ldr r5, [r4, #0x64] - add r6, r5, #0 - mul r6, r2 - add r5, r1, #0 - add r6, r4, r6 - add r5, #0x34 - str r3, [r6, r5] - ldr r3, [r4, #0x6c] - add r5, r3, #0 - mul r5, r2 - add r3, r1, #0 - add r5, r4, r5 - add r3, #0xe - ldrb r3, [r5, r3] - ldr r5, [r4, #0x64] - add r6, r5, #0 - lsl r3, r3, #0x1c - mul r6, r2 - add r5, r1, #0 - lsr r3, r3, #0x1c - add r6, r4, r6 - add r5, #0x4a - strh r3, [r6, r5] - add r3, r1, #0 - add r3, #0x1c - ldr r6, [r4, #0x64] - add r5, r4, r3 - add r3, r6, #0 - mul r3, r2 - ldr r7, [r5, r3] - mov r6, #0x3c - bic r7, r6 - str r7, [r5, r3] - ldr r6, [r4, #0x64] - sub r1, #0x70 - add r3, r6, #0 - mul r3, r2 - ldr r7, [r5, r3] - ldr r6, _02244F34 ; =0xFFFFE3FF - and r6, r7 - str r6, [r5, r3] - add r5, r4, r1 - ldr r1, [r4, #0x64] - add r3, r1, #0 - mul r3, r2 - ldr r1, [r4, #0x6c] - add r3, r5, r3 - mul r2, r1 - add r2, r5, r2 -_02244E16: - ldrb r1, [r2, r0] - strb r1, [r3, r0] - add r0, r0, #1 - cmp r0, #0x28 - blo _02244E16 - ldr r3, [r4, #0x64] - ldr r1, _02244F38 ; =0x00002D68 - add r6, r3, #0 - mov r2, #0xc0 - add r0, r4, r1 - mul r6, r2 - ldr r5, [r0, r6] - mov r3, #1 - bic r5, r3 - str r5, [r0, r6] - ldr r3, [r4, #0x64] - add r6, r3, #0 - mul r6, r2 - ldr r5, [r0, r6] - mov r3, #2 - bic r5, r3 - str r5, [r0, r6] - ldr r3, [r4, #0x64] - add r6, r3, #0 - mul r6, r2 - ldr r5, [r0, r6] - mov r3, #4 - bic r5, r3 - str r5, [r0, r6] - ldr r3, [r4, #0x64] - add r6, r3, #0 - mul r6, r2 - ldr r5, [r0, r6] - mov r3, #8 - bic r5, r3 - str r5, [r0, r6] - ldr r3, [r4, #0x64] - add r6, r3, #0 - mul r6, r2 - ldr r5, [r0, r6] - mov r3, #0x10 - bic r5, r3 - str r5, [r0, r6] - ldr r3, [r4, #0x64] - add r6, r3, #0 - mul r6, r2 - ldr r5, [r0, r6] - mov r3, #0x20 - bic r5, r3 - str r5, [r0, r6] - ldr r5, [r4, #0x64] - add r3, r5, #0 - mul r3, r2 - ldr r6, [r0, r3] - ldr r5, _02244F3C ; =0xFFFFFEFF - and r5, r6 - str r5, [r0, r3] - ldr r5, [r4, #0x64] - add r3, r5, #0 - mul r3, r2 - ldr r6, [r0, r3] - ldr r5, _02244F40 ; =0xFFFFFDFF - and r5, r6 - str r5, [r0, r3] - ldr r5, [r4, #0x64] - add r3, r5, #0 - mul r3, r2 - ldr r6, [r0, r3] - ldr r5, _02244F44 ; =0xFFFFFBFF - and r5, r6 - str r5, [r0, r3] - add r3, r1, #0 - add r3, #0x60 - add r6, r4, r3 - ldr r3, [r4, #0x64] - add r1, #0x70 - add r5, r3, #0 - mul r5, r2 - ldr r7, [r6, r5] - ldr r3, _02244F48 ; =0xBFFFFFFF - and r3, r7 - add r7, r2, #0 - add r7, #0x90 - ldr r7, [r4, r7] - lsl r7, r7, #0x1f - lsr r7, r7, #1 - orr r3, r7 - str r3, [r6, r5] - add r3, r2, #0 - add r3, #0x90 - ldr r3, [r4, r3] - add r6, r3, #1 - ldr r3, [r4, #0x64] - add r5, r3, #0 - mul r5, r2 - add r3, r4, r5 - str r6, [r3, r1] - ldr r1, [r4, #0x64] - add r5, r1, #0 - mul r5, r2 - ldr r3, [r0, r5] - mov r1, #0x40 - bic r3, r1 - str r3, [r0, r5] - ldr r1, [r4, #0x64] - mov r6, #0 - add r3, r1, #0 - mul r3, r2 - ldr r2, [r0, r3] - mov r1, #0x80 - bic r2, r1 - str r2, [r0, r3] - mov r0, #0xf9 - add r5, r6, #0 - mov r1, #5 - lsl r0, r0, #2 -_02244EFE: - ldr r3, [r4, #0x64] - mov r2, #0xc0 - mul r2, r3 - add r3, r4, r2 - ldr r2, _02244F4C ; =0x00002D4C - add r7, r3, r5 - ldrh r2, [r7, r2] - lsl r2, r2, #4 - add r2, r4, r2 - ldrb r2, [r2, r0] - cmp r2, #5 - bhs _02244F1E - add r7, r3, r6 - ldr r3, _02244F50 ; =0x00002D6C - strb r2, [r7, r3] - b _02244F24 -_02244F1E: - ldr r2, _02244F50 ; =0x00002D6C - add r3, r3, r6 - strb r1, [r3, r2] -_02244F24: - add r6, r6, #1 - add r5, r5, #2 - cmp r6, #4 - blt _02244EFE - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244F30: .word 0x00002DB0 -_02244F34: .word 0xFFFFE3FF -_02244F38: .word 0x00002D68 -_02244F3C: .word 0xFFFFFEFF -_02244F40: .word 0xFFFFFDFF -_02244F44: .word 0xFFFFFBFF -_02244F48: .word 0xBFFFFFFF -_02244F4C: .word 0x00002D4C -_02244F50: .word 0x00002D6C - thumb_func_end ov16_02244D60 - - thumb_func_start ov16_02244F54 -ov16_02244F54: ; 0x02244F54 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - mov r2, #0x72 - mov r1, #1 - add r3, r0, #0 - eor r3, r1 - lsl r0, r3, #3 - add r5, r4, r0 - lsl r2, r2, #2 - ldr r5, [r5, r2] - lsl r5, r5, #0x1e - lsr r5, r5, #0x1e - cmp r5, #3 - bne _02244FAA - mov r0, #0xb5 - lsl r0, r0, #2 - add r2, r4, r0 - ldr r3, [r4, #0x64] - mov r0, #0x1c - mul r0, r3 - ldr r5, [r2, r0] - mov r3, #1 - bic r5, r3 - orr r1, r5 - str r1, [r2, r0] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 - b _02244FD2 -_02244FAA: - add r1, r2, #0 - sub r1, #0xc - lsl r6, r3, #2 - add r1, r4, r1 - ldr r5, [r1, r6] - mov r3, #4 - orr r3, r5 - str r3, [r1, r6] - add r2, r4, r2 - ldr r4, [r2, r0] - mov r3, #3 - add r1, r4, #0 - bic r1, r3 - lsl r3, r4, #0x1e - lsr r3, r3, #0x1e - add r4, r3, #1 - mov r3, #3 - and r3, r4 - orr r1, r3 - str r1, [r2, r0] -_02244FD2: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02244F54 - - thumb_func_start ov16_02244FD8 -ov16_02244FD8: ; 0x02244FD8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl ov16_0223E208 - lsl r0, r0, #3 - add r1, r5, r0 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1e - lsr r1, r0, #0x1e - beq _02245046 - mov r0, #0xc0 - mul r0, r4 - ldr r4, _02245054 ; =0x00002D8C - add r0, r5, r0 - ldr r2, [r0, r4] - cmp r2, #0 - beq _02245046 - mov r2, #5 - sub r1, r2, r1 - ldr r3, _02245058 ; =0x0000215C - lsl r1, r1, #1 - str r1, [r5, r3] - add r1, r4, #4 - ldr r1, [r0, r1] - sub r0, r2, #6 - mul r0, r1 - ldr r1, [r5, r3] - bl ov16_022563F8 - ldr r1, _02245058 ; =0x0000215C - str r0, [r5, r1] - b _0224504E -_02245046: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_0224504E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245054: .word 0x00002D8C -_02245058: .word 0x0000215C - thumb_func_end ov16_02244FD8 - - thumb_func_start ov16_0224505C -ov16_0224505C: ; 0x0224505C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - str r1, [sp] - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [sp] - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r4, #0 - bl ov16_0223DF1C - mov r2, #0x4d - mov r7, #0 - str r0, [sp, #4] - add r1, r0, #0 - ldr r0, [sp] - lsl r2, r2, #2 - str r1, [r0, r2] - ldr r0, [sp, #4] - add r6, r7, #0 - cmp r0, #0 - ble _022450EC - ldr r4, [sp] - ldr r1, _02245100 ; =0x00002DC8 - add r0, r4, #0 - add r5, r0, r1 -_02245098: - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x20 - tst r0, r1 - bne _022450BE - ldr r0, _02245104 ; =0x00002D8C - ldr r0, [r4, r0] - cmp r0, #0 - beq _022450BE - ldr r0, [sp] - add r2, r6, #0 - add r1, r0, #0 - ldr r1, [r1, #0x64] - mov r3, #0x2b - bl ov16_02255AB4 - cmp r0, #1 - bne _022450C2 -_022450BE: - add r7, r7, #1 - b _022450E0 -_022450C2: - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x20 - orr r1, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - str r1, [r4, r0] - ldr r1, [r5, #0] - ldr r0, _02245108 ; =0xFFFF9FFF - and r1, r0 - mov r0, #6 - lsl r0, r0, #0xc - orr r0, r1 - str r0, [r5, #0] -_022450E0: - ldr r0, [sp, #4] - add r6, r6, #1 - add r4, #0xc0 - add r5, #0xc0 - cmp r6, r0 - blt _02245098 -_022450EC: - ldr r0, [sp, #4] - cmp r7, r0 - bne _022450FA - ldr r0, [sp] - ldr r1, [sp, #8] - bl ov16_02248AF0 -_022450FA: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245100: .word 0x00002DC8 -_02245104: .word 0x00002D8C -_02245108: .word 0xFFFF9FFF - thumb_func_end ov16_0224505C - - thumb_func_start ov16_0224510C -ov16_0224510C: ; 0x0224510C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248B10 - ldr r1, _0224513C ; =0x00003104 - ldr r1, [r4, r1] - add r2, r4, r1 - ldr r1, _02245140 ; =0x000021EC - ldrb r1, [r2, r1] - str r1, [r0, #0] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0224513C: .word 0x00003104 -_02245140: .word 0x000021EC - thumb_func_end ov16_0224510C - - thumb_func_start ov16_02245144 -ov16_02245144: ; 0x02245144 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_02248B10 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_0223DF1C - ldr r1, [r6, #0] - cmp r1, r0 - bhs _02245182 - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_02245182: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02245144 - - thumb_func_start ov16_02245188 -ov16_02245188: ; 0x02245188 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0224A984 - add r4, r0, #0 - mov r0, #0x4e - mov r3, #0 - lsl r0, r0, #2 - str r3, [r5, r0] - ldr r0, _02245430 ; =0x0000215C - add r1, r4, #0 - str r3, [r5, r0] - add r0, r5, #0 - mov r2, #0x1b - bl ov16_02252060 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - add r7, r0, #0 - mov r0, #0xd - str r0, [sp] - add r0, r6, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _022451F8 - mov r0, #0x4c - str r0, [sp] - add r0, r6, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _022451FA -_022451F8: - b _02245428 -_022451FA: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0xc - tst r0, r1 - beq _02245264 - ldr r0, [sp, #4] - cmp r0, #5 - beq _02245264 - cmp r7, #5 - beq _02245264 - cmp r0, #8 - beq _02245264 - cmp r7, #8 - beq _02245264 - cmp r0, #4 - beq _02245264 - cmp r7, #4 - beq _02245264 - mov r0, #0xc0 - add r6, r4, #0 - mul r6, r0 - ldr r0, _02245434 ; =0x00002D8C - add r1, r5, r6 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02245264 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #8 - beq _02245264 - mov r3, #0xb7 - add r1, r5, r6 - lsl r3, r3, #6 - ldr r2, [r1, r3] - ldr r0, _02245438 ; =0x00040080 - tst r0, r2 - bne _02245264 - mov r0, #0xc9 - add r2, r0, #0 - add r2, #0x5b - str r0, [r5, r2] - sub r3, #0x30 - ldr r1, [r1, r3] - sub r0, #0xca - mul r0, r1 - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _02245430 ; =0x0000215C - str r0, [r5, r1] -_02245264: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x30 - tst r0, r1 - beq _022452CC - mov r0, #0xc0 - add r6, r4, #0 - mul r6, r0 - ldr r0, _02245434 ; =0x00002D8C - add r2, r5, r6 - ldr r1, [r2, r0] - cmp r1, #0 - beq _022452CC - add r0, #0x34 - ldr r1, [r2, r0] - ldr r0, _02245438 ; =0x00040080 - tst r0, r1 - bne _022452CC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x57 - beq _022452A2 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x5e - bne _022452B8 -_022452A2: - ldr r0, _0224543C ; =0x00002D90 - add r1, r5, r6 - ldr r1, [r1, r0] - mov r0, #0 - mvn r0, r0 - mul r0, r1 - mov r1, #8 - bl ov16_022563F8 - ldr r1, _02245430 ; =0x0000215C - str r0, [r5, r1] -_022452B8: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x5e - bne _022452CC - mov r0, #0x4e - mov r1, #2 - lsl r0, r0, #2 - str r1, [r5, r0] -_022452CC: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0xc0 - tst r1, r0 - beq _0224534E - ldr r1, _02245434 ; =0x00002D8C - add r6, r4, #0 - mul r6, r0 - add r0, r5, r1 - str r0, [sp, #8] - ldr r0, [r0, r6] - cmp r0, #0 - beq _0224534E - add r0, r5, r6 - add r1, #0x34 - ldr r1, [r0, r1] - ldr r0, _02245438 ; =0x00040080 - tst r0, r1 - bne _0224534E - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x73 - bne _0224531A - ldr r0, _0224543C ; =0x00002D90 - add r1, r5, r6 - ldr r0, [r1, r0] - ldr r1, [sp, #8] - ldr r1, [r1, r6] - cmp r1, r0 - bhs _0224534E - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _02245430 ; =0x0000215C - str r0, [r5, r1] - b _0224534E -_0224531A: - ldr r0, [sp, #4] - cmp r0, #0xf - beq _0224534E - cmp r7, #0xf - beq _0224534E - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x51 - beq _0224534E - ldr r1, _02245440 ; =0x00000102 - add r0, r1, #0 - add r0, #0x22 - str r1, [r5, r0] - ldr r0, _0224543C ; =0x00002D90 - add r1, r5, r6 - ldr r1, [r1, r0] - mov r0, #0 - mvn r0, r0 - mul r0, r1 - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _02245430 ; =0x0000215C - str r0, [r5, r1] -_0224534E: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #3 - tst r0, r1 - beq _02245428 - ldr r1, _02245434 ; =0x00002D8C - mov r0, #0xc0 - add r6, r4, #0 - mul r6, r0 - add r7, r5, r1 - ldr r0, [r7, r6] - cmp r0, #0 - beq _02245390 - add r1, r1, #4 - add r1, r5, r1 - str r1, [sp, #0xc] - ldr r1, [r1, r6] - cmp r0, r1 - bhs _02245390 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x2c - bne _02245390 - ldr r0, [sp, #0xc] - mov r1, #0x10 - ldr r0, [r0, r6] - bl ov16_022563F8 - ldr r1, _02245430 ; =0x0000215C - str r0, [r5, r1] -_02245390: - ldr r0, [r7, r6] - cmp r0, #0 - beq _022453BC - ldr r1, _0224543C ; =0x00002D90 - add r1, r5, r1 - str r1, [sp, #0x10] - ldr r1, [r1, r6] - cmp r0, r1 - bhs _022453BC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x57 - bne _022453BC - ldr r0, [sp, #0x10] - mov r1, #8 - ldr r0, [r0, r6] - bl ov16_022563F8 - ldr r1, _02245430 ; =0x0000215C - str r0, [r5, r1] -_022453BC: - ldr r0, [r7, r6] - cmp r0, #0 - beq _02245428 - ldr r0, _02245444 ; =0x00002DAC - add r7, r5, r0 - ldr r0, [r7, r6] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - beq _02245428 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x5d - bne _02245428 - ldr r0, [r7, r6] - mov r1, #7 - tst r1, r0 - beq _022453EC - mov r0, #0x13 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - b _02245420 -_022453EC: - ldr r1, _02245448 ; =0x00000F88 - tst r1, r0 - beq _022453FC - mov r0, #0x13 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r5, r0] - b _02245420 -_022453FC: - mov r1, #0x10 - tst r1, r0 - beq _0224540C - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r5, r0] - b _02245420 -_0224540C: - mov r1, #0x40 - tst r0, r1 - beq _0224541A - mov r0, #3 - add r1, #0xf0 - str r0, [r5, r1] - b _02245420 -_0224541A: - mov r0, #4 - add r1, #0xf0 - str r0, [r5, r1] -_02245420: - mov r0, #0x4e - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] -_02245428: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02245430: .word 0x0000215C -_02245434: .word 0x00002D8C -_02245438: .word 0x00040080 -_0224543C: .word 0x00002D90 -_02245440: .word 0x00000102 -_02245444: .word 0x00002DAC -_02245448: .word 0x00000F88 - thumb_func_end ov16_02245188 - - thumb_func_start ov16_0224544C -ov16_0224544C: ; 0x0224544C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r6, [r4, #0x64] - mov r0, #0xb5 - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x1c - add r1, r6, #0 - mul r1, r0 - ldr r3, [r2, r1] - ldr r0, _0224554C ; =0xFFFFFE3F - mov r7, #0xc0 - and r0, r3 - add r3, r6, #0 - mul r3, r7 - add r6, r4, r3 - ldr r3, _02245550 ; =0x00002DC8 - ldr r6, [r6, r3] - sub r3, #0x18 - lsl r6, r6, #0xe - lsr r6, r6, #0x1d - lsl r6, r6, #0x1d - lsr r6, r6, #0x17 - orr r0, r6 - str r0, [r2, r1] - ldr r2, [r4, #0x64] - add r0, r2, #0 - mul r0, r7 - add r0, r4, r0 - ldr r1, [r0, r3] - mov r0, #1 - lsl r0, r0, #0xc - tst r0, r1 - bne _022454BA - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02253EF0 - ldr r0, _02245550 ; =0x00002DC8 - ldr r2, [r4, #0x64] - add r1, r4, r0 - add r0, r7, #0 - mul r0, r2 - ldr r3, [r1, r0] - ldr r2, _02245554 ; =0xFFFC7FFF - and r3, r2 - mov r2, #0xa - lsl r2, r2, #0xe - orr r2, r3 - str r2, [r1, r0] -_022454BA: - ldr r1, [r4, #0x64] - ldr r0, _02245550 ; =0x00002DC8 - mov r7, #0xc0 - add r3, r1, #0 - add r6, r4, r0 - mul r3, r7 - ldr r1, [r6, r3] - ldr r2, _02245554 ; =0xFFFC7FFF - and r2, r1 - lsl r1, r1, #0xe - lsr r1, r1, #0x1d - sub r1, r1, #1 - lsl r1, r1, #0x1d - lsr r1, r1, #0xe - orr r1, r2 - str r1, [r6, r3] - ldr r2, [r4, #0x64] - add r1, r2, #0 - mul r1, r7 - add r1, r4, r1 - ldr r0, [r1, r0] - lsl r0, r0, #0xe - lsr r0, r0, #0x1d - bne _022454F2 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02253F20 -_022454F2: - ldr r0, _02245558 ; =0x00003044 - mov r2, #1 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _0224555C ; =0x000003E1 - ldrb r1, [r1, r0] - ldr r0, _02245560 ; =0x00002154 - str r1, [r4, r0] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02245550 ; =0x00002DC8 - ldr r0, [r1, r0] - lsl r0, r0, #0xe - lsr r1, r0, #0x1d - mov r0, #5 - sub r3, r0, r1 - cmp r3, #1 - ble _0224552A - ldr r0, _02245560 ; =0x00002154 -_0224551E: - ldr r1, [r4, r0] - add r2, r2, #1 - lsl r1, r1, #1 - str r1, [r4, r0] - cmp r2, r3 - blt _0224551E -_0224552A: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02245564 ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x1e - tst r0, r1 - beq _02245546 - ldr r0, _02245560 ; =0x00002154 - ldr r1, [r4, r0] - lsl r1, r1, #1 - str r1, [r4, r0] -_02245546: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224554C: .word 0xFFFFFE3F -_02245550: .word 0x00002DC8 -_02245554: .word 0xFFFC7FFF -_02245558: .word 0x00003044 -_0224555C: .word 0x000003E1 -_02245560: .word 0x00002154 -_02245564: .word 0x00002DB0 - thumb_func_end ov16_0224544C - - thumb_func_start ov16_02245568 -ov16_02245568: ; 0x02245568 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r2, [r4, #0x64] - mov r0, #0xc0 - add r1, r2, #0 - mul r1, r0 - ldr r0, _022455E4 ; =0x00002DC8 - add r0, r4, r0 - ldr r3, [r0, r1] - lsl r2, r3, #0xb - lsr r5, r2, #0x1d - cmp r5, #5 - bhs _02245598 - ldr r2, _022455E8 ; =0xFFE3FFFF - and r3, r2 - add r2, r5, #1 - lsl r2, r2, #0x1d - lsr r2, r2, #0xb - orr r2, r3 - str r2, [r0, r1] -_02245598: - ldr r0, _022455EC ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _022455F0 ; =0x000003E1 - ldrb r1, [r1, r0] - ldr r0, _022455F4 ; =0x00002154 - str r1, [r4, r0] - ldr r2, [r4, #0x64] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _022455E4 ; =0x00002DC8 - mov r0, #1 - ldr r1, [r2, r1] - lsl r1, r1, #0xb - lsr r1, r1, #0x1d - cmp r1, #1 - bls _022455DE - ldr r3, _022455F4 ; =0x00002154 - ldr r2, _022455E4 ; =0x00002DC8 - mov r1, #0xc0 -_022455C4: - ldr r5, [r4, r3] - add r0, r0, #1 - lsl r5, r5, #1 - str r5, [r4, r3] - ldr r5, [r4, #0x64] - add r6, r5, #0 - mul r6, r1 - add r5, r4, r6 - ldr r5, [r5, r2] - lsl r5, r5, #0xb - lsr r5, r5, #0x1d - cmp r0, r5 - blo _022455C4 -_022455DE: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_022455E4: .word 0x00002DC8 -_022455E8: .word 0xFFE3FFFF -_022455EC: .word 0x00003044 -_022455F0: .word 0x000003E1 -_022455F4: .word 0x00002154 - thumb_func_end ov16_02245568 - - thumb_func_start ov16_022455F8 -ov16_022455F8: ; 0x022455F8 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r3, r0, #0 - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - mov r5, #0xc0 - add r1, r0, #0 - mul r1, r5 - ldr r6, _02245674 ; =0x00002DBE - add r1, r4, r1 - ldrb r0, [r1, r6] - lsl r0, r0, #0x1c - lsr r2, r0, #0x1c - add r0, r5, #0 - add r0, #0x58 - ldr r0, [r4, r0] - mul r5, r0 - add r5, r4, r5 - ldrb r5, [r5, r6] - lsl r5, r5, #0x1c - lsr r5, r5, #0x1c - cmp r5, r2 - beq _0224564A - sub r6, #0xe - ldr r6, [r1, r6] - mov r1, #0xf - lsl r1, r1, #0x10 - tst r1, r6 - bne _0224564A - cmp r5, #2 - beq _0224564A - cmp r2, #2 - bne _02245654 -_0224564A: - add r0, r4, #0 - add r1, r3, #0 - bl ov16_02248AF0 - b _0224566E -_02245654: - bl sub_020787CC - ldr r1, _02245678 ; =0x00002DB0 - mov r2, #0xc0 - add r1, r4, r1 - add r4, #0x94 - ldr r3, [r4, #0] - lsl r0, r0, #0x10 - add r4, r3, #0 - mul r4, r2 - ldr r2, [r1, r4] - orr r0, r2 - str r0, [r1, r4] -_0224566E: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02245674: .word 0x00002DBE -_02245678: .word 0x00002DB0 - thumb_func_end ov16_022455F8 - - thumb_func_start ov16_0224567C -ov16_0224567C: ; 0x0224567C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - mov r5, #0x6f - add r2, r0, #0 - lsl r5, r5, #2 - add r1, r4, r5 - lsl r0, r2, #2 - ldr r6, [r1, r0] - mov r3, #8 - tst r3, r6 - beq _022456C0 - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02248AF0 - ldr r1, _02245704 ; =0x0000216C - mov r0, #0x40 - ldr r2, [r4, r1] - orr r0, r2 - str r0, [r4, r1] - b _02245700 -_022456C0: - mov r3, #8 - orr r3, r6 - str r3, [r1, r0] - add r5, #8 - lsl r0, r2, #3 - add r1, r4, r5 - ldr r3, [r1, r0] - ldr r2, _02245708 ; =0xFFF1FFFF - and r3, r2 - mov r2, #0xa - lsl r2, r2, #0x10 - orr r2, r3 - str r2, [r1, r0] - ldr r3, [r1, r0] - ldr r2, _0224570C ; =0xFFFE7FFF - and r3, r2 - ldr r2, [r4, #0x64] - lsl r2, r2, #0x1e - lsr r2, r2, #0xf - orr r2, r3 - str r2, [r1, r0] - add r0, r4, #0 - mov r1, #1 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - ldr r1, [r4, #0x64] - add r0, #0xf8 - str r1, [r0, #0] - mov r0, #0xc6 - add r4, #0xf6 - strh r0, [r4] -_02245700: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245704: .word 0x0000216C -_02245708: .word 0xFFF1FFFF -_0224570C: .word 0xFFFE7FFF - thumb_func_end ov16_0224567C - - thumb_func_start ov16_02245710 -ov16_02245710: ; 0x02245710 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_0223F4BC - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x66 - bge _0224573C - ldr r0, _02245778 ; =0x00002154 - mov r1, #0x28 - str r1, [r4, r0] - b _02245772 -_0224573C: - cmp r0, #0xb2 - bge _02245748 - ldr r0, _02245778 ; =0x00002154 - mov r1, #0x50 - str r1, [r4, r0] - b _02245772 -_02245748: - cmp r0, #0xcc - bge _02245754 - ldr r0, _02245778 ; =0x00002154 - mov r1, #0x78 - str r1, [r4, r0] - b _02245772 -_02245754: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224577C ; =0x00002D90 - ldr r0, [r1, r0] - mov r1, #4 - bl ov16_022563F8 - ldr r1, _02245780 ; =0x0000215C - str r0, [r4, r1] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02245772: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02245778: .word 0x00002154 -_0224577C: .word 0x00002D90 -_02245780: .word 0x0000215C - thumb_func_end ov16_02245710 - - thumb_func_start ov16_02245784 -ov16_02245784: ; 0x02245784 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, _02245824 ; =0x00003120 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _02245814 - add r0, r5, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - ldr r0, _02245824 ; =0x00003120 - strb r1, [r4, r0] - ldrb r1, [r4, r0] - cmp r1, #5 - bhs _022457BC - ldr r1, _02245828 ; =0x00002154 - mov r2, #0xa - str r2, [r4, r1] - mov r1, #4 - strb r1, [r4, r0] - b _02245814 -_022457BC: - cmp r1, #0xf - bhs _022457CC - ldr r1, _02245828 ; =0x00002154 - mov r2, #0x1e - str r2, [r4, r1] - mov r1, #5 - strb r1, [r4, r0] - b _02245814 -_022457CC: - cmp r1, #0x23 - bhs _022457DC - ldr r1, _02245828 ; =0x00002154 - mov r2, #0x32 - str r2, [r4, r1] - mov r1, #6 - strb r1, [r4, r0] - b _02245814 -_022457DC: - cmp r1, #0x41 - bhs _022457EC - ldr r1, _02245828 ; =0x00002154 - mov r2, #0x46 - str r2, [r4, r1] - mov r1, #7 - strb r1, [r4, r0] - b _02245814 -_022457EC: - cmp r1, #0x55 - bhs _022457FC - ldr r1, _02245828 ; =0x00002154 - mov r2, #0x5a - str r2, [r4, r1] - mov r1, #8 - strb r1, [r4, r0] - b _02245814 -_022457FC: - cmp r1, #0x5f - ldr r1, _02245828 ; =0x00002154 - bhs _0224580C - mov r2, #0x6e - str r2, [r4, r1] - mov r1, #9 - strb r1, [r4, r0] - b _02245814 -_0224580C: - mov r2, #0x96 - str r2, [r4, r1] - mov r1, #0xa - strb r1, [r4, r0] -_02245814: - ldr r0, _02245824 ; =0x00003120 - ldrb r1, [r4, r0] - mov r0, #0x13 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02245824: .word 0x00003120 -_02245828: .word 0x00002154 - thumb_func_end ov16_02245784 - - thumb_func_start ov16_0224582C -ov16_0224582C: ; 0x0224582C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r4, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_02255B10 - cmp r0, #0 - bne _02245876 - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 - b _0224588A -_02245876: - cmp r7, #1 - bne _0224588A - mov r0, #0x4f - lsl r0, r0, #2 - add r3, r5, r0 - lsl r2, r4, #2 - ldr r1, [r3, r2] - mov r0, #1 - orr r0, r1 - str r0, [r3, r2] -_0224588A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224582C - - thumb_func_start ov16_02245890 -ov16_02245890: ; 0x02245890 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, [r4, #0x64] - bl ov16_0223E208 - ldr r1, [r4, #0x64] - mov r6, #0xe - ldr r5, _022459CC ; =0x00002DB0 - add r2, r1, #0 - mov r3, #0xc0 - mul r2, r3 - add r1, r4, r5 - ldr r7, [r1, r2] - lsl r6, r6, #0xc - tst r6, r7 - beq _022458EC - ldr r0, _022459D0 ; =0xFFFF1FFF - and r0, r7 - str r0, [r1, r2] - ldr r0, [r4, #0x64] - mov r2, #0x74 - add r1, r0, #0 - add r0, r5, #0 - mul r1, r3 - add r1, r4, r1 - add r0, #0x1c - ldr r0, [r1, r0] - add r5, #0x3a - lsl r0, r0, #0x18 - lsr r1, r0, #0x1e - add r0, r3, #0 - add r0, #0x58 - str r1, [r4, r0] - ldr r0, [r4, #0x64] - add r1, r0, #0 - mul r1, r3 - add r0, r4, r1 - ldrh r0, [r0, r5] - add r3, #0x64 - mov r1, #1 - str r0, [r4, r3] - add r0, r4, #0 - bl ov16_02248B08 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022458EC: - add r5, #0x10 - add r5, r4, r5 - ldr r1, [r5, r2] - mov r6, #4 - tst r6, r1 - beq _02245922 - mov r0, #4 - bic r1, r0 - str r1, [r5, r2] - ldr r0, [r4, #0x64] - add r2, r0, #0 - mul r2, r3 - ldr r1, [r5, r2] - mov r0, #3 - bic r1, r0 - str r1, [r5, r2] - mov r1, #0x49 - add r0, r1, #0 - add r0, #0xdb - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x75 - bl ov16_02248B08 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02245922: - mov r1, #0x72 - lsl r1, r1, #2 - add r6, r4, r1 - lsl r5, r0, #3 - ldr r2, [r6, r5] - lsl r3, r2, #0x1e - lsr r3, r3, #0x1e - beq _0224595E - sub r1, #0xc - lsl r3, r0, #2 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #4 - bic r2, r0 - str r2, [r1, r3] - ldr r1, [r6, r5] - mov r0, #3 - bic r1, r0 - str r1, [r6, r5] - mov r1, #0xbf - add r0, r1, #0 - add r0, #0x65 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x75 - bl ov16_02248B08 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224595E: - lsl r2, r2, #0x1c - lsr r2, r2, #0x1e - beq _02245992 - add r2, r1, #0 - sub r2, #0xc - lsl r7, r0, #2 - add r3, r4, r2 - ldr r2, [r3, r7] - ldr r0, _022459D4 ; =0xFFFFFBFF - and r0, r2 - str r0, [r3, r7] - ldr r2, [r6, r5] - mov r0, #0xc - bic r2, r0 - add r0, r1, #0 - str r2, [r6, r5] - sub r0, #0x42 - sub r1, #0xa4 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x75 - bl ov16_02248B08 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02245992: - add r2, r1, #0 - sub r2, #0xc - add r2, r4, r2 - lsl r0, r0, #2 - ldr r6, [r2, r0] - mov r5, #0x80 - add r3, r6, #0 - tst r3, r5 - beq _022459BE - mov r3, #0x80 - bic r6, r3 - str r6, [r2, r0] - sub r1, #0xa - add r5, #0xa4 - str r1, [r4, r5] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x75 - bl ov16_02248B08 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022459BE: - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022459CC: .word 0x00002DB0 -_022459D0: .word 0xFFFF1FFF -_022459D4: .word 0xFFFFFBFF - thumb_func_end ov16_02245890 - - thumb_func_start ov16_022459D8 -ov16_022459D8: ; 0x022459D8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - ldr r0, _02245A70 ; =0x000080FF - tst r0, r1 - beq _02245A1A - mov r0, #0xd - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02245A1A - mov r0, #0x4c - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02245A2E -_02245A1A: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02245A74 ; =0x00002D90 - ldr r0, [r1, r0] - lsr r1, r0, #1 - ldr r0, _02245A78 ; =0x0000215C - str r1, [r4, r0] - b _02245A6A -_02245A2E: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x30 - tst r0, r1 - ldr r1, [r4, #0x64] - beq _02245A56 - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02245A74 ; =0x00002D90 - ldr r1, [r1, r0] - mov r0, #0x14 - mul r0, r1 - mov r1, #0x1e - bl ov16_022563F8 - ldr r1, _02245A78 ; =0x0000215C - str r0, [r4, r1] - b _02245A6A -_02245A56: - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02245A74 ; =0x00002D90 - ldr r0, [r1, r0] - mov r1, #4 - bl ov16_022563F8 - ldr r1, _02245A78 ; =0x0000215C - str r0, [r4, r1] -_02245A6A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02245A70: .word 0x000080FF -_02245A74: .word 0x00002D90 -_02245A78: .word 0x0000215C - thumb_func_end ov16_022459D8 - - thumb_func_start ov16_02245A7C -ov16_02245A7C: ; 0x02245A7C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, _02245B5C ; =0x00002D54 - ldr r1, [r4, #0x64] - add r3, r4, r0 - mov r0, #0xc0 - mul r0, r1 - ldr r1, [r3, r0] - mov r5, #2 - lsl r0, r1, #2 - lsr r0, r0, #0x1b - and r0, r5 - lsl r2, r0, #4 - lsl r0, r1, #7 - lsr r0, r0, #0x1b - and r0, r5 - lsl r7, r0, #3 - lsl r0, r1, #0xc - lsr r0, r0, #0x1b - and r0, r5 - lsl r0, r0, #2 - mov ip, r0 - lsl r0, r1, #0x11 - lsr r0, r0, #0x1b - and r0, r5 - lsl r6, r0, #1 - lsl r0, r1, #0x1b - lsr r0, r0, #0x1b - lsl r1, r1, #0x16 - and r0, r5 - lsr r1, r1, #0x1b - lsr r0, r0, #1 - and r1, r5 - orr r0, r1 - add r1, r6, #0 - orr r1, r0 - mov r0, ip - orr r0, r1 - orr r0, r7 - add r1, r2, #0 - orr r1, r0 - ldr r0, _02245B60 ; =0x00002154 - str r1, [r4, r0] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r5, [r3, r0] - lsl r0, r5, #2 - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r6, r0, #0x1a - lsl r0, r5, #7 - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r3, r0, #0x1b - lsl r0, r5, #0xc - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r2, r0, #0x1c - lsl r0, r5, #0x11 - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r7, r0, #0x1d - lsl r0, r5, #0x1b - lsr r1, r0, #0x1b - mov r0, #1 - and r0, r1 - lsl r1, r5, #0x16 - lsr r1, r1, #0x1b - lsl r1, r1, #0x1f - lsr r1, r1, #0x1e - orr r0, r1 - orr r0, r7 - orr r0, r2 - orr r0, r3 - add r1, r6, #0 - orr r1, r0 - ldr r0, _02245B60 ; =0x00002154 - add r0, #0xc - str r1, [r4, r0] - ldr r0, _02245B60 ; =0x00002154 - ldr r1, [r4, r0] - mov r0, #0x28 - mul r0, r1 - mov r1, #0x3f - bl sub_020E1F6C - ldr r1, _02245B60 ; =0x00002154 - add r0, #0x1e - str r0, [r4, r1] - add r1, #0xc - ldr r1, [r4, r1] - mov r0, #0xf - mul r0, r1 - mov r1, #0x3f - bl sub_020E1F6C - add r1, r0, #1 - ldr r0, _02245B64 ; =0x00002160 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #9 - blt _02245B56 - add r1, r1, #1 - str r1, [r4, r0] -_02245B56: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245B5C: .word 0x00002D54 -_02245B60: .word 0x00002154 -_02245B64: .word 0x00002160 - thumb_func_end ov16_02245A7C - - thumb_func_start ov16_02245B68 -ov16_02245B68: ; 0x02245B68 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r2, _02245BC0 ; =0x00002D58 - mov r1, #0 - mov r3, #0xc0 - add r5, r2, #0 -_02245B7C: - ldr r6, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r6 - ldr r6, [r4, #0x64] - add r0, r4, r0 - add r0, r1, r0 - add r7, r6, #0 - mul r7, r3 - add r6, r4, r7 - add r6, r1, r6 - ldrsb r0, [r0, r2] - add r1, r1, #1 - cmp r1, #8 - strb r0, [r6, r5] - blt _02245B7C - ldr r0, [r4, #0x64] - ldr r6, [r4, #0x6c] - mov r3, #0xc0 - add r1, r0, #0 - ldr r5, _02245BC4 ; =0x00002DB0 - mul r1, r3 - mul r3, r6 - add r2, r4, r5 - add r3, r4, r3 - ldr r4, [r3, r5] - mov r3, #1 - lsl r3, r3, #0x14 - ldr r0, [r2, r1] - and r3, r4 - orr r0, r3 - str r0, [r2, r1] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245BC0: .word 0x00002D58 -_02245BC4: .word 0x00002DB0 - thumb_func_end ov16_02245B68 - - thumb_func_start ov16_02245BC8 -ov16_02245BC8: ; 0x02245BC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - ldr r1, [r4, #0x6c] - add r2, r0, #0 - mov r0, #0x62 - add r3, r4, r1 - lsl r0, r0, #2 - ldrb r0, [r3, r0] - cmp r0, #0 - bne _02245CA0 - add r0, r7, #0 - bl ov16_0223E208 - mov r1, #0x6f - lsl r1, r1, #2 - lsl r3, r0, #2 - add r5, r4, r1 - ldr r2, [r5, r3] - mov r0, #0x10 - orr r0, r2 - str r0, [r5, r3] - ldr r0, [r4, #0x6c] - add r2, r1, #0 - add r6, r4, r0 - sub r2, #0x34 - mov r0, #3 - strb r0, [r6, r2] - ldr r0, _02245CB0 ; =0x00003044 - ldr r6, [r4, r0] - ldr r0, [r4, #0x6c] - lsl r0, r0, #1 - add r2, r4, r0 - add r0, r1, #0 - sub r0, #0x2c - strh r6, [r2, r0] - ldr r2, [r4, #0x6c] - ldr r0, [r4, #0x64] - lsl r2, r2, #2 - add r2, r4, r2 - sub r1, #0x24 - str r0, [r2, r1] - mov r0, #3 - lsl r0, r0, #7 - ldr r0, [r4, r0] - ldr r2, _02245CB0 ; =0x00003044 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0x64] - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [r4, #0x6c] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r2, [r4, r2] - ldr r3, [r5, r3] - add r0, r7, #0 - bl ov16_0225A280 - mov r1, #0 - add r2, r0, #0 - mvn r1, r1 - mul r2, r1 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0225AEB8 - ldr r1, [r4, #0x6c] - lsl r1, r1, #2 - add r2, r4, r1 - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0x64] - lsl r0, r0, #6 - add r2, r4, r0 - add r0, r1, #0 - add r0, #0x2c - ldr r0, [r2, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _02245CA8 - ldr r0, [r4, #0x6c] - add r5, r4, r1 - lsl r4, r0, #2 - ldr r1, [r5, r4] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - str r0, [r5, r4] - b _02245CA8 -_02245CA0: - add r0, r4, #0 - add r1, r2, #0 - bl ov16_02248AF0 -_02245CA8: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245CB0: .word 0x00003044 - thumb_func_end ov16_02245BC8 - - thumb_func_start ov16_02245CB4 -ov16_02245CB4: ; 0x02245CB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0224A984 - add r6, r0, #0 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_0224B3E8 - str r0, [sp] - ldr r2, [sp, #0xc] - add r0, r5, #0 - add r1, r4, #0 - add r3, r6, #0 - bl ov16_0224B9F4 - ldr r0, _02245D2C ; =0x0000216C - ldr r1, [r4, r0] - ldr r0, _02245D30 ; =0x001FD849 - tst r0, r1 - beq _02245D24 - ldr r1, [sp, #8] - add r0, r4, #0 - bl ov16_02248AF0 -_02245D24: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245D2C: .word 0x0000216C -_02245D30: .word 0x001FD849 - thumb_func_end ov16_02245CB4 - - thumb_func_start ov16_02245D34 -ov16_02245D34: ; 0x02245D34 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #0 - bl ov16_02255C00 - cmp r0, #0 - beq _02245D62 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02245D62: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02245D34 - - thumb_func_start ov16_02245D68 -ov16_02245D68: ; 0x02245D68 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r5, #0x64] - add r0, r7, #0 - bl ov16_0223DF60 - ldr r1, _02245FA0 ; =0x0000217D - str r0, [sp] - ldrb r0, [r5, r1] - cmp r0, #0 - bne _02245DFC - mov r0, #2 - strb r0, [r5, r1] - add r0, r1, #0 - mov r2, #0xfd - add r0, #0xb - str r2, [r5, r0] - mov r2, #0 - add r0, r1, #2 - strb r2, [r5, r0] - add r6, r1, #2 -_02245D9E: - ldr r2, _02245FA4 ; =0x0000217F - ldr r1, [r5, #0x64] - ldrb r2, [r5, r2] - add r0, r7, #0 - bl ov16_0223DFAC - ldr r1, _02245FA4 ; =0x0000217F - add r4, r0, #0 - ldrb r3, [r5, r1] - ldr r1, [r5, #0x64] - add r2, r5, r1 - ldr r1, _02245FA8 ; =0x0000219C - ldrb r1, [r2, r1] - cmp r3, r1 - beq _02245DFC - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02245DF4 - add r0, r4, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02245DF4 - add r0, r4, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02245FAC ; =0x000001EE - cmp r0, r1 - beq _02245DF4 - add r0, r4, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02245DFC -_02245DF4: - ldrb r0, [r5, r6] - add r0, r0, #1 - strb r0, [r5, r6] - b _02245D9E -_02245DFC: - ldr r2, _02245FA4 ; =0x0000217F - ldr r1, [r5, #0x64] - ldrb r2, [r5, r2] - add r0, r7, #0 - bl ov16_0223DFAC - add r4, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - add r0, r4, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r4, r0, #0 - ldr r0, [sp, #4] - add r1, r6, #0 - mov r2, #1 - bl sub_020759CC - ldr r1, _02245FB0 ; =0x00002144 - ldr r2, _02245FB4 ; =0x00003044 - str r0, [r5, r1] - ldr r2, [r5, r2] - ldr r0, [r5, r1] - lsl r2, r2, #4 - add r3, r5, r2 - ldr r2, _02245FB8 ; =0x000003E1 - ldrb r2, [r3, r2] - mul r2, r0 - str r2, [r5, r1] - lsl r0, r4, #1 - mov r1, #5 - bl sub_020E1F6C - ldr r1, _02245FB0 ; =0x00002144 - add r0, r0, #2 - ldr r2, [r5, r1] - mul r0, r2 - str r0, [r5, r1] - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - mov r1, #0xb5 - add r2, r5, r0 - lsl r1, r1, #6 - ldrh r0, [r2, r1] - add r1, #0x26 - ldrb r1, [r2, r1] - mov r2, #2 - lsl r1, r1, #0x1b - lsr r1, r1, #0x1b - bl sub_020759CC - add r1, r0, #0 - ldr r0, _02245FB0 ; =0x00002144 - ldr r0, [r5, r0] - bl sub_020E2178 - ldr r1, _02245FB0 ; =0x00002144 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0x32 - bl sub_020E1F6C - ldr r1, _02245FB0 ; =0x00002144 - str r0, [r5, r1] - ldr r0, [r5, r1] - add r0, r0, #2 - str r0, [r5, r1] - add r0, r1, #0 - add r0, #0xc - ldr r2, [r5, r1] - ldr r0, [r5, r0] - mul r0, r2 - str r0, [r5, r1] - ldr r0, [r5, #0x64] - lsl r0, r0, #6 - add r2, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r2, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _02245EC8 - ldr r1, [r5, r1] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, _02245FB0 ; =0x00002144 - str r0, [r5, r1] -_02245EC8: - ldr r2, _02245FB0 ; =0x00002144 - add r0, r7, #0 - ldr r2, [r5, r2] - add r1, r5, #0 - bl ov16_0225AEB8 - ldr r1, _02245FB0 ; =0x00002144 - str r0, [r5, r1] - mov r0, #0 - ldr r2, [r5, r1] - mvn r0, r0 - mul r0, r2 - str r0, [r5, r1] - add r0, r5, #0 - add r3, r1, #0 - ldr r2, _02245FBC ; =0x000001E1 - add r0, #0xf6 - strh r2, [r0] - add r0, r5, #0 - mov r2, #2 - add r0, #0xf5 - strb r2, [r0] - add r3, #0x3b - ldrb r3, [r5, r3] - ldr r0, [r5, #0x64] - add r6, r1, #0 - lsl r3, r3, #8 - orr r3, r0 - add r0, r5, #0 - add r0, #0xf8 - str r3, [r0, #0] - add r0, r1, #0 - add r0, #0x3b - ldrb r0, [r5, r0] - add r6, #0x3b - add r3, r0, #1 - add r0, r1, #0 - add r0, #0x3b - strb r3, [r5, r0] - add r0, r1, #0 - add r0, #0x38 - strb r2, [r5, r0] - add r0, r1, #0 - add r0, #0x3b - ldrb r2, [r5, r0] - ldr r0, [sp] - cmp r2, r0 - bge _02245F92 -_02245F28: - ldr r1, [r5, #0x64] - add r0, r7, #0 - bl ov16_0223DFAC - ldr r1, _02245FA4 ; =0x0000217F - add r4, r0, #0 - ldrb r3, [r5, r1] - ldr r1, [r5, #0x64] - add r2, r5, r1 - ldr r1, _02245FA8 ; =0x0000219C - ldrb r1, [r2, r1] - cmp r3, r1 - beq _02245F98 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02245F7A - add r0, r4, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02245F7A - add r0, r4, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02245FAC ; =0x000001EE - cmp r0, r1 - beq _02245F7A - add r0, r4, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02245F98 -_02245F7A: - ldrb r0, [r5, r6] - add r0, r0, #1 - strb r0, [r5, r6] - ldr r0, _02245FA4 ; =0x0000217F - ldrb r2, [r5, r0] - ldr r0, [sp] - cmp r2, r0 - blt _02245F28 - ldr r0, _02245FC0 ; =0x0000217C - mov r1, #1 - strb r1, [r5, r0] - b _02245F98 -_02245F92: - mov r0, #1 - add r1, #0x38 - strb r0, [r5, r1] -_02245F98: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245FA0: .word 0x0000217D -_02245FA4: .word 0x0000217F -_02245FA8: .word 0x0000219C -_02245FAC: .word 0x000001EE -_02245FB0: .word 0x00002144 -_02245FB4: .word 0x00003044 -_02245FB8: .word 0x000003E1 -_02245FBC: .word 0x000001E1 -_02245FC0: .word 0x0000217C - thumb_func_end ov16_02245D68 - - thumb_func_start ov16_02245FC4 -ov16_02245FC4: ; 0x02245FC4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - mov r1, #0x71 - lsl r1, r1, #2 - mov r2, #1 - add r1, r4, r1 - lsl r0, r0, #3 - ldr r3, [r1, r0] - lsl r2, r2, #0x14 - orr r2, r3 - str r2, [r1, r0] - ldr r3, [r1, r0] - ldr r2, _02246000 ; =0xFF9FFFFF - and r3, r2 - ldr r2, [r4, #0x64] - lsl r2, r2, #0x1e - lsr r2, r2, #9 - orr r2, r3 - str r2, [r1, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02246000: .word 0xFF9FFFFF - thumb_func_end ov16_02245FC4 - - thumb_func_start ov16_02246004 -ov16_02246004: ; 0x02246004 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _0224608E - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0x10 - bl ov16_0224A984 - add r4, r0, #0 - bl sub_020787CC - ldr r1, _0224609C ; =0x00003108 - ldrb r1, [r5, r1] - tst r0, r1 - bne _02246084 - lsl r0, r4, #4 - add r1, r5, r0 - ldr r0, _022460A0 ; =0x000021A8 - ldr r0, [r1, r0] - cmp r0, #0x27 - beq _02246084 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _022460A4 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02246084 - ldr r0, [r5, #0x64] - mov r2, #0x75 - lsl r0, r0, #6 - add r0, r5, r0 - lsl r2, r2, #2 - ldr r0, [r0, r2] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - bne _02246084 - add r1, r5, r2 - lsl r0, r4, #6 - ldr r3, [r1, r0] - lsl r3, r3, #0x1c - lsr r3, r3, #0x1f - bne _02246084 - sub r2, #0xbc - str r4, [r5, r2] - ldr r3, [r1, r0] - mov r2, #8 - orr r2, r3 - str r2, [r1, r0] - b _02246096 -_02246084: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02248AF0 - b _02246096 -_0224608E: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02246096: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_0224609C: .word 0x00003108 -_022460A0: .word 0x000021A8 -_022460A4: .word 0x00002D8C - thumb_func_end ov16_02246004 - - thumb_func_start ov16_022460A8 -ov16_022460A8: ; 0x022460A8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r5, #0 - bl ov16_0223DF0C - str r0, [sp, #8] - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - str r0, [sp] - ldr r1, [r4, #0x6c] - add r0, r5, #0 - bl ov16_0223E208 - add r7, r0, #0 - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - cmp r0, #0 - beq _02246102 - ldr r0, [sp, #8] - mov r1, #0x84 - tst r0, r1 - bne _02246102 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 - b _022461A0 -_02246102: - ldr r0, [r4, #0x64] - add r1, r4, r0 - ldr r0, _022461A8 ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - ldr r1, [sp] - lsl r1, r1, #3 - add r2, r4, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #3 - lsr r1, r1, #0x1a - tst r0, r1 - bne _02246140 - ldr r0, [r4, #0x6c] - add r1, r4, r0 - ldr r0, _022461A8 ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - lsl r1, r7, #3 - add r2, r4, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #3 - lsr r1, r1, #0x1a - tst r0, r1 - beq _0224614A -_02246140: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 - b _022461A0 -_0224614A: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - add r3, r4, r2 - ldr r2, _022461AC ; =0x00002DB8 - ldrh r3, [r3, r2] - cmp r3, #0 - bne _02246168 - ldr r3, [r4, #0x6c] - mul r0, r3 - add r0, r4, r0 - ldrh r0, [r0, r2] - cmp r0, #0 - beq _0224617E -_02246168: - add r0, r4, #0 - bl ov16_022559DC - cmp r0, #0 - beq _0224617E - ldr r1, [r4, #0x6c] - add r0, r4, #0 - bl ov16_022559DC - cmp r0, #0 - bne _02246188 -_0224617E: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 - b _022461A0 -_02246188: - ldr r1, [r4, #0x64] - ldr r2, [r4, #0x6c] - add r0, r4, #0 - mov r3, #0x3c - bl ov16_02255AB4 - cmp r0, #1 - bne _022461A0 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02248AF0 -_022461A0: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022461A8: .word 0x0000219C -_022461AC: .word 0x00002DB8 - thumb_func_end ov16_022460A8 - - thumb_func_start ov16_022461B0 -ov16_022461B0: ; 0x022461B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - mov r2, #0x63 - lsl r2, r2, #2 - ldr r3, [r4, #0x64] - add r5, r4, r2 - add r1, r0, #0 - ldrb r0, [r5, r3] - cmp r0, #0 - beq _022461DA - add r0, r4, #0 - bl ov16_02248AF0 - b _022461EA -_022461DA: - mov r0, #2 - strb r0, [r5, r3] - ldr r0, [r4, #0x64] - add r2, #0x2c - add r1, r4, r0 - ldr r0, _022461F0 ; =0x0000219C - ldrb r0, [r1, r0] - strb r0, [r1, r2] -_022461EA: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022461F0: .word 0x0000219C - thumb_func_end ov16_022461B0 - - thumb_func_start ov16_022461F4 -ov16_022461F4: ; 0x022461F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - str r0, [sp] - str r1, [sp, #4] - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [sp, #4] - bl ov16_02248AD0 - ldr r1, [sp, #4] - str r0, [sp, #0x14] - ldr r0, [sp] - ldr r1, [r1, #0x64] - mov r7, #0 - bl ov16_0223DF60 - str r0, [sp, #0xc] - add r0, r7, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - cmp r0, #0 - ble _022462A2 - add r5, sp, #0x18 -_02246226: - ldr r0, [sp, #4] - ldr r1, [r0, #0x64] - add r2, r0, r1 - ldr r0, _022462D0 ; =0x0000219C - ldrb r2, [r2, r0] - ldr r0, [sp, #0x10] - cmp r0, r2 - beq _02246296 - ldr r0, [sp] - ldr r2, [sp, #0x10] - bl ov16_0223DFAC - mov r1, #0xae - mov r2, #0 - str r0, [sp, #8] - bl sub_02074470 - cmp r0, #0 - beq _02246296 - ldr r0, [sp, #8] - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _022462D4 ; =0x000001EE - cmp r0, r1 - beq _02246296 - mov r4, #0 -_0224625E: - add r1, r4, #0 - ldr r0, [sp, #8] - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r6, #0 - bl ov16_02255918 - cmp r0, #0 - bne _02246290 - ldr r1, [sp, #4] - ldr r0, [sp] - add r2, r1, #0 - ldr r2, [r2, #0x64] - add r3, r6, #0 - bl ov16_0225B02C - cmp r0, #1 - bne _02246290 - strh r6, [r5] - add r5, r5, #2 - add r7, r7, #1 -_02246290: - add r4, r4, #1 - cmp r4, #4 - blt _0224625E -_02246296: - ldr r0, [sp, #0x10] - add r1, r0, #1 - ldr r0, [sp, #0xc] - str r1, [sp, #0x10] - cmp r1, r0 - blt _02246226 -_022462A2: - cmp r7, #0 - beq _022462C2 - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r7, #0 - bl sub_020E1F6C - lsl r1, r1, #1 - add r0, sp, #0x18 - ldrh r2, [r0, r1] - mov r1, #0x49 - ldr r0, [sp, #4] - lsl r1, r1, #2 - str r2, [r0, r1] - b _022462CA -_022462C2: - ldr r0, [sp, #4] - ldr r1, [sp, #0x14] - bl ov16_02248AF0 -_022462CA: - mov r0, #0 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022462D0: .word 0x0000219C -_022462D4: .word 0x000001EE - thumb_func_end ov16_022461F4 - - thumb_func_start ov16_022462D8 -ov16_022462D8: ; 0x022462D8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - mov r4, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _02246306 -_022462FA: - add r0, r5, #0 - add r4, r4, #1 - bl ov16_0223DF1C - cmp r4, r0 - blt _022462FA -_02246306: - ldr r0, _02246330 ; =0x00003150 - ldr r0, [r6, r0] - cmp r0, #1 - bne _02246318 - add r0, r6, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _0224632A -_02246318: - mov r0, #0x75 - lsl r0, r0, #2 - add r3, r6, r0 - ldr r0, [r6, #0x64] - lsl r2, r0, #6 - ldr r1, [r3, r2] - mov r0, #0x10 - orr r0, r1 - str r0, [r3, r2] -_0224632A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02246330: .word 0x00003150 - thumb_func_end ov16_022462D8 - - thumb_func_start ov16_02246334 -ov16_02246334: ; 0x02246334 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r5, #0x64] - add r0, r6, #0 - bl ov16_0223E208 - add r1, r5, #0 - ldr r4, [r5, #0x64] - add r1, #0x84 - str r4, [r1, #0] - ldr r1, [r5, #0x6c] - lsl r0, r0, #3 - str r1, [r5, #0x64] - mov r1, #0x71 - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _0224637E - lsl r0, r0, #9 - lsr r0, r0, #0x1e - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - ldr r1, _022463DC ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _0224637E - str r0, [r5, #0x6c] - b _022463CA -_0224637E: - ldr r0, _022463E0 ; =0x00003044 - ldr r3, [r5, r0] - lsl r0, r3, #4 - add r1, r5, r0 - ldr r0, _022463E4 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #4 - beq _02246392 - cmp r0, #8 - bne _02246396 -_02246392: - str r4, [r5, #0x6c] - b _022463CA -_02246396: - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - lsl r3, r3, #0x10 - ldr r2, [r5, #0x64] - add r0, r6, #0 - add r1, r5, #0 - lsr r3, r3, #0x10 - bl ov16_02253954 - mov r1, #0xb5 - lsl r1, r1, #2 - add r2, r5, r1 - mov r1, #0x1c - mul r1, r0 - ldr r1, [r2, r1] - lsl r2, r1, #0x1e - lsr r2, r2, #0x1f - bne _022463C4 - lsl r1, r1, #0x1d - lsr r1, r1, #0x1f - beq _022463C8 -_022463C4: - str r0, [r5, #0x6c] - b _022463CA -_022463C8: - str r4, [r5, #0x6c] -_022463CA: - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r5, r1] - mov r0, #8 - orr r0, r2 - str r0, [r5, r1] - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022463DC: .word 0x00002D8C -_022463E0: .word 0x00003044 -_022463E4: .word 0x000003E6 - thumb_func_end ov16_02246334 - - thumb_func_start ov16_022463E8 -ov16_022463E8: ; 0x022463E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r5, #0x64] - ldr r0, [r5, #0x6c] - lsl r4, r1, #6 - add r2, r5, r4 - lsl r1, r0, #2 - add r2, r2, r1 - mov r1, #0x76 - lsl r1, r1, #2 - ldr r1, [r2, r1] - cmp r1, #0 - beq _0224641A - bl sub_020787CC - mov r1, #0x7b - add r2, r5, r4 - lsl r1, r1, #2 - ldr r1, [r2, r1] - tst r0, r1 - bne _02246440 -_0224641A: - ldr r0, [r5, #0x6c] - add r2, r5, r4 - lsl r1, r0, #2 - add r2, r2, r1 - mov r1, #0x1f - lsl r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, #0 - beq _02246448 - bl sub_020787CC - ldr r1, [r5, #0x64] - lsl r1, r1, #6 - add r2, r5, r1 - mov r1, #0x81 - lsl r1, r1, #2 - ldr r1, [r2, r1] - tst r0, r1 - beq _02246448 -_02246440: - ldr r0, _02246454 ; =0x00002158 - mov r1, #0x14 - str r1, [r5, r0] - b _0224644E -_02246448: - ldr r0, _02246454 ; =0x00002158 - mov r1, #0xa - str r1, [r5, r0] -_0224644E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02246454: .word 0x00002158 - thumb_func_end ov16_022463E8 - - thumb_func_start ov16_02246458 -ov16_02246458: ; 0x02246458 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r1, [r4, #0x6c] - add r0, r5, #0 - bl ov16_0223E208 - lsl r1, r0, #2 - add r2, r4, r1 - mov r1, #0x6f - lsl r1, r1, #2 - ldr r2, [r2, r1] - mov r1, #1 - tst r1, r2 - bne _0224648C - mov r1, #2 - tst r1, r2 - beq _022464BC -_0224648C: - mov r5, #0x6f - lsl r5, r5, #2 - add r2, r4, r5 - lsl r1, r0, #2 - ldr r6, [r2, r1] - mov r3, #1 - bic r6, r3 - str r6, [r2, r1] - ldr r6, [r2, r1] - mov r3, #2 - bic r6, r3 - add r5, #8 - str r6, [r2, r1] - lsl r2, r0, #3 - add r3, r4, r5 - ldr r1, [r3, r2] - mov r0, #0x1c - bic r1, r0 - str r1, [r3, r2] - ldr r1, [r3, r2] - ldr r0, _022464C8 ; =0xFFFFFC7F - and r0, r1 - str r0, [r3, r2] - b _022464C4 -_022464BC: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_022464C4: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022464C8: .word 0xFFFFFC7F - thumb_func_end ov16_02246458 - - thumb_func_start ov16_022464CC -ov16_022464CC: ; 0x022464CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - mov r0, #0xb7 - lsl r0, r0, #6 - add r3, r4, r0 - ldr r0, [r4, #0x6c] - mov r5, #0xc0 - add r2, r0, #0 - mul r2, r5 - ldr r0, [r3, r2] - lsl r5, r5, #5 - tst r5, r0 - beq _022464FE - add r0, r4, #0 - bl ov16_02248AF0 - b _02246506 -_022464FE: - mov r1, #1 - lsl r1, r1, #0xc - orr r0, r1 - str r0, [r3, r2] -_02246506: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022464CC - - thumb_func_start ov16_0224650C -ov16_0224650C: ; 0x0224650C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r1, [r5, #0x6c] - add r0, r4, #0 - bl ov16_0223E208 - add r4, r0, #0 - ldr r2, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r1, r5, r0 - ldr r0, _02246618 ; =0x00002DB8 - ldrh r0, [r1, r0] - cmp r0, #0 - beq _02246586 - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r3, #0x3c - bl ov16_02255AB4 - cmp r0, #1 - bne _02246586 - add r0, r5, #0 - ldr r1, _0224661C ; =0x000002CA - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x25 - add r0, #0xf5 - strb r1, [r0] - ldr r1, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - ldr r0, [r5, #0x6c] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02246620 ; =0x00002D67 - add r2, r5, r2 - ldrb r2, [r2, r0] - add r0, r5, #0 - add r0, #0xfc - str r2, [r0, #0] - ldr r0, _02246624 ; =0x00003044 - add r1, #0x40 - ldr r0, [r5, r0] - str r0, [r5, r1] - b _02246614 -_02246586: - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02246618 ; =0x00002DB8 - ldrh r0, [r1, r0] - cmp r0, #0 - beq _0224660C - mov r1, #0x8a - add r0, r5, #0 - lsl r1, r1, #2 - add r0, #0xf6 - strh r1, [r0] - add r0, r5, #0 - mov r1, #0x21 - add r0, #0xf5 - strb r1, [r0] - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - ldr r1, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02255560 - add r1, r5, #0 - add r1, #0xfc - str r0, [r1, #0] - ldr r0, [r5, #0x6c] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - add r0, r5, r2 - ldr r2, _02246618 ; =0x00002DB8 - ldrh r3, [r0, r2] - add r0, r1, #0 - add r0, #0x40 - str r3, [r5, r0] - ldr r3, [r5, #0x6c] - mov r0, #0 - mul r1, r3 - add r1, r5, r1 - strh r0, [r1, r2] - ldr r0, [r5, #0x6c] - add r1, r5, r0 - ldr r0, _02246628 ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - mov r1, #0x71 - lsl r1, r1, #2 - add r3, r5, r1 - lsl r2, r4, #3 - ldr r4, [r3, r2] - ldr r1, _0224662C ; =0xE07FFFFF - and r1, r4 - lsl r4, r4, #3 - lsr r4, r4, #0x1a - orr r0, r4 - lsl r0, r0, #0x1a - lsr r0, r0, #3 - orr r0, r1 - str r0, [r3, r2] - b _02246614 -_0224660C: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02246614: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02246618: .word 0x00002DB8 -_0224661C: .word 0x000002CA -_02246620: .word 0x00002D67 -_02246624: .word 0x00003044 -_02246628: .word 0x0000219C -_0224662C: .word 0xE07FFFFF - thumb_func_end ov16_0224650C - - thumb_func_start ov16_02246630 -ov16_02246630: ; 0x02246630 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, _02246678 ; =0x00002154 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02246674 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _0224667C ; =0x00003044 - ldr r1, [r4, r1] - lsl r1, r1, #4 - add r2, r4, r1 - ldr r1, _02246680 ; =0x000003E1 - ldrb r3, [r2, r1] - ldr r1, _02246684 ; =0x00002D8C - add r2, r4, r0 - ldr r0, [r2, r1] - add r1, r1, #4 - ldr r1, [r2, r1] - mul r0, r3 - bl sub_020E2178 - ldr r1, _02246678 ; =0x00002154 - str r0, [r4, r1] - ldr r0, [r4, r1] - cmp r0, #0 - bne _02246674 - mov r0, #1 - str r0, [r4, r1] -_02246674: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02246678: .word 0x00002154 -_0224667C: .word 0x00003044 -_02246680: .word 0x000003E1 -_02246684: .word 0x00002D8C - thumb_func_end ov16_02246630 - - thumb_func_start ov16_02246688 -ov16_02246688: ; 0x02246688 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r1, #0 - str r0, [sp] - add r0, r7, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r7, #0 - bl ov16_02248AD0 - str r0, [sp, #0x14] - ldr r0, [sp] - ldr r1, [r7, #0x64] - mov r2, #0 - bl ov16_0223E2A4 - add r4, r0, #0 - ldr r0, [sp] - ldr r1, [r7, #0x64] - mov r2, #2 - bl ov16_0223E2A4 - mov r6, #0xb7 - add r3, r0, #0 - lsl r6, r6, #6 - add r1, r4, #0 - mov r0, #0xc0 - mov r4, #1 - add r2, r7, r6 - mul r1, r0 - ldr r5, [r2, r1] - lsl r4, r4, #0x1e - orr r5, r4 - str r5, [r2, r1] - add r1, r3, #0 - mul r1, r0 - ldr r3, [r2, r1] - orr r3, r4 - str r3, [r2, r1] - ldr r1, [r7, #0x64] - mul r0, r1 - add r0, r7, r0 - ldr r2, [r0, r6] - lsr r0, r4, #0x11 - tst r0, r2 - beq _022466F0 - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl ov16_02248AF0 - b _02246794 -_022466F0: - ldr r0, [sp] - bl ov16_0223E208 - str r0, [sp, #0x10] - ldr r0, [sp] - bl ov16_0223DF1C - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - cmp r0, #0 - ble _0224676A - str r7, [sp, #4] -_0224670C: - ldr r0, [sp] - ldr r1, [sp, #0xc] - bl ov16_0223E208 - ldr r1, [sp, #0x10] - cmp r1, r0 - beq _02246758 - mov r2, #0 - ldr r0, _0224679C ; =0x00002D4C - add r4, r2, #0 -_02246720: - ldr r1, [r7, #0x64] - mov r6, #0xc0 - mul r6, r1 - add r1, r7, r6 - add r6, r1, r4 - ldr r1, _0224679C ; =0x00002D4C - ldr r5, [sp, #4] - ldrh r6, [r6, r1] - mov r3, #0 -_02246732: - ldrh r1, [r5, r0] - cmp r6, r1 - bne _02246740 - cmp r6, #0 - beq _02246740 - cmp r1, #0 - bne _02246748 -_02246740: - add r3, r3, #1 - add r5, r5, #2 - cmp r3, #4 - blt _02246732 -_02246748: - cmp r3, #4 - bne _02246754 - add r2, r2, #1 - add r4, r4, #2 - cmp r2, #4 - blt _02246720 -_02246754: - cmp r3, #4 - bne _0224676A -_02246758: - ldr r0, [sp, #4] - add r0, #0xc0 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp, #8] - str r1, [sp, #0xc] - cmp r1, r0 - blt _0224670C -_0224676A: - ldr r1, [sp, #0xc] - ldr r0, [sp, #8] - cmp r1, r0 - bne _0224677C - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl ov16_02248AF0 - b _02246794 -_0224677C: - mov r0, #0xb7 - ldr r1, [r7, #0x64] - lsl r0, r0, #6 - add r3, r7, r0 - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - mov r0, #2 - ldr r1, [r3, r2] - lsl r0, r0, #0xc - orr r0, r1 - str r0, [r3, r2] -_02246794: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224679C: .word 0x00002D4C - thumb_func_end ov16_02246688 - - thumb_func_start ov16_022467A0 -ov16_022467A0: ; 0x022467A0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - ldr r1, [r4, #0x6c] - add r0, r7, #0 - bl ov16_0223E208 - ldr r5, [r4, #0x74] - mov r0, #0xc0 - mul r0, r5 - add r1, r4, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0xe - tst r0, r1 - beq _02246838 - ldr r1, [r4, #0x64] - add r0, r7, #0 - bl ov16_0223E208 - add r6, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0223E208 - cmp r6, r0 - beq _02246838 - ldr r6, [r4, #0x64] - mov r1, #0xc0 - add r0, r6, #0 - mul r0, r1 - ldr r2, _02246844 ; =0x00002D8C - add r5, r4, r0 - ldr r0, [r5, r2] - cmp r0, #0 - beq _02246838 - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r3, [r4, r0] - cmp r3, #0xa5 - beq _02246838 - lsl r3, r6, #1 - add r3, r4, r3 - add r0, #0x7c - ldrh r0, [r3, r0] - add r3, r2, #0 - mov r6, #0 - add r5, r5, r0 - sub r3, #0x20 - strb r6, [r5, r3] - ldr r3, [r4, #0x64] - lsl r0, r0, #1 - add r5, r3, #0 - mul r5, r1 - add r3, r4, r5 - add r0, r3, r0 - sub r2, #0x40 - ldrh r0, [r0, r2] - add r1, #0x64 - str r0, [r4, r1] - ldr r2, [r4, #0x64] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_02253EC0 - b _02246840 -_02246838: - ldr r1, [sp] - add r0, r4, #0 - bl ov16_02248AF0 -_02246840: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246844: .word 0x00002D8C - thumb_func_end ov16_022467A0 - - thumb_func_start ov16_02246848 -ov16_02246848: ; 0x02246848 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - mov r4, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _02246876 -_0224686A: - add r0, r5, #0 - add r4, r4, #1 - bl ov16_0223DF1C - cmp r4, r0 - blt _0224686A -_02246876: - ldr r0, _022468A0 ; =0x00003150 - ldr r0, [r6, r0] - cmp r0, #1 - bne _02246888 - add r0, r6, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _0224689A -_02246888: - mov r0, #0x75 - lsl r0, r0, #2 - add r3, r6, r0 - ldr r0, [r6, #0x64] - lsl r2, r0, #6 - ldr r1, [r3, r2] - mov r0, #0x20 - orr r0, r1 - str r0, [r3, r2] -_0224689A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022468A0: .word 0x00003150 - thumb_func_end ov16_02246848 - - thumb_func_start ov16_022468A4 -ov16_022468A4: ; 0x022468A4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _022468F0 ; =0x00002D60 - ldr r5, _022468F4 ; =0x0226E5F0 - ldr r3, [r2, r1] - ldr r1, _022468F8 ; =0x0000FFFF - mov r0, #0 -_022468C2: - ldrh r2, [r5] - cmp r2, r3 - bge _022468D2 - add r5, r5, #4 - ldrh r2, [r5] - add r0, r0, #1 - cmp r2, r1 - bne _022468C2 -_022468D2: - lsl r2, r0, #2 - ldr r0, _022468F4 ; =0x0226E5F0 - ldrh r1, [r0, r2] - ldr r0, _022468F8 ; =0x0000FFFF - cmp r1, r0 - beq _022468E4 - ldr r0, _022468FC ; =0x0226E5F2 - ldrh r1, [r0, r2] - b _022468E6 -_022468E4: - mov r1, #0x78 -_022468E6: - ldr r0, _02246900 ; =0x00002154 - str r1, [r4, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022468F0: .word 0x00002D60 -_022468F4: .word 0x0226E5F0 -_022468F8: .word 0x0000FFFF -_022468FC: .word 0x0226E5F2 -_02246900: .word 0x00002154 - thumb_func_end ov16_022468A4 - - thumb_func_start ov16_02246904 -ov16_02246904: ; 0x02246904 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #0xd - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _022469AC - mov r0, #0x4c - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _022469AC - mov r1, #6 - lsl r1, r1, #6 - ldr r2, [r4, r1] - ldr r0, _022469B0 ; =0x000080FF - tst r0, r2 - ldr r0, _022469B4 ; =0x00003044 - beq _0224699E - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r2, r4, r0 - ldr r0, _022469B8 ; =0x000003E1 - ldrb r0, [r2, r0] - lsl r2, r0, #1 - ldr r0, _022469BC ; =0x00002154 - str r2, [r4, r0] - ldr r2, [r4, r1] - mov r1, #3 - tst r1, r2 - beq _02246966 - mov r1, #0xb - add r0, #0xc - str r1, [r4, r0] -_02246966: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0xc - tst r0, r1 - beq _02246978 - ldr r0, _022469C0 ; =0x00002160 - mov r1, #5 - str r1, [r4, r0] -_02246978: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x30 - tst r0, r1 - beq _0224698A - ldr r0, _022469C0 ; =0x00002160 - mov r1, #0xa - str r1, [r4, r0] -_0224698A: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0xc0 - tst r0, r1 - beq _022469AC - ldr r0, _022469C0 ; =0x00002160 - mov r1, #0xf - str r1, [r4, r0] - b _022469AC -_0224699E: - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _022469B8 ; =0x000003E1 - ldrb r1, [r1, r0] - ldr r0, _022469BC ; =0x00002154 - str r1, [r4, r0] -_022469AC: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022469B0: .word 0x000080FF -_022469B4: .word 0x00003044 -_022469B8: .word 0x000003E1 -_022469BC: .word 0x00002154 -_022469C0: .word 0x00002160 - thumb_func_end ov16_02246904 - - thumb_func_start ov16_022469C4 -ov16_022469C4: ; 0x022469C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #0x10] - ldr r0, [sp] - bl ov16_0223DF1C - mov r7, #0 - str r0, [sp, #0xc] - cmp r0, #0 - bgt _022469EC - b _02246AFE -_022469EC: - mov r0, #0xb5 - lsl r0, r0, #6 - add r0, r5, r0 - str r5, [sp, #8] - add r4, r5, #0 - str r0, [sp, #4] -_022469F8: - ldr r1, [sp, #8] - ldr r0, _02246B40 ; =0x000021A8 - ldr r0, [r1, r0] - cmp r0, #0x27 - beq _02246AE6 - ldr r0, _02246B44 ; =0x00002D8C - ldr r0, [r4, r0] - cmp r0, #0 - beq _02246AE6 - ldr r0, _02246B48 ; =0x00002DAC - ldr r1, [r4, r0] - mov r0, #0x27 - tst r0, r1 - bne _02246AE6 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255EC0 - cmp r0, #0 - bne _02246AE6 - ldr r0, [sp] - add r1, r7, #0 - bl ov16_0223E208 - str r0, [sp, #0x14] - ldr r0, [sp] - ldr r1, [r5, #0x78] - bl ov16_0223E208 - ldr r1, [sp, #0x14] - cmp r1, r0 - beq _02246AE6 - ldr r0, _02246B4C ; =0x00002DEC - ldrh r6, [r4, r0] - cmp r6, #0 - beq _02246A50 - add r0, r0, #2 - ldrh r0, [r4, r0] - lsl r0, r0, #1 - add r1, r4, r0 - ldr r0, _02246B50 ; =0x00002D4C - ldrh r0, [r1, r0] - cmp r6, r0 - beq _02246A5A -_02246A50: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255570 - add r6, r0, #0 -_02246A5A: - cmp r6, #0 - beq _02246AE6 - lsl r1, r6, #0x10 - ldr r0, [sp, #4] - lsr r1, r1, #0x10 - bl ov16_02254EE0 - str r0, [sp, #0x18] - lsl r0, r6, #4 - add r1, r5, r0 - ldr r0, _02246B54 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x80 - bne _02246AE6 - ldr r0, [sp, #0x18] - add r1, r4, r0 - ldr r0, _02246B58 ; =0x00002D6C - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02246AE6 - ldr r0, _02246B58 ; =0x00002D6C - add r1, r5, r0 - mov r0, #0xc0 - mul r0, r7 - add r4, r1, r0 - ldr r0, [sp, #0x18] - ldrb r0, [r4, r0] - sub r1, r0, #1 - ldr r0, [sp, #0x18] - strb r1, [r4, r0] - ldr r1, [r5, #0x78] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x2e - bne _02246AB0 - ldr r0, [sp, #0x18] - ldrb r0, [r4, r0] - cmp r0, #0 - beq _02246AB0 - sub r1, r0, #1 - ldr r0, [sp, #0x18] - strb r1, [r4, r0] -_02246AB0: - ldr r0, [sp] - add r1, r5, #0 - bl ov16_02255F94 - str r7, [r5, #0x64] - ldr r0, [r5, #0x78] - lsl r2, r7, #1 - str r0, [r5, #0x6c] - ldr r1, _02246B5C ; =0x00002158 - mov r0, #0x14 - str r0, [r5, r1] - ldr r0, _02246B60 ; =0x00003044 - add r2, r5, r2 - str r6, [r5, r0] - add r0, #0x38 - strh r6, [r2, r0] - lsl r0, r7, #4 - mov r2, #0x27 - add r0, r5, r0 - add r1, #0x50 - str r2, [r0, r1] - ldr r0, [sp] - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02253EC0 - b _02246AFE -_02246AE6: - ldr r0, [sp, #8] - add r7, r7, #1 - add r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r4, #0xc0 - add r0, #0xc0 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - cmp r7, r0 - bge _02246AFE - b _022469F8 -_02246AFE: - ldr r0, [sp, #0xc] - cmp r7, r0 - bne _02246B0E - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02248AF0 - b _02246B3A -_02246B0E: - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02258AB8 - add r4, r0, #0 - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - cmp r4, #0x37 - beq _02246B2E - cmp r4, #0x73 - beq _02246B2E - cmp r4, #0x7d - bne _02246B3A -_02246B2E: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02246B64 ; =0x00002DF8 - strh r6, [r1, r0] -_02246B3A: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246B40: .word 0x000021A8 -_02246B44: .word 0x00002D8C -_02246B48: .word 0x00002DAC -_02246B4C: .word 0x00002DEC -_02246B50: .word 0x00002D4C -_02246B54: .word 0x000003DE -_02246B58: .word 0x00002D6C -_02246B5C: .word 0x00002158 -_02246B60: .word 0x00003044 -_02246B64: .word 0x00002DF8 - thumb_func_end ov16_022469C4 - - thumb_func_start ov16_02246B68 -ov16_02246B68: ; 0x02246B68 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [r4, #0x64] - ldr r3, _02246BA8 ; =0x00002144 - str r0, [sp] - ldr r0, [r4, #0x6c] - ldr r2, _02246BAC ; =0x00003044 - str r0, [sp, #4] - ldr r0, [r4, r3] - add r1, r4, #0 - str r0, [sp, #8] - add r0, r3, #0 - add r0, #0x28 - add r0, r4, r0 - str r0, [sp, #0xc] - add r3, #0x1c - ldr r2, [r4, r2] - ldr r3, [r4, r3] - add r0, r5, #0 - bl ov16_02254FA8 - ldr r1, _02246BA8 ; =0x00002144 - str r0, [r4, r1] - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02246BA8: .word 0x00002144 -_02246BAC: .word 0x00003044 - thumb_func_end ov16_02246B68 - - thumb_func_start ov16_02246BB0 -ov16_02246BB0: ; 0x02246BB0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - mov r6, #0 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r5, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - ldr r0, [sp] - ldr r2, [sp, #8] - add r1, r4, #0 - bl ov16_0224A984 - cmp r7, #6 - bhi _02246CA2 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246BFC: ; jump table - .short _02246C0A - _02246BFC - 2 ; case 0 - .short _02246C20 - _02246BFC - 2 ; case 1 - .short _02246C36 - _02246BFC - 2 ; case 2 - .short _02246C4C - _02246BFC - 2 ; case 3 - .short _02246C62 - _02246BFC - 2 ; case 4 - .short _02246C78 - _02246BFC - 2 ; case 5 - .short _02246C8E - _02246BFC - 2 ; case 6 -_02246C0A: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 - b _02246CA2 -_02246C20: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 - b _02246CA2 -_02246C36: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 - b _02246CA2 -_02246C4C: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 - b _02246CA2 -_02246C62: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 - b _02246CA2 -_02246C78: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 - b _02246CA2 -_02246C8E: - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - cmp r5, r0 - bne _02246CA2 - mov r6, #1 -_02246CA2: - cmp r6, #0 - beq _02246CAE - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02248AF0 -_02246CAE: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_02246BB0 - - thumb_func_start ov16_02246CB4 -ov16_02246CB4: ; 0x02246CB4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r2, [sp] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0224A984 - cmp r6, #6 - bhi _02246DA8 - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246CF4: ; jump table - .short _02246D02 - _02246CF4 - 2 ; case 0 - .short _02246D1A - _02246CF4 - 2 ; case 1 - .short _02246D32 - _02246CF4 - 2 ; case 2 - .short _02246D4A - _02246CF4 - 2 ; case 3 - .short _02246D62 - _02246CF4 - 2 ; case 4 - .short _02246D7A - _02246CF4 - 2 ; case 5 - .short _02246D92 - _02246CF4 - 2 ; case 6 -_02246D02: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #1 - bic r2, r0 - mov r0, #1 - and r0, r5 - orr r0, r2 - str r0, [r1, r3] - b _02246DA8 -_02246D1A: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #2 - bic r2, r0 - lsl r0, r5, #0x1f - lsr r0, r0, #0x1e - orr r0, r2 - str r0, [r1, r3] - b _02246DA8 -_02246D32: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #4 - bic r2, r0 - lsl r0, r5, #0x1f - lsr r0, r0, #0x1d - orr r0, r2 - str r0, [r1, r3] - b _02246DA8 -_02246D4A: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #8 - bic r2, r0 - lsl r0, r5, #0x1f - lsr r0, r0, #0x1c - orr r0, r2 - str r0, [r1, r3] - b _02246DA8 -_02246D62: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #0x10 - bic r2, r0 - lsl r0, r5, #0x1f - lsr r0, r0, #0x1b - orr r0, r2 - str r0, [r1, r3] - b _02246DA8 -_02246D7A: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #0x20 - bic r2, r0 - lsl r0, r5, #0x1f - lsr r0, r0, #0x1a - orr r0, r2 - str r0, [r1, r3] - b _02246DA8 -_02246D92: - mov r1, #0x75 - lsl r1, r1, #2 - lsl r3, r0, #6 - add r1, r4, r1 - ldr r2, [r1, r3] - mov r0, #0x40 - bic r2, r0 - lsl r0, r5, #0x1f - lsr r0, r0, #0x19 - orr r0, r2 - str r0, [r1, r3] -_02246DA8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02246CB4 - - thumb_func_start ov16_02246DAC -ov16_02246DAC: ; 0x02246DAC - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [r4, #0x6c] - ldr r1, _02246DE8 ; =0x000021F0 - lsl r0, r0, #2 - add r0, r4, r0 - ldr r2, [r0, r1] - mov r0, #0x19 - mul r0, r2 - ldr r2, [r4, #0x64] - lsl r2, r2, #2 - add r2, r4, r2 - ldr r1, [r2, r1] - bl sub_020E2178 - add r1, r0, #1 - ldr r0, _02246DEC ; =0x00002154 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0x96 - ble _02246DE2 - mov r1, #0x96 - str r1, [r4, r0] -_02246DE2: - mov r0, #0 - pop {r4, pc} - nop -_02246DE8: .word 0x000021F0 -_02246DEC: .word 0x00002154 - thumb_func_end ov16_02246DAC - - thumb_func_start ov16_02246DF0 -ov16_02246DF0: ; 0x02246DF0 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - ldr r1, [r5, #0x64] - add r0, r6, #0 - bl ov16_0223E208 - ldr r1, [r5, #0x64] - add r7, r0, #0 - lsl r1, r1, #6 - add r2, r5, r1 - mov r1, #0x83 - lsl r1, r1, #2 - ldr r1, [r2, r1] - add r0, r6, #0 - bl ov16_0223E208 - add r4, r0, #0 - ldr r0, [r5, #0x64] - mov r2, #0x82 - lsl r0, r0, #6 - add r0, r5, r0 - lsl r2, r2, #2 - ldr r1, [r0, r2] - cmp r1, #0 - beq _02246ED0 - cmp r7, r4 - beq _02246ED0 - add r2, r2, #4 - ldr r2, [r0, r2] - mov r0, #0xc0 - mul r0, r2 - add r2, r5, r0 - ldr r0, _02246EDC ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _02246ED0 - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, _02246EE0 ; =0x00002144 - str r0, [r5, r1] - mov r0, #0x71 - lsl r0, r0, #2 - add r1, r5, r0 - lsl r0, r4, #3 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _02246E7E - lsl r0, r0, #9 - lsr r0, r0, #0x1e - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - ldr r1, _02246EDC ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _02246E7E - str r0, [r5, #0x6c] - b _02246E8C -_02246E7E: - ldr r0, [r5, #0x64] - lsl r0, r0, #6 - add r1, r5, r0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r1, r0] - str r0, [r5, #0x6c] -_02246E8C: - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02246EDC ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - bne _02246EC4 - ldr r2, [r5, #0x64] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02257028 - mov r1, #0xc0 - mul r1, r0 - str r0, [r5, #0x6c] - ldr r0, _02246EDC ; =0x00002D8C - add r1, r5, r1 - ldr r0, [r1, r0] - cmp r0, #0 - bne _02246EC4 - mov r2, #0x26 - str r2, [r5, #0xc] - add r0, r5, #0 - mov r1, #1 - add r2, #0xf3 - bl ov16_02248B00 -_02246EC4: - ldr r1, [r5, #0x64] - ldr r2, [r5, #0x6c] - add r0, r5, #0 - bl ov16_0225B408 - b _02246ED8 -_02246ED0: - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 -_02246ED8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246EDC: .word 0x00002D8C -_02246EE0: .word 0x00002144 - thumb_func_end ov16_02246DF0 - - thumb_func_start ov16_02246EE4 -ov16_02246EE4: ; 0x02246EE4 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r0, [r4, #0x6c] - ldr r1, _02246F20 ; =0x000021A8 - lsl r0, r0, #4 - add r0, r4, r0 - ldr r0, [r0, r1] - cmp r0, #0x27 - ldr r0, _02246F24 ; =0x00003044 - bne _02246F0E - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r2, r4, r0 - ldr r0, _02246F28 ; =0x000003E1 - ldrb r0, [r2, r0] - lsl r0, r0, #1 - b _02246F18 -_02246F0E: - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r2, r4, r0 - ldr r0, _02246F28 ; =0x000003E1 - ldrb r0, [r2, r0] -_02246F18: - sub r1, #0x54 - str r0, [r4, r1] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02246F20: .word 0x000021A8 -_02246F24: .word 0x00003044 -_02246F28: .word 0x000003E1 - thumb_func_end ov16_02246EE4 - - thumb_func_start ov16_02246F2C -ov16_02246F2C: ; 0x02246F2C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - lsl r0, r1, #1 - add r1, r4, r0 - ldr r0, _02246F60 ; =0x000030BC - ldrh r0, [r1, r0] - add r1, r2, r0 - ldr r0, _02246F64 ; =0x00002D6C - ldrb r1, [r1, r0] - cmp r1, #4 - bls _02246F54 - mov r1, #4 -_02246F54: - ldr r0, _02246F68 ; =0x0226E574 - ldrb r1, [r0, r1] - ldr r0, _02246F6C ; =0x00002154 - str r1, [r4, r0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02246F60: .word 0x000030BC -_02246F64: .word 0x00002D6C -_02246F68: .word 0x0226E574 -_02246F6C: .word 0x00002154 - thumb_func_end ov16_02246F2C - - thumb_func_start ov16_02246F70 -ov16_02246F70: ; 0x02246F70 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r3, r4, r0 - ldr r1, _02246FA0 ; =0x00002D8C - mov r0, #0x78 - ldr r2, [r3, r1] - add r1, r1, #4 - ldr r1, [r3, r1] - mul r0, r2 - bl sub_020E2178 - add r1, r0, #1 - ldr r0, _02246FA4 ; =0x00002154 - str r1, [r4, r0] - mov r0, #0 - pop {r4, pc} - nop -_02246FA0: .word 0x00002D8C -_02246FA4: .word 0x00002154 - thumb_func_end ov16_02246F70 - - thumb_func_start ov16_02246FA8 -ov16_02246FA8: ; 0x02246FA8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - ldr r3, _02247054 ; =0x00002DEC - add r0, r5, r0 - ldrh r4, [r0, r3] - cmp r4, #0 - beq _02246FDC - add r2, r3, #2 - ldrh r2, [r0, r2] - sub r3, #0xa0 - lsl r2, r2, #1 - add r0, r0, r2 - ldrh r0, [r0, r3] - cmp r4, r0 - beq _02246FE4 -_02246FDC: - add r0, r5, #0 - bl ov16_02255570 - add r4, r0, #0 -_02246FE4: - ldr r0, [r5, #0x6c] - lsl r1, r0, #4 - add r2, r5, r1 - ldr r1, _02247058 ; =0x000021A8 - ldr r1, [r2, r1] - cmp r1, #0x27 - beq _02247048 - lsl r0, r0, #6 - add r1, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _02247048 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225B0C0 - cmp r0, #1 - bne _02247048 - lsl r0, r4, #4 - add r1, r5, r0 - ldr r0, _0224705C ; =0x000003E1 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02247048 - ldr r2, [r5, #0x64] - ldr r3, _02247060 ; =0x00002DCC - add r0, r2, #0 - mov r6, #0xc0 - add r1, r5, r3 - mul r0, r6 - mov r2, #1 - ldr r7, [r1, r0] - lsl r2, r2, #0x1e - orr r2, r7 - str r2, [r1, r0] - add r0, r6, #0 - add r0, #0xb4 - ldr r2, [r5, r0] - ldr r0, [r5, #0x64] - add r3, #0x10 - add r1, r0, #0 - mul r1, r6 - add r0, r5, r1 - str r2, [r0, r3] - add r6, #0x64 - str r4, [r5, r6] - b _02247050 -_02247048: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02247050: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247054: .word 0x00002DEC -_02247058: .word 0x000021A8 -_0224705C: .word 0x000003E1 -_02247060: .word 0x00002DCC - thumb_func_end ov16_02246FA8 - - thumb_func_start ov16_02247064 -ov16_02247064: ; 0x02247064 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r0, _022470BC ; =0x00003048 - ldr r0, [r4, r0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov16_02255918 - cmp r0, #0 - bne _022470B0 - ldr r0, _022470BC ; =0x00003048 - ldr r3, [r4, r0] - cmp r3, #0 - beq _022470B0 - lsl r3, r3, #0x10 - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - lsr r3, r3, #0x10 - bl ov16_0225B02C - cmp r0, #1 - bne _022470B0 - ldr r0, _022470BC ; =0x00003048 - ldr r1, [r4, r0] - mov r0, #0x49 - lsl r0, r0, #2 - str r1, [r4, r0] - b _022470B8 -_022470B0: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_022470B8: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022470BC: .word 0x00003048 - thumb_func_end ov16_02247064 - - thumb_func_start ov16_022470C0 -ov16_022470C0: ; 0x022470C0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - ldr r5, _02247110 ; =0x00002D58 - mov r1, #0 - ldr r3, [r4, #0x6c] - mov r2, #0xc0 - mul r2, r3 - add r3, r4, r2 - add r0, r1, #0 - add r2, r3, #0 - add r6, r5, #0 -_022470DE: - ldrsb r7, [r2, r6] - cmp r7, #6 - ble _022470EC - add r7, r3, r0 - ldrsb r7, [r7, r5] - sub r7, r7, #6 - add r1, r1, r7 -_022470EC: - add r0, r0, #1 - add r2, r2, #1 - cmp r0, #8 - blt _022470DE - mov r0, #0x14 - add r2, r1, #0 - mul r2, r0 - ldr r0, _02247114 ; =0x00002154 - add r2, #0x3c - str r2, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0xc8 - ble _0224710A - mov r1, #0xc8 - str r1, [r4, r0] -_0224710A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247110: .word 0x00002D58 -_02247114: .word 0x00002154 - thumb_func_end ov16_022470C0 - - thumb_func_start ov16_02247118 -ov16_02247118: ; 0x02247118 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - ldr r6, _02247188 ; =0x00002DEC - add r2, r5, r0 - ldrh r0, [r2, r6] - cmp r0, #0 - beq _0224714C - add r3, r6, #2 - ldrh r3, [r2, r3] - sub r6, #0xa0 - lsl r3, r3, #1 - add r2, r2, r3 - ldrh r2, [r2, r6] - cmp r0, r2 - beq _02247152 -_0224714C: - add r0, r5, #0 - bl ov16_02255570 -_02247152: - ldr r1, [r5, #0x6c] - lsl r2, r1, #4 - add r3, r5, r2 - ldr r2, _0224718C ; =0x000021A8 - ldr r2, [r3, r2] - cmp r2, #0x27 - beq _0224717C - lsl r0, r0, #4 - add r2, r5, r0 - ldr r0, _02247190 ; =0x000003E1 - ldrb r0, [r2, r0] - cmp r0, #0 - bne _02247184 - lsl r0, r1, #6 - add r1, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _02247184 -_0224717C: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248AF0 -_02247184: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02247188: .word 0x00002DEC -_0224718C: .word 0x000021A8 -_02247190: .word 0x000003E1 - thumb_func_end ov16_02247118 - - thumb_func_start ov16_02247194 -ov16_02247194: ; 0x02247194 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - ldr r2, [sp, #8] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r7, #0 - bl ov16_0223E208 - ldr r1, [sp, #4] - cmp r1, #0 - beq _022471E6 - cmp r1, #1 - beq _022471E6 - cmp r1, #2 - beq _02247264 - b _0224733E -_022471E6: - cmp r6, #5 - bls _022471EC - b _0224733E -_022471EC: - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022471F8: ; jump table - .short _02247204 - _022471F8 - 2 ; case 0 - .short _02247214 - _022471F8 - 2 ; case 1 - .short _02247224 - _022471F8 - 2 ; case 2 - .short _02247234 - _022471F8 - 2 ; case 3 - .short _02247244 - _022471F8 - 2 ; case 4 - .short _02247254 - _022471F8 - 2 ; case 5 -_02247204: - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1b - lsr r5, r0, #0x1d - b _0224733E -_02247214: - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x16 - lsr r5, r0, #0x1d - b _0224733E -_02247224: - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x11 - lsr r5, r0, #0x1d - b _0224733E -_02247234: - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0xc - lsr r5, r0, #0x1d - b _0224733E -_02247244: - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1e - lsr r5, r0, #0x1e - b _0224733E -_02247254: - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r5, r0, #0x1e - b _0224733E -_02247264: - cmp r6, #5 - bhi _0224733E - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02247274: ; jump table - .short _02247280 - _02247274 - 2 ; case 0 - .short _022472A0 - _02247274 - 2 ; case 1 - .short _022472C0 - _02247274 - 2 ; case 2 - .short _022472E0 - _02247274 - 2 ; case 3 - .short _02247300 - _02247274 - 2 ; case 4 - .short _02247320 - _02247274 - 2 ; case 5 -_02247280: - mov r2, #0x71 - lsl r2, r2, #2 - add r6, r4, r2 - lsl r3, r0, #3 - ldr r7, [r6, r3] - mov r1, #0x1c - bic r7, r1 - sub r2, #8 - str r7, [r6, r3] - add r3, r4, r2 - lsl r2, r0, #2 - ldr r1, [r3, r2] - mov r0, #1 - bic r1, r0 - str r1, [r3, r2] - b _0224733E -_022472A0: - mov r2, #0x71 - lsl r2, r2, #2 - add r6, r4, r2 - lsl r7, r0, #3 - ldr r3, [r6, r7] - ldr r1, _02247368 ; =0xFFFFFC7F - sub r2, #8 - and r1, r3 - add r3, r4, r2 - lsl r2, r0, #2 - str r1, [r6, r7] - ldr r1, [r3, r2] - mov r0, #2 - bic r1, r0 - str r1, [r3, r2] - b _0224733E -_022472C0: - mov r2, #0x71 - lsl r2, r2, #2 - add r6, r4, r2 - lsl r7, r0, #3 - ldr r3, [r6, r7] - ldr r1, _0224736C ; =0xFFFF8FFF - sub r2, #8 - and r1, r3 - add r3, r4, r2 - lsl r2, r0, #2 - str r1, [r6, r7] - ldr r1, [r3, r2] - mov r0, #0x40 - bic r1, r0 - str r1, [r3, r2] - b _0224733E -_022472E0: - mov r2, #0x71 - lsl r2, r2, #2 - add r6, r4, r2 - lsl r7, r0, #3 - ldr r3, [r6, r7] - ldr r1, _02247370 ; =0xFFF1FFFF - sub r2, #8 - and r1, r3 - add r3, r4, r2 - lsl r2, r0, #2 - str r1, [r6, r7] - ldr r1, [r3, r2] - mov r0, #8 - bic r1, r0 - str r1, [r3, r2] - b _0224733E -_02247300: - mov r2, #0x72 - lsl r2, r2, #2 - add r6, r4, r2 - lsl r3, r0, #3 - ldr r7, [r6, r3] - mov r1, #3 - bic r7, r1 - sub r2, #0xc - str r7, [r6, r3] - add r3, r4, r2 - lsl r2, r0, #2 - ldr r1, [r3, r2] - mov r0, #4 - bic r1, r0 - str r1, [r3, r2] - b _0224733E -_02247320: - mov r2, #0x72 - lsl r2, r2, #2 - add r6, r4, r2 - lsl r3, r0, #3 - ldr r7, [r6, r3] - mov r1, #0xc - bic r7, r1 - sub r2, #0xc - str r7, [r6, r3] - lsl r3, r0, #2 - add r1, r4, r2 - ldr r2, [r1, r3] - ldr r0, _02247374 ; =0xFFFFFBFF - and r0, r2 - str r0, [r1, r3] -_0224733E: - ldr r0, [sp, #4] - cmp r0, #0 - bne _02247350 - cmp r5, #0 - bne _02247350 - ldr r1, [sp] - add r0, r4, #0 - bl ov16_02248AF0 -_02247350: - ldr r0, [sp, #4] - cmp r0, #1 - bne _02247362 - cmp r5, #0 - beq _02247362 - ldr r1, [sp] - add r0, r4, #0 - bl ov16_02248AF0 -_02247362: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247368: .word 0xFFFFFC7F -_0224736C: .word 0xFFFF8FFF -_02247370: .word 0xFFF1FFFF -_02247374: .word 0xFFFFFBFF - thumb_func_end ov16_02247194 - - thumb_func_start ov16_02247378 -ov16_02247378: ; 0x02247378 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - ldr r0, [r4, #0x6c] - lsl r0, r0, #6 - add r2, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r2, r0] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - bne _022473A4 - add r0, r4, #0 - bl ov16_02248AF0 -_022473A4: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov16_02247378 - - thumb_func_start ov16_022473A8 -ov16_022473A8: ; 0x022473A8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - ldr r0, [r4, #0x6c] - mov r2, #0xc0 - add r3, r0, #0 - mul r3, r2 - add r5, r4, r3 - ldr r3, _022473F0 ; =0x00002DAC - ldr r0, [r5, r3] - cmp r0, #0 - bne _022473E6 - add r0, r3, #4 - ldr r5, [r5, r0] - mov r0, #1 - lsl r0, r0, #0x18 - tst r0, r5 - bne _022473E6 - ldr r0, [r4, #0x64] - mul r2, r0 - add r0, r4, r2 - ldr r0, [r0, r3] - cmp r0, #0 - bne _022473EC -_022473E6: - add r0, r4, #0 - bl ov16_02248AF0 -_022473EC: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022473F0: .word 0x00002DAC - thumb_func_end ov16_022473A8 - - thumb_func_start ov16_022473F4 -ov16_022473F4: ; 0x022473F4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02256128 - ldr r2, [r4, #0x64] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _0224743C ; =0x00002DCC - ldr r1, [r2, r1] - lsl r1, r1, #0x13 - lsr r2, r1, #0x1d - sub r1, r0, #1 - cmp r2, r1 - blo _0224742E - cmp r0, #2 - bge _02247436 -_0224742E: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02247436: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_0224743C: .word 0x00002DCC - thumb_func_end ov16_022473F4 - - thumb_func_start ov16_02247440 -ov16_02247440: ; 0x02247440 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - mov r2, #0x72 - mov r1, #1 - add r3, r0, #0 - eor r3, r1 - lsl r0, r3, #3 - add r5, r4, r0 - lsl r2, r2, #2 - ldr r5, [r5, r2] - lsl r5, r5, #0x1c - lsr r5, r5, #0x1e - cmp r5, #2 - bne _02247496 - mov r0, #0xb5 - lsl r0, r0, #2 - add r2, r4, r0 - ldr r3, [r4, #0x64] - mov r0, #0x1c - mul r0, r3 - ldr r5, [r2, r0] - mov r3, #1 - bic r5, r3 - orr r1, r5 - str r1, [r2, r0] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 - b _022474BE -_02247496: - add r5, r2, #0 - sub r5, #0xc - add r5, r4, r5 - lsl r3, r3, #2 - ldr r6, [r5, r3] - lsl r1, r1, #0xa - orr r1, r6 - str r1, [r5, r3] - add r2, r4, r2 - ldr r4, [r2, r0] - mov r3, #0xc - add r1, r4, #0 - bic r1, r3 - lsl r3, r4, #0x1c - lsr r3, r3, #0x1e - add r3, r3, #1 - lsl r3, r3, #0x1e - lsr r3, r3, #0x1c - orr r1, r3 - str r1, [r2, r0] -_022474BE: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02247440 - - thumb_func_start ov16_022474C4 -ov16_022474C4: ; 0x022474C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r7, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov16_0223E208 - mov r1, #0x72 - lsl r1, r1, #2 - add r4, r5, r1 - lsl r6, r0, #3 - str r0, [sp] - ldr r0, [r4, r6] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1e - beq _0224755E - sub r1, #0x94 - str r0, [r5, r1] - add r0, r5, #0 - mov r1, #6 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x94 - str r7, [r0, #0] - ldr r1, [r5, #0x78] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #3 - beq _0224753C - ldr r1, [r5, #0x78] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #3 - bne _02247566 -_0224753C: - mov r0, #0x6f - ldr r1, [sp] - lsl r0, r0, #2 - add r2, r5, r0 - lsl r1, r1, #2 - ldr r7, [r2, r1] - ldr r3, _0224756C ; =0xFFFFFBFF - sub r0, #0x88 - and r3, r7 - str r3, [r2, r1] - ldr r2, [r4, r6] - mov r1, #0xc - bic r2, r1 - str r2, [r4, r6] - mov r1, #0 - str r1, [r5, r0] - b _02247566 -_0224755E: - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02248AF0 -_02247566: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224756C: .word 0xFFFFFBFF - thumb_func_end ov16_022474C4 - - thumb_func_start ov16_02247570 -ov16_02247570: ; 0x02247570 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #8] - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - cmp r4, #0 - bne _02247620 - add r0, r6, #0 - bl ov16_0223DF1C - mov r6, #0 - str r0, [sp] - cmp r0, #0 - ble _02247688 -_022475B2: - ldr r0, _02247690 ; =0x000021EC - add r1, r5, r6 - ldrb r4, [r1, r0] - ldr r0, [sp, #8] - cmp r0, #0 - bne _022475EA - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov16_02255AB4 - cmp r0, #1 - bne _02247616 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02247694 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02247616 - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] - b _02247688 -_022475EA: - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov16_02255AB4 - cmp r0, #0 - beq _02247608 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02247694 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - bne _02247616 -_02247608: - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] - b _02247688 -_02247616: - ldr r0, [sp] - add r6, r6, #1 - cmp r6, r0 - blt _022475B2 - b _02247688 -_02247620: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r4, r0, #0 - ldr r0, [sp, #8] - cmp r0, #0 - bne _0224765E - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov16_02255AB4 - cmp r0, #1 - bne _02247688 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02247694 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02247688 - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] - b _02247688 -_0224765E: - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov16_02255AB4 - cmp r0, #0 - beq _0224767C - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02247694 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - bne _02247688 -_0224767C: - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02248AF0 - add r5, #0x80 - str r4, [r5, #0] -_02247688: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02247690: .word 0x000021EC -_02247694: .word 0x00002D8C - thumb_func_end ov16_02247570 - - thumb_func_start ov16_02247698 -ov16_02247698: ; 0x02247698 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0224A984 - add r7, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223E208 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_0223E208 - cmp r6, r0 - bne _022476F4 - ldr r1, [sp] - add r0, r4, #0 - bl ov16_02248AF0 -_022476F4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02247698 - - thumb_func_start ov16_022476F8 -ov16_022476F8: ; 0x022476F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #0 - str r0, [sp, #8] - ldr r1, [sp, #8] - add r0, r7, #0 - bl ov16_0223DF60 - cmp r0, #0 - bgt _02247718 - b _02247862 -_02247718: - ldr r2, [sp, #8] - add r0, r7, #0 - mov r1, #0 - bl ov16_0223DFAC - mov r1, #0xae - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - cmp r0, #0x35 - bne _022477E6 - cmp r6, #0 - beq _022477E6 - ldr r0, _02247868 ; =0x000001EE - cmp r6, r0 - beq _022477E6 - ldr r0, [sp, #4] - cmp r0, #0 - bne _022477E6 - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #0 - bne _022477E6 - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - add r5, r1, #0 - add r0, r4, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - sub r0, r0, #1 - mov r1, #0xa - bl sub_020E2178 - lsl r0, r0, #0x18 - lsr r3, r0, #0x18 - cmp r3, #0xa - blo _0224779E - mov r3, #9 -_0224779E: - mov r1, #0 - ldr r2, _0224786C ; =0x0226EAA8 - str r1, [sp, #0xc] -_022477A4: - ldrb r0, [r2] - cmp r0, r5 - ble _022477BE - ldr r2, [sp, #0xc] - ldr r5, _02247870 ; =0x0226E66C - add r2, r3, r2 - lsl r2, r2, #1 - add r0, r4, #0 - mov r1, #6 - add r2, r5, r2 - bl sub_02074B30 - b _022477E6 -_022477BE: - cmp r5, #0x62 - blt _022477DC - cmp r5, #0x63 - bgt _022477DC - mov r2, #0x63 - sub r2, r2, r5 - add r2, r3, r2 - lsl r3, r2, #1 - ldr r2, _02247874 ; =0x0226E590 - add r0, r4, #0 - mov r1, #6 - add r2, r2, r3 - bl sub_02074B30 - b _022477E6 -_022477DC: - add r1, r1, #1 - add r2, r2, #1 - str r1, [sp, #0xc] - cmp r1, #9 - blt _022477A4 -_022477E6: - ldr r0, [sp] - cmp r0, #0x76 - bne _0224784C - cmp r6, #0 - beq _0224784C - ldr r0, _02247868 ; =0x000001EE - cmp r6, r0 - beq _0224784C - ldr r0, [sp, #4] - cmp r0, #0 - bne _0224784C - mov r2, #0 - add r0, r4, #0 - mov r1, #0xa1 - str r2, [sp, #0xc] - mov r5, #0xa - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, #0xa - ble _0224781E - ldr r0, [sp, #0xc] -_02247814: - add r5, #0xa - add r0, r0, #1 - cmp r5, r1 - blt _02247814 - str r0, [sp, #0xc] -_0224781E: - ldr r0, [sp, #0xc] - cmp r0, #0xa - blt _02247828 - bl sub_02022974 -_02247828: - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - ldr r2, [sp, #0xc] - ldr r0, _02247878 ; =0x0226EAB4 - ldrb r0, [r0, r2] - cmp r1, r0 - bge _0224784C - mov r0, #0x5e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #6 - add r2, sp, #0xc - bl sub_02074B30 -_0224784C: - ldr r0, [sp, #8] - mov r1, #0 - add r0, r0, #1 - str r0, [sp, #8] - add r0, r7, #0 - bl ov16_0223DF60 - ldr r1, [sp, #8] - cmp r1, r0 - bge _02247862 - b _02247718 -_02247862: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247868: .word 0x000001EE -_0224786C: .word 0x0226EAA8 -_02247870: .word 0x0226E66C -_02247874: .word 0x0226E590 -_02247878: .word 0x0226EAB4 - thumb_func_end ov16_022476F8 - - thumb_func_start ov16_0224787C -ov16_0224787C: ; 0x0224787C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r0, #0xb5 - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - add r3, r4, r0 - mov r0, #0x1c - add r2, r1, #0 - mul r2, r0 - ldr r1, [r3, r2] - mov r0, #0x10 - orr r0, r1 - str r0, [r3, r2] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0224787C - - thumb_func_start ov16_022478A4 -ov16_022478A4: ; 0x022478A4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_022588A4 - cmp r0, #1 - bne _022478E0 - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_022478E0: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_022478A4 - - thumb_func_start ov16_022478E4 -ov16_022478E4: ; 0x022478E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp, #4] - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r5, #0 - bl ov16_0224A984 - add r1, r0, #0 - cmp r6, #0 - bne _02247938 - add r0, r5, #0 - bl ov16_02258AB8 - cmp r4, r0 - bne _0224794A - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _0224794A -_02247938: - add r0, r5, #0 - bl ov16_02258AB8 - cmp r4, r0 - beq _0224794A - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_0224794A: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_022478E4 - - thumb_func_start ov16_02247950 -ov16_02247950: ; 0x02247950 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248B10 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_02258874 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov16_0225B0FC - str r0, [r6, #0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02247950 - - thumb_func_start ov16_0224799C -ov16_0224799C: ; 0x0224799C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02248B10 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_02258874 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B0FC - str r0, [r6, #0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224799C - - thumb_func_start ov16_022479E8 -ov16_022479E8: ; 0x022479E8 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x79 - bne _02247A16 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02248AF0 - mov r0, #0 - pop {r4, r5, r6, pc} -_02247A16: - add r0, r4, #0 - bl ov16_0223E22C - cmp r0, #0xc - ble _02247A22 - mov r0, #0xc -_02247A22: - ldr r1, _02247A78 ; =0x0226EAC0 - mov r2, #0x1b - ldrb r4, [r1, r0] - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r3, #0 - bl ov16_02252060 - cmp r4, r0 - beq _02247A6A - ldr r1, [r5, #0x64] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r4, r0 - beq _02247A6A - ldr r1, [r5, #0x64] - lsl r0, r4, #0x18 - add r3, r1, #0 - mov r2, #0xc0 - mul r3, r2 - ldr r1, _02247A7C ; =0x00002D64 - lsr r0, r0, #0x18 - add r3, r5, r3 - strb r0, [r3, r1] - ldr r3, [r5, #0x64] - add r1, r1, #1 - add r6, r3, #0 - mul r6, r2 - add r3, r5, r6 - strb r0, [r3, r1] - add r2, #0x70 - str r4, [r5, r2] - b _02247A72 -_02247A6A: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02247A72: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02247A78: .word 0x0226EAC0 -_02247A7C: .word 0x00002D64 - thumb_func_end ov16_022479E8 - - thumb_func_start ov16_02247A80 -ov16_02247A80: ; 0x02247A80 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_0223E22C - cmp r0, #0xc - ble _02247A9A - mov r0, #0xc -_02247A9A: - lsl r1, r0, #1 - ldr r0, _02247AAC ; =0x0226E652 - ldrh r1, [r0, r1] - mov r0, #0x49 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02247AAC: .word 0x0226E652 - thumb_func_end ov16_02247A80 - - thumb_func_start ov16_02247AB0 -ov16_02247AB0: ; 0x02247AB0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_0223E22C - cmp r0, #0xc - ble _02247ACA - mov r0, #0xc -_02247ACA: - lsl r1, r0, #2 - ldr r0, _02247AD8 ; =0x0226E690 - ldr r1, [r0, r1] - ldr r0, _02247ADC ; =0x00002174 - str r1, [r4, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02247AD8: .word 0x0226E690 -_02247ADC: .word 0x00002174 - thumb_func_end ov16_02247AB0 - - thumb_func_start ov16_02247AE0 -ov16_02247AE0: ; 0x02247AE0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r5, r0, #0 - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02258B18 - cmp r0, #0 - beq _02247B12 - ldr r1, _02247B20 ; =0x00002154 - str r0, [r4, r1] - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02258B2C - ldr r1, _02247B24 ; =0x00002160 - str r0, [r4, r1] - b _02247B1A -_02247B12: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02248AF0 -_02247B1A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02247B20: .word 0x00002154 -_02247B24: .word 0x00002160 - thumb_func_end ov16_02247AE0 - - thumb_func_start ov16_02247B28 -ov16_02247B28: ; 0x02247B28 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _02247BA0 ; =0x00002DB8 - ldrh r0, [r1, r0] - cmp r0, #0 - beq _02247B6E - ldr r1, [r4, #0x64] - add r0, r4, #0 - mov r3, #0x3c - bl ov16_02255AB4 - cmp r0, #1 - bne _02247B6E - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _02247B9C -_02247B6E: - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r3, r4, r0 - ldr r0, _02247BA0 ; =0x00002DB8 - ldrh r1, [r3, r0] - cmp r1, #0 - beq _02247B88 - add r0, #0x14 - ldr r0, [r3, r0] - lsl r0, r0, #3 - lsr r0, r0, #0x1f - bne _02247B94 -_02247B88: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02258CB4 - cmp r0, #1 - beq _02247B9C -_02247B94: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02247B9C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247BA0: .word 0x00002DB8 - thumb_func_end ov16_02247B28 - - thumb_func_start ov16_02247BA4 -ov16_02247BA4: ; 0x02247BA4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02259204 - cmp r0, #1 - beq _02247BD0 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02247BD0: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02247BA4 - - thumb_func_start ov16_02247BD4 -ov16_02247BD4: ; 0x02247BD4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - str r2, [sp, #8] - bl ov16_02265B2C - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02247BD4 - - thumb_func_start ov16_02247C04 -ov16_02247C04: ; 0x02247C04 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov16_02259AB4 - add r4, r0, #0 - beq _02247C4C - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r1, r0, #0 - cmp r4, #0xff - bne _02247C3A - add r0, r5, #0 - bl ov16_02248AF0 - b _02247C42 -_02247C3A: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_02247C42: - add r0, r6, #0 - mov r1, #0 - add r2, r4, #0 - bl ov16_0223F500 -_02247C4C: - ldr r1, _02247C60 ; =0x00003154 - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r5, r1] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247C60: .word 0x00003154 - thumb_func_end ov16_02247C04 - - thumb_func_start ov16_02247C64 -ov16_02247C64: ; 0x02247C64 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - bl ov16_0223DF1C - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - mov r2, #0 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov16_02265A8C - mov r0, #0 - str r0, [r4, #0x78] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02247C64 - - thumb_func_start ov16_02247C94 -ov16_02247C94: ; 0x02247C94 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #0 - bl ov16_02259AB4 - add r5, r0, #0 - beq _02247CC6 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - cmp r5, #0xff - bne _02247CC0 - add r0, r4, #0 - bl ov16_02248AF0 - b _02247CC6 -_02247CC0: - ldr r0, _02247CD8 ; =0x000021A0 - sub r1, r5, #1 - strb r1, [r4, r0] -_02247CC6: - ldr r1, _02247CDC ; =0x00003154 - mov r0, #1 - ldr r2, [r4, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r4, r1] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02247CD8: .word 0x000021A0 -_02247CDC: .word 0x00003154 - thumb_func_end ov16_02247C94 - - thumb_func_start ov16_02247CE0 -ov16_02247CE0: ; 0x02247CE0 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - beq _02247CFE - add r0, r4, #0 - bl ov16_02266A38 -_02247CFE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02247CE0 - - thumb_func_start ov16_02247D04 -ov16_02247D04: ; 0x02247D04 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl ov16_0223E208 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - add r2, r0, #0 - lsl r0, r6, #2 - add r1, r5, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #0x80 - tst r0, r1 - beq _02247DF8 - mov r0, #0xc0 - add r6, r4, #0 - mul r6, r0 - ldr r0, _02247E04 ; =0x00002D8C - add r1, r5, r6 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02247DF8 - lsl r1, r7, #0x18 - lsl r2, r2, #0x18 - mov r0, #5 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl ov16_022558CC - cmp r0, #0x14 - bgt _02247D96 - bge _02247DBE - cmp r0, #0 - bgt _02247D90 - beq _02247DCE - b _02247DDA -_02247D90: - cmp r0, #0xa - beq _02247DC6 - b _02247DDA -_02247D96: - cmp r0, #0x50 - bgt _02247DA2 - bge _02247DAE - cmp r0, #0x28 - beq _02247DB6 - b _02247DDA -_02247DA2: - cmp r0, #0xa0 - bne _02247DDA - ldr r0, _02247E08 ; =0x0000215C - mov r1, #2 - str r1, [r5, r0] - b _02247DDE -_02247DAE: - ldr r0, _02247E08 ; =0x0000215C - mov r1, #4 - str r1, [r5, r0] - b _02247DDE -_02247DB6: - ldr r0, _02247E08 ; =0x0000215C - mov r1, #8 - str r1, [r5, r0] - b _02247DDE -_02247DBE: - ldr r0, _02247E08 ; =0x0000215C - mov r1, #0x10 - str r1, [r5, r0] - b _02247DDE -_02247DC6: - ldr r0, _02247E08 ; =0x0000215C - mov r1, #0x20 - str r1, [r5, r0] - b _02247DDE -_02247DCE: - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02247DDA: - bl sub_02022974 -_02247DDE: - ldr r0, _02247E0C ; =0x00002D90 - add r1, r5, r6 - ldr r1, [r1, r0] - mov r0, #0 - mvn r0, r0 - mul r0, r1 - ldr r1, _02247E08 ; =0x0000215C - ldr r1, [r5, r1] - bl ov16_022563F8 - ldr r1, _02247E08 ; =0x0000215C - str r0, [r5, r1] - b _02247E00 -_02247DF8: - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02248AF0 -_02247E00: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247E04: .word 0x00002D8C -_02247E08: .word 0x0000215C -_02247E0C: .word 0x00002D90 - thumb_func_end ov16_02247D04 - - thumb_func_start ov16_02247E10 -ov16_02247E10: ; 0x02247E10 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x20 - ldr r0, _02247E8C ; =0x00003044 - bne _02247E44 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02247E90 ; =0x000003E5 - ldrb r0, [r1, r0] - lsl r0, r0, #0x11 - lsr r4, r0, #0x10 - b _02247E4E -_02247E44: - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02247E90 ; =0x000003E5 - ldrb r4, [r1, r0] -_02247E4E: - cmp r4, #0 - bne _02247E56 - bl sub_02022974 -_02247E56: - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r4 - bge _02247E7E - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02247E94 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02247E7E - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02247E7E: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247E8C: .word 0x00003044 -_02247E90: .word 0x000003E5 -_02247E94: .word 0x00002D8C - thumb_func_end ov16_02247E10 - - thumb_func_start ov16_02247E98 -ov16_02247E98: ; 0x02247E98 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - ldr r0, [r5, #0x64] - mov r4, #0xc0 - add r1, r0, #0 - mul r1, r4 - mov r0, #0xb5 - add r3, r5, r1 - lsl r0, r0, #6 - add r1, r4, #0 - ldrh r2, [r3, r0] - add r1, #0xf9 - cmp r2, r1 - bne _02247F36 - ldr r1, [r5, #0x6c] - add r2, r1, #0 - mul r2, r4 - add r1, r0, #0 - add r2, r5, r2 - add r1, #0x4c - ldr r1, [r2, r1] - cmp r1, #0 - beq _02247F36 - add r0, #0x70 - ldr r1, [r3, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r1 - bne _02247F36 - add r0, r6, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - bne _02247EFE - ldr r1, [r5, #0x64] - add r0, r6, #0 - bl ov16_0223EE30 - bl sub_02006494 - b _02247F06 -_02247EFE: - ldr r1, [r5, #0x64] - add r0, r6, #0 - bl ov16_0223F810 -_02247F06: - cmp r0, #0 - beq _02247F12 - cmp r0, #1 - beq _02247F16 - cmp r0, #2 - beq _02247F1A -_02247F12: - mov r4, #0 - b _02247F1C -_02247F16: - mov r4, #0xa - b _02247F1C -_02247F1A: - mov r4, #0x1e -_02247F1C: - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r4 - ble _02247F3E - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _02247F3E -_02247F36: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_02247F3E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02247E98 - - thumb_func_start ov16_02247F44 -ov16_02247F44: ; 0x02247F44 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - ldr r0, _02247F74 ; =0x000003DE - add r2, r4, r0 - ldr r0, _02247F78 ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r0, r2, r0 - bl sub_02079104 - mov r1, #0x4d - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0 - pop {r4, pc} - nop -_02247F74: .word 0x000003DE -_02247F78: .word 0x00003044 - thumb_func_end ov16_02247F44 - - thumb_func_start ov16_02247F7C -ov16_02247F7C: ; 0x02247F7C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - ldr r3, [sp] - add r0, r5, #0 - add r2, r7, #0 - bl ov16_022664F8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02247F7C - - thumb_func_start ov16_02247FBC -ov16_02247FBC: ; 0x02247FBC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_0226651C - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02247FBC - - thumb_func_start ov16_02247FE8 -ov16_02247FE8: ; 0x02247FE8 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - mov r1, #0 - bl ov16_022665AC - mov r0, #0 - pop {r4, pc} - thumb_func_end ov16_02247FE8 - - thumb_func_start ov16_02248000 -ov16_02248000: ; 0x02248000 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, _0224803C ; =0x0000219C - str r0, [sp] - add r3, r4, r1 - ldrb r2, [r3, r2] - add r0, r5, #0 - mov r3, #0 - bl ov16_0223E30C - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0224803C: .word 0x0000219C - thumb_func_end ov16_02248000 - - thumb_func_start ov16_02248040 -ov16_02248040: ; 0x02248040 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255DE8 - cmp r0, #0 - beq _0224807E - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_0224807E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02248040 - - thumb_func_start ov16_02248084 -ov16_02248084: ; 0x02248084 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_022665E4 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02248084 - - thumb_func_start ov16_022480B0 -ov16_022480B0: ; 0x022480B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_0226660C - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022480B0 - - thumb_func_start ov16_022480DC -ov16_022480DC: ; 0x022480DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_02266634 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022480DC - - thumb_func_start ov16_02248108 -ov16_02248108: ; 0x02248108 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_0226665C - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02248108 - - thumb_func_start ov16_02248134 -ov16_02248134: ; 0x02248134 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02266684 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02248134 - - thumb_func_start ov16_0224814C -ov16_0224814C: ; 0x0224814C - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_022666A0 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0224814C - - thumb_func_start ov16_02248164 -ov16_02248164: ; 0x02248164 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - ldr r3, [sp] - add r0, r5, #0 - add r2, r7, #0 - bl ov16_022666BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02248164 - - thumb_func_start ov16_022481A4 -ov16_022481A4: ; 0x022481A4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0226673C - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_022481A4 - - thumb_func_start ov16_022481D0 -ov16_022481D0: ; 0x022481D0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - mov r2, #0x4e - lsl r2, r2, #2 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r4, r2 - bl ov16_0225708C - cmp r0, #0 - bne _02248200 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02248200: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_022481D0 - - thumb_func_start ov16_02248204 -ov16_02248204: ; 0x02248204 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r2, r0, #0 - cmp r2, #3 - beq _0224822A - cmp r2, #4 - beq _02248252 - b _0224827A -_0224822A: - mov r5, #0 - cmp r6, #0 - ble _0224828A - mov r7, #1 -_02248232: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02248290 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - bne _0224824A - add r0, r4, #0 - add r1, r5, #0 - bl ov16_022667E8 -_0224824A: - add r5, r5, #1 - cmp r5, r6 - blt _02248232 - b _0224828A -_02248252: - mov r5, #0 - cmp r6, #0 - ble _0224828A - mov r7, #1 -_0224825A: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02248290 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _02248272 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_022667E8 -_02248272: - add r5, r5, #1 - cmp r5, r6 - blt _0224825A - b _0224828A -_0224827A: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_022667E8 -_0224828A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248290: .word 0x00000195 - thumb_func_end ov16_02248204 - - thumb_func_start ov16_02248294 -ov16_02248294: ; 0x02248294 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - bl ov16_0223DF1C - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r2, r0, #0 - cmp r2, #3 - beq _022482BA - cmp r2, #4 - beq _022482E2 - b _0224830A -_022482BA: - mov r5, #0 - cmp r6, #0 - ble _0224831A - mov r7, #1 -_022482C2: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02248320 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - bne _022482DA - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02266804 -_022482DA: - add r5, r5, #1 - cmp r5, r6 - blt _022482C2 - b _0224831A -_022482E2: - mov r5, #0 - cmp r6, #0 - ble _0224831A - mov r7, #1 -_022482EA: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _02248320 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _02248302 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02266804 -_02248302: - add r5, r5, #1 - cmp r5, r6 - blt _022482EA - b _0224831A -_0224830A: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_02266804 -_0224831A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248320: .word 0x00000195 - thumb_func_end ov16_02248294 - - thumb_func_start ov16_02248324 -ov16_02248324: ; 0x02248324 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - str r1, [sp, #4] - add r0, r1, #0 - mov r1, #1 - mov r5, #0 - bl ov16_02248AF0 - ldr r0, [sp, #4] - bl ov16_02248AD0 - add r4, r0, #0 - ldr r0, [sp, #4] - bl ov16_02248AD0 - str r0, [sp, #0x14] - ldr r0, [sp] - bl ov16_0223DF0C - str r0, [sp, #0xc] - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r4, #0 - bl ov16_0224A984 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - mov r1, #8 - tst r0, r1 - bne _02248376 - ldr r0, [sp, #0xc] - mov r1, #0x10 - tst r0, r1 - beq _0224845E - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223E208 - cmp r0, #0 - beq _0224845E -_02248376: - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223DF20 - add r7, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223E258 - add r1, r0, #0 - ldr r0, [sp] - bl ov16_0223DF20 - str r0, [sp, #8] - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223DF14 - add r0, r7, #0 - mov r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _022483E4 -_022483A6: - add r0, r7, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _022483D8 - add r0, r6, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _022484CC ; =0x000001EE - cmp r0, r1 - beq _022483D8 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r5, r5, r0 -_022483D8: - add r0, r7, #0 - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _022483A6 -_022483E4: - ldr r0, [sp, #0xc] - sub r0, #0x4a - str r0, [sp, #0xc] - cmp r0, #1 - bhi _02248406 - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223E208 - cmp r0, #0 - bne _02248406 - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223E1F8 - cmp r0, #2 - beq _02248450 -_02248406: - ldr r0, [sp, #8] - mov r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02248450 - ldr r7, _022484CC ; =0x000001EE -_02248414: - ldr r0, [sp, #8] - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02248444 - add r0, r6, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - cmp r0, r7 - beq _02248444 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r5, r5, r0 -_02248444: - ldr r0, [sp, #8] - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _02248414 -_02248450: - cmp r5, #0 - bne _022484C6 - ldr r0, [sp, #4] - ldr r1, [sp, #0x14] - bl ov16_02248AF0 - b _022484C6 -_0224845E: - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223DF20 - add r7, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223DF14 - add r0, r7, #0 - mov r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _022484BA -_0224847C: - add r0, r7, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _022484AE - add r0, r6, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _022484CC ; =0x000001EE - cmp r0, r1 - beq _022484AE - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r5, r5, r0 -_022484AE: - add r0, r7, #0 - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _0224847C -_022484BA: - cmp r5, #0 - bne _022484C6 - ldr r0, [sp, #4] - ldr r1, [sp, #0x14] - bl ov16_02248AF0 -_022484C6: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022484CC: .word 0x000001EE - thumb_func_end ov16_02248324 - - thumb_func_start ov16_022484D0 -ov16_022484D0: ; 0x022484D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r6, r1, #0 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r6, #0 - bl ov16_02248AD0 - mov ip, r0 - ldr r1, [r6, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r0, r6, r0 - add r5, r0, #1 - ldr r7, _02248548 ; =0x00002D58 - mov r4, #0 - mov r3, #1 - add r0, sp, #4 -_022484FA: - ldrsb r1, [r5, r7] - cmp r1, #0xc - bge _02248508 - lsl r1, r4, #2 - sub r2, r3, #1 - add r4, r4, #1 - str r2, [r0, r1] -_02248508: - add r3, r3, #1 - add r5, r5, #1 - cmp r3, #8 - blt _022484FA - cmp r4, #0 - beq _02248538 - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r4, #0 - bl sub_020E1F6C - lsl r1, r1, #2 - add r0, sp, #4 - ldr r0, [r0, r1] - ldr r1, _0224854C ; =0x00002170 - add r0, #0x27 - str r0, [r6, r1] - mov r0, #2 - ldr r2, [r6, r1] - lsl r0, r0, #0x1e - orr r0, r2 - str r0, [r6, r1] - b _02248540 -_02248538: - add r0, r6, #0 - mov r1, ip - bl ov16_02248AF0 -_02248540: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02248548: .word 0x00002D58 -_0224854C: .word 0x00002170 - thumb_func_end ov16_022484D0 - - thumb_func_start ov16_02248550 -ov16_02248550: ; 0x02248550 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - ldr r0, _02248594 ; =0x00002DB8 - add r5, r2, #0 - add r6, r4, r0 - mov r0, #0xc0 - mul r5, r0 - lsl r0, r2, #1 - add r1, r4, r0 - ldrh r3, [r6, r5] - ldr r0, _02248598 ; =0x00003124 - strh r3, [r1, r0] - mov r0, #0 - strh r0, [r6, r5] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_02253EC0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248594: .word 0x00002DB8 -_02248598: .word 0x00003124 - thumb_func_end ov16_02248550 - - thumb_func_start ov16_0224859C -ov16_0224859C: ; 0x0224859C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r1, r0, #0 - ldr r0, [r4, #0x64] - ldr r2, _022485DC ; =0x00003124 - lsl r0, r0, #1 - add r0, r4, r0 - ldrh r3, [r0, r2] - cmp r3, #0 - beq _022485D0 - mov r0, #0x4a - lsl r0, r0, #2 - str r3, [r4, r0] - ldr r0, [r4, #0x64] - mov r1, #0 - lsl r0, r0, #1 - add r0, r4, r0 - strh r1, [r0, r2] - b _022485D6 -_022485D0: - add r0, r4, #0 - bl ov16_02248AF0 -_022485D6: - mov r0, #0 - pop {r4, pc} - nop -_022485DC: .word 0x00003124 - thumb_func_end ov16_0224859C - - thumb_func_start ov16_022485E0 -ov16_022485E0: ; 0x022485E0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - mov r2, #0x4e - lsl r2, r2, #2 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r4, r2 - bl ov16_022588BC - cmp r0, #0 - bne _02248610 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02248610: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_022485E0 - - thumb_func_start ov16_02248614 -ov16_02248614: ; 0x02248614 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02266820 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02248614 - - thumb_func_start ov16_0224862C -ov16_0224862C: ; 0x0224862C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0226683C - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0224862C - - thumb_func_start ov16_02248648 -ov16_02248648: ; 0x02248648 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_022668D0 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02248648 - - thumb_func_start ov16_02248660 -ov16_02248660: ; 0x02248660 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - mov r4, #0 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r2, r0, #0 - ldr r0, [sp] - add r1, r5, #0 - bl ov16_0224A984 - add r7, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02258AB8 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov16_02258ACC - str r0, [sp, #4] - cmp r6, #0x41 - bne _022486B2 - ldr r0, [sp] - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - ldr r0, [sp, #4] - cmp r1, r0 - bge _022486B2 - mov r4, #1 -_022486B2: - cmp r6, #0x67 - bne _022486CA - mov r0, #0xc0 - mul r0, r7 - add r2, r5, r0 - ldr r0, _02248700 ; =0x00002D8C - ldr r1, [r2, r0] - add r0, r0, #4 - ldr r0, [r2, r0] - cmp r1, r0 - bne _022486CA - mov r4, #1 -_022486CA: - cmp r4, #0 - beq _022486F8 - mov r1, #0xc0 - add r0, r7, #0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _02248700 ; =0x00002D8C - ldr r3, [r2, r0] - ldr r2, _02248704 ; =0x0000215C - ldr r0, [r5, r2] - add r0, r0, r3 - cmp r0, #0 - bgt _022486F8 - sub r0, r3, #1 - neg r0, r0 - str r0, [r5, r2] - add r0, r2, #0 - add r0, #0x10 - ldr r0, [r5, r0] - add r1, #0x40 - orr r0, r1 - add r2, #0x10 - str r0, [r5, r2] -_022486F8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248700: .word 0x00002D8C -_02248704: .word 0x0000215C - thumb_func_end ov16_02248660 - - thumb_func_start ov16_02248708 -ov16_02248708: ; 0x02248708 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0224A984 - add r1, r0, #0 - mov r0, #0xc0 - add r4, r1, #0 - mul r4, r0 - ldr r0, _02248798 ; =0x00002D8C - add r2, r5, r4 - ldr r0, [r2, r0] - cmp r0, #0 - beq _0224878A - ldr r0, _0224879C ; =0x0000219C - add r2, r5, r1 - ldrb r2, [r2, r0] - cmp r2, #6 - beq _0224878A - add r0, r6, #0 - bl ov16_0223DFAC - add r6, r0, #0 - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - str r0, [sp] - add r0, r6, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - add r2, r0, #0 - ldr r0, _022487A0 ; =0x00002D67 - add r1, r5, r4 - ldrb r0, [r1, r0] - cmp r0, #0x1e - beq _02248792 - ldr r1, [sp] - add r0, r5, #0 - bl ov16_022577A4 - cmp r0, #0 - bne _02248792 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 - b _02248792 -_0224878A: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02248AF0 -_02248792: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248798: .word 0x00002D8C -_0224879C: .word 0x0000219C -_022487A0: .word 0x00002D67 - thumb_func_end ov16_02248708 - - thumb_func_start ov16_022487A4 -ov16_022487A4: ; 0x022487A4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0224A984 - mov r1, #0xc0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _022487FC ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #1 - lsl r1, r1, #0x18 - tst r1, r2 - bne _022487F0 - mov r1, #0x1c - mul r1, r0 - mov r0, #0xba - add r1, r4, r1 - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #8 - tst r0, r1 - beq _022487F8 -_022487F0: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_022487F8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022487FC: .word 0x00002DB0 - thumb_func_end ov16_022487A4 - - thumb_func_start ov16_02248800 -ov16_02248800: ; 0x02248800 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - mov r0, #0xd - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02248840 - mov r0, #0x4c - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02248848 -_02248840: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02248848: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02248800 - - thumb_func_start ov16_02248850 -ov16_02248850: ; 0x02248850 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02257028 - str r0, [r4, #0x6c] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02248850 - - thumb_func_start ov16_02248880 -ov16_02248880: ; 0x02248880 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - mov r2, #0x4e - lsl r2, r2, #2 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r4, r2 - bl ov16_0225B228 - cmp r0, #0 - bne _022488B0 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_022488B0: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02248880 - - thumb_func_start ov16_022488B4 -ov16_022488B4: ; 0x022488B4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0226692C - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_022488B4 - - thumb_func_start ov16_022488E0 -ov16_022488E0: ; 0x022488E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_022669D8 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_022488E0 - - thumb_func_start ov16_0224890C -ov16_0224890C: ; 0x0224890C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224A984 - add r1, r0, #0 - add r0, r5, #0 - add r2, r7, #0 - bl ov16_02266A18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224890C - - thumb_func_start ov16_02248944 -ov16_02248944: ; 0x02248944 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov16_0223DF60 - cmp r0, #6 - bne _02248970 - ldr r0, [r5, #0x64] - bl sub_020799A0 - cmp r0, #0x12 - beq _02248980 -_02248970: - ldr r0, _02248984 ; =0x00002414 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02248980 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02248AF0 -_02248980: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02248984: .word 0x00002414 - thumb_func_end ov16_02248944 - - thumb_func_start ov16_02248988 -ov16_02248988: ; 0x02248988 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - ldr r2, [r4, #0x2c] - mov r1, #4 - tst r1, r2 - beq _022489B2 - ldr r1, _022489EC ; =0x0000240C - ldr r2, [r4, r1] - mov r1, #0x10 - tst r1, r2 - bne _022489B2 - mov r4, #2 - b _022489B4 -_022489B2: - mov r4, #1 -_022489B4: - add r1, r5, #0 - add r1, #0xf0 - ldr r1, [r1, #0] - cmp r0, r1 - ble _022489D2 - mov r1, #1 - add r0, r5, #0 - mvn r1, r1 - bl ov16_02248AF0 - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r1, r0, r4 - b _022489D4 -_022489D2: - mov r1, #0 -_022489D4: - add r0, r5, #0 - add r0, #0xf0 - str r1, [r0, #0] - ldr r1, _022489F0 ; =0x00003154 - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - str r0, [r5, r1] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022489EC: .word 0x0000240C -_022489F0: .word 0x00003154 - thumb_func_end ov16_02248988 - - thumb_func_start ov16_022489F4 -ov16_022489F4: ; 0x022489F4 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r5, #0 - bl ov16_02248AD0 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_02248AD0 - add r1, r0, #0 - ldr r0, _02248A2C ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r2, r5, r0 - ldr r0, _02248A30 ; =0x000003E2 - ldrb r0, [r2, r0] - cmp r4, r0 - bne _02248A26 - add r0, r5, #0 - bl ov16_02248AF0 -_02248A26: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02248A2C: .word 0x00003044 -_02248A30: .word 0x000003E2 - thumb_func_end ov16_022489F4 - - thumb_func_start ov16_02248A34 -ov16_02248A34: ; 0x02248A34 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r6, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - add r7, r0, #0 - add r0, r4, #0 - bl ov16_02248AD0 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_02248B10 - add r1, r0, #0 - ldr r1, [r1, #0] - ldr r2, [sp] - add r0, r6, #0 - bl sub_020759CC - mov r1, #0x4d - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02248A34 - - thumb_func_start ov16_02248A7C -ov16_02248A7C: ; 0x02248A7C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov16_02248AF0 - add r0, r4, #0 - bl ov16_02248AD0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224A984 - add r2, r0, #0 - add r1, r4, #0 - ldr r3, _02248AB0 ; =0x0000219C - add r4, r4, r2 - ldrb r3, [r4, r3] - add r0, r5, #0 - bl ov16_02251C94 - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02248AB0: .word 0x0000219C - thumb_func_end ov16_02248A7C - - thumb_func_start ov16_02248AB4 -ov16_02248AB4: ; 0x02248AB4 - ldr r2, _02248AC8 ; =0x00003154 - mov r0, #1 - ldr r3, [r1, r2] - bic r3, r0 - mov r0, #1 - orr r0, r3 - str r0, [r1, r2] - ldr r3, _02248ACC ; =ov16_02251EF4 - add r0, r1, #0 - bx r3 - ; .align 2, 0 -_02248AC8: .word 0x00003154 -_02248ACC: .word ov16_02251EF4 - thumb_func_end ov16_02248AB4 - - thumb_func_start ov16_02248AD0 -ov16_02248AD0: ; 0x02248AD0 - add r1, r0, #0 - add r1, #0xb4 - ldr r1, [r1, #0] - lsl r1, r1, #2 - add r2, r0, r1 - mov r1, #0x27 - lsl r1, r1, #8 - ldr r2, [r2, r1] - add r1, r0, #0 - add r1, #0xb4 - ldr r1, [r1, #0] - add r0, #0xb4 - add r1, r1, #1 - str r1, [r0, #0] - add r0, r2, #0 - bx lr - thumb_func_end ov16_02248AD0 - - thumb_func_start ov16_02248AF0 -ov16_02248AF0: ; 0x02248AF0 - add r2, r0, #0 - add r2, #0xb4 - ldr r2, [r2, #0] - add r0, #0xb4 - add r1, r2, r1 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_02248AF0 - - thumb_func_start ov16_02248B00 -ov16_02248B00: ; 0x02248B00 - ldr r3, _02248B04 ; =ov16_02251E1C - bx r3 - ; .align 2, 0 -_02248B04: .word ov16_02251E1C - thumb_func_end ov16_02248B00 - - thumb_func_start ov16_02248B08 -ov16_02248B08: ; 0x02248B08 - ldr r3, _02248B0C ; =ov16_02251E5C - bx r3 - ; .align 2, 0 -_02248B0C: .word ov16_02251E5C - thumb_func_end ov16_02248B08 - - thumb_func_start ov16_02248B10 -ov16_02248B10: ; 0x02248B10 - push {r4, lr} - add r4, r1, #0 - cmp r2, #0x45 - bls _02248B1A - b _02248E0C -_02248B1A: - add r1, r2, r2 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02248B26: ; jump table - .short _02248BB2 - _02248B26 - 2 ; case 0 - .short _02248BB6 - _02248B26 - 2 ; case 1 - .short _02248BBC - _02248B26 - 2 ; case 2 - .short _02248BC2 - _02248B26 - 2 ; case 3 - .short _02248BC8 - _02248B26 - 2 ; case 4 - .short _02248BCE - _02248B26 - 2 ; case 5 - .short _02248BD4 - _02248B26 - 2 ; case 6 - .short _02248BDA - _02248B26 - 2 ; case 7 - .short _02248BE2 - _02248B26 - 2 ; case 8 - .short _02248BE8 - _02248B26 - 2 ; case 9 - .short _02248BF0 - _02248B26 - 2 ; case 10 - .short _02248BF6 - _02248B26 - 2 ; case 11 - .short _02248C08 - _02248B26 - 2 ; case 12 - .short _02248C1A - _02248B26 - 2 ; case 13 - .short _02248C30 - _02248B26 - 2 ; case 14 - .short _02248C36 - _02248B26 - 2 ; case 15 - .short _02248C3C - _02248B26 - 2 ; case 16 - .short _02248C42 - _02248B26 - 2 ; case 17 - .short _02248C48 - _02248B26 - 2 ; case 18 - .short _02248C4E - _02248B26 - 2 ; case 19 - .short _02248C54 - _02248B26 - 2 ; case 20 - .short _02248C5C - _02248B26 - 2 ; case 21 - .short _02248C68 - _02248B26 - 2 ; case 22 - .short _02248C70 - _02248B26 - 2 ; case 23 - .short _02248C78 - _02248B26 - 2 ; case 24 - .short _02248C7E - _02248B26 - 2 ; case 25 - .short _02248C86 - _02248B26 - 2 ; case 26 - .short _02248C8E - _02248B26 - 2 ; case 27 - .short _02248C96 - _02248B26 - 2 ; case 28 - .short _02248C9E - _02248B26 - 2 ; case 29 - .short _02248CA4 - _02248B26 - 2 ; case 30 - .short _02248CAA - _02248B26 - 2 ; case 31 - .short _02248CB0 - _02248B26 - 2 ; case 32 - .short _02248CB6 - _02248B26 - 2 ; case 33 - .short _02248CBC - _02248B26 - 2 ; case 34 - .short _02248CC2 - _02248B26 - 2 ; case 35 - .short _02248CCA - _02248B26 - 2 ; case 36 - .short _02248CD2 - _02248B26 - 2 ; case 37 - .short _02248CDA - _02248B26 - 2 ; case 38 - .short _02248CE2 - _02248B26 - 2 ; case 39 - .short _02248CE8 - _02248B26 - 2 ; case 40 - .short _02248CF0 - _02248B26 - 2 ; case 41 - .short _02248CFE - _02248B26 - 2 ; case 42 - .short _02248D0C - _02248B26 - 2 ; case 43 - .short _02248D14 - _02248B26 - 2 ; case 44 - .short _02248D1A - _02248B26 - 2 ; case 45 - .short _02248D28 - _02248B26 - 2 ; case 46 - .short _02248D36 - _02248B26 - 2 ; case 47 - .short _02248D46 - _02248B26 - 2 ; case 48 - .short _02248D56 - _02248B26 - 2 ; case 49 - .short _02248D68 - _02248B26 - 2 ; case 50 - .short _02248D6E - _02248B26 - 2 ; case 51 - .short _02248D74 - _02248B26 - 2 ; case 52 - .short _02248D7A - _02248B26 - 2 ; case 53 - .short _02248D86 - _02248B26 - 2 ; case 54 - .short _02248D8C - _02248B26 - 2 ; case 55 - .short _02248D92 - _02248B26 - 2 ; case 56 - .short _02248D98 - _02248B26 - 2 ; case 57 - .short _02248D9E - _02248B26 - 2 ; case 58 - .short _02248DA4 - _02248B26 - 2 ; case 59 - .short _02248DAA - _02248B26 - 2 ; case 60 - .short _02248DB2 - _02248B26 - 2 ; case 61 - .short _02248DB8 - _02248B26 - 2 ; case 62 - .short _02248DBC - _02248B26 - 2 ; case 63 - .short _02248DC2 - _02248B26 - 2 ; case 64 - .short _02248DC8 - _02248B26 - 2 ; case 65 - .short _02248DD8 - _02248B26 - 2 ; case 66 - .short _02248DE8 - _02248B26 - 2 ; case 67 - .short _02248DF6 - _02248B26 - 2 ; case 68 - .short _02248E06 - _02248B26 - 2 ; case 69 -_02248BB2: - add r0, #0x2c - pop {r4, pc} -_02248BB6: - ldr r0, _02248E10 ; =0x0000214C - add r0, r4, r0 - pop {r4, pc} -_02248BBC: - ldr r0, _02248E14 ; =0x00002170 - add r0, r4, r0 - pop {r4, pc} -_02248BC2: - ldr r0, _02248E18 ; =0x00002174 - add r0, r4, r0 - pop {r4, pc} -_02248BC8: - ldr r0, _02248E1C ; =0x00002178 - add r0, r4, r0 - pop {r4, pc} -_02248BCE: - add r4, #0x88 - add r0, r4, #0 - pop {r4, pc} -_02248BD4: - ldr r0, _02248E20 ; =0x0000213C - add r0, r4, r0 - pop {r4, pc} -_02248BDA: - mov r0, #6 - lsl r0, r0, #6 - add r0, r4, r0 - pop {r4, pc} -_02248BE2: - ldr r0, _02248E24 ; =0x00002158 - add r0, r4, r0 - pop {r4, pc} -_02248BE8: - mov r0, #0x4d - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248BF0: - ldr r0, _02248E28 ; =0x0000216C - add r0, r4, r0 - pop {r4, pc} -_02248BF6: - ldr r1, [r4, #0x64] - bl ov16_0223E208 - mov r1, #0x6f - lsl r1, r1, #2 - add r1, r4, r1 - lsl r0, r0, #2 - add r0, r1, r0 - pop {r4, pc} -_02248C08: - ldr r1, [r4, #0x6c] - bl ov16_0223E208 - mov r1, #0x6f - lsl r1, r1, #2 - add r1, r4, r1 - lsl r0, r0, #2 - add r0, r1, r0 - pop {r4, pc} -_02248C1A: - add r1, r4, #0 - add r1, #0x94 - ldr r1, [r1, #0] - bl ov16_0223E208 - mov r1, #0x6f - lsl r1, r1, #2 - add r1, r4, r1 - lsl r0, r0, #2 - add r0, r1, r0 - pop {r4, pc} -_02248C30: - ldr r0, _02248E2C ; =0x00002144 - add r0, r4, r0 - pop {r4, pc} -_02248C36: - add r4, #0x64 - add r0, r4, #0 - pop {r4, pc} -_02248C3C: - add r4, #0x6c - add r0, r4, #0 - pop {r4, pc} -_02248C42: - add r4, #0x94 - add r0, r4, #0 - pop {r4, pc} -_02248C48: - add r4, #0x74 - add r0, r4, #0 - pop {r4, pc} -_02248C4E: - add r4, #0x78 - add r0, r4, #0 - pop {r4, pc} -_02248C54: - mov r0, #0x46 - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248C5C: - ldr r0, _02248E30 ; =0x000030E4 - add r1, r4, r0 - ldr r0, [r4, #0x64] - lsl r0, r0, #2 - add r0, r1, r0 - pop {r4, pc} -_02248C68: - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - pop {r4, pc} -_02248C70: - mov r0, #0x53 - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248C78: - ldr r0, _02248E34 ; =0x00003044 - add r0, r4, r0 - pop {r4, pc} -_02248C7E: - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - pop {r4, pc} -_02248C86: - mov r0, #0x47 - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248C8E: - mov r0, #0x12 - lsl r0, r0, #4 - add r0, r4, r0 - pop {r4, pc} -_02248C96: - mov r0, #0xc1 - lsl r0, r0, #6 - add r0, r4, r0 - pop {r4, pc} -_02248C9E: - add r4, #0x98 - add r0, r4, #0 - pop {r4, pc} -_02248CA4: - ldr r0, _02248E38 ; =0x00002154 - add r0, r4, r0 - pop {r4, pc} -_02248CAA: - add r4, #0x38 - add r0, r4, #0 - pop {r4, pc} -_02248CB0: - ldr r0, _02248E3C ; =0x0000215C - add r0, r4, r0 - pop {r4, pc} -_02248CB6: - ldr r1, _02248E40 ; =0x00002420 - add r0, r0, r1 - pop {r4, pc} -_02248CBC: - add r4, #0x8c - add r0, r4, #0 - pop {r4, pc} -_02248CC2: - mov r0, #0x49 - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248CCA: - mov r0, #0x4a - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248CD2: - mov r0, #0x4b - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248CDA: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248CE2: - ldr r0, _02248E44 ; =0x00003104 - add r0, r4, r0 - pop {r4, pc} -_02248CE8: - mov r0, #0x86 - lsl r0, r0, #6 - add r0, r4, r0 - pop {r4, pc} -_02248CF0: - mov r0, #0x7b - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, [r4, #0x64] - lsl r0, r0, #6 - add r0, r1, r0 - pop {r4, pc} -_02248CFE: - mov r0, #0x81 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, [r4, #0x64] - lsl r0, r0, #6 - add r0, r1, r0 - pop {r4, pc} -_02248D0C: - mov r0, #0x4e - lsl r0, r0, #2 - add r0, r4, r0 - pop {r4, pc} -_02248D14: - ldr r0, _02248E48 ; =0x00002150 - add r0, r4, r0 - pop {r4, pc} -_02248D1A: - mov r0, #0x82 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, [r4, #0x64] - lsl r0, r0, #6 - add r0, r1, r0 - pop {r4, pc} -_02248D28: - mov r0, #0x82 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, [r4, #0x6c] - lsl r0, r0, #6 - add r0, r1, r0 - pop {r4, pc} -_02248D36: - mov r0, #0xba - lsl r0, r0, #2 - add r2, r4, r0 - ldr r1, [r4, #0x64] - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} -_02248D46: - mov r0, #0xba - lsl r0, r0, #2 - add r2, r4, r0 - ldr r1, [r4, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} -_02248D56: - mov r0, #0xba - lsl r0, r0, #2 - add r2, r4, r0 - add r4, #0x94 - ldr r1, [r4, #0] - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} -_02248D68: - ldr r0, _02248E4C ; =0x00003114 - add r0, r4, r0 - pop {r4, pc} -_02248D6E: - ldr r0, _02248E50 ; =0x00003118 - add r0, r4, r0 - pop {r4, pc} -_02248D74: - ldr r1, _02248E54 ; =0x0000240C - add r0, r0, r1 - pop {r4, pc} -_02248D7A: - ldr r0, _02248E58 ; =0x0000304C - add r1, r4, r0 - ldr r0, [r4, #0x64] - lsl r0, r0, #2 - add r0, r1, r0 - pop {r4, pc} -_02248D86: - ldr r0, _02248E5C ; =0x00002148 - add r0, r4, r0 - pop {r4, pc} -_02248D8C: - ldr r1, _02248E60 ; =0x00002414 - add r0, r0, r1 - pop {r4, pc} -_02248D92: - add r4, #0x7c - add r0, r4, #0 - pop {r4, pc} -_02248D98: - ldr r0, _02248E64 ; =0x00002160 - add r0, r4, r0 - pop {r4, pc} -_02248D9E: - ldr r0, _02248E68 ; =0x00002164 - add r0, r4, r0 - pop {r4, pc} -_02248DA4: - ldr r1, _02248E6C ; =0x0000241C - add r0, r0, r1 - pop {r4, pc} -_02248DAA: - mov r0, #0x85 - lsl r0, r0, #6 - add r0, r4, r0 - pop {r4, pc} -_02248DB2: - add r4, #0xec - add r0, r4, #0 - pop {r4, pc} -_02248DB8: - add r0, #0x44 - pop {r4, pc} -_02248DBC: - add r4, #0x68 - add r0, r4, #0 - pop {r4, pc} -_02248DC2: - add r4, #0x70 - add r0, r4, #0 - pop {r4, pc} -_02248DC8: - mov r0, #0xb6 - lsl r0, r0, #2 - add r2, r4, r0 - ldr r1, [r4, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} -_02248DD8: - mov r0, #0x21 - lsl r0, r0, #4 - add r1, r4, r0 - sub r0, #0xf8 - ldr r0, [r4, r0] - lsl r0, r0, #6 - add r0, r1, r0 - pop {r4, pc} -_02248DE8: - mov r0, #0x21 - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, [r4, #0x6c] - lsl r0, r0, #6 - add r0, r1, r0 - pop {r4, pc} -_02248DF6: - mov r0, #0xbb - lsl r0, r0, #2 - add r2, r4, r0 - ldr r1, [r4, #0x64] - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} -_02248E06: - ldr r0, _02248E70 ; =0x00003150 - add r0, r4, r0 - pop {r4, pc} -_02248E0C: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02248E10: .word 0x0000214C -_02248E14: .word 0x00002170 -_02248E18: .word 0x00002174 -_02248E1C: .word 0x00002178 -_02248E20: .word 0x0000213C -_02248E24: .word 0x00002158 -_02248E28: .word 0x0000216C -_02248E2C: .word 0x00002144 -_02248E30: .word 0x000030E4 -_02248E34: .word 0x00003044 -_02248E38: .word 0x00002154 -_02248E3C: .word 0x0000215C -_02248E40: .word 0x00002420 -_02248E44: .word 0x00003104 -_02248E48: .word 0x00002150 -_02248E4C: .word 0x00003114 -_02248E50: .word 0x00003118 -_02248E54: .word 0x0000240C -_02248E58: .word 0x0000304C -_02248E5C: .word 0x00002148 -_02248E60: .word 0x00002414 -_02248E64: .word 0x00002160 -_02248E68: .word 0x00002164 -_02248E6C: .word 0x0000241C -_02248E70: .word 0x00003150 - thumb_func_end ov16_02248B10 - - thumb_func_start ov16_02248E74 -ov16_02248E74: ; 0x02248E74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xd8 - add r4, r1, #0 - str r0, [sp, #0x14] - ldr r0, [r4, #0] - bl ov16_0223E05C - str r0, [sp, #0x40] - ldr r0, [r4, #0] - bl ov16_0223DF0C - str r0, [sp, #0x3c] - ldr r0, [r4, #4] - mov r7, #0 - ldr r0, [r0, #0x74] - ldr r5, [r4, #0x48] - asr r1, r0, #1 - mov r0, #1 - and r0, r1 - str r0, [sp, #0x44] - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223DF60 - cmp r5, r0 - bge _02248EF6 - ldr r0, [sp, #0x44] - lsl r0, r0, #2 - str r0, [sp, #0x28] -_02248EAE: - ldr r0, [r4, #0] - mov r1, #0 - add r2, r5, #0 - bl ov16_0223DFAC - mov r1, #6 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r1, #1 - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0x33 - beq _02248EF6 - add r0, r5, #0 - bl sub_020787CC - add r2, r0, #0 - ldr r1, [r4, #4] - ldr r0, [sp, #0x28] - add r0, r0, r1 - add r0, #0xa4 - ldr r0, [r0, #0] - tst r0, r2 - bne _02248EF6 - ldr r0, [r4, #0] - mov r1, #0 - add r5, r5, #1 - bl ov16_0223DF60 - cmp r5, r0 - blt _02248EAE -_02248EF6: - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF60 - cmp r5, r0 - bne _02248F08 - mov r0, #0x26 - str r0, [r4, #0x28] - b _02248F24 -_02248F08: - ldr r0, [sp, #0x3c] - mov r2, #2 - tst r0, r2 - beq _02248F24 - ldr r0, [sp, #0x3c] - mov r1, #0x40 - tst r0, r1 - bne _02248F24 - ldr r1, [r4, #4] - ldr r0, _0224920C ; =0x0000219E - ldrb r0, [r1, r0] - cmp r0, r5 - bne _02248F24 - add r7, r2, #0 -_02248F24: - ldr r0, [r4, #0x28] - cmp r0, #0x26 - bls _02248F2E - bl _0224998E -_02248F2E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02248F3A: ; jump table - .short _02248F88 - _02248F3A - 2 ; case 0 - .short _0224915A - _02248F3A - 2 ; case 1 - .short _02249172 - _02248F3A - 2 ; case 2 - .short _02249184 - _02248F3A - 2 ; case 3 - .short _022491B0 - _02248F3A - 2 ; case 4 - .short _022491C4 - _02248F3A - 2 ; case 5 - .short _022491FC - _02248F3A - 2 ; case 6 - .short _022492FC - _02248F3A - 2 ; case 7 - .short _02249318 - _02248F3A - 2 ; case 8 - .short _02249336 - _02248F3A - 2 ; case 9 - .short _022493DE - _02248F3A - 2 ; case 10 - .short _02249522 - _02248F3A - 2 ; case 11 - .short _022494A0 - _02248F3A - 2 ; case 12 - .short _02249522 - _02248F3A - 2 ; case 13 - .short _02249544 - _02248F3A - 2 ; case 14 - .short _022495A6 - _02248F3A - 2 ; case 15 - .short _0224965A - _02248F3A - 2 ; case 16 - .short _022496BA - _02248F3A - 2 ; case 17 - .short _0224968C - _02248F3A - 2 ; case 18 - .short _022496BA - _02248F3A - 2 ; case 19 - .short _022496D2 - _02248F3A - 2 ; case 20 - .short _022496F2 - _02248F3A - 2 ; case 21 - .short _0224973A - _02248F3A - 2 ; case 22 - .short _0224975E - _02248F3A - 2 ; case 23 - .short _0224984A - _02248F3A - 2 ; case 24 - .short _022496BA - _02248F3A - 2 ; case 25 - .short _02249872 - _02248F3A - 2 ; case 26 - .short _022496BA - _02248F3A - 2 ; case 27 - .short _022498AE - _02248F3A - 2 ; case 28 - .short _022496BA - _02248F3A - 2 ; case 29 - .short _022498D6 - _02248F3A - 2 ; case 30 - .short _02249796 - _02248F3A - 2 ; case 31 - .short _022496BA - _02248F3A - 2 ; case 32 - .short _022497C0 - _02248F3A - 2 ; case 33 - .short _022497E2 - _02248F3A - 2 ; case 34 - .short _02249832 - _02248F3A - 2 ; case 35 - .short _0224993C - _02248F3A - 2 ; case 36 - .short _02249952 - _02248F3A - 2 ; case 37 - .short _02249978 - _02248F3A - 2 ; case 38 -_02248F88: - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r1, #1 - mov r2, #5 - bl sub_0207CFF0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x3c] - mov r1, #1 - and r0, r1 - str r0, [sp, #0x20] - bne _02248FE6 - ldr r1, [r4, #4] - ldr r0, _02249210 ; =0x00002E4C - ldr r2, _02249214 ; =0x00002FCC - ldr r0, [r1, r0] - ldr r1, [r1, r2] - add r0, r0, r1 - bne _02248FE6 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02248FE6 - ldr r1, [r4, #4] - ldr r0, _02249218 ; =0x00003144 - ldr r0, [r1, r0] - cmp r0, #0 - bne _02248FE6 - ldr r0, _0224921C ; =0x00000467 - bl sub_0200549C - ldr r1, [r4, #4] - ldr r0, _02249218 ; =0x00003144 - mov r2, #1 - str r2, [r1, r0] - ldr r0, [r4, #0] - mov r1, #2 - bl ov16_0223F460 -_02248FE6: - mov r0, #0 - str r0, [sp, #0x38] - mov r1, #1 - add r0, sp, #0xb4 - strh r1, [r0, #2] - ldr r2, [sp, #0x38] - add r0, r6, #0 - mov r1, #0xa3 - bl sub_02074470 - cmp r0, #0 - beq _0224900C - add r0, r6, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - cmp r0, #0x64 - bne _0224900E -_0224900C: - b _0224911A -_0224900E: - ldr r0, [r4, #4] - str r0, [sp, #0x24] - add r0, r5, #0 - bl sub_020787CC - ldr r1, [sp, #0x44] - lsl r2, r1, #2 - ldr r1, [sp, #0x24] - add r1, r1, r2 - add r1, #0xa4 - ldr r1, [r1, #0] - tst r0, r1 - beq _02249030 - ldr r0, [sp, #0x24] - add r0, #0x9c - ldr r0, [r0, #0] - str r0, [sp, #0x38] -_02249030: - ldr r0, [sp, #0x18] - cmp r0, #0x33 - bne _02249044 - ldr r0, [sp, #0x24] - add r0, #0xa0 - str r0, [sp, #0x24] - ldr r1, [r0, #0] - ldr r0, [sp, #0x38] - add r0, r0, r1 - str r0, [sp, #0x38] -_02249044: - ldr r0, [sp, #0x18] - cmp r0, #0x42 - bne _02249058 - ldr r1, [sp, #0x38] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E2178 - str r0, [sp, #0x38] -_02249058: - ldr r0, [sp, #0x20] - cmp r0, #0 - beq _0224906C - ldr r1, [sp, #0x38] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E2178 - str r0, [sp, #0x38] -_0224906C: - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov16_02259B38 - cmp r0, #0 - bne _022490AE - add r0, r6, #0 - mov r1, #0xc - mov r2, #0 - bl sub_02074470 - ldr r1, _02249220 ; =0x020E4C44 - ldrb r1, [r1] - cmp r1, r0 - beq _0224909A - ldr r1, [sp, #0x38] - mov r0, #0xaa - mul r0, r1 - mov r1, #0x64 - bl sub_020E2178 - str r0, [sp, #0x38] - b _022490A8 -_0224909A: - ldr r1, [sp, #0x38] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E2178 - str r0, [sp, #0x38] -_022490A8: - mov r1, #2 - add r0, sp, #0xb4 - strh r1, [r0, #2] -_022490AE: - add r0, r6, #0 - mov r1, #8 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x4c] - add r0, r6, #0 - bl sub_02075AAC - ldr r1, [sp, #0x4c] - sub r0, r1, r0 - str r0, [r4, #0x3c] - ldr r1, [sp, #0x4c] - ldr r0, [sp, #0x38] - add r2, r1, r0 - str r2, [sp, #0x4c] - ldr r3, [r4, #4] - ldr r0, _02249224 ; =0x0000219C - add r1, r3, r7 - ldrb r0, [r1, r0] - cmp r5, r0 - bne _022490E4 - mov r0, #0xc0 - mul r0, r7 - add r1, r3, r0 - ldr r0, _02249228 ; =0x00002DA4 - str r2, [r1, r0] -_022490E4: - add r0, r6, #0 - mov r1, #8 - add r2, sp, #0x4c - bl sub_02074B30 - ldr r0, [r4, #4] - ldr r1, [r0, #0x74] - str r0, [sp, #0x1c] - add r6, r1, #0 - mov r0, #0xc0 - mul r6, r0 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223DF20 - ldr r2, [sp, #0x1c] - mov r3, #0xb5 - add r6, r2, r6 - lsl r3, r3, #6 - ldrh r2, [r6, r3] - add r3, #0x26 - ldrb r3, [r6, r3] - add r1, r5, #0 - lsl r3, r3, #0x1b - lsr r3, r3, #0x1b - bl ov16_022499C0 -_0224911A: - ldr r0, [sp, #0x38] - cmp r0, #0 - beq _02249152 - mov r1, #0x11 - add r0, sp, #0xb4 - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r0, [sp, #0x38] - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #7 - str r0, [r4, #0x34] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249152: - mov r0, #0x25 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224915A: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02249206 - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249172: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _02249206 - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249184: - ldr r1, [r4, #4] - ldr r0, _02249224 ; =0x0000219C - add r2, r1, r7 - ldrb r0, [r2, r0] - cmp r5, r0 - bne _022491A8 - ldr r0, [r4, #0] - ldr r3, [r4, #0x3c] - add r2, r7, #0 - bl ov16_02265D14 - mov r0, #0 - str r0, [r4, #0x3c] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022491A8: - mov r0, #5 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022491B0: - ldr r0, [r4, #4] - bl ov16_02251FC8 - cmp r0, #0 - beq _02249206 - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022491C4: - add r0, r6, #0 - bl sub_02076B14 - cmp r0, #0 - beq _022491F4 - ldr r1, [r4, #4] - ldr r0, _02249224 ; =0x0000219C - add r2, r1, r7 - ldrb r0, [r2, r0] - cmp r5, r0 - bne _022491EC - ldr r0, [r4, #0] - add r2, r7, #0 - mov r3, #8 - bl ov16_02265FF8 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0226614C -_022491EC: - mov r0, #6 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022491F4: - mov r0, #0x25 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022491FC: - ldr r0, [r4, #4] - bl ov16_02251FC8 - cmp r0, #0 - bne _02249208 -_02249206: - b _0224998E -_02249208: - ldr r2, _0224922C ; =0x0226E608 - b _02249230 - ; .align 2, 0 -_0224920C: .word 0x0000219E -_02249210: .word 0x00002E4C -_02249214: .word 0x00002FCC -_02249218: .word 0x00003144 -_0224921C: .word 0x00000467 -_02249220: .word 0x020E4C44 -_02249224: .word 0x0000219C -_02249228: .word 0x00002DA4 -_0224922C: .word 0x0226E608 -_02249230: - add r3, sp, #0x9c - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r6, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x34] - mov r0, #5 - mov r1, #0x18 - bl sub_02018144 - mov r1, #0x5f - ldr r2, [r4, #4] - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #4] - ldr r0, [r0, r1] - mov r1, #0 - str r0, [sp, #0x30] - str r1, [sp, #0x50] -_02249264: - lsl r2, r1, #2 - add r1, sp, #0x9c - ldr r1, [r1, r2] - add r0, r6, #0 - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #0x50] - lsl r2, r1, #2 - ldr r1, [sp, #0x30] - str r0, [r1, r2] - ldr r0, [sp, #0x50] - add r1, r0, #1 - str r1, [sp, #0x50] - cmp r1, #6 - blt _02249264 - ldr r0, [r4, #0] - bl ov16_0223E24C - add r2, r0, #0 - lsl r2, r2, #0x10 - add r0, r6, #0 - mov r1, #0 - lsr r2, r2, #0x10 - bl sub_02075C74 - add r0, r6, #0 - bl sub_020741B8 - ldr r1, [r4, #4] - ldr r0, _022495E8 ; =0x0000219C - add r2, r1, r7 - ldrb r3, [r2, r0] - cmp r5, r3 - bne _022492B2 - ldr r0, [r4, #0] - add r2, r7, #0 - bl ov16_02251C94 -_022492B2: - add r0, r5, #0 - bl sub_020787CC - ldr r1, [r4, #4] - ldr r2, _022495EC ; =0x00003109 - ldrb r3, [r1, r2] - orr r0, r3 - strb r0, [r1, r2] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r7, #0 - bl ov16_022661CC - mov r1, #3 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0x11 - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r0, [sp, #0x34] - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #7 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022492FC: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _0224930C - b _0224998E -_0224930C: - mov r0, #8 - str r0, [r4, #0x28] - mov r0, #0 - add sp, #0xd8 - str r0, [r4, #0x38] - pop {r3, r4, r5, r6, r7, pc} -_02249318: - ldr r0, [r4, #4] - add r1, r0, r7 - ldr r0, _022495E8 ; =0x0000219C - ldrb r0, [r1, r0] - cmp r5, r0 - beq _0224932E - ldr r0, [r4, #0] - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0224B520 -_0224932E: - mov r0, #9 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249336: - ldr r0, [r4, #0] - bl ov16_0223DF00 - add r6, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223DF04 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E064 - add r7, r0, #0 - ldr r0, _022495F0 ; =0x04000008 - mov r2, #3 - ldrh r1, [r0] - bic r1, r2 - mov r2, #2 - orr r1, r2 - strh r1, [r0] - mov r0, #1 - add r1, r0, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - ldr r0, [r4, #0] - mov r1, #2 - bl ov16_0223F8DC - mov r0, #5 - str r0, [sp] - add r0, r6, #0 - mov r1, #2 - mov r2, #1 - mov r3, #0 - bl sub_0200DA60 - bl sub_0200DAA0 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x80 - str r0, [sp, #8] - add r0, r7, #0 - mov r1, #0x26 - mov r3, #5 - bl sub_02003050 - mov r0, #7 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #0xc - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - mov r0, #0xa - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, r5, #0 - mov r2, #2 - mov r3, #0x11 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0xff - bl sub_0201ADA4 - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - mov r3, #8 - bl sub_0200DC48 - mov r0, #0xa - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022493DE: - ldr r3, _022495F4 ; =0x0226E620 - add r2, sp, #0x84 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r3, _022495F8 ; =0x0226E5A8 - add r2, sp, #0x6c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223DF04 - add r7, r0, #0 - mov r0, #0x5f - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - str r0, [sp, #0x2c] - mov r0, #0 - str r0, [sp, #0x50] -_02249416: - ldr r2, _022495FC ; =0x000003B3 - add r1, sp, #0xb4 - strh r2, [r1, #2] - mov r2, #4 - strb r2, [r1, #1] - lsl r2, r0, #2 - add r1, sp, #0x84 - ldr r1, [r1, r2] - lsl r0, r0, #4 - str r1, [sp, #0xb8] - mov r1, #0 - str r1, [sp] - str r0, [sp, #4] - add r0, r1, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r4, #0] - ldr r2, [sp, #0x40] - add r1, r7, #0 - add r3, sp, #0xb4 - bl ov16_0223FB78 - mov r1, #0xed - ldr r5, [sp, #0x50] - lsl r1, r1, #2 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #7 - strb r1, [r0, #1] - lsl r2, r5, #2 - add r1, sp, #0x6c - ldr r1, [r1, r2] - add r0, r6, #0 - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #0x2c] - lsl r2, r5, #2 - ldr r1, [r1, r2] - ldr r2, [sp, #0x40] - sub r0, r0, r1 - str r0, [sp, #0xb8] - mov r0, #2 - str r0, [sp, #0xd0] - mov r0, #0x50 - str r0, [sp] - lsl r0, r5, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0x1c - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r7, #0 - add r3, sp, #0xb4 - bl ov16_0223FB78 - ldr r0, [sp, #0x50] - add r0, r0, #1 - str r0, [sp, #0x50] - cmp r0, #6 - blt _02249416 - mov r0, #0xb - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022494A0: - ldr r3, _02249600 ; =0x0226E5D8 - add r2, sp, #0x54 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223DF04 - mov r1, #0x24 - str r1, [sp] - mov r1, #0x60 - str r1, [sp, #4] - mov r1, #0xf - mov r2, #0x50 - mov r3, #0 - add r7, r0, #0 - bl sub_0201AE78 - mov r1, #0 - str r1, [sp, #0x50] - add r5, sp, #0xb4 -_022494D2: - ldr r0, _02249604 ; =0x000003B5 - lsl r2, r1, #2 - add r1, sp, #0x54 - strh r0, [r5, #2] - mov r0, #7 - ldr r1, [r1, r2] - strb r0, [r5, #1] - add r0, r6, #0 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xb8] - mov r0, #3 - str r0, [sp, #0xd0] - mov r0, #0x48 - str r0, [sp] - ldr r0, [sp, #0x50] - ldr r2, [sp, #0x40] - lsl r0, r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0x24 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r7, #0 - add r3, r5, #0 - bl ov16_0223FB78 - ldr r0, [sp, #0x50] - add r1, r0, #1 - str r1, [sp, #0x50] - cmp r1, #6 - blt _022494D2 - mov r0, #0xd - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249522: - ldr r0, _02249608 ; =0x021BF67C - ldr r1, [r0, #0x48] - ldr r0, _0224960C ; =0x00000C03 - tst r0, r1 - bne _02249534 - bl sub_02022798 - cmp r0, #0 - beq _022495C2 -_02249534: - ldr r0, _02249610 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249544: - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223DF04 - add r6, r0, #0 - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - bl sub_0201A8FC - ldr r1, _022495F0 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r2, r0 - strh r2, [r1] - mov r1, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223F8DC - ldr r0, [r4, #4] - add r1, r0, r7 - ldr r0, _022495E8 ; =0x0000219C - ldrb r0, [r1, r0] - cmp r5, r0 - beq _02249592 - ldr r0, [r4, #0] - add r1, r4, #0 - bl ov16_0224B7CC -_02249592: - mov r0, #0x5f - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_020181C4 - mov r0, #0xf - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022495A6: - ldr r0, [r4, #0] - bl ov16_0223DF00 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x38 - add r2, sp, #0x48 - bl sub_0207727C - cmp r0, #0 - beq _022495CC - ldr r1, _02249614 ; =0x0000FFFE - cmp r0, r1 - bne _022495C4 -_022495C2: - b _0224998E -_022495C4: - add r1, r1, #1 - cmp r0, r1 - beq _022495D4 - b _022495E2 -_022495CC: - mov r0, #3 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022495D4: - add r0, sp, #0x48 - ldrh r0, [r0] - add sp, #0xd8 - str r0, [r4, #0x40] - mov r0, #0x10 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022495E2: - ldr r1, [r4, #4] - ldr r0, _022495E8 ; =0x0000219C - b _02249618 - ; .align 2, 0 -_022495E8: .word 0x0000219C -_022495EC: .word 0x00003109 -_022495F0: .word 0x04000008 -_022495F4: .word 0x0226E620 -_022495F8: .word 0x0226E5A8 -_022495FC: .word 0x000003B3 -_02249600: .word 0x0226E5D8 -_02249604: .word 0x000003B5 -_02249608: .word 0x021BF67C -_0224960C: .word 0x00000C03 -_02249610: .word 0x000005DC -_02249614: .word 0x0000FFFE -_02249618: - add r2, r1, r7 - ldrb r3, [r2, r0] - cmp r5, r3 - bne _02249628 - ldr r0, [r4, #0] - add r2, r7, #0 - bl ov16_02251C94 -_02249628: - mov r1, #4 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0xa - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - add r0, sp, #0x48 - ldrh r0, [r0] - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x24 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224965A: - ldr r1, _02249994 ; =0x0000049A - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0xa - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r0, [r4, #0x40] - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224968C: - ldr r1, _02249998 ; =0x0000049B - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #2 - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022496BA: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _022496FE - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022496D2: - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r3, _0224999C ; =0x0000049C - add r2, r7, #0 - bl ov16_02265B2C - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022496F2: - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov16_02259AB4 - cmp r0, #0 - bne _02249700 -_022496FE: - b _0224998E -_02249700: - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _02249714 - mov r0, #0x1f - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249714: - ldr r1, _022499A0 ; =0x0000049F - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x16 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224973A: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02249840 - ldr r0, [r4, #0] - ldr r2, [r4, #0x40] - add r1, r7, #0 - add r3, r5, #0 - bl ov16_022664C4 - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224975E: - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _02249772 - mov r0, #0x1f - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249772: - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _02249840 - ldr r1, [r4, #4] - lsl r0, r7, #8 - add r1, r1, r0 - mov r0, #0x23 - lsl r0, r0, #8 - ldrb r0, [r1, r0] - add sp, #0xd8 - sub r0, r0, #1 - str r0, [r4, #0x44] - mov r0, #0x18 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249796: - mov r1, #0x4a - lsl r1, r1, #4 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022497C0: - mov r0, #2 - str r0, [sp] - ldr r0, [r4, #0x40] - ldr r3, _022499A4 ; =0x000004A1 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r7, #0 - bl ov16_02265B2C - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022497E2: - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _02249840 - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _02249802 - mov r0, #0x10 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249802: - ldr r1, _022499A8 ; =0x000004A4 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0xa - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r0, [r4, #0x40] - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x23 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249832: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _02249842 -_02249840: - b _0224998E -_02249842: - mov r0, #0xf - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224984A: - ldr r1, _022499AC ; =0x000004A5 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249872: - ldr r1, _022499B0 ; =0x000004A6 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0xa - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r1, [r4, #0x44] - add r0, r6, #0 - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022498AE: - ldr r1, _022499B4 ; =0x000004A7 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - ldr r0, [r4, #0x28] - add sp, #0xd8 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_022498D6: - ldr r1, _022499B8 ; =0x000004A8 - add r0, sp, #0xb4 - strh r1, [r0, #2] - mov r1, #0xa - strb r1, [r0, #1] - lsl r0, r5, #8 - orr r0, r7 - str r0, [sp, #0xb8] - ldr r0, [r4, #0x40] - str r0, [sp, #0xbc] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x40] - add r2, sp, #0xb4 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0 - str r0, [sp, #0x50] - ldr r1, [r4, #0x44] - add r0, r6, #0 - add r1, #0x3e - add r2, sp, #0x50 - bl sub_02074B30 - ldr r1, [r4, #0x40] - ldr r2, [r4, #0x44] - lsl r1, r1, #0x10 - lsl r2, r2, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x10 - lsr r2, r2, #0x18 - bl sub_02077230 - ldr r1, [r4, #4] - ldr r0, _022499BC ; =0x0000219C - add r2, r1, r7 - ldrb r3, [r2, r0] - cmp r5, r3 - bne _02249934 - ldr r0, [r4, #0] - add r2, r7, #0 - bl ov16_02251C94 -_02249934: - mov r0, #0x24 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224993C: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0224998E - mov r0, #0xf - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249952: - add r0, r5, #0 - bl sub_020787CC - ldr r1, [sp, #0x44] - ldr r2, [r4, #4] - mov r3, #0 - mvn r3, r3 - add r2, #0xa4 - lsl r1, r1, #2 - ldr r6, [r2, r1] - eor r0, r3 - and r0, r6 - str r0, [r2, r1] - add r0, r5, #1 - str r0, [r4, #0x48] - mov r0, #0 - add sp, #0xd8 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249978: - mov r0, #0x5e - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #2 - str r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x14] - bl sub_0200DA58 -_0224998E: - add sp, #0xd8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02249994: .word 0x0000049A -_02249998: .word 0x0000049B -_0224999C: .word 0x0000049C -_022499A0: .word 0x0000049F -_022499A4: .word 0x000004A1 -_022499A8: .word 0x000004A4 -_022499AC: .word 0x000004A5 -_022499B0: .word 0x000004A6 -_022499B4: .word 0x000004A7 -_022499B8: .word 0x000004A8 -_022499BC: .word 0x0000219C - thumb_func_end ov16_02248E74 - - thumb_func_start ov16_022499C0 -ov16_022499C0: ; 0x022499C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp] - str r1, [sp, #4] - add r0, r2, #0 - add r1, r3, #0 - mov r2, #5 - mov r4, #0 - bl sub_02075874 - add r7, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #4] - bl sub_0207A0FC - mov r1, #6 - add r2, r4, #0 - str r0, [sp, #0x14] - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r6, #0 - mov r1, #1 - mov r2, #5 - bl sub_0207CFF0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #2 - mov r2, #5 - bl sub_0207CFF0 - add r6, r0, #0 - add r0, r4, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x1c] - add r0, sp, #0x20 - str r0, [sp, #0xc] -_02249A0E: - ldr r1, [sp, #0x1c] - ldr r0, [sp, #0x14] - add r1, #0xd - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #0xc] - strb r0, [r1] - add r0, r1, #0 - ldrb r1, [r0] - ldr r0, [sp, #0x18] - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #6 - blt _02249A0E - mov r0, #0 - str r0, [sp, #8] - add r0, sp, #0x20 - str r0, [sp, #0x10] -_02249A44: - ldr r1, [sp, #0x18] - ldr r0, _02249B7C ; =0x000001FE - cmp r1, r0 - blo _02249A4E - b _02249B72 -_02249A4E: - ldr r0, [sp, #8] - cmp r0, #5 - bhi _02249AFA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02249A60: ; jump table - .short _02249A6C - _02249A60 - 2 ; case 0 - .short _02249A84 - _02249A60 - 2 ; case 1 - .short _02249A9C - _02249A60 - 2 ; case 2 - .short _02249AB4 - _02249A60 - 2 ; case 3 - .short _02249ACC - _02249A60 - 2 ; case 4 - .short _02249AE4 - _02249A60 - 2 ; case 5 -_02249A6C: - add r0, r7, #0 - mov r1, #0xa - bl sub_020758B0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - cmp r5, #0x7a - bne _02249AFA - add r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _02249AFA -_02249A84: - add r0, r7, #0 - mov r1, #0xb - bl sub_020758B0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - cmp r5, #0x75 - bne _02249AFA - add r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _02249AFA -_02249A9C: - add r0, r7, #0 - mov r1, #0xc - bl sub_020758B0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - cmp r5, #0x76 - bne _02249AFA - add r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _02249AFA -_02249AB4: - add r0, r7, #0 - mov r1, #0xd - bl sub_020758B0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - cmp r5, #0x79 - bne _02249AFA - add r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _02249AFA -_02249ACC: - add r0, r7, #0 - mov r1, #0xe - bl sub_020758B0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - cmp r5, #0x77 - bne _02249AFA - add r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _02249AFA -_02249AE4: - add r0, r7, #0 - mov r1, #0xf - bl sub_020758B0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - cmp r5, #0x78 - bne _02249AFA - add r0, r4, r6 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_02249AFA: - ldr r0, [sp, #4] - bl sub_020787CC - add r1, r0, #0 - lsl r1, r1, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - bl sub_02077758 - cmp r0, #0 - beq _02249B14 - lsl r0, r4, #0x11 - asr r4, r0, #0x10 -_02249B14: - cmp r5, #0x32 - bne _02249B1C - lsl r0, r4, #0x11 - asr r4, r0, #0x10 -_02249B1C: - ldr r0, [sp, #0x18] - ldr r1, _02249B7C ; =0x000001FE - add r0, r0, r4 - cmp r0, r1 - ble _02249B2E - sub r0, r0, r1 - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_02249B2E: - ldr r0, [sp, #0x10] - ldrb r0, [r0] - add r0, r0, r4 - cmp r0, #0xff - ble _02249B40 - sub r0, #0xff - sub r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_02249B40: - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x10] - ldrb r0, [r0] - add r1, r0, r4 - ldr r0, [sp, #0x10] - strb r1, [r0] - ldr r0, [sp, #0x18] - ldr r1, [sp, #8] - add r0, r0, r4 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r1, #0xd - bl sub_02074B30 - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #6 - bge _02249B72 - b _02249A44 -_02249B72: - add r0, r7, #0 - bl sub_020759B8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249B7C: .word 0x000001FE - thumb_func_end ov16_022499C0 - - thumb_func_start ov16_02249B80 -ov16_02249B80: ; 0x02249B80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x158 - add r4, r1, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - bl ov16_0223E05C - str r0, [sp, #0x20] - ldr r0, [r4, #0] - bl ov16_0223E064 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E000 - mov r7, #1 - str r0, [sp, #0x24] - add r0, r7, #0 - ldr r6, [r4, #4] - bl sub_020787CC - ldr r1, _02249ED4 ; =0x00003108 - ldrb r1, [r6, r1] - tst r0, r1 - beq _02249BB4 - mov r7, #3 -_02249BB4: - ldr r0, [r4, #0x28] - cmp r0, #0x20 - bls _02249BBE - bl _0224A716 -_02249BBE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02249BCA: ; jump table - .short _02249C0C - _02249BCA - 2 ; case 0 - .short _02249CCC - _02249BCA - 2 ; case 1 - .short _02249D18 - _02249BCA - 2 ; case 2 - .short _02249D46 - _02249BCA - 2 ; case 3 - .short _02249D70 - _02249BCA - 2 ; case 4 - .short _02249D84 - _02249BCA - 2 ; case 5 - .short _02249DB8 - _02249BCA - 2 ; case 6 - .short _02249DDA - _02249BCA - 2 ; case 7 - .short _02249DFA - _02249BCA - 2 ; case 8 - .short _02249E40 - _02249BCA - 2 ; case 9 - .short _02249E5E - _02249BCA - 2 ; case 10 - .short _02249FA0 - _02249BCA - 2 ; case 11 - .short _02249FEE - _02249BCA - 2 ; case 12 - .short _0224A082 - _02249BCA - 2 ; case 13 - .short _0224A0D6 - _02249BCA - 2 ; case 14 - .short _0224A104 - _02249BCA - 2 ; case 15 - .short _0224A134 - _02249BCA - 2 ; case 16 - .short _0224A1C4 - _02249BCA - 2 ; case 17 - .short _0224A1EA - _02249BCA - 2 ; case 18 - .short _0224A212 - _02249BCA - 2 ; case 19 - .short _0224A26A - _02249BCA - 2 ; case 20 - .short _0224A364 - _02249BCA - 2 ; case 21 - .short _0224A3B2 - _02249BCA - 2 ; case 22 - .short _0224A3B2 - _02249BCA - 2 ; case 23 - .short _0224A522 - _02249BCA - 2 ; case 24 - .short _0224A570 - _02249BCA - 2 ; case 25 - .short _0224A5C8 - _02249BCA - 2 ; case 26 - .short _0224A60E - _02249BCA - 2 ; case 27 - .short _0224A63E - _02249BCA - 2 ; case 28 - .short _0224A656 - _02249BCA - 2 ; case 29 - .short _0224A66C - _02249BCA - 2 ; case 30 - .short _0224A6A4 - _02249BCA - 2 ; case 31 - .short _0224A6D4 - _02249BCA - 2 ; case 32 -_02249C0C: - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _02249C88 - mov r0, #3 - str r0, [sp, #0x138] - mov r0, #5 - str r0, [sp, #0x134] - ldr r0, _02249ED8 ; =0x00004E20 - add r0, r7, r0 - str r0, [sp, #0x13c] - ldr r0, [r4, #0x2c] - str r0, [sp, #0x140] - ldr r0, [r4, #0] - bl ov16_0223E010 - str r0, [sp, #0x14c] - ldr r0, [r4, #0] - bl ov16_0223E064 - str r0, [sp, #0x150] - mov r0, #1 - str r0, [sp, #0x144] - mov r0, #0 - str r0, [sp, #0x148] - ldr r0, [r4, #0] - str r0, [sp, #0x154] - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02249C5C - cmp r7, #1 - bne _02249C56 - mov r0, #0x10 - str r0, [sp, #0x130] - b _02249C60 -_02249C56: - mov r0, #0x11 - str r0, [sp, #0x130] - b _02249C60 -_02249C5C: - mov r0, #0xf - str r0, [sp, #0x130] -_02249C60: - add r0, sp, #0x130 - bl ov12_02237728 - str r0, [r4, #8] - mov r0, #1 - str r0, [r4, #0x28] - ldr r0, _02249EDC ; =0x0000070A - bl sub_02005748 - ldr r2, [r4, #0] - ldr r0, _02249EE0 ; =0x00002422 - ldrh r1, [r2, r0] - add r1, r1, #1 - strh r1, [r2, r0] - ldr r0, [r4, #8] - mov r1, #0 - bl ov12_022368C8 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_02249C88: - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF14 - add r5, r0, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237890 - cmp r0, #4 - beq _02249D5C - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - add r5, #0x88 - str r0, [r4, #8] - mov r0, #0 - str r0, [r5, #0] - mov r0, #1 - str r0, [r4, #0x28] - ldr r0, _02249EDC ; =0x0000070A - bl sub_02005748 - ldr r2, [r4, #0] - ldr r0, _02249EE0 ; =0x00002422 - ldrh r1, [r2, r0] - add r1, r1, #1 - strh r1, [r2, r0] - ldr r0, [r4, #8] - mov r1, #0 - bl ov12_022368C8 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_02249CCC: - ldr r0, [r4, #8] - mov r1, #0 - bl ov12_022368D0 - cmp r0, #0 - bne _02249D5C - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - beq _02249CFC - ldr r0, _02249EE4 ; =0x000005E6 - mov r1, #0x75 - bl sub_02005728 - ldr r0, [r4, #8] - mov r1, #2 - bl ov12_022368C8 - mov r0, #0x19 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249CFC: - ldr r0, _02249EE8 ; =0x00000708 - mov r1, #0x75 - bl sub_02005728 - ldr r0, [r4, #8] - mov r1, #1 - bl ov12_022368C8 - mov r0, #2 - str r0, [r4, #0x28] - mov r0, #0x17 - add sp, #0x158 - str r0, [r4, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_02249D18: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _02249D5C - ldr r0, [r4, #0] - ldr r2, [r4, #0x2c] - add r1, r7, #0 - bl ov16_02265050 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov16_0224A724 - str r0, [r4, #0x38] - cmp r0, #4 - bge _02249D3A - b _02249D3C -_02249D3A: - mov r0, #3 -_02249D3C: - str r0, [r4, #0x3c] - mov r0, #3 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249D46: - ldr r0, [r4, #8] - mov r1, #1 - bl ov12_022368D0 - cmp r0, #0 - bne _02249D5C - ldr r0, [r4, #4] - bl ov16_02251FC8 - cmp r0, #0 - bne _02249D60 -_02249D5C: - bl _0224A716 -_02249D60: - ldr r0, [r4, #8] - mov r1, #3 - bl ov12_022368C8 - mov r0, #4 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249D70: - ldr r0, [r4, #8] - mov r1, #3 - bl ov12_022368D0 - cmp r0, #0 - bne _02249E72 - mov r0, #5 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249D84: - ldr r0, [r4, #0x3c] - cmp r0, #0 - bne _02249DA4 - ldr r0, [r4, #0x38] - cmp r0, #4 - bne _02249D9C - mov r0, #7 - str r0, [r4, #0x28] - mov r0, #0xc - add sp, #0x158 - str r0, [r4, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_02249D9C: - mov r0, #0x1c - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249DA4: - ldr r0, [r4, #8] - mov r1, #4 - bl ov12_022368C8 - mov r0, #6 - str r0, [r4, #0x28] - mov r0, #0xc - add sp, #0x158 - str r0, [r4, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_02249DB8: - ldr r0, [r4, #8] - mov r1, #4 - bl ov12_022368D0 - cmp r0, #0 - bne _02249E72 - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _02249E72 - ldr r0, [r4, #0x3c] - add sp, #0x158 - sub r0, r0, #1 - str r0, [r4, #0x3c] - mov r0, #5 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249DDA: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _02249E72 - ldr r0, [r4, #8] - mov r1, #6 - bl ov12_022368C8 - ldr r0, _02249EEC ; =0x00000709 - mov r1, #0x75 - bl sub_02005728 - mov r0, #8 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249DFA: - ldr r0, [r4, #8] - mov r1, #6 - bl ov12_022368D0 - cmp r0, #0 - bne _02249E72 - ldr r1, _02249EF0 ; =0x00000363 - add r0, sp, #0x10c - strh r1, [r0, #2] - mov r1, #0x82 - strb r1, [r0, #1] - str r7, [sp, #0x110] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - add r2, sp, #0x10c - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x1e - str r0, [r4, #0x34] - mov r0, #9 - str r0, [r4, #0x28] - ldr r0, _02249EF4 ; =0x00000467 - bl sub_0200549C - ldr r0, [r4, #0] - mov r1, #2 - bl ov16_0223F460 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_02249E40: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02249E72 - mov r0, #0xa - str r0, [r4, #0x28] - ldr r0, [r4, #8] - mov r1, #7 - bl ov12_022368C8 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_02249E5E: - ldr r0, [r4, #8] - mov r1, #7 - bl ov12_022368D0 - cmp r0, #0 - bne _02249E72 - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - beq _02249E76 -_02249E72: - bl _0224A716 -_02249E76: - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223F4B0 - ldr r2, [r4, #4] - ldr r0, [r4, #0] - add r3, r2, r7 - ldr r2, _02249EF8 ; =0x0000219C - add r1, r7, #0 - ldrb r2, [r3, r2] - bl ov16_0223DFAC - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #6 - lsl r1, r1, #8 - tst r0, r1 - beq _02249F20 - ldr r2, [r4, #4] - ldr r0, [r4, #0] - add r3, r2, r7 - ldr r2, _02249EF8 ; =0x0000219C - add r1, r7, #0 - ldrb r2, [r3, r2] - bl ov16_0223DFAC - add r2, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov16_02259A5C - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _02249EFC ; =0x0000FFFF - b _02249F00 - nop -_02249ED4: .word 0x00003108 -_02249ED8: .word 0x00004E20 -_02249EDC: .word 0x0000070A -_02249EE0: .word 0x00002422 -_02249EE4: .word 0x000005E6 -_02249EE8: .word 0x00000708 -_02249EEC: .word 0x00000709 -_02249EF0: .word 0x00000363 -_02249EF4: .word 0x00000467 -_02249EF8: .word 0x0000219C -_02249EFC: .word 0x0000FFFF -_02249F00: - add r0, r5, #0 - mov r1, #0xf - mov r3, #1 - bl sub_02003178 - mov r1, #0 - ldr r0, [sp, #0x24] - mov r2, #0x10 - add r3, r1, #0 - str r1, [sp] - bl sub_0200872C - mov r0, #0x20 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249F20: - add r0, r6, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F9E0 - cmp r0, #0 - beq _02249F6E - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _0224A290 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #5 - mov r3, #1 - bl sub_02003178 - mov r1, #0 - ldr r0, [sp, #0x24] - mov r2, #0x10 - add r3, r1, #0 - str r1, [sp] - bl sub_0200872C - mov r0, #0x10 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_02249F6E: - ldr r1, _0224A294 ; =0x00000367 - add r0, sp, #0xe8 - strh r1, [r0, #2] - mov r1, #0x82 - strb r1, [r0, #1] - str r7, [sp, #0xec] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - add r2, sp, #0xe8 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x1e - str r0, [r4, #0x34] - mov r0, #0xb - str r0, [r4, #0x28] - ldr r0, [r4, #0] - bl ov16_0223F268 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_02249FA0: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02249FF8 - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _02249FF8 - mov r0, #0xc - str r0, [r4, #0x28] - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _0224A290 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #5 - mov r3, #1 - bl sub_02003178 - mov r1, #0 - ldr r0, [sp, #0x24] - str r1, [sp] - mov r2, #0x10 - add r3, r1, #0 - bl sub_0200872C - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_02249FEE: - add r0, r5, #0 - bl sub_0200384C - cmp r0, #0 - beq _02249FFA -_02249FF8: - b _0224A716 -_02249FFA: - ldr r0, [r4, #8] - bl ov12_0223783C - ldr r0, [sp, #0x24] - bl sub_02007DD4 - ldr r0, [r4, #0] - bl ov16_0223B53C - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223E020 - mov r1, #0 - bl ov16_022686BC - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223E020 - mov r1, #0 - bl ov16_022686BC - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF14 - mov r1, #0 - bl ov16_02263B20 - ldr r0, [r4, #0] - bl ov16_0223DF00 - str r0, [sp, #0xd0] - ldr r0, [r4, #0] - bl ov16_0223E064 - str r0, [sp, #0xd4] - ldr r0, [sp, #0x24] - add r1, r7, #0 - str r0, [sp, #0xd8] - mov r0, #5 - str r0, [sp, #0xdc] - ldr r2, [r4, #4] - ldr r0, [r4, #0] - add r3, r2, r7 - ldr r2, _0224A298 ; =0x0000219C - ldrb r2, [r3, r2] - bl ov16_0223DFAC - str r0, [sp, #0xe0] - ldr r0, [r4, #0] - bl ov16_0223E068 - bl sub_0207A280 - str r0, [sp, #0xe4] - bl sub_0201EE9C - str r0, [r4, #0x54] - add r0, sp, #0xd0 - bl ov21_021E8D48 - str r0, [r4, #0x50] - mov r0, #0xd - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A082: - ldr r0, [r4, #0x50] - bl ov21_021E8DEC - cmp r0, #0 - beq _0224A13E - ldr r0, _0224A29C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224A09C - mov r0, #0xe - str r0, [r4, #0x28] - b _0224A0AE -_0224A09C: - bl sub_02022798 - cmp r0, #0 - beq _0224A0AE - ldr r0, _0224A2A0 ; =0x000005DC - bl sub_02005748 - mov r0, #0xe - str r0, [r4, #0x28] -_0224A0AE: - ldr r0, [r4, #0x28] - cmp r0, #0xe - bne _0224A13E - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _0224A290 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #5 - mov r3, #1 - bl sub_02003178 - ldr r0, [r4, #0x50] - mov r1, #0 - bl ov21_021E8E04 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_0224A0D6: - ldr r0, [r4, #0x50] - bl ov21_021E8E00 - add r5, r0, #0 - mov r1, #0 - mov r2, #4 - bl sub_02008274 - add r0, r5, #0 - mov r1, #0 - bl sub_020080C0 - cmp r0, #0x80 - blt _0224A13E - add r0, r5, #0 - mov r1, #0 - mov r2, #0x80 - bl sub_02007DEC - mov r0, #0xf - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A104: - ldr r0, [r4, #0x50] - bl ov21_021E8DD0 - ldr r0, [r4, #0x54] - bl sub_0201EEB8 - ldr r0, [r4, #0] - bl ov16_0223B578 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r2, _0224A290 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #5 - mov r3, #1 - bl sub_02003178 - mov r0, #0x11 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A134: - add r0, r5, #0 - bl sub_0200384C - cmp r0, #0 - beq _0224A140 -_0224A13E: - b _0224A716 -_0224A140: - ldr r2, [r4, #4] - ldr r0, [r4, #0] - add r3, r2, r7 - ldr r2, _0224A298 ; =0x0000219C - add r1, r7, #0 - ldrb r2, [r3, r2] - bl ov16_0223DFAC - add r6, r0, #0 - ldr r0, [r4, #8] - bl ov12_0223783C - ldr r0, [sp, #0x24] - bl sub_02007DD4 - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF14 - mov r1, #0 - bl ov16_02263B20 - ldr r0, [r4, #0] - bl ov16_0223B53C - ldr r0, [r4, #0] - bl ov16_0223B578 - add r0, sp, #0xc0 - add r1, r6, #0 - mov r2, #2 - bl sub_02075EF4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x24] - add r1, sp, #0xc0 - mov r2, #0x80 - mov r3, #0x48 - bl sub_02007C34 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r2, _0224A290 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #5 - mov r3, #1 - bl sub_02003178 - mov r2, #0 - ldr r0, [sp, #0x24] - mov r1, #0x10 - add r3, r2, #0 - str r2, [sp] - bl sub_0200872C - mov r0, #0x11 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A1C4: - add r0, r5, #0 - bl sub_0200384C - cmp r0, #0 - bne _0224A274 - mov r0, #0x12 - str r0, [r4, #0x28] - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #0 - bl sub_02015738 - add r0, r5, #0 - mov r1, #1 - bl sub_02003858 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_0224A1EA: - ldr r1, [r4, #4] - mov r0, #5 - str r0, [sp] - mov r2, #0 - ldr r0, _0224A298 ; =0x0000219C - str r2, [sp, #4] - add r3, r1, r7 - ldrb r0, [r3, r0] - mov r3, #0xd9 - lsl r3, r3, #2 - orr r0, r7 - str r0, [sp, #8] - ldr r0, [r4, #0] - bl ov16_02265B2C - ldr r0, [r4, #0x28] - add sp, #0x158 - add r0, r0, #1 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A212: - add r0, r6, #0 - mov r1, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _0224A274 - ldr r0, [r4, #4] - mov r1, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _0224A232 - mov r0, #0x16 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A232: - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _0224A290 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #0xf - mov r3, #1 - bl sub_02003178 - mov r1, #0 - ldr r0, [sp, #0x24] - mov r2, #0x10 - add r3, r1, #0 - str r1, [sp] - bl sub_0200872C - mov r0, #0x14 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A26A: - add r0, r5, #0 - bl sub_0200384C - cmp r0, #0 - beq _0224A276 -_0224A274: - b _0224A716 -_0224A276: - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r2, [r4, #4] - ldr r0, [r4, #0] - add r3, r2, r7 - ldr r2, _0224A298 ; =0x0000219C - b _0224A2A4 - ; .align 2, 0 -_0224A290: .word 0x0000FFFF -_0224A294: .word 0x00000367 -_0224A298: .word 0x0000219C -_0224A29C: .word 0x021BF67C -_0224A2A0: .word 0x000005DC -_0224A2A4: - add r1, r7, #0 - ldrb r2, [r3, r2] - bl ov16_0223DFAC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223EDA4 - str r0, [sp] - mov r0, #5 - mov r1, #1 - add r2, r5, #0 - mov r3, #0xa - bl sub_0208712C - add r5, r0, #0 - str r5, [r4, #0x54] - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF60 - cmp r0, #6 - bge _0224A2E0 - mov r0, #0 - b _0224A2EA -_0224A2E0: - ldr r0, [r4, #0] - bl ov16_0223F240 - ldr r1, _0224A588 ; =0x00000496 - add r0, r0, r1 -_0224A2EA: - str r0, [r5, #0x44] - add r0, r6, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - str r0, [r5, #8] - ldr r0, [r4, #0] - bl ov16_0223E228 - str r0, [r5, #0x48] - add r0, r6, #0 - mov r1, #0x6f - mov r2, #0 - bl sub_02074470 - str r0, [r5, #0x10] - ldr r0, _0224A58C ; =0x020F2DAC - add r1, r5, #0 - mov r2, #5 - bl sub_020067E8 - str r0, [r4, #0x50] - mov r0, #0x15 - str r0, [r4, #0x28] - ldr r0, [r4, #0] - bl ov16_0223F414 - ldr r0, [r4, #0] - mov r5, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _0224A352 - add r7, r5, #0 -_0224A330: - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov16_0223DF14 - add r6, r0, #0 - ldr r0, [r6, #0x18] - cmp r0, #0 - beq _0224A346 - bl sub_0200D0F4 - str r7, [r6, #0x18] -_0224A346: - ldr r0, [r4, #0] - add r5, r5, #1 - bl ov16_0223DF1C - cmp r5, r0 - blt _0224A330 -_0224A352: - ldr r0, [r4, #0] - bl ov16_0223B3E4 - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223F314 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_0224A364: - ldr r0, [r4, #0x50] - bl sub_02006844 - cmp r0, #0 - beq _0224A3BC - ldr r2, [r4, #4] - ldr r5, [r4, #0x54] - add r3, r2, r7 - ldr r2, _0224A590 ; =0x0000219C - ldr r0, [r4, #0] - ldrb r2, [r3, r2] - add r1, r7, #0 - bl ov16_0223DFAC - ldr r1, [r5, #0x14] - cmp r1, #0 - bne _0224A396 - ldr r2, [r5, #0x18] - mov r1, #0x78 - bl sub_02074B30 - ldr r0, [r4, #0] - mov r1, #0x31 - bl ov16_0223F24C -_0224A396: - add r0, r5, #0 - bl sub_0208716C - ldr r0, [r4, #0x50] - bl sub_02006814 - ldr r0, [r4, #0] - mov r1, #2 - bl ov16_0223F314 - mov r0, #0x17 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A3B2: - add r0, r5, #0 - bl sub_0200384C - cmp r0, #0 - beq _0224A3BE -_0224A3BC: - b _0224A716 -_0224A3BE: - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF20 - ldr r2, [r4, #4] - str r0, [sp, #0x28] - add r3, r2, r7 - ldr r2, _0224A590 ; =0x0000219C - ldr r0, [r4, #0] - ldrb r2, [r3, r2] - add r1, r7, #0 - bl ov16_0223DFAC - add r6, r0, #0 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223F9A0 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r6, #0 - bl ov16_02259A5C - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov16_0223EF48 - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov16_0223EF68 - mov r1, #0 - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #9 - bl ov16_022666BC - ldr r0, [sp, #0x28] - add r1, r6, #0 - bl sub_0207A048 - cmp r0, #1 - bne _0224A452 - ldr r0, [r4, #0x28] - cmp r0, #0x16 - bne _0224A44A - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _0224A594 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #0xf - mov r3, #1 - bl sub_02003178 - mov r1, #0 - ldr r0, [sp, #0x24] - mov r2, #0x10 - add r3, r1, #0 - str r1, [sp] - bl sub_0200872C -_0224A44A: - mov r0, #0x20 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A452: - ldr r0, [r4, #0] - bl ov16_0223E228 - str r0, [sp, #0x1c] - bl sub_0207999C - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - bl sub_020799A0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x14] - bl sub_02079A94 - mov r5, #0 -_0224A472: - add r1, r5, #0 - add r0, r6, #0 - add r1, #0x42 - mov r2, #0 - bl sub_02074470 - add r1, r5, #0 - str r0, [sp, #0x2c] - add r0, r6, #0 - add r1, #0x3a - add r2, sp, #0x2c - bl sub_02074B30 - add r5, r5, #1 - cmp r5, #4 - blt _0224A472 - add r0, r6, #0 - bl sub_02077A00 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224A4A8 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223F9A0 -_0224A4A8: - add r0, r6, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x14] - bl sub_020798A0 - ldr r0, [r4, #0x28] - cmp r0, #0x16 - bne _0224A51A - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x14] - cmp r1, r0 - ldr r0, [r4, #0] - bne _0224A4E0 - bl ov16_0223F240 - ldr r1, _0224A588 ; =0x00000496 - add r1, r0, r1 - add r0, sp, #0x9c - strh r1, [r0, #2] - mov r1, #0x93 - strb r1, [r0, #1] - ldr r0, [sp, #0x18] - str r7, [sp, #0xa0] - str r0, [sp, #0xa4] - b _0224A4FA -_0224A4E0: - bl ov16_0223F240 - ldr r1, _0224A598 ; =0x00000498 - add r1, r0, r1 - add r0, sp, #0x9c - strh r1, [r0, #2] - mov r1, #0xaf - strb r1, [r0, #1] - ldr r0, [sp, #0x18] - str r7, [sp, #0xa0] - str r0, [sp, #0xa4] - ldr r0, [sp, #0x14] - str r0, [sp, #0xa8] -_0224A4FA: - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - add r2, sp, #0x9c - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x1e - str r0, [r4, #0x34] - mov r0, #0x18 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A51A: - mov r0, #0x20 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A522: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0224A5DE - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _0224A5DE - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _0224A594 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #0xf - mov r3, #1 - bl sub_02003178 - mov r1, #0 - ldr r0, [sp, #0x24] - mov r2, #0x10 - add r3, r1, #0 - str r1, [sp] - bl sub_0200872C - mov r0, #0x20 - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A570: - ldr r0, [r4, #8] - mov r1, #2 - bl ov12_022368D0 - cmp r0, #0 - bne _0224A5DE - ldr r0, [r4, #8] - bl ov12_0223783C - ldr r1, _0224A59C ; =0x0000035B - b _0224A5A0 - nop -_0224A588: .word 0x00000496 -_0224A58C: .word 0x020F2DAC -_0224A590: .word 0x0000219C -_0224A594: .word 0x0000FFFF -_0224A598: .word 0x00000498 -_0224A59C: .word 0x0000035B -_0224A5A0: - add r0, sp, #0x78 - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - add r2, sp, #0x78 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x1e - str r0, [r4, #0x34] - mov r0, #0x1a - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A5C8: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0224A5DE - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - beq _0224A5E0 -_0224A5DE: - b _0224A716 -_0224A5E0: - mov r1, #0xd7 - lsl r1, r1, #2 - add r0, sp, #0x2c - strh r1, [r0, #0x2a] - mov r1, #0 - add r0, sp, #0x54 - strb r1, [r0, #1] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - add r2, sp, #0x54 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x1e - str r0, [r4, #0x34] - mov r0, #0x1b - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A60E: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0224A716 - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _0224A716 - mov r0, #0x5e - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #2 - str r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x10] - bl sub_0200DA58 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_0224A63E: - ldr r0, [r4, #0] - ldr r2, [r4, #0x2c] - add r1, r7, #0 - mov r3, #1 - bl ov16_02264CE8 - mov r0, #0x1d - str r0, [r4, #0x28] - mov r0, #2 - add sp, #0x158 - str r0, [r4, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_0224A656: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _0224A716 - ldr r0, [r4, #8] - bl ov12_0223783C - mov r0, #0x1e - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A66C: - add r0, r6, #0 - bl ov16_02251FC8 - cmp r0, #0 - beq _0224A716 - ldr r1, [r4, #0x38] - ldr r0, _0224A71C ; =0x0000035F - add r1, r1, r0 - add r0, sp, #0x2c - strh r1, [r0, #6] - mov r1, #0 - strb r1, [r0, #5] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - add r2, sp, #0x30 - bl ov16_0223FB24 - str r0, [r4, #0x30] - mov r0, #0x1e - str r0, [r4, #0x34] - mov r0, #0x1f - add sp, #0x158 - str r0, [r4, #0x28] - pop {r3, r4, r5, r6, r7, pc} -_0224A6A4: - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0224A716 - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bne _0224A716 - mov r0, #0x5e - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #2 - str r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x10] - bl sub_0200DA58 - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} -_0224A6D4: - add r0, r5, #0 - bl sub_0200384C - cmp r0, #0 - bne _0224A716 - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #6 - lsl r1, r1, #8 - tst r0, r1 - beq _0224A6F8 - ldr r0, [r4, #8] - bl ov12_0223783C - ldr r0, [sp, #0x24] - bl sub_02007DD4 -_0224A6F8: - ldr r1, [r4, #0] - ldr r0, _0224A720 ; =0x00002420 - mov r2, #4 - strb r2, [r1, r0] - mov r0, #0x5e - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #2 - str r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x10] - bl sub_0200DA58 -_0224A716: - add sp, #0x158 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224A71C: .word 0x0000035F -_0224A720: .word 0x00002420 - thumb_func_end ov16_02249B80 - - thumb_func_start ov16_0224A724 -ov16_0224A724: ; 0x0224A724 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r4, r1, #0 - bl ov16_0223DF0C - mov r1, #6 - lsl r1, r1, #8 - tst r0, r1 - beq _0224A73E - add sp, #8 - mov r0, #4 - pop {r3, r4, r5, r6, r7, pc} -_0224A73E: - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r4, #0x6c] - cmp r0, #5 - bne _0224A776 - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r1, r0] - mov r1, #8 - bl sub_020759F0 - ldr r1, _0224A954 ; =0x0000311C - ldr r2, _0224A958 ; =0x0226E638 - ldrb r1, [r4, r1] - lsl r1, r1, #1 - ldrb r2, [r2, r1] - mul r2, r0 - add r0, r2, #0 - ldr r2, _0224A95C ; =0x0226E639 - ldrb r1, [r2, r1] - bl sub_020E2178 - str r0, [sp] - b _0224A78A -_0224A776: - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r1, r0] - mov r1, #8 - bl sub_020759F0 - str r0, [sp] -_0224A78A: - ldr r1, [r4, #0x6c] - add r0, r4, #0 - mov r2, #0x1b - mov r3, #0 - mov r5, #0xa - bl ov16_02252060 - add r7, r0, #0 - ldr r1, [r4, #0x6c] - add r0, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - add r1, r0, #0 - mov r0, #0x4a - lsl r0, r0, #2 - ldr r2, [r4, r0] - cmp r2, #5 - ble _0224A878 - cmp r2, #0xf - bhi _0224A87E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224A7C2: ; jump table - .short _0224A87E - _0224A7C2 - 2 ; case 0 - .short _0224A87E - _0224A7C2 - 2 ; case 1 - .short _0224A87E - _0224A7C2 - 2 ; case 2 - .short _0224A87E - _0224A7C2 - 2 ; case 3 - .short _0224A87E - _0224A7C2 - 2 ; case 4 - .short _0224A87E - _0224A7C2 - 2 ; case 5 - .short _0224A7E2 - _0224A7C2 - 2 ; case 6 - .short _0224A7F6 - _0224A7C2 - 2 ; case 7 - .short _0224A804 - _0224A7C2 - 2 ; case 8 - .short _0224A820 - _0224A7C2 - 2 ; case 9 - .short _0224A83C - _0224A7C2 - 2 ; case 10 - .short _0224A87E - _0224A7C2 - 2 ; case 11 - .short _0224A87E - _0224A7C2 - 2 ; case 12 - .short _0224A84A - _0224A7C2 - 2 ; case 13 - .short _0224A87E - _0224A7C2 - 2 ; case 14 - .short _0224A86C - _0224A7C2 - 2 ; case 15 -_0224A7E2: - cmp r7, #0xb - beq _0224A7F2 - cmp r1, #0xb - beq _0224A7F2 - cmp r7, #6 - beq _0224A7F2 - cmp r1, #6 - bne _0224A87E -_0224A7F2: - mov r5, #0x1e - b _0224A87E -_0224A7F6: - add r0, r6, #0 - bl ov16_0223E22C - cmp r0, #7 - bne _0224A87E - mov r5, #0x23 - b _0224A87E -_0224A804: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224A960 ; =0x00002D74 - ldrb r1, [r1, r0] - cmp r1, #0x28 - bhs _0224A87E - mov r0, #0x28 - sub r5, r0, r1 - cmp r5, #0xa - bhs _0224A87E - mov r5, #0xa - b _0224A87E -_0224A820: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - mov r1, #0xb5 - lsl r1, r1, #6 - ldrh r1, [r2, r1] - add r0, r6, #0 - bl ov16_0223F9E0 - cmp r0, #1 - bne _0224A87E - mov r5, #0x1e - b _0224A87E -_0224A83C: - add r0, #0x28 - ldr r5, [r4, r0] - add r5, #0xa - cmp r5, #0x28 - bls _0224A87E - mov r5, #0x28 - b _0224A87E -_0224A84A: - add r0, r6, #0 - bl ov16_0223EBF8 - cmp r0, #3 - beq _0224A868 - add r0, r6, #0 - bl ov16_0223EBF8 - cmp r0, #4 - beq _0224A868 - add r0, r6, #0 - bl ov16_0223E22C - cmp r0, #5 - bne _0224A87E -_0224A868: - mov r5, #0x23 - b _0224A87E -_0224A86C: - add r0, #0x28 - ldr r0, [r4, r0] - cmp r0, #1 - bge _0224A87E - mov r5, #0x28 - b _0224A87E -_0224A878: - ldr r0, _0224A964 ; =0x0226E570 - sub r1, r2, #2 - ldrb r5, [r0, r1] -_0224A87E: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - add r7, r1, #0 - mul r7, r0 - ldr r0, _0224A968 ; =0x00002D90 - add r1, r4, r7 - ldr r1, [r1, r0] - lsl r0, r1, #1 - add r0, r1, r0 - ldr r1, [sp] - str r0, [sp, #4] - add r0, r1, #0 - mul r0, r5 - mov r1, #0xa - bl sub_020E2178 - ldr r1, _0224A96C ; =0x00002D8C - add r2, r4, r7 - ldr r1, [r2, r1] - lsl r2, r1, #1 - ldr r1, [sp, #4] - sub r1, r1, r2 - mul r1, r0 - add r0, r1, #0 - ldr r1, [sp, #4] - bl sub_020E2178 - add r1, r0, #0 - ldr r0, _0224A970 ; =0x00002DAC - add r2, r4, r7 - ldr r2, [r2, r0] - mov r0, #0x27 - tst r0, r2 - beq _0224A8C4 - lsl r1, r1, #1 -_0224A8C4: - mov r0, #0xd8 - tst r0, r2 - beq _0224A8D6 - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E2178 - add r1, r0, #0 -_0224A8D6: - cmp r1, #0xff - blo _0224A8DE - mov r5, #4 - b _0224A94E -_0224A8DE: - ldr r0, _0224A974 ; =0x040002B0 - mov r2, #0 - strh r2, [r0] - mov r0, #0xff - lsl r0, r0, #0x10 - bl sub_020E2178 - ldr r1, _0224A978 ; =0x040002B8 - add r2, r1, #0 - str r0, [r1, #0] - sub r2, #8 - lsr r0, r1, #0xb -_0224A8F6: - ldrh r1, [r2] - tst r1, r0 - bne _0224A8F6 - ldr r0, _0224A974 ; =0x040002B0 - lsr r1, r0, #0xb -_0224A900: - ldrh r2, [r0] - tst r2, r1 - bne _0224A900 - ldr r3, _0224A97C ; =0x040002B4 - mov r1, #0 - ldr r2, [r3, #0] - strh r1, [r0] - str r2, [r3, #4] - sub r2, r3, #4 - lsr r0, r3, #0xb -_0224A914: - ldrh r1, [r2] - tst r1, r0 - bne _0224A914 - ldr r2, _0224A974 ; =0x040002B0 - lsr r0, r2, #0xb -_0224A91E: - ldrh r1, [r2] - tst r1, r0 - bne _0224A91E - ldr r1, _0224A97C ; =0x040002B4 - ldr r0, _0224A980 ; =0x000FFFF0 - ldr r1, [r1, #0] - bl sub_020E2178 - add r7, r0, #0 - mov r5, #0 -_0224A932: - add r0, r6, #0 - bl ov16_0223F4BC - cmp r0, r7 - bhs _0224A942 - add r5, r5, #1 - cmp r5, #4 - blt _0224A932 -_0224A942: - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #1 - bne _0224A94E - mov r5, #4 -_0224A94E: - add r0, r5, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A954: .word 0x0000311C -_0224A958: .word 0x0226E638 -_0224A95C: .word 0x0226E639 -_0224A960: .word 0x00002D74 -_0224A964: .word 0x0226E570 -_0224A968: .word 0x00002D90 -_0224A96C: .word 0x00002D8C -_0224A970: .word 0x00002DAC -_0224A974: .word 0x040002B0 -_0224A978: .word 0x040002B8 -_0224A97C: .word 0x040002B4 -_0224A980: .word 0x000FFFF0 - thumb_func_end ov16_0224A724 - - thumb_func_start ov16_0224A984 -ov16_0224A984: ; 0x0224A984 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r0, #0 - add r6, r1, #0 - cmp r2, #0x16 - bgt _0224A9CE - cmp r2, #0 - blt _0224A9D4 - add r1, r2, r2 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224A9A0: ; jump table - .short _0224A9D4 - _0224A9A0 - 2 ; case 0 - .short _0224A9D4 - _0224A9A0 - 2 ; case 1 - .short _0224A9D8 - _0224A9A0 - 2 ; case 2 - .short _0224AA74 - _0224A9A0 - 2 ; case 3 - .short _0224A9F0 - _0224A9A0 - 2 ; case 4 - .short _0224A9DC - _0224A9A0 - 2 ; case 5 - .short _0224A9E0 - _0224A9A0 - 2 ; case 6 - .short _0224A9E4 - _0224A9A0 - 2 ; case 7 - .short _0224A9EA - _0224A9A0 - 2 ; case 8 - .short _0224AA9A - _0224A9A0 - 2 ; case 9 - .short _0224AA16 - _0224A9A0 - 2 ; case 10 - .short _0224AAC2 - _0224A9A0 - 2 ; case 11 - .short _0224AA3E - _0224A9A0 - 2 ; case 12 - .short _0224A9D4 - _0224A9A0 - 2 ; case 13 - .short _0224AAF8 - _0224A9A0 - 2 ; case 14 - .short _0224AB00 - _0224A9A0 - 2 ; case 15 - .short _0224AB08 - _0224A9A0 - 2 ; case 16 - .short _0224AB44 - _0224A9A0 - 2 ; case 17 - .short _0224A9D4 - _0224A9A0 - 2 ; case 18 - .short _0224AB80 - _0224A9A0 - 2 ; case 19 - .short _0224ABAA - _0224A9A0 - 2 ; case 20 - .short _0224ABD4 - _0224A9A0 - 2 ; case 21 - .short _0224A9E0 - _0224A9A0 - 2 ; case 22 -_0224A9CE: - cmp r2, #0xff - bne _0224A9D4 - b _0224ABD4 -_0224A9D4: - ldr r5, [r6, #0x64] - b _0224ABDA -_0224A9D8: - ldr r5, [r6, #0x6c] - b _0224ABDA -_0224A9DC: - ldr r5, [r6, #0x74] - b _0224ABDA -_0224A9E0: - ldr r5, [r6, #0x78] - b _0224ABDA -_0224A9E4: - add r6, #0x94 - ldr r5, [r6, #0] - b _0224ABDA -_0224A9EA: - add r6, #0x80 - ldr r5, [r6, #0] - b _0224ABDA -_0224A9F0: - bl ov16_0223DF1C - add r6, r0, #0 - mov r5, #0 - cmp r6, #0 - ble _0224AA14 - mov r7, #1 -_0224A9FE: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _0224ABE8 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - bne _0224AA14 - add r5, r5, #1 - cmp r5, r6 - blt _0224A9FE -_0224AA14: - b _0224ABDA -_0224AA16: - bl ov16_0223DF1C - add r6, r0, #0 - mov r5, #0 - cmp r6, #0 - ble _0224AA3C - ldr r7, _0224ABE8 ; =0x00000195 -_0224AA24: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #3 - beq _0224AA3C - cmp r0, #1 - beq _0224AA3C - add r5, r5, #1 - cmp r5, r6 - blt _0224AA24 -_0224AA3C: - b _0224ABDA -_0224AA3E: - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _0224AA4C - mov r6, #5 - b _0224AA4E -_0224AA4C: - mov r6, #1 -_0224AA4E: - add r0, r4, #0 - bl ov16_0223DF1C - add r7, r0, #0 - mov r5, #0 - cmp r7, #0 - ble _0224AA72 -_0224AA5C: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _0224ABE8 ; =0x00000195 - ldrb r0, [r0, r1] - cmp r0, r6 - beq _0224AA72 - add r5, r5, #1 - cmp r5, r7 - blt _0224AA5C -_0224AA72: - b _0224ABDA -_0224AA74: - bl ov16_0223DF1C - add r6, r0, #0 - mov r5, #0 - cmp r6, #0 - ble _0224AA98 - mov r7, #1 -_0224AA82: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _0224ABE8 ; =0x00000195 - ldrb r0, [r0, r1] - tst r0, r7 - beq _0224AA98 - add r5, r5, #1 - cmp r5, r6 - blt _0224AA82 -_0224AA98: - b _0224ABDA -_0224AA9A: - bl ov16_0223DF1C - add r6, r0, #0 - mov r5, #0 - cmp r6, #0 - ble _0224AAC0 - ldr r7, _0224ABE8 ; =0x00000195 -_0224AAA8: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldrb r0, [r0, r7] - cmp r0, #2 - beq _0224AAC0 - cmp r0, #0 - beq _0224AAC0 - add r5, r5, #1 - cmp r5, r6 - blt _0224AAA8 -_0224AAC0: - b _0224ABDA -_0224AAC2: - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _0224AAD0 - mov r6, #4 - b _0224AAD2 -_0224AAD0: - mov r6, #0 -_0224AAD2: - add r0, r4, #0 - bl ov16_0223DF1C - add r7, r0, #0 - mov r5, #0 - cmp r7, #0 - ble _0224ABDA -_0224AAE0: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223DF14 - ldr r1, _0224ABE8 ; =0x00000195 - ldrb r0, [r0, r1] - cmp r0, r6 - beq _0224ABDA - add r5, r5, #1 - cmp r5, r7 - blt _0224AAE0 - b _0224ABDA -_0224AAF8: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r5, [r6, r0] - b _0224ABDA -_0224AB00: - mov r0, #0x12 - lsl r0, r0, #4 - ldr r5, [r6, r0] - b _0224ABDA -_0224AB08: - bl ov16_0223DF1C - mov r5, #0 - str r0, [sp, #4] - cmp r0, #0 - ble _0224AB3A -_0224AB14: - ldr r7, [r6, #0x64] - cmp r5, r7 - beq _0224AB32 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223E208 - str r0, [sp, #8] - add r0, r4, #0 - add r1, r7, #0 - bl ov16_0223E208 - ldr r1, [sp, #8] - cmp r1, r0 - beq _0224AB3A -_0224AB32: - ldr r0, [sp, #4] - add r5, r5, #1 - cmp r5, r0 - blt _0224AB14 -_0224AB3A: - ldr r0, [sp, #4] - cmp r5, r0 - bne _0224ABDA - mov r5, #0 - b _0224ABDA -_0224AB44: - bl ov16_0223DF1C - mov r5, #0 - str r0, [sp] - cmp r0, #0 - ble _0224AB76 -_0224AB50: - ldr r7, [r6, #0x6c] - cmp r5, r7 - beq _0224AB6E - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223E208 - str r0, [sp, #0xc] - add r0, r4, #0 - add r1, r7, #0 - bl ov16_0223E208 - ldr r1, [sp, #0xc] - cmp r1, r0 - beq _0224AB76 -_0224AB6E: - ldr r0, [sp] - add r5, r5, #1 - cmp r5, r0 - blt _0224AB50 -_0224AB76: - ldr r0, [sp] - cmp r5, r0 - bne _0224ABDA - mov r5, #0 - b _0224ABDA -_0224AB80: - bl ov16_0223DF1C - add r7, r0, #0 - ldr r1, [r6, #0x64] - add r0, r4, #0 - bl ov16_0223E208 - add r6, r0, #0 - mov r5, #0 - cmp r7, #0 - ble _0224ABDA -_0224AB96: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223E208 - cmp r6, r0 - bne _0224ABDA - add r5, r5, #1 - cmp r5, r7 - blt _0224AB96 - b _0224ABDA -_0224ABAA: - bl ov16_0223DF1C - add r7, r0, #0 - ldr r1, [r6, #0x6c] - add r0, r4, #0 - bl ov16_0223E208 - add r6, r0, #0 - mov r5, #0 - cmp r7, #0 - ble _0224ABDA -_0224ABC0: - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0223E208 - cmp r6, r0 - bne _0224ABDA - add r5, r5, #1 - cmp r5, r7 - blt _0224ABC0 - b _0224ABDA -_0224ABD4: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r5, [r6, r0] -_0224ABDA: - cmp r5, #0xff - bne _0224ABE2 - bl sub_02022974 -_0224ABE2: - add r0, r5, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224ABE8: .word 0x00000195 - thumb_func_end ov16_0224A984 - - thumb_func_start ov16_0224ABEC -ov16_0224ABEC: ; 0x0224ABEC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r4, r1, #0 - mov r6, #0 - bl ov16_02248AD0 - str r0, [r4, #0] - add r0, r7, #0 - bl ov16_02248AD0 - str r0, [r4, #4] - cmp r0, #0x3c - bhi _0224ACA0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224AC12: ; jump table - .short _0224AC8C - _0224AC12 - 2 ; case 0 - .short _0224AC8E - _0224AC12 - 2 ; case 1 - .short _0224AC8E - _0224AC12 - 2 ; case 2 - .short _0224AC8E - _0224AC12 - 2 ; case 3 - .short _0224AC8E - _0224AC12 - 2 ; case 4 - .short _0224AC8E - _0224AC12 - 2 ; case 5 - .short _0224AC8E - _0224AC12 - 2 ; case 6 - .short _0224AC8E - _0224AC12 - 2 ; case 7 - .short _0224AC8E - _0224AC12 - 2 ; case 8 - .short _0224AC92 - _0224AC12 - 2 ; case 9 - .short _0224AC92 - _0224AC12 - 2 ; case 10 - .short _0224AC92 - _0224AC12 - 2 ; case 11 - .short _0224AC92 - _0224AC12 - 2 ; case 12 - .short _0224AC92 - _0224AC12 - 2 ; case 13 - .short _0224AC92 - _0224AC12 - 2 ; case 14 - .short _0224AC92 - _0224AC12 - 2 ; case 15 - .short _0224AC92 - _0224AC12 - 2 ; case 16 - .short _0224AC92 - _0224AC12 - 2 ; case 17 - .short _0224AC92 - _0224AC12 - 2 ; case 18 - .short _0224AC92 - _0224AC12 - 2 ; case 19 - .short _0224AC92 - _0224AC12 - 2 ; case 20 - .short _0224AC92 - _0224AC12 - 2 ; case 21 - .short _0224AC92 - _0224AC12 - 2 ; case 22 - .short _0224AC92 - _0224AC12 - 2 ; case 23 - .short _0224AC92 - _0224AC12 - 2 ; case 24 - .short _0224AC92 - _0224AC12 - 2 ; case 25 - .short _0224AC92 - _0224AC12 - 2 ; case 26 - .short _0224AC92 - _0224AC12 - 2 ; case 27 - .short _0224AC92 - _0224AC12 - 2 ; case 28 - .short _0224AC92 - _0224AC12 - 2 ; case 29 - .short _0224AC92 - _0224AC12 - 2 ; case 30 - .short _0224AC96 - _0224AC12 - 2 ; case 31 - .short _0224AC96 - _0224AC12 - 2 ; case 32 - .short _0224AC96 - _0224AC12 - 2 ; case 33 - .short _0224AC96 - _0224AC12 - 2 ; case 34 - .short _0224AC96 - _0224AC12 - 2 ; case 35 - .short _0224AC96 - _0224AC12 - 2 ; case 36 - .short _0224AC96 - _0224AC12 - 2 ; case 37 - .short _0224AC96 - _0224AC12 - 2 ; case 38 - .short _0224AC96 - _0224AC12 - 2 ; case 39 - .short _0224AC96 - _0224AC12 - 2 ; case 40 - .short _0224AC96 - _0224AC12 - 2 ; case 41 - .short _0224AC96 - _0224AC12 - 2 ; case 42 - .short _0224AC96 - _0224AC12 - 2 ; case 43 - .short _0224AC96 - _0224AC12 - 2 ; case 44 - .short _0224AC96 - _0224AC12 - 2 ; case 45 - .short _0224AC96 - _0224AC12 - 2 ; case 46 - .short _0224AC96 - _0224AC12 - 2 ; case 47 - .short _0224AC96 - _0224AC12 - 2 ; case 48 - .short _0224AC96 - _0224AC12 - 2 ; case 49 - .short _0224AC96 - _0224AC12 - 2 ; case 50 - .short _0224AC96 - _0224AC12 - 2 ; case 51 - .short _0224AC9A - _0224AC12 - 2 ; case 52 - .short _0224AC9A - _0224AC12 - 2 ; case 53 - .short _0224AC9A - _0224AC12 - 2 ; case 54 - .short _0224AC9A - _0224AC12 - 2 ; case 55 - .short _0224AC9A - _0224AC12 - 2 ; case 56 - .short _0224AC9A - _0224AC12 - 2 ; case 57 - .short _0224AC9A - _0224AC12 - 2 ; case 58 - .short _0224AC9A - _0224AC12 - 2 ; case 59 - .short _0224AC9E - _0224AC12 - 2 ; case 60 -_0224AC8C: - b _0224ACA0 -_0224AC8E: - mov r6, #1 - b _0224ACA0 -_0224AC92: - mov r6, #2 - b _0224ACA0 -_0224AC96: - mov r6, #3 - b _0224ACA0 -_0224AC9A: - mov r6, #4 - b _0224ACA0 -_0224AC9E: - mov r6, #6 -_0224ACA0: - mov r5, #0 - cmp r6, #0 - ble _0224ACB6 -_0224ACA6: - add r0, r7, #0 - bl ov16_02248AD0 - str r0, [r4, #8] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, r6 - blt _0224ACA6 -_0224ACB6: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0224ABEC - - thumb_func_start ov16_0224ACB8 -ov16_0224ACB8: ; 0x0224ACB8 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - ldr r2, [r4, #0] - add r5, r3, #0 - strh r2, [r5, #2] - ldr r2, [r4, #4] - add r7, r0, #0 - strb r2, [r5, #1] - ldrb r2, [r5, #1] - add r6, r1, #0 - cmp r2, #0x3c - bls _0224ACD2 - b _0224B3B4 -_0224ACD2: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224ACDE: ; jump table - .short _0224B3B4 - _0224ACDE - 2 ; case 0 - .short _0224AD58 - _0224ACDE - 2 ; case 1 - .short _0224AD62 - _0224ACDE - 2 ; case 2 - .short _0224AD6C - _0224ACDE - 2 ; case 3 - .short _0224AD78 - _0224ACDE - 2 ; case 4 - .short _0224AD84 - _0224ACDE - 2 ; case 5 - .short _0224AD90 - _0224ACDE - 2 ; case 6 - .short _0224AD90 - _0224ACDE - 2 ; case 7 - .short _0224AD9C - _0224ACDE - 2 ; case 8 - .short _0224ADA6 - _0224ACDE - 2 ; case 9 - .short _0224ADBC - _0224ACDE - 2 ; case 10 - .short _0224ADD0 - _0224ACDE - 2 ; case 11 - .short _0224ADE6 - _0224ACDE - 2 ; case 12 - .short _0224ADFA - _0224ACDE - 2 ; case 13 - .short _0224AE0E - _0224ACDE - 2 ; case 14 - .short _0224AE24 - _0224ACDE - 2 ; case 15 - .short _0224AE38 - _0224ACDE - 2 ; case 16 - .short _0224AE4C - _0224ACDE - 2 ; case 17 - .short _0224AE60 - _0224ACDE - 2 ; case 18 - .short _0224AE76 - _0224ACDE - 2 ; case 19 - .short _0224AE84 - _0224ACDE - 2 ; case 20 - .short _0224AE9C - _0224ACDE - 2 ; case 21 - .short _0224AEB4 - _0224ACDE - 2 ; case 22 - .short _0224AECA - _0224ACDE - 2 ; case 23 - .short _0224AEE0 - _0224ACDE - 2 ; case 24 - .short _0224AEF6 - _0224ACDE - 2 ; case 25 - .short _0224AF0C - _0224ACDE - 2 ; case 26 - .short _0224AF22 - _0224ACDE - 2 ; case 27 - .short _0224AF38 - _0224ACDE - 2 ; case 28 - .short _0224AF4C - _0224ACDE - 2 ; case 29 - .short _0224AF60 - _0224ACDE - 2 ; case 30 - .short _0224AF76 - _0224ACDE - 2 ; case 31 - .short _0224AF96 - _0224ACDE - 2 ; case 32 - .short _0224AFB8 - _0224ACDE - 2 ; case 33 - .short _0224AFD8 - _0224ACDE - 2 ; case 34 - .short _0224AFF6 - _0224ACDE - 2 ; case 35 - .short _0224B014 - _0224ACDE - 2 ; case 36 - .short _0224B036 - _0224ACDE - 2 ; case 37 - .short _0224B056 - _0224ACDE - 2 ; case 38 - .short _0224B076 - _0224ACDE - 2 ; case 39 - .short _0224B096 - _0224ACDE - 2 ; case 40 - .short _0224B0B6 - _0224ACDE - 2 ; case 41 - .short _0224B0D6 - _0224ACDE - 2 ; case 42 - .short _0224B0F6 - _0224ACDE - 2 ; case 43 - .short _0224B116 - _0224ACDE - 2 ; case 44 - .short _0224B134 - _0224ACDE - 2 ; case 45 - .short _0224B152 - _0224ACDE - 2 ; case 46 - .short _0224B170 - _0224ACDE - 2 ; case 47 - .short _0224B182 - _0224ACDE - 2 ; case 48 - .short _0224B1A4 - _0224ACDE - 2 ; case 49 - .short _0224B1C6 - _0224ACDE - 2 ; case 50 - .short _0224B1E8 - _0224ACDE - 2 ; case 51 - .short _0224B208 - _0224ACDE - 2 ; case 52 - .short _0224B234 - _0224ACDE - 2 ; case 53 - .short _0224B262 - _0224ACDE - 2 ; case 54 - .short _0224B28E - _0224ACDE - 2 ; case 55 - .short _0224B2B8 - _0224ACDE - 2 ; case 56 - .short _0224B2E6 - _0224ACDE - 2 ; case 57 - .short _0224B314 - _0224ACDE - 2 ; case 58 - .short _0224B342 - _0224ACDE - 2 ; case 59 - .short _0224B370 - _0224ACDE - 2 ; case 60 -_0224AD58: - ldr r2, [r4, #8] - bl ov16_0224A984 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224AD62: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224AD6C: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224AD78: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B4C8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224AD84: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224AD90: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224AD9C: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0224ADA6: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224ADBC: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224ADD0: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224ADE6: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B4C8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224ADFA: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B488 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE0E: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B4E0 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE24: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE38: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B4F8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE4C: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE60: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE76: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r0, [r4, #0xc] - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE84: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224A984 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AE9C: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AEB4: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AECA: - ldr r2, [r4, #8] - bl ov16_0224B494 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AEE0: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AEF6: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AF0C: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AF22: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AF38: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AF4C: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AF60: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224AF76: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224AF96: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224AFB8: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224AFD8: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224AFF6: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B014: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B036: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B056: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B076: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B4C8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B096: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B488 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B0B6: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B4D4 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B0D6: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B47C - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B0F6: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B116: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B134: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B4C8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B152: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B4D4 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B170: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r0, [r4, #0xc] - str r0, [r5, #8] - ldr r0, [r4, #0x10] - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B182: - ldr r1, [r4, #8] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B504 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B1A4: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B1C6: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B1E8: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224B208: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r1, [r4, #0x14] - add r0, r6, #0 - bl ov16_0224B3E8 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B234: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r2, [r4, #0x14] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B262: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B494 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r1, [r4, #0x14] - add r0, r6, #0 - bl ov16_0224B4C8 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B28E: - ldr r2, [r4, #8] - bl ov16_0224B3B8 - str r0, [r5, #4] - ldr r1, [r4, #0xc] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r1, [r4, #0x14] - add r0, r6, #0 - bl ov16_0224B404 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B2B8: - ldr r2, [r4, #8] - bl ov16_0224B518 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #0xc] - ldr r2, [r4, #0x14] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B2E6: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r2, [r4, #0x14] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B314: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r2, [r4, #0x14] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B342: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B510 - str r0, [r5, #0xc] - ldr r2, [r4, #0x14] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224B370: - ldr r2, [r4, #8] - bl ov16_0224B510 - str r0, [r5, #4] - ldr r2, [r4, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #8] - ldr r2, [r4, #0x10] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0xc] - ldr r2, [r4, #0x14] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B510 - str r0, [r5, #0x10] - ldr r2, [r4, #0x18] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B518 - str r0, [r5, #0x14] - ldr r2, [r4, #0x1c] - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0224B3B8 - str r0, [r5, #0x18] -_0224B3B4: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224ACB8 - - thumb_func_start ov16_0224B3B8 -ov16_0224B3B8: ; 0x0224B3B8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - bl ov16_0224A984 - cmp r4, #0x16 - bne _0224B3D2 - ldr r1, _0224B3E0 ; =0x000021A0 - add r2, r5, r0 - ldrb r1, [r2, r1] - lsl r1, r1, #8 - orr r0, r1 - pop {r3, r4, r5, pc} -_0224B3D2: - ldr r1, _0224B3E4 ; =0x0000219C - add r2, r5, r0 - ldrb r1, [r2, r1] - lsl r1, r1, #8 - orr r0, r1 - pop {r3, r4, r5, pc} - nop -_0224B3E0: .word 0x000021A0 -_0224B3E4: .word 0x0000219C - thumb_func_end ov16_0224B3B8 - - thumb_func_start ov16_0224B3E8 -ov16_0224B3E8: ; 0x0224B3E8 - cmp r1, #1 - beq _0224B3F2 - cmp r1, #0xff - beq _0224B3F8 - bx lr -_0224B3F2: - ldr r1, _0224B400 ; =0x00003044 - ldr r0, [r0, r1] - bx lr -_0224B3F8: - mov r1, #0x49 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_0224B400: .word 0x00003044 - thumb_func_end ov16_0224B3E8 - - thumb_func_start ov16_0224B404 -ov16_0224B404: ; 0x0224B404 - push {r4, lr} - cmp r1, #0x15 - bgt _0224B41C - bge _0224B452 - cmp r1, #2 - bgt _0224B474 - cmp r1, #1 - blt _0224B474 - beq _0224B422 - cmp r1, #2 - beq _0224B43A - b _0224B474 -_0224B41C: - cmp r1, #0xff - beq _0224B46E - b _0224B474 -_0224B422: - ldr r3, [r0, #0x64] - mov r1, #0xc0 - mul r1, r3 - add r2, r0, r1 - ldr r1, _0224B478 ; =0x00002DB8 - ldrh r4, [r2, r1] - lsl r1, r3, #0x18 - lsr r1, r1, #0x18 - add r2, r4, #0 - bl ov16_0224B934 - b _0224B474 -_0224B43A: - ldr r3, [r0, #0x6c] - mov r1, #0xc0 - mul r1, r3 - add r2, r0, r1 - ldr r1, _0224B478 ; =0x00002DB8 - ldrh r4, [r2, r1] - lsl r1, r3, #0x18 - lsr r1, r1, #0x18 - add r2, r4, #0 - bl ov16_0224B934 - b _0224B474 -_0224B452: - mov r1, #0x46 - lsl r1, r1, #2 - ldr r3, [r0, r1] - mov r1, #0xc0 - mul r1, r3 - add r2, r0, r1 - ldr r1, _0224B478 ; =0x00002DB8 - ldrh r4, [r2, r1] - lsl r1, r3, #0x18 - lsr r1, r1, #0x18 - add r2, r4, #0 - bl ov16_0224B934 - b _0224B474 -_0224B46E: - mov r1, #0x4a - lsl r1, r1, #2 - ldr r4, [r0, r1] -_0224B474: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 -_0224B478: .word 0x00002DB8 - thumb_func_end ov16_0224B404 - - thumb_func_start ov16_0224B47C -ov16_0224B47C: ; 0x0224B47C - cmp r1, #0xff - bne _0224B486 - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, r1] -_0224B486: - bx lr - thumb_func_end ov16_0224B47C - - thumb_func_start ov16_0224B488 -ov16_0224B488: ; 0x0224B488 - cmp r1, #0xff - bne _0224B492 - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, r1] -_0224B492: - bx lr - thumb_func_end ov16_0224B488 - - thumb_func_start ov16_0224B494 -ov16_0224B494: ; 0x0224B494 - push {r3, r4, r5, lr} - add r5, r1, #0 - cmp r2, #0xff - bne _0224B4A4 - mov r0, #0x4b - lsl r0, r0, #2 - ldr r4, [r5, r0] - b _0224B4C0 -_0224B4A4: - bl ov16_0224A984 - add r1, r0, #0 - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _0224B4C4 ; =0x00002D67 - lsl r1, r1, #0x18 - ldrb r4, [r2, r0] - add r0, r5, #0 - lsr r1, r1, #0x18 - add r2, r4, #0 - bl ov16_0224B928 -_0224B4C0: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B4C4: .word 0x00002D67 - thumb_func_end ov16_0224B494 - - thumb_func_start ov16_0224B4C8 -ov16_0224B4C8: ; 0x0224B4C8 - cmp r1, #0xff - bne _0224B4D2 - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, r1] -_0224B4D2: - bx lr - thumb_func_end ov16_0224B4C8 - - thumb_func_start ov16_0224B4D4 -ov16_0224B4D4: ; 0x0224B4D4 - cmp r1, #0xff - bne _0224B4DE - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, r1] -_0224B4DE: - bx lr - thumb_func_end ov16_0224B4D4 - - thumb_func_start ov16_0224B4E0 -ov16_0224B4E0: ; 0x0224B4E0 - push {r4, lr} - add r4, r1, #0 - bl ov16_0224A984 - ldr r1, _0224B4F4 ; =0x0000219C - add r2, r4, r0 - ldrb r1, [r2, r1] - lsl r1, r1, #8 - orr r0, r1 - pop {r4, pc} - ; .align 2, 0 -_0224B4F4: .word 0x0000219C - thumb_func_end ov16_0224B4E0 - - thumb_func_start ov16_0224B4F8 -ov16_0224B4F8: ; 0x0224B4F8 - cmp r1, #0xff - bne _0224B502 - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, r1] -_0224B502: - bx lr - thumb_func_end ov16_0224B4F8 - - thumb_func_start ov16_0224B504 -ov16_0224B504: ; 0x0224B504 - cmp r1, #0xff - bne _0224B50E - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, r1] -_0224B50E: - bx lr - thumb_func_end ov16_0224B504 - - thumb_func_start ov16_0224B510 -ov16_0224B510: ; 0x0224B510 - ldr r3, _0224B514 ; =ov16_0224A984 - bx r3 - ; .align 2, 0 -_0224B514: .word ov16_0224A984 - thumb_func_end ov16_0224B510 - - thumb_func_start ov16_0224B518 -ov16_0224B518: ; 0x0224B518 - ldr r3, _0224B51C ; =ov16_0224A984 - bx r3 - ; .align 2, 0 -_0224B51C: .word ov16_0224A984 - thumb_func_end ov16_0224B518 - - thumb_func_start ov16_0224B520 -ov16_0224B520: ; 0x0224B520 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x78 - add r7, r0, #0 - add r5, r1, #0 - str r2, [sp, #0x18] - bl ov16_0223E05C - str r0, [sp, #0x28] - add r0, r7, #0 - bl ov16_0223E0D4 - str r0, [sp, #0x20] - add r0, r7, #0 - bl ov16_0223E0D0 - str r0, [sp, #0x24] - add r0, r7, #0 - bl ov16_0223DF00 - str r0, [sp, #0x1c] - add r0, r7, #0 - bl ov16_0223E010 - add r6, r0, #0 - add r0, r7, #0 - bl ov16_0223E018 - add r4, r0, #0 - add r0, r7, #0 - bl ov16_0223E064 - add r7, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0224B7A0 ; =0x00004E35 - mov r3, #0x1b - str r0, [sp, #8] - add r2, r3, #0 - add r0, r6, #0 - add r1, r4, #0 - add r3, #0xe5 - bl sub_0200CBDC - mov r0, #0x1b - str r0, [sp] - mov r0, #0x52 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #2 - str r1, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0224B7A4 ; =0x00004E30 - add r2, r6, #0 - str r0, [sp, #0x14] - add r0, r7, #0 - add r3, r4, #0 - bl sub_0200CD7C - mov r0, #1 - str r0, [sp] - ldr r0, _0224B7A8 ; =0x00004E2D - mov r3, #0x1b - str r0, [sp, #4] - add r2, r3, #0 - add r0, r6, #0 - add r1, r4, #0 - add r3, #0xe6 - bl sub_0200CE0C - mov r0, #1 - str r0, [sp] - ldr r0, _0224B7A8 ; =0x00004E2D - mov r3, #0x1b - str r0, [sp, #4] - add r2, r3, #0 - add r0, r6, #0 - add r1, r4, #0 - add r3, #0xe7 - bl sub_0200CE3C - ldr r2, _0224B7AC ; =0x0226E6C4 - add r0, r6, #0 - add r1, r4, #0 - bl sub_0200CE6C - str r0, [r5, #0xc] - bl sub_0200D330 - ldr r0, [sp, #0x18] - bl sub_02079D80 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0224B7B0 ; =0x00004E36 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r6, #0 - mov r2, #0x13 - bl sub_0200D888 - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0224B7B4 ; =0x00004E31 - mov r1, #2 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CD7C - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0224B7B8 ; =0x00004E2E - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0224B7B8 ; =0x00004E2E - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x13 - bl sub_0200CE3C - ldr r2, _0224B7BC ; =0x0226E6F8 - add r0, r6, #0 - add r1, r4, #0 - bl sub_0200CE6C - str r0, [r5, #0x10] - ldr r0, [sp, #0x18] - bl sub_02079FC4 - add r1, r0, #0 - ldr r0, [r5, #0x10] - ldr r0, [r0, #0] - bl sub_02021F24 - ldr r0, [r5, #0x10] - bl sub_0200D330 - mov r0, #1 - mov r1, #5 - bl sub_02012744 - str r0, [r5, #0x50] - ldr r0, [sp, #0x18] - mov r1, #0xb0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0224B688 - mov r0, #2 - b _0224B692 -_0224B688: - ldr r0, [sp, #0x18] - mov r1, #0x6f - mov r2, #0 - bl sub_02074470 -_0224B692: - cmp r0, #0 - bne _0224B6A4 - mov r1, #0x3b - ldr r0, [sp, #0x28] - lsl r1, r1, #4 - bl sub_0200B1EC - add r6, r0, #0 - b _0224B6BE -_0224B6A4: - cmp r0, #1 - bne _0224B6B4 - ldr r0, [sp, #0x28] - ldr r1, _0224B7C0 ; =0x000003B1 - bl sub_0200B1EC - add r6, r0, #0 - b _0224B6BE -_0224B6B4: - ldr r0, [sp, #0x28] - ldr r1, _0224B7C4 ; =0x000003B2 - bl sub_0200B1EC - add r6, r0, #0 -_0224B6BE: - ldr r0, [sp, #0x18] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [sp, #0x24] - mov r1, #0 - bl sub_0200B5CC - ldr r0, [sp, #0x18] - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r1, #1 - ldr r0, [sp, #0x24] - mov r3, #3 - str r1, [sp, #4] - bl sub_0200B60C - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x20] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - add r0, sp, #0x68 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - add r1, sp, #0x68 - mov r2, #0xc - mov r3, #4 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0224B7C8 ; =0x00010200 - ldr r2, [sp, #0x20] - str r0, [sp, #8] - add r0, sp, #0x68 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, sp, #0x68 - mov r1, #1 - mov r2, #5 - bl sub_02012898 - mov r1, #1 - add r2, r1, #0 - add r3, sp, #0x5c - bl sub_0201ED94 - ldr r0, [r5, #0x50] - str r0, [sp, #0x2c] - add r0, sp, #0x68 - str r0, [sp, #0x30] - add r0, r4, #0 - bl sub_0200D9B0 - str r0, [sp, #0x34] - ldr r1, _0224B7A4 ; =0x00004E30 - add r0, r4, #0 - bl sub_0200D04C - mov r1, #0 - str r0, [sp, #0x38] - ldr r0, [sp, #0x60] - str r1, [sp, #0x3c] - str r0, [sp, #0x40] - mov r0, #0xb0 - str r0, [sp, #0x44] - mov r0, #8 - str r0, [sp, #0x48] - mov r0, #0x64 - str r0, [sp, #0x50] - mov r0, #1 - str r0, [sp, #0x54] - mov r0, #5 - str r0, [sp, #0x58] - add r0, sp, #0x2c - str r1, [sp, #0x4c] - bl sub_020127E8 - add r2, r5, #0 - add r3, sp, #0x5c - str r0, [r5, #0x14] - ldmia r3!, {r0, r1} - add r2, #0x18 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #1 - str r0, [r2, #0] - ldr r0, [r5, #0x14] - bl sub_02012AC0 - add r0, sp, #0x68 - bl sub_0201A8FC - add sp, #0x78 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B7A0: .word 0x00004E35 -_0224B7A4: .word 0x00004E30 -_0224B7A8: .word 0x00004E2D -_0224B7AC: .word 0x0226E6C4 -_0224B7B0: .word 0x00004E36 -_0224B7B4: .word 0x00004E31 -_0224B7B8: .word 0x00004E2E -_0224B7BC: .word 0x0226E6F8 -_0224B7C0: .word 0x000003B1 -_0224B7C4: .word 0x000003B2 -_0224B7C8: .word 0x00010200 - thumb_func_end ov16_0224B520 - - thumb_func_start ov16_0224B7CC -ov16_0224B7CC: ; 0x0224B7CC - push {r3, r4, r5, lr} - add r5, r1, #0 - bl ov16_0223E018 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0200D0F4 - ldr r0, [r5, #0x10] - bl sub_0200D0F4 - ldr r0, [r5, #0x14] - bl sub_02012870 - add r0, r5, #0 - add r0, #0x18 - bl sub_0201EE28 - ldr r1, _0224B838 ; =0x00004E35 - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0224B83C ; =0x00004E30 - add r0, r4, #0 - bl sub_0200D080 - ldr r1, _0224B840 ; =0x00004E2D - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224B840 ; =0x00004E2D - add r0, r4, #0 - bl sub_0200D0A0 - ldr r1, _0224B844 ; =0x00004E36 - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0224B848 ; =0x00004E31 - add r0, r4, #0 - bl sub_0200D080 - ldr r1, _0224B84C ; =0x00004E2E - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224B84C ; =0x00004E2E - add r0, r4, #0 - bl sub_0200D0A0 - ldr r0, [r5, #0x50] - bl sub_020127BC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B838: .word 0x00004E35 -_0224B83C: .word 0x00004E30 -_0224B840: .word 0x00004E2D -_0224B844: .word 0x00004E36 -_0224B848: .word 0x00004E31 -_0224B84C: .word 0x00004E2E - thumb_func_end ov16_0224B7CC - - thumb_func_start ov16_0224B850 -ov16_0224B850: ; 0x0224B850 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r1, r2, #0 - add r5, r0, #0 - str r2, [sp] - bl ov16_0223E208 - cmp r0, #0 - bne _0224B91C - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _0224B8A0 - add r0, r5, #0 - mov r1, #3 - bl ov16_0223E1C4 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - add r0, r5, #0 - mov r1, #5 - bl ov16_0223E1C4 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - mov r2, #0xc0 - add r0, r1, #0 - mul r0, r2 - mul r2, r6 - ldr r3, _0224B920 ; =0x00002D74 - add r0, r4, r0 - add r2, r4, r2 - ldrb r0, [r0, r3] - ldrb r2, [r2, r3] - cmp r0, r2 - bls _0224B8AC - add r6, r1, #0 - b _0224B8AC -_0224B8A0: - add r0, r5, #0 - mov r1, #1 - bl ov16_0223E1C4 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 -_0224B8AC: - ldr r1, [sp] - add r0, r5, #0 - add r2, r1, #0 - add r3, r4, r2 - ldr r2, _0224B924 ; =0x0000219C - ldrb r2, [r3, r2] - bl ov16_0223DFAC - add r7, r0, #0 - ldr r0, [sp] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - add r0, r4, r2 - ldr r2, _0224B920 ; =0x00002D74 - mul r1, r6 - add r1, r4, r1 - ldrb r0, [r0, r2] - ldrb r1, [r1, r2] - cmp r1, r0 - bls _0224B908 - sub r0, r1, r0 - cmp r0, #0x1e - blt _0224B8F2 - add r0, r5, #0 - bl ov16_0223E24C - add r2, r0, #0 - lsl r2, r2, #0x10 - add r0, r7, #0 - mov r1, #8 - lsr r2, r2, #0x10 - bl sub_02075C74 - pop {r3, r4, r5, r6, r7, pc} -_0224B8F2: - add r0, r5, #0 - bl ov16_0223E24C - add r2, r0, #0 - lsl r2, r2, #0x10 - add r0, r7, #0 - mov r1, #6 - lsr r2, r2, #0x10 - bl sub_02075C74 - pop {r3, r4, r5, r6, r7, pc} -_0224B908: - add r0, r5, #0 - bl ov16_0223E24C - add r2, r0, #0 - lsl r2, r2, #0x10 - add r0, r7, #0 - mov r1, #6 - lsr r2, r2, #0x10 - bl sub_02075C74 -_0224B91C: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B920: .word 0x00002D74 -_0224B924: .word 0x0000219C - thumb_func_end ov16_0224B850 - - thumb_func_start ov16_0224B928 -ov16_0224B928: ; 0x0224B928 - add r1, r0, r1 - mov r0, #0x39 - lsl r0, r0, #4 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_0224B928 - - thumb_func_start ov16_0224B934 -ov16_0224B934: ; 0x0224B934 - lsl r1, r1, #1 - add r1, r0, r1 - mov r0, #0xe5 - lsl r0, r0, #2 - strh r2, [r1, r0] - bx lr - thumb_func_end ov16_0224B934 - - thumb_func_start ov16_0224B940 -ov16_0224B940: ; 0x0224B940 - push {r3, r4, r5, lr} - ldr r1, _0224B984 ; =0x00003158 - add r5, r0, #0 - mov r0, #5 - bl sub_02018144 - add r4, r0, #0 - ldr r2, _0224B984 ; =0x00003158 - mov r0, #0 - add r1, r4, #0 - bl sub_020C4BB8 - add r0, r4, #0 - bl ov16_022541C4 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_022542B8 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02251604 - ldr r0, _0224B988 ; =0x000003DE - add r0, r4, r0 - bl sub_020790B0 - mov r0, #5 - bl sub_0207D388 - ldr r1, _0224B98C ; =0x00002120 - str r0, [r4, r1] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B984: .word 0x00003158 -_0224B988: .word 0x000003DE -_0224B98C: .word 0x00002120 - thumb_func_end ov16_0224B940 - - thumb_func_start ov16_0224B990 -ov16_0224B990: ; 0x0224B990 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, _0224B9D4 ; =0x0000311F - add r5, r0, #0 - ldrb r1, [r4, r1] - cmp r1, #0 - bne _0224B9B6 - bl ov16_0223F438 - cmp r0, #0 - beq _0224B9B6 - add r0, r5, #0 - bl ov16_0223F438 - mov r1, #0x40 - tst r0, r1 - bne _0224B9B6 - mov r0, #0x29 - str r0, [r4, #8] -_0224B9B6: - ldr r2, [r4, #8] - add r0, r5, #0 - lsl r3, r2, #2 - ldr r2, _0224B9D8 ; =0x0226EAEC - add r1, r4, #0 - ldr r2, [r2, r3] - blx r2 - ldr r0, [r4, #8] - cmp r0, #0x2c - bne _0224B9CE - mov r0, #1 - pop {r3, r4, r5, pc} -_0224B9CE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0224B9D4: .word 0x0000311F -_0224B9D8: .word 0x0226EAEC - thumb_func_end ov16_0224B990 - - thumb_func_start ov16_0224B9DC -ov16_0224B9DC: ; 0x0224B9DC - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224B9F0 ; =0x00002120 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 -_0224B9F0: .word 0x00002120 - thumb_func_end ov16_0224B9DC - - thumb_func_start ov16_0224B9F4 -ov16_0224B9F4: ; 0x0224B9F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r6, [sp, #0x20] - add r5, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - str r3, [sp, #4] - str r6, [sp] - bl ov16_0224EF20 - ldr r0, [sp, #0x20] - ldr r3, [sp, #4] - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov16_0224F274 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0224B9F4 - - thumb_func_start ov16_0224BA1C -ov16_0224BA1C: ; 0x0224BA1C - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r5, r1, #0 - bl ov16_0223DF1C - add r7, r0, #0 - mov r4, #0 - cmp r7, #0 - ble _0224BA44 -_0224BA2E: - ldr r3, _0224BA54 ; =0x0000219C - add r6, r5, r4 - ldrb r3, [r6, r3] - ldr r0, [sp] - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0225177C - add r4, r4, #1 - cmp r4, r7 - blt _0224BA2E -_0224BA44: - ldr r0, _0224BA58 ; =0x00002E4C - ldr r1, [r5, r0] - ldr r0, _0224BA5C ; =0x00003122 - strh r1, [r5, r0] - mov r0, #1 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} - nop -_0224BA54: .word 0x0000219C -_0224BA58: .word 0x00002E4C -_0224BA5C: .word 0x00003122 - thumb_func_end ov16_0224BA1C - - thumb_func_start ov16_0224BA60 -ov16_0224BA60: ; 0x0224BA60 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #2 - str r0, [r4, #0xc] - pop {r4, pc} - thumb_func_end ov16_0224BA60 - - thumb_func_start ov16_0224BA78 -ov16_0224BA78: ; 0x0224BA78 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_02253FCC - cmp r0, #0 - beq _0224BA9A - add r0, r4, #0 - mov r1, #1 - mov r2, #0x29 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #3 - str r0, [r4, #0xc] - b _0224BA9E -_0224BA9A: - mov r0, #3 - str r0, [r4, #8] -_0224BA9E: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255FBC - pop {r3, r4, r5, pc} - thumb_func_end ov16_0224BA78 - - thumb_func_start ov16_0224BAA8 -ov16_0224BAA8: ; 0x0224BAA8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_02256414 - add r2, r0, #0 - beq _0224BAC8 - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224BAC8: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255FBC - add r0, r5, #0 - bl ov16_0223F7E8 - mov r0, #4 - str r0, [r4, #8] - pop {r3, r4, r5, pc} - thumb_func_end ov16_0224BAA8 - - thumb_func_start ov16_0224BADC -ov16_0224BADC: ; 0x0224BADC - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r7, r1, #0 - bl ov16_0223DF1C - add r5, r0, #0 - mov r4, #0 - cmp r5, #0 - ble _0224BB0C - add r6, r7, #0 - add r2, r4, #0 -_0224BAF2: - mov r0, #0xb7 - strb r2, [r7, r4] - lsl r0, r0, #6 - ldr r1, [r6, r0] - add r0, r0, #4 - str r1, [r6, r0] - add r3, r7, r4 - ldr r0, _0224BB24 ; =0x0000314C - add r4, r4, #1 - strb r2, [r3, r0] - add r6, #0xc0 - cmp r4, r5 - blt _0224BAF2 -_0224BB0C: - ldr r0, [sp] - mov r1, #0 - bl ov16_0223F288 - ldr r0, [sp] - mov r1, #1 - bl ov16_0223B748 - mov r0, #5 - str r0, [r7, #8] - pop {r3, r4, r5, r6, r7, pc} - nop -_0224BB24: .word 0x0000314C - thumb_func_end ov16_0224BADC - - thumb_func_start ov16_0224BB28 -ov16_0224BB28: ; 0x0224BB28 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xa0 - add r7, r0, #0 - str r1, [sp, #0x1c] - bl ov16_0223DF1C - str r0, [sp, #0x64] - add r0, r7, #0 - bl ov16_0223DF0C - str r0, [sp, #0x28] - mov r4, #0 - ldr r0, [sp, #0x64] - str r4, [sp, #0x60] - cmp r0, #0 - bgt _0224BB4C - bl _0224C3E8 -_0224BB4C: - ldr r0, [sp, #0x1c] - mov r1, #0x75 - lsl r1, r1, #2 - str r0, [sp, #0x58] - add r0, r0, r1 - str r0, [sp, #0x54] - ldr r0, [sp, #0x1c] - ldr r1, _0224BE64 ; =0x000021AC - str r0, [sp, #0x50] - str r0, [sp, #0x4c] - str r0, [sp, #0x48] - add r0, r0, r1 - str r0, [sp, #0x44] - mov r1, #0x23 - ldr r0, [sp, #0x1c] - lsl r1, r1, #8 - add r0, r0, r1 - str r0, [sp, #0x40] - ldr r0, [sp, #0x28] - mov r1, #2 - and r0, r1 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x28] - mov r1, #8 - and r0, r1 - str r0, [sp, #0x38] - ldr r0, [sp, #0x28] - lsl r1, r1, #6 - and r0, r1 - str r0, [sp, #0x34] - ldr r0, [sp, #0x28] - mov r1, #0x20 - and r0, r1 - str r0, [sp, #0x30] - ldr r0, [sp, #0x28] - mov r1, #4 - and r0, r1 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - mov r1, #0x80 - and r0, r1 - str r0, [sp, #0x24] - ldr r0, [sp, #0x28] - mov r1, #1 - and r0, r1 - str r0, [sp, #0x20] -_0224BBA8: - ldr r0, [sp, #0x1c] - add r5, r0, r4 - ldrb r0, [r0, r4] - cmp r0, #0x11 - bls _0224BBB4 - b _0224C3AE -_0224BBB4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224BBC0: ; jump table - .short _0224BBE4 - _0224BBC0 - 2 ; case 0 - .short _0224BCC4 - _0224BBC0 - 2 ; case 1 - .short _0224BC80 - _0224BBC0 - 2 ; case 2 - .short _0224BF46 - _0224BBC0 - 2 ; case 3 - .short _0224BF54 - _0224BBC0 - 2 ; case 4 - .short _0224C03A - _0224BBC0 - 2 ; case 5 - .short _0224C074 - _0224BBC0 - 2 ; case 6 - .short _0224C0B2 - _0224BBC0 - 2 ; case 7 - .short _0224C0C0 - _0224BBC0 - 2 ; case 8 - .short _0224C0EE - _0224BBC0 - 2 ; case 9 - .short _0224C162 - _0224BBC0 - 2 ; case 10 - .short _0224C1C0 - _0224BBC0 - 2 ; case 11 - .short _0224C2B8 - _0224BBC0 - 2 ; case 12 - .short _0224C308 - _0224BBC0 - 2 ; case 13 - .short _0224C33C - _0224BBC0 - 2 ; case 14 - .short _0224C344 - _0224BBC0 - 2 ; case 15 - .short _0224C35E - _0224BBC0 - 2 ; case 16 - .short _0224C3A2 - _0224BBC0 - 2 ; case 17 -_0224BBE4: - ldr r0, [sp, #0x3c] - cmp r0, #0 - beq _0224BC08 - ldr r0, [sp, #0x38] - cmp r0, #0 - bne _0224BC08 - cmp r4, #2 - bne _0224BBFC - ldr r0, [sp, #0x1c] - ldrb r0, [r0] - cmp r0, #0xe - bne _0224BCF4 -_0224BBFC: - cmp r4, #3 - bne _0224BC08 - ldr r0, [sp, #0x1c] - ldrb r0, [r0, #1] - cmp r0, #0xe - bne _0224BCF4 -_0224BC08: - add r0, r4, #0 - bl sub_020787CC - ldr r2, _0224BE68 ; =0x00003108 - ldr r1, [sp, #0x1c] - ldrb r1, [r1, r2] - tst r0, r1 - beq _0224BC26 - mov r0, #0xd - strb r0, [r5] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x27 - str r2, [r0, r1] - b _0224C3AE -_0224BC26: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259A28 - cmp r0, #0 - bne _0224BC4A - ldr r0, [sp, #0x54] - mov r2, #0xd - ldr r1, [r0, #0] - mov r0, #2 - orr r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - strb r2, [r5] - str r2, [r0, r1] - b _0224C3AE -_0224BC4A: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223DF14 - bl ov16_02263AF0 - cmp r0, #1 - beq _0224BC66 - mov r1, #0x15 - ldr r0, [sp, #0x1c] - lsl r1, r1, #4 - ldr r0, [r0, r1] - cmp r0, #0 - beq _0224BC7A -_0224BC66: - ldr r3, _0224BE70 ; =0x0000219C - ldr r1, [sp, #0x1c] - ldrb r3, [r5, r3] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_02265330 - mov r0, #1 - strb r0, [r5] - b _0224C3AE -_0224BC7A: - mov r0, #2 - strb r0, [r5] - b _0224C3AE -_0224BC80: - ldr r0, [sp, #0x64] - mov r6, #0 - cmp r0, #0 - ble _0224BCAC -_0224BC88: - cmp r6, r4 - beq _0224BCA4 - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0223DF14 - bl ov16_02263AF0 - cmp r0, #1 - bne _0224BCA4 - ldr r0, [sp, #0x1c] - ldrb r0, [r0, r6] - cmp r0, #0xe - bne _0224BCAC -_0224BCA4: - ldr r0, [sp, #0x64] - add r6, r6, #1 - cmp r6, r0 - blt _0224BC88 -_0224BCAC: - ldr r0, [sp, #0x64] - cmp r6, r0 - bne _0224BCF4 - ldr r3, _0224BE70 ; =0x0000219C - ldr r1, [sp, #0x1c] - ldrb r3, [r5, r3] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_02265330 - mov r0, #1 - strb r0, [r5] -_0224BCC4: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _0224BCF4 - mov r1, #0x23 - ldr r0, [sp, #0x50] - lsl r1, r1, #8 - ldrb r2, [r0, r1] - ldr r1, _0224BE74 ; =0x000021B4 - ldr r0, [sp, #0x58] - str r2, [r0, r1] - ldr r0, [sp, #0x34] - cmp r0, #0 - beq _0224BD18 - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #1 - beq _0224BCF6 - cmp r0, #4 - beq _0224BD06 -_0224BCF4: - b _0224C3AE -_0224BCF6: - mov r0, #0x11 - strb r0, [r5] - mov r1, #0xd - strb r1, [r5, #4] - ldr r2, _0224BE6C ; =0x000021A8 - ldr r1, [sp, #0x58] - str r0, [r1, r2] - b _0224C3AE -_0224BD06: - mov r0, #0x11 - strb r0, [r5] - mov r0, #0xd - strb r0, [r5, #4] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x10 - str r2, [r0, r1] - b _0224C3AE -_0224BD18: - ldr r0, [sp, #0x30] - cmp r0, #0 - beq _0224BD9A - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #5 - bhi _0224BDDC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224BD36: ; jump table - .short _0224C3AE - _0224BD36 - 2 ; case 0 - .short _0224BD42 - _0224BD36 - 2 ; case 1 - .short _0224BD52 - _0224BD36 - 2 ; case 2 - .short _0224BD64 - _0224BD36 - 2 ; case 3 - .short _0224BD76 - _0224BD36 - 2 ; case 4 - .short _0224BD88 - _0224BD36 - 2 ; case 5 -_0224BD42: - mov r0, #0x11 - strb r0, [r5] - mov r1, #0xd - strb r1, [r5, #4] - ldr r2, _0224BE6C ; =0x000021A8 - ldr r1, [sp, #0x58] - str r0, [r1, r2] - b _0224C3AE -_0224BD52: - mov r0, #0x11 - strb r0, [r5] - mov r0, #0xd - strb r0, [r5, #4] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x12 - str r2, [r0, r1] - b _0224C3AE -_0224BD64: - mov r0, #0x11 - strb r0, [r5] - mov r0, #0xd - strb r0, [r5, #4] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x13 - str r2, [r0, r1] - b _0224C3AE -_0224BD76: - mov r0, #0x11 - strb r0, [r5] - mov r0, #0xd - strb r0, [r5, #4] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x10 - str r2, [r0, r1] - b _0224C3AE -_0224BD88: - mov r0, #0x11 - strb r0, [r5] - mov r0, #0xd - strb r0, [r5] - ldr r1, _0224BE6C ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x14 - str r2, [r0, r1] - b _0224C3AE -_0224BD9A: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0xff - beq _0224BDB0 - ldr r1, _0224BE78 ; =0x0000314C - mov r0, #1 - ldrb r2, [r5, r1] - orr r0, r2 - strb r0, [r5, r1] -_0224BDB0: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #4 - bgt _0224BDD6 - cmp r0, #0 - blt _0224BDDC - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224BDCC: ; jump table - .short _0224C3AE - _0224BDCC - 2 ; case 0 - .short _0224BDDE - _0224BDCC - 2 ; case 1 - .short _0224BE96 - _0224BDCC - 2 ; case 2 - .short _0224BEEC - _0224BDCC - 2 ; case 3 - .short _0224BEFA - _0224BDCC - 2 ; case 4 -_0224BDD6: - cmp r0, #0xff - bne _0224BDDC - b _0224BF08 -_0224BDDC: - b _0224C3AE -_0224BDDE: - mov r0, #0 - mvn r0, r0 - str r0, [sp] - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - mov r3, #0 - bl ov16_02254A6C - cmp r0, #0xf - bne _0224BE1E - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #1 - bic r1, r0 - mov r0, #1 - orr r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] - add r0, r7, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0224BE16 - mov r0, #0xd - strb r0, [r5] - b _0224BE8C -_0224BE16: - mov r0, #0x11 - strb r0, [r5] - strb r1, [r5, #4] - b _0224BE8C -_0224BE1E: - ldr r3, _0224BE7C ; =0x00002DEC - ldr r0, [sp, #0x4c] - ldrh r0, [r0, r3] - cmp r0, #0 - beq _0224BE88 - ldr r0, [sp, #0x4c] - add r1, r3, #2 - ldrh r2, [r0, r1] - ldr r1, _0224BE80 ; =0x000030BC - ldr r0, [sp, #0x48] - strh r2, [r0, r1] - ldr r0, [sp, #0x4c] - sub r1, #8 - ldrh r2, [r0, r3] - ldr r0, [sp, #0x48] - strh r2, [r0, r1] - ldr r1, _0224BE84 ; =0x000021B0 - ldr r0, [sp, #0x58] - mov r2, #0 - str r2, [r0, r1] - add r0, r7, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0224BE58 - mov r0, #0xd - strb r0, [r5] - b _0224BE8C -_0224BE58: - mov r0, #0x11 - strb r0, [r5] - mov r0, #0xd - strb r0, [r5, #4] - b _0224BE8C - nop -_0224BE64: .word 0x000021AC -_0224BE68: .word 0x00003108 -_0224BE6C: .word 0x000021A8 -_0224BE70: .word 0x0000219C -_0224BE74: .word 0x000021B4 -_0224BE78: .word 0x0000314C -_0224BE7C: .word 0x00002DEC -_0224BE80: .word 0x000030BC -_0224BE84: .word 0x000021B0 -_0224BE88: - mov r0, #3 - strb r0, [r5] -_0224BE8C: - ldr r1, _0224C1A4 ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0xd - str r2, [r0, r1] - b _0224C3AE -_0224BE96: - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #0x84 - tst r0, r1 - beq _0224BEDE - ldr r1, _0224C1A8 ; =0x00000251 - add r0, sp, #0x78 - strh r1, [r0, #6] - mov r1, #0 - strb r1, [r0, #5] - mov r0, sp - str r0, [sp, #0x68] - sub r0, #8 - str r0, [sp, #0x68] - add r2, sp, #0x7c - add r3, r0, #0 - mov r6, #4 -_0224BEBA: - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - sub r6, r6, #1 - bne _0224BEBA - ldr r0, [r2, #0] - add r1, r4, #0 - str r0, [r3, #0] - ldr r0, [sp, #0x68] - ldmia r0!, {r2, r3} - str r0, [sp, #0x68] - add r0, r7, #0 - bl ov16_02266168 - mov r0, #0xf - strb r0, [r5] - mov r0, #0 - strb r0, [r5, #4] - b _0224C3AE -_0224BEDE: - ldr r1, _0224C1A4 ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0xe - str r2, [r0, r1] - mov r0, #7 - strb r0, [r5] - b _0224C3AE -_0224BEEC: - ldr r1, _0224C1A4 ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0xf - str r2, [r0, r1] - mov r0, #9 - strb r0, [r5] - b _0224C3AE -_0224BEFA: - ldr r1, _0224C1A4 ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x10 - str r2, [r0, r1] - mov r0, #0xb - strb r0, [r5] - b _0224C3AE -_0224BF08: - ldr r0, [sp, #0x2c] - cmp r0, #0 - beq _0224BF2A - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0226647C - mov r0, #0 - strb r0, [r5] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E258 - ldr r1, [sp, #0x1c] - mov r2, #0 - strb r2, [r1, r0] - b _0224C3AE -_0224BF2A: - ldr r0, [sp, #0x3c] - cmp r0, #0 - beq _0224BF72 - cmp r4, #2 - bne _0224BF72 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0226647C - ldr r0, [sp, #0x1c] - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #2] - b _0224C3AE -_0224BF46: - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_022656F0 - mov r0, #4 - strb r0, [r5] -_0224BF54: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _0224BF66 - mov r0, #0 - strb r0, [r5] - b _0224C3AE -_0224BF66: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - bne _0224BF74 -_0224BF72: - b _0224C3AE -_0224BF74: - mov r1, #0x23 - ldr r0, [sp, #0x50] - lsl r1, r1, #8 - ldrb r0, [r0, r1] - sub r3, r0, #1 - cmp r3, #4 - bne _0224BF90 - ldr r1, _0224C1A4 ; =0x000021A8 - ldr r0, [sp, #0x58] - mov r2, #0x10 - str r2, [r0, r1] - mov r0, #0xb - strb r0, [r5] - b _0224C3AE -_0224BF90: - add r0, sp, #0x7c - str r0, [sp] - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_02254CA8 - cmp r0, #0 - bne _0224BFF8 - add r0, r7, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0224BFC6 - add r0, r7, #0 - mov r1, #1 - bl ov16_0223F720 - add r0, r7, #0 - bl ov16_0223DF10 - add r1, r0, #0 - add r0, r7, #0 - bl ov16_0225B444 - b _0224C3AE -_0224BFC6: - mov r0, sp - str r0, [sp, #0x6c] - sub r0, #8 - str r0, [sp, #0x6c] - add r2, sp, #0x7c - add r3, r0, #0 - mov r6, #4 -_0224BFD4: - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - sub r6, r6, #1 - bne _0224BFD4 - ldr r0, [r2, #0] - add r1, r4, #0 - str r0, [r3, #0] - ldr r0, [sp, #0x6c] - ldmia r0!, {r2, r3} - str r0, [sp, #0x6c] - add r0, r7, #0 - bl ov16_02266168 - mov r0, #0xf - strb r0, [r5] - mov r0, #3 - strb r0, [r5, #4] - b _0224C3AE -_0224BFF8: - mov r3, #0x23 - ldr r0, [sp, #0x50] - lsl r3, r3, #8 - ldrb r2, [r0, r3] - ldr r1, _0224C1AC ; =0x000021B0 - ldr r0, [sp, #0x58] - str r2, [r0, r1] - ldr r0, [sp, #0x50] - ldrb r0, [r0, r3] - ldr r3, _0224C1B0 ; =0x000030BC - sub r1, r0, #1 - ldr r0, [sp, #0x48] - strh r1, [r0, r3] - ldrh r0, [r0, r3] - lsl r1, r0, #1 - ldr r0, [sp, #0x4c] - add r1, r0, r1 - ldr r0, _0224C1B4 ; =0x00002D4C - ldrh r2, [r1, r0] - add r1, r3, #0 - ldr r0, [sp, #0x48] - sub r1, #8 - strh r2, [r0, r1] - mov r0, #5 - strb r0, [r5] - add r0, r3, #0 - add r0, #0x90 - ldrb r1, [r5, r0] - mov r0, #2 - add r3, #0x90 - orr r0, r1 - strb r0, [r5, r3] - b _0224C3AE -_0224C03A: - add r0, sp, #0x78 - str r0, [sp] - ldr r1, _0224C1B0 ; =0x000030BC - ldr r0, [sp, #0x48] - lsl r2, r4, #0x18 - ldrh r0, [r0, r1] - ldr r1, [sp, #0x1c] - ldr r3, [sp, #0x28] - str r0, [sp, #4] - ldr r0, [sp, #0x44] - lsr r2, r2, #0x18 - str r0, [sp, #8] - add r0, r7, #0 - bl ov16_02250DE4 - cmp r0, #0 - beq _0224C06E - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x78] - add r0, r7, #0 - add r3, r4, #0 - bl ov16_022657AC - mov r0, #6 - strb r0, [r5] - b _0224C3AE -_0224C06E: - mov r0, #0xd - strb r0, [r5] - b _0224C3AE -_0224C074: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _0224C086 - mov r0, #3 - strb r0, [r5] - b _0224C3AE -_0224C086: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _0224C180 - mov r1, #0x23 - ldr r0, [sp, #0x50] - lsl r1, r1, #8 - ldrb r0, [r0, r1] - ldr r1, _0224C1B8 ; =0x000021AC - sub r2, r0, #1 - ldr r0, [sp, #0x58] - str r2, [r0, r1] - mov r0, #0xd - strb r0, [r5] - ldr r1, _0224C1BC ; =0x0000314C - mov r0, #4 - ldrb r2, [r5, r1] - orr r0, r2 - strb r0, [r5, r1] - b _0224C3AE -_0224C0B2: - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_022658E8 - mov r0, #8 - strb r0, [r5] -_0224C0C0: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _0224C0D2 - mov r0, #0 - strb r0, [r5] - b _0224C3AE -_0224C0D2: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _0224C180 - ldr r0, [sp, #0x40] - ldr r1, _0224C1AC ; =0x000021B0 - ldr r2, [r0, #0] - ldr r0, [sp, #0x58] - str r2, [r0, r1] - mov r0, #0xd - strb r0, [r5] - b _0224C3AE -_0224C0EE: - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - mov r6, #6 - bl ov16_02258BA8 - str r0, [sp, #0x5c] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E1F8 - cmp r0, #4 - beq _0224C114 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E1F8 - cmp r0, #5 - bne _0224C14C -_0224C114: - ldr r0, [sp, #0x28] - cmp r0, #3 - beq _0224C132 - cmp r0, #7 - beq _0224C132 - cmp r0, #0x83 - beq _0224C132 - cmp r0, #0x13 - bne _0224C14C - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E1F8 - cmp r0, #4 - bne _0224C14C -_0224C132: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E258 - lsl r1, r0, #4 - ldr r0, [sp, #0x1c] - add r2, r0, r1 - ldr r0, _0224C1A4 ; =0x000021A8 - ldr r1, [r2, r0] - cmp r1, #0xf - bne _0224C14C - add r0, #8 - ldr r6, [r2, r0] -_0224C14C: - ldr r0, [sp, #0x5c] - ldr r1, [sp, #0x1c] - str r0, [sp] - add r0, r7, #0 - add r2, r4, #0 - mov r3, #0 - str r6, [sp, #4] - bl ov16_02265A8C - mov r0, #0xa - strb r0, [r5] -_0224C162: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _0224C174 - mov r0, #0 - strb r0, [r5] - b _0224C3AE -_0224C174: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - bne _0224C182 -_0224C180: - b _0224C3AE -_0224C182: - mov r3, #0x23 - ldr r0, [sp, #0x50] - lsl r3, r3, #8 - ldrb r0, [r0, r3] - ldr r1, _0224C1AC ; =0x000021B0 - sub r2, r0, #1 - ldr r0, [sp, #0x58] - str r2, [r0, r1] - ldr r0, [sp, #0x50] - sub r1, #0x10 - ldrb r0, [r0, r3] - sub r0, r0, #1 - strb r0, [r5, r1] - mov r0, #0xd - strb r0, [r5] - b _0224C3AE - nop -_0224C1A4: .word 0x000021A8 -_0224C1A8: .word 0x00000251 -_0224C1AC: .word 0x000021B0 -_0224C1B0: .word 0x000030BC -_0224C1B4: .word 0x00002D4C -_0224C1B8: .word 0x000021AC -_0224C1BC: .word 0x0000314C -_0224C1C0: - ldr r0, [sp, #0x24] - cmp r0, #0 - beq _0224C1E0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r1, [sp, #0x1c] - ldr r3, _0224C438 ; =0x000003BB - add r0, r7, #0 - add r2, r4, #0 - bl ov16_02265B2C - mov r0, #0xc - strb r0, [r5] - b _0224C3AE -_0224C1E0: - ldr r0, [sp, #0x20] - cmp r0, #0 - beq _0224C24C - ldr r0, [sp, #0x2c] - cmp r0, #0 - bne _0224C24C - add r0, r7, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0224C210 - add r0, r7, #0 - mov r1, #1 - bl ov16_0223F720 - add r0, r7, #0 - bl ov16_0223DF10 - add r1, r0, #0 - add r0, r7, #0 - bl ov16_0225B444 - b _0224C3AE -_0224C210: - mov r1, #0 - add r0, sp, #0x78 - strb r1, [r0, #5] - ldr r1, _0224C43C ; =0x00000319 - add r2, sp, #0x7c - strh r1, [r0, #6] - mov r0, sp - str r0, [sp, #0x70] - sub r0, #8 - str r0, [sp, #0x70] - add r3, r0, #0 - mov r6, #4 -_0224C228: - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - sub r6, r6, #1 - bne _0224C228 - ldr r0, [r2, #0] - add r1, r4, #0 - str r0, [r3, #0] - ldr r0, [sp, #0x70] - ldmia r0!, {r2, r3} - str r0, [sp, #0x70] - add r0, r7, #0 - bl ov16_02266168 - mov r0, #0xf - strb r0, [r5] - mov r0, #0 - strb r0, [r5, #4] - b _0224C3AE -_0224C24C: - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - add r3, sp, #0x7c - bl ov16_02255C00 - cmp r0, #0 - beq _0224C2B2 - add r0, r7, #0 - bl ov16_0223EBEC - mov r1, #0x10 - tst r0, r1 - beq _0224C280 - add r0, r7, #0 - mov r1, #1 - bl ov16_0223F720 - add r0, r7, #0 - bl ov16_0223DF10 - add r1, r0, #0 - add r0, r7, #0 - bl ov16_0225B444 - b _0224C3AE -_0224C280: - mov r0, sp - str r0, [sp, #0x74] - sub r0, #8 - str r0, [sp, #0x74] - add r2, sp, #0x7c - add r3, r0, #0 - mov r6, #4 -_0224C28E: - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - sub r6, r6, #1 - bne _0224C28E - ldr r0, [r2, #0] - add r1, r4, #0 - str r0, [r3, #0] - ldr r0, [sp, #0x74] - ldmia r0!, {r2, r3} - str r0, [sp, #0x74] - add r0, r7, #0 - bl ov16_02266168 - mov r0, #0xf - strb r0, [r5] - mov r0, #0 - strb r0, [r5, #4] - b _0224C3AE -_0224C2B2: - mov r0, #0xc - strb r0, [r5] - b _0224C3AE -_0224C2B8: - ldr r0, [sp, #0x24] - cmp r0, #0 - beq _0224C2E2 - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _0224C2E6 - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0xff - bne _0224C2DC - mov r0, #0 - strb r0, [r5] - b _0224C2E6 -_0224C2DC: - mov r0, #0xd - strb r0, [r5] - b _0224C2E6 -_0224C2E2: - mov r0, #0xd - strb r0, [r5] -_0224C2E6: - ldr r0, [sp, #0x3c] - cmp r0, #0 - beq _0224C3AE - ldr r0, [sp, #0x38] - cmp r0, #0 - bne _0224C3AE - ldrb r0, [r5] - cmp r0, #0xd - bne _0224C3AE - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E258 - ldr r1, [sp, #0x1c] - mov r2, #0xd - strb r2, [r1, r0] - b _0224C3AE -_0224C308: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0226647C - ldr r0, [sp, #0x28] - cmp r0, #7 - bne _0224C330 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E258 - ldr r1, [sp, #0x1c] - ldrb r0, [r1, r0] - cmp r0, #0xe - bne _0224C338 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_022666E0 - b _0224C338 -_0224C330: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_022666E0 -_0224C338: - mov r0, #0xe - strb r0, [r5] -_0224C33C: - ldr r0, [sp, #0x60] - add r0, r0, #1 - str r0, [sp, #0x60] - b _0224C3AE -_0224C344: - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02259AB4 - cmp r0, #0 - beq _0224C3AE - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02252040 - ldrb r0, [r5, #4] - strb r0, [r5] - b _0224C3AE -_0224C35E: - mov r1, #2 - add r0, sp, #0x78 - strb r1, [r0, #5] - mov r1, #0x26 - lsl r1, r1, #4 - strh r1, [r0, #6] - ldr r0, [sp, #0x1c] - add r1, r4, #0 - bl ov16_02255560 - str r0, [sp, #0x80] - mov r0, sp - sub r0, #8 - mov ip, r0 - add r2, sp, #0x7c - add r3, r0, #0 - mov r6, #4 -_0224C380: - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - sub r6, r6, #1 - bne _0224C380 - ldr r0, [r2, #0] - add r1, r4, #0 - str r0, [r3, #0] - mov r0, ip - ldmia r0!, {r2, r3} - add r0, r7, #0 - bl ov16_02266168 - mov r0, #0xf - strb r0, [r5] - mov r0, #0xd - strb r0, [r5, #4] - b _0224C3AE -_0224C3A2: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_022665C8 - ldrb r0, [r5, #4] - strb r0, [r5] -_0224C3AE: - ldr r0, [sp, #0x58] - ldr r1, [sp, #0x50] - add r0, #0x10 - str r0, [sp, #0x58] - ldr r0, [sp, #0x54] - add r4, r4, #1 - add r0, #0x40 - str r0, [sp, #0x54] - mov r0, #1 - lsl r0, r0, #8 - add r1, r1, r0 - str r1, [sp, #0x50] - ldr r1, [sp, #0x4c] - add r1, #0xc0 - str r1, [sp, #0x4c] - ldr r1, [sp, #0x48] - add r1, r1, #2 - str r1, [sp, #0x48] - ldr r1, [sp, #0x44] - add r1, #0x10 - str r1, [sp, #0x44] - ldr r1, [sp, #0x40] - add r0, r1, r0 - str r0, [sp, #0x40] - ldr r0, [sp, #0x64] - cmp r4, r0 - bge _0224C3E8 - bl _0224BBA8 -_0224C3E8: - ldr r1, [sp, #0x60] - ldr r0, [sp, #0x64] - cmp r1, r0 - bne _0224C434 - ldr r1, [sp, #0x1c] - add r0, r7, #0 - bl ov16_02251694 - add r0, r7, #0 - mov r1, #0 - bl ov16_0223B748 - ldr r0, [sp, #0x1c] - mov r1, #6 - str r1, [r0, #8] - ldr r0, [sp, #0x64] - mov r6, #0 - cmp r0, #0 - ble _0224C434 - ldr r4, [sp, #0x1c] -_0224C410: - ldr r0, _0224C440 ; =0x000021A8 - ldr r0, [r4, r0] - cmp r0, #0xf - bne _0224C42A - ldr r1, [sp, #0x1c] - add r0, r7, #0 - add r3, r1, #0 - add r5, r3, r6 - ldr r3, _0224C444 ; =0x000021A0 - add r2, r6, #0 - ldrb r3, [r5, r3] - bl ov16_0225A200 -_0224C42A: - ldr r0, [sp, #0x64] - add r6, r6, #1 - add r4, #0x10 - cmp r6, r0 - blt _0224C410 -_0224C434: - add sp, #0xa0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C438: .word 0x000003BB -_0224C43C: .word 0x00000319 -_0224C440: .word 0x000021A8 -_0224C444: .word 0x000021A0 - thumb_func_end ov16_0224BB28 - - thumb_func_start ov16_0224C448 -ov16_0224C448: ; 0x0224C448 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - add r5, r1, #0 - bl ov16_0223DF1C - str r0, [sp, #0x14] - ldr r0, [sp, #4] - bl ov16_0223DF0C - mov r2, #0x22 - lsl r2, r2, #4 - mov r1, #0 - tst r2, r0 - beq _0224C47E - ldr r0, [sp, #0x14] - add r4, r1, #0 - cmp r0, #0 - ble _0224C47C - ldr r1, _0224C5B8 ; =0x000021E8 -_0224C470: - add r0, r5, r4 - strb r4, [r0, r1] - ldr r0, [sp, #0x14] - add r4, r4, #1 - cmp r4, r0 - blt _0224C470 -_0224C47C: - b _0224C5B0 -_0224C47E: - mov r2, #4 - tst r0, r2 - beq _0224C4A6 - ldr r0, [sp, #0x14] - add r4, r1, #0 - cmp r0, #0 - ble _0224C4BE - ldr r2, _0224C5BC ; =0x000021B4 - add r3, r5, #0 -_0224C490: - ldr r0, [r3, r2] - cmp r0, #4 - bne _0224C49A - mov r1, #5 - b _0224C4BE -_0224C49A: - ldr r0, [sp, #0x14] - add r4, r4, #1 - add r3, #0x10 - cmp r4, r0 - blt _0224C490 - b _0224C4BE -_0224C4A6: - ldr r0, _0224C5BC ; =0x000021B4 - ldr r0, [r5, r0] - cmp r0, #4 - bne _0224C4B2 - add r4, r1, #0 - mov r1, #5 -_0224C4B2: - ldr r0, _0224C5C0 ; =0x000021D4 - ldr r0, [r5, r0] - cmp r0, #4 - bne _0224C4BE - mov r4, #2 - mov r1, #5 -_0224C4BE: - cmp r1, #5 - bne _0224C4E6 - ldr r0, _0224C5B8 ; =0x000021E8 - ldr r2, [sp, #0x14] - strb r4, [r5, r0] - mov r1, #1 - mov r0, #0 - cmp r2, #0 - ble _0224C5B0 - ldr r3, _0224C5B8 ; =0x000021E8 -_0224C4D2: - cmp r0, r4 - beq _0224C4DC - add r2, r5, r1 - strb r0, [r2, r3] - add r1, r1, #1 -_0224C4DC: - ldr r2, [sp, #0x14] - add r0, r0, #1 - cmp r0, r2 - blt _0224C4D2 - b _0224C5B0 -_0224C4E6: - ldr r0, [sp, #0x14] - mov r2, #0 - cmp r0, #0 - ble _0224C50E - ldr r4, _0224C5B8 ; =0x000021E8 - add r0, r5, #0 - add r6, r4, #0 - sub r6, #0x34 -_0224C4F6: - ldr r3, [r0, r6] - sub r3, r3, #2 - cmp r3, #1 - bhi _0224C504 - add r3, r5, r1 - strb r2, [r3, r4] - add r1, r1, #1 -_0224C504: - ldr r3, [sp, #0x14] - add r2, r2, #1 - add r0, #0x10 - cmp r2, r3 - blt _0224C4F6 -_0224C50E: - ldr r0, [sp, #0x14] - mov r2, #0 - cmp r0, #0 - ble _0224C538 - ldr r4, _0224C5B8 ; =0x000021E8 - add r0, r5, #0 - add r6, r4, #0 - sub r6, #0x34 -_0224C51E: - ldr r3, [r0, r6] - cmp r3, #2 - beq _0224C52E - cmp r3, #3 - beq _0224C52E - add r3, r5, r1 - strb r2, [r3, r4] - add r1, r1, #1 -_0224C52E: - ldr r3, [sp, #0x14] - add r2, r2, #1 - add r0, #0x10 - cmp r2, r3 - blt _0224C51E -_0224C538: - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x14] - sub r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #0 - ble _0224C5B0 -_0224C546: - ldr r0, [sp, #8] - add r7, r0, #1 - ldr r0, [sp, #0x14] - cmp r7, r0 - bge _0224C5A4 - ldr r0, [sp, #8] - add r0, r5, r0 - str r0, [sp, #0x10] -_0224C556: - ldr r1, [sp, #0x10] - ldr r0, _0224C5B8 ; =0x000021E8 - ldrb r6, [r1, r0] - add r1, r5, r7 - ldrb r4, [r1, r0] - lsl r0, r6, #4 - str r1, [sp, #0xc] - add r1, r5, r0 - ldr r0, _0224C5BC ; =0x000021B4 - ldr r0, [r1, r0] - lsl r1, r4, #4 - add r2, r5, r1 - ldr r1, _0224C5BC ; =0x000021B4 - ldr r1, [r2, r1] - cmp r0, r1 - bne _0224C59C - cmp r0, #1 - beq _0224C57E - mov r0, #1 - b _0224C580 -_0224C57E: - mov r0, #0 -_0224C580: - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov16_02252EC8 - cmp r0, #0 - beq _0224C59C - ldr r1, [sp, #0x10] - ldr r0, _0224C5B8 ; =0x000021E8 - strb r4, [r1, r0] - ldr r1, [sp, #0xc] - strb r6, [r1, r0] -_0224C59C: - ldr r0, [sp, #0x14] - add r7, r7, #1 - cmp r7, r0 - blt _0224C556 -_0224C5A4: - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [sp, #8] - cmp r1, r0 - blt _0224C546 -_0224C5B0: - mov r0, #7 - str r0, [r5, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C5B8: .word 0x000021E8 -_0224C5BC: .word 0x000021B4 -_0224C5C0: .word 0x000021D4 - thumb_func_end ov16_0224C448 - - thumb_func_start ov16_0224C5C4 -ov16_0224C5C4: ; 0x0224C5C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - mov r1, #0 - str r0, [sp] - str r1, [sp, #4] - bl ov16_0223DF1C - add r7, r0, #0 -_0224C5D6: - ldr r0, [r4, #0x28] - cmp r0, #3 - bls _0224C5DE - b _0224C6F0 -_0224C5DE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224C5EA: ; jump table - .short _0224C5F2 - _0224C5EA - 2 ; case 0 - .short _0224C68C - _0224C5EA - 2 ; case 1 - .short _0224C6CA - _0224C5EA - 2 ; case 2 - .short _0224C6E8 - _0224C5EA - 2 ; case 3 -_0224C5F2: - ldr r0, [r4, #0x2c] - cmp r0, r7 - bge _0224C680 - add r6, r4, #0 - add r6, #0x2c -_0224C5FC: - add r1, r4, r0 - ldr r0, _0224C704 ; =0x000021E8 - ldrb r5, [r1, r0] - add r0, r5, #0 - bl sub_020787CC - ldr r1, _0224C708 ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - ldr r0, [r6, #0] - beq _0224C618 - add r0, r0, #1 - str r0, [r6, #0] - b _0224C67A -_0224C618: - add r0, r0, #1 - str r0, [r6, #0] - mov r0, #0xc0 - mul r0, r5 - add r1, r4, r0 - ldr r0, _0224C70C ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - bne _0224C67A - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255570 - mov r1, #0x42 - lsl r1, r1, #2 - cmp r0, r1 - bne _0224C67A - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255EC0 - cmp r0, #0 - bne _0224C67A - lsl r0, r5, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _0224C67A - ldr r0, [sp] - bl ov16_02266AA0 - mov r0, #0x46 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xe8 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #8 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224C67A: - ldr r0, [r4, #0x2c] - cmp r0, r7 - blt _0224C5FC -_0224C680: - mov r0, #0 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] - b _0224C6F0 -_0224C68C: - mov r6, #0 - cmp r7, #0 - ble _0224C6C2 - add r5, r4, #0 -_0224C694: - ldr r0, _0224C710 ; =0x00002DB0 - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #0x16 - tst r0, r1 - beq _0224C6BA - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02255570 - cmp r0, #0x63 - beq _0224C6BA - ldr r0, _0224C710 ; =0x00002DB0 - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #0x16 - and r1, r0 - ldr r0, _0224C710 ; =0x00002DB0 - str r1, [r5, r0] -_0224C6BA: - add r6, r6, #1 - add r5, #0xc0 - cmp r6, r7 - blt _0224C694 -_0224C6C2: - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] - b _0224C6F0 -_0224C6CA: - mov r6, #0 - add r5, r4, #0 -_0224C6CE: - ldr r0, [sp] - bl ov16_0223F4BC - ldr r1, _0224C714 ; =0x0000310C - add r6, r6, #1 - strh r0, [r5, r1] - add r5, r5, #2 - cmp r6, #4 - blt _0224C6CE - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] - b _0224C6F0 -_0224C6E8: - mov r0, #0 - str r0, [r4, #0x28] - mov r0, #2 - str r0, [sp, #4] -_0224C6F0: - ldr r0, [sp, #4] - cmp r0, #0 - bne _0224C6F8 - b _0224C5D6 -_0224C6F8: - cmp r0, #2 - bne _0224C700 - mov r0, #8 - str r0, [r4, #8] -_0224C700: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C704: .word 0x000021E8 -_0224C708: .word 0x00003108 -_0224C70C: .word 0x00002DAC -_0224C710: .word 0x00002DB0 -_0224C714: .word 0x0000310C - thumb_func_end ov16_0224C5C4 - - thumb_func_start ov16_0224C718 -ov16_0224C718: ; 0x0224C718 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r4, r1, #0 - bl ov16_0223DF1C - add r5, r0, #0 - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0225B444 - cmp r0, #0 - bne _0224C784 - ldr r1, _0224C788 ; =0x00003150 - mov r0, #0 - str r0, [r4, r1] - cmp r5, #0 - ble _0224C754 - ldr r3, _0224C788 ; =0x00003150 - ldr r2, _0224C78C ; =0x000021A8 - add r1, r4, #0 -_0224C740: - ldr r6, [r1, r2] - cmp r6, #0x27 - beq _0224C74C - ldr r6, [r4, r3] - add r6, r6, #1 - str r6, [r4, r3] -_0224C74C: - add r0, r0, #1 - add r1, #0x10 - cmp r0, r5 - blt _0224C740 -_0224C754: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_02255FBC - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, r5 - bne _0224C774 - add r0, r4, #0 - mov r1, #0 - add r0, #0xec - str r1, [r0, #0] - mov r0, #9 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224C774: - add r1, r4, r0 - ldr r0, _0224C790 ; =0x000021E8 - ldrb r1, [r1, r0] - sub r0, #0x40 - lsl r1, r1, #4 - add r1, r4, r1 - ldr r0, [r1, r0] - str r0, [r4, #8] -_0224C784: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C788: .word 0x00003150 -_0224C78C: .word 0x000021A8 -_0224C790: .word 0x000021E8 - thumb_func_end ov16_0224C718 - - thumb_func_start ov16_0224C794 -ov16_0224C794: ; 0x0224C794 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r0, [sp] - add r4, r1, #0 - mov r5, #0 - bl ov16_0223DF1C - str r0, [sp, #4] -_0224C7A4: - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #1 - bl ov16_02250EF4 - cmp r0, #1 - beq _0224C7CE - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r1, #0 - bl ov16_02250F98 - cmp r0, #1 - beq _0224C7CE - ldr r0, [sp] - add r1, r4, #0 - bl ov16_02250A48 - cmp r0, #1 - bne _0224C7D0 -_0224C7CE: - b _0224CF76 -_0224C7D0: - ldr r0, [r4, #0x10] - cmp r0, #0xd - bhi _0224C8AA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224C7E2: ; jump table - .short _0224C7FE - _0224C7E2 - 2 ; case 0 - .short _0224C8B8 - _0224C7E2 - 2 ; case 1 - .short _0224C962 - _0224C7E2 - 2 ; case 2 - .short _0224CA0E - _0224C7E2 - 2 ; case 3 - .short _0224CABC - _0224C7E2 - 2 ; case 4 - .short _0224CB38 - _0224C7E2 - 2 ; case 5 - .short _0224CBB4 - _0224C7E2 - 2 ; case 6 - .short _0224CC74 - _0224C7E2 - 2 ; case 7 - .short _0224CD04 - _0224C7E2 - 2 ; case 8 - .short _0224CD94 - _0224C7E2 - 2 ; case 9 - .short _0224CE28 - _0224C7E2 - 2 ; case 10 - .short _0224CEBE - _0224C7E2 - 2 ; case 11 - .short _0224CF00 - _0224C7E2 - 2 ; case 12 - .short _0224CF58 - _0224C7E2 - 2 ; case 13 -_0224C7FE: - ldr r6, [r4, #0x14] - cmp r6, #2 - bge _0224C8A6 - mov r0, #0x71 - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #0x38] - add r0, r4, #0 - str r0, [sp, #8] - add r0, #0x14 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0x1c] - mov r0, #0x1c - str r0, [sp, #0x18] -_0224C81C: - lsl r0, r6, #2 - mov r1, #0x6f - add r0, r4, r0 - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r1, #1 - tst r1, r2 - beq _0224C892 - ldr r1, [sp, #0x38] - lsl r3, r6, #3 - ldr r7, [r1, r3] - ldr r2, [sp, #0x18] - add r1, r7, #0 - str r7, [sp, #0x2c] - bic r1, r2 - str r1, [sp, #0x2c] - lsl r1, r7, #0x1b - lsr r1, r1, #0x1d - sub r1, r1, #1 - lsl r1, r1, #0x1d - lsr r2, r1, #0x1b - ldr r1, [sp, #0x2c] - orr r2, r1 - ldr r1, [sp, #0x38] - str r2, [r1, r3] - ldr r1, [r1, r3] - lsl r1, r1, #0x1b - lsr r1, r1, #0x1d - bne _0224C892 - mov r1, #0x6f - lsl r1, r1, #2 - ldr r2, [r0, r1] - ldr r1, [sp, #0x1c] - bic r2, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r2, [r0, r1] - mov r1, #0x73 - add r0, r1, #0 - add r0, #0xb1 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x32 - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r4, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r6, #0 - bl ov16_0225B120 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r5, #1 -_0224C892: - ldr r0, [sp, #8] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #8] - cmp r5, #0 - str r1, [r0, #0] - bne _0224C8A6 - ldr r6, [r4, #0x14] - cmp r6, #2 - blt _0224C81C -_0224C8A6: - cmp r5, #0 - beq _0224C8AC -_0224C8AA: - b _0224CF5A -_0224C8AC: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224C8B8: - ldr r6, [r4, #0x14] - cmp r6, #2 - bge _0224C952 - mov r0, #0x71 - lsl r0, r0, #2 - add r7, r4, r0 - add r0, r4, #0 - str r0, [sp, #0xc] - add r0, #0x14 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x20] -_0224C8D0: - lsl r0, r6, #2 - add r3, r4, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r1, [r3, r0] - mov r0, #2 - tst r0, r1 - beq _0224C93E - lsl r2, r6, #3 - ldr r1, [r7, r2] - ldr r0, _0224CBF0 ; =0xFFFFFC7F - and r0, r1 - str r0, [sp, #0x30] - lsl r0, r1, #0x16 - lsr r0, r0, #0x1d - sub r0, r0, #1 - lsl r0, r0, #0x1d - lsr r1, r0, #0x16 - ldr r0, [sp, #0x30] - orr r0, r1 - str r0, [r7, r2] - ldr r0, [r7, r2] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1d - bne _0224C93E - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r3, r0] - ldr r1, [sp, #0x20] - mov r2, #0x32 - bic r0, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r3, r1] - mov r1, #0x71 - add r0, r1, #0 - add r0, #0xb3 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r4, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r6, #0 - bl ov16_0225B120 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r5, #1 -_0224C93E: - ldr r0, [sp, #0xc] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0xc] - cmp r5, #0 - str r1, [r0, #0] - bne _0224C952 - ldr r6, [r4, #0x14] - cmp r6, #2 - blt _0224C8D0 -_0224C952: - cmp r5, #0 - bne _0224CA00 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224C962: - ldr r6, [r4, #0x14] - cmp r6, #2 - bge _0224C9FC - mov r0, #0x71 - lsl r0, r0, #2 - add r7, r4, r0 - add r0, r4, #0 - str r0, [sp, #0x10] - add r0, #0x14 - str r0, [sp, #0x10] - mov r0, #0x40 - str r0, [sp, #0x24] -_0224C97A: - lsl r0, r6, #2 - add r3, r4, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r1, [r3, r0] - mov r0, #0x40 - tst r0, r1 - beq _0224C9E8 - lsl r2, r6, #3 - ldr r1, [r7, r2] - ldr r0, _0224CBF4 ; =0xFFFF8FFF - and r0, r1 - str r0, [sp, #0x34] - lsl r0, r1, #0x11 - lsr r0, r0, #0x1d - sub r0, r0, #1 - lsl r0, r0, #0x1d - lsr r1, r0, #0x11 - ldr r0, [sp, #0x34] - orr r0, r1 - str r0, [r7, r2] - ldr r0, [r7, r2] - lsl r0, r0, #0x11 - lsr r0, r0, #0x1d - bne _0224C9E8 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r3, r0] - ldr r1, [sp, #0x24] - mov r2, #0x32 - bic r0, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r3, r1] - mov r1, #0x36 - add r0, r1, #0 - add r0, #0xee - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r4, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r6, #0 - bl ov16_0225B120 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r5, #1 -_0224C9E8: - ldr r0, [sp, #0x10] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x10] - cmp r5, #0 - str r1, [r0, #0] - bne _0224C9FC - ldr r6, [r4, #0x14] - cmp r6, #2 - blt _0224C97A -_0224C9FC: - cmp r5, #0 - beq _0224CA02 -_0224CA00: - b _0224CF5A -_0224CA02: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224CA0E: - ldr r7, [r4, #0x14] - cmp r7, #2 - bge _0224CAAC - mov r0, #0x71 - lsl r0, r0, #2 - add r6, r4, r0 - add r0, r4, #0 - str r0, [sp, #0x14] - add r0, #0x14 - str r0, [sp, #0x14] - mov r0, #8 - str r0, [sp, #0x28] -_0224CA26: - lsl r0, r7, #2 - add r3, r4, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r1, [r3, r0] - mov r0, #8 - tst r0, r1 - beq _0224CA98 - lsl r0, r7, #3 - ldr r2, [r6, r0] - ldr r1, _0224CBF8 ; =0xFFF1FFFF - and r1, r2 - mov ip, r1 - lsl r1, r2, #0xc - lsr r1, r1, #0x1d - sub r1, r1, #1 - lsl r1, r1, #0x1d - lsr r2, r1, #0xc - mov r1, ip - orr r1, r2 - str r1, [r6, r0] - ldr r1, [r6, r0] - lsl r1, r1, #0xc - lsr r1, r1, #0x1d - bne _0224CA98 - mov r1, #0x6f - lsl r1, r1, #2 - ldr r1, [r3, r1] - ldr r2, [sp, #0x28] - bic r1, r2 - mov r2, #0x6f - lsl r2, r2, #2 - str r1, [r3, r2] - ldr r0, [r6, r0] - lsl r0, r0, #0xf - lsr r1, r0, #0x1e - add r0, r2, #0 - sub r0, #0xa4 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x6e - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r4, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r7, #0 - bl ov16_0225B120 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r5, #1 -_0224CA98: - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x14] - cmp r5, #0 - str r1, [r0, #0] - bne _0224CAAC - ldr r7, [r4, #0x14] - cmp r7, #2 - blt _0224CA26 -_0224CAAC: - cmp r5, #0 - bne _0224CB2A - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224CABC: - ldr r6, [r4, #0x14] - cmp r6, #2 - bge _0224CB26 - add r7, r4, #0 - add r7, #0x14 -_0224CAC6: - lsl r0, r6, #2 - mov r1, #0x6f - add r0, r4, r0 - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r1, #3 - lsl r1, r1, #8 - tst r1, r2 - beq _0224CB16 - mov r1, #0x6f - lsl r1, r1, #2 - ldr r2, [r0, r1] - sub r1, #0xbc - sub r2, r2, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r2, [r0, r1] - ldr r1, [r0, r1] - mov r0, #3 - lsl r0, r0, #8 - tst r0, r1 - bne _0224CB16 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xe9 - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r4, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r6, #0 - bl ov16_0225B120 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r5, #1 -_0224CB16: - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - cmp r5, #0 - bne _0224CB26 - ldr r6, [r4, #0x14] - cmp r6, #2 - blt _0224CAC6 -_0224CB26: - cmp r5, #0 - beq _0224CB2C -_0224CB2A: - b _0224CF5A -_0224CB2C: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224CB38: - ldr r6, [r4, #0x14] - cmp r6, #2 - bge _0224CBA4 - add r7, r4, #0 - add r7, #0x14 -_0224CB42: - lsl r0, r6, #2 - mov r1, #0x6f - add r0, r4, r0 - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r1, #7 - lsl r1, r1, #0xc - tst r1, r2 - beq _0224CB94 - mov r1, #0x6f - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r1, #1 - lsl r1, r1, #0xc - sub r2, r2, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r2, [r0, r1] - ldr r1, [r0, r1] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r1 - bne _0224CB94 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xfa - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r4, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r6, #0 - bl ov16_0225B120 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r5, #1 -_0224CB94: - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - cmp r5, #0 - bne _0224CBA4 - ldr r6, [r4, #0x14] - cmp r6, #2 - blt _0224CB42 -_0224CBA4: - cmp r5, #0 - bne _0224CC66 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224CBB4: - ldr r0, [r4, #0x14] - ldr r1, [sp, #4] - cmp r0, r1 - bge _0224CC62 - add r6, r4, #0 - mov r7, #2 - add r6, #0x14 -_0224CBC2: - add r1, r4, r0 - ldr r0, _0224CBFC ; =0x000021EC - ldrb r2, [r1, r0] - mov r0, #0x63 - lsl r0, r0, #2 - add r1, r4, r2 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0224CC50 - mov r0, #0x63 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - sub r3, r0, #1 - mov r0, #0x63 - lsl r0, r0, #2 - strb r3, [r1, r0] - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224CC50 - mov r0, #0xc0 - mul r0, r2 - ldr r3, _0224CC00 ; =0x00002D8C - b _0224CC04 - ; .align 2, 0 -_0224CBF0: .word 0xFFFFFC7F -_0224CBF4: .word 0xFFFF8FFF -_0224CBF8: .word 0xFFF1FFFF -_0224CBFC: .word 0x000021EC -_0224CC00: .word 0x00002D8C -_0224CC04: - add r0, r4, r0 - ldr r3, [r0, r3] - cmp r3, #0 - beq _0224CC50 - mov r3, #0x46 - lsl r3, r3, #2 - str r2, [r4, r3] - add r3, r4, #0 - add r3, #0xf5 - strb r7, [r3] - add r5, r4, #0 - ldr r3, _0224CF3C ; =0x00000215 - add r5, #0xf6 - strh r3, [r5] - sub r3, #0x5d - ldrb r1, [r1, r3] - lsl r1, r1, #8 - orr r2, r1 - add r1, r4, #0 - add r1, #0xf8 - str r2, [r1, #0] - ldr r1, _0224CF40 ; =0x00002D90 - ldr r0, [r0, r1] - add r1, r7, #0 - bl ov16_022563F8 - ldr r1, _0224CF44 ; =0x0000215C - mov r2, #0x88 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r5, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224CC50: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - cmp r5, #0 - bne _0224CC62 - ldr r0, [r4, #0x14] - ldr r1, [sp, #4] - cmp r0, r1 - blt _0224CBC2 -_0224CC62: - cmp r5, #0 - beq _0224CC68 -_0224CC66: - b _0224CF5A -_0224CC68: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - b _0224CF5A -_0224CC74: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r2, #3 - tst r2, r1 - beq _0224CCFC - mov r2, #2 - tst r1, r2 - beq _0224CCAA - add r0, r4, #0 - ldr r1, _0224CF48 ; =0x00000321 - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CCF2 -_0224CCAA: - add r1, r0, #4 - ldr r1, [r4, r1] - sub r2, r1, #1 - add r1, r0, #4 - str r2, [r4, r1] - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0224CCD0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xea - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CCF2 -_0224CCD0: - add r0, r4, #0 - ldr r1, _0224CF48 ; =0x00000321 - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224CCF2: - mov r0, #0x4e - mov r1, #0x13 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r5, #1 -_0224CCFC: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224CF5A -_0224CD04: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r2, #0xc - tst r2, r1 - beq _0224CD8C - mov r2, #8 - tst r1, r2 - beq _0224CD3A - add r0, r4, #0 - ldr r1, _0224CF4C ; =0x00000325 - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CD82 -_0224CD3A: - add r1, r0, #4 - ldr r1, [r4, r1] - sub r2, r1, #1 - add r1, r0, #4 - str r2, [r4, r1] - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0224CD60 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xeb - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CD82 -_0224CD60: - add r0, r4, #0 - ldr r1, _0224CF4C ; =0x00000325 - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224CD82: - mov r0, #0x4e - mov r1, #0x15 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r5, #1 -_0224CD8C: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224CF5A -_0224CD94: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r2, #0x30 - tst r2, r1 - beq _0224CE20 - mov r2, #0x20 - tst r1, r2 - beq _0224CDCC - mov r1, #0xca - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CE16 -_0224CDCC: - add r1, r0, #4 - ldr r1, [r4, r1] - sub r2, r1, #1 - add r1, r0, #4 - str r2, [r4, r1] - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0224CDF2 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xec - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CE16 -_0224CDF2: - mov r1, #0xca - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224CE16: - mov r0, #0x4e - mov r1, #0x16 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r5, #1 -_0224CE20: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224CF5A -_0224CE28: - mov r0, #6 - lsl r0, r0, #6 - ldr r2, [r4, r0] - mov r1, #0xc0 - add r0, r2, #0 - tst r0, r1 - beq _0224CEB6 - mov r0, #0x80 - tst r0, r2 - beq _0224CE60 - add r0, r4, #0 - ldr r1, _0224CF50 ; =0x0000032B - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CEAC -_0224CE60: - add r0, r1, #0 - add r0, #0xc4 - ldr r0, [r4, r0] - sub r2, r0, #1 - add r0, r1, #0 - add r0, #0xc4 - add r1, #0xc4 - str r2, [r4, r0] - ldr r0, [r4, r1] - cmp r0, #0 - bne _0224CE8A - add r0, r4, #0 - mov r1, #1 - mov r2, #0xed - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224CEAC -_0224CE8A: - add r0, r4, #0 - ldr r1, _0224CF50 ; =0x0000032B - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224CEAC: - mov r0, #0x4e - mov r1, #0x14 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r5, #1 -_0224CEB6: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224CF5A -_0224CEBE: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #2 - lsl r0, r0, #0xe - tst r0, r1 - beq _0224CEF8 - add r0, r4, #0 - ldr r1, _0224CF54 ; =0x0000032D - add r0, #0xf6 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x68 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r1, #0x12 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x4e - lsl r0, r0, #2 - str r1, [r4, r0] - mov r5, #1 -_0224CEF8: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224CF5A -_0224CF00: - mov r1, #6 - lsl r1, r1, #6 - ldr r3, [r4, r1] - mov r2, #7 - lsl r2, r2, #0xc - add r0, r3, #0 - tst r0, r2 - beq _0224CF32 - mov r0, #1 - lsl r0, r0, #0xc - sub r0, r3, r0 - str r0, [r4, r1] - ldr r0, [r4, r1] - tst r0, r2 - bne _0224CF32 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xee - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r5, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224CF32: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224CF5A - nop -_0224CF3C: .word 0x00000215 -_0224CF40: .word 0x00002D90 -_0224CF44: .word 0x0000215C -_0224CF48: .word 0x00000321 -_0224CF4C: .word 0x00000325 -_0224CF50: .word 0x0000032B -_0224CF54: .word 0x0000032D -_0224CF58: - mov r5, #2 -_0224CF5A: - cmp r5, #0 - bne _0224CF60 - b _0224C7A4 -_0224CF60: - cmp r5, #1 - bne _0224CF6A - ldr r0, [sp] - bl ov16_02266AA0 -_0224CF6A: - cmp r5, #2 - bne _0224CF76 - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #0xa - str r0, [r4, #8] -_0224CF76: - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0224C794 - - thumb_func_start ov16_0224CF7C -ov16_0224CF7C: ; 0x0224CF7C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - mov r1, #0 - str r1, [sp, #0x10] - str r0, [sp, #4] - bl ov16_0223DF1C - ldr r1, [r4, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #1 - bl ov16_02250EF4 - cmp r0, #1 - beq _0224CFB8 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r1, #0 - bl ov16_02250F98 - cmp r0, #1 - beq _0224CFB8 - ldr r0, [sp, #4] - add r1, r4, #0 - bl ov16_02250A48 - cmp r0, #1 - bne _0224CFBC -_0224CFB8: - bl _0224D998 -_0224CFBC: - ldr r1, [r4, #0x1c] - ldr r0, [sp, #0xc] - cmp r1, r0 - blt _0224CFC8 - bl _0224D98E -_0224CFC8: - ldr r0, _0224D2F8 ; =0x000021EC - add r1, r4, r1 - ldrb r5, [r1, r0] - add r0, r5, #0 - bl sub_020787CC - ldr r1, _0224D2FC ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - beq _0224CFE6 - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - bl _0224D982 -_0224CFE6: - ldr r0, [r4, #0x18] - cmp r0, #0x1a - bls _0224CFF0 - bl _0224D972 -_0224CFF0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224CFFC: ; jump table - .short _0224D032 - _0224CFFC - 2 ; case 0 - .short _0224D09A - _0224CFFC - 2 ; case 1 - .short _0224D11C - _0224CFFC - 2 ; case 2 - .short _0224D138 - _0224CFFC - 2 ; case 3 - .short _0224D154 - _0224CFFC - 2 ; case 4 - .short _0224D170 - _0224CFFC - 2 ; case 5 - .short _0224D1DA - _0224CFFC - 2 ; case 6 - .short _0224D22C - _0224CFFC - 2 ; case 7 - .short _0224D2AC - _0224CFFC - 2 ; case 8 - .short _0224D2E8 - _0224CFFC - 2 ; case 9 - .short _0224D356 - _0224CFFC - 2 ; case 10 - .short _0224D394 - _0224CFFC - 2 ; case 11 - .short _0224D40C - _0224CFFC - 2 ; case 12 - .short _0224D490 - _0224CFFC - 2 ; case 13 - .short _0224D590 - _0224CFFC - 2 ; case 14 - .short _0224D5F8 - _0224CFFC - 2 ; case 15 - .short _0224D6AC - _0224CFFC - 2 ; case 16 - .short _0224D73C - _0224CFFC - 2 ; case 17 - .short _0224D75A - _0224CFFC - 2 ; case 18 - .short _0224D7A0 - _0224CFFC - 2 ; case 19 - .short _0224D7EC - _0224CFFC - 2 ; case 20 - .short _0224D836 - _0224CFFC - 2 ; case 21 - .short _0224D880 - _0224CFFC - 2 ; case 22 - .short _0224D8CA - _0224CFFC - 2 ; case 23 - .short _0224D91A - _0224CFFC - 2 ; case 24 - .short _0224D94E - _0224CFFC - 2 ; case 25 - .short _0224D968 - _0224CFFC - 2 ; case 26 -_0224D032: - mov r6, #0xc0 - add r0, r5, #0 - mul r0, r6 - add r3, r4, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - mov r1, #1 - ldr r2, [r3, r0] - lsl r1, r1, #0xa - tst r1, r2 - beq _0224D090 - add r1, r0, #0 - sub r1, #0x34 - ldr r2, [r3, r1] - add r1, r0, #0 - sub r1, #0x30 - ldr r1, [r3, r1] - cmp r2, r1 - beq _0224D090 - cmp r2, #0 - beq _0224D090 - add r0, #0xc - ldr r0, [r3, r0] - lsl r0, r0, #0xd - lsr r0, r0, #0x1d - beq _0224D076 - add r6, #0x58 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xef - str r5, [r4, r6] - bl ov16_02251E1C - b _0224D084 -_0224D076: - add r6, #0x58 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x89 - str r5, [r4, r6] - bl ov16_02251E1C -_0224D084: - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D090: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - bl _0224D972 -_0224D09A: - mov r6, #0xc0 - add r0, r5, #0 - mul r0, r6 - add r3, r4, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - mov r1, #1 - ldr r2, [r3, r0] - lsl r1, r1, #0x18 - tst r1, r2 - beq _0224D112 - add r1, r0, #0 - sub r1, #0x34 - ldr r2, [r3, r1] - add r1, r0, #0 - sub r1, #0x30 - ldr r1, [r3, r1] - cmp r2, r1 - beq _0224D112 - cmp r2, #0 - beq _0224D112 - add r1, r0, #0 - add r1, #0xc - ldr r1, [r3, r1] - lsl r1, r1, #0xd - lsr r1, r1, #0x1d - beq _0224D0E0 - add r6, #0x58 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xef - str r5, [r4, r6] - bl ov16_02251E1C - b _0224D106 -_0224D0E0: - add r1, r6, #0 - add r1, #0x58 - str r5, [r4, r1] - add r1, r6, #0 - add r1, #0xc8 - add r6, #0x64 - str r1, [r4, r6] - sub r0, #0x30 - ldr r0, [r3, r0] - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _0224D300 ; =0x0000215C - mov r2, #0xa9 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C -_0224D106: - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D112: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - bl _0224D972 -_0224D11C: - ldr r0, [sp, #4] - add r1, r4, #0 - add r2, r5, #0 - bl ov16_022562E8 - cmp r0, #1 - bne _0224D12E - mov r0, #1 - str r0, [sp, #0x10] -_0224D12E: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - bl _0224D972 -_0224D138: - ldr r0, [sp, #4] - add r1, r4, #0 - add r2, r5, #0 - bl ov16_022579A4 - cmp r0, #1 - bne _0224D14A - mov r0, #1 - str r0, [sp, #0x10] -_0224D14A: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - bl _0224D972 -_0224D154: - ldr r0, [sp, #4] - add r1, r4, #0 - add r2, r5, #0 - bl ov16_02258008 - cmp r0, #1 - bne _0224D166 - mov r0, #1 - str r0, [sp, #0x10] -_0224D166: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - bl _0224D972 -_0224D170: - mov r3, #0xc0 - add r0, r5, #0 - mul r0, r3 - mov r2, #0xb7 - add r6, r4, r0 - lsl r2, r2, #6 - ldr r0, [r6, r2] - mov r1, #4 - tst r1, r0 - beq _0224D1D2 - mov r1, #3 - and r0, r1 - add r1, r0, #0 - mul r1, r3 - add r0, r4, r1 - sub r2, #0x34 - ldr r0, [r0, r2] - cmp r0, #0 - beq _0224D1D2 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _0224D1D2 - ldr r0, _0224D304 ; =0x00002D8C - ldr r1, [r6, r0] - cmp r1, #0 - beq _0224D1D2 - add r0, #0x34 - ldr r1, [r6, r0] - mov r0, #3 - and r1, r0 - mov r0, #0x47 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x45 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D1D2: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D1DA: - mov r2, #0xc0 - add r0, r5, #0 - mul r0, r2 - ldr r3, _0224D308 ; =0x00002DAC - add r0, r4, r0 - ldr r1, [r0, r3] - mov r6, #8 - tst r1, r6 - beq _0224D224 - add r1, r3, #0 - sub r1, #0x20 - ldr r1, [r0, r1] - cmp r1, #0 - beq _0224D224 - add r2, #0x58 - str r5, [r4, r2] - sub r3, #0x1c - ldr r1, [r0, r3] - add r0, r6, #0 - sub r0, #9 - mul r0, r1 - add r1, r6, #0 - bl ov16_022563F8 - ldr r1, _0224D300 ; =0x0000215C - mov r2, #0x17 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D224: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D22C: - mov r0, #0xc0 - mul r0, r5 - ldr r1, _0224D308 ; =0x00002DAC - add r6, r4, r0 - ldr r0, [r6, r1] - mov r2, #0x80 - tst r0, r2 - beq _0224D2A4 - add r0, r1, #0 - sub r0, #0x20 - ldr r0, [r6, r0] - cmp r0, #0 - beq _0224D2A4 - add r2, #0x98 - str r5, [r4, r2] - sub r1, #0x1c - ldr r0, [r6, r1] - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _0224D300 ; =0x0000215C - str r0, [r4, r1] - ldr r1, _0224D308 ; =0x00002DAC - mov r0, #0xf - ldr r2, [r6, r1] - lsl r0, r0, #8 - add r3, r2, #0 - and r3, r0 - cmp r3, r0 - beq _0224D270 - mov r0, #1 - lsl r0, r0, #8 - add r0, r2, r0 - str r0, [r6, r1] -_0224D270: - ldr r2, _0224D308 ; =0x00002DAC - ldr r0, _0224D300 ; =0x0000215C - ldr r3, [r6, r2] - mov r2, #0xf - lsl r2, r2, #8 - and r2, r3 - ldr r1, [r4, r0] - lsr r2, r2, #8 - mul r2, r1 - str r2, [r4, r0] - mov r1, #0 - ldr r2, [r4, r0] - mvn r1, r1 - mul r1, r2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x17 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D2A4: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D2AC: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r6, r4, r1 - ldr r1, _0224D308 ; =0x00002DAC - mov r2, #0x10 - ldr r3, [r6, r1] - tst r2, r3 - beq _0224D2E0 - sub r1, #0x20 - ldr r1, [r6, r1] - cmp r1, #0 - beq _0224D2E0 - add r0, #0x58 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1a - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D2E0: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D2E8: - mov r6, #0xc0 - add r0, r5, #0 - mul r0, r6 - add r3, r4, r0 - ldr r7, _0224D30C ; =0x00002DB0 - ldr r0, _0224D2FC ; =0x00003108 - b _0224D310 - nop -_0224D2F8: .word 0x000021EC -_0224D2FC: .word 0x00003108 -_0224D300: .word 0x0000215C -_0224D304: .word 0x00002D8C -_0224D308: .word 0x00002DAC -_0224D30C: .word 0x00002DB0 -_0224D310: - ldr r2, [r3, r7] - lsl r0, r0, #0x18 - tst r0, r2 - beq _0224D34E - add r0, r7, #0 - sub r0, #0x24 - ldr r0, [r3, r0] - cmp r0, #0 - beq _0224D34E - sub r0, r7, #4 - ldr r1, [r3, r0] - mov r0, #7 - tst r0, r1 - beq _0224D348 - add r6, #0x58 - str r5, [r4, r6] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x5e - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] - b _0224D34E -_0224D348: - ldr r0, _0224D650 ; =0xF7FFFFFF - and r0, r2 - str r0, [r3, r7] -_0224D34E: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D356: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r6, r4, r1 - ldr r1, _0224D654 ; =0x00002DB0 - mov r2, #1 - ldr r3, [r6, r1] - lsl r2, r2, #0x1c - tst r2, r3 - beq _0224D38C - sub r1, #0x24 - ldr r1, [r6, r1] - cmp r1, #0 - beq _0224D38C - add r0, #0x58 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x62 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D38C: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D394: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r6, r4, r1 - ldr r1, _0224D654 ; =0x00002DB0 - mov r7, #0xe - ldr r3, [r6, r1] - lsl r7, r7, #0xc - add r2, r3, #0 - tst r2, r7 - beq _0224D404 - add r2, r1, #0 - sub r2, #0x24 - ldr r2, [r6, r2] - cmp r2, #0 - beq _0224D404 - mov r2, #2 - lsl r2, r2, #0xc - sub r2, r3, r2 - str r2, [r6, r1] - ldr r2, [r6, r1] - tst r2, r7 - beq _0224D3E0 - sub r1, #0x20 - ldr r1, [r6, r1] - sub r0, #0xc1 - mul r0, r1 - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _0224D658 ; =0x0000215C - mov r2, #0x3b - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - b _0224D3EA -_0224D3E0: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x3c - bl ov16_02251E1C -_0224D3EA: - ldr r0, _0224D65C ; =0x00002DEA - ldrh r1, [r6, r0] - mov r0, #0x49 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #0xc - str r5, [r4, r0] - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D404: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D40C: - mov r0, #0x7b - str r0, [sp] - ldr r0, [sp, #4] - add r1, r4, #0 - mov r2, #4 - add r3, r5, #0 - bl ov16_022555A4 - mov r1, #0x4e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xc0 - mul r0, r5 - add r6, r4, r0 - ldr r0, _0224D660 ; =0x00002DAC - ldr r1, [r6, r0] - mov r0, #7 - tst r0, r1 - beq _0224D488 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _0224D488 - ldr r1, _0224D664 ; =0x00002D8C - ldr r0, [r6, r1] - cmp r0, #0 - beq _0224D488 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224D488 - add r0, r1, #4 - ldr r1, [r6, r0] - mov r0, #0 - mvn r0, r0 - mul r0, r1 - mov r1, #8 - bl ov16_022563F8 - ldr r1, _0224D658 ; =0x0000215C - ldr r2, _0224D668 ; =0x00000107 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, _0224D66C ; =0x0000213C - mov r1, #0x40 - ldr r2, [r4, r0] - orr r2, r1 - str r2, [r4, r0] - add r1, #0xd8 - str r5, [r4, r1] - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D488: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D490: - mov r0, #0xc0 - mul r0, r5 - add r7, r4, r0 - ldr r0, _0224D654 ; =0x00002DB0 - ldr r1, [r7, r0] - mov r0, #0x70 - tst r0, r1 - beq _0224D580 - ldr r0, [sp, #0xc] - mov r6, #0 - cmp r0, #0 - ble _0224D4F2 -_0224D4A8: - mov r0, #0xc0 - mul r0, r6 - add r2, r4, r0 - ldr r0, _0224D660 ; =0x00002DAC - ldr r1, [r2, r0] - mov r0, #7 - tst r0, r1 - beq _0224D4E6 - ldr r0, _0224D664 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _0224D4E6 - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x2b - beq _0224D4E6 - mov r0, #0x46 - lsl r0, r0, #2 - str r6, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x13 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224D4F2 -_0224D4E6: - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - ldr r0, [sp, #0xc] - cmp r6, r0 - blt _0224D4A8 -_0224D4F2: - ldr r0, [sp, #0xc] - cmp r6, r0 - beq _0224D4FE - mov r0, #2 - str r0, [sp, #0x10] - b _0224D972 -_0224D4FE: - ldr r0, _0224D654 ; =0x00002DB0 - ldr r1, [r7, r0] - sub r1, #0x10 - str r1, [r7, r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255498 - cmp r0, #0 - ldr r2, _0224D654 ; =0x00002DB0 - beq _0224D538 - ldr r1, [r7, r2] - mov r0, #0x70 - bic r1, r0 - mov r6, #0xf1 - add r0, r5, #0 - str r1, [r7, r2] - bl sub_020787CC - add r3, r6, #0 - add r3, #0x8f - lsl r2, r0, #8 - add r0, r6, #0 - sub r0, #0xf2 - ldr r1, [r4, r3] - eor r0, r2 - and r0, r1 - str r0, [r4, r3] - b _0224D564 -_0224D538: - ldr r1, [r7, r2] - mov r0, #0x70 - tst r0, r1 - beq _0224D544 - mov r6, #0xf0 - b _0224D564 -_0224D544: - mov r0, #0x70 - bic r1, r0 - mov r6, #0xf1 - add r0, r5, #0 - str r1, [r7, r2] - bl sub_020787CC - add r3, r6, #0 - add r3, #0x8f - lsl r2, r0, #8 - add r0, r6, #0 - sub r0, #0xf2 - ldr r1, [r4, r3] - eor r0, r2 - and r0, r1 - str r0, [r4, r3] -_0224D564: - mov r0, #0x46 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - add r2, r6, #0 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D580: - ldr r0, [sp, #0x10] - cmp r0, #2 - bne _0224D588 - b _0224D972 -_0224D588: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D590: - mov r2, #0xc0 - add r0, r5, #0 - mul r0, r2 - add r6, r4, r0 - ldr r0, _0224D654 ; =0x00002DB0 - lsl r2, r2, #4 - ldr r1, [r6, r0] - tst r2, r1 - beq _0224D5F0 - mov r2, #1 - lsl r2, r2, #0xa - sub r1, r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255498 - cmp r0, #0 - beq _0224D5C2 - ldr r1, _0224D654 ; =0x00002DB0 - ldr r0, _0224D670 ; =0xFFFFF3FF - ldr r2, [r6, r1] - and r0, r2 - str r0, [r6, r1] - b _0224D5F0 -_0224D5C2: - ldr r0, _0224D654 ; =0x00002DB0 - ldr r1, [r6, r0] - mov r0, #3 - lsl r0, r0, #0xa - tst r0, r1 - bne _0224D5F0 - mov r0, #7 - tst r0, r1 - bne _0224D5F0 - add r0, r4, #0 - add r0, #0x94 - str r5, [r0, #0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x33 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D5F0: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D5F8: - mov r0, #0xc0 - add r6, r5, #0 - mul r6, r0 - add r0, r4, r6 - ldr r1, _0224D674 ; =0x00002DE8 - mov ip, r0 - ldrh r3, [r0, r1] - cmp r3, #0 - beq _0224D6A4 - ldr r7, _0224D678 ; =0x00002D4C - mov r2, #0 - mov r1, ip -_0224D610: - ldrh r0, [r1, r7] - cmp r3, r0 - beq _0224D61E - add r2, r2, #1 - add r1, r1, #2 - cmp r2, #4 - blt _0224D610 -_0224D61E: - cmp r2, #4 - bne _0224D62E - ldr r0, _0224D67C ; =0x00002DC8 - add r1, r4, r0 - ldr r2, [r1, r6] - mov r0, #7 - bic r2, r0 - str r2, [r1, r6] -_0224D62E: - ldr r1, _0224D67C ; =0x00002DC8 - add r0, r4, r6 - ldr r0, [r0, r1] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1d - beq _0224D680 - add r2, r4, r1 - ldr r1, [r2, r6] - mov r3, #7 - bic r1, r3 - sub r3, r0, #1 - mov r0, #7 - and r0, r3 - orr r0, r1 - str r0, [r2, r6] - b _0224D6A4 - nop -_0224D650: .word 0xF7FFFFFF -_0224D654: .word 0x00002DB0 -_0224D658: .word 0x0000215C -_0224D65C: .word 0x00002DEA -_0224D660: .word 0x00002DAC -_0224D664: .word 0x00002D8C -_0224D668: .word 0x00000107 -_0224D66C: .word 0x0000213C -_0224D670: .word 0xFFFFF3FF -_0224D674: .word 0x00002DE8 -_0224D678: .word 0x00002D4C -_0224D67C: .word 0x00002DC8 -_0224D680: - mov r2, #0 - add r1, #0x20 - mov r0, ip - strh r2, [r0, r1] - mov r0, #0x46 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x48 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D6A4: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D6AC: - mov r0, #0xc0 - add r6, r5, #0 - mul r6, r0 - add r0, r4, r6 - ldr r1, _0224D99C ; =0x00002DEC - str r0, [sp, #8] - ldrh r2, [r0, r1] - cmp r2, #0 - beq _0224D734 - ldr r7, _0224D9A0 ; =0x00002D4C - mov r3, #0 - add r1, r0, #0 -_0224D6C4: - ldrh r0, [r1, r7] - cmp r2, r0 - beq _0224D6D2 - add r3, r3, #1 - add r1, r1, #2 - cmp r3, #4 - blt _0224D6C4 -_0224D6D2: - cmp r3, #4 - beq _0224D6E4 - beq _0224D6F0 - ldr r0, [sp, #8] - add r1, r0, r3 - ldr r0, _0224D9A4 ; =0x00002D6C - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224D6F0 -_0224D6E4: - ldr r0, _0224D9A8 ; =0x00002DC8 - add r2, r4, r0 - ldr r1, [r2, r6] - mov r0, #0x38 - bic r1, r0 - str r1, [r2, r6] -_0224D6F0: - ldr r1, _0224D9A8 ; =0x00002DC8 - add r0, r4, r6 - ldr r0, [r0, r1] - lsl r0, r0, #0x1a - lsr r2, r0, #0x1d - beq _0224D710 - add r1, r4, r1 - sub r2, r2, #1 - lsl r2, r2, #0x1d - ldr r0, [r1, r6] - mov r3, #0x38 - bic r0, r3 - lsr r2, r2, #0x1a - orr r0, r2 - str r0, [r1, r6] - b _0224D734 -_0224D710: - ldr r0, [sp, #8] - mov r2, #0 - add r1, #0x24 - strh r2, [r0, r1] - mov r0, #0x46 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4a - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D734: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D73C: - mov r0, #0xc0 - mul r0, r5 - add r3, r4, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r2, [r3, r0] - mov r1, #0x18 - tst r1, r2 - beq _0224D752 - sub r2, #8 - str r2, [r3, r0] -_0224D752: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D75A: - mov r0, #0xc0 - mul r0, r5 - ldr r2, _0224D9A8 ; =0x00002DC8 - add r5, r4, r0 - ldr r1, [r5, r2] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1e - beq _0224D798 - add r3, r4, r2 - ldr r6, [r3, r0] - mov r1, #0xc0 - add r7, r6, #0 - bic r7, r1 - lsl r1, r6, #0x18 - lsr r1, r1, #0x1e - sub r1, r1, #1 - lsl r1, r1, #0x1e - lsr r1, r1, #0x18 - orr r1, r7 - str r1, [r3, r0] - ldr r0, [r3, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1e - bne _0224D798 - add r0, r2, #0 - sub r0, #8 - ldr r1, [r5, r0] - ldr r0, _0224D9AC ; =0xFFFFFDFF - sub r2, #8 - and r0, r1 - str r0, [r5, r2] -_0224D798: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D7A0: - ldr r0, _0224D9A8 ; =0x00002DC8 - mov r2, #0xc0 - add r3, r5, #0 - mul r3, r2 - add r1, r4, r0 - ldr r7, [r1, r3] - lsl r0, r7, #0x15 - lsr r6, r0, #0x1d - beq _0224D7E4 - ldr r0, _0224D9B0 ; =0xFFFFF8FF - and r7, r0 - sub r0, r6, #1 - lsl r0, r0, #0x1d - lsr r0, r0, #0x15 - orr r0, r7 - str r0, [r1, r3] - ldr r0, [r1, r3] - lsl r0, r0, #0x15 - lsr r0, r0, #0x1d - bne _0224D7E4 - add r0, r2, #0 - add r0, #0x58 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - add r2, #0x60 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D7E4: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D7EC: - ldr r0, _0224D9B4 ; =0x00002DCC - mov r1, #0xc0 - add r3, r5, #0 - mul r3, r1 - add r2, r4, r0 - ldr r7, [r2, r3] - lsl r0, r7, #0x10 - lsr r6, r0, #0x1d - beq _0224D82E - ldr r0, _0224D9B8 ; =0xFFFF1FFF - and r7, r0 - sub r0, r6, #1 - lsl r0, r0, #0x1d - lsr r0, r0, #0x10 - orr r0, r7 - str r0, [r2, r3] - ldr r0, [r2, r3] - lsl r0, r0, #0x10 - lsr r0, r0, #0x1d - bne _0224D82E - add r1, #0x58 - str r5, [r4, r1] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf2 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D82E: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D836: - ldr r0, _0224D9B4 ; =0x00002DCC - mov r1, #0xc0 - add r3, r5, #0 - mul r3, r1 - add r2, r4, r0 - ldr r7, [r2, r3] - lsl r0, r7, #0xd - lsr r6, r0, #0x1d - beq _0224D878 - ldr r0, _0224D9BC ; =0xFFF8FFFF - and r7, r0 - sub r0, r6, #1 - lsl r0, r0, #0x1d - lsr r0, r0, #0xd - orr r0, r7 - str r0, [r2, r3] - ldr r0, [r2, r3] - lsl r0, r0, #0xd - lsr r0, r0, #0x1d - bne _0224D878 - add r1, #0x58 - str r5, [r4, r1] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf3 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D878: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D880: - ldr r0, _0224D9B4 ; =0x00002DCC - mov r1, #0xc0 - add r3, r5, #0 - mul r3, r1 - add r2, r4, r0 - ldr r7, [r2, r3] - lsl r0, r7, #0xa - lsr r6, r0, #0x1d - beq _0224D8C2 - ldr r0, _0224D9C0 ; =0xFFC7FFFF - and r7, r0 - sub r0, r6, #1 - lsl r0, r0, #0x1d - lsr r0, r0, #0xa - orr r0, r7 - str r0, [r2, r3] - ldr r0, [r2, r3] - lsl r0, r0, #0xa - lsr r0, r0, #0x1d - bne _0224D8C2 - add r1, #0x58 - str r5, [r4, r1] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf4 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D8C2: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D8CA: - mov r6, #0xc0 - add r0, r5, #0 - mul r0, r6 - mov r3, #0xb7 - add r1, r4, r0 - lsl r3, r3, #6 - ldr r0, [r1, r3] - lsl r2, r6, #5 - tst r2, r0 - beq _0224D912 - mov r2, #2 - lsl r2, r2, #0xa - sub r0, r0, r2 - str r0, [r1, r3] - ldr r1, [r1, r3] - lsl r0, r6, #5 - tst r0, r1 - bne _0224D912 - add r0, r4, #0 - add r0, #0x94 - str r5, [r0, #0] - add r0, r4, #0 - mov r1, #4 - add r0, #0x88 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x12 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D912: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D91A: - ldr r0, [sp, #4] - add r1, r4, #0 - add r2, r5, #0 - add r3, sp, #0x14 - bl ov16_02258104 - cmp r0, #1 - bne _0224D946 - mov r0, #0x46 - lsl r0, r0, #2 - str r5, [r4, r0] - ldr r2, [sp, #0x14] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #0x10] -_0224D946: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D94E: - ldr r0, [sp, #4] - add r1, r4, #0 - add r2, r5, #0 - bl ov16_022587A4 - cmp r0, #1 - bne _0224D960 - mov r0, #1 - str r0, [sp, #0x10] -_0224D960: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0224D972 -_0224D968: - mov r0, #0 - str r0, [r4, #0x18] - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] -_0224D972: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _0224D982 - ldr r0, [sp, #4] - bl ov16_02266AA0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_0224D982: - ldr r1, [r4, #0x1c] - ldr r0, [sp, #0xc] - cmp r1, r0 - bge _0224D98E - bl _0224CFC8 -_0224D98E: - mov r0, #0 - str r0, [r4, #0x18] - str r0, [r4, #0x1c] - mov r0, #0xb - str r0, [r4, #8] -_0224D998: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D99C: .word 0x00002DEC -_0224D9A0: .word 0x00002D4C -_0224D9A4: .word 0x00002D6C -_0224D9A8: .word 0x00002DC8 -_0224D9AC: .word 0xFFFFFDFF -_0224D9B0: .word 0xFFFFF8FF -_0224D9B4: .word 0x00002DCC -_0224D9B8: .word 0xFFFF1FFF -_0224D9BC: .word 0xFFF8FFFF -_0224D9C0: .word 0xFFC7FFFF - thumb_func_end ov16_0224CF7C - - thumb_func_start ov16_0224D9C4 -ov16_0224D9C4: ; 0x0224D9C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - str r0, [sp] - bl ov16_0223DF1C - ldr r1, [r4, #8] - add r7, r0, #0 - add r0, r4, #0 - add r2, r1, #0 - mov r3, #1 - bl ov16_02250EF4 - cmp r0, #1 - bne _0224D9E4 - b _0224DBF4 -_0224D9E4: - ldr r0, [sp] - bl ov16_02266AA0 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224D9FC - cmp r0, #1 - beq _0224DAE6 - cmp r0, #2 - bne _0224D9FA - b _0224DBAC -_0224D9FA: - b _0224DBEA -_0224D9FC: - ldr r0, [r4, #0x24] - cmp r0, r7 - bge _0224DADC - add r5, r4, #0 - add r5, #0x24 -_0224DA06: - add r1, r4, r0 - ldr r0, _0224DBF8 ; =0x000021EC - ldrb r6, [r1, r0] - add r0, r6, #0 - bl sub_020787CC - ldr r1, _0224DBFC ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - ldr r0, [r5, #0] - beq _0224DA22 - add r0, r0, #1 - str r0, [r5, #0] - b _0224DAD6 -_0224DA22: - add r0, r0, #1 - mov r1, #0x62 - str r0, [r5, #0] - add r0, r4, r6 - lsl r1, r1, #2 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _0224DAD6 - mov r1, #0x62 - lsl r1, r1, #2 - ldrb r1, [r0, r1] - sub r2, r1, #1 - mov r1, #0x62 - lsl r1, r1, #2 - strb r2, [r0, r1] - ldrb r0, [r0, r1] - cmp r0, #0 - bne _0224DAD6 - mov r0, #0xc0 - mul r0, r6 - add r1, r4, r0 - ldr r0, _0224DC00 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224DAD6 - ldr r0, [sp] - add r1, r6, #0 - bl ov16_0223E208 - mov r2, #0x6f - lsl r2, r2, #2 - add r1, r4, r2 - lsl r5, r0, #2 - ldr r3, [r1, r5] - mov r0, #0x10 - bic r3, r0 - add r0, r4, #0 - str r3, [r1, r5] - add r2, #0x1f - add r0, #0xf6 - strh r2, [r0] - add r0, r4, #0 - mov r1, #0xa - add r0, #0xf5 - strb r1, [r0] - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02255560 - add r1, r4, #0 - add r1, #0xf8 - str r0, [r1, #0] - mov r0, #0x19 - lsl r0, r0, #4 - add r1, r4, #0 - add r3, r4, r0 - lsl r2, r6, #1 - ldrh r5, [r3, r2] - add r1, #0xfc - str r5, [r1, #0] - add r1, r0, #0 - sub r1, #0x78 - str r6, [r4, r1] - lsl r1, r6, #2 - add r5, r0, #0 - add r1, r4, r1 - add r5, #8 - ldr r6, [r1, r5] - add r5, r0, #0 - sub r5, #0x74 - str r6, [r4, r5] - ldrh r3, [r3, r2] - add r2, r0, #0 - sub r2, #0x6c - str r3, [r4, r2] - add r0, #0x18 - ldr r1, [r1, r0] - ldr r0, _0224DC04 ; =0x0000215C - mov r2, #0x79 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #8 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224DAD6: - ldr r0, [r4, #0x24] - cmp r0, r7 - blt _0224DA06 -_0224DADC: - ldr r0, [r4, #0x20] - add r0, r0, #1 - str r0, [r4, #0x20] - mov r0, #0 - str r0, [r4, #0x24] -_0224DAE6: - ldr r0, [r4, #0x24] - cmp r0, r7 - bge _0224DBA2 - add r5, r4, #0 - add r5, #0x24 -_0224DAF0: - add r1, r4, r0 - ldr r0, _0224DBF8 ; =0x000021EC - ldrb r6, [r1, r0] - add r0, r6, #0 - bl sub_020787CC - ldr r1, _0224DBFC ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - ldr r0, [r5, #0] - beq _0224DB0C - add r0, r0, #1 - str r0, [r5, #0] - b _0224DB9C -_0224DB0C: - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0xc0 - mul r0, r6 - mov r1, #0xb7 - add r3, r4, r0 - lsl r1, r1, #6 - ldr r2, [r3, r1] - mov r1, #0x20 - tst r1, r2 - beq _0224DB9C - ldr r7, _0224DC08 ; =0x00002DC8 - add r2, r4, r7 - ldr r1, [r2, r0] - lsl r1, r1, #0x11 - lsr r1, r1, #0x1e - bne _0224DB66 - add r1, r7, #0 - sub r1, #8 - add r1, r4, r1 - str r1, [sp, #4] - ldr r1, [r1, r0] - mov r5, #0x20 - bic r1, r5 - ldr r5, [sp, #4] - sub r7, #0x3c - str r1, [r5, r0] - ldr r0, [r2, r0] - lsl r0, r0, #0x11 - lsr r1, r0, #0x1e - mov r0, #0x13 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, [r3, r7] - ldr r1, _0224DC04 ; =0x0000215C - neg r0, r0 - str r0, [r4, r1] - add r0, r1, #0 - sub r0, #0x20 - ldr r2, [r4, r0] - mov r0, #0x40 - orr r0, r2 - sub r1, #0x20 - str r0, [r4, r1] - b _0224DB80 -_0224DB66: - mov r3, #0x13 - lsl r3, r3, #4 - str r1, [r4, r3] - ldr r3, [r2, r0] - ldr r1, _0224DC0C ; =0xFFFF9FFF - and r1, r3 - lsl r3, r3, #0x11 - lsr r3, r3, #0x1e - sub r3, r3, #1 - lsl r3, r3, #0x1e - lsr r3, r3, #0x11 - orr r1, r3 - str r1, [r2, r0] -_0224DB80: - mov r0, #0x46 - lsl r0, r0, #2 - str r6, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x66 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #8 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224DB9C: - ldr r0, [r4, #0x24] - cmp r0, r7 - blt _0224DAF0 -_0224DBA2: - ldr r0, [r4, #0x20] - add r0, r0, #1 - str r0, [r4, #0x20] - mov r0, #0 - str r0, [r4, #0x24] -_0224DBAC: - mov r1, #6 - lsl r1, r1, #6 - ldr r3, [r4, r1] - mov r2, #7 - lsl r2, r2, #0x10 - add r0, r3, #0 - tst r0, r2 - beq _0224DBE0 - mov r0, #1 - lsl r0, r0, #0x10 - sub r0, r3, r0 - str r0, [r4, r1] - ldr r0, [r4, r1] - tst r0, r2 - bne _0224DBE0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xfb - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #8 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224DBE0: - ldr r0, [r4, #0x20] - add r0, r0, #1 - str r0, [r4, #0x20] - mov r0, #0 - str r0, [r4, #0x24] -_0224DBEA: - mov r0, #0 - str r0, [r4, #0x20] - str r0, [r4, #0x24] - mov r0, #0xc - str r0, [r4, #8] -_0224DBF4: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DBF8: .word 0x000021EC -_0224DBFC: .word 0x00003108 -_0224DC00: .word 0x00002D8C -_0224DC04: .word 0x0000215C -_0224DC08: .word 0x00002DC8 -_0224DC0C: .word 0xFFFF9FFF - thumb_func_end ov16_0224D9C4 - - thumb_func_start ov16_0224DC10 -ov16_0224DC10: ; 0x0224DC10 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #8] - add r5, r0, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov16_02250F98 - cmp r0, #1 - beq _0224DC64 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02250A48 - cmp r0, #1 - beq _0224DC64 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225079C - cmp r0, #1 - beq _0224DC64 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r0, [r4, r1] - add r0, r0, #1 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x24 - ldr r0, [r4, r0] - add r1, #0x24 - add r0, r0, #1 - str r0, [r4, r1] - add r0, r4, #0 - bl ov16_022541C4 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02254990 - mov r0, #2 - str r0, [r4, #8] -_0224DC64: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0224DC10 - - thumb_func_start ov16_0224DC68 -ov16_0224DC68: ; 0x0224DC68 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xec - ldr r0, [r0, #0] - mov r4, #0 - add r1, r5, r0 - ldr r0, _0224DD90 ; =0x000021E8 - ldrb r2, [r1, r0] - lsl r0, r2, #6 - add r1, r5, r0 - mov r0, #0x75 - str r2, [r5, #0x64] - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _0224DC9C - mov r0, #0xc1 - mov r1, #0xa5 - lsl r0, r0, #6 - str r1, [r5, r0] - mov r4, #1 - b _0224DD60 -_0224DC9C: - mov r0, #0xc0 - mul r0, r2 - ldr r6, _0224DD94 ; =0x00002DEC - add r0, r5, r0 - ldrh r1, [r0, r6] - cmp r1, #0 - beq _0224DCC4 - add r3, r6, #2 - ldrh r3, [r0, r3] - sub r6, #0xa0 - lsl r3, r3, #1 - add r0, r0, r3 - ldrh r0, [r0, r6] - cmp r1, r0 - bne _0224DCC4 - mov r0, #0xc1 - lsl r0, r0, #6 - str r1, [r5, r0] - mov r4, #1 - b _0224DD60 -_0224DCC4: - cmp r1, #0 - beq _0224DD16 - mov r7, #0xc0 - add r0, r2, #0 - mul r0, r7 - ldr r3, _0224DD98 ; =0x00002DEE - add r0, r5, r0 - ldrh r6, [r0, r3] - lsl r6, r6, #1 - add r6, r0, r6 - add r0, r3, #0 - sub r0, #0xa2 - ldrh r0, [r6, r0] - cmp r1, r0 - beq _0224DD16 - mov r1, #0xc1 - lsl r1, r1, #6 - str r0, [r5, r1] - ldr r1, [r5, #0x64] - mov r0, #0 - add r2, r1, #0 - mul r2, r7 - add r2, r5, r2 - sub r1, r3, #2 - strh r0, [r2, r1] - ldr r1, [r5, #0x64] - mov r4, #1 - add r2, r1, #0 - mul r2, r7 - add r1, r5, r2 - strh r0, [r1, r3] - ldr r0, [r5, #0x64] - sub r3, #0x26 - add r2, r0, #0 - add r3, r5, r3 - mul r2, r7 - ldr r1, [r3, r2] - mov r0, #0x38 - bic r1, r0 - str r1, [r3, r2] - b _0224DD60 -_0224DD16: - add r0, r5, #0 - add r1, r2, #0 - bl ov16_02259A28 - cmp r0, #0 - bne _0224DD32 - ldr r0, [r5, #0x64] - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0224DD9C ; =0x0000304C - ldr r1, [r1, r0] - sub r0, #0xc - str r1, [r5, r0] - b _0224DD60 -_0224DD32: - ldr r2, [r5, #0x64] - mov r0, #0xc0 - mul r0, r2 - lsl r1, r2, #1 - add r3, r5, r0 - add r0, r5, r1 - ldr r1, _0224DDA0 ; =0x000030BC - ldrh r2, [r0, r1] - lsl r2, r2, #1 - add r3, r3, r2 - ldr r2, _0224DDA4 ; =0x00002D4C - ldrh r3, [r3, r2] - add r2, r1, #0 - sub r2, #8 - ldrh r0, [r0, r2] - cmp r0, r3 - beq _0224DD5C - sub r1, #0x7c - str r3, [r5, r1] - mov r4, #1 - b _0224DD60 -_0224DD5C: - sub r1, #0x7c - str r3, [r5, r1] -_0224DD60: - mov r3, #0xc1 - lsl r3, r3, #6 - ldr r1, [r5, r3] - add r0, r3, #4 - str r1, [r5, r0] - mov r0, #0x16 - str r0, [r5, #8] - str r4, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r3, [r5, r3] - ldr r0, [sp, #8] - lsl r3, r3, #0x10 - ldr r2, [r5, #0x64] - add r1, r5, #0 - lsr r3, r3, #0x10 - bl ov16_02253954 - str r0, [r5, #0x6c] - ldr r0, [sp, #8] - bl ov16_02266AA0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DD90: .word 0x000021E8 -_0224DD94: .word 0x00002DEC -_0224DD98: .word 0x00002DEE -_0224DD9C: .word 0x0000304C -_0224DDA0: .word 0x000030BC -_0224DDA4: .word 0x00002D4C - thumb_func_end ov16_0224DC68 - - thumb_func_start ov16_0224DDA8 -ov16_0224DDA8: ; 0x0224DDA8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0xec - ldr r2, [r2, #0] - add r7, r0, #0 - add r3, r4, r2 - ldr r2, _0224DEE4 ; =0x000021E8 - ldrb r2, [r3, r2] - str r2, [r4, #0x64] - bl ov16_02257028 - str r0, [r4, #0x6c] - ldr r0, _0224DEE8 ; =0x000021B0 - ldr r1, [r4, #0x64] - add r2, r4, r0 - lsl r0, r1, #4 - add r6, r2, r0 - add r0, r7, #0 - bl ov16_0223E208 - cmp r0, #0 - beq _0224DE50 - ldr r0, [r4, #0x64] - asr r0, r0, #1 - add r1, r4, r0 - ldr r0, _0224DEEC ; =0x000003D1 - ldrb r2, [r1, r0] - cmp r2, #4 - bhi _0224DE3C - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224DDF0: ; jump table - .short _0224DDFA - _0224DDF0 - 2 ; case 0 - .short _0224DDFE - _0224DDF0 - 2 ; case 1 - .short _0224DE02 - _0224DDF0 - 2 ; case 2 - .short _0224DE2C - _0224DDF0 - 2 ; case 3 - .short _0224DE3A - _0224DDF0 - 2 ; case 4 -_0224DDFA: - ldr r5, _0224DEF0 ; =0x00000121 - b _0224DE3C -_0224DDFE: - ldr r5, _0224DEF4 ; =0x0000010B - b _0224DE3C -_0224DE02: - add r0, r0, #2 - ldrb r0, [r1, r0] - mov r1, #1 - tst r1, r0 - beq _0224DE1C - mov r1, #0x3e - add r2, r0, #0 - tst r2, r1 - beq _0224DE1C - mov r0, #6 - add r1, #0xf2 - str r0, [r4, r1] - b _0224DE26 -_0224DE1C: - bl sub_020787EC - mov r1, #0x13 - lsl r1, r1, #4 - str r0, [r4, r1] -_0224DE26: - mov r5, #0x43 - lsl r5, r5, #2 - b _0224DE3C -_0224DE2C: - add r0, r0, #2 - ldrb r0, [r1, r0] - mov r5, #0x13 - lsl r5, r5, #4 - str r0, [r4, r5] - sub r5, #0x23 - b _0224DE3C -_0224DE3A: - ldr r5, _0224DEF8 ; =0x0000010E -_0224DE3C: - ldr r1, [r4, #0x64] - mov r0, #1 - bic r1, r0 - ldr r0, _0224DEFC ; =0x000003D6 - add r1, r4, r1 - ldrh r1, [r1, r0] - mov r0, #0x4a - lsl r0, r0, #2 - str r1, [r4, r0] - b _0224DEC2 -_0224DE50: - ldrb r0, [r6, #2] - cmp r0, #3 - bhi _0224DEBA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224DE62: ; jump table - .short _0224DE6A - _0224DE62 - 2 ; case 0 - .short _0224DE6A - _0224DE62 - 2 ; case 1 - .short _0224DE80 - _0224DE62 - 2 ; case 2 - .short _0224DE6A - _0224DE62 - 2 ; case 3 -_0224DE6A: - ldrh r1, [r6] - ldr r0, _0224DF00 ; =0x0000FFC1 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _0224DE7C - mov r5, #0xde - b _0224DEBA -_0224DE7C: - mov r5, #0xdf - b _0224DEBA -_0224DE80: - add r0, r7, #0 - mov r5, #0xb - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - bne _0224DEBA - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - bne _0224DEBA - add r0, r7, #0 - bl ov16_0223E1AC - ldrh r1, [r6] - mov r2, #1 - mov r3, #5 - bl sub_0207D60C - add r0, r7, #0 - bl ov16_0223E1B0 - ldrh r1, [r6] - ldrb r2, [r6, #2] - bl sub_0207DA1C -_0224DEBA: - ldrh r1, [r6] - mov r0, #0x4a - lsl r0, r0, #2 - str r1, [r4, r0] -_0224DEC2: - add r0, r4, #0 - mov r1, #1 - add r2, r5, #0 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - ldr r1, _0224DF04 ; =0x0000216C - mov r0, #2 - ldr r2, [r4, r1] - lsl r0, r0, #0x1e - orr r0, r2 - str r0, [r4, r1] - pop {r3, r4, r5, r6, r7, pc} - nop -_0224DEE4: .word 0x000021E8 -_0224DEE8: .word 0x000021B0 -_0224DEEC: .word 0x000003D1 -_0224DEF0: .word 0x00000121 -_0224DEF4: .word 0x0000010B -_0224DEF8: .word 0x0000010E -_0224DEFC: .word 0x000003D6 -_0224DF00: .word 0x0000FFC1 -_0224DF04: .word 0x0000216C - thumb_func_end ov16_0224DDA8 - - thumb_func_start ov16_0224DF08 -ov16_0224DF08: ; 0x0224DF08 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - mov r2, #9 - bl ov16_02251E1C - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - ldr r1, _0224DF48 ; =0x000021E8 - add r0, r4, r0 - ldrb r0, [r0, r1] - mov r2, #0 - str r0, [r4, #0x64] - str r0, [r4, #0x78] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x28 - str r0, [r4, #0xc] - mov r0, #0x4e - lsl r0, r0, #2 - str r2, [r4, r0] - add r0, r1, #0 - sub r0, #0x7c - ldr r2, [r4, r0] - mov r0, #2 - lsl r0, r0, #0x1e - orr r0, r2 - sub r1, #0x7c - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 -_0224DF48: .word 0x000021E8 - thumb_func_end ov16_0224DF08 - - thumb_func_start ov16_0224DF4C -ov16_0224DF4C: ; 0x0224DF4C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r1, #0xec - ldr r1, [r1, #0] - add r5, r0, #0 - add r2, r4, r1 - ldr r1, _0224E004 ; =0x000021E8 - ldrb r1, [r2, r1] - str r1, [r4, #0x64] - bl ov16_0223E208 - cmp r0, #0 - beq _0224DFBE - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - bne _0224DFBE - ldr r0, [r4, #0x64] - mov r2, #0xc0 - add r1, r0, #0 - mul r1, r2 - ldr r0, _0224E008 ; =0x00002DB0 - add r1, r4, r1 - ldr r1, [r1, r0] - ldr r0, _0224E00C ; =0x0400E000 - tst r0, r1 - beq _0224DFA2 - add r0, r4, #0 - mov r1, #1 - add r2, #0x5e - bl ov16_02251E1C - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224DFA2: - add r0, r4, #0 - mov r1, #1 - mov r2, #0xe6 - bl ov16_02251E1C - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x2b - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224DFBE: - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255DE8 - cmp r0, #0 - beq _0224DFE8 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - bl ov16_02251E1C - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x2b - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224DFE8: - add r0, r4, #0 - mov r1, #1 - mov r2, #8 - bl ov16_02251E1C - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224E004: .word 0x000021E8 -_0224E008: .word 0x00002DB0 -_0224E00C: .word 0x0400E000 - thumb_func_end ov16_0224DF4C - - thumb_func_start ov16_0224E010 -ov16_0224E010: ; 0x0224E010 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _0224E054 ; =0x00000113 - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0 - str r0, [r4, #0x64] - mov r0, #1 - str r0, [r4, #0x6c] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - mov r0, #0x4a - mov r1, #5 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r5, #0 - bl ov16_0223ED8C - sub r1, r0, #1 - add r0, r5, #0 - bl ov16_0223ED98 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov16_022661CC - pop {r3, r4, r5, pc} - nop -_0224E054: .word 0x00000113 - thumb_func_end ov16_0224E010 - - thumb_func_start ov16_0224E058 -ov16_0224E058: ; 0x0224E058 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xe3 - bl ov16_02251E1C - mov r0, #0 - str r0, [r4, #0x64] - mov r0, #1 - str r0, [r4, #0x6c] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - mov r0, #0x4e - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _0224E0B0 ; =0x0000311C - ldrb r1, [r4, r0] - cmp r1, #0xc - bhs _0224E096 - add r1, r1, #1 - strb r1, [r4, r0] -_0224E096: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224E0AC - ldr r0, _0224E0B4 ; =0x0000311D - ldrb r1, [r4, r0] - cmp r1, #0xc - bhs _0224E0AC - add r1, r1, #1 - strb r1, [r4, r0] -_0224E0AC: - pop {r3, r4, r5, pc} - nop -_0224E0B0: .word 0x0000311C -_0224E0B4: .word 0x0000311D - thumb_func_end ov16_0224E058 - - thumb_func_start ov16_0224E0B8 -ov16_0224E0B8: ; 0x0224E0B8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xe4 - bl ov16_02251E1C - mov r0, #0 - str r0, [r4, #0x64] - mov r0, #1 - str r0, [r4, #0x6c] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - mov r0, #0x4e - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _0224E114 ; =0x0000311D - ldrb r1, [r4, r0] - cmp r1, #0 - beq _0224E0F6 - sub r1, r1, #1 - strb r1, [r4, r0] -_0224E0F6: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _0224E112 - mov r1, #1 - sub r0, #8 - str r1, [r4, r0] - ldr r0, _0224E118 ; =0x0000311C - ldrb r1, [r4, r0] - cmp r1, #0 - beq _0224E112 - sub r1, r1, #1 - strb r1, [r4, r0] -_0224E112: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224E114: .word 0x0000311D -_0224E118: .word 0x0000311C - thumb_func_end ov16_0224E0B8 - - thumb_func_start ov16_0224E11C -ov16_0224E11C: ; 0x0224E11C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0xe5 - bl ov16_02251E1C - mov r0, #0 - str r0, [r4, #0x64] - mov r0, #1 - str r0, [r4, #0x6c] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x27 - str r0, [r4, #0xc] - pop {r4, pc} - thumb_func_end ov16_0224E11C - - thumb_func_start ov16_0224E13C -ov16_0224E13C: ; 0x0224E13C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - bl ov16_0223DF0C - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl ov16_0223E16C - str r0, [sp, #0x28] - mov r0, #0x84 - tst r0, r6 - beq _0224E162 - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E162: - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E208 - cmp r0, #0 - beq _0224E174 - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E174: - mov r0, #0x40 - tst r0, r6 - beq _0224E18C - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223E1F8 - cmp r0, #4 - bne _0224E18C - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E18C: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02259ADC - cmp r0, #1 - bne _0224E19E - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E19E: - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02259A28 - cmp r0, #0 - bne _0224E1B0 - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E1B0: - ldr r0, _0224E42C ; =0x00003044 - ldr r0, [r4, r0] - cmp r0, #0x75 - bne _0224E1CA - ldr r0, _0224E430 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #2 - lsl r0, r0, #8 - tst r0, r1 - beq _0224E1CA - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E1CA: - ldr r0, [sp, #0x28] - bl sub_02025F58 - cmp r0, #8 - blt _0224E1DA - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E1DA: - ldr r0, [sp, #0x28] - mov r6, #0xa - bl sub_02025F58 - cmp r0, #2 - blt _0224E1E8 - mov r6, #0x1e -_0224E1E8: - ldr r0, [sp, #0x28] - bl sub_02025F58 - cmp r0, #4 - blt _0224E1F4 - mov r6, #0x32 -_0224E1F4: - ldr r0, [sp, #0x28] - bl sub_02025F58 - cmp r0, #6 - blt _0224E200 - mov r6, #0x46 -_0224E200: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - str r0, [sp, #0x20] - add r1, r4, r0 - ldr r0, _0224E434 ; =0x00002D74 - ldrb r0, [r1, r0] - cmp r0, r6 - bhi _0224E218 - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E218: - add r0, r5, #0 - bl ov16_0223F4BC - ldr r1, [sp, #0x20] - lsl r0, r0, #0x18 - add r2, r4, r1 - ldr r1, _0224E434 ; =0x00002D74 - lsr r0, r0, #0x18 - ldrb r2, [r2, r1] - add r2, r6, r2 - mul r0, r2 - asr r0, r0, #8 - cmp r0, r6 - bge _0224E23A - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224E23A: - ldr r0, _0224E42C ; =0x00003044 - ldr r0, [r4, r0] - cmp r0, #0x63 - bne _0224E252 - add r1, #0x3c - add r0, r4, r1 - ldr r1, [sp, #0x20] - ldr r2, [r0, r1] - ldr r1, _0224E438 ; =0xFF7FFFFF - and r2, r1 - ldr r1, [sp, #0x20] - str r2, [r0, r1] -_0224E252: - ldr r0, [r4, #0x64] - mov r1, #0xc0 - mul r1, r0 - str r0, [sp, #0x1c] - ldr r0, _0224E43C ; =0x00002DAC - add r1, r4, r1 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _0224E27C - ldr r0, _0224E42C ; =0x00003044 - ldr r0, [r4, r0] - cmp r0, #0xad - beq _0224E272 - cmp r0, #0xd6 - bne _0224E27C -_0224E272: - mov r0, #0xfe - str r0, [r7, #0] - add sp, #0x30 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224E27C: - ldr r0, [sp, #0x1c] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _0224E434 ; =0x00002D74 - add r1, r4, r1 - ldrb r0, [r1, r0] - str r0, [sp, #0x24] - add r0, r5, #0 - bl ov16_0223F4BC - ldr r1, [sp, #0x24] - lsl r0, r0, #0x18 - add r1, r6, r1 - lsr r0, r0, #0x18 - mul r0, r1 - asr r0, r0, #8 - cmp r0, r6 - bge _0224E364 - ldr r0, [sp, #0x1c] - lsl r0, r0, #1 - add r1, r4, r0 - ldr r0, _0224E440 ; =0x000030BC - ldrh r0, [r1, r0] - bl sub_020787CC - add r3, r0, #0 - mov r0, #0 - mvn r0, r0 - str r0, [sp] - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02254A6C - add r6, r0, #0 - cmp r6, #0xf - bne _0224E2D0 - mov r0, #0xff - str r0, [r7, #0] - add sp, #0x30 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224E2D0: - add r0, r5, #0 - bl ov16_0223F4BC - mov r1, #3 - and r0, r1 - str r0, [sp, #0x2c] - bl sub_020787CC - tst r0, r6 - bne _0224E2D0 - ldr r0, [r4, #0x64] - ldr r3, _0224E440 ; =0x000030BC - lsl r0, r0, #1 - add r1, r4, r0 - ldr r0, [sp, #0x2c] - strh r0, [r1, r3] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - lsl r1, r1, #1 - add r1, r4, r1 - ldrh r1, [r1, r3] - add r0, r4, r0 - lsl r1, r1, #1 - add r1, r0, r1 - ldr r0, _0224E444 ; =0x00002D4C - ldrh r1, [r1, r0] - add r0, r3, #0 - sub r0, #0x7c - str r1, [r4, r0] - add r0, r3, #0 - sub r0, #0x7c - ldr r1, [r4, r0] - add r0, r3, #0 - sub r0, #0x78 - str r1, [r4, r0] - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - sub r3, #0x7c - ldr r3, [r4, r3] - ldr r2, [r4, #0x64] - lsl r3, r3, #0x10 - add r0, r5, #0 - add r1, r4, #0 - lsr r3, r3, #0x10 - bl ov16_02253954 - str r0, [r4, #0x6c] - cmp r0, #0xff - bne _0224E344 - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02257028 - b _0224E344 -_0224E344: - ldr r1, [r4, #0x64] - add sp, #0x30 - lsl r1, r1, #4 - add r2, r4, r1 - ldr r1, _0224E448 ; =0x000021AC - str r0, [r2, r1] - mov r0, #1 - lsl r0, r0, #8 - str r0, [r7, #0] - ldr r1, _0224E44C ; =0x00002184 - mov r0, #1 - ldr r2, [r4, r1] - orr r0, r2 - str r0, [r4, r1] - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_0224E364: - ldr r0, [sp, #0x24] - sub r0, r0, r6 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - add r0, r5, #0 - bl ov16_0223F4BC - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] - cmp r0, r6 - bge _0224E3BC - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224E43C ; =0x00002DAC - ldr r0, [r2, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bne _0224E3BC - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x48 - beq _0224E3BC - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0xf - beq _0224E3BC - mov r1, #6 - lsl r1, r1, #6 - mov r0, #0xf - ldr r2, [r4, r1] - lsl r0, r0, #8 - tst r0, r2 - bne _0224E3BC - sub r1, #0x7f - add sp, #0x30 - str r1, [r7, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224E3BC: - ldr r0, [sp, #0x18] - sub r0, r0, r6 - cmp r0, r6 - bge _0224E422 - ldr r1, [r4, #0x64] - mov r0, #0x46 - str r1, [r4, #0x6c] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r1, [r4, #0x64] - mov r3, #0 - str r3, [sp] - mov r0, #0x28 - str r0, [sp, #4] - lsl r0, r1, #0x18 - str r3, [sp, #8] - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r2, #1 - add r0, r5, #0 - add r1, r4, #0 - str r2, [sp, #0x14] - bl ov16_0225A280 - ldr r2, _0224E450 ; =0x0000215C - add r1, r4, #0 - str r0, [r4, r2] - ldr r2, [r4, r2] - add r0, r5, #0 - bl ov16_0225AEB8 - ldr r1, _0224E450 ; =0x0000215C - add sp, #0x30 - str r0, [r4, r1] - mov r0, #0 - ldr r2, [r4, r1] - mvn r0, r0 - mul r0, r2 - str r0, [r4, r1] - ldr r0, _0224E454 ; =0x00000102 - str r0, [r7, #0] - add r0, r1, #0 - sub r0, #0x20 - ldr r2, [r4, r0] - mov r0, #2 - orr r0, r2 - sub r1, #0x20 - str r0, [r4, r1] - mov r0, #3 - pop {r3, r4, r5, r6, r7, pc} -_0224E422: - mov r0, #0xff - str r0, [r7, #0] - mov r0, #1 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E42C: .word 0x00003044 -_0224E430: .word 0x0000213C -_0224E434: .word 0x00002D74 -_0224E438: .word 0xFF7FFFFF -_0224E43C: .word 0x00002DAC -_0224E440: .word 0x000030BC -_0224E444: .word 0x00002D4C -_0224E448: .word 0x000021AC -_0224E44C: .word 0x00002184 -_0224E450: .word 0x0000215C -_0224E454: .word 0x00000102 - thumb_func_end ov16_0224E13C - - thumb_func_start ov16_0224E458 -ov16_0224E458: ; 0x0224E458 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - ldr r3, [r5, #0x64] - mov r2, #0x1c - mul r2, r3 - add r6, r5, r2 - mov r2, #0xb5 - lsl r2, r2, #2 - ldr r2, [r6, r2] - str r0, [sp, #4] - lsl r2, r2, #0x1f - mov r4, #1 - lsr r2, r2, #0x1f - bne _0224E512 - ldr r6, [r5, #0x6c] - cmp r6, #0xff - beq _0224E512 - mov r2, #0xc1 - lsl r2, r2, #6 - ldr r7, [r5, r2] - ldr r2, _0224E5E0 ; =0x0000011E - cmp r7, r2 - bne _0224E496 - mov r2, #0x2e - str r2, [sp] - mov r2, #3 - bl ov16_022555A4 - add r4, r4, r0 - b _0224E512 -_0224E496: - lsl r0, r7, #4 - add r1, r5, r0 - ldr r0, _0224E5E4 ; =0x000003E6 - ldrh r1, [r1, r0] - cmp r1, #0x40 - bgt _0224E4C0 - bge _0224E4DC - cmp r1, #0x10 - bgt _0224E4BA - bge _0224E512 - cmp r1, #8 - bgt _0224E500 - cmp r1, #4 - blt _0224E500 - beq _0224E4EE - cmp r1, #8 - beq _0224E4DC - b _0224E500 -_0224E4BA: - cmp r1, #0x20 - beq _0224E512 - b _0224E500 -_0224E4C0: - add r0, r2, #0 - sub r0, #0x1e - cmp r1, r0 - bgt _0224E4D4 - sub r2, #0x1e - cmp r1, r2 - bge _0224E512 - cmp r1, #0x80 - beq _0224E4EE - b _0224E500 -_0224E4D4: - add r2, #0xe2 - cmp r1, r2 - beq _0224E512 - b _0224E500 -_0224E4DC: - mov r0, #0x2e - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #9 - bl ov16_022555A4 - add r4, r4, r0 - b _0224E512 -_0224E4EE: - mov r0, #0x2e - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #3 - bl ov16_022555A4 - add r4, r4, r0 - b _0224E512 -_0224E500: - cmp r3, r6 - beq _0224E512 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x2e - bne _0224E512 - add r4, r4, #1 -_0224E512: - mov r0, #0xb5 - lsl r0, r0, #6 - add r2, r5, r0 - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - mov r1, #0xc1 - lsl r1, r1, #6 - ldr r1, [r5, r1] - add r0, r2, r0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl ov16_02254EE0 - add r6, r0, #0 - ldr r1, [r5, #0x64] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r5, r0 - lsl r7, r1, #6 - ldr r3, [r0, r7] - lsl r2, r3, #0x1e - lsr r2, r2, #0x1f - bne _0224E58A - lsl r2, r3, #0x1f - lsr r2, r2, #0x1f - bne _0224E58A - mov r1, #2 - orr r1, r3 - str r1, [r0, r7] - ldr r0, _0224E5E8 ; =0x00002D6C - ldr r1, [r5, #0x64] - add r2, r5, r0 - mov r0, #0xc0 - mul r0, r1 - add r1, r2, r0 - ldrb r0, [r1, r6] - cmp r0, #0 - beq _0224E57C - cmp r6, #4 - bge _0224E57C - cmp r0, r4 - ble _0224E56C - sub r0, r0, r4 - b _0224E56E -_0224E56C: - mov r0, #0 -_0224E56E: - strb r0, [r1, r6] - ldr r0, [sp, #4] - ldr r2, [r5, #0x64] - add r1, r5, #0 - bl ov16_02253EC0 - b _0224E5D8 -_0224E57C: - ldr r1, _0224E5EC ; =0x0000216C - mov r0, #2 - ldr r2, [r5, r1] - lsl r0, r0, #8 - orr r0, r2 - str r0, [r5, r1] - b _0224E5D8 -_0224E58A: - mov r2, #0xc0 - add r0, r1, #0 - mul r0, r2 - add r0, r5, r0 - ldr r3, _0224E5E8 ; =0x00002D6C - add r4, r0, r6 - ldrb r4, [r4, r3] - cmp r4, #0 - bne _0224E5D8 - ldr r4, _0224E5F0 ; =0x0000213C - mov r7, #2 - ldr r4, [r5, r4] - lsl r7, r7, #8 - tst r4, r7 - bne _0224E5D8 - add r3, #0x44 - ldr r0, [r0, r3] - lsl r3, r7, #3 - tst r3, r0 - bne _0224E5D8 - lsl r2, r2, #4 - tst r0, r2 - bne _0224E5D8 - add r0, r1, #0 - bl sub_020787CC - add r1, r7, #0 - sub r1, #0x80 - ldr r2, [r5, r1] - lsl r0, r0, #8 - tst r0, r2 - bne _0224E5D8 - cmp r6, #4 - bge _0224E5D8 - ldr r0, _0224E5EC ; =0x0000216C - add r1, #0x80 - ldr r2, [r5, r0] - orr r1, r2 - str r1, [r5, r0] -_0224E5D8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224E5E0: .word 0x0000011E -_0224E5E4: .word 0x000003E6 -_0224E5E8: .word 0x00002D6C -_0224E5EC: .word 0x0000216C -_0224E5F0: .word 0x0000213C - thumb_func_end ov16_0224E458 - - thumb_func_start ov16_0224E5F4 -ov16_0224E5F4: ; 0x0224E5F4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - mov r4, #0 - ldr r0, [r5, #0x6c] - add r6, r4, #0 - cmp r0, #0xff - bne _0224E612 - ldr r1, _0224E6E0 ; =0x00003044 - add r0, r5, #0 - ldr r1, [r5, r1] - bl ov16_0225582C - cmp r0, #0 - beq _0224E644 -_0224E612: - ldr r0, [r5, #0x6c] - cmp r0, #0xff - bne _0224E658 - ldr r1, _0224E6E0 ; =0x00003044 - add r0, r5, #0 - ldr r1, [r5, r1] - bl ov16_0225582C - cmp r0, #1 - bne _0224E658 - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _0224E6E4 ; =0x00002DB0 - ldr r0, [r1, r0] - mov r1, #1 - lsl r1, r1, #0xc - tst r0, r1 - bne _0224E644 - ldr r0, _0224E6E8 ; =0x0000213C - ldr r2, [r5, r0] - lsr r0, r1, #3 - tst r0, r2 - beq _0224E658 -_0224E644: - ldr r2, _0224E6EC ; =0x00000119 - add r0, r5, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0x26 - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] - mov r4, #1 -_0224E658: - mov r0, #0xd - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224E69E - mov r0, #0x4c - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224E69E - ldr r0, _0224E6E0 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _0224E6F0 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x97 - bne _0224E69E - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x30 - tst r0, r1 - beq _0224E69E - mov r6, #1 -_0224E69E: - ldr r0, [r5, #0x6c] - cmp r0, #0xff - bne _0224E6DC - ldr r1, _0224E6E0 ; =0x00003044 - add r0, r5, #0 - ldr r1, [r5, r1] - bl ov16_0225582C - cmp r0, #1 - bne _0224E6DC - cmp r4, #0 - bne _0224E6DC - cmp r6, #0 - bne _0224E6DC - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02258AB8 - cmp r0, #0x63 - beq _0224E6DC - ldr r0, [r5, #0x64] - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - ldr r1, _0224E6E4 ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #1 - lsl r1, r1, #0xc - tst r1, r2 - bne _0224E6DC - str r0, [r5, #0x6c] -_0224E6DC: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E6E0: .word 0x00003044 -_0224E6E4: .word 0x00002DB0 -_0224E6E8: .word 0x0000213C -_0224E6EC: .word 0x00000119 -_0224E6F0: .word 0x000003DE - thumb_func_end ov16_0224E5F4 - - thumb_func_start ov16_0224E6F4 -ov16_0224E6F4: ; 0x0224E6F4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r1, _0224E774 ; =0x00003044 - ldr r2, [r4, r1] - lsl r1, r2, #4 - add r5, r4, r1 - ldr r1, _0224E778 ; =0x000003E6 - ldrh r3, [r5, r1] - cmp r3, #0x10 - beq _0224E728 - cmp r3, #0x20 - beq _0224E728 - sub r1, r1, #5 - ldrb r1, [r5, r1] - cmp r1, #0 - beq _0224E728 - ldr r1, _0224E77C ; =0x0000213C - ldr r3, [r4, r1] - mov r1, #2 - lsl r1, r1, #0xe - tst r1, r3 - bne _0224E728 - mov r1, #0x20 - tst r1, r3 - beq _0224E72C -_0224E728: - cmp r2, #0x56 - bne _0224E76C -_0224E72C: - ldr r1, [r4, #0x64] - ldr r3, _0224E780 ; =0x00002144 - str r1, [sp] - ldr r1, [r4, #0x6c] - str r1, [sp, #4] - ldr r1, [r4, r3] - str r1, [sp, #8] - add r1, r3, #0 - add r1, #0x28 - add r1, r4, r1 - str r1, [sp, #0xc] - add r3, #0x1c - ldr r3, [r4, r3] - add r1, r4, #0 - bl ov16_02254FA8 - ldr r1, _0224E780 ; =0x00002144 - str r0, [r4, r1] - add r1, #0x28 - ldr r1, [r4, r1] - mov r0, #8 - tst r0, r1 - beq _0224E76C - mov r0, #0xd1 - lsl r0, r0, #2 - add r3, r4, r0 - ldr r0, [r4, #0x64] - lsl r2, r0, #2 - ldr r1, [r3, r2] - mov r0, #2 - orr r0, r1 - str r0, [r3, r2] -_0224E76C: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0224E774: .word 0x00003044 -_0224E778: .word 0x000003E6 -_0224E77C: .word 0x0000213C -_0224E780: .word 0x00002144 - thumb_func_end ov16_0224E6F4 - - thumb_func_start ov16_0224E784 -ov16_0224E784: ; 0x0224E784 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - str r0, [sp, #0x18] - add r4, r1, #0 - ldr r0, _0224EAB0 ; =0x00003044 - add r5, r4, #0 - ldr r0, [r4, r0] - mov r7, #0 - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _0224EAB4 ; =0x000003DE - add r5, #0x50 - ldrh r0, [r1, r0] - str r0, [sp, #0x1c] - mov r0, #0xd1 - lsl r0, r0, #2 - add r6, r4, r0 - mov r0, #7 - str r0, [sp, #0x20] - mov r0, #8 - str r0, [sp, #0x24] - mov r0, #1 - str r0, [sp, #0x28] -_0224E7B2: - ldr r0, [r4, #0x50] - cmp r0, #0x10 - bls _0224E7BA - b _0224EE1E -_0224E7BA: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224E7C6: ; jump table - .short _0224E7E8 - _0224E7C6 - 2 ; case 0 - .short _0224E81C - _0224E7C6 - 2 ; case 1 - .short _0224E916 - _0224E7C6 - 2 ; case 2 - .short _0224E97C - _0224E7C6 - 2 ; case 3 - .short _0224E9A4 - _0224E7C6 - 2 ; case 4 - .short _0224E9E0 - _0224E7C6 - 2 ; case 5 - .short _0224EA26 - _0224E7C6 - 2 ; case 6 - .short _0224EA62 - _0224E7C6 - 2 ; case 7 - .short _0224EAAA - _0224E7C6 - 2 ; case 8 - .short _0224EB10 - _0224E7C6 - 2 ; case 9 - .short _0224EB4C - _0224E7C6 - 2 ; case 10 - .short _0224EB88 - _0224E7C6 - 2 ; case 11 - .short _0224EC6A - _0224E7C6 - 2 ; case 12 - .short _0224ECC8 - _0224E7C6 - 2 ; case 13 - .short _0224ED30 - _0224E7C6 - 2 ; case 14 - .short _0224EDE0 - _0224E7C6 - 2 ; case 15 - .short _0224EE18 - _0224E7C6 - 2 ; case 16 -_0224E7E8: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224EAB8 ; =0x00002DB0 - ldr r1, [r2, r0] - ldr r0, _0224EABC ; =0xFDFFFFFF - and r1, r0 - ldr r0, _0224EAB8 ; =0x00002DB0 - str r1, [r2, r0] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r1, [r2, r0] - ldr r0, _0224EAC0 ; =0xFFFFBFFF - and r1, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - str r1, [r2, r0] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224E81C: - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _0224EAC4 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _0224E90E - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0xf - lsl r0, r0, #8 - tst r0, r1 - beq _0224E866 - add r0, r4, #0 - add r1, r2, #0 - bl ov16_02255A4C - cmp r0, #0x2b - beq _0224E866 - mov r0, #0x46 - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x13 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224E90E -_0224E866: - ldr r0, _0224EAB0 ; =0x00003044 - ldr r0, [r4, r0] - cmp r0, #0xd6 - beq _0224E87C - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #0xd6 - bne _0224E87C - mov r0, #1 - b _0224E87E -_0224E87C: - mov r0, #0 -_0224E87E: - cmp r0, #0 - bne _0224E90E - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x30 - bne _0224E892 - mov r3, #2 - b _0224E894 -_0224E892: - mov r3, #1 -_0224E894: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224EAC4 ; =0x00002DAC - ldr r1, [r2, r0] - mov r0, #7 - and r0, r1 - cmp r0, r3 - ldr r0, _0224EAC4 ; =0x00002DAC - bhs _0224E8B2 - ldr r1, [r2, r0] - ldr r0, [sp, #0x20] - bic r1, r0 - b _0224E8B6 -_0224E8B2: - ldr r0, [r2, r0] - sub r1, r0, r3 -_0224E8B6: - ldr r0, _0224EAC4 ; =0x00002DAC - str r1, [r2, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _0224EAC4 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _0224E8F4 - ldr r0, _0224EAB0 ; =0x00003044 - ldr r0, [r4, r0] - cmp r0, #0xad - beq _0224E90E - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #0xd6 - beq _0224E90E - add r0, r4, #0 - mov r1, #1 - mov r2, #0x14 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #2 - b _0224E90E -_0224E8F4: - mov r0, #0x46 - lsl r0, r0, #2 - str r2, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x13 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224E90E: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224E916: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224EAC4 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - beq _0224E974 - ldr r0, [sp, #0x18] - bl ov16_0223F4BC - mov r1, #5 - bl sub_020E1F6C - cmp r1, #0 - beq _0224E958 - ldr r0, [sp, #0x1c] - cmp r0, #0x7d - beq _0224E974 - cmp r0, #0xfd - beq _0224E974 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1c - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 - b _0224E974 -_0224E958: - mov r0, #0x46 - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1d - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224E974: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224E97C: - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255EC0 - cmp r0, #1 - bne _0224E99C - add r0, r4, #0 - mov r1, #1 - mov r2, #0xbf - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224E99C: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224E9A4: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224EAB8 ; =0x00002DB0 - ldr r1, [r2, r0] - mov r0, #1 - lsl r0, r0, #0x16 - tst r0, r1 - beq _0224E9D8 - ldr r0, _0224EAB8 ; =0x00002DB0 - ldr r1, [r2, r0] - ldr r0, _0224EAC8 ; =0xFFBFFFFF - and r1, r0 - ldr r0, _0224EAB8 ; =0x00002DB0 - str r1, [r2, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x41 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224E9D8: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224E9E0: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224EAB8 ; =0x00002DB0 - ldr r1, [r2, r0] - mov r0, #8 - tst r0, r1 - beq _0224EA1E - ldr r0, _0224EAB8 ; =0x00002DB0 - ldr r1, [sp, #0x24] - ldr r0, [r2, r0] - bic r0, r1 - ldr r1, _0224EAB8 ; =0x00002DB0 - str r0, [r2, r1] - ldr r0, [r4, #0x64] - mov r1, #0x40 - lsl r0, r0, #2 - ldr r2, [r6, r0] - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224EA1E: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EA26: - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r3, [r4, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _0224EACC ; =0x00002DE8 - ldrh r0, [r1, r0] - cmp r3, r0 - bne _0224EA5A - lsl r0, r2, #2 - ldr r2, [r6, r0] - mov r1, #0x10 - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x47 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224EA5A: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EA62: - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _0224EAD0 ; =0x00002DC8 - ldr r0, [r1, r0] - lsl r0, r0, #0x15 - lsr r0, r0, #0x1d - beq _0224EAA2 - ldr r0, _0224EAB0 ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _0224EAD4 ; =0x000003E1 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224EAA2 - lsl r0, r2, #2 - ldr r2, [r6, r0] - mov r1, #0x20 - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x85 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224EAA2: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EAAA: - ldr r3, _0224EAB0 ; =0x00003044 - b _0224EAD8 - nop -_0224EAB0: .word 0x00003044 -_0224EAB4: .word 0x000003DE -_0224EAB8: .word 0x00002DB0 -_0224EABC: .word 0xFDFFFFFF -_0224EAC0: .word 0xFFFFBFFF -_0224EAC4: .word 0x00002DAC -_0224EAC8: .word 0xFFBFFFFF -_0224EACC: .word 0x00002DE8 -_0224EAD0: .word 0x00002DC8 -_0224EAD4: .word 0x000003E1 -_0224EAD8: - ldr r0, [sp, #0x18] - ldr r2, [r4, #0x64] - ldr r3, [r4, r3] - add r1, r4, #0 - bl ov16_02255EF4 - cmp r0, #0 - beq _0224EB08 - ldr r0, [r4, #0x64] - mov r1, #4 - lsl r0, r0, #2 - ldr r2, [r6, r0] - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x90 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224EB08: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EB10: - ldr r3, _0224EE38 ; =0x00003044 - ldr r0, [sp, #0x18] - ldr r2, [r4, #0x64] - ldr r3, [r4, r3] - add r1, r4, #0 - bl ov16_02256044 - cmp r0, #0 - beq _0224EB44 - ldr r0, [r4, #0x64] - mov r1, #1 - lsl r0, r0, #2 - ldr r2, [r6, r0] - lsl r1, r1, #8 - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x9d - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224EB44: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EB4C: - ldr r3, _0224EE38 ; =0x00003044 - ldr r0, [sp, #0x18] - ldr r2, [r4, #0x64] - ldr r3, [r4, r3] - add r1, r4, #0 - bl ov16_02256078 - cmp r0, #0 - beq _0224EB80 - ldr r0, [r4, #0x64] - mov r1, #2 - lsl r0, r0, #2 - ldr r2, [r6, r0] - lsl r1, r1, #8 - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xae - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224EB80: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EB88: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224EE3C ; =0x00002DB0 - ldr r1, [r2, r0] - mov r0, #7 - tst r0, r1 - bne _0224EBA2 - b _0224EE1E -_0224EBA2: - ldr r0, _0224EE3C ; =0x00002DB0 - ldr r0, [r2, r0] - sub r1, r0, #1 - ldr r0, _0224EE3C ; =0x00002DB0 - str r1, [r2, r0] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224EE3C ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _0224EC54 - ldr r0, [sp, #0x18] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _0224EBDE - add r0, r4, #0 - mov r2, #0x26 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224EE1E -_0224EBDE: - ldr r0, [r4, #0x64] - mov r1, #0x80 - lsl r0, r0, #2 - ldr r2, [r6, r0] - mov r3, #0 - orr r1, r2 - str r1, [r6, r0] - ldr r1, [r4, #0x64] - mov r0, #0x46 - str r1, [r4, #0x6c] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r4, #0x64] - mov r1, #0 - str r1, [sp] - mov r1, #0x28 - str r1, [sp, #4] - mov r1, #0 - lsl r0, r0, #0x18 - str r1, [sp, #8] - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r1, r4, #0 - mov r2, #0xa5 - bl ov16_0225A280 - ldr r1, _0224EE40 ; =0x0000215C - ldr r2, _0224EE40 ; =0x0000215C - str r0, [r4, r1] - ldr r0, [sp, #0x18] - ldr r2, [r4, r2] - add r1, r4, #0 - bl ov16_0225AEB8 - ldr r1, _0224EE40 ; =0x0000215C - str r0, [r4, r1] - add r0, r1, #0 - ldr r1, [r4, r0] - mov r0, #0 - add r2, r1, #0 - mvn r0, r0 - mul r2, r0 - ldr r0, _0224EE40 ; =0x0000215C - mov r1, #1 - str r2, [r4, r0] - add r0, r4, #0 - mov r2, #0x27 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x21 - str r0, [r4, #0xc] - mov r7, #1 - b _0224EE1E -_0224EC54: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x28 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224EE1E -_0224EC6A: - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _0224EE44 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x40 - tst r0, r1 - beq _0224ECC0 - add r0, r4, #0 - add r1, r2, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _0224ECC0 - ldr r0, [sp, #0x18] - bl ov16_0223F4BC - lsr r1, r0, #0x1f - lsl r2, r0, #0x1e - sub r2, r2, r1 - mov r0, #0x1e - ror r2, r0 - add r0, r1, r2 - bne _0224ECC0 - ldr r0, [r4, #0x64] - ldr r2, [sp, #0x28] - lsl r1, r0, #2 - ldr r0, [r6, r1] - bic r0, r2 - mov r2, #1 - orr r0, r2 - str r0, [r6, r1] - add r1, r2, #0 - add r0, r4, #0 - mov r2, #0x20 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224ECC0: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224ECC8: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224EE3C ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #0xf - lsl r0, r0, #0x10 - and r0, r1 - beq _0224ED28 - lsr r0, r0, #0x10 - bl sub_020787EC - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp, #0x18] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _0224ED08 - add r0, r4, #0 - mov r2, #0x6b - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224ED28 -_0224ED08: - ldr r0, [r4, #0x64] - mov r1, #8 - lsl r0, r0, #2 - ldr r2, [r6, r0] - orr r1, r2 - str r1, [r6, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x6c - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - mov r7, #1 -_0224ED28: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224ED30: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _0224EE3C ; =0x00002DB0 - ldr r1, [r2, r0] - mov r0, #3 - lsl r0, r0, #8 - tst r0, r1 - beq _0224EE1E - ldr r0, _0224EE3C ; =0x00002DB0 - ldr r1, [r2, r0] - mov r0, #1 - lsl r0, r0, #8 - sub r1, r1, r0 - ldr r0, _0224EE3C ; =0x00002DB0 - str r1, [r2, r0] - ldr r0, [r4, #0x64] - mov r1, #0xc0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _0224EE3C ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #3 - lsl r1, r1, #8 - tst r1, r2 - bne _0224EDCA - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _0224EE48 ; =0x000030E4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224EDCA - lsl r1, r0, #1 - ldr r0, _0224EE4C ; =0x00002144 - str r1, [r4, r0] - ldr r3, [r4, #0x64] - lsl r0, r3, #2 - add r1, r4, r0 - ldr r0, _0224EE50 ; =0x000030F4 - ldr r2, [r1, r0] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _0224EE54 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224ED9A - str r2, [r4, #0x6c] - b _0224EDCA -_0224ED9A: - ldr r0, [sp, #0x18] - add r1, r4, #0 - add r2, r3, #0 - bl ov16_02257028 - mov r1, #0xc0 - mul r1, r0 - str r0, [r4, #0x6c] - ldr r0, _0224EE54 ; =0x00002D8C - add r1, r4, r1 - ldr r0, [r1, r0] - cmp r0, #0 - bne _0224EDCA - ldr r2, _0224EE58 ; =0x0000011A - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0x26 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r7, #2 - b _0224EE1E -_0224EDCA: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x24 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - b _0224EE1E -_0224EDE0: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224EE44 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - beq _0224EE10 - ldr r0, [sp, #0x1c] - cmp r0, #0x7d - beq _0224EDFC - cmp r0, #0xfd - bne _0224EE10 -_0224EDFC: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1e - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r7, #2 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0224EE10: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224EE1E -_0224EE18: - mov r0, #0 - str r0, [r4, #0x50] - mov r7, #3 -_0224EE1E: - cmp r7, #0 - bne _0224EE24 - b _0224E7B2 -_0224EE24: - ldr r0, [sp, #0x18] - ldr r2, [r4, #0x64] - add r1, r4, #0 - bl ov16_02253EC0 - cmp r7, #1 - bne _0224EE78 - ldr r1, _0224EE5C ; =0x0000213C - b _0224EE60 - nop -_0224EE38: .word 0x00003044 -_0224EE3C: .word 0x00002DB0 -_0224EE40: .word 0x0000215C -_0224EE44: .word 0x00002DAC -_0224EE48: .word 0x000030E4 -_0224EE4C: .word 0x00002144 -_0224EE50: .word 0x000030F4 -_0224EE54: .word 0x00002D8C -_0224EE58: .word 0x0000011A -_0224EE5C: .word 0x0000213C -_0224EE60: - mov r0, #2 - ldr r2, [r4, r1] - orr r0, r2 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x30 - ldr r2, [r4, r0] - mov r0, #2 - lsl r0, r0, #0x1e - orr r0, r2 - add r1, #0x30 - str r0, [r4, r1] -_0224EE78: - cmp r7, #3 - beq _0224EE82 - add sp, #0x2c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224EE82: - mov r0, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_0224E784 - - thumb_func_start ov16_0224EE88 -ov16_0224EE88: ; 0x0224EE88 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r5, #0 - ldr r7, _0224EEF8 ; =0x0000216C - mov r4, #0 - add r6, #0x54 -_0224EE94: - ldr r0, [r5, #0x54] - cmp r0, #0 - beq _0224EEA0 - cmp r0, #1 - beq _0224EEE0 - b _0224EEE6 -_0224EEA0: - ldr r1, [r5, #0x64] - ldr r2, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02256148 - add r2, r0, #0 - beq _0224EEB8 - ldr r0, _0224EEF8 ; =0x0000216C - ldr r1, [r5, r0] - ldr r0, _0224EEFC ; =0x001FD849 - tst r0, r1 - beq _0224EEBC -_0224EEB8: - cmp r2, #0xb5 - bne _0224EED8 -_0224EEBC: - add r0, r5, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r5, #8] - mov r4, #1 - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] - mov r0, #2 - ldr r1, [r5, r7] - lsl r0, r0, #0x1e - orr r0, r1 - str r0, [r5, r7] -_0224EED8: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0224EEE6 -_0224EEE0: - mov r0, #0 - str r0, [r5, #0x54] - mov r4, #2 -_0224EEE6: - cmp r4, #0 - beq _0224EE94 - cmp r4, #2 - beq _0224EEF2 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224EEF2: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224EEF8: .word 0x0000216C -_0224EEFC: .word 0x001FD849 - thumb_func_end ov16_0224EE88 - - thumb_func_start ov16_0224EF00 -ov16_0224EF00: ; 0x0224EF00 - push {r4, lr} - add r4, r1, #0 - ldr r2, _0224EF1C ; =0x00000116 - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - nop -_0224EF1C: .word 0x00000116 - thumb_func_end ov16_0224EF00 - - thumb_func_start ov16_0224EF20 -ov16_0224EF20: ; 0x0224EF20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #4] - add r5, r1, #0 - add r6, r2, #0 - str r3, [sp, #8] - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - beq _0224EF3E - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224EF3E: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - ldr r0, [sp, #0x38] - ldr r2, _0224F24C ; =0x00002D5E - lsl r0, r0, #4 - str r0, [sp, #0x10] - add r1, r5, r0 - mov r0, #0x3e - lsl r0, r0, #4 - ldrb r0, [r1, r0] - add r1, r6, #0 - str r0, [sp, #0x18] - mov r0, #0xc0 - mul r1, r0 - str r1, [sp, #0xc] - add r1, r5, r1 - ldrsb r1, [r1, r2] - sub r1, r1, #6 - lsl r1, r1, #0x18 - asr r7, r1, #0x18 - ldr r1, [sp, #8] - mul r0, r1 - str r0, [sp, #0x14] - add r1, r5, r0 - add r0, r2, #1 - ldrsb r1, [r1, r0] - mov r0, #6 - sub r0, r0, r1 - lsl r0, r0, #0x18 - asr r4, r0, #0x18 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x56 - bne _0224EF8E - lsl r0, r7, #0x19 - asr r7, r0, #0x18 -_0224EF8E: - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0x56 - bl ov16_02255AB4 - cmp r0, #1 - bne _0224EFA2 - lsl r0, r4, #0x19 - asr r4, r0, #0x18 -_0224EFA2: - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0x6d - bl ov16_02255AB4 - cmp r0, #1 - bne _0224EFB4 - mov r7, #0 -_0224EFB4: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x6d - bne _0224EFC2 - mov r4, #0 -_0224EFC2: - ldr r0, _0224F250 ; =0x00002DB0 - ldr r1, [sp, #0x14] - add r2, r5, r0 - str r2, [sp, #0x1c] - ldr r1, [r2, r1] - mov r2, #2 - lsl r2, r2, #0x1c - tst r1, r2 - bne _0224EFE2 - ldr r1, [sp, #0x14] - add r0, #0x10 - add r1, r5, r1 - ldr r1, [r1, r0] - lsr r0, r2, #7 - tst r0, r1 - beq _0224EFE8 -_0224EFE2: - cmp r4, #0 - bge _0224EFE8 - mov r4, #0 -_0224EFE8: - add r0, r4, #6 - add r0, r0, r7 - lsl r0, r0, #0x18 - asr r7, r0, #0x18 - bpl _0224EFF4 - mov r7, #0 -_0224EFF4: - cmp r7, #0xc - ble _0224EFFA - mov r7, #0xc -_0224EFFA: - ldr r0, _0224F254 ; =0x000003E3 - add r1, r5, r0 - ldr r0, [sp, #0x10] - ldrb r4, [r1, r0] - cmp r4, #0 - bne _0224F00C - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F00C: - ldr r0, _0224F258 ; =0x0000213C - mov r1, #0x20 - ldr r0, [r5, r0] - add r2, r0, #0 - tst r2, r1 - beq _0224F01E - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F01E: - lsl r1, r1, #5 - tst r0, r1 - beq _0224F02A - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F02A: - mov r0, #0xd - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224F06C - mov r0, #0x4c - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224F06C - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x30 - tst r0, r1 - beq _0224F06C - ldr r0, [sp, #0x10] - add r1, r5, r0 - ldr r0, _0224F25C ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x98 - bne _0224F06C - mov r4, #0x32 -_0224F06C: - ldr r0, _0224F260 ; =0x0226EAD0 - lsl r1, r7, #1 - ldrb r0, [r0, r1] - ldr r2, _0224F264 ; =0x0226EAD1 - ldrb r1, [r2, r1] - mul r0, r4 - bl sub_020E2178 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0xe - bne _0224F09A - mov r0, #0x82 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F09A: - mov r0, #0xd - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224F132 - mov r0, #0x4c - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224F132 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0xc - tst r0, r1 - beq _0224F0EC - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - mov r3, #8 - bl ov16_02255AB4 - cmp r0, #1 - bne _0224F0EC - mov r0, #0x50 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F0EC: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0xc0 - tst r0, r1 - beq _0224F116 - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0x51 - bl ov16_02255AB4 - cmp r0, #1 - bne _0224F116 - mov r0, #0x50 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F116: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #0xe - tst r0, r1 - beq _0224F132 - mov r0, #6 - mul r0, r4 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F132: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x37 - bne _0224F152 - ldr r0, [sp, #0x18] - cmp r0, #0 - bne _0224F152 - mov r0, #0x50 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F152: - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0x4d - bl ov16_02255AB4 - cmp r0, #1 - bne _0224F17C - ldr r1, [sp, #0x1c] - ldr r0, [sp, #0x14] - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _0224F17C - mov r0, #0x32 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F17C: - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02258AB8 - add r7, r0, #0 - ldr r1, [sp, #8] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - cmp r7, #0x30 - bne _0224F1A2 - mov r1, #0x64 - sub r0, r1, r0 - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F1A2: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02258AB8 - add r7, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov16_02258ACC - add r6, r0, #0 - cmp r7, #0x5d - bne _0224F1CA - add r0, #0x64 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F1CA: - cmp r7, #0x68 - bne _0224F1EA - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_022588A4 - cmp r0, #1 - bne _0224F1EA - add r6, #0x64 - add r0, r4, #0 - mul r0, r6 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F1EA: - ldr r0, _0224F268 ; =0x00002DCC - ldr r1, [sp, #0xc] - add r0, r5, r0 - ldr r2, [r0, r1] - lsl r1, r2, #4 - lsr r1, r1, #0x1f - beq _0224F20E - ldr r1, _0224F26C ; =0xF7FFFFFF - and r2, r1 - ldr r1, [sp, #0xc] - str r2, [r0, r1] - mov r0, #0x78 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F20E: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r1 - beq _0224F22A - mov r0, #0xa - mul r0, r4 - mov r1, #6 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0224F22A: - ldr r0, [sp, #4] - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - add r0, r1, #1 - cmp r0, r4 - ble _0224F246 - ldr r1, _0224F270 ; =0x0000216C - mov r0, #1 - ldr r2, [r5, r1] - orr r0, r2 - str r0, [r5, r1] -_0224F246: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224F24C: .word 0x00002D5E -_0224F250: .word 0x00002DB0 -_0224F254: .word 0x000003E3 -_0224F258: .word 0x0000213C -_0224F25C: .word 0x000003DE -_0224F260: .word 0x0226EAD0 -_0224F264: .word 0x0226EAD1 -_0224F268: .word 0x00002DCC -_0224F26C: .word 0xF7FFFFFF -_0224F270: .word 0x0000216C - thumb_func_end ov16_0224EF20 - - thumb_func_start ov16_0224F274 -ov16_0224F274: ; 0x0224F274 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp, #4] - ldr r0, _0224F44C ; =0x0000213C - add r5, r1, #0 - ldr r1, [r5, r0] - mov r0, #0x20 - add r7, r2, #0 - add r4, r3, #0 - ldr r6, [sp, #0x20] - tst r0, r1 - beq _0224F292 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F292: - lsl r0, r4, #6 - add r1, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _0224F2F6 - lsl r0, r6, #4 - add r1, r5, r0 - ldr r0, _0224F450 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #2 - tst r0, r1 - beq _0224F2F6 - cmp r6, #0xae - bne _0224F2C2 - lsl r1, r6, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - bl ov16_02255950 - cmp r0, #1 - bne _0224F2F6 -_0224F2C2: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0225582C - cmp r0, #0 - beq _0224F2DA - ldr r0, _0224F44C ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #8 - tst r0, r1 - beq _0224F2F6 -_0224F2DA: - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02253F20 - ldr r1, _0224F454 ; =0x0000216C - mov r0, #2 - ldr r2, [r5, r1] - lsl r0, r0, #0xe - orr r0, r2 - str r0, [r5, r1] - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F2F6: - ldr r0, _0224F44C ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #1 - lsl r0, r0, #0xa - tst r0, r1 - bne _0224F348 - mov r0, #0xc0 - mul r0, r4 - add r3, r5, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r2, [r3, r0] - mov r1, #0x18 - tst r1, r2 - beq _0224F320 - add r0, #0xc - ldr r0, [r3, r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1e - cmp r7, r0 - beq _0224F338 -_0224F320: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x63 - beq _0224F338 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x63 - bne _0224F348 -_0224F338: - ldr r1, _0224F454 ; =0x0000216C - mov r0, #1 - ldr r2, [r5, r1] - add sp, #8 - bic r2, r0 - str r2, [r5, r1] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F348: - mov r0, #0xd - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224F3B6 - mov r0, #0x4c - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0224F3B6 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #3 - tst r0, r1 - beq _0224F392 - lsl r0, r6, #4 - add r1, r5, r0 - ldr r0, _0224F458 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x98 - bne _0224F392 - ldr r1, _0224F454 ; =0x0000216C - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - str r2, [r5, r1] -_0224F392: - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0xc0 - tst r0, r1 - beq _0224F3B6 - lsl r0, r6, #4 - add r2, r5, r0 - ldr r0, _0224F458 ; =0x000003DE - add r1, #0x44 - ldrh r0, [r2, r0] - cmp r0, r1 - bne _0224F3B6 - ldr r1, _0224F454 ; =0x0000216C - mov r0, #1 - ldr r2, [r5, r1] - bic r2, r0 - str r2, [r5, r1] -_0224F3B6: - ldr r1, _0224F454 ; =0x0000216C - mov r2, #1 - ldr r0, [r5, r1] - lsl r2, r2, #0xa - tst r0, r2 - bne _0224F446 - ldr r0, _0224F45C ; =0x00003044 - sub r2, #0x1a - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r0, r5, r0 - ldrh r0, [r0, r2] - cmp r0, #0x80 - beq _0224F446 - sub r1, #0x30 - ldr r0, [r5, r1] - mov r1, #4 - tst r1, r0 - bne _0224F3EE - mov r1, #0xc0 - mul r1, r4 - add r2, r5, r1 - mov r1, #0xb7 - lsl r1, r1, #6 - ldr r2, [r2, r1] - mov r1, #0x40 - tst r1, r2 - bne _0224F43A -_0224F3EE: - mov r2, #2 - lsl r2, r2, #0x12 - add r1, r0, #0 - tst r1, r2 - bne _0224F40A - mov r1, #0xc0 - mul r1, r4 - add r3, r5, r1 - mov r1, #0xb7 - lsl r1, r1, #6 - ldr r3, [r3, r1] - lsl r1, r2, #0xa - tst r1, r3 - bne _0224F43A -_0224F40A: - mov r1, #8 - tst r1, r0 - bne _0224F422 - mov r1, #0xc0 - mul r1, r4 - add r2, r5, r1 - mov r1, #0xb7 - lsl r1, r1, #6 - ldr r2, [r2, r1] - mov r1, #0x80 - tst r1, r2 - bne _0224F43A -_0224F422: - mov r1, #0x10 - tst r0, r1 - bne _0224F446 - mov r0, #0xc0 - mul r0, r4 - add r2, r5, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r2, [r2, r0] - lsl r0, r1, #0xe - tst r0, r2 - beq _0224F446 -_0224F43A: - ldr r1, _0224F454 ; =0x0000216C - mov r0, #1 - ldr r2, [r5, r1] - lsl r0, r0, #0x10 - orr r0, r2 - str r0, [r5, r1] -_0224F446: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224F44C: .word 0x0000213C -_0224F450: .word 0x000003E9 -_0224F454: .word 0x0000216C -_0224F458: .word 0x000003DE -_0224F45C: .word 0x00003044 - thumb_func_end ov16_0224F274 - - thumb_func_start ov16_0224F460 -ov16_0224F460: ; 0x0224F460 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - bl ov16_0223DF1C - add r2, r0, #0 - ldr r0, [r4, #0x6c] - cmp r0, #0xff - bne _0224F474 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F474: - ldr r6, _0224F5B0 ; =0x0000216C - ldr r1, _0224F5B4 ; =0x801FDA49 - ldr r3, [r4, r6] - add r7, r3, #0 - and r7, r1 - bne _0224F506 - mov r1, #0x75 - lsl r1, r1, #2 - lsl r0, r0, #6 - add r5, r4, r1 - ldr r3, [r5, r0] - mov ip, r0 - lsl r0, r3, #0x1b - lsr r0, r0, #0x1f - beq _0224F506 - ldr r0, _0224F5B8 ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _0224F5BC ; =0x000003E9 - ldrb r0, [r1, r0] - mov r1, #4 - tst r0, r1 - beq _0224F506 - mov r0, #0x10 - bic r3, r0 - mov r0, ip - str r3, [r5, r0] - ldr r2, [r4, #0x64] - mov r0, #0 - lsl r2, r2, #1 - add r3, r4, r2 - ldr r2, _0224F5B8 ; =0x00003044 - add r2, #0x18 - strh r0, [r3, r2] - ldr r2, [r4, #0x64] - ldr r0, _0224F5B8 ; =0x00003044 - lsl r2, r2, #1 - sub r0, r0, #4 - add r3, r4, r2 - ldr r2, _0224F5B8 ; =0x00003044 - ldr r0, [r4, r0] - add r2, #0x38 - strh r0, [r3, r2] - ldr r0, _0224F5B8 ; =0x00003044 - sub r0, r0, #4 - ldr r2, [r4, r0] - ldr r0, _0224F5B8 ; =0x00003044 - add r0, r0, #4 - str r2, [r4, r0] - add r0, r6, #0 - sub r0, #0x30 - ldr r2, [r4, r0] - lsl r0, r1, #0x12 - orr r0, r2 - sub r6, #0x30 - str r0, [r4, r6] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x8b - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r1, [r4, #0x6c] - ldr r2, [r4, #0x64] - add r0, r4, #0 - bl ov16_0225B408 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224F506: - mov r1, #0 - cmp r2, #0 - ble _0224F5AC - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r4, r0 -_0224F512: - ldr r3, _0224F5C0 ; =0x000021EC - add r5, r4, r1 - ldrb r5, [r5, r3] - cmp r7, #0 - bne _0224F5A6 - lsl r3, r5, #6 - str r3, [sp] - ldr r3, [r0, r3] - lsl r3, r3, #0x1a - lsr r3, r3, #0x1f - beq _0224F5A6 - ldr r3, _0224F5B8 ; =0x00003044 - ldr r3, [r4, r3] - lsl r3, r3, #4 - add r6, r4, r3 - ldr r3, _0224F5BC ; =0x000003E9 - ldrb r6, [r6, r3] - mov r3, #8 - tst r3, r6 - beq _0224F5A6 - mov r1, #0x46 - lsl r1, r1, #2 - str r5, [r4, r1] - ldr r1, [sp] - mov r7, #1 - ldr r2, [r0, r1] - mov r1, #0x20 - bic r2, r1 - ldr r1, [sp] - lsl r7, r7, #0x14 - str r2, [r0, r1] - ldr r2, _0224F5C4 ; =0x0000213C - ldr r0, [r4, r2] - tst r0, r7 - bne _0224F586 - ldr r1, [r4, #0x64] - mov r0, #0 - lsl r1, r1, #1 - add r3, r4, r1 - ldr r1, _0224F5C8 ; =0x0000305C - strh r0, [r3, r1] - add r0, r1, #0 - sub r0, #0x1c - ldr r6, [r4, r0] - ldr r0, [r4, #0x64] - lsl r0, r0, #1 - add r3, r4, r0 - add r0, r1, #0 - add r0, #0x20 - strh r6, [r3, r0] - add r0, r1, #0 - sub r0, #0x1c - ldr r0, [r4, r0] - sub r1, #0x14 - str r0, [r4, r1] - ldr r0, [r4, r2] - orr r0, r7 - str r0, [r4, r2] -_0224F586: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x92 - bl ov16_02251E1C - ldr r0, [r4, #8] - add r1, r5, #0 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - ldr r2, [r4, #0x64] - add r0, r4, #0 - bl ov16_0225B408 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224F5A6: - add r1, r1, #1 - cmp r1, r2 - blt _0224F512 -_0224F5AC: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224F5B0: .word 0x0000216C -_0224F5B4: .word 0x801FDA49 -_0224F5B8: .word 0x00003044 -_0224F5BC: .word 0x000003E9 -_0224F5C0: .word 0x000021EC -_0224F5C4: .word 0x0000213C -_0224F5C8: .word 0x0000305C - thumb_func_end ov16_0224F460 - - thumb_func_start ov16_0224F5CC -ov16_0224F5CC: ; 0x0224F5CC - push {r4, lr} - add r4, r1, #0 - bl ov16_022405FC - cmp r0, #1 - bne _0224F5E4 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - ldr r0, [r4, #0xc] - str r0, [r4, #8] -_0224F5E4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0224F5CC - - thumb_func_start ov16_0224F5E8 -ov16_0224F5E8: ; 0x0224F5E8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0x48] - add r5, r0, #0 - cmp r2, #6 - bhi _0224F6DE - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224F600: ; jump table - .short _0224F60E - _0224F600 - 2 ; case 0 - .short _0224F61A - _0224F600 - 2 ; case 1 - .short _0224F632 - _0224F600 - 2 ; case 2 - .short _0224F67E - _0224F600 - 2 ; case 3 - .short _0224F69A - _0224F600 - 2 ; case 4 - .short _0224F6AC - _0224F600 - 2 ; case 5 - .short _0224F6C8 - _0224F600 - 2 ; case 6 -_0224F60E: - bl ov16_0224EF00 - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] - pop {r3, r4, r5, pc} -_0224F61A: - ldr r2, _0224F724 ; =0x00002184 - ldr r3, [r4, r2] - mov r2, #4 - tst r2, r3 - bne _0224F62C - bl ov16_0224E784 - cmp r0, #1 - beq _0224F720 -_0224F62C: - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] -_0224F632: - ldr r0, _0224F724 ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #1 - tst r0, r1 - bne _0224F678 - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0 - bl ov16_0224E13C - cmp r0, #0 - beq _0224F678 - cmp r0, #1 - beq _0224F658 - cmp r0, #2 - beq _0224F65E - cmp r0, #3 - beq _0224F664 - b _0224F668 -_0224F658: - mov r0, #0x26 - str r0, [r4, #0xc] - b _0224F668 -_0224F65E: - ldr r0, [r4, #8] - str r0, [r4, #0xc] - b _0224F668 -_0224F664: - mov r0, #0x21 - str r0, [r4, #0xc] -_0224F668: - mov r0, #0x15 - str r0, [r4, #8] - ldr r2, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - pop {r3, r4, r5, pc} -_0224F678: - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] -_0224F67E: - ldr r0, _0224F724 ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #8 - tst r0, r1 - bne _0224F694 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224E458 - cmp r0, #1 - beq _0224F720 -_0224F694: - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] -_0224F69A: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224E5F4 - cmp r0, #1 - beq _0224F720 - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] -_0224F6AC: - ldr r0, _0224F724 ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #0x80 - tst r0, r1 - bne _0224F6C2 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224F460 - cmp r0, #1 - beq _0224F720 -_0224F6C2: - ldr r0, [r4, #0x48] - add r0, r0, #1 - str r0, [r4, #0x48] -_0224F6C8: - ldr r3, _0224F728 ; =0x00003044 - ldr r2, [r4, #0x64] - ldr r3, [r4, r3] - add r0, r5, #0 - lsl r3, r3, #0x10 - add r1, r4, #0 - lsr r3, r3, #0x10 - bl ov16_02253C98 - mov r0, #0 - str r0, [r4, #0x48] -_0224F6DE: - ldr r1, _0224F72C ; =0x0000216C - ldr r0, _0224F730 ; =0x801FDA49 - ldr r2, [r4, r1] - tst r0, r2 - beq _0224F6EE - mov r0, #0x19 - str r0, [r4, #8] - b _0224F718 -_0224F6EE: - add r0, r1, #0 - sub r0, #0x2c - ldr r2, [r4, r0] - mov r0, #0x40 - orr r0, r2 - sub r1, #0x2c - str r0, [r4, r1] - ldr r2, _0224F728 ; =0x00003044 - add r0, r4, #0 - ldr r2, [r4, r2] - mov r1, #0 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x17 - str r0, [r4, #0xc] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_022560B0 -_0224F718: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02259868 -_0224F720: - pop {r3, r4, r5, pc} - nop -_0224F724: .word 0x00002184 -_0224F728: .word 0x00003044 -_0224F72C: .word 0x0000216C -_0224F730: .word 0x801FDA49 - thumb_func_end ov16_0224F5E8 - - thumb_func_start ov16_0224F734 -ov16_0224F734: ; 0x0224F734 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0x4c] - add r5, r0, #0 - cmp r2, #6 - bhi _0224F814 - add r3, r2, r2 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_0224F74C: ; jump table - .short _0224F75A - _0224F74C - 2 ; case 0 - .short _0224F766 - _0224F74C - 2 ; case 1 - .short _0224F778 - _0224F74C - 2 ; case 2 - .short _0224F7A2 - _0224F74C - 2 ; case 3 - .short _0224F7CC - _0224F74C - 2 ; case 4 - .short _0224F7EE - _0224F74C - 2 ; case 5 - .short _0224F810 - _0224F74C - 2 ; case 6 -_0224F75A: - add r2, r2, #1 - str r2, [r4, #0x4c] - bl ov16_0224E5F4 - cmp r0, #1 - beq _0224F818 -_0224F766: - ldr r0, [r4, #0x4c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x4c] - add r0, r5, #0 - bl ov16_02253E3C - cmp r0, #1 - beq _0224F818 -_0224F778: - ldr r0, _0224F81C ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #0x20 - tst r0, r1 - bne _0224F79C - ldr r3, [r4, #0x6c] - cmp r3, #0xff - beq _0224F79C - ldr r0, _0224F820 ; =0x00003044 - add r1, r4, #0 - ldr r0, [r4, r0] - str r0, [sp] - ldr r2, [r4, #0x64] - add r0, r5, #0 - bl ov16_0224EF20 - cmp r0, #1 - beq _0224F818 -_0224F79C: - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] -_0224F7A2: - ldr r0, _0224F81C ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #0x40 - tst r0, r1 - bne _0224F7C6 - ldr r3, [r4, #0x6c] - cmp r3, #0xff - beq _0224F7C6 - ldr r0, _0224F820 ; =0x00003044 - add r1, r4, #0 - ldr r0, [r4, r0] - str r0, [sp] - ldr r2, [r4, #0x64] - add r0, r5, #0 - bl ov16_0224F274 - cmp r0, #1 - beq _0224F818 -_0224F7C6: - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] -_0224F7CC: - ldr r0, _0224F81C ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #2 - tst r0, r1 - bne _0224F7E8 - ldr r0, [r4, #0x6c] - cmp r0, #0xff - beq _0224F7E8 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224E6F4 - cmp r0, #1 - beq _0224F818 -_0224F7E8: - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] -_0224F7EE: - ldr r0, _0224F81C ; =0x00002184 - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - bne _0224F80A - ldr r0, [r4, #0x6c] - cmp r0, #0xff - beq _0224F80A - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0224EE88 - cmp r0, #1 - beq _0224F818 -_0224F80A: - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] -_0224F810: - mov r0, #0 - str r0, [r4, #0x4c] -_0224F814: - mov r0, #0x18 - str r0, [r4, #8] -_0224F818: - pop {r3, r4, r5, pc} - nop -_0224F81C: .word 0x00002184 -_0224F820: .word 0x00003044 - thumb_func_end ov16_0224F734 - - thumb_func_start ov16_0224F824 -ov16_0224F824: ; 0x0224F824 - push {r3, r4, lr} - sub sp, #4 - add r2, sp, #0 - add r4, r1, #0 - bl ov16_0225366C - cmp r0, #1 - bne _0224F84A - ldr r2, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x19 - add sp, #4 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_0224F84A: - mov r0, #0x19 - str r0, [r4, #8] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0224F824 - - thumb_func_start ov16_0224F854 -ov16_0224F854: ; 0x0224F854 - push {r4, lr} - ldr r0, _0224F8CC ; =0x0000216C - add r4, r1, #0 - ldr r1, [r4, r0] - mov r2, #2 - lsl r2, r2, #0x1e - add r3, r1, #0 - tst r3, r2 - beq _0224F86C - mov r0, #0x22 - str r0, [r4, #8] - pop {r4, pc} -_0224F86C: - lsr r2, r2, #0x16 - tst r2, r1 - beq _0224F886 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x2a - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x26 - str r0, [r4, #0xc] - pop {r4, pc} -_0224F886: - add r2, r0, #0 - add r2, #0x14 - ldr r2, [r4, r2] - cmp r2, #0 - beq _0224F8AC - mov r3, #1 - add r2, r1, #0 - tst r2, r3 - beq _0224F8AC - mov r2, #1 - bic r1, r2 - str r1, [r4, r0] - ldr r2, [r4, r0] - lsl r1, r3, #0xe - orr r1, r2 - str r1, [r4, r0] - mov r0, #0x1c - str r0, [r4, #8] - pop {r4, pc} -_0224F8AC: - ldr r0, _0224F8D0 ; =0x001FD849 - tst r0, r1 - beq _0224F8C6 - add r0, r4, #0 - mov r1, #1 - mov r2, #7 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x21 - str r0, [r4, #0xc] - pop {r4, pc} -_0224F8C6: - mov r0, #0x1a - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_0224F8CC: .word 0x0000216C -_0224F8D0: .word 0x001FD849 - thumb_func_end ov16_0224F854 - - thumb_func_start ov16_0224F8D4 -ov16_0224F8D4: ; 0x0224F8D4 - push {r4, lr} - add r4, r1, #0 - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x1b - str r0, [r4, #0xc] - pop {r4, pc} - thumb_func_end ov16_0224F8D4 - - thumb_func_start ov16_0224F8EC -ov16_0224F8EC: ; 0x0224F8EC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r2, _0224FC18 ; =0x0000216C - add r4, r1, #0 - ldr r1, [r4, r2] - add r7, r0, #0 - mov r0, #0x20 - tst r0, r1 - beq _0224F914 - ldr r0, [r4, #0x6c] - mov r1, #0xc0 - add r3, r0, #0 - mul r3, r1 - ldr r0, _0224FC1C ; =0x00002D90 - add r3, r4, r3 - ldr r0, [r3, r0] - sub r1, #0xc1 - mul r1, r0 - sub r2, #0x28 - str r1, [r4, r2] -_0224F914: - ldr r0, _0224FC20 ; =0x00002144 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0224F91E - b _0224FCEC -_0224F91E: - ldr r1, [r4, #0x6c] - add r0, r4, #0 - bl ov16_02258AB8 - str r0, [sp, #4] - ldr r1, [r4, #0x6c] - add r0, r4, #0 - mov r2, #0 - bl ov16_02258ACC - str r0, [sp] - ldr r0, _0224FC20 ; =0x00002144 - ldr r0, [r4, r0] - cmp r0, #0 - blt _0224F940 - bl sub_02022974 -_0224F940: - ldr r1, [r4, #0x64] - add r0, r7, #0 - bl ov16_0223E208 - add r5, r0, #0 - ldr r1, [r4, #0x6c] - add r0, r7, #0 - bl ov16_0223E208 - cmp r5, r0 - bne _0224F962 - ldr r1, [r4, #0x64] - add r0, r7, #0 - mov r2, #0 - mov r3, #0x61 - bl ov16_022666BC -_0224F962: - ldr r0, [r4, #0x6c] - ldr r2, [r4, #0x64] - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _0224FC24 ; =0x000030F4 - str r2, [r1, r0] - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - add r6, r1, #0 - mul r6, r0 - mov r2, #1 - ldr r1, _0224FC28 ; =0x00002DB0 - add r5, r4, r6 - ldr r3, [r5, r1] - lsl r2, r2, #0x18 - tst r2, r3 - beq _0224FA3C - ldr r2, _0224FC20 ; =0x00002144 - ldr r2, [r4, r2] - cmp r2, #0 - bge _0224FA3C - add r3, r1, #0 - add r3, #0x30 - ldr r3, [r5, r3] - add r5, r2, r3 - cmp r5, #0 - bgt _0224F9DE - mov r2, #0xbb - lsl r2, r2, #2 - add r6, r4, r2 - ldr r2, [r4, #0x64] - mov r5, #0x1c - mul r5, r2 - ldr r2, [r6, r5] - sub r2, r2, r3 - str r2, [r6, r5] - ldr r5, [r4, #0x6c] - add r3, r4, r1 - add r2, r5, #0 - mul r2, r0 - ldr r6, [r3, r2] - ldr r5, _0224FC2C ; =0xFEFFFFFF - and r5, r6 - str r5, [r3, r2] - ldr r2, [r4, #0x6c] - add r3, r2, #0 - add r2, r1, #0 - mul r3, r0 - add r3, r4, r3 - add r2, #0x30 - ldr r2, [r3, r2] - add r1, #0x30 - neg r3, r2 - ldr r2, _0224FC20 ; =0x00002144 - add r2, r2, #4 - str r3, [r4, r2] - ldr r2, [r4, #0x6c] - mov r3, #0 - mul r0, r2 - add r0, r4, r0 - str r3, [r0, r1] - b _0224FA0A -_0224F9DE: - mov r3, #0xbb - lsl r3, r3, #2 - add r6, r4, r3 - ldr r3, [r4, #0x64] - mov r5, #0x1c - mul r5, r3 - ldr r3, [r6, r5] - add r1, #0x30 - add r2, r3, r2 - str r2, [r6, r5] - ldr r2, [r4, #0x6c] - add r1, r4, r1 - mul r0, r2 - ldr r2, _0224FC20 ; =0x00002144 - ldr r3, [r1, r0] - ldr r2, [r4, r2] - add r2, r3, r2 - str r2, [r1, r0] - ldr r0, _0224FC20 ; =0x00002144 - ldr r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] -_0224FA0A: - mov r0, #0xba - lsl r0, r0, #2 - ldr r2, [r4, #0x6c] - add r1, r4, r0 - add r0, r2, #0 - mov r3, #0x1c - mul r0, r3 - ldr r5, [r1, r0] - mov r2, #8 - orr r2, r5 - str r2, [r1, r0] - ldr r0, [r4, #0x6c] - add r3, #0xfc - str r0, [r4, r3] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x5a - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x1c - add sp, #8 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224FA3C: - ldr r0, _0224FC30 ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _0224FC34 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x65 - bne _0224FA62 - ldr r0, _0224FC38 ; =0x00002D8C - add r1, r4, r6 - ldr r2, [r1, r0] - ldr r0, _0224FC20 ; =0x00002144 - ldr r1, [r4, r0] - add r1, r1, r2 - cmp r1, #0 - bgt _0224FA62 - sub r1, r2, #1 - neg r1, r1 - str r1, [r4, r0] -_0224FA62: - ldr r0, [r4, #0x6c] - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1f - bne _0224FAD0 - ldr r0, [sp, #4] - cmp r0, #0x41 - bne _0224FAA2 - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - ldr r0, [sp] - cmp r1, r0 - bge _0224FAA2 - ldr r2, [r4, #0x6c] - mov r0, #0xb5 - lsl r0, r0, #2 - mov r1, #0x1c - add r3, r2, #0 - mul r3, r1 - add r0, r4, r0 - ldr r2, [r0, r3] - mov r1, #0x20 - orr r1, r2 - str r1, [r0, r3] -_0224FAA2: - ldr r0, [sp, #4] - cmp r0, #0x67 - bne _0224FAD0 - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r3, r4, r0 - ldr r0, _0224FC38 ; =0x00002D8C - ldr r2, [r3, r0] - add r0, r0, #4 - ldr r0, [r3, r0] - cmp r2, r0 - bne _0224FAD0 - mov r0, #0xb5 - lsl r0, r0, #2 - add r3, r1, #0 - mov r2, #0x1c - add r0, r4, r0 - mul r3, r2 - ldr r2, [r0, r3] - mov r1, #0x20 - orr r1, r2 - str r1, [r0, r3] -_0224FAD0: - ldr r0, [r4, #0x6c] - lsl r1, r0, #6 - add r2, r4, r1 - mov r1, #0x75 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #0x16 - lsr r1, r1, #0x1f - bne _0224FAF4 - mov r1, #0x1c - mul r1, r0 - add r2, r4, r1 - mov r1, #0xb5 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #0x1a - lsr r1, r1, #0x1f - beq _0224FB3E -_0224FAF4: - mov r1, #0xc0 - mul r1, r0 - ldr r0, _0224FC38 ; =0x00002D8C - add r1, r4, r1 - ldr r2, _0224FC20 ; =0x00002144 - ldr r1, [r1, r0] - ldr r0, [r4, r2] - add r0, r0, r1 - cmp r0, #0 - bgt _0224FB3E - sub r0, r1, #1 - neg r0, r0 - str r0, [r4, r2] - ldr r0, [r4, #0x6c] - mov r1, #0x75 - lsl r0, r0, #6 - add r0, r4, r0 - lsl r1, r1, #2 - ldr r0, [r0, r1] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1f - beq _0224FB30 - add r0, r2, #0 - add r0, #0x28 - ldr r1, [r4, r0] - mov r0, #0x80 - orr r0, r1 - add r2, #0x28 - str r0, [r4, r2] - b _0224FB3E -_0224FB30: - add r0, r2, #0 - add r0, #0x28 - ldr r0, [r4, r0] - sub r1, #0xd4 - orr r0, r1 - add r2, #0x28 - str r0, [r4, r2] -_0224FB3E: - ldr r1, [r4, #0x6c] - ldr r0, _0224FC3C ; =0x000030E4 - lsl r3, r1, #2 - ldr r1, _0224FC20 ; =0x00002144 - add r0, r4, r0 - ldr r2, [r0, r3] - ldr r1, [r4, r1] - add r1, r2, r1 - str r1, [r0, r3] - ldr r0, _0224FC40 ; =0x00002DBC - ldr r1, [r4, #0x6c] - add r3, r4, r0 - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldrb r0, [r3, r2] - cmp r0, #0xff - bhs _0224FB66 - add r0, r0, #1 - strb r0, [r3, r2] -_0224FB66: - ldr r0, _0224FC30 ; =0x00003044 - mov r1, #0x3e - ldr r0, [r4, r0] - lsl r1, r1, #4 - lsl r0, r0, #4 - add r0, r4, r0 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _0224FBD4 - ldr r1, [r4, #0x6c] - ldr r0, _0224FC20 ; =0x00002144 - lsl r1, r1, #6 - add r2, r4, r1 - ldr r1, [r4, #0x64] - ldr r0, [r4, r0] - lsl r1, r1, #2 - add r2, r2, r1 - mov r1, #0x76 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0x6c] - ldr r2, [r4, #0x64] - lsl r0, r0, #6 - add r0, r4, r0 - add r1, #0x10 - str r2, [r0, r1] - ldr r0, [r4, #0x64] - bl sub_020787CC - mov r1, #0x7b - ldr r3, [r4, #0x6c] - lsl r1, r1, #2 - add r2, r4, r1 - lsl r5, r3, #6 - ldr r3, [r2, r5] - orr r0, r3 - str r0, [r2, r5] - ldr r2, [r4, #0x6c] - ldr r0, _0224FC20 ; =0x00002144 - add r5, r2, #0 - add r2, r1, #0 - mov r3, #0x1c - mul r5, r3 - ldr r0, [r4, r0] - add r5, r4, r5 - add r2, #0xec - str r0, [r5, r2] - ldr r0, [r4, #0x6c] - ldr r5, [r4, #0x64] - add r2, r0, #0 - mul r2, r3 - add r0, r4, r2 - add r1, #0xf0 - str r5, [r0, r1] - b _0224FC62 -_0224FBD4: - cmp r0, #1 - bne _0224FC62 - ldr r2, [r4, #0x6c] - ldr r0, _0224FC20 ; =0x00002144 - lsl r2, r2, #6 - add r3, r4, r2 - ldr r2, [r4, #0x64] - ldr r0, [r4, r0] - lsl r2, r2, #2 - add r2, r3, r2 - lsr r1, r1, #1 - str r0, [r2, r1] - ldr r0, [r4, #0x6c] - ldr r2, [r4, #0x64] - lsl r0, r0, #6 - add r1, r4, r0 - mov r0, #2 - lsl r0, r0, #8 - str r2, [r1, r0] - ldr r0, [r4, #0x64] - bl sub_020787CC - mov r1, #0x81 - ldr r3, [r4, #0x6c] - lsl r1, r1, #2 - add r2, r4, r1 - lsl r5, r3, #6 - ldr r3, [r2, r5] - orr r0, r3 - str r0, [r2, r5] - ldr r2, [r4, #0x6c] - ldr r0, _0224FC20 ; =0x00002144 - b _0224FC44 - nop -_0224FC18: .word 0x0000216C -_0224FC1C: .word 0x00002D90 -_0224FC20: .word 0x00002144 -_0224FC24: .word 0x000030F4 -_0224FC28: .word 0x00002DB0 -_0224FC2C: .word 0xFEFFFFFF -_0224FC30: .word 0x00003044 -_0224FC34: .word 0x000003DE -_0224FC38: .word 0x00002D8C -_0224FC3C: .word 0x000030E4 -_0224FC40: .word 0x00002DBC -_0224FC44: - add r5, r2, #0 - add r2, r1, #0 - mov r3, #0x1c - mul r5, r3 - ldr r0, [r4, r0] - add r5, r4, r5 - add r2, #0xdc - str r0, [r5, r2] - ldr r0, [r4, #0x6c] - ldr r5, [r4, #0x64] - add r2, r0, #0 - mul r2, r3 - add r0, r4, r2 - add r1, #0xe0 - str r5, [r0, r1] -_0224FC62: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0224FCF4 ; =0x00002D8C - ldr r2, [r1, r0] - ldr r0, _0224FCF8 ; =0x00002144 - ldr r1, [r4, r0] - add r0, r1, r2 - cmp r0, #0 - bgt _0224FC8E - mov r0, #0xbb - lsl r0, r0, #2 - add r1, r4, r0 - ldr r3, [r4, #0x64] - mov r0, #0x1c - mul r0, r3 - ldr r3, [r1, r0] - neg r2, r2 - add r2, r3, r2 - str r2, [r1, r0] - b _0224FCA2 -_0224FC8E: - ldr r3, [r4, #0x64] - mov r0, #0xbb - lsl r0, r0, #2 - mov r2, #0x1c - add r5, r3, #0 - add r0, r4, r0 - mul r5, r2 - ldr r2, [r0, r5] - add r1, r2, r1 - str r1, [r0, r5] -_0224FCA2: - ldr r3, _0224FCF8 ; =0x00002144 - ldr r0, [r4, #0x6c] - mov r2, #0x82 - lsl r0, r0, #6 - ldr r1, [r4, r3] - add r0, r4, r0 - lsl r2, r2, #2 - str r1, [r0, r2] - ldr r1, [r4, #0x6c] - ldr r0, [r4, #0x64] - lsl r1, r1, #6 - add r5, r4, r1 - add r1, r2, #4 - str r0, [r5, r1] - ldr r0, [r4, #0x6c] - sub r2, #0xf0 - str r0, [r4, r2] - ldr r0, [r4, r3] - add r3, #0x18 - str r0, [r4, r3] - add r0, r4, #0 - mov r1, #1 - mov r2, #2 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x1c - str r0, [r4, #0xc] - ldr r1, _0224FCFC ; =0x0000213C - mov r0, #2 - ldr r2, [r4, r1] - lsl r0, r0, #0xc - orr r0, r2 - add sp, #8 - str r0, [r4, r1] - pop {r3, r4, r5, r6, r7, pc} -_0224FCEC: - mov r0, #0x1c - str r0, [r4, #8] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224FCF4: .word 0x00002D8C -_0224FCF8: .word 0x00002144 -_0224FCFC: .word 0x0000213C - thumb_func_end ov16_0224F8EC - - thumb_func_start ov16_0224FD00 -ov16_0224FD00: ; 0x0224FD00 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r2, [r4, #0x38] - add r5, r0, #0 - cmp r2, #0 - beq _0224FD14 - cmp r2, #1 - beq _0224FDF2 - b _0224FEC8 -_0224FD14: - ldr r2, [r4, #0x3c] - cmp r2, #6 - bls _0224FD1C - b _0224FEC8 -_0224FD1C: - add r3, r2, r2 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_0224FD28: ; jump table - .short _0224FD36 - _0224FD28 - 2 ; case 0 - .short _0224FD42 - _0224FD28 - 2 ; case 1 - .short _0224FD54 - _0224FD28 - 2 ; case 2 - .short _0224FD88 - _0224FD28 - 2 ; case 3 - .short _0224FDA4 - _0224FD28 - 2 ; case 4 - .short _0224FDB2 - _0224FD28 - 2 ; case 5 - .short _0224FDDC - _0224FD28 - 2 ; case 6 -_0224FD36: - add r2, r2, #1 - str r2, [r4, #0x3c] - bl ov16_022511FC - cmp r0, #1 - beq _0224FDB0 -_0224FD42: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl ov16_02251218 - cmp r0, #1 - beq _0224FDB0 -_0224FD54: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - add r2, sp, #0xc - bl ov16_02253710 - cmp r0, #1 - bne _0224FD88 - ldr r0, _0224FED4 ; =0x0000216C - ldr r1, [r4, r0] - ldr r0, _0224FED8 ; =0x001FD849 - tst r0, r1 - bne _0224FD88 - ldr r2, [sp, #0xc] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224FD88: - ldr r0, [r4, #0x3c] - ldr r2, _0224FEDC ; =0x00000125 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224FDA4: - add r2, r2, #1 - str r2, [r4, #0x3c] - bl ov16_0225126C - cmp r0, #1 - bne _0224FDB2 -_0224FDB0: - b _0224FED0 -_0224FDB2: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - add r2, sp, #8 - bl ov16_0225708C - cmp r0, #1 - bne _0224FDDC - ldr r2, [sp, #8] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224FDDC: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl ov16_022512F8 - cmp r0, #1 - bne _0224FEC8 - add sp, #0x10 - pop {r3, r4, r5, pc} -_0224FDF2: - ldr r2, [r4, #0x3c] - cmp r2, #6 - bhi _0224FEC8 - add r3, r2, r2 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_0224FE04: ; jump table - .short _0224FE12 - _0224FE04 - 2 ; case 0 - .short _0224FE1E - _0224FE04 - 2 ; case 1 - .short _0224FE52 - _0224FE04 - 2 ; case 2 - .short _0224FE6E - _0224FE04 - 2 ; case 3 - .short _0224FE7A - _0224FE04 - 2 ; case 4 - .short _0224FEA4 - _0224FE04 - 2 ; case 5 - .short _0224FEB6 - _0224FE04 - 2 ; case 6 -_0224FE12: - add r2, r2, #1 - str r2, [r4, #0x3c] - bl ov16_022511FC - cmp r0, #1 - beq _0224FED0 -_0224FE1E: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - add r2, sp, #4 - bl ov16_02253710 - cmp r0, #1 - bne _0224FE52 - ldr r0, _0224FED4 ; =0x0000216C - ldr r1, [r4, r0] - ldr r0, _0224FED8 ; =0x001FD849 - tst r0, r1 - bne _0224FE52 - ldr r2, [sp, #4] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224FE52: - ldr r0, [r4, #0x3c] - ldr r2, _0224FEDC ; =0x00000125 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224FE6E: - add r2, r2, #1 - str r2, [r4, #0x3c] - bl ov16_0225126C - cmp r0, #1 - beq _0224FED0 -_0224FE7A: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - add r2, sp, #0 - bl ov16_0225708C - cmp r0, #1 - bne _0224FEA4 - ldr r2, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224FEA4: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl ov16_02251218 - cmp r0, #1 - beq _0224FED0 -_0224FEB6: - ldr r0, [r4, #0x3c] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl ov16_022512F8 - cmp r0, #1 - beq _0224FED0 -_0224FEC8: - mov r0, #0 - str r0, [r4, #0x3c] - mov r0, #0x1e - str r0, [r4, #8] -_0224FED0: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224FED4: .word 0x0000216C -_0224FED8: .word 0x001FD849 -_0224FEDC: .word 0x00000125 - thumb_func_end ov16_0224FD00 - - thumb_func_start ov16_0224FEE0 -ov16_0224FEE0: ; 0x0224FEE0 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0224FEE0 - - thumb_func_start ov16_0224FEE4 -ov16_0224FEE4: ; 0x0224FEE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r1, [r4, #0x40] - add r6, r0, #0 - cmp r1, #7 - bls _0224FEF4 - b _0225012E -_0224FEF4: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224FF00: ; jump table - .short _0224FF10 - _0224FF00 - 2 ; case 0 - .short _0224FF8A - _0224FF00 - 2 ; case 1 - .short _0224FF9E - _0224FF00 - 2 ; case 2 - .short _0224FFC4 - _0224FF00 - 2 ; case 3 - .short _0224FFD8 - _0224FF00 - 2 ; case 4 - .short _0224FFF2 - _0224FF00 - 2 ; case 5 - .short _0225001C - _0224FF00 - 2 ; case 6 - .short _022500B0 - _0224FF00 - 2 ; case 7 -_0224FF10: - mov r1, #0 - ldr r7, [r4, #0x44] - str r1, [sp, #4] - bl ov16_0223DF1C - cmp r7, r0 - bge _0224FF80 - add r5, r4, #0 - add r5, #0x44 -_0224FF22: - mov r0, #0xc0 - mul r0, r7 - mov r1, #0xb7 - add r0, r4, r0 - lsl r1, r1, #6 - ldr r2, [r0, r1] - ldr r1, _0225013C ; =0x200400C0 - tst r1, r2 - bne _0224FF68 - ldr r1, _02250140 ; =0x00002DC4 - ldr r2, [r0, r1] - ldr r1, _0225013C ; =0x200400C0 - tst r1, r2 - beq _0224FF68 - ldr r1, _02250140 ; =0x00002DC4 - ldr r2, [r0, r1] - ldr r1, _02250144 ; =0xDFFBFF3F - and r2, r1 - ldr r1, _02250140 ; =0x00002DC4 - str r2, [r0, r1] - ldr r2, _02250148 ; =0x0000011F - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0x46 - ldr r1, [r4, #0x44] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp, #4] -_0224FF68: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - ldr r0, [sp, #4] - cmp r0, #0 - bne _0224FFF0 - ldr r7, [r4, #0x44] - add r0, r6, #0 - bl ov16_0223DF1C - cmp r7, r0 - blt _0224FF22 -_0224FF80: - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - mov r0, #0 - str r0, [r4, #0x44] -_0224FF8A: - ldr r0, [r4, #0x40] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x40] - ldr r2, [r4, #8] - add r0, r6, #0 - bl ov16_02257808 - cmp r0, #1 - beq _0224FFF0 -_0224FF9E: - add r0, r6, #0 - add r1, r4, #0 - bl ov16_02256414 - add r2, r0, #0 - beq _0224FFBE - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0224FFBE: - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] -_0224FFC4: - ldr r0, [r4, #0x40] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x40] - ldr r2, [r4, #0x64] - add r0, r6, #0 - bl ov16_022579A4 - cmp r0, #1 - beq _0224FFF0 -_0224FFD8: - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - ldr r2, [r4, #0x6c] - cmp r2, #0xff - beq _0224FFF2 - add r0, r6, #0 - add r1, r4, #0 - bl ov16_022579A4 - cmp r0, #1 - bne _0224FFF2 -_0224FFF0: - b _02250138 -_0224FFF2: - ldr r0, [r4, #0x40] - add r1, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x40] - add r0, r6, #0 - add r2, sp, #0xc - bl ov16_022588BC - cmp r0, #1 - bne _0225001C - ldr r2, [sp, #0xc] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225001C: - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x60 - bne _0225002C - mov r2, #0 - b _02250040 -_0225002C: - ldr r0, _0225014C ; =0x00002160 - ldr r2, [r4, r0] - cmp r2, #0 - bne _02250040 - ldr r0, _02250150 ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02250154 ; =0x000003E2 - ldrb r2, [r1, r0] -_02250040: - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - ldr r3, [r4, #0x6c] - cmp r3, #0xff - beq _022500B0 - mov r0, #0xc0 - add r5, r3, #0 - mul r5, r0 - ldr r0, _02250158 ; =0x00002DAC - add r1, r4, r5 - ldr r1, [r1, r0] - mov r0, #0x20 - tst r1, r0 - beq _022500B0 - ldr r1, _0225015C ; =0x0000216C - lsl r0, r0, #9 - ldr r1, [r4, r1] - tst r0, r1 - bne _022500B0 - ldr r0, [r4, #0x64] - cmp r3, r0 - beq _022500B0 - mov r0, #0x1c - mul r0, r3 - add r7, r4, r0 - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r1, [r7, r0] - cmp r1, #0 - bne _02250086 - add r0, #8 - ldr r0, [r7, r0] - cmp r0, #0 - beq _022500B0 -_02250086: - ldr r0, _02250160 ; =0x00002D8C - add r1, r4, r5 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022500B0 - cmp r2, #0xa - bne _022500B0 - mov r0, #0x46 - lsl r0, r0, #2 - str r3, [r4, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1d - bl ov16_02251E1C - ldr r0, [r4, #8] - add sp, #0x10 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_022500B0: - mov r0, #0 - str r0, [sp] - ldr r7, [r4, #0x44] - add r0, r6, #0 - bl ov16_0223DF1C - cmp r7, r0 - bge _0225011E - add r5, r4, #0 - add r5, #0x44 -_022500C4: - ldr r0, _02250164 ; =0x000021EC - add r1, r4, r7 - ldrb r7, [r1, r0] - add r0, r7, #0 - bl sub_020787CC - ldr r1, _02250168 ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - ldr r0, [r5, #0] - beq _022500E0 - add r0, r0, #1 - str r0, [r5, #0] - b _02250112 -_022500E0: - add r0, r0, #1 - str r0, [r5, #0] - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - add r3, sp, #8 - bl ov16_02258104 - cmp r0, #1 - bne _02250112 - mov r0, #0x46 - lsl r0, r0, #2 - str r7, [r4, r0] - ldr r2, [sp, #8] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - str r0, [sp] - b _0225011E -_02250112: - ldr r7, [r4, #0x44] - add r0, r6, #0 - bl ov16_0223DF1C - cmp r7, r0 - blt _022500C4 -_0225011E: - ldr r0, [sp] - cmp r0, #0 - bne _0225012E - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - mov r0, #0 - str r0, [r4, #0x44] -_0225012E: - mov r0, #0 - str r0, [r4, #0x40] - str r0, [r4, #0x44] - mov r0, #0x1f - str r0, [r4, #8] -_02250138: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225013C: .word 0x200400C0 -_02250140: .word 0x00002DC4 -_02250144: .word 0xDFFBFF3F -_02250148: .word 0x0000011F -_0225014C: .word 0x00002160 -_02250150: .word 0x00003044 -_02250154: .word 0x000003E2 -_02250158: .word 0x00002DAC -_0225015C: .word 0x0000216C -_02250160: .word 0x00002D8C -_02250164: .word 0x000021EC -_02250168: .word 0x00003108 - thumb_func_end ov16_0224FEE4 - - thumb_func_start ov16_0225016C -ov16_0225016C: ; 0x0225016C - bx lr - ; .align 2, 0 - thumb_func_end ov16_0225016C - - thumb_func_start ov16_02250170 -ov16_02250170: ; 0x02250170 - push {r3, r4, r5, r6, r7, lr} - ldr r6, _0225025C ; =0x0000217D - add r4, r1, #0 - ldrb r2, [r4, r6] - str r0, [sp] - cmp r2, #0 - beq _02250256 - ldr r3, [r4, #0x74] - mov ip, r3 - cmp r3, #0xff - bne _02250208 - ldr r3, [r4, #0x64] - mov r7, #0xc0 - add r5, r3, #0 - mul r5, r7 - ldr r3, _02250260 ; =0x00002DAC - add r5, r4, r5 - ldr r5, [r5, r3] - mov r3, #7 - tst r3, r5 - bne _02250208 - add r3, r6, #0 - sub r3, #0x11 - ldr r5, [r4, r3] - mov r3, #1 - lsl r3, r3, #0xe - tst r3, r5 - bne _02250208 - sub r2, r6, #1 - ldrb r2, [r4, r2] - sub r3, r2, #1 - sub r2, r6, #1 - strb r3, [r4, r2] - ldrb r2, [r4, r2] - cmp r2, #0 - beq _022501EE - mov r3, #1 - add r2, r6, #3 - str r3, [r4, r2] - bl ov16_02255F94 - add r1, r6, #0 - sub r1, #0x41 - ldr r2, [r4, r1] - ldr r0, _02250264 ; =0xFFFFBFFF - and r0, r2 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x4c - ldr r0, [r4, r0] - add r1, #0x48 - str r0, [r4, r1] - ldr r2, _02250268 ; =0x00003044 - add r0, r4, #0 - ldr r2, [r4, r2] - mov r1, #0 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x17 - str r0, [r4, #0xc] - b _0225024E -_022501EE: - ldrb r0, [r4, r6] - add r7, #0x70 - mov r1, #1 - str r0, [r4, r7] - add r0, r4, #0 - mov r2, #0x11 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x21 - str r0, [r4, #0xc] - b _0225024E -_02250208: - mov r0, ip - cmp r0, #0xff - bne _02250222 - ldr r0, [r4, #0x64] - mov r1, #0xc0 - add r3, r0, #0 - mul r3, r1 - ldr r0, _02250260 ; =0x00002DAC - add r3, r4, r3 - ldr r3, [r3, r0] - mov r0, #7 - tst r0, r3 - beq _02250232 -_02250222: - ldr r0, _0225026C ; =0x0000217C - ldrb r0, [r4, r0] - sub r0, r2, r0 - add r1, r0, #1 - mov r0, #0x13 - lsl r0, r0, #4 - str r1, [r4, r0] - b _0225023C -_02250232: - ldr r0, _0225026C ; =0x0000217C - add r1, #0x70 - ldrb r0, [r4, r0] - sub r0, r2, r0 - str r0, [r4, r1] -_0225023C: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x11 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x21 - str r0, [r4, #0xc] -_0225024E: - ldr r0, [sp] - bl ov16_02266AA0 - pop {r3, r4, r5, r6, r7, pc} -_02250256: - mov r0, #0x21 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225025C: .word 0x0000217D -_02250260: .word 0x00002DAC -_02250264: .word 0xFFFFBFFF -_02250268: .word 0x00003044 -_0225026C: .word 0x0000217C - thumb_func_end ov16_02250170 - - thumb_func_start ov16_02250270 -ov16_02250270: ; 0x02250270 - push {r3, lr} - ldr r0, _02250294 ; =0x0000213C - ldr r2, [r1, r0] - mov r0, #0xf - lsl r0, r0, #0x18 - tst r0, r2 - beq _0225028C - add r0, r1, #0 - mov r1, #0x21 - add r2, r1, #0 - mov r3, #0 - bl ov16_02250EF4 - pop {r3, pc} -_0225028C: - mov r0, #0x22 - str r0, [r1, #8] - pop {r3, pc} - nop -_02250294: .word 0x0000213C - thumb_func_end ov16_02250270 - - thumb_func_start ov16_02250298 -ov16_02250298: ; 0x02250298 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #0x85 - lsl r1, r1, #6 - add r5, r0, #0 - ldr r2, [r4, r1] - mov r0, #8 - tst r0, r2 - beq _022502BC - mov r0, #8 - bic r2, r0 - str r2, [r4, r1] - ldr r0, [r4, #0x64] - str r0, [r4, #0x6c] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - str r0, [r4, #0x64] -_022502BC: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02250FF4 - ldr r0, _0225041C ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02250420 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #4 - bne _02250388 - ldr r0, _02250424 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #2 - tst r0, r1 - bne _02250388 - add r0, r5, #0 - bl ov16_0223DF1C - ldr r1, _02250428 ; =0x0000217E - ldrb r2, [r4, r1] - cmp r2, r0 - bge _02250388 - mov r2, #0xd - add r0, r1, #6 - str r2, [r4, r0] - add r0, r5, #0 - bl ov16_0223DF1C - ldr r1, [r4, #0x64] - add r0, r5, #0 - bl ov16_0223DF14 - bl ov16_02263AE4 - mov r1, #1 - add r7, r0, #0 - and r7, r1 -_0225030A: - ldr r1, _02250428 ; =0x0000217E - ldr r0, _02250428 ; =0x0000217E - ldrb r1, [r4, r1] - ldrb r0, [r4, r0] - add r2, r1, #1 - ldr r1, _02250428 ; =0x0000217E - strb r2, [r4, r1] - add r1, r4, r0 - ldr r0, _0225042C ; =0x000021EC - ldrb r6, [r1, r0] - add r0, r6, #0 - bl sub_020787CC - ldr r1, _02250430 ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - bne _02250372 - mov r0, #0xc0 - mul r0, r6 - add r1, r4, r0 - ldr r0, _02250434 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02250372 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223DF14 - str r0, [sp] - cmp r7, #0 - beq _02250352 - bl ov16_02263AE4 - mov r1, #1 - tst r0, r1 - beq _02250362 -_02250352: - cmp r7, #0 - bne _02250372 - ldr r0, [sp] - bl ov16_02263AE4 - mov r1, #1 - tst r0, r1 - beq _02250372 -_02250362: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255F94 - str r6, [r4, #0x6c] - mov r0, #0x16 - str r0, [r4, #8] - b _02250380 -_02250372: - add r0, r5, #0 - bl ov16_0223DF1C - ldr r1, _02250428 ; =0x0000217E - ldrb r1, [r4, r1] - cmp r1, r0 - blt _0225030A -_02250380: - add r0, r5, #0 - bl ov16_02266AA0 - pop {r3, r4, r5, r6, r7, pc} -_02250388: - ldr r0, _0225041C ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02250420 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #8 - bne _02250416 - ldr r0, _02250424 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #2 - tst r0, r1 - bne _02250416 - add r0, r5, #0 - bl ov16_0223DF1C - ldr r1, _02250428 ; =0x0000217E - ldrb r2, [r4, r1] - cmp r2, r0 - bge _02250416 - mov r2, #0xd - add r0, r1, #6 - str r2, [r4, r0] - add r0, r5, #0 - bl ov16_0223DF1C - ldr r7, _02250428 ; =0x0000217E -_022503BE: - ldr r0, _02250428 ; =0x0000217E - ldrb r1, [r4, r0] - ldrb r0, [r4, r7] - add r1, r4, r1 - add r0, r0, #1 - strb r0, [r4, r7] - ldr r0, _0225042C ; =0x000021EC - ldrb r6, [r1, r0] - add r0, r6, #0 - bl sub_020787CC - ldr r1, _02250430 ; =0x00003108 - ldrb r1, [r4, r1] - tst r0, r1 - bne _02250400 - mov r0, #0xc0 - mul r0, r6 - add r1, r4, r0 - ldr r0, _02250434 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02250400 - ldr r0, [r4, #0x64] - cmp r6, r0 - beq _02250400 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255F94 - str r6, [r4, #0x6c] - mov r0, #0x16 - str r0, [r4, #8] - b _0225040E -_02250400: - add r0, r5, #0 - bl ov16_0223DF1C - ldr r1, _02250428 ; =0x0000217E - ldrb r1, [r4, r1] - cmp r1, r0 - blt _022503BE -_0225040E: - add r0, r5, #0 - bl ov16_02266AA0 - pop {r3, r4, r5, r6, r7, pc} -_02250416: - mov r0, #0x23 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225041C: .word 0x00003044 -_02250420: .word 0x000003E6 -_02250424: .word 0x0000213C -_02250428: .word 0x0000217E -_0225042C: .word 0x000021EC -_02250430: .word 0x00003108 -_02250434: .word 0x00002D8C - thumb_func_end ov16_02250298 - - thumb_func_start ov16_02250438 -ov16_02250438: ; 0x02250438 - push {r4, lr} - ldr r0, _02250474 ; =0x0000213C - add r4, r1, #0 - ldr r1, [r4, r0] - mov r0, #0xf - lsl r0, r0, #0x1c - and r0, r1 - beq _0225046E - lsr r0, r0, #0x1c - bl sub_020787EC - str r0, [r4, #0x74] - ldr r1, _02250474 ; =0x0000213C - ldr r0, _02250478 ; =0x0FFFFFFF - ldr r2, [r4, r1] - and r0, r2 - str r0, [r4, r1] - ldr r2, _0225047C ; =0x00000115 - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x24 - str r0, [r4, #0xc] - pop {r4, pc} -_0225046E: - mov r0, #0x24 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_02250474: .word 0x0000213C -_02250478: .word 0x0FFFFFFF -_0225047C: .word 0x00000115 - thumb_func_end ov16_02250438 - - thumb_func_start ov16_02250480 -ov16_02250480: ; 0x02250480 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225143C - cmp r0, #1 - beq _02250490 - mov r0, #0x26 - str r0, [r4, #8] -_02250490: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02250480 - - thumb_func_start ov16_02250494 -ov16_02250494: ; 0x02250494 - bx lr - ; .align 2, 0 - thumb_func_end ov16_02250494 - - thumb_func_start ov16_02250498 -ov16_02250498: ; 0x02250498 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0x64] - add r5, r0, #0 - add r0, r4, #0 - bl ov16_02258AB8 - ldr r1, _022505AC ; =0x0000213C - lsl r0, r0, #0x18 - ldr r3, [r4, r1] - mov r2, #0x20 - lsr r0, r0, #0x18 - tst r2, r3 - bne _022504BE - add r1, r1, #4 - ldr r2, [r4, r1] - mov r1, #4 - tst r1, r2 - beq _02250512 -_022504BE: - cmp r0, #0x37 - beq _022504CA - cmp r0, #0x73 - beq _022504CA - cmp r0, #0x7d - bne _02250504 -_022504CA: - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #0xa5 - beq _02250512 - ldr r1, _022505B0 ; =0x00000171 - cmp r0, r1 - bne _022504E6 - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r4, r1] - mov r1, #0x10 - tst r1, r2 - bne _02250512 -_022504E6: - cmp r0, #0xe2 - bne _022504F6 - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r4, r1] - mov r1, #0x40 - tst r1, r2 - bne _02250512 -_022504F6: - ldr r2, [r4, #0x64] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _022505B4 ; =0x00002DF8 - strh r0, [r2, r1] - b _02250512 -_02250504: - ldr r2, [r4, #0x64] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _022505B4 ; =0x00002DF8 - mov r0, #0 - strh r0, [r2, r1] -_02250512: - ldr r0, _022505AC ; =0x0000213C - mov r1, #1 - ldr r2, [r4, r0] - lsl r1, r1, #0x14 - tst r1, r2 - bne _0225057A - add r0, r0, #4 - ldr r1, [r4, r0] - mov r0, #4 - tst r0, r1 - beq _02250540 - ldr r2, [r4, #0x64] - ldr r1, _022505B8 ; =0x00003044 - lsl r2, r2, #1 - add r3, r4, r2 - add r2, r1, #0 - ldr r0, [r4, r1] - add r2, #0x18 - strh r0, [r3, r2] - sub r0, r1, #4 - ldr r2, [r4, r0] - add r0, r1, #4 - b _0225054E -_02250540: - ldr r0, [r4, #0x64] - mov r2, #0 - lsl r0, r0, #1 - add r1, r4, r0 - ldr r0, _022505BC ; =0x0000305C - strh r2, [r1, r0] - sub r0, #0x14 -_0225054E: - str r2, [r4, r0] - mov r0, #0x85 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x40 - tst r0, r1 - beq _0225056E - mov r0, #0xc1 - ldr r1, [r4, #0x64] - lsl r0, r0, #6 - ldr r2, [r4, r0] - lsl r1, r1, #1 - add r1, r4, r1 - add r0, #0x3c - strh r2, [r1, r0] - b _0225057A -_0225056E: - ldr r0, [r4, #0x64] - mov r2, #0 - lsl r0, r0, #1 - add r1, r4, r0 - ldr r0, _022505C0 ; =0x0000307C - strh r2, [r1, r0] -_0225057A: - mov r0, #0x85 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #4 - tst r0, r1 - beq _02250596 - mov r0, #0xc1 - ldr r1, [r4, #0x64] - lsl r0, r0, #6 - ldr r2, [r4, r0] - lsl r1, r1, #1 - add r1, r4, r1 - add r0, #0x6c - strh r2, [r1, r0] -_02250596: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02250FF4 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225991C - mov r0, #0x27 - str r0, [r4, #8] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022505AC: .word 0x0000213C -_022505B0: .word 0x00000171 -_022505B4: .word 0x00002DF8 -_022505B8: .word 0x00003044 -_022505BC: .word 0x0000305C -_022505C0: .word 0x0000307C - thumb_func_end ov16_02250498 - - thumb_func_start ov16_022505C4 -ov16_022505C4: ; 0x022505C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - bne _02250646 - ldr r2, [r4, #0x64] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #0 - bl ov16_02257628 - cmp r0, #1 - beq _0225069C - ldr r2, [r4, #0x6c] - cmp r2, #0xff - beq _022505FA - add r0, r5, #0 - add r1, r4, #0 - mov r3, #0 - bl ov16_02257628 - cmp r0, #1 - beq _0225069C -_022505FA: - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r1, #0 - bl ov16_02250F98 - cmp r0, #1 - beq _0225069C - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02250A48 - cmp r0, #1 - beq _0225069C - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02256414 - add r2, r0, #0 - beq _02250632 - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_02250632: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_022513B0 - cmp r0, #1 - beq _0225069C - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02250E8C -_02250646: - add r1, r4, #0 - add r1, #0xec - ldr r1, [r1, #0] - mov r0, #0x27 - add r2, r4, r1 - ldr r1, _022506A0 ; =0x000021E8 - ldrb r2, [r2, r1] - sub r1, #0x40 - lsl r2, r2, #4 - add r2, r4, r2 - str r0, [r2, r1] - ldr r1, [r4, #0x64] - mov r0, #0x1c - mul r0, r1 - add r1, r4, r0 - mov r0, #0xb5 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1f - beq _02250684 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225B148 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255FBC - mov r1, #0 - b _0225068C -_02250684: - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - add r1, r0, #1 -_0225068C: - add r0, r4, #0 - add r0, #0xec - str r1, [r0, #0] - add r0, r4, #0 - bl ov16_022541C4 - mov r0, #8 - str r0, [r4, #8] -_0225069C: - pop {r3, r4, r5, pc} - nop -_022506A0: .word 0x000021E8 - thumb_func_end ov16_022505C4 - - thumb_func_start ov16_022506A4 -ov16_022506A4: ; 0x022506A4 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #1 - bl ov16_02250EF4 - cmp r0, #1 - beq _022506BC - mov r0, #0x27 - str r0, [r4, #8] -_022506BC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_022506A4 - - thumb_func_start ov16_022506C0 -ov16_022506C0: ; 0x022506C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223F438 - mov r1, #0x80 - tst r0, r1 - beq _022506D6 - mov r0, #0x2b - str r0, [r4, #8] - b _0225073E -_022506D6: - add r0, r5, #0 - bl ov16_0223F438 - cmp r0, #2 - beq _022506EA - add r0, r5, #0 - bl ov16_0223F438 - cmp r0, #3 - bne _022506FE -_022506EA: - add r0, r4, #0 - mov r1, #1 - mov r2, #5 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x2b - str r0, [r4, #0xc] - b _0225073E -_022506FE: - add r0, r5, #0 - bl ov16_0223F438 - cmp r0, #1 - bne _0225071C - add r0, r4, #0 - mov r1, #1 - mov r2, #4 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x2b - str r0, [r4, #0xc] - b _0225073E -_0225071C: - add r0, r5, #0 - bl ov16_0223F438 - cmp r0, #4 - bne _02250730 - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #0x2b - str r0, [r4, #0xc] - b _0225073E -_02250730: - add r0, r5, #0 - bl ov16_0223F438 - cmp r0, #5 - bne _0225073E - mov r0, #0x2b - str r0, [r4, #8] -_0225073E: - ldr r0, _02250748 ; =0x0000311F - mov r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} - nop -_02250748: .word 0x0000311F - thumb_func_end ov16_022506C0 - - thumb_func_start ov16_0225074C -ov16_0225074C: ; 0x0225074C - push {r4, lr} - add r4, r1, #0 - bl sub_0200F2AC - cmp r0, #1 - bne _0225075C - mov r0, #0x2b - str r0, [r4, #8] -_0225075C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0225074C - - thumb_func_start ov16_02250760 -ov16_02250760: ; 0x02250760 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - bl ov16_0223DF0C - mov r1, #4 - add r4, r0, #0 - and r4, r1 - bne _02250786 - add r0, r6, #0 - mov r1, #0 - bl ov16_0223DF20 - add r6, r0, #0 - bl sub_020776B0 - add r0, r6, #0 - bl sub_0207782C -_02250786: - cmp r4, #0 - beq _02250790 - mov r0, #0x16 - bl sub_020360DC -_02250790: - mov r0, #0x2c - str r0, [r5, #8] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02250760 - - thumb_func_start ov16_02250798 -ov16_02250798: ; 0x02250798 - bx lr - ; .align 2, 0 - thumb_func_end ov16_02250798 - - thumb_func_start ov16_0225079C -ov16_0225079C: ; 0x0225079C - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r1, [sp, #4] - mov r1, #0 - str r0, [sp] - str r1, [sp, #0x30] - bl ov16_0223DF1C - str r0, [sp, #0x28] - ldr r0, [sp] - bl ov16_0223DF0C - str r0, [sp, #0x24] - ldr r0, [sp, #4] - ldr r0, [r0, #8] - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - cmp r0, #0 - bgt _022507C8 - b _022509BA -_022507C8: - ldr r0, [sp, #4] - mov r1, #2 - str r0, [sp, #0x1c] - str r0, [sp, #0x18] - ldr r0, [sp, #0x24] - and r0, r1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - mov r1, #0x18 - and r0, r1 - str r0, [sp, #0x10] - ldr r0, [sp, #0x24] - mov r1, #0x10 - and r0, r1 - str r0, [sp, #0xc] -_022507E6: - mov r1, #0x4f - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r0, #1 - bic r2, r0 - ldr r0, [sp, #0x1c] - str r2, [r0, r1] - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02250802 - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02250814 -_02250802: - ldr r0, [sp, #0xc] - cmp r0, #0 - beq _022508FA - ldr r0, [sp] - ldr r1, [sp, #0x2c] - bl ov16_0223E208 - cmp r0, #0 - bne _022508FA -_02250814: - ldr r3, _02250A38 ; =0x00002D8C - ldr r0, [sp, #0x18] - ldr r0, [r0, r3] - cmp r0, #0 - bne _0225083C - ldr r1, [sp, #0x2c] - mov r2, #2 - add r4, r1, #0 - eor r4, r2 - mov r1, #0xc0 - add r5, r4, #0 - mul r5, r1 - ldr r1, [sp, #4] - add r1, r1, r5 - ldr r1, [r1, r3] - cmp r1, #0 - bne _0225083C - ldr r1, [sp, #0x2c] - tst r1, r2 - bne _02250840 -_0225083C: - cmp r0, #0 - beq _02250842 -_02250840: - b _022509A0 -_02250842: - ldr r0, [sp] - ldr r1, [sp, #0x2c] - mov r7, #0 - bl ov16_0223DF20 - add r6, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x2c] - bl ov16_0223DF14 - add r0, r6, #0 - add r5, r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _022508BA - ldr r0, [sp, #0x2c] - mov r1, #2 - eor r1, r0 - ldr r0, [sp, #4] - add r0, r0, r1 - str r0, [sp, #8] -_0225086E: - add r0, r6, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _022508AE - add r0, r4, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02250A3C ; =0x000001EE - cmp r0, r1 - beq _022508AE - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _022508AE - ldr r2, [sp, #8] - ldr r1, _02250A40 ; =0x0000219C - ldrb r1, [r2, r1] - cmp r5, r1 - beq _022508AE - add r7, r7, r0 -_022508AE: - add r0, r6, #0 - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0225086E -_022508BA: - cmp r7, #0 - bne _022508DE - ldr r0, [sp, #0x2c] - bl sub_020787CC - ldr r2, _02250A44 ; =0x00003108 - ldr r1, [sp, #4] - ldrb r1, [r1, r2] - orr r1, r0 - ldr r0, [sp, #4] - strb r1, [r0, r2] - add r1, r0, #0 - ldr r0, [sp, #0x2c] - mov r2, #6 - add r1, r1, r0 - ldr r0, _02250A40 ; =0x0000219C - strb r2, [r1, r0] - b _022509A0 -_022508DE: - ldr r1, [sp, #0x20] - ldr r0, [sp, #4] - str r1, [r0, #0xc] - mov r1, #0x15 - str r1, [r0, #8] - mov r1, #0x4f - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r0, #1 - orr r2, r0 - ldr r0, [sp, #0x1c] - str r2, [r0, r1] - b _022509A0 -_022508FA: - ldr r1, _02250A38 ; =0x00002D8C - ldr r0, [sp, #0x18] - ldr r0, [r0, r1] - cmp r0, #0 - bne _022509A0 - ldr r0, [sp] - ldr r1, [sp, #0x2c] - mov r7, #0 - bl ov16_0223DF20 - add r6, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x2c] - bl ov16_0223DF14 - add r0, r6, #0 - add r5, r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02250962 -_02250924: - add r0, r6, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02250956 - add r0, r4, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02250A3C ; =0x000001EE - cmp r0, r1 - beq _02250956 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r7, r7, r0 -_02250956: - add r0, r6, #0 - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _02250924 -_02250962: - cmp r7, #0 - bne _02250986 - ldr r0, [sp, #0x2c] - bl sub_020787CC - ldr r2, _02250A44 ; =0x00003108 - ldr r1, [sp, #4] - ldrb r1, [r1, r2] - orr r1, r0 - ldr r0, [sp, #4] - strb r1, [r0, r2] - add r1, r0, #0 - ldr r0, [sp, #0x2c] - mov r2, #6 - add r1, r1, r0 - ldr r0, _02250A40 ; =0x0000219C - strb r2, [r1, r0] - b _022509A0 -_02250986: - ldr r1, [sp, #0x20] - ldr r0, [sp, #4] - str r1, [r0, #0xc] - mov r1, #0x15 - str r1, [r0, #8] - mov r1, #0x4f - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r0, #1 - orr r2, r0 - ldr r0, [sp, #0x1c] - str r2, [r0, r1] -_022509A0: - ldr r0, [sp, #0x1c] - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, #0xc0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x2c] - add r1, r0, #1 - ldr r0, [sp, #0x28] - str r1, [sp, #0x2c] - cmp r1, r0 - bge _022509BA - b _022507E6 -_022509BA: - ldr r0, [sp, #4] - ldr r0, [r0, #8] - cmp r0, #0x15 - bne _02250A30 - ldr r0, [sp, #0x24] - mov r1, #0x86 - tst r0, r1 - bne _02250A22 - ldr r0, [sp] - bl ov16_0223EE18 - cmp r0, #0 - bne _02250A22 - mov r1, #0x4f - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r2, #1 - tst r0, r2 - beq _022509EC - ldr r0, [sp, #4] - add r1, r1, #4 - ldr r0, [r0, r1] - tst r0, r2 - bne _02250A22 -_022509EC: - ldr r0, [sp] - ldr r1, [sp, #4] - mov r2, #0 - bl ov16_02255B10 - cmp r0, #0 - beq _02250A22 - mov r1, #0x4f - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r2, #1 - tst r0, r2 - beq _02250A10 - mov r2, #0 - sub r1, r1, #4 - ldr r0, [sp, #4] - b _02250A14 -_02250A10: - ldr r0, [sp, #4] - sub r1, r1, #4 -_02250A14: - str r2, [r0, r1] - ldr r0, [sp, #4] - mov r1, #1 - mov r2, #0xe7 - bl ov16_02251E1C - b _02250A2C -_02250A22: - ldr r0, [sp, #4] - mov r1, #1 - mov r2, #0xa - bl ov16_02251E1C -_02250A2C: - mov r0, #1 - str r0, [sp, #0x30] -_02250A30: - ldr r0, [sp, #0x30] - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_02250A38: .word 0x00002D8C -_02250A3C: .word 0x000001EE -_02250A40: .word 0x0000219C -_02250A44: .word 0x00003108 - thumb_func_end ov16_0225079C - - thumb_func_start ov16_02250A48 -ov16_02250A48: ; 0x02250A48 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - str r0, [sp] - str r1, [sp, #4] - bl ov16_0223DF1C - str r0, [sp, #0x24] - ldr r0, [sp] - bl ov16_0223DF0C - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x1c] - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - cmp r0, #0 - bgt _02250A6C - b _02250CC6 -_02250A6C: - ldr r0, [sp, #0x20] - mov r1, #8 - and r0, r1 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - mov r1, #0x10 - and r0, r1 - str r0, [sp, #8] -_02250A7C: - ldr r0, [sp, #0x20] - sub r0, #0x4a - cmp r0, #1 - bhi _02250B16 - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223E208 - cmp r0, #0 - bne _02250B16 - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223E1F8 - cmp r0, #2 - bne _02250B38 - ldr r1, _02250D94 ; =0x00002D8C - ldr r0, [sp, #4] - ldr r0, [r0, r1] - cmp r0, #0 - bne _02250B38 - ldr r0, [sp] - ldr r1, [sp, #0x28] - mov r7, #0 - bl ov16_0223DF20 - add r6, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223DF14 - add r0, r6, #0 - add r4, r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02250B04 -_02250AC6: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r5, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02250AF8 - add r0, r5, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02250D98 ; =0x000001EE - cmp r0, r1 - beq _02250AF8 - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r7, r7, r0 -_02250AF8: - add r0, r6, #0 - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _02250AC6 -_02250B04: - cmp r7, #0 - bne _02250B38 - ldr r0, [sp, #0x1c] - mov r1, #2 - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - b _02250CB2 -_02250B16: - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _02250B2E - ldr r0, [sp, #8] - cmp r0, #0 - beq _02250C20 - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223E208 - cmp r0, #0 - beq _02250C20 -_02250B2E: - ldr r1, _02250D94 ; =0x00002D8C - ldr r0, [sp, #4] - ldr r0, [r0, r1] - cmp r0, #0 - beq _02250B3A -_02250B38: - b _02250CB2 -_02250B3A: - ldr r0, [sp] - ldr r1, [sp, #0x28] - mov r4, #0 - bl ov16_0223DF20 - add r7, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223E258 - add r1, r0, #0 - ldr r0, [sp] - bl ov16_0223DF20 - str r0, [sp, #0x18] - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223DF14 - str r0, [sp, #0x14] - add r0, r7, #0 - add r5, r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02250BAC -_02250B6E: - add r0, r7, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02250BA0 - add r0, r6, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02250D98 ; =0x000001EE - cmp r0, r1 - beq _02250BA0 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r4, r4, r0 -_02250BA0: - add r0, r7, #0 - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _02250B6E -_02250BAC: - ldr r0, [sp, #0x18] - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02250BF6 - ldr r7, _02250D98 ; =0x000001EE -_02250BBA: - ldr r0, [sp, #0x18] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02250BEA - add r0, r6, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - cmp r0, r7 - beq _02250BEA - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r4, r4, r0 -_02250BEA: - ldr r0, [sp, #0x18] - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _02250BBA -_02250BF6: - cmp r4, #0 - bne _02250CB2 - ldr r0, [sp, #0x14] - bl ov16_02263AE4 - mov r1, #1 - tst r0, r1 - beq _02250C12 - ldr r0, [sp, #0x1c] - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - b _02250CB2 -_02250C12: - ldr r0, [sp, #0x1c] - mov r1, #2 - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - b _02250CB2 -_02250C20: - ldr r1, _02250D94 ; =0x00002D8C - ldr r0, [sp, #4] - ldr r0, [r0, r1] - cmp r0, #0 - bne _02250CB2 - ldr r0, [sp] - ldr r1, [sp, #0x28] - mov r7, #0 - bl ov16_0223DF20 - add r6, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x28] - bl ov16_0223DF14 - str r0, [sp, #0x10] - add r0, r6, #0 - add r4, r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02250C8A -_02250C4C: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r5, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02250C7E - add r0, r5, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _02250D98 ; =0x000001EE - cmp r0, r1 - beq _02250C7E - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r7, r7, r0 -_02250C7E: - add r0, r6, #0 - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _02250C4C -_02250C8A: - cmp r7, #0 - bne _02250CB2 - ldr r0, [sp, #0x10] - bl ov16_02263AE4 - mov r1, #1 - tst r0, r1 - beq _02250CA6 - ldr r0, [sp, #0x1c] - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - b _02250CB2 -_02250CA6: - ldr r0, [sp, #0x1c] - mov r1, #2 - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] -_02250CB2: - ldr r0, [sp, #4] - add r0, #0xc0 - str r0, [sp, #4] - ldr r0, [sp, #0x28] - add r1, r0, #1 - ldr r0, [sp, #0x24] - str r1, [sp, #0x28] - cmp r1, r0 - bge _02250CC6 - b _02250A7C -_02250CC6: - ldr r0, [sp, #0x1c] - cmp r0, #1 - bne _02250CDC - ldr r0, [sp, #0x20] - mov r1, #1 - tst r0, r1 - beq _02250CDC - ldr r0, [sp, #0x20] - mov r1, #4 - tst r0, r1 - beq _02250CF2 -_02250CDC: - ldr r0, [sp, #0x1c] - cmp r0, #1 - bne _02250DC4 - ldr r0, [sp, #0x20] - mov r1, #0x80 - tst r0, r1 - beq _02250DC4 - ldr r0, [sp, #0x20] - mov r1, #4 - tst r0, r1 - bne _02250DC4 -_02250CF2: - ldr r0, [sp] - mov r1, #1 - bl ov16_0223E120 - ldrb r0, [r0, #1] - sub r0, #0x3e - cmp r0, #0x28 - bhi _02250D90 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02250D0E: ; jump table - .short _02250D60 - _02250D0E - 2 ; case 0 - .short _02250D90 - _02250D0E - 2 ; case 1 - .short _02250D60 - _02250D0E - 2 ; case 2 - .short _02250D88 - _02250D0E - 2 ; case 3 - .short _02250D88 - _02250D0E - 2 ; case 4 - .short _02250D88 - _02250D0E - 2 ; case 5 - .short _02250D88 - _02250D0E - 2 ; case 6 - .short _02250D70 - _02250D0E - 2 ; case 7 - .short _02250D90 - _02250D0E - 2 ; case 8 - .short _02250D90 - _02250D0E - 2 ; case 9 - .short _02250D78 - _02250D0E - 2 ; case 10 - .short _02250D78 - _02250D0E - 2 ; case 11 - .short _02250D60 - _02250D0E - 2 ; case 12 - .short _02250D60 - _02250D0E - 2 ; case 13 - .short _02250D60 - _02250D0E - 2 ; case 14 - .short _02250D60 - _02250D0E - 2 ; case 15 - .short _02250D60 - _02250D0E - 2 ; case 16 - .short _02250D60 - _02250D0E - 2 ; case 17 - .short _02250D90 - _02250D0E - 2 ; case 18 - .short _02250D90 - _02250D0E - 2 ; case 19 - .short _02250D90 - _02250D0E - 2 ; case 20 - .short _02250D90 - _02250D0E - 2 ; case 21 - .short _02250D90 - _02250D0E - 2 ; case 22 - .short _02250D90 - _02250D0E - 2 ; case 23 - .short _02250D80 - _02250D0E - 2 ; case 24 - .short _02250D78 - _02250D0E - 2 ; case 25 - .short _02250D78 - _02250D0E - 2 ; case 26 - .short _02250D78 - _02250D0E - 2 ; case 27 - .short _02250D90 - _02250D0E - 2 ; case 28 - .short _02250D90 - _02250D0E - 2 ; case 29 - .short _02250D90 - _02250D0E - 2 ; case 30 - .short _02250D90 - _02250D0E - 2 ; case 31 - .short _02250D90 - _02250D0E - 2 ; case 32 - .short _02250D90 - _02250D0E - 2 ; case 33 - .short _02250D90 - _02250D0E - 2 ; case 34 - .short _02250D68 - _02250D0E - 2 ; case 35 - .short _02250D90 - _02250D0E - 2 ; case 36 - .short _02250D68 - _02250D0E - 2 ; case 37 - .short _02250D68 - _02250D0E - 2 ; case 38 - .short _02250D68 - _02250D0E - 2 ; case 39 - .short _02250D68 - _02250D0E - 2 ; case 40 -_02250D60: - ldr r0, _02250D9C ; =0x00000469 - bl sub_0200549C - b _02250DBC -_02250D68: - ldr r0, _02250DA0 ; =0x000004B3 - bl sub_0200549C - b _02250DBC -_02250D70: - ldr r0, _02250DA4 ; =0x0000046A - bl sub_0200549C - b _02250DBC -_02250D78: - ldr r0, _02250DA8 ; =0x0000046B - bl sub_0200549C - b _02250DBC -_02250D80: - ldr r0, _02250DAC ; =0x0000046C - bl sub_0200549C - b _02250DBC -_02250D88: - ldr r0, _02250DB0 ; =0x0000046D - bl sub_0200549C - b _02250DBC -_02250D90: - ldr r0, _02250DB4 ; =0x00000468 - b _02250DB8 - ; .align 2, 0 -_02250D94: .word 0x00002D8C -_02250D98: .word 0x000001EE -_02250D9C: .word 0x00000469 -_02250DA0: .word 0x000004B3 -_02250DA4: .word 0x0000046A -_02250DA8: .word 0x0000046B -_02250DAC: .word 0x0000046C -_02250DB0: .word 0x0000046D -_02250DB4: .word 0x00000468 -_02250DB8: - bl sub_0200549C -_02250DBC: - ldr r0, [sp] - mov r1, #2 - bl ov16_0223F460 -_02250DC4: - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _02250DD2 - ldr r0, [sp] - ldr r1, [sp, #0x1c] - bl ov16_0223F444 -_02250DD2: - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _02250DDE - add sp, #0x2c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02250DDE: - mov r0, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_02250A48 - - thumb_func_start ov16_02250DE4 -ov16_02250DE4: ; 0x02250DE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - add r5, r1, #0 - ldr r0, _02250E7C ; =0x00002D4C - add r6, r2, #0 - mov r1, #0xc0 - add r0, r5, r0 - mul r1, r6 - add r0, r0, r1 - str r0, [sp, #8] - ldr r0, [sp, #0x2c] - ldr r1, [sp, #8] - lsl r0, r0, #1 - ldrh r1, [r1, r0] - str r3, [sp, #4] - ldr r4, [sp, #0x28] - ldr r7, [sp, #0x30] - str r0, [sp, #0xc] - cmp r1, #0xae - bne _02250E1E - add r0, r5, #0 - bl ov16_02255950 - cmp r0, #0 - bne _02250E1E - mov r0, #0x10 - str r0, [r4, #0] - b _02250E2E -_02250E1E: - ldr r1, [sp, #8] - ldr r0, [sp, #0xc] - ldrh r0, [r1, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02250E80 ; =0x000003E6 - ldrh r0, [r1, r0] - str r0, [r4, #0] -_02250E2E: - ldr r0, [sp, #4] - mov r1, #2 - tst r0, r1 - beq _02250E64 - ldr r0, [r4, #0] - add r1, #0xfe - cmp r0, r1 - bne _02250E5E - ldr r0, [sp] - add r1, r6, #0 - bl ov16_0223E258 - bl sub_020787CC - ldr r1, _02250E84 ; =0x00003108 - ldrb r1, [r5, r1] - tst r0, r1 - bne _02250E58 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02250E58: - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02250E5E: - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02250E64: - ldr r1, [r4, #0] - ldr r0, _02250E88 ; =0x00000251 - tst r0, r1 - beq _02250E70 - str r6, [r7, #0] - b _02250E76 -_02250E70: - mov r0, #1 - eor r0, r6 - str r0, [r7, #0] -_02250E76: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02250E7C: .word 0x00002D4C -_02250E80: .word 0x000003E6 -_02250E84: .word 0x00003108 -_02250E88: .word 0x00000251 - thumb_func_end ov16_02250DE4 - - thumb_func_start ov16_02250E8C -ov16_02250E8C: ; 0x02250E8C - push {r3, r4, r5, r6, r7, lr} - str r1, [sp] - bl ov16_0223DF1C - add r4, r0, #0 - mov r3, #0 - cmp r4, #0 - ble _02250EC6 - ldr r5, [sp] - add r7, r3, #0 - add r6, r5, #0 -_02250EA2: - ldr r0, _02250EE8 ; =0x00002DB0 - add r3, r3, #1 - ldr r2, [r6, r0] - ldr r0, _02250EEC ; =0x0000218C - ldr r1, [r5, r0] - mov r0, #0 - mvn r0, r0 - eor r0, r1 - add r1, r2, #0 - and r1, r0 - ldr r0, _02250EE8 ; =0x00002DB0 - str r1, [r6, r0] - ldr r0, _02250EEC ; =0x0000218C - add r6, #0xc0 - str r7, [r5, r0] - add r5, r5, #4 - cmp r3, r4 - blt _02250EA2 -_02250EC6: - ldr r1, [sp] - mov r0, #0 - ldr r1, [r1, #0x64] - lsl r2, r1, #1 - ldr r1, [sp] - add r1, r1, r2 - ldr r2, _02250EF0 ; =0x00003064 - strh r0, [r1, r2] - ldr r1, [sp] - add r2, #0x60 - ldr r1, [r1, #0x64] - lsl r3, r1, #1 - ldr r1, [sp] - add r1, r1, r3 - strh r0, [r1, r2] - pop {r3, r4, r5, r6, r7, pc} - nop -_02250EE8: .word 0x00002DB0 -_02250EEC: .word 0x0000218C -_02250EF0: .word 0x00003064 - thumb_func_end ov16_02250E8C - - thumb_func_start ov16_02250EF4 -ov16_02250EF4: ; 0x02250EF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _02250F8C ; =0x000021EC - str r1, [sp] - ldrb r0, [r5, r0] - add r6, r2, #0 - str r3, [sp, #4] - mov r4, #0 - bl sub_020787CC - ldr r1, _02250F90 ; =0x0000213C - lsl r0, r0, #0x18 - ldr r2, [r5, r1] - mov r1, #0xf - lsl r1, r1, #0x18 - tst r1, r2 - beq _02250F82 - add r1, r2, #0 - tst r1, r0 - bne _02250F36 - ldr r7, _02250F8C ; =0x000021EC - add r6, r7, #0 - sub r6, #0xb0 -_02250F24: - add r4, r4, #1 - add r0, r5, r4 - ldrb r0, [r0, r7] - bl sub_020787CC - ldr r1, [r5, r6] - lsl r0, r0, #0x18 - tst r1, r0 - beq _02250F24 -_02250F36: - ldr r2, _02250F90 ; =0x0000213C - mov r1, #0 - mvn r1, r1 - eor r1, r0 - ldr r3, [r5, r2] - asr r0, r0, #0x18 - and r1, r3 - str r1, [r5, r2] - bl sub_020787EC - str r0, [r5, #0x74] - ldr r0, [sp, #4] - cmp r0, #1 - bne _02250F5E - add r0, r5, #0 - mov r1, #1 - mov r2, #6 - bl ov16_02251E1C - b _02250F68 -_02250F5E: - add r0, r5, #0 - mov r1, #1 - mov r2, #0x53 - bl ov16_02251E1C -_02250F68: - mov r0, #0x15 - str r0, [r5, #8] - ldr r0, [sp] - mov r2, #0x27 - str r0, [r5, #0xc] - ldr r0, [r5, #0x74] - add sp, #8 - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02250F94 ; =0x000021A8 - str r2, [r1, r0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02250F82: - str r6, [r5, #8] - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02250F8C: .word 0x000021EC -_02250F90: .word 0x0000213C -_02250F94: .word 0x000021A8 - thumb_func_end ov16_02250EF4 - - thumb_func_start ov16_02250F98 -ov16_02250F98: ; 0x02250F98 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x85 - lsl r0, r0, #6 - add r4, r1, #0 - ldr r1, [r5, r0] - mov r0, #0xf - lsl r0, r0, #0x1c - tst r0, r1 - beq _02250FEC - mov r0, #1 - lsl r0, r0, #0x1c - add r2, r1, #0 - tst r2, r0 - bne _02250FBE -_02250FB6: - lsl r0, r0, #1 - add r2, r1, #0 - tst r2, r0 - beq _02250FB6 -_02250FBE: - mov r2, #0x85 - lsl r2, r2, #6 - mov r1, #0 - mvn r1, r1 - eor r1, r0 - ldr r3, [r5, r2] - asr r0, r0, #0x1c - and r1, r3 - str r1, [r5, r2] - bl sub_020787EC - mov r2, #0x45 - str r0, [r5, #0x74] - add r0, r5, #0 - mov r1, #1 - lsl r2, r2, #2 - bl ov16_02251E1C - mov r0, #0x15 - str r0, [r5, #8] - str r4, [r5, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} -_02250FEC: - str r2, [r5, #8] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02250F98 - - thumb_func_start ov16_02250FF4 -ov16_02250FF4: ; 0x02250FF4 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x60 - bne _02251008 - mov r4, #0 - b _0225101C -_02251008: - ldr r0, _022511D4 ; =0x00002160 - ldr r4, [r5, r0] - cmp r4, #0 - bne _0225101C - ldr r0, _022511D8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022511DC ; =0x000003E2 - ldrb r4, [r1, r0] -_0225101C: - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r2, [r5, r0] - mov r6, #0x10 - lsl r1, r2, #4 - add r3, r5, r1 - ldr r1, _022511E0 ; =0x000003E9 - ldrb r1, [r3, r1] - tst r1, r6 - beq _02251066 - ldr r3, _022511E4 ; =0x0000213C - lsl r6, r6, #0x10 - ldr r1, [r5, r3] - tst r1, r6 - bne _02251066 - ldr r1, [r5, #0x6c] - cmp r1, #0xff - beq _02251066 - add r3, r3, #4 - ldr r6, [r5, r3] - mov r3, #4 - tst r3, r6 - beq _02251066 - lsl r1, r1, #1 - add r3, r5, r1 - add r1, r0, #0 - add r1, #0x44 - strh r2, [r3, r1] - ldr r2, [r5, #0x6c] - ldr r1, [r5, r0] - lsl r2, r2, #3 - add r3, r5, r2 - ldr r2, [r5, #0x64] - add r0, #0x4c - lsl r2, r2, #1 - add r2, r3, r2 - strh r1, [r2, r0] -_02251066: - ldr r1, [r5, #0x6c] - cmp r1, #0xff - beq _022510B0 - add r0, r5, #0 - bl ov16_02258AB8 - ldr r1, _022511E4 ; =0x0000213C - lsl r0, r0, #0x18 - ldr r3, [r5, r1] - mov r2, #0x20 - lsr r0, r0, #0x18 - tst r2, r3 - bne _0225108A - add r1, r1, #4 - ldr r2, [r5, r1] - mov r1, #4 - tst r1, r2 - beq _022510A4 -_0225108A: - cmp r0, #0x37 - beq _022510A4 - cmp r0, #0x73 - beq _022510A4 - cmp r0, #0x7d - beq _022510A4 - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _022511E8 ; =0x00002DF8 - mov r2, #0 - strh r2, [r1, r0] -_022510A4: - ldr r0, _022511E4 ; =0x0000213C - mov r1, #1 - ldr r2, [r5, r0] - lsl r1, r1, #0x14 - tst r1, r2 - beq _022510B2 -_022510B0: - b _022511D2 -_022510B2: - add r0, r0, #4 - ldr r1, [r5, r0] - mov r0, #4 - tst r0, r1 - beq _022510F0 - ldr r1, [r5, #0x6c] - ldr r0, _022511D8 ; =0x00003044 - lsl r1, r1, #1 - add r2, r5, r1 - add r1, r0, #0 - ldr r3, [r5, r0] - add r1, #0x20 - strh r3, [r2, r1] - ldr r1, [r5, #0x6c] - ldr r3, [r5, #0x64] - lsl r1, r1, #1 - add r2, r5, r1 - add r1, r0, #0 - add r1, #0x28 - strh r3, [r2, r1] - ldr r1, [r5, #0x6c] - lsl r1, r1, #1 - add r2, r5, r1 - add r1, r0, #0 - add r1, #0x30 - strh r4, [r2, r1] - sub r1, r0, #4 - ldr r1, [r5, r1] - add r0, r0, #4 - str r1, [r5, r0] - b _0225111A -_022510F0: - ldr r0, [r5, #0x6c] - ldr r3, _022511EC ; =0x00003064 - lsl r0, r0, #1 - mov r1, #0 - add r0, r5, r0 - strh r1, [r0, r3] - ldr r2, [r5, #0x6c] - mov r0, #0xff - lsl r2, r2, #1 - add r6, r5, r2 - add r2, r3, #0 - add r2, #8 - strh r0, [r6, r2] - ldr r0, [r5, #0x6c] - lsl r0, r0, #1 - add r2, r5, r0 - add r0, r3, #0 - add r0, #0x10 - strh r1, [r2, r0] - sub r3, #0x1c - str r1, [r5, r3] -_0225111A: - mov r0, #0x85 - lsl r0, r0, #6 - ldr r2, [r5, r0] - mov r1, #0x40 - tst r1, r2 - beq _022511AE - add r0, #0x2c - ldr r0, [r5, r0] - ldr r2, _022511F0 ; =0x801FDA49 - tst r0, r2 - bne _022511AE - ldr r0, _022511D8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r1, r0, #4 - add r3, r5, r1 - ldr r1, _022511F4 ; =0x000003E6 - ldrh r3, [r3, r1] - cmp r3, #0x40 - bgt _02251150 - bge _02251164 - cmp r3, #0x10 - bgt _0225114A - beq _02251164 - b _0225118A -_0225114A: - cmp r3, #0x20 - beq _02251164 - b _0225118A -_02251150: - lsr r1, r2, #0x17 - cmp r3, r1 - bgt _0225115E - bge _02251164 - cmp r3, #0x80 - beq _02251164 - b _0225118A -_0225115E: - lsr r1, r2, #0x16 - cmp r3, r1 - bne _0225118A -_02251164: - ldr r1, [r5, #0x6c] - ldr r2, _022511F8 ; =0x000030C4 - lsl r1, r1, #1 - mov r0, #0 - add r1, r5, r1 - strh r0, [r1, r2] - ldr r1, [r5, #0x6c] - mov r4, #0xff - lsl r1, r1, #1 - add r3, r5, r1 - add r1, r2, #0 - add r1, #8 - strh r4, [r3, r1] - ldr r1, [r5, #0x6c] - add r2, #0x10 - lsl r1, r1, #1 - add r1, r5, r1 - strh r0, [r1, r2] - pop {r4, r5, r6, pc} -_0225118A: - ldr r1, [r5, #0x6c] - lsl r1, r1, #1 - add r2, r5, r1 - ldr r1, _022511F8 ; =0x000030C4 - strh r0, [r2, r1] - ldr r0, [r5, #0x6c] - ldr r3, [r5, #0x64] - lsl r0, r0, #1 - add r2, r5, r0 - add r0, r1, #0 - add r0, #8 - strh r3, [r2, r0] - ldr r0, [r5, #0x6c] - add r1, #0x10 - lsl r0, r0, #1 - add r0, r5, r0 - strh r4, [r0, r1] - pop {r4, r5, r6, pc} -_022511AE: - ldr r1, [r5, #0x6c] - ldr r2, _022511F8 ; =0x000030C4 - lsl r1, r1, #1 - mov r0, #0 - add r1, r5, r1 - strh r0, [r1, r2] - ldr r1, [r5, #0x6c] - mov r4, #0xff - lsl r1, r1, #1 - add r3, r5, r1 - add r1, r2, #0 - add r1, #8 - strh r4, [r3, r1] - ldr r1, [r5, #0x6c] - add r2, #0x10 - lsl r1, r1, #1 - add r1, r5, r1 - strh r0, [r1, r2] -_022511D2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022511D4: .word 0x00002160 -_022511D8: .word 0x00003044 -_022511DC: .word 0x000003E2 -_022511E0: .word 0x000003E9 -_022511E4: .word 0x0000213C -_022511E8: .word 0x00002DF8 -_022511EC: .word 0x00003064 -_022511F0: .word 0x801FDA49 -_022511F4: .word 0x000003E6 -_022511F8: .word 0x000030C4 - thumb_func_end ov16_02250FF4 - - thumb_func_start ov16_022511FC -ov16_022511FC: ; 0x022511FC - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x10 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_022511FC - - thumb_func_start ov16_02251218 -ov16_02251218: ; 0x02251218 - push {r3, r4, r5, lr} - ldr r2, _02251268 ; =0x0000216C - add r5, r1, #0 - ldr r0, [r5, r2] - mov r4, #0 - cmp r0, #0 - beq _0225124C - add r1, r2, #0 - add r1, #0x11 - ldrb r1, [r5, r1] - cmp r1, #0 - beq _0225124A - ldr r1, [r5, #0x74] - cmp r1, #0xff - bne _02251246 - add r2, #0x10 - ldrb r1, [r5, r2] - cmp r1, #1 - beq _02251246 - mov r1, #1 - lsl r1, r1, #0xe - tst r0, r1 - beq _0225124C -_02251246: - mov r4, #1 - b _0225124C -_0225124A: - mov r4, #1 -_0225124C: - cmp r4, #1 - bne _02251262 - add r0, r5, #0 - mov r1, #1 - mov r2, #0x15 - bl ov16_02251E1C - ldr r0, [r5, #8] - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] -_02251262: - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_02251268: .word 0x0000216C - thumb_func_end ov16_02251218 - - thumb_func_start ov16_0225126C -ov16_0225126C: ; 0x0225126C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r2, [r4, #0x6c] - mov r3, #0 - cmp r2, #0xff - bne _0225127C - add r0, r3, #0 - pop {r3, r4, r5, r6, r7, pc} -_0225127C: - mov r0, #0xc0 - add r5, r2, #0 - mul r5, r0 - mov r1, #2 - ldr r0, _022512EC ; =0x00002DB0 - add r7, r4, r5 - ldr r6, [r7, r0] - lsl r1, r1, #0x16 - tst r1, r6 - beq _022512E6 - ldr r1, _022512F0 ; =0x0000216C - mov r6, #2 - lsl r6, r6, #0x16 - ldr r1, [r4, r1] - lsr r6, r6, #9 - tst r1, r6 - bne _022512E6 - ldr r1, [r4, #0x64] - cmp r2, r1 - beq _022512E6 - sub r0, #0x24 - ldr r0, [r7, r0] - cmp r0, #0 - beq _022512E6 - mov r0, #0x1c - mul r0, r2 - add r2, r4, r0 - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r1, [r2, r0] - cmp r1, #0 - bne _022512C4 - add r0, #8 - ldr r0, [r2, r0] - cmp r0, #0 - beq _022512E6 -_022512C4: - ldr r0, _022512F4 ; =0x00002D59 - add r1, r4, r0 - ldrsb r0, [r1, r5] - cmp r0, #0xc - bge _022512E6 - add r0, r0, #1 - strb r0, [r1, r5] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf5 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r3, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_022512E6: - add r0, r3, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022512EC: .word 0x00002DB0 -_022512F0: .word 0x0000216C -_022512F4: .word 0x00002D59 - thumb_func_end ov16_0225126C - - thumb_func_start ov16_022512F8 -ov16_022512F8: ; 0x022512F8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r1, [r5, #0x64] - str r0, [sp] - add r0, r5, #0 - mov r4, #0 - bl ov16_02258AB8 - add r7, r0, #0 - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r4, #0 - bl ov16_02258ACC - add r6, r0, #0 - ldr r0, [r5, #0x6c] - cmp r0, #0xff - beq _02251396 - cmp r7, #0x38 - bne _02251396 - ldr r1, _0225139C ; =0x0000216C - ldr r2, [r5, r1] - ldr r1, _022513A0 ; =0x801FDA49 - tst r1, r2 - bne _02251396 - mov r1, #0x1c - mul r1, r0 - mov r0, #0xb6 - add r2, r5, r1 - lsl r0, r0, #2 - ldr r1, [r2, r0] - cmp r1, #0 - bne _02251342 - add r0, #8 - ldr r0, [r2, r0] - cmp r0, #0 - beq _02251396 -_02251342: - ldr r0, [sp] - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r6 - bge _02251396 - ldr r0, _022513A4 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022513A8 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - beq _02251396 - ldr r0, [r5, #0x6c] - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - ldr r1, _022513AC ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _02251396 - add r1, r5, #0 - add r1, #0x94 - str r0, [r1, #0] - add r0, r5, #0 - mov r1, #2 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #1 - mov r2, #0xe - bl ov16_02251E1C - ldr r0, [r5, #8] - mov r4, #1 - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] -_02251396: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225139C: .word 0x0000216C -_022513A0: .word 0x801FDA49 -_022513A4: .word 0x00003044 -_022513A8: .word 0x000003E9 -_022513AC: .word 0x00002D8C - thumb_func_end ov16_022512F8 - - thumb_func_start ov16_022513B0 -ov16_022513B0: ; 0x022513B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r7, [r5, #0x5c] - str r0, [sp] - mov r6, #0 - bl ov16_0223DF1C - cmp r7, r0 - bge _02251420 - add r4, r5, #0 - add r4, #0x5c -_022513C6: - mov r0, #0xc0 - mul r0, r7 - mov r1, #0xb7 - add r0, r5, r0 - lsl r1, r1, #6 - ldr r2, [r0, r1] - ldr r1, _0225142C ; =0x200400C0 - tst r1, r2 - bne _0225140A - ldr r1, _02251430 ; =0x00002DC4 - ldr r2, [r0, r1] - ldr r1, _0225142C ; =0x200400C0 - tst r1, r2 - beq _0225140A - ldr r1, _02251430 ; =0x00002DC4 - ldr r2, [r0, r1] - ldr r1, _02251434 ; =0xDFFBFF3F - and r2, r1 - ldr r1, _02251430 ; =0x00002DC4 - str r2, [r0, r1] - ldr r2, _02251438 ; =0x0000011F - add r0, r5, #0 - mov r1, #1 - bl ov16_02251E1C - mov r0, #0x46 - ldr r1, [r5, #0x5c] - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r0, [r5, #8] - mov r6, #1 - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] -_0225140A: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - cmp r6, #1 - beq _02251420 - ldr r0, [sp] - ldr r7, [r5, #0x5c] - bl ov16_0223DF1C - cmp r7, r0 - blt _022513C6 -_02251420: - cmp r6, #0 - bne _02251428 - mov r0, #0 - str r0, [r5, #0x5c] -_02251428: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225142C: .word 0x200400C0 -_02251430: .word 0x00002DC4 -_02251434: .word 0xDFFBFF3F -_02251438: .word 0x0000011F - thumb_func_end ov16_022513B0 - - thumb_func_start ov16_0225143C -ov16_0225143C: ; 0x0225143C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - mov r6, #0 - bl ov16_0223DF1C - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02258AB8 - str r0, [sp, #4] - ldr r1, [r4, #0x64] - add r0, r4, #0 - add r2, r6, #0 - bl ov16_02258ACC - ldr r1, [r4, #8] - str r0, [sp] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #1 - bl ov16_02250EF4 - cmp r0, #1 - bne _02251474 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02251474: - add r5, r4, #0 - add r5, #0x30 -_02251478: - ldr r0, [r4, #0x30] - cmp r0, #3 - bls _02251480 - b _022515D0 -_02251480: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225148C: ; jump table - .short _02251494 - _0225148C - 2 ; case 0 - .short _022514C4 - _0225148C - 2 ; case 1 - .short _02251544 - _0225148C - 2 ; case 2 - .short _022515C8 - _0225148C - 2 ; case 3 -_02251494: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _022515E8 ; =0x00002DB0 - add r0, r4, r0 - ldr r2, [r0, r1] - mov r1, #2 - lsl r1, r1, #0x16 - tst r1, r2 - beq _022514BC - ldr r1, _022515EC ; =0x00003044 - ldr r1, [r4, r1] - cmp r1, #0x63 - beq _022514BC - ldr r1, _022515E8 ; =0x00002DB0 - ldr r2, [r0, r1] - ldr r1, _022515F0 ; =0xFF7FFFFF - and r2, r1 - ldr r1, _022515E8 ; =0x00002DB0 - str r2, [r0, r1] -_022514BC: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022515D0 -_022514C4: - ldr r3, [r4, #0x6c] - cmp r3, #0xff - beq _0225153C - ldr r0, [sp, #4] - cmp r0, #0x58 - bne _0225153C - mov r0, #0x85 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - bne _0225153C - ldr r0, _022515F4 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #2 - lsl r0, r0, #0xc - tst r0, r1 - beq _0225153C - ldr r2, [r4, #0x64] - mov r0, #0x1c - mul r0, r2 - add r1, r4, r0 - mov r0, #0xbb - lsl r0, r0, #2 - ldr r7, [r1, r0] - cmp r7, #0 - beq _0225153C - cmp r2, r3 - beq _0225153C - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _022515F8 ; =0x00002D8C - ldr r1, [r2, r0] - add r0, r0, #4 - ldr r0, [r2, r0] - cmp r1, r0 - bhs _0225153C - cmp r1, #0 - beq _0225153C - ldr r1, [sp] - neg r0, r7 - bl ov16_022563F8 - ldr r1, _022515FC ; =0x0000215C - mov r2, #0xd5 - str r0, [r4, r1] - mov r0, #0x46 - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r6, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0225153C: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022515D0 -_02251544: - ldr r0, [sp, #4] - cmp r0, #0x62 - bne _022515C0 - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _022515C0 - mov r0, #0x85 - lsl r0, r0, #6 - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - bne _022515C0 - ldr r0, _022515F4 ; =0x0000213C - ldr r1, [r4, r0] - mov r0, #2 - lsl r0, r0, #0xc - tst r0, r1 - beq _022515C0 - ldr r0, _022515EC ; =0x00003044 - ldr r0, [r4, r0] - lsl r0, r0, #4 - add r1, r4, r0 - mov r0, #0x3e - lsl r0, r0, #4 - ldrb r0, [r1, r0] - cmp r0, #2 - beq _022515C0 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _022515F8 ; =0x00002D8C - add r0, r4, r0 - ldr r1, [r0, r1] - cmp r1, #0 - beq _022515C0 - ldr r1, _02251600 ; =0x00002D90 - ldr r1, [r0, r1] - mov r0, #0 - mvn r0, r0 - mul r0, r1 - mov r1, #0xa - bl ov16_022563F8 - ldr r1, _022515FC ; =0x0000215C - mov r2, #0xd6 - str r0, [r4, r1] - mov r0, #0x46 - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r6, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_022515C0: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022515D0 -_022515C8: - mov r0, #0 - str r0, [r4, #0x30] - str r0, [r4, #0x34] - mov r6, #2 -_022515D0: - cmp r6, #0 - bne _022515D6 - b _02251478 -_022515D6: - cmp r6, #1 - bne _022515E0 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022515E0: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022515E8: .word 0x00002DB0 -_022515EC: .word 0x00003044 -_022515F0: .word 0xFF7FFFFF -_022515F4: .word 0x0000213C -_022515F8: .word 0x00002D8C -_022515FC: .word 0x0000215C -_02251600: .word 0x00002D90 - thumb_func_end ov16_0225143C - - thumb_func_start ov16_02251604 -ov16_02251604: ; 0x02251604 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r1, [sp, #4] - str r0, [sp] - bl ov16_0223DF0C - mov r2, #0xd5 - add r4, r0, #0 - ldr r1, [sp, #4] - lsl r2, r2, #2 - add r1, r1, r2 - ldr r2, _02251684 ; =0x00001DE0 - mov r0, #0 - bl sub_020C4B4C - mov r0, #1 - tst r0, r4 - beq _02251678 - mov r0, #0xb9 - lsl r0, r0, #2 - tst r0, r4 - bne _02251678 - mov r6, #0 -_02251632: - mov r0, #1 - tst r0, r6 - beq _02251672 - asr r2, r6, #1 - ldr r0, [sp, #4] - lsl r1, r2, #3 - mov r4, #0 - add r7, r0, r1 - add r5, r0, r2 -_02251644: - ldr r0, [sp] - add r1, r6, #0 - add r2, r4, #0 - bl ov16_0223F700 - cmp r0, #0 - beq _0225166C - ldr r1, _02251688 ; =0x000003CD - ldrb r1, [r5, r1] - lsl r1, r1, #1 - add r2, r7, r1 - mov r1, #0xe7 - lsl r1, r1, #2 - strh r0, [r2, r1] - add r0, r1, #0 - add r0, #0x31 - ldrb r0, [r5, r0] - add r1, r0, #1 - ldr r0, _02251688 ; =0x000003CD - strb r1, [r5, r0] -_0225166C: - add r4, r4, #1 - cmp r4, #4 - blt _02251644 -_02251672: - add r6, r6, #1 - cmp r6, #4 - blt _02251632 -_02251678: - ldr r2, _0225168C ; =0x022248A4 - ldr r1, _02251690 ; =0x00002134 - ldr r0, [sp, #4] - str r2, [r0, r1] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251684: .word 0x00001DE0 -_02251688: .word 0x000003CD -_0225168C: .word 0x022248A4 -_02251690: .word 0x00002134 - thumb_func_end ov16_02251604 - - thumb_func_start ov16_02251694 -ov16_02251694: ; 0x02251694 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - str r1, [sp] - bl ov16_0223DF1C - mov r4, #0 - str r0, [sp, #4] - cmp r0, #0 - ble _02251768 - ldr r5, [sp] -_022516AA: - ldr r0, _0225176C ; =0x000021A8 - ldr r2, [r5, r0] - cmp r2, #0x27 - beq _0225175E - ldr r0, [sp] - add r7, r0, r4 - ldr r0, _02251770 ; =0x0000314C - ldrb r1, [r7, r0] - mov r0, #1 - tst r0, r1 - beq _022516CE - sub r2, #0xc - lsl r2, r2, #0x18 - add r0, r6, #0 - add r1, r4, #0 - lsr r2, r2, #0x18 - bl ov16_0223F500 -_022516CE: - ldr r0, _0225176C ; =0x000021A8 - ldr r0, [r5, r0] - sub r0, #0xd - cmp r0, #3 - bhi _0225175E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022516E4: ; jump table - .short _022516EC - _022516E4 - 2 ; case 0 - .short _02251724 - _022516E4 - 2 ; case 1 - .short _02251740 - _022516E4 - 2 ; case 2 - .short _02251754 - _022516E4 - 2 ; case 3 -_022516EC: - ldr r0, _02251770 ; =0x0000314C - ldrb r1, [r7, r0] - mov r0, #2 - tst r0, r1 - beq _02251706 - ldr r2, _02251774 ; =0x000021B0 - add r0, r6, #0 - ldr r2, [r5, r2] - add r1, r4, #0 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl ov16_0223F500 -_02251706: - ldr r0, _02251770 ; =0x0000314C - ldrb r1, [r7, r0] - mov r0, #4 - tst r0, r1 - beq _0225175E - ldr r2, _02251778 ; =0x000021AC - add r0, r6, #0 - ldr r2, [r5, r2] - add r1, r4, #0 - add r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl ov16_0223F500 - b _0225175E -_02251724: - ldr r2, _02251774 ; =0x000021B0 - add r0, r6, #0 - ldr r2, [r5, r2] - add r1, r4, #0 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl ov16_0223F500 - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - bl ov16_0223F500 - b _0225175E -_02251740: - ldr r2, _02251774 ; =0x000021B0 - add r0, r6, #0 - ldr r2, [r5, r2] - add r1, r4, #0 - add r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl ov16_0223F500 - b _0225175E -_02251754: - add r0, r6, #0 - add r1, r4, #0 - mov r2, #1 - bl ov16_0223F500 -_0225175E: - ldr r0, [sp, #4] - add r4, r4, #1 - add r5, #0x10 - cmp r4, r0 - blt _022516AA -_02251768: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225176C: .word 0x000021A8 -_02251770: .word 0x0000314C -_02251774: .word 0x000021B0 -_02251778: .word 0x000021AC - thumb_func_end ov16_02251694 - - thumb_func_start ov16_0225177C -ov16_0225177C: ; 0x0225177C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r1, #0 - str r2, [sp, #4] - add r1, r2, #0 - add r2, r3, #0 - str r0, [sp] - bl ov16_0223DFAC - ldr r1, [sp, #4] - mov r2, #0xc0 - add r5, r1, #0 - mov r1, #0xb5 - lsl r1, r1, #6 - add r1, r7, r1 - mul r5, r2 - str r1, [sp, #0x18] - mov r1, #5 - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - ldr r1, [sp, #0x18] - mov r2, #0 - strh r0, [r1, r5] - add r0, r4, #0 - mov r1, #0xa5 - bl sub_02074470 - ldr r1, _02251B34 ; =0x00002D42 - add r2, r7, r5 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa6 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B38 ; =0x00002D44 - add r2, r7, r5 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa7 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B3C ; =0x00002D46 - add r2, r7, r5 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa8 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B40 ; =0x00002D48 - add r2, r7, r5 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa9 - mov r2, #0 - bl sub_02074470 - add r1, r7, r5 - ldr r2, _02251B44 ; =0x00002D4A - str r1, [sp, #0xc] - strh r0, [r1, r2] - add r0, r1, #0 - mov r6, #0 - str r0, [sp, #0x14] - str r0, [sp, #0x10] -_02251806: - add r1, r6, #0 - add r0, r4, #0 - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp, #0x14] - ldr r1, _02251B48 ; =0x00002D4C - strh r0, [r2, r1] - add r1, r6, #0 - add r0, r4, #0 - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - ldr r2, [sp, #0x10] - ldr r1, _02251B4C ; =0x00002D6C - strb r0, [r2, r1] - add r1, r6, #0 - add r0, r4, #0 - add r1, #0x3e - mov r2, #0 - bl sub_02074470 - ldr r2, [sp, #0x10] - ldr r1, _02251B50 ; =0x00002D70 - add r6, r6, #1 - strb r0, [r2, r1] - ldr r0, [sp, #0x14] - add r0, r0, #2 - str r0, [sp, #0x14] - add r0, r2, #0 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r6, #4 - blt _02251806 - add r0, r1, #0 - sub r0, #0x1c - add r6, r7, r0 - add r0, r4, #0 - mov r1, #0x46 - mov r2, #0 - bl sub_02074470 - ldr r1, [r6, r5] - mov r2, #0x1f - bic r1, r2 - mov r2, #0x1f - and r0, r2 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x47 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x1b - ldr r2, [r6, r5] - ldr r1, _02251B54 ; =0xFFFFFC1F - lsr r0, r0, #0x16 - and r1, r2 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x48 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x1b - ldr r2, [r6, r5] - ldr r1, _02251B58 ; =0xFFFF83FF - lsr r0, r0, #0x11 - and r1, r2 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x49 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x1b - ldr r2, [r6, r5] - ldr r1, _02251B5C ; =0xFFF07FFF - lsr r0, r0, #0xc - and r1, r2 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x4a - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x1b - ldr r2, [r6, r5] - ldr r1, _02251B60 ; =0xFE0FFFFF - lsr r0, r0, #7 - and r1, r2 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x4b - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x1b - ldr r2, [r6, r5] - ldr r1, _02251B64 ; =0xC1FFFFFF - lsr r0, r0, #2 - and r1, r2 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - ldr r2, [r6, r5] - ldr r1, _02251B68 ; =0xBFFFFFFF - lsl r0, r0, #0x1f - and r1, r2 - lsr r0, r0, #1 - orr r0, r1 - str r0, [r6, r5] - add r0, r4, #0 - mov r1, #0x4d - mov r2, #0 - bl sub_02074470 - ldr r2, [r6, r5] - ldr r1, _02251B6C ; =0x7FFFFFFF - lsl r0, r0, #0x1f - and r1, r2 - orr r0, r1 - str r0, [r6, r5] - ldr r0, _02251B70 ; =0x0000213C - ldr r1, [r7, r0] - mov r0, #1 - lsl r0, r0, #8 - tst r0, r1 - bne _02251932 - ldr r0, _02251B74 ; =0x00002D58 - mov r2, #0 - mov r1, #6 -_02251924: - ldr r3, [sp, #0xc] - add r2, r2, #1 - strb r1, [r3, r0] - add r3, r3, #1 - str r3, [sp, #0xc] - cmp r2, #8 - blt _02251924 -_02251932: - ldr r0, _02251B78 ; =0x00002D68 - mov r1, #1 - add r0, r7, r0 - ldr r2, [r0, r5] - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #2 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #4 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #8 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #0x10 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #0x20 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #0x40 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - mov r1, #0x80 - bic r2, r1 - str r2, [r0, r5] - ldr r2, [r0, r5] - ldr r1, _02251B7C ; =0xFFFFFEFF - and r1, r2 - str r1, [r0, r5] - ldr r2, [r0, r5] - ldr r1, _02251B80 ; =0xFFFFFDFF - and r1, r2 - str r1, [r0, r5] - ldr r2, [r0, r5] - ldr r1, _02251B84 ; =0xFFFFFBFF - and r1, r2 - str r1, [r0, r5] - add r0, r4, #0 - mov r1, #0xb1 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B88 ; =0x00002D64 - add r2, r7, r5 - strb r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xb2 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B8C ; =0x00002D65 - add r2, r7, r5 - strb r0, [r2, r1] - add r1, #0x59 - add r0, r7, r1 - str r0, [sp, #0x1c] - add r0, r4, #0 - bl sub_02075D6C - ldr r1, [sp, #0x1c] - mov r2, #0xf - ldrb r1, [r1, r5] - bic r1, r2 - mov r2, #0xf - and r0, r2 - orr r1, r0 - ldr r0, [sp, #0x1c] - strb r1, [r0, r5] - ldr r0, _02251B90 ; =0x00002D66 - add r0, r7, r0 - str r0, [sp, #0x20] - add r0, r4, #0 - bl sub_02075E0C - ldr r1, [sp, #0x20] - lsl r0, r0, #0x1f - ldrb r1, [r1, r5] - mov r2, #0x20 - lsr r0, r0, #0x1a - bic r1, r2 - orr r1, r0 - ldr r0, [sp, #0x20] - strb r1, [r0, r5] - ldr r0, [sp] - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - beq _02251A12 - ldr r2, _02251B94 ; =0x00002D67 - mov r0, #0 - add r3, r7, r5 - add r1, r2, #0 - strb r0, [r3, r2] - add r2, #0x51 - add r1, #0x45 - add r2, r7, r2 - str r0, [r3, r1] - add r1, r2, r5 - str r1, [sp, #8] - strh r0, [r2, r5] - b _02251A46 -_02251A12: - add r0, r4, #0 - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B94 ; =0x00002D67 - add r2, r7, r5 - strb r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B98 ; =0x00002DAC - add r2, r7, r5 - str r0, [r2, r1] - add r1, #0xc - add r6, r7, r1 - add r0, r6, r5 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - strh r0, [r6, r5] -_02251A46: - ldr r0, [sp] - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - beq _02251A6E - ldr r0, [sp] - ldr r1, [sp, #4] - bl ov16_0223E208 - cmp r0, #0 - bne _02251A6E - ldr r0, [sp, #0x20] - ldrb r1, [r0, r5] - mov r0, #0x1f - bic r1, r0 - ldr r0, [sp, #0x20] - strb r1, [r0, r5] - b _02251A8E -_02251A6E: - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #0x20] - mov r2, #0x1f - ldrb r1, [r1, r5] - lsl r0, r0, #0x18 - bic r1, r2 - lsr r2, r0, #0x18 - mov r0, #0x1f - and r0, r2 - orr r1, r0 - ldr r0, [sp, #0x20] - strb r1, [r0, r5] -_02251A8E: - ldr r0, [sp, #4] - mov r1, #0xc0 - add r6, r0, #0 - mul r6, r1 - add r0, r4, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251B9C ; =0x00002D74 - add r2, r7, r6 - strb r0, [r2, r1] - add r0, r4, #0 - mov r1, #9 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251BA0 ; =0x00002D75 - add r2, r7, r6 - strb r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251BA4 ; =0x00002D8C - add r2, r7, r6 - str r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251BA8 ; =0x00002D90 - add r2, r7, r6 - str r0, [r2, r1] - add r0, r4, #0 - mov r1, #8 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251BAC ; =0x00002DA4 - add r2, r7, r6 - str r0, [r2, r1] - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_02074470 - ldr r1, _02251BB0 ; =0x00002DA8 - add r2, r7, r6 - str r0, [r2, r1] - add r0, r4, #0 - mov r1, #7 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251BB4 ; =0x00002DB4 - add r2, r7, r6 - str r0, [r2, r1] - add r0, r4, #0 - mov r1, #0x9d - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1c - ldrb r1, [r1, r5] - mov r2, #0xf0 - lsr r0, r0, #0x18 - bic r1, r2 - orr r1, r0 - ldr r0, [sp, #0x1c] - mov r2, #0 - strb r1, [r0, r5] - add r0, r4, #0 - mov r1, #0x9b - bl sub_02074470 - ldr r1, _02251BB8 ; =0x00002DBF - b _02251BBC - ; .align 2, 0 -_02251B34: .word 0x00002D42 -_02251B38: .word 0x00002D44 -_02251B3C: .word 0x00002D46 -_02251B40: .word 0x00002D48 -_02251B44: .word 0x00002D4A -_02251B48: .word 0x00002D4C -_02251B4C: .word 0x00002D6C -_02251B50: .word 0x00002D70 -_02251B54: .word 0xFFFFFC1F -_02251B58: .word 0xFFFF83FF -_02251B5C: .word 0xFFF07FFF -_02251B60: .word 0xFE0FFFFF -_02251B64: .word 0xC1FFFFFF -_02251B68: .word 0xBFFFFFFF -_02251B6C: .word 0x7FFFFFFF -_02251B70: .word 0x0000213C -_02251B74: .word 0x00002D58 -_02251B78: .word 0x00002D68 -_02251B7C: .word 0xFFFFFEFF -_02251B80: .word 0xFFFFFDFF -_02251B84: .word 0xFFFFFBFF -_02251B88: .word 0x00002D64 -_02251B8C: .word 0x00002D65 -_02251B90: .word 0x00002D66 -_02251B94: .word 0x00002D67 -_02251B98: .word 0x00002DAC -_02251B9C: .word 0x00002D74 -_02251BA0: .word 0x00002D75 -_02251BA4: .word 0x00002D8C -_02251BA8: .word 0x00002D90 -_02251BAC: .word 0x00002DA4 -_02251BB0: .word 0x00002DA8 -_02251BB4: .word 0x00002DB4 -_02251BB8: .word 0x00002DBF -_02251BBC: - add r2, r7, r6 - strb r0, [r2, r1] - ldr r0, [sp, #0x20] - ldrb r0, [r0, r5] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1b - bl sub_02098988 - mov r0, #5 - bl sub_02098700 - mov r1, #0 - mov r2, #5 - str r0, [sp, #0x24] - bl sub_0209872C - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x24] - ldrh r1, [r1, r5] - bl sub_02098828 - ldr r1, _02251C78 ; =0x00002D60 - add r2, r7, r6 - str r0, [r2, r1] - ldr r0, [sp, #0x24] - bl sub_020987BC - ldr r0, [sp, #0x24] - bl sub_02098718 - ldr r2, _02251C7C ; =0x00002D76 - add r0, r4, #0 - add r2, r7, r2 - mov r1, #0x75 - add r2, r2, r6 - bl sub_02074470 - ldr r2, _02251C80 ; =0x00002D94 - add r0, r4, #0 - add r2, r7, r2 - mov r1, #0x90 - add r2, r2, r6 - bl sub_02074470 - ldr r0, _02251C84 ; =0x00002DBC - mov r2, #0 - add r1, r7, r6 - strb r2, [r1, r0] - add r0, r0, #1 - strb r2, [r1, r0] - ldr r0, [sp] - ldr r1, [sp, #4] - bl ov16_0223E208 - add r4, r0, #0 - ldr r0, [sp, #4] - add r1, r7, r0 - ldr r0, _02251C88 ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - lsl r1, r4, #3 - add r2, r7, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #3 - lsr r1, r1, #0x1a - tst r0, r1 - beq _02251C5E - ldr r0, [sp, #8] - mov r1, #0 - strh r1, [r0] - ldr r0, _02251C8C ; =0x00002DCC - add sp, #0x28 - add r2, r7, r0 - ldr r1, [r2, r5] - ldr r0, _02251C90 ; =0xFFBFFFFF - and r0, r1 - str r0, [r2, r5] - pop {r3, r4, r5, r6, r7, pc} -_02251C5E: - ldr r0, [sp, #8] - ldrh r0, [r0] - cmp r0, #0 - beq _02251C74 - ldr r0, _02251C8C ; =0x00002DCC - add r2, r7, r0 - mov r0, #1 - ldr r1, [r2, r5] - lsl r0, r0, #0x16 - orr r0, r1 - str r0, [r2, r5] -_02251C74: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251C78: .word 0x00002D60 -_02251C7C: .word 0x00002D76 -_02251C80: .word 0x00002D94 -_02251C84: .word 0x00002DBC -_02251C88: .word 0x0000219C -_02251C8C: .word 0x00002DCC -_02251C90: .word 0xFFBFFFFF - thumb_func_end ov16_0225177C - - thumb_func_start ov16_02251C94 -ov16_02251C94: ; 0x02251C94 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r2, #0 - str r1, [sp] - add r1, r5, #0 - add r2, r3, #0 - bl ov16_0223DFAC - mov r1, #0xc0 - mul r1, r5 - str r1, [sp, #4] - mov r1, #0xa5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251DE8 ; =0x00002D42 - strh r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa6 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251DEC ; =0x00002D44 - strh r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa7 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251DF0 ; =0x00002D46 - strh r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa8 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251DF4 ; =0x00002D48 - strh r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa9 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251DF8 ; =0x00002D4A - strh r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251DFC ; =0x00002D74 - strb r0, [r2, r1] - add r0, r6, #0 - mov r1, #9 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251E00 ; =0x00002D75 - strb r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251E04 ; =0x00002D8C - str r0, [r2, r1] - add r0, r6, #0 - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251E08 ; =0x00002D90 - str r0, [r2, r1] - add r0, r1, #0 - add r0, #0x20 - ldr r2, [r2, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r2 - bne _02251DE4 - mov r0, #0xc0 - mul r0, r5 - ldr r2, [sp] - str r0, [sp, #8] - add r7, r2, r0 - add r1, #0x3c - add r0, r2, #0 - add r0, r0, r1 - mov r4, #0 - add r5, r7, #0 - str r0, [sp, #0xc] -_02251D82: - add r0, r4, #0 - bl sub_020787CC - ldr r2, [sp, #0xc] - ldr r1, [sp, #8] - ldr r1, [r2, r1] - lsl r1, r1, #0x1a - lsr r1, r1, #0x1c - tst r0, r1 - bne _02251DC6 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - ldr r1, _02251E0C ; =0x00002D4C - mov r2, #0 - strh r0, [r7, r1] - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x3a - bl sub_02074470 - ldr r1, _02251E10 ; =0x00002D6C - mov r2, #0 - strb r0, [r5, r1] - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x3e - bl sub_02074470 - ldr r1, _02251E14 ; =0x00002D70 - strb r0, [r5, r1] -_02251DC6: - add r4, r4, #1 - add r7, r7, #2 - add r5, r5, #1 - cmp r4, #4 - blt _02251D82 - add r0, r6, #0 - mov r1, #8 - mov r2, #0 - bl sub_02074470 - ldr r2, [sp] - ldr r1, [sp, #4] - add r2, r2, r1 - ldr r1, _02251E18 ; =0x00002DA4 - str r0, [r2, r1] -_02251DE4: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251DE8: .word 0x00002D42 -_02251DEC: .word 0x00002D44 -_02251DF0: .word 0x00002D46 -_02251DF4: .word 0x00002D48 -_02251DF8: .word 0x00002D4A -_02251DFC: .word 0x00002D74 -_02251E00: .word 0x00002D75 -_02251E04: .word 0x00002D8C -_02251E08: .word 0x00002D90 -_02251E0C: .word 0x00002D4C -_02251E10: .word 0x00002D6C -_02251E14: .word 0x00002D70 -_02251E18: .word 0x00002DA4 - thumb_func_end ov16_02251C94 - - thumb_func_start ov16_02251E1C -ov16_02251E1C: ; 0x02251E1C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl sub_02006B58 - mov r1, #0x19 - lsl r1, r1, #6 - cmp r0, r1 - blo _02251E38 - bl sub_02022974 -_02251E38: - add r0, r5, #0 - add r0, #0xac - str r4, [r0, #0] - add r0, r5, #0 - add r0, #0xb0 - str r6, [r0, #0] - add r0, r5, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x27 - lsl r0, r0, #8 - add r0, r5, r0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02006AA4 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02251E1C - - thumb_func_start ov16_02251E5C -ov16_02251E5C: ; 0x02251E5C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl sub_02006B58 - mov r1, #0x19 - lsl r1, r1, #6 - cmp r0, r1 - blo _02251E78 - bl sub_02022974 -_02251E78: - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #4 - blt _02251E86 - bl sub_02022974 -_02251E86: - add r1, r5, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - add r0, r5, #0 - add r0, #0xac - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r0, #0] - add r1, #0xbc - str r0, [r1, #0] - add r1, r5, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - add r0, r5, #0 - add r0, #0xb0 - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r0, #0] - add r1, #0xcc - str r0, [r1, #0] - add r1, r5, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - add r0, r5, #0 - add r0, #0xb4 - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r0, #0] - add r1, #0xdc - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - add r2, r6, #0 - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xac - str r4, [r0, #0] - add r0, r5, #0 - add r0, #0xb0 - str r6, [r0, #0] - add r0, r5, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x27 - lsl r0, r0, #8 - add r0, r5, r0 - add r1, r4, #0 - bl sub_02006AA4 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02251E5C - - thumb_func_start ov16_02251EF4 -ov16_02251EF4: ; 0x02251EF4 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - cmp r1, #0 - beq _02251F3E - add r1, r4, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - sub r2, r1, #1 - add r1, r4, #0 - add r1, #0xb8 - str r2, [r1, #0] - add r1, r4, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - lsl r2, r1, #2 - add r1, r4, r2 - add r2, r4, r2 - add r1, #0xbc - add r2, #0xcc - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov16_02251E1C - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - add r0, #0xdc - ldr r0, [r0, #0] - add r4, #0xb4 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} -_02251F3E: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02251EF4 - - thumb_func_start ov16_02251F44 -ov16_02251F44: ; 0x02251F44 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - lsl r0, r1, #6 - lsl r6, r2, #4 - add r1, r4, r0 - add r5, r1, r6 - mov r1, #0x22 - add r7, r3, #0 - mov r3, #0 - lsl r1, r1, #8 -_02251F58: - ldrb r2, [r5, r1] - cmp r2, #0 - bne _02251F6C - add r0, r4, r0 - add r0, r0, r6 - add r1, r0, r3 - mov r0, #0x22 - lsl r0, r0, #8 - strb r7, [r1, r0] - b _02251F74 -_02251F6C: - add r3, r3, #1 - add r5, r5, #1 - cmp r3, #0x10 - blt _02251F58 -_02251F74: - cmp r3, #0x10 - blt _02251F7C - bl sub_02022974 -_02251F7C: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02251F44 - - thumb_func_start ov16_02251F80 -ov16_02251F80: ; 0x02251F80 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - str r2, [sp] - add r4, r3, #0 - bne _02251F90 - bl sub_02022974 -_02251F90: - ldr r0, [sp] - lsl r6, r5, #6 - lsl r5, r0, #4 - add r0, r7, r6 - add r3, r0, r5 - mov r0, #0x22 - mov r2, #0 - lsl r0, r0, #8 -_02251FA0: - ldrb r1, [r3, r0] - cmp r4, r1 - bne _02251FB6 - add r1, r7, r6 - add r1, r1, r5 - add r3, r1, r2 - mov r1, #0x22 - mov r0, #0 - lsl r1, r1, #8 - strb r0, [r3, r1] - b _02251FBE -_02251FB6: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #0x10 - blt _02251FA0 -_02251FBE: - cmp r2, #0x10 - blt _02251FC6 - bl sub_02022974 -_02251FC6: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02251F80 - - thumb_func_start ov16_02251FC8 -ov16_02251FC8: ; 0x02251FC8 - push {r3, r4, r5, r6, r7, lr} - mov r2, #0 - mov r4, #0x22 - mov lr, r0 - mov ip, r2 - add r7, r0, #0 - add r6, r2, #0 - lsl r4, r4, #8 -_02251FD8: - mov r0, #0 - add r3, r7, #0 -_02251FDC: - add r1, r6, #0 -_02251FDE: - add r5, r3, r1 - ldrb r5, [r5, r4] - add r1, r1, #1 - add r2, r2, r5 - cmp r1, #0x10 - blt _02251FDE - add r0, r0, #1 - add r3, #0x10 - cmp r0, #4 - blt _02251FDC - mov r0, ip - add r0, r0, #1 - add r7, #0x40 - mov ip, r0 - cmp r0, #4 - blt _02251FD8 - cmp r2, #0 - bne _0225200A - ldr r1, _02252018 ; =0x00003148 - mov r3, #0 - mov r0, lr - str r3, [r0, r1] -_0225200A: - cmp r2, #0 - bne _02252012 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02252012: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02252018: .word 0x00003148 - thumb_func_end ov16_02251FC8 - - thumb_func_start ov16_0225201C -ov16_0225201C: ; 0x0225201C - push {r3, lr} - ldr r1, _02252038 ; =0x00003148 - ldr r2, [r0, r1] - add r2, r2, #1 - str r2, [r0, r1] - ldr r1, [r0, r1] - ldr r0, _0225203C ; =0x00000708 - cmp r1, r0 - ble _02252034 - mov r0, #1 - bl sub_02038AE0 -_02252034: - pop {r3, pc} - nop -_02252038: .word 0x00003148 -_0225203C: .word 0x00000708 - thumb_func_end ov16_0225201C - - thumb_func_start ov16_02252040 -ov16_02252040: ; 0x02252040 - push {r3, r4} - lsl r1, r1, #8 - add r4, r0, r1 - mov r3, #0 - mov r0, #0x23 - mov r1, #1 - add r2, r3, #0 - lsl r0, r0, #8 - lsl r1, r1, #8 -_02252052: - add r3, r3, #1 - strb r2, [r4, r0] - add r4, r4, #1 - cmp r3, r1 - blt _02252052 - pop {r3, r4} - bx lr - thumb_func_end ov16_02252040 - - thumb_func_start ov16_02252060 -ov16_02252060: ; 0x02252060 - push {r4, r5, r6, lr} - mov r4, #0xb5 - lsl r4, r4, #6 - add r5, r0, r4 - mov r6, #0xc0 - add r4, r1, #0 - mul r4, r6 - add r4, r5, r4 - cmp r2, #0x64 - bls _02252076 - b _022523DE -_02252076: - add r5, r2, r2 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_02252082: ; jump table - .short _0225214C - _02252082 - 2 ; case 0 - .short _02252150 - _02252082 - 2 ; case 1 - .short _02252154 - _02252082 - 2 ; case 2 - .short _02252158 - _02252082 - 2 ; case 3 - .short _0225215C - _02252082 - 2 ; case 4 - .short _02252160 - _02252082 - 2 ; case 5 - .short _02252164 - _02252082 - 2 ; case 6 - .short _02252164 - _02252082 - 2 ; case 7 - .short _02252164 - _02252082 - 2 ; case 8 - .short _02252164 - _02252082 - 2 ; case 9 - .short _0225216E - _02252082 - 2 ; case 10 - .short _02252176 - _02252082 - 2 ; case 11 - .short _0225217E - _02252082 - 2 ; case 12 - .short _02252186 - _02252082 - 2 ; case 13 - .short _0225218E - _02252082 - 2 ; case 14 - .short _02252196 - _02252082 - 2 ; case 15 - .short _0225219E - _02252082 - 2 ; case 16 - .short _022521A6 - _02252082 - 2 ; case 17 - .short _022521AC - _02252082 - 2 ; case 18 - .short _022521AC - _02252082 - 2 ; case 19 - .short _022521AC - _02252082 - 2 ; case 20 - .short _022521AC - _02252082 - 2 ; case 21 - .short _022521AC - _02252082 - 2 ; case 22 - .short _022521AC - _02252082 - 2 ; case 23 - .short _022521AC - _02252082 - 2 ; case 24 - .short _022521AC - _02252082 - 2 ; case 25 - .short _022521B6 - _02252082 - 2 ; case 26 - .short _022521BC - _02252082 - 2 ; case 27 - .short _022521BC - _02252082 - 2 ; case 28 - .short _022521C2 - _02252082 - 2 ; case 29 - .short _022521CC - _02252082 - 2 ; case 30 - .short _022521D6 - _02252082 - 2 ; case 31 - .short _022521D6 - _02252082 - 2 ; case 32 - .short _022521D6 - _02252082 - 2 ; case 33 - .short _022521D6 - _02252082 - 2 ; case 34 - .short _022521E0 - _02252082 - 2 ; case 35 - .short _022521E0 - _02252082 - 2 ; case 36 - .short _022521E0 - _02252082 - 2 ; case 37 - .short _022521E0 - _02252082 - 2 ; case 38 - .short _022521EA - _02252082 - 2 ; case 39 - .short _022521EA - _02252082 - 2 ; case 40 - .short _022521EA - _02252082 - 2 ; case 41 - .short _022521EA - _02252082 - 2 ; case 42 - .short _022521FE - _02252082 - 2 ; case 43 - .short _02252204 - _02252082 - 2 ; case 44 - .short _0225220A - _02252082 - 2 ; case 45 - .short _0225221C - _02252082 - 2 ; case 46 - .short _02252228 - _02252082 - 2 ; case 47 - .short _0225222C - _02252082 - 2 ; case 48 - .short _02252230 - _02252082 - 2 ; case 49 - .short _02252246 - _02252082 - 2 ; case 50 - .short _0225224A - _02252082 - 2 ; case 51 - .short _0225224E - _02252082 - 2 ; case 52 - .short _02252252 - _02252082 - 2 ; case 53 - .short _02252256 - _02252082 - 2 ; case 54 - .short _0225225A - _02252082 - 2 ; case 55 - .short _02252260 - _02252082 - 2 ; case 56 - .short _02252266 - _02252082 - 2 ; case 57 - .short _0225226C - _02252082 - 2 ; case 58 - .short _02252276 - _02252082 - 2 ; case 59 - .short _0225227C - _02252082 - 2 ; case 60 - .short _02252282 - _02252082 - 2 ; case 61 - .short _0225228C - _02252082 - 2 ; case 62 - .short _02252296 - _02252082 - 2 ; case 63 - .short _022522A0 - _02252082 - 2 ; case 64 - .short _022522AA - _02252082 - 2 ; case 65 - .short _022522B4 - _02252082 - 2 ; case 66 - .short _022522BE - _02252082 - 2 ; case 67 - .short _022522C8 - _02252082 - 2 ; case 68 - .short _022522D2 - _02252082 - 2 ; case 69 - .short _022522DC - _02252082 - 2 ; case 70 - .short _022522E6 - _02252082 - 2 ; case 71 - .short _022522F0 - _02252082 - 2 ; case 72 - .short _022522FA - _02252082 - 2 ; case 73 - .short _02252302 - _02252082 - 2 ; case 74 - .short _0225230C - _02252082 - 2 ; case 75 - .short _02252316 - _02252082 - 2 ; case 76 - .short _02252320 - _02252082 - 2 ; case 77 - .short _0225232A - _02252082 - 2 ; case 78 - .short _02252334 - _02252082 - 2 ; case 79 - .short _0225233E - _02252082 - 2 ; case 80 - .short _02252348 - _02252082 - 2 ; case 81 - .short _02252352 - _02252082 - 2 ; case 82 - .short _0225235C - _02252082 - 2 ; case 83 - .short _02252366 - _02252082 - 2 ; case 84 - .short _02252370 - _02252082 - 2 ; case 85 - .short _0225237A - _02252082 - 2 ; case 86 - .short _02252384 - _02252082 - 2 ; case 87 - .short _0225238A - _02252082 - 2 ; case 88 - .short _02252390 - _02252082 - 2 ; case 89 - .short _02252396 - _02252082 - 2 ; case 90 - .short _0225239C - _02252082 - 2 ; case 91 - .short _022523A2 - _02252082 - 2 ; case 92 - .short _022523A8 - _02252082 - 2 ; case 93 - .short _022523AE - _02252082 - 2 ; case 94 - .short _022523B4 - _02252082 - 2 ; case 95 - .short _022523BA - _02252082 - 2 ; case 96 - .short _022523C2 - _02252082 - 2 ; case 97 - .short _022523CA - _02252082 - 2 ; case 98 - .short _022523DE - _02252082 - 2 ; case 99 - .short _022523D4 - _02252082 - 2 ; case 100 -_0225214C: - ldrh r0, [r4] - pop {r4, r5, r6, pc} -_02252150: - ldrh r0, [r4, #2] - pop {r4, r5, r6, pc} -_02252154: - ldrh r0, [r4, #4] - pop {r4, r5, r6, pc} -_02252158: - ldrh r0, [r4, #6] - pop {r4, r5, r6, pc} -_0225215C: - ldrh r0, [r4, #8] - pop {r4, r5, r6, pc} -_02252160: - ldrh r0, [r4, #0xa] - pop {r4, r5, r6, pc} -_02252164: - sub r0, r2, #6 - lsl r0, r0, #1 - add r0, r4, r0 - ldrh r0, [r0, #0xc] - pop {r4, r5, r6, pc} -_0225216E: - ldr r0, [r4, #0x14] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_02252176: - ldr r0, [r4, #0x14] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_0225217E: - ldr r0, [r4, #0x14] - lsl r0, r0, #0x11 - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_02252186: - ldr r0, [r4, #0x14] - lsl r0, r0, #0xc - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_0225218E: - ldr r0, [r4, #0x14] - lsl r0, r0, #7 - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_02252196: - ldr r0, [r4, #0x14] - lsl r0, r0, #2 - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_0225219E: - ldr r0, [r4, #0x14] - lsl r0, r0, #1 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_022521A6: - ldr r0, [r4, #0x14] - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_022521AC: - sub r2, #0x12 - add r1, r4, r2 - mov r0, #0x18 - ldrsb r0, [r1, r0] - pop {r4, r5, r6, pc} -_022521B6: - add r4, #0x27 - ldrb r0, [r4] - pop {r4, r5, r6, pc} -_022521BC: - bl ov16_0225B734 - pop {r4, r5, r6, pc} -_022521C2: - add r4, #0x7e - ldrb r0, [r4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - pop {r4, r5, r6, pc} -_022521CC: - add r4, #0x26 - ldrb r0, [r4] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_022521D6: - sub r2, #0x1f - add r0, r4, r2 - add r0, #0x2c - ldrb r0, [r0] - pop {r4, r5, r6, pc} -_022521E0: - sub r2, #0x23 - add r0, r4, r2 - add r0, #0x30 - ldrb r0, [r0] - pop {r4, r5, r6, pc} -_022521EA: - sub r2, #0x27 - lsl r0, r2, #1 - add r1, r4, r2 - add r0, r4, r0 - add r1, #0x30 - ldrh r0, [r0, #0xc] - ldrb r1, [r1] - bl sub_020790DC - pop {r4, r5, r6, pc} -_022521FE: - add r4, #0x34 - ldrb r0, [r4] - pop {r4, r5, r6, pc} -_02252204: - add r4, #0x35 - ldrb r0, [r4] - pop {r4, r5, r6, pc} -_0225220A: - mov r1, #0 -_0225220C: - ldrh r0, [r4, #0x36] - add r1, r1, #1 - add r4, r4, #2 - strh r0, [r3] - add r3, r3, #2 - cmp r1, #0xb - blt _0225220C - b _022523E2 -_0225221C: - add r4, #0x36 - add r0, r3, #0 - add r1, r4, #0 - bl sub_02023D28 - b _022523E2 -_02252228: - ldr r0, [r4, #0x4c] - pop {r4, r5, r6, pc} -_0225222C: - ldr r0, [r4, #0x50] - pop {r4, r5, r6, pc} -_02252230: - mov r1, #0 -_02252232: - add r0, r4, #0 - add r0, #0x54 - ldrh r0, [r0] - add r1, r1, #1 - add r4, r4, #2 - strh r0, [r3] - add r3, r3, #2 - cmp r1, #0xb - blt _02252232 - b _022523E2 -_02252246: - ldr r0, [r4, #0x64] - pop {r4, r5, r6, pc} -_0225224A: - ldr r0, [r4, #0x68] - pop {r4, r5, r6, pc} -_0225224E: - ldr r0, [r4, #0x6c] - pop {r4, r5, r6, pc} -_02252252: - ldr r0, [r4, #0x70] - pop {r4, r5, r6, pc} -_02252256: - ldr r0, [r4, #0x74] - pop {r4, r5, r6, pc} -_0225225A: - add r4, #0x78 - ldrh r0, [r4] - pop {r4, r5, r6, pc} -_02252260: - add r4, #0x7c - ldrb r0, [r4] - pop {r4, r5, r6, pc} -_02252266: - add r4, #0x7d - ldrb r0, [r4] - pop {r4, r5, r6, pc} -_0225226C: - add r4, #0x7e - ldrb r0, [r4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - pop {r4, r5, r6, pc} -_02252276: - add r4, #0x80 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_0225227C: - add r4, #0x84 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252282: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_0225228C: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_02252296: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1e - pop {r4, r5, r6, pc} -_022522A0: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0x15 - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_022522AA: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0x13 - lsr r0, r0, #0x1e - pop {r4, r5, r6, pc} -_022522B4: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0x11 - lsr r0, r0, #0x1e - pop {r4, r5, r6, pc} -_022522BE: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0xe - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_022522C8: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #0xb - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_022522D2: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #8 - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_022522DC: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #5 - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_022522E6: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #2 - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_022522F0: - add r4, #0x88 - ldr r0, [r4, #0] - lsl r0, r0, #1 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_022522FA: - add r4, #0x88 - ldr r0, [r4, #0] - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_02252302: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1e - pop {r4, r5, r6, pc} -_0225230C: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1c - pop {r4, r5, r6, pc} -_02252316: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1e - pop {r4, r5, r6, pc} -_02252320: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1e - pop {r4, r5, r6, pc} -_0225232A: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0x13 - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_02252334: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_0225233E: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0xd - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_02252348: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #0xa - lsr r0, r0, #0x1d - pop {r4, r5, r6, pc} -_02252352: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #9 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_0225235C: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #5 - lsr r0, r0, #0x1c - pop {r4, r5, r6, pc} -_02252366: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #4 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_02252370: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #3 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_0225237A: - add r4, #0x8c - ldr r0, [r4, #0] - lsl r0, r0, #2 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_02252384: - add r4, #0x90 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_0225238A: - add r4, #0x94 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252390: - add r4, #0x98 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252396: - add r4, #0xa0 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_0225239C: - add r4, #0xa4 - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_022523A2: - add r4, #0xa8 - ldrh r0, [r4] - pop {r4, r5, r6, pc} -_022523A8: - add r4, #0xac - ldrh r0, [r4] - pop {r4, r5, r6, pc} -_022523AE: - add r4, #0xaa - ldrh r0, [r4] - pop {r4, r5, r6, pc} -_022523B4: - add r4, #0xbc - ldr r0, [r4, #0] - pop {r4, r5, r6, pc} -_022523BA: - ldr r0, [r4, #0x28] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_022523C2: - ldr r0, [r4, #0x28] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - pop {r4, r5, r6, pc} -_022523CA: - add r4, #0x26 - ldrb r0, [r4] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1b - pop {r4, r5, r6, pc} -_022523D4: - add r6, #0x78 - ldr r2, [r0, r6] - bl ov16_02252060 - pop {r4, r5, r6, pc} -_022523DE: - bl sub_02022974 -_022523E2: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02252060 - - thumb_func_start ov16_022523E8 -ov16_022523E8: ; 0x022523E8 - push {r4, r5, r6, lr} - add r5, r2, #0 - mov r2, #0xb5 - lsl r2, r2, #6 - add r4, r0, r2 - mov r6, #0xc0 - add r2, r1, #0 - mul r2, r6 - add r2, r4, r2 - cmp r5, #0x64 - bls _02252400 - b _022529FE -_02252400: - add r4, r5, r5 - add r4, pc - ldrh r4, [r4, #6] - lsl r4, r4, #0x10 - asr r4, r4, #0x10 - add pc, r4 -_0225240C: ; jump table - .short _022524D6 - _0225240C - 2 ; case 0 - .short _022524DC - _0225240C - 2 ; case 1 - .short _022524E2 - _0225240C - 2 ; case 2 - .short _022524E8 - _0225240C - 2 ; case 3 - .short _022524EE - _0225240C - 2 ; case 4 - .short _022524F4 - _0225240C - 2 ; case 5 - .short _022524FA - _0225240C - 2 ; case 6 - .short _022524FA - _0225240C - 2 ; case 7 - .short _022524FA - _0225240C - 2 ; case 8 - .short _022524FA - _0225240C - 2 ; case 9 - .short _02252506 - _0225240C - 2 ; case 10 - .short _02252518 - _0225240C - 2 ; case 11 - .short _0225252A - _0225240C - 2 ; case 12 - .short _0225253C - _0225240C - 2 ; case 13 - .short _0225254E - _0225240C - 2 ; case 14 - .short _02252560 - _0225240C - 2 ; case 15 - .short _02252572 - _0225240C - 2 ; case 16 - .short _02252584 - _0225240C - 2 ; case 17 - .short _02252594 - _0225240C - 2 ; case 18 - .short _02252594 - _0225240C - 2 ; case 19 - .short _02252594 - _0225240C - 2 ; case 20 - .short _02252594 - _0225240C - 2 ; case 21 - .short _02252594 - _0225240C - 2 ; case 22 - .short _02252594 - _0225240C - 2 ; case 23 - .short _02252594 - _0225240C - 2 ; case 24 - .short _02252594 - _0225240C - 2 ; case 25 - .short _022525A0 - _0225240C - 2 ; case 26 - .short _022525A8 - _0225240C - 2 ; case 27 - .short _022525B0 - _0225240C - 2 ; case 28 - .short _022525B8 - _0225240C - 2 ; case 29 - .short _022525D0 - _0225240C - 2 ; case 30 - .short _022525E8 - _0225240C - 2 ; case 31 - .short _022525E8 - _0225240C - 2 ; case 32 - .short _022525E8 - _0225240C - 2 ; case 33 - .short _022525E8 - _0225240C - 2 ; case 34 - .short _022525F4 - _0225240C - 2 ; case 35 - .short _022525F4 - _0225240C - 2 ; case 36 - .short _022525F4 - _0225240C - 2 ; case 37 - .short _022525F4 - _0225240C - 2 ; case 38 - .short _02252600 - _0225240C - 2 ; case 39 - .short _02252600 - _0225240C - 2 ; case 40 - .short _02252600 - _0225240C - 2 ; case 41 - .short _02252600 - _0225240C - 2 ; case 42 - .short _02252606 - _0225240C - 2 ; case 43 - .short _0225260E - _0225240C - 2 ; case 44 - .short _02252616 - _0225240C - 2 ; case 45 - .short _022529FE - _0225240C - 2 ; case 46 - .short _02252628 - _0225240C - 2 ; case 47 - .short _02252630 - _0225240C - 2 ; case 48 - .short _02252636 - _0225240C - 2 ; case 49 - .short _0225264C - _0225240C - 2 ; case 50 - .short _02252652 - _0225240C - 2 ; case 51 - .short _02252658 - _0225240C - 2 ; case 52 - .short _0225265E - _0225240C - 2 ; case 53 - .short _02252664 - _0225240C - 2 ; case 54 - .short _0225266A - _0225240C - 2 ; case 55 - .short _02252672 - _0225240C - 2 ; case 56 - .short _0225267A - _0225240C - 2 ; case 57 - .short _02252682 - _0225240C - 2 ; case 58 - .short _0225269A - _0225240C - 2 ; case 59 - .short _022526A2 - _0225240C - 2 ; case 60 - .short _022526AA - _0225240C - 2 ; case 61 - .short _022526C2 - _0225240C - 2 ; case 62 - .short _022526DA - _0225240C - 2 ; case 63 - .short _022526F2 - _0225240C - 2 ; case 64 - .short _0225270A - _0225240C - 2 ; case 65 - .short _02252722 - _0225240C - 2 ; case 66 - .short _0225273A - _0225240C - 2 ; case 67 - .short _02252752 - _0225240C - 2 ; case 68 - .short _0225276A - _0225240C - 2 ; case 69 - .short _02252782 - _0225240C - 2 ; case 70 - .short _0225279A - _0225240C - 2 ; case 71 - .short _022527B2 - _0225240C - 2 ; case 72 - .short _022527CA - _0225240C - 2 ; case 73 - .short _022527E0 - _0225240C - 2 ; case 74 - .short _022527F8 - _0225240C - 2 ; case 75 - .short _02252810 - _0225240C - 2 ; case 76 - .short _02252828 - _0225240C - 2 ; case 77 - .short _02252840 - _0225240C - 2 ; case 78 - .short _02252858 - _0225240C - 2 ; case 79 - .short _02252870 - _0225240C - 2 ; case 80 - .short _02252888 - _0225240C - 2 ; case 81 - .short _022528A0 - _0225240C - 2 ; case 82 - .short _02252910 - _0225240C - 2 ; case 83 - .short _02252928 - _0225240C - 2 ; case 84 - .short _02252940 - _0225240C - 2 ; case 85 - .short _02252958 - _0225240C - 2 ; case 86 - .short _02252970 - _0225240C - 2 ; case 87 - .short _02252978 - _0225240C - 2 ; case 88 - .short _02252980 - _0225240C - 2 ; case 89 - .short _02252988 - _0225240C - 2 ; case 90 - .short _02252990 - _0225240C - 2 ; case 91 - .short _02252998 - _0225240C - 2 ; case 92 - .short _022529A0 - _0225240C - 2 ; case 93 - .short _022529A8 - _0225240C - 2 ; case 94 - .short _022529B0 - _0225240C - 2 ; case 95 - .short _022529B8 - _0225240C - 2 ; case 96 - .short _022529CA - _0225240C - 2 ; case 97 - .short _022529DC - _0225240C - 2 ; case 98 - .short _022529FE - _0225240C - 2 ; case 99 - .short _022529F4 - _0225240C - 2 ; case 100 -_022524D6: - ldrh r0, [r3] - strh r0, [r2] - pop {r4, r5, r6, pc} -_022524DC: - ldrh r0, [r3] - strh r0, [r2, #2] - pop {r4, r5, r6, pc} -_022524E2: - ldrh r0, [r3] - strh r0, [r2, #4] - pop {r4, r5, r6, pc} -_022524E8: - ldrh r0, [r3] - strh r0, [r2, #6] - pop {r4, r5, r6, pc} -_022524EE: - ldrh r0, [r3] - strh r0, [r2, #8] - pop {r4, r5, r6, pc} -_022524F4: - ldrh r0, [r3] - strh r0, [r2, #0xa] - pop {r4, r5, r6, pc} -_022524FA: - sub r0, r5, #6 - lsl r0, r0, #1 - ldrh r1, [r3] - add r0, r2, r0 - strh r1, [r0, #0xc] - pop {r4, r5, r6, pc} -_02252506: - ldr r4, [r2, #0x14] - mov r0, #0x1f - bic r4, r0 - ldrb r1, [r3] - mov r0, #0x1f - and r0, r1 - orr r0, r4 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_02252518: - ldr r1, [r2, #0x14] - ldr r0, _022528AC ; =0xFFFFFC1F - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1b - lsr r0, r0, #0x16 - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_0225252A: - ldr r1, [r2, #0x14] - ldr r0, _022528B0 ; =0xFFFF83FF - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1b - lsr r0, r0, #0x11 - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_0225253C: - ldr r1, [r2, #0x14] - ldr r0, _022528B4 ; =0xFFF07FFF - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1b - lsr r0, r0, #0xc - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_0225254E: - ldr r1, [r2, #0x14] - ldr r0, _022528B8 ; =0xFE0FFFFF - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1b - lsr r0, r0, #7 - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_02252560: - ldr r1, [r2, #0x14] - ldr r0, _022528BC ; =0xC1FFFFFF - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1b - lsr r0, r0, #2 - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_02252572: - ldr r1, [r2, #0x14] - ldr r0, _022528C0 ; =0xBFFFFFFF - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #1 - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_02252584: - ldr r1, [r2, #0x14] - ldr r0, _022528C4 ; =0x7FFFFFFF - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - orr r0, r1 - str r0, [r2, #0x14] - pop {r4, r5, r6, pc} -_02252594: - mov r0, #0 - ldrsb r1, [r3, r0] - sub r5, #0x12 - add r0, r2, r5 - strb r1, [r0, #0x18] - pop {r4, r5, r6, pc} -_022525A0: - ldrb r0, [r3] - add r2, #0x27 - strb r0, [r2] - pop {r4, r5, r6, pc} -_022525A8: - ldrb r0, [r3] - add r2, #0x24 - strb r0, [r2] - pop {r4, r5, r6, pc} -_022525B0: - ldrb r0, [r3] - add r2, #0x25 - strb r0, [r2] - pop {r4, r5, r6, pc} -_022525B8: - add r0, r2, #0 - add r0, #0x7e - ldrb r4, [r0] - ldrb r1, [r3] - mov r0, #0xf - bic r4, r0 - mov r0, #0xf - and r0, r1 - orr r0, r4 - add r2, #0x7e - strb r0, [r2] - pop {r4, r5, r6, pc} -_022525D0: - add r0, r2, #0 - add r0, #0x26 - ldrb r1, [r0] - mov r0, #0x20 - add r2, #0x26 - bic r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1a - orr r0, r1 - strb r0, [r2] - pop {r4, r5, r6, pc} -_022525E8: - sub r5, #0x1f - add r0, r2, r5 - ldrb r1, [r3] - add r0, #0x2c - strb r1, [r0] - pop {r4, r5, r6, pc} -_022525F4: - sub r5, #0x23 - add r0, r2, r5 - ldrb r1, [r3] - add r0, #0x30 - strb r1, [r0] - pop {r4, r5, r6, pc} -_02252600: - bl sub_02022974 - pop {r4, r5, r6, pc} -_02252606: - ldrb r0, [r3] - add r2, #0x34 - strb r0, [r2] - pop {r4, r5, r6, pc} -_0225260E: - ldrb r0, [r3] - add r2, #0x35 - strb r0, [r2] - pop {r4, r5, r6, pc} -_02252616: - mov r1, #0 -_02252618: - ldrh r0, [r3] - add r1, r1, #1 - add r3, r3, #2 - strh r0, [r2, #0x36] - add r2, r2, #2 - cmp r1, #0xb - blt _02252618 - pop {r4, r5, r6, pc} -_02252628: - mov r0, #0 - ldrsh r0, [r3, r0] - str r0, [r2, #0x4c] - pop {r4, r5, r6, pc} -_02252630: - ldrh r0, [r3] - str r0, [r2, #0x50] - pop {r4, r5, r6, pc} -_02252636: - mov r4, #0 -_02252638: - ldrh r1, [r3] - add r0, r2, #0 - add r0, #0x54 - add r4, r4, #1 - strh r1, [r0] - add r3, r3, #2 - add r2, r2, #2 - cmp r4, #0xb - blt _02252638 - pop {r4, r5, r6, pc} -_0225264C: - ldr r0, [r3, #0] - str r0, [r2, #0x64] - pop {r4, r5, r6, pc} -_02252652: - ldr r0, [r3, #0] - str r0, [r2, #0x68] - pop {r4, r5, r6, pc} -_02252658: - ldr r0, [r3, #0] - str r0, [r2, #0x6c] - pop {r4, r5, r6, pc} -_0225265E: - ldr r0, [r3, #0] - str r0, [r2, #0x70] - pop {r4, r5, r6, pc} -_02252664: - ldr r0, [r3, #0] - str r0, [r2, #0x74] - pop {r4, r5, r6, pc} -_0225266A: - ldrh r0, [r3] - add r2, #0x78 - strh r0, [r2] - pop {r4, r5, r6, pc} -_02252672: - ldrb r0, [r3] - add r2, #0x7c - strb r0, [r2] - pop {r4, r5, r6, pc} -_0225267A: - ldrb r0, [r3] - add r2, #0x7d - strb r0, [r2] - pop {r4, r5, r6, pc} -_02252682: - add r0, r2, #0 - add r0, #0x7e - ldrb r1, [r0] - mov r0, #0xf0 - add r2, #0x7e - bic r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1c - lsr r0, r0, #0x18 - orr r0, r1 - strb r0, [r2] - pop {r4, r5, r6, pc} -_0225269A: - ldr r0, [r3, #0] - add r2, #0x80 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022526A2: - ldr r0, [r3, #0] - add r2, #0x84 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022526AA: - add r0, r2, #0 - add r0, #0x88 - ldr r4, [r0, #0] - mov r0, #7 - bic r4, r0 - ldrb r1, [r3] - mov r0, #7 - add r2, #0x88 - and r0, r1 - orr r0, r4 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022526C2: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - mov r0, #0x38 - bic r1, r0 - ldrb r0, [r3] - add r2, #0x88 - lsl r0, r0, #0x1d - lsr r0, r0, #0x1a - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022526DA: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - mov r0, #0xc0 - bic r1, r0 - ldrb r0, [r3] - add r2, #0x88 - lsl r0, r0, #0x1e - lsr r0, r0, #0x18 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022526F2: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528C8 ; =0xFFFFF8FF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0x15 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_0225270A: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528CC ; =0xFFFFE7FF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1e - lsr r0, r0, #0x13 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252722: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528D0 ; =0xFFFF9FFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1e - lsr r0, r0, #0x11 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_0225273A: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528D4 ; =0xFFFC7FFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0xe - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252752: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528D8 ; =0xFFE3FFFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0xb - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_0225276A: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528DC ; =0xFF1FFFFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #8 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252782: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528E0 ; =0xF8FFFFFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #5 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_0225279A: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528E4 ; =0xC7FFFFFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #2 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022527B2: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528C0 ; =0xBFFFFFFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #1 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022527CA: - add r0, r2, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _022528C4 ; =0x7FFFFFFF - add r2, #0x88 - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022527E0: - add r0, r2, #0 - add r0, #0x8c - ldr r4, [r0, #0] - mov r0, #3 - bic r4, r0 - ldrb r1, [r3] - mov r0, #3 - add r2, #0x8c - and r0, r1 - orr r0, r4 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022527F8: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - mov r0, #0x3c - bic r1, r0 - ldrb r0, [r3] - add r2, #0x8c - lsl r0, r0, #0x1c - lsr r0, r0, #0x1a - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252810: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - mov r0, #0xc0 - bic r1, r0 - ldrb r0, [r3] - add r2, #0x8c - lsl r0, r0, #0x1e - lsr r0, r0, #0x18 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252828: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _022528E8 ; =0xFFFFFCFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1e - lsr r0, r0, #0x16 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252840: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _022528EC ; =0xFFFFE3FF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0x13 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252858: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _022528F0 ; =0xFFFF1FFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0x10 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252870: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _022528F4 ; =0xFFF8FFFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0xd - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252888: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _022528F8 ; =0xFFC7FFFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0xa - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022528A0: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _022528FC ; =0xFFBFFFFF - b _02252900 - nop -_022528AC: .word 0xFFFFFC1F -_022528B0: .word 0xFFFF83FF -_022528B4: .word 0xFFF07FFF -_022528B8: .word 0xFE0FFFFF -_022528BC: .word 0xC1FFFFFF -_022528C0: .word 0xBFFFFFFF -_022528C4: .word 0x7FFFFFFF -_022528C8: .word 0xFFFFF8FF -_022528CC: .word 0xFFFFE7FF -_022528D0: .word 0xFFFF9FFF -_022528D4: .word 0xFFFC7FFF -_022528D8: .word 0xFFE3FFFF -_022528DC: .word 0xFF1FFFFF -_022528E0: .word 0xF8FFFFFF -_022528E4: .word 0xC7FFFFFF -_022528E8: .word 0xFFFFFCFF -_022528EC: .word 0xFFFFE3FF -_022528F0: .word 0xFFFF1FFF -_022528F4: .word 0xFFF8FFFF -_022528F8: .word 0xFFC7FFFF -_022528FC: .word 0xFFBFFFFF -_02252900: - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #9 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252910: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252A04 ; =0xF87FFFFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1c - lsr r0, r0, #5 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252928: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252A08 ; =0xF7FFFFFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #4 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252940: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252A0C ; =0xEFFFFFFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #3 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252958: - add r0, r2, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252A10 ; =0xDFFFFFFF - add r2, #0x8c - and r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #2 - orr r0, r1 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252970: - ldr r0, [r3, #0] - add r2, #0x90 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252978: - ldr r0, [r3, #0] - add r2, #0x94 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252980: - ldr r0, [r3, #0] - add r2, #0x98 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252988: - ldr r0, [r3, #0] - add r2, #0xa0 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252990: - ldr r0, [r3, #0] - add r2, #0xa4 - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_02252998: - ldrh r0, [r3] - add r2, #0xa8 - strh r0, [r2] - pop {r4, r5, r6, pc} -_022529A0: - ldrh r0, [r3] - add r2, #0xac - strh r0, [r2] - pop {r4, r5, r6, pc} -_022529A8: - ldrh r0, [r3] - add r2, #0xaa - strh r0, [r2] - pop {r4, r5, r6, pc} -_022529B0: - ldr r0, [r3, #0] - add r2, #0xbc - str r0, [r2, #0] - pop {r4, r5, r6, pc} -_022529B8: - ldr r1, [r2, #0x28] - mov r0, #0x40 - bic r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x19 - orr r0, r1 - str r0, [r2, #0x28] - pop {r4, r5, r6, pc} -_022529CA: - ldr r1, [r2, #0x28] - mov r0, #0x80 - bic r1, r0 - ldrb r0, [r3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x18 - orr r0, r1 - str r0, [r2, #0x28] - pop {r4, r5, r6, pc} -_022529DC: - add r0, r2, #0 - add r0, #0x26 - ldrb r4, [r0] - ldrb r1, [r3] - mov r0, #0x1f - bic r4, r0 - mov r0, #0x1f - and r0, r1 - orr r0, r4 - add r2, #0x26 - strb r0, [r2] - pop {r4, r5, r6, pc} -_022529F4: - add r6, #0x78 - ldr r2, [r0, r6] - bl ov16_022523E8 - pop {r4, r5, r6, pc} -_022529FE: - bl sub_02022974 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02252A04: .word 0xF87FFFFF -_02252A08: .word 0xF7FFFFFF -_02252A0C: .word 0xEFFFFFFF -_02252A10: .word 0xDFFFFFFF - thumb_func_end ov16_022523E8 - - thumb_func_start ov16_02252A14 -ov16_02252A14: ; 0x02252A14 - push {r4, lr} - mov r4, #0xb5 - lsl r4, r4, #6 - add r4, r0, r4 - mov r0, #0xc0 - mul r0, r1 - add r1, r2, #0 - add r0, r4, r0 - add r2, r3, #0 - bl ov16_02252A2C - pop {r4, pc} - thumb_func_end ov16_02252A14 - - thumb_func_start ov16_02252A2C -ov16_02252A2C: ; 0x02252A2C - push {r4, r5, r6, lr} - add r4, r0, #0 - add r5, r2, #0 - cmp r1, #0x62 - bls _02252A38 - b _02252E82 -_02252A38: - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02252A44: ; jump table - .short _02252E82 - _02252A44 - 2 ; case 0 - .short _02252B0A - _02252A44 - 2 ; case 1 - .short _02252B12 - _02252A44 - 2 ; case 2 - .short _02252B1A - _02252A44 - 2 ; case 3 - .short _02252B22 - _02252A44 - 2 ; case 4 - .short _02252B2A - _02252A44 - 2 ; case 5 - .short _02252E82 - _02252A44 - 2 ; case 6 - .short _02252E82 - _02252A44 - 2 ; case 7 - .short _02252E82 - _02252A44 - 2 ; case 8 - .short _02252E82 - _02252A44 - 2 ; case 9 - .short _02252B32 - _02252A44 - 2 ; case 10 - .short _02252B4A - _02252A44 - 2 ; case 11 - .short _02252B60 - _02252A44 - 2 ; case 12 - .short _02252B76 - _02252A44 - 2 ; case 13 - .short _02252B8C - _02252A44 - 2 ; case 14 - .short _02252BA2 - _02252A44 - 2 ; case 15 - .short _02252E82 - _02252A44 - 2 ; case 16 - .short _02252E82 - _02252A44 - 2 ; case 17 - .short _02252BB8 - _02252A44 - 2 ; case 18 - .short _02252BB8 - _02252A44 - 2 ; case 19 - .short _02252BB8 - _02252A44 - 2 ; case 20 - .short _02252BB8 - _02252A44 - 2 ; case 21 - .short _02252BB8 - _02252A44 - 2 ; case 22 - .short _02252BB8 - _02252A44 - 2 ; case 23 - .short _02252BB8 - _02252A44 - 2 ; case 24 - .short _02252BB8 - _02252A44 - 2 ; case 25 - .short _02252E82 - _02252A44 - 2 ; case 26 - .short _02252E82 - _02252A44 - 2 ; case 27 - .short _02252E82 - _02252A44 - 2 ; case 28 - .short _02252E82 - _02252A44 - 2 ; case 29 - .short _02252E82 - _02252A44 - 2 ; case 30 - .short _02252BD6 - _02252A44 - 2 ; case 31 - .short _02252BD6 - _02252A44 - 2 ; case 32 - .short _02252BD6 - _02252A44 - 2 ; case 33 - .short _02252BD6 - _02252A44 - 2 ; case 34 - .short _02252BFC - _02252A44 - 2 ; case 35 - .short _02252BFC - _02252A44 - 2 ; case 36 - .short _02252BFC - _02252A44 - 2 ; case 37 - .short _02252BFC - _02252A44 - 2 ; case 38 - .short _02252E82 - _02252A44 - 2 ; case 39 - .short _02252E82 - _02252A44 - 2 ; case 40 - .short _02252E82 - _02252A44 - 2 ; case 41 - .short _02252E82 - _02252A44 - 2 ; case 42 - .short _02252C08 - _02252A44 - 2 ; case 43 - .short _02252C16 - _02252A44 - 2 ; case 44 - .short _02252E82 - _02252A44 - 2 ; case 45 - .short _02252E82 - _02252A44 - 2 ; case 46 - .short _02252C32 - _02252A44 - 2 ; case 47 - .short _02252C44 - _02252A44 - 2 ; case 48 - .short _02252E82 - _02252A44 - 2 ; case 49 - .short _02252C4C - _02252A44 - 2 ; case 50 - .short _02252C54 - _02252A44 - 2 ; case 51 - .short _02252E82 - _02252A44 - 2 ; case 52 - .short _02252E82 - _02252A44 - 2 ; case 53 - .short _02252E82 - _02252A44 - 2 ; case 54 - .short _02252E82 - _02252A44 - 2 ; case 55 - .short _02252E82 - _02252A44 - 2 ; case 56 - .short _02252E82 - _02252A44 - 2 ; case 57 - .short _02252E82 - _02252A44 - 2 ; case 58 - .short _02252E82 - _02252A44 - 2 ; case 59 - .short _02252E82 - _02252A44 - 2 ; case 60 - .short _02252C5C - _02252A44 - 2 ; case 61 - .short _02252C7A - _02252A44 - 2 ; case 62 - .short _02252C98 - _02252A44 - 2 ; case 63 - .short _02252CB6 - _02252A44 - 2 ; case 64 - .short _02252CD2 - _02252A44 - 2 ; case 65 - .short _02252CEE - _02252A44 - 2 ; case 66 - .short _02252D0A - _02252A44 - 2 ; case 67 - .short _02252D26 - _02252A44 - 2 ; case 68 - .short _02252D42 - _02252A44 - 2 ; case 69 - .short _02252D5E - _02252A44 - 2 ; case 70 - .short _02252D7A - _02252A44 - 2 ; case 71 - .short _02252E82 - _02252A44 - 2 ; case 72 - .short _02252E82 - _02252A44 - 2 ; case 73 - .short _02252E82 - _02252A44 - 2 ; case 74 - .short _02252E82 - _02252A44 - 2 ; case 75 - .short _02252E82 - _02252A44 - 2 ; case 76 - .short _02252E82 - _02252A44 - 2 ; case 77 - .short _02252D96 - _02252A44 - 2 ; case 78 - .short _02252DB2 - _02252A44 - 2 ; case 79 - .short _02252DCE - _02252A44 - 2 ; case 80 - .short _02252E82 - _02252A44 - 2 ; case 81 - .short _02252E82 - _02252A44 - 2 ; case 82 - .short _02252E82 - _02252A44 - 2 ; case 83 - .short _02252E82 - _02252A44 - 2 ; case 84 - .short _02252E82 - _02252A44 - 2 ; case 85 - .short _02252E82 - _02252A44 - 2 ; case 86 - .short _02252DEA - _02252A44 - 2 ; case 87 - .short _02252DF8 - _02252A44 - 2 ; case 88 - .short _02252E06 - _02252A44 - 2 ; case 89 - .short _02252E14 - _02252A44 - 2 ; case 90 - .short _02252E82 - _02252A44 - 2 ; case 91 - .short _02252E82 - _02252A44 - 2 ; case 92 - .short _02252E82 - _02252A44 - 2 ; case 93 - .short _02252E82 - _02252A44 - 2 ; case 94 - .short _02252E22 - _02252A44 - 2 ; case 95 - .short _02252E30 - _02252A44 - 2 ; case 96 - .short _02252E48 - _02252A44 - 2 ; case 97 - .short _02252E60 - _02252A44 - 2 ; case 98 -_02252B0A: - ldrh r0, [r4, #2] - add r0, r0, r5 - strh r0, [r4, #2] - pop {r4, r5, r6, pc} -_02252B12: - ldrh r0, [r4, #4] - add r0, r0, r5 - strh r0, [r4, #4] - pop {r4, r5, r6, pc} -_02252B1A: - ldrh r0, [r4, #6] - add r0, r0, r5 - strh r0, [r4, #6] - pop {r4, r5, r6, pc} -_02252B22: - ldrh r0, [r4, #8] - add r0, r0, r5 - strh r0, [r4, #8] - pop {r4, r5, r6, pc} -_02252B2A: - ldrh r0, [r4, #0xa] - add r0, r0, r5 - strh r0, [r4, #0xa] - pop {r4, r5, r6, pc} -_02252B32: - ldr r2, [r4, #0x14] - mov r1, #0x1f - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x1b - lsr r1, r1, #0x1b - add r2, r1, r5 - mov r1, #0x1f - and r1, r2 - orr r0, r1 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02252B4A: - ldr r1, [r4, #0x14] - ldr r0, _02252E88 ; =0xFFFFFC1F - and r0, r1 - lsl r1, r1, #0x16 - lsr r1, r1, #0x1b - add r1, r1, r5 - lsl r1, r1, #0x1b - lsr r1, r1, #0x16 - orr r0, r1 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02252B60: - ldr r1, [r4, #0x14] - ldr r0, _02252E8C ; =0xFFFF83FF - and r0, r1 - lsl r1, r1, #0x11 - lsr r1, r1, #0x1b - add r1, r1, r5 - lsl r1, r1, #0x1b - lsr r1, r1, #0x11 - orr r0, r1 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02252B76: - ldr r1, [r4, #0x14] - ldr r0, _02252E90 ; =0xFFF07FFF - and r0, r1 - lsl r1, r1, #0xc - lsr r1, r1, #0x1b - add r1, r1, r5 - lsl r1, r1, #0x1b - lsr r1, r1, #0xc - orr r0, r1 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02252B8C: - ldr r1, [r4, #0x14] - ldr r0, _02252E94 ; =0xFE0FFFFF - and r0, r1 - lsl r1, r1, #7 - lsr r1, r1, #0x1b - add r1, r1, r5 - lsl r1, r1, #0x1b - lsr r1, r1, #7 - orr r0, r1 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02252BA2: - ldr r1, [r4, #0x14] - ldr r0, _02252E98 ; =0xC1FFFFFF - and r0, r1 - lsl r1, r1, #2 - lsr r1, r1, #0x1b - add r1, r1, r5 - lsl r1, r1, #0x1b - lsr r1, r1, #2 - orr r0, r1 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02252BB8: - add r4, #0x18 - sub r1, #0x12 - ldrsb r0, [r4, r1] - add r0, r5, r0 - bpl _02252BC8 - mov r0, #0 - strb r0, [r4, r1] - pop {r4, r5, r6, pc} -_02252BC8: - cmp r0, #0xc - ble _02252BD2 - mov r0, #0xc - strb r0, [r4, r1] - pop {r4, r5, r6, pc} -_02252BD2: - strb r0, [r4, r1] - pop {r4, r5, r6, pc} -_02252BD6: - add r6, r1, #0 - sub r6, #0x1f - lsl r0, r6, #1 - add r1, r4, r6 - add r0, r4, r0 - add r1, #0x30 - ldrh r0, [r0, #0xc] - ldrb r1, [r1] - bl sub_020790DC - add r4, #0x2c - ldrb r1, [r4, r6] - add r1, r5, r1 - cmp r1, r0 - ble _02252BF8 - strb r0, [r4, r6] - pop {r4, r5, r6, pc} -_02252BF8: - strb r1, [r4, r6] - pop {r4, r5, r6, pc} -_02252BFC: - add r4, #0x30 - sub r1, #0x23 - ldrb r0, [r4, r1] - add r0, r0, r5 - strb r0, [r4, r1] - pop {r4, r5, r6, pc} -_02252C08: - add r0, r4, #0 - add r0, #0x34 - ldrb r0, [r0] - add r4, #0x34 - add r0, r0, r5 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02252C16: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - add r0, r0, r5 - cmp r0, #0xff - ble _02252C26 - mov r0, #0xff - b _02252C2C -_02252C26: - cmp r0, #0 - bge _02252C2C - mov r0, #0 -_02252C2C: - add r4, #0x35 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02252C32: - ldr r0, [r4, #0x4c] - ldr r1, [r4, #0x50] - add r0, r0, r5 - cmp r0, r1 - bls _02252C40 - str r1, [r4, #0x4c] - pop {r4, r5, r6, pc} -_02252C40: - str r0, [r4, #0x4c] - pop {r4, r5, r6, pc} -_02252C44: - ldr r0, [r4, #0x50] - add r0, r0, r5 - str r0, [r4, #0x50] - pop {r4, r5, r6, pc} -_02252C4C: - ldr r0, [r4, #0x64] - add r0, r0, r5 - str r0, [r4, #0x64] - pop {r4, r5, r6, pc} -_02252C54: - ldr r0, [r4, #0x68] - add r0, r0, r5 - str r0, [r4, #0x68] - pop {r4, r5, r6, pc} -_02252C5C: - add r0, r4, #0 - add r0, #0x88 - ldr r2, [r0, #0] - mov r1, #7 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x1d - lsr r1, r1, #0x1d - add r2, r1, r5 - mov r1, #7 - and r1, r2 - orr r0, r1 - add r4, #0x88 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252C7A: - add r0, r4, #0 - add r0, #0x88 - ldr r2, [r0, #0] - mov r1, #0x38 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x1a - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0x1a - orr r0, r1 - add r4, #0x88 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252C98: - add r0, r4, #0 - add r0, #0x88 - ldr r2, [r0, #0] - mov r1, #0xc0 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x18 - lsr r1, r1, #0x1e - add r1, r1, r5 - lsl r1, r1, #0x1e - lsr r1, r1, #0x18 - orr r0, r1 - add r4, #0x88 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252CB6: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252E9C ; =0xFFFFF8FF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #0x15 - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0x15 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252CD2: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EA0 ; =0xFFFFE7FF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #0x13 - lsr r1, r1, #0x1e - add r1, r1, r5 - lsl r1, r1, #0x1e - lsr r1, r1, #0x13 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252CEE: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EA4 ; =0xFFFF9FFF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #0x11 - lsr r1, r1, #0x1e - add r1, r1, r5 - lsl r1, r1, #0x1e - lsr r1, r1, #0x11 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252D0A: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EA8 ; =0xFFFC7FFF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #0xe - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0xe - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252D26: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EAC ; =0xFFE3FFFF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #0xb - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0xb - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252D42: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EB0 ; =0xFF1FFFFF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #8 - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #8 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252D5E: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EB4 ; =0xF8FFFFFF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #5 - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #5 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252D7A: - add r0, r4, #0 - add r0, #0x88 - ldr r1, [r0, #0] - ldr r0, _02252EB8 ; =0xC7FFFFFF - add r4, #0x88 - and r0, r1 - lsl r1, r1, #2 - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #2 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252D96: - add r0, r4, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252EBC ; =0xFFFFE3FF - add r4, #0x8c - and r0, r1 - lsl r1, r1, #0x13 - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0x13 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252DB2: - add r0, r4, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252EC0 ; =0xFFFF1FFF - add r4, #0x8c - and r0, r1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0x10 - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252DCE: - add r0, r4, #0 - add r0, #0x8c - ldr r1, [r0, #0] - ldr r0, _02252EC4 ; =0xFFF8FFFF - add r4, #0x8c - and r0, r1 - lsl r1, r1, #0xd - lsr r1, r1, #0x1d - add r1, r1, r5 - lsl r1, r1, #0x1d - lsr r1, r1, #0xd - orr r0, r1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252DEA: - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r4, #0x90 - add r0, r0, r5 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252DF8: - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r4, #0x94 - add r0, r0, r5 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252E06: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r4, #0x98 - add r0, r0, r5 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252E14: - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - add r4, #0xa0 - add r0, r0, r5 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252E22: - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - add r4, #0xbc - add r0, r0, r5 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_02252E30: - ldr r2, [r4, #0x28] - mov r1, #0x40 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x19 - lsr r1, r1, #0x1f - add r1, r1, r5 - lsl r1, r1, #0x1f - lsr r1, r1, #0x19 - orr r0, r1 - str r0, [r4, #0x28] - pop {r4, r5, r6, pc} -_02252E48: - ldr r2, [r4, #0x28] - mov r1, #0x80 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x18 - lsr r1, r1, #0x1f - add r1, r1, r5 - lsl r1, r1, #0x1f - lsr r1, r1, #0x18 - orr r0, r1 - str r0, [r4, #0x28] - pop {r4, r5, r6, pc} -_02252E60: - add r0, r4, #0 - add r0, #0x26 - ldrb r2, [r0] - mov r1, #0x1f - add r4, #0x26 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x1b - lsr r1, r1, #0x1b - add r1, r1, r5 - lsl r1, r1, #0x18 - lsr r2, r1, #0x18 - mov r1, #0x1f - and r1, r2 - orr r0, r1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02252E82: - bl sub_02022974 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02252E88: .word 0xFFFFFC1F -_02252E8C: .word 0xFFFF83FF -_02252E90: .word 0xFFF07FFF -_02252E94: .word 0xFE0FFFFF -_02252E98: .word 0xC1FFFFFF -_02252E9C: .word 0xFFFFF8FF -_02252EA0: .word 0xFFFFE7FF -_02252EA4: .word 0xFFFF9FFF -_02252EA8: .word 0xFFFC7FFF -_02252EAC: .word 0xFFE3FFFF -_02252EB0: .word 0xFF1FFFFF -_02252EB4: .word 0xF8FFFFFF -_02252EB8: .word 0xC7FFFFFF -_02252EBC: .word 0xFFFFE3FF -_02252EC0: .word 0xFFFF1FFF -_02252EC4: .word 0xFFF8FFFF - thumb_func_end ov16_02252A2C - - thumb_func_start ov16_02252EC8 -ov16_02252EC8: ; 0x02252EC8 - push {r4, r5, r6, r7, lr} - sub sp, #0x6c - str r0, [sp, #4] - ldr r0, [sp, #0x80] - str r3, [sp, #0xc] - str r0, [sp, #0x80] - mov r0, #0 - str r0, [sp, #0x64] - str r0, [sp, #0x60] - ldr r0, [sp, #0x64] - str r2, [sp, #8] - str r0, [sp, #0x5c] - ldr r0, [sp, #0x64] - ldr r3, _022531C4 ; =0x00002D8C - str r0, [sp, #0x48] - ldr r0, [sp, #0x64] - add r5, r1, #0 - str r0, [sp, #0x44] - ldr r0, [sp, #0x64] - str r0, [sp, #0x40] - ldr r0, [sp, #0x64] - str r0, [sp, #0x3c] - ldr r0, [sp, #0x64] - str r0, [sp, #0x38] - ldr r0, [sp, #0x64] - str r0, [sp, #0x34] - mov r0, #0xc0 - mul r2, r0 - str r2, [sp, #0x18] - add r2, r5, r3 - ldr r1, [sp, #0x18] - str r2, [sp, #0x68] - ldr r1, [r2, r1] - cmp r1, #0 - bne _02252F20 - ldr r2, [sp, #0xc] - mul r0, r2 - add r0, r5, r0 - ldr r0, [r0, r3] - cmp r0, #0 - beq _02252F20 - add sp, #0x6c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02252F20: - cmp r1, #0 - beq _02252F3A - ldr r0, [sp, #0xc] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _022531C4 ; =0x00002D8C - add r1, r5, r1 - ldr r0, [r1, r0] - cmp r0, #0 - bne _02252F3A - add sp, #0x6c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02252F3A: - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02255A4C - str r0, [sp, #0x2c] - ldr r1, [sp, #0xc] - add r0, r5, #0 - bl ov16_02255A4C - str r0, [sp, #0x28] - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02258AB8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x58] - ldr r1, [sp, #8] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x54] - ldr r1, [sp, #0xc] - add r0, r5, #0 - bl ov16_02258AB8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x50] - ldr r1, [sp, #0xc] - add r0, r5, #0 - mov r2, #0 - bl ov16_02258ACC - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x4c] - ldr r0, [sp, #0x18] - ldr r2, _022531C8 ; =0x00002D5B - add r0, r5, r0 - ldrsb r4, [r0, r2] - ldr r0, [sp, #0xc] - mov r1, #0xc0 - mul r1, r0 - add r0, r5, r1 - str r1, [sp, #0x14] - ldrsb r7, [r0, r2] - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x56 - bne _02252FBC - sub r0, r4, #6 - lsl r0, r0, #1 - add r4, r0, #6 - cmp r4, #0xc - ble _02252FB6 - mov r4, #0xc -_02252FB6: - cmp r4, #0 - bge _02252FBC - mov r4, #0 -_02252FBC: - ldr r1, [sp, #0xc] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x56 - bne _02252FDA - sub r0, r7, #6 - lsl r0, r0, #1 - add r7, r0, #6 - cmp r7, #0xc - ble _02252FD4 - mov r7, #0xc -_02252FD4: - cmp r7, #0 - bge _02252FDA - mov r7, #0 -_02252FDA: - ldr r0, [sp, #0x18] - lsl r1, r4, #1 - add r2, r5, r0 - ldr r0, _022531CC ; =0x00002D46 - ldrh r2, [r2, r0] - ldr r0, _022531D0 ; =0x0226EBE0 - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _022531D4 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, [sp, #0x14] - lsl r1, r7, #1 - add r2, r5, r0 - ldr r0, _022531CC ; =0x00002D46 - ldrh r2, [r2, r0] - ldr r0, _022531D0 ; =0x0226EBE0 - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _022531D4 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - add r4, r0, #0 - mov r0, #0xd - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02253082 - mov r0, #0x4c - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02253082 - ldr r0, [sp, #0x2c] - cmp r0, #0x21 - bne _02253048 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #3 - tst r0, r1 - bne _0225305A -_02253048: - ldr r0, [sp, #0x2c] - cmp r0, #0x22 - bne _0225305C - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x30 - tst r0, r1 - beq _0225305C -_0225305A: - lsl r6, r6, #1 -_0225305C: - ldr r0, [sp, #0x28] - cmp r0, #0x21 - bne _0225306E - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #3 - tst r0, r1 - bne _02253080 -_0225306E: - ldr r0, [sp, #0x28] - cmp r0, #0x22 - bne _02253082 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x30 - tst r0, r1 - beq _02253082 -_02253080: - lsl r4, r4, #1 -_02253082: - mov r0, #0 - str r0, [sp, #0x24] - ldr r0, [sp, #0x18] - ldr r7, _022531D8 ; =0x0226EBA8 - add r0, r5, r0 - str r0, [sp, #0x1c] -_0225308E: - ldr r2, [sp, #0x1c] - ldr r1, _022531DC ; =0x00002DB8 - add r0, r5, #0 - ldrh r1, [r2, r1] - mov r2, #1 - bl ov16_0225B0FC - ldrb r1, [r7] - cmp r1, r0 - bne _022530A6 - lsr r6, r6, #1 - b _022530B2 -_022530A6: - ldr r0, [sp, #0x24] - add r7, r7, #1 - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, #8 - blo _0225308E -_022530B2: - ldr r0, [sp, #0x58] - cmp r0, #0x73 - bne _022530C4 - mov r0, #0xf - mul r0, r6 - mov r1, #0xa - bl sub_020E2178 - add r6, r0, #0 -_022530C4: - ldr r0, [sp, #0x58] - cmp r0, #0x66 - bne _022530DA - ldr r0, [sp, #0x18] - add r1, r5, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r1, r0] - cmp r0, #0x84 - bne _022530DA - lsl r6, r6, #1 -_022530DA: - ldr r0, [sp, #0x2c] - cmp r0, #0x5f - bne _022530FC - ldr r0, [sp, #0x18] - add r1, r5, r0 - ldr r0, _022531E0 ; =0x00002DAC - ldr r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - beq _022530FC - mov r0, #0xf - mul r0, r6 - mov r1, #0xa - bl sub_020E2178 - add r6, r0, #0 - b _0225310C -_022530FC: - ldr r0, [sp, #0x18] - add r1, r5, r0 - ldr r0, _022531E0 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x40 - tst r0, r1 - beq _0225310C - lsr r6, r6, #2 -_0225310C: - ldr r0, [sp, #0x2c] - cmp r0, #0x70 - bne _02253128 - ldr r1, [sp, #0x18] - mov r0, #0x15 - add r2, r5, r1 - ldr r1, _022531E4 ; =0x00002DD8 - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r1, [r2, r1] - sub r0, r0, r1 - cmp r0, #5 - bge _02253128 - lsr r6, r6, #1 -_02253128: - ldr r0, [sp, #0x2c] - cmp r0, #0x54 - bne _02253146 - ldr r0, [sp, #0x18] - add r2, r5, r0 - ldr r0, _022531E8 ; =0x00002DCC - ldr r1, [r2, r0] - lsl r1, r1, #9 - lsr r1, r1, #0x1f - beq _02253146 - sub r0, #0x14 - ldrh r0, [r2, r0] - cmp r0, #0 - bne _02253146 - lsl r6, r6, #1 -_02253146: - ldr r0, [sp, #4] - ldr r1, [sp, #8] - bl ov16_0223E208 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #3 - lsl r0, r0, #8 - tst r0, r1 - beq _02253162 - lsl r6, r6, #1 -_02253162: - ldr r0, [sp, #0x58] - cmp r0, #0x34 - bne _022531A0 - ldr r1, [sp, #0x54] - mov r0, #0x64 - bl sub_020E1F6C - add r1, r0, #0 - ldr r0, [sp, #8] - lsl r0, r0, #1 - add r2, r5, r0 - ldr r0, _022531EC ; =0x0000310C - ldrh r0, [r2, r0] - bl sub_020E1F6C - cmp r1, #0 - bne _022531A0 - mov r0, #1 - str r0, [sp, #0x40] - ldr r0, [sp, #0x80] - cmp r0, #0 - bne _022531A0 - ldr r0, _022531E8 ; =0x00002DCC - ldr r1, [sp, #0x18] - add r0, r5, r0 - ldr r2, [r0, r1] - mov r1, #2 - lsl r1, r1, #0x1c - orr r2, r1 - ldr r1, [sp, #0x18] - str r2, [r0, r1] -_022531A0: - ldr r0, [sp, #0x58] - cmp r0, #0x2d - bne _02253224 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _022531BA - ldr r0, [sp, #0x54] - lsl r0, r0, #0x17 - lsr r0, r0, #0x18 - str r0, [sp, #0x54] -_022531BA: - ldr r0, [sp, #8] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _022531F0 ; =0x00002D90 - b _022531F4 - ; .align 2, 0 -_022531C4: .word 0x00002D8C -_022531C8: .word 0x00002D5B -_022531CC: .word 0x00002D46 -_022531D0: .word 0x0226EBE0 -_022531D4: .word 0x0226EBE1 -_022531D8: .word 0x0226EBA8 -_022531DC: .word 0x00002DB8 -_022531E0: .word 0x00002DAC -_022531E4: .word 0x00002DD8 -_022531E8: .word 0x00002DCC -_022531EC: .word 0x0000310C -_022531F0: .word 0x00002D90 -_022531F4: - add r1, r5, r1 - ldr r0, [r1, r0] - ldr r1, [sp, #0x54] - bl sub_020E2178 - ldr r2, [sp, #0x68] - ldr r1, [sp, #0x18] - ldr r1, [r2, r1] - cmp r1, r0 - bhi _02253224 - mov r0, #1 - str r0, [sp, #0x40] - ldr r0, [sp, #0x80] - cmp r0, #0 - bne _02253224 - ldr r0, _022534EC ; =0x00002DCC - ldr r1, [sp, #0x18] - add r0, r5, r0 - ldr r2, [r0, r1] - mov r1, #1 - lsl r1, r1, #0x1c - orr r2, r1 - ldr r1, [sp, #0x18] - str r2, [r0, r1] -_02253224: - ldr r0, [sp, #0x58] - cmp r0, #0x6b - bne _0225322E - mov r0, #1 - str r0, [sp, #0x38] -_0225322E: - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r7, _022534F0 ; =0x0226EBA8 - add r0, r5, r0 - str r0, [sp, #0x20] -_0225323A: - ldr r2, [sp, #0x20] - ldr r1, _022534F4 ; =0x00002DB8 - add r0, r5, #0 - ldrh r1, [r2, r1] - mov r2, #1 - bl ov16_0225B0FC - ldrb r1, [r7] - cmp r1, r0 - bne _02253252 - lsr r4, r4, #1 - b _0225325E -_02253252: - ldr r0, [sp, #0x10] - add r7, r7, #1 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #8 - blo _0225323A -_0225325E: - ldr r0, [sp, #0x50] - cmp r0, #0x73 - bne _02253270 - mov r0, #0xf - mul r0, r4 - mov r1, #0xa - bl sub_020E2178 - add r4, r0, #0 -_02253270: - ldr r0, [sp, #0x50] - cmp r0, #0x66 - bne _02253286 - ldr r0, [sp, #0x14] - add r1, r5, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r1, r0] - cmp r0, #0x84 - bne _02253286 - lsl r4, r4, #1 -_02253286: - ldr r0, [sp, #0x28] - cmp r0, #0x5f - bne _022532A8 - ldr r0, [sp, #0x14] - add r1, r5, r0 - ldr r0, _022534F8 ; =0x00002DAC - ldr r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - beq _022532A8 - mov r0, #0xf - mul r0, r4 - mov r1, #0xa - bl sub_020E2178 - add r4, r0, #0 - b _022532B8 -_022532A8: - ldr r0, [sp, #0x14] - add r1, r5, r0 - ldr r0, _022534F8 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x40 - tst r0, r1 - beq _022532B8 - lsr r4, r4, #2 -_022532B8: - ldr r0, [sp, #0x28] - cmp r0, #0x70 - bne _022532D4 - ldr r1, [sp, #0x14] - mov r0, #0x15 - add r2, r5, r1 - ldr r1, _022534FC ; =0x00002DD8 - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r1, [r2, r1] - sub r0, r0, r1 - cmp r0, #5 - bge _022532D4 - lsr r4, r4, #1 -_022532D4: - ldr r0, [sp, #0x28] - cmp r0, #0x54 - bne _022532F2 - ldr r0, [sp, #0x14] - add r2, r5, r0 - ldr r0, _022534EC ; =0x00002DCC - ldr r1, [r2, r0] - lsl r1, r1, #9 - lsr r1, r1, #0x1f - beq _022532F2 - sub r0, #0x14 - ldrh r0, [r2, r0] - cmp r0, #0 - bne _022532F2 - lsl r4, r4, #1 -_022532F2: - ldr r0, [sp, #4] - ldr r1, [sp, #0xc] - bl ov16_0223E208 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #3 - lsl r0, r0, #8 - tst r0, r1 - beq _0225330E - lsl r4, r4, #1 -_0225330E: - ldr r0, [sp, #0x50] - cmp r0, #0x34 - bne _0225334C - ldr r1, [sp, #0x4c] - mov r0, #0x64 - bl sub_020E1F6C - add r1, r0, #0 - ldr r0, [sp, #0xc] - lsl r0, r0, #1 - add r2, r5, r0 - ldr r0, _02253500 ; =0x0000310C - ldrh r0, [r2, r0] - bl sub_020E1F6C - cmp r1, #0 - bne _0225334C - mov r0, #1 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x80] - cmp r0, #0 - bne _0225334C - ldr r0, _022534EC ; =0x00002DCC - ldr r1, [sp, #0x14] - add r0, r5, r0 - ldr r2, [r0, r1] - mov r1, #2 - lsl r1, r1, #0x1c - orr r2, r1 - ldr r1, [sp, #0x14] - str r2, [r0, r1] -_0225334C: - ldr r0, [sp, #0x50] - cmp r0, #0x2d - bne _022533A0 - ldr r1, [sp, #0xc] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02253366 - ldr r0, [sp, #0x4c] - lsl r0, r0, #0x17 - lsr r0, r0, #0x18 - str r0, [sp, #0x4c] -_02253366: - ldr r0, [sp, #0xc] - mov r1, #0xc0 - add r7, r0, #0 - mul r7, r1 - ldr r0, _02253504 ; =0x00002D90 - add r1, r5, r7 - ldr r0, [r1, r0] - ldr r1, [sp, #0x4c] - bl sub_020E2178 - ldr r1, _02253508 ; =0x00002D8C - add r2, r5, r7 - ldr r2, [r2, r1] - cmp r2, r0 - bhi _022533A0 - mov r0, #1 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x80] - cmp r0, #0 - bne _022533A0 - add r1, #0x40 - add r0, r5, r1 - ldr r1, [sp, #0x14] - ldr r2, [r0, r1] - mov r1, #1 - lsl r1, r1, #0x1c - orr r2, r1 - ldr r1, [sp, #0x14] - str r2, [r0, r1] -_022533A0: - ldr r0, [sp, #0x50] - cmp r0, #0x6b - bne _022533AA - mov r0, #1 - str r0, [sp, #0x34] -_022533AA: - ldr r0, [sp, #8] - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0225350C ; =0x000021F0 - str r6, [r1, r0] - ldr r1, [sp, #0xc] - lsl r1, r1, #2 - add r1, r5, r1 - str r4, [r1, r0] - ldr r1, [sp, #0x80] - cmp r1, #0 - bne _02253462 - ldr r1, [sp, #0xc] - ldr r3, _02253510 ; =0x000030BC - lsl r1, r1, #4 - add r2, r5, r1 - add r1, r0, #0 - sub r1, #0x3c - ldr r1, [r2, r1] - sub r0, #0x3c - str r1, [sp, #0x30] - ldr r1, [sp, #8] - lsl r1, r1, #1 - add r1, r5, r1 - ldrh r2, [r1, r3] - ldr r1, [sp, #0xc] - lsl r1, r1, #1 - add r1, r5, r1 - ldrh r7, [r1, r3] - ldr r1, [sp, #8] - lsl r1, r1, #4 - add r1, r5, r1 - ldr r0, [r1, r0] - cmp r0, #1 - bne _0225341A - ldr r0, [sp, #8] - lsl r0, r0, #6 - add r1, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _02253408 - mov r0, #0xa5 - str r0, [sp, #0x60] - b _0225341A -_02253408: - ldr r1, [sp, #8] - add r0, r5, #0 - add r2, r2, #6 - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x60] -_0225341A: - ldr r0, [sp, #0x30] - cmp r0, #1 - bne _0225344A - ldr r0, [sp, #0xc] - lsl r0, r0, #6 - add r1, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _02253438 - mov r0, #0xa5 - str r0, [sp, #0x5c] - b _0225344A -_02253438: - ldr r1, [sp, #0xc] - add r0, r5, #0 - add r2, r7, #6 - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x5c] -_0225344A: - ldr r0, [sp, #0x60] - mov r1, #0xfa - lsl r0, r0, #4 - add r0, r5, r0 - lsl r1, r1, #2 - ldrsb r0, [r0, r1] - str r0, [sp, #0x48] - ldr r0, [sp, #0x5c] - lsl r0, r0, #4 - add r0, r5, r0 - ldrsb r0, [r0, r1] - str r0, [sp, #0x44] -_02253462: - ldr r1, [sp, #0x48] - ldr r0, [sp, #0x44] - cmp r1, r0 - beq _0225346C - b _022535D2 -_0225346C: - ldr r0, [sp, #0x40] - cmp r0, #0 - beq _02253498 - ldr r0, [sp, #0x3c] - cmp r0, #0 - beq _02253498 - cmp r6, r4 - bhs _02253482 - mov r0, #1 - str r0, [sp, #0x64] - b _022535DA -_02253482: - cmp r6, r4 - bne _022534D6 - ldr r0, [sp, #4] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _022534D6 - mov r0, #2 - str r0, [sp, #0x64] - b _022535DA -_02253498: - ldr r0, [sp, #0x40] - cmp r0, #0 - bne _022534AA - ldr r0, [sp, #0x3c] - cmp r0, #0 - beq _022534AA - mov r0, #1 - str r0, [sp, #0x64] - b _022535DA -_022534AA: - ldr r0, [sp, #0x40] - cmp r0, #0 - beq _022534BC - ldr r0, [sp, #0x3c] - cmp r0, #0 - bne _022534BC - mov r0, #0 - str r0, [sp, #0x64] - b _022535DA -_022534BC: - ldr r0, [sp, #0x38] - cmp r0, #0 - beq _02253514 - ldr r0, [sp, #0x34] - cmp r0, #0 - beq _02253514 - cmp r6, r4 - bls _022534D2 - mov r0, #1 - str r0, [sp, #0x64] - b _022535DA -_022534D2: - cmp r6, r4 - beq _022534D8 -_022534D6: - b _022535DA -_022534D8: - ldr r0, [sp, #4] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _022535DA - mov r0, #2 - str r0, [sp, #0x64] - b _022535DA - nop -_022534EC: .word 0x00002DCC -_022534F0: .word 0x0226EBA8 -_022534F4: .word 0x00002DB8 -_022534F8: .word 0x00002DAC -_022534FC: .word 0x00002DD8 -_02253500: .word 0x0000310C -_02253504: .word 0x00002D90 -_02253508: .word 0x00002D8C -_0225350C: .word 0x000021F0 -_02253510: .word 0x000030BC -_02253514: - ldr r0, [sp, #0x38] - cmp r0, #0 - beq _02253526 - ldr r0, [sp, #0x34] - cmp r0, #0 - bne _02253526 - mov r0, #1 - str r0, [sp, #0x64] - b _022535DA -_02253526: - ldr r0, [sp, #0x38] - cmp r0, #0 - bne _02253538 - ldr r0, [sp, #0x34] - cmp r0, #0 - beq _02253538 - mov r0, #0 - str r0, [sp, #0x64] - b _022535DA -_02253538: - ldr r0, [sp, #0x2c] - cmp r0, #0x64 - bne _02253564 - ldr r0, [sp, #0x28] - cmp r0, #0x64 - bne _02253564 - cmp r6, r4 - bls _0225354E - mov r0, #1 - str r0, [sp, #0x64] - b _022535DA -_0225354E: - cmp r6, r4 - bne _022535DA - ldr r0, [sp, #4] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _022535DA - mov r0, #2 - str r0, [sp, #0x64] - b _022535DA -_02253564: - ldr r0, [sp, #0x2c] - cmp r0, #0x64 - bne _02253576 - ldr r0, [sp, #0x28] - cmp r0, #0x64 - beq _02253576 - mov r0, #1 - str r0, [sp, #0x64] - b _022535DA -_02253576: - ldr r0, [sp, #0x2c] - cmp r0, #0x64 - beq _02253588 - ldr r0, [sp, #0x28] - cmp r0, #0x64 - bne _02253588 - mov r0, #0 - str r0, [sp, #0x64] - b _022535DA -_02253588: - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #7 - lsl r0, r0, #0x10 - tst r0, r1 - beq _022535B4 - cmp r6, r4 - bls _0225359E - mov r0, #1 - str r0, [sp, #0x64] -_0225359E: - cmp r6, r4 - bne _022535DA - ldr r0, [sp, #4] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _022535DA - mov r0, #2 - str r0, [sp, #0x64] - b _022535DA -_022535B4: - cmp r6, r4 - bhs _022535BC - mov r0, #1 - str r0, [sp, #0x64] -_022535BC: - cmp r6, r4 - bne _022535DA - ldr r0, [sp, #4] - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _022535DA - mov r0, #2 - str r0, [sp, #0x64] - b _022535DA -_022535D2: - cmp r1, r0 - bge _022535DA - mov r0, #1 - str r0, [sp, #0x64] -_022535DA: - ldr r0, [sp, #0x64] - add sp, #0x6c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_02252EC8 - - thumb_func_start ov16_022535E0 -ov16_022535E0: ; 0x022535E0 - asr r1, r1, #1 - lsl r1, r1, #0x1f - lsr r1, r1, #0x1d - add r0, r0, r1 - mov r2, #0 - add r0, #0xa4 - str r2, [r0, #0] - bx lr - thumb_func_end ov16_022535E0 - - thumb_func_start ov16_022535F0 -ov16_022535F0: ; 0x022535F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r2, [sp] - add r5, r1, #0 - mov r4, #0 - bl ov16_0223DF0C - add r7, r0, #0 - ldr r0, [sp] - mov r1, #0xc0 - mul r1, r0 - add r0, r5, r1 - str r0, [sp, #4] - ldr r0, [sp] - asr r0, r0, #1 - lsl r0, r0, #0x1f - lsr r0, r0, #0x1d - add r6, r5, r0 - add r6, #0xa4 -_02253616: - add r0, r4, #0 - bl sub_020787CC - ldr r1, _02253660 ; =0x00003108 - ldrb r1, [r5, r1] - tst r0, r1 - bne _0225364C - ldr r0, [sp] - bl sub_020787CC - ldr r1, _02253660 ; =0x00003108 - ldrb r1, [r5, r1] - tst r0, r1 - bne _0225364C - ldr r1, [sp, #4] - ldr r0, _02253664 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225364C - ldr r0, _02253668 ; =0x0000219C - add r1, r5, r4 - ldrb r0, [r1, r0] - bl sub_020787CC - ldr r1, [r6, #0] - orr r0, r1 - str r0, [r6, #0] -_0225364C: - add r4, r4, #2 - cmp r7, #0x4a - beq _0225365A - cmp r7, #0x4b - beq _0225365A - cmp r4, #2 - ble _02253616 -_0225365A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02253660: .word 0x00003108 -_02253664: .word 0x00002D8C -_02253668: .word 0x0000219C - thumb_func_end ov16_022535F0 - - thumb_func_start ov16_0225366C -ov16_0225366C: ; 0x0225366C - push {r4, r5, r6, lr} - ldr r0, _022536F8 ; =0x00002170 - add r5, r1, #0 - add r4, r2, #0 - ldr r2, [r5, r0] - mov r0, #2 - lsl r0, r0, #0x1c - mov r6, #0 - tst r0, r2 - beq _0225369E - add r0, r5, #0 - mov r1, #1 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _022536F8 ; =0x00002170 - add r1, r6, #0 - str r1, [r5, r0] - sub r0, r0, #4 - ldr r1, [r5, r0] - ldr r0, _022536FC ; =0x801FDA49 - tst r0, r1 - bne _022536F2 - mov r6, #1 - b _022536F2 -_0225369E: - cmp r2, #0 - beq _022536F2 - add r0, r5, #0 - mov r1, #1 - bl ov16_0225B5D0 - str r0, [r4, #0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02253700 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _022536EC - ldr r1, _02253704 ; =0x0000216C - ldr r2, _022536FC ; =0x801FDA49 - ldr r0, [r5, r1] - tst r2, r0 - beq _022536EA - add r1, r1, #4 - mov r2, #2 - ldr r1, [r5, r1] - lsl r2, r2, #0x16 - tst r2, r1 - beq _022536DC - ldr r2, _02253708 ; =0x00040008 - tst r2, r0 - bne _022536EA -_022536DC: - mov r2, #1 - lsl r2, r2, #0x1c - tst r1, r2 - beq _022536EC - ldr r1, _0225370C ; =0x00010001 - tst r0, r1 - beq _022536EC -_022536EA: - mov r6, #1 -_022536EC: - ldr r0, _022536F8 ; =0x00002170 - mov r1, #0 - str r1, [r5, r0] -_022536F2: - add r0, r6, #0 - pop {r4, r5, r6, pc} - nop -_022536F8: .word 0x00002170 -_022536FC: .word 0x801FDA49 -_02253700: .word 0x00002D8C -_02253704: .word 0x0000216C -_02253708: .word 0x00040008 -_0225370C: .word 0x00010001 - thumb_func_end ov16_0225366C - - thumb_func_start ov16_02253710 -ov16_02253710: ; 0x02253710 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r5, r1, #0 - ldr r0, _02253930 ; =0x00002174 - add r4, r2, #0 - ldr r2, [r5, r0] - mov r1, #2 - lsl r1, r1, #0x1c - add r3, r2, #0 - mov r6, #0 - tst r3, r1 - beq _02253746 - add r0, r5, #0 - mov r1, #2 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _02253930 ; =0x00002174 - add r1, r6, #0 - str r1, [r5, r0] - sub r0, #8 - ldr r1, [r5, r0] - ldr r0, _02253934 ; =0x801FDA49 - tst r0, r1 - bne _022537E6 - mov r6, #1 - b _0225392A -_02253746: - lsr r3, r1, #5 - tst r3, r2 - beq _0225377A - add r0, r5, #0 - mov r1, #2 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _02253930 ; =0x00002174 - add r1, r6, #0 - str r1, [r5, r0] - add r1, r5, #0 - add r1, #0x94 - ldr r1, [r1, #0] - add r0, r5, #0 - bl ov16_02259AC0 - cmp r0, #0 - bne _022537E6 - ldr r0, _02253938 ; =0x0000216C - ldr r1, [r5, r0] - ldr r0, _02253934 ; =0x801FDA49 - tst r0, r1 - bne _022537E6 - mov r6, #1 - b _0225392A -_0225377A: - lsr r3, r1, #4 - tst r3, r2 - beq _022537BC - add r0, r5, #0 - mov r1, #2 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _02253930 ; =0x00002174 - add r1, r6, #0 - str r1, [r5, r0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _0225393C ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _022537E6 - add r0, r5, #0 - bl ov16_02259AC0 - cmp r0, #0 - bne _022537E6 - ldr r0, _02253938 ; =0x0000216C - ldr r1, [r5, r0] - ldr r0, _02253934 ; =0x801FDA49 - tst r0, r1 - bne _022537E6 - mov r6, #1 - b _0225392A -_022537BC: - lsr r3, r1, #1 - tst r3, r2 - beq _022537EC - add r0, r5, #0 - mov r1, #2 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _02253930 ; =0x00002174 - add r1, r6, #0 - str r1, [r5, r0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _0225393C ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - bne _022537E8 -_022537E6: - b _0225392A -_022537E8: - mov r6, #1 - b _0225392A -_022537EC: - lsr r1, r1, #3 - tst r1, r2 - beq _02253878 - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x20 - ldr r0, _02253940 ; =0x00003044 - bne _02253810 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02253944 ; =0x000003E5 - ldrb r0, [r1, r0] - lsl r0, r0, #0x11 - lsr r6, r0, #0x10 - b _0225381A -_02253810: - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02253944 ; =0x000003E5 - ldrb r6, [r1, r0] -_0225381A: - cmp r6, #0 - bne _02253822 - bl sub_02022974 -_02253822: - ldr r0, [sp] - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r6 - bge _0225383E - ldr r1, _02253948 ; =0x0000213C - mov r0, #1 - ldr r2, [r5, r1] - lsl r0, r0, #0x16 - orr r0, r2 - str r0, [r5, r1] -_0225383E: - ldr r2, _02253930 ; =0x00002174 - add r0, r5, #0 - ldr r2, [r5, r2] - mov r1, #2 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r1, _02253930 ; =0x00002174 - mov r0, #0 - str r0, [r5, r1] - add r0, r5, #0 - add r0, #0x94 - ldr r2, [r0, #0] - mov r0, #0xc0 - mul r0, r2 - add r2, r5, r0 - ldr r0, _0225393C ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - bne _02253874 - add r0, r1, #0 - sub r0, #0x38 - ldr r2, [r5, r0] - ldr r0, _0225394C ; =0xFFBFFFFF - sub r1, #0x38 - and r0, r2 - str r0, [r5, r1] -_02253874: - mov r6, #1 - b _0225392A -_02253878: - cmp r2, #0 - beq _022538FC - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x20 - ldr r0, _02253940 ; =0x00003044 - bne _0225389A - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02253944 ; =0x000003E5 - ldrb r0, [r1, r0] - lsl r0, r0, #0x11 - lsr r7, r0, #0x10 - b _022538A4 -_0225389A: - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02253944 ; =0x000003E5 - ldrb r7, [r1, r0] -_022538A4: - cmp r7, #0 - bne _022538AC - bl sub_02022974 -_022538AC: - ldr r0, [sp] - bl ov16_0223F4BC - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, r7 - bge _0225392A - ldr r2, _02253930 ; =0x00002174 - add r0, r5, #0 - ldr r2, [r5, r2] - mov r1, #2 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _02253930 ; =0x00002174 - mov r1, #0 - str r1, [r5, r0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _0225393C ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _0225392A - add r0, r5, #0 - bl ov16_02259AC0 - cmp r0, #0 - bne _0225392A - ldr r0, _02253938 ; =0x0000216C - ldr r1, [r5, r0] - ldr r0, _02253934 ; =0x801FDA49 - tst r0, r1 - bne _0225392A - mov r6, #1 - b _0225392A -_022538FC: - add r0, r0, #4 - ldr r2, [r5, r0] - cmp r2, #0 - beq _0225392A - add r0, r5, #0 - mov r1, #3 - bl ov16_0225B5D0 - str r0, [r4, #0] - ldr r0, _02253950 ; =0x00002178 - add r1, r6, #0 - str r1, [r5, r0] - add r0, r5, #0 - add r0, #0x94 - ldr r1, [r0, #0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _0225393C ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225392A - mov r6, #1 -_0225392A: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02253930: .word 0x00002174 -_02253934: .word 0x801FDA49 -_02253938: .word 0x0000216C -_0225393C: .word 0x00002D8C -_02253940: .word 0x00003044 -_02253944: .word 0x000003E5 -_02253948: .word 0x0000213C -_0225394C: .word 0xFFBFFFFF -_02253950: .word 0x00002178 - thumb_func_end ov16_02253710 - - thumb_func_start ov16_02253954 -ov16_02253954: ; 0x02253954 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - mov r0, #0xff - add r4, r1, #0 - add r5, r2, #0 - str r0, [sp, #0xc] - cmp r3, #0 - beq _02253970 - lsl r0, r3, #4 - add r1, r4, r0 - ldr r0, _02253C1C ; =0x000003E6 - ldrh r0, [r1, r0] - b _02253972 -_02253970: - ldr r0, [sp, #0x34] -_02253972: - cmp r0, #4 - bne _02253A02 - add r0, r6, #0 - bl ov16_0223DF1C - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223DF14 - bl ov16_02263AE4 - ldr r1, _02253C20 ; =0x0000217E - mov r2, #0 - strb r2, [r4, r1] - ldrb r1, [r4, r1] - ldr r2, [sp, #8] - cmp r1, r2 - bge _022539F0 - mov r2, #1 - add r5, r0, #0 - and r5, r2 -_0225399E: - ldr r0, _02253C24 ; =0x000021EC - add r1, r4, r1 - ldrb r7, [r1, r0] - mov r0, #0xc0 - mul r0, r7 - add r1, r4, r0 - ldr r0, _02253C28 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _022539DE - add r0, r6, #0 - add r1, r7, #0 - bl ov16_0223DF14 - str r0, [sp] - cmp r5, #0 - beq _022539CA - bl ov16_02263AE4 - mov r1, #1 - tst r0, r1 - beq _022539DA -_022539CA: - cmp r5, #0 - bne _022539DE - ldr r0, [sp] - bl ov16_02263AE4 - mov r1, #1 - tst r0, r1 - beq _022539DE -_022539DA: - str r7, [sp, #0xc] - b _022539F0 -_022539DE: - ldr r0, _02253C20 ; =0x0000217E - ldrb r0, [r4, r0] - add r1, r0, #1 - ldr r0, _02253C20 ; =0x0000217E - strb r1, [r4, r0] - ldrb r1, [r4, r0] - ldr r0, [sp, #8] - cmp r1, r0 - blt _0225399E -_022539F0: - ldr r1, _02253C20 ; =0x0000217E - ldr r0, [sp, #8] - ldrb r2, [r4, r1] - cmp r2, r0 - bne _022539FC - b _02253C8C -_022539FC: - add r0, r2, #1 - strb r0, [r4, r1] - b _02253C8C -_02253A02: - cmp r0, #8 - bne _02253A52 - add r0, r6, #0 - bl ov16_0223DF1C - add r2, r0, #0 - ldr r0, _02253C20 ; =0x0000217E - mov r1, #0 - strb r1, [r4, r0] - ldrb r3, [r4, r0] - cmp r3, r2 - bge _02253A44 - ldr r7, _02253C28 ; =0x00002D8C -_02253A1C: - ldr r1, _02253C24 ; =0x000021EC - add r6, r4, r3 - ldrb r1, [r6, r1] - mov r6, #0xc0 - mul r6, r1 - add r6, r4, r6 - ldr r6, [r6, r7] - cmp r6, #0 - beq _02253A36 - cmp r1, r5 - beq _02253A36 - str r1, [sp, #0xc] - b _02253A44 -_02253A36: - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldr r1, _02253C20 ; =0x0000217E - ldrb r3, [r4, r1] - cmp r3, r2 - blt _02253A1C -_02253A44: - cmp r3, r2 - beq _02253B30 - ldr r0, _02253C20 ; =0x0000217E - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _02253C8C -_02253A52: - mov r1, #2 - lsl r1, r1, #8 - cmp r0, r1 - bne _02253AA0 - ldr r1, [sp, #0x30] - cmp r1, #1 - bne _02253AA0 - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02253A9C - add r0, r6, #0 - bl ov16_0223F4BC - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - bne _02253A9C - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223E258 - mov r1, #0xc0 - mul r1, r0 - str r0, [sp, #0xc] - ldr r0, _02253C28 ; =0x00002D8C - add r1, r4, r1 - ldr r0, [r1, r0] - cmp r0, #0 - bne _02253B30 - str r5, [sp, #0xc] - b _02253C8C -_02253A9C: - str r5, [sp, #0xc] - b _02253C8C -_02253AA0: - mov r1, #1 - lsl r1, r1, #0xa - cmp r0, r1 - bne _02253ABC - ldr r1, [sp, #0x30] - cmp r1, #1 - bne _02253ABC - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov16_02257028 - str r0, [sp, #0xc] - b _02253C8C -_02253ABC: - cmp r0, #0x80 - bne _02253ACE - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov16_02257028 - str r0, [sp, #0xc] - b _02253C8C -_02253ACE: - cmp r0, #0x10 - beq _02253ADE - cmp r0, #0x20 - beq _02253ADE - cmp r0, #1 - beq _02253ADE - cmp r0, #0x40 - bne _02253AE2 -_02253ADE: - str r5, [sp, #0xc] - b _02253C8C -_02253AE2: - mov r1, #1 - lsl r1, r1, #8 - cmp r0, r1 - bne _02253B06 - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02253B02 - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223E258 - str r0, [sp, #0xc] - b _02253C8C -_02253B02: - str r5, [sp, #0xc] - b _02253C8C -_02253B06: - lsl r1, r1, #1 - cmp r0, r1 - bne _02253B3A - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02253B36 - lsl r0, r5, #4 - add r1, r4, r0 - ldr r0, _02253C2C ; =0x000021AC - ldr r0, [r1, r0] - mov r1, #0xc0 - mul r1, r0 - str r0, [sp, #0xc] - ldr r0, _02253C28 ; =0x00002D8C - add r1, r4, r1 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253B32 -_02253B30: - b _02253C8C -_02253B32: - str r5, [sp, #0xc] - b _02253C8C -_02253B36: - str r5, [sp, #0xc] - b _02253C8C -_02253B3A: - cmp r0, #2 - beq _02253B44 - ldr r0, [sp, #0x30] - cmp r0, #1 - bne _02253C06 -_02253B44: - add r0, r6, #0 - bl ov16_0223DF0C - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223E208 - add r7, r0, #0 - mov r1, #1 - eor r7, r1 - add r0, r6, #0 - add r1, r5, #0 - mov r2, #0 - bl ov16_0223E2A4 - str r0, [sp, #0x14] - add r0, r6, #0 - add r1, r5, #0 - mov r2, #2 - bl ov16_0223E2A4 - str r0, [sp, #0x18] - ldr r0, [sp, #0x10] - mov r1, #2 - tst r0, r1 - beq _02253BEE - mov r0, #0x71 - lsl r0, r0, #2 - add r1, r4, r0 - lsl r0, r7, #3 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _02253BA0 - lsl r0, r0, #9 - lsr r0, r0, #0x1e - mov r1, #0xc0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02253C28 ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _02253BA0 - str r0, [sp, #0xc] - b _02253C8C -_02253BA0: - ldr r0, [sp, #0x14] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - add r0, r4, r2 - ldr r2, _02253C28 ; =0x00002D8C - ldr r0, [r0, r2] - cmp r0, #0 - beq _02253BD0 - ldr r3, [sp, #0x18] - mul r1, r3 - add r1, r4, r1 - ldr r1, [r1, r2] - cmp r1, #0 - beq _02253BD0 - add r0, r6, #0 - bl ov16_0223F4BC - lsl r0, r0, #0x1f - lsr r1, r0, #0x1d - add r0, sp, #0x14 - ldr r0, [r0, r1] - str r0, [sp, #0xc] - b _02253C8C -_02253BD0: - cmp r0, #0 - beq _02253BDA - ldr r0, [sp, #0x14] - str r0, [sp, #0xc] - b _02253C8C -_02253BDA: - ldr r2, [sp, #0x18] - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _02253C28 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253C8C - str r2, [sp, #0xc] - b _02253C8C -_02253BEE: - mov r0, #1 - add r2, r5, #0 - eor r2, r0 - mov r0, #0xc0 - mul r0, r2 - add r1, r4, r0 - ldr r0, _02253C28 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253C8C - str r2, [sp, #0xc] - b _02253C8C -_02253C06: - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0223E208 - mov r1, #1 - eor r0, r1 - str r0, [sp, #4] - lsl r0, r5, #4 - add r1, r4, r0 - ldr r0, _02253C2C ; =0x000021AC - b _02253C30 - ; .align 2, 0 -_02253C1C: .word 0x000003E6 -_02253C20: .word 0x0000217E -_02253C24: .word 0x000021EC -_02253C28: .word 0x00002D8C -_02253C2C: .word 0x000021AC -_02253C30: - ldr r7, [r1, r0] - add r0, r6, #0 - bl ov16_0223DF1C - mov r0, #0x71 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, [sp, #4] - lsl r0, r0, #3 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _02253C60 - lsl r0, r0, #9 - lsr r0, r0, #0x1e - mov r1, #0xc0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02253C94 ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _02253C60 - str r0, [sp, #0xc] - b _02253C8C -_02253C60: - mov r0, #0xc0 - mul r0, r7 - add r1, r4, r0 - ldr r0, _02253C94 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253C72 - str r7, [sp, #0xc] - b _02253C8C -_02253C72: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov16_02257028 - mov r1, #0xc0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02253C94 ; =0x00002D8C - ldr r1, [r2, r1] - cmp r1, #0 - beq _02253C8C - str r0, [sp, #0xc] -_02253C8C: - ldr r0, [sp, #0xc] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02253C94: .word 0x00002D8C - thumb_func_end ov16_02253954 - - thumb_func_start ov16_02253C98 -ov16_02253C98: ; 0x02253C98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x6c] - add r7, r2, #0 - add r6, r3, #0 - cmp r0, #0xff - beq _02253CF2 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x60 - beq _02253CF2 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x68 - beq _02253CF2 - ldr r0, [sp, #4] - add r1, r7, #0 - bl ov16_0223E208 - add r2, r0, #0 - mov r1, #1 - mov r0, #0x71 - eor r2, r1 - lsl r0, r0, #2 - add r1, r5, r0 - lsl r0, r2, #3 - ldr r0, [r1, r0] - lsl r1, r0, #0xb - lsr r1, r1, #0x1f - beq _02253CF4 - lsl r0, r0, #9 - lsr r1, r0, #0x1e - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02253E28 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253CF4 -_02253CF2: - b _02253E24 -_02253CF4: - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov16_0225B910 - str r0, [sp, #0xc] - cmp r0, #0 - bne _02253D10 - lsl r0, r6, #4 - add r1, r5, r0 - ldr r0, _02253E2C ; =0x000003E2 - ldrb r0, [r1, r0] - str r0, [sp, #0xc] -_02253D10: - ldr r0, [sp, #4] - bl ov16_0223DF1C - str r0, [sp, #8] - ldr r0, [sp, #0xc] - cmp r0, #0xd - bne _02253DA0 - lsl r0, r6, #4 - add r1, r5, r0 - ldr r0, _02253E30 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #0 - beq _02253D2E - cmp r0, #2 - bne _02253DA0 -_02253D2E: - ldr r0, _02253E34 ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #0x20 - tst r0, r1 - bne _02253DA0 - mov r0, #0x1f - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #9 - add r3, r7, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02253DA0 - ldr r0, [sp, #8] - mov r6, #0 - cmp r0, #0 - ble _02253D80 -_02253D54: - ldr r0, _02253E38 ; =0x000021EC - add r1, r5, r6 - ldrb r4, [r1, r0] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x1f - bne _02253D78 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02253E28 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253D78 - cmp r7, r4 - bne _02253D80 -_02253D78: - ldr r0, [sp, #8] - add r6, r6, #1 - cmp r6, r0 - blt _02253D54 -_02253D80: - ldr r0, [r5, #0x6c] - cmp r4, r0 - beq _02253E24 - mov r0, #0xb5 - lsl r0, r0, #2 - add r3, r5, r0 - mov r0, #0x1c - add r2, r4, #0 - mul r2, r0 - ldr r1, [r3, r2] - mov r0, #2 - orr r0, r1 - str r0, [r3, r2] - add sp, #0x10 - str r4, [r5, #0x6c] - pop {r3, r4, r5, r6, r7, pc} -_02253DA0: - ldr r0, [sp, #0xc] - cmp r0, #0xb - bne _02253E24 - lsl r0, r6, #4 - add r1, r5, r0 - ldr r0, _02253E30 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #0 - beq _02253DB6 - cmp r0, #2 - bne _02253E24 -_02253DB6: - ldr r0, _02253E34 ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #0x20 - tst r0, r1 - bne _02253E24 - mov r0, #0x72 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #9 - add r3, r7, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02253E24 - ldr r0, [sp, #8] - mov r6, #0 - cmp r0, #0 - ble _02253E08 -_02253DDC: - ldr r0, _02253E38 ; =0x000021EC - add r1, r5, r6 - ldrb r4, [r1, r0] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x72 - bne _02253E00 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02253E28 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02253E00 - cmp r7, r4 - bne _02253E08 -_02253E00: - ldr r0, [sp, #8] - add r6, r6, #1 - cmp r6, r0 - blt _02253DDC -_02253E08: - ldr r0, [r5, #0x6c] - cmp r4, r0 - beq _02253E24 - mov r0, #0xb5 - lsl r0, r0, #2 - add r3, r5, r0 - mov r0, #0x1c - add r2, r4, #0 - mul r2, r0 - ldr r1, [r3, r2] - mov r0, #4 - orr r0, r1 - str r0, [r3, r2] - str r4, [r5, #0x6c] -_02253E24: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02253E28: .word 0x00002D8C -_02253E2C: .word 0x000003E2 -_02253E30: .word 0x000003E6 -_02253E34: .word 0x0000213C -_02253E38: .word 0x000021EC - thumb_func_end ov16_02253C98 - - thumb_func_start ov16_02253E3C -ov16_02253E3C: ; 0x02253E3C - push {r3, r4, r5, lr} - ldr r0, _02253EB8 ; =0x0000216C - add r4, r1, #0 - ldr r1, [r4, r0] - ldr r0, _02253EBC ; =0x801FDA49 - mov r2, #0 - tst r0, r1 - bne _02253E7A - mov r0, #0xb5 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r3, [r4, #0x6c] - mov r0, #0x1c - mul r0, r3 - ldr r3, [r1, r0] - lsl r5, r3, #0x1e - lsr r5, r5, #0x1f - beq _02253E7A - mov r2, #2 - bic r3, r2 - str r3, [r1, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xb4 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r2, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_02253E7A: - ldr r0, _02253EB8 ; =0x0000216C - ldr r1, [r4, r0] - ldr r0, _02253EBC ; =0x801FDA49 - tst r0, r1 - bne _02253EB2 - mov r0, #0xb5 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r3, [r4, #0x6c] - mov r0, #0x1c - mul r0, r3 - ldr r3, [r1, r0] - lsl r5, r3, #0x1d - lsr r5, r5, #0x1f - beq _02253EB2 - mov r2, #4 - bic r3, r2 - str r3, [r1, r0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xb4 - bl ov16_02251E1C - ldr r0, [r4, #8] - mov r2, #1 - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_02253EB2: - add r0, r2, #0 - pop {r3, r4, r5, pc} - nop -_02253EB8: .word 0x0000216C -_02253EBC: .word 0x801FDA49 - thumb_func_end ov16_02253E3C - - thumb_func_start ov16_02253EC0 -ov16_02253EC0: ; 0x02253EC0 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r4, r2, #0 - mov r0, #0xc0 - add r5, r1, #0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _02253EEC ; =0x00002DB8 - ldrh r0, [r1, r0] - cmp r0, #0 - bne _02253EE0 - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov16_0225B830 -_02253EE0: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_022662FC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02253EEC: .word 0x00002DB8 - thumb_func_end ov16_02253EC0 - - thumb_func_start ov16_02253EF0 -ov16_02253EF0: ; 0x02253EF0 - push {r4, r5} - ldr r0, _02253F18 ; =0x00002DB0 - add r4, r2, #0 - add r5, r1, r0 - mov r0, #0xc0 - mul r4, r0 - mov r0, #1 - ldr r3, [r5, r4] - lsl r0, r0, #0xc - orr r0, r3 - str r0, [r5, r4] - ldr r0, _02253F1C ; =0x00003044 - lsl r2, r2, #2 - ldr r3, [r1, r0] - add r1, r1, r2 - add r0, #8 - str r3, [r1, r0] - pop {r4, r5} - bx lr - nop -_02253F18: .word 0x00002DB0 -_02253F1C: .word 0x00003044 - thumb_func_end ov16_02253EF0 - - thumb_func_start ov16_02253F20 -ov16_02253F20: ; 0x02253F20 - push {r4, r5} - ldr r4, _02253F64 ; =0x00002DB0 - add r3, r2, #0 - mov r0, #0xc0 - mul r3, r0 - add r0, r1, r4 - ldr r5, [r0, r3] - ldr r2, _02253F68 ; =0xFFFFEFFF - and r2, r5 - str r2, [r0, r3] - ldr r5, [r0, r3] - ldr r2, _02253F6C ; =0xFFFFFCFF - and r2, r5 - str r2, [r0, r3] - add r0, r4, #0 - add r0, #0x10 - add r5, r1, r0 - ldr r2, [r5, r3] - ldr r0, _02253F70 ; =0xDFFBFF3F - add r4, #0x18 - and r0, r2 - str r0, [r5, r3] - add r2, r1, r4 - ldr r1, [r2, r3] - ldr r0, _02253F74 ; =0xFFFC7FFF - and r0, r1 - str r0, [r2, r3] - ldr r1, [r2, r3] - ldr r0, _02253F78 ; =0xFFE3FFFF - and r0, r1 - str r0, [r2, r3] - pop {r4, r5} - bx lr - nop -_02253F64: .word 0x00002DB0 -_02253F68: .word 0xFFFFEFFF -_02253F6C: .word 0xFFFFFCFF -_02253F70: .word 0xDFFBFF3F -_02253F74: .word 0xFFFC7FFF -_02253F78: .word 0xFFE3FFFF - thumb_func_end ov16_02253F20 - - thumb_func_start ov16_02253F7C -ov16_02253F7C: ; 0x02253F7C - mov r2, #0xc0 - mul r2, r1 - add r1, r0, r2 - ldr r0, _02253FC8 ; =0x00002DAC - ldr r0, [r1, r0] - mov r1, #7 - tst r1, r0 - beq _02253F90 - mov r0, #1 - bx lr -_02253F90: - mov r1, #8 - tst r1, r0 - beq _02253F9A - mov r0, #2 - bx lr -_02253F9A: - mov r1, #0x10 - tst r1, r0 - beq _02253FA4 - mov r0, #3 - bx lr -_02253FA4: - mov r1, #0x20 - tst r1, r0 - beq _02253FAE - mov r0, #4 - bx lr -_02253FAE: - mov r1, #0x40 - tst r1, r0 - beq _02253FB8 - mov r0, #5 - bx lr -_02253FB8: - mov r1, #0x80 - tst r0, r1 - beq _02253FC2 - mov r0, #2 - bx lr -_02253FC2: - mov r0, #0 - bx lr - nop -_02253FC8: .word 0x00002DAC - thumb_func_end ov16_02253F7C - - thumb_func_start ov16_02253FCC -ov16_02253FCC: ; 0x02253FCC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - add r7, r1, #0 - bl ov16_0223DF0C - mov r1, #0x84 - tst r1, r0 - beq _02253FE4 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02253FE4: - mov r1, #1 - add r2, r0, #0 - tst r2, r1 - bne _02253FF2 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02253FF2: - mov r2, #2 - tst r0, r2 - beq _02253FFE - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02253FFE: - ldr r0, [sp] - bl ov16_0223E0D8 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #4] -_0225400A: - ldr r0, [sp, #4] - cmp r0, #4 - bls _02254012 - b _022541A8 -_02254012: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225401E: ; jump table - .short _02254028 - _0225401E - 2 ; case 0 - .short _0225406C - _0225401E - 2 ; case 1 - .short _022540B4 - _0225401E - 2 ; case 2 - .short _02254128 - _0225401E - 2 ; case 3 - .short _022541A8 - _0225401E - 2 ; case 4 -_02254028: - ldr r0, _022541B8 ; =0x00002E7C - ldrb r0, [r7, r0] - cmp r0, #1 - bne _02254064 - mov r0, #0x85 - lsl r0, r0, #6 - ldr r1, [r7, r0] - mov r0, #0x20 - tst r0, r1 - bne _02254064 - ldr r0, [sp, #8] - mov r1, #0xd - mov r2, #5 - bl sub_02079280 - cmp r0, #0 - beq _02254064 - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r7, r1] - mov r0, #0x20 - orr r0, r2 - str r0, [r7, r1] - mov r0, #0x13 - mov r1, #0xd - lsl r0, r0, #4 - str r1, [r7, r0] - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02254064: - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - b _022541A8 -_0225406C: - ldr r1, _022541BC ; =0x00002E7D - mov r0, #2 - ldrb r2, [r7, r1] - tst r0, r2 - bne _022540AC - add r0, r1, #0 - sub r0, #0x31 - sub r1, #0x2d - ldr r2, [r7, r0] - ldr r0, [r7, r1] - lsr r0, r0, #1 - cmp r2, r0 - bhi _022540AC - ldr r0, [sp, #8] - mov r1, #0xe - mov r2, #5 - bl sub_02079280 - cmp r0, #0 - beq _022540AC - ldr r1, _022541BC ; =0x00002E7D - mov r0, #2 - ldrb r2, [r7, r1] - add sp, #0xc - orr r0, r2 - strb r0, [r7, r1] - mov r0, #0x13 - mov r1, #0xe - lsl r0, r0, #4 - str r1, [r7, r0] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022540AC: - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - b _022541A8 -_022540B4: - ldr r0, _022541BC ; =0x00002E7D - ldrb r1, [r7, r0] - mov r0, #3 - tst r0, r1 - bne _02254120 - ldr r0, [sp] - mov r1, #1 - bl ov16_0223DF20 - mov r6, #0 - add r5, r0, #0 - add r4, r6, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _022540F6 -_022540D4: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _022540EA - add r6, r6, #1 -_022540EA: - add r0, r5, #0 - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _022540D4 -_022540F6: - cmp r6, #1 - bne _02254120 - ldr r0, [sp, #8] - mov r1, #0xf - mov r2, #5 - bl sub_02079280 - cmp r0, #0 - beq _02254120 - ldr r1, _022541BC ; =0x00002E7D - mov r0, #3 - ldrb r2, [r7, r1] - add sp, #0xc - orr r0, r2 - strb r0, [r7, r1] - mov r0, #0x13 - mov r1, #0xf - lsl r0, r0, #4 - str r1, [r7, r0] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02254120: - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - b _022541A8 -_02254128: - ldr r0, _022541BC ; =0x00002E7D - ldrb r1, [r7, r0] - mov r0, #4 - tst r0, r1 - bne _022541A2 - ldr r0, [sp] - mov r1, #1 - bl ov16_0223DF20 - mov r6, #0 - add r5, r0, #0 - add r4, r6, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0225416A -_02254148: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0225415E - add r6, r6, #1 -_0225415E: - add r0, r5, #0 - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _02254148 -_0225416A: - cmp r6, #1 - bne _022541A2 - ldr r0, _022541C0 ; =0x00002E4C - ldr r1, [r7, r0] - add r0, r0, #4 - ldr r0, [r7, r0] - lsr r0, r0, #1 - cmp r1, r0 - bhi _022541A2 - ldr r0, [sp, #8] - mov r1, #0x10 - mov r2, #5 - bl sub_02079280 - cmp r0, #0 - beq _022541A2 - ldr r1, _022541BC ; =0x00002E7D - mov r0, #4 - ldrb r2, [r7, r1] - add sp, #0xc - orr r0, r2 - strb r0, [r7, r1] - mov r0, #0x13 - mov r1, #0x10 - lsl r0, r0, #4 - str r1, [r7, r0] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022541A2: - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_022541A8: - ldr r0, [sp, #4] - cmp r0, #4 - beq _022541B0 - b _0225400A -_022541B0: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022541B8: .word 0x00002E7C -_022541BC: .word 0x00002E7D -_022541C0: .word 0x00002E4C - thumb_func_end ov16_02253FCC - - thumb_func_start ov16_022541C4 -ov16_022541C4: ; 0x022541C4 - push {r3, r4, r5, r6, r7, lr} - ldr r1, _022542A4 ; =0x00002144 - add r5, r0, #0 - mov r4, #0 - add r0, r1, #0 - str r4, [r5, r1] - mov r2, #1 - add r0, #0xc - str r2, [r5, r0] - add r0, r1, #0 - add r0, #8 - str r4, [r5, r0] - add r0, r1, #0 - add r0, #0x10 - str r4, [r5, r0] - add r0, r1, #0 - mov r2, #0xa - add r0, #0x14 - str r2, [r5, r0] - add r0, r1, #0 - add r0, #0x1c - str r4, [r5, r0] - add r0, r1, #0 - add r0, #0x20 - str r4, [r5, r0] - add r0, r1, #0 - add r0, #0x28 - str r4, [r5, r0] - mov r0, #0xff - add r2, r1, #0 - str r0, [r5, #0x74] - add r2, #0x2c - str r4, [r5, r2] - add r2, r1, #0 - add r2, #0x30 - str r4, [r5, r2] - add r2, r1, #0 - add r2, #0x34 - str r4, [r5, r2] - add r2, r5, #0 - add r2, #0x88 - str r4, [r2, #0] - add r2, r5, #0 - add r2, #0x8c - str r4, [r2, #0] - add r2, r5, #0 - add r2, #0x94 - str r0, [r2, #0] - add r0, r1, #0 - add r0, #0x38 - strb r4, [r5, r0] - add r0, r1, #0 - add r0, #0x39 - strb r4, [r5, r0] - add r0, r1, #0 - add r0, #0x3a - strb r4, [r5, r0] - add r0, r1, #0 - add r0, #0x3c - str r4, [r5, r0] - add r0, r1, #0 - str r4, [r5, #0x38] - add r0, #0x40 - str r4, [r5, r0] - add r0, r1, #0 - add r0, #0x44 - str r4, [r5, r0] - str r4, [r5, #0x10] - str r4, [r5, #0x18] - str r4, [r5, #0x20] - str r4, [r5, #0x28] - str r4, [r5, #0x30] - str r4, [r5, #0x3c] - str r4, [r5, #0x40] - str r4, [r5, #0x48] - str r4, [r5, #0x4c] - str r4, [r5, #0x50] - add r0, r1, #0 - str r4, [r5, #0x54] - sub r0, #8 - ldr r2, [r5, r0] - ldr r0, _022542A8 ; =0xFF800000 - mov r7, #6 - and r2, r0 - add r0, r1, #0 - sub r0, #8 - str r2, [r5, r0] - sub r0, r1, #4 - ldr r2, [r5, r0] - ldr r0, _022542AC ; =0xFFFFFEA1 - and r2, r0 - sub r0, r1, #4 - str r2, [r5, r0] - ldr r0, _022542B0 ; =0x00003120 - strb r4, [r5, r0] - mov r0, #0xb5 - lsl r0, r0, #2 - add r6, r5, r0 -_02254288: - mov r0, #0 - add r1, r6, #0 - mov r2, #0x1c - bl sub_020C4BB8 - add r1, r5, r4 - ldr r0, _022542B4 ; =0x000021A4 - add r4, r4, #1 - add r6, #0x1c - strb r7, [r1, r0] - cmp r4, #4 - blt _02254288 - pop {r3, r4, r5, r6, r7, pc} - nop -_022542A4: .word 0x00002144 -_022542A8: .word 0xFF800000 -_022542AC: .word 0xFFFFFEA1 -_022542B0: .word 0x00003120 -_022542B4: .word 0x000021A4 - thumb_func_end ov16_022541C4 - - thumb_func_start ov16_022542B8 -ov16_022542B8: ; 0x022542B8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - mov r4, #0 - add r5, r6, #0 -_022542C2: - ldr r0, _02254324 ; =0x0000306C - mov r1, #0xff - strh r1, [r5, r0] - ldr r0, _02254328 ; =0x000021A0 - add r2, r6, r4 - mov r1, #6 - strb r1, [r2, r0] - add r0, r7, #0 - bl ov16_0223F4BC - ldr r1, _0225432C ; =0x0000310C - add r4, r4, #1 - strh r0, [r5, r1] - add r5, r5, #2 - cmp r4, #4 - blt _022542C2 - ldr r0, _02254330 ; =0x00002168 - mov r1, #1 - str r1, [r6, r0] - mov r0, #0x5d - lsl r0, r0, #2 - str r1, [r6, r0] - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02254316 - add r0, r1, #0 - bl sub_020787CC - ldr r1, _02254334 ; =0x00003108 - ldrb r2, [r6, r1] - orr r0, r2 - strb r0, [r6, r1] - mov r0, #3 - bl sub_020787CC - ldr r1, _02254334 ; =0x00003108 - ldrb r2, [r6, r1] - orr r0, r2 - strb r0, [r6, r1] -_02254316: - ldr r0, _02254338 ; =0x0000311C - mov r1, #6 - strb r1, [r6, r0] - add r0, r0, #1 - strb r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_02254324: .word 0x0000306C -_02254328: .word 0x000021A0 -_0225432C: .word 0x0000310C -_02254330: .word 0x00002168 -_02254334: .word 0x00003108 -_02254338: .word 0x0000311C - thumb_func_end ov16_022542B8 - - thumb_func_start ov16_0225433C -ov16_0225433C: ; 0x0225433C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - str r1, [sp, #4] - str r0, [sp] - ldr r1, _02254680 ; =0x00002DC8 - ldr r0, [sp, #4] - add r4, r2, #0 - add r1, r0, r1 - mov r0, #0xc0 - mul r0, r4 - add r5, r1, r0 - str r5, [sp, #0x14] - add r3, sp, #0x20 - mov r2, #7 -_02254358: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02254358 - ldr r0, [sp] - bl ov16_0223DF1C - add r6, r0, #0 - ldr r0, [sp] - bl ov16_0223DF0C - ldr r1, [sp, #4] - lsl r2, r4, #4 - add r1, r1, r2 - ldr r2, _02254684 ; =0x000021A8 - mov r0, #0x27 - str r0, [r1, r2] - ldr r1, [sp, #4] - sub r2, #0x6c - ldr r1, [r1, r2] - add r0, #0xd9 - tst r0, r1 - bne _02254416 - mov r5, #0 - cmp r6, #0 - ble _022543F2 - ldr r1, [sp, #4] - ldr r2, _02254688 ; =0x00002DCC - add r0, r1, #0 - add r2, r0, r2 - mov r0, #0x18 - mov ip, r0 - mov r7, #3 -_0225439A: - ldr r0, _0225468C ; =0x00002DB0 - ldr r3, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x1a - tst r0, r3 - beq _022543BC - ldr r0, [r2, #0] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1e - cmp r4, r0 - bne _022543BC - ldr r0, _0225468C ; =0x00002DB0 - ldr r3, [r1, r0] - ldr r0, _02254690 ; =0xFBFFFFFF - and r3, r0 - ldr r0, _0225468C ; =0x00002DB0 - str r3, [r1, r0] -_022543BC: - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r3, [r1, r0] - mov r0, #0x18 - tst r0, r3 - beq _022543E8 - ldr r0, [r2, #0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1e - cmp r4, r0 - bne _022543E8 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r0, [r1, r0] - mov r3, ip - bic r0, r3 - mov r3, #0xb7 - lsl r3, r3, #6 - str r0, [r1, r3] - ldr r0, [r2, #0] - bic r0, r7 - str r0, [r2, #0] -_022543E8: - add r5, r5, #1 - add r1, #0xc0 - add r2, #0xc0 - cmp r5, r6 - blt _0225439A -_022543F2: - mov r0, #0xc0 - mul r0, r4 - str r0, [sp, #0xc] - ldr r2, [sp, #4] - ldr r1, [sp, #0xc] - mov r0, #0 - add r1, r2, r1 - ldr r2, _0225468C ; =0x00002DB0 - str r0, [r1, r2] - ldr r1, [sp, #4] - add r2, #0x10 - add r2, r1, r2 - ldr r1, [sp, #0xc] - add r1, r2, r1 - str r1, [sp, #0x10] - ldr r1, [sp, #0xc] - str r0, [r2, r1] - b _0225448E -_02254416: - mov r0, #0xc0 - mul r0, r4 - str r0, [sp, #0xc] - ldr r1, _0225468C ; =0x00002DB0 - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - add r0, r0, r1 - ldr r3, [r0, r2] - ldr r2, _02254694 ; =0x15100007 - and r3, r2 - ldr r2, [sp, #0xc] - str r3, [r0, r2] - add r2, r1, #0 - ldr r0, [sp, #4] - add r2, #0x10 - add r0, r0, r2 - ldr r2, [sp, #0xc] - add r2, r0, r2 - str r2, [sp, #0x10] - ldr r2, [sp, #0xc] - ldr r3, [r0, r2] - ldr r2, _02254698 ; =0x0FA3843F - and r3, r2 - ldr r2, [sp, #0xc] - str r3, [r0, r2] - mov r2, #0 - cmp r6, #0 - ble _0225448E - ldr r0, [sp, #4] - add r1, #0x1c - add r3, r0, #0 - add r1, r3, r1 - mov r7, #0x18 -_02254458: - mov r3, #0xb7 - lsl r3, r3, #6 - ldr r5, [r0, r3] - mov r3, #0x18 - tst r3, r5 - beq _02254484 - ldr r3, [r1, #0] - lsl r3, r3, #0x1e - lsr r3, r3, #0x1e - cmp r4, r3 - bne _02254484 - mov r3, #0xb7 - lsl r3, r3, #6 - ldr r5, [r0, r3] - bic r5, r7 - str r5, [r0, r3] - ldr r5, [r0, r3] - mov r3, #0x10 - orr r5, r3 - mov r3, #0xb7 - lsl r3, r3, #6 - str r5, [r0, r3] -_02254484: - add r2, r2, #1 - add r0, #0xc0 - add r1, #0xc0 - cmp r2, r6 - blt _02254458 -_0225448E: - mov r0, #0 - str r0, [sp, #8] - cmp r6, #0 - ble _022544F6 - ldr r5, [sp, #4] - ldr r1, _02254688 ; =0x00002DCC - add r0, r5, #0 - add r7, r0, r1 -_0225449E: - add r0, r4, #0 - bl sub_020787CC - ldr r1, _0225468C ; =0x00002DB0 - lsl r0, r0, #0x10 - ldr r1, [r5, r1] - tst r0, r1 - beq _022544C6 - add r0, r4, #0 - bl sub_020787CC - ldr r1, _0225468C ; =0x00002DB0 - lsl r2, r0, #0x10 - mov r0, #0 - mvn r0, r0 - ldr r1, [r5, r1] - eor r0, r2 - and r1, r0 - ldr r0, _0225468C ; =0x00002DB0 - str r1, [r5, r0] -_022544C6: - ldr r0, _0225468C ; =0x00002DB0 - ldr r1, [r5, r0] - mov r0, #0xe - lsl r0, r0, #0xc - tst r0, r1 - beq _022544E8 - ldr r0, [r7, #0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1e - cmp r4, r0 - bne _022544E8 - ldr r0, _0225468C ; =0x00002DB0 - ldr r1, [r5, r0] - ldr r0, _0225469C ; =0xFFFF1FFF - and r1, r0 - ldr r0, _0225468C ; =0x00002DB0 - str r1, [r5, r0] -_022544E8: - ldr r0, [sp, #8] - add r5, #0xc0 - add r0, r0, #1 - add r7, #0xc0 - str r0, [sp, #8] - cmp r0, r6 - blt _0225449E -_022544F6: - mov r2, #0 - add r1, r2, #0 -_022544FA: - ldr r0, [sp, #0x14] - strb r1, [r0, r2] - add r2, r2, #1 - cmp r2, #0x38 - blo _022544FA - ldr r1, _022546A0 ; =0x0000213C - ldr r0, [sp, #4] - ldr r1, [r0, r1] - mov r0, #1 - lsl r0, r0, #8 - tst r0, r1 - beq _022545AE - ldr r1, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x38] - add r0, r1, r0 - ldr r1, _022546A4 ; =0x00002DE0 - str r2, [r0, r1] - ldr r0, [sp, #4] - sub r1, #0x14 - add r0, r0, r1 - ldr r1, [sp, #0xc] - mov r2, #3 - ldr r1, [r0, r1] - bic r1, r2 - ldr r2, [sp, #0x24] - lsl r2, r2, #0x1e - lsr r3, r2, #0x1e - mov r2, #3 - and r2, r3 - orr r2, r1 - ldr r1, [sp, #0xc] - str r2, [r0, r1] - ldr r3, [sp, #0x20] - ldr r1, [sp, #0x14] - lsl r3, r3, #0x11 - lsr r3, r3, #0x1e - lsl r3, r3, #0x1e - ldr r1, [r1, #0] - ldr r2, _022546A8 ; =0xFFFF9FFF - lsr r3, r3, #0x11 - and r1, r2 - orr r3, r1 - ldr r1, [sp, #0x14] - str r3, [r1, #0] - ldr r1, [sp, #0xc] - ldr r3, [r0, r1] - asr r1, r2, #5 - ldr r2, [sp, #0x24] - and r1, r3 - lsl r2, r2, #0x16 - lsr r2, r2, #0x1e - lsl r2, r2, #0x1e - lsr r2, r2, #0x16 - orr r2, r1 - ldr r1, [sp, #0xc] - str r2, [r0, r1] - ldr r2, [r0, r1] - ldr r1, _0225469C ; =0xFFFF1FFF - and r1, r2 - ldr r2, [sp, #0x24] - lsl r2, r2, #0x10 - lsr r2, r2, #0x1d - lsl r2, r2, #0x1d - lsr r2, r2, #0x10 - orr r2, r1 - ldr r1, [sp, #0xc] - str r2, [r0, r1] - ldr r3, [sp, #0x24] - ldr r1, [r0, r1] - lsl r3, r3, #0xa - ldr r2, _022546AC ; =0xFFC7FFFF - lsr r3, r3, #0x1d - lsl r3, r3, #0x1d - and r1, r2 - lsr r3, r3, #0xa - orr r3, r1 - ldr r1, [sp, #0xc] - str r3, [r0, r1] - ldr r3, [r0, r1] - asr r1, r2, #3 - ldr r2, [sp, #0x24] - and r1, r3 - lsl r2, r2, #0xd - lsr r2, r2, #0x1d - lsl r2, r2, #0x1d - lsr r2, r2, #0xd - orr r2, r1 - ldr r1, [sp, #0xc] - str r2, [r0, r1] -_022545AE: - mov r0, #0xc0 - add r3, r0, #0 - ldr r2, [sp, #4] - add r3, #0x90 - ldr r2, [r2, r3] - add r1, r4, #0 - ldr r3, [sp, #4] - mul r1, r0 - add r5, r0, #0 - add r1, r3, r1 - ldr r3, _022546B0 ; =0x00002DD4 - add r2, r2, #1 - str r2, [r1, r3] - ldr r2, [sp, #4] - add r5, #0x90 - ldr r2, [r2, r5] - add r0, #0x90 - add r5, r2, #1 - add r2, r3, #4 - str r5, [r1, r2] - ldr r1, [sp, #0x14] - lsl r7, r4, #1 - ldr r2, [r1, #0] - ldr r1, _022546B4 ; =0xBFFFFFFF - mov r3, #0 - and r1, r2 - ldr r2, [sp, #4] - mov r5, #0xff - ldr r0, [r2, r0] - add r0, r0, #1 - lsl r0, r0, #0x1f - lsr r0, r0, #1 - orr r1, r0 - ldr r0, [sp, #0x14] - str r1, [r0, #0] - add r0, r2, #0 - add r2, r0, r7 - ldr r0, _022546B8 ; =0x0000305C - add r1, r0, #0 - strh r3, [r2, r0] - add r1, #8 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x10 - strh r5, [r2, r1] - add r1, r0, #0 - add r1, #0x18 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x20 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x28 - strh r3, [r2, r1] - ldr r1, [sp, #4] - lsl r5, r4, #3 - add r1, r1, r5 - add r5, r0, #0 - add r5, #0x30 - strh r3, [r1, r5] - add r5, r0, #0 - add r5, #0x32 - strh r3, [r1, r5] - add r5, r0, #0 - add r5, #0x34 - strh r3, [r1, r5] - add r5, r0, #0 - add r5, #0x36 - strh r3, [r1, r5] - add r1, r0, #0 - add r1, #0x50 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x68 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x70 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x78 - strh r3, [r2, r1] - add r0, #0x80 - strh r3, [r2, r0] - add r0, r4, #0 - bl sub_020787CC - mov r1, #6 - lsl r3, r0, #8 - mov r0, #0 - mvn r0, r0 - ldr r2, [sp, #4] - lsl r1, r1, #6 - ldr r2, [r2, r1] - eor r0, r3 - and r2, r0 - ldr r0, [sp, #4] - str r2, [r0, r1] - ldr r0, [sp, #0x10] - ldr r1, [r0, #0] - mov r0, #2 - lsl r0, r0, #0x16 - tst r0, r1 - beq _022546D6 - ldr r0, _022546BC ; =0x00002D42 - b _022546C0 - ; .align 2, 0 -_02254680: .word 0x00002DC8 -_02254684: .word 0x000021A8 -_02254688: .word 0x00002DCC -_0225468C: .word 0x00002DB0 -_02254690: .word 0xFBFFFFFF -_02254694: .word 0x15100007 -_02254698: .word 0x0FA3843F -_0225469C: .word 0xFFFF1FFF -_022546A0: .word 0x0000213C -_022546A4: .word 0x00002DE0 -_022546A8: .word 0xFFFF9FFF -_022546AC: .word 0xFFC7FFFF -_022546B0: .word 0x00002DD4 -_022546B4: .word 0xBFFFFFFF -_022546B8: .word 0x0000305C -_022546BC: .word 0x00002D42 -_022546C0: - ldr r1, [sp, #4] - add r5, r1, r0 - ldr r1, [sp, #0xc] - ldrh r3, [r5, r1] - add r1, r0, #2 - ldr r0, [sp, #4] - add r2, r0, r1 - ldr r0, [sp, #0xc] - ldrh r1, [r2, r0] - strh r1, [r5, r0] - strh r3, [r2, r0] -_022546D6: - mov r5, #0 - cmp r6, #0 - ble _0225471A - ldr r0, [sp, #4] - str r0, [sp, #0x18] - add r7, r0, r7 -_022546E2: - cmp r5, r4 - beq _02254706 - ldr r0, [sp] - add r1, r5, #0 - bl ov16_0223E208 - str r0, [sp, #0x1c] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223E208 - ldr r1, [sp, #0x1c] - cmp r1, r0 - beq _02254706 - ldr r1, [sp, #0x18] - ldr r0, _0225473C ; =0x00003084 - mov r2, #0 - strh r2, [r1, r0] -_02254706: - ldr r0, _02254740 ; =0x0000308C - mov r1, #0 - strh r1, [r7, r0] - ldr r0, [sp, #0x18] - add r5, r5, #1 - add r0, r0, #2 - str r0, [sp, #0x18] - add r7, #8 - cmp r5, r6 - blt _022546E2 -_0225471A: - lsl r1, r4, #0x18 - ldr r0, [sp, #4] - lsr r1, r1, #0x18 - bl ov16_0225B80C - lsl r1, r4, #0x18 - ldr r0, [sp, #4] - lsr r1, r1, #0x18 - bl ov16_0225B824 - lsl r1, r4, #0x18 - ldr r0, [sp, #4] - lsr r1, r1, #0x18 - bl ov16_0225B830 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225473C: .word 0x00003084 -_02254740: .word 0x0000308C - thumb_func_end ov16_0225433C - - thumb_func_start ov16_02254744 -ov16_02254744: ; 0x02254744 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #4] - str r0, [sp] - add r5, r2, #0 - bl ov16_0223DF1C - str r0, [sp, #0xc] - mov r0, #0xc0 - mul r0, r5 - ldr r1, [sp, #4] - str r0, [sp, #8] - add r3, r1, r0 - ldr r0, _02254968 ; =0x00002D58 - mov r2, #0 - mov r1, #6 -_02254764: - add r2, r2, #1 - strb r1, [r3, r0] - add r3, r3, #1 - cmp r2, #8 - blt _02254764 - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - ldr r0, [sp, #4] - mov r7, #0 - add r2, r0, r1 - ldr r1, _0225496C ; =0x00002DB0 - add r0, r1, #0 - str r7, [r2, r1] - add r0, #0x10 - str r7, [r2, r0] - ldr r0, [sp, #0xc] - cmp r0, #0 - ble _0225480A - ldr r4, [sp, #4] - add r1, #0x1c - add r0, r4, #0 - add r6, r0, r1 -_02254792: - ldr r0, _0225496C ; =0x00002DB0 - ldr r1, [r4, r0] - mov r0, #1 - lsl r0, r0, #0x1a - tst r0, r1 - beq _022547B4 - ldr r0, [r6, #0] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1e - cmp r5, r0 - bne _022547B4 - ldr r0, _0225496C ; =0x00002DB0 - ldr r1, [r4, r0] - ldr r0, _02254970 ; =0xFBFFFFFF - and r1, r0 - ldr r0, _0225496C ; =0x00002DB0 - str r1, [r4, r0] -_022547B4: - add r0, r5, #0 - bl sub_020787CC - ldr r1, _0225496C ; =0x00002DB0 - lsl r0, r0, #0x10 - ldr r1, [r4, r1] - tst r0, r1 - beq _022547DC - add r0, r5, #0 - bl sub_020787CC - ldr r1, _0225496C ; =0x00002DB0 - lsl r2, r0, #0x10 - mov r0, #0 - mvn r0, r0 - ldr r1, [r4, r1] - eor r0, r2 - and r1, r0 - ldr r0, _0225496C ; =0x00002DB0 - str r1, [r4, r0] -_022547DC: - ldr r0, _0225496C ; =0x00002DB0 - ldr r1, [r4, r0] - mov r0, #0xe - lsl r0, r0, #0xc - tst r0, r1 - beq _022547FE - ldr r0, [r6, #0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1e - cmp r5, r0 - bne _022547FE - ldr r0, _0225496C ; =0x00002DB0 - ldr r1, [r4, r0] - ldr r0, _02254974 ; =0xFFFF1FFF - and r1, r0 - ldr r0, _0225496C ; =0x00002DB0 - str r1, [r4, r0] -_022547FE: - ldr r0, [sp, #0xc] - add r7, r7, #1 - add r4, #0xc0 - add r6, #0xc0 - cmp r7, r0 - blt _02254792 -_0225480A: - ldr r1, _02254978 ; =0x00002DC8 - ldr r0, [sp, #4] - add r1, r0, r1 - ldr r0, [sp, #8] - add r6, r1, r0 - mov r1, #0 - add r0, r1, #0 -_02254818: - strb r0, [r6, r1] - add r1, r1, #1 - cmp r1, #0x38 - blo _02254818 - mov r2, #0x75 - ldr r1, [sp, #4] - lsl r2, r2, #2 - add r2, r1, r2 - lsl r1, r5, #6 - add r1, r2, r1 - mov r4, #0 -_0225482E: - strb r4, [r1, r0] - add r0, r0, #1 - cmp r0, #0x40 - blo _0225482E - mov r2, #0xc0 - add r3, r2, #0 - ldr r0, [sp, #4] - add r3, #0x90 - ldr r0, [r0, r3] - add r1, r5, #0 - ldr r3, [sp, #4] - mul r1, r2 - add r3, r3, r1 - add r1, r2, #0 - ldr r7, _0225497C ; =0x00002DD4 - add r0, r0, #1 - str r0, [r3, r7] - ldr r0, [sp, #4] - add r1, #0x90 - ldr r0, [r0, r1] - add r1, r7, #4 - add r0, r0, #1 - str r0, [r3, r1] - ldr r1, [r6, #0] - ldr r0, _02254980 ; =0xBFFFFFFF - add r2, #0x90 - and r0, r1 - ldr r1, [sp, #4] - mov r3, #0xff - ldr r1, [r1, r2] - add r1, r1, #1 - lsl r1, r1, #0x1f - lsr r1, r1, #1 - orr r0, r1 - str r0, [r6, #0] - ldr r0, [sp, #4] - lsl r6, r5, #1 - add r2, r0, r6 - ldr r0, _02254984 ; =0x0000305C - add r1, r0, #0 - strh r4, [r2, r0] - add r1, #8 - strh r4, [r2, r1] - add r1, r0, #0 - add r1, #0x10 - strh r3, [r2, r1] - add r1, r0, #0 - add r1, #0x18 - strh r4, [r2, r1] - add r1, r0, #0 - add r1, #0x20 - strh r4, [r2, r1] - add r1, r0, #0 - add r1, #0x28 - strh r4, [r2, r1] - ldr r1, [sp, #4] - lsl r3, r5, #3 - add r1, r1, r3 - add r3, r0, #0 - add r3, #0x30 - strh r4, [r1, r3] - add r3, r0, #0 - add r3, #0x32 - strh r4, [r1, r3] - add r3, r0, #0 - add r3, #0x34 - strh r4, [r1, r3] - add r3, r0, #0 - add r3, #0x36 - strh r4, [r1, r3] - add r1, r0, #0 - add r1, #0x50 - strh r4, [r2, r1] - add r1, r0, #0 - add r1, #0x68 - strh r4, [r2, r1] - add r1, r0, #0 - add r1, #0x70 - strh r4, [r2, r1] - add r1, r0, #0 - add r1, #0x78 - strh r4, [r2, r1] - add r0, #0x80 - strh r4, [r2, r0] - add r0, r5, #0 - bl sub_020787CC - mov r1, #6 - lsl r3, r0, #8 - mov r0, #0 - mvn r0, r0 - ldr r2, [sp, #4] - lsl r1, r1, #6 - ldr r2, [r2, r1] - eor r0, r3 - and r2, r0 - ldr r0, [sp, #4] - mov r4, #0 - str r2, [r0, r1] - ldr r0, [sp, #0xc] - cmp r0, #0 - ble _02254934 - ldr r7, [sp, #4] - add r0, r7, #0 - add r6, r0, r6 -_02254900: - cmp r4, r5 - beq _02254922 - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223E208 - str r0, [sp, #0x10] - ldr r0, [sp] - add r1, r5, #0 - bl ov16_0223E208 - ldr r1, [sp, #0x10] - cmp r1, r0 - beq _02254922 - ldr r0, _02254988 ; =0x00003084 - mov r1, #0 - strh r1, [r7, r0] -_02254922: - ldr r0, _0225498C ; =0x0000308C - mov r1, #0 - strh r1, [r6, r0] - ldr r0, [sp, #0xc] - add r4, r4, #1 - add r7, r7, #2 - add r6, #8 - cmp r4, r0 - blt _02254900 -_02254934: - mov r1, #0x4f - ldr r0, [sp, #4] - lsl r1, r1, #2 - add r3, r0, r1 - lsl r2, r5, #2 - ldr r1, [r3, r2] - mov r0, #1 - bic r1, r0 - str r1, [r3, r2] - lsl r1, r5, #0x18 - ldr r0, [sp, #4] - lsr r1, r1, #0x18 - bl ov16_0225B80C - lsl r1, r5, #0x18 - ldr r0, [sp, #4] - lsr r1, r1, #0x18 - bl ov16_0225B824 - lsl r1, r5, #0x18 - ldr r0, [sp, #4] - lsr r1, r1, #0x18 - bl ov16_0225B830 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02254968: .word 0x00002D58 -_0225496C: .word 0x00002DB0 -_02254970: .word 0xFBFFFFFF -_02254974: .word 0xFFFF1FFF -_02254978: .word 0x00002DC8 -_0225497C: .word 0x00002DD4 -_02254980: .word 0xBFFFFFFF -_02254984: .word 0x0000305C -_02254988: .word 0x00003084 -_0225498C: .word 0x0000308C - thumb_func_end ov16_02254744 - - thumb_func_start ov16_02254990 -ov16_02254990: ; 0x02254990 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #0x75 - add r5, r1, #0 - lsl r0, r0, #2 - add r7, r5, r0 - mov r0, #0xd1 - lsl r0, r0, #2 - add r6, r5, r0 - mov r0, #8 - add r4, r5, #0 - str r0, [sp, #8] -_022549AE: - mov r0, #0 - add r1, r7, #0 - mov r2, #0x40 - bl sub_020C4BB8 - mov r0, #0 - add r1, r6, #0 - mov r2, #4 - bl sub_020C4BB8 - ldr r0, _02254A58 ; =0x00002DB0 - ldr r1, [r4, r0] - ldr r0, [sp, #8] - bic r1, r0 - ldr r0, _02254A58 ; =0x00002DB0 - str r1, [r4, r0] - add r0, #0x20 - ldr r0, [r4, r0] - add r1, r0, #1 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r1, r0 - bge _022549EA - ldr r0, _02254A58 ; =0x00002DB0 - ldr r1, [r4, r0] - ldr r0, _02254A5C ; =0xFFBFFFFF - and r1, r0 - ldr r0, _02254A58 ; =0x00002DB0 - str r1, [r4, r0] -_022549EA: - ldr r0, _02254A60 ; =0x00002DAC - ldr r1, [r4, r0] - mov r0, #7 - tst r0, r1 - beq _02254A0A - ldr r0, _02254A58 ; =0x00002DB0 - ldr r1, [r4, r0] - mov r0, #1 - lsl r0, r0, #0xc - tst r0, r1 - beq _02254A0A - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r5, #0 - bl ov16_02253F20 -_02254A0A: - ldr r0, _02254A60 ; =0x00002DAC - ldr r1, [r4, r0] - mov r0, #7 - tst r0, r1 - beq _02254A2C - ldr r0, _02254A58 ; =0x00002DB0 - ldr r1, [r4, r0] - mov r0, #3 - lsl r0, r0, #0xa - tst r0, r1 - beq _02254A2C - ldr r0, _02254A58 ; =0x00002DB0 - ldr r1, [r4, r0] - ldr r0, _02254A64 ; =0xFFFFF3FF - and r1, r0 - ldr r0, _02254A58 ; =0x00002DB0 - str r1, [r4, r0] -_02254A2C: - ldr r0, [sp, #4] - add r7, #0x40 - add r0, r0, #1 - add r6, r6, #4 - add r4, #0xc0 - str r0, [sp, #4] - cmp r0, #4 - blt _022549AE - mov r2, #0x71 - lsl r2, r2, #2 - ldr r0, [r5, r2] - ldr r1, _02254A68 ; =0xFFEFFFFF - and r0, r1 - str r0, [r5, r2] - add r0, r2, #0 - add r0, #8 - ldr r0, [r5, r0] - add r2, #8 - and r0, r1 - str r0, [r5, r2] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02254A58: .word 0x00002DB0 -_02254A5C: .word 0xFFBFFFFF -_02254A60: .word 0x00002DAC -_02254A64: .word 0xFFFFF3FF -_02254A68: .word 0xFFEFFFFF - thumb_func_end ov16_02254990 - - thumb_func_start ov16_02254A6C -ov16_02254A6C: ; 0x02254A6C - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - str r0, [sp] - ldr r0, [sp, #0x70] - add r7, r1, #0 - str r0, [sp, #0x70] - str r2, [sp, #4] - add r0, r7, #0 - add r1, r2, #0 - add r5, r3, #0 - bl ov16_02258AB8 - str r0, [sp, #0x34] - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - add r4, r7, r1 - str r1, [sp, #0x38] - ldr r0, [sp, #0x70] - mov r1, #1 - and r0, r1 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x70] - mov r1, #2 - and r0, r1 - str r0, [sp, #0x28] - ldr r0, [sp, #0x70] - mov r1, #4 - and r0, r1 - str r0, [sp, #0x24] - ldr r0, [sp, #4] - mov r1, #8 - lsl r0, r0, #1 - add r0, r7, r0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x70] - mov r2, #0x10 - and r0, r1 - ldr r1, _02254C84 ; =0x00002DC8 - str r0, [sp, #0x1c] - add r0, r7, r1 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x70] - sub r1, #0x88 - and r0, r2 - str r0, [sp, #0x18] - ldr r0, [sp, #0x70] - mov r2, #0x20 - and r0, r2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x70] - mov r2, #0x40 - and r0, r2 - str r0, [sp, #0x10] - ldr r2, [sp, #0x70] - mov r0, #0x80 - and r2, r0 - str r2, [sp, #0xc] - lsl r2, r0, #2 - ldr r0, [sp, #0x70] - mov r6, #0 - and r0, r2 - str r0, [sp, #8] - add r0, r7, r1 - str r0, [sp, #0x40] - ldr r0, _02254C88 ; =0x00002DE8 - str r4, [sp, #0x30] - add r0, r4, r0 - str r0, [sp, #0x44] - ldr r0, _02254C8C ; =0x00002DB0 - add r0, r4, r0 - str r0, [sp, #0x48] - ldr r0, _02254C90 ; =0x00002DEC - add r0, r4, r0 - str r0, [sp, #0x4c] - ldr r0, _02254C94 ; =0x00002DF8 - add r0, r4, r0 - str r0, [sp, #0x50] - ldr r0, _02254C94 ; =0x00002DF8 - add r0, r4, r0 - str r0, [sp, #0x58] - ldr r0, _02254C94 ; =0x00002DF8 - add r0, r4, r0 - str r0, [sp, #0x54] -_02254B14: - ldr r0, _02254C98 ; =0x00002D4C - ldrh r0, [r4, r0] - cmp r0, #0 - bne _02254B2A - ldr r0, [sp, #0x2c] - cmp r0, #0 - beq _02254B2A - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254B2A: - ldr r1, [sp, #0x30] - ldr r0, _02254C9C ; =0x00002D6C - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02254B42 - ldr r0, [sp, #0x28] - cmp r0, #0 - beq _02254B42 - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254B42: - ldr r0, [sp, #0x44] - ldrh r1, [r0] - ldr r0, _02254C98 ; =0x00002D4C - ldrh r0, [r4, r0] - cmp r1, r0 - bne _02254B5C - ldr r0, [sp, #0x24] - cmp r0, #0 - beq _02254B5C - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254B5C: - ldr r1, [sp, #0x20] - ldr r0, _02254CA0 ; =0x0000307C - ldrh r1, [r1, r0] - ldr r0, _02254C98 ; =0x00002D4C - ldrh r0, [r4, r0] - cmp r1, r0 - bne _02254B84 - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _02254B84 - ldr r0, [sp, #0x48] - ldr r1, [r0, #0] - mov r0, #2 - lsl r0, r0, #0x1e - tst r0, r1 - beq _02254B84 - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254B84: - ldr r1, [sp, #0x3c] - ldr r0, [sp, #0x38] - ldr r0, [r1, r0] - lsl r0, r0, #0x15 - lsr r0, r0, #0x1d - beq _02254BAE - ldr r0, [sp, #0x18] - cmp r0, #0 - beq _02254BAE - ldr r0, _02254C98 ; =0x00002D4C - ldrh r0, [r4, r0] - lsl r0, r0, #4 - add r1, r7, r0 - ldr r0, _02254CA4 ; =0x000003E1 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02254BAE - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254BAE: - ldr r3, _02254C98 ; =0x00002D4C - ldr r0, [sp] - ldrh r3, [r4, r3] - ldr r2, [sp, #4] - add r1, r7, #0 - bl ov16_02255EF4 - cmp r0, #0 - beq _02254BCE - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02254BCE - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254BCE: - ldr r3, _02254C98 ; =0x00002D4C - ldr r0, [sp] - ldrh r3, [r4, r3] - ldr r2, [sp, #4] - add r1, r7, #0 - bl ov16_02256044 - cmp r0, #0 - beq _02254BEE - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02254BEE - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254BEE: - ldr r3, _02254C98 ; =0x00002D4C - ldr r0, [sp] - ldrh r3, [r4, r3] - ldr r2, [sp, #4] - add r1, r7, #0 - bl ov16_02256078 - cmp r0, #0 - beq _02254C0E - ldr r0, [sp, #0xc] - cmp r0, #0 - beq _02254C0E - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254C0E: - ldr r0, [sp, #0x4c] - ldrh r1, [r0] - cmp r1, #0 - beq _02254C26 - ldr r0, _02254C98 ; =0x00002D4C - ldrh r0, [r4, r0] - cmp r1, r0 - beq _02254C26 - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254C26: - ldr r0, [sp, #0x34] - cmp r0, #0x37 - beq _02254C34 - cmp r0, #0x73 - beq _02254C34 - cmp r0, #0x7d - bne _02254C6C -_02254C34: - ldr r0, [sp, #8] - cmp r0, #0 - beq _02254C6C - ldr r1, [sp, #0x40] - ldr r0, [sp, #0x38] - add r0, r1, r0 - ldr r1, [sp, #0x50] - ldrh r1, [r1] - bl ov16_02254EE0 - cmp r0, #4 - bne _02254C54 - ldr r0, [sp, #0x54] - mov r1, #0 - strh r1, [r0] - b _02254C6C -_02254C54: - ldr r0, [sp, #0x58] - ldrh r1, [r0] - cmp r1, #0 - beq _02254C6C - ldr r0, _02254C98 ; =0x00002D4C - ldrh r0, [r4, r0] - cmp r1, r0 - beq _02254C6C - add r0, r6, #0 - bl sub_020787CC - orr r5, r0 -_02254C6C: - ldr r0, [sp, #0x30] - add r6, r6, #1 - add r0, r0, #1 - add r4, r4, #2 - str r0, [sp, #0x30] - cmp r6, #4 - bge _02254C7C - b _02254B14 -_02254C7C: - add r0, r5, #0 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_02254C84: .word 0x00002DC8 -_02254C88: .word 0x00002DE8 -_02254C8C: .word 0x00002DB0 -_02254C90: .word 0x00002DEC -_02254C94: .word 0x00002DF8 -_02254C98: .word 0x00002D4C -_02254C9C: .word 0x00002D6C -_02254CA0: .word 0x0000307C -_02254CA4: .word 0x000003E1 - thumb_func_end ov16_02254A6C - - thumb_func_start ov16_02254CA8 -ov16_02254CA8: ; 0x02254CA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r3, #0 - mov r3, #1 - str r3, [sp, #8] - mov r3, #4 - str r3, [sp] - mov r3, #0 - str r0, [sp, #4] - add r5, r1, #0 - add r6, r2, #0 - ldr r4, [sp, #0x40] - bl ov16_02254A6C - str r0, [sp, #0xc] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0xc] - tst r0, r1 - beq _02254CFA - mov r0, #0xa - strb r0, [r4, #1] - ldr r0, _02254EBC ; =0x00000261 - add r1, r6, #0 - strh r0, [r4, #2] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - lsl r0, r7, #1 - add r1, r1, r0 - ldr r0, _02254EC0 ; =0x00002D4C - ldrh r0, [r1, r0] - str r0, [r4, #8] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254CFA: - mov r0, #8 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - str r0, [sp, #0x10] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0x10] - tst r0, r1 - beq _02254D32 - mov r0, #2 - strb r0, [r4, #1] - mov r0, #0x99 - lsl r0, r0, #2 - strh r0, [r4, #2] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254D32: - mov r0, #0x10 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - str r0, [sp, #0x14] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0x14] - tst r0, r1 - beq _02254D78 - mov r0, #0xa - strb r0, [r4, #1] - ldr r0, _02254EC4 ; =0x00000265 - add r1, r6, #0 - strh r0, [r4, #2] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - lsl r0, r7, #1 - add r1, r1, r0 - ldr r0, _02254EC0 ; =0x00002D4C - ldrh r0, [r1, r0] - str r0, [r4, #8] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254D78: - mov r0, #0x20 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - str r0, [sp, #0x18] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0x18] - tst r0, r1 - beq _02254DC0 - mov r0, #0xa - strb r0, [r4, #1] - mov r0, #0x9a - lsl r0, r0, #2 - strh r0, [r4, #2] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - lsl r0, r7, #1 - add r1, r1, r0 - ldr r0, _02254EC0 ; =0x00002D4C - ldrh r0, [r1, r0] - str r0, [r4, #8] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254DC0: - mov r0, #0x40 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - str r0, [sp, #0x1c] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0x1c] - tst r0, r1 - beq _02254E06 - mov r0, #0xa - strb r0, [r4, #1] - ldr r0, _02254EC8 ; =0x000003E9 - add r1, r6, #0 - strh r0, [r4, #2] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - lsl r0, r7, #1 - add r1, r1, r0 - ldr r0, _02254EC0 ; =0x00002D4C - ldrh r0, [r1, r0] - str r0, [r4, #8] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254E06: - mov r0, #0x80 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - str r0, [sp, #0x20] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0x20] - tst r0, r1 - beq _02254E50 - mov r0, #0x22 - strb r0, [r4, #1] - ldr r0, _02254ECC ; =0x00000421 - add r1, r6, #0 - strh r0, [r4, #2] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - ldr r0, _02254ED0 ; =0x00000179 - str r0, [r4, #8] - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - lsl r0, r7, #1 - add r1, r1, r0 - ldr r0, _02254EC0 ; =0x00002D4C - ldrh r0, [r1, r0] - str r0, [r4, #0xc] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254E50: - mov r0, #2 - lsl r0, r0, #8 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - str r0, [sp, #0x24] - add r0, r7, #0 - bl sub_020787CC - ldr r1, [sp, #0x24] - tst r0, r1 - beq _02254E90 - mov r0, #0x18 - strb r0, [r4, #1] - ldr r0, _02254ED4 ; =0x0000038F - strh r0, [r4, #2] - mov r0, #0xc0 - mul r0, r6 - add r2, r5, r0 - ldr r0, _02254ED8 ; =0x00002DB8 - ldrh r1, [r2, r0] - add r0, #0x40 - str r1, [r4, #4] - ldrh r0, [r2, r0] - str r0, [r4, #8] - mov r0, #0 - str r0, [sp, #8] - b _02254EB6 -_02254E90: - mov r0, #2 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov16_02254A6C - add r5, r0, #0 - add r0, r7, #0 - bl sub_020787CC - tst r0, r5 - beq _02254EB6 - mov r0, #0 - str r0, [sp, #8] - strb r0, [r4, #1] - ldr r0, _02254EDC ; =0x00000337 - strh r0, [r4, #2] -_02254EB6: - ldr r0, [sp, #8] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02254EBC: .word 0x00000261 -_02254EC0: .word 0x00002D4C -_02254EC4: .word 0x00000265 -_02254EC8: .word 0x000003E9 -_02254ECC: .word 0x00000421 -_02254ED0: .word 0x00000179 -_02254ED4: .word 0x0000038F -_02254ED8: .word 0x00002DB8 -_02254EDC: .word 0x00000337 - thumb_func_end ov16_02254CA8 - - thumb_func_start ov16_02254EE0 -ov16_02254EE0: ; 0x02254EE0 - mov r3, #0 -_02254EE2: - ldrh r2, [r0, #0xc] - cmp r1, r2 - beq _02254EF0 - add r3, r3, #1 - add r0, r0, #2 - cmp r3, #4 - blt _02254EE2 -_02254EF0: - add r0, r3, #0 - bx lr - thumb_func_end ov16_02254EE0 - - thumb_func_start ov16_02254EF4 -ov16_02254EF4: ; 0x02254EF4 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r1, r6, #0 - add r5, r0, #0 - add r4, r3, #0 - bl ov16_02258AB8 - mov r1, #1 - cmp r0, #0x6a - beq _02254F1A - mov r0, #0xc0 - mul r0, r6 - add r2, r5, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r2, [r2, r0] - lsl r0, r1, #0xa - tst r0, r2 - beq _02254F30 -_02254F1A: - lsl r0, r4, #1 - add r2, r4, r0 - ldr r0, _02254FA0 ; =0x0226ECD5 - ldrb r0, [r0, r2] - cmp r0, #2 - bne _02254F30 - ldr r0, _02254FA4 ; =0x0226ECD6 - ldrb r0, [r0, r2] - cmp r0, #0 - bne _02254F30 - mov r1, #0 -_02254F30: - lsl r0, r6, #6 - add r2, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r2, r0] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - beq _02254F4E - lsl r0, r4, #1 - add r2, r4, r0 - ldr r0, _02254FA0 ; =0x0226ECD5 - ldrb r0, [r0, r2] - cmp r0, #2 - bne _02254F4E - mov r1, #0 -_02254F4E: - mov r0, #6 - lsl r0, r0, #6 - ldr r2, [r5, r0] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r2 - beq _02254F72 - lsl r0, r4, #1 - add r2, r4, r0 - ldr r0, _02254FA0 ; =0x0226ECD5 - ldrb r0, [r0, r2] - cmp r0, #2 - bne _02254F72 - ldr r0, _02254FA4 ; =0x0226ECD6 - ldrb r0, [r0, r2] - cmp r0, #0 - bne _02254F72 - mov r1, #0 -_02254F72: - mov r0, #0xc0 - mul r0, r6 - add r2, r5, r0 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r2, [r2, r0] - mov r0, #1 - lsl r0, r0, #0x16 - tst r0, r2 - beq _02254F9C - lsl r0, r4, #1 - add r2, r4, r0 - ldr r0, _02254FA0 ; =0x0226ECD5 - ldrb r0, [r0, r2] - cmp r0, #0x11 - bne _02254F9C - ldr r0, _02254FA4 ; =0x0226ECD6 - ldrb r0, [r0, r2] - cmp r0, #0 - bne _02254F9C - mov r1, #0 -_02254F9C: - add r0, r1, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02254FA0: .word 0x0226ECD5 -_02254FA4: .word 0x0226ECD6 - thumb_func_end ov16_02254EF4 - - thumb_func_start ov16_02254FA8 -ov16_02254FA8: ; 0x02254FA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r0, [sp, #0x50] - add r5, r1, #0 - str r0, [sp, #0x50] - ldr r0, [sp, #0x54] - str r2, [sp, #8] - str r0, [sp, #0x54] - add r0, r2, #0 - add r4, r3, #0 - ldr r7, [sp, #0x48] - ldr r6, [sp, #0x4c] - cmp r0, #0xa5 - bne _02254FCA - ldr r0, [sp, #0x50] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} -_02254FCA: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02258AB8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x24] - add r0, r5, #0 - add r1, r7, #0 - mov r2, #0 - bl ov16_02258ACC - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02258AB8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x20] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov16_02258ACC - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x60 - bne _02255012 - mov r0, #0 - str r0, [sp, #0x28] - b _0225502A -_02255012: - cmp r4, #0 - beq _0225501E - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x28] - b _0225502A -_0225501E: - ldr r0, [sp, #8] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022552BC ; =0x000003E2 - ldrb r0, [r1, r0] - str r0, [sp, #0x28] -_0225502A: - ldr r0, [sp, #8] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022552C0 ; =0x000003E1 - ldrb r0, [r1, r0] - str r0, [sp, #0x14] - ldr r0, _022552C4 ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #0xa - tst r0, r1 - bne _02255088 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x28] - cmp r1, r0 - beq _02255066 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x28] - cmp r1, r0 - bne _02255088 -_02255066: - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x5b - bne _0225507A - ldr r0, [sp, #0x50] - lsl r0, r0, #1 - str r0, [sp, #0x50] - b _02255088 -_0225507A: - ldr r1, [sp, #0x50] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - str r0, [sp, #0x50] -_02255088: - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #0x1a - bl ov16_02255AB4 - cmp r0, #1 - bne _022550B4 - ldr r0, [sp, #0x28] - cmp r0, #4 - bne _022550B4 - ldr r0, [sp, #0x20] - cmp r0, #0x6a - beq _022550B4 - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #2 - lsl r0, r0, #0xa - orr r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] - b _022551D0 -_022550B4: - mov r0, #0xc0 - add r1, r6, #0 - mul r1, r0 - ldr r0, _022552C8 ; =0x00002DCC - add r3, r5, r1 - ldr r2, [r3, r0] - lsl r2, r2, #0x10 - lsr r2, r2, #0x1d - beq _022550EC - sub r0, #0xc - ldr r2, [r3, r0] - mov r0, #1 - lsl r0, r0, #0xa - tst r2, r0 - bne _022550EC - ldr r2, [sp, #0x28] - cmp r2, #4 - bne _022550EC - ldr r2, [sp, #0x20] - cmp r2, #0x6a - beq _022550EC - ldr r1, [sp, #0x54] - lsl r0, r0, #0xa - ldr r1, [r1, #0] - orr r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] - b _022551D0 -_022550EC: - add r0, r5, r1 - mov r4, #0 - str r0, [sp, #0x18] -_022550F2: - lsl r0, r4, #1 - ldr r1, _022552CC ; =0x0226ECD4 - add r0, r4, r0 - add r1, r1, r0 - str r1, [sp, #0xc] - ldr r1, _022552CC ; =0x0226ECD4 - ldrb r1, [r1, r0] - cmp r1, #0xfe - bne _02255122 - ldr r1, [sp, #0x18] - ldr r0, _022552D0 ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #2 - lsl r0, r0, #0x1c - tst r0, r1 - bne _022551D0 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x71 - beq _022551D0 - add r4, r4, #1 - b _022551C4 -_02255122: - ldr r0, [sp, #0x28] - cmp r0, r1 - bne _022551C2 - ldr r0, [sp, #0xc] - add r1, r6, #0 - ldrb r0, [r0, #1] - mov r2, #0x1b - mov r3, #0 - str r0, [sp, #0x10] - add r0, r5, #0 - bl ov16_02252060 - ldr r1, [sp, #0x10] - cmp r1, r0 - bne _02255168 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov16_02254EF4 - cmp r0, #1 - bne _02255168 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #0x54] - ldr r3, [sp, #0x50] - str r0, [sp, #4] - ldrb r2, [r2, #2] - add r0, r5, #0 - add r1, r7, #0 - bl ov16_0225B63C - str r0, [sp, #0x50] -_02255168: - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x10] - cmp r1, r0 - bne _022551C2 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - str r0, [sp, #0x2c] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x2c] - cmp r1, r0 - beq _022551C2 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov16_02254EF4 - cmp r0, #1 - bne _022551C2 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #0x54] - ldr r3, [sp, #0x50] - str r0, [sp, #4] - ldrb r2, [r2, #2] - add r0, r5, #0 - add r1, r7, #0 - bl ov16_0225B63C - str r0, [sp, #0x50] -_022551C2: - add r4, r4, #1 -_022551C4: - lsl r0, r4, #1 - add r1, r4, r0 - ldr r0, _022552CC ; =0x0226ECD4 - ldrb r0, [r0, r1] - cmp r0, #0xff - bne _022550F2 -_022551D0: - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #0x19 - bl ov16_02255AB4 - cmp r0, #1 - bne _02255214 - ldr r1, [sp, #8] - add r0, r5, #0 - bl ov16_0225B6C8 - cmp r0, #0 - beq _02255214 - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #2 - tst r0, r1 - beq _022551FE - mov r0, #6 - and r0, r1 - cmp r0, #6 - bne _02255214 -_022551FE: - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02255214 - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #1 - lsl r0, r0, #0x12 - orr r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] - b _022552B6 -_02255214: - ldr r0, _022552C4 ; =0x0000213C - ldr r2, [r5, r0] - mov r0, #2 - lsl r0, r0, #0xa - add r1, r2, #0 - tst r1, r0 - bne _022552A2 - lsl r0, r0, #4 - tst r0, r2 - bne _022552A2 - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #2 - tst r0, r1 - beq _0225527E - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _0225527E - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #0x6f - bl ov16_02255AB4 - cmp r0, #1 - beq _02255258 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - mov r3, #0x74 - bl ov16_02255AB4 - cmp r0, #1 - bne _02255266 -_02255258: - ldr r0, [sp, #0x50] - lsl r1, r0, #1 - add r0, r0, r1 - mov r1, #4 - bl ov16_022563F8 - str r0, [sp, #0x50] -_02255266: - ldr r0, [sp, #0x24] - cmp r0, #0x60 - bne _0225527E - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x50] - add r0, #0x64 - str r0, [sp, #0x1c] - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp, #0x50] -_0225527E: - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #4 - tst r0, r1 - beq _022552B6 - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _022552B6 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x6e - bne _022552B6 - ldr r0, [sp, #0x50] - lsl r0, r0, #1 - str r0, [sp, #0x50] - b _022552B6 -_022552A2: - ldr r0, [sp, #0x54] - ldr r1, [r0, #0] - mov r0, #2 - bic r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] - mov r0, #4 - bic r1, r0 - ldr r0, [sp, #0x54] - str r1, [r0, #0] -_022552B6: - ldr r0, [sp, #0x50] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022552BC: .word 0x000003E2 -_022552C0: .word 0x000003E1 -_022552C4: .word 0x0000213C -_022552C8: .word 0x00002DCC -_022552CC: .word 0x0226ECD4 -_022552D0: .word 0x00002DB0 - thumb_func_end ov16_02254FA8 - - thumb_func_start ov16_022552D4 -ov16_022552D4: ; 0x022552D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - ldr r0, [sp, #0x2c] - str r1, [sp] - str r0, [sp, #0x2c] - ldr r0, [sp, #0x30] - str r3, [sp, #4] - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - ldr r6, [sp, #0x38] - str r0, [sp, #0x34] - add r0, r1, #0 - cmp r0, #0xa5 - beq _022553EA - add r0, r3, #0 - cmp r0, #0x60 - bne _022552FE - mov r0, #0 - str r0, [sp, #0xc] - b _02255316 -_022552FE: - cmp r2, #0 - beq _0225530A - lsl r0, r2, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - b _02255316 -_0225530A: - add r0, r1, #0 - lsl r0, r0, #4 - add r1, r7, r0 - ldr r0, _022553F0 ; =0x000003E2 - ldrb r0, [r1, r0] - str r0, [sp, #0xc] -_02255316: - ldr r0, [sp, #4] - cmp r0, #0x68 - beq _02255346 - ldr r0, [sp, #0x28] - cmp r0, #0x1a - bne _02255346 - ldr r0, [sp, #0xc] - cmp r0, #4 - bne _02255346 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r7, r0] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r1 - bne _02255346 - ldr r0, [sp, #0x2c] - cmp r0, #0x6a - beq _02255346 - ldr r1, [r6, #0] - mov r0, #8 - orr r0, r1 - str r0, [r6, #0] - b _022553BA -_02255346: - mov r4, #0 -_02255348: - lsl r0, r4, #1 - add r1, r4, r0 - ldr r0, _022553F4 ; =0x0226ECD4 - add r5, r0, r1 - ldrb r1, [r0, r1] - cmp r1, #0xfe - bne _02255360 - ldr r0, [sp, #4] - cmp r0, #0x71 - beq _022553BA - add r4, r4, #1 - b _022553AE -_02255360: - ldr r0, [sp, #0xc] - cmp r0, r1 - bne _022553AC - ldrb r0, [r5, #1] - ldr r1, [sp, #0x30] - str r0, [sp, #8] - cmp r1, r0 - bne _02255386 - ldr r1, [sp, #0x2c] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_022553F8 - cmp r0, #1 - bne _02255386 - ldrb r0, [r5, #2] - add r1, r6, #0 - bl ov16_02255448 -_02255386: - ldr r1, [sp, #0x34] - ldr r0, [sp, #8] - cmp r1, r0 - bne _022553AC - ldr r1, [sp, #0x30] - ldr r0, [sp, #0x34] - cmp r1, r0 - beq _022553AC - ldr r1, [sp, #0x2c] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_022553F8 - cmp r0, #1 - bne _022553AC - ldrb r0, [r5, #2] - add r1, r6, #0 - bl ov16_02255448 -_022553AC: - add r4, r4, #1 -_022553AE: - lsl r0, r4, #1 - add r1, r4, r0 - ldr r0, _022553F4 ; =0x0226ECD4 - ldrb r0, [r0, r1] - cmp r0, #0xff - bne _02255348 -_022553BA: - ldr r0, [sp, #4] - cmp r0, #0x68 - beq _022553EA - ldr r0, [sp, #0x28] - cmp r0, #0x19 - bne _022553EA - ldr r1, [sp] - add r0, r7, #0 - bl ov16_0225B6C8 - cmp r0, #0 - beq _022553EA - ldr r1, [r6, #0] - mov r0, #2 - tst r0, r1 - beq _022553E2 - mov r0, #6 - and r0, r1 - cmp r0, #6 - bne _022553EA -_022553E2: - ldr r1, [r6, #0] - mov r0, #8 - orr r0, r1 - str r0, [r6, #0] -_022553EA: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022553F0: .word 0x000003E2 -_022553F4: .word 0x0226ECD4 - thumb_func_end ov16_022552D4 - - thumb_func_start ov16_022553F8 -ov16_022553F8: ; 0x022553F8 - push {r3, r4} - mov r3, #1 - cmp r1, #0x6a - bne _02255416 - lsl r1, r2, #1 - add r4, r2, r1 - ldr r1, _02255440 ; =0x0226ECD5 - ldrb r1, [r1, r4] - cmp r1, #2 - bne _02255416 - ldr r1, _02255444 ; =0x0226ECD6 - ldrb r1, [r1, r4] - cmp r1, #0 - bne _02255416 - mov r3, #0 -_02255416: - mov r1, #6 - lsl r1, r1, #6 - ldr r1, [r0, r1] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r1 - beq _0225543A - lsl r0, r2, #1 - add r1, r2, r0 - ldr r0, _02255440 ; =0x0226ECD5 - ldrb r0, [r0, r1] - cmp r0, #2 - bne _0225543A - ldr r0, _02255444 ; =0x0226ECD6 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _0225543A - mov r3, #0 -_0225543A: - add r0, r3, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 -_02255440: .word 0x0226ECD5 -_02255444: .word 0x0226ECD6 - thumb_func_end ov16_022553F8 - - thumb_func_start ov16_02255448 -ov16_02255448: ; 0x02255448 - cmp r0, #0 - beq _02255456 - cmp r0, #5 - beq _02255468 - cmp r0, #0x14 - beq _02255480 - bx lr -_02255456: - ldr r2, [r1, #0] - mov r0, #8 - orr r2, r0 - mov r0, #4 - bic r2, r0 - mov r0, #2 - bic r2, r0 - str r2, [r1, #0] - bx lr -_02255468: - ldr r2, [r1, #0] - mov r0, #2 - tst r0, r2 - beq _02255478 - mov r0, #2 - bic r2, r0 - str r2, [r1, #0] - bx lr -_02255478: - mov r0, #4 - orr r0, r2 - str r0, [r1, #0] - bx lr -_02255480: - ldr r2, [r1, #0] - mov r0, #4 - tst r0, r2 - beq _02255490 - mov r0, #4 - bic r2, r0 - str r2, [r1, #0] - bx lr -_02255490: - mov r0, #2 - orr r0, r2 - str r0, [r1, #0] - bx lr - thumb_func_end ov16_02255448 - - thumb_func_start ov16_02255498 -ov16_02255498: ; 0x02255498 - mov r2, #0xd1 - lsl r2, r2, #2 - add r2, r0, r2 - lsl r0, r1, #2 - ldr r0, [r2, r0] - lsl r1, r0, #0x1f - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x1e - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x1d - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x1c - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x1b - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x1a - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x19 - lsr r1, r1, #0x1f - bne _022554D8 - lsl r1, r0, #0x17 - lsr r1, r1, #0x1f - bne _022554D8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - beq _022554DC -_022554D8: - mov r0, #1 - bx lr -_022554DC: - mov r0, #0 - bx lr - thumb_func_end ov16_02255498 - - thumb_func_start ov16_022554E0 -ov16_022554E0: ; 0x022554E0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - add r5, r1, #0 - add r6, r2, #0 - str r3, [sp, #4] - mov r4, #0 - bl ov16_0223DF1C - add r7, r0, #0 - cmp r6, #0 - beq _022554FE - cmp r6, #1 - beq _02255522 - b _02255556 -_022554FE: - add r0, r4, #0 - cmp r7, #0 - ble _02255556 - ldr r2, _0225555C ; =0x00002D8C -_02255506: - ldr r1, [sp, #4] - cmp r0, r1 - beq _02255518 - ldr r1, [r5, r2] - cmp r1, #0 - beq _02255518 - add r1, r4, #1 - lsl r1, r1, #0x18 - lsr r4, r1, #0x18 -_02255518: - add r0, r0, #1 - add r5, #0xc0 - cmp r0, r7 - blt _02255506 - b _02255556 -_02255522: - add r6, r4, #0 - cmp r7, #0 - ble _02255556 -_02255528: - ldr r0, [sp] - add r1, r6, #0 - bl ov16_0223E208 - str r0, [sp, #8] - ldr r0, [sp] - ldr r1, [sp, #4] - bl ov16_0223E208 - ldr r1, [sp, #8] - cmp r1, r0 - bne _0225554E - ldr r0, _0225555C ; =0x00002D8C - ldr r0, [r5, r0] - cmp r0, #0 - beq _0225554E - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_0225554E: - add r6, r6, #1 - add r5, #0xc0 - cmp r6, r7 - blt _02255528 -_02255556: - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225555C: .word 0x00002D8C - thumb_func_end ov16_022554E0 - - thumb_func_start ov16_02255560 -ov16_02255560: ; 0x02255560 - add r2, r0, r1 - ldr r0, _0225556C ; =0x0000219C - ldrb r0, [r2, r0] - lsl r0, r0, #8 - orr r0, r1 - bx lr - ; .align 2, 0 -_0225556C: .word 0x0000219C - thumb_func_end ov16_02255560 - - thumb_func_start ov16_02255570 -ov16_02255570: ; 0x02255570 - push {r4, r5} - lsl r3, r1, #4 - add r5, r0, r3 - ldr r3, _0225559C ; =0x000021B4 - mov r2, #0 - ldr r4, [r5, r3] - cmp r4, #1 - bne _02255596 - sub r3, r3, #4 - ldr r3, [r5, r3] - cmp r3, #0 - beq _02255596 - mov r2, #0xc0 - mul r2, r1 - add r1, r0, r2 - lsl r0, r3, #1 - add r1, r1, r0 - ldr r0, _022555A0 ; =0x00002D4A - ldrh r2, [r1, r0] -_02255596: - add r0, r2, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_0225559C: .word 0x000021B4 -_022555A0: .word 0x00002D4A - thumb_func_end ov16_02255570 - - thumb_func_start ov16_022555A4 -ov16_022555A4: ; 0x022555A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - str r2, [sp, #4] - str r0, [sp] - add r7, r1, #0 - str r3, [sp, #8] - ldr r6, [sp, #0x70] - mov r4, #0 - bl ov16_0223DF1C - add r5, r0, #0 - ldr r0, [sp, #4] - cmp r0, #9 - bhi _02255618 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022555CC: ; jump table - .short _022555E0 - _022555CC - 2 ; case 0 - .short _0225561A - _022555CC - 2 ; case 1 - .short _02255666 - _022555CC - 2 ; case 2 - .short _022556A0 - _022555CC - 2 ; case 3 - .short _022556EC - _022555CC - 2 ; case 4 - .short _0225573E - _022555CC - 2 ; case 5 - .short _02255760 - _022555CC - 2 ; case 6 - .short _02255788 - _022555CC - 2 ; case 7 - .short _022557B4 - _022555CC - 2 ; case 8 - .short _022557E8 - _022555CC - 2 ; case 9 -_022555E0: - add r0, r4, #0 - str r0, [sp, #0x44] - cmp r5, #0 - ble _02255618 -_022555E8: - ldr r0, [sp] - ldr r1, [sp, #0x44] - bl ov16_0223E208 - str r0, [sp, #0x48] - ldr r0, [sp] - ldr r1, [sp, #8] - bl ov16_0223E208 - ldr r1, [sp, #0x48] - cmp r1, r0 - bne _0225560E - ldr r1, [sp, #0x44] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _0225560E - add r4, r4, #1 -_0225560E: - ldr r0, [sp, #0x44] - add r0, r0, #1 - str r0, [sp, #0x44] - cmp r0, r5 - blt _022555E8 -_02255618: - b _02255820 -_0225561A: - add r0, r4, #0 - str r0, [sp, #0xc] - cmp r5, #0 - ble _02255664 - str r7, [sp, #0x30] -_02255624: - ldr r0, [sp] - ldr r1, [sp, #0xc] - bl ov16_0223E208 - str r0, [sp, #0x4c] - ldr r0, [sp] - ldr r1, [sp, #8] - bl ov16_0223E208 - ldr r1, [sp, #0x4c] - cmp r1, r0 - bne _02255654 - ldr r1, [sp, #0x30] - ldr r0, _02255828 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02255654 - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _02255654 - add r4, r4, #1 -_02255654: - ldr r0, [sp, #0x30] - add r0, #0xc0 - str r0, [sp, #0x30] - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, r5 - blt _02255624 -_02255664: - b _02255820 -_02255666: - add r0, r4, #0 - str r0, [sp, #0x10] - cmp r5, #0 - ble _0225569E -_0225566E: - ldr r0, [sp] - ldr r1, [sp, #0x10] - bl ov16_0223E208 - str r0, [sp, #0x50] - ldr r0, [sp] - ldr r1, [sp, #8] - bl ov16_0223E208 - ldr r1, [sp, #0x50] - cmp r1, r0 - beq _02255694 - ldr r1, [sp, #0x10] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _02255694 - add r4, r4, #1 -_02255694: - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, r5 - blt _0225566E -_0225569E: - b _02255820 -_022556A0: - add r0, r4, #0 - str r0, [sp, #0x14] - cmp r5, #0 - ble _022556EA - str r7, [sp, #0x34] -_022556AA: - ldr r0, [sp] - ldr r1, [sp, #0x14] - bl ov16_0223E208 - str r0, [sp, #0x54] - ldr r0, [sp] - ldr r1, [sp, #8] - bl ov16_0223E208 - ldr r1, [sp, #0x54] - cmp r1, r0 - beq _022556DA - ldr r1, [sp, #0x34] - ldr r0, _02255828 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _022556DA - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _022556DA - add r4, r4, #1 -_022556DA: - ldr r0, [sp, #0x34] - add r0, #0xc0 - str r0, [sp, #0x34] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, r5 - blt _022556AA -_022556EA: - b _02255820 -_022556EC: - add r0, r4, #0 - str r0, [sp, #0x18] - cmp r5, #0 - ble _0225573C - str r7, [sp, #0x38] -_022556F6: - ldr r0, [sp] - ldr r1, [sp, #0x18] - bl ov16_0223E208 - str r0, [sp, #0x58] - ldr r0, [sp] - ldr r1, [sp, #8] - bl ov16_0223E208 - ldr r1, [sp, #0x58] - cmp r1, r0 - beq _0225572C - ldr r1, [sp, #0x38] - ldr r0, _02255828 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225572C - ldr r1, [sp, #0x18] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _0225572C - ldr r0, [sp, #0x18] - bl sub_020787CC - orr r4, r0 -_0225572C: - ldr r0, [sp, #0x38] - add r0, #0xc0 - str r0, [sp, #0x38] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, r5 - blt _022556F6 -_0225573C: - b _02255820 -_0225573E: - add r0, r4, #0 - str r0, [sp, #0x1c] - cmp r5, #0 - ble _02255820 -_02255746: - ldr r1, [sp, #0x1c] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _02255754 - add r4, r4, #1 -_02255754: - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, r5 - blt _02255746 - b _02255820 -_02255760: - add r0, r4, #0 - str r0, [sp, #0x20] - cmp r5, #0 - ble _02255820 -_02255768: - ldr r1, [sp, #0x20] - ldr r0, [sp, #8] - cmp r1, r0 - beq _0225577C - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _0225577C - add r4, r4, #1 -_0225577C: - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, r5 - blt _02255768 - b _02255820 -_02255788: - add r0, r4, #0 - str r0, [sp, #0x24] - cmp r5, #0 - ble _02255820 -_02255790: - ldr r1, [sp, #0x24] - ldr r0, [sp, #8] - cmp r1, r0 - beq _022557A8 - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _022557A8 - ldr r0, [sp, #0x24] - add r4, r0, #1 - b _02255820 -_022557A8: - ldr r0, [sp, #0x24] - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, r5 - blt _02255790 - b _02255820 -_022557B4: - add r0, r4, #0 - str r0, [sp, #0x28] - cmp r5, #0 - ble _02255820 - str r7, [sp, #0x3c] -_022557BE: - ldr r1, [sp, #0x28] - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _022557D6 - ldr r1, [sp, #0x3c] - ldr r0, _02255828 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _022557D6 - add r4, r4, #1 -_022557D6: - ldr r0, [sp, #0x3c] - add r0, #0xc0 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x28] - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, r5 - blt _022557BE - b _02255820 -_022557E8: - add r0, r4, #0 - str r0, [sp, #0x2c] - cmp r5, #0 - ble _02255820 - str r7, [sp, #0x40] -_022557F2: - ldr r1, [sp, #0x2c] - ldr r0, [sp, #8] - cmp r1, r0 - beq _02255810 - add r0, r7, #0 - bl ov16_02255A4C - cmp r6, r0 - bne _02255810 - ldr r1, [sp, #0x40] - ldr r0, _02255828 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02255810 - add r4, r4, #1 -_02255810: - ldr r0, [sp, #0x40] - add r0, #0xc0 - str r0, [sp, #0x40] - ldr r0, [sp, #0x2c] - add r0, r0, #1 - str r0, [sp, #0x2c] - cmp r0, r5 - blt _022557F2 -_02255820: - add r0, r4, #0 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_02255828: .word 0x00002D8C - thumb_func_end ov16_022555A4 - - thumb_func_start ov16_0225582C -ov16_0225582C: ; 0x0225582C - lsl r1, r1, #4 - add r1, r0, r1 - ldr r0, _02255888 ; =0x000003DE - ldrh r2, [r1, r0] - cmp r2, #0x9b - bgt _0225585E - cmp r2, #0x97 - blt _02255844 - beq _0225587E - cmp r2, #0x9b - beq _0225587E - b _02255882 -_02255844: - cmp r2, #0x27 - bgt _02255850 - bge _0225587E - cmp r2, #0x1a - beq _0225587E - b _02255882 -_02255850: - cmp r2, #0x4b - bgt _02255858 - beq _0225587E - b _02255882 -_02255858: - cmp r2, #0x91 - beq _0225587E - b _02255882 -_0225585E: - mov r1, #1 - lsl r1, r1, #8 - cmp r2, r1 - bgt _0225586E - bge _0225587E - cmp r2, #0xff - beq _0225587E - b _02255882 -_0225586E: - add r0, r1, #7 - cmp r2, r0 - bgt _02255878 - beq _0225587E - b _02255882 -_02255878: - add r1, #0x10 - cmp r2, r1 - bne _02255882 -_0225587E: - mov r0, #1 - bx lr -_02255882: - mov r0, #0 - bx lr - nop -_02255888: .word 0x000003DE - thumb_func_end ov16_0225582C - - thumb_func_start ov16_0225588C -ov16_0225588C: ; 0x0225588C - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - mov r2, #1 - cmp r1, #0x70 - blo _022558A4 - bl ov16_0223F4BC - mov r1, #0x70 - bl sub_020E2178 - mov r2, #0 -_022558A4: - lsl r0, r1, #1 - add r0, r1, r0 - ldr r1, _022558C0 ; =0x0226ECD4 - ldrb r1, [r1, r0] - strb r1, [r5] - ldr r1, _022558C4 ; =0x0226ECD5 - ldrb r1, [r1, r0] - strb r1, [r4] - ldr r1, _022558C8 ; =0x0226ECD6 - ldrb r1, [r1, r0] - ldr r0, [sp, #0x10] - strb r1, [r0] - add r0, r2, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022558C0: .word 0x0226ECD4 -_022558C4: .word 0x0226ECD5 -_022558C8: .word 0x0226ECD6 - thumb_func_end ov16_0225588C - - thumb_func_start ov16_022558CC -ov16_022558CC: ; 0x022558CC - push {r3, r4, r5, r6, r7, lr} - ldr r4, _02255914 ; =0x0226ECD4 - add r5, r1, #0 - str r0, [sp] - add r6, r2, #0 - mov r1, #0x28 -_022558D8: - ldrb r2, [r4] - ldr r0, [sp] - cmp r0, r2 - bne _02255906 - ldrb r7, [r4, #1] - cmp r5, r7 - bne _022558F2 - ldrb r0, [r4, #2] - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - add r1, r0, #0 -_022558F2: - cmp r6, r7 - bne _02255906 - cmp r5, r6 - beq _02255906 - ldrb r0, [r4, #2] - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - add r1, r0, #0 -_02255906: - add r4, r4, #3 - ldrb r0, [r4] - cmp r0, #0xff - bne _022558D8 - add r0, r1, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02255914: .word 0x0226ECD4 - thumb_func_end ov16_022558CC - - thumb_func_start ov16_02255918 -ov16_02255918: ; 0x02255918 - cmp r0, #0 - beq _02255940 - cmp r0, #0xd6 - beq _02255940 - ldr r2, _02255948 ; =0x0000017F - cmp r0, r2 - beq _02255940 - add r1, r2, #0 - sub r1, #0x6d - cmp r0, r1 - beq _02255940 - sub r1, r2, #1 - cmp r0, r1 - beq _02255940 - ldr r1, _0225594C ; =0x0000FF8A - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _02255944 -_02255940: - mov r0, #1 - bx lr -_02255944: - mov r0, #0 - bx lr - ; .align 2, 0 -_02255948: .word 0x0000017F -_0225594C: .word 0x0000FF8A - thumb_func_end ov16_02255918 - - thumb_func_start ov16_02255950 -ov16_02255950: ; 0x02255950 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #0xae - bne _0225597C - add r1, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #7 - beq _02255978 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #7 - bne _0225597C -_02255978: - mov r0, #1 - pop {r3, r4, r5, pc} -_0225597C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02255950 - - thumb_func_start ov16_02255980 -ov16_02255980: ; 0x02255980 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r2, #0 - add r5, r1, #0 - add r1, r6, #0 - mov r7, #0 - bl ov16_0223E208 - str r0, [sp] - ldr r0, _022559D4 ; =0x00002DB8 - add r4, r5, r0 - mov r0, #0xc0 - mul r0, r6 - str r0, [sp, #4] - ldrh r0, [r4, r0] - cmp r0, #0 - beq _022559CE - ldr r0, _022559D8 ; =0x0000219C - add r1, r5, r6 - ldrb r0, [r1, r0] - bl sub_020787CC - ldr r1, [sp] - lsl r1, r1, #3 - add r2, r5, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #3 - lsr r1, r1, #0x1a - tst r0, r1 - bne _022559CE - ldr r0, [sp, #4] - ldrh r0, [r4, r0] - bl sub_0207D2D0 - cmp r0, #0 - bne _022559CE - mov r7, #1 -_022559CE: - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022559D4: .word 0x00002DB8 -_022559D8: .word 0x0000219C - thumb_func_end ov16_02255980 - - thumb_func_start ov16_022559DC -ov16_022559DC: ; 0x022559DC - push {r3, lr} - mov r2, #0xc0 - mul r2, r1 - add r1, r0, r2 - ldr r0, _022559F8 ; =0x00002DB8 - ldrh r0, [r1, r0] - bl sub_0207D2D0 - cmp r0, #0 - bne _022559F4 - mov r0, #1 - pop {r3, pc} -_022559F4: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_022559F8: .word 0x00002DB8 - thumb_func_end ov16_022559DC - - thumb_func_start ov16_022559FC -ov16_022559FC: ; 0x022559FC - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r2, [r5, #0x6c] - mov r1, #0xc0 - add r4, r2, #0 - ldr r2, _02255A48 ; =0x00002D74 - mul r4, r1 - add r3, r5, r2 - ldrb r4, [r3, r4] - ldr r3, [r5, #0x64] - mov r6, #0 - mul r1, r3 - add r1, r5, r1 - ldrb r1, [r1, r2] - cmp r1, r4 - blo _02255A20 - mov r6, #1 - b _02255A44 -_02255A20: - bl ov16_0223F4BC - ldr r2, [r5, #0x64] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _02255A48 ; =0x00002D74 - lsl r0, r0, #0x18 - ldrb r1, [r2, r1] - lsr r0, r0, #0x18 - add r1, r1, r4 - mul r0, r1 - asr r0, r0, #8 - add r1, r0, #1 - lsr r0, r4, #2 - cmp r1, r0 - ble _02255A44 - mov r6, #1 -_02255A44: - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02255A48: .word 0x00002D74 - thumb_func_end ov16_022559FC - - thumb_func_start ov16_02255A4C -ov16_02255A4C: ; 0x02255A4C - push {r4, r5} - mov r2, #0xc0 - mul r2, r1 - mov r3, #0xb7 - mov r4, #2 - add r5, r0, r2 - lsl r3, r3, #6 - ldr r1, [r5, r3] - lsl r4, r4, #0x14 - tst r4, r1 - beq _02255A70 - sub r3, #0x59 - ldrb r3, [r5, r3] - cmp r3, #0x79 - beq _02255A70 - mov r0, #0 - pop {r4, r5} - bx lr -_02255A70: - mov r3, #6 - lsl r3, r3, #6 - ldr r4, [r0, r3] - mov r3, #7 - lsl r3, r3, #0xc - tst r3, r4 - beq _02255A8E - ldr r3, _02255AB0 ; =0x00002D67 - add r4, r0, r2 - ldrb r3, [r4, r3] - cmp r3, #0x1a - bne _02255A8E - mov r0, #0 - pop {r4, r5} - bx lr -_02255A8E: - mov r3, #1 - lsl r3, r3, #0xa - tst r1, r3 - beq _02255AA6 - ldr r1, _02255AB0 ; =0x00002D67 - add r3, r0, r2 - ldrb r1, [r3, r1] - cmp r1, #0x1a - bne _02255AA6 - mov r0, #0 - pop {r4, r5} - bx lr -_02255AA6: - add r1, r0, r2 - ldr r0, _02255AB0 ; =0x00002D67 - ldrb r0, [r1, r0] - pop {r4, r5} - bx lr - ; .align 2, 0 -_02255AB0: .word 0x00002D67 - thumb_func_end ov16_02255A4C - - thumb_func_start ov16_02255AB4 -ov16_02255AB4: ; 0x02255AB4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp] - add r4, r3, #0 - mov r6, #0 - bl ov16_02255A4C - cmp r0, #0x68 - beq _02255AD8 - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02255A4C - cmp r4, r0 - bne _02255B06 - mov r6, #1 - b _02255B06 -_02255AD8: - ldr r1, [sp] - add r0, r5, #0 - bl ov16_02255A4C - cmp r4, r0 - bne _02255B06 - mov r0, #0xb5 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x1c - mul r0, r7 - ldr r3, [r1, r0] - lsl r2, r3, #0x1c - lsr r2, r2, #0x1f - bne _02255B06 - mov r2, #8 - orr r3, r2 - str r3, [r1, r0] - ldr r1, _02255B0C ; =0x0000213C - lsl r0, r2, #0x14 - ldr r3, [r5, r1] - orr r0, r3 - str r0, [r5, r1] -_02255B06: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02255B0C: .word 0x0000213C - thumb_func_end ov16_02255AB4 - - thumb_func_start ov16_02255B10 -ov16_02255B10: ; 0x02255B10 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - mov r6, #0 - str r0, [sp] - str r1, [sp, #4] - add r4, r2, #0 - str r6, [sp, #0x18] - bl ov16_0223DF0C - add r5, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223DF20 - str r0, [sp, #0x14] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223DF60 - add r7, r0, #0 - mov r0, #8 - tst r0, r5 - bne _02255B52 - mov r0, #0x10 - tst r0, r5 - beq _02255B66 - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - beq _02255B66 -_02255B52: - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - mov r5, #0 - add r1, r0, r4 - ldr r0, _02255BFC ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #0xc] - str r0, [sp, #8] - b _02255BA2 -_02255B66: - mov r0, #2 - tst r0, r5 - beq _02255B90 - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - mov r5, #0 - add r1, r0, r4 - ldr r0, _02255BFC ; =0x0000219C - ldrb r0, [r1, r0] - add r1, r4, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - bl ov16_0223E258 - ldr r1, [sp, #4] - add r1, r1, r0 - ldr r0, _02255BFC ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #8] - b _02255BA2 -_02255B90: - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - mov r5, #0 - add r1, r0, r4 - ldr r0, _02255BFC ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #0xc] - str r0, [sp, #8] -_02255BA2: - cmp r5, r7 - bge _02255BEC -_02255BA6: - ldr r0, [sp, #0x14] - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02255BE6 - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _02255BE6 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02255BE6 - ldr r0, [sp, #0xc] - cmp r0, r5 - beq _02255BE6 - ldr r0, [sp, #8] - cmp r0, r5 - beq _02255BE6 - add r6, r6, #1 -_02255BE6: - add r5, r5, #1 - cmp r5, r7 - blt _02255BA6 -_02255BEC: - ldr r0, [sp, #0x10] - cmp r6, r0 - blt _02255BF6 - mov r0, #1 - str r0, [sp, #0x18] -_02255BF6: - ldr r0, [sp, #0x18] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255BFC: .word 0x0000219C - thumb_func_end ov16_02255B10 - - thumb_func_start ov16_02255C00 -ov16_02255C00: ; 0x02255C00 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r6, r2, #0 - add r7, r0, #0 - add r4, r3, #0 - bl ov16_0223DF0C - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02258AB8 - str r0, [sp, #8] - cmp r0, #0x3f - beq _02255C36 - mov r1, #0xa9 - ldr r0, [sp, #0xc] - lsl r1, r1, #2 - tst r0, r1 - bne _02255C36 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x32 - bne _02255C3C -_02255C36: - add sp, #0x14 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02255C3C: - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0223E208 - add r0, r7, #0 - bl ov16_0223DF1C - mov r0, #0x17 - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #9 - add r3, r6, #0 - bl ov16_022555A4 - str r0, [sp, #0x10] - cmp r0, #0 - beq _02255C92 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x17 - beq _02255C92 - cmp r4, #0 - bne _02255C76 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255C76: - mov r0, #0xb - strb r0, [r4, #1] - mov r0, #0x27 - strh r0, [r4, #2] - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0x17 - str r0, [r4, #8] - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255C92: - mov r0, #0x47 - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #3 - add r3, r6, #0 - bl ov16_022555A4 - str r0, [sp, #4] - cmp r0, #0 - beq _02255D44 - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r1 - bne _02255D1E - ldr r0, [sp, #8] - cmp r0, #0x6a - beq _02255D1E - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x1a - beq _02255D44 - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - ldr r0, _02255DD8 ; =0x00002DCC - ldr r0, [r1, r0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x1d - bne _02255D44 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #2 - beq _02255D44 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #2 - beq _02255D44 - cmp r4, #0 - bne _02255D02 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255D02: - mov r0, #0xb - strb r0, [r4, #1] - mov r0, #0x27 - strh r0, [r4, #2] - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0x47 - str r0, [r4, #8] - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255D1E: - cmp r4, #0 - bne _02255D28 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255D28: - mov r0, #0xb - strb r0, [r4, #1] - mov r0, #0x27 - strh r0, [r4, #2] - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0x47 - str r0, [r4, #8] - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255D44: - mov r0, #0x2a - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #3 - add r3, r6, #0 - bl ov16_022555A4 - add r7, r0, #0 - beq _02255D9E - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #8 - beq _02255D78 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #8 - bne _02255D9E -_02255D78: - cmp r4, #0 - bne _02255D82 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255D82: - mov r0, #0xb - strb r0, [r4, #1] - mov r0, #0x27 - strh r0, [r4, #2] - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255560 - str r0, [r4, #4] - mov r0, #0x2a - str r0, [r4, #8] - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255D9E: - mov r0, #0xc0 - mul r0, r6 - add r3, r5, r0 - ldr r0, _02255DDC ; =0x00002DB0 - ldr r1, _02255DE0 ; =0x0400E000 - ldr r2, [r3, r0] - tst r2, r1 - bne _02255DB8 - add r0, #0x10 - ldr r2, [r3, r0] - lsr r0, r1, #0x10 - tst r0, r2 - beq _02255DD0 -_02255DB8: - cmp r4, #0 - bne _02255DC2 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255DC2: - mov r0, #0 - strb r0, [r4, #1] - ldr r0, _02255DE4 ; =0x0000031A - add sp, #0x14 - strh r0, [r4, #2] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255DD0: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02255DD8: .word 0x00002DCC -_02255DDC: .word 0x00002DB0 -_02255DE0: .word 0x0400E000 -_02255DE4: .word 0x0000031A - thumb_func_end ov16_02255C00 - - thumb_func_start ov16_02255DE8 -ov16_02255DE8: ; 0x02255DE8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r2, #0 - str r0, [sp] - bl ov16_0223DF0C - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02258AB8 - mov r6, #0 - cmp r0, #0x3f - bne _02255E1C - mov r0, #0x75 - lsl r0, r0, #2 - add r3, r5, r0 - lsl r2, r4, #6 - ldr r1, [r3, r2] - ldr r0, _02255EB4 ; =0xFFFFFE7F - mov r6, #1 - and r1, r0 - mov r0, #0x80 - orr r0, r1 - str r0, [r3, r2] - b _02255EB0 -_02255E1C: - mov r0, #0xa9 - lsl r0, r0, #2 - tst r0, r7 - beq _02255E28 - mov r6, #1 - b _02255EB0 -_02255E28: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x32 - bne _02255E4C - mov r1, #0x75 - lsl r1, r1, #2 - add r5, r5, r1 - lsl r3, r4, #6 - ldr r2, [r5, r3] - ldr r0, _02255EB4 ; =0xFFFFFE7F - sub r1, #0xd4 - and r0, r2 - orr r0, r1 - str r0, [r5, r3] - mov r6, #1 - b _02255EB0 -_02255E4C: - mov r0, #1 - add r1, r4, #0 - eor r1, r0 - mov r2, #0xc0 - add r3, r1, #0 - mul r3, r2 - add r1, r5, r3 - ldr r3, _02255EB8 ; =0x00002D46 - mul r2, r4 - add r2, r5, r2 - ldrh r1, [r1, r3] - ldrh r2, [r2, r3] - cmp r2, r1 - bhs _02255E96 - lsl r0, r2, #7 - bl sub_020E1F6C - ldr r1, _02255EBC ; =0x0000311E - ldrb r2, [r5, r1] - mov r1, #0x1e - mul r1, r2 - add r0, r1, r0 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, [sp] - bl ov16_0223F4BC - lsr r1, r0, #0x1f - lsl r2, r0, #0x18 - sub r2, r2, r1 - mov r0, #0x18 - ror r2, r0 - add r0, r1, r2 - cmp r7, r0 - ble _02255E98 - mov r6, #1 - b _02255E98 -_02255E96: - add r6, r0, #0 -_02255E98: - cmp r6, #0 - bne _02255EA8 - ldr r0, [sp] - add r1, r4, #0 - mov r2, #0 - mov r3, #0x62 - bl ov16_022666BC -_02255EA8: - ldr r0, _02255EBC ; =0x0000311E - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] -_02255EB0: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255EB4: .word 0xFFFFFE7F -_02255EB8: .word 0x00002D46 -_02255EBC: .word 0x0000311E - thumb_func_end ov16_02255DE8 - - thumb_func_start ov16_02255EC0 -ov16_02255EC0: ; 0x02255EC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_02255A4C - cmp r0, #0x36 - bne _02255EEA - mov r2, #0xc0 - mul r2, r4 - add r3, r5, r2 - ldr r2, _02255EF0 ; =0x00002DC8 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r2, [r3, r2] - ldr r1, [r5, r0] - mov r0, #1 - lsl r2, r2, #1 - and r1, r0 - lsr r2, r2, #0x1f - cmp r1, r2 - bne _02255EEC -_02255EEA: - mov r0, #0 -_02255EEC: - pop {r3, r4, r5, pc} - nop -_02255EF0: .word 0x00002DC8 - thumb_func_end ov16_02255EC0 - - thumb_func_start ov16_02255EF4 -ov16_02255EF4: ; 0x02255EF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - mov r1, #0 - str r0, [sp] - add r4, r2, #0 - add r5, r3, #0 - str r1, [sp, #4] - bl ov16_0223DF1C - str r0, [sp, #0xc] - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223E208 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - mov r7, #0 - cmp r0, #0 - ble _02255F5E - ldr r4, _02255F64 ; =0x00002D4C -_02255F1E: - ldr r0, [sp] - add r1, r7, #0 - bl ov16_0223E208 - ldr r1, [sp, #8] - cmp r1, r0 - beq _02255F54 - mov r0, #0xb7 - lsl r0, r0, #6 - ldr r1, [r6, r0] - mov r0, #2 - lsl r0, r0, #0xc - tst r0, r1 - beq _02255F54 - mov r1, #0 - add r2, r6, #0 -_02255F3E: - ldrh r0, [r2, r4] - cmp r5, r0 - beq _02255F4C - add r1, r1, #1 - add r2, r2, #2 - cmp r1, #4 - blt _02255F3E -_02255F4C: - cmp r1, #4 - beq _02255F54 - mov r0, #1 - str r0, [sp, #4] -_02255F54: - ldr r0, [sp, #0xc] - add r7, r7, #1 - add r6, #0xc0 - cmp r7, r0 - blt _02255F1E -_02255F5E: - ldr r0, [sp, #4] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255F64: .word 0x00002D4C - thumb_func_end ov16_02255EF4 - - thumb_func_start ov16_02255F68 -ov16_02255F68: ; 0x02255F68 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - mov r6, #0 - bl ov16_0223DF1C - add r3, r6, #0 - cmp r0, #0 - ble _02255F90 - mov r1, #0xb7 - lsl r1, r1, #6 -_02255F7E: - ldr r2, [r5, r1] - tst r2, r4 - beq _02255F88 - mov r6, #1 - b _02255F90 -_02255F88: - add r3, r3, #1 - add r5, #0xc0 - cmp r3, r0 - blt _02255F7E -_02255F90: - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02255F68 - - thumb_func_start ov16_02255F94 -ov16_02255F94: ; 0x02255F94 - ldr r2, _02255FB4 ; =0x0000216C - mov r0, #0 - str r0, [r1, r2] - add r0, r2, #0 - mov r3, #1 - sub r0, #0x1c - str r3, [r1, r0] - add r0, r2, #0 - sub r0, #0x30 - ldr r3, [r1, r0] - ldr r0, _02255FB8 ; =0xFFEFFFFF - sub r2, #0x30 - and r0, r3 - str r0, [r1, r2] - bx lr - nop -_02255FB4: .word 0x0000216C -_02255FB8: .word 0xFFEFFFFF - thumb_func_end ov16_02255F94 - - thumb_func_start ov16_02255FBC -ov16_02255FBC: ; 0x02255FBC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - str r1, [sp, #8] - bl ov16_0223DF1C - mov r2, #0 - str r0, [sp, #0x14] - cmp r0, #0 - ble _02255FE0 - ldr r1, _02256040 ; =0x000021EC -_02255FD2: - ldr r0, [sp, #8] - add r0, r0, r2 - strb r2, [r0, r1] - ldr r0, [sp, #0x14] - add r2, r2, #1 - cmp r2, r0 - blt _02255FD2 -_02255FE0: - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - sub r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #0 - ble _0225603C -_02255FEE: - ldr r0, [sp, #0x10] - add r4, r0, #1 - ldr r0, [sp, #0x14] - cmp r4, r0 - bge _02256030 - ldr r1, [sp, #8] - ldr r0, [sp, #0x10] - add r6, r1, r0 -_02255FFE: - ldr r0, _02256040 ; =0x000021EC - ldr r1, [sp, #8] - ldrb r0, [r6, r0] - str r0, [sp, #0xc] - ldr r0, [sp, #8] - ldr r2, [sp, #0xc] - add r7, r0, r4 - ldr r0, _02256040 ; =0x000021EC - ldrb r5, [r7, r0] - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r5, #0 - bl ov16_02252EC8 - cmp r0, #0 - beq _02256028 - ldr r0, _02256040 ; =0x000021EC - ldr r1, [sp, #0xc] - strb r5, [r6, r0] - strb r1, [r7, r0] -_02256028: - ldr r0, [sp, #0x14] - add r4, r4, #1 - cmp r4, r0 - blt _02255FFE -_02256030: - ldr r0, [sp, #0x10] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [sp, #0x10] - cmp r1, r0 - blt _02255FEE -_0225603C: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02256040: .word 0x000021EC - thumb_func_end ov16_02255FBC - - thumb_func_start ov16_02256044 -ov16_02256044: ; 0x02256044 - push {r3, r4} - mov r2, #6 - lsl r2, r2, #6 - ldr r2, [r1, r2] - mov r1, #7 - lsl r1, r1, #0xc - mov r0, #0 - tst r1, r2 - beq _0225606E - ldr r4, _02256074 ; =0x0226EBD4 - add r2, r0, #0 -_0225605A: - ldrh r1, [r4] - cmp r3, r1 - bne _02256066 - mov r0, #1 - pop {r3, r4} - bx lr -_02256066: - add r2, r2, #1 - add r4, r4, #2 - cmp r2, #6 - blo _0225605A -_0225606E: - pop {r3, r4} - bx lr - nop -_02256074: .word 0x0226EBD4 - thumb_func_end ov16_02256044 - - thumb_func_start ov16_02256078 -ov16_02256078: ; 0x02256078 - push {r3, r4} - mov r4, #0xc0 - mul r4, r2 - add r2, r1, r4 - ldr r1, _022560A8 ; =0x00002DCC - mov r0, #0 - ldr r1, [r2, r1] - lsl r1, r1, #0xd - lsr r1, r1, #0x1d - beq _022560A4 - ldr r4, _022560AC ; =0x0226EBFA - add r2, r0, #0 -_02256090: - ldrh r1, [r4] - cmp r3, r1 - bne _0225609C - mov r0, #1 - pop {r3, r4} - bx lr -_0225609C: - add r2, r2, #1 - add r4, r4, #2 - cmp r2, #0xe - blo _02256090 -_022560A4: - pop {r3, r4} - bx lr - ; .align 2, 0 -_022560A8: .word 0x00002DCC -_022560AC: .word 0x0226EBFA - thumb_func_end ov16_02256078 - - thumb_func_start ov16_022560B0 -ov16_022560B0: ; 0x022560B0 - push {r4, r5, r6, r7} - mov r0, #0xc1 - lsl r0, r0, #6 - ldr r3, [r1, r0] - ldr r0, _02256118 ; =0x00000183 - cmp r3, r0 - beq _02256114 - ldr r4, [r1, #0x64] - mov r0, #0xc0 - add r2, r4, #0 - mul r2, r0 - ldr r4, _0225611C ; =0x00002DCC - add r0, r1, r2 - ldr r4, [r0, r4] - lsl r4, r4, #0x13 - lsr r7, r4, #0x1d - cmp r7, #4 - beq _02256114 - mov r6, #0 - cmp r7, #0 - bls _022560EA - ldr r4, _02256120 ; =0x00002DF0 -_022560DC: - ldrh r5, [r0, r4] - cmp r3, r5 - beq _02256114 - add r6, r6, #1 - add r0, r0, #2 - cmp r6, r7 - blo _022560DC -_022560EA: - add r2, r1, r2 - lsl r0, r6, #1 - add r2, r2, r0 - ldr r0, _02256120 ; =0x00002DF0 - strh r3, [r2, r0] - sub r0, #0x24 - add r2, r1, r0 - ldr r3, [r1, #0x64] - mov r0, #0xc0 - add r1, r3, #0 - mul r1, r0 - ldr r3, [r2, r1] - ldr r0, _02256124 ; =0xFFFFE3FF - and r0, r3 - lsl r3, r3, #0x13 - lsr r3, r3, #0x1d - add r3, r3, #1 - lsl r3, r3, #0x1d - lsr r3, r3, #0x13 - orr r0, r3 - str r0, [r2, r1] -_02256114: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_02256118: .word 0x00000183 -_0225611C: .word 0x00002DCC -_02256120: .word 0x00002DF0 -_02256124: .word 0xFFFFE3FF - thumb_func_end ov16_022560B0 - - thumb_func_start ov16_02256128 -ov16_02256128: ; 0x02256128 - mov r3, #0xc0 - mul r3, r2 - add r3, r1, r3 - ldr r1, _02256144 ; =0x00002D4C - mov r0, #0 -_02256132: - ldrh r2, [r3, r1] - cmp r2, #0 - beq _02256140 - add r0, r0, #1 - add r3, r3, #2 - cmp r0, #4 - blt _02256132 -_02256140: - bx lr - nop -_02256144: .word 0x00002D4C - thumb_func_end ov16_02256128 - - thumb_func_start ov16_02256148 -ov16_02256148: ; 0x02256148 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - mov r2, #0 - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp] - bl ov16_02255A4C - cmp r0, #0x60 - bne _02256160 - mov r6, #0 - b _02256174 -_02256160: - ldr r0, _022562C4 ; =0x00002160 - ldr r6, [r5, r0] - cmp r6, #0 - bne _02256174 - ldr r0, _022562C8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022562CC ; =0x000003E2 - ldrb r6, [r1, r0] -_02256174: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - mov r3, #0xa - bl ov16_02255AB4 - cmp r0, #1 - bne _022561A4 - cmp r6, #0xd - bne _022561A4 - cmp r7, r4 - beq _022561A4 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _022562D0 ; =0x00002D90 - ldr r0, [r1, r0] - mov r1, #4 - bl ov16_022563F8 - ldr r1, _022562D4 ; =0x0000215C - str r0, [r5, r1] - mov r0, #0xb2 - str r0, [sp] -_022561A4: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - mov r3, #0xb - bl ov16_02255AB4 - cmp r0, #1 - bne _022561EA - cmp r6, #0xb - bne _022561EA - ldr r0, _022562D8 ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #0x20 - tst r0, r1 - bne _022561EA - ldr r0, _022562C8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022562DC ; =0x000003E1 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _022561EA - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _022562D0 ; =0x00002D90 - ldr r0, [r1, r0] - mov r1, #4 - bl ov16_022563F8 - ldr r1, _022562D4 ; =0x0000215C - str r0, [r5, r1] - mov r0, #0xb2 - str r0, [sp] -_022561EA: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - mov r3, #0x12 - bl ov16_02255AB4 - cmp r0, #1 - bne _02256230 - cmp r6, #0xa - bne _02256230 - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _022562E0 ; =0x00002DAC - ldr r0, [r1, r0] - mov r1, #0x20 - tst r0, r1 - bne _02256230 - ldr r0, _022562D8 ; =0x0000213C - ldr r0, [r5, r0] - tst r0, r1 - bne _02256230 - ldr r0, _022562C8 ; =0x00003044 - ldr r3, [r5, r0] - lsl r0, r3, #4 - add r2, r5, r0 - ldr r0, _022562DC ; =0x000003E1 - ldrb r0, [r2, r0] - cmp r0, #0 - bne _0225622C - add r1, #0xe5 - cmp r3, r1 - bne _02256230 -_0225622C: - mov r0, #0xb3 - str r0, [sp] -_02256230: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - mov r3, #0x2b - bl ov16_02255AB4 - cmp r0, #1 - bne _0225625C - ldr r0, _022562C8 ; =0x00003044 - ldr r2, _022562E4 ; =0x02270B8C - ldr r3, [r5, r0] - mov r1, #0 -_02256248: - ldrh r0, [r2] - cmp r3, r0 - bne _02256254 - mov r0, #0xb5 - str r0, [sp] - b _0225625C -_02256254: - add r1, r1, #1 - add r2, r2, #2 - cmp r1, #0xc - blo _02256248 -_0225625C: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - mov r3, #0x4e - bl ov16_02255AB4 - cmp r0, #1 - bne _02256278 - cmp r6, #0xd - bne _02256278 - cmp r7, r4 - beq _02256278 - mov r0, #0xb6 - str r0, [sp] -_02256278: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - mov r3, #0x57 - bl ov16_02255AB4 - cmp r0, #1 - bne _022562BE - cmp r6, #0xb - bne _022562BE - ldr r0, _022562D8 ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #0x20 - tst r0, r1 - bne _022562BE - ldr r0, _022562C8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022562DC ; =0x000003E1 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _022562BE - mov r0, #0xc0 - mul r0, r4 - add r1, r5, r0 - ldr r0, _022562D0 ; =0x00002D90 - ldr r0, [r1, r0] - mov r1, #4 - bl ov16_022563F8 - ldr r1, _022562D4 ; =0x0000215C - str r0, [r5, r1] - mov r0, #0xb2 - str r0, [sp] -_022562BE: - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - nop -_022562C4: .word 0x00002160 -_022562C8: .word 0x00003044 -_022562CC: .word 0x000003E2 -_022562D0: .word 0x00002D90 -_022562D4: .word 0x0000215C -_022562D8: .word 0x0000213C -_022562DC: .word 0x000003E1 -_022562E0: .word 0x00002DAC -_022562E4: .word 0x02270B8C - thumb_func_end ov16_02256148 - - thumb_func_start ov16_022562E8 -ov16_022562E8: ; 0x022562E8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r4, r2, #0 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r6, #0 - bl ov16_02255A4C - cmp r0, #3 - beq _02256306 - cmp r0, #0x3d - beq _0225634C - b _022563CE -_02256306: - mov r2, #0xc0 - add r0, r4, #0 - mul r0, r2 - ldr r3, _022563EC ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r3] - cmp r1, #0 - beq _022563CE - add r1, r3, #0 - sub r1, #0x31 - ldrsb r1, [r0, r1] - cmp r1, #0xc - bge _022563CE - add r2, #0x90 - ldr r1, [r5, r2] - add r3, #0x48 - ldr r0, [r0, r3] - add r1, r1, #1 - cmp r1, r0 - beq _022563CE - add r0, r5, #0 - mov r1, #0x11 - add r0, #0x8c - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x94 - str r4, [r0, #0] - mov r0, #0xc - str r0, [sp, #4] - mov r6, #1 - b _022563CE -_0225634C: - ldr r1, _022563F0 ; =0x00002DAC - mov r0, #0xc0 - add r7, r4, #0 - mul r7, r0 - add r0, r5, r1 - str r0, [sp, #8] - ldr r0, [r0, r7] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - beq _022563CE - add r0, r5, r7 - sub r1, #0x20 - ldr r0, [r0, r1] - cmp r0, #0 - beq _022563CE - ldr r0, [sp] - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #3 - bge _022563CE - ldr r0, [sp, #8] - mov r1, #7 - ldr r0, [r0, r7] - tst r1, r0 - beq _0225638E - mov r0, #0x13 - add r1, r6, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - b _022563C2 -_0225638E: - ldr r1, _022563F4 ; =0x00000F88 - tst r1, r0 - beq _0225639E - mov r0, #0x13 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r5, r0] - b _022563C2 -_0225639E: - mov r1, #0x10 - tst r1, r0 - beq _022563AE - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r5, r0] - b _022563C2 -_022563AE: - mov r1, #0x40 - tst r0, r1 - beq _022563BC - mov r0, #3 - add r1, #0xf0 - str r0, [r5, r1] - b _022563C2 -_022563BC: - mov r0, #4 - add r1, #0xf0 - str r0, [r5, r1] -_022563C2: - mov r0, #0x46 - lsl r0, r0, #2 - str r4, [r5, r0] - mov r0, #0xbe - str r0, [sp, #4] - mov r6, #1 -_022563CE: - cmp r6, #1 - bne _022563E4 - ldr r2, [sp, #4] - add r0, r5, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r5, #8] - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] -_022563E4: - add r0, r6, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022563EC: .word 0x00002D8C -_022563F0: .word 0x00002DAC -_022563F4: .word 0x00000F88 - thumb_func_end ov16_022562E8 - - thumb_func_start ov16_022563F8 -ov16_022563F8: ; 0x022563F8 - push {r4, lr} - cmp r0, #0 - beq _02256412 - bge _02256406 - mov r4, #0 - mvn r4, r4 - b _02256408 -_02256406: - mov r4, #1 -_02256408: - bl sub_020E1F6C - cmp r0, #0 - bne _02256412 - add r0, r4, #0 -_02256412: - pop {r4, pc} - thumb_func_end ov16_022563F8 - - thumb_func_start ov16_02256414 -ov16_02256414: ; 0x02256414 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xd0 - add r6, r0, #0 - add r5, r1, #0 - bl ov16_0223DF1C - str r0, [sp, #0x80] - mov r0, #0 - str r0, [sp, #0x84] - str r0, [sp, #0xcc] - thumb_func_end ov16_02256414 - - thumb_func_start ov34_02256428 -ov34_02256428: ; 0x02256428 - ldr r0, [r5, #0x58] - cmp r0, #0xf - bls _02256432 - bl _02257008 -_02256432: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225643E: ; jump table - .short _0225645E - _0225643E - 2 ; case 0 - .short _022564FE - _0225643E - 2 ; case 1 - .short _022565C2 - _0225643E - 2 ; case 2 - .short _022566D2 - _0225643E - 2 ; case 3 - .short _02256778 - _0225643E - 2 ; case 4 - .short _022568AA - _0225643E - 2 ; case 5 - .short _022569EA - _0225643E - 2 ; case 6 - .short _02256BFC - _0225643E - 2 ; case 7 - .short _02256D54 - _0225643E - 2 ; case 8 - .short _02256E2C - _0225643E - 2 ; case 9 - .short _02256EA0 - _0225643E - 2 ; case 10 - .short _02256F2E - _0225643E - 2 ; case 11 - .short _02256F4A - _0225643E - 2 ; case 12 - .short _02256F84 - _0225643E - 2 ; case 13 - .short _02256FC0 - _0225643E - 2 ; case 14 - .short _02257000 - _0225643E - 2 ; case 15 -_0225645E: - ldr r0, _02256748 ; =0x00003121 - ldrb r0, [r5, r0] - cmp r0, #0 - bne _022564F4 - add r0, r6, #0 - bl ov16_0223F21C - ldr r1, _0225674C ; =0x000003E9 - cmp r0, r1 - bgt _022564A4 - bge _022564D6 - cmp r0, #0xf - bhi _022564E8 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02256484: ; jump table - .short _022564E8 - _02256484 - 2 ; case 0 - .short _022564E8 - _02256484 - 2 ; case 1 - .short _022564AC - _02256484 - 2 ; case 2 - .short _022564AC - _02256484 - 2 ; case 3 - .short _022564AC - _02256484 - 2 ; case 4 - .short _022564B6 - _02256484 - 2 ; case 5 - .short _022564B6 - _02256484 - 2 ; case 6 - .short _022564B6 - _02256484 - 2 ; case 7 - .short _022564E8 - _02256484 - 2 ; case 8 - .short _022564E8 - _02256484 - 2 ; case 9 - .short _022564C2 - _02256484 - 2 ; case 10 - .short _022564E8 - _02256484 - 2 ; case 11 - .short _022564E8 - _02256484 - 2 ; case 12 - .short _022564E8 - _02256484 - 2 ; case 13 - .short _022564CC - _02256484 - 2 ; case 14 - .short _022564CC - _02256484 - 2 ; case 15 -_022564A4: - ldr r1, _02256750 ; =0x000003EA - cmp r0, r1 - beq _022564E0 - b _022564E8 -_022564AC: - ldr r0, _02256754 ; =0x0000010F - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022564E8 -_022564B6: - mov r0, #0x11 - lsl r0, r0, #4 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022564E8 -_022564C2: - ldr r0, _02256758 ; =0x00000111 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022564E8 -_022564CC: - ldr r0, _0225675C ; =0x00000112 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022564E8 -_022564D6: - ldr r0, _02256760 ; =0x00000126 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022564E8 -_022564E0: - ldr r0, _02256764 ; =0x00000127 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] -_022564E8: - ldr r0, [sp, #0x84] - cmp r0, #1 - bne _022564F4 - ldr r0, _02256748 ; =0x00003121 - mov r1, #1 - strb r1, [r5, r0] -_022564F4: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - bl _02257008 -_022564FE: - ldr r0, [sp, #0x80] - mov r7, #0 - cmp r0, #0 - ble _022565AE - ldr r0, _02256768 ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0x90] -_0225650C: - ldr r0, _0225676C ; =0x000021EC - add r1, r5, r7 - ldrb r4, [r1, r0] - add r0, r6, #0 - mov r2, #0 - add r1, r4, #0 - bl ov16_0223E2A4 - str r0, [sp, #0x88] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #2 - bl ov16_0223E2A4 - add r3, r0, #0 - ldr r2, [sp, #0x88] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_0225B840 - mov r1, #0x12 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #0xc0 - mul r0, r4 - ldr r1, [sp, #0x90] - str r0, [sp, #0x8c] - ldr r0, [r1, r0] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - bne _022565A6 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r5, r0] - cmp r1, #0xff - beq _022565A6 - ldr r0, [sp, #0x8c] - ldr r2, _02256770 ; =0x00002D8C - add r0, r5, r0 - ldr r2, [r0, r2] - cmp r2, #0 - beq _022565A6 - ldr r2, _02256774 ; =0x00002DB8 - ldrh r0, [r0, r2] - cmp r0, #0x70 - beq _022565A6 - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - add r0, r2, #0 - sub r0, #0x2c - ldr r0, [r1, r0] - cmp r0, #0 - beq _022565A6 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x24 - bne _022565A6 - ldr r1, [sp, #0x90] - ldr r0, [sp, #0x8c] - ldr r1, [r1, r0] - mov r0, #4 - add r2, r1, #0 - orr r2, r0 - ldr r1, [sp, #0x90] - ldr r0, [sp, #0x8c] - str r2, [r1, r0] - mov r0, #0x46 - lsl r0, r0, #2 - str r4, [r5, r0] - mov r0, #0xbb - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022565AE -_022565A6: - ldr r0, [sp, #0x80] - add r7, r7, #1 - cmp r7, r0 - blt _0225650C -_022565AE: - ldr r0, [sp, #0x80] - cmp r7, r0 - beq _022565B8 - bl _02257008 -_022565B8: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - bl _02257008 -_022565C2: - mov r0, #0 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x80] - cmp r0, #0 - ble _022566C0 - ldr r0, _02256768 ; =0x00002D68 - add r7, r5, r0 - mov r0, #1 - str r0, [sp, #0xbc] - str r0, [sp, #0xb8] - str r0, [sp, #0xb4] - str r0, [sp, #0xb0] -_022565DA: - ldr r0, [sp, #0x2c] - add r1, r5, r0 - ldr r0, _0225676C ; =0x000021EC - ldrb r1, [r1, r0] - mov r0, #0xc0 - add r4, r1, #0 - mul r4, r0 - ldr r0, [r7, r4] - str r1, [sp, #0x10] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _022566A4 - ldr r0, _02256770 ; =0x00002D8C - add r1, r5, r4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022566A4 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x2d - bgt _02256610 - bge _02256640 - cmp r0, #2 - beq _0225661E - b _022566A4 -_02256610: - cmp r0, #0x46 - bgt _02256618 - beq _02256662 - b _022566A4 -_02256618: - cmp r0, #0x75 - beq _02256684 - b _022566A4 -_0225661E: - ldr r0, [r7, r4] - ldr r1, [sp, #0xb0] - bic r0, r1 - mov r1, #1 - orr r0, r1 - str r0, [r7, r4] - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #2 - tst r0, r1 - bne _022566A4 - mov r0, #0xb7 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022566A4 -_02256640: - ldr r0, [r7, r4] - ldr r1, [sp, #0xb4] - bic r0, r1 - mov r1, #1 - orr r0, r1 - str r0, [r7, r4] - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #8 - tst r0, r1 - bne _022566A4 - mov r0, #0xb8 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022566A4 -_02256662: - ldr r0, [r7, r4] - ldr r1, [sp, #0xb8] - bic r0, r1 - mov r1, #1 - orr r0, r1 - str r0, [r7, r4] - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x20 - tst r0, r1 - bne _022566A4 - mov r0, #0xb9 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _022566A4 -_02256684: - ldr r0, [r7, r4] - ldr r1, [sp, #0xbc] - bic r0, r1 - mov r1, #1 - orr r0, r1 - str r0, [r7, r4] - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x80 - tst r0, r1 - bne _022566A4 - mov r0, #0xfc - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] -_022566A4: - ldr r0, [sp, #0x84] - cmp r0, #1 - bne _022566B4 - mov r1, #0x46 - ldr r0, [sp, #0x10] - lsl r1, r1, #2 - str r0, [r5, r1] - b _022566C0 -_022566B4: - ldr r0, [sp, #0x2c] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x2c] - cmp r1, r0 - blt _022565DA -_022566C0: - ldr r1, [sp, #0x2c] - ldr r0, [sp, #0x80] - cmp r1, r0 - bne _0225673A - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - bl _02257008 -_022566D2: - ldr r0, [sp, #0x80] - mov r4, #0 - cmp r0, #0 - ble _02256734 - ldr r0, _02256768 ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0x94] -_022566E0: - ldr r0, _0225676C ; =0x000021EC - add r1, r5, r4 - ldrb r1, [r1, r0] - mov r0, #0xc0 - add r7, r1, #0 - mul r7, r0 - ldr r0, [sp, #0x94] - str r1, [sp, #0x14] - ldr r0, [r0, r7] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - bne _0225672C - ldr r0, _02256770 ; =0x00002D8C - add r1, r5, r7 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225672C - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x16 - bne _0225672C - ldr r0, [sp, #0x94] - ldr r1, [r0, r7] - mov r0, #2 - orr r1, r0 - ldr r0, [sp, #0x94] - str r1, [r0, r7] - mov r1, #0x46 - ldr r0, [sp, #0x14] - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xba - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256734 -_0225672C: - ldr r0, [sp, #0x80] - add r4, r4, #1 - cmp r4, r0 - blt _022566E0 -_02256734: - ldr r0, [sp, #0x80] - cmp r4, r0 - beq _0225673E -_0225673A: - bl _02257008 -_0225673E: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - bl _02257008 - ; .align 2, 0 -_02256748: .word 0x00003121 -_0225674C: .word 0x000003E9 -_02256750: .word 0x000003EA -_02256754: .word 0x0000010F -_02256758: .word 0x00000111 -_0225675C: .word 0x00000112 -_02256760: .word 0x00000126 -_02256764: .word 0x00000127 -_02256768: .word 0x00002D68 -_0225676C: .word 0x000021EC -_02256770: .word 0x00002D8C -_02256774: .word 0x00002DB8 -_02256778: - mov r0, #0 - str r0, [sp, #0x30] - ldr r0, [sp, #0x80] - cmp r0, #0 - bgt _02256784 - b _02256898 -_02256784: - ldr r0, _02256A8C ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0x9c] -_0225678A: - ldr r0, [sp, #0x30] - add r1, r5, r0 - ldr r0, _02256A90 ; =0x000021EC - ldrb r1, [r1, r0] - mov r0, #0xc0 - mul r0, r1 - str r1, [sp, #0x18] - ldr r1, [sp, #0x9c] - str r0, [sp, #0x98] - ldr r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - bne _0225688A - ldr r0, [sp, #0x98] - add r1, r5, r0 - ldr r0, _02256A94 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225688A - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x58 - bne _0225688A - mov r0, #0 - str r0, [sp, #0x78] - str r0, [sp, #0x74] - str r0, [sp, #0x7c] - ldr r0, [sp, #0x80] - cmp r0, #0 - ble _02256844 - add r4, r5, #0 -_022567CC: - ldr r1, [sp, #0x18] - add r0, r6, #0 - bl ov16_0223E208 - add r7, r0, #0 - ldr r1, [sp, #0x7c] - add r0, r6, #0 - bl ov16_0223E208 - cmp r7, r0 - beq _02256836 - ldr r0, _02256A98 ; =0x00002DB0 - ldr r1, [r4, r0] - mov r0, #1 - lsl r0, r0, #0x18 - tst r0, r1 - bne _02256836 - ldr r0, _02256A94 ; =0x00002D8C - ldr r0, [r4, r0] - cmp r0, #0 - beq _02256836 - ldr r0, _02256A9C ; =0x00002D5A - ldrsb r0, [r4, r0] - lsl r2, r0, #1 - ldr r0, _02256AA0 ; =0x0226EBE0 - add r1, r0, r2 - ldr r0, _02256AA4 ; =0x00002D44 - ldrb r1, [r1, #1] - ldrh r3, [r4, r0] - ldr r0, _02256AA0 ; =0x0226EBE0 - ldrb r0, [r0, r2] - mul r0, r3 - bl sub_020E1F6C - ldr r1, [sp, #0x78] - add r0, r1, r0 - str r0, [sp, #0x78] - ldr r0, _02256AA8 ; =0x00002D5D - ldrsb r0, [r4, r0] - lsl r2, r0, #1 - ldr r0, _02256AA0 ; =0x0226EBE0 - add r1, r0, r2 - ldr r0, _02256AAC ; =0x00002D4A - ldrb r1, [r1, #1] - ldrh r3, [r4, r0] - ldr r0, _02256AA0 ; =0x0226EBE0 - ldrb r0, [r0, r2] - mul r0, r3 - bl sub_020E1F6C - ldr r1, [sp, #0x74] - add r0, r1, r0 - str r0, [sp, #0x74] -_02256836: - ldr r0, [sp, #0x7c] - add r4, #0xc0 - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x7c] - cmp r1, r0 - blt _022567CC -_02256844: - ldr r1, [sp, #0x9c] - ldr r0, [sp, #0x98] - ldr r1, [r1, r0] - mov r0, #8 - add r2, r1, #0 - orr r2, r0 - ldr r1, [sp, #0x9c] - ldr r0, [sp, #0x98] - str r2, [r1, r0] - ldr r1, [sp, #0x78] - ldr r0, [sp, #0x74] - add r0, r1, r0 - beq _0225688A - ldr r0, [sp, #0x74] - cmp r1, r0 - blt _02256868 - mov r1, #0x12 - b _0225686A -_02256868: - mov r1, #0xf -_0225686A: - add r0, r5, #0 - add r0, #0x8c - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r1, r5, #0 - ldr r0, [sp, #0x18] - add r1, #0x94 - str r0, [r1, #0] - mov r0, #0xc - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256898 -_0225688A: - ldr r0, [sp, #0x30] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x30] - cmp r1, r0 - bge _02256898 - b _0225678A -_02256898: - ldr r1, [sp, #0x30] - ldr r0, [sp, #0x80] - cmp r1, r0 - beq _022568A2 - b _02257008 -_022568A2: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_022568AA: - mov r0, #0 - str r0, [sp, #0x34] - ldr r0, [sp, #0x80] - cmp r0, #0 - bgt _022568B6 - b _022569D8 -_022568B6: - ldr r0, _02256A8C ; =0x00002D68 - add r7, r5, r0 -_022568BA: - ldr r0, [sp, #0x34] - add r1, r5, r0 - ldr r0, _02256A90 ; =0x000021EC - ldrb r1, [r1, r0] - mov r0, #0xc0 - add r4, r1, #0 - mul r4, r0 - ldr r0, [r7, r4] - str r1, [sp, #0x1c] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1f - bne _022569CA - ldr r0, _02256A94 ; =0x00002D8C - add r1, r5, r4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022569CA - ldr r1, [sp, #0x1c] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x6b - bne _022569CA - ldr r1, [r7, r4] - mov r0, #0x10 - orr r0, r1 - str r0, [r7, r4] - mov r0, #0 - str r0, [sp, #0x70] - ldr r0, [sp, #0x80] - cmp r0, #0 - ble _022569B6 - add r0, r5, r4 - str r5, [sp, #0x50] - str r0, [sp, #0x4c] -_02256900: - ldr r1, [sp, #0x1c] - add r0, r6, #0 - bl ov16_0223E208 - add r4, r0, #0 - ldr r1, [sp, #0x70] - add r0, r6, #0 - bl ov16_0223E208 - cmp r4, r0 - beq _022569A4 - ldr r1, [sp, #0x50] - ldr r0, _02256A94 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _022569A4 - mov r0, #0 - str r0, [sp, #0x6c] - add r7, r1, #0 -_02256926: - ldr r0, _02256AB0 ; =0x00002D4C - ldrh r4, [r7, r0] - cmp r4, #0 - beq _02256992 - mov r0, #0 - str r0, [sp, #0xc8] - ldr r0, [sp, #0x70] - add r1, r5, #0 - str r0, [sp] - ldr r0, [sp, #0x1c] - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, _02256AB4 ; =0x00002144 - mov r3, #0 - ldr r0, [r5, r0] - str r0, [sp, #8] - add r0, sp, #0xc8 - str r0, [sp, #0xc] - add r0, r6, #0 - bl ov16_02254FA8 - ldr r1, _02256AB4 ; =0x00002144 - str r0, [r5, r1] - ldr r1, [sp, #0xc8] - mov r0, #8 - tst r0, r1 - bne _02256992 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225B8E4 - cmp r0, #0 - bne _02256992 - ldr r1, [sp, #0xc8] - mov r0, #2 - tst r0, r1 - bne _0225698C - lsl r0, r4, #4 - add r1, r5, r0 - ldr r0, _02256AB8 ; =0x000003DE - ldrh r0, [r1, r0] - cmp r0, #0x26 - bne _02256992 - ldr r1, [sp, #0x4c] - ldr r0, _02256ABC ; =0x00002D74 - ldr r2, [sp, #0x50] - ldrb r0, [r1, r0] - ldr r1, _02256ABC ; =0x00002D74 - ldrb r1, [r2, r1] - cmp r0, r1 - bhi _02256992 -_0225698C: - mov r0, #1 - str r0, [sp, #0x84] - b _0225699E -_02256992: - ldr r0, [sp, #0x6c] - add r7, r7, #2 - add r0, r0, #1 - str r0, [sp, #0x6c] - cmp r0, #4 - blt _02256926 -_0225699E: - ldr r0, [sp, #0x84] - cmp r0, #1 - beq _022569B6 -_022569A4: - ldr r0, [sp, #0x50] - add r0, #0xc0 - str r0, [sp, #0x50] - ldr r0, [sp, #0x70] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x70] - cmp r1, r0 - blt _02256900 -_022569B6: - ldr r0, [sp, #0x84] - cmp r0, #1 - bne _022569D8 - mov r1, #0x46 - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xc2 - str r0, [sp, #0xcc] - b _022569D8 -_022569CA: - ldr r0, [sp, #0x34] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x34] - cmp r1, r0 - bge _022569D8 - b _022568BA -_022569D8: - ldr r1, [sp, #0x34] - ldr r0, [sp, #0x80] - cmp r1, r0 - beq _022569E2 - b _02257008 -_022569E2: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_022569EA: - mov r0, #0 - str r0, [sp, #0x38] - ldr r0, [sp, #0x80] - cmp r0, #0 - bgt _022569F6 - b _02256BEA -_022569F6: - ldr r0, _02256A8C ; =0x00002D68 - add r7, r5, r0 -_022569FA: - ldr r0, [sp, #0x38] - add r1, r5, r0 - ldr r0, _02256A90 ; =0x000021EC - ldrb r1, [r1, r0] - mov r0, #0xc0 - add r4, r1, #0 - mul r4, r0 - ldr r0, [r7, r4] - str r1, [sp, #0x20] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - bne _02256A28 - ldr r0, _02256A94 ; =0x00002D8C - add r1, r5, r4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02256A28 - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x6c - beq _02256A2A -_02256A28: - b _02256BDC -_02256A2A: - ldr r1, [r7, r4] - mov r0, #0x20 - orr r0, r1 - str r0, [r7, r4] - mov r4, #0 - ldr r0, [sp, #0x80] - str r4, [sp, #0x5c] - str r4, [sp, #0x68] - cmp r0, #0 - bgt _02256A40 - b _02256B76 -_02256A40: - str r5, [sp, #0x58] -_02256A42: - ldr r1, [sp, #0x20] - add r0, r6, #0 - bl ov16_0223E208 - add r7, r0, #0 - ldr r1, [sp, #0x68] - add r0, r6, #0 - bl ov16_0223E208 - cmp r7, r0 - bne _02256A5A - b _02256B62 -_02256A5A: - ldr r1, [sp, #0x58] - ldr r0, _02256A94 ; =0x00002D8C - ldr r1, [r1, r0] - cmp r1, #0 - beq _02256B62 - ldr r0, [sp, #0x5c] - add r0, r0, r1 - str r0, [sp, #0x5c] - mov r0, #0 - str r0, [sp, #0x64] - ldr r0, [sp, #0x58] - str r0, [sp, #0x54] -_02256A72: - ldr r1, [sp, #0x54] - ldr r0, _02256AB0 ; =0x00002D4C - ldrh r7, [r1, r0] - ldr r1, _02256AC0 ; =0x000003E1 - lsl r0, r7, #4 - add r0, r5, r0 - ldrb r1, [r0, r1] - str r1, [sp, #0x60] - cmp r1, #1 - bne _02256B34 - ldr r1, _02256AB8 ; =0x000003DE - b _02256AC4 - nop -_02256A8C: .word 0x00002D68 -_02256A90: .word 0x000021EC -_02256A94: .word 0x00002D8C -_02256A98: .word 0x00002DB0 -_02256A9C: .word 0x00002D5A -_02256AA0: .word 0x0226EBE0 -_02256AA4: .word 0x00002D44 -_02256AA8: .word 0x00002D5D -_02256AAC: .word 0x00002D4A -_02256AB0: .word 0x00002D4C -_02256AB4: .word 0x00002144 -_02256AB8: .word 0x000003DE -_02256ABC: .word 0x00002D74 -_02256AC0: .word 0x000003E1 -_02256AC4: - ldrh r0, [r0, r1] - cmp r0, #0x59 - bgt _02256AD2 - bge _02256AFC - cmp r0, #0x26 - beq _02256AE0 - b _02256B18 -_02256AD2: - cmp r0, #0x90 - bgt _02256ADA - beq _02256AFC - b _02256B18 -_02256ADA: - cmp r0, #0xe3 - beq _02256AFC - b _02256B18 -_02256AE0: - cmp r4, #0x96 - blo _02256AF2 - bne _02256B52 - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _02256B52 -_02256AF2: - mov r4, #0x96 - add r0, r4, #0 - add r0, #0x8e - str r7, [r5, r0] - b _02256B52 -_02256AFC: - cmp r4, #0x78 - blo _02256B0E - bne _02256B52 - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _02256B52 -_02256B0E: - mov r4, #0x78 - add r0, r4, #0 - add r0, #0xac - str r7, [r5, r0] - b _02256B52 -_02256B18: - cmp r4, #0x50 - blo _02256B2A - bne _02256B52 - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _02256B52 -_02256B2A: - mov r4, #0x50 - add r0, r4, #0 - add r0, #0xd4 - str r7, [r5, r0] - b _02256B52 -_02256B34: - add r0, r1, #0 - cmp r4, r0 - blo _02256B4A - cmp r4, r0 - bne _02256B52 - add r0, r6, #0 - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _02256B52 -_02256B4A: - mov r0, #0x49 - lsl r0, r0, #2 - ldr r4, [sp, #0x60] - str r7, [r5, r0] -_02256B52: - ldr r0, [sp, #0x54] - add r0, r0, #2 - str r0, [sp, #0x54] - ldr r0, [sp, #0x64] - add r0, r0, #1 - str r0, [sp, #0x64] - cmp r0, #4 - blt _02256A72 -_02256B62: - ldr r0, [sp, #0x58] - add r0, #0xc0 - str r0, [sp, #0x58] - ldr r0, [sp, #0x68] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x68] - cmp r1, r0 - bge _02256B76 - b _02256A42 -_02256B76: - cmp r4, #0 - beq _02256B8C - mov r1, #0x46 - ldr r0, [sp, #0x20] - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xc3 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256BEA -_02256B8C: - ldr r0, [sp, #0x5c] - cmp r0, #0 - beq _02256BEA - ldr r2, [sp, #0x20] - add r0, r6, #0 - add r1, r5, #0 - bl ov16_02257028 - add r7, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov16_02256128 - add r4, r0, #0 - add r0, r6, #0 - bl ov16_0223F4BC - add r1, r4, #0 - bl sub_020E1F6C - mov r0, #0xc0 - add r2, r7, #0 - mul r2, r0 - lsl r3, r1, #1 - add r1, r5, r2 - add r2, r3, r1 - ldr r1, _02256EB4 ; =0x00002D4C - ldrh r2, [r2, r1] - add r1, r0, #0 - add r1, #0x64 - str r2, [r5, r1] - ldr r1, [sp, #0x20] - add r0, #0x58 - str r1, [r5, r0] - mov r0, #0xc3 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256BEA -_02256BDC: - ldr r0, [sp, #0x38] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x38] - cmp r1, r0 - bge _02256BEA - b _022569FA -_02256BEA: - ldr r1, [sp, #0x38] - ldr r0, [sp, #0x80] - cmp r1, r0 - beq _02256BF4 - b _02257008 -_02256BF4: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256BFC: - mov r0, #0 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x80] - cmp r0, #0 - bgt _02256C08 - b _02256D42 -_02256C08: - ldr r0, _02256EB8 ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0xa0] -_02256C0E: - ldr r0, [sp, #0x3c] - add r1, r5, r0 - ldr r0, _02256EBC ; =0x000021EC - ldrb r4, [r1, r0] - mov r0, #0xc0 - add r7, r4, #0 - mul r7, r0 - ldr r0, [sp, #0xa0] - ldr r0, [r0, r7] - lsl r0, r0, #0x17 - lsr r0, r0, #0x1f - bne _02256D22 - ldr r0, _02256EC0 ; =0x00002D8C - add r1, r5, r7 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02256D22 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x77 - bne _02256D22 - ldr r0, [sp, #0xa0] - ldr r1, [r0, r7] - mov r0, #1 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, [sp, #0xa0] - str r1, [r0, r7] - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02256CFC - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - bl ov16_0223E2A4 - str r0, [sp, #0xc0] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #2 - bl ov16_0223E2A4 - ldr r2, [sp, #0xc0] - mov r1, #0xc0 - mul r1, r2 - ldr r2, _02256EC0 ; =0x00002D8C - add r1, r5, r1 - ldr r3, [r1, r2] - str r0, [sp, #0xc4] - cmp r3, #0 - beq _02256CC0 - add r2, #0x2c - ldrh r2, [r1, r2] - cmp r2, #0 - beq _02256CC0 - mov r2, #0xc0 - mul r2, r0 - add r0, r5, r2 - ldr r2, _02256EC0 ; =0x00002D8C - ldr r2, [r0, r2] - cmp r2, #0 - beq _02256CC0 - ldr r2, _02256EC4 ; =0x00002DB8 - ldrh r0, [r0, r2] - cmp r0, #0 - beq _02256CC0 - add r0, r6, #0 - bl ov16_0223F4BC - lsl r0, r0, #0x1f - lsr r1, r0, #0x1d - add r0, sp, #0xc0 - ldr r1, [r0, r1] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02256EC4 ; =0x00002DB8 - ldrh r1, [r1, r0] - mov r0, #0x4a - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #1 - str r0, [sp, #0x84] - b _02256D22 -_02256CC0: - cmp r3, #0 - beq _02256CD8 - ldr r0, _02256EC4 ; =0x00002DB8 - ldrh r1, [r1, r0] - cmp r1, #0 - beq _02256CD8 - mov r0, #0x4a - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #1 - str r0, [sp, #0x84] - b _02256D22 -_02256CD8: - ldr r1, [sp, #0xc4] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02256EC0 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r1] - cmp r1, #0 - beq _02256D22 - ldr r1, _02256EC4 ; =0x00002DB8 - ldrh r1, [r0, r1] - cmp r1, #0 - beq _02256D22 - mov r0, #0x4a - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #1 - str r0, [sp, #0x84] - b _02256D22 -_02256CFC: - mov r0, #1 - add r1, r4, #0 - eor r1, r0 - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02256EC0 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r1] - cmp r1, #0 - beq _02256D22 - ldr r1, _02256EC4 ; =0x00002DB8 - ldrh r1, [r0, r1] - cmp r1, #0 - beq _02256D22 - mov r0, #0x4a - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #1 - str r0, [sp, #0x84] -_02256D22: - ldr r0, [sp, #0x84] - cmp r0, #1 - bne _02256D34 - mov r0, #0x46 - lsl r0, r0, #2 - str r4, [r5, r0] - mov r0, #0xfd - str r0, [sp, #0xcc] - b _02256D42 -_02256D34: - ldr r0, [sp, #0x3c] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x3c] - cmp r1, r0 - bge _02256D42 - b _02256C0E -_02256D42: - ldr r1, [sp, #0x3c] - ldr r0, [sp, #0x80] - cmp r1, r0 - beq _02256D4C - b _02257008 -_02256D4C: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256D54: - mov r0, #0 - str r0, [sp, #0x40] - ldr r0, [sp, #0x80] - cmp r0, #0 - ble _02256E1C - ldr r0, _02256EB8 ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0xa4] -_02256D64: - ldr r0, [sp, #0x40] - add r1, r5, r0 - ldr r0, _02256EBC ; =0x000021EC - ldrb r7, [r1, r0] - mov r0, #0xc0 - add r4, r7, #0 - mul r4, r0 - ldr r0, [sp, #0xa4] - ldr r0, [r0, r4] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - bne _02256DC0 - ldr r0, _02256EC0 ; =0x00002D8C - add r1, r5, r4 - ldr r0, [r1, r0] - str r1, [sp, #0x48] - cmp r0, #0 - beq _02256DC0 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x70 - bne _02256DC0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r2, [r5, r0] - ldr r1, [sp, #0x48] - ldr r0, _02256EC8 ; =0x00002DD8 - ldr r0, [r1, r0] - cmp r2, r0 - bgt _02256DC0 - ldr r0, [sp, #0xa4] - mov r2, #0x40 - ldr r0, [r0, r4] - add r1, r0, #0 - orr r1, r2 - ldr r0, [sp, #0xa4] - add r2, #0xd8 - str r1, [r0, r4] - str r7, [r5, r2] - mov r0, #0xc4 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256E1C -_02256DC0: - ldr r0, [sp, #0xa4] - ldr r0, [r0, r4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _02256E10 - ldr r0, _02256EC0 ; =0x00002D8C - add r1, r5, r4 - ldr r0, [r1, r0] - str r1, [sp, #0x44] - cmp r0, #0 - beq _02256E10 - add r0, r5, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x70 - bne _02256E10 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r2, [r5, r0] - ldr r1, [sp, #0x44] - ldr r0, _02256EC8 ; =0x00002DD8 - ldr r0, [r1, r0] - sub r0, r2, r0 - cmp r0, #5 - bne _02256E10 - ldr r0, [sp, #0xa4] - mov r2, #0x80 - ldr r0, [r0, r4] - add r1, r0, #0 - orr r1, r2 - ldr r0, [sp, #0xa4] - add r2, #0x98 - str r1, [r0, r4] - str r7, [r5, r2] - mov r0, #0xc5 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256E1C -_02256E10: - ldr r0, [sp, #0x40] - add r1, r0, #1 - ldr r0, [sp, #0x80] - str r1, [sp, #0x40] - cmp r1, r0 - blt _02256D64 -_02256E1C: - ldr r1, [sp, #0x40] - ldr r0, [sp, #0x80] - cmp r1, r0 - bne _02256E96 - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256E2C: - ldr r0, [sp, #0x80] - mov r4, #0 - cmp r0, #0 - ble _02256E90 - ldr r0, _02256EB8 ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0xa8] -_02256E3A: - ldr r0, _02256EBC ; =0x000021EC - add r1, r5, r4 - ldrb r1, [r1, r0] - mov r0, #0xc0 - add r7, r1, #0 - mul r7, r0 - ldr r0, [sp, #0xa8] - str r1, [sp, #0x24] - ldr r0, [r0, r7] - lsl r0, r0, #0x16 - lsr r0, r0, #0x1f - bne _02256E88 - ldr r0, _02256EC0 ; =0x00002D8C - add r1, r5, r7 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02256E88 - ldr r1, [sp, #0x24] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x68 - bne _02256E88 - ldr r0, [sp, #0xa8] - mov r2, #2 - ldr r0, [r0, r7] - lsl r2, r2, #8 - add r1, r0, #0 - orr r1, r2 - ldr r0, [sp, #0xa8] - sub r2, #0xe8 - str r1, [r0, r7] - ldr r0, [sp, #0x24] - str r0, [r5, r2] - mov r0, #0xb1 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256E90 -_02256E88: - ldr r0, [sp, #0x80] - add r4, r4, #1 - cmp r4, r0 - blt _02256E3A -_02256E90: - ldr r0, [sp, #0x80] - cmp r4, r0 - beq _02256E98 -_02256E96: - b _02257008 -_02256E98: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256EA0: - ldr r0, [sp, #0x80] - mov r4, #0 - cmp r0, #0 - ble _02256F20 - ldr r0, _02256EB8 ; =0x00002D68 - add r0, r5, r0 - str r0, [sp, #0xac] -_02256EAE: - ldr r0, _02256EBC ; =0x000021EC - b _02256ECC - nop -_02256EB4: .word 0x00002D4C -_02256EB8: .word 0x00002D68 -_02256EBC: .word 0x000021EC -_02256EC0: .word 0x00002D8C -_02256EC4: .word 0x00002DB8 -_02256EC8: .word 0x00002DD8 -_02256ECC: - add r1, r5, r4 - ldrb r1, [r1, r0] - mov r0, #0xc0 - add r7, r1, #0 - mul r7, r0 - ldr r0, [sp, #0xac] - str r1, [sp, #0x28] - ldr r0, [r0, r7] - lsl r0, r0, #0x15 - lsr r0, r0, #0x1f - bne _02256F18 - ldr r0, _02257018 ; =0x00002D8C - add r1, r5, r7 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02256F18 - ldr r1, [sp, #0x28] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x2e - bne _02256F18 - ldr r0, [sp, #0xac] - ldr r1, [r0, r7] - mov r0, #1 - lsl r0, r0, #0xa - orr r1, r0 - ldr r0, [sp, #0xac] - str r1, [r0, r7] - mov r1, #0x46 - ldr r0, [sp, #0x28] - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #5 - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256F20 -_02256F18: - ldr r0, [sp, #0x80] - add r4, r4, #1 - cmp r4, r0 - blt _02256EAE -_02256F20: - ldr r0, [sp, #0x80] - cmp r4, r0 - bne _02257008 - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256F2E: - add r0, r6, #0 - add r1, r5, #0 - add r2, sp, #0xcc - bl ov16_02259B9C - cmp r0, #1 - bne _02256F42 - mov r0, #1 - str r0, [sp, #0x84] - b _02257008 -_02256F42: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256F4A: - ldr r0, [sp, #0x80] - mov r4, #0 - cmp r0, #0 - ble _02256F7C - mov r7, #2 -_02256F54: - ldr r1, _0225701C ; =0x000021EC - add r2, r5, r4 - ldrb r2, [r2, r1] - mov r1, #0xc0 - add r0, r5, #0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _02257020 ; =0x00002DB8 - ldrh r1, [r2, r1] - mov r2, #1 - bl ov16_0225B0FC - cmp r0, #0x3a - bne _02256F74 - ldr r0, _02257024 ; =0x00002168 - str r7, [r5, r0] -_02256F74: - ldr r0, [sp, #0x80] - add r4, r4, #1 - cmp r4, r0 - blt _02256F54 -_02256F7C: - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256F84: - ldr r0, [sp, #0x80] - mov r4, #0 - cmp r0, #0 - ble _02256FB2 - ldr r7, _0225701C ; =0x000021EC -_02256F8E: - add r2, r5, r4 - ldrb r2, [r2, r7] - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov16_02257628 - cmp r0, #1 - bne _02256FAA - mov r0, #0xdd - str r0, [sp, #0xcc] - mov r0, #1 - str r0, [sp, #0x84] - b _02256FB2 -_02256FAA: - ldr r0, [sp, #0x80] - add r4, r4, #1 - cmp r4, r0 - blt _02256F8E -_02256FB2: - ldr r0, [sp, #0x80] - cmp r4, r0 - bne _02257008 - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02256FC0: - ldr r0, [sp, #0x80] - mov r4, #0 - cmp r0, #0 - ble _02256FF2 -_02256FC8: - ldr r0, _0225701C ; =0x000021EC - add r1, r5, r4 - ldrb r7, [r1, r0] - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, sp, #0xcc - bl ov16_02258104 - cmp r0, #1 - bne _02256FEA - mov r0, #0x46 - lsl r0, r0, #2 - str r7, [r5, r0] - mov r0, #1 - str r0, [sp, #0x84] - b _02256FF2 -_02256FEA: - ldr r0, [sp, #0x80] - add r4, r4, #1 - cmp r4, r0 - blt _02256FC8 -_02256FF2: - ldr r0, [sp, #0x80] - cmp r4, r0 - bne _02257008 - ldr r0, [r5, #0x58] - add r0, r0, #1 - str r0, [r5, #0x58] - b _02257008 -_02257000: - mov r0, #0 - str r0, [r5, #0x58] - mov r0, #2 - str r0, [sp, #0x84] -_02257008: - ldr r0, [sp, #0x84] - cmp r0, #0 - bne _02257012 - bl ov34_02256428 -_02257012: - ldr r0, [sp, #0xcc] - add sp, #0xd0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02257018: .word 0x00002D8C -_0225701C: .word 0x000021EC -_02257020: .word 0x00002DB8 -_02257024: .word 0x00002168 - thumb_func_end ov34_02256428 - - thumb_func_start ov16_02257028 -ov16_02257028: ; 0x02257028 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02257080 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov16_0223E2A4 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov16_0223E2A4 - str r0, [sp, #4] - add r0, r5, #0 - bl ov16_0223F4BC - mov r3, #1 - add r2, r0, #0 - and r2, r3 - lsl r0, r2, #2 - add r1, sp, #0 - ldr r0, [r1, r0] - mov r4, #0xc0 - mul r4, r0 - add r5, r6, r4 - ldr r4, _02257088 ; =0x00002D8C - ldr r4, [r5, r4] - cmp r4, #0 - bne _02257084 - add r0, r2, #0 - eor r0, r3 - lsl r0, r0, #2 - add sp, #8 - ldr r0, [r1, r0] - pop {r4, r5, r6, pc} -_02257080: - mov r0, #1 - eor r0, r4 -_02257084: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02257088: .word 0x00002D8C - thumb_func_end ov16_02257028 - - thumb_func_start ov16_0225708C -ov16_0225708C: ; 0x0225708C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r1, [r5, #0x6c] - add r7, r0, #0 - add r4, r2, #0 - mov r6, #0 - cmp r1, #0xff - bne _022570A0 - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} -_022570A0: - add r0, r5, #0 - bl ov16_02259AC0 - cmp r0, #1 - bne _022570AE - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} -_022570AE: - ldr r1, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x26 - bgt _022570DE - blt _022570BE - b _02257386 -_022570BE: - cmp r0, #0x10 - bgt _022570CA - bge _0225718C - cmp r0, #9 - beq _022570F6 - b _0225760A -_022570CA: - cmp r0, #0x1b - bgt _022570DC - cmp r0, #0x18 - blt _022570DC - bne _022570D6 - b _02257236 -_022570D6: - cmp r0, #0x1b - bne _022570DC - b _022572CA -_022570DC: - b _0225760A -_022570DE: - cmp r0, #0x38 - bgt _022570EE - blt _022570E6 - b _022574E0 -_022570E6: - cmp r0, #0x31 - bne _022570EC - b _0225744A -_022570EC: - b _0225760A -_022570EE: - cmp r0, #0x6a - bne _022570F4 - b _0225758A -_022570F4: - b _0225760A -_022570F6: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r3, _022573A8 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r3] - cmp r1, #0 - beq _022571D8 - add r1, r3, #0 - add r1, #0x20 - ldr r0, [r0, r1] - cmp r0, #0 - bne _022571D8 - ldr r1, _022573AC ; =0x0000216C - ldr r0, _022573B0 ; =0x801FDA49 - ldr r2, [r5, r1] - tst r0, r2 - bne _022571D8 - add r0, r1, #0 - sub r0, #0x30 - ldr r2, [r5, r0] - mov r0, #0x20 - tst r0, r2 - bne _022571D8 - sub r1, #0x2c - ldr r1, [r5, r1] - mov r0, #0x10 - tst r0, r1 - bne _022571D8 - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r5, r0 - lsr r1, r3, #4 - ldr r1, [r0, r1] - cmp r1, #0 - bne _0225714A - mov r1, #0x2e - lsl r1, r1, #4 - ldr r0, [r0, r1] - cmp r0, #0 - beq _022571D8 -_0225714A: - ldr r0, _022573B4 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022573B8 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022571D8 - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #3 - bge _022571D8 - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r0, #0x46 - ldr r1, [r5, #0x6c] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0x1f - str r0, [r4, #0] - mov r6, #1 - b _0225760A -_0225718C: - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x60 - bne _0225719C - add r7, r6, #0 - b _022571B6 -_0225719C: - ldr r0, _022573BC ; =0x00002160 - ldr r0, [r5, r0] - cmp r0, #0 - beq _022571AA - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - b _022571B6 -_022571AA: - ldr r0, _022573B4 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022573C0 ; =0x000003E2 - ldrb r7, [r1, r0] -_022571B6: - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _022573A8 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _022571D8 - ldr r0, _022573AC ; =0x0000216C - ldr r2, [r5, r0] - ldr r0, _022573B0 ; =0x801FDA49 - tst r0, r2 - bne _022571D8 - ldr r0, _022573B4 ; =0x00003044 - ldr r3, [r5, r0] - cmp r3, #0xa5 - bne _022571DA -_022571D8: - b _0225760A -_022571DA: - mov r0, #0x1c - ldr r2, _022573A8 ; =0x00002D8C - mul r0, r1 - add r0, r5, r0 - lsr r2, r2, #4 - ldr r2, [r0, r2] - cmp r2, #0 - bne _022571F4 - mov r2, #0x2e - lsl r2, r2, #4 - ldr r0, [r0, r2] - cmp r0, #0 - beq _022572E4 -_022571F4: - mov r0, #0x85 - lsl r0, r0, #6 - ldr r2, [r5, r0] - mov r0, #0x10 - tst r0, r2 - bne _022572E4 - lsl r0, r3, #4 - add r2, r5, r0 - ldr r0, _022573C4 ; =0x000003E1 - ldrb r0, [r2, r0] - cmp r0, #0 - beq _022572E4 - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r7, r0 - beq _022572E4 - ldr r1, [r5, #0x6c] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r7, r0 - beq _022572E4 - mov r0, #0xbc - str r0, [r4, #0] - add r0, #0x74 - str r7, [r5, r0] - mov r6, #1 - b _0225760A -_02257236: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _022573A8 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _022572E4 - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _022572E4 - ldr r1, _022573AC ; =0x0000216C - ldr r0, _022573B0 ; =0x801FDA49 - ldr r2, [r5, r1] - tst r0, r2 - bne _022572E4 - add r0, r1, #0 - sub r0, #0x30 - ldr r2, [r5, r0] - mov r0, #0x20 - tst r0, r2 - bne _022572E4 - sub r1, #0x2c - ldr r1, [r5, r1] - mov r0, #0x10 - tst r0, r1 - bne _022572E4 - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r2, r5, r0 - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r1, [r2, r0] - cmp r1, #0 - bne _0225728A - add r0, #8 - ldr r0, [r2, r0] - cmp r0, #0 - beq _022572E4 -_0225728A: - ldr r0, _022573B4 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022573B8 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022572E4 - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _022573C8 ; =0x00002D90 - add r2, r5, r2 - ldr r2, [r2, r0] - sub r1, #0xc1 - add r0, r2, #0 - mul r0, r1 - mov r1, #8 - bl ov16_022563F8 - ldr r1, _022573CC ; =0x0000215C - mov r6, #1 - str r0, [r5, r1] - mov r0, #0x46 - ldr r1, [r5, #0x64] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0xbd - str r0, [r4, #0] - b _0225760A -_022572CA: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r3, _022573A8 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r3] - cmp r1, #0 - beq _022572E4 - add r1, r3, #0 - add r1, #0x20 - ldr r0, [r0, r1] - cmp r0, #0 - beq _022572E6 -_022572E4: - b _0225760A -_022572E6: - ldr r1, _022573AC ; =0x0000216C - ldr r0, _022573B0 ; =0x801FDA49 - ldr r2, [r5, r1] - tst r0, r2 - bne _022573EC - add r0, r1, #0 - sub r0, #0x30 - ldr r2, [r5, r0] - mov r0, #0x20 - tst r0, r2 - bne _022573EC - sub r1, #0x2c - ldr r1, [r5, r1] - mov r0, #0x10 - tst r0, r1 - bne _022573EC - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r5, r0 - lsr r1, r3, #4 - ldr r1, [r0, r1] - cmp r1, #0 - bne _02257320 - mov r1, #0x2e - lsl r1, r1, #4 - ldr r0, [r0, r1] - cmp r0, #0 - beq _022573EC -_02257320: - ldr r0, _022573B4 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _022573B8 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022573EC - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #3 - bge _022573EC - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #3 - bl sub_020E1F6C - cmp r1, #0 - beq _0225735A - cmp r1, #1 - beq _02257360 - cmp r1, #2 - beq _02257366 -_0225735A: - mov r0, #0x16 - str r0, [r4, #0] - b _0225736A -_02257360: - mov r0, #0x1f - str r0, [r4, #0] - b _0225736A -_02257366: - mov r0, #0x12 - str r0, [r4, #0] -_0225736A: - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r0, #0x46 - ldr r1, [r5, #0x6c] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r6, #1 - b _0225760A -_02257386: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r3, _022573A8 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r3] - cmp r1, #0 - beq _022573EC - add r1, r3, #0 - add r1, #0x20 - ldr r0, [r0, r1] - cmp r0, #0 - bne _022573EC - ldr r1, _022573AC ; =0x0000216C - ldr r0, _022573B0 ; =0x801FDA49 - b _022573D0 - nop -_022573A8: .word 0x00002D8C -_022573AC: .word 0x0000216C -_022573B0: .word 0x801FDA49 -_022573B4: .word 0x00003044 -_022573B8: .word 0x000003E9 -_022573BC: .word 0x00002160 -_022573C0: .word 0x000003E2 -_022573C4: .word 0x000003E1 -_022573C8: .word 0x00002D90 -_022573CC: .word 0x0000215C -_022573D0: - ldr r2, [r5, r1] - tst r0, r2 - bne _022573EC - add r0, r1, #0 - sub r0, #0x30 - ldr r2, [r5, r0] - mov r0, #0x20 - tst r0, r2 - bne _022573EC - sub r1, #0x2c - ldr r1, [r5, r1] - mov r0, #0x10 - tst r0, r1 - beq _022573EE -_022573EC: - b _0225760A -_022573EE: - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r5, r0 - lsr r1, r3, #4 - ldr r1, [r0, r1] - cmp r1, #0 - bne _02257408 - mov r1, #0x2e - lsl r1, r1, #4 - ldr r0, [r0, r1] - cmp r0, #0 - beq _022574FE -_02257408: - ldr r0, _02257610 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02257614 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022574FE - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #3 - bge _022574FE - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r0, #0x46 - ldr r1, [r5, #0x6c] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0x16 - str r0, [r4, #0] - mov r6, #1 - b _0225760A -_0225744A: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r3, _02257618 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r3] - cmp r1, #0 - beq _022574FE - add r1, r3, #0 - add r1, #0x20 - ldr r0, [r0, r1] - cmp r0, #0 - bne _022574FE - ldr r1, _0225761C ; =0x0000216C - ldr r0, _02257620 ; =0x801FDA49 - ldr r2, [r5, r1] - tst r0, r2 - bne _022574FE - add r0, r1, #0 - sub r0, #0x30 - ldr r2, [r5, r0] - mov r0, #0x20 - tst r0, r2 - bne _022574FE - sub r1, #0x2c - ldr r1, [r5, r1] - mov r0, #0x10 - tst r0, r1 - bne _022574FE - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r5, r0 - lsr r1, r3, #4 - ldr r1, [r0, r1] - cmp r1, #0 - bne _0225749E - mov r1, #0x2e - lsl r1, r1, #4 - ldr r0, [r0, r1] - cmp r0, #0 - beq _022574FE -_0225749E: - ldr r0, _02257610 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02257614 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _022574FE - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #3 - bge _022574FE - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r0, #0x46 - ldr r1, [r5, #0x6c] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0x19 - str r0, [r4, #0] - mov r6, #1 - b _0225760A -_022574E0: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r3, _02257618 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r3] - cmp r1, #0 - beq _022574FE - add r1, r3, #0 - add r1, #0x24 - ldr r1, [r0, r1] - mov r0, #0xf - lsl r0, r0, #0x10 - tst r0, r1 - beq _02257500 -_022574FE: - b _0225760A -_02257500: - ldr r1, _0225761C ; =0x0000216C - ldr r0, _02257620 ; =0x801FDA49 - ldr r2, [r5, r1] - tst r0, r2 - bne _0225760A - add r0, r1, #0 - sub r0, #0x30 - ldr r2, [r5, r0] - mov r0, #0x20 - tst r0, r2 - bne _0225760A - sub r1, #0x2c - ldr r1, [r5, r1] - mov r0, #0x10 - tst r0, r1 - bne _0225760A - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r0, r5, r0 - lsr r2, r3, #4 - ldr r2, [r0, r2] - cmp r2, #0 - bne _0225753A - mov r2, #0x2e - lsl r2, r2, #4 - ldr r0, [r0, r2] - cmp r0, #0 - beq _0225760A -_0225753A: - ldr r0, _02257610 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r2, r5, r0 - ldr r0, _02257614 ; =0x000003E9 - ldrb r2, [r2, r0] - mov r0, #1 - tst r0, r2 - beq _0225760A - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02257618 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225760A - add r0, r7, #0 - bl ov16_0223F4BC - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #3 - bge _0225760A - add r0, r5, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r5, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r0, #0x46 - ldr r1, [r5, #0x6c] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0x6a - str r0, [r4, #0] - mov r6, #1 - b _0225760A -_0225758A: - ldr r1, [r5, #0x6c] - ldr r0, [r5, #0x74] - cmp r1, r0 - bne _0225760A - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _0225760A - mov r0, #6 - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - add r3, r6, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225760A - mov r2, #0x85 - lsl r2, r2, #6 - ldr r1, [r5, r2] - mov r0, #0x10 - tst r0, r1 - bne _0225760A - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _02257618 ; =0x00002D8C - ldr r3, [r1, r0] - cmp r3, #0 - beq _0225760A - add r2, #0x2c - ldr r3, [r5, r2] - ldr r2, _02257620 ; =0x801FDA49 - tst r2, r3 - bne _0225760A - ldr r2, _02257610 ; =0x00003044 - ldr r2, [r5, r2] - lsl r2, r2, #4 - add r3, r5, r2 - ldr r2, _02257614 ; =0x000003E9 - ldrb r3, [r3, r2] - mov r2, #1 - tst r3, r2 - beq _0225760A - add r0, r0, #4 - ldr r1, [r1, r0] - sub r0, r2, #2 - mul r0, r1 - mov r1, #4 - bl ov16_022563F8 - ldr r1, _02257624 ; =0x0000215C - mov r6, #1 - str r0, [r5, r1] - mov r0, #0x46 - ldr r1, [r5, #0x64] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0xc1 - str r0, [r4, #0] -_0225760A: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02257610: .word 0x00003044 -_02257614: .word 0x000003E9 -_02257618: .word 0x00002D8C -_0225761C: .word 0x0000216C -_02257620: .word 0x801FDA49 -_02257624: .word 0x0000215C - thumb_func_end ov16_0225708C - - thumb_func_start ov16_02257628 -ov16_02257628: ; 0x02257628 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r2, #0 - add r0, r4, #0 - add r1, r5, #0 - add r7, r3, #0 - mov r6, #0 - bl ov16_02255A4C - cmp r0, #0x28 - bgt _0225766E - bge _02257708 - cmp r0, #7 - bgt _02257648 - beq _022576B6 - b _02257760 -_02257648: - add r1, r0, #0 - sub r1, #0xc - cmp r1, #8 - bhi _02257678 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225765C: ; jump table - .short _02257724 - _0225765C - 2 ; case 0 - .short _02257760 - _0225765C - 2 ; case 1 - .short _02257760 - _0225765C - 2 ; case 2 - .short _022576D0 - _0225765C - 2 ; case 3 - .short _02257760 - _0225765C - 2 ; case 4 - .short _02257680 - _0225765C - 2 ; case 5 - .short _02257760 - _0225765C - 2 ; case 6 - .short _02257760 - _0225765C - 2 ; case 7 - .short _0225769A - _0225765C - 2 ; case 8 -_0225766E: - cmp r0, #0x48 - bgt _0225767A - bge _022576D0 - cmp r0, #0x29 - beq _022576EC -_02257678: - b _02257760 -_0225767A: - cmp r0, #0x54 - beq _02257742 - b _02257760 -_02257680: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02257794 ; =0x00002DAC - ldr r2, [r2, r1] - ldr r1, _02257798 ; =0x00000F88 - tst r1, r2 - beq _02257760 - mov r6, #1 - add r0, #0x70 - str r6, [r4, r0] - b _02257760 -_0225769A: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _0225779C ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #7 - tst r1, r2 - beq _02257760 - mov r1, #5 - add r0, #0x70 - str r1, [r4, r0] - mov r6, #1 - b _02257760 -_022576B6: - mov r0, #0xc0 - mul r0, r5 - add r1, r4, r0 - ldr r0, _02257794 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x40 - tst r1, r0 - beq _02257760 - mov r1, #3 - add r0, #0xf0 - str r1, [r4, r0] - mov r6, #1 - b _02257760 -_022576D0: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02257794 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #7 - tst r1, r2 - beq _02257760 - mov r1, #0 - add r0, #0x70 - str r1, [r4, r0] - mov r6, #1 - b _02257760 -_022576EC: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02257794 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #0x10 - tst r1, r2 - beq _02257760 - mov r1, #2 - add r0, #0x70 - str r1, [r4, r0] - mov r6, #1 - b _02257760 -_02257708: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _02257794 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #0x20 - tst r1, r2 - beq _02257760 - mov r1, #4 - add r0, #0x70 - str r1, [r4, r0] - mov r6, #1 - b _02257760 -_02257724: - mov r0, #0xc0 - add r1, r5, #0 - mul r1, r0 - add r2, r4, r1 - ldr r1, _0225779C ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #0xf - lsl r1, r1, #0x10 - tst r1, r2 - beq _02257760 - mov r1, #6 - add r0, #0x70 - str r1, [r4, r0] - mov r6, #1 - b _02257760 -_02257742: - mov r0, #0xc0 - add r3, r5, #0 - mul r3, r0 - ldr r0, _022577A0 ; =0x00002DB8 - add r1, r4, r3 - ldrh r1, [r1, r0] - cmp r1, #0 - beq _02257760 - add r0, #0x14 - add r2, r4, r0 - mov r0, #1 - ldr r1, [r2, r3] - lsl r0, r0, #0x16 - orr r0, r1 - str r0, [r2, r3] -_02257760: - cmp r6, #1 - bne _0225778E - mov r0, #0x46 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov16_02255A4C - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r4, r1] - cmp r7, #0 - bne _0225778E - add r0, r4, #0 - mov r1, #1 - mov r2, #0xdd - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_0225778E: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02257794: .word 0x00002DAC -_02257798: .word 0x00000F88 -_0225779C: .word 0x00002DB0 -_022577A0: .word 0x00002DB8 - thumb_func_end ov16_02257628 - - thumb_func_start ov16_022577A4 -ov16_022577A4: ; 0x022577A4 - mov r0, #0 - cmp r1, #0x28 - bgt _022577C4 - bge _022577FA - cmp r1, #7 - bgt _022577B4 - beq _022577DC - bx lr -_022577B4: - cmp r1, #0x11 - bgt _02257802 - cmp r1, #0xf - blt _02257802 - beq _022577E6 - cmp r1, #0x11 - beq _022577D2 - bx lr -_022577C4: - cmp r1, #0x29 - bgt _022577CC - beq _022577F0 - bx lr -_022577CC: - cmp r1, #0x48 - beq _022577E6 - bx lr -_022577D2: - ldr r1, _02257804 ; =0x00000F88 - tst r1, r2 - beq _02257802 - mov r0, #1 - bx lr -_022577DC: - mov r1, #0x40 - tst r1, r2 - beq _02257802 - mov r0, #1 - bx lr -_022577E6: - mov r1, #7 - tst r1, r2 - beq _02257802 - mov r0, #1 - bx lr -_022577F0: - mov r1, #0x10 - tst r1, r2 - beq _02257802 - mov r0, #1 - bx lr -_022577FA: - mov r1, #0x20 - tst r1, r2 - beq _02257802 - mov r0, #1 -_02257802: - bx lr - ; .align 2, 0 -_02257804: .word 0x00000F88 - thumb_func_end ov16_022577A4 - - thumb_func_start ov16_02257808 -ov16_02257808: ; 0x02257808 - push {r3, r4, r5, r6, r7, lr} - mov r5, #0 - add r4, r1, #0 - str r5, [sp] - ldr r1, [r4, #0x6c] - add r7, r0, #0 - add r6, r2, #0 - cmp r1, #0xff - beq _0225784A - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x1c - bne _0225784A - add r1, r4, #0 - add r1, #0x94 - ldr r0, [r4, #0x6c] - ldr r1, [r1, #0] - cmp r0, r1 - bne _0225784A - ldr r1, _02257998 ; =0x0000213C - ldr r2, [r4, r1] - mov r1, #0x80 - tst r2, r1 - beq _0225784A - add r1, #0x98 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r5, #1 - b _0225787A -_0225784A: - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x1c - bne _0225787A - add r1, r4, #0 - add r1, #0x94 - ldr r0, [r4, #0x64] - ldr r1, [r1, #0] - cmp r0, r1 - bne _0225787A - ldr r1, _02257998 ; =0x0000213C - ldr r2, [r4, r1] - mov r1, #0x80 - tst r2, r1 - beq _0225787A - add r1, #0x98 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, #0x6c] - add r0, #0x94 - str r1, [r0, #0] - mov r5, #1 -_0225787A: - cmp r5, #1 - bne _022578D2 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0225799C ; =0x00002DAC - ldr r0, [r1, r0] - ldr r1, _022579A0 ; =0x00000F88 - tst r1, r0 - beq _0225789A - mov r0, #0x16 - str r0, [sp] - b _022578B0 -_0225789A: - mov r1, #0x10 - tst r1, r0 - beq _022578A6 - mov r0, #0x19 - str r0, [sp] - b _022578B0 -_022578A6: - mov r1, #0x40 - tst r0, r1 - beq _022578B0 - mov r0, #0x1f - str r0, [sp] -_022578B0: - ldr r0, [sp] - cmp r0, #0 - beq _022578D2 - add r0, r4, #0 - mov r1, #3 - add r0, #0x88 - str r1, [r0, #0] - ldr r2, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - str r6, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_022578D2: - add r0, r7, #0 - add r1, r4, #0 - add r2, sp, #0 - bl ov16_02259B9C - add r5, r0, #0 - cmp r5, #1 - bne _022578F6 - ldr r2, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - str r6, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_022578F6: - ldr r1, [r4, #0x6c] - cmp r1, #0xff - beq _02257936 - add r0, r4, #0 - bl ov16_02258AB8 - cmp r0, #0x6c - bne _02257936 - add r1, r4, #0 - add r1, #0x94 - ldr r0, [r4, #0x6c] - ldr r1, [r1, #0] - cmp r0, r1 - bne _02257936 - mov r1, #0x1c - add r2, r0, #0 - mul r2, r1 - add r3, r4, r2 - mov r2, #0xba - lsl r2, r2, #2 - ldr r3, [r3, r2] - mov r2, #4 - tst r2, r3 - beq _02257936 - add r1, #0xfc - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, #0x64] - add r0, #0x94 - str r1, [r0, #0] - mov r5, #1 - b _02257970 -_02257936: - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02258AB8 - cmp r0, #0x6c - bne _02257970 - add r1, r4, #0 - add r1, #0x94 - ldr r0, [r4, #0x64] - ldr r1, [r1, #0] - cmp r0, r1 - bne _02257970 - mov r1, #0x1c - add r2, r0, #0 - mul r2, r1 - add r3, r4, r2 - mov r2, #0xba - lsl r2, r2, #2 - ldr r3, [r3, r2] - mov r2, #4 - tst r2, r3 - beq _02257970 - add r1, #0xfc - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, #0x6c] - add r0, #0x94 - str r1, [r0, #0] - mov r5, #1 -_02257970: - cmp r5, #1 - bne _02257994 - mov r0, #0x6a - str r0, [sp] - add r0, r4, #0 - mov r1, #5 - add r0, #0x88 - str r1, [r0, #0] - ldr r2, [sp] - add r0, r4, #0 - mov r1, #1 - bl ov16_02251E1C - str r6, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_02257994: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02257998: .word 0x0000213C -_0225799C: .word 0x00002DAC -_022579A0: .word 0x00000F88 - thumb_func_end ov16_02257808 - - thumb_func_start ov16_022579A4 -ov16_022579A4: ; 0x022579A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - add r4, r1, #0 - mov r0, #0 - str r0, [sp, #0xc] - str r2, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - bl ov16_02258AB8 - str r0, [sp, #0x10] - ldr r1, [sp, #4] - add r0, r4, #0 - mov r2, #0 - bl ov16_02258ACC - add r6, r0, #0 - ldr r0, [sp, #4] - mov r3, #0xc0 - add r5, r0, #0 - ldr r0, _02257CC8 ; =0x00002D8C - mul r5, r3 - add r1, r4, r0 - ldr r2, [r1, r5] - str r1, [sp, #0x14] - cmp r2, #0 - bne _022579DE - b _02257FD4 -_022579DE: - ldr r1, [sp, #0x10] - cmp r1, #0x36 - bls _022579E6 - b _02257FA6 -_022579E6: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022579F2: ; jump table - .short _02257FA6 - _022579F2 - 2 ; case 0 - .short _02257A60 - _022579F2 - 2 ; case 1 - .short _02257FA6 - _022579F2 - 2 ; case 2 - .short _02257FA6 - _022579F2 - 2 ; case 3 - .short _02257FA6 - _022579F2 - 2 ; case 4 - .short _02257A9A - _022579F2 - 2 ; case 5 - .short _02257AAE - _022579F2 - 2 ; case 6 - .short _02257AC2 - _022579F2 - 2 ; case 7 - .short _02257AD6 - _022579F2 - 2 ; case 8 - .short _02257AEA - _022579F2 - 2 ; case 9 - .short _02257B00 - _022579F2 - 2 ; case 10 - .short _02257B62 - _022579F2 - 2 ; case 11 - .short _02257B76 - _022579F2 - 2 ; case 12 - .short _02257A78 - _022579F2 - 2 ; case 13 - .short _02257BD4 - _022579F2 - 2 ; case 14 - .short _02257C10 - _022579F2 - 2 ; case 15 - .short _02257C4E - _022579F2 - 2 ; case 16 - .short _02257C8A - _022579F2 - 2 ; case 17 - .short _02257CE4 - _022579F2 - 2 ; case 18 - .short _02257FA6 - _022579F2 - 2 ; case 19 - .short _02257FA6 - _022579F2 - 2 ; case 20 - .short _02257FA6 - _022579F2 - 2 ; case 21 - .short _02257FA6 - _022579F2 - 2 ; case 22 - .short _02257FA6 - _022579F2 - 2 ; case 23 - .short _02257FA6 - _022579F2 - 2 ; case 24 - .short _02257FA6 - _022579F2 - 2 ; case 25 - .short _02257FA6 - _022579F2 - 2 ; case 26 - .short _02257FA6 - _022579F2 - 2 ; case 27 - .short _02257FA6 - _022579F2 - 2 ; case 28 - .short _02257FA6 - _022579F2 - 2 ; case 29 - .short _02257FA6 - _022579F2 - 2 ; case 30 - .short _02257FA6 - _022579F2 - 2 ; case 31 - .short _02257FA6 - _022579F2 - 2 ; case 32 - .short _02257FA6 - _022579F2 - 2 ; case 33 - .short _02257FA6 - _022579F2 - 2 ; case 34 - .short _02257FA6 - _022579F2 - 2 ; case 35 - .short _02257D20 - _022579F2 - 2 ; case 36 - .short _02257D66 - _022579F2 - 2 ; case 37 - .short _02257DAC - _022579F2 - 2 ; case 38 - .short _02257DF2 - _022579F2 - 2 ; case 39 - .short _02257E38 - _022579F2 - 2 ; case 40 - .short _02257E80 - _022579F2 - 2 ; case 41 - .short _02257EC2 - _022579F2 - 2 ; case 42 - .short _02257FA6 - _022579F2 - 2 ; case 43 - .short _02257F74 - _022579F2 - 2 ; case 44 - .short _02257FA6 - _022579F2 - 2 ; case 45 - .short _02257FA6 - _022579F2 - 2 ; case 46 - .short _02257FA6 - _022579F2 - 2 ; case 47 - .short _02257FA6 - _022579F2 - 2 ; case 48 - .short _02257F30 - _022579F2 - 2 ; case 49 - .short _02257FA6 - _022579F2 - 2 ; case 50 - .short _02257FA6 - _022579F2 - 2 ; case 51 - .short _02257FA6 - _022579F2 - 2 ; case 52 - .short _02257FA6 - _022579F2 - 2 ; case 53 - .short _02257F58 - _022579F2 - 2 ; case 54 -_02257A60: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r0, r0, #1 - cmp r2, r0 - bhi _02257AF6 - ldr r0, _02257CCC ; =0x0000215C - mov r7, #0xc6 - str r6, [r4, r0] - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257A78: - add r1, r4, r5 - add r0, r0, #4 - ldr r1, [r1, r0] - lsr r0, r1, #1 - cmp r2, r0 - bhi _02257AF6 - add r0, r6, #0 - mul r0, r1 - mov r1, #0x64 - bl ov16_022563F8 - ldr r1, _02257CCC ; =0x0000215C - mov r7, #0xc6 - str r0, [r4, r1] - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257A9A: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #0x40 - tst r0, r1 - beq _02257AF6 - mov r0, #1 - mov r7, #0xc7 - str r0, [sp, #0xc] - b _02257FA6 -_02257AAE: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02257AF6 - mov r0, #1 - mov r7, #0xc8 - str r0, [sp, #0xc] - b _02257FA6 -_02257AC2: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - ldr r0, _02257CD0 ; =0x00000F88 - tst r0, r1 - beq _02257AF6 - mov r0, #1 - mov r7, #0xc9 - str r0, [sp, #0xc] - b _02257FA6 -_02257AD6: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #0x10 - tst r0, r1 - beq _02257AF6 - mov r0, #1 - mov r7, #0xca - str r0, [sp, #0xc] - b _02257FA6 -_02257AEA: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - bne _02257AF8 -_02257AF6: - b _02257FA6 -_02257AF8: - mov r0, #1 - mov r7, #0xcb - str r0, [sp, #0xc] - b _02257FA6 -_02257B00: - mov r0, #0 - str r0, [sp, #8] - add r0, r4, r5 - ldr r3, _02257CD4 ; =0x00002D4C - add r1, r0, #0 -_02257B0A: - ldrh r2, [r0, r3] - cmp r2, #0 - beq _02257B18 - ldr r2, _02257CD8 ; =0x00002D6C - ldrb r2, [r1, r2] - cmp r2, #0 - beq _02257B26 -_02257B18: - ldr r2, [sp, #8] - add r0, r0, #2 - add r2, r2, #1 - add r1, r1, #1 - str r2, [sp, #8] - cmp r2, #4 - blt _02257B0A -_02257B26: - ldr r0, [sp, #8] - cmp r0, #4 - beq _02257C1C - mov r0, #0xb5 - lsl r0, r0, #6 - ldr r1, [sp, #8] - add r0, r4, r0 - add r0, r0, r5 - add r1, #0x1f - add r2, r6, #0 - bl ov16_02252A2C - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r4, #0 - bl ov16_02253EC0 - ldr r0, [sp, #8] - add r1, r4, r5 - lsl r0, r0, #1 - add r1, r1, r0 - ldr r0, _02257CD4 ; =0x00002D4C - mov r7, #0xcc - ldrh r1, [r1, r0] - mov r0, #0x49 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257B62: - add r1, r4, r5 - add r0, #0x24 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02257C1C - mov r0, #1 - mov r7, #0xcd - str r0, [sp, #0xc] - b _02257FA6 -_02257B76: - add r2, r0, #0 - add r1, r4, r5 - add r2, #0x20 - ldr r2, [r1, r2] - lsl r3, r2, #0x18 - lsr r3, r3, #0x18 - bne _02257B8E - add r0, #0x24 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02257C1C -_02257B8E: - mov r0, #0x40 - tst r0, r2 - beq _02257B96 - mov r7, #0xc7 -_02257B96: - mov r0, #7 - tst r0, r2 - beq _02257B9E - mov r7, #0xc8 -_02257B9E: - ldr r0, _02257CD0 ; =0x00000F88 - tst r0, r2 - beq _02257BA6 - mov r7, #0xc9 -_02257BA6: - mov r0, #0x10 - tst r0, r2 - beq _02257BAE - mov r7, #0xca -_02257BAE: - mov r0, #0x20 - tst r0, r2 - beq _02257BB6 - mov r7, #0xcb -_02257BB6: - ldr r0, _02257CDC ; =0x00002DB0 - add r1, r4, r5 - ldr r1, [r1, r0] - mov r0, #7 - and r0, r1 - beq _02257BC4 - mov r7, #0xcd -_02257BC4: - cmp r3, #0 - beq _02257BCE - cmp r0, #0 - beq _02257BCE - mov r7, #0xce -_02257BCE: - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257BD4: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02257C1C - add r1, r6, #0 - bl ov16_022563F8 - ldr r1, _02257CCC ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02257CE0 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02257C08 - mov r7, #0xcf - b _02257C0A -_02257C08: - mov r7, #0xc6 -_02257C0A: - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257C10: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bls _02257C1E -_02257C1C: - b _02257FA6 -_02257C1E: - add r1, r6, #0 - bl ov16_022563F8 - ldr r1, _02257CCC ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02257CE0 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02257C46 - mov r7, #0xcf - b _02257C48 -_02257C46: - mov r7, #0xc6 -_02257C48: - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257C4E: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02257D56 - add r1, r6, #0 - bl ov16_022563F8 - ldr r1, _02257CCC ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02257CE0 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02257C82 - mov r7, #0xcf - b _02257C84 -_02257C82: - mov r7, #0xc6 -_02257C84: - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257C8A: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02257D56 - add r1, r6, #0 - bl ov16_022563F8 - ldr r1, _02257CCC ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02257CE0 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02257CBE - mov r7, #0xcf - b _02257CC0 -_02257CBE: - mov r7, #0xc6 -_02257CC0: - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 - nop -_02257CC8: .word 0x00002D8C -_02257CCC: .word 0x0000215C -_02257CD0: .word 0x00000F88 -_02257CD4: .word 0x00002D4C -_02257CD8: .word 0x00002D6C -_02257CDC: .word 0x00002DB0 -_02257CE0: .word 0x00002DA8 -_02257CE4: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02257D56 - add r1, r6, #0 - bl ov16_022563F8 - ldr r1, _02257FDC ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02257FE0 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02257D18 - mov r7, #0xcf - b _02257D1A -_02257D18: - mov r7, #0xc6 -_02257D1A: - mov r0, #1 - str r0, [sp, #0xc] - b _02257FA6 -_02257D20: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257D32 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257D32: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257D56 - ldr r0, _02257FE8 ; =0x00002D59 - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - blt _02257D58 -_02257D56: - b _02257FA6 -_02257D58: - mov r1, #0x13 - mov r0, #1 - lsl r1, r1, #4 - str r0, [sp, #0xc] - str r0, [r4, r1] - mov r7, #0xd0 - b _02257FA6 -_02257D66: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257D78 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257D78: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257E6E - ldr r0, _02257FEC ; =0x00002D5A - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _02257E6E - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #1 - mov r7, #0xd0 - str r0, [sp, #0xc] - b _02257FA6 -_02257DAC: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257DBE - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257DBE: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257E6E - ldr r0, _02257FF0 ; =0x00002D5B - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _02257E6E - mov r0, #0x13 - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #1 - mov r7, #0xd0 - str r0, [sp, #0xc] - b _02257FA6 -_02257DF2: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257E04 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257E04: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257E6E - ldr r0, _02257FF4 ; =0x00002D5C - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _02257E6E - mov r0, #0x13 - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #1 - mov r7, #0xd0 - str r0, [sp, #0xc] - b _02257FA6 -_02257E38: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257E4A - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257E4A: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257E6E - ldr r0, _02257FF8 ; =0x00002D5D - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - blt _02257E70 -_02257E6E: - b _02257FA6 -_02257E70: - mov r0, #0x13 - mov r1, #5 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #1 - mov r7, #0xd0 - str r0, [sp, #0xc] - b _02257FA6 -_02257E80: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257E92 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257E92: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257FA6 - ldr r0, _02257FFC ; =0x00002DB0 - add r1, r4, r5 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x14 - tst r0, r1 - bne _02257FA6 - mov r0, #1 - mov r7, #0xd1 - str r0, [sp, #0xc] - b _02257FA6 -_02257EC2: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257ED4 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257ED4: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257FA6 - ldr r0, _02257FE8 ; =0x00002D59 - mov r2, #0 - add r3, r4, r5 -_02257EF4: - ldrsb r1, [r3, r0] - cmp r1, #0xc - blt _02257F02 - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #5 - blt _02257EF4 -_02257F02: - cmp r2, #5 - beq _02257FA6 - ldr r6, _02257FE8 ; =0x00002D59 - add r5, r4, r5 - mov r7, #5 -_02257F0C: - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r7, #0 - bl sub_020E1F6C - add r0, r5, r1 - ldrsb r0, [r0, r6] - cmp r0, #0xc - beq _02257F0C - mov r0, #0x13 - add r1, r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #1 - mov r7, #0xd2 - str r0, [sp, #0xc] - b _02257FA6 -_02257F30: - ldr r6, _02258000 ; =0x00002D58 - add r1, r4, r5 - mov r0, #0 - mov r5, #6 - add r3, r6, #0 -_02257F3A: - ldrsb r2, [r1, r3] - cmp r2, #6 - bge _02257F46 - mov r2, #1 - strb r5, [r1, r6] - str r2, [sp, #0xc] -_02257F46: - add r0, r0, #1 - add r1, r1, #1 - cmp r0, #8 - blt _02257F3A - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _02257FA6 - mov r7, #0xd3 - b _02257FA6 -_02257F58: - add r1, r4, r5 - add r0, #0x24 - ldr r1, [r1, r0] - mov r0, #0xf - lsl r0, r0, #0x10 - tst r0, r1 - beq _02257FA6 - mov r0, #6 - add r3, #0x70 - str r0, [r4, r3] - mov r0, #1 - mov r7, #0xd4 - str r0, [sp, #0xc] - b _02257FA6 -_02257F74: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02257F86 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r6, r0, #1 -_02257F86: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02257FE4 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02257FA6 - mov r0, #1 - ldr r7, _02258004 ; =0x00000109 - str r0, [sp, #0xc] -_02257FA6: - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _02257FD4 - mov r1, #0x46 - ldr r0, [sp, #4] - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02258874 - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - add r2, r7, #0 - bl ov16_02251E1C - ldr r0, [r4, #8] - str r0, [r4, #0xc] - mov r0, #0x15 - str r0, [r4, #8] -_02257FD4: - ldr r0, [sp, #0xc] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02257FDC: .word 0x0000215C -_02257FE0: .word 0x00002DA8 -_02257FE4: .word 0x00002D90 -_02257FE8: .word 0x00002D59 -_02257FEC: .word 0x00002D5A -_02257FF0: .word 0x00002D5B -_02257FF4: .word 0x00002D5C -_02257FF8: .word 0x00002D5D -_02257FFC: .word 0x00002DB0 -_02258000: .word 0x00002D58 -_02258004: .word 0x00000109 - thumb_func_end ov16_022579A4 - - thumb_func_start ov16_02258008 -ov16_02258008: ; 0x02258008 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r2, #0 - mov r7, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02258AB8 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov16_02258ACC - mov r0, #0xc0 - add r4, r6, #0 - mul r4, r0 - ldr r0, _022580F8 ; =0x00002D8C - add r1, r5, r0 - str r1, [sp, #8] - ldr r1, [r1, r4] - cmp r1, #0 - beq _022580F2 - ldr r2, [sp, #4] - cmp r2, #0x45 - beq _02258046 - add r0, r2, #0 - cmp r0, #0x6d - beq _02258062 - b _022580C8 -_02258046: - add r2, r5, r4 - add r0, r0, #4 - ldr r0, [r2, r0] - cmp r1, r0 - bhs _022580C8 - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _022580FC ; =0x0000215C - mov r7, #1 - str r0, [r5, r1] - mov r0, #0xd5 - str r0, [sp] - b _022580C8 -_02258062: - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1b - add r3, r7, #0 - bl ov16_02252060 - cmp r0, #3 - beq _02258082 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - add r3, r7, #0 - bl ov16_02252060 - cmp r0, #3 - bne _022580A2 -_02258082: - ldr r0, _02258100 ; =0x00002D90 - add r1, r5, r4 - ldr r0, [r1, r0] - ldr r1, [sp, #8] - ldr r1, [r1, r4] - cmp r1, r0 - bhs _022580C8 - mov r1, #0x10 - bl ov16_022563F8 - ldr r1, _022580FC ; =0x0000215C - mov r7, #1 - str r0, [r5, r1] - mov r0, #0xd5 - str r0, [sp] - b _022580C8 -_022580A2: - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _022580C8 - ldr r0, _02258100 ; =0x00002D90 - add r1, r5, r4 - ldr r1, [r1, r0] - sub r0, r7, #1 - mul r0, r1 - mov r1, #8 - bl ov16_022563F8 - ldr r1, _022580FC ; =0x0000215C - mov r7, #1 - str r0, [r5, r1] - mov r0, #0xd7 - str r0, [sp] -_022580C8: - cmp r7, #1 - bne _022580F2 - mov r0, #0x46 - lsl r0, r0, #2 - str r6, [r5, r0] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02258874 - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r2, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r5, #8] - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] -_022580F2: - add r0, r7, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022580F8: .word 0x00002D8C -_022580FC: .word 0x0000215C -_02258100: .word 0x00002D90 - thumb_func_end ov16_02258008 - - thumb_func_start ov16_02258104 -ov16_02258104: ; 0x02258104 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - add r4, r1, #0 - mov r0, #0 - str r0, [sp, #0xc] - str r2, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - add r6, r3, #0 - bl ov16_02258AB8 - str r0, [sp, #0x10] - ldr r1, [sp, #4] - add r0, r4, #0 - mov r2, #0 - bl ov16_02258ACC - add r7, r0, #0 - ldr r0, [sp, #4] - mov r3, #0xc0 - add r5, r0, #0 - ldr r0, _02258428 ; =0x00002D8C - mul r5, r3 - add r1, r4, r0 - ldr r2, [r1, r5] - str r1, [sp, #0x14] - cmp r2, #0 - bne _02258140 - b _0225879E -_02258140: - ldr r1, [sp, #0x10] - cmp r1, #0x36 - bhi _022581CC - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02258152: ; jump table - .short _0225878A - _02258152 - 2 ; case 0 - .short _022581C0 - _02258152 - 2 ; case 1 - .short _0225878A - _02258152 - 2 ; case 2 - .short _0225878A - _02258152 - 2 ; case 3 - .short _0225878A - _02258152 - 2 ; case 4 - .short _02258200 - _02258152 - 2 ; case 5 - .short _02258216 - _02258152 - 2 ; case 6 - .short _0225822C - _02258152 - 2 ; case 7 - .short _02258242 - _02258152 - 2 ; case 8 - .short _02258258 - _02258152 - 2 ; case 9 - .short _0225826E - _02258152 - 2 ; case 10 - .short _022582D2 - _02258152 - 2 ; case 11 - .short _022582EA - _02258152 - 2 ; case 12 - .short _022581DC - _02258152 - 2 ; case 13 - .short _022583E6 - _02258152 - 2 ; case 14 - .short _02258450 - _02258152 - 2 ; case 15 - .short _0225848E - _02258152 - 2 ; case 16 - .short _022584CC - _02258152 - 2 ; case 17 - .short _0225850A - _02258152 - 2 ; case 18 - .short _0225878A - _02258152 - 2 ; case 19 - .short _0225878A - _02258152 - 2 ; case 20 - .short _0225878A - _02258152 - 2 ; case 21 - .short _0225878A - _02258152 - 2 ; case 22 - .short _0225878A - _02258152 - 2 ; case 23 - .short _0225878A - _02258152 - 2 ; case 24 - .short _0225878A - _02258152 - 2 ; case 25 - .short _0225878A - _02258152 - 2 ; case 26 - .short _0225878A - _02258152 - 2 ; case 27 - .short _0225878A - _02258152 - 2 ; case 28 - .short _0225878A - _02258152 - 2 ; case 29 - .short _0225878A - _02258152 - 2 ; case 30 - .short _0225878A - _02258152 - 2 ; case 31 - .short _0225878A - _02258152 - 2 ; case 32 - .short _0225878A - _02258152 - 2 ; case 33 - .short _0225878A - _02258152 - 2 ; case 34 - .short _0225878A - _02258152 - 2 ; case 35 - .short _0225854A - _02258152 - 2 ; case 36 - .short _02258590 - _02258152 - 2 ; case 37 - .short _022585D8 - _02258152 - 2 ; case 38 - .short _02258620 - _02258152 - 2 ; case 39 - .short _0225866A - _02258152 - 2 ; case 40 - .short _022586B2 - _02258152 - 2 ; case 41 - .short _022586F6 - _02258152 - 2 ; case 42 - .short _0225878A - _02258152 - 2 ; case 43 - .short _022583B0 - _02258152 - 2 ; case 44 - .short _0225878A - _02258152 - 2 ; case 45 - .short _0225878A - _02258152 - 2 ; case 46 - .short _0225878A - _02258152 - 2 ; case 47 - .short _0225878A - _02258152 - 2 ; case 48 - .short _02258368 - _02258152 - 2 ; case 49 - .short _0225878A - _02258152 - 2 ; case 50 - .short _0225878A - _02258152 - 2 ; case 51 - .short _0225878A - _02258152 - 2 ; case 52 - .short _0225878A - _02258152 - 2 ; case 53 - .short _02258392 - _02258152 - 2 ; case 54 -_022581C0: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r0, r0, #1 - cmp r2, r0 - bls _022581CE -_022581CC: - b _0225878A -_022581CE: - ldr r0, _0225842C ; =0x0000215C - str r7, [r4, r0] - mov r0, #0xc6 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022581DC: - add r1, r4, r5 - add r0, r0, #4 - ldr r1, [r1, r0] - lsr r0, r1, #1 - cmp r2, r0 - bhi _022582DE - add r0, r7, #0 - mul r0, r1 - mov r1, #0x64 - bl ov16_022563F8 - ldr r1, _0225842C ; =0x0000215C - str r0, [r4, r1] - mov r0, #0xc6 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_02258200: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #0x40 - tst r0, r1 - beq _022582DE - mov r0, #0xc7 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_02258216: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _022582DE - mov r0, #0xc8 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_0225822C: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - ldr r0, _02258430 ; =0x00000F88 - tst r0, r1 - beq _022582DE - mov r0, #0xc9 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_02258242: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #0x10 - tst r0, r1 - beq _022582DE - mov r0, #0xca - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_02258258: - add r1, r4, r5 - add r0, #0x20 - ldr r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - beq _022582DE - mov r0, #0xcb - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_0225826E: - mov r0, #0 - str r0, [sp, #8] - add r0, r4, r5 - ldr r3, _02258434 ; =0x00002D4C - add r1, r0, #0 -_02258278: - ldrh r2, [r0, r3] - cmp r2, #0 - beq _02258286 - ldr r2, _02258438 ; =0x00002D6C - ldrb r2, [r1, r2] - cmp r2, #0 - beq _02258294 -_02258286: - ldr r2, [sp, #8] - add r0, r0, #2 - add r2, r2, #1 - add r1, r1, #1 - str r2, [sp, #8] - cmp r2, #4 - blt _02258278 -_02258294: - ldr r0, [sp, #8] - cmp r0, #4 - beq _022582DE - mov r0, #0xb5 - lsl r0, r0, #6 - ldr r1, [sp, #8] - add r0, r4, r0 - add r0, r0, r5 - add r1, #0x1f - add r2, r7, #0 - bl ov16_02252A2C - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r4, #0 - bl ov16_02253EC0 - ldr r0, [sp, #8] - add r1, r4, r5 - lsl r0, r0, #1 - add r1, r1, r0 - ldr r0, _02258434 ; =0x00002D4C - ldrh r1, [r1, r0] - mov r0, #0x49 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #0xcc - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022582D2: - add r1, r4, r5 - add r0, #0x24 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - bne _022582E0 -_022582DE: - b _0225878A -_022582E0: - mov r0, #0xcd - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022582EA: - add r1, r0, #0 - add r1, #0x20 - add r1, r4, r1 - ldr r2, [r1, r5] - lsl r3, r2, #0x18 - lsr r3, r3, #0x18 - bne _02258304 - add r3, r4, r5 - add r0, #0x24 - ldr r3, [r3, r0] - mov r0, #7 - tst r0, r3 - beq _022583F2 -_02258304: - mov r0, #0x40 - tst r0, r2 - beq _0225830E - mov r0, #0xc7 - str r0, [r6, #0] -_0225830E: - ldr r2, [r1, r5] - mov r0, #7 - tst r0, r2 - beq _0225831A - mov r0, #0xc8 - str r0, [r6, #0] -_0225831A: - ldr r2, [r1, r5] - ldr r0, _02258430 ; =0x00000F88 - tst r0, r2 - beq _02258326 - mov r0, #0xc9 - str r0, [r6, #0] -_02258326: - ldr r2, [r1, r5] - mov r0, #0x10 - tst r0, r2 - beq _02258332 - mov r0, #0xca - str r0, [r6, #0] -_02258332: - ldr r2, [r1, r5] - mov r0, #0x20 - tst r0, r2 - beq _0225833E - mov r0, #0xcb - str r0, [r6, #0] -_0225833E: - ldr r0, _0225843C ; =0x00002DB0 - mov r2, #7 - add r0, r4, r0 - ldr r3, [r0, r5] - tst r2, r3 - beq _0225834E - mov r2, #0xcd - str r2, [r6, #0] -_0225834E: - ldr r1, [r1, r5] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - beq _02258362 - ldr r1, [r0, r5] - mov r0, #7 - tst r0, r1 - beq _02258362 - mov r0, #0xce - str r0, [r6, #0] -_02258362: - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_02258368: - ldr r7, _02258440 ; =0x00002D58 - add r1, r4, r5 - mov r0, #0 - mov r5, #6 - add r3, r7, #0 -_02258372: - ldrsb r2, [r1, r3] - cmp r2, #6 - bge _0225837E - mov r2, #1 - strb r5, [r1, r7] - str r2, [sp, #0xc] -_0225837E: - add r0, r0, #1 - add r1, r1, #1 - cmp r0, #8 - blt _02258372 - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _022583F2 - mov r0, #0xd3 - str r0, [r6, #0] - b _0225878A -_02258392: - add r1, r4, r5 - add r0, #0x24 - ldr r1, [r1, r0] - mov r0, #0xf - lsl r0, r0, #0x10 - tst r0, r1 - beq _022583F2 - mov r0, #6 - add r3, #0x70 - str r0, [r4, r3] - mov r0, #0xd4 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022583B0: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _022583C2 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_022583C2: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258444 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _022583F2 - ldr r0, _02258448 ; =0x00000109 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022583E6: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bls _022583F4 -_022583F2: - b _0225878A -_022583F4: - add r1, r7, #0 - bl ov16_022563F8 - ldr r1, _0225842C ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _0225844C ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0225841C - mov r0, #0xcf - b _0225841E -_0225841C: - mov r0, #0xc6 -_0225841E: - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A - nop -_02258428: .word 0x00002D8C -_0225842C: .word 0x0000215C -_02258430: .word 0x00000F88 -_02258434: .word 0x00002D4C -_02258438: .word 0x00002D6C -_0225843C: .word 0x00002DB0 -_02258440: .word 0x00002D58 -_02258444: .word 0x00002D90 -_02258448: .word 0x00000109 -_0225844C: .word 0x00002DA8 -_02258450: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02258516 - add r1, r7, #0 - bl ov16_022563F8 - ldr r1, _02258740 ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02258744 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02258484 - mov r0, #0xcf - b _02258486 -_02258484: - mov r0, #0xc6 -_02258486: - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_0225848E: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02258516 - add r1, r7, #0 - bl ov16_022563F8 - ldr r1, _02258740 ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02258744 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _022584C2 - mov r0, #0xcf - b _022584C4 -_022584C2: - mov r0, #0xc6 -_022584C4: - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022584CC: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bhi _02258516 - add r1, r7, #0 - bl ov16_022563F8 - ldr r1, _02258740 ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02258744 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02258500 - mov r0, #0xcf - b _02258502 -_02258500: - mov r0, #0xc6 -_02258502: - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_0225850A: - add r1, r4, r5 - add r0, r0, #4 - ldr r0, [r1, r0] - lsr r1, r0, #1 - cmp r2, r1 - bls _02258518 -_02258516: - b _0225878A -_02258518: - add r1, r7, #0 - bl ov16_022563F8 - ldr r1, _02258740 ; =0x0000215C - add r2, r4, r5 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02258744 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02258540 - mov r0, #0xcf - b _02258542 -_02258540: - mov r0, #0xc6 -_02258542: - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_0225854A: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _0225855C - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_0225855C: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02258656 - ldr r0, _0225874C ; =0x00002D59 - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _02258656 - mov r1, #0x13 - mov r0, #1 - lsl r1, r1, #4 - str r0, [sp, #0xc] - str r0, [r4, r1] - mov r0, #0xd0 - str r0, [r6, #0] - b _0225878A -_02258590: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _022585A2 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_022585A2: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02258656 - ldr r0, _02258750 ; =0x00002D5A - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _02258656 - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0xd0 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022585D8: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _022585EA - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_022585EA: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02258656 - ldr r0, _02258754 ; =0x00002D5B - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _02258656 - mov r0, #0x13 - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0xd0 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_02258620: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02258632 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_02258632: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _02258656 - ldr r0, _02258758 ; =0x00002D5C - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - blt _02258658 -_02258656: - b _0225878A -_02258658: - mov r0, #0x13 - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0xd0 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_0225866A: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _0225867C - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_0225867C: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _0225878A - ldr r0, _0225875C ; =0x00002D5D - add r1, r4, r5 - ldrsb r0, [r1, r0] - cmp r0, #0xc - bge _0225878A - mov r0, #0x13 - mov r1, #5 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0xd0 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022586B2: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _022586C4 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_022586C4: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _0225878A - ldr r0, _02258760 ; =0x00002DB0 - add r1, r4, r5 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x14 - tst r0, r1 - bne _0225878A - mov r0, #0xd1 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] - b _0225878A -_022586F6: - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x52 - bne _02258708 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r7, r0, #1 -_02258708: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02258748 ; =0x00002D90 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020E2178 - ldr r1, [sp, #0x14] - ldr r1, [r1, r5] - cmp r1, r0 - bhi _0225878A - ldr r0, _0225874C ; =0x00002D59 - mov r2, #0 - add r3, r4, r5 -_02258728: - ldrsb r1, [r3, r0] - cmp r1, #0xc - blt _02258736 - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #5 - blt _02258728 -_02258736: - cmp r2, #5 - beq _0225878A - ldr r7, _0225874C ; =0x00002D59 - b _02258764 - nop -_02258740: .word 0x0000215C -_02258744: .word 0x00002DA8 -_02258748: .word 0x00002D90 -_0225874C: .word 0x00002D59 -_02258750: .word 0x00002D5A -_02258754: .word 0x00002D5B -_02258758: .word 0x00002D5C -_0225875C: .word 0x00002D5D -_02258760: .word 0x00002DB0 -_02258764: - add r5, r4, r5 -_02258766: - ldr r0, [sp] - bl ov16_0223F4BC - mov r1, #5 - bl sub_020E1F6C - add r0, r5, r1 - ldrsb r0, [r0, r7] - cmp r0, #0xc - beq _02258766 - mov r0, #0x13 - add r1, r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0xd2 - str r0, [r6, #0] - mov r0, #1 - str r0, [sp, #0xc] -_0225878A: - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _0225879E - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02258874 - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r4, r1] -_0225879E: - ldr r0, [sp, #0xc] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02258104 - - thumb_func_start ov16_022587A4 -ov16_022587A4: ; 0x022587A4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r4, r2, #0 - mov r6, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02258AB8 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_02258ACC - str r0, [sp, #8] - mov r0, #0xc0 - mul r0, r4 - str r0, [sp] - add r1, r5, r0 - ldr r0, _02258868 ; =0x00002D8C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02258860 - cmp r7, #0x64 - beq _022587E2 - cmp r7, #0x65 - beq _022587F8 - cmp r7, #0x74 - beq _0225880E - b _02258836 -_022587E2: - add r0, r5, #0 - add r0, #0x94 - str r4, [r0, #0] - add r0, r5, #0 - mov r1, #5 - add r0, #0x88 - str r1, [r0, #0] - mov r0, #0x2f - str r0, [sp, #4] - mov r6, #1 - b _02258836 -_022587F8: - add r0, r5, #0 - add r0, #0x94 - str r4, [r0, #0] - add r0, r5, #0 - mov r1, #5 - add r0, #0x88 - str r1, [r0, #0] - mov r0, #0x19 - str r0, [sp, #4] - mov r6, #1 - b _02258836 -_0225880E: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _02258836 - ldr r0, [sp] - add r1, r5, r0 - ldr r0, _0225886C ; =0x00002D90 - ldr r1, [r1, r0] - sub r0, r6, #1 - mul r0, r1 - ldr r1, [sp, #8] - bl ov16_022563F8 - ldr r1, _02258870 ; =0x0000215C - mov r6, #1 - str r0, [r5, r1] - mov r0, #0xd7 - str r0, [sp, #4] -_02258836: - cmp r6, #1 - bne _02258860 - mov r0, #0x46 - lsl r0, r0, #2 - str r4, [r5, r0] - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02258874 - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r2, [sp, #4] - add r0, r5, #0 - mov r1, #1 - bl ov16_02251E1C - ldr r0, [r5, #8] - str r0, [r5, #0xc] - mov r0, #0x15 - str r0, [r5, #8] -_02258860: - add r0, r6, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02258868: .word 0x00002D8C -_0225886C: .word 0x00002D90 -_02258870: .word 0x0000215C - thumb_func_end ov16_022587A4 - - thumb_func_start ov16_02258874 -ov16_02258874: ; 0x02258874 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_02255A4C - cmp r0, #0x67 - bne _02258886 - mov r0, #0 - pop {r3, r4, r5, pc} -_02258886: - mov r0, #0xc0 - mul r0, r4 - add r2, r5, r0 - ldr r0, _022588A0 ; =0x00002DCC - ldr r1, [r2, r0] - lsl r1, r1, #0xa - lsr r1, r1, #0x1d - beq _0225889A - mov r0, #0 - pop {r3, r4, r5, pc} -_0225889A: - sub r0, #0x14 - ldrh r0, [r2, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022588A0: .word 0x00002DCC - thumb_func_end ov16_02258874 - - thumb_func_start ov16_022588A4 -ov16_022588A4: ; 0x022588A4 - lsl r1, r1, #4 - add r1, r0, r1 - ldr r0, _022588B8 ; =0x000021A8 - ldr r0, [r1, r0] - cmp r0, #0x27 - bne _022588B4 - mov r0, #1 - bx lr -_022588B4: - mov r0, #0 - bx lr - ; .align 2, 0 -_022588B8: .word 0x000021A8 - thumb_func_end ov16_022588A4 - - thumb_func_start ov16_022588BC -ov16_022588BC: ; 0x022588BC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [r5, #0x6c] - str r0, [sp] - add r6, r2, #0 - mov r7, #0 - cmp r1, #0xff - bne _022588D4 - add sp, #0xc - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_022588D4: - add r0, r5, #0 - bl ov16_02259AC0 - cmp r0, #1 - bne _022588E4 - add sp, #0xc - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_022588E4: - ldr r1, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02258AB8 - add r4, r0, #0 - ldr r1, [r5, #0x6c] - add r0, r5, #0 - add r2, r7, #0 - bl ov16_02258ACC - str r0, [sp, #4] - ldr r0, [sp] - ldr r1, [r5, #0x64] - bl ov16_0223E208 - str r0, [sp, #8] - cmp r4, #0x2f - bgt _0225891A - cmp r4, #0x2b - blt _02258918 - bne _02258910 - b _02258A4C -_02258910: - cmp r4, #0x2e - beq _0225899C - cmp r4, #0x2f - beq _022589FA -_02258918: - b _02258A92 -_0225891A: - cmp r4, #0x74 - bne _02258984 - ldr r0, [r5, #0x64] - mov r1, #0xc0 - mul r1, r0 - add r3, r5, r1 - ldr r1, _02258A98 ; =0x00002D8C - ldr r2, [r3, r1] - cmp r2, #0 - beq _02258984 - add r1, #0x2c - ldrh r1, [r3, r1] - cmp r1, #0 - bne _02258984 - add r1, r5, r0 - ldr r0, _02258A9C ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - ldr r1, [sp, #8] - lsl r1, r1, #3 - add r2, r5, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r2, [r2, r1] - lsl r2, r2, #3 - lsr r2, r2, #0x1a - tst r0, r2 - bne _02258984 - ldr r0, _02258AA0 ; =0x00003044 - sub r1, #0xaa - ldr r0, [r5, r0] - cmp r0, r1 - beq _02258984 - ldr r2, [r5, #0x6c] - mov r1, #0x1c - mul r1, r2 - add r3, r5, r1 - mov r1, #0xb6 - lsl r1, r1, #2 - ldr r2, [r3, r1] - cmp r2, #0 - bne _02258978 - add r1, #8 - ldr r1, [r3, r1] - cmp r1, #0 - beq _02258984 -_02258978: - mov r1, #0x85 - lsl r1, r1, #6 - ldr r2, [r5, r1] - mov r1, #0x10 - tst r1, r2 - beq _02258986 -_02258984: - b _02258A92 -_02258986: - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _02258AA4 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r1, r0 - beq _02258A92 - mov r1, #0xd8 - str r1, [r6, #0] - add r7, r0, #0 - b _02258A92 -_0225899C: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _02258A98 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _02258A92 - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _02258A92 - mov r0, #0x85 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #0x10 - tst r0, r1 - bne _02258A92 - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r1, r5, r0 - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02258A92 - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02258AA8 ; =0x00002D90 - add r2, r5, r2 - ldr r2, [r2, r0] - sub r1, #0xc1 - add r0, r2, #0 - mul r0, r1 - ldr r1, [sp, #4] - bl ov16_022563F8 - ldr r1, _02258AAC ; =0x0000215C - mov r7, #1 - str r0, [r5, r1] - lsr r0, r1, #5 - str r0, [r6, #0] - b _02258A92 -_022589FA: - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _02258A98 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _02258A92 - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _02258A92 - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r1, r5, r0 - mov r0, #0x2e - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02258A92 - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02258AA8 ; =0x00002D90 - add r2, r5, r2 - ldr r2, [r2, r0] - sub r1, #0xc1 - add r0, r2, #0 - mul r0, r1 - ldr r1, [sp, #4] - bl ov16_022563F8 - ldr r1, _02258AAC ; =0x0000215C - mov r7, #1 - str r0, [r5, r1] - lsr r0, r1, #5 - str r0, [r6, #0] - b _02258A92 -_02258A4C: - ldr r1, [r5, #0x6c] - mov r0, #0xc0 - mul r0, r1 - ldr r2, _02258A98 ; =0x00002D8C - add r0, r5, r0 - ldr r1, [r0, r2] - cmp r1, #0 - beq _02258A92 - ldr r1, _02258AB0 ; =0x0000216C - ldr r3, [r5, r1] - mov r1, #2 - tst r1, r3 - beq _02258A92 - add r1, r2, #4 - ldr r0, [r0, r1] - ldr r1, [sp, #4] - bl ov16_022563F8 - ldr r1, _02258AAC ; =0x0000215C - mov r7, #1 - str r0, [r5, r1] - mov r1, #0xc6 - str r1, [r6, #0] - ldr r0, [r5, #0x6c] - add r1, #0x52 - str r0, [r5, r1] - ldr r0, [r5, #0x6c] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02258AB4 ; =0x00002DB8 - add r2, r5, r2 - ldrh r0, [r2, r0] - add r1, #0x68 - str r0, [r5, r1] -_02258A92: - add r0, r7, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02258A98: .word 0x00002D8C -_02258A9C: .word 0x0000219C -_02258AA0: .word 0x00003044 -_02258AA4: .word 0x000003E9 -_02258AA8: .word 0x00002D90 -_02258AAC: .word 0x0000215C -_02258AB0: .word 0x0000216C -_02258AB4: .word 0x00002DB8 - thumb_func_end ov16_022588BC - - thumb_func_start ov16_02258AB8 -ov16_02258AB8: ; 0x02258AB8 - push {r4, lr} - add r4, r0, #0 - bl ov16_02258874 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov16_0225B0FC - pop {r4, pc} - thumb_func_end ov16_02258AB8 - - thumb_func_start ov16_02258ACC -ov16_02258ACC: ; 0x02258ACC - push {r4, lr} - add r4, r0, #0 - cmp r2, #0 - beq _02258ADE - cmp r2, #1 - beq _02258AFA - cmp r2, #2 - beq _02258AE6 - b _02258B04 -_02258ADE: - bl ov16_02258874 - add r1, r0, #0 - b _02258B04 -_02258AE6: - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _02258B10 ; =0x00002DCC - ldr r0, [r2, r0] - lsl r0, r0, #0xa - lsr r0, r0, #0x1d - beq _02258AFA - mov r0, #0 - pop {r4, pc} -_02258AFA: - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02258B14 ; =0x00002DB8 - ldrh r1, [r1, r0] -_02258B04: - add r0, r4, #0 - mov r2, #2 - bl ov16_0225B0FC - pop {r4, pc} - nop -_02258B10: .word 0x00002DCC -_02258B14: .word 0x00002DB8 - thumb_func_end ov16_02258ACC - - thumb_func_start ov16_02258B18 -ov16_02258B18: ; 0x02258B18 - push {r4, lr} - add r4, r0, #0 - bl ov16_02258874 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0xb - bl ov16_0225B0FC - pop {r4, pc} - thumb_func_end ov16_02258B18 - - thumb_func_start ov16_02258B2C -ov16_02258B2C: ; 0x02258B2C - push {r4, lr} - add r4, r0, #0 - bl ov16_02258874 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0xc - bl ov16_0225B0FC - pop {r4, pc} - thumb_func_end ov16_02258B2C - - thumb_func_start ov16_02258B40 -ov16_02258B40: ; 0x02258B40 - mov r2, #0xc0 - mul r2, r1 - ldr r1, _02258B50 ; =0x00002DB8 - add r2, r0, r2 - ldrh r1, [r2, r1] - ldr r3, _02258B54 ; =ov16_0225B0FC - mov r2, #8 - bx r3 - ; .align 2, 0 -_02258B50: .word 0x00002DB8 -_02258B54: .word ov16_0225B0FC - thumb_func_end ov16_02258B40 - - thumb_func_start ov16_02258B58 -ov16_02258B58: ; 0x02258B58 - push {r3, lr} - mov r2, #0xc0 - mul r2, r1 - ldr r1, _02258B7C ; =0x00002DCC - add r3, r0, r2 - ldr r2, [r3, r1] - lsl r2, r2, #0xa - lsr r2, r2, #0x1d - beq _02258B6E - mov r0, #0 - pop {r3, pc} -_02258B6E: - sub r1, #0x14 - ldrh r1, [r3, r1] - mov r2, #9 - bl ov16_0225B0FC - pop {r3, pc} - nop -_02258B7C: .word 0x00002DCC - thumb_func_end ov16_02258B58 - - thumb_func_start ov16_02258B80 -ov16_02258B80: ; 0x02258B80 - push {r3, lr} - mov r2, #0xc0 - mul r2, r1 - ldr r1, _02258BA4 ; =0x00002DCC - add r3, r0, r2 - ldr r2, [r3, r1] - lsl r2, r2, #0xa - lsr r2, r2, #0x1d - beq _02258B96 - mov r0, #0 - pop {r3, pc} -_02258B96: - sub r1, #0x14 - ldrh r1, [r3, r1] - mov r2, #0xa - bl ov16_0225B0FC - pop {r3, pc} - nop -_02258BA4: .word 0x00002DCC - thumb_func_end ov16_02258B80 - - thumb_func_start ov16_02258BA8 -ov16_02258BA8: ; 0x02258BA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r2, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r6, #0 - bl ov16_02258AB8 - cmp r0, #0x7b - bne _02258BC6 - add sp, #8 - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} -_02258BC6: - mov r0, #0xc0 - add r7, r4, #0 - mul r7, r0 - ldr r0, _02258CA8 ; =0x00002DB0 - add r2, r5, r7 - ldr r1, [r2, r0] - ldr r3, _02258CAC ; =0x0400E000 - tst r1, r3 - bne _02258BE2 - add r0, #0x10 - ldr r1, [r2, r0] - lsr r0, r3, #0x10 - tst r0, r1 - beq _02258BE4 -_02258BE2: - mov r6, #1 -_02258BE4: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x17 - beq _02258C04 - mov r0, #0x17 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #3 - add r3, r4, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02258C38 -_02258C04: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #8 - beq _02258C24 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #8 - bne _02258C3A -_02258C24: - mov r0, #0x2a - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #3 - add r3, r4, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02258C3A -_02258C38: - mov r6, #1 -_02258C3A: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02255A4C - cmp r0, #0x1a - beq _02258C72 - ldr r0, _02258CB0 ; =0x00002DCC - add r1, r5, r7 - ldr r0, [r1, r0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x1d - bne _02258C72 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - cmp r0, #2 - beq _02258C72 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - cmp r0, #2 - bne _02258C8C -_02258C72: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02258AB8 - cmp r0, #0x6a - beq _02258C8C - mov r0, #6 - lsl r0, r0, #6 - ldr r1, [r5, r0] - mov r0, #7 - lsl r0, r0, #0xc - tst r0, r1 - beq _02258CA2 -_02258C8C: - mov r0, #0x47 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #3 - add r3, r4, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02258CA2 - mov r6, #1 -_02258CA2: - add r0, r6, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02258CA8: .word 0x00002DB0 -_02258CAC: .word 0x0400E000 -_02258CB0: .word 0x00002DCC - thumb_func_end ov16_02258BA8 - - thumb_func_start ov16_02258CB4 -ov16_02258CB4: ; 0x02258CB4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - str r0, [sp] - mov r6, #0 - str r2, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - add r5, r6, #0 - bl ov16_02258B40 - add r7, r0, #0 - ldr r1, [sp, #4] - add r0, r4, #0 - mov r2, #1 - bl ov16_02258ACC - str r0, [sp, #0x10] - ldr r1, [r4, #0x6c] - add r0, r4, #0 - bl ov16_02259AC0 - cmp r0, #1 - bne _02258CEA - add sp, #0x14 - add r0, r6, #0 - pop {r4, r5, r6, r7, pc} -_02258CEA: - cmp r7, #0x17 - bls _02258CF0 - b _0225916A -_02258CF0: - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02258CFC: ; jump table - .short _0225916A - _02258CFC - 2 ; case 0 - .short _02258D76 - _02258CFC - 2 ; case 1 - .short _02258D8E - _02258CFC - 2 ; case 2 - .short _02258DA6 - _02258CFC - 2 ; case 3 - .short _02258DBE - _02258CFC - 2 ; case 4 - .short _02258DD6 - _02258CFC - 2 ; case 5 - .short _02258DEE - _02258CFC - 2 ; case 6 - .short _02258D2C - _02258CFC - 2 ; case 7 - .short _02258E64 - _02258CFC - 2 ; case 8 - .short _02258E7C - _02258CFC - 2 ; case 9 - .short _02258D4C - _02258CFC - 2 ; case 10 - .short _02258EDE - _02258CFC - 2 ; case 11 - .short _02258F24 - _02258CFC - 2 ; case 12 - .short _02258F6A - _02258CFC - 2 ; case 13 - .short _02258FB0 - _02258CFC - 2 ; case 14 - .short _02258FF6 - _02258CFC - 2 ; case 15 - .short _02259066 - _02258CFC - 2 ; case 16 - .short _02259084 - _02258CFC - 2 ; case 17 - .short _022590A2 - _02258CFC - 2 ; case 18 - .short _022590C0 - _02258CFC - 2 ; case 19 - .short _022590DE - _02258CFC - 2 ; case 20 - .short _0225914A - _02258CFC - 2 ; case 21 - .short _022590FC - _02258CFC - 2 ; case 22 - .short _02259164 - _02258CFC - 2 ; case 23 -_02258D2C: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _02259028 ; =0x00002D8C - ldr r1, [r2, r0] - add r0, r0, #4 - ldr r0, [r2, r0] - cmp r1, r0 - beq _02258D48 - ldr r1, _0225902C ; =0x0000215C - ldr r0, [sp, #0x10] - mov r5, #0xc6 - str r0, [r4, r1] -_02258D48: - mov r6, #1 - b _02259180 -_02258D4C: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259030 ; =0x00002D90 - ldr r2, [r1, r0] - sub r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, r2 - beq _02258D72 - ldr r1, [sp, #0x10] - add r0, r1, #0 - mul r0, r2 - mov r1, #0x64 - bl ov16_022563F8 - ldr r1, _0225902C ; =0x0000215C - mov r5, #0xc6 - str r0, [r4, r1] -_02258D72: - mov r6, #1 - b _02259180 -_02258D76: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259034 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x40 - tst r0, r1 - beq _02258D8A - mov r5, #0xc7 -_02258D8A: - mov r6, #1 - b _02259180 -_02258D8E: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259034 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02258DA2 - mov r5, #0xc8 -_02258DA2: - mov r6, #1 - b _02259180 -_02258DA6: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259034 ; =0x00002DAC - ldr r1, [r1, r0] - ldr r0, _02259038 ; =0x00000F88 - tst r0, r1 - beq _02258DBA - mov r5, #0xc9 -_02258DBA: - mov r6, #1 - b _02259180 -_02258DBE: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259034 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x10 - tst r0, r1 - beq _02258DD2 - mov r5, #0xca -_02258DD2: - mov r6, #1 - b _02259180 -_02258DD6: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259034 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - beq _02258DEA - mov r5, #0xcb -_02258DEA: - mov r6, #1 - b _02259180 -_02258DEE: - str r5, [sp, #0xc] -_02258DF0: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r7, r1, #0 - mul r7, r0 - add r1, r4, r7 - ldr r0, _0225903C ; =0x00002D4C - add r2, r6, r1 - ldrh r0, [r2, r0] - cmp r0, #0 - beq _02258E22 - add r2, r5, r1 - ldr r1, _02259040 ; =0x00002D70 - ldrb r1, [r2, r1] - bl sub_020790DC - add r1, r4, r7 - add r2, r5, r1 - ldr r1, _02259044 ; =0x00002D6C - ldrb r1, [r2, r1] - sub r1, r0, r1 - ldr r0, [sp, #0xc] - cmp r1, r0 - ble _02258E22 - str r1, [sp, #0xc] - str r5, [sp, #8] -_02258E22: - add r5, r5, #1 - add r6, r6, #2 - cmp r5, #4 - blt _02258DF0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldr r1, [sp, #8] - add r0, r4, r0 - ldr r2, [sp, #0x10] - add r0, r0, r7 - add r1, #0x1f - bl ov16_02252A2C - ldr r0, [sp] - ldr r2, [r4, #0x64] - add r1, r4, #0 - bl ov16_02253EC0 - ldr r0, [r4, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, [sp, #8] - add r2, r4, r2 - lsl r0, r0, #1 - add r2, r2, r0 - ldr r0, _0225903C ; =0x00002D4C - add r1, #0x64 - ldrh r0, [r2, r0] - mov r5, #0xcc - mov r6, #1 - str r0, [r4, r1] - b _02259180 -_02258E64: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259048 ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02258E78 - mov r5, #0xcd -_02258E78: - mov r6, #1 - b _02259180 -_02258E7C: - ldr r2, [r4, #0x64] - mov r0, #0xc0 - add r1, r2, #0 - mul r1, r0 - ldr r6, _02259034 ; =0x00002DAC - add r0, r4, r1 - ldr r2, [r0, r6] - lsl r3, r2, #0x18 - lsr r3, r3, #0x18 - bne _02258E9A - add r6, r6, #4 - ldr r6, [r0, r6] - mov r0, #7 - tst r0, r6 - beq _02258EDA -_02258E9A: - mov r0, #0x40 - tst r0, r2 - beq _02258EA2 - mov r5, #0xc7 -_02258EA2: - mov r0, #7 - tst r0, r2 - beq _02258EAA - mov r5, #0xc8 -_02258EAA: - ldr r0, _02259038 ; =0x00000F88 - tst r0, r2 - beq _02258EB2 - mov r5, #0xc9 -_02258EB2: - mov r0, #0x10 - tst r0, r2 - beq _02258EBA - mov r5, #0xca -_02258EBA: - mov r0, #0x20 - tst r0, r2 - beq _02258EC2 - mov r5, #0xcb -_02258EC2: - ldr r0, _02259048 ; =0x00002DB0 - add r1, r4, r1 - ldr r1, [r1, r0] - mov r0, #7 - and r0, r1 - beq _02258ED0 - mov r5, #0xcd -_02258ED0: - cmp r3, #0 - beq _02258EDA - cmp r0, #0 - beq _02258EDA - mov r5, #0xce -_02258EDA: - mov r6, #1 - b _02259180 -_02258EDE: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259030 ; =0x00002D90 - add r2, r4, r0 - ldr r0, [r2, r1] - sub r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, r0 - beq _02258F20 - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225902C ; =0x0000215C - str r0, [r4, r1] - mov r0, #0x13 - add r1, r6, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _0225904C ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r6, #1 - cmp r0, r1 - bne _02258F1E - mov r5, #0xcf - b _02258F20 -_02258F1E: - mov r5, #0xc6 -_02258F20: - mov r6, #1 - b _02259180 -_02258F24: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259030 ; =0x00002D90 - add r2, r4, r0 - ldr r0, [r2, r1] - sub r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, r0 - beq _02258F66 - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225902C ; =0x0000215C - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _0225904C ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r6, #1 - cmp r0, r1 - bne _02258F64 - mov r5, #0xcf - b _02258F66 -_02258F64: - mov r5, #0xc6 -_02258F66: - mov r6, #1 - b _02259180 -_02258F6A: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259030 ; =0x00002D90 - add r2, r4, r0 - ldr r0, [r2, r1] - sub r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, r0 - beq _02258FAC - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225902C ; =0x0000215C - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _0225904C ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r6, #1 - cmp r0, r1 - bne _02258FAA - mov r5, #0xcf - b _02258FAC -_02258FAA: - mov r5, #0xc6 -_02258FAC: - mov r6, #1 - b _02259180 -_02258FB0: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259030 ; =0x00002D90 - add r2, r4, r0 - ldr r0, [r2, r1] - sub r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, r0 - beq _02258FF2 - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225902C ; =0x0000215C - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _0225904C ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r6, #1 - cmp r0, r1 - bne _02258FF0 - mov r5, #0xcf - b _02258FF2 -_02258FF0: - mov r5, #0xc6 -_02258FF2: - mov r6, #1 - b _02259180 -_02258FF6: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259030 ; =0x00002D90 - add r2, r4, r0 - ldr r0, [r2, r1] - sub r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, r0 - beq _02259062 - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225902C ; =0x0000215C - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x64] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _0225904C ; =0x00002DA8 - b _02259050 - ; .align 2, 0 -_02259028: .word 0x00002D8C -_0225902C: .word 0x0000215C -_02259030: .word 0x00002D90 -_02259034: .word 0x00002DAC -_02259038: .word 0x00000F88 -_0225903C: .word 0x00002D4C -_02259040: .word 0x00002D70 -_02259044: .word 0x00002D6C -_02259048: .word 0x00002DB0 -_0225904C: .word 0x00002DA8 -_02259050: - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r6, #1 - cmp r0, r1 - bne _02259060 - mov r5, #0xcf - b _02259062 -_02259060: - mov r5, #0xc6 -_02259062: - mov r6, #1 - b _02259180 -_02259066: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _022591E4 ; =0x00002D59 - add r2, r4, r2 - ldrsb r1, [r2, r1] - cmp r1, #0xc - bge _02259080 - mov r1, #1 - add r0, #0x70 - str r1, [r4, r0] - mov r5, #0xd0 -_02259080: - mov r6, #1 - b _02259180 -_02259084: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _022591E8 ; =0x00002D5A - add r2, r4, r2 - ldrsb r1, [r2, r1] - cmp r1, #0xc - bge _0225909E - mov r1, #2 - add r0, #0x70 - str r1, [r4, r0] - mov r5, #0xd0 -_0225909E: - mov r6, #1 - b _02259180 -_022590A2: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _022591EC ; =0x00002D5B - add r2, r4, r2 - ldrsb r1, [r2, r1] - cmp r1, #0xc - bge _022590BC - mov r1, #3 - add r0, #0x70 - str r1, [r4, r0] - mov r5, #0xd0 -_022590BC: - mov r6, #1 - b _02259180 -_022590C0: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _022591F0 ; =0x00002D5C - add r2, r4, r2 - ldrsb r1, [r2, r1] - cmp r1, #0xc - bge _022590DA - mov r1, #4 - add r0, #0x70 - str r1, [r4, r0] - mov r5, #0xd0 -_022590DA: - mov r6, #1 - b _02259180 -_022590DE: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, _022591F4 ; =0x00002D5D - add r2, r4, r2 - ldrsb r1, [r2, r1] - cmp r1, #0xc - bge _022590F8 - mov r1, #5 - add r0, #0x70 - str r1, [r4, r0] - mov r5, #0xd0 -_022590F8: - mov r6, #1 - b _02259180 -_022590FC: - ldr r2, [r4, #0x64] - mov r1, #0xc0 - mul r1, r2 - add r3, r4, r1 - ldr r1, _022591E4 ; =0x00002D59 - add r0, r6, #0 -_02259108: - ldrsb r2, [r3, r1] - cmp r2, #0xc - blt _02259116 - add r0, r0, #1 - add r3, r3, #1 - cmp r0, #5 - blt _02259108 -_02259116: - cmp r0, #5 - beq _02259146 - ldr r5, _022591E4 ; =0x00002D59 - mov r7, #5 - mov r6, #0xc0 -_02259120: - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r7, #0 - bl sub_020E1F6C - ldr r0, [r4, #0x64] - add r2, r0, #0 - mul r2, r6 - add r0, r4, r2 - add r0, r1, r0 - ldrsb r0, [r0, r5] - cmp r0, #0xc - beq _02259120 - mov r0, #0x13 - add r1, r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r5, #0xd2 -_02259146: - mov r6, #1 - b _02259180 -_0225914A: - ldr r1, [r4, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _022591F8 ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x14 - tst r0, r1 - bne _02259160 - mov r5, #0xd1 -_02259160: - mov r6, #1 - b _02259180 -_02259164: - ldr r5, _022591FC ; =0x00000109 - mov r6, #1 - b _02259180 -_0225916A: - ldr r0, [sp, #4] - mov r1, #0xc0 - mul r1, r0 - ldr r0, _02259200 ; =0x00002DB8 - add r1, r4, r1 - ldrh r0, [r1, r0] - bl sub_0207D324 - cmp r0, #1 - bne _02259180 - mov r6, #1 -_02259180: - cmp r6, #1 - bne _022591DE - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02255A4C - cmp r0, #0x67 - beq _022591A8 - ldr r1, [r4, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - mov r1, #0xb7 - add r2, r4, r2 - lsl r1, r1, #6 - ldr r2, [r2, r1] - mov r1, #1 - lsl r1, r1, #0x1a - tst r1, r2 - beq _022591B2 -_022591A8: - mov r0, #0x4e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _022591B6 -_022591B2: - add r0, #0x78 - str r5, [r4, r0] -_022591B6: - ldr r0, [sp, #4] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _02259200 ; =0x00002DB8 - add r2, r4, r2 - ldrh r0, [r2, r0] - add r1, #0x68 - str r0, [r4, r1] - ldr r2, [r4, #0x64] - mov r0, #0xba - lsl r0, r0, #2 - mov r1, #0x1c - add r3, r2, #0 - mul r3, r1 - add r0, r4, r0 - ldr r2, [r0, r3] - mov r1, #2 - orr r1, r2 - str r1, [r0, r3] -_022591DE: - add r0, r6, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022591E4: .word 0x00002D59 -_022591E8: .word 0x00002D5A -_022591EC: .word 0x00002D5B -_022591F0: .word 0x00002D5C -_022591F4: .word 0x00002D5D -_022591F8: .word 0x00002DB0 -_022591FC: .word 0x00000109 -_02259200: .word 0x00002DB8 - thumb_func_end ov16_02258CB4 - - thumb_func_start ov16_02259204 -ov16_02259204: ; 0x02259204 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - str r0, [sp] - str r2, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - bl ov16_02258B58 - add r6, r0, #0 - ldr r1, [sp, #4] - add r0, r4, #0 - mov r2, #2 - bl ov16_02258ACC - str r0, [sp, #0x10] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov16_02258B80 - ldr r1, _02259558 ; =0x00002154 - add r2, r4, #0 - str r0, [r4, r1] - ldr r0, _0225955C ; =0x00003118 - mov r5, #0 - str r5, [r4, r0] - add r2, #0x88 - str r5, [r2, #0] - ldr r1, [r4, r1] - cmp r1, #0 - bne _02259248 - add sp, #0x14 - add r0, r5, #0 - pop {r4, r5, r6, r7, pc} -_02259248: - cmp r6, #0x1e - bls _0225924E - b _022597D2 -_0225924E: - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225925A: ; jump table - .short _022597D2 - _0225925A - 2 ; case 0 - .short _022592C6 - _0225925A - 2 ; case 1 - .short _022592DE - _0225925A - 2 ; case 2 - .short _022592F6 - _0225925A - 2 ; case 3 - .short _0225930E - _0225925A - 2 ; case 4 - .short _02259326 - _0225925A - 2 ; case 5 - .short _0225933E - _0225925A - 2 ; case 6 - .short _02259298 - _0225925A - 2 ; case 7 - .short _022593C0 - _0225925A - 2 ; case 8 - .short _022593D8 - _0225925A - 2 ; case 9 - .short _022592A4 - _0225925A - 2 ; case 10 - .short _0225949E - _0225925A - 2 ; case 11 - .short _022594E0 - _0225925A - 2 ; case 12 - .short _02259522 - _0225925A - 2 ; case 13 - .short _02259592 - _0225925A - 2 ; case 14 - .short _022595D4 - _0225925A - 2 ; case 15 - .short _022596D0 - _0225925A - 2 ; case 16 - .short _022596EE - _0225925A - 2 ; case 17 - .short _0225970C - _0225925A - 2 ; case 18 - .short _0225972A - _0225925A - 2 ; case 19 - .short _02259748 - _0225925A - 2 ; case 20 - .short _022597B4 - _0225925A - 2 ; case 21 - .short _02259766 - _0225925A - 2 ; case 22 - .short _022597CE - _0225925A - 2 ; case 23 - .short _02259616 - _0225925A - 2 ; case 24 - .short _0225963E - _0225925A - 2 ; case 25 - .short _02259662 - _0225925A - 2 ; case 26 - .short _02259678 - _0225925A - 2 ; case 27 - .short _0225968E - _0225925A - 2 ; case 28 - .short _022596A4 - _0225925A - 2 ; case 29 - .short _022596BA - _0225925A - 2 ; case 30 -_02259298: - ldr r1, [sp, #0x10] - sub r2, r0, #4 - str r1, [r4, r2] - mov r1, #0xc6 - str r1, [r4, r0] - b _022597D2 -_022592A4: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259560 ; =0x00002D90 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - mul r0, r1 - mov r1, #0x64 - bl ov16_022563F8 - ldr r1, _02259564 ; =0x00003114 - mov r2, #0xc6 - str r0, [r4, r1] - add r0, r1, #4 - str r2, [r4, r0] - b _022597D2 -_022592C6: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _02259568 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #0x40 - tst r1, r2 - beq _02259380 - mov r1, #0xc7 - str r1, [r4, r0] - b _022597D2 -_022592DE: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _02259568 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #7 - tst r1, r2 - beq _02259380 - mov r1, #0xc8 - str r1, [r4, r0] - b _022597D2 -_022592F6: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _02259568 ; =0x00002DAC - ldr r2, [r2, r1] - ldr r1, _0225956C ; =0x00000F88 - tst r1, r2 - beq _02259380 - mov r1, #0xc9 - str r1, [r4, r0] - b _022597D2 -_0225930E: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _02259568 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #0x10 - tst r1, r2 - beq _02259380 - mov r1, #0xca - str r1, [r4, r0] - b _022597D2 -_02259326: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _02259568 ; =0x00002DAC - ldr r2, [r2, r1] - mov r1, #0x20 - tst r1, r2 - beq _02259380 - mov r1, #0xcb - str r1, [r4, r0] - b _022597D2 -_0225933E: - add r6, r5, #0 - add r7, r5, #0 -_02259342: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - str r0, [sp, #8] - ldr r0, _02259570 ; =0x00002D4C - add r2, r7, r1 - ldrh r0, [r2, r0] - cmp r0, #0 - beq _02259374 - add r2, r6, r1 - ldr r1, _02259574 ; =0x00002D70 - ldrb r1, [r2, r1] - bl sub_020790DC - ldr r1, [sp, #8] - add r1, r4, r1 - add r2, r6, r1 - ldr r1, _02259578 ; =0x00002D6C - ldrb r1, [r2, r1] - sub r0, r0, r1 - cmp r0, r5 - ble _02259374 - add r5, r0, #0 - str r6, [sp, #0xc] -_02259374: - add r6, r6, #1 - add r7, r7, #2 - cmp r6, #4 - blt _02259342 - cmp r5, #0 - bne _02259382 -_02259380: - b _022597D2 -_02259382: - mov r0, #0xb5 - lsl r0, r0, #6 - add r1, r4, r0 - ldr r0, [sp, #8] - ldr r2, [sp, #0x10] - add r0, r1, r0 - ldr r1, [sp, #0xc] - add r1, #0x1f - bl ov16_02252A2C - ldr r0, [sp] - ldr r2, [r4, #0x6c] - add r1, r4, #0 - bl ov16_02253EC0 - ldr r0, [r4, #0x6c] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, [sp, #0xc] - add r2, r4, r2 - lsl r0, r0, #1 - add r2, r2, r0 - ldr r0, _02259570 ; =0x00002D4C - add r1, #0x64 - ldrh r0, [r2, r0] - str r0, [r4, r1] - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xcc - str r1, [r4, r0] - b _022597D2 -_022593C0: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _0225957C ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #7 - tst r1, r2 - beq _02259494 - mov r1, #0xcd - str r1, [r4, r0] - b _022597D2 -_022593D8: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259568 ; =0x00002DAC - add r3, r4, r0 - ldr r0, [r3, r1] - lsl r2, r0, #0x18 - lsr r2, r2, #0x18 - bne _022593F4 - add r1, r1, #4 - ldr r2, [r3, r1] - mov r1, #7 - tst r1, r2 - beq _02259494 -_022593F4: - mov r1, #0x40 - tst r0, r1 - beq _02259400 - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xc7 - str r1, [r4, r0] -_02259400: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259568 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02259418 - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xc8 - str r1, [r4, r0] -_02259418: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259568 ; =0x00002DAC - ldr r1, [r1, r0] - ldr r0, _0225956C ; =0x00000F88 - tst r0, r1 - beq _02259430 - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xc9 - str r1, [r4, r0] -_02259430: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259568 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x10 - tst r0, r1 - beq _02259448 - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xca - str r1, [r4, r0] -_02259448: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259568 ; =0x00002DAC - ldr r1, [r1, r0] - mov r0, #0x20 - tst r0, r1 - beq _02259460 - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xcb - str r1, [r4, r0] -_02259460: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _0225957C ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #7 - tst r0, r1 - beq _02259478 - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xcd - str r1, [r4, r0] -_02259478: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _02259568 ; =0x00002DAC - ldr r1, [r2, r0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - beq _02259494 - add r0, r0, #4 - ldr r1, [r2, r0] - mov r0, #7 - tst r0, r1 - bne _02259496 -_02259494: - b _022597D2 -_02259496: - ldr r0, _0225955C ; =0x00003118 - mov r1, #0xce - str r1, [r4, r0] - b _022597D2 -_0225949E: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259560 ; =0x00002D90 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _02259564 ; =0x00003114 - str r0, [r4, r1] - mov r0, #0x13 - add r1, r5, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _02259580 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r5, #1 - cmp r0, r1 - ldr r0, _0225955C ; =0x00003118 - bne _022594DA - mov r1, #0xcf - str r1, [r4, r0] - b _022597D2 -_022594DA: - mov r1, #0xc6 - str r1, [r4, r0] - b _022597D2 -_022594E0: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259560 ; =0x00002D90 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _02259564 ; =0x00003114 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _02259580 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r5, #1 - cmp r0, r1 - ldr r0, _0225955C ; =0x00003118 - bne _0225951C - mov r1, #0xcf - str r1, [r4, r0] - b _022597D2 -_0225951C: - mov r1, #0xc6 - str r1, [r4, r0] - b _022597D2 -_02259522: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259560 ; =0x00002D90 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _02259564 ; =0x00003114 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _02259580 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r5, #1 - cmp r0, r1 - ldr r0, _0225955C ; =0x00003118 - b _02259584 - ; .align 2, 0 -_02259558: .word 0x00002154 -_0225955C: .word 0x00003118 -_02259560: .word 0x00002D90 -_02259564: .word 0x00003114 -_02259568: .word 0x00002DAC -_0225956C: .word 0x00000F88 -_02259570: .word 0x00002D4C -_02259574: .word 0x00002D70 -_02259578: .word 0x00002D6C -_0225957C: .word 0x00002DB0 -_02259580: .word 0x00002DA8 -_02259584: - bne _0225958C - mov r1, #0xcf - str r1, [r4, r0] - b _022597D2 -_0225958C: - mov r1, #0xc6 - str r1, [r4, r0] - b _022597D2 -_02259592: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259838 ; =0x00002D90 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225983C ; =0x00003114 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _02259840 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r5, #1 - cmp r0, r1 - ldr r0, _02259844 ; =0x00003118 - bne _022595CE - mov r1, #0xcf - str r1, [r4, r0] - b _022597D2 -_022595CE: - mov r1, #0xc6 - str r1, [r4, r0] - b _022597D2 -_022595D4: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02259838 ; =0x00002D90 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - bl ov16_022563F8 - ldr r1, _0225983C ; =0x00003114 - str r0, [r4, r1] - mov r0, #0x13 - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r2, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r2 - add r2, r4, r0 - ldr r0, _02259840 ; =0x00002DA8 - ldr r0, [r2, r0] - bl sub_02077648 - sub r1, r5, #1 - cmp r0, r1 - ldr r0, _02259844 ; =0x00003118 - bne _02259610 - mov r1, #0xcf - str r1, [r4, r0] - b _022597D2 -_02259610: - mov r1, #0xc6 - str r1, [r4, r0] - b _022597D2 -_02259616: - ldr r2, _02259848 ; =0x00002D58 - mov r6, #6 - mov r3, #0xd3 - mov r7, #0xc0 -_0225961E: - ldr r0, [r4, #0x6c] - add r1, r0, #0 - mul r1, r7 - add r0, r4, r1 - add r0, r0, r5 - ldrsb r1, [r0, r2] - cmp r1, #6 - bge _02259636 - ldr r1, _02259848 ; =0x00002D58 - strb r6, [r0, r1] - ldr r0, _02259844 ; =0x00003118 - str r3, [r4, r0] -_02259636: - add r5, r5, #1 - cmp r5, #8 - blt _0225961E - b _022597D2 -_0225963E: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - add r3, r2, #0 - mul r3, r1 - ldr r2, _0225984C ; =0x00002DB0 - add r3, r4, r3 - ldr r3, [r3, r2] - mov r2, #0xf - lsl r2, r2, #0x10 - tst r2, r3 - bne _02259656 - b _022597D2 -_02259656: - mov r2, #6 - add r1, #0x70 - str r2, [r4, r1] - mov r1, #0xd4 - str r1, [r4, r0] - b _022597D2 -_02259662: - add r2, r4, #0 - ldr r1, [sp, #4] - add r2, #0x94 - str r1, [r2, #0] - add r1, r4, #0 - mov r2, #2 - add r1, #0x88 - str r2, [r1, #0] - mov r1, #0xe - str r1, [r4, r0] - b _022597D2 -_02259678: - add r2, r4, #0 - ldr r1, [sp, #4] - add r2, #0x94 - str r1, [r2, #0] - add r1, r4, #0 - mov r2, #2 - add r1, #0x88 - str r2, [r1, #0] - mov r1, #0x1f - str r1, [r4, r0] - b _022597D2 -_0225968E: - add r2, r4, #0 - ldr r1, [sp, #4] - add r2, #0x94 - str r1, [r2, #0] - add r1, r4, #0 - mov r2, #2 - add r1, #0x88 - str r2, [r1, #0] - mov r1, #0x16 - str r1, [r4, r0] - b _022597D2 -_022596A4: - add r2, r4, #0 - ldr r1, [sp, #4] - add r2, #0x94 - str r1, [r2, #0] - add r1, r4, #0 - mov r2, #2 - add r1, #0x88 - str r2, [r1, #0] - mov r1, #0x2f - str r1, [r4, r0] - b _022597D2 -_022596BA: - add r2, r4, #0 - ldr r1, [sp, #4] - add r2, #0x94 - str r1, [r2, #0] - add r1, r4, #0 - mov r2, #2 - add r1, #0x88 - str r2, [r1, #0] - mov r1, #0x19 - str r1, [r4, r0] - b _022597D2 -_022596D0: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - add r3, r2, #0 - mul r3, r1 - ldr r2, _02259850 ; =0x00002D59 - add r3, r4, r3 - ldrsb r2, [r3, r2] - cmp r2, #0xc - bge _022597D2 - mov r2, #1 - add r1, #0x70 - str r2, [r4, r1] - mov r1, #0xd0 - str r1, [r4, r0] - b _022597D2 -_022596EE: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - add r3, r2, #0 - mul r3, r1 - ldr r2, _02259854 ; =0x00002D5A - add r3, r4, r3 - ldrsb r2, [r3, r2] - cmp r2, #0xc - bge _022597D2 - mov r2, #2 - add r1, #0x70 - str r2, [r4, r1] - mov r1, #0xd0 - str r1, [r4, r0] - b _022597D2 -_0225970C: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - add r3, r2, #0 - mul r3, r1 - ldr r2, _02259858 ; =0x00002D5B - add r3, r4, r3 - ldrsb r2, [r3, r2] - cmp r2, #0xc - bge _022597D2 - mov r2, #3 - add r1, #0x70 - str r2, [r4, r1] - mov r1, #0xd0 - str r1, [r4, r0] - b _022597D2 -_0225972A: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - add r3, r2, #0 - mul r3, r1 - ldr r2, _0225985C ; =0x00002D5C - add r3, r4, r3 - ldrsb r2, [r3, r2] - cmp r2, #0xc - bge _022597D2 - mov r2, #4 - add r1, #0x70 - str r2, [r4, r1] - mov r1, #0xd0 - str r1, [r4, r0] - b _022597D2 -_02259748: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - add r3, r2, #0 - mul r3, r1 - ldr r2, _02259860 ; =0x00002D5D - add r3, r4, r3 - ldrsb r2, [r3, r2] - cmp r2, #0xc - bge _022597D2 - mov r2, #5 - add r1, #0x70 - str r2, [r4, r1] - mov r1, #0xd0 - str r1, [r4, r0] - b _022597D2 -_02259766: - ldr r1, [r4, #0x6c] - mov r0, #0xc0 - mul r0, r1 - add r2, r4, r0 - ldr r0, _02259850 ; =0x00002D59 -_02259770: - ldrsb r1, [r2, r0] - cmp r1, #0xc - blt _0225977E - add r5, r5, #1 - add r2, r2, #1 - cmp r5, #5 - blt _02259770 -_0225977E: - cmp r5, #5 - beq _022597D2 - ldr r5, _02259850 ; =0x00002D59 - mov r7, #5 - mov r6, #0xc0 -_02259788: - ldr r0, [sp] - bl ov16_0223F4BC - add r1, r7, #0 - bl sub_020E1F6C - ldr r0, [r4, #0x6c] - add r2, r0, #0 - mul r2, r6 - add r0, r4, r2 - add r0, r1, r0 - ldrsb r0, [r0, r5] - cmp r0, #0xc - beq _02259788 - mov r0, #0x13 - add r1, r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02259844 ; =0x00003118 - mov r1, #0xd2 - str r1, [r4, r0] - b _022597D2 -_022597B4: - ldr r2, [r4, #0x6c] - mov r1, #0xc0 - mul r1, r2 - add r2, r4, r1 - ldr r1, _0225984C ; =0x00002DB0 - ldr r2, [r2, r1] - mov r1, #1 - lsl r1, r1, #0x14 - tst r1, r2 - bne _022597D2 - mov r1, #0xd1 - str r1, [r4, r0] - b _022597D2 -_022597CE: - ldr r1, _02259864 ; =0x00000109 - str r1, [r4, r0] -_022597D2: - ldr r0, [r4, #0x6c] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - add r0, r4, r2 - mov r2, #0xb7 - lsl r2, r2, #6 - ldr r3, [r0, r2] - mov r0, #1 - lsl r0, r0, #0x1a - tst r0, r3 - beq _022597F2 - ldr r0, _02259844 ; =0x00003118 - mov r1, #0 - str r1, [r4, r0] - b _02259832 -_022597F2: - ldr r0, [sp, #4] - sub r2, #8 - add r3, r0, #0 - mul r3, r1 - add r0, r4, r3 - ldrh r0, [r0, r2] - add r1, #0x68 - str r0, [r4, r1] - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0225982A - ldr r0, _02259844 ; =0x00003118 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0225982A - mov r0, #0xba - ldr r1, [r4, #0x64] - lsl r0, r0, #2 - add r3, r4, r0 - mov r0, #0x1c - add r2, r1, #0 - mul r2, r0 - ldr r1, [r3, r2] - mov r0, #2 - orr r0, r1 - str r0, [r3, r2] -_0225982A: - mov r0, #0x46 - ldr r1, [r4, #0x6c] - lsl r0, r0, #2 - str r1, [r4, r0] -_02259832: - mov r0, #1 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02259838: .word 0x00002D90 -_0225983C: .word 0x00003114 -_02259840: .word 0x00002DA8 -_02259844: .word 0x00003118 -_02259848: .word 0x00002D58 -_0225984C: .word 0x00002DB0 -_02259850: .word 0x00002D59 -_02259854: .word 0x00002D5A -_02259858: .word 0x00002D5B -_0225985C: .word 0x00002D5C -_02259860: .word 0x00002D5D -_02259864: .word 0x00000109 - thumb_func_end ov16_02259204 - - thumb_func_start ov16_02259868 -ov16_02259868: ; 0x02259868 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02258AB8 - cmp r0, #0x69 - bne _022598F6 - ldr r5, [r4, #0x64] - mov r6, #0xc0 - add r3, r5, #0 - mul r3, r6 - ldr r0, _0225990C ; =0x00002DB0 - add r2, r4, r3 - ldr r1, [r2, r0] - lsl r6, r6, #4 - tst r6, r1 - bne _0225990A - mov r6, #0x70 - tst r6, r1 - bne _0225990A - ldr r6, _02259910 ; =0x0000213C - ldr r7, [r4, r6] - mov r6, #2 - lsl r6, r6, #8 - tst r7, r6 - bne _0225990A - lsl r6, r6, #3 - tst r1, r6 - bne _0225990A - mov r6, #0xc1 - lsl r6, r6, #6 - lsl r5, r5, #1 - add r7, r4, r5 - add r5, r6, #0 - add r5, #0x9c - ldrh r5, [r7, r5] - ldr r1, [r4, r6] - cmp r1, r5 - bne _022598DC - add r1, r0, #0 - add r1, #0x1c - ldr r1, [r2, r1] - lsl r1, r1, #5 - lsr r5, r1, #0x1c - cmp r5, #0xa - bhs _0225990A - add r0, #0x1c - add r0, r4, r0 - ldr r2, [r0, r3] - ldr r1, _02259914 ; =0xF87FFFFF - and r2, r1 - add r1, r5, #1 - lsl r1, r1, #0x1c - lsr r1, r1, #5 - orr r1, r2 - str r1, [r0, r3] - pop {r3, r4, r5, r6, r7, pc} -_022598DC: - add r0, #0x1c - add r2, r4, r0 - ldr r1, [r2, r3] - ldr r0, _02259914 ; =0xF87FFFFF - and r0, r1 - str r0, [r2, r3] - ldr r0, [r4, #0x64] - ldr r1, [r4, r6] - lsl r0, r0, #1 - add r0, r4, r0 - add r6, #0x9c - strh r1, [r0, r6] - pop {r3, r4, r5, r6, r7, pc} -_022598F6: - ldr r0, _02259918 ; =0x00002DCC - ldr r1, [r4, #0x64] - add r3, r4, r0 - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, [r3, r2] - ldr r0, _02259914 ; =0xF87FFFFF - and r0, r1 - str r0, [r3, r2] -_0225990A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225990C: .word 0x00002DB0 -_02259910: .word 0x0000213C -_02259914: .word 0xF87FFFFF -_02259918: .word 0x00002DCC - thumb_func_end ov16_02259868 - - thumb_func_start ov16_0225991C -ov16_0225991C: ; 0x0225991C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, [r4, #0x64] - add r0, r4, #0 - bl ov16_02258AB8 - cmp r0, #0x69 - bne _022599A8 - ldr r5, _022599C0 ; =0x0000216C - ldr r0, _022599C4 ; =0x801FDA49 - ldr r1, [r4, r5] - tst r0, r1 - beq _022599BC - ldr r2, [r4, #0x64] - mov r0, #0xc1 - lsl r0, r0, #6 - lsl r1, r2, #1 - ldr r3, [r4, r0] - add r1, r4, r1 - add r0, #0x9c - ldrh r0, [r1, r0] - cmp r3, r0 - bne _022599BC - mov r0, #0xc0 - add r1, r2, #0 - mul r1, r0 - ldr r3, _022599C8 ; =0x00002DCC - add r6, r4, r1 - ldr r0, [r6, r3] - lsl r0, r0, #5 - lsr r0, r0, #0x1c - beq _022599BC - mov r7, #0x1c - mul r7, r2 - mov r2, #0xb5 - add r7, r4, r7 - lsl r2, r2, #2 - ldr r7, [r7, r2] - lsl r7, r7, #0x17 - lsr r7, r7, #0x1d - bne _022599BC - add r7, r3, #0 - sub r7, #0x1c - ldr r6, [r6, r7] - mov r7, #0xc0 - lsl r7, r7, #4 - tst r7, r6 - bne _022599BC - mov r7, #0x70 - tst r7, r6 - bne _022599BC - sub r5, #0x30 - ldr r5, [r4, r5] - sub r2, #0xd4 - tst r2, r5 - bne _022599BC - mov r2, #1 - lsl r2, r2, #0xc - tst r2, r6 - bne _022599BC - add r2, r4, r3 - sub r0, r0, #1 - lsl r0, r0, #0x1c - ldr r4, [r2, r1] - ldr r3, _022599CC ; =0xF87FFFFF - lsr r0, r0, #5 - and r3, r4 - orr r0, r3 - str r0, [r2, r1] - pop {r3, r4, r5, r6, r7, pc} -_022599A8: - ldr r0, _022599C8 ; =0x00002DCC - ldr r1, [r4, #0x64] - add r3, r4, r0 - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r1, [r3, r2] - ldr r0, _022599CC ; =0xF87FFFFF - and r0, r1 - str r0, [r3, r2] -_022599BC: - pop {r3, r4, r5, r6, r7, pc} - nop -_022599C0: .word 0x0000216C -_022599C4: .word 0x801FDA49 -_022599C8: .word 0x00002DCC -_022599CC: .word 0xF87FFFFF - thumb_func_end ov16_0225991C - - thumb_func_start ov16_022599D0 -ov16_022599D0: ; 0x022599D0 - push {r4, r5, r6, lr} - add r5, r0, #0 - cmp r3, #1 - bne _022599E2 - sub r0, r2, #2 - cmp r0, #1 - bhi _022599E2 - mov r0, #1 - b _022599E4 -_022599E2: - mov r0, #0 -_022599E4: - cmp r0, #1 - mov r0, #0xc0 - add r4, r1, #0 - mul r4, r0 - ldr r2, _02259A20 ; =0x00002D8C - add r1, r5, r4 - ldr r0, [r1, r2] - add r2, r2, #4 - ldr r1, [r1, r2] - lsl r0, r0, #0x10 - lsl r1, r1, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - mov r2, #0x30 - mov r6, #0 - bl sub_0208C104 - ldr r1, _02259A24 ; =0x00002DAC - add r2, r5, r4 - ldr r1, [r2, r1] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bne _02259A1A - cmp r0, #4 - beq _02259A1C - cmp r0, #3 - beq _02259A1C -_02259A1A: - mov r6, #0xb -_02259A1C: - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02259A20: .word 0x00002D8C -_02259A24: .word 0x00002DAC - thumb_func_end ov16_022599D0 - - thumb_func_start ov16_02259A28 -ov16_02259A28: ; 0x02259A28 - push {r3, r4} - mov r3, #0xc0 - add r4, r1, #0 - mul r4, r3 - add r1, r0, r4 - ldr r0, _02259A58 ; =0x00002DB0 - mov r2, #1 - ldr r0, [r1, r0] - lsl r1, r2, #0x16 - tst r1, r0 - bne _02259A50 - lsl r1, r3, #4 - tst r1, r0 - bne _02259A50 - mov r1, #0x70 - tst r1, r0 - bne _02259A50 - lsl r1, r2, #0xc - tst r0, r1 - beq _02259A52 -_02259A50: - mov r2, #0 -_02259A52: - add r0, r2, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 -_02259A58: .word 0x00002DB0 - thumb_func_end ov16_02259A28 - - thumb_func_start ov16_02259A5C -ov16_02259A5C: ; 0x02259A5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - add r6, r2, #0 - bl ov16_0223E16C - str r0, [sp, #0xc] - add r0, r5, #0 - bl ov16_0223E24C - str r0, [sp, #8] - add r0, r5, #0 - bl ov16_0223E22C - add r7, r0, #0 - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #2 - lsl r1, r1, #8 - tst r0, r1 - beq _02259A9A - add r0, r6, #0 - mov r1, #0x9b - mov r2, #0 - bl sub_02074470 - add r2, r0, #0 - b _02259A9E -_02259A9A: - sub r1, #0xd8 - ldr r2, [r4, r1] -_02259A9E: - str r7, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r1, [sp, #0xc] - ldr r3, [sp, #8] - add r0, r6, #0 - bl sub_02077E64 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02259A5C - - thumb_func_start ov16_02259AB4 -ov16_02259AB4: ; 0x02259AB4 - lsl r1, r1, #8 - add r1, r0, r1 - mov r0, #0x23 - lsl r0, r0, #8 - ldrb r0, [r1, r0] - bx lr - thumb_func_end ov16_02259AB4 - - thumb_func_start ov16_02259AC0 -ov16_02259AC0: ; 0x02259AC0 - mov r3, #0x1c - mul r3, r1 - add r1, r0, r3 - mov r0, #0xba - lsl r0, r0, #2 - ldr r1, [r1, r0] - mov r0, #8 - mov r2, #0 - tst r0, r1 - beq _02259AD6 - mov r2, #1 -_02259AD6: - add r0, r2, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov16_02259AC0 - - thumb_func_start ov16_02259ADC -ov16_02259ADC: ; 0x02259ADC - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #0 - bl ov16_0223E16C - add r4, r0, #0 - bl sub_02025F20 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02025F30 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02025EF0 - ldr r2, [r5, #0x64] - mov r1, #0xc0 - add r4, r2, #0 - mul r4, r1 - ldr r1, _02259B34 ; =0x00002DB4 - add r3, r5, r4 - ldr r2, [r3, r1] - cmp r6, r2 - bne _02259B30 - add r2, r1, #0 - add r2, #0xa - ldrb r2, [r3, r2] - lsl r2, r2, #0x18 - lsr r2, r2, #0x1c - cmp r7, r2 - bne _02259B30 - sub r1, #0x20 - add r1, r5, r1 - add r1, r1, r4 - mov r2, #7 - bl sub_02002238 - cmp r0, #0 - bne _02259B30 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02259B30: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02259B34: .word 0x00002DB4 - thumb_func_end ov16_02259ADC - - thumb_func_start ov16_02259B38 -ov16_02259B38: ; 0x02259B38 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - mov r1, #0 - bl ov16_0223E16C - add r4, r0, #0 - bl sub_02025F20 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02025F30 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02025EF0 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x90 - add r2, sp, #0 - bl sub_02074470 - add r0, r5, #0 - mov r1, #7 - mov r2, #0 - bl sub_02074470 - cmp r6, r0 - bne _02259B96 - add r0, r5, #0 - mov r1, #0x9d - mov r2, #0 - bl sub_02074470 - cmp r7, r0 - bne _02259B96 - add r0, r4, #0 - add r1, sp, #0 - mov r2, #7 - bl sub_02002238 - cmp r0, #0 - bne _02259B96 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02259B96: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_02259B38 - - thumb_func_start ov16_02259B9C -ov16_02259B9C: ; 0x02259B9C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r4, #0 - add r7, r0, #0 - add r5, r1, #0 - str r2, [sp, #4] - str r4, [sp, #8] - bl ov16_0223DF1C - cmp r0, #0 - bgt _02259BB4 - b _0225A16C -_02259BB4: - ldr r0, _02259EB4 ; =0x00002D66 - add r6, r5, r0 -_02259BB8: - ldr r0, _02259EB8 ; =0x000021EC - add r1, r5, r4 - ldrb r1, [r1, r0] - mov r0, #0x46 - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r3, [r5, r0] - mov r0, #0xc0 - mul r0, r3 - add r2, r5, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r1, [r2, r0] - ldr r0, _02259EBC ; =0x0000015F - cmp r1, r0 - bne _02259BEC - ldr r0, _02259EC0 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _02259BEC - add r0, r5, #0 - add r1, r3, #0 - bl ov16_02255A4C - cmp r0, #0x3b - beq _02259BEE -_02259BEC: - b _02259DDA -_02259BEE: - mov r0, #0xd - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02259C16 - mov r0, #0x4c - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - beq _02259C18 -_02259C16: - b _02259D88 -_02259C18: - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0xf3 - tst r1, r0 - bne _02259C76 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - ldr r2, _02259EC4 ; =0x00002D64 - add r1, r5, r1 - ldrb r2, [r1, r2] - cmp r2, #0 - beq _02259C76 - ldr r2, _02259EC8 ; =0x00002D65 - ldrb r2, [r1, r2] - cmp r2, #0 - beq _02259C76 - ldr r3, _02259EC4 ; =0x00002D64 - mov r2, #0 - mov r0, #0x46 - strb r2, [r1, r3] - lsl r0, r0, #2 - ldr r4, [r5, r0] - mov r1, #0xc0 - add r6, r4, #0 - mul r6, r1 - add r6, r5, r6 - add r4, r3, #1 - strb r2, [r6, r4] - ldr r0, [r5, r0] - add r2, r3, #2 - add r4, r0, #0 - mul r4, r1 - add r2, r5, r2 - ldrb r3, [r2, r4] - mov r0, #0x1f - add r1, #0x46 - bic r3, r0 - ldr r0, [sp, #4] - strb r3, [r2, r4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259C76: - mov r1, #0x30 - tst r1, r0 - beq _02259CD0 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - ldr r2, _02259EC4 ; =0x00002D64 - add r1, r5, r1 - ldrb r2, [r1, r2] - cmp r2, #0xa - beq _02259CD0 - ldr r2, _02259EC8 ; =0x00002D65 - ldrb r2, [r1, r2] - cmp r2, #0xa - beq _02259CD0 - ldr r3, _02259EC4 ; =0x00002D64 - mov r2, #0xa - mov r0, #0x46 - strb r2, [r1, r3] - lsl r0, r0, #2 - ldr r4, [r5, r0] - mov r1, #0xc0 - add r6, r4, #0 - mul r6, r1 - add r6, r5, r6 - add r4, r3, #1 - strb r2, [r6, r4] - add r2, r3, #2 - ldr r3, [r5, r0] - add r2, r5, r2 - add r0, r3, #0 - mul r0, r1 - ldrb r4, [r2, r0] - mov r3, #0x1f - add r1, #0x46 - bic r4, r3 - mov r3, #1 - str r3, [sp, #8] - orr r3, r4 - strb r3, [r2, r0] - ldr r0, [sp, #4] - str r1, [r0, #0] - b _0225A16C -_02259CD0: - mov r1, #3 - tst r1, r0 - beq _02259D2C - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - ldr r2, _02259EC4 ; =0x00002D64 - add r1, r5, r1 - ldrb r2, [r1, r2] - cmp r2, #0xb - beq _02259D2C - ldr r2, _02259EC8 ; =0x00002D65 - ldrb r2, [r1, r2] - cmp r2, #0xb - beq _02259D2C - ldr r3, _02259EC4 ; =0x00002D64 - mov r2, #0xb - mov r0, #0x46 - strb r2, [r1, r3] - lsl r0, r0, #2 - ldr r4, [r5, r0] - mov r1, #0xc0 - add r6, r4, #0 - mul r6, r1 - add r6, r5, r6 - add r4, r3, #1 - strb r2, [r6, r4] - add r2, r3, #2 - ldr r3, [r5, r0] - add r2, r5, r2 - add r0, r3, #0 - mul r0, r1 - ldrb r4, [r2, r0] - mov r3, #0x1f - add r1, #0x46 - bic r4, r3 - mov r3, #2 - orr r3, r4 - strb r3, [r2, r0] - ldr r0, [sp, #4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259D2C: - mov r1, #0xc0 - tst r0, r1 - beq _02259DDA - add r0, r1, #0 - add r0, #0x58 - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259EC4 ; =0x00002D64 - add r0, r5, r0 - ldrb r1, [r0, r1] - cmp r1, #0xf - beq _02259DDA - ldr r1, _02259EC8 ; =0x00002D65 - ldrb r1, [r0, r1] - cmp r1, #0xf - beq _02259DDA - ldr r3, _02259EC4 ; =0x00002D64 - mov r2, #0xf - strb r2, [r0, r3] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r4, [r5, r0] - mov r1, #0xc0 - add r6, r4, #0 - mul r6, r1 - add r6, r5, r6 - add r4, r3, #1 - strb r2, [r6, r4] - add r2, r3, #2 - ldr r3, [r5, r0] - add r2, r5, r2 - add r0, r3, #0 - mul r0, r1 - ldrb r4, [r2, r0] - mov r3, #0x1f - add r1, #0x46 - bic r4, r3 - mov r3, #3 - orr r3, r4 - strb r3, [r2, r0] - ldr r0, [sp, #4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259D88: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r1 - ldr r1, _02259EC4 ; =0x00002D64 - add r0, r5, r0 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _02259DDA - ldr r1, _02259EC8 ; =0x00002D65 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _02259DDA - ldr r3, _02259EC4 ; =0x00002D64 - mov r2, #0 - strb r2, [r0, r3] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r4, [r5, r0] - mov r1, #0xc0 - add r6, r4, #0 - mul r6, r1 - add r6, r5, r6 - add r4, r3, #1 - strb r2, [r6, r4] - ldr r0, [r5, r0] - add r2, r3, #2 - add r4, r0, #0 - mul r4, r1 - add r2, r5, r2 - ldrb r3, [r2, r4] - mov r0, #0x1f - add r1, #0x46 - bic r3, r0 - ldr r0, [sp, #4] - strb r3, [r2, r4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259DDA: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r1 - mov r1, #0xb5 - add r0, r5, r0 - lsl r1, r1, #6 - ldrh r2, [r0, r1] - ldr r1, _02259ECC ; =0x000001A5 - cmp r2, r1 - bne _02259DFA - ldr r1, _02259EC0 ; =0x00002D8C - ldr r0, [r0, r1] - cmp r0, #0 - bne _02259DFC -_02259DFA: - b _02259F26 -_02259DFC: - mov r0, #0xd - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02259F00 - mov r0, #0x4c - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02259F00 - mov r0, #6 - lsl r0, r0, #6 - ldr r2, [r5, r0] - mov r0, #0xf3 - tst r0, r2 - bne _02259E58 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0xc0 - add r3, r0, #0 - mul r3, r1 - ldrb r0, [r6, r3] - lsl r1, r0, #0x1b - lsr r1, r1, #0x1b - cmp r1, #1 - bne _02259E58 - mov r1, #0x1f - bic r0, r1 - strb r0, [r6, r3] - ldr r1, _02259ED0 ; =0x00000106 - ldr r0, [sp, #4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259E58: - mov r0, #0x30 - tst r0, r2 - beq _02259E86 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0xc0 - add r3, r0, #0 - mul r3, r1 - ldrb r0, [r6, r3] - lsl r1, r0, #0x1b - lsr r1, r1, #0x1b - bne _02259E86 - mov r1, #0x1f - bic r0, r1 - mov r1, #1 - orr r0, r1 - str r1, [sp, #8] - strb r0, [r6, r3] - ldr r1, _02259ED0 ; =0x00000106 - ldr r0, [sp, #4] - str r1, [r0, #0] - b _0225A16C -_02259E86: - mov r0, #3 - tst r0, r2 - beq _02259ED4 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0xc0 - add r3, r0, #0 - mul r3, r1 - ldrb r0, [r6, r3] - lsl r1, r0, #0x1b - lsr r1, r1, #0x1b - cmp r1, #1 - bne _02259ED4 - mov r1, #0x1f - bic r0, r1 - strb r0, [r6, r3] - ldr r1, _02259ED0 ; =0x00000106 - ldr r0, [sp, #4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C - ; .align 2, 0 -_02259EB4: .word 0x00002D66 -_02259EB8: .word 0x000021EC -_02259EBC: .word 0x0000015F -_02259EC0: .word 0x00002D8C -_02259EC4: .word 0x00002D64 -_02259EC8: .word 0x00002D65 -_02259ECC: .word 0x000001A5 -_02259ED0: .word 0x00000106 -_02259ED4: - mov r0, #0xc0 - tst r0, r2 - beq _02259F26 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r1 - ldrb r2, [r6, r0] - lsl r1, r2, #0x1b - lsr r1, r1, #0x1b - cmp r1, #1 - bne _02259F26 - mov r1, #0x1f - bic r2, r1 - strb r2, [r6, r0] - ldr r1, _0225A174 ; =0x00000106 - ldr r0, [sp, #4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259F00: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r1 - ldrb r2, [r6, r0] - lsl r1, r2, #0x1b - lsr r1, r1, #0x1b - cmp r1, #1 - bne _02259F26 - mov r1, #0x1f - bic r2, r1 - strb r2, [r6, r0] - ldr r1, _0225A174 ; =0x00000106 - ldr r0, [sp, #4] - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259F26: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r3, [r5, r0] - mov r0, #0xc0 - mul r0, r3 - add r2, r5, r0 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r1, [r2, r0] - ldr r0, _0225A178 ; =0x000001ED - cmp r1, r0 - bne _02259FA4 - ldr r0, _0225A17C ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _02259FA4 - add r0, r5, #0 - add r1, r3, #0 - bl ov16_02255A4C - cmp r0, #0x79 - bne _02259FA4 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0xc0 - mul r0, r1 - add r1, r5, r0 - ldr r0, _0225A180 ; =0x00002DB8 - mov r2, #5 - ldrh r0, [r1, r0] - mov r1, #1 - bl sub_0207CFF0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_02077988 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r1, [r5, r1] - mov r2, #0xc0 - add r3, r1, #0 - mul r3, r2 - ldrb r1, [r6, r3] - lsl r2, r1, #0x1b - lsr r2, r2, #0x1b - cmp r0, r2 - beq _02259FA4 - mov r2, #0x1f - lsl r0, r0, #0x18 - bic r1, r2 - lsr r0, r0, #0x18 - mov r2, #0x1f - and r0, r2 - orr r0, r1 - strb r0, [r6, r3] - ldr r0, [sp, #4] - add r2, #0xe7 - str r2, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_02259FA4: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #0xc0 - add r3, r1, #0 - mul r3, r0 - mov r0, #0xb5 - add r2, r5, r3 - lsl r0, r0, #6 - ldrh r1, [r2, r0] - ldr r0, _0225A184 ; =0x000001E7 - cmp r1, r0 - bne _0225A000 - ldr r0, _0225A17C ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _0225A000 - ldr r0, _0225A188 ; =0x00002D66 - ldrb r0, [r2, r0] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1b - cmp r0, #1 - bne _0225A000 - ldr r0, _0225A18C ; =0x00002DB0 - ldr r1, [r2, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r1 - bne _0225A002 - add r0, r7, #0 - bl ov16_0223EBEC - mov r1, #0x80 - tst r0, r1 - bne _0225A000 - add r0, r1, #0 - add r0, #0x98 - ldr r1, [r5, r0] - mov r0, #0xc0 - add r3, r1, #0 - mul r3, r0 - ldr r0, _0225A180 ; =0x00002DB8 - add r1, r5, r3 - ldrh r0, [r1, r0] - cmp r0, #0x70 - bne _0225A002 -_0225A000: - b _0225A15E -_0225A002: - ldr r0, _0225A18C ; =0x00002DB0 - add r1, r5, r3 - ldr r1, [r1, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r1 - bne _0225A012 - b _0225A150 -_0225A012: - mov r0, #5 - bl sub_02073C74 - add r4, r0, #0 - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _0225A036 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _0225A190 ; =0x000021AC - ldr r1, [r1, r0] - b _0225A040 -_0225A036: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r5, r0] - mov r0, #1 - eor r1, r0 -_0225A040: - ldr r2, _0225A194 ; =0x0000219C - add r3, r5, r1 - ldrb r2, [r3, r2] - add r0, r7, #0 - bl ov16_0223DFAC - add r1, r4, #0 - bl sub_020775EC - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #6 - add r2, sp, #0xc - bl sub_02074B30 - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x70 - add r2, sp, #0xc - bl sub_02074B30 - add r0, r4, #0 - bl sub_02077A00 - add r0, r4, #0 - mov r1, #0xa5 - mov r2, #0 - bl sub_02074470 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _0225A198 ; =0x00002D42 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa6 - mov r2, #0 - bl sub_02074470 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _0225A19C ; =0x00002D44 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa7 - mov r2, #0 - bl sub_02074470 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _0225A1A0 ; =0x00002D46 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa8 - mov r2, #0 - bl sub_02074470 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _0225A1A4 ; =0x00002D48 - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa9 - mov r2, #0 - bl sub_02074470 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [r5, r1] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _0225A1A8 ; =0x00002D4A - strh r0, [r2, r1] - add r0, r4, #0 - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - mov r6, #0x46 - lsl r6, r6, #2 - ldr r2, [r5, r6] - mov r1, #0xc0 - mul r1, r2 - add r2, r5, r1 - ldr r1, _0225A1AC ; =0x00002D67 - strb r0, [r2, r1] - sub r0, r1, #1 - add r3, r5, r0 - ldr r0, [r5, r6] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldrb r1, [r3, r2] - mov r0, #0x1f - bic r1, r0 - strb r1, [r3, r2] - mov r1, #0x85 - lsl r1, r1, #6 - mov r0, #1 - ldr r2, [r5, r1] - lsl r0, r0, #0x1a - orr r0, r2 - str r0, [r5, r1] - ldr r2, [r5, r6] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_022662FC - add r0, r4, #0 - bl sub_020181C4 - add r1, r6, #0 - ldr r0, [sp, #4] - sub r1, #0x12 - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_0225A150: - mov r1, #0x4a - ldr r0, [sp, #4] - lsl r1, r1, #2 - str r1, [r0, #0] - mov r0, #1 - str r0, [sp, #8] - b _0225A16C -_0225A15E: - add r0, r7, #0 - add r4, r4, #1 - bl ov16_0223DF1C - cmp r4, r0 - bge _0225A16C - b _02259BB8 -_0225A16C: - ldr r0, [sp, #8] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225A174: .word 0x00000106 -_0225A178: .word 0x000001ED -_0225A17C: .word 0x00002D8C -_0225A180: .word 0x00002DB8 -_0225A184: .word 0x000001E7 -_0225A188: .word 0x00002D66 -_0225A18C: .word 0x00002DB0 -_0225A190: .word 0x000021AC -_0225A194: .word 0x0000219C -_0225A198: .word 0x00002D42 -_0225A19C: .word 0x00002D44 -_0225A1A0: .word 0x00002D46 -_0225A1A4: .word 0x00002D48 -_0225A1A8: .word 0x00002D4A -_0225A1AC: .word 0x00002D67 - thumb_func_end ov16_02259B9C - - thumb_func_start ov16_0225A1B0 -ov16_0225A1B0: ; 0x0225A1B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp, #4] - str r1, [sp] - mov r7, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _0225A1F2 - ldr r5, [sp] - ldr r4, _0225A1F8 ; =0x0000312C -_0225A1C6: - mov r1, #0 -_0225A1C8: - add r0, r5, r1 - strb r1, [r0, r4] - add r1, r1, #1 - cmp r1, #6 - blt _0225A1C8 - ldr r1, [sp] - ldr r0, [sp, #4] - add r3, r1, #0 - add r6, r3, r7 - ldr r3, _0225A1FC ; =0x0000219C - add r2, r7, #0 - ldrb r3, [r6, r3] - bl ov16_0225A200 - ldr r0, [sp, #4] - add r5, r5, #6 - add r7, r7, #1 - bl ov16_0223DF1C - cmp r7, r0 - blt _0225A1C6 -_0225A1F2: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225A1F8: .word 0x0000312C -_0225A1FC: .word 0x0000219C - thumb_func_end ov16_0225A1B0 - - thumb_func_start ov16_0225A200 -ov16_0225A200: ; 0x0225A200 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - add r5, r2, #0 - add r4, r3, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r1, r0 - beq _0225A21A - mov r1, #0x18 - tst r1, r0 - beq _0225A22E -_0225A21A: - mov r1, #0x10 - tst r0, r1 - beq _0225A252 - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0223E1F8 - mov r1, #1 - tst r0, r1 - bne _0225A252 -_0225A22E: - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0223E1F8 - cmp r0, #4 - beq _0225A246 - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0223E1F8 - cmp r0, #5 - bne _0225A24A -_0225A246: - mov r1, #1 - b _0225A24C -_0225A24A: - mov r1, #0 -_0225A24C: - mov r0, #1 - and r5, r0 - b _0225A254 -_0225A252: - mov r1, #0 -_0225A254: - mov r2, #6 - mul r2, r5 - ldr r3, _0225A27C ; =0x0000312C - mov r0, #0 - add r7, r6, r2 -_0225A25E: - ldrb r5, [r7, r3] - cmp r4, r5 - beq _0225A26C - add r0, r0, #1 - add r7, r7, #1 - cmp r0, #6 - blt _0225A25E -_0225A26C: - ldr r3, _0225A27C ; =0x0000312C - add r3, r6, r3 - add r4, r3, r2 - ldrb r3, [r4, r1] - ldrb r2, [r4, r0] - strb r2, [r4, r1] - strb r3, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225A27C: .word 0x0000312C - thumb_func_end ov16_0225A200 - - thumb_func_start ov16_0225A280 -ov16_0225A280: ; 0x0225A280 - push {r4, r5, r6, r7, lr} - sub sp, #0x8c - str r0, [sp, #4] - ldr r0, [sp, #0xa0] - add r5, r1, #0 - str r0, [sp, #0xa0] - ldr r0, [sp, #0xb4] - str r2, [sp, #8] - str r0, [sp, #0xb4] - mov r0, #0 - str r0, [sp, #0x84] - ldr r0, [sp, #0xb4] - str r3, [sp, #0xc] - cmp r0, #1 - beq _0225A2A4 - bhi _0225A2A4 - bl sub_02022974 -_0225A2A4: - add r0, sp, #0x90 - ldrb r0, [r0, #0x1c] - mov r2, #1 - mov r3, #0 - str r0, [sp, #0x24] - ldr r1, [sp, #0x24] - add r0, r5, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] - add r0, sp, #0xb0 - ldrb r0, [r0] - mov r2, #2 - mov r3, #0 - str r0, [sp, #0x20] - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x78] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #4 - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #5 - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x13 - mov r3, #0 - bl ov16_02252060 - sub r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x70] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #0 - bl ov16_02252060 - sub r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x6c] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x16 - mov r3, #0 - bl ov16_02252060 - sub r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x68] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x17 - mov r3, #0 - bl ov16_02252060 - sub r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x64] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x2b - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r2, #0 - str r0, [sp, #0x60] - ldr r1, [sp, #0x24] - add r0, r5, #0 - add r3, r2, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r2, #0 - str r0, [sp, #0x58] - ldr r1, [sp, #0x20] - add r0, r5, #0 - add r3, r2, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x54] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x2f - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0x50] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x2f - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x30 - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x4c] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x30 - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - str r0, [sp, #0x48] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x34 - mov r3, #0 - bl ov16_02252060 - str r0, [sp, #0x44] - ldr r1, [sp, #0x24] - add r0, r5, #0 - bl ov16_02255A4C - add r7, r0, #0 - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov16_02255A4C - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x1d - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x40] - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x1d - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x3c] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x38] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x20] - add r0, r5, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x34] - ldr r1, [sp, #0x24] - add r0, r5, #0 - bl ov16_02258874 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov16_0225B0FC - str r0, [sp, #0x30] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov16_0225B0FC - str r0, [sp, #0x2c] - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov16_02258874 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov16_0225B0FC - str r0, [sp, #0x28] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov16_0225B0FC - ldr r0, [sp, #4] - bl ov16_0223DF0C - str r0, [sp, #0x5c] - add r0, sp, #0x90 - ldrh r4, [r0, #0x14] - cmp r4, #0 - bne _0225A4A4 - ldr r0, [sp, #8] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _0225A724 ; =0x000003E1 - ldrb r4, [r1, r0] -_0225A4A4: - cmp r7, #0x60 - bne _0225A4AC - mov r6, #0 - b _0225A4C8 -_0225A4AC: - add r0, sp, #0x90 - ldrb r1, [r0, #0x18] - cmp r1, #0 - bne _0225A4C0 - ldr r0, [sp, #8] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _0225A728 ; =0x000003E2 - ldrb r6, [r1, r0] - b _0225A4C8 -_0225A4C0: - mov r0, #0x3f - and r0, r1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 -_0225A4C8: - ldr r0, _0225A72C ; =0x00002158 - ldr r0, [r5, r0] - cmp r0, #0xa - bge _0225A4D4 - bl sub_02022974 -_0225A4D4: - ldr r0, _0225A72C ; =0x00002158 - mov r1, #0xa - ldr r0, [r5, r0] - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, sp, #0x90 - ldrb r0, [r0, #0x1c] - mov r1, #0xc0 - mul r1, r0 - add r2, r5, r1 - mov r1, #0xb7 - lsl r1, r1, #6 - ldr r2, [r2, r1] - mov r1, #2 - lsl r1, r1, #8 - tst r1, r2 - beq _0225A504 - cmp r6, #0xd - bne _0225A504 - lsl r1, r4, #0x11 - lsr r4, r1, #0x10 -_0225A504: - lsl r0, r0, #6 - add r1, r5, r0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _0225A522 - mov r0, #0xf - mul r0, r4 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A522: - cmp r7, #0x65 - bne _0225A53E - ldr r0, [sp, #8] - cmp r0, #0xa5 - beq _0225A53E - cmp r4, #0x3c - bhi _0225A53E - mov r0, #0xf - mul r0, r4 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A53E: - ldr r0, [sp, #8] - lsl r0, r0, #4 - str r0, [sp, #0x18] - add r1, r5, r0 - mov r0, #0x3e - lsl r0, r0, #4 - ldrb r0, [r1, r0] - cmp r7, #0x25 - str r0, [sp, #0x80] - beq _0225A556 - cmp r7, #0x4a - bne _0225A55E -_0225A556: - ldr r0, [sp, #0x7c] - lsl r0, r0, #0x11 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225A55E: - cmp r7, #0x70 - bne _0225A58C - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #3 - mov r3, #0 - bl ov16_0225B45C - str r0, [sp, #0x88] - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x59 - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x88] - sub r0, r1, r0 - cmp r0, #5 - bge _0225A58C - ldr r0, [sp, #0x7c] - lsl r0, r0, #0xf - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225A58C: - ldr r3, _0225A730 ; =0x0226EC92 - mov r2, #0 -_0225A590: - ldrb r1, [r3] - ldr r0, [sp, #0x30] - cmp r0, r1 - bne _0225A5B0 - ldrb r0, [r3, #1] - cmp r6, r0 - bne _0225A5B0 - ldr r0, [sp, #0x2c] - mov r1, #0x64 - add r0, #0x64 - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - b _0225A5B8 -_0225A5B0: - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #0x21 - blo _0225A590 -_0225A5B8: - ldr r0, [sp, #0x30] - cmp r0, #0x37 - bne _0225A5D0 - ldr r1, [sp, #0x7c] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225A5D0: - ldr r0, [sp, #0x30] - cmp r0, #0x7d - bne _0225A5E8 - ldr r1, [sp, #0x74] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] -_0225A5E8: - ldr r0, [sp, #0x30] - cmp r0, #0x3c - bne _0225A616 - ldr r0, [sp, #0x5c] - mov r1, #0x80 - tst r0, r1 - bne _0225A616 - ldr r1, _0225A734 ; =0x0000FE84 - ldr r0, [sp, #0x58] - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _0225A616 - ldr r1, [sp, #0x74] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] -_0225A616: - ldr r0, [sp, #0x28] - cmp r0, #0x3c - bne _0225A644 - ldr r0, [sp, #0x5c] - mov r1, #0x80 - tst r0, r1 - bne _0225A644 - ldr r1, _0225A734 ; =0x0000FE84 - ldr r0, [sp, #0x54] - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _0225A644 - ldr r1, [sp, #0x10] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] -_0225A644: - ldr r0, [sp, #0x30] - cmp r0, #0x3d - bne _0225A65A - ldr r1, _0225A738 ; =0x0000016E - ldr r0, [sp, #0x58] - cmp r0, r1 - bne _0225A65A - ldr r0, [sp, #0x74] - lsl r0, r0, #0x11 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] -_0225A65A: - ldr r0, [sp, #0x28] - cmp r0, #0x3e - bne _0225A670 - ldr r1, _0225A738 ; =0x0000016E - ldr r0, [sp, #0x54] - cmp r0, r1 - bne _0225A670 - ldr r0, [sp, #0x10] - lsl r0, r0, #0x11 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] -_0225A670: - ldr r0, [sp, #0x30] - cmp r0, #0x47 - bne _0225A680 - ldr r0, [sp, #0x58] - cmp r0, #0x19 - bne _0225A680 - lsl r0, r4, #0x11 - lsr r4, r0, #0x10 -_0225A680: - ldr r0, [sp, #0x28] - cmp r0, #0x5a - bne _0225A694 - ldr r0, [sp, #0x54] - cmp r0, #0x84 - bne _0225A694 - ldr r0, [sp, #0x78] - lsl r0, r0, #0x11 - lsr r0, r0, #0x10 - str r0, [sp, #0x78] -_0225A694: - ldr r0, [sp, #0x30] - cmp r0, #0x5b - bne _0225A6B0 - ldr r1, _0225A73C ; =0x0000FF98 - ldr r0, [sp, #0x58] - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _0225A6B0 - ldr r0, [sp, #0x7c] - lsl r0, r0, #0x11 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225A6B0: - ldr r0, [sp, #0x30] - cmp r0, #3 - bne _0225A6D6 - cmp r6, #0x10 - beq _0225A6BE - cmp r6, #8 - bne _0225A6D6 -_0225A6BE: - ldr r1, _0225A740 ; =0x000001E3 - ldr r0, [sp, #0x58] - cmp r0, r1 - bne _0225A6D6 - ldr r0, [sp, #0x2c] - mov r1, #0x64 - add r0, #0x64 - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A6D6: - ldr r0, [sp, #0x30] - cmp r0, #4 - bne _0225A6FE - cmp r6, #0x10 - beq _0225A6E4 - cmp r6, #0xb - bne _0225A6FE -_0225A6E4: - mov r1, #0x79 - ldr r0, [sp, #0x58] - lsl r1, r1, #2 - cmp r0, r1 - bne _0225A6FE - ldr r0, [sp, #0x2c] - mov r1, #0x64 - add r0, #0x64 - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A6FE: - ldr r0, [sp, #0x30] - cmp r0, #2 - bne _0225A75E - cmp r6, #0x10 - beq _0225A70C - cmp r6, #7 - bne _0225A75E -_0225A70C: - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x35 - mov r3, #0 - bl ov16_02252060 - mov r1, #2 - lsl r1, r1, #0x14 - tst r0, r1 - bne _0225A75E - ldr r1, _0225A744 ; =0x000001E7 - b _0225A748 - ; .align 2, 0 -_0225A724: .word 0x000003E1 -_0225A728: .word 0x000003E2 -_0225A72C: .word 0x00002158 -_0225A730: .word 0x0226EC92 -_0225A734: .word 0x0000FE84 -_0225A738: .word 0x0000016E -_0225A73C: .word 0x0000FF98 -_0225A740: .word 0x000001E3 -_0225A744: .word 0x000001E7 -_0225A748: - ldr r0, [sp, #0x58] - cmp r0, r1 - bne _0225A75E - ldr r0, [sp, #0x2c] - mov r1, #0x64 - add r0, #0x64 - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A75E: - ldr r0, [sp, #0x30] - cmp r0, #0x5e - bne _0225A77A - ldr r0, [sp, #0x80] - cmp r0, #0 - bne _0225A77A - ldr r0, [sp, #0x2c] - mov r1, #0x64 - add r0, #0x64 - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A77A: - ldr r0, [sp, #0x30] - cmp r0, #0x5f - bne _0225A798 - ldr r0, [sp, #0x80] - cmp r0, #1 - bne _0225A798 - ldr r0, [sp, #0x2c] - mov r1, #0x64 - add r0, #0x64 - str r0, [sp, #0x2c] - mul r0, r4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A798: - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r3, #0x2f - bl ov16_02255AB4 - cmp r0, #1 - bne _0225A7B4 - cmp r6, #0xa - beq _0225A7B0 - cmp r6, #0xf - bne _0225A7B4 -_0225A7B0: - lsl r0, r4, #0xf - lsr r4, r0, #0x10 -_0225A7B4: - cmp r7, #0x37 - bne _0225A7CA - ldr r1, [sp, #0x7c] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225A7CA: - cmp r7, #0x3e - bne _0225A7E6 - ldr r0, [sp, #0x48] - cmp r0, #0 - beq _0225A7E6 - ldr r1, [sp, #0x7c] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225A7E6: - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r3, #0x3f - bl ov16_02255AB4 - cmp r0, #1 - bne _0225A80E - ldr r0, [sp, #0x44] - cmp r0, #0 - beq _0225A80E - ldr r1, [sp, #0x78] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x78] -_0225A80E: - cmp r7, #0x39 - bne _0225A838 - mov r0, #0x3a - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [sp, #0x24] - add r1, r5, #0 - mov r2, #1 - bl ov16_022555A4 - cmp r0, #0 - beq _0225A838 - ldr r1, [sp, #0x74] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] -_0225A838: - cmp r7, #0x3a - bne _0225A862 - mov r0, #0x39 - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [sp, #0x24] - add r1, r5, #0 - mov r2, #1 - bl ov16_022555A4 - cmp r0, #0 - beq _0225A862 - ldr r1, [sp, #0x74] - mov r0, #0x96 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] -_0225A862: - cmp r6, #0xd - bne _0225A87A - mov r2, #1 - ldr r0, [sp, #4] - add r1, r5, #0 - lsl r2, r2, #0x10 - bl ov16_02255F68 - cmp r0, #0 - beq _0225A87A - lsl r0, r4, #0xf - lsr r4, r0, #0x10 -_0225A87A: - cmp r6, #0xa - bne _0225A892 - mov r2, #2 - ldr r0, [sp, #4] - add r1, r5, #0 - lsl r2, r2, #0x10 - bl ov16_02255F68 - cmp r0, #0 - beq _0225A892 - lsl r0, r4, #0xf - lsr r4, r0, #0x10 -_0225A892: - cmp r6, #0xc - bne _0225A8B6 - cmp r7, #0x41 - bne _0225A8B6 - ldr r0, [sp, #0x4c] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [sp, #0x50] - cmp r1, r0 - bgt _0225A8B6 - mov r0, #0x96 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A8B6: - cmp r6, #0xa - bne _0225A8DA - cmp r7, #0x42 - bne _0225A8DA - ldr r0, [sp, #0x4c] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [sp, #0x50] - cmp r1, r0 - bgt _0225A8DA - mov r0, #0x96 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A8DA: - cmp r6, #0xb - bne _0225A8FE - cmp r7, #0x43 - bne _0225A8FE - ldr r0, [sp, #0x4c] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [sp, #0x50] - cmp r1, r0 - bgt _0225A8FE - mov r0, #0x96 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A8FE: - cmp r6, #6 - bne _0225A922 - cmp r7, #0x44 - bne _0225A922 - ldr r0, [sp, #0x4c] - mov r1, #3 - bl sub_020E1F6C - ldr r1, [sp, #0x50] - cmp r1, r0 - bgt _0225A922 - mov r0, #0x96 - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A922: - cmp r6, #0xa - bne _0225A93A - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r3, #0x55 - bl ov16_02255AB4 - cmp r0, #1 - bne _0225A93A - lsl r0, r4, #0xf - lsr r4, r0, #0x10 -_0225A93A: - cmp r6, #0xa - bne _0225A95C - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r3, #0x57 - bl ov16_02255AB4 - cmp r0, #1 - bne _0225A95C - mov r0, #0x7d - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225A95C: - cmp r7, #0x56 - bne _0225A99C - ldr r0, [sp, #0x70] - mov r1, #5 - lsl r0, r0, #0x19 - asr r0, r0, #0x18 - str r0, [sp, #0x70] - ldr r0, [sp, #0x70] - mvn r1, r1 - cmp r0, r1 - bge _0225A974 - str r1, [sp, #0x70] -_0225A974: - ldr r0, [sp, #0x70] - cmp r0, #6 - ble _0225A97E - mov r0, #6 - str r0, [sp, #0x70] -_0225A97E: - ldr r0, [sp, #0x68] - mov r1, #5 - lsl r0, r0, #0x19 - asr r0, r0, #0x18 - str r0, [sp, #0x68] - ldr r0, [sp, #0x68] - mvn r1, r1 - cmp r0, r1 - bge _0225A992 - str r1, [sp, #0x68] -_0225A992: - ldr r0, [sp, #0x68] - cmp r0, #6 - ble _0225A99C - mov r0, #6 - str r0, [sp, #0x68] -_0225A99C: - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r3, #0x56 - bl ov16_02255AB4 - cmp r0, #1 - bne _0225A9E8 - ldr r0, [sp, #0x6c] - mov r1, #5 - lsl r0, r0, #0x19 - asr r0, r0, #0x18 - str r0, [sp, #0x6c] - ldr r0, [sp, #0x6c] - mvn r1, r1 - cmp r0, r1 - bge _0225A9C0 - str r1, [sp, #0x6c] -_0225A9C0: - ldr r0, [sp, #0x6c] - cmp r0, #6 - ble _0225A9CA - mov r0, #6 - str r0, [sp, #0x6c] -_0225A9CA: - ldr r0, [sp, #0x64] - mov r1, #5 - lsl r0, r0, #0x19 - asr r0, r0, #0x18 - str r0, [sp, #0x64] - ldr r0, [sp, #0x64] - mvn r1, r1 - cmp r0, r1 - bge _0225A9DE - str r1, [sp, #0x64] -_0225A9DE: - ldr r0, [sp, #0x64] - cmp r0, #6 - ble _0225A9E8 - mov r0, #6 - str r0, [sp, #0x64] -_0225A9E8: - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r3, #0x6d - bl ov16_02255AB4 - cmp r0, #1 - bne _0225A9FE - mov r0, #0 - str r0, [sp, #0x70] - str r0, [sp, #0x68] -_0225A9FE: - cmp r7, #0x6d - bne _0225AA08 - mov r0, #0 - str r0, [sp, #0x6c] - str r0, [sp, #0x64] -_0225AA08: - ldr r0, [sp, #0x70] - add r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x70] - ldr r0, [sp, #0x6c] - add r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x6c] - ldr r0, [sp, #0x68] - add r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x68] - ldr r0, [sp, #0x64] - add r0, r0, #6 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x64] - cmp r7, #0x4f - bne _0225AA56 - ldr r1, [sp, #0x40] - ldr r0, [sp, #0x3c] - cmp r1, r0 - bne _0225AA56 - add r0, r1, #0 - cmp r0, #2 - beq _0225AA56 - ldr r0, [sp, #0x3c] - cmp r0, #2 - beq _0225AA56 - mov r0, #0x7d - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225AA56: - cmp r7, #0x4f - bne _0225AA7C - ldr r1, [sp, #0x40] - ldr r0, [sp, #0x3c] - cmp r1, r0 - beq _0225AA7C - add r0, r1, #0 - cmp r0, #2 - beq _0225AA7C - ldr r0, [sp, #0x3c] - cmp r0, #2 - beq _0225AA7C - mov r0, #0x4b - mul r0, r4 - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 -_0225AA7C: - ldr r2, _0225AD6C ; =0x0226EC16 - mov r3, #0 -_0225AA80: - ldrh r1, [r2] - ldr r0, [sp, #8] - cmp r0, r1 - bne _0225AA9C - cmp r7, #0x59 - bne _0225AA9C - mov r0, #0xc - mul r0, r4 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - b _0225AAA4 -_0225AA9C: - add r3, r3, #1 - add r2, r2, #2 - cmp r3, #0xf - blo _0225AA80 -_0225AAA4: - mov r0, #0xd - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225AB76 - mov r0, #0x4c - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225AB76 - ldr r0, [sp, #0xa0] - mov r1, #0x30 - and r0, r1 - str r0, [sp, #0x1c] - beq _0225AAEC - cmp r7, #0x5e - bne _0225AAEC - ldr r1, [sp, #0x74] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x74] -_0225AAEC: - ldr r0, [sp, #0xa0] - mov r1, #0xc - tst r0, r1 - beq _0225AB12 - ldr r0, [sp, #0x38] - cmp r0, #5 - beq _0225AB00 - ldr r0, [sp, #0x34] - cmp r0, #5 - bne _0225AB12 -_0225AB00: - ldr r1, [sp, #0x10] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] -_0225AB12: - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _0225AB3E - mov r0, #0x7a - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [sp, #0x24] - add r1, r5, #0 - mov r2, #1 - bl ov16_022555A4 - cmp r0, #0 - beq _0225AB3E - ldr r1, [sp, #0x7c] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x7c] -_0225AB3E: - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _0225AB76 - ldr r1, [sp, #0x24] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x68 - beq _0225AB76 - mov r0, #0x7a - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r5, #0 - mov r2, #1 - bl ov16_022555A4 - cmp r0, #0 - beq _0225AB76 - ldr r1, [sp, #0x10] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] -_0225AB76: - ldr r0, [sp, #0x18] - add r1, r5, r0 - ldr r0, _0225AD70 ; =0x000003DE - ldrh r0, [r1, r0] - str r0, [sp, #0x14] - cmp r0, #7 - bne _0225AB8C - ldr r0, [sp, #0x78] - lsl r0, r0, #0xf - lsr r0, r0, #0x10 - str r0, [sp, #0x78] -_0225AB8C: - ldr r0, [sp, #0x80] - cmp r0, #0 - bne _0225AC8E - ldr r0, [sp, #0xb4] - cmp r0, #1 - bls _0225ABBA - ldr r0, [sp, #0x70] - cmp r0, #6 - ble _0225ABB4 - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldr r2, [sp, #0x7c] - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x84] - b _0225ABD0 -_0225ABB4: - ldr r0, [sp, #0x7c] - str r0, [sp, #0x84] - b _0225ABD0 -_0225ABBA: - ldr r0, [sp, #0x70] - ldr r2, [sp, #0x7c] - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x84] -_0225ABD0: - ldr r0, [sp, #0x84] - add r1, r0, #0 - ldr r0, [sp, #0x60] - mul r1, r4 - str r1, [sp, #0x84] - lsl r0, r0, #1 - mov r1, #5 - bl sub_020E1F6C - add r1, r0, #2 - ldr r0, [sp, #0x84] - mul r1, r0 - ldr r0, [sp, #0xb4] - str r1, [sp, #0x84] - cmp r0, #1 - bls _0225AC0C - ldr r0, [sp, #0x6c] - cmp r0, #6 - bge _0225AC22 - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldr r2, [sp, #0x78] - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x78] - b _0225AC22 -_0225AC0C: - ldr r0, [sp, #0x6c] - ldr r2, [sp, #0x78] - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x78] -_0225AC22: - ldr r0, [sp, #0x84] - ldr r1, [sp, #0x78] - bl sub_020E1F6C - mov r1, #0x32 - bl sub_020E1F6C - str r0, [sp, #0x84] - ldr r0, [sp, #0x48] - mov r1, #0x10 - tst r0, r1 - beq _0225AC48 - cmp r7, #0x3e - beq _0225AC48 - ldr r0, [sp, #0x84] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x84] -_0225AC48: - ldr r0, [sp, #0xc] - mov r2, #1 - tst r0, r2 - beq _0225AC5C - ldr r0, [sp, #0xb4] - cmp r0, #1 - bne _0225AC5C - ldr r0, [sp, #0x14] - cmp r0, #0xba - bne _0225AC5E -_0225AC5C: - b _0225AD86 -_0225AC5E: - ldr r0, [sp, #0x5c] - mov r1, #2 - tst r0, r1 - beq _0225AC82 - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r5, #0 - bl ov16_022554E0 - cmp r0, #2 - bne _0225AC82 - ldr r0, [sp, #0x84] - mov r1, #3 - lsl r0, r0, #1 - bl sub_020E1F6C - str r0, [sp, #0x84] - b _0225AD86 -_0225AC82: - ldr r0, [sp, #0x84] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x84] - b _0225AD86 -_0225AC8E: - cmp r0, #1 - bne _0225AD86 - ldr r0, [sp, #0xb4] - cmp r0, #1 - bls _0225ACBA - ldr r0, [sp, #0x68] - cmp r0, #6 - ble _0225ACB4 - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldr r2, [sp, #0x74] - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x84] - b _0225ACD0 -_0225ACB4: - ldr r0, [sp, #0x74] - str r0, [sp, #0x84] - b _0225ACD0 -_0225ACBA: - ldr r0, [sp, #0x68] - ldr r2, [sp, #0x74] - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x84] -_0225ACD0: - ldr r0, [sp, #0x84] - add r1, r0, #0 - ldr r0, [sp, #0x60] - mul r1, r4 - str r1, [sp, #0x84] - lsl r0, r0, #1 - mov r1, #5 - bl sub_020E1F6C - add r1, r0, #2 - ldr r0, [sp, #0x84] - mul r1, r0 - ldr r0, [sp, #0xb4] - str r1, [sp, #0x84] - cmp r0, #1 - bls _0225AD0C - ldr r0, [sp, #0x64] - cmp r0, #6 - bge _0225AD22 - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldr r2, [sp, #0x10] - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x10] - b _0225AD22 -_0225AD0C: - ldr r0, [sp, #0x64] - ldr r2, [sp, #0x10] - lsl r1, r0, #1 - ldr r0, _0225AD74 ; =0x0226EBE0 - ldrb r0, [r0, r1] - mul r0, r2 - ldr r2, _0225AD78 ; =0x0226EBE1 - ldrb r1, [r2, r1] - bl sub_020E1F6C - str r0, [sp, #0x10] -_0225AD22: - ldr r0, [sp, #0x84] - ldr r1, [sp, #0x10] - bl sub_020E1F6C - mov r1, #0x32 - bl sub_020E1F6C - str r0, [sp, #0x84] - ldr r0, [sp, #0xc] - mov r1, #2 - tst r0, r1 - beq _0225AD86 - ldr r0, [sp, #0xb4] - cmp r0, #1 - bne _0225AD86 - ldr r0, [sp, #0x14] - cmp r0, #0xba - beq _0225AD86 - ldr r0, [sp, #0x5c] - tst r0, r1 - beq _0225AD7C - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r5, #0 - mov r2, #1 - bl ov16_022554E0 - cmp r0, #2 - bne _0225AD7C - ldr r0, [sp, #0x84] - mov r1, #3 - lsl r0, r0, #1 - bl sub_020E1F6C - str r0, [sp, #0x84] - b _0225AD86 - nop -_0225AD6C: .word 0x0226EC16 -_0225AD70: .word 0x000003DE -_0225AD74: .word 0x0226EBE0 -_0225AD78: .word 0x0226EBE1 -_0225AD7C: - ldr r0, [sp, #0x84] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x84] -_0225AD86: - ldr r0, [sp, #0x5c] - mov r1, #2 - add r4, r0, #0 - and r4, r1 - beq _0225ADBC - ldr r0, [sp, #0x18] - add r1, r5, r0 - ldr r0, _0225AEB0 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #4 - bne _0225ADBC - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r5, #0 - mov r2, #1 - bl ov16_022554E0 - cmp r0, #2 - bne _0225ADBC - ldr r0, [sp, #0x84] - lsl r1, r0, #1 - add r1, r0, r1 - asr r0, r1, #1 - lsr r0, r0, #0x1e - add r0, r1, r0 - asr r0, r0, #2 - str r0, [sp, #0x84] -_0225ADBC: - cmp r4, #0 - beq _0225ADEC - ldr r0, [sp, #0x18] - add r1, r5, r0 - ldr r0, _0225AEB0 ; =0x000003E6 - ldrh r0, [r1, r0] - cmp r0, #8 - bne _0225ADEC - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r5, #0 - mov r2, #0 - bl ov16_022554E0 - cmp r0, #2 - blo _0225ADEC - ldr r0, [sp, #0x84] - lsl r1, r0, #1 - add r1, r0, r1 - asr r0, r1, #1 - lsr r0, r0, #0x1e - add r0, r1, r0 - asr r0, r0, #2 - str r0, [sp, #0x84] -_0225ADEC: - mov r0, #0xd - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225AE84 - mov r0, #0x4c - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225AE84 - ldr r0, [sp, #0xa0] - mov r1, #3 - tst r0, r1 - beq _0225AE40 - cmp r6, #0xa - beq _0225AE26 - cmp r6, #0xb - beq _0225AE32 - b _0225AE40 -_0225AE26: - ldr r0, [sp, #0x84] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x84] - b _0225AE40 -_0225AE32: - ldr r1, [sp, #0x84] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - str r0, [sp, #0x84] -_0225AE40: - ldr r1, _0225AEB4 ; =0x000080CF - ldr r0, [sp, #0xa0] - tst r0, r1 - beq _0225AE58 - ldr r0, [sp, #8] - cmp r0, #0x4c - bne _0225AE58 - ldr r0, [sp, #0x84] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x84] -_0225AE58: - ldr r0, [sp, #0xa0] - mov r1, #0x30 - tst r0, r1 - beq _0225AE84 - cmp r6, #0xa - beq _0225AE6A - cmp r6, #0xb - beq _0225AE7A - b _0225AE84 -_0225AE6A: - ldr r1, [sp, #0x84] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - str r0, [sp, #0x84] - b _0225AE84 -_0225AE7A: - ldr r0, [sp, #0x84] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x84] -_0225AE84: - ldr r1, [sp, #0x24] - add r0, r5, #0 - mov r2, #0x49 - mov r3, #0 - bl ov16_02252060 - cmp r0, #0 - beq _0225AEA6 - cmp r6, #0xa - bne _0225AEA6 - ldr r1, [sp, #0x84] - mov r0, #0xf - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - str r0, [sp, #0x84] -_0225AEA6: - ldr r0, [sp, #0x84] - add r0, r0, #2 - add sp, #0x8c - pop {r4, r5, r6, r7, pc} - nop -_0225AEB0: .word 0x000003E6 -_0225AEB4: .word 0x000080CF - thumb_func_end ov16_0225A280 - - thumb_func_start ov16_0225AEB8 -ov16_0225AEB8: ; 0x0225AEB8 - push {r4, lr} - add r4, r2, #0 - beq _0225AEDE - bl ov16_0223F4BC - lsr r2, r0, #0x1f - lsl r1, r0, #0x1c - sub r1, r1, r2 - mov r0, #0x1c - ror r1, r0 - add r0, r2, r1 - mov r1, #0x64 - sub r0, r1, r0 - mul r0, r4 - bl sub_020E1F6C - add r4, r0, #0 - bne _0225AEDE - mov r4, #1 -_0225AEDE: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0225AEB8 - - thumb_func_start ov16_0225AEE4 -ov16_0225AEE4: ; 0x0225AEE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - mov r0, #1 - add r4, r1, #0 - add r7, r2, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, r7, #0 - str r3, [sp, #4] - bl ov16_02258874 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov16_0225B0FC - mov r3, #0xb5 - lsl r3, r3, #6 - add r2, r3, #0 - mov r5, #0xc0 - add r1, r7, #0 - mul r1, r5 - add r6, r4, r1 - add r2, #0x70 - ldr r2, [r6, r2] - ldrh r1, [r6, r3] - mov ip, r2 - ldr r2, [sp, #4] - mul r5, r2 - add r2, r3, #0 - add r5, r4, r5 - add r2, #0x80 - ldr r2, [r5, r2] - add r3, #0x27 - str r2, [sp, #0xc] - ldrb r2, [r6, r3] - cmp r2, #0x69 - bne _0225AF36 - mov r2, #1 - b _0225AF38 -_0225AF36: - mov r2, #0 -_0225AF38: - cmp r0, #0x43 - bne _0225AF40 - mov r3, #1 - b _0225AF42 -_0225AF40: - mov r3, #0 -_0225AF42: - mov r6, #1 - lsl r6, r6, #0x14 - mov r5, ip - tst r5, r6 - beq _0225AF50 - mov r5, #1 - b _0225AF52 -_0225AF50: - mov r5, #0 -_0225AF52: - cmp r0, #0x59 - bne _0225AF5E - cmp r1, #0x71 - bne _0225AF5E - mov r6, #1 - b _0225AF60 -_0225AF5E: - mov r6, #0 -_0225AF60: - cmp r0, #0x5c - bne _0225AF6C - cmp r1, #0x53 - bne _0225AF6C - mov r1, #1 - b _0225AF6E -_0225AF6C: - mov r1, #0 -_0225AF6E: - lsl r5, r5, #1 - ldr r0, [sp, #0x28] - add r3, r3, r5 - add r0, r0, r3 - add r2, r2, r0 - lsl r0, r6, #1 - add r2, r2, r0 - lsl r0, r1, #1 - add r0, r2, r0 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #4 - bls _0225AF8A - mov r5, #4 -_0225AF8A: - ldr r0, [sp] - bl ov16_0223F4BC - ldr r1, _0225AFF0 ; =0x0226EBA0 - ldrb r1, [r1, r5] - bl sub_020E1F6C - cmp r1, #0 - bne _0225AFD4 - ldr r2, [sp, #4] - add r0, r4, #0 - add r1, r7, #0 - mov r3, #4 - bl ov16_02255AB4 - cmp r0, #0 - bne _0225AFD4 - ldr r2, [sp, #4] - add r0, r4, #0 - add r1, r7, #0 - mov r3, #0x4b - bl ov16_02255AB4 - cmp r0, #0 - bne _0225AFD4 - mov r0, #7 - ldr r1, [sp, #0x2c] - lsl r0, r0, #0xc - tst r0, r1 - bne _0225AFD4 - mov r1, #2 - ldr r0, [sp, #0xc] - lsl r1, r1, #0xe - tst r0, r1 - bne _0225AFD4 - mov r0, #2 - str r0, [sp, #8] -_0225AFD4: - ldr r0, [sp, #8] - cmp r0, #2 - bne _0225AFEA - add r0, r4, #0 - add r1, r7, #0 - bl ov16_02255A4C - cmp r0, #0x61 - bne _0225AFEA - mov r0, #3 - str r0, [sp, #8] -_0225AFEA: - ldr r0, [sp, #8] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225AFF0: .word 0x0226EBA0 - thumb_func_end ov16_0225AEE4 - - thumb_func_start ov16_0225AFF4 -ov16_0225AFF4: ; 0x0225AFF4 - push {r3, r4} - ldr r4, _0225B024 ; =0x0226EC5C - ldr r1, _0225B028 ; =0x0000FFFE - mov r3, #0 -_0225AFFC: - ldrh r2, [r4] - cmp r0, r2 - beq _0225B00C - add r4, r4, #2 - ldrh r2, [r4] - add r3, r3, #1 - cmp r2, r1 - bne _0225AFFC -_0225B00C: - ldr r0, _0225B024 ; =0x0226EC5C - lsl r1, r3, #1 - ldrh r1, [r0, r1] - ldr r0, _0225B028 ; =0x0000FFFE - cmp r1, r0 - bne _0225B01E - mov r0, #1 - pop {r3, r4} - bx lr -_0225B01E: - mov r0, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 -_0225B024: .word 0x0226EC5C -_0225B028: .word 0x0000FFFE - thumb_func_end ov16_0225AFF4 - - thumb_func_start ov16_0225B02C -ov16_0225B02C: ; 0x0225B02C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - str r2, [sp] - add r5, r3, #0 - mov r4, #0 - bl ov16_02256044 - cmp r0, #1 - beq _0225B050 - ldr r2, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r3, r5, #0 - bl ov16_02256078 - cmp r0, #1 - bne _0225B054 -_0225B050: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0225B054: - ldr r2, _0225B07C ; =0x0226EC5C - ldr r0, _0225B080 ; =0x0000FFFF -_0225B058: - ldrh r1, [r2] - cmp r5, r1 - beq _0225B068 - add r2, r2, #2 - ldrh r1, [r2] - add r4, r4, #1 - cmp r1, r0 - bne _0225B058 -_0225B068: - ldr r0, _0225B07C ; =0x0226EC5C - lsl r1, r4, #1 - ldrh r1, [r0, r1] - ldr r0, _0225B080 ; =0x0000FFFF - cmp r1, r0 - bne _0225B078 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225B078: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225B07C: .word 0x0226EC5C -_0225B080: .word 0x0000FFFF - thumb_func_end ov16_0225B02C - - thumb_func_start ov16_0225B084 -ov16_0225B084: ; 0x0225B084 - push {r4, r5} - lsl r1, r1, #4 - add r4, r0, r1 - ldr r1, _0225B0B8 ; =0x000003DE - ldr r3, _0225B0BC ; =0x0226EBB0 - ldrh r1, [r4, r1] - ldr r4, _0225B0B8 ; =0x000003DE - mov r2, #0 -_0225B094: - ldrh r5, [r3] - lsl r5, r5, #4 - add r5, r0, r5 - ldrh r5, [r5, r4] - cmp r1, r5 - beq _0225B0A8 - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #6 - blo _0225B094 -_0225B0A8: - cmp r2, #6 - bne _0225B0B2 - mov r0, #1 - pop {r4, r5} - bx lr -_0225B0B2: - mov r0, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_0225B0B8: .word 0x000003DE -_0225B0BC: .word 0x0226EBB0 - thumb_func_end ov16_0225B084 - - thumb_func_start ov16_0225B0C0 -ov16_0225B0C0: ; 0x0225B0C0 - push {r4, r5} - lsl r1, r1, #4 - add r4, r0, r1 - ldr r1, _0225B0F4 ; =0x000003DE - ldr r3, _0225B0F8 ; =0x0226EBC8 - ldrh r1, [r4, r1] - ldr r4, _0225B0F4 ; =0x000003DE - mov r2, #0 -_0225B0D0: - ldrh r5, [r3] - lsl r5, r5, #4 - add r5, r0, r5 - ldrh r5, [r5, r4] - cmp r1, r5 - beq _0225B0E4 - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #6 - blo _0225B0D0 -_0225B0E4: - cmp r2, #6 - bne _0225B0EE - mov r0, #1 - pop {r4, r5} - bx lr -_0225B0EE: - mov r0, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_0225B0F4: .word 0x000003DE -_0225B0F8: .word 0x0226EBC8 - thumb_func_end ov16_0225B0C0 - - thumb_func_start ov16_0225B0FC -ov16_0225B0FC: ; 0x0225B0FC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - mov r1, #0 - add r4, r2, #0 - bl sub_0207CE78 - add r1, r0, #0 - ldr r0, _0225B11C ; =0x00002120 - ldr r0, [r5, r0] - bl sub_0207D3B0 - add r1, r4, #0 - bl sub_0207D014 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225B11C: .word 0x00002120 - thumb_func_end ov16_0225B0FC - - thumb_func_start ov16_0225B120 -ov16_0225B120: ; 0x0225B120 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r2, #0 - bl ov16_0223DF1C - add r6, r0, #0 - mov r4, #0 - cmp r6, #0 - ble _0225B144 -_0225B132: - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E208 - cmp r5, r0 - beq _0225B144 - add r4, r4, #1 - cmp r4, r6 - blt _0225B132 -_0225B144: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0225B120 - - thumb_func_start ov16_0225B148 -ov16_0225B148: ; 0x0225B148 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - add r5, r1, #0 - bl ov16_0223DF1C - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - sub r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #0 - ble _0225B1CE -_0225B164: - ldr r0, [sp, #0x14] - add r7, r0, #1 - ldr r0, [sp, #0x10] - cmp r7, r0 - bge _0225B1C2 - ldr r0, [sp, #0x14] - add r0, r5, r0 - str r0, [sp, #0xc] -_0225B174: - ldr r1, [sp, #0xc] - ldr r0, _0225B1D4 ; =0x000021E8 - ldrb r6, [r1, r0] - add r1, r5, r7 - ldrb r4, [r1, r0] - lsl r0, r6, #4 - str r1, [sp, #8] - add r1, r5, r0 - ldr r0, _0225B1D8 ; =0x000021B4 - ldr r0, [r1, r0] - lsl r1, r4, #4 - add r2, r5, r1 - ldr r1, _0225B1D8 ; =0x000021B4 - ldr r1, [r2, r1] - cmp r0, r1 - bne _0225B1BA - cmp r0, #1 - beq _0225B19C - mov r0, #1 - b _0225B19E -_0225B19C: - mov r0, #0 -_0225B19E: - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov16_02252EC8 - cmp r0, #0 - beq _0225B1BA - ldr r1, [sp, #0xc] - ldr r0, _0225B1D4 ; =0x000021E8 - strb r4, [r1, r0] - ldr r1, [sp, #8] - strb r6, [r1, r0] -_0225B1BA: - ldr r0, [sp, #0x10] - add r7, r7, #1 - cmp r7, r0 - blt _0225B174 -_0225B1C2: - ldr r0, [sp, #0x14] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [sp, #0x14] - cmp r1, r0 - blt _0225B164 -_0225B1CE: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0225B1D4: .word 0x000021E8 -_0225B1D8: .word 0x000021B4 - thumb_func_end ov16_0225B148 - - thumb_func_start ov16_0225B1DC -ov16_0225B1DC: ; 0x0225B1DC - push {r4, r5} - mov r4, #0xc0 - mul r4, r1 - add r5, r0, r4 - ldr r0, _0225B21C ; =0x00002DB0 - mov r1, #1 - ldr r4, [r5, r0] - lsl r1, r1, #0x18 - mov r3, #0 - tst r1, r4 - bne _0225B1FC - add r0, #0x10 - ldr r1, [r5, r0] - ldr r0, _0225B220 ; =0x200400C0 - tst r0, r1 - beq _0225B214 -_0225B1FC: - ldr r4, _0225B224 ; =0x0226EC34 - mov r1, #0 -_0225B200: - ldr r0, [r4, #0] - cmp r2, r0 - bne _0225B20A - mov r3, #1 - b _0225B216 -_0225B20A: - add r1, r1, #1 - add r4, r4, #4 - cmp r1, #0xa - blo _0225B200 - b _0225B216 -_0225B214: - mov r3, #1 -_0225B216: - add r0, r3, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_0225B21C: .word 0x00002DB0 -_0225B220: .word 0x200400C0 -_0225B224: .word 0x0226EC34 - thumb_func_end ov16_0225B1DC - - thumb_func_start ov16_0225B228 -ov16_0225B228: ; 0x0225B228 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - ldr r1, [r5, #0x64] - str r0, [sp] - add r0, r5, #0 - add r4, r2, #0 - mov r6, #0 - bl ov16_02258AB8 - str r0, [sp, #0xc] - ldr r1, [r5, #0x64] - add r0, r5, #0 - add r2, r6, #0 - bl ov16_02258ACC - str r0, [sp, #0x10] - ldr r1, [r5, #0x6c] - add r0, r5, #0 - bl ov16_02258AB8 - add r7, r0, #0 - ldr r1, [r5, #0x6c] - add r0, r5, #0 - add r2, r6, #0 - bl ov16_02258ACC - str r0, [sp, #8] - ldr r0, [sp] - ldr r1, [r5, #0x64] - bl ov16_0223E208 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - cmp r0, #0x58 - bne _0225B2C4 - ldr r0, _0225B3EC ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #0xc - tst r0, r1 - beq _0225B2C4 - ldr r0, [r5, #0x64] - mov r1, #0x1c - mul r1, r0 - add r2, r5, r1 - mov r1, #0xbb - lsl r1, r1, #2 - ldr r2, [r2, r1] - cmp r2, #0 - beq _0225B2C4 - ldr r1, [r5, #0x6c] - cmp r0, r1 - beq _0225B2C4 - mov r1, #0xc0 - mul r1, r0 - ldr r3, _0225B3F0 ; =0x00002D8C - add r1, r5, r1 - ldr r0, [r1, r3] - add r3, r3, #4 - ldr r1, [r1, r3] - cmp r0, r1 - bhs _0225B2C4 - cmp r0, #0 - beq _0225B2C4 - ldr r1, [sp, #0x10] - neg r0, r2 - bl ov16_022563F8 - ldr r1, _0225B3F4 ; =0x0000215C - mov r6, #1 - str r0, [r5, r1] - mov r0, #0x46 - ldr r1, [r5, #0x64] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0xd5 - str r0, [r4, #0] -_0225B2C4: - ldr r0, [sp, #0xc] - cmp r0, #0x62 - bne _0225B326 - ldr r1, [r5, #0x64] - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _0225B326 - ldr r0, _0225B3EC ; =0x0000213C - ldr r1, [r5, r0] - mov r0, #2 - lsl r0, r0, #0xc - tst r0, r1 - beq _0225B326 - ldr r0, _0225B3F8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - mov r0, #0x3e - lsl r0, r0, #4 - ldrb r0, [r1, r0] - cmp r0, #2 - beq _0225B326 - ldr r1, [r5, #0x64] - mov r0, #0xc0 - add r2, r1, #0 - mul r2, r0 - ldr r3, _0225B3F0 ; =0x00002D8C - add r2, r5, r2 - ldr r1, [r2, r3] - cmp r1, #0 - beq _0225B326 - add r1, r3, #4 - ldr r1, [r2, r1] - sub r0, #0xc1 - mul r0, r1 - mov r1, #0xa - bl ov16_022563F8 - ldr r1, _0225B3F4 ; =0x0000215C - mov r6, #1 - str r0, [r5, r1] - mov r0, #0x46 - ldr r1, [r5, #0x64] - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0xd6 - str r0, [r4, #0] -_0225B326: - cmp r7, #0x2e - bne _0225B37A - ldr r1, [r5, #0x64] - mov r0, #0xc0 - mul r0, r1 - add r2, r5, r0 - ldr r0, _0225B3F0 ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _0225B37A - add r0, r5, #0 - bl ov16_02255A4C - cmp r0, #0x62 - beq _0225B37A - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r1, r5, r0 - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0225B37A - ldr r0, [r5, #0x64] - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r0, _0225B3FC ; =0x00002D90 - add r2, r5, r2 - ldr r2, [r2, r0] - sub r1, #0xc1 - add r0, r2, #0 - mul r0, r1 - ldr r1, [sp, #8] - bl ov16_022563F8 - ldr r1, _0225B3F4 ; =0x0000215C - mov r6, #1 - str r0, [r5, r1] - lsr r0, r1, #5 - str r0, [r4, #0] -_0225B37A: - cmp r7, #0x74 - bne _0225B3E6 - ldr r0, [r5, #0x64] - mov r1, #0xc0 - mul r1, r0 - add r3, r5, r1 - ldr r1, _0225B3F0 ; =0x00002D8C - ldr r2, [r3, r1] - cmp r2, #0 - beq _0225B3E6 - add r1, #0x2c - ldrh r1, [r3, r1] - cmp r1, #0 - bne _0225B3E6 - add r1, r5, r0 - ldr r0, _0225B400 ; =0x0000219C - ldrb r0, [r1, r0] - bl sub_020787CC - ldr r1, [sp, #4] - lsl r1, r1, #3 - add r2, r5, r1 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r1, [r2, r1] - lsl r1, r1, #3 - lsr r1, r1, #0x1a - tst r0, r1 - bne _0225B3E6 - ldr r1, [r5, #0x6c] - mov r0, #0x1c - mul r0, r1 - add r2, r5, r0 - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r1, [r2, r0] - cmp r1, #0 - bne _0225B3CE - add r0, #8 - ldr r0, [r2, r0] - cmp r0, #0 - beq _0225B3E6 -_0225B3CE: - ldr r0, _0225B3F8 ; =0x00003044 - ldr r0, [r5, r0] - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _0225B404 ; =0x000003E9 - ldrb r1, [r1, r0] - mov r0, #1 - tst r1, r0 - beq _0225B3E6 - mov r1, #0xd8 - str r1, [r4, #0] - add r6, r0, #0 -_0225B3E6: - add r0, r6, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225B3EC: .word 0x0000213C -_0225B3F0: .word 0x00002D8C -_0225B3F4: .word 0x0000215C -_0225B3F8: .word 0x00003044 -_0225B3FC: .word 0x00002D90 -_0225B400: .word 0x0000219C -_0225B404: .word 0x000003E9 - thumb_func_end ov16_0225B228 - - thumb_func_start ov16_0225B408 -ov16_0225B408: ; 0x0225B408 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r2, #0xff - beq _0225B438 - add r1, r2, #0 - bl ov16_02255A4C - cmp r0, #0x2e - bne _0225B438 - ldr r0, _0225B43C ; =0x00002D6C - add r1, r5, r0 - mov r0, #0xc0 - mul r0, r4 - add r0, r1, r0 - lsl r1, r4, #1 - add r2, r5, r1 - ldr r1, _0225B440 ; =0x000030BC - ldrh r2, [r2, r1] - ldrb r1, [r0, r2] - cmp r1, #0 - beq _0225B438 - sub r1, r1, #1 - strb r1, [r0, r2] -_0225B438: - pop {r3, r4, r5, pc} - nop -_0225B43C: .word 0x00002D6C -_0225B440: .word 0x000030BC - thumb_func_end ov16_0225B408 - - thumb_func_start ov16_0225B444 -ov16_0225B444: ; 0x0225B444 - push {r4, lr} - add r4, r1, #0 - bl ov16_0223F710 - cmp r0, #0 - beq _0225B458 - mov r0, #0x2a - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} -_0225B458: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov16_0225B444 - - thumb_func_start ov16_0225B45C -ov16_0225B45C: ; 0x0225B45C - push {r4, lr} - add r4, r1, #0 - cmp r2, #0xe - bhi _0225B51C - add r1, r2, r2 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225B470: ; jump table - .short _0225B48E - _0225B470 - 2 ; case 0 - .short _0225B4A0 - _0225B470 - 2 ; case 1 - .short _0225B4B6 - _0225B470 - 2 ; case 2 - .short _0225B4BE - _0225B470 - 2 ; case 3 - .short _0225B4C6 - _0225B470 - 2 ; case 4 - .short _0225B4CC - _0225B470 - 2 ; case 5 - .short _0225B4D2 - _0225B470 - 2 ; case 6 - .short _0225B4DE - _0225B470 - 2 ; case 7 - .short _0225B4EA - _0225B470 - 2 ; case 8 - .short _0225B4F4 - _0225B470 - 2 ; case 9 - .short _0225B4FC - _0225B470 - 2 ; case 10 - .short _0225B502 - _0225B470 - 2 ; case 11 - .short _0225B50A - _0225B470 - 2 ; case 12 - .short _0225B514 - _0225B470 - 2 ; case 13 - .short _0225B518 - _0225B470 - 2 ; case 14 -_0225B48E: - add r1, r3, #0 - bl ov16_0223E208 - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r1, r0] - pop {r4, pc} -_0225B4A0: - add r1, r3, #0 - bl ov16_0223E208 - lsl r0, r0, #3 - add r1, r4, r0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r0, r0, #0x11 - lsr r0, r0, #0x1d - pop {r4, pc} -_0225B4B6: - ldr r0, _0225B524 ; =0x0000219C - add r1, r4, r3 - ldrb r0, [r1, r0] - pop {r4, pc} -_0225B4BE: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - pop {r4, pc} -_0225B4C6: - ldr r0, _0225B528 ; =0x00003109 - ldrb r0, [r4, r0] - pop {r4, pc} -_0225B4CC: - ldr r0, _0225B52C ; =0x0000311D - ldrb r0, [r4, r0] - pop {r4, pc} -_0225B4D2: - lsl r0, r3, #2 - add r1, r4, r0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r1, r0] - pop {r4, pc} -_0225B4DE: - lsl r0, r3, #2 - add r1, r4, r0 - mov r0, #0x59 - lsl r0, r0, #2 - ldr r0, [r1, r0] - pop {r4, pc} -_0225B4EA: - lsl r0, r3, #4 - add r1, r4, r0 - ldr r0, _0225B530 ; =0x000021A8 - ldr r0, [r1, r0] - pop {r4, pc} -_0225B4F4: - mov r0, #0x3d - lsl r0, r0, #4 - ldrb r0, [r4, r0] - pop {r4, pc} -_0225B4FC: - ldr r0, _0225B534 ; =0x00003108 - ldrb r0, [r4, r0] - pop {r4, pc} -_0225B502: - ldr r0, _0225B538 ; =0x000003DA - add r1, r4, r3 - ldrb r0, [r1, r0] - pop {r4, pc} -_0225B50A: - lsl r0, r3, #4 - add r1, r4, r0 - ldr r0, _0225B53C ; =0x000021B0 - ldr r0, [r1, r0] - pop {r4, pc} -_0225B514: - ldr r0, [r4, #8] - pop {r4, pc} -_0225B518: - ldr r0, [r4, #0xc] - pop {r4, pc} -_0225B51C: - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0225B524: .word 0x0000219C -_0225B528: .word 0x00003109 -_0225B52C: .word 0x0000311D -_0225B530: .word 0x000021A8 -_0225B534: .word 0x00003108 -_0225B538: .word 0x000003DA -_0225B53C: .word 0x000021B0 - thumb_func_end ov16_0225B45C - - thumb_func_start ov16_0225B540 -ov16_0225B540: ; 0x0225B540 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [sp, #0x10] - cmp r2, #0xb - bhi _0225B5BE - add r1, r2, r2 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225B556: ; jump table - .short _0225B56E - _0225B556 - 2 ; case 0 - .short _0225B580 - _0225B556 - 2 ; case 1 - .short _0225B59E - _0225B556 - 2 ; case 2 - .short _0225B5A6 - _0225B556 - 2 ; case 3 - .short _0225B5BE - _0225B556 - 2 ; case 4 - .short _0225B5BE - _0225B556 - 2 ; case 5 - .short _0225B5BE - _0225B556 - 2 ; case 6 - .short _0225B5BE - _0225B556 - 2 ; case 7 - .short _0225B5BE - _0225B556 - 2 ; case 8 - .short _0225B5AE - _0225B556 - 2 ; case 9 - .short _0225B5BE - _0225B556 - 2 ; case 10 - .short _0225B5B6 - _0225B556 - 2 ; case 11 -_0225B56E: - add r1, r3, #0 - bl ov16_0223E208 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x6f - lsl r0, r0, #2 - str r4, [r1, r0] - pop {r3, r4, r5, pc} -_0225B580: - add r1, r3, #0 - bl ov16_0223E208 - mov r1, #0x71 - lsl r1, r1, #2 - add r1, r5, r1 - lsl r0, r0, #3 - ldr r3, [r1, r0] - ldr r2, _0225B5C4 ; =0xFFFF8FFF - and r3, r2 - lsl r2, r4, #0x1d - lsr r2, r2, #0x11 - orr r2, r3 - str r2, [r1, r0] - pop {r3, r4, r5, pc} -_0225B59E: - ldr r0, _0225B5C8 ; =0x0000219C - add r1, r5, r3 - strb r4, [r1, r0] - pop {r3, r4, r5, pc} -_0225B5A6: - mov r0, #0x15 - lsl r0, r0, #4 - str r4, [r5, r0] - pop {r3, r4, r5, pc} -_0225B5AE: - mov r0, #0x3d - lsl r0, r0, #4 - strb r4, [r5, r0] - pop {r3, r4, r5, pc} -_0225B5B6: - ldr r0, _0225B5CC ; =0x000003DA - add r1, r5, r3 - strb r4, [r1, r0] - pop {r3, r4, r5, pc} -_0225B5BE: - bl sub_02022974 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225B5C4: .word 0xFFFF8FFF -_0225B5C8: .word 0x0000219C -_0225B5CC: .word 0x000003DA - thumb_func_end ov16_0225B540 - - thumb_func_start ov16_0225B5D0 -ov16_0225B5D0: ; 0x0225B5D0 - push {r4, lr} - add r3, r0, #0 - add r3, #0x88 - str r1, [r3, #0] - add r3, r0, #0 - ldr r1, _0225B634 ; =0x007FFFFF - add r4, r2, #0 - and r4, r1 - add r3, #0x8c - str r4, [r3, #0] - lsl r1, r1, #0x17 - add r3, r2, #0 - and r3, r1 - add r1, r0, #0 - add r1, #0x90 - str r3, [r1, #0] - mov r3, #1 - lsl r3, r3, #0x1e - add r1, r2, #0 - tst r1, r3 - beq _0225B602 - ldr r1, [r0, #0x64] - add r0, #0x94 - str r1, [r0, #0] - b _0225B622 -_0225B602: - lsl r1, r3, #1 - tst r1, r2 - beq _0225B610 - ldr r1, [r0, #0x6c] - add r0, #0x94 - str r1, [r0, #0] - b _0225B622 -_0225B610: - lsr r1, r3, #1 - tst r1, r2 - bne _0225B61C - lsr r1, r3, #2 - tst r1, r2 - beq _0225B622 -_0225B61C: - mov r1, #0 - add r0, #0x94 - str r1, [r0, #0] -_0225B622: - cmp r4, #0x91 - blo _0225B62A - bl sub_02022974 -_0225B62A: - ldr r0, _0225B638 ; =0x0226EE24 - lsl r1, r4, #2 - ldr r0, [r0, r1] - pop {r4, pc} - nop -_0225B634: .word 0x007FFFFF -_0225B638: .word 0x0226EE24 - thumb_func_end ov16_0225B5D0 - - thumb_func_start ov16_0225B63C -ov16_0225B63C: ; 0x0225B63C - push {r3, r4, r5, lr} - ldr r1, _0225B6C4 ; =0x0000213C - add r5, r2, #0 - ldr r2, [r0, r1] - mov r0, #2 - lsl r0, r0, #0xa - add r1, r2, #0 - ldr r4, [sp, #0x14] - tst r1, r0 - bne _0225B666 - lsl r0, r0, #4 - tst r0, r2 - bne _0225B666 - cmp r3, #0 - beq _0225B666 - add r0, r3, #0 - mul r0, r5 - mov r1, #0xa - bl ov16_022563F8 - add r3, r0, #0 -_0225B666: - cmp r5, #0 - beq _0225B674 - cmp r5, #5 - beq _0225B686 - cmp r5, #0x14 - beq _0225B6A4 - b _0225B6C0 -_0225B674: - ldr r1, [r4, #0] - mov r0, #8 - orr r1, r0 - mov r0, #4 - bic r1, r0 - mov r0, #2 - bic r1, r0 - str r1, [r4, #0] - b _0225B6C0 -_0225B686: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _0225B6C0 - ldr r1, [r4, #0] - mov r0, #2 - tst r0, r1 - beq _0225B69C - mov r0, #2 - bic r1, r0 - str r1, [r4, #0] - b _0225B6C0 -_0225B69C: - mov r0, #4 - orr r0, r1 - str r0, [r4, #0] - b _0225B6C0 -_0225B6A4: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _0225B6C0 - ldr r1, [r4, #0] - mov r0, #4 - tst r0, r1 - beq _0225B6BA - mov r0, #4 - bic r1, r0 - str r1, [r4, #0] - b _0225B6C0 -_0225B6BA: - mov r0, #2 - orr r0, r1 - str r0, [r4, #0] -_0225B6C0: - add r0, r3, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225B6C4: .word 0x0000213C - thumb_func_end ov16_0225B63C - - thumb_func_start ov16_0225B6C8 -ov16_0225B6C8: ; 0x0225B6C8 - lsl r1, r1, #4 - add r2, r0, r1 - ldr r1, _0225B72C ; =0x000003DE - ldrh r3, [r2, r1] - cmp r3, #0x9b - bgt _0225B6FA - cmp r3, #0x97 - blt _0225B6E0 - beq _0225B71A - cmp r3, #0x9b - beq _0225B71A - b _0225B726 -_0225B6E0: - cmp r3, #0x27 - bgt _0225B6EC - bge _0225B71A - cmp r3, #0x1a - beq _0225B71A - b _0225B726 -_0225B6EC: - cmp r3, #0x4b - bgt _0225B6F4 - beq _0225B71A - b _0225B726 -_0225B6F4: - cmp r3, #0x91 - beq _0225B71A - b _0225B726 -_0225B6FA: - mov r2, #1 - lsl r2, r2, #8 - cmp r3, r2 - bgt _0225B70A - bge _0225B71A - cmp r3, #0xff - beq _0225B71A - b _0225B726 -_0225B70A: - add r1, r2, #7 - cmp r3, r1 - bgt _0225B714 - beq _0225B71A - b _0225B726 -_0225B714: - add r2, #0x11 - cmp r3, r2 - bne _0225B726 -_0225B71A: - ldr r1, _0225B730 ; =0x0000213C - ldr r1, [r0, r1] - mov r0, #2 - lsl r0, r0, #8 - and r0, r1 - bx lr -_0225B726: - mov r0, #1 - bx lr - nop -_0225B72C: .word 0x000003DE -_0225B730: .word 0x0000213C - thumb_func_end ov16_0225B6C8 - - thumb_func_start ov16_0225B734 -ov16_0225B734: ; 0x0225B734 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - cmp r2, #0x1b - bne _0225B74A - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - ldr r0, _0225B800 ; =0x00002D64 - ldrb r4, [r1, r0] - b _0225B75E -_0225B74A: - cmp r2, #0x1c - bne _0225B75A - mov r0, #0xc0 - mul r0, r6 - add r1, r5, r0 - ldr r0, _0225B804 ; =0x00002D65 - ldrb r4, [r1, r0] - b _0225B75E -_0225B75A: - bl sub_02022974 -_0225B75E: - mov r0, #0xc0 - mul r0, r6 - mov r2, #0xb5 - add r1, r5, r0 - lsl r2, r2, #6 - ldrh r3, [r1, r2] - ldr r0, _0225B808 ; =0x000001ED - cmp r3, r0 - bne _0225B7FA - add r0, r2, #0 - add r0, #0x27 - ldrb r0, [r1, r0] - cmp r0, #0x79 - bne _0225B7FA - add r2, #0x78 - ldrh r1, [r1, r2] - add r0, r5, #0 - mov r2, #1 - bl ov16_0225B0FC - sub r0, #0x7e - cmp r0, #0xf - bhi _0225B7F8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225B798: ; jump table - .short _0225B7B8 - _0225B798 - 2 ; case 0 - .short _0225B7BC - _0225B798 - 2 ; case 1 - .short _0225B7C0 - _0225B798 - 2 ; case 2 - .short _0225B7C4 - _0225B798 - 2 ; case 3 - .short _0225B7C8 - _0225B798 - 2 ; case 4 - .short _0225B7CC - _0225B798 - 2 ; case 5 - .short _0225B7D0 - _0225B798 - 2 ; case 6 - .short _0225B7D4 - _0225B798 - 2 ; case 7 - .short _0225B7D8 - _0225B798 - 2 ; case 8 - .short _0225B7DC - _0225B798 - 2 ; case 9 - .short _0225B7E0 - _0225B798 - 2 ; case 10 - .short _0225B7E4 - _0225B798 - 2 ; case 11 - .short _0225B7E8 - _0225B798 - 2 ; case 12 - .short _0225B7EC - _0225B798 - 2 ; case 13 - .short _0225B7F0 - _0225B798 - 2 ; case 14 - .short _0225B7F4 - _0225B798 - 2 ; case 15 -_0225B7B8: - mov r4, #0xa - b _0225B7FA -_0225B7BC: - mov r4, #0xb - b _0225B7FA -_0225B7C0: - mov r4, #0xd - b _0225B7FA -_0225B7C4: - mov r4, #0xc - b _0225B7FA -_0225B7C8: - mov r4, #0xf - b _0225B7FA -_0225B7CC: - mov r4, #1 - b _0225B7FA -_0225B7D0: - mov r4, #3 - b _0225B7FA -_0225B7D4: - mov r4, #4 - b _0225B7FA -_0225B7D8: - mov r4, #2 - b _0225B7FA -_0225B7DC: - mov r4, #0xe - b _0225B7FA -_0225B7E0: - mov r4, #6 - b _0225B7FA -_0225B7E4: - mov r4, #5 - b _0225B7FA -_0225B7E8: - mov r4, #7 - b _0225B7FA -_0225B7EC: - mov r4, #0x10 - b _0225B7FA -_0225B7F0: - mov r4, #0x11 - b _0225B7FA -_0225B7F4: - mov r4, #8 - b _0225B7FA -_0225B7F8: - mov r4, #0 -_0225B7FA: - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_0225B800: .word 0x00002D64 -_0225B804: .word 0x00002D65 -_0225B808: .word 0x000001ED - thumb_func_end ov16_0225B734 - - thumb_func_start ov16_0225B80C -ov16_0225B80C: ; 0x0225B80C - lsl r1, r1, #3 - add r3, r0, r1 - mov r2, #0 - mov r0, #0x37 - add r1, r2, #0 - lsl r0, r0, #4 -_0225B818: - add r2, r2, #1 - strh r1, [r3, r0] - add r3, r3, #2 - cmp r2, #4 - blt _0225B818 - bx lr - thumb_func_end ov16_0225B80C - - thumb_func_start ov16_0225B824 -ov16_0225B824: ; 0x0225B824 - add r1, r0, r1 - mov r0, #0x39 - mov r2, #0 - lsl r0, r0, #4 - strb r2, [r1, r0] - bx lr - thumb_func_end ov16_0225B824 - - thumb_func_start ov16_0225B830 -ov16_0225B830: ; 0x0225B830 - lsl r1, r1, #1 - add r1, r0, r1 - mov r0, #0xe5 - mov r2, #0 - lsl r0, r0, #2 - strh r2, [r1, r0] - bx lr - ; .align 2, 0 - thumb_func_end ov16_0225B830 - - thumb_func_start ov16_0225B840 -ov16_0225B840: ; 0x0225B840 - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - mov r2, #0xff - mov ip, r2 - mov r2, #0xc0 - add r7, r5, #0 - mul r7, r2 - ldr r2, _0225B8DC ; =0x00002D67 - add r6, r1, r7 - add r4, r3, #0 - ldrb r3, [r6, r2] - cmp r3, #0x3b - beq _0225B89C - cmp r3, #0x24 - beq _0225B89C - cmp r3, #0x79 - beq _0225B89C - add r2, #0x25 - ldr r2, [r6, r2] - cmp r2, #0 - beq _0225B89C - mov r2, #0xc0 - mul r2, r4 - add r6, r1, r2 - ldr r2, _0225B8DC ; =0x00002D67 - add r2, #0x25 - ldr r2, [r6, r2] - cmp r2, #0 - beq _0225B89C - ldr r2, _0225B8DC ; =0x00002D67 - ldrb r2, [r6, r2] - cmp r2, #0x3b - beq _0225B89C - cmp r2, #0x24 - beq _0225B89C - cmp r2, #0x79 - beq _0225B89C - bl ov16_0223F4BC - mov r1, #1 - tst r0, r1 - beq _0225B898 - mov ip, r4 - b _0225B8D6 -_0225B898: - mov ip, r5 - b _0225B8D6 -_0225B89C: - cmp r3, #0x3b - beq _0225B8B6 - cmp r3, #0x24 - beq _0225B8B6 - ldr r0, _0225B8E0 ; =0x00002D8C - add r2, r1, r7 - ldr r0, [r2, r0] - cmp r0, #0 - beq _0225B8B6 - cmp r3, #0x79 - beq _0225B8B6 - mov ip, r5 - b _0225B8D6 -_0225B8B6: - mov r0, #0xc0 - mul r0, r4 - add r2, r1, r0 - ldr r0, _0225B8DC ; =0x00002D67 - ldrb r1, [r2, r0] - cmp r1, #0x3b - beq _0225B8D6 - cmp r1, #0x24 - beq _0225B8D6 - add r0, #0x25 - ldr r0, [r2, r0] - cmp r0, #0 - beq _0225B8D6 - cmp r1, #0x79 - beq _0225B8D6 - mov ip, r4 -_0225B8D6: - mov r0, ip - pop {r3, r4, r5, r6, r7, pc} - nop -_0225B8DC: .word 0x00002D67 -_0225B8E0: .word 0x00002D8C - thumb_func_end ov16_0225B840 - - thumb_func_start ov16_0225B8E4 -ov16_0225B8E4: ; 0x0225B8E4 - lsl r1, r1, #4 - add r1, r0, r1 - ldr r0, _0225B908 ; =0x000003DE - ldr r3, _0225B90C ; =0x0226EBBC - ldrh r1, [r1, r0] - mov r2, #0 -_0225B8F0: - ldrh r0, [r3] - cmp r0, r1 - bne _0225B8FA - mov r0, #1 - bx lr -_0225B8FA: - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #6 - blo _0225B8F0 - mov r0, #0 - bx lr - nop -_0225B908: .word 0x000003DE -_0225B90C: .word 0x0226EBBC - thumb_func_end ov16_0225B8E4 - - thumb_func_start ov16_0225B910 -ov16_0225B910: ; 0x0225B910 - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - ldr r2, _0225BA7C ; =0x00000137 - add r7, r0, #0 - add r4, r1, #0 - cmp r3, r2 - bgt _0225B928 - blt _0225B922 - b _0225BA24 -_0225B922: - cmp r3, #0xed - beq _0225B9CA - b _0225BA76 -_0225B928: - add r0, r2, #0 - add r0, #0x34 - cmp r3, r0 - bgt _0225B938 - add r2, #0x34 - cmp r3, r2 - beq _0225B940 - b _0225BA76 -_0225B938: - add r2, #0x8a - cmp r3, r2 - beq _0225B94C - b _0225BA76 -_0225B940: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02258B2C - add r5, r0, #0 - b _0225BA78 -_0225B94C: - add r0, r4, #0 - add r1, r6, #0 - bl ov16_02258AB8 - sub r0, #0x7e - cmp r0, #0xf - bhi _0225B9C6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225B966: ; jump table - .short _0225B9A6 - _0225B966 - 2 ; case 0 - .short _0225B9AA - _0225B966 - 2 ; case 1 - .short _0225B9B2 - _0225B966 - 2 ; case 2 - .short _0225B9AE - _0225B966 - 2 ; case 3 - .short _0225B9BA - _0225B966 - 2 ; case 4 - .short _0225B986 - _0225B966 - 2 ; case 5 - .short _0225B98E - _0225B966 - 2 ; case 6 - .short _0225B992 - _0225B966 - 2 ; case 7 - .short _0225B98A - _0225B966 - 2 ; case 8 - .short _0225B9B6 - _0225B966 - 2 ; case 9 - .short _0225B99A - _0225B966 - 2 ; case 10 - .short _0225B996 - _0225B966 - 2 ; case 11 - .short _0225B99E - _0225B966 - 2 ; case 12 - .short _0225B9BE - _0225B966 - 2 ; case 13 - .short _0225B9C2 - _0225B966 - 2 ; case 14 - .short _0225B9A2 - _0225B966 - 2 ; case 15 -_0225B986: - mov r5, #1 - b _0225BA78 -_0225B98A: - mov r5, #2 - b _0225BA78 -_0225B98E: - mov r5, #3 - b _0225BA78 -_0225B992: - mov r5, #4 - b _0225BA78 -_0225B996: - mov r5, #5 - b _0225BA78 -_0225B99A: - mov r5, #6 - b _0225BA78 -_0225B99E: - mov r5, #7 - b _0225BA78 -_0225B9A2: - mov r5, #8 - b _0225BA78 -_0225B9A6: - mov r5, #0xa - b _0225BA78 -_0225B9AA: - mov r5, #0xb - b _0225BA78 -_0225B9AE: - mov r5, #0xc - b _0225BA78 -_0225B9B2: - mov r5, #0xd - b _0225BA78 -_0225B9B6: - mov r5, #0xe - b _0225BA78 -_0225B9BA: - mov r5, #0xf - b _0225BA78 -_0225B9BE: - mov r5, #0x10 - b _0225BA78 -_0225B9C2: - mov r5, #0x11 - b _0225BA78 -_0225B9C6: - mov r5, #0 - b _0225BA78 -_0225B9CA: - ldr r0, _0225BA80 ; =0x00002D54 - add r1, r4, r0 - mov r0, #0xc0 - mul r0, r6 - ldr r4, [r1, r0] - lsl r0, r4, #2 - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r5, r0, #0x1a - lsl r0, r4, #7 - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r3, r0, #0x1b - lsl r0, r4, #0xc - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r2, r0, #0x1c - lsl r0, r4, #0x11 - lsr r0, r0, #0x1b - lsl r0, r0, #0x1f - lsr r1, r0, #0x1d - lsl r0, r4, #0x1b - lsl r4, r4, #0x16 - lsr r4, r4, #0x1b - lsr r6, r0, #0x1b - mov r0, #1 - lsl r4, r4, #0x1f - and r0, r6 - lsr r4, r4, #0x1e - orr r0, r4 - orr r0, r1 - orr r0, r2 - orr r0, r3 - add r1, r5, #0 - orr r1, r0 - mov r0, #0xf - mul r0, r1 - mov r1, #0x3f - bl sub_020E1F6C - add r5, r0, #1 - cmp r5, #9 - blt _0225BA78 - add r5, r5, #1 - b _0225BA78 -_0225BA24: - mov r2, #0xd - str r2, [sp] - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225BA78 - mov r0, #0x4c - str r0, [sp] - add r0, r7, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225BA78 - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, _0225BA84 ; =0x000080FF - tst r1, r0 - beq _0225BA78 - mov r1, #3 - tst r1, r0 - beq _0225BA5C - mov r5, #0xb -_0225BA5C: - mov r1, #0xc - tst r1, r0 - beq _0225BA64 - mov r5, #5 -_0225BA64: - mov r1, #0x30 - tst r1, r0 - beq _0225BA6C - mov r5, #0xa -_0225BA6C: - mov r1, #0xc0 - tst r0, r1 - beq _0225BA78 - mov r5, #0xf - b _0225BA78 -_0225BA76: - mov r5, #0 -_0225BA78: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225BA7C: .word 0x00000137 -_0225BA80: .word 0x00002D54 -_0225BA84: .word 0x000080FF - thumb_func_end ov16_0225B910 - - thumb_func_start ov16_0225BA88 -ov16_0225BA88: ; 0x0225BA88 - push {r4, r5, r6, r7, lr} - sub sp, #0x94 - str r1, [sp, #0x18] - add r7, r0, #0 - bl ov16_0223DF10 - add r5, r0, #0 - ldr r0, [sp, #0x18] - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - bne _0225BAB4 - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - beq _0225BAB8 -_0225BAB4: - str r4, [sp, #0x44] - b _0225BAC6 -_0225BAB8: - ldr r1, [sp, #0x18] - add r0, r7, #0 - bl ov16_0223E258 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x44] -_0225BAC6: - ldr r2, [sp, #0x18] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_02257028 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - ldr r1, [sp, #0x18] - add r0, r7, #0 - bl ov16_0223DF60 - str r0, [sp, #0x40] - mov r0, #0 - str r0, [sp, #0x50] - add r0, r5, r4 - str r0, [sp, #0x34] - ldr r0, [sp, #0x44] - add r0, r5, r0 - str r0, [sp, #0x30] -_0225BAEC: - mov r0, #0 - str r0, [sp, #0x48] - mov r0, #6 - str r0, [sp, #0x38] - ldr r0, [sp, #0x40] - ldr r4, [sp, #0x48] - cmp r0, #0 - ble _0225BBF0 -_0225BAFC: - ldr r1, [sp, #0x18] - add r0, r7, #0 - add r2, r4, #0 - bl ov16_0223DFAC - mov r1, #0xae - mov r2, #0 - str r0, [sp, #0x68] - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - beq _0225BBD8 - ldr r0, _0225BE14 ; =0x000001EE - cmp r1, r0 - beq _0225BBD8 - ldr r0, [sp, #0x68] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0225BBD8 - add r0, r4, #0 - bl sub_020787CC - ldr r1, [sp, #0x50] - tst r0, r1 - bne _0225BBD8 - ldr r1, [sp, #0x34] - ldr r0, _0225BE18 ; =0x0000219C - ldrb r0, [r1, r0] - cmp r4, r0 - beq _0225BBD8 - ldr r1, [sp, #0x30] - ldr r0, _0225BE18 ; =0x0000219C - ldrb r0, [r1, r0] - cmp r4, r0 - beq _0225BBD8 - ldr r1, [sp, #0x34] - ldr r0, _0225BE1C ; =0x000021A4 - ldrb r0, [r1, r0] - cmp r4, r0 - beq _0225BBD8 - ldr r1, [sp, #0x30] - ldr r0, _0225BE1C ; =0x000021A4 - ldrb r0, [r1, r0] - cmp r4, r0 - beq _0225BBD8 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x60] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x5c] - ldr r0, [sp, #0x68] - mov r1, #0xb1 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x58] - ldr r0, [sp, #0x68] - mov r1, #0xb2 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x54] - ldr r0, [sp, #0x58] - ldr r1, [sp, #0x60] - ldr r2, [sp, #0x5c] - bl ov16_022558CC - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x4c] - ldr r0, [sp, #0x54] - ldr r1, [sp, #0x60] - ldr r2, [sp, #0x5c] - bl ov16_022558CC - ldr r1, [sp, #0x4c] - add r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x4c] - ldr r1, [sp, #0x48] - cmp r1, r0 - bhs _0225BBE8 - ldr r0, [sp, #0x4c] - str r0, [sp, #0x48] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x38] - b _0225BBE8 -_0225BBD8: - add r0, r4, #0 - bl sub_020787CC - ldr r1, [sp, #0x50] - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x50] -_0225BBE8: - ldr r0, [sp, #0x40] - add r4, r4, #1 - cmp r4, r0 - blt _0225BAFC -_0225BBF0: - ldr r0, [sp, #0x38] - cmp r0, #6 - beq _0225BCB8 - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x38] - add r0, r7, #0 - bl ov16_0223DFAC - add r4, r0, #0 - mov r0, #0 - str r0, [sp, #0x20] -_0225BC06: - ldr r1, [sp, #0x20] - add r0, r4, #0 - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x3c] - ldr r3, [sp, #0x3c] - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov16_0225BE3C - str r0, [sp, #0x6c] - ldr r0, [sp, #0x3c] - cmp r0, #0 - beq _0225BC90 - mov r0, #0 - str r0, [sp, #0x90] - add r0, r4, #0 - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x70] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02255A4C - str r0, [sp, #0x74] - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02258AB8 - str r0, [sp, #0x78] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1b - mov r3, #0 - bl ov16_02252060 - str r0, [sp, #0x7c] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0x1c - mov r3, #0 - bl ov16_02252060 - ldr r1, [sp, #0x74] - ldr r2, [sp, #0x6c] - str r1, [sp] - ldr r1, [sp, #0x78] - ldr r3, [sp, #0x70] - str r1, [sp, #4] - ldr r1, [sp, #0x7c] - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, sp, #0x90 - str r0, [sp, #0x10] - ldr r1, [sp, #0x3c] - add r0, r5, #0 - bl ov16_022552D4 - ldr r1, [sp, #0x90] - mov r0, #2 - tst r0, r1 - bne _0225BC9A -_0225BC90: - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #4 - blt _0225BC06 -_0225BC9A: - ldr r0, [sp, #0x20] - cmp r0, #4 - bne _0225BCB2 - ldr r0, [sp, #0x38] - bl sub_020787CC - ldr r1, [sp, #0x50] - orr r0, r1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x50] - b _0225BCBC -_0225BCB2: - ldr r0, [sp, #0x38] - add sp, #0x94 - pop {r4, r5, r6, r7, pc} -_0225BCB8: - mov r0, #0x3f - str r0, [sp, #0x50] -_0225BCBC: - ldr r0, [sp, #0x50] - cmp r0, #0x3f - beq _0225BCC4 - b _0225BAEC -_0225BCC4: - mov r0, #0 - str r0, [sp, #0x28] - mov r0, #6 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - str r0, [sp, #0x24] - ldr r0, [sp, #0x40] - cmp r0, #0 - bgt _0225BCD8 - b _0225BE0C -_0225BCD8: - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x24] - add r0, r7, #0 - bl ov16_0223DFAC - mov r1, #0xae - mov r2, #0 - str r0, [sp, #0x1c] - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - beq _0225BCF8 - ldr r0, _0225BE14 ; =0x000001EE - cmp r1, r0 - bne _0225BCFA -_0225BCF8: - b _0225BDFE -_0225BCFA: - ldr r0, [sp, #0x1c] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0225BDFE - ldr r0, _0225BE18 ; =0x0000219C - ldr r1, [sp, #0x34] - ldrb r2, [r1, r0] - ldr r1, [sp, #0x24] - cmp r1, r2 - beq _0225BDFE - ldr r1, [sp, #0x30] - ldrb r2, [r1, r0] - ldr r1, [sp, #0x24] - cmp r1, r2 - beq _0225BDFE - add r2, r0, #0 - ldr r1, [sp, #0x34] - add r2, #8 - ldrb r2, [r1, r2] - ldr r1, [sp, #0x24] - cmp r1, r2 - beq _0225BDFE - ldr r1, [sp, #0x30] - add r0, #8 - ldrb r1, [r1, r0] - ldr r0, [sp, #0x24] - cmp r0, r1 - beq _0225BDFE - mov r0, #0 - str r0, [sp, #0x64] - ldr r0, [sp, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x84] - ldr r0, [sp, #0x24] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x88] -_0225BD4C: - ldr r1, [sp, #0x64] - ldr r0, [sp, #0x1c] - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x8c] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x8c] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0225BE3C - str r0, [sp, #0x80] - ldr r0, [sp, #0x8c] - cmp r0, #0 - beq _0225BDE6 - lsl r0, r0, #4 - add r1, r5, r0 - ldr r0, _0225BE20 ; =0x000003E1 - ldrb r0, [r1, r0] - cmp r0, #1 - beq _0225BDE6 - add r0, r7, #0 - add r1, r6, #0 - bl ov16_0223E208 - add r3, r0, #0 - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r5, r0] - lsl r3, r3, #2 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x84] - add r4, r5, r3 - str r0, [sp, #0xc] - mov r3, #0x6f - str r6, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - lsl r3, r3, #2 - ldr r2, [sp, #0x8c] - ldr r3, [r4, r3] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0225A280 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - mov r0, #0 - str r0, [sp, #0x90] - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x80] - str r0, [sp] - str r6, [sp, #4] - str r1, [sp, #8] - add r0, sp, #0x90 - str r0, [sp, #0xc] - ldr r2, [sp, #0x8c] - add r0, r7, #0 - add r1, r5, #0 - bl ov16_02254FA8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x4c] - ldr r1, [sp, #0x90] - ldr r0, _0225BE24 ; =0x00140808 - tst r0, r1 - beq _0225BDE6 - mov r0, #0 - str r0, [sp, #0x4c] -_0225BDE6: - ldr r1, [sp, #0x28] - ldr r0, [sp, #0x4c] - cmp r1, r0 - bhs _0225BDF4 - str r0, [sp, #0x28] - ldr r0, [sp, #0x88] - str r0, [sp, #0x2c] -_0225BDF4: - ldr r0, [sp, #0x64] - add r0, r0, #1 - str r0, [sp, #0x64] - cmp r0, #4 - blt _0225BD4C -_0225BDFE: - ldr r0, [sp, #0x24] - add r1, r0, #1 - ldr r0, [sp, #0x40] - str r1, [sp, #0x24] - cmp r1, r0 - bge _0225BE0C - b _0225BCD8 -_0225BE0C: - ldr r0, [sp, #0x2c] - add sp, #0x94 - pop {r4, r5, r6, r7, pc} - nop -_0225BE14: .word 0x000001EE -_0225BE18: .word 0x0000219C -_0225BE1C: .word 0x000021A4 -_0225BE20: .word 0x000003E1 -_0225BE24: .word 0x00140808 - thumb_func_end ov16_0225BA88 - - thumb_func_start ov16_0225BE28 -ov16_0225BE28: ; 0x0225BE28 - push {r4, lr} - add r4, r1, #0 - bl ov16_0223DF10 - add r1, r0, r4 - ldr r0, _0225BE38 ; =0x000021A4 - ldrb r0, [r1, r0] - pop {r4, pc} - ; .align 2, 0 -_0225BE38: .word 0x000021A4 - thumb_func_end ov16_0225BE28 - - thumb_func_start ov16_0225BE3C -ov16_0225BE3C: ; 0x0225BE3C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r2, _0225BFF4 ; =0x00000137 - add r7, r0, #0 - add r6, r1, #0 - cmp r3, r2 - bgt _0225BE56 - blt _0225BE50 - b _0225BF9A -_0225BE50: - cmp r3, #0xed - beq _0225BF18 - b _0225BFEC -_0225BE56: - add r0, r2, #0 - add r0, #0x34 - cmp r3, r0 - bgt _0225BE66 - add r2, #0x34 - cmp r3, r2 - beq _0225BE6E - b _0225BFEC -_0225BE66: - add r2, #0x8a - cmp r3, r2 - beq _0225BE8A - b _0225BFEC -_0225BE6E: - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - mov r2, #0xc - bl ov16_0225B0FC - add r5, r0, #0 - b _0225BFEE -_0225BE8A: - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - mov r2, #1 - bl ov16_0225B0FC - sub r0, #0x7e - cmp r0, #0xf - bhi _0225BF14 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225BEB4: ; jump table - .short _0225BEF4 - _0225BEB4 - 2 ; case 0 - .short _0225BEF8 - _0225BEB4 - 2 ; case 1 - .short _0225BF00 - _0225BEB4 - 2 ; case 2 - .short _0225BEFC - _0225BEB4 - 2 ; case 3 - .short _0225BF08 - _0225BEB4 - 2 ; case 4 - .short _0225BED4 - _0225BEB4 - 2 ; case 5 - .short _0225BEDC - _0225BEB4 - 2 ; case 6 - .short _0225BEE0 - _0225BEB4 - 2 ; case 7 - .short _0225BED8 - _0225BEB4 - 2 ; case 8 - .short _0225BF04 - _0225BEB4 - 2 ; case 9 - .short _0225BEE8 - _0225BEB4 - 2 ; case 10 - .short _0225BEE4 - _0225BEB4 - 2 ; case 11 - .short _0225BEEC - _0225BEB4 - 2 ; case 12 - .short _0225BF0C - _0225BEB4 - 2 ; case 13 - .short _0225BF10 - _0225BEB4 - 2 ; case 14 - .short _0225BEF0 - _0225BEB4 - 2 ; case 15 -_0225BED4: - mov r5, #1 - b _0225BFEE -_0225BED8: - mov r5, #2 - b _0225BFEE -_0225BEDC: - mov r5, #3 - b _0225BFEE -_0225BEE0: - mov r5, #4 - b _0225BFEE -_0225BEE4: - mov r5, #5 - b _0225BFEE -_0225BEE8: - mov r5, #6 - b _0225BFEE -_0225BEEC: - mov r5, #7 - b _0225BFEE -_0225BEF0: - mov r5, #8 - b _0225BFEE -_0225BEF4: - mov r5, #0xa - b _0225BFEE -_0225BEF8: - mov r5, #0xb - b _0225BFEE -_0225BEFC: - mov r5, #0xc - b _0225BFEE -_0225BF00: - mov r5, #0xd - b _0225BFEE -_0225BF04: - mov r5, #0xe - b _0225BFEE -_0225BF08: - mov r5, #0xf - b _0225BFEE -_0225BF0C: - mov r5, #0x10 - b _0225BFEE -_0225BF10: - mov r5, #0x11 - b _0225BFEE -_0225BF14: - mov r5, #0 - b _0225BFEE -_0225BF18: - add r0, r4, #0 - mov r1, #0x4b - mov r2, #0 - bl sub_02074470 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0x4a - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - add r0, r4, #0 - mov r1, #0x49 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #0x48 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x46 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0x47 - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - lsl r2, r6, #0x1f - lsl r0, r5, #0x1f - lsr r5, r2, #0x1b - lsl r2, r7, #0x1f - lsr r4, r2, #0x1c - ldr r2, [sp, #4] - lsl r1, r1, #0x1f - lsl r2, r2, #0x1f - lsr r3, r2, #0x1d - ldr r2, [sp, #8] - mov r6, #1 - and r2, r6 - lsr r1, r1, #0x1e - orr r1, r2 - orr r1, r3 - orr r1, r4 - lsr r0, r0, #0x1a - orr r1, r5 - orr r1, r0 - mov r0, #0xf - mul r0, r1 - mov r1, #0x3f - bl sub_020E1F6C - add r5, r0, #1 - cmp r5, #9 - blt _0225BFEE - add r5, r5, #1 - b _0225BFEE -_0225BF9A: - mov r2, #0xd - str r2, [sp] - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225BFEE - mov r0, #0x4c - str r0, [sp] - add r0, r7, #0 - add r1, r6, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _0225BFEE - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r6, r0] - ldr r1, _0225BFF8 ; =0x000080FF - tst r1, r0 - beq _0225BFEE - mov r1, #3 - tst r1, r0 - beq _0225BFD2 - mov r5, #0xb -_0225BFD2: - mov r1, #0xc - tst r1, r0 - beq _0225BFDA - mov r5, #5 -_0225BFDA: - mov r1, #0x30 - tst r1, r0 - beq _0225BFE2 - mov r5, #0xa -_0225BFE2: - mov r1, #0xc0 - tst r0, r1 - beq _0225BFEE - mov r5, #0xf - b _0225BFEE -_0225BFEC: - mov r5, #0 -_0225BFEE: - add r0, r5, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225BFF4: .word 0x00000137 -_0225BFF8: .word 0x000080FF - thumb_func_end ov16_0225BE3C - - thumb_func_start ov16_0225BFFC -ov16_0225BFFC: ; 0x0225BFFC - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x6b - mov r0, #5 - lsl r1, r1, #2 - bl sub_02018144 - add r4, r0, #0 - mov r2, #0x6b - mov r0, #0 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_020C4BB8 - mov r0, #0x65 - ldrb r1, [r5] - lsl r0, r0, #2 - strb r1, [r4, r0] - ldrb r1, [r5, #1] - add r0, r0, #1 - strb r1, [r4, r0] - mov r0, #0x93 - mov r1, #5 - bl sub_02006C24 - mov r1, #0x69 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0225BFFC - - thumb_func_start ov16_0225C038 -ov16_0225C038: ; 0x0225C038 - push {r4, r5, r6, lr} - sub sp, #0x28 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - bne _0225C0D0 - sub r1, #0x8b - ldrb r1, [r4, r1] - mov r0, #1 - tst r0, r1 - beq _0225C064 - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - beq _0225C0D0 -_0225C064: - ldr r0, _0225C0D4 ; =0x00000195 - ldr r1, _0225C0D8 ; =0x0226F174 - ldrb r2, [r4, r0] - sub r0, r0, #1 - ldrb r1, [r1, r2] - str r1, [sp] - mov r1, #5 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - ldrb r0, [r4, r0] - str r0, [sp, #0xc] - add r0, r5, #0 - str r6, [sp, #0x10] - bl ov16_0223E010 - str r0, [sp, #0x1c] - add r0, r5, #0 - bl ov16_0223E064 - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x18] - mov r0, #1 - str r0, [sp, #0x14] - add r0, sp, #0 - bl ov12_02237728 - add r1, r4, #0 - add r1, #0x88 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x64 - bl ov12_02237E34 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #2 - bl ov12_02237E40 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0 - bl ov12_02237E0C - add r4, #0x88 - ldr r0, [r4, #0] - mov r1, #0 - bl ov12_02237E30 -_0225C0D0: - add sp, #0x28 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225C0D4: .word 0x00000195 -_0225C0D8: .word 0x0226F174 - thumb_func_end ov16_0225C038 - - thumb_func_start ov16_0225C0DC -ov16_0225C0DC: ; 0x0225C0DC - push {r3, lr} - add r2, r1, #0 - add r2, #0x94 - ldrb r2, [r2] - cmp r2, #0 - beq _0225C0FE - mov r2, #0x6a - mov r3, #0 - lsl r2, r2, #2 - strb r3, [r1, r2] - add r2, r1, #0 - add r2, #0x94 - ldrb r2, [r2] - lsl r3, r2, #2 - ldr r2, _0225C100 ; =0x0226F068 - ldr r2, [r2, r3] - blx r2 -_0225C0FE: - pop {r3, pc} - ; .align 2, 0 -_0225C100: .word 0x0226F068 - thumb_func_end ov16_0225C0DC - - thumb_func_start ov16_0225C104 -ov16_0225C104: ; 0x0225C104 - push {r4, lr} - add r4, r1, #0 - cmp r2, #2 - beq _0225C114 - add r0, r4, #0 - add r0, #0x28 - bl ov16_02267360 -_0225C114: - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _0225C11E - bl sub_0200D0F4 -_0225C11E: - add r0, r4, #0 - bl ov16_022647D8 - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02006CA8 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C104 - - thumb_func_start ov16_0225C138 -ov16_0225C138: ; 0x0225C138 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0225C138 - - thumb_func_start ov16_0225C13C -ov16_0225C13C: ; 0x0225C13C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r1, #0x98 - ldr r1, [r1, #0] - add r5, r0, #0 - bl ov16_0223F4F4 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225CBB8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #1 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0225C13C - - thumb_func_start ov16_0225C168 -ov16_0225C168: ; 0x0225C168 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225CBDC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C168 - - thumb_func_start ov16_0225C17C -ov16_0225C17C: ; 0x0225C17C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225CE1C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C17C - - thumb_func_start ov16_0225C190 -ov16_0225C190: ; 0x0225C190 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225CF70 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C190 - - thumb_func_start ov16_0225C1A4 -ov16_0225C1A4: ; 0x0225C1A4 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D118 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C1A4 - - thumb_func_start ov16_0225C1B8 -ov16_0225C1B8: ; 0x0225C1B8 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D1C4 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C1B8 - - thumb_func_start ov16_0225C1CC -ov16_0225C1CC: ; 0x0225C1CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x20] - bl sub_02007DC8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #7 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C1CC - - thumb_func_start ov16_0225C1F0 -ov16_0225C1F0: ; 0x0225C1F0 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D228 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C1F0 - - thumb_func_start ov16_0225C204 -ov16_0225C204: ; 0x0225C204 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D360 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C204 - - thumb_func_start ov16_0225C218 -ov16_0225C218: ; 0x0225C218 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225D3CC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C218 - - thumb_func_start ov16_0225C228 -ov16_0225C228: ; 0x0225C228 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D414 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C228 - - thumb_func_start ov16_0225C23C -ov16_0225C23C: ; 0x0225C23C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D4A8 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C23C - - thumb_func_start ov16_0225C250 -ov16_0225C250: ; 0x0225C250 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225D570 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C250 - - thumb_func_start ov16_0225C260 -ov16_0225C260: ; 0x0225C260 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r4, #0 - add r6, #0x94 - add r1, r6, #0 - add r1, #0x29 - ldrb r1, [r1] - add r5, r0, #0 - bl ov16_0223F290 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0225D5B8 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C260 - - thumb_func_start ov16_0225C288 -ov16_0225C288: ; 0x0225C288 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D698 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C288 - - thumb_func_start ov16_0225C29C -ov16_0225C29C: ; 0x0225C29C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D708 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C29C - - thumb_func_start ov16_0225C2B0 -ov16_0225C2B0: ; 0x0225C2B0 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D794 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C2B0 - - thumb_func_start ov16_0225C2C4 -ov16_0225C2C4: ; 0x0225C2C4 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D840 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C2C4 - - thumb_func_start ov16_0225C2D8 -ov16_0225C2D8: ; 0x0225C2D8 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D8AC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C2D8 - - thumb_func_start ov16_0225C2EC -ov16_0225C2EC: ; 0x0225C2EC - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D8F0 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C2EC - - thumb_func_start ov16_0225C300 -ov16_0225C300: ; 0x0225C300 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D958 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C300 - - thumb_func_start ov16_0225C314 -ov16_0225C314: ; 0x0225C314 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225D9A8 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C314 - - thumb_func_start ov16_0225C328 -ov16_0225C328: ; 0x0225C328 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x20] - mov r1, #6 - bl sub_020080C0 - cmp r0, #1 - bne _0225C34A - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x17 - bl ov16_02266ABC - b _0225C352 -_0225C34A: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225DA44 -_0225C352: - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C328 - - thumb_func_start ov16_0225C35C -ov16_0225C35C: ; 0x0225C35C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DA74 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C35C - - thumb_func_start ov16_0225C370 -ov16_0225C370: ; 0x0225C370 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DB00 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C370 - - thumb_func_start ov16_0225C384 -ov16_0225C384: ; 0x0225C384 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DB74 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C384 - - thumb_func_start ov16_0225C398 -ov16_0225C398: ; 0x0225C398 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DC4C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C398 - - thumb_func_start ov16_0225C3AC -ov16_0225C3AC: ; 0x0225C3AC - push {r4, lr} - add r4, r1, #0 - bl ov16_0225DC7C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C3AC - - thumb_func_start ov16_0225C3BC -ov16_0225C3BC: ; 0x0225C3BC - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DCB0 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C3BC - - thumb_func_start ov16_0225C3D0 -ov16_0225C3D0: ; 0x0225C3D0 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DD44 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C3D0 - - thumb_func_start ov16_0225C3E4 -ov16_0225C3E4: ; 0x0225C3E4 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DD7C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C3E4 - - thumb_func_start ov16_0225C3F8 -ov16_0225C3F8: ; 0x0225C3F8 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DDD8 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C3F8 - - thumb_func_start ov16_0225C40C -ov16_0225C40C: ; 0x0225C40C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DE30 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C40C - - thumb_func_start ov16_0225C420 -ov16_0225C420: ; 0x0225C420 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225DE88 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C420 - - thumb_func_start ov16_0225C430 -ov16_0225C430: ; 0x0225C430 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DEDC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C430 - - thumb_func_start ov16_0225C444 -ov16_0225C444: ; 0x0225C444 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225DF34 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C444 - - thumb_func_start ov16_0225C454 -ov16_0225C454: ; 0x0225C454 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225DF6C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C454 - - thumb_func_start ov16_0225C468 -ov16_0225C468: ; 0x0225C468 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E008 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C468 - - thumb_func_start ov16_0225C47C -ov16_0225C47C: ; 0x0225C47C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - mov r2, #0x65 - add r6, #0x94 - lsl r2, r2, #2 - str r1, [sp, #4] - ldrb r1, [r1, r2] - ldrb r2, [r6, #1] - str r0, [sp] - lsl r2, r2, #0x1c - lsr r2, r2, #0x1c - bl ov16_0223DFAC - add r7, r0, #0 - mov r0, #2 - ldr r1, [r6, #0x1c] - lsl r0, r0, #0x14 - tst r0, r1 - bne _0225C4E4 - add r0, r6, #0 - add r5, r6, #0 - str r0, [sp, #8] - add r0, #0x16 - mov r4, #0 - add r5, #0xe - str r0, [sp, #8] -_0225C4B2: - add r0, r4, #0 - bl sub_020787CC - ldrb r1, [r6, #1] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1c - tst r0, r1 - bne _0225C4DC - add r1, r4, #0 - add r0, r7, #0 - add r1, #0x36 - add r2, r5, #0 - bl sub_02074B30 - ldr r2, [sp, #8] - add r1, r4, #0 - add r0, r7, #0 - add r1, #0x3a - add r2, r2, r4 - bl sub_02074B30 -_0225C4DC: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _0225C4B2 -_0225C4E4: - ldrb r0, [r6, #1] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - bl sub_020787CC - ldr r1, [r6, #8] - tst r0, r1 - bne _0225C500 - add r2, r6, #0 - add r0, r7, #0 - mov r1, #6 - add r2, #0xc - bl sub_02074B30 -_0225C500: - add r0, r7, #0 - mov r1, #0xa3 - add r2, r6, #2 - bl sub_02074B30 - add r0, r7, #0 - mov r1, #0xa0 - add r2, r6, #4 - bl sub_02074B30 - ldrh r0, [r6, #0x2a] - cmp r0, #0 - beq _0225C526 - add r2, r6, #0 - add r0, r7, #0 - mov r1, #0x70 - add r2, #0x20 - bl sub_02074B30 -_0225C526: - ldrh r0, [r6, #0x28] - cmp r0, #0 - beq _0225C53E - add r2, r6, #0 - add r0, r7, #0 - mov r1, #0xa - add r2, #0x24 - bl sub_02074B30 - add r0, r7, #0 - bl sub_0207418C -_0225C53E: - mov r2, #0x65 - ldr r1, [sp, #4] - lsl r2, r2, #2 - ldrb r1, [r1, r2] - ldrb r2, [r6] - ldr r0, [sp] - bl ov16_02266ABC - ldr r0, [sp, #4] - bl ov16_0225CBB0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_0225C47C - - thumb_func_start ov16_0225C558 -ov16_0225C558: ; 0x0225C558 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223DF0C - add r6, r0, #0 - add r0, r5, #0 - bl ov16_0223E02C - ldr r2, _0225C5A8 ; =0x00000196 - ldrb r1, [r4, r2] - cmp r1, #0 - bne _0225C58C - mov r1, #8 - and r1, r6 - bne _0225C584 - cmp r1, #0 - bne _0225C58C - sub r1, r2, #1 - ldrb r1, [r4, r1] - cmp r1, #4 - beq _0225C58C -_0225C584: - ldr r1, _0225C5AC ; =0xFFFFF300 - mov r2, #0 - bl ov16_0226947C -_0225C58C: - mov r1, #0x65 - add r2, r4, #0 - lsl r1, r1, #2 - add r2, #0x94 - ldrb r1, [r4, r1] - ldrb r2, [r2] - add r0, r5, #0 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - nop -_0225C5A8: .word 0x00000196 -_0225C5AC: .word 0xFFFFF300 - thumb_func_end ov16_0225C558 - - thumb_func_start ov16_0225C5B0 -ov16_0225C5B0: ; 0x0225C5B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x28 - bl ov16_022675AC - add r0, r4, #0 - bl ov16_022647D8 - mov r1, #0x65 - add r2, r4, #0 - lsl r1, r1, #2 - add r2, #0x94 - ldrb r1, [r4, r1] - ldrb r2, [r2] - add r0, r5, #0 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C5B0 - - thumb_func_start ov16_0225C5E0 -ov16_0225C5E0: ; 0x0225C5E0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r1, #0 - mov r1, #0 - str r1, [sp, #8] - mov r1, #0x65 - lsl r1, r1, #2 - add r4, r7, #0 - ldrb r1, [r7, r1] - str r0, [sp] - add r4, #0x94 - bl ov16_0223DF60 - mov r5, #0 - str r0, [sp, #4] - cmp r0, #0 - ble _0225C642 -_0225C602: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r7, r1] - ldr r0, [sp] - add r2, r5, #0 - bl ov16_0223DFAC - ldrb r1, [r4, #1] - add r6, r0, #0 - cmp r1, #0x68 - bne _0225C61C - mov r0, #0 - b _0225C624 -_0225C61C: - mov r1, #0xa - mov r2, #0 - bl sub_02074470 -_0225C624: - ldrh r1, [r4, #2] - cmp r1, #0xd7 - bne _0225C630 - bne _0225C63A - cmp r0, #0x2b - beq _0225C63A -_0225C630: - add r0, r6, #0 - mov r1, #0xa0 - add r2, sp, #8 - bl sub_02074B30 -_0225C63A: - ldr r0, [sp, #4] - add r5, r5, #1 - cmp r5, r0 - blt _0225C602 -_0225C642: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r7, r1] - ldrb r2, [r4] - ldr r0, [sp] - bl ov16_02266ABC - add r0, r7, #0 - bl ov16_0225CBB0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C5E0 - - thumb_func_start ov16_0225C65C -ov16_0225C65C: ; 0x0225C65C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E0BC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C65C - - thumb_func_start ov16_0225C670 -ov16_0225C670: ; 0x0225C670 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E0F4 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C670 - - thumb_func_start ov16_0225C684 -ov16_0225C684: ; 0x0225C684 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x10] - add r5, r1, #0 - ldr r0, _0225C778 ; =0x00000195 - add r4, r5, #0 - ldrb r1, [r5, r0] - mov r0, #1 - add r4, #0x94 - tst r0, r1 - beq _0225C69E - mov r6, #2 - b _0225C6A0 -_0225C69E: - mov r6, #0 -_0225C6A0: - ldrb r0, [r4, #5] - lsl r3, r6, #0x18 - lsr r3, r3, #0x18 - str r0, [sp] - ldrb r0, [r4, #1] - str r0, [sp, #4] - ldr r0, [r4, #8] - str r0, [sp, #8] - ldrh r1, [r4, #2] - ldrb r2, [r4, #4] - add r0, sp, #0x14 - bl sub_02075FB4 - ldr r0, [r5, #0x20] - bl sub_02008A90 - add r7, r0, #0 - add r2, sp, #0x14 - add r3, r7, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0x20] - bl sub_020089A0 - ldr r0, [sp, #0x10] - bl ov16_0223E0C8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - bl ov16_0223F2B8 - add r3, r0, #0 - ldr r0, [r4, #8] - mov r2, #5 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r6, [sp, #8] - ldrh r0, [r7, #6] - str r0, [sp, #0xc] - ldrh r0, [r7] - ldrh r1, [r7, #2] - bl sub_02013750 - ldr r0, [sp, #0x10] - bl ov16_0223E0C8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrh r2, [r7] - bl ov16_0223F2CC - ldr r0, [sp, #0x10] - bl ov16_0223E0C8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrh r2, [r7, #4] - bl ov16_0223F2E4 - ldr r0, [r4, #8] - lsl r2, r6, #0x18 - str r0, [sp] - ldrh r0, [r4, #2] - ldrb r1, [r4, #4] - ldrb r3, [r4, #1] - lsr r2, r2, #0x18 - bl sub_02076648 - add r6, r0, #0 - ldr r0, [sp, #0x10] - bl ov16_0223E0C8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - add r2, r6, #0 - bl ov16_0223F2FC - ldr r0, _0225C778 ; =0x00000195 - mov r1, #1 - ldrb r0, [r5, r0] - bl ov12_022384CC - add r2, r0, #0 - ldr r0, [r5, #0x20] - mov r1, #1 - add r2, r6, r2 - bl sub_02007DEC - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - ldr r0, [sp, #0x10] - bl ov16_02266ABC - add r0, r5, #0 - bl ov16_0225CBB0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_0225C778: .word 0x00000195 - thumb_func_end ov16_0225C684 - - thumb_func_start ov16_0225C77C -ov16_0225C77C: ; 0x0225C77C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223EF8C - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x2e - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0225C77C - - thumb_func_start ov16_0225C79C -ov16_0225C79C: ; 0x0225C79C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0225C83C ; =0x00000196 - add r4, r1, #0 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0225C822 - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_0223E02C - str r0, [sp, #8] - mov r3, #0 - str r3, [sp] - ldr r2, [sp, #8] - add r0, r6, #0 - add r1, r7, #0 - str r3, [sp, #4] - bl ov16_02268C04 - ldr r0, [sp, #8] - mov r1, #0 - bl ov16_0226BCCC - add r0, r6, #0 - bl sub_02006CA8 - add r0, r7, #0 - bl sub_02006CA8 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - bl ov16_0223E258 - add r1, r0, #0 - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - cmp r1, r0 - beq _0225C80E - add r0, r5, #0 - bl ov16_0223F35C - bl ov16_0226846C -_0225C80E: - add r0, r4, #0 - add r0, #0x28 - bl ov16_022675AC - ldr r0, [sp, #8] - bl ov16_02269218 - add r0, r4, #0 - bl ov16_022647D8 -_0225C822: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x2f - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0225C83C: .word 0x00000196 - thumb_func_end ov16_0225C79C - - thumb_func_start ov16_0225C840 -ov16_0225C840: ; 0x0225C840 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E134 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C840 - - thumb_func_start ov16_0225C854 -ov16_0225C854: ; 0x0225C854 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E17C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C854 - - thumb_func_start ov16_0225C868 -ov16_0225C868: ; 0x0225C868 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r6, r4, #0 - add r5, r0, #0 - add r6, #0x94 - bl ov16_0223E208 - cmp r0, #0 - beq _0225C88C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0225E1B4 - b _0225C89A -_0225C88C: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x32 - bl ov16_02266ABC -_0225C89A: - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C868 - - thumb_func_start ov16_0225C8A4 -ov16_0225C8A4: ; 0x0225C8A4 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r6, r4, #0 - add r5, r0, #0 - add r6, #0x94 - bl ov16_0223E208 - cmp r0, #0 - beq _0225C8C8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov16_0225E200 - b _0225C8D6 -_0225C8C8: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x33 - bl ov16_02266ABC -_0225C8D6: - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C8A4 - - thumb_func_start ov16_0225C8E0 -ov16_0225C8E0: ; 0x0225C8E0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223E010 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_0223E018 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_0223E064 - add r2, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov16_0226D094 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x34 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C8E0 - - thumb_func_start ov16_0225C91C -ov16_0225C91C: ; 0x0225C91C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223E018 - bl ov16_0226D12C - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x35 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0225C91C - - thumb_func_start ov16_0225C940 -ov16_0225C940: ; 0x0225C940 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r5, #0 - add r4, #0x94 - ldrb r1, [r4, #1] - add r6, r0, #0 - cmp r1, #0 - ldr r1, _0225C984 ; =0x00000196 - bne _0225C960 - ldrb r1, [r5, r1] - cmp r1, #0 - bne _0225C96C - ldrh r1, [r4, #2] - bl ov16_0223F24C - b _0225C96C -_0225C960: - ldrb r1, [r5, r1] - cmp r1, #0 - beq _0225C96C - ldrh r1, [r4, #2] - bl ov16_0223F24C -_0225C96C: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - add r0, r6, #0 - bl ov16_02266ABC - add r0, r5, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - nop -_0225C984: .word 0x00000196 - thumb_func_end ov16_0225C940 - - thumb_func_start ov16_0225C988 -ov16_0225C988: ; 0x0225C988 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - ldrh r1, [r2, #2] - add r5, r0, #0 - add r2, r2, #4 - bl ov16_0223F638 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225E23C - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0225C988 - - thumb_func_start ov16_0225C9AC -ov16_0225C9AC: ; 0x0225C9AC - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E294 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C9AC - - thumb_func_start ov16_0225C9C0 -ov16_0225C9C0: ; 0x0225C9C0 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225E2C8 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C9C0 - - thumb_func_start ov16_0225C9D0 -ov16_0225C9D0: ; 0x0225C9D0 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225E300 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C9D0 - - thumb_func_start ov16_0225C9E0 -ov16_0225C9E0: ; 0x0225C9E0 - push {r4, lr} - add r4, r1, #0 - bl ov16_0225E338 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225C9E0 - - thumb_func_start ov16_0225C9F0 -ov16_0225C9F0: ; 0x0225C9F0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r4, r6, #0 - add r4, #0x94 - ldrh r1, [r4, #2] - add r5, r0, #0 - add r2, r4, #4 - bl ov16_0223F638 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov16_0225E38C - add r0, r6, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0225C9F0 - - thumb_func_start ov16_0225CA14 -ov16_0225CA14: ; 0x0225CA14 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - ldrh r1, [r2, #2] - add r5, r0, #0 - add r2, r2, #4 - bl ov16_0223F638 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0225E3E0 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0225CA14 - - thumb_func_start ov16_0225CA38 -ov16_0225CA38: ; 0x0225CA38 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E434 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225CA38 - - thumb_func_start ov16_0225CA4C -ov16_0225CA4C: ; 0x0225CA4C - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E468 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225CA4C - - thumb_func_start ov16_0225CA60 -ov16_0225CA60: ; 0x0225CA60 - push {r4, lr} - add r4, r1, #0 - add r2, r4, #0 - add r2, #0x94 - bl ov16_0225E4C8 - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, pc} - thumb_func_end ov16_0225CA60 - - thumb_func_start ov16_0225CA74 -ov16_0225CA74: ; 0x0225CA74 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #4] - str r1, [sp, #0x10] - add r1, #0x94 - str r1, [sp, #0x10] - ldr r2, [sp, #0x10] - mov r7, #0 - ldrh r1, [r1, #2] - str r0, [sp] - add r2, #8 - str r7, [sp, #8] - bl ov16_0223F638 - ldr r0, [sp] - bl ov16_0223DF0C - mov r1, #0x80 - tst r0, r1 - beq _0225CAAC - ldr r1, [sp, #0x10] - ldr r0, [sp] - ldr r1, [r1, #4] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov16_0223F444 - b _0225CB64 -_0225CAAC: - add r0, r7, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - bl ov16_0223DF1C - cmp r0, #0 - ble _0225CB3A -_0225CABA: - ldr r0, [sp] - ldr r1, [sp, #0xc] - bl ov16_0223DF20 - add r6, r0, #0 - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0225CB28 -_0225CACE: - add r0, r6, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0225CB1C - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0225CB1C - ldr r0, [sp] - ldr r1, [sp, #0xc] - bl ov16_0223E208 - cmp r0, #0 - beq _0225CB10 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #8] - add r0, r1, r0 - str r0, [sp, #8] - b _0225CB1C -_0225CB10: - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - add r7, r7, r0 -_0225CB1C: - add r0, r6, #0 - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blt _0225CACE -_0225CB28: - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - ldr r0, [sp] - bl ov16_0223DF1C - ldr r1, [sp, #0xc] - cmp r1, r0 - blt _0225CABA -_0225CB3A: - cmp r7, #0 - bne _0225CB4E - ldr r0, [sp, #8] - cmp r0, #0 - bne _0225CB4E - ldr r0, [sp] - mov r1, #3 - bl ov16_0223F444 - b _0225CB64 -_0225CB4E: - cmp r7, #0 - bne _0225CB5C - ldr r0, [sp] - mov r1, #2 - bl ov16_0223F444 - b _0225CB64 -_0225CB5C: - ldr r0, [sp] - mov r1, #1 - bl ov16_0223F444 -_0225CB64: - mov r2, #0x65 - ldr r1, [sp, #4] - lsl r2, r2, #2 - ldrb r1, [r1, r2] - ldr r2, [sp, #0x10] - ldr r0, [sp] - ldrb r2, [r2] - bl ov16_02266ABC - ldr r0, [sp, #4] - bl ov16_0225CBB0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_0225CA74 - - thumb_func_start ov16_0225CB80 -ov16_0225CB80: ; 0x0225CB80 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - bl ov16_0223DF04 - add r6, r0, #0 - mov r1, #0xff - bl sub_0201ADA4 - add r0, r6, #0 - bl sub_0201ACCC - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x42 - bl ov16_02266ABC - add r0, r4, #0 - bl ov16_0225CBB0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0225CB80 - - thumb_func_start ov16_0225CBB0 -ov16_0225CBB0: ; 0x0225CBB0 - mov r1, #0 - add r0, #0x94 - strb r1, [r0] - bx lr - thumb_func_end ov16_0225CBB0 - - thumb_func_start ov16_0225CBB8 -ov16_0225CBB8: ; 0x0225CBB8 - push {r4, lr} - add r4, r0, #0 - mov r0, #5 - mov r1, #0x18 - bl sub_02018144 - add r1, r0, #0 - str r4, [r1, #0] - mov r2, #0 - strb r2, [r1, #0x14] - strb r2, [r1, #0x15] - ldr r0, _0225CBD8 ; =ov16_02263014 - strb r2, [r1, #0x16] - bl sub_0200D9E8 - pop {r4, pc} - ; .align 2, 0 -_0225CBD8: .word ov16_02263014 - thumb_func_end ov16_0225CBB8 - - thumb_func_start ov16_0225CBDC -ov16_0225CBDC: ; 0x0225CBDC - push {r4, r5, r6, r7, lr} - sub sp, #0x6c - str r0, [sp, #0x24] - add r6, r1, #0 - add r5, r2, #0 - bl ov16_0223E000 - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - bl ov16_0223DF0C - mov r0, #5 - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - mov r2, #0 - ldr r0, _0225CE00 ; =0x00000195 - strb r2, [r4, #0x12] - ldrb r0, [r6, r0] - mov r1, #1 - tst r0, r1 - beq _0225CC32 - mov r0, #2 - strb r0, [r4, #0x13] - ldr r0, [sp, #0x24] - bl ov16_0223E020 - str r0, [r4, #0xc] - ldr r1, _0225CE00 ; =0x00000195 - ldr r0, [r0, #0] - ldrb r2, [r6, r1] - mov r1, #1 - and r2, r1 - add r3, r2, #0 - mov r1, #6 - mul r3, r1 - ldr r1, _0225CE04 ; =0x0223B0B8 - mov r2, #0x58 - ldrsh r1, [r1, r3] - bl sub_0200D4C4 - b _0225CC58 -_0225CC32: - ldr r0, [sp, #0x24] - add r1, r2, #0 - strb r2, [r4, #0x13] - bl ov16_0223E020 - str r0, [r4, #0xc] - ldr r1, _0225CE00 ; =0x00000195 - ldr r0, [r0, #0] - ldrb r2, [r6, r1] - mov r1, #1 - and r2, r1 - add r3, r2, #0 - mov r1, #6 - mul r3, r1 - ldr r1, _0225CE04 ; =0x0223B0B8 - mov r2, #0x88 - ldrsh r1, [r1, r3] - bl sub_0200D4C4 -_0225CC58: - ldrb r0, [r5, #1] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _0225CC64 - mov r0, #1 - b _0225CC66 -_0225CC64: - mov r0, #0 -_0225CC66: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldrb r0, [r5, #1] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1b - str r0, [sp, #4] - ldr r0, [r5, #4] - str r0, [sp, #8] - ldrb r2, [r5, #1] - ldrh r1, [r5, #2] - ldrb r3, [r4, #0x13] - lsl r2, r2, #0x1e - add r0, sp, #0x5c - lsr r2, r2, #0x1e - bl sub_02075FB4 - ldr r0, [r5, #4] - str r0, [sp] - ldrb r3, [r5, #1] - ldrh r0, [r5, #2] - ldrb r2, [r4, #0x13] - lsl r1, r3, #0x1e - lsl r3, r3, #0x18 - lsr r1, r1, #0x1e - lsr r3, r3, #0x1b - bl sub_02076648 - str r0, [sp, #0x2c] - mov r0, #0x69 - lsl r0, r0, #2 - add r1, sp, #0x30 - ldrh r2, [r5, #2] - ldr r0, [r6, r0] - add r1, #2 - bl sub_02078A80 - mov r0, #0x69 - lsl r0, r0, #2 - add r1, sp, #0x30 - ldrh r2, [r5, #2] - ldr r0, [r6, r0] - add r1, #1 - bl sub_02078AA4 - mov r0, #0x69 - lsl r0, r0, #2 - ldrh r2, [r5, #2] - ldr r0, [r6, r0] - add r1, sp, #0x30 - bl sub_02078AC8 - mov r3, #0x69 - lsl r3, r3, #2 - ldr r0, [r6, r3] - sub r3, #0xf - add r1, sp, #0x30 - ldrh r2, [r5, #2] - ldrb r3, [r6, r3] - add r1, #3 - bl sub_020789BC - ldr r1, _0225CE00 ; =0x00000195 - mov r0, #6 - ldrb r2, [r6, r1] - ldr r3, _0225CE04 ; =0x0223B0B8 - add r7, r2, #0 - mul r7, r0 - ldr r0, _0225CE08 ; =0x0223B0BA - mov r2, #2 - ldrsh r0, [r0, r7] - ldrsh r3, [r3, r7] - str r0, [sp] - ldr r0, _0225CE0C ; =0x0223B0BC - ldrsh r0, [r0, r7] - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - str r0, [sp, #8] - add r0, sp, #0x30 - ldrsb r2, [r0, r2] - str r2, [sp, #0xc] - mov r2, #1 - ldrsb r2, [r0, r2] - str r2, [sp, #0x10] - ldrb r0, [r0] - add r2, sp, #0x5c - str r0, [sp, #0x14] - sub r0, r1, #1 - ldrb r0, [r6, r0] - ldr r1, [sp, #0x28] - str r0, [sp, #0x18] - add r0, sp, #0x30 - add r0, #3 - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - bl ov16_02263B30 - str r0, [r6, #0x20] - ldr r0, [r6, #0x20] - str r0, [r4, #8] - ldrb r0, [r4, #0x13] - cmp r0, #2 - bne _0225CD46 - mov r3, #0 - str r3, [sp] - mov r1, #8 - ldr r0, [r4, #8] - add r2, r1, #0 - bl sub_020086FC -_0225CD46: - ldrb r0, [r4, #0x13] - cmp r0, #2 - bne _0225CD86 - ldr r0, [sp, #0x24] - bl ov16_0223EBEC - mov r1, #0x40 - tst r0, r1 - beq _0225CD86 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - add r7, r0, #0 - ldr r0, [r4, #8] - mov r1, #0x2e - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #0 - mov r2, #0xc0 - bl sub_02007DEC - add r2, r7, #0 - ldr r0, [r4, #8] - mov r1, #1 - sub r2, #0x88 - bl sub_02007DEC - strh r7, [r4, #0x14] - b _0225CD92 -_0225CD86: - ldr r0, _0225CE00 ; =0x00000195 - ldrb r0, [r6, r0] - lsl r1, r0, #2 - ldr r0, _0225CE10 ; =0x0223B0A0 - ldrsh r0, [r0, r1] - strh r0, [r4, #0x14] -_0225CD92: - ldr r0, [sp, #0x24] - str r0, [r4, #0] - str r6, [r4, #4] - ldrb r0, [r5] - strb r0, [r4, #0x10] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r6, r0] - add r0, r0, #1 - strb r1, [r4, #0x11] - ldrh r1, [r5, #2] - strh r1, [r4, #0x16] - ldrb r1, [r5, #1] - lsl r1, r1, #0x18 - lsr r2, r1, #0x1b - add r1, r4, #0 - add r1, #0x2c - strb r2, [r1] - ldr r1, [r5, #8] - str r1, [r4, #0x18] - ldrb r0, [r6, r0] - str r0, [r4, #0x1c] - ldr r0, [r5, #4] - bl sub_02075BFC - str r0, [r4, #0x24] - ldrb r0, [r5, #1] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - str r0, [r4, #0x28] - ldrb r0, [r4, #0x13] - cmp r0, #2 - bne _0225CDEC - ldr r0, [sp, #0x24] - bl ov16_0223EBEC - mov r1, #0x40 - tst r0, r1 - beq _0225CDEC - ldr r0, _0225CE14 ; =ov16_0225E894 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - b _0225CDF6 -_0225CDEC: - ldr r0, _0225CE18 ; =ov16_0225E4E8 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 -_0225CDF6: - mov r0, #1 - bl sub_02005454 - add sp, #0x6c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225CE00: .word 0x00000195 -_0225CE04: .word 0x0223B0B8 -_0225CE08: .word 0x0223B0BA -_0225CE0C: .word 0x0223B0BC -_0225CE10: .word 0x0223B0A0 -_0225CE14: .word ov16_0225E894 -_0225CE18: .word ov16_0225E4E8 - thumb_func_end ov16_0225CBDC - - thumb_func_start ov16_0225CE1C -ov16_0225CE1C: ; 0x0225CE1C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r6, r1, #0 - add r5, r2, #0 - bl ov16_0223DF0C - mov r0, #5 - mov r1, #0x9c - bl sub_02018144 - add r4, r0, #0 - ldr r0, _0225CF68 ; =0x00000195 - ldrb r1, [r6, r0] - mov r0, #1 - tst r0, r1 - beq _0225CE42 - mov r1, #2 - b _0225CE44 -_0225CE42: - mov r1, #0 -_0225CE44: - add r0, r4, #0 - add r0, #0x84 - strb r1, [r0] - ldrb r0, [r5, #1] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _0225CE56 - mov r0, #1 - b _0225CE58 -_0225CE56: - mov r0, #0 -_0225CE58: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldrb r0, [r5, #1] - add r3, r4, #0 - add r3, #0x84 - lsl r0, r0, #0x18 - lsr r0, r0, #0x1b - str r0, [sp, #4] - ldr r0, [r5, #4] - str r0, [sp, #8] - ldrb r2, [r5, #1] - add r0, r4, #0 - ldrh r1, [r5, #2] - lsl r2, r2, #0x1e - ldrb r3, [r3] - add r0, #0x14 - lsr r2, r2, #0x1e - bl sub_02075FB4 - ldr r0, [r5, #4] - add r2, r4, #0 - str r0, [sp] - ldrb r3, [r5, #1] - add r2, #0x84 - ldrh r0, [r5, #2] - lsl r1, r3, #0x1e - lsl r3, r3, #0x18 - ldrb r2, [r2] - lsr r1, r1, #0x1e - lsr r3, r3, #0x1b - bl sub_02076648 - add r1, r4, #0 - add r1, #0x85 - strb r0, [r1] - mov r0, #0x69 - lsl r0, r0, #2 - add r1, r4, #0 - ldrh r2, [r5, #2] - ldr r0, [r6, r0] - add r1, #0x90 - bl sub_02078A80 - mov r0, #0x69 - lsl r0, r0, #2 - add r1, r4, #0 - ldrh r2, [r5, #2] - ldr r0, [r6, r0] - add r1, #0x91 - bl sub_02078AA4 - mov r0, #0x69 - lsl r0, r0, #2 - add r1, r4, #0 - ldrh r2, [r5, #2] - ldr r0, [r6, r0] - add r1, #0x93 - bl sub_02078AC8 - add r0, r6, #0 - bl ov16_02263B10 - str r7, [r4, #0] - add r0, r4, #0 - str r6, [r4, #4] - mov r1, #0 - add r0, #0x83 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x96 - strb r1, [r0] - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x80 - strb r1, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r2, [r6, r0] - add r1, r4, #0 - add r1, #0x81 - strb r2, [r1] - add r1, r4, #0 - ldrh r2, [r5, #2] - add r1, #0x86 - add r0, r0, #1 - strh r2, [r1] - ldrb r1, [r5, #1] - lsl r1, r1, #0x18 - lsr r2, r1, #0x1b - add r1, r4, #0 - add r1, #0x97 - strb r2, [r1] - ldrb r1, [r6, r0] - add r0, r4, #0 - add r0, #0x82 - strb r1, [r0] - add r0, r4, #0 - ldr r1, [r5, #8] - add r0, #0x88 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, [r5, #0xc] - add r0, #0x8c - strb r1, [r0] - ldr r0, [r5, #4] - bl sub_02075BFC - add r1, r4, #0 - add r1, #0x8d - strb r0, [r1] - add r0, r4, #0 - ldr r1, [r5, #0x10] - add r0, #0x8e - strh r1, [r0] - ldrb r0, [r5, #1] - lsl r0, r0, #0x1d - lsr r1, r0, #0x1f - add r0, r4, #0 - add r0, #0x92 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0x94 - strh r1, [r0] - mov r0, #1 - bl sub_02005454 - ldr r0, _0225CF6C ; =ov16_0225EA80 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0225CF68: .word 0x00000195 -_0225CF6C: .word ov16_0225EA80 - thumb_func_end ov16_0225CE1C - - thumb_func_start ov16_0225CF70 -ov16_0225CF70: ; 0x0225CF70 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov16_0223DF0C - mov r0, #5 - mov r1, #0x9c - bl sub_02018144 - add r5, r0, #0 - add r1, r5, #0 - mov r0, #0 - add r1, #0x83 - strb r0, [r1] - ldr r1, _0225D110 ; =0x00000195 - ldrb r2, [r6, r1] - mov r1, #1 - tst r1, r2 - beq _0225CFA4 - add r0, r5, #0 - mov r1, #2 - add r0, #0x84 - strb r1, [r0] - b _0225CFAA -_0225CFA4: - add r1, r5, #0 - add r1, #0x84 - strb r0, [r1] -_0225CFAA: - ldrb r0, [r4, #1] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _0225CFB6 - mov r0, #1 - b _0225CFB8 -_0225CFB6: - mov r0, #0 -_0225CFB8: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldrb r0, [r4, #1] - add r3, r5, #0 - add r3, #0x84 - lsl r0, r0, #0x18 - lsr r0, r0, #0x1b - str r0, [sp, #4] - ldr r0, [r4, #4] - str r0, [sp, #8] - ldrb r2, [r4, #1] - add r0, r5, #0 - ldrh r1, [r4, #2] - lsl r2, r2, #0x1e - ldrb r3, [r3] - add r0, #0x14 - lsr r2, r2, #0x1e - bl sub_02075FB4 - ldr r0, [r4, #4] - add r2, r5, #0 - str r0, [sp] - ldrb r3, [r4, #1] - add r2, #0x84 - ldrh r0, [r4, #2] - lsl r1, r3, #0x1e - lsl r3, r3, #0x18 - ldrb r2, [r2] - lsr r1, r1, #0x1e - lsr r3, r3, #0x1b - bl sub_02076648 - add r1, r5, #0 - add r1, #0x85 - strb r0, [r1] - mov r0, #0x69 - lsl r0, r0, #2 - add r1, r5, #0 - ldrh r2, [r4, #2] - ldr r0, [r6, r0] - add r1, #0x90 - bl sub_02078A80 - mov r0, #0x69 - lsl r0, r0, #2 - add r1, r5, #0 - ldrh r2, [r4, #2] - ldr r0, [r6, r0] - add r1, #0x91 - bl sub_02078AA4 - mov r0, #0x69 - lsl r0, r0, #2 - add r1, r5, #0 - ldrh r2, [r4, #2] - ldr r0, [r6, r0] - add r1, #0x93 - bl sub_02078AC8 - add r0, r6, #0 - bl ov16_02263B10 - str r7, [r5, #0] - str r6, [r5, #4] - add r0, r5, #0 - ldrb r1, [r4] - add r0, #0x80 - strb r1, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r2, [r6, r0] - add r1, r5, #0 - add r1, #0x81 - strb r2, [r1] - add r1, r5, #0 - ldrh r2, [r4, #2] - add r1, #0x86 - add r0, r0, #1 - strh r2, [r1] - ldrb r1, [r4, #1] - lsl r1, r1, #0x18 - lsr r2, r1, #0x1b - add r1, r5, #0 - add r1, #0x97 - strb r2, [r1] - ldrb r1, [r6, r0] - add r0, r5, #0 - add r0, #0x82 - strb r1, [r0] - add r0, r5, #0 - ldr r1, [r4, #8] - add r0, #0x88 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [r4, #0xc] - add r0, #0x8c - strb r1, [r0] - ldr r0, [r4, #4] - bl sub_02075BFC - add r1, r5, #0 - add r1, #0x8d - strb r0, [r1] - add r0, r5, #0 - ldr r1, [r4, #0x10] - add r0, #0x8e - strh r1, [r0] - ldrb r0, [r4, #1] - lsl r0, r0, #0x1d - lsr r1, r0, #0x1f - add r0, r5, #0 - add r0, #0x92 - strb r1, [r0] - add r0, r5, #0 - ldr r1, [r4, #0x14] - add r0, #0x94 - strh r1, [r0] - add r1, r5, #0 - mov r0, #0 - add r1, #0x96 - strb r0, [r1] - add r1, r5, #0 - ldr r2, [r4, #0x4c] - add r1, #0x98 - str r2, [r1, #0] - mov ip, r4 - add r7, r5, #0 - add r6, r4, #0 - add r1, r5, #0 -_0225D0BC: - mov r2, ip - add r2, #0x50 - ldrh r3, [r2] - add r2, r7, #0 - add r2, #0x40 - strh r3, [r2] - add r2, r4, r0 - add r2, #0x58 - ldrb r3, [r2] - add r2, r5, r0 - add r2, #0x48 - strb r3, [r2] - add r2, r4, r0 - add r2, #0x5c - ldrb r3, [r2] - add r2, r5, r0 - add r2, #0x4c - strb r3, [r2] - add r2, r4, r0 - add r2, #0x60 - ldrb r3, [r2] - add r2, r5, r0 - add r2, #0x50 - strb r3, [r2] - ldr r2, [r6, #0x64] - add r0, r0, #1 - str r2, [r1, #0x54] - mov r2, ip - add r2, r2, #2 - mov ip, r2 - add r7, r7, #2 - add r6, r6, #4 - add r1, r1, #4 - cmp r0, #4 - blt _0225D0BC - ldr r0, _0225D114 ; =ov16_0225F0C0 - add r1, r5, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225D110: .word 0x00000195 -_0225D114: .word ov16_0225F0C0 - thumb_func_end ov16_0225CF70 - - thumb_func_start ov16_0225D118 -ov16_0225D118: ; 0x0225D118 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x74 - str r2, [sp] - bl sub_02018144 - add r1, r0, #0 - str r5, [r1, #0] - str r4, [r1, #4] - ldr r0, [r4, #0x20] - add r7, r1, #0 - str r0, [r1, #8] - ldr r0, [sp] - ldrb r2, [r0] - add r0, r1, #0 - add r0, #0x68 - strb r2, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r3, [r4, r0] - add r2, r1, #0 - add r2, #0x69 - add r0, r0, #1 - strb r3, [r2] - ldrb r2, [r4, r0] - add r0, r1, #0 - add r0, #0x6a - strb r2, [r0] - add r2, r1, #0 - mov r0, #0 - add r2, #0x6b - strb r0, [r2] - ldr r2, [sp] - ldrb r3, [r2, #1] - add r2, r1, #0 - add r2, #0x6c - strb r3, [r2] - ldr r2, [sp] - ldrh r3, [r2, #2] - add r2, r1, #0 - add r2, #0x6e - strh r3, [r2] - ldr r2, [sp] - add r3, r1, #0 - ldr r2, [r2, #4] - str r2, [r1, #0x70] - ldr r2, [sp] - mov ip, r2 -_0225D17C: - mov r4, ip - ldrh r4, [r4, #8] - strh r4, [r7, #0x28] - ldr r4, [sp] - add r7, r7, #2 - add r6, r4, r0 - add r4, r1, r0 - ldrb r5, [r6, #0x10] - add r4, #0x30 - strb r5, [r4] - add r4, r1, r0 - ldrb r5, [r6, #0x14] - add r4, #0x34 - strb r5, [r4] - add r4, r1, r0 - ldrb r5, [r6, #0x18] - add r4, #0x38 - add r0, r0, #1 - strb r5, [r4] - ldr r4, [r2, #0x1c] - add r2, r2, #4 - str r4, [r3, #0x3c] - mov r4, ip - add r4, r4, #2 - add r3, r3, #4 - mov ip, r4 - cmp r0, #4 - blt _0225D17C - ldr r0, _0225D1C0 ; =ov16_0225F764 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225D1C0: .word ov16_0225F764 - thumb_func_end ov16_0225D118 - - thumb_func_start ov16_0225D1C4 -ov16_0225D1C4: ; 0x0225D1C4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r7, [r4, #0] - ldr r0, [r5, #0x20] - str r0, [r4, #4] - ldrb r0, [r6] - strb r0, [r4, #8] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - add r0, r0, #1 - strb r1, [r4, #9] - ldrb r0, [r5, r0] - mov r1, #0 - add r3, r1, #0 - strb r0, [r4, #0xa] - strb r1, [r4, #0xb] - ldrb r0, [r6, #1] - strb r0, [r4, #0xc] - ldrh r0, [r6, #2] - lsl r2, r0, #1 - ldr r0, _0225D220 ; =0x0226F1AE - ldrh r0, [r0, r2] - mov r2, #0x10 - str r0, [sp] - ldr r0, [r4, #4] - bl sub_020086FC - ldr r0, [r4, #4] - mov r1, #0x2d - mov r2, #1 - bl sub_02007DEC - ldr r0, _0225D224 ; =ov16_0225FA00 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225D220: .word 0x0226F1AE -_0225D224: .word ov16_0225FA00 - thumb_func_end ov16_0225D1C4 - - thumb_func_start ov16_0225D228 -ov16_0225D228: ; 0x0225D228 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x20 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r2, #0 - ldr r0, _0225D34C ; =0x00000195 - strb r2, [r4, #0xe] - ldrb r0, [r5, r0] - mov r1, #1 - tst r0, r1 - beq _0225D270 - mov r0, #2 - strb r0, [r4, #0xf] - add r0, r6, #0 - bl ov16_0223E020 - str r0, [r4, #4] - ldr r1, _0225D34C ; =0x00000195 - ldr r0, [r0, #0] - ldrb r2, [r5, r1] - mov r1, #1 - and r1, r2 - mov r2, #6 - mul r2, r1 - ldr r1, _0225D350 ; =0x0223B0B8 - ldrsh r1, [r1, r2] - mov r2, #0x58 - bl sub_0200D4C4 - b _0225D294 -_0225D270: - add r0, r6, #0 - add r1, r2, #0 - strb r2, [r4, #0xf] - bl ov16_0223E020 - str r0, [r4, #4] - ldr r1, _0225D34C ; =0x00000195 - ldr r0, [r0, #0] - ldrb r2, [r5, r1] - mov r1, #1 - and r1, r2 - mov r2, #6 - mul r2, r1 - ldr r1, _0225D350 ; =0x0223B0B8 - ldrsh r1, [r1, r2] - mov r2, #0x88 - bl sub_0200D4C4 -_0225D294: - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _0225D2B6 - add r0, r6, #0 - bl ov16_0223DF0C - mov r1, #0x10 - tst r0, r1 - beq _0225D2BE - ldr r0, _0225D34C ; =0x00000195 - ldrb r1, [r5, r0] - mov r0, #1 - tst r0, r1 - beq _0225D2BE -_0225D2B6: - ldr r0, _0225D34C ; =0x00000195 - ldrb r0, [r5, r0] - str r0, [sp, #8] - b _0225D2C8 -_0225D2BE: - ldr r0, _0225D34C ; =0x00000195 - ldrb r1, [r5, r0] - mov r0, #1 - and r0, r1 - str r0, [sp, #8] -_0225D2C8: - mov r1, #0x65 - ldrh r2, [r7, #2] - lsl r1, r1, #2 - ldrb r1, [r5, r1] - lsl r2, r2, #0x18 - add r0, r6, #0 - lsr r2, r2, #0x18 - bl ov16_02264768 - strh r0, [r7, #2] - ldr r1, [sp, #8] - mov r0, #6 - mul r0, r1 - ldr r1, _0225D350 ; =0x0223B0B8 - ldr r3, _0225D34C ; =0x00000195 - ldrsh r1, [r1, r0] - str r1, [sp] - ldr r1, _0225D354 ; =0x0223B0BA - ldrsh r0, [r1, r0] - ldr r1, [sp, #8] - str r0, [sp, #4] - ldrh r2, [r7, #2] - ldrb r3, [r5, r3] - add r0, r6, #0 - bl ov16_022643B8 - str r0, [r5, #0x18] - str r0, [r4, #8] - ldr r0, [sp, #8] - lsl r1, r0, #2 - ldr r0, _0225D358 ; =0x0223B0A0 - ldrsh r0, [r0, r1] - strh r0, [r4, #0x10] - str r6, [r4, #0] - ldrb r0, [r7] - strb r0, [r4, #0xc] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - add r0, r0, #1 - strb r1, [r4, #0xd] - ldrb r0, [r5, r0] - str r0, [r4, #0x14] - mov r0, #0 - str r0, [r4, #0x1c] - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0225D32C - cmp r0, #2 - bne _0225D33C -_0225D32C: - add r0, r6, #0 - bl ov16_0223DF00 - mov r1, #3 - mov r2, #2 - mov r3, #0x84 - bl sub_02019184 -_0225D33C: - ldr r0, _0225D35C ; =ov16_0225FA70 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0225D34C: .word 0x00000195 -_0225D350: .word 0x0223B0B8 -_0225D354: .word 0x0223B0BA -_0225D358: .word 0x0223B0A0 -_0225D35C: .word ov16_0225FA70 - thumb_func_end ov16_0225D228 - - thumb_func_start ov16_0225D360 -ov16_0225D360: ; 0x0225D360 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x1c - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - strb r0, [r4, #0xa] - str r6, [r4, #0] - ldrb r1, [r7] - strb r1, [r4, #8] - ldrb r1, [r7, #1] - str r1, [r4, #0x10] - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r2, [r5, r1] - strb r2, [r4, #9] - str r5, [r4, #4] - add r2, r1, #1 - ldrb r3, [r5, r2] - mov r2, #1 - tst r2, r3 - beq _0225D39A - mov r1, #2 - strb r1, [r4, #0xb] - b _0225D3BA -_0225D39A: - ldrb r1, [r5, r1] - add r0, r6, #0 - bl ov16_0223E120 - add r2, r0, #0 - mov r0, #0 - strb r0, [r4, #0xb] - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r2, #1] - add r0, r6, #0 - bl ov16_02264768 - bl sub_020788D0 -_0225D3BA: - str r0, [r4, #0xc] - ldr r0, _0225D3C8 ; =ov16_0225FD5C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225D3C8: .word ov16_0225FD5C - thumb_func_end ov16_0225D360 - - thumb_func_start ov16_0225D3CC -ov16_0225D3CC: ; 0x0225D3CC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x10 - bl sub_02018144 - add r1, r0, #0 - mov r0, #0 - strb r0, [r1, #0xa] - add r2, r4, #0 - str r5, [r1, #0] - add r2, #0x94 - ldrb r2, [r2] - strb r2, [r1, #8] - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r3, [r4, r2] - add r2, r2, #1 - strb r3, [r1, #9] - str r4, [r1, #4] - ldrb r3, [r4, r2] - mov r2, #1 - tst r2, r3 - beq _0225D402 - mov r0, #2 - b _0225D402 -_0225D402: - strb r0, [r1, #0xb] - ldr r0, _0225D410 ; =ov16_02260284 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_0225D410: .word ov16_02260284 - thumb_func_end ov16_0225D3CC - - thumb_func_start ov16_0225D414 -ov16_0225D414: ; 0x0225D414 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov16_0223E000 - mov r0, #5 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - ldr r1, _0225D494 ; =0x00000195 - strb r0, [r4, #0xa] - ldrb r2, [r5, r1] - mov r1, #1 - tst r1, r2 - beq _0225D43E - mov r0, #2 - b _0225D43E -_0225D43E: - strb r0, [r4, #0xb] - ldr r0, _0225D494 ; =0x00000195 - ldr r2, _0225D498 ; =0x0223B0DC - ldrb r3, [r5, r0] - mov r0, #1 - add r1, r3, #0 - and r1, r0 - mov r0, #6 - mul r0, r1 - ldrsh r2, [r2, r0] - str r2, [sp] - ldr r2, _0225D49C ; =0x0223B0DE - ldrsh r0, [r2, r0] - str r0, [sp, #4] - ldrh r2, [r6, #2] - add r0, r7, #0 - bl ov16_022643B8 - str r0, [r5, #0x18] - str r0, [r4, #4] - ldr r3, _0225D494 ; =0x00000195 - ldr r2, [r6, #4] - ldrb r0, [r5, r3] - lsl r2, r2, #1 - lsl r0, r0, #0x1f - lsr r1, r0, #0x1d - ldr r0, _0225D4A0 ; =0x0223B0A0 - add r0, r0, r1 - ldrsh r0, [r2, r0] - add r1, r4, #0 - mov r2, #0 - strh r0, [r4, #0xc] - str r7, [r4, #0] - ldrb r0, [r6] - strb r0, [r4, #8] - sub r0, r3, #1 - ldrb r0, [r5, r0] - strb r0, [r4, #9] - ldr r0, _0225D4A4 ; =ov16_02260384 - bl sub_0200D9E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225D494: .word 0x00000195 -_0225D498: .word 0x0223B0DC -_0225D49C: .word 0x0223B0DE -_0225D4A0: .word 0x0223B0A0 -_0225D4A4: .word ov16_02260384 - thumb_func_end ov16_0225D414 - - thumb_func_start ov16_0225D4A8 -ov16_0225D4A8: ; 0x0225D4A8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r6, #0 - add r4, #0x28 - add r7, r0, #0 - add r5, r2, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #1 - bl sub_020C4BB8 - mov r0, #0x65 - str r7, [r4, #0xc] - lsl r0, r0, #2 - ldrb r1, [r6, r0] - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r0, r7, #0 - bl ov16_0223DF0C - add r1, r0, #0 - ldr r0, _0225D568 ; =0x00000195 - ldrb r0, [r6, r0] - bl ov16_0226825C - add r1, r4, #0 - add r1, #0x25 - strb r0, [r1] - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x4c - strb r1, [r0] - mov r0, #2 - ldrsh r0, [r5, r0] - str r0, [r4, #0x28] - ldrh r0, [r5, #4] - str r0, [r4, #0x2c] - add r0, r4, #0 - ldrb r1, [r5, #1] - add r0, #0x48 - strb r1, [r0] - ldrb r0, [r5, #7] - lsl r0, r0, #0x19 - lsr r1, r0, #0x1e - add r0, r4, #0 - add r0, #0x49 - strb r1, [r0] - mov r1, #0 - str r1, [r4, #0x30] - ldr r0, [r5, #8] - str r0, [r4, #0x38] - ldr r0, [r5, #0xc] - str r0, [r4, #0x3c] - add r0, r4, #0 - ldrb r2, [r5, #6] - add r0, #0x26 - strb r2, [r0] - ldrb r0, [r5, #7] - lsl r0, r0, #0x1b - lsr r2, r0, #0x1b - add r0, r4, #0 - add r0, #0x4a - strb r2, [r0] - ldrb r0, [r5, #7] - lsl r0, r0, #0x18 - lsr r2, r0, #0x1f - add r0, r4, #0 - add r0, #0x4b - strb r2, [r0] - add r0, r4, #0 - ldrb r2, [r5, #0x14] - add r0, #0x4d - strb r2, [r0] - add r0, r4, #0 - ldr r2, [r5, #0x10] - add r0, #0x27 - strb r2, [r0] - add r0, r4, #0 - bl ov16_02267620 - mov r2, #0 - ldr r1, [r4, #0x28] - add r0, r4, #0 - mvn r2, r2 - bl ov16_02267084 - mov r2, #0xfa - ldr r0, _0225D56C ; =ov16_0226040C - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} - nop -_0225D568: .word 0x00000195 -_0225D56C: .word ov16_0226040C - thumb_func_end ov16_0225D4A8 - - thumb_func_start ov16_0225D570 -ov16_0225D570: ; 0x0225D570 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r5, #0 - add r4, #0x28 - add r6, r0, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #1 - bl sub_020C4BB8 - mov r0, #0x65 - str r6, [r4, #0xc] - lsl r0, r0, #2 - ldrb r1, [r5, r0] - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r5, #0x94 - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x4c - strb r1, [r0] - add r0, r4, #0 - mov r1, #1 - bl ov16_022676A8 - mov r2, #0xfa - ldr r0, _0225D5B4 ; =ov16_02260480 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225D5B4: .word ov16_02260480 - thumb_func_end ov16_0225D570 - - thumb_func_start ov16_0225D5B8 -ov16_0225D5B8: ; 0x0225D5B8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r0, #5 - mov r1, #0x3c - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #0x3c - bl sub_020C4BB8 - mov r2, #0 - strb r2, [r4, #0xa] - strb r2, [r4, #0xb] - str r5, [r4, #0] - ldrb r0, [r7] - mov r1, #0x65 - lsl r1, r1, #2 - strb r0, [r4, #8] - ldr r0, [sp] - add r5, r7, #0 - ldrb r0, [r0, r1] - add r1, r1, #1 - add r6, r4, #0 - strb r0, [r4, #9] - ldr r0, [sp] - ldrb r1, [r0, r1] - add r0, r4, #0 - add r0, #0x34 - strb r1, [r0] - ldr r0, [sp] - add r0, #0x28 - str r0, [r4, #4] - add r0, r4, #0 - ldrb r1, [r7, #1] - add r0, #0x23 - strb r1, [r0] - mov r0, #0x24 - ldrsh r0, [r7, r0] - strh r0, [r4, #0x36] - ldrh r0, [r7, #0x26] - strh r0, [r4, #0x38] - add r0, r7, #0 - add r0, #0x28 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0x3a - strb r1, [r0] - add r0, r7, #0 - add r0, #0x29 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0x3b - strb r1, [r0] -_0225D62A: - mov r3, #0 -_0225D62C: - add r0, r5, r3 - ldrb r1, [r0, #8] - add r0, r6, r3 - add r3, r3, #1 - strb r1, [r0, #0x10] - cmp r3, #6 - blt _0225D62C - add r2, r2, #1 - add r5, r5, #6 - add r6, r6, #6 - cmp r2, #2 - blt _0225D62A - mov r0, #0 - add r3, r0, #0 -_0225D648: - add r2, r7, r0 - ldrb r1, [r2, #8] - cmp r1, #2 - bne _0225D656 - add r1, r4, r0 - strb r3, [r1, #0x1c] - b _0225D65C -_0225D656: - ldrb r2, [r2, #2] - add r1, r4, r0 - strb r2, [r1, #0x1c] -_0225D65C: - add r0, r0, #1 - cmp r0, #6 - blt _0225D648 - mov r3, #0 - add r5, r7, #0 - add r6, r4, #0 -_0225D668: - ldrh r0, [r5, #0x14] - add r2, r7, r3 - add r5, r5, #2 - strh r0, [r6, #0x24] - ldrb r1, [r2, #0x1c] - add r0, r4, r3 - add r0, #0x2c - strb r1, [r0] - add r0, r4, r3 - add r2, #0x20 - ldrb r1, [r2] - add r0, #0x30 - add r3, r3, #1 - add r6, r6, #2 - strb r1, [r0] - cmp r3, #4 - blt _0225D668 - ldr r0, [sp] - add r1, r4, #0 - ldr r0, [r0, #0] - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0225D5B8 - - thumb_func_start ov16_0225D698 -ov16_0225D698: ; 0x0225D698 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r0, #5 - mov r1, #0x24 - add r7, r2, #0 - bl sub_02018144 - add r3, r0, #0 - mov r1, #0x65 - mov r4, #0 - add r0, #0x20 - strb r4, [r0] - ldr r0, [sp] - str r5, [r3, #0] - add r0, #0x94 - ldrb r0, [r0] - lsl r1, r1, #2 - add r5, r7, #0 - strb r0, [r3, #0x1c] - ldr r0, [sp] - add r6, r3, #0 - ldrb r0, [r0, r1] - add r1, r1, #1 - strb r0, [r3, #0x1d] - ldr r0, [sp] - ldrb r0, [r0, r1] - strb r0, [r3, #0x1e] - ldr r0, [sp] - add r0, #0x28 - str r0, [r3, #4] - ldrb r0, [r7, #1] - strb r0, [r3, #0x1f] -_0225D6DA: - ldrh r0, [r5, #4] - add r2, r7, r4 - add r1, r3, r4 - strh r0, [r6, #0xc] - ldrb r0, [r2, #0xc] - add r4, r4, #1 - add r5, r5, #2 - strb r0, [r1, #0x14] - ldrb r0, [r2, #0x10] - add r6, r6, #2 - cmp r4, #4 - strb r0, [r1, #0x18] - blt _0225D6DA - ldrh r0, [r7, #2] - add r1, r3, #0 - mov r2, #0 - strh r0, [r3, #0x22] - ldr r0, [sp] - ldr r0, [r0, #4] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0225D698 - - thumb_func_start ov16_0225D708 -ov16_0225D708: ; 0x0225D708 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - add r7, r1, #0 - mov r0, #5 - mov r1, #0x34 - add r5, r2, #0 - bl sub_02018144 - add r6, r0, #0 - mov r0, #0 - strb r0, [r6, #0xf] - ldr r0, [sp] - str r0, [r6, #0] - add r0, r7, #0 - add r0, #0x94 - ldrb r0, [r0] - strb r0, [r6, #0xc] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r7, r0] - add r0, r0, #1 - strb r1, [r6, #0xd] - ldrb r0, [r7, r0] - strb r0, [r6, #0xe] - ldrh r0, [r5, #2] - strh r0, [r6, #0x30] - add r0, r7, #0 - add r0, #0x28 - str r0, [r6, #4] - add r0, r6, #0 - ldrb r1, [r5, #1] - add r0, #0x32 - strb r1, [r0] - ldr r0, [sp] - add r1, sp, #4 - bl ov16_0223F87C - ldr r0, [sp] - bl ov16_0223DF1C - add r4, r0, #0 - ldr r0, [sp] - bl ov16_0223DF0C - mov r0, #0 - cmp r4, #0 - ble _0225D784 - add r1, r6, #0 -_0225D76A: - ldrh r2, [r5, #4] - add r0, r0, #1 - strh r2, [r1, #0x10] - ldrh r2, [r5, #6] - strh r2, [r1, #0x12] - ldrh r2, [r5, #8] - strh r2, [r1, #0x14] - ldrh r2, [r5, #0xa] - add r5, #8 - strh r2, [r1, #0x16] - add r1, #8 - cmp r0, r4 - blt _0225D76A -_0225D784: - ldr r0, [r7, #8] - add r1, r6, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0225D708 - - thumb_func_start ov16_0225D794 -ov16_0225D794: ; 0x0225D794 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - str r1, [sp] - mov r0, #5 - mov r1, #0x34 - str r2, [sp, #4] - bl sub_02018144 - add r4, r0, #0 - mov r0, #5 - mov r1, #0x34 - bl sub_02018144 - str r0, [r4, #8] - mov r0, #5 - mov r1, #0x38 - bl sub_02018144 - ldr r1, [r4, #8] - str r0, [r1, #4] - mov r0, #5 - bl sub_02079FF4 - ldr r1, [r4, #8] - mov r6, #0 - ldr r1, [r1, #4] - ldr r3, [sp, #4] - str r0, [r1, #0] - strb r6, [r4, #0xe] - str r5, [r4, #0] - ldr r0, [sp, #4] - mov r1, #0x65 - ldrb r0, [r0] - lsl r1, r1, #2 - add r5, r4, #0 - strb r0, [r4, #0xc] - ldr r0, [sp] - ldrb r0, [r0, r1] - add r1, r1, #1 - strb r0, [r4, #0xd] - ldr r0, [sp] - ldrb r0, [r0, r1] - strb r0, [r4, #0xf] - ldr r0, [sp, #4] - ldrb r0, [r0, #1] - strb r0, [r4, #0x14] - ldr r0, [sp, #4] - ldrb r0, [r0, #2] - strb r0, [r4, #0x15] - ldr r0, [sp, #4] - ldrb r0, [r0, #3] - strb r0, [r4, #0x16] -_0225D7FE: - ldr r0, [sp, #4] - ldr r1, [r4, #8] - add r7, r0, r6 - ldrb r0, [r7, #4] - add r1, r1, r6 - mov r2, #0 - strb r0, [r1, #0xc] -_0225D80C: - add r0, r3, r2 - ldrb r1, [r0, #8] - add r0, r5, r2 - add r2, r2, #1 - strb r1, [r0, #0x18] - cmp r2, #6 - blt _0225D80C - add r7, #0x20 - ldrb r1, [r7] - add r0, r4, r6 - add r0, #0x30 - add r6, r6, #1 - strb r1, [r0] - add r3, r3, #6 - add r5, r5, #6 - cmp r6, #4 - blt _0225D7FE - ldr r0, [sp] - add r1, r4, #0 - ldr r0, [r0, #0xc] - mov r2, #0 - bl sub_0200D9E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0225D794 - - thumb_func_start ov16_0225D840 -ov16_0225D840: ; 0x0225D840 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - str r1, [sp] - mov r0, #5 - mov r1, #0x34 - add r7, r2, #0 - bl sub_02018144 - add r2, r0, #0 - mov r3, #0 - strb r3, [r2, #0xa] - str r4, [r2, #0] - ldrb r0, [r7] - add r5, r7, #0 - add r6, r2, #0 - strb r0, [r2, #8] - ldrb r0, [r7, #1] - strb r0, [r2, #9] - ldrb r0, [r7, #2] - strb r0, [r2, #0xb] - ldr r0, [r7, #0x20] - str r0, [r2, #0x10] - ldrb r0, [r7, #3] - strb r0, [r2, #0x16] - add r0, r7, #0 - strh r3, [r2, #0x14] - add r0, #0x24 - ldrb r0, [r0] - strb r0, [r2, #0x18] -_0225D87A: - add r0, r7, r3 - ldrb r1, [r0, #4] - add r0, r2, r3 - mov r4, #0 - strb r1, [r0, #0xc] -_0225D884: - add r0, r5, r4 - ldrb r1, [r0, #8] - add r0, r6, r4 - add r4, r4, #1 - strb r1, [r0, #0x1c] - cmp r4, #6 - blt _0225D884 - add r3, r3, #1 - add r5, r5, #6 - add r6, r6, #6 - cmp r3, #4 - blt _0225D87A - ldr r0, [sp] - add r1, r2, #0 - ldr r0, [r0, #0x10] - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0225D840 - - thumb_func_start ov16_0225D8AC -ov16_0225D8AC: ; 0x0225D8AC - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x1c - add r4, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #0xe] - str r6, [r1, #0] - ldrb r0, [r4] - strb r0, [r1, #0xc] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - strb r0, [r1, #0xd] - add r0, r5, #0 - add r0, #0x28 - str r0, [r1, #4] - ldrh r0, [r4, #2] - str r0, [r1, #0x10] - ldrb r0, [r4, #1] - strb r0, [r1, #0xf] - ldr r0, [r4, #4] - strh r0, [r1, #0x18] - ldr r0, [r4, #8] - str r0, [r1, #0x14] - ldr r0, [r5, #0x14] - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225D8AC - - thumb_func_start ov16_0225D8F0 -ov16_0225D8F0: ; 0x0225D8F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - bl ov16_0223E060 - str r0, [sp] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r6, [r4, #0] - ldrb r0, [r5] - mov r1, #0x65 - lsl r1, r1, #2 - strb r0, [r4, #4] - ldrb r0, [r7, r1] - strb r0, [r4, #5] - ldrh r2, [r5, #2] - lsl r0, r2, #1 - add r2, r2, r0 - add r0, sp, #4 - strh r2, [r0, #2] - mov r2, #2 - strb r2, [r0, #1] - ldrb r0, [r5, #1] - ldrb r1, [r7, r1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [sp, #8] - add r0, r6, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r1, [sp] - add r0, r6, #0 - add r2, sp, #4 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225D954 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225D954: .word ov16_02262F7C - thumb_func_end ov16_0225D8F0 - - thumb_func_start ov16_0225D958 -ov16_0225D958: ; 0x0225D958 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - bl ov16_0223E05C - str r0, [sp] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - add r0, r6, #0 - str r5, [r4, #0] - add r0, #0x94 - ldrb r0, [r0] - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - add r2, r7, #0 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225D9A4 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225D9A4: .word ov16_02262F7C - thumb_func_end ov16_0225D958 - - thumb_func_start ov16_0225D9A8 -ov16_0225D9A8: ; 0x0225D9A8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x70 - add r4, r2, #0 - bl sub_02018144 - add r6, r0, #0 - mov r1, #0 - add r0, #0x6a - strb r1, [r0] - str r7, [r6, #0] - add r0, r5, #0 - str r5, [r6, #4] - add r0, #0x94 - ldrb r1, [r0] - add r0, r6, #0 - add r0, #0x68 - strb r1, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - add r0, r6, #0 - add r0, #0x69 - strb r1, [r0] - add r0, r7, #0 - bl ov16_0223E008 - add r3, r6, #0 - str r0, [r6, #0xc] - add r7, r4, #0 - add r3, #0x10 - mov r2, #0xb -_0225D9EC: - ldmia r7!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0225D9EC - ldr r0, [r5, #0x20] - str r0, [r6, #8] - ldr r0, [r4, #0x4c] - cmp r0, #1 - bne _0225DA0C - ldr r0, [r4, #0x50] - cmp r0, #0x19 - bne _0225DA0C - mov r0, #0x1a - mov r1, #1 - lsl r0, r0, #4 - str r1, [r5, r0] -_0225DA0C: - ldr r0, [r4, #0x4c] - cmp r0, #1 - bne _0225DA20 - ldr r0, [r4, #0x50] - cmp r0, #0x1a - bne _0225DA20 - mov r0, #0x1a - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] -_0225DA20: - ldrh r0, [r4, #2] - add r1, r6, #0 - add r1, #0x6c - str r0, [sp] - add r0, r6, #0 - ldr r2, [r4, #0x4c] - ldr r3, [r4, #0x50] - add r0, #0x6b - bl ov16_022645B8 - ldr r0, _0225DA40 ; =ov16_022626C0 - add r1, r6, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225DA40: .word ov16_022626C0 - thumb_func_end ov16_0225D9A8 - - thumb_func_start ov16_0225DA44 -ov16_0225DA44: ; 0x0225DA44 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0xc - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #9] - str r5, [r1, #0] - ldr r0, [r4, #0x20] - str r0, [r1, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - strb r0, [r1, #8] - ldr r0, _0225DA70 ; =ov16_0226292C - strb r2, [r1, #0xa] - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225DA70: .word ov16_0226292C - thumb_func_end ov16_0225DA44 - - thumb_func_start ov16_0225DA74 -ov16_0225DA74: ; 0x0225DA74 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - ldr r0, [r6, #0x2c] - add r5, r2, #0 - cmp r0, #0 - bne _0225DA86 - bl sub_02022974 -_0225DA86: - add r4, r6, #0 - add r4, #0x28 - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - bl sub_020C4CF4 - str r7, [r4, #0xc] - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x4c - strb r1, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r6, r0] - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r0, r7, #0 - bl ov16_0223DF0C - add r1, r0, #0 - ldr r0, _0225DAF4 ; =0x00000195 - ldrb r0, [r6, r0] - bl ov16_0226825C - add r1, r4, #0 - add r1, #0x25 - strb r0, [r1] - mov r0, #2 - ldrsh r0, [r5, r0] - str r0, [r4, #0x28] - ldrh r0, [r5, #4] - str r0, [r4, #0x2c] - ldr r0, [r5, #8] - str r0, [r4, #0x30] - add r0, r4, #0 - ldrb r1, [r5, #1] - add r0, #0x48 - strb r1, [r0] - ldr r1, [r5, #8] - ldr r0, _0225DAF8 ; =0x00007FFF - cmp r1, r0 - bne _0225DAE4 - mov r0, #0 - str r0, [r4, #0x28] - str r0, [r4, #0x30] -_0225DAE4: - mov r2, #0xfa - ldr r0, _0225DAFC ; =ov16_02262988 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225DAF4: .word 0x00000195 -_0225DAF8: .word 0x00007FFF -_0225DAFC: .word ov16_02262988 - thumb_func_end ov16_0225DA74 - - thumb_func_start ov16_0225DB00 -ov16_0225DB00: ; 0x0225DB00 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - ldr r0, [r6, #0x2c] - add r5, r2, #0 - cmp r0, #0 - bne _0225DB12 - bl sub_02022974 -_0225DB12: - add r4, r6, #0 - add r4, #0x28 - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - bl sub_020C4CF4 - str r7, [r4, #0xc] - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x4c - strb r1, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r2, [r6, r0] - add r1, r4, #0 - add r1, #0x24 - strb r2, [r1] - ldr r1, [r5, #4] - add r0, r0, #1 - str r1, [r4, #0x38] - ldr r1, [r5, #0xc] - str r1, [r4, #0x3c] - ldr r2, [r5, #8] - ldr r1, [r4, #0x38] - sub r1, r2, r1 - str r1, [r4, #0x40] - ldrb r0, [r6, r0] - cmp r0, #0 - bne _0225DB5E - mov r2, #0xfa - ldr r0, _0225DB70 ; =ov16_022629DC - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0225DB5E: - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x24 - add r4, #0x4c - ldrb r1, [r1] - ldrb r2, [r4] - bl ov16_02266ABC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225DB70: .word ov16_022629DC - thumb_func_end ov16_0225DB00 - - thumb_func_start ov16_0225DB74 -ov16_0225DB74: ; 0x0225DB74 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x74 - str r2, [sp] - bl sub_02018144 - add r1, r0, #0 - ldr r0, _0225DC44 ; =0x00000195 - ldrb r2, [r4, r0] - mov r0, #1 - tst r0, r2 - beq _0225DB94 - mov r2, #2 - b _0225DB96 -_0225DB94: - mov r2, #0 -_0225DB96: - add r0, r1, #0 - add r0, #0x67 - strb r2, [r0] - add r2, r1, #0 - mov r0, #0 - add r2, #0x66 - strb r0, [r2] - str r5, [r1, #0] - ldr r2, [sp] - str r4, [r1, #4] - ldrb r3, [r2] - add r2, r1, #0 - add r2, #0x64 - strb r3, [r2] - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r3, [r4, r2] - add r2, r1, #0 - add r2, #0x65 - strb r3, [r2] - ldr r2, [r4, #0x20] - add r7, r1, #0 - str r2, [r1, #8] - ldr r2, [sp] - ldrh r3, [r2, #2] - add r2, r1, #0 - add r2, #0x68 - strh r3, [r2] - ldr r2, [sp] - ldrb r3, [r2, #1] - add r2, r1, #0 - add r2, #0x6a - strb r3, [r2] - ldr r2, [sp] - ldrb r3, [r2, #8] - add r2, r1, #0 - add r2, #0x6b - strb r3, [r2] - ldr r2, [sp] - ldr r2, [r2, #4] - str r2, [r1, #0x6c] - ldr r2, [sp] - ldrb r3, [r2, #9] - add r2, r1, #0 - add r2, #0x70 - strh r3, [r2] - ldr r2, [sp] - ldrb r3, [r2, #0xa] - add r2, r1, #0 - add r2, #0x72 - strh r3, [r2] - ldr r2, [sp] - add r3, r1, #0 - mov ip, r2 -_0225DC02: - mov r4, ip - ldrh r4, [r4, #0xc] - strh r4, [r7, #0x24] - ldr r4, [sp] - add r7, r7, #2 - add r6, r4, r0 - add r4, r1, r0 - ldrb r5, [r6, #0x14] - add r4, #0x2c - strb r5, [r4] - add r4, r1, r0 - ldrb r5, [r6, #0x18] - add r4, #0x30 - strb r5, [r4] - add r4, r1, r0 - ldrb r5, [r6, #0x1c] - add r4, #0x34 - add r0, r0, #1 - strb r5, [r4] - ldr r4, [r2, #0x20] - add r2, r2, #4 - str r4, [r3, #0x38] - mov r4, ip - add r4, r4, #2 - add r3, r3, #4 - mov ip, r4 - cmp r0, #4 - blt _0225DC02 - ldr r0, _0225DC48 ; =ov16_02262A9C - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225DC44: .word 0x00000195 -_0225DC48: .word ov16_02262A9C - thumb_func_end ov16_0225DB74 - - thumb_func_start ov16_0225DC4C -ov16_0225DC4C: ; 0x0225DC4C - push {r3, r4, r5, lr} - add r5, r2, #0 - ldr r2, _0225DC78 ; =0x00000195 - mov r4, #1 - ldrb r2, [r1, r2] - tst r2, r4 - beq _0225DC5E - mov r4, #0x75 - b _0225DC60 -_0225DC5E: - sub r4, #0x76 -_0225DC60: - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r1, [r1, r2] - ldrb r2, [r5] - bl ov16_02266ABC - ldrh r0, [r5, #2] - add r1, r4, #0 - bl sub_02005728 - pop {r3, r4, r5, pc} - nop -_0225DC78: .word 0x00000195 - thumb_func_end ov16_0225DC4C - - thumb_func_start ov16_0225DC7C -ov16_0225DC7C: ; 0x0225DC7C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #6] - add r0, r4, #0 - str r5, [r1, #0] - add r0, #0x94 - ldrb r0, [r0] - strb r0, [r1, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - strb r0, [r1, #5] - ldr r0, _0225DCAC ; =ov16_02262D28 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_0225DCAC: .word ov16_02262D28 - thumb_func_end ov16_0225DC7C - - thumb_func_start ov16_0225DCB0 -ov16_0225DCB0: ; 0x0225DCB0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x68 - str r2, [sp] - bl sub_02018144 - add r1, r0, #0 - str r5, [r1, #0] - ldr r0, [sp] - str r4, [r1, #4] - ldrb r2, [r0] - add r0, r1, #0 - add r0, #0x60 - strb r2, [r0] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r2, [r4, r0] - add r0, r1, #0 - add r0, #0x61 - strb r2, [r0] - add r2, r1, #0 - mov r0, #0 - add r2, #0x62 - strb r0, [r2] - ldr r2, [sp] - add r7, r1, #0 - ldrb r3, [r2, #1] - add r2, r1, #0 - add r2, #0x63 - strb r3, [r2] - ldr r2, [sp] - add r3, r1, #0 - ldrb r2, [r2, #2] - str r2, [r1, #0x64] - ldr r2, [sp] - mov ip, r2 -_0225DCFC: - mov r4, ip - ldrh r4, [r4, #4] - strh r4, [r7, #0x20] - ldr r4, [sp] - add r7, r7, #2 - add r6, r4, r0 - add r4, r1, r0 - ldrb r5, [r6, #0xc] - add r4, #0x28 - strb r5, [r4] - add r4, r1, r0 - ldrb r5, [r6, #0x10] - add r4, #0x2c - strb r5, [r4] - add r4, r1, r0 - ldrb r5, [r6, #0x14] - add r4, #0x30 - add r0, r0, #1 - strb r5, [r4] - ldr r4, [r2, #0x18] - add r2, r2, #4 - str r4, [r3, #0x34] - mov r4, ip - add r4, r4, #2 - add r3, r3, #4 - mov ip, r4 - cmp r0, #4 - blt _0225DCFC - ldr r0, _0225DD40 ; =ov16_02262DC4 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225DD40: .word ov16_02262DC4 - thumb_func_end ov16_0225DCB0 - - thumb_func_start ov16_0225DD44 -ov16_0225DD44: ; 0x0225DD44 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x2c] - add r4, r2, #0 - cmp r0, #0 - bne _0225DD56 - bl sub_02022974 -_0225DD56: - ldrb r1, [r4, #1] - add r0, r5, #0 - add r0, #0x72 - strb r1, [r0] - add r0, r5, #0 - mov r2, #1 - ldr r1, [r5, #0x50] - add r0, #0x28 - lsl r2, r2, #8 - bl ov16_02267084 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - add r0, r6, #0 - bl ov16_02266ABC - pop {r4, r5, r6, pc} - thumb_func_end ov16_0225DD44 - - thumb_func_start ov16_0225DD7C -ov16_0225DD7C: ; 0x0225DD7C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - add r6, r0, #0 - add r7, r2, #0 - bl ov16_0223E0D8 - str r0, [sp, #4] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r6, [r4, #0] - ldrb r0, [r7] - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - strb r0, [r4, #5] - add r0, r6, #0 - bl ov16_0223EDF0 - str r0, [sp] - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r2, [r5, r2] - ldrb r3, [r7, #1] - ldr r1, [sp, #4] - add r0, r6, #0 - bl ov16_0223F9FC - strb r0, [r4, #6] - ldr r0, _0225DDD4 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225DDD4: .word ov16_02262F7C - thumb_func_end ov16_0225DD7C - - thumb_func_start ov16_0225DDD8 -ov16_0225DDD8: ; 0x0225DDD8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r3, sp, #4 - add r6, r1, #0 - add r7, r2, #0 - bl ov16_02263C1C - add r0, r5, #0 - bl ov16_0223E05C - str r0, [sp] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - ldrb r0, [r7] - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - add r2, sp, #4 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225DE2C ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225DE2C: .word ov16_02262F7C - thumb_func_end ov16_0225DDD8 - - thumb_func_start ov16_0225DE30 -ov16_0225DE30: ; 0x0225DE30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r3, sp, #4 - add r6, r1, #0 - add r7, r2, #0 - bl ov16_02263CF0 - add r0, r5, #0 - bl ov16_0223E05C - str r0, [sp] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - ldrb r0, [r7] - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - add r2, sp, #4 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225DE84 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225DE84: .word ov16_02262F7C - thumb_func_end ov16_0225DE30 - - thumb_func_start ov16_0225DE88 -ov16_0225DE88: ; 0x0225DE88 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r2, sp, #0 - add r6, r1, #0 - bl ov16_02263DD0 - add r0, r5, #0 - bl ov16_0223E05C - add r7, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - mov r0, #0x22 - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, sp, #0 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225DED8 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225DED8: .word ov16_02262F7C - thumb_func_end ov16_0225DE88 - - thumb_func_start ov16_0225DEDC -ov16_0225DEDC: ; 0x0225DEDC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r3, sp, #4 - add r6, r1, #0 - add r7, r2, #0 - bl ov16_02263E7C - add r0, r5, #0 - bl ov16_0223E05C - str r0, [sp] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - ldrb r0, [r7] - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r1, [sp] - add r0, r5, #0 - add r2, sp, #4 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225DF30 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225DF30: .word ov16_02262F7C - thumb_func_end ov16_0225DEDC - - thumb_func_start ov16_0225DF34 -ov16_0225DF34: ; 0x0225DF34 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0xc - bl sub_02018144 - add r1, r0, #0 - add r0, r4, #0 - str r5, [r1, #0] - add r0, #0x94 - ldrb r0, [r0] - mov r2, #0 - strb r0, [r1, #8] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - add r4, #0x28 - strb r0, [r1, #9] - strb r2, [r1, #0xa] - ldr r0, _0225DF68 ; =ov16_02262F30 - str r4, [r1, #4] - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_0225DF68: .word ov16_02262F30 - thumb_func_end ov16_0225DF34 - - thumb_func_start ov16_0225DF6C -ov16_0225DF6C: ; 0x0225DF6C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r1, _0225E000 ; =0x00000196 - add r4, r2, #0 - ldrb r2, [r5, r1] - add r6, r0, #0 - cmp r2, #0 - bne _0225DFBE - bl ov16_0223E05C - str r0, [sp] - mov r0, #5 - mov r1, #0xc - bl sub_02018144 - add r7, r0, #0 - str r6, [r7, #0] - ldrb r0, [r4] - strb r0, [r7, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - strb r0, [r7, #5] - mov r0, #0 - strb r0, [r7, #7] - add r0, r6, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r1, [sp] - add r0, r6, #0 - add r2, r4, #4 - bl ov16_0223FB24 - strb r0, [r7, #6] - ldr r0, _0225E004 ; =ov16_02262FC0 - add r1, r7, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_0225DFBE: - cmp r2, #1 - bne _0225DFDA - sub r1, r1, #2 - ldrb r1, [r5, r1] - bl ov16_022661B0 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - add r0, r6, #0 - bl ov16_02266ABC - pop {r3, r4, r5, r6, r7, pc} -_0225DFDA: - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - bne _0225DFF0 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - add r0, r6, #0 - bl ov16_022661B0 -_0225DFF0: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - add r0, r6, #0 - bl ov16_02266ABC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225E000: .word 0x00000196 -_0225E004: .word ov16_02262FC0 - thumb_func_end ov16_0225DF6C - - thumb_func_start ov16_0225E008 -ov16_0225E008: ; 0x0225E008 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r6, #0 - add r4, #0x28 - add r7, r0, #0 - add r5, r2, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #1 - bl sub_020C4BB8 - mov r0, #0x65 - str r7, [r4, #0xc] - lsl r0, r0, #2 - ldrb r1, [r6, r0] - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r0, r7, #0 - bl ov16_0223DF0C - add r1, r0, #0 - ldr r0, _0225E0B8 ; =0x00000195 - ldrb r0, [r6, r0] - bl ov16_0226825C - add r1, r4, #0 - add r1, #0x25 - strb r0, [r1] - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x4c - mov r2, #0 - strb r1, [r0] - mov r0, #2 - ldrsh r0, [r5, r0] - str r0, [r4, #0x28] - ldrh r0, [r5, #4] - str r0, [r4, #0x2c] - add r0, r4, #0 - ldrb r1, [r5, #1] - add r0, #0x48 - strb r1, [r0] - ldrb r0, [r5, #7] - lsl r0, r0, #0x19 - lsr r1, r0, #0x1e - add r0, r4, #0 - add r0, #0x49 - strb r1, [r0] - str r2, [r4, #0x30] - ldr r0, [r5, #8] - sub r2, #0x21 - str r0, [r4, #0x38] - ldr r0, [r5, #0xc] - str r0, [r4, #0x3c] - add r0, r4, #0 - ldrb r1, [r5, #6] - add r0, #0x26 - strb r1, [r0] - ldrb r0, [r5, #7] - lsl r0, r0, #0x1b - lsr r1, r0, #0x1b - add r0, r4, #0 - add r0, #0x4a - strb r1, [r0] - ldrb r0, [r5, #7] - lsl r0, r0, #0x18 - lsr r1, r0, #0x1f - add r0, r4, #0 - add r0, #0x4b - strb r1, [r0] - add r0, r4, #0 - ldr r1, [r5, #0x10] - add r0, #0x27 - strb r1, [r0] - ldr r1, [r4, #0x28] - add r0, r4, #0 - bl ov16_02267084 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x24 - add r4, #0x4c - ldrb r1, [r1] - ldrb r2, [r4] - bl ov16_02266ABC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225E0B8: .word 0x00000195 - thumb_func_end ov16_0225E008 - - thumb_func_start ov16_0225E0BC -ov16_0225E0BC: ; 0x0225E0BC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r4, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #0xa] - str r5, [r1, #0] - ldrb r0, [r4] - strb r0, [r1, #8] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r1, #9] - ldrh r0, [r4, #2] - strh r0, [r1, #0xc] - ldrb r0, [r4, #1] - strb r0, [r1, #0xe] - ldr r0, _0225E0F0 ; =ov16_022633A4 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225E0F0: .word ov16_022633A4 - thumb_func_end ov16_0225E0BC - - thumb_func_start ov16_0225E0F4 -ov16_0225E0F4: ; 0x0225E0F4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r4, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #0xa] - str r6, [r1, #0] - ldr r0, [r5, #0x20] - str r0, [r1, #4] - ldrb r0, [r4] - strb r0, [r1, #8] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - strb r0, [r1, #9] - ldrb r0, [r4, #1] - strb r0, [r1, #0xb] - strb r2, [r1, #0xc] - ldrb r0, [r4, #2] - strb r0, [r1, #0xd] - ldr r0, _0225E130 ; =ov16_022634DC - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_0225E130: .word ov16_022634DC - thumb_func_end ov16_0225E0F4 - - thumb_func_start ov16_0225E134 -ov16_0225E134: ; 0x0225E134 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r4, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r0, #0 - strb r0, [r1, #7] - str r6, [r1, #0] - ldrb r2, [r4] - strb r2, [r1, #4] - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r3, [r5, r2] - add r2, r2, #1 - strb r3, [r1, #5] - ldrb r2, [r5, r2] - strb r2, [r1, #6] -_0225E15E: - add r2, r4, r0 - ldrb r3, [r2, #2] - add r2, r1, r0 - add r0, r0, #1 - strb r3, [r2, #8] - cmp r0, #6 - blt _0225E15E - ldr r0, _0225E178 ; =ov16_0226354C - mov r2, #0 - strb r2, [r1, #0xe] - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225E178: .word ov16_0226354C - thumb_func_end ov16_0225E134 - - thumb_func_start ov16_0225E17C -ov16_0225E17C: ; 0x0225E17C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r6, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #7] - str r5, [r1, #0] - ldrb r0, [r6] - strb r0, [r1, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r3, [r4, r0] - add r0, r0, #1 - strb r3, [r1, #5] - ldrb r0, [r4, r0] - strb r0, [r1, #6] - ldr r0, _0225E1B0 ; =ov16_02263604 - strb r2, [r1, #0xe] - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225E1B0: .word ov16_02263604 - thumb_func_end ov16_0225E17C - - thumb_func_start ov16_0225E1B4 -ov16_0225E1B4: ; 0x0225E1B4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r4, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r0, #0 - strb r0, [r1, #7] - str r6, [r1, #0] - ldrb r2, [r4] - strb r2, [r1, #4] - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r3, [r5, r2] - add r2, r2, #1 - strb r3, [r1, #5] - ldrb r2, [r5, r2] - strb r2, [r1, #6] -_0225E1DE: - add r2, r4, r0 - ldrb r3, [r2, #2] - add r2, r1, r0 - add r0, r0, #1 - strb r3, [r2, #8] - cmp r0, #6 - blt _0225E1DE - mov r0, #1 - strb r0, [r1, #0xe] - ldr r0, _0225E1FC ; =ov16_0226354C - mov r2, #0 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_0225E1FC: .word ov16_0226354C - thumb_func_end ov16_0225E1B4 - - thumb_func_start ov16_0225E200 -ov16_0225E200: ; 0x0225E200 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x10 - add r6, r2, #0 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #7] - str r5, [r1, #0] - ldrb r0, [r6] - strb r0, [r1, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r3, [r4, r0] - add r0, r0, #1 - strb r3, [r1, #5] - ldrb r0, [r4, r0] - strb r0, [r1, #6] - mov r0, #1 - strb r0, [r1, #0xe] - ldr r0, _0225E238 ; =ov16_02263604 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_0225E238: .word ov16_02263604 - thumb_func_end ov16_0225E200 - - thumb_func_start ov16_0225E23C -ov16_0225E23C: ; 0x0225E23C - push {r4, r5, lr} - sub sp, #0x24 - add r4, r1, #0 - ldr r1, _0225E28C ; =0x00000196 - add r5, r0, #0 - ldrb r1, [r4, r1] - cmp r1, #0 - bne _0225E27A - bl ov16_0223E05C - add r1, r0, #0 - ldr r2, _0225E290 ; =0x0000039B - add r0, sp, #0 - strh r2, [r0, #2] - mov r3, #0 - strb r3, [r0, #1] - add r0, r5, #0 - add r2, sp, #0 - bl ov16_0223FB24 - add r0, r5, #0 - mov r1, #0 - bl ov16_0223DF04 - mov r1, #1 - bl sub_0200E7FC - add r1, r0, #0 - add r0, r5, #0 - bl ov16_0223F2A4 -_0225E27A: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r5, #0 - mov r2, #0x37 - bl ov16_02266ABC - add sp, #0x24 - pop {r4, r5, pc} - ; .align 2, 0 -_0225E28C: .word 0x00000196 -_0225E290: .word 0x0000039B - thumb_func_end ov16_0225E23C - - thumb_func_start ov16_0225E294 -ov16_0225E294: ; 0x0225E294 - push {r4, r5, r6, lr} - sub sp, #0x50 - mov r3, #0x65 - add r4, r1, #0 - lsl r3, r3, #2 - add r6, r2, #0 - ldrb r3, [r4, r3] - add r1, r6, #0 - add r2, sp, #0 - add r5, r0, #0 - bl ov16_02264530 - add r0, sp, #0 - mov r1, #5 - bl ov12_022382BC - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - ldrb r2, [r6] - add r0, r5, #0 - bl ov16_02266ABC - add sp, #0x50 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225E294 - - thumb_func_start ov16_0225E2C8 -ov16_0225E2C8: ; 0x0225E2C8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x10 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #0xe] - str r5, [r1, #0] - add r0, r4, #0 - str r4, [r1, #4] - add r0, #0x94 - ldrb r0, [r0] - strb r0, [r1, #0xc] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - strb r0, [r1, #0xd] - ldr r0, [r4, #0x20] - str r0, [r1, #8] - ldr r0, _0225E2FC ; =ov16_02263688 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225E2FC: .word ov16_02263688 - thumb_func_end ov16_0225E2C8 - - thumb_func_start ov16_0225E300 -ov16_0225E300: ; 0x0225E300 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #5 - mov r1, #0x10 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - strb r2, [r1, #0xe] - str r5, [r1, #0] - add r0, r4, #0 - str r4, [r1, #4] - add r0, #0x94 - ldrb r0, [r0] - strb r0, [r1, #0xc] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - strb r0, [r1, #0xd] - ldr r0, [r4, #0x20] - str r0, [r1, #8] - ldr r0, _0225E334 ; =ov16_022636D4 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225E334: .word ov16_022636D4 - thumb_func_end ov16_0225E300 - - thumb_func_start ov16_0225E338 -ov16_0225E338: ; 0x0225E338 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r2, sp, #0 - add r6, r1, #0 - bl ov16_022641B4 - add r0, r5, #0 - bl ov16_0223E05C - add r7, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - mov r0, #0x3b - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, sp, #0 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225E388 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225E388: .word ov16_02262F7C - thumb_func_end ov16_0225E338 - - thumb_func_start ov16_0225E38C -ov16_0225E38C: ; 0x0225E38C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r3, sp, #0 - add r6, r1, #0 - bl ov16_02264270 - add r0, r5, #0 - bl ov16_0223E05C - add r7, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - mov r0, #0x3c - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, sp, #0 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225E3DC ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225E3DC: .word ov16_02262F7C - thumb_func_end ov16_0225E38C - - thumb_func_start ov16_0225E3E0 -ov16_0225E3E0: ; 0x0225E3E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r2, sp, #0 - add r6, r1, #0 - bl ov16_02264360 - add r0, r5, #0 - bl ov16_0223E05C - add r7, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - mov r0, #0x3d - strb r0, [r4, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - strb r0, [r4, #5] - add r0, r5, #0 - bl ov16_0223EDF0 - add r3, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, sp, #0 - bl ov16_0223FB24 - strb r0, [r4, #6] - ldr r0, _0225E430 ; =ov16_02262F7C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225E430: .word ov16_02262F7C - thumb_func_end ov16_0225E3E0 - - thumb_func_start ov16_0225E434 -ov16_0225E434: ; 0x0225E434 - push {r4, r5, r6, lr} - sub sp, #0x50 - mov r3, #0x65 - add r4, r1, #0 - lsl r3, r3, #2 - add r6, r2, #0 - ldrb r3, [r4, r3] - add r1, r6, #0 - add r2, sp, #0 - add r5, r0, #0 - bl ov16_02264530 - add r0, sp, #0 - mov r1, #5 - bl ov12_02238390 - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - ldrb r2, [r6] - add r0, r5, #0 - bl ov16_02266ABC - add sp, #0x50 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225E434 - - thumb_func_start ov16_0225E468 -ov16_0225E468: ; 0x0225E468 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - ldr r0, _0225E4B8 ; =0x00000195 - mov r1, #1 - ldrb r0, [r5, r0] - add r4, r2, #0 - tst r0, r1 - beq _0225E47E - mov r1, #0x75 - b _0225E480 -_0225E47E: - sub r1, #0x76 -_0225E480: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0225E490 - cmp r0, #1 - beq _0225E4A0 - cmp r0, #2 - beq _0225E498 - b _0225E4A6 -_0225E490: - ldr r0, _0225E4BC ; =0x000006FE - bl sub_02005728 - b _0225E4A6 -_0225E498: - ldr r0, _0225E4C0 ; =0x000006FC - bl sub_02005728 - b _0225E4A6 -_0225E4A0: - ldr r0, _0225E4C4 ; =0x000006FD - bl sub_02005728 -_0225E4A6: - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - add r0, r6, #0 - bl ov16_02266ABC - pop {r4, r5, r6, pc} - nop -_0225E4B8: .word 0x00000195 -_0225E4BC: .word 0x000006FE -_0225E4C0: .word 0x000006FC -_0225E4C4: .word 0x000006FD - thumb_func_end ov16_0225E468 - - thumb_func_start ov16_0225E4C8 -ov16_0225E4C8: ; 0x0225E4C8 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r6, r0, #0 - ldrh r0, [r4, #2] - add r5, r1, #0 - bl sub_0200549C - mov r1, #0x65 - lsl r1, r1, #2 - ldrb r1, [r5, r1] - ldrb r2, [r4] - add r0, r6, #0 - bl ov16_02266ABC - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225E4C8 - - thumb_func_start ov16_0225E4E8 -ov16_0225E4E8: ; 0x0225E4E8 - push {r3, r4, r5, r6, lr} - sub sp, #0x74 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - ldrb r1, [r4, #0x12] - add r5, r0, #0 - cmp r1, #4 - bls _0225E500 - b _0225E872 -_0225E500: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225E50C: ; jump table - .short _0225E516 - _0225E50C - 2 ; case 0 - .short _0225E520 - _0225E50C - 2 ; case 1 - .short _0225E52E - _0225E50C - 2 ; case 2 - .short _0225E802 - _0225E50C - 2 ; case 3 - .short _0225E856 - _0225E50C - 2 ; case 4 -_0225E516: - mov r0, #0x1c - str r0, [r4, #0x20] - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] -_0225E520: - ldr r0, [r4, #0x20] - sub r0, r0, #1 - str r0, [r4, #0x20] - bne _0225E5F4 - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] -_0225E52E: - ldrb r0, [r4, #0x13] - add r1, sp, #0x18 - cmp r0, #2 - ldr r0, [r4, #0xc] - beq _0225E53A - b _0225E6B4 -_0225E53A: - add r2, sp, #0x14 - ldr r0, [r0, #0] - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #0x1c] - cmp r0, #1 - beq _0225E54E - cmp r0, #3 - bne _0225E570 -_0225E54E: - add r1, sp, #0x14 - mov r0, #4 - ldrsh r0, [r1, r0] - cmp r0, #0xc0 - ldr r0, [r4, #0xc] - bge _0225E566 - ldr r0, [r0, #0] - mov r1, #8 - mov r2, #0 - bl sub_0200D5DC - b _0225E570 -_0225E566: - ldr r0, [r0, #0] - mov r1, #0xc0 - mov r2, #0x58 - bl sub_0200D4C4 -_0225E570: - ldr r0, [r4, #0xc] - add r2, sp, #0x14 - ldr r0, [r0, #0] - add r1, sp, #0x18 - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #0x1c] - cmp r0, #1 - bne _0225E594 - add r3, sp, #0x14 - mov r2, #4 - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02007DEC - b _0225E5E4 -_0225E594: - cmp r0, #3 - bne _0225E5BE - ldr r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - add r3, sp, #0x14 - mov r2, #4 - ldrsh r1, [r3, r2] - sub r0, r0, r1 - strh r0, [r3, #4] - ldrsh r0, [r3, r2] - mov r1, #0 - sub r0, #0x18 - strh r0, [r3, #4] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - neg r2, r2 - bl sub_02008274 - b _0225E5E4 -_0225E5BE: - cmp r0, #5 - bne _0225E5E4 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - add r3, sp, #0x14 - mov r2, #4 - ldrsh r1, [r3, r2] - sub r0, r1, r0 - strh r0, [r3, #4] - ldrsh r0, [r3, r2] - mov r1, #0 - sub r0, #0x10 - strh r0, [r3, #4] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_02008274 -_0225E5E4: - ldr r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - mov r1, #0x14 - ldrsh r1, [r4, r1] - cmp r0, r1 - bge _0225E5F6 -_0225E5F4: - b _0225E88E -_0225E5F6: - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #8] - mov r1, #0x2c - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #0x2d - mov r2, #0 - bl sub_02007DEC - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - ldrb r0, [r4, #0x13] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldrb r0, [r4, #0x11] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r4, #0x16] - ldr r2, [r4, #8] - bl sub_020789F4 - mov r0, #0x69 - ldr r3, [r4, #0x1c] - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x14 - lsl r3, r3, #0x10 - ldrh r2, [r4, #0x16] - add r1, #1 - lsr r3, r3, #0x10 - bl sub_02078A4C - ldrb r1, [r4, #0x11] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x75 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x14 - ldrb r1, [r1, #1] - add r3, r4, #0 - add r3, #0x2c - str r1, [sp, #0x10] - ldrh r2, [r4, #0x16] - ldrb r3, [r3] - ldr r1, [r4, #0x18] - bl sub_02077DB4 - ldr r0, [r4, #0x1c] - cmp r0, #1 - beq _0225E690 - cmp r0, #3 - bne _0225E69C -_0225E690: - ldr r0, [r4, #0xc] - mov r1, #0xc0 - ldr r0, [r0, #0] - mov r2, #0x58 - bl sub_0200D4C4 -_0225E69C: - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #8] - mov r1, #8 - add r3, r2, #0 - bl sub_020086FC - ldrb r0, [r4, #0x12] - add sp, #0x74 - add r0, r0, #1 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225E6B4: - add r2, sp, #0x14 - ldr r0, [r0, #0] - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0225E6C8 - cmp r0, #2 - bne _0225E6EA -_0225E6C8: - add r0, sp, #0x14 - mov r1, #4 - ldrsh r0, [r0, r1] - cmp r0, #0x40 - ldr r0, [r4, #0xc] - ble _0225E6E0 - ldr r0, [r0, #0] - sub r1, #0xc - mov r2, #0 - bl sub_0200D5DC - b _0225E6EA -_0225E6E0: - ldr r0, [r0, #0] - mov r1, #0x40 - mov r2, #0x88 - bl sub_0200D4C4 -_0225E6EA: - ldr r0, [r4, #0xc] - add r2, sp, #0x14 - ldr r0, [r0, #0] - add r1, sp, #0x18 - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #0x1c] - cmp r0, #0 - bne _0225E70E - add r3, sp, #0x14 - mov r2, #4 - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02007DEC - b _0225E75E -_0225E70E: - cmp r0, #2 - bne _0225E736 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - add r3, sp, #0x14 - mov r2, #4 - ldrsh r1, [r3, r2] - sub r0, r1, r0 - strh r0, [r3, #4] - ldrsh r0, [r3, r2] - mov r1, #0 - sub r0, #0x18 - strh r0, [r3, #4] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_02008274 - b _0225E75E -_0225E736: - cmp r0, #4 - bne _0225E75E - ldr r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - add r3, sp, #0x14 - mov r2, #4 - ldrsh r1, [r3, r2] - sub r0, r0, r1 - strh r0, [r3, #4] - ldrsh r0, [r3, r2] - mov r1, #0 - sub r0, #0x10 - strh r0, [r3, #4] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - neg r2, r2 - bl sub_02008274 -_0225E75E: - mov r0, #0x14 - ldrsh r5, [r4, r0] - ldr r0, [r4, #8] - mov r1, #0 - bl sub_020080C0 - cmp r0, r5 - ble _0225E770 - b _0225E88E -_0225E770: - ldr r0, [r4, #8] - mov r1, #0 - add r2, r5, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - ldrb r0, [r4, #0x13] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldrb r0, [r4, #0x11] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r4, #0x16] - ldr r2, [r4, #8] - bl sub_020789F4 - mov r0, #0x69 - ldr r3, [r4, #0x1c] - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r3, r3, #0x10 - ldrh r2, [r4, #0x16] - add r1, sp, #0x14 - lsr r3, r3, #0x10 - bl sub_02078A4C - ldrb r1, [r4, #0x11] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x74 - mvn r1, r1 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x14 - ldrb r1, [r1] - add r3, r4, #0 - add r3, #0x2c - str r1, [sp, #0x10] - ldrh r2, [r4, #0x16] - ldrb r3, [r3] - ldr r1, [r4, #0x18] - bl sub_02077DB4 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0225E7EC - cmp r0, #2 - bne _0225E7F8 -_0225E7EC: - ldr r0, [r4, #0xc] - mov r1, #0x40 - ldr r0, [r0, #0] - mov r2, #0x88 - bl sub_0200D4C4 -_0225E7F8: - ldrb r0, [r4, #0x12] - add sp, #0x74 - add r0, r0, #1 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225E802: - ldr r0, [r4, #0] - bl ov16_0223EE28 - ldrb r1, [r4, #0x11] - bl sub_020160F4 - cmp r0, #1 - bne _0225E88E - ldr r0, [r4, #8] - bl sub_02007C24 - cmp r0, #0 - bne _0225E88E - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _0225E84E - ldrb r1, [r4, #0x11] - mov r0, #0xb - add r2, sp, #0x1c - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x1c - bl ov16_02264408 - mov r0, #4 - add sp, #0x74 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225E84E: - mov r0, #0xff - add sp, #0x74 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225E856: - bl ov12_0222016C - add r0, r5, #0 - bl ov12_02220188 - cmp r0, #0 - bne _0225E88E - add r0, r5, #0 - bl ov12_02220198 - mov r0, #0xff - add sp, #0x74 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225E872: - mov r0, #0 - bl sub_02005454 - ldrb r1, [r4, #0x11] - ldrb r2, [r4, #0x10] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0225E88E: - add sp, #0x74 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0225E4E8 - - thumb_func_start ov16_0225E894 -ov16_0225E894: ; 0x0225E894 - push {r3, r4, r5, r6, lr} - sub sp, #0x74 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - ldrb r1, [r4, #0x12] - add r5, r0, #0 - cmp r1, #4 - bls _0225E8AC - b _0225EA60 -_0225E8AC: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225E8B8: ; jump table - .short _0225E8C2 - _0225E8B8 - 2 ; case 0 - .short _0225E8CC - _0225E8B8 - 2 ; case 1 - .short _0225E8DA - _0225E8B8 - 2 ; case 2 - .short _0225E9F0 - _0225E8B8 - 2 ; case 3 - .short _0225EA44 - _0225E8B8 - 2 ; case 4 -_0225E8C2: - mov r0, #0x1c - str r0, [r4, #0x20] - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] -_0225E8CC: - ldr r0, [r4, #0x20] - sub r0, r0, #1 - str r0, [r4, #0x20] - bne _0225E93C - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] -_0225E8DA: - ldr r0, [r4, #0xc] - add r2, sp, #0x14 - ldr r0, [r0, #0] - add r1, sp, #0x18 - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #0x1c] - cmp r0, #1 - beq _0225E8F2 - cmp r0, #3 - bne _0225E914 -_0225E8F2: - add r1, sp, #0x14 - mov r0, #4 - ldrsh r0, [r1, r0] - cmp r0, #0xc0 - ldr r0, [r4, #0xc] - bge _0225E90A - ldr r0, [r0, #0] - mov r1, #8 - mov r2, #0 - bl sub_0200D5DC - b _0225E914 -_0225E90A: - ldr r0, [r0, #0] - mov r1, #0xc0 - mov r2, #0x58 - bl sub_0200D4C4 -_0225E914: - ldr r0, [r4, #0xc] - add r2, sp, #0x14 - ldr r0, [r0, #0] - add r1, sp, #0x18 - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #8] - mov r1, #1 - mov r2, #4 - bl sub_02008274 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - mov r1, #0x14 - ldrsh r1, [r4, r1] - cmp r0, r1 - bge _0225E93E -_0225E93C: - b _0225EA7C -_0225E93E: - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #8] - mov r1, #0x2c - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #0x2d - mov r2, #0 - bl sub_02007DEC - mov r2, #0x14 - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02007DEC - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - ldrb r0, [r4, #0x13] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldrb r0, [r4, #0x11] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r4, #0x16] - ldr r2, [r4, #8] - bl sub_020789F4 - mov r0, #0x69 - ldr r3, [r4, #0x1c] - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r3, r3, #0x10 - ldrh r2, [r4, #0x16] - add r1, sp, #0x14 - lsr r3, r3, #0x10 - bl sub_02078A4C - ldrb r1, [r4, #0x11] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x75 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x14 - ldrb r1, [r1] - add r3, r4, #0 - add r3, #0x2c - str r1, [sp, #0x10] - ldrh r2, [r4, #0x16] - ldrb r3, [r3] - ldr r1, [r4, #0x18] - bl sub_02077DB4 - ldr r0, [r4, #0xc] - mov r1, #0xc0 - ldr r0, [r0, #0] - mov r2, #0x58 - bl sub_0200D4C4 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #8] - mov r1, #8 - add r3, r2, #0 - bl sub_020086FC - ldrb r0, [r4, #0x12] - add sp, #0x74 - add r0, r0, #1 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225E9F0: - ldr r0, [r4, #0] - bl ov16_0223EE28 - ldrb r1, [r4, #0x11] - bl sub_020160F4 - cmp r0, #1 - bne _0225EA7C - ldr r0, [r4, #8] - bl sub_02007C24 - cmp r0, #0 - bne _0225EA7C - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _0225EA3C - ldrb r1, [r4, #0x11] - mov r0, #0xb - add r2, sp, #0x1c - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x1c - bl ov16_02264408 - mov r0, #4 - add sp, #0x74 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225EA3C: - mov r0, #0xff - add sp, #0x74 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225EA44: - bl ov12_0222016C - add r0, r5, #0 - bl ov12_02220188 - cmp r0, #0 - bne _0225EA7C - add r0, r5, #0 - bl ov12_02220198 - mov r0, #0xff - add sp, #0x74 - strb r0, [r4, #0x12] - pop {r3, r4, r5, r6, pc} -_0225EA60: - mov r0, #0 - bl sub_02005454 - ldrb r1, [r4, #0x11] - ldrb r2, [r4, #0x10] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0225EA7C: - add sp, #0x74 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov16_0225E894 - - thumb_func_start ov16_0225EA80 -ov16_0225EA80: ; 0x0225EA80 - push {r4, r5, lr} - sub sp, #0xb4 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - cmp r0, #7 - bls _0225EA94 - b _0225F094 -_0225EA94: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225EAA0: ; jump table - .short _0225EAB0 - _0225EAA0 - 2 ; case 0 - .short _0225EB36 - _0225EAA0 - 2 ; case 1 - .short _0225EB7A - _0225EAA0 - 2 ; case 2 - .short _0225ECE0 - _0225EAA0 - 2 ; case 3 - .short _0225ECFC - _0225EAA0 - 2 ; case 4 - .short _0225EFD4 - _0225EAA0 - 2 ; case 5 - .short _0225EFE8 - _0225EAA0 - 2 ; case 6 - .short _0225F06E - _0225EAA0 - 2 ; case 7 -_0225EAB0: - add r0, r4, #0 - mov r1, #0 - add r0, #0x96 - strb r1, [r0] - str r1, [r4, #0x10] - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - ldr r0, [r4, #0] - beq _0225EAE8 - bl ov16_0223EBEC - mov r1, #0x20 - tst r0, r1 - bne _0225EB26 - add r0, r4, #0 - add r0, #0x82 - ldrb r0, [r0] - cmp r0, #2 - bne _0225EB26 - ldr r0, [r4, #0] - mov r1, #5 - bl ov12_02223764 - str r0, [r4, #0x10] - b _0225EB26 -_0225EAE8: - bl ov16_0223EBEC - mov r1, #0x20 - tst r0, r1 - bne _0225EB26 - ldr r0, [r4, #0] - bl ov16_0223ED60 - cmp r0, #1 - bne _0225EB12 - add r0, r4, #0 - add r0, #0x82 - ldrb r0, [r0] - cmp r0, #2 - bne _0225EB12 - ldr r0, [r4, #0] - mov r1, #5 - bl ov12_02223764 - str r0, [r4, #0x10] - b _0225EB26 -_0225EB12: - add r0, r4, #0 - add r0, #0x82 - ldrb r0, [r0] - cmp r0, #0 - bne _0225EB26 - ldr r0, [r4, #0] - mov r1, #5 - bl ov12_02223764 - str r0, [r4, #0x10] -_0225EB26: - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0xb4 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0225EB36: - add r1, sp, #0x50 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - add r0, #0x82 - ldrb r0, [r0] - add r1, r4, #0 - add r2, r4, #0 - str r0, [sp, #0x50] - add r1, #0x81 - add r2, #0x8c - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_0223DFAC - str r0, [sp, #0x58] - mov r0, #5 - add r1, sp, #0x50 - bl ov12_02236004 - str r0, [r4, #8] - bl ov12_02236320 - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0xb4 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0225EB7A: - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237890 - cmp r0, #0 - bne _0225EBC2 - ldr r0, [r4, #8] - bl ov12_02236374 - cmp r0, #1 - bne _0225EBC2 - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237810 - cmp r0, #1 - bne _0225EBC2 - add r0, r4, #0 - add r0, #0x82 - ldrb r0, [r0] - cmp r0, #4 - bne _0225EBCC - add r0, r4, #0 - add r0, #0x96 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x96 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x96 - ldrb r0, [r0] - cmp r0, #0xc - bhs _0225EBC4 -_0225EBC2: - b _0225F0B8 -_0225EBC4: - add r0, r4, #0 - mov r1, #0 - add r0, #0x96 - strb r1, [r0] -_0225EBCC: - ldr r0, [r4, #0] - bl ov16_0223E000 - add r2, r4, #0 - add r3, r4, #0 - add r5, r0, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldrh r2, [r2] - ldrb r3, [r3] - add r1, sp, #0x28 - bl sub_020789BC - add r0, r4, #0 - add r0, #0x82 - ldrb r3, [r0] - mov r0, #6 - add r2, r4, #0 - add r1, r3, #0 - mul r1, r0 - ldr r0, _0225EEE8 ; =0x0223B0BA - add r2, #0x14 - ldrsh r0, [r0, r1] - str r0, [sp] - ldr r0, _0225EEEC ; =0x0223B0BC - ldrsh r0, [r0, r1] - add r1, r5, #0 - lsl r5, r3, #2 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x85 - ldrb r0, [r0] - ldr r3, _0225EEF0 ; =0x0223B0A0 - str r0, [sp, #8] - mov r0, #0x90 - ldrsb r0, [r4, r0] - ldrsh r3, [r3, r5] - str r0, [sp, #0xc] - mov r0, #0x91 - ldrsb r0, [r4, r0] - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0x93 - ldrb r0, [r0] - str r0, [sp, #0x14] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #0x18] - add r0, sp, #0x28 - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [r4, #0] - bl ov16_02263B30 - ldr r1, [r4, #4] - mov r2, #0 - str r0, [r1, #0x20] - ldr r0, [r4, #4] - mov r1, #0xc - ldr r0, [r0, #0x20] - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #0xd - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #0x2c - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #6 - ldr r0, [r0, #0x20] - mov r2, #1 - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - mov r3, #0 - lsl r1, r0, #1 - ldr r0, _0225EEF4 ; =0x0226F1AE - ldrh r0, [r0, r1] - mov r1, #0x10 - add r2, r1, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_020086FC - ldr r0, [r4, #4] - mov r1, #6 - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - bl ov12_022363B4 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, _0225EEF8 ; =0x00000706 - bne _0225ECBA - mov r1, #0x75 - bl sub_02005728 - b _0225ECC2 -_0225ECBA: - mov r1, #0x74 - mvn r1, r1 - bl sub_02005728 -_0225ECC2: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _0225ECD0 - bl ov12_02223770 - mov r0, #0 - str r0, [r4, #0x10] -_0225ECD0: - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0xb4 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, pc} -_0225ECE0: - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_022377F8 - cmp r0, #1 - beq _0225ECFC - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x83 - strb r1, [r0] -_0225ECFC: - ldr r0, [r4, #4] - mov r1, #0xc - ldr r0, [r0, #0x20] - bl sub_020080C0 - mov r1, #1 - lsl r1, r1, #8 - cmp r0, r1 - bne _0225ED18 - ldr r0, [r4, #8] - bl ov12_022363C4 - cmp r0, #0 - beq _0225ED1A -_0225ED18: - b _0225EE44 -_0225ED1A: - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, [r4, #4] - bne _0225ED90 - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #4] - mov r1, #0x2d - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x24 - ldrh r2, [r2] - ldrb r3, [r3] - add r1, #3 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x75 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1, #3] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 - b _0225EDEE -_0225ED90: - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x24 - ldrh r2, [r2] - ldrb r3, [r3] - add r1, #2 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x74 - mvn r1, r1 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1, #2] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 -_0225EDEE: - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x86 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r3] - ldr r2, [r2, #0x20] - bl sub_020789F4 - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - mov r2, #0 - add r3, r2, #0 - lsl r1, r0, #1 - ldr r0, _0225EEF4 ; =0x0226F1AE - ldrh r0, [r0, r1] - mov r1, #0x10 - str r0, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_020086FC - mov r0, #5 - add r4, #0x83 - add sp, #0xb4 - strb r0, [r4] - pop {r4, r5, pc} -_0225EE44: - ldr r0, [r4, #4] - mov r1, #0xc - ldr r0, [r0, #0x20] - bl sub_020080C0 - mov r2, #1 - lsl r2, r2, #8 - cmp r0, r2 - ldr r0, [r4, #4] - bge _0225EE5A - b _0225EFAE -_0225EE5A: - ldr r0, [r0, #0x20] - mov r1, #0xc - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r0, #0x20] - add r2, #0xf3 - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, [r4, #4] - bne _0225EEFC - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #4] - mov r1, #0x2d - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x24 - ldrh r2, [r2] - ldrb r3, [r3] - add r1, #1 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x75 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1, #1] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 - b _0225EF58 - nop -_0225EEE8: .word 0x0223B0BA -_0225EEEC: .word 0x0223B0BC -_0225EEF0: .word 0x0223B0A0 -_0225EEF4: .word 0x0226F1AE -_0225EEF8: .word 0x00000706 -_0225EEFC: - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldrh r2, [r2] - ldrb r3, [r3] - add r1, sp, #0x24 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x74 - mvn r1, r1 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 -_0225EF58: - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x86 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r3] - ldr r2, [r2, #0x20] - bl sub_020789F4 - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - mov r2, #0 - mov r3, #1 - lsl r1, r0, #1 - ldr r0, _0225F0BC ; =0x0226F1AE - ldrh r0, [r0, r1] - mov r1, #0x10 - str r0, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_020086FC - mov r0, #5 - add r4, #0x83 - add sp, #0xb4 - strb r0, [r4] - pop {r4, r5, pc} -_0225EFAE: - ldr r0, [r0, #0x20] - mov r1, #0xc - mov r2, #0x20 - bl sub_02008274 - ldr r0, [r4, #4] - mov r1, #0xd - ldr r0, [r0, #0x20] - mov r2, #0x20 - bl sub_02008274 - ldr r0, [r4, #4] - mov r1, #0x90 - ldrsb r1, [r4, r1] - ldr r0, [r0, #0x20] - bl sub_020087C8 - add sp, #0xb4 - pop {r4, r5, pc} -_0225EFD4: - ldr r0, [r4, #8] - bl ov12_022363C4 - cmp r0, #0 - bne _0225F0B8 - mov r0, #6 - add r4, #0x83 - add sp, #0xb4 - strb r0, [r4] - pop {r4, r5, pc} -_0225EFE8: - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - bl sub_020160F4 - cmp r0, #1 - bne _0225F0B8 - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_02007C24 - cmp r0, #0 - bne _0225F0B8 - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_0223783C - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x88 - str r1, [r0, #0] - ldr r0, [r4, #8] - bl ov12_02236428 - add r0, r4, #0 - add r0, #0x92 - ldrb r0, [r0] - cmp r0, #0 - beq _0225F064 - mov r0, #5 - bl ov12_0221FCDC - str r0, [r4, #0x24] - add r0, r4, #0 - add r0, #0x81 - ldrb r1, [r0] - mov r0, #0xb - add r2, sp, #0x5c - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #0x24] - add r3, sp, #0x5c - bl ov16_02264408 - mov r0, #7 - add r4, #0x83 - add sp, #0xb4 - strb r0, [r4] - pop {r4, r5, pc} -_0225F064: - mov r0, #0xff - add r4, #0x83 - add sp, #0xb4 - strb r0, [r4] - pop {r4, r5, pc} -_0225F06E: - ldr r0, [r4, #0x24] - bl ov12_0222016C - ldr r0, [r4, #0x24] - bl ov12_02220188 - cmp r0, #0 - bne _0225F0B8 - ldr r0, [r4, #0x24] - bl ov12_02220198 - ldr r0, [r4, #0x24] - bl ov12_0221FDF4 - mov r0, #0xff - add r4, #0x83 - add sp, #0xb4 - strb r0, [r4] - pop {r4, r5, pc} -_0225F094: - mov r0, #0 - bl sub_02005454 - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x81 - add r2, #0x80 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0225F0B8: - add sp, #0xb4 - pop {r4, r5, pc} - ; .align 2, 0 -_0225F0BC: .word 0x0226F1AE - thumb_func_end ov16_0225EA80 - - thumb_func_start ov16_0225F0C0 -ov16_0225F0C0: ; 0x0225F0C0 - push {r3, r4, r5, r6, lr} - sub sp, #0x1dc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r1, r4, #0 - add r1, #0x83 - ldrb r1, [r1] - add r5, r0, #0 - cmp r1, #0xb - bls _0225F0DC - b _0225F73E -_0225F0DC: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225F0E8: ; jump table - .short _0225F100 - _0225F0E8 - 2 ; case 0 - .short _0225F21A - _0225F0E8 - 2 ; case 1 - .short _0225F266 - _0225F0E8 - 2 ; case 2 - .short _0225F2F4 - _0225F0E8 - 2 ; case 3 - .short _0225F30C - _0225F0E8 - 2 ; case 4 - .short _0225F5EA - _0225F0E8 - 2 ; case 5 - .short _0225F5FE - _0225F0E8 - 2 ; case 6 - .short _0225F672 - _0225F0E8 - 2 ; case 7 - .short _0225F696 - _0225F0E8 - 2 ; case 8 - .short _0225F672 - _0225F0E8 - 2 ; case 9 - .short _0225F6E2 - _0225F0E8 - 2 ; case 10 - .short _0225F672 - _0225F0E8 - 2 ; case 11 -_0225F100: - add r0, r4, #0 - add r0, #0x82 - ldrb r1, [r0] - ldr r0, _0225F440 ; =0x0226F174 - ldrb r0, [r0, r1] - str r0, [sp, #0x5c] - mov r0, #5 - str r0, [sp, #0x60] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #0x68] - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - str r0, [sp, #0x6c] - ldr r0, [r4, #0] - bl ov16_0223E010 - str r0, [sp, #0x78] - ldr r0, [r4, #0] - bl ov16_0223E064 - str r0, [sp, #0x7c] - mov r2, #1 - mov r1, #0 - add r0, r4, #0 - str r2, [sp, #0x70] - str r1, [sp, #0x74] - add r0, #0x94 - ldrh r0, [r0] - cmp r0, #1 - bne _0225F146 - str r2, [sp, #0x64] - b _0225F148 -_0225F146: - str r1, [sp, #0x64] -_0225F148: - add r0, sp, #0x5c - bl ov12_02237728 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_0223E000 - add r2, r4, #0 - add r3, r4, #0 - add r5, r0, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldrh r2, [r2] - ldrb r3, [r3] - add r1, sp, #0x34 - bl sub_020789BC - add r0, r4, #0 - add r0, #0x82 - ldrb r3, [r0] - mov r0, #6 - add r2, r4, #0 - add r1, r3, #0 - mul r1, r0 - ldr r0, _0225F444 ; =0x0223B0BA - add r2, #0x14 - ldrsh r0, [r0, r1] - str r0, [sp] - ldr r0, _0225F448 ; =0x0223B0BC - ldrsh r0, [r0, r1] - add r1, r5, #0 - lsl r5, r3, #2 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x85 - ldrb r0, [r0] - ldr r3, _0225F44C ; =0x0223B0A0 - str r0, [sp, #8] - mov r0, #0x90 - ldrsb r0, [r4, r0] - ldrsh r3, [r3, r5] - str r0, [sp, #0xc] - mov r0, #0x91 - ldrsb r0, [r4, r0] - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0x93 - ldrb r0, [r0] - str r0, [sp, #0x14] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #0x18] - add r0, sp, #0x34 - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [r4, #0] - bl ov16_02263B30 - ldr r1, [r4, #4] - mov r2, #0 - str r0, [r1, #0x20] - ldr r0, [r4, #4] - mov r1, #0xc - ldr r0, [r0, #0x20] - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #0xd - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #0x2c - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #6 - ldr r0, [r0, #0x20] - mov r2, #1 - bl sub_02007DEC - mov r0, #0 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - mov r1, #5 - bl ov12_02223764 - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0x1dc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F21A: - add r1, sp, #0x28 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - add r0, #0x82 - ldrb r0, [r0] - add r1, r4, #0 - add r2, r4, #0 - str r0, [sp, #0x28] - add r1, #0x81 - add r2, #0x8c - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_0223DFAC - str r0, [sp, #0x30] - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - add r1, sp, #0x28 - str r0, [sp, #0x2c] - mov r0, #5 - bl ov12_02236004 - str r0, [r4, #8] - bl ov12_02236320 - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0x1dc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F266: - ldr r0, [r4, #0xc] - bl ov12_02237890 - cmp r0, #0 - beq _0225F27A - add r0, r4, #0 - add r0, #0x94 - ldrh r0, [r0] - cmp r0, #0 - beq _0225F28E -_0225F27A: - ldr r0, [r4, #8] - bl ov12_02236374 - cmp r0, #1 - bne _0225F28E - ldr r0, [r4, #0xc] - bl ov12_02237810 - cmp r0, #1 - beq _0225F290 -_0225F28E: - b _0225F75C -_0225F290: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _0225F29A - bl ov12_02223770 -_0225F29A: - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - mov r3, #0 - lsl r1, r0, #1 - ldr r0, _0225F450 ; =0x0226F1AE - ldrh r0, [r0, r1] - mov r1, #0x10 - add r2, r1, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_020086FC - ldr r0, [r4, #4] - mov r1, #6 - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #8] - bl ov12_022363B4 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, _0225F454 ; =0x00000706 - bne _0225F2DC - mov r1, #0x75 - bl sub_02005728 - b _0225F2E4 -_0225F2DC: - mov r1, #0x74 - mvn r1, r1 - bl sub_02005728 -_0225F2E4: - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0x1dc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F2F4: - ldr r0, [r4, #0xc] - bl ov12_022377F8 - cmp r0, #1 - beq _0225F30C - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x83 - strb r1, [r0] -_0225F30C: - ldr r0, [r4, #4] - mov r1, #0xc - ldr r0, [r0, #0x20] - bl sub_020080C0 - mov r1, #1 - lsl r1, r1, #8 - cmp r0, r1 - bne _0225F328 - ldr r0, [r4, #8] - bl ov12_022363C4 - cmp r0, #0 - beq _0225F32A -_0225F328: - b _0225F470 -_0225F32A: - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, [r4, #4] - bne _0225F3A0 - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #4] - mov r1, #0x2d - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x24 - ldrh r2, [r2] - ldrb r3, [r3] - add r1, #3 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x75 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1, #3] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 - b _0225F3FE -_0225F3A0: - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x24 - ldrh r2, [r2] - ldrb r3, [r3] - add r1, #2 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x74 - mvn r1, r1 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1, #2] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 -_0225F3FE: - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x86 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r3] - ldr r2, [r2, #0x20] - bl sub_020789F4 - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - mov r2, #0 - add r3, r2, #0 - lsl r1, r0, #1 - ldr r0, _0225F450 ; =0x0226F1AE - b _0225F458 - nop -_0225F440: .word 0x0226F174 -_0225F444: .word 0x0223B0BA -_0225F448: .word 0x0223B0BC -_0225F44C: .word 0x0223B0A0 -_0225F450: .word 0x0226F1AE -_0225F454: .word 0x00000706 -_0225F458: - ldrh r0, [r0, r1] - mov r1, #0x10 - str r0, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_020086FC - mov r0, #5 - add r4, #0x83 - add sp, #0x1dc - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F470: - ldr r0, [r4, #4] - mov r1, #0xc - ldr r0, [r0, #0x20] - bl sub_020080C0 - mov r2, #1 - lsl r2, r2, #8 - cmp r0, r2 - ldr r0, [r4, #4] - bge _0225F486 - b _0225F5C4 -_0225F486: - ldr r0, [r0, #0x20] - mov r1, #0xc - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r0, #0x20] - add r2, #0xf3 - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, [r4, #4] - bne _0225F512 - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #4] - mov r1, #0x2d - ldr r0, [r0, #0x20] - mov r2, #0 - bl sub_02007DEC - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x24 - ldrh r2, [r2] - ldrb r3, [r3] - add r1, #1 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x75 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1, #1] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 - b _0225F56E -_0225F512: - ldr r0, [r0, #0x20] - mov r1, #1 - bl sub_02007B98 - add r2, r4, #0 - add r3, r4, #0 - mov r0, #0x69 - add r2, #0x86 - add r3, #0x82 - ldr r1, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldrh r2, [r2] - ldrb r3, [r3] - add r1, sp, #0x24 - bl sub_02078A4C - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - mov r1, #0x74 - mvn r1, r1 - str r1, [sp] - mov r1, #0x7f - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0x24 - ldrb r1, [r1] - add r2, r4, #0 - add r3, r4, #0 - str r1, [sp, #0x10] - add r1, r4, #0 - add r2, #0x86 - add r3, #0x97 - add r1, #0x88 - ldrh r2, [r2] - ldrb r3, [r3] - ldr r1, [r1, #0] - bl sub_02077DB4 -_0225F56E: - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x86 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x81 - ldrb r0, [r0] - str r0, [sp, #8] - mov r0, #0x69 - ldr r2, [r4, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldrh r3, [r3] - ldr r2, [r2, #0x20] - bl sub_020789F4 - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - mov r2, #0 - mov r3, #1 - lsl r1, r0, #1 - ldr r0, _0225F760 ; =0x0226F1AE - ldrh r0, [r0, r1] - mov r1, #0x10 - str r0, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_020086FC - mov r0, #5 - add r4, #0x83 - add sp, #0x1dc - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F5C4: - ldr r0, [r0, #0x20] - mov r1, #0xc - mov r2, #0x20 - bl sub_02008274 - ldr r0, [r4, #4] - mov r1, #0xd - ldr r0, [r0, #0x20] - mov r2, #0x20 - bl sub_02008274 - ldr r0, [r4, #4] - mov r1, #0x90 - ldrsb r1, [r4, r1] - ldr r0, [r0, #0x20] - bl sub_020087C8 - add sp, #0x1dc - pop {r3, r4, r5, r6, pc} -_0225F5EA: - ldr r0, [r4, #8] - bl ov12_022363C4 - cmp r0, #0 - bne _0225F61E - mov r0, #6 - add r4, #0x83 - add sp, #0x1dc - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F5FE: - ldr r0, [r4, #0] - bl ov16_0223EE28 - add r1, r4, #0 - add r1, #0x81 - ldrb r1, [r1] - bl sub_020160F4 - cmp r0, #1 - bne _0225F61E - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl sub_02007C24 - cmp r0, #0 - beq _0225F620 -_0225F61E: - b _0225F75C -_0225F620: - ldr r0, [r4, #0xc] - bl ov12_0223783C - ldr r0, [r4, #8] - bl ov12_02236428 - add r0, r4, #0 - add r0, #0x92 - ldrb r0, [r0] - cmp r0, #0 - beq _0225F668 - add r0, r4, #0 - add r0, #0x81 - ldrb r1, [r0] - mov r0, #0xb - add r2, sp, #0x184 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x184 - bl ov16_02264408 - mov r0, #7 - add r4, #0x83 - add sp, #0x1dc - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F668: - mov r0, #8 - add r4, #0x83 - add sp, #0x1dc - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F672: - bl ov12_0222016C - add r0, r5, #0 - bl ov12_02220188 - cmp r0, #0 - bne _0225F75C - add r0, r5, #0 - bl ov12_02220198 - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0x1dc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F696: - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0225F6D8 - add r0, r4, #0 - add r0, #0x81 - ldrb r1, [r0] - mov r0, #0xf - add r2, sp, #0x12c - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x12c - bl ov16_02264408 - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0x1dc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F6D8: - mov r0, #0xff - add r4, #0x83 - add sp, #0x1dc - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F6E2: - add r3, r4, #0 - add r3, #0x81 - ldrb r3, [r3] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x28 - add r2, sp, #0xdc - bl ov16_02264530 - add r0, sp, #0xdc - mov r1, #5 - bl ov12_02238390 - add r0, r4, #0 - add r0, #0x81 - ldrb r1, [r0] - mov r0, #0x10 - add r2, sp, #0x84 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x84 - bl ov16_02264408 - mov r0, #0x1a - ldr r1, [r4, #4] - mov r2, #1 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - add r0, #0x83 - ldrb r0, [r0] - add r4, #0x83 - add sp, #0x1dc - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_0225F73E: - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x81 - add r2, #0x80 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0225F75C: - add sp, #0x1dc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0225F760: .word 0x0226F1AE - thumb_func_end ov16_0225F0C0 - - thumb_func_start ov16_0225F764 -ov16_0225F764: ; 0x0225F764 - push {r4, r5, r6, lr} - sub sp, #0x178 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r1, r4, #0 - add r1, #0x6b - ldrb r1, [r1] - add r5, r0, #0 - cmp r1, #8 - bhi _0225F84E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225F78A: ; jump table - .short _0225F79C - _0225F78A - 2 ; case 0 - .short _0225F840 - _0225F78A - 2 ; case 1 - .short _0225F7E4 - _0225F78A - 2 ; case 2 - .short _0225F840 - _0225F78A - 2 ; case 3 - .short _0225F866 - _0225F78A - 2 ; case 4 - .short _0225F958 - _0225F78A - 2 ; case 5 - .short _0225F972 - _0225F78A - 2 ; case 6 - .short _0225F9B2 - _0225F78A - 2 ; case 7 - .short _0225F9CC - _0225F78A - 2 ; case 8 -_0225F79C: - ldr r0, [r4, #0x70] - cmp r0, #0 - beq _0225F7DA - add r0, r4, #0 - add r0, #0x69 - ldrb r1, [r0] - mov r0, #0xf - add r2, sp, #0x120 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x120 - bl ov16_02264408 - add r0, r4, #0 - add r0, #0x6b - ldrb r0, [r0] - add r4, #0x6b - add sp, #0x178 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F7DA: - mov r0, #4 - add r4, #0x6b - add sp, #0x178 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F7E4: - add r3, r4, #0 - add r3, #0x69 - ldrb r3, [r3] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x10 - add r2, sp, #0xd0 - bl ov16_02264530 - add r0, sp, #0xd0 - mov r1, #5 - bl ov12_022382BC - add r0, r4, #0 - add r0, #0x69 - ldrb r1, [r0] - mov r0, #0x10 - add r2, sp, #0x78 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x78 - bl ov16_02264408 - mov r0, #0x1a - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - add r0, #0x6b - ldrb r0, [r0] - add r4, #0x6b - add sp, #0x178 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F840: - bl ov12_0222016C - add r0, r5, #0 - bl ov12_02220188 - cmp r0, #0 - beq _0225F850 -_0225F84E: - b _0225F9EA -_0225F850: - add r0, r5, #0 - bl ov12_02220198 - add r0, r4, #0 - add r0, #0x6b - ldrb r0, [r0] - add r4, #0x6b - add sp, #0x178 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F866: - add r0, r4, #0 - add r0, #0x6a - ldrb r5, [r0] - mov r0, #1 - tst r0, r5 - beq _0225F8AE - ldr r0, _0225F9F0 ; =0x0226F174 - ldrb r0, [r0, r5] - str r0, [sp, #0x50] - mov r0, #5 - str r0, [sp, #0x54] - str r0, [sp, #0x58] - add r0, r4, #0 - add r0, #0x69 - ldrb r0, [r0] - str r0, [sp, #0x5c] - add r0, r4, #0 - add r0, #0x6e - ldrh r0, [r0] - str r0, [sp, #0x60] - ldr r0, [r4, #0] - bl ov16_0223E010 - str r0, [sp, #0x6c] - ldr r0, [r4, #0] - bl ov16_0223E064 - str r0, [sp, #0x70] - mov r0, #1 - str r0, [sp, #0x64] - mov r0, #0 - str r0, [sp, #0x68] - add r0, sp, #0x50 - bl ov12_02237728 - b _0225F8FA -_0225F8AE: - ldr r3, _0225F9F4 ; =0x0226F17C - add r2, sp, #0x10 - add r6, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - lsl r0, r5, #2 - ldr r0, [r6, r0] - str r0, [sp, #0x28] - mov r0, #5 - str r0, [sp, #0x2c] - str r0, [sp, #0x30] - add r0, r4, #0 - add r0, #0x69 - ldrb r0, [r0] - str r0, [sp, #0x34] - add r0, r4, #0 - add r0, #0x6e - ldrh r0, [r0] - str r0, [sp, #0x38] - ldr r0, [r4, #0] - bl ov16_0223E010 - str r0, [sp, #0x44] - ldr r0, [r4, #0] - bl ov16_0223E064 - str r0, [sp, #0x48] - mov r0, #1 - str r0, [sp, #0x3c] - mov r0, #0 - str r0, [sp, #0x40] - add r0, sp, #0x28 - bl ov12_02237728 -_0225F8FA: - str r0, [r4, #0xc] - add r0, r4, #0 - mov r1, #5 - add r0, #0x6b - strb r1, [r0] - add r0, r4, #0 - add r0, #0x6e - ldrh r0, [r0] - mov r2, #0x10 - lsl r1, r0, #1 - ldr r0, _0225F9F8 ; =0x0226F1AE - ldrh r0, [r0, r1] - mov r1, #0 - add r3, r1, #0 - str r0, [sp] - ldr r0, [r4, #8] - bl sub_020086FC - add r4, #0x6a - ldrb r0, [r4] - cmp r0, #5 - bhi _0225F9EA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225F932: ; jump table - .short _0225F93E - _0225F932 - 2 ; case 0 - .short _0225F94C - _0225F932 - 2 ; case 1 - .short _0225F93E - _0225F932 - 2 ; case 2 - .short _0225F94C - _0225F932 - 2 ; case 3 - .short _0225F93E - _0225F932 - 2 ; case 4 - .short _0225F94C - _0225F932 - 2 ; case 5 -_0225F93E: - mov r1, #0x74 - ldr r0, _0225F9FC ; =0x00000706 - mvn r1, r1 - bl sub_02005728 - add sp, #0x178 - pop {r4, r5, r6, pc} -_0225F94C: - ldr r0, _0225F9FC ; =0x00000706 - mov r1, #0x75 - bl sub_02005728 - add sp, #0x178 - pop {r4, r5, r6, pc} -_0225F958: - ldr r0, [r4, #8] - bl sub_020087B4 - cmp r0, #0 - bne _0225F9EA - add r0, r4, #0 - add r0, #0x6b - ldrb r0, [r0] - add r4, #0x6b - add sp, #0x178 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F972: - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #8] - sub r2, #0x2c - bl sub_02008274 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #8] - sub r2, #0x2d - bl sub_02008274 - add r1, r4, #0 - add r1, #0x6c - ldrb r1, [r1] - ldr r0, [r4, #8] - bl sub_020087C8 - ldr r0, [r4, #8] - mov r1, #0xc - bl sub_020080C0 - cmp r0, #0 - bgt _0225F9EA - ldr r0, [r4, #8] - bl sub_02007DC8 - mov r0, #7 - add r4, #0x6b - add sp, #0x178 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F9B2: - ldr r0, [r4, #0xc] - bl ov12_022377F8 - cmp r0, #0 - bne _0225F9EA - ldr r0, [r4, #0xc] - bl ov12_0223783C - mov r0, #8 - add r4, #0x6b - add sp, #0x178 - strb r0, [r4] - pop {r4, r5, r6, pc} -_0225F9CC: - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x69 - add r2, #0x68 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0225F9EA: - add sp, #0x178 - pop {r4, r5, r6, pc} - nop -_0225F9F0: .word 0x0226F174 -_0225F9F4: .word 0x0226F17C -_0225F9F8: .word 0x0226F1AE -_0225F9FC: .word 0x00000706 - thumb_func_end ov16_0225F764 - - thumb_func_start ov16_0225FA00 -ov16_0225FA00: ; 0x0225FA00 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xb] - cmp r0, #0 - beq _0225FA12 - cmp r0, #1 - beq _0225FA58 - pop {r3, r4, r5, pc} -_0225FA12: - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, #4] - sub r2, #0x2c - bl sub_02008274 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #4] - sub r2, #0x2d - bl sub_02008274 - ldrb r0, [r4, #0xc] - cmp r0, #0 - beq _0225FA3E - sub r0, r0, #1 - strb r0, [r4, #0xc] - mov r1, #1 - ldr r0, [r4, #4] - sub r2, r1, #2 - bl sub_02008274 -_0225FA3E: - ldr r0, [r4, #4] - mov r1, #0xc - bl sub_020080C0 - cmp r0, #0 - bgt _0225FA6E - ldr r0, [r4, #4] - bl sub_02007DC8 - ldrb r0, [r4, #0xb] - add r0, r0, #1 - strb r0, [r4, #0xb] - pop {r3, r4, r5, pc} -_0225FA58: - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0225FA6E: - pop {r3, r4, r5, pc} - thumb_func_end ov16_0225FA00 - - thumb_func_start ov16_0225FA70 -ov16_0225FA70: ; 0x0225FA70 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF0C - add r5, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0x21 - bge _0225FAAC - ldrb r0, [r4, #0xe] - cmp r0, #2 - blo _0225FAAC - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0225FA96 - cmp r0, #2 - bne _0225FAAC -_0225FA96: - ldr r0, [r4, #0] - bl ov16_0223DF00 - mov r1, #3 - mov r2, #1 - mov r3, #4 - bl sub_02019184 - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] -_0225FAAC: - ldrb r0, [r4, #0xe] - cmp r0, #4 - bls _0225FAB4 - b _0225FD58 -_0225FAB4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225FAC0: ; jump table - .short _0225FACA - _0225FAC0 - 2 ; case 0 - .short _0225FAEC - _0225FAC0 - 2 ; case 1 - .short _0225FAF8 - _0225FAC0 - 2 ; case 2 - .short _0225FD28 - _0225FAC0 - 2 ; case 3 - .short _0225FD42 - _0225FAC0 - 2 ; case 4 -_0225FACA: - ldr r0, [r4, #8] - bl sub_0200D358 - cmp r0, #2 - bls _0225FAE4 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_0200D3CC - ldr r0, [r4, #8] - mov r1, #2 - bl sub_0200D364 -_0225FAE4: - mov r0, #0x1c - str r0, [r4, #0x18] - mov r0, #1 - strb r0, [r4, #0xe] -_0225FAEC: - ldr r0, [r4, #0x18] - sub r0, r0, #1 - str r0, [r4, #0x18] - bne _0225FBE2 - mov r0, #2 - strb r0, [r4, #0xe] -_0225FAF8: - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - add r1, sp, #0 - ldr r0, [r4, #8] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - ldrb r0, [r4, #0xf] - cmp r0, #2 - ldr r0, [r4, #0x14] - beq _0225FB1C - b _0225FC36 -_0225FB1C: - cmp r0, #1 - beq _0225FB24 - cmp r0, #3 - bne _0225FB46 -_0225FB24: - add r1, sp, #0 - mov r0, #6 - ldrsh r0, [r1, r0] - cmp r0, #0xc0 - ldr r0, [r4, #4] - bge _0225FB3C - ldr r0, [r0, #0] - mov r1, #8 - mov r2, #0 - bl sub_0200D5DC - b _0225FB46 -_0225FB3C: - ldr r0, [r0, #0] - mov r1, #0xc0 - mov r2, #0x58 - bl sub_0200D4C4 -_0225FB46: - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - ldr r0, [r4, #0x14] - cmp r0, #1 - beq _0225FB6A - cmp r0, #3 - bne _0225FB7C - cmp r5, #3 - beq _0225FB6A - cmp r5, #0x83 - beq _0225FB6A - cmp r5, #7 - bne _0225FB7C -_0225FB6A: - add r3, sp, #0 - mov r1, #6 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_0200D4C4 - b _0225FBC8 -_0225FB7C: - cmp r0, #3 - bne _0225FBA6 - add r2, sp, #0 - mov r0, #2 - mov r1, #6 - ldrsh r3, [r2, r0] - ldrsh r0, [r2, r1] - sub r0, r3, r0 - strh r0, [r2, #6] - ldrsh r0, [r2, r1] - sub r0, #0x18 - strh r0, [r2, #6] - ldrsh r1, [r2, r1] - ldr r0, [r4, #8] - mov r2, #0 - neg r1, r1 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - bl sub_0200D5DC - b _0225FBC8 -_0225FBA6: - cmp r0, #5 - bne _0225FBC8 - add r2, sp, #0 - mov r1, #6 - mov r0, #2 - ldrsh r3, [r2, r1] - ldrsh r0, [r2, r0] - sub r0, r3, r0 - strh r0, [r2, #6] - ldrsh r0, [r2, r1] - sub r0, #0x10 - strh r0, [r2, #6] - ldrsh r1, [r2, r1] - ldr r0, [r4, #8] - mov r2, #0 - bl sub_0200D5DC -_0225FBC8: - add r1, sp, #0 - ldr r0, [r4, #8] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - mov r0, #0x10 - ldrsh r1, [r4, r0] - add r3, sp, #0 - mov r0, #2 - ldrsh r0, [r3, r0] - cmp r0, r1 - bge _0225FBE4 -_0225FBE2: - b _0225FD58 -_0225FBE4: - mov r2, #0 - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_0200D4C4 - ldr r0, [r4, #0x14] - cmp r0, #1 - beq _0225FBF8 - cmp r0, #3 - bne _0225FC04 -_0225FBF8: - ldr r0, [r4, #4] - mov r1, #0xc0 - ldr r0, [r0, #0] - mov r2, #0x58 - bl sub_0200D4C4 -_0225FC04: - ldr r0, [r4, #8] - bl sub_0200D358 - cmp r0, #1 - bls _0225FC2E - ldr r0, [r4, #8] - mov r1, #0 - bl sub_0200D3CC - ldr r0, [r4, #8] - mov r1, #1 - bl sub_0200D364 - ldrh r1, [r4, #0x12] - mov r0, #1 - add sp, #8 - bic r1, r0 - strh r1, [r4, #0x12] - mov r0, #3 - strb r0, [r4, #0xe] - pop {r4, r5, r6, pc} -_0225FC2E: - mov r0, #4 - add sp, #8 - strb r0, [r4, #0xe] - pop {r4, r5, r6, pc} -_0225FC36: - cmp r0, #0 - beq _0225FC3E - cmp r0, #2 - bne _0225FC60 -_0225FC3E: - add r0, sp, #0 - mov r1, #6 - ldrsh r0, [r0, r1] - cmp r0, #0x40 - ldr r0, [r4, #4] - ble _0225FC56 - ldr r0, [r0, #0] - sub r1, #0xe - mov r2, #0 - bl sub_0200D5DC - b _0225FC60 -_0225FC56: - ldr r0, [r0, #0] - mov r1, #0x40 - mov r2, #0x88 - bl sub_0200D4C4 -_0225FC60: - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0225FC88 - cmp r0, #2 - bne _0225FC9A - cmp r5, #3 - beq _0225FC88 - cmp r5, #0x83 - beq _0225FC88 - cmp r5, #0x13 - beq _0225FC88 - cmp r5, #7 - bne _0225FC9A -_0225FC88: - add r3, sp, #0 - mov r1, #6 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_0200D4C4 - b _0225FCE6 -_0225FC9A: - cmp r0, #2 - bne _0225FCBE - add r2, sp, #0 - mov r1, #6 - mov r0, #2 - ldrsh r3, [r2, r1] - ldrsh r0, [r2, r0] - sub r0, r3, r0 - strh r0, [r2, #6] - ldrsh r0, [r2, r1] - sub r0, #0x18 - strh r0, [r2, #6] - ldrsh r1, [r2, r1] - ldr r0, [r4, #8] - mov r2, #0 - bl sub_0200D5DC - b _0225FCE6 -_0225FCBE: - cmp r0, #4 - bne _0225FCE6 - add r2, sp, #0 - mov r0, #2 - mov r1, #6 - ldrsh r3, [r2, r0] - ldrsh r0, [r2, r1] - sub r0, r3, r0 - strh r0, [r2, #6] - ldrsh r0, [r2, r1] - sub r0, #0x10 - strh r0, [r2, #6] - ldrsh r1, [r2, r1] - ldr r0, [r4, #8] - mov r2, #0 - neg r1, r1 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - bl sub_0200D5DC -_0225FCE6: - add r1, sp, #0 - ldr r0, [r4, #8] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - mov r0, #0x10 - ldrsh r1, [r4, r0] - add r3, sp, #0 - mov r0, #2 - ldrsh r0, [r3, r0] - cmp r0, r1 - bgt _0225FD58 - mov r2, #0 - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_0200D4C4 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0225FD14 - cmp r0, #2 - bne _0225FD20 -_0225FD14: - ldr r0, [r4, #4] - mov r1, #0x40 - ldr r0, [r0, #0] - mov r2, #0x88 - bl sub_0200D4C4 -_0225FD20: - mov r0, #4 - add sp, #8 - strb r0, [r4, #0xe] - pop {r4, r5, r6, pc} -_0225FD28: - ldr r0, [r4, #8] - bl sub_0200D3B8 - cmp r0, #1 - bne _0225FD3E - ldr r1, [r4, #8] - add r0, r4, #0 - bl ov16_02264650 - cmp r0, #0 - beq _0225FD58 -_0225FD3E: - mov r0, #4 - strb r0, [r4, #0xe] -_0225FD42: - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0225FD58: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0225FA70 - - thumb_func_start ov16_0225FD5C -ov16_0225FD5C: ; 0x0225FD5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x120 - ldr r3, _0225FFE4 ; =0x0226F22C - add r4, r1, #0 - add r5, r0, #0 - add r2, sp, #0x30 - mov r1, #0x78 -_0225FD6A: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _0225FD6A - ldr r0, [r4, #0] - bl ov16_0223DF0C - add r6, r0, #0 - ldrb r0, [r4, #0xa] - cmp r0, #6 - bls _0225FD86 - b _02260266 -_0225FD86: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225FD92: ; jump table - .short _0225FDA0 - _0225FD92 - 2 ; case 0 - .short _0225FE7A - _0225FD92 - 2 ; case 1 - .short _0225FF9E - _0225FD92 - 2 ; case 2 - .short _02260158 - _0225FD92 - 2 ; case 3 - .short _0226020A - _0225FD92 - 2 ; case 4 - .short _02260228 - _0225FD92 - 2 ; case 5 - .short _02260250 - _0225FD92 - 2 ; case 6 -_0225FDA0: - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0225FDAE - mov r0, #1 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_0225FDAE: - cmp r0, #4 - bhi _0225FDC8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225FDBE: ; jump table - .short _0225FDC8 - _0225FDBE - 2 ; case 0 - .short _0225FDC8 - _0225FDBE - 2 ; case 1 - .short _0225FDD6 - _0225FDBE - 2 ; case 2 - .short _0225FDE4 - _0225FDBE - 2 ; case 3 - .short _0225FDF2 - _0225FDBE - 2 ; case 4 -_0225FDC8: - mov r0, #0xf - str r0, [sp, #8] - mov r0, #3 - str r0, [r4, #0x18] - mov r0, #5 - str r0, [sp, #0x18] - b _0225FE00 -_0225FDD6: - mov r0, #0xc - str r0, [sp, #8] - mov r0, #0 - str r0, [r4, #0x18] - ldr r0, _0225FFE8 ; =0x00000111 - str r0, [sp, #0x18] - b _0225FE00 -_0225FDE4: - mov r0, #0xd - str r0, [sp, #8] - mov r0, #0 - str r0, [r4, #0x18] - ldr r0, _0225FFEC ; =0x00000112 - str r0, [sp, #0x18] - b _0225FE00 -_0225FDF2: - mov r0, #0xf - str r0, [sp, #8] - mov r0, #3 - str r0, [r4, #0x18] - mov r0, #0x11 - lsl r0, r0, #4 - str r0, [sp, #0x18] -_0225FE00: - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - ldrb r0, [r4, #9] - str r0, [sp, #0x14] - ldr r0, [r4, #0] - bl ov16_0223E010 - str r0, [sp, #0x24] - ldr r0, [r4, #0] - bl ov16_0223E064 - str r0, [sp, #0x28] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [r4, #0] - str r0, [sp, #0x2c] - add r0, sp, #8 - bl ov12_02237728 - ldr r1, [r4, #4] - add r1, #0x88 - str r0, [r1, #0] - ldr r0, [r4, #4] - mov r1, #0x64 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E34 - ldr r0, [r4, #4] - mov r1, #2 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E40 - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E30 - ldr r0, [r4, #4] - mov r1, #0 - ldr r0, [r0, #0x18] - bl sub_0200D3CC - ldr r0, [r4, #4] - mov r1, #1 - ldr r0, [r0, #0x18] - bl sub_0200D364 - ldr r0, [r4, #4] - mov r1, #1 - ldr r0, [r0, #0x18] - bl sub_0200D390 - mov r0, #3 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_0225FE7A: - ldrb r0, [r4, #0xb] - cmp r0, #2 - ldr r0, [r4, #4] - bne _0225FF7A - ldr r0, [r0, #0x18] - mov r1, #5 - mov r2, #0 - bl sub_0200D5DC - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0x18] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - add r1, sp, #4 - mov r0, #2 - ldrsh r0, [r1, r0] - cmp r0, #0xa0 - blt _0225FF0C - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237890 - cmp r0, #0 - beq _0225FF0C - ldr r0, [r4, #4] - mov r1, #1 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E0C - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_0223786C - mov r0, #2 - tst r0, r6 - beq _0225FF1A - mov r0, #8 - tst r0, r6 - bne _0225FF1A - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF14 - add r4, r0, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #1 - bl ov12_02237E0C - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0 - bl ov12_0223786C - add r4, #0x88 - ldr r0, [r4, #0] - mov r1, #0xc - bl ov12_02237E4C - add sp, #0x120 - pop {r3, r4, r5, r6, r7, pc} -_0225FF0C: - add r1, sp, #4 - mov r0, #2 - ldrsh r1, [r1, r0] - mov r0, #0x4a - lsl r0, r0, #2 - cmp r1, r0 - bge _0225FF1C -_0225FF1A: - b _02260266 -_0225FF1C: - ldr r0, [r4, #0] - bl ov16_0223E018 - add r5, r0, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #0x18] - bl sub_0200D0F4 - ldr r0, [r4, #4] - mov r1, #0 - str r1, [r0, #0x18] - ldr r2, [r4, #4] - ldr r1, _0225FFF0 ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _0225FFF4 ; =0x00004E2F - add r1, r2, r1 - bl sub_0200D070 - ldr r2, [r4, #4] - ldr r1, _0225FFF0 ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _0225FFF8 ; =0x00004E2A - add r1, r2, r1 - bl sub_0200D080 - ldr r2, [r4, #4] - ldr r1, _0225FFF0 ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _0225FFFC ; =0x00004E27 - add r1, r2, r1 - bl sub_0200D090 - ldr r2, [r4, #4] - ldr r1, _0225FFF0 ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _0225FFFC ; =0x00004E27 - add r1, r2, r1 - bl sub_0200D0A0 - mov r0, #6 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_0225FF7A: - ldr r0, [r0, #0x18] - mov r1, #0 - bl sub_0200D3CC - ldr r0, [r4, #4] - mov r1, #1 - ldr r0, [r0, #0x18] - bl sub_0200D364 - ldr r0, [r4, #4] - mov r1, #1 - ldr r0, [r0, #0x18] - bl sub_0200D390 - mov r0, #2 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_0225FF9E: - ldr r0, [r4, #4] - mov r1, #4 - ldr r0, [r0, #0x18] - mvn r1, r1 - mov r2, #0 - bl sub_0200D5DC - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0x18] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - ldr r1, [r4, #4] - add r0, r1, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0225FFC8 - b _022600EC -_0225FFC8: - ldr r0, [r1, #0x18] - bl sub_0200D3E0 - ldr r1, [r4, #0xc] - str r0, [sp] - lsl r5, r0, #2 - mov r0, #0x18 - add r2, r1, #0 - mul r2, r0 - add r0, sp, #0x30 - add r0, r0, r2 - ldrsh r1, [r5, r0] - ldr r0, _02260000 ; =0x00007FFF - b _02260004 - ; .align 2, 0 -_0225FFE4: .word 0x0226F22C -_0225FFE8: .word 0x00000111 -_0225FFEC: .word 0x00000112 -_0225FFF0: .word 0x00000195 -_0225FFF4: .word 0x00004E2F -_0225FFF8: .word 0x00004E2A -_0225FFFC: .word 0x00004E27 -_02260000: .word 0x00007FFF -_02260004: - cmp r1, r0 - beq _022600EC - ldr r0, [r4, #4] - mov r1, #1 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E0C - ldr r1, [r4, #0xc] - mov r0, #0x18 - add r3, r1, #0 - mul r3, r0 - add r2, sp, #0x30 - add r2, r2, r3 - add r7, sp, #4 - mov r1, #2 - ldrsh r1, [r7, r1] - ldrsh r2, [r5, r2] - ldr r0, [r4, #4] - add r1, r1, r2 - mov r2, #0 - ldrsh r7, [r7, r2] - add r2, sp, #0x30 - add r2, #2 - add r2, r2, r3 - ldrsh r2, [r5, r2] - add r0, #0x88 - lsl r1, r1, #0x10 - add r2, r7, r2 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov12_02237E18 - ldr r0, [sp] - cmp r0, #3 - bne _022600EC - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237890 - cmp r0, #0 - beq _022600EC - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_0223786C - ldr r0, [r4, #4] - mov r1, #1 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E30 - mov r0, #2 - tst r0, r6 - beq _022600EC - mov r0, #8 - tst r0, r6 - bne _022600EC - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r1, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF14 - ldr r1, [r4, #0xc] - add r6, r0, #0 - add r3, r1, #0 - mov r0, #0x18 - mul r3, r0 - add r2, sp, #0x30 - add r2, r2, r3 - add r0, r6, #0 - add r0, #0x88 - add r7, sp, #4 - mov r1, #2 - ldrsh r1, [r7, r1] - ldrsh r2, [r5, r2] - ldr r0, [r0, #0] - add r1, r1, r2 - mov r2, #0 - ldrsh r7, [r7, r2] - add r2, sp, #0x30 - add r2, #2 - add r2, r2, r3 - ldrsh r2, [r5, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r7, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl ov12_02237E18 - add r0, r6, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #1 - bl ov12_02237E0C - add r0, r6, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0 - bl ov12_0223786C - add r6, #0x88 - ldr r0, [r6, #0] - mov r1, #1 - bl ov12_02237E30 -_022600EC: - add r1, sp, #4 - mov r0, #2 - ldrsh r1, [r1, r0] - sub r0, #0x2a - cmp r1, r0 - ble _022600FA - b _02260266 -_022600FA: - ldr r0, [r4, #0] - bl ov16_0223E018 - add r5, r0, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #0x18] - bl sub_0200D0F4 - ldr r0, [r4, #4] - mov r1, #0 - str r1, [r0, #0x18] - ldr r2, [r4, #4] - ldr r1, _0226026C ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _02260270 ; =0x00004E2F - add r1, r2, r1 - bl sub_0200D070 - ldr r2, [r4, #4] - ldr r1, _0226026C ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _02260274 ; =0x00004E2A - add r1, r2, r1 - bl sub_0200D080 - ldr r2, [r4, #4] - ldr r1, _0226026C ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _02260278 ; =0x00004E27 - add r1, r2, r1 - bl sub_0200D090 - ldr r2, [r4, #4] - ldr r1, _0226026C ; =0x00000195 - add r0, r5, #0 - ldrb r2, [r2, r1] - ldr r1, _02260278 ; =0x00004E27 - add r1, r2, r1 - bl sub_0200D0A0 - mov r0, #6 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260158: - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0x18] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - ldr r0, [r4, #4] - ldr r0, [r0, #0x18] - bl sub_0200D3E0 - add r7, r0, #0 - cmp r7, #4 - bne _02260180 - mov r0, #8 - str r0, [r4, #0x14] - mov r0, #4 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260180: - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02260266 - ldr r2, [r4, #0xc] - mov r1, #0x18 - add r5, r2, #0 - mul r5, r1 - add r1, sp, #0x30 - lsl r6, r7, #2 - add r1, r1, r5 - ldrsh r1, [r6, r1] - ldr r2, _0226027C ; =0x00007FFF - cmp r1, r2 - beq _02260266 - add r3, sp, #4 - mov r2, #2 - ldrsh r2, [r3, r2] - add r1, r2, r1 - mov r2, #0 - ldrsh r3, [r3, r2] - add r2, sp, #0x30 - add r2, #2 - add r2, r2, r5 - ldrsh r2, [r6, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl ov12_02237E18 - cmp r7, #3 - bne _02260266 - ldr r0, [r4, #4] - ldr r5, [r4, #0x18] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237890 - cmp r5, r0 - beq _02260266 - ldr r0, [r4, #4] - add r1, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_0223786C - ldr r0, [r4, #4] - mov r1, #1 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E40 - ldr r0, [r4, #4] - mov r1, #1 - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_02237E30 - ldr r0, [r4, #0x18] - cmp r0, #3 - beq _02260266 - ldr r0, _02260280 ; =0x0000070A - bl sub_02005748 - add sp, #0x120 - pop {r3, r4, r5, r6, r7, pc} -_0226020A: - ldr r0, [r4, #0x14] - sub r0, r0, #1 - str r0, [r4, #0x14] - bne _02260266 - ldr r0, [r4, #0x18] - cmp r0, #3 - bne _02260220 - mov r0, #6 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260220: - mov r0, #5 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260228: - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_022377F8 - cmp r0, #1 - beq _02260266 - ldr r0, [r4, #4] - add r0, #0x88 - ldr r0, [r0, #0] - bl ov12_0223783C - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x88 - str r1, [r0, #0] - mov r0, #6 - add sp, #0x120 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260250: - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02260266: - add sp, #0x120 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226026C: .word 0x00000195 -_02260270: .word 0x00004E2F -_02260274: .word 0x00004E2A -_02260278: .word 0x00004E27 -_0226027C: .word 0x00007FFF -_02260280: .word 0x0000070A - thumb_func_end ov16_0225FD5C - - thumb_func_start ov16_02260284 -ov16_02260284: ; 0x02260284 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r6, r0, #0 - ldrb r0, [r5, #0xa] - cmp r0, #0 - beq _0226029A - cmp r0, #1 - beq _02260302 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0226029A: - ldrb r0, [r5, #0xb] - cmp r0, #2 - ldr r0, [r5, #4] - bne _022602D2 - ldr r0, [r0, #0x18] - mov r1, #5 - mov r2, #0 - bl sub_0200D5DC - ldr r0, [r5, #4] - add r1, sp, #0 - ldr r0, [r0, #0x18] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r1, [r1, r0] - mov r0, #0x4a - lsl r0, r0, #2 - cmp r1, r0 - blt _0226036E - ldrb r0, [r5, #0xa] - add sp, #4 - add r0, r0, #1 - strb r0, [r5, #0xa] - pop {r3, r4, r5, r6, pc} -_022602D2: - mov r1, #4 - ldr r0, [r0, #0x18] - mvn r1, r1 - mov r2, #0 - bl sub_0200D5DC - ldr r0, [r5, #4] - add r1, sp, #0 - ldr r0, [r0, #0x18] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r1, [r1, r0] - sub r0, #0x2a - cmp r1, r0 - bgt _0226036E - ldrb r0, [r5, #0xa] - add sp, #4 - add r0, r0, #1 - strb r0, [r5, #0xa] - pop {r3, r4, r5, r6, pc} -_02260302: - ldr r0, [r5, #0] - bl ov16_0223E018 - add r4, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0x18] - bl sub_0200D0F4 - ldr r0, [r5, #4] - mov r1, #0 - str r1, [r0, #0x18] - ldr r2, [r5, #4] - ldr r1, _02260374 ; =0x00000195 - add r0, r4, #0 - ldrb r2, [r2, r1] - ldr r1, _02260378 ; =0x00004E2F - add r1, r2, r1 - bl sub_0200D070 - ldr r2, [r5, #4] - ldr r1, _02260374 ; =0x00000195 - add r0, r4, #0 - ldrb r2, [r2, r1] - ldr r1, _0226037C ; =0x00004E2A - add r1, r2, r1 - bl sub_0200D080 - ldr r2, [r5, #4] - ldr r1, _02260374 ; =0x00000195 - add r0, r4, #0 - ldrb r2, [r2, r1] - ldr r1, _02260380 ; =0x00004E27 - add r1, r2, r1 - bl sub_0200D090 - ldr r2, [r5, #4] - ldr r1, _02260374 ; =0x00000195 - add r0, r4, #0 - ldrb r2, [r2, r1] - ldr r1, _02260380 ; =0x00004E27 - add r1, r2, r1 - bl sub_0200D0A0 - ldrb r1, [r5, #9] - ldrb r2, [r5, #8] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0226036E: - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02260374: .word 0x00000195 -_02260378: .word 0x00004E2F -_0226037C: .word 0x00004E2A -_02260380: .word 0x00004E27 - thumb_func_end ov16_02260284 - - thumb_func_start ov16_02260384 -ov16_02260384: ; 0x02260384 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xa] - cmp r0, #0 - beq _02260396 - cmp r0, #1 - beq _022603F2 - pop {r3, r4, r5, pc} -_02260396: - add r1, sp, #0 - ldr r0, [r4, #4] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - ldrb r0, [r4, #0xb] - add r2, sp, #0 - cmp r0, #0 - bne _022603C6 - mov r1, #2 - ldrsh r0, [r2, r1] - add r0, r0, #5 - strh r0, [r2, #2] - mov r0, #0xc - ldrsh r3, [r4, r0] - ldrsh r0, [r2, r1] - cmp r0, r3 - blt _022603E0 - strh r3, [r2, #2] - ldrb r0, [r4, #0xa] - add r0, r0, #1 - strb r0, [r4, #0xa] - b _022603E0 -_022603C6: - mov r1, #2 - ldrsh r0, [r2, r1] - sub r0, r0, #5 - strh r0, [r2, #2] - mov r0, #0xc - ldrsh r3, [r4, r0] - ldrsh r0, [r2, r1] - cmp r0, r3 - bgt _022603E0 - strh r3, [r2, #2] - ldrb r0, [r4, #0xa] - add r0, r0, #1 - strb r0, [r4, #0xa] -_022603E0: - add r3, sp, #0 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #4] - bl sub_0200D4C4 - pop {r3, r4, r5, pc} -_022603F2: - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02260384 - - thumb_func_start ov16_0226040C -ov16_0226040C: ; 0x0226040C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #0 - beq _0226041E - cmp r1, #1 - beq _0226044E - b _02260462 -_0226041E: - add r0, r4, #0 - add r0, #0x4d - ldrb r0, [r0] - cmp r0, #0 - beq _02260436 - add r0, r4, #0 - add r0, #0x4d - ldrb r0, [r0] - add r4, #0x4d - sub r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02260436: - add r0, r4, #0 - mov r1, #0 - bl ov16_022676A8 - add r0, r4, #0 - mov r1, #1 - bl ov16_02267620 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0226044E: - add r0, r4, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0226047E - add r0, r1, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02260462: - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x24 - add r2, #0x4c - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0xc] - bl ov16_02266ABC - mov r0, #0 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_0200DA58 -_0226047E: - pop {r3, r4, r5, pc} - thumb_func_end ov16_0226040C - - thumb_func_start ov16_02260480 -ov16_02260480: ; 0x02260480 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, #0 - bne _022604A0 - add r0, r4, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _022604C4 - add r0, r1, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_022604A0: - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x24 - add r2, #0x4c - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0xc] - bl ov16_02266ABC - mov r0, #0 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - mov r1, #0 - bl ov16_02267620 -_022604C4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02260480 - - thumb_func_start ov16_022604C8 -ov16_022604C8: ; 0x022604C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r0, [r4, #0] - bl ov16_0223E02C - add r6, r0, #0 - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223DF14 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - bl ov16_0223DF0C - add r5, r0, #0 - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r1, r0, #0 - ldrb r0, [r4, #9] - cmp r1, r0 - beq _0226050A - ldr r0, [r4, #0] - bl ov16_0223F35C - str r0, [sp, #8] - b _0226050E -_0226050A: - mov r0, #0 - str r0, [sp, #8] -_0226050E: - ldrb r0, [r4, #0xa] - cmp r0, #8 - bls _02260516 - b _02260AB0 -_02260516: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02260522: ; jump table - .short _02260534 - _02260522 - 2 ; case 0 - .short _02260570 - _02260522 - 2 ; case 1 - .short _0226065E - _02260522 - 2 ; case 2 - .short _02260674 - _02260522 - 2 ; case 3 - .short _02260686 - _02260522 - 2 ; case 4 - .short _02260880 - _02260522 - 2 ; case 5 - .short _022608F0 - _02260522 - 2 ; case 6 - .short _02260A24 - _02260522 - 2 ; case 7 - .short _02260A86 - _02260522 - 2 ; case 8 -_02260534: - mov r0, #0 - add r1, r4, #0 - add r2, sp, #0x40 -_0226053A: - ldrh r3, [r1, #0x24] - add r1, r1, #2 - strh r3, [r2] - add r3, r4, r0 - add r3, #0x2c - ldrb r3, [r3] - strh r3, [r2, #8] - add r3, r4, r0 - add r3, #0x30 - ldrb r3, [r3] - add r0, r0, #1 - strh r3, [r2, #0x10] - add r2, r2, #2 - cmp r0, #4 - blt _0226053A - ldr r0, [r4, #0] - bl ov16_0223E02C - add r1, r4, #0 - add r1, #0x34 - ldrb r1, [r1] - add r2, sp, #0x40 - bl ov16_0226AC98 - ldrb r0, [r4, #0xa] - add r0, r0, #1 - strb r0, [r4, #0xa] -_02260570: - ldr r0, [r4, #0] - bl ov16_0223E05C - add r6, r0, #0 - mov r0, #1 - lsl r0, r0, #0xa - add r1, r5, #0 - tst r1, r0 - beq _022605F4 - ldr r0, [r4, #0] - bl ov16_0223F228 - cmp r0, #0 - beq _02260594 - cmp r0, #1 - beq _022605C0 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_02260594: - mov r0, #2 - add r1, sp, #0x10 - strb r0, [r1, #0xd] - add r0, r4, #0 - add r0, #0x23 - ldrb r0, [r0] - ldrb r2, [r4, #9] - mov r3, #0 - lsl r0, r0, #8 - orr r0, r2 - str r0, [sp, #0x20] - ldr r0, _022608C8 ; =0x00000399 - add r2, sp, #0x1c - strh r0, [r1, #0xe] - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov16_0223FB24 - mov r0, #3 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_022605C0: - mov r1, #0 - add r0, sp, #0x10 - strb r1, [r0, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E1B4 - ldr r1, _022608CC ; =0x000004CA - add r1, r0, r1 - add r0, sp, #0x10 - strh r1, [r0, #0xe] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - add r1, r6, #0 - add r2, sp, #0x1c - bl ov16_0223FB24 - add r1, r4, #0 - add r1, #0x35 - strb r0, [r1] - mov r0, #2 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_022605F4: - mov r1, #0x20 - add r2, r5, #0 - tst r2, r1 - beq _02260614 - mov r1, #8 - add r0, sp, #0x10 - strb r1, [r0, #0xd] - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E0D8 - str r0, [sp, #0x20] - ldr r1, _022608D0 ; =0x0000039A - add r0, sp, #0x10 - strh r1, [r0, #0xe] - b _0226064A -_02260614: - lsl r1, r1, #4 - tst r1, r5 - beq _02260632 - mov r1, #8 - add r0, sp, #0x10 - strb r1, [r0, #0xd] - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E0D8 - str r0, [sp, #0x20] - ldr r1, _022608D4 ; =0x000004C6 - add r0, sp, #0x10 - strh r1, [r0, #0xe] - b _0226064A -_02260632: - add r2, r4, #0 - mov r1, #2 - add r3, sp, #0x10 - strb r1, [r3, #0xd] - add r2, #0x23 - ldrb r2, [r2] - ldrb r1, [r4, #9] - sub r0, #0x67 - lsl r2, r2, #8 - orr r1, r2 - str r1, [sp, #0x20] - strh r0, [r3, #0xe] -_0226064A: - ldr r0, [r4, #0] - add r1, r6, #0 - add r2, sp, #0x1c - mov r3, #0 - bl ov16_0223FB24 - mov r0, #3 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_0226065E: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - bl sub_0201D724 - cmp r0, #0 - bne _02260690 - mov r0, #3 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260674: - ldr r0, [r4, #4] - bl ov16_0226757C - ldr r0, [sp, #0xc] - ldr r1, [r4, #0] - bl ov16_02264798 - mov r0, #4 - strb r0, [r4, #0xa] -_02260686: - add r0, r6, #0 - bl ov16_02269348 - cmp r0, #0 - bne _02260692 -_02260690: - b _02260AB0 -_02260692: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - ldrb r1, [r4, #9] - add r0, sp, #0x10 - add r2, r4, #0 - strb r1, [r0, #1] - add r1, r4, #0 - add r1, #0x34 - ldrb r1, [r1] - add r2, #0x3b - strb r1, [r0] - add r1, r4, #0 - add r1, #0x23 - ldrb r1, [r1] - strb r1, [r0, #2] - mov r1, #0x36 - ldrsh r1, [r4, r1] - strh r1, [r0, #4] - ldrh r1, [r4, #0x38] - strh r1, [r0, #6] - add r1, r4, #0 - add r1, #0x3a - ldrb r1, [r1] - strb r1, [r0, #3] - ldrb r1, [r4, #9] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_0223EC58 - add r1, sp, #0x10 - strb r0, [r1, #8] - ldr r1, _022608D8 ; =0x00000197 - ldr r0, [sp, #0xc] - ldrb r0, [r0, r1] - cmp r0, #0 - beq _022607A2 - add r0, r6, #0 - mov r1, #1 - bl ov16_0226BCCC - ldr r0, [r4, #0] - bl ov16_0223EBEC - mov r1, #1 - tst r0, r1 - beq _02260714 - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #6 - bl ov16_02268C04 - b _02260798 -_02260714: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - lsl r1, r1, #8 - tst r0, r1 - beq _02260738 - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0xa - bl ov16_02268C04 - b _02260798 -_02260738: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #0x20 - tst r0, r1 - beq _0226075A - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #8 - bl ov16_02268C04 - b _02260798 -_0226075A: - add r0, sp, #0x10 - ldrb r0, [r0] - cmp r0, #4 - bne _02260784 - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02260784 - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #4 - bl ov16_02268C04 - b _02260798 -_02260784: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #3 - bl ov16_02268C04 -_02260798: - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223F288 - b _02260844 -_022607A2: - ldr r0, [r4, #0] - bl ov16_0223EBEC - mov r1, #1 - tst r0, r1 - beq _022607C4 - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #5 - bl ov16_02268C04 - b _0226083C -_022607C4: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - lsl r1, r1, #8 - tst r0, r1 - beq _022607E8 - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #9 - bl ov16_02268C04 - b _0226083C -_022607E8: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #0x20 - tst r0, r1 - beq _0226080A - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #7 - bl ov16_02268C04 - b _0226083C -_0226080A: - add r0, sp, #0x10 - ldrb r0, [r0] - cmp r0, #4 - beq _02260828 - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #1 - bl ov16_02268C04 - b _0226083C -_02260828: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #2 - bl ov16_02268C04 -_0226083C: - ldr r1, _022608D8 ; =0x00000197 - ldr r0, [sp, #0xc] - mov r2, #1 - strb r2, [r0, r1] -_02260844: - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x1c - bl ov16_0226914C - add r1, r4, #0 - add r2, r4, #0 - add r0, r6, #0 - add r1, #0x10 - add r2, #0x16 - bl ov16_02269168 - add r0, r6, #0 - bl ov16_022691BC - add r0, r7, #0 - bl sub_02006CA8 - add r0, r5, #0 - bl sub_02006CA8 - ldr r0, [sp, #8] - cmp r0, #0 - beq _02260878 - bl ov16_02268468 -_02260878: - mov r0, #5 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260880: - ldr r0, _022608DC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #8 - tst r0, r1 - beq _022608B0 - ldr r0, [r4, #0] - mov r5, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _022608B0 -_02260896: - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov16_0223DF14 - add r0, #0x28 - bl ov16_0226737C - ldr r0, [r4, #0] - add r5, r5, #1 - bl ov16_0223DF1C - cmp r5, r0 - blt _02260896 -_022608B0: - add r0, r6, #0 - bl ov16_0226925C - mov r1, #0 - mvn r1, r1 - str r0, [r4, #0xc] - cmp r0, r1 - beq _02260900 - mov r0, #0xa - strb r0, [r4, #0xb] - ldr r0, _022608E0 ; =0x000005DD - b _022608E4 - ; .align 2, 0 -_022608C8: .word 0x00000399 -_022608CC: .word 0x000004CA -_022608D0: .word 0x0000039A -_022608D4: .word 0x000004C6 -_022608D8: .word 0x00000197 -_022608DC: .word 0x021BF67C -_022608E0: .word 0x000005DD -_022608E4: - bl sub_02005748 - mov r0, #6 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_022608F0: - add r0, r6, #0 - bl ov16_02269348 - cmp r0, #1 - beq _02260902 - ldr r0, [r4, #0xc] - cmp r0, #1 - beq _02260902 -_02260900: - b _02260AB0 -_02260902: - ldr r0, [r4, #0xc] - cmp r0, #4 - bls _0226090A - b _02260A12 -_0226090A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02260916: ; jump table - .short _02260A12 - _02260916 - 2 ; case 0 - .short _02260920 - _02260916 - 2 ; case 1 - .short _02260934 - _02260916 - 2 ; case 2 - .short _02260980 - _02260916 - 2 ; case 3 - .short _022609CC - _02260916 - 2 ; case 4 -_02260920: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - beq _02260A16 - mov r0, #7 - strb r0, [r4, #0xa] - b _02260A16 -_02260934: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r3, #0 - str r3, [sp] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - str r3, [sp, #4] - bl ov16_02268C04 - add r0, r6, #0 - mov r1, #0 - bl ov16_0226BCCC - ldr r0, [sp, #8] - bl ov16_0226846C - ldr r0, [r4, #4] - bl ov16_022675AC - ldr r0, [sp, #0xc] - bl ov16_022647D8 - add r0, r5, #0 - bl sub_02006CA8 - add r0, r7, #0 - bl sub_02006CA8 - b _02260A16 -_02260980: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r3, #0 - str r3, [sp] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - str r3, [sp, #4] - bl ov16_02268C04 - add r0, r6, #0 - mov r1, #0 - bl ov16_0226BCCC - ldr r0, [sp, #8] - bl ov16_0226846C - ldr r0, [r4, #4] - bl ov16_022675AC - ldr r0, [sp, #0xc] - bl ov16_022647D8 - add r0, r5, #0 - bl sub_02006CA8 - add r0, r7, #0 - bl sub_02006CA8 - b _02260A16 -_022609CC: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - add r0, r6, #0 - bl ov16_0226D088 - cmp r0, #1 - bne _022609F4 - ldr r0, [sp, #8] - bl ov16_0226846C - mov r0, #0xff - str r0, [r4, #0xc] -_022609F4: - mov r3, #0 - str r3, [sp] - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - str r3, [sp, #4] - bl ov16_02268C04 - add r0, r7, #0 - bl sub_02006CA8 - add r0, r5, #0 - bl sub_02006CA8 - b _02260A16 -_02260A12: - bl sub_02022974 -_02260A16: - add r0, r6, #0 - bl ov16_02269218 - mov r0, #8 - add sp, #0x58 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, r7, pc} -_02260A24: - add r0, r6, #0 - bl ov16_02269348 - cmp r0, #1 - bne _02260AB0 - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r5, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r3, #0 - str r3, [sp] - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - str r3, [sp, #4] - bl ov16_02268C04 - add r0, r6, #0 - mov r1, #0 - bl ov16_0226BCCC - ldr r0, [sp, #8] - bl ov16_0226846C - ldr r0, [r4, #4] - bl ov16_022675AC - ldr r0, [sp, #0xc] - bl ov16_022647D8 - add r0, r6, #0 - bl ov16_02269218 - mov r0, #8 - strb r0, [r4, #0xa] - add r0, r5, #0 - bl sub_02006CA8 - add r0, r7, #0 - bl sub_02006CA8 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_02260A86: - add r0, r6, #0 - bl ov16_0226BCD0 - cmp r0, #1 - bne _02260AB0 - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - ldr r2, [r4, #0xc] - bl ov16_022656D4 - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 -_02260AB0: - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_022604C8 - - thumb_func_start ov16_02260AB4 -ov16_02260AB4: ; 0x02260AB4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #9] - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov14_022243BC - add r2, r0, #0 - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_022656D4 - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02260AB4 - - thumb_func_start ov16_02260AE4 -ov16_02260AE4: ; 0x02260AE4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #9] - add r5, r0, #0 - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02260AE4 - - thumb_func_start ov16_02260B04 -ov16_02260B04: ; 0x02260B04 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223ED6C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF10 - mov r2, #0 - ldrb r1, [r4, #9] - add r3, r2, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r1, #0x1a - bl sub_020759F0 - ldr r2, _02260B7C ; =0x0226F194 - lsl r1, r5, #1 - ldrb r2, [r2, r1] - mul r2, r0 - add r0, r2, #0 - ldr r2, _02260B80 ; =0x0226F195 - ldrb r1, [r2, r1] - bl sub_020E1F6C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F4BC - mov r1, #0xff - bl sub_020E1F6C - cmp r1, r5 - ldr r0, [r4, #0] - bgt _02260B5C - ldrb r1, [r4, #9] - mov r2, #4 - bl ov16_022656D4 - b _02260B64 -_02260B5C: - ldrb r1, [r4, #9] - mov r2, #5 - bl ov16_022656D4 -_02260B64: - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02260B7C: .word 0x0226F194 -_02260B80: .word 0x0226F195 - thumb_func_end ov16_02260B04 - - thumb_func_start ov16_02260B84 -ov16_02260B84: ; 0x02260B84 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #9] - add r5, r0, #0 - ldr r0, [r4, #0] - mov r2, #4 - bl ov16_022656D4 - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02260B84 - - thumb_func_start ov16_02260BAC -ov16_02260BAC: ; 0x02260BAC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #9] - add r5, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02260BC6 - ldr r0, [r4, #0] - bl ov16_0226474C -_02260BC6: - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #0 - beq _02260BD6 - cmp r0, #4 - bhi _02260BD6 - cmp r0, #2 - bne _02260BDC -_02260BD6: - ldr r0, [r4, #0] - bl ov16_02264730 -_02260BDC: - add r2, sp, #0 - ldrb r1, [r4, #9] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_022656D4 - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02260BAC - - thumb_func_start ov16_02260C00 -ov16_02260C00: ; 0x02260C00 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r0, [r4, #0] - bl ov16_0223E02C - add r7, r0, #0 - ldrb r1, [r4, #0x1d] - ldr r0, [r4, #0] - bl ov16_0223DF14 - str r0, [sp, #0x10] - ldrb r1, [r4, #0x1d] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r1, r0, #0 - ldrb r0, [r4, #0x1d] - cmp r1, r0 - beq _02260C3A - ldr r0, [r4, #0] - bl ov16_0223F35C - add r5, r0, #0 - b _02260C3C -_02260C3A: - mov r5, #0 -_02260C3C: - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #3 - bls _02260C48 - b _02260D7A -_02260C48: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02260C54: ; jump table - .short _02260C5C - _02260C54 - 2 ; case 0 - .short _02260D00 - _02260C54 - 2 ; case 1 - .short _02260D26 - _02260C54 - 2 ; case 2 - .short _02260D6C - _02260C54 - 2 ; case 3 -_02260C5C: - add r0, r7, #0 - bl ov16_02269348 - cmp r0, #0 - bne _02260C68 - b _02260DA2 -_02260C68: - ldr r0, [r4, #0] - bl ov16_0223E05C - add r1, r0, #0 - mov r2, #2 - add r0, sp, #0x14 - strb r2, [r0, #0x15] - ldrb r2, [r4, #0x1f] - ldrb r3, [r4, #0x1d] - lsl r2, r2, #8 - orr r2, r3 - str r2, [sp, #0x2c] - ldr r2, _02260DA8 ; =0x00000399 - mov r3, #0 - strh r2, [r0, #0x16] - ldr r0, [r4, #0] - add r2, sp, #0x28 - bl ov16_0223FB24 - add r0, r7, #0 - bl ov16_02269218 - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - str r0, [sp, #0xc] - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r5, sp, #0x14 - str r0, [sp, #8] - mov r2, #0 - add r3, r4, #0 - add r6, r5, #0 -_02260CB0: - ldrh r0, [r3, #0xc] - add r1, r4, r2 - add r2, r2, #1 - strh r0, [r5] - ldrb r0, [r1, #0x14] - add r3, r3, #2 - add r5, r5, #2 - strb r0, [r6, #8] - ldrb r0, [r1, #0x18] - strb r0, [r6, #0xc] - add r6, r6, #1 - cmp r2, #4 - blt _02260CB0 - ldrb r1, [r4, #0x1e] - add r0, sp, #0x14 - add r2, r7, #0 - strb r1, [r0, #0x10] - mov r0, #0 - str r0, [sp] - add r0, sp, #0x14 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r1, [sp, #8] - mov r3, #0xb - bl ov16_02268C04 - ldr r0, [sp, #0xc] - bl sub_02006CA8 - ldr r0, [sp, #8] - bl sub_02006CA8 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #0x4c - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, r7, pc} -_02260D00: - add r0, r7, #0 - bl ov16_0226925C - mov r1, #0 - mvn r1, r1 - str r0, [r4, #8] - cmp r0, r1 - beq _02260DA2 - ldr r0, _02260DAC ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #0x4c - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, r7, pc} -_02260D26: - ldr r0, [r4, #8] - cmp r0, #0xff - beq _02260D52 - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02260D52 - add r0, r7, #0 - mov r1, #0 - bl ov16_0226BCCC - add r0, r5, #0 - bl ov16_0226846C - ldr r0, [r4, #4] - bl ov16_022675AC - ldr r0, [sp, #0x10] - bl ov16_022647D8 -_02260D52: - ldrb r1, [r4, #0x1d] - ldr r0, [r4, #0] - ldr r2, [r4, #8] - bl ov16_02265790 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #0x4c - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, r7, pc} -_02260D6C: - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] -_02260D7A: - add r0, r7, #0 - bl ov16_0226BCD0 - cmp r0, #1 - bne _02260DA2 - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223F234 - ldrb r1, [r4, #0x1d] - ldrb r2, [r4, #0x1c] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02260DA2: - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - nop -_02260DA8: .word 0x00000399 -_02260DAC: .word 0x000005DD - thumb_func_end ov16_02260C00 - - thumb_func_start ov16_02260DB0 -ov16_02260DB0: ; 0x02260DB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r6, r1, #0 - str r0, [sp, #8] - ldr r0, [r6, #0] - bl ov16_0223DF0C - add r4, r0, #0 - ldr r0, [r6, #0] - bl ov16_0223DF10 - str r0, [sp, #0xc] - ldr r0, _02260E74 ; =0x00000101 - tst r0, r4 - bne _02260DE6 - ldr r0, [r6, #0] - bl ov16_0223EBEC - mov r1, #1 - tst r0, r1 - bne _02260DE6 - ldrb r1, [r6, #0x1d] - ldr r0, [r6, #0] - bl ov16_0223E208 - cmp r0, #0 - bne _02260DF6 -_02260DE6: - ldrb r1, [r6, #0x1d] - ldr r0, [r6, #0] - bl ov14_0221FCF4 - cmp r0, #0xff - beq _02260E6E - add r4, r0, #1 - b _02260E4E -_02260DF6: - mov r7, #0 - add r4, r7, #0 - add r5, sp, #0x10 -_02260DFC: - add r0, r4, #0 - bl sub_020787CC - ldrh r1, [r6, #0x22] - tst r0, r1 - bne _02260E0E - add r0, r4, #1 - stmia r5!, {r0} - add r7, r7, #1 -_02260E0E: - add r4, r4, #1 - cmp r4, #4 - blt _02260DFC - ldr r0, [r6, #0] - bl ov16_0223F4BC - add r1, r7, #0 - bl sub_020E1F6C - lsl r1, r1, #2 - add r0, sp, #0x10 - ldr r4, [r0, r1] - mov r0, #1 - sub r3, r4, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - lsl r3, r3, #1 - add r3, r6, r3 - ldrb r2, [r6, #0x1d] - ldrh r3, [r3, #0xc] - ldr r0, [r6, #0] - ldr r1, [sp, #0xc] - bl ov16_02253954 - str r0, [sp] - ldrb r3, [r6, #0x1d] - ldr r0, [r6, #0] - ldr r1, [sp, #0xc] - mov r2, #0xb - bl ov16_0225B540 -_02260E4E: - ldrb r1, [r6, #0x1d] - ldr r0, [r6, #0] - add r2, r4, #0 - bl ov16_02265790 - ldrb r1, [r6, #0x1d] - ldrb r2, [r6, #0x1c] - ldr r0, [r6, #0] - bl ov16_02266ABC - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [sp, #8] - bl sub_0200DA58 -_02260E6E: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02260E74: .word 0x00000101 - thumb_func_end ov16_02260DB0 - - thumb_func_start ov16_02260E78 -ov16_02260E78: ; 0x02260E78 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0x1d] - add r5, r0, #0 - ldrb r2, [r4, #0x1c] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02260E78 - - thumb_func_start ov16_02260E98 -ov16_02260E98: ; 0x02260E98 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - ldrb r1, [r5, #0x1d] - add r6, r0, #0 - ldr r0, [r5, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02260EB4 - ldr r0, [r5, #0] - bl ov16_0226474C -_02260EB4: - add r0, sp, #0 - ldrb r4, [r0] - cmp r4, #0 - beq _02260EC0 - cmp r4, #4 - bls _02260EC8 -_02260EC0: - ldr r0, [r5, #0] - bl ov16_02264730 - b _02260EEA -_02260EC8: - ldr r0, [r5, #0] - bl ov16_0223DF10 - ldrb r1, [r5, #0x1d] - add r2, r4, #5 - mov r3, #0 - bl ov16_02252060 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - beq _02260EE4 - ldr r0, _02260F10 ; =0x000001D3 - cmp r1, r0 - bls _02260EEA -_02260EE4: - ldr r0, [r5, #0] - bl ov16_02264730 -_02260EEA: - add r2, sp, #0 - ldrb r1, [r5, #0x1d] - ldrb r2, [r2] - ldr r0, [r5, #0] - bl ov16_02265790 - ldrb r1, [r5, #0x1d] - ldrb r2, [r5, #0x1c] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02260F10: .word 0x000001D3 - thumb_func_end ov16_02260E98 - - thumb_func_start ov16_02260F14 -ov16_02260F14: ; 0x02260F14 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r4, r1, #0 - str r0, [sp, #8] - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF14 - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E02C - add r5, r0, #0 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r1, r0, #0 - ldrb r0, [r4, #0xd] - cmp r1, r0 - beq _02260F4E - ldr r0, [r4, #0] - bl ov16_0223F35C - add r6, r0, #0 - b _02260F50 -_02260F4E: - mov r6, #0 -_02260F50: - ldrb r0, [r4, #0xf] - cmp r0, #3 - bhi _02261046 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02260F62: ; jump table - .short _02260F6A - _02260F62 - 2 ; case 0 - .short _02260FEE - _02260F62 - 2 ; case 1 - .short _0226100E - _02260F62 - 2 ; case 2 - .short _02261042 - _02260F62 - 2 ; case 3 -_02260F6A: - add r0, r5, #0 - bl ov16_02269348 - cmp r0, #0 - bne _02260F76 - b _022610A0 -_02260F76: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r2, sp, #0x10 - add r6, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, #2 -_02260F92: - ldrh r3, [r1, #0x10] - add r0, r0, #1 - strh r3, [r2] - ldrh r3, [r1, #0x12] - strh r3, [r2, #2] - ldrh r3, [r1, #0x14] - strh r3, [r2, #4] - ldrh r3, [r1, #0x16] - add r1, #8 - strh r3, [r2, #6] - add r2, #8 - cmp r0, #4 - blt _02260F92 - ldrb r1, [r4, #0xe] - add r0, sp, #0x30 - add r0, #2 - strb r1, [r0] - ldrh r0, [r4, #0x30] - ldrb r1, [r4, #0xe] - bl ov16_02269368 - add r1, sp, #0x30 - add r1, #2 - strb r0, [r1, #1] - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - add r0, #2 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #0xc - bl ov16_02268C04 - add r0, r7, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - ldrb r0, [r4, #0xf] - add sp, #0x34 - add r0, r0, #1 - strb r0, [r4, #0xf] - pop {r4, r5, r6, r7, pc} -_02260FEE: - add r0, r5, #0 - bl ov16_0226925C - mov r1, #0 - mvn r1, r1 - str r0, [r4, #8] - cmp r0, r1 - beq _022610A0 - ldr r0, _022610A4 ; =0x000005DD - bl sub_02005748 - ldrb r0, [r4, #0xf] - add sp, #0x34 - add r0, r0, #1 - strb r0, [r4, #0xf] - pop {r4, r5, r6, r7, pc} -_0226100E: - ldr r0, [r4, #8] - cmp r0, #0xff - beq _02261038 - ldr r0, [r4, #4] - bl ov16_022675AC - add r0, r7, #0 - bl ov16_022647D8 - add r0, r6, #0 - bl ov16_0226846C - add r0, r4, #0 - add r0, #0x32 - ldrb r0, [r0] - cmp r0, #1 - bne _02261038 - add r0, r5, #0 - mov r1, #0 - bl ov16_0226BCCC -_02261038: - ldrb r0, [r4, #0xf] - add sp, #0x34 - add r0, r0, #1 - strb r0, [r4, #0xf] - pop {r4, r5, r6, r7, pc} -_02261042: - add r0, r0, #1 - strb r0, [r4, #0xf] -_02261046: - add r0, r5, #0 - bl ov16_0226BCD0 - cmp r0, #1 - bne _022610A0 - ldr r0, [r4, #0] - ldr r5, [r4, #8] - bl ov16_0223DF0C - add r6, r0, #0 - cmp r5, #0xff - beq _02261080 - ldr r0, [r4, #0] - add r1, sp, #0xc - bl ov16_0223F858 - mov r0, #2 - tst r0, r6 - ldr r0, [r4, #8] - beq _02261078 - add r1, r0, #1 - add r0, sp, #0xc - ldrb r0, [r0, r1] - add r5, r0, #1 - b _02261080 -_02261078: - sub r1, r0, #1 - add r0, sp, #0xc - ldrb r0, [r0, r1] - add r5, r0, #1 -_02261080: - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - add r2, r5, #0 - bl ov16_022658CC - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #8] - bl sub_0200DA58 -_022610A0: - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022610A4: .word 0x000005DD - thumb_func_end ov16_02260F14 - - thumb_func_start ov16_022610A8 -ov16_022610A8: ; 0x022610A8 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223DF10 - add r1, r0, #0 - ldrb r3, [r5, #0xd] - ldr r0, [r5, #0] - mov r2, #0xb - bl ov16_0225B45C - add r4, r0, #1 - cmp r4, #5 - blt _022610CA - bl sub_02022974 -_022610CA: - ldrb r1, [r5, #0xd] - ldr r0, [r5, #0] - add r2, r4, #0 - bl ov16_022658CC - ldrb r1, [r5, #0xd] - ldrb r2, [r5, #0xc] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - pop {r4, r5, r6, pc} - thumb_func_end ov16_022610A8 - - thumb_func_start ov16_022610EC -ov16_022610EC: ; 0x022610EC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022610EC - - thumb_func_start ov16_0226110C -ov16_0226110C: ; 0x0226110C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r7, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02261126 - ldr r0, [r4, #0] - bl ov16_0226474C -_02261126: - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #0 - beq _02261132 - cmp r0, #4 - bls _0226113A -_02261132: - ldr r0, [r4, #0] - bl ov16_02264730 - b _022611B8 -_0226113A: - sub r5, r0, #1 - ldrh r0, [r4, #0x30] - cmp r0, #0x40 - bgt _02261170 - bge _022611B8 - cmp r0, #0x10 - bgt _0226116C - bge _022611B8 - cmp r0, #8 - bhi _022611B8 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226115A: ; jump table - .short _0226118E - _0226115A - 2 ; case 0 - .short _022611B8 - _0226115A - 2 ; case 1 - .short _022611B8 - _0226115A - 2 ; case 2 - .short _022611B8 - _0226115A - 2 ; case 3 - .short _022611B8 - _0226115A - 2 ; case 4 - .short _022611B8 - _0226115A - 2 ; case 5 - .short _022611B8 - _0226115A - 2 ; case 6 - .short _022611B8 - _0226115A - 2 ; case 7 - .short _022611B8 - _0226115A - 2 ; case 8 -_0226116C: - cmp r0, #0x20 - b _022611B8 -_02261170: - mov r2, #1 - lsl r2, r2, #8 - cmp r0, r2 - bgt _0226117E - bge _022611B8 - cmp r0, #0x80 - b _022611B8 -_0226117E: - lsl r1, r2, #1 - cmp r0, r1 - bgt _02261188 - beq _0226119C - b _022611B8 -_02261188: - lsl r1, r2, #2 - cmp r0, r1 - b _022611B8 -_0226118E: - ldrb r0, [r4, #0xd] - cmp r0, r5 - bne _022611B8 - ldr r0, [r4, #0] - bl ov16_02264730 - b _022611B8 -_0226119C: - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E208 - add r6, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov16_0223E208 - cmp r6, r0 - beq _022611B8 - ldr r0, [r4, #0] - bl ov16_02264730 -_022611B8: - add r2, sp, #0 - ldrb r1, [r4, #0xd] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_022658CC - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0226110C - - thumb_func_start ov16_022611DC -ov16_022611DC: ; 0x022611DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x14 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E064 - ldrb r1, [r4, #0xe] - add r5, r0, #0 - cmp r1, #0x1e - bls _022611F8 - bl _02261D22 -_022611F8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02261204: ; jump table - .short _02261242 - _02261204 - 2 ; case 0 - .short _02261298 - _02261204 - 2 ; case 1 - .short _02261324 - _02261204 - 2 ; case 2 - .short _02261338 - _02261204 - 2 ; case 3 - .short _02261396 - _02261204 - 2 ; case 4 - .short _022614DE - _02261204 - 2 ; case 5 - .short _0226151A - _02261204 - 2 ; case 6 - .short _0226156A - _02261204 - 2 ; case 7 - .short _0226170E - _02261204 - 2 ; case 8 - .short _0226178C - _02261204 - 2 ; case 9 - .short _022617C8 - _02261204 - 2 ; case 10 - .short _022617EA - _02261204 - 2 ; case 11 - .short _02261CD2 - _02261204 - 2 ; case 12 - .short _02261870 - _02261204 - 2 ; case 13 - .short _02261CD2 - _02261204 - 2 ; case 14 - .short _02261924 - _02261204 - 2 ; case 15 - .short _02261D00 - _02261204 - 2 ; case 16 - .short _0226182A - _02261204 - 2 ; case 17 - .short _02261CD2 - _02261204 - 2 ; case 18 - .short _022619D6 - _02261204 - 2 ; case 19 - .short _02261CD2 - _02261204 - 2 ; case 20 - .short _02261A1C - _02261204 - 2 ; case 21 - .short _02261AB6 - _02261204 - 2 ; case 22 - .short _02261AEC - _02261204 - 2 ; case 23 - .short _02261D00 - _02261204 - 2 ; case 24 - .short _0226182A - _02261204 - 2 ; case 25 - .short _02261CD2 - _02261204 - 2 ; case 26 - .short _022619D6 - _02261204 - 2 ; case 27 - .short _02261CD2 - _02261204 - 2 ; case 28 - .short _02261B5E - _02261204 - 2 ; case 29 - .short _02261D00 - _02261204 - 2 ; case 30 -_02261242: - ldr r0, [r4, #0] - bl ov16_0223E02C - bl ov16_0226CD08 - strb r0, [r4, #0x10] - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - mov r2, #3 - str r1, [sp] - mov r0, #7 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #5 - add r3, r1, #0 - add r0, r5, #0 - lsl r2, r2, #0xa - sub r3, #0xd - bl sub_02003178 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #0xa - add r3, r1, #0 - ldr r2, _022615C0 ; =0x0000FFFF - add r0, r5, #0 - sub r3, #0x12 - bl sub_02003178 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261298: - bl sub_0200384C - cmp r0, #0 - bne _02261360 - ldr r0, [r4, #0] - bl ov16_0223B384 - mov r0, #5 - mov r1, #0x34 - bl sub_02018144 - str r0, [r4, #4] - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - ldr r1, [r4, #0] - ldr r0, [r4, #4] - str r1, [r0, #0] - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E16C - ldr r1, [r4, #4] - str r0, [r1, #4] - ldr r0, [r4, #4] - mov r1, #5 - str r1, [r0, #0xc] - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x26 - strb r1, [r0] - ldr r0, [r4, #0] - bl ov16_0223E1AC - ldr r1, [r4, #4] - str r0, [r1, #8] - ldrb r1, [r4, #0xd] - ldr r0, [r4, #4] - str r1, [r0, #0x10] - ldr r0, [r4, #4] - ldrb r1, [r4, #0x10] - add r0, #0x25 - strb r1, [r0] - ldr r0, [r4, #4] - ldrb r1, [r4, #0x14] - add r0, #0x22 - strb r1, [r0] - ldr r0, [r4, #4] - ldrb r1, [r4, #0x15] - add r0, #0x23 - strb r1, [r0] - ldr r0, [r4, #4] - ldrb r1, [r4, #0x16] - add r0, #0x24 - strb r1, [r0] - ldrb r0, [r4, #0xd] - add r0, r4, r0 - add r0, #0x30 - ldrb r1, [r0] - ldr r0, [r4, #4] - str r1, [r0, #0x18] - ldr r0, [r4, #4] - bl ov12_022264F4 - add sp, #0x1fc - mov r0, #3 - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261324: - ldr r0, [r4, #4] - ldrb r1, [r4, #0x10] - add r0, #0x25 - strb r1, [r0] - ldr r0, [r4, #4] - bl ov12_022264F4 - ldrb r0, [r4, #0xe] - add r0, r0, #1 - strb r0, [r4, #0xe] -_02261338: - ldr r1, [r4, #4] - add r0, r1, #0 - add r0, #0x26 - ldrb r0, [r0] - cmp r0, #0 - beq _02261360 - mov r0, #0 - add r1, #0x26 - strb r0, [r1] - ldr r0, [r4, #4] - add r0, #0x25 - ldrb r0, [r0] - strb r0, [r4, #0x10] - ldr r1, [r4, #4] - ldrh r0, [r1, #0x1c] - cmp r0, #0 - beq _0226138C - ldrb r0, [r1, #0x1e] - cmp r0, #3 - bls _02261364 -_02261360: - bl _02261D22 -_02261364: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02261370: ; jump table - .short _02261378 - _02261370 - 2 ; case 0 - .short _02261378 - _02261370 - 2 ; case 1 - .short _02261382 - _02261370 - 2 ; case 2 - .short _02261382 - _02261370 - 2 ; case 3 -_02261378: - add sp, #0x1fc - mov r0, #4 - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261382: - add sp, #0x1fc - mov r0, #6 - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_0226138C: - add sp, #0x1fc - mov r0, #6 - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261396: - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF20 - str r0, [sp, #0x14] - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _022613C2 - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _022613C2 - ldrb r1, [r4, #0xd] - mov r0, #1 - add r7, r1, #0 - and r7, r0 - b _022613C4 -_022613C2: - ldrb r7, [r4, #0xd] -_022613C4: - ldr r0, [r4, #8] - mov r1, #6 - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_0207A014 - ldr r0, [sp, #0x14] - mov r6, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02261412 - mov r0, #6 - mul r0, r7 - add r5, r4, r0 -_022613E2: - ldrb r2, [r5, #0x18] - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223DFAC - add r1, r0, #0 - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_0207A048 - ldr r1, [r4, #8] - ldrb r0, [r5, #0x18] - ldr r1, [r1, #4] - add r5, r5, #1 - add r1, r1, r6 - add r1, #0x2c - strb r0, [r1] - ldr r0, [sp, #0x14] - add r6, r6, #1 - bl sub_0207A0F8 - cmp r6, r0 - blt _022613E2 -_02261412: - ldr r0, [r4, #8] - ldr r1, [r4, #0] - ldr r0, [r0, #4] - str r1, [r0, #8] - ldr r0, [r4, #8] - mov r1, #5 - ldr r0, [r0, #4] - str r1, [r0, #0xc] - ldr r1, [r4, #8] - mov r0, #0 - ldr r1, [r1, #4] - strb r0, [r1, #0x11] - ldr r1, [r4, #8] - ldr r1, [r1, #4] - add r1, #0x36 - strb r0, [r1] - ldr r1, [r4, #8] - ldr r1, [r1, #4] - strh r0, [r1, #0x24] - ldr r0, [r4, #8] - mov r1, #2 - ldr r0, [r0, #4] - add r0, #0x35 - strb r1, [r0] - ldr r0, [r4, #4] - ldrh r1, [r0, #0x1c] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - strh r1, [r0, #0x22] - ldr r0, [r4, #4] - ldrb r1, [r0, #0x1e] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - add r0, #0x33 - strb r1, [r0] - ldr r0, [r4, #4] - ldr r1, [r0, #0x10] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - str r1, [r0, #0x28] - ldr r0, [r4, #8] - ldrb r1, [r4, #0x10] - ldr r0, [r0, #4] - add r0, #0x32 - strb r1, [r0] - ldrb r0, [r4, #0xd] - ldr r2, [r4, #8] - add r0, r2, r0 - ldrb r1, [r0, #0xc] - ldr r0, [r2, #4] - strb r1, [r0, #0x14] - ldrb r1, [r4, #0xd] - ldr r5, [r4, #8] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r0, r5, r0 - ldrb r1, [r0, #0xc] - ldr r0, [r5, #4] - strb r1, [r0, #0x15] - ldrb r0, [r4, #0xf] - cmp r0, #4 - bne _022614A8 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r0, r4, r0 - add r0, #0x30 - ldrb r1, [r0] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - str r1, [r0, #0x18] - ldrb r0, [r4, #0xd] - b _022614BE -_022614A8: - ldrb r0, [r4, #0xd] - add r0, r4, r0 - add r0, #0x30 - ldrb r1, [r0] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - str r1, [r0, #0x18] - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E258 -_022614BE: - add r0, r4, r0 - add r0, #0x30 - ldrb r1, [r0] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - str r1, [r0, #0x1c] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - bl ov12_0221FC20 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_022614DE: - ldr r0, [r4, #8] - ldr r1, [r0, #4] - add r0, r1, #0 - add r0, #0x36 - ldrb r0, [r0] - cmp r0, #0 - beq _02261572 - add r1, #0x32 - ldrb r0, [r1] - mov r1, #0 - strb r0, [r4, #0x10] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - add r0, #0x36 - strb r1, [r0] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldrb r0, [r0, #0x11] - cmp r0, #6 - bne _02261510 - add sp, #0x1fc - mov r0, #2 - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261510: - add sp, #0x1fc - mov r0, #6 - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_0226151A: - ldr r0, [r4, #0] - bl ov16_0223B430 - ldr r0, [r4, #0] - bl ov16_0223E02C - ldrb r1, [r4, #0x10] - bl ov16_0226CD10 - mov r0, #7 - str r0, [sp] - mov r0, #0 - mov r1, #5 - str r0, [sp, #4] - mov r2, #3 - add r3, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - lsl r2, r2, #0xa - sub r3, #0xd - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - mov r1, #0xa - str r0, [sp, #4] - add r3, r1, #0 - str r0, [sp, #8] - ldr r2, _022615C0 ; =0x0000FFFF - add r0, r5, #0 - sub r3, #0x12 - bl sub_02003178 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_0226156A: - bl sub_0200384C - cmp r0, #0 - beq _02261574 -_02261572: - b _02261D22 -_02261574: - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #0 - bl sub_02015738 - ldr r0, [r4, #4] - ldrh r0, [r0, #0x1c] - cmp r0, #0 - bne _0226158A - b _022616F6 -_0226158A: - mov r0, #9 - strb r0, [r4, #0xe] - ldr r0, [r4, #4] - ldrb r1, [r0, #0x1e] - cmp r1, #3 - bls _02261598 - b _022616FA -_02261598: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022615A4: ; jump table - .short _0226163C - _022615A4 - 2 ; case 0 - .short _022615AC - _022615A4 - 2 ; case 1 - .short _022616F0 - _022615A4 - 2 ; case 2 - .short _0226169A - _022615A4 - 2 ; case 3 -_022615AC: - ldrh r1, [r0, #0x1c] - ldr r0, _022615C4 ; =0x0000FFE4 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _022615C8 - mov r0, #8 - strb r0, [r4, #0xe] - b _022616FA - ; .align 2, 0 -_022615C0: .word 0x0000FFFF -_022615C4: .word 0x0000FFE4 -_022615C8: - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldrb r0, [r0, #0x11] - cmp r0, #2 - bhs _022615E6 - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #3 - beq _022615F0 - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #0x13 - beq _022615F0 -_022615E6: - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldrb r0, [r0, #0x11] - cmp r0, #1 - bhs _02261636 -_022615F0: - ldr r0, [r4, #4] - ldrh r0, [r0, #0x1c] - cmp r0, #0x17 - ldr r0, [r4, #0] - bne _02261618 - bl ov16_0223EDAC - cmp r0, #1 - bne _02261608 - mov r0, #0x11 - strh r0, [r4, #0x12] - b _022616FA -_02261608: - mov r1, #0x74 - ldr r0, _02261928 ; =0x000005EC - mvn r1, r1 - bl sub_02005728 - mov r0, #0x15 - strh r0, [r4, #0x12] - b _022616FA -_02261618: - bl ov16_0223EDAC - cmp r0, #1 - bne _02261626 - mov r0, #0x19 - strh r0, [r4, #0x12] - b _022616FA -_02261626: - mov r1, #0x74 - ldr r0, _02261928 ; =0x000005EC - mvn r1, r1 - bl sub_02005728 - mov r0, #0x1d - strh r0, [r4, #0x12] - b _022616FA -_02261636: - mov r0, #8 - strb r0, [r4, #0xe] - b _022616FA -_0226163C: - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldrb r0, [r0, #0x11] - cmp r0, #2 - bhs _0226165A - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #3 - beq _02261664 - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #0x13 - beq _02261664 -_0226165A: - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldrb r0, [r0, #0x11] - cmp r0, #1 - bhs _02261694 -_02261664: - ldr r0, [r4, #4] - mov r1, #0x26 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261694 - ldr r0, [r4, #0] - bl ov16_0223EDAC - cmp r0, #1 - bne _02261684 - mov r0, #0x11 - strh r0, [r4, #0x12] - b _022616FA -_02261684: - mov r1, #0x74 - ldr r0, _02261928 ; =0x000005EC - mvn r1, r1 - bl sub_02005728 - mov r0, #0x15 - strh r0, [r4, #0x12] - b _022616FA -_02261694: - mov r0, #8 - strb r0, [r4, #0xe] - b _022616FA -_0226169A: - ldrh r1, [r0, #0x1c] - ldr r0, _0226192C ; =0x0000FFC1 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _022616AE - mov r0, #8 - strb r0, [r4, #0xe] - b _022616FA -_022616AE: - cmp r1, #0x37 - ldr r0, [r4, #0] - bne _022616D2 - bl ov16_0223EDAC - cmp r0, #1 - bne _022616C2 - mov r0, #0xd - strh r0, [r4, #0x12] - b _022616FA -_022616C2: - mov r1, #0x74 - ldr r0, _02261928 ; =0x000005EC - mvn r1, r1 - bl sub_02005728 - mov r0, #0xf - strh r0, [r4, #0x12] - b _022616FA -_022616D2: - bl ov16_0223EDAC - cmp r0, #1 - bne _022616E0 - mov r0, #0xb - strh r0, [r4, #0x12] - b _022616FA -_022616E0: - mov r1, #0x74 - ldr r0, _02261928 ; =0x000005EC - mvn r1, r1 - bl sub_02005728 - mov r0, #0xf - strh r0, [r4, #0x12] - b _022616FA -_022616F0: - mov r0, #8 - strb r0, [r4, #0xe] - b _022616FA -_022616F6: - mov r0, #8 - strb r0, [r4, #0xe] -_022616FA: - ldrb r0, [r4, #0xe] - cmp r0, #8 - beq _022617DE - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223B748 - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} -_0226170E: - ldr r2, [r4, #4] - ldrh r0, [r2, #0x1c] - cmp r0, #0 - bne _0226171E - mov r1, #0xff - add r0, sp, #0x1c - strh r1, [r0] - b _0226173A -_0226171E: - add r1, sp, #0x1c - strh r0, [r1] - ldrb r0, [r2, #0x1e] - strb r0, [r1, #2] - cmp r0, #1 - bhi _0226173A - ldr r0, [r4, #8] - ldr r2, [r0, #4] - ldrb r0, [r2, #0x11] - add r0, r2, r0 - add r0, #0x2c - ldrb r0, [r0] - add r0, r0, #1 - strb r0, [r1, #3] -_0226173A: - add r3, sp, #0x1c - ldrb r1, [r4, #0xd] - mov r2, sp - ldrh r5, [r3] - ldr r0, [r4, #0] - sub r2, r2, #4 - strh r5, [r2] - ldrh r3, [r3, #2] - strh r3, [r2, #2] - ldr r2, [r2, #0] - bl ov16_02265A70 - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [r4, #8] - ldr r0, [r0, #4] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} -_0226178C: - ldr r1, _02261930 ; =0x000004B6 - add r0, sp, #0x8c - strh r1, [r0, #2] - mov r1, #5 - strb r1, [r0, #1] - ldr r0, [r4, #4] - ldrh r0, [r0, #0x1c] - str r0, [sp, #0x90] - ldr r0, [r4, #0] - bl ov16_0223E05C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, sp, #0x8c - bl ov16_0223FB24 - strb r0, [r4, #0x11] - mov r0, #0x1e - strb r0, [r4, #0x17] - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_022617C8: - ldrb r0, [r4, #0x11] - bl sub_0201D724 - cmp r0, #0 - bne _022617DE - ldrb r0, [r4, #0x17] - sub r0, r0, #1 - strb r0, [r4, #0x17] - ldrb r0, [r4, #0x17] - cmp r0, #0 - beq _022617E0 -_022617DE: - b _02261D22 -_022617E0: - ldrh r0, [r4, #0x12] - add sp, #0x1fc - add sp, #0x14 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_022617EA: - ldrb r1, [r4, #0xd] - mov r0, #9 - add r2, sp, #0x1b8 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF14 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r3, sp, #0x1b8 - bl ov16_02264408 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_0226182A: - ldr r0, [r4, #8] - mov r1, #0 - ldr r0, [r0, #4] - add r2, sp, #0x160 - ldrb r0, [r0, #0x11] - mov r3, #1 - lsl r5, r0, #1 - mov r0, #9 - str r0, [sp] - str r5, [sp, #4] - str r5, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r4, #0] - bl ov16_02266B78 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov16_0223DF14 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r3, sp, #0x160 - bl ov16_02264408 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261870: - ldr r0, [r4, #4] - add r2, sp, #0x108 - ldrh r0, [r0, #0x1c] - cmp r0, #0x37 - bne _022618AE - ldrb r0, [r4, #0xd] - mov r1, #0 - add r3, r1, #0 - str r1, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x36 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - bl ov16_02266B78 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF14 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r3, sp, #0x108 - bl ov16_02264408 - b _02261918 -_022618AE: - cmp r0, #0x38 - bne _022618E6 - ldrb r0, [r4, #0xd] - mov r1, #0 - add r3, r1, #0 - str r1, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x74 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - bl ov16_02266B78 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF14 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r3, sp, #0x108 - bl ov16_02264408 - b _02261918 -_022618E6: - ldrb r1, [r4, #0xd] - mov r0, #0xc - mov r3, #1 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - bl ov16_02266B78 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF14 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r3, sp, #0x108 - bl ov16_02264408 -_02261918: - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261924: - ldr r2, _02261934 ; =0x000004B3 - b _02261938 - ; .align 2, 0 -_02261928: .word 0x000005EC -_0226192C: .word 0x0000FFC1 -_02261930: .word 0x000004B6 -_02261934: .word 0x000004B3 -_02261938: - add r0, sp, #0x68 - strh r2, [r0, #2] - mov r1, #0xc - strb r1, [r0, #1] - ldrb r1, [r4, #0xd] - ldr r3, [r4, #8] - add r3, r3, r1 - ldrb r3, [r3, #0xc] - lsl r3, r3, #8 - orr r1, r3 - str r1, [sp, #0x6c] - ldr r1, [r4, #4] - ldrh r1, [r1, #0x1c] - sub r1, #0x37 - cmp r1, #7 - bhi _022619AA - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02261964: ; jump table - .short _02261998 - _02261964 - 2 ; case 0 - .short _022619A2 - _02261964 - 2 ; case 1 - .short _02261974 - _02261964 - 2 ; case 2 - .short _0226197A - _02261964 - 2 ; case 3 - .short _02261980 - _02261964 - 2 ; case 4 - .short _02261986 - _02261964 - 2 ; case 5 - .short _0226198C - _02261964 - 2 ; case 6 - .short _02261992 - _02261964 - 2 ; case 7 -_02261974: - mov r0, #1 - str r0, [sp, #0x70] - b _022619AA -_0226197A: - mov r0, #2 - str r0, [sp, #0x70] - b _022619AA -_02261980: - mov r0, #3 - str r0, [sp, #0x70] - b _022619AA -_02261986: - mov r0, #6 - str r0, [sp, #0x70] - b _022619AA -_0226198C: - mov r0, #4 - str r0, [sp, #0x70] - b _022619AA -_02261992: - mov r0, #5 - str r0, [sp, #0x70] - b _022619AA -_02261998: - add r1, r2, #1 - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - b _022619AA -_022619A2: - add r1, r2, #2 - strh r1, [r0, #2] - mov r1, #2 - strb r1, [r0, #1] -_022619AA: - ldr r0, [r4, #0] - bl ov16_0223E05C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, sp, #0x68 - bl ov16_0223FB24 - strb r0, [r4, #0x11] - mov r0, #0x1e - strb r0, [r4, #0x17] - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_022619D6: - ldr r0, [r4, #8] - mov r1, #0 - ldr r0, [r0, #4] - add r2, sp, #0xb0 - ldrb r0, [r0, #0x11] - mov r3, #1 - lsl r5, r0, #1 - mov r0, #0xe - str r0, [sp] - str r5, [sp, #4] - str r5, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r4, #0] - bl ov16_02266B78 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov16_0223DF14 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r3, sp, #0xb0 - bl ov16_02264408 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261A1C: - ldr r0, [r4, #8] - ldr r1, [r0, #4] - ldrb r0, [r1, #0x11] - lsl r6, r0, #1 - add r0, r1, r0 - add r0, #0x2c - ldrb r7, [r0] - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov16_0223F35C - mov r1, #0 - mov r2, #1 - add r5, r0, #0 - bl sub_020C4CF4 - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov16_0223E1F8 - str r0, [sp, #0x18] - ldr r0, [r4, #0] - bl ov16_0223DF0C - add r1, r0, #0 - ldr r0, [sp, #0x18] - bl ov16_0226825C - add r1, r5, #0 - add r1, #0x25 - strb r0, [r1] - ldr r0, [r4, #0] - add r1, r6, #0 - add r2, r7, #0 - bl ov16_0223DFAC - mov r1, #0xa3 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - ldr r1, [r4, #8] - mov r2, #0 - ldr r1, [r1, #4] - ldrh r1, [r1, #0x20] - sub r0, r0, r1 - str r0, [r5, #0x28] - add r0, r6, #0 - mov r1, #0xa4 - bl sub_02074470 - str r0, [r5, #0x2c] - ldr r0, [r4, #8] - mov r1, #0xa0 - ldr r0, [r0, #4] - mov r2, #0 - ldrh r0, [r0, #0x20] - str r0, [r5, #0x30] - add r0, r6, #0 - bl sub_02074470 - cmp r0, #0 - bne _02261AA2 - add r0, r5, #0 - mov r1, #0 - add r0, #0x4a - strb r1, [r0] -_02261AA2: - ldr r1, [r5, #0x30] - add r0, r5, #0 - bl ov16_022674C4 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261AB6: - ldr r1, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r1, #4] - ldrb r1, [r1, #0x11] - lsl r1, r1, #1 - bl ov16_0223F35C - add r5, r0, #0 - bl ov16_022674F8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02261AD4 - b _02261D22 -_02261AD4: - mov r2, #1 - add r0, r5, #0 - mov r1, #0 - lsl r2, r2, #8 - bl ov16_02267084 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261AEC: - ldr r0, [r4, #0] - bl ov16_0223E05C - add r5, r0, #0 - ldr r0, [r4, #8] - ldr r1, [r0, #4] - ldrb r0, [r1, #0x11] - ldrh r1, [r1, #0x20] - lsl r0, r0, #1 - cmp r1, #0 - add r1, sp, #0x1c - beq _02261B24 - ldr r2, _02261D28 ; =0x000004BE - strh r2, [r1, #0x2a] - mov r2, #0x11 - add r1, sp, #0x44 - strb r2, [r1, #1] - ldr r1, [r4, #8] - add r1, r1, r0 - ldrb r1, [r1, #0xc] - lsl r1, r1, #8 - orr r0, r1 - str r0, [sp, #0x48] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldrh r0, [r0, #0x20] - str r0, [sp, #0x4c] - b _02261B3A -_02261B24: - ldr r2, _02261D2C ; =0x000004E2 - strh r2, [r1, #0x2a] - mov r2, #2 - add r1, sp, #0x44 - strb r2, [r1, #1] - ldr r1, [r4, #8] - add r1, r1, r0 - ldrb r1, [r1, #0xc] - lsl r1, r1, #8 - orr r0, r1 - str r0, [sp, #0x48] -_02261B3A: - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, sp, #0x44 - bl ov16_0223FB24 - strb r0, [r4, #0x11] - mov r0, #0x1e - strb r0, [r4, #0x17] - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261B5E: - ldr r0, [r4, #8] - mov r5, #0 - ldr r0, [r0, #4] - ldrb r0, [r0, #0x11] - lsl r7, r0, #1 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223F35C - str r0, [sp, #0x10] - ldr r0, [r4, #8] - add r1, r7, #0 - ldr r3, [r0, #4] - ldr r0, [r4, #0] - ldrb r2, [r3, #0x11] - add r2, r3, r2 - add r2, #0x2c - ldrb r2, [r2] - bl ov16_0223DFAC - mov r1, #0xa0 - add r2, r5, #0 - bl sub_02074470 - cmp r0, #0 - bne _02261B9A - ldr r0, [sp, #0x10] - add r1, r5, #0 - add r0, #0x4a - strb r1, [r0] -_02261B9A: - ldr r0, [sp, #0x10] - mov r2, #1 - add r1, r0, #0 - ldr r1, [r1, #0x28] - lsl r2, r2, #8 - bl ov16_02267084 - mov r1, #2 - add r0, sp, #0x1c - strb r1, [r0, #5] - ldr r0, [r4, #8] - mov r1, #0xf - add r0, r0, r7 - ldrb r0, [r0, #0xc] - mov r2, #5 - lsl r0, r0, #8 - orr r0, r7 - str r0, [sp, #0x24] - ldr r0, [r4, #4] - ldrh r0, [r0, #0x1c] - bl sub_0207CFF0 - cmp r0, #0 - beq _02261BCE - mov r6, #0 - add r5, r5, #1 -_02261BCE: - ldr r0, [r4, #4] - mov r1, #0x10 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261BE2 - mov r6, #1 - add r5, r5, #1 -_02261BE2: - ldr r0, [r4, #4] - mov r1, #0x11 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261BF6 - mov r6, #2 - add r5, r5, #1 -_02261BF6: - ldr r0, [r4, #4] - mov r1, #0x12 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261C0A - mov r6, #3 - add r5, r5, #1 -_02261C0A: - ldr r0, [r4, #4] - mov r1, #0x13 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261C1E - mov r6, #4 - add r5, r5, #1 -_02261C1E: - ldr r0, [r4, #4] - mov r1, #0x14 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261C32 - mov r6, #5 - add r5, r5, #1 -_02261C32: - ldr r0, [r4, #4] - mov r1, #0x15 - ldrh r0, [r0, #0x1c] - mov r2, #5 - bl sub_0207CFF0 - cmp r0, #0 - beq _02261C46 - mov r6, #6 - add r5, r5, #1 -_02261C46: - cmp r5, #1 - beq _02261C52 - ldr r1, _02261D30 ; =0x000004CD - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261C52: - cmp r6, #6 - bhi _02261CA6 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02261C62: ; jump table - .short _02261C70 - _02261C62 - 2 ; case 0 - .short _02261C78 - _02261C62 - 2 ; case 1 - .short _02261C80 - _02261C62 - 2 ; case 2 - .short _02261C88 - _02261C62 - 2 ; case 3 - .short _02261C90 - _02261C62 - 2 ; case 4 - .short _02261C98 - _02261C62 - 2 ; case 5 - .short _02261CA0 - _02261C62 - 2 ; case 6 -_02261C70: - ldr r1, _02261D34 ; =0x000004BA - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261C78: - ldr r1, _02261D38 ; =0x000004B7 - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261C80: - ldr r1, _02261D3C ; =0x000004B9 - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261C88: - ldr r1, _02261D40 ; =0x000004BB - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261C90: - ldr r1, _02261D44 ; =0x000004B8 - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261C98: - ldr r1, _02261D48 ; =0x000004BC - add r0, sp, #0x1c - strh r1, [r0, #6] - b _02261CA6 -_02261CA0: - ldr r1, _02261D4C ; =0x000004BD - add r0, sp, #0x1c - strh r1, [r0, #6] -_02261CA6: - ldr r0, [r4, #0] - bl ov16_0223E05C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, sp, #0x20 - bl ov16_0223FB24 - strb r0, [r4, #0x11] - mov r0, #0x1e - strb r0, [r4, #0x17] - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261CD2: - ldr r0, [r4, #0] - bl ov16_0223E008 - bl ov12_0222016C - ldr r0, [r4, #0] - bl ov16_0223E008 - bl ov12_02220188 - cmp r0, #0 - bne _02261D22 - ldr r0, [r4, #0] - bl ov16_0223E008 - bl ov12_02220198 - ldrb r0, [r4, #0xe] - add sp, #0x1fc - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02261D00: - ldrb r0, [r4, #0x11] - bl sub_0201D724 - cmp r0, #0 - bne _02261D22 - ldrb r0, [r4, #0x17] - sub r0, r0, #1 - strb r0, [r4, #0x17] - ldrb r0, [r4, #0x17] - cmp r0, #0 - bne _02261D22 - ldr r0, [r4, #0] - mov r1, #1 - bl ov16_0223B748 - mov r0, #8 - strb r0, [r4, #0xe] -_02261D22: - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02261D28: .word 0x000004BE -_02261D2C: .word 0x000004E2 -_02261D30: .word 0x000004CD -_02261D34: .word 0x000004BA -_02261D38: .word 0x000004B7 -_02261D3C: .word 0x000004B9 -_02261D40: .word 0x000004BB -_02261D44: .word 0x000004B8 -_02261D48: .word 0x000004BC -_02261D4C: .word 0x000004BD - thumb_func_end ov16_022611DC - - thumb_func_start ov16_02261D50 -ov16_02261D50: ; 0x02261D50 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - mov r0, #1 - add r3, sp, #0 - strh r0, [r3] - add r4, r1, #0 - mov r2, sp - ldrb r1, [r4, #0xd] - ldrh r6, [r3] - ldr r0, [r4, #0] - sub r2, r2, #4 - strh r6, [r2] - ldrh r3, [r3, #2] - strh r3, [r2, #2] - ldr r2, [r2, #0] - bl ov16_02265A70 - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [r4, #8] - ldr r0, [r0, #4] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02261D50 - - thumb_func_start ov16_02261DA8 -ov16_02261DA8: ; 0x02261DA8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [r4, #8] - ldr r0, [r0, #4] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02261DA8 - - thumb_func_start ov16_02261DE0 -ov16_02261DE0: ; 0x02261DE0 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02261DFC - ldr r0, [r4, #0] - bl ov16_0226474C -_02261DFC: - add r0, sp, #0 - ldrb r1, [r0] - add r2, sp, #0 - strh r1, [r0, #2] - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223F530 - cmp r0, #1 - bne _02261E16 - ldr r0, [r4, #0] - bl ov16_0226474C -_02261E16: - add r0, sp, #0 - ldrb r1, [r0] - ldrh r2, [r0, #2] - lsl r1, r1, #8 - orr r1, r2 - strh r1, [r0, #2] - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02261E36 - ldr r0, [r4, #0] - bl ov16_0226474C -_02261E36: - add r3, sp, #0 - ldrb r1, [r3] - mov r0, #0xf - mov r2, sp - and r0, r1 - strb r0, [r3, #4] - mov r0, #0 - strb r0, [r3, #5] - ldrb r1, [r4, #0xd] - ldrh r6, [r3, #2] - ldr r0, [r4, #0] - sub r2, r2, #4 - strh r6, [r2] - ldrh r3, [r3, #4] - strh r3, [r2, #2] - ldr r2, [r2, #0] - bl ov16_02265A70 - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - ldr r0, [r4, #8] - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [r4, #8] - ldr r0, [r0, #4] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02261DE0 - - thumb_func_start ov16_02261E8C -ov16_02261E8C: ; 0x02261E8C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E064 - ldrb r1, [r4, #0xa] - add r5, r0, #0 - cmp r1, #3 - bhi _02261F28 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02261EAE: ; jump table - .short _02261EB6 - _02261EAE - 2 ; case 0 - .short _02261F20 - _02261EAE - 2 ; case 1 - .short _02262196 - _02261EAE - 2 ; case 2 - .short _022621F2 - _02261EAE - 2 ; case 3 -_02261EB6: - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223DF04 - add r6, r0, #0 - mov r1, #0xff - bl sub_0201ADA4 - add r0, r6, #0 - bl sub_0201ACCC - ldr r0, [r4, #0] - bl ov16_0223E02C - bl ov16_0226CD08 - strb r0, [r4, #0x17] - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - mov r2, #3 - str r1, [sp] - mov r0, #7 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #5 - add r3, r1, #0 - add r0, r5, #0 - lsl r2, r2, #0xa - sub r3, #0xd - bl sub_02003178 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #0xa - add r3, r1, #0 - ldr r2, _0226221C ; =0x0000FFFF - add r0, r5, #0 - sub r3, #0x12 - bl sub_02003178 - ldrb r0, [r4, #0xa] - add sp, #0x24 - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r4, r5, r6, r7, pc} -_02261F20: - bl sub_0200384C - cmp r0, #0 - beq _02261F2A -_02261F28: - b _02262252 -_02261F2A: - ldr r0, [r4, #0] - bl ov16_0223B384 - mov r0, #5 - mov r1, #0x38 - bl sub_02018144 - str r0, [r4, #4] - mov r0, #5 - bl sub_02079FF4 - ldr r1, [r4, #4] - str r0, [r1, #0] - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #0xc - and r0, r1 - cmp r0, #0xc - beq _02261F5E - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #0xcb - beq _02261F5E - b _02262072 -_02261F5E: - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E1F8 - cmp r0, #2 - bne _02261F7A - ldrb r0, [r4, #9] - str r0, [sp, #0x18] - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - bl ov16_0223E258 - str r0, [sp, #0x14] - b _02261F88 -_02261F7A: - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E258 - str r0, [sp, #0x18] - ldrb r0, [r4, #9] - str r0, [sp, #0x14] -_02261F88: - mov r0, #5 - bl sub_02073C74 - add r6, r0, #0 - mov r5, #0 -_02261F92: - ldr r0, [r4, #4] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_0207A048 - add r5, r5, #1 - cmp r5, #6 - blt _02261F92 - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - mov r7, #0 - bl ov16_0223DF60 - cmp r0, #0 - ble _02261FFA - ldr r0, [sp, #0x18] - mov r1, #6 - mul r1, r0 - add r5, r4, r1 - add r6, r7, #0 -_02261FC0: - ldrb r2, [r5, #0x1c] - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - bl ov16_0223DFAC - str r0, [sp, #0x1c] - ldr r0, [r4, #4] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_0207A0FC - add r1, r0, #0 - ldr r0, [sp, #0x1c] - bl sub_020775EC - ldr r0, [r4, #4] - ldrb r1, [r5, #0x1c] - add r0, r0, r6 - add r0, #0x2c - strb r1, [r0] - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - add r5, r5, #1 - add r6, r6, #2 - add r7, r7, #1 - bl ov16_0223DF60 - cmp r7, r0 - blt _02261FC0 -_02261FFA: - ldr r0, [r4, #0] - ldr r1, [sp, #0x14] - mov r6, #0 - bl ov16_0223DF60 - cmp r0, #0 - ble _02262056 - ldr r0, [sp, #0x14] - mov r1, #6 - mul r1, r0 - mov r0, #1 - add r5, r4, r1 - str r0, [sp, #0xc] - add r7, r6, #0 -_02262016: - ldrb r2, [r5, #0x1c] - ldr r0, [r4, #0] - ldr r1, [sp, #0x14] - bl ov16_0223DFAC - str r0, [sp, #0x20] - ldr r0, [r4, #4] - ldr r1, [sp, #0xc] - ldr r0, [r0, #0] - bl sub_0207A0FC - add r1, r0, #0 - ldr r0, [sp, #0x20] - bl sub_020775EC - ldr r0, [r4, #4] - ldrb r1, [r5, #0x1c] - add r0, r0, r7 - add r0, #0x2d - strb r1, [r0] - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x14] - add r0, r0, #2 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - add r5, r5, #1 - add r7, r7, #2 - add r6, r6, #1 - bl ov16_0223DF60 - cmp r6, r0 - blt _02262016 -_02262056: - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E1F8 - cmp r0, #4 - bne _0226206A - ldr r0, [r4, #4] - mov r1, #1 - strb r1, [r0, #0x11] - b _022620F2 -_0226206A: - ldr r0, [r4, #4] - mov r1, #0 - strb r1, [r0, #0x11] - b _022620F2 -_02262072: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02262094 - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - bne _02262094 - ldrb r1, [r4, #9] - mov r0, #1 - add r7, r1, #0 - and r7, r0 - b _02262098 -_02262094: - ldrb r1, [r4, #9] - add r7, r1, #0 -_02262098: - ldr r0, [r4, #0] - bl ov16_0223E1F8 - cmp r0, #4 - bne _022620A6 - mov r1, #1 - b _022620A8 -_022620A6: - mov r1, #0 -_022620A8: - ldr r0, [r4, #4] - strb r1, [r0, #0x11] - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223DF20 - str r0, [sp, #0x10] - mov r6, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _022620F2 - mov r0, #6 - mul r0, r7 - add r5, r4, r0 -_022620C6: - ldrb r2, [r5, #0x1c] - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov16_0223DFAC - add r1, r0, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #0] - bl sub_0207A048 - ldr r0, [r4, #4] - ldrb r1, [r5, #0x1c] - add r0, r0, r6 - add r0, #0x2c - strb r1, [r0] - ldr r0, [sp, #0x10] - add r5, r5, #1 - add r6, r6, #1 - bl sub_0207A0F8 - cmp r6, r0 - blt _022620C6 -_022620F2: - ldr r1, [r4, #0] - ldr r0, [r4, #4] - str r1, [r0, #8] - ldr r0, [r4, #4] - mov r1, #5 - str r1, [r0, #0xc] - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x36 - strb r1, [r0] - ldr r1, [r4, #0x10] - ldr r0, [r4, #4] - strh r1, [r0, #0x24] - ldrb r1, [r4, #0x16] - ldr r0, [r4, #4] - strb r1, [r0, #0x12] - ldr r0, [r4, #4] - ldrb r1, [r4, #0xb] - add r0, #0x35 - strb r1, [r0] - ldrh r1, [r4, #0x14] - ldr r0, [r4, #4] - strh r1, [r0, #0x22] - ldrb r1, [r4, #9] - ldr r0, [r4, #4] - str r1, [r0, #0x28] - ldr r0, [r4, #4] - ldrb r1, [r4, #0x17] - add r0, #0x32 - strb r1, [r0] - ldrb r0, [r4, #9] - bl sub_020787CC - ldrb r1, [r4, #0x18] - tst r0, r1 - bne _02262142 - ldrb r0, [r4, #9] - add r0, r4, r0 - ldrb r1, [r0, #0xc] - b _02262144 -_02262142: - mov r1, #6 -_02262144: - ldr r0, [r4, #4] - strb r1, [r0, #0x14] - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - beq _0226215C - ldr r0, [r4, #4] - mov r1, #6 - strb r1, [r0, #0x15] - b _02262186 -_0226215C: - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E258 - bl sub_020787CC - ldrb r1, [r4, #0x18] - tst r0, r1 - bne _02262180 - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r0, r4, r0 - ldrb r1, [r0, #0xc] - ldr r0, [r4, #4] - strb r1, [r0, #0x15] - b _02262186 -_02262180: - ldr r0, [r4, #4] - mov r1, #6 - strb r1, [r0, #0x15] -_02262186: - ldr r0, [r4, #4] - bl ov12_0221FC20 - ldrb r0, [r4, #0xa] - add sp, #0x24 - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r4, r5, r6, r7, pc} -_02262196: - ldr r0, [r4, #4] - add r0, #0x36 - ldrb r0, [r0] - cmp r0, #0 - beq _02262252 - ldr r0, [r4, #0] - bl ov16_0223B430 - ldr r0, [r4, #0] - bl ov16_0223E02C - ldr r1, [r4, #4] - add r1, #0x32 - ldrb r1, [r1] - bl ov16_0226CD10 - mov r0, #7 - str r0, [sp] - mov r0, #0 - mov r1, #5 - str r0, [sp, #4] - mov r2, #3 - add r3, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - lsl r2, r2, #0xa - sub r3, #0xd - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - mov r1, #0xa - str r0, [sp, #4] - add r3, r1, #0 - str r0, [sp, #8] - ldr r2, _0226221C ; =0x0000FFFF - add r0, r5, #0 - sub r3, #0x12 - bl sub_02003178 - ldrb r0, [r4, #0xa] - add sp, #0x24 - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r4, r5, r6, r7, pc} -_022621F2: - bl sub_0200384C - cmp r0, #0 - bne _02262252 - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #0 - bl sub_02015738 - ldr r3, [r4, #4] - ldr r0, [r4, #0] - ldrb r2, [r3, #0x11] - cmp r2, #6 - bne _02262220 - ldrb r1, [r4, #9] - mov r2, #0xff - bl ov16_02265B10 - b _0226222E - nop -_0226221C: .word 0x0000FFFF -_02262220: - add r2, r3, r2 - add r2, #0x2c - ldrb r2, [r2] - ldrb r1, [r4, #9] - add r2, r2, #1 - bl ov16_02265B10 -_0226222E: - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - ldr r0, [r4, #4] - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02262252: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02261E8C - - thumb_func_start ov16_02262258 -ov16_02262258: ; 0x02262258 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp] - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #0x10 - ldrb r6, [r5, #9] - tst r1, r0 - bne _02262274 - mov r1, #8 - tst r0, r1 - beq _02262278 -_02262274: - str r6, [sp, #4] - b _02262282 -_02262278: - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov16_0223E258 - str r0, [sp, #4] -_02262282: - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov16_0225BE28 - add r4, r0, #0 - cmp r4, #6 - bne _022622E6 - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov16_0225BA88 - add r4, r0, #0 - cmp r4, #6 - bne _022622E6 - ldrb r1, [r5, #9] - ldr r0, [r5, #0] - bl ov16_0223DF20 - str r0, [sp, #8] - mov r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _022622E6 - ldr r0, [sp, #4] - add r7, r5, r6 - add r6, r5, r0 -_022622B8: - ldrb r1, [r5, #9] - ldr r0, [r5, #0] - add r2, r4, #0 - bl ov16_0223DFAC - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _022622DA - ldrb r0, [r7, #0xc] - cmp r4, r0 - beq _022622DA - ldrb r0, [r6, #0xc] - cmp r4, r0 - bne _022622E6 -_022622DA: - ldr r0, [sp, #8] - add r4, r4, #1 - bl sub_0207A0F8 - cmp r4, r0 - blt _022622B8 -_022622E6: - ldrb r1, [r5, #9] - ldr r0, [r5, #0] - add r2, r4, #1 - bl ov16_02265B10 - ldrb r1, [r5, #9] - ldrb r2, [r5, #8] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [sp] - bl sub_0200DA58 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02262258 - - thumb_func_start ov16_0226230C -ov16_0226230C: ; 0x0226230C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #9] - add r5, r0, #0 - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0226230C - - thumb_func_start ov16_0226232C -ov16_0226232C: ; 0x0226232C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r1, [r4, #9] - add r6, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02262348 - ldr r0, [r4, #0] - bl ov16_0226474C -_02262348: - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #0 - beq _02262354 - cmp r0, #6 - bls _0226235C -_02262354: - ldr r0, [r4, #0] - bl ov16_02264730 - b _022623C4 -_0226235C: - ldrb r1, [r4, #9] - sub r5, r0, #1 - ldr r0, [r4, #0] - bl ov16_0223DF20 - ldrb r1, [r4, #9] - add r1, r4, r1 - ldrb r1, [r1, #0xc] - cmp r5, r1 - beq _02262376 - ldrb r1, [r4, #0x16] - cmp r5, r1 - bne _0226237E -_02262376: - ldr r0, [r4, #0] - bl ov16_02264730 - b _022623C4 -_0226237E: - add r1, sp, #0 - ldrb r5, [r1] - bl sub_0207A0F8 - cmp r5, r0 - ldr r0, [r4, #0] - ble _02262392 - bl ov16_02264730 - b _022623C4 -_02262392: - ldrb r1, [r4, #9] - sub r2, r5, #1 - bl ov16_0223DFAC - mov r1, #0xa3 - mov r2, #0 - add r5, r0, #0 - bl sub_02074470 - cmp r0, #0 - bne _022623AE - ldr r0, [r4, #0] - bl ov16_02264730 -_022623AE: - add r0, r5, #0 - mov r1, #0xae - mov r2, #0 - bl sub_02074470 - ldr r1, _022623EC ; =0x000001EE - cmp r0, r1 - bne _022623C4 - ldr r0, [r4, #0] - bl ov16_02264730 -_022623C4: - add r2, sp, #0 - ldrb r1, [r4, #9] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02265B10 - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_022623EC: .word 0x000001EE - thumb_func_end ov16_0226232C - - thumb_func_start ov16_022623F0 -ov16_022623F0: ; 0x022623F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r0, [r4, #0] - bl ov16_0223E02C - add r5, r0, #0 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223DF14 - str r0, [sp, #0xc] - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - bl ov16_0223E258 - add r1, r0, #0 - ldrb r0, [r4, #0xd] - cmp r1, r0 - beq _0226242A - ldr r0, [r4, #0] - bl ov16_0223F35C - add r7, r0, #0 - b _0226242C -_0226242A: - mov r7, #0 -_0226242C: - ldrb r0, [r4, #0xe] - cmp r0, #4 - bhi _022624AC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226243E: ; jump table - .short _02262448 - _0226243E - 2 ; case 0 - .short _02262498 - _0226243E - 2 ; case 1 - .short _02262572 - _0226243E - 2 ; case 2 - .short _02262590 - _0226243E - 2 ; case 3 - .short _022625F8 - _0226243E - 2 ; case 4 -_02262448: - add r0, r5, #0 - bl ov16_02269348 - cmp r0, #0 - beq _022624AC - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02262490 - ldr r0, [r4, #0] - bl ov16_0223E05C - add r5, r0, #0 - ldrb r0, [r4, #0xf] - cmp r0, #5 - add r0, sp, #0x10 - bne _02262472 - mov r1, #0x82 - strb r1, [r0, #5] - ldr r0, [r4, #0x14] - str r0, [sp, #0x18] - b _02262476 -_02262472: - mov r1, #0 - strb r1, [r0, #5] -_02262476: - ldr r1, [r4, #0x10] - add r0, sp, #0x10 - strh r1, [r0, #6] - ldr r0, [r4, #0] - bl ov16_0223EDF0 - add r3, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, sp, #0x14 - bl ov16_0223FB24 - strh r0, [r4, #0x1a] -_02262490: - mov r0, #1 - add sp, #0x38 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02262498: - ldrh r0, [r4, #0x1a] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _022624AE - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _022624AE -_022624AC: - b _02262622 -_022624AE: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_02269218 - ldrh r1, [r4, #0x18] - add r0, sp, #0x10 - strh r1, [r0] - ldrb r0, [r4, #0xf] - cmp r0, #5 - bhi _0226255A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022624E0: ; jump table - .short _022624EC - _022624E0 - 2 ; case 0 - .short _02262502 - _022624E0 - 2 ; case 1 - .short _02262518 - _022624E0 - 2 ; case 2 - .short _0226252E - _022624E0 - 2 ; case 3 - .short _02262544 - _022624E0 - 2 ; case 4 - .short _022624EC - _022624E0 - 2 ; case 5 -_022624EC: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #0xd - bl ov16_02268C04 - b _0226255E -_02262502: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #0xe - bl ov16_02268C04 - b _0226255E -_02262518: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #0xf - bl ov16_02268C04 - b _0226255E -_0226252E: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #0x10 - bl ov16_02268C04 - b _0226255E -_02262544: - mov r0, #0 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #0x11 - bl ov16_02268C04 - b _0226255E -_0226255A: - bl sub_02022974 -_0226255E: - mov r0, #2 - strb r0, [r4, #0xe] - add r0, r7, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} -_02262572: - add r0, r5, #0 - bl ov16_0226925C - mov r1, #0 - mvn r1, r1 - str r0, [r4, #8] - cmp r0, r1 - beq _02262622 - ldr r0, _02262628 ; =0x000005DD - bl sub_02005748 - mov r0, #3 - add sp, #0x38 - strb r0, [r4, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_02262590: - add r0, r5, #0 - bl ov16_02269348 - cmp r0, #1 - bne _02262622 - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - str r0, [sp, #8] - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov16_022675AC - ldr r0, [sp, #0xc] - bl ov16_022647D8 - add r0, r7, #0 - bl ov16_0226846C - add r0, r5, #0 - bl ov16_02269218 - mov r3, #0 - str r3, [sp] - ldr r0, [sp, #8] - str r3, [sp, #4] - add r1, r6, #0 - add r2, r5, #0 - bl ov16_02268C04 - ldr r0, [r4, #8] - cmp r0, #1 - bne _022625E4 - add r0, r5, #0 - mov r1, #0 - bl ov16_0226BCCC -_022625E4: - mov r0, #4 - strb r0, [r4, #0xe] - ldr r0, [sp, #8] - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} -_022625F8: - add r0, r5, #0 - bl ov16_0226BCD0 - cmp r0, #1 - bne _02262622 - ldrb r1, [r4, #0xd] - ldr r0, [r4, #0] - ldr r2, [r4, #8] - bl ov16_022656D4 - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02262622: - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02262628: .word 0x000005DD - thumb_func_end ov16_022623F0 - - thumb_func_start ov16_0226262C -ov16_0226262C: ; 0x0226262C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0226262C - - thumb_func_start ov16_0226264C -ov16_0226264C: ; 0x0226264C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0226264C - - thumb_func_start ov16_0226266C -ov16_0226266C: ; 0x0226266C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #0 - bl ov16_0223F530 - cmp r0, #1 - bne _02262686 - ldr r0, [r4, #0] - bl ov16_0226474C -_02262686: - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #0 - beq _02262696 - cmp r0, #0xff - beq _0226269C - cmp r0, #1 - beq _0226269C -_02262696: - ldr r0, [r4, #0] - bl ov16_02264730 -_0226269C: - add r2, sp, #0 - ldrb r1, [r4, #0xd] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_022656D4 - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0226266C - - thumb_func_start ov16_022626C0 -ov16_022626C0: ; 0x022626C0 - push {r3, r4, r5, lr} - sub sp, #0x1fc - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x6a - ldrb r0, [r0] - cmp r0, #0xa - bls _022626D6 - b _02262924 -_022626D6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022626E2: ; jump table - .short _022626F8 - _022626E2 - 2 ; case 0 - .short _02262902 - _022626E2 - 2 ; case 1 - .short _02262752 - _022626E2 - 2 ; case 2 - .short _02262902 - _022626E2 - 2 ; case 3 - .short _022627AE - _022626E2 - 2 ; case 4 - .short _02262902 - _022626E2 - 2 ; case 5 - .short _022627FC - _022626E2 - 2 ; case 6 - .short _02262902 - _022626E2 - 2 ; case 7 - .short _02262884 - _022626E2 - 2 ; case 8 - .short _02262902 - _022626E2 - 2 ; case 9 - .short _022628E0 - _022626E2 - 2 ; case 10 -_022626F8: - ldrh r0, [r4, #0x1e] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _02262746 - ldr r0, [r4, #0x5c] - cmp r0, #0 - bne _02262746 - ldr r0, [r4, #8] - mov r1, #6 - bl sub_020080C0 - cmp r0, #0 - bne _02262746 - add r0, r4, #0 - add r0, #0x69 - ldrb r1, [r0] - mov r0, #0xf - add r2, sp, #0x1b8 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #0xc] - add r3, sp, #0x1b8 - bl ov16_02264408 - add sp, #0x1fc - mov r0, #1 - add r4, #0x6a - add sp, #0x14 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262746: - add sp, #0x1fc - mov r0, #4 - add r4, #0x6a - add sp, #0x14 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262752: - add r3, r4, #0 - add r3, #0x69 - ldrb r3, [r3] - ldr r0, [r4, #0] - add r1, #0x10 - add r2, sp, #0x168 - bl ov16_02264530 - add r0, sp, #0x168 - mov r1, #5 - bl ov12_022382BC - add r0, r4, #0 - add r0, #0x69 - ldrb r1, [r0] - mov r0, #0x10 - add r2, sp, #0x110 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #0xc] - add r3, sp, #0x110 - bl ov16_02264408 - mov r0, #0x1a - add sp, #0x1fc - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - add r0, #0x6a - ldrb r0, [r0] - add r4, #0x6a - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_022627AE: - ldr r0, [r4, #0] - mov r1, #2 - bl ov16_0223F460 - add r0, r4, #0 - add r0, #0x6b - ldrb r0, [r0] - cmp r0, #0 - beq _022627C6 - ldr r0, [r4, #0] - bl ov16_0223F3EC -_022627C6: - add r0, r4, #0 - add r0, #0x6c - ldrb r0, [r0] - cmp r0, #0 - beq _022627DC - ldr r0, [r4, #0] - bl ov16_0223E000 - mov r1, #1 - bl sub_02008B54 -_022627DC: - add r3, r4, #0 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #0xc] - add r3, #0x10 - bl ov16_02264408 - add r0, r4, #0 - add r0, #0x6a - ldrb r0, [r0] - add sp, #0x1fc - add r4, #0x6a - add r0, r0, #1 - add sp, #0x14 - strb r0, [r4] - pop {r3, r4, r5, pc} -_022627FC: - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223F460 - add r0, r4, #0 - add r0, #0x6b - ldrb r0, [r0] - cmp r0, #0 - beq _02262814 - ldr r0, [r4, #0] - bl ov16_0223F3BC -_02262814: - add r0, r4, #0 - add r0, #0x6c - ldrb r0, [r0] - cmp r0, #0 - beq _0226282A - ldr r0, [r4, #0] - bl ov16_0223E000 - mov r1, #1 - bl sub_02008B60 -_0226282A: - ldrh r0, [r4, #0x1e] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _02262878 - ldr r0, [r4, #0x5c] - cmp r0, #0 - bne _02262878 - ldr r0, [r4, #8] - mov r1, #6 - bl sub_020080C0 - cmp r0, #0 - bne _02262878 - add r0, r4, #0 - add r0, #0x69 - ldrb r1, [r0] - mov r0, #0xf - add r2, sp, #0xb8 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #0xc] - add r3, sp, #0xb8 - bl ov16_02264408 - add sp, #0x1fc - mov r0, #7 - add r4, #0x6a - add sp, #0x14 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262878: - add sp, #0x1fc - mov r0, #0xa - add r4, #0x6a - add sp, #0x14 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262884: - add r3, r4, #0 - add r3, #0x69 - ldrb r3, [r3] - ldr r0, [r4, #0] - add r1, #0x10 - add r2, sp, #0x68 - bl ov16_02264530 - add r0, sp, #0x68 - mov r1, #5 - bl ov12_02238390 - add r0, r4, #0 - add r0, #0x69 - ldrb r1, [r0] - mov r0, #0x10 - add r2, sp, #0x10 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #0xc] - add r3, sp, #0x10 - bl ov16_02264408 - mov r0, #0x1a - add sp, #0x1fc - ldr r1, [r4, #4] - mov r2, #1 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - add r0, #0x6a - ldrb r0, [r0] - add r4, #0x6a - add sp, #0x14 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_022628E0: - add r2, r4, #0 - add r1, #0x69 - add r2, #0x68 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, pc} -_02262902: - ldr r0, [r4, #0xc] - bl ov12_0222016C - ldr r0, [r4, #0xc] - bl ov12_02220188 - cmp r0, #0 - bne _02262924 - ldr r0, [r4, #0xc] - bl ov12_02220198 - add r0, r4, #0 - add r0, #0x6a - ldrb r0, [r0] - add r4, #0x6a - add r0, r0, #1 - strb r0, [r4] -_02262924: - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022626C0 - - thumb_func_start ov16_0226292C -ov16_0226292C: ; 0x0226292C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #9] - cmp r0, #6 - bhs _02262966 - ldrb r0, [r4, #0xa] - cmp r0, #0 - bne _02262960 - mov r0, #2 - strb r0, [r4, #0xa] - ldrb r0, [r4, #9] - mov r1, #6 - add r0, r0, #1 - strb r0, [r4, #9] - ldr r0, [r4, #4] - bl sub_020080C0 - add r3, r0, #0 - mov r2, #1 - ldr r0, [r4, #4] - mov r1, #6 - eor r2, r3 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_02262960: - sub r0, r0, #1 - strb r0, [r4, #0xa] - pop {r3, r4, r5, pc} -_02262966: - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - ldrb r1, [r4, #8] - ldr r0, [r4, #0] - mov r2, #0x17 - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0226292C - - thumb_func_start ov16_02262988 -ov16_02262988: ; 0x02262988 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _0226299A - cmp r0, #1 - beq _022629A8 - b _022629BE -_0226299A: - ldr r1, [r4, #0x30] - add r0, r4, #0 - bl ov16_022674C4 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_022629A8: - add r0, r4, #0 - bl ov16_022674F8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _022629D8 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_022629BE: - add r2, r4, #0 - add r1, #0x24 - add r2, #0x4c - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0xc] - bl ov16_02266ABC - mov r0, #0 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_0200DA58 -_022629D8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02262988 - - thumb_func_start ov16_022629DC -ov16_022629DC: ; 0x022629DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #0 - beq _022629F2 - cmp r0, #1 - beq _02262A0E - cmp r0, #2 - beq _02262A54 - b _02262A7A -_022629F2: - add r0, r4, #0 - mov r1, #0 - add r0, #0x4e - strb r1, [r0] - ldr r0, _02262A98 ; =0x0000070B - bl sub_02005748 - ldr r1, [r4, #0x40] - add r0, r4, #0 - bl ov16_0226752C - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_02262A0E: - add r0, r4, #0 - add r0, #0x4e - ldrb r0, [r0] - cmp r0, #8 - bhs _02262A26 - add r0, r4, #0 - add r0, #0x4e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x4e - strb r1, [r0] -_02262A26: - add r0, r4, #0 - bl ov16_02267560 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02262A94 - add r0, r4, #0 - add r0, #0x4e - ldrb r0, [r0] - cmp r0, #8 - blo _02262A4C - ldr r0, _02262A98 ; =0x0000070B - mov r1, #0 - bl sub_020057A4 - mov r0, #0x64 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262A4C: - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262A54: - add r0, r4, #0 - add r0, #0x4e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x4e - strb r1, [r0] - add r0, r4, #0 - add r0, #0x4e - ldrb r0, [r0] - cmp r0, #8 - blo _02262A94 - ldr r0, _02262A98 ; =0x0000070B - mov r1, #0 - bl sub_020057A4 - mov r0, #0x64 - strb r0, [r4] - pop {r3, r4, r5, pc} -_02262A7A: - add r2, r4, #0 - add r1, #0x24 - add r2, #0x4c - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0xc] - bl ov16_02266ABC - mov r0, #0 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_0200DA58 -_02262A94: - pop {r3, r4, r5, pc} - nop -_02262A98: .word 0x0000070B - thumb_func_end ov16_022629DC - - thumb_func_start ov16_02262A9C -ov16_02262A9C: ; 0x02262A9C - push {r3, r4, r5, r6, lr} - sub sp, #0x114 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r1, r4, #0 - add r1, #0x66 - ldrb r1, [r1] - add r5, r0, #0 - cmp r1, #0xa - bls _02262AB8 - b _02262D20 -_02262AB8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02262AC4: ; jump table - .short _02262ADA - _02262AC4 - 2 ; case 0 - .short _02262B82 - _02262AC4 - 2 ; case 1 - .short _02262B26 - _02262AC4 - 2 ; case 2 - .short _02262B82 - _02262AC4 - 2 ; case 3 - .short _02262BA6 - _02262AC4 - 2 ; case 4 - .short _02262BF8 - _02262AC4 - 2 ; case 5 - .short _02262C12 - _02262AC4 - 2 ; case 6 - .short _02262C4E - _02262AC4 - 2 ; case 7 - .short _02262C7A - _02262AC4 - 2 ; case 8 - .short _02262CBA - _02262AC4 - 2 ; case 9 - .short _02262D02 - _02262AC4 - 2 ; case 10 -_02262ADA: - add r0, r4, #0 - add r0, #0x70 - ldrh r0, [r0] - cmp r0, #0 - beq _02262B1C - add r0, r4, #0 - add r0, #0x65 - ldrb r1, [r0] - mov r0, #0xf - add r2, sp, #0xbc - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0xbc - bl ov16_02264408 - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r4, #0x66 - add sp, #0x114 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262B1C: - mov r0, #4 - add r4, #0x66 - add sp, #0x114 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262B26: - add r3, r4, #0 - add r3, #0x65 - ldrb r3, [r3] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0xc - add r2, sp, #0x6c - bl ov16_02264530 - add r0, sp, #0x6c - mov r1, #5 - bl ov12_022382BC - add r0, r4, #0 - add r0, #0x65 - ldrb r1, [r0] - mov r0, #0x10 - add r2, sp, #0x14 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x14 - bl ov16_02264408 - mov r0, #0x1a - ldr r1, [r4, #4] - mov r2, #0 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r4, #0x66 - add sp, #0x114 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262B82: - bl ov12_0222016C - add r0, r5, #0 - bl ov12_02220188 - cmp r0, #0 - bne _02262C00 - add r0, r5, #0 - bl ov12_02220198 - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r4, #0x66 - add sp, #0x114 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262BA6: - add r0, r4, #0 - add r0, #0x67 - ldrb r0, [r0] - cmp r0, #2 - bne _02262BB4 - mov r5, #0x75 - b _02262BB8 -_02262BB4: - mov r5, #0x74 - mvn r5, r5 -_02262BB8: - add r1, r4, #0 - add r1, #0x65 - ldrb r1, [r1] - ldr r0, [r4, #0] - bl ov16_0223EE30 - str r5, [sp] - mov r1, #0x7f - str r1, [sp, #4] - add r1, r4, #0 - add r1, #0x72 - ldrh r1, [r1] - add r3, r4, #0 - mov r2, #0 - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - str r2, [sp, #0x10] - add r2, r4, #0 - add r2, #0x68 - add r3, #0x6b - ldrh r2, [r2] - ldrb r3, [r3] - bl sub_02077DB4 - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x66 - strb r1, [r0] -_02262BF8: - bl sub_0200598C - cmp r0, #0 - beq _02262C02 -_02262C00: - b _02262D20 -_02262C02: - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r4, #0x66 - add sp, #0x114 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262C12: - add r0, r4, #0 - add r0, #0x67 - ldrb r0, [r0] - cmp r0, #2 - ldr r0, _02262D24 ; =0x00000703 - bne _02262C26 - mov r1, #0x75 - bl sub_02005728 - b _02262C2E -_02262C26: - mov r1, #0x74 - mvn r1, r1 - bl sub_02005728 -_02262C2E: - ldr r0, [r4, #8] - mov r1, #0x29 - bl sub_020080C0 - cmp r0, #0 - ble _02262C44 - mov r0, #7 - add r4, #0x66 - add sp, #0x114 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262C44: - mov r0, #8 - add r4, #0x66 - add sp, #0x114 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262C4E: - ldr r0, [r4, #8] - mov r1, #0x29 - bl sub_020080C0 - add r5, r0, #0 - sub r5, #8 - bpl _02262C5E - mov r5, #0 -_02262C5E: - ldr r0, [r4, #8] - mov r1, #0x29 - add r2, r5, #0 - bl sub_02007DEC - cmp r5, #0 - bne _02262D20 - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x66 - strb r1, [r0] -_02262C7A: - ldr r0, [r4, #0x6c] - add r1, r4, #0 - str r0, [sp] - add r0, r4, #0 - add r2, r4, #0 - add r3, r4, #0 - add r0, #0x68 - add r1, #0x6a - add r2, #0x67 - add r3, #0x6b - ldrh r0, [r0] - ldrb r1, [r1] - ldrb r2, [r2] - ldrb r3, [r3] - bl sub_02076648 - mov r3, #0x50 - sub r0, r3, r0 - str r0, [sp] - mov r1, #0 - ldr r0, [r4, #8] - add r2, r1, #0 - bl sub_020086D4 - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r4, #0x66 - add sp, #0x114 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262CBA: - ldr r0, [r4, #8] - mov r1, #1 - bl sub_020080C0 - add r2, r0, #0 - ldr r0, [r4, #8] - mov r1, #1 - add r2, #8 - bl sub_02007DEC - ldr r0, [r4, #8] - mov r1, #0x12 - bl sub_020080C0 - add r5, r0, #0 - sub r5, #8 - bpl _02262CDE - mov r5, #0 -_02262CDE: - ldr r0, [r4, #8] - mov r1, #0x12 - add r2, r5, #0 - bl sub_02007DEC - cmp r5, #0 - bne _02262D20 - ldr r0, [r4, #8] - bl sub_02007DC8 - add r0, r4, #0 - add r0, #0x66 - ldrb r0, [r0] - add r4, #0x66 - add sp, #0x114 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, pc} -_02262D02: - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x65 - add r2, #0x64 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02262D20: - add sp, #0x114 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02262D24: .word 0x00000703 - thumb_func_end ov16_02262A9C - - thumb_func_start ov16_02262D28 -ov16_02262D28: ; 0x02262D28 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E064 - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E000 - add r7, r0, #0 - ldrb r0, [r5, #6] - cmp r0, #0 - beq _02262D52 - cmp r0, #1 - beq _02262D90 - cmp r0, #2 - beq _02262DA4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_02262D52: - ldr r0, [r5, #0] - bl ov16_0223E220 - mov r1, #1 - bl sub_02015738 - mov r1, #0 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r2, _02262DC0 ; =0x0000FFFF - add r0, r4, #0 - mov r1, #0xf - mov r3, #1 - bl sub_02003178 - mov r1, #0 - add r0, r7, #0 - mov r2, #0x10 - add r3, r1, #0 - str r1, [sp] - bl sub_0200872C - mov r0, #0 - mov r1, #0x10 - bl sub_0200564C - ldrb r0, [r5, #6] - add r0, r0, #1 - strb r0, [r5, #6] -_02262D90: - add r0, r4, #0 - bl sub_0200384C - cmp r0, #0 - bne _02262DBA - ldrb r0, [r5, #6] - add sp, #0xc - add r0, r0, #1 - strb r0, [r5, #6] - pop {r4, r5, r6, r7, pc} -_02262DA4: - ldrb r1, [r5, #5] - ldrb r2, [r5, #4] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02262DBA: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02262DC0: .word 0x0000FFFF - thumb_func_end ov16_02262D28 - - thumb_func_start ov16_02262DC4 -ov16_02262DC4: ; 0x02262DC4 - push {r4, r5, r6, lr} - sub sp, #0x110 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E008 - add r1, r4, #0 - add r1, #0x62 - ldrb r1, [r1] - add r5, r0, #0 - cmp r1, #4 - bls _02262DE0 - b _02262F0C -_02262DE0: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02262DEC: ; jump table - .short _02262DF6 - _02262DEC - 2 ; case 0 - .short _02262E38 - _02262DEC - 2 ; case 1 - .short _02262EE8 - _02262DEC - 2 ; case 2 - .short _02262E8C - _02262DEC - 2 ; case 3 - .short _02262EE8 - _02262DEC - 2 ; case 4 -_02262DF6: - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - cmp r0, #0 - beq _02262E2E - add r2, r4, #0 - add r2, #0x63 - ldrb r2, [r2] - mov r1, #6 - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x63 - ldrb r0, [r0] - cmp r0, #1 - bne _02262E1E - mov r0, #0xff - add r4, #0x62 - add sp, #0x110 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262E1E: - add r0, r4, #0 - add r0, #0x62 - ldrb r0, [r0] - add r4, #0x62 - add sp, #0x110 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262E2E: - mov r0, #0xff - add r4, #0x62 - add sp, #0x110 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262E38: - ldr r0, [r4, #0x64] - cmp r0, #0 - beq _02262E82 - mov r0, #0x1a - ldr r1, [r4, #4] - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - bne _02262E82 - add r0, r4, #0 - add r0, #0x61 - ldrb r1, [r0] - mov r0, #0xf - add r2, sp, #0xb8 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0xb8 - bl ov16_02264408 - add r0, r4, #0 - add r0, #0x62 - ldrb r0, [r0] - add r4, #0x62 - add sp, #0x110 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262E82: - mov r0, #0xff - add r4, #0x62 - add sp, #0x110 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262E8C: - add r3, r4, #0 - add r3, #0x61 - ldrb r3, [r3] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #8 - add r2, sp, #0x68 - bl ov16_02264530 - add r0, sp, #0x68 - mov r1, #5 - bl ov12_02238390 - add r0, r4, #0 - add r0, #0x61 - ldrb r1, [r0] - mov r0, #0x10 - add r2, sp, #0x10 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - ldr r0, [r4, #0] - mov r3, #1 - bl ov16_02266B78 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r5, #0 - add r3, sp, #0x10 - bl ov16_02264408 - mov r0, #0x1a - ldr r1, [r4, #4] - mov r2, #1 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - add r0, #0x62 - ldrb r0, [r0] - add r4, #0x62 - add sp, #0x110 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262EE8: - bl ov12_0222016C - add r0, r5, #0 - bl ov12_02220188 - cmp r0, #0 - bne _02262F2A - add r0, r5, #0 - bl ov12_02220198 - add r0, r4, #0 - add r0, #0x62 - ldrb r0, [r0] - add r4, #0x62 - add sp, #0x110 - add r0, r0, #1 - strb r0, [r4] - pop {r4, r5, r6, pc} -_02262F0C: - add r1, r4, #0 - add r2, r4, #0 - add r1, #0x61 - add r2, #0x60 - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02262F2A: - add sp, #0x110 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02262DC4 - - thumb_func_start ov16_02262F30 -ov16_02262F30: ; 0x02262F30 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xa] - cmp r0, #0 - beq _02262F42 - cmp r0, #1 - beq _02262F58 - pop {r3, r4, r5, pc} -_02262F42: - ldr r0, [r4, #4] - add r1, #0xb - bl ov16_0226834C - ldr r0, _02262F78 ; =0x0000070C - bl sub_02005748 - ldrb r0, [r4, #0xa] - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r3, r4, r5, pc} -_02262F58: - ldrb r0, [r4, #0xb] - cmp r0, #1 - bne _02262F74 - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02262F74: - pop {r3, r4, r5, pc} - nop -_02262F78: .word 0x0000070C - thumb_func_end ov16_02262F30 - - thumb_func_start ov16_02262F7C -ov16_02262F7C: ; 0x02262F7C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F29C - cmp r0, #0 - beq _02262F9E - ldr r0, [r4, #0] - bl ov16_0223F29C - bl sub_0200EBA0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223F2A4 -_02262F9E: - ldrb r0, [r4, #6] - bl sub_0201D724 - cmp r0, #0 - bne _02262FBE - ldrb r1, [r4, #5] - ldrb r2, [r4, #4] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02262FBE: - pop {r3, r4, r5, pc} - thumb_func_end ov16_02262F7C - - thumb_func_start ov16_02262FC0 -ov16_02262FC0: ; 0x02262FC0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #7] - cmp r0, #0 - beq _02262FD2 - cmp r0, #1 - beq _02262FE8 - pop {r3, r4, r5, pc} -_02262FD2: - ldrb r0, [r4, #6] - bl sub_0201D724 - cmp r0, #0 - bne _02263012 - ldrb r0, [r4, #7] - add r0, r0, #1 - strb r0, [r4, #7] - mov r0, #0 - strb r0, [r4, #8] - pop {r3, r4, r5, pc} -_02262FE8: - ldrb r0, [r4, #8] - add r0, r0, #1 - strb r0, [r4, #8] - ldrb r0, [r4, #8] - cmp r0, #0x28 - bne _02263012 - ldrb r1, [r4, #5] - ldr r0, [r4, #0] - bl ov16_022661B0 - ldrb r1, [r4, #5] - ldrb r2, [r4, #4] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02263012: - pop {r3, r4, r5, pc} - thumb_func_end ov16_02262FC0 - - thumb_func_start ov16_02263014 -ov16_02263014: ; 0x02263014 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r0, [r4, #0] - bl ov16_0223E064 - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E22C - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E240 - lsl r1, r0, #2 - ldr r0, _02263388 ; =0x0226F1D0 - ldr r0, [r0, r1] - str r0, [sp, #0xc] - ldrb r0, [r4, #0x15] - add r0, r0, #1 - strb r0, [r4, #0x15] - ldrb r0, [r4, #0x14] - cmp r0, #5 - bls _0226304E - b _02263384 -_0226304E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226305A: ; jump table - .short _02263066 - _0226305A - 2 ; case 0 - .short _022630A6 - _0226305A - 2 ; case 1 - .short _0226325C - _0226305A - 2 ; case 2 - .short _02263278 - _0226305A - 2 ; case 3 - .short _02263294 - _0226305A - 2 ; case 4 - .short _022632A6 - _0226305A - 2 ; case 5 -_02263066: - mov r0, #5 - mov r1, #0 - bl ov12_02237EFC - str r0, [r4, #4] - ldr r0, _0226338C ; =0x0226F31C - add r1, sp, #0x10 - ldrb r5, [r0, r5] - mov r0, #1 - str r0, [sp, #0x14] - str r5, [sp, #0x10] - ldr r0, [r4, #4] - bl ov12_02237F38 - str r0, [r4, #8] - add r0, r5, #1 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [r4, #4] - add r1, sp, #0x10 - bl ov12_02237F38 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - bl ov12_02238004 - ldr r0, _02263390 ; =0x0000084F - bl sub_02005748 - mov r0, #1 - strb r0, [r4, #0x14] -_022630A6: - ldrb r0, [r4, #0x15] - cmp r0, #0xa - bne _022630E0 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _02263394 ; =0x0000F3FF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r7, #0 - mov r1, #1 - bl sub_02003178 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _02263398 ; =0x00003FFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r7, #0 - mov r1, #4 - bl sub_02003178 -_022630E0: - ldrb r0, [r4, #0x15] - cmp r0, #0xa - blo _0226312A - ldrb r0, [r4, #0x16] - cmp r0, #0x10 - bhs _0226312A - add r0, r0, #1 - strb r0, [r4, #0x16] - ldrb r0, [r4, #0x16] - cmp r0, #0x10 - bls _022630FA - mov r0, #0x10 - strb r0, [r4, #0x16] -_022630FA: - add r0, r7, #0 - mov r1, #1 - bl sub_0200316C - add r6, r0, #0 - mov r0, #1 - mov r5, #0 - lsl r0, r0, #8 -_0226310A: - ldrb r2, [r4, #0x16] - mov r1, #0x1f - mul r1, r2 - lsl r1, r1, #0xc - lsr r3, r1, #0x10 - lsl r1, r3, #5 - lsl r2, r3, #0xa - orr r1, r3 - orr r2, r1 - lsl r1, r5, #1 - strh r2, [r6, r1] - add r1, r5, #1 - lsl r1, r1, #0x10 - lsr r5, r1, #0x10 - cmp r5, r0 - blo _0226310A -_0226312A: - ldrb r0, [r4, #0x15] - cmp r0, #0x14 - bne _02263136 - ldr r0, [r4, #0xc] - bl ov12_02238004 -_02263136: - ldrb r0, [r4, #0x15] - cmp r0, #0x17 - bne _02263144 - mov r0, #0x85 - lsl r0, r0, #4 - bl sub_02005748 -_02263144: - ldrb r0, [r4, #0x15] - cmp r0, #0x1c - bne _02263236 - add r0, r7, #0 - mov r1, #0 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F204 - add r1, r5, #0 - mov r2, #0xe0 - bl sub_020C4B18 - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #0x4a - bne _02263186 - add r0, r7, #0 - mov r1, #2 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0xa0 - bl sub_020C4B18 - b _022631E8 -_02263186: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _022631AA - add r0, r7, #0 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0xe0 - bl sub_020C4B18 - b _022631E8 -_022631AA: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - beq _022631D0 - add r0, r7, #0 - mov r1, #2 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0xa0 - bl sub_020C4B18 - b _022631E8 -_022631D0: - add r0, r7, #0 - mov r1, #2 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0x80 - bl sub_020C4B18 -_022631E8: - mov r0, #0x10 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r3, #0 - lsl r0, r0, #0x10 - str r3, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r2, _02263394 ; =0x0000F3FF - add r0, r7, #0 - mov r1, #1 - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r3, #0 - lsl r0, r0, #0x10 - str r3, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r2, _02263398 ; =0x00003FFF - add r0, r7, #0 - mov r1, #4 - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r3, #0 - lsl r0, r0, #0x10 - str r3, [sp, #4] - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r2, _0226339C ; =0x0000FFFF - add r0, r7, #0 - mov r1, #0xa - bl sub_02003178 -_02263236: - ldrb r0, [r4, #0x15] - cmp r0, #0x32 - blo _02263266 - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - mov r2, #3 - str r3, [sp, #8] - add r0, r7, #0 - mov r1, #1 - lsl r2, r2, #0xa - bl sub_02003178 - ldrb r0, [r4, #0x14] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r3, r4, r5, r6, r7, pc} -_0226325C: - ldr r0, [r4, #0xc] - bl ov12_0223802C - cmp r0, #0 - beq _02263268 -_02263266: - b _02263384 -_02263268: - ldr r0, [r4, #4] - bl ov12_02237F74 - ldrb r0, [r4, #0x14] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r3, r4, r5, r6, r7, pc} -_02263278: - ldr r0, [r4, #0] - bl ov16_0223E220 - mov r1, #0 - bl sub_02015738 - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02263294: - ldr r0, [r4, #4] - bl ov12_02237F98 - ldr r0, [r4, #4] - bl ov12_02237F74 - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] -_022632A6: - add r0, r7, #0 - mov r1, #0 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F204 - add r1, r5, #0 - mov r2, #0xe0 - bl sub_020C4B18 - ldr r0, [r4, #0] - bl ov16_0223DF0C - cmp r0, #0x4a - bne _022632E2 - add r0, r7, #0 - mov r1, #2 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0xa0 - bl sub_020C4B18 - b _02263344 -_022632E2: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - beq _02263306 - add r0, r7, #0 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0xe0 - bl sub_020C4B18 - b _02263344 -_02263306: - ldr r0, [r4, #0] - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - beq _0226332C - add r0, r7, #0 - mov r1, #2 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0xa0 - bl sub_020C4B18 - b _02263344 -_0226332C: - add r0, r7, #0 - mov r1, #2 - bl sub_02003164 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223F210 - add r1, r5, #0 - mov r2, #0x80 - bl sub_020C4B18 -_02263344: - mov r3, #0 - str r3, [sp] - ldr r0, _022633A0 ; =0x00007FFF - str r3, [sp, #4] - str r0, [sp, #8] - ldr r2, _0226339C ; =0x0000FFFF - add r0, r7, #0 - mov r1, #1 - bl sub_02003178 - mov r3, #0 - str r3, [sp] - ldr r2, _0226339C ; =0x0000FFFF - str r3, [sp, #4] - str r2, [sp, #8] - add r0, r7, #0 - mov r1, #4 - lsr r2, r2, #2 - bl sub_02003178 - mov r3, #0 - str r3, [sp] - ldr r0, _022633A0 ; =0x00007FFF - str r3, [sp, #4] - str r0, [sp, #8] - ldr r2, _0226339C ; =0x0000FFFF - add r0, r7, #0 - mov r1, #0xa - bl sub_02003178 - mov r0, #3 - strb r0, [r4, #0x14] -_02263384: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02263388: .word 0x0226F1D0 -_0226338C: .word 0x0226F31C -_02263390: .word 0x0000084F -_02263394: .word 0x0000F3FF -_02263398: .word 0x00003FFF -_0226339C: .word 0x0000FFFF -_022633A0: .word 0x00007FFF - thumb_func_end ov16_02263014 - - thumb_func_start ov16_022633A4 -ov16_022633A4: ; 0x022633A4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E064 - ldrb r1, [r4, #0xa] - add r6, r0, #0 - cmp r1, #3 - bls _022633BC - b _022634D4 -_022633BC: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022633C8: ; jump table - .short _022633D0 - _022633C8 - 2 ; case 0 - .short _022633F0 - _022633C8 - 2 ; case 1 - .short _02263460 - _022633C8 - 2 ; case 2 - .short _02263492 - _022633C8 - 2 ; case 3 -_022633D0: - mov r2, #0 - str r2, [sp] - mov r1, #0x10 - str r1, [sp, #4] - mov r1, #0xa - str r2, [sp, #8] - add r3, r1, #0 - ldr r2, _022634D8 ; =0x0000FFFF - sub r3, #0x12 - bl sub_02003178 - ldrb r0, [r4, #0xa] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, pc} -_022633F0: - bl sub_0200384C - cmp r0, #0 - bne _022634D4 - ldr r0, [r4, #0] - bl ov16_0223B384 - mov r0, #5 - mov r1, #0x38 - bl sub_02018144 - str r0, [r4, #4] - ldrb r1, [r4, #9] - ldr r0, [r4, #0] - bl ov16_0223DF20 - ldr r1, [r4, #4] - mov r2, #3 - str r0, [r1, #0] - ldr r1, [r4, #0] - ldr r0, [r4, #4] - str r1, [r0, #8] - ldr r0, [r4, #4] - mov r1, #5 - str r1, [r0, #0xc] - ldrb r1, [r4, #0xe] - ldr r0, [r4, #4] - strb r1, [r0, #0x11] - ldrh r1, [r4, #0xc] - ldr r0, [r4, #4] - strh r1, [r0, #0x24] - ldr r1, [r4, #4] - mov r0, #0 - add r1, #0x36 - strb r0, [r1] - ldr r1, [r4, #4] - strb r0, [r1, #0x12] - ldr r1, [r4, #4] - add r1, #0x35 - strb r2, [r1] - ldr r1, [r4, #4] - strh r0, [r1, #0x22] - ldrb r2, [r4, #9] - ldr r1, [r4, #4] - str r2, [r1, #0x28] - ldr r1, [r4, #4] - add r1, #0x32 - strb r0, [r1] - ldr r0, [r4, #4] - bl ov12_0221FC20 - ldrb r0, [r4, #0xa] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, pc} -_02263460: - ldr r0, [r4, #4] - add r0, #0x36 - ldrb r0, [r0] - cmp r0, #0 - beq _022634D4 - ldr r0, [r4, #0] - bl ov16_0223B430 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - mov r1, #0xa - str r0, [sp, #4] - add r3, r1, #0 - str r0, [sp, #8] - ldr r2, _022634D8 ; =0x0000FFFF - add r0, r6, #0 - sub r3, #0x12 - bl sub_02003178 - ldrb r0, [r4, #0xa] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xa] - pop {r3, r4, r5, r6, pc} -_02263492: - bl sub_0200384C - cmp r0, #0 - bne _022634D4 - ldr r0, [r4, #4] - add r0, #0x34 - ldrb r2, [r0] - ldr r0, [r4, #0] - cmp r2, #4 - bne _022634B0 - ldrb r1, [r4, #9] - mov r2, #0xff - bl ov16_02265B10 - b _022634B8 -_022634B0: - ldrb r1, [r4, #9] - add r2, r2, #1 - bl ov16_02265B10 -_022634B8: - ldrb r1, [r4, #9] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - bl ov16_02266ABC - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_022634D4: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022634D8: .word 0x0000FFFF - thumb_func_end ov16_022633A4 - - thumb_func_start ov16_022634DC -ov16_022634DC: ; 0x022634DC - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5, #0xa] - cmp r0, #0 - beq _022634EE - cmp r0, #1 - beq _02263532 - pop {r3, r4, r5, pc} -_022634EE: - ldrb r1, [r5, #0xc] - ldrb r0, [r5, #0xd] - cmp r1, r0 - bne _0226352C - mov r0, #0 - strb r0, [r5, #0xc] - ldr r0, [r5, #4] - mov r1, #0x28 - bl sub_020080C0 - add r4, r0, #0 - ldrb r0, [r5, #0xb] - cmp r4, r0 - ble _0226350E - sub r4, r4, #1 - b _02263514 -_0226350E: - cmp r4, r0 - bge _02263514 - add r4, r4, #1 -_02263514: - ldr r0, [r5, #4] - mov r1, #0x28 - add r2, r4, #0 - bl sub_02007DEC - ldrb r0, [r5, #0xb] - cmp r4, r0 - bne _02263548 - ldrb r0, [r5, #0xa] - add r0, r0, #1 - strb r0, [r5, #0xa] - pop {r3, r4, r5, pc} -_0226352C: - add r0, r1, #1 - strb r0, [r5, #0xc] - pop {r3, r4, r5, pc} -_02263532: - ldrb r1, [r5, #9] - ldrb r2, [r5, #8] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_02263548: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022634DC - - thumb_func_start ov16_0226354C -ov16_0226354C: ; 0x0226354C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - ldrb r1, [r5, #5] - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E208 - cmp r0, #0 - bne _02263564 - mov r6, #0 - b _02263566 -_02263564: - mov r6, #1 -_02263566: - ldrb r0, [r5, #7] - cmp r0, #0 - beq _02263572 - cmp r0, #1 - beq _022635CE - b _022635E8 -_02263572: - ldrb r0, [r5, #0xe] - cmp r0, #0 - bne _02263580 - mov r0, #0 - str r0, [sp, #8] - mov r7, #1 - b _0226359A -_02263580: - mov r0, #1 - str r0, [sp, #8] - ldrb r0, [r5, #6] - cmp r0, #3 - beq _02263590 - cmp r0, #5 - beq _02263594 - b _02263598 -_02263590: - mov r7, #0 - b _0226359A -_02263594: - mov r7, #2 - b _0226359A -_02263598: - ldr r7, [sp, #8] -_0226359A: - ldr r0, [r5, #0] - bl ov16_0223E010 - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E018 - str r4, [sp] - str r0, [sp, #4] - add r0, r5, #0 - ldr r2, [sp, #8] - add r0, #8 - add r1, r6, #0 - add r3, r7, #0 - bl ov16_0226D194 - add r2, r0, #0 - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov16_0223E040 - ldrb r0, [r5, #7] - add sp, #0xc - add r0, r0, #1 - strb r0, [r5, #7] - pop {r4, r5, r6, r7, pc} -_022635CE: - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov16_0223E034 - bl ov16_0226D1FC - cmp r0, #1 - bne _022635FE - ldrb r0, [r5, #7] - add sp, #0xc - add r0, r0, #1 - strb r0, [r5, #7] - pop {r4, r5, r6, r7, pc} -_022635E8: - ldrb r1, [r5, #5] - ldrb r2, [r5, #4] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_022635FE: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0226354C - - thumb_func_start ov16_02263604 -ov16_02263604: ; 0x02263604 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldrb r1, [r5, #5] - add r7, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E208 - cmp r0, #0 - bne _0226361A - mov r4, #0 - b _0226361C -_0226361A: - mov r4, #1 -_0226361C: - ldr r0, [r5, #0] - add r1, r4, #0 - bl ov16_0223E034 - ldrb r1, [r5, #7] - add r6, r0, #0 - cmp r1, #0 - beq _02263632 - cmp r1, #1 - beq _0226364E - b _0226366E -_02263632: - ldrb r0, [r5, #0xe] - cmp r0, #0 - bne _0226363C - mov r1, #0 - b _0226363E -_0226363C: - mov r1, #1 -_0226363E: - add r0, r6, #0 - add r2, r1, #0 - bl ov16_0226D220 - ldrb r0, [r5, #7] - add r0, r0, #1 - strb r0, [r5, #7] - pop {r3, r4, r5, r6, r7, pc} -_0226364E: - bl ov16_0226D258 - cmp r0, #1 - bne _02263684 - add r0, r6, #0 - bl ov16_0226D27C - ldr r0, [r5, #0] - add r1, r4, #0 - mov r2, #0 - bl ov16_0223E040 - ldrb r0, [r5, #7] - add r0, r0, #1 - strb r0, [r5, #7] - pop {r3, r4, r5, r6, r7, pc} -_0226366E: - ldrb r1, [r5, #5] - ldrb r2, [r5, #4] - ldr r0, [r5, #0] - bl ov16_02266ABC - add r0, r5, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 -_02263684: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02263604 - - thumb_func_start ov16_02263688 -ov16_02263688: ; 0x02263688 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xe] - cmp r0, #0 - bne _022636BA - ldr r0, [r4, #4] - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - beq _022636A2 - bl sub_02022974 -_022636A2: - ldrb r2, [r4, #0xd] - ldr r0, [r4, #0] - mov r1, #5 - bl ov12_022234F8 - ldr r1, [r4, #4] - add r1, #0x8c - str r0, [r1, #0] - ldrb r0, [r4, #0xe] - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, pc} -_022636BA: - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02263688 - - thumb_func_start ov16_022636D4 -ov16_022636D4: ; 0x022636D4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _022636E8 - bl sub_02022974 -_022636E8: - ldr r0, [r4, #4] - add r0, #0x8c - ldr r0, [r0, #0] - bl ov12_022237D8 - cmp r0, #3 - bne _02263702 - ldrb r0, [r4, #0xe] - cmp r0, #5 - bhs _02263702 - add r0, r0, #1 - strb r0, [r4, #0xe] - pop {r3, r4, r5, pc} -_02263702: - ldr r0, [r4, #4] - ldrb r1, [r4, #0xd] - add r0, #0x8c - ldr r0, [r0, #0] - bl ov12_022237A4 - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x8c - str r1, [r0, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xc] - ldr r0, [r4, #0] - bl ov16_02266ABC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022636D4 - - thumb_func_start ov16_02263730 -ov16_02263730: ; 0x02263730 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - bl ov16_0223DF0C - add r4, r0, #0 - add r0, r6, #0 - bl ov16_0223EBEC - mov r1, #0x40 - tst r1, r4 - beq _022637B8 - mov r2, #0x65 - lsl r2, r2, #2 - ldrb r1, [r5, r2] - cmp r1, #0 - beq _02263772 - ldr r0, _02263A74 ; =ov16_02260AB4 - mov r1, #1 - str r0, [r5, #0] - ldr r0, _02263A78 ; =ov16_02260DB0 - str r0, [r5, #4] - ldr r0, _02263A7C ; =ov16_022610A8 - str r0, [r5, #8] - ldr r0, _02263A80 ; =ov16_02261D50 - str r0, [r5, #0xc] - ldr r0, _02263A84 ; =ov16_02262258 - str r0, [r5, #0x10] - ldr r0, _02263A88 ; =ov16_0226262C - str r0, [r5, #0x14] - add r0, r2, #2 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_02263772: - mov r1, #0x10 - tst r0, r1 - beq _02263798 - ldr r0, _02263A8C ; =ov16_02260BAC - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263A90 ; =ov16_02260E98 - str r0, [r5, #4] - ldr r0, _02263A94 ; =ov16_0226110C - str r0, [r5, #8] - ldr r0, _02263A98 ; =ov16_02261DE0 - str r0, [r5, #0xc] - ldr r0, _02263A9C ; =ov16_0226232C - str r0, [r5, #0x10] - ldr r0, _02263AA0 ; =ov16_0226266C - str r0, [r5, #0x14] - add r0, r2, #2 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_02263798: - ldr r0, _02263AA4 ; =ov16_022604C8 - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263AA8 ; =ov16_02260C00 - str r0, [r5, #4] - ldr r0, _02263AAC ; =ov16_02260F14 - str r0, [r5, #8] - ldr r0, _02263AB0 ; =ov16_022611DC - str r0, [r5, #0xc] - ldr r0, _02263AB4 ; =ov16_02261E8C - str r0, [r5, #0x10] - ldr r0, _02263AB8 ; =ov16_022623F0 - str r0, [r5, #0x14] - add r0, r2, #2 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_022637B8: - mov r1, #0x88 - and r1, r4 - cmp r1, #0x88 - bne _02263892 - ldr r2, _02263ABC ; =0x00000195 - mov r1, #1 - ldrb r3, [r5, r2] - tst r1, r3 - beq _02263814 - add r0, r6, #0 - bl ov16_0223ED60 - cmp r0, #0 - beq _022637F4 - ldr r0, _02263A74 ; =ov16_02260AB4 - mov r1, #1 - str r0, [r5, #0] - ldr r0, _02263A78 ; =ov16_02260DB0 - str r0, [r5, #4] - ldr r0, _02263A7C ; =ov16_022610A8 - str r0, [r5, #8] - ldr r0, _02263A80 ; =ov16_02261D50 - str r0, [r5, #0xc] - ldr r0, _02263A84 ; =ov16_02262258 - str r0, [r5, #0x10] - ldr r0, _02263A88 ; =ov16_0226262C - str r0, [r5, #0x14] - ldr r0, _02263AC0 ; =0x00000196 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_022637F4: - ldr r0, _02263AC4 ; =ov16_02260AE4 - mov r1, #2 - str r0, [r5, #0] - ldr r0, _02263AC8 ; =ov16_02260E78 - str r0, [r5, #4] - ldr r0, _02263ACC ; =ov16_022610EC - str r0, [r5, #8] - ldr r0, _02263AD0 ; =ov16_02261DA8 - str r0, [r5, #0xc] - ldr r0, _02263AD4 ; =ov16_0226230C - str r0, [r5, #0x10] - ldr r0, _02263AD8 ; =ov16_0226264C - str r0, [r5, #0x14] - ldr r0, _02263AC0 ; =0x00000196 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_02263814: - mov r1, #0x10 - tst r0, r1 - beq _0226383A - ldr r0, _02263A8C ; =ov16_02260BAC - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263A90 ; =ov16_02260E98 - str r0, [r5, #4] - ldr r0, _02263A94 ; =ov16_0226110C - str r0, [r5, #8] - ldr r0, _02263A98 ; =ov16_02261DE0 - str r0, [r5, #0xc] - ldr r0, _02263A9C ; =ov16_0226232C - str r0, [r5, #0x10] - ldr r0, _02263AA0 ; =ov16_0226266C - str r0, [r5, #0x14] - add r0, r2, #1 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_0226383A: - add r0, r6, #0 - bl ov16_0223F6E4 - add r1, r0, #0 - add r0, r6, #0 - lsl r1, r1, #1 - bl ov16_0223E1F8 - ldr r1, _02263ABC ; =0x00000195 - ldrb r2, [r5, r1] - cmp r2, r0 - beq _02263872 - ldr r0, _02263AC4 ; =ov16_02260AE4 - mov r2, #2 - str r0, [r5, #0] - ldr r0, _02263AC8 ; =ov16_02260E78 - str r0, [r5, #4] - ldr r0, _02263ACC ; =ov16_022610EC - str r0, [r5, #8] - ldr r0, _02263AD0 ; =ov16_02261DA8 - str r0, [r5, #0xc] - ldr r0, _02263AD4 ; =ov16_0226230C - str r0, [r5, #0x10] - ldr r0, _02263AD8 ; =ov16_0226264C - str r0, [r5, #0x14] - add r0, r1, #1 - strb r2, [r5, r0] - pop {r4, r5, r6, pc} -_02263872: - ldr r0, _02263AA4 ; =ov16_022604C8 - mov r2, #0 - str r0, [r5, #0] - ldr r0, _02263AA8 ; =ov16_02260C00 - str r0, [r5, #4] - ldr r0, _02263AAC ; =ov16_02260F14 - str r0, [r5, #8] - ldr r0, _02263AB0 ; =ov16_022611DC - str r0, [r5, #0xc] - ldr r0, _02263AB4 ; =ov16_02261E8C - str r0, [r5, #0x10] - ldr r0, _02263AB8 ; =ov16_022623F0 - str r0, [r5, #0x14] - add r0, r1, #1 - strb r2, [r5, r0] - pop {r4, r5, r6, pc} -_02263892: - mov r1, #8 - tst r1, r4 - beq _02263914 - mov r1, #0x10 - tst r0, r1 - beq _022638BE - ldr r0, _02263A8C ; =ov16_02260BAC - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263A90 ; =ov16_02260E98 - str r0, [r5, #4] - ldr r0, _02263A94 ; =ov16_0226110C - str r0, [r5, #8] - ldr r0, _02263A98 ; =ov16_02261DE0 - str r0, [r5, #0xc] - ldr r0, _02263A9C ; =ov16_0226232C - str r0, [r5, #0x10] - ldr r0, _02263AA0 ; =ov16_0226266C - str r0, [r5, #0x14] - ldr r0, _02263AC0 ; =0x00000196 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_022638BE: - add r0, r6, #0 - bl ov16_0223F6E4 - add r1, r0, #0 - add r0, r6, #0 - bl ov16_0223E1F8 - ldr r1, _02263ABC ; =0x00000195 - ldrb r2, [r5, r1] - cmp r2, r0 - beq _022638F4 - ldr r0, _02263AC4 ; =ov16_02260AE4 - mov r2, #2 - str r0, [r5, #0] - ldr r0, _02263AC8 ; =ov16_02260E78 - str r0, [r5, #4] - ldr r0, _02263ACC ; =ov16_022610EC - str r0, [r5, #8] - ldr r0, _02263AD0 ; =ov16_02261DA8 - str r0, [r5, #0xc] - ldr r0, _02263AD4 ; =ov16_0226230C - str r0, [r5, #0x10] - ldr r0, _02263AD8 ; =ov16_0226264C - str r0, [r5, #0x14] - add r0, r1, #1 - strb r2, [r5, r0] - pop {r4, r5, r6, pc} -_022638F4: - ldr r0, _02263AA4 ; =ov16_022604C8 - mov r2, #0 - str r0, [r5, #0] - ldr r0, _02263AA8 ; =ov16_02260C00 - str r0, [r5, #4] - ldr r0, _02263AAC ; =ov16_02260F14 - str r0, [r5, #8] - ldr r0, _02263AB0 ; =ov16_022611DC - str r0, [r5, #0xc] - ldr r0, _02263AB4 ; =ov16_02261E8C - str r0, [r5, #0x10] - ldr r0, _02263AB8 ; =ov16_022623F0 - str r0, [r5, #0x14] - add r0, r1, #1 - strb r2, [r5, r0] - pop {r4, r5, r6, pc} -_02263914: - mov r1, #4 - add r2, r4, #0 - tst r2, r1 - beq _0226398C - mov r1, #0x10 - tst r0, r1 - beq _02263942 - ldr r0, _02263A8C ; =ov16_02260BAC - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263A90 ; =ov16_02260E98 - str r0, [r5, #4] - ldr r0, _02263A94 ; =ov16_0226110C - str r0, [r5, #8] - ldr r0, _02263A98 ; =ov16_02261DE0 - str r0, [r5, #0xc] - ldr r0, _02263A9C ; =ov16_0226232C - str r0, [r5, #0x10] - ldr r0, _02263AA0 ; =ov16_0226266C - str r0, [r5, #0x14] - ldr r0, _02263AC0 ; =0x00000196 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_02263942: - ldr r0, _02263ABC ; =0x00000195 - mov r1, #1 - ldrb r2, [r5, r0] - tst r1, r2 - beq _0226396C - ldr r1, _02263AC4 ; =ov16_02260AE4 - add r0, r0, #1 - str r1, [r5, #0] - ldr r1, _02263AC8 ; =ov16_02260E78 - str r1, [r5, #4] - ldr r1, _02263ACC ; =ov16_022610EC - str r1, [r5, #8] - ldr r1, _02263AD0 ; =ov16_02261DA8 - str r1, [r5, #0xc] - ldr r1, _02263AD4 ; =ov16_0226230C - str r1, [r5, #0x10] - ldr r1, _02263AD8 ; =ov16_0226264C - str r1, [r5, #0x14] - mov r1, #2 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_0226396C: - ldr r1, _02263AA4 ; =ov16_022604C8 - add r0, r0, #1 - str r1, [r5, #0] - ldr r1, _02263AA8 ; =ov16_02260C00 - str r1, [r5, #4] - ldr r1, _02263AAC ; =ov16_02260F14 - str r1, [r5, #8] - ldr r1, _02263AB0 ; =ov16_022611DC - str r1, [r5, #0xc] - ldr r1, _02263AB4 ; =ov16_02261E8C - str r1, [r5, #0x10] - ldr r1, _02263AB8 ; =ov16_022623F0 - str r1, [r5, #0x14] - mov r1, #0 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_0226398C: - lsl r1, r1, #7 - tst r1, r4 - beq _022639C8 - ldr r0, _02263ABC ; =0x00000195 - mov r1, #1 - ldrb r2, [r5, r0] - tst r2, r1 - beq _022639B2 - ldr r2, _02263ADC ; =ov16_02260B84 - add r0, r0, #1 - str r2, [r5, #0] - mov r2, #0 - str r2, [r5, #4] - str r2, [r5, #8] - str r2, [r5, #0xc] - str r2, [r5, #0x10] - str r2, [r5, #0x14] - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_022639B2: - ldr r1, _02263AA4 ; =ov16_022604C8 - add r0, r0, #1 - str r1, [r5, #0] - mov r1, #0 - str r1, [r5, #4] - str r1, [r5, #8] - str r1, [r5, #0xc] - str r1, [r5, #0x10] - str r1, [r5, #0x14] - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_022639C8: - mov r1, #0x20 - tst r1, r4 - beq _02263A06 - ldr r0, _02263ABC ; =0x00000195 - mov r1, #1 - ldrb r2, [r5, r0] - tst r2, r1 - beq _022639EE - ldr r2, _02263AE0 ; =ov16_02260B04 - add r0, r0, #1 - str r2, [r5, #0] - mov r2, #0 - str r2, [r5, #4] - str r2, [r5, #8] - str r2, [r5, #0xc] - str r2, [r5, #0x10] - str r2, [r5, #0x14] - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_022639EE: - ldr r1, _02263AA4 ; =ov16_022604C8 - mov r2, #0 - str r1, [r5, #0] - str r2, [r5, #4] - str r2, [r5, #8] - str r2, [r5, #0xc] - ldr r1, _02263AB8 ; =ov16_022623F0 - str r2, [r5, #0x10] - str r1, [r5, #0x14] - add r0, r0, #1 - strb r2, [r5, r0] - pop {r4, r5, r6, pc} -_02263A06: - ldr r2, _02263ABC ; =0x00000195 - mov r1, #1 - ldrb r3, [r5, r2] - tst r3, r1 - beq _02263A2E - ldr r0, _02263A74 ; =ov16_02260AB4 - str r0, [r5, #0] - ldr r0, _02263A78 ; =ov16_02260DB0 - str r0, [r5, #4] - ldr r0, _02263A7C ; =ov16_022610A8 - str r0, [r5, #8] - ldr r0, _02263A80 ; =ov16_02261D50 - str r0, [r5, #0xc] - ldr r0, _02263A84 ; =ov16_02262258 - str r0, [r5, #0x10] - ldr r0, _02263A88 ; =ov16_0226262C - str r0, [r5, #0x14] - add r0, r2, #1 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_02263A2E: - mov r1, #0x10 - tst r0, r1 - beq _02263A54 - ldr r0, _02263A8C ; =ov16_02260BAC - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263A90 ; =ov16_02260E98 - str r0, [r5, #4] - ldr r0, _02263A94 ; =ov16_0226110C - str r0, [r5, #8] - ldr r0, _02263A98 ; =ov16_02261DE0 - str r0, [r5, #0xc] - ldr r0, _02263A9C ; =ov16_0226232C - str r0, [r5, #0x10] - ldr r0, _02263AA0 ; =ov16_0226266C - str r0, [r5, #0x14] - add r0, r2, #1 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_02263A54: - ldr r0, _02263AA4 ; =ov16_022604C8 - mov r1, #0 - str r0, [r5, #0] - ldr r0, _02263AA8 ; =ov16_02260C00 - str r0, [r5, #4] - ldr r0, _02263AAC ; =ov16_02260F14 - str r0, [r5, #8] - ldr r0, _02263AB0 ; =ov16_022611DC - str r0, [r5, #0xc] - ldr r0, _02263AB4 ; =ov16_02261E8C - str r0, [r5, #0x10] - ldr r0, _02263AB8 ; =ov16_022623F0 - str r0, [r5, #0x14] - add r0, r2, #1 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02263A74: .word ov16_02260AB4 -_02263A78: .word ov16_02260DB0 -_02263A7C: .word ov16_022610A8 -_02263A80: .word ov16_02261D50 -_02263A84: .word ov16_02262258 -_02263A88: .word ov16_0226262C -_02263A8C: .word ov16_02260BAC -_02263A90: .word ov16_02260E98 -_02263A94: .word ov16_0226110C -_02263A98: .word ov16_02261DE0 -_02263A9C: .word ov16_0226232C -_02263AA0: .word ov16_0226266C -_02263AA4: .word ov16_022604C8 -_02263AA8: .word ov16_02260C00 -_02263AAC: .word ov16_02260F14 -_02263AB0: .word ov16_022611DC -_02263AB4: .word ov16_02261E8C -_02263AB8: .word ov16_022623F0 -_02263ABC: .word 0x00000195 -_02263AC0: .word 0x00000196 -_02263AC4: .word ov16_02260AE4 -_02263AC8: .word ov16_02260E78 -_02263ACC: .word ov16_022610EC -_02263AD0: .word ov16_02261DA8 -_02263AD4: .word ov16_0226230C -_02263AD8: .word ov16_0226264C -_02263ADC: .word ov16_02260B84 -_02263AE0: .word ov16_02260B04 - thumb_func_end ov16_02263730 - - thumb_func_start ov16_02263AE4 -ov16_02263AE4: ; 0x02263AE4 - ldr r1, _02263AEC ; =0x00000195 - ldrb r0, [r0, r1] - bx lr - nop -_02263AEC: .word 0x00000195 - thumb_func_end ov16_02263AE4 - - thumb_func_start ov16_02263AF0 -ov16_02263AF0: ; 0x02263AF0 - ldr r1, _02263AF8 ; =0x00000196 - ldrb r0, [r0, r1] - bx lr - nop -_02263AF8: .word 0x00000196 - thumb_func_end ov16_02263AF0 - - thumb_func_start ov16_02263AFC -ov16_02263AFC: ; 0x02263AFC - ldr r1, [r0, #0x20] - cmp r1, #0 - bne _02263B04 - ldr r1, [r0, #0x1c] -_02263B04: - add r0, r1, #0 - bx lr - thumb_func_end ov16_02263AFC - - thumb_func_start ov16_02263B08 -ov16_02263B08: ; 0x02263B08 - add r0, #0x28 - bx lr - thumb_func_end ov16_02263B08 - - thumb_func_start ov16_02263B0C -ov16_02263B0C: ; 0x02263B0C - add r0, #0x80 - bx lr - thumb_func_end ov16_02263B0C - - thumb_func_start ov16_02263B10 -ov16_02263B10: ; 0x02263B10 - ldr r3, _02263B1C ; =sub_020C4CF4 - add r0, #0x80 - mov r1, #0 - mov r2, #8 - bx r3 - nop -_02263B1C: .word sub_020C4CF4 - thumb_func_end ov16_02263B10 - - thumb_func_start ov16_02263B20 -ov16_02263B20: ; 0x02263B20 - push {r3, lr} - ldr r0, [r0, #0x18] - cmp r0, #0 - beq _02263B2C - bl sub_0200D3F4 -_02263B2C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02263B20 - - thumb_func_start ov16_02263B30 -ov16_02263B30: ; 0x02263B30 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - ldr r4, [sp, #0x50] - add r7, r0, #0 - str r1, [sp, #0x14] - add r5, r2, #0 - str r3, [sp, #0x18] - bl ov16_0223E0C8 - add r1, r4, #0 - bl ov16_0223F2B8 - str r0, [sp, #0x20] - add r0, r7, #0 - add r1, r4, #0 - bl ov16_0223E1F8 - add r6, r0, #0 - mov r0, #1 - and r0, r6 - str r0, [sp, #0x1c] - beq _02263B60 - mov r1, #2 - b _02263B62 -_02263B60: - mov r1, #0 -_02263B62: - ldr r0, [r5, #0xc] - ldr r3, [sp, #0x20] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r1, [sp, #8] - ldrh r0, [r5, #6] - mov r2, #5 - str r0, [sp, #0xc] - ldrh r0, [r5] - ldrh r1, [r5, #2] - bl sub_02013750 - add r0, r7, #0 - bl ov16_0223E0C8 - ldrh r2, [r5] - add r1, r4, #0 - bl ov16_0223F2CC - add r0, r7, #0 - bl ov16_0223E0C8 - ldrh r2, [r5, #4] - add r1, r4, #0 - bl ov16_0223F2E4 - add r0, r7, #0 - bl ov16_0223E0C8 - ldr r2, [sp, #0x40] - add r1, r4, #0 - bl ov16_0223F2FC - ldr r0, [sp, #0x3c] - ldr r3, [sp, #0x40] - str r0, [sp] - str r4, [sp, #4] - str r4, [sp, #8] - ldr r0, [sp, #0x54] - ldr r4, [sp, #0x38] - str r0, [sp, #0xc] - ldr r0, [sp, #0x58] - ldr r2, [sp, #0x18] - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r1, r5, #0 - add r3, r4, r3 - bl sub_02007C7C - add r4, r0, #0 - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _02263C16 - cmp r6, #1 - ble _02263BD4 - asr r6, r6, #1 -_02263BD4: - add r0, r4, #0 - mov r1, #0x2a - add r2, r6, #0 - bl sub_02007DEC - ldr r2, [sp, #0x4c] - add r0, r4, #0 - mov r1, #0x2e - bl sub_02007DEC - ldr r2, [sp, #0x38] - add r0, r4, #0 - mov r1, #0x14 - add r2, #0x24 - bl sub_02007DEC - ldr r2, [sp, #0x48] - add r0, r4, #0 - mov r1, #0x15 - bl sub_02007DEC - ldr r3, [sp, #0x40] - mov r2, #0x24 - add r0, r4, #0 - mov r1, #0x16 - sub r2, r2, r3 - bl sub_02007DEC - ldr r2, [sp, #0x44] - add r0, r4, #0 - mov r1, #0x29 - bl sub_02007DEC -_02263C16: - add r0, r4, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_02263B30 - - thumb_func_start ov16_02263C1C -ov16_02263C1C: ; 0x02263C1C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r1, _02263CD8 ; =0x00000195 - add r6, r2, #0 - ldrb r2, [r5, r1] - mov r1, #1 - add r7, r0, #0 - add r4, r3, #0 - tst r1, r2 - beq _02263C76 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - beq _02263C56 - ldr r0, _02263CDC ; =0x000003DE - strh r0, [r4, #2] - mov r0, #0x1b - strb r0, [r4, #1] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - str r1, [r4, #4] - ldrb r1, [r5, r0] - ldrb r0, [r6, #1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_02263C56: - ldr r0, _02263CE0 ; =0x000003DD - strh r0, [r4, #2] - mov r0, #0x32 - strb r0, [r4, #1] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - str r1, [r4, #4] - ldrb r1, [r5, r0] - str r1, [r4, #8] - ldrb r1, [r5, r0] - ldrb r0, [r6, #1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02263C76: - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02263CC0 - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - bne _02263CC0 - ldrh r0, [r6, #2] - cmp r0, #0 - bne _02263C9A - mov r0, #0xf6 - lsl r0, r0, #2 - strh r0, [r4, #2] - b _02263CC4 -_02263C9A: - cmp r0, #0x19 - bhs _02263CA4 - ldr r0, _02263CE4 ; =0x000003D9 - strh r0, [r4, #2] - b _02263CC4 -_02263CA4: - cmp r0, #0x32 - bhs _02263CB0 - mov r0, #0xf7 - lsl r0, r0, #2 - strh r0, [r4, #2] - b _02263CC4 -_02263CB0: - cmp r0, #0x4b - bhs _02263CBA - ldr r0, _02263CE8 ; =0x000003DA - strh r0, [r4, #2] - b _02263CC4 -_02263CBA: - ldr r0, _02263CEC ; =0x000003DB - strh r0, [r4, #2] - b _02263CC4 -_02263CC0: - ldr r0, _02263CE4 ; =0x000003D9 - strh r0, [r4, #2] -_02263CC4: - mov r0, #2 - strb r0, [r4, #1] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - ldrb r0, [r6, #1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02263CD8: .word 0x00000195 -_02263CDC: .word 0x000003DE -_02263CE0: .word 0x000003DD -_02263CE4: .word 0x000003D9 -_02263CE8: .word 0x000003DA -_02263CEC: .word 0x000003DB - thumb_func_end ov16_02263C1C - - thumb_func_start ov16_02263CF0 -ov16_02263CF0: ; 0x02263CF0 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r1, _02263DB0 ; =0x00000195 - add r6, r2, #0 - ldrb r2, [r5, r1] - mov r1, #1 - add r7, r0, #0 - add r4, r3, #0 - tst r1, r2 - beq _02263D4C - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - bne _02263D30 - mov r0, #0xf3 - lsl r0, r0, #2 - strh r0, [r4, #2] - mov r0, #0x32 - strb r0, [r4, #1] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - str r1, [r4, #4] - ldrb r1, [r5, r0] - str r1, [r4, #8] - ldrb r1, [r5, r0] - ldrb r0, [r6, #1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02263D30: - ldr r0, _02263DB4 ; =0x000003CE - strh r0, [r4, #2] - mov r0, #0x1b - strb r0, [r4, #1] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - str r1, [r4, #4] - ldrb r1, [r5, r0] - ldrb r0, [r6, #1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_02263D4C: - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - bne _02263D98 - add r0, r7, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - bne _02263D98 - ldrh r1, [r6, #2] - cmp r1, #0x64 - bhs _02263D6E - ldr r0, _02263DB8 ; =0x000003D6 - strh r0, [r4, #2] - b _02263D9C -_02263D6E: - ldr r0, _02263DBC ; =0x00000145 - cmp r1, r0 - bhs _02263D7A - ldr r0, _02263DC0 ; =0x000003D7 - strh r0, [r4, #2] - b _02263D9C -_02263D7A: - add r0, #0xe1 - cmp r1, r0 - bhs _02263D86 - ldr r0, _02263DC4 ; =0x000003D5 - strh r0, [r4, #2] - b _02263D9C -_02263D86: - ldr r0, _02263DC8 ; =0x00000307 - cmp r1, r0 - bhs _02263D92 - add r0, #0xcd - strh r0, [r4, #2] - b _02263D9C -_02263D92: - add r0, #0xcc - strh r0, [r4, #2] - b _02263D9C -_02263D98: - ldr r0, _02263DCC ; =0x000003D3 - strh r0, [r4, #2] -_02263D9C: - mov r0, #2 - strb r0, [r4, #1] - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - ldrb r0, [r6, #1] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02263DB0: .word 0x00000195 -_02263DB4: .word 0x000003CE -_02263DB8: .word 0x000003D6 -_02263DBC: .word 0x00000145 -_02263DC0: .word 0x000003D7 -_02263DC4: .word 0x000003D5 -_02263DC8: .word 0x00000307 -_02263DCC: .word 0x000003D3 - thumb_func_end ov16_02263CF0 - - thumb_func_start ov16_02263DD0 -ov16_02263DD0: ; 0x02263DD0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r2, #0 - bl ov16_0223DF0C - add r4, r0, #0 - mov r0, #2 - tst r0, r4 - beq _02263DF6 - add r0, r7, #0 - mov r1, #3 - bl ov16_0223E1C4 - add r6, r0, #0 - add r0, r7, #0 - mov r1, #5 - bl ov16_0223E1C4 - b _02263E00 -_02263DF6: - add r0, r7, #0 - mov r1, #1 - bl ov16_0223E1C4 - add r6, r0, #0 -_02263E00: - mov r1, #4 - tst r1, r4 - beq _02263E40 - mov r1, #0x80 - tst r1, r4 - beq _02263E20 - mov r1, #0x3e - lsl r1, r1, #4 - strh r1, [r5, #2] - mov r1, #0x3b - strb r1, [r5, #1] - str r6, [r5, #4] - str r6, [r5, #8] - str r0, [r5, #0xc] - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02263E20: - mov r1, #8 - add r2, r4, #0 - tst r2, r1 - beq _02263E36 - ldr r1, _02263E70 ; =0x000003CB - strh r1, [r5, #2] - mov r1, #0x1a - strb r1, [r5, #1] - str r6, [r5, #4] - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_02263E36: - ldr r0, _02263E74 ; =0x000003CA - strh r0, [r5, #2] - strb r1, [r5, #1] - str r6, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_02263E40: - mov r1, #0x10 - tst r1, r4 - bne _02263E4C - mov r1, #8 - tst r1, r4 - beq _02263E60 -_02263E4C: - mov r1, #0x3e - lsl r1, r1, #4 - strh r1, [r5, #2] - mov r1, #0x3b - strb r1, [r5, #1] - str r6, [r5, #4] - str r6, [r5, #8] - str r0, [r5, #0xc] - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02263E60: - ldr r0, _02263E78 ; =0x000003C9 - strh r0, [r5, #2] - mov r0, #0x1e - strb r0, [r5, #1] - str r6, [r5, #4] - str r6, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} - nop -_02263E70: .word 0x000003CB -_02263E74: .word 0x000003CA -_02263E78: .word 0x000003C9 - thumb_func_end ov16_02263DD0 - - thumb_func_start ov16_02263E7C -ov16_02263E7C: ; 0x02263E7C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #4] - str r0, [sp] - add r6, r2, #0 - add r4, r3, #0 - bl ov16_0223DF0C - str r0, [sp, #0x14] - ldr r2, _02264190 ; =0x00000195 - ldr r0, [sp, #4] - ldrb r1, [r0, r2] - mov r0, #1 - tst r0, r1 - bne _02263E9C - b _02263FE4 -_02263E9C: - ldr r0, [sp, #0x14] - mov r1, #2 - and r0, r1 - str r0, [sp, #0x10] - beq _02263EB8 - ldr r0, [sp, #4] - sub r1, r2, #1 - ldrb r5, [r0, r1] - ldr r0, [sp] - add r1, r5, #0 - bl ov16_0223E258 - add r7, r0, #0 - b _02263EC0 -_02263EB8: - ldr r0, [sp, #4] - sub r1, r2, #1 - ldrb r5, [r0, r1] - add r7, r5, #0 -_02263EC0: - ldr r0, [sp, #0x14] - mov r1, #4 - tst r0, r1 - beq _02263F66 - ldr r0, [sp, #0x14] - mov r1, #0x80 - tst r0, r1 - beq _02263EF8 - ldr r0, _02264194 ; =0x000003DF - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x3c - strb r0, [r4, #1] - str r5, [r4, #4] - str r5, [r4, #8] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #0xc] - str r7, [r4, #0x10] - str r7, [r4, #0x14] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0x18] - pop {r3, r4, r5, r6, r7, pc} -_02263EF8: - ldr r0, [sp, #0x14] - mov r1, #8 - tst r0, r1 - beq _02263F26 - mov r0, #0x3d - lsl r0, r0, #4 - strh r0, [r4, #2] - mov r0, #0x38 - strb r0, [r4, #1] - str r5, [r4, #4] - add r0, r6, r5 - ldrb r0, [r0, #4] - add sp, #0x18 - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #8] - str r7, [r4, #0xc] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02263F26: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02263F4E - ldr r0, _02264198 ; =0x000003CF - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x31 - strb r0, [r4, #1] - str r5, [r4, #4] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #8] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02263F4E: - ldr r0, _0226419C ; =0x000003CE - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x1b - strb r0, [r4, #1] - str r5, [r4, #4] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_02263F66: - ldr r0, [sp, #0x14] - mov r1, #0x10 - tst r0, r1 - bne _02263F76 - ldr r0, [sp, #0x14] - mov r1, #8 - tst r0, r1 - beq _02263F9E -_02263F76: - ldr r0, _02264194 ; =0x000003DF - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x3c - strb r0, [r4, #1] - str r5, [r4, #4] - str r5, [r4, #8] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #0xc] - str r7, [r4, #0x10] - str r7, [r4, #0x14] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0x18] - pop {r3, r4, r5, r6, r7, pc} -_02263F9E: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02263FC8 - ldr r0, _022641A0 ; =0x000003CD - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x39 - strb r0, [r4, #1] - str r5, [r4, #4] - str r5, [r4, #8] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #0xc] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02263FC8: - mov r0, #0xf3 - lsl r0, r0, #2 - strh r0, [r4, #2] - mov r0, #0x32 - strb r0, [r4, #1] - str r5, [r4, #4] - str r5, [r4, #8] - add r0, r6, r5 - ldrb r0, [r0, #4] - add sp, #0x18 - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02263FE4: - ldr r0, [sp, #0x14] - mov r1, #4 - and r0, r1 - str r0, [sp, #0xc] - beq _02264078 - ldr r0, [sp] - bl ov16_0223F6E4 - lsl r0, r0, #0x18 - lsr r2, r0, #0x18 - ldr r0, [sp, #0x14] - mov r1, #8 - and r0, r1 - str r0, [sp, #8] - beq _0226404E - ldr r0, [sp] - add r1, r2, #0 - bl ov16_0223F6F0 - cmp r0, #3 - bhi _022640BE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226401A: ; jump table - .short _02264022 - _0226401A - 2 ; case 0 - .short _02264038 - _0226401A - 2 ; case 1 - .short _02264038 - _0226401A - 2 ; case 2 - .short _02264022 - _0226401A - 2 ; case 3 -_02264022: - ldr r0, [sp] - mov r1, #4 - bl ov16_0223E1C4 - add r5, r0, #0 - ldr r0, [sp] - mov r1, #2 - bl ov16_0223E1C4 - add r7, r0, #0 - b _022640BE -_02264038: - ldr r0, [sp] - mov r1, #2 - bl ov16_0223E1C4 - add r5, r0, #0 - ldr r0, [sp] - mov r1, #4 - bl ov16_0223E1C4 - add r7, r0, #0 - b _022640BE -_0226404E: - ldr r0, [sp, #0x14] - mov r1, #2 - tst r0, r1 - beq _0226406A - ldr r0, [sp] - bl ov16_0223E1C4 - add r5, r0, #0 - ldr r0, [sp] - mov r1, #4 - bl ov16_0223E1C4 - add r7, r0, #0 - b _022640BE -_0226406A: - ldr r0, [sp] - mov r1, #0 - bl ov16_0223E1C4 - add r5, r0, #0 - add r7, r5, #0 - b _022640BE -_02264078: - ldr r0, [sp, #0x14] - mov r1, #8 - and r0, r1 - str r0, [sp, #8] - beq _0226409A - ldr r1, [sp, #4] - sub r2, r2, #1 - ldrb r1, [r1, r2] - ldr r0, [sp] - bl ov16_0223E258 - add r5, r0, #0 - mov r1, #0x65 - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldrb r7, [r0, r1] - b _022640BE -_0226409A: - ldr r0, [sp, #0x14] - mov r1, #2 - tst r0, r1 - beq _022640B6 - ldr r0, [sp] - bl ov16_0223E1C4 - add r5, r0, #0 - ldr r0, [sp] - mov r1, #4 - bl ov16_0223E1C4 - add r7, r0, #0 - b _022640BE -_022640B6: - ldr r0, [sp, #4] - sub r1, r2, #1 - ldrb r5, [r0, r1] - add r7, r5, #0 -_022640BE: - ldr r0, [sp, #0xc] - cmp r0, #0 - beq _02264128 - ldr r0, [sp, #8] - cmp r0, #0 - beq _022640EC - ldr r0, _022641A4 ; =0x000003D1 - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x31 - strb r0, [r4, #1] - str r5, [r4, #4] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #8] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022640EC: - ldr r0, [sp, #0x14] - mov r1, #2 - tst r0, r1 - beq _02264114 - ldr r0, _022641A8 ; =0x000003D2 - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #9 - strb r0, [r4, #1] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #4] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_02264114: - ldr r0, _022641AC ; =0x000003D3 - add sp, #0x18 - strh r0, [r4, #2] - strb r1, [r4, #1] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_02264128: - ldr r0, [sp, #8] - cmp r0, #0 - beq _02264152 - ldr r0, _022641B0 ; =0x000003E1 - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #0x39 - strb r0, [r4, #1] - str r5, [r4, #4] - str r5, [r4, #8] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #0xc] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02264152: - ldr r0, [sp, #0x14] - mov r1, #2 - tst r0, r1 - beq _0226417A - ldr r0, _022641A8 ; =0x000003D2 - add sp, #0x18 - strh r0, [r4, #2] - mov r0, #9 - strb r0, [r4, #1] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #4] - add r0, r6, r7 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r7 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0226417A: - ldr r0, _022641AC ; =0x000003D3 - strh r0, [r4, #2] - strb r1, [r4, #1] - add r0, r6, r5 - ldrb r0, [r0, #4] - lsl r0, r0, #8 - orr r0, r5 - str r0, [r4, #4] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02264190: .word 0x00000195 -_02264194: .word 0x000003DF -_02264198: .word 0x000003CF -_0226419C: .word 0x000003CE -_022641A0: .word 0x000003CD -_022641A4: .word 0x000003D1 -_022641A8: .word 0x000003D2 -_022641AC: .word 0x000003D3 -_022641B0: .word 0x000003E1 - thumb_func_end ov16_02263E7C - - thumb_func_start ov16_022641B4 -ov16_022641B4: ; 0x022641B4 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r5, r2, #0 - bl ov16_0223DF0C - add r6, r0, #0 - ldr r0, [sp] - bl ov16_0223F438 - add r7, r0, #0 - mov r0, #2 - tst r0, r6 - beq _022641E2 - ldr r0, [sp] - mov r1, #3 - bl ov16_0223E1C4 - add r4, r0, #0 - ldr r0, [sp] - mov r1, #5 - bl ov16_0223E1C4 - b _022641EC -_022641E2: - ldr r0, [sp] - mov r1, #1 - bl ov16_0223E1C4 - add r4, r0, #0 -_022641EC: - cmp r7, #1 - beq _022641FA - cmp r7, #2 - beq _0226421A - cmp r7, #3 - beq _0226423C - pop {r3, r4, r5, r6, r7, pc} -_022641FA: - mov r1, #8 - add r2, r6, #0 - tst r2, r1 - beq _02264210 - ldr r1, _0226425C ; =0x00000312 - strh r1, [r5, #2] - mov r1, #0x1a - strb r1, [r5, #1] - str r4, [r5, #4] - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_02264210: - ldr r0, _02264260 ; =0x00000311 - strh r0, [r5, #2] - strb r1, [r5, #1] - str r4, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226421A: - mov r1, #8 - add r2, r6, #0 - tst r2, r1 - beq _02264232 - mov r1, #0xc5 - lsl r1, r1, #2 - strh r1, [r5, #2] - mov r1, #0x1a - strb r1, [r5, #1] - str r4, [r5, #4] - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_02264232: - ldr r0, _02264264 ; =0x00000313 - strh r0, [r5, #2] - strb r1, [r5, #1] - str r4, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226423C: - mov r1, #8 - add r2, r6, #0 - tst r2, r1 - beq _02264252 - ldr r1, _02264268 ; =0x00000316 - strh r1, [r5, #2] - mov r1, #0x1a - strb r1, [r5, #1] - str r4, [r5, #4] - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_02264252: - ldr r0, _0226426C ; =0x00000315 - strh r0, [r5, #2] - strb r1, [r5, #1] - str r4, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226425C: .word 0x00000312 -_02264260: .word 0x00000311 -_02264264: .word 0x00000313 -_02264268: .word 0x00000316 -_0226426C: .word 0x00000315 - thumb_func_end ov16_022641B4 - - thumb_func_start ov16_02264270 -ov16_02264270: ; 0x02264270 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r6, #0 - add r5, r0, #0 - str r2, [sp] - add r7, r3, #0 - str r6, [sp, #4] - add r4, r6, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _022642B8 -_02264288: - add r0, r4, #0 - bl sub_020787CC - ldr r1, [sp] - ldrb r1, [r1, #1] - tst r0, r1 - beq _022642AC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0223E208 - cmp r0, #0 - beq _022642AA - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - b _022642AC -_022642AA: - add r6, r6, #1 -_022642AC: - add r0, r5, #0 - add r4, r4, #1 - bl ov16_0223DF1C - cmp r4, r0 - blt _02264288 -_022642B8: - cmp r6, #0 - beq _022642D6 - ldr r0, [sp, #4] - cmp r0, #0 - beq _022642D6 - ldr r0, _02264358 ; =0x0000030D - mov r1, #0xc3 - strh r0, [r7, #2] - mov r0, #0 - strb r0, [r7, #1] - add r0, r5, #0 - bl ov16_0223F444 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022642D6: - cmp r6, #0 - beq _022642EE - ldr r0, _02264358 ; =0x0000030D - mov r1, #0xc2 - strh r0, [r7, #2] - mov r0, #0 - strb r0, [r7, #1] - add r0, r5, #0 - bl ov16_0223F444 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022642EE: - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #8 - tst r0, r1 - beq _0226431A - mov r0, #0xc6 - lsl r0, r0, #2 - strh r0, [r7, #2] - mov r0, #0x1a - strb r0, [r7, #1] - add r0, r5, #0 - mov r1, #3 - bl ov16_0223E1C4 - str r0, [r7, #4] - add r0, r5, #0 - mov r1, #5 - bl ov16_0223E1C4 - str r0, [r7, #8] - b _0226434A -_0226431A: - add r0, r5, #0 - bl ov16_0223DF0C - mov r1, #2 - tst r0, r1 - ldr r0, _0226435C ; =0x00000317 - beq _0226433A - strh r0, [r7, #2] - mov r0, #8 - strb r0, [r7, #1] - add r0, r5, #0 - mov r1, #3 - bl ov16_0223E1C4 - str r0, [r7, #4] - b _0226434A -_0226433A: - strh r0, [r7, #2] - mov r0, #8 - strb r0, [r7, #1] - add r0, r5, #0 - mov r1, #1 - bl ov16_0223E1C4 - str r0, [r7, #4] -_0226434A: - add r0, r5, #0 - mov r1, #0xc1 - bl ov16_0223F444 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02264358: .word 0x0000030D -_0226435C: .word 0x00000317 - thumb_func_end ov16_02264270 - - thumb_func_start ov16_02264360 -ov16_02264360: ; 0x02264360 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0xef - add r4, r2, #0 - lsl r1, r1, #2 - strh r1, [r4, #2] - mov r1, #8 - add r5, r0, #0 - strb r1, [r4, #1] - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - beq _022643A6 - add r0, r5, #0 - bl ov16_0223F6E4 - add r1, r0, #0 - add r0, r5, #0 - bl ov16_0223F6F0 - cmp r0, #0 - beq _0226439A - add r0, r5, #0 - mov r1, #4 - bl ov16_0223E1C4 - str r0, [r4, #4] - b _022643AE -_0226439A: - add r0, r5, #0 - mov r1, #2 - bl ov16_0223E1C4 - str r0, [r4, #4] - b _022643AE -_022643A6: - mov r0, #0x65 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - str r0, [r4, #4] -_022643AE: - add r0, r5, #0 - mov r1, #0xc2 - bl ov16_0223F444 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02264360 - - thumb_func_start ov16_022643B8 -ov16_022643B8: ; 0x022643B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov16_0223E010 - str r0, [sp, #0x18] - add r0, r5, #0 - bl ov16_0223E018 - str r0, [sp, #0x14] - add r0, r5, #0 - bl ov16_0223E064 - add r2, r0, #0 - mov r0, #1 - tst r0, r4 - beq _022643E4 - mov r1, #2 - b _022643E6 -_022643E4: - mov r1, #0 -_022643E6: - add r3, sp, #0x20 - mov r0, #0x14 - ldrsh r0, [r3, r0] - mov r4, #0x10 - str r0, [sp] - str r6, [sp, #4] - str r1, [sp, #8] - str r7, [sp, #0xc] - mov r0, #5 - str r0, [sp, #0x10] - ldrsh r3, [r3, r4] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - bl sub_02076994 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_022643B8 - - thumb_func_start ov16_02264408 -ov16_02264408: ; 0x02264408 - push {r4, r5, r6, r7, lr} - sub sp, #0xac - str r0, [sp] - ldr r0, [r3, #0x4c] - str r1, [sp, #4] - str r2, [sp, #8] - str r3, [sp, #0xc] - cmp r0, #0 - bne _02264426 - mov r0, #8 - str r0, [sp, #0x84] - add r0, r3, #0 - ldrh r0, [r0, #2] - str r0, [sp, #0x18] - b _02264430 -_02264426: - mov r0, #0x3f - str r0, [sp, #0x84] - add r0, r3, #0 - ldr r0, [r0, #0x50] - str r0, [sp, #0x18] -_02264430: - ldr r0, [sp] - bl ov16_0223DF00 - str r0, [sp, #0x20] - ldr r0, [sp] - bl ov16_0223E064 - str r0, [sp, #0x24] - ldr r0, [sp] - bl ov16_0223E010 - add r5, sp, #0x1c - str r0, [sp, #0x1c] - ldr r0, [sp, #0xc] - mov r4, #0 - str r0, [sp, #0x14] - str r5, [sp, #0x10] - add r6, r5, #0 - add r7, r0, #0 -_02264456: - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223F2AC - str r0, [r5, #0xc] - ldr r0, [sp, #0x14] - ldrh r1, [r0, #0x18] - ldr r0, [sp, #0x10] - strh r1, [r0, #0x34] - ldr r0, [sp, #0xc] - add r0, r0, r4 - add r0, #0x20 - ldrb r1, [r0] - add r0, r6, #0 - add r0, #0x3c - strb r1, [r0] - ldr r0, [sp, #0xc] - add r0, r0, r4 - add r0, #0x24 - ldrb r1, [r0] - add r0, r6, #0 - add r0, #0x40 - strb r1, [r0] - ldr r0, [sp, #0xc] - add r0, r0, r4 - add r0, #0x28 - ldrb r1, [r0] - add r0, r6, #0 - add r0, #0x44 - strb r1, [r0] - ldr r0, [r7, #0x2c] - add r4, r4, #1 - str r0, [r5, #0x48] - ldr r0, [r7, #0x3c] - add r6, r6, #1 - str r0, [r5, #0x58] - ldr r0, [sp, #0x14] - add r5, r5, #4 - add r0, r0, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - add r7, r7, #4 - add r0, r0, #2 - str r0, [sp, #0x10] - cmp r4, #4 - blt _02264456 - ldr r0, [sp] - add r1, sp, #0x38 - bl ov16_0223F87C - ldr r0, [sp] - add r1, sp, #0x3c - bl ov16_0223F8AC - ldr r0, [sp] - bl ov16_0223DF0C - mov r2, #0x65 - str r0, [sp, #0x4c] - ldr r1, [sp, #4] - lsl r2, r2, #2 - ldrb r1, [r1, r2] - ldr r0, [sp] - bl ov16_0223EE30 - str r0, [sp, #0xa0] - ldr r0, [sp] - bl ov16_0223F1E8 - str r0, [sp, #0xa4] - ldr r0, [sp] - bl ov16_0223F1F0 - str r0, [sp, #0xa8] - mov r0, #7 - str r0, [sp, #0x88] - ldr r0, [sp] - bl ov16_0223E240 - add r0, r0, #3 - str r0, [sp, #0x8c] - ldr r0, [sp] - bl ov16_0223EC04 - add r4, r0, #0 - ldr r0, [sp] - bl ov16_0223E240 - lsl r1, r0, #1 - add r0, r0, r1 - add r0, #0xac - add r0, r4, r0 - str r0, [sp, #0x90] - mov r0, #2 - str r0, [sp, #0x94] - mov r0, #0 - ldr r2, [sp, #0x18] - str r0, [sp, #0x98] - mov r0, #8 - str r0, [sp, #0x9c] - lsl r2, r2, #0x10 - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - lsr r2, r2, #0x10 - add r3, sp, #0x1c - bl ov12_0221FE30 - add sp, #0xac - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_02264408 - - thumb_func_start ov16_02264530 -ov16_02264530: ; 0x02264530 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r2, #0 - add r7, r1, #0 - str r3, [r6, #0] - str r0, [sp] - str r3, [r6, #4] - mov r4, #0 - add r5, r6, #0 - str r7, [sp, #0xc] - str r6, [sp, #8] - str r7, [sp, #4] -_02264548: - ldr r0, [sp] - add r1, r4, #0 - bl ov16_0223F2AC - str r0, [r5, #8] - ldr r0, [sp, #0xc] - ldrh r1, [r0, #0x18] - ldr r0, [sp, #8] - strh r1, [r0, #0x28] - add r0, r7, r4 - add r0, #0x20 - ldrb r1, [r0] - add r0, r6, r4 - add r0, #0x30 - strb r1, [r0] - add r0, r7, r4 - add r0, #0x24 - ldrb r1, [r0] - add r0, r6, r4 - add r0, #0x34 - strb r1, [r0] - add r0, r7, r4 - add r0, #0x28 - ldrb r1, [r0] - add r0, r6, r4 - add r0, #0x38 - strb r1, [r0] - ldr r0, [sp, #4] - add r4, r4, #1 - ldr r0, [r0, #0x2c] - str r0, [r5, #0x3c] - ldr r0, [sp, #0xc] - add r5, r5, #4 - add r0, r0, #2 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r0, r0, #2 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, r0, #4 - str r0, [sp, #4] - cmp r4, #4 - blt _02264548 - add r1, r6, #0 - ldr r0, [sp] - add r1, #0x4c - bl ov16_0223F87C - add r6, #0x18 - ldr r0, [sp] - add r1, r6, #0 - bl ov16_0223F8AC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02264530 - - thumb_func_start ov16_022645B8 -ov16_022645B8: ; 0x022645B8 - push {r4, r5, r6, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r2, #0 - bne _022645F6 - add r0, sp, #0 - ldrh r6, [r0, #0x10] - mov r1, #9 - add r0, r6, #0 - bl sub_020790C4 - mov r1, #0x40 - tst r0, r1 - bne _022645D8 - mov r0, #1 - b _022645DA -_022645D8: - mov r0, #0 -_022645DA: - strb r0, [r4] - add r0, r6, #0 - mov r1, #9 - bl sub_020790C4 - mov r1, #0x80 - tst r0, r1 - beq _022645F0 - mov r0, #1 - strb r0, [r5] - pop {r4, r5, r6, pc} -_022645F0: - mov r0, #0 - strb r0, [r5] - pop {r4, r5, r6, pc} -_022645F6: - sub r3, #0x12 - cmp r3, #0x15 - bhi _02264646 - add r0, r3, r3 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02264608: ; jump table - .short _02264634 - _02264608 - 2 ; case 0 - .short _02264634 - _02264608 - 2 ; case 1 - .short _02264634 - _02264608 - 2 ; case 2 - .short _02264634 - _02264608 - 2 ; case 3 - .short _02264634 - _02264608 - 2 ; case 4 - .short _02264646 - _02264608 - 2 ; case 5 - .short _02264646 - _02264608 - 2 ; case 6 - .short _02264646 - _02264608 - 2 ; case 7 - .short _02264646 - _02264608 - 2 ; case 8 - .short _02264646 - _02264608 - 2 ; case 9 - .short _02264646 - _02264608 - 2 ; case 10 - .short _02264646 - _02264608 - 2 ; case 11 - .short _02264646 - _02264608 - 2 ; case 12 - .short _02264634 - _02264608 - 2 ; case 13 - .short _02264634 - _02264608 - 2 ; case 14 - .short _02264646 - _02264608 - 2 ; case 15 - .short _02264634 - _02264608 - 2 ; case 16 - .short _02264634 - _02264608 - 2 ; case 17 - .short _0226463E - _02264608 - 2 ; case 18 - .short _02264634 - _02264608 - 2 ; case 19 - .short _0226463E - _02264608 - 2 ; case 20 - .short _02264634 - _02264608 - 2 ; case 21 -_02264634: - mov r0, #1 - strb r0, [r4] - mov r0, #0 - strb r0, [r5] - pop {r4, r5, r6, pc} -_0226463E: - mov r0, #1 - strb r0, [r4] - strb r0, [r5] - pop {r4, r5, r6, pc} -_02264646: - mov r0, #0 - strb r0, [r4] - strb r0, [r5] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_022645B8 - - thumb_func_start ov16_02264650 -ov16_02264650: ; 0x02264650 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - mov r4, #0 - bl sub_0200D81C - cmp r0, #1 - beq _02264668 - ldr r1, _022646C0 ; =0x00000FFF - cmp r0, r1 - beq _02264692 - b _02264696 -_02264668: - ldrh r1, [r5, #0x12] - lsl r0, r1, #0x1f - lsr r0, r0, #0x1f - bne _022646BC - mov r0, #1 - bic r1, r0 - mov r0, #1 - orr r0, r1 - strh r0, [r5, #0x12] - mov r0, #5 - mov r1, #8 - bl sub_02018144 - add r1, r0, #0 - add r2, r4, #0 - str r2, [r1, #0] - ldr r0, _022646C4 ; =ov16_022646C8 - str r2, [r1, #4] - bl sub_0200D9E8 - b _022646BC -_02264692: - mov r4, #1 - b _022646BC -_02264696: - sub r1, #0xff - add r2, r0, #0 - and r2, r1 - mov r1, #1 - lsl r1, r1, #8 - cmp r2, r1 - bne _022646BC - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - beq _022646BC - ldr r0, [r5, #8] - add r1, r4, #0 - bl sub_0200D3CC - ldr r0, [r5, #8] - sub r1, r6, #1 - bl sub_0200D364 - mov r4, #1 -_022646BC: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022646C0: .word 0x00000FFF -_022646C4: .word ov16_022646C8 - thumb_func_end ov16_02264650 - - thumb_func_start ov16_022646C8 -ov16_022646C8: ; 0x022646C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _022646DE - cmp r0, #1 - beq _022646F6 - cmp r0, #2 - beq _02264718 - pop {r3, r4, r5, pc} -_022646DE: - mov r0, #1 - str r0, [sp] - mov r0, #4 - mov r1, #0x10 - mov r2, #0 - mov r3, #0x3d - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_022646F6: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _0226472E - mov r0, #1 - str r0, [sp] - mov r0, #4 - mov r1, #0 - mov r2, #0x10 - mov r3, #0x3d - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02264718: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _0226472E - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0226472E: - pop {r3, r4, r5, pc} - thumb_func_end ov16_022646C8 - - thumb_func_start ov16_02264730 -ov16_02264730: ; 0x02264730 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl ov16_0223F720 - add r0, r4, #0 - bl ov16_0223DF10 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_0225B444 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02264730 - - thumb_func_start ov16_0226474C -ov16_0226474C: ; 0x0226474C - push {r4, lr} - add r4, r0, #0 - mov r1, #2 - bl ov16_0223F720 - add r0, r4, #0 - bl ov16_0223DF10 - add r1, r0, #0 - add r0, r4, #0 - bl ov16_0225B444 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226474C - - thumb_func_start ov16_02264768 -ov16_02264768: ; 0x02264768 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov16_0223DF0C - mov r1, #4 - tst r0, r1 - beq _02264794 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_0223E16C - bl sub_02025FCC - cmp r0, #0 - bne _02264794 - cmp r4, #1 - bhi _02264794 - add r4, #0x67 - lsl r0, r4, #0x18 - lsr r4, r0, #0x18 -_02264794: - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02264768 - - thumb_func_start ov16_02264798 -ov16_02264798: ; 0x02264798 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _022647CC - add r0, r1, #0 - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - bne _022647CC - mov r1, #0xb4 - add r0, r1, #0 - add r0, #0xe8 - strh r1, [r4, r0] - ldr r0, _022647D0 ; =ov16_02264800 - ldr r2, _022647D4 ; =0x000003F2 - add r1, r4, #0 - bl sub_0200D9E8 - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r4, r1] -_022647CC: - pop {r4, pc} - nop -_022647D0: .word ov16_02264800 -_022647D4: .word 0x000003F2 - thumb_func_end ov16_02264798 - - thumb_func_start ov16_022647D8 -ov16_022647D8: ; 0x022647D8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022647FE - bl sub_0200DA58 - mov r0, #0x66 - mov r2, #0 - lsl r0, r0, #2 - str r2, [r4, r0] - add r0, r0, #4 - strh r2, [r4, r0] - ldr r0, [r4, #0x20] - mov r1, #4 - bl sub_02007DEC -_022647FE: - pop {r4, pc} - thumb_func_end ov16_022647D8 - - thumb_func_start ov16_02264800 -ov16_02264800: ; 0x02264800 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x67 - lsl r1, r1, #2 - ldrh r0, [r4, r1] - add r0, #0x14 - strh r0, [r4, r1] - add r0, r1, #0 - ldrh r2, [r4, r1] - sub r0, #0x34 - cmp r2, r0 - blo _02264820 - add r0, r1, #0 - sub r0, #0x34 - sub r0, r2, r0 - strh r0, [r4, r1] -_02264820: - mov r0, #0x67 - lsl r0, r0, #2 - ldrh r0, [r4, r0] - bl sub_0201D15C - mov r2, #6 - asr r1, r0, #0x1f - lsl r2, r2, #0xa - mov r3, #0 - bl sub_020E1F1C - add r2, r1, #0 - mov r1, #4 - add r5, r0, #0 - ldr r0, [r4, #0x20] - mov r4, #0 - lsl r3, r1, #9 - add r3, r5, r3 - adc r2, r4 - lsl r2, r2, #0x14 - lsr r3, r3, #0xc - orr r3, r2 - asr r2, r3, #0xb - lsr r2, r2, #0x14 - add r2, r3, r2 - asr r2, r2, #0xc - bl sub_02007DEC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02264800 - - thumb_func_start ov16_0226485C -ov16_0226485C: ; 0x0226485C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r6, r3, #0 - str r1, [sp] - str r2, [sp, #4] - cmp r1, #1 - bne _02264882 - bl ov16_0223E074 - add r4, r0, #0 - add r0, r7, #0 - bl ov16_0223E0B0 - add r5, r0, #0 - add r0, r7, #0 - bl ov16_0223E0BC - b _02264896 -_02264882: - bl ov16_0223E06C - add r4, r0, #0 - add r0, r7, #0 - bl ov16_0223E08C - add r5, r0, #0 - add r0, r7, #0 - bl ov16_0223E098 -_02264896: - add r7, r0, #0 - add r0, sp, #0x10 - ldrh r2, [r5] - ldrb r3, [r0, #0x10] - add r0, r2, #5 - add r1, r0, r3 - mov r0, #1 - lsl r0, r0, #0xc - cmp r1, r0 - bls _022648B0 - strh r2, [r7] - mov r0, #0 - strh r0, [r5] -_022648B0: - ldr r1, [sp] - add r0, sp, #8 - strb r1, [r0] - ldr r1, [sp, #4] - strb r1, [r0, #1] - add r1, sp, #0x10 - ldrb r1, [r1, #0x10] - strh r1, [r0, #2] - add r1, sp, #8 - mov r0, #0 -_022648C4: - ldrb r7, [r1, r0] - ldrh r2, [r5] - add r0, r0, #1 - strb r7, [r4, r2] - ldrh r2, [r5] - add r2, r2, #1 - strh r2, [r5] - cmp r0, #4 - blo _022648C4 - mov r0, #0 - cmp r3, #0 - ble _022648EE -_022648DC: - ldrb r2, [r6, r0] - ldrh r1, [r5] - add r0, r0, #1 - strb r2, [r4, r1] - ldrh r1, [r5] - add r1, r1, #1 - strh r1, [r5] - cmp r0, r3 - blt _022648DC -_022648EE: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0226485C - - thumb_func_start ov16_022648F4 -ov16_022648F4: ; 0x022648F4 - push {r3, r4, r5, r6, r7, lr} - add r3, r1, #0 - ldrb r6, [r3, #3] - ldrb r1, [r3] - ldrb r7, [r3, #2] - lsl r6, r6, #8 - add r5, r0, #0 - mov r2, #0 - orr r6, r7 - ldrb r4, [r3, #1] - cmp r1, #0 - bne _0226493A - ldr r0, [r5, #0x30] - lsl r1, r4, #8 - add r4, r0, r1 - mov r0, #0x23 - lsl r0, r0, #8 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _02264984 - cmp r6, #0 - ble _02264936 - mov r4, #0x23 - lsl r4, r4, #8 -_02264924: - add r0, r3, r2 - ldr r7, [r5, #0x30] - ldrb r0, [r0, #4] - add r7, r1, r7 - add r7, r2, r7 - add r2, r2, #1 - strb r0, [r7, r4] - cmp r2, r6 - blt _02264924 -_02264936: - mov r2, #1 - b _02264984 -_0226493A: - cmp r1, #1 - bne _02264966 - lsl r0, r4, #2 - add r0, r5, r0 - ldr r1, [r0, #0x34] - add r1, #0x94 - ldrb r1, [r1] - cmp r1, #0 - bne _02264984 - cmp r6, #0 - ble _02264962 -_02264950: - add r1, r3, r2 - ldrb r4, [r1, #4] - ldr r1, [r0, #0x34] - add r1, r1, r2 - add r1, #0x94 - add r2, r2, #1 - strb r4, [r1] - cmp r2, r6 - blt _02264950 -_02264962: - mov r2, #1 - b _02264984 -_02264966: - cmp r1, #2 - bne _02264984 - ldrb r7, [r3, #4] - ldrb r6, [r3, #5] - bl ov16_0223ED60 - cmp r0, #0 - beq _02264982 - ldr r0, [r5, #0x30] - add r1, r6, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov16_02251F80 -_02264982: - mov r2, #1 -_02264984: - add r0, r2, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_022648F4 - - thumb_func_start ov16_02264988 -ov16_02264988: ; 0x02264988 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - cmp r1, #1 - bne _022649AE - bl ov16_0223E074 - add r6, r0, #0 - add r0, r5, #0 - bl ov16_0223E0A4 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_0223E0B0 - add r7, r0, #0 - add r0, r5, #0 - bl ov16_0223E0BC - b _022649CA -_022649AE: - bl ov16_0223E06C - add r6, r0, #0 - add r0, r5, #0 - bl ov16_0223E080 - add r4, r0, #0 - add r0, r5, #0 - bl ov16_0223E08C - add r7, r0, #0 - add r0, r5, #0 - bl ov16_0223E098 -_022649CA: - ldrh r1, [r4] - ldrh r2, [r7] - cmp r1, r2 - beq _02264A00 - ldrh r2, [r0] - cmp r1, r2 - bne _022649DE - mov r1, #0 - strh r1, [r4] - strh r1, [r0] -_022649DE: - ldrh r1, [r4] - add r0, r5, #0 - add r1, r6, r1 - bl ov16_022648F4 - cmp r0, #1 - bne _02264A00 - ldrh r0, [r4] - add r1, r0, #2 - ldrb r2, [r6, r1] - add r1, r0, #3 - ldrb r1, [r6, r1] - lsl r1, r1, #8 - orr r1, r2 - add r1, r1, #4 - add r0, r0, r1 - strh r0, [r4] -_02264A00: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02264988 - - thumb_func_start ov16_02264A04 -ov16_02264A04: ; 0x02264A04 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - str r1, [sp, #4] - ldr r1, [r5, #0x2c] - mov r0, #4 - add r7, r2, #0 - add r6, r3, #0 - tst r0, r1 - beq _02264A5E - ldr r0, _02264A88 ; =0x0000240C - ldr r1, [r5, r0] - mov r0, #0x10 - tst r0, r1 - bne _02264A5E - ldr r0, [sp, #4] - cmp r0, #1 - bne _02264A48 - mov r4, #0 - bl sub_02035E18 - cmp r0, #0 - ble _02264A48 -_02264A32: - ldrb r3, [r6] - ldr r0, [r5, #0x30] - add r1, r4, #0 - add r2, r7, #0 - bl ov16_02251F44 - add r4, r4, #1 - bl sub_02035E18 - cmp r4, r0 - blt _02264A32 -_02264A48: - add r0, sp, #0x10 - ldrb r0, [r0, #0x10] - ldr r1, [sp, #4] - add r2, r7, #0 - str r0, [sp] - add r0, r5, #0 - add r3, r6, #0 - bl sub_0207A81C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02264A5E: - ldr r0, [sp, #4] - cmp r0, #1 - bne _02264A70 - ldrb r3, [r6] - ldr r0, [r5, #0x30] - mov r1, #0 - add r2, r7, #0 - bl ov16_02251F44 -_02264A70: - add r0, sp, #0x10 - ldrb r0, [r0, #0x10] - ldr r1, [sp, #4] - add r2, r7, #0 - str r0, [sp] - add r0, r5, #0 - add r3, r6, #0 - bl ov16_0226485C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02264A88: .word 0x0000240C - thumb_func_end ov16_02264A04 - - thumb_func_start ov16_02264A8C -ov16_02264A8C: ; 0x02264A8C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - mov r1, #1 - add r5, r0, #0 - str r1, [sp, #4] - bl ov16_0223F4E8 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02264A8C - - thumb_func_start ov16_02264AB4 -ov16_02264AB4: ; 0x02264AB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r7, r1, #0 - mov r3, #2 - add r2, sp, #4 - strb r3, [r2] - mov r2, #0xc0 - add r4, r7, #0 - mul r4, r2 - add r2, sp, #4 - ldrb r5, [r2, #1] - mov r2, #3 - add r6, r0, #0 - bic r5, r2 - ldr r2, [r6, #0x30] - add r3, r2, r4 - ldr r2, _02264BAC ; =0x00002DBE - mov ip, r2 - ldrb r2, [r3, r2] - lsl r2, r2, #0x1c - lsr r3, r2, #0x1c - mov r2, #3 - and r2, r3 - add r3, r5, #0 - orr r3, r2 - add r2, sp, #4 - strb r3, [r2, #1] - ldrb r5, [r2, #1] - mov r2, #4 - bic r5, r2 - ldr r2, [r6, #0x30] - add r3, r2, r4 - mov r2, ip - sub r2, #0x58 - ldrb r2, [r3, r2] - add r3, r5, #0 - lsl r2, r2, #0x1a - lsr r2, r2, #0x1f - lsl r2, r2, #0x1f - lsr r2, r2, #0x1d - orr r3, r2 - add r2, sp, #4 - strb r3, [r2, #1] - ldr r2, [r6, #0x30] - add r3, r2, r4 - mov r2, ip - sub r2, #0x7e - ldrh r3, [r3, r2] - add r2, sp, #4 - strh r3, [r2, #2] - ldr r2, [r6, #0x30] - add r3, r2, r4 - mov r2, ip - sub r2, #0x16 - ldr r2, [r3, r2] - str r2, [sp, #8] - bl ov16_0223E1F8 - add r2, r0, #0 - ldr r0, [r6, #0x30] - add r1, r7, #0 - mov r3, #1 - bl ov16_022599D0 - add r2, sp, #4 - str r0, [sp, #0xc] - ldrb r0, [r2, #1] - mov r1, #0xf8 - add r5, sp, #4 - bic r0, r1 - ldr r1, [r6, #0x30] - add r3, r1, r4 - ldr r1, _02264BB0 ; =0x00002D66 - mov r4, #0 - ldrb r1, [r3, r1] - lsl r1, r1, #0x1b - lsr r1, r1, #0x1b - lsl r1, r1, #0x1b - lsr r1, r1, #0x18 - orr r0, r1 - strb r0, [r2, #1] -_02264B56: - ldr r0, [r6, #0x30] - add r1, r7, #0 - add r2, r4, #6 - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0xc] - add r2, r4, #0 - ldr r0, [r6, #0x30] - add r1, r7, #0 - add r2, #0x1f - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x14] - add r2, r4, #0 - ldr r0, [r6, #0x30] - add r1, r7, #0 - add r2, #0x27 - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x1c] - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _02264B56 - ldr r0, [r6, #0x30] - add r1, r7, #0 - mov r2, #0x2d - add r3, sp, #0x28 - bl ov16_02252060 - mov r0, #0x3c - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - add r2, r7, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02264BAC: .word 0x00002DBE -_02264BB0: .word 0x00002D66 - thumb_func_end ov16_02264AB4 - - thumb_func_start ov16_02264BB4 -ov16_02264BB4: ; 0x02264BB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x78 - add r7, r1, #0 - add r3, sp, #4 - mov r2, #3 - strb r2, [r3] - mov r2, #0xc0 - add r4, r7, #0 - mul r4, r2 - add r2, r3, #0 - ldrb r5, [r2, #1] - mov r2, #3 - add r6, r0, #0 - bic r5, r2 - ldr r2, [r6, #0x30] - add r3, r2, r4 - ldr r2, _02264CDC ; =0x00002DBE - mov ip, r2 - ldrb r2, [r3, r2] - lsl r2, r2, #0x1c - lsr r3, r2, #0x1c - mov r2, #3 - and r2, r3 - add r3, r5, #0 - orr r3, r2 - add r2, sp, #4 - strb r3, [r2, #1] - ldrb r5, [r2, #1] - mov r2, #4 - bic r5, r2 - ldr r2, [r6, #0x30] - add r3, r2, r4 - mov r2, ip - sub r2, #0x58 - ldrb r2, [r3, r2] - add r3, r5, #0 - lsl r2, r2, #0x1a - lsr r2, r2, #0x1f - lsl r2, r2, #0x1f - lsr r2, r2, #0x1d - orr r3, r2 - add r2, sp, #4 - strb r3, [r2, #1] - ldr r2, [r6, #0x30] - add r3, r2, r4 - mov r2, ip - sub r2, #0x7e - ldrh r3, [r3, r2] - add r2, sp, #4 - strh r3, [r2, #2] - ldr r2, [r6, #0x30] - add r3, r2, r4 - mov r2, ip - sub r2, #0x16 - ldr r2, [r3, r2] - str r2, [sp, #8] - bl ov16_0223E1F8 - add r2, r0, #0 - ldr r0, [r6, #0x30] - add r1, r7, #0 - mov r3, #1 - bl ov16_022599D0 - str r0, [sp, #0xc] - ldr r0, [r6, #0x30] - add r2, sp, #4 - add r1, r0, r7 - ldr r0, _02264CE0 ; =0x0000219C - ldrb r0, [r1, r0] - mov r1, #0xf8 - str r0, [sp, #0x10] - ldrb r0, [r2, #1] - bic r0, r1 - ldr r1, [r6, #0x30] - add r3, r1, r4 - ldr r1, _02264CE4 ; =0x00002D66 - ldrb r3, [r3, r1] - add r1, #0x59 - lsl r3, r3, #0x1b - lsr r3, r3, #0x1b - lsl r3, r3, #0x1b - lsr r3, r3, #0x18 - orr r0, r3 - strb r0, [r2, #1] - ldr r0, [r6, #0x30] - add r0, r0, r4 - ldrb r0, [r0, r1] - add r1, r7, #0 - str r0, [sp, #0x14] - add r0, r6, #0 - bl ov16_0223E258 - ldr r1, [r6, #0x30] - ldr r2, [sp, #0x10] - add r1, r1, r0 - ldr r0, _02264CE0 ; =0x0000219C - ldrb r0, [r1, r0] - add r1, r7, #0 - str r0, [sp, #0x4c] - add r0, r6, #0 - bl ov16_0223EF2C - mov r4, #0 - add r5, sp, #4 -_02264C86: - ldr r0, [r6, #0x30] - add r1, r7, #0 - add r2, r4, #6 - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x18] - add r2, r4, #0 - ldr r0, [r6, #0x30] - add r1, r7, #0 - add r2, #0x1f - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x20] - add r2, r4, #0 - ldr r0, [r6, #0x30] - add r1, r7, #0 - add r2, #0x27 - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x28] - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _02264C86 - ldr r0, [r6, #0x30] - add r1, r7, #0 - mov r2, #0x2d - add r3, sp, #0x34 - bl ov16_02252060 - mov r0, #0x74 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - add r2, r7, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0x78 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02264CDC: .word 0x00002DBE -_02264CE0: .word 0x0000219C -_02264CE4: .word 0x00002D66 - thumb_func_end ov16_02264BB4 - - thumb_func_start ov16_02264CE8 -ov16_02264CE8: ; 0x02264CE8 - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - add r7, r1, #0 - add r4, r0, #0 - mov r1, #4 - add r6, sp, #0x10 - strb r1, [r6] - mov r0, #0xc0 - add r5, r7, #0 - mul r5, r0 - ldr r0, [r4, #0x30] - str r2, [sp, #4] - add r2, r0, r5 - ldr r0, _02264EDC ; =0x00002DB0 - str r3, [sp, #8] - ldr r3, [r2, r0] - lsl r1, r1, #0x13 - tst r1, r3 - ldrb r1, [r6, #1] - beq _02264D32 - mov r3, #3 - bic r1, r3 - add r3, r0, #0 - add r3, #0x4a - ldrh r2, [r2, r3] - add r0, #0x34 - lsl r2, r2, #0x18 - lsr r3, r2, #0x18 - mov r2, #3 - and r2, r3 - orr r1, r2 - strb r1, [r6, #1] - ldr r1, [r4, #0x30] - add r1, r1, r5 - ldr r0, [r1, r0] - str r0, [sp, #0x14] - b _02264D52 -_02264D32: - mov r3, #3 - bic r1, r3 - add r3, r0, #0 - add r3, #0xe - ldrb r2, [r2, r3] - sub r0, #8 - lsl r2, r2, #0x1c - lsr r3, r2, #0x1c - mov r2, #3 - and r2, r3 - orr r1, r2 - strb r1, [r6, #1] - ldr r1, [r4, #0x30] - add r1, r1, r5 - ldr r0, [r1, r0] - str r0, [sp, #0x14] -_02264D52: - mov r0, #0xc0 - add r6, r7, #0 - add r3, sp, #0x10 - mul r6, r0 - ldrb r0, [r3, #1] - mov r1, #4 - bic r0, r1 - ldr r1, [r4, #0x30] - add r2, r1, r6 - ldr r1, _02264EE0 ; =0x00002D66 - ldrb r2, [r2, r1] - sub r1, #0x26 - lsl r2, r2, #0x1a - lsr r2, r2, #0x1f - lsl r2, r2, #0x1f - lsr r2, r2, #0x1d - orr r0, r2 - strb r0, [r3, #1] - ldr r0, [r4, #0x30] - add r0, r0, r6 - ldrh r0, [r0, r1] - add r1, r7, #0 - strh r0, [r3, #2] - add r0, r4, #0 - bl ov16_0223E1F8 - add r2, r0, #0 - ldr r0, [r4, #0x30] - add r1, r7, #0 - mov r3, #0 - bl ov16_022599D0 - str r0, [sp, #0x18] - ldr r0, [r4, #0x30] - mov r2, #0xf8 - add r1, r0, r7 - ldr r0, _02264EE4 ; =0x0000219C - ldrb r0, [r1, r0] - str r0, [sp, #0x1c] - add r0, sp, #0x10 - ldrb r1, [r0, #1] - bic r1, r2 - ldr r2, [r4, #0x30] - add r3, r2, r6 - ldr r2, _02264EE0 ; =0x00002D66 - ldrb r3, [r3, r2] - lsl r3, r3, #0x1b - lsr r3, r3, #0x1b - lsl r3, r3, #0x1b - lsr r3, r3, #0x18 - orr r1, r3 - strb r1, [r0, #1] - ldr r0, [sp, #4] - cmp r0, #0 - beq _02264DC4 - str r0, [sp, #0x20] - b _02264DCE -_02264DC4: - ldr r0, [r4, #0x30] - add r2, #0x59 - add r0, r0, r5 - ldrb r0, [r0, r2] - str r0, [sp, #0x20] -_02264DCE: - ldr r0, [sp, #8] - str r0, [sp, #0x24] - ldr r0, [r4, #0x30] - add r1, r0, r5 - ldr r0, _02264EDC ; =0x00002DB0 - ldr r1, [r1, r0] - mov r0, #1 - lsl r0, r0, #0x18 - tst r0, r1 - beq _02264DE6 - mov r0, #1 - b _02264DE8 -_02264DE6: - mov r0, #0 -_02264DE8: - ldr r2, [sp, #0x1c] - str r0, [sp, #0x5c] - add r0, r4, #0 - add r1, r7, #0 - bl ov16_0223EF2C - mov r6, #0 - add r5, sp, #0x10 -_02264DF8: - ldr r0, [r4, #0x30] - add r1, r7, #0 - add r2, r6, #6 - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x18] - add r2, r6, #0 - ldr r0, [r4, #0x30] - add r1, r7, #0 - add r2, #0x1f - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x20] - add r2, r6, #0 - ldr r0, [r4, #0x30] - add r1, r7, #0 - add r2, #0x27 - mov r3, #0 - bl ov16_02252060 - strh r0, [r5, #0x28] - add r6, r6, #1 - add r5, r5, #2 - cmp r6, #4 - blt _02264DF8 - ldr r0, [r4, #0x30] - add r1, r7, #0 - mov r2, #0x2d - add r3, sp, #0x40 - bl ov16_02252060 - add r3, sp, #0x10 - mov r2, #0 - mov ip, r2 - str r3, [sp, #0xc] - add r5, r3, #0 -_02264E44: - ldr r0, [r4, #0x30] - add r1, r0, r2 - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r1, [r1, r0] - ldr r0, [sp, #0xc] - add r0, #0x50 - strh r1, [r0] - ldr r0, [r4, #0x30] - add r1, r0, r2 - ldr r0, _02264EE0 ; =0x00002D66 - ldrb r0, [r1, r0] - lsl r0, r0, #0x1a - lsr r1, r0, #0x1f - add r0, r3, #0 - add r0, #0x5c - strb r1, [r0] - ldr r0, [r4, #0x30] - add r1, r0, r2 - ldr r0, _02264EE0 ; =0x00002D66 - ldrb r0, [r1, r0] - lsl r0, r0, #0x1b - lsr r1, r0, #0x1b - add r0, r3, #0 - add r0, #0x60 - strb r1, [r0] - ldr r0, [r4, #0x30] - add r6, r0, r2 - ldr r0, _02264EDC ; =0x00002DB0 - ldr r1, [r6, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r1 - beq _02264E9A - ldr r0, _02264EE8 ; =0x00002DFA - ldrh r1, [r6, r0] - add r0, r3, #0 - add r0, #0x58 - strb r1, [r0] - ldr r0, [r4, #0x30] - add r1, r0, r2 - ldr r0, _02264EEC ; =0x00002DE4 - b _02264EAE -_02264E9A: - ldr r0, _02264EF0 ; =0x00002DBE - ldrb r0, [r6, r0] - lsl r0, r0, #0x1c - lsr r1, r0, #0x1c - add r0, r3, #0 - add r0, #0x58 - strb r1, [r0] - ldr r0, [r4, #0x30] - add r1, r0, r2 - ldr r0, _02264EF4 ; =0x00002DA8 -_02264EAE: - ldr r0, [r1, r0] - add r2, #0xc0 - str r0, [r5, #0x64] - ldr r0, [sp, #0xc] - add r3, r3, #1 - add r0, r0, #2 - str r0, [sp, #0xc] - mov r0, ip - add r0, r0, #1 - add r5, r5, #4 - mov ip, r0 - cmp r0, #4 - blt _02264E44 - mov r0, #0x74 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - add r2, r7, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02264EDC: .word 0x00002DB0 -_02264EE0: .word 0x00002D66 -_02264EE4: .word 0x0000219C -_02264EE8: .word 0x00002DFA -_02264EEC: .word 0x00002DE4 -_02264EF0: .word 0x00002DBE -_02264EF4: .word 0x00002DA8 - thumb_func_end ov16_02264CE8 - - thumb_func_start ov16_02264EF8 -ov16_02264EF8: ; 0x02264EF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r4, r1, #0 - lsl r1, r2, #2 - str r0, [sp, #4] - add r0, r0, r1 - ldr r1, [r0, #0x34] - ldr r0, _02265034 ; =0x00000195 - str r2, [sp, #8] - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _02264F16 - mov r2, #2 - b _02264F18 -_02264F16: - mov r2, #0 -_02264F18: - ldr r0, [sp, #8] - mov r1, #0xc0 - add r5, r0, #0 - ldr r0, [sp, #4] - mul r5, r1 - ldr r0, [r0, #0x30] - ldr r3, _02265038 ; =0x00002D66 - add r0, r0, r5 - ldrb r0, [r0, r3] - mov r1, #5 - lsl r0, r0, #0x1b - lsr r7, r0, #0x1b - add r0, sp, #0xc - strb r1, [r0] - ldr r0, [sp, #4] - ldr r0, [r0, #0x30] - add r1, r0, r5 - add r0, r3, #0 - add r0, #0x4a - ldr r6, [r1, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r6 - beq _02264F6C - add r0, r3, #0 - add r0, #0x7e - ldr r0, [r1, r0] - lsl r2, r2, #0x18 - str r0, [sp] - add r0, r3, #0 - sub r0, #0x26 - add r3, #0x94 - ldrh r0, [r1, r0] - ldrh r1, [r1, r3] - lsl r3, r7, #0x18 - lsr r2, r2, #0x18 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - lsr r3, r3, #0x18 - bl sub_02076648 - b _02264F8E -_02264F6C: - add r0, r3, #0 - add r0, #0x42 - ldr r0, [r1, r0] - lsl r2, r2, #0x18 - str r0, [sp] - add r0, r3, #0 - sub r0, #0x26 - add r3, #0x58 - ldrh r0, [r1, r0] - ldrb r1, [r1, r3] - lsl r3, r7, #0x18 - lsr r2, r2, #0x18 - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - lsr r3, r3, #0x18 - bl sub_02076648 -_02264F8E: - add r1, sp, #0xc - strb r0, [r1, #1] - ldr r0, [sp, #4] - ldr r1, _0226503C ; =0x00002DBF - ldr r0, [r0, #0x30] - add r0, r0, r5 - ldrb r2, [r0, r1] - add r0, sp, #0xc - sub r1, #0xf - strh r2, [r0, #2] - ldr r0, [sp, #4] - ldr r0, [r0, #0x30] - add r0, r0, r5 - ldr r1, [r0, r1] - mov r0, #1 - lsl r0, r0, #0x18 - tst r0, r1 - beq _02264FB6 - mov r0, #1 - b _02264FB8 -_02264FB6: - mov r0, #0 -_02264FB8: - str r0, [sp, #0x10] - mov r0, #0 - mov ip, r0 - add r7, sp, #0xc - ldr r0, _02265038 ; =0x00002D66 - add r3, r7, #0 - add r2, r4, r0 - add r0, #0x58 - add r5, r7, #0 - add r6, r4, r0 -_02264FCC: - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r4, r0] - strh r0, [r7, #8] - ldrb r0, [r2] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - strb r0, [r3, #0x14] - ldrb r0, [r2] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1b - strb r0, [r3, #0x18] - ldr r0, _02265040 ; =0x00002DB0 - ldr r1, [r4, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r1 - beq _02264FFA - ldr r0, _02265044 ; =0x00002DFA - ldrh r0, [r4, r0] - strb r0, [r3, #0x10] - ldr r0, _02265048 ; =0x00002DE4 - b _02265004 -_02264FFA: - ldrb r0, [r6] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - strb r0, [r3, #0x10] - ldr r0, _0226504C ; =0x00002DA8 -_02265004: - ldr r0, [r4, r0] - add r4, #0xc0 - str r0, [r5, #0x1c] - mov r0, ip - add r0, r0, #1 - add r7, r7, #2 - add r2, #0xc0 - add r3, r3, #1 - add r5, r5, #4 - add r6, #0xc0 - mov ip, r0 - cmp r0, #4 - blt _02264FCC - mov r0, #0x2c - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #8] - mov r1, #1 - add r3, sp, #0xc - bl ov16_02264A04 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02265034: .word 0x00000195 -_02265038: .word 0x00002D66 -_0226503C: .word 0x00002DBF -_02265040: .word 0x00002DB0 -_02265044: .word 0x00002DFA -_02265048: .word 0x00002DE4 -_0226504C: .word 0x00002DA8 - thumb_func_end ov16_02264EF8 - - thumb_func_start ov16_02265050 -ov16_02265050: ; 0x02265050 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r1, #0 - add r4, r0, #0 - lsl r0, r7, #2 - add r0, r4, r0 - ldr r1, [r0, #0x34] - ldr r0, _02265100 ; =0x00000195 - str r2, [sp, #4] - ldrb r1, [r1, r0] - mov r0, #1 - tst r0, r1 - beq _0226506E - mov r2, #2 - b _02265070 -_0226506E: - mov r2, #0 -_02265070: - mov r0, #0xc0 - add r6, r7, #0 - mul r6, r0 - ldr r0, [r4, #0x30] - ldr r5, _02265104 ; =0x00002D66 - add r0, r0, r6 - ldrb r0, [r0, r5] - mov r1, #6 - lsl r0, r0, #0x1b - lsr r3, r0, #0x1b - add r0, sp, #8 - strb r1, [r0] - ldr r0, [r4, #0x30] - add r1, r0, r6 - add r0, r5, #0 - add r0, #0x4a - ldr r6, [r1, r0] - mov r0, #2 - lsl r0, r0, #0x14 - tst r0, r6 - beq _022650BE - add r0, r5, #0 - add r0, #0x7e - ldr r0, [r1, r0] - lsl r2, r2, #0x18 - str r0, [sp] - add r0, r5, #0 - sub r0, #0x26 - add r5, #0x94 - ldrh r0, [r1, r0] - ldrh r1, [r1, r5] - lsl r3, r3, #0x18 - lsr r2, r2, #0x18 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - lsr r3, r3, #0x18 - bl sub_02076648 - b _022650E0 -_022650BE: - add r0, r5, #0 - add r0, #0x42 - ldr r0, [r1, r0] - lsl r2, r2, #0x18 - str r0, [sp] - add r0, r5, #0 - sub r0, #0x26 - add r5, #0x58 - ldrh r0, [r1, r0] - ldrb r1, [r1, r5] - lsl r3, r3, #0x18 - lsr r2, r2, #0x18 - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - lsr r3, r3, #0x18 - bl sub_02076648 -_022650E0: - add r1, sp, #8 - strb r0, [r1, #1] - ldr r0, [sp, #4] - add r1, sp, #8 - strh r0, [r1, #2] - mov r0, #4 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - add r2, r7, #0 - add r3, sp, #8 - bl ov16_02264A04 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02265100: .word 0x00000195 -_02265104: .word 0x00002D66 - thumb_func_end ov16_02265050 - - thumb_func_start ov16_02265108 -ov16_02265108: ; 0x02265108 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #7 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02265108 - - thumb_func_start ov16_02265124 -ov16_02265124: ; 0x02265124 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #8 - add r3, sp, #4 - strb r1, [r3] - mov r1, #0x34 - mul r1, r2 - add r1, r0, r1 - add r1, #0xad - ldrb r1, [r1] - strh r1, [r3, #2] - add r1, r0, r2 - add r1, #0xa8 - ldrb r1, [r1] - strb r1, [r3, #1] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - thumb_func_end ov16_02265124 - - thumb_func_start ov16_02265154 -ov16_02265154: ; 0x02265154 - push {r4, r5, r6, lr} - sub sp, #8 - mov r6, #9 - add r3, sp, #4 - strb r6, [r3] - add r5, r0, #0 - strb r2, [r3, #1] - add r4, r1, #0 - bl ov16_0223E258 - ldr r1, [r5, #0x30] - add r2, r4, #0 - add r1, r1, r0 - ldr r0, _02265188 ; =0x0000219C - add r3, sp, #4 - ldrb r1, [r1, r0] - add r0, sp, #4 - strh r1, [r0, #2] - mov r0, #4 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - bl ov16_02264A04 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02265188: .word 0x0000219C - thumb_func_end ov16_02265154 - - thumb_func_start ov16_0226518C -ov16_0226518C: ; 0x0226518C - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0xa - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_0226518C - - thumb_func_start ov16_022651A8 -ov16_022651A8: ; 0x022651A8 - push {r3, r4, lr} - sub sp, #0xc - add r3, r1, #0 - mov r1, #0xb - add r4, sp, #4 - strb r1, [r4] - mov r1, #0x34 - mul r1, r3 - add r1, r0, r1 - add r1, #0xad - ldrb r1, [r1] - strh r1, [r4, #2] - add r1, r0, r3 - add r1, #0xa8 - ldrb r1, [r1] - strb r1, [r4, #1] - str r2, [sp, #8] - mov r1, #8 - str r1, [sp] - add r2, r3, #0 - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov16_022651A8 - - thumb_func_start ov16_022651DC -ov16_022651DC: ; 0x022651DC - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r1, #0 - ldr r1, _02265300 ; =0x0000219C - add r4, r2, #0 - add r7, r5, r1 - ldrb r2, [r7, r4] - add r1, r4, #0 - str r0, [sp, #4] - str r3, [sp, #8] - bl ov16_0223DFAC - add r6, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x10] - add r0, r6, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - mov r0, #0xc - add r3, sp, #0x14 - strb r0, [r3] - mov r0, #0xc0 - add r6, r4, #0 - mul r6, r0 - ldr r2, _02265304 ; =0x00002D74 - add r0, r5, r6 - ldrb r1, [r0, r2] - strb r1, [r3, #1] - add r1, r2, #0 - add r1, #0x18 - ldr r1, [r0, r1] - add r2, #0x1c - strh r1, [r3, #2] - ldr r0, [r0, r2] - add r1, r4, #0 - strh r0, [r3, #4] - ldrb r0, [r7, r4] - strb r0, [r3, #6] - add r0, r5, #0 - bl ov16_02253F7C - add r1, sp, #0x14 - ldrb r2, [r1, #7] - mov r3, #0x1f - lsl r0, r0, #0x18 - bic r2, r3 - lsr r3, r0, #0x18 - mov r0, #0x1f - and r0, r3 - orr r0, r2 - strb r0, [r1, #7] - mov r0, #0xb5 - lsl r0, r0, #6 - add r7, r5, r0 - ldrh r0, [r7, r6] - cmp r0, #0x1d - beq _0226525E - cmp r0, #0x20 - bne _02265278 -_0226525E: - ldr r0, _02265308 ; =0x00002D54 - add r1, r5, r6 - ldr r0, [r1, r0] - lsr r0, r0, #0x1f - bne _02265278 - add r0, sp, #0x14 - ldrb r1, [r0, #7] - mov r2, #0x60 - bic r1, r2 - mov r2, #0x40 - orr r1, r2 - strb r1, [r0, #7] - b _02265292 -_02265278: - add r3, sp, #0x14 - ldrb r2, [r3, #7] - mov r0, #0x60 - add r1, r5, r6 - bic r2, r0 - ldr r0, _0226530C ; =0x00002DBE - ldrb r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - lsl r0, r0, #0x1e - lsr r0, r0, #0x19 - orr r0, r2 - strb r0, [r3, #7] -_02265292: - ldr r0, [sp, #0x10] - ldr r1, [sp, #0xc] - bl sub_02075AD0 - mov r1, #0xc0 - mul r1, r4 - add r2, r5, r1 - ldr r1, _02265310 ; =0x00002DA4 - ldr r1, [r2, r1] - sub r0, r1, r0 - ldr r1, [sp, #0xc] - str r0, [sp, #0x1c] - ldr r0, [sp, #0x10] - add r1, r1, #1 - bl sub_02075AD0 - add r5, r0, #0 - ldr r0, [sp, #0x10] - ldr r1, [sp, #0xc] - bl sub_02075AD0 - sub r0, r5, r0 - str r0, [sp, #0x20] - ldrh r1, [r7, r6] - ldr r0, [sp, #4] - bl ov16_0223F9E0 - add r3, sp, #0x14 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1f - ldrb r1, [r3, #7] - mov r2, #0x80 - lsr r0, r0, #0x18 - bic r1, r2 - orr r0, r1 - strb r0, [r3, #7] - ldr r0, [sp, #4] - bl ov16_0223ED8C - str r0, [sp, #0x24] - ldr r0, [sp, #8] - add r1, sp, #0x14 - strb r0, [r1, #0x14] - mov r0, #0x18 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #0x14 - bl ov16_02264A04 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_02265300: .word 0x0000219C -_02265304: .word 0x00002D74 -_02265308: .word 0x00002D54 -_0226530C: .word 0x00002DBE -_02265310: .word 0x00002DA4 - thumb_func_end ov16_022651DC - - thumb_func_start ov16_02265314 -ov16_02265314: ; 0x02265314 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0xd - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02265314 - - thumb_func_start ov16_02265330 -ov16_02265330: ; 0x02265330 - push {r4, r5, r6, r7, lr} - sub sp, #0x54 - str r0, [sp, #4] - str r1, [sp, #8] - str r2, [sp, #0xc] - mov r0, #0 - add r1, sp, #0x28 - mov r2, #0x2c - add r6, r3, #0 - bl sub_020C4BB8 - ldr r0, [sp, #4] - bl ov16_0223DF10 - ldr r1, [sp, #0xc] - bl ov16_02252040 - mov r5, #0 - ldr r0, [sp, #4] - add r4, r5, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _02265380 -_02265360: - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov16_02259A28 - cmp r0, #0 - bne _02265374 - add r0, r4, #0 - bl sub_020787CC - orr r5, r0 -_02265374: - ldr r0, [sp, #4] - add r4, r4, #1 - bl ov16_0223DF1C - cmp r4, r0 - blt _02265360 -_02265380: - mov r1, #0xe - add r0, sp, #0x28 - strb r1, [r0] - strb r6, [r0, #1] - ldr r1, _02265680 ; =0x00003108 - ldr r0, [sp, #8] - ldrb r0, [r0, r1] - add r1, r0, #0 - orr r1, r5 - add r0, sp, #0x48 - strb r1, [r0, #9] - ldr r0, [sp, #4] - bl ov16_0223DF0C - mov r1, #2 - str r0, [sp, #0x20] - tst r0, r1 - beq _022653B6 - ldr r0, [sp, #0x20] - mov r1, #8 - tst r0, r1 - bne _022653B6 - ldr r0, [sp, #0xc] - mov r1, #1 - add r4, r0, #0 - and r4, r1 - b _022653B8 -_022653B6: - ldr r4, [sp, #0xc] -_022653B8: - ldr r0, [sp, #4] - add r1, r4, #0 - bl ov16_0223DF20 - str r0, [sp, #0x24] - mov r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0226544E - mov r0, #6 - add r1, r4, #0 - mul r1, r0 - ldr r0, [sp, #8] - add r5, sp, #0x28 - add r6, r0, r1 - mov r1, #0xa9 - ldr r0, [sp, #0x20] - lsl r1, r1, #2 - and r0, r1 - str r0, [sp, #0x1c] -_022653E2: - ldr r1, _02265684 ; =0x0000312C - ldr r0, [sp, #0x24] - ldrb r1, [r6, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265440 - ldr r1, _02265688 ; =0x000001EE - cmp r0, r1 - beq _02265440 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265428 - add r0, r4, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265422 - mov r0, #3 - strb r0, [r5, #8] - b _0226542C -_02265422: - mov r0, #1 - strb r0, [r5, #8] - b _0226542C -_02265428: - mov r0, #2 - strb r0, [r5, #8] -_0226542C: - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _02265436 - mov r0, #0 - b _0226543C -_02265436: - add r0, r4, #0 - bl sub_02075A10 -_0226543C: - strb r0, [r5, #2] - add r5, r5, #1 -_02265440: - ldr r0, [sp, #0x24] - add r6, r6, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _022653E2 -_0226544E: - ldr r0, [sp, #0x20] - mov r1, #0xc - and r0, r1 - cmp r0, #0xc - beq _0226546C - ldr r0, [sp, #0x20] - mov r1, #0x10 - tst r0, r1 - bne _0226546C - ldr r0, [sp, #0x20] - cmp r0, #0x4b - beq _0226546C - cmp r0, #0xcb - beq _0226546C - b _022655A4 -_0226546C: - ldr r0, [sp, #4] - ldr r1, [sp, #0xc] - bl ov16_0223E208 - cmp r0, #0 - beq _02265482 - ldr r0, [sp, #4] - mov r1, #2 - bl ov16_0223E1C4 - b _0226548A -_02265482: - ldr r0, [sp, #4] - mov r1, #3 - bl ov16_0223E1C4 -_0226548A: - add r4, r0, #0 - ldr r0, [sp, #4] - add r1, r4, #0 - bl ov16_0223DF20 - str r0, [sp, #0x10] - mov r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02265506 - mov r0, #6 - add r1, r4, #0 - mul r1, r0 - ldr r0, [sp, #8] - add r5, sp, #0x28 - add r4, r0, r1 -_022654AC: - ldr r1, _02265684 ; =0x0000312C - ldr r0, [sp, #0x10] - ldrb r1, [r4, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _022654F8 - ldr r1, _02265688 ; =0x000001EE - cmp r0, r1 - beq _022654F8 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _022654F2 - add r0, r6, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _022654EC - mov r0, #3 - strb r0, [r5, #0xe] - b _022654F6 -_022654EC: - mov r0, #1 - strb r0, [r5, #0xe] - b _022654F6 -_022654F2: - mov r0, #2 - strb r0, [r5, #0xe] -_022654F6: - add r5, r5, #1 -_022654F8: - ldr r0, [sp, #0x10] - add r4, r4, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _022654AC -_02265506: - ldr r0, [sp, #4] - ldr r1, [sp, #0xc] - bl ov16_0223E208 - cmp r0, #0 - beq _0226551C - ldr r0, [sp, #4] - mov r1, #4 - bl ov16_0223E1C4 - b _02265524 -_0226551C: - ldr r0, [sp, #4] - mov r1, #5 - bl ov16_0223E1C4 -_02265524: - add r4, r0, #0 - ldr r0, [sp, #4] - add r1, r4, #0 - bl ov16_0223DF20 - str r0, [sp, #0x14] - mov r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0226562A - mov r0, #6 - add r1, r4, #0 - mul r1, r0 - ldr r0, [sp, #8] - add r5, sp, #0x28 - add r4, r0, r1 - add r5, #3 -_02265548: - ldr r1, _02265684 ; =0x0000312C - ldr r0, [sp, #0x14] - ldrb r1, [r4, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265594 - ldr r1, _02265688 ; =0x000001EE - cmp r0, r1 - beq _02265594 - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _0226558E - add r0, r6, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265588 - mov r0, #3 - strb r0, [r5, #0xe] - b _02265592 -_02265588: - mov r0, #1 - strb r0, [r5, #0xe] - b _02265592 -_0226558E: - mov r0, #2 - strb r0, [r5, #0xe] -_02265592: - add r5, r5, #1 -_02265594: - ldr r0, [sp, #0x14] - add r4, r4, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _02265548 - b _0226562A -_022655A4: - ldr r0, [sp, #4] - ldr r1, [sp, #0xc] - mov r2, #2 - bl ov16_0223E2A4 - add r4, r0, #0 - ldr r0, [sp, #4] - add r1, r4, #0 - bl ov16_0223DF20 - str r0, [sp, #0x18] - mov r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _0226562A - mov r0, #6 - add r1, r4, #0 - mul r1, r0 - ldr r0, [sp, #8] - add r5, sp, #0x28 - add r4, r0, r1 -_022655D0: - ldr r1, _02265684 ; =0x0000312C - ldr r0, [sp, #0x18] - ldrb r1, [r4, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _0226561C - ldr r1, _02265688 ; =0x000001EE - cmp r0, r1 - beq _0226561C - add r0, r6, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265616 - add r0, r6, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02265610 - mov r0, #3 - strb r0, [r5, #0xe] - b _0226561A -_02265610: - mov r0, #1 - strb r0, [r5, #0xe] - b _0226561A -_02265616: - mov r0, #2 - strb r0, [r5, #0xe] -_0226561A: - add r5, r5, #1 -_0226561C: - ldr r0, [sp, #0x18] - add r4, r4, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _022655D0 -_0226562A: - mov r5, #0 - add r6, sp, #0x28 - add r4, r6, #0 - add r7, r5, #0 -_02265632: - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - add r2, r5, #6 - add r3, r7, #0 - bl ov16_02252060 - strh r0, [r6, #0x14] - add r2, r5, #0 - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - add r2, #0x1f - mov r3, #0 - bl ov16_02252060 - strb r0, [r4, #0x1c] - add r2, r5, #0 - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - add r2, #0x27 - mov r3, #0 - bl ov16_02252060 - add r1, r4, #0 - add r1, #0x20 - add r5, r5, #1 - strb r0, [r1] - add r6, r6, #2 - add r4, r4, #1 - cmp r5, #4 - blt _02265632 - ldr r0, [sp, #0xc] - mov r1, #0xc0 - mul r1, r0 - ldr r0, [sp, #8] - add r3, sp, #0x28 - add r0, r0, r1 - ldr r1, _0226568C ; =0x00002D8C - b _02265690 - nop -_02265680: .word 0x00003108 -_02265684: .word 0x0000312C -_02265688: .word 0x000001EE -_0226568C: .word 0x00002D8C -_02265690: - ldr r2, [r0, r1] - strh r2, [r3, #0x24] - add r2, r1, #4 - ldr r2, [r0, r2] - strh r2, [r3, #0x26] - mov r2, #0x24 - ldrsh r2, [r3, r2] - cmp r2, #0 - beq _022656B8 - add r1, #0x20 - ldr r0, [r0, r1] - cmp r0, #0 - add r0, sp, #0x48 - beq _022656B2 - mov r1, #3 - strb r1, [r0, #8] - b _022656BE -_022656B2: - mov r1, #1 - strb r1, [r0, #8] - b _022656BE -_022656B8: - mov r1, #2 - add r0, sp, #0x48 - strb r1, [r0, #8] -_022656BE: - mov r0, #0x2c - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - mov r1, #1 - add r3, sp, #0x28 - bl ov16_02264A04 - add sp, #0x54 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02265330 - - thumb_func_start ov16_022656D4 -ov16_022656D4: ; 0x022656D4 - push {r0, r1, r2, r3} - push {r3, lr} - add r2, r1, #0 - mov r1, #4 - str r1, [sp] - mov r1, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov16_022656D4 - - thumb_func_start ov16_022656F0 -ov16_022656F0: ; 0x022656F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r2, [sp, #0xc] - str r0, [sp, #4] - str r1, [sp, #8] - bl ov16_0223DF10 - ldr r1, [sp, #0xc] - bl ov16_02252040 - mov r0, #0xf - add r2, sp, #0x14 - strb r0, [r2] - add r7, sp, #0x14 - ldr r1, [sp, #8] - ldr r0, [sp, #0xc] - add r5, r7, #0 - add r1, r1, r0 - ldr r0, _02265780 ; =0x0000219C - ldrb r0, [r1, r0] - mov r1, #0xc0 - strb r0, [r2, #1] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - mul r1, r0 - ldr r0, [sp, #8] - add r6, r0, r1 - add r4, r6, #0 -_0226572A: - ldr r0, _02265784 ; =0x00002D4C - ldr r1, _02265788 ; =0x00002D70 - ldrh r0, [r6, r0] - strh r0, [r7, #4] - ldr r0, _0226578C ; =0x00002D6C - ldrb r0, [r4, r0] - strb r0, [r5, #0xc] - ldr r0, _02265784 ; =0x00002D4C - ldrb r1, [r4, r1] - ldrh r0, [r6, r0] - bl sub_020790DC - strb r0, [r5, #0x10] - ldr r0, [sp, #0x10] - add r6, r6, #2 - add r0, r0, #1 - add r7, r7, #2 - add r4, r4, #1 - add r5, r5, #1 - str r0, [sp, #0x10] - cmp r0, #4 - blt _0226572A - mov r0, #0 - mvn r0, r0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - mov r3, #0 - bl ov16_02254A6C - add r1, sp, #0x14 - strh r0, [r1, #2] - mov r0, #0x14 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - mov r1, #1 - add r3, sp, #0x14 - bl ov16_02264A04 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02265780: .word 0x0000219C -_02265784: .word 0x00002D4C -_02265788: .word 0x00002D70 -_0226578C: .word 0x00002D6C - thumb_func_end ov16_022656F0 - - thumb_func_start ov16_02265790 -ov16_02265790: ; 0x02265790 - push {r0, r1, r2, r3} - push {r3, lr} - add r2, r1, #0 - mov r1, #4 - str r1, [sp] - mov r1, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov16_02265790 - - thumb_func_start ov16_022657AC -ov16_022657AC: ; 0x022657AC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r1, #0 - add r1, r3, #0 - add r4, r2, #0 - str r3, [sp, #0xc] - bl ov16_02252040 - ldr r0, [sp, #4] - bl ov16_0223DF0C - mov r2, #0x10 - add r1, sp, #0x1c - strb r2, [r1] - strh r4, [r1, #2] - mov r1, #2 - add r2, r0, #0 - and r2, r1 - beq _022657E6 - mov r1, #8 - tst r0, r1 - bne _022657E6 - cmp r2, #0 - beq _022657EE - ldr r0, [sp, #0xc] - cmp r0, #2 - blt _022657EE -_022657E6: - mov r1, #1 - add r0, sp, #0x1c - strb r1, [r0, #1] - b _022657F4 -_022657EE: - mov r1, #0 - add r0, sp, #0x1c - strb r1, [r0, #1] -_022657F4: - ldr r2, [sp, #8] - mov r0, #0 - str r0, [sp, #0x18] - ldr r1, _022658B8 ; =0x00002D54 - add r0, r2, #0 - add r7, r0, r1 - add r1, #0x6a - add r5, r0, r1 - mov r0, #3 - add r4, sp, #0x20 - str r0, [sp, #0x14] - str r0, [sp, #0x10] - mov r0, #4 - add r3, sp, #0x1c - add r4, #1 - mov ip, r0 -_02265814: - ldr r0, _022658BC ; =0x00002D8C - ldr r0, [r2, r0] - cmp r0, #0 - beq _02265882 - strh r0, [r3, #8] - ldr r0, _022658C0 ; =0x00002D90 - ldr r0, [r2, r0] - strh r0, [r3, #0xa] - ldrb r1, [r4] - mov r0, #4 - orr r0, r1 - strb r0, [r4] - mov r0, #0xb5 - lsl r0, r0, #6 - ldrh r0, [r2, r0] - cmp r0, #0x1d - beq _0226583A - cmp r0, #0x20 - bne _0226584E -_0226583A: - ldr r0, [r7, #0] - lsr r0, r0, #0x1f - bne _0226584E - ldrb r0, [r4] - ldr r1, [sp, #0x10] - bic r0, r1 - mov r1, #2 - orr r0, r1 - strb r0, [r4] - b _02265862 -_0226584E: - ldrb r6, [r4] - ldr r0, [sp, #0x14] - bic r6, r0 - ldrb r0, [r5] - lsl r0, r0, #0x1c - lsr r1, r0, #0x1c - mov r0, #3 - and r0, r1 - orr r0, r6 - strb r0, [r4] -_02265862: - ldr r1, [sp, #8] - ldr r0, [sp, #0x18] - add r1, r1, r0 - ldr r0, _022658C4 ; =0x0000219C - ldrb r0, [r1, r0] - strb r0, [r3, #4] - ldr r0, _022658C8 ; =0x00002DAC - ldr r0, [r2, r0] - cmp r0, #0 - beq _0226587C - mov r0, #3 - strb r0, [r3, #6] - b _0226588E -_0226587C: - mov r0, #1 - strb r0, [r3, #6] - b _0226588E -_02265882: - ldrb r1, [r4] - mov r0, ip - bic r1, r0 - strb r1, [r4] - mov r0, #2 - strb r0, [r3, #6] -_0226588E: - ldr r0, [sp, #0x18] - add r2, #0xc0 - add r0, r0, #1 - add r3, #8 - add r4, #8 - add r7, #0xc0 - add r5, #0xc0 - str r0, [sp, #0x18] - cmp r0, #4 - blt _02265814 - mov r0, #0x24 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - mov r1, #1 - add r3, sp, #0x1c - bl ov16_02264A04 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_022658B8: .word 0x00002D54 -_022658BC: .word 0x00002D8C -_022658C0: .word 0x00002D90 -_022658C4: .word 0x0000219C -_022658C8: .word 0x00002DAC - thumb_func_end ov16_022657AC - - thumb_func_start ov16_022658CC -ov16_022658CC: ; 0x022658CC - push {r0, r1, r2, r3} - push {r3, lr} - add r2, r1, #0 - mov r1, #4 - str r1, [sp] - mov r1, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov16_022658CC - - thumb_func_start ov16_022658E8 -ov16_022658E8: ; 0x022658E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r1, #0 - add r1, r2, #0 - str r2, [sp, #0xc] - bl ov16_02252040 - add r6, sp, #0x10 - mov r1, #0x11 - add r0, sp, #0x10 - strb r1, [r0] - mov r0, #0 - ldr r4, [sp, #8] - mov ip, r0 - ldr r1, _02265A5C ; =0x00002DCC - add r0, r4, #0 - add r7, r0, r1 - ldr r0, _02265A60 ; =0x0000312C - add r5, r6, #0 -_02265912: - ldr r2, [sp, #8] - mov r1, ip - add r2, r2, r1 - ldr r1, _02265A64 ; =0x0000219C - mov r3, #0 - ldrb r1, [r2, r1] - strb r1, [r6, #4] -_02265920: - add r1, r4, r3 - ldrb r2, [r1, r0] - add r1, r5, r3 - add r3, r3, #1 - strb r2, [r1, #8] - cmp r3, #6 - blt _02265920 - ldr r1, [r7, #0] - add r4, r4, #6 - lsl r1, r1, #0xa - lsr r2, r1, #0x1d - add r1, r6, #0 - add r1, #0x20 - strb r2, [r1] - mov r1, ip - add r1, r1, #1 - add r6, r6, #1 - add r5, r5, #6 - add r7, #0xc0 - mov ip, r1 - cmp r1, #4 - blt _02265912 - ldr r0, [sp, #4] - bl ov16_0223DF0C - cmp r0, #0x4a - bne _022659FE - mov r0, #1 - bl sub_020787CC - ldr r2, _02265A68 ; =0x00003108 - ldr r1, [sp, #8] - ldrb r1, [r1, r2] - tst r0, r1 - bne _02265984 - mov r0, #3 - bl sub_020787CC - ldr r2, _02265A68 ; =0x00003108 - ldr r1, [sp, #8] - ldrb r1, [r1, r2] - tst r0, r1 - bne _02265984 - mov r1, #1 - add r0, sp, #0x10 - strb r1, [r0, #1] - mov r1, #0 - strb r1, [r0, #2] - strb r1, [r0, #3] - b _02265A48 -_02265984: - mov r0, #1 - bl sub_020787CC - ldr r2, _02265A68 ; =0x00003108 - ldr r1, [sp, #8] - add r3, sp, #0x10 - ldrb r1, [r1, r2] - tst r0, r1 - bne _022659CA - mov r0, #0 - mov r2, #0xba - ldr r1, [sp, #8] - strb r0, [r3, #1] - lsl r2, r2, #6 - ldr r4, [r1, r2] - ldr r1, _02265A6C ; =0x200400C0 - tst r1, r4 - beq _022659B0 - mov r1, #1 - strb r1, [r3, #2] - strb r0, [r3, #3] - b _02265A48 -_022659B0: - ldr r1, [sp, #8] - sub r2, #0x10 - ldr r2, [r1, r2] - mov r1, #1 - lsl r1, r1, #0x18 - tst r1, r2 - strb r0, [r3, #2] - beq _022659C6 - mov r0, #1 - strb r0, [r3, #3] - b _02265A48 -_022659C6: - strb r0, [r3, #3] - b _02265A48 -_022659CA: - mov r0, #0 - mov r2, #3 - ldr r1, [sp, #8] - strb r0, [r3, #1] - lsl r2, r2, #0xc - ldr r4, [r1, r2] - ldr r1, _02265A6C ; =0x200400C0 - tst r1, r4 - beq _022659E4 - mov r1, #1 - strb r1, [r3, #2] - strb r0, [r3, #3] - b _02265A48 -_022659E4: - ldr r1, [sp, #8] - sub r2, #0x10 - ldr r2, [r1, r2] - mov r1, #1 - lsl r1, r1, #0x18 - tst r1, r2 - strb r0, [r3, #2] - beq _022659FA - mov r0, #1 - strb r0, [r3, #3] - b _02265A48 -_022659FA: - strb r0, [r3, #3] - b _02265A48 -_022659FE: - ldr r0, [sp, #4] - bl ov16_0223DF0C - cmp r0, #0 - bne _02265A3E - mov r2, #0xba - mov r0, #0 - add r3, sp, #0x10 - ldr r1, [sp, #8] - strb r0, [r3, #1] - lsl r2, r2, #6 - ldr r4, [r1, r2] - ldr r1, _02265A6C ; =0x200400C0 - tst r1, r4 - beq _02265A24 - mov r1, #1 - strb r1, [r3, #2] - strb r0, [r3, #3] - b _02265A48 -_02265A24: - ldr r1, [sp, #8] - sub r2, #0x10 - ldr r2, [r1, r2] - mov r1, #1 - lsl r1, r1, #0x18 - tst r1, r2 - strb r0, [r3, #2] - beq _02265A3A - mov r0, #1 - strb r0, [r3, #3] - b _02265A48 -_02265A3A: - strb r0, [r3, #3] - b _02265A48 -_02265A3E: - mov r1, #0 - add r0, sp, #0x10 - strb r1, [r0, #1] - strb r1, [r0, #2] - strb r1, [r0, #3] -_02265A48: - mov r0, #0x24 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - mov r1, #1 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02265A5C: .word 0x00002DCC -_02265A60: .word 0x0000312C -_02265A64: .word 0x0000219C -_02265A68: .word 0x00003108 -_02265A6C: .word 0x200400C0 - thumb_func_end ov16_022658E8 - - thumb_func_start ov16_02265A70 -ov16_02265A70: ; 0x02265A70 - push {r0, r1, r2, r3} - push {r3, lr} - add r2, r1, #0 - mov r1, #4 - str r1, [sp] - mov r1, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov16_02265A70 - - thumb_func_start ov16_02265A8C -ov16_02265A8C: ; 0x02265A8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r1, #0 - add r1, r2, #0 - str r2, [sp, #0xc] - add r4, r3, #0 - bl ov16_02252040 - mov r0, #0x12 - add r1, sp, #0x10 - strb r0, [r1] - ldr r0, [sp, #0xc] - add r7, sp, #0x10 - strb r0, [r1, #1] - ldr r0, [sp, #0x50] - strb r4, [r1, #2] - str r0, [sp, #0x30] - ldr r0, [sp, #0x54] - ldr r5, [sp, #8] - strb r0, [r1, #3] - ldr r1, _02265B04 ; =0x00003108 - ldr r0, [sp, #8] - mov r3, #0 - ldrb r1, [r0, r1] - add r0, sp, #0x30 - add r6, r7, #0 - strb r1, [r0, #4] - ldr r0, _02265B08 ; =0x0000312C -_02265AC8: - ldr r1, [sp, #8] - mov r4, #0 - add r2, r1, r3 - ldr r1, _02265B0C ; =0x0000219C - ldrb r1, [r2, r1] - strb r1, [r7, #4] -_02265AD4: - add r1, r5, r4 - ldrb r2, [r1, r0] - add r1, r6, r4 - add r4, r4, #1 - strb r2, [r1, #8] - cmp r4, #6 - blt _02265AD4 - add r3, r3, #1 - add r7, r7, #1 - add r5, r5, #6 - add r6, r6, #6 - cmp r3, #4 - blt _02265AC8 - mov r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #0xc] - mov r1, #1 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02265B04: .word 0x00003108 -_02265B08: .word 0x0000312C -_02265B0C: .word 0x0000219C - thumb_func_end ov16_02265A8C - - thumb_func_start ov16_02265B10 -ov16_02265B10: ; 0x02265B10 - push {r0, r1, r2, r3} - push {r3, lr} - add r2, r1, #0 - mov r1, #4 - str r1, [sp] - mov r1, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov16_02265B10 - - thumb_func_start ov16_02265B2C -ov16_02265B2C: ; 0x02265B2C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r2, #0 - add r6, r0, #0 - add r0, r1, #0 - add r1, r5, #0 - add r4, r3, #0 - bl ov16_02252040 - mov r1, #0x13 - add r0, sp, #4 - strb r1, [r0] - ldr r1, [sp, #0x20] - strh r4, [r0, #2] - strb r1, [r0, #1] - ldr r0, [sp, #0x24] - mov r1, #1 - str r0, [sp, #8] - ldr r0, [sp, #0x28] - add r2, r5, #0 - str r0, [sp, #0xc] - mov r0, #0xc - str r0, [sp] - add r0, r6, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02265B2C - - thumb_func_start ov16_02265B68 -ov16_02265B68: ; 0x02265B68 - push {r4, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x14 - add r3, sp, #4 - strb r1, [r3] - ldr r1, [r2, #0x64] - add r4, r2, r1 - ldr r1, _02265B98 ; =0x0000219C - ldrb r1, [r4, r1] - strb r1, [r3, #1] - ldr r1, _02265B9C ; =0x00003044 - ldr r1, [r2, r1] - strh r1, [r3, #2] - mov r1, #4 - str r1, [sp] - ldr r2, [r2, #0x64] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r4, pc} - nop -_02265B98: .word 0x0000219C -_02265B9C: .word 0x00003044 - thumb_func_end ov16_02265B68 - - thumb_func_start ov16_02265BA0 -ov16_02265BA0: ; 0x02265BA0 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r3, r2, #0 - mov r1, #0x15 - strb r1, [r3] - mov r1, #0x24 - str r1, [sp] - ldr r2, [r4, #0x64] - mov r1, #1 - bl ov16_02264A04 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov16_02265BA0 - - thumb_func_start ov16_02265BBC -ov16_02265BBC: ; 0x02265BBC - push {r4, r5, r6, lr} - sub sp, #0x68 - mov r3, #0 - add r4, r1, #0 - str r3, [sp] - ldr r6, [r4, #0x64] - add r5, r0, #0 - str r6, [sp, #4] - ldr r6, [r4, #0x6c] - str r6, [sp, #8] - str r2, [sp, #0xc] - add r2, sp, #0x10 - bl ov16_02266B78 - mov r0, #0x58 - str r0, [sp] - ldr r2, [r4, #0x64] - add r0, r5, #0 - mov r1, #1 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x68 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02265BBC - - thumb_func_start ov16_02265BEC -ov16_02265BEC: ; 0x02265BEC - push {r4, r5, r6, lr} - sub sp, #0x68 - add r4, r3, #0 - mov r3, #0 - str r3, [sp] - ldr r6, [sp, #0x78] - str r4, [sp, #4] - str r6, [sp, #8] - str r2, [sp, #0xc] - add r2, sp, #0x10 - add r5, r0, #0 - bl ov16_02266B78 - mov r0, #0x58 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x68 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_02265BEC - - thumb_func_start ov16_02265C1C -ov16_02265C1C: ; 0x02265C1C - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x17 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02265C1C - - thumb_func_start ov16_02265C38 -ov16_02265C38: ; 0x02265C38 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r1, #0 - str r2, [sp, #8] - add r1, r2, #0 - add r3, r5, r2 - ldr r2, _02265CFC ; =0x0000219C - str r0, [sp, #4] - ldrb r2, [r3, r2] - bl ov16_0223DFAC - add r4, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - mov r0, #0x18 - add r3, sp, #0xc - strb r0, [r3] - ldr r0, [sp, #8] - mov r1, #0xc0 - add r4, r0, #0 - mul r4, r1 - ldr r0, _02265D00 ; =0x00002D74 - add r1, r5, r4 - ldrb r2, [r1, r0] - strb r2, [r3, #1] - add r2, r0, #0 - add r2, #0x18 - ldr r2, [r1, r2] - strh r2, [r3, #2] - add r2, r0, #0 - add r2, #0x1c - ldr r2, [r1, r2] - sub r0, #0x34 - strh r2, [r3, #4] - ldr r2, _02265D04 ; =0x0000215C - ldr r2, [r5, r2] - str r2, [sp, #0x14] - ldrh r0, [r1, r0] - cmp r0, #0x1d - beq _02265C9E - cmp r0, #0x20 - bne _02265CB0 -_02265C9E: - ldr r0, _02265D08 ; =0x00002D54 - add r1, r5, r4 - ldr r0, [r1, r0] - lsr r0, r0, #0x1f - bne _02265CB0 - mov r1, #2 - add r0, sp, #0xc - strb r1, [r0, #7] - b _02265CBE -_02265CB0: - ldr r0, _02265D0C ; =0x00002DBE - add r1, r5, r4 - ldrb r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r1, r0, #0x1c - add r0, sp, #0xc - strb r1, [r0, #7] -_02265CBE: - add r0, r7, #0 - add r1, r6, #0 - bl sub_02075AD0 - ldr r1, _02265D10 ; =0x00002DA4 - add r2, r5, r4 - ldr r1, [r2, r1] - sub r0, r1, r0 - str r0, [sp, #0x18] - add r0, r7, #0 - add r1, r6, #1 - bl sub_02075AD0 - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl sub_02075AD0 - sub r0, r4, r0 - str r0, [sp, #0x1c] - mov r0, #0x14 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #8] - mov r1, #1 - add r3, sp, #0xc - bl ov16_02264A04 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02265CFC: .word 0x0000219C -_02265D00: .word 0x00002D74 -_02265D04: .word 0x0000215C -_02265D08: .word 0x00002D54 -_02265D0C: .word 0x00002DBE -_02265D10: .word 0x00002DA4 - thumb_func_end ov16_02265C38 - - thumb_func_start ov16_02265D14 -ov16_02265D14: ; 0x02265D14 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r2, #0 - add r5, r1, #0 - str r3, [sp, #8] - ldr r2, _02265D90 ; =0x0000219C - add r3, r5, r4 - ldrb r2, [r3, r2] - add r1, r4, #0 - str r0, [sp, #4] - bl ov16_0223DFAC - add r6, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - mov r1, #0x19 - add r0, sp, #0xc - strb r1, [r0] - ldr r0, [sp, #8] - add r1, r6, #0 - str r0, [sp, #0x10] - add r0, r7, #0 - bl sub_02075AD0 - mov r1, #0xc0 - mul r1, r4 - add r2, r5, r1 - ldr r1, _02265D94 ; =0x00002DA4 - ldr r1, [r2, r1] - sub r0, r1, r0 - str r0, [sp, #0x14] - add r0, r7, #0 - add r1, r6, #1 - bl sub_02075AD0 - add r5, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl sub_02075AD0 - sub r0, r5, r0 - str r0, [sp, #0x18] - mov r0, #0x10 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #0xc - bl ov16_02264A04 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02265D90: .word 0x0000219C -_02265D94: .word 0x00002DA4 - thumb_func_end ov16_02265D14 - - thumb_func_start ov16_02265D98 -ov16_02265D98: ; 0x02265D98 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r0, [sp, #4] - add r0, r1, #0 - mov ip, r2 - mov r5, #0xb5 - mov r2, #0x1a - add r1, sp, #0xc - strb r2, [r1] - mov r3, #0xc0 - mov r2, ip - mul r3, r2 - add r2, r0, r3 - lsl r5, r5, #6 - ldrh r4, [r2, r5] - strh r4, [r1, #2] - add r4, r5, #0 - add r4, #0x26 - ldrb r2, [r2, r4] - add r5, #0x70 - lsl r2, r2, #0x1b - lsr r2, r2, #0x1b - strb r2, [r1, #8] - add r2, r0, r5 - mov r1, #1 - ldr r4, [r2, r3] - lsl r1, r1, #0x18 - tst r1, r4 - beq _02265DD6 - mov r4, #1 - b _02265DD8 -_02265DD6: - mov r4, #0 -_02265DD8: - add r1, sp, #0xc - strb r4, [r1, #9] - mov r1, #2 - ldr r4, [r2, r3] - lsl r1, r1, #0x14 - tst r1, r4 - beq _02265DEA - mov r4, #1 - b _02265DEC -_02265DEA: - mov r4, #0 -_02265DEC: - add r1, sp, #0xc - strb r4, [r1, #0xa] - ldr r4, [r2, r3] - mov r2, #2 - lsl r2, r2, #0x14 - tst r2, r4 - beq _02265E0A - ldr r2, _02265E94 ; =0x00002DFA - add r4, r0, r3 - ldrh r3, [r4, r2] - sub r2, #0x16 - strb r3, [r1, #1] - ldr r1, [r4, r2] - str r1, [sp, #0x10] - b _02265E1C -_02265E0A: - ldr r2, _02265E98 ; =0x00002DBE - add r4, r0, r3 - ldrb r3, [r4, r2] - sub r2, #0x16 - lsl r3, r3, #0x1c - lsr r3, r3, #0x1c - strb r3, [r1, #1] - ldr r1, [r4, r2] - str r1, [sp, #0x10] -_02265E1C: - mov r1, #0 - str r1, [sp, #8] - ldr r1, _02265E9C ; =0x00002D66 - add r7, sp, #0xc - add r3, r0, r1 - add r1, #0x58 - add r4, r7, #0 - add r5, r7, #0 - add r6, r0, r1 -_02265E2E: - mov r1, #0xb5 - lsl r1, r1, #6 - ldrh r1, [r0, r1] - strh r1, [r7, #0xc] - ldrb r1, [r3] - lsl r1, r1, #0x1a - lsr r1, r1, #0x1f - strb r1, [r4, #0x18] - ldrb r1, [r3] - lsl r1, r1, #0x1b - lsr r1, r1, #0x1b - strb r1, [r4, #0x1c] - ldr r1, _02265EA0 ; =0x00002DB0 - ldr r2, [r0, r1] - mov r1, #2 - lsl r1, r1, #0x14 - tst r1, r2 - beq _02265E5C - ldr r1, _02265E94 ; =0x00002DFA - ldrh r1, [r0, r1] - strb r1, [r4, #0x14] - ldr r1, _02265EA4 ; =0x00002DE4 - b _02265E66 -_02265E5C: - ldrb r1, [r6] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - strb r1, [r4, #0x14] - ldr r1, _02265EA8 ; =0x00002DA8 -_02265E66: - ldr r1, [r0, r1] - add r0, #0xc0 - str r1, [r5, #0x20] - ldr r1, [sp, #8] - add r7, r7, #2 - add r1, r1, #1 - add r3, #0xc0 - add r4, r4, #1 - add r5, r5, #4 - add r6, #0xc0 - str r1, [sp, #8] - cmp r1, #4 - blt _02265E2E - mov r0, #0x30 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #1 - mov r2, ip - add r3, sp, #0xc - bl ov16_02264A04 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02265E94: .word 0x00002DFA -_02265E98: .word 0x00002DBE -_02265E9C: .word 0x00002D66 -_02265EA0: .word 0x00002DB0 -_02265EA4: .word 0x00002DE4 -_02265EA8: .word 0x00002DA8 - thumb_func_end ov16_02265D98 - - thumb_func_start ov16_02265EAC -ov16_02265EAC: ; 0x02265EAC - push {r4, lr} - sub sp, #8 - mov r4, #0x1b - add r1, sp, #4 - strb r4, [r1] - strh r2, [r1, #2] - mov r1, #4 - str r1, [sp] - add r2, r3, #0 - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02265EAC - - thumb_func_start ov16_02265ECC -ov16_02265ECC: ; 0x02265ECC - push {r3, lr} - sub sp, #8 - mov r1, #0x1c - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02265ECC - - thumb_func_start ov16_02265EE8 -ov16_02265EE8: ; 0x02265EE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - mov ip, r1 - mov r3, #0x1d - add r1, sp, #8 - strb r3, [r1] - strb r2, [r1, #1] - ldr r3, [r0, #0x30] - mov r2, #0xc0 - mov r1, ip - mul r2, r1 - ldr r1, _02265FA0 ; =0x00002DB0 - add r2, r3, r2 - ldr r2, [r2, r1] - mov r1, #1 - lsl r1, r1, #0x18 - tst r1, r2 - beq _02265F10 - mov r2, #1 - b _02265F12 -_02265F10: - mov r2, #0 -_02265F12: - add r7, sp, #8 - add r1, sp, #8 - mov r3, #0 - strb r2, [r1, #2] - str r3, [sp, #4] - add r4, r7, #0 - add r5, r7, #0 -_02265F20: - ldr r1, [r0, #0x30] - add r2, r1, r3 - mov r1, #0xb5 - lsl r1, r1, #6 - ldrh r1, [r2, r1] - strh r1, [r7, #4] - ldr r1, [r0, #0x30] - add r2, r1, r3 - ldr r1, _02265FA4 ; =0x00002D66 - ldrb r1, [r2, r1] - lsl r1, r1, #0x1a - lsr r1, r1, #0x1f - strb r1, [r4, #0x10] - ldr r1, [r0, #0x30] - add r2, r1, r3 - ldr r1, _02265FA4 ; =0x00002D66 - ldrb r1, [r2, r1] - lsl r1, r1, #0x1b - lsr r1, r1, #0x1b - strb r1, [r4, #0x14] - ldr r1, [r0, #0x30] - add r6, r1, r3 - ldr r1, _02265FA0 ; =0x00002DB0 - ldr r2, [r6, r1] - mov r1, #2 - lsl r1, r1, #0x14 - tst r1, r2 - beq _02265F66 - ldr r1, _02265FA8 ; =0x00002DFA - ldrh r1, [r6, r1] - strb r1, [r4, #0xc] - ldr r1, [r0, #0x30] - add r2, r1, r3 - ldr r1, _02265FAC ; =0x00002DE4 - b _02265F76 -_02265F66: - ldr r1, _02265FB0 ; =0x00002DBE - ldrb r1, [r6, r1] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - strb r1, [r4, #0xc] - ldr r1, [r0, #0x30] - add r2, r1, r3 - ldr r1, _02265FB4 ; =0x00002DA8 -_02265F76: - ldr r1, [r2, r1] - add r3, #0xc0 - str r1, [r5, #0x18] - ldr r1, [sp, #4] - add r7, r7, #2 - add r1, r1, #1 - add r4, r4, #1 - add r5, r5, #4 - str r1, [sp, #4] - cmp r1, #4 - blt _02265F20 - mov r1, #0x28 - str r1, [sp] - mov r1, #1 - mov r2, ip - add r3, sp, #8 - bl ov16_02264A04 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_02265FA0: .word 0x00002DB0 -_02265FA4: .word 0x00002D66 -_02265FA8: .word 0x00002DFA -_02265FAC: .word 0x00002DE4 -_02265FB0: .word 0x00002DBE -_02265FB4: .word 0x00002DA8 - thumb_func_end ov16_02265EE8 - - thumb_func_start ov16_02265FB8 -ov16_02265FB8: ; 0x02265FB8 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - mov r3, #0x1e - add r1, sp, #4 - strb r3, [r1] - strb r2, [r1, #1] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r4, pc} - thumb_func_end ov16_02265FB8 - - thumb_func_start ov16_02265FD8 -ov16_02265FD8: ; 0x02265FD8 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - mov r3, #0x1f - add r1, sp, #4 - strb r3, [r1] - strb r2, [r1, #1] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r4, pc} - thumb_func_end ov16_02265FD8 - - thumb_func_start ov16_02265FF8 -ov16_02265FF8: ; 0x02265FF8 - push {r3, r4, r5, lr} - sub sp, #0x68 - add r4, r2, #0 - str r3, [sp] - str r4, [sp, #4] - str r4, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - add r2, sp, #0x10 - mov r3, #1 - add r5, r0, #0 - bl ov16_02266B78 - mov r0, #0x58 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x68 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02265FF8 - - thumb_func_start ov16_02266028 -ov16_02266028: ; 0x02266028 - push {r3, r4, r5, lr} - sub sp, #0x68 - add r4, r2, #0 - ldr r2, [sp, #0x78] - add r5, r0, #0 - str r2, [sp] - str r4, [sp, #4] - str r3, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - add r2, sp, #0x10 - mov r3, #1 - bl ov16_02266B78 - mov r0, #0x58 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x68 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02266028 - - thumb_func_start ov16_02266058 -ov16_02266058: ; 0x02266058 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r2, #0 - mov r2, #0x20 - add r0, sp, #4 - strb r2, [r0] - strb r3, [r0, #1] - ldr r0, _02266094 ; =0x00003122 - ldrsh r2, [r1, r0] - ldr r0, _02266098 ; =0x00002E4C - ldr r0, [r1, r0] - sub r1, r2, r0 - mov r0, #0x64 - mul r0, r1 - add r1, r2, #0 - bl sub_020E1F6C - add r1, sp, #4 - strh r0, [r1, #2] - mov r0, #4 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02266094: .word 0x00003122 -_02266098: .word 0x00002E4C - thumb_func_end ov16_02266058 - - thumb_func_start ov16_0226609C -ov16_0226609C: ; 0x0226609C - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - mov r1, #0x21 - add r0, sp, #4 - strb r1, [r0] - ldr r2, _022660E4 ; =0x00002E4C - strb r3, [r0, #1] - ldr r1, [r6, r2] - cmp r1, #0 - bne _022660BE - mov r1, #0xfa - lsl r1, r1, #2 - strh r1, [r0, #2] - b _022660D0 -_022660BE: - mov r0, #0xfa - lsl r0, r0, #2 - mul r0, r1 - add r1, r2, #4 - ldr r1, [r6, r1] - bl sub_020E2178 - add r1, sp, #4 - strh r0, [r1, #2] -_022660D0: - mov r0, #4 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022660E4: .word 0x00002E4C - thumb_func_end ov16_0226609C - - thumb_func_start ov16_022660E8 -ov16_022660E8: ; 0x022660E8 - push {r3, lr} - sub sp, #8 - mov r1, #0x22 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - thumb_func_end ov16_022660E8 - - thumb_func_start ov16_02266100 -ov16_02266100: ; 0x02266100 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - str r2, [sp, #4] - mov r2, #0x23 - add r1, sp, #8 - add r6, r0, #0 - strb r2, [r1] - mov r4, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _02266132 - add r5, sp, #8 -_0226611C: - ldr r0, _02266148 ; =0x0000219C - add r1, r7, r4 - ldrb r0, [r1, r0] - add r4, r4, #1 - strb r0, [r5, #4] - add r0, r6, #0 - add r5, r5, #1 - bl ov16_0223DF1C - cmp r4, r0 - blt _0226611C -_02266132: - mov r0, #8 - str r0, [sp] - ldr r2, [sp, #4] - add r0, r6, #0 - mov r1, #1 - add r3, sp, #8 - bl ov16_02264A04 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02266148: .word 0x0000219C - thumb_func_end ov16_02266100 - - thumb_func_start ov16_0226614C -ov16_0226614C: ; 0x0226614C - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x24 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_0226614C - - thumb_func_start ov16_02266168 -ov16_02266168: ; 0x02266168 - push {r0, r1, r2, r3} - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r4, r1, #0 - add r5, r0, #0 - bl ov16_0223DF10 - add r1, r4, #0 - bl ov16_02252040 - mov r1, #0x25 - add r0, sp, #4 - strb r1, [r0] - add r6, sp, #0x48 - add r3, sp, #8 - mov r2, #4 -_02266188: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02266188 - ldr r0, [r6, #0] - mov r1, #1 - str r0, [r3, #0] - mov r0, #0x28 - str r0, [sp] - add r0, r5, #0 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0x2c - pop {r3, r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov16_02266168 - - thumb_func_start ov16_022661B0 -ov16_022661B0: ; 0x022661B0 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #1 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_022661B0 - - thumb_func_start ov16_022661CC -ov16_022661CC: ; 0x022661CC - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r1, #0 - ldr r1, _022662E8 ; =0x0000219C - add r4, r2, #0 - add r7, r5, r1 - ldrb r2, [r7, r4] - add r1, r4, #0 - str r0, [sp, #4] - bl ov16_0223DFAC - add r6, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - mov r0, #0x26 - add r3, sp, #0x10 - strb r0, [r3] - mov r0, #0xc0 - add r6, r4, #0 - mul r6, r0 - ldr r2, _022662EC ; =0x00002D74 - add r0, r5, r6 - ldrb r1, [r0, r2] - strb r1, [r3, #1] - add r1, r2, #0 - add r1, #0x18 - ldr r1, [r0, r1] - add r2, #0x1c - strh r1, [r3, #2] - ldr r0, [r0, r2] - add r1, r4, #0 - strh r0, [r3, #4] - ldrb r0, [r7, r4] - strb r0, [r3, #6] - add r0, r5, #0 - bl ov16_02253F7C - add r1, sp, #0x10 - ldrb r2, [r1, #7] - mov r3, #0x1f - lsl r0, r0, #0x18 - bic r2, r3 - lsr r3, r0, #0x18 - mov r0, #0x1f - and r0, r3 - orr r0, r2 - strb r0, [r1, #7] - mov r0, #0xb5 - lsl r0, r0, #6 - add r7, r5, r0 - ldrh r0, [r7, r6] - cmp r0, #0x1d - beq _0226624C - cmp r0, #0x20 - bne _02266266 -_0226624C: - ldr r0, _022662F0 ; =0x00002D54 - add r1, r5, r6 - ldr r0, [r1, r0] - lsr r0, r0, #0x1f - bne _02266266 - add r0, sp, #0x10 - ldrb r1, [r0, #7] - mov r2, #0x60 - bic r1, r2 - mov r2, #0x40 - orr r1, r2 - strb r1, [r0, #7] - b _02266280 -_02266266: - add r3, sp, #0x10 - ldrb r2, [r3, #7] - mov r0, #0x60 - add r1, r5, r6 - bic r2, r0 - ldr r0, _022662F4 ; =0x00002DBE - ldrb r0, [r1, r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - lsl r0, r0, #0x1e - lsr r0, r0, #0x19 - orr r0, r2 - strb r0, [r3, #7] -_02266280: - ldr r0, [sp, #0xc] - ldr r1, [sp, #8] - bl sub_02075AD0 - mov r1, #0xc0 - mul r1, r4 - add r2, r5, r1 - ldr r1, _022662F8 ; =0x00002DA4 - ldr r1, [r2, r1] - sub r0, r1, r0 - ldr r1, [sp, #8] - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - add r1, r1, #1 - bl sub_02075AD0 - add r5, r0, #0 - ldr r0, [sp, #0xc] - ldr r1, [sp, #8] - bl sub_02075AD0 - sub r0, r5, r0 - str r0, [sp, #0x1c] - ldrh r1, [r7, r6] - ldr r0, [sp, #4] - bl ov16_0223F9E0 - add r3, sp, #0x10 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1f - ldrb r1, [r3, #7] - mov r2, #0x80 - lsr r0, r0, #0x18 - bic r1, r2 - orr r0, r1 - strb r0, [r3, #7] - ldr r0, [sp, #4] - bl ov16_0223ED8C - str r0, [sp, #0x20] - mov r0, #0x14 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_022662E8: .word 0x0000219C -_022662EC: .word 0x00002D74 -_022662F0: .word 0x00002D54 -_022662F4: .word 0x00002DBE -_022662F8: .word 0x00002DA4 - thumb_func_end ov16_022661CC - - thumb_func_start ov16_022662FC -ov16_022662FC: ; 0x022662FC - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r6, r1, #0 - str r2, [sp, #8] - mov r1, #0x27 - add r2, sp, #0x10 - strb r1, [r2] - ldrb r1, [r2, #1] - mov r3, #0xf - str r0, [sp, #4] - bic r1, r3 - ldr r3, [sp, #8] - add r4, r6, r3 - ldr r3, _02266438 ; =0x0000219C - ldrb r4, [r4, r3] - mov r3, #0xf - and r3, r4 - orr r1, r3 - strb r1, [r2, #1] - ldr r1, [sp, #8] - mov r3, #0xc0 - mul r3, r1 - ldrb r4, [r2, #1] - mov r1, #0xf0 - str r3, [sp, #0xc] - bic r4, r1 - add r1, r3, #0 - add r3, r6, r1 - ldr r1, _0226643C ; =0x00002DCC - ldr r5, [r3, r1] - lsl r5, r5, #0x1a - lsr r5, r5, #0x1c - lsl r5, r5, #0x18 - lsr r5, r5, #0x18 - lsl r5, r5, #0x1c - lsr r5, r5, #0x18 - orr r4, r5 - strb r4, [r2, #1] - add r4, r1, #0 - sub r4, #0x40 - ldr r4, [r3, r4] - sub r1, #0x14 - strh r4, [r2, #2] - ldrh r1, [r3, r1] - strh r1, [r2, #0xc] - ldr r1, [sp, #8] - bl ov16_0223E208 - lsl r0, r0, #3 - add r1, r6, r0 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r7, _02266440 ; =0x00002D6C - lsl r0, r0, #3 - lsr r0, r0, #0x1a - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - add r2, r6, r0 - ldr r0, _02266444 ; =0x00002D66 - ldrb r1, [r2, r0] - add r0, r0, #1 - lsl r1, r1, #0x1b - lsr r3, r1, #0x1b - add r1, sp, #0x10 - strh r3, [r1, #0x20] - ldrb r0, [r2, r0] - ldr r1, [sp, #8] - mov r2, #0xc0 - mul r2, r1 - add r1, r6, r2 - mov ip, r2 - add r2, sp, #0x10 - str r0, [sp, #0x34] - mov r0, #0 - add r3, r1, #0 - add r4, r2, #0 -_02266396: - ldr r5, _02266448 ; =0x00002D4C - add r0, r0, #1 - ldrh r5, [r1, r5] - add r1, r1, #2 - strh r5, [r2, #0xe] - ldrb r5, [r3, r7] - add r2, r2, #2 - add r3, r3, #1 - strb r5, [r4, #0x16] - add r4, r4, #1 - cmp r0, #4 - blt _02266396 - add r1, sp, #0x10 - mov r0, #2 - ldrsh r0, [r1, r0] - cmp r0, #0 - beq _022663CE - mov r0, ip - add r3, r6, r0 - ldr r0, _0226644C ; =0x00002DAC - ldr r1, _02266450 ; =0xFFFFF0FF - ldr r2, [r3, r0] - add r0, r0, #4 - and r1, r2 - str r1, [sp, #0x14] - ldr r0, [r3, r0] - str r0, [sp, #0x2c] - b _022663DC -_022663CE: - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - add r1, r6, r0 - ldr r0, _02266454 ; =0x00002DB0 - ldr r0, [r1, r0] - str r0, [sp, #0x2c] -_022663DC: - mov r1, #0x85 - lsl r1, r1, #6 - mov r0, #1 - ldr r2, [r6, r1] - lsl r0, r0, #0x1a - tst r0, r2 - add r0, sp, #0x10 - beq _022663FA - mov r2, #1 - strh r2, [r0, #0x2a] - ldr r2, [r6, r1] - ldr r0, _02266458 ; =0xFBFFFFFF - and r0, r2 - str r0, [r6, r1] - b _022663FE -_022663FA: - mov r1, #0 - strh r1, [r0, #0x2a] -_022663FE: - mov r1, #0x85 - lsl r1, r1, #6 - mov r0, #2 - ldr r2, [r6, r1] - lsl r0, r0, #0x1a - tst r0, r2 - add r0, sp, #0x10 - beq _0226641E - mov r2, #1 - strh r2, [r0, #0x28] - strh r2, [r0, #0x2a] - ldr r2, [r6, r1] - ldr r0, _0226645C ; =0xF7FFFFFF - and r0, r2 - str r0, [r6, r1] - b _02266422 -_0226641E: - mov r1, #0 - strh r1, [r0, #0x28] -_02266422: - mov r0, #0x2c - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #8] - mov r1, #1 - add r3, sp, #0x10 - bl ov16_02264A04 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_02266438: .word 0x0000219C -_0226643C: .word 0x00002DCC -_02266440: .word 0x00002D6C -_02266444: .word 0x00002D66 -_02266448: .word 0x00002D4C -_0226644C: .word 0x00002DAC -_02266450: .word 0xFFFFF0FF -_02266454: .word 0x00002DB0 -_02266458: .word 0xFBFFFFFF -_0226645C: .word 0xF7FFFFFF - thumb_func_end ov16_022662FC - - thumb_func_start ov16_02266460 -ov16_02266460: ; 0x02266460 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x28 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02266460 - - thumb_func_start ov16_0226647C -ov16_0226647C: ; 0x0226647C - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x29 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_0226647C - - thumb_func_start ov16_02266498 -ov16_02266498: ; 0x02266498 - push {r3, r4, r5, lr} - sub sp, #8 - mov r5, #0x2a - add r4, sp, #4 - strb r5, [r4] - strh r3, [r4, #2] - mov r3, #0xc0 - mul r3, r2 - add r3, r1, r3 - ldr r1, _022664C0 ; =0x00002D67 - ldrb r1, [r3, r1] - add r3, sp, #4 - strb r1, [r4, #1] - mov r1, #4 - str r1, [sp] - mov r1, #1 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022664C0: .word 0x00002D67 - thumb_func_end ov16_02266498 - - thumb_func_start ov16_022664C4 -ov16_022664C4: ; 0x022664C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r7, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov16_0223DF10 - add r1, r5, #0 - bl ov16_02252040 - mov r1, #0x2b - add r0, sp, #4 - strb r1, [r0] - strh r4, [r0, #2] - strb r6, [r0, #1] - mov r0, #4 - str r0, [sp] - add r0, r7, #0 - mov r1, #1 - add r2, r5, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_022664C4 - - thumb_func_start ov16_022664F8 -ov16_022664F8: ; 0x022664F8 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - mov r5, #0x2c - add r1, sp, #4 - strb r5, [r1] - strb r2, [r1, #1] - strb r3, [r1, #2] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022664F8 - - thumb_func_start ov16_0226651C -ov16_0226651C: ; 0x0226651C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - mov r1, #0x2d - add r3, sp, #4 - strb r1, [r3] - mov r1, #0xc0 - add r6, r7, #0 - mul r6, r1 - ldr r1, [r0, #0x30] - add r2, r1, r6 - mov r1, #0xb5 - lsl r1, r1, #6 - ldrh r2, [r2, r1] - strh r2, [r3, #2] - ldr r2, [r0, #0x30] - add r4, r2, r6 - add r2, r1, #0 - add r2, #0x26 - ldrb r2, [r4, r2] - lsl r2, r2, #0x1a - lsr r2, r2, #0x1f - strb r2, [r3, #5] - ldr r2, [r0, #0x30] - add r5, r2, r6 - add r2, r1, #0 - add r2, #0x70 - ldr r4, [r5, r2] - mov r2, #2 - lsl r2, r2, #0x14 - tst r2, r4 - beq _02266570 - add r2, r1, #0 - add r2, #0xba - ldrh r2, [r5, r2] - add r1, #0xa4 - strb r2, [r3, #4] - ldr r2, [r0, #0x30] - add r2, r2, r6 - ldr r1, [r2, r1] - str r1, [sp, #0xc] - b _02266586 -_02266570: - add r2, r1, #0 - add r2, #0x7e - ldrb r2, [r5, r2] - add r1, #0x68 - lsl r2, r2, #0x1c - lsr r2, r2, #0x1c - strb r2, [r3, #4] - ldr r2, [r0, #0x30] - add r2, r2, r6 - ldr r1, [r2, r1] - str r1, [sp, #0xc] -_02266586: - ldr r1, [r0, #0x30] - add r3, sp, #4 - add r2, r1, r6 - ldr r1, _022665A8 ; =0x00002D66 - ldrb r1, [r2, r1] - lsl r1, r1, #0x1b - lsr r2, r1, #0x1b - add r1, sp, #4 - strb r2, [r1, #1] - mov r1, #0xc - str r1, [sp] - mov r1, #1 - add r2, r7, #0 - bl ov16_02264A04 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022665A8: .word 0x00002D66 - thumb_func_end ov16_0226651C - - thumb_func_start ov16_022665AC -ov16_022665AC: ; 0x022665AC - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x2e - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_022665AC - - thumb_func_start ov16_022665C8 -ov16_022665C8: ; 0x022665C8 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x2f - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_022665C8 - - thumb_func_start ov16_022665E4 -ov16_022665E4: ; 0x022665E4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - ldr r1, [r5, #0x30] - add r2, sp, #4 - mov r3, #0x30 - bl ov16_02266CF0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov16_022665E4 - - thumb_func_start ov16_0226660C -ov16_0226660C: ; 0x0226660C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - ldr r1, [r5, #0x30] - add r2, sp, #4 - mov r3, #0x31 - bl ov16_02266CF0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov16_0226660C - - thumb_func_start ov16_02266634 -ov16_02266634: ; 0x02266634 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - ldr r1, [r5, #0x30] - add r2, sp, #4 - mov r3, #0x32 - bl ov16_02266CF0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov16_02266634 - - thumb_func_start ov16_0226665C -ov16_0226665C: ; 0x0226665C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - ldr r1, [r5, #0x30] - add r2, sp, #4 - mov r3, #0x33 - bl ov16_02266CF0 - mov r0, #8 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov16_0226665C - - thumb_func_start ov16_02266684 -ov16_02266684: ; 0x02266684 - push {r3, lr} - sub sp, #8 - mov r1, #0x34 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02266684 - - thumb_func_start ov16_022666A0 -ov16_022666A0: ; 0x022666A0 - push {r3, lr} - sub sp, #8 - mov r1, #0x35 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_022666A0 - - thumb_func_start ov16_022666BC -ov16_022666BC: ; 0x022666BC - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - mov r5, #0x36 - add r1, sp, #4 - strb r5, [r1] - strb r2, [r1, #1] - strh r3, [r1, #2] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022666BC - - thumb_func_start ov16_022666E0 -ov16_022666E0: ; 0x022666E0 - push {r4, r5, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - bl ov16_0223DF0C - mov r2, #0x37 - add r1, sp, #4 - strb r2, [r1] - mov r2, #0 - strh r2, [r1, #2] - mov r1, #4 - tst r0, r1 - beq _02266734 - bl sub_0202F250 - cmp r0, #1 - bne _02266734 - ldr r0, _02266738 ; =0x0000240C - ldr r1, [r5, r0] - mov r0, #0x10 - tst r0, r1 - bne _02266734 - add r0, r5, #0 - add r1, sp, #8 - bl ov16_0223F58C - add r1, sp, #4 - strh r0, [r1, #2] - ldrh r0, [r1, #2] - cmp r0, #0x1c - blo _02266724 - bl sub_02022974 -_02266724: - mov r0, #0x20 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 -_02266734: - add sp, #0x24 - pop {r4, r5, pc} - ; .align 2, 0 -_02266738: .word 0x0000240C - thumb_func_end ov16_022666E0 - - thumb_func_start ov16_0226673C -ov16_0226673C: ; 0x0226673C - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - str r0, [sp, #4] - add r3, r1, #0 - mov r1, #0x38 - add r0, sp, #0xc - strb r1, [r0] - mov r0, #0 - add r7, sp, #0xc - str r2, [sp, #8] - ldr r4, _022667D4 ; =0x00002D66 - mov ip, r0 - add r0, r3, r4 - add r4, #0x58 - add r1, r7, #0 - add r2, r7, #0 - add r6, r3, r4 -_0226675E: - mov r4, #0xb5 - lsl r4, r4, #6 - ldrh r4, [r3, r4] - strh r4, [r7, #0x18] - ldrb r4, [r0] - lsl r4, r4, #0x1a - lsr r5, r4, #0x1f - add r4, r1, #0 - add r4, #0x24 - strb r5, [r4] - ldrb r4, [r0] - lsl r4, r4, #0x1b - lsr r5, r4, #0x1b - add r4, r1, #0 - add r4, #0x28 - strb r5, [r4] - ldr r4, _022667D8 ; =0x00002DB0 - ldr r5, [r3, r4] - mov r4, #2 - lsl r4, r4, #0x14 - tst r4, r5 - beq _02266798 - ldr r4, _022667DC ; =0x00002DFA - ldrh r5, [r3, r4] - add r4, r1, #0 - add r4, #0x20 - strb r5, [r4] - ldr r4, _022667E0 ; =0x00002DE4 - b _022667A6 -_02266798: - ldrb r4, [r6] - lsl r4, r4, #0x1c - lsr r5, r4, #0x1c - add r4, r1, #0 - add r4, #0x20 - strb r5, [r4] - ldr r4, _022667E4 ; =0x00002DA8 -_022667A6: - ldr r4, [r3, r4] - add r3, #0xc0 - str r4, [r2, #0x2c] - mov r4, ip - add r4, r4, #1 - add r7, r7, #2 - add r0, #0xc0 - add r1, r1, #1 - add r2, r2, #4 - add r6, #0xc0 - mov ip, r4 - cmp r4, #4 - blt _0226675E - mov r0, #0x58 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #8] - mov r1, #1 - add r3, sp, #0xc - bl ov16_02264A04 - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022667D4: .word 0x00002D66 -_022667D8: .word 0x00002DB0 -_022667DC: .word 0x00002DFA -_022667E0: .word 0x00002DE4 -_022667E4: .word 0x00002DA8 - thumb_func_end ov16_0226673C - - thumb_func_start ov16_022667E8 -ov16_022667E8: ; 0x022667E8 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x39 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_022667E8 - - thumb_func_start ov16_02266804 -ov16_02266804: ; 0x02266804 - push {r3, lr} - sub sp, #8 - add r2, r1, #0 - mov r1, #0x3a - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02266804 - - thumb_func_start ov16_02266820 -ov16_02266820: ; 0x02266820 - push {r3, lr} - sub sp, #8 - mov r1, #0x3b - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02266820 - - thumb_func_start ov16_0226683C -ov16_0226683C: ; 0x0226683C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r6, r0, #0 - add r5, r1, #0 - bl ov16_0223DF0C - str r0, [sp, #4] - mov r1, #0x3c - add r0, sp, #8 - strb r1, [r0] - mov r4, #0 - strb r4, [r0, #1] - strh r4, [r0, #2] - add r0, r6, #0 - bl ov16_0223DF1C - cmp r0, #0 - ble _02266884 - add r7, sp, #8 -_02266862: - ldr r0, _022668C8 ; =0x000021A8 - ldr r0, [r5, r0] - cmp r0, #0x10 - bne _02266876 - add r0, r4, #0 - bl sub_020787CC - ldrb r1, [r7, #1] - orr r0, r1 - strb r0, [r7, #1] -_02266876: - add r0, r6, #0 - add r5, #0x10 - add r4, r4, #1 - bl ov16_0223DF1C - cmp r4, r0 - blt _02266862 -_02266884: - ldr r0, [sp, #4] - mov r1, #4 - tst r0, r1 - beq _022668B4 - bl sub_0202F250 - cmp r0, #1 - bne _022668B4 - ldr r0, _022668CC ; =0x0000240C - ldr r1, [r6, r0] - mov r0, #0x10 - tst r0, r1 - bne _022668B4 - add r0, r6, #0 - add r1, sp, #0xc - bl ov16_0223F58C - add r1, sp, #8 - strh r0, [r1, #2] - ldrh r0, [r1, #2] - cmp r0, #0x1c - blo _022668B4 - bl sub_02022974 -_022668B4: - mov r0, #0x20 - str r0, [sp] - add r0, r6, #0 - mov r1, #1 - mov r2, #0 - add r3, sp, #8 - bl ov16_02264A04 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022668C8: .word 0x000021A8 -_022668CC: .word 0x0000240C - thumb_func_end ov16_0226683C - - thumb_func_start ov16_022668D0 -ov16_022668D0: ; 0x022668D0 - push {r3, r4, lr} - sub sp, #0x24 - add r4, r0, #0 - bl ov16_0223DF0C - mov r2, #0x3d - add r1, sp, #4 - strb r2, [r1] - mov r2, #0 - strh r2, [r1, #2] - mov r1, #4 - tst r0, r1 - beq _02266912 - bl sub_0202F250 - cmp r0, #1 - bne _02266912 - ldr r0, _02266928 ; =0x0000240C - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - bne _02266912 - add r0, r4, #0 - add r1, sp, #8 - bl ov16_0223F58C - add r1, sp, #4 - strh r0, [r1, #2] - ldrh r0, [r1, #2] - cmp r0, #0x1c - blo _02266912 - bl sub_02022974 -_02266912: - mov r0, #0x20 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0x24 - pop {r3, r4, pc} - nop -_02266928: .word 0x0000240C - thumb_func_end ov16_022668D0 - - thumb_func_start ov16_0226692C -ov16_0226692C: ; 0x0226692C - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - str r0, [sp, #4] - add r3, r1, #0 - mov r1, #0x3e - add r0, sp, #0xc - strb r1, [r0] - mov r0, #0 - add r7, sp, #0xc - str r2, [sp, #8] - ldr r4, _022669C4 ; =0x00002D66 - mov ip, r0 - add r0, r3, r4 - add r4, #0x58 - add r1, r7, #0 - add r2, r7, #0 - add r6, r3, r4 -_0226694E: - mov r4, #0xb5 - lsl r4, r4, #6 - ldrh r4, [r3, r4] - strh r4, [r7, #0x18] - ldrb r4, [r0] - lsl r4, r4, #0x1a - lsr r5, r4, #0x1f - add r4, r1, #0 - add r4, #0x24 - strb r5, [r4] - ldrb r4, [r0] - lsl r4, r4, #0x1b - lsr r5, r4, #0x1b - add r4, r1, #0 - add r4, #0x28 - strb r5, [r4] - ldr r4, _022669C8 ; =0x00002DB0 - ldr r5, [r3, r4] - mov r4, #2 - lsl r4, r4, #0x14 - tst r4, r5 - beq _02266988 - ldr r4, _022669CC ; =0x00002DFA - ldrh r5, [r3, r4] - add r4, r1, #0 - add r4, #0x20 - strb r5, [r4] - ldr r4, _022669D0 ; =0x00002DE4 - b _02266996 -_02266988: - ldrb r4, [r6] - lsl r4, r4, #0x1c - lsr r5, r4, #0x1c - add r4, r1, #0 - add r4, #0x20 - strb r5, [r4] - ldr r4, _022669D4 ; =0x00002DA8 -_02266996: - ldr r4, [r3, r4] - add r3, #0xc0 - str r4, [r2, #0x2c] - mov r4, ip - add r4, r4, #1 - add r7, r7, #2 - add r0, #0xc0 - add r1, r1, #1 - add r2, r2, #4 - add r6, #0xc0 - mov ip, r4 - cmp r4, #4 - blt _0226694E - mov r0, #0x58 - str r0, [sp] - ldr r0, [sp, #4] - ldr r2, [sp, #8] - mov r1, #1 - add r3, sp, #0xc - bl ov16_02264A04 - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022669C4: .word 0x00002D66 -_022669C8: .word 0x00002DB0 -_022669CC: .word 0x00002DFA -_022669D0: .word 0x00002DE4 -_022669D4: .word 0x00002DA8 - thumb_func_end ov16_0226692C - - thumb_func_start ov16_022669D8 -ov16_022669D8: ; 0x022669D8 - push {r3, r4, r5, lr} - sub sp, #8 - mov r3, #0x3f - add r4, sp, #4 - strb r3, [r4] - ldr r3, _02266A14 ; =0x0000216C - ldr r5, [r1, r3] - mov r1, #2 - add r3, r5, #0 - tst r3, r1 - beq _022669F2 - strb r1, [r4, #1] - b _02266A02 -_022669F2: - mov r1, #4 - tst r1, r5 - beq _022669FE - mov r1, #1 - strb r1, [r4, #1] - b _02266A02 -_022669FE: - mov r1, #0 - strb r1, [r4, #1] -_02266A02: - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02266A14: .word 0x0000216C - thumb_func_end ov16_022669D8 - - thumb_func_start ov16_02266A18 -ov16_02266A18: ; 0x02266A18 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - mov r3, #0x40 - add r1, sp, #4 - strb r3, [r1] - strh r2, [r1, #2] - mov r1, #4 - str r1, [sp] - mov r1, #1 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r4, pc} - thumb_func_end ov16_02266A18 - - thumb_func_start ov16_02266A38 -ov16_02266A38: ; 0x02266A38 - push {r3, r4, r5, lr} - sub sp, #0x28 - add r5, r0, #0 - bl ov16_0223DF0C - add r4, r0, #0 - mov r1, #0x41 - add r0, sp, #4 - strb r1, [r0] - add r0, r5, #0 - bl ov16_0223F438 - str r0, [sp, #8] - mov r1, #0 - add r0, sp, #4 - strh r1, [r0, #2] - mov r0, #4 - tst r0, r4 - beq _02266A86 - bl sub_0202F250 - cmp r0, #1 - bne _02266A86 - ldr r0, _02266A9C ; =0x0000240C - ldr r1, [r5, r0] - mov r0, #0x10 - tst r0, r1 - bne _02266A86 - add r0, r5, #0 - add r1, sp, #0xc - bl ov16_0223F58C - add r1, sp, #4 - strh r0, [r1, #2] - ldrh r0, [r1, #2] - cmp r0, #0x1c - bls _02266A86 - bl sub_02022974 -_02266A86: - mov r0, #0x24 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #0x28 - pop {r3, r4, r5, pc} - nop -_02266A9C: .word 0x0000240C - thumb_func_end ov16_02266A38 - - thumb_func_start ov16_02266AA0 -ov16_02266AA0: ; 0x02266AA0 - push {r3, lr} - sub sp, #8 - mov r1, #0x42 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp] - mov r1, #1 - mov r2, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02266AA0 - - thumb_func_start ov16_02266ABC -ov16_02266ABC: ; 0x02266ABC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r0, sp, #4 - add r4, r1, #0 - strb r2, [r0] - bl sub_0203608C - add r1, sp, #4 - strb r0, [r1, #1] - mov r0, #4 - str r0, [sp] - add r0, r5, #0 - mov r1, #2 - add r2, r4, #0 - add r3, sp, #4 - bl ov16_02264A04 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02266ABC - - thumb_func_start ov16_02266AE4 -ov16_02266AE4: ; 0x02266AE4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #1 - ldrb r3, [r5, #3] - str r1, [sp] - ldrb r2, [r5] - ldrb r1, [r5, #2] - lsl r3, r3, #8 - add r4, r0, #0 - orr r1, r3 - ldrb r6, [r5, #1] - cmp r2, #0 - bne _02266B1E - mov r2, #0 - cmp r1, #0 - ble _02266B72 - mov r7, #0x23 - lsl r3, r6, #8 - lsl r7, r7, #8 -_02266B0A: - add r0, r5, r2 - ldr r6, [r4, #0x30] - ldrb r0, [r0, #4] - add r6, r3, r6 - add r6, r2, r6 - add r2, r2, #1 - strb r0, [r6, r7] - cmp r2, r1 - blt _02266B0A - b _02266B72 -_02266B1E: - cmp r2, #1 - bne _02266B56 - lsl r0, r6, #2 - add r0, r4, r0 - mov r3, #0x6a - ldr r4, [r0, #0x34] - lsl r3, r3, #2 - ldrb r2, [r4, r3] - cmp r2, #0 - bne _02266B50 - ldr r2, [sp] - strb r2, [r4, r3] - mov r2, #0 - cmp r1, #0 - ble _02266B72 -_02266B3C: - add r3, r5, r2 - ldrb r4, [r3, #4] - ldr r3, [r0, #0x34] - add r3, r3, r2 - add r3, #0x94 - add r2, r2, #1 - strb r4, [r3] - cmp r2, r1 - blt _02266B3C - b _02266B72 -_02266B50: - mov r0, #0 - str r0, [sp] - b _02266B72 -_02266B56: - cmp r2, #2 - bne _02266B72 - ldrb r7, [r5, #4] - ldrb r5, [r5, #5] - bl ov16_0223ED60 - cmp r0, #0 - beq _02266B72 - ldr r0, [r4, #0x30] - add r1, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov16_02251F80 -_02266B72: - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02266AE4 - - thumb_func_start ov16_02266B78 -ov16_02266B78: ; 0x02266B78 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r2, #0 - mov r1, #0x16 - strb r1, [r5] - add r1, sp, #8 - ldrh r1, [r1, #0x1c] - add r7, r0, #0 - strh r1, [r5, #2] - ldr r1, [sp, #0x1c] - strh r1, [r5, #0x14] - ldr r1, [sp, #0x20] - strh r1, [r5, #0x16] - ldr r1, [sp, #0x18] - str r3, [r5, #0x4c] - str r1, [r5, #0x50] - bl ov16_0223E22C - str r0, [r5, #0x54] - cmp r4, #0 - bne _02266BA4 - b _02266CC8 -_02266BA4: - ldr r0, _02266CCC ; =0x00002144 - ldr r1, [r4, r0] - add r0, #0x10 - str r1, [r5, #4] - ldr r0, [r4, r0] - cmp r0, #0 - beq _02266BB4 - b _02266BC0 -_02266BB4: - add r0, sp, #8 - ldrh r0, [r0, #0x1c] - lsl r0, r0, #4 - add r1, r4, r0 - ldr r0, _02266CD0 ; =0x000003E1 - ldrb r0, [r1, r0] -_02266BC0: - ldr r1, [sp, #0x1c] - strh r0, [r5, #8] - mov r0, #0xc0 - add r6, r1, #0 - mul r6, r0 - ldr r0, _02266CD4 ; =0x00002D75 - add r1, r4, r6 - ldrb r0, [r1, r0] - add r1, r4, #0 - mov r2, #8 - strh r0, [r5, #0xc] - mov r0, #0xd - str r0, [sp] - add r0, r7, #0 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02266C04 - mov r0, #0x4c - str r0, [sp] - add r0, r7, #0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov16_022555A4 - cmp r0, #0 - bne _02266C04 - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r4, r0] - str r0, [r5, #0x10] - b _02266C08 -_02266C04: - mov r0, #0 - str r0, [r5, #0x10] -_02266C08: - ldr r0, _02266CD8 ; =0x00002164 - ldr r0, [r4, r0] - strh r0, [r5, #0xa] - ldr r0, _02266CDC ; =0x00002DB0 - add r1, r4, r0 - mov r0, #1 - ldr r2, [r1, r6] - lsl r0, r0, #0x18 - tst r0, r2 - beq _02266C20 - mov r3, #1 - b _02266C22 -_02266C20: - mov r3, #0 -_02266C22: - ldrh r0, [r5, #0xe] - mov r2, #1 - bic r0, r2 - lsl r2, r3, #0x10 - lsr r3, r2, #0x10 - mov r2, #1 - and r3, r2 - orr r0, r3 - strh r0, [r5, #0xe] - ldr r1, [r1, r6] - lsl r0, r2, #0x15 - tst r0, r1 - bne _02266C3E - mov r2, #0 -_02266C3E: - ldrh r0, [r5, #0xe] - mov r1, #2 - ldr r3, _02266CE0 ; =0x00002D66 - bic r0, r1 - lsl r1, r2, #0x10 - lsr r1, r1, #0x10 - lsl r1, r1, #0x1f - lsr r1, r1, #0x1e - orr r0, r1 - add r1, r4, r3 - add r3, #0x58 - strh r0, [r5, #0xe] - mov r0, #0 - mov ip, r5 - add r2, r5, #0 - add r7, r4, r3 -_02266C5E: - mov r3, #0xb5 - lsl r3, r3, #6 - ldrh r6, [r4, r3] - mov r3, ip - strh r6, [r3, #0x18] - ldrb r3, [r1] - lsl r3, r3, #0x1a - lsr r6, r3, #0x1f - add r3, r5, r0 - add r3, #0x24 - strb r6, [r3] - ldrb r3, [r1] - lsl r3, r3, #0x1b - lsr r6, r3, #0x1b - add r3, r5, r0 - add r3, #0x28 - strb r6, [r3] - mov r3, #0xb7 - lsl r3, r3, #6 - ldr r3, [r4, r3] - str r3, [r2, #0x3c] - ldr r3, _02266CDC ; =0x00002DB0 - ldr r6, [r4, r3] - mov r3, #2 - lsl r3, r3, #0x14 - tst r3, r6 - beq _02266CA2 - ldr r3, _02266CE4 ; =0x00002DFA - ldrh r6, [r4, r3] - add r3, r5, r0 - add r3, #0x20 - strb r6, [r3] - ldr r3, _02266CE8 ; =0x00002DE4 - b _02266CB0 -_02266CA2: - ldrb r3, [r7] - lsl r3, r3, #0x1c - lsr r6, r3, #0x1c - add r3, r5, r0 - add r3, #0x20 - strb r6, [r3] - ldr r3, _02266CEC ; =0x00002DA8 -_02266CB0: - ldr r3, [r4, r3] - add r0, r0, #1 - str r3, [r2, #0x2c] - mov r3, ip - add r3, r3, #2 - add r4, #0xc0 - mov ip, r3 - add r1, #0xc0 - add r2, r2, #4 - add r7, #0xc0 - cmp r0, #4 - blt _02266C5E -_02266CC8: - pop {r3, r4, r5, r6, r7, pc} - nop -_02266CCC: .word 0x00002144 -_02266CD0: .word 0x000003E1 -_02266CD4: .word 0x00002D75 -_02266CD8: .word 0x00002164 -_02266CDC: .word 0x00002DB0 -_02266CE0: .word 0x00002D66 -_02266CE4: .word 0x00002DFA -_02266CE8: .word 0x00002DE4 -_02266CEC: .word 0x00002DA8 - thumb_func_end ov16_02266B78 - - thumb_func_start ov16_02266CF0 -ov16_02266CF0: ; 0x02266CF0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp] - ldr r0, [sp, #0x38] - add r5, r2, #0 - str r1, [sp, #4] - str r0, [sp, #0x38] - mov r0, #0 - add r1, r5, #0 - mov r2, #8 - add r6, r3, #0 - bl sub_020C4BB8 - ldr r0, [sp] - bl ov16_0223DF0C - add r4, r0, #0 - mov r0, #0xc - and r0, r4 - strb r6, [r5] - cmp r0, #0xc - beq _02266D44 - mov r0, #0x10 - tst r0, r4 - beq _02266D2E - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223E208 - cmp r0, #0 - bne _02266D44 -_02266D2E: - cmp r4, #0x4b - bne _02266D3E - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223E208 - cmp r0, #0 - bne _02266D44 -_02266D3E: - cmp r4, #0xcb - beq _02266D44 - b _02266E7A -_02266D44: - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223E1F8 - cmp r0, #2 - beq _02266D5C - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223E1F8 - cmp r0, #3 - bne _02266D6A -_02266D5C: - ldr r6, [sp, #0x38] - ldr r0, [sp] - add r1, r6, #0 - bl ov16_0223E258 - str r0, [sp, #0x38] - b _02266D74 -_02266D6A: - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223E258 - add r6, r0, #0 -_02266D74: - ldr r0, [sp] - add r1, r6, #0 - bl ov16_0223DF20 - mov r4, #0 - str r0, [sp, #0x10] - add r7, r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02266DF4 - mov r0, #6 - add r1, r6, #0 - mul r1, r0 - ldr r0, [sp, #4] - add r6, r0, r1 -_02266D94: - ldr r1, _02266F14 ; =0x0000312C - ldr r0, [sp, #0x10] - ldrb r1, [r6, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - str r0, [sp, #0x14] - bl sub_02074470 - cmp r0, #0 - beq _02266DE6 - ldr r1, _02266F18 ; =0x000001EE - cmp r0, r1 - beq _02266DE6 - ldr r0, [sp, #0x14] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02266DDE - ldr r0, [sp, #0x14] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02266DD6 - add r1, r5, r4 - mov r0, #3 - strb r0, [r1, #2] - b _02266DE4 -_02266DD6: - add r1, r5, r4 - mov r0, #1 - strb r0, [r1, #2] - b _02266DE4 -_02266DDE: - add r1, r5, r4 - mov r0, #2 - strb r0, [r1, #2] -_02266DE4: - add r4, r4, #1 -_02266DE6: - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _02266D94 -_02266DF4: - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223DF20 - str r0, [sp, #8] - mov r4, #3 - mov r7, #0 - bl sub_0207A0F8 - cmp r0, #0 - bgt _02266E0C - b _02266F0E -_02266E0C: - ldr r0, [sp, #0x38] - mov r1, #6 - mul r1, r0 - ldr r0, [sp, #4] - add r6, r0, r1 -_02266E16: - ldr r1, _02266F14 ; =0x0000312C - ldr r0, [sp, #8] - ldrb r1, [r6, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - str r0, [sp, #0x18] - bl sub_02074470 - cmp r0, #0 - beq _02266E68 - ldr r1, _02266F18 ; =0x000001EE - cmp r0, r1 - beq _02266E68 - ldr r0, [sp, #0x18] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02266E60 - ldr r0, [sp, #0x18] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02266E58 - add r1, r5, r4 - mov r0, #3 - strb r0, [r1, #2] - b _02266E66 -_02266E58: - add r1, r5, r4 - mov r0, #1 - strb r0, [r1, #2] - b _02266E66 -_02266E60: - add r1, r5, r4 - mov r0, #2 - strb r0, [r1, #2] -_02266E66: - add r4, r4, #1 -_02266E68: - ldr r0, [sp, #8] - add r6, r6, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _02266E16 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_02266E7A: - mov r0, #2 - tst r0, r4 - beq _02266E8E - mov r0, #8 - tst r0, r4 - bne _02266E8E - ldr r0, [sp, #0x38] - mov r1, #1 - and r0, r1 - str r0, [sp, #0x38] -_02266E8E: - ldr r0, [sp] - ldr r1, [sp, #0x38] - bl ov16_0223DF20 - mov r4, #0 - str r0, [sp, #0xc] - add r7, r4, #0 - bl sub_0207A0F8 - cmp r0, #0 - ble _02266F0E - ldr r0, [sp, #0x38] - mov r1, #6 - mul r1, r0 - ldr r0, [sp, #4] - add r6, r0, r1 -_02266EAE: - ldr r1, _02266F14 ; =0x0000312C - ldr r0, [sp, #0xc] - ldrb r1, [r6, r1] - bl sub_0207A0FC - mov r1, #0xae - mov r2, #0 - str r0, [sp, #0x1c] - bl sub_02074470 - cmp r0, #0 - beq _02266F00 - ldr r1, _02266F18 ; =0x000001EE - cmp r0, r1 - beq _02266F00 - ldr r0, [sp, #0x1c] - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02266EF8 - ldr r0, [sp, #0x1c] - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _02266EF0 - add r1, r5, r4 - mov r0, #3 - strb r0, [r1, #2] - b _02266EFE -_02266EF0: - add r1, r5, r4 - mov r0, #1 - strb r0, [r1, #2] - b _02266EFE -_02266EF8: - add r1, r5, r4 - mov r0, #2 - strb r0, [r1, #2] -_02266EFE: - add r4, r4, #1 -_02266F00: - ldr r0, [sp, #0xc] - add r6, r6, #1 - add r7, r7, #1 - bl sub_0207A0F8 - cmp r7, r0 - blt _02266EAE -_02266F0E: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02266F14: .word 0x0000312C -_02266F18: .word 0x000001EE - thumb_func_end ov16_02266CF0 - - thumb_func_start ov16_02266F1C -ov16_02266F1C: ; 0x02266F1C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [sp, #0x30] - add r6, r1, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r4, r2, #0 - str r3, [sp, #0x18] - bl ov16_022682B0 - add r7, r0, #0 - ldr r3, [r7, #0x14] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200CC3C - str r4, [sp] - mov r0, #0x47 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02266FD8 ; =0x00004E26 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r5, #0 - add r3, r6, #0 - bl sub_0200CDC4 - ldr r3, [r7, #0x1c] - mov r0, #1 - str r0, [sp] - str r3, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200CE24 - ldr r3, [r7, #0x20] - mov r0, #1 - str r0, [sp] - str r3, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200CE54 - str r4, [sp] - mov r0, #0x47 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02266FDC ; =0x00004E27 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r5, #0 - add r3, r6, #0 - bl sub_0200CDC4 - ldr r0, [sp, #0x30] - sub r0, r0, #6 - cmp r0, #1 - bhi _02266FD4 - str r4, [sp] - mov r0, #0x51 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02266FE0 ; =0x00004E28 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r5, #0 - add r3, r6, #0 - bl sub_0200CDC4 -_02266FD4: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02266FD8: .word 0x00004E26 -_02266FDC: .word 0x00004E27 -_02266FE0: .word 0x00004E28 - thumb_func_end ov16_02266F1C - - thumb_func_start ov16_02266FE4 -ov16_02266FE4: ; 0x02266FE4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - ldr r0, [sp, #0x30] - add r7, r1, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r5, r2, #0 - str r3, [sp, #0x18] - bl ov16_02268314 - add r4, r0, #0 - beq _02267056 - ldr r3, [r4, #0x14] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_0200CC3C - str r5, [sp] - mov r0, #0x47 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _0226705C ; =0x00004E26 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r6, #0 - add r3, r7, #0 - bl sub_0200CDC4 - ldr r3, [r4, #0x1c] - mov r0, #1 - str r0, [sp] - str r3, [sp, #4] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_0200CE24 - ldr r3, [r4, #0x20] - mov r0, #1 - str r0, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - str r3, [sp, #4] - bl sub_0200CE54 -_02267056: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0226705C: .word 0x00004E26 - thumb_func_end ov16_02266FE4 - - thumb_func_start ov16_02267060 -ov16_02267060: ; 0x02267060 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r2, #0x18 - add r4, r1, #0 - lsr r0, r0, #0x18 - bl ov16_022682B0 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200CE6C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0200D324 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02267060 - - thumb_func_start ov16_02267084 -ov16_02267084: ; 0x02267084 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - add r4, r2, #0 - cmp r0, #0 - bne _02267096 - bl sub_02022974 -_02267096: - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - cmp r0, #6 - bne _022670A8 - mov r1, #3 - lsl r1, r1, #0xa - and r4, r1 - b _022670B8 -_022670A8: - cmp r0, #7 - bne _022670B4 - mov r1, #3 - lsl r1, r1, #0xc - and r4, r1 - b _022670B8 -_022670B4: - ldr r1, _02267214 ; =0xFFFFC3FF - and r4, r1 -_022670B8: - cmp r0, #7 - bhi _022670FE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022670C8: ; jump table - .short _022670FA - _022670C8 - 2 ; case 0 - .short _022670D8 - _022670C8 - 2 ; case 1 - .short _022670DE - _022670C8 - 2 ; case 2 - .short _022670D8 - _022670C8 - 2 ; case 3 - .short _022670DE - _022670C8 - 2 ; case 4 - .short _022670D8 - _022670C8 - 2 ; case 5 - .short _022670FE - _022670C8 - 2 ; case 6 - .short _022670FE - _022670C8 - 2 ; case 7 -_022670D8: - mov r0, #0x26 - bic r4, r0 - b _022670FE -_022670DE: - ldr r0, _02267218 ; =0xFFFFFDDF - and r4, r0 - add r0, r5, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - bne _022670F4 - mov r0, #6 - bic r4, r0 - b _022670FE -_022670F4: - mov r0, #1 - bic r4, r0 - b _022670FE -_022670FA: - ldr r0, _0226721C ; =0xFFFFFDFF - and r4, r0 -_022670FE: - ldr r0, [r5, #0xc] - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - beq _0226710E - ldr r0, _0226721C ; =0xFFFFFDFF - and r4, r0 -_0226710E: - mov r0, #1 - tst r0, r4 - beq _02267124 - add r0, r5, #0 - mov r1, #0 - bl ov16_022674C4 - add r0, r5, #0 - mov r1, #0 - bl ov16_02267EDC -_02267124: - mov r0, #2 - tst r0, r4 - beq _02267132 - add r0, r5, #0 - add r1, r6, #0 - bl ov16_02267B6C -_02267132: - mov r0, #4 - tst r0, r4 - beq _0226713E - add r0, r5, #0 - bl ov16_02267BF8 -_0226713E: - mov r0, #0x80 - tst r0, r4 - bne _0226714A - mov r0, #0x40 - tst r0, r4 - beq _02267150 -_0226714A: - add r0, r5, #0 - bl ov16_022679C8 -_02267150: - mov r0, #8 - tst r0, r4 - beq _0226715C - add r0, r5, #0 - bl ov16_02267A4C -_0226715C: - mov r0, #0x10 - tst r0, r4 - beq _02267168 - add r0, r5, #0 - bl ov16_02267864 -_02267168: - mov r0, #0x20 - tst r0, r4 - beq _0226717E - add r0, r5, #0 - mov r1, #0 - bl ov16_0226752C - add r0, r5, #0 - mov r1, #1 - bl ov16_02267EDC -_0226717E: - mov r0, #2 - lsl r0, r0, #8 - tst r0, r4 - beq _0226718C - add r0, r5, #0 - bl ov16_02267C58 -_0226718C: - mov r0, #1 - lsl r0, r0, #8 - tst r0, r4 - beq _022671F0 - add r0, r5, #0 - add r0, #0x4a - ldrb r0, [r0] - cmp r0, #5 - bhi _022671B6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022671AA: ; jump table - .short _022671B6 - _022671AA - 2 ; case 0 - .short _022671C0 - _022671AA - 2 ; case 1 - .short _022671CA - _022671AA - 2 ; case 2 - .short _022671D4 - _022671AA - 2 ; case 3 - .short _022671DE - _022671AA - 2 ; case 4 - .short _022671E8 - _022671AA - 2 ; case 5 -_022671B6: - add r0, r5, #0 - mov r1, #0x26 - bl ov16_02267CA8 - b _022671F0 -_022671C0: - add r0, r5, #0 - mov r1, #0x2f - bl ov16_02267CA8 - b _022671F0 -_022671CA: - add r0, r5, #0 - mov r1, #0x32 - bl ov16_02267CA8 - b _022671F0 -_022671D4: - add r0, r5, #0 - mov r1, #0x35 - bl ov16_02267CA8 - b _022671F0 -_022671DE: - add r0, r5, #0 - mov r1, #0x2c - bl ov16_02267CA8 - b _022671F0 -_022671E8: - add r0, r5, #0 - mov r1, #0x29 - bl ov16_02267CA8 -_022671F0: - mov r0, #5 - lsl r0, r0, #0xa - tst r0, r4 - beq _02267200 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02267CE8 -_02267200: - mov r0, #0xa - lsl r0, r0, #0xa - tst r0, r4 - beq _02267210 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02267DC4 -_02267210: - pop {r4, r5, r6, pc} - nop -_02267214: .word 0xFFFFC3FF -_02267218: .word 0xFFFFFDDF -_0226721C: .word 0xFFFFFDFF - thumb_func_end ov16_02267084 - - thumb_func_start ov16_02267220 -ov16_02267220: ; 0x02267220 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #0 - beq _02267232 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x50] -_02267232: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02267240 - bl sub_0200D0F4 - mov r0, #0 - str r0, [r4, #4] -_02267240: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02267220 - - thumb_func_start ov16_02267244 -ov16_02267244: ; 0x02267244 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02267256 - bl sub_0200D0F4 - mov r0, #0 - str r0, [r4, #8] -_02267256: - pop {r4, pc} - thumb_func_end ov16_02267244 - - thumb_func_start ov16_02267258 -ov16_02267258: ; 0x02267258 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x25 - ldrb r0, [r0] - bl ov16_022682B0 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl ov16_0223E010 - ldr r0, [r5, #0xc] - bl ov16_0223E018 - ldr r1, [r4, #0x14] - add r5, r0, #0 - bl sub_0200D070 - ldr r1, [r4, #0x1c] - add r0, r5, #0 - bl sub_0200D090 - ldr r1, [r4, #0x20] - add r0, r5, #0 - bl sub_0200D0A0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02267258 - - thumb_func_start ov16_0226728C -ov16_0226728C: ; 0x0226728C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x25 - ldrb r0, [r0] - bl ov16_02268314 - add r4, r0, #0 - beq _022672C0 - ldr r0, [r5, #0xc] - bl ov16_0223E010 - ldr r0, [r5, #0xc] - bl ov16_0223E018 - ldr r1, [r4, #0x14] - add r5, r0, #0 - bl sub_0200D070 - ldr r1, [r4, #0x1c] - add r0, r5, #0 - bl sub_0200D090 - ldr r1, [r4, #0x20] - add r0, r5, #0 - bl sub_0200D0A0 -_022672C0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0226728C - - thumb_func_start ov16_022672C4 -ov16_022672C4: ; 0x022672C4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl ov16_0223E010 - add r7, r0, #0 - ldr r0, [r5, #0xc] - bl ov16_0223E018 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - bl ov16_0223E064 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - bl ov16_022682B0 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - ldr r1, [sp, #4] - ldr r3, [sp, #8] - str r0, [sp] - add r0, r7, #0 - add r2, r6, #0 - bl ov16_02266F1C - add r2, r5, #0 - add r2, #0x25 - ldrb r2, [r2] - ldr r1, [sp, #4] - add r0, r7, #0 - bl ov16_02267060 - str r0, [r5, #4] - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - ldr r1, [sp, #4] - ldr r3, [sp, #8] - str r0, [sp] - add r0, r7, #0 - add r2, r6, #0 - bl ov16_02266FE4 - ldr r0, [r5, #8] - cmp r0, #0 - beq _02267352 - add r5, #0x25 - ldrb r3, [r5] - ldr r2, _0226735C ; =0x0226F334 - mov r1, #0 - ldrsh r1, [r4, r1] - ldrsb r2, [r2, r3] - ldr r0, [r0, #0] - sub r1, r1, r2 - mov r2, #2 - lsl r1, r1, #0x10 - ldrsh r2, [r4, r2] - asr r1, r1, #0x10 - bl sub_0200D494 -_02267352: - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226735C: .word 0x0226F334 - thumb_func_end ov16_022672C4 - - thumb_func_start ov16_02267360 -ov16_02267360: ; 0x02267360 - push {r4, lr} - add r4, r0, #0 - bl ov16_02267220 - add r0, r4, #0 - bl ov16_02267258 - add r0, r4, #0 - bl ov16_02267244 - add r0, r4, #0 - bl ov16_0226728C - pop {r4, pc} - thumb_func_end ov16_02267360 - - thumb_func_start ov16_0226737C -ov16_0226737C: ; 0x0226737C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x25 - ldrb r0, [r0] - cmp r0, #2 - beq _0226738E - cmp r0, #4 - beq _0226738E - b _022674A8 -_0226738E: - add r0, r5, #0 - add r0, #0x4f - ldrb r2, [r0] - mov r1, #8 - add r0, r2, #0 - bic r0, r1 - lsl r1, r2, #0x1c - lsr r2, r1, #0x1f - mov r1, #1 - eor r1, r2 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - lsl r1, r1, #0x1f - lsr r1, r1, #0x1c - orr r1, r0 - add r0, r5, #0 - add r0, #0x4f - strb r1, [r0] - ldr r0, [r5, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0226743A - mov r0, #0x46 - bl ov16_02268250 - add r2, r5, #0 - add r2, #0x25 - ldrb r2, [r2] - mov r6, #0x19 - lsl r6, r6, #0x16 - lsl r3, r2, #2 - ldr r2, _022674AC ; =0x0226F374 - ldr r1, [r4, #4] - ldrh r2, [r2, r3] - add r2, r6, r2 - add r2, #0x20 - add r1, r1, r2 - mov r2, #0x20 - bl sub_020C4B18 - mov r0, #0x47 - bl ov16_02268250 - add r2, r5, #0 - add r2, #0x25 - ldrb r2, [r2] - ldr r1, [r4, #4] - lsl r3, r2, #2 - ldr r2, _022674B0 ; =0x0226F3A4 - ldrh r2, [r2, r3] - add r2, r6, r2 - add r2, #0x20 - add r1, r1, r2 - mov r2, #0x20 - bl sub_020C4B18 - mov r0, #0x45 - bl ov16_02268250 - add r1, r5, #0 - add r1, #0x25 - ldrb r1, [r1] - ldr r3, _022674B4 ; =0x0226F3D4 - lsl r2, r1, #2 - ldrh r3, [r3, r2] - ldr r1, [r4, #4] - add r3, r6, r3 - add r1, r1, r3 - ldr r3, _022674B8 ; =0x0226F3D6 - ldrh r2, [r3, r2] - bl sub_020C4B18 - ldr r1, [r5, #0x28] - add r0, r5, #0 - mov r2, #6 - bl ov16_02267084 - pop {r4, r5, r6, pc} -_0226743A: - mov r0, #0x42 - bl ov16_02268250 - add r1, r5, #0 - add r1, #0x25 - ldrb r1, [r1] - mov r6, #0x19 - ldr r3, _022674AC ; =0x0226F374 - lsl r2, r1, #2 - ldrh r3, [r3, r2] - lsl r6, r6, #0x16 - ldr r1, [r4, #4] - add r3, r6, r3 - add r1, r1, r3 - ldr r3, _022674BC ; =0x0226F376 - ldrh r2, [r3, r2] - bl sub_020C4B18 - mov r0, #0x44 - bl ov16_02268250 - add r1, r5, #0 - add r1, #0x25 - ldrb r1, [r1] - ldr r3, _022674B0 ; =0x0226F3A4 - lsl r2, r1, #2 - ldrh r3, [r3, r2] - ldr r1, [r4, #4] - add r3, r6, r3 - add r1, r1, r3 - ldr r3, _022674C0 ; =0x0226F3A6 - ldrh r2, [r3, r2] - bl sub_020C4B18 - mov r0, #0x26 - bl ov16_02268250 - add r2, r5, #0 - add r2, #0x25 - ldrb r2, [r2] - ldr r1, [r4, #4] - lsl r3, r2, #2 - ldr r2, _022674B0 ; =0x0226F3A4 - ldrh r2, [r2, r3] - add r2, r6, r2 - add r2, #0x20 - add r1, r1, r2 - mov r2, #0x20 - bl sub_020C4B18 - ldr r1, [r5, #0x28] - add r0, r5, #0 - mov r2, #1 - bl ov16_02267084 -_022674A8: - pop {r4, r5, r6, pc} - nop -_022674AC: .word 0x0226F374 -_022674B0: .word 0x0226F3A4 -_022674B4: .word 0x0226F3D4 -_022674B8: .word 0x0226F3D6 -_022674BC: .word 0x0226F376 -_022674C0: .word 0x0226F3A6 - thumb_func_end ov16_0226737C - - thumb_func_start ov16_022674C4 -ov16_022674C4: ; 0x022674C4 - mov r2, #2 - lsl r2, r2, #0x1e - str r2, [r0, #0x34] - ldr r3, [r0, #0x28] - add r2, r3, r1 - bpl _022674D2 - sub r1, r1, r2 -_022674D2: - ldr r2, [r0, #0x2c] - add r3, r3, r1 - cmp r3, r2 - ble _022674DE - sub r2, r3, r2 - sub r1, r1, r2 -_022674DE: - neg r1, r1 - str r1, [r0, #0x30] - ldr r1, [r0, #0x28] - cmp r1, #0 - bge _022674EC - mov r1, #0 - str r1, [r0, #0x28] -_022674EC: - ldr r2, [r0, #0x2c] - ldr r1, [r0, #0x28] - cmp r1, r2 - ble _022674F6 - str r2, [r0, #0x28] -_022674F6: - bx lr - thumb_func_end ov16_022674C4 - - thumb_func_start ov16_022674F8 -ov16_022674F8: ; 0x022674F8 - push {r3, r4, r5, lr} - mov r1, #0 - add r5, r0, #0 - bl ov16_02267EDC - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _0226751E - ldr r1, [r5, #0x28] - ldr r0, [r5, #0x30] - mov r2, #2 - sub r1, r1, r0 - add r0, r5, #0 - str r1, [r5, #0x28] - bl ov16_02267084 - b _02267528 -_0226751E: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov16_02267084 -_02267528: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov16_022674F8 - - thumb_func_start ov16_0226752C -ov16_0226752C: ; 0x0226752C - mov r2, #2 - lsl r2, r2, #0x1e - str r2, [r0, #0x44] - ldr r3, [r0, #0x38] - add r2, r3, r1 - bpl _0226753A - sub r1, r1, r2 -_0226753A: - ldr r2, [r0, #0x3c] - add r3, r3, r1 - cmp r3, r2 - ble _02267546 - sub r2, r3, r2 - sub r1, r1, r2 -_02267546: - neg r1, r1 - str r1, [r0, #0x40] - ldr r1, [r0, #0x38] - cmp r1, #0 - bge _02267554 - mov r1, #0 - str r1, [r0, #0x38] -_02267554: - ldr r2, [r0, #0x3c] - ldr r1, [r0, #0x38] - cmp r1, r2 - ble _0226755E - str r2, [r0, #0x38] -_0226755E: - bx lr - thumb_func_end ov16_0226752C - - thumb_func_start ov16_02267560 -ov16_02267560: ; 0x02267560 - push {r4, lr} - mov r1, #1 - add r4, r0, #0 - bl ov16_02267EDC - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0226757A - ldr r2, [r4, #0x38] - ldr r1, [r4, #0x40] - sub r1, r2, r1 - str r1, [r4, #0x38] -_0226757A: - pop {r4, pc} - thumb_func_end ov16_02267560 - - thumb_func_start ov16_0226757C -ov16_0226757C: ; 0x0226757C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02267596 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CC8 - add r0, r4, #0 - mov r1, #1 - bl ov16_022675F8 -_02267596: - ldr r0, [r4, #0xc] - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - bne _022675AA - add r0, r4, #0 - bl ov16_02268470 -_022675AA: - pop {r4, pc} - thumb_func_end ov16_0226757C - - thumb_func_start ov16_022675AC -ov16_022675AC: ; 0x022675AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _022675D0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021CC8 - ldr r0, [r4, #8] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02021E50 - add r0, r4, #0 - mov r1, #0 - bl ov16_022675F8 -_022675D0: - add r0, r4, #0 - bl ov16_02268498 - pop {r4, pc} - thumb_func_end ov16_022675AC - - thumb_func_start ov16_022675D8 -ov16_022675D8: ; 0x022675D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - cmp r0, #0 - beq _022675F4 - bl sub_0200D460 - ldr r0, [r5, #8] - cmp r0, #0 - beq _022675F4 - add r1, r4, #0 - bl sub_0200D460 -_022675F4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022675D8 - - thumb_func_start ov16_022675F8 -ov16_022675F8: ; 0x022675F8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - add r4, r1, #0 - cmp r0, #0 - beq _0226761E - ldr r0, [r5, #0xc] - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - beq _02267616 - cmp r4, #1 - beq _0226761E -_02267616: - ldr r0, [r5, #8] - add r1, r4, #0 - bl sub_0200D3F4 -_0226761E: - pop {r3, r4, r5, pc} - thumb_func_end ov16_022675F8 - - thumb_func_start ov16_02267620 -ov16_02267620: ; 0x02267620 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - cmp r0, #0 - beq _02267638 - bl sub_0200D3F4 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_022675F8 -_02267638: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_02267620 - - thumb_func_start ov16_0226763C -ov16_0226763C: ; 0x0226763C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - add r7, r2, #0 - cmp r0, #0 - bne _0226764E - bl sub_02022974 -_0226764E: - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - bl ov16_022682B0 - add r4, r0, #0 - mov r1, #0 - mov r2, #2 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #4] - add r1, r1, r6 - add r2, r2, r7 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D494 - ldr r0, [r5, #8] - cmp r0, #0 - beq _022676A0 - add r5, #0x25 - ldrb r3, [r5] - mov r1, #0 - ldr r2, _022676A4 ; =0x0226F334 - ldrsh r1, [r4, r1] - ldrsb r2, [r2, r3] - ldr r0, [r0, #0] - add r1, r1, r6 - sub r1, r1, r2 - mov r2, #2 - ldrsh r2, [r4, r2] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add r2, r2, r7 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D494 -_022676A0: - pop {r3, r4, r5, r6, r7, pc} - nop -_022676A4: .word 0x0226F334 - thumb_func_end ov16_0226763C - - thumb_func_start ov16_022676A8 -ov16_022676A8: ; 0x022676A8 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r4, #0 - bne _022676B6 - bl sub_02022974 -_022676B6: - ldr r0, [r4, #4] - cmp r0, #0 - bne _022676C0 - bl sub_02022974 -_022676C0: - add r0, r4, #0 - add r0, #0x4f - ldrb r1, [r0] - mov r0, #2 - bic r1, r0 - add r0, r4, #0 - add r0, #0x4f - strb r1, [r0] - add r0, r4, #0 - add r0, #0x4f - ldrb r0, [r0] - mov r1, #1 - bic r0, r1 - lsl r1, r5, #0x18 - lsr r2, r1, #0x18 - mov r1, #1 - and r1, r2 - orr r1, r0 - add r0, r4, #0 - add r0, #0x4f - strb r1, [r0] - cmp r5, #0 - bne _0226772E - add r0, r4, #0 - add r0, #0x25 - ldrb r0, [r0] - cmp r0, #7 - bhi _02267720 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267704: ; jump table - .short _02267714 - _02267704 - 2 ; case 0 - .short _02267720 - _02267704 - 2 ; case 1 - .short _02267714 - _02267704 - 2 ; case 2 - .short _02267720 - _02267704 - 2 ; case 3 - .short _02267714 - _02267704 - 2 ; case 4 - .short _02267720 - _02267704 - 2 ; case 5 - .short _02267714 - _02267704 - 2 ; case 6 - .short _02267714 - _02267704 - 2 ; case 7 -_02267714: - add r0, r4, #0 - mov r1, #0xa0 - mov r2, #0 - bl ov16_0226763C - b _02267738 -_02267720: - mov r1, #0x9f - add r0, r4, #0 - mvn r1, r1 - mov r2, #0 - bl ov16_0226763C - b _02267738 -_0226772E: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov16_0226763C -_02267738: - ldr r0, _02267744 ; =ov16_0226774C - ldr r2, _02267748 ; =0x000003DE - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02267744: .word ov16_0226774C -_02267748: .word 0x000003DE - thumb_func_end ov16_022676A8 - - thumb_func_start ov16_0226774C -ov16_0226774C: ; 0x0226774C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - mov r4, #0 - bl ov16_022682B0 - add r6, r0, #0 - add r1, sp, #0 - ldr r0, [r5, #4] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - cmp r0, #7 - bhi _022677D2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267782: ; jump table - .short _02267792 - _02267782 - 2 ; case 0 - .short _022677D2 - _02267782 - 2 ; case 1 - .short _02267792 - _02267782 - 2 ; case 2 - .short _022677D2 - _02267782 - 2 ; case 3 - .short _02267792 - _02267782 - 2 ; case 4 - .short _022677D2 - _02267782 - 2 ; case 5 - .short _02267792 - _02267782 - 2 ; case 6 - .short _02267792 - _02267782 - 2 ; case 7 -_02267792: - add r0, r5, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - add r0, sp, #0 - bne _022677B8 - mov r1, #2 - ldrsh r2, [r0, r1] - sub r2, #0x18 - strh r2, [r0, #2] - add r2, r4, #0 - ldrsh r1, [r0, r1] - ldrsh r2, [r6, r2] - cmp r1, r2 - bge _02267810 - strh r2, [r0, #2] - add r4, r4, #1 - b _02267810 -_022677B8: - mov r1, #2 - ldrsh r2, [r0, r1] - add r2, #0x18 - strh r2, [r0, #2] - add r2, r4, #0 - ldrsh r2, [r6, r2] - ldrsh r1, [r0, r1] - add r2, #0xa0 - cmp r1, r2 - ble _02267810 - strh r2, [r0, #2] - add r4, r4, #1 - b _02267810 -_022677D2: - add r0, r5, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - add r0, sp, #0 - bne _022677F8 - mov r1, #2 - ldrsh r2, [r0, r1] - add r2, #0x18 - strh r2, [r0, #2] - mov r2, #0 - ldrsh r1, [r0, r1] - ldrsh r2, [r6, r2] - cmp r1, r2 - ble _02267810 - strh r2, [r0, #2] - add r4, r4, #1 - b _02267810 -_022677F8: - mov r1, #2 - ldrsh r2, [r0, r1] - sub r2, #0x18 - strh r2, [r0, #2] - mov r2, #0 - ldrsh r2, [r6, r2] - ldrsh r1, [r0, r1] - sub r2, #0x18 - cmp r1, r2 - bge _02267810 - strh r2, [r0, #2] - add r4, r4, #1 -_02267810: - add r2, sp, #0 - mov r1, #2 - mov r3, #0 - ldrsh r1, [r2, r1] - ldrsh r2, [r2, r3] - ldr r0, [r5, #4] - bl sub_0200D4C4 - ldr r0, [r5, #8] - cmp r0, #0 - beq _02267844 - add r6, sp, #0 - mov r1, #2 - ldrsh r3, [r6, r1] - add r1, r5, #0 - add r1, #0x25 - ldrb r2, [r1] - ldr r1, _02267860 ; =0x0226F334 - ldrsb r1, [r1, r2] - mov r2, #0 - ldrsh r2, [r6, r2] - sub r1, r3, r1 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - bl sub_0200D4C4 -_02267844: - cmp r4, #0 - ble _0226785C - add r0, r5, #0 - add r0, #0x4f - ldrb r1, [r0] - mov r0, #2 - add r5, #0x4f - orr r0, r1 - strb r0, [r5] - add r0, r7, #0 - bl sub_0200DA58 -_0226785C: - pop {r3, r4, r5, r6, r7, pc} - nop -_02267860: .word 0x0226F334 - thumb_func_end ov16_0226774C - - thumb_func_start ov16_02267864 -ov16_02267864: ; 0x02267864 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl ov16_0223DF00 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl ov16_0223E05C - add r7, r0, #0 - ldr r0, [r5, #0xc] - bl ov16_0223E0D0 - add r4, r0, #0 - mov r0, #0x16 - mov r1, #5 - bl sub_02023790 - mov r1, #0xf1 - str r0, [sp, #0x18] - add r0, r7, #0 - lsl r1, r1, #2 - bl sub_0200B1EC - add r1, r5, #0 - add r2, r5, #0 - add r1, #0x24 - add r2, #0x26 - str r0, [sp, #0x1c] - ldrb r1, [r1] - ldrb r2, [r2] - ldr r0, [r5, #0xc] - bl ov16_0223DFAC - bl sub_02076B10 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0 - bl sub_0200B5CC - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r0, r4, #0 - bl sub_0200C388 - mov r0, #0 - str r0, [sp] - mov r0, #0xf - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0x24 - mov r2, #8 - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022679A4 ; =0x000E020F - ldr r2, [sp, #0x18] - str r0, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - str r1, [sp, #0x14] - add r0, sp, #0x24 - add r3, r1, #0 - bl sub_0201D7E0 - ldr r0, [r5, #4] - ldr r6, [sp, #0x30] - ldr r0, [r0, #0] - bl sub_02021F98 - add r4, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - add r0, r6, r0 - str r0, [sp, #0x20] - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - ldr r1, _022679A8 ; =0x0226F64C - ldr r3, [r4, #4] - lsl r7, r0, #4 - ldrh r2, [r1, r7] - mov r1, #0x19 - lsl r1, r1, #0x16 - add r1, r1, r2 - ldr r2, _022679AC ; =0x0226F64E - add r0, r6, #0 - ldrh r2, [r2, r7] - add r1, r3, r1 - bl sub_020C4B18 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - ldr r1, _022679B0 ; =0x0226F650 - ldr r3, [r4, #4] - lsl r7, r0, #4 - ldrh r2, [r1, r7] - mov r1, #0x19 - lsl r1, r1, #0x16 - add r1, r1, r2 - ldr r2, _022679B4 ; =0x0226F652 - ldr r0, [sp, #0x20] - ldrh r2, [r2, r7] - add r1, r3, r1 - bl sub_020C4B18 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - ldr r3, _022679B8 ; =0x0226F654 - ldr r1, [r4, #4] - lsl r2, r0, #4 - ldr r0, _022679AC ; =0x0226F64E - ldrh r0, [r0, r2] - add r0, r6, r0 - ldrh r6, [r3, r2] - mov r3, #0x19 - lsl r3, r3, #0x16 - add r3, r3, r6 - add r1, r1, r3 - ldr r3, _022679BC ; =0x0226F656 - ldrh r2, [r3, r2] - bl sub_020C4B18 - add r5, #0x25 - ldrb r0, [r5] - ldr r4, [r4, #4] - lsl r2, r0, #4 - ldr r0, _022679B4 ; =0x0226F652 - ldrh r1, [r0, r2] - ldr r0, [sp, #0x20] - add r0, r0, r1 - ldr r1, _022679C0 ; =0x0226F658 - ldrh r3, [r1, r2] - mov r1, #0x19 - lsl r1, r1, #0x16 - add r1, r1, r3 - ldr r3, _022679C4 ; =0x0226F65A - add r1, r4, r1 - ldrh r2, [r3, r2] - bl sub_020C4B18 - add r0, sp, #0x24 - bl sub_0201A8FC - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022679A4: .word 0x000E020F -_022679A8: .word 0x0226F64C -_022679AC: .word 0x0226F64E -_022679B0: .word 0x0226F650 -_022679B4: .word 0x0226F652 -_022679B8: .word 0x0226F654 -_022679BC: .word 0x0226F656 -_022679C0: .word 0x0226F658 -_022679C4: .word 0x0226F65A - thumb_func_end ov16_02267864 - - thumb_func_start ov16_022679C8 -ov16_022679C8: ; 0x022679C8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0x49 - ldrb r0, [r0] - cmp r0, #0 - bne _022679DA - mov r0, #0x4a - mov r4, #0x3e - b _022679E8 -_022679DA: - cmp r0, #1 - bne _022679E4 - mov r0, #0x48 - mov r4, #0x3c - b _022679E8 -_022679E4: - mov r0, #0x4c - mov r4, #0x40 -_022679E8: - bl ov16_02268250 - str r0, [sp] - add r0, r4, #0 - bl ov16_02268250 - add r7, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - mov r6, #0x19 - ldr r3, _02267A3C ; =0x0226F47C - lsl r2, r0, #3 - ldrh r3, [r3, r2] - lsl r6, r6, #0x16 - ldr r1, [r4, #4] - add r3, r6, r3 - add r1, r1, r3 - ldr r3, _02267A40 ; =0x0226F47E - add r0, r7, #0 - ldrh r2, [r3, r2] - bl sub_020C4B18 - add r5, #0x25 - ldrb r0, [r5] - ldr r1, _02267A44 ; =0x0226F480 - ldr r3, [r4, #4] - lsl r2, r0, #3 - ldrh r1, [r1, r2] - ldr r0, [sp] - add r1, r6, r1 - add r1, r3, r1 - ldr r3, _02267A48 ; =0x0226F482 - ldrh r2, [r3, r2] - bl sub_020C4B18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02267A3C: .word 0x0226F47C -_02267A40: .word 0x0226F47E -_02267A44: .word 0x0226F480 -_02267A48: .word 0x0226F482 - thumb_func_end ov16_022679C8 - - thumb_func_start ov16_02267A4C -ov16_02267A4C: ; 0x02267A4C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #4] - mov r0, #5 - mov r1, #0x60 - bl sub_02018144 - add r4, r0, #0 - mov r0, #5 - mov r1, #0xc0 - bl sub_02018144 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #0xff - mov r2, #0x60 - bl sub_020C4CF4 - ldr r0, [sp, #4] - ldr r0, [r0, #0xc] - bl ov16_0223E054 - ldr r1, [sp, #4] - str r4, [sp] - add r1, #0x48 - ldrb r1, [r1] - mov r2, #3 - mov r3, #0 - bl sub_0200C67C - ldr r0, [sp, #4] - ldr r0, [r0, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - str r0, [sp, #8] - ldr r0, [sp, #4] - ldr r1, _02267B5C ; =0x0226F3EC - add r0, #0x25 - ldrb r0, [r0] - lsl r2, r0, #3 - ldrh r3, [r1, r2] - mov r1, #0x19 - lsl r1, r1, #0x16 - ldr r0, [sp, #8] - add r1, r1, r3 - ldr r3, _02267B60 ; =0x0226F3EE - ldr r0, [r0, #4] - ldrh r2, [r3, r2] - add r0, r0, r1 - add r1, r7, #0 - bl sub_020C4B18 - ldr r0, [sp, #4] - ldr r1, _02267B64 ; =0x0226F3F0 - add r0, #0x25 - ldrb r0, [r0] - lsl r2, r0, #3 - ldrh r3, [r1, r2] - mov r1, #0x19 - ldr r0, [sp, #8] - lsl r1, r1, #0x16 - add r1, r1, r3 - ldr r3, _02267B68 ; =0x0226F3F2 - ldr r0, [r0, #4] - ldrh r2, [r3, r2] - add r0, r0, r1 - add r1, r7, #0 - add r1, #0x60 - bl sub_020C4B18 - mov r2, #0 - add r1, r2, #0 -_02267ADE: - mov r0, #0 - add r3, r7, r1 -_02267AE2: - ldrb r5, [r4, r2] - add r6, r4, r2 - add r0, r0, #1 - strb r5, [r3, #0x10] - ldrb r6, [r6, #0x10] - add r5, r3, #0 - add r5, #0x60 - strb r6, [r5] - add r2, r2, #1 - add r3, r3, #1 - cmp r0, #0x10 - blt _02267AE2 - add r1, #0x20 - add r2, #0x10 - cmp r1, #0x60 - blt _02267ADE - ldr r0, [sp, #4] - ldr r1, [sp, #8] - add r0, #0x25 - ldrb r0, [r0] - ldr r3, _02267B5C ; =0x0226F3EC - ldr r1, [r1, #4] - lsl r2, r0, #3 - ldrh r5, [r3, r2] - mov r3, #0x19 - lsl r3, r3, #0x16 - add r3, r3, r5 - add r1, r1, r3 - ldr r3, _02267B60 ; =0x0226F3EE - add r0, r7, #0 - ldrh r2, [r3, r2] - bl sub_020C4B18 - ldr r0, [sp, #4] - ldr r3, _02267B64 ; =0x0226F3F0 - add r0, #0x25 - str r0, [sp, #4] - ldrb r0, [r0] - ldr r1, [sp, #8] - lsl r2, r0, #3 - ldrh r5, [r3, r2] - mov r3, #0x19 - lsl r3, r3, #0x16 - add r0, r7, #0 - ldr r1, [r1, #4] - add r3, r3, r5 - add r1, r1, r3 - ldr r3, _02267B68 ; =0x0226F3F2 - add r0, #0x60 - ldrh r2, [r3, r2] - bl sub_020C4B18 - add r0, r4, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02267B5C: .word 0x0226F3EC -_02267B60: .word 0x0226F3EE -_02267B64: .word 0x0226F3F0 -_02267B68: .word 0x0226F3F2 - thumb_func_end ov16_02267A4C - - thumb_func_start ov16_02267B6C -ov16_02267B6C: ; 0x02267B6C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #5 - mov r1, #0x60 - bl sub_02018144 - mov r1, #0xff - mov r2, #0x60 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [r5, #0xc] - bl ov16_0223E04C - str r4, [sp] - add r1, r6, #0 - mov r2, #3 - mov r3, #1 - bl sub_0200C67C - ldr r0, [r5, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x25 - ldrb r0, [r0] - mov r7, #0x19 - ldr r3, _02267BE8 ; =0x0226F41C - lsl r2, r0, #3 - ldrh r3, [r3, r2] - lsl r7, r7, #0x16 - ldr r1, [r6, #4] - add r3, r7, r3 - add r1, r1, r3 - ldr r3, _02267BEC ; =0x0226F41E - add r0, r4, #0 - ldrh r2, [r3, r2] - bl sub_020C4B18 - add r5, #0x25 - ldrb r0, [r5] - ldr r3, _02267BF0 ; =0x0226F420 - ldr r1, [r6, #4] - lsl r2, r0, #3 - ldrh r3, [r3, r2] - ldr r0, _02267BEC ; =0x0226F41E - add r3, r7, r3 - add r1, r1, r3 - ldrh r0, [r0, r2] - ldr r3, _02267BF4 ; =0x0226F422 - ldrh r2, [r3, r2] - add r0, r4, r0 - bl sub_020C4B18 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_02267BE8: .word 0x0226F41C -_02267BEC: .word 0x0226F41E -_02267BF0: .word 0x0226F420 -_02267BF4: .word 0x0226F422 - thumb_func_end ov16_02267B6C - - thumb_func_start ov16_02267BF8 -ov16_02267BF8: ; 0x02267BF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #5 - mov r1, #0x60 - bl sub_02018144 - mov r1, #0xff - mov r2, #0x60 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [r5, #0xc] - bl ov16_0223E04C - str r4, [sp] - ldr r1, [r5, #0x2c] - mov r2, #3 - mov r3, #0 - bl sub_0200C67C - ldr r0, [r5, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - add r1, r0, #0 - add r5, #0x25 - ldrb r0, [r5] - ldr r3, _02267C50 ; =0x0226F3BC - ldr r1, [r1, #4] - lsl r2, r0, #2 - ldrh r5, [r3, r2] - mov r3, #0x19 - lsl r3, r3, #0x16 - add r3, r5, r3 - add r1, r1, r3 - ldr r3, _02267C54 ; =0x0226F3BE - add r0, r4, #0 - ldrh r2, [r3, r2] - bl sub_020C4B18 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02267C50: .word 0x0226F3BC -_02267C54: .word 0x0226F3BE - thumb_func_end ov16_02267BF8 - - thumb_func_start ov16_02267C58 -ov16_02267C58: ; 0x02267C58 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x4b - ldrb r0, [r0] - cmp r0, #1 - bne _02267C6C - mov r0, #0x3b - bl ov16_02268250 - b _02267C72 -_02267C6C: - mov r0, #0x26 - bl ov16_02268250 -_02267C72: - add r4, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - add r5, #0x25 - add r1, r0, #0 - ldrb r0, [r5] - lsl r2, r0, #2 - add r0, r4, #0 - ldr r4, [r1, #4] - ldr r1, _02267CA0 ; =0x0226F38C - ldrh r3, [r1, r2] - mov r1, #0x19 - lsl r1, r1, #0x16 - add r1, r3, r1 - ldr r3, _02267CA4 ; =0x0226F38E - add r1, r4, r1 - ldrh r2, [r3, r2] - bl sub_020C4B18 - pop {r3, r4, r5, pc} - nop -_02267CA0: .word 0x0226F38C -_02267CA4: .word 0x0226F38E - thumb_func_end ov16_02267C58 - - thumb_func_start ov16_02267CA8 -ov16_02267CA8: ; 0x02267CA8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - bl ov16_02268250 - add r4, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0] - bl sub_02021F98 - add r5, #0x25 - add r1, r0, #0 - ldrb r0, [r5] - lsl r2, r0, #2 - add r0, r4, #0 - ldr r4, [r1, #4] - ldr r1, _02267CE0 ; =0x0226F35C - ldrh r3, [r1, r2] - mov r1, #0x19 - lsl r1, r1, #0x16 - add r1, r3, r1 - ldr r3, _02267CE4 ; =0x0226F35E - add r1, r4, r1 - ldrh r2, [r3, r2] - bl sub_020C4B18 - pop {r3, r4, r5, pc} - nop -_02267CE0: .word 0x0226F35C -_02267CE4: .word 0x0226F35E - thumb_func_end ov16_02267CA8 - - thumb_func_start ov16_02267CE8 -ov16_02267CE8: ; 0x02267CE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r4, r0, #0 - ldr r0, [r4, #0xc] - add r5, r1, #0 - bl ov16_0223DF00 - add r6, r0, #0 - ldr r0, [r4, #0xc] - bl ov16_0223E05C - mov r1, #1 - lsl r1, r1, #0xa - add r2, r5, #0 - tst r2, r1 - beq _02267D10 - sub r1, #0x4a - bl sub_0200B1EC - b _02267D16 -_02267D10: - add r1, #0xc4 - bl sub_0200B1EC -_02267D16: - add r7, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xf - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0x18 - mov r2, #0xd - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02267DC0 ; =0x000E020F - add r2, r7, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - str r1, [sp, #0x14] - add r0, sp, #0x18 - add r3, r1, #0 - bl sub_0201D7E0 - ldr r0, [r4, #4] - ldr r5, [sp, #0x24] - ldr r0, [r0, #0] - bl sub_02021F98 - add r4, r0, #0 - mov r2, #0x1a - mov r6, #0x19 - lsl r2, r2, #4 - lsl r6, r6, #0x16 - add r2, #0xa0 - ldr r1, [r4, #4] - add r2, r6, r2 - add r1, r1, r2 - add r0, r5, #0 - mov r2, #0xc0 - bl sub_020C4B18 - mov r2, #0xd - mov r0, #0x1a - lsl r2, r2, #6 - lsl r0, r0, #4 - ldr r1, [r4, #4] - add r2, r6, r2 - add r1, r1, r2 - add r0, r5, r0 - mov r2, #0xc0 - bl sub_020C4B18 - mov r2, #0xa - lsl r2, r2, #8 - add r0, r5, #0 - ldr r1, [r4, #4] - add r2, r6, r2 - add r1, r1, r2 - add r0, #0xc0 - mov r2, #0xe0 - bl sub_020C4B18 - mov r0, #0x1a - mov r1, #0xb - lsl r0, r0, #4 - lsl r1, r1, #8 - add r0, r5, r0 - ldr r2, [r4, #4] - add r1, r6, r1 - add r1, r2, r1 - add r0, #0xc0 - mov r2, #0xe0 - bl sub_020C4B18 - add r0, sp, #0x18 - bl sub_0201A8FC - add r0, r7, #0 - bl sub_020237BC - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_02267DC0: .word 0x000E020F - thumb_func_end ov16_02267CE8 - - thumb_func_start ov16_02267DC4 -ov16_02267DC4: ; 0x02267DC4 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r4, r0, #0 - ldr r0, [r4, #0xc] - add r5, r1, #0 - bl ov16_0223DF00 - str r0, [sp, #0x1c] - ldr r0, [r4, #0xc] - bl ov16_0223E05C - str r0, [sp, #0x20] - ldr r0, [r4, #0xc] - bl ov16_0223E0D0 - add r7, r0, #0 - mov r0, #0x1e - mov r1, #5 - bl sub_02023790 - mov r1, #1 - add r6, r0, #0 - lsl r1, r1, #0xa - add r0, r5, #0 - tst r0, r1 - beq _02267E04 - ldr r0, [sp, #0x20] - sub r1, #0x49 - bl sub_0200B1EC - str r0, [sp, #0x18] - b _02267E0E -_02267E04: - ldr r0, [sp, #0x20] - add r1, #0xc5 - bl sub_0200B1EC - str r0, [sp, #0x18] -_02267E0E: - mov r0, #1 - str r0, [sp] - add r2, r4, #0 - str r0, [sp, #4] - add r2, #0x27 - ldrb r2, [r2] - add r0, r7, #0 - mov r1, #0 - mov r3, #2 - bl sub_0200B60C - ldr r2, [sp, #0x18] - add r0, r7, #0 - add r1, r6, #0 - bl sub_0200C388 - mov r0, #0 - str r0, [sp] - mov r0, #0xf - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - add r1, sp, #0x24 - mov r2, #0xd - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02267ED8 ; =0x000E020F - add r2, r6, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - str r1, [sp, #0x14] - add r0, sp, #0x24 - add r3, r1, #0 - bl sub_0201D7E0 - ldr r0, [r4, #4] - ldr r5, [sp, #0x30] - ldr r0, [r0, #0] - bl sub_02021F98 - add r4, r0, #0 - mov r7, #0x19 - mov r2, #0x11 - lsl r7, r7, #0x16 - lsl r2, r2, #6 - ldr r1, [r4, #4] - add r2, r7, r2 - add r1, r1, r2 - add r0, r5, #0 - mov r2, #0xc0 - bl sub_020C4B18 - mov r2, #0x15 - mov r0, #0x1a - lsl r2, r2, #6 - lsl r0, r0, #4 - ldr r1, [r4, #4] - add r2, r7, r2 - add r1, r1, r2 - add r0, r5, r0 - mov r2, #0xc0 - bl sub_020C4B18 - mov r2, #3 - lsl r2, r2, #0xa - add r0, r5, #0 - ldr r1, [r4, #4] - add r2, r7, r2 - add r1, r1, r2 - add r0, #0xc0 - mov r2, #0xe0 - bl sub_020C4B18 - mov r0, #0x1a - mov r1, #0xd - lsl r0, r0, #4 - lsl r1, r1, #8 - add r0, r5, r0 - ldr r2, [r4, #4] - add r1, r7, r1 - add r1, r2, r1 - add r0, #0xc0 - mov r2, #0xe0 - bl sub_020C4B18 - add r0, sp, #0x24 - bl sub_0201A8FC - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02267ED8: .word 0x000E020F - thumb_func_end ov16_02267DC4 - - thumb_func_start ov16_02267EDC -ov16_02267EDC: ; 0x02267EDC - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - bne _02267F00 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r3, r5, #0 - ldr r0, [r5, #0x2c] - ldr r1, [r5, #0x28] - ldr r2, [r5, #0x30] - add r3, #0x34 - bl ov16_022680D8 - add r6, r0, #0 - b _02267F38 -_02267F00: - ldr r0, [r5, #0x38] - ldr r1, [r5, #0x40] - ldr r2, [r5, #0x3c] - mov r3, #0xc - bl ov16_02268210 - add r1, r0, #0 - bne _02267F12 - mov r1, #1 -_02267F12: - ldr r6, [r5, #0x40] - add r0, r6, #0 - bl sub_020E1F6C - bl sub_020D4070 - mov r1, #0xc - lsl r0, r0, #0x10 - add r3, r5, #0 - str r1, [sp] - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0x3c] - ldr r1, [r5, #0x38] - add r2, r6, #0 - add r3, #0x44 - bl ov16_022680D8 - add r6, r0, #0 -_02267F38: - cmp r4, #0 - bne _02267F4A - add r0, r5, #0 - add r0, #0x4f - ldrb r0, [r0] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - cmp r0, #1 - beq _02267F54 -_02267F4A: - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov16_02267F70 -_02267F54: - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - bne _02267F6A - cmp r4, #0 - bne _02267F66 - mov r0, #0 - str r0, [r5, #0x34] - b _02267F6A -_02267F66: - mov r0, #0 - str r0, [r5, #0x44] -_02267F6A: - add r0, r6, #0 - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov16_02267EDC - - thumb_func_start ov16_02267F70 -ov16_02267F70: ; 0x02267F70 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - ldr r0, [r6, #4] - add r4, r1, #0 - ldr r0, [r0, #0] - bl sub_02021F98 - add r5, r0, #0 - cmp r4, #0 - beq _02267F8E - cmp r4, #1 - beq _02268040 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} -_02267F8E: - add r0, sp, #0x10 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - add r3, r6, #0 - ldr r0, [r6, #0x2c] - ldr r1, [r6, #0x28] - ldr r2, [r6, #0x30] - add r3, #0x34 - bl ov16_02268194 - mov r1, #0x30 - bl sub_0208C0D4 - cmp r0, #1 - beq _02267FBE - cmp r0, #2 - beq _02267FBA - cmp r0, #3 - bne _02267FBE - mov r0, #2 - b _02267FC0 -_02267FBA: - mov r0, #0xb - b _02267FC0 -_02267FBE: - mov r0, #0x14 -_02267FC0: - bl ov16_02268250 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0x25 - ldrb r0, [r0] - mov r4, #0 - lsl r1, r0, #3 - ldr r0, _022680D0 ; =0x0226F44E - ldrh r0, [r0, r1] - lsr r7, r0, #5 -_02267FD6: - cmp r4, r7 - add r0, sp, #0x10 - bge _02268006 - add r2, r6, #0 - add r2, #0x25 - ldrb r2, [r2] - ldrb r0, [r0, r4] - lsl r3, r2, #3 - ldr r2, _022680D4 ; =0x0226F44C - lsl r1, r0, #5 - ldrh r3, [r2, r3] - ldr r0, [sp, #0xc] - mov r2, #0x19 - lsl r2, r2, #0x16 - add r0, r0, r1 - add r3, r2, r3 - lsl r2, r4, #5 - ldr r1, [r5, #4] - add r2, r3, r2 - add r1, r1, r2 - mov r2, #0x20 - bl sub_020C4B18 - b _02268032 -_02268006: - ldrb r0, [r0, r4] - ldr r2, [r5, #4] - lsl r1, r0, #5 - ldr r0, [sp, #0xc] - add r0, r0, r1 - add r1, r6, #0 - add r1, #0x25 - ldrb r1, [r1] - lsl r3, r1, #3 - ldr r1, _022680D4 ; =0x0226F44C - add r1, r1, r3 - ldrh r3, [r1, #4] - mov r1, #0x19 - lsl r1, r1, #0x16 - add r1, r1, r3 - sub r3, r4, r7 - lsl r3, r3, #5 - add r1, r1, r3 - add r1, r2, r1 - mov r2, #0x20 - bl sub_020C4B18 -_02268032: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #6 - blo _02267FD6 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} -_02268040: - add r0, sp, #0x10 - str r0, [sp] - mov r0, #0xc - str r0, [sp, #4] - add r3, r6, #0 - ldr r0, [r6, #0x3c] - ldr r1, [r6, #0x38] - ldr r2, [r6, #0x40] - add r3, #0x44 - bl ov16_02268194 - add r6, #0x48 - ldrb r0, [r6] - cmp r0, #0x64 - bne _02268070 - mov r0, #0 - add r2, r0, #0 - add r1, sp, #0x10 -_02268064: - strb r2, [r1, r0] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0xc - blo _02268064 -_02268070: - mov r0, #0x1d - bl ov16_02268250 - add r6, r0, #0 - mov r1, #0x19 - mov r0, #0x66 - lsl r1, r1, #0x16 - lsl r0, r0, #4 - add r0, r1, r0 - str r0, [sp, #8] - mov r0, #0xe - lsl r0, r0, #8 - mov r4, #0 - add r7, r1, r0 -_0226808C: - cmp r4, #5 - add r0, sp, #0x10 - bhs _022680AA - ldrb r0, [r0, r4] - ldr r1, [sp, #8] - lsl r2, r4, #5 - lsl r0, r0, #5 - add r1, r1, r2 - ldr r3, [r5, #4] - add r0, r6, r0 - add r1, r3, r1 - mov r2, #0x20 - bl sub_020C4B18 - b _022680C0 -_022680AA: - ldrb r0, [r0, r4] - sub r2, r4, #5 - lsl r2, r2, #5 - lsl r0, r0, #5 - ldr r1, [r5, #4] - add r2, r7, r2 - add r1, r1, r2 - add r0, r6, r0 - mov r2, #0x20 - bl sub_020C4B18 -_022680C0: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0xc - blo _0226808C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_022680D0: .word 0x0226F44E -_022680D4: .word 0x0226F44C - thumb_func_end ov16_02267F70 - - thumb_func_start ov16_022680D8 -ov16_022680D8: ; 0x022680D8 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r2, sp, #0 - add r5, r3, #0 - ldrb r2, [r2, #0x10] - mov r3, #2 - ldr r4, [r5, #0] - lsl r2, r2, #0x1b - lsl r3, r3, #0x1e - lsr r2, r2, #0x18 - cmp r4, r3 - bne _022680FC - cmp r0, r2 - bge _022680FA - lsl r3, r1, #8 - str r3, [r5, #0] - b _022680FC -_022680FA: - str r1, [r5, #0] -_022680FC: - sub r4, r1, r6 - bpl _02268104 - mov r4, #0 - b _0226810A -_02268104: - cmp r4, r0 - ble _0226810A - add r4, r0, #0 -_0226810A: - cmp r0, r2 - bge _02268122 - ldr r3, [r5, #0] - asr r1, r3, #8 - cmp r4, r1 - bne _0226812E - lsl r1, r3, #0x18 - lsr r1, r1, #0x18 - bne _0226812E - mov r0, #0 - mvn r0, r0 - pop {r4, r5, r6, pc} -_02268122: - ldr r1, [r5, #0] - cmp r4, r1 - bne _0226812E - mov r0, #0 - mvn r0, r0 - pop {r4, r5, r6, pc} -_0226812E: - cmp r0, r2 - bge _0226816E - lsl r0, r0, #8 - add r1, r2, #0 - bl sub_020E1F6C - cmp r6, #0 - ldr r1, [r5, #0] - bge _02268152 - add r0, r1, r0 - str r0, [r5, #0] - asr r0, r0, #8 - cmp r0, r4 - blt _02268192 - lsl r0, r4, #8 - str r0, [r5, #0] - add r0, r4, #0 - pop {r4, r5, r6, pc} -_02268152: - sub r1, r1, r0 - str r1, [r5, #0] - asr r0, r1, #8 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - cmp r1, #0 - ble _02268162 - add r0, r0, #1 -_02268162: - cmp r0, r4 - bgt _02268192 - lsl r0, r4, #8 - str r0, [r5, #0] - add r0, r4, #0 - pop {r4, r5, r6, pc} -_0226816E: - cmp r6, #0 - ldr r1, [r5, #0] - add r0, sp, #0 - bge _02268184 - ldrh r0, [r0, #0x14] - add r0, r1, r0 - str r0, [r5, #0] - cmp r0, r4 - ble _02268190 - str r4, [r5, #0] - b _02268190 -_02268184: - ldrh r0, [r0, #0x14] - sub r0, r1, r0 - str r0, [r5, #0] - cmp r0, r4 - bge _02268190 - str r4, [r5, #0] -_02268190: - ldr r0, [r5, #0] -_02268192: - pop {r4, r5, r6, pc} - thumb_func_end ov16_022680D8 - - thumb_func_start ov16_02268194 -ov16_02268194: ; 0x02268194 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r5, [sp, #0x18] - sub r7, r1, r2 - bpl _022681A2 - mov r7, #0 - b _022681A8 -_022681A2: - cmp r7, r6 - ble _022681A8 - add r7, r6, #0 -_022681A8: - add r0, sp, #8 - ldrb r4, [r0, #0x14] - mov r1, #0 - lsl r2, r4, #3 - cmp r4, #0 - ble _022681BE - add r0, r1, #0 -_022681B6: - strb r0, [r5, r1] - add r1, r1, #1 - cmp r1, r4 - blt _022681B6 -_022681BE: - cmp r6, r2 - ldr r1, [r3, #0] - bhs _022681D2 - add r0, r1, #0 - mul r0, r2 - add r1, r6, #0 - bl sub_020E2178 - lsr r0, r0, #8 - b _022681DC -_022681D2: - add r0, r1, #0 - mul r0, r2 - add r1, r6, #0 - bl sub_020E2178 -_022681DC: - add r2, r0, #0 - cmp r0, #0 - bne _022681EC - cmp r7, #0 - ble _022681EC - mov r2, #1 - strb r2, [r5] - b _02268208 -_022681EC: - mov r3, #0 - cmp r4, #0 - ble _02268208 - mov r1, #8 -_022681F4: - cmp r0, #8 - blo _022681FE - strb r1, [r5, r3] - sub r0, #8 - b _02268202 -_022681FE: - strb r0, [r5, r3] - b _02268208 -_02268202: - add r3, r3, #1 - cmp r3, r4 - blt _022681F4 -_02268208: - lsl r0, r2, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02268194 - - thumb_func_start ov16_02268210 -ov16_02268210: ; 0x02268210 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - lsl r0, r3, #0x1b - add r5, r2, #0 - lsr r6, r0, #0x18 - sub r4, r7, r1 - bpl _02268222 - mov r4, #0 - b _02268228 -_02268222: - cmp r4, r5 - ble _02268228 - add r4, r5, #0 -_02268228: - add r0, r7, #0 - mul r0, r6 - add r1, r5, #0 - bl sub_020E1F6C - add r7, r0, #0 - add r0, r4, #0 - mul r0, r6 - add r1, r5, #0 - bl sub_020E1F6C - lsl r1, r7, #0x18 - lsl r0, r0, #0x18 - asr r1, r1, #0x18 - asr r0, r0, #0x18 - sub r0, r1, r0 - bl sub_020D4070 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_02268210 - - thumb_func_start ov16_02268250 -ov16_02268250: ; 0x02268250 - ldr r1, _02268258 ; =0x0226F6AC - lsl r0, r0, #5 - add r0, r1, r0 - bx lr - ; .align 2, 0 -_02268258: .word 0x0226F6AC - thumb_func_end ov16_02268250 - - thumb_func_start ov16_0226825C -ov16_0226825C: ; 0x0226825C - push {r3, lr} - cmp r0, #5 - bhi _022682A8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226826E: ; jump table - .short _0226827A - _0226826E - 2 ; case 0 - .short _02268294 - _0226826E - 2 ; case 1 - .short _02268298 - _0226826E - 2 ; case 2 - .short _0226829C - _0226826E - 2 ; case 3 - .short _022682A0 - _0226826E - 2 ; case 4 - .short _022682A4 - _0226826E - 2 ; case 5 -_0226827A: - mov r0, #2 - lsl r0, r0, #8 - tst r0, r1 - beq _02268286 - mov r0, #7 - pop {r3, pc} -_02268286: - mov r0, #0x20 - tst r0, r1 - beq _02268290 - mov r0, #6 - pop {r3, pc} -_02268290: - mov r0, #0 - pop {r3, pc} -_02268294: - mov r0, #1 - pop {r3, pc} -_02268298: - mov r0, #2 - pop {r3, pc} -_0226829C: - mov r0, #3 - pop {r3, pc} -_022682A0: - mov r0, #4 - pop {r3, pc} -_022682A4: - mov r0, #5 - pop {r3, pc} -_022682A8: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov16_0226825C - - thumb_func_start ov16_022682B0 -ov16_022682B0: ; 0x022682B0 - push {r3, lr} - cmp r0, #7 - bhi _022682EE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022682C2: ; jump table - .short _022682D2 - _022682C2 - 2 ; case 0 - .short _022682D6 - _022682C2 - 2 ; case 1 - .short _022682DA - _022682C2 - 2 ; case 2 - .short _022682DE - _022682C2 - 2 ; case 3 - .short _022682E2 - _022682C2 - 2 ; case 4 - .short _022682E6 - _022682C2 - 2 ; case 5 - .short _022682EA - _022682C2 - 2 ; case 6 - .short _022682EA - _022682C2 - 2 ; case 7 -_022682D2: - ldr r0, _022682F8 ; =0x0226F5B0 - pop {r3, pc} -_022682D6: - ldr r0, _022682FC ; =0x0226F5E4 - pop {r3, pc} -_022682DA: - ldr r0, _02268300 ; =0x0226F4AC - pop {r3, pc} -_022682DE: - ldr r0, _02268304 ; =0x0226F4E0 - pop {r3, pc} -_022682E2: - ldr r0, _02268308 ; =0x0226F548 - pop {r3, pc} -_022682E6: - ldr r0, _0226830C ; =0x0226F618 - pop {r3, pc} -_022682EA: - ldr r0, _02268310 ; =0x0226F57C - pop {r3, pc} -_022682EE: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - nop -_022682F8: .word 0x0226F5B0 -_022682FC: .word 0x0226F5E4 -_02268300: .word 0x0226F4AC -_02268304: .word 0x0226F4E0 -_02268308: .word 0x0226F548 -_0226830C: .word 0x0226F618 -_02268310: .word 0x0226F57C - thumb_func_end ov16_022682B0 - - thumb_func_start ov16_02268314 -ov16_02268314: ; 0x02268314 - push {r3, lr} - cmp r0, #7 - bhi _0226833E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02268326: ; jump table - .short _02268336 - _02268326 - 2 ; case 0 - .short _0226833A - _02268326 - 2 ; case 1 - .short _02268336 - _02268326 - 2 ; case 2 - .short _0226833A - _02268326 - 2 ; case 3 - .short _02268336 - _02268326 - 2 ; case 4 - .short _0226833A - _02268326 - 2 ; case 5 - .short _02268336 - _02268326 - 2 ; case 6 - .short _02268336 - _02268326 - 2 ; case 7 -_02268336: - ldr r0, _02268348 ; =0x0226F514 - pop {r3, pc} -_0226833A: - mov r0, #0 - pop {r3, pc} -_0226833E: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - nop -_02268348: .word 0x0226F514 - thumb_func_end ov16_02268314 - - thumb_func_start ov16_0226834C -ov16_0226834C: ; 0x0226834C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0 - strb r0, [r6] - mov r0, #5 - mov r1, #0xc - bl sub_02018144 - mov r1, #0 - mov r2, #0xc - add r4, r0, #0 - bl sub_020C4CF4 - mov r2, #0xfa - str r5, [r4, #0] - ldr r0, _0226837C ; =ov16_02268380 - add r1, r4, #0 - lsl r2, r2, #2 - str r6, [r4, #4] - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_0226837C: .word ov16_02268380 - thumb_func_end ov16_0226834C - - thumb_func_start ov16_02268380 -ov16_02268380: ; 0x02268380 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - bl ov16_0223E018 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - bl ov16_0223E064 - add r6, r0, #0 - ldrb r0, [r4, #8] - cmp r0, #0 - beq _022683AC - cmp r0, #1 - beq _022683CA - cmp r0, #2 - beq _022683FC - b _02268430 -_022683AC: - ldr r1, _0226845C ; =0x00004E27 - add r0, r5, #0 - mov r2, #1 - bl sub_0200D05C - add r5, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - ldr r0, [r0, #4] - bl sub_0200D41C - strb r5, [r4, #9] - ldrb r0, [r4, #8] - add r0, r0, #1 - strb r0, [r4, #8] -_022683CA: - mov r0, #0xa - ldrsb r1, [r4, r0] - add r1, r1, #2 - strb r1, [r4, #0xa] - ldrsb r1, [r4, r0] - cmp r1, #0xa - blt _022683E0 - strb r0, [r4, #0xa] - ldrb r0, [r4, #8] - add r0, r0, #1 - strb r0, [r4, #8] -_022683E0: - ldrb r0, [r4, #0xa] - mov r1, #2 - mov r3, #0x10 - str r0, [sp] - ldr r0, _02268460 ; =0x000073A5 - str r0, [sp, #4] - ldrb r2, [r4, #9] - add r0, r6, #0 - lsl r2, r2, #0x14 - lsr r2, r2, #0x10 - bl sub_020039B0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022683FC: - mov r0, #0xa - ldrsb r1, [r4, r0] - sub r1, r1, #2 - strb r1, [r4, #0xa] - ldrsb r0, [r4, r0] - cmp r0, #0 - bgt _02268414 - mov r0, #0 - strb r0, [r4, #0xa] - ldrb r0, [r4, #8] - add r0, r0, #1 - strb r0, [r4, #8] -_02268414: - ldrb r0, [r4, #0xa] - mov r1, #2 - mov r3, #0x10 - str r0, [sp] - ldr r0, _02268460 ; =0x000073A5 - str r0, [sp, #4] - ldrb r2, [r4, #9] - add r0, r6, #0 - lsl r2, r2, #0x14 - lsr r2, r2, #0x10 - bl sub_020039B0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02268430: - ldr r1, _02268464 ; =0x00004E26 - add r0, r5, #0 - mov r2, #1 - bl sub_0200D05C - add r1, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #4] - bl sub_0200D41C - ldr r0, [r4, #4] - mov r1, #1 - strb r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226845C: .word 0x00004E27 -_02268460: .word 0x000073A5 -_02268464: .word 0x00004E26 - thumb_func_end ov16_02268380 - - thumb_func_start ov16_02268468 -ov16_02268468: ; 0x02268468 - bx lr - ; .align 2, 0 - thumb_func_end ov16_02268468 - - thumb_func_start ov16_0226846C -ov16_0226846C: ; 0x0226846C - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226846C - - thumb_func_start ov16_02268470 -ov16_02268470: ; 0x02268470 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #0 - bne _0226848E - add r0, r4, #0 - mov r1, #0 - add r0, #0x54 - strh r1, [r0] - ldr r0, _02268490 ; =ov16_022684BC - ldr r2, _02268494 ; =0x000003F2 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x50] -_0226848E: - pop {r4, pc} - ; .align 2, 0 -_02268490: .word ov16_022684BC -_02268494: .word 0x000003F2 - thumb_func_end ov16_02268470 - - thumb_func_start ov16_02268498 -ov16_02268498: ; 0x02268498 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #0 - beq _022684AA - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x50] -_022684AA: - add r0, r4, #0 - mov r1, #0 - add r0, #0x54 - strh r1, [r0] - add r0, r4, #0 - add r2, r1, #0 - bl ov16_0226763C - pop {r4, pc} - thumb_func_end ov16_02268498 - - thumb_func_start ov16_022684BC -ov16_022684BC: ; 0x022684BC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r1, #0x54 - ldrh r2, [r1] - add r1, r4, #0 - add r1, #0x54 - add r2, #0x14 - strh r2, [r1] - add r1, r4, #0 - add r1, #0x54 - ldrh r2, [r1] - mov r1, #0x5a - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x54 - cmp r2, r1 - blo _022684E4 - ldrh r2, [r0] - sub r1, r2, r1 - strh r1, [r0] -_022684E4: - add r0, r4, #0 - add r0, #0x54 - ldrh r0, [r0] - bl sub_0201D15C - mov r2, #6 - asr r1, r0, #0x1f - lsl r2, r2, #0xa - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - add r3, r0, #0 - add r5, r1, #0 - mov r1, #0 - lsl r2, r2, #0xa - add r0, r4, #0 - add r3, r3, r2 - adc r5, r1 - lsl r2, r5, #0x14 - lsr r3, r3, #0xc - orr r3, r2 - asr r2, r3, #0xb - lsr r2, r2, #0x14 - add r2, r3, r2 - asr r2, r2, #0xc - bl ov16_0226763C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_022684BC - - thumb_func_start ov16_02268520 -ov16_02268520: ; 0x02268520 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r4, r0, #0 - ldr r0, [r5, #4] - bl ov16_0223E010 - str r0, [sp, #0x24] - ldr r0, [r5, #4] - bl ov16_0223E018 - str r0, [sp, #0x20] - ldr r0, [r5, #4] - bl ov16_0223EC04 - add r7, r0, #0 - ldrb r0, [r5, #8] - cmp r0, #0 - ldrb r0, [r5, #9] - bne _02268566 - lsl r1, r0, #1 - ldr r0, _02268614 ; =0x0227009C - ldrh r3, [r0, r1] - ldr r0, _02268618 ; =0x00004E2D - mov r1, #0x80 - str r1, [sp, #0x1c] - add r6, r0, #0 - mov r1, #0x81 - sub r6, #8 - str r1, [sp, #0x18] - b _0226857A -_02268566: - lsl r1, r0, #1 - ldr r0, _0226861C ; =0x0227006C - ldrh r3, [r0, r1] - ldr r0, _02268620 ; =0x00004E2E - mov r1, #0x83 - str r1, [sp, #0x1c] - add r6, r0, #0 - mov r1, #0x84 - sub r6, #8 - str r1, [sp, #0x18] -_0226857A: - mov r1, #1 - str r1, [sp] - str r1, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x20] - add r2, r4, #0 - bl sub_0200CC3C - ldr r0, [r5, #4] - bl ov16_0223E064 - str r4, [sp] - ldrb r1, [r5, #9] - mov r2, #6 - add r3, r1, #0 - mul r3, r2 - ldr r2, _02268624 ; =0x02270134 - lsl r1, r7, #1 - add r2, r2, r3 - ldrh r1, [r1, r2] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x20] - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #1 - str r1, [sp, #0xc] - str r1, [sp, #0x10] - ldr r1, _02268628 ; =0x00004E29 - str r1, [sp, #0x14] - mov r1, #2 - bl sub_0200CDC4 - ldr r0, [r5, #4] - bl ov16_0223E064 - mov r1, #0 - str r1, [sp] - mov r1, #0x20 - str r1, [sp, #4] - mov r1, #0x70 - str r1, [sp, #8] - ldrb r2, [r5, #9] - mov r3, #6 - lsl r5, r7, #1 - mul r3, r2 - ldr r2, _02268624 ; =0x02270134 - mov r1, #0x1b - add r2, r2, r3 - ldrh r2, [r5, r2] - mov r3, #5 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x20] - ldr r3, [sp, #0x1c] - add r2, r4, #0 - str r6, [sp, #4] - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x20] - ldr r3, [sp, #0x18] - add r2, r4, #0 - str r6, [sp, #4] - bl sub_0200CE54 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268614: .word 0x0227009C -_02268618: .word 0x00004E2D -_0226861C: .word 0x0227006C -_02268620: .word 0x00004E2E -_02268624: .word 0x02270134 -_02268628: .word 0x00004E29 - thumb_func_end ov16_02268520 - - thumb_func_start ov16_0226862C -ov16_0226862C: ; 0x0226862C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov16_0223E010 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov16_0223E018 - add r1, r0, #0 - add r0, r5, #0 - ldrb r3, [r4, #8] - mov r2, #0x34 - ldr r5, _0226865C ; =0x022700CC - mul r2, r3 - add r2, r5, r2 - bl sub_0200CE6C - str r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - pop {r3, r4, r5, pc} - nop -_0226865C: .word 0x022700CC - thumb_func_end ov16_0226862C - - thumb_func_start ov16_02268660 -ov16_02268660: ; 0x02268660 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02268672 - bl sub_0200D0F4 - mov r0, #0 - str r0, [r4, #0] -_02268672: - pop {r4, pc} - thumb_func_end ov16_02268660 - - thumb_func_start ov16_02268674 -ov16_02268674: ; 0x02268674 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - bl ov16_0223E018 - add r4, r0, #0 - ldrb r0, [r5, #8] - cmp r0, #0 - bne _0226868A - ldr r1, _022686B0 ; =0x00004E2D - b _0226868C -_0226868A: - ldr r1, _022686B4 ; =0x00004E2E -_0226868C: - add r5, r1, #0 - add r0, r4, #0 - sub r5, #8 - bl sub_0200D070 - ldr r1, _022686B8 ; =0x00004E29 - add r0, r4, #0 - bl sub_0200D080 - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200D090 - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200D0A0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022686B0: .word 0x00004E2D -_022686B4: .word 0x00004E2E -_022686B8: .word 0x00004E29 - thumb_func_end ov16_02268674 - - thumb_func_start ov16_022686BC -ov16_022686BC: ; 0x022686BC - push {r3, lr} - ldr r0, [r0, #0] - cmp r0, #0 - beq _022686C8 - bl sub_0200D3F4 -_022686C8: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_022686BC - - thumb_func_start ov16_022686CC -ov16_022686CC: ; 0x022686CC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - mov r0, #0 - add r1, r5, #0 - mov r2, #0x10 - add r7, r3, #0 - bl sub_020C4BB8 - str r4, [r5, #4] - strb r6, [r5, #8] - strb r7, [r5, #9] - cmp r7, #0x18 - blt _022686F2 - bl sub_02022974 - mov r0, #0 - strb r0, [r5, #9] -_022686F2: - add r0, r5, #0 - bl ov16_02268520 - add r0, r5, #0 - bl ov16_0226862C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_022686CC - - thumb_func_start ov16_02268700 -ov16_02268700: ; 0x02268700 - push {r4, lr} - add r4, r0, #0 - bl ov16_02268660 - add r0, r4, #0 - bl ov16_02268674 - mov r0, #0 - add r1, r4, #0 - mov r2, #0x10 - bl sub_020C4BB8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_02268700 - - thumb_func_start ov16_0226871C -ov16_0226871C: ; 0x0226871C - push {r4, lr} - ldr r1, _0226873C ; =0x000006EC - mov r0, #5 - bl sub_02018144 - ldr r2, _0226873C ; =0x000006EC - mov r1, #0 - add r4, r0, #0 - bl sub_020C4CF4 - mov r1, #0 - ldr r0, _02268740 ; =0x0000068B - mvn r1, r1 - strb r1, [r4, r0] - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 -_0226873C: .word 0x000006EC -_02268740: .word 0x0000068B - thumb_func_end ov16_0226871C - - thumb_func_start ov16_02268744 -ov16_02268744: ; 0x02268744 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r6, _02268798 ; =0x02270540 - add r5, r0, #0 - add r7, r4, #0 -_0226874E: - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r2, r6, #0 - add r3, r7, #0 - bl sub_020183C4 - add r1, r4, #4 - lsl r1, r1, #0x18 - ldr r2, _0226879C ; =0x000002FF - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019EE0 - add r1, r4, #4 - lsl r1, r1, #0x18 - mov r2, #0 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02019184 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r4, r4, #1 - add r6, #0x1c - cmp r4, #4 - blo _0226874E - pop {r3, r4, r5, r6, r7, pc} - nop -_02268798: .word 0x02270540 -_0226879C: .word 0x000002FF - thumb_func_end ov16_02268744 - - thumb_func_start ov16_022687A0 -ov16_022687A0: ; 0x022687A0 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_022687A8: - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r6, #0 - bl sub_02019120 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - cmp r4, #4 - blo _022687A8 - pop {r4, r5, r6, pc} - thumb_func_end ov16_022687A0 - - thumb_func_start ov16_022687C8 -ov16_022687C8: ; 0x022687C8 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r2, [sp, #0xc] - add r4, r3, #0 - bl ov16_0226871C - add r6, r0, #0 - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x38] - str r0, [r6, #0] - ldr r0, _022689F0 ; =0x0000068D - cmp r1, #0 - strb r4, [r6, r0] - str r1, [r6, #4] - beq _022687EC - ldrb r1, [r1] - add r0, #0x53 - strb r1, [r6, r0] -_022687EC: - ldr r0, [sp, #0xc] - bl ov16_0223E064 - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - bl ov16_0223E240 - str r0, [sp, #0x14] - cmp r0, #0x17 - blo _02268808 - mov r0, #0 - str r0, [sp, #0x14] - bl sub_02022974 -_02268808: - mov r0, #0xd - mov r1, #5 - bl sub_02012744 - ldr r2, _022689F4 ; =0x000004CC - add r1, r6, #0 - str r0, [r6, r2] - ldr r0, _022689F8 ; =ov16_0226BCE4 - add r2, #0x52 - bl sub_0200D9E8 - ldr r1, _022689FC ; =0x00000698 - mov r4, #0 - str r0, [r6, r1] - ldr r7, _02268A00 ; =0x02270264 - b _0226887E -_02268828: - mov r1, #2 - mov r0, #5 - lsl r1, r1, #0xa - bl sub_02018144 - lsl r1, r4, #2 - add r1, r6, r1 - str r0, [r1, #0x40] - ldr r0, [sp, #0xc] - bl ov16_0223DF0C - mov r1, #0x80 - tst r0, r1 - beq _02268850 - lsl r0, r4, #1 - ldrh r0, [r7, r0] - cmp r0, #0x31 - bne _02268850 - mov r1, #0xaa - b _02268854 -_02268850: - lsl r0, r4, #1 - ldrh r1, [r7, r0] -_02268854: - mov r0, #5 - str r0, [sp] - mov r0, #7 - mov r2, #1 - add r3, sp, #0x20 - bl sub_02006F6C - add r5, r0, #0 - lsl r0, r4, #2 - add r0, r6, r0 - ldr r1, [r0, #0x40] - ldr r0, [sp, #0x20] - mov r2, #2 - add r0, #0xc - lsl r2, r2, #0xa - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - add r4, r4, #1 -_0226887E: - cmp r4, #7 - blt _02268828 - ldr r0, [sp, #0xc] - bl ov16_0223DF0C - mov r4, #0x80 - tst r0, r4 - beq _02268892 - add r4, #0xd4 - b _02268894 -_02268892: - mov r4, #0xf2 -_02268894: - mov r1, #2 - mov r0, #5 - lsl r1, r1, #8 - bl sub_02018144 - str r0, [r6, #0x5c] - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x18] - mov r1, #7 - add r2, r4, #0 - mov r3, #5 - bl sub_02003050 - ldr r0, [sp, #0x14] - ldr r2, _02268A04 ; =0x022704E4 - lsl r3, r0, #2 - ldrh r1, [r2, r3] - ldr r0, _02268A08 ; =0x0000FFFF - cmp r1, r0 - beq _022688DC - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldrh r2, [r2, r3] - ldr r0, [sp, #0x18] - mov r1, #7 - mov r3, #5 - bl sub_02003050 -_022688DC: - ldr r0, [sp, #0x18] - mov r1, #1 - bl sub_02003164 - mov r2, #2 - ldr r1, [r6, #0x5c] - lsl r2, r2, #8 - bl sub_020C4B18 - add r5, r6, #0 - mov r7, #0x46 - mov r4, #0 - add r5, #0x6c - lsl r7, r7, #2 - b _0226890A -_022688FA: - add r0, r4, #0 - mul r0, r7 - add r0, r5, r0 - mov r1, #0xff - mov r2, #0x18 - bl sub_020C4CF4 - add r4, r4, #1 -_0226890A: - cmp r4, #4 - blt _022688FA - mov r0, #0 - str r0, [sp, #0x10] - mov r7, #6 - b _02268946 -_02268916: - mov r0, #0x46 - ldr r1, [sp, #0x10] - lsl r0, r0, #2 - mul r0, r1 - mov r5, #0 - add r4, r6, r0 - b _0226893C -_02268924: - add r0, r7, #0 - bl sub_0208C098 - add r1, r0, #0 - mov r0, #5 - bl sub_02018144 - lsl r1, r5, #2 - add r1, r4, r1 - add r1, #0x84 - str r0, [r1, #0] - add r5, r5, #1 -_0226893C: - cmp r5, #4 - blt _02268924 - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] -_02268946: - ldr r0, [sp, #0x10] - cmp r0, #4 - blt _02268916 - mov r0, #5 - mov r1, #0x40 - bl sub_02018144 - str r0, [r6, #0x60] - mov r0, #5 - mov r1, #0x40 - bl sub_02018144 - str r0, [r6, #0x64] - ldr r1, [r6, #0x60] - ldr r0, [r6, #0x5c] - mov r2, #0x20 - bl sub_020C4B18 - ldr r1, [r6, #0x60] - ldr r0, [r6, #0x5c] - add r1, #0x20 - add r0, #0xe0 - mov r2, #0x20 - bl sub_020C4B18 - ldr r0, [sp, #0xc] - bl ov16_0223DF0C - mov r2, #0x80 - tst r0, r2 - beq _0226898A - add r1, r2, #0 - add r1, #0xd5 - b _0226899E -_0226898A: - ldr r0, [sp, #0x14] - lsl r1, r0, #2 - ldr r0, _02268A04 ; =0x022704E4 - add r0, r0, r1 - ldrh r1, [r0, #2] - ldr r0, _02268A08 ; =0x0000FFFF - cmp r1, r0 - bne _0226899E - add r1, r2, #0 - add r1, #0x8b -_0226899E: - mov r0, #7 - add r2, sp, #0x1c - mov r3, #5 - bl sub_02006F88 - add r4, r0, #0 - ldr r0, [sp, #0xc] - bl ov16_0223DF0C - mov r1, #0x80 - tst r0, r1 - ldr r1, [r6, #0x64] - beq _022689C4 - ldr r0, [sp, #0x1c] - mov r2, #0x40 - ldr r0, [r0, #0xc] - bl sub_020C4B18 - b _022689CE -_022689C4: - ldr r0, [sp, #0x1c] - mov r2, #0x20 - ldr r0, [r0, #0xc] - bl sub_020C4B18 -_022689CE: - add r0, r4, #0 - bl sub_020181C4 - bl sub_02002B4C - bl sub_02002B6C - ldr r0, _02268A0C ; =ov16_0226BD74 - ldr r2, _02268A10 ; =0x0000D6D8 - add r1, r6, #0 - bl sub_0200D9E8 - str r0, [r6, #0x68] - add r0, r6, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_022689F0: .word 0x0000068D -_022689F4: .word 0x000004CC -_022689F8: .word ov16_0226BCE4 -_022689FC: .word 0x00000698 -_02268A00: .word 0x02270264 -_02268A04: .word 0x022704E4 -_02268A08: .word 0x0000FFFF -_02268A0C: .word ov16_0226BD74 -_02268A10: .word 0x0000D6D8 - thumb_func_end ov16_022687C8 - - thumb_func_start ov16_02268A14 -ov16_02268A14: ; 0x02268A14 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r1, [r6, #4] - cmp r1, #0 - beq _02268A26 - mov r0, #0x6e - lsl r0, r0, #4 - ldrb r0, [r6, r0] - strb r0, [r1] -_02268A26: - add r0, r6, #0 - bl ov16_0226B1E8 - add r0, r6, #0 - bl ov16_02268F00 - add r0, r6, #0 - bl ov16_02268B8C - ldr r0, _02268A80 ; =0x000004CC - ldr r0, [r6, r0] - bl sub_020127BC - ldr r0, _02268A84 ; =0x00000698 - ldr r0, [r6, r0] - bl sub_0200DA58 - mov r4, #0 - add r5, r6, #0 -_02268A4C: - ldr r0, [r5, #0x40] - bl sub_020181C4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - blt _02268A4C - ldr r0, [r6, #0x5c] - bl sub_020181C4 - add r0, r6, #0 - bl ov16_0226ABE8 - ldr r0, [r6, #0x60] - bl sub_020181C4 - ldr r0, [r6, #0x64] - bl sub_020181C4 - ldr r0, [r6, #0x68] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02268A80: .word 0x000004CC -_02268A84: .word 0x00000698 - thumb_func_end ov16_02268A14 - - thumb_func_start ov16_02268A88 -ov16_02268A88: ; 0x02268A88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - ldr r0, [r7, #0] - bl ov16_0223E010 - add r6, r0, #0 - ldr r0, [r7, #0] - bl ov16_0223E018 - add r4, r0, #0 - ldr r0, [r7, #0] - bl ov16_0223DF00 - add r5, r0, #0 - ldr r0, [r7, #0] - bl ov16_0223E064 - str r0, [sp, #0x14] - ldr r0, [r7, #0] - bl ov16_0223DF0C - mov r1, #0x80 - tst r0, r1 - beq _02268ABE - mov r1, #0xa9 - b _02268AC0 -_02268ABE: - mov r1, #0x1c -_02268AC0: - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #7 - add r2, r5, #0 - mov r3, #4 - bl sub_02006E3C - ldr r2, _02268B70 ; =0x00004E31 - add r0, r6, #0 - add r1, r4, #0 - add r3, r2, #0 - bl sub_0207C9EC - ldr r0, [r7, #0] - bl ov16_0223E064 - mov r1, #2 - str r1, [sp] - ldr r1, _02268B74 ; =0x00004E34 - add r2, r6, #0 - str r1, [sp, #4] - mov r1, #3 - add r3, r4, #0 - bl sub_0207C9B0 - mov r5, #0 -_02268B02: - ldr r0, _02268B78 ; =0x00004E39 - add r1, r4, #0 - add r0, r5, r0 - str r0, [sp] - add r0, r6, #0 - mov r2, #2 - mov r3, #0 - bl sub_0207C948 - add r5, r5, #1 - cmp r5, #4 - blt _02268B02 - ldr r0, [r7, #0] - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - beq _02268B6A - ldr r1, _02268B7C ; =0x00004FBC - ldr r0, _02268B80 ; =0x00004E44 - str r1, [sp] - str r0, [sp, #4] - sub r0, r1, #6 - str r0, [sp, #8] - sub r1, #0x11 - str r1, [sp, #0xc] - ldr r3, [sp, #0x14] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #5 - bl ov16_0226DE44 - ldr r0, _02268B80 ; =0x00004E44 - ldr r3, _02268B84 ; =0x00004FB6 - str r0, [sp] - add r0, r3, #0 - str r3, [sp, #4] - sub r0, #0xb - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #5 - add r3, r3, #6 - bl ov16_0226DEEC - ldr r1, _02268B88 ; =0x000006E4 - str r0, [r7, r1] -_02268B6A: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02268B70: .word 0x00004E31 -_02268B74: .word 0x00004E34 -_02268B78: .word 0x00004E39 -_02268B7C: .word 0x00004FBC -_02268B80: .word 0x00004E44 -_02268B84: .word 0x00004FB6 -_02268B88: .word 0x000006E4 - thumb_func_end ov16_02268A88 - - thumb_func_start ov16_02268B8C -ov16_02268B8C: ; 0x02268B8C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0] - bl ov16_0223E010 - ldr r0, [r7, #0] - bl ov16_0223E018 - ldr r6, _02268BEC ; =0x00004E39 - add r5, r0, #0 - mov r4, #0 -_02268BA2: - add r0, r5, #0 - add r1, r4, r6 - bl sub_0207CA34 - add r4, r4, #1 - cmp r4, #4 - blt _02268BA2 - ldr r1, _02268BF0 ; =0x00004E34 - add r0, r5, #0 - bl sub_0207CA3C - ldr r1, _02268BF4 ; =0x00004E31 - add r0, r5, #0 - add r2, r1, #0 - bl sub_0207CA44 - ldr r0, [r7, #0] - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - beq _02268BEA - ldr r0, _02268BF8 ; =0x000006E4 - ldr r0, [r7, r0] - bl ov16_0226DF68 - ldr r3, _02268BFC ; =0x00004FAB - ldr r2, _02268C00 ; =0x00004E44 - add r1, r3, #0 - str r3, [sp] - add r0, r5, #0 - add r1, #0x11 - add r3, #0xb - bl ov16_0226DEC4 -_02268BEA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268BEC: .word 0x00004E39 -_02268BF0: .word 0x00004E34 -_02268BF4: .word 0x00004E31 -_02268BF8: .word 0x000006E4 -_02268BFC: .word 0x00004FAB -_02268C00: .word 0x00004E44 - thumb_func_end ov16_02268B8C - - thumb_func_start ov16_02268C04 -ov16_02268C04: ; 0x02268C04 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r0, [sp, #0x48] - str r1, [sp, #0x18] - str r0, [sp, #0x48] - ldr r0, [sp, #0x4c] - add r7, r2, #0 - str r3, [sp, #0x1c] - cmp r0, #0 - beq _02268C22 - add r1, r7, #0 - add r1, #0x1c - mov r2, #0x22 - bl sub_020C4DB0 -_02268C22: - ldr r0, _02268D24 ; =0x0000068E - mov r1, #0 - strb r1, [r7, r0] - ldr r0, [r7, #0] - bl ov16_0223DF00 - str r0, [sp, #0x28] - ldr r0, [r7, #0] - bl ov16_0223E010 - str r0, [sp, #0x24] - ldr r0, [r7, #0] - bl ov16_0223E018 - str r0, [sp, #0x20] - ldr r0, _02268D28 ; =0x0000068B - ldrsb r2, [r7, r0] - mov r0, #0 - mvn r0, r0 - cmp r2, r0 - bne _02268C54 - mov r0, #1 - str r0, [sp, #0x48] - mov r5, #0 - b _02268C5C -_02268C54: - mov r0, #0x30 - ldr r1, _02268D2C ; =0x02270670 - mul r0, r2 - add r5, r1, r0 -_02268C5C: - ldr r0, [sp, #0x1c] - mov r1, #0x30 - ldr r2, _02268D2C ; =0x02270670 - mul r1, r0 - add r0, r2, r1 - str r0, [sp, #0x2c] - ldr r0, [r7, #0] - bl ov16_0223E064 - mov r1, #2 - lsl r1, r1, #8 - str r1, [sp] - ldr r1, [r7, #0x5c] - mov r2, #1 - mov r3, #0 - bl sub_02002FBC - ldr r6, [sp, #0x2c] - mov r4, #0 -_02268C82: - ldrh r2, [r6, #4] - ldr r0, _02268D30 ; =0x0000FFFF - cmp r2, r0 - beq _02268CB8 - ldr r0, [sp, #0x48] - cmp r0, #1 - beq _02268C96 - ldrh r0, [r5, #4] - cmp r2, r0 - beq _02268CB8 -_02268C96: - lsl r2, r2, #2 - add r1, r4, #4 - add r2, r7, r2 - lsl r1, r1, #0x18 - mov r3, #2 - ldr r0, [sp, #0x28] - ldr r2, [r2, #0x40] - lsr r1, r1, #0x18 - lsl r3, r3, #0xa - bl sub_02019574 - add r1, r4, #4 - lsl r1, r1, #0x18 - ldr r0, [sp, #0x28] - lsr r1, r1, #0x18 - bl sub_0201C3C0 -_02268CB8: - add r4, r4, #1 - add r6, r6, #2 - add r5, r5, #2 - cmp r4, #4 - blt _02268C82 - ldr r0, [r7, #0] - bl ov16_0223E064 - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x24] - str r1, [sp] - mov r1, #0x48 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #7 - str r1, [sp, #0xc] - mov r1, #2 - str r1, [sp, #0x10] - ldr r1, _02268D34 ; =0x00004E37 - ldr r3, [sp, #0x20] - str r1, [sp, #0x14] - mov r1, #3 - bl sub_0200CDC4 - ldr r1, _02268D28 ; =0x0000068B - ldr r0, [sp, #0x1c] - mov r2, #0xf - strb r0, [r7, r1] - mov r0, #0xc - str r0, [sp] - ldr r0, _02268D38 ; =0x04001050 - mov r1, #2 - mov r3, #8 - bl sub_020BF55C - add r0, r7, #0 - bl ov16_0226B1E8 - ldr r0, [sp, #0x2c] - ldr r3, [r0, #0x28] - cmp r3, #0 - beq _02268D16 - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x48] - add r0, r7, #0 - blx r3 -_02268D16: - ldr r0, _02268D3C ; =ov16_0226BC50 - add r1, r7, #0 - mov r2, #0xa - bl sub_0200DA3C - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268D24: .word 0x0000068E -_02268D28: .word 0x0000068B -_02268D2C: .word 0x02270670 -_02268D30: .word 0x0000FFFF -_02268D34: .word 0x00004E37 -_02268D38: .word 0x04001050 -_02268D3C: .word ov16_0226BC50 - thumb_func_end ov16_02268C04 - - thumb_func_start ov16_02268D40 -ov16_02268D40: ; 0x02268D40 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r1, [sp, #0x14] - add r4, r0, #0 - ldr r1, _02268ECC ; =0x000005D8 - ldr r0, [sp, #0x14] - ldr r0, [r0, r1] - cmp r0, #0 - bne _02268D5C - ldr r0, [sp, #0x14] - add r1, #0x18 - ldr r0, [r0, r1] - cmp r0, #0 - beq _02268D60 -_02268D5C: - bl sub_02022974 -_02268D60: - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - bl ov16_0223E010 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - bl ov16_0223E018 - add r7, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02268ED0 ; =0x00004E37 - add r1, r7, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - add r2, r4, #0 - mov r3, #0xd0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02268ED4 ; =0x00004E2F - add r1, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - add r2, r4, #0 - mov r3, #0xcf - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02268ED4 ; =0x00004E2F - add r1, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - add r2, r4, #0 - mov r3, #0xd1 - bl sub_0200CE54 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02268ED8 ; =0x00004E38 - add r1, r7, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - add r2, r4, #0 - mov r3, #0xcd - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02268EDC ; =0x00004E30 - add r1, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - add r2, r4, #0 - mov r3, #0xcc - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02268EDC ; =0x00004E30 - add r1, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - add r2, r4, #0 - mov r3, #0xce - bl sub_0200CE54 - mov r0, #0 - ldr r4, [sp, #0x14] - str r0, [sp, #0x1c] - mov r6, #0xc - mov r5, #0xf6 -_02268DFE: - ldr r0, [sp, #0x18] - ldr r2, _02268EE0 ; =0x02270414 - add r1, r7, #0 - bl sub_0200CE6C - ldr r1, _02268ECC ; =0x000005D8 - mov r3, #0x11 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - lsl r1, r6, #0x10 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - mov r2, #0xd - lsl r3, r3, #0x10 - bl sub_0200D4D0 - ldr r0, _02268ECC ; =0x000005D8 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0200D6A4 - ldr r0, [sp, #0x18] - ldr r2, _02268EE4 ; =0x02270448 - add r1, r7, #0 - bl sub_0200CE6C - mov r1, #0x5f - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - lsl r1, r5, #0x10 - mov r3, #0x11 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - mov r2, #9 - lsl r3, r3, #0x10 - bl sub_0200D4D0 - ldr r0, [sp, #0x1c] - add r4, r4, #4 - add r0, r0, #1 - add r6, #0x13 - sub r5, #0xc - str r0, [sp, #0x1c] - cmp r0, #6 - blt _02268DFE - ldr r0, [sp, #0x14] - bl ov16_02269218 - ldr r0, [sp, #0x14] - ldr r0, [r0, #8] - cmp r0, #0 - beq _02268E70 - bl sub_02022974 -_02268E70: - ldr r0, _02268EE8 ; =ov16_02268FCC - ldr r1, [sp, #0x14] - ldr r2, _02268EEC ; =0x00000514 - bl sub_0200D9E8 - ldr r1, [sp, #0x14] - str r0, [r1, #8] - add r0, r1, #0 - ldr r0, [r0, #0] - bl ov16_0223E064 - ldr r1, _02268EF0 ; =0x00004FBB - add r2, r0, #0 - ldr r0, _02268EF4 ; =0x00004E43 - str r1, [sp] - str r0, [sp, #4] - sub r0, r1, #6 - str r0, [sp, #8] - sub r1, #0x11 - str r1, [sp, #0xc] - ldr r0, [sp, #0x18] - add r1, r7, #0 - mov r3, #5 - bl ov16_0226DB7C - ldr r0, _02268EF4 ; =0x00004E43 - ldr r3, _02268EF8 ; =0x00004FB5 - str r0, [sp] - add r0, r3, #0 - str r3, [sp, #4] - sub r0, #0xb - str r0, [sp, #8] - mov r2, #5 - str r2, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - add r1, r7, #0 - add r3, r3, #6 - bl ov16_0226DC24 - ldr r2, _02268EFC ; =0x000006D8 - ldr r1, [sp, #0x14] - str r0, [r1, r2] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268ECC: .word 0x000005D8 -_02268ED0: .word 0x00004E37 -_02268ED4: .word 0x00004E2F -_02268ED8: .word 0x00004E38 -_02268EDC: .word 0x00004E30 -_02268EE0: .word 0x02270414 -_02268EE4: .word 0x02270448 -_02268EE8: .word ov16_02268FCC -_02268EEC: .word 0x00000514 -_02268EF0: .word 0x00004FBB -_02268EF4: .word 0x00004E43 -_02268EF8: .word 0x00004FB5 -_02268EFC: .word 0x000006D8 - thumb_func_end ov16_02268D40 - - thumb_func_start ov16_02268F00 -ov16_02268F00: ; 0x02268F00 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _02268FAC ; =0x000005D8 - ldr r1, [r6, r0] - cmp r1, #0 - beq _02268F14 - add r0, #0x18 - ldr r0, [r6, r0] - cmp r0, #0 - bne _02268F18 -_02268F14: - bl sub_02022974 -_02268F18: - ldr r0, [r6, #0] - bl ov16_0223E010 - ldr r0, [r6, #0] - bl ov16_0223E018 - ldr r1, _02268FB0 ; =0x00004E37 - add r7, r0, #0 - bl sub_0200D070 - ldr r1, _02268FB4 ; =0x00004E2F - add r0, r7, #0 - bl sub_0200D090 - ldr r1, _02268FB4 ; =0x00004E2F - add r0, r7, #0 - bl sub_0200D0A0 - ldr r1, _02268FB8 ; =0x00004E38 - add r0, r7, #0 - bl sub_0200D070 - ldr r1, _02268FBC ; =0x00004E30 - add r0, r7, #0 - bl sub_0200D090 - ldr r1, _02268FBC ; =0x00004E30 - add r0, r7, #0 - bl sub_0200D0A0 - ldr r1, _02268FB0 ; =0x00004E37 - add r0, r7, #0 - bl sub_0200D080 - mov r4, #0 - add r5, r6, #0 -_02268F60: - ldr r0, _02268FAC ; =0x000005D8 - ldr r0, [r5, r0] - bl sub_0200D0F4 - ldr r0, _02268FAC ; =0x000005D8 - mov r1, #0 - str r1, [r5, r0] - add r0, #0x18 - ldr r0, [r5, r0] - bl sub_0200D0F4 - mov r0, #0x5f - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02268F60 - ldr r0, [r6, #8] - bl sub_0200DA58 - ldr r3, _02268FC0 ; =0x00004FAA - mov r0, #0 - str r0, [r6, #8] - add r1, r3, #0 - str r3, [sp] - ldr r2, _02268FC4 ; =0x00004E43 - add r0, r7, #0 - add r1, #0x11 - add r3, #0xb - bl ov16_0226DBFC - ldr r0, _02268FC8 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DCA8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268FAC: .word 0x000005D8 -_02268FB0: .word 0x00004E37 -_02268FB4: .word 0x00004E2F -_02268FB8: .word 0x00004E38 -_02268FBC: .word 0x00004E30 -_02268FC0: .word 0x00004FAA -_02268FC4: .word 0x00004E43 -_02268FC8: .word 0x000006D8 - thumb_func_end ov16_02268F00 - - thumb_func_start ov16_02268FCC -ov16_02268FCC: ; 0x02268FCC - push {r3, r4, r5, r6, r7, lr} - ldr r0, _02269140 ; =0x00000648 - add r5, r1, #0 - mov r7, #0 - add r4, r5, r0 - mov r6, #0xc -_02268FD8: - ldrb r0, [r4, #3] - cmp r0, #4 - bhi _02268FF4 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02268FEA: ; jump table - .short _02268FF4 - _02268FEA - 2 ; case 0 - .short _02269034 - _02268FEA - 2 ; case 1 - .short _02269046 - _02268FEA - 2 ; case 2 - .short _022690DE - _02268FEA - 2 ; case 3 - .short _02269046 - _02268FEA - 2 ; case 4 -_02268FF4: - ldr r0, _02269144 ; =0x000005D8 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl sub_0200D400 - cmp r0, #0 - beq _02269008 - ldrb r0, [r4, #2] - cmp r0, #0x57 - bhs _0226900A -_02269008: - b _0226912E -_0226900A: - mov r0, #0 - strb r0, [r4, #4] - mov r0, #0xa - strb r0, [r4, #5] - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r3, r0, #0x1d - ldrb r2, [r4, #5] - sub r3, r3, r1 - mov r0, #0x1d - ror r3, r0 - add r0, r1, r3 - add r0, r2, r0 - strb r0, [r4, #5] - mov r0, #2 - strb r0, [r4, #7] - ldrb r0, [r4, #3] - add r0, r0, #1 - strb r0, [r4, #3] - b _0226912E -_02269034: - ldrb r1, [r4, #5] - cmp r1, #0 - beq _02269040 - sub r0, r1, #1 - strb r0, [r4, #5] - b _0226912E -_02269040: - add r0, r0, #1 - strb r0, [r4, #3] - b _0226912E -_02269046: - ldr r0, _02269144 ; =0x000005D8 - mov r1, #2 - ldr r0, [r5, r0] - lsl r1, r1, #0xa - bl sub_0200D7C0 - mov r0, #0 - ldrsh r1, [r4, r0] - mov r0, #6 - lsl r0, r0, #6 - add r0, r1, r0 - strh r0, [r4] - mov r1, #0 - ldrsh r1, [r4, r1] - ldr r0, _02269144 ; =0x000005D8 - mov r3, #0x11 - asr r2, r1, #7 - lsr r2, r2, #0x18 - add r2, r1, r2 - asr r1, r2, #8 - add r1, r1, r6 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - mov r2, #0xd - lsl r3, r3, #0x10 - bl sub_0200D500 - ldrb r0, [r4, #6] - add r0, r0, #1 - strb r0, [r4, #6] - ldrb r1, [r4, #6] - ldrb r0, [r4, #7] - cmp r1, r0 - blo _0226912E - mov r0, #0 - strb r0, [r4, #6] - ldrb r0, [r4, #3] - cmp r0, #2 - bne _0226909C - add r0, r0, #1 - strb r0, [r4, #3] - b _0226912E -_0226909C: - ldr r0, _02269144 ; =0x000005D8 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200D79C - ldr r0, _02269144 ; =0x000005D8 - lsl r1, r6, #0x10 - mov r3, #0x11 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - mov r2, #0xd - lsl r3, r3, #0x10 - bl sub_0200D500 - mov r0, #0 - strh r0, [r4] - ldrb r0, [r4, #8] - cmp r0, #1 - bhs _022690D6 - add r0, r0, #1 - strb r0, [r4, #8] - ldrb r0, [r4, #7] - cmp r0, #1 - bls _022690D0 - sub r0, r0, #1 - strb r0, [r4, #7] -_022690D0: - mov r0, #2 - strb r0, [r4, #3] - b _0226912E -_022690D6: - mov r0, #0 - strb r0, [r4, #8] - strb r0, [r4, #3] - b _0226912E -_022690DE: - ldr r0, _02269144 ; =0x000005D8 - ldr r1, _02269148 ; =0xFFFFF800 - ldr r0, [r5, r0] - bl sub_0200D7C0 - mov r0, #0 - ldrsh r1, [r4, r0] - mov r0, #6 - lsl r0, r0, #6 - sub r0, r1, r0 - strh r0, [r4] - mov r1, #0 - ldrsh r1, [r4, r1] - ldr r0, _02269144 ; =0x000005D8 - mov r3, #0x11 - asr r2, r1, #7 - lsr r2, r2, #0x18 - add r2, r1, r2 - asr r1, r2, #8 - add r1, r1, r6 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - mov r2, #0xd - lsl r3, r3, #0x10 - bl sub_0200D500 - ldrb r0, [r4, #6] - add r0, r0, #1 - strb r0, [r4, #6] - ldrb r1, [r4, #7] - ldrb r0, [r4, #6] - lsl r1, r1, #1 - cmp r0, r1 - blt _0226912E - mov r0, #0 - strb r0, [r4, #6] - ldrb r0, [r4, #3] - add r0, r0, #1 - strb r0, [r4, #3] -_0226912E: - add r7, r7, #1 - add r4, #0xa - add r5, r5, #4 - add r6, #0x13 - cmp r7, #6 - bge _0226913C - b _02268FD8 -_0226913C: - pop {r3, r4, r5, r6, r7, pc} - nop -_02269140: .word 0x00000648 -_02269144: .word 0x000005D8 -_02269148: .word 0xFFFFF800 - thumb_func_end ov16_02268FCC - - thumb_func_start ov16_0226914C -ov16_0226914C: ; 0x0226914C - push {r3, r4} - ldr r2, _02269164 ; =0x0000064A - mov r4, #0 -_02269152: - ldrb r3, [r1, r4] - add r4, r4, #1 - strb r3, [r0, r2] - add r0, #0xa - cmp r4, #6 - blt _02269152 - pop {r3, r4} - bx lr - nop -_02269164: .word 0x0000064A - thumb_func_end ov16_0226914C - - thumb_func_start ov16_02269168 -ov16_02269168: ; 0x02269168 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - mov r4, #0 -_02269172: - ldrb r0, [r6, r4] - bl ov16_0226A934 - add r1, r0, #0 - ldr r0, _022691B8 ; =0x000005D8 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl sub_02021D6C - ldr r0, _022691B8 ; =0x000005D8 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl sub_0200D324 - ldrb r0, [r7, r4] - bl ov16_0226A934 - add r1, r0, #0 - mov r0, #0x5f - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl sub_02021D6C - mov r0, #0x5f - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl sub_0200D324 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02269172 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022691B8: .word 0x000005D8 - thumb_func_end ov16_02269168 - - thumb_func_start ov16_022691BC -ov16_022691BC: ; 0x022691BC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02269214 ; =0x000005D8 - ldr r1, [r5, r0] - cmp r1, #0 - beq _022691D0 - add r0, #0x18 - ldr r0, [r5, r0] - cmp r0, #0 - bne _022691D4 -_022691D0: - bl sub_02022974 -_022691D4: - ldr r7, _02269214 ; =0x000005D8 - mov r6, #0 - add r4, r5, #0 -_022691DA: - ldr r0, [r4, r7] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_0200D3EC - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #6 - blt _022691DA - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #1 - tst r0, r1 - beq _02269212 - mov r6, #0x5f - mov r4, #0 - add r7, r1, #0 - lsl r6, r6, #4 -_02269200: - ldr r0, [r5, r6] - add r1, r7, #0 - ldr r0, [r0, #0] - bl sub_0200D3EC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02269200 -_02269212: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269214: .word 0x000005D8 - thumb_func_end ov16_022691BC - - thumb_func_start ov16_02269218 -ov16_02269218: ; 0x02269218 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02269258 ; =0x000005D8 - ldr r1, [r5, r0] - cmp r1, #0 - beq _0226922C - add r0, #0x18 - ldr r0, [r5, r0] - cmp r0, #0 - bne _02269230 -_0226922C: - bl sub_02022974 -_02269230: - ldr r7, _02269258 ; =0x000005D8 - mov r4, #0 - add r6, r7, #0 - add r6, #0x18 -_02269238: - ldr r0, [r5, r7] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0200D3EC - ldr r0, [r5, r6] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0200D3EC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02269238 - pop {r3, r4, r5, r6, r7, pc} - nop -_02269258: .word 0x000005D8 - thumb_func_end ov16_02269218 - - thumb_func_start ov16_0226925C -ov16_0226925C: ; 0x0226925C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02269338 ; =0x0000068B - mov r6, #0 - ldrsb r1, [r5, r0] - sub r0, r6, #1 - cmp r1, r0 - bne _02269270 - bl sub_02022974 -_02269270: - ldr r0, _02269338 ; =0x0000068B - ldr r3, _0226933C ; =0x02270670 - ldrsb r2, [r5, r0] - mov r1, #0x30 - mul r1, r2 - add r4, r3, r1 - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _0226928A - add r0, r0, #3 - ldrb r0, [r5, r0] - cmp r0, #1 - bne _02269290 -_0226928A: - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02269290: - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _0226929A - bl sub_02022974 -_0226929A: - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #1 - lsl r1, r1, #0xa - tst r0, r1 - beq _022692B2 - add r0, r5, #0 - bl ov16_0226CD18 - add r7, r0, #0 - b _022692CC -_022692B2: - ldr r0, [r4, #0x14] - bl sub_02022664 - add r7, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r7, r0 - bne _022692CC - add r0, r5, #0 - bl ov16_0226BE48 - add r7, r0, #0 - add r6, r6, #1 -_022692CC: - mov r0, #0 - mvn r0, r0 - str r0, [sp] - cmp r7, r0 - bne _022692DA - mov r2, #0xff - b _022692E6 -_022692DA: - ldr r1, [r4, #0x18] - lsl r0, r7, #2 - ldr r0, [r1, r0] - str r0, [sp] - ldr r0, [r4, #0x1c] - ldrb r2, [r0, r7] -_022692E6: - ldr r3, [r4, #0x2c] - cmp r3, #0 - beq _02269332 - ldr r1, [sp] - add r0, r5, #0 - blx r3 - mov r1, #0 - mvn r1, r1 - str r0, [sp] - cmp r0, r1 - beq _02269332 - ldr r2, [r4, #0x24] - cmp r2, #0 - beq _02269308 - add r0, r5, #0 - add r1, r7, #0 - blx r2 -_02269308: - ldr r0, _02269340 ; =0x000006DC - mov r1, #0 - add r0, r5, r0 - mov r2, #4 - bl sub_020C4CF4 - ldr r0, _02269344 ; =0x000006D8 - ldr r0, [r5, r0] - bl ov16_0226DDE8 - cmp r6, #0 - ble _0226932A - mov r0, #0x6e - mov r1, #1 - lsl r0, r0, #4 - strb r1, [r5, r0] - b _02269332 -_0226932A: - mov r0, #0x6e - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r5, r0] -_02269332: - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - nop -_02269338: .word 0x0000068B -_0226933C: .word 0x02270670 -_02269340: .word 0x000006DC -_02269344: .word 0x000006D8 - thumb_func_end ov16_0226925C - - thumb_func_start ov16_02269348 -ov16_02269348: ; 0x02269348 - push {r3, lr} - ldr r1, [r0, #0xc] - cmp r1, #0 - bne _02269362 - ldr r1, [r0, #0x10] - cmp r1, #0 - bne _02269362 - bl ov16_0226BCD0 - cmp r0, #1 - bne _02269362 - mov r0, #1 - pop {r3, pc} -_02269362: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov16_02269348 - - thumb_func_start ov16_02269368 -ov16_02269368: ; 0x02269368 - push {r3, lr} - cmp r0, #0x40 - bgt _0226939E - bge _022693F4 - cmp r0, #0x10 - bgt _02269398 - bge _022693CC - cmp r0, #8 - bhi _02269404 - add r2, r0, r0 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_02269386: ; jump table - .short _022693C0 - _02269386 - 2 ; case 0 - .short _022693CC - _02269386 - 2 ; case 1 - .short _022693CC - _02269386 - 2 ; case 2 - .short _02269404 - _02269386 - 2 ; case 3 - .short _022693D8 - _02269386 - 2 ; case 4 - .short _02269404 - _02269386 - 2 ; case 5 - .short _02269404 - _02269386 - 2 ; case 6 - .short _02269404 - _02269386 - 2 ; case 7 - .short _022693DC - _02269386 - 2 ; case 8 -_02269398: - cmp r0, #0x20 - beq _022693FC - b _02269404 -_0226939E: - mov r2, #1 - lsl r2, r2, #8 - cmp r0, r2 - bgt _022693AE - bge _022693E8 - cmp r0, #0x80 - beq _022693D8 - b _02269404 -_022693AE: - lsl r1, r2, #1 - cmp r0, r1 - bgt _022693B8 - beq _022693F8 - b _02269404 -_022693B8: - lsl r1, r2, #2 - cmp r0, r1 - beq _02269400 - b _02269404 -_022693C0: - cmp r1, #4 - bne _022693C8 - mov r0, #9 - pop {r3, pc} -_022693C8: - mov r0, #8 - pop {r3, pc} -_022693CC: - cmp r1, #4 - bne _022693D4 - mov r0, #6 - pop {r3, pc} -_022693D4: - mov r0, #4 - pop {r3, pc} -_022693D8: - mov r0, #1 - pop {r3, pc} -_022693DC: - cmp r1, #4 - bne _022693E4 - mov r0, #7 - pop {r3, pc} -_022693E4: - mov r0, #2 - pop {r3, pc} -_022693E8: - cmp r1, #4 - bne _022693F0 - mov r0, #4 - pop {r3, pc} -_022693F0: - mov r0, #6 - pop {r3, pc} -_022693F4: - mov r0, #3 - pop {r3, pc} -_022693F8: - mov r0, #0xa - pop {r3, pc} -_022693FC: - mov r0, #5 - pop {r3, pc} -_02269400: - mov r0, #0xb - pop {r3, pc} -_02269404: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov16_02269368 - - thumb_func_start ov16_0226940C -ov16_0226940C: ; 0x0226940C - push {r4, r5} - ldr r1, _0226946C ; =0x04001000 - ldr r2, _02269470 ; =0xFFFF1FFF - ldr r3, [r1, #0] - add r5, r1, #0 - and r3, r2 - lsr r2, r1, #0xd - orr r2, r3 - str r2, [r1, #0] - add r5, #0x4a - ldrh r4, [r5] - mov r3, #0x3f - mov r2, #0x1f - bic r4, r3 - orr r2, r4 - mov r4, #0x20 - orr r2, r4 - strh r2, [r5] - add r1, #0x48 - ldrh r5, [r1] - mov r2, #0x1b - bic r5, r3 - orr r2, r5 - orr r2, r4 - strh r2, [r1] - ldr r1, _02269474 ; =0x000006CC - ldr r1, [r0, r1] - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 - mov r0, #0xff - sub r0, r0, r1 - bpl _02269452 - mov r0, #0 -_02269452: - lsl r1, r0, #8 - mov r0, #0xff - lsl r0, r0, #8 - and r1, r0 - mov r0, #0xff - orr r0, r1 - ldr r1, _02269478 ; =0x04001040 - strh r0, [r1] - mov r0, #0xc0 - strh r0, [r1, #4] - pop {r4, r5} - bx lr - nop -_0226946C: .word 0x04001000 -_02269470: .word 0xFFFF1FFF -_02269474: .word 0x000006CC -_02269478: .word 0x04001040 - thumb_func_end ov16_0226940C - - thumb_func_start ov16_0226947C -ov16_0226947C: ; 0x0226947C - push {r4, lr} - lsl r4, r2, #8 - ldr r2, _022694A0 ; =0x000006CC - add r3, r0, #0 - ldr r0, [r3, r2] - cmp r0, r4 - beq _0226949E - add r0, r2, #4 - str r1, [r3, r0] - add r2, #8 - str r4, [r3, r2] - mov r2, #0x4b - ldr r0, _022694A4 ; =ov16_022694A8 - add r1, r3, #0 - lsl r2, r2, #4 - bl sub_0200D9E8 -_0226949E: - pop {r4, pc} - ; .align 2, 0 -_022694A0: .word 0x000006CC -_022694A4: .word ov16_022694A8 - thumb_func_end ov16_0226947C - - thumb_func_start ov16_022694A8 -ov16_022694A8: ; 0x022694A8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - str r0, [sp] - ldr r0, [r5, #0] - mov r4, #0 - bl ov16_0223DF00 - add r7, r0, #0 - ldr r0, _0226953C ; =0x000006CC - add r1, r0, #4 - ldr r2, [r5, r0] - ldr r1, [r5, r1] - add r1, r2, r1 - str r1, [r5, r0] - add r1, r0, #4 - ldr r1, [r5, r1] - cmp r1, #0 - bgt _022694D8 - add r2, r0, #0 - add r2, #8 - ldr r2, [r5, r2] - ldr r0, [r5, r0] - cmp r0, r2 - ble _022694E8 -_022694D8: - cmp r1, #0 - ble _022694EE - ldr r0, _02269540 ; =0x000006D4 - ldr r2, [r5, r0] - sub r0, #8 - ldr r0, [r5, r0] - cmp r0, r2 - blt _022694EE -_022694E8: - ldr r0, _0226953C ; =0x000006CC - mov r4, #1 - str r2, [r5, r0] -_022694EE: - ldr r3, _0226953C ; =0x000006CC - add r0, r7, #0 - ldr r3, [r5, r3] - mov r1, #6 - asr r6, r3, #7 - lsr r6, r6, #0x18 - add r6, r3, r6 - mov r2, #0 - asr r3, r6, #8 - bl sub_02019184 - add r0, r5, #0 - bl ov16_0226940C - cmp r4, #1 - bne _02269538 - ldr r2, _02269544 ; =0x000002FF - add r0, r7, #0 - mov r1, #7 - bl sub_02019EE0 - mov r0, #7 - mov r1, #0 - bl sub_02019120 - mov r0, #7 - mov r1, #0 - bl sub_02019060 - ldr r2, _02269548 ; =0x04001000 - ldr r0, _0226954C ; =0xFFFF1FFF - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - ldr r0, [sp] - bl sub_0200DA58 -_02269538: - pop {r3, r4, r5, r6, r7, pc} - nop -_0226953C: .word 0x000006CC -_02269540: .word 0x000006D4 -_02269544: .word 0x000002FF -_02269548: .word 0x04001000 -_0226954C: .word 0xFFFF1FFF - thumb_func_end ov16_022694A8 - - thumb_func_start ov16_02269550 -ov16_02269550: ; 0x02269550 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - ldr r0, _02269624 ; =0x0000068E - mov r1, #1 - strb r1, [r5, r0] - ldr r1, _02269628 ; =0x0400104A - mov r4, #0x3f - ldrh r2, [r1] - mov r0, #0xf - mov r7, #0xc - bic r2, r4 - orr r0, r2 - mov r2, #0x20 - orr r0, r2 - strh r0, [r1] - sub r0, r1, #2 - ldrh r3, [r0] - bic r3, r4 - orr r3, r7 - orr r3, r2 - strh r3, [r0] - ldrh r4, [r0] - ldr r3, _0226962C ; =0xFFFFC0FF - lsl r2, r2, #8 - and r4, r3 - lsl r3, r7, #8 - orr r3, r4 - orr r2, r3 - strh r2, [r0] - add r2, r1, #0 - mov r0, #0xff - sub r2, #0xa - strh r0, [r2] - mov r3, #0x90 - sub r2, r1, #6 - strh r3, [r2] - add r2, r1, #0 - sub r2, #8 - strh r0, [r2] - sub r0, r1, #4 - ldr r2, _02269630 ; =0x000090C0 - sub r1, #0x4a - strh r2, [r0] - ldr r2, [r1, #0] - ldr r0, _02269634 ; =0xFFFF1FFF - and r2, r0 - lsl r0, r7, #0xb - orr r0, r2 - str r0, [r1, #0] - mov r0, #5 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r5, [r4, #0] - ldr r0, _02269638 ; =0xFFFF9C64 - strb r6, [r4, #0x12] - strh r0, [r4, #8] - mov r0, #0xfa - lsl r0, r0, #4 - strh r0, [r4, #0xa] - mov r0, #8 - ldrsh r1, [r4, r0] - ldr r0, _0226963C ; =0x0000639C - sub r0, r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - strh r0, [r4, #0xc] - mov r0, #0xa - ldrsh r1, [r4, r0] - mov r0, #0xfa - lsl r0, r0, #4 - sub r0, r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - strh r0, [r4, #0xe] - ldr r0, _02269640 ; =0x0000070E - bl sub_02005748 - ldr r0, _02269644 ; =ov16_0226B988 - ldr r2, _02269648 ; =0x000004BA - add r1, r4, #0 - bl sub_0200D9E8 - ldr r0, _0226964C ; =ov16_0226BB94 - add r1, r4, #0 - bl sub_020177BC - cmp r0, #1 - beq _02269616 - bl sub_02022974 -_02269616: - ldr r0, _02269650 ; =ov16_0226BA88 - add r1, r4, #0 - mov r2, #0xa - bl sub_0200DA04 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269624: .word 0x0000068E -_02269628: .word 0x0400104A -_0226962C: .word 0xFFFFC0FF -_02269630: .word 0x000090C0 -_02269634: .word 0xFFFF1FFF -_02269638: .word 0xFFFF9C64 -_0226963C: .word 0x0000639C -_02269640: .word 0x0000070E -_02269644: .word ov16_0226B988 -_02269648: .word 0x000004BA -_0226964C: .word ov16_0226BB94 -_02269650: .word ov16_0226BA88 - thumb_func_end ov16_02269550 - - thumb_func_start ov16_02269654 -ov16_02269654: ; 0x02269654 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r4, [r5, #0x1c] - bl ov16_02269668 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02269550 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02269654 - - thumb_func_start ov16_02269668 -ov16_02269668: ; 0x02269668 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - add r6, r5, #0 - add r6, #0x1c - ldrb r7, [r5, #0x1c] - ldrb r1, [r6, #8] - ldr r0, _02269864 ; =0x000006E1 - strb r1, [r5, r0] - ldr r0, [r5, #0] - bl ov16_0223E05C - add r4, r0, #0 - ldr r0, _02269868 ; =0x0000068A - strb r7, [r5, r0] - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #0x20 - tst r0, r1 - beq _022696B4 - ldr r1, _0226986C ; =0x000003A3 - add r0, r4, #0 - bl sub_0200B1EC - mov r1, #0xe9 - str r0, [sp, #0x24] - add r0, r4, #0 - lsl r1, r1, #2 - bl sub_0200B1EC - str r0, [sp, #0x20] - ldr r1, _02269870 ; =0x000003A5 - add r0, r4, #0 - bl sub_0200B1EC - str r0, [sp, #0x1c] - b _02269704 -_022696B4: - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #2 - lsl r1, r1, #8 - tst r0, r1 - beq _022696E4 - ldr r1, _02269874 ; =0x000004C7 - add r0, r4, #0 - bl sub_0200B1EC - mov r1, #0xe9 - str r0, [sp, #0x24] - add r0, r4, #0 - lsl r1, r1, #2 - bl sub_0200B1EC - str r0, [sp, #0x20] - ldr r1, _02269870 ; =0x000003A5 - add r0, r4, #0 - bl sub_0200B1EC - str r0, [sp, #0x1c] - b _02269704 -_022696E4: - mov r1, #0xe7 - add r0, r4, #0 - lsl r1, r1, #2 - bl sub_0200B1EC - str r0, [sp, #0x24] - ldr r1, _02269878 ; =0x0000039D - add r0, r4, #0 - bl sub_0200B1EC - str r0, [sp, #0x20] - ldr r1, _0226987C ; =0x0000039E - add r0, r4, #0 - bl sub_0200B1EC - str r0, [sp, #0x1c] -_02269704: - ldr r0, _02269864 ; =0x000006E1 - ldrb r0, [r5, r0] - cmp r0, #1 - bne _0226971C - mov r1, #0x3a - add r0, r4, #0 - lsl r1, r1, #4 - bl sub_0200B1EC - add r4, r0, #0 - mov r1, #1 - b _02269728 -_0226971C: - ldr r1, _02269880 ; =0x0000039F - add r0, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r1, #0 -_02269728: - ldr r0, _02269884 ; =0x0000068F - mov r3, #2 - strb r1, [r5, r0] - ldr r0, _02269888 ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - ldr r0, _0226988C ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x54 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - lsl r1, r1, #4 - str r0, [sp, #0x18] - ldr r2, [sp, #0x24] - add r0, r5, #0 - add r1, r5, r1 - bl ov16_0226A98C - ldr r0, _02269890 ; =0x00040506 - ldr r1, _02269894 ; =0x000004E4 - str r0, [sp] - mov r3, #2 - ldr r0, _0226988C ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x28 - str r0, [sp, #0xc] - mov r0, #0xaa - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - ldr r2, [sp, #0x20] - add r0, r5, #0 - add r1, r5, r1 - bl ov16_0226A98C - ldr r0, _02269898 ; =0x00070809 - ldr r1, _0226989C ; =0x000004F8 - str r0, [sp] - mov r3, #2 - ldr r0, _0226988C ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0xd8 - str r0, [sp, #0xc] - mov r0, #0xaa - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r0, r5, #0 - add r1, r5, r1 - bl ov16_0226A98C - ldr r0, _022698A0 ; =0x000A0B0C - ldr r1, _022698A4 ; =0x0000050C - str r0, [sp] - mov r3, #2 - ldr r0, _0226988C ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0xb2 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r4, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x24] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #0x22 - lsl r1, r1, #4 - tst r0, r1 - bne _02269860 - ldrb r1, [r6, #1] - ldrb r2, [r6, #2] - ldr r0, [r5, #0] - bl ov16_0223DFAC - add r4, r0, #0 - add r0, r5, #0 - bl ov16_0226A698 - ldrh r0, [r6, #6] - mov r3, #4 - add r1, r4, #0 - str r0, [sp] - ldrb r0, [r6, #3] - add r2, r7, #0 - str r0, [sp, #4] - ldrsh r3, [r6, r3] - add r0, r5, #0 - bl ov16_0226A7A4 - add r4, r0, #0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - cmp r7, #4 - bne _02269840 - mov r0, #0x4e - lsl r0, r0, #4 - ldrh r0, [r5, r0] - ldr r1, [sp, #0x2c] - add r0, #0x10 - add r0, r1, r0 - str r0, [sp, #0x2c] - b _02269846 -_02269840: - ldr r0, [sp, #0x2c] - sub r0, #0x10 - str r0, [sp, #0x2c] -_02269846: - mov r3, #0x11 - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x28] - lsl r3, r3, #4 - sub r2, r2, r3 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, r4, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0xc - bl sub_0200D500 -_02269860: - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269864: .word 0x000006E1 -_02269868: .word 0x0000068A -_0226986C: .word 0x000003A3 -_02269870: .word 0x000003A5 -_02269874: .word 0x000004C7 -_02269878: .word 0x0000039D -_0226987C: .word 0x0000039E -_02269880: .word 0x0000039F -_02269884: .word 0x0000068F -_02269888: .word 0x00010203 -_0226988C: .word 0x00004E37 -_02269890: .word 0x00040506 -_02269894: .word 0x000004E4 -_02269898: .word 0x00070809 -_0226989C: .word 0x000004F8 -_022698A0: .word 0x000A0B0C -_022698A4: .word 0x0000050C - thumb_func_end ov16_02269668 - - thumb_func_start ov16_022698A8 -ov16_022698A8: ; 0x022698A8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r4, [r5, #0x1c] - bl ov16_022698BC - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02269550 - pop {r3, r4, r5, pc} - thumb_func_end ov16_022698A8 - - thumb_func_start ov16_022698BC -ov16_022698BC: ; 0x022698BC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - bl ov16_02269668 - ldr r0, [r5, #0] - bl ov16_0223DF00 - mov r1, #0x10 - str r1, [sp] - mov r1, #0x20 - str r1, [sp, #4] - mov r1, #8 - str r1, [sp, #8] - mov r1, #0x11 - str r1, [sp, #0xc] - ldr r2, _02269914 ; =0x000002FF - add r4, r0, #0 - mov r1, #4 - mov r3, #0 - bl sub_02019CB8 - add r0, r4, #0 - mov r1, #5 - bl sub_0201C3C0 - ldr r0, _02269918 ; =0x000004E4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _0226991C ; =0x000004F8 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02269920 ; =0x0000050C - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02269914: .word 0x000002FF -_02269918: .word 0x000004E4 -_0226991C: .word 0x000004F8 -_02269920: .word 0x0000050C - thumb_func_end ov16_022698BC - - thumb_func_start ov16_02269924 -ov16_02269924: ; 0x02269924 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r4, [r5, #0x1c] - bl ov16_02269938 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_02269550 - pop {r3, r4, r5, pc} - thumb_func_end ov16_02269924 - - thumb_func_start ov16_02269938 -ov16_02269938: ; 0x02269938 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - bl ov16_02269668 - ldr r0, [r5, #0] - bl ov16_0223DF00 - mov r1, #0x10 - str r1, [sp] - mov r1, #0xa - str r1, [sp, #4] - mov r1, #8 - str r1, [sp, #8] - mov r1, #0x11 - str r1, [sp, #0xc] - ldr r2, _022699A0 ; =0x000002FF - mov r1, #4 - mov r3, #0 - add r4, r0, #0 - bl sub_02019CB8 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r2, _022699A0 ; =0x000002FF - add r0, r4, #0 - mov r1, #4 - mov r3, #0x16 - bl sub_02019CB8 - add r0, r4, #0 - mov r1, #5 - bl sub_0201C3C0 - ldr r0, _022699A4 ; =0x000004E4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _022699A8 ; =0x000004F8 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022699A0: .word 0x000002FF -_022699A4: .word 0x000004E4 -_022699A8: .word 0x000004F8 - thumb_func_end ov16_02269938 - - thumb_func_start ov16_022699AC -ov16_022699AC: ; 0x022699AC - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r6, r5, #0 - add r6, #0x1c - bne _022699BC - bl sub_02022974 -_022699BC: - ldrb r1, [r6, #0x10] - ldr r0, _02269C3C ; =0x0000068A - strb r1, [r5, r0] - ldr r0, [r5, #0] - bl ov16_0223E05C - str r0, [sp, #0x1c] - ldrb r1, [r6, #0x10] - add r0, r5, #0 - bl ov16_0226ABD4 - str r0, [sp, #0x20] - add r0, r5, #0 - bl ov16_0226AF0C - ldr r0, _02269C40 ; =0x00070809 - mov r1, #0x4d - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, _02269C44 ; =0x00004E37 - lsl r1, r1, #4 - str r0, [sp, #8] - mov r0, #0x40 - str r0, [sp, #0xc] - mov r0, #0x2e - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - add r1, r5, r1 - add r0, #0x28 - str r0, [sp, #0x18] - add r0, r5, #0 - mov r2, #0 - mov r3, #2 - bl ov16_0226A98C - ldr r0, _02269C40 ; =0x00070809 - ldr r1, _02269C48 ; =0x000004E4 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, _02269C44 ; =0x00004E37 - add r1, r5, r1 - str r0, [sp, #8] - mov r0, #0xc0 - str r0, [sp, #0xc] - mov r0, #0x2e - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - mov r2, #0 - add r0, #0x3c - str r0, [sp, #0x18] - add r0, r5, #0 - mov r3, #2 - bl ov16_0226A98C - ldr r0, _02269C40 ; =0x00070809 - ldr r1, _02269C4C ; =0x000004F8 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, _02269C44 ; =0x00004E37 - add r1, r5, r1 - str r0, [sp, #8] - mov r0, #0x40 - str r0, [sp, #0xc] - mov r0, #0x6e - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - mov r2, #0 - add r0, #0x50 - str r0, [sp, #0x18] - add r0, r5, #0 - mov r3, #2 - bl ov16_0226A98C - ldr r0, _02269C40 ; =0x00070809 - ldr r1, _02269C50 ; =0x0000050C - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, _02269C44 ; =0x00004E37 - add r1, r5, r1 - str r0, [sp, #8] - mov r0, #0xc0 - str r0, [sp, #0xc] - mov r0, #0x6e - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - mov r2, #0 - add r0, #0x64 - str r0, [sp, #0x18] - add r0, r5, #0 - mov r3, #2 - bl ov16_0226A98C - ldr r0, [sp, #0x20] - mov r4, #0 - str r0, [sp, #0x28] - add r0, #0x78 - str r0, [sp, #0x28] - mov r0, #0x4d - lsl r0, r0, #4 - add r7, r5, r0 - ldr r0, [sp, #0x20] - add r0, #0xc8 - str r0, [sp, #0x20] - b _02269B2E -_02269AA4: - add r1, r6, r4 - ldrb r0, [r1, #8] - ldrb r1, [r1, #0xc] - bl ov16_0226B924 - str r0, [sp, #0x24] - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _02269C44 ; =0x00004E37 - ldr r1, _02269C54 ; =0x022702D4 - str r0, [sp, #8] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - add r2, r4, #0 - add r2, #9 - str r1, [sp, #0xc] - ldr r1, _02269C54 ; =0x022702D4 - add r0, r1, r0 - ldrh r0, [r0, #2] - add r1, r4, #0 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x14 - mul r1, r0 - ldr r0, [sp, #0x28] - add r0, r0, r1 - mov r1, #0x14 - mul r1, r2 - mov r2, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r7, r1 - add r3, r2, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x24] - ldr r1, _02269C58 ; =0x02270284 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _02269C44 ; =0x00004E37 - add r2, r4, #5 - str r0, [sp, #8] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - str r1, [sp, #0xc] - ldr r1, _02269C58 ; =0x02270284 - add r0, r1, r0 - ldrh r0, [r0, #2] - add r1, r4, #0 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x14 - mul r1, r0 - ldr r0, [sp, #0x20] - add r0, r0, r1 - mov r1, #0x14 - mul r1, r2 - mov r2, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r7, r1 - add r3, r2, #0 - bl ov16_0226A98C - add r4, r4, #1 -_02269B2E: - cmp r4, #4 - blt _02269AA4 - ldr r0, [sp, #0x1c] - ldr r1, _02269C5C ; =0x000003A1 - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, _02269C60 ; =0x000A0B0C - mov r1, #0x52 - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _02269C44 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0xb2 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r4, #0 - bl ov16_0226A98C - add r0, r4, #0 - bl sub_020237BC - mov r4, #0 - mov r7, #3 - b _02269B98 -_02269B72: - lsl r0, r4, #1 - ldrh r0, [r6, r0] - cmp r0, #0 - beq _02269B8C - add r1, r7, #0 - bl sub_020790C4 - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov16_0226B06C - b _02269B96 -_02269B8C: - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0226B088 - b _02269B9C -_02269B96: - add r4, r4, #1 -_02269B98: - cmp r4, #4 - blt _02269B72 -_02269B9C: - ldr r0, [r5, #0] - bl ov16_0223DF00 - ldrh r0, [r6] - cmp r0, #0 - bne _02269BC8 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_020129D0 - ldr r0, _02269C64 ; =0x00000534 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02269C68 ; =0x00000584 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 -_02269BC8: - ldrh r0, [r6, #2] - cmp r0, #0 - bne _02269BEC - ldr r0, _02269C48 ; =0x000004E4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02269C6C ; =0x00000548 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02269C70 ; =0x00000598 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 -_02269BEC: - ldrh r0, [r6, #4] - cmp r0, #0 - bne _02269C10 - ldr r0, _02269C4C ; =0x000004F8 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02269C74 ; =0x0000055C - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02269C78 ; =0x000005AC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 -_02269C10: - ldrh r0, [r6, #6] - cmp r0, #0 - bne _02269C38 - ldr r0, _02269C50 ; =0x0000050C - mov r1, #0 - ldr r0, [r5, r0] - bl sub_020129D0 - mov r0, #0x57 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_020129D0 - mov r0, #0x17 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_020129D0 -_02269C38: - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269C3C: .word 0x0000068A -_02269C40: .word 0x00070809 -_02269C44: .word 0x00004E37 -_02269C48: .word 0x000004E4 -_02269C4C: .word 0x000004F8 -_02269C50: .word 0x0000050C -_02269C54: .word 0x022702D4 -_02269C58: .word 0x02270284 -_02269C5C: .word 0x000003A1 -_02269C60: .word 0x000A0B0C -_02269C64: .word 0x00000534 -_02269C68: .word 0x00000584 -_02269C6C: .word 0x00000548 -_02269C70: .word 0x00000598 -_02269C74: .word 0x0000055C -_02269C78: .word 0x000005AC - thumb_func_end ov16_022699AC - - thumb_func_start ov16_02269C7C -ov16_02269C7C: ; 0x02269C7C - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E05C - mov r1, #0xeb - lsl r1, r1, #2 - add r6, r0, #0 - bl sub_0200B1EC - add r4, r0, #0 - ldr r1, _02269D00 ; =0x000003AD - add r0, r6, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, _02269D04 ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _02269D08 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x44 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r4, #0 - bl ov16_0226A98C - ldr r0, _02269D0C ; =0x000A0B0C - ldr r1, _02269D10 ; =0x000004E4 - str r0, [sp] - mov r3, #2 - ldr r0, _02269D08 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x8c - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r6, #0 - bl ov16_0226A98C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02269D00: .word 0x000003AD -_02269D04: .word 0x00010203 -_02269D08: .word 0x00004E37 -_02269D0C: .word 0x000A0B0C -_02269D10: .word 0x000004E4 - thumb_func_end ov16_02269C7C - - thumb_func_start ov16_02269D14 -ov16_02269D14: ; 0x02269D14 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E05C - ldr r1, _02269D98 ; =0x0000049D - add r6, r0, #0 - bl sub_0200B1EC - add r4, r0, #0 - ldr r1, _02269D9C ; =0x0000049E - add r0, r6, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, _02269DA0 ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _02269DA4 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x44 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r4, #0 - bl ov16_0226A98C - ldr r0, _02269DA8 ; =0x000A0B0C - ldr r1, _02269DAC ; =0x000004E4 - str r0, [sp] - mov r3, #2 - ldr r0, _02269DA4 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x8c - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r6, #0 - bl ov16_0226A98C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - nop -_02269D98: .word 0x0000049D -_02269D9C: .word 0x0000049E -_02269DA0: .word 0x00010203 -_02269DA4: .word 0x00004E37 -_02269DA8: .word 0x000A0B0C -_02269DAC: .word 0x000004E4 - thumb_func_end ov16_02269D14 - - thumb_func_start ov16_02269DB0 -ov16_02269DB0: ; 0x02269DB0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E05C - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E0D0 - add r4, r0, #0 - ldr r1, _02269E7C ; =0x000004A2 - add r0, r6, #0 - bl sub_0200B1EC - str r0, [sp, #0x1c] - ldr r1, _02269E80 ; =0x000004A3 - add r0, r6, #0 - bl sub_0200B1EC - str r0, [sp, #0x20] - mov r0, #0x64 - mov r1, #5 - bl sub_02023790 - add r6, r0, #0 - mov r0, #0x64 - mov r1, #5 - bl sub_02023790 - add r7, r0, #0 - ldrh r2, [r5, #0x1c] - add r0, r4, #0 - mov r1, #0 - bl sub_0200B630 - ldr r2, [sp, #0x1c] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - ldr r2, [sp, #0x20] - add r0, r4, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, _02269E84 ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _02269E88 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x44 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r6, #0 - bl ov16_0226A98C - ldr r0, _02269E8C ; =0x000A0B0C - ldr r1, _02269E90 ; =0x000004E4 - str r0, [sp] - mov r3, #2 - ldr r0, _02269E88 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x8c - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r7, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02269E7C: .word 0x000004A2 -_02269E80: .word 0x000004A3 -_02269E84: .word 0x00010203 -_02269E88: .word 0x00004E37 -_02269E8C: .word 0x000A0B0C -_02269E90: .word 0x000004E4 - thumb_func_end ov16_02269DB0 - - thumb_func_start ov16_02269E94 -ov16_02269E94: ; 0x02269E94 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02269F58 ; =0x04001050 - mov r1, #2 - mov r2, #0xf - mov r3, #0x1f - bl sub_020BF55C - ldr r0, [r5, #0] - bl ov16_0223E05C - ldr r1, _02269F5C ; =0x000004EC - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #5 - str r0, [sp] - mov r0, #7 - mov r1, #0x2e - mov r2, #1 - add r3, sp, #0x1c - bl sub_02006F6C - add r6, r0, #0 - ldr r0, [sp, #0x1c] - mov r2, #2 - ldr r1, [r5, #0x58] - add r0, #0xc - lsl r2, r2, #0xa - bl sub_020C4B68 - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - bl ov16_0223DF00 - mov r1, #4 - ldr r2, [r5, #0x58] - add r6, r0, #0 - lsl r3, r1, #9 - bl sub_02019574 - add r0, r6, #0 - mov r1, #4 - bl sub_0201C3C0 - ldr r0, [r5, #0] - bl ov16_0223DF00 - mov r2, #2 - add r6, r0, #0 - ldr r1, [r5, #0x50] - mov r0, #0 - lsl r2, r2, #0xa - bl sub_020C4B4C - mov r3, #2 - ldr r2, [r5, #0x50] - add r0, r6, #0 - mov r1, #5 - lsl r3, r3, #0xa - bl sub_02019574 - add r0, r6, #0 - mov r1, #5 - bl sub_0201C3C0 - ldr r0, _02269F60 ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _02269F64 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0xb2 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r4, #0 - bl ov16_0226A98C - add r0, r4, #0 - bl sub_020237BC - add sp, #0x20 - pop {r4, r5, r6, pc} - nop -_02269F58: .word 0x04001050 -_02269F5C: .word 0x000004EC -_02269F60: .word 0x00010203 -_02269F64: .word 0x00004E37 - thumb_func_end ov16_02269E94 - - thumb_func_start ov16_02269F68 -ov16_02269F68: ; 0x02269F68 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E05C - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E0D0 - add r4, r0, #0 - ldr r1, _0226A034 ; =0x000004C1 - add r0, r6, #0 - bl sub_0200B1EC - str r0, [sp, #0x1c] - ldr r1, _0226A038 ; =0x000004C2 - add r0, r6, #0 - bl sub_0200B1EC - str r0, [sp, #0x20] - mov r0, #0x64 - mov r1, #5 - bl sub_02023790 - add r6, r0, #0 - mov r0, #0x64 - mov r1, #5 - bl sub_02023790 - add r7, r0, #0 - ldrh r2, [r5, #0x1c] - add r0, r4, #0 - mov r1, #0 - bl sub_0200B630 - ldr r2, [sp, #0x1c] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - ldr r2, [sp, #0x20] - add r0, r4, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, _0226A03C ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _0226A040 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x44 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r6, #0 - bl ov16_0226A98C - ldr r0, _0226A044 ; =0x000A0B0C - ldr r1, _0226A048 ; =0x000004E4 - str r0, [sp] - mov r3, #2 - ldr r0, _0226A040 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x8c - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r7, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_0226A034: .word 0x000004C1 -_0226A038: .word 0x000004C2 -_0226A03C: .word 0x00010203 -_0226A040: .word 0x00004E37 -_0226A044: .word 0x000A0B0C -_0226A048: .word 0x000004E4 - thumb_func_end ov16_02269F68 - - thumb_func_start ov16_0226A04C -ov16_0226A04C: ; 0x0226A04C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E05C - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E0D0 - add r4, r0, #0 - ldr r1, _0226A118 ; =0x000004BF - add r0, r6, #0 - bl sub_0200B1EC - mov r1, #0x13 - str r0, [sp, #0x1c] - add r0, r6, #0 - lsl r1, r1, #6 - bl sub_0200B1EC - str r0, [sp, #0x20] - mov r0, #0x64 - mov r1, #5 - bl sub_02023790 - add r6, r0, #0 - mov r0, #0x64 - mov r1, #5 - bl sub_02023790 - add r7, r0, #0 - ldrh r2, [r5, #0x1c] - add r0, r4, #0 - mov r1, #0 - bl sub_0200B630 - ldr r2, [sp, #0x1c] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - ldr r2, [sp, #0x20] - add r0, r4, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, _0226A11C ; =0x00010203 - mov r1, #0x4d - str r0, [sp] - mov r3, #2 - lsl r1, r1, #4 - ldr r0, _0226A120 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x44 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r6, #0 - bl ov16_0226A98C - ldr r0, _0226A124 ; =0x000A0B0C - ldr r1, _0226A128 ; =0x000004E4 - str r0, [sp] - mov r3, #2 - ldr r0, _0226A120 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x8c - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - add r2, r7, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A118: .word 0x000004BF -_0226A11C: .word 0x00010203 -_0226A120: .word 0x00004E37 -_0226A124: .word 0x000A0B0C -_0226A128: .word 0x000004E4 - thumb_func_end ov16_0226A04C - - thumb_func_start ov16_0226A12C -ov16_0226A12C: ; 0x0226A12C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r0, #0 - add r7, r5, #0 - add r7, #0x1c - add r0, r7, #0 - add r0, #0x21 - ldrb r1, [r0] - ldr r0, _0226A2F0 ; =0x0000068C - strb r1, [r5, r0] - add r1, r7, #0 - add r1, #0x20 - ldrb r1, [r1] - sub r0, r0, #2 - strb r1, [r5, r0] - ldr r0, [r5, #0] - bl ov16_0223E05C - str r0, [sp, #0x2c] - ldr r0, [r5, #0] - bl ov16_0223E0D0 - str r0, [sp, #0x1c] - add r0, r5, #0 - add r1, sp, #0x40 - mov r2, #0 - bl ov16_0226B20C - add r0, r5, #0 - bl ov16_0226A698 - add r0, r5, #0 - bl ov16_0226AAF8 - add r1, sp, #0x38 - ldr r0, [r5, #0] - add r1, #2 - bl ov16_0223F87C - ldr r0, [r5, #0] - add r1, sp, #0x34 - bl ov16_0223F858 - mov r0, #0x18 - mov r1, #5 - bl sub_02023790 - str r0, [sp, #0x28] - mov r0, #0x4d - lsl r0, r0, #4 - add r0, r5, r0 - mov r4, #0 - str r0, [sp, #0x30] - b _0226A2A4 -_0226A198: - add r1, r4, #2 - add r0, sp, #0x34 - ldrb r6, [r0, r1] - lsl r0, r6, #3 - add r0, r7, r0 - ldrb r1, [r0, #1] - lsl r0, r1, #0x1d - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0226A292 - add r0, sp, #0x40 - ldrb r0, [r0, r4] - cmp r0, #1 - bne _0226A292 - lsl r0, r1, #0x1e - lsr r0, r0, #0x1e - bne _0226A1C6 - ldr r0, [sp, #0x2c] - ldr r1, _0226A2F4 ; =0x000003C2 - bl sub_0200B1EC - str r0, [sp, #0x24] - b _0226A1E2 -_0226A1C6: - cmp r0, #1 - bne _0226A1D6 - ldr r0, [sp, #0x2c] - ldr r1, _0226A2F8 ; =0x000003C3 - bl sub_0200B1EC - str r0, [sp, #0x24] - b _0226A1E2 -_0226A1D6: - mov r1, #0xf1 - ldr r0, [sp, #0x2c] - lsl r1, r1, #2 - bl sub_0200B1EC - str r0, [sp, #0x24] -_0226A1E2: - lsl r2, r6, #3 - ldrb r2, [r7, r2] - ldr r0, [r5, #0] - add r1, r6, #0 - bl ov16_0223DFAC - str r0, [sp, #0x20] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [sp, #0x1c] - mov r1, #0 - bl sub_0200B5CC - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x24] - bl sub_0200C388 - mov r0, #1 - tst r0, r4 - beq _0226A212 - ldr r0, _0226A2FC ; =0x00010203 - b _0226A214 -_0226A212: - ldr r0, _0226A300 ; =0x00040506 -_0226A214: - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - ldr r0, _0226A304 ; =0x00004E37 - ldr r1, _0226A308 ; =0x02270328 - str r0, [sp, #8] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - add r2, r4, #0 - mov r3, #2 - str r1, [sp, #0xc] - ldr r1, _0226A308 ; =0x02270328 - add r0, r1, r0 - ldrh r0, [r0, #2] - mov r1, #0x14 - mul r2, r1 - ldr r1, [sp, #0x30] - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - add r1, r1, r2 - str r0, [sp, #0x18] - ldr r2, [sp, #0x28] - add r0, r5, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x24] - bl sub_020237BC - cmp r4, #1 - beq _0226A25A - cmp r4, #3 - beq _0226A276 - b _0226A2A2 -_0226A25A: - lsl r0, r6, #3 - add r6, r7, r0 - ldrh r0, [r6, #6] - mov r3, #4 - ldr r1, [sp, #0x20] - str r0, [sp] - ldrb r0, [r6, #2] - mov r2, #3 - str r0, [sp, #4] - ldrsh r3, [r6, r3] - add r0, r5, #0 - bl ov16_0226A7A4 - b _0226A2A2 -_0226A276: - lsl r0, r6, #3 - add r6, r7, r0 - ldrh r0, [r6, #6] - mov r3, #4 - ldr r1, [sp, #0x20] - str r0, [sp] - ldrb r0, [r6, #2] - mov r2, #5 - str r0, [sp, #4] - ldrsh r3, [r6, r3] - add r0, r5, #0 - bl ov16_0226A7A4 - b _0226A2A2 -_0226A292: - add r0, sp, #0x40 - ldrb r0, [r0, r4] - cmp r0, #0 - bne _0226A2A2 - add r0, r5, #0 - add r1, r4, #0 - bl ov16_0226B0DC -_0226A2A2: - add r4, r4, #1 -_0226A2A4: - cmp r4, #4 - bge _0226A2AA - b _0226A198 -_0226A2AA: - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x2c] - ldr r1, _0226A30C ; =0x000003A2 - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, _0226A310 ; =0x000A0B0C - mov r3, #2 - str r0, [sp] - ldr r0, _0226A304 ; =0x00004E37 - str r3, [sp, #4] - str r0, [sp, #8] - ldr r0, _0226A314 ; =0x02270308 - add r2, r4, #0 - ldrh r1, [r0, #0x30] - str r1, [sp, #0xc] - ldrh r0, [r0, #0x32] - mov r1, #0x52 - lsl r1, r1, #4 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r5, r1 - bl ov16_0226A98C - add r0, r4, #0 - bl sub_020237BC - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A2F0: .word 0x0000068C -_0226A2F4: .word 0x000003C2 -_0226A2F8: .word 0x000003C3 -_0226A2FC: .word 0x00010203 -_0226A300: .word 0x00040506 -_0226A304: .word 0x00004E37 -_0226A308: .word 0x02270328 -_0226A30C: .word 0x000003A2 -_0226A310: .word 0x000A0B0C -_0226A314: .word 0x02270308 - thumb_func_end ov16_0226A12C - - thumb_func_start ov16_0226A318 -ov16_0226A318: ; 0x0226A318 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - mov r0, #0xff - add r5, r1, #0 - str r0, [sp] - add r0, r5, #1 - cmp r0, #5 - bhi _0226A340 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226A334: ; jump table - .short _0226A340 - _0226A334 - 2 ; case 0 - .short _0226A340 - _0226A334 - 2 ; case 1 - .short _0226A344 - _0226A334 - 2 ; case 2 - .short _0226A368 - _0226A334 - 2 ; case 3 - .short _0226A36E - _0226A334 - 2 ; case 4 - .short _0226A374 - _0226A334 - 2 ; case 5 -_0226A340: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226A344: - ldr r0, _0226A3E0 ; =0x0000068A - mov r7, #0 - ldrb r0, [r4, r0] - add r6, r7, #0 - cmp r0, #0 - beq _0226A35A - cmp r0, #2 - beq _0226A35E - cmp r0, #4 - beq _0226A35E - b _0226A378 -_0226A35A: - str r0, [sp] - b _0226A378 -_0226A35E: - ldr r0, _0226A3E0 ; =0x0000068A - ldrb r0, [r4, r0] - sub r0, r0, #2 - str r0, [sp] - b _0226A378 -_0226A368: - mov r7, #1 - add r6, r7, #0 - b _0226A378 -_0226A36E: - mov r7, #2 - mov r6, #1 - b _0226A378 -_0226A374: - mov r7, #3 - mov r6, #1 -_0226A378: - add r0, r4, #0 - add r1, r2, #0 - bl ov16_0226B318 - ldr r0, _0226A3E4 ; =ov16_0226B390 - add r1, r4, #0 - bl ov16_0226B2BC - ldr r0, _0226A3E8 ; =0x022703A4 - sub r2, r5, #1 - mov r1, #6 - mul r1, r2 - add r0, r0, r1 - mov r1, #0x6a - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, _0226A3EC ; =0x022702F4 - lsl r2, r2, #2 - add r3, r0, r2 - add r0, r1, #4 - str r3, [r4, r0] - add r0, r1, #0 - mov r3, #1 - add r0, #0xc - strb r3, [r4, r0] - add r0, r1, #0 - add r0, #8 - str r5, [r4, r0] - add r0, r1, #0 - add r0, #0xd - strb r7, [r4, r0] - add r0, r1, #0 - ldr r7, [sp] - add r0, #0xe - strb r7, [r4, r0] - add r0, r1, #0 - add r0, #0xf - strb r6, [r4, r0] - ldr r0, _0226A3F0 ; =0x02270294 - add r6, r0, r2 - ldrh r2, [r0, r2] - add r0, r1, #0 - add r0, #0x12 - strh r2, [r4, r0] - add r0, r1, #0 - ldrh r2, [r6, #2] - add r0, #0x14 - add r1, #0x10 - strh r2, [r4, r0] - strb r3, [r4, r1] - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A3E0: .word 0x0000068A -_0226A3E4: .word ov16_0226B390 -_0226A3E8: .word 0x022703A4 -_0226A3EC: .word 0x022702F4 -_0226A3F0: .word 0x02270294 - thumb_func_end ov16_0226A318 - - thumb_func_start ov16_0226A3F4 -ov16_0226A3F4: ; 0x0226A3F4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0 - add r4, r1, #0 - mvn r0, r0 - add r1, r2, #0 - cmp r4, r0 - bne _0226A408 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226A408: - add r2, r5, #0 - add r2, #0x1c - cmp r4, #1 - blt _0226A41E - cmp r4, #4 - bgt _0226A41E - sub r3, r4, #1 - lsl r3, r3, #1 - ldrh r2, [r2, r3] - cmp r2, #0 - beq _0226A48C -_0226A41E: - sub r0, r4, #1 - cmp r4, #4 - bgt _0226A440 - add r2, r4, #1 - bmi _0226A444 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0226A434: ; jump table - .short _0226A444 - _0226A434 - 2 ; case 0 - .short _0226A444 - _0226A434 - 2 ; case 1 - .short _0226A44A - _0226A434 - 2 ; case 2 - .short _0226A44A - _0226A434 - 2 ; case 3 - .short _0226A44A - _0226A434 - 2 ; case 4 - .short _0226A44A - _0226A434 - 2 ; case 5 -_0226A440: - cmp r4, #0xff - beq _0226A45A -_0226A444: - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0226A44A: - mov r2, #6 - mul r2, r0 - ldr r3, _0226A490 ; =0x022703F4 - lsl r0, r0, #2 - add r7, r3, r2 - ldr r2, _0226A494 ; =0x02270378 - add r6, r2, r0 - b _0226A45E -_0226A45A: - ldr r7, _0226A498 ; =0x0227040C - ldr r6, _0226A49C ; =0x02270388 -_0226A45E: - add r0, r5, #0 - bl ov16_0226B318 - ldr r0, _0226A4A0 ; =ov16_0226B4E0 - add r1, r5, #0 - bl ov16_0226B2BC - mov r1, #0x6a - lsl r1, r1, #4 - str r7, [r5, r1] - add r0, r1, #4 - str r6, [r5, r0] - add r0, r1, #0 - mov r2, #3 - add r0, #0xc - strb r2, [r5, r0] - add r0, r1, #0 - add r0, #8 - str r4, [r5, r0] - mov r0, #1 - add r1, #0x10 - strb r0, [r5, r1] - add r0, r4, #0 -_0226A48C: - pop {r3, r4, r5, r6, r7, pc} - nop -_0226A490: .word 0x022703F4 -_0226A494: .word 0x02270378 -_0226A498: .word 0x0227040C -_0226A49C: .word 0x02270388 -_0226A4A0: .word ov16_0226B4E0 - thumb_func_end ov16_0226A3F4 - - thumb_func_start ov16_0226A4A4 -ov16_0226A4A4: ; 0x0226A4A4 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0 - add r4, r1, #0 - mvn r0, r0 - cmp r4, r0 - beq _0226A4BA - cmp r4, #1 - beq _0226A4BE - cmp r4, #0xff - beq _0226A4C2 -_0226A4BA: - add r0, r4, #0 - pop {r4, r5, r6, pc} -_0226A4BE: - mov r6, #0 - b _0226A4C4 -_0226A4C2: - mov r6, #1 -_0226A4C4: - add r0, r5, #0 - add r1, r2, #0 - bl ov16_0226B318 - ldr r0, _0226A510 ; =ov16_0226B390 - add r1, r5, #0 - bl ov16_0226B2BC - cmp r4, #1 - bne _0226A4E4 - mov r0, #0x6a - ldr r1, _0226A514 ; =0x02270246 - lsl r0, r0, #4 - str r1, [r5, r0] - ldr r1, _0226A518 ; =0x02270220 - b _0226A4EE -_0226A4E4: - mov r0, #0x6a - ldr r1, _0226A51C ; =0x02270240 - lsl r0, r0, #4 - str r1, [r5, r0] - ldr r1, _0226A520 ; =0x0227021C -_0226A4EE: - add r0, r0, #4 - str r1, [r5, r0] - ldr r0, _0226A524 ; =0x000006AC - mov r1, #6 - strb r1, [r5, r0] - sub r1, r0, #4 - str r4, [r5, r1] - add r1, r0, #1 - strb r6, [r5, r1] - add r1, r0, #3 - mov r2, #3 - strb r2, [r5, r1] - mov r1, #1 - add r0, r0, #4 - strb r1, [r5, r0] - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0226A510: .word ov16_0226B390 -_0226A514: .word 0x02270246 -_0226A518: .word 0x02270220 -_0226A51C: .word 0x02270240 -_0226A520: .word 0x0227021C -_0226A524: .word 0x000006AC - thumb_func_end ov16_0226A4A4 - - thumb_func_start ov16_0226A528 -ov16_0226A528: ; 0x0226A528 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r1, sp, #0 - mov r2, #1 - add r4, r0, #0 - bl ov16_0226B20C - cmp r5, #4 - bgt _0226A558 - add r0, r5, #1 - bmi _0226A55C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226A54C: ; jump table - .short _0226A55C - _0226A54C - 2 ; case 0 - .short _0226A55C - _0226A54C - 2 ; case 1 - .short _0226A562 - _0226A54C - 2 ; case 2 - .short _0226A572 - _0226A54C - 2 ; case 3 - .short _0226A582 - _0226A54C - 2 ; case 4 - .short _0226A592 - _0226A54C - 2 ; case 5 -_0226A558: - cmp r5, #0xff - beq _0226A5A2 -_0226A55C: - add sp, #4 - add r0, r5, #0 - pop {r3, r4, r5, r6, pc} -_0226A562: - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #0 - bne _0226A5E8 - mov r0, #0 - add sp, #4 - mvn r0, r0 - pop {r3, r4, r5, r6, pc} -_0226A572: - add r0, sp, #0 - ldrb r0, [r0, #1] - cmp r0, #0 - bne _0226A5E8 - mov r0, #0 - add sp, #4 - mvn r0, r0 - pop {r3, r4, r5, r6, pc} -_0226A582: - add r0, sp, #0 - ldrb r0, [r0, #2] - cmp r0, #0 - bne _0226A5E8 - mov r0, #0 - add sp, #4 - mvn r0, r0 - pop {r3, r4, r5, r6, pc} -_0226A592: - .byte 0x00, 0xA8, 0xC0, 0x78, 0x00, 0x28, 0x26, 0xD1, 0x00, 0x20, 0x01, 0xB0, 0xC0, 0x43 - .byte 0x78, 0xBD -_0226A5A2: - add r0, r4, #0 - mov r1, #4 - bl ov16_0226B318 - ldr r0, _0226A61C ; =ov16_0226B390 - add r1, r4, #0 - bl ov16_0226B2BC - mov r1, #0x6a - ldr r0, _0226A620 ; =0x022703EC - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r2, _0226A624 ; =0x0227034C - add r0, r1, #4 - str r2, [r4, r0] - add r0, r1, #0 - mov r2, #4 - add r0, #0xc - strb r2, [r4, r0] - add r0, r1, #0 - add r0, #8 - str r5, [r4, r0] - add r0, r1, #0 - add r0, #0xd - strb r2, [r4, r0] - add r0, r1, #0 - mov r2, #3 - add r0, #0xf - strb r2, [r4, r0] - mov r0, #1 - add r1, #0x10 - strb r0, [r4, r1] - add sp, #4 - add r0, r5, #0 - pop {r3, r4, r5, r6, pc} -_0226A5E8: - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r2, _0226A628 ; =0x000002FF - add r6, r0, #0 - mov r1, #5 - bl sub_02019EE0 - add r0, r6, #0 - mov r1, #5 - bl sub_0201C3C0 - add r0, r4, #0 - add r1, r5, #0 - bl ov16_0226B314 - ldr r0, _0226A62C ; =ov16_0226B780 - add r1, r4, #0 - bl ov16_0226B2BC - ldr r0, _0226A630 ; =0x000006BC - str r5, [r4, r0] - add r0, r5, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0226A61C: .word ov16_0226B390 -_0226A620: .word 0x022703EC -_0226A624: .word 0x0227034C -_0226A628: .word 0x000002FF -_0226A62C: .word ov16_0226B780 -_0226A630: .word 0x000006BC - thumb_func_end ov16_0226A528 - - thumb_func_start ov16_0226A634 -ov16_0226A634: ; 0x0226A634 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0 - mvn r1, r1 - add r5, r0, #0 - cmp r4, r1 - beq _0226A646 - cmp r4, #1 - beq _0226A64A -_0226A646: - add r0, r4, #0 - pop {r3, r4, r5, pc} -_0226A64A: - add r1, r2, #0 - bl ov16_0226B318 - ldr r0, _0226A68C ; =ov16_0226B390 - add r1, r5, #0 - bl ov16_0226B2BC - mov r1, #0x6a - ldr r0, _0226A690 ; =0x022701F4 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r2, _0226A694 ; =0x022701D0 - add r0, r1, #4 - str r2, [r5, r0] - add r0, r1, #0 - mov r2, #6 - add r0, #0xc - strb r2, [r5, r0] - add r0, r1, #0 - add r0, #8 - str r4, [r5, r0] - add r0, r1, #0 - mov r3, #0 - add r0, #0xd - strb r3, [r5, r0] - add r0, r1, #0 - mov r2, #3 - add r0, #0xf - strb r2, [r5, r0] - add r1, #0x10 - strb r3, [r5, r1] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0226A68C: .word ov16_0226B390 -_0226A690: .word 0x022701F4 -_0226A694: .word 0x022701D0 - thumb_func_end ov16_0226A634 - - thumb_func_start ov16_0226A698 -ov16_0226A698: ; 0x0226A698 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E010 - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E018 - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E064 - add r5, r0, #0 - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0226A710 ; =0x00004E36 - add r2, r4, #0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r3, r6, #0 - bl sub_0200CD7C - bl sub_02079FD8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0226A714 ; =0x00004E35 - add r1, r6, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE4 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0226A714 ; =0x00004E35 - add r1, r6, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x13 - bl sub_0200CE3C - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_0226A710: .word 0x00004E36 -_0226A714: .word 0x00004E35 - thumb_func_end ov16_0226A698 - - thumb_func_start ov16_0226A718 -ov16_0226A718: ; 0x0226A718 - push {r4, lr} - ldr r0, [r0, #0] - bl ov16_0223E018 - ldr r1, _0226A754 ; =0x00004E44 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0226A758 ; =0x00004E45 - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0226A75C ; =0x00004E46 - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0226A760 ; =0x00004E35 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0226A760 ; =0x00004E35 - add r0, r4, #0 - bl sub_0200D0A0 - ldr r1, _0226A764 ; =0x00004E36 - add r0, r4, #0 - bl sub_0200D080 - pop {r4, pc} - nop -_0226A754: .word 0x00004E44 -_0226A758: .word 0x00004E45 -_0226A75C: .word 0x00004E46 -_0226A760: .word 0x00004E35 -_0226A764: .word 0x00004E36 - thumb_func_end ov16_0226A718 - - thumb_func_start ov16_0226A768 -ov16_0226A768: ; 0x0226A768 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 - add r7, r4, #0 -_0226A772: - ldr r0, _0226A79C ; =0x00000628 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0226A782 - bl sub_0200D0F4 - ldr r0, _0226A79C ; =0x00000628 - str r6, [r5, r0] -_0226A782: - ldr r0, _0226A7A0 ; =0x00000638 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0226A792 - bl sub_0200DA58 - ldr r0, _0226A7A0 ; =0x00000638 - str r7, [r5, r0] -_0226A792: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0226A772 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A79C: .word 0x00000628 -_0226A7A0: .word 0x00000638 - thumb_func_end ov16_0226A768 - - thumb_func_start ov16_0226A7A4 -ov16_0226A7A4: ; 0x0226A7A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - add r6, r2, #0 - add r4, r0, #0 - str r1, [sp, #0xc] - str r3, [sp, #0x10] - cmp r6, #2 - blt _0226A7B8 - sub r5, r6, #2 - b _0226A7BA -_0226A7B8: - add r5, r6, #0 -_0226A7BA: - lsl r0, r5, #2 - add r1, r4, r0 - ldr r0, _0226A904 ; =0x00000628 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226A7CA - bl sub_02022974 -_0226A7CA: - lsl r0, r5, #2 - add r1, r4, r0 - ldr r0, _0226A908 ; =0x00000638 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226A7DA - bl sub_02022974 -_0226A7DA: - cmp r6, #5 - bhi _0226A802 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226A7EA: ; jump table - .short _0226A7F6 - _0226A7EA - 2 ; case 0 - .short _0226A802 - _0226A7EA - 2 ; case 1 - .short _0226A7F6 - _0226A7EA - 2 ; case 2 - .short _0226A7FA - _0226A7EA - 2 ; case 3 - .short _0226A7F6 - _0226A7EA - 2 ; case 4 - .short _0226A7FE - _0226A7EA - 2 ; case 5 -_0226A7F6: - ldr r6, _0226A90C ; =0x00004E44 - b _0226A80C -_0226A7FA: - ldr r6, _0226A910 ; =0x00004E45 - b _0226A80C -_0226A7FE: - ldr r6, _0226A914 ; =0x00004E46 - b _0226A80C -_0226A802: - bl sub_02022974 - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226A80C: - ldr r0, [r4, #0] - bl ov16_0223E010 - str r0, [sp, #0x18] - ldr r0, [r4, #0] - bl ov16_0223E018 - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - bl sub_02079D80 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - mov r2, #0x13 - str r6, [sp, #8] - bl sub_0200CBDC - ldr r3, _0226A918 ; =0x022704B0 - add r2, sp, #0x1c - mov r7, #6 -_0226A83E: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r7, r7, #1 - bne _0226A83E - ldr r0, [r3, #0] - lsl r3, r5, #2 - str r0, [r2, #0] - ldr r2, _0226A91C ; =0x02270304 - str r6, [sp, #0x30] - ldrh r1, [r2, r3] - add r0, sp, #0x1c - strh r1, [r0] - add r1, r2, r3 - ldrh r1, [r1, #2] - add r2, sp, #0x1c - strh r1, [r0, #2] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - bl sub_0200CE6C - add r3, sp, #0x1c - mov r1, #0 - mov r2, #2 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - mov r3, #0x11 - lsl r3, r3, #0x10 - add r6, r0, #0 - bl sub_0200D500 - ldr r0, [sp, #0xc] - bl sub_02079FC4 - add r1, r0, #0 - ldr r0, [r6, #0] - bl sub_02021F24 - ldr r0, [sp, #0x10] - mov r7, #0 - cmp r0, #0 - beq _0226A8DC - ldr r0, [sp, #0x6c] - cmp r0, #2 - beq _0226A8DC - cmp r0, #3 - beq _0226A8DC - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x68] - lsl r0, r0, #0x10 - lsl r1, r1, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - mov r2, #0x30 - bl sub_0208C104 - cmp r0, #4 - bhi _0226A8D4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226A8BC: ; jump table - .short _0226A8D4 - _0226A8BC - 2 ; case 0 - .short _0226A8D2 - _0226A8BC - 2 ; case 1 - .short _0226A8CE - _0226A8BC - 2 ; case 2 - .short _0226A8CA - _0226A8BC - 2 ; case 3 - .short _0226A8C6 - _0226A8BC - 2 ; case 4 -_0226A8C6: - mov r7, #1 - b _0226A8D4 -_0226A8CA: - mov r7, #2 - b _0226A8D4 -_0226A8CE: - mov r7, #3 - b _0226A8D4 -_0226A8D2: - mov r7, #4 -_0226A8D4: - add r0, r6, #0 - add r1, r7, #0 - bl sub_0200D364 -_0226A8DC: - add r0, r6, #0 - bl sub_0200D330 - lsl r0, r5, #2 - add r1, r4, r0 - ldr r0, _0226A904 ; =0x00000628 - ldr r2, _0226A920 ; =0x00000514 - str r6, [r1, r0] - ldr r0, _0226A924 ; =ov16_0226A928 - add r1, r6, #0 - bl sub_0200D9E8 - lsl r1, r5, #2 - add r2, r4, r1 - ldr r1, _0226A908 ; =0x00000638 - str r0, [r2, r1] - add r0, r6, #0 - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226A904: .word 0x00000628 -_0226A908: .word 0x00000638 -_0226A90C: .word 0x00004E44 -_0226A910: .word 0x00004E45 -_0226A914: .word 0x00004E46 -_0226A918: .word 0x022704B0 -_0226A91C: .word 0x02270304 -_0226A920: .word 0x00000514 -_0226A924: .word ov16_0226A928 - thumb_func_end ov16_0226A7A4 - - thumb_func_start ov16_0226A928 -ov16_0226A928: ; 0x0226A928 - ldr r3, _0226A930 ; =sub_0200D330 - add r0, r1, #0 - bx r3 - nop -_0226A930: .word sub_0200D330 - thumb_func_end ov16_0226A928 - - thumb_func_start ov16_0226A934 -ov16_0226A934: ; 0x0226A934 - cmp r0, #3 - bhi _0226A94C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226A944: ; jump table - .short _0226A94C - _0226A944 - 2 ; case 0 - .short _0226A950 - _0226A944 - 2 ; case 1 - .short _0226A954 - _0226A944 - 2 ; case 2 - .short _0226A958 - _0226A944 - 2 ; case 3 -_0226A94C: - mov r0, #0 - bx lr -_0226A950: - mov r0, #1 - bx lr -_0226A954: - mov r0, #3 - bx lr -_0226A958: - mov r0, #2 - bx lr - thumb_func_end ov16_0226A934 - - thumb_func_start ov16_0226A95C -ov16_0226A95C: ; 0x0226A95C - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r6, r2, #0 - add r0, r1, #0 - add r1, r4, #0 - mov r2, #0 - add r7, r3, #0 - bl sub_02002D7C - add r4, r0, #0 - asr r1, r4, #2 - lsr r1, r1, #0x1d - add r1, r4, r1 - asr r5, r1, #3 - mov r1, #8 - bl sub_020BD140 - cmp r0, #0 - beq _0226A984 - add r5, r5, #1 -_0226A984: - str r4, [r6, #0] - str r5, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0226A95C - - thumb_func_start ov16_0226A98C -ov16_0226A98C: ; 0x0226A98C - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0] - str r2, [sp, #0x18] - str r3, [sp, #0x1c] - ldr r6, [sp, #0x9c] - ldr r4, [sp, #0xa8] - cmp r0, #0 - beq _0226A9A6 - bl sub_02022974 -_0226A9A6: - ldr r0, [r7, #0] - bl ov16_0223E018 - str r0, [sp, #0x20] - ldr r0, [r7, #0] - bl ov16_0223DF00 - str r0, [sp, #0x24] - cmp r4, #0 - bne _0226A9C8 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x1c] - add r2, sp, #0x2c - add r3, sp, #0x28 - bl ov16_0226A95C - b _0226A9D0 -_0226A9C8: - ldrh r0, [r4, #0x12] - str r0, [sp, #0x2c] - ldrh r0, [r4, #0x10] - str r0, [sp, #0x28] -_0226A9D0: - cmp r4, #0 - bne _0226AA0E - add r0, sp, #0x3c - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r2, [sp, #0x28] - ldr r0, [sp, #0x24] - lsl r2, r2, #0x18 - add r1, sp, #0x3c - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x90] - ldr r1, [sp, #0x1c] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r2, [sp, #0x18] - add r0, sp, #0x3c - str r3, [sp, #0x14] - bl sub_0201D7E0 - b _0226AA1A -_0226AA0E: - add r3, r4, #0 - add r2, sp, #0x3c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} -_0226AA1A: - add r0, sp, #0x3c - mov r1, #2 - mov r2, #5 - bl sub_02012898 - mov r1, #1 - mov r2, #2 - add r3, sp, #0x30 - bl sub_0201ED94 - ldr r0, [sp, #0xa4] - cmp r0, #1 - bne _0226AA3E - ldr r1, [sp, #0x2c] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - sub r6, r6, r0 -_0226AA3E: - ldr r0, _0226AABC ; =0x000004CC - ldr r0, [r7, r0] - str r0, [sp, #0x4c] - add r0, sp, #0x3c - str r0, [sp, #0x50] - ldr r0, [sp, #0x20] - bl sub_0200D9B0 - str r0, [sp, #0x54] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x98] - bl sub_0200D04C - str r0, [sp, #0x58] - mov r0, #0 - ldr r1, [sp, #0x34] - str r0, [sp, #0x5c] - str r0, [sp, #0x6c] - mov r0, #0x64 - str r1, [sp, #0x60] - mov r1, #0x42 - str r0, [sp, #0x70] - mov r0, #2 - str r0, [sp, #0x74] - mov r0, #5 - str r0, [sp, #0x78] - ldr r2, [sp, #0xa0] - lsl r1, r1, #2 - add r1, r2, r1 - add r0, sp, #0x4c - str r6, [sp, #0x64] - str r1, [sp, #0x68] - bl sub_020127E8 - ldr r1, [sp, #0x94] - add r7, r0, #0 - bl sub_02012AC0 - mov r2, #0x42 - ldr r3, [sp, #0xa0] - lsl r2, r2, #2 - add r0, r7, #0 - add r1, r6, #0 - add r2, r3, r2 - bl sub_020128C4 - cmp r4, #0 - bne _0226AAA4 - add r0, sp, #0x3c - bl sub_0201A8FC -_0226AAA4: - str r7, [r5, #0] - add r3, sp, #0x30 - ldmia r3!, {r0, r1} - add r2, r5, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #0x2c] - strh r0, [r5, #0x10] - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - nop -_0226AABC: .word 0x000004CC - thumb_func_end ov16_0226A98C - - thumb_func_start ov16_0226AAC0 -ov16_0226AAC0: ; 0x0226AAC0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _0226AAF4 ; =0x000004D4 - mov r6, #0 - add r4, r5, r0 - add r7, r6, #0 -_0226AACC: - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0226AAE6 - bl sub_02012870 - add r0, r4, #0 - bl sub_0201EE28 - mov r0, #0x4d - lsl r0, r0, #4 - str r7, [r5, r0] -_0226AAE6: - add r6, r6, #1 - add r5, #0x14 - add r4, #0x14 - cmp r6, #0xd - blt _0226AACC - pop {r3, r4, r5, r6, r7, pc} - nop -_0226AAF4: .word 0x000004D4 - thumb_func_end ov16_0226AAC0 - - thumb_func_start ov16_0226AAF8 -ov16_0226AAF8: ; 0x0226AAF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - ldr r0, [r7, #0] - bl ov16_0223DF00 - mov r1, #5 - bl sub_02019FE4 - add r4, r0, #0 - add r0, r7, #0 - add r1, sp, #4 - mov r2, #0 - bl ov16_0226B20C - add r0, sp, #0 - ldrb r0, [r0, #4] - cmp r0, #1 - bne _0226AB72 - add r0, r7, #0 - mov r1, #1 - add r2, sp, #0 - mov r3, #0 - bl ov16_0226B264 - add r0, sp, #0 - ldrb r0, [r0, #2] - cmp r0, #1 - bne _0226AB56 - mov r5, #0xc - mov r0, #0xa9 - lsl r6, r5, #5 - lsl r0, r0, #2 - mov r2, #0xf -_0226AB3C: - lsl r1, r6, #1 - add r1, r4, r1 - add r3, r2, #0 - add r1, #0x1e -_0226AB44: - add r3, r3, #1 - strh r0, [r1] - add r1, r1, #2 - cmp r3, #0x10 - ble _0226AB44 - add r5, r5, #1 - add r6, #0x20 - cmp r5, #0x10 - ble _0226AB3C -_0226AB56: - add r0, sp, #0 - ldrb r0, [r0, #3] - cmp r0, #1 - bne _0226AB72 - mov r0, #0xa1 - lsl r0, r0, #2 - add r1, r4, r0 - mov r2, #2 - add r0, #0x20 -_0226AB68: - add r2, r2, #1 - strh r0, [r1] - add r1, r1, #2 - cmp r2, #0xc - ble _0226AB68 -_0226AB72: - add r0, sp, #0 - ldrb r0, [r0, #5] - cmp r0, #1 - bne _0226ABCC - add r0, r7, #0 - mov r1, #2 - add r2, sp, #0 - mov r3, #0 - bl ov16_0226B264 - add r0, sp, #0 - ldrb r0, [r0, #2] - cmp r0, #1 - bne _0226ABA0 - ldr r0, _0226ABD0 ; =0x000002A6 - mov r2, #0x13 - add r1, r4, r0 - sub r0, r0, #2 -_0226AB96: - add r2, r2, #1 - strh r0, [r1] - add r1, r1, #2 - cmp r2, #0x1d - ble _0226AB96 -_0226ABA0: - add r0, sp, #0 - ldrb r0, [r0, #3] - cmp r0, #1 - bne _0226ABCC - mov r0, #0xa9 - mov r5, #3 - mov r3, #0x60 - lsl r0, r0, #2 - mov r2, #0xf -_0226ABB2: - lsl r1, r3, #1 - add r1, r4, r1 - add r6, r2, #0 - add r1, #0x1e -_0226ABBA: - add r6, r6, #1 - strh r0, [r1] - add r1, r1, #2 - cmp r6, #0x10 - ble _0226ABBA - add r5, r5, #1 - add r3, #0x20 - cmp r5, #7 - ble _0226ABB2 -_0226ABCC: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226ABD0: .word 0x000002A6 - thumb_func_end ov16_0226AAF8 - - thumb_func_start ov16_0226ABD4 -ov16_0226ABD4: ; 0x0226ABD4 - cmp r1, #2 - blt _0226ABDA - sub r1, r1, #2 -_0226ABDA: - mov r2, #0x46 - lsl r2, r2, #2 - add r0, #0x6c - mul r2, r1 - add r0, r0, r2 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226ABD4 - - thumb_func_start ov16_0226ABE8 -ov16_0226ABE8: ; 0x0226ABE8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [sp] - mov r1, #0x4d - str r0, [sp, #0x10] - add r0, #0x94 - str r0, [sp, #0x10] - ldr r0, [sp] - lsl r1, r1, #2 - str r0, [sp, #0xc] - add r0, #0xe4 - str r0, [sp, #0xc] - ldr r0, [sp] - add r0, r0, r1 - str r0, [sp, #8] -_0226AC0C: - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [sp] - ldr r7, [sp, #0x10] - ldr r6, [sp, #0xc] - ldr r5, [sp, #8] - str r0, [sp, #4] - add r4, r0, #0 -_0226AC1C: - ldr r0, [sp, #4] - add r0, #0x84 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226AC36 - add r0, r7, #0 - bl sub_0201A8FC -_0226AC36: - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226AC46 - add r0, r6, #0 - bl sub_0201A8FC -_0226AC46: - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0226AC56 - add r0, r5, #0 - bl sub_0201A8FC -_0226AC56: - ldr r0, [sp, #4] - add r4, #0x14 - add r0, r0, #4 - str r0, [sp, #4] - ldr r0, [sp, #0x18] - add r7, #0x14 - add r0, r0, #1 - add r6, #0x14 - add r5, #0x14 - str r0, [sp, #0x18] - cmp r0, #4 - blt _0226AC1C - mov r0, #0x46 - ldr r1, [sp] - lsl r0, r0, #2 - add r1, r1, r0 - str r1, [sp] - ldr r1, [sp, #0x10] - add r1, r1, r0 - str r1, [sp, #0x10] - ldr r1, [sp, #0xc] - add r1, r1, r0 - str r1, [sp, #0xc] - ldr r1, [sp, #8] - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #4 - blt _0226AC0C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov16_0226ABE8 - - thumb_func_start ov16_0226AC98 -ov16_0226AC98: ; 0x0226AC98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - add r7, r0, #0 - ldr r0, [r7, #0] - add r5, r1, #0 - str r2, [sp, #8] - bl ov16_0223E05C - add r4, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - bl ov16_0226ABD4 - str r0, [sp, #0x38] - mov r0, #6 - bl sub_0208C098 - str r0, [sp, #0xc] - ldr r1, _0226AE94 ; =0x000003AA - add r0, r4, #0 - bl sub_0200B1EC - str r0, [sp, #0x28] - ldr r0, [r7, #0] - bl ov16_0223E0D0 - str r0, [sp, #0x24] - mov r0, #0x10 - mov r1, #5 - bl sub_02023790 - str r0, [sp, #0x30] - ldr r1, _0226AE98 ; =0x000003A9 - add r0, r4, #0 - bl sub_0200B1EC - ldr r4, [sp, #0x38] - str r0, [sp, #0x2c] - mov r0, #0 - str r0, [sp, #0x34] - add r0, r4, #0 - str r0, [sp, #0x1c] - str r0, [sp, #0x18] - add r0, #0x28 - str r0, [sp, #0x18] - add r0, r4, #0 - str r0, [sp, #0x14] - add r0, #0x78 - str r0, [sp, #0x14] - add r0, r4, #0 - str r0, [sp, #0x10] - add r0, #0xc8 - ldr r5, [sp, #8] - add r6, r4, #0 - str r0, [sp, #0x10] -_0226AD06: - ldrh r0, [r5] - ldrh r1, [r4] - cmp r0, r1 - beq _0226AD4C - cmp r0, #0 - beq _0226AD4C - mov r1, #3 - bl sub_020790C4 - str r0, [sp, #0x3c] - bl sub_0207C944 - str r0, [sp, #0x40] - ldr r0, [sp, #0x3c] - bl sub_0207C908 - add r1, r0, #0 - mov r0, #5 - str r0, [sp] - ldr r0, [sp, #0x40] - mov r2, #1 - add r3, sp, #0x4c - bl sub_02006F50 - str r0, [sp, #0x44] - ldr r0, [sp, #0x4c] - ldr r1, [sp, #0x1c] - ldr r0, [r0, #0x14] - ldr r1, [r1, #0x18] - ldr r2, [sp, #0xc] - bl sub_020C4B68 - ldr r0, [sp, #0x44] - bl sub_020181C4 -_0226AD4C: - ldr r0, [r6, #0x34] - cmp r0, #0 - beq _0226AD5E - ldrh r1, [r5] - ldrh r0, [r4] - cmp r1, r0 - beq _0226AD7E - cmp r1, #0 - beq _0226AD7E -_0226AD5E: - ldrh r0, [r5] - mov r1, #5 - bl sub_0200B2EC - str r0, [sp, #0x48] - ldr r0, _0226AE9C ; =0x00070809 - ldr r1, [sp, #0x48] - str r0, [sp] - ldr r3, [sp, #0x18] - add r0, r7, #0 - mov r2, #2 - bl ov16_0226AEA0 - ldr r0, [sp, #0x48] - bl sub_020237BC -_0226AD7E: - add r0, r6, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226ADAE - add r0, r6, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226ADAE - ldrh r1, [r5] - cmp r1, #0 - bne _0226ADAE - ldrh r0, [r4] - cmp r1, r0 - bne _0226ADAE - ldrh r1, [r5, #8] - ldrh r0, [r4, #8] - cmp r1, r0 - bne _0226ADAE - ldrh r1, [r5, #0x10] - ldrh r0, [r4, #0x10] - cmp r1, r0 - beq _0226AE3E -_0226ADAE: - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldrh r2, [r5, #8] - ldr r0, [sp, #0x24] - mov r1, #0 - mov r3, #2 - bl sub_0200B60C - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldrh r2, [r5, #0x10] - ldr r0, [sp, #0x24] - mov r1, #1 - mov r3, #2 - bl sub_0200B60C - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x30] - ldr r2, [sp, #0x2c] - bl sub_0200C388 - ldrh r0, [r5, #8] - ldrh r1, [r5, #0x10] - bl ov16_0226B924 - str r0, [sp, #0x20] - add r0, r6, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226AE04 - ldrh r1, [r5] - ldrh r0, [r4] - cmp r1, r0 - bne _0226AE04 - ldrh r1, [r5, #8] - ldrh r0, [r4, #8] - cmp r1, r0 - beq _0226AE14 -_0226AE04: - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x30] - str r0, [sp] - ldr r3, [sp, #0x14] - add r0, r7, #0 - mov r2, #0 - bl ov16_0226AEA0 -_0226AE14: - add r0, r6, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226AE2E - ldrh r1, [r5] - ldrh r0, [r4] - cmp r1, r0 - bne _0226AE2E - ldrh r1, [r5, #8] - ldrh r0, [r4, #8] - cmp r1, r0 - beq _0226AE3E -_0226AE2E: - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x28] - str r0, [sp] - ldr r3, [sp, #0x10] - add r0, r7, #0 - mov r2, #0 - bl ov16_0226AEA0 -_0226AE3E: - ldr r0, [sp, #0x1c] - add r4, r4, #2 - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r5, r5, #2 - add r0, #0x14 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r6, #0x14 - add r0, #0x14 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - add r0, #0x14 - str r0, [sp, #0x10] - ldr r0, [sp, #0x34] - add r0, r0, #1 - str r0, [sp, #0x34] - cmp r0, #4 - bge _0226AE68 - b _0226AD06 -_0226AE68: - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x2c] - bl sub_020237BC - ldr r0, [sp, #0x30] - bl sub_020237BC - mov r0, #0xc -_0226AE7C: - ldr r1, [sp, #8] - ldrh r2, [r1] - add r1, r1, #2 - str r1, [sp, #8] - ldr r1, [sp, #0x38] - strh r2, [r1] - add r1, r1, #2 - str r1, [sp, #0x38] - sub r0, r0, #1 - bne _0226AE7C - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226AE94: .word 0x000003AA -_0226AE98: .word 0x000003A9 -_0226AE9C: .word 0x00070809 - thumb_func_end ov16_0226AC98 - - thumb_func_start ov16_0226AEA0 -ov16_0226AEA0: ; 0x0226AEA0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r7, r2, #0 - add r6, r1, #0 - add r5, r0, #0 - add r4, r3, #0 - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #0x1c - add r3, sp, #0x18 - bl ov16_0226A95C - ldr r0, [sp, #0x1c] - strh r0, [r4, #0x12] - ldr r0, [sp, #0x18] - strh r0, [r4, #0x10] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0226AECC - add r0, r4, #0 - bl sub_0201A8FC -_0226AECC: - add r0, r4, #0 - bl sub_0201A7A0 - ldr r0, [r5, #0] - bl ov16_0223DF00 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - ldr r2, [sp, #0x18] - add r1, r4, #0 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x38] - add r1, r7, #0 - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - add r0, r4, #0 - add r2, r6, #0 - str r3, [sp, #0x14] - bl sub_0201D7E0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0226AEA0 - - thumb_func_start ov16_0226AF0C -ov16_0226AF0C: ; 0x0226AF0C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r0, #0 - str r0, [sp, #4] - add r0, #0x1c - str r0, [sp, #4] - ldr r0, [r5, #0] - bl ov16_0223E010 - str r0, [sp, #0xc] - ldr r0, [r5, #0] - bl ov16_0223E018 - ldr r1, _0226AFE0 ; =0x0000068A - str r0, [sp, #8] - ldrb r1, [r5, r1] - add r0, r5, #0 - bl ov16_0226ABD4 - ldr r4, _0226AFE4 ; =0x0227047C - str r0, [sp] - add r3, sp, #0x10 - mov r2, #6 -_0226AF3A: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0226AF3A - ldr r0, [r4, #0] - mov r4, #0 - str r0, [r3, #0] - add r6, sp, #0x10 - b _0226AFD8 -_0226AF4C: - lsl r0, r4, #2 - add r1, r5, r0 - ldr r0, _0226AFE8 ; =0x00000608 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226AF5C - bl sub_02022974 -_0226AF5C: - ldr r0, [sp, #4] - lsl r1, r4, #1 - ldrh r0, [r0, r1] - cmp r0, #0 - beq _0226AFD6 - mov r1, #3 - bl sub_020790C4 - add r2, r0, #0 - ldr r0, _0226AFEC ; =0x00004E39 - ldr r1, _0226AFF0 ; =0x022702B4 - add r0, r4, r0 - str r0, [sp, #0x24] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - add r3, sp, #0x10 - strh r1, [r6] - ldr r1, _0226AFF0 ; =0x022702B4 - add r0, r1, r0 - ldrh r0, [r0, #2] - ldr r1, [sp, #8] - strh r0, [r6, #2] - ldr r0, [sp, #0xc] - bl sub_0207CA58 - lsl r1, r4, #2 - add r2, r5, r1 - ldr r1, _0226AFE8 ; =0x00000608 - mov r3, #0x11 - str r0, [r2, r1] - add r0, r1, #0 - ldr r0, [r2, r0] - mov r1, #0 - mov r2, #2 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - lsl r3, r3, #0x10 - bl sub_0200D500 - lsl r0, r4, #2 - add r1, r5, r0 - ldr r0, _0226AFE8 ; =0x00000608 - ldr r0, [r1, r0] - ldr r0, [r0, #0] - bl sub_02021F98 - add r7, r0, #0 - mov r0, #6 - bl sub_0208C098 - add r2, r0, #0 - ldr r0, [sp] - lsl r3, r4, #2 - add r0, r0, r3 - mov r3, #0x66 - ldr r1, [r7, #8] - lsl r3, r3, #0x14 - ldr r0, [r0, #0x18] - add r1, r3, r1 - bl sub_020C4B18 -_0226AFD6: - add r4, r4, #1 -_0226AFD8: - cmp r4, #4 - blt _0226AF4C - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226AFE0: .word 0x0000068A -_0226AFE4: .word 0x0227047C -_0226AFE8: .word 0x00000608 -_0226AFEC: .word 0x00004E39 -_0226AFF0: .word 0x022702B4 - thumb_func_end ov16_0226AF0C - - thumb_func_start ov16_0226AFF4 -ov16_0226AFF4: ; 0x0226AFF4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E010 - ldr r0, [r5, #0] - bl ov16_0223E018 - mov r4, #0 - ldr r7, _0226B024 ; =0x00000608 - add r6, r4, #0 -_0226B00A: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0226B018 - bl sub_0207CA88 - ldr r0, _0226B024 ; =0x00000608 - str r6, [r5, r0] -_0226B018: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0226B00A - pop {r3, r4, r5, r6, r7, pc} - nop -_0226B024: .word 0x00000608 - thumb_func_end ov16_0226AFF4 - - thumb_func_start ov16_0226B028 -ov16_0226B028: ; 0x0226B028 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E010 - ldr r0, [r5, #0] - bl ov16_0223E018 - mov r4, #0 - add r6, r0, #0 - add r7, r4, #0 -_0226B03E: - ldr r0, _0226B064 ; =0x00000618 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0226B058 - bl sub_0207CB00 - ldr r1, _0226B068 ; =0x00004E3D - add r0, r6, #0 - add r1, r4, r1 - bl sub_0207CAF8 - ldr r0, _0226B064 ; =0x00000618 - str r7, [r5, r0] -_0226B058: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0226B03E - pop {r3, r4, r5, r6, r7, pc} - nop -_0226B064: .word 0x00000618 -_0226B068: .word 0x00004E3D - thumb_func_end ov16_0226B028 - - thumb_func_start ov16_0226B06C -ov16_0226B06C: ; 0x0226B06C - push {r3, r4, r5, lr} - ldr r0, [r0, #0] - add r5, r1, #0 - add r4, r2, #0 - bl ov16_0223E064 - add r4, #8 - add r1, r5, #0 - mov r2, #5 - mov r3, #1 - str r4, [sp] - bl ov11_0221F81C - pop {r3, r4, r5, pc} - thumb_func_end ov16_0226B06C - - thumb_func_start ov16_0226B088 -ov16_0226B088: ; 0x0226B088 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov16_0223E064 - add r6, r0, #0 - mov r7, #0 - b _0226B0CE -_0226B09A: - ldr r1, _0226B0D4 ; =0x0227022C - lsl r2, r4, #1 - add r1, r1, r2 - ldr r2, _0226B0D8 ; =0x02270274 - lsl r3, r4, #2 - add r2, r2, r3 - add r0, r5, #0 - mov r3, #3 - str r7, [sp] - bl ov16_0226B31C - mov r0, #0x20 - str r0, [sp] - add r3, r4, #0 - mov r1, #7 - add r3, #8 - lsl r3, r3, #0x14 - ldr r2, [r5, #0x5c] - lsl r1, r1, #6 - add r1, r2, r1 - add r0, r6, #0 - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02002FBC - add r4, r4, #1 -_0226B0CE: - cmp r4, #4 - blt _0226B09A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226B0D4: .word 0x0227022C -_0226B0D8: .word 0x02270274 - thumb_func_end ov16_0226B088 - - thumb_func_start ov16_0226B0DC -ov16_0226B0DC: ; 0x0226B0DC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - ldr r1, _0226B188 ; =0x022701C8 - add r5, r0, #0 - ldrb r2, [r1, #0xc] - add r0, sp, #0x10 - strb r2, [r0] - ldrb r2, [r1, #0xd] - strb r2, [r0, #1] - ldrb r2, [r1, #0xe] - ldrb r1, [r1, #0xf] - strb r2, [r0, #2] - strb r1, [r0, #3] - ldr r0, [r5, #0] - bl ov16_0223DF00 - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223E064 - add r7, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r2, _0226B18C ; =0x022701FC - lsl r1, r4, #1 - add r1, r2, r1 - ldr r3, _0226B190 ; =0x022702C4 - lsl r2, r4, #2 - add r2, r3, r2 - add r0, r5, #0 - mov r3, #4 - bl ov16_0226B31C - mov r0, #0x20 - str r0, [sp] - add r3, sp, #0x10 - ldrb r3, [r3, r4] - mov r1, #7 - ldr r2, [r5, #0x5c] - lsl r1, r1, #6 - lsl r3, r3, #0x14 - add r1, r2, r1 - add r0, r7, #0 - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02002FBC - add r0, r6, #0 - mov r1, #4 - bl sub_0201C3C0 - ldr r0, _0226B190 ; =0x022702C4 - lsl r1, r4, #2 - ldrb r2, [r0, r1] - add r3, r0, r1 - str r2, [sp] - ldrb r4, [r3, #3] - ldrb r2, [r3, #2] - sub r2, r4, r2 - add r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - str r2, [sp, #4] - ldrb r0, [r0, r1] - ldrb r2, [r3, #1] - mov r1, #5 - sub r0, r2, r0 - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldrb r3, [r3, #2] - ldr r2, _0226B194 ; =0x000002FF - add r0, r6, #0 - bl sub_02019CB8 - add r0, r6, #0 - mov r1, #5 - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0226B188: .word 0x022701C8 -_0226B18C: .word 0x022701FC -_0226B190: .word 0x022702C4 -_0226B194: .word 0x000002FF - thumb_func_end ov16_0226B0DC - - thumb_func_start ov16_0226B198 -ov16_0226B198: ; 0x0226B198 - push {r4, r5, r6, lr} - mov r5, #0 - mov r6, #1 - add r4, r5, #0 -_0226B1A0: - add r0, r5, #4 - cmp r0, #6 - beq _0226B1B2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r4, #0 - bl sub_02019120 - b _0226B1BC -_0226B1B2: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r6, #0 - bl sub_02019120 -_0226B1BC: - add r5, r5, #1 - cmp r5, #4 - blt _0226B1A0 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0226B198 - - thumb_func_start ov16_0226B1C4 -ov16_0226B1C4: ; 0x0226B1C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #1 - bne _0226B1D2 - bl ov16_0226B1E8 -_0226B1D2: - cmp r4, #1 - bne _0226B1E0 - ldr r0, _0226B1E4 ; =ov16_0226BCBC - add r1, r5, #0 - mov r2, #0xa - bl sub_0200DA3C -_0226B1E0: - pop {r3, r4, r5, pc} - nop -_0226B1E4: .word ov16_0226BCBC - thumb_func_end ov16_0226B1C4 - - thumb_func_start ov16_0226B1E8 -ov16_0226B1E8: ; 0x0226B1E8 - push {r4, lr} - add r4, r0, #0 - bl ov16_0226AFF4 - add r0, r4, #0 - bl ov16_0226B028 - add r0, r4, #0 - bl ov16_0226AAC0 - add r0, r4, #0 - bl ov16_0226A718 - add r0, r4, #0 - bl ov16_0226A768 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226B1E8 - - thumb_func_start ov16_0226B20C -ov16_0226B20C: ; 0x0226B20C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r6, r5, #0 - add r1, sp, #0 - add r7, r2, #0 - add r6, #0x1c - bl ov16_0223F858 - mov r0, #0 - b _0226B254 -_0226B226: - add r2, r0, #2 - add r1, sp, #0 - ldrb r1, [r1, r2] - cmp r7, #1 - bne _0226B242 - lsl r1, r1, #3 - add r1, r6, r1 - ldrb r1, [r1, #1] - lsl r1, r1, #0x1d - lsr r1, r1, #0x1f - bne _0226B242 - mov r1, #0 - strb r1, [r4, r0] - b _0226B252 -_0226B242: - ldr r1, _0226B25C ; =0x0000068C - lsl r2, r0, #2 - ldrb r1, [r5, r1] - lsl r3, r1, #4 - ldr r1, _0226B260 ; =0x022705B0 - add r1, r1, r3 - ldr r1, [r2, r1] - strb r1, [r4, r0] -_0226B252: - add r0, r0, #1 -_0226B254: - cmp r0, #4 - blt _0226B226 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226B25C: .word 0x0000068C -_0226B260: .word 0x022705B0 - thumb_func_end ov16_0226B20C - - thumb_func_start ov16_0226B264 -ov16_0226B264: ; 0x0226B264 - push {r4, lr} - ldr r4, _0226B2B8 ; =0x0000068C - ldrb r4, [r0, r4] - cmp r4, #0xb - bhi _0226B2AC - add r4, r4, r4 - add r4, pc - ldrh r4, [r4, #6] - lsl r4, r4, #0x10 - asr r4, r4, #0x10 - add pc, r4 -_0226B27A: ; jump table - .short _0226B292 - _0226B27A - 2 ; case 0 - .short _0226B2AC - _0226B27A - 2 ; case 1 - .short _0226B2AC - _0226B27A - 2 ; case 2 - .short _0226B2AC - _0226B27A - 2 ; case 3 - .short _0226B2AC - _0226B27A - 2 ; case 4 - .short _0226B2AC - _0226B27A - 2 ; case 5 - .short _0226B2AC - _0226B27A - 2 ; case 6 - .short _0226B2AC - _0226B27A - 2 ; case 7 - .short _0226B292 - _0226B27A - 2 ; case 8 - .short _0226B292 - _0226B27A - 2 ; case 9 - .short _0226B292 - _0226B27A - 2 ; case 10 - .short _0226B292 - _0226B27A - 2 ; case 11 -_0226B292: - mov r4, #0 - add r0, r4, #0 - mov r3, #1 - sub r1, r1, #1 -_0226B29A: - cmp r4, r1 - bne _0226B2A2 - strb r3, [r2, r4] - b _0226B2A4 -_0226B2A2: - strb r0, [r2, r4] -_0226B2A4: - add r4, r4, #1 - cmp r4, #4 - blt _0226B29A - pop {r4, pc} -_0226B2AC: - add r1, r2, #0 - add r2, r3, #0 - bl ov16_0226B20C - pop {r4, pc} - nop -_0226B2B8: .word 0x0000068C - thumb_func_end ov16_0226B264 - - thumb_func_start ov16_0226B2BC -ov16_0226B2BC: ; 0x0226B2BC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0226B2CC - bl sub_02022974 -_0226B2CC: - ldr r0, _0226B2E8 ; =0x0000069C - mov r1, #0 - add r0, r4, r0 - mov r2, #0x24 - bl sub_020C4CF4 - ldr r2, _0226B2EC ; =0x00000514 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} - nop -_0226B2E8: .word 0x0000069C -_0226B2EC: .word 0x00000514 - thumb_func_end ov16_0226B2BC - - thumb_func_start ov16_0226B2F0 -ov16_0226B2F0: ; 0x0226B2F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0226B30C - bl sub_0200DA58 - ldr r0, _0226B310 ; =0x0000069C - mov r1, #0 - add r0, r4, r0 - mov r2, #0x24 - str r1, [r4, #0xc] - bl sub_020C4CF4 -_0226B30C: - pop {r4, pc} - nop -_0226B310: .word 0x0000069C - thumb_func_end ov16_0226B2F0 - - thumb_func_start ov16_0226B314 -ov16_0226B314: ; 0x0226B314 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226B314 - - thumb_func_start ov16_0226B318 -ov16_0226B318: ; 0x0226B318 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226B318 - - thumb_func_start ov16_0226B31C -ov16_0226B31C: ; 0x0226B31C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - bl ov16_0223DF00 - mov r1, #4 - str r0, [sp, #4] - bl sub_02019FE4 - mov ip, r0 - lsl r0, r7, #2 - add r0, r5, r0 - ldr r0, [r0, #0x40] - ldrb r7, [r4] - str r0, [sp] - ldr r0, [sp, #0x20] - lsl r0, r0, #1 - ldrsh r1, [r6, r0] - ldrb r0, [r4, #1] - cmp r7, r0 - bgt _0226B384 - lsl r6, r7, #5 -_0226B350: - lsl r2, r6, #1 - mov r0, ip - add r5, r0, r2 - ldr r0, [sp] - ldrb r3, [r4, #3] - add r2, r0, r2 - ldrb r0, [r4, #2] - cmp r0, r3 - bgt _0226B37A - lsl r3, r0, #1 - add r2, r2, r3 - add r3, r5, r3 -_0226B368: - ldrh r5, [r2] - add r0, r0, #1 - add r2, r2, #2 - add r5, r1, r5 - strh r5, [r3] - ldrb r5, [r4, #3] - add r3, r3, #2 - cmp r0, r5 - ble _0226B368 -_0226B37A: - ldrb r0, [r4, #1] - add r7, r7, #1 - add r6, #0x20 - cmp r7, r0 - ble _0226B350 -_0226B384: - ldr r0, [sp, #4] - mov r1, #4 - bl sub_0201C3C0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0226B31C - - thumb_func_start ov16_0226B390 -ov16_0226B390: ; 0x0226B390 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r3, _0226B4D4 ; =0x0000069C - ldrsh r0, [r4, r3] - cmp r0, #0 - beq _0226B3AE - cmp r0, #1 - beq _0226B420 - cmp r0, #2 - beq _0226B43C - b _0226B4AE -_0226B3AE: - mov r0, #2 - str r0, [sp] - add r1, r3, #4 - add r2, r3, #0 - add r3, #0x10 - add r2, #8 - ldrb r3, [r4, r3] - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov16_0226B31C - ldr r0, _0226B4D8 ; =0x000006AD - add r2, sp, #4 - ldrb r1, [r4, r0] - mov r0, #0x14 - mul r0, r1 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_020129A4 - ldr r0, _0226B4D8 ; =0x000006AD - ldr r2, [sp, #4] - ldrb r1, [r4, r0] - mov r0, #0x14 - sub r2, r2, #2 - mul r0, r1 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r1, r0] - ldr r1, [sp, #8] - bl sub_020128C4 - ldr r0, _0226B4DC ; =0x000006AE - ldrb r1, [r4, r0] - cmp r1, #0xff - beq _0226B414 - lsl r1, r1, #2 - add r1, r4, r1 - sub r0, #0x86 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B414 - mov r1, #0 - sub r2, r1, #2 - bl sub_0200D5DC -_0226B414: - ldr r0, _0226B4D4 ; =0x0000069C - add sp, #0xc - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - pop {r3, r4, pc} -_0226B420: - add r0, r3, #2 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226B4D0 - mov r1, #0 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r3] - add r0, r0, #1 - strh r0, [r4, r3] -_0226B43C: - mov r0, #1 - mov r3, #0x6a - str r0, [sp] - lsl r3, r3, #4 - add r2, r3, #4 - ldr r1, [r4, r3] - add r3, #0xc - ldrb r3, [r4, r3] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov16_0226B31C - ldr r0, _0226B4D8 ; =0x000006AD - add r2, sp, #4 - ldrb r1, [r4, r0] - mov r0, #0x14 - mul r0, r1 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_020129A4 - ldr r0, _0226B4D8 ; =0x000006AD - ldr r2, [sp, #4] - ldrb r1, [r4, r0] - mov r0, #0x14 - add r2, r2, #1 - mul r0, r1 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r1, r0] - ldr r1, [sp, #8] - bl sub_020128C4 - ldr r0, _0226B4DC ; =0x000006AE - ldrb r1, [r4, r0] - cmp r1, #0xff - beq _0226B4A2 - lsl r1, r1, #2 - add r1, r4, r1 - sub r0, #0x86 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B4A2 - mov r1, #0 - mov r2, #1 - bl sub_0200D5DC -_0226B4A2: - ldr r0, _0226B4D4 ; =0x0000069C - add sp, #0xc - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - pop {r3, r4, pc} -_0226B4AE: - add r0, r3, #2 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226B4D0 - add r3, #0x14 - ldrb r1, [r4, r3] - add r0, r4, #0 - mov r2, #0 - bl ov16_0226B1C4 - add r0, r4, #0 - bl ov16_0226B2F0 -_0226B4D0: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0226B4D4: .word 0x0000069C -_0226B4D8: .word 0x000006AD -_0226B4DC: .word 0x000006AE - thumb_func_end ov16_0226B390 - - thumb_func_start ov16_0226B4E0 -ov16_0226B4E0: ; 0x0226B4E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r1, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r0, _0226B770 ; =0x000006A8 - add r1, r4, #0 - ldr r0, [r4, r0] - add r1, #0x1c - cmp r0, #4 - bgt _0226B512 - cmp r0, #0 - blt _0226B54E - add r2, r0, r0 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0226B508: ; jump table - .short _0226B54E - _0226B508 - 2 ; case 0 - .short _0226B516 - _0226B508 - 2 ; case 1 - .short _0226B524 - _0226B508 - 2 ; case 2 - .short _0226B532 - _0226B508 - 2 ; case 3 - .short _0226B540 - _0226B508 - 2 ; case 4 -_0226B512: - cmp r0, #0xff - b _0226B54E -_0226B516: - mov r0, #5 - str r0, [sp, #8] - ldrh r0, [r1] - mov r5, #0 - mov r6, #9 - str r0, [sp, #4] - b _0226B556 -_0226B524: - mov r0, #6 - str r0, [sp, #8] - ldrh r0, [r1, #2] - mov r5, #1 - mov r6, #0xa - str r0, [sp, #4] - b _0226B556 -_0226B532: - mov r0, #7 - str r0, [sp, #8] - ldrh r0, [r1, #4] - mov r5, #2 - mov r6, #0xb - str r0, [sp, #4] - b _0226B556 -_0226B540: - mov r0, #8 - str r0, [sp, #8] - ldrh r0, [r1, #6] - mov r5, #3 - mov r6, #0xc - str r0, [sp, #4] - b _0226B556 -_0226B54E: - mov r5, #0 - add r6, r5, #0 - str r5, [sp, #8] - str r5, [sp, #4] -_0226B556: - ldr r3, _0226B774 ; =0x0000069C - ldrsh r0, [r4, r3] - cmp r0, #0 - beq _0226B56A - cmp r0, #1 - beq _0226B64C - cmp r0, #2 - bne _0226B568 - b _0226B66A -_0226B568: - b _0226B74C -_0226B56A: - mov r0, #2 - str r0, [sp] - add r1, r3, #4 - add r2, r3, #0 - add r3, #0x10 - add r2, #8 - ldrb r3, [r4, r3] - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov16_0226B31C - ldr r0, _0226B770 ; =0x000006A8 - add r1, sp, #0x20 - ldr r0, [r4, r0] - cmp r0, #0xff - beq _0226B624 - mov r0, #0x4d - lsl r0, r0, #4 - add r7, r4, r0 - mov r0, #0x14 - mul r0, r5 - str r0, [sp, #0xc] - ldr r0, [r7, r0] - add r2, sp, #0x1c - bl sub_020129A4 - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x1c] - ldr r0, [r7, r0] - ldr r1, [sp, #0x20] - sub r2, r2, #2 - bl sub_020128C4 - mov r0, #0x4d - lsl r0, r0, #4 - add r7, r4, r0 - mov r0, #0x14 - mul r0, r6 - str r0, [sp, #0x10] - ldr r0, [r7, r0] - add r1, sp, #0x20 - add r2, sp, #0x1c - bl sub_020129A4 - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x1c] - ldr r0, [r7, r0] - ldr r1, [sp, #0x20] - sub r2, r2, #2 - bl sub_020128C4 - mov r0, #0x4d - lsl r0, r0, #4 - add r6, r4, r0 - ldr r0, [sp, #8] - mov r1, #0x14 - add r7, r0, #0 - mul r7, r1 - ldr r0, [r6, r7] - add r1, sp, #0x20 - add r2, sp, #0x1c - bl sub_020129A4 - ldr r2, [sp, #0x1c] - ldr r0, [r6, r7] - ldr r1, [sp, #0x20] - sub r2, r2, #2 - bl sub_020128C4 - ldr r0, [sp, #4] - cmp r0, #0 - beq _0226B640 - lsl r5, r5, #2 - ldr r0, _0226B778 ; =0x00000608 - add r1, r4, r5 - ldr r0, [r1, r0] - mov r1, #0 - ldr r0, [r0, #0] - sub r2, r1, #2 - bl sub_0200D5AC - ldr r0, _0226B77C ; =0x00000618 - add r1, r4, r5 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B640 - mov r1, #0 - ldr r0, [r0, #0] - sub r2, r1, #2 - bl sub_0200D5AC - b _0226B640 -_0226B624: - mov r0, #0x52 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r2, sp, #0x1c - bl sub_020129A4 - mov r0, #0x52 - lsl r0, r0, #4 - ldr r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r1, [sp, #0x20] - sub r2, r2, #2 - bl sub_020128C4 -_0226B640: - ldr r0, _0226B774 ; =0x0000069C - add sp, #0x24 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - pop {r4, r5, r6, r7, pc} -_0226B64C: - add r0, r3, #2 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - bgt _0226B65E - b _0226B76C -_0226B65E: - mov r1, #0 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r3] - add r0, r0, #1 - strh r0, [r4, r3] -_0226B66A: - mov r0, #1 - mov r3, #0x6a - str r0, [sp] - lsl r3, r3, #4 - add r2, r3, #4 - ldr r1, [r4, r3] - add r3, #0xc - ldrb r3, [r4, r3] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov16_0226B31C - ldr r0, _0226B770 ; =0x000006A8 - add r1, sp, #0x20 - ldr r0, [r4, r0] - cmp r0, #0xff - beq _0226B724 - mov r0, #0x4d - lsl r0, r0, #4 - add r7, r4, r0 - mov r0, #0x14 - mul r0, r5 - str r0, [sp, #0x14] - ldr r0, [r7, r0] - add r2, sp, #0x1c - bl sub_020129A4 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x1c] - ldr r0, [r7, r0] - ldr r1, [sp, #0x20] - add r2, r2, #1 - bl sub_020128C4 - mov r0, #0x4d - lsl r0, r0, #4 - add r7, r4, r0 - mov r0, #0x14 - mul r0, r6 - str r0, [sp, #0x18] - ldr r0, [r7, r0] - add r1, sp, #0x20 - add r2, sp, #0x1c - bl sub_020129A4 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r0, [r7, r0] - ldr r1, [sp, #0x20] - add r2, r2, #1 - bl sub_020128C4 - mov r0, #0x4d - lsl r0, r0, #4 - add r6, r4, r0 - ldr r0, [sp, #8] - mov r1, #0x14 - add r7, r0, #0 - mul r7, r1 - ldr r0, [r6, r7] - add r1, sp, #0x20 - add r2, sp, #0x1c - bl sub_020129A4 - ldr r2, [sp, #0x1c] - ldr r0, [r6, r7] - ldr r1, [sp, #0x20] - add r2, r2, #1 - bl sub_020128C4 - ldr r0, [sp, #4] - cmp r0, #0 - beq _0226B740 - lsl r5, r5, #2 - ldr r0, _0226B778 ; =0x00000608 - add r1, r4, r5 - ldr r0, [r1, r0] - mov r1, #0 - ldr r0, [r0, #0] - mov r2, #1 - bl sub_0200D5AC - ldr r0, _0226B77C ; =0x00000618 - add r1, r4, r5 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B740 - ldr r0, [r0, #0] - mov r1, #0 - mov r2, #1 - bl sub_0200D5AC - b _0226B740 -_0226B724: - mov r0, #0x52 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r2, sp, #0x1c - bl sub_020129A4 - mov r0, #0x52 - lsl r0, r0, #4 - ldr r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r1, [sp, #0x20] - add r2, r2, #1 - bl sub_020128C4 -_0226B740: - ldr r0, _0226B774 ; =0x0000069C - add sp, #0x24 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - pop {r4, r5, r6, r7, pc} -_0226B74C: - add r0, r3, #2 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226B76C - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov16_0226B1C4 - add r0, r4, #0 - bl ov16_0226B2F0 -_0226B76C: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226B770: .word 0x000006A8 -_0226B774: .word 0x0000069C -_0226B778: .word 0x00000608 -_0226B77C: .word 0x00000618 - thumb_func_end ov16_0226B4E0 - - thumb_func_start ov16_0226B780 -ov16_0226B780: ; 0x0226B780 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r0, [r4, #0] - bl ov16_0223DF00 - ldr r1, _0226B910 ; =0x0000069C - ldrsh r0, [r4, r1] - cmp r0, #3 - bls _0226B796 - b _0226B8FA -_0226B796: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226B7A2: ; jump table - .short _0226B7AA - _0226B7A2 - 2 ; case 0 - .short _0226B834 - _0226B7A2 - 2 ; case 1 - .short _0226B850 - _0226B7A2 - 2 ; case 2 - .short _0226B8DA - _0226B7A2 - 2 ; case 3 -_0226B7AA: - add r1, #0x20 - ldr r1, [r4, r1] - add r0, r4, #0 - add r2, sp, #4 - mov r3, #1 - bl ov16_0226B264 - mov r5, #0 - mov r7, #2 - add r6, sp, #4 - b _0226B824 -_0226B7C0: - ldrb r0, [r6, r5] - cmp r0, #1 - bne _0226B822 - mov r1, #6 - add r2, r5, #0 - mul r2, r1 - ldr r1, _0226B914 ; =0x022703D4 - lsl r3, r5, #2 - add r1, r1, r2 - ldr r2, _0226B918 ; =0x0227033C - add r0, r4, #0 - add r2, r2, r3 - mov r3, #4 - str r7, [sp] - bl ov16_0226B31C - mov r0, #0x14 - mul r0, r5 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B80E - add r1, sp, #0xc - add r2, sp, #8 - bl sub_020129A4 - mov r0, #0x14 - mul r0, r5 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r2, [sp, #8] - ldr r0, [r1, r0] - ldr r1, [sp, #0xc] - sub r2, r2, #2 - bl sub_020128C4 -_0226B80E: - lsl r0, r5, #2 - add r1, r4, r0 - ldr r0, _0226B91C ; =0x00000628 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B822 - mov r1, #0 - sub r2, r1, #2 - bl sub_0200D5DC -_0226B822: - add r5, r5, #1 -_0226B824: - cmp r5, #4 - blt _0226B7C0 - ldr r0, _0226B910 ; =0x0000069C - add sp, #0x10 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_0226B834: - add r0, r1, #2 - ldrsh r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226B90A - mov r2, #0 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r1] - add r0, r0, #1 - strh r0, [r4, r1] -_0226B850: - ldr r1, _0226B920 ; =0x000006BC - add r0, r4, #0 - ldr r1, [r4, r1] - add r2, sp, #4 - mov r3, #1 - bl ov16_0226B264 - mov r5, #0 - mov r7, #1 - add r6, sp, #4 - b _0226B8CA -_0226B866: - ldrb r0, [r6, r5] - cmp r0, #1 - bne _0226B8C8 - mov r1, #6 - add r2, r5, #0 - mul r2, r1 - ldr r1, _0226B914 ; =0x022703D4 - lsl r3, r5, #2 - add r1, r1, r2 - ldr r2, _0226B918 ; =0x0227033C - add r0, r4, #0 - add r2, r2, r3 - mov r3, #4 - str r7, [sp] - bl ov16_0226B31C - mov r0, #0x14 - mul r0, r5 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B8B4 - add r1, sp, #0xc - add r2, sp, #8 - bl sub_020129A4 - mov r0, #0x14 - mul r0, r5 - add r1, r4, r0 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r2, [sp, #8] - ldr r0, [r1, r0] - ldr r1, [sp, #0xc] - add r2, r2, #1 - bl sub_020128C4 -_0226B8B4: - lsl r0, r5, #2 - add r1, r4, r0 - ldr r0, _0226B91C ; =0x00000628 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226B8C8 - mov r1, #0 - mov r2, #1 - bl sub_0200D5DC -_0226B8C8: - add r5, r5, #1 -_0226B8CA: - cmp r5, #4 - blt _0226B866 - ldr r0, _0226B910 ; =0x0000069C - add sp, #0x10 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_0226B8DA: - add r0, r1, #2 - ldrsh r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226B90A - mov r2, #0 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r1] - add sp, #0x10 - add r0, r0, #1 - strh r0, [r4, r1] - pop {r3, r4, r5, r6, r7, pc} -_0226B8FA: - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov16_0226B1C4 - add r0, r4, #0 - bl ov16_0226B2F0 -_0226B90A: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226B910: .word 0x0000069C -_0226B914: .word 0x022703D4 -_0226B918: .word 0x0227033C -_0226B91C: .word 0x00000628 -_0226B920: .word 0x000006BC - thumb_func_end ov16_0226B780 - - thumb_func_start ov16_0226B924 -ov16_0226B924: ; 0x0226B924 - cmp r0, #0 - bne _0226B92C - ldr r0, _0226B97C ; =0x00070800 - bx lr -_0226B92C: - cmp r1, r0 - bne _0226B934 - ldr r0, _0226B980 ; =0x00010200 - bx lr -_0226B934: - cmp r1, #2 - bgt _0226B940 - cmp r0, #1 - bne _0226B978 - ldr r0, _0226B984 ; =0x00050600 - bx lr -_0226B940: - cmp r1, #7 - bgt _0226B958 - cmp r0, #1 - beq _0226B94E - cmp r0, #2 - beq _0226B952 - b _0226B978 -_0226B94E: - ldr r0, _0226B984 ; =0x00050600 - bx lr -_0226B952: - mov r0, #0xc1 - lsl r0, r0, #0xa - bx lr -_0226B958: - asr r2, r1, #1 - lsr r2, r2, #0x1e - add r2, r1, r2 - asr r2, r2, #2 - cmp r0, r2 - bgt _0226B968 - ldr r0, _0226B984 ; =0x00050600 - bx lr -_0226B968: - lsr r2, r1, #0x1f - add r2, r1, r2 - asr r1, r2, #1 - cmp r0, r1 - bgt _0226B978 - mov r0, #0xc1 - lsl r0, r0, #0xa - bx lr -_0226B978: - ldr r0, _0226B980 ; =0x00010200 - bx lr - ; .align 2, 0 -_0226B97C: .word 0x00070800 -_0226B980: .word 0x00010200 -_0226B984: .word 0x00050600 - thumb_func_end ov16_0226B924 - - thumb_func_start ov16_0226B988 -ov16_0226B988: ; 0x0226B988 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl ov16_0223DF00 - add r4, r0, #0 - ldrb r0, [r5, #0x13] - cmp r0, #0 - beq _0226B9A4 - cmp r0, #1 - beq _0226B9FA - b _0226BA26 -_0226B9A4: - mov r2, #8 - ldrsh r1, [r5, r2] - ldr r0, _0226BA78 ; =0x000018E7 - add r1, r1, r0 - strh r1, [r5, #8] - mov r1, #0xa - ldrsh r3, [r5, r1] - mov r1, #0xfa - lsl r1, r1, #2 - sub r1, r3, r1 - strh r1, [r5, #0xa] - ldrsh r1, [r5, r2] - lsl r0, r0, #2 - sub r0, r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - strh r0, [r5, #0xc] - mov r0, #0xa - ldrsh r0, [r5, r0] - mov r1, #0x64 - neg r0, r0 - bl sub_020E1F6C - strh r0, [r5, #0xe] - mov r0, #8 - ldrsh r0, [r5, r0] - cmp r0, #0 - bge _0226B9E6 - mov r0, #0xa - ldrsh r0, [r5, r0] - cmp r0, #0 - bgt _0226BA76 -_0226B9E6: - mov r1, #0 - strh r1, [r5, #8] - mov r0, #0x90 - strh r0, [r5, #0xa] - strh r1, [r5, #0xc] - strh r1, [r5, #0xe] - ldrb r0, [r5, #0x13] - add r0, r0, #1 - strb r0, [r5, #0x13] - pop {r4, r5, r6, pc} -_0226B9FA: - ldr r1, [r5, #0] - ldr r0, _0226BA7C ; =0x0000068E - mov r2, #0 - strb r2, [r1, r0] - ldr r0, [r5, #4] - bl sub_0200DA58 - bl sub_020177A4 - ldr r2, _0226BA80 ; =0x04001000 - ldr r0, _0226BA84 ; =0xFFFF1FFF - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - ldr r0, [r5, #0] - mov r1, #1 - bl ov16_0226BCCC - ldrb r0, [r5, #0x13] - add r0, r0, #1 - strb r0, [r5, #0x13] - pop {r4, r5, r6, pc} -_0226BA26: - ldr r0, [r5, #0] - bl ov16_0226BCD0 - cmp r0, #0 - beq _0226BA76 - mov r2, #0 - add r0, r4, #0 - mov r1, #4 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #4 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r2, #0 - add r0, r4, #0 - mov r1, #5 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #5 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl ov16_0223F288 - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0226BA76: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0226BA78: .word 0x000018E7 -_0226BA7C: .word 0x0000068E -_0226BA80: .word 0x04001000 -_0226BA84: .word 0xFFFF1FFF - thumb_func_end ov16_0226B988 - - thumb_func_start ov16_0226BA88 -ov16_0226BA88: ; 0x0226BA88 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl ov16_0223DF00 - add r6, r0, #0 - ldrb r0, [r5, #0x12] - cmp r0, #4 - bne _0226BAD6 - mov r0, #0xc - ldrsh r1, [r5, r0] - mov r0, #0xff - sub r3, r0, r1 - cmp r3, #0 - ble _0226BAAA - mov r3, #0 -_0226BAAA: - add r0, r6, #0 - mov r1, #4 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r4, [r5, r3] - mov r3, #0xff - add r0, r6, #0 - mov r1, #5 - mov r2, #0 - sub r3, r3, r4 - bl sub_02019184 - mov r0, #8 - ldrsh r0, [r5, r0] - mov r1, #0x64 - neg r0, r0 - bl sub_020E1F6C - add r4, r0, #0 - b _0226BB06 -_0226BAD6: - mov r0, #0xc - ldrsh r3, [r5, r0] - cmp r3, #0 - bge _0226BAE0 - mov r3, #0 -_0226BAE0: - add r0, r6, #0 - mov r1, #4 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r3, [r5, r3] - add r0, r6, #0 - mov r1, #5 - mov r2, #0 - bl sub_02019184 - mov r0, #8 - ldrsh r0, [r5, r0] - mov r1, #0x64 - bl sub_020E1F6C - add r4, r0, #0 - add r4, #0xff -_0226BB06: - add r0, r6, #0 - mov r1, #4 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r6, #0 - mov r1, #5 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r0, #0xa - ldrsh r0, [r5, r0] - mov r1, #0x64 - bl sub_020E1F6C - add r0, #0x90 - cmp r4, #0 - bge _0226BB32 - mov r4, #0 - b _0226BB38 -_0226BB32: - cmp r4, #0xff - ble _0226BB38 - mov r4, #0xff -_0226BB38: - cmp r0, #0xc0 - ble _0226BB40 - mov r0, #0xc0 - b _0226BB46 -_0226BB40: - cmp r0, #0 - bge _0226BB46 - mov r0, #0 -_0226BB46: - ldrb r1, [r5, #0x12] - cmp r1, #4 - bne _0226BB5A - lsl r1, r4, #0x18 - ldr r2, _0226BB8C ; =0x04001040 - lsr r1, r1, #0x18 - strh r1, [r2] - mov r1, #0x90 - strh r1, [r2, #4] - b _0226BB70 -_0226BB5A: - cmp r4, #0 - bne _0226BB60 - mov r4, #1 -_0226BB60: - mov r1, #0xff - lsl r2, r4, #8 - lsl r1, r1, #8 - and r1, r2 - ldr r2, _0226BB8C ; =0x04001040 - strh r1, [r2] - mov r1, #0x90 - strh r1, [r2, #4] -_0226BB70: - ldr r2, _0226BB90 ; =0x04001042 - mov r1, #0xff - lsl r0, r0, #0x18 - strh r1, [r2] - lsr r1, r0, #0x18 - mov r0, #9 - lsl r0, r0, #0xc - orr r0, r1 - strh r0, [r2, #4] - mov r0, #0xe - ldrsh r0, [r5, r0] - strh r0, [r5, #0x10] - pop {r4, r5, r6, pc} - nop -_0226BB8C: .word 0x04001040 -_0226BB90: .word 0x04001042 - thumb_func_end ov16_0226BA88 - - thumb_func_start ov16_0226BB94 -ov16_0226BB94: ; 0x0226BB94 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, _0226BC4C ; =0x04000006 - ldrh r0, [r0] - cmp r0, #0x90 - bne _0226BBDE - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl ov16_0223DF00 - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl sub_02019184 - mov r3, #0x10 - ldrsh r3, [r4, r3] - add r0, r5, #0 - mov r1, #4 - mov r2, #3 - bl sub_02019184 - mov r2, #0 - add r0, r5, #0 - mov r1, #5 - add r3, r2, #0 - bl sub_02019184 - mov r3, #0x10 - ldrsh r3, [r4, r3] - add r0, r5, #0 - mov r1, #5 - mov r2, #3 - bl sub_02019184 - pop {r4, r5, r6, pc} -_0226BBDE: - cmp r0, #0xc0 - ble _0226BC48 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl ov16_0223DF00 - ldrb r1, [r4, #0x12] - add r5, r0, #0 - cmp r1, #4 - bne _0226BC16 - mov r3, #0xc - ldrsh r6, [r4, r3] - mov r3, #0xff - mov r1, #4 - mov r2, #0 - sub r3, r3, r6 - bl sub_02019184 - mov r3, #0xc - ldrsh r4, [r4, r3] - mov r3, #0xff - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - sub r3, r3, r4 - bl sub_02019184 - b _0226BC30 -_0226BC16: - mov r3, #0xc - ldrsh r3, [r4, r3] - mov r1, #4 - mov r2, #0 - bl sub_02019184 - mov r3, #0xc - ldrsh r3, [r4, r3] - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02019184 -_0226BC30: - add r0, r5, #0 - mov r1, #4 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r5, #0 - mov r1, #5 - mov r2, #3 - mov r3, #0 - bl sub_02019184 -_0226BC48: - pop {r4, r5, r6, pc} - nop -_0226BC4C: .word 0x04000006 - thumb_func_end ov16_0226BB94 - - thumb_func_start ov16_0226BC50 -ov16_0226BC50: ; 0x0226BC50 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - ldr r0, _0226BCB0 ; =0x0000068B - ldr r2, _0226BCB4 ; =0x02270670 - ldrsb r1, [r1, r0] - mov r0, #0x30 - ldr r7, _0226BCB8 ; =0x0000FFFF - mul r0, r1 - add r6, r2, r0 - mov r4, #0 - add r5, r6, #0 -_0226BC66: - ldrh r0, [r5, #4] - cmp r0, r7 - bne _0226BC7A - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r1, #0 - bl sub_02019120 - b _0226BC86 -_0226BC7A: - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r1, #1 - bl sub_02019120 -_0226BC86: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _0226BC66 - mov r4, #0 -_0226BC90: - ldrh r1, [r6, #0xc] - add r0, r4, #4 - lsl r0, r0, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - add r4, r4, #1 - add r6, r6, #2 - cmp r4, #4 - blt _0226BC90 - ldr r0, [sp] - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BCB0: .word 0x0000068B -_0226BCB4: .word 0x02270670 -_0226BCB8: .word 0x0000FFFF - thumb_func_end ov16_0226BC50 - - thumb_func_start ov16_0226BCBC -ov16_0226BCBC: ; 0x0226BCBC - push {r4, lr} - add r4, r0, #0 - bl ov16_0226B198 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov16_0226BCBC - - thumb_func_start ov16_0226BCCC -ov16_0226BCCC: ; 0x0226BCCC - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226BCCC - - thumb_func_start ov16_0226BCD0 -ov16_0226BCD0: ; 0x0226BCD0 - ldr r1, _0226BCE0 ; =0x00000684 - ldr r0, [r0, r1] - cmp r0, #0 - bne _0226BCDC - mov r0, #1 - bx lr -_0226BCDC: - mov r0, #0 - bx lr - ; .align 2, 0 -_0226BCE0: .word 0x00000684 - thumb_func_end ov16_0226BCD0 - - thumb_func_start ov16_0226BCE4 -ov16_0226BCE4: ; 0x0226BCE4 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - ldr r0, [r5, #0] - bl ov16_0223E064 - add r4, r0, #0 - bl sub_0200384C - cmp r0, #0 - bne _0226BD64 - ldr r0, _0226BD68 ; =0x00000696 - mov r1, #1 - ldrsh r0, [r5, r0] - add r2, r1, #0 - add r3, r1, #0 - asr r0, r0, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, _0226BD6C ; =0x00007E37 - str r0, [sp, #4] - add r0, r4, #0 - bl sub_020039B0 - ldr r1, _0226BD70 ; =0x00000694 - ldrb r0, [r5, r1] - cmp r0, #0 - bne _0226BD2A - add r0, r1, #2 - ldrsh r2, [r5, r0] - mov r0, #2 - lsl r0, r0, #8 - add r2, r2, r0 - b _0226BD34 -_0226BD2A: - add r0, r1, #2 - ldrsh r2, [r5, r0] - mov r0, #2 - lsl r0, r0, #8 - sub r2, r2, r0 -_0226BD34: - add r0, r1, #2 - strh r2, [r5, r0] - ldr r0, _0226BD68 ; =0x00000696 - mov r1, #0x11 - ldrsh r2, [r5, r0] - lsl r1, r1, #8 - cmp r2, r1 - blt _0226BD54 - mov r1, #0xf - lsl r1, r1, #8 - strh r1, [r5, r0] - mov r1, #1 - sub r0, r0, #2 - add sp, #8 - strb r1, [r5, r0] - pop {r3, r4, r5, pc} -_0226BD54: - cmp r2, #0 - bgt _0226BD64 - mov r1, #1 - lsl r1, r1, #8 - strh r1, [r5, r0] - mov r1, #0 - sub r0, r0, #2 - strb r1, [r5, r0] -_0226BD64: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0226BD68: .word 0x00000696 -_0226BD6C: .word 0x00007E37 -_0226BD70: .word 0x00000694 - thumb_func_end ov16_0226BCE4 - - thumb_func_start ov16_0226BD74 -ov16_0226BD74: ; 0x0226BD74 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - bl sub_02002B3C - add r6, r0, #0 - bl sub_02002B5C - add r7, r0, #0 - bl sub_02002B4C - bl sub_02002B6C - ldr r0, [r5, #0] - bl ov16_0223E064 - add r4, r0, #0 - bl sub_0200384C - cmp r0, #0 - bne _0226BE40 - add r0, r4, #0 - mov r1, #1 - bl sub_0200316C - add r4, r0, #0 - ldr r0, _0226BE44 ; =0x021BF6BC - ldrh r0, [r0, #0x22] - cmp r0, #0 - beq _0226BDFC - cmp r6, #1 - beq _0226BDB6 - cmp r7, #1 - bne _0226BDFC -_0226BDB6: - ldr r1, [r5, #0x60] - add r0, r4, #0 - add r0, #0x10 - add r1, #0x10 - mov r2, #0x10 - bl sub_020D5190 - cmp r0, #0 - bne _0226BE40 - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #0x80 - tst r0, r1 - ldr r0, [r5, #0x64] - beq _0226BDEE - add r1, r4, #0 - mov r2, #0x20 - bl sub_020C4B18 - ldr r0, [r5, #0x64] - add r4, #0xe0 - add r0, #0x20 - add r1, r4, #0 - mov r2, #0x20 - bl sub_020C4B18 - pop {r3, r4, r5, r6, r7, pc} -_0226BDEE: - add r4, #0x10 - add r0, #0x10 - add r1, r4, #0 - mov r2, #0x10 - bl sub_020C4B18 - pop {r3, r4, r5, r6, r7, pc} -_0226BDFC: - ldr r1, [r5, #0x64] - add r0, r4, #0 - add r0, #0x10 - add r1, #0x10 - mov r2, #0x10 - bl sub_020D5190 - cmp r0, #0 - bne _0226BE40 - ldr r0, [r5, #0] - bl ov16_0223DF0C - mov r1, #0x80 - tst r0, r1 - ldr r0, [r5, #0x60] - beq _0226BE34 - add r1, r4, #0 - mov r2, #0x20 - bl sub_020C4B18 - ldr r0, [r5, #0x60] - add r4, #0xe0 - add r0, #0x20 - add r1, r4, #0 - mov r2, #0x20 - bl sub_020C4B18 - pop {r3, r4, r5, r6, r7, pc} -_0226BE34: - add r4, #0x10 - add r0, #0x10 - add r1, r4, #0 - mov r2, #0x10 - bl sub_020C4B18 -_0226BE40: - pop {r3, r4, r5, r6, r7, pc} - nop -_0226BE44: .word 0x021BF6BC - thumb_func_end ov16_0226BD74 - - thumb_func_start ov16_0226BE48 -ov16_0226BE48: ; 0x0226BE48 - push {r4, r5, r6, lr} - ldr r6, _0226BEAC ; =0x000006DC - add r5, r0, #0 - add r2, r6, #0 - sub r2, #0x51 - ldrsb r2, [r5, r2] - ldr r1, _0226BEB0 ; =0x02270670 - mov r3, #0x30 - add r4, r2, #0 - mul r4, r3 - add r4, r1, r4 - ldr r2, [r4, #0x20] - cmp r2, #0 - bne _0226BE6A - sub r3, #0x31 - add r0, r3, #0 - pop {r4, r5, r6, pc} -_0226BE6A: - ldrb r1, [r5, r6] - cmp r1, #0 - bne _0226BEA4 - add r0, r6, #4 - ldrb r0, [r5, r0] - cmp r0, #1 - beq _0226BE82 - ldr r1, _0226BEB4 ; =0x021BF67C - ldr r2, [r1, #0x48] - ldr r1, _0226BEB8 ; =0x00000CF3 - tst r1, r2 - beq _0226BE9E -_0226BE82: - cmp r0, #0 - bne _0226BE8C - ldr r0, _0226BEBC ; =0x000005DC - bl sub_02005748 -_0226BE8C: - mov r1, #1 - mov r0, #0x6e - strb r1, [r5, r6] - mov r2, #0 - lsl r0, r0, #4 - strb r2, [r5, r0] - ldr r2, [r4, #0x20] - add r0, r5, #0 - blx r2 -_0226BE9E: - mov r0, #0 - mvn r0, r0 - pop {r4, r5, r6, pc} -_0226BEA4: - mov r1, #0 - blx r2 - pop {r4, r5, r6, pc} - nop -_0226BEAC: .word 0x000006DC -_0226BEB0: .word 0x02270670 -_0226BEB4: .word 0x021BF67C -_0226BEB8: .word 0x00000CF3 -_0226BEBC: .word 0x000005DC - thumb_func_end ov16_0226BE48 - - thumb_func_start ov16_0226BEC0 -ov16_0226BEC0: ; 0x0226BEC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp, #8] - ldr r1, _0226C080 ; =0x000006DC - add r6, r0, #0 - add r2, r1, #0 - sub r2, #0x51 - ldrsb r3, [r6, r2] - add r4, r6, r1 - mov r2, #0x30 - sub r1, #0x52 - ldr r0, _0226C084 ; =0x02270670 - mul r2, r3 - add r7, r0, r2 - ldrb r1, [r6, r1] - ldr r0, [r6, #0] - bl ov16_0223E1C4 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov16_0223DF14 - bl ov16_02263B0C - ldr r1, [sp, #8] - cmp r1, #1 - bne _0226BF44 - mov r1, #0 - ldrsb r1, [r0, r1] - ldr r2, _0226C088 ; =0x022701EC - strb r1, [r4, #2] - mov r1, #1 - ldrsb r0, [r0, r1] - strb r0, [r4, #1] - ldrsb r1, [r4, r1] - lsl r0, r1, #1 - add r3, r1, r0 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r7, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r7, #0x14] - ldr r0, _0226C08C ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0226BF44: - ldr r0, _0226C090 ; =0x0000068B - ldrsb r0, [r6, r0] - cmp r0, #5 - beq _0226BF50 - cmp r0, #6 - bne _0226BF60 -_0226BF50: - mov r1, #1 - ldr r3, _0226C088 ; =0x022701EC - add r0, r4, #0 - add r2, r1, #0 - bl ov16_0226CB10 - add r5, r0, #0 - b _0226BFCA -_0226BF60: - mov r0, #1 - ldrsb r1, [r4, r0] - lsl r0, r1, #1 - add r2, r1, r0 - mov r0, #2 - ldr r1, _0226C088 ; =0x022701EC - ldrsb r0, [r4, r0] - add r1, r1, r2 - ldrb r0, [r0, r1] - str r0, [sp, #0xc] - cmp r0, #3 - bne _0226BF82 - ldr r0, _0226C094 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x40 - tst r0, r1 - bne _0226BFCA -_0226BF82: - ldr r3, _0226C088 ; =0x022701EC - add r0, r4, #0 - mov r1, #3 - mov r2, #2 - bl ov16_0226CB10 - add r5, r0, #0 - bne _0226BFCA - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _0226BFCA - ldr r0, _0226C094 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x20 - tst r0, r1 - beq _0226BFB4 - mov r0, #0 - strb r0, [r4, #2] - mov r0, #1 - strb r0, [r4, #1] - ldr r0, _0226C098 ; =0x000005DC - bl sub_02005748 - mov r5, #0x20 - b _0226BFCA -_0226BFB4: - mov r0, #0x10 - tst r0, r1 - beq _0226BFCA - mov r0, #2 - strb r0, [r4, #2] - mov r0, #1 - strb r0, [r4, #1] - ldr r0, _0226C098 ; =0x000005DC - bl sub_02005748 - mov r5, #0x10 -_0226BFCA: - cmp r5, #0x20 - bhi _0226BFE6 - bhs _0226BFF2 - cmp r5, #2 - bhi _0226BFE0 - cmp r5, #1 - blo _0226C076 - beq _0226C030 - cmp r5, #2 - beq _0226C046 - b _0226C076 -_0226BFE0: - cmp r5, #0x10 - beq _0226BFF2 - b _0226C076 -_0226BFE6: - cmp r5, #0x40 - bhi _0226BFEE - beq _0226BFF2 - b _0226C076 -_0226BFEE: - cmp r5, #0x80 - bne _0226C076 -_0226BFF2: - mov r0, #1 - ldrsb r1, [r4, r0] - ldr r2, _0226C088 ; =0x022701EC - lsl r0, r1, #1 - add r3, r1, r0 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r7, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r7, #0x14] - ldr r0, _0226C08C ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - b _0226C076 -_0226C030: - mov r0, #1 - ldrsb r1, [r4, r0] - ldr r2, _0226C088 ; =0x022701EC - add sp, #0x10 - lsl r0, r1, #1 - add r3, r1, r0 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r0, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_0226C046: - ldr r0, _0226C09C ; =0x0000068F - ldrb r0, [r6, r0] - cmp r0, #1 - bne _0226C076 - mov r0, #0 - add r2, r0, #0 - mov r3, #1 - ldr r1, [r7, #0x18] - ldr r5, [r7, #0x14] - b _0226C064 -_0226C05A: - lsl r4, r0, #2 - ldr r4, [r1, r4] - cmp r4, #4 - beq _0226C07A - add r0, r0, #1 -_0226C064: - lsl r4, r0, #2 - ldrb r4, [r5, r4] - cmp r0, r4 - bge _0226C070 - add r4, r3, #0 - b _0226C072 -_0226C070: - add r4, r2, #0 -_0226C072: - cmp r4, #0xff - bne _0226C05A -_0226C076: - mov r0, #0 - mvn r0, r0 -_0226C07A: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226C080: .word 0x000006DC -_0226C084: .word 0x02270670 -_0226C088: .word 0x022701EC -_0226C08C: .word 0x000006D8 -_0226C090: .word 0x0000068B -_0226C094: .word 0x021BF67C -_0226C098: .word 0x000005DC -_0226C09C: .word 0x0000068F - thumb_func_end ov16_0226BEC0 - - thumb_func_start ov16_0226C0A0 -ov16_0226C0A0: ; 0x0226C0A0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, _0226C0F4 ; =0x0000068A - ldr r0, [r5, #0] - ldrb r1, [r5, r1] - bl ov16_0223E1C4 - add r1, r0, #0 - cmp r4, #3 - bne _0226C0BE - ldr r0, _0226C0F8 ; =0x000006E1 - ldrb r0, [r5, r0] - cmp r0, #0 - bne _0226C0F2 -_0226C0BE: - ldr r0, [r5, #0] - bl ov16_0223DF14 - bl ov16_02263B0C - mov r5, #0 - ldr r1, _0226C0FC ; =0x022701EC - add r2, r5, #0 - b _0226C0EE -_0226C0D0: - lsl r6, r5, #1 - add r6, r5, r6 - add r3, r2, #0 - add r7, r1, r6 - b _0226C0E8 -_0226C0DA: - ldrb r6, [r3, r7] - cmp r4, r6 - bne _0226C0E6 - strb r3, [r0] - strb r5, [r0, #1] - pop {r3, r4, r5, r6, r7, pc} -_0226C0E6: - add r3, r3, #1 -_0226C0E8: - cmp r3, #3 - blt _0226C0DA - add r5, r5, #1 -_0226C0EE: - cmp r5, #2 - blt _0226C0D0 -_0226C0F2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C0F4: .word 0x0000068A -_0226C0F8: .word 0x000006E1 -_0226C0FC: .word 0x022701EC - thumb_func_end ov16_0226C0A0 - - thumb_func_start ov16_0226C100 -ov16_0226C100: ; 0x0226C100 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - ldr r0, _0226C1E8 ; =0x000006DC - ldr r2, _0226C1EC ; =0x02270670 - add r3, r0, #0 - sub r3, #0x51 - ldrsb r5, [r6, r3] - mov r3, #0x30 - add r4, r6, r0 - mul r3, r5 - add r5, r2, r3 - cmp r1, #1 - bne _0226C162 - mov r1, #0 - strb r1, [r4, #2] - strb r1, [r4, #1] - mov r1, #1 - ldrsb r2, [r4, r1] - mov r3, #2 - ldr r1, _0226C1F0 ; =0x022701CC - ldrsb r3, [r4, r3] - add r1, r1, r2 - sub r0, r0, #4 - ldrb r2, [r3, r1] - ldr r1, [r5, #0x14] - lsl r3, r2, #2 - add r1, r1, r3 - ldrb r1, [r1, #1] - sub r1, #8 - str r1, [sp] - mov r1, #0x11 - lsl r1, r1, #0x10 - str r1, [sp, #4] - ldr r4, [r5, #0x14] - ldr r0, [r6, r0] - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - mov r0, #0 - add sp, #8 - mvn r0, r0 - pop {r4, r5, r6, pc} -_0226C162: - ldr r3, _0226C1F0 ; =0x022701CC - add r0, r4, #0 - mov r1, #1 - mov r2, #2 - bl ov16_0226CB10 - cmp r0, #0x20 - bhi _0226C188 - bhs _0226C194 - cmp r0, #2 - bhi _0226C182 - cmp r0, #1 - blo _0226C1E0 - beq _0226C1CE - cmp r0, #2 - b _0226C1E0 -_0226C182: - cmp r0, #0x10 - beq _0226C194 - b _0226C1E0 -_0226C188: - cmp r0, #0x40 - bhi _0226C190 - beq _0226C194 - b _0226C1E0 -_0226C190: - cmp r0, #0x80 - bne _0226C1E0 -_0226C194: - mov r0, #1 - ldrsb r3, [r4, r0] - mov r0, #2 - ldr r2, _0226C1F0 ; =0x022701CC - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r5, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r5, #0x14] - ldr r0, _0226C1F4 ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - b _0226C1E0 -_0226C1CE: - mov r0, #1 - ldrsb r3, [r4, r0] - mov r0, #2 - ldr r2, _0226C1F0 ; =0x022701CC - ldrsb r1, [r4, r0] - add r0, r2, r3 - add sp, #8 - ldrb r0, [r1, r0] - pop {r4, r5, r6, pc} -_0226C1E0: - mov r0, #0 - mvn r0, r0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0226C1E8: .word 0x000006DC -_0226C1EC: .word 0x02270670 -_0226C1F0: .word 0x022701CC -_0226C1F4: .word 0x000006D8 - thumb_func_end ov16_0226C100 - - thumb_func_start ov16_0226C1F8 -ov16_0226C1F8: ; 0x0226C1F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - add r5, r0, #0 - ldr r1, _0226C364 ; =0x0000068A - ldr r0, [r5, #0] - ldrb r1, [r5, r1] - bl ov16_0223E1C4 - add r1, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223DF14 - bl ov16_02263B0C - ldr r1, _0226C368 ; =0x000006DC - add r3, r0, #0 - add r4, r5, r1 - sub r1, #0x51 - ldrsb r2, [r5, r1] - mov r1, #0x30 - ldr r0, _0226C36C ; =0x02270670 - mul r1, r2 - add r2, r5, #0 - add r6, r0, r1 - add r2, #0x1c - cmp r7, #1 - bne _0226C2A6 - mov r0, #2 - ldrsb r0, [r3, r0] - strb r0, [r4, #2] - mov r0, #3 - ldrsb r0, [r3, r0] - strb r0, [r4, #1] - mov r0, #1 - ldrsb r0, [r4, r0] - lsl r1, r0, #1 - mov r0, #2 - ldrsb r7, [r4, r0] - ldr r0, _0226C370 ; =0x022701E4 - add r0, r0, r1 - ldrb r0, [r7, r0] - cmp r0, #0 - beq _0226C274 - sub r1, r0, #1 - lsl r1, r1, #1 - ldrh r1, [r2, r1] - cmp r1, #0 - bne _0226C274 - mov r0, #0 - strb r0, [r3, #2] - strb r0, [r3, #3] - strb r0, [r4, #2] - strb r0, [r4, #1] - mov r0, #1 - ldrsb r0, [r4, r0] - lsl r2, r0, #1 - mov r0, #2 - ldrsb r1, [r4, r0] - ldr r0, _0226C370 ; =0x022701E4 - add r0, r0, r2 - ldrb r0, [r1, r0] -_0226C274: - ldr r1, [r6, #0x14] - lsl r3, r0, #2 - add r0, r1, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r6, #0x14] - ldr r0, _0226C374 ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r5, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0226C2A6: - ldr r0, _0226C370 ; =0x022701E4 - add r1, sp, #8 - mov r2, #6 - bl sub_020C4DB0 - add r0, r4, #0 - mov r1, #2 - mov r2, #3 - add r3, sp, #8 - bl ov16_0226CB10 - cmp r0, #0x20 - bhi _0226C2D8 - bhs _0226C2E4 - cmp r0, #2 - bhi _0226C2D2 - cmp r0, #1 - blo _0226C35C - beq _0226C320 - cmp r0, #2 - beq _0226C334 - b _0226C35C -_0226C2D2: - cmp r0, #0x10 - beq _0226C2E4 - b _0226C35C -_0226C2D8: - cmp r0, #0x40 - bhi _0226C2E0 - beq _0226C2E4 - b _0226C35C -_0226C2E0: - cmp r0, #0x80 - bne _0226C35C -_0226C2E4: - mov r0, #1 - ldrsb r0, [r4, r0] - ldr r2, _0226C370 ; =0x022701E4 - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r6, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r6, #0x14] - ldr r0, _0226C374 ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r5, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - b _0226C35C -_0226C320: - mov r0, #1 - ldrsb r0, [r4, r0] - ldr r2, _0226C370 ; =0x022701E4 - add sp, #0x10 - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r0, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_0226C334: - mov r0, #0 - add r2, r0, #0 - mov r3, #1 - ldr r1, [r6, #0x18] - ldr r5, [r6, #0x14] - b _0226C34A -_0226C340: - lsl r4, r0, #2 - ldr r4, [r1, r4] - cmp r4, #0xff - beq _0226C360 - add r0, r0, #1 -_0226C34A: - lsl r4, r0, #2 - ldrb r4, [r5, r4] - cmp r0, r4 - bge _0226C356 - add r4, r3, #0 - b _0226C358 -_0226C356: - add r4, r2, #0 -_0226C358: - cmp r4, #0xff - bne _0226C340 -_0226C35C: - mov r0, #0 - mvn r0, r0 -_0226C360: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C364: .word 0x0000068A -_0226C368: .word 0x000006DC -_0226C36C: .word 0x02270670 -_0226C370: .word 0x022701E4 -_0226C374: .word 0x000006D8 - thumb_func_end ov16_0226C1F8 - - thumb_func_start ov16_0226C378 -ov16_0226C378: ; 0x0226C378 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - beq _0226C3BE - ldr r1, _0226C3C0 ; =0x0000068A - ldr r0, [r5, #0] - ldrb r1, [r5, r1] - bl ov16_0223E1C4 - add r1, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223DF14 - bl ov16_02263B0C - mov r3, #0 - ldr r7, _0226C3C4 ; =0x022701E4 - add r1, r3, #0 - b _0226C3BA -_0226C39E: - lsl r5, r3, #1 - add r2, r1, #0 - add r6, r7, r5 - b _0226C3B4 -_0226C3A6: - ldrb r5, [r2, r6] - cmp r4, r5 - bne _0226C3B2 - strb r2, [r0, #2] - strb r3, [r0, #3] - pop {r3, r4, r5, r6, r7, pc} -_0226C3B2: - add r2, r2, #1 -_0226C3B4: - cmp r2, #2 - blt _0226C3A6 - add r3, r3, #1 -_0226C3BA: - cmp r3, #3 - blt _0226C39E -_0226C3BE: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C3C0: .word 0x0000068A -_0226C3C4: .word 0x022701E4 - thumb_func_end ov16_0226C378 - - thumb_func_start ov16_0226C3C8 -ov16_0226C3C8: ; 0x0226C3C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - str r1, [sp, #0x18] - add r6, r0, #0 - ldr r1, _0226C6A8 ; =0x0000068A - mov r0, #0 - str r0, [sp, #0x44] - ldrb r1, [r6, r1] - ldr r0, [r6, #0] - bl ov16_0223E1C4 - add r1, r0, #0 - ldr r0, [r6, #0] - bl ov16_0223DF14 - bl ov16_02263B0C - ldr r1, _0226C6AC ; =0x000006DC - str r0, [sp, #0x1c] - add r7, r6, r1 - sub r1, #0x51 - ldrsb r2, [r6, r1] - mov r1, #0x30 - ldr r0, _0226C6B0 ; =0x02270670 - mul r1, r2 - add r0, r0, r1 - str r0, [sp, #0x48] - ldr r0, _0226C6B4 ; =0x022701DC - add r1, sp, #0x50 - mov r2, #6 - bl sub_020C4DB0 - add r1, sp, #0x58 - add r0, r6, #0 - add r1, #2 - mov r2, #1 - bl ov16_0226B20C - add r1, sp, #0x54 - add r0, r6, #0 - add r1, #2 - mov r2, #0 - bl ov16_0226B20C - add r0, sp, #0x54 - mov r2, #0 - mov r4, #0xff - add r0, #2 - b _0226C446 -_0226C42A: - lsl r5, r2, #1 - add r1, sp, #0x50 - mov r3, #0 - add r1, r1, r5 - b _0226C440 -_0226C434: - ldrb r5, [r3, r1] - ldrb r5, [r0, r5] - cmp r5, #0 - bne _0226C43E - strb r4, [r3, r1] -_0226C43E: - add r3, r3, #1 -_0226C440: - cmp r3, #2 - blt _0226C434 - add r2, r2, #1 -_0226C446: - cmp r2, #2 - blt _0226C42A - ldr r0, _0226C6B8 ; =0x0000068C - ldrb r0, [r6, r0] - cmp r0, #0xb - bhi _0226C476 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226C45E: ; jump table - .short _0226C476 - _0226C45E - 2 ; case 0 - .short _0226C480 - _0226C45E - 2 ; case 1 - .short _0226C480 - _0226C45E - 2 ; case 2 - .short _0226C480 - _0226C45E - 2 ; case 3 - .short _0226C476 - _0226C45E - 2 ; case 4 - .short _0226C480 - _0226C45E - 2 ; case 5 - .short _0226C476 - _0226C45E - 2 ; case 6 - .short _0226C480 - _0226C45E - 2 ; case 7 - .short _0226C476 - _0226C45E - 2 ; case 8 - .short _0226C476 - _0226C45E - 2 ; case 9 - .short _0226C476 - _0226C45E - 2 ; case 10 - .short _0226C476 - _0226C45E - 2 ; case 11 -_0226C476: - mov r0, #2 - mov ip, r0 - mov r0, #3 - str r0, [sp, #0x4c] - b _0226C65A -_0226C480: - mov r0, #1 - str r0, [sp, #0x44] - mov ip, r0 - mov r0, #2 - str r0, [sp, #0x4c] - add r0, sp, #0x50 - ldrb r1, [r0, #9] - cmp r1, #1 - bne _0226C4BA - ldrb r0, [r0, #7] - cmp r0, #1 - bne _0226C4BA - ldr r0, [sp, #0x48] - ldr r1, [r0, #0x14] - ldrb r0, [r1, #0xe] - ldrb r2, [r1, #0xd] - str r0, [sp, #0x34] - add r0, #8 - str r0, [sp, #0x34] - ldrb r0, [r1, #7] - sub r2, #8 - str r0, [sp, #0x30] - sub r0, #8 - str r0, [sp, #0x30] - ldrb r0, [r1, #0xc] - str r0, [sp, #0x38] - add r0, #8 - str r0, [sp, #0x38] - b _0226C526 -_0226C4BA: - add r0, sp, #0x50 - ldrb r1, [r0, #9] - cmp r1, #1 - bne _0226C4EA - ldrb r0, [r0, #7] - cmp r0, #0 - bne _0226C4EA - ldr r0, [sp, #0x48] - ldr r1, [r0, #0x14] - ldrb r0, [r1, #0xe] - ldrb r2, [r1, #0xd] - str r0, [sp, #0x34] - add r0, #8 - str r0, [sp, #0x34] - ldrb r0, [r1, #0xf] - sub r2, #8 - str r0, [sp, #0x30] - sub r0, #8 - str r0, [sp, #0x30] - ldrb r0, [r1, #0xc] - str r0, [sp, #0x38] - add r0, #8 - str r0, [sp, #0x38] - b _0226C526 -_0226C4EA: - add r0, sp, #0x50 - ldrb r1, [r0, #9] - cmp r1, #0 - bne _0226C51A - ldrb r0, [r0, #7] - cmp r0, #1 - bne _0226C51A - ldr r0, [sp, #0x48] - ldr r1, [r0, #0x14] - ldrb r0, [r1, #6] - ldrb r2, [r1, #5] - str r0, [sp, #0x34] - add r0, #8 - str r0, [sp, #0x34] - ldrb r0, [r1, #7] - sub r2, #8 - str r0, [sp, #0x30] - sub r0, #8 - str r0, [sp, #0x30] - ldrb r0, [r1, #4] - str r0, [sp, #0x38] - add r0, #8 - str r0, [sp, #0x38] - b _0226C526 -_0226C51A: - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x34] - str r0, [sp, #0x30] - str r0, [sp, #0x38] - add r2, r0, #0 -_0226C526: - add r0, sp, #0x50 - ldrb r1, [r0, #6] - cmp r1, #1 - bne _0226C54E - ldrb r0, [r0, #8] - cmp r0, #1 - bne _0226C54E - ldr r0, [sp, #0x48] - ldr r0, [r0, #0x14] - ldrb r3, [r0, #2] - ldrb r4, [r0, #0xb] - ldrb r5, [r0] - ldrb r0, [r0, #1] - add r3, #8 - sub r4, #8 - str r0, [sp, #0x2c] - sub r0, #8 - add r5, #8 - str r0, [sp, #0x2c] - b _0226C5A8 -_0226C54E: - add r0, sp, #0x50 - ldrb r1, [r0, #6] - cmp r1, #1 - bne _0226C576 - ldrb r0, [r0, #8] - cmp r0, #0 - bne _0226C576 - ldr r0, [sp, #0x48] - ldr r0, [r0, #0x14] - ldrb r3, [r0, #2] - ldrb r4, [r0, #3] - ldrb r5, [r0] - ldrb r0, [r0, #1] - add r3, #8 - sub r4, #8 - str r0, [sp, #0x2c] - sub r0, #8 - add r5, #8 - str r0, [sp, #0x2c] - b _0226C5A8 -_0226C576: - add r0, sp, #0x50 - ldrb r1, [r0, #6] - cmp r1, #0 - bne _0226C59E - ldrb r0, [r0, #8] - cmp r0, #1 - bne _0226C59E - ldr r0, [sp, #0x48] - ldr r0, [r0, #0x14] - ldrb r3, [r0, #0xa] - ldrb r4, [r0, #0xb] - ldrb r5, [r0, #8] - ldrb r0, [r0, #9] - add r3, #8 - sub r4, #8 - str r0, [sp, #0x2c] - sub r0, #8 - add r5, #8 - str r0, [sp, #0x2c] - b _0226C5A8 -_0226C59E: - mov r3, #0 - mvn r3, r3 - add r4, r3, #0 - add r5, r3, #0 - str r3, [sp, #0x2c] -_0226C5A8: - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x40] - str r0, [sp, #0x3c] - str r0, [sp, #0x28] - str r0, [sp, #0x24] - ldr r0, [sp, #0x34] - cmp r0, r3 - beq _0226C5DE - add r1, r0, #0 - ldr r0, [sp, #0x40] - cmp r1, r0 - beq _0226C5C6 - cmp r3, r0 - beq _0226C5DE -_0226C5C6: - mov r1, #0 - ldr r0, [sp, #0x34] - mvn r1, r1 - cmp r0, r1 - bne _0226C5D8 - cmp r3, r1 - beq _0226C5D8 - str r3, [sp, #0x34] - b _0226C5DE -_0226C5D8: - mov r0, #2 - str r3, [sp, #0x40] - str r0, [sp, #0x20] -_0226C5DE: - ldr r0, [sp, #0x30] - cmp r0, r4 - beq _0226C608 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0226C5F0 - cmp r4, r1 - beq _0226C608 -_0226C5F0: - mov r1, #0 - ldr r0, [sp, #0x30] - mvn r1, r1 - cmp r0, r1 - bne _0226C602 - cmp r4, r1 - beq _0226C602 - str r4, [sp, #0x30] - b _0226C608 -_0226C602: - mov r0, #3 - str r4, [sp, #0x40] - str r0, [sp, #0x20] -_0226C608: - mov r1, #0 - ldr r0, [sp, #0x38] - mvn r1, r1 - cmp r0, r1 - beq _0226C616 - cmp r5, r1 - beq _0226C62A -_0226C616: - mov r1, #0 - ldr r0, [sp, #0x38] - mvn r1, r1 - cmp r0, r1 - bne _0226C628 - cmp r5, r1 - beq _0226C628 - str r5, [sp, #0x38] - b _0226C62A -_0226C628: - str r2, [sp, #0x3c] -_0226C62A: - mov r1, #0 - mvn r1, r1 - cmp r2, r1 - beq _0226C63C - ldr r0, [sp, #0x2c] - cmp r0, r1 - bne _0226C63C - str r2, [sp, #0x2c] - b _0226C65A -_0226C63C: - mov r1, #0 - mvn r1, r1 - cmp r2, r1 - bne _0226C64A - ldr r0, [sp, #0x2c] - cmp r0, r1 - bne _0226C65A -_0226C64A: - ldr r0, [sp, #0x2c] - str r0, [sp, #0x3c] - ldr r0, [sp, #0x20] - cmp r0, #2 - bne _0226C658 - str r2, [sp, #0x24] - b _0226C65A -_0226C658: - str r2, [sp, #0x28] -_0226C65A: - ldr r0, [sp, #0x18] - cmp r0, #1 - beq _0226C662 - b _0226C7CE -_0226C662: - ldr r0, [sp, #0x44] - cmp r0, #0 - bne _0226C712 - ldr r0, [sp, #0x1c] - mov r1, #6 - ldrsb r1, [r0, r1] - ldr r0, _0226C6B8 ; =0x0000068C - ldrb r0, [r6, r0] - cmp r1, r0 - bne _0226C688 - ldr r0, [sp, #0x1c] - mov r1, #4 - ldrsb r0, [r0, r1] - mov r1, #5 - strb r0, [r7, #2] - ldr r0, [sp, #0x1c] - ldrsb r0, [r0, r1] - strb r0, [r7, #1] - b _0226C6D2 -_0226C688: - add r0, sp, #0x50 - ldrb r1, [r0, #0xd] - cmp r1, #1 - bne _0226C698 - mov r0, #0 - strb r0, [r7, #2] - strb r0, [r7, #1] - b _0226C6D2 -_0226C698: - ldrb r1, [r0, #0xb] - cmp r1, #1 - bne _0226C6BC - mov r0, #1 - strb r0, [r7, #2] - mov r0, #0 - strb r0, [r7, #1] - b _0226C6D2 - ; .align 2, 0 -_0226C6A8: .word 0x0000068A -_0226C6AC: .word 0x000006DC -_0226C6B0: .word 0x02270670 -_0226C6B4: .word 0x022701DC -_0226C6B8: .word 0x0000068C -_0226C6BC: - ldrb r0, [r0, #0xa] - cmp r0, #1 - bne _0226C6CC - mov r0, #0 - strb r0, [r7, #2] - mov r0, #1 - strb r0, [r7, #1] - b _0226C6D2 -_0226C6CC: - mov r0, #1 - strb r0, [r7, #2] - strb r0, [r7, #1] -_0226C6D2: - mov r0, #1 - ldrsb r0, [r7, r0] - ldr r2, _0226C9B0 ; =0x022701DC - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r7, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [sp, #0x48] - lsl r3, r1, #2 - ldr r0, [r0, #0x14] - ldr r1, [sp, #0x48] - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r1, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - b _0226C7C6 -_0226C712: - mov r2, #0 - strb r2, [r7, #2] - ldr r0, [sp, #0x24] - sub r1, r2, #1 - strb r2, [r7, #1] - cmp r0, r1 - bne _0226C726 - ldr r0, [sp, #0x28] - cmp r0, r1 - beq _0226C730 -_0226C726: - mov r1, #0 - ldr r0, [sp, #0x40] - mvn r1, r1 - cmp r0, r1 - bne _0226C74A -_0226C730: - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x34] - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r2, [sp, #0x30] - ldr r0, [r6, r0] - ldr r3, [sp, #0x38] - bl ov16_0226DD9C - b _0226C7A8 -_0226C74A: - ldr r0, [sp, #0x24] - cmp r0, r1 - beq _0226C780 - ldr r0, [sp, #0x28] - cmp r0, r1 - bne _0226C780 - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x34] - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r2, [sp, #0x38] - str r0, [sp, #4] - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x30] - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x10] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DCCC - b _0226C7A8 -_0226C780: - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x34] - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r2, [sp, #0x38] - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - ldr r3, [sp, #0x30] - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - str r0, [sp, #0x10] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DCCC -_0226C7A8: - mov r1, #0 - ldr r0, [sp, #0x40] - mvn r1, r1 - cmp r0, r1 - beq _0226C7C6 - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r1, [sp, #0x40] - ldr r0, [r6, r0] - ldr r2, [sp, #0x3c] - ldr r3, [sp, #0x20] - bl ov16_0226DDC0 -_0226C7C6: - mov r0, #0 - add sp, #0x60 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0226C7CE: - ldr r0, [sp, #0x44] - cmp r0, #0 - bne _0226C7E2 - ldr r2, [sp, #0x4c] - add r0, r7, #0 - mov r1, ip - add r3, sp, #0x50 - bl ov16_0226CB10 - b _0226C7EE -_0226C7E2: - ldr r2, [sp, #0x4c] - add r0, r7, #0 - mov r1, ip - mov r3, #0 - bl ov16_0226CB10 -_0226C7EE: - cmp r0, #0x20 - bhi _0226C80E - bhs _0226C81C - cmp r0, #2 - bhi _0226C808 - cmp r0, #1 - blo _0226C806 - bne _0226C800 - b _0226C956 -_0226C800: - cmp r0, #2 - bne _0226C806 - b _0226C9A2 -_0226C806: - b _0226C9A8 -_0226C808: - cmp r0, #0x10 - beq _0226C81C - b _0226C9A8 -_0226C80E: - cmp r0, #0x40 - bhi _0226C816 - beq _0226C81C - b _0226C9A8 -_0226C816: - cmp r0, #0x80 - beq _0226C81C - b _0226C9A8 -_0226C81C: - ldr r0, [sp, #0x44] - cmp r0, #0 - bne _0226C862 - mov r0, #1 - ldrsb r0, [r7, r0] - ldr r2, _0226C9B0 ; =0x022701DC - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r7, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [sp, #0x48] - lsl r3, r1, #2 - ldr r0, [r0, #0x14] - ldr r1, [sp, #0x48] - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r1, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - b _0226C9A8 -_0226C862: - mov r2, #1 - ldrsb r0, [r7, r2] - cmp r0, #0 - bne _0226C924 - ldr r0, [sp, #0x28] - sub r1, r2, #2 - cmp r0, r1 - bne _0226C878 - ldr r0, [sp, #0x24] - cmp r0, r1 - beq _0226C882 -_0226C878: - mov r1, #0 - ldr r0, [sp, #0x40] - mvn r1, r1 - cmp r0, r1 - bne _0226C89C -_0226C882: - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x34] - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r2, [sp, #0x30] - ldr r0, [r6, r0] - ldr r3, [sp, #0x38] - bl ov16_0226DD9C - b _0226C8FA -_0226C89C: - ldr r0, [sp, #0x24] - cmp r0, r1 - beq _0226C8D2 - ldr r0, [sp, #0x28] - cmp r0, r1 - bne _0226C8D2 - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x34] - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r2, [sp, #0x38] - str r0, [sp, #4] - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x30] - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x10] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DCCC - b _0226C8FA -_0226C8D2: - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x34] - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r2, [sp, #0x38] - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - ldr r3, [sp, #0x30] - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - str r0, [sp, #0x10] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DCCC -_0226C8FA: - mov r1, #0 - ldr r0, [sp, #0x40] - mvn r1, r1 - cmp r0, r1 - beq _0226C91A - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r1, [sp, #0x40] - ldr r0, [r6, r0] - ldr r2, [sp, #0x3c] - ldr r3, [sp, #0x20] - bl ov16_0226DDC0 - b _0226C9A8 -_0226C91A: - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DE04 - b _0226C9A8 -_0226C924: - ldr r0, [sp, #0x48] - ldr r1, [sp, #0x48] - ldr r0, [r0, #0x14] - ldrb r0, [r0, #0x11] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r3, [r1, #0x14] - ldr r0, _0226C9B4 ; =0x000006D8 - ldrb r1, [r3, #0x12] - ldrb r2, [r3, #0x13] - ldrb r3, [r3, #0x10] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - ldr r0, _0226C9B4 ; =0x000006D8 - ldr r0, [r6, r0] - bl ov16_0226DE04 - b _0226C9A8 -_0226C956: - ldr r0, [sp, #0x44] - cmp r0, #1 - bne _0226C980 - mov r0, #1 - ldrsb r0, [r7, r0] - cmp r0, #0 - ble _0226C96A - add sp, #0x60 - mov r0, #4 - pop {r3, r4, r5, r6, r7, pc} -_0226C96A: - add r2, sp, #0x58 - mov r0, #0 - add r2, #2 - b _0226C97A -_0226C972: - ldrb r1, [r2, r0] - cmp r1, #1 - beq _0226C9AC - add r0, r0, #1 -_0226C97A: - cmp r0, #4 - blt _0226C972 - b _0226C9A8 -_0226C980: - mov r0, #1 - ldrsb r0, [r7, r0] - ldr r2, _0226C9B0 ; =0x022701DC - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r7, r0] - add r0, r2, r3 - ldrb r0, [r1, r0] - cmp r0, #4 - beq _0226C9AC - add r1, sp, #0x58 - add r1, #2 - ldrb r1, [r1, r0] - cmp r1, #1 - bne _0226C9A8 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} -_0226C9A2: - add sp, #0x60 - mov r0, #4 - pop {r3, r4, r5, r6, r7, pc} -_0226C9A8: - mov r0, #0 - mvn r0, r0 -_0226C9AC: - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C9B0: .word 0x022701DC -_0226C9B4: .word 0x000006D8 - thumb_func_end ov16_0226C3C8 - - thumb_func_start ov16_0226C9B8 -ov16_0226C9B8: ; 0x0226C9B8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #4 - beq _0226CA06 - ldr r1, _0226CA08 ; =0x0000068A - ldr r0, [r5, #0] - ldrb r1, [r5, r1] - bl ov16_0223E1C4 - add r1, r0, #0 - ldr r0, [r5, #0] - bl ov16_0223DF14 - bl ov16_02263B0C - ldr r1, _0226CA0C ; =0x0000068C - mov r3, #0 - ldrb r1, [r5, r1] - ldr r7, _0226CA10 ; =0x022701DC - strb r1, [r0, #6] - add r1, r3, #0 - b _0226CA02 -_0226C9E6: - lsl r5, r3, #1 - add r2, r1, #0 - add r6, r7, r5 - b _0226C9FC -_0226C9EE: - ldrb r5, [r2, r6] - cmp r4, r5 - bne _0226C9FA - strb r2, [r0, #4] - strb r3, [r0, #5] - pop {r3, r4, r5, r6, r7, pc} -_0226C9FA: - add r2, r2, #1 -_0226C9FC: - cmp r2, #2 - blt _0226C9EE - add r3, r3, #1 -_0226CA02: - cmp r3, #3 - blt _0226C9E6 -_0226CA06: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226CA08: .word 0x0000068A -_0226CA0C: .word 0x0000068C -_0226CA10: .word 0x022701DC - thumb_func_end ov16_0226C9B8 - - thumb_func_start ov16_0226CA14 -ov16_0226CA14: ; 0x0226CA14 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - ldr r0, _0226CB00 ; =0x000006DC - ldr r2, _0226CB04 ; =0x02270670 - add r3, r0, #0 - sub r3, #0x51 - ldrsb r5, [r6, r3] - mov r3, #0x30 - add r4, r6, r0 - mul r3, r5 - add r5, r2, r3 - cmp r1, #1 - bne _0226CA70 - mov r1, #1 - ldrsb r2, [r4, r1] - mov r3, #2 - ldr r1, _0226CB08 ; =0x022701C8 - ldrsb r3, [r4, r3] - add r1, r1, r2 - sub r0, r0, #4 - ldrb r2, [r3, r1] - ldr r1, [r5, #0x14] - lsl r3, r2, #2 - add r1, r1, r3 - ldrb r1, [r1, #1] - sub r1, #8 - str r1, [sp] - mov r1, #0x11 - lsl r1, r1, #0x10 - str r1, [sp, #4] - ldr r4, [r5, #0x14] - ldr r0, [r6, r0] - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - mov r0, #0 - add sp, #8 - mvn r0, r0 - pop {r4, r5, r6, pc} -_0226CA70: - ldr r3, _0226CB08 ; =0x022701C8 - add r0, r4, #0 - mov r1, #1 - mov r2, #2 - bl ov16_0226CB10 - cmp r0, #0x20 - bhi _0226CA98 - bhs _0226CAA4 - cmp r0, #2 - bhi _0226CA92 - cmp r0, #1 - blo _0226CAF6 - beq _0226CADE - cmp r0, #2 - beq _0226CAF0 - b _0226CAF6 -_0226CA92: - cmp r0, #0x10 - beq _0226CAA4 - b _0226CAF6 -_0226CA98: - cmp r0, #0x40 - bhi _0226CAA0 - beq _0226CAA4 - b _0226CAF6 -_0226CAA0: - cmp r0, #0x80 - bne _0226CAF6 -_0226CAA4: - mov r0, #1 - ldrsb r3, [r4, r0] - mov r0, #2 - ldr r2, _0226CB08 ; =0x022701C8 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r5, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r5, #0x14] - ldr r0, _0226CB0C ; =0x000006D8 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov16_0226DD9C - b _0226CAF6 -_0226CADE: - mov r0, #1 - ldrsb r3, [r4, r0] - mov r0, #2 - ldr r2, _0226CB08 ; =0x022701C8 - ldrsb r1, [r4, r0] - add r0, r2, r3 - add sp, #8 - ldrb r0, [r1, r0] - pop {r4, r5, r6, pc} -_0226CAF0: - add sp, #8 - mov r0, #1 - pop {r4, r5, r6, pc} -_0226CAF6: - mov r0, #0 - mvn r0, r0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0226CB00: .word 0x000006DC -_0226CB04: .word 0x02270670 -_0226CB08: .word 0x022701C8 -_0226CB0C: .word 0x000006D8 - thumb_func_end ov16_0226CA14 - - thumb_func_start ov16_0226CB10 -ov16_0226CB10: ; 0x0226CB10 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #2 - ldrsb r1, [r0, r1] - add r6, r2, #0 - add r2, r3, #0 - cmp r1, r4 - blt _0226CB24 - sub r1, r4, #1 - strb r1, [r0, #2] -_0226CB24: - mov r1, #1 - ldrsb r1, [r0, r1] - cmp r1, r6 - blt _0226CB30 - sub r1, r6, #1 - strb r1, [r0, #1] -_0226CB30: - mov r7, #2 - ldrsb r1, [r0, r7] - mov r5, #1 - mov r3, #0x40 - str r1, [sp] - ldrsb r1, [r0, r5] - mov ip, r1 - ldr r1, _0226CD00 ; =0x021BF67C - ldr r1, [r1, #0x48] - tst r3, r1 - beq _0226CB96 - mov r1, ip - sub r1, r1, #1 - strb r1, [r0, #1] - ldrsb r1, [r0, r5] - cmp r1, #0 - bge _0226CB56 - mov r1, #0 - strb r1, [r0, #1] -_0226CB56: - cmp r2, #0 - beq _0226CB92 - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _0226CB92 - add r1, r0, #1 - mov r7, #0 - mov r6, #1 -_0226CB72: - ldrsb r3, [r1, r7] - sub r3, r3, #1 - strb r3, [r1] - ldrsb r3, [r0, r6] - cmp r3, #0 - bge _0226CB84 - mov r1, ip - strb r1, [r0, #1] - b _0226CB92 -_0226CB84: - mov r5, #2 - ldrsb r5, [r0, r5] - mul r3, r4 - add r5, r2, r5 - ldrb r3, [r3, r5] - cmp r3, #0xff - beq _0226CB72 -_0226CB92: - mov r5, #0x40 - b _0226CCAA -_0226CB96: - mov r3, #0x80 - tst r3, r1 - beq _0226CBEC - mov r1, ip - add r1, r1, #1 - strb r1, [r0, #1] - ldrsb r1, [r0, r5] - cmp r1, r6 - blt _0226CBAC - sub r1, r6, #1 - strb r1, [r0, #1] -_0226CBAC: - cmp r2, #0 - beq _0226CBE8 - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _0226CBE8 - add r1, r0, #1 - mov r7, #1 -_0226CBC6: - mov r3, #0 - ldrsb r3, [r1, r3] - add r3, r3, #1 - strb r3, [r1] - ldrsb r3, [r0, r7] - cmp r3, r6 - blt _0226CBDA - mov r1, ip - strb r1, [r0, #1] - b _0226CBE8 -_0226CBDA: - mov r5, #2 - ldrsb r5, [r0, r5] - mul r3, r4 - add r5, r2, r5 - ldrb r3, [r3, r5] - cmp r3, #0xff - beq _0226CBC6 -_0226CBE8: - mov r5, #0x80 - b _0226CCAA -_0226CBEC: - mov r3, #0x20 - tst r3, r1 - beq _0226CC42 - ldr r1, [sp] - sub r1, r1, #1 - strb r1, [r0, #2] - ldrsb r1, [r0, r7] - cmp r1, #0 - bge _0226CC02 - mov r1, #0 - strb r1, [r0, #2] -_0226CC02: - cmp r2, #0 - beq _0226CC3E - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _0226CC3E - add r5, r0, #2 - mov r7, #0 - mov r6, #2 -_0226CC1E: - ldrsb r1, [r5, r7] - sub r1, r1, #1 - strb r1, [r5] - ldrsb r3, [r0, r6] - cmp r3, #0 - bge _0226CC30 - ldr r1, [sp] - strb r1, [r0, #2] - b _0226CC3E -_0226CC30: - mov r1, #1 - ldrsb r1, [r0, r1] - add r3, r2, r3 - mul r1, r4 - ldrb r1, [r1, r3] - cmp r1, #0xff - beq _0226CC1E -_0226CC3E: - mov r5, #0x20 - b _0226CCAA -_0226CC42: - mov r3, #0x10 - tst r3, r1 - beq _0226CC98 - ldr r1, [sp] - add r1, r1, #1 - strb r1, [r0, #2] - ldrsb r1, [r0, r7] - cmp r1, r4 - blt _0226CC58 - sub r1, r4, #1 - strb r1, [r0, #2] -_0226CC58: - cmp r2, #0 - beq _0226CC94 - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _0226CC94 - add r5, r0, #2 - mov r7, #0 - mov r6, #2 -_0226CC74: - ldrsb r1, [r5, r7] - add r1, r1, #1 - strb r1, [r5] - ldrsb r3, [r0, r6] - cmp r3, r4 - blt _0226CC86 - ldr r1, [sp] - strb r1, [r0, #2] - b _0226CC94 -_0226CC86: - mov r1, #1 - ldrsb r1, [r0, r1] - add r3, r2, r3 - mul r1, r4 - ldrb r1, [r1, r3] - cmp r1, #0xff - beq _0226CC74 -_0226CC94: - mov r5, #0x10 - b _0226CCAA -_0226CC98: - add r3, r1, #0 - tst r3, r5 - bne _0226CCAA - tst r1, r7 - beq _0226CCA6 - add r5, r7, #0 - b _0226CCAA -_0226CCA6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226CCAA: - cmp r2, #0 - beq _0226CCD4 - mov r1, ip - add r3, r4, #0 - mul r3, r1 - ldr r1, [sp] - add r1, r1, r3 - mov r3, #2 - ldrsb r6, [r0, r3] - mov r3, #1 - ldrsb r3, [r0, r3] - ldrb r1, [r2, r1] - mul r3, r4 - add r3, r6, r3 - ldrb r2, [r2, r3] - cmp r1, r2 - bne _0226CCD4 - ldr r1, [sp] - strb r1, [r0, #2] - mov r1, ip - strb r1, [r0, #1] -_0226CCD4: - mov r1, #2 - ldrsb r2, [r0, r1] - ldr r1, [sp] - cmp r2, r1 - bne _0226CCE8 - mov r1, #1 - ldrsb r1, [r0, r1] - mov r0, ip - cmp r1, r0 - beq _0226CCF0 -_0226CCE8: - ldr r0, _0226CD04 ; =0x000005DC - bl sub_02005748 - b _0226CCFA -_0226CCF0: - mov r0, #0xf0 - tst r0, r5 - beq _0226CCFA - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226CCFA: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226CD00: .word 0x021BF67C -_0226CD04: .word 0x000005DC - thumb_func_end ov16_0226CB10 - - thumb_func_start ov16_0226CD08 -ov16_0226CD08: ; 0x0226CD08 - mov r1, #0x6e - lsl r1, r1, #4 - ldrb r0, [r0, r1] - bx lr - thumb_func_end ov16_0226CD08 - - thumb_func_start ov16_0226CD10 -ov16_0226CD10: ; 0x0226CD10 - mov r2, #0x6e - lsl r2, r2, #4 - strb r1, [r0, r2] - bx lr - thumb_func_end ov16_0226CD10 - - thumb_func_start ov16_0226CD18 -ov16_0226CD18: ; 0x0226CD18 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov16_0223E010 - ldr r0, [r4, #0] - bl ov16_0223E018 - ldr r0, [r4, #0] - bl ov16_0223E064 - ldr r0, [r4, #0] - bl ov16_0223F228 - cmp r0, #0 - bne _0226CD54 - ldr r0, _0226CD78 ; =0x000006E8 - ldrb r0, [r4, r0] - cmp r0, #2 - blo _0226CD44 - bl sub_02022974 -_0226CD44: - ldr r1, _0226CD78 ; =0x000006E8 - add r0, r4, #0 - ldrb r1, [r4, r1] - lsl r2, r1, #2 - ldr r1, _0226CD7C ; =0x0227020C - ldr r1, [r1, r2] - blx r1 - b _0226CD5A -_0226CD54: - add r0, r4, #0 - bl ov16_0226CE34 -_0226CD5A: - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0226CD76 - ldr r1, _0226CD80 ; =0x000006E9 - mov r3, #0 - strb r3, [r4, r1] - add r2, r1, #1 - strb r3, [r4, r2] - sub r2, r1, #1 - ldrb r2, [r4, r2] - sub r1, r1, #1 - add r2, r2, #1 - strb r2, [r4, r1] -_0226CD76: - pop {r4, pc} - ; .align 2, 0 -_0226CD78: .word 0x000006E8 -_0226CD7C: .word 0x0227020C -_0226CD80: .word 0x000006E9 - thumb_func_end ov16_0226CD18 - - thumb_func_start ov16_0226CD84 -ov16_0226CD84: ; 0x0226CD84 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0226CDD4 ; =0x000006E9 - ldrb r1, [r4, r0] - cmp r1, #0 - bne _0226CDB4 - sub r0, r0, #5 - mov r3, #0x11 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0x3c - lsl r3, r3, #0x10 - bl ov16_0226DF80 - ldr r0, _0226CDD8 ; =0x000006E4 - mov r1, #0x3c - ldr r0, [r4, r0] - bl ov16_0226DFD0 - ldr r0, _0226CDD4 ; =0x000006E9 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0226CDCC -_0226CDB4: - sub r0, r0, #5 - ldr r0, [r4, r0] - bl ov16_0226DFD4 - cmp r0, #1 - bne _0226CDCC - ldr r0, _0226CDD4 ; =0x000006E9 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - mov r0, #0 - pop {r4, pc} -_0226CDCC: - mov r0, #0 - mvn r0, r0 - pop {r4, pc} - nop -_0226CDD4: .word 0x000006E9 -_0226CDD8: .word 0x000006E4 - thumb_func_end ov16_0226CD84 - - thumb_func_start ov16_0226CDDC -ov16_0226CDDC: ; 0x0226CDDC - push {r4, lr} - add r4, r0, #0 - ldr r0, _0226CE2C ; =0x000006E9 - ldrb r1, [r4, r0] - cmp r1, #0 - bne _0226CE0C - sub r0, r0, #5 - mov r3, #0x11 - ldr r0, [r4, r0] - mov r1, #0x40 - mov r2, #0x16 - lsl r3, r3, #0x10 - bl ov16_0226DF80 - ldr r0, _0226CE30 ; =0x000006E4 - mov r1, #0x3c - ldr r0, [r4, r0] - bl ov16_0226DFD0 - ldr r0, _0226CE2C ; =0x000006E9 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0226CE24 -_0226CE0C: - sub r0, r0, #5 - ldr r0, [r4, r0] - bl ov16_0226DFD4 - cmp r0, #1 - bne _0226CE24 - ldr r0, _0226CE2C ; =0x000006E9 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - mov r0, #1 - pop {r4, pc} -_0226CE24: - mov r0, #0 - mvn r0, r0 - pop {r4, pc} - nop -_0226CE2C: .word 0x000006E9 -_0226CE30: .word 0x000006E4 - thumb_func_end ov16_0226CDDC - - thumb_func_start ov16_0226CE34 -ov16_0226CE34: ; 0x0226CE34 - push {r4, lr} - ldr r1, _0226CEA8 ; =0x000006E9 - add r4, r0, #0 - ldrb r0, [r4, r1] - cmp r0, #0 - beq _0226CE46 - cmp r0, #1 - beq _0226CE64 - b _0226CE88 -_0226CE46: - add r0, r1, #1 - ldrb r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #1 - strb r2, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #0x3c - bls _0226CEA0 - mov r2, #0 - add r0, r1, #1 - strb r2, [r4, r0] - ldrb r0, [r4, r1] - add r0, r0, #1 - strb r0, [r4, r1] - b _0226CEA0 -_0226CE64: - sub r0, r1, #5 - mov r3, #0x11 - ldr r0, [r4, r0] - mov r1, #0x28 - mov r2, #0x92 - lsl r3, r3, #0x10 - bl ov16_0226DF80 - ldr r0, _0226CEAC ; =0x000006E4 - mov r1, #0x3c - ldr r0, [r4, r0] - bl ov16_0226DFD0 - ldr r0, _0226CEA8 ; =0x000006E9 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - b _0226CEA0 -_0226CE88: - sub r0, r1, #5 - ldr r0, [r4, r0] - bl ov16_0226DFD4 - cmp r0, #1 - bne _0226CEA0 - ldr r0, _0226CEA8 ; =0x000006E9 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - mov r0, #1 - pop {r4, pc} -_0226CEA0: - mov r0, #0 - mvn r0, r0 - pop {r4, pc} - nop -_0226CEA8: .word 0x000006E9 -_0226CEAC: .word 0x000006E4 - thumb_func_end ov16_0226CE34 - - thumb_func_start ov16_0226CEB0 -ov16_0226CEB0: ; 0x0226CEB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - str r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r4, r1, #0 - bl ov16_0223DF00 - add r5, r0, #0 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - bl ov16_0223E064 - add r6, r0, #0 - ldr r1, _0226D074 ; =0x0000068B - ldr r0, [sp, #0x1c] - ldrsb r0, [r0, r1] - cmp r0, #0x12 - beq _0226CED8 - bl sub_02022974 -_0226CED8: - mov r0, #0 - str r0, [sp] - mov r1, #5 - add r0, r5, #0 - mov r2, #0x20 - mov r3, #1 - str r1, [sp, #4] - bl sub_0200DAA4 - add r0, r6, #0 - mov r1, #1 - mov r2, #0x10 - mov r3, #0x20 - bl sub_02003070 - mov r0, #6 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - str r3, [sp, #8] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x20 - str r3, [sp, #0xc] - bl sub_02019CB8 - mov r0, #6 - str r0, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x21 - mov r3, #2 - bl sub_02019CB8 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x22 - mov r3, #0x1e - bl sub_02019CB8 - mov r0, #7 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x23 - str r3, [sp, #0xc] - bl sub_02019CB8 - mov r0, #7 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x25 - mov r3, #0x1e - bl sub_02019CB8 - mov r0, #0xb - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - str r3, [sp, #8] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x26 - str r3, [sp, #0xc] - bl sub_02019CB8 - mov r0, #0xb - str r0, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x27 - mov r3, #2 - bl sub_02019CB8 - mov r0, #0xb - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x28 - mov r3, #0x1e - bl sub_02019CB8 - mov r0, #7 - str r0, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #5 - mov r2, #0x24 - mov r3, #2 - bl sub_02019CB8 - add r0, r5, #0 - mov r1, #5 - bl sub_0201C3C0 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - bl ov16_0223E05C - ldr r2, _0226D078 ; =0x02270208 - str r0, [sp, #0x20] - ldrh r3, [r2, #0x2c] - add r1, sp, #0x2c - add r0, sp, #0x2c - strh r3, [r1] - ldrh r3, [r2, #0x2e] - ldr r6, [sp, #0x1c] - mov r7, #0 - strh r3, [r1, #2] - ldrh r3, [r2, #0x30] - mov r5, #0x40 - strh r3, [r1, #4] - ldrh r3, [r2, #0x32] - strh r3, [r1, #6] - ldrh r3, [r2, #0x34] - ldrh r2, [r2, #0x36] - strh r3, [r1, #8] - strh r2, [r1, #0xa] - lsl r1, r4, #2 - add r4, r0, r1 - mov r1, #0x4d - lsl r1, r1, #4 - add r0, r6, #0 - add r0, r0, r1 - str r0, [sp, #0x28] -_0226D018: - ldr r0, _0226D07C ; =0x000004E4 - ldr r0, [r6, r0] - cmp r0, #0 - beq _0226D028 - bl sub_02022974 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} -_0226D028: - ldrh r1, [r4] - ldr r0, [sp, #0x20] - bl sub_0200B1EC - str r0, [sp, #0x24] - ldr r0, _0226D080 ; =0x00010200 - add r1, r7, #1 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _0226D084 ; =0x00004E37 - mov r2, #0x14 - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - mul r2, r1 - ldr r1, [sp, #0x28] - str r5, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - str r0, [sp, #0x18] - add r1, r1, r2 - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x24] - mov r3, #0 - bl ov16_0226A98C - ldr r0, [sp, #0x24] - bl sub_020237BC - add r7, r7, #1 - add r6, #0x14 - add r4, r4, #2 - add r5, #0x10 - cmp r7, #2 - blt _0226D018 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226D074: .word 0x0000068B -_0226D078: .word 0x02270208 -_0226D07C: .word 0x000004E4 -_0226D080: .word 0x00010200 -_0226D084: .word 0x00004E37 - thumb_func_end ov16_0226CEB0 - - thumb_func_start ov16_0226D088 -ov16_0226D088: ; 0x0226D088 - ldr r1, _0226D090 ; =0x000006E1 - ldrb r0, [r0, r1] - bx lr - nop -_0226D090: .word 0x000006E1 - thumb_func_end ov16_0226D088 - - thumb_func_start ov16_0226D094 -ov16_0226D094: ; 0x0226D094 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x1b - mov r1, #5 - add r7, r2, #0 - bl sub_02006C24 - add r6, r0, #0 - str r6, [sp] - mov r0, #0x6e - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _0226D114 ; =0x00004E45 - mov r1, #2 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0226D118 ; =0x00004FBD - mov r3, #0x55 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - lsl r3, r3, #2 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0226D11C ; =0x00004FB7 - ldr r3, _0226D120 ; =0x00000155 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0226D124 ; =0x00004FAC - ldr r3, _0226D128 ; =0x00000156 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200CE54 - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226D114: .word 0x00004E45 -_0226D118: .word 0x00004FBD -_0226D11C: .word 0x00004FB7 -_0226D120: .word 0x00000155 -_0226D124: .word 0x00004FAC -_0226D128: .word 0x00000156 - thumb_func_end ov16_0226D094 - - thumb_func_start ov16_0226D12C -ov16_0226D12C: ; 0x0226D12C - push {r4, lr} - ldr r1, _0226D150 ; =0x00004FBD - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0226D154 ; =0x00004E45 - add r0, r4, #0 - bl sub_0200D080 - ldr r1, _0226D158 ; =0x00004FB7 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0226D15C ; =0x00004FAC - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0226D150: .word 0x00004FBD -_0226D154: .word 0x00004E45 -_0226D158: .word 0x00004FB7 -_0226D15C: .word 0x00004FAC - thumb_func_end ov16_0226D12C - - thumb_func_start ov16_0226D160 -ov16_0226D160: ; 0x0226D160 - push {r4, lr} - mov r0, #5 - lsl r1, r0, #6 - bl sub_02018144 - mov r2, #5 - mov r1, #0 - lsl r2, r2, #6 - add r4, r0, #0 - bl sub_020C4CF4 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226D160 - - thumb_func_start ov16_0226D17C -ov16_0226D17C: ; 0x0226D17C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _0226D18A - bl sub_02022974 -_0226D18A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226D17C - - thumb_func_start ov16_0226D194 -ov16_0226D194: ; 0x0226D194 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #0x14] - ldr r0, [sp, #0x38] - add r6, r1, #0 - str r0, [sp, #0x38] - ldr r0, [sp, #0x3c] - str r2, [sp, #0x18] - str r0, [sp, #0x3c] - str r3, [sp, #0x1c] - bl ov16_0226D160 - ldr r1, [sp, #0x3c] - ldr r2, [sp, #0x1c] - str r1, [sp] - ldr r3, [sp, #0x38] - add r1, r6, #0 - add r7, r0, #0 - bl ov16_0226D2A0 - add r5, r7, #0 - mov r4, #0 - add r5, #0x1c -_0226D1C2: - ldr r0, [sp, #0x14] - add r1, r6, #0 - ldrb r0, [r0, r4] - bl ov16_0226DB04 - ldr r1, [sp, #0x1c] - ldr r3, [sp, #0x18] - str r1, [sp] - str r4, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x38] - mov r1, #0x4f - str r0, [sp, #0xc] - ldr r0, [sp, #0x3c] - lsl r1, r1, #2 - str r0, [sp, #0x10] - add r0, r5, #0 - add r1, r7, r1 - add r2, r6, #0 - bl ov16_0226D540 - add r4, r4, #1 - add r5, #0x30 - cmp r4, #6 - blt _0226D1C2 - add r0, r7, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0226D194 - - thumb_func_start ov16_0226D1FC -ov16_0226D1FC: ; 0x0226D1FC - ldr r1, [r0, #4] - cmp r1, #0 - bne _0226D21A - mov r2, #0 -_0226D204: - ldr r1, [r0, #0x20] - cmp r1, #0 - bne _0226D212 - add r2, r2, #1 - add r0, #0x30 - cmp r2, #6 - blt _0226D204 -_0226D212: - cmp r2, #6 - bne _0226D21A - mov r0, #1 - bx lr -_0226D21A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226D1FC - - thumb_func_start ov16_0226D220 -ov16_0226D220: ; 0x0226D220 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - cmp r6, #0 - bne _0226D230 - bl sub_02022974 -_0226D230: - add r0, r6, #0 - add r1, r4, #0 - bl ov16_0226D3F8 - add r5, r6, #0 - mov r4, #0 - add r5, #0x1c - add r6, #0x18 -_0226D240: - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov16_0226D938 - add r4, r4, #1 - add r5, #0x30 - cmp r4, #6 - blt _0226D240 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0226D220 - - thumb_func_start ov16_0226D258 -ov16_0226D258: ; 0x0226D258 - ldr r1, [r0, #4] - cmp r1, #0 - bne _0226D276 - mov r2, #0 -_0226D260: - ldr r1, [r0, #0x20] - cmp r1, #0 - bne _0226D26E - add r2, r2, #1 - add r0, #0x30 - cmp r2, #6 - blt _0226D260 -_0226D26E: - cmp r2, #6 - bne _0226D276 - mov r0, #1 - bx lr -_0226D276: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov16_0226D258 - - thumb_func_start ov16_0226D27C -ov16_0226D27C: ; 0x0226D27C - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - bl sub_0200D0F4 - mov r4, #0 - add r5, r6, #0 -_0226D28A: - ldr r0, [r5, #0x1c] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, #0x30 - cmp r4, #6 - blt _0226D28A - add r0, r6, #0 - bl ov16_0226D17C - pop {r4, r5, r6, pc} - thumb_func_end ov16_0226D27C - - thumb_func_start ov16_0226D2A0 -ov16_0226D2A0: ; 0x0226D2A0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - mov r1, #0 - cmp r0, #0 - bne _0226D2BA - ldr r0, [r5, #4] - cmp r0, #0 - bne _0226D2BA - mov r1, #1 -_0226D2BA: - cmp r1, #0 - bne _0226D2C2 - bl sub_02022974 -_0226D2C2: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - ldr r1, [sp, #0x18] - ldr r2, _0226D338 ; =0x02270A3C - add r0, r7, #0 - bl sub_0200CE6C - str r0, [r5, #0] - cmp r6, #0 - ldr r0, [r5, #0] - bne _0226D2F8 - ldr r2, _0226D33C ; =0x02270A2C - lsl r3, r4, #1 - ldrsh r2, [r2, r3] - mov r1, #0x16 - lsl r1, r1, #4 - bl sub_0200D4C4 - ldr r0, [r5, #0] - mov r1, #8 - ldr r0, [r0, #0] - bl sub_02021D6C - b _0226D310 -_0226D2F8: - ldr r2, _0226D340 ; =0x02270A24 - lsl r3, r4, #1 - ldrsh r2, [r2, r3] - mov r1, #0x5f - mvn r1, r1 - bl sub_0200D4C4 - ldr r0, [r5, #0] - mov r1, #7 - ldr r0, [r0, #0] - bl sub_02021D6C -_0226D310: - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - str r6, [r5, #0xc] - mov r2, #0x7d - str r4, [r5, #0x10] - mov r0, #0 - strb r0, [r5, #0x1a] - ldr r0, _0226D344 ; =ov16_0226D34C - add r1, r5, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r5, #4] - ldr r0, _0226D348 ; =0x00000711 - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226D338: .word 0x02270A3C -_0226D33C: .word 0x02270A2C -_0226D340: .word 0x02270A24 -_0226D344: .word ov16_0226D34C -_0226D348: .word 0x00000711 - thumb_func_end ov16_0226D2A0 - - thumb_func_start ov16_0226D34C -ov16_0226D34C: ; 0x0226D34C - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r1, [r4, #0x1a] - cmp r1, #0 - beq _0226D35E - cmp r1, #1 - beq _0226D37A - b _0226D3E2 -_0226D35E: - add r1, sp, #0 - ldr r0, [r4, #0] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r0, [r1, r0] - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldrb r0, [r4, #0x1a] - add r0, r0, #1 - strb r0, [r4, #0x1a] -_0226D37A: - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x14] - cmp r0, #0 - bne _0226D3B2 - mov r0, #0x12 - lsl r0, r0, #8 - sub r1, r1, r0 - mov r0, #0xe - lsl r0, r0, #0xc - str r1, [r4, #0x14] - cmp r1, r0 - bgt _0226D39A - str r0, [r4, #0x14] - ldrb r0, [r4, #0x1a] - add r0, r0, #1 - strb r0, [r4, #0x1a] -_0226D39A: - ldr r2, [r4, #0x10] - ldr r1, [r4, #0x14] - lsl r3, r2, #1 - ldr r2, _0226D3F0 ; =0x02270A2C - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 - add sp, #4 - pop {r3, r4, pc} -_0226D3B2: - mov r0, #0x12 - lsl r0, r0, #8 - add r1, r1, r0 - mov r0, #2 - lsl r0, r0, #0xc - str r1, [r4, #0x14] - cmp r1, r0 - blt _0226D3CA - str r0, [r4, #0x14] - ldrb r0, [r4, #0x1a] - add r0, r0, #1 - strb r0, [r4, #0x1a] -_0226D3CA: - ldr r2, [r4, #0x10] - ldr r1, [r4, #0x14] - lsl r3, r2, #1 - ldr r2, _0226D3F4 ; =0x02270A24 - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 - add sp, #4 - pop {r3, r4, pc} -_0226D3E2: - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] - add sp, #4 - pop {r3, r4, pc} - nop -_0226D3F0: .word 0x02270A2C -_0226D3F4: .word 0x02270A24 - thumb_func_end ov16_0226D34C - - thumb_func_start ov16_0226D3F8 -ov16_0226D3F8: ; 0x0226D3F8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #0 - beq _0226D40A - ldr r0, [r5, #4] - cmp r0, #0 - beq _0226D40E -_0226D40A: - bl sub_02022974 -_0226D40E: - mov r0, #0 - strb r0, [r5, #0x1a] - str r4, [r5, #8] - cmp r4, #0 - bne _0226D41C - mov r0, #4 - b _0226D41C -_0226D41C: - strb r0, [r5, #0x1b] - mov r2, #0x7d - ldr r0, _0226D430 ; =ov16_0226D434 - add r1, r5, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - str r0, [r5, #4] - pop {r3, r4, r5, pc} - nop -_0226D430: .word ov16_0226D434 - thumb_func_end ov16_0226D3F8 - - thumb_func_start ov16_0226D434 -ov16_0226D434: ; 0x0226D434 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x1a] - cmp r0, #0 - beq _0226D44C - cmp r0, #1 - beq _0226D48C - cmp r0, #2 - beq _0226D4A0 - b _0226D51E -_0226D44C: - add r1, sp, #4 - ldr r0, [r4, #0] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - add r1, sp, #4 - mov r0, #2 - ldrsh r0, [r1, r0] - mov r1, #1 - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldr r0, [r4, #0] - bl sub_0200D810 - mov r0, #1 - lsl r0, r0, #0xc - strh r0, [r4, #0x18] - mov r0, #0x18 - ldrsh r0, [r4, r0] - mov r1, #0 - mov r2, #0x3f - asr r3, r0, #8 - mov r0, #0x10 - sub r0, r0, r3 - str r0, [sp] - ldr r0, _0226D530 ; =0x04000050 - bl sub_020BF55C - ldrb r0, [r4, #0x1a] - add r0, r0, #1 - strb r0, [r4, #0x1a] -_0226D48C: - ldrb r0, [r4, #0x1b] - cmp r0, #0 - beq _0226D49A - sub r0, r0, #1 - add sp, #8 - strb r0, [r4, #0x1b] - pop {r3, r4, r5, pc} -_0226D49A: - ldrb r0, [r4, #0x1a] - add r0, r0, #1 - strb r0, [r4, #0x1a] -_0226D4A0: - ldr r0, [r4, #8] - cmp r0, #0 - bne _0226D4E4 - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x14] - cmp r0, #0 - bne _0226D4CA - mov r0, #1 - lsl r0, r0, #0xa - sub r1, r1, r0 - str r1, [r4, #0x14] - ldr r2, [r4, #0x10] - lsl r1, r1, #8 - lsl r3, r2, #1 - ldr r2, _0226D534 ; =0x02270A2C - ldr r0, [r4, #0] - ldrsh r2, [r2, r3] - asr r1, r1, #0x10 - bl sub_0200D4C4 - b _0226D4E4 -_0226D4CA: - mov r0, #1 - lsl r0, r0, #0xa - add r1, r1, r0 - str r1, [r4, #0x14] - ldr r2, [r4, #0x10] - lsl r1, r1, #8 - lsl r3, r2, #1 - ldr r2, _0226D538 ; =0x02270A24 - ldr r0, [r4, #0] - ldrsh r2, [r2, r3] - asr r1, r1, #0x10 - bl sub_0200D4C4 -_0226D4E4: - mov r1, #0x18 - ldrsh r2, [r4, r1] - add r0, r1, #0 - add r0, #0xe8 - sub r0, r2, r0 - strh r0, [r4, #0x18] - ldrsh r0, [r4, r1] - cmp r0, #0 - bgt _0226D508 - mov r1, #0 - strh r1, [r4, #0x18] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D3EC - ldrb r0, [r4, #0x1a] - add r0, r0, #1 - strb r0, [r4, #0x1a] -_0226D508: - mov r0, #0x18 - ldrsh r0, [r4, r0] - add sp, #8 - asr r1, r0, #8 - mov r0, #0x10 - sub r0, r0, r1 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _0226D53C ; =0x04000052 - strh r1, [r0] - pop {r3, r4, r5, pc} -_0226D51E: - bl ov16_0223F9F0 - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0226D530: .word 0x04000050 -_0226D534: .word 0x02270A2C -_0226D538: .word 0x02270A24 -_0226D53C: .word 0x04000052 - thumb_func_end ov16_0226D434 - - thumb_func_start ov16_0226D540 -ov16_0226D540: ; 0x0226D540 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r7, r1, #0 - add r6, r2, #0 - mov r1, #0 - str r3, [sp] - ldr r4, [sp, #0x1c] - cmp r0, #0 - bne _0226D55C - ldr r0, [r5, #4] - cmp r0, #0 - bne _0226D55C - mov r1, #1 -_0226D55C: - cmp r1, #0 - bne _0226D564 - bl sub_02022974 -_0226D564: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x30 - bl sub_020C4CF4 - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x28] - ldr r2, _0226D634 ; =0x02270A70 - bl sub_0200CE6C - str r0, [r5, #0] - cmp r6, #0 - ldr r0, [r5, #0] - bne _0226D592 - ldr r2, [sp, #0x18] - mov r1, #0x45 - lsl r3, r2, #1 - ldr r2, _0226D638 ; =0x02270A34 - lsl r1, r1, #2 - ldrsh r2, [r2, r3] - bl sub_0200D4C4 - b _0226D5A2 -_0226D592: - ldr r2, [sp, #0x18] - mov r1, #0x13 - lsl r3, r2, #1 - ldr r2, _0226D63C ; =0x02270A1C - mvn r1, r1 - ldrsh r2, [r2, r3] - bl sub_0200D4C4 -_0226D5A2: - ldr r0, [r5, #0] - ldr r1, [sp, #0x20] - ldr r0, [r0, #0] - bl sub_02021D6C - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - add r0, r5, #0 - str r6, [r5, #8] - add r0, #0x2d - strb r4, [r0] - ldr r0, [sp, #0x18] - str r0, [r5, #0xc] - ldr r0, [sp, #0x20] - bl ov16_0226DB44 - add r1, r5, #0 - add r1, #0x2e - strb r0, [r1] - ldr r0, [sp, #0x20] - str r7, [r5, #0x14] - cmp r0, #6 - bne _0226D5D8 - ldr r0, _0226D640 ; =0x00000713 - b _0226D5DA -_0226D5D8: - ldr r0, _0226D644 ; =0x00000712 -_0226D5DA: - strh r0, [r5, #0x2a] - cmp r6, #0 - bne _0226D5EE - lsl r0, r4, #4 - add r0, #0xa2 - str r0, [r5, #0x20] - mov r0, #0xf - mul r0, r4 - add r0, #0x9c - b _0226D600 -_0226D5EE: - lsl r1, r4, #4 - mov r0, #0x5e - sub r0, r0, r1 - str r0, [r5, #0x20] - mov r0, #0xf - add r1, r4, #0 - mul r1, r0 - mov r0, #0x64 - sub r0, r0, r1 -_0226D600: - str r0, [r5, #0x24] - add r0, r5, #0 - mov r1, #0 - add r0, #0x2c - strb r1, [r0] - ldr r0, [sp] - ldr r2, _0226D648 ; =0x000001F5 - cmp r0, #0 - bne _0226D626 - lsl r0, r4, #1 - add r0, r4, r0 - add r0, r0, #5 - strh r0, [r5, #0x28] - ldr r0, _0226D64C ; =ov16_0226D654 - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226D626: - ldr r0, _0226D650 ; =ov16_0226D854 - strh r1, [r5, #0x28] - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226D634: .word 0x02270A70 -_0226D638: .word 0x02270A34 -_0226D63C: .word 0x02270A1C -_0226D640: .word 0x00000713 -_0226D644: .word 0x00000712 -_0226D648: .word 0x000001F5 -_0226D64C: .word ov16_0226D654 -_0226D650: .word ov16_0226D854 - thumb_func_end ov16_0226D540 - - thumb_func_start ov16_0226D654 -ov16_0226D654: ; 0x0226D654 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - cmp r0, #6 - bls _0226D666 - b _0226D836 -_0226D666: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226D672: ; jump table - .short _0226D680 - _0226D672 - 2 ; case 0 - .short _0226D6A4 - _0226D672 - 2 ; case 1 - .short _0226D6B2 - _0226D672 - 2 ; case 2 - .short _0226D734 - _0226D672 - 2 ; case 3 - .short _0226D74C - _0226D672 - 2 ; case 4 - .short _0226D78C - _0226D672 - 2 ; case 5 - .short _0226D7BA - _0226D672 - 2 ; case 6 -_0226D680: - add r1, sp, #0 - ldr r0, [r4, #0] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r0, [r1, r0] - lsl r0, r0, #8 - str r0, [r4, #0x1c] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D6A4: - mov r0, #0x28 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226D6B2 - sub r0, r0, #1 - strh r0, [r4, #0x28] - pop {r3, r4, r5, pc} -_0226D6B2: - ldr r0, [r4, #8] - ldr r1, [r4, #0x1c] - cmp r0, #0 - bne _0226D6F6 - mov r0, #0x12 - lsl r0, r0, #8 - sub r1, r1, r0 - str r1, [r4, #0x1c] - ldr r0, [r4, #0x24] - lsl r0, r0, #8 - cmp r1, r0 - bgt _0226D6E0 - str r0, [r4, #0x1c] - ldrh r0, [r4, #0x2a] - bl sub_02005748 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D6E0: - ldr r2, [r4, #0xc] - ldr r1, [r4, #0x1c] - lsl r3, r2, #1 - ldr r2, _0226D84C ; =0x02270A34 - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 - b _0226D72A -_0226D6F6: - mov r0, #0x12 - lsl r0, r0, #8 - add r1, r1, r0 - str r1, [r4, #0x1c] - ldr r0, [r4, #0x24] - lsl r0, r0, #8 - cmp r1, r0 - blt _0226D716 - str r0, [r4, #0x1c] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D716: - ldr r2, [r4, #0xc] - ldr r1, [r4, #0x1c] - lsl r3, r2, #1 - ldr r2, _0226D850 ; =0x02270A1C - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 -_0226D72A: - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - pop {r3, r4, r5, pc} -_0226D734: - ldr r1, [r4, #0x14] - mov r0, #0 - ldrsb r0, [r1, r0] - add r0, r0, #1 - strb r0, [r1] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D74C: - ldr r1, [r4, #0x14] - mov r0, #0 - ldrsb r0, [r1, r0] - cmp r0, #6 - beq _0226D760 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - pop {r3, r4, r5, pc} -_0226D760: - ldr r0, [r4, #8] - cmp r0, #0 - ldr r0, [r4, #0] - bne _0226D772 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021E50 - b _0226D77A -_0226D772: - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021E50 -_0226D77A: - mov r0, #0 - strh r0, [r4, #0x28] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D78C: - mov r0, #0x28 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x28] - ldrsh r0, [r4, r0] - cmp r0, #0 - blt _0226D84A - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x2e - ldrb r1, [r1] - ldr r0, [r0, #0] - bl sub_02021D6C - mov r0, #0 - strh r0, [r4, #0x28] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D7BA: - ldr r0, [r4, #8] - ldr r1, [r4, #0x1c] - cmp r0, #0 - bne _0226D7F8 - mov r0, #6 - lsl r0, r0, #8 - add r1, r1, r0 - str r1, [r4, #0x1c] - ldr r0, [r4, #0x20] - lsl r0, r0, #8 - cmp r1, r0 - blt _0226D7E2 - str r0, [r4, #0x1c] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D7E2: - ldr r2, [r4, #0xc] - ldr r1, [r4, #0x1c] - lsl r3, r2, #1 - ldr r2, _0226D84C ; =0x02270A34 - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 - b _0226D82C -_0226D7F8: - mov r0, #6 - lsl r0, r0, #8 - sub r1, r1, r0 - str r1, [r4, #0x1c] - ldr r0, [r4, #0x20] - lsl r0, r0, #8 - cmp r1, r0 - bgt _0226D818 - str r0, [r4, #0x1c] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D818: - ldr r2, [r4, #0xc] - ldr r1, [r4, #0x1c] - lsl r3, r2, #1 - ldr r2, _0226D850 ; =0x02270A1C - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 -_0226D82C: - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - pop {r3, r4, r5, pc} -_0226D836: - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02021E50 - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] -_0226D84A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0226D84C: .word 0x02270A34 -_0226D850: .word 0x02270A1C - thumb_func_end ov16_0226D654 - - thumb_func_start ov16_0226D854 -ov16_0226D854: ; 0x0226D854 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r1, #0x2c - ldrb r1, [r1] - cmp r1, #0 - beq _0226D86C - cmp r1, #1 - beq _0226D89A - cmp r1, #2 - beq _0226D8AA - b _0226D922 -_0226D86C: - add r1, sp, #0 - ldr r0, [r4, #0] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r0, [r1, r0] - mov r1, #0 - lsl r0, r0, #8 - str r0, [r4, #0x1c] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_02021E50 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D89A: - mov r0, #0x28 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226D8AA - sub r0, r0, #1 - add sp, #4 - strh r0, [r4, #0x28] - pop {r3, r4, pc} -_0226D8AA: - ldr r0, [r4, #8] - ldr r1, [r4, #0x1c] - cmp r0, #0 - bne _0226D8EA - mov r0, #0x12 - lsl r0, r0, #8 - sub r1, r1, r0 - str r1, [r4, #0x1c] - ldr r0, [r4, #0x20] - lsl r0, r0, #8 - cmp r1, r0 - bgt _0226D8D2 - str r0, [r4, #0x1c] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D8D2: - ldr r2, [r4, #0xc] - ldr r1, [r4, #0x1c] - lsl r3, r2, #1 - ldr r2, _0226D930 ; =0x02270A34 - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 - add sp, #4 - pop {r3, r4, pc} -_0226D8EA: - mov r0, #0x12 - lsl r0, r0, #8 - add r1, r1, r0 - str r1, [r4, #0x1c] - ldr r0, [r4, #0x20] - lsl r0, r0, #8 - cmp r1, r0 - blt _0226D90A - str r0, [r4, #0x1c] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D90A: - ldr r2, [r4, #0xc] - ldr r1, [r4, #0x1c] - lsl r3, r2, #1 - ldr r2, _0226D934 ; =0x02270A1C - lsl r1, r1, #8 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl sub_0200D4C4 - add sp, #4 - pop {r3, r4, pc} -_0226D922: - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] - add sp, #4 - pop {r3, r4, pc} - nop -_0226D930: .word 0x02270A34 -_0226D934: .word 0x02270A1C - thumb_func_end ov16_0226D854 - - thumb_func_start ov16_0226D938 -ov16_0226D938: ; 0x0226D938 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - cmp r0, #0 - beq _0226D94E - ldr r0, [r5, #4] - cmp r0, #0 - beq _0226D952 -_0226D94E: - bl sub_02022974 -_0226D952: - add r0, r5, #0 - mov r1, #0 - add r0, #0x2c - strb r1, [r0] - cmp r7, #0 - str r4, [r5, #0x18] - ldr r2, _0226D990 ; =0x000001F5 - bne _0226D97C - lsl r0, r6, #1 - add r0, r6, r0 - strh r0, [r5, #0x28] - add r0, r5, #0 - mov r1, #4 - add r0, #0x2f - strb r1, [r0] - ldr r0, _0226D994 ; =ov16_0226D99C - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226D97C: - add r0, r5, #0 - strh r1, [r5, #0x28] - add r0, #0x2f - strb r1, [r0] - ldr r0, _0226D998 ; =ov16_0226DAAC - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226D990: .word 0x000001F5 -_0226D994: .word ov16_0226D99C -_0226D998: .word ov16_0226DAAC - thumb_func_end ov16_0226D938 - - thumb_func_start ov16_0226D99C -ov16_0226D99C: ; 0x0226D99C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0x18] - add r5, r0, #0 - mov r0, #0 - ldrsh r0, [r1, r0] - cmp r0, #0 - bne _0226D9B4 - add r0, r4, #0 - mov r1, #0x64 - add r0, #0x2c - strb r1, [r0] -_0226D9B4: - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - cmp r0, #2 - bgt _0226D9CE - cmp r0, #0 - blt _0226DA8A - beq _0226D9D2 - cmp r0, #1 - beq _0226D9FE - cmp r0, #2 - beq _0226DA24 - b _0226DA8A -_0226D9CE: - cmp r0, #0x64 - b _0226DA8A -_0226D9D2: - add r1, sp, #0 - ldr r0, [r4, #0] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #2 - ldrsh r0, [r1, r0] - mov r1, #1 - lsl r0, r0, #8 - str r0, [r4, #0x1c] - ldr r0, [r4, #0] - bl sub_0200D810 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226D9FE: - add r0, r4, #0 - add r0, #0x2f - ldrb r0, [r0] - cmp r0, #0 - beq _0226DA16 - add r0, r4, #0 - add r0, #0x2f - ldrb r0, [r0] - add r4, #0x2f - sub r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0226DA16: - mov r0, #0x28 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226DA24 - sub r0, r0, #1 - strh r0, [r4, #0x28] - pop {r3, r4, r5, pc} -_0226DA24: - ldr r0, [r4, #8] - ldr r1, [r4, #0x1c] - cmp r0, #0 - bne _0226DA48 - mov r0, #3 - lsl r0, r0, #0xa - sub r1, r1, r0 - str r1, [r4, #0x1c] - ldr r2, [r4, #0xc] - lsl r1, r1, #8 - lsl r3, r2, #1 - ldr r2, _0226DAA0 ; =0x02270A34 - ldr r0, [r4, #0] - ldrsh r2, [r2, r3] - asr r1, r1, #0x10 - bl sub_0200D4C4 - b _0226DA62 -_0226DA48: - mov r0, #3 - lsl r0, r0, #0xa - add r1, r1, r0 - str r1, [r4, #0x1c] - ldr r2, [r4, #0xc] - lsl r1, r1, #8 - lsl r3, r2, #1 - ldr r2, _0226DAA4 ; =0x02270A1C - ldr r0, [r4, #0] - ldrsh r2, [r2, r3] - asr r1, r1, #0x10 - bl sub_0200D4C4 -_0226DA62: - ldr r1, [r4, #0x1c] - ldr r0, _0226DAA8 ; =0xFFFFF000 - cmp r1, r0 - blt _0226DA72 - mov r0, #0x11 - lsl r0, r0, #0xc - cmp r1, r0 - ble _0226DA80 -_0226DA72: - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] -_0226DA80: - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - pop {r3, r4, r5, pc} -_0226DA8A: - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0200D3EC - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0226DAA0: .word 0x02270A34 -_0226DAA4: .word 0x02270A1C -_0226DAA8: .word 0xFFFFF000 - thumb_func_end ov16_0226D99C - - thumb_func_start ov16_0226DAAC -ov16_0226DAAC: ; 0x0226DAAC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0x18] - add r5, r0, #0 - mov r0, #0 - ldrsh r0, [r1, r0] - cmp r0, #0 - bne _0226DAC4 - add r0, r4, #0 - mov r1, #0x64 - add r0, #0x2c - strb r1, [r0] -_0226DAC4: - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - cmp r0, #0 - beq _0226DAD6 - cmp r0, #1 - beq _0226DB00 - cmp r0, #0x64 - b _0226DAEC -_0226DAD6: - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200D810 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r4, #0x2c - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0226DAEC: - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0200D3EC - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] -_0226DB00: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DAAC - - thumb_func_start ov16_0226DB04 -ov16_0226DB04: ; 0x0226DB04 - cmp r0, #3 - bhi _0226DB1C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226DB14: ; jump table - .short _0226DB1C - _0226DB14 - 2 ; case 0 - .short _0226DB20 - _0226DB14 - 2 ; case 1 - .short _0226DB2C - _0226DB14 - 2 ; case 2 - .short _0226DB38 - _0226DB14 - 2 ; case 3 -_0226DB1C: - mov r0, #6 - bx lr -_0226DB20: - cmp r1, #0 - bne _0226DB28 - mov r0, #3 - bx lr -_0226DB28: - mov r0, #0 - bx lr -_0226DB2C: - cmp r1, #0 - bne _0226DB34 - mov r0, #5 - bx lr -_0226DB34: - mov r0, #2 - bx lr -_0226DB38: - cmp r1, #0 - bne _0226DB40 - mov r0, #4 - bx lr -_0226DB40: - mov r0, #1 - bx lr - thumb_func_end ov16_0226DB04 - - thumb_func_start ov16_0226DB44 -ov16_0226DB44: ; 0x0226DB44 - cmp r0, #6 - bhi _0226DB7A - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226DB54: ; jump table - .short _0226DB68 - _0226DB54 - 2 ; case 0 - .short _0226DB78 - _0226DB54 - 2 ; case 1 - .short _0226DB70 - _0226DB54 - 2 ; case 2 - .short _0226DB64 - _0226DB54 - 2 ; case 3 - .short _0226DB74 - _0226DB54 - 2 ; case 4 - .short _0226DB6C - _0226DB54 - 2 ; case 5 - .short _0226DB62 - _0226DB54 - 2 ; case 6 -_0226DB62: - bx lr -_0226DB64: - mov r0, #0 - bx lr -_0226DB68: - mov r0, #3 - bx lr -_0226DB6C: - mov r0, #2 - bx lr -_0226DB70: - mov r0, #5 - bx lr -_0226DB74: - mov r0, #1 - bx lr -_0226DB78: - mov r0, #4 -_0226DB7A: - bx lr - thumb_func_end ov16_0226DB44 - - thumb_func_start ov16_0226DB7C -ov16_0226DB7C: ; 0x0226DB7C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x1b - add r1, r3, #0 - add r7, r2, #0 - bl sub_02006C24 - add r6, r0, #0 - str r6, [sp] - mov r0, #0x50 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, [sp, #0x34] - mov r1, #3 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xfa - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x38] - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xfb - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x3c] - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xfc - bl sub_0200CE54 - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0226DB7C - - thumb_func_start ov16_0226DBFC -ov16_0226DBFC: ; 0x0226DBFC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0200D070 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D080 - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200D090 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl sub_0200D0A0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DBFC - - thumb_func_start ov16_0226DC24 -ov16_0226DC24: ; 0x0226DC24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r3, #0 - mov ip, r2 - ldr r3, _0226DC9C ; =0x02270AA4 - add r6, r0, #0 - add r7, r1, #0 - add r2, sp, #4 - mov r4, #6 -_0226DC36: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r4, r4, #1 - bne _0226DC36 - ldr r0, [r3, #0] - mov r1, #0x18 - str r0, [r2, #0] - ldr r0, [sp, #0x50] - str r5, [sp, #0x18] - str r0, [sp, #0x1c] - ldr r0, [sp, #0x54] - str r0, [sp, #0x20] - ldr r0, [sp, #0x58] - str r0, [sp, #0x24] - ldr r0, [sp, #0x5c] - str r0, [sp, #0xc] - ldr r0, [sp, #0x60] - str r0, [sp, #0x30] - mov r0, ip - bl sub_02018144 - mov r1, #0 - mov r2, #0x18 - str r0, [sp] - bl sub_020C4CF4 - ldr r5, [sp] - mov r4, #0 -_0226DC6E: - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #4 - bl sub_0200CE6C - mov r1, #0 - stmia r5!, {r0} - bl sub_0200D3F4 - add r4, r4, #1 - cmp r4, #5 - blt _0226DC6E - ldr r0, _0226DCA0 ; =ov16_0226DE10 - ldr r1, [sp] - ldr r2, _0226DCA4 ; =0x00009C40 - bl sub_0200D9E8 - ldr r1, [sp] - str r0, [r1, #0x14] - add r0, r1, #0 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226DC9C: .word 0x02270AA4 -_0226DCA0: .word ov16_0226DE10 -_0226DCA4: .word 0x00009C40 - thumb_func_end ov16_0226DC24 - - thumb_func_start ov16_0226DCA8 -ov16_0226DCA8: ; 0x0226DCA8 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_0226DCB0: - ldr r0, [r5, #0] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _0226DCB0 - ldr r0, [r6, #0x14] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0226DCA8 - - thumb_func_start ov16_0226DCCC -ov16_0226DCCC: ; 0x0226DCCC - push {r4, r5, r6, lr} - add r5, r0, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r4, [sp, #0x24] - add r6, r3, #0 - ldr r0, [r5, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r2, [sp, #0x10] - lsl r1, r6, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x18] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #8] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #0xc] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r0, [r5, #0] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r5, #8] - mov r1, #2 - bl sub_0200D364 - ldr r0, [r5, #0xc] - mov r1, #3 - bl sub_0200D364 - mov r4, #0 - mov r6, #1 -_0226DD42: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0226DD42 - pop {r4, r5, r6, pc} - thumb_func_end ov16_0226DCCC - - thumb_func_start ov16_0226DD54 -ov16_0226DD54: ; 0x0226DD54 - push {r4, lr} - sub sp, #0x18 - ldr r4, [sp, #0x20] - str r4, [sp] - ldr r4, [sp, #0x24] - str r4, [sp, #4] - ldr r4, [sp, #0x28] - str r4, [sp, #8] - ldr r4, [sp, #0x2c] - str r4, [sp, #0xc] - ldr r4, [sp, #0x30] - str r4, [sp, #0x10] - mov r4, #3 - lsl r4, r4, #0x12 - str r4, [sp, #0x14] - bl ov16_0226DCCC - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DD54 - - thumb_func_start ov16_0226DD7C -ov16_0226DD7C: ; 0x0226DD7C - push {r3, r4, lr} - sub sp, #0x14 - add r4, r2, #0 - str r3, [sp] - ldr r2, [sp, #0x20] - str r1, [sp, #4] - str r2, [sp, #8] - str r4, [sp, #0xc] - str r2, [sp, #0x10] - add r2, r3, #0 - add r3, r4, #0 - bl ov16_0226DD54 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DD7C - - thumb_func_start ov16_0226DD9C -ov16_0226DD9C: ; 0x0226DD9C - push {r4, lr} - sub sp, #0x18 - add r4, r2, #0 - str r3, [sp] - ldr r2, [sp, #0x20] - str r1, [sp, #4] - str r2, [sp, #8] - str r4, [sp, #0xc] - str r2, [sp, #0x10] - ldr r2, [sp, #0x24] - str r2, [sp, #0x14] - add r2, r3, #0 - add r3, r4, #0 - bl ov16_0226DCCC - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DD9C - - thumb_func_start ov16_0226DDC0 -ov16_0226DDC0: ; 0x0226DDC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r3, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #0x10] - ldr r3, [sp, #0x10] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D500 - ldr r0, [r5, #0x10] - add r1, r4, #0 - bl sub_0200D364 - ldr r0, [r5, #0x10] - mov r1, #1 - bl sub_0200D3F4 - pop {r3, r4, r5, pc} - thumb_func_end ov16_0226DDC0 - - thumb_func_start ov16_0226DDE8 -ov16_0226DDE8: ; 0x0226DDE8 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_0226DDF0: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _0226DDF0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DDE8 - - thumb_func_start ov16_0226DE04 -ov16_0226DE04: ; 0x0226DE04 - ldr r3, _0226DE0C ; =sub_0200D3F4 - ldr r0, [r0, #0x10] - mov r1, #0 - bx r3 - ; .align 2, 0 -_0226DE0C: .word sub_0200D3F4 - thumb_func_end ov16_0226DE04 - - thumb_func_start ov16_0226DE10 -ov16_0226DE10: ; 0x0226DE10 - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r0, [r6, #0] - bl sub_0200D408 - cmp r0, #0 - beq _0226DE40 - mov r4, #0 - add r5, r6, #0 -_0226DE22: - ldr r0, [r5, #0] - bl sub_0200D330 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0226DE22 - ldr r0, [r6, #0x10] - bl sub_0200D408 - cmp r0, #1 - bne _0226DE40 - ldr r0, [r6, #0x10] - bl sub_0200D330 -_0226DE40: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DE10 - - thumb_func_start ov16_0226DE44 -ov16_0226DE44: ; 0x0226DE44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x52 - add r1, r2, #0 - add r7, r3, #0 - bl sub_02006C24 - add r6, r0, #0 - str r6, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, [sp, #0x34] - mov r1, #3 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xa - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #0x38] - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xc - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #0x3c] - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xd - bl sub_0200CE54 - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov16_0226DE44 - - thumb_func_start ov16_0226DEC4 -ov16_0226DEC4: ; 0x0226DEC4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0200D070 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D080 - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200D090 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl sub_0200D0A0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DEC4 - - thumb_func_start ov16_0226DEEC -ov16_0226DEEC: ; 0x0226DEEC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - ldr r5, _0226DF5C ; =0x02270AD8 - add r6, r3, #0 - add r7, r0, #0 - str r1, [sp] - add r4, sp, #4 - mov r3, #6 -_0226DEFC: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _0226DEFC - ldr r0, [r5, #0] - mov r1, #0x20 - str r0, [r4, #0] - ldr r0, [sp, #0x50] - str r6, [sp, #0x18] - str r0, [sp, #0x1c] - ldr r0, [sp, #0x54] - str r0, [sp, #0x20] - ldr r0, [sp, #0x58] - str r0, [sp, #0x24] - ldr r0, [sp, #0x5c] - str r0, [sp, #0xc] - ldr r0, [sp, #0x60] - str r0, [sp, #0x30] - add r0, r2, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r1, [sp] - add r0, r7, #0 - add r2, sp, #4 - bl sub_0200CE6C - mov r1, #0 - str r0, [r4, #0] - bl sub_0200D3F4 - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [r4, #0x14] - ldr r0, _0226DF60 ; =ov16_0226DFD8 - ldr r2, _0226DF64 ; =0x000003E7 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add r0, r4, #0 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226DF5C: .word 0x02270AD8 -_0226DF60: .word ov16_0226DFD8 -_0226DF64: .word 0x000003E7 - thumb_func_end ov16_0226DEEC - - thumb_func_start ov16_0226DF68 -ov16_0226DF68: ; 0x0226DF68 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0200D0F4 - ldr r0, [r4, #4] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov16_0226DF68 - - thumb_func_start ov16_0226DF80 -ov16_0226DF80: ; 0x0226DF80 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov16_0226E13C - str r7, [r5, #8] - str r4, [r5, #0xc] - str r6, [r5, #0x14] - lsl r1, r7, #0x10 - lsl r2, r4, #0x10 - ldr r0, [r5, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r6, #0 - bl sub_0200D500 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_0200D3F4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov16_0226DF80 - - thumb_func_start ov16_0226DFB0 -ov16_0226DFB0: ; 0x0226DFB0 - push {r3, lr} - mov r3, #3 - lsl r3, r3, #0x12 - bl ov16_0226DF80 - pop {r3, pc} - thumb_func_end ov16_0226DFB0 - - thumb_func_start ov16_0226DFBC -ov16_0226DFBC: ; 0x0226DFBC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r4, #0 - bl ov16_0226E13C - pop {r4, pc} - thumb_func_end ov16_0226DFBC - - thumb_func_start ov16_0226DFD0 -ov16_0226DFD0: ; 0x0226DFD0 - strh r1, [r0, #0x18] - bx lr - thumb_func_end ov16_0226DFD0 - - thumb_func_start ov16_0226DFD4 -ov16_0226DFD4: ; 0x0226DFD4 - ldrb r0, [r0, #0x1b] - bx lr - thumb_func_end ov16_0226DFD4 - - thumb_func_start ov16_0226DFD8 -ov16_0226DFD8: ; 0x0226DFD8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldrb r0, [r4, #0x1b] - cmp r0, #1 - bne _0226DFE6 - mov r0, #0 - strb r0, [r4, #0x1b] -_0226DFE6: - mov r0, #0x18 - ldrsh r1, [r4, r0] - cmp r1, #0 - ble _0226DFFC - sub r1, r1, #1 - strh r1, [r4, #0x18] - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _0226DFFC - mov r0, #1 - strb r0, [r4, #0x1a] -_0226DFFC: - ldr r0, [r4, #0] - bl sub_0200D408 - cmp r0, #0 - bne _0226E008 - b _0226E134 -_0226E008: - ldrb r0, [r4, #0x1c] - cmp r0, #0 - bne _0226E08A - mov r1, #0xfa - ldr r2, [r4, #0x10] - lsl r1, r1, #2 - add r2, r2, r1 - add r0, r4, #0 - ldr r1, _0226E138 ; =0x00004650 - add r0, #0x10 - str r2, [r4, #0x10] - cmp r2, r1 - blt _0226E036 - ldr r2, [r0, #0] - sub r1, r2, r1 - str r1, [r0, #0] - ldrb r0, [r4, #0x1a] - cmp r0, #1 - bne _0226E036 - mov r0, #1 - strb r0, [r4, #0x1c] - mov r0, #0 - strb r0, [r4, #0x1a] -_0226E036: - ldrb r0, [r4, #0x1c] - cmp r0, #0 - bne _0226E08A - ldr r0, [r4, #0x10] - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - mov r2, #0xe - asr r1, r0, #0x1f - lsl r2, r2, #0xc - mov r3, #0 - bl sub_020E1F1C - add r5, r1, #0 - ldr r1, [r4, #8] - mov r2, #2 - add r6, r0, #0 - lsl r1, r1, #0x10 - mov r7, #0 - lsl r2, r2, #0xa - asr r1, r1, #0x10 - add r2, r6, r2 - adc r5, r7 - lsl r5, r5, #0x14 - lsr r2, r2, #0xc - orr r2, r5 - asr r5, r2, #0xb - lsr r5, r5, #0x14 - add r5, r2, r5 - ldr r3, [r4, #0xc] - asr r2, r5, #0xc - sub r2, r3, r2 - lsl r2, r2, #0x10 - ldr r0, [r4, #0] - ldr r3, [r4, #0x14] - asr r2, r2, #0x10 - bl sub_0200D500 -_0226E08A: - ldrb r0, [r4, #0x1c] - cmp r0, #1 - bne _0226E12E - ldrb r0, [r4, #0x1d] - cmp r0, #3 - bhi _0226E12E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226E0A2: ; jump table - .short _0226E0AA - _0226E0A2 - 2 ; case 0 - .short _0226E0C2 - _0226E0A2 - 2 ; case 1 - .short _0226E0E4 - _0226E0A2 - 2 ; case 2 - .short _0226E112 - _0226E0A2 - 2 ; case 3 -_0226E0AA: - ldrb r0, [r4, #0x1e] - add r0, r0, #1 - strb r0, [r4, #0x1e] - ldrb r0, [r4, #0x1e] - cmp r0, #3 - bls _0226E12E - mov r0, #0 - strb r0, [r4, #0x1e] - ldrb r0, [r4, #0x1d] - add r0, r0, #1 - strb r0, [r4, #0x1d] - b _0226E12E -_0226E0C2: - ldr r2, [r4, #0xc] - ldr r1, [r4, #8] - add r2, #8 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, #0] - ldr r3, [r4, #0x14] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D500 - mov r0, #1 - strb r0, [r4, #0x1b] - ldrb r0, [r4, #0x1d] - add r0, r0, #1 - strb r0, [r4, #0x1d] - b _0226E12E -_0226E0E4: - ldrb r0, [r4, #0x1e] - add r0, r0, #1 - strb r0, [r4, #0x1e] - ldrb r0, [r4, #0x1e] - cmp r0, #2 - bls _0226E12E - ldr r2, [r4, #0xc] - ldr r1, [r4, #8] - add r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, #0] - ldr r3, [r4, #0x14] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D500 - mov r0, #0 - strb r0, [r4, #0x1e] - ldrb r0, [r4, #0x1d] - add r0, r0, #1 - strb r0, [r4, #0x1d] - b _0226E12E -_0226E112: - ldrb r0, [r4, #0x1e] - add r0, r0, #1 - strb r0, [r4, #0x1e] - ldrb r0, [r4, #0x1e] - cmp r0, #2 - bls _0226E12E - add r0, r4, #0 - bl ov16_0226DFBC - mov r0, #0 - strb r0, [r4, #0x1e] - ldrb r0, [r4, #0x1d] - add r0, r0, #1 - strb r0, [r4, #0x1d] -_0226E12E: - ldr r0, [r4, #0] - bl sub_0200D330 -_0226E134: - pop {r3, r4, r5, r6, r7, pc} - nop -_0226E138: .word 0x00004650 - thumb_func_end ov16_0226DFD8 - - thumb_func_start ov16_0226E13C -ov16_0226E13C: ; 0x0226E13C - mov r1, #0 - str r1, [r0, #0x10] - strb r1, [r0, #0x1c] - strb r1, [r0, #0x1d] - strb r1, [r0, #0x1e] - bx lr - thumb_func_end ov16_0226E13C - - thumb_func_start ov16_0226E148 -ov16_0226E148: ; 0x0226E148 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #5 - mov r1, #8 - bl sub_02018144 - mov r1, #0 - mov r2, #8 - add r4, r0, #0 - bl sub_020C4CF4 - mov r2, #0xfa - ldr r0, _0226E170 ; =ov16_0226E188 - add r1, r4, #0 - lsl r2, r2, #2 - str r5, [r4, #0] - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_0226E170: .word ov16_0226E188 - thumb_func_end ov16_0226E148 - - thumb_func_start ov16_0226E174 -ov16_0226E174: ; 0x0226E174 - push {r4, lr} - add r4, r0, #0 - bl sub_0201CED0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov16_0226E174 - - thumb_func_start ov16_0226E188 -ov16_0226E188: ; 0x0226E188 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - ldr r0, [r4, #0] - bl ov16_0223E02C - mov r1, #4 - ldrsh r1, [r4, r1] - add r5, r0, #0 - cmp r1, #4 - bhi _0226E252 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226E1AA: ; jump table - .short _0226E1B4 - _0226E1AA - 2 ; case 0 - .short _0226E1FA - _0226E1AA - 2 ; case 1 - .short _0226E20E - _0226E1AA - 2 ; case 2 - .short _0226E234 - _0226E1AA - 2 ; case 3 - .short _0226E252 - _0226E1AA - 2 ; case 4 -_0226E1B4: - cmp r5, #0 - bne _0226E1BC - bl sub_02022974 -_0226E1BC: - mov r0, #7 - mov r1, #5 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #0x1b - mov r1, #5 - bl sub_02006C24 - add r7, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #0x12 - bl ov16_02268C04 - add r0, r6, #0 - bl sub_02006CA8 - add r0, r7, #0 - bl sub_02006CA8 - mov r0, #4 - ldrsh r0, [r4, r0] - add sp, #8 - add r0, r0, #1 - strh r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226E1FA: - bl ov16_02269348 - cmp r0, #1 - bne _0226E252 - mov r0, #4 - ldrsh r0, [r4, r0] - add sp, #8 - add r0, r0, #1 - strh r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226E20E: - ldr r0, [r4, #0] - bl ov16_0223F7A4 - cmp r0, #1 - bne _0226E252 - add r0, r5, #0 - bl ov16_0226925C - cmp r0, #1 - bne _0226E252 - ldr r0, _0226E258 ; =0x000005DD - bl sub_02005748 - mov r0, #4 - ldrsh r0, [r4, r0] - add sp, #8 - add r0, r0, #1 - strh r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_0226E234: - mov r0, #6 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #6] - ldrsh r0, [r4, r0] - cmp r0, #8 - ble _0226E252 - ldr r0, [r4, #0] - mov r1, #0 - bl ov16_0223F720 - mov r0, #4 - ldrsh r0, [r4, r0] - add r0, r0, #1 - strh r0, [r4, #4] -_0226E252: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226E258: .word 0x000005DD - thumb_func_end ov16_0226E188 - ; 0x0226E25C - - - .rodata - .incbin "incbin/overlay16_rodata.bin" - - .section .sinit, 4 - .word ov16_0223D0F4 - - .data - .incbin "incbin/overlay16_data.bin" - - .bss - .space 0x0 diff --git a/asm/overlay17.s b/asm/overlay17.s deleted file mode 100644 index c87a36771..000000000 --- a/asm/overlay17.s +++ /dev/null @@ -1,49940 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov17_0223B140 -ov17_0223B140: ; 0x0223B140 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r1, #1 - lsl r1, r1, #0x1a - ldr r0, [r1, #0] - ldr r2, _0223B404 ; =0xFFFFE0FF - and r0, r2 - str r0, [r1, #0] - ldr r0, _0223B408 ; =0x04001000 - ldr r3, [r0, #0] - and r2, r3 - str r2, [r0, #0] - ldr r3, [r1, #0] - ldr r2, _0223B40C ; =0xFFFF1FFF - and r3, r2 - str r3, [r1, #0] - ldr r3, [r0, #0] - add r1, #0x50 - and r2, r3 - str r2, [r0, #0] - mov r2, #0 - strh r2, [r1] - add r0, #0x50 - strh r2, [r0] - mov r2, #7 - mov r0, #3 - mov r1, #0x15 - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, _0223B410 ; =0x00001658 - add r0, r5, #0 - mov r2, #0x15 - bl sub_0200681C - ldr r2, _0223B410 ; =0x00001658 - mov r1, #0 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x15 - bl ov17_0223F140 - str r0, [r4, #8] - add r0, r5, #0 - bl sub_02006840 - mov r1, #0x5b - str r0, [r4, #0] - lsl r1, r1, #2 - str r4, [r0, r1] - ldr r2, [r4, #0] - mov r3, #2 - add r0, r1, #4 - strb r3, [r2, r0] - ldr r0, [r4, #0] - str r0, [r4, #0xc] - add r0, r4, #0 - bl ov17_0223B8C4 - mov r0, #0x15 - bl sub_02002F38 - str r0, [r4, #0x5c] - mov r1, #1 - bl sub_02003858 - mov r2, #2 - ldr r0, [r4, #0x5c] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #0x15 - bl sub_02002F70 - mov r1, #1 - ldr r0, [r4, #0x5c] - lsl r2, r1, #9 - mov r3, #0x15 - bl sub_02002F70 - mov r2, #7 - ldr r0, [r4, #0x5c] - mov r1, #2 - lsl r2, r2, #6 - mov r3, #0x15 - bl sub_02002F70 - mov r2, #2 - ldr r0, [r4, #0x5c] - mov r1, #3 - lsl r2, r2, #8 - mov r3, #0x15 - bl sub_02002F70 - mov r0, #0x15 - bl sub_02018340 - str r0, [r4, #0x30] - mov r0, #0x40 - mov r1, #0x15 - bl sub_0201DBEC - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - mov r2, #0x23 - add r1, r4, #0 - lsl r2, r2, #4 - ldr r0, [r4, #0] - add r1, #0xc - add r2, r4, r2 - bl ov17_0223F88C - ldr r1, _0223B414 ; =0x0000081C - str r0, [r4, r1] - ldr r0, [r4, #0x30] - bl ov17_0223B728 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r0, #2 - mov r1, #0x15 - bl sub_02002BB8 - mov r0, #0x15 - bl sub_0200C6E4 - ldr r1, _0223B418 ; =0x02252DC8 - ldr r2, _0223B41C ; =0x02252D9C - mov r3, #0x20 - str r0, [r4, #0x24] - bl sub_0200C73C - ldr r1, _0223B420 ; =0x00100010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - ldr r0, [r4, #0x24] - bl sub_0200C704 - str r0, [r4, #0x28] - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x28] - mov r2, #0x80 - bl sub_0200C7C0 - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x28] - ldr r2, _0223B424 ; =0x02252DB0 - bl sub_0200CB30 - ldr r0, [r4, #0x24] - bl sub_0200C738 - mov r2, #0x11 - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_0200964C - mov r0, #0x15 - bl sub_0200762C - str r0, [r4, #0x10] - bl ov17_0223B884 - mov r0, #0x15 - bl ov12_0221FCDC - mov r1, #1 - str r0, [r4, #0x2c] - bl ov12_0221FDC0 - mov r0, #0 - mov r1, #0x1a - mov r2, #0xcc - mov r3, #0x15 - bl sub_0200B144 - str r0, [r4, #0x44] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xcd - mov r3, #0x15 - bl sub_0200B144 - str r0, [r4, #0x48] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xd2 - mov r3, #0x15 - bl sub_0200B144 - str r0, [r4, #0x4c] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xd3 - mov r3, #0x15 - bl sub_0200B144 - str r0, [r4, #0x50] - mov r0, #8 - mov r1, #0x15 - bl sub_02012744 - str r0, [r4, #0x60] - mov r0, #0x15 - bl sub_0200B358 - str r0, [r4, #0x54] - mov r0, #0x1e - lsl r0, r0, #4 - mov r1, #0x15 - bl sub_02023790 - str r0, [r4, #0x58] - mov r0, #0x2d - mov r1, #0x15 - bl sub_02006C24 - add r5, r0, #0 - mov r0, #0x2e - mov r1, #0x15 - bl sub_02006C24 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov17_0223BBA8 - add r0, r4, #0 - add r1, r5, #0 - bl ov17_0223BCE0 - add r0, r4, #0 - bl ov17_0223B858 - add r0, r4, #0 - bl ov17_02241428 - add r0, r4, #0 - add r1, r6, #0 - bl ov17_0223B8F8 - add r0, r4, #0 - add r1, r6, #0 - bl ov17_0223BA10 - add r0, r5, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - ldr r7, _0223B428 ; =0x00000123 - mov r6, #0 - add r5, sp, #0xc -_0223B364: - ldr r1, [r4, #0] - mov r2, #0 - ldrb r0, [r1, r7] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - add r1, #0x36 - bl sub_02074470 - strh r0, [r5] - add r6, r6, #1 - add r5, r5, #2 - cmp r6, #4 - blt _0223B364 - ldr r0, _0223B414 ; =0x0000081C - add r1, sp, #0xc - ldr r0, [r4, r0] - bl ov17_02240A80 - ldr r0, _0223B414 ; =0x0000081C - mov r1, #0 - ldr r0, [r4, r0] - mov r2, #1 - add r3, r1, #0 - bl ov17_0223F9C4 - add r0, r4, #0 - add r0, #0xc - bl ov17_022415E4 - bl sub_02039734 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0x15 - str r1, [sp, #8] - mov r1, #0x1f - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, _0223B42C ; =ov17_0223B6F0 - ldr r2, _0223B430 ; =0x0000EA60 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r0, _0223B434 ; =0x00000824 - mov r1, #1 - strb r1, [r4, r0] - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r1, _0223B438 ; =0x0000046F - mov r0, #6 - mov r2, #1 - bl sub_02004550 - ldr r1, [r4, #0] - ldr r0, _0223B43C ; =0x00000171 - ldrb r0, [r1, r0] - bl sub_020959F4 - ldr r0, _0223B440 ; =ov17_0223B6BC - add r1, r4, #0 - bl sub_02017798 - mov r0, #1 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223B404: .word 0xFFFFE0FF -_0223B408: .word 0x04001000 -_0223B40C: .word 0xFFFF1FFF -_0223B410: .word 0x00001658 -_0223B414: .word 0x0000081C -_0223B418: .word 0x02252DC8 -_0223B41C: .word 0x02252D9C -_0223B420: .word 0x00100010 -_0223B424: .word 0x02252DB0 -_0223B428: .word 0x00000123 -_0223B42C: .word ov17_0223B6F0 -_0223B430: .word 0x0000EA60 -_0223B434: .word 0x00000824 -_0223B438: .word 0x0000046F -_0223B43C: .word 0x00000171 -_0223B440: .word ov17_0223B6BC - thumb_func_end ov17_0223B140 - - thumb_func_start ov17_0223B444 -ov17_0223B444: ; 0x0223B444 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02094E98 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223B466 - cmp r0, #1 - beq _0223B474 - cmp r0, #2 - beq _0223B54E - b _0223B564 -_0223B466: - bl sub_0200F2AC - cmp r0, #1 - bne _0223B564 - mov r0, #1 - str r0, [r5, #0] - b _0223B564 -_0223B474: - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #1 - bne _0223B4EE - ldr r2, _0223B56C ; =0x00000822 - ldr r1, _0223B570 ; =0x00001648 - ldrh r2, [r4, r2] - add r0, r4, #0 - add r1, r4, r1 - lsl r3, r2, #2 - ldr r2, _0223B574 ; =0x02252E10 - ldr r2, [r2, r3] - blx r2 - sub r1, r0, #1 - cmp r1, #1 - bhi _0223B4B8 - cmp r0, #1 - bne _0223B4A2 - ldr r0, _0223B56C ; =0x00000822 - ldrh r1, [r4, r0] - add r1, r1, #1 - b _0223B4A8 -_0223B4A2: - ldr r0, _0223B578 ; =0x0000164A - ldrh r1, [r4, r0] - ldr r0, _0223B56C ; =0x00000822 -_0223B4A8: - strh r1, [r4, r0] - ldr r0, _0223B570 ; =0x00001648 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - b _0223B4EE -_0223B4B8: - cmp r0, #3 - bne _0223B4EE - ldr r0, _0223B57C ; =0x00001650 - ldrb r1, [r4, r0] - cmp r1, #1 - bne _0223B4EE - mov r1, #2 - sub r0, #8 - str r1, [r5, #0] - add r0, r4, r0 - mov r1, #0 - mov r2, #8 - bl sub_020C4CF4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x15 - mov r1, #0x20 - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - b _0223B564 -_0223B4EE: - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov17_0224F35C - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r4, #0 - bl ov17_0224F3D8 - ldr r0, _0223B57C ; =0x00001650 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223B564 - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov17_0224F3D0 - cmp r0, #0 - bne _0223B564 - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #0 - bne _0223B564 - mov r0, #2 - str r0, [r5, #0] - ldr r0, _0223B570 ; =0x00001648 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x15 - mov r1, #0x20 - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - b _0223B564 -_0223B54E: - ldr r0, _0223B57C ; =0x00001650 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223B564 - bl sub_0200F2AC - cmp r0, #1 - bne _0223B564 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0223B564: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223B56C: .word 0x00000822 -_0223B570: .word 0x00001648 -_0223B574: .word 0x02252E10 -_0223B578: .word 0x0000164A -_0223B57C: .word 0x00001650 - thumb_func_end ov17_0223B444 - - thumb_func_start ov17_0223B580 -ov17_0223B580: ; 0x0223B580 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - bl sub_020141E4 - ldr r0, [r4, #0x2c] - bl ov12_0221FDF4 - add r0, r4, #0 - bl ov17_0223B9A4 - add r0, r4, #0 - bl ov17_0223BAD0 - add r0, r4, #0 - bl ov17_0223BCDC - add r0, r4, #0 - bl ov17_0223BCE4 - add r0, r4, #0 - add r0, #0x34 - bl sub_0201A8FC - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0x30] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0x30] - bl ov17_0223F864 - ldr r0, _0223B6AC ; =0x0000081C - ldr r0, [r4, r0] - bl ov17_0223F960 - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x28] - bl sub_0200D0B0 - ldr r0, [r4, #0x24] - bl sub_0200C8D4 - bl sub_0201DC3C - add r0, r4, #0 - add r0, #0xc - bl ov17_022416E4 - ldr r0, [r4, #0x10] - bl sub_02007B6C - mov r0, #2 - bl sub_02002C60 - ldr r0, [r4, #0x60] - bl sub_020127BC - ldr r0, [r4, #0x5c] - mov r1, #0 - bl sub_02002FA0 - ldr r0, [r4, #0x5c] - mov r1, #1 - bl sub_02002FA0 - ldr r0, [r4, #0x5c] - mov r1, #2 - bl sub_02002FA0 - ldr r0, [r4, #0x5c] - mov r1, #3 - bl sub_02002FA0 - ldr r0, [r4, #0x5c] - bl sub_02002F54 - ldr r0, [r4, #0x58] - bl sub_020237BC - ldr r0, [r4, #0x54] - bl sub_0200B3F0 - ldr r0, [r4, #0x44] - bl sub_0200B190 - ldr r0, [r4, #0x48] - bl sub_0200B190 - ldr r0, [r4, #0x4c] - bl sub_0200B190 - ldr r0, [r4, #0x50] - bl sub_0200B190 - ldr r0, [r4, #0x30] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, [r4, #8] - bl ov17_0223F1E0 - bl sub_0201E530 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - mov r0, #0x15 - bl sub_0201807C - bl sub_02095A24 - bl sub_02039794 - ldr r0, _0223B6B0 ; =0x0000000B - bl sub_02006514 - ldr r0, _0223B6B4 ; =0x0000000C - bl sub_02006514 - ldr r0, _0223B6B8 ; =0x00000016 - bl sub_02006514 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223B6AC: .word 0x0000081C -_0223B6B0: .word 0x0000000B -_0223B6B4: .word 0x0000000C -_0223B6B8: .word 0x00000016 - thumb_func_end ov17_0223B580 - - thumb_func_start ov17_0223B6BC -ov17_0223B6BC: ; 0x0223B6BC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl sub_02008A94 - bl sub_0201DCAC - bl sub_0200C800 - ldr r0, [r4, #0x5c] - bl sub_02003694 - ldr r0, [r4, #0x30] - bl sub_0201C2B8 - ldr r3, _0223B6E8 ; =0x027E0000 - ldr r1, _0223B6EC ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - ; .align 2, 0 -_0223B6E8: .word 0x027E0000 -_0223B6EC: .word 0x00003FF8 - thumb_func_end ov17_0223B6BC - - thumb_func_start ov17_0223B6F0 -ov17_0223B6F0: ; 0x0223B6F0 - push {r4, lr} - ldr r0, _0223B720 ; =0x00000824 - add r4, r1, #0 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223B716 - ldr r0, [r4, #0x10] - bl sub_02007768 - bl ov11_0221F8F0 - ldr r0, [r4, #0x28] - bl sub_0200C7EC - bl sub_0200C808 - ldr r0, _0223B724 ; =0x04000540 - mov r1, #1 - str r1, [r0, #0] -_0223B716: - ldr r1, [r4, #0x30] - mov r0, #0x15 - bl sub_02038A1C - pop {r4, pc} - ; .align 2, 0 -_0223B720: .word 0x00000824 -_0223B724: .word 0x04000540 - thumb_func_end ov17_0223B6F0 - - thumb_func_start ov17_0223B728 -ov17_0223B728: ; 0x0223B728 - push {r4, r5, lr} - sub sp, #0x8c - add r4, r0, #0 - bl sub_0201FF00 - ldr r5, _0223B848 ; =0x02252DE8 - add r3, sp, #0x10 - mov r2, #5 -_0223B738: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223B738 - add r0, sp, #0x10 - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - ldr r5, _0223B84C ; =0x02252D8C - add r3, sp, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223B850 ; =0x02252E50 - add r3, sp, #0x38 - mov r2, #0xa -_0223B798: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223B798 - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - add r2, sp, #0x38 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #1 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - add r2, sp, #0x54 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #3 - add r2, sp, #0x70 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r1, _0223B854 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #2 - orr r0, r2 - strh r0, [r1] - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - add r0, r4, #0 - bl ov17_0223F80C - add sp, #0x8c - pop {r4, r5, pc} - ; .align 2, 0 -_0223B848: .word 0x02252DE8 -_0223B84C: .word 0x02252D8C -_0223B850: .word 0x02252E50 -_0223B854: .word 0x04000008 - thumb_func_end ov17_0223B728 - - thumb_func_start ov17_0223B858 -ov17_0223B858: ; 0x0223B858 - push {lr} - sub sp, #0x14 - add r1, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x14 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #3 - lsl r0, r0, #8 - str r0, [sp, #0x10] - ldr r0, [r1, #0x30] - add r1, #0x34 - mov r2, #1 - mov r3, #0xb - bl sub_0201A7E8 - add sp, #0x14 - pop {pc} - thumb_func_end ov17_0223B858 - - thumb_func_start ov17_0223B884 -ov17_0223B884: ; 0x0223B884 - push {r3, r4, r5, lr} - ldr r3, _0223B8BC ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _0223B8C0 ; =0x02100DF4 - mov r1, #0 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - add r2, r1, #0 - blx r3 - add r5, r0, #0 - cmp r4, #0 - bne _0223B8AC - bl sub_02022974 -_0223B8AC: - cmp r5, #0 - bne _0223B8B4 - bl sub_02022974 -_0223B8B4: - bl sub_02014000 - pop {r3, r4, r5, pc} - nop -_0223B8BC: .word 0x02100DEC -_0223B8C0: .word 0x02100DF4 - thumb_func_end ov17_0223B884 - - thumb_func_start ov17_0223B8C4 -ov17_0223B8C4: ; 0x0223B8C4 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0223B8D2 - bl sub_02022974 -_0223B8D2: - ldr r1, _0223B8F4 ; =0x00000172 - mov r0, #0 - add r2, r1, #0 - add r2, #0xbf -_0223B8DA: - ldr r3, [r4, #0] - add r3, r3, r0 - ldrb r5, [r3, r1] - add r3, r4, r0 - add r0, r0, #1 - strb r5, [r3, r2] - cmp r0, #4 - blt _0223B8DA - add r0, r4, #0 - bl ov17_02243C28 - pop {r3, r4, r5, pc} - nop -_0223B8F4: .word 0x00000172 - thumb_func_end ov17_0223B8C4 - - thumb_func_start ov17_0223B8F8 -ov17_0223B8F8: ; 0x0223B8F8 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #6 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0223B998 ; =0x000080E9 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [r5, #0x5c] - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - bl sub_0200CDC4 - str r4, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _0223B99C ; =0x000080ED - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [r5, #0x5c] - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - bl sub_0200CDC4 - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - add r2, r4, #0 - bl ov17_02243040 - add r0, r5, #0 - bl ov17_02242FA4 - add r0, r5, #0 - ldr r1, [r5, #0] - add r0, #0xc - add r2, r4, #0 - bl ov17_02241928 - add r0, r5, #0 - ldr r2, [r5, #0] - ldr r1, _0223B9A0 ; =0x0000011E - add r0, #0xc - ldrb r1, [r2, r1] - add r2, r4, #0 - bl ov17_02241D94 - ldr r0, [r5, #0x5c] - ldr r1, [r5, #0x24] - ldr r2, [r5, #0x28] - add r3, r4, #0 - bl ov17_022419AC - add r0, r5, #0 - add r0, #0xc - bl ov17_02241A24 - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - add r2, r4, #0 - bl ov17_02241E58 - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - add r2, r4, #0 - bl ov17_02242154 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223B998: .word 0x000080E9 -_0223B99C: .word 0x000080ED -_0223B9A0: .word 0x0000011E - thumb_func_end ov17_0223B8F8 - - thumb_func_start ov17_0223B9A4 -ov17_0223B9A4: ; 0x0223B9A4 - push {r4, lr} - add r4, r0, #0 - add r0, #0xc - bl ov17_02241E24 - add r0, r4, #0 - add r0, #0xc - bl ov17_0224197C - add r0, r4, #0 - bl ov17_02242FC0 - add r0, r4, #0 - add r0, #0xc - bl ov17_022430F8 - ldr r0, [r4, #0x28] - bl ov17_0224308C - ldr r0, [r4, #0x28] - ldr r1, _0223BA08 ; =0x000080E9 - bl sub_0200D080 - ldr r0, [r4, #0x28] - ldr r1, _0223BA0C ; =0x000080ED - bl sub_0200D080 - add r0, r4, #0 - add r0, #0xc - bl ov17_02241A64 - ldr r0, [r4, #0x28] - bl ov17_02241A00 - ldr r0, [r4, #0x28] - bl ov17_02241EA4 - add r0, r4, #0 - add r0, #0xc - bl ov17_02241EF0 - ldr r0, [r4, #0x28] - bl ov17_022421E0 - add r4, #0xc - add r0, r4, #0 - bl ov17_02242248 - pop {r4, pc} - nop -_0223BA08: .word 0x000080E9 -_0223BA0C: .word 0x000080ED - thumb_func_end ov17_0223B9A4 - - thumb_func_start ov17_0223BA10 -ov17_0223BA10: ; 0x0223BA10 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0223BABC ; =0x000080EF - str r0, [sp, #0x14] - ldr r0, [r5, #0x5c] - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - bl sub_0200CDC4 - str r4, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0223BAC0 ; =0x000080F0 - mov r1, #3 - str r0, [sp, #0x14] - ldr r0, [r5, #0x5c] - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - bl sub_0200CDC4 - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - add r2, r4, #0 - bl ov17_0224131C - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - add r2, r4, #0 - bl ov17_02241270 - ldr r2, _0223BAC4 ; =0x000080F4 - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - add r3, r2, #0 - bl ov17_0224F0F0 - ldr r7, _0223BAC8 ; =0x000080F6 - ldr r6, _0223BACC ; =0x00000123 - mov r4, #0 -_0223BA80: - ldr r1, [r5, #0] - mov r2, #0 - ldrb r0, [r1, r6] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - add r1, #0x36 - bl sub_02074470 - cmp r0, #0 - beq _0223BAA0 - mov r1, #0xb - bl sub_020790C4 - add r3, r0, #0 - b _0223BAA2 -_0223BAA0: - mov r3, #0 -_0223BAA2: - add r0, r4, r7 - str r0, [sp] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0x28] - mov r2, #2 - bl ov17_0224F0BC - add r4, r4, #1 - cmp r4, #4 - blt _0223BA80 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BABC: .word 0x000080EF -_0223BAC0: .word 0x000080F0 -_0223BAC4: .word 0x000080F4 -_0223BAC8: .word 0x000080F6 -_0223BACC: .word 0x00000123 - thumb_func_end ov17_0223BA10 - - thumb_func_start ov17_0223BAD0 -ov17_0223BAD0: ; 0x0223BAD0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x28] - ldr r1, _0223BB08 ; =0x000080EF - bl sub_0200D080 - ldr r0, [r5, #0x28] - bl ov17_022413B4 - ldr r0, [r5, #0x28] - bl ov17_022412F0 - ldr r1, _0223BB0C ; =0x000080F4 - ldr r0, [r5, #0x28] - add r2, r1, #0 - bl ov17_0224F140 - ldr r6, _0223BB10 ; =0x000080F6 - mov r4, #0 -_0223BAF6: - ldr r0, [r5, #0x28] - add r1, r4, r6 - bl ov17_0224F138 - add r4, r4, #1 - cmp r4, #4 - blt _0223BAF6 - pop {r4, r5, r6, pc} - nop -_0223BB08: .word 0x000080EF -_0223BB0C: .word 0x000080F4 -_0223BB10: .word 0x000080F6 - thumb_func_end ov17_0223BAD0 - - thumb_func_start ov17_0223BB14 -ov17_0223BB14: ; 0x0223BB14 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #0 - bne _0223BB7E - mov r0, #0 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xe - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - mov r0, #0x2d - mov r1, #3 - mov r3, #2 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - mov r0, #0x2d - mov r1, #5 - mov r3, #2 - bl sub_02006E60 - mov r0, #1 - add r1, r0, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - add r0, r5, #0 - bl ov17_02241428 - cmp r4, #1 - bne _0223BBA2 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x10 - pop {r3, r4, r5, pc} -_0223BB7E: - mov r0, #2 - lsl r1, r0, #0xd - mov r2, #0 - mov r3, #0x15 - bl sub_02019690 - ldr r0, [r5, #0x30] - mov r1, #2 - bl sub_02019EBC - mov r0, #1 - mov r1, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 -_0223BBA2: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0223BB14 - - thumb_func_start ov17_0223BBA8 -ov17_0223BBA8: ; 0x0223BBA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - add r4, r1, #0 - str r0, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #2 - mov r3, #3 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #4 - bl sub_0200710C - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov17_0223BB14 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #0x5c] - mov r1, #0x2d - mov r2, #0x1e - mov r3, #0x15 - bl sub_02003050 - mov r0, #0x15 - mov r1, #0x20 - bl sub_02018144 - add r7, r0, #0 - mov r0, #0x15 - mov r1, #0x20 - bl sub_02018144 - str r0, [sp, #0x10] - ldr r0, [r5, #0x5c] - mov r1, #0 - bl sub_02003164 - add r4, r0, #0 - ldr r0, [r5, #0x5c] - mov r1, #0 - bl sub_0200316C - str r0, [sp, #0x14] - ldr r0, _0223BCD4 ; =0x022536B4 - add r1, r7, #0 - ldrb r0, [r0] - mov r2, #0x20 - lsl r6, r0, #5 - add r0, r4, r6 - bl sub_020C4B18 - ldr r1, [r5, #0] - ldr r0, _0223BCD8 ; =0x00000123 - mov r2, #0x20 - ldrb r1, [r1, r0] - ldr r0, _0223BCD4 ; =0x022536B4 - ldrb r0, [r0, r1] - ldr r1, [sp, #0x10] - lsl r0, r0, #5 - add r0, r4, r0 - bl sub_020C4B18 - ldr r2, [r5, #0] - ldr r1, _0223BCD8 ; =0x00000123 - add r0, r7, #0 - ldrb r2, [r2, r1] - ldr r1, _0223BCD4 ; =0x022536B4 - ldrb r1, [r1, r2] - mov r2, #0x20 - lsl r1, r1, #5 - add r1, r4, r1 - bl sub_020C4B18 - ldr r0, [sp, #0x10] - add r1, r4, r6 - mov r2, #0x20 - bl sub_020C4B18 - ldr r2, [r5, #0] - ldr r1, _0223BCD8 ; =0x00000123 - add r0, r7, #0 - ldrb r2, [r2, r1] - ldr r1, _0223BCD4 ; =0x022536B4 - ldrb r1, [r1, r2] - lsl r2, r1, #5 - ldr r1, [sp, #0x14] - add r1, r1, r2 - mov r2, #0x20 - bl sub_020C4B18 - ldr r1, [sp, #0x14] - ldr r0, [sp, #0x10] - add r1, r1, r6 - mov r2, #0x20 - bl sub_020C4B18 - add r0, r7, #0 - bl sub_020181C4 - ldr r0, [sp, #0x10] - bl sub_020181C4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BCD4: .word 0x022536B4 -_0223BCD8: .word 0x00000123 - thumb_func_end ov17_0223BBA8 - - thumb_func_start ov17_0223BCDC -ov17_0223BCDC: ; 0x0223BCDC - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223BCDC - - thumb_func_start ov17_0223BCE0 -ov17_0223BCE0: ; 0x0223BCE0 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223BCE0 - - thumb_func_start ov17_0223BCE4 -ov17_0223BCE4: ; 0x0223BCE4 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223BCE4 - - thumb_func_start ov17_0223BCE8 -ov17_0223BCE8: ; 0x0223BCE8 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223BD2A - ldr r1, [r2, #0] - ldr r0, _0223BD50 ; =0x00000177 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0223BD0A - ldr r0, [r4, #4] - cmp r0, #0x78 - bge _0223BD0A - add r0, r0, #1 - str r0, [r4, #4] - b _0223BD4A -_0223BD0A: - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r2, r0 - add r1, r2, #0 - mov r2, #2 - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223BD4A - mov r0, #0 - str r0, [r4, #4] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223BD4A -_0223BD2A: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r2, #0] - ldr r4, _0223BD54 ; =0x00000127 - add r0, r2, r0 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223BD4A - mov r0, #1 - pop {r4, pc} -_0223BD4A: - mov r0, #0 - pop {r4, pc} - nop -_0223BD50: .word 0x00000177 -_0223BD54: .word 0x00000127 - thumb_func_end ov17_0223BCE8 - - thumb_func_start ov17_0223BD58 -ov17_0223BD58: ; 0x0223BD58 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl sub_0209590C - cmp r0, #0 - bne _0223BD6C - mov r0, #1 - pop {r3, r4, r5, pc} -_0223BD6C: - ldrh r0, [r4] - cmp r0, #0 - bne _0223BD9E - ldr r3, _0223BDC4 ; =0x0000040C - mov r1, #0 - strb r1, [r5, r3] - add r0, r3, #2 - strb r1, [r5, r0] - add r0, r3, #3 - strb r1, [r5, r0] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r3, #0xe4 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0x14 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223BDBE - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223BDBE -_0223BD9E: - ldr r4, _0223BDC8 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223BDBE - mov r0, #1 - pop {r3, r4, r5, pc} -_0223BDBE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223BDC4: .word 0x0000040C -_0223BDC8: .word 0x00000127 - thumb_func_end ov17_0223BD58 - - thumb_func_start ov17_0223BDCC -ov17_0223BDCC: ; 0x0223BDCC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223BE20 - ldr r0, [r5, #0] - bl sub_0209590C - cmp r0, #1 - bne _0223BDEA - ldr r0, _0223BE44 ; =0x0000040C - mov r1, #0x2d - strb r1, [r5, r0] - b _0223BDF8 -_0223BDEA: - ldr r1, [r5, #0] - ldr r0, _0223BE48 ; =0x0000011F - ldrb r0, [r1, r0] - bl ov17_02243944 - ldr r1, _0223BE44 ; =0x0000040C - strb r0, [r5, r1] -_0223BDF8: - ldr r3, _0223BE4C ; =0x0000040E - mov r1, #0 - strb r1, [r5, r3] - add r0, r3, #1 - strb r1, [r5, r0] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r3, #0xe6 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0x14 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223BE40 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223BE40 -_0223BE20: - ldr r4, _0223BE50 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223BE40 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223BE40: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223BE44: .word 0x0000040C -_0223BE48: .word 0x0000011F -_0223BE4C: .word 0x0000040E -_0223BE50: .word 0x00000127 - thumb_func_end ov17_0223BDCC - - thumb_func_start ov17_0223BE54 -ov17_0223BE54: ; 0x0223BE54 - mov r0, #1 - bx lr - thumb_func_end ov17_0223BE54 - - thumb_func_start ov17_0223BE58 -ov17_0223BE58: ; 0x0223BE58 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp] - ldrh r1, [r1] - add r4, r0, #0 - cmp r1, #0 - beq _0223BE70 - cmp r1, #1 - beq _0223BE90 - cmp r1, #2 - beq _0223BEB8 - b _0223BEF8 -_0223BE70: - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223BF08 - ldr r0, [sp] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp] - strh r1, [r0] - b _0223BF08 -_0223BE90: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223BF10 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223BF08 - ldr r0, [sp] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp] - strh r1, [r0] - b _0223BF08 -_0223BEB8: - add r1, sp, #4 - bl ov17_02246ECC - ldr r1, [r4, #0] - ldr r0, _0223BF10 ; =0x00000127 - ldrb r0, [r1, r0] - cmp r0, #4 - bge _0223BEEC - lsl r2, r0, #1 - add r3, sp, #4 - add r1, r3, r2 - ldr r7, _0223BF14 ; =0x0000023E - add r2, r4, r2 - add r3, r3, r0 -_0223BED4: - ldrh r6, [r1] - ldr r5, _0223BF18 ; =0x00000236 - add r1, r1, #2 - strh r6, [r2, r5] - ldrb r6, [r3, #8] - add r5, r4, r0 - add r0, r0, #1 - strb r6, [r5, r7] - add r2, r2, #2 - add r3, r3, #1 - cmp r0, #4 - blt _0223BED4 -_0223BEEC: - ldr r0, [sp] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp] - strh r1, [r0] - b _0223BF08 -_0223BEF8: - mov r1, #0xce - lsl r1, r1, #2 - add r1, r4, r1 - bl ov17_02245F44 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223BF08: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BF10: .word 0x00000127 -_0223BF14: .word 0x0000023E -_0223BF18: .word 0x00000236 - thumb_func_end ov17_0223BE58 - - thumb_func_start ov17_0223BF1C -ov17_0223BF1C: ; 0x0223BF1C - push {r3, r4, r5, r6, r7, lr} - ldr r2, _0223BF9C ; =0x00000235 - add r4, r0, #0 - ldrb r0, [r4, r2] - add r1, r4, r0 - sub r0, r2, #4 - ldrb r0, [r1, r0] - add r1, r2, #0 - add r1, #0xf3 - strb r0, [r4, r1] - str r0, [sp] - add r0, r2, #0 - ldrb r1, [r4, r2] - add r0, #0xf4 - strb r1, [r4, r0] - ldr r0, [sp] - add r1, r4, r0 - add r0, r2, #0 - add r0, #9 - ldrb r3, [r1, r0] - add r0, r2, #0 - add r0, #0xf5 - strb r3, [r4, r0] - add r3, r2, #0 - mov r0, #0 - add r3, #0xf6 - strb r0, [r4, r3] - ldrb r2, [r4, r2] - cmp r2, #0 - ble _0223BF7C - ldr r7, _0223BFA0 ; =0x0000023E - mov r5, #1 - add r3, r7, #0 -_0223BF5E: - ldr r2, _0223BFA4 ; =0x00000231 - add r6, r4, r0 - ldrb r2, [r6, r2] - add r2, r4, r2 - ldrb r6, [r2, r7] - ldrb r2, [r1, r3] - cmp r6, r2 - bne _0223BF72 - ldr r2, _0223BFA8 ; =0x0000032B - strb r5, [r4, r2] -_0223BF72: - ldr r2, _0223BF9C ; =0x00000235 - add r0, r0, #1 - ldrb r2, [r4, r2] - cmp r0, r2 - blt _0223BF5E -_0223BF7C: - mov r1, #1 - lsl r1, r1, #0xa - ldr r2, [sp] - add r0, r4, #0 - add r1, r4, r1 - bl ov17_02243120 - ldr r1, _0223BFAC ; =0x00000406 - ldr r2, [sp] - add r0, r4, #0 - add r1, r4, r1 - bl ov17_02243120 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BF9C: .word 0x00000235 -_0223BFA0: .word 0x0000023E -_0223BFA4: .word 0x00000231 -_0223BFA8: .word 0x0000032B -_0223BFAC: .word 0x00000406 - thumb_func_end ov17_0223BF1C - - thumb_func_start ov17_0223BFB0 -ov17_0223BFB0: ; 0x0223BFB0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223BFDC - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #4 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223BFFC - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223BFFC -_0223BFDC: - ldr r4, _0223C000 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223BFFC - mov r0, #1 - pop {r3, r4, r5, pc} -_0223BFFC: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C000: .word 0x00000127 - thumb_func_end ov17_0223BFB0 - - thumb_func_start ov17_0223C004 -ov17_0223C004: ; 0x0223C004 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrh r0, [r5] - cmp r0, #0 - bne _0223C034 - ldr r3, _0223C060 ; =0x0000040C - mov r0, #0 - strb r0, [r4, r3] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r3, #0xe4 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #6 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C05A - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223C05A -_0223C034: - ldr r5, _0223C064 ; =0x00000127 - ldr r3, [r4, #0] - sub r2, r5, #4 - ldrb r1, [r3, r5] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - add r0, r4, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C05A - ldr r0, _0223C060 ; =0x0000040C - mov r1, #0 - strb r1, [r4, r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_0223C05A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223C060: .word 0x0000040C -_0223C064: .word 0x00000127 - thumb_func_end ov17_0223C004 - - thumb_func_start ov17_0223C068 -ov17_0223C068: ; 0x0223C068 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrh r0, [r5] - cmp r0, #0 - beq _0223C07A - cmp r0, #1 - beq _0223C0AA - b _0223C0CA -_0223C07A: - ldr r0, _0223C0F8 ; =0x0000040C - mov r1, #4 - strb r1, [r4, r0] - add r1, r0, #0 - sub r1, #0xe1 - ldrb r1, [r4, r1] - cmp r1, #1 - bne _0223C08E - mov r1, #5 - b _0223C090 -_0223C08E: - mov r1, #0 -_0223C090: - mov r2, #0xce - add r0, r0, #1 - strb r1, [r4, r0] - lsl r2, r2, #2 - add r1, r4, r2 - sub r2, #0x10 - ldrb r2, [r4, r2] - add r0, r4, #0 - bl ov17_022460DC - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] -_0223C0AA: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #7 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C0F4 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223C0F4 -_0223C0CA: - ldr r5, _0223C0FC ; =0x00000127 - ldr r3, [r4, #0] - sub r2, r5, #4 - ldrb r1, [r3, r5] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - add r0, r4, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C0F4 - ldr r0, _0223C0F8 ; =0x0000040C - mov r1, #0 - strb r1, [r4, r0] - add r0, r0, #1 - strb r1, [r4, r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_0223C0F4: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C0F8: .word 0x0000040C -_0223C0FC: .word 0x00000127 - thumb_func_end ov17_0223C068 - - thumb_func_start ov17_0223C100 -ov17_0223C100: ; 0x0223C100 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r1, [r4] - add r5, r0, #0 - cmp r1, #0xc - bls _0223C10E - b _0223C2BE -_0223C10E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223C11A: ; jump table - .short _0223C134 - _0223C11A - 2 ; case 0 - .short _0223C14A - _0223C11A - 2 ; case 1 - .short _0223C15E - _0223C11A - 2 ; case 2 - .short _0223C17E - _0223C11A - 2 ; case 3 - .short _0223C1A4 - _0223C11A - 2 ; case 4 - .short _0223C1BE - _0223C11A - 2 ; case 5 - .short _0223C1DE - _0223C11A - 2 ; case 6 - .short _0223C202 - _0223C11A - 2 ; case 7 - .short _0223C21C - _0223C11A - 2 ; case 8 - .short _0223C23C - _0223C11A - 2 ; case 9 - .short _0223C260 - _0223C11A - 2 ; case 10 - .short _0223C27A - _0223C11A - 2 ; case 11 - .short _0223C29A - _0223C11A - 2 ; case 12 -_0223C134: - mov r2, #0xce - lsl r2, r2, #2 - add r1, r5, r2 - sub r2, #0x10 - ldrb r2, [r5, r2] - bl ov17_02245FB4 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C14A: - mov r2, #0xce - lsl r2, r2, #2 - add r1, r5, r2 - sub r2, #0x10 - ldrb r2, [r5, r2] - bl ov17_02246138 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223C15E: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0xa - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C19A - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C17E: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223C2D8 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - beq _0223C19C -_0223C19A: - b _0223C2D2 -_0223C19C: - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C1A4: - mov r3, #0xce - lsl r3, r3, #2 - add r2, r3, #0 - add r1, r5, r3 - sub r2, #0x10 - sub r3, #0xf - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_02246160 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223C1BE: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0xb - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C2D2 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C1DE: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223C2D8 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C2D2 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C202: - mov r3, #0xce - lsl r3, r3, #2 - add r2, r3, #0 - add r1, r5, r3 - sub r2, #0x10 - sub r3, #0xf - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_02246228 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223C21C: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0xc - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C2D2 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C23C: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223C2D8 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C2D2 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C260: - mov r3, #0xce - lsl r3, r3, #2 - add r2, r3, #0 - sub r2, #0x10 - ldrb r2, [r5, r2] - add r1, r5, r3 - add r3, #0xc8 - add r3, r5, r3 - bl ov17_022463C4 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223C27A: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0xd - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C2D2 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C29A: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223C2D8 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C2D2 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C2D2 -_0223C2BE: - mov r2, #0xce - lsl r2, r2, #2 - add r1, r5, r2 - sub r2, #0x10 - ldrb r2, [r5, r2] - add r0, r5, #0 - bl ov17_02246018 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223C2D2: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223C2D8: .word 0x00000127 - thumb_func_end ov17_0223C100 - - thumb_func_start ov17_0223C2DC -ov17_0223C2DC: ; 0x0223C2DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223C308 - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #5 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C328 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C328 -_0223C308: - ldr r4, _0223C32C ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C328 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223C328: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C32C: .word 0x00000127 - thumb_func_end ov17_0223C2DC - - thumb_func_start ov17_0223C330 -ov17_0223C330: ; 0x0223C330 - ldr r2, _0223C34C ; =0x00000235 - ldrb r3, [r0, r2] - add r3, r3, #1 - strb r3, [r0, r2] - ldrb r0, [r0, r2] - cmp r0, #4 - blo _0223C342 - mov r0, #1 - bx lr -_0223C342: - mov r0, #5 - strh r0, [r1, #2] - mov r0, #2 - bx lr - nop -_0223C34C: .word 0x00000235 - thumb_func_end ov17_0223C330 - - thumb_func_start ov17_0223C350 -ov17_0223C350: ; 0x0223C350 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r7, r1, #0 - ldrh r1, [r7] - str r0, [sp] - cmp r1, #0x18 - bls _0223C360 - b _0223C804 -_0223C360: - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223C36C: ; jump table - .short _0223C39E - _0223C36C - 2 ; case 0 - .short _0223C3A4 - _0223C36C - 2 ; case 1 - .short _0223C3C2 - _0223C36C - 2 ; case 2 - .short _0223C3F0 - _0223C36C - 2 ; case 3 - .short _0223C414 - _0223C36C - 2 ; case 4 - .short _0223C43C - _0223C36C - 2 ; case 5 - .short _0223C458 - _0223C36C - 2 ; case 6 - .short _0223C480 - _0223C36C - 2 ; case 7 - .short _0223C5D6 - _0223C36C - 2 ; case 8 - .short _0223C5DE - _0223C36C - 2 ; case 9 - .short _0223C604 - _0223C36C - 2 ; case 10 - .short _0223C636 - _0223C36C - 2 ; case 11 - .short _0223C64E - _0223C36C - 2 ; case 12 - .short _0223C65A - _0223C36C - 2 ; case 13 - .short _0223C678 - _0223C36C - 2 ; case 14 - .short _0223C6A6 - _0223C36C - 2 ; case 15 - .short _0223C6E8 - _0223C36C - 2 ; case 16 - .short _0223C71C - _0223C36C - 2 ; case 17 - .short _0223C734 - _0223C36C - 2 ; case 18 - .short _0223C740 - _0223C36C - 2 ; case 19 - .short _0223C752 - _0223C36C - 2 ; case 20 - .short _0223C770 - _0223C36C - 2 ; case 21 - .short _0223C79E - _0223C36C - 2 ; case 22 - .short _0223C7C2 - _0223C36C - 2 ; case 23 - .short _0223C7E8 - _0223C36C - 2 ; case 24 -_0223C39E: - add r0, r1, #1 - strh r0, [r7] - b _0223C80A -_0223C3A4: - ldr r1, [r7, #4] - ldr r0, [sp] - ldr r2, _0223C6CC ; =0x00000231 - add r0, r0, r1 - ldrb r3, [r0, r2] - add r1, r2, #0 - ldr r0, [sp] - add r1, #0xf7 - strb r3, [r0, r1] - ldr r1, [r7, #4] - add r2, #0xf8 - strb r1, [r0, r2] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] -_0223C3C2: - mov r3, #0xce - ldr r0, [sp] - lsl r3, r3, #2 - add r4, r3, #0 - add r1, r0, #0 - add r1, r1, r3 - sub r4, #0x10 - add r2, r0, #0 - ldrb r2, [r2, r4] - sub r3, #0xf - add r4, r0, #0 - ldrb r3, [r4, r3] - bl ov17_022462A4 - cmp r0, #1 - bne _0223C3EA - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C3EA: - mov r0, #5 - strh r0, [r7] - b _0223C80A -_0223C3F0: - mov r1, #0xc3 - ldr r0, [sp] - lsl r1, r1, #4 - add r0, r0, r1 - ldr r1, [sp] - mov r4, #0xca - lsl r4, r4, #2 - add r3, r1, #0 - mov r2, #0xe - add r3, r3, r4 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C432 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C414: - ldr r0, [sp] - mov r1, #0xc3 - ldr r4, _0223C6D0 ; =0x00000127 - ldr r3, [r0, #0] - lsl r1, r1, #4 - add r0, r0, r1 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - beq _0223C434 -_0223C432: - b _0223C80A -_0223C434: - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C43C: - ldr r0, [r7, #4] - add r0, r0, #1 - str r0, [r7, #4] - cmp r0, #4 - blt _0223C452 - mov r0, #0 - str r0, [r7, #4] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C452: - mov r0, #1 - strh r0, [r7] - b _0223C80A -_0223C458: - mov r6, #0xce - lsl r6, r6, #2 - add r5, r6, #0 - mov r4, #0 - add r5, #0xc8 -_0223C462: - ldr r0, [sp] - add r2, r4, #0 - add r1, r0, #0 - add r3, r0, #0 - add r1, r1, r6 - add r3, r3, r5 - bl ov17_02246518 - add r4, r4, #1 - cmp r4, #4 - blt _0223C462 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C480: - mov r5, #0 - add r2, sp, #0x40 - add r3, sp, #0x34 - add r6, sp, #4 - mov r0, #4 -_0223C48A: - mov r1, #0 - str r1, [r2, #0] - str r5, [r3, #0] - add r4, r6, #0 -_0223C492: - add r1, r1, #1 - stmia r4!, {r0} - cmp r1, #4 - blt _0223C492 - add r5, r5, #1 - add r2, r2, #4 - add r3, r3, #4 - add r6, #0x10 - cmp r5, #3 - blt _0223C48A - mov r3, #0 - add r6, sp, #0x40 -_0223C4AA: - ldr r0, [sp] - add r1, r0, r3 - ldr r0, _0223C6CC ; =0x00000231 - ldrb r1, [r1, r0] - ldr r0, [sp] - add r2, r0, r1 - ldr r0, _0223C6D4 ; =0x0000023E - ldrb r0, [r2, r0] - lsl r0, r0, #2 - ldr r4, [r6, r0] - add r4, r4, #1 - str r4, [r6, r0] - ldr r0, _0223C6D4 ; =0x0000023E - mov r4, #0 - ldrb r0, [r2, r0] - lsl r2, r0, #4 - add r0, sp, #4 - add r5, r0, r2 - add r2, r5, #0 -_0223C4D0: - ldr r0, [r2, #0] - cmp r0, #4 - bne _0223C4DC - lsl r0, r4, #2 - str r1, [r5, r0] - b _0223C4E4 -_0223C4DC: - add r4, r4, #1 - add r2, r2, #4 - cmp r4, #4 - blt _0223C4D0 -_0223C4E4: - add r3, r3, #1 - cmp r3, #4 - blt _0223C4AA - mov r6, #0 -_0223C4EC: - mov r2, #2 - cmp r6, #2 - bge _0223C518 - add r0, sp, #0x48 - add r1, sp, #0x3c -_0223C4F6: - sub r3, r0, #4 - ldr r5, [r0, #0] - ldr r4, [r3, #0] - cmp r4, r5 - bge _0223C50E - str r4, [r0, #0] - str r5, [r3, #0] - sub r3, r1, #4 - ldr r5, [r1, #0] - ldr r4, [r3, #0] - str r4, [r1, #0] - str r5, [r3, #0] -_0223C50E: - sub r2, r2, #1 - sub r0, r0, #4 - sub r1, r1, #4 - cmp r2, r6 - bgt _0223C4F6 -_0223C518: - add r6, r6, #1 - cmp r6, #2 - blt _0223C4EC - ldr r0, [r7, #4] - mov r2, #0x41 - lsl r0, r0, #2 - add r1, sp, #0x34 - ldr r3, [r1, r0] - ldr r0, [sp] - lsl r2, r2, #4 - strb r3, [r0, r2] - mov r3, #0 - ldr r6, _0223C6D8 ; =0x00000411 - add r2, r3, #0 - add r5, sp, #4 -_0223C536: - ldr r0, [r7, #4] - ldr r4, [sp] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r4, r4, r3 - lsl r0, r0, #4 - add r0, r5, r0 - ldr r0, [r2, r0] - add r3, r3, #1 - add r2, r2, #4 - strb r0, [r4, r6] - cmp r3, #4 - blt _0223C536 - ldr r0, [r7, #4] - lsl r1, r0, #2 - add r0, sp, #0x40 - ldr r0, [r0, r1] - cmp r0, #4 - bhi _0223C59A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223C568: ; jump table - .short _0223C59A - _0223C568 - 2 ; case 0 - .short _0223C572 - _0223C568 - 2 ; case 1 - .short _0223C57C - _0223C568 - 2 ; case 2 - .short _0223C586 - _0223C568 - 2 ; case 3 - .short _0223C590 - _0223C568 - 2 ; case 4 -_0223C572: - ldr r1, _0223C6DC ; =0x0000040C - ldr r0, [sp] - mov r2, #0xa - strb r2, [r0, r1] - b _0223C5A4 -_0223C57C: - ldr r1, _0223C6DC ; =0x0000040C - ldr r0, [sp] - mov r2, #7 - strb r2, [r0, r1] - b _0223C5A4 -_0223C586: - ldr r1, _0223C6DC ; =0x0000040C - ldr r0, [sp] - mov r2, #8 - strb r2, [r0, r1] - b _0223C5A4 -_0223C590: - ldr r1, _0223C6DC ; =0x0000040C - ldr r0, [sp] - mov r2, #9 - strb r2, [r0, r1] - b _0223C5A4 -_0223C59A: - mov r0, #0xc - strh r0, [r7] - add sp, #0x4c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223C5A4: - ldr r2, _0223C6E0 ; =0x0000040D - ldr r0, [sp] - mov r1, #0 - add r3, r2, #0 - strb r1, [r0, r2] - sub r3, #0xd - add r1, r0, #0 - add r1, r1, r3 - sub r2, #0xe5 - add r3, r0, #0 - ldrb r2, [r3, r2] - bl ov17_02243120 - ldr r0, [sp] - ldr r3, _0223C6E4 ; =0x00000406 - add r1, r0, #0 - add r1, r1, r3 - sub r3, #0xde - add r2, r0, #0 - ldrb r2, [r2, r3] - bl ov17_02243120 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] -_0223C5D6: - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C5DE: - mov r1, #0xc3 - ldr r0, [sp] - lsl r1, r1, #4 - add r0, r0, r1 - ldr r1, [sp] - mov r4, #0xca - lsl r4, r4, #2 - add r3, r1, #0 - mov r2, #0x10 - add r3, r3, r4 - bl ov17_0224F30C - cmp r0, #1 - beq _0223C5FC - b _0223C80A -_0223C5FC: - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C604: - ldr r0, [sp] - mov r1, #0xc3 - ldr r4, _0223C6D0 ; =0x00000127 - ldr r3, [r0, #0] - lsl r1, r1, #4 - add r0, r0, r1 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C706 - ldr r1, _0223C6DC ; =0x0000040C - ldr r0, [sp] - mov r2, #0 - strb r2, [r0, r1] - add r1, r1, #1 - strb r2, [r0, r1] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C636: - ldr r0, [r7, #4] - add r0, r0, #1 - str r0, [r7, #4] - cmp r0, #3 - bge _0223C646 - mov r0, #7 - strh r0, [r7] - b _0223C80A -_0223C646: - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C64E: - mov r0, #0 - str r0, [r7, #4] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C65A: - ldr r1, [r7, #4] - ldr r0, [sp] - ldr r2, _0223C6CC ; =0x00000231 - add r0, r0, r1 - ldrb r3, [r0, r2] - add r1, r2, #0 - ldr r0, [sp] - add r1, #0xf7 - strb r3, [r0, r1] - ldr r1, [r7, #4] - add r2, #0xf8 - strb r1, [r0, r2] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] -_0223C678: - mov r3, #0xce - ldr r0, [sp] - lsl r3, r3, #2 - add r4, r3, #0 - add r1, r0, #0 - add r1, r1, r3 - sub r4, #0x10 - add r2, r0, #0 - ldrb r2, [r2, r4] - sub r3, #0xf - add r4, r0, #0 - ldrb r3, [r4, r3] - bl ov17_02246304 - cmp r0, #0 - bne _0223C69E - mov r0, #0x11 - strh r0, [r7] - b _0223C80A -_0223C69E: - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C6A6: - mov r1, #0xc3 - ldr r0, [sp] - lsl r1, r1, #4 - add r0, r0, r1 - ldr r1, [sp] - mov r4, #0xca - lsl r4, r4, #2 - add r3, r1, #0 - mov r2, #0x11 - add r3, r3, r4 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C706 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A - nop -_0223C6CC: .word 0x00000231 -_0223C6D0: .word 0x00000127 -_0223C6D4: .word 0x0000023E -_0223C6D8: .word 0x00000411 -_0223C6DC: .word 0x0000040C -_0223C6E0: .word 0x0000040D -_0223C6E4: .word 0x00000406 -_0223C6E8: - ldr r0, [sp] - mov r1, #0xc3 - ldr r4, _0223C810 ; =0x00000127 - ldr r3, [r0, #0] - lsl r1, r1, #4 - add r0, r0, r1 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - beq _0223C708 -_0223C706: - b _0223C80A -_0223C708: - ldr r1, _0223C814 ; =0x0000040C - ldr r0, [sp] - mov r2, #0 - strb r2, [r0, r1] - add r1, r1, #1 - strb r2, [r0, r1] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C71C: - ldr r0, [r7, #4] - add r0, r0, #1 - str r0, [r7, #4] - cmp r0, #4 - bge _0223C72C - mov r0, #0xd - strh r0, [r7] - b _0223C80A -_0223C72C: - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C734: - mov r0, #0 - str r0, [r7, #4] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C740: - mov r1, #0xce - ldr r0, [sp] - lsl r1, r1, #2 - add r0, r0, r1 - bl ov17_022460C8 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] -_0223C752: - ldr r1, [r7, #4] - ldr r0, [sp] - ldr r2, _0223C818 ; =0x00000231 - add r0, r0, r1 - ldrb r3, [r0, r2] - add r1, r2, #0 - ldr r0, [sp] - add r1, #0xf7 - strb r3, [r0, r1] - ldr r1, [r7, #4] - add r2, #0xf8 - strb r1, [r0, r2] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] -_0223C770: - mov r3, #0xce - ldr r0, [sp] - lsl r3, r3, #2 - add r4, r3, #0 - add r1, r0, #0 - add r1, r1, r3 - sub r4, #0x10 - add r2, r0, #0 - ldrb r2, [r2, r4] - sub r3, #0xf - add r4, r0, #0 - ldrb r3, [r4, r3] - bl ov17_02246364 - cmp r0, #1 - bne _0223C798 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C798: - mov r0, #0x18 - strh r0, [r7] - b _0223C80A -_0223C79E: - mov r1, #0xc3 - ldr r0, [sp] - lsl r1, r1, #4 - add r0, r0, r1 - ldr r1, [sp] - mov r4, #0xca - lsl r4, r4, #2 - add r3, r1, #0 - mov r2, #0xf - add r3, r3, r4 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C80A - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C7C2: - ldr r0, [sp] - mov r1, #0xc3 - ldr r4, _0223C810 ; =0x00000127 - ldr r3, [r0, #0] - lsl r1, r1, #4 - add r0, r0, r1 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C80A - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C7E8: - ldr r0, [r7, #4] - add r0, r0, #1 - str r0, [r7, #4] - cmp r0, #4 - blt _0223C7FE - mov r0, #0 - str r0, [r7, #4] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0223C80A -_0223C7FE: - mov r0, #0x14 - strh r0, [r7] - b _0223C80A -_0223C804: - add sp, #0x4c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223C80A: - mov r0, #0 - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223C810: .word 0x00000127 -_0223C814: .word 0x0000040C -_0223C818: .word 0x00000231 - thumb_func_end ov17_0223C350 - - thumb_func_start ov17_0223C81C -ov17_0223C81C: ; 0x0223C81C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223C832 - cmp r0, #1 - beq _0223C838 - cmp r0, #2 - beq _0223C858 - b _0223C87C -_0223C832: - add r0, r0, #1 - strh r0, [r4] - b _0223C880 -_0223C838: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0x12 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C880 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C880 -_0223C858: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223C884 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223C880 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223C880 -_0223C87C: - mov r0, #1 - pop {r3, r4, r5, pc} -_0223C880: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C884: .word 0x00000127 - thumb_func_end ov17_0223C81C - - thumb_func_start ov17_0223C888 -ov17_0223C888: ; 0x0223C888 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldrh r1, [r5] - add r4, r0, #0 - cmp r1, #6 - bls _0223C896 - b _0223C9FA -_0223C896: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223C8A2: ; jump table - .short _0223C8B0 - _0223C8A2 - 2 ; case 0 - .short _0223C8D0 - _0223C8A2 - 2 ; case 1 - .short _0223C8F6 - _0223C8A2 - 2 ; case 2 - .short _0223C956 - _0223C8A2 - 2 ; case 3 - .short _0223C97A - _0223C8A2 - 2 ; case 4 - .short _0223C9B6 - _0223C8A2 - 2 ; case 5 - .short _0223C9D6 - _0223C8A2 - 2 ; case 6 -_0223C8B0: - mov r0, #0xc3 - mov r3, #0xca - lsl r0, r0, #4 - lsl r3, r3, #2 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #0x15 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223C8EC - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C8D0: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223CA20 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - beq _0223C8EE -_0223C8EC: - b _0223CA1A -_0223C8EE: - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C8F6: - mov r2, #0x36 - mov r1, #0 - lsl r2, r2, #4 - add r0, r1, #0 - add r2, r4, r2 -_0223C900: - ldr r3, [r2, #0] - lsl r3, r3, #0x1a - lsr r3, r3, #0x1e - beq _0223C90A - add r1, r1, #1 -_0223C90A: - add r0, r0, #1 - add r2, #0x2c - cmp r0, #4 - blt _0223C900 - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r0, [r4, r0] - cmp r0, #3 - bhs _0223C928 - cmp r1, #4 - bge _0223C928 - ldr r0, _0223CA24 ; =0x0000040C - mov r1, #0x2a - strb r1, [r4, r0] - b _0223C92E -_0223C928: - ldr r0, _0223CA24 ; =0x0000040C - mov r1, #0 - strb r1, [r4, r0] -_0223C92E: - ldr r3, _0223CA28 ; =0x0000040E - mov r1, #0 - strb r1, [r4, r3] - add r0, r3, #1 - strb r1, [r4, r0] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r3, #0xe6 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #0x14 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223CA1A - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C956: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223CA20 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223CA1A - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C97A: - mov r1, #0xce - lsl r1, r1, #2 - add r1, r4, r1 - bl ov17_02246044 - mov r0, #0x23 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov17_02243B0C - ldr r0, _0223CA2C ; =0x00000236 - mov r6, #0 - add r1, r0, #0 - add r3, r4, #0 - add r1, #0x20 -_0223C998: - ldrh r2, [r3, r0] - add r6, r6, #1 - strh r2, [r3, r1] - add r3, r3, #2 - cmp r6, #4 - blt _0223C998 - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C9B6: - mov r0, #0xc3 - mov r3, #0x23 - lsl r0, r0, #4 - lsl r3, r3, #4 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #0x13 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223CA1A - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C9D6: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223CA20 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223CA1A - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223CA1A -_0223C9FA: - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r1, [r4, r0] - cmp r1, #4 - blo _0223CA0C - mov r0, #0xf - strh r0, [r5, #2] - mov r0, #2 - pop {r4, r5, r6, pc} -_0223CA0C: - mov r1, #0 - add r0, r0, #5 - strb r1, [r4, r0] - mov r0, #3 - strh r0, [r5, #2] - mov r0, #2 - pop {r4, r5, r6, pc} -_0223CA1A: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_0223CA20: .word 0x00000127 -_0223CA24: .word 0x0000040C -_0223CA28: .word 0x0000040E -_0223CA2C: .word 0x00000236 - thumb_func_end ov17_0223C888 - - thumb_func_start ov17_0223CA30 -ov17_0223CA30: ; 0x0223CA30 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #3 - bhi _0223CADC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223CA48: ; jump table - .short _0223CA50 - _0223CA48 - 2 ; case 0 - .short _0223CA72 - _0223CA48 - 2 ; case 1 - .short _0223CA9C - _0223CA48 - 2 ; case 2 - .short _0223CAC0 - _0223CA48 - 2 ; case 3 -_0223CA50: - mov r1, #0 - ldr r7, _0223CB0C ; =0x0000012E - add r2, r3, #0 - add r5, r1, #0 -_0223CA58: - ldr r0, _0223CB10 ; =0x00000242 - ldr r6, [r3, #0] - ldrsh r0, [r2, r0] - add r6, r6, r5 - add r1, r1, #1 - strh r0, [r6, r7] - add r2, r2, #2 - add r5, #0xc - cmp r1, #4 - blt _0223CA58 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223CA72: - ldr r5, _0223CB14 ; =0x0000040C - mov r0, #0x2b - strb r0, [r3, r5] - add r0, r5, #1 - mov r1, #0 - strb r1, [r3, r0] - mov r0, #0xc3 - lsl r0, r0, #4 - sub r5, #0xe4 - add r0, r3, r0 - add r1, r3, #0 - mov r2, #3 - add r3, r3, r5 - bl ov17_0224F30C - cmp r0, #1 - bne _0223CB06 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223CB06 -_0223CA9C: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r5, [r3, #0] - add r0, r3, r0 - ldr r3, _0223CB18 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r5, r3] - sub r3, #0xb - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223CB06 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223CB06 -_0223CAC0: - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r3, r0 - add r1, r3, #0 - mov r2, #1 - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223CB06 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223CB06 -_0223CADC: - mov r0, #0xc3 - lsl r0, r0, #4 - ldr r4, [r3, #0] - add r0, r3, r0 - ldr r3, _0223CB18 ; =0x00000127 - add r1, r3, #0 - add r1, #0x50 - ldrb r2, [r4, r3] - ldrb r1, [r4, r1] - sub r1, r2, r1 - sub r2, r3, #4 - sub r3, #0xb - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - sub r1, r1, #1 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223CB06 - mov r0, #3 - pop {r3, r4, r5, r6, r7, pc} -_0223CB06: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CB0C: .word 0x0000012E -_0223CB10: .word 0x00000242 -_0223CB14: .word 0x0000040C -_0223CB18: .word 0x00000127 - thumb_func_end ov17_0223CA30 - - thumb_func_start ov17_0223CB1C -ov17_0223CB1C: ; 0x0223CB1C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r1, #1 - lsl r1, r1, #0x1a - ldr r0, [r1, #0] - ldr r2, _0223CD9C ; =0xFFFFE0FF - and r0, r2 - str r0, [r1, #0] - ldr r0, _0223CDA0 ; =0x04001000 - ldr r3, [r0, #0] - and r2, r3 - str r2, [r0, #0] - ldr r3, [r1, #0] - ldr r2, _0223CDA4 ; =0xFFFF1FFF - and r3, r2 - str r3, [r1, #0] - ldr r3, [r0, #0] - add r1, #0x50 - and r2, r3 - str r2, [r0, #0] - mov r2, #0 - strh r2, [r1] - add r0, #0x50 - strh r2, [r0] - mov r2, #7 - mov r0, #3 - mov r1, #0x16 - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, _0223CDA8 ; =0x00000F68 - add r0, r4, #0 - mov r2, #0x16 - bl sub_0200681C - ldr r2, _0223CDA8 ; =0x00000F68 - mov r1, #0 - add r5, r0, #0 - bl sub_020C4CF4 - mov r0, #0x16 - bl ov17_0223F140 - str r0, [r5, #8] - add r0, r4, #0 - bl sub_02006840 - mov r1, #0x5b - str r0, [r5, #0] - lsl r1, r1, #2 - str r5, [r0, r1] - ldr r2, [r5, #0] - mov r3, #0 - add r0, r1, #4 - strb r3, [r2, r0] - ldr r0, [r5, #0] - str r0, [r5, #0xc] - add r0, r5, #0 - bl ov17_0223D390 - mov r0, #0x16 - bl sub_02002F38 - str r0, [r5, #0x50] - mov r1, #1 - bl sub_02003858 - mov r2, #2 - ldr r0, [r5, #0x50] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #0x16 - bl sub_02002F70 - mov r1, #1 - ldr r0, [r5, #0x50] - lsl r2, r1, #9 - mov r3, #0x16 - bl sub_02002F70 - mov r2, #7 - ldr r0, [r5, #0x50] - mov r1, #2 - lsl r2, r2, #6 - mov r3, #0x16 - bl sub_02002F70 - mov r2, #2 - ldr r0, [r5, #0x50] - mov r1, #3 - lsl r2, r2, #8 - mov r3, #0x16 - bl sub_02002F70 - mov r0, #0x16 - bl sub_02018340 - str r0, [r5, #0x30] - mov r0, #0x40 - mov r1, #0x16 - bl sub_0201DBEC - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - ldr r0, [r5, #0x30] - bl ov17_0223D1B8 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r0, #2 - mov r1, #0x16 - bl sub_02002BB8 - mov r0, #0x16 - bl sub_0200C6E4 - ldr r1, _0223CDAC ; =0x02252EFC - ldr r2, _0223CDB0 ; =0x02252EB4 - mov r3, #0x20 - str r0, [r5, #0x28] - bl sub_0200C73C - ldr r1, _0223CDB4 ; =0x00100010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - ldr r0, [r5, #0x28] - bl sub_0200C704 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r2, #0x80 - bl sub_0200C7C0 - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - ldr r2, _0223CDB8 ; =0x02252EC8 - bl sub_0200CB30 - ldr r0, [r5, #0x28] - bl sub_0200C738 - mov r2, #1 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - mov r0, #0x16 - bl sub_0200762C - str r0, [r5, #0x10] - bl ov17_0223D350 - mov r0, #0 - mov r1, #0x1a - mov r2, #0xd1 - mov r3, #0x16 - bl sub_0200B144 - str r0, [r5, #0x44] - mov r0, #0x16 - bl sub_0200B358 - str r0, [r5, #0x48] - mov r0, #5 - lsl r0, r0, #6 - mov r1, #0x16 - bl sub_02023790 - str r0, [r5, #0x4c] - mov r0, #0x2d - mov r1, #0x16 - bl sub_02006C24 - add r4, r0, #0 - mov r0, #0x2e - mov r1, #0x16 - bl sub_02006C24 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0223D4A8 - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0223D5B0 - add r0, r5, #0 - bl ov17_0223D324 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_0223D3B8 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_0223D468 - add r0, r4, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - mov r0, #1 - str r0, [sp] - add r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r0, [r5, #0x50] - ldr r3, _0223CDBC ; =0x00007FFF - add r2, r1, #0 - bl sub_020038B0 - mov r1, #1 - add r0, r1, #0 - str r1, [sp] - add r0, #0xff - str r0, [sp, #4] - ldr r0, [r5, #0x50] - ldr r3, _0223CDBC ; =0x00007FFF - mov r2, #0 - bl sub_020038B0 - mov r2, #0 - str r2, [sp] - mov r0, #0xe0 - str r0, [sp, #4] - ldr r0, [r5, #0x50] - ldr r3, _0223CDBC ; =0x00007FFF - mov r1, #2 - bl sub_020038B0 - mov r2, #0 - mov r0, #1 - str r2, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - ldr r0, [r5, #0x50] - ldr r3, _0223CDBC ; =0x00007FFF - mov r1, #3 - bl sub_020038B0 - bl sub_02039734 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0x16 - str r1, [sp, #8] - mov r1, #0x1b - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, _0223CDC0 ; =ov17_0223D164 - ldr r2, _0223CDC4 ; =0x0000EA60 - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - ldr r0, _0223CDC8 ; =0x000004F8 - mov r1, #1 - strb r1, [r5, r0] - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0 - bl sub_02004234 - ldr r1, _0223CDCC ; =0x0000046F - mov r0, #6 - mov r2, #1 - bl sub_02004550 - ldr r1, [r5, #0] - ldr r0, _0223CDD0 ; =0x00000171 - ldrb r0, [r1, r0] - bl sub_020959F4 - ldr r0, _0223CDD4 ; =ov17_0223D0C8 - add r1, r5, #0 - bl sub_02017798 - ldr r0, _0223CDD8 ; =0x00000605 - bl sub_02005748 - mov r0, #1 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0223CD9C: .word 0xFFFFE0FF -_0223CDA0: .word 0x04001000 -_0223CDA4: .word 0xFFFF1FFF -_0223CDA8: .word 0x00000F68 -_0223CDAC: .word 0x02252EFC -_0223CDB0: .word 0x02252EB4 -_0223CDB4: .word 0x00100010 -_0223CDB8: .word 0x02252EC8 -_0223CDBC: .word 0x00007FFF -_0223CDC0: .word ov17_0223D164 -_0223CDC4: .word 0x0000EA60 -_0223CDC8: .word 0x000004F8 -_0223CDCC: .word 0x0000046F -_0223CDD0: .word 0x00000171 -_0223CDD4: .word ov17_0223D0C8 -_0223CDD8: .word 0x00000605 - thumb_func_end ov17_0223CB1C - - thumb_func_start ov17_0223CDDC -ov17_0223CDDC: ; 0x0223CDDC - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02094E98 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223CE00 - cmp r0, #1 - beq _0223CE76 - cmp r0, #2 - bne _0223CDFE - b _0223CF4A -_0223CDFE: - b _0223CF60 -_0223CE00: - bl sub_0200F2AC - cmp r0, #1 - beq _0223CE0A - b _0223CF60 -_0223CE0A: - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223CF68 ; =0x00007FFF - ldr r2, _0223CF6C ; =0x0000FFFF - str r0, [sp, #8] - ldr r0, [r4, #0x50] - mov r1, #1 - mov r3, #6 - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223CF68 ; =0x00007FFF - ldr r2, _0223CF6C ; =0x0000FFFF - str r0, [sp, #8] - ldr r0, [r4, #0x50] - mov r1, #2 - mov r3, #6 - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - ldr r2, _0223CF68 ; =0x00007FFF - str r0, [sp, #4] - str r2, [sp, #8] - ldr r0, [r4, #0x50] - mov r1, #4 - lsr r2, r2, #1 - mov r3, #6 - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223CF68 ; =0x00007FFF - ldr r2, _0223CF6C ; =0x0000FFFF - str r0, [sp, #8] - ldr r0, [r4, #0x50] - mov r1, #8 - mov r3, #6 - bl sub_02003178 - ldr r0, _0223CF70 ; =0x000006E5 - bl sub_02005748 - mov r0, #1 - str r0, [r5, #0] - b _0223CF60 -_0223CE76: - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #1 - bne _0223CEF0 - ldr r2, _0223CF74 ; =0x000004F6 - ldr r1, _0223CF78 ; =0x00000F14 - ldrh r2, [r4, r2] - add r0, r4, #0 - add r1, r4, r1 - lsl r3, r2, #2 - ldr r2, _0223CF7C ; =0x02252F44 - ldr r2, [r2, r3] - blx r2 - sub r1, r0, #1 - cmp r1, #1 - bhi _0223CEBA - cmp r0, #1 - bne _0223CEA4 - ldr r0, _0223CF74 ; =0x000004F6 - ldrh r1, [r4, r0] - add r1, r1, #1 - b _0223CEAA -_0223CEA4: - ldr r0, _0223CF80 ; =0x00000F16 - ldrh r1, [r4, r0] - ldr r0, _0223CF74 ; =0x000004F6 -_0223CEAA: - strh r1, [r4, r0] - ldr r0, _0223CF78 ; =0x00000F14 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - b _0223CEF0 -_0223CEBA: - cmp r0, #3 - bne _0223CEF0 - ldr r0, _0223CF84 ; =0x00000F1C - ldrb r1, [r4, r0] - cmp r1, #1 - bne _0223CEF0 - mov r1, #2 - sub r0, #8 - str r1, [r5, #0] - add r0, r4, r0 - mov r1, #0 - mov r2, #8 - bl sub_020C4CF4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x16 - str r0, [sp, #8] - mov r0, #2 - mov r1, #0x10 - mov r2, #0x24 - mov r3, #0 - bl sub_0200F174 - b _0223CF60 -_0223CEF0: - ldr r0, _0223CF88 ; =0x000004FC - add r0, r4, r0 - bl ov17_0224F35C - ldr r0, _0223CF88 ; =0x000004FC - add r1, r4, #0 - add r0, r4, r0 - bl ov17_0224F3D8 - ldr r0, _0223CF84 ; =0x00000F1C - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223CF60 - ldr r0, _0223CF88 ; =0x000004FC - add r0, r4, r0 - bl ov17_0224F3D0 - cmp r0, #0 - bne _0223CF60 - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #0 - bne _0223CF60 - mov r0, #2 - str r0, [r5, #0] - ldr r0, _0223CF78 ; =0x00000F14 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x16 - str r0, [sp, #8] - mov r0, #2 - mov r1, #0x10 - mov r2, #0x24 - mov r3, #0 - bl sub_0200F174 - b _0223CF60 -_0223CF4A: - ldr r0, _0223CF84 ; =0x00000F1C - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223CF60 - bl sub_0200F2AC - cmp r0, #1 - bne _0223CF60 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0223CF60: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223CF68: .word 0x00007FFF -_0223CF6C: .word 0x0000FFFF -_0223CF70: .word 0x000006E5 -_0223CF74: .word 0x000004F6 -_0223CF78: .word 0x00000F14 -_0223CF7C: .word 0x02252F44 -_0223CF80: .word 0x00000F16 -_0223CF84: .word 0x00000F1C -_0223CF88: .word 0x000004FC - thumb_func_end ov17_0223CDDC - - thumb_func_start ov17_0223CF8C -ov17_0223CF8C: ; 0x0223CF8C - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - bl sub_0200682C - add r4, r0, #0 - bl sub_020141E4 - add r0, r4, #0 - bl ov17_0223D434 - add r0, r4, #0 - bl ov17_0223D498 - add r0, r4, #0 - bl ov17_0223D5AC - add r0, r4, #0 - bl ov17_0223D608 - add r0, r4, #0 - add r0, #0x34 - bl sub_0201A8FC - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0x30] - mov r1, #3 - bl sub_02019044 - mov r0, #4 - mov r1, #0 - bl sub_02019120 - ldr r0, [r4, #0x30] - mov r1, #4 - bl sub_02019044 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x2c] - bl sub_0200D0B0 - ldr r0, [r4, #0x28] - bl sub_0200C8D4 - bl sub_0201DC3C - mov r7, #0xf2 - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #4 -_0223D00C: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0223D016 - bl ov22_0225B020 -_0223D016: - add r6, r6, #1 - add r5, #0x10 - cmp r6, #4 - blt _0223D00C - add r0, r4, #0 - add r0, #0xc - bl ov17_02247734 - add r0, r4, #0 - bl ov17_02247918 - ldr r0, [r4, #0x10] - bl sub_02007B6C - mov r0, #2 - bl sub_02002C60 - ldr r0, [r4, #0x50] - mov r1, #0 - bl sub_02002FA0 - ldr r0, [r4, #0x50] - mov r1, #1 - bl sub_02002FA0 - ldr r0, [r4, #0x50] - mov r1, #2 - bl sub_02002FA0 - ldr r0, [r4, #0x50] - mov r1, #3 - bl sub_02002FA0 - ldr r0, [r4, #0x50] - bl sub_02002F54 - ldr r0, [r4, #0x48] - bl sub_0200B3F0 - ldr r0, [r4, #0x4c] - bl sub_020237BC - ldr r0, [r4, #0x44] - bl sub_0200B190 - ldr r0, [r4, #0x30] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, [r4, #8] - bl ov17_0223F1E0 - bl sub_0201E530 - ldr r0, [sp] - bl sub_02006830 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - mov r0, #0x16 - bl sub_0201807C - bl sub_02095A24 - bl sub_02039794 - ldr r0, _0223D0BC ; =0x0000000B - bl sub_02006514 - ldr r0, _0223D0C0 ; =0x0000000C - bl sub_02006514 - ldr r0, _0223D0C4 ; =0x00000016 - bl sub_02006514 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D0BC: .word 0x0000000B -_0223D0C0: .word 0x0000000C -_0223D0C4: .word 0x00000016 - thumb_func_end ov17_0223CF8C - - thumb_func_start ov17_0223D0C8 -ov17_0223D0C8: ; 0x0223D0C8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _0223D154 ; =0x00000F63 - sub r1, r0, #2 - ldrb r3, [r6, r1] - sub r1, r0, #3 - ldrb r1, [r6, r1] - sub r5, r0, #1 - ldrb r5, [r6, r5] - lsl r2, r1, #8 - mov r1, #0xff - lsl r1, r1, #8 - and r2, r1 - orr r2, r5 - ldrb r4, [r6, r0] - ldr r5, _0223D158 ; =0x04000040 - strh r2, [r5] - lsl r2, r3, #8 - and r2, r1 - orr r2, r4 - strh r2, [r5, #4] - add r2, r0, #4 - ldrb r4, [r6, r2] - add r2, r0, #2 - ldrb r3, [r6, r2] - add r2, r0, #1 - ldrb r2, [r6, r2] - add r0, r0, #3 - ldrb r0, [r6, r0] - lsl r2, r2, #8 - and r2, r1 - orr r0, r2 - strh r0, [r5, #2] - lsl r0, r3, #8 - and r0, r1 - orr r0, r4 - strh r0, [r5, #6] - ldr r0, [r6, #0x10] - bl sub_02008A94 - mov r7, #0xf2 - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #4 -_0223D120: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0223D12A - bl ov22_0225B06C -_0223D12A: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0223D120 - bl sub_0201DCAC - bl sub_0200C800 - ldr r0, [r6, #0x50] - bl sub_02003694 - ldr r0, [r6, #0x30] - bl sub_0201C2B8 - ldr r3, _0223D15C ; =0x027E0000 - ldr r1, _0223D160 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D154: .word 0x00000F63 -_0223D158: .word 0x04000040 -_0223D15C: .word 0x027E0000 -_0223D160: .word 0x00003FF8 - thumb_func_end ov17_0223D0C8 - - thumb_func_start ov17_0223D164 -ov17_0223D164: ; 0x0223D164 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _0223D1B0 ; =0x000004F8 - add r6, r1, #0 - ldrb r0, [r6, r0] - cmp r0, #1 - bne _0223D1A4 - ldr r0, [r6, #0x10] - bl sub_02007768 - mov r7, #0xf2 - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #4 -_0223D17E: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0223D188 - bl ov22_0225AFF8 -_0223D188: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0223D17E - bl ov11_0221F8F0 - ldr r0, [r6, #0x2c] - bl sub_0200C7EC - bl sub_0200C808 - ldr r0, _0223D1B4 ; =0x04000540 - mov r1, #1 - str r1, [r0, #0] -_0223D1A4: - ldr r1, [r6, #0x30] - mov r0, #0x16 - bl sub_02038A1C - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D1B0: .word 0x000004F8 -_0223D1B4: .word 0x04000540 - thumb_func_end ov17_0223D164 - - thumb_func_start ov17_0223D1B8 -ov17_0223D1B8: ; 0x0223D1B8 - push {r3, r4, r5, lr} - sub sp, #0xa8 - add r4, r0, #0 - bl sub_0201FF00 - ldr r5, _0223D310 ; =0x02252F1C - add r3, sp, #0x2c - mov r2, #5 -_0223D1C8: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223D1C8 - add r0, sp, #0x2c - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - ldr r5, _0223D314 ; =0x02252EA4 - add r3, sp, #0x1c - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223D318 ; =0x02252F70 - add r3, sp, #0x54 - mov r2, #0xa -_0223D228: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223D228 - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - add r2, sp, #0x54 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #1 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - add r2, sp, #0x70 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #3 - add r2, sp, #0x8c - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r1, _0223D31C ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r2, r0 - strh r2, [r1] - add r1, r0, #0 - bl sub_0201FF0C - ldr r5, _0223D320 ; =0x02252EE0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #4 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #4 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add sp, #0xa8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D310: .word 0x02252F1C -_0223D314: .word 0x02252EA4 -_0223D318: .word 0x02252F70 -_0223D31C: .word 0x04000008 -_0223D320: .word 0x02252EE0 - thumb_func_end ov17_0223D1B8 - - thumb_func_start ov17_0223D324 -ov17_0223D324: ; 0x0223D324 - push {lr} - sub sp, #0x14 - add r1, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r1, #0x30] - add r1, #0x34 - mov r2, #1 - mov r3, #2 - bl sub_0201A7E8 - add sp, #0x14 - pop {pc} - ; .align 2, 0 - thumb_func_end ov17_0223D324 - - thumb_func_start ov17_0223D350 -ov17_0223D350: ; 0x0223D350 - push {r3, r4, r5, lr} - ldr r3, _0223D388 ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _0223D38C ; =0x02100DF4 - mov r1, #0 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - add r2, r1, #0 - blx r3 - add r5, r0, #0 - cmp r4, #0 - bne _0223D378 - bl sub_02022974 -_0223D378: - cmp r5, #0 - bne _0223D380 - bl sub_02022974 -_0223D380: - bl sub_02014000 - pop {r3, r4, r5, pc} - nop -_0223D388: .word 0x02100DEC -_0223D38C: .word 0x02100DF4 - thumb_func_end ov17_0223D350 - - thumb_func_start ov17_0223D390 -ov17_0223D390: ; 0x0223D390 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0223D39E - bl sub_02022974 -_0223D39E: - mov r3, #0 - mov r0, #3 -_0223D3A2: - add r1, r4, r3 - sub r2, r0, r3 - add r1, #0xd4 - add r3, r3, #1 - strb r2, [r1] - cmp r3, #4 - blt _0223D3A2 - add r0, r4, #0 - bl ov17_02247A48 - pop {r4, pc} - thumb_func_end ov17_0223D390 - - thumb_func_start ov17_0223D3B8 -ov17_0223D3B8: ; 0x0223D3B8 - push {r4, r5, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - mov r0, #7 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0223D42C ; =0x000080E9 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [r5, #0x50] - ldr r2, [r5, #0x28] - ldr r3, [r5, #0x2c] - bl sub_0200CDC4 - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - add r2, r4, #0 - bl ov17_0224774C - mov r0, #0 - mvn r0, r0 - ldr r3, _0223D42C ; =0x000080E9 - str r0, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - ldr r2, [r5, #0x50] - bl ov17_0223F560 - ldr r3, _0223D42C ; =0x000080E9 - mov r0, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0xc8 - str r0, [sp, #0x10] - mov r0, #3 - str r0, [sp, #0x14] - ldr r0, _0223D430 ; =0x0000C350 - str r0, [sp, #0x18] - add r0, r5, #0 - ldr r1, [r5, #0x28] - ldr r2, [r5, #0x2c] - add r0, #0xb4 - bl ov17_0223F630 - add sp, #0x1c - pop {r4, r5, pc} - nop -_0223D42C: .word 0x000080E9 -_0223D430: .word 0x0000C350 - thumb_func_end ov17_0223D3B8 - - thumb_func_start ov17_0223D434 -ov17_0223D434: ; 0x0223D434 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x2c] - bl ov17_02247798 - add r0, r4, #0 - add r0, #0xb4 - bl ov17_0223F6C4 - ldr r1, _0223D464 ; =0x000080E9 - mov r2, #0 - str r1, [sp] - ldr r0, [r4, #0x2c] - mvn r2, r2 - add r3, r1, #0 - bl ov17_0223F5E8 - ldr r0, [r4, #0x2c] - ldr r1, _0223D464 ; =0x000080E9 - bl sub_0200D080 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223D464: .word 0x000080E9 - thumb_func_end ov17_0223D434 - - thumb_func_start ov17_0223D468 -ov17_0223D468: ; 0x0223D468 - push {r3, lr} - sub sp, #0x18 - add r3, r0, #0 - mov r0, #0x2e - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _0223D494 ; =0x000080EA - mov r1, #3 - str r0, [sp, #0x14] - ldr r0, [r3, #0x50] - ldr r2, [r3, #0x28] - ldr r3, [r3, #0x2c] - bl sub_0200CD7C - add sp, #0x18 - pop {r3, pc} - ; .align 2, 0 -_0223D494: .word 0x000080EA - thumb_func_end ov17_0223D468 - - thumb_func_start ov17_0223D498 -ov17_0223D498: ; 0x0223D498 - ldr r3, _0223D4A0 ; =sub_0200D080 - ldr r0, [r0, #0x2c] - ldr r1, _0223D4A4 ; =0x000080EA - bx r3 - ; .align 2, 0 -_0223D4A0: .word sub_0200D080 -_0223D4A4: .word 0x000080EA - thumb_func_end ov17_0223D498 - - thumb_func_start ov17_0223D4A8 -ov17_0223D4A8: ; 0x0223D4A8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - add r4, r1, #0 - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #0x17 - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r1, #0x16 - str r1, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r3, #3 - bl sub_0200710C - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_02019EBC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #0x50] - mov r1, #0x2d - mov r2, #0x23 - mov r3, #0x16 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - ldr r0, [r5, #0x50] - mov r1, #0x2d - mov r2, #0x24 - mov r3, #0x16 - bl sub_02003050 - ldr r1, [r5, #0] - ldr r0, _0223D5A8 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027B50 - add r6, r0, #0 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x16 - str r0, [sp, #4] - mov r1, #1 - ldr r0, [r5, #0x30] - add r2, r1, #0 - mov r3, #0xf - bl sub_0200DD0C - add r0, r6, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - ldr r0, [r5, #0x50] - mov r1, #0x26 - mov r3, #0x16 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #0x18 - mov r3, #2 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #0x15 - mov r3, #2 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xc0 - str r0, [sp, #8] - ldr r0, [r5, #0x50] - mov r1, #0x2d - mov r2, #0x25 - mov r3, #0x16 - bl sub_02003050 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223D5A8: .word 0x00001988 - thumb_func_end ov17_0223D4A8 - - thumb_func_start ov17_0223D5AC -ov17_0223D5AC: ; 0x0223D5AC - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223D5AC - - thumb_func_start ov17_0223D5B0 -ov17_0223D5B0: ; 0x0223D5B0 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - add r4, r1, #0 - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #0x13 - mov r3, #4 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #0x14 - mov r3, #4 - bl sub_0200710C - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #0x50] - mov r1, #0x2d - mov r2, #0x22 - mov r3, #0x16 - bl sub_02003050 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0223D5B0 - - thumb_func_start ov17_0223D608 -ov17_0223D608: ; 0x0223D608 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223D608 - - thumb_func_start ov17_0223D60C -ov17_0223D60C: ; 0x0223D60C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223D638 - ldr r0, [r5, #0x50] - bl sub_0200384C - cmp r0, #0 - bne _0223D63C - ldr r0, [r5, #0] - mov r1, #0x16 - bl ov17_0223F334 - ldr r0, [r5, #0] - bl ov17_0223F374 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D63C -_0223D638: - mov r0, #1 - pop {r3, r4, r5, pc} -_0223D63C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0223D60C - - thumb_func_start ov17_0223D640 -ov17_0223D640: ; 0x0223D640 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrh r0, [r5] - cmp r0, #0 - bne _0223D68C - ldr r0, [r4, #0] - bl sub_0209590C - cmp r0, #1 - bne _0223D65A - mov r1, #2 - b _0223D65C -_0223D65A: - mov r1, #1 -_0223D65C: - add r0, r4, #0 - add r0, #0xe9 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xea - strb r1, [r0] - add r0, r4, #0 - add r0, #0xeb - strb r1, [r0] - ldr r0, _0223D6B0 ; =0x000004FC - add r1, r4, #0 - add r0, r4, r0 - add r4, #0xe2 - mov r2, #0xd - add r3, r4, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D6AA - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223D6AA -_0223D68C: - ldr r0, _0223D6B0 ; =0x000004FC - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223D6B4 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D6AA - mov r0, #1 - pop {r3, r4, r5, pc} -_0223D6AA: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223D6B0: .word 0x000004FC -_0223D6B4: .word 0x00000127 - thumb_func_end ov17_0223D640 - - thumb_func_start ov17_0223D6B8 -ov17_0223D6B8: ; 0x0223D6B8 - push {r4, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223D6F0 - add r0, r3, #0 - add r0, #0xd8 - ldrb r0, [r0] - mov r2, #0 - add r0, r3, r0 - add r0, #0xd4 - ldrb r1, [r0] - add r0, r3, #0 - add r0, #0xe2 - strb r1, [r0] - ldr r0, _0223D714 ; =0x000004FC - add r1, r3, #0 - add r0, r3, r0 - add r3, #0xe2 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D70E - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D70E -_0223D6F0: - ldr r0, _0223D714 ; =0x000004FC - ldr r4, [r3, #0] - add r0, r3, r0 - ldr r3, _0223D718 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r4, r3] - sub r3, #0xb - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D70E - mov r0, #1 - pop {r4, pc} -_0223D70E: - mov r0, #0 - pop {r4, pc} - nop -_0223D714: .word 0x000004FC -_0223D718: .word 0x00000127 - thumb_func_end ov17_0223D6B8 - - thumb_func_start ov17_0223D71C -ov17_0223D71C: ; 0x0223D71C - push {r4, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223D762 - add r1, r3, #0 - mov r0, #0 - add r1, #0xec - strb r0, [r1] - add r2, r0, #0 - add r1, r3, #0 - sub r2, #0x10 - add r1, #0xed - strb r2, [r1] - add r1, r3, #0 - mov r2, #0x10 - add r1, #0xee - strb r2, [r1] - add r1, r3, #0 - add r1, #0xf0 - strh r0, [r1] - ldr r0, _0223D784 ; =0x000004FC - add r1, r3, #0 - add r0, r3, r0 - mov r2, #0xe - add r3, #0xe2 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D780 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D780 -_0223D762: - ldr r0, _0223D784 ; =0x000004FC - ldr r4, [r3, #0] - add r0, r3, r0 - ldr r3, _0223D788 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r4, r3] - sub r3, #0xb - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D780 - mov r0, #1 - pop {r4, pc} -_0223D780: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0223D784: .word 0x000004FC -_0223D788: .word 0x00000127 - thumb_func_end ov17_0223D71C - - thumb_func_start ov17_0223D78C -ov17_0223D78C: ; 0x0223D78C - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223D7D4 ; =0x000004FC - bne _0223D7B2 - add r0, r2, r0 - add r1, r2, #0 - mov r2, #0xf - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D7CE - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D7CE -_0223D7B2: - ldr r3, [r2, #0] - ldr r4, _0223D7D8 ; =0x00000127 - add r0, r2, r0 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D7CE - mov r0, #1 - pop {r4, pc} -_0223D7CE: - mov r0, #0 - pop {r4, pc} - nop -_0223D7D4: .word 0x000004FC -_0223D7D8: .word 0x00000127 - thumb_func_end ov17_0223D78C - - thumb_func_start ov17_0223D7DC -ov17_0223D7DC: ; 0x0223D7DC - push {r4, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223D824 ; =0x000004FC - bne _0223D802 - add r0, r3, r0 - add r1, r3, #0 - mov r2, #2 - add r3, #0xe2 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D81E - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D81E -_0223D802: - ldr r4, [r3, #0] - add r0, r3, r0 - ldr r3, _0223D828 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r4, r3] - sub r3, #0xb - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D81E - mov r0, #1 - pop {r4, pc} -_0223D81E: - mov r0, #0 - pop {r4, pc} - nop -_0223D824: .word 0x000004FC -_0223D828: .word 0x00000127 - thumb_func_end ov17_0223D7DC - - thumb_func_start ov17_0223D82C -ov17_0223D82C: ; 0x0223D82C - push {r4, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223D83E - cmp r0, #1 - beq _0223D898 - b _0223D8B2 -_0223D83E: - add r0, r3, #0 - add r0, #0xd8 - ldrb r0, [r0] - cmp r0, #0 - beq _0223D852 - cmp r0, #1 - beq _0223D85C - cmp r0, #2 - beq _0223D866 - b _0223D870 -_0223D852: - add r0, r3, #0 - mov r1, #3 - add r0, #0xe9 - strb r1, [r0] - b _0223D878 -_0223D85C: - add r0, r3, #0 - mov r1, #4 - add r0, #0xe9 - strb r1, [r0] - b _0223D878 -_0223D866: - add r0, r3, #0 - mov r1, #5 - add r0, #0xe9 - strb r1, [r0] - b _0223D878 -_0223D870: - add r0, r3, #0 - mov r1, #6 - add r0, #0xe9 - strb r1, [r0] -_0223D878: - add r0, r3, #0 - mov r1, #0 - add r0, #0xea - strb r1, [r0] - add r0, r3, #0 - add r0, #0xeb - strb r1, [r0] - add r0, r3, #0 - add r0, #0xe2 - ldrb r1, [r0] - add r0, r3, #0 - add r0, #0xe5 - strb r1, [r0] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223D898: - ldr r0, _0223D8D4 ; =0x000004FC - add r1, r3, #0 - add r0, r3, r0 - mov r2, #0xd - add r3, #0xe2 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D8D0 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D8D0 -_0223D8B2: - ldr r0, _0223D8D4 ; =0x000004FC - ldr r4, [r3, #0] - add r0, r3, r0 - ldr r3, _0223D8D8 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r4, r3] - sub r3, #0xb - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D8D0 - mov r0, #1 - pop {r4, pc} -_0223D8D0: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0223D8D4: .word 0x000004FC -_0223D8D8: .word 0x00000127 - thumb_func_end ov17_0223D82C - - thumb_func_start ov17_0223D8DC -ov17_0223D8DC: ; 0x0223D8DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223D8F2 - cmp r0, #1 - beq _0223D91C - cmp r0, #2 - beq _0223D938 - b _0223D95A -_0223D8F2: - add r1, r5, #0 - add r1, #0xe2 - ldrb r1, [r1] - ldr r0, [r5, #0] - bl sub_02095928 - add r1, r5, #0 - add r1, #0xe3 - strb r0, [r1] - add r1, r5, #0 - add r1, #0xe2 - ldrb r1, [r1] - ldr r0, [r5, #0] - bl sub_0209598C - add r1, r5, #0 - add r1, #0xe4 - strb r0, [r1] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223D91C: - ldr r0, _0223D964 ; =0x000004FC - add r1, r5, #0 - add r0, r5, r0 - add r5, #0xe2 - mov r2, #6 - add r3, r5, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223D95E - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D95E -_0223D938: - ldr r0, _0223D964 ; =0x000004FC - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223D968 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223D95E - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223D95E -_0223D95A: - mov r0, #1 - pop {r3, r4, r5, pc} -_0223D95E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223D964: .word 0x000004FC -_0223D968: .word 0x00000127 - thumb_func_end ov17_0223D8DC - - thumb_func_start ov17_0223D96C -ov17_0223D96C: ; 0x0223D96C - ldrh r2, [r1] - cmp r2, #0 - bne _0223D986 - add r2, r0, #0 - add r2, #0xd8 - ldrb r2, [r2] - add r0, #0xd8 - add r2, r2, #1 - strb r2, [r0] - ldrh r0, [r1] - add r0, r0, #1 - strh r0, [r1] - b _0223D998 -_0223D986: - add r0, #0xd8 - ldrb r0, [r0] - cmp r0, #4 - blo _0223D992 - mov r0, #1 - bx lr -_0223D992: - mov r0, #2 - strh r0, [r1, #2] - bx lr -_0223D998: - mov r0, #0 - bx lr - thumb_func_end ov17_0223D96C - - thumb_func_start ov17_0223D99C -ov17_0223D99C: ; 0x0223D99C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #3 - bhi _0223DA44 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223D9B4: ; jump table - .short _0223D9BC - _0223D9B4 - 2 ; case 0 - .short _0223D9DE - _0223D9B4 - 2 ; case 1 - .short _0223DA00 - _0223D9B4 - 2 ; case 2 - .short _0223DA2A - _0223D9B4 - 2 ; case 3 -_0223D9BC: - add r0, r3, #0 - ldr r1, _0223DA68 ; =0x000006E5 - add r0, #0xf2 - strh r1, [r0] - ldr r0, _0223DA6C ; =0x000004FC - add r1, r3, #0 - add r0, r3, r0 - mov r2, #0x10 - add r3, #0xe2 - bl ov17_0224F30C - cmp r0, #1 - bne _0223DA62 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223DA62 -_0223D9DE: - ldr r0, _0223DA6C ; =0x000004FC - ldr r5, [r3, #0] - add r0, r3, r0 - ldr r3, _0223DA70 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r5, r3] - sub r3, #0xb - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223DA62 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223DA62 -_0223DA00: - ldr r1, [r3, #0] - ldr r0, _0223DA74 ; =0x00000121 - ldrb r0, [r1, r0] - cmp r0, #2 - bne _0223DA0E - mov r1, #7 - b _0223DA10 -_0223DA0E: - mov r1, #0 -_0223DA10: - add r0, r3, #0 - add r0, #0xe9 - strb r1, [r0] - add r0, r3, #0 - mov r1, #0 - add r0, #0xea - strb r1, [r0] - add r0, r3, #0 - add r0, #0xeb - strb r1, [r0] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223DA2A: - ldr r0, _0223DA6C ; =0x000004FC - add r1, r3, #0 - add r0, r3, r0 - mov r2, #0xd - add r3, #0xe2 - bl ov17_0224F30C - cmp r0, #1 - bne _0223DA62 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223DA62 -_0223DA44: - ldr r0, _0223DA6C ; =0x000004FC - ldr r4, [r3, #0] - add r0, r3, r0 - ldr r3, _0223DA70 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r4, r3] - sub r3, #0xb - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223DA62 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223DA62: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223DA68: .word 0x000006E5 -_0223DA6C: .word 0x000004FC -_0223DA70: .word 0x00000127 -_0223DA74: .word 0x00000121 - thumb_func_end ov17_0223D99C - - thumb_func_start ov17_0223DA78 -ov17_0223DA78: ; 0x0223DA78 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223DAC8 ; =0x000004FC - bne _0223DA9E - add r0, r2, r0 - add r1, r2, #0 - mov r2, #1 - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223DAC4 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223DAC4 -_0223DA9E: - ldr r4, _0223DACC ; =0x00000127 - ldr r3, [r2, #0] - add r1, r4, #0 - add r1, #0x50 - add r0, r2, r0 - ldrb r2, [r3, r4] - ldrb r1, [r3, r1] - sub r1, r2, r1 - sub r2, r4, #4 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - sub r1, r1, #1 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223DAC4 - mov r0, #3 - pop {r4, pc} -_0223DAC4: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0223DAC8: .word 0x000004FC -_0223DACC: .word 0x00000127 - thumb_func_end ov17_0223DA78 - - thumb_func_start ov17_0223DAD0 -ov17_0223DAD0: ; 0x0223DAD0 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r1, #1 - lsl r1, r1, #0x1a - ldr r0, [r1, #0] - ldr r2, _0223DD8C ; =0xFFFFE0FF - and r0, r2 - str r0, [r1, #0] - ldr r0, _0223DD90 ; =0x04001000 - ldr r3, [r0, #0] - and r2, r3 - str r2, [r0, #0] - ldr r3, [r1, #0] - ldr r2, _0223DD94 ; =0xFFFF1FFF - and r3, r2 - str r3, [r1, #0] - ldr r3, [r0, #0] - add r1, #0x50 - and r2, r3 - str r2, [r0, #0] - mov r2, #0 - strh r2, [r1] - add r0, #0x50 - strh r2, [r0] - mov r2, #0xa - mov r0, #3 - mov r1, #0x17 - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, _0223DD98 ; =0x00001C10 - add r0, r4, #0 - mov r2, #0x17 - bl sub_0200681C - ldr r2, _0223DD98 ; =0x00001C10 - mov r1, #0 - add r5, r0, #0 - bl sub_020C4CF4 - mov r0, #0x17 - bl ov17_0223F140 - str r0, [r5, #0x10] - add r0, r4, #0 - bl sub_02006840 - mov r1, #0x5b - str r0, [r5, #0] - lsl r1, r1, #2 - str r5, [r0, r1] - ldr r2, [r5, #0] - mov r3, #1 - add r0, r1, #4 - strb r3, [r2, r0] - ldr r0, [r5, #0] - str r0, [r5, #0x14] - add r0, r5, #0 - bl ov17_0223E458 - mov r0, #0x17 - bl sub_02002F38 - add r1, r5, #0 - add r1, #0xa4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02003858 - add r0, r5, #0 - add r0, #0xa4 - mov r2, #2 - ldr r0, [r0, #0] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #0x17 - bl sub_02002F70 - add r0, r5, #0 - add r0, #0xa4 - mov r1, #1 - ldr r0, [r0, #0] - lsl r2, r1, #9 - mov r3, #0x17 - bl sub_02002F70 - add r0, r5, #0 - add r0, #0xa4 - mov r2, #7 - ldr r0, [r0, #0] - mov r1, #2 - lsl r2, r2, #6 - mov r3, #0x17 - bl sub_02002F70 - add r0, r5, #0 - add r0, #0xa4 - mov r2, #2 - ldr r0, [r0, #0] - mov r1, #3 - lsl r2, r2, #8 - mov r3, #0x17 - bl sub_02002F70 - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #8 - bl sub_02018144 - ldr r1, _0223DD9C ; =0x00001128 - str r0, [r5, r1] - add r0, r5, #0 - mov r1, #1 - bl ov17_0224CDB4 - mov r0, #0x17 - bl sub_02018340 - str r0, [r5, #0x74] - mov r0, #0x40 - mov r1, #0x17 - bl sub_0201DBEC - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - add r1, r5, #0 - ldr r0, [r5, #0] - add r1, #0x14 - bl ov17_02249380 - ldr r1, _0223DDA0 ; =0x0000114C - str r0, [r5, r1] - ldr r0, [r5, #0x74] - bl ov17_0223E250 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r0, #2 - mov r1, #0x17 - bl sub_02002BB8 - mov r0, #0x17 - bl sub_0200C6E4 - ldr r1, _0223DDA4 ; =0x02253008 - ldr r2, _0223DDA8 ; =0x02252FDC - mov r3, #0x20 - str r0, [r5, #0x6c] - bl sub_0200C73C - ldr r1, _0223DDAC ; =0x00100010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - ldr r0, [r5, #0x6c] - bl sub_0200C704 - str r0, [r5, #0x70] - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - mov r2, #0x80 - bl sub_0200C7C0 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - ldr r2, _0223DDB0 ; =0x02252FF0 - bl sub_0200CB30 - ldr r0, [r5, #0x6c] - bl sub_0200C738 - mov r2, #1 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - mov r0, #0x17 - bl sub_0200762C - str r0, [r5, #0x58] - bl ov17_0223E450 - mov r0, #0 - mov r1, #0x1a - mov r2, #0xce - mov r3, #0x17 - bl sub_0200B144 - add r1, r5, #0 - add r1, #0x98 - str r0, [r1, #0] - mov r0, #0x17 - bl sub_0200B358 - add r1, r5, #0 - add r1, #0x9c - str r0, [r1, #0] - mov r0, #5 - lsl r0, r0, #6 - mov r1, #0x17 - bl sub_02023790 - add r1, r5, #0 - add r1, #0xa0 - str r0, [r1, #0] - mov r0, #9 - mov r1, #0x17 - bl sub_02012744 - add r1, r5, #0 - add r1, #0xa8 - str r0, [r1, #0] - mov r0, #0x2d - mov r1, #0x17 - bl sub_02006C24 - add r4, r0, #0 - mov r0, #0x2e - mov r1, #0x17 - bl sub_02006C24 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0223E67C - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0223E770 - add r0, r5, #0 - bl ov17_0223E380 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_0223E4B0 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_0223E60C - ldr r0, _0223DDA0 ; =0x0000114C - mov r1, #0 - ldr r0, [r5, r0] - mov r2, #1 - add r3, r1, #0 - bl ov17_02249640 - add r0, r4, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl sub_02006CA8 - add r0, r5, #0 - bl ov17_0224A134 - add r0, r5, #0 - add r0, #0x14 - bl ov17_0224B0CC - add r0, r5, #0 - bl ov17_0223E778 - add r0, r5, #0 - bl ov17_0224AA38 - add r0, r5, #0 - bl ov17_0224B59C - bl sub_02039734 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0x17 - str r1, [sp, #8] - mov r1, #0x11 - mov r2, #0x25 - mov r3, #0 - bl sub_0200F174 - ldr r0, _0223DDB4 ; =ov17_0223E1FC - ldr r2, _0223DDB8 ; =0x00013880 - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - ldr r0, _0223DDBC ; =0x00001170 - mov r1, #1 - strb r1, [r5, r0] - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r1, _0223DDC0 ; =0x0000046F - mov r0, #6 - mov r2, #1 - bl sub_02004550 - ldr r1, [r5, #0] - ldr r0, _0223DDC4 ; =0x00000171 - ldrb r0, [r1, r0] - bl sub_020959F4 - mov r1, #0x39 - add r2, r1, #0 - ldr r0, _0223DDC8 ; =0x04000050 - sub r2, #0x3f - bl sub_020BF578 - ldr r0, _0223DDCC ; =0x000006E5 - bl sub_02005748 - ldr r0, _0223DDD0 ; =ov17_0223E09C - add r1, r5, #0 - bl sub_02017798 - mov r0, #1 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223DD8C: .word 0xFFFFE0FF -_0223DD90: .word 0x04001000 -_0223DD94: .word 0xFFFF1FFF -_0223DD98: .word 0x00001C10 -_0223DD9C: .word 0x00001128 -_0223DDA0: .word 0x0000114C -_0223DDA4: .word 0x02253008 -_0223DDA8: .word 0x02252FDC -_0223DDAC: .word 0x00100010 -_0223DDB0: .word 0x02252FF0 -_0223DDB4: .word ov17_0223E1FC -_0223DDB8: .word 0x00013880 -_0223DDBC: .word 0x00001170 -_0223DDC0: .word 0x0000046F -_0223DDC4: .word 0x00000171 -_0223DDC8: .word 0x04000050 -_0223DDCC: .word 0x000006E5 -_0223DDD0: .word ov17_0223E09C - thumb_func_end ov17_0223DAD0 - - thumb_func_start ov17_0223DDD4 -ov17_0223DDD4: ; 0x0223DDD4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02094E98 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223DDF6 - cmp r0, #1 - beq _0223DE04 - cmp r0, #2 - beq _0223DED8 - b _0223DEEE -_0223DDF6: - bl sub_0200F2AC - cmp r0, #1 - bne _0223DEEE - mov r0, #1 - str r0, [r5, #0] - b _0223DEEE -_0223DE04: - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #1 - bne _0223DE7E - ldr r2, _0223DEF4 ; =0x0000116E - ldr r1, _0223DEF8 ; =0x00001C04 - ldrh r2, [r4, r2] - add r0, r4, #0 - add r1, r4, r1 - lsl r3, r2, #2 - ldr r2, _0223DEFC ; =0x02253050 - ldr r2, [r2, r3] - blx r2 - sub r1, r0, #1 - cmp r1, #1 - bhi _0223DE48 - cmp r0, #1 - bne _0223DE32 - ldr r0, _0223DEF4 ; =0x0000116E - ldrh r1, [r4, r0] - add r1, r1, #1 - b _0223DE38 -_0223DE32: - ldr r0, _0223DF00 ; =0x00001C06 - ldrh r1, [r4, r0] - ldr r0, _0223DEF4 ; =0x0000116E -_0223DE38: - strh r1, [r4, r0] - ldr r0, _0223DEF8 ; =0x00001C04 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - b _0223DE7E -_0223DE48: - cmp r0, #3 - bne _0223DE7E - ldr r0, _0223DF04 ; =0x00001C0C - ldrb r1, [r4, r0] - cmp r1, #1 - bne _0223DE7E - mov r1, #2 - sub r0, #8 - str r1, [r5, #0] - add r0, r4, r0 - mov r1, #0 - mov r2, #8 - bl sub_020C4CF4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x17 - mov r1, #0x1e - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - b _0223DEEE -_0223DE7E: - ldr r0, _0223DF08 ; =0x00001174 - add r0, r4, r0 - bl ov17_0224F35C - ldr r0, _0223DF08 ; =0x00001174 - add r1, r4, #0 - add r0, r4, r0 - bl ov17_0224F3D8 - ldr r0, _0223DF04 ; =0x00001C0C - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223DEEE - ldr r0, _0223DF08 ; =0x00001174 - add r0, r4, r0 - bl ov17_0224F3D0 - cmp r0, #0 - bne _0223DEEE - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #0 - bne _0223DEEE - mov r0, #2 - str r0, [r5, #0] - ldr r0, _0223DEF8 ; =0x00001C04 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x17 - mov r1, #0x1e - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - b _0223DEEE -_0223DED8: - ldr r0, _0223DF04 ; =0x00001C0C - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223DEEE - bl sub_0200F2AC - cmp r0, #1 - bne _0223DEEE - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0223DEEE: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223DEF4: .word 0x0000116E -_0223DEF8: .word 0x00001C04 -_0223DEFC: .word 0x02253050 -_0223DF00: .word 0x00001C06 -_0223DF04: .word 0x00001C0C -_0223DF08: .word 0x00001174 - thumb_func_end ov17_0223DDD4 - - thumb_func_start ov17_0223DF0C -ov17_0223DF0C: ; 0x0223DF0C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02014710 - cmp r0, #0 - beq _0223DF24 - bl sub_02022974 -_0223DF24: - add r0, r4, #0 - bl ov17_0223E7E0 - bl sub_020141E4 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224A95C - add r0, r4, #0 - bl ov17_0224AA58 - add r0, r4, #0 - bl ov17_0224B5B8 - add r0, r4, #0 - bl ov17_0224BD00 - add r0, r4, #0 - bl ov17_0223E588 - add r0, r4, #0 - bl ov17_0223E678 - add r0, r4, #0 - bl ov17_0223E76C - add r0, r4, #0 - bl ov17_0223E774 - add r5, r4, #0 - mov r6, #0 - add r5, #0x78 -_0223DF66: - add r0, r5, #0 - bl sub_0201A8FC - add r6, r6, #1 - add r5, #0x10 - cmp r6, #2 - blt _0223DF66 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x74] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0x74] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0x74] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0x74] - bl ov17_02249358 - ldr r0, _0223E088 ; =0x0000114C - ldr r0, [r4, r0] - bl ov17_022493A4 - ldr r0, [r4, #0x6c] - ldr r1, [r4, #0x70] - bl sub_0200D0B0 - ldr r0, [r4, #0x6c] - bl sub_0200C8D4 - bl sub_0201DC3C - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224A1EC - ldr r0, [r4, #0x58] - bl sub_02007B6C - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl sub_020127BC - mov r0, #2 - bl sub_02002C60 - ldr r0, _0223E08C ; =0x00001128 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_02002F54 - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - bl sub_020237BC - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl sub_0200B3F0 - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - bl sub_0200B190 - ldr r0, [r4, #0x74] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, [r4, #0x10] - bl ov17_0223F1E0 - bl sub_0201E530 - add r0, r7, #0 - bl sub_02006830 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - mov r0, #0x17 - bl sub_0201807C - bl sub_02095A24 - bl sub_02039794 - ldr r0, _0223E090 ; =0x0000000B - bl sub_02006514 - ldr r0, _0223E094 ; =0x0000000C - bl sub_02006514 - ldr r0, _0223E098 ; =0x00000016 - bl sub_02006514 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223E088: .word 0x0000114C -_0223E08C: .word 0x00001128 -_0223E090: .word 0x0000000B -_0223E094: .word 0x0000000C -_0223E098: .word 0x00000016 - thumb_func_end ov17_0223DF0C - - thumb_func_start ov17_0223E09C -ov17_0223E09C: ; 0x0223E09C - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, _0223E170 ; =0x00001150 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _0223E12C - add r1, r0, #4 - add r3, r4, r1 - ldr r2, [r4, r1] - mov r5, #0 - ldr r1, [r3, #4] - add r2, r2, #1 - adc r1, r5 - add r0, r0, #4 - str r2, [r4, r0] - mov r0, #7 - str r1, [r3, #4] - bl sub_020051C4 - ldr r1, _0223E174 ; =0x00000B14 - ldr r1, [r4, r1] - mul r0, r1 - ldr r1, _0223E178 ; =0x00001388 - add r0, r0, r1 - lsl r1, r1, #1 - bl sub_020E2178 - ldr r7, _0223E17C ; =0x00001168 - add r5, r0, #1 - add r1, r7, #0 - str r0, [r4, r7] - sub r1, #0x14 - ldr r2, [r4, r1] - add r1, r7, #0 - sub r1, #0x10 - add r0, r5, #0 - ldr r6, [r4, r1] - mov r3, #0 - add r1, r3, #0 - eor r1, r6 - eor r0, r2 - orr r0, r1 - beq _0223E128 - sub r0, r7, #4 - ldr r0, [r4, r0] - cmp r0, #0x12 - bhi _0223E10C - mov ip, r3 - mov r0, ip - sub r1, r5, r2 - sbc r0, r6 - mov r6, #0 - mov r2, #1 - sub r1, r2, r1 - sbc r6, r0 - bhs _0223E11C -_0223E10C: - ldr r1, _0223E180 ; =0x00001154 - str r5, [r4, r1] - add r0, r1, #4 - str r3, [r4, r0] - mov r0, #0 - add r1, #0x10 - str r0, [r4, r1] - b _0223E12C -_0223E11C: - sub r0, r7, #4 - ldr r0, [r4, r0] - add r1, r0, #1 - sub r0, r7, #4 - str r1, [r4, r0] - b _0223E12C -_0223E128: - sub r0, r7, #4 - str r3, [r4, r0] -_0223E12C: - ldr r0, [r4, #0x58] - bl sub_02008A94 - mov r6, #0 - add r5, r4, #0 -_0223E136: - ldr r0, [r5, #0x18] - cmp r0, #0 - beq _0223E140 - bl ov22_0225B06C -_0223E140: - add r6, r6, #1 - add r5, #0x10 - cmp r6, #4 - blt _0223E136 - bl sub_0201DCAC - bl sub_0200C800 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_02003694 - ldr r0, [r4, #0x74] - bl sub_0201C2B8 - ldr r3, _0223E184 ; =0x027E0000 - ldr r1, _0223E188 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r3, r4, r5, r6, r7, pc} - nop -_0223E170: .word 0x00001150 -_0223E174: .word 0x00000B14 -_0223E178: .word 0x00001388 -_0223E17C: .word 0x00001168 -_0223E180: .word 0x00001154 -_0223E184: .word 0x027E0000 -_0223E188: .word 0x00003FF8 - thumb_func_end ov17_0223E09C - - thumb_func_start ov17_0223E18C -ov17_0223E18C: ; 0x0223E18C - push {r3, r4, r5, lr} - ldr r1, _0223E1F8 ; =0x00001128 - add r5, r0, r1 - ldrb r1, [r5, #0x11] - cmp r1, #0 - beq _0223E1F4 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200316C - add r4, r0, #0 - mov r2, #2 - ldr r0, [r5, #0] - add r1, r4, #0 - lsl r2, r2, #8 - bl sub_020C4B18 - ldrb r0, [r5, #0x10] - cmp r0, #1 - bne _0223E1F4 - ldrh r0, [r5, #0xe] - add r1, r4, #0 - str r0, [sp] - ldrh r3, [r5, #8] - ldrh r2, [r5, #6] - ldr r0, [r5, #0] - asr r3, r3, #8 - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_020039F8 - ldrh r3, [r5, #0xa] - ldrh r1, [r5, #8] - cmp r1, r3 - bne _0223E1DA - mov r0, #0 - strb r0, [r5, #0x10] - pop {r3, r4, r5, pc} -_0223E1DA: - mov r0, #0xc - ldrsh r2, [r5, r0] - add r0, r1, r2 - cmp r2, #0 - ble _0223E1E8 - cmp r0, r3 - bge _0223E1F0 -_0223E1E8: - cmp r2, #0 - bge _0223E1F2 - cmp r0, r3 - bgt _0223E1F2 -_0223E1F0: - add r0, r3, #0 -_0223E1F2: - strh r0, [r5, #8] -_0223E1F4: - pop {r3, r4, r5, pc} - nop -_0223E1F8: .word 0x00001128 - thumb_func_end ov17_0223E18C - - thumb_func_start ov17_0223E1FC -ov17_0223E1FC: ; 0x0223E1FC - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov17_0223E18C - ldr r0, _0223E248 ; =0x00001170 - ldrb r0, [r6, r0] - cmp r0, #1 - bne _0223E23E - ldr r0, [r6, #0x58] - bl sub_02007768 - mov r4, #0 - add r5, r6, #0 -_0223E218: - ldr r0, [r5, #0x18] - cmp r0, #0 - beq _0223E222 - bl ov22_0225AFF8 -_0223E222: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0223E218 - bl ov11_0221F8F0 - ldr r0, [r6, #0x70] - bl sub_0200C7EC - bl sub_0200C808 - ldr r0, _0223E24C ; =0x04000540 - mov r1, #1 - str r1, [r0, #0] -_0223E23E: - ldr r1, [r6, #0x74] - mov r0, #0x17 - bl sub_02038A1C - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223E248: .word 0x00001170 -_0223E24C: .word 0x04000540 - thumb_func_end ov17_0223E1FC - - thumb_func_start ov17_0223E250 -ov17_0223E250: ; 0x0223E250 - push {r4, r5, lr} - sub sp, #0x8c - add r4, r0, #0 - bl sub_0201FF00 - ldr r5, _0223E370 ; =0x02253028 - add r3, sp, #0x10 - mov r2, #5 -_0223E260: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223E260 - add r0, sp, #0x10 - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - ldr r5, _0223E374 ; =0x02252FCC - add r3, sp, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223E378 ; =0x022530D8 - add r3, sp, #0x38 - mov r2, #0xa -_0223E2C0: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223E2C0 - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - add r2, sp, #0x38 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #1 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - add r2, sp, #0x54 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #3 - add r2, sp, #0x70 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r1, _0223E37C ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #2 - orr r0, r2 - strh r0, [r1] - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - add r0, r4, #0 - bl ov17_02249300 - add sp, #0x8c - pop {r4, r5, pc} - ; .align 2, 0 -_0223E370: .word 0x02253028 -_0223E374: .word 0x02252FCC -_0223E378: .word 0x022530D8 -_0223E37C: .word 0x04000008 - thumb_func_end ov17_0223E250 - - thumb_func_start ov17_0223E380 -ov17_0223E380: ; 0x0223E380 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0x74] - add r1, #0x78 - mov r2, #1 - mov r3, #2 - bl sub_0201A7E8 - mov r0, #0xb - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r4, #0x74] - add r4, #0x88 - add r1, r4, #0 - mov r2, #1 - bl sub_0201A7E8 - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov17_0223E380 - - thumb_func_start ov17_0223E3CC -ov17_0223E3CC: ; 0x0223E3CC - push {r4, r5, r6, r7} - ldr r5, [r0, #0] - ldr r3, _0223E440 ; =0x00000171 - ldrb r4, [r5, r3] - cmp r4, #1 - bne _0223E3E8 - add r3, r3, #6 - ldrb r3, [r5, r3] - cmp r3, #0 - beq _0223E3E8 - ldr r3, _0223E444 ; =0x00001C0E - mov r4, #1 - strb r4, [r0, r3] - b _0223E3EE -_0223E3E8: - ldr r3, _0223E444 ; =0x00001C0E - mov r4, #0 - strb r4, [r0, r3] -_0223E3EE: - ldr r3, _0223E444 ; =0x00001C0E - ldrb r3, [r0, r3] - cmp r3, #1 - bne _0223E402 - mov r0, #1 - str r0, [r1, #0] - mov r1, #0 - str r1, [r2, #0] - pop {r4, r5, r6, r7} - bx lr -_0223E402: - mov r3, #0x12 - ldr r6, [r0, #0] - lsl r3, r3, #4 - ldrb r4, [r6, r3] - mov r3, #0x28 - add r7, r3, #0 - add r5, r4, #0 - add r7, #0xf7 - ldrb r6, [r6, r7] - ldr r4, _0223E448 ; =0x0225312C - mul r5, r3 - lsl r6, r6, #3 - add r4, r4, r5 - ldr r4, [r6, r4] - str r4, [r1, #0] - ldr r1, [r0, #0] - add r0, r3, #0 - add r0, #0xf8 - ldrb r0, [r1, r0] - ldr r4, _0223E44C ; =0x02253130 - add r5, r0, #0 - mul r5, r3 - add r3, #0xf7 - ldrb r0, [r1, r3] - lsl r1, r0, #3 - add r0, r4, r5 - ldr r0, [r1, r0] - str r0, [r2, #0] - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_0223E440: .word 0x00000171 -_0223E444: .word 0x00001C0E -_0223E448: .word 0x0225312C -_0223E44C: .word 0x02253130 - thumb_func_end ov17_0223E3CC - - thumb_func_start ov17_0223E450 -ov17_0223E450: ; 0x0223E450 - ldr r3, _0223E454 ; =sub_02014000 - bx r3 - ; .align 2, 0 -_0223E454: .word sub_02014000 - thumb_func_end ov17_0223E450 - - thumb_func_start ov17_0223E458 -ov17_0223E458: ; 0x0223E458 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - bne _0223E466 - bl sub_02022974 -_0223E466: - ldr r4, _0223E4AC ; =0x00000AEC - mov r1, #0 - mov r2, #3 - add r6, r4, #5 -_0223E46E: - sub r3, r2, r1 - lsl r3, r3, #0x18 - add r0, r5, r1 - lsr r3, r3, #0x18 - strb r3, [r0, r4] - add r1, r1, #1 - strb r3, [r0, r6] - cmp r1, #4 - blt _0223E46E - add r0, r5, #0 - bl ov17_0224CFB8 - mov r4, #0 - mov r7, #0xad - add r6, r4, #0 - lsl r7, r7, #4 -_0223E48E: - ldr r0, [r5, #0] - mov r1, #5 - ldr r0, [r0, r6] - mov r2, #0 - bl sub_02074470 - bl ov17_0224CFA8 - add r1, r5, r4 - add r4, r4, #1 - add r6, r6, #4 - strb r0, [r1, r7] - cmp r4, #4 - blt _0223E48E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E4AC: .word 0x00000AEC - thumb_func_end ov17_0223E458 - - thumb_func_start ov17_0223E4B0 -ov17_0223E4B0: ; 0x0223E4B0 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0223E584 ; =0x000080E9 - mov r1, #2 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r2, [r5, #0x6c] - ldr r3, [r5, #0x70] - bl sub_0200CDC4 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - bl ov17_0224A20C - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224A390 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224A5A8 - add r0, r5, #0 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224A61C - add r0, r5, #0 - add r0, #0x14 - bl ov17_0224A674 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224A984 - add r0, r5, #0 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224A9F8 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224C310 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, r5, #0 - bl ov17_0224C384 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224AA94 - add r0, r5, #0 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224AB08 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224AC80 - add r0, r5, #0 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224ACF4 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224ACFC - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - add r2, r4, #0 - bl ov17_0224AFA8 - add r0, r5, #0 - bl ov17_0224B01C - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_0223E584: .word 0x000080E9 - thumb_func_end ov17_0223E4B0 - - thumb_func_start ov17_0223E588 -ov17_0223E588: ; 0x0223E588 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x70] - bl ov17_0224A210 - ldr r0, [r4, #0x70] - bl ov17_0224A428 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224A580 - ldr r0, [r4, #0x70] - bl ov17_0224A5F8 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224A650 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224A7B8 - ldr r0, [r4, #0x70] - bl ov17_0224A9D4 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224AA1C - add r0, r4, #0 - bl ov17_0224C3E4 - ldr r0, [r4, #0x70] - bl ov17_0224C360 - ldr r0, [r4, #0x70] - bl ov17_0224AAE4 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224ABB0 - ldr r0, [r4, #0x70] - bl ov17_0224ACD0 - add r0, r4, #0 - add r0, #0x14 - bl ov17_0224ACF8 - ldr r0, [r4, #0x70] - bl ov17_0224AD4C - ldr r0, [r4, #0x70] - bl ov17_0224AFF8 - add r0, r4, #0 - bl ov17_0224B058 - ldr r0, [r4, #0x70] - ldr r1, _0223E608 ; =0x000080E9 - bl sub_0200D080 - pop {r4, pc} - ; .align 2, 0 -_0223E608: .word 0x000080E9 - thumb_func_end ov17_0223E588 - - thumb_func_start ov17_0223E60C -ov17_0223E60C: ; 0x0223E60C - push {r4, lr} - sub sp, #0x18 - add r4, r0, #0 - mov r0, #0x2e - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _0223E66C ; =0x000080EA - mov r1, #3 - str r0, [sp, #0x14] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r2, [r4, #0x6c] - ldr r3, [r4, #0x70] - bl sub_0200CD7C - mov r0, #0x2e - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0223E670 ; =0x000080EB - mov r1, #3 - str r0, [sp, #0x14] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r2, [r4, #0x6c] - ldr r3, [r4, #0x70] - bl sub_0200CD7C - ldr r0, _0223E674 ; =0x0000114C - ldr r0, [r4, r0] - bl ov17_022493C4 - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 -_0223E66C: .word 0x000080EA -_0223E670: .word 0x000080EB -_0223E674: .word 0x0000114C - thumb_func_end ov17_0223E60C - - thumb_func_start ov17_0223E678 -ov17_0223E678: ; 0x0223E678 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223E678 - - thumb_func_start ov17_0223E67C -ov17_0223E67C: ; 0x0223E67C - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x17 - str r0, [sp, #0xc] - add r5, r1, #0 - ldr r2, [r4, #0x74] - add r0, r5, #0 - mov r1, #0xd - mov r3, #3 - bl sub_020070E8 - add r0, r4, #0 - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov17_0223E3CC - ldr r0, [sp, #0x10] - mov r1, #0 - bl ov17_0223F0BC - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x17 - str r0, [sp, #0xc] - ldr r2, [r4, #0x74] - add r0, r5, #0 - mov r3, #3 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #0x2d - mov r2, #0x20 - mov r3, #0x17 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #0x2d - mov r2, #0x24 - mov r3, #0x17 - bl sub_02003050 - ldr r1, [r4, #0] - ldr r0, _0223E764 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027B50 - add r5, r0, #0 - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x17 - str r0, [sp, #4] - mov r1, #1 - ldr r0, [r4, #0x74] - add r2, r1, #0 - mov r3, #0xf - bl sub_0200DD0C - add r0, r5, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #0x26 - mov r3, #0x17 - bl sub_02003050 - add r0, r4, #0 - bl ov17_0224C848 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02003164 - ldr r1, _0223E768 ; =0x00001128 - mov r2, #2 - ldr r1, [r4, r1] - lsl r2, r2, #8 - bl sub_020C4B18 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223E764: .word 0x00001988 -_0223E768: .word 0x00001128 - thumb_func_end ov17_0223E67C - - thumb_func_start ov17_0223E76C -ov17_0223E76C: ; 0x0223E76C - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223E76C - - thumb_func_start ov17_0223E770 -ov17_0223E770: ; 0x0223E770 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223E770 - - thumb_func_start ov17_0223E774 -ov17_0223E774: ; 0x0223E774 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0223E774 - - thumb_func_start ov17_0223E778 -ov17_0223E778: ; 0x0223E778 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0223E788 - bl sub_02022974 -_0223E788: - mov r1, #0x12 - mov r0, #0x17 - lsl r1, r1, #0xa - bl sub_02018144 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x17 - str r0, [sp, #4] - mov r3, #0x12 - ldr r0, _0223E7D8 ; =ov17_0223E800 - ldr r1, _0223E7DC ; =ov17_0223E81C - lsl r3, r3, #0xa - bl sub_02014014 - str r0, [r4, #0xc] - bl sub_02014784 - add r2, r0, #0 - mov r0, #1 - mov r1, #0xe1 - lsl r0, r0, #0xc - lsl r1, r1, #0xe - bl sub_020206BC - mov r0, #0x3d - mov r1, #3 - mov r2, #0x17 - bl sub_020144C4 - add r1, r0, #0 - ldr r0, [r4, #0xc] - mov r2, #0xa - mov r3, #1 - bl sub_020144CC - add sp, #8 - pop {r4, pc} - nop -_0223E7D8: .word ov17_0223E800 -_0223E7DC: .word ov17_0223E81C - thumb_func_end ov17_0223E778 - - thumb_func_start ov17_0223E7E0 -ov17_0223E7E0: ; 0x0223E7E0 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02014730 - add r5, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0201411C - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0223E7E0 - - thumb_func_start ov17_0223E800 -ov17_0223E800: ; 0x0223E800 - push {r4, lr} - ldr r3, _0223E818 ; =0x02100DEC - mov r2, #0 - ldr r3, [r3, #0] - blx r3 - add r4, r0, #0 - bl sub_020145B4 - lsl r0, r4, #0x10 - lsr r0, r0, #0xd - pop {r4, pc} - nop -_0223E818: .word 0x02100DEC - thumb_func_end ov17_0223E800 - - thumb_func_start ov17_0223E81C -ov17_0223E81C: ; 0x0223E81C - push {r4, lr} - ldr r3, _0223E834 ; =0x02100DF4 - mov r2, #0 - ldr r3, [r3, #0] - blx r3 - add r4, r0, #0 - bl sub_020145F4 - lsl r0, r4, #0x10 - lsr r0, r0, #0xd - pop {r4, pc} - nop -_0223E834: .word 0x02100DF4 - thumb_func_end ov17_0223E81C - - thumb_func_start ov17_0223E838 -ov17_0223E838: ; 0x0223E838 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223E87A - ldr r1, [r5, #0] - ldr r0, _0223E89C ; =0x00000177 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0223E85A - ldr r0, [r4, #4] - cmp r0, #0x78 - bge _0223E85A - add r0, r0, #1 - str r0, [r4, #4] - b _0223E898 -_0223E85A: - ldr r0, _0223E8A0 ; =0x00001174 - ldr r3, _0223E8A4 ; =0x00000AEC - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0xa - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223E898 - mov r0, #0 - str r0, [r4, #4] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223E898 -_0223E87A: - ldr r4, _0223E8A8 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - ldr r0, _0223E8A0 ; =0x00001174 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223E898 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223E898: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223E89C: .word 0x00000177 -_0223E8A0: .word 0x00001174 -_0223E8A4: .word 0x00000AEC -_0223E8A8: .word 0x00000127 - thumb_func_end ov17_0223E838 - - thumb_func_start ov17_0223E8AC -ov17_0223E8AC: ; 0x0223E8AC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223E8BE - cmp r0, #1 - beq _0223E912 - b _0223E934 -_0223E8BE: - ldr r0, _0223E93C ; =0x00000B53 - mov r2, #0 - strb r2, [r5, r0] - add r1, r0, #1 - strb r2, [r5, r1] - ldr r2, [r5, #0] - ldr r1, _0223E940 ; =0x00000123 - sub r0, r0, #7 - ldrb r2, [r2, r1] - strb r2, [r5, r0] - ldr r2, [r5, #0] - sub r0, r1, #3 - ldrb r0, [r2, r0] - bl ov17_0224C57C - mov r1, #0xb5 - lsl r1, r1, #4 - strb r0, [r5, r1] - ldr r0, [r5, #0] - bl sub_0209590C - cmp r0, #1 - bne _0223E8F0 - mov r1, #2 - b _0223E8F2 -_0223E8F0: - mov r1, #1 -_0223E8F2: - ldr r0, _0223E944 ; =0x00000B52 - ldr r3, _0223E948 ; =0x00000B1C - strb r1, [r5, r0] - ldr r0, _0223E94C ; =0x00001174 - add r1, r5, #0 - add r0, r5, r0 - mov r2, #9 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223E938 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223E938 -_0223E912: - ldr r0, _0223E94C ; =0x00001174 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223E950 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223E938 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223E938 -_0223E934: - mov r0, #1 - pop {r3, r4, r5, pc} -_0223E938: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223E93C: .word 0x00000B53 -_0223E940: .word 0x00000123 -_0223E944: .word 0x00000B52 -_0223E948: .word 0x00000B1C -_0223E94C: .word 0x00001174 -_0223E950: .word 0x00000127 - thumb_func_end ov17_0223E8AC - - thumb_func_start ov17_0223E954 -ov17_0223E954: ; 0x0223E954 - push {r4, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223E99C ; =0x00001174 - bne _0223E97A - add r0, r2, r0 - add r1, r2, #0 - mov r2, #3 - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223E996 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223E996 -_0223E97A: - ldr r3, [r2, #0] - ldr r4, _0223E9A0 ; =0x00000127 - add r0, r2, r0 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223E996 - mov r0, #1 - pop {r4, pc} -_0223E996: - mov r0, #0 - pop {r4, pc} - nop -_0223E99C: .word 0x00001174 -_0223E9A0: .word 0x00000127 - thumb_func_end ov17_0223E954 - - thumb_func_start ov17_0223E9A4 -ov17_0223E9A4: ; 0x0223E9A4 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - ldrh r1, [r5] - add r4, r0, #0 - cmp r1, #4 - bls _0223E9B4 - b _0223EB66 -_0223E9B4: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E9C0: ; jump table - .short _0223E9CA - _0223E9C0 - 2 ; case 0 - .short _0223EAEA - _0223E9C0 - 2 ; case 1 - .short _0223EB06 - _0223E9C0 - 2 ; case 2 - .short _0223EB28 - _0223E9C0 - 2 ; case 3 - .short _0223EB44 - _0223E9C0 - 2 ; case 4 -_0223E9CA: - add r1, sp, #4 - add r2, sp, #0 - bl ov17_0223E3CC - ldr r0, [sp, #4] - ldr r3, _0223EB74 ; =0x02253084 - add r2, r0, #0 - mov r1, #0xc - mul r2, r1 - ldr r0, _0223EB78 ; =0x00000ACC - add r2, r3, r2 - str r2, [r4, r0] - ldr r2, [sp, #4] - ldr r0, _0223EB7C ; =0x0112A880 - add r3, r2, #0 - mul r3, r1 - ldr r1, _0223EB80 ; =0x02253086 - ldrh r1, [r1, r3] - bl sub_020E1F6C - ldr r1, _0223EB84 ; =0x00000B04 - str r0, [r4, r1] - ldr r0, [sp] - mov r1, #1 - bl ov17_0223F0BC - ldr r1, _0223EB84 ; =0x00000B04 - mov r3, #0 - ldr r1, [r4, r1] - ldr r2, _0223EB88 ; =0x00001388 - mul r0, r1 - mov ip, r3 - mov r1, ip - add r0, r0, r2 - adc r1, r3 - lsl r2, r2, #1 - bl sub_020E1ED4 - ldr r1, _0223EB8C ; =0x00000B08 - str r0, [r4, r1] - ldr r2, [sp, #4] - mov r0, #0xc - add r3, r2, #0 - ldr r2, _0223EB80 ; =0x02253086 - mul r3, r0 - ldrh r3, [r2, r3] - add r2, r1, #0 - add r2, #0x10 - strh r3, [r4, r2] - sub r2, r1, #4 - ldr r6, [sp, #4] - ldr r3, [r4, r2] - add r2, r6, #0 - ldr r6, _0223EB90 ; =0x0225308A - mul r2, r0 - ldrb r2, [r6, r2] - add r6, r3, #0 - mul r6, r2 - add r2, r1, #4 - str r6, [r4, r2] - ldr r3, [sp, #4] - sub r2, r1, #4 - add r6, r3, #0 - mul r6, r0 - ldr r0, _0223EB94 ; =0x0225308B - ldr r2, [r4, r2] - ldrb r0, [r0, r6] - add r3, r2, #0 - mul r3, r0 - add r0, r1, #0 - add r0, #8 - str r3, [r4, r0] - sub r0, r1, #4 - ldr r0, [r4, r0] - mov r1, #0x30 - bl sub_020E2178 - ldr r1, _0223EB98 ; =0x00000B14 - mov r2, #0xc - str r0, [r4, r1] - ldr r0, [sp, #4] - add r3, r0, #0 - ldr r0, _0223EB9C ; =0x02253089 - mul r3, r2 - ldrb r3, [r0, r3] - add r0, r1, #6 - strb r3, [r4, r0] - ldr r0, [sp, #4] - mul r2, r0 - ldr r0, _0223EB74 ; =0x02253084 - ldrh r2, [r0, r2] - add r0, r1, #0 - sub r0, #0x14 - str r2, [r4, r0] - ldr r2, [sp] - add r0, r1, #7 - strb r2, [r4, r0] - add r0, r1, #0 - sub r0, #0x48 - ldr r0, [r4, r0] - add r2, r1, #0 - ldrh r3, [r0] - add r2, #0x2c - strh r3, [r4, r2] - add r2, r1, #0 - ldrh r3, [r0, #2] - add r2, #0x2e - strh r3, [r4, r2] - add r2, r1, #0 - ldrh r3, [r0, #4] - add r2, #0x30 - strh r3, [r4, r2] - add r2, r1, #0 - ldrh r3, [r0, #6] - add r2, #0x32 - strh r3, [r4, r2] - add r2, r1, #0 - ldrh r3, [r0, #8] - add r2, #0x34 - strh r3, [r4, r2] - ldrh r2, [r0, #0xa] - add r0, r1, #0 - add r0, #0x36 - strh r2, [r4, r0] - add r0, r1, #0 - sub r0, #0x10 - ldr r2, [r4, r0] - add r0, r1, #0 - add r0, #0x10 - str r2, [r4, r0] - add r0, r1, #0 - sub r0, #0xc - ldr r2, [r4, r0] - add r0, r1, #0 - add r0, #0x14 - str r2, [r4, r0] - add r0, r1, #4 - ldrh r0, [r4, r0] - add r1, #0x18 - strh r0, [r4, r1] - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223EB6C -_0223EAEA: - ldr r0, _0223EBA0 ; =0x00001174 - ldr r3, _0223EBA4 ; =0x00000AEC - add r0, r4, r0 - add r1, r4, #0 - mov r2, #0xa - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223EB6C - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223EB6C -_0223EB06: - ldr r0, _0223EBA0 ; =0x00001174 - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223EBA8 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223EB6C - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223EB6C -_0223EB28: - ldr r0, _0223EBA0 ; =0x00001174 - ldr r3, _0223EBAC ; =0x00000B1C - add r0, r4, r0 - add r1, r4, #0 - mov r2, #0xb - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223EB6C - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223EB6C -_0223EB44: - ldr r0, _0223EBA0 ; =0x00001174 - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0223EBA8 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223EB6C - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _0223EB6C -_0223EB66: - add sp, #8 - mov r0, #1 - pop {r4, r5, r6, pc} -_0223EB6C: - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0223EB74: .word 0x02253084 -_0223EB78: .word 0x00000ACC -_0223EB7C: .word 0x0112A880 -_0223EB80: .word 0x02253086 -_0223EB84: .word 0x00000B04 -_0223EB88: .word 0x00001388 -_0223EB8C: .word 0x00000B08 -_0223EB90: .word 0x0225308A -_0223EB94: .word 0x0225308B -_0223EB98: .word 0x00000B14 -_0223EB9C: .word 0x02253089 -_0223EBA0: .word 0x00001174 -_0223EBA4: .word 0x00000AEC -_0223EBA8: .word 0x00000127 -_0223EBAC: .word 0x00000B1C - thumb_func_end ov17_0223E9A4 - - thumb_func_start ov17_0223EBB0 -ov17_0223EBB0: ; 0x0223EBB0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrh r0, [r1] - str r1, [sp] - cmp r0, #0 - bne _0223EC0E - mov r1, #0xaf - lsl r1, r1, #4 - ldrb r0, [r5, r1] - mov r4, #0 - add r2, r5, r0 - sub r0, r1, #4 - ldrb r0, [r2, r0] - add r1, #0x2c - strb r0, [r5, r1] - ldr r0, _0223EC18 ; =0x00000AF1 - add r1, r0, #0 - add r1, #0x2d -_0223EBD4: - add r3, r5, r4 - ldrb r2, [r3, r0] - add r4, r4, #1 - cmp r4, #4 - strb r2, [r3, r1] - blt _0223EBD4 - ldr r1, [r5, #0] - ldr r0, _0223EC1C ; =0x00000127 - ldrb r6, [r1, r0] - cmp r6, #4 - bge _0223EC02 - lsl r0, r6, #2 - mov r7, #0xb3 - add r4, r5, r0 - lsl r7, r7, #4 -_0223EBF2: - ldr r0, [r5, #0] - bl sub_02094E98 - str r0, [r4, r7] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0223EBF2 -_0223EC02: - ldr r0, [sp] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp] - strh r1, [r0] - b _0223EC12 -_0223EC0E: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223EC12: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223EC18: .word 0x00000AF1 -_0223EC1C: .word 0x00000127 - thumb_func_end ov17_0223EBB0 - - thumb_func_start ov17_0223EC20 -ov17_0223EC20: ; 0x0223EC20 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223EC68 ; =0x00001174 - bne _0223EC48 - ldr r3, _0223EC6C ; =0x00000B1C - add r0, r5, r0 - add r1, r5, #0 - mov r2, #7 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223EC64 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223EC64 -_0223EC48: - ldr r4, _0223EC70 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223EC64 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223EC64: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223EC68: .word 0x00001174 -_0223EC6C: .word 0x00000B1C -_0223EC70: .word 0x00000127 - thumb_func_end ov17_0223EC20 - - thumb_func_start ov17_0223EC74 -ov17_0223EC74: ; 0x0223EC74 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223ECBC ; =0x00001174 - bne _0223EC9C - ldr r3, _0223ECC0 ; =0x00000B1C - add r0, r5, r0 - add r1, r5, #0 - mov r2, #5 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223ECB8 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223ECB8 -_0223EC9C: - ldr r4, _0223ECC4 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223ECB8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223ECB8: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223ECBC: .word 0x00001174 -_0223ECC0: .word 0x00000B1C -_0223ECC4: .word 0x00000127 - thumb_func_end ov17_0223EC74 - - thumb_func_start ov17_0223ECC8 -ov17_0223ECC8: ; 0x0223ECC8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - ldr r0, _0223ED10 ; =0x00001174 - bne _0223ECF0 - ldr r3, _0223ED14 ; =0x00000B1C - add r0, r5, r0 - add r1, r5, #0 - mov r2, #8 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223ED0C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223ED0C -_0223ECF0: - ldr r4, _0223ED18 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223ED0C - mov r0, #1 - pop {r3, r4, r5, pc} -_0223ED0C: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223ED10: .word 0x00001174 -_0223ED14: .word 0x00000B1C -_0223ED18: .word 0x00000127 - thumb_func_end ov17_0223ECC8 - - thumb_func_start ov17_0223ED1C -ov17_0223ED1C: ; 0x0223ED1C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - bne _0223ED72 - mov r1, #0xaf - lsl r1, r1, #4 - ldrb r0, [r5, r1] - cmp r0, #3 - blo _0223ED36 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223ED36: - add r0, r1, #2 - ldrb r0, [r5, r0] - add r1, #0x5c - strb r0, [r5, r1] - mov r0, #0x12 - ldr r1, [r5, #0] - lsl r0, r0, #4 - ldrb r0, [r1, r0] - bl ov17_0224C57C - mov r3, #0xb5 - lsl r3, r3, #4 - strb r0, [r5, r3] - add r0, r3, #2 - mov r1, #0 - strb r1, [r5, r0] - ldr r0, _0223ED94 ; =0x00001174 - sub r3, #0x34 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #6 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223ED90 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223ED90 -_0223ED72: - ldr r4, _0223ED98 ; =0x00000127 - ldr r3, [r5, #0] - sub r2, r4, #4 - ldrb r1, [r3, r4] - ldr r0, _0223ED94 ; =0x00001174 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - add r0, r5, r0 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223ED90 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223ED90: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223ED94: .word 0x00001174 -_0223ED98: .word 0x00000127 - thumb_func_end ov17_0223ED1C - - thumb_func_start ov17_0223ED9C -ov17_0223ED9C: ; 0x0223ED9C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223EDB2 - cmp r0, #1 - beq _0223EDDC - cmp r0, #2 - beq _0223EDF8 - b _0223EE1A -_0223EDB2: - ldr r0, _0223EE40 ; =0x00000AF1 - ldr r1, _0223EE40 ; =0x00000AF1 - ldrb r7, [r3, r0] - mov r6, #0 - add r0, r0, #1 -_0223EDBC: - add r5, r3, r6 - ldrb r2, [r5, r0] - add r6, r6, #1 - cmp r6, #3 - strb r2, [r5, r1] - blt _0223EDBC - ldr r0, _0223EE44 ; =0x00000AF4 - strb r7, [r3, r0] - sub r1, r0, #4 - ldrb r1, [r3, r1] - sub r0, r0, #4 - add r1, r1, #1 - strb r1, [r3, r0] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_0223EDDC: - ldr r0, _0223EE48 ; =0x00001174 - ldr r5, _0223EE4C ; =0x00000AEC - add r0, r3, r0 - add r1, r3, #0 - mov r2, #0xa - add r3, r3, r5 - bl ov17_0224F30C - cmp r0, #1 - bne _0223EE3C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223EE3C -_0223EDF8: - ldr r0, _0223EE48 ; =0x00001174 - ldr r5, [r3, #0] - add r0, r3, r0 - ldr r3, _0223EE50 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r5, r3] - sub r3, #0xb - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223EE3C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223EE3C -_0223EE1A: - mov r1, #0xaf - lsl r1, r1, #4 - ldrb r0, [r3, r1] - cmp r0, #4 - bhs _0223EE38 - add r0, r1, #0 - add r0, #0x2d - ldrb r0, [r3, r0] - add r1, #0x2d - add r0, r0, #1 - strb r0, [r3, r1] - mov r0, #4 - strh r0, [r4, #2] - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_0223EE38: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223EE3C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223EE40: .word 0x00000AF1 -_0223EE44: .word 0x00000AF4 -_0223EE48: .word 0x00001174 -_0223EE4C: .word 0x00000AEC -_0223EE50: .word 0x00000127 - thumb_func_end ov17_0223ED9C - - thumb_func_start ov17_0223EE54 -ov17_0223EE54: ; 0x0223EE54 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223EE66 - cmp r0, #1 - beq _0223EE82 - b _0223EEA4 -_0223EE66: - ldr r0, _0223EEAC ; =0x00001174 - ldr r3, _0223EEB0 ; =0x00000B1C - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0xc - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0223EEA8 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223EEA8 -_0223EE82: - ldr r0, _0223EEAC ; =0x00001174 - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _0223EEB4 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223EEA8 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223EEA8 -_0223EEA4: - mov r0, #1 - pop {r3, r4, r5, pc} -_0223EEA8: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223EEAC: .word 0x00001174 -_0223EEB0: .word 0x00000B1C -_0223EEB4: .word 0x00000127 - thumb_func_end ov17_0223EE54 - - thumb_func_start ov17_0223EEB8 -ov17_0223EEB8: ; 0x0223EEB8 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp] - ldrh r0, [r1] - str r1, [sp, #4] - cmp r0, #0 - beq _0223EED2 - cmp r0, #1 - beq _0223EFC8 - cmp r0, #2 - bne _0223EED0 - b _0223EFEC -_0223EED0: - b _0223F014 -_0223EED2: - mov r1, #0 - mov r6, #0x4b - ldr r2, [sp] - ldr r5, _0223F020 ; =0x00000AF6 - add r3, r1, #0 - lsl r6, r6, #2 -_0223EEDE: - ldr r4, [sp] - ldrsh r0, [r2, r5] - ldr r4, [r4, #0] - add r1, r1, #1 - add r4, r4, r3 - strh r0, [r4, r6] - add r2, r2, #2 - add r3, #0xc - cmp r1, #4 - blt _0223EEDE - ldr r0, [sp] - mov r1, #0 - ldr r0, [r0, #0] - add r2, sp, #0x1c - bl ov17_02251930 - ldr r0, [sp] - mov r1, #1 - ldr r0, [r0, #0] - add r2, sp, #0x14 - bl ov17_02251930 - mov r6, #0 - add r2, sp, #0x14 - add r3, sp, #0x1c - add r4, sp, #0xc - add r5, sp, #8 - add r7, r6, #0 -_0223EF16: - mov r0, #0 - ldrsh r1, [r3, r0] - ldrsh r0, [r2, r7] - strb r6, [r5] - add r6, r6, #1 - add r0, r1, r0 - strh r0, [r4] - add r2, r2, #2 - add r3, r3, #2 - add r4, r4, #2 - add r5, r5, #1 - cmp r6, #4 - blt _0223EF16 - mov r6, #0 - sub r7, r6, #2 -_0223EF34: - mov r3, #3 - cmp r6, #3 - bge _0223EF66 - add r4, sp, #0x10 - add r5, sp, #8 - add r4, #2 - add r5, #3 -_0223EF42: - mov r0, #0 - ldrsh r0, [r4, r0] - ldrsh r1, [r4, r7] - cmp r1, r0 - bge _0223EF5C - strh r1, [r4] - sub r1, r4, #2 - strh r0, [r1] - sub r0, r5, #1 - ldrb r2, [r5] - ldrb r1, [r0] - strb r1, [r5] - strb r2, [r0] -_0223EF5C: - sub r3, r3, #1 - sub r4, r4, #2 - sub r5, r5, #1 - cmp r3, r6 - bgt _0223EF42 -_0223EF66: - add r6, r6, #1 - cmp r6, #3 - blt _0223EF34 - ldr r1, _0223F024 ; =0x00000172 - mov r4, #0 - add r3, sp, #8 -_0223EF72: - ldr r0, [sp] - ldrb r2, [r3] - ldr r0, [r0, #0] - add r3, r3, #1 - add r0, r0, r4 - add r4, r4, #1 - strb r2, [r0, r1] - cmp r4, #4 - blt _0223EF72 - ldr r2, _0223F028 ; =0x00000B53 - ldr r1, [sp] - mov r0, #0 - strb r0, [r1, r2] - add r3, r2, #1 - strb r0, [r1, r3] - ldr r1, [r1, #0] - ldr r4, _0223F024 ; =0x00000172 - sub r3, r2, #7 - ldrb r5, [r1, r4] - ldr r1, [sp] - sub r4, #0x51 - strb r5, [r1, r3] - ldr r1, [r1, #0] - ldrb r1, [r1, r4] - cmp r1, #0 - beq _0223EFAE - cmp r1, #1 - beq _0223EFAE - cmp r1, #2 - bne _0223EFB8 -_0223EFAE: - ldr r1, _0223F02C ; =0x00000B52 - ldr r0, [sp] - mov r2, #6 - strb r2, [r0, r1] - b _0223EFBE -_0223EFB8: - ldr r1, [sp] - sub r2, r2, #1 - strb r0, [r1, r2] -_0223EFBE: - ldr r0, [sp, #4] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp, #4] - strh r1, [r0] -_0223EFC8: - ldr r1, _0223F030 ; =0x00001174 - ldr r0, [sp] - ldr r4, _0223F034 ; =0x00000B1C - add r0, r0, r1 - ldr r1, [sp] - mov r2, #9 - add r3, r1, #0 - add r3, r3, r4 - bl ov17_0224F30C - cmp r0, #1 - bne _0223F01A - ldr r0, [sp, #4] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp, #4] - strh r1, [r0] - b _0223F01A -_0223EFEC: - ldr r0, [sp] - ldr r4, _0223F038 ; =0x00000127 - ldr r3, [r0, #0] - ldr r1, _0223F030 ; =0x00001174 - sub r2, r4, #4 - add r0, r0, r1 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223F01A - ldr r0, [sp, #4] - ldrh r0, [r0] - add r1, r0, #1 - ldr r0, [sp, #4] - strh r1, [r0] - b _0223F01A -_0223F014: - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223F01A: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F020: .word 0x00000AF6 -_0223F024: .word 0x00000172 -_0223F028: .word 0x00000B53 -_0223F02C: .word 0x00000B52 -_0223F030: .word 0x00001174 -_0223F034: .word 0x00000B1C -_0223F038: .word 0x00000127 - thumb_func_end ov17_0223EEB8 - - thumb_func_start ov17_0223F03C -ov17_0223F03C: ; 0x0223F03C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0223F04E - cmp r0, #1 - beq _0223F052 - b _0223F082 -_0223F04E: - add r0, r0, #1 - strh r0, [r4] -_0223F052: - ldr r3, _0223F0B0 ; =0x00000172 - mov r0, #0 - add r1, sp, #0 -_0223F058: - ldr r5, [r2, #0] - add r5, r5, r0 - ldrb r5, [r5, r3] - add r0, r0, #1 - strb r5, [r1] - add r1, r1, #1 - cmp r0, #4 - blt _0223F058 - ldr r0, _0223F0B4 ; =0x00001174 - add r1, r2, #0 - add r0, r2, r0 - mov r2, #4 - add r3, sp, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _0223F0AA - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0223F0AA -_0223F082: - ldr r4, _0223F0B8 ; =0x00000127 - ldr r0, _0223F0B4 ; =0x00001174 - add r1, r4, #0 - ldr r3, [r2, #0] - add r1, #0x50 - add r0, r2, r0 - ldrb r2, [r3, r4] - ldrb r1, [r3, r1] - sub r1, r2, r1 - sub r2, r4, #4 - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - sub r1, r1, #1 - bl ov17_0224F4B8 - cmp r0, #1 - bne _0223F0AA - mov r0, #3 - pop {r3, r4, r5, pc} -_0223F0AA: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223F0B0: .word 0x00000172 -_0223F0B4: .word 0x00001174 -_0223F0B8: .word 0x00000127 - thumb_func_end ov17_0223F03C - - thumb_func_start ov17_0223F0BC -ov17_0223F0BC: ; 0x0223F0BC - push {r3, lr} - cmp r1, #4 - bhi _0223F104 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223F0CE: ; jump table - .short _0223F0FC - _0223F0CE - 2 ; case 0 - .short _0223F0EA - _0223F0CE - 2 ; case 1 - .short _0223F0E2 - _0223F0CE - 2 ; case 2 - .short _0223F0D8 - _0223F0CE - 2 ; case 3 - .short _0223F0F2 - _0223F0CE - 2 ; case 4 -_0223F0D8: - lsl r1, r0, #2 - ldr r0, _0223F10C ; =0x02252FC7 - ldrb r0, [r0, r1] - lsl r0, r0, #3 - pop {r3, pc} -_0223F0E2: - lsl r1, r0, #2 - ldr r0, _0223F10C ; =0x02252FC7 - ldrb r0, [r0, r1] - pop {r3, pc} -_0223F0EA: - lsl r1, r0, #2 - ldr r0, _0223F110 ; =0x02252FC6 - ldrb r0, [r0, r1] - pop {r3, pc} -_0223F0F2: - lsl r1, r0, #2 - ldr r0, _0223F110 ; =0x02252FC6 - ldrb r0, [r0, r1] - lsl r0, r0, #1 - pop {r3, pc} -_0223F0FC: - lsl r1, r0, #2 - ldr r0, _0223F114 ; =0x02252FC4 - ldrh r0, [r0, r1] - pop {r3, pc} -_0223F104: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_0223F10C: .word 0x02252FC7 -_0223F110: .word 0x02252FC6 -_0223F114: .word 0x02252FC4 - thumb_func_end ov17_0223F0BC - - thumb_func_start ov17_0223F118 -ov17_0223F118: ; 0x0223F118 - push {r3, lr} - ldr r0, _0223F134 ; =0x0000000B - mov r1, #2 - bl sub_02006590 - ldr r0, _0223F138 ; =0x0000000C - mov r1, #2 - bl sub_02006590 - ldr r0, _0223F13C ; =0x00000016 - mov r1, #2 - bl sub_02006590 - pop {r3, pc} - ; .align 2, 0 -_0223F134: .word 0x0000000B -_0223F138: .word 0x0000000C -_0223F13C: .word 0x00000016 - thumb_func_end ov17_0223F118 - - thumb_func_start ov17_0223F140 -ov17_0223F140: ; 0x0223F140 - push {r3, lr} - sub sp, #8 - mov r2, #2 - ldr r1, _0223F158 ; =ov17_0223F15C - str r2, [sp] - str r1, [sp, #4] - mov r1, #0 - add r3, r1, #0 - bl sub_02024220 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 -_0223F158: .word ov17_0223F15C - thumb_func_end ov17_0223F140 - - thumb_func_start ov17_0223F15C -ov17_0223F15C: ; 0x0223F15C - push {r3, lr} - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _0223F1C8 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r2, [r0] - ldr r1, _0223F1CC ; =0xFFFFCFFD - and r2, r1 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0223F1D0 ; =0x0000CFFB - and r3, r2 - strh r3, [r0] - ldrh r3, [r0] - sub r2, #0x1c - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r0, #0 - ldr r2, _0223F1D4 ; =0x00007FFF - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _0223F1D8 ; =0xBFFF0000 - ldr r0, _0223F1DC ; =0x04000580 - str r1, [r0, #0] - pop {r3, pc} - ; .align 2, 0 -_0223F1C8: .word 0x04000008 -_0223F1CC: .word 0xFFFFCFFD -_0223F1D0: .word 0x0000CFFB -_0223F1D4: .word 0x00007FFF -_0223F1D8: .word 0xBFFF0000 -_0223F1DC: .word 0x04000580 - thumb_func_end ov17_0223F15C - - thumb_func_start ov17_0223F1E0 -ov17_0223F1E0: ; 0x0223F1E0 - ldr r3, _0223F1E4 ; =sub_020242C4 - bx r3 - ; .align 2, 0 -_0223F1E4: .word sub_020242C4 - thumb_func_end ov17_0223F1E0 - - thumb_func_start ov17_0223F1E8 -ov17_0223F1E8: ; 0x0223F1E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - str r0, [sp, #0x18] - str r1, [sp, #0x1c] - str r2, [sp, #0x20] - ldr r0, [sp, #0x90] - ldr r1, [sp, #0x8c] - mov r2, #0 - str r3, [sp, #0x24] - ldr r5, [sp, #0x88] - ldr r4, [sp, #0xa0] - bl sub_02002D7C - add r7, r0, #0 - asr r1, r7, #2 - lsr r1, r1, #0x1d - add r1, r7, r1 - asr r6, r1, #3 - mov r1, #8 - bl sub_020BD140 - cmp r0, #0 - beq _0223F218 - add r6, r6, #1 -_0223F218: - add r0, sp, #0x34 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - lsl r2, r6, #0x18 - ldr r0, [sp, #0x1c] - add r1, sp, #0x34 - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x94] - ldr r1, [sp, #0x90] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r2, [sp, #0x8c] - add r0, sp, #0x34 - str r3, [sp, #0x14] - bl sub_0201D7E0 - ldr r2, [sp, #0x18] - add r0, sp, #0x34 - mov r1, #1 - bl sub_02012898 - mov r1, #1 - add r2, r1, #0 - add r3, sp, #0x28 - bl sub_0201ED94 - ldr r0, [sp, #0xa8] - cmp r0, #1 - bne _0223F270 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r0, r0, #1 - sub r4, r4, r0 -_0223F270: - ldr r0, [sp, #0x24] - str r0, [sp, #0x44] - add r0, sp, #0x34 - str r0, [sp, #0x48] - ldr r0, [sp, #0x20] - bl sub_0200D9B0 - str r0, [sp, #0x4c] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x9c] - bl sub_0200D04C - str r0, [sp, #0x50] - mov r0, #0 - str r0, [sp, #0x54] - ldr r0, [sp, #0x2c] - str r4, [sp, #0x5c] - str r0, [sp, #0x58] - ldr r0, [sp, #0xa4] - sub r0, #8 - str r0, [sp, #0x60] - ldr r0, [sp, #0xac] - str r0, [sp, #0x64] - ldr r0, [sp, #0xb0] - str r0, [sp, #0x68] - mov r0, #1 - str r0, [sp, #0x6c] - ldr r0, [sp, #0x18] - str r0, [sp, #0x70] - add r0, sp, #0x44 - bl sub_020127E8 - ldr r1, [sp, #0x98] - add r6, r0, #0 - cmp r1, #0 - beq _0223F2BC - bl sub_02012A90 -_0223F2BC: - ldr r2, [sp, #0xa4] - add r0, r6, #0 - add r1, r4, #0 - sub r2, #8 - bl sub_020128C4 - add r0, sp, #0x34 - bl sub_0201A8FC - str r6, [r5, #0] - add r3, sp, #0x28 - ldmia r3!, {r0, r1} - add r2, r5, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - strh r7, [r5, #0x10] - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0223F1E8 - - thumb_func_start ov17_0223F2E4 -ov17_0223F2E4: ; 0x0223F2E4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02012870 - add r0, r4, #4 - bl sub_0201EE28 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0223F2E4 - - thumb_func_start ov17_0223F2F8 -ov17_0223F2F8: ; 0x0223F2F8 - cmp r3, #1 - bne _0223F302 - ldrh r3, [r0, #0x10] - lsr r3, r3, #1 - sub r1, r1, r3 -_0223F302: - ldr r3, _0223F30C ; =sub_020128C4 - ldr r0, [r0, #0] - sub r2, #8 - bx r3 - nop -_0223F30C: .word sub_020128C4 - thumb_func_end ov17_0223F2F8 - - thumb_func_start ov17_0223F310 -ov17_0223F310: ; 0x0223F310 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r3, r1, #0 - mov r0, #1 - mov r1, #0x1a - mov r2, #0xcf - bl sub_0200B144 - add r5, r0, #0 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - bl sub_0200B190 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0223F310 - - thumb_func_start ov17_0223F334 -ov17_0223F334: ; 0x0223F334 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, r1, #0 - ldr r1, _0223F36C ; =0x00000122 - ldrb r1, [r5, r1] - bl ov17_02252A9C - add r7, r0, #0 - mov r6, #0 - add r4, r5, #0 -_0223F348: - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r1, r7, #0 - bl ov17_02252A70 - ldr r1, _0223F370 ; =0x0000012A - add r6, r6, #1 - strh r0, [r4, r1] - add r5, r5, #4 - add r4, #0xc - cmp r6, #4 - blt _0223F348 - add r0, r7, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F36C: .word 0x00000122 -_0223F370: .word 0x0000012A - thumb_func_end ov17_0223F334 - - thumb_func_start ov17_0223F374 -ov17_0223F374: ; 0x0223F374 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - ldr r4, [sp] - mov r0, #0 - str r0, [sp, #0x10] - add r0, r4, #0 - str r0, [sp, #4] -_0223F384: - ldr r0, [r4, #0] - mov r1, #6 - mov r2, #0 - bl sub_02074470 - mov r6, #0x64 - add r5, r0, #0 - add r0, r6, #0 - ldr r1, [sp] - add r0, #0xbb - ldrb r0, [r1, r0] - cmp r0, #4 - bls _0223F3A0 - b _0223F512 -_0223F3A0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223F3AC: ; jump table - .short _0223F3B6 - _0223F3AC - 2 ; case 0 - .short _0223F3FC - _0223F3AC - 2 ; case 1 - .short _0223F442 - _0223F3AC - 2 ; case 2 - .short _0223F488 - _0223F3AC - 2 ; case 3 - .short _0223F4CE - _0223F3AC - 2 ; case 4 -_0223F3B6: - ldr r0, [r4, #0] - mov r1, #0x13 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0x17 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0x14 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r6, #0 - add r0, #0xa0 - cmp r5, r0 - beq _0223F3F4 - add r0, r6, #0 - add r0, #0xa1 - cmp r5, r0 - beq _0223F3F8 - add r0, r6, #0 - add r0, #0xa4 - cmp r5, r0 - beq _0223F3F8 - b _0223F51A -_0223F3F4: - mov r6, #0x6e - b _0223F51A -_0223F3F8: - mov r6, #0x69 - b _0223F51A -_0223F3FC: - ldr r0, [r4, #0] - mov r1, #0x14 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0x13 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0x15 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r6, #0 - add r0, #0xa0 - cmp r5, r0 - beq _0223F43E - add r0, r6, #0 - add r0, #0xa1 - cmp r5, r0 - beq _0223F43A - add r0, r6, #0 - add r0, #0xa2 - cmp r5, r0 - beq _0223F43E - b _0223F51A -_0223F43A: - mov r6, #0x6e - b _0223F51A -_0223F43E: - mov r6, #0x69 - b _0223F51A -_0223F442: - ldr r0, [r4, #0] - mov r1, #0x15 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0x14 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0x16 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r6, #0 - add r0, #0xa1 - cmp r5, r0 - beq _0223F484 - add r0, r6, #0 - add r0, #0xa2 - cmp r5, r0 - beq _0223F480 - add r0, r6, #0 - add r0, #0xa3 - cmp r5, r0 - beq _0223F484 - b _0223F51A -_0223F480: - mov r6, #0x6e - b _0223F51A -_0223F484: - mov r6, #0x69 - b _0223F51A -_0223F488: - ldr r0, [r4, #0] - mov r1, #0x16 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0x15 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0x17 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r6, #0 - add r0, #0xa2 - cmp r5, r0 - beq _0223F4CA - add r0, r6, #0 - add r0, #0xa3 - cmp r5, r0 - beq _0223F4C6 - add r0, r6, #0 - add r0, #0xa4 - cmp r5, r0 - beq _0223F4CA - b _0223F51A -_0223F4C6: - mov r6, #0x6e - b _0223F51A -_0223F4CA: - mov r6, #0x69 - b _0223F51A -_0223F4CE: - ldr r0, [r4, #0] - mov r1, #0x17 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0x16 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0x13 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r6, #0 - add r0, #0xa0 - cmp r5, r0 - beq _0223F50E - add r0, r6, #0 - add r0, #0xa3 - cmp r5, r0 - beq _0223F50E - add r0, r6, #0 - add r0, #0xa4 - cmp r5, r0 - bne _0223F51A - mov r6, #0x6e - b _0223F51A -_0223F50E: - mov r6, #0x69 - b _0223F51A -_0223F512: - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_0223F51A: - ldr r0, [r4, #0] - mov r1, #0x18 - mov r2, #0 - bl sub_02074470 - ldr r1, [sp, #8] - add r1, r1, r7 - add r1, r0, r1 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - ldr r0, [sp, #0xc] - add r1, r0, r1 - add r0, r1, #0 - mul r0, r6 - mov r1, #0x64 - bl sub_020E1F6C - mov r1, #0x4a - ldr r2, [sp, #4] - lsl r1, r1, #2 - strh r0, [r2, r1] - add r0, r2, #0 - add r0, #0xc - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #4 - bge _0223F55A - b _0223F384 -_0223F55A: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0223F374 - - thumb_func_start ov17_0223F560 -ov17_0223F560: ; 0x0223F560 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r6, r2, #0 - mov r2, #0 - mvn r2, r2 - add r5, r0, #0 - add r4, r1, #0 - cmp r3, r2 - beq _0223F582 - mov r2, #1 - str r2, [sp] - str r2, [sp, #4] - str r3, [sp, #8] - mov r2, #0x2e - mov r3, #0x49 - bl sub_0200CBDC -_0223F582: - mov r1, #0 - ldr r0, [sp, #0x28] - mvn r1, r1 - cmp r0, r1 - beq _0223F5AC - mov r1, #0x2e - str r1, [sp] - mov r1, #7 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #1 - str r1, [sp, #0xc] - str r1, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r6, #0 - mov r1, #2 - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200CD7C -_0223F5AC: - mov r0, #0 - ldr r1, [sp, #0x2c] - mvn r0, r0 - cmp r1, r0 - beq _0223F5C8 - mov r0, #1 - str r0, [sp] - str r1, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x2e - mov r3, #0x4a - bl sub_0200CE0C -_0223F5C8: - mov r0, #0 - ldr r1, [sp, #0x30] - mvn r0, r0 - cmp r1, r0 - beq _0223F5E4 - mov r0, #1 - str r0, [sp] - str r1, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x2e - mov r3, #0x4b - bl sub_0200CE3C -_0223F5E4: - add sp, #0x18 - pop {r4, r5, r6, pc} - thumb_func_end ov17_0223F560 - - thumb_func_start ov17_0223F5E8 -ov17_0223F5E8: ; 0x0223F5E8 - push {r4, r5, r6, lr} - add r4, r2, #0 - mov r2, #0 - mvn r2, r2 - add r5, r0, #0 - add r6, r3, #0 - cmp r1, r2 - beq _0223F5FC - bl sub_0200D070 -_0223F5FC: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _0223F60C - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D080 -_0223F60C: - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _0223F61C - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200D090 -_0223F61C: - mov r0, #0 - ldr r1, [sp, #0x10] - mvn r0, r0 - cmp r1, r0 - beq _0223F62C - add r0, r5, #0 - bl sub_0200D0A0 -_0223F62C: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_0223F5E8 - - thumb_func_start ov17_0223F630 -ov17_0223F630: ; 0x0223F630 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - ldr r5, _0223F6B8 ; =0x022531FC - str r2, [sp, #4] - str r0, [sp] - add r7, r1, #0 - add r4, sp, #8 - mov r2, #6 -_0223F640: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r2, r2, #1 - bne _0223F640 - ldr r0, [r5, #0] - ldr r5, _0223F6BC ; =0x022531CC - str r0, [r4, #0] - ldr r0, [sp, #0x50] - ldr r4, [sp] - str r0, [sp, #0x20] - ldr r0, [sp, #0x54] - str r3, [sp, #0x1c] - str r0, [sp, #0x24] - ldr r0, [sp, #0x58] - mov r6, #0 - str r0, [sp, #0x28] - ldr r0, [sp, #0x5c] - str r0, [sp, #0x14] - ldr r0, [sp, #0x60] - str r0, [sp, #0x10] - ldr r0, [sp, #0x64] - str r0, [sp, #0x34] -_0223F66C: - ldr r1, [sp, #4] - add r0, r7, #0 - add r2, sp, #8 - bl sub_0200CE6C - str r0, [r4, #0] - mov r1, #0 - mov r2, #2 - ldrsh r1, [r5, r1] - ldrsh r2, [r5, r2] - bl sub_0200D4C4 - ldrb r1, [r5, #6] - ldr r0, [r4, #0] - bl sub_0200D364 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200D6A4 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - add r6, r6, #1 - add r4, r4, #4 - add r5, #8 - cmp r6, #6 - blt _0223F66C - ldr r0, _0223F6C0 ; =ov17_0223F6E8 - ldr r1, [sp] - ldr r2, [sp, #0x68] - bl sub_0200D9E8 - ldr r1, [sp] - str r0, [r1, #0x18] - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F6B8: .word 0x022531FC -_0223F6BC: .word 0x022531CC -_0223F6C0: .word ov17_0223F6E8 - thumb_func_end ov17_0223F630 - - thumb_func_start ov17_0223F6C4 -ov17_0223F6C4: ; 0x0223F6C4 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_0223F6CC: - ldr r0, [r5, #0] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _0223F6CC - ldr r0, [r6, #0x18] - bl sub_0200DA58 - mov r0, #0 - str r0, [r6, #0x18] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_0223F6C4 - - thumb_func_start ov17_0223F6E8 -ov17_0223F6E8: ; 0x0223F6E8 - push {r3, r4, r5, r6, r7, lr} - ldr r4, _0223F708 ; =0x022531CC - add r5, r1, #0 - mov r6, #0 - mov r7, #4 -_0223F6F2: - ldrsh r1, [r4, r7] - ldr r0, [r5, #0] - bl sub_0200D7C0 - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #6 - blt _0223F6F2 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F708: .word 0x022531CC - thumb_func_end ov17_0223F6E8 - - thumb_func_start ov17_0223F70C -ov17_0223F70C: ; 0x0223F70C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #0x14 - add r6, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r5, [r4, #4] - str r6, [r4, #0xc] - ldr r0, [sp, #0x18] - strb r7, [r4, #0x10] - strb r0, [r4, #0x12] - ldr r0, _0223F740 ; =ov17_0223F774 - ldr r2, [sp, #0x1c] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F740: .word ov17_0223F774 - thumb_func_end ov17_0223F70C - - thumb_func_start ov17_0223F744 -ov17_0223F744: ; 0x0223F744 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0223F752 - bl sub_02022974 -_0223F752: - ldr r0, [r4, #0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov17_0223F744 - - thumb_func_start ov17_0223F760 -ov17_0223F760: ; 0x0223F760 - push {r3, lr} - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _0223F770 - mov r0, #1 - pop {r3, pc} -_0223F770: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov17_0223F760 - - thumb_func_start ov17_0223F774 -ov17_0223F774: ; 0x0223F774 - push {r3, r4, lr} - sub sp, #4 - mov r0, #1 - add r4, r1, #0 - bl sub_0200AC1C - cmp r0, #0 - beq _0223F7DA - ldr r0, [r4, #8] - add r2, r0, #1 - str r2, [r4, #8] - ldrb r0, [r4, #0x11] - ldr r1, [r4, #0xc] - lsl r0, r0, #1 - ldrh r0, [r1, r0] - cmp r2, r0 - ble _0223F7DA - mov r0, #1 - str r0, [sp] - mov r0, #6 - mov r1, #0 - mov r2, #4 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, _0223F7E0 ; =0x000005F8 - bl sub_02005748 - mov r0, #0 - str r0, [r4, #8] - ldrb r0, [r4, #0x11] - add r0, r0, #1 - strb r0, [r4, #0x11] - ldrb r1, [r4, #0x11] - ldrb r0, [r4, #0x10] - cmp r1, r0 - blo _0223F7DA - ldrb r0, [r4, #0x12] - cmp r0, #0 - bne _0223F7CE - add r0, r4, #0 - bl ov17_0223F744 - add sp, #4 - pop {r3, r4, pc} -_0223F7CE: - cmp r0, #0xff - beq _0223F7D6 - sub r0, r0, #1 - strb r0, [r4, #0x12] -_0223F7D6: - mov r0, #0 - strb r0, [r4, #0x11] -_0223F7DA: - add sp, #4 - pop {r3, r4, pc} - nop -_0223F7E0: .word 0x000005F8 - thumb_func_end ov17_0223F774 - - thumb_func_start ov17_0223F7E4 -ov17_0223F7E4: ; 0x0223F7E4 - push {r4, lr} - mov r1, #0x32 - mov r0, #0x15 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x32 - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r1, #0 - mov r0, #0x2e - mvn r1, r1 - lsl r0, r0, #4 - strb r1, [r4, r0] - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0223F7E4 - - thumb_func_start ov17_0223F80C -ov17_0223F80C: ; 0x0223F80C - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r6, _0223F860 ; =0x02253448 - add r5, r0, #0 - add r7, r4, #0 -_0223F816: - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r2, r6, #0 - add r3, r7, #0 - bl sub_020183C4 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl sub_02019EE0 - add r1, r4, #4 - lsl r1, r1, #0x18 - mov r2, #0 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02019184 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r4, r4, #1 - add r6, #0x1c - cmp r4, #4 - blo _0223F816 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F860: .word 0x02253448 - thumb_func_end ov17_0223F80C - - thumb_func_start ov17_0223F864 -ov17_0223F864: ; 0x0223F864 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_0223F86C: - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r6, #0 - bl sub_02019120 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - cmp r4, #4 - blo _0223F86C - pop {r4, r5, r6, pc} - thumb_func_end ov17_0223F864 - - thumb_func_start ov17_0223F88C -ov17_0223F88C: ; 0x0223F88C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - bl ov17_0223F7E4 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - mov r0, #0xc - mov r1, #0x15 - bl sub_02012744 - str r0, [r4, #0x3c] - mov r0, #0x2d - mov r1, #0x15 - bl sub_02006C24 - mov r7, #2 - str r0, [sp, #0xc] - mov r5, #0 - lsl r7, r7, #0xa - b _0223F8FA -_0223F8BE: - mov r0, #0x15 - add r1, r7, #0 - bl sub_02018144 - lsl r1, r5, #2 - add r1, r4, r1 - str r0, [r1, #0x20] - mov r0, #0x15 - str r0, [sp] - ldr r1, _0223F958 ; =0x02253250 - lsl r2, r5, #1 - ldrh r1, [r1, r2] - ldr r0, [sp, #0xc] - mov r2, #1 - add r3, sp, #0x10 - bl sub_020071D0 - add r6, r0, #0 - lsl r0, r5, #2 - add r0, r4, r0 - ldr r1, [r0, #0x20] - ldr r0, [sp, #0x10] - add r2, r7, #0 - add r0, #0xc - bl sub_020C4B68 - add r0, r6, #0 - bl sub_020181C4 - add r5, r5, #1 -_0223F8FA: - cmp r5, #5 - blt _0223F8BE - ldr r0, [r4, #4] - mov r7, #2 - ldr r6, [r0, #0x50] - mov r5, #0 - lsl r7, r7, #8 - b _0223F948 -_0223F90A: - mov r0, #0x15 - add r1, r7, #0 - bl sub_02018144 - lsl r1, r5, #2 - add r1, r4, r1 - str r0, [r1, #0x34] - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r2, _0223F95C ; =0x02253238 - lsl r3, r5, #1 - ldrh r2, [r2, r3] - add r0, r6, #0 - mov r1, #0x2d - mov r3, #0x15 - bl sub_02003050 - add r0, r6, #0 - mov r1, #1 - bl sub_02003164 - lsl r1, r5, #2 - add r1, r4, r1 - ldr r1, [r1, #0x34] - add r2, r7, #0 - bl sub_020C4B18 - add r5, r5, #1 -_0223F948: - cmp r5, #2 - blt _0223F90A - ldr r0, [sp, #0xc] - bl sub_02006CA8 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F958: .word 0x02253250 -_0223F95C: .word 0x02253238 - thumb_func_end ov17_0223F88C - - thumb_func_start ov17_0223F960 -ov17_0223F960: ; 0x0223F960 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - bl ov17_022404B0 - ldr r0, [r6, #0x3c] - bl sub_020127BC - ldr r3, _0223F9C0 ; =0x000080F8 - str r3, [sp] - ldr r0, [r6, #4] - add r1, r3, #5 - ldr r0, [r0, #0x1c] - sub r2, r3, #7 - bl ov17_02252B20 - mov r0, #0xc5 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl ov17_02252BCC - mov r4, #0 - add r5, r6, #0 -_0223F98E: - ldr r0, [r5, #0x20] - bl sub_020181C4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _0223F98E - mov r5, #0 - add r4, r6, #0 -_0223F9A0: - ldr r0, [r4, #0x34] - bl sub_020181C4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #2 - blt _0223F9A0 - add r0, r6, #0 - bl ov17_022409F4 - add r0, r6, #0 - bl sub_020181C4 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0223F9C0: .word 0x000080F8 - thumb_func_end ov17_0223F960 - - thumb_func_start ov17_0223F9C4 -ov17_0223F9C4: ; 0x0223F9C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - str r3, [r7, #0xc] - ldr r0, [r7, #4] - str r2, [sp, #8] - ldr r0, [r0, #0x24] - str r1, [sp, #4] - str r0, [sp, #0xc] - mov r0, #0x2e - lsl r0, r0, #4 - ldrsb r2, [r7, r0] - mov r0, #0 - mvn r0, r0 - cmp r2, r0 - bne _0223F9EE - mov r0, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0x10] - b _0223F9F8 -_0223F9EE: - mov r0, #0x30 - ldr r1, _0223FAE8 ; =0x02253558 - mul r0, r2 - add r0, r1, r0 - str r0, [sp, #0x10] -_0223F9F8: - ldr r0, [sp, #4] - mov r1, #0x30 - ldr r2, _0223FAE8 ; =0x02253558 - mul r1, r0 - add r0, r2, r1 - str r0, [sp, #0x14] - mov r4, #0 - add r5, r0, #0 -_0223FA08: - ldrh r1, [r5, #0xc] - add r0, r4, #4 - lsl r0, r0, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _0223FA08 - mov r0, #2 - lsl r0, r0, #8 - str r0, [sp] - ldr r1, [sp, #0x14] - ldr r0, [r7, #4] - ldrh r1, [r1, #2] - ldr r0, [r0, #0x50] - mov r2, #1 - lsl r1, r1, #2 - add r1, r7, r1 - ldr r1, [r1, #0x34] - mov r3, #0 - bl sub_02002FBC - ldr r6, [sp, #0x14] - ldr r4, [sp, #0x10] - mov r5, #0 -_0223FA42: - ldrh r2, [r6, #4] - ldr r0, _0223FAEC ; =0x0000FFFF - cmp r2, r0 - beq _0223FA78 - ldr r0, [sp, #8] - cmp r0, #1 - beq _0223FA56 - ldrh r0, [r4, #4] - cmp r2, r0 - beq _0223FA78 -_0223FA56: - lsl r2, r2, #2 - add r1, r5, #4 - add r2, r7, r2 - lsl r1, r1, #0x18 - mov r3, #2 - ldr r0, [sp, #0xc] - ldr r2, [r2, #0x20] - lsr r1, r1, #0x18 - lsl r3, r3, #0xa - bl sub_02019574 - add r1, r5, #4 - lsl r1, r1, #0x18 - ldr r0, [sp, #0xc] - lsr r1, r1, #0x18 - bl sub_0201C3C0 -_0223FA78: - add r5, r5, #1 - add r6, r6, #2 - add r4, r4, #2 - cmp r5, #4 - blt _0223FA42 - mov r1, #0x2e - ldr r0, [sp, #4] - lsl r1, r1, #4 - strb r0, [r7, r1] - add r0, r7, #0 - bl ov17_022404B0 - ldr r0, [sp, #0x14] - ldr r3, [r0, #0x28] - cmp r3, #0 - beq _0223FAA0 - ldr r1, [sp, #4] - ldr r2, [sp, #8] - add r0, r7, #0 - blx r3 -_0223FAA0: - ldr r0, [sp, #0x14] - ldrh r1, [r0] - ldr r0, _0223FAEC ; =0x0000FFFF - cmp r1, r0 - beq _0223FADA - ldr r0, [sp, #8] - cmp r0, #1 - beq _0223FAB8 - ldr r0, [sp, #0x10] - ldrh r0, [r0] - cmp r1, r0 - beq _0223FADA -_0223FAB8: - mov r3, #0xb7 - mov r0, #0x15 - lsl r3, r3, #2 - str r0, [sp] - mov r0, #0x2d - mov r2, #1 - add r3, r7, r3 - bl sub_02006F50 - mov r1, #0xb6 - lsl r1, r1, #2 - str r0, [r7, r1] - ldr r0, _0223FAF0 ; =ov17_022411E4 - add r1, r7, #0 - mov r2, #0xa - bl sub_0200DA3C -_0223FADA: - ldr r0, _0223FAF4 ; =ov17_02241220 - add r1, r7, #0 - mov r2, #0xa - bl sub_0200DA3C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FAE8: .word 0x02253558 -_0223FAEC: .word 0x0000FFFF -_0223FAF0: .word ov17_022411E4 -_0223FAF4: .word ov17_02241220 - thumb_func_end ov17_0223F9C4 - - thumb_func_start ov17_0223FAF8 -ov17_0223FAF8: ; 0x0223FAF8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x2e - lsl r0, r0, #4 - ldrsb r1, [r5, r0] - mov r6, #0 - sub r0, r6, #1 - cmp r1, r0 - bne _0223FB0E - bl sub_02022974 -_0223FB0E: - mov r0, #0x2e - lsl r0, r0, #4 - ldrsb r1, [r5, r0] - ldr r3, _0223FBBC ; =0x02253558 - mov r0, #0x30 - add r2, r1, #0 - mul r2, r0 - add r4, r3, r2 - ldr r1, [r4, #0x14] - cmp r1, #0 - bne _0223FB28 - sub r0, #0x31 - pop {r3, r4, r5, r6, r7, pc} -_0223FB28: - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _0223FB32 - bl sub_02022974 -_0223FB32: - ldr r0, [r4, #0x14] - bl sub_02022664 - add r7, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r7, r0 - bne _0223FB4C - add r0, r5, #0 - bl ov17_02240C90 - add r7, r0, #0 - add r6, r6, #1 -_0223FB4C: - mov r0, #0 - mvn r0, r0 - str r0, [sp] - cmp r7, r0 - bne _0223FB5A - mov r2, #0xff - b _0223FB66 -_0223FB5A: - ldr r1, [r4, #0x18] - lsl r0, r7, #2 - ldr r0, [r1, r0] - str r0, [sp] - ldr r0, [r4, #0x1c] - ldrb r2, [r0, r7] -_0223FB66: - ldr r3, [r4, #0x2c] - cmp r3, #0 - beq _0223FBB6 - ldr r1, [sp] - add r0, r5, #0 - blx r3 - mov r1, #0 - mvn r1, r1 - str r0, [sp] - cmp r0, r1 - beq _0223FBB6 - ldr r2, [r4, #0x24] - cmp r2, #0 - beq _0223FB88 - add r0, r5, #0 - add r1, r7, #0 - blx r2 -_0223FB88: - mov r0, #0xc6 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - mov r2, #4 - bl sub_020C4CF4 - mov r0, #0xc5 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov17_02252C9C - cmp r6, #0 - ble _0223FBAE - mov r0, #0xc7 - mov r1, #1 - lsl r0, r0, #2 - strb r1, [r5, r0] - b _0223FBB6 -_0223FBAE: - mov r0, #0xc7 - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r5, r0] -_0223FBB6: - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FBBC: .word 0x02253558 - thumb_func_end ov17_0223FAF8 - - thumb_func_start ov17_0223FBC0 -ov17_0223FBC0: ; 0x0223FBC0 - ldr r1, [r0, #0x10] - cmp r1, #0 - bne _0223FBD0 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _0223FBD0 - mov r0, #1 - bx lr -_0223FBD0: - mov r0, #0 - bx lr - thumb_func_end ov17_0223FBC0 - - thumb_func_start ov17_0223FBD4 -ov17_0223FBD4: ; 0x0223FBD4 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #4] - mov r2, #0x12 - lsl r2, r2, #4 - ldr r3, [r0, #0] - add r1, r2, #1 - ldrb r0, [r3, r2] - ldrb r1, [r3, r1] - ldr r3, [r5, #0] - add r2, #0x51 - ldrb r2, [r3, r2] - bl sub_02095848 - add r4, r0, #0 - ldr r0, [r5, #4] - ldr r1, _0223FCA0 ; =0x0000011F - ldr r2, [r0, #0] - ldrb r0, [r2, r1] - add r1, r1, #2 - ldrb r1, [r2, r1] - bl sub_020958C4 - add r6, r0, #0 - ldr r0, [r5, #4] - add r1, r4, #0 - ldr r0, [r0, #0x38] - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [r5, #4] - add r1, r6, #0 - ldr r0, [r0, #0x38] - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, _0223FCA4 ; =0x00010200 - add r1, r5, #0 - str r0, [sp] - mov r3, #0 - ldr r0, _0223FCA8 ; =0x000080F0 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x7f - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, #0x40 - add r2, r4, #0 - str r3, [sp, #0x18] - bl ov17_02240138 - ldr r0, _0223FCA4 ; =0x00010200 - add r1, r5, #0 - str r0, [sp] - mov r3, #0 - ldr r0, _0223FCA8 ; =0x000080F0 - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x9f - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, #0x54 - add r2, r6, #0 - str r3, [sp, #0x18] - bl ov17_02240138 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - ldr r2, [r5, #4] - mov r0, #1 - str r0, [sp] - mov r1, #0x20 - str r1, [sp, #4] - str r1, [sp, #8] - ldr r0, [r2, #0] - add r1, #0xff - ldrb r0, [r0, r1] - mov r1, #0x2d - mov r3, #0x15 - lsl r0, r0, #0x14 - lsr r0, r0, #0x10 - str r0, [sp, #0xc] - ldr r0, [r2, #0x50] - mov r2, #0x26 - bl sub_02002FEC - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - nop -_0223FCA0: .word 0x0000011F -_0223FCA4: .word 0x00010200 -_0223FCA8: .word 0x000080F0 - thumb_func_end ov17_0223FBD4 - - thumb_func_start ov17_0223FCAC -ov17_0223FCAC: ; 0x0223FCAC - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r6, r0, #0 - mov r0, #0x69 - lsl r0, r0, #2 - add r5, r6, r0 - ldr r0, _0223FF18 ; =0x000002E1 - mov r1, #0xff - strb r1, [r6, r0] - add r0, r5, #0 - str r0, [sp, #0x24] - add r0, #0x50 - str r0, [sp, #0x24] - add r0, r5, #0 - add r7, r6, #0 - str r0, [sp, #0x28] - add r0, #0xa0 - mov r4, #0 - add r7, #0x40 - str r0, [sp, #0x28] - b _0223FDF8 -_0223FCD6: - ldr r0, [r6, #4] - ldr r1, _0223FF1C ; =0x00000123 - ldr r0, [r0, #0] - mov r2, #0 - ldrb r1, [r0, r1] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r4, #0 - add r1, #0x36 - bl sub_02074470 - lsl r1, r4, #1 - add r2, sp, #0x3c - strh r0, [r2, r1] - add r0, r2, #0 - ldrh r0, [r0, r1] - cmp r0, #0 - beq _0223FD04 - mov r0, #0x4b - add r2, r5, r4 - lsl r0, r0, #2 - ldrb r2, [r2, r0] - b _0223FD06 -_0223FD04: - mov r2, #0 -_0223FD06: - add r0, sp, #0x34 - strh r2, [r0, r1] - ldr r0, _0223FF20 ; =0x00010708 - ldr r1, _0223FF24 ; =0x02253278 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223FF28 ; =0x000080F0 - mov r2, #0 - str r0, [sp, #8] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - mov r3, #2 - str r1, [sp, #0xc] - ldr r1, _0223FF24 ; =0x02253278 - add r0, r1, r0 - ldrh r0, [r0, #2] - add r1, r4, #0 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x14 - mul r1, r0 - add r0, r5, r1 - str r0, [sp, #0x18] - add r0, r6, #0 - add r1, r7, r1 - bl ov17_02240138 - ldr r0, _0223FF2C ; =0x00010200 - ldr r1, _0223FF30 ; =0x02253314 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223FF28 ; =0x000080F0 - add r2, r4, #4 - str r0, [sp, #8] - lsl r0, r4, #3 - ldrh r1, [r1, r0] - str r1, [sp, #0xc] - ldr r1, _0223FF30 ; =0x02253314 - add r0, r1, r0 - ldrh r0, [r0, #2] - add r1, r4, #0 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x14 - mul r1, r0 - ldr r0, [sp, #0x24] - add r0, r0, r1 - mov r1, #0x14 - mul r1, r2 - mov r2, #0 - str r0, [sp, #0x18] - add r0, r6, #0 - add r1, r7, r1 - add r3, r2, #0 - bl ov17_02240138 - ldr r0, _0223FF2C ; =0x00010200 - add r2, r4, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223FF28 ; =0x000080F0 - lsl r1, r4, #3 - str r0, [sp, #8] - ldr r0, _0223FF30 ; =0x02253314 - add r2, #8 - add r1, r0, r1 - ldrh r0, [r1, #4] - str r0, [sp, #0xc] - ldrh r0, [r1, #6] - add r1, r4, #0 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x14 - mul r1, r0 - ldr r0, [sp, #0x28] - add r0, r0, r1 - mov r1, #0x14 - mul r1, r2 - mov r2, #0 - str r0, [sp, #0x18] - add r0, r6, #0 - add r1, r7, r1 - add r3, r2, #0 - bl ov17_02240138 - lsl r1, r4, #1 - add r0, sp, #0x3c - ldrh r0, [r0, r1] - cmp r0, #0 - bne _0223FDF6 - mov r0, #0x14 - mul r0, r4 - add r0, r6, r0 - ldr r0, [r0, #0x40] - mov r1, #0 - bl sub_020129D0 - add r1, r4, #4 - mov r0, #0x14 - mul r0, r1 - add r0, r6, r0 - ldr r0, [r0, #0x40] - mov r1, #0 - bl sub_020129D0 - add r1, r4, #0 - add r1, #8 - mov r0, #0x14 - mul r0, r1 - add r0, r6, r0 - ldr r0, [r0, #0x40] - mov r1, #0 - bl sub_020129D0 -_0223FDF6: - add r4, r4, #1 -_0223FDF8: - cmp r4, #4 - bge _0223FDFE - b _0223FCD6 -_0223FDFE: - mov r4, #0 - add r7, sp, #0x3c - b _0223FE2C -_0223FE04: - lsl r0, r4, #1 - ldrh r0, [r7, r0] - cmp r0, #0 - beq _0223FE1E - mov r0, #0x13 - add r1, r5, r4 - lsl r0, r0, #4 - ldrb r1, [r1, r0] - add r0, r6, #0 - add r2, r4, #0 - bl ov17_02240424 - b _0223FE2A -_0223FE1E: - mov r1, #0 - add r0, r6, #0 - mvn r1, r1 - add r2, r4, #0 - bl ov17_02240424 -_0223FE2A: - add r4, r4, #1 -_0223FE2C: - cmp r4, #4 - blt _0223FE04 - mov r4, #0 - mov r7, #0x20 - add r5, sp, #0x3c - b _0223FE7E -_0223FE38: - lsl r0, r4, #1 - ldrh r2, [r5, r0] - cmp r2, #0 - beq _0223FE7C - ldr r1, [r6, #4] - ldr r0, [r6, #8] - ldr r3, [r1, #0] - ldr r1, _0223FF1C ; =0x00000123 - ldrb r1, [r3, r1] - bl ov17_02243A98 - cmp r0, #0 - bne _0223FE7C - str r7, [sp] - ldr r0, [r6, #4] - mov r1, #1 - add r3, r4, #4 - lsl r3, r3, #0x14 - ldr r2, [r6, #0x38] - lsl r1, r1, #8 - add r1, r2, r1 - ldr r0, [r0, #0x50] - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02002FBC - ldr r0, _0223FF18 ; =0x000002E1 - ldrb r0, [r6, r0] - cmp r0, #0xff - beq _0223FE78 - bl sub_02022974 -_0223FE78: - ldr r0, _0223FF18 ; =0x000002E1 - strb r4, [r6, r0] -_0223FE7C: - add r4, r4, #1 -_0223FE7E: - cmp r4, #4 - blt _0223FE38 - add r0, r6, #0 - add r1, sp, #0x3c - bl ov17_022402E8 - mov r4, #0 - b _0223FF0E -_0223FE8E: - lsl r1, r4, #1 - add r0, sp, #0x3c - ldrh r0, [r0, r1] - cmp r0, #0 - beq _0223FF0C - add r0, sp, #0x34 - ldrh r0, [r0, r1] - bl sub_02095734 - str r0, [sp, #0x20] - cmp r0, #0 - bge _0223FEA8 - neg r0, r0 -_0223FEA8: - mov r1, #0xa - bl sub_020E1F6C - str r0, [sp, #0x1c] - cmp r0, #6 - ble _0223FEB8 - bl sub_02022974 -_0223FEB8: - mov r0, #0x18 - mul r0, r4 - add r7, r6, r0 - lsl r0, r4, #3 - ldr r1, _0223FF34 ; =0x02253334 - str r0, [sp, #0x2c] - add r0, r1, r0 - mov r5, #0 - str r0, [sp, #0x30] - b _0223FF06 -_0223FECC: - lsl r0, r5, #2 - add r1, r7, r0 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223FEDE - bl sub_02022974 -_0223FEDE: - ldr r0, [sp, #0x20] - ldr r3, _0223FF34 ; =0x02253334 - str r0, [sp] - ldr r2, [sp, #0x2c] - ldr r1, [r6, #4] - ldr r3, [r3, r2] - lsl r2, r5, #3 - add r2, r3, r2 - ldr r3, [sp, #0x30] - ldr r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - ldr r3, [r3, #4] - bl ov17_0224136C - lsl r1, r5, #2 - add r2, r7, r1 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r2, r1] - add r5, r5, #1 -_0223FF06: - ldr r0, [sp, #0x1c] - cmp r5, r0 - blt _0223FECC -_0223FF0C: - add r4, r4, #1 -_0223FF0E: - cmp r4, #4 - blt _0223FE8E - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_0223FF18: .word 0x000002E1 -_0223FF1C: .word 0x00000123 -_0223FF20: .word 0x00010708 -_0223FF24: .word 0x02253278 -_0223FF28: .word 0x000080F0 -_0223FF2C: .word 0x00010200 -_0223FF30: .word 0x02253314 -_0223FF34: .word 0x02253334 - thumb_func_end ov17_0223FCAC - - thumb_func_start ov17_0223FF38 -ov17_0223FF38: ; 0x0223FF38 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0x69 - lsl r0, r0, #2 - add r6, r5, r0 - add r7, r5, #0 - mov r4, #0 - add r6, #0xf0 - add r7, #0x40 - b _0223FF86 -_0223FF4E: - ldr r0, _0223FFE4 ; =0x0001090A - ldr r1, _0223FFE8 ; =0x0225325C - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223FFEC ; =0x000080F0 - mov r2, #0 - str r0, [sp, #8] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - mov r3, #2 - str r1, [sp, #0xc] - ldr r1, _0223FFE8 ; =0x0225325C - add r0, r1, r0 - ldrh r0, [r0, #2] - add r1, r4, #0 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0x14 - mul r1, r0 - add r0, r6, r1 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r7, r1 - bl ov17_02240138 - add r4, r4, #1 -_0223FF86: - cmp r4, #3 - blt _0223FF4E - ldr r0, [r5, #4] - mov r1, #0x35 - ldr r0, [r0, #0x38] - bl sub_0200B1EC - add r6, r0, #0 - ldr r0, _0223FFE4 ; =0x0001090A - ldr r1, _0223FFEC ; =0x000080F0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #0x80 - str r1, [sp, #0xc] - mov r1, #0xa4 - str r1, [sp, #0x10] - mov r1, #1 - str r1, [sp, #0x14] - add r2, r5, #0 - mov r1, #0x14 - str r0, [sp, #0x18] - add r2, #0x40 - mul r1, r4 - add r1, r2, r1 - add r0, r5, #0 - add r2, r6, #0 - mov r3, #2 - bl ov17_02240138 - add r0, r6, #0 - bl sub_020237BC - ldr r2, [r5, #4] - ldr r0, [r2, #0x18] - ldr r1, [r2, #0x1c] - ldr r3, [r2, #0] - ldr r2, _0223FFF0 ; =0x0000011E - ldrb r2, [r3, r2] - bl ov17_022412C0 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FFE4: .word 0x0001090A -_0223FFE8: .word 0x0225325C -_0223FFEC: .word 0x000080F0 -_0223FFF0: .word 0x0000011E - thumb_func_end ov17_0223FF38 - - thumb_func_start ov17_0223FFF4 -ov17_0223FFF4: ; 0x0223FFF4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #1 - str r2, [sp] - cmp r0, #4 - bhi _02240018 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224000E: ; jump table - .short _02240018 - _0224000E - 2 ; case 0 - .short _0224001E - _0224000E - 2 ; case 1 - .short _0224001E - _0224000E - 2 ; case 2 - .short _0224001E - _0224000E - 2 ; case 3 - .short _0224001E - _0224000E - 2 ; case 4 -_02240018: - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0224001E: - ldr r0, [r4, #4] - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _02240080 ; =0x00000123 - ldrb r0, [r1, r0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r5, #0 - add r1, #0x36 - bl sub_02074470 - cmp r0, #0 - beq _02240040 - ldr r0, _02240084 ; =0x000002E1 - ldrb r0, [r4, r0] - cmp r0, r5 - bne _02240046 -_02240040: - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02240046: - mov r0, #6 - ldr r1, _02240088 ; =0x022532E4 - mul r0, r5 - add r7, r1, r0 - ldr r1, _0224008C ; =0x02253388 - lsl r0, r5, #4 - add r6, r1, r0 - ldr r1, [sp] - add r0, r4, #0 - bl ov17_02240930 - ldr r0, _02240090 ; =ov17_02240658 - add r1, r4, #0 - bl ov17_022404CC - mov r1, #0xbd - lsl r1, r1, #2 - str r7, [r4, r1] - add r0, r1, #4 - str r6, [r4, r0] - add r0, r1, #0 - mov r2, #2 - add r0, #0xc - strb r2, [r4, r0] - add r1, #8 - str r5, [r4, r1] - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240080: .word 0x00000123 -_02240084: .word 0x000002E1 -_02240088: .word 0x022532E4 -_0224008C: .word 0x02253388 -_02240090: .word ov17_02240658 - thumb_func_end ov17_0223FFF4 - - thumb_func_start ov17_02240094 -ov17_02240094: ; 0x02240094 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #1 - cmp r0, #4 - bhi _022400B6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022400AC: ; jump table - .short _022400B6 - _022400AC - 2 ; case 0 - .short _022400BA - _022400AC - 2 ; case 1 - .short _022400BE - _022400AC - 2 ; case 2 - .short _022400C2 - _022400AC - 2 ; case 3 - .short _022400C6 - _022400AC - 2 ; case 4 -_022400B6: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_022400BA: - mov r6, #0 - b _022400C8 -_022400BE: - mov r6, #1 - b _022400C8 -_022400C2: - mov r6, #2 - b _022400C8 -_022400C6: - mov r6, #3 -_022400C8: - ldr r0, [r4, #4] - ldr r1, [r0, #0] - ldr r0, _02240128 ; =0x0000011E - ldrb r0, [r1, r0] - cmp r5, r0 - bne _022400D8 - mov r7, #1 - b _022400DA -_022400D8: - mov r7, #0 -_022400DA: - add r0, r4, #0 - add r1, r2, #0 - bl ov17_02240930 - ldr r0, _0224012C ; =ov17_0224051C - add r1, r4, #0 - bl ov17_022404CC - mov r0, #6 - ldr r1, _02240130 ; =0x022532FC - mul r0, r5 - add r0, r1, r0 - mov r1, #0xbd - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r2, _02240134 ; =0x022533C8 - lsl r0, r5, #4 - add r2, r2, r0 - add r0, r1, #4 - str r2, [r4, r0] - mov r2, #3 - lsl r0, r2, #8 - strb r2, [r4, r0] - add r0, r1, #0 - add r0, #8 - str r5, [r4, r0] - add r0, r1, #0 - add r0, #0xd - strb r6, [r4, r0] - cmp r7, #1 - bne _02240122 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - sub r1, #0xc - str r0, [r4, r1] -_02240122: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240128: .word 0x0000011E -_0224012C: .word ov17_0224051C -_02240130: .word 0x022532FC -_02240134: .word 0x022533C8 - thumb_func_end ov17_02240094 - - thumb_func_start ov17_02240138 -ov17_02240138: ; 0x02240138 - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0] - str r2, [sp, #0x18] - str r3, [sp, #0x1c] - ldr r6, [sp, #0x9c] - ldr r4, [sp, #0xa8] - cmp r0, #0 - beq _02240152 - bl sub_02022974 -_02240152: - ldr r1, [r7, #4] - cmp r4, #0 - ldr r0, [r1, #0x24] - str r0, [sp, #0x24] - ldr r0, [r1, #0x1c] - str r0, [sp, #0x20] - bne _0224016E - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x1c] - add r2, sp, #0x2c - add r3, sp, #0x28 - bl ov17_02240C60 - b _02240176 -_0224016E: - ldrh r0, [r4, #0x12] - str r0, [sp, #0x2c] - ldrh r0, [r4, #0x10] - str r0, [sp, #0x28] -_02240176: - cmp r4, #0 - bne _022401B4 - add r0, sp, #0x3c - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r2, [sp, #0x28] - ldr r0, [sp, #0x24] - lsl r2, r2, #0x18 - add r1, sp, #0x3c - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x90] - ldr r1, [sp, #0x1c] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r2, [sp, #0x18] - add r0, sp, #0x3c - str r3, [sp, #0x14] - bl sub_0201D7E0 - b _022401C0 -_022401B4: - add r3, r4, #0 - add r2, sp, #0x3c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} -_022401C0: - add r0, sp, #0x3c - mov r1, #2 - mov r2, #0x15 - bl sub_02012898 - mov r1, #1 - mov r2, #2 - add r3, sp, #0x30 - bl sub_0201ED94 - ldr r0, [sp, #0xa4] - cmp r0, #1 - bne _022401E4 - ldr r1, [sp, #0x2c] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - sub r6, r6, r0 -_022401E4: - ldr r0, [r7, #0x3c] - str r0, [sp, #0x4c] - add r0, sp, #0x3c - str r0, [sp, #0x50] - ldr r0, [sp, #0x20] - bl sub_0200D9B0 - str r0, [sp, #0x54] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x98] - bl sub_0200D04C - str r0, [sp, #0x58] - mov r0, #0 - ldr r1, [sp, #0x34] - str r0, [sp, #0x5c] - str r0, [sp, #0x6c] - mov r0, #0x64 - str r1, [sp, #0x60] - mov r1, #0x42 - str r0, [sp, #0x70] - mov r0, #2 - str r0, [sp, #0x74] - mov r0, #0x15 - str r0, [sp, #0x78] - ldr r2, [sp, #0xa0] - lsl r1, r1, #2 - add r1, r2, r1 - add r0, sp, #0x4c - str r6, [sp, #0x64] - str r1, [sp, #0x68] - bl sub_020127E8 - ldr r1, [sp, #0x94] - add r7, r0, #0 - bl sub_02012AC0 - mov r2, #0x42 - ldr r3, [sp, #0xa0] - lsl r2, r2, #2 - add r0, r7, #0 - add r1, r6, #0 - add r2, r3, r2 - bl sub_020128C4 - cmp r4, #0 - bne _02240248 - add r0, sp, #0x3c - bl sub_0201A8FC -_02240248: - str r7, [r5, #0] - add r3, sp, #0x30 - ldmia r3!, {r0, r1} - add r2, r5, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #0x2c] - strh r0, [r5, #0x10] - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02240138 - - thumb_func_start ov17_02240260 -ov17_02240260: ; 0x02240260 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - add r4, #0x44 - add r7, r6, #0 -_0224026C: - ldr r0, [r5, #0x40] - cmp r0, #0 - beq _0224027E - bl sub_02012870 - add r0, r4, #0 - bl sub_0201EE28 - str r7, [r5, #0x40] -_0224027E: - add r6, r6, #1 - add r5, #0x14 - add r4, #0x14 - cmp r6, #0xc - blt _0224026C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02240260 - - thumb_func_start ov17_0224028C -ov17_0224028C: ; 0x0224028C - push {r4, lr} - add r4, r0, #0 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022402A6 - bl ov17_02241314 - mov r0, #5 - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] -_022402A6: - pop {r4, pc} - thumb_func_end ov17_0224028C - - thumb_func_start ov17_022402A8 -ov17_022402A8: ; 0x022402A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - mov r0, #0 - mov r7, #0x51 - str r0, [sp, #4] - add r6, r0, #0 - lsl r7, r7, #2 -_022402B8: - ldr r5, [sp] - mov r4, #0 -_022402BC: - ldr r0, [r5, r7] - cmp r0, #0 - beq _022402CC - bl ov17_022413AC - mov r0, #0x51 - lsl r0, r0, #2 - str r6, [r5, r0] -_022402CC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _022402BC - ldr r0, [sp] - add r0, #0x18 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #4 - blt _022402B8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_022402A8 - - thumb_func_start ov17_022402E8 -ov17_022402E8: ; 0x022402E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r5, r0, #0 - add r7, r1, #0 - ldr r1, [r5, #4] - ldr r4, _0224037C ; =0x02253354 - ldr r0, [r1, #0x18] - add r3, sp, #8 - str r0, [sp, #4] - ldr r0, [r1, #0x1c] - mov r2, #6 - str r0, [sp] -_02240300: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02240300 - ldr r0, [r4, #0] - mov r4, #0 - str r0, [r3, #0] - add r6, sp, #8 - b _02240374 -_02240312: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02240324 - bl sub_02022974 -_02240324: - lsl r0, r4, #1 - ldrh r0, [r7, r0] - cmp r0, #0 - beq _02240372 - mov r0, #0xb5 - add r1, r5, r4 - lsl r0, r0, #2 - ldrb r2, [r1, r0] - ldr r0, _02240380 ; =0x000080F6 - ldr r1, _02240384 ; =0x02253298 - add r0, r4, r0 - str r0, [sp, #0x1c] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - add r3, sp, #8 - strh r1, [r6] - ldr r1, _02240384 ; =0x02253298 - add r0, r1, r0 - ldrh r0, [r0, #2] - ldr r1, [sp] - strh r0, [r6, #2] - ldr r0, [sp, #4] - bl ov17_0224F154 - lsl r1, r4, #2 - mov r2, #0x13 - mov r3, #0x11 - add r1, r5, r1 - lsl r2, r2, #4 - str r0, [r1, r2] - add r0, r2, #0 - ldr r0, [r1, r0] - mov r1, #0 - mov r2, #2 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - lsl r3, r3, #0x10 - bl sub_0200D500 -_02240372: - add r4, r4, #1 -_02240374: - cmp r4, #4 - blt _02240312 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224037C: .word 0x02253354 -_02240380: .word 0x000080F6 -_02240384: .word 0x02253298 - thumb_func_end ov17_022402E8 - - thumb_func_start ov17_02240388 -ov17_02240388: ; 0x02240388 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - mov r7, #0x13 - add r5, r0, #0 - add r6, r4, #0 - lsl r7, r7, #4 -_02240394: - ldr r0, [r5, r7] - cmp r0, #0 - beq _022403A4 - bl ov17_0224F184 - mov r0, #0x13 - lsl r0, r0, #4 - str r6, [r5, r0] -_022403A4: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02240394 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02240388 - - thumb_func_start ov17_022403B0 -ov17_022403B0: ; 0x022403B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - ldr r0, [r0, #0x24] - add r7, r3, #0 - mov r1, #4 - add r4, r2, #0 - str r0, [sp, #4] - bl sub_02019FE4 - mov ip, r0 - lsl r0, r7, #2 - add r0, r5, r0 - ldr r0, [r0, #0x20] - ldr r7, [r4, #0] - str r0, [sp] - ldr r0, [sp, #0x20] - lsl r0, r0, #1 - ldrsh r1, [r6, r0] - ldr r0, [r4, #4] - cmp r7, r0 - bgt _02240416 - lsl r6, r7, #5 -_022403E2: - lsl r2, r6, #1 - mov r0, ip - add r5, r0, r2 - ldr r0, [sp] - ldr r3, [r4, #0xc] - add r2, r0, r2 - ldr r0, [r4, #8] - cmp r0, r3 - bgt _0224040C - lsl r3, r0, #1 - add r2, r2, r3 - add r3, r5, r3 -_022403FA: - ldrh r5, [r2] - add r0, r0, #1 - add r2, r2, #2 - add r5, r1, r5 - strh r5, [r3] - ldr r5, [r4, #0xc] - add r3, r3, #2 - cmp r0, r5 - ble _022403FA -_0224040C: - ldr r0, [r4, #4] - add r7, r7, #1 - add r6, #0x20 - cmp r7, r0 - ble _022403E2 -_02240416: - ldr r0, [sp, #4] - mov r1, #4 - bl sub_0201C3C0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_022403B0 - - thumb_func_start ov17_02240424 -ov17_02240424: ; 0x02240424 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - ldr r6, _0224049C ; =0x022532BC - add r5, r2, #0 - add r4, r0, #0 - add r3, r1, #0 - add r2, sp, #4 - ldmia r6!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r2, #0] - mov r0, #0 - mvn r0, r0 - cmp r3, r0 - beq _02240464 - mov r0, #0x20 - str r0, [sp] - lsl r1, r3, #2 - ldr r0, [r4, #4] - add r3, r5, #4 - lsl r3, r3, #0x14 - ldr r0, [r0, #0x50] - ldr r1, [r7, r1] - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02002FBC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02240464: - ldr r2, _022404A0 ; =0x02253248 - lsl r1, r5, #1 - mov r0, #0 - add r1, r2, r1 - str r0, [sp] - ldr r3, _022404A4 ; =0x02253408 - lsl r2, r5, #4 - add r2, r3, r2 - add r0, r4, #0 - mov r3, #2 - bl ov17_022403B0 - mov r2, #0x20 - str r2, [sp] - ldr r0, [r4, #4] - add r3, r5, #4 - lsl r3, r3, #0x14 - ldr r1, [r4, #0x38] - add r2, #0xe0 - add r1, r1, r2 - ldr r0, [r0, #0x50] - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02002FBC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224049C: .word 0x022532BC -_022404A0: .word 0x02253248 -_022404A4: .word 0x02253408 - thumb_func_end ov17_02240424 - - thumb_func_start ov17_022404A8 -ov17_022404A8: ; 0x022404A8 - ldr r3, _022404AC ; =ov17_022404B0 - bx r3 - ; .align 2, 0 -_022404AC: .word ov17_022404B0 - thumb_func_end ov17_022404A8 - - thumb_func_start ov17_022404B0 -ov17_022404B0: ; 0x022404B0 - push {r4, lr} - add r4, r0, #0 - bl ov17_0224028C - add r0, r4, #0 - bl ov17_022402A8 - add r0, r4, #0 - bl ov17_02240388 - add r0, r4, #0 - bl ov17_02240260 - pop {r4, pc} - thumb_func_end ov17_022404B0 - - thumb_func_start ov17_022404CC -ov17_022404CC: ; 0x022404CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _022404DC - bl sub_02022974 -_022404DC: - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - mov r2, #0x20 - bl sub_020C4CF4 - ldr r2, _022404F8 ; =0x00000514 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x10] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022404F8: .word 0x00000514 - thumb_func_end ov17_022404CC - - thumb_func_start ov17_022404FC -ov17_022404FC: ; 0x022404FC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _0224051A - bl sub_0200DA58 - mov r0, #0xb9 - lsl r0, r0, #2 - mov r1, #0 - add r0, r4, r0 - mov r2, #0x20 - str r1, [r4, #0x10] - bl sub_020C4CF4 -_0224051A: - pop {r4, pc} - thumb_func_end ov17_022404FC - - thumb_func_start ov17_0224051C -ov17_0224051C: ; 0x0224051C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r3, #0xb9 - add r5, r1, #0 - lsl r3, r3, #2 - ldrsh r0, [r5, r3] - cmp r0, #0 - beq _02240536 - cmp r0, #1 - beq _022405A8 - cmp r0, #2 - beq _022405C4 - b _02240634 -_02240536: - mov r0, #2 - str r0, [sp] - add r1, r3, #0 - add r2, r3, #0 - add r3, #0x1c - add r1, #0x10 - add r2, #0x14 - ldrb r3, [r5, r3] - ldr r1, [r5, r1] - ldr r2, [r5, r2] - add r0, r5, #0 - bl ov17_022403B0 - ldr r0, _02240654 ; =0x00000301 - add r2, sp, #4 - ldrb r1, [r5, r0] - mov r0, #0x14 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x40] - add r1, sp, #8 - bl sub_020129A4 - ldr r0, _02240654 ; =0x00000301 - ldr r2, [sp, #4] - ldrb r1, [r5, r0] - mov r0, #0x14 - sub r2, r2, #2 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x40] - ldr r1, [sp, #8] - bl sub_020128C4 - mov r7, #0xba - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #2 -_02240582: - ldr r0, [r4, r7] - cmp r0, #0 - beq _02240592 - mov r1, #0 - ldr r0, [r0, #0] - sub r2, r1, #2 - bl sub_0200D5AC -_02240592: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #3 - blt _02240582 - mov r0, #0xb9 - lsl r0, r0, #2 - ldrsh r1, [r5, r0] - add sp, #0xc - add r1, r1, #1 - strh r1, [r5, r0] - pop {r4, r5, r6, r7, pc} -_022405A8: - add r0, r3, #2 - ldrsh r0, [r5, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r5, r0] - ldrsh r0, [r5, r0] - cmp r0, #0 - ble _02240650 - mov r1, #0 - add r0, r3, #2 - strh r1, [r5, r0] - ldrsh r0, [r5, r3] - add r0, r0, #1 - strh r0, [r5, r3] -_022405C4: - mov r0, #1 - mov r3, #0xbd - str r0, [sp] - lsl r3, r3, #2 - add r2, r3, #4 - ldr r1, [r5, r3] - add r3, #0xc - ldrb r3, [r5, r3] - ldr r2, [r5, r2] - add r0, r5, #0 - bl ov17_022403B0 - ldr r0, _02240654 ; =0x00000301 - add r2, sp, #4 - ldrb r1, [r5, r0] - mov r0, #0x14 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x40] - add r1, sp, #8 - bl sub_020129A4 - ldr r0, _02240654 ; =0x00000301 - ldr r2, [sp, #4] - ldrb r1, [r5, r0] - mov r0, #0x14 - add r2, r2, #1 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x40] - ldr r1, [sp, #8] - bl sub_020128C4 - mov r7, #0xba - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #2 -_0224060E: - ldr r0, [r4, r7] - cmp r0, #0 - beq _0224061E - ldr r0, [r0, #0] - mov r1, #0 - mov r2, #1 - bl sub_0200D5AC -_0224061E: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #3 - blt _0224060E - mov r0, #0xb9 - lsl r0, r0, #2 - ldrsh r1, [r5, r0] - add sp, #0xc - add r1, r1, #1 - strh r1, [r5, r0] - pop {r4, r5, r6, r7, pc} -_02240634: - add r0, r3, #2 - ldrsh r0, [r5, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r5, r0] - ldrsh r0, [r5, r0] - cmp r0, #0 - ble _02240650 - add r0, r5, #0 - bl ov17_022404A8 - add r0, r5, #0 - bl ov17_022404FC -_02240650: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240654: .word 0x00000301 - thumb_func_end ov17_0224051C - - thumb_func_start ov17_02240658 -ov17_02240658: ; 0x02240658 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r7, _022408DC ; =0x00000123 - add r4, r1, #0 - mov r6, #0 - add r5, sp, #0x20 -_02240664: - ldr r0, [r4, #4] - mov r2, #0 - ldr r0, [r0, #0] - ldrb r1, [r0, r7] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r6, #0 - add r1, #0x36 - bl sub_02074470 - strh r0, [r5] - add r6, r6, #1 - add r5, r5, #2 - cmp r6, #4 - blt _02240664 - mov r0, #0xbf - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #3 - bhi _022406E8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02240698: ; jump table - .short _022406A0 - _02240698 - 2 ; case 0 - .short _022406B2 - _02240698 - 2 ; case 1 - .short _022406C4 - _02240698 - 2 ; case 2 - .short _022406D6 - _02240698 - 2 ; case 3 -_022406A0: - mov r0, #8 - str r0, [sp, #0xc] - add r0, sp, #0x20 - ldrh r0, [r0] - mov r5, #0 - mov r6, #4 - str r0, [sp, #8] - str r5, [sp, #4] - b _022406F0 -_022406B2: - mov r0, #9 - str r0, [sp, #0xc] - add r0, sp, #0x20 - ldrh r0, [r0, #2] - mov r5, #1 - mov r6, #5 - str r0, [sp, #8] - str r5, [sp, #4] - b _022406F0 -_022406C4: - mov r0, #0xa - str r0, [sp, #0xc] - add r0, sp, #0x20 - ldrh r0, [r0, #4] - mov r5, #2 - mov r6, #6 - str r0, [sp, #8] - str r5, [sp, #4] - b _022406F0 -_022406D6: - mov r0, #0xb - str r0, [sp, #0xc] - add r0, sp, #0x20 - ldrh r0, [r0, #6] - mov r5, #3 - mov r6, #7 - str r0, [sp, #8] - str r5, [sp, #4] - b _022406F0 -_022406E8: - mov r5, #0 - add r6, r5, #0 - str r5, [sp, #0xc] - str r5, [sp, #8] -_022406F0: - mov r3, #0xb9 - lsl r3, r3, #2 - ldrsh r0, [r4, r3] - cmp r0, #0 - beq _02240704 - cmp r0, #1 - beq _022407D2 - cmp r0, #2 - beq _022407EE - b _022408BA -_02240704: - mov r0, #2 - str r0, [sp] - add r1, r3, #0 - add r2, r3, #0 - add r3, #0x1c - add r1, #0x10 - add r2, #0x14 - ldrb r3, [r4, r3] - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov17_022403B0 - add r7, r4, #0 - mov r0, #0x14 - mul r0, r5 - add r7, #0x40 - str r0, [sp, #0x10] - ldr r0, [r7, r0] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x28] - ldr r0, [r7, r0] - ldr r1, [sp, #0x2c] - sub r2, r2, #2 - bl sub_020128C4 - add r7, r4, #0 - mov r0, #0x14 - mul r0, r6 - add r7, #0x40 - str r0, [sp, #0x14] - ldr r0, [r7, r0] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x28] - ldr r0, [r7, r0] - ldr r1, [sp, #0x2c] - sub r2, r2, #2 - bl sub_020128C4 - ldr r0, [sp, #0xc] - add r6, r4, #0 - mov r1, #0x14 - add r7, r0, #0 - mul r7, r1 - add r6, #0x40 - ldr r0, [r6, r7] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - ldr r2, [sp, #0x28] - ldr r0, [r6, r7] - ldr r1, [sp, #0x2c] - sub r2, r2, #2 - bl sub_020128C4 - ldr r0, [sp, #8] - cmp r0, #0 - beq _022407C4 - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0 - ldr r0, [r0, #0] - sub r2, r1, #2 - bl sub_0200D5AC - mov r7, #0x51 - ldr r0, [sp, #4] - mov r1, #0x18 - mul r1, r0 - mov r6, #0 - add r5, r4, r1 - lsl r7, r7, #2 -_022407AC: - ldr r0, [r5, r7] - cmp r0, #0 - beq _022407BC - mov r1, #0 - ldr r0, [r0, #0] - sub r2, r1, #2 - bl sub_0200D5AC -_022407BC: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #6 - blt _022407AC -_022407C4: - mov r0, #0xb9 - lsl r0, r0, #2 - ldrsh r1, [r4, r0] - add sp, #0x30 - add r1, r1, #1 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_022407D2: - add r0, r3, #2 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _022408D6 - mov r1, #0 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r3] - add r0, r0, #1 - strh r0, [r4, r3] -_022407EE: - mov r0, #1 - mov r3, #0xbd - str r0, [sp] - lsl r3, r3, #2 - add r2, r3, #4 - ldr r1, [r4, r3] - add r3, #0xc - ldrb r3, [r4, r3] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov17_022403B0 - add r7, r4, #0 - mov r0, #0x14 - mul r0, r5 - add r7, #0x40 - str r0, [sp, #0x18] - ldr r0, [r7, r0] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x28] - ldr r0, [r7, r0] - ldr r1, [sp, #0x2c] - add r2, r2, #1 - bl sub_020128C4 - add r7, r4, #0 - mov r0, #0x14 - mul r0, r6 - add r7, #0x40 - str r0, [sp, #0x1c] - ldr r0, [r7, r0] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x28] - ldr r0, [r7, r0] - ldr r1, [sp, #0x2c] - add r2, r2, #1 - bl sub_020128C4 - ldr r0, [sp, #0xc] - add r6, r4, #0 - mov r1, #0x14 - add r7, r0, #0 - mul r7, r1 - add r6, #0x40 - ldr r0, [r6, r7] - add r1, sp, #0x2c - add r2, sp, #0x28 - bl sub_020129A4 - ldr r2, [sp, #0x28] - ldr r0, [r6, r7] - ldr r1, [sp, #0x2c] - add r2, r2, #1 - bl sub_020128C4 - ldr r0, [sp, #8] - cmp r0, #0 - beq _022408AC - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0 - ldr r0, [r0, #0] - mov r2, #1 - bl sub_0200D5AC - mov r7, #0x51 - ldr r0, [sp, #4] - mov r1, #0x18 - mul r1, r0 - mov r6, #0 - add r5, r4, r1 - lsl r7, r7, #2 -_02240894: - ldr r0, [r5, r7] - cmp r0, #0 - beq _022408A4 - ldr r0, [r0, #0] - mov r1, #0 - mov r2, #1 - bl sub_0200D5AC -_022408A4: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #6 - blt _02240894 -_022408AC: - mov r0, #0xb9 - lsl r0, r0, #2 - ldrsh r1, [r4, r0] - add sp, #0x30 - add r1, r1, #1 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_022408BA: - add r0, r3, #2 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r3, #2 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _022408D6 - add r0, r4, #0 - bl ov17_022404A8 - add r0, r4, #0 - bl ov17_022404FC -_022408D6: - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_022408DC: .word 0x00000123 - thumb_func_end ov17_02240658 - - thumb_func_start ov17_022408E0 -ov17_022408E0: ; 0x022408E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _022408F0 - bl sub_02022974 -_022408F0: - mov r0, #0xc1 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - mov r2, #0xc - bl sub_020C4CF4 - ldr r2, _0224090C ; =0x00000528 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x14] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224090C: .word 0x00000528 - thumb_func_end ov17_022408E0 - - thumb_func_start ov17_02240910 -ov17_02240910: ; 0x02240910 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0224092E - bl sub_0200DA58 - mov r0, #0xc1 - lsl r0, r0, #2 - mov r1, #0 - add r0, r4, r0 - mov r2, #0xc - str r1, [r4, #0x14] - bl sub_020C4CF4 -_0224092E: - pop {r4, pc} - thumb_func_end ov17_02240910 - - thumb_func_start ov17_02240930 -ov17_02240930: ; 0x02240930 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0xff - beq _02240946 - ldr r0, _02240948 ; =ov17_02240950 - add r1, r5, #0 - bl ov17_022408E0 - ldr r0, _0224094C ; =0x0000030D - strb r4, [r5, r0] -_02240946: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02240948: .word ov17_02240950 -_0224094C: .word 0x0000030D - thumb_func_end ov17_02240930 - - thumb_func_start ov17_02240950 -ov17_02240950: ; 0x02240950 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r0, #0xc1 - add r5, r1, #0 - lsl r0, r0, #2 - add r2, r5, r0 - ldr r0, [r5, #4] - mov r4, #0 - ldr r3, [r0, #0x50] - ldrb r0, [r2, #8] - cmp r0, #0 - beq _02240970 - cmp r0, #1 - beq _0224098C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02240970: - mov r0, #0xa - lsl r0, r0, #8 - strh r0, [r2, #4] - ldr r0, _022409EC ; =0xFFFFFB00 - strh r0, [r2, #6] - mov r0, #4 - ldrsh r1, [r2, r0] - mov r0, #6 - ldrsh r0, [r2, r0] - sub r0, r1, r0 - strh r0, [r2, #4] - ldrb r0, [r2, #8] - add r0, r0, #1 - strb r0, [r2, #8] -_0224098C: - mov r7, #4 - mov r6, #6 - ldrsh r1, [r2, r7] - ldrsh r0, [r2, r6] - add r0, r1, r0 - strh r0, [r2, #4] - ldrsh r6, [r2, r6] - cmp r6, #0 - blt _022409AC - ldrsh r1, [r2, r7] - lsl r0, r7, #0xa - cmp r1, r0 - blt _022409AC - strh r0, [r2, #4] - mov r4, #1 - b _022409BE -_022409AC: - cmp r6, #0 - bge _022409BE - mov r0, #4 - ldrsh r0, [r2, r0] - cmp r0, #0 - bgt _022409BE - mov r0, #0 - strh r0, [r2, #4] - mov r4, #1 -_022409BE: - mov r0, #4 - ldrsh r0, [r2, r0] - mov r1, #1 - asr r0, r0, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, _022409F0 ; =0x00007FFF - str r0, [sp, #4] - ldrb r2, [r2, #9] - add r0, r3, #0 - mov r3, #0x10 - lsl r2, r2, #0x14 - lsr r2, r2, #0x10 - bl sub_020039B0 - cmp r4, #1 - bne _022409E8 - add r0, r5, #0 - bl ov17_02240910 -_022409E8: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022409EC: .word 0xFFFFFB00 -_022409F0: .word 0x00007FFF - thumb_func_end ov17_02240950 - - thumb_func_start ov17_022409F4 -ov17_022409F4: ; 0x022409F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x69 - add r5, r0, #0 - mov r0, #0 - lsl r1, r1, #2 - str r0, [sp, #4] - add r0, r5, r1 - str r0, [sp] - add r0, r1, #0 - add r0, #0x50 - add r1, #0xa0 - add r4, r5, #0 - add r7, r5, r0 - add r6, r5, r1 -_02240A12: - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02240A22 - ldr r0, [sp] - bl sub_0201A8FC -_02240A22: - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02240A32 - add r0, r7, #0 - bl sub_0201A8FC -_02240A32: - mov r0, #0x25 - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02240A42 - add r0, r6, #0 - bl sub_0201A8FC -_02240A42: - ldr r0, [sp] - add r4, #0x14 - add r0, #0x14 - str r0, [sp] - ldr r0, [sp, #4] - add r7, #0x14 - add r0, r0, #1 - add r6, #0x14 - str r0, [sp, #4] - cmp r0, #4 - blt _02240A12 - mov r0, #0xa5 - lsl r0, r0, #2 - add r7, r0, #0 - mov r6, #0 - add r4, r5, r0 - add r7, #0xc -_02240A64: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02240A70 - add r0, r4, #0 - bl sub_0201A8FC -_02240A70: - add r6, r6, #1 - add r5, #0x14 - add r4, #0x14 - cmp r6, #3 - blt _02240A64 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_022409F4 - - thumb_func_start ov17_02240A80 -ov17_02240A80: ; 0x02240A80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - mov r0, #0x69 - lsl r0, r0, #2 - add r6, r5, r0 - mov r0, #0 - str r0, [sp, #0x20] - add r0, r6, #0 - str r0, [sp, #0x18] - add r0, #0x50 - str r0, [sp, #0x18] - add r0, r6, #0 - str r0, [sp, #0x14] - add r0, #0xa0 - add r7, r1, #0 - str r6, [sp, #0x1c] - str r0, [sp, #0x14] -_02240AA4: - ldrh r0, [r7] - cmp r0, #0 - beq _02240ACA - ldr r1, [sp, #0x20] - add r4, r6, r1 - mov r1, #0xa - bl sub_020790C4 - mov r1, #0x4b - lsl r1, r1, #2 - strb r0, [r4, r1] - ldrh r0, [r7] - mov r1, #0xb - bl sub_020790C4 - mov r1, #0x13 - lsl r1, r1, #4 - strb r0, [r4, r1] - b _02240ADA -_02240ACA: - ldr r0, [sp, #0x20] - mov r1, #0 - add r4, r6, r0 - mov r0, #0x4b - lsl r0, r0, #2 - strb r1, [r4, r0] - add r0, r0, #4 - strb r1, [r4, r0] -_02240ADA: - ldrh r0, [r7] - mov r1, #0x15 - bl sub_0200B2EC - str r0, [sp, #0x24] - ldr r0, _02240BE4 ; =0x00010708 - ldr r1, [sp, #0x24] - str r0, [sp] - ldr r3, [sp, #0x1c] - add r0, r5, #0 - mov r2, #2 - bl ov17_02240BF4 - ldr r0, [sp, #0x24] - bl sub_020237BC - mov r0, #0x4b - lsl r0, r0, #2 - ldrb r0, [r4, r0] - add r1, sp, #0x34 - add r2, sp, #0x30 - bl sub_02095750 - ldr r0, [r5, #4] - ldr r1, [sp, #0x34] - ldr r0, [r0, #0x40] - bl sub_0200B1EC - str r0, [sp, #0x28] - ldr r0, [r5, #4] - ldr r1, [sp, #0x30] - ldr r0, [r0, #0x40] - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, _02240BE8 ; =0x00010200 - ldr r1, [sp, #0x28] - str r0, [sp] - ldr r3, [sp, #0x18] - add r0, r5, #0 - mov r2, #0 - bl ov17_02240BF4 - ldr r0, _02240BE8 ; =0x00010200 - ldr r3, [sp, #0x14] - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov17_02240BF4 - ldr r0, [sp, #0x28] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x1c] - add r7, r7, #2 - add r0, #0x14 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, #0x14 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r0, #0x14 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #4 - blt _02240AA4 - mov r7, #0 - add r4, r7, #0 - add r6, #0xf0 -_02240B70: - ldr r0, [r5, #4] - mov r1, #0x15 - ldr r0, [r0, #0] - add r0, r0, r4 - add r0, #0xd0 - ldrh r0, [r0] - bl ov17_0223F310 - str r0, [sp, #0x2c] - ldr r0, _02240BEC ; =0x0001090A - ldr r1, [sp, #0x2c] - str r0, [sp] - add r0, r5, #0 - mov r2, #2 - add r3, r6, #0 - bl ov17_02240BF4 - ldr r0, [sp, #0x2c] - bl sub_020237BC - add r7, r7, #1 - add r4, #8 - add r6, #0x14 - cmp r7, #3 - blt _02240B70 - ldr r3, _02240BF0 ; =0x000080F1 - ldr r2, [r5, #4] - add r0, r3, #7 - str r3, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r2, #0x18] - ldr r1, [r2, #0x1c] - ldr r2, [r2, #0x50] - add r3, #0xc - bl ov17_02252AB0 - ldr r3, _02240BF0 ; =0x000080F1 - ldr r1, [r5, #4] - add r0, r3, #7 - str r3, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - mov r2, #0x15 - add r3, #0xc - bl ov17_02252B48 - mov r1, #0xc5 - lsl r1, r1, #2 - str r0, [r5, r1] - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240BE4: .word 0x00010708 -_02240BE8: .word 0x00010200 -_02240BEC: .word 0x0001090A -_02240BF0: .word 0x000080F1 - thumb_func_end ov17_02240A80 - - thumb_func_start ov17_02240BF4 -ov17_02240BF4: ; 0x02240BF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r7, r2, #0 - add r6, r1, #0 - add r5, r0, #0 - add r4, r3, #0 - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #0x1c - add r3, sp, #0x18 - bl ov17_02240C60 - ldr r0, [sp, #0x1c] - strh r0, [r4, #0x12] - ldr r0, [sp, #0x18] - strh r0, [r4, #0x10] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02240C20 - add r0, r4, #0 - bl sub_0201A8FC -_02240C20: - add r0, r4, #0 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r5, #4] - ldr r2, [sp, #0x18] - ldr r0, [r0, #0x24] - lsl r2, r2, #0x18 - add r1, r4, #0 - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x38] - add r1, r7, #0 - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - add r0, r4, #0 - add r2, r6, #0 - str r3, [sp, #0x14] - bl sub_0201D7E0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02240BF4 - - thumb_func_start ov17_02240C60 -ov17_02240C60: ; 0x02240C60 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r6, r2, #0 - add r0, r1, #0 - add r1, r4, #0 - mov r2, #0 - add r7, r3, #0 - bl sub_02002D7C - add r4, r0, #0 - asr r1, r4, #2 - lsr r1, r1, #0x1d - add r1, r4, r1 - asr r5, r1, #3 - mov r1, #8 - bl sub_020BD140 - cmp r0, #0 - beq _02240C88 - add r5, r5, #1 -_02240C88: - str r4, [r6, #0] - str r5, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02240C60 - - thumb_func_start ov17_02240C90 -ov17_02240C90: ; 0x02240C90 - push {r4, r5, r6, lr} - mov r6, #0xc6 - lsl r6, r6, #2 - add r2, r6, #0 - add r5, r0, #0 - sub r2, #0x38 - ldrsb r2, [r5, r2] - ldr r1, _02240CF4 ; =0x02253558 - mov r3, #0x30 - add r4, r2, #0 - mul r4, r3 - add r4, r1, r4 - ldr r2, [r4, #0x20] - cmp r2, #0 - bne _02240CB4 - sub r3, #0x31 - add r0, r3, #0 - pop {r4, r5, r6, pc} -_02240CB4: - ldrb r1, [r5, r6] - cmp r1, #0 - bne _02240CEE - add r0, r6, #4 - ldrb r0, [r5, r0] - cmp r0, #1 - beq _02240CCC - ldr r1, _02240CF8 ; =0x021BF67C - ldr r2, [r1, #0x48] - ldr r1, _02240CFC ; =0x00000CF3 - tst r1, r2 - beq _02240CE8 -_02240CCC: - cmp r0, #0 - bne _02240CD6 - ldr r0, _02240D00 ; =0x000005DC - bl sub_02005748 -_02240CD6: - mov r1, #1 - mov r0, #0xc7 - strb r1, [r5, r6] - mov r2, #0 - lsl r0, r0, #2 - strb r2, [r5, r0] - ldr r2, [r4, #0x20] - add r0, r5, #0 - blx r2 -_02240CE8: - mov r0, #0 - mvn r0, r0 - pop {r4, r5, r6, pc} -_02240CEE: - mov r1, #0 - blx r2 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02240CF4: .word 0x02253558 -_02240CF8: .word 0x021BF67C -_02240CFC: .word 0x00000CF3 -_02240D00: .word 0x000005DC - thumb_func_end ov17_02240C90 - - thumb_func_start ov17_02240D04 -ov17_02240D04: ; 0x02240D04 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r1, [sp, #8] - mov r1, #0x31 - add r5, r0, #0 - lsl r1, r1, #4 - add r0, r5, r1 - str r0, [sp, #0xc] - add r0, r1, #0 - sub r1, #0x30 - add r0, #8 - add r6, r5, r0 - ldrsb r1, [r5, r1] - mov r0, #0x30 - ldr r2, _02240E5C ; =0x02253558 - mul r0, r1 - add r7, r2, r0 - mov r4, #0 - b _02240D48 -_02240D2A: - ldr r0, [r5, #4] - ldr r1, _02240E60 ; =0x00000123 - ldr r0, [r0, #0] - mov r2, #0 - ldrb r1, [r0, r1] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r4, #0 - add r1, #0x36 - bl sub_02074470 - lsl r2, r4, #1 - add r1, sp, #0x10 - strh r0, [r1, r2] - add r4, r4, #1 -_02240D48: - cmp r4, #4 - blt _02240D2A - ldr r0, [sp, #8] - cmp r0, #1 - bne _02240DC6 - ldr r0, [sp, #0xc] - mov r1, #0 - ldrsb r0, [r0, r1] - mov r4, #1 - strb r0, [r6, #2] - ldr r0, [sp, #0xc] - ldrsb r0, [r0, r4] - strb r0, [r6, #1] - ldrsb r0, [r6, r4] - lsl r3, r0, #1 - mov r0, #2 - ldrsb r2, [r6, r0] - ldr r0, _02240E64 ; =0x0225323C - add r0, r0, r3 - ldrb r3, [r2, r0] - add r0, sp, #0x10 - lsl r2, r3, #1 - ldrh r0, [r0, r2] - cmp r0, #0 - bne _02240D92 - ldr r0, [sp, #0xc] - strb r1, [r0] - strb r1, [r0, #1] - strb r1, [r6, #2] - strb r1, [r6, #1] - ldrsb r0, [r6, r4] - lsl r2, r0, #1 - mov r0, #2 - ldrsb r1, [r6, r0] - ldr r0, _02240E64 ; =0x0225323C - add r0, r0, r2 - ldrb r3, [r1, r0] -_02240D92: - ldr r0, [r7, #0x14] - lsl r3, r3, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r7, #0x14] - mov r0, #0xc5 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov17_02252C78 - mov r0, #0 - add sp, #0x1c - mvn r0, r0 - pop {r4, r5, r6, r7, pc} -_02240DC6: - ldr r0, _02240E64 ; =0x0225323C - add r1, sp, #0x18 - mov r2, #4 - bl sub_020C4DB0 - mov r1, #2 - add r0, r6, #0 - add r2, r1, #0 - add r3, sp, #0x18 - bl ov17_02241004 - cmp r0, #0x20 - bhi _02240DF6 - bhs _02240E02 - cmp r0, #2 - bhi _02240DF0 - cmp r0, #1 - blo _02240E54 - beq _02240E40 - cmp r0, #2 - b _02240E54 -_02240DF0: - cmp r0, #0x10 - beq _02240E02 - b _02240E54 -_02240DF6: - cmp r0, #0x40 - bhi _02240DFE - beq _02240E02 - b _02240E54 -_02240DFE: - cmp r0, #0x80 - bne _02240E54 -_02240E02: - mov r0, #1 - ldrsb r0, [r6, r0] - ldr r2, _02240E64 ; =0x0225323C - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r6, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r7, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r7, #0x14] - mov r0, #0xc5 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov17_02252C78 - b _02240E54 -_02240E40: - mov r0, #1 - ldrsb r0, [r6, r0] - ldr r2, _02240E64 ; =0x0225323C - add sp, #0x1c - lsl r3, r0, #1 - mov r0, #2 - ldrsb r1, [r6, r0] - add r0, r2, r3 - ldrb r0, [r1, r0] - pop {r4, r5, r6, r7, pc} -_02240E54: - mov r0, #0 - mvn r0, r0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240E5C: .word 0x02253558 -_02240E60: .word 0x00000123 -_02240E64: .word 0x0225323C - thumb_func_end ov17_02240D04 - - thumb_func_start ov17_02240E68 -ov17_02240E68: ; 0x02240E68 - push {r4, r5, r6, r7} - mov r2, #0x31 - lsl r2, r2, #4 - mov r4, #0 - add r2, r0, r2 - ldr r7, _02240EA0 ; =0x0225323C - add r0, r4, #0 - b _02240E96 -_02240E78: - lsl r5, r4, #1 - add r3, r0, #0 - add r6, r7, r5 - b _02240E90 -_02240E80: - ldrb r5, [r3, r6] - cmp r1, r5 - bne _02240E8E - strb r3, [r2] - strb r4, [r2, #1] - pop {r4, r5, r6, r7} - bx lr -_02240E8E: - add r3, r3, #1 -_02240E90: - cmp r3, #2 - blt _02240E80 - add r4, r4, #1 -_02240E96: - cmp r4, #2 - blt _02240E78 - pop {r4, r5, r6, r7} - bx lr - nop -_02240EA0: .word 0x0225323C - thumb_func_end ov17_02240E68 - - thumb_func_start ov17_02240EA4 -ov17_02240EA4: ; 0x02240EA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r7, #0x31 - lsl r7, r7, #4 - add r3, r7, #0 - add r6, r0, #0 - sub r3, #0x30 - add r0, r7, #0 - ldrsb r5, [r6, r3] - add r0, #8 - add r4, r6, r0 - mov r3, #0x30 - add r2, r1, #0 - ldr r0, _02240FBC ; =0x02253558 - mul r3, r5 - add r1, r6, r7 - add r5, r0, r3 - cmp r2, #1 - bne _02240F18 - mov r0, #2 - ldrsb r2, [r1, r0] - strb r2, [r4, #2] - mov r2, #3 - ldrsb r1, [r1, r2] - strb r1, [r4, #1] - mov r1, #1 - ldrsb r2, [r4, r1] - ldrsb r3, [r4, r0] - lsl r1, r2, #1 - add r2, r2, r1 - ldr r1, _02240FC0 ; =0x02253240 - add r0, r1, r2 - ldrb r1, [r3, r0] - ldr r0, [r5, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r5, #0x14] - add r0, r7, #4 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov17_02252C78 - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02240F18: - ldr r0, _02240FC0 ; =0x02253240 - add r1, sp, #8 - mov r2, #6 - bl sub_020C4DB0 - add r0, r4, #0 - mov r1, #3 - mov r2, #2 - add r3, sp, #8 - bl ov17_02241004 - cmp r0, #0x20 - bhi _02240F4A - bhs _02240F56 - cmp r0, #2 - bhi _02240F44 - cmp r0, #1 - blo _02240FB2 - beq _02240F96 - cmp r0, #2 - beq _02240FAC - b _02240FB2 -_02240F44: - cmp r0, #0x10 - beq _02240F56 - b _02240FB2 -_02240F4A: - cmp r0, #0x40 - bhi _02240F52 - beq _02240F56 - b _02240FB2 -_02240F52: - cmp r0, #0x80 - bne _02240FB2 -_02240F56: - mov r0, #1 - ldrsb r1, [r4, r0] - ldr r2, _02240FC0 ; =0x02253240 - lsl r0, r1, #1 - add r3, r1, r0 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r1, [r1, r0] - ldr r0, [r5, #0x14] - lsl r3, r1, #2 - add r0, r0, r3 - ldrb r0, [r0, #1] - sub r0, #8 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r4, [r5, #0x14] - mov r0, #0xc5 - add r2, r4, r3 - ldrb r1, [r2, #2] - ldrb r2, [r2, #3] - ldrb r3, [r4, r3] - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r1, #8 - sub r2, #8 - add r3, #8 - bl ov17_02252C78 - b _02240FB2 -_02240F96: - mov r0, #1 - ldrsb r1, [r4, r0] - ldr r2, _02240FC0 ; =0x02253240 - add sp, #0x10 - lsl r0, r1, #1 - add r3, r1, r0 - mov r0, #2 - ldrsb r1, [r4, r0] - add r0, r2, r3 - ldrb r0, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_02240FAC: - add sp, #0x10 - mov r0, #3 - pop {r3, r4, r5, r6, r7, pc} -_02240FB2: - mov r0, #0 - mvn r0, r0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240FBC: .word 0x02253558 -_02240FC0: .word 0x02253240 - thumb_func_end ov17_02240EA4 - - thumb_func_start ov17_02240FC4 -ov17_02240FC4: ; 0x02240FC4 - push {r4, r5, r6, r7} - cmp r1, #3 - beq _02240FFC - mov r2, #0x31 - lsl r2, r2, #4 - add r3, r0, r2 - mov r5, #0 - ldr r0, _02241000 ; =0x02253240 - add r2, r5, #0 - b _02240FF8 -_02240FD8: - lsl r6, r5, #1 - add r6, r5, r6 - add r4, r2, #0 - add r7, r0, r6 - b _02240FF2 -_02240FE2: - ldrb r6, [r4, r7] - cmp r1, r6 - bne _02240FF0 - strb r4, [r3, #2] - strb r5, [r3, #3] - pop {r4, r5, r6, r7} - bx lr -_02240FF0: - add r4, r4, #1 -_02240FF2: - cmp r4, #3 - blt _02240FE2 - add r5, r5, #1 -_02240FF8: - cmp r5, #2 - blt _02240FD8 -_02240FFC: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_02241000: .word 0x02253240 - thumb_func_end ov17_02240FC4 - - thumb_func_start ov17_02241004 -ov17_02241004: ; 0x02241004 - push {r3, r4, r5, r6, r7, lr} - mov r7, #2 - add r4, r1, #0 - ldrsb r1, [r0, r7] - mov r5, #1 - add r6, r2, #0 - str r1, [sp] - ldrsb r1, [r0, r5] - add r2, r3, #0 - mov r3, #0x40 - mov ip, r1 - ldr r1, _022411DC ; =0x021BF67C - ldr r1, [r1, #0x48] - tst r3, r1 - beq _02241072 - mov r1, ip - sub r1, r1, #1 - strb r1, [r0, #1] - ldrsb r1, [r0, r5] - cmp r1, #0 - bge _02241032 - mov r1, #0 - strb r1, [r0, #1] -_02241032: - cmp r2, #0 - beq _0224106E - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _0224106E - add r1, r0, #1 - mov r7, #0 - mov r6, #1 -_0224104E: - ldrsb r3, [r1, r7] - sub r3, r3, #1 - strb r3, [r1] - ldrsb r3, [r0, r6] - cmp r3, #0 - bge _02241060 - mov r1, ip - strb r1, [r0, #1] - b _0224106E -_02241060: - mov r5, #2 - ldrsb r5, [r0, r5] - mul r3, r4 - add r5, r2, r5 - ldrb r3, [r3, r5] - cmp r3, #0xff - beq _0224104E -_0224106E: - mov r5, #0x40 - b _02241186 -_02241072: - mov r3, #0x80 - tst r3, r1 - beq _022410C8 - mov r1, ip - add r1, r1, #1 - strb r1, [r0, #1] - ldrsb r1, [r0, r5] - cmp r1, r6 - blt _02241088 - sub r1, r6, #1 - strb r1, [r0, #1] -_02241088: - cmp r2, #0 - beq _022410C4 - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _022410C4 - add r1, r0, #1 - mov r7, #1 -_022410A2: - mov r3, #0 - ldrsb r3, [r1, r3] - add r3, r3, #1 - strb r3, [r1] - ldrsb r3, [r0, r7] - cmp r3, r6 - blt _022410B6 - mov r1, ip - strb r1, [r0, #1] - b _022410C4 -_022410B6: - mov r5, #2 - ldrsb r5, [r0, r5] - mul r3, r4 - add r5, r2, r5 - ldrb r3, [r3, r5] - cmp r3, #0xff - beq _022410A2 -_022410C4: - mov r5, #0x80 - b _02241186 -_022410C8: - mov r3, #0x20 - tst r3, r1 - beq _0224111E - ldr r1, [sp] - sub r1, r1, #1 - strb r1, [r0, #2] - ldrsb r1, [r0, r7] - cmp r1, #0 - bge _022410DE - mov r1, #0 - strb r1, [r0, #2] -_022410DE: - cmp r2, #0 - beq _0224111A - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _0224111A - add r5, r0, #2 - mov r7, #0 - mov r6, #2 -_022410FA: - ldrsb r1, [r5, r7] - sub r1, r1, #1 - strb r1, [r5] - ldrsb r3, [r0, r6] - cmp r3, #0 - bge _0224110C - ldr r1, [sp] - strb r1, [r0, #2] - b _0224111A -_0224110C: - mov r1, #1 - ldrsb r1, [r0, r1] - add r3, r2, r3 - mul r1, r4 - ldrb r1, [r1, r3] - cmp r1, #0xff - beq _022410FA -_0224111A: - mov r5, #0x20 - b _02241186 -_0224111E: - mov r3, #0x10 - tst r3, r1 - beq _02241174 - ldr r1, [sp] - add r1, r1, #1 - strb r1, [r0, #2] - ldrsb r1, [r0, r7] - cmp r1, r4 - blt _02241134 - sub r1, r4, #1 - strb r1, [r0, #2] -_02241134: - cmp r2, #0 - beq _02241170 - mov r3, #1 - mov r1, #2 - ldrsb r3, [r0, r3] - ldrsb r1, [r0, r1] - mul r3, r4 - add r1, r1, r3 - ldrb r1, [r2, r1] - cmp r1, #0xff - bne _02241170 - add r5, r0, #2 - mov r7, #0 - mov r6, #2 -_02241150: - ldrsb r1, [r5, r7] - add r1, r1, #1 - strb r1, [r5] - ldrsb r3, [r0, r6] - cmp r3, r4 - blt _02241162 - ldr r1, [sp] - strb r1, [r0, #2] - b _02241170 -_02241162: - mov r1, #1 - ldrsb r1, [r0, r1] - add r3, r2, r3 - mul r1, r4 - ldrb r1, [r1, r3] - cmp r1, #0xff - beq _02241150 -_02241170: - mov r5, #0x10 - b _02241186 -_02241174: - add r3, r1, #0 - tst r3, r5 - bne _02241186 - tst r1, r7 - beq _02241182 - add r5, r7, #0 - b _02241186 -_02241182: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02241186: - cmp r2, #0 - beq _022411B0 - mov r1, ip - add r3, r4, #0 - mul r3, r1 - ldr r1, [sp] - add r1, r1, r3 - mov r3, #2 - ldrsb r6, [r0, r3] - mov r3, #1 - ldrsb r3, [r0, r3] - ldrb r1, [r2, r1] - mul r3, r4 - add r3, r6, r3 - ldrb r2, [r2, r3] - cmp r1, r2 - bne _022411B0 - ldr r1, [sp] - strb r1, [r0, #2] - mov r1, ip - strb r1, [r0, #1] -_022411B0: - mov r1, #2 - ldrsb r2, [r0, r1] - ldr r1, [sp] - cmp r2, r1 - bne _022411C4 - mov r1, #1 - ldrsb r1, [r0, r1] - mov r0, ip - cmp r1, r0 - beq _022411CC -_022411C4: - ldr r0, _022411E0 ; =0x000005DC - bl sub_02005748 - b _022411D6 -_022411CC: - mov r0, #0xf0 - tst r0, r5 - beq _022411D6 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022411D6: - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022411DC: .word 0x021BF67C -_022411E0: .word 0x000005DC - thumb_func_end ov17_02241004 - - thumb_func_start ov17_022411E4 -ov17_022411E4: ; 0x022411E4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0 - mov r2, #0xb7 - add r4, r1, #0 - str r0, [sp] - lsl r2, r2, #2 - ldr r0, [r4, #4] - ldr r2, [r4, r2] - mov r3, #6 - ldr r0, [r0, #0x24] - ldr r2, [r2, #0x14] - mov r1, #4 - lsl r3, r3, #0xc - bl sub_0201958C - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0xb6 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_022411E4 - - thumb_func_start ov17_02241220 -ov17_02241220: ; 0x02241220 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - mov r0, #0x2e - lsl r0, r0, #4 - ldrsb r1, [r1, r0] - mov r0, #0x30 - mov r4, #0 - ldr r2, _02241268 ; =0x02253558 - mul r0, r1 - ldr r6, _0224126C ; =0x0000FFFF - add r5, r2, r0 - add r7, r4, #0 -_02241238: - ldrh r0, [r5, #4] - cmp r0, r6 - bne _0224124C - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r7, #0 - bl sub_02019120 - b _02241258 -_0224124C: - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r1, #1 - bl sub_02019120 -_02241258: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _02241238 - ldr r0, [sp] - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241268: .word 0x02253558 -_0224126C: .word 0x0000FFFF - thumb_func_end ov17_02241220 - - thumb_func_start ov17_02241270 -ov17_02241270: ; 0x02241270 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - mov r3, #2 - str r3, [sp, #4] - ldr r3, _022412B8 ; =0x000080FB - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x2a - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022412BC ; =0x000080F6 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x2b - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022412BC ; =0x000080F6 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x2c - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022412B8: .word 0x000080FB -_022412BC: .word 0x000080F6 - thumb_func_end ov17_02241270 - - thumb_func_start ov17_022412C0 -ov17_022412C0: ; 0x022412C0 - push {r3, r4, r5, lr} - add r5, r2, #0 - ldr r2, _022412EC ; =0x0225364C - bl sub_0200CE6C - mov r1, #0x58 - mul r1, r5 - add r1, #0x28 - lsl r1, r1, #0x10 - mov r3, #0x11 - add r4, r0, #0 - asr r1, r1, #0x10 - mov r2, #0x60 - lsl r3, r3, #0x10 - bl sub_0200D500 - ldr r0, [r4, #0] - bl sub_0200D324 - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_022412EC: .word 0x0225364C - thumb_func_end ov17_022412C0 - - thumb_func_start ov17_022412F0 -ov17_022412F0: ; 0x022412F0 - push {r4, lr} - ldr r1, _0224130C ; =0x000080FB - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _02241310 ; =0x000080F6 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _02241310 ; =0x000080F6 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224130C: .word 0x000080FB -_02241310: .word 0x000080F6 - thumb_func_end ov17_022412F0 - - thumb_func_start ov17_02241314 -ov17_02241314: ; 0x02241314 - ldr r3, _02241318 ; =sub_0200D0F4 - bx r3 - ; .align 2, 0 -_02241318: .word sub_0200D0F4 - thumb_func_end ov17_02241314 - - thumb_func_start ov17_0224131C -ov17_0224131C: ; 0x0224131C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - mov r3, #2 - str r3, [sp, #4] - ldr r3, _02241364 ; =0x000080FA - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x2d - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02241368 ; =0x000080F5 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x2e - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02241368 ; =0x000080F5 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x2f - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02241364: .word 0x000080FA -_02241368: .word 0x000080F5 - thumb_func_end ov17_0224131C - - thumb_func_start ov17_0224136C -ov17_0224136C: ; 0x0224136C - push {r4, r5, r6, lr} - add r5, r2, #0 - ldr r2, [sp, #0x10] - add r6, r3, #0 - cmp r2, #0 - blt _02241380 - ldr r2, _022413A4 ; =0x02253618 - bl sub_0200CE6C - b _02241386 -_02241380: - ldr r2, _022413A8 ; =0x02253680 - bl sub_0200CE6C -_02241386: - add r4, r0, #0 - lsl r1, r5, #0x10 - lsl r2, r6, #0x10 - mov r3, #0x11 - add r0, r4, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x10 - bl sub_0200D500 - ldr r0, [r4, #0] - bl sub_0200D324 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022413A4: .word 0x02253618 -_022413A8: .word 0x02253680 - thumb_func_end ov17_0224136C - - thumb_func_start ov17_022413AC -ov17_022413AC: ; 0x022413AC - ldr r3, _022413B0 ; =sub_0200D0F4 - bx r3 - ; .align 2, 0 -_022413B0: .word sub_0200D0F4 - thumb_func_end ov17_022413AC - - thumb_func_start ov17_022413B4 -ov17_022413B4: ; 0x022413B4 - push {r4, lr} - ldr r1, _022413D0 ; =0x000080FA - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _022413D4 ; =0x000080F5 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _022413D4 ; =0x000080F5 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_022413D0: .word 0x000080FA -_022413D4: .word 0x000080F5 - thumb_func_end ov17_022413B4 - - thumb_func_start ov17_022413D8 -ov17_022413D8: ; 0x022413D8 - ldr r0, _022413E0 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - bx lr - ; .align 2, 0 -_022413E0: .word 0x04000050 - thumb_func_end ov17_022413D8 - - thumb_func_start ov17_022413E4 -ov17_022413E4: ; 0x022413E4 - push {r3, r4, r5, r6, r7, lr} - ldr r0, [r0, #0x30] - add r5, r1, #0 - mov r1, #2 - add r4, r2, #0 - bl sub_02019FE4 - mov r1, #0xc0 - mul r1, r5 - lsl r1, r1, #1 - mov r2, #0 - ldr r6, _02241424 ; =0x00000FFF - add r0, r0, r1 - add r3, r2, #0 - lsl r4, r4, #0xc -_02241402: - lsl r5, r3, #1 - mov r1, #0 - add r5, r0, r5 -_02241408: - ldrh r7, [r5] - add r1, r1, #1 - and r7, r6 - orr r7, r4 - strh r7, [r5] - add r5, r5, #2 - cmp r1, #0xa - blt _02241408 - add r2, r2, #1 - add r3, #0x20 - cmp r2, #6 - blt _02241402 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241424: .word 0x00000FFF - thumb_func_end ov17_022413E4 - - thumb_func_start ov17_02241428 -ov17_02241428: ; 0x02241428 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r4, #0 - ldr r6, _02241454 ; =0x022536B4 - ldr r7, _02241458 ; =0x00000231 - b _02241444 -_02241434: - add r2, r5, r4 - ldrb r2, [r2, r7] - add r0, r5, #0 - add r1, r4, #0 - ldrb r2, [r6, r2] - bl ov17_022413E4 - add r4, r4, #1 -_02241444: - cmp r4, #4 - blt _02241434 - ldr r0, [r5, #0x30] - mov r1, #2 - bl sub_0201C3C0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241454: .word 0x022536B4 -_02241458: .word 0x00000231 - thumb_func_end ov17_02241428 - - thumb_func_start ov17_0224145C -ov17_0224145C: ; 0x0224145C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x15 - mov r1, #0xc - bl sub_02018144 - mov r1, #0 - mov r2, #0xc - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [r5, #0x5c] - ldr r2, _0224148C ; =0x00009CA4 - str r0, [r4, #0] - ldr r0, _02241490 ; =ov17_022414C0 - add r1, r4, #0 - strb r6, [r4, #0xa] - bl sub_0200D9E8 - str r0, [r4, #4] - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_0224148C: .word 0x00009CA4 -_02241490: .word ov17_022414C0 - thumb_func_end ov17_0224145C - - thumb_func_start ov17_02241494 -ov17_02241494: ; 0x02241494 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #0xb] - cmp r0, #0 - beq _022414A2 - bl sub_02022974 -_022414A2: - ldr r0, [r4, #4] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov17_02241494 - - thumb_func_start ov17_022414B0 -ov17_022414B0: ; 0x022414B0 - mov r1, #1 - strb r1, [r0, #0xb] - mov r1, #0xa - lsl r1, r1, #8 - strh r1, [r0, #8] - bx lr - thumb_func_end ov17_022414B0 - - thumb_func_start ov17_022414BC -ov17_022414BC: ; 0x022414BC - ldrb r0, [r0, #0xb] - bx lr - thumb_func_end ov17_022414BC - - thumb_func_start ov17_022414C0 -ov17_022414C0: ; 0x022414C0 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - ldrb r0, [r4, #0xb] - cmp r0, #0 - beq _02241516 - mov r0, #8 - ldrsh r0, [r4, r0] - ldr r2, _0224151C ; =0x022536B4 - mov r1, #0 - asr r0, r0, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, _02241520 ; =0x00007FFF - str r0, [sp, #4] - ldrb r3, [r4, #0xa] - ldr r0, [r4, #0] - ldrb r2, [r2, r3] - mov r3, #4 - lsl r2, r2, #4 - add r2, r2, #1 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - bl sub_020039B0 - mov r1, #8 - ldrsh r2, [r4, r1] - cmp r2, #0 - bne _02241504 - mov r0, #0 - add sp, #8 - strb r0, [r4, #0xb] - pop {r4, pc} -_02241504: - mov r0, #0xa - lsl r0, r0, #6 - sub r0, r2, r0 - strh r0, [r4, #8] - ldrsh r0, [r4, r1] - cmp r0, #0 - bge _02241516 - mov r0, #0 - strh r0, [r4, #8] -_02241516: - add sp, #8 - pop {r4, pc} - nop -_0224151C: .word 0x022536B4 -_02241520: .word 0x00007FFF - thumb_func_end ov17_022414C0 - - thumb_func_start ov17_02241524 -ov17_02241524: ; 0x02241524 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - str r0, [sp, #0x18] - add r0, #8 - str r0, [sp, #0x18] - add r6, r1, #0 - lsl r0, r6, #2 - ldr r1, [sp, #0x18] - str r0, [sp, #0x1c] - ldr r0, [r1, r0] - bl sub_02007DC8 - lsl r0, r6, #4 - add r0, r5, r0 - ldr r0, [r0, #0x58] - cmp r0, #0 - bne _0224154C - bl sub_02022974 -_0224154C: - add r2, r5, #0 - add r2, #0x58 - lsl r1, r6, #4 - add r0, r2, r1 - str r0, [sp, #0x14] - ldr r0, [r2, r1] - mov r2, #0x32 - mov r1, #0 - lsl r2, r2, #6 - bl sub_020C4CF4 - ldr r1, [sp, #0x14] - lsl r0, r6, #5 - str r1, [sp] - mov r1, #0x15 - str r1, [sp, #4] - mov r1, #0xd8 - sub r1, r1, r0 - str r1, [sp, #8] - mov r1, #0x70 - sub r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, _022415E0 ; =0xFFFFFE00 - add r7, r5, #0 - str r0, [sp, #0x10] - ldr r2, [r5, #0] - lsl r4, r6, #2 - ldr r0, [r5, #4] - ldr r2, [r2, r4] - add r7, #8 - add r1, r6, #0 - mov r3, #0 - bl sub_02095484 - str r0, [r7, r4] - ldr r0, [r7, r4] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - ldr r0, [r7, r4] - mov r1, #0x25 - mov r2, #1 - bl sub_02007DEC - ldr r0, [r5, #0] - mov r1, #5 - ldr r0, [r0, r4] - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x70 - ldr r0, [r0, r4] - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - add r0, r6, #0 - bl ov12_022384F0 - cmp r0, #1 - bne _022415DA - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x1c] - mov r2, #1 - ldr r0, [r1, r0] - mov r1, #0x23 - bl sub_02007DEC -_022415DA: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_022415E0: .word 0xFFFFFE00 - thumb_func_end ov17_02241524 - - thumb_func_start ov17_022415E4 -ov17_022415E4: ; 0x022415E4 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r6, r0, #0 - mov r0, #0 - str r0, [sp, #0x1c] - add r7, r0, #0 - add r0, r6, #0 - str r0, [sp, #0x14] - add r0, #0x58 - ldr r4, [sp, #0x1c] - str r6, [sp, #0x18] - str r0, [sp, #0x14] - add r5, r6, #0 -_022415FE: - ldr r0, [sp, #0x18] - ldr r0, [r0, #0x58] - cmp r0, #0 - beq _0224160A - bl sub_02022974 -_0224160A: - mov r1, #0x32 - mov r0, #0x15 - lsl r1, r1, #6 - bl sub_02018144 - ldr r1, [sp, #0x18] - mov r3, #0 - str r0, [r1, #0x58] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - str r0, [sp] - mov r0, #0x15 - str r0, [sp, #4] - mov r0, #0xd8 - sub r0, r0, r7 - str r0, [sp, #8] - mov r0, #0x70 - sub r0, r0, r7 - str r0, [sp, #0xc] - ldr r0, _022416E0 ; =0xFFFFFE00 - str r0, [sp, #0x10] - ldr r2, [r6, #0] - ldr r0, [r6, #4] - ldr r2, [r2, r4] - bl sub_02095484 - str r0, [r5, #8] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - ldr r0, [r5, #8] - mov r1, #0x25 - mov r2, #1 - bl sub_02007DEC - ldr r0, [r6, #0] - mov r1, #5 - ldr r0, [r0, r4] - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x20] - ldr r0, [r6, #0] - mov r1, #0x70 - ldr r0, [r0, r4] - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - ldr r0, [sp, #0x20] - bl ov12_022384F0 - cmp r0, #1 - bne _02241682 - ldr r0, [r5, #8] - mov r1, #0x23 - mov r2, #1 - bl sub_02007DEC -_02241682: - ldr r0, [sp, #0x18] - add r7, #0x20 - add r0, #0x10 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r4, r4, #4 - add r0, #0x10 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #4 - blt _022415FE - add r0, r6, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022416AC - bl sub_02022974 -_022416AC: - mov r1, #0x32 - mov r0, #0x15 - lsl r1, r1, #6 - bl sub_02018144 - add r1, r6, #0 - add r1, #0x98 - str r0, [r1, #0] - add r0, r6, #0 - mov r2, #0x32 - ldr r1, [r6, #0x60] - add r0, #0xa0 - str r1, [r0, #0] - add r0, r6, #0 - ldr r1, [r6, #0x5c] - add r0, #0x9c - str r1, [r0, #0] - add r6, #0x98 - ldr r1, [r6, #0] - mov r0, #0 - lsl r2, r2, #6 - bl sub_020C4B4C - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_022416E0: .word 0xFFFFFE00 - thumb_func_end ov17_022415E4 - - thumb_func_start ov17_022416E4 -ov17_022416E4: ; 0x022416E4 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - str r0, [sp] - add r4, r0, #0 - add r5, r0, #0 - add r7, r6, #0 -_022416F0: - ldr r0, [r4, #8] - bl sub_02007DC8 - ldr r0, [r5, #0x58] - bl sub_020181C4 - str r7, [r5, #0x58] - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x10 - cmp r6, #4 - blt _022416F0 - ldr r0, [sp] - add r0, #0x98 - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [sp] - mov r1, #0 - add r0, #0x98 - str r0, [sp] - str r1, [r0, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_022416E4 - - thumb_func_start ov17_02241720 -ov17_02241720: ; 0x02241720 - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - ldr r5, [sp, #0x70] - add r6, r1, #0 - str r0, [sp, #0x18] - str r2, [sp, #0x1c] - ldr r4, [sp, #0x74] - cmp r5, #0 - beq _02241738 - cmp r5, #1 - beq _02241746 - b _02241754 -_02241738: - mov r0, #0x20 - str r0, [sp, #0x24] - mov r0, #0x1e - mov r3, #0x1f - mov r7, #1 - str r0, [sp, #0x20] - b _02241760 -_02241746: - mov r0, #0x26 - str r0, [sp, #0x24] - mov r0, #0x24 - mov r3, #0x25 - mov r7, #3 - str r0, [sp, #0x20] - b _02241760 -_02241754: - mov r0, #0x23 - str r0, [sp, #0x24] - mov r0, #0x21 - mov r3, #0x22 - mov r7, #2 - str r0, [sp, #0x20] -_02241760: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02241808 ; =0x000080E9 - ldr r1, [sp, #0x1c] - add r0, r5, r0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0200CC3C - str r4, [sp] - str r7, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _0224180C ; =0x000080EA - ldr r3, [sp, #0x1c] - add r0, r5, r0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - mov r1, #2 - add r2, r6, #0 - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - ldr r0, _02241808 ; =0x000080E9 - ldr r1, [sp, #0x1c] - add r0, r5, r0 - str r0, [sp, #4] - ldr r3, [sp, #0x24] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02241808 ; =0x000080E9 - ldr r1, [sp, #0x1c] - add r0, r5, r0 - str r0, [sp, #4] - ldr r3, [sp, #0x20] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0200CE54 - ldr r4, _02241810 ; =0x022538BC - add r3, sp, #0x28 - mov r2, #6 -_022417C8: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _022417C8 - ldr r0, [r4, #0] - add r2, sp, #0x28 - str r0, [r3, #0] - ldr r0, _02241808 ; =0x000080E9 - add r1, r5, r0 - add r0, r0, #1 - add r0, r5, r0 - str r0, [sp, #0x40] - str r1, [sp, #0x3c] - str r1, [sp, #0x44] - str r1, [sp, #0x48] - lsl r1, r5, #5 - add r1, #0x60 - add r0, sp, #0x28 - strh r1, [r0] - mov r1, #0x28 - strh r1, [r0, #2] - ldr r1, [sp, #0x1c] - add r0, r6, #0 - bl sub_0200CE6C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0200D324 - add r0, r4, #0 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241808: .word 0x000080E9 -_0224180C: .word 0x000080EA -_02241810: .word 0x022538BC - thumb_func_end ov17_02241720 - - thumb_func_start ov17_02241814 -ov17_02241814: ; 0x02241814 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - bl sub_0200D0F4 - ldr r1, _0224184C ; =0x000080E9 - add r0, r5, #0 - add r1, r4, r1 - bl sub_0200D070 - ldr r1, _02241850 ; =0x000080EA - add r0, r5, #0 - add r1, r4, r1 - bl sub_0200D080 - ldr r1, _0224184C ; =0x000080E9 - add r0, r5, #0 - add r1, r4, r1 - bl sub_0200D090 - ldr r1, _0224184C ; =0x000080E9 - add r0, r5, #0 - add r1, r4, r1 - bl sub_0200D0A0 - pop {r3, r4, r5, pc} - nop -_0224184C: .word 0x000080E9 -_02241850: .word 0x000080EA - thumb_func_end ov17_02241814 - - thumb_func_start ov17_02241854 -ov17_02241854: ; 0x02241854 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022418A0 ; =0x000080EC - add r6, r3, #0 - add r4, r2, #0 - add r5, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #0x27 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022418A0 ; =0x000080EC - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x28 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022418A0 ; =0x000080EC - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x29 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022418A0: .word 0x000080EC - thumb_func_end ov17_02241854 - - thumb_func_start ov17_022418A4 -ov17_022418A4: ; 0x022418A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - ldr r4, _022418F8 ; =0x022536F0 - add r6, r2, #0 - add r3, r0, #0 - add r7, r1, #0 - ldmia r4!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - ldr r5, _022418FC ; =0x02253820 - str r0, [r2, #0] - add r4, sp, #0xc - mov r2, #6 -_022418C0: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r2, r2, #1 - bne _022418C0 - ldr r0, [r5, #0] - lsl r1, r6, #5 - str r0, [r4, #0] - add r1, #0x60 - add r0, sp, #0 - strh r1, [r0, #0xc] - mov r1, #0x20 - strh r1, [r0, #0xe] - lsl r1, r6, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - add r1, r7, #0 - str r0, [sp, #0x18] - add r0, r3, #0 - add r2, sp, #0xc - bl sub_0200CE6C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0200D324 - add r0, r4, #0 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022418F8: .word 0x022536F0 -_022418FC: .word 0x02253820 - thumb_func_end ov17_022418A4 - - thumb_func_start ov17_02241900 -ov17_02241900: ; 0x02241900 - ldr r3, _02241904 ; =sub_0200D0F4 - bx r3 - ; .align 2, 0 -_02241904: .word sub_0200D0F4 - thumb_func_end ov17_02241900 - - thumb_func_start ov17_02241908 -ov17_02241908: ; 0x02241908 - push {r4, lr} - ldr r1, _02241924 ; =0x000080EC - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _02241924 ; =0x000080EC - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _02241924 ; =0x000080EC - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_02241924: .word 0x000080EC - thumb_func_end ov17_02241908 - - thumb_func_start ov17_02241928 -ov17_02241928: ; 0x02241928 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - str r2, [sp, #8] - add r6, r1, #0 - ldr r0, [r7, #0x50] - ldr r1, [r7, #0x18] - ldr r2, [r7, #0x1c] - ldr r3, [sp, #8] - bl ov17_02241854 - mov r4, #0 - add r5, r7, #0 - add r6, #0xd0 -_02241944: - ldr r0, [r7, #0x18] - ldr r1, [r7, #0x1c] - add r2, r4, #0 - bl ov17_022418A4 - add r1, r5, #0 - add r1, #0xb4 - str r0, [r1, #0] - ldr r0, [sp, #8] - str r4, [sp] - str r0, [sp, #4] - ldr r0, [r7, #0x50] - ldr r1, [r7, #0x18] - ldr r2, [r7, #0x1c] - add r3, r6, #0 - bl ov17_02241720 - add r1, r5, #0 - add r1, #0xa8 - add r4, r4, #1 - str r0, [r1, #0] - add r5, r5, #4 - add r6, #8 - cmp r4, #3 - blt _02241944 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02241928 - - thumb_func_start ov17_0224197C -ov17_0224197C: ; 0x0224197C - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02241984: - add r1, r5, #0 - add r1, #0xa8 - ldr r0, [r6, #0x1c] - ldr r1, [r1, #0] - add r2, r4, #0 - bl ov17_02241814 - add r0, r5, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - bl ov17_02241900 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _02241984 - ldr r0, [r6, #0x1c] - bl ov17_02241908 - pop {r4, r5, r6, pc} - thumb_func_end ov17_0224197C - - thumb_func_start ov17_022419AC -ov17_022419AC: ; 0x022419AC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022419F8 ; =0x000080F5 - add r6, r3, #0 - add r4, r2, #0 - add r5, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #0xe - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022419FC ; =0x000080F3 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xd - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022419FC ; =0x000080F3 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xc - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022419F8: .word 0x000080F5 -_022419FC: .word 0x000080F3 - thumb_func_end ov17_022419AC - - thumb_func_start ov17_02241A00 -ov17_02241A00: ; 0x02241A00 - push {r4, lr} - ldr r1, _02241A1C ; =0x000080F5 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _02241A20 ; =0x000080F3 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _02241A20 ; =0x000080F3 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_02241A1C: .word 0x000080F5 -_02241A20: .word 0x000080F3 - thumb_func_end ov17_02241A00 - - thumb_func_start ov17_02241A24 -ov17_02241A24: ; 0x02241A24 - push {r4, r5, lr} - sub sp, #0x34 - ldr r4, _02241A60 ; =0x022537B8 - add r5, r0, #0 - add r3, sp, #0 - mov r2, #6 -_02241A30: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02241A30 - ldr r0, [r4, #0] - add r2, sp, #0 - str r0, [r3, #0] - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - bl sub_0200CE6C - add r4, r0, #0 - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0] - bl sub_0200D324 - mov r0, #0x5f - lsl r0, r0, #2 - str r4, [r5, r0] - add sp, #0x34 - pop {r4, r5, pc} - nop -_02241A60: .word 0x022537B8 - thumb_func_end ov17_02241A24 - - thumb_func_start ov17_02241A64 -ov17_02241A64: ; 0x02241A64 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02241A76 - bl sub_02022974 -_02241A76: - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - mov r0, #0x5f - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02241A64 - - thumb_func_start ov17_02241A8C -ov17_02241A8C: ; 0x02241A8C - push {r4, r5, r6, lr} - add r4, r0, #0 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r6, r1, #0 - add r5, r2, #0 - cmp r0, #0 - bne _02241AA2 - bl sub_02022974 -_02241AA2: - ldr r1, _02241B08 ; =0x022536E4 - lsl r2, r6, #2 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r3, _02241B0C ; =0x022536E6 - ldrsh r1, [r1, r2] - ldrsh r2, [r3, r2] - ldr r0, [r4, r0] - bl sub_0200D4C4 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - bl sub_0200D364 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D3F4 - cmp r5, #3 - bhi _02241B04 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02241ADE: ; jump table - .short _02241AE6 - _02241ADE - 2 ; case 0 - .short _02241AEE - _02241ADE - 2 ; case 1 - .short _02241AF6 - _02241ADE - 2 ; case 2 - .short _02241AFE - _02241ADE - 2 ; case 3 -_02241AE6: - ldr r0, _02241B10 ; =0x000006E1 - bl sub_02005748 - pop {r4, r5, r6, pc} -_02241AEE: - ldr r0, _02241B14 ; =0x000006DF - bl sub_02005748 - pop {r4, r5, r6, pc} -_02241AF6: - ldr r0, _02241B18 ; =0x000005DD - bl sub_02005748 - pop {r4, r5, r6, pc} -_02241AFE: - ldr r0, _02241B18 ; =0x000005DD - bl sub_02005748 -_02241B04: - pop {r4, r5, r6, pc} - nop -_02241B08: .word 0x022536E4 -_02241B0C: .word 0x022536E6 -_02241B10: .word 0x000006E1 -_02241B14: .word 0x000006DF -_02241B18: .word 0x000005DD - thumb_func_end ov17_02241A8C - - thumb_func_start ov17_02241B1C -ov17_02241B1C: ; 0x02241B1C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02241B2E - bl sub_02022974 -_02241B2E: - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3F4 - pop {r4, pc} - thumb_func_end ov17_02241B1C - - thumb_func_start ov17_02241B3C -ov17_02241B3C: ; 0x02241B3C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r0, #0x15 - mov r1, #0x28 - add r6, r2, #0 - add r7, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x28 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - strb r0, [r7] - str r7, [r4, #4] - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [sp] - str r5, [r4, #0] - strb r0, [r4, #8] - lsl r0, r0, #2 - add r0, r5, r0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r1, #0xc - add r2, #0xe - bl sub_0200D550 - cmp r6, #6 - bhi _02241B96 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02241B88: ; jump table - .short _02241B96 - _02241B88 - 2 ; case 0 - .short _02241BAC - _02241B88 - 2 ; case 1 - .short _02241BB8 - _02241B88 - 2 ; case 2 - .short _02241BC8 - _02241B88 - 2 ; case 3 - .short _02241BD8 - _02241B88 - 2 ; case 4 - .short _02241BE8 - _02241B88 - 2 ; case 5 - .short _02241BF8 - _02241B88 - 2 ; case 6 -_02241B96: - mov r0, #1 - strb r0, [r4, #0x18] - ldr r0, _02241C0C ; =0xFFFFFE00 - ldr r2, _02241C10 ; =0x00009C40 - strh r0, [r4, #0x24] - strh r0, [r4, #0x26] - ldr r0, _02241C14 ; =ov17_02241CF0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02241BAC: - ldr r0, _02241C18 ; =ov17_02241C2C - ldr r2, _02241C10 ; =0x00009C40 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02241BB8: - ldr r0, _02241C1C ; =0xFFFFFD00 - ldr r2, _02241C10 ; =0x00009C40 - strh r0, [r4, #0x24] - ldr r0, _02241C14 ; =ov17_02241CF0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02241BC8: - ldr r0, _02241C20 ; =0xFFFFFC00 - ldr r2, _02241C10 ; =0x00009C40 - strh r0, [r4, #0x24] - ldr r0, _02241C14 ; =ov17_02241CF0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02241BD8: - ldr r0, _02241C24 ; =0xFFFFFB80 - ldr r2, _02241C10 ; =0x00009C40 - strh r0, [r4, #0x24] - ldr r0, _02241C14 ; =ov17_02241CF0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02241BE8: - ldr r0, _02241C28 ; =0xFFFFFD80 - ldr r2, _02241C10 ; =0x00009C40 - strh r0, [r4, #0x24] - ldr r0, _02241C14 ; =ov17_02241CF0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02241BF8: - mov r0, #0xff - mvn r0, r0 - strh r0, [r4, #0x24] - ldr r0, _02241C14 ; =ov17_02241CF0 - ldr r2, _02241C10 ; =0x00009C40 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241C0C: .word 0xFFFFFE00 -_02241C10: .word 0x00009C40 -_02241C14: .word ov17_02241CF0 -_02241C18: .word ov17_02241C2C -_02241C1C: .word 0xFFFFFD00 -_02241C20: .word 0xFFFFFC00 -_02241C24: .word 0xFFFFFB80 -_02241C28: .word 0xFFFFFD80 - thumb_func_end ov17_02241B3C - - thumb_func_start ov17_02241C2C -ov17_02241C2C: ; 0x02241C2C - push {r4, lr} - add r2, r1, #0 - add r4, r0, #0 - ldrb r0, [r2, #0xa] - cmp r0, #0 - beq _02241C42 - cmp r0, #1 - beq _02241C58 - cmp r0, #2 - beq _02241C98 - b _02241CB2 -_02241C42: - mov r0, #0xc - ldrsh r0, [r2, r0] - lsl r0, r0, #8 - str r0, [r2, #0x10] - mov r0, #0xe - ldrsh r0, [r2, r0] - lsl r0, r0, #8 - str r0, [r2, #0x14] - ldrb r0, [r2, #0xa] - add r0, r0, #1 - strb r0, [r2, #0xa] -_02241C58: - ldrb r0, [r2, #0x18] - mov r1, #1 - tst r0, r1 - beq _02241C6C - mov r0, #0xc - ldrsh r0, [r2, r0] - lsl r3, r0, #8 - lsl r0, r1, #9 - add r0, r3, r0 - b _02241C76 -_02241C6C: - mov r0, #0xc - ldrsh r0, [r2, r0] - lsl r3, r0, #8 - lsl r0, r1, #9 - sub r0, r3, r0 -_02241C76: - str r0, [r2, #0x10] - ldrb r0, [r2, #0x18] - add r0, r0, #1 - strb r0, [r2, #0x18] - ldrb r0, [r2, #0x18] - cmp r0, #4 - bls _02241CC6 - mov r0, #0xc - ldrsh r0, [r2, r0] - lsl r0, r0, #8 - str r0, [r2, #0x10] - mov r0, #0 - strb r0, [r2, #0x18] - ldrb r0, [r2, #0xa] - add r0, r0, #1 - strb r0, [r2, #0xa] - b _02241CC6 -_02241C98: - mov r0, #9 - ldrsb r1, [r2, r0] - add r1, r1, #1 - strb r1, [r2, #9] - ldrsb r0, [r2, r0] - cmp r0, #0xf - ble _02241CC6 - mov r0, #0 - strb r0, [r2, #9] - ldrb r0, [r2, #0xa] - add r0, r0, #1 - strb r0, [r2, #0xa] - b _02241CC6 -_02241CB2: - ldr r0, [r2, #4] - mov r1, #1 - strb r1, [r0] - add r0, r2, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} -_02241CC6: - ldrb r0, [r2, #8] - ldr r1, [r2, #0] - ldr r3, [r2, #0x10] - lsl r0, r0, #2 - add r0, r1, r0 - asr r1, r3, #7 - lsr r1, r1, #0x18 - add r1, r3, r1 - ldr r3, [r2, #0x14] - add r0, #0xb4 - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - lsl r1, r1, #8 - lsl r2, r2, #8 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, pc} - thumb_func_end ov17_02241C2C - - thumb_func_start ov17_02241CF0 -ov17_02241CF0: ; 0x02241CF0 - push {r4, lr} - add r2, r1, #0 - add r4, r0, #0 - ldrb r0, [r2, #0xa] - cmp r0, #0 - beq _02241D02 - cmp r0, #1 - beq _02241D18 - b _02241D80 -_02241D02: - mov r0, #0xc - ldrsh r0, [r2, r0] - lsl r0, r0, #8 - str r0, [r2, #0x10] - mov r0, #0xe - ldrsh r0, [r2, r0] - lsl r0, r0, #8 - str r0, [r2, #0x14] - ldrb r0, [r2, #0xa] - add r0, r0, #1 - strb r0, [r2, #0xa] -_02241D18: - mov r0, #0x24 - ldrsh r1, [r2, r0] - ldr r3, [r2, #0x14] - add r1, r3, r1 - str r1, [r2, #0x14] - ldrsh r0, [r2, r0] - add r0, #0x80 - strh r0, [r2, #0x24] - mov r0, #0xe - ldrsh r0, [r2, r0] - lsl r1, r0, #8 - ldr r0, [r2, #0x14] - cmp r0, r1 - blt _02241D56 - str r1, [r2, #0x14] - ldrb r0, [r2, #0x18] - cmp r0, #0 - beq _02241D50 - mov r0, #0x26 - ldrsh r0, [r2, r0] - strh r0, [r2, #0x24] - ldrb r0, [r2, #0x18] - sub r0, r0, #1 - strb r0, [r2, #0x18] - ldrb r0, [r2, #0xa] - sub r0, r0, #1 - strb r0, [r2, #0xa] - b _02241D56 -_02241D50: - ldrb r0, [r2, #0xa] - add r0, r0, #1 - strb r0, [r2, #0xa] -_02241D56: - ldrb r0, [r2, #8] - ldr r1, [r2, #0] - ldr r3, [r2, #0x10] - lsl r0, r0, #2 - add r0, r1, r0 - asr r1, r3, #7 - lsr r1, r1, #0x18 - add r1, r3, r1 - ldr r3, [r2, #0x14] - add r0, #0xb4 - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - lsl r1, r1, #8 - lsl r2, r2, #8 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, pc} -_02241D80: - ldr r0, [r2, #4] - mov r1, #1 - strb r1, [r0] - add r0, r2, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov17_02241CF0 - - thumb_func_start ov17_02241D94 -ov17_02241D94: ; 0x02241D94 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r6, r1, #0 - add r4, r2, #0 - cmp r0, #0 - beq _02241DAA - bl sub_02022974 -_02241DAA: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02241E1C ; =0x000080ED - add r2, r4, #0 - str r0, [sp, #8] - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - mov r3, #0x14 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02241E1C ; =0x000080ED - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - mov r3, #0x13 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02241E1C ; =0x000080ED - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - mov r3, #0x12 - bl sub_0200CE54 - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - ldr r2, _02241E20 ; =0x02253854 - bl sub_0200CE6C - add r1, r5, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - lsl r1, r6, #5 - add r5, #0xc0 - add r1, #0x60 - lsl r1, r1, #0x10 - ldr r0, [r5, #0] - asr r1, r1, #0x10 - mov r2, #0x38 - bl sub_0200D4C4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_02241E1C: .word 0x000080ED -_02241E20: .word 0x02253854 - thumb_func_end ov17_02241D94 - - thumb_func_start ov17_02241E24 -ov17_02241E24: ; 0x02241E24 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r1, _02241E54 ; =0x000080ED - bl sub_0200D070 - ldr r0, [r4, #0x1c] - ldr r1, _02241E54 ; =0x000080ED - bl sub_0200D090 - ldr r0, [r4, #0x1c] - ldr r1, _02241E54 ; =0x000080ED - bl sub_0200D0A0 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - bl sub_0200D0F4 - mov r0, #0 - add r4, #0xc0 - str r0, [r4, #0] - pop {r4, pc} - nop -_02241E54: .word 0x000080ED - thumb_func_end ov17_02241E24 - - thumb_func_start ov17_02241E58 -ov17_02241E58: ; 0x02241E58 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _02241EA0 ; =0x000080EE - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x11 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02241EA0 ; =0x000080EE - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x10 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02241EA0 ; =0x000080EE - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0xf - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_02241EA0: .word 0x000080EE - thumb_func_end ov17_02241E58 - - thumb_func_start ov17_02241EA4 -ov17_02241EA4: ; 0x02241EA4 - push {r4, lr} - ldr r1, _02241EC0 ; =0x000080EE - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _02241EC0 ; =0x000080EE - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _02241EC0 ; =0x000080EE - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_02241EC0: .word 0x000080EE - thumb_func_end ov17_02241EA4 - - thumb_func_start ov17_02241EC4 -ov17_02241EC4: ; 0x02241EC4 - push {r4, r5, r6, lr} - mov r2, #0x18 - mov r4, #0 - mul r2, r1 - add r5, r0, r2 - add r6, r4, #0 -_02241ED0: - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02241EE4 - bl sub_0200D0F4 - add r0, r5, #0 - add r0, #0xc4 - str r6, [r0, #0] -_02241EE4: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _02241ED0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02241EC4 - - thumb_func_start ov17_02241EF0 -ov17_02241EF0: ; 0x02241EF0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_02241EF6: - add r0, r5, #0 - add r1, r4, #0 - bl ov17_02241EC4 - add r4, r4, #1 - cmp r4, #4 - blt _02241EF6 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02241EF0 - - thumb_func_start ov17_02241F08 -ov17_02241F08: ; 0x02241F08 - push {r4, r5, r6, lr} - add r5, r2, #0 - ldr r2, _02241F30 ; =0x02253888 - add r4, r3, #0 - bl sub_0200CE6C - add r6, r0, #0 - ldr r0, [r6, #0] - bl sub_0200D324 - lsl r1, r5, #0x10 - lsl r2, r4, #0x10 - add r0, r6, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add r0, r6, #0 - pop {r4, r5, r6, pc} - nop -_02241F30: .word 0x02253888 - thumb_func_end ov17_02241F08 - - thumb_func_start ov17_02241F34 -ov17_02241F34: ; 0x02241F34 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - add r7, r1, #0 - add r0, r3, #0 - mov r1, #0xa - str r2, [sp, #4] - bl sub_020E1F6C - str r0, [sp, #8] - cmp r0, #0x18 - ble _02241F50 - mov r0, #0x18 - str r0, [sp, #8] -_02241F50: - mov r0, #0x18 - add r1, r7, #0 - mul r1, r0 - ldr r0, [sp] - ldr r4, [sp, #8] - mov r6, #0 - add r5, r0, r1 - b _02241F7A -_02241F60: - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02241F78 - bl sub_0200D0F4 - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0xc4 - str r6, [r0, #0] -_02241F78: - add r4, r4, #1 -_02241F7A: - cmp r4, #6 - blt _02241F60 - ldr r0, [sp, #8] - add r1, r7, #0 - sub r4, r0, #1 - mov r0, #0x18 - mul r1, r0 - ldr r0, [sp] - add r7, r0, r1 - ldr r0, [sp, #4] - ldr r1, _0224203C ; =0x0225370C - lsl r0, r0, #2 - str r0, [sp, #0xc] - add r0, r1, r0 - str r0, [sp, #0x10] - b _0224201C -_02241F9A: - add r0, r4, #0 - mov r1, #6 - bl sub_020E1F6C - add r5, r1, #0 - add r0, r4, #0 - mov r1, #6 - bl sub_020E1F6C - str r0, [sp, #0x14] - lsl r0, r5, #2 - add r0, r7, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02241FF8 - ldr r3, _0224203C ; =0x0225370C - ldr r2, [sp, #0xc] - ldr r0, [sp] - ldrsh r3, [r3, r2] - lsl r2, r5, #3 - ldr r1, [sp] - add r2, r3, r2 - ldr r6, [sp, #0x10] - mov r3, #2 - ldrsh r3, [r6, r3] - ldr r0, [r0, #0x18] - ldr r1, [r1, #0x1c] - bl ov17_02241F08 - lsl r2, r5, #2 - add r1, r7, r2 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r7, r2 - add r0, #0xc4 - ldr r0, [r0, #0] - ldr r1, [sp, #0x14] - bl sub_0200D364 - lsl r0, r5, #2 - add r0, r7, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl ov17_02242048 - b _0224201A -_02241FF8: - bl sub_0200D37C - ldr r1, [sp, #0x14] - cmp r0, r1 - bhs _0224201A - lsl r0, r5, #2 - add r0, r7, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl sub_0200D364 - lsl r0, r5, #2 - add r0, r7, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl ov17_02242048 -_0224201A: - sub r4, r4, #1 -_0224201C: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bgt _02241F9A - ldr r0, _02242040 ; =0x000006E1 - bl sub_02005748 - ldr r2, [sp, #8] - ldr r0, _02242040 ; =0x000006E1 - sub r2, r2, #1 - ldr r1, _02242044 ; =0x0000FFFF - lsl r2, r2, #6 - bl sub_02004F7C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224203C: .word 0x0225370C -_02242040: .word 0x000006E1 -_02242044: .word 0x0000FFFF - thumb_func_end ov17_02241F34 - - thumb_func_start ov17_02242048 -ov17_02242048: ; 0x02242048 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x15 - mov r1, #0x10 - bl sub_02018144 - mov r1, #0 - mov r2, #0x10 - add r4, r0, #0 - bl sub_020C4CF4 - add r0, r5, #0 - mov r1, #0 - str r5, [r4, #0] - bl sub_0200D3F4 - ldr r0, _02242074 ; =ov17_0224207C - ldr r2, _02242078 ; =0x00009C40 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242074: .word ov17_0224207C -_02242078: .word 0x00009C40 - thumb_func_end ov17_02242048 - - thumb_func_start ov17_0224207C -ov17_0224207C: ; 0x0224207C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #0 - beq _02242092 - cmp r0, #1 - beq _022420AE - cmp r0, #2 - beq _022420E8 - b _02242136 -_02242092: - ldr r0, [r4, #0] - mov r1, #2 - bl sub_0200D6A4 - ldr r0, _0224214C ; =0x3DCCCCCD - mov r1, #1 - str r0, [r4, #4] - str r0, [r4, #8] - ldr r0, [r4, #0] - bl sub_0200D3F4 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_022420AE: - ldr r0, [r4, #4] - ldr r1, _02242150 ; =0x3E99999A - bl sub_020E0B00 - str r0, [r4, #4] - ldr r0, [r4, #8] - ldr r1, _02242150 ; =0x3E99999A - bl sub_020E0B00 - str r0, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl sub_0200D6E8 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D7C0 - mov r1, #0xff - ldr r0, [r4, #4] - lsl r1, r1, #0x16 - bl sub_020E10AC - blo _0224214A - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022420E8: - ldr r0, [r4, #4] - ldr r1, _02242150 ; =0x3E99999A - bl sub_020E1A9C - str r0, [r4, #4] - ldr r0, [r4, #8] - ldr r1, _02242150 ; =0x3E99999A - bl sub_020E1A9C - str r0, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl sub_0200D6E8 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D7C0 - mov r1, #0xfe - ldr r0, [r4, #4] - lsl r1, r1, #0x16 - bl sub_020E1164 - bhi _0224214A - mov r1, #0xfe - lsl r1, r1, #0x16 - ldr r0, [r4, #0] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D79C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02242136: - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D6A4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0224214A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224214C: .word 0x3DCCCCCD -_02242150: .word 0x3E99999A - thumb_func_end ov17_0224207C - - thumb_func_start ov17_02242154 -ov17_02242154: ; 0x02242154 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _022421D8 ; =0x000080F0 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x1a - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022421D8 ; =0x000080F0 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x19 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022421D8 ; =0x000080F0 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x18 - bl sub_0200CE54 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022421DC ; =0x000080EF - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x1d - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022421DC ; =0x000080EF - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x1c - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022421DC ; =0x000080EF - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x1b - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022421D8: .word 0x000080F0 -_022421DC: .word 0x000080EF - thumb_func_end ov17_02242154 - - thumb_func_start ov17_022421E0 -ov17_022421E0: ; 0x022421E0 - push {r4, lr} - ldr r1, _02242214 ; =0x000080F0 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _02242214 ; =0x000080F0 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _02242214 ; =0x000080F0 - add r0, r4, #0 - bl sub_0200D0A0 - ldr r1, _02242218 ; =0x000080EF - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _02242218 ; =0x000080EF - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _02242218 ; =0x000080EF - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_02242214: .word 0x000080F0 -_02242218: .word 0x000080EF - thumb_func_end ov17_022421E0 - - thumb_func_start ov17_0224221C -ov17_0224221C: ; 0x0224221C - push {r3, r4, r5, r6, r7, lr} - mov r2, #0x14 - mov r4, #0 - mul r2, r1 - mov r7, #0x49 - add r5, r0, r2 - add r6, r4, #0 - lsl r7, r7, #2 -_0224222C: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0224223C - bl sub_0200D0F4 - mov r0, #0x49 - lsl r0, r0, #2 - str r6, [r5, r0] -_0224223C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _0224222C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224221C - - thumb_func_start ov17_02242248 -ov17_02242248: ; 0x02242248 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0224224E: - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0224221C - add r4, r4, #1 - cmp r4, #3 - blt _0224224E - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02242248 - - thumb_func_start ov17_02242260 -ov17_02242260: ; 0x02242260 - push {r4, r5, r6, lr} - add r5, r2, #0 - ldr r2, _02242288 ; =0x022537EC - add r4, r3, #0 - bl sub_0200CE6C - add r6, r0, #0 - ldr r0, [r6, #0] - bl sub_0200D324 - lsl r1, r5, #0x10 - lsl r2, r4, #0x10 - add r0, r6, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add r0, r6, #0 - pop {r4, r5, r6, pc} - nop -_02242288: .word 0x022537EC - thumb_func_end ov17_02242260 - - thumb_func_start ov17_0224228C -ov17_0224228C: ; 0x0224228C - push {r4, r5, r6, lr} - add r5, r2, #0 - ldr r2, _022422B4 ; =0x0225371C - add r4, r3, #0 - bl sub_0200CE6C - add r6, r0, #0 - ldr r0, [r6, #0] - bl sub_0200D324 - lsl r1, r5, #0x10 - lsl r2, r4, #0x10 - add r0, r6, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add r0, r6, #0 - pop {r4, r5, r6, pc} - nop -_022422B4: .word 0x0225371C - thumb_func_end ov17_0224228C - - thumb_func_start ov17_022422B8 -ov17_022422B8: ; 0x022422B8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - cmp r0, #5 - bls _022422CA - b _02242458 -_022422CA: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022422D6: ; jump table - .short _022422E2 - _022422D6 - 2 ; case 0 - .short _02242328 - _022422D6 - 2 ; case 1 - .short _02242368 - _022422D6 - 2 ; case 2 - .short _02242398 - _022422D6 - 2 ; case 3 - .short _022423D6 - _022422D6 - 2 ; case 4 - .short _02242428 - _022422D6 - 2 ; case 5 -_022422E2: - ldr r0, [r4, #4] - mov r1, #1 - bl sub_0200D6A4 - mov r0, #2 - ldr r1, [r4, #0x10] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r4, #0x20] - mov r0, #0x12 - ldr r1, [r4, #0x14] - lsl r0, r0, #0xa - add r0, r1, r0 - str r0, [r4, #0x24] - ldr r1, [r4, #0x20] - ldr r0, [r4, #0x10] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - strh r0, [r4, #0x28] - ldr r1, [r4, #0x24] - ldr r0, [r4, #0x14] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - strh r0, [r4, #0x2a] - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2e - strb r1, [r0] -_02242328: - mov r1, #0x28 - ldrsh r0, [r4, r1] - ldr r2, [r4, #0x10] - add r0, r2, r0 - str r0, [r4, #0x10] - mov r0, #0x2a - ldrsh r0, [r4, r0] - ldr r2, [r4, #0x14] - add r0, r2, r0 - str r0, [r4, #0x14] - ldrsh r2, [r4, r1] - cmp r2, #0 - ble _0224234A - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x20] - cmp r1, r0 - bge _02242358 -_0224234A: - cmp r2, #0 - bge _02242356 - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x20] - cmp r1, r0 - ble _02242358 -_02242356: - b _0224247C -_02242358: - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2e - strb r1, [r0] - b _0224247C -_02242368: - add r0, r4, #0 - add r0, #0x2f - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2f - strb r1, [r0] - add r0, r4, #0 - add r0, #0x2f - ldrb r0, [r0] - cmp r0, #3 - bls _0224247C - add r0, r4, #0 - mov r1, #0 - add r0, #0x2f - strb r1, [r0] - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2e - strb r1, [r0] - b _0224247C -_02242398: - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - lsl r0, r0, #8 - str r0, [r4, #0x20] - add r0, r4, #0 - add r0, #0x2d - ldrb r0, [r0] - lsl r0, r0, #8 - str r0, [r4, #0x24] - ldr r1, [r4, #0x20] - ldr r0, [r4, #0x10] - sub r0, r1, r0 - mov r1, #6 - bl sub_020E1F6C - strh r0, [r4, #0x28] - ldr r1, [r4, #0x24] - ldr r0, [r4, #0x14] - sub r0, r1, r0 - mov r1, #6 - bl sub_020E1F6C - strh r0, [r4, #0x2a] - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2e - strb r1, [r0] -_022423D6: - mov r1, #0x28 - ldrsh r0, [r4, r1] - ldr r2, [r4, #0x10] - add r0, r2, r0 - str r0, [r4, #0x10] - mov r0, #0x2a - ldrsh r0, [r4, r0] - ldr r2, [r4, #0x14] - add r0, r2, r0 - str r0, [r4, #0x14] - ldrsh r2, [r4, r1] - cmp r2, #0 - ble _022423F8 - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x20] - cmp r1, r0 - bge _02242404 -_022423F8: - cmp r2, #0 - bge _0224247C - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x20] - cmp r1, r0 - bgt _0224247C -_02242404: - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - lsl r0, r0, #8 - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x2d - ldrb r0, [r0] - lsl r0, r0, #8 - str r0, [r4, #0x14] - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2e - strb r1, [r0] - b _0224247C -_02242428: - add r0, r4, #0 - add r0, #0x2f - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2f - strb r1, [r0] - add r0, r4, #0 - add r0, #0x2f - ldrb r0, [r0] - cmp r0, #2 - bls _0224247C - add r0, r4, #0 - mov r1, #0 - add r0, #0x2f - strb r1, [r0] - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x2e - strb r1, [r0] - b _0224247C -_02242458: - ldr r0, [r4, #4] - bl sub_0200D0F4 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #0x6e - lsl r0, r0, #4 - bl sub_02005748 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} -_0224247C: - mov r1, #2 - ldr r0, [r4, #4] - lsl r1, r1, #0xc - bl sub_0200D7C0 - ldr r2, [r4, #0x10] - ldr r3, [r4, #0x14] - asr r1, r2, #7 - lsr r1, r1, #0x18 - add r1, r2, r1 - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - lsl r1, r1, #8 - lsl r2, r2, #8 - ldr r0, [r4, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_022422B8 - - thumb_func_start ov17_022424A8 -ov17_022424A8: ; 0x022424A8 - push {r4, r5, r6, lr} - mov r2, #0x14 - mul r2, r1 - mov r6, #0x49 - mov r4, #0 - add r5, r0, r2 - lsl r6, r6, #2 -_022424B6: - ldr r0, [r5, r6] - cmp r0, #0 - beq _022424C8 - bl sub_0200D408 - cmp r0, #0 - bne _022424C8 - mov r0, #0 - pop {r4, r5, r6, pc} -_022424C8: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _022424B6 - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov17_022424A8 - - thumb_func_start ov17_022424D4 -ov17_022424D4: ; 0x022424D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r4, r2, #0 - str r0, [sp, #0x1c] - str r1, [sp] - add r0, r4, #0 - mov r1, #0xa - bl sub_020E1F6C - str r0, [sp, #4] - cmp r0, #5 - ble _022424F0 - bl sub_02022974 -_022424F0: - ldr r0, [sp] - mov r1, #0x14 - lsl r7, r0, #2 - ldr r0, _0224261C ; =0x022536D8 - mov r5, #0 - add r0, r0, r7 - str r0, [sp, #0xc] - ldr r0, [sp] - mul r1, r0 - ldr r0, [sp, #0x1c] - add r0, r0, r1 - str r0, [sp, #8] - ldr r0, _02242620 ; =0x022536E4 - add r0, r0, r7 - str r0, [sp, #0x10] - ldr r0, [sp] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x14] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] - b _022425E4 -_0224251E: - ldr r0, [sp, #8] - lsl r2, r5, #2 - add r1, r0, r2 - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - bne _022425E2 - ldr r3, _0224261C ; =0x022536D8 - ldr r0, [sp, #0x1c] - ldrsh r3, [r3, r7] - add r2, r5, r2 - ldr r4, [sp, #0xc] - ldr r1, [sp, #0x1c] - add r2, r3, r2 - mov r3, #2 - ldrsh r3, [r4, r3] - ldr r0, [r0, #0x18] - ldr r1, [r1, #0x1c] - bl ov17_02242260 - ldr r1, [sp, #8] - lsl r2, r5, #2 - add r2, r1, r2 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r2, r1] - add r0, r1, #0 - ldr r0, [r2, r0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0x15 - mov r1, #0x34 - bl sub_02018144 - mov r1, #0 - mov r2, #0x34 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp, #0x1c] - lsl r1, r5, #2 - str r0, [r4, #0] - ldr r0, [sp, #8] - ldr r2, _02242620 ; =0x022536E4 - add r1, r0, r1 - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r6, [sp, #0x10] - str r0, [r4, #8] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x1c] - mov r3, #2 - ldrsh r2, [r2, r7] - ldrsh r3, [r6, r3] - ldr r0, [r0, #0x18] - ldr r1, [r1, #0x1c] - bl ov17_0224228C - str r0, [r4, #4] - ldr r0, _02242620 ; =0x022536E4 - ldr r1, [sp, #0x10] - ldrsh r0, [r0, r7] - ldr r2, _02242624 ; =0x00009C40 - lsl r0, r0, #8 - str r0, [r4, #0x10] - mov r0, #2 - ldrsh r0, [r1, r0] - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldr r0, _0224261C ; =0x022536D8 - ldrsh r1, [r0, r7] - lsl r0, r5, #2 - add r0, r5, r0 - add r1, r1, r0 - add r0, r4, #0 - add r0, #0x2c - strb r1, [r0] - ldr r1, [sp, #0xc] - mov r0, #2 - ldrsh r1, [r1, r0] - add r0, r4, #0 - add r0, #0x2d - strb r1, [r0] - add r1, r4, #0 - ldr r0, [sp, #0x14] - add r1, #0x30 - strb r0, [r1] - add r1, r4, #0 - ldr r0, [sp, #0x18] - add r1, #0x31 - strb r0, [r1] - ldr r0, _02242628 ; =ov17_022422B8 - add r1, r4, #0 - bl sub_0200D9E8 -_022425E2: - add r5, r5, #1 -_022425E4: - ldr r0, [sp, #4] - cmp r5, r0 - blt _0224251E - ldr r0, [sp] - mov r1, #0x14 - mul r1, r0 - ldr r0, [sp, #0x1c] - mov r7, #0x49 - lsl r7, r7, #2 - add r4, r0, r1 - add r6, r7, #0 - b _02242614 -_022425FC: - lsl r0, r5, #2 - add r0, r4, r0 - ldr r0, [r0, r6] - cmp r0, #0 - beq _02242612 - bl sub_0200D0F4 - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0 - str r0, [r1, r7] -_02242612: - add r5, r5, #1 -_02242614: - cmp r5, #5 - blt _022425FC - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224261C: .word 0x022536D8 -_02242620: .word 0x022536E4 -_02242624: .word 0x00009C40 -_02242628: .word ov17_022422B8 - thumb_func_end ov17_022424D4 - - thumb_func_start ov17_0224262C -ov17_0224262C: ; 0x0224262C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - str r0, [sp] - cmp r2, #1 - bne _0224263C - mov r6, #1 - b _0224263E -_0224263C: - mov r6, #0 -_0224263E: - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - str r0, [sp, #8] - str r0, [sp, #4] -_02242648: - ldr r5, [sp] - mov r4, #0 -_0224264C: - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242668 - add r1, r7, #0 - bl sub_0200D810 - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_0200D3F4 -_02242668: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _0224264C - mov r1, #0x5b - ldr r0, [sp, #8] - lsl r1, r1, #2 - ldr r0, [r0, r1] - cmp r0, #0 - beq _02242690 - add r1, r7, #0 - bl sub_0200D810 - mov r1, #0x5b - ldr r0, [sp, #8] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r6, #0 - bl sub_0200D3F4 -_02242690: - mov r1, #0x63 - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r7, #0 - bl sub_02012AF0 - mov r1, #0x77 - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r7, #0 - bl sub_02012AF0 - mov r1, #0x63 - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r6, #0 - bl sub_020129D0 - mov r1, #0x77 - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r6, #0 - bl sub_020129D0 - ldr r0, [sp] - add r0, #0x18 - str r0, [sp] - ldr r0, [sp, #8] - add r0, r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, #0x14 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #4 - blt _02242648 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_0224262C - - thumb_func_start ov17_022426E8 -ov17_022426E8: ; 0x022426E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - mov r0, #0 - strb r0, [r7] - mov r0, #0x15 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - str r5, [r4, #0] - mov r2, #0xfa - strb r6, [r4, #0xd] - ldr r0, _0224271C ; =ov17_02242720 - add r1, r4, #0 - lsl r2, r2, #2 - str r7, [r4, #4] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224271C: .word ov17_02242720 - thumb_func_end ov17_022426E8 - - thumb_func_start ov17_02242720 -ov17_02242720: ; 0x02242720 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #3 - bls _0224272E - b _02242864 -_0224272E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224273A: ; jump table - .short _02242742 - _0224273A - 2 ; case 0 - .short _0224279E - _0224273A - 2 ; case 1 - .short _022427D2 - _0224273A - 2 ; case 2 - .short _02242826 - _0224273A - 2 ; case 3 -_02242742: - ldrb r0, [r4, #0xd] - cmp r0, #0 - bne _0224276A - mov r0, #1 - lsl r0, r0, #0xc - strh r0, [r4, #8] - mov r1, #0 - strh r1, [r4, #0xa] - ldr r0, _0224287C ; =0x04000050 - str r1, [sp] - mov r2, #0xe - mov r3, #0x10 - bl sub_020BF55C - mov r1, #1 - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov17_0224262C - b _0224278C -_0224276A: - mov r3, #0 - mov r0, #1 - strh r3, [r4, #8] - lsl r0, r0, #0xc - strh r0, [r4, #0xa] - mov r0, #0x10 - str r0, [sp] - ldr r0, _0224287C ; =0x04000050 - mov r1, #4 - mov r2, #0xe - bl sub_020BF55C - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #1 - bl ov17_0223BB14 -_0224278C: - ldr r0, _02242880 ; =ov17_02242884 - add r1, r4, #0 - mov r2, #0xa - bl sub_0200DA3C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224279E: - ldrb r1, [r4, #0xd] - cmp r1, #0 - bne _022427BE - mov r0, #8 - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _022427BE - mov r1, #0 - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov17_0224262C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022427BE: - cmp r1, #1 - bne _0224287A - mov r0, #0xa - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _0224287A - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022427D2: - ldrb r0, [r4, #0xd] - cmp r0, #0 - bne _022427F2 - mov r0, #1 - lsl r0, r0, #0xc - strh r0, [r4, #8] - mov r0, #0 - strh r0, [r4, #0xa] - str r0, [sp] - ldr r0, _0224287C ; =0x04000050 - mov r1, #4 - mov r2, #0xe - mov r3, #0x10 - bl sub_020BF55C - b _02242814 -_022427F2: - mov r1, #0 - mov r0, #1 - strh r1, [r4, #8] - lsl r0, r0, #0xc - strh r0, [r4, #0xa] - mov r0, #0x10 - str r0, [sp] - ldr r0, _0224287C ; =0x04000050 - mov r2, #0xe - add r3, r1, #0 - bl sub_020BF55C - mov r1, #1 - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov17_0224262C -_02242814: - ldr r0, _02242880 ; =ov17_02242884 - add r1, r4, #0 - mov r2, #0xa - bl sub_0200DA3C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02242826: - ldrb r1, [r4, #0xd] - cmp r1, #0 - bne _02242846 - mov r0, #8 - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _02242846 - mov r1, #1 - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov17_0223BB14 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02242846: - cmp r1, #1 - bne _0224287A - mov r0, #0xa - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _0224287A - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #1 - bl ov17_0224262C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02242864: - bl ov17_022413D8 - ldr r0, [r4, #4] - mov r1, #1 - strb r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0224287A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224287C: .word 0x04000050 -_02242880: .word ov17_02242884 - thumb_func_end ov17_02242720 - - thumb_func_start ov17_02242884 -ov17_02242884: ; 0x02242884 - push {r3, r4, r5, lr} - ldrb r3, [r1, #0xd] - mov r2, #0 - cmp r3, #0 - bne _022428BC - mov r4, #8 - ldrsh r5, [r1, r4] - lsl r3, r4, #8 - sub r3, r5, r3 - strh r3, [r1, #8] - mov r3, #0xa - ldrsh r5, [r1, r3] - lsl r3, r4, #8 - add r3, r5, r3 - strh r3, [r1, #0xa] - ldrsh r3, [r1, r4] - cmp r3, #0 - bgt _022428AC - strh r2, [r1, #8] - add r2, r2, #1 -_022428AC: - mov r3, #0xa - ldrsh r4, [r1, r3] - mov r3, #1 - lsl r3, r3, #0xc - cmp r4, r3 - blt _022428E8 - strh r3, [r1, #0xa] - b _022428E8 -_022428BC: - mov r4, #8 - ldrsh r5, [r1, r4] - lsl r3, r4, #8 - add r3, r5, r3 - strh r3, [r1, #8] - mov r3, #0xa - ldrsh r5, [r1, r3] - lsl r3, r4, #8 - sub r3, r5, r3 - strh r3, [r1, #0xa] - ldrsh r5, [r1, r4] - lsl r3, r4, #9 - cmp r5, r3 - blt _022428DC - strh r3, [r1, #8] - add r2, r2, #1 -_022428DC: - mov r3, #0xa - ldrsh r3, [r1, r3] - cmp r3, #0 - bgt _022428E8 - mov r3, #0 - strh r3, [r1, #0xa] -_022428E8: - mov r3, #8 - ldrsh r3, [r1, r3] - asr r4, r3, #8 - mov r3, #0xa - ldrsh r3, [r1, r3] - mov r1, #0xff - bic r3, r1 - orr r3, r4 - ldr r1, _02242908 ; =0x04000052 - cmp r2, #0 - strh r3, [r1] - ble _02242904 - bl sub_0200DA58 -_02242904: - pop {r3, r4, r5, pc} - nop -_02242908: .word 0x04000052 - thumb_func_end ov17_02242884 - - thumb_func_start ov17_0224290C -ov17_0224290C: ; 0x0224290C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r1, #0 - add r4, r0, #0 - add r5, r2, #0 - add r6, r3, #0 - cmp r7, #2 - blt _02242924 - cmp r5, #0 - bne _02242924 - bl sub_02022974 -_02242924: - cmp r7, #0x1c - bls _0224292A - b _02242D9E -_0224292A: - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02242936: ; jump table - .short _02242DA2 - _02242936 - 2 ; case 0 - .short _02242970 - _02242936 - 2 ; case 1 - .short _0224298E - _02242936 - 2 ; case 2 - .short _022429A8 - _02242936 - 2 ; case 3 - .short _022429C2 - _02242936 - 2 ; case 4 - .short _022429D0 - _02242936 - 2 ; case 5 - .short _022429E4 - _02242936 - 2 ; case 6 - .short _022429FC - _02242936 - 2 ; case 7 - .short _02242A2C - _02242936 - 2 ; case 8 - .short _02242A50 - _02242936 - 2 ; case 9 - .short _02242A7C - _02242936 - 2 ; case 10 - .short _02242AAA - _02242936 - 2 ; case 11 - .short _02242ADA - _02242936 - 2 ; case 12 - .short _02242AFE - _02242936 - 2 ; case 13 - .short _02242B2A - _02242936 - 2 ; case 14 - .short _02242B5A - _02242936 - 2 ; case 15 - .short _02242B7E - _02242936 - 2 ; case 16 - .short _02242BA2 - _02242936 - 2 ; case 17 - .short _02242BC2 - _02242936 - 2 ; case 18 - .short _02242BE6 - _02242936 - 2 ; case 19 - .short _02242C10 - _02242936 - 2 ; case 20 - .short _02242C3A - _02242936 - 2 ; case 21 - .short _02242C58 - _02242936 - 2 ; case 22 - .short _02242C82 - _02242936 - 2 ; case 23 - .short _02242CB0 - _02242936 - 2 ; case 24 - .short _02242CDE - _02242936 - 2 ; case 25 - .short _02242D00 - _02242936 - 2 ; case 26 - .short _02242D2A - _02242936 - 2 ; case 27 - .short _02242D62 - _02242936 - 2 ; case 28 -_02242970: - mov r0, #0xca - lsl r0, r0, #2 - ldrb r0, [r4, r0] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0224298E: - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022429A8: - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022429C2: - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B630 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022429D0: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022429E4: - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #0 - bl sub_0200BB74 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022429FC: - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242A2C: - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B630 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242A50: - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - mov r0, #0 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - add r3, r1, #0 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242A7C: - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #1 - bl sub_0200BB74 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242AAA: - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242ADA: - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B630 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242AFE: - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - mov r0, #0 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - add r3, r1, #0 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242B2A: - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242B5A: - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B630 - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242B7E: - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B630 - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242BA2: - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B630 - mov r0, #0 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - add r3, r1, #0 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242BC2: - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B630 - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242BE6: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - bl sub_0200B60C - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242C10: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - bl sub_0200B60C - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242C3A: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - bl sub_0200B60C - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B630 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242C58: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - bl sub_0200B60C - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242C82: - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #0 - bl sub_0200BB74 - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242CB0: - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #0 - bl sub_0200BB74 - ldrb r0, [r5, #1] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242CDE: - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #0 - bl sub_0200BB74 - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_0200B630 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242D00: - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #0 - bl sub_0200BB74 - mov r0, #0 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldrb r2, [r5, #4] - ldr r0, [r4, #0x54] - add r3, r1, #0 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242D2A: - ldrb r0, [r5] - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200B5CC - ldrb r2, [r5, #5] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #1 - bl sub_0200BB74 - ldrh r2, [r5, #2] - ldr r0, [r4, #0x54] - mov r1, #2 - bl sub_0200B630 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242D62: - ldrb r2, [r6] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x54] - lsl r2, r2, #3 - add r2, r3, r2 - add r2, #0xd0 - ldrh r2, [r2] - mov r1, #0 - bl sub_0200BB74 - mov r5, #0 -_02242D78: - add r0, r6, r5 - ldrb r0, [r0, #1] - cmp r0, #4 - beq _02242DA2 - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r4, #0x54] - add r1, r5, #1 - bl sub_0200B5CC - add r5, r5, #1 - cmp r5, #4 - blt _02242D78 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02242D9E: - bl sub_02022974 -_02242DA2: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224290C - - thumb_func_start ov17_02242DA8 -ov17_02242DA8: ; 0x02242DA8 - push {r4, lr} - add r4, r0, #0 - add r0, #0x34 - mov r1, #0xff - bl sub_0201ADA4 - add r4, #0x34 - add r0, r4, #0 - bl sub_0201A954 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02242DA8 - - thumb_func_start ov17_02242DC0 -ov17_02242DC0: ; 0x02242DC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [sp, #0x30] - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp, #0xc] - cmp r0, #1 - bne _02242DD6 - mov r4, #0 - b _02242DEE -_02242DD6: - ldr r1, [r5, #0] - ldr r0, _02242E54 ; =0x00000171 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02242DEC - ldr r0, _02242E58 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027AC0 - add r4, r0, #0 - b _02242DEE -_02242DEC: - mov r4, #1 -_02242DEE: - add r0, r6, #0 - add r1, r7, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x2c] - add r0, r5, #0 - bl ov17_0224290C - ldr r0, [r5, #0x54] - ldr r1, [r5, #0x58] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x34 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - str r3, [sp, #8] - add r0, r5, #0 - ldr r2, [r5, #0x58] - add r0, #0x34 - mov r1, #1 - bl sub_0201D738 - mov r1, #0x8b - lsl r1, r1, #2 - strb r0, [r5, r1] - cmp r4, #0 - bne _02242E42 - mov r0, #0xff - strb r0, [r5, r1] - add r0, r5, #0 - add r0, #0x34 - bl sub_0201A954 -_02242E42: - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_020192EC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242E54: .word 0x00000171 -_02242E58: .word 0x00001988 - thumb_func_end ov17_02242DC0 - - thumb_func_start ov17_02242E5C -ov17_02242E5C: ; 0x02242E5C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r7, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r5, #0x2f - blo _02242E70 - bl sub_02022974 -_02242E70: - ldr r0, _02242E90 ; =0x022538F3 - lsl r3, r5, #2 - ldrb r0, [r0, r3] - str r4, [sp] - ldr r2, _02242E94 ; =0x022538F0 - str r6, [sp, #4] - str r0, [sp, #8] - ldr r4, _02242E98 ; =0x022538F2 - ldrh r2, [r2, r3] - ldrb r3, [r4, r3] - ldr r1, [r7, #0x44] - add r0, r7, #0 - bl ov17_02242DC0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242E90: .word 0x022538F3 -_02242E94: .word 0x022538F0 -_02242E98: .word 0x022538F2 - thumb_func_end ov17_02242E5C - - thumb_func_start ov17_02242E9C -ov17_02242E9C: ; 0x02242E9C - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - add r5, r3, #0 - add r0, r1, #0 - add r1, r2, #0 - add r2, sp, #0x10 - add r3, sp, #0xc - bl sub_02095790 - ldr r0, [sp, #0x20] - str r5, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r1, [r4, #0x50] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0xc] - add r0, r4, #0 - bl ov17_02242DC0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02242E9C - - thumb_func_start ov17_02242ECC -ov17_02242ECC: ; 0x02242ECC - push {r3, lr} - mov r1, #0x8b - lsl r1, r1, #2 - ldrb r0, [r0, r1] - cmp r0, #0xff - bne _02242EDC - mov r0, #0 - pop {r3, pc} -_02242EDC: - bl sub_0201D724 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02242ECC - - thumb_func_start ov17_02242EE4 -ov17_02242EE4: ; 0x02242EE4 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0xc - mov r1, #0x15 - bl sub_02023790 - str r0, [sp, #0x30] - lsl r0, r4, #2 - ldr r1, [r5, #0xc] - str r0, [sp, #0x2c] - ldr r0, [r1, r0] - ldr r2, [sp, #0x30] - mov r1, #0x77 - bl sub_02074470 - ldr r1, [r5, #0] - ldr r0, _02242F94 ; =0x00000123 - ldrb r0, [r1, r0] - cmp r4, r0 - bne _02242F14 - ldr r6, _02242F98 ; =0x00010200 - b _02242F16 -_02242F14: - ldr r6, _02242F9C ; =0x00050600 -_02242F16: - mov r0, #0x14 - add r7, r4, #0 - mul r7, r0 - mov r0, #0x77 - lsl r0, r0, #2 - add r0, r5, r0 - add r0, r0, r7 - str r0, [sp] - ldr r0, [sp, #0x30] - mov r1, #0 - str r0, [sp, #4] - str r1, [sp, #8] - str r6, [sp, #0xc] - ldr r0, _02242FA0 ; =0x000080ED - str r1, [sp, #0x10] - str r0, [sp, #0x14] - str r1, [sp, #0x18] - str r1, [sp, #0x1c] - str r1, [sp, #0x20] - str r1, [sp, #0x24] - mov r0, #0xf - str r0, [sp, #0x28] - ldr r1, [r5, #0x30] - ldr r2, [r5, #0x28] - ldr r3, [r5, #0x60] - mov r0, #0x15 - bl ov17_0223F1E8 - mov r0, #0x63 - lsl r0, r0, #2 - add r0, r5, r0 - add r0, r0, r7 - str r0, [sp] - ldr r1, [r5, #0] - ldr r0, [sp, #0x2c] - add r0, r1, r0 - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #0 - str r0, [sp, #4] - str r1, [sp, #8] - str r6, [sp, #0xc] - ldr r0, _02242FA0 ; =0x000080ED - str r1, [sp, #0x10] - str r0, [sp, #0x14] - str r1, [sp, #0x18] - str r1, [sp, #0x1c] - str r1, [sp, #0x20] - str r1, [sp, #0x24] - mov r0, #0xf - str r0, [sp, #0x28] - ldr r1, [r5, #0x30] - ldr r2, [r5, #0x28] - ldr r3, [r5, #0x60] - mov r0, #0x15 - bl ov17_0223F1E8 - ldr r0, [sp, #0x30] - bl sub_020237BC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_02242F94: .word 0x00000123 -_02242F98: .word 0x00010200 -_02242F9C: .word 0x00050600 -_02242FA0: .word 0x000080ED - thumb_func_end ov17_02242EE4 - - thumb_func_start ov17_02242FA4 -ov17_02242FA4: ; 0x02242FA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_02242FAA: - add r0, r5, #0 - add r1, r4, #0 - bl ov17_02242EE4 - add r4, r4, #1 - cmp r4, #4 - blt _02242FAA - add r0, r5, #0 - bl ov17_02242FE8 - pop {r3, r4, r5, pc} - thumb_func_end ov17_02242FA4 - - thumb_func_start ov17_02242FC0 -ov17_02242FC0: ; 0x02242FC0 - push {r4, r5, r6, lr} - mov r1, #0x77 - lsl r1, r1, #2 - add r4, r0, r1 - sub r1, #0x50 - mov r6, #0 - add r5, r0, r1 -_02242FCE: - add r0, r4, #0 - bl ov17_0223F2E4 - add r0, r5, #0 - bl ov17_0223F2E4 - add r6, r6, #1 - add r4, #0x14 - add r5, #0x14 - cmp r6, #4 - blt _02242FCE - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02242FC0 - - thumb_func_start ov17_02242FE8 -ov17_02242FE8: ; 0x02242FE8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r1, #0x77 - lsl r1, r1, #2 - str r0, [sp] - add r0, r0, r1 - str r0, [sp, #4] - ldr r0, [sp] - sub r1, #0x50 - add r0, r0, r1 - mov r4, #0 - mov r6, #0xc - mov r5, #0x1c - str r0, [sp, #8] -_02243004: - ldr r0, [sp] - add r2, r6, #0 - add r1, r0, r4 - ldr r0, _0224303C ; =0x00000231 - mov r3, #0 - ldrb r1, [r1, r0] - mov r0, #0x14 - add r7, r1, #0 - mul r7, r0 - ldr r0, [sp, #4] - mov r1, #1 - add r0, r0, r7 - bl ov17_0223F2F8 - ldr r0, [sp, #8] - mov r1, #1 - add r0, r0, r7 - add r2, r5, #0 - mov r3, #0 - bl ov17_0223F2F8 - add r4, r4, #1 - add r6, #0x30 - add r5, #0x30 - cmp r4, #4 - blt _02243004 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224303C: .word 0x00000231 - thumb_func_end ov17_02242FE8 - - thumb_func_start ov17_02243040 -ov17_02243040: ; 0x02243040 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _02243088 ; =0x000080F1 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x17 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02243088 ; =0x000080F1 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x16 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02243088 ; =0x000080F1 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x15 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_02243088: .word 0x000080F1 - thumb_func_end ov17_02243040 - - thumb_func_start ov17_0224308C -ov17_0224308C: ; 0x0224308C - push {r4, lr} - ldr r1, _022430A8 ; =0x000080F1 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _022430A8 ; =0x000080F1 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _022430A8 ; =0x000080F1 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_022430A8: .word 0x000080F1 - thumb_func_end ov17_0224308C - - thumb_func_start ov17_022430AC -ov17_022430AC: ; 0x022430AC - push {r3, r4, r5, r6, r7, lr} - add r3, r0, #0 - mov r0, #0x16 - add r6, r1, #0 - lsl r0, r0, #4 - lsl r5, r6, #2 - add r4, r3, r0 - ldr r0, [r4, r5] - add r7, r2, #0 - cmp r0, #0 - bne _022430CE - ldr r0, [r3, #0x18] - ldr r1, [r3, #0x1c] - ldr r2, _022430F4 ; =0x02253750 - bl sub_0200CE6C - str r0, [r4, r5] -_022430CE: - ldr r0, [r4, r5] - add r1, r7, #0 - bl sub_0200D364 - mov r2, #0x30 - mul r2, r6 - add r2, #0x2a - lsl r2, r2, #0x10 - ldr r0, [r4, r5] - mov r1, #0x40 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, r5] - ldr r0, [r0, #0] - bl sub_0200D324 - pop {r3, r4, r5, r6, r7, pc} - nop -_022430F4: .word 0x02253750 - thumb_func_end ov17_022430AC - - thumb_func_start ov17_022430F8 -ov17_022430F8: ; 0x022430F8 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - mov r7, #0x16 - add r5, r0, #0 - add r6, r4, #0 - lsl r7, r7, #4 -_02243104: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02243114 - bl sub_0200D0F4 - mov r0, #0x16 - lsl r0, r0, #4 - str r6, [r5, r0] -_02243114: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02243104 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_022430F8 - - thumb_func_start ov17_02243120 -ov17_02243120: ; 0x02243120 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - add r0, r4, #0 - mov r1, #0 - mov r2, #6 - bl sub_020C4CF4 - lsl r0, r6, #1 - add r1, r5, r0 - ldr r0, _02243148 ; =0x00000236 - strb r6, [r4] - ldrh r1, [r1, r0] - add r0, #8 - strh r1, [r4, #2] - add r1, r5, r6 - ldrb r0, [r1, r0] - strb r0, [r4, #5] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02243148: .word 0x00000236 - thumb_func_end ov17_02243120 - - thumb_func_start ov17_0224314C -ov17_0224314C: ; 0x0224314C - strb r0, [r2] - cmp r1, #0 - bgt _02243156 - mov r0, #0x1f - bx lr -_02243156: - cmp r1, #0x14 - bgt _0224315E - mov r0, #0x20 - bx lr -_0224315E: - cmp r1, #0x32 - bgt _02243166 - mov r0, #0x21 - bx lr -_02243166: - cmp r1, #0x5a - bgt _0224316E - mov r0, #0x22 - bx lr -_0224316E: - mov r0, #0x23 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224314C - - thumb_func_start ov17_02243174 -ov17_02243174: ; 0x02243174 - push {r4, lr} - mov r1, #0x32 - bl sub_020E1F6C - cmp r0, #4 - blo _02243182 - mov r0, #3 -_02243182: - lsl r1, r0, #2 - ldr r0, _0224319C ; =0x022536FC - ldr r4, [r0, r1] - cmp r4, #0 - bge _02243190 - bl sub_02022974 -_02243190: - cmp r4, #0x7f - ble _02243198 - bl sub_02022974 -_02243198: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 -_0224319C: .word 0x022536FC - thumb_func_end ov17_02243174 - - thumb_func_start ov17_022431A0 -ov17_022431A0: ; 0x022431A0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - ldr r0, [sp, #0x1c] - mov r1, #0 - strb r1, [r0] - mov r0, #0x15 - mov r1, #0x14 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp, #0x1c] - str r5, [r4, #0] - str r0, [r4, #0x10] - strb r7, [r4, #0xd] - ldr r0, [sp] - strb r6, [r4, #0xb] - str r0, [r4, #4] - ldr r0, [sp, #0x18] - ldr r2, _022431E0 ; =0x00000BB8 - strb r0, [r4, #0xe] - ldr r0, _022431E4 ; =ov17_022431E8 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022431E0: .word 0x00000BB8 -_022431E4: .word ov17_022431E8 - thumb_func_end ov17_022431A0 - - thumb_func_start ov17_022431E8 -ov17_022431E8: ; 0x022431E8 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #8] - cmp r0, #0 - beq _02243200 - cmp r0, #1 - beq _02243222 - cmp r0, #2 - beq _02243252 - b _022432C8 -_02243200: - ldrb r0, [r4, #0xd] - cmp r0, #0 - beq _0224320E - sub r0, r0, #1 - add sp, #0x10 - strb r0, [r4, #0xd] - pop {r3, r4, r5, pc} -_0224320E: - ldr r0, _02243314 ; =0x000006E5 - bl sub_02005748 - ldr r0, _02243314 ; =0x000006E5 - ldr r1, [r4, #4] - bl sub_02004AD4 - ldrb r0, [r4, #8] - add r0, r0, #1 - strb r0, [r4, #8] -_02243222: - ldrb r0, [r4, #9] - cmp r0, #0 - bne _0224322C - mov r1, #0 - b _0224322E -_0224322C: - mov r1, #2 -_0224322E: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x15 - str r0, [sp, #0xc] - ldr r2, [r4, #0] - mov r0, #0x2d - ldr r2, [r2, #0x30] - mov r3, #3 - bl sub_02006E60 - ldrb r0, [r4, #8] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #8] - pop {r3, r4, r5, pc} -_02243252: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - ldrb r0, [r4, #0xc] - cmp r0, #2 - bls _0224328A - mov r0, #0 - strb r0, [r4, #0xc] - ldrb r1, [r4, #9] - mov r0, #1 - eor r0, r1 - strb r0, [r4, #9] - ldrb r0, [r4, #8] - sub r0, r0, #1 - strb r0, [r4, #8] - ldrb r0, [r4, #9] - cmp r0, #0 - bne _0224328A - ldrb r0, [r4, #0xa] - add r0, r0, #1 - strb r0, [r4, #0xa] - ldrb r0, [r4, #0xa] - cmp r0, #2 - bls _0224328A - mov r0, #0xff - add sp, #0x10 - strb r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224328A: - ldrb r0, [r4, #0xe] - cmp r0, #1 - bne _02243310 - ldrb r0, [r4, #0xb] - mov r1, #0x32 - lsl r0, r0, #4 - bl sub_020E1F6C - mov r1, #0xf - ldrsb r2, [r4, r1] - cmp r2, r0 - bge _02243310 - add r2, r2, #2 - strb r2, [r4, #0xf] - ldrsb r1, [r4, r1] - cmp r1, r0 - ble _022432AE - strb r0, [r4, #0xf] -_022432AE: - ldrb r0, [r4, #0xf] - mov r1, #0 - mov r2, #1 - str r0, [sp] - ldr r0, _02243318 ; =0x0000237E - mov r3, #2 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r0, [r0, #0x5c] - bl sub_020039B0 - add sp, #0x10 - pop {r3, r4, r5, pc} -_022432C8: - ldrb r0, [r4, #0xe] - cmp r0, #1 - bne _022432FE - mov r0, #0xf - ldrsb r1, [r4, r0] - cmp r1, #0 - beq _022432FE - sub r1, r1, #2 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #0 - bge _022432E4 - mov r0, #0 - strb r0, [r4, #0xf] -_022432E4: - ldrb r0, [r4, #0xf] - mov r1, #0 - mov r2, #1 - str r0, [sp] - ldr r0, _02243318 ; =0x0000237E - mov r3, #2 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r0, [r0, #0x5c] - bl sub_020039B0 - add sp, #0x10 - pop {r3, r4, r5, pc} -_022432FE: - ldr r0, [r4, #0x10] - mov r1, #1 - strb r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02243310: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02243314: .word 0x000006E5 -_02243318: .word 0x0000237E - thumb_func_end ov17_022431E8 - - thumb_func_start ov17_0224331C -ov17_0224331C: ; 0x0224331C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r3, #0 - ldr r3, [sp, #0x38] - add r6, sp, #0x1c - str r3, [sp, #0x38] - mov r3, #0 - str r3, [sp, #8] - strb r3, [r5] - mov r3, #0x30 - mul r3, r2 - ldr r2, [sp, #8] - str r3, [sp, #0x10] - add r3, #0x18 - str r2, [sp, #4] - str r2, [sp, #0xc] - mov r2, #0x18 - mul r2, r1 - add r7, r0, r2 - add r0, r3, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r3, [sp, #0x10] - str r0, [sp, #0x18] -_0224334C: - add r0, r7, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02243358 - b _022434B8 -_02243358: - ldrb r1, [r5] - cmp r1, #0 - bne _02243422 - add r1, sp, #0x20 - add r1, #2 - add r2, sp, #0x20 - bl sub_0200D550 - mov r0, #4 - ldrsh r1, [r6, r0] - ldr r0, [sp, #0x10] - sub r1, r1, r0 - bpl _02243374 - neg r1, r1 -_02243374: - mov r0, #6 - ldrsh r0, [r6, r0] - sub r0, #0x28 - bpl _0224337E - neg r0, r0 -_0224337E: - bl sub_0208C0A4 - lsl r0, r0, #8 - str r0, [sp, #8] - mov r0, #6 - ldrsh r0, [r6, r0] - sub r0, #0x28 - bl sub_020E17B4 - str r0, [sp, #0x14] - mov r0, #4 - ldrsh r1, [r6, r0] - ldr r0, [sp, #0x10] - sub r0, r1, r0 - bl sub_020E17B4 - add r4, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0 - bl sub_020E1108 - ldr r0, _022434CC ; =0x45800000 - bls _022433C0 - ldr r1, [sp, #0x14] - bl sub_020E18B0 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - str r0, [sp] - b _022433D0 -_022433C0: - ldr r1, [sp, #0x14] - bl sub_020E18B0 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C - str r0, [sp] -_022433D0: - add r0, r4, #0 - mov r1, #0 - bl sub_020E1108 - ldr r0, _022434CC ; =0x45800000 - bls _022433EE - add r1, r4, #0 - bl sub_020E18B0 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _022433FC -_022433EE: - add r1, r4, #0 - bl sub_020E18B0 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_022433FC: - bl sub_020E1740 - add r4, r0, #0 - ldr r0, [sp] - bl sub_020E1740 - add r1, r0, #0 - add r0, r4, #0 - bl sub_020BDA20 - ldr r1, _022434D0 ; =0x00008CA0 - mul r1, r0 - add r0, r1, #0 - ldr r1, _022434D4 ; =0x0000FFFF - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] -_02243422: - mov r0, #0x15 - mov r1, #0x28 - bl sub_02018144 - mov r1, #0 - mov r2, #0x28 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp, #0x38] - add r1, r4, #0 - str r0, [r4, #4] - add r0, r7, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, #0x21 - str r0, [r4, #8] - ldr r0, [sp, #8] - add r2, sp, #0x1c - str r0, [r4, #0x10] - ldr r0, [sp, #4] - strh r0, [r4, #0x1e] - mov r0, #2 - lsl r0, r0, #0xa - str r0, [r4, #0x14] - mov r0, #0x28 - strb r0, [r1] - add r1, r4, #0 - ldr r0, [sp, #0x18] - add r1, #0x22 - strb r0, [r1] - str r5, [r4, #0xc] - mov r0, #6 - ldrsh r1, [r6, r0] - add r0, r4, #0 - add r0, #0x23 - strb r1, [r0] - mov r0, #4 - ldrsh r1, [r6, r0] - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r0, r7, #0 - add r0, #0xd0 - add r1, sp, #0x1c - ldr r0, [r0, #0] - add r1, #2 - bl sub_0200D550 - mov r0, #6 - ldrsh r1, [r6, r0] - mov r0, #2 - ldrsh r0, [r6, r0] - sub r0, r1, r0 - bpl _02243492 - neg r0, r0 -_02243492: - ldrb r2, [r5] - lsl r0, r0, #8 - lsl r1, r2, #1 - add r1, r2, r1 - bl sub_020E1F6C - strh r0, [r4, #0x1c] - mov r0, #2 - ldrsh r0, [r6, r0] - ldr r2, _022434D8 ; =0x00009C40 - add r1, r4, #0 - lsl r0, r0, #8 - str r0, [r4, #0x18] - ldr r0, _022434DC ; =ov17_022434E0 - bl sub_0200D9E8 - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] -_022434B8: - ldr r0, [sp, #0xc] - add r7, r7, #4 - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #6 - bge _022434C6 - b _0224334C -_022434C6: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_022434CC: .word 0x45800000 -_022434D0: .word 0x00008CA0 -_022434D4: .word 0x0000FFFF -_022434D8: .word 0x00009C40 -_022434DC: .word ov17_022434E0 - thumb_func_end ov17_0224331C - - thumb_func_start ov17_022434E0 -ov17_022434E0: ; 0x022434E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _022434F8 - cmp r0, #1 - beq _02243542 - b _02243624 -_022434F8: - ldrh r0, [r5, #0x1c] - ldr r1, [r5, #0x18] - sub r1, r1, r0 - add r0, r5, #0 - str r1, [r5, #0x18] - add r0, #0x23 - ldrb r0, [r0] - lsl r0, r0, #8 - cmp r1, r0 - bgt _0224351C - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x20 - strb r1, [r0] -_0224351C: - add r1, sp, #0xc - ldr r0, [r5, #8] - add r1, #2 - add r2, sp, #0xc - bl sub_0200D550 - ldr r0, [r5, #0x18] - add r3, sp, #0xc - asr r0, r0, #8 - strh r0, [r3, #2] - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r5, #8] - bl sub_0200D4C4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_02243542: - ldrh r2, [r5, #0x1e] - ldr r1, [r5, #0x14] - add r0, r5, #0 - add r1, r2, r1 - strh r1, [r5, #0x1e] - ldrh r2, [r5, #0x1e] - ldr r1, _02243650 ; =0x00008CA0 - add r0, #0x1e - cmp r2, r1 - blo _0224355C - ldrh r2, [r0] - sub r1, r2, r1 - strh r1, [r0] -_0224355C: - mov r0, #3 - ldr r1, [r5, #0x10] - lsl r0, r0, #8 - cmp r1, r0 - bls _0224356A - sub r0, r1, r0 - b _0224356C -_0224356A: - mov r0, #0 -_0224356C: - str r0, [r5, #0x10] - mov r0, #2 - ldr r1, [r5, #0x10] - lsl r0, r0, #8 - cmp r1, r0 - bhi _02243586 - add r0, r5, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x20 - strb r1, [r0] -_02243586: - ldr r0, [r5, #0x10] - mov r1, #0x64 - lsr r4, r0, #8 - ldrh r0, [r5, #0x1e] - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D1D4 - str r0, [sp] - lsl r6, r4, #0xc - ldrh r0, [r5, #0x1e] - mov r1, #0x64 - asr r7, r6, #0x1f - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - str r0, [sp, #4] - ldr r0, [sp] - add r2, r6, #0 - asr r1, r0, #0x1f - add r3, r7, #0 - bl sub_020E1F1C - str r0, [sp, #8] - ldr r0, [sp, #4] - add r4, r1, #0 - asr r1, r0, #0x1f - add r2, r6, #0 - add r3, r7, #0 - bl sub_020E1F1C - mov r3, #2 - add r2, r1, #0 - add r1, r5, #0 - add r7, r0, #0 - add r1, #0x21 - ldr r6, [sp, #8] - lsl r3, r3, #0xa - add r6, r6, r3 - ldr r3, _02243654 ; =0x00000000 - ldrb r1, [r1] - adc r4, r3 - lsl r3, r4, #0x14 - lsr r4, r6, #0xc - orr r4, r3 - asr r3, r4, #0xb - lsr r3, r3, #0x14 - add r3, r4, r3 - asr r3, r3, #0xc - add r1, r1, r3 - mov r4, #2 - ldr r0, [r5, #8] - lsl r1, r1, #0x10 - add r5, #0x22 - lsl r4, r4, #0xa - asr r1, r1, #0x10 - ldrb r3, [r5] - add r5, r7, r4 - ldr r4, _02243654 ; =0x00000000 - adc r2, r4 - lsl r2, r2, #0x14 - lsr r4, r5, #0xc - orr r4, r2 - asr r2, r4, #0xb - lsr r2, r2, #0x14 - add r2, r4, r2 - asr r2, r2, #0xc - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_02243624: - ldr r0, [r5, #8] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, _02243658 ; =0x000005E1 - bl sub_02005748 - ldr r0, [r5, #4] - bl ov17_022414B0 - ldr r1, [r5, #0xc] - ldrb r0, [r1] - sub r0, r0, #1 - strb r0, [r1] - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243650: .word 0x00008CA0 -_02243654: .word 0x00000000 -_02243658: .word 0x000005E1 - thumb_func_end ov17_022434E0 - - thumb_func_start ov17_0224365C -ov17_0224365C: ; 0x0224365C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x15 - mov r1, #0xc - bl sub_02018144 - mov r1, #0 - mov r2, #0xc - add r4, r0, #0 - bl sub_020C4CF4 - str r5, [r4, #0] - ldr r0, _02243688 ; =ov17_022436A4 - ldr r2, _0224368C ; =0x00009C40 - add r1, r4, #0 - strb r6, [r4, #8] - bl sub_0200D9E8 - str r0, [r4, #4] - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02243688: .word ov17_022436A4 -_0224368C: .word 0x00009C40 - thumb_func_end ov17_0224365C - - thumb_func_start ov17_02243690 -ov17_02243690: ; 0x02243690 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02243690 - - thumb_func_start ov17_022436A4 -ov17_022436A4: ; 0x022436A4 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - mov r7, #0x13 - add r6, r1, #0 - add r5, r4, #0 - lsl r7, r7, #4 -_022436B0: - ldrb r2, [r6, #8] - mov r1, #0x14 - ldr r0, [r6, #0] - mul r1, r2 - add r0, r0, r1 - add r0, r5, r0 - ldr r0, [r0, r7] - cmp r0, #0 - beq _022436C6 - bl sub_0200D330 -_022436C6: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _022436B0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_022436A4 - - thumb_func_start ov17_022436D0 -ov17_022436D0: ; 0x022436D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - mov r0, #0x30 - mul r0, r2 - add r0, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r1, #0x14 - add r2, r3, #0 - mul r2, r1 - ldr r1, [sp] - ldr r5, [sp, #0x20] - mov r7, #0 - strb r7, [r5] - add r6, r1, r2 - str r0, [sp, #4] -_022436F2: - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r6, r0] - cmp r0, #0 - beq _0224373C - mov r0, #0x15 - mov r1, #0x28 - bl sub_02018144 - mov r1, #0 - mov r2, #0x28 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _02243748 ; =0x00009C40 - str r0, [r4, #0] - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r6, r0] - str r0, [r4, #4] - str r5, [r4, #8] - mov r0, #0x28 - strb r0, [r4, #0xf] - ldr r0, [sp, #4] - strb r0, [r4, #0x10] - ldrb r1, [r5] - mov r0, #0xc - mul r0, r1 - strh r0, [r4, #0x24] - ldr r0, _0224374C ; =ov17_02243750 - add r1, r4, #0 - bl sub_0200D9E8 - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] -_0224373C: - add r7, r7, #1 - add r6, r6, #4 - cmp r7, #5 - blt _022436F2 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243748: .word 0x00009C40 -_0224374C: .word ov17_02243750 - thumb_func_end ov17_022436D0 - - thumb_func_start ov17_02243750 -ov17_02243750: ; 0x02243750 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5, #0xe] - cmp r0, #0 - beq _0224376A - cmp r0, #1 - beq _022437AA - cmp r0, #2 - bne _02243768 - b _022438D2 -_02243768: - b _0224390A -_0224376A: - mov r0, #0x24 - ldrsh r0, [r5, r0] - cmp r0, #0 - ble _0224377A - sub r0, r0, #1 - add sp, #8 - strh r0, [r5, #0x24] - pop {r3, r4, r5, r6, r7, pc} -_0224377A: - add r1, sp, #4 - ldr r0, [r5, #4] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - add r2, sp, #4 - mov r1, #0 - ldrsh r0, [r2, r1] - add r0, r0, #6 - strh r0, [r2] - mov r0, #2 - ldrsh r0, [r2, r0] - lsl r0, r0, #8 - str r0, [r5, #0x1c] - ldrsh r0, [r2, r1] - lsl r0, r0, #8 - str r0, [r5, #0x20] - ldr r0, _02243930 ; =0x000007F9 - bl sub_02005748 - ldrb r0, [r5, #0xe] - add r0, r0, #1 - strb r0, [r5, #0xe] -_022437AA: - ldrh r2, [r5, #0xc] - mov r1, #2 - lsl r1, r1, #0xa - add r1, r2, r1 - strh r1, [r5, #0xc] - ldrh r2, [r5, #0xc] - ldr r1, _02243934 ; =0x00008CA0 - add r0, r5, #0 - add r0, #0xc - cmp r2, r1 - blo _022437C6 - ldrh r2, [r0] - sub r1, r2, r1 - strh r1, [r0] -_022437C6: - ldrh r0, [r5, #0xc] - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - add r4, r0, #0 - ldrh r0, [r5, #0xc] - mov r1, #0x64 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D1D4 - add r6, r0, #0 - ldr r0, [r5, #0x20] - mov r2, #3 - add r0, #0x80 - str r0, [r5, #0x20] - asr r1, r4, #0x1f - add r0, r4, #0 - lsl r2, r2, #0xe - mov r3, #0 - bl sub_020E1F1C - mov r2, #6 - str r0, [sp] - add r4, r1, #0 - asr r1, r6, #0x1f - add r0, r6, #0 - lsl r2, r2, #0xc - mov r3, #0 - bl sub_020E1F1C - add r2, r1, #0 - ldr r1, [r5, #0x1c] - mov r6, #2 - add r7, r0, #0 - ldr r3, [sp] - lsl r6, r6, #0xa - asr r1, r1, #8 - add r6, r3, r6 - ldr r3, _02243938 ; =0x00000000 - ldr r0, [r5, #4] - adc r4, r3 - lsl r3, r4, #0x14 - lsr r4, r6, #0xc - orr r4, r3 - asr r3, r4, #0xb - lsr r3, r3, #0x14 - add r3, r4, r3 - asr r3, r3, #0xc - add r1, r1, r3 - ldr r3, [r5, #0x20] - mov r4, #2 - lsl r1, r1, #0x10 - ldr r6, _02243938 ; =0x00000000 - lsl r4, r4, #0xa - asr r1, r1, #0x10 - asr r3, r3, #8 - add r4, r7, r4 - adc r2, r6 - lsl r6, r2, #0x14 - lsr r2, r4, #0xc - orr r2, r6 - asr r4, r2, #0xb - lsr r4, r4, #0x14 - add r4, r2, r4 - asr r2, r4, #0xc - add r2, r3, r2 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r0, #0x24 - ldrsh r1, [r5, r0] - add r1, r1, #1 - strh r1, [r5, #0x24] - ldrsh r0, [r5, r0] - cmp r0, #0x50 - ble _0224392C - mov r0, #0 - strh r0, [r5, #0x24] - add r1, sp, #4 - ldr r0, [r5, #4] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - add r2, sp, #4 - mov r0, #2 - ldrsh r0, [r2, r0] - lsl r1, r0, #8 - str r1, [r5, #0x1c] - mov r1, #0 - ldrsh r6, [r2, r1] - lsl r1, r6, #8 - str r1, [r5, #0x20] - ldrb r1, [r5, #0xf] - sub r0, r0, r1 - bpl _02243898 - neg r0, r0 -_02243898: - ldrb r1, [r5, #0x10] - lsl r0, r0, #8 - sub r4, r6, r1 - bpl _022438A2 - neg r4, r4 -_022438A2: - mov r1, #3 - lsl r1, r1, #8 - str r1, [r5, #0x14] - bl sub_020E1F6C - add r1, r0, #0 - lsl r0, r4, #8 - bl sub_020E1F6C - str r0, [r5, #0x18] - ldrb r0, [r5, #0x10] - cmp r0, r6 - bge _022438C2 - ldr r0, [r5, #0x18] - neg r0, r0 - str r0, [r5, #0x18] -_022438C2: - ldr r0, _0224393C ; =0x000006EA - bl sub_02005748 - ldrb r0, [r5, #0xe] - add sp, #8 - add r0, r0, #1 - strb r0, [r5, #0xe] - pop {r3, r4, r5, r6, r7, pc} -_022438D2: - ldr r1, [r5, #0x1c] - ldr r0, [r5, #0x14] - sub r0, r1, r0 - str r0, [r5, #0x1c] - ldr r1, [r5, #0x20] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [r5, #0x20] - ldrb r0, [r5, #0xf] - lsl r1, r0, #8 - ldr r0, [r5, #0x1c] - cmp r0, r1 - bgt _022438F4 - str r1, [r5, #0x1c] - ldrb r0, [r5, #0xe] - add r0, r0, #1 - strb r0, [r5, #0xe] -_022438F4: - ldr r1, [r5, #0x1c] - ldr r2, [r5, #0x20] - lsl r1, r1, #8 - lsl r2, r2, #8 - ldr r0, [r5, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0224390A: - ldr r0, [r5, #4] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, _02243940 ; =0x000005E1 - bl sub_02005748 - ldr r1, [r5, #8] - ldrb r0, [r1] - sub r0, r0, #1 - strb r0, [r1] - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224392C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243930: .word 0x000007F9 -_02243934: .word 0x00008CA0 -_02243938: .word 0x00000000 -_0224393C: .word 0x000006EA -_02243940: .word 0x000005E1 - thumb_func_end ov17_02243750 - - thumb_func_start ov17_02243944 -ov17_02243944: ; 0x02243944 - push {r4} - sub sp, #0xc - ldr r3, _0224396C ; =0x022536B8 - add r2, sp, #0 - ldrh r4, [r3, #0x14] - add r1, sp, #0 - lsl r0, r0, #1 - strh r4, [r2] - ldrh r4, [r3, #0x16] - strh r4, [r2, #2] - ldrh r4, [r3, #0x18] - strh r4, [r2, #4] - ldrh r4, [r3, #0x1a] - ldrh r3, [r3, #0x1c] - strh r4, [r2, #6] - strh r3, [r2, #8] - ldrh r0, [r1, r0] - add sp, #0xc - pop {r4} - bx lr - ; .align 2, 0 -_0224396C: .word 0x022536B8 - thumb_func_end ov17_02243944 - - thumb_func_start ov17_02243970 -ov17_02243970: ; 0x02243970 - push {r4} - sub sp, #0xc - ldr r3, _02243998 ; =0x022536B8 - add r2, sp, #0 - ldrh r4, [r3, #0xa] - add r1, sp, #0 - lsl r0, r0, #1 - strh r4, [r2] - ldrh r4, [r3, #0xc] - strh r4, [r2, #2] - ldrh r4, [r3, #0xe] - strh r4, [r2, #4] - ldrh r4, [r3, #0x10] - ldrh r3, [r3, #0x12] - strh r4, [r2, #6] - strh r3, [r2, #8] - ldrh r0, [r1, r0] - add sp, #0xc - pop {r4} - bx lr - ; .align 2, 0 -_02243998: .word 0x022536B8 - thumb_func_end ov17_02243970 - - thumb_func_start ov17_0224399C -ov17_0224399C: ; 0x0224399C - push {r4} - sub sp, #0xc - ldr r3, _022439C4 ; =0x022536B8 - add r2, sp, #0 - ldrh r4, [r3] - add r1, sp, #0 - lsl r0, r0, #1 - strh r4, [r2] - ldrh r4, [r3, #2] - strh r4, [r2, #2] - ldrh r4, [r3, #4] - strh r4, [r2, #4] - ldrh r4, [r3, #6] - ldrh r3, [r3, #8] - strh r4, [r2, #6] - strh r3, [r2, #8] - ldrh r0, [r1, r0] - add sp, #0xc - pop {r4} - bx lr - ; .align 2, 0 -_022439C4: .word 0x022536B8 - thumb_func_end ov17_0224399C - - thumb_func_start ov17_022439C8 -ov17_022439C8: ; 0x022439C8 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0xc - bl sub_020C4CF4 - strh r5, [r4, #4] - cmp r5, #0x8f - bgt _022439FE - bge _02243A36 - cmp r5, #0x4c - bgt _022439F0 - bge _02243A36 - cmp r5, #0xd - beq _02243A36 - pop {r3, r4, r5, r6, r7, pc} -_022439F0: - cmp r5, #0x77 - bgt _022439F8 - beq _02243A74 - pop {r3, r4, r5, r6, r7, pc} -_022439F8: - cmp r5, #0x82 - beq _02243A36 - pop {r3, r4, r5, r6, r7, pc} -_022439FE: - ldr r1, _02243A90 ; =0x0000010B - cmp r5, r1 - bgt _02243A1E - bge _02243A7A - cmp r5, #0xae - bgt _02243A0E - beq _02243A48 - pop {r3, r4, r5, r6, r7, pc} -_02243A0E: - cmp r5, #0xda - bgt _02243A8E - cmp r5, #0xd8 - blt _02243A8E - beq _02243A3C - cmp r5, #0xda - beq _02243A42 - pop {r3, r4, r5, r6, r7, pc} -_02243A1E: - add r0, r1, #0 - add r0, #0xd - cmp r5, r0 - bgt _02243A2E - add r1, #0xd - cmp r5, r1 - beq _02243A80 - pop {r3, r4, r5, r6, r7, pc} -_02243A2E: - add r1, #0xc8 - cmp r5, r1 - beq _02243A86 - pop {r3, r4, r5, r6, r7, pc} -_02243A36: - mov r0, #1 - strb r0, [r4, #6] - pop {r3, r4, r5, r6, r7, pc} -_02243A3C: - mov r0, #0xff - strb r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_02243A42: - mov r0, #0 - strb r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_02243A48: - lsl r5, r7, #2 - ldr r0, [r6, r5] - mov r1, #0xb1 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - ldr r0, [r6, r5] - mov r1, #0xb2 - mov r2, #0 - bl sub_02074470 - cmp r7, #7 - beq _02243A68 - cmp r0, #7 - bne _02243A6E -_02243A68: - mov r0, #1 - strb r0, [r4, #7] - pop {r3, r4, r5, r6, r7, pc} -_02243A6E: - mov r0, #0 - strb r0, [r4, #7] - pop {r3, r4, r5, r6, r7, pc} -_02243A74: - mov r0, #1 - strh r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_02243A7A: - mov r0, #0xa1 - strh r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_02243A80: - mov r0, #1 - strb r0, [r4, #7] - pop {r3, r4, r5, r6, r7, pc} -_02243A86: - mov r0, #1 - strb r0, [r4, #6] - ldr r0, _02243A94 ; =0x200400C0 - str r0, [r4, #0] -_02243A8E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243A90: .word 0x0000010B -_02243A94: .word 0x200400C0 - thumb_func_end ov17_022439C8 - - thumb_func_start ov17_02243A98 -ov17_02243A98: ; 0x02243A98 - cmp r2, #0 - bne _02243AA0 - mov r0, #0 - bx lr -_02243AA0: - lsl r3, r1, #1 - add r3, r0, r3 - ldrh r3, [r3, #0x26] - cmp r2, r3 - bne _02243ABE - lsl r1, r1, #2 - add r0, r0, r1 - add r0, #0xe0 - ldr r0, [r0, #0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r2, r0 - beq _02243ABE - mov r0, #0 - bx lr -_02243ABE: - mov r0, #1 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02243A98 - - thumb_func_start ov17_02243AC4 -ov17_02243AC4: ; 0x02243AC4 - push {r3, r4} - add r1, r0, r1 - ldrb r4, [r1, #0xe] - mov r3, #0 - add r2, r3, #0 -_02243ACE: - add r1, r0, r2 - ldrb r1, [r1, #0xe] - cmp r1, r4 - bne _02243AD8 - add r3, r3, #1 -_02243AD8: - add r2, r2, #1 - cmp r2, #4 - blt _02243ACE - sub r0, r3, #1 - pop {r3, r4} - bx lr - thumb_func_end ov17_02243AC4 - - thumb_func_start ov17_02243AE4 -ov17_02243AE4: ; 0x02243AE4 - ldr r1, _02243AEC ; =0x022539AC - ldrb r0, [r1, r0] - bx lr - nop -_02243AEC: .word 0x022539AC - thumb_func_end ov17_02243AE4 - - thumb_func_start ov17_02243AF0 -ov17_02243AF0: ; 0x02243AF0 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #0xb - bl sub_020790C4 - lsl r1, r4, #2 - add r2, r4, r1 - ldr r1, _02243B08 ; =0x022539C8 - add r1, r1, r2 - ldrsb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_02243B08: .word 0x022539C8 - thumb_func_end ov17_02243AF0 - - thumb_func_start ov17_02243B0C -ov17_02243B0C: ; 0x02243B0C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r3, #0 - mov lr, r0 - add r2, sp, #8 - add r1, sp, #4 - add r7, r3, #0 - add r0, sp, #0 - mov r6, #0x1a - b _02243B46 -_02243B20: - lsl r4, r3, #1 - mov r5, lr - add r5, r5, r4 - ldrsh r5, [r5, r6] - strb r3, [r1, r3] - strh r5, [r2, r4] - add r4, r7, #0 - b _02243B40 -_02243B30: - mov r5, lr - add r5, r5, r4 - ldrb r5, [r5, #1] - cmp r3, r5 - bne _02243B3E - strb r4, [r0, r3] - b _02243B44 -_02243B3E: - add r4, r4, #1 -_02243B40: - cmp r4, #4 - blt _02243B30 -_02243B44: - add r3, r3, #1 -_02243B46: - cmp r3, #4 - blt _02243B20 - mov r3, #0 - ldr r6, _02243C1C ; =0x022539B8 - add r1, sp, #8 - ldr r0, _02243C20 ; =0x022539B0 - ldr r2, _02243C24 ; =0x022539C0 - mov r7, #0x2c - b _02243BA8 -_02243B58: - add r5, r3, #0 - mul r5, r7 - mov r4, lr - add r4, r4, r5 - ldr r4, [r4, #0x58] - lsl r5, r4, #0x1a - lsr r5, r5, #0x1e - cmp r5, #3 - bhi _02243BA6 - add r5, r5, r5 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_02243B76: ; jump table - .short _02243BA6 - _02243B76 - 2 ; case 0 - .short _02243B7E - _02243B76 - 2 ; case 1 - .short _02243B8C - _02243B76 - 2 ; case 2 - .short _02243B9A - _02243B76 - 2 ; case 3 -_02243B7E: - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - lsl r4, r4, #1 - ldrsh r5, [r2, r4] - lsl r4, r3, #1 - strh r5, [r1, r4] - b _02243BA6 -_02243B8C: - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - lsl r4, r4, #1 - ldrsh r5, [r0, r4] - lsl r4, r3, #1 - strh r5, [r1, r4] - b _02243BA6 -_02243B9A: - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - lsl r4, r4, #1 - ldrsh r5, [r6, r4] - lsl r4, r3, #1 - strh r5, [r1, r4] -_02243BA6: - add r3, r3, #1 -_02243BA8: - cmp r3, #4 - blt _02243B58 - mov r3, #0 - b _02243BFE -_02243BB0: - mov r4, #3 - add r2, sp, #8 - add r7, sp, #0 - b _02243BF8 -_02243BB8: - sub r1, r4, #1 - lsl r0, r1, #1 - lsl r5, r4, #1 - ldrsh r0, [r2, r0] - ldrsh r5, [r2, r5] - cmp r0, r5 - bgt _02243BD2 - cmp r0, r5 - bne _02243BF6 - ldrb r1, [r7, r1] - ldrb r0, [r7, r4] - cmp r1, r0 - bhs _02243BF6 -_02243BD2: - sub r0, r4, #1 - lsl r1, r4, #1 - lsl r5, r0, #1 - mov ip, r5 - ldrsh r6, [r2, r1] - ldrsh r5, [r2, r5] - strh r5, [r2, r1] - mov r1, ip - strh r6, [r2, r1] - add r1, sp, #4 - ldrb r6, [r1, r4] - ldrb r5, [r1, r0] - strb r5, [r1, r4] - strb r6, [r1, r0] - ldrb r5, [r7, r4] - ldrb r1, [r7, r0] - strb r1, [r7, r4] - strb r5, [r7, r0] -_02243BF6: - sub r4, r4, #1 -_02243BF8: - cmp r4, r3 - bgt _02243BB8 - add r3, r3, #1 -_02243BFE: - cmp r3, #3 - blt _02243BB0 - mov r3, #0 - add r2, sp, #4 - b _02243C12 -_02243C08: - ldrb r1, [r2, r3] - mov r0, lr - add r0, r0, r3 - strb r1, [r0, #1] - add r3, r3, #1 -_02243C12: - cmp r3, #4 - blt _02243C08 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243C1C: .word 0x022539B8 -_02243C20: .word 0x022539B0 -_02243C24: .word 0x022539C0 - thumb_func_end ov17_02243B0C - - thumb_func_start ov17_02243C28 -ov17_02243C28: ; 0x02243C28 - push {r3, r4, lr} - sub sp, #0xc - ldr r1, _02243C60 ; =0x022539E4 - add r3, sp, #0 - str r1, [sp] - mov r1, #0x16 - strh r1, [r3, #4] - ldr r1, [r0, #0] - ldr r2, _02243C64 ; =0x00000123 - ldrb r1, [r1, r2] - strb r1, [r3, #6] - sub r1, r2, #7 - ldr r4, [r0, #0] - add r2, #0x4e - ldrb r1, [r4, r1] - strb r1, [r3, #8] - ldr r1, [r0, #0] - ldrb r1, [r1, r2] - strb r1, [r3, #7] - mov r1, #0xc3 - lsl r1, r1, #4 - add r0, r0, r1 - add r1, sp, #0 - bl ov17_0224F18C - add sp, #0xc - pop {r3, r4, pc} - nop -_02243C60: .word 0x022539E4 -_02243C64: .word 0x00000123 - thumb_func_end ov17_02243C28 - - thumb_func_start ov17_02243C68 -ov17_02243C68: ; 0x02243C68 - push {r3, lr} - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - mov r3, #0 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02243C68 - - thumb_func_start ov17_02243C80 -ov17_02243C80: ; 0x02243C80 - push {r3, lr} - mov r0, #0xc3 - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r2, #0 - mov r2, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r3, pc} - thumb_func_end ov17_02243C80 - - thumb_func_start ov17_02243C94 -ov17_02243C94: ; 0x02243C94 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02243C94 - - thumb_func_start ov17_02243C98 -ov17_02243C98: ; 0x02243C98 - push {r3, lr} - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - mov r3, #0 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02243C98 - - thumb_func_start ov17_02243CB0 -ov17_02243CB0: ; 0x02243CB0 - push {r3, r4, r5, lr} - ldr r0, _02243CD8 ; =0x00001650 - add r5, r1, #0 - mov r1, #1 - strb r1, [r5, r0] - ldr r0, [r5, #0] - add r4, r2, #0 - bl sub_02094EDC - cmp r0, #0 - bne _02243CD6 - mov r0, #0xc3 - lsl r0, r0, #4 - mov r2, #0 - add r0, r5, r0 - add r1, r4, #0 - add r3, r2, #0 - bl ov17_0224F26C -_02243CD6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02243CD8: .word 0x00001650 - thumb_func_end ov17_02243CB0 - - thumb_func_start ov17_02243CDC -ov17_02243CDC: ; 0x02243CDC - push {r3, lr} - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - mov r3, #0 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02243CDC - - thumb_func_start ov17_02243CF4 -ov17_02243CF4: ; 0x02243CF4 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r0, #0x15 - mov r1, #0x10 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - ldr r2, _02243D2C ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _02243D30 ; =ov17_02243D34 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_02243D2C: .word 0x00007530 -_02243D30: .word ov17_02243D34 - thumb_func_end ov17_02243CF4 - - thumb_func_start ov17_02243D34 -ov17_02243D34: ; 0x02243D34 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldrb r1, [r4, #0xf] - add r5, r0, #0 - cmp r1, #0 - beq _02243D4C - cmp r1, #1 - beq _02243D6A - cmp r1, #2 - beq _02243D84 - b _02243D92 -_02243D4C: - mov r1, #0 - add r0, r4, #0 - str r1, [sp] - add r0, #0xe - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #0x46 - bl ov17_022431A0 - ldrb r0, [r4, #0xf] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xf] - pop {r3, r4, r5, pc} -_02243D6A: - ldrh r0, [r4, #0xc] - add r0, r0, #1 - strh r0, [r4, #0xc] - ldrh r0, [r4, #0xc] - cmp r0, #0x1e - bls _02243DB0 - mov r0, #0 - strh r0, [r4, #0xc] - ldrb r0, [r4, #0xf] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xf] - pop {r3, r4, r5, pc} -_02243D84: - ldrb r0, [r4, #0xe] - cmp r0, #1 - bne _02243DB0 - add r0, r1, #1 - add sp, #8 - strb r0, [r4, #0xf] - pop {r3, r4, r5, pc} -_02243D92: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02243DB0: - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov17_02243D34 - - thumb_func_start ov17_02243DB4 -ov17_02243DB4: ; 0x02243DB4 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02243DB4 - - thumb_func_start ov17_02243DCC -ov17_02243DCC: ; 0x02243DCC - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r0, #0x15 - mov r1, #0x1c - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02243E24 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - add r0, r6, #0 - add r0, #0xe4 - ldrb r0, [r0] - strb r0, [r4, #0x18] - add r0, r6, #0 - add r0, #0xd8 - ldrh r0, [r0] - strh r0, [r4, #0x12] - add r0, r6, #0 - add r0, #0xda - ldrh r0, [r0] - add r6, #0xdc - strh r0, [r4, #0x14] - ldrh r0, [r6] - strh r0, [r4, #0x16] - ldr r0, _02243E28 ; =ov17_02243E2C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243E24: .word 0x00007530 -_02243E28: .word ov17_02243E2C - thumb_func_end ov17_02243DCC - - thumb_func_start ov17_02243E2C -ov17_02243E2C: ; 0x02243E2C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #4 - bhi _02243ED2 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02243E46: ; jump table - .short _02243E50 - _02243E46 - 2 ; case 0 - .short _02243E72 - _02243E46 - 2 ; case 1 - .short _02243E8C - _02243E46 - 2 ; case 2 - .short _02243EA6 - _02243E46 - 2 ; case 3 - .short _02243EC4 - _02243E46 - 2 ; case 4 -_02243E50: - ldrb r1, [r4, #0x18] - cmp r1, #0 - beq _02243E62 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0x12 - mov r3, #0 - bl ov17_02242E5C -_02243E62: - ldr r0, _02243EF4 ; =0x000006F9 - bl sub_02005748 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02243E72: - ldrb r0, [r4, #0x18] - cmp r0, #0 - beq _02243E82 - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02243EF0 -_02243E82: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02243E8C: - ldrh r0, [r4, #0xe] - add r0, r0, #1 - strh r0, [r4, #0xe] - ldrh r0, [r4, #0xe] - cmp r0, #0x1e - bls _02243EF0 - mov r0, #0 - strh r0, [r4, #0xe] - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02243EA6: - mov r1, #0 - add r0, r4, #0 - str r1, [sp] - add r0, #0x10 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #0x46 - bl ov17_022431A0 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02243EC4: - ldrb r1, [r4, #0x10] - cmp r1, #1 - bne _02243EF0 - add r0, r0, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02243ED2: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02243EF0: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02243EF4: .word 0x000006F9 - thumb_func_end ov17_02243E2C - - thumb_func_start ov17_02243EF8 -ov17_02243EF8: ; 0x02243EF8 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02243EF8 - - thumb_func_start ov17_02243F10 -ov17_02243F10: ; 0x02243F10 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r0, #0x15 - mov r1, #0x1c - add r5, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - add r2, r4, #0 - mov r1, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - add r2, #0x16 - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldrb r0, [r7] - strb r0, [r4, #0x15] - add r0, r6, #0 - bl ov17_022426E8 - ldr r0, _02243F60 ; =ov17_02243F68 - ldr r2, _02243F64 ; =0x00007530 - add r1, r4, #0 - bl sub_0200D9E8 - add r0, r6, #0 - bl ov17_02242DA8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243F60: .word ov17_02243F68 -_02243F64: .word 0x00007530 - thumb_func_end ov17_02243F10 - - thumb_func_start ov17_02243F68 -ov17_02243F68: ; 0x02243F68 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0x15] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_020765AC - add r5, r0, #0 - ldrb r0, [r4, #0x14] - cmp r0, #3 - bls _02243F88 - b _02244092 -_02243F88: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02243F94: ; jump table - .short _02243F9C - _02243F94 - 2 ; case 0 - .short _02243FB8 - _02243F94 - 2 ; case 1 - .short _0224401A - _02243F94 - 2 ; case 2 - .short _02244034 - _02243F94 - 2 ; case 3 -_02243F9C: - mov r0, #0x18 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x18] - ldrsh r0, [r4, r0] - cmp r0, #0xa - bgt _02243FAC - b _022440B6 -_02243FAC: - mov r0, #0 - strh r0, [r4, #0x18] - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_02243FB8: - ldrb r0, [r4, #0x15] - mov r1, #0 - lsl r5, r0, #2 - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - ldr r0, [r0, r5] - bl sub_020765AC - add r6, r0, #0 - ldr r0, [r4, #0] - mov r1, #0x25 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - mov r1, #6 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r2, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - mov r2, #1 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r1, #0 - lsl r2, r2, #8 - bl sub_02007DEC - ldr r0, [r4, #0] - add r6, #0xac - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r1, #1 - add r2, r6, #0 - bl sub_02007DEC - mov r0, #1 - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - mov r0, #0x2b - lsl r0, r0, #0xa - str r0, [r4, #0x10] - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_0224401A: - ldr r0, [r4, #0] - ldrb r2, [r4, #0x15] - ldr r1, [r0, #0] - ldr r0, _022440B8 ; =0x00000123 - ldrb r0, [r1, r0] - cmp r2, r0 - bne _0224402E - ldr r0, _022440BC ; =0x000006F8 - bl sub_02005748 -_0224402E: - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] -_02244034: - ldr r1, [r4, #0xc] - ldr r0, _022440C0 ; =0x000005B6 - sub r0, r1, r0 - str r0, [r4, #0xc] - ldr r1, [r4, #0x10] - ldr r0, _022440C4 ; =0x00000892 - sub r0, r1, r0 - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - asr r0, r0, #8 - cmp r0, #0xd8 - ble _02244054 - ldr r0, [r4, #0x10] - asr r0, r0, #8 - cmp r0, #0x70 - bgt _02244066 -_02244054: - mov r0, #0x36 - lsl r0, r0, #0xa - str r0, [r4, #0xc] - mov r0, #7 - lsl r0, r0, #0xc - str r0, [r4, #0x10] - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] -_02244066: - ldrb r0, [r4, #0x15] - ldr r2, [r4, #0xc] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldrb r0, [r4, #0x15] - ldr r2, [r4, #0x10] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - asr r2, r2, #8 - ldr r0, [r0, #0x14] - mov r1, #1 - add r2, r2, r5 - bl sub_02007DEC - pop {r4, r5, r6, pc} -_02244092: - ldrb r0, [r4, #0x16] - cmp r0, #1 - bne _022440B6 - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_022440B6: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022440B8: .word 0x00000123 -_022440BC: .word 0x000006F8 -_022440C0: .word 0x000005B6 -_022440C4: .word 0x00000892 - thumb_func_end ov17_02243F68 - - thumb_func_start ov17_022440C8 -ov17_022440C8: ; 0x022440C8 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_022440C8 - - thumb_func_start ov17_022440E0 -ov17_022440E0: ; 0x022440E0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r0, #0x15 - mov r1, #0x1c - add r5, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldrb r0, [r7] - strb r0, [r4, #0x15] - ldr r1, [r6, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_020765AC - mov r0, #0x36 - lsl r0, r0, #0xa - str r0, [r4, #0xc] - mov r0, #7 - lsl r0, r0, #0xc - str r0, [r4, #0x10] - ldr r0, _02244134 ; =ov17_0224413C - ldr r2, _02244138 ; =0x00007530 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244134: .word ov17_0224413C -_02244138: .word 0x00007530 - thumb_func_end ov17_022440E0 - - thumb_func_start ov17_0224413C -ov17_0224413C: ; 0x0224413C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - ldrb r0, [r5, #0x15] - mov r1, #0 - lsl r4, r0, #2 - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - ldr r0, [r0, r4] - bl sub_020765AC - add r6, r0, #0 - ldrb r0, [r5, #0x14] - cmp r0, #0 - beq _02244160 - cmp r0, #1 - beq _022441D2 - b _022441FA -_02244160: - ldr r1, [r5, #0xc] - ldr r0, _0224421C ; =0x000005B6 - add r0, r1, r0 - str r0, [r5, #0xc] - ldr r1, [r5, #0x10] - ldr r0, _02244220 ; =0x00000892 - add r0, r1, r0 - str r0, [r5, #0x10] - ldr r0, [r5, #0xc] - asr r1, r0, #8 - mov r0, #1 - lsl r0, r0, #8 - cmp r1, r0 - bge _02244184 - ldr r0, [r5, #0x10] - asr r0, r0, #8 - cmp r0, #0xac - blt _022441A6 -_02244184: - ldr r0, [r5, #0] - mov r1, #0x25 - add r0, r0, r4 - ldr r0, [r0, #0x14] - mov r2, #1 - bl sub_02007DEC - ldr r0, [r5, #0] - mov r1, #6 - add r0, r0, r4 - ldr r0, [r0, #0x14] - mov r2, #1 - bl sub_02007DEC - ldrb r0, [r5, #0x14] - add r0, r0, #1 - strb r0, [r5, #0x14] -_022441A6: - ldrb r0, [r5, #0x15] - ldr r2, [r5, #0xc] - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldrb r0, [r5, #0x15] - ldr r2, [r5, #0x10] - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - asr r2, r2, #8 - ldr r0, [r0, #0x14] - mov r1, #1 - add r2, r2, r6 - bl sub_02007DEC - pop {r3, r4, r5, r6, r7, pc} -_022441D2: - ldrb r1, [r5, #0x15] - ldr r0, [r5, #0] - ldr r2, _02244224 ; =0x00001652 - add r3, r0, r1 - ldrb r2, [r3, r2] - cmp r2, #1 - bne _022441F2 - add r0, #0xc - bl ov17_02241524 - ldrb r0, [r5, #0x15] - ldr r1, [r5, #0] - mov r2, #0 - add r1, r1, r0 - ldr r0, _02244224 ; =0x00001652 - strb r2, [r1, r0] -_022441F2: - ldrb r0, [r5, #0x14] - add r0, r0, #1 - strb r0, [r5, #0x14] - pop {r3, r4, r5, r6, r7, pc} -_022441FA: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r5, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r5, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224421C: .word 0x000005B6 -_02244220: .word 0x00000892 -_02244224: .word 0x00001652 - thumb_func_end ov17_0224413C - - thumb_func_start ov17_02244228 -ov17_02244228: ; 0x02244228 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02244228 - - thumb_func_start ov17_02244240 -ov17_02244240: ; 0x02244240 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r0, #0x15 - mov r1, #0x1c - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - ldr r2, _022442A4 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #2] - strb r0, [r4, #0xe] - add r0, r5, #0 - add r0, #0xe4 - ldrb r0, [r0] - strb r0, [r4, #0x1a] - add r0, r5, #0 - add r0, #0xd8 - ldrh r0, [r0] - strh r0, [r4, #0x14] - add r0, r5, #0 - add r0, #0xda - ldrh r0, [r0] - strh r0, [r4, #0x16] - add r0, r5, #0 - add r0, #0xdc - ldrh r0, [r0] - strh r0, [r4, #0x18] - ldrb r0, [r5, #3] - strb r0, [r4, #0x10] - ldr r0, _022442A8 ; =ov17_022442AC - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022442A4: .word 0x00007530 -_022442A8: .word ov17_022442AC - thumb_func_end ov17_02244240 - - thumb_func_start ov17_022442AC -ov17_022442AC: ; 0x022442AC - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #8 - bhi _022443BA - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022442C6: ; jump table - .short _022442D8 - _022442C6 - 2 ; case 0 - .short _02244314 - _022442C6 - 2 ; case 1 - .short _02244322 - _022442C6 - 2 ; case 2 - .short _0224432A - _022442C6 - 2 ; case 3 - .short _0224434E - _022442C6 - 2 ; case 4 - .short _02244362 - _022442C6 - 2 ; case 5 - .short _0224436A - _022442C6 - 2 ; case 6 - .short _0224438E - _022442C6 - 2 ; case 7 - .short _0224439C - _022442C6 - 2 ; case 8 -_022442D8: - ldrb r0, [r4, #0xd] - ldr r1, [r4, #0] - lsl r0, r0, #1 - add r1, r1, r0 - ldr r0, _022443DC ; =0x00000242 - ldrsh r0, [r1, r0] - bl ov17_02243174 - add r3, r0, #0 - cmp r3, #0 - ble _02244302 - mov r1, #0 - add r0, r4, #0 - str r1, [sp] - add r0, #0x12 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov17_022431A0 - b _0224430A -_02244302: - mov r0, #2 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224430A: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244314: - ldrb r1, [r4, #0x12] - cmp r1, #1 - bne _022443D8 - add r0, r0, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244322: - add r0, r0, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224432A: - ldrb r1, [r4, #0x1a] - cmp r1, #0 - beq _02244346 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0x14 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244346: - mov r0, #5 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224434E: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _022443D8 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244362: - add r0, r0, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224436A: - ldr r0, [r4, #0] - ldrb r1, [r4, #0xe] - ldrb r2, [r4, #0x10] - add r0, #0xc - bl ov17_02241A8C - add r3, r4, #0 - ldrb r1, [r4, #0xe] - ldrb r2, [r4, #0x10] - ldr r0, [r4, #0] - add r3, #0xf - bl ov17_02241B3C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224438E: - ldrb r1, [r4, #0xf] - cmp r1, #1 - bne _022443D8 - add r0, r0, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224439C: - ldrb r0, [r4, #0x11] - add r0, r0, #1 - strb r0, [r4, #0x11] - ldrb r0, [r4, #0x11] - cmp r0, #5 - bls _022443D8 - ldr r0, [r4, #0] - add r0, #0xc - bl ov17_02241B1C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022443BA: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_022443D8: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022443DC: .word 0x00000242 - thumb_func_end ov17_022442AC - - thumb_func_start ov17_022443E0 -ov17_022443E0: ; 0x022443E0 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_022443E0 - - thumb_func_start ov17_022443F8 -ov17_022443F8: ; 0x022443F8 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x49 - mov r0, #0x15 - lsl r1, r1, #2 - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x49 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r1, [r5] - mov r0, #0x2c - add r2, r1, #0 - mul r2, r0 - add r1, r5, r2 - ldrh r1, [r1, #0x10] - strh r1, [r4, #0xe] - add r1, r5, #0 - add r1, #0xe4 - ldrb r2, [r1] - add r1, r0, #0 - add r1, #0xe2 - strb r2, [r4, r1] - add r1, r5, #0 - add r1, #0xd8 - ldrh r2, [r1] - add r1, r0, #0 - add r1, #0xdc - strh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xda - ldrh r2, [r1] - add r1, r0, #0 - add r1, #0xde - strh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xdc - ldrh r2, [r1] - add r1, r0, #0 - add r1, #0xe0 - strh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xe5 - ldrb r2, [r1] - add r1, r0, #0 - add r1, #0xea - strb r2, [r4, r1] - add r1, r5, #0 - add r1, #0xde - ldrh r2, [r1] - add r1, r0, #0 - add r1, #0xe4 - strh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xe0 - ldrh r2, [r1] - add r1, r0, #0 - add r1, #0xe6 - strh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xe2 - ldrh r1, [r1] - add r0, #0xe8 - mov r2, #0x1e - strh r1, [r4, r0] -_0224449E: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224449E - ldr r0, [r5, #0] - add r1, r4, #0 - str r0, [r3, #0] - ldr r0, _022444B8 ; =ov17_022444BC - mov r2, #5 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022444B8: .word ov17_022444BC - thumb_func_end ov17_022443F8 - - thumb_func_start ov17_022444BC -ov17_022444BC: ; 0x022444BC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x118 - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r6, r0, #0 - add r2, r4, #0 - mov r5, #0x2c - add r0, r1, #0 - add r2, #0x24 - mul r0, r5 - add r3, r2, r0 - ldrb r0, [r4, #0xc] - cmp r0, #0xe - bls _022444DA - b _0224492A -_022444DA: - add r2, r0, r0 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022444E6: ; jump table - .short _02244504 - _022444E6 - 2 ; case 0 - .short _0224452C - _022444E6 - 2 ; case 1 - .short _02244540 - _022444E6 - 2 ; case 2 - .short _02244548 - _022444E6 - 2 ; case 3 - .short _0224456E - _022444E6 - 2 ; case 4 - .short _02244582 - _022444E6 - 2 ; case 5 - .short _0224458A - _022444E6 - 2 ; case 6 - .short _022445B2 - _022444E6 - 2 ; case 7 - .short _022445C8 - _022444E6 - 2 ; case 8 - .short _022445D0 - _022444E6 - 2 ; case 9 - .short _022445E4 - _022444E6 - 2 ; case 10 - .short _02244890 - _022444E6 - 2 ; case 11 - .short _022448E6 - _022444E6 - 2 ; case 12 - .short _02244906 - _022444E6 - 2 ; case 13 - .short _0224491C - _022444E6 - 2 ; case 14 -_02244504: - add r0, r5, #0 - add r0, #0xe2 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _02244524 - add r5, #0xdc - ldr r0, [r4, #0] - add r2, r4, r5 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244524: - mov r0, #2 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224452C: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _022445BC - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244540: - add r0, r0, #1 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244548: - ldrb r1, [r3, #0x12] - cmp r1, #0 - beq _02244566 - mov r0, #0 - str r0, [sp] - ldrb r2, [r3, #0x13] - ldr r0, [r4, #0] - add r3, #0xc - bl ov17_02242E9C - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244566: - mov r0, #5 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224456E: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _022445BC - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244582: - add r0, r0, #1 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224458A: - add r0, r5, #0 - add r0, #0xea - ldrb r1, [r4, r0] - cmp r1, #0 - beq _022445AA - add r5, #0xdc - ldr r0, [r4, #0] - add r2, r4, r5 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022445AA: - mov r0, #8 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022445B2: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - beq _022445BE -_022445BC: - b _02244948 -_022445BE: - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022445C8: - add r0, r0, #1 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022445D0: - ldr r0, [r4, #0] - ldrh r2, [r4, #0xe] - add r5, #0xec - ldr r0, [r0, #0] - add r3, r4, r5 - bl ov17_022439C8 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_022445E4: - ldrb r0, [r4, #0xd] - add r5, r0, #1 - cmp r5, #4 - blt _022445EE - mov r5, #0 -_022445EE: - add r0, sp, #0xc0 - mov r1, #0 - mov r2, #0x58 - bl sub_020C4CF4 - add r0, sp, #0x30 - mov r1, #0 - mov r2, #0x90 - bl sub_020C4CF4 - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #5 - bl sub_02074470 - add r7, r0, #0 - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x6f - bl sub_02074470 - str r0, [sp, #0x28] - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02075E0C - str r0, [sp, #0x20] - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x70 - bl sub_02074470 - str r0, [sp, #0x1c] - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - add r2, r1, #0 - bl sub_02074470 - str r0, [sp, #8] - ldr r0, [r4, #0] - lsl r5, r5, #2 - ldr r0, [r0, #0xc] - mov r1, #5 - ldr r0, [r0, r5] - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x18] - ldr r0, [r4, #0] - mov r1, #0x6f - ldr r0, [r0, #0xc] - mov r2, #0 - ldr r0, [r0, r5] - bl sub_02074470 - str r0, [sp, #0x14] - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - ldr r0, [r0, r5] - bl sub_02075E0C - str r0, [sp, #0x10] - ldr r0, [r4, #0] - mov r1, #0x70 - ldr r0, [r0, #0xc] - mov r2, #0 - ldr r0, [r0, r5] - bl sub_02074470 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0xc] - add r2, r1, #0 - ldr r0, [r0, r5] - bl sub_02074470 - mov r3, #0x47 - mov r1, #0 - add r2, sp, #0xc0 - strb r1, [r2] - strb r1, [r2, #1] - lsl r3, r3, #2 - str r0, [sp, #4] - ldrh r0, [r4, r3] - mov r5, #0xa - strh r0, [r2, #2] - mov r0, #1 - str r0, [sp, #0xc4] - strh r5, [r2, #8] - add r5, r3, #3 - ldrb r5, [r4, r5] - add r3, r3, #4 - strh r5, [r2, #0xa] - ldrb r3, [r4, r3] - strh r3, [r2, #0xc] - str r1, [sp, #0xd0] - strh r1, [r2, #0x14] - strh r0, [r2, #0x16] - mov r0, #9 - str r0, [sp, #0x114] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 -_022446E2: - add r1, r1, #1 - strh r0, [r2, #0x18] - add r2, r2, #2 - cmp r1, #4 - blt _022446E2 - ldr r0, [sp, #0x18] - add r1, sp, #0xc0 - strh r0, [r1, #0x1a] - ldr r0, [r4, #0] - lsl r3, r7, #0x10 - ldr r0, [r0, #0x30] - lsr r3, r3, #0x10 - str r0, [sp, #0x34] - ldr r0, [r4, #0] - str r3, [sp, #0x2c] - ldr r0, [r0, #0x5c] - ldr r3, [sp, #0x28] - str r0, [sp, #0x38] - ldrb r0, [r4, #0xd] - lsl r3, r3, #0x18 - ldr r1, [r4, #0] - lsr r3, r3, #0x18 - str r3, [sp, #0x24] - ldr r3, [sp, #0x20] - add r1, #0x64 - lsl r0, r0, #4 - add r0, r1, r0 - lsl r3, r3, #0x18 - str r0, [sp, #0x3c] - ldr r0, [r4, #0] - lsr r3, r3, #0x18 - mov ip, r3 - ldr r3, [sp, #0x1c] - add r0, #0xa4 - str r0, [sp, #0x40] - add r0, sp, #0x30 - lsl r3, r3, #0x18 - mov r6, #0 - add r1, r0, #0 - add r2, r0, #0 - lsr r7, r3, #0x18 -_02244734: - mov r3, #0xff - strb r3, [r0, #0x1c] - ldr r3, [sp, #0x2c] - add r5, r0, #0 - strh r3, [r1, #0x34] - ldr r3, [sp, #0x24] - add r5, #0x3c - strb r3, [r5] - add r5, r0, #0 - add r5, #0x40 - mov r3, ip - strb r3, [r5] - add r3, r0, #0 - add r3, #0x44 - strb r7, [r3] - ldr r3, [sp, #8] - add r6, r6, #1 - str r3, [r2, #0x48] - mov r3, #0 - str r3, [r2, #0x58] - add r0, r0, #1 - add r1, r1, #2 - add r2, r2, #4 - cmp r6, #4 - blt _02244734 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r2, sp, #0x30 - str r0, [sp, #0x88] - add r0, r3, #0 - strb r0, [r2, #0x1c] - mov r0, #1 - ldr r1, [sp, #0x18] - strb r0, [r2, #0x1d] - strh r1, [r2, #0x36] - ldr r1, [sp, #0x14] - add r2, sp, #0x50 - strb r1, [r2, #0x1d] - ldr r1, [sp, #0x10] - add r2, sp, #0x70 - strb r1, [r2, #1] - ldr r1, [sp, #0xc] - strb r1, [r2, #5] - ldr r1, [sp, #4] - str r1, [sp, #0x7c] - ldrb r1, [r4, #0xd] - ldr r2, [r4, #0] - lsl r1, r1, #2 - add r1, r2, r1 - ldr r1, [r1, #0x14] - str r1, [sp, #0x50] - ldrb r1, [r4, #0xd] - cmp r1, #0 - beq _022447A4 - add r0, r3, #0 -_022447A4: - lsl r5, r0, #2 - ldr r0, [r4, #0] - mov r2, #0x57 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r1, #8 - str r1, [sp, #0x98] - mov r1, #0x2d - str r1, [sp, #0x9c] - mov r1, #1 - str r1, [sp, #0xa0] - mov r1, #0x1e - str r0, [sp, #0x54] - mov r0, #0 - str r1, [sp, #0xa4] - mov r1, #2 - str r0, [sp, #0x60] - str r0, [sp, #0xac] - mov r0, #3 - str r1, [sp, #0xa8] - str r0, [sp, #0xb0] - ldr r0, [r4, #0] - lsl r2, r2, #2 - ldr r0, [r0, #0x24] - add r3, sp, #0x30 - str r0, [sp, #0x30] - ldr r0, [r4, #0] - ldr r1, [r0, #0] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, r2] - sub r2, #0x40 - str r0, [sp, #0xb4] - ldr r0, [r4, #0] - ldrh r2, [r4, r2] - ldr r0, [r0, #0x2c] - add r1, sp, #0xc0 - bl ov12_0221FE30 - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_020765AC - add r6, r0, #0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r4, r0] - ldr r0, _0224494C ; =0xDFFBFF3F - cmp r1, r0 - beq _02244824 - ldrb r0, [r4, #0xd] - ldr r1, [r4, #0] - mov r2, #0 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #6 - bl sub_02007DEC -_02244824: - ldrb r0, [r4, #0xd] - ldr r1, [r4, #0] - mov r2, #0 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #0x25 - bl sub_02007DEC - ldrb r0, [r4, #0xd] - ldr r1, [r4, #0] - mov r2, #0xd8 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #0 - bl sub_02007DEC - ldrb r0, [r4, #0xd] - add r6, #0x70 - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #1 - add r2, r6, #0 - bl sub_02007DEC - ldr r0, [r4, #0] - mov r1, #0x25 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r2, #1 - bl sub_02007DEC - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r2, #0x50 - bl sub_02007DEC - ldr r0, [r4, #0] - mov r1, #1 - add r0, r0, r5 - ldr r0, [r0, #0x14] - mov r2, #0x2a - bl sub_02007DEC - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244890: - ldr r0, [r4, #0] - ldr r0, [r0, #0x2c] - bl ov12_0222016C - ldr r0, [r4, #0] - ldr r0, [r0, #0x2c] - bl ov12_02220188 - cmp r0, #0 - bne _02244948 - ldr r0, [r4, #0] - ldr r0, [r0, #0x2c] - bl ov12_02220198 - add r1, r5, #0 - add r1, #0xf2 - ldrb r0, [r4, r1] - cmp r0, #0 - beq _022448DC - sub r0, r0, #1 - strb r0, [r4, r1] - add r0, r1, #1 - ldrb r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #1 - strb r2, [r4, r0] - sub r0, r1, #6 - ldr r2, [r4, r0] - ldr r0, _02244950 ; =0x200400C0 - cmp r2, r0 - bne _022448D4 - ldr r2, _0224494C ; =0xDFFBFF3F - sub r0, r1, #6 - str r2, [r4, r0] -_022448D4: - mov r0, #0xa - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022448DC: - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022448E6: - add r5, #0xf0 - ldrh r0, [r4, r5] - cmp r0, #0x90 - beq _022448F2 - cmp r0, #0xa4 - bne _022448FC -_022448F2: - ldr r0, [r4, #0] - mov r2, #1 - add r1, r0, r1 - ldr r0, _02244954 ; =0x00001652 - strb r2, [r1, r0] -_022448FC: - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244906: - add r2, r4, #0 - ldr r0, [r4, #0] - mov r1, #1 - add r2, #0x10 - bl ov17_022426E8 - ldrb r0, [r4, #0xc] - add sp, #0x118 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224491C: - ldrb r1, [r4, #0x10] - cmp r1, #1 - bne _02244948 - add r0, r0, #1 - add sp, #0x118 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0224492A: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02244948: - add sp, #0x118 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224494C: .word 0xDFFBFF3F -_02244950: .word 0x200400C0 -_02244954: .word 0x00001652 - thumb_func_end ov17_022444BC - - thumb_func_start ov17_02244958 -ov17_02244958: ; 0x02244958 - push {r3, lr} - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - mov r3, #0 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02244958 - - thumb_func_start ov17_02244970 -ov17_02244970: ; 0x02244970 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r0, #0x15 - mov r1, #0x14 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - mov r2, #0x64 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r1, [r6, #0xc] - ldr r0, _022449B0 ; =0x00000123 - ldrb r0, [r1, r0] - add r1, r4, #0 - strb r0, [r4, #0xd] - ldr r0, _022449B4 ; =ov17_022449B8 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_022449B0: .word 0x00000123 -_022449B4: .word ov17_022449B8 - thumb_func_end ov17_02244970 - - thumb_func_start ov17_022449B8 -ov17_022449B8: ; 0x022449B8 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #0xa - bls _022449C8 - b _02244B56 -_022449C8: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022449D4: ; jump table - .short _022449EA - _022449D4 - 2 ; case 0 - .short _02244A04 - _022449D4 - 2 ; case 1 - .short _02244A62 - _022449D4 - 2 ; case 2 - .short _02244A72 - _022449D4 - 2 ; case 3 - .short _02244AAC - _022449D4 - 2 ; case 4 - .short _02244AC0 - _022449D4 - 2 ; case 5 - .short _02244AC6 - _022449D4 - 2 ; case 6 - .short _02244AFA - _022449D4 - 2 ; case 7 - .short _02244B0A - _022449D4 - 2 ; case 8 - .short _02244B2E - _022449D4 - 2 ; case 9 - .short _02244B50 - _022449D4 - 2 ; case 10 -_022449EA: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - mov r2, #0 - ldr r0, [r1, r0] - mov r1, #1 - add r3, r2, #0 - bl ov17_0223F9C4 - ldrb r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, pc} -_02244A04: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - mov r2, #0 - ldr r0, [r1, r0] - mov r1, #2 - add r3, r2, #0 - bl ov17_0223F9C4 - mov r0, #0x23 - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldrb r0, [r1, r0] - add r2, r0, #1 - cmp r2, #4 - bne _02244A26 - mov r1, #3 - b _02244A28 -_02244A26: - mov r1, #2 -_02244A28: - add r0, sp, #0 - strb r2, [r0, #0xa] - add r2, sp, #4 - ldr r0, [r4, #0] - add r2, #2 - mov r3, #0 - bl ov17_02242E5C - mov r0, #0x23 - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldrb r0, [r1, r0] - add r0, r0, #1 - cmp r0, #4 - bne _02244A58 - ldrb r0, [r4, #0xe] - cmp r0, #0 - bne _02244A58 - ldr r0, _02244BA4 ; =0x000006F6 - bl sub_02005748 - ldrb r0, [r4, #0xe] - add r0, r0, #1 - strb r0, [r4, #0xe] -_02244A58: - ldrb r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, pc} -_02244A62: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02244A86 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244A72: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - ldr r0, [r1, r0] - bl ov17_0223FAF8 - add r1, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - bne _02244A88 -_02244A86: - b _02244B9C -_02244A88: - ldr r0, [r4, #0] - add r1, #0x36 - ldr r2, [r0, #0xc] - ldrb r0, [r4, #0xd] - lsl r0, r0, #2 - ldr r0, [r2, r0] - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x10] - ldr r0, _02244BA8 ; =0x000005DD - bl sub_02005748 - ldrb r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, pc} -_02244AAC: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - ldr r0, [r1, r0] - bl ov17_0223FBC0 - cmp r0, #0 - beq _02244B9C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244AC0: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244AC6: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - mov r2, #0 - ldr r0, [r1, r0] - mov r1, #3 - add r3, r2, #0 - bl ov17_0223F9C4 - mov r0, #0x23 - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldrb r0, [r1, r0] - add r2, sp, #0 - mov r3, #0 - add r1, r0, #1 - add r0, sp, #0 - strb r1, [r0, #4] - ldr r0, [r4, #0] - mov r1, #1 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, pc} -_02244AFA: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02244B9C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244B0A: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - ldr r0, [r1, r0] - bl ov17_0223FAF8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02244B9C - strh r0, [r4, #0x12] - ldr r0, _02244BA8 ; =0x000005DD - bl sub_02005748 - ldrb r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, pc} -_02244B2E: - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - ldr r0, [r1, r0] - bl ov17_0223FBC0 - cmp r0, #0 - beq _02244B9C - ldrh r0, [r4, #0x12] - cmp r0, #3 - bne _02244B4A - mov r0, #1 - add sp, #0xc - strb r0, [r4, #0xc] - pop {r4, r5, pc} -_02244B4A: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244B50: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244B56: - ldr r0, [r4, #0] - ldr r1, _02244BAC ; =0x00000171 - ldr r2, [r0, #0] - ldrb r1, [r2, r1] - cmp r1, #1 - bne _02244B6C - mov r2, #0 - mov r1, #0x2e - add r3, r2, #0 - bl ov17_02242E5C -_02244B6C: - mov r0, #0xc3 - add r2, r4, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r2, #0x10 - mov r3, #4 - bl ov17_0224F26C - ldr r1, [r4, #0] - ldr r0, _02244BA0 ; =0x0000081C - ldr r0, [r1, r0] - mov r1, #0 - add r2, r1, #0 - add r3, r1, #0 - bl ov17_0223F9C4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02244B9C: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02244BA0: .word 0x0000081C -_02244BA4: .word 0x000006F6 -_02244BA8: .word 0x000005DD -_02244BAC: .word 0x00000171 - thumb_func_end ov17_022449B8 - - thumb_func_start ov17_02244BB0 -ov17_02244BB0: ; 0x02244BB0 - push {r4, r5} - ldr r0, [sp, #8] - lsl r2, r0, #2 - ldr r5, [r3, r2] - lsl r2, r0, #1 - ldrh r4, [r5] - add r3, r1, r2 - ldr r2, _02244BD0 ; =0x00000236 - add r0, r1, r0 - strh r4, [r3, r2] - ldrh r3, [r5, #2] - add r2, #8 - strb r3, [r0, r2] - pop {r4, r5} - bx lr - nop -_02244BD0: .word 0x00000236 - thumb_func_end ov17_02244BB0 - - thumb_func_start ov17_02244BD4 -ov17_02244BD4: ; 0x02244BD4 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02244BD4 - - thumb_func_start ov17_02244BEC -ov17_02244BEC: ; 0x02244BEC - bx lr - ; .align 2, 0 - thumb_func_end ov17_02244BEC - - thumb_func_start ov17_02244BF0 -ov17_02244BF0: ; 0x02244BF0 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02244BF0 - - thumb_func_start ov17_02244C08 -ov17_02244C08: ; 0x02244C08 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #1] - strb r0, [r4, #0xe] -_02244C46: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02244C46 - ldr r0, [r5, #0] - ldr r2, _02244C60 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _02244C64 ; =ov17_02244C68 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244C60: .word 0x00007530 -_02244C64: .word ov17_02244C68 - thumb_func_end ov17_02244C08 - - thumb_func_start ov17_02244C68 -ov17_02244C68: ; 0x02244C68 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - add r3, r4, #0 - add r2, r1, #0 - mov r0, #0x2c - ldrb r1, [r4, #0xc] - add r3, #0x24 - mul r2, r0 - add r2, r3, r2 - cmp r1, #4 - bhi _02244D00 - add r3, r1, r1 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_02244C8E: ; jump table - .short _02244C98 - _02244C8E - 2 ; case 0 - .short _02244CA8 - _02244C8E - 2 ; case 1 - .short _02244CAE - _02244C8E - 2 ; case 2 - .short _02244CE6 - _02244C8E - 2 ; case 3 - .short _02244D00 - _02244C8E - 2 ; case 4 -_02244C98: - mov r0, #0x1a - ldrsh r1, [r2, r0] - add r0, #0xee - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244CA8: - add r0, r1, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244CAE: - add r0, #0xdc - mov r3, #0x18 - ldrsh r1, [r4, r0] - ldrsh r0, [r2, r3] - cmp r1, r0 - bge _02244CE0 - add r0, r3, #0 - add r0, #0xf0 - ldrsh r1, [r4, r0] - add r0, r3, #0 - add r0, #0xf0 - add r1, #0xa - strh r1, [r4, r0] - add r3, #0xf0 - ldr r0, [r4, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrsh r3, [r4, r3] - add r0, #0xc - bl ov17_02241F34 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244CE0: - mov r0, #4 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244CE6: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02244D1E - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02244D00: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02244D1E: - pop {r3, r4, r5, pc} - thumb_func_end ov17_02244C68 - - thumb_func_start ov17_02244D20 -ov17_02244D20: ; 0x02244D20 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02244D20 - - thumb_func_start ov17_02244D38 -ov17_02244D38: ; 0x02244D38 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #1] - strb r0, [r4, #0xe] -_02244D76: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02244D76 - ldr r0, [r5, #0] - ldr r2, _02244D90 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _02244D94 ; =ov17_02244D98 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244D90: .word 0x00007530 -_02244D94: .word ov17_02244D98 - thumb_func_end ov17_02244D38 - - thumb_func_start ov17_02244D98 -ov17_02244D98: ; 0x02244D98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - ldrb r1, [r4, #0xd] - str r0, [sp, #4] - add r2, r4, #0 - mov r0, #0x2c - add r2, #0x24 - mul r0, r1 - add r3, r2, r0 - ldrb r0, [r4, #0xc] - cmp r0, #0x10 - bls _02244DB4 - b _02244F8C -_02244DB4: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02244DC0: ; jump table - .short _02244DE2 - _02244DC0 - 2 ; case 0 - .short _02244DF4 - _02244DC0 - 2 ; case 1 - .short _02244E1A - _02244DC0 - 2 ; case 2 - .short _02244E2E - _02244DC0 - 2 ; case 3 - .short _02244E32 - _02244DC0 - 2 ; case 4 - .short _02244E38 - _02244DC0 - 2 ; case 5 - .short _02244E6A - _02244DC0 - 2 ; case 6 - .short _02244E88 - _02244DC0 - 2 ; case 7 - .short _02244E8C - _02244DC0 - 2 ; case 8 - .short _02244EB8 - _02244DC0 - 2 ; case 9 - .short _02244F0A - _02244DC0 - 2 ; case 10 - .short _02244F26 - _02244DC0 - 2 ; case 11 - .short _02244F2A - _02244DC0 - 2 ; case 12 - .short _02244F30 - _02244DC0 - 2 ; case 13 - .short _02244F80 - _02244DC0 - 2 ; case 14 - .short _02244F86 - _02244DC0 - 2 ; case 15 - .short _02244F8C - _02244DC0 - 2 ; case 16 -_02244DE2: - mov r0, #0x1a - ldrsh r1, [r3, r0] - add r0, #0xee - add sp, #8 - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244DF4: - ldrb r1, [r3, #0x12] - cmp r1, #0 - beq _02244E12 - mov r0, #0 - str r0, [sp] - ldrb r2, [r3, #0x13] - ldr r0, [r4, #0] - add r3, #0xc - bl ov17_02242E9C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244E12: - mov r0, #3 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244E1A: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02244E78 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244E2E: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244E32: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244E38: - mov r5, #0x42 - lsl r5, r5, #2 - mov r0, #0x18 - ldrsh r1, [r4, r5] - ldrsh r0, [r3, r0] - cmp r1, r0 - bge _02244E62 - add r1, #0xa - strh r1, [r4, r5] - ldr r0, [r4, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrsh r3, [r4, r5] - add r0, #0xc - bl ov17_02241F34 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244E62: - mov r0, #7 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244E6A: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - bgt _02244E7A -_02244E78: - b _02244FAA -_02244E7A: - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - add sp, #8 - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244E88: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244E8C: - ldr r0, [r3, #0x28] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - cmp r0, #1 - bne _02244EB0 - ldrb r0, [r3, #3] - add sp, #8 - add r1, r4, r0 - mov r0, #0xe4 - ldrsb r1, [r1, r0] - add r0, #0x26 - strh r1, [r4, r0] - mov r0, #0 - strb r0, [r4, #0x10] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244EB0: - mov r0, #0xb - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244EB8: - mov r0, #0x10 - ldrsb r0, [r4, r0] - mov r6, #0 - add r5, r6, #0 - add r0, r0, #1 - strb r0, [r4, #0x10] - mov r7, #0xe7 -_02244EC6: - mov r2, #0x10 - ldrsb r3, [r4, r2] - add r1, r4, r5 - mov r0, #0xe4 - mov r2, #0xa - ldrsb r0, [r1, r0] - mul r2, r3 - sub r2, r0, r2 - ldrsb r0, [r1, r7] - cmp r0, r2 - bgt _02244EEE - ldr r0, [r4, #0] - add r1, r5, #0 - add r0, #0xc - add r6, r6, #1 - bl ov17_022424D4 - ldr r0, _02244FB0 ; =0x000006DF - bl sub_02005748 -_02244EEE: - add r5, r5, #1 - cmp r5, #3 - blt _02244EC6 - cmp r6, #0 - ble _02244F02 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244F02: - mov r0, #0xb - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244F0A: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02244FAA - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - add sp, #8 - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02244F26: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244F2A: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244F30: - add r6, r4, #0 - mov r5, #0 - add r6, #0x4c -_02244F36: - ldr r2, [r4, #0] - ldr r0, _02244FB4 ; =0x00000231 - add r1, r2, r5 - ldrb r1, [r1, r0] - mov r0, #0x2c - add r7, r1, #0 - mul r7, r0 - ldr r0, [r6, r7] - lsl r1, r0, #0x1a - lsl r3, r0, #0x16 - lsr r1, r1, #0x1e - lsr r3, r3, #0x1e - cmp r1, r3 - bne _02244F5E - lsl r1, r0, #0x18 - lsl r0, r0, #0x14 - lsr r1, r1, #0x1e - lsr r0, r0, #0x1e - cmp r1, r0 - beq _02244F74 -_02244F5E: - add r2, #0xc - add r0, r2, #0 - ldr r2, [r6, r7] - add r1, r5, #0 - lsl r2, r2, #0x18 - lsr r2, r2, #0x1e - bl ov17_022430AC - ldr r0, _02244FB8 ; =0x000006E2 - bl sub_02005748 -_02244F74: - add r5, r5, #1 - cmp r5, #4 - blt _02244F36 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244F80: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244F86: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02244F8C: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #4] - bl sub_0200DA58 -_02244FAA: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244FB0: .word 0x000006DF -_02244FB4: .word 0x00000231 -_02244FB8: .word 0x000006E2 - thumb_func_end ov17_02244D98 - - thumb_func_start ov17_02244FBC -ov17_02244FBC: ; 0x02244FBC - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02244FBC - - thumb_func_start ov17_02244FD4 -ov17_02244FD4: ; 0x02244FD4 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #1] - strb r0, [r4, #0xe] -_02245012: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02245012 - ldr r0, [r5, #0] - ldr r2, _0224502C ; =0x00007530 - str r0, [r3, #0] - ldr r0, _02245030 ; =ov17_02245034 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224502C: .word 0x00007530 -_02245030: .word ov17_02245034 - thumb_func_end ov17_02244FD4 - - thumb_func_start ov17_02245034 -ov17_02245034: ; 0x02245034 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - add r2, r4, #0 - mov r0, #0x2c - add r2, #0x24 - mul r0, r1 - add r3, r2, r0 - ldrb r0, [r4, #0xc] - cmp r0, #8 - bhi _02245104 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02245058: ; jump table - .short _0224506A - _02245058 - 2 ; case 0 - .short _0224507A - _02245058 - 2 ; case 1 - .short _0224509C - _02245058 - 2 ; case 2 - .short _022450AE - _02245058 - 2 ; case 3 - .short _022450B2 - _02245058 - 2 ; case 4 - .short _022450B8 - _02245058 - 2 ; case 5 - .short _022450E6 - _02245058 - 2 ; case 6 - .short _02245100 - _02245058 - 2 ; case 7 - .short _02245104 - _02245058 - 2 ; case 8 -_0224506A: - mov r0, #0x1a - ldrsh r1, [r3, r0] - add r0, #0xee - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224507A: - ldrb r1, [r3, #0x12] - cmp r1, #0 - beq _02245096 - mov r0, #0 - str r0, [sp] - ldrb r2, [r3, #0x13] - ldr r0, [r4, #0] - add r3, #0xc - bl ov17_02242E9C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245096: - mov r0, #3 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224509C: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245122 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022450AE: - add r0, r0, #1 - strb r0, [r4, #0xc] -_022450B2: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_022450B8: - mov r5, #0x42 - lsl r5, r5, #2 - mov r0, #0x18 - ldrsh r1, [r4, r5] - ldrsh r0, [r3, r0] - cmp r1, r0 - bge _022450E0 - add r1, #0xa - strh r1, [r4, r5] - ldr r0, [r4, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrsh r3, [r4, r5] - add r0, #0xc - bl ov17_02241F34 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022450E0: - mov r0, #7 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022450E6: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02245122 - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245100: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245104: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02245122: - pop {r3, r4, r5, pc} - thumb_func_end ov17_02245034 - - thumb_func_start ov17_02245124 -ov17_02245124: ; 0x02245124 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02245124 - - thumb_func_start ov17_0224513C -ov17_0224513C: ; 0x0224513C - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #1] - strb r0, [r4, #0xe] -_0224517A: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224517A - ldr r0, [r5, #0] - ldr r2, _02245194 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _02245198 ; =ov17_0224519C - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245194: .word 0x00007530 -_02245198: .word ov17_0224519C - thumb_func_end ov17_0224513C - - thumb_func_start ov17_0224519C -ov17_0224519C: ; 0x0224519C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r6, r0, #0 - add r3, r4, #0 - add r2, r1, #0 - mov r0, #0x2c - ldrb r1, [r4, #0xc] - add r3, #0x24 - mul r2, r0 - add r5, r3, r2 - cmp r1, #0x19 - bls _022451BA - b _022454DC -_022451BA: - add r2, r1, r1 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022451C6: ; jump table - .short _022451FA - _022451C6 - 2 ; case 0 - .short _02245210 - _022451C6 - 2 ; case 1 - .short _02245254 - _022451C6 - 2 ; case 2 - .short _02245264 - _022451C6 - 2 ; case 3 - .short _02245268 - _022451C6 - 2 ; case 4 - .short _02245290 - _022451C6 - 2 ; case 5 - .short _022452A4 - _022451C6 - 2 ; case 6 - .short _022452A8 - _022451C6 - 2 ; case 7 - .short _022452DC - _022451C6 - 2 ; case 8 - .short _022452FA - _022451C6 - 2 ; case 9 - .short _022452FE - _022451C6 - 2 ; case 10 - .short _02245304 - _022451C6 - 2 ; case 11 - .short _02245370 - _022451C6 - 2 ; case 12 - .short _02245388 - _022451C6 - 2 ; case 13 - .short _022453A2 - _022451C6 - 2 ; case 14 - .short _022453C2 - _022451C6 - 2 ; case 15 - .short _022453EA - _022451C6 - 2 ; case 16 - .short _02245400 - _022451C6 - 2 ; case 17 - .short _02245404 - _022451C6 - 2 ; case 18 - .short _02245430 - _022451C6 - 2 ; case 19 - .short _0224543E - _022451C6 - 2 ; case 20 - .short _02245442 - _022451C6 - 2 ; case 21 - .short _02245454 - _022451C6 - 2 ; case 22 - .short _02245498 - _022451C6 - 2 ; case 23 - .short _022454B4 - _022451C6 - 2 ; case 24 - .short _022454DC - _022451C6 - 2 ; case 25 -_022451FA: - ldrb r0, [r5, #3] - add sp, #8 - add r1, r4, r0 - mov r0, #0xe4 - ldrsb r1, [r1, r0] - add r0, #0x26 - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245210: - ldrb r1, [r5, #3] - mov r0, #0xe7 - add r3, r4, r1 - ldrsb r2, [r3, r0] - mov r0, #0xe4 - ldrsb r0, [r3, r0] - cmp r2, r0 - ble _0224524C - cmp r2, #0x32 - blt _02245228 - mov r6, #3 - b _0224522A -_02245228: - mov r6, #2 -_0224522A: - ldr r0, [r4, #0] - add r2, r6, #0 - add r0, #0xc - bl ov17_02241A8C - ldr r3, _02245504 ; =0x0000010E - ldrb r1, [r5, #3] - ldr r0, [r4, #0] - add r2, r6, #0 - add r3, r4, r3 - bl ov17_02241B3C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_0224524C: - mov r0, #3 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245254: - add r0, #0xe2 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _022452EA - add r0, r1, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245264: - add r0, r1, #1 - strb r0, [r4, #0xc] -_02245268: - add r0, r4, #0 - add r0, #0xf8 - ldrb r1, [r0] - cmp r1, #0 - beq _02245288 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0xec - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245288: - mov r0, #6 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245290: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _022452EA - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022452A4: - add r0, r1, #1 - strb r0, [r4, #0xc] -_022452A8: - ldrb r0, [r5, #3] - add r2, r4, r0 - mov r0, #0xe7 - ldrsb r1, [r2, r0] - mov r0, #0xe4 - ldrsb r0, [r2, r0] - cmp r1, r0 - ble _022452CE - mov r0, #1 - str r0, [sp] - add r0, r4, #0 - add r0, #0x11 - str r0, [sp, #4] - ldr r0, [r4, #0] - mov r2, #0 - mov r3, #0x46 - bl ov17_022431A0 - b _022452D2 -_022452CE: - mov r0, #1 - strb r0, [r4, #0x11] -_022452D2: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022452DC: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #8 - bgt _022452EC -_022452EA: - b _02245500 -_022452EC: - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022452FA: - add r0, r1, #1 - strb r0, [r4, #0xc] -_022452FE: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245304: - ldrb r0, [r5, #3] - add r3, r4, r0 - mov r0, #0xe7 - ldrsb r1, [r3, r0] - add r0, #0x23 - ldrsh r0, [r4, r0] - cmp r0, r1 - beq _02245368 - mov r2, #0xe4 - ldrsb r0, [r3, r2] - sub r0, r1, r0 - cmp r0, #0 - ble _0224533C - add r0, r2, #0 - add r0, #0x26 - ldrsh r1, [r4, r0] - add r0, r2, #0 - add r0, #0x26 - add r1, #0xa - strh r1, [r4, r0] - add r2, #0x26 - ldr r0, [r4, #0] - ldrb r1, [r5, #3] - ldrsh r2, [r4, r2] - add r0, #0xc - bl ov17_022424D4 - b _0224535E -_0224533C: - add r0, r2, #0 - add r0, #0x26 - ldrsh r1, [r4, r0] - add r0, r2, #0 - add r0, #0x26 - sub r1, #0xa - strh r1, [r4, r0] - add r2, #0x26 - ldr r0, [r4, #0] - ldrb r1, [r5, #3] - ldrsh r2, [r4, r2] - add r0, #0xc - bl ov17_022424D4 - ldr r0, _02245508 ; =0x000006DF - bl sub_02005748 -_0224535E: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245368: - mov r0, #0xe - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245370: - ldr r0, [r4, #0] - ldrb r1, [r5, #3] - add r0, #0xc - bl ov17_022424A8 - cmp r0, #1 - bne _022453F4 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245388: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _022453F4 - mov r0, #0 - strb r0, [r4, #0xf] - mov r0, #0xb - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022453A2: - add r0, #0xde - ldrsh r0, [r4, r0] - cmp r0, #0x32 - blt _022453B8 - ldrb r1, [r5, #3] - ldr r0, [r4, #0] - bl ov17_0224365C - mov r1, #0x11 - lsl r1, r1, #4 - str r0, [r4, r1] -_022453B8: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022453C2: - add r0, r4, #0 - add r0, #0xf9 - ldrb r1, [r0] - cmp r1, #0 - beq _022453E2 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0xf2 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022453E2: - mov r0, #0x11 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022453EA: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - beq _022453F6 -_022453F4: - b _02245500 -_022453F6: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245400: - add r0, r1, #1 - strb r0, [r4, #0xc] -_02245404: - ldr r0, _0224550C ; =0x0000010A - ldrsh r0, [r4, r0] - cmp r0, #0x32 - blt _02245428 - add r0, r4, #0 - add r0, #0x12 - str r0, [sp] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrb r3, [r5, #3] - ldr r0, [r4, #0] - bl ov17_022436D0 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245428: - mov r0, #0x14 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245430: - ldrb r0, [r4, #0x12] - cmp r0, #0 - bne _02245500 - add r0, r1, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_0224543E: - add r0, r1, #1 - strb r0, [r4, #0xc] -_02245442: - mov r0, #0x1a - ldrsh r1, [r5, r0] - add r0, #0xee - add sp, #8 - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245454: - add r0, #0xdc - mov r3, #0x18 - ldrsh r1, [r4, r0] - ldrsh r0, [r5, r3] - cmp r1, r0 - bge _02245488 - add r0, r3, #0 - add r0, #0xf0 - ldrsh r1, [r4, r0] - add r0, r3, #0 - add r0, #0xf0 - add r1, #0xa - strh r1, [r4, r0] - add r3, #0xf0 - ldr r0, [r4, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrsh r3, [r4, r3] - add r0, #0xc - bl ov17_02241F34 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245488: - ldr r0, [r4, #0] - add r0, #0xc - bl ov17_02241B1C - mov r0, #0x18 - add sp, #8 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02245498: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02245500 - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - add sp, #8 - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022454B4: - add r1, r0, #0 - add r1, #0xde - ldrsh r1, [r4, r1] - cmp r1, #0x32 - blt _022454D2 - add r0, #0xe4 - ldr r0, [r4, r0] - bl ov17_02243690 - ldr r0, [r4, #0] - ldrb r1, [r5, #3] - add r0, #0xc - mov r2, #0 - bl ov17_022424D4 -_022454D2: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_022454DC: - ldrb r0, [r4, #0x11] - cmp r0, #1 - bne _02245500 - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_02245500: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02245504: .word 0x0000010E -_02245508: .word 0x000006DF -_0224550C: .word 0x0000010A - thumb_func_end ov17_0224519C - - thumb_func_start ov17_02245510 -ov17_02245510: ; 0x02245510 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02245510 - - thumb_func_start ov17_02245528 -ov17_02245528: ; 0x02245528 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #1] - strb r0, [r4, #0xe] -_02245566: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02245566 - ldr r0, [r5, #0] - ldr r2, _02245580 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _02245584 ; =ov17_02245588 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245580: .word 0x00007530 -_02245584: .word ov17_02245588 - thumb_func_end ov17_02245528 - - thumb_func_start ov17_02245588 -ov17_02245588: ; 0x02245588 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - add r2, r4, #0 - mov r0, #0x2c - add r2, #0x24 - mul r0, r1 - add r3, r2, r0 - ldrb r0, [r4, #0xc] - cmp r0, #8 - bhi _02245658 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022455AC: ; jump table - .short _022455BE - _022455AC - 2 ; case 0 - .short _022455CE - _022455AC - 2 ; case 1 - .short _022455F0 - _022455AC - 2 ; case 2 - .short _02245602 - _022455AC - 2 ; case 3 - .short _02245606 - _022455AC - 2 ; case 4 - .short _0224560C - _022455AC - 2 ; case 5 - .short _0224563A - _022455AC - 2 ; case 6 - .short _02245654 - _022455AC - 2 ; case 7 - .short _02245658 - _022455AC - 2 ; case 8 -_022455BE: - mov r0, #0x1a - ldrsh r1, [r3, r0] - add r0, #0xee - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022455CE: - ldrb r1, [r3, #0x12] - cmp r1, #0 - beq _022455EA - mov r0, #0 - str r0, [sp] - ldrb r2, [r3, #0x13] - ldr r0, [r4, #0] - add r3, #0xc - bl ov17_02242E9C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022455EA: - mov r0, #3 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_022455F0: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245676 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245602: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245606: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_0224560C: - mov r5, #0x42 - lsl r5, r5, #2 - mov r0, #0x18 - ldrsh r1, [r4, r5] - ldrsh r0, [r3, r0] - cmp r1, r0 - bge _0224562E - add r1, #0xa - strh r1, [r4, r5] - ldr r0, [r4, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrsh r3, [r4, r5] - add r0, #0xc - bl ov17_02241F34 - b _02245632 -_0224562E: - mov r0, #7 - strb r0, [r4, #0xc] -_02245632: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_0224563A: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02245676 - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245654: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245658: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02245676: - pop {r3, r4, r5, pc} - thumb_func_end ov17_02245588 - - thumb_func_start ov17_02245678 -ov17_02245678: ; 0x02245678 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02245678 - - thumb_func_start ov17_02245690 -ov17_02245690: ; 0x02245690 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xf7 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r2, #0x43 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - add r3, r4, #0 - add r3, #0x10 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] -_022456C6: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _022456C6 - ldr r0, [r6, #0] - ldr r2, _022456E0 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _022456E4 ; =ov17_022456E8 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022456E0: .word 0x00007530 -_022456E4: .word ov17_022456E8 - thumb_func_end ov17_02245690 - - thumb_func_start ov17_022456E8 -ov17_022456E8: ; 0x022456E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp, #4] - ldr r0, _02245944 ; =0x00000106 - add r4, r1, #0 - ldrb r0, [r4, r0] - mov r7, #0 - add r0, r4, r0 - add r0, #0xf9 - ldrb r1, [r0] - cmp r1, #4 - beq _02245724 - add r2, r4, #0 - mov r0, #0x2c - add r2, #0x20 - mul r0, r1 - add r5, r2, r0 - ldr r3, [r4, #0] - ldr r6, _02245948 ; =0x00000231 - add r2, r7, #0 -_02245710: - ldrb r0, [r3, r6] - cmp r1, r0 - bne _0224571A - add r7, r2, #0 - b _02245726 -_0224571A: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #4 - blt _02245710 - b _02245726 -_02245724: - add r5, r7, #0 -_02245726: - ldrb r0, [r4, #0xc] - cmp r0, #0x11 - bls _0224572E - b _02245922 -_0224572E: - add r2, r0, r0 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224573A: ; jump table - .short _0224575E - _0224573A - 2 ; case 0 - .short _0224576C - _0224573A - 2 ; case 1 - .short _022457C0 - _0224573A - 2 ; case 2 - .short _022457D0 - _0224573A - 2 ; case 3 - .short _022457D4 - _0224573A - 2 ; case 4 - .short _022457FC - _0224573A - 2 ; case 5 - .short _02245812 - _0224573A - 2 ; case 6 - .short _02245816 - _0224573A - 2 ; case 7 - .short _02245840 - _0224573A - 2 ; case 8 - .short _02245854 - _0224573A - 2 ; case 9 - .short _02245858 - _0224573A - 2 ; case 10 - .short _02245880 - _0224573A - 2 ; case 11 - .short _02245894 - _0224573A - 2 ; case 12 - .short _02245898 - _0224573A - 2 ; case 13 - .short _022458AA - _0224573A - 2 ; case 14 - .short _022458DC - _0224573A - 2 ; case 15 - .short _022458F8 - _0224573A - 2 ; case 16 - .short _02245922 - _0224573A - 2 ; case 17 -_0224575E: - mov r0, #0x1a - ldrsh r1, [r5, r0] - add r0, #0xea - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_0224576C: - ldrb r0, [r5, #9] - cmp r0, #0 - bne _0224577E - mov r0, #0x6f - lsl r0, r0, #4 - mov r6, #4 - bl sub_02005748 - b _022457A8 -_0224577E: - cmp r0, #1 - bne _0224578C - ldr r0, _0224594C ; =0x000006EF - mov r6, #5 - bl sub_02005748 - b _022457A8 -_0224578C: - cmp r0, #2 - bne _0224579A - ldr r0, _02245950 ; =0x000006EE - mov r6, #6 - bl sub_02005748 - b _022457A8 -_0224579A: - mov r0, #3 - strb r0, [r4, #0xc] - ldr r0, _02245954 ; =0x000006DF - bl sub_02005748 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_022457A8: - ldr r3, _02245958 ; =0x00000107 - ldrb r1, [r5, #3] - ldr r0, [r4, #0] - add r2, r6, #0 - add r3, r4, r3 - bl ov17_02241B3C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022457C0: - ldr r1, _02245958 ; =0x00000107 - ldrb r1, [r4, r1] - cmp r1, #1 - bne _02245806 - add r0, r0, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022457D0: - add r0, r0, #1 - strb r0, [r4, #0xc] -_022457D4: - ldrb r1, [r5, #0x12] - cmp r1, #0 - beq _022457F4 - mov r0, #0 - str r0, [sp] - ldrb r2, [r5, #0x13] - add r5, #0xc - ldr r0, [r4, #0] - add r3, r5, #0 - bl ov17_02242E9C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022457F4: - mov r0, #6 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022457FC: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - beq _02245808 -_02245806: - b _02245940 -_02245808: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245812: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245816: - add r0, r4, #0 - add r0, #0xf4 - ldrb r1, [r0] - cmp r1, #0 - beq _02245838 - add r2, r4, #0 - add r3, r4, #0 - ldr r0, [r4, #0] - add r2, #0xe8 - add r3, #0xf8 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245838: - mov r0, #9 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245840: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245940 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245854: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245858: - add r0, r4, #0 - add r0, #0xf5 - ldrb r1, [r0] - cmp r1, #0 - beq _02245878 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0xee - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245878: - mov r0, #0xc - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245880: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245940 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245894: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245898: - mov r0, #0x1a - ldrsh r1, [r5, r0] - add r0, #0xea - add sp, #8 - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022458AA: - mov r3, #0x41 - lsl r3, r3, #2 - mov r2, #0x18 - ldrsh r0, [r4, r3] - ldrsh r2, [r5, r2] - cmp r0, r2 - bge _022458CA - add r0, #0xa - strh r0, [r4, r3] - ldr r0, [r4, #0] - ldrsh r3, [r4, r3] - add r0, #0xc - add r2, r7, #0 - bl ov17_02241F34 - b _022458D2 -_022458CA: - mov r0, #0x10 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022458D2: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022458DC: - mov r0, #0xd - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xd] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02245940 - mov r0, #0 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xc] - add sp, #8 - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022458F8: - ldr r0, _02245944 ; =0x00000106 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #4 - bhs _02245918 - add r0, r4, r0 - add r0, #0xf9 - ldrb r0, [r0] - cmp r0, #4 - beq _02245918 - mov r0, #0xd - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245918: - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_02245922: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #4] - bl sub_0200DA58 -_02245940: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245944: .word 0x00000106 -_02245948: .word 0x00000231 -_0224594C: .word 0x000006EF -_02245950: .word 0x000006EE -_02245954: .word 0x000006DF -_02245958: .word 0x00000107 - thumb_func_end ov17_022456E8 - - thumb_func_start ov17_0224595C -ov17_0224595C: ; 0x0224595C - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_0224595C - - thumb_func_start ov17_02245974 -ov17_02245974: ; 0x02245974 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r6] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldrb r0, [r5] - strb r0, [r4, #0xd] - ldrb r0, [r5, #1] - strb r0, [r4, #0xe] -_022459B2: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _022459B2 - ldr r0, [r5, #0] - ldr r2, _022459CC ; =0x00007530 - str r0, [r3, #0] - ldr r0, _022459D0 ; =ov17_022459D4 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022459CC: .word 0x00007530 -_022459D0: .word ov17_022459D4 - thumb_func_end ov17_02245974 - - thumb_func_start ov17_022459D4 -ov17_022459D4: ; 0x022459D4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #0xd] - add r5, r0, #0 - add r2, r4, #0 - mov r0, #0x2c - add r2, #0x24 - mul r0, r1 - add r3, r2, r0 - ldrb r0, [r4, #0xc] - cmp r0, #0xe - bls _022459EE - b _02245B26 -_022459EE: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022459FA: ; jump table - .short _02245A18 - _022459FA - 2 ; case 0 - .short _02245A28 - _022459FA - 2 ; case 1 - .short _02245A4A - _022459FA - 2 ; case 2 - .short _02245A5C - _022459FA - 2 ; case 3 - .short _02245A60 - _022459FA - 2 ; case 4 - .short _02245A84 - _022459FA - 2 ; case 5 - .short _02245A96 - _022459FA - 2 ; case 6 - .short _02245A9A - _022459FA - 2 ; case 7 - .short _02245ABE - _022459FA - 2 ; case 8 - .short _02245AD0 - _022459FA - 2 ; case 9 - .short _02245AD4 - _022459FA - 2 ; case 10 - .short _02245ADA - _022459FA - 2 ; case 11 - .short _02245B08 - _022459FA - 2 ; case 12 - .short _02245B22 - _022459FA - 2 ; case 13 - .short _02245B26 - _022459FA - 2 ; case 14 -_02245A18: - mov r0, #0x1a - ldrsh r1, [r3, r0] - add r0, #0xee - strh r1, [r4, r0] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A28: - ldrb r1, [r3, #0x12] - cmp r1, #0 - beq _02245A44 - mov r0, #0 - str r0, [sp] - ldrb r2, [r3, #0x13] - ldr r0, [r4, #0] - add r3, #0xc - bl ov17_02242E9C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A44: - mov r0, #3 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A4A: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245B44 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A5C: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245A60: - add r0, r4, #0 - add r0, #0xf8 - ldrb r1, [r0] - cmp r1, #0 - beq _02245A7E - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0xec - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A7E: - mov r0, #6 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A84: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245B44 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245A96: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245A9A: - add r0, r4, #0 - add r0, #0xf9 - ldrb r1, [r0] - cmp r1, #0 - beq _02245AB8 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0xf2 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245AB8: - mov r0, #9 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245ABE: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245B44 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245AD0: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245AD4: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245ADA: - mov r5, #0x42 - lsl r5, r5, #2 - mov r0, #0x18 - ldrsh r1, [r4, r5] - ldrsh r0, [r3, r0] - cmp r1, r0 - bge _02245AFC - add r1, #0xa - strh r1, [r4, r5] - ldr r0, [r4, #0] - ldrb r1, [r4, #0xd] - ldrb r2, [r4, #0xe] - ldrsh r3, [r4, r5] - add r0, #0xc - bl ov17_02241F34 - b _02245B00 -_02245AFC: - mov r0, #0xd - strb r0, [r4, #0xc] -_02245B00: - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245B08: - mov r0, #0xf - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #0xf] - ldrsb r0, [r4, r0] - cmp r0, #2 - ble _02245B44 - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - sub r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245B22: - add r0, r0, #1 - strb r0, [r4, #0xc] -_02245B26: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02245B44: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_022459D4 - - thumb_func_start ov17_02245B48 -ov17_02245B48: ; 0x02245B48 - push {r3, lr} - mov r0, #0xf4 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02245B48 - - thumb_func_start ov17_02245B60 -ov17_02245B60: ; 0x02245B60 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x15 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xff - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r2, #0x45 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - add r3, r4, #0 - add r3, #0x14 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - mov r2, #0x1e - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r1, [r7, #0xc] - ldr r0, _02245BBC ; =0x00000123 - ldrb r0, [r1, r0] - strb r0, [r4, #0xd] - ldrb r0, [r6, #1] - strb r0, [r4, #0xe] -_02245BA2: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02245BA2 - ldr r0, [r6, #0] - ldr r2, _02245BC0 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _02245BC4 ; =ov17_02245BC8 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245BBC: .word 0x00000123 -_02245BC0: .word 0x00007530 -_02245BC4: .word ov17_02245BC8 - thumb_func_end ov17_02245B60 - - thumb_func_start ov17_02245BC8 -ov17_02245BC8: ; 0x02245BC8 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xd] - add r2, r4, #0 - mov r1, #0x2c - add r2, #0x24 - mul r1, r0 - add r2, r2, r1 - ldrb r1, [r4, #0xc] - cmp r1, #0 - beq _02245BEC - cmp r1, #1 - beq _02245C0C - cmp r1, #2 - beq _02245C20 - b _02245C28 -_02245BEC: - mov r1, #0x18 - ldrsh r1, [r2, r1] - add r2, sp, #0 - bl ov17_0224314C - add r1, r0, #0 - ldr r0, [r4, #0] - add r2, sp, #0 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245C0C: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245C46 - ldrb r0, [r4, #0xc] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245C20: - add r0, r1, #1 - add sp, #8 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02245C28: - mov r0, #0xc3 - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02245C46: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02245BC8 - - thumb_func_start ov17_02245C4C -ov17_02245C4C: ; 0x02245C4C - push {r3, lr} - mov r1, #0xf4 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02245C4C - - thumb_func_start ov17_02245C60 -ov17_02245C60: ; 0x02245C60 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x15 - mov r1, #0x28 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x28 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02245C9C ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _02245CA0 ; =ov17_02245CA4 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245C9C: .word 0x00007530 -_02245CA0: .word ov17_02245CA4 - thumb_func_end ov17_02245C60 - - thumb_func_start ov17_02245CA4 -ov17_02245CA4: ; 0x02245CA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #3 - bhi _02245D7A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02245CC2: ; jump table - .short _02245CCA - _02245CC2 - 2 ; case 0 - .short _02245CEE - _02245CC2 - 2 ; case 1 - .short _02245D30 - _02245CC2 - 2 ; case 2 - .short _02245D7A - _02245CC2 - 2 ; case 3 -_02245CCA: - mov r1, #0 - add r0, r4, #0 - str r1, [sp] - add r0, #0x27 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #0x46 - bl ov17_022431A0 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #8 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_02245CEE: - add r7, r4, #0 - mov r5, #0 - add r6, r4, #0 - add r7, #0x23 -_02245CF6: - ldr r0, [r4, #0] - ldr r1, _02245DA0 ; =0x00000231 - add r2, r0, r5 - ldrb r1, [r2, r1] - bl ov17_0224145C - str r0, [r6, #0x10] - ldr r1, [r4, #0] - add r3, r7, r5 - str r0, [sp] - add r0, r1, #0 - add r2, r1, r5 - ldr r1, _02245DA0 ; =0x00000231 - ldrb r1, [r2, r1] - add r2, r5, #0 - bl ov17_0224331C - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #4 - blt _02245CF6 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #8 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_02245D30: - mov r7, #0 - add r6, r7, #0 - add r5, r4, #0 -_02245D36: - add r0, r4, r6 - add r0, #0x23 - ldrb r0, [r0] - cmp r0, #0 - bne _02245D4C - ldr r0, [r5, #0x10] - bl ov17_022414BC - cmp r0, #0 - bne _02245D4C - add r7, r7, #1 -_02245D4C: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _02245D36 - cmp r7, #4 - bne _02245D9C - mov r6, #0 - add r5, r4, #0 -_02245D5C: - ldr r0, [r5, #0x10] - bl ov17_02241494 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _02245D5C - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r4, #0x20 - add sp, #8 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_02245D7A: - add r0, r4, #0 - add r0, #0x27 - ldrb r0, [r0] - cmp r0, #1 - bne _02245D9C - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02245D9C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245DA0: .word 0x00000231 - thumb_func_end ov17_02245CA4 - - thumb_func_start ov17_02245DA4 -ov17_02245DA4: ; 0x02245DA4 - push {r3, lr} - mov r0, #0xf8 - str r0, [sp] - mov r0, #0xc3 - lsl r0, r0, #4 - lsl r2, r2, #0x10 - add r0, r1, r0 - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - thumb_func_end ov17_02245DA4 - - thumb_func_start ov17_02245DBC -ov17_02245DBC: ; 0x02245DBC - push {r4, r5, r6, lr} - mov r0, #0x23 - add r5, r1, #0 - lsl r0, r0, #4 - add r4, r2, #0 - add r6, r5, r0 - mov r2, #0x1f -_02245DCA: - ldmia r3!, {r0, r1} - stmia r6!, {r0, r1} - sub r2, r2, #1 - bne _02245DCA - add r0, r5, #0 - add r0, #0xc - bl ov17_02241EF0 - add r0, r5, #0 - add r0, #0xc - bl ov17_022430F8 - add r0, r5, #0 - bl ov17_02242FE8 - add r0, r5, #0 - bl ov17_02241428 - mov r0, #0xc3 - lsl r0, r0, #4 - mov r2, #0 - add r0, r5, r0 - add r1, r4, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r4, r5, r6, pc} - thumb_func_end ov17_02245DBC - - thumb_func_start ov17_02245E00 -ov17_02245E00: ; 0x02245E00 - push {r3, lr} - mov r1, #0xf4 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02245E00 - - thumb_func_start ov17_02245E14 -ov17_02245E14: ; 0x02245E14 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x15 - mov r1, #0x20 - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _02245E84 ; =0x00007530 - str r0, [r4, #0] - ldrh r0, [r6] - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] - ldrb r0, [r5] - strb r0, [r4, #0x11] - add r0, r5, #0 - add r0, #0xd8 - ldrh r0, [r0] - strh r0, [r4, #0x14] - add r0, r5, #0 - add r0, #0xda - ldrh r0, [r0] - strh r0, [r4, #0x16] - add r0, r5, #0 - add r0, #0xdc - ldrh r0, [r0] - strh r0, [r4, #0x18] - add r0, r5, #0 - add r0, #0xe4 - ldrb r0, [r0] - strb r0, [r4, #0x1a] - add r0, r5, #0 - add r0, #0xe7 - ldrb r0, [r0] - add r5, #0xe6 - strb r0, [r4, #0x1c] - ldrb r0, [r5] - strb r0, [r4, #0x1b] - ldr r0, _02245E88 ; =ov17_02245E8C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245E84: .word 0x00007530 -_02245E88: .word ov17_02245E8C - thumb_func_end ov17_02245E14 - - thumb_func_start ov17_02245E8C -ov17_02245E8C: ; 0x02245E8C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02245EA2 - cmp r0, #1 - beq _02245EC2 - cmp r0, #2 - beq _02245ED4 - b _02245EF8 -_02245EA2: - ldrb r1, [r4, #0x1a] - cmp r1, #0 - beq _02245EBC - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0x14 - mov r3, #0 - bl ov17_02242E5C - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02245EBC: - mov r0, #0x64 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02245EC2: - ldr r0, [r4, #0] - bl ov17_02242ECC - cmp r0, #0 - bne _02245F10 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02245ED4: - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] - ldrb r0, [r4, #0x1c] - cmp r0, #1 - bne _02245EE8 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02245EE8: - ldrb r1, [r4, #0x12] - ldrb r0, [r4, #0x1b] - cmp r1, r0 - blo _02245F10 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02245EF8: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02245F10: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02245E8C - - thumb_func_start ov17_02245F14 -ov17_02245F14: ; 0x02245F14 - strb r1, [r0, #0x12] - ldr r1, _02245F40 ; =0x00007530 - strb r2, [r0, #0x13] - cmp r3, r1 - beq _02245F20 - strb r3, [r0, #0xc] -_02245F20: - ldr r2, [sp] - ldr r1, _02245F40 ; =0x00007530 - cmp r2, r1 - beq _02245F2A - strb r2, [r0, #0xd] -_02245F2A: - ldr r2, [sp, #4] - ldr r1, _02245F40 ; =0x00007530 - cmp r2, r1 - beq _02245F34 - strh r2, [r0, #0xe] -_02245F34: - ldr r2, [sp, #8] - ldr r1, _02245F40 ; =0x00007530 - cmp r2, r1 - beq _02245F3E - strb r2, [r0, #0x10] -_02245F3E: - bx lr - ; .align 2, 0 -_02245F40: .word 0x00007530 - thumb_func_end ov17_02245F14 - - thumb_func_start ov17_02245F44 -ov17_02245F44: ; 0x02245F44 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x26 - add r5, r1, #0 - lsl r0, r0, #4 - add r4, r6, r0 - add r3, r5, #0 - mov r2, #0x19 -_02245F54: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02245F54 - add r0, r5, #0 - bl ov17_02246540 - add r0, r5, #0 - mov r1, #0 - mov r2, #0xb0 - bl sub_020C4CF4 - mov r4, #0 - add r7, r6, #0 -_02245F70: - add r1, r5, #0 - add r0, r6, #0 - add r1, #0xc - add r2, r4, #0 - bl ov17_02243120 - ldr r0, _02245FAC ; =0x0000023E - add r1, r6, r4 - ldrb r0, [r1, r0] - mov r1, #0xa - strb r0, [r5, #3] - ldr r0, _02245FB0 ; =0x00000236 - ldrh r0, [r7, r0] - strh r0, [r5] - bl sub_020790C4 - strb r0, [r5, #2] - mov r0, #0x23 - lsl r0, r0, #4 - add r0, r6, r0 - add r1, r4, #0 - bl ov17_02243AC4 - strb r0, [r5, #9] - add r4, r4, #1 - add r5, #0x2c - add r7, r7, #2 - cmp r4, #4 - blt _02245F70 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245FAC: .word 0x0000023E -_02245FB0: .word 0x00000236 - thumb_func_end ov17_02245F44 - - thumb_func_start ov17_02245FB4 -ov17_02245FB4: ; 0x02245FB4 - push {r4, r5, r6, r7} - add r3, r1, #0 - ldr r5, _0224600C ; =0xFFFFFCFF - ldr r6, _02246010 ; =0xFFFFF3FF - add r4, r0, #0 - mov r1, #0 - add r2, r3, #0 -_02245FC2: - ldr r7, [r2, #0x28] - add r1, r1, #1 - add r0, r7, #0 - lsl r7, r7, #0x1a - lsr r7, r7, #0x1e - lsl r7, r7, #0x1e - and r0, r5 - lsr r7, r7, #0x16 - orr r7, r0 - add r0, r7, #0 - lsl r7, r7, #0x18 - lsr r7, r7, #0x1e - lsl r7, r7, #0x1e - and r0, r6 - lsr r7, r7, #0x14 - orr r0, r7 - str r0, [r2, #0x28] - add r2, #0x2c - cmp r1, #4 - blt _02245FC2 - ldr r1, _02246014 ; =0x00000252 - mov r0, #0 - add r5, r1, #0 -_02245FF0: - add r7, r4, r0 - ldrsb r6, [r7, r1] - add r2, r3, r0 - add r2, #0xc0 - strb r6, [r2] - add r2, r3, r0 - ldrsb r6, [r7, r5] - add r2, #0xc3 - add r0, r0, #1 - strb r6, [r2] - cmp r0, #3 - blt _02245FF0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_0224600C: .word 0xFFFFFCFF -_02246010: .word 0xFFFFF3FF -_02246014: .word 0x00000252 - thumb_func_end ov17_02245FB4 - - thumb_func_start ov17_02246018 -ov17_02246018: ; 0x02246018 - push {r4, r5, r6, r7} - mov r5, #0 - ldr r2, _02246040 ; =0x00000252 - add r3, r5, #0 -_02246020: - add r7, r1, r5 - mov r6, #0xc3 - ldrsb r7, [r7, r6] - ldr r6, _02246040 ; =0x00000252 - add r4, r0, r5 - strb r7, [r4, r6] - ldrsb r6, [r4, r2] - cmp r6, #0x32 - blt _02246036 - ldr r6, _02246040 ; =0x00000252 - strb r3, [r4, r6] -_02246036: - add r5, r5, #1 - cmp r5, #3 - blt _02246020 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_02246040: .word 0x00000252 - thumb_func_end ov17_02246018 - - thumb_func_start ov17_02246044 -ov17_02246044: ; 0x02246044 - push {r3, r4, r5, r6, r7, lr} - ldr r7, _0224608C ; =0x00000242 - mov ip, r1 - add r5, r7, #0 - mov lr, r0 - mov r1, #0 - mov r2, ip - add r3, r0, #0 - mov r6, #0x18 - add r5, #8 -_02246058: - ldr r0, _0224608C ; =0x00000242 - mov r4, #0x18 - ldrsh r0, [r3, r0] - ldrsh r4, [r2, r4] - add r1, r1, #1 - add r0, r0, r4 - strh r0, [r3, r7] - ldrsh r0, [r2, r6] - add r2, #0x2c - strh r0, [r3, r5] - add r3, r3, #2 - cmp r1, #4 - blt _02246058 - mov r1, #0x26 - lsl r1, r1, #4 - mov r0, lr - add r4, r0, r1 - mov r3, #0x19 -_0224607C: - mov r2, ip - ldmia r2!, {r0, r1} - mov ip, r2 - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _0224607C - pop {r3, r4, r5, r6, r7, pc} - nop -_0224608C: .word 0x00000242 - thumb_func_end ov17_02246044 - - thumb_func_start ov17_02246090 -ov17_02246090: ; 0x02246090 - push {r3, r4} - mov r2, #0x2c - mul r2, r1 - add r2, r0, r2 - mov r1, #0x18 - ldrsh r1, [r2, r1] - mov r4, #0 - strh r1, [r2, #0x1a] - strh r4, [r2, #0x1e] - strh r4, [r2, #0x20] - mov r1, #0xc3 -_022460A6: - add r3, r0, r4 - ldrsb r2, [r3, r1] - add r3, #0xc0 - add r4, r4, #1 - strb r2, [r3] - cmp r4, #3 - blt _022460A6 - mov r2, #0 - add r1, r2, #0 -_022460B8: - strb r1, [r0, #0x14] - strb r1, [r0, #0x12] - add r2, r2, #1 - add r0, #0x2c - cmp r2, #4 - blt _022460B8 - pop {r3, r4} - bx lr - thumb_func_end ov17_02246090 - - thumb_func_start ov17_022460C8 -ov17_022460C8: ; 0x022460C8 - mov r3, #0 - mov r1, #0x18 -_022460CC: - ldrsh r2, [r0, r1] - add r3, r3, #1 - strh r2, [r0, #0x1c] - add r0, #0x2c - cmp r3, #4 - blt _022460CC - bx lr - ; .align 2, 0 - thumb_func_end ov17_022460C8 - - thumb_func_start ov17_022460DC -ov17_022460DC: ; 0x022460DC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r2, #0 - add r0, r5, #0 - add r1, r7, #0 - bl ov17_02246090 - mov r0, #0x2c - add r4, r7, #0 - mul r4, r0 - add r6, r5, #2 - ldrb r0, [r6, r4] - ldr r1, _0224612C ; =0x02253AFD - lsl r2, r0, #3 - ldrb r1, [r1, r2] - cmp r1, #0 - bne _02246126 - mov r1, #4 - add r2, sp, #0x10 - add r3, sp, #0xc - bl sub_02095790 - ldr r1, [sp, #0x10] - ldr r0, _02246130 ; =0x0000FFFF - cmp r1, r0 - beq _02246126 - ldr r0, _02246134 ; =0x00007530 - mov r2, #4 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldrb r1, [r6, r4] - add r0, r5, r4 - add r3, r7, #0 - bl ov17_02245F14 -_02246126: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0224612C: .word 0x02253AFD -_02246130: .word 0x0000FFFF -_02246134: .word 0x00007530 - thumb_func_end ov17_022460DC - - thumb_func_start ov17_02246138 -ov17_02246138: ; 0x02246138 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_02246090 - add r4, r6, #0 - mov r0, #0x2c - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #2] - add r6, r5, #4 - bl sub_02095734 - strb r0, [r6, r4] - ldrb r1, [r6, r4] - add r0, r5, r4 - strh r1, [r0, #0x18] - pop {r4, r5, r6, pc} - thumb_func_end ov17_02246138 - - thumb_func_start ov17_02246160 -ov17_02246160: ; 0x02246160 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - str r0, [sp, #4] - str r2, [sp, #8] - add r0, r7, #0 - add r1, r2, #0 - str r3, [sp, #0xc] - bl ov17_02246090 - ldr r0, [sp, #8] - mov r1, #0x2c - add r4, r0, #0 - mul r4, r1 - add r0, r7, r4 - ldrb r0, [r0, #2] - lsl r6, r0, #3 - ldr r0, _0224621C ; =0x02253AFC - ldrb r0, [r0, r6] - cmp r0, #3 - bne _022461B6 - ldr r0, [sp, #0xc] - ldr r5, _02246220 ; =0x02253AF8 - str r0, [sp] - ldr r2, [sp, #8] - ldr r0, [sp, #4] - ldr r5, [r5, r6] - add r1, r7, #0 - add r3, r2, #0 - blx r5 - add r2, r7, #0 - mov r0, #1 - add r3, r7, r4 - strb r0, [r3, #0x14] - mov r0, #0x1e - add r2, #0x18 - mov r5, #0x20 - ldrsh r0, [r3, r0] - ldrsh r3, [r3, r5] - ldrsh r1, [r2, r4] - add r0, r0, r3 - add r0, r1, r0 - strh r0, [r2, r4] -_022461B6: - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - cmp r0, #0 - blt _02246218 -_022461C0: - ldr r1, [sp, #4] - ldr r0, [sp, #0x10] - add r1, r1, r0 - ldr r0, _02246224 ; =0x00000231 - ldrb r5, [r1, r0] - mov r0, #0x2c - mul r0, r5 - add r4, r7, r0 - ldrb r0, [r4, #2] - lsl r1, r0, #3 - ldr r0, _02246220 ; =0x02253AF8 - add r0, r0, r1 - ldrb r0, [r0, #4] - cmp r0, #2 - bne _0224620C - add r0, r7, #0 - add r1, r5, #0 - bl ov17_02246090 - ldr r0, [sp, #0xc] - add r3, r5, #0 - str r0, [sp] - ldrb r5, [r4, #2] - ldr r0, [sp, #4] - ldr r2, [sp, #8] - lsl r6, r5, #3 - ldr r5, _02246220 ; =0x02253AF8 - add r1, r7, #0 - ldr r5, [r5, r6] - blx r5 - mov r0, #1 - strb r0, [r4, #0x14] - mov r0, #0x18 - ldrsh r1, [r4, r0] - mov r0, #0x1e - ldrsh r0, [r4, r0] - add r0, r1, r0 - strh r0, [r4, #0x18] -_0224620C: - ldr r0, [sp, #0x10] - ldr r1, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, r1 - ble _022461C0 -_02246218: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224621C: .word 0x02253AFC -_02246220: .word 0x02253AF8 -_02246224: .word 0x00000231 - thumb_func_end ov17_02246160 - - thumb_func_start ov17_02246228 -ov17_02246228: ; 0x02246228 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r6, r2, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_02246090 - add r7, r5, #0 - lsl r0, r6, #2 - add r7, #0xb0 - str r0, [sp, #0xc] - ldr r0, [r7, r0] - lsl r0, r0, #8 - lsr r0, r0, #0x18 - beq _0224627E - mov r0, #0x2c - add r4, r6, #0 - mul r4, r0 - add r1, r5, r4 - mov r0, #0x18 - ldrsh r0, [r1, r0] - add r1, r5, #0 - add r1, #0x1e - ldrsh r2, [r1, r4] - add r2, r2, r0 - strh r2, [r1, r4] - mov r1, #0xa - bl sub_020E1F6C - ldr r1, _022462A0 ; =0x00007530 - mov r2, #0 - str r1, [sp] - str r1, [sp, #4] - str r0, [sp, #8] - ldr r1, [sp, #0xc] - add r0, r5, r4 - ldr r1, [r7, r1] - add r3, r6, #0 - lsl r1, r1, #8 - lsr r1, r1, #0x18 - bl ov17_02245F14 -_0224627E: - mov r0, #0x2c - add r2, r6, #0 - add r1, r5, #0 - mul r2, r0 - add r1, #0x18 - add r5, r5, r2 - mov r3, #0x1e - ldrsh r4, [r5, r3] - mov r3, #0x20 - ldrsh r3, [r5, r3] - ldrsh r0, [r1, r2] - add r3, r4, r3 - add r0, r0, r3 - strh r0, [r1, r2] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022462A0: .word 0x00007530 - thumb_func_end ov17_02246228 - - thumb_func_start ov17_022462A4 -ov17_022462A4: ; 0x022462A4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r2, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - str r3, [sp, #8] - bl ov17_02246090 - mov r0, #0x2c - add r4, r6, #0 - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #2] - lsl r7, r0, #3 - ldr r0, _022462FC ; =0x02253AFC - ldrb r0, [r0, r7] - cmp r0, #4 - bne _022462F4 - ldr r0, [sp, #8] - add r2, r6, #0 - add r3, r6, #0 - ldr r6, _02246300 ; =0x02253AF8 - str r0, [sp] - ldr r0, [sp, #4] - ldr r6, [r6, r7] - add r1, r5, #0 - blx r6 - add r3, r5, r4 - mov r0, #1 - strb r0, [r3, #0x14] - add r5, #0x18 - mov r1, #0x1e - ldrsh r2, [r5, r4] - ldrsh r1, [r3, r1] - add sp, #0xc - add r1, r2, r1 - strh r1, [r5, r4] - pop {r4, r5, r6, r7, pc} -_022462F4: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022462FC: .word 0x02253AFC -_02246300: .word 0x02253AF8 - thumb_func_end ov17_022462A4 - - thumb_func_start ov17_02246304 -ov17_02246304: ; 0x02246304 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r2, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - str r3, [sp, #8] - bl ov17_02246090 - mov r0, #0x2c - add r4, r6, #0 - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #2] - lsl r7, r0, #3 - ldr r0, _0224635C ; =0x02253AFC - ldrb r0, [r0, r7] - cmp r0, #5 - bne _02246354 - ldr r0, [sp, #8] - add r2, r6, #0 - add r3, r6, #0 - ldr r6, _02246360 ; =0x02253AF8 - str r0, [sp] - ldr r0, [sp, #4] - ldr r6, [r6, r7] - add r1, r5, #0 - blx r6 - add r3, r5, r4 - mov r0, #1 - strb r0, [r3, #0x14] - add r5, #0x18 - mov r1, #0x1e - ldrsh r2, [r5, r4] - ldrsh r1, [r3, r1] - add sp, #0xc - add r1, r2, r1 - strh r1, [r5, r4] - pop {r4, r5, r6, r7, pc} -_02246354: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224635C: .word 0x02253AFC -_02246360: .word 0x02253AF8 - thumb_func_end ov17_02246304 - - thumb_func_start ov17_02246364 -ov17_02246364: ; 0x02246364 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r2, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - str r3, [sp, #8] - bl ov17_02246090 - mov r0, #0x2c - add r4, r6, #0 - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #2] - lsl r7, r0, #3 - ldr r0, _022463BC ; =0x02253AFC - ldrb r0, [r0, r7] - cmp r0, #6 - bne _022463B4 - ldr r0, [sp, #8] - add r2, r6, #0 - add r3, r6, #0 - ldr r6, _022463C0 ; =0x02253AF8 - str r0, [sp] - ldr r0, [sp, #4] - ldr r6, [r6, r7] - add r1, r5, #0 - blx r6 - add r3, r5, r4 - mov r0, #1 - strb r0, [r3, #0x14] - add r5, #0x18 - mov r1, #0x1e - ldrsh r2, [r5, r4] - ldrsh r1, [r3, r1] - add sp, #0xc - add r1, r2, r1 - strh r1, [r5, r4] - pop {r4, r5, r6, r7, pc} -_022463B4: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022463BC: .word 0x02253AFC -_022463C0: .word 0x02253AF8 - thumb_func_end ov17_02246364 - - thumb_func_start ov17_022463C4 -ov17_022463C4: ; 0x022463C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - str r0, [sp] - add r0, r4, #0 - add r1, r2, #0 - str r2, [sp, #4] - add r7, r3, #0 - bl ov17_02246090 - mov r0, #0 - strb r0, [r7, #0xc] - strb r0, [r7, #0xd] - ldr r1, [sp] - ldr r0, [sp, #4] - mov r6, #0x2c - add r1, r1, r0 - ldr r0, _02246510 ; =0x0000023E - ldrb r5, [r1, r0] - ldr r0, [sp] - ldr r3, [r0, #0] - ldr r0, [sp, #4] - add r2, r5, #0 - add r1, r0, #0 - mul r1, r6 - add r0, r4, r1 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0xf3 - str r1, [sp, #0x10] - add r6, #0xf2 - ldrb r0, [r3, r0] - ldrh r1, [r4, r1] - ldrb r3, [r3, r6] - bl ov17_02243AF0 - add r6, r0, #0 - cmp r6, #0 - ble _02246432 - ldr r0, [sp, #0xc] - ldr r0, [r0, #0x28] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - bne _02246432 - add r0, r4, #0 - add r0, #0xc3 - ldrsb r1, [r0, r5] - add r1, r1, r6 - strb r1, [r0, r5] - ldrsb r1, [r0, r5] - cmp r1, #0x32 - blt _0224645E - mov r1, #0x32 - strb r1, [r0, r5] - b _0224645E -_02246432: - cmp r6, #0 - bge _0224645C - ldr r0, [sp, #0xc] - ldr r0, [r0, #0x28] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - bne _0224645C - add r0, r4, #0 - add r0, #0xc3 - add r1, r0, r5 - ldrsb r0, [r0, r5] - cmp r0, #0 - ble _0224645C - add r0, r0, r6 - mov r2, #0 - strb r0, [r1] - ldrsb r0, [r1, r2] - cmp r0, #0 - bgt _0224645E - strb r2, [r1] - b _0224645E -_0224645C: - mov r6, #0 -_0224645E: - add r1, r4, #0 - add r1, #0xc3 - add r0, r1, r5 - str r0, [sp, #8] - ldrsb r0, [r1, r5] - cmp r0, #0x32 - blt _0224648A - ldr r0, [sp] - ldr r1, [r0, #0] - ldr r0, _02246514 ; =0x0000011E - ldrb r0, [r1, r0] - cmp r5, r0 - bne _02246482 - ldr r0, [sp, #0x10] - mov r1, #0x50 - add r0, r4, r0 - strb r1, [r0, #8] - b _0224648A -_02246482: - ldr r0, [sp, #0x10] - mov r1, #0x32 - add r0, r4, r0 - strb r1, [r0, #8] -_0224648A: - add r0, r4, #0 - ldr r1, [sp, #0x10] - add r0, #8 - add r5, r0, r1 - ldrsb r0, [r0, r1] - mov r1, #0xa - bl sub_020E1F6C - strb r0, [r7, #0xa] - cmp r6, #0 - ble _022464E4 - ldr r0, [sp, #0xc] - mov r1, #0xb - ldrh r0, [r0] - bl sub_020790C4 - bl ov17_02243970 - strb r0, [r7, #0xc] - ldr r0, [sp, #8] - mov r1, #0 - ldrsb r0, [r0, r1] - mov r1, #0xa - bl sub_020E1F6C - cmp r0, #5 - bhi _022464F6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022464CC: ; jump table - .short _022464F6 - _022464CC - 2 ; case 0 - .short _022464F6 - _022464CC - 2 ; case 1 - .short _022464F6 - _022464CC - 2 ; case 2 - .short _022464F6 - _022464CC - 2 ; case 3 - .short _022464D8 - _022464CC - 2 ; case 4 - .short _022464DE - _022464CC - 2 ; case 5 -_022464D8: - mov r0, #0x19 - strb r0, [r7, #0xd] - b _022464F6 -_022464DE: - mov r0, #0x1a - strb r0, [r7, #0xd] - b _022464F6 -_022464E4: - bge _022464F6 - ldr r0, [sp, #0xc] - mov r1, #0xb - ldrh r0, [r0] - bl sub_020790C4 - bl ov17_0224399C - strb r0, [r7, #0xc] -_022464F6: - ldr r0, [sp, #4] - mov r1, #0x2c - add r2, r0, #0 - mov r0, #0 - add r4, #0x18 - mul r2, r1 - ldrsh r1, [r4, r2] - ldrsb r0, [r5, r0] - add r0, r1, r0 - strh r0, [r4, r2] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02246510: .word 0x0000023E -_02246514: .word 0x0000011E - thumb_func_end ov17_022463C4 - - thumb_func_start ov17_02246518 -ov17_02246518: ; 0x02246518 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov17_02246090 - mov r0, #0x2c - add r4, r6, #0 - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #9] - bl ov17_02243AE4 - add r5, #0x18 - ldrsh r1, [r5, r4] - add r0, r1, r0 - strh r0, [r5, r4] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02246518 - - thumb_func_start ov17_02246540 -ov17_02246540: ; 0x02246540 - push {r3, r4, r5, r6} - add r3, r0, #0 - ldr r4, _02246570 ; =0xFFFF0000 - ldr r5, _02246574 ; =0xFF00FFFF - mov r2, #0 - add r3, #0xb0 -_0224654C: - ldr r1, [r3, #0] - add r2, r2, #1 - and r1, r4 - str r1, [r3, #0] - ldr r6, [r0, #0x28] - and r1, r5 - lsl r6, r6, #0xc - lsr r6, r6, #0x18 - lsl r6, r6, #0x18 - lsr r6, r6, #8 - orr r1, r6 - add r0, #0x2c - stmia r3!, {r1} - cmp r2, #4 - blt _0224654C - pop {r3, r4, r5, r6} - bx lr - nop -_02246570: .word 0xFFFF0000 -_02246574: .word 0xFF00FFFF - thumb_func_end ov17_02246540 - - thumb_func_start ov17_02246578 -ov17_02246578: ; 0x02246578 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r0, #4 - str r3, [sp, #0xc] - mov ip, r0 - add r7, r1, #0 - mov r0, #0 - add r2, sp, #0x10 - mov r3, #0xff -_0224658A: - ldr r4, [r1, #0x28] - lsl r5, r4, #0x1a - lsr r5, r5, #0x1e - bne _02246596 - strb r3, [r2] - b _022465AA -_02246596: - cmp r5, #1 - bne _022465A2 - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - bne _022465A2 - mov ip, r0 -_022465A2: - ldr r4, [r1, #0x28] - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - strb r4, [r2] -_022465AA: - add r0, r0, #1 - add r1, #0x2c - add r2, r2, #1 - cmp r0, #4 - blt _0224658A - ldr r0, [sp, #0xc] - mov r1, #0xff - add r6, sp, #0x10 - strb r1, [r6, r0] - mov r4, #0 -_022465BE: - mov r1, #0 - add r2, r6, #0 - add r3, r7, #0 -_022465C4: - ldrb r0, [r2] - cmp r0, #0xff - beq _022465E0 - cmp r4, r0 - bne _022465E0 - ldr r5, [r3, #0x28] - lsl r5, r5, #0x18 - lsr r5, r5, #0x1e - cmp r0, r5 - bne _022465E0 - ldrb r0, [r6, r1] - add r0, r0, #1 - strb r0, [r6, r1] - b _022465EA -_022465E0: - add r1, r1, #1 - add r2, r2, #1 - add r3, #0x2c - cmp r1, #4 - blt _022465C4 -_022465EA: - cmp r1, #4 - beq _022465F4 - add r4, r4, #1 - cmp r4, #4 - blt _022465BE -_022465F4: - mov r3, #0 - add r1, sp, #0x10 - add r2, r7, #0 - mov r4, #0xc0 -_022465FC: - ldrb r5, [r1] - cmp r5, #0xff - beq _0224660E - ldr r0, [r2, #0x28] - lsl r5, r5, #0x1e - bic r0, r4 - lsr r5, r5, #0x18 - orr r0, r5 - str r0, [r2, #0x28] -_0224660E: - add r3, r3, #1 - add r1, r1, #1 - add r2, #0x2c - cmp r3, #4 - blt _022465FC - ldr r0, [sp, #0xc] - mov r1, #0x2c - mul r1, r0 - add r0, r7, r1 - ldr r2, [r0, #0x28] - mov r1, #0x30 - bic r2, r1 - mov r1, #0x10 - orr r2, r1 - mov r1, #0xc0 - bic r2, r1 - mov r1, ip - str r2, [r0, #0x28] - cmp r1, #4 - beq _0224664C - mov r1, ip - str r1, [sp] - ldr r1, _02246664 ; =0x00007530 - ldr r3, [sp, #0xc] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #1 - bl ov17_02245F14 - b _0224665E -_0224664C: - ldr r1, _02246664 ; =0x00007530 - ldr r3, [sp, #0xc] - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 -_0224665E: - mov r0, #1 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246664: .word 0x00007530 - thumb_func_end ov17_02246578 - - thumb_func_start ov17_02246668 -ov17_02246668: ; 0x02246668 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r0, #4 - str r3, [sp, #0xc] - mov ip, r0 - add r7, r1, #0 - mov r0, #0 - add r2, sp, #0x10 - mov r3, #0xff -_0224667A: - ldr r4, [r1, #0x28] - lsl r5, r4, #0x1a - lsr r5, r5, #0x1e - bne _02246686 - strb r3, [r2] - b _0224669C -_02246686: - cmp r5, #2 - bne _02246694 - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - cmp r4, #3 - bne _02246694 - mov ip, r0 -_02246694: - ldr r4, [r1, #0x28] - lsl r4, r4, #0x18 - lsr r4, r4, #0x1e - strb r4, [r2] -_0224669C: - add r0, r0, #1 - lsl r0, r0, #0x18 - asr r0, r0, #0x18 - add r1, #0x2c - add r2, r2, #1 - cmp r0, #4 - blt _0224667A - ldr r0, [sp, #0xc] - mov r1, #0xff - add r6, sp, #0x10 - strb r1, [r6, r0] - mov r4, #3 -_022466B4: - mov r1, #0 - add r2, r6, #0 - add r3, r7, #0 -_022466BA: - ldrb r0, [r2] - cmp r0, #0xff - beq _022466D6 - cmp r4, r0 - bne _022466D6 - ldr r5, [r3, #0x28] - lsl r5, r5, #0x18 - lsr r5, r5, #0x1e - cmp r0, r5 - bne _022466D6 - ldrb r0, [r6, r1] - sub r0, r0, #1 - strb r0, [r6, r1] - b _022466E4 -_022466D6: - add r0, r1, #1 - lsl r0, r0, #0x18 - asr r1, r0, #0x18 - add r2, r2, #1 - add r3, #0x2c - cmp r1, #4 - blt _022466BA -_022466E4: - cmp r1, #4 - beq _022466F6 - sub r0, r4, #1 - lsl r0, r0, #0x18 - asr r4, r0, #0x18 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bgt _022466B4 -_022466F6: - mov r3, #0 - add r1, sp, #0x10 - add r2, r7, #0 - mov r4, #0xc0 -_022466FE: - ldrb r5, [r1] - cmp r5, #0xff - beq _02246710 - ldr r0, [r2, #0x28] - lsl r5, r5, #0x1e - bic r0, r4 - lsr r5, r5, #0x18 - orr r0, r5 - str r0, [r2, #0x28] -_02246710: - add r0, r3, #1 - lsl r0, r0, #0x18 - asr r3, r0, #0x18 - add r1, r1, #1 - add r2, #0x2c - cmp r3, #4 - blt _022466FE - ldr r0, [sp, #0xc] - mov r1, #0x2c - mul r1, r0 - add r0, r7, r1 - ldr r2, [r0, #0x28] - mov r1, #0x30 - bic r2, r1 - mov r1, #0x20 - orr r2, r1 - mov r1, #0xc0 - bic r2, r1 - mov r1, #0xc0 - orr r1, r2 - str r1, [r0, #0x28] - mov r1, ip - cmp r1, #4 - bne _02246754 - ldr r1, _02246770 ; =0x00007530 - ldr r3, [sp, #0xc] - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - b _02246768 -_02246754: - mov r1, ip - str r1, [sp] - ldr r1, _02246770 ; =0x00007530 - ldr r3, [sp, #0xc] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #1 - bl ov17_02245F14 -_02246768: - mov r0, #1 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02246770: .word 0x00007530 - thumb_func_end ov17_02246668 - - thumb_func_start ov17_02246774 -ov17_02246774: ; 0x02246774 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, r4, #0 - mov r0, #0x2c - add r7, r3, #0 - mul r3, r0 - add r2, #9 - add r1, #0x1e - ldrb r6, [r2, r3] - mov r5, #0x14 - ldrsh r0, [r1, r3] - mul r5, r6 - add r0, r0, r5 - strh r0, [r1, r3] - ldrb r0, [r2, r3] - cmp r0, #0 - beq _022467A2 - cmp r0, #1 - beq _022467A6 - cmp r0, #2 - beq _022467AA - b _022467AE -_022467A2: - mov r2, #0 - b _022467B0 -_022467A6: - mov r2, #1 - b _022467B0 -_022467AA: - mov r2, #2 - b _022467B0 -_022467AE: - mov r2, #3 -_022467B0: - ldr r0, _022467C8 ; =0x00007530 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r4, r3 - ldrb r1, [r0, #2] - add r3, r7, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022467C8: .word 0x00007530 - thumb_func_end ov17_02246774 - - thumb_func_start ov17_022467CC -ov17_022467CC: ; 0x022467CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r3, [sp, #0xc] - ldr r3, [r0, #0] - ldr r0, [sp, #0xc] - mov r6, #0x2c - add r4, r0, #0 - add r0, r6, #0 - mul r4, r6 - add r5, r1, #0 - add r7, r5, r4 - add r0, #0xf3 - add r6, #0xf2 - ldrb r0, [r3, r0] - ldrh r1, [r5, r4] - ldrb r2, [r7, #3] - ldrb r3, [r3, r6] - bl ov17_02243AF0 - cmp r0, #0 - ble _02246824 - ldr r0, [r7, #0x28] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - bne _02246824 - add r1, r5, #0 - add r1, #0x1e - ldrsh r0, [r1, r4] - ldr r2, _0224682C ; =0x00007530 - ldr r3, [sp, #0xc] - add r0, #0x14 - strh r0, [r1, r4] - str r2, [sp] - ldrh r1, [r5, r4] - add r0, r7, #0 - str r1, [sp, #4] - str r2, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02246824: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224682C: .word 0x00007530 - thumb_func_end ov17_022467CC - - thumb_func_start ov17_02246830 -ov17_02246830: ; 0x02246830 - mov r0, #1 - bx lr - thumb_func_end ov17_02246830 - - thumb_func_start ov17_02246834 -ov17_02246834: ; 0x02246834 - push {r3, r4, lr} - sub sp, #0xc - mov r0, #0x2c - add r4, r3, #0 - mul r4, r0 - add r0, r1, r4 - ldrb r2, [r0, #9] - cmp r2, #0 - bne _02246860 - add r1, #0x1e - ldrsh r2, [r1, r4] - add r2, #0x1e - strh r2, [r1, r4] - ldr r1, _02246878 ; =0x00007530 - mov r2, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - bl ov17_02245F14 - b _02246870 -_02246860: - ldr r1, _02246878 ; =0x00007530 - mov r2, #1 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - bl ov17_02245F14 -_02246870: - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - nop -_02246878: .word 0x00007530 - thumb_func_end ov17_02246834 - - thumb_func_start ov17_0224687C -ov17_0224687C: ; 0x0224687C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - lsl r4, r3, #1 - add r2, r1, #0 - add r4, r0, r4 - ldr r0, _022468C8 ; =0x00000256 - mov r1, #0x2c - add r7, r3, #0 - mul r7, r1 - ldrh r1, [r2, r7] - ldrh r0, [r4, r0] - cmp r1, r0 - beq _022468C2 - add r6, r2, #0 - add r6, #0xb0 - lsl r5, r3, #2 - lsl r1, r1, #0x10 - ldr r4, [r6, r5] - ldr r0, _022468CC ; =0xFFFF0000 - lsr r1, r1, #0x10 - and r0, r4 - orr r0, r1 - str r0, [r6, r5] - ldr r0, _022468D0 ; =0x00007530 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r2, r7 - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022468C2: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022468C8: .word 0x00000256 -_022468CC: .word 0xFFFF0000 -_022468D0: .word 0x00007530 - thumb_func_end ov17_0224687C - - thumb_func_start ov17_022468D4 -ov17_022468D4: ; 0x022468D4 - push {r4, r5, lr} - sub sp, #0xc - mov r0, #0x2c - add r4, r3, #0 - add r5, r1, #0 - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #3] - add r2, r5, #0 - add r2, #0x1e - add r1, r5, r0 - mov r0, #0xc0 - ldrsb r0, [r1, r0] - ldrsh r1, [r2, r4] - add r1, r1, r0 - strh r1, [r2, r4] - mov r1, #0xa - bl sub_020E1F6C - ldr r3, _02246914 ; =0x00007530 - mov r2, #0 - str r3, [sp] - str r3, [sp, #4] - str r0, [sp, #8] - add r0, r5, r4 - ldrb r1, [r0, #2] - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - nop -_02246914: .word 0x00007530 - thumb_func_end ov17_022468D4 - - thumb_func_start ov17_02246918 -ov17_02246918: ; 0x02246918 - push {r3, r4, lr} - sub sp, #0xc - mov r0, #0x2c - add r4, r3, #0 - mul r4, r0 - add r0, r1, r4 - ldrb r2, [r0, #9] - cmp r2, #3 - bne _02246944 - add r1, #0x1e - ldrsh r2, [r1, r4] - add r2, #0x96 - strh r2, [r1, r4] - ldr r1, _0224695C ; =0x00007530 - mov r2, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - bl ov17_02245F14 - b _02246954 -_02246944: - ldr r1, _0224695C ; =0x00007530 - mov r2, #1 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - ldrb r1, [r0, #2] - bl ov17_02245F14 -_02246954: - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - nop -_0224695C: .word 0x00007530 - thumb_func_end ov17_02246918 - - thumb_func_start ov17_02246960 -ov17_02246960: ; 0x02246960 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r0, #0x2c - add r7, r3, #0 - add r4, r1, #0 - mul r7, r0 - add r1, r4, r7 - ldr r0, [r1, #0x28] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224697E - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224697E: - mov r3, #0 - mov r0, #0xc3 -_02246982: - add r2, r4, r3 - ldrsb r2, [r2, r0] - cmp r2, #0 - bne _02246990 - add r3, r3, #1 - cmp r3, #3 - blt _02246982 -_02246990: - cmp r3, #3 - bne _0224699A - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224699A: - ldr r2, [r1, #0x28] - mov r0, #8 - orr r0, r2 - mov r3, #0xc3 - str r0, [r1, #0x28] - mov r2, #0 - add r5, r3, #0 -_022469A8: - add r0, r4, r2 - ldrsb r6, [r0, r5] - cmp r6, #0 - ble _022469B8 - ldrsb r6, [r0, r3] - add r0, #0xc3 - sub r6, #0xa - strb r6, [r0] -_022469B8: - add r2, r2, #1 - cmp r2, #3 - blt _022469A8 - ldr r3, _022469D8 ; =0x00007530 - add r0, r1, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - add r1, r4, r7 - ldrb r1, [r1, #2] - mov r2, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022469D8: .word 0x00007530 - thumb_func_end ov17_02246960 - - thumb_func_start ov17_022469DC -ov17_022469DC: ; 0x022469DC - mov r0, #0x2c - mul r0, r3 - add r2, r1, r0 - ldr r1, [r2, #0x28] - ldr r0, _022469F8 ; =0xFFF00FFF - and r1, r0 - ldrb r0, [r2, #2] - lsl r0, r0, #0x18 - lsr r0, r0, #0xc - orr r0, r1 - str r0, [r2, #0x28] - mov r0, #1 - bx lr - nop -_022469F8: .word 0xFFF00FFF - thumb_func_end ov17_022469DC - - thumb_func_start ov17_022469FC -ov17_022469FC: ; 0x022469FC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r2, r1, #0 - ldr r1, [sp, #0x20] - add r4, r0, #0 - mov ip, r3 - cmp r1, #4 - bge _02246A28 - ldr r7, _02246A48 ; =0x00000231 - mov r6, #0x2c - mov r3, #2 -_02246A12: - add r0, r4, r1 - ldrb r0, [r0, r7] - add r1, r1, #1 - add r5, r0, #0 - mul r5, r6 - add r0, r2, r5 - ldr r5, [r0, #0x28] - orr r5, r3 - str r5, [r0, #0x28] - cmp r1, #4 - blt _02246A12 -_02246A28: - ldr r3, _02246A4C ; =0x00007530 - mov r1, #0x2c - mov r0, ip - str r3, [sp] - mul r1, r0 - str r3, [sp, #4] - add r0, r2, r1 - str r3, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02246A48: .word 0x00000231 -_02246A4C: .word 0x00007530 - thumb_func_end ov17_022469FC - - thumb_func_start ov17_02246A50 -ov17_02246A50: ; 0x02246A50 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [sp, #0x20] - cmp r1, #0 - bne _02246A62 - add sp, #0xc - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_02246A62: - sub r1, r1, #1 - add r1, r0, r1 - ldr r0, _02246AA8 ; =0x00000231 - ldrb r4, [r1, r0] - mov r0, #0x2c - add r1, r4, #0 - mul r1, r0 - add r2, r5, r1 - mov r1, #8 - ldrsb r2, [r2, r1] - cmp r2, #0 - bne _02246A80 - add sp, #0xc - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_02246A80: - add r1, r3, #0 - mul r1, r0 - add r0, r5, #0 - add r0, #0x1e - ldrsh r6, [r0, r1] - add r2, r6, r2 - strh r2, [r0, r1] - ldr r0, _02246AAC ; =0x00007530 - str r4, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r5, r1 - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_02246AA8: .word 0x00000231 -_02246AAC: .word 0x00007530 - thumb_func_end ov17_02246A50 - - thumb_func_start ov17_02246AB0 -ov17_02246AB0: ; 0x02246AB0 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - str r1, [sp, #0xc] - str r3, [sp, #0x10] - mov r3, #0 - add r0, sp, #0x18 - add r1, sp, #0x14 -_02246AC0: - lsl r2, r3, #0x18 - lsr r2, r2, #0x18 - strb r2, [r0] - strb r2, [r1] - add r2, r3, #1 - lsl r2, r2, #0x18 - asr r3, r2, #0x18 - add r0, r0, #1 - add r1, r1, #1 - cmp r3, #4 - blt _02246AC0 - mov r4, #0 - add r7, sp, #0x18 - add r6, sp, #0x14 -_02246ADC: - ldr r0, [r5, #0] - bl sub_02094E98 - mov r1, #4 - sub r1, r1, r4 - bl sub_020E1F6C - lsl r0, r1, #0x18 - lsr r2, r0, #0x18 - mov r1, #0 - add r3, r6, #0 -_02246AF2: - ldrb r0, [r3] - cmp r0, #0xff - beq _02246B0A - cmp r2, #0 - bne _02246B04 - mov r0, #0xff - strb r4, [r7, r1] - strb r0, [r6, r1] - b _02246B16 -_02246B04: - sub r0, r2, #1 - lsl r0, r0, #0x18 - lsr r2, r0, #0x18 -_02246B0A: - add r0, r1, #1 - lsl r0, r0, #0x18 - asr r1, r0, #0x18 - add r3, r3, #1 - cmp r1, #4 - blt _02246AF2 -_02246B16: - add r0, r4, #1 - lsl r0, r0, #0x18 - asr r4, r0, #0x18 - cmp r4, #4 - blt _02246ADC - ldr r1, [sp, #0xc] - mov r3, #0 - add r2, sp, #0x18 - mov r4, #0x30 - mov r7, #0x30 - mov r5, #0xc0 -_02246B2C: - ldr r0, [r1, #0x28] - bic r0, r4 - orr r0, r7 - str r0, [r1, #0x28] - ldrb r6, [r2] - bic r0, r5 - add r2, r2, #1 - lsl r6, r6, #0x1e - lsr r6, r6, #0x18 - orr r0, r6 - str r0, [r1, #0x28] - add r0, r3, #1 - lsl r0, r0, #0x18 - asr r3, r0, #0x18 - add r1, #0x2c - cmp r3, #4 - blt _02246B2C - ldr r3, _02246B70 ; =0x00007530 - ldr r0, [sp, #0x10] - mov r1, #0x2c - mul r1, r0 - str r3, [sp] - ldr r0, [sp, #0xc] - str r3, [sp, #4] - str r3, [sp, #8] - add r0, r0, r1 - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02246B70: .word 0x00007530 - thumb_func_end ov17_02246AB0 - - thumb_func_start ov17_02246B74 -ov17_02246B74: ; 0x02246B74 - push {r4, r5, lr} - sub sp, #0xc - ldr r0, [sp, #0x18] - add r5, r1, #0 - cmp r0, #3 - bne _02246BB6 - add r4, r3, #0 - mov r0, #0x2c - add r3, r5, #0 - add r2, r5, #0 - mul r4, r0 - add r3, #0x18 - add r2, #0x1e - ldrsh r1, [r2, r4] - ldrsh r0, [r3, r4] - add r0, r1, r0 - strh r0, [r2, r4] - ldrsh r0, [r3, r4] - mov r1, #0xa - bl sub_020E1F6C - ldr r3, _02246BBC ; =0x00007530 - mov r2, #0 - str r3, [sp] - str r3, [sp, #4] - str r0, [sp, #8] - add r0, r5, r4 - ldrb r1, [r0, #2] - bl ov17_02245F14 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_02246BB6: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02246BBC: .word 0x00007530 - thumb_func_end ov17_02246B74 - - thumb_func_start ov17_02246BC0 -ov17_02246BC0: ; 0x02246BC0 - push {r4, r5, lr} - sub sp, #0xc - mov r0, #0x2c - add r4, r3, #0 - add r5, r1, #0 - mul r4, r0 - add r0, r5, r4 - ldrb r0, [r0, #3] - add r1, r5, r0 - mov r0, #0xc0 - ldrsb r0, [r1, r0] - mov r1, #0xa - bl sub_020E1F6C - ldr r1, _02246C08 ; =0x02253AF0 - add r2, r5, #0 - add r2, #0x1e - ldrb r0, [r1, r0] - ldrsh r1, [r2, r4] - add r1, r1, r0 - strh r1, [r2, r4] - mov r1, #0xa - bl sub_020E1F6C - ldr r3, _02246C0C ; =0x00007530 - mov r2, #0 - str r3, [sp] - str r3, [sp, #4] - str r0, [sp, #8] - add r0, r5, r4 - ldrb r1, [r0, #2] - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02246C08: .word 0x02253AF0 -_02246C0C: .word 0x00007530 - thumb_func_end ov17_02246BC0 - - thumb_func_start ov17_02246C10 -ov17_02246C10: ; 0x02246C10 - push {r3, r4, lr} - sub sp, #0xc - ldr r0, [sp, #0x18] - cmp r0, #0 - bne _02246C42 - add r4, r3, #0 - mov r0, #0x2c - add r2, r1, #0 - mul r4, r0 - add r2, #0x1e - ldrsh r0, [r2, r4] - ldr r3, _02246C48 ; =0x00007530 - add r0, #0x14 - strh r0, [r2, r4] - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - add r0, r1, r4 - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - add sp, #0xc - mov r0, #1 - pop {r3, r4, pc} -_02246C42: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02246C48: .word 0x00007530 - thumb_func_end ov17_02246C10 - - thumb_func_start ov17_02246C4C -ov17_02246C4C: ; 0x02246C4C - push {r3, r4, lr} - sub sp, #0xc - ldr r0, [sp, #0x18] - cmp r0, #3 - bne _02246C7E - add r4, r3, #0 - mov r0, #0x2c - add r2, r1, #0 - mul r4, r0 - add r2, #0x1e - ldrsh r0, [r2, r4] - ldr r3, _02246C84 ; =0x00007530 - add r0, #0x14 - strh r0, [r2, r4] - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - add r0, r1, r4 - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - add sp, #0xc - mov r0, #1 - pop {r3, r4, pc} -_02246C7E: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02246C84: .word 0x00007530 - thumb_func_end ov17_02246C4C - - thumb_func_start ov17_02246C88 -ov17_02246C88: ; 0x02246C88 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r2, r1, #0 - ldr r1, [sp, #0x20] - add r4, r0, #0 - mov ip, r3 - cmp r1, #4 - bge _02246CB4 - ldr r7, _02246CD4 ; =0x00000231 - mov r6, #0x2c - mov r3, #4 -_02246C9E: - add r0, r4, r1 - ldrb r0, [r0, r7] - add r1, r1, #1 - add r5, r0, #0 - mul r5, r6 - add r0, r2, r5 - ldr r5, [r0, #0x28] - orr r5, r3 - str r5, [r0, #0x28] - cmp r1, #4 - blt _02246C9E -_02246CB4: - ldr r3, _02246CD8 ; =0x00007530 - mov r1, #0x2c - mov r0, ip - str r3, [sp] - mul r1, r0 - str r3, [sp, #4] - add r0, r2, r1 - str r3, [sp, #8] - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02246CD4: .word 0x00000231 -_02246CD8: .word 0x00007530 - thumb_func_end ov17_02246C88 - - thumb_func_start ov17_02246CDC -ov17_02246CDC: ; 0x02246CDC - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, [sp, #0x38] - add r4, r1, #0 - str r3, [sp, #0xc] - cmp r0, #0 - bne _02246CF2 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02246CF2: - sub r0, r0, #1 - add r1, r5, r0 - ldr r0, _02246D98 ; =0x00000231 - mov r3, #0x2c - ldrb r0, [r1, r0] - ldr r1, [sp, #0xc] - str r0, [sp, #0x18] - add r0, r1, #0 - mul r0, r3 - add r7, r4, r0 - str r0, [sp, #0x20] - ldr r0, [r7, #0x28] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - bne _02246D24 - ldr r0, [sp, #0x18] - add r1, r0, #0 - mul r1, r3 - add r0, r4, r1 - str r0, [sp, #0x14] - ldr r0, [r0, #0x28] - str r1, [sp, #0x10] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - beq _02246D2A -_02246D24: - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02246D2A: - ldr r0, [r5, #0] - add r1, r3, #0 - mov ip, r0 - add r1, #0xf3 - ldrb r0, [r0, r1] - add r3, #0xf2 - mov r6, ip - ldrh r1, [r7] - ldrb r2, [r7, #3] - ldrb r3, [r6, r3] - bl ov17_02243AF0 - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x14] - add r2, r4, r2 - ldr r5, [r5, #0] - ldr r3, _02246D9C ; =0x0000011F - str r0, [sp, #0x1c] - ldrb r0, [r5, r3] - sub r3, r3, #1 - ldrh r1, [r1] - ldrb r2, [r2, #3] - ldrb r3, [r5, r3] - bl ov17_02243AF0 - cmp r0, #0 - ble _02246D92 - ldr r0, [sp, #0x1c] - cmp r0, #0 - ble _02246D92 - add r2, r4, #0 - ldr r0, [sp, #0x20] - add r2, #0x1e - ldrsh r1, [r2, r0] - ldr r3, [sp, #0xc] - add r1, #0x1e - strh r1, [r2, r0] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x20] - str r0, [sp] - ldr r0, _02246DA0 ; =0x00007530 - add r1, r4, r1 - str r0, [sp, #4] - str r0, [sp, #8] - ldrb r1, [r1, #2] - add r0, r7, #0 - mov r2, #0 - bl ov17_02245F14 - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02246D92: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246D98: .word 0x00000231 -_02246D9C: .word 0x0000011F -_02246DA0: .word 0x00007530 - thumb_func_end ov17_02246CDC - - thumb_func_start ov17_02246DA4 -ov17_02246DA4: ; 0x02246DA4 - push {r4, r5, lr} - sub sp, #0xc - add r0, r1, #0 - mov r1, #0x2c - mul r1, r3 - add r4, r0, r1 - mov r1, #0x1e - ldrsh r2, [r4, r1] - ldr r1, [sp, #0x18] - ldr r5, _02246E00 ; =0x02253AEC - ldrb r5, [r5, r1] - add r2, r2, r5 - strh r2, [r4, #0x1e] - cmp r1, #3 - bhi _02246DE2 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246DCE: ; jump table - .short _02246DD6 - _02246DCE - 2 ; case 0 - .short _02246DDA - _02246DCE - 2 ; case 1 - .short _02246DDE - _02246DCE - 2 ; case 2 - .short _02246DE2 - _02246DCE - 2 ; case 3 -_02246DD6: - mov r2, #0 - b _02246DE4 -_02246DDA: - mov r2, #1 - b _02246DE4 -_02246DDE: - mov r2, #2 - b _02246DE4 -_02246DE2: - mov r2, #3 -_02246DE4: - ldr r1, _02246E04 ; =0x00007530 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0x2c - mul r1, r3 - add r0, r0, r1 - ldrb r1, [r0, #2] - bl ov17_02245F14 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - nop -_02246E00: .word 0x02253AEC -_02246E04: .word 0x00007530 - thumb_func_end ov17_02246DA4 - - thumb_func_start ov17_02246E08 -ov17_02246E08: ; 0x02246E08 - push {r3, r4, lr} - sub sp, #0xc - ldr r2, [sp, #0x18] - cmp r2, #0 - bne _02246E18 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_02246E18: - sub r2, r2, #1 - add r2, r0, r2 - ldr r0, _02246E60 ; =0x00000231 - ldrb r2, [r2, r0] - mov r0, #0x2c - mul r0, r2 - add r2, r1, r0 - mov r0, #8 - ldrsb r0, [r2, r0] - cmp r0, #0x32 - bge _02246E32 - cmp r0, #0x50 - blt _02246E5A -_02246E32: - add r2, r1, #0 - mov r0, #0x2c - add r4, r3, #0 - mul r4, r0 - add r2, #0x1e - ldrsh r0, [r2, r4] - add r0, #0x1e - strh r0, [r2, r4] - ldr r0, _02246E64 ; =0x00007530 - mov r2, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r1, r4 - ldrb r1, [r0, #2] - bl ov17_02245F14 - add sp, #0xc - mov r0, #1 - pop {r3, r4, pc} -_02246E5A: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02246E60: .word 0x00000231 -_02246E64: .word 0x00007530 - thumb_func_end ov17_02246E08 - - thumb_func_start ov17_02246E68 -ov17_02246E68: ; 0x02246E68 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r0, #0x2c - mul r0, r3 - str r1, [sp, #0xc] - mov r2, #0 - add r4, r1, #0 - mov ip, r0 - add r5, r1, r0 - mov r7, #0x1a - mov r6, #0x1c -_02246E7E: - cmp r2, r3 - beq _02246E8A - ldrsh r1, [r4, r7] - ldrsh r0, [r5, r6] - cmp r1, r0 - blt _02246E92 -_02246E8A: - add r2, r2, #1 - add r4, #0x2c - cmp r2, #4 - blt _02246E7E -_02246E92: - cmp r2, #4 - beq _02246E9C - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02246E9C: - ldr r2, [sp, #0xc] - mov r0, ip - add r2, #0x1e - ldrsh r1, [r2, r0] - mov r0, ip - add r1, #0x1e - strh r1, [r2, r0] - ldr r0, _02246EC8 ; =0x00007530 - ldr r1, [sp, #0xc] - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, ip - add r0, r1, r0 - ldrb r1, [r0, #2] - mov r2, #0 - bl ov17_02245F14 - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02246EC8: .word 0x00007530 - thumb_func_end ov17_02246E68 - - thumb_func_start ov17_02246ECC -ov17_02246ECC: ; 0x02246ECC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - str r1, [sp, #4] - mov r0, #0x15 - mov r1, #0x32 - bl sub_02018144 - add r7, r0, #0 - ldr r1, [r6, #0] - ldr r0, _02246F20 ; =0x00000127 - ldrb r4, [r1, r0] - cmp r4, #4 - bge _02246F16 - ldr r0, [sp, #4] - lsl r1, r4, #1 - add r5, r0, r1 - add r0, #8 - str r0, [sp, #4] -_02246EF2: - add r0, r6, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov17_02246F24 - ldr r0, [sp, #4] - add r1, r7, #0 - add r0, r0, r4 - str r0, [sp] - add r0, r6, #0 - add r2, r4, #0 - add r3, r5, #0 - bl ov17_02246F9C - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _02246EF2 -_02246F16: - add r0, r7, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246F20: .word 0x00000127 - thumb_func_end ov17_02246ECC - - thumb_func_start ov17_02246F24 -ov17_02246F24: ; 0x02246F24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r7, r2, #0 - str r1, [sp] - add r0, r1, #0 - mov r1, #0 - mov r2, #0x32 - bl sub_020C4CF4 - lsl r0, r7, #2 - ldr r5, [sp] - mov r4, #0 - str r0, [sp, #4] -_02246F40: - ldr r1, [r6, #0] - ldr r0, [sp, #4] - mov r2, #0 - ldr r0, [r0, r1] - add r1, r4, #0 - add r1, #0x36 - bl sub_02074470 - strh r0, [r5] - mov r0, #0x23 - lsl r0, r0, #4 - ldrh r2, [r5] - add r0, r6, r0 - add r1, r7, #0 - bl ov17_02243A98 - cmp r0, #1 - bne _02246F7A - ldrh r0, [r5] - mov r1, #0xa - bl sub_020790C4 - strb r0, [r5, #0xa] - ldrh r0, [r5] - mov r1, #0xb - bl sub_020790C4 - strb r0, [r5, #0xb] - b _02246F7E -_02246F7A: - mov r0, #0 - strh r0, [r5] -_02246F7E: - add r4, r4, #1 - add r5, #0xc - cmp r4, #4 - blt _02246F40 - ldr r0, [r6, #0] - add r1, r0, r7 - mov r0, #0x43 - lsl r0, r0, #2 - ldrb r1, [r1, r0] - ldr r0, [sp] - add r0, #0x30 - str r0, [sp] - strb r1, [r0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_02246F24 - - thumb_func_start ov17_02246F9C -ov17_02246F9C: ; 0x02246F9C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp, #4] - ldr r0, [sp, #0x58] - str r1, [sp, #8] - str r0, [sp, #0x58] - mov r1, #0x23 - ldr r0, [sp, #4] - lsl r1, r1, #4 - add r0, r0, r1 - str r0, [sp, #0x1c] - mov r0, #0 - str r2, [sp, #0xc] - str r3, [sp, #0x10] - str r0, [sp, #0x20] -_02246FBA: - ldr r1, [sp, #0x1c] - ldr r0, [sp, #0x20] - add r0, r1, r0 - ldrb r1, [r0, #1] - ldr r0, [sp, #0xc] - cmp r0, r1 - beq _02246FD2 - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #4 - blt _02246FBA -_02246FD2: - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, _02247264 ; =0x02253C30 - str r0, [sp, #0x18] -_02246FDA: - ldr r0, [sp, #0x20] - add r1, r0, #1 - ldr r0, [sp, #0x18] - ldrb r0, [r0] - cmp r1, r0 - bne _022470CC - mov r1, #0 - add r2, sp, #0x3c - add r2, #2 - add r0, r1, #0 -_02246FEE: - add r1, r1, #1 - strb r0, [r2] - add r2, r2, #1 - cmp r1, #3 - blt _02246FEE - ldr r0, [sp, #4] - add r3, sp, #0x3c - ldr r1, [r0, #0] - ldr r0, _02247268 ; =0x0000011F - ldr r4, [sp, #0x18] - ldrb r0, [r1, r0] - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - str r0, [sp] - ldrb r4, [r4, #1] - ldr r0, [sp, #0x1c] - add r3, #2 - lsl r5, r4, #2 - ldr r4, _0224726C ; =0x02253BBC - ldr r4, [r4, r5] - blx r4 - cmp r0, #1 - bne _022470CC - ldr r0, [sp, #0x18] - mov r1, #3 - ldrsb r0, [r0, r1] - cmp r0, #0 - beq _02247030 - cmp r0, #2 - beq _02247044 - cmp r0, #3 - beq _02247044 - b _0224705A -_02247030: - mov r2, #0 - add r1, sp, #0x3c - add r1, #2 - add r0, r2, #0 -_02247038: - add r2, r2, #1 - strb r0, [r1] - add r1, r1, #1 - cmp r2, #3 - blt _02247038 - b _0224705A -_02247044: - add r2, sp, #0x3c - mov r3, #0 - add r2, #2 - mov r0, #1 -_0224704C: - ldrb r1, [r2] - add r3, r3, #1 - eor r1, r0 - strb r1, [r2] - add r2, r2, #1 - cmp r3, #3 - blt _0224704C -_0224705A: - ldr r0, [sp, #4] - ldr r1, [r0, #0] - ldr r0, [sp, #0xc] - add r1, r0, r1 - mov r0, #0x43 - lsl r0, r0, #2 - ldrb r2, [r1, r0] - ldr r0, [sp, #0x18] - lsl r1, r2, #1 - add r0, r0, r1 - mov r1, #4 - ldrsh r4, [r0, r1] - cmp r2, #0 - beq _0224707C - ldr r0, [sp, #0x18] - ldrsh r0, [r0, r1] - add r4, r4, r0 -_0224707C: - ldr r0, [sp, #0x18] - ldrb r0, [r0, #2] - cmp r0, #0xf0 - beq _0224708A - cmp r0, #0xf1 - beq _022470CE - b _0224710E -_0224708A: - ldr r0, [sp, #8] - mov r7, #0 - mov r5, #4 -_02247090: - ldr r1, [sp, #4] - ldr r2, [r1, #0] - ldr r1, _02247268 ; =0x0000011F - ldrb r2, [r2, r1] - ldrb r1, [r0, #0xb] - cmp r2, r1 - bne _022470C4 - mov r1, #2 - ldrsh r1, [r0, r1] - mov r3, #0 - add r2, r0, #0 - add r1, r1, r4 - strh r1, [r0, #2] - add r1, sp, #0x3c - add r1, #2 -_022470AE: - ldrb r6, [r1] - cmp r6, #1 - bne _022470BA - ldrsh r6, [r2, r5] - add r6, r6, r4 - strh r6, [r2, #4] -_022470BA: - add r3, r3, #1 - add r1, r1, #1 - add r2, r2, #2 - cmp r3, #3 - blt _022470AE -_022470C4: - add r7, r7, #1 - add r0, #0xc - cmp r7, #4 - blt _02247090 -_022470CC: - b _0224714C -_022470CE: - ldr r5, [sp, #8] - mov r7, #0 - mov r6, #4 -_022470D4: - ldrb r0, [r5, #0xa] - bl sub_02095734 - cmp r0, #0x14 - blt _02247104 - mov r0, #2 - ldrsh r0, [r5, r0] - mov r2, #0 - add r1, r5, #0 - add r0, r0, r4 - strh r0, [r5, #2] - add r0, sp, #0x3c - add r0, #2 -_022470EE: - ldrb r3, [r0] - cmp r3, #1 - bne _022470FA - ldrsh r3, [r1, r6] - add r3, r3, r4 - strh r3, [r1, #4] -_022470FA: - add r2, r2, #1 - add r0, r0, #1 - add r1, r1, #2 - cmp r2, #3 - blt _022470EE -_02247104: - add r7, r7, #1 - add r5, #0xc - cmp r7, #4 - blt _022470D4 - b _0224714C -_0224710E: - ldr r0, [sp, #8] - mov r7, #0 - mov r5, #4 -_02247114: - ldr r1, [sp, #0x18] - ldrb r2, [r1, #2] - ldrb r1, [r0, #0xa] - cmp r2, r1 - bne _02247144 - mov r1, #2 - ldrsh r1, [r0, r1] - mov r3, #0 - add r2, r0, #0 - add r1, r1, r4 - strh r1, [r0, #2] - add r1, sp, #0x3c - add r1, #2 -_0224712E: - ldrb r6, [r1] - cmp r6, #1 - bne _0224713A - ldrsh r6, [r2, r5] - add r6, r6, r4 - strh r6, [r2, #4] -_0224713A: - add r3, r3, #1 - add r1, r1, #1 - add r2, r2, #2 - cmp r3, #3 - blt _0224712E -_02247144: - add r7, r7, #1 - add r0, #0xc - cmp r7, #4 - blt _02247114 -_0224714C: - ldr r0, [sp, #0x18] - add r0, #0xc - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #0xa5 - bge _0224715E - b _02246FDA -_0224715E: - add r4, sp, #0x34 - mov r5, #0 - add r4, #2 -_02247164: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl sub_02094E98 - strh r0, [r4] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02247164 - mov r5, #0 - add r4, sp, #0x30 -_0224717A: - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl sub_02094E98 - strh r0, [r4] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #3 - blt _0224717A - ldr r0, [sp, #8] - mov r7, #0 - ldrh r0, [r0] - cmp r0, #0 - bne _022471A2 - ldr r1, [sp, #8] -_02247198: - add r1, #0xc - ldrh r0, [r1] - add r7, r7, #1 - cmp r0, #0 - beq _02247198 -_022471A2: - mov r2, #0xc - add r1, r7, #0 - ldr r0, [sp, #8] - mul r1, r2 - add r1, r0, r1 - mov r0, #2 - add r4, r7, #1 - ldrsh r1, [r1, r0] - cmp r4, #4 - bge _022471F6 - ldr r0, [sp, #8] - mul r2, r4 - add r2, r0, r2 - add r0, sp, #0x34 - lsl r3, r4, #1 - add r0, #2 - add r3, r0, r3 -_022471C4: - ldrh r0, [r2] - cmp r0, #0 - beq _022471EC - mov r0, #2 - ldrsh r0, [r2, r0] - cmp r0, r1 - bgt _022471E8 - cmp r0, r1 - bne _022471EC - ldrh r5, [r3] - lsl r6, r7, #1 - str r5, [sp, #0x28] - add r5, sp, #0x34 - add r5, #2 - ldrh r6, [r5, r6] - ldr r5, [sp, #0x28] - cmp r5, r6 - bls _022471EC -_022471E8: - add r7, r4, #0 - add r1, r0, #0 -_022471EC: - add r4, r4, #1 - add r2, #0xc - add r3, r3, #2 - cmp r4, #4 - blt _022471C4 -_022471F6: - ldr r0, [sp, #4] - ldr r5, [r0, #0] - ldr r0, _02247270 ; =0x00000171 - ldrb r0, [r5, r0] - cmp r0, #0 - bne _0224728A - mov r0, #0xc - add r6, r7, #0 - mul r6, r0 - ldr r0, [sp, #8] - mov r2, #0 - add r4, r0, r6 - add r3, r2, #0 - mov r0, #4 -_02247212: - ldrsh r1, [r4, r0] - cmp r1, #0 - bne _0224721A - add r2, r2, #1 -_0224721A: - add r3, r3, #1 - add r4, r4, #2 - cmp r3, #3 - blt _02247212 - cmp r2, #3 - bne _0224728A - ldr r1, _02247274 ; =0x02253BB8 - add r0, sp, #0x2c - ldrb r2, [r1] - strb r2, [r0] - ldrb r2, [r1, #1] - strb r2, [r0, #1] - ldrb r2, [r1, #2] - ldrb r1, [r1, #3] - strb r2, [r0, #2] - strb r1, [r0, #3] - add r0, r5, #0 - bl sub_02094E98 - ldr r1, [sp, #4] - mov r2, #0x12 - lsl r0, r0, #0x18 - ldr r1, [r1, #0] - lsl r2, r2, #4 - ldrb r4, [r1, r2] - add r3, sp, #0x2c - lsr r0, r0, #0x18 - ldrb r3, [r3, r4] - cmp r0, r3 - bge _0224728A - add r2, r2, #3 - ldrb r2, [r1, r2] - ldr r1, [sp, #4] - ldr r0, [sp, #8] - add r2, r1, r2 - ldr r1, _02247278 ; =0x0000023E - b _0224727C - ; .align 2, 0 -_02247264: .word 0x02253C30 -_02247268: .word 0x0000011F -_0224726C: .word 0x02253BBC -_02247270: .word 0x00000171 -_02247274: .word 0x02253BB8 -_02247278: .word 0x0000023E -_0224727C: - add r0, r0, #4 - ldrb r1, [r2, r1] - add r0, r0, r6 - lsl r2, r1, #1 - ldrsh r1, [r0, r2] - sub r1, #0x64 - strh r1, [r0, r2] -_0224728A: - mov r0, #0 - str r0, [sp, #0x24] - mov r0, #0xc - add r1, r7, #0 - mul r1, r0 - ldr r0, [sp, #8] - add r3, sp, #0x30 - add r0, r0, r1 - mov r1, #4 - ldrsh r5, [r0, r1] - mov ip, r0 - mov r4, #1 - add r2, r0, #2 - add r3, #2 -_022472A6: - mov r0, #4 - ldrsh r6, [r2, r0] - cmp r6, r5 - bgt _022472C0 - cmp r6, r5 - bne _022472C4 - ldr r0, [sp, #0x24] - ldrh r7, [r3] - lsl r1, r0, #1 - add r0, sp, #0x30 - ldrh r0, [r0, r1] - cmp r7, r0 - bls _022472C4 -_022472C0: - str r4, [sp, #0x24] - add r5, r6, #0 -_022472C4: - add r4, r4, #1 - add r2, r2, #2 - add r3, r3, #2 - cmp r4, #3 - blt _022472A6 - mov r0, ip - ldrh r1, [r0] - ldr r0, [sp, #0x10] - strh r1, [r0] - ldr r1, [sp, #0x58] - ldr r0, [sp, #0x24] - strb r0, [r1] - ldr r0, [sp, #0x10] - ldrh r0, [r0] - cmp r0, #0 - bne _022472E8 - bl sub_02022974 -_022472E8: - ldr r0, [sp, #0x58] - ldrb r0, [r0] - cmp r0, #3 - blo _022472F4 - bl sub_02022974 -_022472F4: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov17_02246F9C - - thumb_func_start ov17_022472F8 -ov17_022472F8: ; 0x022472F8 - ldrb r0, [r0] - cmp r0, #4 - bne _02247302 - mov r0, #1 - bx lr -_02247302: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov17_022472F8 - - thumb_func_start ov17_02247308 -ov17_02247308: ; 0x02247308 - lsl r1, r1, #2 - add r0, r0, r1 - add r0, #0xe0 - ldr r0, [r0, #0] - lsl r0, r0, #8 - lsr r0, r0, #0x18 - beq _0224731A - mov r0, #1 - bx lr -_0224731A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02247308 - - thumb_func_start ov17_02247320 -ov17_02247320: ; 0x02247320 - mov r1, #0 -_02247322: - ldrb r0, [r2, #0xa] - cmp r0, #5 - bne _0224732C - mov r0, #1 - bx lr -_0224732C: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _02247322 - mov r0, #0 - bx lr - thumb_func_end ov17_02247320 - - thumb_func_start ov17_02247338 -ov17_02247338: ; 0x02247338 - mov r1, #0 -_0224733A: - ldrb r0, [r2, #0xa] - cmp r0, #9 - bne _02247344 - mov r0, #1 - bx lr -_02247344: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _0224733A - mov r0, #0 - bx lr - thumb_func_end ov17_02247338 - - thumb_func_start ov17_02247350 -ov17_02247350: ; 0x02247350 - mov r1, #0 -_02247352: - ldrb r0, [r2, #0xa] - cmp r0, #0xc - bne _0224735C - mov r0, #1 - bx lr -_0224735C: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _02247352 - mov r0, #0 - bx lr - thumb_func_end ov17_02247350 - - thumb_func_start ov17_02247368 -ov17_02247368: ; 0x02247368 - mov r1, #0 -_0224736A: - ldrb r0, [r2, #0xa] - cmp r0, #0xf - bne _02247374 - mov r0, #1 - bx lr -_02247374: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _0224736A - mov r0, #0 - bx lr - thumb_func_end ov17_02247368 - - thumb_func_start ov17_02247380 -ov17_02247380: ; 0x02247380 - mov r1, #0 -_02247382: - ldrb r0, [r2, #0xa] - cmp r0, #0x11 - bne _0224738C - mov r0, #1 - bx lr -_0224738C: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _02247382 - mov r0, #0 - bx lr - thumb_func_end ov17_02247380 - - thumb_func_start ov17_02247398 -ov17_02247398: ; 0x02247398 - mov r1, #0 -_0224739A: - ldrb r0, [r2, #0xa] - cmp r0, #0x12 - bne _022473A4 - mov r0, #1 - bx lr -_022473A4: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _0224739A - mov r0, #0 - bx lr - thumb_func_end ov17_02247398 - - thumb_func_start ov17_022473B0 -ov17_022473B0: ; 0x022473B0 - mov r1, #0 -_022473B2: - ldrb r0, [r2, #0xa] - cmp r0, #0x13 - bne _022473BC - mov r0, #1 - bx lr -_022473BC: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _022473B2 - mov r0, #0 - bx lr - thumb_func_end ov17_022473B0 - - thumb_func_start ov17_022473C8 -ov17_022473C8: ; 0x022473C8 - mov r1, #0 -_022473CA: - ldrb r0, [r2, #0xa] - cmp r0, #0x14 - bne _022473D4 - mov r0, #1 - bx lr -_022473D4: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _022473CA - mov r0, #0 - bx lr - thumb_func_end ov17_022473C8 - - thumb_func_start ov17_022473E0 -ov17_022473E0: ; 0x022473E0 - mov r1, #0 -_022473E2: - ldrb r0, [r2, #0xa] - cmp r0, #0x15 - bne _022473EC - mov r0, #1 - bx lr -_022473EC: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _022473E2 - mov r0, #0 - bx lr - thumb_func_end ov17_022473E0 - - thumb_func_start ov17_022473F8 -ov17_022473F8: ; 0x022473F8 - push {r3, r4} - lsl r1, r1, #1 - add r2, r0, r1 - mov r1, #0x12 - ldrsh r3, [r2, r1] - mov r4, #0 -_02247404: - ldrsh r2, [r0, r1] - cmp r3, r2 - bgt _02247412 - add r4, r4, #1 - add r0, r0, #2 - cmp r4, #4 - blt _02247404 -_02247412: - cmp r4, #4 - bne _0224741C - mov r0, #1 - pop {r3, r4} - bx lr -_0224741C: - mov r0, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov17_022473F8 - - thumb_func_start ov17_02247424 -ov17_02247424: ; 0x02247424 - push {r3, r4} - ldrb r2, [r0] - cmp r2, #4 - bne _0224744E - lsl r1, r1, #1 - add r2, r0, r1 - mov r1, #0x12 - ldrsh r3, [r2, r1] - mov r4, #0 -_02247436: - ldrsh r2, [r0, r1] - cmp r3, r2 - bgt _02247444 - add r4, r4, #1 - add r0, r0, #2 - cmp r4, #4 - blt _02247436 -_02247444: - cmp r4, #4 - bne _0224744E - mov r0, #1 - pop {r3, r4} - bx lr -_0224744E: - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov17_02247424 - - thumb_func_start ov17_02247454 -ov17_02247454: ; 0x02247454 - ldr r3, [sp] - mov r1, #0 -_02247458: - ldrb r0, [r2, #0xa] - cmp r0, #4 - bne _02247468 - ldrb r0, [r2, #0xb] - cmp r3, r0 - bne _02247468 - mov r0, #1 - bx lr -_02247468: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _02247458 - mov r0, #0 - bx lr - thumb_func_end ov17_02247454 - - thumb_func_start ov17_02247474 -ov17_02247474: ; 0x02247474 - ldr r3, [sp] - mov r1, #0 -_02247478: - ldrb r0, [r2, #0xb] - cmp r3, r0 - bne _02247482 - mov r0, #1 - bx lr -_02247482: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _02247478 - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02247474 - - thumb_func_start ov17_02247490 -ov17_02247490: ; 0x02247490 - push {r3, r4, r5, r6} - ldr r5, [sp, #0x10] - mov r4, #0 -_02247496: - ldrb r1, [r2, #0xb] - cmp r5, r1 - beq _022474A4 - add r4, r4, #1 - add r2, #0xc - cmp r4, #4 - blt _02247496 -_022474A4: - cmp r4, #4 - bne _022474AE - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_022474AE: - mov r5, #0 - add r6, r5, #0 - mov r2, #1 - mov r1, #0x22 -_022474B6: - add r4, r0, r6 - ldrsb r4, [r4, r1] - cmp r4, #0x28 - bne _022474C2 - strb r2, [r3, r6] - add r5, r5, #1 -_022474C2: - add r6, r6, #1 - cmp r6, #3 - blt _022474B6 - cmp r5, #0 - ble _022474D2 - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_022474D2: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_02247490 - - thumb_func_start ov17_022474D8 -ov17_022474D8: ; 0x022474D8 - push {r3, r4, r5, r6} - ldr r5, [sp, #0x10] - mov r4, #0 -_022474DE: - ldrb r1, [r2, #0xb] - cmp r5, r1 - beq _022474EC - add r4, r4, #1 - add r2, #0xc - cmp r4, #4 - blt _022474DE -_022474EC: - cmp r4, #4 - bne _022474F6 - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_022474F6: - mov r5, #0 - add r6, r5, #0 - mov r2, #1 - mov r1, #0x22 -_022474FE: - add r4, r0, r6 - ldrsb r4, [r4, r1] - cmp r4, #0x1e - bne _0224750A - add r5, r5, #1 - strb r2, [r3, r6] -_0224750A: - add r6, r6, #1 - cmp r6, #3 - blt _022474FE - cmp r5, #0 - ble _0224751A - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_0224751A: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_022474D8 - - thumb_func_start ov17_02247520 -ov17_02247520: ; 0x02247520 - mov r1, #0 -_02247522: - ldrb r0, [r2, #0xa] - cmp r0, #8 - bne _0224752C - mov r0, #1 - bx lr -_0224752C: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _02247522 - mov r0, #0 - bx lr - thumb_func_end ov17_02247520 - - thumb_func_start ov17_02247538 -ov17_02247538: ; 0x02247538 - mov r1, #0 -_0224753A: - ldrb r0, [r2, #0xa] - cmp r0, #0xd - bne _02247544 - mov r0, #1 - bx lr -_02247544: - add r1, r1, #1 - add r2, #0xc - cmp r1, #4 - blt _0224753A - mov r0, #0 - bx lr - thumb_func_end ov17_02247538 - - thumb_func_start ov17_02247550 -ov17_02247550: ; 0x02247550 - push {r3, r4, r5, r6} - mov r6, #0 - add r5, r6, #0 - mov r2, #1 - mov r1, #0x22 -_0224755A: - add r4, r0, r5 - ldrsb r4, [r4, r1] - cmp r4, #0x28 - bne _02247566 - add r6, r6, #1 - strb r2, [r3, r5] -_02247566: - add r5, r5, #1 - cmp r5, #3 - blt _0224755A - cmp r6, #0 - ble _02247576 - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_02247576: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_02247550 - - thumb_func_start ov17_0224757C -ov17_0224757C: ; 0x0224757C - push {r3, r4, r5, r6} - mov r6, #0 - add r5, r6, #0 - mov r2, #1 - mov r1, #0x22 -_02247586: - add r4, r0, r5 - ldrsb r4, [r4, r1] - cmp r4, #0x1e - bne _02247592 - add r6, r6, #1 - strb r2, [r3, r5] -_02247592: - add r5, r5, #1 - cmp r5, #3 - blt _02247586 - cmp r6, #0 - ble _022475A2 - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_022475A2: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_0224757C - - thumb_func_start ov17_022475A8 -ov17_022475A8: ; 0x022475A8 - push {r3, r4, r5, r6} - mov r6, #0 - add r5, r6, #0 - mov r2, #1 - mov r1, #0x22 -_022475B2: - add r4, r0, r5 - ldrsb r4, [r4, r1] - cmp r4, #0xa - bgt _022475BE - add r6, r6, #1 - strb r2, [r3, r5] -_022475BE: - add r5, r5, #1 - cmp r5, #3 - blt _022475B2 - cmp r6, #0 - ble _022475CE - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_022475CE: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_022475A8 - - thumb_func_start ov17_022475D4 -ov17_022475D4: ; 0x022475D4 - push {r3, r4} - mov r4, #0 - mov r1, #0x22 -_022475DA: - add r2, r0, r4 - ldrsb r2, [r2, r1] - cmp r2, #0x14 - bge _022475E8 - mov r0, #0 - pop {r3, r4} - bx lr -_022475E8: - add r4, r4, #1 - cmp r4, #3 - blt _022475DA - mov r1, #0 - mov r0, #1 -_022475F2: - strb r0, [r3, r1] - add r1, r1, #1 - cmp r1, #3 - blt _022475F2 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov17_022475D4 - - thumb_func_start ov17_02247600 -ov17_02247600: ; 0x02247600 - push {r3, r4} - mov r4, #0 - mov r1, #0x22 -_02247606: - add r2, r0, r4 - ldrsb r2, [r2, r1] - cmp r2, #0x14 - ble _02247614 - mov r0, #0 - pop {r3, r4} - bx lr -_02247614: - add r4, r4, #1 - cmp r4, #3 - blt _02247606 - mov r1, #0 - mov r0, #1 -_0224761E: - strb r0, [r3, r1] - add r1, r1, #1 - cmp r1, #3 - blt _0224761E - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov17_02247600 - - thumb_func_start ov17_0224762C -ov17_0224762C: ; 0x0224762C - push {r3, r4, r5, r6} - mov r6, #0 - add r5, r6, #0 - mov r2, #1 - mov r1, #0x22 -_02247636: - add r4, r0, r5 - ldrsb r4, [r4, r1] - cmp r4, #0x14 - bgt _02247642 - strb r2, [r3, r5] - add r6, r6, #1 -_02247642: - add r5, r5, #1 - cmp r5, #3 - blt _02247636 - cmp r6, #1 - bne _02247652 - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_02247652: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_0224762C - - thumb_func_start ov17_02247658 -ov17_02247658: ; 0x02247658 - push {r3, r4, r5, r6} - mov r6, #0 - add r5, r6, #0 - mov r2, #1 - mov r1, #0x22 -_02247662: - add r4, r0, r5 - ldrsb r4, [r4, r1] - cmp r4, #0x28 - bne _0224766E - strb r2, [r3, r5] - add r6, r6, #1 -_0224766E: - add r5, r5, #1 - cmp r5, #3 - blt _02247662 - cmp r6, #2 - bne _0224767E - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_0224767E: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_02247658 - - thumb_func_start ov17_02247684 -ov17_02247684: ; 0x02247684 - push {r3, r4, r5, r6} - mov r6, #0 - add r5, r6, #0 - mov r2, #1 - mov r1, #0x22 -_0224768E: - add r4, r0, r5 - ldrsb r4, [r4, r1] - cmp r4, #0 - bne _0224769A - strb r2, [r3, r5] - add r6, r6, #1 -_0224769A: - add r5, r5, #1 - cmp r5, #3 - blt _0224768E - cmp r6, #1 - bne _022476AA - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_022476AA: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_02247684 - - thumb_func_start ov17_022476B0 -ov17_022476B0: ; 0x022476B0 - push {r3, r4, r5, r6} - ldr r5, [sp, #0x10] - mov r4, #0 -_022476B6: - ldrb r1, [r2, #0xb] - cmp r5, r1 - beq _022476C4 - add r4, r4, #1 - add r2, #0xc - cmp r4, #4 - blt _022476B6 -_022476C4: - cmp r4, #4 - bne _022476CE - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_022476CE: - mov r5, #0 - add r6, r5, #0 - mov r2, #1 - mov r1, #0x22 -_022476D6: - add r4, r0, r6 - ldrsb r4, [r4, r1] - cmp r4, #0x28 - bne _022476E2 - strb r2, [r3, r6] - add r5, r5, #1 -_022476E2: - add r6, r6, #1 - cmp r6, #3 - blt _022476D6 - cmp r5, #0 - ble _022476F2 - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_022476F2: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov17_022476B0 - - thumb_func_start ov17_022476F8 -ov17_022476F8: ; 0x022476F8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #8] - cmp r0, #0 - bne _02247718 - lsl r0, r4, #4 - add r0, r5, r0 - ldr r0, [r0, #0x48] - cmp r0, #0 - beq _02247732 - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} -_02247718: - bl sub_02007DC8 - add r6, r5, #0 - add r6, #0x48 - lsl r7, r4, #4 - ldr r0, [r6, r7] - bl sub_020181C4 - lsl r0, r4, #2 - mov r1, #0 - add r0, r5, r0 - str r1, [r0, #8] - str r1, [r6, r7] -_02247732: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_022476F8 - - thumb_func_start ov17_02247734 -ov17_02247734: ; 0x02247734 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0224773A: - add r0, r5, #0 - add r1, r4, #0 - bl ov17_022476F8 - add r4, r4, #1 - cmp r4, #4 - blt _0224773A - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02247734 - - thumb_func_start ov17_0224774C -ov17_0224774C: ; 0x0224774C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - mov r3, #2 - str r3, [sp, #4] - ldr r3, _02247794 ; =0x000080EA - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x43 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02247794 ; =0x000080EA - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x44 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02247794 ; =0x000080EA - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x45 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02247794: .word 0x000080EA - thumb_func_end ov17_0224774C - - thumb_func_start ov17_02247798 -ov17_02247798: ; 0x02247798 - push {r4, lr} - ldr r1, _022477B4 ; =0x000080EA - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _022477B4 ; =0x000080EA - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _022477B4 ; =0x000080EA - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_022477B4: .word 0x000080EA - thumb_func_end ov17_02247798 - - thumb_func_start ov17_022477B8 -ov17_022477B8: ; 0x022477B8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x16 - mov r1, #0x18 - add r7, r2, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x18 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - ldr r2, _0224782C ; =0x022543F8 - bl sub_0200CE6C - lsl r1, r6, #0x10 - lsl r2, r7, #0x10 - mov r3, #1 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - str r0, [r4, #4] - bl sub_0200D500 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _022477FC - ldr r0, [r4, #4] - mov r1, #1 - bl sub_0200D364 -_022477FC: - ldr r0, [r4, #4] - ldr r0, [r0, #0] - bl sub_0200D324 - lsl r0, r6, #8 - str r0, [r4, #8] - lsl r0, r7, #8 - str r0, [r4, #0xc] - ldr r0, _02247830 ; =0x000004F9 - ldr r2, _02247834 ; =0x0000C350 - add r1, r5, r0 - str r1, [r4, #0] - ldrb r0, [r1] - add r0, r0, #1 - strb r0, [r1] - ldr r0, _02247838 ; =ov17_02247840 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r0, _0224783C ; =0x000006E1 - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224782C: .word 0x022543F8 -_02247830: .word 0x000004F9 -_02247834: .word 0x0000C350 -_02247838: .word ov17_02247840 -_0224783C: .word 0x000006E1 - thumb_func_end ov17_022477B8 - - thumb_func_start ov17_02247840 -ov17_02247840: ; 0x02247840 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x14] - cmp r0, #0 - bne _022478AE - ldr r0, [r4, #0x10] - bl sub_0201D2B8 - lsl r1, r0, #3 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r5, r0, #0xc - mov r0, #6 - mov r3, #1 - ldr r1, [r4, #0x10] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - lsl r3, r3, #8 - sub r2, r0, r3 - str r2, [r4, #0xc] - ldr r1, [r4, #8] - ldr r0, [r4, #4] - asr r6, r1, #7 - lsr r6, r6, #0x18 - add r6, r1, r6 - asr r1, r6, #8 - add r1, r1, r5 - asr r5, r2, #7 - lsr r5, r5, #0x18 - add r5, r2, r5 - lsl r1, r1, #0x10 - lsl r2, r5, #8 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0xc - bl sub_0200D500 - ldrh r0, [r4, #0x16] - add r0, r0, #1 - strh r0, [r4, #0x16] - ldrh r0, [r4, #0x16] - cmp r0, #0x3c - bhs _022478A6 - ldr r1, [r4, #0xc] - ldr r0, _022478CC ; =0xFFFFE000 - cmp r1, r0 - bgt _022478C8 -_022478A6: - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_022478AE: - ldr r0, [r4, #4] - bl sub_0200D0F4 - ldr r1, [r4, #0] - ldrb r0, [r1] - sub r0, r0, #1 - strb r0, [r1] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_022478C8: - pop {r4, r5, r6, pc} - nop -_022478CC: .word 0xFFFFE000 - thumb_func_end ov17_02247840 - - thumb_func_start ov17_022478D0 -ov17_022478D0: ; 0x022478D0 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0x24] - add r4, r1, #0 - cmp r0, #0 - beq _022478E2 - bl sub_02022974 -_022478E2: - mov r1, #0x30 - ldr r2, [r5, #0] - mul r1, r4 - add r1, r2, r1 - ldrh r1, [r1, #0x1a] - add r0, sp, #0x10 - bl sub_0207697C - ldr r0, _02247914 ; =0xFFFFFDC0 - mov r2, #5 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r5, #0x10] - add r1, sp, #0x10 - lsl r2, r2, #6 - mov r3, #0x20 - bl sub_02007C34 - str r0, [r5, #0x24] - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02247914: .word 0xFFFFFDC0 - thumb_func_end ov17_022478D0 - - thumb_func_start ov17_02247918 -ov17_02247918: ; 0x02247918 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _0224792A - bl sub_02007DC8 - mov r0, #0 - str r0, [r4, #0x24] -_0224792A: - pop {r4, pc} - thumb_func_end ov17_02247918 - - thumb_func_start ov17_0224792C -ov17_0224792C: ; 0x0224792C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0 - beq _02247942 - cmp r6, #0 - bne _02247942 - bl sub_02022974 -_02247942: - cmp r4, #0 - beq _0224798C - cmp r4, #1 - bne _02247988 - ldrb r4, [r6] - ldr r3, [r5, #0] - mov r0, #1 - lsl r2, r4, #2 - str r0, [sp] - mov r0, #2 - add r2, r3, r2 - add r4, r3, r4 - mov r3, #0x42 - str r0, [sp, #4] - lsl r3, r3, #2 - add r2, #0xe8 - ldrb r3, [r4, r3] - ldr r0, [r5, #0x48] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200B48C - ldrb r0, [r6] - ldr r1, [r5, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r4, r5, r6, pc} -_02247988: - bl sub_02022974 -_0224798C: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov17_0224792C - - thumb_func_start ov17_02247990 -ov17_02247990: ; 0x02247990 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0] - ldr r0, _02247A00 ; =0x00000171 - add r7, r2, #0 - ldrb r0, [r1, r0] - str r3, [sp, #0xc] - cmp r0, #0 - bne _022479B2 - ldr r0, _02247A04 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027AC0 - add r4, r0, #0 - b _022479B4 -_022479B2: - mov r4, #1 -_022479B4: - add r0, r6, #0 - add r1, r7, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x28] - add r0, r5, #0 - bl ov17_0224792C - ldr r0, [r5, #0x48] - ldr r1, [r5, #0x4c] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x34 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - str r3, [sp, #8] - add r0, r5, #0 - ldr r2, [r5, #0x4c] - add r0, #0x34 - mov r1, #1 - bl sub_0201D738 - add r5, #0xd0 - strb r0, [r5] - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247A00: .word 0x00000171 -_02247A04: .word 0x00001988 - thumb_func_end ov17_02247990 - - thumb_func_start ov17_02247A08 -ov17_02247A08: ; 0x02247A08 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - cmp r5, #0xf - blo _02247A1A - bl sub_02022974 -_02247A1A: - str r4, [sp] - ldr r2, _02247A34 ; =0x0225442C - lsl r3, r5, #2 - ldr r4, _02247A38 ; =0x0225442E - ldrh r2, [r2, r3] - ldrb r3, [r4, r3] - ldr r1, [r6, #0x44] - add r0, r6, #0 - bl ov17_02247990 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02247A34: .word 0x0225442C -_02247A38: .word 0x0225442E - thumb_func_end ov17_02247A08 - - thumb_func_start ov17_02247A3C -ov17_02247A3C: ; 0x02247A3C - ldr r3, _02247A44 ; =sub_0201D724 - add r0, #0xd0 - ldrb r0, [r0] - bx r3 - ; .align 2, 0 -_02247A44: .word sub_0201D724 - thumb_func_end ov17_02247A3C - - thumb_func_start ov17_02247A48 -ov17_02247A48: ; 0x02247A48 - push {r3, r4, lr} - sub sp, #0xc - ldr r1, _02247A7C ; =0x02254488 - add r3, sp, #0 - str r1, [sp] - mov r1, #0x11 - strh r1, [r3, #4] - ldr r1, [r0, #0] - ldr r2, _02247A80 ; =0x00000123 - ldrb r1, [r1, r2] - strb r1, [r3, #6] - sub r1, r2, #7 - ldr r4, [r0, #0] - add r2, #0x4e - ldrb r1, [r4, r1] - strb r1, [r3, #8] - ldr r1, [r0, #0] - ldrb r1, [r1, r2] - strb r1, [r3, #7] - ldr r1, _02247A84 ; =0x000004FC - add r0, r0, r1 - add r1, sp, #0 - bl ov17_0224F18C - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02247A7C: .word 0x02254488 -_02247A80: .word 0x00000123 -_02247A84: .word 0x000004FC - thumb_func_end ov17_02247A48 - - thumb_func_start ov17_02247A88 -ov17_02247A88: ; 0x02247A88 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02247A88 - - thumb_func_start ov17_02247A9C -ov17_02247A9C: ; 0x02247A9C - push {r3, lr} - add r1, r2, #0 - mov r2, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02247A9C - - thumb_func_start ov17_02247AAC -ov17_02247AAC: ; 0x02247AAC - bx lr - ; .align 2, 0 - thumb_func_end ov17_02247AAC - - thumb_func_start ov17_02247AB0 -ov17_02247AB0: ; 0x02247AB0 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02247AB0 - - thumb_func_start ov17_02247AC4 -ov17_02247AC4: ; 0x02247AC4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - ldr r0, _02247AE8 ; =0x00000F1C - mov r2, #1 - strb r2, [r1, r0] - ldr r0, [r1, #0] - bl sub_02094EDC - cmp r0, #0 - bne _02247AE6 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov17_0224F26C -_02247AE6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02247AE8: .word 0x00000F1C - thumb_func_end ov17_02247AC4 - - thumb_func_start ov17_02247AEC -ov17_02247AEC: ; 0x02247AEC - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02247AEC - - thumb_func_start ov17_02247B00 -ov17_02247B00: ; 0x02247B00 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x10] - add r6, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - mov r5, #0 - strh r0, [r4, #0xa] - ldr r0, [sp, #0x10] - str r0, [r4, #0xc] - ldrb r0, [r7] - strb r0, [r4, #0x11] - b _02247B60 -_02247B3C: - ldr r1, [r4, #0] - lsl r0, r5, #4 - add r1, r1, r0 - mov r0, #0xf2 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02247B5E - bl ov22_0225B020 - ldr r1, [r4, #0] - lsl r0, r5, #4 - add r2, r1, r0 - mov r0, #0xf2 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r2, r0] -_02247B5E: - add r5, r5, #1 -_02247B60: - cmp r5, #4 - blt _02247B3C - ldrb r0, [r7] - ldr r1, [r6, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - add r0, sp, #0x14 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - mov r0, #0x16 - str r0, [sp, #0x20] - mov r1, #0x80 - mov r0, #0x68 - str r1, [sp, #0x18] - str r0, [sp, #0x1c] - ldrb r2, [r7] - lsl r2, r2, #4 - add r3, r6, r2 - ldr r2, _02247C44 ; =0x00000F24 - str r1, [r3, r2] - ldrb r1, [r7] - lsl r1, r1, #4 - add r3, r6, r1 - add r1, r2, #4 - str r0, [r3, r1] - ldrb r1, [r7] - ldr r2, [r6, #0] - add r0, sp, #0x14 - lsl r1, r1, #2 - add r1, r2, r1 - add r1, #0xf8 - ldr r1, [r1, #0] - bl ov22_0225AFD4 - ldrb r1, [r7] - lsl r1, r1, #4 - add r2, r6, r1 - mov r1, #0xf2 - lsl r1, r1, #4 - str r0, [r2, r1] - ldrb r0, [r7] - lsl r0, r0, #4 - add r0, r6, r0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov22_0225B074 - ldr r0, _02247C48 ; =0x04000048 - mov r2, #0x3f - ldrh r1, [r0] - mov r3, #0x1f - bic r1, r2 - add r5, r1, #0 - orr r5, r3 - mov r1, #0x20 - orr r1, r5 - strh r1, [r0] - ldrh r1, [r0, #2] - bic r1, r2 - orr r1, r3 - strh r1, [r0, #2] - mov r1, #1 - add r2, r1, #0 - add r0, #8 - sub r2, #0x11 - bl sub_020BF578 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02247C4C ; =0xFFFF1FFF - mov r3, #0xff - and r1, r0 - lsr r0, r2, #0xd - orr r0, r1 - mov r1, #0xf6 - str r0, [r2, #0] - lsl r1, r1, #4 - mov r0, #0 - strb r0, [r6, r1] - add r2, r1, #1 - strb r0, [r6, r2] - add r2, r1, #2 - strb r3, [r6, r2] - ldr r2, _02247C50 ; =0x02254468 - add r1, r1, #3 - ldrsb r2, [r2, r0] - mov r3, #2 - add r2, r2, #4 - lsl r2, r2, #3 - strb r2, [r6, r1] - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - ldr r2, [r6, #0x30] - mov r0, #0x2d - mov r1, #0x15 - bl sub_02006E60 - ldr r0, _02247C54 ; =ov17_02247C5C - ldr r2, _02247C58 ; =0x00007530 - add r1, r4, #0 - bl sub_0200D9E8 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247C44: .word 0x00000F24 -_02247C48: .word 0x04000048 -_02247C4C: .word 0xFFFF1FFF -_02247C50: .word 0x02254468 -_02247C54: .word ov17_02247C5C -_02247C58: .word 0x00007530 - thumb_func_end ov17_02247B00 - - thumb_func_start ov17_02247C5C -ov17_02247C5C: ; 0x02247C5C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #4 - bhi _02247D3E - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02247C74: ; jump table - .short _02247C7E - _02247C74 - 2 ; case 0 - .short _02247C84 - _02247C74 - 2 ; case 1 - .short _02247CDE - _02247C74 - 2 ; case 2 - .short _02247CE4 - _02247C74 - 2 ; case 3 - .short _02247D24 - _02247C74 - 2 ; case 4 -_02247C7E: - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02247C84: - ldr r1, _02247D58 ; =0x04000048 - mov r0, #0x3f - ldrh r2, [r1] - bic r2, r0 - mov r0, #0x1e - orr r2, r0 - mov r0, #0x20 - orr r0, r2 - strh r0, [r1] - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0x11] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - add r3, r0, #0 - ldrb r0, [r4, #0x11] - mov r2, #0xf2 - lsl r2, r2, #4 - lsl r1, r0, #4 - ldr r0, [r4, #0] - add r5, r0, r1 - add r1, r2, #4 - ldr r0, [r5, r2] - add r2, #8 - ldr r1, [r5, r1] - ldr r2, [r5, r2] - bl ov22_0225B158 - ldrb r0, [r4, #0x11] - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r1, r1, r0 - mov r0, #0xf2 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl ov22_0225B074 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02247CDE: - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02247CE4: - ldr r1, _02247D58 ; =0x04000048 - mov r0, #0x3f - ldrh r2, [r1] - bic r2, r0 - mov r0, #0x1f - orr r2, r0 - mov r0, #0x20 - orr r0, r2 - strh r0, [r1] - mov r1, #0 - str r1, [sp] - ldr r0, [r4, #0] - ldr r2, _02247D5C ; =0x00001FFF - ldr r0, [r0, #0x50] - add r3, r1, #0 - bl sub_02003A2C - mov r3, #0 - str r3, [sp] - ldr r0, [r4, #0] - ldr r2, _02247D60 ; =0x00003FFF - ldr r0, [r0, #0x50] - mov r1, #2 - bl sub_02003A2C - ldr r0, _02247D64 ; =0x000006EC - bl sub_02005748 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02247D24: - mov r0, #0x12 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x12] - ldrsh r0, [r4, r0] - cmp r0, #0xa - ble _02247D56 - mov r0, #0 - strh r0, [r4, #0x12] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02247D3E: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02247D56: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02247D58: .word 0x04000048 -_02247D5C: .word 0x00001FFF -_02247D60: .word 0x00003FFF -_02247D64: .word 0x000006EC - thumb_func_end ov17_02247C5C - - thumb_func_start ov17_02247D68 -ov17_02247D68: ; 0x02247D68 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02247D68 - - thumb_func_start ov17_02247D7C -ov17_02247D7C: ; 0x02247D7C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02247DC0 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0] - strb r0, [r4, #0x11] - ldr r0, _02247DC4 ; =ov17_02247DC8 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247DC0: .word 0x00007530 -_02247DC4: .word ov17_02247DC8 - thumb_func_end ov17_02247D7C - - thumb_func_start ov17_02247DC8 -ov17_02247DC8: ; 0x02247DC8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02247DDA - cmp r0, #1 - beq _02247E0A - b _02247E5E -_02247DDA: - ldrb r0, [r4, #0x11] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #0 - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldrb r0, [r4, #0x11] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #1 - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #0x18] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02247E0A: - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0x11] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - mov r0, #1 - ldr r1, [r4, #0x18] - lsl r0, r0, #8 - add r2, r1, r0 - lsl r1, r0, #6 - str r2, [r4, #0x18] - cmp r2, r1 - blt _02247E34 - lsl r0, r0, #6 - str r0, [r4, #0x18] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_02247E34: - ldrb r0, [r4, #0x11] - ldr r2, [r4, #0x14] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldrb r0, [r4, #0x11] - ldr r2, [r4, #0x18] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_02247E5E: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov17_02247DC8 - - thumb_func_start ov17_02247E78 -ov17_02247E78: ; 0x02247E78 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02247E78 - - thumb_func_start ov17_02247E8C -ov17_02247E8C: ; 0x02247E8C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02247ED4 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0, #1] - strb r0, [r4, #0x12] - mov r0, #0 - strb r0, [r4, #0x1a] - ldr r0, _02247ED8 ; =ov17_02247F8C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247ED4: .word 0x00007530 -_02247ED8: .word ov17_02247F8C - thumb_func_end ov17_02247E8C - - thumb_func_start ov17_02247EDC -ov17_02247EDC: ; 0x02247EDC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02247F24 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0, #2] - strb r0, [r4, #0x12] - mov r0, #1 - strb r0, [r4, #0x1a] - ldr r0, _02247F28 ; =ov17_02247F8C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247F24: .word 0x00007530 -_02247F28: .word ov17_02247F8C - thumb_func_end ov17_02247EDC - - thumb_func_start ov17_02247F2C -ov17_02247F2C: ; 0x02247F2C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x1c - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _02247F84 ; =0x00007530 - str r0, [r4, #0] - ldrh r0, [r5] - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] - ldrb r1, [r6, #1] - ldrb r0, [r6, #2] - add r0, r1, r0 - strb r0, [r4, #0x12] - ldrb r0, [r6, #1] - add r1, r4, #0 - strb r0, [r4, #0x14] - ldrb r0, [r6, #2] - strb r0, [r4, #0x15] - mov r0, #0 - strb r0, [r4, #0x1a] - mov r0, #1 - strb r0, [r4, #0x1b] - ldr r0, _02247F88 ; =ov17_02247F8C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247F84: .word 0x00007530 -_02247F88: .word ov17_02247F8C - thumb_func_end ov17_02247F2C - - thumb_func_start ov17_02247F8C -ov17_02247F8C: ; 0x02247F8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5, #0x10] - cmp r0, #0 - beq _02247FA6 - cmp r0, #1 - beq _02247FB6 - cmp r0, #2 - bne _02247FA4 - b _022480FE -_02247FA4: - b _02248118 -_02247FA6: - ldr r0, _02248134 ; =0x000006E5 - bl sub_02005748 - mov r0, #0xf - strb r0, [r5, #0x11] - ldrb r0, [r5, #0x10] - add r0, r0, #1 - strb r0, [r5, #0x10] -_02247FB6: - ldrb r1, [r5, #0x13] - ldrb r0, [r5, #0x12] - cmp r1, r0 - blo _02247FD2 - mov r0, #0 - strb r0, [r5, #0x11] - ldr r0, _02248134 ; =0x000006E5 - bl sub_02005748 - ldrb r0, [r5, #0x10] - add sp, #8 - add r0, r0, #1 - strb r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02247FD2: - ldrb r0, [r5, #0x1b] - cmp r0, #1 - bne _02247FE2 - ldrb r0, [r5, #0x14] - cmp r1, r0 - blo _02247FE2 - mov r0, #1 - strb r0, [r5, #0x1a] -_02247FE2: - ldrb r0, [r5, #0x11] - cmp r0, #0 - beq _02247FF0 - sub r0, r0, #1 - add sp, #8 - strb r0, [r5, #0x11] - pop {r3, r4, r5, r6, r7, pc} -_02247FF0: - mov r0, #3 - strb r0, [r5, #0x11] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_02094E98 - mov r1, #0x60 - bl sub_020E1F6C - lsl r0, r1, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_02094E98 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1a - sub r1, r1, r2 - mov r0, #0x1a - ror r1, r0 - add r0, r2, r1 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_02094E98 - mov r1, #1 - tst r0, r1 - beq _02248034 - ldr r0, [sp, #4] - add r0, #0x80 - b _0224803A -_02248034: - ldr r0, [sp, #4] - mov r1, #0x80 - sub r0, r1, r0 -_0224803A: - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_02094E98 - mov r1, #1 - tst r0, r1 - beq _02248052 - add r0, r7, #0 - add r0, #0x60 - b _02248056 -_02248052: - mov r0, #0x60 - sub r0, r0, r7 -_02248056: - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - ldrb r0, [r5, #0x13] - cmp r0, #0 - beq _022480C6 - mov r0, #0x16 - ldrsh r0, [r5, r0] - cmp r0, #0x80 - bge _0224806C - cmp r6, #0x80 - blt _02248074 -_0224806C: - cmp r0, #0x80 - ble _022480C6 - cmp r6, #0x80 - ble _022480C6 -_02248074: - mov r0, #0x18 - ldrsh r0, [r5, r0] - cmp r0, #0x60 - bge _02248080 - cmp r4, #0x60 - blt _02248088 -_02248080: - cmp r0, #0x60 - ble _022480C6 - cmp r4, #0x60 - ble _022480C6 -_02248088: - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_02094E98 - mov r1, #1 - tst r0, r1 - beq _022480B2 - cmp r6, #0x80 - bge _022480A6 - ldr r0, [sp, #4] - add r0, #0x80 - str r0, [sp, #4] - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - b _022480C6 -_022480A6: - ldr r0, [sp, #4] - mov r1, #0x80 - sub r0, r1, r0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - b _022480C6 -_022480B2: - cmp r4, #0x60 - bge _022480BE - add r7, #0x60 - lsl r0, r7, #0x10 - asr r4, r0, #0x10 - b _022480C6 -_022480BE: - mov r0, #0x60 - sub r0, r0, r7 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_022480C6: - ldrb r1, [r5, #0x13] - mov r0, #1 - tst r0, r1 - ldrb r0, [r5, #0x1a] - beq _022480E2 - str r0, [sp] - mov r3, #0x2d - ldr r0, [r5, #0] - add r1, r6, #0 - add r2, r4, #0 - lsl r3, r3, #0xe - bl ov17_022477B8 - b _022480F0 -_022480E2: - str r0, [sp] - ldr r0, [r5, #0] - add r1, r6, #0 - add r2, r4, #0 - mov r3, #0 - bl ov17_022477B8 -_022480F0: - strh r6, [r5, #0x16] - strh r4, [r5, #0x18] - ldrb r0, [r5, #0x13] - add sp, #8 - add r0, r0, #1 - strb r0, [r5, #0x13] - pop {r3, r4, r5, r6, r7, pc} -_022480FE: - ldrb r0, [r5, #0x11] - add r0, r0, #1 - strb r0, [r5, #0x11] - ldrb r0, [r5, #0x11] - cmp r0, #0x1e - bls _02248130 - mov r0, #0 - strb r0, [r5, #0x11] - ldrb r0, [r5, #0x10] - add sp, #8 - add r0, r0, #1 - strb r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02248118: - mov r2, #0 - ldr r0, [r5, #0xc] - add r1, r5, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_02248130: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248134: .word 0x000006E5 - thumb_func_end ov17_02247F8C - - thumb_func_start ov17_02248138 -ov17_02248138: ; 0x02248138 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02248138 - - thumb_func_start ov17_0224814C -ov17_0224814C: ; 0x0224814C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02248190 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0] - strb r0, [r4, #0x11] - ldr r0, _02248194 ; =ov17_02248198 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248190: .word 0x00007530 -_02248194: .word ov17_02248198 - thumb_func_end ov17_0224814C - - thumb_func_start ov17_02248198 -ov17_02248198: ; 0x02248198 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0x11] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - add r3, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _022481BC - cmp r0, #1 - beq _022481E4 - b _02248218 -_022481BC: - ldrb r0, [r4, #0x11] - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r1, r1, r0 - ldr r0, _02248254 ; =0x00000F24 - ldr r1, [r1, r0] - add r0, r0, #4 - lsl r1, r1, #8 - str r1, [r4, #0x14] - ldrb r1, [r4, #0x11] - ldr r2, [r4, #0] - lsl r1, r1, #4 - add r1, r2, r1 - ldr r0, [r1, r0] - lsl r0, r0, #8 - str r0, [r4, #0x18] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022481E4: - mov r0, #3 - ldr r1, [r4, #0x14] - lsl r0, r0, #8 - add r1, r1, r0 - mov r0, #0x4b - lsl r0, r0, #0xa - str r1, [r4, #0x14] - cmp r1, r0 - blt _022481FC - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_022481FC: - ldrb r0, [r4, #0x11] - ldr r2, [r4, #0x18] - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r1, r1, r0 - mov r0, #0xf2 - lsl r0, r0, #4 - ldr r0, [r1, r0] - ldr r1, [r4, #0x14] - asr r2, r2, #8 - asr r1, r1, #8 - bl ov22_0225B158 - pop {r3, r4, r5, pc} -_02248218: - ldrb r0, [r4, #0x11] - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r1, r1, r0 - mov r0, #0xf2 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov22_0225B020 - ldrb r0, [r4, #0x11] - mov r2, #0 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r1, r1, r0 - mov r0, #0xf2 - lsl r0, r0, #4 - str r2, [r1, r0] - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_02248254: .word 0x00000F24 - thumb_func_end ov17_02248198 - - thumb_func_start ov17_02248258 -ov17_02248258: ; 0x02248258 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02248258 - - thumb_func_start ov17_0224826C -ov17_0224826C: ; 0x0224826C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x18 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _022482A8 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _022482AC ; =ov17_022482B0 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022482A8: .word 0x00007530 -_022482AC: .word ov17_022482B0 - thumb_func_end ov17_0224826C - - thumb_func_start ov17_022482B0 -ov17_022482B0: ; 0x022482B0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r1, #0x10] - str r1, [sp] - cmp r0, #0 - beq _022482C0 - b _022483E6 -_022482C0: - ldr r0, [sp] - mov r1, #0x14 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _022482D4 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x14] - pop {r4, r5, r6, r7, pc} -_022482D4: - ldr r0, [sp] - mov r1, #0x13 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _022482E8 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x13] - pop {r4, r5, r6, r7, pc} -_022482E8: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - ldr r0, [r0, #0] - mov r1, #2 - ldr r0, [r0, #0x30] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _02248360 -_02248300: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - ldr r0, _02248404 ; =0x02254468 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _0224835A - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r0, [r0, #0x12] - mov r7, #0x3f - str r5, [sp, #4] - lsl r1, r0, #1 - ldr r0, _02248408 ; =0x02254470 - lsl r7, r7, #0xa - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r0, r0, #5 - add r6, r1, r0 - b _02248354 -_02248330: - mov r4, #0 - b _02248348 -_02248334: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_02248348: - cmp r4, #8 - blt _02248334 - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_02248354: - ldr r0, [sp, #4] - cmp r0, #4 - blt _02248330 -_0224835A: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_02248360: - ldr r0, [sp, #8] - cmp r0, #4 - blt _02248300 - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _022483A2 - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _022483A2 - ldr r0, _02248404 ; =0x02254468 - sub r1, r1, #1 - ldrsb r0, [r0, r1] - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #0x3f - str r0, [sp, #4] - lsl r1, r1, #0xa - b _0224839C -_0224838C: - ldr r0, [sp, #4] - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r1 - strh r0, [r3, r2] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_0224839C: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _0224838C -_022483A2: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _02248400 - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _02248400 - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_022483E6: - add r0, r1, #0 - mov r2, #0 - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_02248400: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248404: .word 0x02254468 -_02248408: .word 0x02254470 - thumb_func_end ov17_022482B0 - - thumb_func_start ov17_0224840C -ov17_0224840C: ; 0x0224840C - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224840C - - thumb_func_start ov17_02248420 -ov17_02248420: ; 0x02248420 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x18 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _0224845C ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _02248460 ; =ov17_02248464 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224845C: .word 0x00007530 -_02248460: .word ov17_02248464 - thumb_func_end ov17_02248420 - - thumb_func_start ov17_02248464 -ov17_02248464: ; 0x02248464 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r1, #0x10] - str r1, [sp] - cmp r0, #0 - beq _02248474 - b _022485C2 -_02248474: - ldr r0, [sp] - mov r1, #0x14 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _02248488 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x14] - pop {r4, r5, r6, r7, pc} -_02248488: - ldr r0, [sp] - mov r1, #0x13 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _0224849C - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x13] - pop {r4, r5, r6, r7, pc} -_0224849C: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - ldr r0, [r0, #0] - mov r1, #2 - ldr r0, [r0, #0x30] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _0224851C -_022484B4: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - mov r0, #4 - sub r1, r0, r1 - ldr r0, _022485E0 ; =0x02254468 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _02248516 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r1, [r0, #0x12] - mov r0, #0xb - mov r7, #0x3f - sub r0, r0, r1 - lsl r1, r0, #1 - ldr r0, _022485E4 ; =0x02254470 - str r5, [sp, #4] - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r7, r7, #0xa - lsl r0, r0, #5 - add r6, r1, r0 - b _02248510 -_022484EC: - mov r4, #0 - b _02248504 -_022484F0: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_02248504: - cmp r4, #8 - blt _022484F0 - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_02248510: - ldr r0, [sp, #4] - cmp r0, #4 - blt _022484EC -_02248516: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_0224851C: - ldr r0, [sp, #8] - cmp r0, #4 - blt _022484B4 - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _0224857E - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _0224857E - mov r0, #5 - sub r1, r0, r1 - ldr r0, _022485E0 ; =0x02254468 - mov r7, #0x3f - ldrsb r0, [r0, r1] - lsl r7, r7, #0xa - mov r6, #0x1d - add r0, r0, #3 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #2 - str r0, [sp, #4] - lsl r1, r1, #8 - b _02248578 -_02248552: - ldr r0, [sp, #4] - ldr r5, [sp, #4] - lsl r4, r0, #1 - ldrh r0, [r3, r4] - lsl r5, r5, #0x1d - and r0, r7 - strh r0, [r3, r4] - ldr r0, [sp, #4] - ldrh r2, [r3, r4] - lsr r0, r0, #0x1f - sub r5, r5, r0 - ror r5, r6 - add r0, r0, r5 - add r0, r0, r1 - orr r0, r2 - strh r0, [r3, r4] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_02248578: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _02248552 -_0224857E: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _022485DC - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _022485DC - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_022485C2: - add r0, r1, #0 - mov r2, #0 - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_022485DC: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022485E0: .word 0x02254468 -_022485E4: .word 0x02254470 - thumb_func_end ov17_02248464 - - thumb_func_start ov17_022485E8 -ov17_022485E8: ; 0x022485E8 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_022485E8 - - thumb_func_start ov17_022485FC -ov17_022485FC: ; 0x022485FC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02248640 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0] - strb r0, [r4, #0x11] - ldr r0, _02248644 ; =ov17_02248648 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248640: .word 0x00007530 -_02248644: .word ov17_02248648 - thumb_func_end ov17_022485FC - - thumb_func_start ov17_02248648 -ov17_02248648: ; 0x02248648 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _0224865A - cmp r0, #1 - beq _02248684 - b _022486C8 -_0224865A: - ldrb r1, [r4, #0x11] - ldr r0, [r4, #0] - bl ov17_022478D0 - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0x24] - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x24] - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #0x18] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_02248684: - mov r0, #1 - ldr r1, [r4, #0x14] - lsl r0, r0, #0xa - sub r1, r1, r0 - mov r0, #0xe6 - lsl r0, r0, #8 - str r1, [r4, #0x14] - cmp r1, r0 - bgt _0224869E - str r0, [r4, #0x14] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_0224869E: - ldr r3, [r4, #0x14] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r3, [r4, #0x18] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_022486C8: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02248648 - - thumb_func_start ov17_022486E4 -ov17_022486E4: ; 0x022486E4 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_022486E4 - - thumb_func_start ov17_022486F8 -ov17_022486F8: ; 0x022486F8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _0224873C ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0] - strb r0, [r4, #0x11] - ldr r0, _02248740 ; =ov17_02248744 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224873C: .word 0x00007530 -_02248740: .word ov17_02248744 - thumb_func_end ov17_022486F8 - - thumb_func_start ov17_02248744 -ov17_02248744: ; 0x02248744 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02248756 - cmp r0, #1 - beq _02248784 - b _022487C8 -_02248756: - ldr r0, [r4, #0] - ldr r0, [r0, #0x24] - cmp r0, #0 - bne _02248762 - bl sub_02022974 -_02248762: - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0x24] - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x24] - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #0x18] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_02248784: - mov r0, #1 - ldr r1, [r4, #0x14] - lsl r0, r0, #0xa - add r1, r1, r0 - mov r0, #5 - lsl r0, r0, #0xe - str r1, [r4, #0x14] - cmp r1, r0 - blt _0224879E - str r0, [r4, #0x14] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_0224879E: - ldr r3, [r4, #0x14] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r3, [r4, #0x18] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_022487C8: - ldr r0, [r4, #0] - bl ov17_02247918 - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov17_02248744 - - thumb_func_start ov17_022487E8 -ov17_022487E8: ; 0x022487E8 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_022487E8 - - thumb_func_start ov17_022487FC -ov17_022487FC: ; 0x022487FC - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r6, r1, #0 - mov r0, #0x16 - mov r1, #0x58 - add r5, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x58 - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - ldr r2, _02248858 ; =0x00007530 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r0, [r4, #0xc] - ldrb r0, [r7] - strb r0, [r4, #0x11] - str r6, [r4, #0x2c] - str r6, [r4, #0x38] - add r0, r4, #0 - ldrb r1, [r7] - add r0, #0x46 - strb r1, [r0] - str r6, [r4, #0x48] - ldrb r0, [r7] - ldr r1, [r6, #0xc] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - str r0, [r4, #0x24] - ldr r0, _0224885C ; =ov17_02248860 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248858: .word 0x00007530 -_0224885C: .word ov17_02248860 - thumb_func_end ov17_022487FC - - thumb_func_start ov17_02248860 -ov17_02248860: ; 0x02248860 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r4, r0, #0 - ldrb r0, [r5, #0x10] - cmp r0, #0 - beq _02248878 - cmp r0, #1 - beq _02248902 - cmp r0, #2 - beq _0224892C - b _0224895A -_02248878: - ldr r0, _02248978 ; =ov17_02248A24 - ldr r2, _0224897C ; =0x0000753A - add r1, #0x2c - bl sub_0200D9E8 - add r1, r5, #0 - ldr r0, _02248980 ; =ov17_02248BE0 - ldr r2, _0224897C ; =0x0000753A - add r1, #0x48 - bl sub_0200D9E8 - ldr r0, [r5, #0x38] - ldr r1, [r0, #0xc] - add r0, r5, #0 - add r0, #0x46 - ldrb r0, [r0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - add r4, r0, #0 - add r0, sp, #0 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - mov r0, #0x16 - str r0, [sp, #0xc] - mov r0, #0x80 - add r4, #0x40 - str r0, [sp, #4] - str r4, [sp, #8] - ldr r1, [r5, #0x38] - add r0, sp, #0 - ldr r2, [r1, #0] - add r1, r5, #0 - add r1, #0x46 - ldrb r1, [r1] - lsl r1, r1, #2 - add r1, r2, r1 - add r1, #0xf8 - ldr r1, [r1, #0] - bl ov22_0225AFD4 - add r1, r5, #0 - add r1, #0x46 - ldrb r1, [r1] - ldr r2, [r5, #0x38] - lsl r1, r1, #4 - add r2, r2, r1 - mov r1, #0xf2 - lsl r1, r1, #4 - str r0, [r2, r1] - add r0, r5, #0 - add r0, #0x46 - ldrb r0, [r0] - ldr r2, [r5, #0x38] - lsl r0, r0, #4 - add r0, r2, r0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov22_0225B074 - ldrb r0, [r5, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r5, #0x10] - pop {r3, r4, r5, pc} -_02248902: - add r0, r5, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #1 - bne _02248972 - ldr r0, _02248984 ; =ov17_022489C8 - ldr r2, _0224897C ; =0x0000753A - add r1, #0x14 - bl sub_0200D9E8 - add r1, r5, #0 - ldr r0, _02248988 ; =ov17_02248AA4 - ldr r2, _0224897C ; =0x0000753A - add r1, #0x38 - bl sub_0200D9E8 - ldrb r0, [r5, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r5, #0x10] - pop {r3, r4, r5, pc} -_0224892C: - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - cmp r0, #1 - bne _02248972 - add r0, r5, #0 - add r0, #0x45 - ldrb r0, [r0] - cmp r0, #1 - bne _02248972 - add r0, r5, #0 - add r0, #0x55 - ldrb r0, [r0] - cmp r0, #1 - bne _02248972 - ldr r0, _0224898C ; =0x000006E5 - bl sub_02005748 - ldrb r0, [r5, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r5, #0x10] - pop {r3, r4, r5, pc} -_0224895A: - mov r2, #0 - ldr r0, [r5, #0xc] - add r1, r5, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_02248972: - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02248978: .word ov17_02248A24 -_0224897C: .word 0x0000753A -_02248980: .word ov17_02248BE0 -_02248984: .word ov17_022489C8 -_02248988: .word ov17_02248AA4 -_0224898C: .word 0x000006E5 - thumb_func_end ov17_02248860 - - thumb_func_start ov17_02248990 -ov17_02248990: ; 0x02248990 - push {r3} - sub sp, #0xc - add r2, sp, #0 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - str r1, [r2, #8] - ldr r1, [r0, #0x20] - ldr r2, [sp] - ldr r1, [r1, #0] - ldr r1, [r1, #4] - add r1, r2, r1 - str r1, [r0, #0x28] - ldr r1, [r0, #0x20] - ldr r2, [sp, #4] - ldr r1, [r1, #0] - ldr r1, [r1, #8] - add r1, r2, r1 - str r1, [r0, #0x2c] - ldr r1, [r0, #0x20] - ldr r2, [sp, #8] - ldr r1, [r1, #0] - ldr r1, [r1, #0xc] - add r1, r2, r1 - str r1, [r0, #0x30] - add sp, #0xc - pop {r3} - bx lr - thumb_func_end ov17_02248990 - - thumb_func_start ov17_022489C8 -ov17_022489C8: ; 0x022489C8 - push {r4, lr} - add r4, r1, #0 - ldrb r2, [r4, #0x14] - cmp r2, #0 - beq _022489D8 - cmp r2, #1 - beq _022489FC - b _02248A14 -_022489D8: - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #0x10] - str r0, [r4, #8] - mov r0, #0x16 - bl ov12_02236004 - str r0, [r4, #0xc] - bl ov12_02236320 - ldr r0, [r4, #0xc] - ldr r1, _02248A20 ; =ov17_02248990 - bl ov12_02236384 - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r4, pc} -_022489FC: - ldr r0, [r4, #0xc] - bl ov12_022363C4 - cmp r0, #0 - bne _02248A1C - ldr r0, [r4, #0xc] - bl ov12_02236428 - ldrb r0, [r4, #0x14] - add r0, r0, #1 - strb r0, [r4, #0x14] - pop {r4, pc} -_02248A14: - mov r1, #1 - strb r1, [r4, #0x15] - bl sub_0200DA58 -_02248A1C: - pop {r4, pc} - nop -_02248A20: .word ov17_02248990 - thumb_func_end ov17_022489C8 - - thumb_func_start ov17_02248A24 -ov17_02248A24: ; 0x02248A24 - push {r3, r4, r5, lr} - sub sp, #0x28 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #8] - cmp r0, #0 - beq _02248A3C - cmp r0, #1 - beq _02248A56 - cmp r0, #2 - beq _02248A86 - b _02248A90 -_02248A3C: - ldrb r0, [r4, #0xa] - add r0, r0, #1 - strb r0, [r4, #0xa] - ldrb r0, [r4, #0xa] - cmp r0, #1 - blo _02248AA0 - mov r0, #0 - strb r0, [r4, #0xa] - ldrb r0, [r4, #8] - add sp, #0x28 - add r0, r0, #1 - strb r0, [r4, #8] - pop {r3, r4, r5, pc} -_02248A56: - mov r0, #0xe - str r0, [sp] - mov r0, #0x16 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r4, #0] - ldr r0, [r0, #0x28] - str r0, [sp, #0x1c] - ldr r0, [r4, #0] - ldr r0, [r0, #0x50] - str r0, [sp, #0x20] - mov r0, #1 - str r0, [sp, #0x14] - add r0, sp, #0 - bl ov12_02237728 - str r0, [r4, #4] - ldrb r0, [r4, #8] - add sp, #0x28 - add r0, r0, #1 - strb r0, [r4, #8] - pop {r3, r4, r5, pc} -_02248A86: - ldr r0, [r4, #4] - bl ov12_022377F8 - cmp r0, #1 - beq _02248AA0 -_02248A90: - ldr r0, [r4, #4] - bl ov12_0223783C - mov r0, #1 - strb r0, [r4, #9] - add r0, r5, #0 - bl sub_0200DA58 -_02248AA0: - add sp, #0x28 - pop {r3, r4, r5, pc} - thumb_func_end ov17_02248A24 - - thumb_func_start ov17_02248AA4 -ov17_02248AA4: ; 0x02248AA4 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xe] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - add r6, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #0 - beq _02248ACA - cmp r0, #1 - beq _02248B1A - b _02248BCC -_02248ACA: - mov r1, #0 - str r1, [r4, #4] - str r1, [r4, #8] - ldrb r0, [r4, #0xe] - mov r3, #0xf2 - ldr r2, [r4, #0] - lsl r0, r0, #4 - add r0, r2, r0 - lsl r3, r3, #4 - ldr r0, [r0, r3] - add r2, r1, #0 - add r3, #0xe0 - bl ov22_0225B0EC - ldrb r1, [r4, #0xe] - ldr r2, [r4, #0] - mov r0, #0x80 - lsl r1, r1, #4 - add r2, r2, r1 - ldr r1, _02248BDC ; =0x00000F24 - str r0, [r2, r1] - ldrb r2, [r4, #0xe] - ldr r3, [r4, #0] - mov r0, #0x68 - lsl r2, r2, #4 - add r3, r3, r2 - add r2, r1, #4 - str r0, [r3, r2] - ldrb r0, [r4, #0xe] - ldr r2, [r4, #0] - lsl r0, r0, #4 - add r2, r2, r0 - sub r0, r1, #4 - ldr r0, [r2, r0] - mov r1, #1 - bl ov22_0225B074 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02248B1A: - mov r0, #2 - ldr r1, [r4, #4] - lsl r0, r0, #8 - add r1, r1, r0 - str r1, [r4, #4] - ldr r1, [r4, #8] - add r1, r1, r0 - str r1, [r4, #8] - ldr r2, [r4, #4] - lsl r1, r0, #3 - cmp r2, r1 - blt _02248B38 - lsl r0, r0, #3 - str r0, [r4, #4] - str r0, [r4, #8] -_02248B38: - ldrb r0, [r4, #0xe] - mov r3, #0xf2 - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - lsl r3, r3, #4 - ldr r0, [r0, r3] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - add r3, #0xe0 - bl ov22_0225B0EC - ldrb r0, [r4, #0xe] - mov r2, #0xf2 - lsl r2, r2, #4 - lsl r1, r0, #4 - ldr r0, [r4, #0] - add r3, r0, r1 - add r1, r2, #4 - ldr r0, [r3, r2] - add r2, #8 - ldr r1, [r3, r1] - ldr r2, [r3, r2] - add r3, r6, #0 - bl ov22_0225B158 - mov r0, #1 - ldr r1, [r4, #4] - lsl r0, r0, #0xc - cmp r1, r0 - blt _02248BD6 - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xe] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #5 - bl sub_02074470 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0xc] - ldrb r0, [r4, #0xe] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x70 - bl sub_02074470 - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r2, #0x7f - str r2, [sp, #4] - str r1, [sp, #8] - mov r0, #0x16 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - ldrb r6, [r4, #0xe] - ldr r0, [r0, #0] - add r2, #0xdd - lsl r6, r6, #2 - add r0, r0, r6 - ldr r0, [r0, r2] - lsl r2, r5, #0x10 - lsr r2, r2, #0x10 - bl sub_02077D3C - ldrb r0, [r4, #0xc] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r4, r5, r6, pc} -_02248BCC: - mov r0, #1 - strb r0, [r4, #0xd] - add r0, r5, #0 - bl sub_0200DA58 -_02248BD6: - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02248BDC: .word 0x00000F24 - thumb_func_end ov17_02248AA4 - - thumb_func_start ov17_02248BE0 -ov17_02248BE0: ; 0x02248BE0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #4 - bls _02248BEE - b _02248D16 -_02248BEE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02248BFA: ; jump table - .short _02248C04 - _02248BFA - 2 ; case 0 - .short _02248C2A - _02248BFA - 2 ; case 1 - .short _02248C4C - _02248BFA - 2 ; case 2 - .short _02248CBA - _02248BFA - 2 ; case 3 - .short _02248CD2 - _02248BFA - 2 ; case 4 -_02248C04: - ldr r0, [r4, #0] - ldr r0, [r0, #0x24] - cmp r0, #0 - bne _02248C10 - bl sub_02022974 -_02248C10: - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xf] - cmp r0, #1 - bhi _02248C1E - b _02248D26 -_02248C1E: - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02248C2A: - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0x24] - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #4] - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x24] - bl sub_020080C0 - lsl r0, r0, #8 - str r0, [r4, #8] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02248C4C: - ldrb r1, [r4, #0xe] - mov r0, #1 - tst r0, r1 - ldr r0, [r4, #0] - beq _02248C7E - ldr r3, [r4, #4] - ldr r0, [r0, #0x24] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r3, [r4, #8] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - b _02248CA6 -_02248C7E: - ldr r3, [r4, #4] - ldr r0, [r0, #0x24] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r3, [r4, #8] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - asr r2, r2, #8 - ldr r0, [r0, #0x24] - mov r1, #1 - sub r2, r2, #3 - bl sub_02007DEC -_02248CA6: - ldrb r0, [r4, #0xe] - add r0, r0, #1 - strb r0, [r4, #0xe] - ldrb r0, [r4, #0xe] - cmp r0, #3 - blo _02248D26 - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02248CBA: - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xf] - cmp r0, #7 - blo _02248D26 - mov r0, #0 - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_02248CD2: - mov r0, #1 - ldr r1, [r4, #4] - lsl r0, r0, #0xa - add r1, r1, r0 - mov r0, #5 - lsl r0, r0, #0xe - str r1, [r4, #4] - cmp r1, r0 - blt _02248CEC - str r0, [r4, #4] - ldrb r0, [r4, #0xc] - add r0, r0, #1 - strb r0, [r4, #0xc] -_02248CEC: - ldr r3, [r4, #4] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r3, [r4, #8] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - ldr r0, [r0, #0x24] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_02248D16: - ldr r0, [r4, #0] - bl ov17_02247918 - mov r0, #1 - strb r0, [r4, #0xd] - add r0, r5, #0 - bl sub_0200DA58 -_02248D26: - pop {r3, r4, r5, pc} - thumb_func_end ov17_02248BE0 - - thumb_func_start ov17_02248D28 -ov17_02248D28: ; 0x02248D28 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02248D28 - - thumb_func_start ov17_02248D3C -ov17_02248D3C: ; 0x02248D3C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x16 - mov r1, #0x1c - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x1c - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _02248D9C ; =0x00007530 - str r0, [r4, #0] - ldrh r0, [r6] - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] - ldrb r0, [r5] - strb r0, [r4, #0x11] - ldrb r0, [r5, #3] - strb r0, [r4, #0x13] - ldrb r0, [r5, #4] - strb r0, [r4, #0x14] - ldrb r0, [r5, #5] - strb r0, [r4, #0x15] - ldrb r0, [r5, #6] - strb r0, [r4, #0x16] - ldrb r0, [r5, #7] - strb r0, [r4, #0x17] - ldrb r0, [r5, #9] - strb r0, [r4, #0x19] - ldrb r0, [r5, #8] - strb r0, [r4, #0x18] - ldr r0, _02248DA0 ; =ov17_02248DA4 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248D9C: .word 0x00007530 -_02248DA0: .word ov17_02248DA4 - thumb_func_end ov17_02248D3C - - thumb_func_start ov17_02248DA4 -ov17_02248DA4: ; 0x02248DA4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02248DBA - cmp r0, #1 - beq _02248DF2 - cmp r0, #2 - beq _02248E04 - b _02248E3C -_02248DBA: - ldrb r0, [r4, #0x17] - cmp r0, #0 - beq _02248DEC - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x34 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - add r2, r4, #0 - ldrb r1, [r4, #0x17] - ldr r0, [r4, #0] - add r2, #0x13 - bl ov17_02247A08 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248DEC: - mov r0, #0x64 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248DF2: - ldr r0, [r4, #0] - bl ov17_02247A3C - cmp r0, #0 - bne _02248E54 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248E04: - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] - ldrb r0, [r4, #0x19] - cmp r0, #1 - bne _02248E18 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248E18: - ldrb r1, [r4, #0x12] - ldrb r0, [r4, #0x18] - cmp r1, r0 - blo _02248E54 - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x34 - bl sub_0200E084 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248E3C: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02248E54: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02248DA4 - - thumb_func_start ov17_02248E58 -ov17_02248E58: ; 0x02248E58 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02248E58 - - thumb_func_start ov17_02248E6C -ov17_02248E6C: ; 0x02248E6C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x16 - mov r1, #0x18 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x18 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _02248EBC ; =0x00007530 - str r0, [r4, #0] - ldrh r0, [r5] - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] - mov r0, #0xa - ldrsb r0, [r6, r0] - strb r0, [r4, #0x11] - mov r0, #0xb - ldrsb r0, [r6, r0] - strb r0, [r4, #0x12] - mov r0, #0xc - ldrsb r0, [r6, r0] - strb r0, [r4, #0x13] - ldr r0, _02248EC0 ; =ov17_02248EC4 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248EBC: .word 0x00007530 -_02248EC0: .word ov17_02248EC4 - thumb_func_end ov17_02248E6C - - thumb_func_start ov17_02248EC4 -ov17_02248EC4: ; 0x02248EC4 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02248ED8 - cmp r0, #1 - beq _02248F50 - b _02248F8C -_02248ED8: - ldr r0, [r4, #0] - ldr r1, [r0, #0] - ldr r0, _02248FA8 ; =0x00000171 - ldrb r0, [r1, r0] - cmp r0, #1 - bne _02248F32 - ldr r0, _02248FAC ; =0x04000048 - ldr r1, _02248FB0 ; =0xFFFFC0FF - ldrh r2, [r0] - and r2, r1 - mov r1, #0x1f - lsl r1, r1, #8 - orr r1, r2 - strh r1, [r0] - ldrh r2, [r0, #2] - mov r1, #0x3f - bic r2, r1 - mov r1, #0x1f - orr r2, r1 - mov r1, #0x20 - orr r2, r1 - strh r2, [r0, #2] - lsl r3, r1, #0x15 - ldr r2, [r3, #0] - ldr r0, _02248FB4 ; =0xFFFF1FFF - and r2, r0 - lsl r0, r1, #9 - orr r0, r2 - str r0, [r3, #0] - ldr r1, [r4, #0] - ldr r0, _02248FB8 ; =0x00000F64 - mov r2, #0xf0 - strb r2, [r1, r0] - ldr r2, [r4, #0] - mov r3, #0 - add r1, r0, #1 - strb r3, [r2, r1] - add r1, r0, #2 - ldr r2, [r4, #0] - mov r3, #0xff - strb r3, [r2, r1] - ldr r1, [r4, #0] - mov r2, #0x10 - add r0, r0, #3 - strb r2, [r1, r0] -_02248F32: - mov r0, #1 - str r0, [sp] - mov r1, #0x12 - mov r2, #0x11 - ldrb r0, [r4, #0x13] - ldrsb r1, [r4, r1] - ldrsb r2, [r4, r2] - mov r3, #0x3d - bl sub_0200AAE0 - ldrb r0, [r4, #0x10] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248F50: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _02248FA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xd0 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - ldr r0, [r0, #0x50] - add r3, r1, #0 - bl sub_020038B0 - mov r2, #0 - str r2, [sp] - mov r0, #0xe0 - str r0, [sp, #4] - ldr r0, [r4, #0] - mov r1, #2 - ldr r0, [r0, #0x50] - add r3, r2, #0 - bl sub_020038B0 - ldrb r0, [r4, #0x10] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02248F8C: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02248FA4: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02248FA8: .word 0x00000171 -_02248FAC: .word 0x04000048 -_02248FB0: .word 0xFFFFC0FF -_02248FB4: .word 0xFFFF1FFF -_02248FB8: .word 0x00000F64 - thumb_func_end ov17_02248EC4 - - thumb_func_start ov17_02248FBC -ov17_02248FBC: ; 0x02248FBC - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02248FBC - - thumb_func_start ov17_02248FD0 -ov17_02248FD0: ; 0x02248FD0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x1c - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x1c - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _0224900C ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _02249010 ; =ov17_02249014 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224900C: .word 0x00007530 -_02249010: .word ov17_02249014 - thumb_func_end ov17_02248FD0 - - thumb_func_start ov17_02249014 -ov17_02249014: ; 0x02249014 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r1, #0x18] - str r1, [sp] - add r1, r0, #1 - ldr r0, [sp] - cmp r1, #0x1e - str r1, [r0, #0x18] - bne _02249030 - mov r1, #0x1e - strb r1, [r0, #0x13] - mov r1, #1 - strb r1, [r0, #0x15] -_02249030: - ldr r0, [sp] - ldr r0, [r0, #0] - ldr r1, [r0, #0] - ldr r0, _02249228 ; =0x00000171 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224906A - ldr r0, [sp] - ldr r0, [r0, #0x18] - cmp r0, #0x1e - bge _0224906A - ldr r0, _0224922C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _02249058 - ldr r0, _02249230 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - beq _0224906A -_02249058: - ldr r0, [sp] - mov r1, #0x1e - str r1, [r0, #0x18] - ldr r1, [sp] - mov r0, #0 - strb r0, [r1, #0x13] - mov r2, #1 - strb r2, [r1, #0x15] - b _02249078 -_0224906A: - ldr r0, [sp] - ldr r0, [r0, #0x18] - cmp r0, #0x1e - ble _02249076 - mov r0, #0 - b _02249078 -_02249076: - mov r0, #1 -_02249078: - ldr r1, [sp] - ldrb r1, [r1, #0x10] - cmp r1, #0 - beq _02249082 - b _022491FA -_02249082: - ldr r1, [sp] - mov r2, #0x14 - ldrsb r1, [r1, r2] - cmp r1, #0 - ble _02249096 - ldr r0, [sp] - sub r1, r1, #1 - strb r1, [r0, #0x14] - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_02249096: - ldr r1, [sp] - mov r2, #0x13 - ldrsb r1, [r1, r2] - cmp r1, #0 - ble _022490AA - ldr r0, [sp] - sub r1, r1, #1 - strb r1, [r0, #0x13] - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_022490AA: - ldr r1, [sp] - strb r0, [r1, #0x13] - add r0, r1, #0 - ldrb r0, [r0, #0x15] - cmp r0, #1 - bne _022490C2 - ldr r0, _02249234 ; =0x000006ED - bl sub_02005748 - ldr r0, [sp] - mov r1, #0 - strb r1, [r0, #0x15] -_022490C2: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _02249136 -_022490D6: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - ldr r0, _02249238 ; =0x02254468 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _02249130 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r0, [r0, #0x12] - mov r7, #0x3f - str r5, [sp, #4] - lsl r1, r0, #1 - ldr r0, _0224923C ; =0x02254470 - lsl r7, r7, #0xa - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r0, r0, #5 - add r6, r1, r0 - b _0224912A -_02249106: - mov r4, #0 - b _0224911E -_0224910A: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_0224911E: - cmp r4, #8 - blt _0224910A - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_0224912A: - ldr r0, [sp, #4] - cmp r0, #4 - blt _02249106 -_02249130: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_02249136: - ldr r0, [sp, #8] - cmp r0, #4 - blt _022490D6 - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _02249178 - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _02249178 - ldr r0, _02249238 ; =0x02254468 - sub r1, r1, #1 - ldrsb r0, [r0, r1] - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #0x3f - str r0, [sp, #4] - lsl r1, r1, #0xa - b _02249172 -_02249162: - ldr r0, [sp, #4] - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r1 - strh r0, [r3, r2] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_02249172: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _02249162 -_02249178: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldr r0, [sp] - mov r1, #0xc - ldrb r0, [r0, #0x12] - lsl r0, r0, #5 - bl sub_020E2178 - ldr r1, [sp] - mov r2, #0x11 - ldrsb r2, [r1, r2] - ldr r1, _02249238 ; =0x02254468 - ldrsb r1, [r1, r2] - add r1, r1, #4 - lsl r1, r1, #3 - sub r2, r1, r0 - ldr r0, [sp] - ldr r1, _02249240 ; =0x00000F63 - ldr r0, [r0, #0] - strb r2, [r0, r1] - ldr r0, [sp] - ldr r0, [r0, #0] - ldrb r0, [r0, r1] - cmp r0, #0 - bne _022491C2 - ldr r2, _02249244 ; =0x04000050 - mov r0, #0 - strh r0, [r2] - sub r2, #0x50 - ldr r1, [r2, #0] - ldr r0, _02249248 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] -_022491C2: - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _02249224 - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _02249224 - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_022491FA: - ldr r3, _02249244 ; =0x04000050 - mov r2, #0 - strh r2, [r3] - sub r3, #0x50 - ldr r1, [r3, #0] - ldr r0, _02249248 ; =0xFFFF1FFF - and r0, r1 - str r0, [r3, #0] - ldr r0, [sp] - ldr r1, [sp] - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_02249224: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249228: .word 0x00000171 -_0224922C: .word 0x021BF67C -_02249230: .word 0x021BF6BC -_02249234: .word 0x000006ED -_02249238: .word 0x02254468 -_0224923C: .word 0x02254470 -_02249240: .word 0x00000F63 -_02249244: .word 0x04000050 -_02249248: .word 0xFFFF1FFF - thumb_func_end ov17_02249014 - - thumb_func_start ov17_0224924C -ov17_0224924C: ; 0x0224924C - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224924C - - thumb_func_start ov17_02249260 -ov17_02249260: ; 0x02249260 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x16 - mov r1, #0x14 - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrh r0, [r0, #0x10] - bl sub_02005748 - ldr r0, _022492A4 ; =ov17_022492AC - ldr r2, _022492A8 ; =0x00007530 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022492A4: .word ov17_022492AC -_022492A8: .word 0x00007530 - thumb_func_end ov17_02249260 - - thumb_func_start ov17_022492AC -ov17_022492AC: ; 0x022492AC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, [r4, #0] - ldr r0, _022492D8 ; =0x000004F9 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _022492D4 - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_022492D4: - pop {r3, r4, r5, pc} - nop -_022492D8: .word 0x000004F9 - thumb_func_end ov17_022492AC - - thumb_func_start ov17_022492DC -ov17_022492DC: ; 0x022492DC - push {r4, lr} - mov r0, #0x17 - mov r1, #0xf4 - bl sub_02018144 - mov r1, #0 - mov r2, #0xf4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r1, #0 - add r0, r4, #0 - mvn r1, r1 - add r0, #0x96 - strb r1, [r0] - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_022492DC - - thumb_func_start ov17_02249300 -ov17_02249300: ; 0x02249300 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r6, _02249354 ; =0x022545C0 - add r5, r0, #0 - add r7, r4, #0 -_0224930A: - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r2, r6, #0 - add r3, r7, #0 - bl sub_020183C4 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl sub_02019EE0 - add r1, r4, #4 - lsl r1, r1, #0x18 - mov r2, #0 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02019184 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r4, r4, #1 - add r6, #0x1c - cmp r4, #4 - blo _0224930A - pop {r3, r4, r5, r6, r7, pc} - nop -_02249354: .word 0x022545C0 - thumb_func_end ov17_02249300 - - thumb_func_start ov17_02249358 -ov17_02249358: ; 0x02249358 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_02249360: - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r6, #0 - bl sub_02019120 - add r1, r4, #4 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - cmp r4, #4 - blo _02249360 - pop {r4, r5, r6, pc} - thumb_func_end ov17_02249358 - - thumb_func_start ov17_02249380 -ov17_02249380: ; 0x02249380 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov17_022492DC - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - mov r0, #6 - mov r1, #0x17 - bl sub_02012744 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov17_022493DC - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov17_02249380 - - thumb_func_start ov17_022493A4 -ov17_022493A4: ; 0x022493A4 - push {r4, lr} - add r4, r0, #0 - bl ov17_022495F8 - add r0, r4, #0 - mov r1, #1 - bl ov17_02249D3C - ldr r0, [r4, #0x18] - bl sub_020127BC - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_022493A4 - - thumb_func_start ov17_022493C4 -ov17_022493C4: ; 0x022493C4 - push {r4, lr} - add r4, r0, #0 - bl ov17_02249828 - add r0, r4, #0 - bl ov17_022498F4 - add r0, r4, #0 - mov r1, #0 - bl ov17_02249CFC - pop {r4, pc} - thumb_func_end ov17_022493C4 - - thumb_func_start ov17_022493DC -ov17_022493DC: ; 0x022493DC - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #6 - add r4, r0, #0 - mov r0, #0x17 - lsl r1, r1, #0xc - bl sub_02018144 - add r1, r4, #0 - add r1, #0xd0 - str r0, [r1, #0] - mov r1, #6 - mov r0, #0x17 - lsl r1, r1, #0xc - bl sub_02018144 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] - mov r1, #0x1b - mov r0, #0x17 - lsl r1, r1, #8 - bl sub_02018144 - add r1, r4, #0 - add r1, #0xd8 - str r0, [r1, #0] - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #0xa - bl sub_02018144 - add r1, r4, #0 - add r1, #0xdc - str r0, [r1, #0] - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #0xa - bl sub_02018144 - add r1, r4, #0 - add r1, #0xe0 - str r0, [r1, #0] - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #0xa - bl sub_02018144 - add r1, r4, #0 - add r1, #0xe4 - str r0, [r1, #0] - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #0xa - bl sub_02018144 - add r1, r4, #0 - add r1, #0xe8 - str r0, [r1, #0] - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #8 - bl sub_02018144 - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - mov r1, #2 - mov r0, #0x17 - lsl r1, r1, #8 - bl sub_02018144 - add r1, r4, #0 - add r1, #0xf0 - str r0, [r1, #0] - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #9 - mov r2, #1 - add r3, sp, #0xc - bl sub_02006F50 - add r5, r0, #0 - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r1, #0xd0 - mov r2, #6 - ldr r0, [r0, #0x14] - ldr r1, [r1, #0] - lsl r2, r2, #0xc - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #0x12 - mov r2, #1 - add r3, sp, #0xc - bl sub_02006F50 - add r5, r0, #0 - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r1, #0xd4 - mov r2, #6 - ldr r0, [r0, #0x14] - ldr r1, [r1, #0] - lsl r2, r2, #0xc - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #0x10 - mov r2, #1 - add r3, sp, #0xc - bl sub_02006F50 - add r5, r0, #0 - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r1, #0xd8 - mov r2, #0x1b - ldr r0, [r0, #0x14] - ldr r1, [r1, #0] - lsl r2, r2, #8 - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #7 - mov r2, #1 - add r3, sp, #8 - bl sub_02006F6C - add r1, r4, #0 - add r5, r0, #0 - ldr r0, [sp, #8] - add r1, #0xdc - mov r2, #2 - ldr r1, [r1, #0] - add r0, #0xc - lsl r2, r2, #0xa - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #8 - mov r2, #1 - add r3, sp, #8 - bl sub_02006F6C - add r1, r4, #0 - add r5, r0, #0 - ldr r0, [sp, #8] - add r1, #0xe0 - mov r2, #2 - ldr r1, [r1, #0] - add r0, #0xc - lsl r2, r2, #0xa - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #0x11 - mov r2, #1 - add r3, sp, #8 - bl sub_02006F6C - add r1, r4, #0 - add r5, r0, #0 - ldr r0, [sp, #8] - add r1, #0xe4 - mov r2, #2 - ldr r1, [r1, #0] - add r0, #0xc - lsl r2, r2, #0xa - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0x17 - str r0, [sp] - mov r0, #0x2d - mov r1, #0x1c - mov r2, #1 - add r3, sp, #8 - bl sub_02006F6C - add r1, r4, #0 - add r5, r0, #0 - ldr r0, [sp, #8] - add r1, #0xe8 - mov r2, #2 - ldr r1, [r1, #0] - add r0, #0xc - lsl r2, r2, #0xa - bl sub_020C4B68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - mov r3, #2 - str r0, [sp, #4] - mov r0, #0x2d - mov r1, #0x1f - mov r2, #0x17 - lsl r3, r3, #8 - bl sub_020030E4 - ldr r0, [r4, #4] - mov r2, #0x17 - ldr r1, [r0, #0] - ldr r0, _022495F4 ; =0x0000011F - mov r3, #0x20 - ldrb r0, [r1, r0] - mov r1, #0x26 - lsl r0, r0, #0x14 - lsr r0, r0, #0x10 - str r0, [sp] - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - add r0, #0x40 - str r0, [sp, #4] - mov r0, #0x2d - bl sub_020030E4 - mov r0, #0 - mov r3, #2 - add r4, #0xf0 - str r0, [sp] - ldr r0, [r4, #0] - mov r1, #0x21 - str r0, [sp, #4] - mov r0, #0x2d - mov r2, #0x17 - lsl r3, r3, #8 - bl sub_020030E4 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_022495F4: .word 0x0000011F - thumb_func_end ov17_022493DC - - thumb_func_start ov17_022495F8 -ov17_022495F8: ; 0x022495F8 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 -_02249600: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_020181C4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #3 - blt _02249600 - mov r6, #0 - add r4, r5, #0 -_02249616: - add r0, r4, #0 - add r0, #0xdc - ldr r0, [r0, #0] - bl sub_020181C4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _02249616 - mov r4, #0 -_0224962A: - add r0, r5, #0 - add r0, #0xec - ldr r0, [r0, #0] - bl sub_020181C4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0224962A - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_022495F8 - - thumb_func_start ov17_02249640 -ov17_02249640: ; 0x02249640 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - str r3, [r7, #8] - ldr r0, [r7, #4] - str r2, [sp, #8] - ldr r0, [r0, #0x60] - str r1, [sp, #4] - str r0, [sp, #0xc] - mov r0, #0x96 - ldrsb r2, [r7, r0] - sub r0, #0x97 - cmp r2, r0 - bne _02249664 - mov r0, #1 - str r0, [sp, #8] - mov r6, #0 - b _0224966C -_02249664: - mov r0, #0x24 - ldr r1, _02249750 ; =0x02254578 - mul r0, r2 - add r6, r1, r0 -_0224966C: - ldr r0, [sp, #4] - mov r1, #0x24 - ldr r2, _02249750 ; =0x02254578 - mul r1, r0 - add r0, r2, r1 - str r0, [sp, #0x10] - mov r4, #0 - add r5, r0, #0 -_0224967C: - ldrh r1, [r5, #0xc] - add r0, r4, #4 - lsl r0, r0, #0x18 - lsl r1, r1, #0x18 - lsr r0, r0, #0x18 - lsr r1, r1, #0x18 - bl sub_02019060 - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _0224967C - ldr r0, [sp, #0x10] - mov r2, #8 - ldrh r1, [r0] - add r0, r7, #0 - add r0, #0x94 - strh r1, [r0] - ldr r0, _02249754 ; =ov17_0224A088 - add r1, r7, #0 - bl sub_0200DA3C - ldr r0, [sp, #0x10] - ldrh r1, [r0, #2] - ldr r0, _02249758 ; =0x0000FFFF - cmp r1, r0 - beq _022496DA - ldr r0, [sp, #8] - cmp r0, #1 - beq _022496BE - ldrh r0, [r6, #2] - cmp r1, r0 - beq _022496DA -_022496BE: - mov r0, #2 - lsl r0, r0, #8 - str r0, [sp] - ldr r0, [r7, #4] - lsl r1, r1, #2 - add r1, r7, r1 - add r0, #0x90 - add r1, #0xec - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #1 - mov r3, #0 - bl sub_02002FBC -_022496DA: - ldr r4, [sp, #0x10] - mov r5, #0 -_022496DE: - ldrh r2, [r4, #4] - ldr r0, _02249758 ; =0x0000FFFF - cmp r2, r0 - beq _02249716 - ldr r0, [sp, #8] - cmp r0, #1 - beq _022496F2 - ldrh r0, [r6, #4] - cmp r2, r0 - beq _02249716 -_022496F2: - lsl r2, r2, #2 - add r2, r7, r2 - add r1, r5, #4 - add r2, #0xdc - lsl r1, r1, #0x18 - mov r3, #2 - ldr r0, [sp, #0xc] - ldr r2, [r2, #0] - lsr r1, r1, #0x18 - lsl r3, r3, #0xa - bl sub_02019574 - add r1, r5, #4 - lsl r1, r1, #0x18 - ldr r0, [sp, #0xc] - lsr r1, r1, #0x18 - bl sub_0201C3C0 -_02249716: - add r5, r5, #1 - add r4, r4, #2 - add r6, r6, #2 - cmp r5, #4 - blt _022496DE - add r1, r7, #0 - ldr r0, [sp, #4] - add r1, #0x96 - strb r0, [r1] - add r0, r7, #0 - mov r1, #0 - bl ov17_02249D3C - ldr r0, [sp, #0x10] - ldr r3, [r0, #0x1c] - cmp r3, #0 - beq _02249740 - ldr r1, [sp, #4] - ldr r2, [sp, #8] - add r0, r7, #0 - blx r3 -_02249740: - ldr r0, _0224975C ; =ov17_0224A038 - add r1, r7, #0 - mov r2, #0xa - bl sub_0200DA3C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02249750: .word 0x02254578 -_02249754: .word ov17_0224A088 -_02249758: .word 0x0000FFFF -_0224975C: .word ov17_0224A038 - thumb_func_end ov17_02249640 - - thumb_func_start ov17_02249760 -ov17_02249760: ; 0x02249760 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x96 - ldrsb r1, [r5, r0] - sub r0, #0x97 - cmp r1, r0 - bne _02249772 - bl sub_02022974 -_02249772: - mov r0, #0x96 - ldrsb r1, [r5, r0] - ldr r3, _022497F8 ; =0x02254578 - mov r0, #0x24 - add r2, r1, #0 - mul r2, r0 - add r4, r3, r2 - ldr r1, [r4, #0x14] - cmp r1, #0 - bne _0224978A - sub r0, #0x25 - pop {r4, r5, r6, pc} -_0224978A: - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _02249794 - bl sub_02022974 -_02249794: - ldr r0, [r4, #0x14] - bl sub_02022664 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _022497D8 - ldr r2, [r4, #0x18] - ldr r1, _022497FC ; =0x02254554 - cmp r2, r1 - bne _022497D8 - ldr r1, _02249800 ; =0x021BF67C - mov r2, #0x11 - ldr r1, [r1, #0x48] - add r3, r1, #0 - tst r3, r2 - beq _022497BA - mov r0, #3 - b _022497D8 -_022497BA: - mov r3, #0x82 - add r6, r1, #0 - tst r6, r3 - beq _022497C6 - mov r0, #1 - b _022497D8 -_022497C6: - lsl r2, r2, #6 - tst r2, r1 - beq _022497D0 - mov r0, #0 - b _022497D8 -_022497D0: - lsl r2, r3, #4 - tst r1, r2 - beq _022497D8 - mov r0, #2 -_022497D8: - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _022497E6 - ldr r1, [r4, #0x18] - lsl r0, r0, #2 - ldr r1, [r1, r0] -_022497E6: - ldr r2, [r4, #0x20] - cmp r2, #0 - beq _022497F2 - add r0, r5, #0 - blx r2 - add r1, r0, #0 -_022497F2: - add r0, r1, #0 - pop {r4, r5, r6, pc} - nop -_022497F8: .word 0x02254578 -_022497FC: .word 0x02254554 -_02249800: .word 0x021BF67C - thumb_func_end ov17_02249760 - - thumb_func_start ov17_02249804 -ov17_02249804: ; 0x02249804 - ldr r0, [r0, #0xc] - cmp r0, #0 - bne _0224980E - mov r0, #1 - bx lr -_0224980E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02249804 - - thumb_func_start ov17_02249814 -ov17_02249814: ; 0x02249814 - mov r1, #0x96 - ldrsb r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov17_02249814 - - thumb_func_start ov17_0224981C -ov17_0224981C: ; 0x0224981C - ldr r3, _02249824 ; =ov17_02249CFC - mov r1, #1 - bx r3 - nop -_02249824: .word ov17_02249CFC - thumb_func_end ov17_0224981C - - thumb_func_start ov17_02249828 -ov17_02249828: ; 0x02249828 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #1 - mov r1, #0x1a - mov r2, #0xcc - mov r3, #0x17 - bl sub_0200B144 - add r4, r0, #0 - ldr r0, [r5, #4] - mov r2, #0x12 - lsl r2, r2, #4 - ldr r3, [r0, #0] - add r1, r2, #1 - ldrb r0, [r3, r2] - ldrb r1, [r3, r1] - ldr r3, [r5, #0] - add r2, #0x51 - ldrb r2, [r3, r2] - bl sub_02095848 - add r6, r0, #0 - ldr r0, [r5, #4] - ldr r1, _022498DC ; =0x0000011F - ldr r2, [r0, #0] - ldrb r0, [r2, r1] - add r1, r1, #2 - ldrb r1, [r2, r1] - bl sub_020958C4 - add r7, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, _022498E0 ; =0x00010200 - add r1, r5, #0 - str r0, [sp] - mov r3, #0 - ldr r0, _022498E4 ; =0x000080EB - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x7f - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, #0x1c - add r2, r6, #0 - bl ov17_02249BC4 - ldr r0, _022498E0 ; =0x00010200 - mov r3, #0 - str r0, [sp] - ldr r0, _022498E4 ; =0x000080EB - str r3, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x9f - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - add r0, r5, #0 - add r5, #0x30 - add r1, r5, #0 - add r2, r7, #0 - bl ov17_02249BC4 - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B190 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_022498DC: .word 0x0000011F -_022498E0: .word 0x00010200 -_022498E4: .word 0x000080EB - thumb_func_end ov17_02249828 - - thumb_func_start ov17_022498E8 -ov17_022498E8: ; 0x022498E8 - ldr r3, _022498F0 ; =ov17_02249CFC - mov r1, #1 - bx r3 - nop -_022498F0: .word ov17_02249CFC - thumb_func_end ov17_022498E8 - - thumb_func_start ov17_022498F4 -ov17_022498F4: ; 0x022498F4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - ldr r2, [r0, #4] - str r0, [sp, #0x18] - add r0, r2, #0 - add r0, #0x84 - ldr r5, [r0, #0] - ldr r1, [r2, #0] - ldr r0, _022499FC ; =0x00000123 - ldrb r0, [r1, r0] - add r1, r2, r0 - ldr r0, _02249A00 ; =0x00000ABC - ldrb r0, [r1, r0] - cmp r0, #1 - bne _0224991C - add r0, r5, #0 - mov r1, #0 - bl sub_0200B1EC - b _02249924 -_0224991C: - add r0, r5, #0 - mov r1, #1 - bl sub_0200B1EC -_02249924: - add r4, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #3 - bl sub_0200B1EC - add r7, r0, #0 - add r0, r5, #0 - mov r1, #4 - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, _02249A04 ; =0x0001010B - add r2, r4, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02249A08 ; =0x000080EB - mov r3, #2 - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x18 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r1, r0, #0 - add r1, #0x44 - bl ov17_02249BC4 - ldr r0, _02249A04 ; =0x0001010B - add r2, r6, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02249A08 ; =0x000080EB - mov r3, #2 - str r0, [sp, #8] - mov r0, #0x80 - str r0, [sp, #0xc] - mov r0, #0x78 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r1, r0, #0 - add r1, #0x58 - bl ov17_02249BC4 - ldr r0, _02249A04 ; =0x0001010B - add r2, r7, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02249A08 ; =0x000080EB - mov r3, #2 - str r0, [sp, #8] - mov r0, #0x30 - str r0, [sp, #0xc] - mov r0, #0x40 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r1, r0, #0 - add r1, #0x6c - bl ov17_02249BC4 - ldr r0, _02249A04 ; =0x0001010B - add r2, r5, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02249A08 ; =0x000080EB - mov r3, #2 - str r0, [sp, #8] - mov r0, #0xd0 - str r0, [sp, #0xc] - mov r0, #0x40 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r1, r0, #0 - add r1, #0x80 - str r1, [sp, #0x18] - bl ov17_02249BC4 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_020237BC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_022499FC: .word 0x00000123 -_02249A00: .word 0x00000ABC -_02249A04: .word 0x0001010B -_02249A08: .word 0x000080EB - thumb_func_end ov17_022498F4 - - thumb_func_start ov17_02249A0C -ov17_02249A0C: ; 0x02249A0C - push {r4, r5, r6, lr} - add r6, r1, #0 - add r4, r0, #0 - add r0, r6, #1 - cmp r0, #4 - bhi _02249A2E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02249A24: ; jump table - .short _02249A2E - _02249A24 - 2 ; case 0 - .short _02249A32 - _02249A24 - 2 ; case 1 - .short _02249A36 - _02249A24 - 2 ; case 2 - .short _02249A3A - _02249A24 - 2 ; case 3 - .short _02249A3E - _02249A24 - 2 ; case 4 -_02249A2E: - add r0, r6, #0 - pop {r4, r5, r6, pc} -_02249A32: - mov r5, #2 - b _02249A40 -_02249A36: - mov r5, #3 - b _02249A40 -_02249A3A: - mov r5, #4 - b _02249A40 -_02249A3E: - mov r5, #5 -_02249A40: - ldr r0, _02249A9C ; =ov17_02249DA0 - add r1, r4, #0 - bl ov17_02249D50 - add r0, r4, #0 - mov r1, #2 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0x12 - add r0, #0xca - strh r1, [r0] - add r0, r4, #0 - mov r1, #0x2d - add r0, #0xc8 - strh r1, [r0] - mov r0, #0xc - ldr r1, _02249AA0 ; =0x02254630 - mul r0, r6 - add r2, r1, r0 - add r1, r4, #0 - add r1, #0xa0 - str r2, [r1, #0] - ldr r1, _02249AA4 ; =0x02254660 - add r2, r1, r0 - add r1, r4, #0 - add r1, #0xa4 - str r2, [r1, #0] - ldr r1, _02249AA8 ; =0x02254690 - add r1, r1, r0 - add r0, r4, #0 - add r0, #0xa8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - str r6, [r0, #0] - add r4, #0xcc - strb r5, [r4] - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02249A9C: .word ov17_02249DA0 -_02249AA0: .word 0x02254630 -_02249AA4: .word 0x02254660 -_02249AA8: .word 0x02254690 - thumb_func_end ov17_02249A0C - - thumb_func_start ov17_02249AAC -ov17_02249AAC: ; 0x02249AAC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x17 - mov r1, #0x20 - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - beq _02249AD8 - lsl r0, r5, #2 - add r0, r6, r0 - add r0, #0xd0 - ldr r0, [r0, #0] - str r0, [r4, #0xc] -_02249AD8: - ldr r0, [sp, #0x1c] - lsl r0, r0, #5 - strh r0, [r4, #0x1c] - ldr r0, [sp, #0x18] - ldrh r1, [r0] - strh r1, [r4, #0x10] - ldrh r1, [r0, #2] - strh r1, [r4, #0x12] - ldrh r1, [r0, #4] - strh r1, [r4, #0x14] - ldrh r1, [r0, #6] - strh r1, [r4, #0x16] - ldrh r1, [r0, #8] - strh r1, [r4, #0x18] - ldrh r0, [r0, #0xa] - strh r0, [r4, #0x1a] - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - bl sub_02019F28 - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02249AAC - - thumb_func_start ov17_02249B08 -ov17_02249B08: ; 0x02249B08 - push {r4, lr} - sub sp, #8 - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r4, [sp, #0x14] - str r4, [sp, #4] - bl ov17_02249AAC - add r4, r0, #0 - ldr r0, _02249B2C ; =ov17_0224A0C8 - add r1, r4, #0 - mov r2, #0x14 - bl sub_0200DA3C - str r0, [r4, #0] - add r0, r4, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_02249B2C: .word ov17_0224A0C8 - thumb_func_end ov17_02249B08 - - thumb_func_start ov17_02249B30 -ov17_02249B30: ; 0x02249B30 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _02249B4E - ldr r0, [r4, #8] - cmp r0, #0 - beq _02249B44 - bl sub_020181C4 -_02249B44: - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} -_02249B4E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02249B30 - - thumb_func_start ov17_02249B54 -ov17_02249B54: ; 0x02249B54 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrh r1, [r5, #0x16] - ldrh r0, [r5, #0x1c] - mov r6, #0 - mul r0, r1 - str r0, [sp] - ldrh r0, [r5, #0x12] - lsl r7, r0, #0xa - ldrh r0, [r5, #0x1a] - cmp r0, #0 - ble _02249BC0 - add r4, r6, #0 -_02249B6E: - ldr r2, [r5, #0xc] - cmp r2, #0 - beq _02249B9C - ldrh r0, [r5, #0x14] - ldrh r3, [r5, #0x1c] - lsl r1, r0, #5 - add r0, r3, #0 - ldr r3, [sp] - mul r0, r6 - add r0, r3, r0 - add r0, r1, r0 - ldrh r1, [r5, #0x10] - add r0, r2, r0 - ldr r3, [r5, #4] - lsl r2, r1, #5 - add r1, r7, r4 - add r1, r2, r1 - ldrh r2, [r5, #0x18] - add r1, r3, r1 - lsl r2, r2, #5 - bl sub_020C4B18 - b _02249BB2 -_02249B9C: - ldrh r1, [r5, #0x10] - ldr r3, [r5, #4] - mov r0, #0 - lsl r2, r1, #5 - add r1, r7, r4 - add r1, r2, r1 - ldrh r2, [r5, #0x18] - add r1, r3, r1 - lsl r2, r2, #5 - bl sub_020C4AF0 -_02249BB2: - mov r0, #1 - lsl r0, r0, #0xa - add r4, r4, r0 - ldrh r0, [r5, #0x1a] - add r6, r6, #1 - cmp r6, r0 - blt _02249B6E -_02249BC0: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02249B54 - - thumb_func_start ov17_02249BC4 -ov17_02249BC4: ; 0x02249BC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x78 - add r5, r1, #0 - str r0, [sp, #0x18] - ldr r0, [r5, #0] - str r2, [sp, #0x1c] - str r3, [sp, #0x20] - ldr r4, [sp, #0x9c] - cmp r0, #0 - beq _02249BDC - bl sub_02022974 -_02249BDC: - ldr r0, [sp, #0x18] - mov r2, #0 - ldr r1, [r0, #4] - ldr r0, [r1, #0x60] - str r0, [sp, #0x28] - ldr r0, [r1, #0x5c] - ldr r1, [sp, #0x1c] - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - bl sub_02002D7C - add r7, r0, #0 - asr r1, r7, #2 - lsr r1, r1, #0x1d - add r1, r7, r1 - asr r6, r1, #3 - mov r1, #8 - bl sub_020BD140 - cmp r0, #0 - beq _02249C08 - add r6, r6, #1 -_02249C08: - add r0, sp, #0x38 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - lsl r2, r6, #0x18 - ldr r0, [sp, #0x28] - add r1, sp, #0x38 - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x90] - ldr r1, [sp, #0x20] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r2, [sp, #0x1c] - add r0, sp, #0x38 - str r3, [sp, #0x14] - bl sub_0201D7E0 - add r0, sp, #0x38 - mov r1, #2 - mov r2, #0x17 - bl sub_02012898 - mov r1, #1 - mov r2, #2 - add r3, sp, #0x2c - bl sub_0201ED94 - ldr r0, [sp, #0xa4] - cmp r0, #1 - bne _02249C60 - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r0, r0, #1 - sub r4, r4, r0 -_02249C60: - ldr r0, [sp, #0x18] - ldr r0, [r0, #0x18] - str r0, [sp, #0x48] - add r0, sp, #0x38 - str r0, [sp, #0x4c] - ldr r0, [sp, #0x24] - bl sub_0200D9B0 - str r0, [sp, #0x50] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x98] - bl sub_0200D04C - mov r1, #0 - str r0, [sp, #0x54] - ldr r0, [sp, #0x30] - str r1, [sp, #0x58] - str r0, [sp, #0x5c] - ldr r0, [sp, #0xa0] - str r4, [sp, #0x60] - add r0, #0xf8 - str r0, [sp, #0x64] - mov r0, #0x64 - str r0, [sp, #0x6c] - mov r0, #2 - str r0, [sp, #0x70] - mov r0, #0x17 - str r0, [sp, #0x74] - add r0, sp, #0x48 - str r1, [sp, #0x68] - bl sub_020127E8 - ldr r1, [sp, #0x94] - add r6, r0, #0 - bl sub_02012AC0 - ldr r2, [sp, #0xa0] - add r0, r6, #0 - add r1, r4, #0 - add r2, #0xf8 - bl sub_020128C4 - add r0, sp, #0x38 - bl sub_0201A8FC - str r6, [r5, #0] - add r3, sp, #0x2c - ldmia r3!, {r0, r1} - add r2, r5, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - strh r7, [r5, #0x10] - add sp, #0x78 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02249BC4 - - thumb_func_start ov17_02249CD0 -ov17_02249CD0: ; 0x02249CD0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - add r4, #0x20 - add r7, r6, #0 -_02249CDC: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _02249CEE - bl sub_02012870 - add r0, r4, #0 - bl sub_0201EE28 - str r7, [r5, #0x1c] -_02249CEE: - add r6, r6, #1 - add r5, #0x14 - add r4, #0x14 - cmp r6, #6 - blt _02249CDC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02249CD0 - - thumb_func_start ov17_02249CFC -ov17_02249CFC: ; 0x02249CFC - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - cmp r7, #1 - bne _02249D18 - mov r1, #0x96 - ldrsb r1, [r0, r1] - cmp r1, #0 - bne _02249D12 - mov r4, #0 - mov r6, #1 - b _02249D1C -_02249D12: - mov r4, #2 - mov r6, #5 - b _02249D1C -_02249D18: - mov r4, #0 - mov r6, #5 -_02249D1C: - cmp r4, r6 - bgt _02249D3A - mov r1, #0x14 - mul r1, r4 - add r5, r0, r1 -_02249D26: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _02249D32 - add r1, r7, #0 - bl sub_020129D0 -_02249D32: - add r4, r4, #1 - add r5, #0x14 - cmp r4, r6 - ble _02249D26 -_02249D3A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_02249CFC - - thumb_func_start ov17_02249D3C -ov17_02249D3C: ; 0x02249D3C - push {r3, lr} - cmp r1, #1 - bne _02249D48 - bl ov17_02249CD0 - pop {r3, pc} -_02249D48: - mov r1, #0 - bl ov17_02249CFC - pop {r3, pc} - thumb_func_end ov17_02249D3C - - thumb_func_start ov17_02249D50 -ov17_02249D50: ; 0x02249D50 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02249D60 - bl sub_02022974 -_02249D60: - add r0, r4, #0 - add r0, #0x98 - mov r1, #0 - mov r2, #0x38 - bl sub_020C4CF4 - ldr r2, _02249D7C ; =0x00000514 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} - nop -_02249D7C: .word 0x00000514 - thumb_func_end ov17_02249D50 - - thumb_func_start ov17_02249D80 -ov17_02249D80: ; 0x02249D80 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02249D9C - bl sub_0200DA58 - mov r1, #0 - str r1, [r4, #0xc] - add r4, #0x98 - add r0, r4, #0 - mov r2, #0x38 - bl sub_020C4CF4 -_02249D9C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02249D80 - - thumb_func_start ov17_02249DA0 -ov17_02249DA0: ; 0x02249DA0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - mov r0, #0x98 - ldrsh r0, [r4, r0] - cmp r0, #8 - bls _02249DB0 - b _0224A02C -_02249DB0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02249DBC: ; jump table - .short _02249DCE - _02249DBC - 2 ; case 0 - .short _02249E56 - _02249DBC - 2 ; case 1 - .short _02249E70 - _02249DBC - 2 ; case 2 - .short _02249E96 - _02249DBC - 2 ; case 3 - .short _02249F20 - _02249DBC - 2 ; case 4 - .short _02249F3C - _02249DBC - 2 ; case 5 - .short _02249F62 - _02249DBC - 2 ; case 6 - .short _02249FEC - _02249DBC - 2 ; case 7 - .short _0224A006 - _02249DBC - 2 ; case 8 -_02249DCE: - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - add r2, r4, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0xca - ldrh r0, [r0] - add r3, r4, #0 - add r2, #0xc8 - str r0, [sp, #4] - add r3, #0xb8 - ldrh r2, [r2] - ldr r3, [r3, #0] - add r0, r4, #0 - mov r1, #4 - bl ov17_02249B08 - add r1, r4, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xcc - ldrb r1, [r0] - mov r0, #0x14 - add r2, sp, #8 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - add r1, sp, #0xc - bl sub_020129A4 - add r0, r4, #0 - add r0, #0xcc - ldrb r1, [r0] - mov r0, #0x14 - ldr r2, [sp, #8] - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - ldr r1, [sp, #0xc] - add r2, #0x10 - bl sub_020128C4 - mov r6, #0 - add r5, r4, #0 - add r7, r6, #0 -_02249E2C: - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r0, #0 - beq _02249E40 - ldr r0, [r0, #0] - add r1, r7, #0 - mov r2, #0x10 - bl sub_0200D5AC -_02249E40: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _02249E2C - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r4, #0x98 - add sp, #0x10 - add r0, r0, #1 - strh r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_02249E56: - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl ov17_02249B30 - cmp r0, #0 - beq _02249F2E - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x98 - strh r1, [r0] -_02249E70: - mov r1, #0x9a - ldrsh r0, [r4, r1] - add r2, r0, #1 - add r0, r4, #0 - add r0, #0x9a - strh r2, [r0] - ldrsh r0, [r4, r1] - cmp r0, #2 - ble _02249F2E - add r0, r4, #0 - mov r1, #0 - add r0, #0x9a - strh r1, [r0] - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x98 - strh r1, [r0] -_02249E96: - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - add r2, r4, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0xca - ldrh r0, [r0] - add r3, r4, #0 - add r2, #0xc8 - str r0, [sp, #4] - add r3, #0xbc - ldrh r2, [r2] - ldr r3, [r3, #0] - add r0, r4, #0 - mov r1, #4 - bl ov17_02249B08 - add r1, r4, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xcc - ldrb r1, [r0] - mov r0, #0x14 - add r2, sp, #8 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - add r1, sp, #0xc - bl sub_020129A4 - add r0, r4, #0 - add r0, #0xcc - ldrb r1, [r0] - mov r0, #0x14 - ldr r2, [sp, #8] - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - ldr r1, [sp, #0xc] - sub r2, r2, #4 - bl sub_020128C4 - mov r6, #0 - add r5, r4, #0 - add r7, r6, #0 -_02249EF4: - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r0, #0 - beq _02249F0A - mov r2, #3 - ldr r0, [r0, #0] - add r1, r7, #0 - mvn r2, r2 - bl sub_0200D5AC -_02249F0A: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _02249EF4 - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r4, #0x98 - add sp, #0x10 - add r0, r0, #1 - strh r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_02249F20: - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl ov17_02249B30 - cmp r0, #0 - bne _02249F30 -_02249F2E: - b _0224A032 -_02249F30: - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x98 - strh r1, [r0] -_02249F3C: - mov r1, #0x9a - ldrsh r0, [r4, r1] - add r2, r0, #1 - add r0, r4, #0 - add r0, #0x9a - strh r2, [r0] - ldrsh r0, [r4, r1] - cmp r0, #2 - ble _0224A032 - add r0, r4, #0 - mov r1, #0 - add r0, #0x9a - strh r1, [r0] - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x98 - strh r1, [r0] -_02249F62: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - add r2, r4, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0xca - ldrh r0, [r0] - add r3, r4, #0 - add r2, #0xc8 - str r0, [sp, #4] - add r3, #0xc0 - ldrh r2, [r2] - ldr r3, [r3, #0] - add r0, r4, #0 - mov r1, #4 - bl ov17_02249B08 - add r1, r4, #0 - add r1, #0x9c - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xcc - ldrb r1, [r0] - mov r0, #0x14 - add r2, sp, #8 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - add r1, sp, #0xc - bl sub_020129A4 - add r0, r4, #0 - add r0, #0xcc - ldrb r1, [r0] - mov r0, #0x14 - ldr r2, [sp, #8] - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - ldr r1, [sp, #0xc] - sub r2, #0xc - bl sub_020128C4 - mov r6, #0 - add r5, r4, #0 - add r7, r6, #0 -_02249FC0: - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r0, #0 - beq _02249FD6 - mov r2, #0xb - ldr r0, [r0, #0] - add r1, r7, #0 - mvn r2, r2 - bl sub_0200D5AC -_02249FD6: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _02249FC0 - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r4, #0x98 - add sp, #0x10 - add r0, r0, #1 - strh r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_02249FEC: - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - bl ov17_02249B30 - cmp r0, #0 - beq _0224A032 - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x98 - strh r1, [r0] -_0224A006: - mov r1, #0x9a - ldrsh r0, [r4, r1] - add r2, r0, #1 - add r0, r4, #0 - add r0, #0x9a - strh r2, [r0] - ldrsh r0, [r4, r1] - cmp r0, #2 - ble _0224A032 - add r0, r4, #0 - mov r1, #0 - add r0, #0x9a - strh r1, [r0] - mov r0, #0x98 - ldrsh r0, [r4, r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x98 - strh r1, [r0] -_0224A02C: - add r0, r4, #0 - bl ov17_02249D80 -_0224A032: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_02249DA0 - - thumb_func_start ov17_0224A038 -ov17_0224A038: ; 0x0224A038 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - mov r0, #0x96 - ldrsb r1, [r1, r0] - mov r0, #0x24 - mov r4, #0 - ldr r2, _0224A080 ; =0x02254578 - mul r0, r1 - ldr r6, _0224A084 ; =0x0000FFFF - add r5, r2, r0 - add r7, r4, #0 -_0224A04E: - ldrh r0, [r5, #4] - cmp r0, r6 - bne _0224A062 - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r7, #0 - bl sub_02019120 - b _0224A06E -_0224A062: - add r0, r4, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r1, #1 - bl sub_02019120 -_0224A06E: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _0224A04E - ldr r0, [sp] - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224A080: .word 0x02254578 -_0224A084: .word 0x0000FFFF - thumb_func_end ov17_0224A038 - - thumb_func_start ov17_0224A088 -ov17_0224A088: ; 0x0224A088 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x94 - ldrh r2, [r0] - ldr r0, _0224A0C4 ; =0x0000FFFF - cmp r2, r0 - beq _0224A0BA - mov r0, #0 - lsl r2, r2, #2 - str r0, [sp] - ldr r0, [r4, #4] - add r2, r4, r2 - add r2, #0xd0 - mov r3, #6 - ldr r0, [r0, #0x60] - ldr r2, [r2, #0] - mov r1, #4 - lsl r3, r3, #0xc - bl sub_0201958C - ldr r0, _0224A0C4 ; =0x0000FFFF - add r4, #0x94 - strh r0, [r4] -_0224A0BA: - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_0224A0C4: .word 0x0000FFFF - thumb_func_end ov17_0224A088 - - thumb_func_start ov17_0224A0C8 -ov17_0224A0C8: ; 0x0224A0C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov17_02249B54 - mov r0, #0 - str r0, [r4, #0] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0224A0C8 - - thumb_func_start ov17_0224A0E0 -ov17_0224A0E0: ; 0x0224A0E0 - push {r3, lr} - sub sp, #8 - str r2, [sp] - str r1, [sp, #4] - ldr r0, [r0, #4] - mov r1, #1 - add r0, #0x90 - ldr r0, [r0, #0] - mov r2, #0 - mov r3, #0x40 - bl sub_020039B0 - add sp, #8 - pop {r3, pc} - thumb_func_end ov17_0224A0E0 - - thumb_func_start ov17_0224A0FC -ov17_0224A0FC: ; 0x0224A0FC - mov r1, #6 - mul r1, r0 - ldr r0, _0224A108 ; =0x022546F4 - ldrsh r0, [r0, r1] - bx lr - nop -_0224A108: .word 0x022546F4 - thumb_func_end ov17_0224A0FC - - thumb_func_start ov17_0224A10C -ov17_0224A10C: ; 0x0224A10C - mov r1, #6 - mul r1, r0 - ldr r0, _0224A11C ; =0x022546F4 - add r1, r0, r1 - mov r0, #2 - ldrsh r0, [r1, r0] - bx lr - nop -_0224A11C: .word 0x022546F4 - thumb_func_end ov17_0224A10C - - thumb_func_start ov17_0224A120 -ov17_0224A120: ; 0x0224A120 - mov r1, #6 - mul r1, r0 - ldr r0, _0224A130 ; =0x022546F4 - add r1, r0, r1 - mov r0, #4 - ldrsh r0, [r1, r0] - bx lr - nop -_0224A130: .word 0x022546F4 - thumb_func_end ov17_0224A120 - - thumb_func_start ov17_0224A134 -ov17_0224A134: ; 0x0224A134 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r4, #0 - b _0224A150 -_0224A13E: - lsl r0, r4, #4 - add r0, r5, r0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224A14E - bl sub_02022974 -_0224A14E: - add r4, r4, #1 -_0224A150: - cmp r4, #4 - blt _0224A13E - add r0, sp, #0 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - mov r0, #0x17 - str r0, [sp, #0xc] - mov r4, #0 - ldr r7, _0224A1E4 ; =0x022546F4 - b _0224A1DC -_0224A168: - ldr r0, _0224A1E8 ; =0x00000AF1 - add r1, r5, r4 - ldrb r6, [r1, r0] - ldr r1, [r5, #0] - lsl r0, r6, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_020765B8 - add r2, r0, #0 - mov r0, #6 - mul r0, r4 - ldrsh r1, [r7, r0] - add r0, r7, r0 - mov r3, #2 - ldrsh r3, [r0, r3] - str r1, [sp, #4] - add r2, r2, r3 - str r2, [sp, #8] - lsl r2, r6, #4 - add r2, r5, r2 - str r1, [r2, #0x1c] - ldr r1, [sp, #8] - str r1, [r2, #0x20] - mov r1, #4 - ldrsh r0, [r0, r1] - lsl r1, r6, #2 - str r0, [r2, #0x24] - ldr r2, [r5, #0] - add r0, sp, #0 - add r1, r2, r1 - add r1, #0xf8 - ldr r1, [r1, #0] - bl ov22_0225AFD4 - lsl r1, r6, #4 - add r2, r5, r1 - str r0, [r2, #0x18] - ldr r1, [r2, #0x1c] - ldr r2, [r2, #0x20] - bl ov22_0225B100 - cmp r4, #0 - ble _0224A1DA - lsl r0, r6, #4 - add r0, r5, r0 - ldr r0, [r0, #0x18] - mov r1, #0 - bl ov22_0225B07C - lsl r0, r6, #4 - add r0, r5, r0 - mov r1, #0x63 - ldr r0, [r0, #0x18] - mvn r1, r1 - bl ov22_0225B1AC -_0224A1DA: - add r4, r4, #1 -_0224A1DC: - cmp r4, #4 - blt _0224A168 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A1E4: .word 0x022546F4 -_0224A1E8: .word 0x00000AF1 - thumb_func_end ov17_0224A134 - - thumb_func_start ov17_0224A1EC -ov17_0224A1EC: ; 0x0224A1EC - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_0224A1F4: - ldr r0, [r5, #4] - bl ov22_0225B020 - add r0, r5, #0 - add r0, #0x98 - add r4, r4, #1 - add r5, #0x10 - str r6, [r0, #0] - cmp r4, #4 - blt _0224A1F4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_0224A1EC - - thumb_func_start ov17_0224A20C -ov17_0224A20C: ; 0x0224A20C - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224A20C - - thumb_func_start ov17_0224A210 -ov17_0224A210: ; 0x0224A210 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224A210 - - thumb_func_start ov17_0224A214 -ov17_0224A214: ; 0x0224A214 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - add r6, r1, #0 - str r2, [sp, #4] - add r0, r2, #0 - mov r1, #2 - bl ov17_0223F0BC - add r5, r0, #0 - ldr r0, [sp, #4] - mov r1, #3 - bl ov17_0223F0BC - mov r1, #0x20 - sub r2, r1, r5 - lsr r1, r2, #0x1f - add r1, r2, r1 - asr r7, r1, #1 - cmp r6, r0 - ble _0224A240 - add r6, r0, #0 -_0224A240: - asr r0, r6, #2 - lsr r0, r0, #0x1d - add r0, r6, r0 - asr r4, r0, #3 - lsr r2, r6, #0x1f - lsl r1, r6, #0x1d - sub r1, r1, r2 - mov r0, #0x1d - ror r1, r0 - add r0, r2, r1 - str r0, [sp, #8] - ldr r0, [sp] - mov r1, #3 - ldr r0, [r0, #0x60] - bl sub_02019FE4 - mov r1, #0x26 - lsl r1, r1, #4 - add r1, r7, r1 - lsl r1, r1, #1 - add r2, r0, r1 - ldr r0, [sp, #4] - cmp r0, #0 - bne _0224A306 - mov r1, #0 - ldr r0, _0224A34C ; =0x00002014 - mov r7, #0x1d - b _0224A29C -_0224A278: - lsr r6, r1, #0x1f - lsl r3, r1, #0x1d - sub r3, r3, r6 - ror r3, r7 - add r3, r6, r3 - bne _0224A28A - lsl r3, r1, #1 - strh r0, [r2, r3] - b _0224A29A -_0224A28A: - mov r3, #1 - tst r3, r1 - beq _0224A294 - ldr r6, _0224A350 ; =0x00002034 - b _0224A296 -_0224A294: - ldr r6, _0224A354 ; =0x00002054 -_0224A296: - lsl r3, r1, #1 - strh r6, [r2, r3] -_0224A29A: - add r1, r1, #1 -_0224A29C: - cmp r1, r4 - blt _0224A278 - cmp r1, r5 - bge _0224A2D4 - lsr r4, r1, #0x1f - lsl r3, r1, #0x1d - sub r3, r3, r4 - mov r0, #0x1d - ror r3, r0 - add r0, r4, r3 - bne _0224A2BE - ldr r3, _0224A358 ; =0x0000200C - ldr r0, [sp, #8] - add r3, r0, r3 - lsl r0, r1, #1 - strh r3, [r2, r0] - b _0224A2D2 -_0224A2BE: - mov r0, #1 - tst r0, r1 - beq _0224A2C8 - ldr r3, _0224A35C ; =0x0000202C - b _0224A2CA -_0224A2C8: - ldr r3, _0224A360 ; =0x0000204C -_0224A2CA: - ldr r0, [sp, #8] - add r3, r0, r3 - lsl r0, r1, #1 - strh r3, [r2, r0] -_0224A2D2: - add r1, r1, #1 -_0224A2D4: - ldr r0, _0224A358 ; =0x0000200C - mov r3, #0x1d - mov r7, #1 - b _0224A300 -_0224A2DC: - lsr r6, r1, #0x1f - lsl r4, r1, #0x1d - sub r4, r4, r6 - ror r4, r3 - add r4, r6, r4 - bne _0224A2EE - lsl r4, r1, #1 - strh r0, [r2, r4] - b _0224A2FE -_0224A2EE: - add r4, r1, #0 - tst r4, r7 - beq _0224A2F8 - ldr r6, _0224A35C ; =0x0000202C - b _0224A2FA -_0224A2F8: - ldr r6, _0224A360 ; =0x0000204C -_0224A2FA: - lsl r4, r1, #1 - strh r6, [r2, r4] -_0224A2FE: - add r1, r1, #1 -_0224A300: - cmp r1, r5 - blt _0224A2DC - b _0224A33C -_0224A306: - mov r1, #0 - ldr r0, _0224A364 ; =0x02254898 - b _0224A316 -_0224A30C: - lsl r3, r1, #1 - ldrh r6, [r0, r3] - add r1, r1, #1 - add r6, #8 - strh r6, [r2, r3] -_0224A316: - cmp r1, r4 - blt _0224A30C - cmp r1, r5 - bge _0224A32C - ldr r0, _0224A364 ; =0x02254898 - lsl r4, r1, #1 - ldrh r3, [r0, r4] - ldr r0, [sp, #8] - add r1, r1, #1 - add r0, r0, r3 - strh r0, [r2, r4] -_0224A32C: - ldr r3, _0224A364 ; =0x02254898 - b _0224A338 -_0224A330: - lsl r4, r1, #1 - ldrh r0, [r3, r4] - add r1, r1, #1 - strh r0, [r2, r4] -_0224A338: - cmp r1, r5 - blt _0224A330 -_0224A33C: - ldr r0, [sp] - mov r1, #3 - ldr r0, [r0, #0x60] - bl sub_0201C3C0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224A34C: .word 0x00002014 -_0224A350: .word 0x00002034 -_0224A354: .word 0x00002054 -_0224A358: .word 0x0000200C -_0224A35C: .word 0x0000202C -_0224A360: .word 0x0000204C -_0224A364: .word 0x02254898 - thumb_func_end ov17_0224A214 - - thumb_func_start ov17_0224A368 -ov17_0224A368: ; 0x0224A368 - push {r3, r4, r5, r6, r7, lr} - add r7, r3, #0 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r0, r7, #0 - mov r1, #3 - bl ov17_0223F0BC - mul r0, r4 - add r1, r6, #0 - bl sub_020E1F6C - add r1, r0, #0 - add r0, r5, #0 - add r2, r7, #0 - bl ov17_0224A214 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224A368 - - thumb_func_start ov17_0224A390 -ov17_0224A390: ; 0x0224A390 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224A418 ; =0x000080EB - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x3a - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0224A41C ; =0x000080EC - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x3b - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0224A420 ; =0x000080ED - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x3c - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0224A424 ; =0x000080EE - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x3d - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224A418 ; =0x000080EB - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x3e - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224A418 ; =0x000080EB - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x3f - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224A418: .word 0x000080EB -_0224A41C: .word 0x000080EC -_0224A420: .word 0x000080ED -_0224A424: .word 0x000080EE - thumb_func_end ov17_0224A390 - - thumb_func_start ov17_0224A428 -ov17_0224A428: ; 0x0224A428 - push {r4, lr} - ldr r1, _0224A45C ; =0x000080EB - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224A460 ; =0x000080EC - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0224A464 ; =0x000080ED - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0224A468 ; =0x000080EE - add r0, r4, #0 - bl sub_0200D070 - ldr r1, _0224A45C ; =0x000080EB - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224A45C ; =0x000080EB - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224A45C: .word 0x000080EB -_0224A460: .word 0x000080EC -_0224A464: .word 0x000080ED -_0224A468: .word 0x000080EE - thumb_func_end ov17_0224A428 - - thumb_func_start ov17_0224A46C -ov17_0224A46C: ; 0x0224A46C - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - ldr r4, _0224A56C ; =0x02254760 - add r7, r2, #0 - add r6, r3, #0 - add r5, r0, #0 - mov ip, r1 - add r3, sp, #0 - mov r2, #6 -_0224A47E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224A47E - ldr r0, [r4, #0] - cmp r6, #2 - str r0, [r3, #0] - bne _0224A496 - ldr r0, [sp, #8] - add r0, #0xa - str r0, [sp, #8] - b _0224A4C6 -_0224A496: - ldr r0, [sp, #0x54] - cmp r0, #3 - bhi _0224A4C6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224A4A8: ; jump table - .short _0224A4C6 - _0224A4A8 - 2 ; case 0 - .short _0224A4B0 - _0224A4A8 - 2 ; case 1 - .short _0224A4B8 - _0224A4A8 - 2 ; case 2 - .short _0224A4C0 - _0224A4A8 - 2 ; case 3 -_0224A4B0: - ldr r0, [sp, #8] - add r0, r0, #3 - str r0, [sp, #8] - b _0224A4C6 -_0224A4B8: - ldr r0, [sp, #8] - add r0, r0, #2 - str r0, [sp, #8] - b _0224A4C6 -_0224A4C0: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_0224A4C6: - ldr r0, [sp, #0x48] - cmp r0, #4 - bhi _0224A500 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224A4D8: ; jump table - .short _0224A500 - _0224A4D8 - 2 ; case 0 - .short _0224A4F6 - _0224A4D8 - 2 ; case 1 - .short _0224A500 - _0224A4D8 - 2 ; case 2 - .short _0224A4E2 - _0224A4D8 - 2 ; case 3 - .short _0224A4EC - _0224A4D8 - 2 ; case 4 -_0224A4E2: - ldr r0, _0224A570 ; =0x000080EC - str r0, [sp, #0x14] - mov r0, #2 - str r0, [sp, #0xc] - b _0224A508 -_0224A4EC: - ldr r0, _0224A574 ; =0x000080EE - str r0, [sp, #0x14] - mov r0, #6 - str r0, [sp, #0xc] - b _0224A508 -_0224A4F6: - ldr r0, _0224A578 ; =0x000080ED - str r0, [sp, #0x14] - mov r0, #7 - str r0, [sp, #0xc] - b _0224A508 -_0224A500: - ldr r0, _0224A57C ; =0x000080EB - str r0, [sp, #0x14] - mov r0, #2 - str r0, [sp, #0xc] -_0224A508: - mov r0, ip - add r1, r7, #0 - add r2, sp, #0 - bl sub_0200CE6C - add r4, r0, #0 - add r1, r6, #0 - bl sub_0200D364 - ldr r0, [r4, #0] - bl sub_0200D324 - ldr r1, [sp, #0x4c] - ldr r2, [sp, #0x50] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - mov r3, #1 - add r0, r4, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - add r0, r4, #0 - mov r1, #1 - bl sub_0200D390 - mov r0, #0 - add r2, r5, #0 -_0224A542: - add r1, r2, #0 - add r1, #0xd8 - ldr r1, [r1, #0] - cmp r1, #0 - bne _0224A558 - lsl r1, r0, #2 - add r1, r5, r1 - add r1, #0xd8 - add sp, #0x34 - str r4, [r1, #0] - pop {r4, r5, r6, r7, pc} -_0224A558: - add r0, r0, #1 - add r2, r2, #4 - cmp r0, #0x44 - blt _0224A542 - bl sub_02022974 - mov r0, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0224A56C: .word 0x02254760 -_0224A570: .word 0x000080EC -_0224A574: .word 0x000080EE -_0224A578: .word 0x000080ED -_0224A57C: .word 0x000080EB - thumb_func_end ov17_0224A46C - - thumb_func_start ov17_0224A580 -ov17_0224A580: ; 0x0224A580 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_0224A588: - add r0, r5, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224A59C - bl sub_0200D0F4 - add r0, r5, #0 - add r0, #0xd8 - str r6, [r0, #0] -_0224A59C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x44 - blt _0224A588 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_0224A580 - - thumb_func_start ov17_0224A5A8 -ov17_0224A5A8: ; 0x0224A5A8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224A5F0 ; =0x000080EF - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x37 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224A5F4 ; =0x000080EC - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x38 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224A5F4 ; =0x000080EC - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x39 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224A5F0: .word 0x000080EF -_0224A5F4: .word 0x000080EC - thumb_func_end ov17_0224A5A8 - - thumb_func_start ov17_0224A5F8 -ov17_0224A5F8: ; 0x0224A5F8 - push {r4, lr} - ldr r1, _0224A614 ; =0x000080EF - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224A618 ; =0x000080EC - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224A618 ; =0x000080EC - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224A614: .word 0x000080EF -_0224A618: .word 0x000080EC - thumb_func_end ov17_0224A5F8 - - thumb_func_start ov17_0224A61C -ov17_0224A61C: ; 0x0224A61C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - mov r4, #0 -_0224A626: - ldr r2, _0224A648 ; =0x02254794 - add r0, r6, #0 - add r1, r7, #0 - bl sub_0200CE6C - ldr r1, _0224A64C ; =0x000009F8 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _0224A626 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A648: .word 0x02254794 -_0224A64C: .word 0x000009F8 - thumb_func_end ov17_0224A61C - - thumb_func_start ov17_0224A650 -ov17_0224A650: ; 0x0224A650 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r7, _0224A670 ; =0x000009F8 - add r5, r0, #0 - add r6, r4, #0 -_0224A65A: - ldr r0, _0224A670 ; =0x000009F8 - ldr r0, [r5, r0] - bl sub_0200D0F4 - str r6, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _0224A65A - pop {r3, r4, r5, r6, r7, pc} - nop -_0224A670: .word 0x000009F8 - thumb_func_end ov17_0224A650 - - thumb_func_start ov17_0224A674 -ov17_0224A674: ; 0x0224A674 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r5, r0, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #5 - bl sub_0200B1EC - str r0, [sp, #0x38] - add r0, r5, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #6 - bl sub_0200B1EC - str r0, [sp, #0x34] - add r0, r5, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #7 - bl sub_0200B1EC - str r0, [sp, #0x30] - mov r0, #0 - ldr r1, _0224A7A8 ; =0x00000A04 - str r0, [sp, #0x3c] - add r0, r5, r1 - str r0, [sp, #0x2c] - add r0, r1, #0 - add r0, #0x3c - add r1, #0x78 - add r4, r5, #0 - add r7, r5, r0 - add r6, r5, r1 -_0224A6B8: - ldr r0, [sp, #0x2c] - add r3, r5, #0 - str r0, [sp] - ldr r0, [sp, #0x38] - add r3, #0x94 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, _0224A7AC ; =0x000B0C00 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _0224A7B0 ; =0x000080E9 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x20] - str r0, [sp, #0x24] - mov r0, #0xc - str r0, [sp, #0x28] - ldr r1, [r5, #0x60] - ldr r2, [r5, #0x5c] - ldr r3, [r3, #0] - mov r0, #0x17 - bl ov17_0223F1E8 - ldr r0, _0224A7A8 ; =0x00000A04 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_020129D0 - add r3, r5, #0 - ldr r0, [sp, #0x34] - str r7, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, _0224A7AC ; =0x000B0C00 - add r3, #0x94 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _0224A7B0 ; =0x000080E9 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x20] - str r0, [sp, #0x24] - mov r0, #0xc - str r0, [sp, #0x28] - ldr r1, [r5, #0x60] - ldr r2, [r5, #0x5c] - ldr r3, [r3, #0] - mov r0, #0x17 - bl ov17_0223F1E8 - mov r0, #0x29 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_020129D0 - add r3, r5, #0 - ldr r0, [sp, #0x30] - str r6, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, _0224A7AC ; =0x000B0C00 - add r3, #0x94 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _0224A7B0 ; =0x000080E9 - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x20] - str r0, [sp, #0x24] - mov r0, #0xc - str r0, [sp, #0x28] - ldr r1, [r5, #0x60] - ldr r2, [r5, #0x5c] - ldr r3, [r3, #0] - mov r0, #0x17 - bl ov17_0223F1E8 - ldr r0, _0224A7B4 ; =0x00000A7C - mov r1, #0 - ldr r0, [r4, r0] - bl sub_020129D0 - ldr r0, [sp, #0x2c] - add r4, #0x14 - add r0, #0x14 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x3c] - add r7, #0x14 - add r0, r0, #1 - add r6, #0x14 - str r0, [sp, #0x3c] - cmp r0, #3 - blt _0224A6B8 - ldr r0, [sp, #0x38] - bl sub_020237BC - ldr r0, [sp, #0x34] - bl sub_020237BC - ldr r0, [sp, #0x30] - bl sub_020237BC - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A7A8: .word 0x00000A04 -_0224A7AC: .word 0x000B0C00 -_0224A7B0: .word 0x000080E9 -_0224A7B4: .word 0x00000A7C - thumb_func_end ov17_0224A674 - - thumb_func_start ov17_0224A7B8 -ov17_0224A7B8: ; 0x0224A7B8 - push {r3, r4, r5, r6, r7, lr} - ldr r1, _0224A7DC ; =0x00000A04 - mov r7, #0 - add r6, r0, r1 -_0224A7C0: - mov r4, #0 - add r5, r6, #0 -_0224A7C4: - add r0, r5, #0 - bl ov17_0223F2E4 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _0224A7C4 - add r7, r7, #1 - add r6, #0x3c - cmp r7, #3 - blt _0224A7C0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A7DC: .word 0x00000A04 - thumb_func_end ov17_0224A7B8 - - thumb_func_start ov17_0224A7E0 -ov17_0224A7E0: ; 0x0224A7E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - str r3, [sp] - cmp r4, #0 - bne _0224A7F2 - str r4, [sp, #4] - b _0224A7F6 -_0224A7F2: - sub r0, r4, #1 - str r0, [sp, #4] -_0224A7F6: - ldr r0, _0224A8BC ; =0x000009BC - mov r1, #0x14 - add r2, r5, r0 - ldr r0, [sp, #4] - mul r1, r0 - add r6, r2, r1 - ldr r0, [r6, #8] - cmp r0, #0 - beq _0224A80C - bl sub_0200DA58 -_0224A80C: - add r0, r6, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - ldr r1, _0224A8C0 ; =0x022546CC - lsl r2, r4, #2 - ldrsh r0, [r1, r2] - add r1, r1, r2 - str r0, [sp, #0xc] - mov r0, #2 - ldrsh r0, [r1, r0] - str r0, [sp, #8] - ldr r0, [sp, #4] - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0224A8C4 ; =0x000009F8 - ldr r0, [r1, r0] - ldr r1, [sp] - str r0, [r6, #0] - bl sub_0200D364 - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - mov r3, #1 - ldr r0, [r6, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - ldr r0, [r6, #0] - ldr r0, [r0, #0] - bl sub_0200D324 - ldr r0, [r6, #0] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [sp, #4] - mov r1, #0x14 - add r7, r0, #0 - mov r4, #0 - mul r7, r1 - b _0224A87E -_0224A86A: - mov r0, #0x3c - mul r0, r4 - add r0, r5, r0 - add r1, r0, r7 - ldr r0, _0224A8C8 ; =0x00000A04 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_020129D0 - add r4, r4, #1 -_0224A87E: - cmp r4, #3 - blt _0224A86A - ldr r0, _0224A8C8 ; =0x00000A04 - mov r1, #0x3c - add r2, r5, r0 - ldr r0, [sp] - mov r3, #1 - mul r1, r0 - add r2, r2, r1 - ldr r0, [sp, #4] - mov r1, #0x14 - mul r1, r0 - add r0, r2, r1 - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - str r0, [r6, #4] - bl ov17_0223F2F8 - ldr r0, [r6, #4] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_020129D0 - ldr r0, _0224A8CC ; =ov17_0224A8D4 - ldr r2, _0224A8D0 ; =0x00009D08 - add r1, r6, #0 - bl sub_0200D9E8 - str r0, [r6, #8] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A8BC: .word 0x000009BC -_0224A8C0: .word 0x022546CC -_0224A8C4: .word 0x000009F8 -_0224A8C8: .word 0x00000A04 -_0224A8CC: .word ov17_0224A8D4 -_0224A8D0: .word 0x00009D08 - thumb_func_end ov17_0224A7E0 - - thumb_func_start ov17_0224A8D4 -ov17_0224A8D4: ; 0x0224A8D4 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _0224A8E8 - cmp r0, #1 - beq _0224A926 - b _0224A93A -_0224A8E8: - ldr r0, [r4, #4] - add r1, sp, #4 - ldr r0, [r0, #0] - add r2, sp, #0 - bl sub_020129A4 - ldr r0, [sp] - ldr r1, [sp, #4] - sub r2, r0, #4 - str r2, [sp] - ldr r0, [r4, #4] - ldr r0, [r0, #0] - bl sub_020128C4 - mov r1, #0 - ldr r0, [r4, #0] - sub r2, r1, #4 - bl sub_0200D5DC - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #4 - ble _0224A956 - mov r0, #0 - str r0, [r4, #0xc] - ldrb r0, [r4, #0x10] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224A926: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0xe - ble _0224A956 - ldrb r0, [r4, #0x10] - add sp, #8 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224A93A: - ldr r0, [r4, #4] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0 - str r0, [r4, #8] - add r0, r5, #0 - bl sub_0200DA58 -_0224A956: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0224A8D4 - - thumb_func_start ov17_0224A95C -ov17_0224A95C: ; 0x0224A95C - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r7, _0224A980 ; =0x000009C4 - add r5, r0, #0 - add r6, r4, #0 -_0224A966: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0224A974 - bl sub_0200DA58 - ldr r0, _0224A980 ; =0x000009C4 - str r6, [r5, r0] -_0224A974: - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _0224A966 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224A980: .word 0x000009C4 - thumb_func_end ov17_0224A95C - - thumb_func_start ov17_0224A984 -ov17_0224A984: ; 0x0224A984 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224A9CC ; =0x000080F0 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x40 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224A9D0 ; =0x000080ED - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x41 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224A9D0 ; =0x000080ED - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x42 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224A9CC: .word 0x000080F0 -_0224A9D0: .word 0x000080ED - thumb_func_end ov17_0224A984 - - thumb_func_start ov17_0224A9D4 -ov17_0224A9D4: ; 0x0224A9D4 - push {r4, lr} - ldr r1, _0224A9F0 ; =0x000080F0 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224A9F4 ; =0x000080ED - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224A9F4 ; =0x000080ED - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224A9F0: .word 0x000080F0 -_0224A9F4: .word 0x000080ED - thumb_func_end ov17_0224A9D4 - - thumb_func_start ov17_0224A9F8 -ov17_0224A9F8: ; 0x0224A9F8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - ldr r2, _0224AA18 ; =0x022547C8 - bl sub_0200CE6C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0200D324 - mov r0, #0x7a - lsl r0, r0, #2 - str r4, [r5, r0] - pop {r3, r4, r5, pc} - nop -_0224AA18: .word 0x022547C8 - thumb_func_end ov17_0224A9F8 - - thumb_func_start ov17_0224AA1C -ov17_0224AA1C: ; 0x0224AA1C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224AA36 - bl sub_0200D0F4 - mov r0, #0x7a - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_0224AA36: - pop {r4, pc} - thumb_func_end ov17_0224AA1C - - thumb_func_start ov17_0224AA38 -ov17_0224AA38: ; 0x0224AA38 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224AA50 ; =ov17_0224AA68 - ldr r2, _0224AA54 ; =0x00009CAE - add r1, r4, #0 - bl sub_0200D9E8 - mov r1, #2 - lsl r1, r1, #8 - str r0, [r4, r1] - pop {r4, pc} - nop -_0224AA50: .word ov17_0224AA68 -_0224AA54: .word 0x00009CAE - thumb_func_end ov17_0224AA38 - - thumb_func_start ov17_0224AA58 -ov17_0224AA58: ; 0x0224AA58 - mov r1, #2 - lsl r1, r1, #8 - ldr r3, _0224AA64 ; =sub_0200DA58 - ldr r0, [r0, r1] - bx r3 - nop -_0224AA64: .word sub_0200DA58 - thumb_func_end ov17_0224AA58 - - thumb_func_start ov17_0224AA68 -ov17_0224AA68: ; 0x0224AA68 - push {r3, lr} - ldr r2, [r1, #0] - ldr r0, _0224AA90 ; =0x00000123 - mov r3, #1 - ldrb r2, [r2, r0] - add r0, #0xd9 - ldr r0, [r1, r0] - lsl r2, r2, #4 - add r2, r1, r2 - ldr r1, [r2, #0x1c] - ldr r2, [r2, #0x20] - lsl r1, r1, #0x10 - sub r2, #0x28 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - pop {r3, pc} - ; .align 2, 0 -_0224AA90: .word 0x00000123 - thumb_func_end ov17_0224AA68 - - thumb_func_start ov17_0224AA94 -ov17_0224AA94: ; 0x0224AA94 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224AADC ; =0x000080F2 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x5a - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224AAE0 ; =0x000080EF - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x59 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224AAE0 ; =0x000080EF - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x58 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224AADC: .word 0x000080F2 -_0224AAE0: .word 0x000080EF - thumb_func_end ov17_0224AA94 - - thumb_func_start ov17_0224AAE4 -ov17_0224AAE4: ; 0x0224AAE4 - push {r4, lr} - ldr r1, _0224AB00 ; =0x000080F2 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224AB04 ; =0x000080EF - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224AB04 ; =0x000080EF - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224AB00: .word 0x000080F2 -_0224AB04: .word 0x000080EF - thumb_func_end ov17_0224AAE4 - - thumb_func_start ov17_0224AB08 -ov17_0224AB08: ; 0x0224AB08 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - mov r0, #0 - str r1, [sp, #4] - str r0, [sp, #0xc] - ldr r4, [sp] - mov r1, #2 - add r0, r4, #0 - lsl r1, r1, #8 - ldr r6, [sp, #0xc] - str r2, [sp, #8] - add r7, r0, #4 - add r5, r0, r1 -_0224AB24: - ldr r0, [sp, #4] - ldr r1, [sp, #8] - ldr r2, _0224ABA0 ; =0x02254830 - bl sub_0200CE6C - mov r1, #0x81 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl sub_0200D324 - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D6A4 - ldr r1, [sp, #0xc] - ldr r0, _0224ABA4 ; =0x00000213 - strb r1, [r4, r0] - sub r0, r0, #7 - str r7, [r4, r0] - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, r6] - bl sub_020765B8 - mov r1, #0x85 - lsl r1, r1, #2 - strb r0, [r4, r1] - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - bl ov17_0224AC78 - ldr r0, _0224ABA8 ; =ov17_0224ABFC - ldr r2, _0224ABAC ; =0x0000A08C - add r1, r5, #0 - bl sub_0200D9E8 - mov r1, #2 - lsl r1, r1, #8 - str r0, [r4, r1] - ldr r0, [sp, #0xc] - add r4, #0x18 - add r0, r0, #1 - add r7, #0x10 - add r6, r6, #4 - add r5, #0x18 - str r0, [sp, #0xc] - cmp r0, #4 - blt _0224AB24 - ldr r0, [sp] - mov r1, #0 - bl ov17_0224ABDC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224ABA0: .word 0x02254830 -_0224ABA4: .word 0x00000213 -_0224ABA8: .word ov17_0224ABFC -_0224ABAC: .word 0x0000A08C - thumb_func_end ov17_0224AB08 - - thumb_func_start ov17_0224ABB0 -ov17_0224ABB0: ; 0x0224ABB0 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - mov r7, #0x81 - add r5, r0, #0 - add r6, r4, #0 - lsl r7, r7, #2 -_0224ABBC: - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D0F4 - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r5, r0] - bl sub_0200DA58 - str r6, [r5, r7] - add r4, r4, #1 - add r5, #0x18 - cmp r4, #4 - blt _0224ABBC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_0224ABB0 - - thumb_func_start ov17_0224ABDC -ov17_0224ABDC: ; 0x0224ABDC - push {r3, r4, r5, r6, r7, lr} - mov r7, #0x81 - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - lsl r7, r7, #2 -_0224ABE8: - ldr r0, [r5, r7] - add r1, r6, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, #0x18 - cmp r4, #4 - blt _0224ABE8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224ABDC - - thumb_func_start ov17_0224ABFC -ov17_0224ABFC: ; 0x0224ABFC - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r0, [r5, #0xc] - ldr r6, [r0, #4] - ldr r4, [r0, #8] - ldr r0, [r0, #0xc] - bl ov17_0224B06C - mov r1, #0x14 - ldrsb r2, [r5, r1] - mov r1, #0x28 - sub r2, r1, r2 - add r1, r2, #0 - mul r1, r0 - asr r2, r1, #7 - lsr r2, r2, #0x18 - add r2, r1, r2 - asr r1, r2, #8 - add r4, r4, r1 - mov r1, #0x64 - mul r1, r0 - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r0, r0, #8 - bl sub_020E17B4 - ldr r1, _0224AC74 ; =0x42C80000 - bl sub_020E1304 - add r7, r0, #0 - ldrb r0, [r5, #0x12] - cmp r0, #0 - bne _0224AC56 - add r1, sp, #0 - mov r3, #1 - ldr r0, [r5, #4] - add r1, #2 - add r2, sp, #0 - lsl r3, r3, #0x14 - bl sub_0200D5A0 - add r1, sp, #0 - mov r0, #0 - ldrsh r4, [r1, r0] -_0224AC56: - lsl r1, r6, #0x10 - lsl r2, r4, #0x10 - mov r3, #1 - ldr r0, [r5, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - ldr r0, [r5, #4] - add r1, r7, #0 - add r2, r7, #0 - bl sub_0200D6E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224AC74: .word 0x42C80000 - thumb_func_end ov17_0224ABFC - - thumb_func_start ov17_0224AC78 -ov17_0224AC78: ; 0x0224AC78 - strb r1, [r0, #0x11] - strb r2, [r0, #0x12] - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224AC78 - - thumb_func_start ov17_0224AC80 -ov17_0224AC80: ; 0x0224AC80 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224ACC8 ; =0x000080F3 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x5d - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224ACCC ; =0x000080F0 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x5c - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224ACCC ; =0x000080F0 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x5b - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224ACC8: .word 0x000080F3 -_0224ACCC: .word 0x000080F0 - thumb_func_end ov17_0224AC80 - - thumb_func_start ov17_0224ACD0 -ov17_0224ACD0: ; 0x0224ACD0 - push {r4, lr} - ldr r1, _0224ACEC ; =0x000080F3 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224ACF0 ; =0x000080F0 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224ACF0 ; =0x000080F0 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224ACEC: .word 0x000080F3 -_0224ACF0: .word 0x000080F0 - thumb_func_end ov17_0224ACD0 - - thumb_func_start ov17_0224ACF4 -ov17_0224ACF4: ; 0x0224ACF4 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224ACF4 - - thumb_func_start ov17_0224ACF8 -ov17_0224ACF8: ; 0x0224ACF8 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224ACF8 - - thumb_func_start ov17_0224ACFC -ov17_0224ACFC: ; 0x0224ACFC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224AD44 ; =0x000080F4 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x60 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224AD48 ; =0x000080F1 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x5f - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224AD48 ; =0x000080F1 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x5e - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224AD44: .word 0x000080F4 -_0224AD48: .word 0x000080F1 - thumb_func_end ov17_0224ACFC - - thumb_func_start ov17_0224AD4C -ov17_0224AD4C: ; 0x0224AD4C - push {r4, lr} - ldr r1, _0224AD68 ; =0x000080F4 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224AD6C ; =0x000080F1 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224AD6C ; =0x000080F1 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224AD68: .word 0x000080F4 -_0224AD6C: .word 0x000080F1 - thumb_func_end ov17_0224AD4C - - thumb_func_start ov17_0224AD70 -ov17_0224AD70: ; 0x0224AD70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0xad - lsl r0, r0, #2 - add r7, r1, #0 - add r1, r5, r0 - sub r0, #0xf4 - mul r0, r7 - add r4, r1, r0 - str r2, [sp] - mov r1, #0 -_0224AD88: - ldr r0, [r4, #0] - cmp r0, #0 - beq _0224AD96 - add r1, r1, #1 - add r4, #0x1c - cmp r1, #0x10 - blt _0224AD88 -_0224AD96: - cmp r1, #0x10 - bne _0224ADA0 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224ADA0: - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - ldr r2, _0224AE6C ; =0x02254864 - bl sub_0200CE6C - add r6, r0, #0 - bne _0224ADB4 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224ADB4: - lsl r1, r7, #4 - add r2, r5, r1 - ldr r1, [r2, #0x1c] - ldr r7, [r2, #0x20] - str r1, [sp, #4] - ldr r1, [sp] - bl sub_0200D364 - ldr r1, [sp, #4] - lsl r2, r7, #0x10 - lsl r1, r1, #0x10 - mov r3, #1 - add r0, r6, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - ldr r0, [r6, #0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r6, #0] - bl sub_0200D324 - ldr r0, [r5, #0] - bl sub_02094E98 - ldr r2, _0224AE70 ; =0x04000280 - mov r1, #0 - strh r1, [r2] - str r0, [r2, #0x10] - mov r0, #5 - lsl r0, r0, #8 - add r2, #0x18 - str r0, [r2, #0] - str r1, [r2, #4] - add r0, r4, #0 - mov r2, #0x1c - bl sub_020C4CF4 - ldr r0, [sp, #4] - str r6, [r4, #4] - lsl r0, r0, #8 - str r0, [r4, #8] - lsl r0, r7, #8 - ldr r2, _0224AE70 ; =0x04000280 - str r0, [r4, #0xc] - lsr r0, r2, #0xb -_0224AE16: - ldrh r1, [r2] - tst r1, r0 - bne _0224AE16 - ldr r0, _0224AE74 ; =0x040002A8 - ldr r1, [r0, #0] - mov r0, #1 - str r1, [r4, #0x10] - tst r0, r1 - beq _0224AE2C - neg r0, r1 - str r0, [r4, #0x10] -_0224AE2C: - ldr r0, [r5, #0] - bl sub_02094E98 - ldr r2, _0224AE78 ; =0x04000290 - mov r1, #0xf - str r0, [r2, #0] - lsl r1, r1, #8 - add r2, #8 - mov r0, #0 - str r1, [r2, #0] - str r0, [r2, #4] - ldr r2, _0224AE70 ; =0x04000280 - lsr r0, r2, #0xb -_0224AE46: - ldrh r1, [r2] - tst r1, r0 - bne _0224AE46 - ldr r0, _0224AE74 ; =0x040002A8 - ldr r2, _0224AE7C ; =0x00009C40 - ldr r1, [r0, #0] - lsr r0, r0, #0x10 - add r0, r1, r0 - neg r0, r0 - str r0, [r4, #0x14] - ldr r0, _0224AE80 ; =ov17_0224AE84 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0] - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224AE6C: .word 0x02254864 -_0224AE70: .word 0x04000280 -_0224AE74: .word 0x040002A8 -_0224AE78: .word 0x04000290 -_0224AE7C: .word 0x00009C40 -_0224AE80: .word ov17_0224AE84 - thumb_func_end ov17_0224AD70 - - thumb_func_start ov17_0224AE84 -ov17_0224AE84: ; 0x0224AE84 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - add r0, r1, r0 - str r0, [r4, #8] - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0xc] - mov r0, #2 - ldr r1, [r4, #0x14] - lsl r0, r0, #8 - add r0, r1, r0 - str r0, [r4, #0x14] - ldrh r0, [r4, #0x18] - add r0, r0, #1 - strh r0, [r4, #0x18] - ldrh r0, [r4, #0x18] - cmp r0, #0xa - bhi _0224AECA - mov r0, #0x11 - ldr r1, [r4, #8] - lsl r0, r0, #0xc - cmp r1, r0 - bgt _0224AECA - ldr r0, _0224AF30 ; =0xFFFEF000 - cmp r1, r0 - blt _0224AECA - mov r0, #0xd - ldr r2, [r4, #0xc] - lsl r0, r0, #0xc - cmp r2, r0 - ble _0224AEDE -_0224AECA: - ldr r0, [r4, #4] - bl sub_0200D0F4 - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_0224AEDE: - ldr r0, _0224AF34 ; =0x04000280 - mov r3, #0 - strh r3, [r0] - str r1, [r0, #0x10] - add r1, r0, #0 - lsr r2, r0, #0x12 - add r1, #0x18 - str r2, [r1, #0] - str r3, [r1, #4] - lsr r1, r0, #0xb -_0224AEF2: - ldrh r2, [r0] - tst r2, r1 - bne _0224AEF2 - ldr r3, _0224AF38 ; =0x040002A0 - ldr r2, [r4, #0xc] - add r0, r3, #0 - ldr r1, [r3, #0] - sub r0, #0x10 - str r2, [r0, #0] - lsr r2, r3, #0x12 - sub r3, #8 - mov r0, #0 - str r2, [r3, #0] - str r0, [r3, #4] - ldr r3, _0224AF34 ; =0x04000280 - lsr r0, r3, #0xb -_0224AF12: - ldrh r2, [r3] - tst r2, r0 - bne _0224AF12 - ldr r2, _0224AF38 ; =0x040002A0 - lsl r1, r1, #0x10 - ldr r2, [r2, #0] - mov r3, #1 - lsl r2, r2, #0x10 - ldr r0, [r4, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224AF30: .word 0xFFFEF000 -_0224AF34: .word 0x04000280 -_0224AF38: .word 0x040002A0 - thumb_func_end ov17_0224AE84 - - thumb_func_start ov17_0224AF3C -ov17_0224AF3C: ; 0x0224AF3C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - cmp r2, #2 - beq _0224AF98 - add r0, r1, #0 - lsl r0, r0, #1 - add r1, r7, r0 - ldr r0, _0224AF9C ; =0x00000AF6 - ldrsh r0, [r1, r0] - cmp r0, #0 - beq _0224AF98 - ldr r1, _0224AFA0 ; =0x04000280 - mov r6, #0 - strh r6, [r1] - str r0, [r1, #0x10] - mov r0, #2 - add r1, #0x18 - str r0, [r1, #0] - str r6, [r1, #4] - cmp r3, #0 - beq _0224AF6A - mov r6, #1 -_0224AF6A: - ldr r2, _0224AFA0 ; =0x04000280 - lsr r0, r2, #0xb -_0224AF6E: - ldrh r1, [r2] - tst r1, r0 - bne _0224AF6E - ldr r0, _0224AFA4 ; =0x040002A0 - ldr r5, [r0, #0] - cmp r5, #0x10 - ble _0224AF7E - mov r5, #0x10 -_0224AF7E: - mov r4, #0 - cmp r5, #0 - ble _0224AF98 -_0224AF84: - ldr r1, [sp] - add r0, r7, #0 - add r2, r6, #0 - bl ov17_0224AD70 - cmp r0, #0 - beq _0224AF98 - add r4, r4, #1 - cmp r4, r5 - blt _0224AF84 -_0224AF98: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224AF9C: .word 0x00000AF6 -_0224AFA0: .word 0x04000280 -_0224AFA4: .word 0x040002A0 - thumb_func_end ov17_0224AF3C - - thumb_func_start ov17_0224AFA8 -ov17_0224AFA8: ; 0x0224AFA8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224AFF0 ; =0x000080F5 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x63 - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224AFF4 ; =0x000080F2 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x62 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224AFF4 ; =0x000080F2 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x61 - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224AFF0: .word 0x000080F5 -_0224AFF4: .word 0x000080F2 - thumb_func_end ov17_0224AFA8 - - thumb_func_start ov17_0224AFF8 -ov17_0224AFF8: ; 0x0224AFF8 - push {r4, lr} - ldr r1, _0224B014 ; =0x000080F5 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224B018 ; =0x000080F2 - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224B018 ; =0x000080F2 - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224B014: .word 0x000080F5 -_0224B018: .word 0x000080F2 - thumb_func_end ov17_0224AFF8 - - thumb_func_start ov17_0224B01C -ov17_0224B01C: ; 0x0224B01C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - ldr r2, _0224B050 ; =0x0225472C - bl sub_0200CE6C - mov r1, #0 - mov r3, #1 - add r4, r0, #0 - mvn r1, r1 - mov r2, #0xb0 - lsl r3, r3, #0x14 - bl sub_0200D500 - ldr r0, [r4, #0] - bl sub_0200D324 - add r0, r4, #0 - mov r1, #0 - bl sub_0200D3F4 - ldr r0, _0224B054 ; =0x000009B8 - str r4, [r5, r0] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B050: .word 0x0225472C -_0224B054: .word 0x000009B8 - thumb_func_end ov17_0224B01C - - thumb_func_start ov17_0224B058 -ov17_0224B058: ; 0x0224B058 - ldr r1, _0224B060 ; =0x000009B8 - ldr r3, _0224B064 ; =sub_0200D0F4 - ldr r0, [r0, r1] - bx r3 - ; .align 2, 0 -_0224B060: .word 0x000009B8 -_0224B064: .word sub_0200D0F4 - thumb_func_end ov17_0224B058 - - thumb_func_start ov17_0224B068 -ov17_0224B068: ; 0x0224B068 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224B068 - - thumb_func_start ov17_0224B06C -ov17_0224B06C: ; 0x0224B06C - ldr r1, _0224B098 ; =0xFFFFFD80 - cmp r0, r1 - bne _0224B076 - mov r0, #0xc0 - bx lr -_0224B076: - add r1, #0x80 - cmp r0, r1 - bne _0224B082 - mov r0, #1 - lsl r0, r0, #8 - bx lr -_0224B082: - mov r1, #0xa - lsl r1, r1, #6 - add r0, r0, r1 - lsl r1, r0, #6 - asr r0, r1, #6 - lsr r0, r0, #0x19 - add r0, r1, r0 - asr r0, r0, #7 - add r0, #0xc0 - bx lr - nop -_0224B098: .word 0xFFFFFD80 - thumb_func_end ov17_0224B06C - - thumb_func_start ov17_0224B09C -ov17_0224B09C: ; 0x0224B09C - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0xc] - bl ov17_0224B06C - mov r1, #1 - lsl r1, r1, #8 - cmp r0, r1 - bne _0224B0B2 - lsl r1, r1, #4 - b _0224B0BC -_0224B0B2: - lsl r1, r0, #0xc - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 -_0224B0BC: - mov r3, #1 - ldr r0, [r4, #0] - add r2, r1, #0 - lsl r3, r3, #0xc - bl ov22_0225B0EC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0224B09C - - thumb_func_start ov17_0224B0CC -ov17_0224B0CC: ; 0x0224B0CC - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #4 -_0224B0D4: - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl ov17_0224B09C - add r6, r6, #1 - add r4, #0x10 - add r5, r5, #4 - cmp r6, #4 - blt _0224B0D4 - pop {r4, r5, r6, pc} - thumb_func_end ov17_0224B0CC - - thumb_func_start ov17_0224B0E8 -ov17_0224B0E8: ; 0x0224B0E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, _0224B200 ; =0x00000B1B - add r4, r1, #0 - ldrb r0, [r5, r0] - str r2, [sp, #0x10] - mov r1, #3 - bl ov17_0223F0BC - add r6, r0, #0 - ldr r0, [sp, #0x10] - ldrb r0, [r0, #2] - cmp r0, r4 - bne _0224B10C - mov r0, #0 - str r0, [sp, #0x14] - b _0224B110 -_0224B10C: - mov r0, #1 - str r0, [sp, #0x14] -_0224B110: - ldr r0, _0224B200 ; =0x00000B1B - mov r1, #4 - ldrb r0, [r5, r0] - bl ov17_0223F0BC - add r1, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - bl sub_020E1F6C - ldr r1, [sp, #0x10] - mov r4, #0 - ldrb r1, [r1, #6] - mul r0, r1 - mov r1, #1 - lsl r1, r1, #8 - sub r2, r1, r6 - lsr r1, r2, #0x1f - add r1, r2, r1 - asr r1, r1, #1 - add r6, r0, r1 - ldr r0, [sp, #0x10] - str r1, [sp, #0x18] - ldrb r1, [r0, #7] - ldr r0, _0224B204 ; =0x022549BC - ldrb r7, [r0, r1] - b _0224B18A -_0224B146: - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224B188 - add r1, sp, #0x1c - mov r3, #1 - add r1, #2 - add r2, sp, #0x1c - lsl r3, r3, #0x14 - bl sub_0200D5A0 - add r1, sp, #0x1c - mov r0, #2 - ldrsh r0, [r1, r0] - cmp r0, r6 - bne _0224B188 - mov r0, #0 - ldrsh r0, [r1, r0] - cmp r0, r7 - bne _0224B188 - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0xec - ldr r0, [r0, #0] - bl sub_0200D37C - cmp r0, #2 - beq _0224B188 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224B188: - add r4, r4, #1 -_0224B18A: - cmp r4, #0x44 - blt _0224B146 - ldr r0, [sp, #0x10] - ldr r3, [sp, #0x14] - ldrb r0, [r0, #3] - str r0, [sp] - str r6, [sp, #4] - ldr r0, [sp, #0x10] - str r7, [sp, #8] - ldrb r0, [r0, #7] - str r0, [sp, #0xc] - add r0, r5, #0 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224A46C - ldr r0, [sp, #0x10] - ldrb r0, [r0, #7] - cmp r0, #0 - bne _0224B1F8 - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _0224B1F8 - mov r2, #0x80 - add r1, r2, #0 - ldr r3, [r5, #0] - add r1, #0xa3 - ldrb r1, [r3, r1] - ldr r3, _0224B208 ; =0x00000AF1 - ldr r0, [sp, #0x18] - add r1, r5, r1 - ldrb r4, [r1, r3] - ldr r1, _0224B204 ; =0x022549BC - sub r0, r2, r0 - ldrb r4, [r1, r4] - ldr r1, [sp, #0x10] - add r0, r6, r0 - ldrb r1, [r1, #3] - add r2, #0xa3 - str r1, [sp] - str r0, [sp, #4] - str r4, [sp, #8] - ldr r0, [r5, #0] - ldrb r0, [r0, r2] - add r0, r5, r0 - ldrb r0, [r0, r3] - mov r3, #2 - str r0, [sp, #0xc] - add r0, r5, #0 - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224A46C -_0224B1F8: - mov r0, #1 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B200: .word 0x00000B1B -_0224B204: .word 0x022549BC -_0224B208: .word 0x00000AF1 - thumb_func_end ov17_0224B0E8 - - thumb_func_start ov17_0224B20C -ov17_0224B20C: ; 0x0224B20C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - ldrb r1, [r4, #5] - add r5, r0, #0 - ldrb r0, [r4, #2] - cmp r1, #3 - bhi _0224B240 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224B228: ; jump table - .short _0224B230 - _0224B228 - 2 ; case 0 - .short _0224B234 - _0224B228 - 2 ; case 1 - .short _0224B238 - _0224B228 - 2 ; case 2 - .short _0224B23C - _0224B228 - 2 ; case 3 -_0224B230: - mov r2, #2 - b _0224B242 -_0224B234: - mov r2, #2 - b _0224B242 -_0224B238: - mov r2, #1 - b _0224B242 -_0224B23C: - mov r2, #1 - b _0224B242 -_0224B240: - mov r2, #0 -_0224B242: - ldr r1, _0224B4D8 ; =0x00000AF6 - lsl r0, r0, #1 - add r1, r5, r1 - add r3, r1, r0 - str r3, [sp, #8] - ldrsh r3, [r1, r0] - add r2, r3, r2 - strh r2, [r1, r0] - ldrb r0, [r4, #7] - cmp r0, #0 - bne _0224B2A2 - ldr r0, _0224B4DC ; =0x00001BBC - mov r2, #0 - add r3, r5, r0 - add r6, r5, #0 - sub r7, r0, #2 -_0224B262: - ldrb r0, [r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - bne _0224B290 - mov r0, #0xa - mul r0, r2 - ldrh r1, [r4] - ldr r2, _0224B4E0 ; =0x00001BB4 - add r0, r5, r0 - strh r1, [r0, r2] - ldrh r3, [r4, #2] - add r1, r2, #2 - strh r3, [r0, r1] - ldrh r3, [r4, #4] - add r1, r2, #4 - strh r3, [r0, r1] - add r1, r2, #6 - ldrh r3, [r4, #6] - add r2, #8 - strh r3, [r0, r1] - ldrh r1, [r4, #8] - strh r1, [r0, r2] - b _0224B2A2 -_0224B290: - ldrb r1, [r4, #6] - ldrb r0, [r6, r7] - cmp r1, r0 - beq _0224B2A2 - add r2, r2, #1 - add r3, #0xa - add r6, #0xa - cmp r2, #8 - blt _0224B262 -_0224B2A2: - ldrb r0, [r4, #4] - cmp r0, #0 - bne _0224B2C0 - ldr r0, _0224B4E4 ; =0x00000AD5 - ldrb r2, [r4, #2] - add r3, r5, r0 - add r0, r0, #4 - ldrb r1, [r3, r2] - add r1, r1, #1 - strb r1, [r3, r2] - ldrb r1, [r4, #2] - add r2, r5, r0 - ldrb r0, [r2, r1] - add r0, r0, #1 - b _0224B2D0 -_0224B2C0: - ldrb r1, [r4, #2] - mov r0, #0 - add r2, r5, r1 - ldr r1, _0224B4E4 ; =0x00000AD5 - strb r0, [r2, r1] - ldrb r2, [r4, #2] - add r1, r1, #4 - add r2, r5, r2 -_0224B2D0: - strb r0, [r2, r1] - ldrb r0, [r4, #4] - cmp r0, #2 - beq _0224B2E6 - ldr r0, _0224B4E8 ; =0x00000AE4 - ldrb r1, [r4, #2] - add r2, r5, r0 - ldrb r0, [r2, r1] - add r0, r0, #1 - strb r0, [r2, r1] - b _0224B2FC -_0224B2E6: - ldr r0, _0224B4EC ; =0x00000ADD - ldrb r2, [r4, #2] - add r3, r5, r0 - add r0, r0, #7 - ldrb r1, [r3, r2] - add r1, r1, #1 - strb r1, [r3, r2] - ldrb r1, [r4, #2] - mov r2, #0 - add r1, r5, r1 - strb r2, [r1, r0] -_0224B2FC: - ldrb r0, [r4, #7] - cmp r0, #0 - beq _0224B32E - ldrb r0, [r4, #4] - cmp r0, #0 - beq _0224B312 - cmp r0, #1 - beq _0224B31C - cmp r0, #2 - beq _0224B326 - b _0224B32E -_0224B312: - ldr r0, _0224B4F0 ; =0x00000AE1 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - b _0224B32E -_0224B31C: - ldr r0, _0224B4F4 ; =0x00000AE2 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - b _0224B32E -_0224B326: - ldr r0, _0224B4F8 ; =0x00000AE3 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] -_0224B32E: - ldrb r0, [r4, #2] - str r0, [sp] - ldrb r0, [r4, #7] - str r0, [sp, #4] - add r0, r5, #0 - ldrb r3, [r4, #4] - ldr r1, [r5, #0x6c] - ldr r2, [r5, #0x70] - add r0, #0x14 - bl ov17_0224A7E0 - ldr r2, [r5, #0] - ldr r1, _0224B4FC ; =0x00000123 - add r0, r5, #0 - ldrb r1, [r2, r1] - add r2, r4, #0 - bl ov17_0224B0E8 - ldrb r0, [r4, #8] - mov r1, #0 - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - str r0, [sp] - ldr r0, [sp, #8] - ldrsh r0, [r0, r1] - str r0, [sp, #4] - ldrb r1, [r4, #2] - ldrb r2, [r4, #7] - ldrb r3, [r4, #3] - add r0, r5, #0 - bl ov17_0224B528 - ldrb r1, [r4, #2] - ldrb r2, [r4, #4] - ldrb r3, [r4, #7] - add r0, r5, #0 - bl ov17_0224AF3C - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0224C89C - ldr r1, [r5, #0] - ldr r0, _0224B4FC ; =0x00000123 - ldrb r2, [r4, #2] - ldrb r0, [r1, r0] - cmp r2, r0 - bne _0224B3AE - ldrb r0, [r4, #4] - cmp r0, #0 - bne _0224B3A0 - ldrb r1, [r4, #6] - add r0, r5, #0 - mov r2, #1 - bl ov17_0224CB00 - b _0224B3AE -_0224B3A0: - cmp r0, #1 - bne _0224B3AE - ldrb r1, [r4, #6] - add r0, r5, #0 - mov r2, #0 - bl ov17_0224CB00 -_0224B3AE: - ldrb r1, [r4, #7] - cmp r1, #0 - bne _0224B3EC - ldrb r0, [r4, #8] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224B3EC - ldrb r1, [r4, #2] - ldr r0, _0224B500 ; =0x00000B1A - add r2, r5, r1 - add r1, r0, #0 - sub r1, #0x41 - ldrb r3, [r5, r0] - ldrb r1, [r2, r1] - cmp r3, r1 - bne _0224B3DA - add r0, r5, #0 - mov r1, #1 - bl ov17_0224CB80 - b _0224B432 -_0224B3DA: - sub r0, #0x3d - ldrb r0, [r2, r0] - cmp r0, #0 - bne _0224B432 - add r0, r5, #0 - mov r1, #0 - bl ov17_0224CB80 - b _0224B432 -_0224B3EC: - cmp r1, #0 - beq _0224B432 - ldrb r0, [r4, #8] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224B432 - ldr r3, _0224B4F0 ; =0x00000AE1 - add r0, r3, #2 - ldrb r1, [r5, r0] - add r0, r3, #0 - ldrb r2, [r5, r3] - add r0, #0x39 - add r3, r3, #1 - ldrb r6, [r5, r0] - ldrb r3, [r5, r3] - lsl r0, r6, #1 - add r3, r2, r3 - add r0, r6, r0 - add r3, r1, r3 - cmp r0, r3 - bne _0224B432 - cmp r2, r0 - bne _0224B426 - add r0, r5, #0 - mov r1, #1 - bl ov17_0224CB80 - b _0224B432 -_0224B426: - cmp r1, #0 - bne _0224B432 - add r0, r5, #0 - mov r1, #0 - bl ov17_0224CB80 -_0224B432: - ldrb r0, [r4, #8] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224B444 - ldr r0, _0224B504 ; =0x000006F5 - bl sub_02005748 - b _0224B44A -_0224B444: - ldr r0, _0224B508 ; =0x000006F4 - bl sub_02005748 -_0224B44A: - ldr r0, _0224B50C ; =0x00000AE8 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _0224B466 - beq _0224B4D2 - ldrb r0, [r4, #7] - cmp r0, #0 - beq _0224B466 - ldr r1, [r5, #0] - ldr r0, _0224B4FC ; =0x00000123 - ldrb r2, [r4, #2] - ldrb r0, [r1, r0] - cmp r2, r0 - bne _0224B4D2 -_0224B466: - ldrb r0, [r4, #4] - cmp r0, #0 - beq _0224B478 - cmp r0, #1 - beq _0224B4AE - cmp r0, #2 - beq _0224B4B8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224B478: - ldrb r0, [r4, #2] - add r1, r5, r0 - ldr r0, _0224B510 ; =0x00000AD9 - ldrb r1, [r1, r0] - add r0, #0x41 - ldrb r0, [r5, r0] - cmp r0, r1 - bne _0224B494 - mov r0, #0x6f - lsl r0, r0, #4 - bl sub_02005748 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224B494: - sub r0, r0, #1 - cmp r0, r1 - bne _0224B4A4 - ldr r0, _0224B514 ; =0x000006EF - bl sub_02005748 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224B4A4: - ldr r0, _0224B518 ; =0x000006EE - bl sub_02005748 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224B4AE: - ldr r0, _0224B51C ; =0x000006F1 - bl sub_02005748 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224B4B8: - ldrb r0, [r4, #8] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224B4CC - ldr r0, _0224B520 ; =0x000006F2 - bl sub_02005748 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224B4CC: - ldr r0, _0224B524 ; =0x000005F6 - bl sub_02005748 -_0224B4D2: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224B4D8: .word 0x00000AF6 -_0224B4DC: .word 0x00001BBC -_0224B4E0: .word 0x00001BB4 -_0224B4E4: .word 0x00000AD5 -_0224B4E8: .word 0x00000AE4 -_0224B4EC: .word 0x00000ADD -_0224B4F0: .word 0x00000AE1 -_0224B4F4: .word 0x00000AE2 -_0224B4F8: .word 0x00000AE3 -_0224B4FC: .word 0x00000123 -_0224B500: .word 0x00000B1A -_0224B504: .word 0x000006F5 -_0224B508: .word 0x000006F4 -_0224B50C: .word 0x00000AE8 -_0224B510: .word 0x00000AD9 -_0224B514: .word 0x000006EF -_0224B518: .word 0x000006EE -_0224B51C: .word 0x000006F1 -_0224B520: .word 0x000006F2 -_0224B524: .word 0x000005F6 - thumb_func_end ov17_0224B20C - - thumb_func_start ov17_0224B528 -ov17_0224B528: ; 0x0224B528 - push {r4, r5, r6, lr} - ldr r4, _0224B598 ; =0x00000F58 - add r5, r0, r4 - mov r0, #0x4c - add r4, r1, #0 - mul r4, r0 - add r1, r5, r4 - add r4, r1, #0 - add r4, #0x20 - ldrb r4, [r4] - sub r0, #0x4d - add r6, r4, #0 - cmp r4, #0x20 - bge _0224B554 -_0224B544: - ldrb r5, [r1, r6] - cmp r5, #0 - bne _0224B54E - add r0, r6, #0 - b _0224B554 -_0224B54E: - add r6, r6, #1 - cmp r6, #0x20 - blt _0224B544 -_0224B554: - mov r5, #0 - mvn r5, r5 - cmp r0, r5 - bne _0224B572 - mov r6, #0 - cmp r4, #0 - ble _0224B572 -_0224B562: - ldrb r5, [r1, r6] - cmp r5, #0 - bne _0224B56C - add r0, r6, #0 - b _0224B572 -_0224B56C: - add r6, r6, #1 - cmp r6, r4 - blt _0224B562 -_0224B572: - mov r4, #0 - mvn r4, r4 - cmp r0, r4 - bne _0224B580 - bl sub_02022974 - pop {r4, r5, r6, pc} -_0224B580: - strb r3, [r1, r0] - add r0, r1, #0 - add r0, #0x21 - strb r2, [r0] - add r0, r1, #0 - ldr r2, [sp, #0x10] - add r0, #0x22 - strb r2, [r0] - ldr r0, [sp, #0x14] - add r1, #0x23 - strb r0, [r1] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224B598: .word 0x00000F58 - thumb_func_end ov17_0224B528 - - thumb_func_start ov17_0224B59C -ov17_0224B59C: ; 0x0224B59C - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224B5B0 ; =ov17_0224B5F0 - ldr r2, _0224B5B4 ; =0x00009862 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #8] - pop {r4, pc} - nop -_0224B5B0: .word ov17_0224B5F0 -_0224B5B4: .word 0x00009862 - thumb_func_end ov17_0224B59C - - thumb_func_start ov17_0224B5B8 -ov17_0224B5B8: ; 0x0224B5B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} - thumb_func_end ov17_0224B5B8 - - thumb_func_start ov17_0224B5C8 -ov17_0224B5C8: ; 0x0224B5C8 - ldr r1, _0224B5EC ; =0x00000F58 - mov r2, #0 - add r1, r0, r1 -_0224B5CE: - add r0, r1, #0 - add r0, #0x20 - ldrb r0, [r0] - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0224B5DE - mov r0, #0 - bx lr -_0224B5DE: - add r2, r2, #1 - add r1, #0x4c - cmp r2, #4 - blt _0224B5CE - mov r0, #1 - bx lr - nop -_0224B5EC: .word 0x00000F58 - thumb_func_end ov17_0224B5C8 - - thumb_func_start ov17_0224B5F0 -ov17_0224B5F0: ; 0x0224B5F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r1, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x18] - ldr r1, _0224B7B0 ; =0x00000F58 - ldr r0, [sp, #0x10] - ldr r7, [sp, #0x10] - add r4, r0, r1 - mov r1, #0x85 - lsl r1, r1, #2 - add r0, r0, r1 - ldr r5, [sp, #0x10] - str r0, [sp, #0x14] - add r7, #0x18 -_0224B60E: - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - mov r6, #0 - ldrb r0, [r4, r0] - str r0, [sp, #0x1c] - cmp r0, #0 - bne _0224B620 - b _0224B792 -_0224B620: - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x18] - mov r2, #4 - bl ov17_0224BD28 - ldr r1, [sp, #0x10] - ldr r0, _0224B7B4 ; =0x00000B04 - ldr r0, [r1, r0] - ldr r1, _0224B7B8 ; =0x00002710 - bl sub_020E2178 - ldr r1, [sp, #0x1c] - cmp r1, #4 - bls _0224B63E - b _0224B74A -_0224B63E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224B64A: ; jump table - .short _0224B74A - _0224B64A - 2 ; case 0 - .short _0224B654 - _0224B64A - 2 ; case 1 - .short _0224B6C0 - _0224B64A - 2 ; case 2 - .short _0224B6EE - _0224B64A - 2 ; case 3 - .short _0224B71C - _0224B64A - 2 ; case 4 -_0224B654: - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x18] - add r2, r2, r1 - mov r1, #0xad - lsl r1, r1, #4 - ldrb r1, [r2, r1] - cmp r1, #1 - bne _0224B692 - add r1, r4, #0 - add r1, #0x22 - ldrb r1, [r1] - add r3, r4, #0 - sub r0, r0, #1 - str r1, [sp] - add r1, r4, #0 - add r1, #0x23 - ldrb r1, [r1] - add r3, #0x21 - add r2, r7, #0 - str r1, [sp, #4] - ldr r1, [sp, #0x14] - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - ldrb r3, [r3] - ldr r1, [r5, #0x5c] - add r0, #0x24 - bl ov17_0224B7BC - add r6, r0, #0 - b _0224B74E -_0224B692: - add r1, r4, #0 - add r1, #0x22 - ldrb r1, [r1] - add r3, r4, #0 - sub r0, r0, #1 - str r1, [sp] - add r1, r4, #0 - add r1, #0x23 - ldrb r1, [r1] - add r3, #0x21 - add r2, r7, #0 - str r1, [sp, #4] - add r1, r6, #0 - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - ldrb r3, [r3] - ldr r1, [r5, #0x5c] - add r0, #0x24 - bl ov17_0224B8D0 - add r6, r0, #0 - b _0224B74E -_0224B6C0: - add r1, r4, #0 - add r1, #0x22 - ldrb r1, [r1] - add r3, r4, #0 - sub r0, r0, #1 - str r1, [sp] - add r1, r4, #0 - add r1, #0x23 - ldrb r1, [r1] - add r3, #0x21 - add r2, r7, #0 - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - ldrb r3, [r3] - ldr r1, [r5, #0x5c] - add r0, #0x24 - bl ov17_0224B8D0 - add r6, r0, #0 - b _0224B74E -_0224B6EE: - add r1, r4, #0 - add r1, #0x22 - ldrb r1, [r1] - add r3, r4, #0 - sub r0, r0, #1 - str r1, [sp] - add r1, r4, #0 - add r1, #0x23 - ldrb r1, [r1] - add r3, #0x21 - add r2, r7, #0 - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - ldrb r3, [r3] - ldr r1, [r5, #0x5c] - add r0, #0x24 - bl ov17_0224BA50 - add r6, r0, #0 - b _0224B74E -_0224B71C: - add r1, r4, #0 - add r1, #0x22 - ldrb r1, [r1] - add r3, r4, #0 - sub r0, r0, #1 - str r1, [sp] - add r1, r4, #0 - add r1, #0x23 - ldrb r1, [r1] - add r3, #0x21 - add r2, r7, #0 - str r1, [sp, #4] - add r1, r6, #0 - str r1, [sp, #8] - str r0, [sp, #0xc] - add r0, r4, #0 - ldrb r3, [r3] - ldr r1, [r5, #0x5c] - add r0, #0x24 - bl ov17_0224BA50 - add r6, r0, #0 - b _0224B74E -_0224B74A: - bl sub_02022974 -_0224B74E: - cmp r6, #1 - bne _0224B792 - add r0, r4, #0 - add r0, #0x20 - ldrb r1, [r0] - mov r0, #0 - strb r0, [r4, r1] - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x20 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0x20 - blo _0224B77C - add r1, r4, #0 - add r1, #0x20 - mov r0, #0 - strb r0, [r1] -_0224B77C: - add r0, r4, #0 - add r0, #0x24 - mov r1, #0 - mov r2, #0x28 - bl sub_020C4CF4 - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x18] - mov r2, #3 - bl ov17_0224BD28 -_0224B792: - ldr r0, [sp, #0x14] - add r4, #0x4c - add r0, #0x18 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r7, #0x10 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0x18] - cmp r0, #4 - bge _0224B7AA - b _0224B60E -_0224B7AA: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B7B0: .word 0x00000F58 -_0224B7B4: .word 0x00000B04 -_0224B7B8: .word 0x00002710 - thumb_func_end ov17_0224B5F0 - - thumb_func_start ov17_0224B7BC -ov17_0224B7BC: ; 0x0224B7BC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #4] - ldrb r0, [r5, #0x10] - add r4, r2, #0 - add r6, r3, #0 - cmp r0, #0 - beq _0224B7D6 - cmp r0, #1 - beq _0224B824 - b _0224B858 -_0224B7D6: - ldr r0, [r4, #4] - ldr r1, [sp, #0x2c] - lsl r0, r0, #8 - str r0, [r5, #0] - ldr r0, [r4, #8] - lsr r1, r1, #1 - lsl r0, r0, #8 - str r0, [r5, #4] - ldr r0, [r5, #0] - str r0, [r5, #8] - ldr r0, [r5, #4] - str r0, [r5, #0xc] - mov r0, #5 - lsl r0, r0, #8 - bl sub_020E2178 - ldr r1, [sp, #0x20] - cmp r1, #1 - bne _0224B80E - ldr r1, _0224B8C8 ; =0xFFFFF600 - strh r1, [r5, #0x14] - mov r1, #0xc8 - mul r1, r0 - add r0, r1, #0 - mov r1, #0x64 - bl sub_020E1F6C - b _0224B812 -_0224B80E: - ldr r1, _0224B8CC ; =0xFFFFFB00 - strh r1, [r5, #0x14] -_0224B812: - strh r0, [r5, #0x16] - ldr r0, [sp, #0x28] - mov r1, #1 - mov r2, #0 - bl ov17_0224AC78 - ldrb r0, [r5, #0x10] - add r0, r0, #1 - strb r0, [r5, #0x10] -_0224B824: - mov r0, #0x14 - ldrsh r1, [r5, r0] - ldr r2, [r5, #0xc] - add r1, r2, r1 - str r1, [r5, #0xc] - ldrsh r1, [r5, r0] - mov r0, #0x16 - ldrsh r0, [r5, r0] - add r0, r1, r0 - strh r0, [r5, #0x14] - ldr r1, [r5, #4] - ldr r0, [r5, #0xc] - cmp r0, r1 - blt _0224B85E - str r1, [r5, #0xc] - mov r1, #1 - ldr r0, [sp, #0x28] - add r2, r1, #0 - bl ov17_0224AC78 - mov r0, #1 - str r0, [sp, #4] - ldrb r0, [r5, #0x10] - add r0, r0, #1 - strb r0, [r5, #0x10] - b _0224B85E -_0224B858: - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224B85E: - cmp r6, #0 - bne _0224B866 - mov r6, #0x64 - b _0224B868 -_0224B866: - mov r6, #0x28 -_0224B868: - ldr r0, [sp, #0x24] - lsl r1, r0, #9 - mov r0, #0x19 - lsl r0, r0, #0xa - cmp r1, r0 - ble _0224B876 - add r1, r0, #0 -_0224B876: - asr r0, r1, #8 - add r6, r6, r0 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - str r0, [sp] - sub r1, r1, r0 - ldr r7, [r5, #4] - ldr r0, [r5, #0xc] - sub r5, r0, r7 - add r0, r1, #0 - mul r0, r6 - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp, #8] - add r0, r5, #0 - mul r0, r6 - mov r1, #0x64 - bl sub_020E1F6C - ldr r2, [sp] - ldr r1, [sp, #8] - add r2, r2, r1 - asr r1, r2, #7 - lsr r1, r1, #0x18 - add r1, r2, r1 - asr r1, r1, #8 - str r1, [r4, #4] - add r1, r7, r0 - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r2, r0, #8 - str r2, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov22_0225B100 - ldr r0, [sp, #4] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B8C8: .word 0xFFFFF600 -_0224B8CC: .word 0xFFFFFB00 - thumb_func_end ov17_0224B7BC - - thumb_func_start ov17_0224B8D0 -ov17_0224B8D0: ; 0x0224B8D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0 - str r0, [sp, #0xc] - ldrb r0, [r4, #0x10] - add r6, r2, #0 - str r3, [sp] - ldr r5, [sp, #0x30] - cmp r0, #0 - beq _0224B8F0 - cmp r0, #1 - beq _0224B948 - cmp r0, #2 - beq _0224B99A - b _0224B9DE -_0224B8F0: - ldr r0, [r6, #4] - ldr r1, [sp, #0x34] - lsl r0, r0, #8 - str r0, [r4, #0] - ldr r0, [r6, #8] - lsl r0, r0, #8 - str r0, [r4, #4] - ldr r0, [r4, #0] - str r0, [r4, #8] - ldr r0, [r4, #4] - str r0, [r4, #0xc] - mov r0, #0x1e - mul r0, r1 - mov r1, #0x64 - bl sub_020E2178 - add r7, r0, #0 - mov r0, #1 - lsl r0, r0, #0xc - add r1, r7, #0 - bl sub_020E1F6C - ldr r1, [sp, #0x34] - str r0, [r4, #0x14] - mov r0, #1 - lsl r0, r0, #0xc - sub r1, r1, r7 - bl sub_020E1F6C - str r0, [r4, #0x18] - cmp r5, #0 - bne _0224B942 - ldr r1, [r4, #0x14] - mov r0, #0 - mvn r0, r0 - add r2, r1, #0 - mul r2, r0 - str r2, [r4, #0x14] - ldr r1, [r4, #0x18] - mul r0, r1 - str r0, [r4, #0x18] -_0224B942: - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_0224B948: - ldr r0, [sp, #0x28] - cmp r0, #1 - bne _0224B964 - ldr r1, [r4, #0x14] - mov r0, #0xc8 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [r4, #0xc] - add r0, r1, r0 - str r0, [r4, #0xc] - mov r0, #0x20 - b _0224B96E -_0224B964: - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0xc] - mov r0, #0x10 -_0224B96E: - lsl r0, r0, #8 - str r0, [sp, #8] - ldr r7, [r4, #4] - ldr r0, [r4, #0xc] - sub r0, r0, r7 - bl sub_020D4070 - ldr r1, [sp, #8] - cmp r0, r1 - blt _0224B9E4 - cmp r5, #1 - bne _0224B98C - add r0, r1, #0 - add r0, r7, r0 - b _0224B990 -_0224B98C: - add r0, r1, #0 - sub r0, r7, r0 -_0224B990: - str r0, [r4, #0xc] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - b _0224B9E4 -_0224B99A: - ldr r0, [sp, #0x28] - cmp r0, #1 - bne _0224B9B0 - ldr r1, [r4, #0x18] - mov r0, #0xc8 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [r4, #0xc] - b _0224B9B4 -_0224B9B0: - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x18] -_0224B9B4: - sub r0, r1, r0 - str r0, [r4, #0xc] - cmp r5, #1 - bne _0224B9C4 - ldr r1, [r4, #4] - ldr r0, [r4, #0xc] - cmp r0, r1 - ble _0224B9D0 -_0224B9C4: - cmp r5, #0 - bne _0224B9E4 - ldr r1, [r4, #4] - ldr r0, [r4, #0xc] - cmp r0, r1 - blt _0224B9E4 -_0224B9D0: - str r1, [r4, #0xc] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - mov r0, #1 - str r0, [sp, #0xc] - b _0224B9E4 -_0224B9DE: - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224B9E4: - ldr r0, [sp] - cmp r0, #0 - bne _0224B9EE - mov r5, #0x64 - b _0224B9F0 -_0224B9EE: - mov r5, #0x28 -_0224B9F0: - ldr r0, [sp, #0x2c] - lsl r1, r0, #9 - mov r0, #0x19 - lsl r0, r0, #0xa - cmp r1, r0 - ble _0224B9FE - add r1, r0, #0 -_0224B9FE: - asr r0, r1, #8 - add r5, r5, r0 - ldr r0, [r4, #0] - ldr r1, [r4, #8] - str r0, [sp, #4] - sub r1, r1, r0 - ldr r7, [r4, #4] - ldr r0, [r4, #0xc] - sub r4, r0, r7 - add r0, r1, #0 - mul r0, r5 - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp, #0x10] - add r0, r4, #0 - mul r0, r5 - mov r1, #0x64 - bl sub_020E1F6C - ldr r2, [sp, #4] - ldr r1, [sp, #0x10] - add r2, r2, r1 - asr r1, r2, #7 - lsr r1, r1, #0x18 - add r1, r2, r1 - asr r1, r1, #8 - str r1, [r6, #4] - add r1, r7, r0 - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r2, r0, #8 - str r2, [r6, #8] - ldr r0, [r6, #0] - ldr r1, [r6, #4] - bl ov22_0225B100 - ldr r0, [sp, #0xc] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov17_0224B8D0 - - thumb_func_start ov17_0224BA50 -ov17_0224BA50: ; 0x0224BA50 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #0x10] - ldrb r0, [r5, #0x10] - add r4, r2, #0 - str r3, [sp] - ldr r6, [sp, #0x38] - cmp r0, #0 - beq _0224BA70 - cmp r0, #1 - beq _0224BAF0 - cmp r0, #2 - beq _0224BB62 - b _0224BBC4 -_0224BA70: - ldr r0, [r4, #4] - ldr r1, [sp, #0x3c] - lsl r0, r0, #8 - str r0, [r5, #0] - ldr r0, [r4, #8] - lsl r0, r0, #8 - str r0, [r5, #4] - ldr r0, [r5, #0] - str r0, [r5, #8] - ldr r0, [r5, #4] - str r0, [r5, #0xc] - mov r0, #0x1e - mul r0, r1 - mov r1, #0x64 - bl sub_020E2178 - ldr r1, [sp, #0x3c] - str r0, [sp, #0x14] - sub r7, r1, r0 - ldr r0, _0224BC44 ; =0x00038E00 - ldr r1, [sp, #0x14] - bl sub_020E1F6C - str r0, [r5, #0x18] - ldr r0, _0224BC48 ; =0xFFFC7200 - add r1, r7, #0 - bl sub_020E1F6C - str r0, [r5, #0x1c] - mov r0, #1 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xc - bl sub_020E1F6C - str r0, [r5, #0x20] - mov r0, #1 - lsl r0, r0, #0xc - add r1, r7, #0 - bl sub_020E1F6C - neg r0, r0 - str r0, [r5, #0x24] - cmp r6, #1 - bne _0224BAEA - ldr r1, [r5, #0x18] - mov r0, #0 - mvn r0, r0 - add r2, r1, #0 - mul r2, r0 - str r2, [r5, #0x18] - ldr r1, [r5, #0x1c] - add r2, r1, #0 - mul r2, r0 - str r2, [r5, #0x1c] - ldr r1, [r5, #0x20] - add r2, r1, #0 - mul r2, r0 - str r2, [r5, #0x20] - ldr r1, [r5, #0x24] - mul r0, r1 - str r0, [r5, #0x24] -_0224BAEA: - ldrb r0, [r5, #0x10] - add r0, r0, #1 - strb r0, [r5, #0x10] -_0224BAF0: - ldr r0, [sp, #0x30] - cmp r0, #1 - bne _0224BB1C - ldr r1, [r5, #0x20] - mov r0, #0xc8 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [r5, #8] - add r0, r1, r0 - str r0, [r5, #8] - mov r0, #0x20 - str r0, [sp, #0xc] - ldr r1, [r5, #0x18] - mov r0, #0xc8 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [r5, #0x14] - b _0224BB2C -_0224BB1C: - ldr r1, [r5, #8] - ldr r0, [r5, #0x20] - add r0, r1, r0 - str r0, [r5, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - ldr r1, [r5, #0x14] - ldr r0, [r5, #0x18] -_0224BB2C: - add r0, r1, r0 - str r0, [r5, #0x14] - ldr r0, [sp, #0xc] - ldr r7, [r5, #0] - lsl r0, r0, #8 - str r0, [sp, #8] - ldr r0, [r5, #8] - sub r0, r0, r7 - bl sub_020D4070 - ldr r1, [sp, #8] - cmp r0, r1 - blt _0224BBCA - cmp r6, #1 - bne _0224BB50 - add r0, r1, #0 - sub r0, r7, r0 - b _0224BB54 -_0224BB50: - add r0, r1, #0 - add r0, r7, r0 -_0224BB54: - str r0, [r5, #8] - ldr r0, [r5, #4] - str r0, [r5, #0xc] - ldrb r0, [r5, #0x10] - add r0, r0, #1 - strb r0, [r5, #0x10] - b _0224BBCA -_0224BB62: - ldr r0, [sp, #0x30] - cmp r0, #1 - bne _0224BB8A - ldr r1, [r5, #0x24] - mov r0, #0xc8 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [r5, #8] - add r0, r1, r0 - str r0, [r5, #8] - ldr r1, [r5, #0x1c] - mov r0, #0xc8 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [r5, #0x14] - b _0224BB96 -_0224BB8A: - ldr r1, [r5, #8] - ldr r0, [r5, #0x24] - add r0, r1, r0 - str r0, [r5, #8] - ldr r1, [r5, #0x14] - ldr r0, [r5, #0x1c] -_0224BB96: - add r0, r1, r0 - str r0, [r5, #0x14] - cmp r6, #1 - bne _0224BBA6 - ldr r1, [r5, #0] - ldr r0, [r5, #8] - cmp r0, r1 - bge _0224BBB2 -_0224BBA6: - cmp r6, #0 - bne _0224BBCA - ldr r1, [r5, #0] - ldr r0, [r5, #8] - cmp r0, r1 - bgt _0224BBCA -_0224BBB2: - str r1, [r5, #8] - mov r0, #0 - str r0, [r5, #0x14] - ldrb r0, [r5, #0x10] - add r0, r0, #1 - strb r0, [r5, #0x10] - mov r0, #1 - str r0, [sp, #0x10] - b _0224BBCA -_0224BBC4: - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224BBCA: - ldr r1, [r5, #0x14] - ldr r0, [r4, #0] - lsl r1, r1, #8 - lsr r1, r1, #0x10 - bl ov22_0225B0E4 - ldr r0, [sp] - cmp r0, #0 - bne _0224BBE0 - mov r6, #0x64 - b _0224BBE2 -_0224BBE0: - mov r6, #0x28 -_0224BBE2: - ldr r0, [sp, #0x34] - lsl r1, r0, #9 - mov r0, #0x19 - lsl r0, r0, #0xa - cmp r1, r0 - ble _0224BBF0 - add r1, r0, #0 -_0224BBF0: - asr r0, r1, #8 - add r6, r6, r0 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - str r0, [sp, #4] - sub r1, r1, r0 - ldr r7, [r5, #4] - ldr r0, [r5, #0xc] - sub r5, r0, r7 - add r0, r1, #0 - mul r0, r6 - mov r1, #0x64 - bl sub_020E1F6C - str r0, [sp, #0x18] - add r0, r5, #0 - mul r0, r6 - mov r1, #0x64 - bl sub_020E1F6C - ldr r2, [sp, #4] - ldr r1, [sp, #0x18] - add r2, r2, r1 - asr r1, r2, #7 - lsr r1, r1, #0x18 - add r1, r2, r1 - asr r1, r1, #8 - str r1, [r4, #4] - add r1, r7, r0 - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r2, r0, #8 - str r2, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov22_0225B100 - ldr r0, [sp, #0x10] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0224BC44: .word 0x00038E00 -_0224BC48: .word 0xFFFC7200 - thumb_func_end ov17_0224BA50 - - thumb_func_start ov17_0224BC4C -ov17_0224BC4C: ; 0x0224BC4C - ldr r1, _0224BC64 ; =0x00001BBC - mov r2, #0 - add r3, r0, r1 - mov r0, #4 -_0224BC54: - ldrb r1, [r3] - add r2, r2, #1 - bic r1, r0 - strb r1, [r3] - add r3, #0xa - cmp r2, #8 - blt _0224BC54 - bx lr - ; .align 2, 0 -_0224BC64: .word 0x00001BBC - thumb_func_end ov17_0224BC4C - - thumb_func_start ov17_0224BC68 -ov17_0224BC68: ; 0x0224BC68 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0224BCEC ; =0x0000108C - add r6, r1, #0 - add r7, r5, r0 - mov r0, #0x28 - mul r0, r6 - str r0, [sp, #4] - ldr r0, [r7, r0] - str r2, [sp] - cmp r0, #0 - beq _0224BC86 - bl sub_02022974 -_0224BC86: - ldr r0, _0224BCF0 ; =0x00001088 - mov r2, #0x28 - add r4, r6, #0 - add r0, r5, r0 - mul r4, r2 - str r0, [sp, #8] - add r0, r0, r4 - mov r1, #0 - bl sub_020C4CF4 - ldr r0, [sp, #8] - add r1, r5, r4 - str r5, [r0, r4] - ldr r0, _0224BCF4 ; =0x000010A2 - ldr r2, [sp] - strb r6, [r1, r0] - sub r3, r0, #1 - strb r2, [r1, r3] - lsl r2, r6, #2 - add r2, r5, r2 - ldr r3, [r2, #0x5c] - add r2, r0, #0 - sub r2, #0x12 - str r3, [r1, r2] - add r2, r5, #0 - add r2, #0x18 - lsl r3, r6, #4 - add r3, r2, r3 - add r2, r0, #0 - add r0, #0xa - sub r2, #0xe - str r3, [r1, r2] - add r0, r5, r0 - ldrb r2, [r0, r4] - mov r1, #4 - orr r1, r2 - strb r1, [r0, r4] - ldrb r2, [r0, r4] - mov r1, #8 - orr r1, r2 - strb r1, [r0, r4] - ldr r1, [sp, #8] - ldr r0, _0224BCF8 ; =ov17_0224BE50 - ldr r2, _0224BCFC ; =0x00009858 - add r1, r1, r4 - bl sub_0200D9E8 - ldr r1, [sp, #4] - str r0, [r7, r1] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BCEC: .word 0x0000108C -_0224BCF0: .word 0x00001088 -_0224BCF4: .word 0x000010A2 -_0224BCF8: .word ov17_0224BE50 -_0224BCFC: .word 0x00009858 - thumb_func_end ov17_0224BC68 - - thumb_func_start ov17_0224BD00 -ov17_0224BD00: ; 0x0224BD00 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r7, _0224BD24 ; =0x0000108C - add r5, r0, #0 - add r6, r4, #0 -_0224BD0A: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0224BD18 - bl sub_0200DA58 - ldr r0, _0224BD24 ; =0x0000108C - str r6, [r5, r0] -_0224BD18: - add r4, r4, #1 - add r5, #0x28 - cmp r4, #4 - blt _0224BD0A - pop {r3, r4, r5, r6, r7, pc} - nop -_0224BD24: .word 0x0000108C - thumb_func_end ov17_0224BD00 - - thumb_func_start ov17_0224BD28 -ov17_0224BD28: ; 0x0224BD28 - push {r3, r4, r5, lr} - mov r3, #0x28 - mul r3, r1 - ldr r1, _0224BDEC ; =0x0000108C - add r4, r0, r3 - ldr r5, [r4, r1] - cmp r5, #0 - beq _0224BDE8 - cmp r2, #5 - bhi _0224BDE4 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224BD48: ; jump table - .short _0224BD54 - _0224BD48 - 2 ; case 0 - .short _0224BD6A - _0224BD48 - 2 ; case 1 - .short _0224BD78 - _0224BD48 - 2 ; case 2 - .short _0224BD86 - _0224BD48 - 2 ; case 3 - .short _0224BDA4 - _0224BD48 - 2 ; case 4 - .short _0224BDD2 - _0224BD48 - 2 ; case 5 -_0224BD54: - add r1, #0x20 - add r2, r0, r1 - ldrb r1, [r2, r3] - mov r0, #0x20 - bic r1, r0 - strb r1, [r2, r3] - ldrb r1, [r2, r3] - mov r0, #0x10 - bic r1, r0 - strb r1, [r2, r3] - pop {r3, r4, r5, pc} -_0224BD6A: - add r1, #0x20 - add r2, r0, r1 - ldrb r1, [r2, r3] - mov r0, #0x20 - orr r0, r1 - strb r0, [r2, r3] - pop {r3, r4, r5, pc} -_0224BD78: - add r1, #0x20 - add r2, r0, r1 - ldrb r1, [r2, r3] - mov r0, #0x10 - orr r0, r1 - strb r0, [r2, r3] - pop {r3, r4, r5, pc} -_0224BD86: - add r1, #0x20 - add r0, r0, r1 - ldrb r2, [r0, r3] - mov r1, #2 - bic r2, r1 - strb r2, [r0, r3] - ldrb r2, [r0, r3] - mov r1, #1 - bic r2, r1 - strb r2, [r0, r3] - ldrb r2, [r0, r3] - mov r1, #4 - orr r1, r2 - strb r1, [r0, r3] - pop {r3, r4, r5, pc} -_0224BDA4: - add r2, r1, #0 - add r2, #0x20 - ldrb r2, [r4, r2] - lsl r2, r2, #0x1e - lsr r2, r2, #0x1f - bne _0224BDE8 - add r2, r1, #0 - add r2, #0x20 - add r5, r0, r2 - ldrb r2, [r5, r3] - mov r0, #2 - orr r0, r2 - strb r0, [r5, r3] - ldrb r0, [r5, r3] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - bne _0224BDE8 - add r0, r1, #0 - add r0, #0x10 - ldr r0, [r4, r0] - add r1, #0x1c - str r0, [r4, r1] - pop {r3, r4, r5, pc} -_0224BDD2: - add r1, #0x20 - add r2, r0, r1 - ldrb r1, [r2, r3] - mov r0, #1 - bic r1, r0 - mov r0, #1 - orr r0, r1 - strb r0, [r2, r3] - pop {r3, r4, r5, pc} -_0224BDE4: - bl sub_02022974 -_0224BDE8: - pop {r3, r4, r5, pc} - nop -_0224BDEC: .word 0x0000108C - thumb_func_end ov17_0224BD28 - - thumb_func_start ov17_0224BDF0 -ov17_0224BDF0: ; 0x0224BDF0 - mov r2, #0x28 - mul r2, r1 - ldr r1, _0224BE20 ; =0x0000108C - add r2, r0, r2 - ldr r0, [r2, r1] - cmp r0, #0 - bne _0224BE02 - mov r0, #1 - bx lr -_0224BE02: - add r0, r1, #0 - add r0, #0x20 - ldrb r0, [r2, r0] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - cmp r0, #1 - beq _0224BE18 - add r1, #0x15 - ldrb r0, [r2, r1] - cmp r0, #0 - bne _0224BE1C -_0224BE18: - mov r0, #1 - bx lr -_0224BE1C: - mov r0, #0 - bx lr - ; .align 2, 0 -_0224BE20: .word 0x0000108C - thumb_func_end ov17_0224BDF0 - - thumb_func_start ov17_0224BE24 -ov17_0224BE24: ; 0x0224BE24 - mov r2, #0x28 - mul r2, r1 - add r2, r0, r2 - ldr r0, _0224BE4C ; =0x0000108C - ldr r1, [r2, r0] - cmp r1, #0 - bne _0224BE36 - mov r0, #1 - bx lr -_0224BE36: - add r0, #0x20 - ldrb r0, [r2, r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224BE46 - mov r0, #1 - bx lr -_0224BE46: - mov r0, #0 - bx lr - nop -_0224BE4C: .word 0x0000108C - thumb_func_end ov17_0224BE24 - - thumb_func_start ov17_0224BE50 -ov17_0224BE50: ; 0x0224BE50 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov17_0224BE64 - add r0, r4, #0 - bl ov17_0224BF58 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0224BE50 - - thumb_func_start ov17_0224BE64 -ov17_0224BE64: ; 0x0224BE64 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r0, #0x24 - ldrb r0, [r0] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - cmp r0, #1 - beq _0224BF40 - ldrb r0, [r4, #0x19] - cmp r0, #0 - beq _0224BF40 - ldr r5, [r4, #0] - ldr r1, _0224BF44 ; =0x00001154 - ldr r2, _0224BF48 ; =0x00002710 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - mov r3, #0 - bl sub_020E1F1C - ldr r2, _0224BF4C ; =0x00000B04 - mov r3, #0 - ldr r7, [r5, r2] - add r2, r7, #0 - bl sub_020E1EE0 - add r5, r0, #0 - add r6, r1, #0 - lsr r7, r7, #1 - lsr r0, r5, #0x13 - lsl r1, r6, #0xd - orr r1, r0 - lsl r0, r5, #0xd - add r2, r7, #0 - mov r3, #0 - bl sub_020E1ED4 - add r2, r1, #0 - mov r1, #1 - sub r3, r5, r7 - ldr r3, _0224BF50 ; =0x00000000 - sbc r6, r3 - blo _0224BEC0 - lsl r3, r1, #0xe - mov r1, #0 - sub r0, r3, r0 -_0224BEC0: - add r2, r4, #0 - add r2, #0x24 - ldrb r2, [r2] - ldr r3, _0224BF54 ; =0xFFFD8000 - mov r5, #0x40 - add r0, r0, r3 - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - lsl r2, r2, #0x19 - lsr r2, r2, #0x1f - bic r0, r5 - lsl r5, r1, #0x18 - lsr r5, r5, #0x18 - lsl r5, r5, #0x1f - lsr r5, r5, #0x19 - orr r5, r0 - add r0, r4, #0 - add r0, #0x24 - strb r5, [r0] - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224BF2A - ldr r0, [r4, #0x10] - cmp r0, r3 - beq _0224BF06 - cmp r2, #0 - bne _0224BF2A - cmp r1, #1 - bne _0224BF2A -_0224BF06: - ldr r0, _0224BF54 ; =0xFFFD8000 - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x24 - ldrb r1, [r0] - mov r0, #0x10 - bic r1, r0 - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x24 - ldrb r1, [r0] - mov r0, #0x20 - orr r1, r0 - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] -_0224BF2A: - ldr r1, [r4, #0x10] - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 - ldr r0, [r4, #0xc] - str r1, [r0, #0xc] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - bl ov17_0224B09C -_0224BF40: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224BF44: .word 0x00001154 -_0224BF48: .word 0x00002710 -_0224BF4C: .word 0x00000B04 -_0224BF50: .word 0x00000000 -_0224BF54: .word 0xFFFD8000 - thumb_func_end ov17_0224BE64 - - thumb_func_start ov17_0224BF58 -ov17_0224BF58: ; 0x0224BF58 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r2, [r4, #0] - ldr r1, _0224C0B0 ; =0x00001154 - mov r3, #0 - ldr r0, [r2, r1] - add r1, r1, #4 - ldr r1, [r2, r1] - ldr r2, _0224C0B4 ; =0x00002710 - ldr r6, [r4, #0x14] - bl sub_020E1F1C - ldr r3, [r4, #0] - ldr r2, _0224C0B8 ; =0x00000B04 - ldr r2, [r3, r2] - mov r3, #0 - lsl r2, r2, #1 - bl sub_020E1EE0 - mov r2, #0x5a - lsl r2, r2, #2 - mov r3, #0 - bl sub_020E1F1C - ldr r3, [r4, #0] - ldr r2, _0224C0B8 ; =0x00000B04 - ldr r2, [r3, r2] - mov r3, #0 - lsl r2, r2, #1 - bl sub_020E1ED4 - lsl r5, r0, #8 - lsr r2, r0, #0x18 - add r0, r4, #0 - lsl r1, r1, #8 - str r5, [r4, #0x14] - add r0, #0x24 - ldrb r0, [r0] - orr r1, r2 - lsl r2, r0, #0x1e - lsr r2, r2, #0x1f - bne _0224C0AC - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224BFC6 - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - mov r2, #8 - add r6, r5, #0 - bic r0, r2 - add r2, r4, #0 - add r2, #0x24 - strb r0, [r2] -_0224BFC6: - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224C026 - mov r0, #0 - sub r2, r5, r6 - mov ip, r1 - mov r2, ip - sbc r2, r0 - bhs _0224BFE4 - add r7, r6, r5 - b _0224BFE6 -_0224BFE4: - add r7, r5, #0 -_0224BFE6: - ldr r3, [r4, #0x20] - mov r0, #0 - add r2, r0, #0 - add r0, r3, #0 - eor r2, r1 - eor r0, r5 - orr r0, r2 - beq _0224C016 - cmp r6, r3 - bhi _0224BFFE - cmp r3, r7 - bls _0224C016 -_0224BFFE: - ldr r2, [r4, #0x20] - mov r0, #0 - sub r2, r5, r2 - mov ip, r1 - mov r2, ip - sbc r2, r0 - blo _0224C0AC - sub r2, r5, r6 - mov ip, r1 - mov r2, ip - sbc r2, r0 - bhs _0224C0AC -_0224C016: - add r0, r4, #0 - add r0, #0x24 - ldrb r2, [r0] - mov r0, #4 - bic r2, r0 - add r0, r4, #0 - add r0, #0x24 - strb r2, [r0] -_0224C026: - add r0, r4, #0 - add r0, #0x24 - ldrb r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224C06C - mov r2, #0 - mov r0, #0 - eor r2, r1 - eor r0, r5 - orr r0, r2 - beq _0224C048 - mov r2, #0 - sub r0, r5, r6 - sbc r1, r2 - bhs _0224C06C -_0224C048: - add r1, r4, #0 - add r1, #0x24 - ldrb r2, [r1] - mov r1, #1 - mov r0, #0 - bic r2, r1 - add r1, r4, #0 - add r1, #0x24 - strb r2, [r1] - add r1, r4, #0 - add r1, #0x24 - ldrb r2, [r1] - mov r1, #2 - orr r2, r1 - add r1, r4, #0 - add r1, #0x24 - strb r2, [r1] - str r0, [r4, #0x20] -_0224C06C: - ldrb r0, [r4, #0x19] - cmp r0, #0 - bne _0224C074 - b _0224C074 -_0224C074: - ldr r0, [r4, #0x14] - mov r5, #3 - lsl r0, r0, #8 - lsr r0, r0, #0x10 - bl sub_0201D1D4 - add r1, r5, #0 - mul r1, r0 - ldrb r2, [r4, #0x19] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - mov r1, #6 - add r3, r2, #0 - mul r3, r1 - ldr r1, _0224C0BC ; =0x022546F4 - asr r0, r0, #0xc - ldrsh r1, [r1, r3] - add r0, r0, r1 - sub r1, r0, r5 - ldr r0, [r4, #0xc] - str r1, [r0, #4] - ldr r2, [r4, #0xc] - ldr r0, [r2, #0] - ldr r1, [r2, #4] - ldr r2, [r2, #8] - bl ov22_0225B100 -_0224C0AC: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C0B0: .word 0x00001154 -_0224C0B4: .word 0x00002710 -_0224C0B8: .word 0x00000B04 -_0224C0BC: .word 0x022546F4 - thumb_func_end ov17_0224BF58 - - thumb_func_start ov17_0224C0C0 -ov17_0224C0C0: ; 0x0224C0C0 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r1, #0 - add r4, r0, #0 - add r5, r2, #0 - cmp r6, #0 - beq _0224C0D6 - cmp r5, #0 - bne _0224C0D6 - bl sub_02022974 -_0224C0D6: - cmp r6, #6 - bls _0224C0DC - b _0224C23C -_0224C0DC: - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224C0E8: ; jump table - .short _0224C240 - _0224C0E8 - 2 ; case 0 - .short _0224C0F6 - _0224C0E8 - 2 ; case 1 - .short _0224C112 - _0224C0E8 - 2 ; case 2 - .short _0224C136 - _0224C0E8 - 2 ; case 3 - .short _0224C14C - _0224C0E8 - 2 ; case 4 - .short _0224C190 - _0224C0E8 - 2 ; case 5 - .short _0224C1C2 - _0224C0E8 - 2 ; case 6 -_0224C0F6: - ldrb r0, [r5] - ldr r1, [r4, #0x14] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r4, #0x9c - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200B5CC - add sp, #8 - pop {r4, r5, r6, pc} -_0224C112: - mov r2, #0x12 - lsl r2, r2, #4 - ldr r3, [r4, #0] - add r1, r2, #1 - ldrb r0, [r3, r2] - add r2, #0x51 - ldrb r1, [r3, r1] - ldrb r2, [r3, r2] - bl sub_02095848 - add r4, #0x9c - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200BBA8 - add sp, #8 - pop {r4, r5, r6, pc} -_0224C136: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - add r4, #0x9c - ldrb r2, [r5, #4] - ldr r0, [r4, #0] - bl sub_0200B60C - add sp, #8 - pop {r4, r5, r6, pc} -_0224C14C: - ldrb r6, [r5] - ldr r3, [r4, #0] - mov r0, #1 - lsl r2, r6, #2 - str r0, [sp] - mov r0, #2 - add r2, r3, r2 - add r6, r3, r6 - mov r3, #0x42 - str r0, [sp, #4] - add r0, r4, #0 - lsl r3, r3, #2 - add r0, #0x9c - add r2, #0xe8 - ldrb r3, [r6, r3] - ldr r0, [r0, #0] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200B48C - ldrb r0, [r5] - ldr r1, [r4, #0x14] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r4, #0x9c - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r4, r5, r6, pc} -_0224C190: - ldrb r0, [r5] - ldr r1, [r4, #0x14] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200B5CC - mov r0, #0 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - add r4, #0x9c - ldrb r2, [r5, #4] - ldr r0, [r4, #0] - add r3, r1, #0 - bl sub_0200B60C - add sp, #8 - pop {r4, r5, r6, pc} -_0224C1C2: - mov r2, #0x12 - lsl r2, r2, #4 - ldr r3, [r4, #0] - add r1, r2, #1 - ldrb r0, [r3, r2] - add r2, #0x51 - ldrb r1, [r3, r1] - ldrb r2, [r3, r2] - bl sub_02095848 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x9c - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200BBA8 - mov r0, #0 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - add r0, r4, #0 - add r0, #0x9c - ldrb r2, [r5, #4] - ldr r0, [r0, #0] - add r3, r1, #0 - bl sub_0200B60C - ldrb r6, [r5] - ldr r3, [r4, #0] - mov r0, #1 - lsl r2, r6, #2 - str r0, [sp] - mov r1, #2 - add r2, r3, r2 - add r6, r3, r6 - mov r3, #0x42 - add r0, r4, #0 - str r1, [sp, #4] - lsl r3, r3, #2 - add r0, #0x9c - add r2, #0xe8 - ldrb r3, [r6, r3] - ldr r0, [r0, #0] - ldr r2, [r2, #0] - bl sub_0200B48C - ldrb r0, [r5] - ldr r1, [r4, #0x14] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r4, #0x9c - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #3 - bl sub_0200B5CC - add sp, #8 - pop {r4, r5, r6, pc} -_0224C23C: - bl sub_02022974 -_0224C240: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov17_0224C0C0 - - thumb_func_start ov17_0224C244 -ov17_0224C244: ; 0x0224C244 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0] - ldr r0, _0224C2C0 ; =0x00000171 - add r7, r2, #0 - ldrb r0, [r1, r0] - str r3, [sp, #0xc] - cmp r0, #0 - bne _0224C266 - ldr r0, _0224C2C4 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027AC0 - add r4, r0, #0 - b _0224C268 -_0224C266: - mov r4, #1 -_0224C268: - add r0, r6, #0 - add r1, r7, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x28] - add r0, r5, #0 - bl ov17_0224C0C0 - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x9c - add r1, #0xa0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x78 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - add r2, r5, #0 - add r0, r5, #0 - str r3, [sp, #8] - add r2, #0xa0 - ldr r2, [r2, #0] - add r0, #0x78 - mov r1, #1 - bl sub_0201D738 - ldr r1, _0224C2C8 ; =0x00000AD4 - strb r0, [r5, r1] - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C2C0: .word 0x00000171 -_0224C2C4: .word 0x00001988 -_0224C2C8: .word 0x00000AD4 - thumb_func_end ov17_0224C244 - - thumb_func_start ov17_0224C2CC -ov17_0224C2CC: ; 0x0224C2CC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #8 - blo _0224C2DE - bl sub_02022974 -_0224C2DE: - lsl r3, r4, #2 - ldr r2, _0224C2F8 ; =0x0225470C - add r0, r5, #0 - ldr r4, _0224C2FC ; =0x0225470E - ldrh r2, [r2, r3] - str r6, [sp] - add r5, #0x98 - ldrb r3, [r4, r3] - ldr r1, [r5, #0] - bl ov17_0224C244 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224C2F8: .word 0x0225470C -_0224C2FC: .word 0x0225470E - thumb_func_end ov17_0224C2CC - - thumb_func_start ov17_0224C300 -ov17_0224C300: ; 0x0224C300 - ldr r1, _0224C308 ; =0x00000AD4 - ldr r3, _0224C30C ; =sub_0201D724 - ldrb r0, [r0, r1] - bx r3 - ; .align 2, 0 -_0224C308: .word 0x00000AD4 -_0224C30C: .word sub_0201D724 - thumb_func_end ov17_0224C300 - - thumb_func_start ov17_0224C310 -ov17_0224C310: ; 0x0224C310 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r3, #1 - str r3, [sp] - str r3, [sp, #4] - ldr r3, _0224C358 ; =0x000080F1 - add r5, r0, #0 - str r3, [sp, #8] - mov r3, #0x4c - add r4, r1, #0 - add r6, r2, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0224C35C ; =0x000080EE - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x4d - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0224C35C ; =0x000080EE - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0x4e - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224C358: .word 0x000080F1 -_0224C35C: .word 0x000080EE - thumb_func_end ov17_0224C310 - - thumb_func_start ov17_0224C360 -ov17_0224C360: ; 0x0224C360 - push {r4, lr} - ldr r1, _0224C37C ; =0x000080F1 - add r4, r0, #0 - bl sub_0200D070 - ldr r1, _0224C380 ; =0x000080EE - add r0, r4, #0 - bl sub_0200D090 - ldr r1, _0224C380 ; =0x000080EE - add r0, r4, #0 - bl sub_0200D0A0 - pop {r4, pc} - ; .align 2, 0 -_0224C37C: .word 0x000080F1 -_0224C380: .word 0x000080EE - thumb_func_end ov17_0224C360 - - thumb_func_start ov17_0224C384 -ov17_0224C384: ; 0x0224C384 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0224C396 - bl sub_02022974 -_0224C396: - mov r0, #0x17 - mov r1, #0x10 - bl sub_02018144 - mov r1, #0 - mov r2, #0x10 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x21 - lsl r0, r0, #4 - str r4, [r5, r0] - str r5, [r4, #8] - ldr r0, [r5, #0x6c] - ldr r1, [r5, #0x70] - ldr r2, _0224C3D8 ; =0x022547FC - bl sub_0200CE6C - str r0, [r4, #4] - ldr r0, [r0, #0] - bl sub_0200D324 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, _0224C3DC ; =ov17_0224C414 - ldr r2, _0224C3E0 ; =0x00009C4F - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224C3D8: .word 0x022547FC -_0224C3DC: .word ov17_0224C414 -_0224C3E0: .word 0x00009C4F - thumb_func_end ov17_0224C384 - - thumb_func_start ov17_0224C3E4 -ov17_0224C3E4: ; 0x0224C3E4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl sub_0200DA58 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r0, [r0, #4] - bl sub_0200D0F4 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x21 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - pop {r4, pc} - thumb_func_end ov17_0224C3E4 - - thumb_func_start ov17_0224C414 -ov17_0224C414: ; 0x0224C414 - ldrb r0, [r1, #0xc] - cmp r0, #0 - beq _0224C422 - cmp r0, #1 - beq _0224C426 - cmp r0, #2 - b _0224C426 -_0224C422: - add r0, r0, #1 - strb r0, [r1, #0xc] -_0224C426: - ldr r0, [r1, #4] - ldr r3, _0224C430 ; =sub_0200D324 - ldr r0, [r0, #0] - bx r3 - nop -_0224C430: .word sub_0200D324 - thumb_func_end ov17_0224C414 - - thumb_func_start ov17_0224C434 -ov17_0224C434: ; 0x0224C434 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, r3, #0 - mov r1, #3 - add r7, r2, #0 - bl ov17_0223F0BC - add r6, r0, #0 - add r0, r4, #0 - mul r0, r6 - add r1, r7, #0 - bl sub_020E2178 - add r1, r0, #0 - mov r3, #1 - lsl r3, r3, #8 - sub r4, r3, r6 - lsr r2, r4, #0x1f - add r2, r4, r2 - sub r1, r1, #1 - asr r2, r2, #1 - add r1, r1, r2 - lsl r1, r1, #0x10 - ldr r0, [r5, #4] - asr r1, r1, #0x10 - mov r2, #0xb0 - lsl r3, r3, #0xc - bl sub_0200D500 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0200D3F4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224C434 - - thumb_func_start ov17_0224C47C -ov17_0224C47C: ; 0x0224C47C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - mov r3, #1 - ldr r0, [r5, #4] - mvn r1, r1 - mov r2, #0xb0 - lsl r3, r3, #0x14 - bl sub_0200D500 - ldr r0, [r5, #4] - add r1, r4, #0 - bl sub_0200D3F4 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0224C47C - - thumb_func_start ov17_0224C49C -ov17_0224C49C: ; 0x0224C49C - push {r3, r4, r5, r6, r7, lr} - add r7, r3, #0 - add r5, r0, #0 - add r6, r1, #0 - str r2, [sp] - add r0, r7, #0 - mov r1, #3 - bl ov17_0223F0BC - add r4, r0, #0 - add r0, r6, #0 - ldr r1, [sp] - mul r0, r4 - bl sub_020E2178 - add r6, r0, #0 - cmp r7, #0 - bne _0224C4D6 - add r0, r7, #0 - mov r1, #1 - bl ov17_0223F0BC - add r1, r0, #0 - ldr r0, _0224C53C ; =0x00002710 - mul r0, r4 - bl sub_020E1F6C - add r7, r0, #0 - b _0224C4E4 -_0224C4D6: - ldr r0, _0224C53C ; =0x00002710 - add r1, r4, #0 - mul r1, r0 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r7, r0, #3 -_0224C4E4: - ldr r0, _0224C53C ; =0x00002710 - add r1, r7, #0 - mul r0, r6 - bl sub_020E2178 - mov r0, #0xb4 - mul r0, r1 - add r1, r7, #0 - bl sub_020E2178 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - mov r1, #0xa - add r2, r0, #0 - mul r2, r1 - add r1, #0xf6 - asr r0, r2, #0xb - sub r3, r1, r4 - lsr r0, r0, #0x14 - lsr r1, r3, #0x1f - add r1, r3, r1 - add r0, r2, r0 - asr r2, r0, #0xc - mov r0, #0x90 - sub r2, r0, r2 - asr r1, r1, #1 - add r1, r6, r1 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - mov r3, #1 - ldr r0, [r5, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - lsl r3, r3, #0x14 - bl sub_0200D500 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0200D3F4 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C53C: .word 0x00002710 - thumb_func_end ov17_0224C49C - - thumb_func_start ov17_0224C540 -ov17_0224C540: ; 0x0224C540 - ldr r3, _0224C548 ; =sub_0200D3F4 - ldr r0, [r0, #4] - mov r1, #0 - bx r3 - ; .align 2, 0 -_0224C548: .word sub_0200D3F4 - thumb_func_end ov17_0224C540 - - thumb_func_start ov17_0224C54C -ov17_0224C54C: ; 0x0224C54C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - mov r1, #3 - bl ov17_0223F0BC - add r4, r0, #0 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0200D3F4 - mov r3, #1 - lsl r3, r3, #8 - sub r2, r3, r4 - lsr r1, r2, #0x1f - add r1, r2, r1 - lsl r1, r1, #0xf - ldr r0, [r5, #4] - asr r1, r1, #0x10 - mov r2, #0x90 - lsl r3, r3, #0xc - bl sub_0200D500 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0224C54C - - thumb_func_start ov17_0224C57C -ov17_0224C57C: ; 0x0224C57C - push {r3, r4} - ldr r2, _0224C59C ; =0x022546C0 - add r1, sp, #0 - ldrb r3, [r2] - add r4, sp, #0 - strb r3, [r1] - ldrb r3, [r2, #1] - strb r3, [r1, #1] - ldrb r3, [r2, #2] - ldrb r2, [r2, #3] - strb r3, [r1, #2] - strb r2, [r1, #3] - ldrb r0, [r4, r0] - pop {r3, r4} - bx lr - nop -_0224C59C: .word 0x022546C0 - thumb_func_end ov17_0224C57C - - thumb_func_start ov17_0224C5A0 -ov17_0224C5A0: ; 0x0224C5A0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - add r7, r2, #0 - cmp r4, #8 - blo _0224C5B2 - bl sub_02022974 -_0224C5B2: - ldr r0, _0224C634 ; =0x00001C0D - ldrb r0, [r5, r0] - cmp r0, #1 - beq _0224C62E - add r0, r5, #0 - mov r1, #1 - add r0, #0x88 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - ldr r0, [r5, #0x74] - mov r1, #1 - bl sub_0201C3C0 - add r0, r5, #0 - add r0, #0x98 - ldr r1, _0224C638 ; =0x0225470C - lsl r4, r4, #2 - ldrh r1, [r1, r4] - ldr r0, [r0, #0] - bl sub_0200B1EC - ldr r1, _0224C63C ; =0x0225470E - add r6, r0, #0 - ldrb r1, [r1, r4] - add r0, r5, #0 - add r2, r7, #0 - bl ov17_0224C0C0 - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x9c - add r1, #0xa0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x88 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - add r2, r5, #0 - add r0, r5, #0 - str r3, [sp, #8] - add r2, #0xa0 - ldr r2, [r2, #0] - add r0, #0x88 - mov r1, #1 - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0224C634 ; =0x00001C0D - mov r1, #1 - strb r1, [r5, r0] -_0224C62E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224C634: .word 0x00001C0D -_0224C638: .word 0x0225470C -_0224C63C: .word 0x0225470E - thumb_func_end ov17_0224C5A0 - - thumb_func_start ov17_0224C640 -ov17_0224C640: ; 0x0224C640 - push {r4, lr} - add r4, r0, #0 - add r0, #0x88 - mov r1, #1 - bl sub_0200E084 - ldr r0, [r4, #0x74] - mov r1, #1 - bl sub_0201C3C0 - ldr r0, _0224C65C ; =0x00001C0D - mov r1, #0 - strb r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_0224C65C: .word 0x00001C0D - thumb_func_end ov17_0224C640 - - thumb_func_start ov17_0224C660 -ov17_0224C660: ; 0x0224C660 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _0224C69C ; =0x00000B08 - ldrb r1, [r1, #4] - ldr r3, [r5, r0] - add r6, r2, #0 - mul r1, r3 - mul r6, r1 - add r1, r0, #4 - add r0, #8 - ldr r1, [r5, r1] - ldr r0, [r5, r0] - mov r4, #0 - add r0, r1, r0 - mul r0, r2 - add r0, r1, r0 - ldr r1, _0224C6A0 ; =0x00002710 - bl sub_020E2178 - add r1, r4, #0 - add r3, r6, r0 - ldr r0, _0224C6A4 ; =0x00001154 - adc r4, r1 - ldr r2, [r5, r0] - add r0, r0, #4 - ldr r1, [r5, r0] - sub r0, r3, r2 - sbc r4, r1 - add r1, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224C69C: .word 0x00000B08 -_0224C6A0: .word 0x00002710 -_0224C6A4: .word 0x00001154 - thumb_func_end ov17_0224C660 - - thumb_func_start ov17_0224C6A8 -ov17_0224C6A8: ; 0x0224C6A8 - ldr r3, _0224C6AC ; =ov17_0224C660 - bx r3 - ; .align 2, 0 -_0224C6AC: .word ov17_0224C660 - thumb_func_end ov17_0224C6A8 - - thumb_func_start ov17_0224C6B0 -ov17_0224C6B0: ; 0x0224C6B0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - mov r0, #0 - strb r0, [r7] - mov r0, #0x17 - mov r1, #0x2c - bl sub_02018144 - mov r1, #0 - mov r2, #0x2c - add r4, r0, #0 - bl sub_020C4CF4 - add r1, r6, #0 - add r1, #0x18 - lsl r0, r5, #4 - str r6, [r4, #0] - add r0, r1, r0 - str r0, [r4, #4] - mov r0, #0x85 - lsl r0, r0, #2 - add r1, r6, r0 - mov r0, #0x18 - mul r0, r5 - add r0, r1, r0 - str r0, [r4, #8] - mov r0, #0xad - str r7, [r4, #0xc] - add r1, r6, r5 - lsl r0, r0, #4 - ldrb r0, [r1, r0] - ldr r2, _0224C70C ; =0x00009C40 - cmp r0, #1 - bne _0224C702 - ldr r0, _0224C710 ; =ov17_0224C718 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_0224C702: - ldr r0, _0224C714 ; =ov17_0224C7B8 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C70C: .word 0x00009C40 -_0224C710: .word ov17_0224C718 -_0224C714: .word ov17_0224C7B8 - thumb_func_end ov17_0224C6B0 - - thumb_func_start ov17_0224C718 -ov17_0224C718: ; 0x0224C718 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _0224C72A - cmp r0, #1 - beq _0224C74A - b _0224C79A -_0224C72A: - ldr r0, [r4, #8] - mov r1, #1 - mov r2, #0 - bl ov17_0224AC78 - ldr r0, [r4, #4] - ldr r0, [r0, #8] - lsl r0, r0, #8 - str r0, [r4, #0x1c] - str r0, [r4, #0x18] - mov r0, #5 - lsl r0, r0, #8 - str r0, [r4, #0x14] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_0224C74A: - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x14] - sub r0, r1, r0 - str r0, [r4, #0x18] - mov r0, #2 - ldr r1, [r4, #0x14] - lsl r0, r0, #8 - sub r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [r4, #0x1c] - ldr r0, [r4, #0x18] - cmp r0, r1 - blt _0224C77E - str r1, [r4, #0x18] - ldrb r0, [r4, #0x11] - add r0, r0, #1 - strb r0, [r4, #0x11] - ldrb r0, [r4, #0x11] - cmp r0, #1 - bls _0224C77A - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - b _0224C77E -_0224C77A: - mov r0, #0 - strb r0, [r4, #0x10] -_0224C77E: - ldr r1, [r4, #0x18] - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 - ldr r0, [r4, #4] - str r1, [r0, #8] - ldr r2, [r4, #4] - ldr r0, [r2, #0] - ldr r1, [r2, #4] - ldr r2, [r2, #8] - bl ov22_0225B100 - pop {r3, r4, r5, pc} -_0224C79A: - ldr r0, [r4, #0xc] - mov r1, #1 - strb r1, [r0] - ldr r0, [r4, #8] - add r2, r1, #0 - bl ov17_0224AC78 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0224C718 - - thumb_func_start ov17_0224C7B8 -ov17_0224C7B8: ; 0x0224C7B8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _0224C7CA - cmp r0, #1 - beq _0224C7DA - b _0224C834 -_0224C7CA: - ldr r0, [r4, #4] - ldr r0, [r0, #4] - lsl r0, r0, #8 - str r0, [r4, #0x28] - str r0, [r4, #0x24] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_0224C7DA: - ldr r0, [r4, #0x20] - bl sub_0201D2B8 - lsl r1, r0, #2 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - mov r1, #0x32 - ldr r2, [r4, #0x20] - lsl r1, r1, #0xc - add r1, r2, r1 - str r1, [r4, #0x20] - asr r2, r1, #0xc - mov r1, #0x5a - lsl r1, r1, #2 - asr r0, r0, #0xc - cmp r2, r1 - blt _0224C816 - ldrb r1, [r4, #0x11] - add r1, r1, #1 - strb r1, [r4, #0x11] - ldrb r1, [r4, #0x11] - cmp r1, #5 - bls _0224C816 - ldr r0, [r4, #0x28] - str r0, [r4, #0x24] - ldrb r1, [r4, #0x10] - mov r0, #0 - add r1, r1, #1 - strb r1, [r4, #0x10] -_0224C816: - ldr r2, [r4, #0x24] - asr r1, r2, #7 - lsr r1, r1, #0x18 - add r1, r2, r1 - asr r1, r1, #8 - add r1, r1, r0 - ldr r0, [r4, #4] - str r1, [r0, #4] - ldr r2, [r4, #4] - ldr r0, [r2, #0] - ldr r1, [r2, #4] - ldr r2, [r2, #8] - bl ov22_0225B100 - pop {r3, r4, r5, pc} -_0224C834: - ldr r0, [r4, #0xc] - mov r1, #1 - strb r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0224C7B8 - - thumb_func_start ov17_0224C848 -ov17_0224C848: ; 0x0224C848 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224C848 - - thumb_func_start ov17_0224C84C -ov17_0224C84C: ; 0x0224C84C - push {r3, lr} - ldr r0, _0224C860 ; =0x04000050 - mov r3, #0 - mov r1, #1 - mov r2, #0x3e - str r3, [sp] - bl sub_020BF55C - pop {r3, pc} - nop -_0224C860: .word 0x04000050 - thumb_func_end ov17_0224C84C - - thumb_func_start ov17_0224C864 -ov17_0224C864: ; 0x0224C864 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0xa4 - add r5, r1, #0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02003164 - ldr r3, _0224C890 ; =0x022546DC - lsl r5, r5, #2 - ldrh r1, [r3, r5] - add r3, r3, r5 - ldr r2, _0224C894 ; =0x00001FE3 - str r1, [sp] - ldrh r3, [r3, #2] - ldr r1, _0224C898 ; =0x00001128 - lsl r3, r3, #0x18 - ldr r1, [r4, r1] - lsr r3, r3, #0x18 - bl sub_020039F8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224C890: .word 0x022546DC -_0224C894: .word 0x00001FE3 -_0224C898: .word 0x00001128 - thumb_func_end ov17_0224C864 - - thumb_func_start ov17_0224C89C -ov17_0224C89C: ; 0x0224C89C - push {r3, lr} - ldrb r2, [r1, #7] - cmp r2, #0 - bne _0224C8E4 - ldrb r2, [r1, #4] - cmp r2, #0 - beq _0224C8B2 - cmp r2, #1 - beq _0224C8B2 - cmp r2, #2 - b _0224C8DE -_0224C8B2: - ldrb r2, [r1, #3] - cmp r2, #4 - bhi _0224C8E0 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224C8C4: ; jump table - .short _0224C8E0 - _0224C8C4 - 2 ; case 0 - .short _0224C8CE - _0224C8C4 - 2 ; case 1 - .short _0224C8D2 - _0224C8C4 - 2 ; case 2 - .short _0224C8D6 - _0224C8C4 - 2 ; case 3 - .short _0224C8DA - _0224C8C4 - 2 ; case 4 -_0224C8CE: - mov r1, #1 - b _0224C8E0 -_0224C8D2: - mov r1, #2 - b _0224C8E0 -_0224C8D6: - mov r1, #3 - b _0224C8E0 -_0224C8DA: - mov r1, #4 - b _0224C8E0 -_0224C8DE: - mov r1, #5 -_0224C8E0: - bl ov17_0224C864 -_0224C8E4: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224C89C - - thumb_func_start ov17_0224C8E8 -ov17_0224C8E8: ; 0x0224C8E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp, #4] - ldr r1, _0224C97C ; =0x00000B04 - str r0, [sp] - ldr r0, [r0, r1] - ldr r5, _0224C980 ; =0x04000280 - lsr r0, r0, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - ldr r1, _0224C984 ; =0x00001BBC - add r6, r0, #0 - add r7, r0, r1 - lsr r4, r5, #0xb -_0224C908: - ldrb r0, [r7] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224C968 - ldr r1, [sp] - ldr r0, _0224C988 ; =0x00000B1B - ldrb r0, [r1, r0] - mov r1, #4 - bl ov17_0223F0BC - ldr r1, _0224C98C ; =0x00001BBA - lsr r2, r0, #0x1f - add r2, r0, r2 - ldrb r1, [r6, r1] - asr r0, r2, #1 - add r0, r1, r0 - ldr r1, [sp, #8] - mul r0, r1 - mov r1, #0 - strh r1, [r5] - ldr r1, _0224C990 ; =0x04000290 - str r0, [r1, #0] - ldr r1, _0224C994 ; =0x00002710 - ldr r0, _0224C998 ; =0x04000298 - str r1, [r0, #0] - mov r1, #0 - str r1, [r0, #4] -_0224C940: - ldrh r0, [r5] - tst r0, r4 - bne _0224C940 - ldr r0, _0224C99C ; =0x040002A0 - ldr r1, [r0, #0] - ldr r0, [sp, #4] - cmp r1, r0 - bne _0224C968 - ldr r0, [sp] - ldr r2, _0224C9A0 ; =0x00001BB4 - add r1, r0, #0 - add r3, r1, r2 - ldr r1, [sp, #0xc] - mov r2, #0xa - mul r2, r1 - add r1, r3, r2 - bl ov17_0224C89C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_0224C968: - ldr r0, [sp, #0xc] - add r7, #0xa - add r0, r0, #1 - add r6, #0xa - str r0, [sp, #0xc] - cmp r0, #8 - blt _0224C908 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C97C: .word 0x00000B04 -_0224C980: .word 0x04000280 -_0224C984: .word 0x00001BBC -_0224C988: .word 0x00000B1B -_0224C98C: .word 0x00001BBA -_0224C990: .word 0x04000290 -_0224C994: .word 0x00002710 -_0224C998: .word 0x04000298 -_0224C99C: .word 0x040002A0 -_0224C9A0: .word 0x00001BB4 - thumb_func_end ov17_0224C8E8 - - thumb_func_start ov17_0224C9A4 -ov17_0224C9A4: ; 0x0224C9A4 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224C9B6 - bl sub_02022974 -_0224C9B6: - mov r0, #0x81 - lsl r0, r0, #2 - add r5, r4, r0 - ldr r0, _0224C9CC ; =ov17_0224CA28 - ldr r2, _0224C9D0 ; =0x00009C40 - add r1, r5, #0 - str r4, [r5, #0] - bl sub_0200D9E8 - str r0, [r5, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224C9CC: .word ov17_0224CA28 -_0224C9D0: .word 0x00009C40 - thumb_func_end ov17_0224C9A4 - - thumb_func_start ov17_0224C9D4 -ov17_0224C9D4: ; 0x0224C9D4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224C9EE - bl sub_0200DA58 - mov r0, #0x82 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_0224C9EE: - pop {r4, pc} - thumb_func_end ov17_0224C9D4 - - thumb_func_start ov17_0224C9F0 -ov17_0224C9F0: ; 0x0224C9F0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x81 - lsl r1, r1, #2 - add r4, r0, r1 - ldr r0, [r4, #4] - cmp r0, #0 - bne _0224CA04 - bl sub_02022974 -_0224CA04: - cmp r5, #0 - bne _0224CA0C - mov r0, #0x40 - b _0224CA0E -_0224CA0C: - mov r0, #0x30 -_0224CA0E: - strb r0, [r4, #0xa] - mov r0, #1 - strb r0, [r4, #0xb] - mov r0, #0xa - lsl r0, r0, #8 - strh r0, [r4, #8] - ldr r0, _0224CA24 ; =0x000006F8 - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_0224CA24: .word 0x000006F8 - thumb_func_end ov17_0224C9F0 - - thumb_func_start ov17_0224CA28 -ov17_0224CA28: ; 0x0224CA28 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r0, [r4, #0xb] - cmp r0, #0 - beq _0224CA82 - ldr r0, [r4, #0] - mov r1, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_02003164 - ldrb r1, [r4, #0xa] - lsl r3, r1, #1 - ldr r1, _0224CA88 ; =0x00007FFF - add r0, r0, r3 - str r1, [sp] - ldr r2, [r4, #0] - ldr r1, _0224CA8C ; =0x00001128 - ldr r1, [r2, r1] - mov r2, #0x10 - add r1, r1, r3 - ldrh r3, [r4, #8] - asr r3, r3, #8 - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0200393C - ldrh r1, [r4, #8] - cmp r1, #0 - bne _0224CA6E - mov r0, #0 - add sp, #4 - strb r0, [r4, #0xb] - pop {r3, r4, pc} -_0224CA6E: - mov r0, #1 - lsl r0, r0, #8 - cmp r1, r0 - bls _0224CA7E - sub r0, r1, r0 - add sp, #4 - strh r0, [r4, #8] - pop {r3, r4, pc} -_0224CA7E: - mov r0, #0 - strh r0, [r4, #8] -_0224CA82: - add sp, #4 - pop {r3, r4, pc} - nop -_0224CA88: .word 0x00007FFF -_0224CA8C: .word 0x00001128 - thumb_func_end ov17_0224CA28 - - thumb_func_start ov17_0224CA90 -ov17_0224CA90: ; 0x0224CA90 - push {r3, r4, r5, lr} - ldr r5, _0224CAB8 ; =0x0000113C - add r4, r0, #0 - str r2, [r4, r5] - add r0, r5, #4 - str r3, [r4, r0] - add r0, r5, #0 - ldr r2, [sp, #0x10] - add r0, #8 - str r2, [r4, r0] - ldr r0, [sp, #0x14] - add r5, #0xc - str r0, [r4, r5] - ldr r0, [r4, #0xc] - ldr r2, _0224CABC ; =ov17_0224CAC0 - add r3, r4, #0 - bl sub_020146F4 - pop {r3, r4, r5, pc} - nop -_0224CAB8: .word 0x0000113C -_0224CABC: .word ov17_0224CAC0 - thumb_func_end ov17_0224CA90 - - thumb_func_start ov17_0224CAC0 -ov17_0224CAC0: ; 0x0224CAC0 - push {r4, lr} - add r4, r0, #0 - bl sub_02014764 - ldr r1, _0224CAFC ; =0x0000113C - add r1, r0, r1 - ldr r0, [r4, #0x20] - ldr r2, [r1, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r2, r0 - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r2, [r1, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r2, r0 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x20] - ldr r2, [r1, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r2, r0 - str r0, [r4, #0x30] - ldr r1, [r1, #0xc] - add r0, r4, #0 - bl sub_020147B0 - pop {r4, pc} - nop -_0224CAFC: .word 0x0000113C - thumb_func_end ov17_0224CAC0 - - thumb_func_start ov17_0224CB00 -ov17_0224CB00: ; 0x0224CB00 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r3, _0224CB70 ; =0x00000B1B - add r5, r0, #0 - ldrb r3, [r5, r3] - lsl r1, r1, #2 - lsl r4, r3, #2 - ldr r3, _0224CB74 ; =0x022546C4 - cmp r2, #0 - ldr r3, [r3, r4] - ldr r4, [r3, r1] - ldr r1, _0224CB78 ; =0xFFFFEB80 - ldr r3, _0224CB7C ; =0xFFFFBADC - bne _0224CB46 - str r1, [sp] - mov r1, #1 - lsl r1, r1, #0xc - str r1, [sp, #4] - mov r1, #0 - add r2, r4, #0 - bl ov17_0224CA90 - ldr r0, _0224CB78 ; =0xFFFFEB80 - ldr r3, _0224CB7C ; =0xFFFFBADC - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - bl ov17_0224CA90 - add sp, #8 - pop {r3, r4, r5, pc} -_0224CB46: - str r1, [sp] - mov r1, #1 - lsl r1, r1, #0xc - str r1, [sp, #4] - mov r1, #2 - add r2, r4, #0 - bl ov17_0224CA90 - ldr r0, _0224CB78 ; =0xFFFFEB80 - ldr r3, _0224CB7C ; =0xFFFFBADC - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #3 - add r2, r4, #0 - bl ov17_0224CA90 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224CB70: .word 0x00000B1B -_0224CB74: .word 0x022546C4 -_0224CB78: .word 0xFFFFEB80 -_0224CB7C: .word 0xFFFFBADC - thumb_func_end ov17_0224CB00 - - thumb_func_start ov17_0224CB80 -ov17_0224CB80: ; 0x0224CB80 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - cmp r1, #0 - ldr r1, _0224CD34 ; =0xFFFFEB80 - ldr r3, _0224CD38 ; =0xFFFFE764 - bne _0224CC0E - str r1, [sp] - mov r1, #1 - lsl r1, r1, #0xc - str r1, [sp, #4] - ldr r2, _0224CD3C ; =0xFFFFCD38 - mov r1, #5 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD3C ; =0xFFFFCD38 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #6 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD3C ; =0xFFFFCD38 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #7 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD40 ; =0x00005014 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #5 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD40 ; =0x00005014 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #6 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD40 ; =0x00005014 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #7 - bl ov17_0224CA90 - b _0224CCE4 -_0224CC0E: - str r1, [sp] - mov r1, #1 - lsl r1, r1, #0xc - str r1, [sp, #4] - ldr r2, _0224CD44 ; =0xFFFFBD98 - mov r1, #8 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD44 ; =0xFFFFBD98 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #9 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD44 ; =0xFFFFBD98 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #0xa - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD44 ; =0xFFFFBD98 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #0xb - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD44 ; =0xFFFFBD98 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #0xc - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD48 ; =0x00004074 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #8 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD48 ; =0x00004074 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #9 - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD48 ; =0x00004074 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #0xa - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD48 ; =0x00004074 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #0xb - bl ov17_0224CA90 - ldr r0, _0224CD34 ; =0xFFFFEB80 - ldr r2, _0224CD48 ; =0x00004074 - str r0, [sp] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r3, _0224CD38 ; =0xFFFFE764 - add r0, r4, #0 - mov r1, #0xc - bl ov17_0224CA90 -_0224CCE4: - mov r0, #0 - str r0, [sp] - ldr r0, _0224CD4C ; =0x00007FFF - ldr r1, _0224CD50 ; =0x00001FE3 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #8 - mov r3, #0x10 - bl ov17_0224CD84 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r2, _0224CD4C ; =0x00007FFF - add r0, r4, #0 - str r2, [sp, #8] - add r0, #0xa4 - mov r1, #4 - ldr r0, [r0, #0] - lsr r2, r2, #1 - sub r3, r1, #5 - bl sub_02003178 - ldr r0, _0224CD54 ; =0x04000050 - mov r1, #0x3f - mov r2, #0x10 - bl sub_020BF578 - mov r2, #0xfa - ldr r0, _0224CD58 ; =ov17_0224CD60 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - ldr r0, _0224CD5C ; =0x000006E5 - bl sub_02005748 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0224CD34: .word 0xFFFFEB80 -_0224CD38: .word 0xFFFFE764 -_0224CD3C: .word 0xFFFFCD38 -_0224CD40: .word 0x00005014 -_0224CD44: .word 0xFFFFBD98 -_0224CD48: .word 0x00004074 -_0224CD4C: .word 0x00007FFF -_0224CD50: .word 0x00001FE3 -_0224CD54: .word 0x04000050 -_0224CD58: .word ov17_0224CD60 -_0224CD5C: .word 0x000006E5 - thumb_func_end ov17_0224CB80 - - thumb_func_start ov17_0224CD60 -ov17_0224CD60: ; 0x0224CD60 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r3, #0 - ldr r0, _0224CD80 ; =0x04000050 - mov r1, #1 - mov r2, #0x3e - str r3, [sp] - bl sub_020BF55C - add r0, r4, #0 - bl sub_0200DA58 - add sp, #4 - pop {r3, r4, pc} - nop -_0224CD80: .word 0x04000050 - thumb_func_end ov17_0224CD60 - - thumb_func_start ov17_0224CD84 -ov17_0224CD84: ; 0x0224CD84 - push {r3, r4, r5, lr} - ldr r4, _0224CDB0 ; =0x00001128 - ldr r5, [sp, #0x10] - add r4, r0, r4 - lsl r0, r3, #8 - strh r0, [r4, #8] - lsl r0, r5, #8 - strh r0, [r4, #0xa] - add r0, sp, #0 - ldrh r0, [r0, #0x14] - strh r0, [r4, #0xe] - sub r0, r5, r3 - strh r1, [r4, #6] - lsl r0, r0, #8 - add r1, r2, #0 - bl sub_020E2178 - strh r0, [r4, #0xc] - mov r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} - nop -_0224CDB0: .word 0x00001128 - thumb_func_end ov17_0224CD84 - - thumb_func_start ov17_0224CDB4 -ov17_0224CDB4: ; 0x0224CDB4 - ldr r2, _0224CDBC ; =0x00001139 - strb r1, [r0, r2] - bx lr - nop -_0224CDBC: .word 0x00001139 - thumb_func_end ov17_0224CDB4 - - thumb_func_start ov17_0224CDC0 -ov17_0224CDC0: ; 0x0224CDC0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - cmp r2, #0 - bne _0224CDD0 - ldr r7, _0224CDFC ; =0x00007FFF - ldr r6, _0224CE00 ; =0x0000254A - b _0224CDD4 -_0224CDD0: - ldr r7, _0224CE00 ; =0x0000254A - ldr r6, _0224CDFC ; =0x00007FFF -_0224CDD4: - mov r4, #0 -_0224CDD6: - ldr r0, [sp] - cmp r4, r0 - ldr r0, [r5, #0x18] - bne _0224CDE6 - add r1, r7, #0 - bl ov22_0225B198 - b _0224CDEC -_0224CDE6: - add r1, r6, #0 - bl ov22_0225B198 -_0224CDEC: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0224CDD6 - ldr r0, _0224CE04 ; =0x000006EC - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224CDFC: .word 0x00007FFF -_0224CE00: .word 0x0000254A -_0224CE04: .word 0x000006EC - thumb_func_end ov17_0224CDC0 - - thumb_func_start ov17_0224CE08 -ov17_0224CE08: ; 0x0224CE08 - push {r4, r5, r6, lr} - ldr r6, _0224CE24 ; =0x00007FFF - add r5, r0, #0 - mov r4, #0 -_0224CE10: - ldr r0, [r5, #0x18] - add r1, r6, #0 - bl ov22_0225B198 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0224CE10 - pop {r4, r5, r6, pc} - nop -_0224CE24: .word 0x00007FFF - thumb_func_end ov17_0224CE08 - - thumb_func_start ov17_0224CE28 -ov17_0224CE28: ; 0x0224CE28 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #0xc] - mov r4, #0 - add r5, sp, #0x18 - add r3, sp, #0x14 - ldr r2, _0224CED4 ; =0x00000AF6 - b _0224CE46 -_0224CE38: - ldr r1, [sp, #0xc] - lsl r0, r4, #1 - add r1, r1, r0 - ldrsh r1, [r1, r2] - strb r4, [r3, r4] - add r4, r4, #1 - strh r1, [r5, r0] -_0224CE46: - cmp r4, #4 - blt _0224CE38 - mov r4, #0 - add r7, sp, #0x18 - b _0224CE7A -_0224CE50: - mov r6, #3 - b _0224CE74 -_0224CE54: - sub r3, r6, #1 - lsl r5, r3, #1 - lsl r1, r6, #1 - ldrsh r2, [r7, r5] - ldrsh r0, [r7, r1] - cmp r2, r0 - bge _0224CE72 - strh r2, [r7, r1] - strh r0, [r7, r5] - add r0, sp, #0x14 - add r1, sp, #0x14 - ldrb r0, [r0, r6] - ldrb r2, [r1, r3] - strb r2, [r1, r6] - strb r0, [r1, r3] -_0224CE72: - sub r6, r6, #1 -_0224CE74: - cmp r6, r4 - bgt _0224CE54 - add r4, r4, #1 -_0224CE7A: - cmp r4, #3 - blt _0224CE50 - ldr r3, _0224CED8 ; =0x022549C0 - add r0, sp, #0x10 - ldrb r1, [r3] - mov r4, #1 - add r2, sp, #0x10 - strb r1, [r0] - add r1, sp, #0x18 - b _0224CEA6 -_0224CE8E: - ldrb r0, [r3, r4] - sub r6, r4, #1 - lsl r5, r6, #1 - strb r0, [r2, r4] - lsl r0, r4, #1 - ldrsh r0, [r1, r0] - ldrsh r5, [r1, r5] - cmp r0, r5 - bne _0224CEA4 - ldrb r0, [r2, r6] - strb r0, [r2, r4] -_0224CEA4: - add r4, r4, #1 -_0224CEA6: - cmp r4, #4 - blt _0224CE8E - mov r4, #0 - add r5, sp, #0x10 - mov r6, #0x1e - add r7, r4, #0 - b _0224CECC -_0224CEB4: - ldrb r0, [r5, r4] - add r1, sp, #0x14 - ldrb r1, [r1, r4] - str r0, [sp] - str r6, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _0224CEDC ; =0x00007FFF - ldr r3, _0224CEE0 ; =0x0000254A - str r7, [sp, #8] - bl ov17_0224CEE4 - add r4, r4, #1 -_0224CECC: - cmp r4, #4 - blt _0224CEB4 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224CED4: .word 0x00000AF6 -_0224CED8: .word 0x022549C0 -_0224CEDC: .word 0x00007FFF -_0224CEE0: .word 0x0000254A - thumb_func_end ov17_0224CE28 - - thumb_func_start ov17_0224CEE4 -ov17_0224CEE4: ; 0x0224CEE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - str r1, [sp] - mov r0, #0x17 - mov r1, #0x14 - add r6, r2, #0 - str r3, [sp, #4] - ldr r5, [sp, #0x28] - bl sub_02018144 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r1, [sp, #0x24] - lsl r0, r0, #4 - add r0, r7, r0 - ldr r0, [r0, #0x18] - str r0, [r4, #0] - strh r6, [r4, #8] - ldr r0, [sp, #4] - strh r0, [r4, #0xa] - ldr r0, [sp, #0x20] - strb r0, [r4, #0x10] - lsl r0, r0, #8 - bl sub_020E1F6C - strh r0, [r4, #0xc] - str r5, [r4, #4] - cmp r5, #0 - beq _0224CF2C - mov r0, #0 - strb r0, [r5] -_0224CF2C: - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov22_0225B198 - ldr r0, _0224CF44 ; =ov17_0224CF4C - ldr r2, _0224CF48 ; =0x00009C40 - add r1, r4, #0 - bl sub_0200D9E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224CF44: .word ov17_0224CF4C -_0224CF48: .word 0x00009C40 - thumb_func_end ov17_0224CEE4 - - thumb_func_start ov17_0224CF4C -ov17_0224CF4C: ; 0x0224CF4C - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - ldrh r1, [r5, #0xe] - ldrh r0, [r5, #0xc] - add r0, r1, r0 - strh r0, [r5, #0xe] - ldrh r0, [r5, #0xe] - asr r4, r0, #8 - ldrb r0, [r5, #0x10] - cmp r4, r0 - ble _0224CF68 - add r4, r0, #0 -_0224CF68: - ldrh r0, [r5, #0xa] - lsl r3, r4, #0x18 - add r1, sp, #4 - str r0, [sp] - add r0, r5, #0 - add r0, #8 - mov r2, #1 - lsr r3, r3, #0x18 - bl sub_0200393C - add r1, sp, #4 - ldrh r1, [r1] - ldr r0, [r5, #0] - bl ov22_0225B198 - ldrb r0, [r5, #0x10] - cmp r4, r0 - blt _0224CFA2 - ldr r1, [r5, #4] - cmp r1, #0 - beq _0224CF96 - mov r0, #1 - strb r0, [r1] -_0224CF96: - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0224CFA2: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_0224CF4C - - thumb_func_start ov17_0224CFA8 -ov17_0224CFA8: ; 0x0224CFA8 - cmp r0, #0x32 - beq _0224CFB0 - cmp r0, #0x33 - bne _0224CFB4 -_0224CFB0: - mov r0, #0 - bx lr -_0224CFB4: - mov r0, #1 - bx lr - thumb_func_end ov17_0224CFA8 - - thumb_func_start ov17_0224CFB8 -ov17_0224CFB8: ; 0x0224CFB8 - push {r3, r4, lr} - sub sp, #0xc - ldr r1, _0224CFEC ; =0x022549E4 - add r3, sp, #0 - str r1, [sp] - mov r1, #0xd - strh r1, [r3, #4] - ldr r1, [r0, #0] - ldr r2, _0224CFF0 ; =0x00000123 - ldrb r1, [r1, r2] - strb r1, [r3, #6] - sub r1, r2, #7 - ldr r4, [r0, #0] - add r2, #0x4e - ldrb r1, [r4, r1] - strb r1, [r3, #8] - ldr r1, [r0, #0] - ldrb r1, [r1, r2] - strb r1, [r3, #7] - ldr r1, _0224CFF4 ; =0x00001174 - add r0, r0, r1 - add r1, sp, #0 - bl ov17_0224F18C - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0224CFEC: .word 0x022549E4 -_0224CFF0: .word 0x00000123 -_0224CFF4: .word 0x00001174 - thumb_func_end ov17_0224CFB8 - - thumb_func_start ov17_0224CFF8 -ov17_0224CFF8: ; 0x0224CFF8 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224CFF8 - - thumb_func_start ov17_0224D00C -ov17_0224D00C: ; 0x0224D00C - push {r3, lr} - add r1, r2, #0 - mov r2, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D00C - - thumb_func_start ov17_0224D01C -ov17_0224D01C: ; 0x0224D01C - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224D01C - - thumb_func_start ov17_0224D020 -ov17_0224D020: ; 0x0224D020 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D020 - - thumb_func_start ov17_0224D034 -ov17_0224D034: ; 0x0224D034 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x17 - mov r1, #0x18 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _0224D070 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _0224D074 ; =ov17_0224D078 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D070: .word 0x00007530 -_0224D074: .word ov17_0224D078 - thumb_func_end ov17_0224D034 - - thumb_func_start ov17_0224D078 -ov17_0224D078: ; 0x0224D078 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r1, #0x10] - str r1, [sp] - cmp r0, #0 - beq _0224D088 - b _0224D1AE -_0224D088: - ldr r0, [sp] - mov r1, #0x14 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _0224D09C - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x14] - pop {r4, r5, r6, r7, pc} -_0224D09C: - ldr r0, [sp] - mov r1, #0x13 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _0224D0B0 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x13] - pop {r4, r5, r6, r7, pc} -_0224D0B0: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - ldr r0, [r0, #0] - mov r1, #2 - ldr r0, [r0, #0x74] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _0224D128 -_0224D0C8: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - ldr r0, _0224D1CC ; =0x022549C4 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _0224D122 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r0, [r0, #0x12] - mov r7, #0x3f - str r5, [sp, #4] - lsl r1, r0, #1 - ldr r0, _0224D1D0 ; =0x022549CC - lsl r7, r7, #0xa - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r0, r0, #5 - add r6, r1, r0 - b _0224D11C -_0224D0F8: - mov r4, #0 - b _0224D110 -_0224D0FC: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_0224D110: - cmp r4, #8 - blt _0224D0FC - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_0224D11C: - ldr r0, [sp, #4] - cmp r0, #4 - blt _0224D0F8 -_0224D122: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_0224D128: - ldr r0, [sp, #8] - cmp r0, #4 - blt _0224D0C8 - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _0224D16A - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _0224D16A - ldr r0, _0224D1CC ; =0x022549C4 - sub r1, r1, #1 - ldrsb r0, [r0, r1] - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #0x3f - str r0, [sp, #4] - lsl r1, r1, #0xa - b _0224D164 -_0224D154: - ldr r0, [sp, #4] - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r1 - strh r0, [r3, r2] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_0224D164: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _0224D154 -_0224D16A: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x74] - bl sub_0201C3C0 - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _0224D1C8 - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _0224D1C8 - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_0224D1AE: - add r0, r1, #0 - mov r2, #0 - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224D1C8: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D1CC: .word 0x022549C4 -_0224D1D0: .word 0x022549CC - thumb_func_end ov17_0224D078 - - thumb_func_start ov17_0224D1D4 -ov17_0224D1D4: ; 0x0224D1D4 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D1D4 - - thumb_func_start ov17_0224D1E8 -ov17_0224D1E8: ; 0x0224D1E8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - mov r0, #0x17 - mov r1, #0x18 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - ldr r2, _0224D230 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _0224D234 ; =ov17_0224D240 - str r7, [r4, #0xc] - bl sub_0200D9E8 - ldr r0, _0224D238 ; =0x00001150 - mov r1, #0 - strb r1, [r6, r0] - ldr r0, _0224D23C ; =0x0000046F - bl sub_0200549C - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D230: .word 0x00007530 -_0224D234: .word ov17_0224D240 -_0224D238: .word 0x00001150 -_0224D23C: .word 0x0000046F - thumb_func_end ov17_0224D1E8 - - thumb_func_start ov17_0224D240 -ov17_0224D240: ; 0x0224D240 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r1, #0x10] - str r1, [sp] - cmp r0, #0 - beq _0224D250 - b _0224D39E -_0224D250: - ldr r0, [sp] - mov r1, #0x14 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _0224D264 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x14] - pop {r4, r5, r6, r7, pc} -_0224D264: - ldr r0, [sp] - mov r1, #0x13 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _0224D278 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x13] - pop {r4, r5, r6, r7, pc} -_0224D278: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - ldr r0, [r0, #0] - mov r1, #2 - ldr r0, [r0, #0x74] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _0224D2F8 -_0224D290: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - mov r0, #4 - sub r1, r0, r1 - ldr r0, _0224D3BC ; =0x022549C4 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _0224D2F2 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r1, [r0, #0x12] - mov r0, #0xb - mov r7, #0x3f - sub r0, r0, r1 - lsl r1, r0, #1 - ldr r0, _0224D3C0 ; =0x022549CC - str r5, [sp, #4] - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r7, r7, #0xa - lsl r0, r0, #5 - add r6, r1, r0 - b _0224D2EC -_0224D2C8: - mov r4, #0 - b _0224D2E0 -_0224D2CC: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_0224D2E0: - cmp r4, #8 - blt _0224D2CC - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_0224D2EC: - ldr r0, [sp, #4] - cmp r0, #4 - blt _0224D2C8 -_0224D2F2: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_0224D2F8: - ldr r0, [sp, #8] - cmp r0, #4 - blt _0224D290 - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _0224D35A - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _0224D35A - mov r0, #5 - sub r1, r0, r1 - ldr r0, _0224D3BC ; =0x022549C4 - mov r7, #0x3f - ldrsb r0, [r0, r1] - lsl r7, r7, #0xa - mov r6, #0x1d - add r0, r0, #3 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #2 - str r0, [sp, #4] - lsl r1, r1, #8 - b _0224D354 -_0224D32E: - ldr r0, [sp, #4] - ldr r5, [sp, #4] - lsl r4, r0, #1 - ldrh r0, [r3, r4] - lsl r5, r5, #0x1d - and r0, r7 - strh r0, [r3, r4] - ldr r0, [sp, #4] - ldrh r2, [r3, r4] - lsr r0, r0, #0x1f - sub r5, r5, r0 - ror r5, r6 - add r0, r0, r5 - add r0, r0, r1 - orr r0, r2 - strh r0, [r3, r4] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_0224D354: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _0224D32E -_0224D35A: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x74] - bl sub_0201C3C0 - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _0224D3B8 - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _0224D3B8 - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_0224D39E: - add r0, r1, #0 - mov r2, #0 - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224D3B8: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D3BC: .word 0x022549C4 -_0224D3C0: .word 0x022549CC - thumb_func_end ov17_0224D240 - - thumb_func_start ov17_0224D3C4 -ov17_0224D3C4: ; 0x0224D3C4 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D3C4 - - thumb_func_start ov17_0224D3D8 -ov17_0224D3D8: ; 0x0224D3D8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x17 - mov r1, #0x14 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _0224D414 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _0224D418 ; =ov17_0224D41C - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D414: .word 0x00007530 -_0224D418: .word ov17_0224D41C - thumb_func_end ov17_0224D3D8 - - thumb_func_start ov17_0224D41C -ov17_0224D41C: ; 0x0224D41C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #5 - bhi _0224D4C0 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224D434: ; jump table - .short _0224D440 - _0224D434 - 2 ; case 0 - .short _0224D450 - _0224D434 - 2 ; case 1 - .short _0224D460 - _0224D434 - 2 ; case 2 - .short _0224D482 - _0224D434 - 2 ; case 3 - .short _0224D49C - _0224D434 - 2 ; case 4 - .short _0224D4B4 - _0224D434 - 2 ; case 5 -_0224D440: - ldr r0, _0224D4DC ; =0x0000046F - mov r1, #0x1e - bl sub_020055D0 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224D450: - bl sub_02005684 - cmp r0, #0 - bne _0224D4D8 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224D460: - ldr r0, _0224D4E0 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - bl ov17_0224C84C - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x14 - bl ov17_0224ABDC - ldr r0, _0224D4E4 ; =0x000006EC - bl sub_02005748 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224D482: - mov r0, #0x12 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x12] - ldrsh r0, [r4, r0] - cmp r0, #0x1e - ble _0224D4D8 - mov r0, #0 - strh r0, [r4, #0x12] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224D49C: - ldr r0, [r4, #0] - ldr r1, _0224D4E8 ; =0x00000123 - ldr r2, [r0, #0] - ldrb r1, [r2, r1] - add r2, r4, #0 - add r2, #0x11 - bl ov17_0224C6B0 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224D4B4: - ldrb r1, [r4, #0x11] - cmp r1, #1 - bne _0224D4D8 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224D4C0: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0224D4D8: - pop {r3, r4, r5, pc} - nop -_0224D4DC: .word 0x0000046F -_0224D4E0: .word 0x04000050 -_0224D4E4: .word 0x000006EC -_0224D4E8: .word 0x00000123 - thumb_func_end ov17_0224D41C - - thumb_func_start ov17_0224D4EC -ov17_0224D4EC: ; 0x0224D4EC - push {r3, lr} - mov r1, #4 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D4EC - - thumb_func_start ov17_0224D500 -ov17_0224D500: ; 0x0224D500 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - add r2, r3, #0 - ldr r0, _0224D53C ; =0x00001C0C - mov r1, #1 - strb r1, [r5, r0] - ldr r3, _0224D540 ; =0x00000172 - mov r1, #0 -_0224D514: - ldr r6, [r5, #0] - ldrb r0, [r2, r1] - add r6, r6, r1 - add r1, r1, #1 - strb r0, [r6, r3] - cmp r1, #4 - blt _0224D514 - ldr r0, [r5, #0] - bl sub_02094EDC - cmp r0, #0 - bne _0224D538 - mov r2, #0 - add r0, r4, #0 - add r1, r7, #0 - add r3, r2, #0 - bl ov17_0224F26C -_0224D538: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D53C: .word 0x00001C0C -_0224D540: .word 0x00000172 - thumb_func_end ov17_0224D500 - - thumb_func_start ov17_0224D544 -ov17_0224D544: ; 0x0224D544 - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D544 - - thumb_func_start ov17_0224D558 -ov17_0224D558: ; 0x0224D558 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - mov r1, #0x57 - add r7, r0, #0 - mov r0, #0x17 - lsl r1, r1, #2 - add r5, r2, #0 - str r3, [sp, #4] - bl sub_02018144 - mov r2, #0x57 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - add r3, r4, #0 - add r3, #0x18 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - mov r2, #7 - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - ldr r5, [sp, #4] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] -_0224D596: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224D596 - ldr r0, [r5, #0] - ldr r2, _0224D654 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _0224D658 ; =ov17_0224D710 - add r1, r4, #0 - str r6, [r4, #0x54] - bl sub_0200D9E8 - mov r7, #0 - add r5, r4, #0 -_0224D5B2: - ldr r1, [r6, #0] - ldr r0, _0224D65C ; =0x00000127 - ldrb r0, [r1, r0] - cmp r7, r0 - bge _0224D5C6 - add r0, r6, #0 - mov r1, #0 - bl ov17_0224D668 - b _0224D5CE -_0224D5C6: - add r0, r6, #0 - mov r1, #1 - bl ov17_0224D668 -_0224D5CE: - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #4 - blt _0224D5B2 - ldr r1, [r4, #0] - ldr r2, _0224D660 ; =0x00000123 - ldr r3, [r1, #0] - mov r0, #0 - ldrb r3, [r3, r2] -_0224D5E6: - add r2, r4, r0 - ldrb r2, [r2, #0x1a] - cmp r3, r2 - bne _0224D5F4 - ldr r2, _0224D664 ; =0x00000AE8 - strb r0, [r1, r2] - b _0224D5FA -_0224D5F4: - add r0, r0, #1 - cmp r0, #4 - blt _0224D5E6 -_0224D5FA: - add r0, r6, #0 - bl ov17_0224DF54 - ldr r1, [r6, #0] - ldr r0, _0224D65C ; =0x00000127 - ldrb r5, [r1, r0] - cmp r5, #4 - bge _0224D650 - ldr r0, [sp, #4] - lsl r1, r5, #2 - add r7, r0, r1 - add r1, r4, #0 - mov r0, #0x3c - add r1, #0x5c - mul r0, r5 - add r0, r1, r0 - str r0, [sp, #8] -_0224D61C: - mov r2, #0 -_0224D61E: - add r0, r4, r2 - ldrb r0, [r0, #0x1a] - cmp r5, r0 - beq _0224D62C - add r2, r2, #1 - cmp r2, #4 - blt _0224D61E -_0224D62C: - ldr r0, [r6, #0] - add r1, r0, r5 - mov r0, #0x43 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - add r1, r5, #0 - str r0, [sp] - ldr r0, [sp, #8] - ldr r3, [r7, #0x14] - bl ov17_0224E930 - ldr r0, [sp, #8] - add r5, r5, #1 - add r0, #0x3c - add r7, r7, #4 - str r0, [sp, #8] - cmp r5, #4 - blt _0224D61C -_0224D650: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D654: .word 0x00007530 -_0224D658: .word ov17_0224D710 -_0224D65C: .word 0x00000127 -_0224D660: .word 0x00000123 -_0224D664: .word 0x00000AE8 - thumb_func_end ov17_0224D558 - - thumb_func_start ov17_0224D668 -ov17_0224D668: ; 0x0224D668 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x17 - mov r1, #0x14 - bl sub_02018144 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - str r5, [r4, #4] - ldr r0, _0224D694 ; =ov17_0224D6CC - ldr r2, _0224D698 ; =0x00007594 - add r1, r4, #0 - strb r6, [r4, #0x12] - bl sub_0200D9E8 - str r0, [r4, #0] - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224D694: .word ov17_0224D6CC -_0224D698: .word 0x00007594 - thumb_func_end ov17_0224D668 - - thumb_func_start ov17_0224D69C -ov17_0224D69C: ; 0x0224D69C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0224D69C - - thumb_func_start ov17_0224D6B0 -ov17_0224D6B0: ; 0x0224D6B0 - ldrh r2, [r1] - strh r2, [r0, #8] - ldrh r2, [r1, #2] - strh r2, [r0, #0xa] - ldrh r2, [r1, #4] - strh r2, [r0, #0xc] - ldrh r2, [r1, #6] - strh r2, [r0, #0xe] - ldrh r1, [r1, #8] - strh r1, [r0, #0x10] - mov r1, #1 - strb r1, [r0, #0x13] - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224D6B0 - - thumb_func_start ov17_0224D6CC -ov17_0224D6CC: ; 0x0224D6CC - push {r4, lr} - add r4, r1, #0 - ldrb r0, [r4, #0x13] - cmp r0, #0 - beq _0224D708 - ldr r0, [r4, #4] - ldr r1, _0224D70C ; =0x00000171 - ldr r2, [r0, #0] - ldrb r1, [r2, r1] - cmp r1, #0 - beq _0224D6E8 - ldrb r1, [r4, #0x12] - cmp r1, #1 - bne _0224D6F6 -_0224D6E8: - add r1, r4, #0 - add r1, #8 - bl ov17_0224B20C - mov r0, #0 - strb r0, [r4, #0x13] - pop {r4, pc} -_0224D6F6: - add r1, r4, #0 - mov r0, #0x19 - add r1, #8 - bl sub_020360D0 - cmp r0, #1 - bne _0224D708 - mov r0, #0 - strb r0, [r4, #0x13] -_0224D708: - pop {r4, pc} - nop -_0224D70C: .word 0x00000171 - thumb_func_end ov17_0224D6CC - - thumb_func_start ov17_0224D710 -ov17_0224D710: ; 0x0224D710 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - add r4, r1, #0 - ldr r3, [r4, #0] - str r0, [sp, #0x1c] - ldr r1, [r3, #0] - ldr r0, _0224DA50 ; =0x00000123 - ldrb r1, [r1, r0] - ldrb r0, [r4, #0x18] - cmp r1, r0 - beq _0224D72A - mov r7, #1 - b _0224D72C -_0224D72A: - mov r7, #0 -_0224D72C: - ldr r0, _0224DA54 ; =0x00001154 - ldr r2, [r4, #0x24] - ldr r1, [r3, r0] - add r0, #8 - ldr r0, [r3, r0] - sub r0, r1, r0 - lsr r1, r2, #1 - str r0, [sp, #0x24] - cmp r0, r1 - blo _0224D746 - mov r0, #1 - str r0, [sp, #0x20] - b _0224D74A -_0224D746: - mov r0, #0 - str r0, [sp, #0x20] -_0224D74A: - ldrb r0, [r4, #0x10] - cmp r0, #3 - bls _0224D752 - b _0224DBD0 -_0224D752: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224D75E: ; jump table - .short _0224D766 - _0224D75E - 2 ; case 0 - .short _0224D7E0 - _0224D75E - 2 ; case 1 - .short _0224D84C - _0224D75E - 2 ; case 2 - .short _0224DB4E - _0224D75E - 2 ; case 3 -_0224D766: - add r3, #0x14 - add r0, r3, #0 - mov r1, #0 - bl ov17_0224B068 - ldr r0, [r4, #0] - bl ov17_0224BC4C - add r3, r4, #0 - ldrb r2, [r4, #0x18] - mov r1, #0x3c - add r3, #0x5c - mul r1, r2 - add r1, r3, r1 - ldr r0, [r4, #0] - ldr r2, [r4, #0x24] - ldr r3, [r4, #0x20] - bl ov17_0224E990 - mov r0, #0x21 - ldr r2, [r4, #0] - ldr r1, _0224DA58 ; =0x00000B1B - lsl r0, r0, #4 - ldrb r1, [r2, r1] - ldr r0, [r2, r0] - bl ov17_0224C54C - ldr r1, [r4, #0] - ldr r0, _0224DA5C ; =0x000009B4 - add r0, r1, r0 - mov r1, #1 - bl ov17_0224C47C - ldr r0, [r4, #0] - mov r1, #0 - bl ov17_0224C864 - ldr r0, [r4, #0] - bl ov17_0224C9A4 - add r0, r4, #0 - add r0, #0x41 - ldrb r1, [r0] - add r0, sp, #0x30 - cmp r7, #0 - strb r1, [r0, #4] - ldr r0, [r4, #0] - add r2, sp, #0x30 - bne _0224D7D0 - mov r1, #4 - bl ov17_0224C5A0 - b _0224D7D6 -_0224D7D0: - mov r1, #5 - bl ov17_0224C5A0 -_0224D7D6: - ldrb r0, [r4, #0x10] - add sp, #0x48 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224D7E0: - ldrb r2, [r4, #0x19] - add r1, r4, #0 - add r0, r3, #0 - add r1, #0x3c - bl ov17_0224C6A8 - mov r3, #0 - mov r2, #0 - sub r0, r2, r0 - sbc r3, r1 - bge _0224D7F8 - b _0224DBFE -_0224D7F8: - ldr r0, [r4, #0] - bl ov17_0224C640 - ldr r5, [r4, #0] - add r1, r4, #0 - ldrb r2, [r4, #0x19] - add r0, r5, #0 - add r1, #0x3c - bl ov17_0224C6A8 - ldr r2, _0224DA54 ; =0x00001154 - add r6, r0, #0 - add r0, r1, #0 - add r1, r2, #4 - ldr r3, [r5, r2] - ldr r1, [r5, r1] - add r3, r3, r6 - adc r1, r0 - add r0, r2, #0 - add r0, #8 - add r2, #0xc - str r3, [r5, r0] - str r1, [r5, r2] - cmp r7, #0 - bne _0224D838 - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov17_0224C9F0 - ldrb r0, [r4, #0x11] - add r0, r0, #1 - strb r0, [r4, #0x11] -_0224D838: - ldrb r1, [r4, #0x18] - ldr r0, [r4, #0] - mov r2, #0 - bl ov17_0224CDC0 - ldrb r0, [r4, #0x10] - add sp, #0x48 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224D84C: - ldr r5, _0224DA58 ; =0x00000B1B - add r0, r3, #0 - ldrb r3, [r3, r5] - ldr r1, [sp, #0x24] - add r0, #0x14 - bl ov17_0224A368 - mov r0, #0x21 - ldr r3, [r4, #0] - ldr r1, _0224DA54 ; =0x00001154 - lsl r0, r0, #4 - ldr r2, [r3, r1] - add r1, #8 - ldr r1, [r3, r1] - ldr r0, [r3, r0] - sub r1, r2, r1 - ldrb r3, [r3, r5] - ldr r2, [r4, #0x24] - bl ov17_0224C49C - ldr r3, [r4, #0] - ldr r1, _0224DA54 ; =0x00001154 - ldr r0, _0224DA5C ; =0x000009B4 - ldr r2, [r3, r1] - add r1, #8 - ldr r1, [r3, r1] - add r0, r3, r0 - sub r1, r2, r1 - ldrb r3, [r3, r5] - ldr r2, [r4, #0x24] - bl ov17_0224C434 - ldr r5, [r4, #0x24] - ldr r0, [sp, #0x24] - cmp r0, r5 - blo _0224D954 - ldrb r0, [r4, #0x16] - ldr r1, _0224DA54 ; =0x00001154 - add r0, r0, #1 - strb r0, [r4, #0x16] - ldr r5, [r4, #0] - add r0, r5, r1 - ldmia r0!, {r2, r3} - add r1, #8 - add r0, r5, r1 - stmia r0!, {r2, r3} - mov r0, #0 - strb r0, [r4, #0x11] - strb r0, [r4, #0x12] - ldr r0, [r4, #0] - bl ov17_0224DF54 - mov r0, #0 - strb r0, [r4, #0x17] - ldr r0, [r4, #0] - ldr r1, [r0, #0] - ldr r0, _0224DA60 ; =0x00000127 - ldrb r6, [r1, r0] - cmp r6, #4 - bge _0224D8DC - add r1, r4, #0 - mov r0, #0x3c - add r1, #0x5c - mul r0, r6 - add r5, r1, r0 -_0224D8CE: - add r0, r5, #0 - bl ov17_0224E958 - add r6, r6, #1 - add r5, #0x3c - cmp r6, #4 - blt _0224D8CE -_0224D8DC: - ldr r0, [r4, #0] - add r0, #0x14 - bl ov17_0224A580 - ldr r0, [r4, #0] - bl ov17_0224BC4C - add r3, r4, #0 - ldrb r2, [r4, #0x18] - mov r1, #0x3c - add r3, #0x5c - mul r1, r2 - add r1, r3, r1 - ldr r0, [r4, #0] - ldr r2, [r4, #0x24] - ldr r3, [r4, #0x20] - bl ov17_0224E990 - ldr r0, [r4, #0] - mov r1, #0 - bl ov17_0224C864 - add r0, r4, #0 - add r0, #0x40 - ldrb r1, [r4, #0x16] - ldrb r0, [r0] - cmp r1, r0 - ldr r0, [r4, #0] - blo _0224D92E - bl ov17_0224CE08 - ldr r0, [r4, #0] - mov r1, #2 - add r0, #0x14 - bl ov17_0224B068 - ldrb r0, [r4, #0x10] - add sp, #0x48 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224D92E: - ldrb r1, [r4, #0x18] - mov r2, #0 - bl ov17_0224CDC0 - cmp r7, #0 - bne _0224D940 - ldrb r0, [r4, #0x11] - cmp r0, #0 - beq _0224D942 -_0224D940: - b _0224DBFE -_0224D942: - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov17_0224C9F0 - ldrb r0, [r4, #0x11] - add sp, #0x48 - add r0, r0, #1 - strb r0, [r4, #0x11] - pop {r3, r4, r5, r6, r7, pc} -_0224D954: - ldr r1, [r4, #0] - ldr r0, _0224DA64 ; =0x00000AE8 - ldrb r6, [r1, r0] - ldr r0, [sp, #0x24] - lsr r1, r5, #1 - cmp r0, r1 - blo _0224D966 - mov r0, #1 - b _0224D968 -_0224D966: - mov r0, #0 -_0224D968: - cmp r7, #0 - bne _0224DA0A - cmp r0, #0 - bne _0224D9A0 - add r0, r4, #0 - add r0, #0x41 - ldrb r1, [r4, #0x17] - ldrb r0, [r0] - cmp r1, r0 - bhs _0224D9A0 - ldr r0, [r4, #0x20] - ldr r1, _0224DA68 ; =0x00002710 - lsr r0, r0, #2 - bl sub_020E2178 - lsr r1, r5, #1 - sub r1, r1, r0 - ldr r0, [sp, #0x24] - cmp r0, r1 - bhs _0224D9A0 - add r0, r4, #0 - mov r2, #0 - add r0, #0x54 - add r1, sp, #0x38 - add r3, r2, #0 - bl ov17_0224DC1C - b _0224D9AE -_0224D9A0: - add r0, r4, #0 - mov r2, #1 - add r0, #0x54 - add r1, sp, #0x38 - add r3, r2, #0 - bl ov17_0224DC1C -_0224D9AE: - mov r0, #0 - ldr r1, [sp, #0x38] - mvn r0, r0 - cmp r1, r0 - bne _0224D9BA - b _0224DAD4 -_0224D9BA: - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0x44 - str r2, [sp] - add r2, sp, #0x3c - str r2, [sp, #4] - mov r2, #0 - str r2, [sp, #8] - str r6, [sp, #0xc] - ldrb r2, [r4, #0x17] - str r2, [sp, #0x10] - add r2, r4, #0 - add r2, #0x41 - ldrb r2, [r2] - str r2, [sp, #0x14] - ldr r2, _0224DA58 ; =0x00000B1B - ldrb r2, [r0, r2] - str r2, [sp, #0x18] - ldr r2, [r0, #0] - ldr r0, _0224DA50 ; =0x00000123 - ldr r3, [r4, #0x20] - ldrb r0, [r2, r0] - ldr r2, [sp, #0x24] - bl ov17_0224DE54 - ldr r0, [r4, #0] - ldr r1, [r0, #0] - ldr r0, _0224DA50 ; =0x00000123 - ldrb r1, [r1, r0] - add r0, #0x29 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, sp, #0x3c - bl ov17_0224D6B0 - ldrb r0, [r4, #0x17] - add r0, r0, #1 - strb r0, [r4, #0x17] - b _0224DAD4 -_0224DA0A: - cmp r0, #1 - bne _0224DA6C - add r0, r4, #0 - add r0, #0x41 - ldrb r1, [r4, #0x17] - ldrb r0, [r0] - cmp r1, r0 - bhs _0224DA6C - ldr r0, [r4, #0x20] - ldr r1, _0224DA68 ; =0x00002710 - lsr r0, r0, #2 - bl sub_020E2178 - sub r1, r5, r0 - ldr r0, [sp, #0x24] - cmp r0, r1 - bhs _0224DA6C - add r0, r4, #0 - mov r2, #0 - add r0, #0x54 - add r1, sp, #0x38 - add r3, r2, #0 - bl ov17_0224DC1C - ldrb r0, [r4, #0x11] - cmp r0, #0 - bne _0224DA7A - ldr r0, [r4, #0] - add r1, r7, #0 - bl ov17_0224C9F0 - ldrb r0, [r4, #0x11] - add r0, r0, #1 - strb r0, [r4, #0x11] - b _0224DA7A - ; .align 2, 0 -_0224DA50: .word 0x00000123 -_0224DA54: .word 0x00001154 -_0224DA58: .word 0x00000B1B -_0224DA5C: .word 0x000009B4 -_0224DA60: .word 0x00000127 -_0224DA64: .word 0x00000AE8 -_0224DA68: .word 0x00002710 -_0224DA6C: - add r0, r4, #0 - mov r2, #1 - add r0, #0x54 - add r1, sp, #0x38 - add r3, r2, #0 - bl ov17_0224DC1C -_0224DA7A: - mov r0, #0 - ldr r1, [sp, #0x38] - mvn r0, r0 - cmp r1, r0 - beq _0224DAD4 - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0x44 - str r2, [sp] - add r2, sp, #0x3c - str r2, [sp, #4] - ldr r2, _0224DC04 ; =0x00001BB4 - add r2, r0, r2 - str r2, [sp, #8] - str r6, [sp, #0xc] - ldrb r2, [r4, #0x17] - str r2, [sp, #0x10] - add r2, r4, #0 - add r2, #0x41 - ldrb r2, [r2] - str r2, [sp, #0x14] - ldr r2, _0224DC08 ; =0x00000B1B - ldrb r2, [r0, r2] - str r2, [sp, #0x18] - ldr r2, [r0, #0] - ldr r0, _0224DC0C ; =0x00000123 - ldr r3, [r4, #0x20] - ldrb r0, [r2, r0] - ldr r2, [sp, #0x24] - bl ov17_0224DE54 - ldr r0, [r4, #0] - ldr r1, [r0, #0] - ldr r0, _0224DC0C ; =0x00000123 - ldrb r1, [r1, r0] - add r0, #0x29 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r0, [r1, r0] - add r1, sp, #0x3c - bl ov17_0224D6B0 - ldrb r0, [r4, #0x17] - add r0, r0, #1 - strb r0, [r4, #0x17] -_0224DAD4: - ldr r0, [r4, #0] - ldr r1, [r0, #0] - ldr r0, _0224DC10 ; =0x00000127 - ldrb r7, [r1, r0] - cmp r7, #4 - bge _0224DB20 - lsl r0, r7, #2 - add r5, r4, r0 - add r1, r4, #0 - mov r0, #0x3c - add r1, #0x5c - mul r0, r7 - add r6, r1, r0 - add r0, r4, #0 - str r0, [sp, #0x2c] - add r0, #0x3c - str r0, [sp, #0x2c] -_0224DAF6: - ldr r0, [r4, #0x24] - ldr r3, [sp, #0x24] - str r0, [sp] - ldr r0, [r4, #0x20] - add r2, r6, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - str r0, [sp, #8] - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - ldr r1, [r4, #0] - bl ov17_0224ED8C - add r7, r7, #1 - add r5, r5, #4 - add r6, #0x3c - cmp r7, #4 - blt _0224DAF6 -_0224DB20: - ldr r0, [sp, #0x20] - cmp r0, #1 - bne _0224DB3C - ldrb r0, [r4, #0x12] - cmp r0, #0 - bne _0224DB3C - ldrb r1, [r4, #0x18] - ldr r0, [r4, #0] - mov r2, #1 - bl ov17_0224CDC0 - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] -_0224DB3C: - ldr r0, [sp, #0x20] - cmp r0, #1 - bne _0224DBFE - ldr r0, [r4, #0] - ldr r1, [sp, #0x24] - bl ov17_0224C8E8 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} -_0224DB4E: - add r0, r4, #0 - add r0, #0x54 - add r1, sp, #0x38 - mov r2, #1 - mov r3, #0 - bl ov17_0224DC1C - cmp r0, #1 - bne _0224DBFE - ldr r0, [r4, #0] - add r0, #0x14 - bl ov17_0224A580 - ldr r5, [r4, #0] - ldr r3, _0224DC08 ; =0x00000B1B - add r0, r5, #0 - ldrb r3, [r5, r3] - ldr r2, [r4, #0x24] - add r0, #0x14 - mov r1, #0 - bl ov17_0224A368 - mov r0, #0x21 - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov17_0224C540 - ldr r1, [r4, #0] - ldr r0, _0224DC14 ; =0x000009B4 - add r0, r1, r0 - mov r1, #0 - bl ov17_0224C47C - ldr r0, [r4, #0] - mov r1, #2 - add r0, #0x14 - bl ov17_0224B068 - ldr r0, [r4, #0] - mov r1, #0 - bl ov17_0224C864 - ldr r0, [r4, #0] - bl ov17_0224C9D4 - ldr r1, [r4, #0] - ldr r0, _0224DC18 ; =0x0000114C - ldr r0, [r1, r0] - bl ov17_02249814 - cmp r0, #0 - beq _0224DBC6 - ldr r1, [r4, #0] - ldr r0, _0224DC18 ; =0x0000114C - mov r2, #6 - ldr r0, [r1, r0] - mov r1, #0 - bl ov17_0224A0E0 -_0224DBC6: - ldrb r0, [r4, #0x10] - add sp, #0x48 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224DBD0: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - mov r7, #0x53 - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_0224DBE4: - ldr r0, [r5, r7] - bl ov17_0224D69C - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0224DBE4 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x1c] - bl sub_0200DA58 -_0224DBFE: - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224DC04: .word 0x00001BB4 -_0224DC08: .word 0x00000B1B -_0224DC0C: .word 0x00000123 -_0224DC10: .word 0x00000127 -_0224DC14: .word 0x000009B4 -_0224DC18: .word 0x0000114C - thumb_func_end ov17_0224D710 - - thumb_func_start ov17_0224DC1C -ov17_0224DC1C: ; 0x0224DC1C - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r7, r1, #0 - sub r0, r4, #1 - add r6, r2, #0 - str r3, [sp] - str r0, [r7, #0] - cmp r6, #0 - bne _0224DC4E - ldrb r0, [r5, #5] - cmp r0, #0 - beq _0224DC4E - sub r0, r0, #1 - strb r0, [r5, #5] - ldrb r0, [r5, #5] - cmp r0, #0 - bne _0224DC4E - ldr r1, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - add r2, r4, #0 - ldr r0, [r1, r0] - add r1, r4, #0 - bl ov17_0224A0E0 -_0224DC4E: - ldrb r0, [r5, #4] - cmp r0, #0 - beq _0224DC5E - cmp r0, #1 - beq _0224DC84 - cmp r0, #2 - beq _0224DCC6 - b _0224DCEC -_0224DC5E: - cmp r6, #0 - bne _0224DC80 - ldr r0, [sp] - cmp r0, #0 - bne _0224DC80 - mov r1, #0 - strb r1, [r5, #5] - ldr r2, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - ldr r0, [r2, r0] - add r2, r1, #0 - bl ov17_0224A0E0 - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - b _0224DCEC -_0224DC80: - mov r4, #1 - b _0224DCEC -_0224DC84: - cmp r6, #1 - beq _0224DC8E - ldrb r0, [r5, #5] - cmp r0, #0 - beq _0224DC92 -_0224DC8E: - mov r4, #1 - b _0224DCEC -_0224DC92: - ldr r1, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - ldr r0, [r1, r0] - bl ov17_02249760 - mov r1, #0 - mvn r1, r1 - str r0, [r7, #0] - cmp r0, r1 - beq _0224DCC2 - ldr r1, [r5, #0] - ldr r0, _0224DD20 ; =0x00000B04 - ldr r0, [r1, r0] - ldr r1, _0224DD24 ; =0x00002710 - bl sub_020E2178 - strb r0, [r5, #5] - ldrb r0, [r5, #5] - sub r0, r0, #2 - strb r0, [r5, #5] - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] - b _0224DCEC -_0224DCC2: - mov r4, #1 - b _0224DCEC -_0224DCC6: - ldr r1, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - ldr r0, [r1, r0] - bl ov17_02249804 - cmp r0, #1 - bne _0224DCEC - ldrb r0, [r5, #5] - cmp r0, #0 - beq _0224DCE8 - ldr r1, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - mov r2, #6 - ldr r0, [r1, r0] - mov r1, #0 - bl ov17_0224A0E0 -_0224DCE8: - mov r0, #1 - strb r0, [r5, #4] -_0224DCEC: - ldr r0, [sp] - cmp r0, #1 - bne _0224DD16 - cmp r4, #1 - bne _0224DD16 - ldr r1, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - ldr r0, [r1, r0] - bl ov17_02249814 - cmp r0, #0 - beq _0224DD16 - ldr r1, [r5, #0] - ldr r0, _0224DD1C ; =0x0000114C - mov r2, #6 - ldr r0, [r1, r0] - mov r1, #0 - bl ov17_0224A0E0 - mov r0, #0 - strb r0, [r5, #4] -_0224DD16: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224DD1C: .word 0x0000114C -_0224DD20: .word 0x00000B04 -_0224DD24: .word 0x00002710 - thumb_func_end ov17_0224DC1C - - thumb_func_start ov17_0224DD28 -ov17_0224DD28: ; 0x0224DD28 - push {r3, lr} - cmp r0, #3 - bhi _0224DD52 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224DD3A: ; jump table - .short _0224DD42 - _0224DD3A - 2 ; case 0 - .short _0224DD46 - _0224DD3A - 2 ; case 1 - .short _0224DD4A - _0224DD3A - 2 ; case 2 - .short _0224DD4E - _0224DD3A - 2 ; case 3 -_0224DD42: - mov r0, #1 - pop {r3, pc} -_0224DD46: - mov r0, #2 - pop {r3, pc} -_0224DD4A: - mov r0, #3 - pop {r3, pc} -_0224DD4E: - mov r0, #4 - pop {r3, pc} -_0224DD52: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224DD28 - - thumb_func_start ov17_0224DD5C -ov17_0224DD5C: ; 0x0224DD5C - push {r3, lr} - cmp r0, #4 - bhi _0224DD88 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224DD6E: ; jump table - .short _0224DD88 - _0224DD6E - 2 ; case 0 - .short _0224DD78 - _0224DD6E - 2 ; case 1 - .short _0224DD7C - _0224DD6E - 2 ; case 2 - .short _0224DD80 - _0224DD6E - 2 ; case 3 - .short _0224DD84 - _0224DD6E - 2 ; case 4 -_0224DD78: - mov r0, #0 - pop {r3, pc} -_0224DD7C: - mov r0, #1 - pop {r3, pc} -_0224DD80: - mov r0, #2 - pop {r3, pc} -_0224DD84: - mov r0, #3 - pop {r3, pc} -_0224DD88: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov17_0224DD5C - - thumb_func_start ov17_0224DD90 -ov17_0224DD90: ; 0x0224DD90 - push {r3, r4} - ldrb r4, [r1] - cmp r0, r4 - bgt _0224DDA2 - mov r0, #0 - strb r0, [r2] - strb r0, [r3] - pop {r3, r4} - bx lr -_0224DDA2: - ldrb r4, [r1, #1] - cmp r0, r4 - bgt _0224DDB4 - mov r0, #0 - strb r0, [r2] - mov r0, #1 - strb r0, [r3] - pop {r3, r4} - bx lr -_0224DDB4: - ldrb r4, [r1, #2] - cmp r0, r4 - bgt _0224DDC6 - mov r0, #1 - strb r0, [r2] - mov r0, #2 - strb r0, [r3] - pop {r3, r4} - bx lr -_0224DDC6: - ldrb r1, [r1, #3] - cmp r0, r1 - bgt _0224DDD8 - mov r0, #1 - strb r0, [r2] - mov r0, #3 - strb r0, [r3] - pop {r3, r4} - bx lr -_0224DDD8: - mov r0, #2 - strb r0, [r2] - mov r0, #4 - strb r0, [r3] - pop {r3, r4} - bx lr - thumb_func_end ov17_0224DD90 - - thumb_func_start ov17_0224DDE4 -ov17_0224DDE4: ; 0x0224DDE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r2, #0 - add r6, r0, #0 - mov r0, #0 - ldr r2, _0224DE4C ; =0x00002710 - str r3, [sp] - mul r6, r2 - lsr r1, r1, #1 - add r5, r0, #0 - add r4, r0, #0 - cmp r6, #0 - bls _0224DE0A - bls _0224DE08 -_0224DE00: - add r4, r4, r1 - add r5, r5, #1 - cmp r4, r6 - blo _0224DE00 -_0224DE08: - sub r0, r4, r1 -_0224DE0A: - ldr r1, _0224DE50 ; =0x00001388 - add r0, r0, r1 - lsl r1, r1, #1 - bl sub_020E2178 - ldr r1, _0224DE50 ; =0x00001388 - str r0, [sp, #4] - add r0, r4, r1 - lsl r1, r1, #1 - bl sub_020E2178 - add r4, r0, #0 - ldr r1, _0224DE4C ; =0x00002710 - add r0, r6, #0 - bl sub_020E2178 - ldr r1, [sp, #4] - sub r1, r0, r1 - bpl _0224DE32 - neg r1, r1 -_0224DE32: - sub r0, r0, r4 - bpl _0224DE38 - neg r0, r0 -_0224DE38: - cmp r1, r0 - bhi _0224DE40 - sub r5, r5, #1 - b _0224DE42 -_0224DE40: - add r1, r0, #0 -_0224DE42: - ldr r0, [sp] - str r1, [r7, #0] - str r5, [r0, #0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DE4C: .word 0x00002710 -_0224DE50: .word 0x00001388 - thumb_func_end ov17_0224DDE4 - - thumb_func_start ov17_0224DE54 -ov17_0224DE54: ; 0x0224DE54 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp] - str r2, [sp, #4] - str r3, [sp, #8] - add r0, r1, #0 - ldr r5, [sp, #0x34] - ldr r6, [sp, #0x38] - mov r7, #0 - bl ov17_0224DD28 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - ldr r1, [sp, #8] - add r2, sp, #0x18 - add r3, sp, #0x14 - bl ov17_0224DDE4 - cmp r6, #0 - beq _0224DEB6 - ldr r0, [sp, #0x48] - mov r1, #4 - bl ov17_0223F0BC - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - ldr r2, [sp, #0x14] - add r4, r7, #0 - sub r0, r2, r0 - add r1, r6, #0 - add r2, r6, #0 -_0224DE94: - ldrb r3, [r1, #8] - lsl r3, r3, #0x1d - lsr r3, r3, #0x1f - cmp r3, #1 - bne _0224DEA4 - ldrb r3, [r2, #6] - cmp r0, r3 - beq _0224DEAE -_0224DEA4: - add r4, r4, #1 - add r1, #0xa - add r2, #0xa - cmp r4, #8 - blo _0224DE94 -_0224DEAE: - cmp r4, #8 - bne _0224DEB6 - mov r0, #0xff - str r0, [sp, #0x18] -_0224DEB6: - add r2, sp, #0x10 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x30] - add r2, #1 - add r3, sp, #0x10 - bl ov17_0224DD90 - cmp r6, #0 - beq _0224DEF6 - cmp r4, #8 - beq _0224DEF6 - add r0, sp, #0x10 - ldrb r0, [r0, #1] - cmp r0, #0 - beq _0224DED8 - cmp r0, #1 - bne _0224DEF6 -_0224DED8: - mov r0, #0xa - mul r0, r4 - add r0, r6, r0 - ldrb r1, [r0, #3] - ldr r0, [sp, #0xc] - cmp r0, r1 - beq _0224DEF6 - mov r0, #0xff - str r0, [sp, #0x18] - mov r1, #4 - add r0, sp, #0x10 - strb r1, [r0] - mov r1, #2 - strb r1, [r0, #1] - mov r7, #1 -_0224DEF6: - ldr r0, [sp] - strb r0, [r5, #2] - ldr r0, [sp, #4] - strh r0, [r5] - ldr r0, [sp, #0xc] - strb r0, [r5, #3] - add r0, sp, #0x10 - ldrb r1, [r0, #1] - strb r1, [r5, #4] - ldrb r0, [r0] - ldr r1, [sp, #0x40] - strb r0, [r5, #5] - ldr r0, [sp, #0x14] - strb r0, [r5, #6] - ldr r0, [sp, #0x3c] - strb r0, [r5, #7] - ldr r0, [sp, #0x44] - sub r0, r0, #1 - cmp r1, r0 - blt _0224DF22 - mov r1, #1 - b _0224DF24 -_0224DF22: - mov r1, #0 -_0224DF24: - ldrb r2, [r5, #8] - mov r0, #1 - bic r2, r0 - lsl r0, r1, #0x18 - lsr r1, r0, #0x18 - mov r0, #1 - and r0, r1 - orr r0, r2 - strb r0, [r5, #8] - ldrb r1, [r5, #8] - mov r0, #2 - bic r1, r0 - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - lsl r0, r0, #0x1f - lsr r0, r0, #0x1e - orr r0, r1 - strb r0, [r5, #8] - ldrb r1, [r5, #8] - mov r0, #4 - orr r0, r1 - strb r0, [r5, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov17_0224DE54 - - thumb_func_start ov17_0224DF54 -ov17_0224DF54: ; 0x0224DF54 - push {r4, r5} - ldr r1, _0224DF7C ; =0x00000AD9 - mov r5, #0 - add r3, r5, #0 - add r2, r1, #4 -_0224DF5E: - add r4, r0, r5 - strb r3, [r4, r1] - add r5, r5, #1 - strb r3, [r4, r2] - cmp r5, #4 - blt _0224DF5E - ldr r1, _0224DF80 ; =0x00000AE1 - strb r3, [r0, r1] - add r2, r1, #1 - strb r3, [r0, r2] - add r1, r1, #2 - strb r3, [r0, r1] - pop {r4, r5} - bx lr - nop -_0224DF7C: .word 0x00000AD9 -_0224DF80: .word 0x00000AE1 - thumb_func_end ov17_0224DF54 - - thumb_func_start ov17_0224DF84 -ov17_0224DF84: ; 0x0224DF84 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224DF84 - - thumb_func_start ov17_0224DF88 -ov17_0224DF88: ; 0x0224DF88 - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224DF88 - - thumb_func_start ov17_0224DF9C -ov17_0224DF9C: ; 0x0224DF9C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x17 - str r1, [sp] - add r1, r0, #0 - add r1, #0xed - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r2, #0x41 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - add r3, r4, #0 - str r0, [r4, #0] - ldrh r0, [r5] - add r3, #0xc8 - mov r2, #7 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] -_0224DFD8: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224DFD8 - ldr r0, [r6, #0] - ldr r2, _0224DFF0 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _0224DFF4 ; =ov17_0224DFF8 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DFF0: .word 0x00007530 -_0224DFF4: .word ov17_0224DFF8 - thumb_func_end ov17_0224DF9C - - thumb_func_start ov17_0224DFF8 -ov17_0224DFF8: ; 0x0224DFF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #5 - bls _0224E008 - b _0224E1B8 -_0224E008: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224E014: ; jump table - .short _0224E020 - _0224E014 - 2 ; case 0 - .short _0224E070 - _0224E014 - 2 ; case 1 - .short _0224E09E - _0224E014 - 2 ; case 2 - .short _0224E152 - _0224E014 - 2 ; case 3 - .short _0224E174 - _0224E014 - 2 ; case 4 - .short _0224E198 - _0224E014 - 2 ; case 5 -_0224E020: - ldr r0, [r4, #0] - mov r1, #0 - bl ov17_0224CDB4 - mov r1, #0 - str r1, [sp] - mov r0, #6 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r2, _0224E1D4 ; =0x00001FE3 - sub r3, r1, #3 - bl sub_02003178 - add r6, r4, #0 - mov r5, #0 - mov r7, #0x10 - add r6, #0x11 -_0224E04A: - str r7, [sp] - mov r0, #4 - str r0, [sp, #4] - add r0, r6, r5 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r2, _0224E1D8 ; =0x00007FFF - ldr r3, _0224E1DC ; =0x0000254A - add r1, r5, #0 - bl ov17_0224CEE4 - add r5, r5, #1 - cmp r5, #4 - blt _0224E04A - ldrb r0, [r4, #0x10] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224E070: - ldr r0, [r4, #0] - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0224E092 - mov r1, #0 -_0224E080: - add r0, r4, r1 - ldrb r0, [r0, #0x11] - cmp r0, #0 - beq _0224E08E - add r1, r1, #1 - cmp r1, #4 - blt _0224E080 -_0224E08E: - cmp r1, #4 - beq _0224E094 -_0224E092: - b _0224E1D0 -_0224E094: - ldrb r0, [r4, #0x10] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224E09E: - add r0, r4, #0 - str r0, [sp, #0xc] - add r0, #0x18 - mov r6, #0 - str r0, [sp, #0xc] -_0224E0A8: - add r0, r4, r6 - add r0, #0xca - ldrb r1, [r0] - mov r2, #0x2c - add r7, r1, #0 - mul r7, r2 - ldr r2, [r4, #0] - lsl r0, r1, #2 - ldr r2, [r2, #0x14] - add r5, r4, r7 - ldr r2, [r2, r0] - str r2, [r5, #0x18] - ldr r2, [r4, #0] - add r0, r2, r0 - ldr r0, [r0, #0x5c] - str r0, [r5, #0x1c] - ldr r2, [r4, #0] - lsl r0, r1, #4 - add r2, #0x18 - add r0, r2, r0 - str r0, [r5, #0x20] - mov r0, #0xb1 - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - ldr r1, _0224E1E0 ; =0x00002710 - bl sub_020E2178 - mov r1, #0x28 - mul r1, r0 - add r0, r1, #0 - mov r1, #0x64 - bl sub_020E2178 - strh r0, [r5, #0x26] - add r0, r5, #0 - add r0, #0x24 - strb r6, [r0] - cmp r6, #0 - bne _0224E0FE - add r5, #0x25 - mov r0, #3 - b _0224E102 -_0224E0FE: - sub r0, r6, #1 - add r5, #0x25 -_0224E102: - ldr r1, [sp, #0xc] - strb r0, [r5] - ldr r0, _0224E1E4 ; =ov17_0224E1F4 - ldr r2, _0224E1E8 ; =0x00009CA4 - add r1, r1, r7 - bl sub_0200D9E8 - add r6, r6, #1 - cmp r6, #4 - blt _0224E0A8 - add r0, r4, #0 - add r0, #0xf1 - ldrb r1, [r0] - add r0, sp, #0x10 - strb r1, [r0, #4] - ldr r0, [r4, #0] - add r1, r4, #0 - add r1, #0xcb - ldrb r3, [r1] - ldr r2, [r0, #0] - ldr r1, _0224E1EC ; =0x00000123 - ldrb r1, [r2, r1] - cmp r3, r1 - add r2, sp, #0x10 - bne _0224E13C - mov r1, #4 - bl ov17_0224C5A0 - b _0224E142 -_0224E13C: - mov r1, #5 - bl ov17_0224C5A0 -_0224E142: - ldr r0, _0224E1F0 ; =0x000006F7 - bl sub_02005748 - ldrb r0, [r4, #0x10] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224E152: - mov r2, #0 -_0224E154: - add r0, r1, #0 - add r0, #0x43 - ldrb r0, [r0] - cmp r0, #0 - beq _0224E166 - add r2, r2, #1 - add r1, #0x2c - cmp r2, #4 - blt _0224E154 -_0224E166: - cmp r2, #4 - bne _0224E1D0 - ldrb r0, [r4, #0x10] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224E174: - mov r0, #6 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r2, _0224E1D4 ; =0x00001FE3 - sub r3, r1, #3 - bl sub_02003178 - ldrb r0, [r4, #0x10] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224E198: - ldr r0, [r4, #0] - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0224E1D0 - ldr r0, [r4, #0] - mov r1, #1 - bl ov17_0224CDB4 - ldrb r0, [r4, #0x10] - add sp, #0x18 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0224E1B8: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0224E1D0: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E1D4: .word 0x00001FE3 -_0224E1D8: .word 0x00007FFF -_0224E1DC: .word 0x0000254A -_0224E1E0: .word 0x00002710 -_0224E1E4: .word ov17_0224E1F4 -_0224E1E8: .word 0x00009CA4 -_0224E1EC: .word 0x00000123 -_0224E1F0: .word 0x000006F7 - thumb_func_end ov17_0224DFF8 - - thumb_func_start ov17_0224E1F4 -ov17_0224E1F4: ; 0x0224E1F4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r1, #0x2a - ldrb r1, [r1] - cmp r1, #0 - beq _0224E208 - cmp r1, #1 - beq _0224E2C4 - b _0224E426 -_0224E208: - ldr r0, [r5, #8] - ldr r0, [r0, #4] - lsl r0, r0, #8 - str r0, [r5, #0x10] - ldr r0, [r5, #8] - ldr r0, [r0, #8] - lsl r0, r0, #8 - str r0, [r5, #0x14] - ldr r0, [r5, #8] - ldr r0, [r0, #0xc] - lsl r0, r0, #8 - str r0, [r5, #0x18] - ldrb r0, [r5, #0xc] - bl ov17_0224A0FC - lsl r4, r0, #8 - ldrb r0, [r5, #0xc] - bl ov17_0224A10C - lsl r0, r0, #8 - str r0, [sp, #8] - ldrb r0, [r5, #0xc] - bl ov17_0224A120 - lsl r0, r0, #8 - str r0, [sp, #4] - ldrb r0, [r5, #0xd] - cmp r0, #0 - beq _0224E246 - cmp r0, #3 - bne _0224E278 -_0224E246: - cmp r0, #0 - bne _0224E24E - ldr r0, _0224E434 ; =0xFFFFB000 - b _0224E252 -_0224E24E: - mov r0, #0x59 - lsl r0, r0, #0xa -_0224E252: - ldrh r1, [r5, #0xe] - sub r0, r0, r4 - lsr r1, r1, #1 - bl sub_020E1F6C - str r0, [r5, #0x1c] - ldrh r1, [r5, #0xe] - mov r0, #0 - lsr r1, r1, #1 - bl sub_020E1F6C - str r0, [r5, #0x20] - ldrh r1, [r5, #0xe] - mov r0, #0 - lsr r1, r1, #1 - bl sub_020E1F6C - str r0, [r5, #0x24] - b _0224E2B4 -_0224E278: - bl ov17_0224A0FC - lsl r6, r0, #8 - ldrb r0, [r5, #0xd] - bl ov17_0224A10C - lsl r0, r0, #8 - str r0, [sp] - ldrb r0, [r5, #0xd] - bl ov17_0224A120 - lsl r7, r0, #8 - ldrh r1, [r5, #0xe] - sub r0, r6, r4 - bl sub_020E1F6C - str r0, [r5, #0x1c] - ldr r1, [sp] - ldr r0, [sp, #8] - sub r0, r1, r0 - ldrh r1, [r5, #0xe] - bl sub_020E1F6C - str r0, [r5, #0x20] - ldr r0, [sp, #4] - ldrh r1, [r5, #0xe] - sub r0, r7, r0 - bl sub_020E1F6C - str r0, [r5, #0x24] -_0224E2B4: - add r0, r5, #0 - add r0, #0x2a - ldrb r0, [r0] - add r5, #0x2a - add sp, #0xc - add r0, r0, #1 - strb r0, [r5] - pop {r4, r5, r6, r7, pc} -_0224E2C4: - ldr r1, [r5, #0x10] - ldr r0, [r5, #0x1c] - add r0, r1, r0 - str r0, [r5, #0x10] - ldr r1, [r5, #0x14] - ldr r0, [r5, #0x20] - add r0, r1, r0 - str r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r0, [r5, #0x24] - add r0, r1, r0 - str r0, [r5, #0x18] - ldrh r0, [r5, #0x28] - add r0, r0, #1 - strh r0, [r5, #0x28] - ldrb r0, [r5, #0xd] - cmp r0, #0 - beq _0224E2EC - cmp r0, #3 - bne _0224E38E -_0224E2EC: - ldrh r1, [r5, #0xe] - ldrh r2, [r5, #0x28] - lsr r1, r1, #1 - cmp r2, r1 - bne _0224E3A4 - cmp r0, #0 - bne _0224E314 - ldr r0, _0224E438 ; =0xFFFF9C00 - mov r1, #1 - str r0, [r5, #0x10] - ldr r0, [r5, #8] - ldr r0, [r0, #0] - bl ov22_0225B07C - ldr r0, [r5, #8] - mov r1, #0x64 - ldr r0, [r0, #0] - bl ov22_0225B1AC - b _0224E334 -_0224E314: - bl ov17_0224A0FC - add r0, #0x50 - lsl r0, r0, #8 - str r0, [r5, #0x10] - ldr r0, [r5, #8] - mov r1, #0 - ldr r0, [r0, #0] - bl ov22_0225B07C - ldr r0, [r5, #8] - mov r1, #0x63 - ldr r0, [r0, #0] - mvn r1, r1 - bl ov22_0225B1AC -_0224E334: - ldr r0, [r5, #0] - mov r1, #2 - bl sub_020765B8 - add r4, r0, #0 - ldrb r0, [r5, #0xd] - bl ov17_0224A10C - add r0, r4, r0 - lsl r0, r0, #8 - str r0, [r5, #0x14] - ldrb r0, [r5, #0xd] - bl ov17_0224A120 - lsl r0, r0, #8 - str r0, [r5, #0x18] - ldrb r0, [r5, #0xd] - bl ov17_0224A0FC - ldrh r2, [r5, #0xe] - ldrh r1, [r5, #0x28] - lsl r0, r0, #8 - ldr r7, [r5, #0x14] - sub r1, r2, r1 - sub r4, r1, #1 - ldr r1, [r5, #0x10] - ldr r6, [r5, #0x18] - sub r0, r0, r1 - add r1, r4, #0 - bl sub_020E1F6C - str r0, [r5, #0x1c] - ldr r0, [r5, #0x14] - add r1, r4, #0 - sub r0, r7, r0 - bl sub_020E1F6C - str r0, [r5, #0x20] - ldr r0, [r5, #0x18] - add r1, r4, #0 - sub r0, r6, r0 - bl sub_020E1F6C - str r0, [r5, #0x24] - b _0224E3A4 -_0224E38E: - bl ov17_0224A0FC - ldr r1, [r5, #0x10] - lsl r0, r0, #8 - cmp r1, r0 - bge _0224E3A4 - ldrb r0, [r5, #0xd] - bl ov17_0224A0FC - lsl r0, r0, #8 - str r0, [r5, #0x10] -_0224E3A4: - ldrh r1, [r5, #0x28] - ldrh r0, [r5, #0xe] - cmp r1, r0 - blo _0224E3E4 - ldr r0, [r5, #0] - mov r1, #2 - bl sub_020765B8 - add r4, r0, #0 - ldrb r0, [r5, #0xd] - bl ov17_0224A0FC - lsl r0, r0, #8 - str r0, [r5, #0x10] - ldrb r0, [r5, #0xd] - bl ov17_0224A10C - add r0, r4, r0 - lsl r0, r0, #8 - str r0, [r5, #0x14] - ldrb r0, [r5, #0xd] - bl ov17_0224A120 - lsl r0, r0, #8 - str r0, [r5, #0x18] - add r0, r5, #0 - add r0, #0x2a - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x2a - strb r1, [r0] -_0224E3E4: - ldr r1, [r5, #0x10] - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 - ldr r0, [r5, #8] - str r1, [r0, #4] - ldr r1, [r5, #0x14] - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 - ldr r0, [r5, #8] - str r1, [r0, #8] - ldr r1, [r5, #0x18] - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r1, r0, #8 - ldr r0, [r5, #8] - str r1, [r0, #0xc] - ldr r2, [r5, #8] - ldr r0, [r2, #0] - ldr r1, [r2, #4] - ldr r2, [r2, #8] - bl ov22_0225B100 - ldr r0, [r5, #4] - ldr r1, [r5, #8] - bl ov17_0224B09C - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224E426: - mov r1, #1 - add r5, #0x2b - strb r1, [r5] - bl sub_0200DA58 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E434: .word 0xFFFFB000 -_0224E438: .word 0xFFFF9C00 - thumb_func_end ov17_0224E1F4 - - thumb_func_start ov17_0224E43C -ov17_0224E43C: ; 0x0224E43C - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E43C - - thumb_func_start ov17_0224E450 -ov17_0224E450: ; 0x0224E450 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x17 - mov r1, #0x50 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x50 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - add r3, r4, #0 - str r0, [r4, #0] - ldrh r0, [r5] - add r3, #0x10 - mov r2, #7 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] -_0224E488: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224E488 - ldr r0, [r6, #0] - ldr r2, _0224E4A0 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _0224E4A4 ; =ov17_0224E4A8 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E4A0: .word 0x00007530 -_0224E4A4: .word ov17_0224E4A8 - thumb_func_end ov17_0224E450 - - thumb_func_start ov17_0224E4A8 -ov17_0224E4A8: ; 0x0224E4A8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x4c - ldrb r0, [r0] - cmp r0, #0 - bne _0224E4F8 - mov r4, #0 -_0224E4BA: - add r1, r5, r4 - ldrb r1, [r1, #0x12] - ldr r0, [r5, #0] - add r2, r4, #0 - bl ov17_0224BC68 - add r4, r4, #1 - cmp r4, #4 - blt _0224E4BA - ldr r1, [r5, #0] - ldr r0, _0224E514 ; =0x0000114C - mov r3, #0 - ldr r0, [r1, r0] - mov r1, #1 - add r2, r1, #0 - bl ov17_02249640 - ldr r1, [r5, #0] - ldr r0, _0224E514 ; =0x0000114C - mov r2, #6 - ldr r0, [r1, r0] - mov r1, #0 - bl ov17_0224A0E0 - add r0, r5, #0 - add r0, #0x4c - ldrb r0, [r0] - add r5, #0x4c - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, pc} -_0224E4F8: - mov r2, #0 - ldr r0, [r5, #0xc] - add r1, r5, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_0224E514: .word 0x0000114C - thumb_func_end ov17_0224E4A8 - - thumb_func_start ov17_0224E518 -ov17_0224E518: ; 0x0224E518 - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E518 - - thumb_func_start ov17_0224E52C -ov17_0224E52C: ; 0x0224E52C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x17 - mov r1, #0x50 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x50 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - add r3, r4, #0 - str r0, [r4, #0] - ldrh r0, [r5] - add r3, #0x10 - mov r2, #7 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] -_0224E564: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224E564 - ldr r0, [r6, #0] - ldr r2, _0224E57C ; =0x00007530 - str r0, [r3, #0] - ldr r0, _0224E580 ; =ov17_0224E584 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E57C: .word 0x00007530 -_0224E580: .word ov17_0224E584 - thumb_func_end ov17_0224E52C - - thumb_func_start ov17_0224E584 -ov17_0224E584: ; 0x0224E584 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x4c - ldrb r0, [r0] - cmp r0, #0 - beq _0224E59A - cmp r0, #1 - beq _0224E5D2 - b _0224E60A -_0224E59A: - ldr r0, [r5, #0] - bl ov17_0224B5C8 - cmp r0, #0 - beq _0224E640 - mov r4, #0 - mov r6, #2 - mov r7, #5 -_0224E5AA: - ldr r0, [r5, #0] - add r1, r4, #0 - add r2, r6, #0 - bl ov17_0224BD28 - ldr r0, [r5, #0] - add r1, r4, #0 - add r2, r7, #0 - bl ov17_0224BD28 - add r4, r4, #1 - cmp r4, #4 - blt _0224E5AA - add r0, r5, #0 - add r0, #0x4c - ldrb r0, [r0] - add r5, #0x4c - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_0224E5D2: - mov r6, #0 - add r4, r6, #0 -_0224E5D6: - ldr r0, [r5, #0] - add r1, r4, #0 - bl ov17_0224BDF0 - cmp r0, #1 - bne _0224E5E4 - add r6, r6, #1 -_0224E5E4: - ldr r0, [r5, #0] - add r1, r4, #0 - bl ov17_0224BE24 - add r4, r4, #1 - cmp r4, #4 - blt _0224E5D6 - cmp r6, #4 - blt _0224E640 - ldr r0, [r5, #0] - bl ov17_0224BD00 - add r0, r5, #0 - add r0, #0x4c - ldrb r0, [r0] - add r5, #0x4c - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_0224E60A: - ldr r1, [r5, #0] - ldr r0, _0224E644 ; =0x0000114C - mov r2, #1 - ldr r0, [r1, r0] - mov r1, #0 - add r3, r1, #0 - bl ov17_02249640 - ldr r1, [r5, #0] - ldr r0, _0224E644 ; =0x0000114C - ldr r0, [r1, r0] - mov r1, #0 - add r2, r1, #0 - bl ov17_0224A0E0 - mov r2, #0 - ldr r0, [r5, #0xc] - add r1, r5, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224E640: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224E644: .word 0x0000114C - thumb_func_end ov17_0224E584 - - thumb_func_start ov17_0224E648 -ov17_0224E648: ; 0x0224E648 - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E648 - - thumb_func_start ov17_0224E65C -ov17_0224E65C: ; 0x0224E65C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x17 - mov r1, #0x20 - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _0224E6C0 ; =0x00007530 - str r0, [r4, #0] - ldrh r0, [r6] - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] - ldrb r0, [r5] - strb r0, [r4, #0x11] - ldrh r0, [r5, #0x30] - strh r0, [r4, #0x14] - ldrh r0, [r5, #0x32] - strh r0, [r4, #0x16] - ldrh r0, [r5, #0x34] - strh r0, [r4, #0x18] - add r0, r5, #0 - add r0, #0x36 - ldrb r0, [r0] - strb r0, [r4, #0x1a] - add r0, r5, #0 - add r0, #0x38 - ldrb r0, [r0] - add r5, #0x37 - strb r0, [r4, #0x1c] - ldrb r0, [r5] - strb r0, [r4, #0x1b] - ldr r0, _0224E6C4 ; =ov17_0224E6C8 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E6C0: .word 0x00007530 -_0224E6C4: .word ov17_0224E6C8 - thumb_func_end ov17_0224E65C - - thumb_func_start ov17_0224E6C8 -ov17_0224E6C8: ; 0x0224E6C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _0224E6DE - cmp r0, #1 - beq _0224E716 - cmp r0, #2 - beq _0224E728 - b _0224E760 -_0224E6DE: - ldrb r0, [r4, #0x1a] - cmp r0, #0 - beq _0224E710 - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x78 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x74] - bl sub_0201C3C0 - add r2, r4, #0 - ldrb r1, [r4, #0x1a] - ldr r0, [r4, #0] - add r2, #0x14 - bl ov17_0224C2CC - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224E710: - mov r0, #0x64 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224E716: - ldr r0, [r4, #0] - bl ov17_0224C300 - cmp r0, #0 - bne _0224E778 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224E728: - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] - ldrb r0, [r4, #0x1c] - cmp r0, #1 - bne _0224E73C - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224E73C: - ldrb r1, [r4, #0x12] - ldrb r0, [r4, #0x1b] - cmp r1, r0 - blo _0224E778 - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x78 - bl sub_0200E084 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x74] - bl sub_0201C3C0 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0224E760: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0224E778: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E6C8 - - thumb_func_start ov17_0224E77C -ov17_0224E77C: ; 0x0224E77C - push {r3, lr} - mov r1, #0x30 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E77C - - thumb_func_start ov17_0224E790 -ov17_0224E790: ; 0x0224E790 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, _0224E7B0 ; =0x00000AEC - mov r5, #6 - add r6, r1, r0 -_0224E79A: - ldmia r3!, {r0, r1} - stmia r6!, {r0, r1} - sub r5, r5, #1 - bne _0224E79A - add r1, r2, #0 - mov r2, #0 - add r0, r4, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224E7B0: .word 0x00000AEC - thumb_func_end ov17_0224E790 - - thumb_func_start ov17_0224E7B4 -ov17_0224E7B4: ; 0x0224E7B4 - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E7B4 - - thumb_func_start ov17_0224E7C8 -ov17_0224E7C8: ; 0x0224E7C8 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - bl sub_0200569C - ldrh r0, [r4, #0x24] - bl sub_0200549C - ldr r0, _0224E7FC ; =0x00001150 - mov r1, #1 - strb r1, [r5, r0] - add r1, r0, #4 - add r0, #0xc - add r1, r5, r1 - ldmia r1!, {r2, r3} - add r0, r5, r0 - stmia r0!, {r2, r3} - mov r2, #0 - add r0, r6, #0 - add r1, r7, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E7FC: .word 0x00001150 - thumb_func_end ov17_0224E7C8 - - thumb_func_start ov17_0224E800 -ov17_0224E800: ; 0x0224E800 - push {r3, lr} - mov r1, #0x3c - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0224E800 - - thumb_func_start ov17_0224E814 -ov17_0224E814: ; 0x0224E814 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x17 - mov r1, #0x54 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x54 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - add r3, r4, #0 - str r0, [r4, #0] - ldrh r0, [r5] - add r3, #0x10 - mov r2, #7 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] -_0224E84C: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224E84C - ldr r0, [r6, #0] - ldr r2, _0224E864 ; =0x00007530 - str r0, [r3, #0] - ldr r0, _0224E868 ; =ov17_0224E86C - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E864: .word 0x00007530 -_0224E868: .word ov17_0224E86C - thumb_func_end ov17_0224E814 - - thumb_func_start ov17_0224E86C -ov17_0224E86C: ; 0x0224E86C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - cmp r0, #4 - bhi _0224E90A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224E888: ; jump table - .short _0224E892 - _0224E888 - 2 ; case 0 - .short _0224E8A8 - _0224E888 - 2 ; case 1 - .short _0224E8C0 - _0224E888 - 2 ; case 2 - .short _0224E8D4 - _0224E888 - 2 ; case 3 - .short _0224E8F0 - _0224E888 - 2 ; case 4 -_0224E892: - ldr r1, [r4, #0] - ldr r0, _0224E924 ; =0x00001150 - mov r2, #0 - strb r2, [r1, r0] - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - add r4, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0224E8A8: - ldrh r0, [r4, #0x34] - bl sub_02005690 - cmp r0, #0 - bne _0224E922 - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - add r4, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0224E8C0: - ldr r0, [r4, #0] - bl ov17_0224CE28 - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - add r4, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0224E8D4: - ldr r0, [r4, #0x4c] - add r0, r0, #1 - str r0, [r4, #0x4c] - cmp r0, #0x3c - bls _0224E922 - mov r0, #0 - str r0, [r4, #0x4c] - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - add r4, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0224E8F0: - ldr r0, _0224E928 ; =0x0000046F - bl sub_0200549C - ldr r0, _0224E92C ; =0x000006E5 - bl sub_02005748 - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - add r4, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0224E90A: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0224E922: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224E924: .word 0x00001150 -_0224E928: .word 0x0000046F -_0224E92C: .word 0x000006E5 - thumb_func_end ov17_0224E86C - - thumb_func_start ov17_0224E930 -ov17_0224E930: ; 0x0224E930 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - mov r1, #0 - mov r2, #0x3c - add r7, r3, #0 - bl sub_020C4CF4 - add r0, r5, #0 - add r0, #0x37 - strb r4, [r0] - add r0, r5, #0 - add r0, #0x38 - strb r6, [r0] - str r7, [r5, #0x30] - ldr r0, [sp, #0x18] - add r5, #0x39 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_0224E930 - - thumb_func_start ov17_0224E958 -ov17_0224E958: ; 0x0224E958 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r1, [r5, #0x30] - mov r2, #0x3c - str r1, [sp] - add r1, r5, #0 - add r1, #0x37 - ldrb r7, [r1] - add r1, r5, #0 - add r1, #0x38 - ldrb r6, [r1] - add r1, r5, #0 - add r1, #0x39 - ldrb r4, [r1] - mov r1, #0 - bl sub_020C4CF4 - ldr r0, [sp] - str r0, [r5, #0x30] - add r0, r5, #0 - add r0, #0x37 - strb r7, [r0] - add r0, r5, #0 - add r0, #0x38 - strb r6, [r0] - add r5, #0x39 - strb r4, [r5] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_0224E958 - - thumb_func_start ov17_0224E990 -ov17_0224E990: ; 0x0224E990 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r7, r0, #0 - ldr r0, _0224EBCC ; =0x00000B1B - add r4, r1, #0 - ldrb r0, [r7, r0] - mov r1, #4 - str r3, [sp] - bl ov17_0223F0BC - str r0, [sp, #8] - ldr r0, _0224EBCC ; =0x00000B1B - ldrb r0, [r7, r0] - cmp r0, #0 - bne _0224E9C0 - ldr r0, [sp] - ldr r1, _0224EBD0 ; =0x00001388 - lsr r0, r0, #2 - add r0, r0, r1 - lsl r1, r1, #1 - bl sub_020E2178 - str r0, [sp, #0xc] - b _0224E9D4 -_0224E9C0: - ldr r0, [sp] - mov r1, #6 - bl sub_020E2178 - ldr r1, _0224EBD0 ; =0x00001388 - add r0, r0, r1 - lsl r1, r1, #1 - bl sub_020E2178 - str r0, [sp, #0xc] -_0224E9D4: - mov r0, #0x12 - ldr r1, [r7, #0] - lsl r0, r0, #4 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0224E9E4 - cmp r0, #1 - bne _0224E9FA -_0224E9E4: - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r1, r1, #1 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp, #0x14] - b _0224EA0E -_0224E9FA: - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x14] - ldr r0, [sp] - lsr r0, r0, #1 - str r0, [sp] -_0224EA0E: - ldr r2, [sp, #8] - mov r5, #0 - lsr r3, r2, #0x1f - add r3, r2, r3 - add r1, r5, #0 - add r0, sp, #0x2c - asr r2, r3, #1 - b _0224EA22 -_0224EA1E: - strb r1, [r0, r5] - add r5, r5, #1 -_0224EA22: - cmp r5, r2 - blt _0224EA1E - ldr r0, [sp, #0x14] - mov r6, #0 - sub r0, r0, #1 - str r0, [sp, #0x1c] - add r0, r4, #0 - str r0, [sp, #0x18] - add r0, #0x30 - str r0, [sp, #0x18] -_0224EA36: - ldr r0, [r4, #0x30] - ldr r1, [sp, #0x18] - bl sub_02094EA0 - ldr r1, [sp, #0x14] - bl sub_020E1F6C - add r5, r1, #0 - beq _0224EA36 - add r0, sp, #0x2c - ldrb r0, [r0, r5] - cmp r0, #0 - bne _0224EA36 - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _0224EA90 - ldr r0, [sp, #0x1c] - cmp r5, r0 - bne _0224EA66 - sub r1, r5, #1 - add r0, sp, #0x2c - ldrb r0, [r0, r1] - cmp r0, #1 - beq _0224EA36 -_0224EA66: - sub r1, r5, #1 - add r0, sp, #0x2c - ldrb r0, [r0, r1] - cmp r0, #1 - beq _0224EA36 - add r1, r5, #1 - add r0, sp, #0x2c - ldrb r0, [r0, r1] - cmp r0, #1 - beq _0224EA36 - mov r0, #1 - tst r0, r5 - beq _0224EA90 - ldr r0, [r4, #0x30] - ldr r1, [sp, #0x18] - bl sub_02094EA0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x80 - blt _0224EA36 -_0224EA90: - mov r1, #1 - add r0, sp, #0x2c - strb r1, [r0, r5] - ldr r0, _0224EBD4 ; =0x00000B1A - add r6, r6, #1 - ldrb r0, [r7, r0] - cmp r6, r0 - blt _0224EA36 - ldr r0, [sp, #8] - mov r6, #0 - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - add r5, r6, #0 - str r0, [sp, #0x20] - b _0224EAD0 -_0224EAB0: - add r0, sp, #0x2c - ldrb r0, [r0, r5] - cmp r0, #1 - bne _0224EACE - ldr r0, [sp] - add r1, r5, #0 - mul r1, r0 - ldr r0, _0224EBD0 ; =0x00001388 - add r0, r1, r0 - ldr r1, _0224EBD8 ; =0x00002710 - bl sub_020E2178 - lsl r1, r6, #2 - str r0, [r4, r1] - add r6, r6, #1 -_0224EACE: - add r5, r5, #1 -_0224EAD0: - ldr r0, [sp, #0x20] - cmp r5, r0 - blt _0224EAB0 - mov r0, #0x12 - ldr r1, [r7, #0] - lsl r0, r0, #4 - ldrb r0, [r1, r0] - add r1, r4, #0 - add r1, #0x39 - ldrb r1, [r1] - bl ov17_0224EBE0 - add r6, r0, #0 - add r0, r4, #0 - str r0, [sp, #0x24] - add r0, #0x30 - str r0, [sp, #0x24] - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r0, r0, #1 - add r0, r0, #1 - mov r5, #0 - str r0, [sp, #0x28] - b _0224EB3A -_0224EB00: - ldr r0, [r4, #0x30] - ldr r1, [sp, #0x24] - bl sub_02094EA0 - add r1, r6, #2 - bl sub_020E1F6C - lsl r0, r5, #2 - ldr r0, [r4, r0] - add r1, r0, r1 - ldr r0, [sp, #0x28] - sub r3, r1, r0 - bpl _0224EB1C - mov r3, #0 -_0224EB1C: - lsl r0, r5, #2 - ldr r1, [r4, r0] - ldr r0, [sp, #0xc] - sub r2, r3, r1 - cmp r2, r0 - blo _0224EB2C - add r0, r0, r1 - sub r3, r0, #1 -_0224EB2C: - lsl r0, r5, #2 - add r1, r4, r5 - str r3, [r4, r0] - add r1, #0x28 - mov r0, #1 - strb r0, [r1] - add r5, r5, #1 -_0224EB3A: - ldr r0, _0224EBD4 ; =0x00000B1A - ldrb r0, [r7, r0] - cmp r5, r0 - blt _0224EB00 - mov r0, #0x12 - ldr r1, [r7, #0] - lsl r0, r0, #4 - ldrb r1, [r1, r0] - ldr r0, _0224EBDC ; =0x02254A84 - ldrb r0, [r0, r1] - add r1, r4, #0 - add r1, #0x30 - str r0, [sp, #4] - ldr r0, [r4, #0x30] - bl sub_02094EA0 - add r6, r4, #0 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1e - sub r1, r1, r2 - mov r0, #0x1e - ror r1, r0 - add r0, r4, #0 - add r1, r2, r1 - add r0, #0x20 - strb r1, [r0] - mov r5, #1 - add r6, #0x30 - b _0224EBBE -_0224EB74: - ldr r0, _0224EBD4 ; =0x00000B1A - ldrb r0, [r7, r0] - sub r0, r0, #1 - cmp r5, r0 - bge _0224EBA2 - ldr r0, [r4, #0x30] - add r1, r6, #0 - bl sub_02094EA0 - mov r1, #0x64 - bl sub_020E1F6C - ldr r0, [sp, #4] - cmp r0, r1 - ble _0224EBA2 - sub r0, r5, #1 - add r0, r4, r0 - add r0, #0x20 - ldrb r1, [r0] - add r0, r4, r5 - add r0, #0x20 - strb r1, [r0] - b _0224EBBC -_0224EBA2: - ldr r0, [r4, #0x30] - add r1, r6, #0 - bl sub_02094EA0 - lsr r1, r0, #0x1f - lsl r2, r0, #0x1e - sub r2, r2, r1 - mov r0, #0x1e - ror r2, r0 - add r0, r4, r5 - add r1, r1, r2 - add r0, #0x20 - strb r1, [r0] -_0224EBBC: - add r5, r5, #1 -_0224EBBE: - ldr r0, _0224EBD4 ; =0x00000B1A - ldrb r0, [r7, r0] - cmp r5, r0 - blt _0224EB74 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_0224EBCC: .word 0x00000B1B -_0224EBD0: .word 0x00001388 -_0224EBD4: .word 0x00000B1A -_0224EBD8: .word 0x00002710 -_0224EBDC: .word 0x02254A84 - thumb_func_end ov17_0224E990 - - thumb_func_start ov17_0224EBE0 -ov17_0224EBE0: ; 0x0224EBE0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #4 - blo _0224EBEE - bl sub_02022974 -_0224EBEE: - ldr r0, _0224EC20 ; =0x02254A80 - cmp r4, #3 - ldrsb r0, [r0, r5] - bhi _0224EC16 - add r1, r4, r4 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224EC02: ; jump table - .short _0224EC0A - _0224EC02 - 2 ; case 0 - .short _0224EC1C - _0224EC02 - 2 ; case 1 - .short _0224EC0E - _0224EC02 - 2 ; case 2 - .short _0224EC16 - _0224EC02 - 2 ; case 3 -_0224EC0A: - lsl r0, r0, #1 - pop {r3, r4, r5, pc} -_0224EC0E: - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - pop {r3, r4, r5, pc} -_0224EC16: - mov r1, #3 - bl sub_020E1F6C -_0224EC1C: - pop {r3, r4, r5, pc} - nop -_0224EC20: .word 0x02254A80 - thumb_func_end ov17_0224EBE0 - - thumb_func_start ov17_0224EC24 -ov17_0224EC24: ; 0x0224EC24 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - str r2, [sp] - ldr r4, [sp, #0x18] - cmp r0, #4 - blo _0224EC3A - bl sub_02022974 -_0224EC3A: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _0224EC5A - ldr r0, [sp, #0x1c] - cmp r0, #0 - bne _0224EC52 - mov r1, #1 - add r0, r6, #0 - and r0, r1 - and r1, r4 - cmp r0, r1 -_0224EC52: - sub r0, r6, r4 - cmp r0, #4 - sub r0, r6, r4 - cmp r0, #8 -_0224EC5A: - ldr r1, _0224ECC0 ; =0x02254A80 - ldr r0, [sp] - cmp r7, #3 - ldrsb r0, [r1, r0] - bhi _0224EC9E - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224EC70: ; jump table - .short _0224EC78 - _0224EC70 - 2 ; case 0 - .short _0224EC7C - _0224EC70 - 2 ; case 1 - .short _0224EC80 - _0224EC70 - 2 ; case 2 - .short _0224EC9E - _0224EC70 - 2 ; case 3 -_0224EC78: - lsl r0, r0, #1 - b _0224ECB6 -_0224EC7C: - lsl r0, r0, #1 - b _0224ECB6 -_0224EC80: - ldr r1, [sp, #0x20] - cmp r1, #1 - bne _0224EC94 - cmp r5, #2 - beq _0224EC8E - cmp r5, #3 - bne _0224EC94 -_0224EC8E: - lsl r1, r0, #1 - add r0, r0, r1 - b _0224ECB6 -_0224EC94: - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r1, r1, #1 - add r0, r0, r1 - b _0224ECB6 -_0224EC9E: - ldr r1, [sp, #0x20] - cmp r1, #1 - bne _0224ECB6 - cmp r5, #2 - beq _0224ECAC - cmp r5, #3 - bne _0224ECB6 -_0224ECAC: - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r1, r1, #1 - lsl r0, r0, #1 - add r0, r1, r0 -_0224ECB6: - cmp r0, #0 - bge _0224ECBC - mov r0, #0 -_0224ECBC: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224ECC0: .word 0x02254A80 - thumb_func_end ov17_0224EC24 - - thumb_func_start ov17_0224ECC4 -ov17_0224ECC4: ; 0x0224ECC4 - push {r3, r4, r5, r6} - add r6, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - add r5, r3, #0 - mov r4, #0 - ldr r2, [sp, #0x14] - cmp r1, #3 - bhi _0224ED08 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224ECE2: ; jump table - .short _0224ECEA - _0224ECE2 - 2 ; case 0 - .short _0224ECF2 - _0224ECE2 - 2 ; case 1 - .short _0224ECFA - _0224ECE2 - 2 ; case 2 - .short _0224ED02 - _0224ECE2 - 2 ; case 3 -_0224ECEA: - cmp r2, #1 - bne _0224ED08 - add r4, r4, #3 - b _0224ED08 -_0224ECF2: - cmp r2, #2 - bne _0224ED08 - add r4, r4, #3 - b _0224ED08 -_0224ECFA: - cmp r2, #4 - bne _0224ED08 - add r4, r4, #3 - b _0224ED08 -_0224ED02: - cmp r2, #3 - bne _0224ED08 - add r4, r4, #3 -_0224ED08: - ldr r1, [sp, #0x18] - cmp r1, #0 - beq _0224ED14 - cmp r2, r1 - beq _0224ED14 - add r4, #8 -_0224ED14: - mov r1, #0 - ldr r3, [sp, #0x10] - mvn r1, r1 - cmp r3, r1 - beq _0224ED36 - mov r1, #1 - add r2, r5, #0 - and r2, r1 - and r1, r3 - cmp r2, r1 - beq _0224ED2C - add r4, r4, #2 -_0224ED2C: - ldr r1, [sp, #0x10] - sub r1, r5, r1 - cmp r1, #8 - blt _0224ED36 - add r4, r4, #5 -_0224ED36: - cmp r6, #3 - bhi _0224ED70 - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224ED46: ; jump table - .short _0224ED4E - _0224ED46 - 2 ; case 0 - .short _0224ED52 - _0224ED46 - 2 ; case 1 - .short _0224ED56 - _0224ED46 - 2 ; case 2 - .short _0224ED70 - _0224ED46 - 2 ; case 3 -_0224ED4E: - lsl r4, r4, #1 - b _0224ED84 -_0224ED52: - lsl r4, r4, #1 - b _0224ED84 -_0224ED56: - ldr r1, [sp, #0x1c] - cmp r1, #1 - bne _0224ED66 - sub r0, r0, #2 - cmp r0, #1 - bhi _0224ED66 - lsl r4, r4, #1 - b _0224ED84 -_0224ED66: - lsr r0, r4, #0x1f - add r0, r4, r0 - asr r0, r0, #1 - add r4, r4, r0 - b _0224ED84 -_0224ED70: - ldr r1, [sp, #0x1c] - cmp r1, #1 - bne _0224ED84 - sub r0, r0, #2 - cmp r0, #1 - bhi _0224ED84 - lsr r0, r4, #0x1f - add r0, r4, r0 - asr r0, r0, #1 - add r4, r4, r0 -_0224ED84: - add r0, r4, #0 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224ECC4 - - thumb_func_start ov17_0224ED8C -ov17_0224ED8C: ; 0x0224ED8C - push {r3, r4, lr} - sub sp, #0xc - add r4, r2, #0 - add r4, #0x38 - ldrb r4, [r4] - cmp r4, #0 - bne _0224EDBA - cmp r0, #0 - bne _0224EDBA - ldr r0, [sp, #0x1c] - str r0, [sp] - ldr r0, [sp, #0x20] - str r0, [sp, #4] - ldr r0, [sp, #0x24] - str r0, [sp, #8] - add r0, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, [sp, #0x18] - bl ov17_0224EDE0 - add sp, #0xc - pop {r3, r4, pc} -_0224EDBA: - cmp r4, #0 - beq _0224EDDA - cmp r0, #1 - bne _0224EDDA - ldr r0, [sp, #0x1c] - str r0, [sp] - ldr r0, [sp, #0x20] - str r0, [sp, #4] - ldr r0, [sp, #0x24] - str r0, [sp, #8] - add r0, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, [sp, #0x18] - bl ov17_0224EE90 -_0224EDDA: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0224ED8C - - thumb_func_start ov17_0224EDE0 -ov17_0224EDE0: ; 0x0224EDE0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r4, r1, #0 - add r7, r0, #0 - add r0, r4, #0 - add r0, #0x38 - ldrb r3, [r0] - cmp r3, #0 - bne _0224EE82 - ldr r0, [sp, #0x44] - add r1, #0x36 - ldrb r0, [r0, #5] - ldrb r1, [r1] - cmp r1, r0 - bhs _0224EE82 - mov r5, #0x34 - ldrsh r5, [r4, r5] - cmp r5, #0 - ble _0224EE0E - sub r0, r5, #1 - add sp, #0x28 - strh r0, [r4, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_0224EE0E: - mov r5, #0 -_0224EE10: - add r6, r4, r5 - add r6, #0x28 - ldrb r6, [r6] - cmp r6, #1 - beq _0224EE20 - add r5, r5, #1 - cmp r5, #8 - blt _0224EE10 -_0224EE20: - cmp r5, #8 - bge _0224EE82 - lsl r6, r5, #2 - ldr r6, [r4, r6] - cmp r6, r2 - bhi _0224EE82 - ldr r6, [sp, #0x44] - add r6, #8 - str r6, [sp] - add r6, sp, #0x1c - str r6, [sp, #4] - mov r6, #0 - str r6, [sp, #8] - str r3, [sp, #0xc] - str r1, [sp, #0x10] - str r0, [sp, #0x14] - ldr r0, _0224EE88 ; =0x00000B1B - add r1, r4, r5 - ldrb r0, [r7, r0] - add r1, #0x20 - ldr r3, [sp, #0x40] - str r0, [sp, #0x18] - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - ldrb r1, [r1] - bl ov17_0224DE54 - ldr r0, [sp, #0x48] - add r1, sp, #0x1c - bl ov17_0224D6B0 - add r0, r4, r5 - add r1, r6, #0 - add r0, #0x28 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x36 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x36 - strb r1, [r0] - ldr r0, [sp, #0x40] - ldr r1, _0224EE8C ; =0x00002710 - bl sub_020E2178 - sub r0, r0, #2 - strh r0, [r4, #0x34] -_0224EE82: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224EE88: .word 0x00000B1B -_0224EE8C: .word 0x00002710 - thumb_func_end ov17_0224EDE0 - - thumb_func_start ov17_0224EE90 -ov17_0224EE90: ; 0x0224EE90 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - add r6, r0, #0 - ldr r0, [sp, #0x64] - add r5, r1, #0 - str r0, [sp, #0x64] - ldr r0, [sp, #0x60] - str r2, [sp, #0x1c] - lsr r0, r0, #1 - str r0, [sp, #0x38] - add r0, r5, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0 - beq _0224EECC - add r0, r5, #0 - add r0, #0x36 - ldrb r1, [r0] - ldr r0, [sp, #0x64] - ldrb r0, [r0, #5] - cmp r1, r0 - bhs _0224EECC - mov r0, #0xa - mul r0, r1 - ldr r2, _0224F068 ; =0x00001BBC - add r4, r6, r0 - ldrb r2, [r4, r2] - lsl r2, r2, #0x1d - lsr r2, r2, #0x1f - bne _0224EECE -_0224EECC: - b _0224F062 -_0224EECE: - mov r7, #0x34 - ldrsh r2, [r5, r7] - cmp r2, #0 - ble _0224EEDE - sub r0, r2, #1 - add sp, #0x48 - strh r0, [r5, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_0224EEDE: - ldr r2, _0224F068 ; =0x00001BBC - sub r2, #8 - add r2, r6, r2 - add r4, r2, r0 - ldr r0, [sp, #0x1c] - lsr r2, r3, #1 - sub r0, r0, r2 - str r0, [sp, #0x34] - ldrb r0, [r5, #5] - cmp r0, #0 - beq _0224EEF6 - b _0224EFF8 -_0224EEF6: - cmp r1, #0 - bne _0224EF02 - mov r0, #0 - sub r7, #0x35 - str r0, [sp, #0x20] - b _0224EF18 -_0224EF02: - sub r1, r1, #1 - mov r0, #0xa - mul r0, r1 - ldr r1, _0224F068 ; =0x00001BBC - add r0, r6, r0 - sub r1, r1, #2 - ldrb r7, [r0, r1] - ldr r1, _0224F068 ; =0x00001BBC - sub r1, r1, #5 - ldrb r0, [r0, r1] - str r0, [sp, #0x20] -_0224EF18: - ldr r1, [r6, #0] - ldr r0, _0224F06C ; =0x00000B1B - str r7, [sp] - ldrb r0, [r6, r0] - mov r2, #0x12 - lsl r2, r2, #4 - str r0, [sp, #4] - ldr r0, _0224F070 ; =0x00001C0E - ldrb r0, [r6, r0] - str r0, [sp, #8] - ldrb r0, [r1, r2] - sub r2, r2, #1 - ldrb r1, [r1, r2] - add r2, r5, #0 - add r2, #0x39 - ldrb r2, [r2] - ldrb r3, [r4, #6] - bl ov17_0224EC24 - ldr r1, [r6, #0] - str r0, [sp, #0x2c] - str r7, [sp] - ldrb r0, [r4, #3] - mov r2, #0x12 - lsl r2, r2, #4 - str r0, [sp, #4] - ldr r0, [sp, #0x20] - str r0, [sp, #8] - ldr r0, _0224F070 ; =0x00001C0E - ldrb r0, [r6, r0] - str r0, [sp, #0xc] - ldrb r0, [r1, r2] - sub r2, r2, #1 - ldrb r1, [r1, r2] - add r2, r5, #0 - add r2, #0x39 - ldrb r2, [r2] - ldrb r3, [r4, #6] - bl ov17_0224ECC4 - str r0, [sp, #0x28] - ldrb r1, [r4, #6] - ldr r0, [sp, #0x38] - mul r0, r1 - ldr r1, _0224F074 ; =0x00001388 - add r0, r0, r1 - lsl r1, r1, #1 - bl sub_020E2178 - add r7, r0, #0 - add r1, r5, #0 - ldr r0, [r5, #0x30] - add r1, #0x30 - bl sub_02094EA0 - ldr r1, [sp, #0x2c] - add r1, r1, #2 - bl sub_020E1F6C - ldr r0, [sp, #0x2c] - lsr r2, r0, #0x1f - add r2, r0, r2 - asr r0, r2, #1 - add r0, r0, #1 - sub r0, r1, r0 - add r0, r0, r7 - str r0, [sp, #0x30] - bpl _0224EFA4 - mov r0, #0 - str r0, [sp, #0x30] -_0224EFA4: - add r1, r5, #0 - ldr r0, [r5, #0x30] - add r1, #0x30 - bl sub_02094EA0 - mov r1, #0x64 - bl sub_020E1F6C - ldr r2, [sp, #0x2c] - ldr r0, [sp, #0x28] - add r0, r2, r0 - cmp r1, r0 - bge _0224EFE4 - add r7, r5, #0 - add r7, #0x30 -_0224EFC2: - ldr r0, [r5, #0x30] - add r1, r7, #0 - bl sub_02094EA0 - lsr r1, r0, #0x1f - lsl r2, r0, #0x1e - sub r2, r2, r1 - mov r0, #0x1e - ror r2, r0 - add r0, r1, r2 - str r0, [sp, #0x24] - bl ov17_0224DD28 - ldrb r1, [r4, #3] - cmp r1, r0 - beq _0224EFC2 - b _0224EFEC -_0224EFE4: - ldrb r0, [r4, #3] - bl ov17_0224DD5C - str r0, [sp, #0x24] -_0224EFEC: - ldr r0, [sp, #0x30] - str r0, [r5, #0] - ldr r0, [sp, #0x24] - strb r0, [r5, #4] - mov r0, #1 - strb r0, [r5, #5] -_0224EFF8: - ldr r1, [r5, #0] - ldr r0, [sp, #0x34] - cmp r1, r0 - bhi _0224F062 - ldr r0, [sp, #0x64] - ldr r2, [sp, #0x1c] - add r0, #8 - str r0, [sp] - add r0, sp, #0x3c - str r0, [sp, #4] - ldr r0, _0224F078 ; =0x00001BB4 - ldr r3, [sp, #0x60] - add r0, r6, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x38 - ldrb r0, [r0] - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0x36 - ldrb r0, [r0] - str r0, [sp, #0x10] - ldr r0, [sp, #0x64] - ldrb r0, [r0, #5] - str r0, [sp, #0x14] - ldr r0, _0224F06C ; =0x00000B1B - ldrb r0, [r6, r0] - str r0, [sp, #0x18] - add r0, r5, #0 - add r0, #0x37 - ldrb r0, [r0] - ldrb r1, [r5, #4] - bl ov17_0224DE54 - ldr r0, [sp, #0x68] - add r1, sp, #0x3c - bl ov17_0224D6B0 - mov r0, #0 - strb r0, [r5, #5] - add r0, r5, #0 - add r0, #0x36 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x36 - strb r1, [r0] - ldr r0, [sp, #0x60] - ldr r1, _0224F07C ; =0x00002710 - bl sub_020E2178 - sub r0, r0, #2 - strh r0, [r5, #0x34] -_0224F062: - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224F068: .word 0x00001BBC -_0224F06C: .word 0x00000B1B -_0224F070: .word 0x00001C0E -_0224F074: .word 0x00001388 -_0224F078: .word 0x00001BB4 -_0224F07C: .word 0x00002710 - thumb_func_end ov17_0224EE90 - - thumb_func_start ov17_0224F080 -ov17_0224F080: ; 0x0224F080 - push {r4, lr} - add r4, r0, #0 - cmp r4, #5 - blo _0224F08C - bl sub_02022974 -_0224F08C: - ldr r0, _0224F094 ; =0x02254A90 - lsl r1, r4, #2 - ldr r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_0224F094: .word 0x02254A90 - thumb_func_end ov17_0224F080 - - thumb_func_start ov17_0224F098 -ov17_0224F098: ; 0x0224F098 - mov r0, #0x31 - bx lr - thumb_func_end ov17_0224F098 - - thumb_func_start ov17_0224F09C -ov17_0224F09C: ; 0x0224F09C - mov r0, #0x32 - bx lr - thumb_func_end ov17_0224F09C - - thumb_func_start ov17_0224F0A0 -ov17_0224F0A0: ; 0x0224F0A0 - push {r4, lr} - add r4, r0, #0 - cmp r4, #5 - blo _0224F0AC - bl sub_02022974 -_0224F0AC: - ldr r0, _0224F0B4 ; =0x02254A88 - ldrb r0, [r0, r4] - pop {r4, pc} - nop -_0224F0B4: .word 0x02254A88 - thumb_func_end ov17_0224F0A0 - - thumb_func_start ov17_0224F0B8 -ov17_0224F0B8: ; 0x0224F0B8 - mov r0, #0x2e - bx lr - thumb_func_end ov17_0224F0B8 - - thumb_func_start ov17_0224F0BC -ov17_0224F0BC: ; 0x0224F0BC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r3, #0 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov17_0224F0B8 - str r0, [sp, #0xc] - add r0, r7, #0 - bl ov17_0224F080 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x28] - str r4, [sp, #4] - str r0, [sp, #8] - ldr r2, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200CBDC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224F0BC - - thumb_func_start ov17_0224F0F0 -ov17_0224F0F0: ; 0x0224F0F0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov17_0224F0B8 - str r0, [sp, #8] - bl ov17_0224F098 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - str r6, [sp, #4] - bl sub_0200CE0C - bl ov17_0224F0B8 - add r6, r0, #0 - bl ov17_0224F09C - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - str r7, [sp, #4] - bl sub_0200CE3C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov17_0224F0F0 - - thumb_func_start ov17_0224F138 -ov17_0224F138: ; 0x0224F138 - ldr r3, _0224F13C ; =sub_0200D070 - bx r3 - ; .align 2, 0 -_0224F13C: .word sub_0200D070 - thumb_func_end ov17_0224F138 - - thumb_func_start ov17_0224F140 -ov17_0224F140: ; 0x0224F140 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - bl sub_0200D090 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D0A0 - pop {r3, r4, r5, pc} - thumb_func_end ov17_0224F140 - - thumb_func_start ov17_0224F154 -ov17_0224F154: ; 0x0224F154 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r6, r3, #0 - add r4, r0, #0 - add r7, r1, #0 - add r5, sp, #0 - mov r3, #6 -_0224F162: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _0224F162 - ldr r0, [r6, #0] - str r0, [r5, #0] - add r0, r2, #0 - bl ov17_0224F0A0 - str r0, [sp, #0xc] - add r0, r4, #0 - add r1, r7, #0 - add r2, sp, #0 - bl sub_0200CE6C - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov17_0224F154 - - thumb_func_start ov17_0224F184 -ov17_0224F184: ; 0x0224F184 - ldr r3, _0224F188 ; =sub_0200D0F4 - bx r3 - ; .align 2, 0 -_0224F188: .word sub_0200D0F4 - thumb_func_end ov17_0224F184 - - thumb_func_start ov17_0224F18C -ov17_0224F18C: ; 0x0224F18C - push {r3, r4, r5, lr} - ldr r2, _0224F1B0 ; =0x00000A18 - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - bl sub_020C4CF4 - ldr r0, [r4, #0] - str r0, [r5, #0] - ldrh r0, [r4, #4] - strh r0, [r5, #4] - ldrb r0, [r4, #6] - strb r0, [r5, #6] - ldrb r0, [r4, #7] - strb r0, [r5, #7] - ldrb r0, [r4, #8] - strb r0, [r5, #8] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224F1B0: .word 0x00000A18 - thumb_func_end ov17_0224F18C - - thumb_func_start ov17_0224F1B4 -ov17_0224F1B4: ; 0x0224F1B4 - push {r3, r4, r5, lr} - ldr r5, [r0, #0xc] - mov r4, #0 - mov r2, #1 -_0224F1BC: - add r3, r2, #0 - lsl r3, r4 - add r1, r5, #0 - tst r1, r3 - bne _0224F1D0 - ldr r1, [r0, #0xc] - orr r1, r3 - str r1, [r0, #0xc] - add r0, r4, #0 - pop {r3, r4, r5, pc} -_0224F1D0: - add r4, r4, #1 - cmp r4, #0x20 - blt _0224F1BC - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0224F1B4 - - thumb_func_start ov17_0224F1E0 -ov17_0224F1E0: ; 0x0224F1E0 - push {r3, r4} - mov r2, #1 - add r3, r2, #0 - lsl r3, r1 - sub r1, r2, #2 - ldr r4, [r0, #0xc] - eor r1, r3 - and r1, r4 - str r1, [r0, #0xc] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224F1E0 - - thumb_func_start ov17_0224F1F8 -ov17_0224F1F8: ; 0x0224F1F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r4, [sp, #0x28] - add r5, r0, #0 - mov r0, #2 - str r4, [sp, #4] - add r4, #8 - lsl r0, r0, #8 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - cmp r4, r0 - bls _0224F216 - bl sub_02022974 -_0224F216: - add r0, r5, #0 - mov r2, #2 - add r0, #0x10 - mov r1, #0 - lsl r2, r2, #8 - bl sub_020C4CF4 - add r0, sp, #8 - strb r6, [r0, #4] - strh r7, [r0, #2] - add r0, r5, #0 - bl ov17_0224F1B4 - add r1, sp, #8 - strb r0, [r1, #5] - mov r0, #0 - strb r0, [r1, #6] - strh r4, [r1] - add r1, r5, #0 - add r0, sp, #8 - add r1, #0x10 - mov r2, #8 - bl sub_020C4B68 - add r1, r5, #0 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, #0x18 - bl sub_020C4DB0 - ldr r0, _0224F268 ; =0x00000A15 - mov r1, #0 - strb r1, [r5, r0] - mov r1, #1 - sub r0, r0, #5 - strb r1, [r5, r0] - add r0, sp, #8 - ldrb r0, [r0, #5] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224F268: .word 0x00000A15 - thumb_func_end ov17_0224F1F8 - - thumb_func_start ov17_0224F26C -ov17_0224F26C: ; 0x0224F26C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r7, r3, #0 - mov r0, #2 - add r7, #8 - lsl r0, r0, #8 - add r4, r1, #0 - add r6, r2, #0 - str r3, [sp] - cmp r7, r0 - bls _0224F288 - bl sub_02022974 -_0224F288: - add r0, r5, #0 - mov r2, #2 - add r0, #0x10 - mov r1, #0 - lsl r2, r2, #8 - bl sub_020C4CF4 - ldrh r2, [r4] - add r1, sp, #4 - add r0, sp, #4 - strh r2, [r1] - ldrh r2, [r4, #2] - strh r2, [r1, #2] - ldrh r2, [r4, #4] - strh r2, [r1, #4] - ldrh r2, [r4, #6] - strh r2, [r1, #6] - mov r2, #0xfe - strb r2, [r1, #4] - mov r2, #1 - strb r2, [r1, #6] - strh r7, [r1] - add r1, r5, #0 - add r1, #0x10 - mov r2, #8 - bl sub_020C4B68 - cmp r6, #0 - beq _0224F2CE - add r1, r5, #0 - ldr r2, [sp] - add r0, r6, #0 - add r1, #0x18 - bl sub_020C4DB0 -_0224F2CE: - mov r0, #0xa1 - mov r1, #1 - lsl r0, r0, #4 - strb r1, [r5, r0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224F26C - - thumb_func_start ov17_0224F2DC -ov17_0224F2DC: ; 0x0224F2DC - push {r4, r5} - lsl r5, r1, #9 - mov r1, #0x21 - lsl r1, r1, #4 - add r4, r0, r1 - add r1, #8 - add r4, r4, r5 - add r0, r0, r1 - str r4, [r2, #0] - add r0, r0, r5 - str r0, [r3, #0] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224F2DC - - thumb_func_start ov17_0224F2F8 -ov17_0224F2F8: ; 0x0224F2F8 - mov r1, #0xa1 - lsl r1, r1, #4 - ldrb r0, [r0, r1] - cmp r0, #1 - bne _0224F306 - mov r0, #0 - bx lr -_0224F306: - mov r0, #1 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224F2F8 - - thumb_func_start ov17_0224F30C -ov17_0224F30C: ; 0x0224F30C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - bl ov17_0224F2F8 - cmp r0, #0 - bne _0224F322 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224F322: - ldrh r0, [r5, #4] - cmp r4, r0 - blt _0224F32C - bl sub_02022974 -_0224F32C: - add r0, r5, #0 - add r1, r6, #0 - mov r6, #0xc - ldr r5, [r5, #0] - mul r6, r4 - add r2, r4, #0 - ldr r4, [r5, r6] - add r3, r7, #0 - blx r4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov17_0224F30C - - thumb_func_start ov17_0224F344 -ov17_0224F344: ; 0x0224F344 - cmp r0, r2 - beq _0224F354 - cmp r2, #0xff - beq _0224F354 - cmp r2, #0xfe - bne _0224F358 - cmp r1, r0 - bne _0224F358 -_0224F354: - mov r0, #1 - bx lr -_0224F358: - mov r0, #0 - bx lr - thumb_func_end ov17_0224F344 - - thumb_func_start ov17_0224F35C -ov17_0224F35C: ; 0x0224F35C - push {r4, lr} - add r4, r0, #0 - mov r0, #0xa1 - lsl r0, r0, #4 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0224F36E - mov r0, #0 - pop {r4, pc} -_0224F36E: - ldrb r0, [r4, #7] - cmp r0, #0 - bne _0224F3AC - ldrb r1, [r4, #6] - mov r2, #0x21 - lsl r2, r2, #4 - add r0, r4, #0 - add r3, r4, r2 - lsl r1, r1, #9 - add r0, #0x10 - add r1, r3, r1 - sub r2, #0x10 - bl sub_020C4DB0 - ldrb r0, [r4, #6] - mov r2, #1 - add r1, r4, r0 - ldr r0, _0224F3CC ; =0x00000A11 - strb r2, [r1, r0] - add r0, r4, #0 - add r0, #0x10 - mov r1, #0 - lsl r2, r2, #9 - bl sub_020C4CF4 - mov r0, #0xa1 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #1 - pop {r4, pc} -_0224F3AC: - ldrh r2, [r4, #0x10] - add r1, r4, #0 - mov r0, #0x18 - add r1, #0x10 - bl sub_0203597C - cmp r0, #1 - bne _0224F3C8 - mov r0, #0xa1 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #1 - pop {r4, pc} -_0224F3C8: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0224F3CC: .word 0x00000A11 - thumb_func_end ov17_0224F35C - - thumb_func_start ov17_0224F3D0 -ov17_0224F3D0: ; 0x0224F3D0 - mov r1, #0xa1 - lsl r1, r1, #4 - ldrb r0, [r0, r1] - bx lr - thumb_func_end ov17_0224F3D0 - - thumb_func_start ov17_0224F3D8 -ov17_0224F3D8: ; 0x0224F3D8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r0, #0 - add r4, r1, #0 - add r0, sp, #0x18 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - ldr r0, _0224F4B0 ; =0x00000A11 - mov r6, #0 -_0224F3EE: - add r1, r7, r6 - ldrb r1, [r1, r0] - cmp r1, #1 - bne _0224F4A2 - add r0, r7, #0 - add r1, r6, #0 - add r2, sp, #0x14 - add r3, sp, #0x10 - bl ov17_0224F2DC - ldr r2, [sp, #0x14] - ldrb r0, [r7, #6] - ldrb r1, [r7, #8] - ldrb r2, [r2, #4] - bl ov17_0224F344 - cmp r0, #1 - bne _0224F484 - ldr r2, [sp, #0x14] - ldrh r1, [r7, #4] - ldrh r0, [r2, #2] - str r0, [sp, #8] - cmp r0, r1 - bhs _0224F484 - ldrb r0, [r2, #6] - cmp r0, #0 - bne _0224F43E - add r1, r4, #0 - ldr r4, [r7, #0] - ldr r5, [sp, #8] - str r4, [sp, #4] - mov r4, #0xc - mul r4, r5 - ldr r5, [sp, #4] - ldr r3, [sp, #0x10] - add r4, r5, r4 - ldr r4, [r4, #4] - add r0, r7, #0 - blx r4 - b _0224F484 -_0224F43E: - ldr r1, [sp, #8] - mov r3, #0xc - ldr r0, [r7, #0] - mul r3, r1 - add r0, r0, r3 - ldr r0, [r0, #8] - cmp r0, #0 - beq _0224F472 - ldr r1, [sp, #0x10] - lsl r0, r6, #2 - add r3, sp, #0x18 - str r1, [r3, r0] - str r6, [sp] - add r1, r4, #0 - ldr r4, [r7, #0] - mov r5, #0xc - mov ip, r4 - ldrh r4, [r2, #2] - add r0, r7, #0 - mul r5, r4 - str r5, [sp, #0xc] - ldr r4, [sp, #0xc] - mov r5, ip - add r4, r5, r4 - ldr r4, [r4, #8] - blx r4 -_0224F472: - ldr r1, [sp, #0x14] - add r0, r7, #0 - ldrb r1, [r1, #5] - bl ov17_0224F1E0 - ldr r0, _0224F4B4 ; =0x00000A15 - ldrb r1, [r7, r0] - add r1, r1, #1 - strb r1, [r7, r0] -_0224F484: - ldr r0, _0224F4B0 ; =0x00000A11 - mov r1, #0 - add r2, r7, r6 - strb r1, [r2, r0] - mov r2, #0x21 - lsl r2, r2, #4 - add r3, r7, r2 - lsl r0, r6, #9 - add r0, r3, r0 - sub r2, #0x10 - bl sub_020C4CF4 - add sp, #0x28 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224F4A2: - add r6, r6, #1 - cmp r6, #4 - blt _0224F3EE - mov r0, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224F4B0: .word 0x00000A11 -_0224F4B4: .word 0x00000A15 - thumb_func_end ov17_0224F3D8 - - thumb_func_start ov17_0224F4B8 -ov17_0224F4B8: ; 0x0224F4B8 - cmp r2, r3 - beq _0224F4C0 - mov r0, #1 - bx lr -_0224F4C0: - ldr r2, _0224F4D0 ; =0x00000A15 - ldrb r0, [r0, r2] - cmp r0, r1 - blt _0224F4CC - mov r0, #1 - bx lr -_0224F4CC: - mov r0, #0 - bx lr - ; .align 2, 0 -_0224F4D0: .word 0x00000A15 - thumb_func_end ov17_0224F4B8 - - thumb_func_start ov17_0224F4D4 -ov17_0224F4D4: ; 0x0224F4D4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r1, #1 - lsl r1, r1, #0x1a - ldr r0, [r1, #0] - ldr r2, _0224F718 ; =0xFFFFE0FF - and r0, r2 - str r0, [r1, #0] - ldr r0, _0224F71C ; =0x04001000 - ldr r3, [r0, #0] - and r2, r3 - str r2, [r0, #0] - ldr r3, [r1, #0] - ldr r2, _0224F720 ; =0xFFFF1FFF - and r3, r2 - str r3, [r1, #0] - ldr r3, [r0, #0] - add r1, #0x50 - and r2, r3 - str r2, [r0, #0] - mov r2, #0 - strh r2, [r1] - add r0, #0x50 - strh r2, [r0] - mov r2, #7 - mov r0, #3 - mov r1, #0x18 - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r1, #0x4a - add r0, r4, #0 - lsl r1, r1, #6 - mov r2, #0x18 - bl sub_0200681C - mov r2, #0x4a - mov r1, #0 - lsl r2, r2, #6 - add r5, r0, #0 - bl sub_020C4CF4 - mov r0, #0x18 - bl ov17_0223F140 - str r0, [r5, #0xc] - add r0, r4, #0 - bl sub_02006840 - mov r1, #0x5b - str r0, [r5, #0] - lsl r1, r1, #2 - str r5, [r0, r1] - ldr r2, [r5, #0] - mov r3, #3 - add r0, r1, #4 - strb r3, [r2, r0] - ldr r0, [r5, #0] - str r0, [r5, #0x10] - add r0, r5, #0 - bl ov17_0224FE1C - ldr r0, _0224F724 ; =0x0000127F - mov r1, #0 - strb r1, [r5, r0] - mov r0, #0x18 - bl sub_02002F38 - add r1, r5, #0 - add r1, #0xd0 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02003858 - add r0, r5, #0 - add r0, #0xd0 - mov r2, #2 - ldr r0, [r0, #0] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #0x18 - bl sub_02002F70 - add r0, r5, #0 - add r0, #0xd0 - mov r1, #1 - ldr r0, [r0, #0] - lsl r2, r1, #9 - mov r3, #0x18 - bl sub_02002F70 - add r0, r5, #0 - add r0, #0xd0 - mov r2, #7 - ldr r0, [r0, #0] - mov r1, #2 - lsl r2, r2, #6 - mov r3, #0x18 - bl sub_02002F70 - add r0, r5, #0 - add r0, #0xd0 - mov r2, #2 - ldr r0, [r0, #0] - mov r1, #3 - lsl r2, r2, #8 - mov r3, #0x18 - bl sub_02002F70 - mov r0, #0x18 - bl sub_02018340 - str r0, [r5, #0x30] - mov r0, #0x40 - mov r1, #0x18 - bl sub_0201DBEC - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - ldr r0, [r5, #0x30] - bl ov17_0224FB34 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r0, #2 - mov r1, #0x18 - bl sub_02002BB8 - mov r0, #0x18 - bl sub_0200C6E4 - ldr r1, _0224F728 ; =0x02254B0C - ldr r2, _0224F72C ; =0x02254AC4 - mov r3, #0x20 - str r0, [r5, #0x28] - bl sub_0200C73C - ldr r1, _0224F730 ; =0x00100010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - ldr r0, [r5, #0x28] - bl sub_0200C704 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r2, #0x80 - bl sub_0200C7C0 - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - ldr r2, _0224F734 ; =0x02254AD8 - bl sub_0200CB30 - mov r0, #0x18 - bl sub_0200762C - str r0, [r5, #0x14] - bl ov17_0224FDDC - mov r0, #0 - mov r1, #0x1a - mov r2, #0xda - mov r3, #0x18 - bl sub_0200B144 - add r1, r5, #0 - add r1, #0xc4 - str r0, [r1, #0] - mov r0, #0x18 - bl sub_0200B358 - add r1, r5, #0 - add r1, #0xc8 - str r0, [r1, #0] - mov r0, #5 - lsl r0, r0, #6 - mov r1, #0x18 - bl sub_02023790 - add r1, r5, #0 - add r1, #0xcc - str r0, [r1, #0] - mov r0, #0xa - mov r1, #0x18 - bl sub_02012744 - add r1, r5, #0 - add r1, #0xd4 - str r0, [r1, #0] - add r0, r5, #0 - bl ov17_0224FE60 - add r0, r5, #0 - bl ov17_0224FE70 - add r0, r5, #0 - bl ov17_0224FCA0 - add r0, r5, #0 - bl ov17_0224FE48 - add r0, r5, #0 - bl ov17_0224FE58 - add r0, r5, #0 - bl ov17_02250744 - bl sub_02039734 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0x18 - str r1, [sp, #8] - mov r1, #0x21 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, _0224F738 ; =ov17_0224FAFC - ldr r2, _0224F73C ; =0x00013880 - add r1, r5, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - mov r0, #0x85 - mov r1, #1 - lsl r0, r0, #4 - strb r1, [r5, r0] - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r1, _0224F740 ; =0x0000046F - mov r0, #6 - mov r2, #1 - bl sub_02004550 - ldr r1, [r5, #0] - ldr r0, _0224F744 ; =0x00000171 - ldrb r0, [r1, r0] - bl sub_020959F4 - ldr r0, _0224F748 ; =ov17_0224FA24 - add r1, r5, #0 - bl sub_02017798 - ldr r0, _0224F74C ; =ov17_0224FAE4 - add r1, r5, #0 - mov r2, #0xa - bl sub_0200DA04 - str r0, [r5, #8] - ldr r0, _0224F750 ; =0x000006E5 - bl sub_02005748 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224F718: .word 0xFFFFE0FF -_0224F71C: .word 0x04001000 -_0224F720: .word 0xFFFF1FFF -_0224F724: .word 0x0000127F -_0224F728: .word 0x02254B0C -_0224F72C: .word 0x02254AC4 -_0224F730: .word 0x00100010 -_0224F734: .word 0x02254AD8 -_0224F738: .word ov17_0224FAFC -_0224F73C: .word 0x00013880 -_0224F740: .word 0x0000046F -_0224F744: .word 0x00000171 -_0224F748: .word ov17_0224FA24 -_0224F74C: .word ov17_0224FAE4 -_0224F750: .word 0x000006E5 - thumb_func_end ov17_0224F4D4 - - thumb_func_start ov17_0224F754 -ov17_0224F754: ; 0x0224F754 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02094E98 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0224F776 - cmp r0, #1 - beq _0224F7A8 - cmp r0, #2 - beq _0224F830 - b _0224F83E -_0224F776: - bl sub_0200F2AC - cmp r0, #1 - bne _0224F83E - ldr r0, _0224F844 ; =ov17_0224FAAC - add r1, r4, #0 - bl sub_020177BC - mov r0, #0xff - str r0, [sp] - ldr r0, _0224F848 ; =0x0000D6D8 - add r1, r4, #0 - str r0, [sp, #4] - add r1, #0xd0 - ldr r1, [r1, #0] - ldr r2, _0224F84C ; =0x02254AB4 - mov r0, #0x18 - mov r3, #8 - bl ov17_0223F70C - ldr r1, _0224F850 ; =0x00000848 - str r0, [r4, r1] - mov r0, #1 - str r0, [r5, #0] - b _0224F83E -_0224F7A8: - ldr r0, [r4, #0] - bl sub_02094EDC - cmp r0, #1 - bne _0224F804 - ldr r2, _0224F854 ; =0x0000084E - ldr r1, _0224F858 ; =0x00001274 - ldrh r2, [r4, r2] - add r0, r4, #0 - add r1, r4, r1 - lsl r3, r2, #2 - ldr r2, _0224F85C ; =0x02254B54 - ldr r2, [r2, r3] - blx r2 - cmp r0, #1 - beq _0224F7CC - cmp r0, #2 - bne _0224F7EE -_0224F7CC: - cmp r0, #1 - bne _0224F7D8 - ldr r0, _0224F854 ; =0x0000084E - ldrh r1, [r4, r0] - add r1, r1, #1 - b _0224F7DE -_0224F7D8: - ldr r0, _0224F860 ; =0x00001276 - ldrh r1, [r4, r0] - ldr r0, _0224F854 ; =0x0000084E -_0224F7DE: - strh r1, [r4, r0] - ldr r0, _0224F858 ; =0x00001274 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - b _0224F804 -_0224F7EE: - cmp r0, #3 - bne _0224F804 - mov r0, #2 - str r0, [r5, #0] - ldr r0, _0224F858 ; =0x00001274 - mov r1, #0 - add r0, r4, r0 - mov r2, #8 - bl sub_020C4CF4 - b _0224F83E -_0224F804: - ldr r0, _0224F864 ; =0x0000085C - add r0, r4, r0 - bl ov17_0224F35C - ldr r0, _0224F864 ; =0x0000085C - add r1, r4, #0 - add r0, r4, r0 - bl ov17_0224F3D8 - ldr r0, _0224F868 ; =0x0000127C - ldrb r1, [r4, r0] - cmp r1, #1 - bne _0224F83E - mov r1, #2 - sub r0, #8 - str r1, [r5, #0] - add r0, r4, r0 - mov r1, #0 - mov r2, #8 - bl sub_020C4CF4 - b _0224F83E -_0224F830: - bl sub_0200F2AC - cmp r0, #1 - bne _0224F83E - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0224F83E: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224F844: .word ov17_0224FAAC -_0224F848: .word 0x0000D6D8 -_0224F84C: .word 0x02254AB4 -_0224F850: .word 0x00000848 -_0224F854: .word 0x0000084E -_0224F858: .word 0x00001274 -_0224F85C: .word 0x02254B54 -_0224F860: .word 0x00001276 -_0224F864: .word 0x0000085C -_0224F868: .word 0x0000127C - thumb_func_end ov17_0224F754 - - thumb_func_start ov17_0224F86C -ov17_0224F86C: ; 0x0224F86C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_0200682C - add r4, r0, #0 - bl sub_020141E4 - add r0, r4, #0 - bl ov17_0224FE50 - add r0, r4, #0 - bl ov17_0224FE5C - add r0, r4, #0 - bl ov17_0224FE68 - add r0, r4, #0 - bl ov17_0224FEC8 - add r5, r4, #0 - mov r6, #0 - add r5, #0x34 -_0224F898: - add r0, r5, #0 - bl sub_0201A8FC - add r6, r6, #1 - add r5, #0x10 - cmp r6, #9 - blt _0224F898 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0x30] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0x30] - mov r1, #3 - bl sub_02019044 - mov r0, #4 - mov r1, #0 - bl sub_02019120 - ldr r0, [r4, #0x30] - mov r1, #4 - bl sub_02019044 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x2c] - bl sub_0200D0B0 - ldr r0, [r4, #0x28] - bl sub_0200C8D4 - bl sub_0201DC3C - add r0, r4, #0 - add r0, #0x10 - bl ov17_022507C4 - ldr r0, [r4, #0x14] - bl sub_02007B6C - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl sub_020127BC - mov r0, #2 - bl sub_02002C60 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_02002FA0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_02002F54 - add r0, r4, #0 - add r0, #0xcc - ldr r0, [r0, #0] - bl sub_020237BC - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200B3F0 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl sub_0200B190 - ldr r0, [r4, #0x30] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, [r4, #8] - bl sub_0200DA58 - ldr r0, [r4, #0xc] - bl ov17_0223F1E0 - bl sub_0201E530 - add r0, r7, #0 - bl sub_02006830 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _0224FA00 ; =0xFFFF1FFF - and r1, r0 - str r1, [r2, #0] - ldr r2, _0224FA04 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - mov r0, #0x18 - bl sub_0201807C - bl sub_02095A24 - mov r1, #5 - mov r2, #2 - ldr r0, _0224FA08 ; =0x00007FFF - lsl r1, r1, #0x18 - lsl r2, r2, #8 - bl sub_020C4AF0 - mov r2, #2 - ldr r0, _0224FA08 ; =0x00007FFF - ldr r1, _0224FA0C ; =0x05000200 - lsl r2, r2, #8 - bl sub_020C4AF0 - mov r2, #2 - ldr r0, _0224FA08 ; =0x00007FFF - ldr r1, _0224FA10 ; =0x05000400 - lsl r2, r2, #8 - bl sub_020C4AF0 - mov r2, #2 - ldr r0, _0224FA08 ; =0x00007FFF - ldr r1, _0224FA14 ; =0x05000600 - lsl r2, r2, #8 - bl sub_020C4AF0 - bl sub_02039794 - ldr r0, _0224FA18 ; =0x0000000B - bl sub_02006514 - ldr r0, _0224FA1C ; =0x0000000C - bl sub_02006514 - ldr r0, _0224FA20 ; =0x00000016 - bl sub_02006514 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224FA00: .word 0xFFFF1FFF -_0224FA04: .word 0x04001000 -_0224FA08: .word 0x00007FFF -_0224FA0C: .word 0x05000200 -_0224FA10: .word 0x05000400 -_0224FA14: .word 0x05000600 -_0224FA18: .word 0x0000000B -_0224FA1C: .word 0x0000000C -_0224FA20: .word 0x00000016 - thumb_func_end ov17_0224F86C - - thumb_func_start ov17_0224FA24 -ov17_0224FA24: ; 0x0224FA24 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, _0224FA9C ; =0x00000854 - sub r1, r0, #2 - ldrb r3, [r4, r1] - sub r1, r0, #3 - ldrb r1, [r4, r1] - sub r6, r0, #1 - ldrb r6, [r4, r6] - lsl r2, r1, #8 - mov r1, #0xff - lsl r1, r1, #8 - and r2, r1 - orr r2, r6 - ldrb r5, [r4, r0] - ldr r6, _0224FAA0 ; =0x04000040 - strh r2, [r6] - lsl r2, r3, #8 - and r2, r1 - orr r2, r5 - strh r2, [r6, #4] - add r2, r0, #4 - ldrb r5, [r4, r2] - add r2, r0, #2 - ldrb r3, [r4, r2] - add r2, r0, #1 - ldrb r2, [r4, r2] - add r0, r0, #3 - ldrb r0, [r4, r0] - lsl r2, r2, #8 - and r2, r1 - orr r0, r2 - strh r0, [r6, #2] - lsl r0, r3, #8 - and r0, r1 - orr r0, r5 - strh r0, [r6, #6] - ldr r0, [r4, #0x14] - bl sub_02008A94 - bl sub_0201DCAC - bl sub_0200C800 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_02003694 - ldr r0, [r4, #0x30] - bl sub_0201C2B8 - ldr r3, _0224FAA4 ; =0x027E0000 - ldr r1, _0224FAA8 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, r5, r6, pc} - nop -_0224FA9C: .word 0x00000854 -_0224FAA0: .word 0x04000040 -_0224FAA4: .word 0x027E0000 -_0224FAA8: .word 0x00003FF8 - thumb_func_end ov17_0224FA24 - - thumb_func_start ov17_0224FAAC -ov17_0224FAAC: ; 0x0224FAAC - push {r3, lr} - ldr r1, _0224FADC ; =0x0000127F - ldrb r0, [r0, r1] - cmp r0, #1 - bne _0224FAD8 - ldr r0, _0224FAE0 ; =0x04000006 - ldrh r0, [r0] - cmp r0, #0x90 - blt _0224FACC - cmp r0, #0x98 - bgt _0224FACC - mov r0, #1 - mov r1, #0 - bl sub_02019060 - pop {r3, pc} -_0224FACC: - cmp r0, #0x90 - bge _0224FAD8 - mov r0, #1 - mov r1, #2 - bl sub_02019060 -_0224FAD8: - pop {r3, pc} - nop -_0224FADC: .word 0x0000127F -_0224FAE0: .word 0x04000006 - thumb_func_end ov17_0224FAAC - - thumb_func_start ov17_0224FAE4 -ov17_0224FAE4: ; 0x0224FAE4 - push {r3, lr} - ldr r0, _0224FAF8 ; =0x0000127F - ldrb r0, [r1, r0] - cmp r0, #1 - bne _0224FAF6 - mov r0, #1 - mov r1, #2 - bl sub_02019060 -_0224FAF6: - pop {r3, pc} - ; .align 2, 0 -_0224FAF8: .word 0x0000127F - thumb_func_end ov17_0224FAE4 - - thumb_func_start ov17_0224FAFC -ov17_0224FAFC: ; 0x0224FAFC - push {r4, lr} - mov r0, #0x85 - add r4, r1, #0 - lsl r0, r0, #4 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0224FB24 - ldr r0, [r4, #0x14] - bl sub_02007768 - bl ov11_0221F8F0 - ldr r0, [r4, #0x2c] - bl sub_0200C7EC - bl sub_0200C808 - ldr r0, _0224FB30 ; =0x04000540 - mov r1, #1 - str r1, [r0, #0] -_0224FB24: - ldr r1, [r4, #0x30] - mov r0, #0x18 - bl sub_02038A1C - pop {r4, pc} - nop -_0224FB30: .word 0x04000540 - thumb_func_end ov17_0224FAFC - - thumb_func_start ov17_0224FB34 -ov17_0224FB34: ; 0x0224FB34 - push {r3, r4, r5, lr} - sub sp, #0xa8 - add r4, r0, #0 - bl sub_0201FF00 - ldr r5, _0224FC8C ; =0x02254B2C - add r3, sp, #0x2c - mov r2, #5 -_0224FB44: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224FB44 - add r0, sp, #0x2c - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - ldr r5, _0224FC90 ; =0x02254AA4 - add r3, sp, #0x1c - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0224FC94 ; =0x02254B80 - add r3, sp, #0x54 - mov r2, #0xa -_0224FBA4: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224FBA4 - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - add r2, sp, #0x54 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #1 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - add r2, sp, #0x70 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #3 - add r2, sp, #0x8c - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r1, _0224FC98 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r2, r0 - strh r2, [r1] - add r1, r0, #0 - bl sub_0201FF0C - ldr r5, _0224FC9C ; =0x02254AF0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - mov r2, #0 - add r0, r4, #0 - mov r1, #4 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #4 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add sp, #0xa8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224FC8C: .word 0x02254B2C -_0224FC90: .word 0x02254AA4 -_0224FC94: .word 0x02254B80 -_0224FC98: .word 0x04000008 -_0224FC9C: .word 0x02254AF0 - thumb_func_end ov17_0224FB34 - - thumb_func_start ov17_0224FCA0 -ov17_0224FCA0: ; 0x0224FCA0 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0x34 - mov r2, #1 - mov r3, #2 - bl sub_0201A7E8 - mov r2, #1 - add r1, r4, #0 - str r2, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x8b - str r0, [sp, #0x10] - ldr r0, [r4, #0x30] - add r1, #0x44 - mov r3, #6 - bl sub_0201A7E8 - mov r0, #5 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xa3 - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0x54 - mov r2, #1 - mov r3, #6 - bl sub_0201A7E8 - mov r0, #9 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xbb - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0x64 - mov r2, #1 - mov r3, #6 - bl sub_0201A7E8 - mov r1, #0xd - str r1, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #0xd3 - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0x74 - mov r2, #1 - mov r3, #6 - bl sub_0201A7E8 - mov r2, #1 - add r1, r4, #0 - str r2, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xeb - str r0, [sp, #0x10] - ldr r0, [r4, #0x30] - add r1, #0x84 - mov r3, #0x10 - bl sub_0201A7E8 - mov r0, #5 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - add r0, #0xf6 - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0x30] - add r1, #0x94 - mov r2, #1 - mov r3, #0x10 - bl sub_0201A7E8 - mov r0, #9 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224FDD4 ; =0x0000011B - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [r4, #0x30] - add r1, #0xa4 - mov r2, #1 - mov r3, #0x10 - bl sub_0201A7E8 - mov r1, #0xd - str r1, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - ldr r0, _0224FDD8 ; =0x00000133 - str r1, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r4, #0x30] - add r4, #0xb4 - add r1, r4, #0 - mov r2, #1 - mov r3, #0x10 - bl sub_0201A7E8 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_0224FDD4: .word 0x0000011B -_0224FDD8: .word 0x00000133 - thumb_func_end ov17_0224FCA0 - - thumb_func_start ov17_0224FDDC -ov17_0224FDDC: ; 0x0224FDDC - push {r3, r4, r5, lr} - ldr r3, _0224FE14 ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _0224FE18 ; =0x02100DF4 - mov r1, #0 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - add r2, r1, #0 - blx r3 - add r5, r0, #0 - cmp r4, #0 - bne _0224FE04 - bl sub_02022974 -_0224FE04: - cmp r5, #0 - bne _0224FE0C - bl sub_02022974 -_0224FE0C: - bl sub_02014000 - pop {r3, r4, r5, pc} - nop -_0224FE14: .word 0x02100DEC -_0224FE18: .word 0x02100DF4 - thumb_func_end ov17_0224FDDC - - thumb_func_start ov17_0224FE1C -ov17_0224FE1C: ; 0x0224FE1C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0224FE2A - bl sub_02022974 -_0224FE2A: - mov r1, #0xf3 - mov r5, #0 - mov r0, #3 - lsl r1, r1, #2 -_0224FE32: - sub r3, r0, r5 - add r2, r4, r5 - add r5, r5, #1 - strb r3, [r2, r1] - cmp r5, #4 - blt _0224FE32 - add r0, r4, #0 - bl ov17_02251D6C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_0224FE1C - - thumb_func_start ov17_0224FE48 -ov17_0224FE48: ; 0x0224FE48 - ldr r3, _0224FE4C ; =ov17_02250A88 - bx r3 - ; .align 2, 0 -_0224FE4C: .word ov17_02250A88 - thumb_func_end ov17_0224FE48 - - thumb_func_start ov17_0224FE50 -ov17_0224FE50: ; 0x0224FE50 - ldr r3, _0224FE54 ; =ov17_02250D8C - bx r3 - ; .align 2, 0 -_0224FE54: .word ov17_02250D8C - thumb_func_end ov17_0224FE50 - - thumb_func_start ov17_0224FE58 -ov17_0224FE58: ; 0x0224FE58 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224FE58 - - thumb_func_start ov17_0224FE5C -ov17_0224FE5C: ; 0x0224FE5C - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224FE5C - - thumb_func_start ov17_0224FE60 -ov17_0224FE60: ; 0x0224FE60 - ldr r3, _0224FE64 ; =ov17_022509AC - bx r3 - ; .align 2, 0 -_0224FE64: .word ov17_022509AC - thumb_func_end ov17_0224FE60 - - thumb_func_start ov17_0224FE68 -ov17_0224FE68: ; 0x0224FE68 - ldr r3, _0224FE6C ; =ov17_02250D24 - bx r3 - ; .align 2, 0 -_0224FE6C: .word ov17_02250D24 - thumb_func_end ov17_0224FE68 - - thumb_func_start ov17_0224FE70 -ov17_0224FE70: ; 0x0224FE70 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x18 - str r0, [sp, #0xc] - ldr r2, [r4, #0x30] - mov r0, #0x2d - mov r1, #0x13 - mov r3, #4 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x18 - str r0, [sp, #0xc] - ldr r2, [r4, #0x30] - mov r0, #0x2d - mov r1, #0x14 - mov r3, #4 - bl sub_02006E60 - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r4, #0xd0 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0x2d - mov r2, #0x22 - mov r3, #0x18 - bl sub_02003050 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_0224FE70 - - thumb_func_start ov17_0224FEC8 -ov17_0224FEC8: ; 0x0224FEC8 - bx lr - ; .align 2, 0 - thumb_func_end ov17_0224FEC8 - - thumb_func_start ov17_0224FECC -ov17_0224FECC: ; 0x0224FECC - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - ldrh r1, [r7] - add r4, r0, #0 - cmp r1, #0 - beq _0224FEE2 - cmp r1, #1 - beq _0224FF70 - cmp r1, #2 - beq _0224FFA8 - b _0224FFCA -_0224FEE2: - bl ov17_02251A1C - mov r0, #0x13 - ldr r2, [r4, #0] - mov r5, #0 - lsl r0, r0, #4 -_0224FEEE: - ldrb r1, [r2, r0] - cmp r1, #0 - beq _0224FEFC - add r5, r5, #1 - add r2, #0xc - cmp r5, #4 - blt _0224FEEE -_0224FEFC: - cmp r5, #4 - bne _0224FF04 - bl sub_02022974 -_0224FF04: - ldr r0, _0224FFD4 ; =0x00000438 - ldr r1, _0224FFD8 ; =0x00000439 - strb r5, [r4, r0] - mov r5, #0 - sub r0, #0x67 -_0224FF0E: - add r3, r4, r5 - ldrb r2, [r3, r0] - add r5, r5, #1 - cmp r5, #4 - strb r2, [r3, r1] - blt _0224FF0E - mov r3, #0 - add r1, r3, #0 - add r2, r4, #0 -_0224FF20: - ldr r0, [r4, #0] - mov r5, #0x4a - add r0, r0, r1 - lsl r5, r5, #2 - ldrh r6, [r0, r5] - mov r5, #0xe7 - lsl r5, r5, #2 - strh r6, [r2, r5] - ldr r5, _0224FFDC ; =0x0000012A - add r3, r3, #1 - ldrh r6, [r0, r5] - ldr r5, _0224FFE0 ; =0x0000039E - add r1, #0xc - strh r6, [r2, r5] - mov r5, #0x4b - lsl r5, r5, #2 - ldrh r6, [r0, r5] - mov r5, #0x3a - lsl r5, r5, #4 - strh r6, [r2, r5] - ldr r5, _0224FFE4 ; =0x0000012E - ldrh r6, [r0, r5] - ldr r5, _0224FFE8 ; =0x000003A2 - strh r6, [r2, r5] - mov r5, #0x13 - lsl r5, r5, #4 - ldrh r6, [r0, r5] - mov r5, #0xe9 - lsl r5, r5, #2 - strh r6, [r2, r5] - ldr r5, _0224FFEC ; =0x00000132 - ldrh r5, [r0, r5] - ldr r0, _0224FFF0 ; =0x000003A6 - strh r5, [r2, r0] - add r2, #0xc - cmp r3, #4 - blt _0224FF20 - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] -_0224FF70: - ldr r1, [r4, #0] - ldr r0, _0224FFF4 ; =0x00000177 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0224FF86 - ldr r0, [r7, #4] - cmp r0, #0x78 - bge _0224FF86 - add r0, r0, #1 - str r0, [r7, #4] - b _0224FFCE -_0224FF86: - ldr r0, _0224FFF8 ; =0x0000085C - mov r3, #0xe7 - lsl r3, r3, #2 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #1 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _0224FFCE - mov r0, #0 - str r0, [r7, #4] - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0224FFCE -_0224FFA8: - ldr r0, _0224FFF8 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _0224FFFC ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0224FFCE - ldrh r0, [r7] - add r0, r0, #1 - strh r0, [r7] - b _0224FFCE -_0224FFCA: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224FFCE: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224FFD4: .word 0x00000438 -_0224FFD8: .word 0x00000439 -_0224FFDC: .word 0x0000012A -_0224FFE0: .word 0x0000039E -_0224FFE4: .word 0x0000012E -_0224FFE8: .word 0x000003A2 -_0224FFEC: .word 0x00000132 -_0224FFF0: .word 0x000003A6 -_0224FFF4: .word 0x00000177 -_0224FFF8: .word 0x0000085C -_0224FFFC: .word 0x00000127 - thumb_func_end ov17_0224FECC - - thumb_func_start ov17_02250000 -ov17_02250000: ; 0x02250000 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _02250012 - cmp r0, #1 - beq _0225004C - b _0225006E -_02250012: - ldr r3, _02250078 ; =0x00000445 - mov r1, #0 - strb r1, [r5, r3] - add r0, r3, #2 - strb r1, [r5, r0] - add r0, r3, #1 - strb r1, [r5, r0] - add r0, r3, #0 - sub r0, #0x79 - ldrb r1, [r5, r0] - sub r0, r3, #7 - mov r2, #5 - strb r1, [r5, r0] - sub r0, r3, #1 - mov r1, #1 - strb r1, [r5, r0] - ldr r0, _0225007C ; =0x0000085C - sub r3, #0xf - add r0, r5, r0 - add r1, r5, #0 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250072 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250072 -_0225004C: - ldr r0, _0225007C ; =0x0000085C - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _02250080 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250072 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250072 -_0225006E: - mov r0, #1 - pop {r3, r4, r5, pc} -_02250072: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02250078: .word 0x00000445 -_0225007C: .word 0x0000085C -_02250080: .word 0x00000127 - thumb_func_end ov17_02250000 - - thumb_func_start ov17_02250084 -ov17_02250084: ; 0x02250084 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _02250096 - cmp r0, #1 - beq _022500B4 - b _022500D6 -_02250096: - ldr r0, _022500E0 ; =0x0000085C - mov r3, #0xe7 - lsl r3, r3, #2 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #6 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _022500DA - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _022500DA -_022500B4: - ldr r0, _022500E0 ; =0x0000085C - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _022500E4 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _022500DA - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _022500DA -_022500D6: - mov r0, #1 - pop {r3, r4, r5, pc} -_022500DA: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022500E0: .word 0x0000085C -_022500E4: .word 0x00000127 - thumb_func_end ov17_02250084 - - thumb_func_start ov17_022500E8 -ov17_022500E8: ; 0x022500E8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _022500FE - cmp r0, #1 - beq _02250130 - cmp r0, #2 - beq _02250152 - b _02250164 -_022500FE: - ldr r3, _0225016C ; =0x00000445 - mov r0, #0 - strb r0, [r5, r3] - mov r1, #1 - add r0, r3, #2 - strb r1, [r5, r0] - add r0, r3, #1 - strb r1, [r5, r0] - sub r0, r3, #1 - mov r1, #6 - strb r1, [r5, r0] - ldr r0, _02250170 ; =0x0000085C - sub r3, #0xf - add r0, r5, r0 - add r1, r5, #0 - mov r2, #5 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250168 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250168 -_02250130: - ldr r0, _02250170 ; =0x0000085C - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _02250174 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250168 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250168 -_02250152: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x3c - ble _02250168 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250168 -_02250164: - mov r0, #1 - pop {r3, r4, r5, pc} -_02250168: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225016C: .word 0x00000445 -_02250170: .word 0x0000085C -_02250174: .word 0x00000127 - thumb_func_end ov17_022500E8 - - thumb_func_start ov17_02250178 -ov17_02250178: ; 0x02250178 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #4 - bhi _02250268 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02250190: ; jump table - .short _0225019A - _02250190 - 2 ; case 0 - .short _022501F0 - _02250190 - 2 ; case 1 - .short _02250212 - _02250190 - 2 ; case 2 - .short _02250234 - _02250190 - 2 ; case 3 - .short _02250256 - _02250190 - 2 ; case 4 -_0225019A: - ldr r1, [r3, #0] - ldr r0, _02250270 ; =0x00000121 - ldrb r0, [r1, r0] - cmp r0, #4 - bhi _022501BA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022501B0: ; jump table - .short _022501BE - _022501B0 - 2 ; case 0 - .short _022501BE - _022501B0 - 2 ; case 1 - .short _022501BE - _022501B0 - 2 ; case 2 - .short _022501BE - _022501B0 - 2 ; case 3 - .short _022501BE - _022501B0 - 2 ; case 4 -_022501BA: - mov r0, #1 - pop {r3, r4, r5, pc} -_022501BE: - ldr r5, _02250274 ; =0x00000445 - mov r0, #0 - strb r0, [r3, r5] - mov r1, #1 - add r0, r5, #2 - strb r1, [r3, r0] - add r0, r5, #1 - strb r1, [r3, r0] - sub r0, r5, #1 - mov r1, #2 - strb r1, [r3, r0] - ldr r0, _02250278 ; =0x0000085C - sub r5, #0xf - add r0, r3, r0 - add r1, r3, #0 - mov r2, #5 - add r3, r3, r5 - bl ov17_0224F30C - cmp r0, #1 - bne _0225026C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225026C -_022501F0: - ldr r0, _02250278 ; =0x0000085C - ldr r5, [r3, #0] - add r0, r3, r0 - ldr r3, _0225027C ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r5, r3] - sub r3, #0xb - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0225026C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225026C -_02250212: - ldr r5, _02250280 ; =0x0000043D - mov r0, #0 - strb r0, [r3, r5] - ldr r0, _02250278 ; =0x0000085C - sub r5, r5, #7 - add r0, r3, r0 - add r1, r3, #0 - mov r2, #9 - add r3, r3, r5 - bl ov17_0224F30C - cmp r0, #1 - bne _0225026C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225026C -_02250234: - ldr r0, _02250278 ; =0x0000085C - ldr r5, [r3, #0] - add r0, r3, r0 - ldr r3, _0225027C ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r5, r3] - sub r3, #0xb - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0225026C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225026C -_02250256: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x3c - ble _0225026C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225026C -_02250268: - mov r0, #1 - pop {r3, r4, r5, pc} -_0225026C: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250270: .word 0x00000121 -_02250274: .word 0x00000445 -_02250278: .word 0x0000085C -_0225027C: .word 0x00000127 -_02250280: .word 0x0000043D - thumb_func_end ov17_02250178 - - thumb_func_start ov17_02250284 -ov17_02250284: ; 0x02250284 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrh r0, [r5] - cmp r0, #4 - bhi _02250390 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225029C: ; jump table - .short _022502A6 - _0225029C - 2 ; case 0 - .short _02250318 - _0225029C - 2 ; case 1 - .short _0225033A - _0225029C - 2 ; case 2 - .short _0225035C - _0225029C - 2 ; case 3 - .short _0225037E - _0225029C - 2 ; case 4 -_022502A6: - ldr r1, [r4, #0] - ldr r0, _02250398 ; =0x00000121 - ldrb r0, [r1, r0] - cmp r0, #6 - bhi _022502CA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022502BC: ; jump table - .short _022502CA - _022502BC - 2 ; case 0 - .short _022502CE - _022502BC - 2 ; case 1 - .short _022502CE - _022502BC - 2 ; case 2 - .short _022502CA - _022502BC - 2 ; case 3 - .short _022502CA - _022502BC - 2 ; case 4 - .short _022502CE - _022502BC - 2 ; case 5 - .short _022502CE - _022502BC - 2 ; case 6 -_022502CA: - mov r0, #1 - pop {r3, r4, r5, pc} -_022502CE: - ldr r1, _0225039C ; =0x00000445 - mov r0, #0 - strb r0, [r4, r1] - mov r2, #1 - add r0, r1, #2 - strb r2, [r4, r0] - add r0, r1, #1 - strb r2, [r4, r0] - add r0, r1, #0 - sub r0, #0x79 - ldrb r2, [r4, r0] - sub r0, r1, #7 - sub r1, #0x79 - strb r2, [r4, r0] - ldrb r0, [r4, r1] - bl sub_020958FC - ldr r3, _022503A0 ; =0x00000442 - add r0, r0, #1 - strb r0, [r4, r3] - add r0, r3, #2 - mov r1, #3 - strb r1, [r4, r0] - ldr r0, _022503A4 ; =0x0000085C - sub r3, #0xc - add r0, r4, r0 - add r1, r4, #0 - mov r2, #5 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250394 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250394 -_02250318: - ldr r0, _022503A4 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _022503A8 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250394 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250394 -_0225033A: - ldr r3, _022503AC ; =0x0000043D - mov r0, #1 - strb r0, [r4, r3] - ldr r0, _022503A4 ; =0x0000085C - sub r3, r3, #7 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #9 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250394 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250394 -_0225035C: - ldr r0, _022503A4 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _022503A8 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250394 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250394 -_0225037E: - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] - cmp r0, #0x5a - ble _02250394 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250394 -_02250390: - mov r0, #1 - pop {r3, r4, r5, pc} -_02250394: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250398: .word 0x00000121 -_0225039C: .word 0x00000445 -_022503A0: .word 0x00000442 -_022503A4: .word 0x0000085C -_022503A8: .word 0x00000127 -_022503AC: .word 0x0000043D - thumb_func_end ov17_02250284 - - thumb_func_start ov17_022503B0 -ov17_022503B0: ; 0x022503B0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrh r0, [r5] - cmp r0, #4 - bls _022503BE - b _022504C2 -_022503BE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022503CA: ; jump table - .short _022503D4 - _022503CA - 2 ; case 0 - .short _0225044A - _022503CA - 2 ; case 1 - .short _0225046C - _022503CA - 2 ; case 2 - .short _0225048E - _022503CA - 2 ; case 3 - .short _022504B0 - _022503CA - 2 ; case 4 -_022503D4: - ldr r1, [r4, #0] - ldr r0, _022504CC ; =0x00000121 - ldrb r0, [r1, r0] - cmp r0, #8 - bhi _022503FC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022503EA: ; jump table - .short _02250400 - _022503EA - 2 ; case 0 - .short _022503FC - _022503EA - 2 ; case 1 - .short _02250400 - _022503EA - 2 ; case 2 - .short _022503FC - _022503EA - 2 ; case 3 - .short _022503FC - _022503EA - 2 ; case 4 - .short _022503FC - _022503EA - 2 ; case 5 - .short _022503FC - _022503EA - 2 ; case 6 - .short _02250400 - _022503EA - 2 ; case 7 - .short _02250400 - _022503EA - 2 ; case 8 -_022503FC: - mov r0, #1 - pop {r3, r4, r5, pc} -_02250400: - ldr r1, _022504D0 ; =0x00000445 - mov r0, #0 - strb r0, [r4, r1] - mov r2, #1 - add r0, r1, #2 - strb r2, [r4, r0] - add r0, r1, #1 - strb r2, [r4, r0] - add r0, r1, #0 - sub r0, #0x79 - ldrb r2, [r4, r0] - sub r0, r1, #7 - sub r1, #0x79 - strb r2, [r4, r0] - ldrb r0, [r4, r1] - bl sub_020958FC - ldr r3, _022504D4 ; =0x00000442 - add r0, r0, #1 - strb r0, [r4, r3] - add r0, r3, #2 - mov r1, #4 - strb r1, [r4, r0] - ldr r0, _022504D8 ; =0x0000085C - sub r3, #0xc - add r0, r4, r0 - add r1, r4, #0 - mov r2, #5 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _022504C6 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _022504C6 -_0225044A: - ldr r0, _022504D8 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _022504DC ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _022504C6 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _022504C6 -_0225046C: - ldr r3, _022504E0 ; =0x0000043D - mov r0, #2 - strb r0, [r4, r3] - ldr r0, _022504D8 ; =0x0000085C - sub r3, r3, #7 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #9 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _022504C6 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _022504C6 -_0225048E: - ldr r0, _022504D8 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _022504DC ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _022504C6 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _022504C6 -_022504B0: - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] - cmp r0, #0xf - ble _022504C6 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _022504C6 -_022504C2: - mov r0, #1 - pop {r3, r4, r5, pc} -_022504C6: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022504CC: .word 0x00000121 -_022504D0: .word 0x00000445 -_022504D4: .word 0x00000442 -_022504D8: .word 0x0000085C -_022504DC: .word 0x00000127 -_022504E0: .word 0x0000043D - thumb_func_end ov17_022503B0 - - thumb_func_start ov17_022504E4 -ov17_022504E4: ; 0x022504E4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _022504F6 - cmp r0, #1 - beq _02250512 - b _02250534 -_022504F6: - ldr r0, _0225053C ; =0x0000085C - ldr r3, _02250540 ; =0x00000436 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #7 - add r3, r5, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250538 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250538 -_02250512: - ldr r0, _0225053C ; =0x0000085C - ldr r3, [r5, #0] - add r0, r5, r0 - ldr r5, _02250544 ; =0x00000127 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250538 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250538 -_02250534: - mov r0, #1 - pop {r3, r4, r5, pc} -_02250538: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225053C: .word 0x0000085C -_02250540: .word 0x00000436 -_02250544: .word 0x00000127 - thumb_func_end ov17_022504E4 - - thumb_func_start ov17_02250548 -ov17_02250548: ; 0x02250548 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldrh r0, [r5] - cmp r0, #3 - bhi _02250610 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02250560: ; jump table - .short _02250568 - _02250560 - 2 ; case 0 - .short _022505B0 - _02250560 - 2 ; case 1 - .short _022505D2 - _02250560 - 2 ; case 2 - .short _022505EE - _02250560 - 2 ; case 3 -_02250568: - ldr r1, _02250618 ; =0x00000445 - mov r0, #0 - strb r0, [r4, r1] - mov r2, #1 - add r0, r1, #2 - strb r2, [r4, r0] - add r0, r1, #1 - strb r2, [r4, r0] - add r0, r1, #0 - sub r0, #0xd - ldrb r2, [r4, r0] - sub r0, r1, #7 - sub r1, #0xd - strb r2, [r4, r0] - ldrb r0, [r4, r1] - bl sub_020958FC - ldr r3, _0225061C ; =0x00000442 - add r0, r0, #1 - strb r0, [r4, r3] - add r0, r3, #2 - mov r2, #5 - strb r2, [r4, r0] - ldr r0, _02250620 ; =0x0000085C - sub r3, #0xc - add r0, r4, r0 - add r1, r4, #0 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250614 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250614 -_022505B0: - ldr r0, _02250620 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _02250624 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250614 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250614 -_022505D2: - ldr r0, _02250620 ; =0x0000085C - ldr r3, _02250628 ; =0x00000436 - add r0, r4, r0 - add r1, r4, #0 - mov r2, #8 - add r3, r4, r3 - bl ov17_0224F30C - cmp r0, #1 - bne _02250614 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250614 -_022505EE: - ldr r0, _02250620 ; =0x0000085C - ldr r3, [r4, #0] - add r0, r4, r0 - ldr r4, _02250624 ; =0x00000127 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250614 - ldrh r0, [r5] - add r0, r0, #1 - strh r0, [r5] - b _02250614 -_02250610: - mov r0, #1 - pop {r3, r4, r5, pc} -_02250614: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250618: .word 0x00000445 -_0225061C: .word 0x00000442 -_02250620: .word 0x0000085C -_02250624: .word 0x00000127 -_02250628: .word 0x00000436 - thumb_func_end ov17_02250548 - - thumb_func_start ov17_0225062C -ov17_0225062C: ; 0x0225062C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r3, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _0225063E - cmp r0, #1 - beq _02250676 - b _02250698 -_0225063E: - ldr r5, _022506A0 ; =0x00000445 - mov r0, #0 - strb r0, [r3, r5] - add r1, r5, #2 - strb r0, [r3, r1] - add r1, r5, #1 - strb r0, [r3, r1] - add r1, r5, #0 - sub r1, #0x79 - ldrb r2, [r3, r1] - sub r1, r5, #7 - strb r2, [r3, r1] - sub r1, r5, #1 - strb r0, [r3, r1] - ldr r0, _022506A4 ; =0x0000085C - sub r5, #0xf - add r0, r3, r0 - add r1, r3, #0 - mov r2, #5 - add r3, r3, r5 - bl ov17_0224F30C - cmp r0, #1 - bne _0225069C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225069C -_02250676: - ldr r0, _022506A4 ; =0x0000085C - ldr r5, [r3, #0] - add r0, r3, r0 - ldr r3, _022506A8 ; =0x00000127 - sub r2, r3, #4 - ldrb r1, [r5, r3] - sub r3, #0xb - ldrb r2, [r5, r2] - ldrb r3, [r5, r3] - bl ov17_0224F4B8 - cmp r0, #1 - bne _0225069C - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0225069C -_02250698: - mov r0, #1 - pop {r3, r4, r5, pc} -_0225069C: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022506A0: .word 0x00000445 -_022506A4: .word 0x0000085C -_022506A8: .word 0x00000127 - thumb_func_end ov17_0225062C - - thumb_func_start ov17_022506AC -ov17_022506AC: ; 0x022506AC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r2, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _022506C2 - cmp r0, #1 - beq _022506DC - cmp r0, #2 - beq _022506FE - b _02250718 -_022506C2: - ldr r0, _0225073C ; =0x0000085C - add r1, r2, #0 - add r0, r2, r0 - mov r2, #0xa - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _02250736 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250736 -_022506DC: - ldr r0, _0225073C ; =0x0000085C - ldr r3, [r2, #0] - ldr r5, _02250740 ; =0x00000127 - add r0, r2, r0 - sub r2, r5, #4 - ldrb r1, [r3, r5] - sub r5, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r5] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250736 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250736 -_022506FE: - ldr r0, _0225073C ; =0x0000085C - add r1, r2, #0 - add r0, r2, r0 - mov r2, #4 - mov r3, #0 - bl ov17_0224F30C - cmp r0, #1 - bne _02250736 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02250736 -_02250718: - ldr r0, _0225073C ; =0x0000085C - ldr r3, [r2, #0] - ldr r4, _02250740 ; =0x00000127 - add r0, r2, r0 - sub r2, r4, #4 - ldrb r1, [r3, r4] - sub r4, #0xb - ldrb r2, [r3, r2] - ldrb r3, [r3, r4] - bl ov17_0224F4B8 - cmp r0, #1 - bne _02250736 - mov r0, #3 - pop {r3, r4, r5, pc} -_02250736: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0225073C: .word 0x0000085C -_02250740: .word 0x00000127 - thumb_func_end ov17_022506AC - - thumb_func_start ov17_02250744 -ov17_02250744: ; 0x02250744 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r5, #0 - mov r4, #0 - add r7, #0xd8 - b _022507B6 -_02250752: - mov r0, #0xf3 - add r1, r5, r4 - lsl r0, r0, #2 - ldrb r6, [r1, r0] - lsl r0, r6, #4 - add r0, r5, r0 - add r0, #0xd8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0225076A - bl sub_02022974 -_0225076A: - mov r1, #0x32 - mov r0, #0x18 - lsl r1, r1, #6 - bl sub_02018144 - lsl r2, r6, #4 - add r1, r5, r2 - add r1, #0xd8 - str r0, [r1, #0] - add r0, r7, r2 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #6 - ldr r1, _022507C0 ; =0x02254BF4 - mul r0, r4 - ldrsh r1, [r1, r0] - lsl r2, r6, #2 - str r1, [sp, #8] - ldr r1, _022507C0 ; =0x02254BF4 - add r0, r1, r0 - mov r1, #2 - ldrsh r1, [r0, r1] - str r1, [sp, #0xc] - mov r1, #4 - ldrsh r0, [r0, r1] - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r3, [r5, #0x10] - ldr r0, [r5, #0x14] - ldr r2, [r3, r2] - mov r3, #2 - bl sub_02095484 - lsl r1, r6, #2 - add r1, r5, r1 - str r0, [r1, #0x18] - add r4, r4, #1 -_022507B6: - cmp r4, #4 - blt _02250752 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_022507C0: .word 0x02254BF4 - thumb_func_end ov17_02250744 - - thumb_func_start ov17_022507C4 -ov17_022507C4: ; 0x022507C4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_022507CE: - ldr r0, [r5, #8] - bl sub_02007DC8 - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - add r0, #0xc8 - add r6, r6, #1 - str r7, [r0, #0] - add r5, r5, #4 - add r4, #0x10 - cmp r6, #4 - blt _022507CE - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_022507C4 - - thumb_func_start ov17_022507F0 -ov17_022507F0: ; 0x022507F0 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r1, #0 - add r4, r0, #0 - add r5, r2, #0 - cmp r6, #0 - beq _02250806 - cmp r5, #0 - bne _02250806 - bl sub_02022974 -_02250806: - cmp r6, #3 - bhi _022508DC - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02250816: ; jump table - .short _022508E0 - _02250816 - 2 ; case 0 - .short _0225081E - _02250816 - 2 ; case 1 - .short _02250842 - _02250816 - 2 ; case 2 - .short _02250886 - _02250816 - 2 ; case 3 -_0225081E: - mov r2, #0x12 - lsl r2, r2, #4 - ldr r3, [r4, #0] - add r1, r2, #1 - ldrb r0, [r3, r2] - add r2, #0x51 - ldrb r1, [r3, r1] - ldrb r2, [r3, r2] - bl sub_02095848 - add r4, #0xc8 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200BBA8 - add sp, #8 - pop {r4, r5, r6, pc} -_02250842: - ldrb r6, [r5] - ldr r3, [r4, #0] - mov r0, #1 - lsl r2, r6, #2 - str r0, [sp] - mov r0, #2 - add r2, r3, r2 - add r6, r3, r6 - mov r3, #0x42 - str r0, [sp, #4] - add r0, r4, #0 - lsl r3, r3, #2 - add r0, #0xc8 - add r2, #0xe8 - ldrb r3, [r6, r3] - ldr r0, [r0, #0] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200B48C - ldrb r0, [r5] - ldr r1, [r4, #0x10] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r4, #0xc8 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200B5CC - add sp, #8 - pop {r4, r5, r6, pc} -_02250886: - mov r1, #0 - str r1, [sp] - mov r3, #1 - str r3, [sp, #4] - add r0, r4, #0 - add r0, #0xc8 - ldrb r2, [r5, #4] - ldr r0, [r0, #0] - bl sub_0200B60C - ldrb r6, [r5] - ldr r3, [r4, #0] - mov r1, #1 - lsl r2, r6, #2 - add r2, r3, r2 - add r6, r3, r6 - mov r3, #0x42 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, r4, #0 - lsl r3, r3, #2 - add r0, #0xc8 - add r2, #0xe8 - ldrb r3, [r6, r3] - ldr r0, [r0, #0] - ldr r2, [r2, #0] - bl sub_0200B48C - ldrb r0, [r5] - ldr r1, [r4, #0x10] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02076B10 - add r4, #0xc8 - add r2, r0, #0 - ldr r0, [r4, #0] - mov r1, #2 - bl sub_0200B5CC - add sp, #8 - pop {r4, r5, r6, pc} -_022508DC: - bl sub_02022974 -_022508E0: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov17_022507F0 - - thumb_func_start ov17_022508E4 -ov17_022508E4: ; 0x022508E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0] - ldr r0, _02250960 ; =0x00000171 - add r7, r2, #0 - ldrb r0, [r1, r0] - str r3, [sp, #0xc] - cmp r0, #0 - bne _02250906 - ldr r0, _02250964 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027AC0 - add r4, r0, #0 - b _02250908 -_02250906: - mov r4, #1 -_02250908: - add r0, r6, #0 - add r1, r7, #0 - bl sub_0200B1EC - add r6, r0, #0 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x28] - add r0, r5, #0 - bl ov17_022507F0 - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xc8 - add r1, #0xcc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x34 - mov r1, #0xff - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - add r2, r5, #0 - add r0, r5, #0 - str r3, [sp, #8] - add r2, #0xcc - ldr r2, [r2, #0] - add r0, #0x34 - mov r1, #1 - bl sub_0201D738 - mov r1, #0xe6 - lsl r1, r1, #2 - strb r0, [r5, r1] - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02250960: .word 0x00000171 -_02250964: .word 0x00001988 - thumb_func_end ov17_022508E4 - - thumb_func_start ov17_02250968 -ov17_02250968: ; 0x02250968 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #7 - blo _0225097A - bl sub_02022974 -_0225097A: - lsl r3, r4, #2 - ldr r2, _02250994 ; =0x02254C0C - add r0, r5, #0 - ldr r4, _02250998 ; =0x02254C0E - ldrh r2, [r2, r3] - str r6, [sp] - add r5, #0xc4 - ldrb r3, [r4, r3] - ldr r1, [r5, #0] - bl ov17_022508E4 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02250994: .word 0x02254C0C -_02250998: .word 0x02254C0E - thumb_func_end ov17_02250968 - - thumb_func_start ov17_0225099C -ov17_0225099C: ; 0x0225099C - mov r1, #0xe6 - lsl r1, r1, #2 - ldr r3, _022509A8 ; =sub_0201D724 - ldrb r0, [r0, r1] - bx r3 - nop -_022509A8: .word sub_0201D724 - thumb_func_end ov17_0225099C - - thumb_func_start ov17_022509AC -ov17_022509AC: ; 0x022509AC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x2d - mov r1, #0x18 - bl sub_02006C24 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - mov r1, #0x18 - str r1, [sp, #0xc] - ldr r2, [r5, #0x30] - mov r1, #0x17 - mov r3, #3 - add r4, r0, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x18 - str r0, [sp, #0xc] - ldr r2, [r5, #0x30] - add r0, r4, #0 - mov r1, #0x16 - mov r3, #3 - bl sub_0200710C - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_02019EBC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0x2d - mov r2, #0x23 - mov r3, #0x18 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0x2d - mov r2, #0x24 - mov r3, #0x18 - bl sub_02003050 - ldr r1, [r5, #0] - ldr r0, _02250A80 ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027B50 - add r6, r0, #0 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r1, #1 - ldr r0, [r5, #0x30] - add r2, r1, #0 - mov r3, #0xf - bl sub_0200DD0C - add r0, r6, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0x26 - mov r3, #0x18 - bl sub_02003050 - ldr r0, [r5, #0x30] - mov r1, #2 - bl sub_02019EBC - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02250A80: .word 0x00001988 - thumb_func_end ov17_022509AC - - thumb_func_start ov17_02250A84 -ov17_02250A84: ; 0x02250A84 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02250A84 - - thumb_func_start ov17_02250A88 -ov17_02250A88: ; 0x02250A88 - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, _02250AD0 ; =0x000080EA - add r2, r4, #0 - str r0, [sp] - sub r3, r0, #1 - str r3, [sp, #4] - str r3, [sp, #8] - add r2, #0xd0 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x2c] - ldr r2, [r2, #0] - bl ov17_0223F560 - ldr r0, _02250AD0 ; =0x000080EA - mov r1, #0xc8 - str r0, [sp] - sub r3, r0, #1 - str r3, [sp, #4] - str r3, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - mov r0, #3 - str r0, [sp, #0x14] - ldr r0, _02250AD4 ; =0x0000C350 - add r1, #0x50 - str r0, [sp, #0x18] - add r0, r4, r1 - ldr r1, [r4, #0x28] - ldr r2, [r4, #0x2c] - bl ov17_0223F630 - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_02250AD0: .word 0x000080EA -_02250AD4: .word 0x0000C350 - thumb_func_end ov17_02250A88 - - thumb_func_start ov17_02250AD8 -ov17_02250AD8: ; 0x02250AD8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x46 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov17_0223F6C4 - ldr r1, _02250AFC ; =0x000080E9 - str r1, [sp] - ldr r0, [r4, #0x2c] - add r2, r1, #1 - add r3, r1, #0 - bl ov17_0223F5E8 - add sp, #4 - pop {r3, r4, pc} - nop -_02250AFC: .word 0x000080E9 - thumb_func_end ov17_02250AD8 - - thumb_func_start ov17_02250B00 -ov17_02250B00: ; 0x02250B00 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r6, r0, #0 - mov r0, #0x2d - mov r1, #0x18 - bl sub_02006C24 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - mov r1, #0x18 - str r1, [sp, #0xc] - ldr r2, [r6, #0x30] - mov r1, #0x1b - mov r3, #3 - str r0, [sp, #0x14] - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - ldr r2, [r6, #0x30] - mov r1, #0x19 - mov r3, #3 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - ldr r2, [r6, #0x30] - mov r1, #0x1a - mov r3, #2 - bl sub_0200710C - ldr r0, [r6, #0x30] - mov r1, #1 - bl sub_02019EBC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0x2d - mov r2, #0x27 - mov r3, #0x18 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0x2d - mov r2, #0x24 - mov r3, #0x18 - bl sub_02003050 - ldr r1, [r6, #0] - ldr r0, _02250CDC ; =0x00001988 - ldr r0, [r1, r0] - bl sub_02027B50 - add r4, r0, #0 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r1, #1 - ldr r0, [r6, #0x30] - add r2, r1, #0 - mov r3, #0xf - bl sub_0200DD0C - add r0, r4, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #0x26 - mov r3, #0x18 - bl sub_02003050 - mov r0, #0xc - mov r1, #0x18 - bl sub_02023790 - add r4, r6, #0 - add r7, r0, #0 - mov r5, #0 - add r4, #0x34 -_02250BEC: - mov r0, #0xf3 - add r1, r6, r5 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - ldr r1, [r6, #0x10] - add r2, r7, #0 - lsl r0, r0, #2 - str r0, [sp, #0x10] - ldr r0, [r1, r0] - mov r1, #0x77 - bl sub_02074470 - add r0, r5, #1 - lsl r0, r0, #4 - str r0, [sp, #0x18] - add r0, r4, r0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #5 - lsl r0, r0, #4 - str r0, [sp, #0x1c] - add r0, r4, r0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #3 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02250CE0 ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - add r2, r7, #0 - add r0, r4, r0 - add r3, r1, #0 - bl sub_0201D78C - mov r0, #3 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _02250CE0 ; =0x00010200 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r3, [r6, #0] - ldr r0, [sp, #0x1c] - add r2, r3, r2 - add r2, #0xe8 - mov r1, #0 - ldr r2, [r2, #0] - add r0, r4, r0 - add r3, r1, #0 - bl sub_0201D78C - add r5, r5, #1 - cmp r5, #4 - blt _02250BEC - add r0, r7, #0 - bl sub_020237BC - mov r3, #1 - lsl r3, r3, #0x1a - add r2, r3, #0 - ldr r1, [r3, #0] - ldr r0, _02250CE4 ; =0xFFFF1FFF - add r2, #0x48 - and r1, r0 - mov r0, #6 - lsl r0, r0, #0xc - orr r0, r1 - str r0, [r3, #0] - ldrh r1, [r2] - mov r0, #0x3f - mov r4, #0x1f - bic r1, r0 - add r5, r1, #0 - orr r5, r4 - mov r1, #0x20 - orr r5, r1 - strh r5, [r2] - ldrh r6, [r2] - ldr r5, _02250CE8 ; =0xFFFFC0FF - lsl r4, r4, #8 - and r5, r6 - orr r5, r4 - lsl r4, r1, #8 - orr r4, r5 - strh r4, [r2] - add r2, r3, #0 - add r2, #0x4a - ldrh r4, [r2] - bic r4, r0 - mov r0, #0x1b - orr r0, r4 - orr r0, r1 - strh r0, [r2] - add r0, r3, #0 - mov r2, #0xff - add r0, #0x40 - strh r2, [r0] - add r0, r3, #0 - mov r1, #0 - add r0, #0x44 - strh r1, [r0] - add r0, r3, #0 - add r0, #0x42 - strh r2, [r0] - add r3, #0x46 - ldr r0, [sp, #0x14] - strh r1, [r3] - bl sub_02006CA8 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02250CDC: .word 0x00001988 -_02250CE0: .word 0x00010200 -_02250CE4: .word 0xFFFF1FFF -_02250CE8: .word 0xFFFFC0FF - thumb_func_end ov17_02250B00 - - thumb_func_start ov17_02250CEC -ov17_02250CEC: ; 0x02250CEC - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r3, #0 - mov r0, #1 - str r3, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - mov r1, #1 - mov r2, #2 - bl sub_020038B0 - mov r3, #0 - mov r0, #1 - str r3, [sp] - lsl r0, r0, #8 - add r4, #0xd0 - str r0, [sp, #4] - ldr r0, [r4, #0] - mov r1, #3 - mov r2, #2 - bl sub_020038B0 - add sp, #8 - pop {r4, pc} - thumb_func_end ov17_02250CEC - - thumb_func_start ov17_02250D24 -ov17_02250D24: ; 0x02250D24 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02250D24 - - thumb_func_start ov17_02250D28 -ov17_02250D28: ; 0x02250D28 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0x2e - mov r1, #0x18 - bl sub_02006C24 - add r4, r0, #0 - str r4, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _02250D88 ; =0x000080E9 - mov r1, #2 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - ldr r2, [r5, #0x28] - ldr r3, [r5, #0x2c] - bl sub_0200CDC4 - add r0, r5, #0 - add r1, r4, #0 - bl ov17_02250F68 - add r0, r5, #0 - bl ov17_02250DB0 - add r0, r5, #0 - add r1, r4, #0 - bl ov17_0225122C - add r0, r5, #0 - add r1, r4, #0 - bl ov17_02251344 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_02250D88: .word 0x000080E9 - thumb_func_end ov17_02250D28 - - thumb_func_start ov17_02250D8C -ov17_02250D8C: ; 0x02250D8C - push {r4, lr} - add r4, r0, #0 - bl ov17_02250EFC - add r0, r4, #0 - bl ov17_022512E0 - add r0, r4, #0 - bl ov17_02251544 - add r0, r4, #0 - bl ov17_02250FBC - add r0, r4, #0 - bl ov17_022513C0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02250D8C - - thumb_func_start ov17_02250DB0 -ov17_02250DB0: ; 0x02250DB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - add r5, r0, #0 - mov r0, #0x13 - mov r1, #0x18 - bl sub_02006C24 - str r0, [sp, #0x18] - bl sub_02079FD0 - ldr r1, [sp, #0x18] - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _02250EE4 ; =0x000080EB - mov r1, #2 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - ldr r2, [r5, #0x28] - ldr r3, [r5, #0x2c] - bl sub_0200CDC4 - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02250EE8 ; =0x000080EA - ldr r2, [sp, #0x18] - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - bl sub_0200CE24 - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02250EE8 ; =0x000080EA - ldr r2, [sp, #0x18] - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - bl sub_0200CE54 - ldr r4, _02250EEC ; =0x02254C5C - add r3, sp, #0x1c - mov r2, #6 -_02250E20: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02250E20 - ldr r0, [r4, #0] - mov r7, #0 - str r0, [r3, #0] - add r6, r7, #0 - add r4, r5, #0 -_02250E32: - ldr r0, [r5, #0] - ldr r0, [r0, r6] - bl sub_02079D80 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02250EE8 ; =0x000080EA - mov r2, #0x13 - add r0, r7, r0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - bl sub_0200D888 - ldr r0, _02250EE8 ; =0x000080EA - add r2, sp, #0x1c - add r0, r7, r0 - str r0, [sp, #0x30] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - bl sub_0200CE6C - mov r1, #0x4e - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r5, #0] - ldr r0, [r0, r6] - bl sub_02079FC4 - add r1, r0, #0 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl sub_02021F24 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D330 - add r7, r7, #1 - add r6, r6, #4 - add r4, r4, #4 - cmp r7, #4 - blt _02250E32 - ldr r4, _02250EF0 ; =0x02254BD4 - mov r6, #0 - mov r7, #2 -_02250EA4: - mov r0, #0xf3 - add r1, r5, r6 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - ldrsh r2, [r4, r7] - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - ldrsh r1, [r4, r1] - bl sub_0200D4C4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _02250EA4 - ldr r0, _02250EF4 ; =ov17_02250F4C - ldr r2, _02250EF8 ; =0x0000C738 - add r1, r5, #0 - bl sub_0200D9E8 - mov r1, #0x4d - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [sp, #0x18] - bl sub_02006CA8 - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - nop -_02250EE4: .word 0x000080EB -_02250EE8: .word 0x000080EA -_02250EEC: .word 0x02254C5C -_02250EF0: .word 0x02254BD4 -_02250EF4: .word ov17_02250F4C -_02250EF8: .word 0x0000C738 - thumb_func_end ov17_02250DB0 - - thumb_func_start ov17_02250EFC -ov17_02250EFC: ; 0x02250EFC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x2c] - ldr r1, _02250F44 ; =0x000080EA - bl sub_0200D090 - ldr r0, [r6, #0x2c] - ldr r1, _02250F44 ; =0x000080EA - bl sub_0200D0A0 - ldr r0, [r6, #0x2c] - ldr r1, _02250F48 ; =0x000080EB - bl sub_0200D080 - mov r7, #0x4e - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_02250F20: - ldr r1, _02250F44 ; =0x000080EA - ldr r0, [r6, #0x2c] - add r1, r4, r1 - bl sub_0200D070 - ldr r0, [r5, r7] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02250F20 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02250F44: .word 0x000080EA -_02250F48: .word 0x000080EB - thumb_func_end ov17_02250EFC - - thumb_func_start ov17_02250F4C -ov17_02250F4C: ; 0x02250F4C - push {r4, r5, r6, lr} - mov r6, #0x4e - add r5, r1, #0 - mov r4, #0 - lsl r6, r6, #2 -_02250F56: - ldr r0, [r5, r6] - bl sub_0200D330 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02250F56 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02250F4C - - thumb_func_start ov17_02250F68 -ov17_02250F68: ; 0x02250F68 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _02250FB4 ; =0x000080EF - add r4, r1, #0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - add r2, r4, #0 - mov r3, #0x66 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _02250FB8 ; =0x000080EC - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x65 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _02250FB8 ; =0x000080EC - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x64 - bl sub_0200CE54 - add sp, #0xc - pop {r4, r5, pc} - nop -_02250FB4: .word 0x000080EF -_02250FB8: .word 0x000080EC - thumb_func_end ov17_02250F68 - - thumb_func_start ov17_02250FBC -ov17_02250FBC: ; 0x02250FBC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - ldr r1, _02250FDC ; =0x000080EF - bl sub_0200D070 - ldr r0, [r4, #0x2c] - ldr r1, _02250FE0 ; =0x000080EC - bl sub_0200D090 - ldr r0, [r4, #0x2c] - ldr r1, _02250FE0 ; =0x000080EC - bl sub_0200D0A0 - pop {r4, pc} - nop -_02250FDC: .word 0x000080EF -_02250FE0: .word 0x000080EC - thumb_func_end ov17_02250FBC - - thumb_func_start ov17_02250FE4 -ov17_02250FE4: ; 0x02250FE4 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x18 - mov r1, #8 - bl sub_02018144 - mov r1, #0 - mov r2, #8 - add r6, r0, #0 - bl sub_020C4CF4 - str r5, [r6, #0] - mov r4, #0 -_02250FFE: - add r0, r5, #0 - bl ov17_02251070 - add r4, r4, #1 - cmp r4, #8 - blt _02250FFE - ldr r0, _02251018 ; =ov17_0225102C - ldr r2, _0225101C ; =0x0000C35A - add r1, r6, #0 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - nop -_02251018: .word ov17_0225102C -_0225101C: .word 0x0000C35A - thumb_func_end ov17_02250FE4 - - thumb_func_start ov17_02251020 -ov17_02251020: ; 0x02251020 - ldr r1, _02251028 ; =0x0000127D - mov r2, #1 - strb r2, [r0, r1] - bx lr - ; .align 2, 0 -_02251028: .word 0x0000127D - thumb_func_end ov17_02251020 - - thumb_func_start ov17_0225102C -ov17_0225102C: ; 0x0225102C - push {r4, lr} - add r4, r0, #0 - ldr r3, [r1, #0] - ldr r0, _0225106C ; =0x0000127D - ldrb r2, [r3, r0] - cmp r2, #1 - bne _02251048 - add r0, r1, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} -_02251048: - add r0, r0, #1 - ldrb r0, [r3, r0] - cmp r0, #0x30 - bhs _02251068 - mov r0, #4 - ldrsh r2, [r1, r0] - add r2, r2, #1 - strh r2, [r1, #4] - ldrsh r0, [r1, r0] - cmp r0, #4 - ble _02251068 - mov r0, #0 - strh r0, [r1, #4] - ldr r0, [r1, #0] - bl ov17_02251070 -_02251068: - pop {r4, pc} - nop -_0225106C: .word 0x0000127D - thumb_func_end ov17_0225102C - - thumb_func_start ov17_02251070 -ov17_02251070: ; 0x02251070 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x18 - mov r1, #0x20 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020C4CF4 - str r5, [r4, #0] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - ldr r2, _02251130 ; =0x02254C28 - bl sub_0200CE6C - str r0, [r4, #4] - ldr r0, [r5, #0] - bl sub_02094E98 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - ldr r0, [r5, #0] - add r6, #0x14 - bl sub_02094E98 - mov r1, #0x30 - bl sub_020E1F6C - add r2, r1, #0 - lsl r0, r6, #8 - lsl r1, r6, #0x10 - sub r2, #0x10 - str r0, [r4, #8] - lsl r0, r2, #8 - str r0, [r4, #0xc] - lsl r2, r2, #0x10 - ldr r0, [r4, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r5, #0] - bl sub_02094E98 - lsr r2, r0, #0x1f - lsl r1, r0, #0x17 - sub r1, r1, r2 - mov r0, #0x17 - ror r1, r0 - add r0, r2, r1 - add r0, #0x60 - str r0, [r4, #0x14] - ldr r0, [r5, #0] - bl sub_02094E98 - mov r1, #3 - lsl r1, r1, #8 - bl sub_020E1F6C - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - str r0, [r4, #0x18] - ldr r0, [r5, #0] - bl sub_02094E98 - mov r1, #0x18 - bl sub_020E1F6C - add r1, #0x10 - strh r1, [r4, #0x12] - ldr r0, [r5, #0] - bl sub_02094E98 - mov r1, #9 - bl sub_020E1F6C - ldr r0, [r4, #4] - bl sub_0200D364 - ldr r0, [r4, #4] - bl sub_0200D330 - ldr r0, _02251134 ; =ov17_02251140 - ldr r2, _02251138 ; =0x0000C35B - add r1, r4, #0 - bl sub_0200D9E8 - ldr r0, _0225113C ; =0x0000127E - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} - nop -_02251130: .word 0x02254C28 -_02251134: .word ov17_02251140 -_02251138: .word 0x0000C35B -_0225113C: .word 0x0000127E - thumb_func_end ov17_02251070 - - thumb_func_start ov17_02251140 -ov17_02251140: ; 0x02251140 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, _02251224 ; =0x0000127D - ldrb r1, [r0, r1] - cmp r1, #1 - beq _02251174 - ldr r2, [r4, #0xc] - asr r1, r2, #7 - lsr r1, r1, #0x18 - add r1, r2, r1 - asr r1, r1, #8 - cmp r1, #0xd0 - bgt _02251174 - mov r2, #0x10 - ldrsh r1, [r4, r2] - ldr r3, [r4, #8] - sub r2, #0x20 - add r3, r3, r1 - asr r1, r3, #7 - lsr r1, r1, #0x18 - add r1, r3, r1 - asr r1, r1, #8 - cmp r1, r2 - bge _02251190 -_02251174: - ldr r1, _02251228 ; =0x0000127E - ldrb r2, [r0, r1] - sub r2, r2, #1 - strb r2, [r0, r1] - ldr r0, [r4, #4] - bl sub_0200D0F4 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} -_02251190: - ldr r2, [r4, #0x1c] - ldr r1, [r4, #0x18] - add r0, r4, #0 - add r2, r2, r1 - mov r1, #0x5a - lsl r1, r1, #0xa - add r0, #0x1c - str r2, [r4, #0x1c] - cmp r2, r1 - blt _022511AA - ldr r2, [r0, #0] - sub r1, r2, r1 - str r1, [r0, #0] -_022511AA: - mov r0, #0x12 - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x1c] - lsl r5, r0, #0xc - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - lsl r0, r0, #8 - lsr r0, r0, #0x10 - bl sub_0201D15C - asr r1, r0, #0x1f - asr r3, r5, #0x1f - add r2, r5, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - strh r0, [r4, #0x10] - ldr r1, [r4, #8] - ldr r0, [r4, #0x14] - sub r0, r1, r0 - str r0, [r4, #8] - mov r0, #0xa - ldr r1, [r4, #0xc] - lsl r0, r0, #6 - add r2, r1, r0 - str r2, [r4, #0xc] - ldr r3, [r4, #8] - ldr r0, [r4, #4] - asr r1, r3, #7 - lsr r1, r1, #0x18 - add r1, r3, r1 - asr r3, r1, #8 - mov r1, #0x10 - ldrsh r1, [r4, r1] - add r1, r3, r1 - asr r3, r2, #7 - lsr r3, r3, #0x18 - add r3, r2, r3 - lsl r1, r1, #0x10 - lsl r2, r3, #8 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #4] - bl sub_0200D330 - pop {r3, r4, r5, pc} - nop -_02251224: .word 0x0000127D -_02251228: .word 0x0000127E - thumb_func_end ov17_02251140 - - thumb_func_start ov17_0225122C -ov17_0225122C: ; 0x0225122C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022512D0 ; =0x000080EE - add r4, r1, #0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - add r2, r4, #0 - mov r3, #0x54 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022512D4 ; =0x000080EB - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x53 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022512D4 ; =0x000080EB - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x52 - bl sub_0200CE54 - mov r7, #0x52 - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #2 -_0225127A: - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - ldr r2, _022512D8 ; =0x02254C90 - bl sub_0200CE6C - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - bl sub_0200D330 - ldr r0, [r4, r7] - mov r1, #0 - bl sub_0200D3F4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0225127A - ldr r4, _022512DC ; =0x02254BE4 - mov r6, #0 - mov r7, #2 -_022512A8: - mov r0, #0xf3 - add r1, r5, r6 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - ldrsh r2, [r4, r7] - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - ldrsh r1, [r4, r1] - bl sub_0200D4C4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _022512A8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022512D0: .word 0x000080EE -_022512D4: .word 0x000080EB -_022512D8: .word 0x02254C90 -_022512DC: .word 0x02254BE4 - thumb_func_end ov17_0225122C - - thumb_func_start ov17_022512E0 -ov17_022512E0: ; 0x022512E0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x2c] - ldr r1, _02251314 ; =0x000080EE - bl sub_0200D070 - ldr r0, [r5, #0x2c] - ldr r1, _02251318 ; =0x000080EB - bl sub_0200D090 - ldr r0, [r5, #0x2c] - ldr r1, _02251318 ; =0x000080EB - bl sub_0200D0A0 - mov r6, #0x52 - mov r4, #0 - lsl r6, r6, #2 -_02251302: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02251302 - pop {r4, r5, r6, pc} - nop -_02251314: .word 0x000080EE -_02251318: .word 0x000080EB - thumb_func_end ov17_022512E0 - - thumb_func_start ov17_0225131C -ov17_0225131C: ; 0x0225131C - push {r3, r4, r5, lr} - mov r3, #0x52 - lsl r3, r3, #2 - lsl r4, r1, #2 - add r5, r0, r3 - ldr r0, [r5, r4] - add r1, r2, #0 - bl sub_0200D364 - ldr r0, [r5, r4] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, _02251340 ; =0x000005DD - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_02251340: .word 0x000005DD - thumb_func_end ov17_0225131C - - thumb_func_start ov17_02251344 -ov17_02251344: ; 0x02251344 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - str r4, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _022513B4 ; =0x000080EC - mov r1, #2 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - ldr r2, [r5, #0x28] - ldr r3, [r5, #0x2c] - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _022513B8 ; =0x000080F0 - add r2, r4, #0 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x57 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _022513BC ; =0x000080ED - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x56 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _022513BC ; =0x000080ED - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x28] - ldr r1, [r5, #0x2c] - mov r3, #0x55 - bl sub_0200CE54 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_022513B4: .word 0x000080EC -_022513B8: .word 0x000080F0 -_022513BC: .word 0x000080ED - thumb_func_end ov17_02251344 - - thumb_func_start ov17_022513C0 -ov17_022513C0: ; 0x022513C0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - ldr r1, _022513E8 ; =0x000080EC - bl sub_0200D080 - ldr r0, [r4, #0x2c] - ldr r1, _022513EC ; =0x000080F0 - bl sub_0200D070 - ldr r0, [r4, #0x2c] - ldr r1, _022513F0 ; =0x000080ED - bl sub_0200D090 - ldr r0, [r4, #0x2c] - ldr r1, _022513F0 ; =0x000080ED - bl sub_0200D0A0 - pop {r4, pc} - nop -_022513E8: .word 0x000080EC -_022513EC: .word 0x000080F0 -_022513F0: .word 0x000080ED - thumb_func_end ov17_022513C0 - - thumb_func_start ov17_022513F4 -ov17_022513F4: ; 0x022513F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - str r3, [sp] - cmp r2, #0 - beq _0225140A - cmp r2, #1 - beq _0225141E - cmp r2, #2 - beq _02251438 - b _02251458 -_0225140A: - mov r0, #1 - str r0, [sp, #0x14] - mov r0, #0x56 - lsl r0, r0, #2 - add r2, r7, r0 - mov r0, #0x30 - mul r0, r1 - mov r6, #0 - add r4, r2, r0 - b _02251460 -_0225141E: - lsl r0, r1, #1 - add r2, r7, r0 - ldr r0, _0225153C ; =0x0000041E - ldrsh r6, [r2, r0] - mov r0, #0x11 - str r0, [sp, #0x14] - mov r0, #0x86 - lsl r0, r0, #2 - add r2, r7, r0 - mov r0, #0x30 - mul r0, r1 - add r4, r2, r0 - b _02251460 -_02251438: - lsl r0, r1, #1 - add r3, r7, r0 - ldr r0, _0225153C ; =0x0000041E - ldrsh r2, [r3, r0] - add r0, #8 - ldrsh r0, [r3, r0] - add r6, r2, r0 - mov r0, #0x21 - str r0, [sp, #0x14] - mov r0, #0xb6 - lsl r0, r0, #2 - add r2, r7, r0 - mov r0, #0x30 - mul r0, r1 - add r4, r2, r0 - b _02251460 -_02251458: - bl sub_02022974 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02251460: - ldr r0, [sp, #0x30] - add r6, #0x30 - lsl r0, r0, #5 - str r0, [sp, #0x10] - add r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp] - asr r0, r0, #3 - lsr r1, r0, #0x1c - ldr r0, [sp] - add r1, r0, r1 - asr r0, r1, #4 - str r0, [sp, #0xc] - ldr r0, [sp] - lsr r2, r0, #0x1f - lsl r1, r0, #0x1c - sub r1, r1, r2 - mov r0, #0x1c - ror r1, r0 - add r0, r2, r1 - beq _02251490 - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] -_02251490: - ldr r0, [sp, #0xc] - cmp r0, #0xc - ble _0225149A - bl sub_02022974 -_0225149A: - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - cmp r0, #0 - ble _022514C6 - add r5, r4, #0 -_022514A6: - ldr r0, [r5, #0] - cmp r0, #0 - bne _022514B8 - ldr r0, [r7, #0x28] - ldr r1, [r7, #0x2c] - ldr r2, _02251540 ; =0x02254CC4 - bl sub_0200CE6C - str r0, [r5, #0] -_022514B8: - ldr r0, [sp, #8] - add r5, r5, #4 - add r1, r0, #1 - ldr r0, [sp, #0xc] - str r1, [sp, #8] - cmp r1, r0 - blt _022514A6 -_022514C6: - ldr r0, [sp] - mov r7, #0 - cmp r0, #0x10 - blt _022514EE - ldr r0, [sp, #0x14] - add r5, r4, #0 - str r0, [sp, #4] - add r0, #0xf - str r0, [sp, #4] -_022514D8: - ldr r0, [r5, #0] - ldr r1, [sp, #4] - bl sub_0200D364 - ldr r0, [sp] - add r5, r5, #4 - sub r0, #0x10 - add r7, r7, #1 - str r0, [sp] - cmp r0, #0x10 - bge _022514D8 -_022514EE: - ldr r0, [sp] - cmp r0, #0 - ble _0225150A - ldr r0, [sp, #0xc] - cmp r7, r0 - bge _0225150A - ldr r2, [sp, #0x14] - ldr r1, [sp] - lsl r0, r7, #2 - add r1, r2, r1 - ldr r0, [r4, r0] - sub r1, r1, #1 - bl sub_0200D364 -_0225150A: - ldr r0, [sp, #0xc] - mov r5, #0 - cmp r0, #0 - ble _02251536 - ldr r0, [sp, #0x10] - lsl r0, r0, #0x10 - asr r7, r0, #0x10 -_02251518: - lsl r1, r6, #0x10 - ldr r0, [r4, #0] - asr r1, r1, #0x10 - add r2, r7, #0 - bl sub_0200D4C4 - ldr r0, [r4, #0] - bl sub_0200D330 - ldr r0, [sp, #0xc] - add r5, r5, #1 - add r6, #0x10 - add r4, r4, #4 - cmp r5, r0 - blt _02251518 -_02251536: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225153C: .word 0x0000041E -_02251540: .word 0x02254CC4 - thumb_func_end ov17_022513F4 - - thumb_func_start ov17_02251544 -ov17_02251544: ; 0x02251544 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r7, #0x86 - lsl r7, r7, #2 - str r0, [sp] - mov r0, #0 - add r6, r7, #0 - str r0, [sp, #4] - sub r6, #0xc0 -_02251556: - ldr r5, [sp] - mov r4, #0 -_0225155A: - ldr r0, [r5, r6] - cmp r0, #0 - beq _02251564 - bl sub_0200D0F4 -_02251564: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0225156E - bl sub_0200D0F4 -_0225156E: - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0225157C - bl sub_0200D0F4 -_0225157C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xc - blt _0225155A - ldr r0, [sp] - add r0, #0x30 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #4 - blt _02251556 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_02251544 - - thumb_func_start ov17_02251598 -ov17_02251598: ; 0x02251598 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - mov r0, #0 - strb r0, [r7] - mov r0, #0x18 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r5, [r4, #0] - str r7, [r4, #4] - cmp r6, #0 - ldr r2, _022515E8 ; =0x0000A028 - bne _022515D2 - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #8] - str r0, [r4, #0xc] - ldr r0, _022515EC ; =ov17_022515F4 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_022515D2: - mov r0, #3 - lsl r0, r0, #0xc - str r0, [r4, #8] - mov r0, #9 - lsl r0, r0, #0xc - str r0, [r4, #0xc] - ldr r0, _022515F0 ; =ov17_02251688 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022515E8: .word 0x0000A028 -_022515EC: .word ov17_022515F4 -_022515F0: .word ov17_02251688 - thumb_func_end ov17_02251598 - - thumb_func_start ov17_022515F4 -ov17_022515F4: ; 0x022515F4 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r0, [r1, #0x10] - cmp r0, #0 - bne _0225166E - mov r0, #1 - ldr r2, [r1, #8] - lsl r0, r0, #0xa - sub r2, r2, r0 - str r2, [r1, #8] - ldr r2, [r1, #0xc] - add r0, r2, r0 - str r0, [r1, #0xc] - mov r0, #3 - ldr r2, [r1, #8] - lsl r0, r0, #0xc - cmp r2, r0 - bgt _02251626 - str r0, [r1, #8] - mov r0, #9 - lsl r0, r0, #0xc - str r0, [r1, #0xc] - ldrb r0, [r1, #0x10] - add r0, r0, #1 - strb r0, [r1, #0x10] -_02251626: - ldr r3, [r1, #0] - ldr r2, _02251684 ; =0x00000851 - mov r0, #0 - strb r0, [r3, r2] - ldr r3, [r1, #8] - ldr r4, [r1, #0] - asr r5, r3, #8 - add r3, r2, #1 - strb r5, [r4, r3] - ldr r4, [r1, #0] - mov r5, #0xff - add r3, r2, #2 - strb r5, [r4, r3] - ldr r3, [r1, #0xc] - ldr r4, [r1, #0] - asr r5, r3, #8 - add r3, r2, #3 - strb r5, [r4, r3] - ldr r4, [r1, #0] - mov r5, #1 - add r3, r2, #4 - strb r5, [r4, r3] - ldr r3, [r1, #8] - ldr r4, [r1, #0] - asr r5, r3, #8 - add r3, r2, #5 - strb r5, [r4, r3] - ldr r4, [r1, #0] - add r3, r2, #6 - strb r0, [r4, r3] - ldr r0, [r1, #0xc] - ldr r1, [r1, #0] - asr r3, r0, #8 - add r0, r2, #7 - strb r3, [r1, r0] - pop {r3, r4, r5, pc} -_0225166E: - ldr r0, [r1, #4] - mov r2, #1 - strb r2, [r0] - add r0, r1, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_02251684: .word 0x00000851 - thumb_func_end ov17_022515F4 - - thumb_func_start ov17_02251688 -ov17_02251688: ; 0x02251688 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r0, [r1, #0x10] - cmp r0, #0 - bne _022516FE - mov r0, #1 - ldr r2, [r1, #8] - lsl r0, r0, #0xa - add r2, r2, r0 - str r2, [r1, #8] - ldr r2, [r1, #0xc] - sub r0, r2, r0 - str r0, [r1, #0xc] - mov r0, #6 - ldr r2, [r1, #8] - lsl r0, r0, #0xc - cmp r2, r0 - blt _022516B6 - str r0, [r1, #8] - str r0, [r1, #0xc] - ldrb r0, [r1, #0x10] - add r0, r0, #1 - strb r0, [r1, #0x10] -_022516B6: - ldr r3, [r1, #0] - ldr r2, _02251714 ; =0x00000851 - mov r0, #0 - strb r0, [r3, r2] - ldr r3, [r1, #8] - ldr r4, [r1, #0] - asr r5, r3, #8 - add r3, r2, #1 - strb r5, [r4, r3] - ldr r4, [r1, #0] - mov r5, #0xff - add r3, r2, #2 - strb r5, [r4, r3] - ldr r3, [r1, #0xc] - ldr r4, [r1, #0] - asr r5, r3, #8 - add r3, r2, #3 - strb r5, [r4, r3] - ldr r4, [r1, #0] - mov r5, #1 - add r3, r2, #4 - strb r5, [r4, r3] - ldr r3, [r1, #8] - ldr r4, [r1, #0] - asr r5, r3, #8 - add r3, r2, #5 - strb r5, [r4, r3] - ldr r4, [r1, #0] - add r3, r2, #6 - strb r0, [r4, r3] - ldr r0, [r1, #0xc] - ldr r1, [r1, #0] - asr r3, r0, #8 - add r0, r2, #7 - strb r3, [r1, r0] - pop {r3, r4, r5, pc} -_022516FE: - ldr r0, [r1, #4] - mov r2, #1 - strb r2, [r0] - add r0, r1, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_02251714: .word 0x00000851 - thumb_func_end ov17_02251688 - - thumb_func_start ov17_02251718 -ov17_02251718: ; 0x02251718 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r1, #0 - add r0, r3, #0 - strb r1, [r0] - mov r0, #0x18 - mov r1, #0x14 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - lsl r0, r6, #2 - add r0, r5, r0 - ldr r0, [r0, #0x18] - cmp r7, #0 - str r0, [r4, #0] - ldr r0, [sp] - ldr r2, _02251778 ; =0x0000C350 - str r0, [r4, #4] - bne _02251762 - mov r0, #0x4a - lsl r0, r0, #0xa - str r0, [r4, #8] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0xc] - ldr r0, _0225177C ; =ov17_02251784 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_02251762: - mov r0, #2 - lsl r0, r0, #0xe - str r0, [r4, #8] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0xc] - ldr r0, _02251780 ; =ov17_022517F0 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251778: .word 0x0000C350 -_0225177C: .word ov17_02251784 -_02251780: .word ov17_022517F0 - thumb_func_end ov17_02251718 - - thumb_func_start ov17_02251784 -ov17_02251784: ; 0x02251784 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02251796 - cmp r0, #1 - beq _022517A6 - b _022517DA -_02251796: - ldr r0, [r4, #0] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_022517A6: - mov r0, #2 - ldr r1, [r4, #8] - lsl r0, r0, #0xa - sub r2, r1, r0 - lsl r1, r0, #4 - str r2, [r4, #8] - cmp r2, r1 - bgt _022517C0 - lsl r0, r0, #4 - str r0, [r4, #8] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_022517C0: - ldr r2, [r4, #8] - ldr r0, [r4, #0] - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r2, [r4, #0xc] - ldr r0, [r4, #0] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_022517DA: - ldr r0, [r4, #4] - mov r1, #1 - strb r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov17_02251784 - - thumb_func_start ov17_022517F0 -ov17_022517F0: ; 0x022517F0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _02251802 - cmp r0, #1 - beq _02251806 - b _0225183C -_02251802: - add r0, r0, #1 - strb r0, [r4, #0x10] -_02251806: - mov r0, #2 - ldr r1, [r4, #8] - lsl r0, r0, #0xa - sub r1, r1, r0 - ldr r0, _0225185C ; =0xFFFFD800 - str r1, [r4, #8] - cmp r1, r0 - bgt _0225181C - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_0225181C: - ldr r3, [r4, #8] - ldr r0, [r4, #0] - asr r2, r3, #7 - lsr r2, r2, #0x18 - add r2, r3, r2 - mov r1, #0 - asr r2, r2, #8 - bl sub_02007DEC - ldr r2, [r4, #0xc] - ldr r0, [r4, #0] - mov r1, #1 - asr r2, r2, #8 - bl sub_02007DEC - pop {r3, r4, r5, pc} -_0225183C: - ldr r0, [r4, #0] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - ldr r0, [r4, #4] - mov r1, #1 - strb r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_0225185C: .word 0xFFFFD800 - thumb_func_end ov17_022517F0 - - thumb_func_start ov17_02251860 -ov17_02251860: ; 0x02251860 - ldr r2, _022518FC ; =0x00000121 - ldrb r0, [r0, r2] - cmp r0, #8 - bhi _022518F6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02251874: ; jump table - .short _02251886 - _02251874 - 2 ; case 0 - .short _0225189E - _02251874 - 2 ; case 1 - .short _022518B4 - _02251874 - 2 ; case 2 - .short _022518D2 - _02251874 - 2 ; case 3 - .short _022518D2 - _02251874 - 2 ; case 4 - .short _022518DE - _02251874 - 2 ; case 5 - .short _022518DE - _02251874 - 2 ; case 6 - .short _022518EA - _02251874 - 2 ; case 7 - .short _022518EA - _02251874 - 2 ; case 8 -_02251886: - cmp r1, #0 - beq _02251890 - cmp r1, #2 - beq _02251894 - b _0225189A -_02251890: - ldr r0, _02251900 ; =0x00001770 - bx lr -_02251894: - mov r0, #0xfa - lsl r0, r0, #4 - bx lr -_0225189A: - mov r0, #0 - bx lr -_0225189E: - cmp r1, #0 - beq _022518A8 - cmp r1, #1 - beq _022518AC - b _022518B0 -_022518A8: - ldr r0, _02251904 ; =0x00001B58 - bx lr -_022518AC: - ldr r0, _02251908 ; =0x00000BB8 - bx lr -_022518B0: - mov r0, #0 - bx lr -_022518B4: - cmp r1, #0 - beq _022518C2 - cmp r1, #1 - beq _022518C6 - cmp r1, #2 - beq _022518CA - b _022518CE -_022518C2: - ldr r0, _0225190C ; =0x00000D05 - bx lr -_022518C6: - ldr r0, _0225190C ; =0x00000D05 - bx lr -_022518CA: - ldr r0, _0225190C ; =0x00000D05 - bx lr -_022518CE: - mov r0, #0 - bx lr -_022518D2: - cmp r1, #0 - bne _022518DA - ldr r0, _02251910 ; =0x00002710 - bx lr -_022518DA: - mov r0, #0 - bx lr -_022518DE: - cmp r1, #1 - bne _022518E6 - ldr r0, _02251910 ; =0x00002710 - bx lr -_022518E6: - mov r0, #0 - bx lr -_022518EA: - cmp r1, #2 - bne _022518F2 - ldr r0, _02251910 ; =0x00002710 - bx lr -_022518F2: - mov r0, #0 - bx lr -_022518F6: - mov r0, #0 - bx lr - nop -_022518FC: .word 0x00000121 -_02251900: .word 0x00001770 -_02251904: .word 0x00001B58 -_02251908: .word 0x00000BB8 -_0225190C: .word 0x00000D05 -_02251910: .word 0x00002710 - thumb_func_end ov17_02251860 - - thumb_func_start ov17_02251914 -ov17_02251914: ; 0x02251914 - push {r3, lr} - bl ov17_02251860 - mov r1, #0xc0 - add r2, r0, #0 - mul r2, r1 - ldr r1, _0225192C ; =0x00001388 - add r0, r2, r1 - lsl r1, r1, #1 - bl sub_020E1F6C - pop {r3, pc} - ; .align 2, 0 -_0225192C: .word 0x00001388 - thumb_func_end ov17_02251914 - - thumb_func_start ov17_02251930 -ov17_02251930: ; 0x02251930 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r0, [sp] - mov r0, #0 - ldr r7, [sp] - add r5, r1, #0 - add r6, r2, #0 - str r0, [sp, #8] - add r4, sp, #0x24 -_02251942: - cmp r5, #0 - beq _02251950 - cmp r5, #1 - beq _0225196A - cmp r5, #2 - beq _02251974 - b _0225197C -_02251950: - ldr r0, [sp] - ldr r1, [sp, #8] - bl sub_02095928 - str r0, [sp, #0x10] - ldr r0, [sp] - ldr r1, [sp, #8] - bl sub_0209598C - ldr r1, [sp, #0x10] - add r0, r1, r0 - str r0, [r4, #0] - b _02251984 -_0225196A: - mov r0, #0x4b - lsl r0, r0, #2 - ldrsh r0, [r7, r0] - str r0, [r4, #0] - b _02251984 -_02251974: - ldr r0, _02251A18 ; =0x0000012E - ldrsh r0, [r7, r0] - str r0, [r4, #0] - b _02251984 -_0225197C: - bl sub_02022974 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} -_02251984: - ldr r0, [sp, #8] - add r4, r4, #4 - add r0, r0, #1 - add r7, #0xc - str r0, [sp, #8] - cmp r0, #4 - blt _02251942 - mov r4, #0 - mov r3, #1 - add r2, sp, #0x28 - add r7, sp, #0x24 -_0225199A: - lsl r0, r4, #2 - ldr r1, [r7, r0] - ldr r0, [r2, #0] - cmp r1, r0 - bge _022519A6 - add r4, r3, #0 -_022519A6: - add r3, r3, #1 - add r2, r2, #4 - cmp r3, #4 - blt _0225199A - ldr r0, [sp] - add r1, r5, #0 - bl ov17_02251860 - lsl r2, r4, #2 - add r1, sp, #0x24 - ldr r1, [r1, r2] - bl sub_020E1F6C - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #4] - add r7, sp, #0x24 - add r4, sp, #0x14 -_022519CA: - ldr r0, [r7, #0] - ldr r1, [sp, #0xc] - mul r0, r1 - str r0, [r4, #0] - add r0, #0x32 - mov r1, #0x64 - bl sub_020E1F6C - stmia r4!, {r0} - ldr r0, [sp, #4] - add r7, r7, #4 - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #4 - blt _022519CA - mov r2, #0 - add r1, sp, #0x14 -_022519EC: - cmp r5, #0 - beq _022519FA - cmp r5, #1 - beq _02251A00 - cmp r5, #2 - beq _02251A06 - b _02251A0A -_022519FA: - ldr r0, [r1, #0] - strh r0, [r6] - b _02251A0A -_02251A00: - ldr r0, [r1, #0] - strh r0, [r6] - b _02251A0A -_02251A06: - ldr r0, [r1, #0] - strh r0, [r6] -_02251A0A: - add r2, r2, #1 - add r1, r1, #4 - add r6, r6, #2 - cmp r2, #4 - blt _022519EC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251A18: .word 0x0000012E - thumb_func_end ov17_02251930 - - thumb_func_start ov17_02251A1C -ov17_02251A1C: ; 0x02251A1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - str r0, [sp] - ldr r0, [r0, #0] - ldr r1, _02251D3C ; =0x00000121 - ldrb r1, [r0, r1] - cmp r1, #8 - bhi _02251ADC - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02251A38: ; jump table - .short _02251A4A - _02251A38 - 2 ; case 0 - .short _02251A68 - _02251A38 - 2 ; case 1 - .short _02251A86 - _02251A38 - 2 ; case 2 - .short _02251AB4 - _02251A38 - 2 ; case 3 - .short _02251AB4 - _02251A38 - 2 ; case 4 - .short _02251AC2 - _02251A38 - 2 ; case 5 - .short _02251AC2 - _02251A38 - 2 ; case 6 - .short _02251AD0 - _02251A38 - 2 ; case 7 - .short _02251AD0 - _02251A38 - 2 ; case 8 -_02251A4A: - ldr r3, _02251D40 ; =0x000003D6 - ldr r2, [sp] - mov r1, #0 - add r2, r2, r3 - bl ov17_02251930 - ldr r0, [sp] - ldr r3, _02251D44 ; =0x000003E6 - ldr r2, [sp] - ldr r0, [r0, #0] - mov r1, #2 - add r2, r2, r3 - bl ov17_02251930 - b _02251ADC -_02251A68: - ldr r3, _02251D40 ; =0x000003D6 - ldr r2, [sp] - mov r1, #0 - add r2, r2, r3 - bl ov17_02251930 - ldr r0, [sp] - ldr r3, _02251D48 ; =0x000003DE - ldr r2, [sp] - ldr r0, [r0, #0] - mov r1, #1 - add r2, r2, r3 - bl ov17_02251930 - b _02251ADC -_02251A86: - ldr r3, _02251D40 ; =0x000003D6 - ldr r2, [sp] - mov r1, #0 - add r2, r2, r3 - bl ov17_02251930 - ldr r0, [sp] - ldr r3, _02251D48 ; =0x000003DE - ldr r2, [sp] - ldr r0, [r0, #0] - mov r1, #1 - add r2, r2, r3 - bl ov17_02251930 - ldr r0, [sp] - ldr r3, _02251D44 ; =0x000003E6 - ldr r2, [sp] - ldr r0, [r0, #0] - mov r1, #2 - add r2, r2, r3 - bl ov17_02251930 - b _02251ADC -_02251AB4: - ldr r3, _02251D40 ; =0x000003D6 - ldr r2, [sp] - mov r1, #0 - add r2, r2, r3 - bl ov17_02251930 - b _02251ADC -_02251AC2: - ldr r3, _02251D48 ; =0x000003DE - ldr r2, [sp] - mov r1, #1 - add r2, r2, r3 - bl ov17_02251930 - b _02251ADC -_02251AD0: - ldr r3, _02251D44 ; =0x000003E6 - ldr r2, [sp] - mov r1, #2 - add r2, r2, r3 - bl ov17_02251930 -_02251ADC: - ldr r7, _02251D40 ; =0x000003D6 - ldr r6, [sp] - add r0, r7, #0 - add r1, r7, #0 - mov r5, #0 - add r0, #8 - add r1, #0x18 -_02251AEA: - ldr r2, _02251D44 ; =0x000003E6 - ldrsh r3, [r6, r7] - ldrsh r4, [r6, r2] - ldrsh r2, [r6, r0] - add r5, r5, #1 - add r2, r3, r2 - add r2, r4, r2 - strh r2, [r6, r1] - add r6, r6, #2 - cmp r5, #4 - blt _02251AEA - ldr r1, [sp] - ldr r4, _02251D40 ; =0x000003D6 - mov r0, #0 - mov r2, #1 - add r1, r1, #2 - add r5, r4, #0 -_02251B0C: - ldr r3, [sp] - lsl r6, r0, #1 - add r3, r3, r6 - ldrsh r6, [r3, r4] - ldrsh r3, [r1, r5] - cmp r6, r3 - bge _02251B1C - add r0, r2, #0 -_02251B1C: - add r2, r2, #1 - add r1, r1, #2 - cmp r2, #4 - blt _02251B0C - lsl r1, r0, #1 - ldr r0, [sp] - ldr r4, [sp] - add r1, r0, r1 - ldr r0, _02251D40 ; =0x000003D6 - mov r5, #0 - add r7, r0, #0 - ldrsh r6, [r1, r0] - add r7, #0x20 -_02251B36: - ldr r0, _02251D40 ; =0x000003D6 - ldrsh r1, [r4, r0] - mov r0, #0x64 - mul r0, r1 - add r1, r6, #0 - bl sub_020E1F6C - strh r0, [r4, r7] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02251B36 - ldr r0, [sp] - ldr r4, _02251D48 ; =0x000003DE - mov r2, #0 - mov r1, #1 - add r0, r0, #2 - add r5, r4, #0 -_02251B5A: - ldr r3, [sp] - lsl r6, r2, #1 - add r3, r3, r6 - ldrsh r6, [r3, r4] - ldrsh r3, [r0, r5] - cmp r6, r3 - bge _02251B6A - add r2, r1, #0 -_02251B6A: - add r1, r1, #1 - add r0, r0, #2 - cmp r1, #4 - blt _02251B5A - ldr r0, [sp] - lsl r1, r2, #1 - add r1, r0, r1 - ldr r0, _02251D48 ; =0x000003DE - ldr r4, [sp] - add r7, r0, #0 - ldrsh r6, [r1, r0] - mov r5, #0 - add r7, #0x20 -_02251B84: - ldr r0, _02251D48 ; =0x000003DE - ldrsh r1, [r4, r0] - mov r0, #0x64 - mul r0, r1 - add r1, r6, #0 - bl sub_020E1F6C - strh r0, [r4, r7] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02251B84 - ldr r0, [sp] - ldr r4, _02251D44 ; =0x000003E6 - mov r2, #0 - mov r1, #1 - add r0, r0, #2 - add r5, r4, #0 -_02251BA8: - ldr r3, [sp] - lsl r6, r2, #1 - add r3, r3, r6 - ldrsh r6, [r3, r4] - ldrsh r3, [r0, r5] - cmp r6, r3 - bge _02251BB8 - add r2, r1, #0 -_02251BB8: - add r1, r1, #1 - add r0, r0, #2 - cmp r1, #4 - blt _02251BA8 - ldr r0, [sp] - lsl r1, r2, #1 - add r1, r0, r1 - ldr r0, _02251D44 ; =0x000003E6 - ldr r4, [sp] - add r7, r0, #0 - ldrsh r6, [r1, r0] - mov r5, #0 - add r7, #0x20 -_02251BD2: - ldr r0, _02251D44 ; =0x000003E6 - ldrsh r1, [r4, r0] - mov r0, #0x64 - mul r0, r1 - add r1, r6, #0 - bl sub_020E1F6C - strh r0, [r4, r7] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02251BD2 - ldr r0, [sp] - mov r1, #0 - ldr r0, [r0, #0] - bl ov17_02251914 - ldr r4, [sp] - ldr r7, _02251D4C ; =0x0000041E - add r6, r0, #0 - mov r5, #0 -_02251BFC: - ldr r0, _02251D50 ; =0x000003F6 - mov r1, #0x64 - ldrsh r0, [r4, r0] - mul r0, r6 - bl sub_020E1F6C - strh r0, [r4, r7] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02251BFC - ldr r0, [sp] - mov r1, #1 - ldr r0, [r0, #0] - bl ov17_02251914 - ldr r4, [sp] - ldr r7, _02251D54 ; =0x00000426 - add r6, r0, #0 - mov r5, #0 -_02251C24: - ldr r0, _02251D58 ; =0x000003FE - mov r1, #0x64 - ldrsh r0, [r4, r0] - mul r0, r6 - bl sub_020E1F6C - strh r0, [r4, r7] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02251C24 - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - bl ov17_02251914 - ldr r4, [sp] - ldr r7, _02251D5C ; =0x0000042E - add r6, r0, #0 - mov r5, #0 -_02251C4C: - ldr r0, _02251D60 ; =0x00000406 - mov r1, #0x64 - ldrsh r0, [r4, r0] - mul r0, r6 - bl sub_020E1F6C - strh r0, [r4, r7] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _02251C4C - ldr r7, _02251D4C ; =0x0000041E - ldr r5, [sp] - add r0, r7, #0 - add r1, r7, #0 - mov r6, #0 - add r0, #8 - sub r1, #8 -_02251C70: - ldr r2, _02251D5C ; =0x0000042E - ldrsh r3, [r5, r7] - ldrsh r4, [r5, r2] - ldrsh r2, [r5, r0] - add r6, r6, #1 - add r2, r3, r2 - add r2, r4, r2 - strh r2, [r5, r1] - add r5, r5, #2 - cmp r6, #4 - blt _02251C70 - ldr r0, [sp] - mov r7, #0 - add r6, sp, #0x18 - str r0, [sp, #4] - add r4, sp, #8 - add r5, sp, #0x28 -_02251C92: - stmia r6!, {r7} - ldr r1, [sp, #4] - ldr r0, _02251D64 ; =0x00000416 - ldrsh r0, [r1, r0] - stmia r4!, {r0} - ldr r0, [sp] - ldr r0, [r0, #0] - bl sub_02094E98 - stmia r5!, {r0} - ldr r0, [sp, #4] - add r7, r7, #1 - add r0, r0, #2 - str r0, [sp, #4] - cmp r7, #4 - blt _02251C92 - mov r0, #0 - mov ip, r0 -_02251CB6: - mov r0, ip - mov r7, #3 - cmp r0, #3 - bge _02251D04 - add r2, sp, #0x14 - add r3, sp, #0x34 - add r4, sp, #0x24 -_02251CC4: - sub r0, r2, #4 - ldr r5, [r2, #0] - ldr r6, [r0, #0] - cmp r6, r5 - blt _02251CDC - cmp r6, r5 - bne _02251CF6 - sub r0, r3, #4 - ldr r1, [r0, #0] - ldr r0, [r3, #0] - cmp r1, r0 - bge _02251CF6 -_02251CDC: - str r6, [r2, #0] - sub r0, r2, #4 - str r5, [r0, #0] - sub r0, r4, #4 - ldr r5, [r4, #0] - ldr r1, [r0, #0] - str r1, [r4, #0] - str r5, [r0, #0] - sub r0, r3, #4 - ldr r5, [r3, #0] - ldr r1, [r0, #0] - str r1, [r3, #0] - str r5, [r0, #0] -_02251CF6: - sub r7, r7, #1 - mov r0, ip - sub r2, r2, #4 - sub r3, r3, #4 - sub r4, r4, #4 - cmp r7, r0 - bgt _02251CC4 -_02251D04: - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #3 - blt _02251CB6 - mov r1, #0x13 - ldr r7, _02251D68 ; =0x000003D1 - mov r6, #0 - add r5, sp, #0x18 - mov r0, #0xc - lsl r1, r1, #4 -_02251D1A: - ldr r3, [sp] - ldr r2, [r5, #0] - add r3, r3, r6 - strb r2, [r3, r7] - ldr r2, [sp] - ldr r4, [r2, #0] - ldr r2, [r5, #0] - add r5, r5, #4 - add r3, r2, #0 - mul r3, r0 - add r2, r4, r3 - strb r6, [r2, r1] - add r6, r6, #1 - cmp r6, #4 - blt _02251D1A - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251D3C: .word 0x00000121 -_02251D40: .word 0x000003D6 -_02251D44: .word 0x000003E6 -_02251D48: .word 0x000003DE -_02251D4C: .word 0x0000041E -_02251D50: .word 0x000003F6 -_02251D54: .word 0x00000426 -_02251D58: .word 0x000003FE -_02251D5C: .word 0x0000042E -_02251D60: .word 0x00000406 -_02251D64: .word 0x00000416 -_02251D68: .word 0x000003D1 - thumb_func_end ov17_02251A1C - - thumb_func_start ov17_02251D6C -ov17_02251D6C: ; 0x02251D6C - push {r3, r4, lr} - sub sp, #0xc - ldr r1, _02251DA0 ; =0x02254D18 - add r3, sp, #0 - str r1, [sp] - mov r1, #0xb - strh r1, [r3, #4] - ldr r1, [r0, #0] - ldr r2, _02251DA4 ; =0x00000123 - ldrb r1, [r1, r2] - strb r1, [r3, #6] - sub r1, r2, #7 - ldr r4, [r0, #0] - add r2, #0x4e - ldrb r1, [r4, r1] - strb r1, [r3, #8] - ldr r1, [r0, #0] - ldrb r1, [r1, r2] - strb r1, [r3, #7] - ldr r1, _02251DA8 ; =0x0000085C - add r0, r0, r1 - add r1, sp, #0 - bl ov17_0224F18C - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02251DA0: .word 0x02254D18 -_02251DA4: .word 0x00000123 -_02251DA8: .word 0x0000085C - thumb_func_end ov17_02251D6C - - thumb_func_start ov17_02251DAC -ov17_02251DAC: ; 0x02251DAC - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02251DAC - - thumb_func_start ov17_02251DC0 -ov17_02251DC0: ; 0x02251DC0 - push {r3, lr} - add r1, r2, #0 - mov r2, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02251DC0 - - thumb_func_start ov17_02251DD0 -ov17_02251DD0: ; 0x02251DD0 - bx lr - ; .align 2, 0 - thumb_func_end ov17_02251DD0 - - thumb_func_start ov17_02251DD4 -ov17_02251DD4: ; 0x02251DD4 - push {r3, lr} - mov r1, #0x9a - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02251DD4 - - thumb_func_start ov17_02251DE8 -ov17_02251DE8: ; 0x02251DE8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0xe7 - lsl r1, r1, #2 - str r0, [sp] - mov ip, r2 - add r0, r3, #0 - add r4, r6, r1 - mov r2, #0x4d -_02251DFA: - ldrh r1, [r0] - add r0, r0, #2 - strh r1, [r4] - add r4, r4, #2 - sub r2, r2, #1 - bne _02251DFA - mov r1, #0 - ldr r7, _02251E50 ; =0x00000132 - add r2, r1, #0 -_02251E0C: - ldr r0, [r6, #0] - mov r4, #0x4a - add r0, r0, r2 - ldrh r5, [r3] - lsl r4, r4, #2 - add r1, r1, #1 - strh r5, [r0, r4] - ldrh r5, [r3, #2] - add r4, r4, #2 - add r2, #0xc - strh r5, [r0, r4] - mov r4, #0x4b - ldrh r5, [r3, #4] - lsl r4, r4, #2 - strh r5, [r0, r4] - ldrh r5, [r3, #6] - add r4, r4, #2 - strh r5, [r0, r4] - mov r4, #0x13 - ldrh r5, [r3, #8] - lsl r4, r4, #4 - strh r5, [r0, r4] - ldrh r4, [r3, #0xa] - add r3, #0xc - cmp r1, #4 - strh r4, [r0, r7] - blt _02251E0C - mov r2, #0 - ldr r0, [sp] - mov r1, ip - add r3, r2, #0 - bl ov17_0224F26C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02251E50: .word 0x00000132 - thumb_func_end ov17_02251DE8 - - thumb_func_start ov17_02251E54 -ov17_02251E54: ; 0x02251E54 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02251E54 - - thumb_func_start ov17_02251E68 -ov17_02251E68: ; 0x02251E68 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x18 - add r7, r1, #0 - add r1, r0, #0 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02251EA4 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _02251EA8 ; =ov17_02251EAC - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02251EA4: .word 0x00007530 -_02251EA8: .word ov17_02251EAC - thumb_func_end ov17_02251E68 - - thumb_func_start ov17_02251EAC -ov17_02251EAC: ; 0x02251EAC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r1, #0x10] - str r1, [sp] - cmp r0, #0 - beq _02251EBC - b _02251FE2 -_02251EBC: - ldr r0, [sp] - mov r1, #0x14 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _02251ED0 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x14] - pop {r4, r5, r6, r7, pc} -_02251ED0: - ldr r0, [sp] - mov r1, #0x13 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _02251EE4 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x13] - pop {r4, r5, r6, r7, pc} -_02251EE4: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - ldr r0, [r0, #0] - mov r1, #2 - ldr r0, [r0, #0x30] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _02251F5C -_02251EFC: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - ldr r0, _02252000 ; =0x02254CF8 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _02251F56 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r0, [r0, #0x12] - mov r7, #0x3f - str r5, [sp, #4] - lsl r1, r0, #1 - ldr r0, _02252004 ; =0x02254D00 - lsl r7, r7, #0xa - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r0, r0, #5 - add r6, r1, r0 - b _02251F50 -_02251F2C: - mov r4, #0 - b _02251F44 -_02251F30: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_02251F44: - cmp r4, #8 - blt _02251F30 - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_02251F50: - ldr r0, [sp, #4] - cmp r0, #4 - blt _02251F2C -_02251F56: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_02251F5C: - ldr r0, [sp, #8] - cmp r0, #4 - blt _02251EFC - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _02251F9E - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _02251F9E - ldr r0, _02252000 ; =0x02254CF8 - sub r1, r1, #1 - ldrsb r0, [r0, r1] - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #0x3f - str r0, [sp, #4] - lsl r1, r1, #0xa - b _02251F98 -_02251F88: - ldr r0, [sp, #4] - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r1 - strh r0, [r3, r2] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_02251F98: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _02251F88 -_02251F9E: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _02251FFC - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _02251FFC - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_02251FE2: - add r0, r1, #0 - mov r2, #0 - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_02251FFC: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02252000: .word 0x02254CF8 -_02252004: .word 0x02254D00 - thumb_func_end ov17_02251EAC - - thumb_func_start ov17_02252008 -ov17_02252008: ; 0x02252008 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252008 - - thumb_func_start ov17_0225201C -ov17_0225201C: ; 0x0225201C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x18 - add r7, r1, #0 - add r1, r0, #0 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02252058 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _0225205C ; =ov17_02252060 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02252058: .word 0x00007530 -_0225205C: .word ov17_02252060 - thumb_func_end ov17_0225201C - - thumb_func_start ov17_02252060 -ov17_02252060: ; 0x02252060 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r1, #0x10] - str r1, [sp] - cmp r0, #0 - beq _02252070 - b _022521BE -_02252070: - ldr r0, [sp] - mov r1, #0x14 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _02252084 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x14] - pop {r4, r5, r6, r7, pc} -_02252084: - ldr r0, [sp] - mov r1, #0x13 - ldrsb r0, [r0, r1] - cmp r0, #0 - ble _02252098 - sub r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x13] - pop {r4, r5, r6, r7, pc} -_02252098: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - ldr r0, [r0, #0] - mov r1, #2 - ldr r0, [r0, #0x30] - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - str r0, [sp, #8] - b _02252118 -_022520B0: - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - mov r0, #4 - sub r1, r0, r1 - ldr r0, _022521DC ; =0x02254CF8 - ldrsb r1, [r0, r1] - ldr r0, [sp, #8] - add r0, r1, r0 - bmi _02252112 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - ldr r0, [sp] - mov r5, #0 - ldrb r1, [r0, #0x12] - mov r0, #0xb - mov r7, #0x3f - sub r0, r0, r1 - lsl r1, r0, #1 - ldr r0, _022521E0 ; =0x02254D00 - str r5, [sp, #4] - ldrh r1, [r0, r1] - ldr r0, [sp, #8] - lsl r7, r7, #0xa - lsl r0, r0, #5 - add r6, r1, r0 - b _0225210C -_022520E8: - mov r4, #0 - b _02252100 -_022520EC: - add r0, r5, r4 - lsl r2, r0, #1 - ldrh r0, [r3, r2] - and r0, r7 - strh r0, [r3, r2] - ldrh r1, [r3, r2] - add r0, r6, r4 - add r4, r4, #1 - orr r0, r1 - strh r0, [r3, r2] -_02252100: - cmp r4, #8 - blt _022520EC - ldr r0, [sp, #4] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #4] -_0225210C: - ldr r0, [sp, #4] - cmp r0, #4 - blt _022520E8 -_02252112: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_02252118: - ldr r0, [sp, #8] - cmp r0, #4 - blt _022520B0 - ldr r0, [sp] - mov r1, #0x11 - ldrsb r1, [r0, r1] - cmp r1, #0 - ble _0225217A - ldrb r0, [r0, #0x12] - cmp r0, #0 - bne _0225217A - mov r0, #5 - sub r1, r0, r1 - ldr r0, _022521DC ; =0x02254CF8 - mov r7, #0x3f - ldrsb r0, [r0, r1] - lsl r7, r7, #0xa - mov r6, #0x1d - add r0, r0, #3 - lsl r1, r0, #6 - mov r0, ip - add r3, r0, r1 - mov r0, #0 - mov r1, #2 - str r0, [sp, #4] - lsl r1, r1, #8 - b _02252174 -_0225214E: - ldr r0, [sp, #4] - ldr r5, [sp, #4] - lsl r4, r0, #1 - ldrh r0, [r3, r4] - lsl r5, r5, #0x1d - and r0, r7 - strh r0, [r3, r4] - ldr r0, [sp, #4] - ldrh r2, [r3, r4] - lsr r0, r0, #0x1f - sub r5, r5, r0 - ror r5, r6 - add r0, r0, r5 - add r0, r0, r1 - orr r0, r2 - strh r0, [r3, r4] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_02252174: - ldr r0, [sp, #4] - cmp r0, #0x20 - blt _0225214E -_0225217A: - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldr r0, [sp] - ldrb r0, [r0, #0x12] - add r1, r0, #1 - ldr r0, [sp] - strb r1, [r0, #0x12] - ldrb r0, [r0, #0x12] - cmp r0, #0xc - blo _022521D8 - ldr r1, [sp] - mov r0, #0 - mov r2, #0x11 - strb r0, [r1, #0x12] - ldrsb r1, [r1, r2] - add r3, r1, #1 - ldr r1, [sp] - strb r3, [r1, #0x11] - strb r0, [r1, #0x14] - add r0, r1, #0 - ldrsb r0, [r0, r2] - cmp r0, #5 - blo _022521D8 - add r0, r1, #0 - ldrb r0, [r0, #0x10] - add r1, r0, #1 - ldr r0, [sp] - add sp, #0xc - strb r1, [r0, #0x10] - pop {r4, r5, r6, r7, pc} -_022521BE: - add r0, r1, #0 - mov r2, #0 - ldr r0, [r0, #0xc] - add r1, r1, #4 - add r3, r2, #0 - bl ov17_0224F26C - ldr r0, [sp] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_022521D8: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022521DC: .word 0x02254CF8 -_022521E0: .word 0x02254D00 - thumb_func_end ov17_02252060 - - thumb_func_start ov17_022521E4 -ov17_022521E4: ; 0x022521E4 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_022521E4 - - thumb_func_start ov17_022521F8 -ov17_022521F8: ; 0x022521F8 - push {r4, lr} - ldr r3, _0225220C ; =0x0000127C - mov r4, #1 - strb r4, [r1, r3] - add r1, r2, #0 - mov r2, #0 - add r3, r2, #0 - bl ov17_0224F26C - pop {r4, pc} - ; .align 2, 0 -_0225220C: .word 0x0000127C - thumb_func_end ov17_022521F8 - - thumb_func_start ov17_02252210 -ov17_02252210: ; 0x02252210 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252210 - - thumb_func_start ov17_02252224 -ov17_02252224: ; 0x02252224 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - mov r0, #0x18 - mov r1, #0x20 - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - ldr r2, _02252284 ; =0x00007530 - str r0, [r4, #0] - ldrh r0, [r6] - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] - ldrb r0, [r5] - strb r0, [r4, #0x11] - ldrh r0, [r5, #8] - strh r0, [r4, #0x14] - ldrh r0, [r5, #0xa] - strh r0, [r4, #0x16] - ldrh r0, [r5, #0xc] - strh r0, [r4, #0x18] - ldrb r0, [r5, #0xe] - strb r0, [r4, #0x1a] - ldrb r0, [r5, #0x11] - strb r0, [r4, #0x1d] - ldrb r0, [r5, #0x10] - strb r0, [r4, #0x1c] - ldrb r0, [r5, #0xf] - strb r0, [r4, #0x1b] - ldr r0, _02252288 ; =ov17_0225228C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02252284: .word 0x00007530 -_02252288: .word ov17_0225228C - thumb_func_end ov17_02252224 - - thumb_func_start ov17_0225228C -ov17_0225228C: ; 0x0225228C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _022522A2 - cmp r0, #1 - beq _022522E0 - cmp r0, #2 - beq _022522F2 - b _0225232A -_022522A2: - ldrb r0, [r4, #0x1a] - cmp r0, #0 - beq _022522DA - ldrb r0, [r4, #0x1d] - cmp r0, #0 - bne _022522C6 - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x34 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x30] - bl sub_0201C3C0 -_022522C6: - ldrb r1, [r4, #0x1a] - add r2, r4, #0 - ldr r0, [r4, #0] - add r2, #0x14 - bl ov17_02250968 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022522DA: - mov r0, #0x64 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022522E0: - ldr r0, [r4, #0] - bl ov17_0225099C - cmp r0, #0 - bne _02252342 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022522F2: - ldrb r0, [r4, #0x12] - add r0, r0, #1 - strb r0, [r4, #0x12] - ldrb r0, [r4, #0x1c] - cmp r0, #1 - bne _02252306 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02252306: - ldrb r1, [r4, #0x12] - ldrb r0, [r4, #0x1b] - cmp r1, r0 - blo _02252342 - ldr r0, [r4, #0] - mov r1, #1 - add r0, #0x34 - bl sub_0200E084 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x30] - bl sub_0201C3C0 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_0225232A: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02252342: - pop {r3, r4, r5, pc} - thumb_func_end ov17_0225228C - - thumb_func_start ov17_02252344 -ov17_02252344: ; 0x02252344 - push {r3, lr} - mov r1, #0x9a - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252344 - - thumb_func_start ov17_02252358 -ov17_02252358: ; 0x02252358 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0xe7 - add r6, r1, #0 - lsl r0, r0, #2 - add r5, r2, #0 - add r2, r6, r0 - mov r1, #0x4d -_02252368: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _02252368 - mov r0, #0x18 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r6, [r4, #0] - ldrh r0, [r5] - mov r2, #0xfa - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - lsl r2, r2, #2 - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _022523A8 ; =ov17_022523AC - str r7, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022523A8: .word ov17_022523AC - thumb_func_end ov17_02252358 - - thumb_func_start ov17_022523AC -ov17_022523AC: ; 0x022523AC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #6 - bls _022523BC - b _022524E6 -_022523BC: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022523C8: ; jump table - .short _022523D6 - _022523C8 - 2 ; case 0 - .short _022523EA - _022523C8 - 2 ; case 1 - .short _022523FE - _022523C8 - 2 ; case 2 - .short _02252428 - _022523C8 - 2 ; case 3 - .short _0225243A - _022523C8 - 2 ; case 4 - .short _022524A6 - _022523C8 - 2 ; case 5 - .short _022524CE - _022523C8 - 2 ; case 6 -_022523D6: - ldr r1, [r4, #0] - ldr r0, _02252504 ; =0x00000848 - ldr r0, [r1, r0] - bl ov17_0223F744 - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_022523EA: - bl ov17_0223F760 - cmp r0, #1 - beq _022523F4 - b _022524FE -_022523F4: - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_022523FE: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, _02252508 ; =0x0000046F - mov r1, #0x1e - bl sub_020055D0 - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_02252428: - bl sub_0200F2AC - cmp r0, #1 - bne _022524FE - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_0225243A: - ldr r0, [r4, #0] - bl ov17_02250A84 - ldr r0, [r4, #0] - bl ov17_02250AD8 - ldr r0, [r4, #0] - bl ov17_02250B00 - ldr r0, [r4, #0] - bl ov17_02250D28 - ldr r0, [r4, #0] - bl ov17_02250CEC - ldr r0, [r4, #0] - mov r1, #0 - add r0, #0x34 - mov r2, #1 - mov r3, #0xe - bl sub_0200E060 - ldr r0, [r4, #0] - mov r1, #0xff - add r0, #0x34 - bl sub_0201ADA4 - ldr r0, [r4, #0] - add r0, #0x34 - bl sub_0201A954 - mov r6, #0 - add r5, r6, #0 - mov r7, #6 -_0225247E: - ldr r0, [r4, #0] - add r1, r7, #0 - add r0, r0, r5 - ldr r0, [r0, #0x18] - mov r2, #1 - bl sub_02007DEC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _0225247E - ldr r1, [r4, #0] - ldr r0, _0225250C ; =0x0000127F - mov r2, #1 - strb r2, [r1, r0] - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_022524A6: - bl sub_02005684 - cmp r0, #0 - bne _022524FE - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_022524CE: - bl sub_0200F2AC - cmp r0, #1 - bne _022524FE - ldr r0, _02252510 ; =0x0000049D - bl sub_0200549C - ldrb r0, [r4, #0x10] - add sp, #0xc - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, r7, pc} -_022524E6: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_022524FE: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02252504: .word 0x00000848 -_02252508: .word 0x0000046F -_0225250C: .word 0x0000127F -_02252510: .word 0x0000049D - thumb_func_end ov17_022523AC - - thumb_func_start ov17_02252514 -ov17_02252514: ; 0x02252514 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252514 - - thumb_func_start ov17_02252528 -ov17_02252528: ; 0x02252528 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x18 - str r1, [sp] - add r1, r0, #0 - add r6, r2, #0 - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x18 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp] - mov r2, #0 - str r0, [r4, #0] - ldrh r0, [r6] - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - str r7, [r4, #0xc] -_0225255C: - add r0, r5, r2 - ldrb r1, [r0, #3] - add r0, r4, r2 - add r2, r2, #1 - strb r1, [r0, #0x11] - cmp r2, #4 - blt _0225255C - ldr r0, _02252578 ; =ov17_02252580 - ldr r2, _0225257C ; =0x00007530 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02252578: .word ov17_02252580 -_0225257C: .word 0x00007530 - thumb_func_end ov17_02252528 - - thumb_func_start ov17_02252580 -ov17_02252580: ; 0x02252580 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #4 - bhi _022525F2 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02252598: ; jump table - .short _022525A2 - _02252598 - 2 ; case 0 - .short _022525A8 - _02252598 - 2 ; case 1 - .short _022525C6 - _02252598 - 2 ; case 2 - .short _022525E0 - _02252598 - 2 ; case 3 - .short _022525F2 - _02252598 - 2 ; case 4 -_022525A2: - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022525A8: - ldrb r1, [r4, #0x15] - mov r0, #3 - sub r2, r0, r1 - add r1, r4, r2 - ldrb r1, [r1, #0x11] - ldr r0, [r4, #0] - bl ov17_0225131C - ldrb r0, [r4, #0x15] - add r0, r0, #1 - strb r0, [r4, #0x15] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022525C6: - mov r0, #0x16 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x16] - ldrsh r0, [r4, r0] - cmp r0, #0x1e - ble _0225260A - mov r0, #0 - strh r0, [r4, #0x16] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022525E0: - ldrb r1, [r4, #0x15] - cmp r1, #4 - bhs _022525EC - mov r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022525EC: - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022525F2: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0225260A: - pop {r3, r4, r5, pc} - thumb_func_end ov17_02252580 - - thumb_func_start ov17_0225260C -ov17_0225260C: ; 0x0225260C - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_0225260C - - thumb_func_start ov17_02252620 -ov17_02252620: ; 0x02252620 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x18 - add r7, r1, #0 - add r1, r0, #0 - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x18 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _02252664 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r6, [r4, #0xc] - ldrb r0, [r0, #2] - strb r0, [r4, #0x11] - ldr r0, _02252668 ; =ov17_0225266C - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02252664: .word 0x00007530 -_02252668: .word ov17_0225266C - thumb_func_end ov17_02252620 - - thumb_func_start ov17_0225266C -ov17_0225266C: ; 0x0225266C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #6 - bhi _02252774 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02252686: ; jump table - .short _02252694 - _02252686 - 2 ; case 0 - .short _022526BC - _02252686 - 2 ; case 1 - .short _022526CA - _02252686 - 2 ; case 2 - .short _022526E2 - _02252686 - 2 ; case 3 - .short _022526F0 - _02252686 - 2 ; case 4 - .short _02252746 - _02252686 - 2 ; case 5 - .short _02252758 - _02252686 - 2 ; case 6 -_02252694: - ldr r0, [r4, #0] - bl ov17_02250FE4 - add r2, r4, #0 - ldr r0, [r4, #0] - mov r1, #0 - add r2, #0x12 - bl ov17_02251598 - ldr r0, _02252790 ; =0x0000049E - bl sub_0200549C - ldr r0, _02252794 ; =0x000006E5 - bl sub_02005748 - ldrb r0, [r4, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_022526BC: - ldrb r1, [r4, #0x12] - cmp r1, #1 - bne _0225278C - add r0, r0, #1 - add sp, #0x10 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_022526CA: - ldrb r1, [r4, #0x11] - add r3, r4, #0 - ldr r0, [r4, #0] - mov r2, #0 - add r3, #0x13 - bl ov17_02251718 - ldrb r0, [r4, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_022526E2: - ldrb r1, [r4, #0x13] - cmp r1, #1 - bne _0225278C - add r0, r0, #1 - add sp, #0x10 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_022526F0: - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0x10] - ldrb r0, [r4, #0x11] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #5 - bl sub_02074470 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r2, #0 - ldr r1, [r0, #0x10] - ldrb r0, [r4, #0x11] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x70 - bl sub_02074470 - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r2, #0x7f - str r2, [sp, #4] - str r1, [sp, #8] - mov r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - ldrb r6, [r4, #0x11] - ldr r0, [r0, #0] - add r2, #0xdd - lsl r6, r6, #2 - add r0, r0, r6 - ldr r0, [r0, r2] - lsl r2, r5, #0x10 - lsr r2, r2, #0x10 - bl sub_02077D3C - ldrb r0, [r4, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_02252746: - bl sub_0200598C - cmp r0, #0 - bne _0225278C - ldrb r0, [r4, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_02252758: - mov r0, #0x14 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x14] - ldrsh r0, [r4, r0] - cmp r0, #0x3c - ble _0225278C - mov r0, #0 - strh r0, [r4, #0x14] - ldrb r0, [r4, #0x10] - add sp, #0x10 - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_02252774: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_0225278C: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02252790: .word 0x0000049E -_02252794: .word 0x000006E5 - thumb_func_end ov17_0225266C - - thumb_func_start ov17_02252798 -ov17_02252798: ; 0x02252798 - push {r3, lr} - mov r1, #0x12 - lsl r2, r2, #0x10 - str r1, [sp] - mov r1, #0xff - lsr r2, r2, #0x10 - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252798 - - thumb_func_start ov17_022527AC -ov17_022527AC: ; 0x022527AC - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r5, r1, #0 - mov r0, #0x18 - mov r1, #0x24 - add r6, r2, #0 - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x24 - bl sub_020C4CF4 - str r5, [r4, #0] - ldrh r0, [r6] - strh r0, [r4, #4] - ldrh r0, [r6, #2] - strh r0, [r4, #6] - ldrh r0, [r6, #4] - strh r0, [r4, #8] - ldrh r0, [r6, #6] - strh r0, [r4, #0xa] - ldr r0, [sp] - str r0, [r4, #0xc] - ldrb r0, [r7, #7] - strb r0, [r4, #0x11] - ldrb r0, [r7, #7] - cmp r0, #0 - beq _022527F2 - cmp r0, #1 - beq _02252808 - cmp r0, #2 - beq _0225281E - b _02252834 -_022527F2: - ldr r0, _02252844 ; =0x0000041E - mov r2, #0 - add r3, r4, #0 -_022527F8: - ldrsh r1, [r5, r0] - add r2, r2, #1 - add r5, r5, #2 - strh r1, [r3, #0x14] - add r3, r3, #2 - cmp r2, #4 - blt _022527F8 - b _02252838 -_02252808: - ldr r0, _02252848 ; =0x00000426 - mov r3, #0 - add r2, r4, #0 -_0225280E: - ldrsh r1, [r5, r0] - add r3, r3, #1 - add r5, r5, #2 - strh r1, [r2, #0x14] - add r2, r2, #2 - cmp r3, #4 - blt _0225280E - b _02252838 -_0225281E: - ldr r0, _0225284C ; =0x0000042E - mov r3, #0 - add r2, r4, #0 -_02252824: - ldrsh r1, [r5, r0] - add r3, r3, #1 - add r5, r5, #2 - strh r1, [r2, #0x14] - add r2, r2, #2 - cmp r3, #4 - blt _02252824 - b _02252838 -_02252834: - bl sub_02022974 -_02252838: - ldr r0, _02252850 ; =ov17_02252858 - ldr r2, _02252854 ; =0x00007530 - add r1, r4, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02252844: .word 0x0000041E -_02252848: .word 0x00000426 -_0225284C: .word 0x0000042E -_02252850: .word ov17_02252858 -_02252854: .word 0x00007530 - thumb_func_end ov17_022527AC - - thumb_func_start ov17_02252858 -ov17_02252858: ; 0x02252858 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #5 - bhi _02252948 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02252870: ; jump table - .short _0225287C - _02252870 - 2 ; case 0 - .short _0225288A - _02252870 - 2 ; case 1 - .short _022528A4 - _02252870 - 2 ; case 2 - .short _022528C6 - _02252870 - 2 ; case 3 - .short _0225291C - _02252870 - 2 ; case 4 - .short _02252948 - _02252870 - 2 ; case 5 -_0225287C: - ldr r0, _02252964 ; =0x000006FA - bl sub_02005748 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0225288A: - mov r0, #0x12 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x12] - ldrsh r0, [r4, r0] - cmp r0, #0x2d - ble _02252960 - mov r0, #0 - strh r0, [r4, #0x12] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_022528A4: - mov r2, #0 - add r3, r4, #0 - mov r0, #0x14 -_022528AA: - ldrsh r1, [r3, r0] - cmp r1, #0 - ble _022528B8 - ldr r0, _02252968 ; =0x000006FB - bl sub_02005748 - b _022528C0 -_022528B8: - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #4 - blt _022528AA -_022528C0: - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] -_022528C6: - mov r0, #0x12 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x12] - ldrsh r0, [r4, r0] - cmp r0, #1 - blt _02252960 - mov r6, #0 - strh r6, [r4, #0x12] - add r5, r6, #0 - mov r7, #0x14 -_022528DC: - ldr r0, [r4, #0] - mov r2, #0x1c - add r1, r0, r5 - mov r0, #0xf3 - lsl r0, r0, #2 - ldrb r1, [r1, r0] - lsl r0, r1, #1 - add r0, r4, r0 - ldrsh r2, [r0, r2] - add r2, r2, #1 - strh r2, [r0, #0x1c] - mov r2, #0x1c - ldrsh r3, [r0, r2] - ldrsh r0, [r0, r7] - cmp r3, r0 - bgt _02252908 - str r5, [sp] - ldrb r2, [r4, #0x11] - ldr r0, [r4, #0] - bl ov17_022513F4 - b _0225290A -_02252908: - add r6, r6, #1 -_0225290A: - add r5, r5, #1 - cmp r5, #4 - blt _022528DC - cmp r6, #4 - blt _02252960 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_0225291C: - mov r3, #0 - add r2, r4, #0 - mov r0, #0x14 -_02252922: - ldrsh r1, [r2, r0] - cmp r1, #0 - ble _02252930 - ldr r0, _0225296C ; =0x000006F9 - bl sub_02005748 - b _02252938 -_02252930: - add r3, r3, #1 - add r2, r2, #2 - cmp r3, #4 - blt _02252922 -_02252938: - ldr r0, _02252964 ; =0x000006FA - mov r1, #0 - bl sub_020057A4 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_02252948: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02252960: - pop {r3, r4, r5, r6, r7, pc} - nop -_02252964: .word 0x000006FA -_02252968: .word 0x000006FB -_0225296C: .word 0x000006F9 - thumb_func_end ov17_02252858 - - thumb_func_start ov17_02252970 -ov17_02252970: ; 0x02252970 - push {r3, lr} - lsl r2, r2, #0x10 - mov r3, #0 - mov r1, #0xff - lsr r2, r2, #0x10 - str r3, [sp] - bl ov17_0224F1F8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252970 - - thumb_func_start ov17_02252984 -ov17_02252984: ; 0x02252984 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #0x18 - mov r1, #0x14 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r7, [r4, #0] - ldrh r0, [r5] - ldr r2, _022529C0 ; =0x00007530 - add r1, r4, #0 - strh r0, [r4, #4] - ldrh r0, [r5, #2] - strh r0, [r4, #6] - ldrh r0, [r5, #4] - strh r0, [r4, #8] - ldrh r0, [r5, #6] - strh r0, [r4, #0xa] - ldr r0, _022529C4 ; =ov17_022529C8 - str r6, [r4, #0xc] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022529C0: .word 0x00007530 -_022529C4: .word ov17_022529C8 - thumb_func_end ov17_02252984 - - thumb_func_start ov17_022529C8 -ov17_022529C8: ; 0x022529C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x10] - cmp r0, #0 - beq _022529DE - cmp r0, #1 - beq _022529FE - cmp r0, #2 - beq _02252A2E - b _02252A48 -_022529DE: - mov r0, #3 - str r0, [sp] - mov r0, #0x5a - mov r1, #0x10 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, _02252A64 ; =0x0000049E - mov r1, #0x5a - bl sub_020055D0 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_022529FE: - mov r0, #3 - bl sub_0200AC1C - cmp r0, #1 - bne _02252A60 - bl sub_02005684 - cmp r0, #0 - bne _02252A60 - ldr r0, [r4, #0] - bl ov17_02251020 - ldr r0, _02252A68 ; =0x0400006C - mov r1, #0x10 - bl sub_020BDEC4 - ldr r0, _02252A6C ; =0x0400106C - mov r1, #0x10 - bl sub_020BDEC4 - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02252A2E: - mov r0, #0x12 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, #0x12] - ldrsh r0, [r4, r0] - cmp r0, #0x3c - ble _02252A60 - mov r0, #0 - strh r0, [r4, #0x12] - ldrb r0, [r4, #0x10] - add r0, r0, #1 - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_02252A48: - mov r2, #0 - ldr r0, [r4, #0xc] - add r1, r4, #4 - add r3, r2, #0 - bl ov17_0224F26C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02252A60: - pop {r3, r4, r5, pc} - nop -_02252A64: .word 0x0000049E -_02252A68: .word 0x0400006C -_02252A6C: .word 0x0400106C - thumb_func_end ov17_022529C8 - - thumb_func_start ov17_02252A70 -ov17_02252A70: ; 0x02252A70 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r5, r0, #0 - add r7, r1, #0 - add r4, r6, #0 -_02252A7A: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202A488 - cmp r0, #1 - bne _02252A92 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202A580 - ldrb r0, [r7, r0] - add r6, r6, r0 -_02252A92: - add r4, r4, #1 - cmp r4, #0x14 - blt _02252A7A - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov17_02252A70 - - thumb_func_start ov17_02252A9C -ov17_02252A9C: ; 0x02252A9C - push {r3, lr} - add r3, r0, #0 - mov r2, #0 - mov r0, #0x5a - add r1, r1, #3 - str r2, [sp] - bl sub_02006FE8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov17_02252A9C - - thumb_func_start ov17_02252AB0 -ov17_02252AB0: ; 0x02252AB0 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0x1b - str r0, [sp] - mov r0, #0x50 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, [sp, #0x28] - add r4, r1, #0 - add r6, r3, #0 - str r0, [sp, #0x14] - add r0, r2, #0 - mov r1, #3 - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200CD7C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x1b - mov r3, #0xfa - str r6, [sp, #8] - bl sub_0200CBDC - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x2c] - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0xfb - bl sub_0200CE0C - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x30] - add r1, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1b - mov r3, #0xfc - bl sub_0200CE3C - add sp, #0x18 - pop {r4, r5, r6, pc} - thumb_func_end ov17_02252AB0 - - thumb_func_start ov17_02252B20 -ov17_02252B20: ; 0x02252B20 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0200D070 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D080 - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200D090 - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl sub_0200D0A0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02252B20 - - thumb_func_start ov17_02252B48 -ov17_02252B48: ; 0x02252B48 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r3, #0 - mov ip, r2 - ldr r3, _02252BC0 ; =0x02254D9C - add r6, r0, #0 - add r7, r1, #0 - add r2, sp, #4 - mov r4, #6 -_02252B5A: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r4, r4, #1 - bne _02252B5A - ldr r0, [r3, #0] - mov r1, #0x18 - str r0, [r2, #0] - ldr r0, [sp, #0x50] - str r5, [sp, #0x18] - str r0, [sp, #0x1c] - ldr r0, [sp, #0x54] - str r0, [sp, #0x20] - ldr r0, [sp, #0x58] - str r0, [sp, #0x24] - ldr r0, [sp, #0x5c] - str r0, [sp, #0xc] - ldr r0, [sp, #0x60] - str r0, [sp, #0x30] - mov r0, ip - bl sub_02018144 - mov r1, #0 - mov r2, #0x18 - str r0, [sp] - bl sub_020C4CF4 - ldr r5, [sp] - mov r4, #0 -_02252B92: - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #4 - bl sub_0200CE6C - mov r1, #0 - stmia r5!, {r0} - bl sub_0200D3F4 - add r4, r4, #1 - cmp r4, #5 - blt _02252B92 - ldr r0, _02252BC4 ; =ov17_02252CB8 - ldr r1, [sp] - ldr r2, _02252BC8 ; =0x00009C40 - bl sub_0200D9E8 - ldr r1, [sp] - str r0, [r1, #0x14] - add r0, r1, #0 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02252BC0: .word 0x02254D9C -_02252BC4: .word ov17_02252CB8 -_02252BC8: .word 0x00009C40 - thumb_func_end ov17_02252B48 - - thumb_func_start ov17_02252BCC -ov17_02252BCC: ; 0x02252BCC - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02252BD4: - ldr r0, [r5, #0] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _02252BD4 - ldr r0, [r6, #0x14] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov17_02252BCC - - thumb_func_start ov17_02252BF0 -ov17_02252BF0: ; 0x02252BF0 - push {r4, r5, r6, lr} - add r5, r0, #0 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r4, [sp, #0x24] - add r6, r3, #0 - ldr r0, [r5, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r2, [sp, #0x10] - lsl r1, r6, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #4] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x18] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #8] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, #0xc] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - add r3, r4, #0 - bl sub_0200D500 - ldr r0, [r5, #0] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r5, #8] - mov r1, #2 - bl sub_0200D364 - ldr r0, [r5, #0xc] - mov r1, #3 - bl sub_0200D364 - mov r4, #0 - mov r6, #1 -_02252C66: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02252C66 - pop {r4, r5, r6, pc} - thumb_func_end ov17_02252BF0 - - thumb_func_start ov17_02252C78 -ov17_02252C78: ; 0x02252C78 - push {r4, lr} - sub sp, #0x18 - add r4, r2, #0 - str r3, [sp] - ldr r2, [sp, #0x20] - str r1, [sp, #4] - str r2, [sp, #8] - str r4, [sp, #0xc] - str r2, [sp, #0x10] - ldr r2, [sp, #0x24] - str r2, [sp, #0x14] - add r2, r3, #0 - add r3, r4, #0 - bl ov17_02252BF0 - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov17_02252C78 - - thumb_func_start ov17_02252C9C -ov17_02252C9C: ; 0x02252C9C - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_02252CA4: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _02252CA4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02252C9C - - thumb_func_start ov17_02252CB8 -ov17_02252CB8: ; 0x02252CB8 - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r0, [r6, #0] - bl sub_0200D408 - cmp r0, #0 - beq _02252CE8 - mov r4, #0 - add r5, r6, #0 -_02252CCA: - ldr r0, [r5, #0] - bl sub_0200D330 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02252CCA - ldr r0, [r6, #0x10] - bl sub_0200D408 - cmp r0, #1 - bne _02252CE8 - ldr r0, [r6, #0x10] - bl sub_0200D330 -_02252CE8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov17_02252CB8 - - thumb_func_start ov17_02252CEC -ov17_02252CEC: ; 0x02252CEC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x17 - lsl r0, r0, #4 - add r6, r1, #0 - ldrb r1, [r3, r0] - str r2, [sp] - cmp r1, #0 - bne _02252D08 - sub r0, r0, #4 - ldr r1, [r3, r0] - ldr r0, _02252D6C ; =0x000004FC - add r4, r1, r0 - b _02252D3A -_02252D08: - cmp r1, #1 - bne _02252D16 - sub r0, r0, #4 - ldr r1, [r3, r0] - ldr r0, _02252D70 ; =0x00001174 - add r4, r1, r0 - b _02252D3A -_02252D16: - cmp r1, #2 - bne _02252D26 - sub r0, r0, #4 - ldr r1, [r3, r0] - mov r0, #0xc3 - lsl r0, r0, #4 - add r4, r1, r0 - b _02252D3A -_02252D26: - cmp r1, #3 - bne _02252D34 - sub r0, r0, #4 - ldr r1, [r3, r0] - ldr r0, _02252D74 ; =0x0000085C - add r4, r1, r0 - b _02252D3A -_02252D34: - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} -_02252D3A: - mov r0, #2 - lsl r0, r0, #8 - cmp r6, r0 - ble _02252D46 - bl sub_02022974 -_02252D46: - ldr r0, _02252D78 ; =0x00000A11 - add r7, r4, r0 - ldrb r0, [r7, r5] - cmp r0, #0 - beq _02252D54 - bl sub_02022974 -_02252D54: - mov r1, #0x21 - lsl r1, r1, #4 - add r2, r4, r1 - lsl r1, r5, #9 - add r1, r2, r1 - ldr r0, [sp] - add r2, r6, #0 - bl sub_020C4DB0 - mov r0, #1 - strb r0, [r7, r5] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02252D6C: .word 0x000004FC -_02252D70: .word 0x00001174 -_02252D74: .word 0x0000085C -_02252D78: .word 0x00000A11 - thumb_func_end ov17_02252CEC - - thumb_func_start ov17_02252D7C -ov17_02252D7C: ; 0x02252D7C - mov r0, #0x5b - lsl r0, r0, #2 - ldr r0, [r3, r0] - ldr r3, _02252D88 ; =ov17_0224B20C - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_02252D88: .word ov17_0224B20C - thumb_func_end ov17_02252D7C - ; 0x02252D8C - - - .rodata - .incbin "incbin/overlay17_rodata.bin" - - .section .sinit, 4 - .word ov17_0223F118 - - .bss - .space 0x0 diff --git a/asm/overlay19.s b/asm/overlay19.s deleted file mode 100644 index 0ceb4d667..000000000 --- a/asm/overlay19.s +++ /dev/null @@ -1,31369 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov19_021D0D80 -ov19_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - mov r2, #1 - add r5, r0, #0 - mov r0, #3 - mov r1, #9 - lsl r2, r2, #0xe - bl sub_02017FC8 - mov r2, #0xf - mov r0, #3 - mov r1, #0xa - lsl r2, r2, #0xe - bl sub_02017FC8 - mov r1, #0x87 - add r0, r5, #0 - lsl r1, r1, #2 - mov r2, #9 - bl sub_0200681C - add r4, r0, #0 - beq _021D0DE4 - add r0, r5, #0 - bl sub_02006840 - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D4BE0 - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, #0 - add r2, r4, #0 - bl ov19_021D61B0 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - bl ov19_021D0ECC - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, _021D0DE8 ; =ov19_021D0F20 - add r0, r4, #0 - bl ov19_021D0EB0 -_021D0DE4: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D0DE8: .word ov19_021D0F20 - thumb_func_end ov19_021D0D80 - - thumb_func_start ov19_021D0DEC -ov19_021D0DEC: ; 0x021D0DEC - push {r4, lr} - bl sub_0200682C - mov r1, #0x6b - add r4, r0, #0 - lsl r1, r1, #2 - ldr r2, [r4, r1] - cmp r2, #0 - beq _021D0E08 - add r1, #8 - add r1, r4, r1 - blx r2 - mov r0, #0 - pop {r4, pc} -_021D0E08: - sub r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D0E4A - ldr r0, _021D0E54 ; =0x021BF67C - ldr r2, [r0, #0x48] - mov r0, #2 - lsl r0, r0, #0xa - tst r0, r2 - beq _021D0E3E - sub r1, #0x98 - ldr r0, [r4, r1] - bl ov19_021D6628 - cmp r0, #1 - bne _021D0E3E - add r0, r4, #0 - bl ov19_021D5DD8 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x2b - bl ov19_021D6594 - mov r0, #0 - pop {r4, pc} -_021D0E3E: - mov r1, #0x6a - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r4, #0 - blx r1 - pop {r4, pc} -_021D0E4A: - bl sub_02022974 - mov r0, #1 - pop {r4, pc} - nop -_021D0E54: .word 0x021BF67C - thumb_func_end ov19_021D0DEC - - thumb_func_start ov19_021D0E58 -ov19_021D0E58: ; 0x021D0E58 - push {r4, lr} - bl sub_0200682C - mov r1, #0x49 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0x95 - bl sub_0207A230 - cmp r0, #0 - bne _021D0E7E - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0202CC98 - bl sub_0202CCA8 -_021D0E7E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D64A0 - add r0, r4, #0 - bl ov19_021D4D58 - mov r0, #9 - bl sub_0201807C - mov r0, #0xa - bl sub_0201807C - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D0E58 - - thumb_func_start ov19_021D0EA0 -ov19_021D0EA0: ; 0x021D0EA0 - mov r2, #0x6a - lsl r2, r2, #2 - str r1, [r0, r2] - mov r1, #0 - add r2, #8 - str r1, [r0, r2] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D0EA0 - - thumb_func_start ov19_021D0EB0 -ov19_021D0EB0: ; 0x021D0EB0 - mov r2, #0x6b - lsl r2, r2, #2 - str r1, [r0, r2] - mov r1, #0 - add r2, #8 - str r1, [r0, r2] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D0EB0 - - thumb_func_start ov19_021D0EC0 -ov19_021D0EC0: ; 0x021D0EC0 - mov r1, #0x6b - mov r2, #0 - lsl r1, r1, #2 - str r2, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D0EC0 - - thumb_func_start ov19_021D0ECC -ov19_021D0ECC: ; 0x021D0ECC - push {r3, lr} - bl ov19_021D5E10 - cmp r0, #4 - bhi _021D0EEC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D0EE2: ; jump table - .short _021D0EEC - _021D0EE2 - 2 ; case 0 - .short _021D0EF0 - _021D0EE2 - 2 ; case 1 - .short _021D0EF4 - _021D0EE2 - 2 ; case 2 - .short _021D0EFC - _021D0EE2 - 2 ; case 3 - .short _021D0EF8 - _021D0EE2 - 2 ; case 4 -_021D0EEC: - ldr r0, _021D0F00 ; =ov19_021D0FF0 - pop {r3, pc} -_021D0EF0: - ldr r0, _021D0F04 ; =ov19_021D1270 - pop {r3, pc} -_021D0EF4: - ldr r0, _021D0F08 ; =ov19_021D15C0 - pop {r3, pc} -_021D0EF8: - ldr r0, _021D0F0C ; =ov19_021D17AC - pop {r3, pc} -_021D0EFC: - ldr r0, _021D0F10 ; =ov19_021D19B8 - pop {r3, pc} - ; .align 2, 0 -_021D0F00: .word ov19_021D0FF0 -_021D0F04: .word ov19_021D1270 -_021D0F08: .word ov19_021D15C0 -_021D0F0C: .word ov19_021D17AC -_021D0F10: .word ov19_021D19B8 - thumb_func_end ov19_021D0ECC - - thumb_func_start ov19_021D0F14 -ov19_021D0F14: ; 0x021D0F14 - mov r1, #0x46 - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r2, #1 - str r2, [r0, #8] - bx lr - thumb_func_end ov19_021D0F14 - - thumb_func_start ov19_021D0F20 -ov19_021D0F20: ; 0x021D0F20 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D0F36 - cmp r0, #1 - beq _021D0F4A - cmp r0, #2 - beq _021D0F6E - pop {r3, r4, r5, pc} -_021D0F36: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D0F4A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl ov19_021D6600 - cmp r0, #0 - beq _021D0F84 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D0F6E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl ov19_021D6600 - cmp r0, #0 - beq _021D0F84 - add r0, r5, #0 - bl ov19_021D0EC0 -_021D0F84: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D0F20 - - thumb_func_start ov19_021D0F88 -ov19_021D0F88: ; 0x021D0F88 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D0F9E - cmp r0, #1 - beq _021D0FB2 - cmp r0, #2 - beq _021D0FD6 - pop {r3, r4, r5, pc} -_021D0F9E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D0FB2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl ov19_021D6600 - cmp r0, #0 - beq _021D0FEC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D0FD6: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - bl ov19_021D6600 - cmp r0, #0 - beq _021D0FEC - add r0, r5, #0 - bl ov19_021D0EC0 -_021D0FEC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D0F88 - - thumb_func_start ov19_021D0FF0 -ov19_021D0FF0: ; 0x021D0FF0 - push {r4, lr} - mov r1, #0x1b - add r4, r0, #0 - lsl r1, r1, #4 - ldr r2, [r4, r1] - cmp r2, #0 - beq _021D100C - cmp r2, #1 - bne _021D1004 - b _021D11DE -_021D1004: - cmp r2, #2 - bne _021D100A - b _021D11FC -_021D100A: - b _021D1210 -_021D100C: - ldr r1, _021D1214 ; =0x021BF67C - ldr r2, [r1, #0x48] - mov r1, #1 - tst r1, r2 - beq _021D103C - bl ov19_021D5E4C - cmp r0, #0 - beq _021D103C - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D1032 - ldr r1, _021D1218 ; =ov19_021D20A4 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1210 -_021D1032: - ldr r1, _021D121C ; =ov19_021D2308 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1210 -_021D103C: - ldr r0, _021D1214 ; =0x021BF67C - mov r2, #2 - ldr r1, [r0, #0x48] - tst r1, r2 - beq _021D1050 - ldr r1, _021D1220 ; =ov19_021D1F5C - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1210 -_021D1050: - ldr r0, [r0, #0x44] - lsl r1, r2, #8 - tst r1, r0 - beq _021D1068 - add r0, r4, #0 - bl ov19_021D5CE8 - ldr r1, _021D1224 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1210 -_021D1068: - add r2, #0xfe - add r1, r0, #0 - tst r1, r2 - beq _021D1080 - add r0, r4, #0 - bl ov19_021D5CBC - ldr r1, _021D1224 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1210 -_021D1080: - add r1, r4, #0 - bl ov19_021D4F74 - cmp r0, #0 - beq _021D10B8 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D10AC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D10AC: - mov r0, #0x1b - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _021D1210 -_021D10B8: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D10DA - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D1102 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D10DC - cmp r0, #1 - beq _021D10E6 -_021D10DA: - b _021D11CE -_021D10DC: - ldr r1, _021D1228 ; =ov19_021D4640 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D11CE -_021D10E6: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D10FA - ldr r1, _021D122C ; =ov19_021D4938 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D11CE -_021D10FA: - ldr r0, _021D1230 ; =0x000005F3 - bl sub_02005748 - b _021D11CE -_021D1102: - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D1116 - cmp r0, #1 - beq _021D1164 - cmp r0, #2 - beq _021D11B2 - b _021D11CE -_021D1116: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #0 - bne _021D115C - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D115C - ldr r0, _021D1234 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #1 - b _021D11D0 -_021D115C: - ldr r0, _021D1230 ; =0x000005F3 - bl sub_02005748 - b _021D11CE -_021D1164: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #1 - bne _021D11AA - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D11AA - ldr r0, _021D1234 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #1 - b _021D11D0 -_021D11AA: - ldr r0, _021D1230 ; =0x000005F3 - bl sub_02005748 - b _021D11CE -_021D11B2: - ldr r0, _021D1234 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B80 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x32 - bl ov19_021D6594 - mov r0, #1 - b _021D11D0 -_021D11CE: - mov r0, #0 -_021D11D0: - cmp r0, #0 - beq _021D1210 - mov r0, #0x1b - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1210 -_021D11DE: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1210 - add r0, r4, #0 - bl ov19_021D0ECC - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D0EA0 - b _021D1210 -_021D11FC: - sub r1, #0x9c - ldr r0, [r4, r1] - bl ov19_021D6628 - cmp r0, #0 - beq _021D1210 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] -_021D1210: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D1214: .word 0x021BF67C -_021D1218: .word ov19_021D20A4 -_021D121C: .word ov19_021D2308 -_021D1220: .word ov19_021D1F5C -_021D1224: .word ov19_021D45A8 -_021D1228: .word ov19_021D4640 -_021D122C: .word ov19_021D4938 -_021D1230: .word 0x000005F3 -_021D1234: .word 0x000005DD - thumb_func_end ov19_021D0FF0 - - thumb_func_start ov19_021D1238 -ov19_021D1238: ; 0x021D1238 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov19_021D5E74 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _021D1256 - mov r0, #0x1e - str r0, [r4, #0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D1256: - add r0, r5, #0 - mov r1, #0xa2 - mov r2, #0 - bl ov19_021D5FD0 - cmp r0, #0 - beq _021D126C - mov r0, #0x1d - str r0, [r4, #0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D126C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D1238 - - thumb_func_start ov19_021D1270 -ov19_021D1270: ; 0x021D1270 - push {r3, r4, lr} - sub sp, #4 - mov r1, #0x1b - add r4, r0, #0 - lsl r1, r1, #4 - ldr r2, [r4, r1] - cmp r2, #6 - bhi _021D12C0 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D128C: ; jump table - .short _021D129A - _021D128C - 2 ; case 0 - .short _021D1474 - _021D128C - 2 ; case 1 - .short _021D148E - _021D128C - 2 ; case 2 - .short _021D14F8 - _021D128C - 2 ; case 3 - .short _021D1538 - _021D128C - 2 ; case 4 - .short _021D1556 - _021D128C - 2 ; case 5 - .short _021D15A4 - _021D128C - 2 ; case 6 -_021D129A: - ldr r1, _021D1584 ; =0x021BF67C - mov r2, #1 - ldr r1, [r1, #0x48] - tst r2, r1 - beq _021D12E0 - bl ov19_021D5E2C - cmp r0, #6 - bne _021D12B6 - mov r0, #0x1b - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D12B6: - add r0, r4, #0 - bl ov19_021D5E4C - cmp r0, #0 - bne _021D12C2 -_021D12C0: - b _021D15B8 -_021D12C2: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D12D6 - ldr r1, _021D1588 ; =ov19_021D20A4 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D15B8 -_021D12D6: - ldr r1, _021D158C ; =ov19_021D2308 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D15B8 -_021D12E0: - mov r2, #2 - tst r2, r1 - bne _021D130A - mov r2, #0x10 - tst r1, r2 - beq _021D12F6 - bl ov19_021D5E2C - mov r1, #1 - tst r0, r1 - bne _021D130A -_021D12F6: - ldr r0, _021D1584 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x10 - tst r0, r1 - beq _021D1314 - add r0, r4, #0 - bl ov19_021D5E2C - cmp r0, #6 - bne _021D1314 -_021D130A: - mov r0, #0x1b - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D1314: - ldr r0, _021D1584 ; =0x021BF67C - add r1, r4, #0 - ldr r0, [r0, #0x44] - bl ov19_021D4F74 - cmp r0, #0 - beq _021D134E - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D1344 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D1344: - mov r0, #0x1b - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D134E: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D1370 - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D1398 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D1372 - cmp r0, #1 - beq _021D137C -_021D1370: - b _021D1464 -_021D1372: - ldr r1, _021D1590 ; =ov19_021D4640 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1464 -_021D137C: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D1390 - ldr r1, _021D1594 ; =ov19_021D4938 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1464 -_021D1390: - ldr r0, _021D1598 ; =0x000005F3 - bl sub_02005748 - b _021D1464 -_021D1398: - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D13AC - cmp r0, #1 - beq _021D13FA - cmp r0, #2 - beq _021D1448 - b _021D1464 -_021D13AC: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #0 - bne _021D13F2 - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D13F2 - ldr r0, _021D159C ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #1 - b _021D1466 -_021D13F2: - ldr r0, _021D1598 ; =0x000005F3 - bl sub_02005748 - b _021D1464 -_021D13FA: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #1 - bne _021D1440 - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D1440 - ldr r0, _021D159C ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #1 - b _021D1466 -_021D1440: - ldr r0, _021D1598 ; =0x000005F3 - bl sub_02005748 - b _021D1464 -_021D1448: - ldr r0, _021D159C ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B80 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x32 - bl ov19_021D6594 - mov r0, #1 - b _021D1466 -_021D1464: - mov r0, #0 -_021D1466: - cmp r0, #0 - beq _021D1482 - mov r0, #0x1b - mov r1, #6 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D1474: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - bne _021D1484 -_021D1482: - b _021D15B8 -_021D1484: - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D148E: - bl ov19_021D5E08 - cmp r0, #0 - bne _021D14A8 - ldr r1, _021D15A0 ; =ov19_021D1F5C - add r0, r4, #0 - bl ov19_021D0EB0 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D14A8: - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - beq _021D14E2 - add r0, r4, #0 - add r1, sp, #0 - bl ov19_021D1238 - cmp r0, #0 - beq _021D14E2 - ldr r0, _021D1598 ; =0x000005F3 - bl sub_02005748 - ldr r1, [sp] - add r0, r4, #0 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #5 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D14E2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x24 - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #3 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D14F8: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #0x24 - bl ov19_021D6600 - cmp r0, #0 - beq _021D15B8 - add r0, r4, #0 - bl ov19_021D52D0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D152E - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D152E: - mov r0, #0x1b - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 -_021D1538: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - beq _021D15B8 - add r0, r4, #0 - bl ov19_021D0ECC - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D0EA0 - b _021D15B8 -_021D1556: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D15B8 - ldr r0, _021D1584 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D15B8 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D15B8 - ; .align 2, 0 -_021D1584: .word 0x021BF67C -_021D1588: .word ov19_021D20A4 -_021D158C: .word ov19_021D2308 -_021D1590: .word ov19_021D4640 -_021D1594: .word ov19_021D4938 -_021D1598: .word 0x000005F3 -_021D159C: .word 0x000005DD -_021D15A0: .word ov19_021D1F5C -_021D15A4: - sub r1, #0x9c - ldr r0, [r4, r1] - bl ov19_021D6628 - cmp r0, #0 - beq _021D15B8 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] -_021D15B8: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D1270 - - thumb_func_start ov19_021D15C0 -ov19_021D15C0: ; 0x021D15C0 - push {r3, r4, r5, lr} - mov r3, #0x1b - add r4, r0, #0 - lsl r3, r3, #4 - ldr r1, [r4, r3] - cmp r1, #0 - beq _021D15D6 - cmp r1, #1 - bne _021D15D4 - b _021D176C -_021D15D4: - b _021D1788 -_021D15D6: - ldr r5, _021D178C ; =0x021BF67C - add r2, r3, #0 - ldr r1, [r5, #0x44] - add r2, #0x70 - tst r2, r1 - beq _021D15F0 - bl ov19_021D5CE8 - ldr r1, _021D1790 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1788 -_021D15F0: - sub r3, #0xa0 - add r2, r1, #0 - tst r2, r3 - beq _021D1606 - bl ov19_021D5CBC - ldr r1, _021D1790 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1788 -_021D1606: - ldr r3, [r5, #0x48] - mov r2, #1 - tst r2, r3 - beq _021D1616 - ldr r1, _021D1794 ; =ov19_021D2694 - bl ov19_021D0EB0 - b _021D1788 -_021D1616: - mov r2, #2 - tst r2, r3 - beq _021D1624 - ldr r1, _021D1798 ; =ov19_021D1F5C - bl ov19_021D0EB0 - b _021D1788 -_021D1624: - add r0, r1, #0 - add r1, r4, #0 - bl ov19_021D4F74 - cmp r0, #0 - beq _021D165C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D1652 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D1652: - mov r0, #0x1b - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1788 -_021D165C: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D167E - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D16A6 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D1680 - cmp r0, #1 - beq _021D168A -_021D167E: - b _021D1788 -_021D1680: - ldr r1, _021D179C ; =ov19_021D4640 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1788 -_021D168A: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D169E - ldr r1, _021D17A0 ; =ov19_021D4938 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1788 -_021D169E: - ldr r0, _021D17A4 ; =0x000005F3 - bl sub_02005748 - b _021D1788 -_021D16A6: - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D16BA - cmp r0, #1 - beq _021D1706 - cmp r0, #2 - beq _021D1752 - b _021D1788 -_021D16BA: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #0 - bne _021D16FE - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D16FE - ldr r0, _021D17A8 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - b _021D1788 -_021D16FE: - ldr r0, _021D17A4 ; =0x000005F3 - bl sub_02005748 - b _021D1788 -_021D1706: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #1 - bne _021D174A - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D174A - ldr r0, _021D17A8 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - b _021D1788 -_021D174A: - ldr r0, _021D17A4 ; =0x000005F3 - bl sub_02005748 - b _021D1788 -_021D1752: - ldr r0, _021D17A8 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B80 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x32 - bl ov19_021D6594 - b _021D1788 -_021D176C: - sub r3, #0x9c - ldr r0, [r4, r3] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1788 - add r0, r4, #0 - bl ov19_021D0ECC - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D0EA0 -_021D1788: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D178C: .word 0x021BF67C -_021D1790: .word ov19_021D45A8 -_021D1794: .word ov19_021D2694 -_021D1798: .word ov19_021D1F5C -_021D179C: .word ov19_021D4640 -_021D17A0: .word ov19_021D4938 -_021D17A4: .word 0x000005F3 -_021D17A8: .word 0x000005DD - thumb_func_end ov19_021D15C0 - - thumb_func_start ov19_021D17AC -ov19_021D17AC: ; 0x021D17AC - push {r3, r4, r5, lr} - mov r1, #0x1b - add r4, r0, #0 - lsl r1, r1, #4 - ldr r2, [r4, r1] - cmp r2, #0 - beq _021D17C8 - cmp r2, #1 - bne _021D17C0 - b _021D195E -_021D17C0: - cmp r2, #2 - bne _021D17C6 - b _021D1976 -_021D17C6: - b _021D1992 -_021D17C8: - ldr r3, _021D1998 ; =0x021BF67C - mov r1, #1 - ldr r5, [r3, #0x48] - tst r1, r5 - beq _021D17DA - ldr r1, _021D199C ; =ov19_021D1DEC - bl ov19_021D0EB0 - b _021D1992 -_021D17DA: - mov r2, #2 - add r1, r5, #0 - tst r1, r2 - beq _021D17EA - ldr r1, _021D19A0 ; =ov19_021D1F5C - bl ov19_021D0EB0 - b _021D1992 -_021D17EA: - ldr r3, [r3, #0x44] - lsl r1, r2, #8 - tst r1, r3 - beq _021D1800 - bl ov19_021D5CE8 - ldr r1, _021D19A4 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1992 -_021D1800: - add r2, #0xfe - add r1, r3, #0 - tst r1, r2 - beq _021D1816 - bl ov19_021D5CBC - ldr r1, _021D19A4 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1992 -_021D1816: - add r0, r3, #0 - add r1, r4, #0 - bl ov19_021D4F74 - cmp r0, #0 - beq _021D184E - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D1844 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D1844: - mov r0, #0x1b - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1992 -_021D184E: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D1870 - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D1898 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D1872 - cmp r0, #1 - beq _021D187C -_021D1870: - b _021D1992 -_021D1872: - ldr r1, _021D19A8 ; =ov19_021D4640 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1992 -_021D187C: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D1890 - ldr r1, _021D19AC ; =ov19_021D4938 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1992 -_021D1890: - ldr r0, _021D19B0 ; =0x000005F3 - bl sub_02005748 - b _021D1992 -_021D1898: - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D18AC - cmp r0, #1 - beq _021D18F8 - cmp r0, #2 - beq _021D1944 - b _021D1992 -_021D18AC: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #0 - bne _021D18F0 - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D18F0 - ldr r0, _021D19B4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - b _021D1992 -_021D18F0: - ldr r0, _021D19B0 ; =0x000005F3 - bl sub_02005748 - b _021D1992 -_021D18F8: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #1 - bne _021D193C - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D193C - ldr r0, _021D19B4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - b _021D1992 -_021D193C: - ldr r0, _021D19B0 ; =0x000005F3 - bl sub_02005748 - b _021D1992 -_021D1944: - ldr r0, _021D19B4 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B80 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x32 - bl ov19_021D6594 - b _021D1992 -_021D195E: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #4 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1992 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1992 -_021D1976: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1992 - add r0, r4, #0 - bl ov19_021D0ECC - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D0EA0 -_021D1992: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D1998: .word 0x021BF67C -_021D199C: .word ov19_021D1DEC -_021D19A0: .word ov19_021D1F5C -_021D19A4: .word ov19_021D45A8 -_021D19A8: .word ov19_021D4640 -_021D19AC: .word ov19_021D4938 -_021D19B0: .word 0x000005F3 -_021D19B4: .word 0x000005DD - thumb_func_end ov19_021D17AC - - thumb_func_start ov19_021D19B8 -ov19_021D19B8: ; 0x021D19B8 - push {r3, r4, r5, lr} - mov r1, #0x1b - add r4, r0, #0 - lsl r1, r1, #4 - ldr r2, [r4, r1] - cmp r2, #5 - bhi _021D1AC0 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D19D2: ; jump table - .short _021D19DE - _021D19D2 - 2 ; case 0 - .short _021D1BAE - _021D19D2 - 2 ; case 1 - .short _021D1BD2 - _021D19D2 - 2 ; case 2 - .short _021D1C12 - _021D19D2 - 2 ; case 3 - .short _021D1C2A - _021D19D2 - 2 ; case 4 - .short _021D1C48 - _021D19D2 - 2 ; case 5 -_021D19DE: - ldr r3, _021D1C68 ; =0x021BF67C - mov r1, #1 - ldr r5, [r3, #0x48] - tst r1, r5 - beq _021D1A2A - bl ov19_021D5E08 - cmp r0, #1 - beq _021D1A06 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x22 - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1C64 -_021D1A06: - ldr r0, _021D1C6C ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x12 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #5 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1C64 -_021D1A2A: - mov r2, #2 - add r1, r5, #0 - tst r1, r2 - beq _021D1A3A - ldr r1, _021D1C70 ; =ov19_021D1F5C - bl ov19_021D0EB0 - b _021D1C64 -_021D1A3A: - ldr r3, [r3, #0x44] - lsl r1, r2, #8 - tst r1, r3 - beq _021D1A50 - bl ov19_021D5CE8 - ldr r1, _021D1C74 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1C64 -_021D1A50: - add r2, #0xfe - add r1, r3, #0 - tst r1, r2 - beq _021D1A66 - bl ov19_021D5CBC - ldr r1, _021D1C74 ; =ov19_021D45A8 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1C64 -_021D1A66: - add r0, r3, #0 - add r1, r4, #0 - bl ov19_021D4F74 - cmp r0, #0 - beq _021D1A9E - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D1A94 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D1A94: - mov r0, #0x1b - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1C64 -_021D1A9E: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D1AC0 - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D1AE8 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D1AC2 - cmp r0, #1 - beq _021D1ACC -_021D1AC0: - b _021D1C64 -_021D1AC2: - ldr r1, _021D1C78 ; =ov19_021D4640 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1C64 -_021D1ACC: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D1AE0 - ldr r1, _021D1C7C ; =ov19_021D4938 - add r0, r4, #0 - bl ov19_021D0EB0 - b _021D1C64 -_021D1AE0: - ldr r0, _021D1C6C ; =0x000005F3 - bl sub_02005748 - b _021D1C64 -_021D1AE8: - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D1AFC - cmp r0, #1 - beq _021D1B48 - cmp r0, #2 - beq _021D1B94 - b _021D1C64 -_021D1AFC: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #0 - bne _021D1B40 - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D1B40 - ldr r0, _021D1C80 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - b _021D1C64 -_021D1B40: - ldr r0, _021D1C6C ; =0x000005F3 - bl sub_02005748 - b _021D1C64 -_021D1B48: - add r0, r4, #0 - bl ov19_021D5F9C - cmp r0, #1 - bne _021D1B8C - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #1 - bne _021D1B8C - ldr r0, _021D1C80 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x31 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - b _021D1C64 -_021D1B8C: - ldr r0, _021D1C6C ; =0x000005F3 - bl sub_02005748 - b _021D1C64 -_021D1B94: - ldr r0, _021D1C80 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - bl ov19_021D5B80 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x32 - bl ov19_021D6594 - b _021D1C64 -_021D1BAE: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #0x22 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1C64 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x23 - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1C64 -_021D1BD2: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #0x23 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1C64 - add r0, r4, #0 - bl ov19_021D5290 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D1C08 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D1C08: - mov r0, #0x1b - mov r1, #4 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1C64 -_021D1C12: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #4 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1C64 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - b _021D1C64 -_021D1C2A: - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1C64 - add r0, r4, #0 - bl ov19_021D0ECC - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D0EA0 - b _021D1C64 -_021D1C48: - ldr r0, _021D1C68 ; =0x021BF67C - ldr r2, [r0, #0x48] - mov r0, #3 - tst r0, r2 - beq _021D1C64 - sub r1, #0x9c - ldr r0, [r4, r1] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x1b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] -_021D1C64: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1C68: .word 0x021BF67C -_021D1C6C: .word 0x000005F3 -_021D1C70: .word ov19_021D1F5C -_021D1C74: .word ov19_021D45A8 -_021D1C78: .word ov19_021D4640 -_021D1C7C: .word ov19_021D4938 -_021D1C80: .word 0x000005DD - thumb_func_end ov19_021D19B8 - - thumb_func_start ov19_021D1C84 -ov19_021D1C84: ; 0x021D1C84 - push {r4, lr} - add r4, r0, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D1CC8 - mov r0, #0x4b - ldr r1, [r4, #0x14] - lsl r0, r0, #2 - str r1, [r4, r0] - ldrb r0, [r4, #0x1f] - cmp r0, #0 - beq _021D1CA2 - mov r0, #0 - b _021D1CA4 -_021D1CA2: - mov r0, #2 -_021D1CA4: - ldr r1, _021D1DA0 ; =0x0000013D - mov r2, #1 - strb r0, [r4, r1] - add r0, r1, #2 - strb r2, [r4, r0] - mov r2, #0 - add r0, r1, #3 - strb r2, [r4, r0] - add r0, r1, #1 - strb r2, [r4, r0] - add r0, r1, #7 - strh r2, [r4, r0] - add r0, r1, #0 - add r0, #0x67 - ldr r0, [r4, r0] - sub r1, #0xd - str r0, [r4, r1] - b _021D1D4A -_021D1CC8: - add r0, r4, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D1D16 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0207999C - add r1, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r2, #0 - bl sub_02079C9C - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - mov r2, #2 - add r0, #0x11 - strb r2, [r4, r0] - mov r0, #0x1e - add r1, #0x13 - strb r0, [r4, r1] - add r0, r4, #0 - bl ov19_021D5E24 - mov r1, #5 - lsl r1, r1, #6 - strb r0, [r4, r1] - mov r2, #0 - sub r0, r1, #2 - strb r2, [r4, r0] - add r0, r1, #4 - strh r2, [r4, r0] - b _021D1D4A -_021D1D16: - mov r1, #0x49 - lsl r1, r1, #2 - add r0, r1, #0 - ldr r2, [r4, r1] - add r0, #8 - str r2, [r4, r0] - add r0, r1, #0 - mov r2, #1 - add r0, #0x19 - strb r2, [r4, r0] - ldr r0, [r4, r1] - bl sub_0207A0F8 - ldr r1, _021D1DA4 ; =0x0000013F - strb r0, [r4, r1] - add r0, r4, #0 - bl ov19_021D5E2C - mov r1, #5 - lsl r1, r1, #6 - strb r0, [r4, r1] - mov r2, #0 - sub r0, r1, #2 - strb r2, [r4, r0] - add r0, r1, #4 - strh r2, [r4, r0] -_021D1D4A: - mov r0, #0x55 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #0x38 - ldr r0, [r4, r0] - bl sub_0207A274 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x2c - ldr r0, [r4, r1] - bl sub_0208C324 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x3c - ldr r0, [r4, r1] - bl sub_0202D79C - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x20 - add r0, r4, r1 - ldr r1, _021D1DA8 ; =0x021DFE38 - bl sub_0208D720 - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02025E38 - add r1, r0, #0 - mov r0, #0x4b - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0208E9C0 - pop {r4, pc} - nop -_021D1DA0: .word 0x0000013D -_021D1DA4: .word 0x0000013F -_021D1DA8: .word 0x021DFE38 - thumb_func_end ov19_021D1C84 - - thumb_func_start ov19_021D1DAC -ov19_021D1DAC: ; 0x021D1DAC - push {r4, lr} - add r4, r0, #0 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0 - beq _021D1DC0 - cmp r1, #1 - beq _021D1DD6 - b _021D1DE6 -_021D1DC0: - sub r0, #0x9c - ldr r0, [r4, r0] - mov r1, #0x33 - bl ov19_021D6594 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _021D1DE6 -_021D1DD6: - sub r0, #0x9c - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D1DE6 - mov r0, #1 - pop {r4, pc} -_021D1DE6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D1DAC - - thumb_func_start ov19_021D1DEC -ov19_021D1DEC: ; 0x021D1DEC - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #6 - bls _021D1DFA - b _021D1F46 -_021D1DFA: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D1E06: ; jump table - .short _021D1E14 - _021D1E06 - 2 ; case 0 - .short _021D1E6C - _021D1E06 - 2 ; case 1 - .short _021D1EA4 - _021D1E06 - 2 ; case 2 - .short _021D1F46 - _021D1E06 - 2 ; case 3 - .short _021D1F00 - _021D1E06 - 2 ; case 4 - .short _021D1F14 - _021D1E06 - 2 ; case 5 - .short _021D1F30 - _021D1E06 - 2 ; case 6 -_021D1E14: - bl ov19_021D5E08 - cmp r0, #3 - bne _021D1E30 - add r0, r4, #0 - bl ov19_021D5F7C - cmp r0, #0 - beq _021D1E30 - ldr r1, _021D1F48 ; =ov19_021D4184 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D1E30: - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - beq _021D1E5A - ldr r0, _021D1F4C ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x11 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1E5A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x22 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1E6C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x22 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1F46 - ldr r0, _021D1F50 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xb - bl ov19_021D5408 - add r0, r4, #0 - mov r1, #1 - bl ov19_021DF964 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1EA4: - bl ov19_021DFD2C - cmp r0, #0x36 - bgt _021D1EC4 - bge _021D1EF0 - mov r2, #0 - mvn r2, r2 - cmp r0, r2 - bgt _021D1F46 - sub r1, r2, #1 - cmp r0, r1 - blt _021D1F46 - beq _021D1ECA - cmp r0, r2 - beq _021D1ED8 - pop {r3, r4, r5, pc} -_021D1EC4: - cmp r0, #0x37 - beq _021D1ED8 - pop {r3, r4, r5, pc} -_021D1ECA: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D1ED8: - ldr r0, _021D1F50 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1EF0: - ldr r1, _021D1F54 ; =ov19_021D1DAC - add r0, r4, #0 - bl ov19_021D0EA0 - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D1F00: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - beq _021D1F46 - mov r0, #5 - str r0, [r5, #0] -_021D1F14: - ldr r0, _021D1F58 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D1F46 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1F30: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D1F46 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D1F46: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1F48: .word ov19_021D4184 -_021D1F4C: .word 0x000005F3 -_021D1F50: .word 0x000005DD -_021D1F54: .word ov19_021D1DAC -_021D1F58: .word 0x021BF67C - thumb_func_end ov19_021D1DEC - - thumb_func_start ov19_021D1F5C -ov19_021D1F5C: ; 0x021D1F5C - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #5 - bls _021D1F6A - b _021D208C -_021D1F6A: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D1F76: ; jump table - .short _021D1F82 - _021D1F76 - 2 ; case 0 - .short _021D208C - _021D1F76 - 2 ; case 1 - .short _021D2046 - _021D1F76 - 2 ; case 2 - .short _021D205A - _021D1F76 - 2 ; case 3 - .short _021D2076 - _021D1F76 - 2 ; case 4 - .short _021D1FF0 - _021D1F76 - 2 ; case 5 -_021D1F82: - bl ov19_021D5E38 - cmp r0, #1 - beq _021D1FAA - ldr r0, _021D2090 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x11 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1FAA: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - bne _021D1FC8 - add r0, r4, #0 - bl ov19_021D5F7C - cmp r0, #0 - beq _021D1FC8 - ldr r1, _021D2094 ; =ov19_021D4184 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D1FC8: - ldr r0, _021D2098 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xc - bl ov19_021D5408 - add r0, r4, #0 - mov r1, #0 - bl ov19_021DF964 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1FF0: - bl ov19_021DFD2C - cmp r0, #0x36 - bgt _021D2010 - bge _021D2034 - mov r2, #0 - mvn r2, r2 - cmp r0, r2 - bgt _021D208C - sub r1, r2, #1 - cmp r0, r1 - blt _021D208C - beq _021D2016 - cmp r0, r2 - beq _021D2024 - pop {r3, r4, r5, pc} -_021D2010: - cmp r0, #0x37 - beq _021D2024 - pop {r3, r4, r5, pc} -_021D2016: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D2024: - ldr r1, _021D209C ; =ov19_021D1DAC - add r0, r4, #0 - bl ov19_021D0EA0 - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D2034: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2046: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - beq _021D208C - mov r0, #3 - str r0, [r5, #0] -_021D205A: - ldr r0, _021D20A0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D208C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2076: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D208C - add r0, r4, #0 - bl ov19_021D0EC0 -_021D208C: - pop {r3, r4, r5, pc} - nop -_021D2090: .word 0x000005F3 -_021D2094: .word ov19_021D4184 -_021D2098: .word 0x000005DD -_021D209C: .word ov19_021D1DAC -_021D20A0: .word 0x021BF67C - thumb_func_end ov19_021D1F5C - - thumb_func_start ov19_021D20A4 -ov19_021D20A4: ; 0x021D20A4 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #5 - bhi _021D2196 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D20BC: ; jump table - .short _021D20C8 - _021D20BC - 2 ; case 0 - .short _021D211C - _021D20BC - 2 ; case 1 - .short _021D2130 - _021D20BC - 2 ; case 2 - .short _021D218A - _021D20BC - 2 ; case 3 - .short _021D22A8 - _021D20BC - 2 ; case 4 - .short _021D22C0 - _021D20BC - 2 ; case 5 -_021D20C8: - bl ov19_021D5E9C - add r2, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B5CC - add r0, r4, #0 - mov r1, #0 - bl ov19_021D5408 - add r0, r4, #0 - bl ov19_021DF990 - add r0, r4, #0 - bl ov19_021D5EE0 - cmp r0, #0 - beq _021D2104 - add r0, r4, #0 - bl ov19_021DFDEC - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2104: - ldr r0, _021D22D8 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D211C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - beq _021D2196 - mov r0, #2 - str r0, [r5, #0] -_021D2130: - add r0, r4, #0 - bl ov19_021DFD2C - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0 - ldr r2, [r4, r1] - mvn r0, r0 - cmp r2, r0 - bgt _021D215A - sub r3, r0, #2 - cmp r2, r3 - blt _021D2184 - beq _021D2196 - sub r3, r0, #1 - cmp r2, r3 - beq _021D2160 - cmp r2, r0 - beq _021D216C - b _021D2184 -_021D215A: - cmp r2, #0x2b - beq _021D216C - b _021D2184 -_021D2160: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D216C: - ldr r0, _021D22D8 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2184: - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D218A: - mov r1, #0x6e - lsl r1, r1, #2 - ldr r2, [r4, r1] - sub r2, #0x22 - cmp r2, #0x13 - bls _021D2198 -_021D2196: - b _021D22D4 -_021D2198: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D21A4: ; jump table - .short _021D21CC - _021D21A4 - 2 ; case 0 - .short _021D21FE - _021D21A4 - 2 ; case 1 - .short _021D2212 - _021D21A4 - 2 ; case 2 - .short _021D2246 - _021D21A4 - 2 ; case 3 - .short _021D2226 - _021D21A4 - 2 ; case 4 - .short _021D222E - _021D21A4 - 2 ; case 5 - .short _021D224E - _021D21A4 - 2 ; case 6 - .short _021D2236 - _021D21A4 - 2 ; case 7 - .short _021D223E - _021D21A4 - 2 ; case 8 - .short _021D22D4 - _021D21A4 - 2 ; case 9 - .short _021D22D4 - _021D21A4 - 2 ; case 10 - .short _021D22D4 - _021D21A4 - 2 ; case 11 - .short _021D22D4 - _021D21A4 - 2 ; case 12 - .short _021D22D4 - _021D21A4 - 2 ; case 13 - .short _021D22D4 - _021D21A4 - 2 ; case 14 - .short _021D22D4 - _021D21A4 - 2 ; case 15 - .short _021D22D4 - _021D21A4 - 2 ; case 16 - .short _021D22D4 - _021D21A4 - 2 ; case 17 - .short _021D226A - _021D21A4 - 2 ; case 18 - .short _021D226A - _021D21A4 - 2 ; case 19 -_021D21CC: - bl ov19_021D5E10 - cmp r0, #0 - bne _021D21E8 - add r0, r4, #0 - bl ov19_021D5EE0 - cmp r0, #1 - bne _021D21E8 - ldr r1, _021D22DC ; =ov19_021D2B54 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D21E8: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - ldr r1, _021D22E0 ; =ov19_021D2E1C - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D21FE: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1a - bl ov19_021D6594 - ldr r1, _021D22E4 ; =ov19_021D2F14 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2212: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1a - bl ov19_021D6594 - ldr r1, _021D22E8 ; =ov19_021D3010 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2226: - ldr r1, _021D22EC ; =ov19_021D30D0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D222E: - ldr r1, _021D22F0 ; =ov19_021D3294 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2236: - ldr r1, _021D22F4 ; =ov19_021D2A5C - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D223E: - ldr r1, _021D22F8 ; =ov19_021D35F8 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2246: - ldr r1, _021D22FC ; =ov19_021D3C28 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D224E: - bl ov19_021D5E74 - cmp r0, #0 - bne _021D2260 - ldr r1, _021D2300 ; =ov19_021D3D44 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2260: - ldr r1, _021D2304 ; =ov19_021D3FB0 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D226A: - bl ov19_021D5B70 - ldr r1, [r4, #8] - add r0, r4, #0 - add r2, r4, #0 - bl ov19_021D5888 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x30 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - ldr r0, _021D22D8 ; =0x000005DD - bl sub_02005748 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D22A8: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D22D4 - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D22C0: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D22D4 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D22D4: - pop {r3, r4, r5, pc} - nop -_021D22D8: .word 0x000005DD -_021D22DC: .word ov19_021D2B54 -_021D22E0: .word ov19_021D2E1C -_021D22E4: .word ov19_021D2F14 -_021D22E8: .word ov19_021D3010 -_021D22EC: .word ov19_021D30D0 -_021D22F0: .word ov19_021D3294 -_021D22F4: .word ov19_021D2A5C -_021D22F8: .word ov19_021D35F8 -_021D22FC: .word ov19_021D3C28 -_021D2300: .word ov19_021D3D44 -_021D2304: .word ov19_021D3FB0 - thumb_func_end ov19_021D20A4 - - thumb_func_start ov19_021D2308 -ov19_021D2308: ; 0x021D2308 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #7 - bls _021D2316 - b _021D2672 -_021D2316: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D2322: ; jump table - .short _021D2332 - _021D2322 - 2 ; case 0 - .short _021D23DC - _021D2322 - 2 ; case 1 - .short _021D23F0 - _021D2322 - 2 ; case 2 - .short _021D2450 - _021D2322 - 2 ; case 3 - .short _021D25FE - _021D2322 - 2 ; case 4 - .short _021D2616 - _021D2322 - 2 ; case 5 - .short _021D2642 - _021D2322 - 2 ; case 6 - .short _021D2658 - _021D2322 - 2 ; case 7 -_021D2332: - bl ov19_021D5F7C - add r2, r0, #0 - beq _021D2350 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x19 - bl ov19_021D5408 - b _021D2378 -_021D2350: - add r0, r4, #0 - bl ov19_021D5E74 - add r2, r0, #0 - beq _021D2370 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x19 - bl ov19_021D5408 - b _021D2378 -_021D2370: - add r0, r4, #0 - mov r1, #0x1c - bl ov19_021D5408 -_021D2378: - add r0, r4, #0 - bl ov19_021DFAD0 - add r0, r4, #0 - bl ov19_021D5FC8 - cmp r0, #0 - beq _021D23A8 - ldr r0, _021D2674 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x22 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D23A8: - add r0, r4, #0 - bl ov19_021D5EE0 - cmp r0, #0 - beq _021D23C4 - add r0, r4, #0 - bl ov19_021DFDEC - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D23C4: - ldr r0, _021D2678 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D23DC: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - beq _021D245C - mov r0, #2 - str r0, [r5, #0] -_021D23F0: - add r0, r4, #0 - bl ov19_021DFD2C - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0 - ldr r2, [r4, r1] - mvn r0, r0 - cmp r2, r0 - bgt _021D241A - sub r3, r0, #2 - cmp r2, r3 - blt _021D2444 - beq _021D245C - sub r3, r0, #1 - cmp r2, r3 - beq _021D2420 - cmp r2, r0 - beq _021D242C - b _021D2444 -_021D241A: - cmp r2, #0x33 - beq _021D242C - b _021D2444 -_021D2420: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D242C: - ldr r0, _021D2678 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2444: - ldr r0, _021D2678 ; =0x000005DD - bl sub_02005748 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2450: - mov r1, #0x6e - lsl r1, r1, #2 - ldr r1, [r4, r1] - sub r1, #0x2e - cmp r1, #4 - bls _021D245E -_021D245C: - b _021D2672 -_021D245E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D246A: ; jump table - .short _021D2474 - _021D246A - 2 ; case 0 - .short _021D24F2 - _021D246A - 2 ; case 1 - .short _021D2554 - _021D246A - 2 ; case 2 - .short _021D255C - _021D246A - 2 ; case 3 - .short _021D25F6 - _021D246A - 2 ; case 4 -_021D2474: - bl ov19_021D5F7C - cmp r0, #0x70 - bne _021D24B2 - ldr r0, [r4, #0x4c] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - ldr r1, _021D267C ; =0x000001E7 - cmp r0, r1 - beq _021D24B2 - sub r1, #0x4b - ldr r0, [r4, r1] - mov r1, #0 - mov r2, #0x70 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x2d - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D24B2: - add r0, r4, #0 - bl ov19_021D5F7C - cmp r0, #0 - beq _021D24E8 - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D5D60 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x14 - bl ov19_021D6594 - ldr r0, _021D2678 ; =0x000005DD - bl sub_02005748 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D24E8: - ldr r1, _021D2680 ; =ov19_021D3D44 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D24F2: - bl ov19_021D5E74 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _021D2522 - ldr r0, _021D2674 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x18 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2522: - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D5D28 - add r0, r4, #0 - bl ov19_021D0F14 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x13 - bl ov19_021D6594 - ldr r0, _021D2678 ; =0x000005DD - bl sub_02005748 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2554: - ldr r1, _021D2684 ; =ov19_021D4390 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D255C: - bl ov19_021D5E74 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _021D258C - ldr r0, _021D2674 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x18 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D258C: - ldr r0, _021D2688 ; =0x00000112 - ldrh r0, [r4, r0] - cmp r0, #0x70 - bne _021D25CA - ldr r0, [r4, #0x4c] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - ldr r1, _021D267C ; =0x000001E7 - cmp r0, r1 - beq _021D25CA - sub r1, #0x4b - ldr r0, [r4, r1] - mov r1, #0 - mov r2, #0x70 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x2d - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D25CA: - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D5D78 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x15 - bl ov19_021D6594 - ldr r0, _021D2678 ; =0x000005DD - bl sub_02005748 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D25F6: - ldr r1, _021D268C ; =ov19_021D4184 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D25FE: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D2672 - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D2616: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2672 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x16 - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2642: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2672 - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D2658: - ldr r0, _021D2690 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D2672 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] -_021D2672: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D2674: .word 0x000005F3 -_021D2678: .word 0x000005DD -_021D267C: .word 0x000001E7 -_021D2680: .word ov19_021D3D44 -_021D2684: .word ov19_021D4390 -_021D2688: .word 0x00000112 -_021D268C: .word ov19_021D4184 -_021D2690: .word 0x021BF67C - thumb_func_end ov19_021D2308 - - thumb_func_start ov19_021D2694 -ov19_021D2694: ; 0x021D2694 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #7 - bls _021D26A2 - b _021D27D4 -_021D26A2: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D26AE: ; jump table - .short _021D26BE - _021D26AE - 2 ; case 0 - .short _021D2702 - _021D26AE - 2 ; case 1 - .short _021D2716 - _021D26AE - 2 ; case 2 - .short _021D2766 - _021D26AE - 2 ; case 3 - .short _021D27A6 - _021D26AE - 2 ; case 4 - .short _021D27D4 - _021D26AE - 2 ; case 5 - .short _021D27D4 - _021D26AE - 2 ; case 6 - .short _021D27BE - _021D26AE - 2 ; case 7 -_021D26BE: - mov r1, #7 - bl ov19_021D5408 - add r0, r4, #0 - bl ov19_021DFB50 - add r0, r4, #0 - bl ov19_021D5EE0 - cmp r0, #0 - ldr r0, _021D27D8 ; =0x000005DD - beq _021D26EC - bl sub_02005748 - add r0, r4, #0 - bl ov19_021DFDEC - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D26EC: - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2702: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - beq _021D27D4 - mov r0, #2 - str r0, [r5, #0] -_021D2716: - add r0, r4, #0 - bl ov19_021DFD2C - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - add r0, r0, #3 - cmp r0, #6 - bhi _021D2760 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2736: ; jump table - .short _021D27D4 - _021D2736 - 2 ; case 0 - .short _021D2744 - _021D2736 - 2 ; case 1 - .short _021D2750 - _021D2736 - 2 ; case 2 - .short _021D2760 - _021D2736 - 2 ; case 3 - .short _021D2760 - _021D2736 - 2 ; case 4 - .short _021D2760 - _021D2736 - 2 ; case 5 - .short _021D2750 - _021D2736 - 2 ; case 6 -_021D2744: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D2750: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2760: - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2766: - mov r1, #0x6e - lsl r1, r1, #2 - ldr r2, [r4, r1] - cmp r2, #0 - beq _021D277A - cmp r2, #1 - beq _021D278E - cmp r2, #2 - beq _021D279E - pop {r3, r4, r5, pc} -_021D277A: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1a - bl ov19_021D6594 - ldr r1, _021D27DC ; =ov19_021D27E8 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D278E: - sub r1, #0xa4 - ldr r0, [r4, r1] - mov r1, #0x1b - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D279E: - ldr r1, _021D27E0 ; =ov19_021D3B34 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D27A6: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D27D4 - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D27BE: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D27D4 - ldr r1, _021D27E4 ; =ov19_021D2890 - add r0, r4, #0 - bl ov19_021D0EB0 -_021D27D4: - pop {r3, r4, r5, pc} - nop -_021D27D8: .word 0x000005DD -_021D27DC: .word ov19_021D27E8 -_021D27E0: .word ov19_021D3B34 -_021D27E4: .word ov19_021D2890 - thumb_func_end ov19_021D2694 - - thumb_func_start ov19_021D27E8 -ov19_021D27E8: ; 0x021D27E8 - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0 - beq _021D27FE - cmp r1, #1 - beq _021D2812 - cmp r1, #2 - beq _021D2876 - pop {r4, r5, r6, pc} -_021D27FE: - bl ov19_021D5E68 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #8 - bl ov19_021D443C - mov r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_021D2812: - bl ov19_021D4468 - cmp r0, #0 - beq _021D288A - ldr r0, _021D288C ; =0x000001C1 - ldrsb r6, [r5, r0] - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _021D2830 - add r0, r5, #0 - bl ov19_021D5E68 - cmp r6, r0 - bne _021D2836 -_021D2830: - mov r0, #2 - str r0, [r4, #0] - b _021D285C -_021D2836: - add r0, r5, #0 - add r1, r6, #0 - bl ov19_021D5D08 - mov r1, #0x12 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, #0xa1 - ldrsb r1, [r5, r1] - bl sub_02079A94 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #4 - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] -_021D285C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x20 - bl ov19_021D6594 - pop {r4, r5, r6, pc} -_021D2876: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D288A - add r0, r5, #0 - bl ov19_021D0EC0 -_021D288A: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D288C: .word 0x000001C1 - thumb_func_end ov19_021D27E8 - - thumb_func_start ov19_021D2890 -ov19_021D2890: ; 0x021D2890 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #8 - bhi _021D28FC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D28A8: ; jump table - .short _021D28BA - _021D28A8 - 2 ; case 0 - .short _021D28C6 - _021D28A8 - 2 ; case 1 - .short _021D28EC - _021D28A8 - 2 ; case 2 - .short _021D2902 - _021D28A8 - 2 ; case 3 - .short _021D2986 - _021D28A8 - 2 ; case 4 - .short _021D299A - _021D28A8 - 2 ; case 5 - .short _021D2A20 - _021D28A8 - 2 ; case 6 - .short _021D2A32 - _021D28A8 - 2 ; case 7 - .short _021D2A46 - _021D28A8 - 2 ; case 8 -_021D28BA: - mov r0, #0x6e - mov r1, #4 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #1 - str r0, [r5, #0] -_021D28C6: - add r0, r4, #0 - mov r1, #9 - bl ov19_021D5408 - mov r1, #0x6e - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r4, #0 - bl ov19_021DFB94 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D28EC: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - bne _021D28FE -_021D28FC: - b _021D2A5A -_021D28FE: - mov r0, #3 - str r0, [r5, #0] -_021D2902: - add r0, r4, #0 - bl ov19_021DFD2C - add r0, r0, #3 - cmp r0, #0xc - bhi _021D2942 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D291A: ; jump table - .short _021D2A5A - _021D291A - 2 ; case 0 - .short _021D2934 - _021D291A - 2 ; case 1 - .short _021D2942 - _021D291A - 2 ; case 2 - .short _021D2942 - _021D291A - 2 ; case 3 - .short _021D2942 - _021D291A - 2 ; case 4 - .short _021D2942 - _021D291A - 2 ; case 5 - .short _021D2942 - _021D291A - 2 ; case 6 - .short _021D2954 - _021D291A - 2 ; case 7 - .short _021D2954 - _021D291A - 2 ; case 8 - .short _021D2954 - _021D291A - 2 ; case 9 - .short _021D2954 - _021D291A - 2 ; case 10 - .short _021D2954 - _021D291A - 2 ; case 11 - .short _021D2954 - _021D291A - 2 ; case 12 -_021D2934: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D2942: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2954: - add r0, r4, #0 - bl ov19_021DFDDC - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #0xa - bl ov19_021D5408 - mov r1, #0x6e - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r4, #0 - bl ov19_021DFC04 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2986: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6600 - cmp r0, #0 - beq _021D2A5A - mov r0, #5 - str r0, [r5, #0] -_021D299A: - add r0, r4, #0 - bl ov19_021DFD2C - add r0, r0, #3 - cmp r0, #6 - bhi _021D29D4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D29B2: ; jump table - .short _021D2A5A - _021D29B2 - 2 ; case 0 - .short _021D29C0 - _021D29B2 - 2 ; case 1 - .short _021D29CE - _021D29B2 - 2 ; case 2 - .short _021D29D4 - _021D29B2 - 2 ; case 3 - .short _021D29D4 - _021D29B2 - 2 ; case 4 - .short _021D29D4 - _021D29B2 - 2 ; case 5 - .short _021D29CE - _021D29B2 - 2 ; case 6 -_021D29C0: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D29CE: - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D29D4: - add r0, r4, #0 - bl ov19_021DFDDC - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r2, [r4, r1] - cmp r2, #0xa - blt _021D2A16 - cmp r2, #0x21 - bgt _021D2A16 - sub r1, #0x98 - ldr r0, [r4, r1] - mov r1, #0 - mvn r1, r1 - sub r2, #0xa - bl sub_02079AC4 - mov r1, #0x12 - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - bl ov19_021D4F5C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2A16: - bl sub_02022974 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2A20: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x21 - bl ov19_021D6594 - mov r0, #8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2A32: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2A5A - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2A46: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2A5A - add r0, r4, #0 - bl ov19_021D0EC0 -_021D2A5A: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D2890 - - thumb_func_start ov19_021D2A5C -ov19_021D2A5C: ; 0x021D2A5C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0 - beq _021D2A72 - cmp r1, #1 - beq _021D2A90 - cmp r1, #2 - beq _021D2B3E - pop {r3, r4, r5, pc} -_021D2A72: - bl ov19_021DFC80 - add r0, r5, #0 - mov r1, #1 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D2A90: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2B52 - add r0, r5, #0 - bl ov19_021DFD2C - mov r2, #2 - add r1, r0, #0 - mvn r2, r2 - cmp r1, r2 - bhi _021D2AC0 - bhs _021D2B52 - cmp r1, #0x2d - bhi _021D2B20 - cmp r1, #0x2c - blo _021D2B20 - beq _021D2AF0 - cmp r1, #0x2d - beq _021D2ADE - b _021D2B20 -_021D2AC0: - add r0, r2, #1 - cmp r1, r0 - blo _021D2B20 - beq _021D2AD0 - add r0, r2, #2 - cmp r1, r0 - beq _021D2ADE - b _021D2B20 -_021D2AD0: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D2ADE: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D2AF0: - add r0, r5, #0 - bl ov19_021D5BAC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #7 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x27 - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D2B20: - cmp r1, #0x38 - blo _021D2B52 - cmp r1, #0x3d - bhi _021D2B52 - add r0, r5, #0 - sub r1, #0x38 - bl ov19_021DFCE4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1d - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D2B3E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2B52 - add r0, r5, #0 - bl ov19_021D0EC0 -_021D2B52: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D2A5C - - thumb_func_start ov19_021D2B54 -ov19_021D2B54: ; 0x021D2B54 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #5 - bls _021D2B62 - b _021D2DB6 -_021D2B62: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D2B6E: ; jump table - .short _021D2B7A - _021D2B6E - 2 ; case 0 - .short _021D2BAA - _021D2B6E - 2 ; case 1 - .short _021D2C4C - _021D2B6E - 2 ; case 2 - .short _021D2D8E - _021D2B6E - 2 ; case 3 - .short _021D2DA2 - _021D2B6E - 2 ; case 4 - .short _021D2D5A - _021D2B6E - 2 ; case 5 -_021D2B7A: - ldr r1, _021D2DB8 ; =0x021BF67C - ldr r2, [r1, #0x44] - mov r1, #1 - tst r1, r2 - beq _021D2BA2 - add r1, r4, #0 - bl ov19_021D5594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x2c - bl ov19_021D6594 - ldr r0, _021D2DBC ; =0x000005DC - bl sub_02005748 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2BA2: - ldr r1, _021D2DC0 ; =ov19_021D2E1C - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2BAA: - ldr r1, _021D2DB8 ; =0x021BF67C - ldr r2, [r1, #0x44] - mov r1, #1 - tst r1, r2 - beq _021D2C0E - add r0, r2, #0 - add r1, r4, #0 - bl ov19_021D5150 - cmp r0, #1 - beq _021D2BDC - cmp r0, #2 - bne _021D2CAE - ldr r1, _021D2DB8 ; =0x021BF67C - mov r0, #0xf0 - ldr r2, [r1, #0x44] - ldr r1, [r1, #0x48] - and r2, r0 - and r0, r1 - cmp r2, r0 - bne _021D2CAE - ldr r0, _021D2DC4 ; =0x000005F3 - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D2BDC: - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D55B0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x2e - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2C0E: - bl ov19_021D5F20 - cmp r0, #0 - beq _021D2C2C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x2d - bl ov19_021D6594 - ldr r1, _021D2DC0 ; =ov19_021D2E1C - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, pc} -_021D2C2C: - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D54A4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x2f - bl ov19_021D6594 - ldr r0, _021D2DC8 ; =0x000005EB - bl sub_02005748 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2C4C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2CAE - ldr r0, _021D2DB8 ; =0x021BF67C - add r1, r4, #0 - ldr r0, [r0, #0x44] - bl ov19_021D5150 - cmp r0, #4 - bhi _021D2CAE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2C74: ; jump table - .short _021D2D10 - _021D2C74 - 2 ; case 0 - .short _021D2C96 - _021D2C74 - 2 ; case 1 - .short _021D2C7E - _021D2C74 - 2 ; case 2 - .short _021D2CBC - _021D2C74 - 2 ; case 3 - .short _021D2CE6 - _021D2C74 - 2 ; case 4 -_021D2C7E: - ldr r1, _021D2DB8 ; =0x021BF67C - mov r0, #0xf0 - ldr r2, [r1, #0x44] - ldr r1, [r1, #0x48] - and r2, r0 - and r0, r1 - cmp r2, r0 - bne _021D2CAE - ldr r0, _021D2DC4 ; =0x000005F3 - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D2C96: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - mov r1, #6 - tst r0, r1 - beq _021D2CB0 -_021D2CAE: - b _021D2DB6 -_021D2CB0: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D2CBC: - add r0, r4, #0 - bl ov19_021D5CE8 - add r0, r4, #0 - bl ov19_021D5E68 - add r1, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02079A94 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2CE6: - add r0, r4, #0 - bl ov19_021D5CBC - add r0, r4, #0 - bl ov19_021D5E68 - add r1, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02079A94 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2D10: - ldr r0, _021D2DB8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _021D2D4C - add r0, r4, #0 - bl ov19_021D2DD0 - cmp r0, #0 - beq _021D2D44 - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D56AC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa - bl ov19_021D6594 - ldr r0, _021D2DCC ; =0x000005EA - bl sub_02005748 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2D44: - ldr r0, _021D2DC4 ; =0x000005F3 - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D2D4C: - mov r0, #2 - tst r0, r1 - beq _021D2DB6 - ldr r0, _021D2DC4 ; =0x000005F3 - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D2D5A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl ov19_021D6600 - cmp r0, #0 - beq _021D2DB6 - add r0, r4, #0 - bl ov19_021D5E38 - mov r1, #6 - tst r0, r1 - bne _021D2D88 - add r0, r4, #0 - bl ov19_021D52F4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 -_021D2D88: - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2D8E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2DB6 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2DA2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2DB6 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D2DB6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D2DB8: .word 0x021BF67C -_021D2DBC: .word 0x000005DC -_021D2DC0: .word ov19_021D2E1C -_021D2DC4: .word 0x000005F3 -_021D2DC8: .word 0x000005EB -_021D2DCC: .word 0x000005EA - thumb_func_end ov19_021D2B54 - - thumb_func_start ov19_021D2DD0 -ov19_021D2DD0: ; 0x021D2DD0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r5, #0x14 - str r0, [sp] - bl ov19_021D5F3C - add r7, r0, #0 - ldrb r0, [r5, #8] - mov r4, #0 - ldrb r6, [r5, #9] - cmp r0, #0 - ble _021D2E16 -_021D2DE8: - add r3, r5, r4 - mov r2, #0xc - ldrsb r2, [r3, r2] - ldr r0, [sp] - mov r1, #0 - sub r2, r2, r6 - ldr r0, [r0, #0] - mvn r1, r1 - add r2, r7, r2 - bl sub_02079C9C - mov r1, #0xac - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021D2E0E - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D2E0E: - ldrb r0, [r5, #8] - add r4, r4, #1 - cmp r4, r0 - blt _021D2DE8 -_021D2E16: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D2DD0 - - thumb_func_start ov19_021D2E1C -ov19_021D2E1C: ; 0x021D2E1C - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #3 - bhi _021D2F04 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D2E34: ; jump table - .short _021D2E3C - _021D2E34 - 2 ; case 0 - .short _021D2EAE - _021D2E34 - 2 ; case 1 - .short _021D2ED4 - _021D2E34 - 2 ; case 2 - .short _021D2EF0 - _021D2E34 - 2 ; case 3 -_021D2E3C: - bl ov19_021D5E10 - cmp r0, #1 - bne _021D2E8E - add r0, r4, #0 - bl ov19_021D34E4 - cmp r0, #0 - bne _021D2E6E - ldr r0, _021D2F08 ; =0x000005EB - bl sub_02005748 - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D5420 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #9 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2E6E: - ldr r0, _021D2F0C ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2E8E: - ldr r0, _021D2F08 ; =0x000005EB - bl sub_02005748 - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D5420 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #9 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2EAE: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2F04 - add r0, r4, #0 - bl ov19_021D52F4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x25 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2ED4: - ldr r0, _021D2F10 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D2F04 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D2EF0: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2F04 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D2F04: - pop {r3, r4, r5, pc} - nop -_021D2F08: .word 0x000005EB -_021D2F0C: .word 0x000005F3 -_021D2F10: .word 0x021BF67C - thumb_func_end ov19_021D2E1C - - thumb_func_start ov19_021D2F14 -ov19_021D2F14: ; 0x021D2F14 - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0 - beq _021D2F2A - cmp r1, #1 - beq _021D2F76 - cmp r1, #2 - beq _021D2FA8 - pop {r4, r5, r6, pc} -_021D2F2A: - add r1, r5, #0 - bl ov19_021D55C4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0xa - bl ov19_021D6594 - ldr r0, _021D2FC4 ; =0x000005EA - bl sub_02005748 - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #1 - bne _021D2F70 - add r0, r5, #0 - bl ov19_021D5E2C - add r6, r0, #0 - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0207A0F8 - sub r0, r0, #1 - cmp r6, r0 - beq _021D2F70 - mov r0, #1 - str r0, [r4, #0] - add r0, r5, #0 - bl ov19_021D52F4 - pop {r4, r5, r6, pc} -_021D2F70: - mov r0, #2 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_021D2F76: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2FC2 - add r0, r5, #0 - bl ov19_021D52F4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x26 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_021D2FA8: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D2FC2 - add r0, r5, #0 - bl ov19_021D0F14 - add r0, r5, #0 - bl ov19_021D0EC0 -_021D2FC2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D2FC4: .word 0x000005EA - thumb_func_end ov19_021D2F14 - - thumb_func_start ov19_021D2FC8 -ov19_021D2FC8: ; 0x021D2FC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov19_021D34E4 - cmp r0, #0 - beq _021D300C - add r0, r5, #0 - mov r1, #0xad - mov r2, #0 - bl ov19_021D5FD0 - cmp r0, #0 - beq _021D2FEC - mov r0, #6 - str r0, [r4, #0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2FEC: - add r0, r5, #0 - bl ov19_021D5E3C - cmp r0, #0 - beq _021D300C - add r0, r5, #0 - mov r1, #0xa3 - mov r2, #0 - bl ov19_021D5FD0 - cmp r0, #0 - bne _021D300C - mov r0, #6 - str r0, [r4, #0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D300C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D2FC8 - - thumb_func_start ov19_021D3010 -ov19_021D3010: ; 0x021D3010 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0 - beq _021D3026 - cmp r1, #1 - beq _021D307C - cmp r1, #2 - beq _021D30A8 - pop {r3, r4, r5, pc} -_021D3026: - add r1, sp, #0 - bl ov19_021D2FC8 - cmp r0, #0 - beq _021D3050 - ldr r0, _021D30C4 ; =0x000005F3 - bl sub_02005748 - ldr r1, [sp] - add r0, r5, #0 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D3050: - add r0, r5, #0 - add r1, r5, #0 - bl ov19_021D5734 - ldr r0, _021D30C8 ; =0x000005DC - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0xb - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D307C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D30C2 - ldr r0, _021D30CC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D30C2 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D30A8: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D30C2 - add r0, r5, #0 - bl ov19_021D0F14 - add r0, r5, #0 - bl ov19_021D0EC0 -_021D30C2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D30C4: .word 0x000005F3 -_021D30C8: .word 0x000005DC -_021D30CC: .word 0x021BF67C - thumb_func_end ov19_021D3010 - - thumb_func_start ov19_021D30D0 -ov19_021D30D0: ; 0x021D30D0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #8 - bls _021D30DE - b _021D3288 -_021D30DE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D30EA: ; jump table - .short _021D30FC - _021D30EA - 2 ; case 0 - .short _021D3178 - _021D30EA - 2 ; case 1 - .short _021D319A - _021D30EA - 2 ; case 2 - .short _021D31C2 - _021D30EA - 2 ; case 3 - .short _021D31F2 - _021D30EA - 2 ; case 4 - .short _021D3214 - _021D30EA - 2 ; case 5 - .short _021D3288 - _021D30EA - 2 ; case 6 - .short _021D3248 - _021D30EA - 2 ; case 7 - .short _021D3274 - _021D30EA - 2 ; case 8 -_021D30FC: - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207A0F8 - cmp r0, #6 - beq _021D3152 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D3132 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x23 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3132: - ldr r0, _021D328C ; =0x000005EB - bl sub_02005748 - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D5420 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #9 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3152: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1b - bl ov19_021D6594 - add r0, r4, #0 - mov r1, #5 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3178: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #9 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3288 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x23 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D319A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x23 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3288 - add r0, r4, #0 - bl ov19_021D5290 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D31C2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3288 - add r0, r4, #0 - add r1, r4, #0 - bl ov19_021D55C4 - add r0, r4, #0 - bl ov19_021D0F14 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D31F2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa - bl ov19_021D6600 - cmp r0, #0 - beq _021D3288 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x24 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3214: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x24 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3288 - add r0, r4, #0 - bl ov19_021D52D0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3248: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3288 - ldr r0, _021D3290 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D3288 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3274: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D3288 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D3288: - pop {r3, r4, r5, pc} - nop -_021D328C: .word 0x000005EB -_021D3290: .word 0x021BF67C - thumb_func_end ov19_021D30D0 - - thumb_func_start ov19_021D3294 -ov19_021D3294: ; 0x021D3294 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #6 - bhi _021D3358 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D32AC: ; jump table - .short _021D32BA - _021D32AC - 2 ; case 0 - .short _021D3350 - _021D32AC - 2 ; case 1 - .short _021D3412 - _021D32AC - 2 ; case 2 - .short _021D3438 - _021D32AC - 2 ; case 3 - .short _021D3464 - _021D32AC - 2 ; case 4 - .short _021D3492 - _021D32AC - 2 ; case 5 - .short _021D34C0 - _021D32AC - 2 ; case 6 -_021D32BA: - bl ov19_021D5E38 - cmp r0, #1 - bne _021D32F8 - add r0, r4, #0 - bl ov19_021D34E4 - cmp r0, #1 - bne _021D32F8 - ldr r0, _021D34D8 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #6 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1b - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D32F8: - add r0, r4, #0 - add r1, sp, #0 - bl ov19_021D1238 - cmp r0, #0 - beq _021D3330 - ldr r0, _021D34D8 ; =0x000005F3 - bl sub_02005748 - ldr r1, [sp] - add r0, r4, #0 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1b - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3330: - mov r1, #0x11 - lsl r1, r1, #4 - ldrh r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x13 - bl ov19_021D443C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3350: - bl ov19_021D4468 - cmp r0, #0 - bne _021D335A -_021D3358: - b _021D34D4 -_021D335A: - ldr r0, _021D34DC ; =0x000001C1 - mov r1, #0 - ldrsb r2, [r4, r0] - mvn r1, r1 - cmp r2, r1 - bne _021D3382 - sub r0, #0xad - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3382: - sub r0, #0xb1 - strh r2, [r4, r0] - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #2 - ldr r1, _021D34DC ; =0x000001C1 - bne _021D33C2 - ldrsb r1, [r4, r1] - add r0, r4, #0 - bl ov19_021D57D8 - cmp r0, #0 - beq _021D33F2 - add r0, r4, #0 - bl ov19_021D0F14 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D33C2: - ldrsb r1, [r4, r1] - add r0, r4, #0 - bl ov19_021D5800 - cmp r0, #0 - beq _021D33F2 - add r0, r4, #0 - bl ov19_021D0F14 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D33F2: - ldr r0, _021D34D8 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xd - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3412: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D34D4 - ldr r0, _021D34E0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D34D4 - add r0, r4, #0 - bl ov19_021D4458 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3438: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D34D4 - ldr r0, _021D34E0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D34D4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3464: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - bl ov19_021D6600 - cmp r0, #0 - beq _021D34D4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xc - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3492: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - bl ov19_021D6600 - cmp r0, #0 - beq _021D34D4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xd - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D34C0: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D34D4 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D34D4: - pop {r3, r4, r5, pc} - nop -_021D34D8: .word 0x000005F3 -_021D34DC: .word 0x000001C1 -_021D34E0: .word 0x021BF67C - thumb_func_end ov19_021D3294 - - thumb_func_start ov19_021D34E4 -ov19_021D34E4: ; 0x021D34E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [sp] - ldr r0, [r0, r1] - bl sub_0207A0F8 - mov r6, #0 - add r5, r6, #0 - str r0, [sp, #4] - cmp r0, #0 - ble _021D354C -_021D34FE: - mov r0, #0x49 - ldr r1, [sp] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_0207A0FC - add r4, r0, #0 - bl sub_02073C88 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #0xad - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _021D3532 - add r0, r4, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - beq _021D3532 - add r5, r5, #1 -_021D3532: - add r0, r4, #0 - add r1, r7, #0 - bl sub_02073CD4 - cmp r5, #2 - blt _021D3544 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D3544: - ldr r0, [sp, #4] - add r6, r6, #1 - cmp r6, r0 - blt _021D34FE -_021D354C: - ldr r0, [sp] - mov r1, #0xad - mov r2, #0 - bl ov19_021D6014 - cmp r0, #0 - beq _021D3560 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D3560: - ldr r0, [sp] - mov r1, #0xa3 - mov r2, #0 - bl ov19_021D6014 - cmp r0, #0 - beq _021D3574 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D3574: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D34E4 - - thumb_func_start ov19_021D357C -ov19_021D357C: ; 0x021D357C - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0xad - mov r2, #0 - add r5, r0, #0 - bl ov19_021D5FD0 - cmp r0, #0 - beq _021D3596 - mov r0, #0x1f - str r0, [r4, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D3596: - add r0, r5, #0 - bl ov19_021D5E74 - add r0, r5, #0 - bl ov19_021D5E74 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _021D35B6 - mov r0, #0x1e - str r0, [r4, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D35B6: - add r0, r5, #0 - mov r1, #0xa2 - mov r2, #0 - bl ov19_021D5FD0 - cmp r0, #0 - beq _021D35CC - mov r0, #0x1d - str r0, [r4, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D35CC: - add r0, r5, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D35F2 - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #1 - bne _021D35F2 - add r0, r5, #0 - bl ov19_021D34E4 - cmp r0, #0 - beq _021D35F2 - mov r0, #6 - str r0, [r4, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D35F2: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D357C - - thumb_func_start ov19_021D35F8 -ov19_021D35F8: ; 0x021D35F8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #9 - bhi _021D36A4 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D3610: ; jump table - .short _021D3624 - _021D3610 - 2 ; case 0 - .short _021D367C - _021D3610 - 2 ; case 1 - .short _021D36E6 - _021D3610 - 2 ; case 2 - .short _021D376A - _021D3610 - 2 ; case 3 - .short _021D37F6 - _021D3610 - 2 ; case 4 - .short _021D37C2 - _021D3610 - 2 ; case 5 - .short _021D3828 - _021D3610 - 2 ; case 6 - .short _021D3852 - _021D3610 - 2 ; case 7 - .short _021D3896 - _021D3610 - 2 ; case 8 - .short _021D38C2 - _021D3610 - 2 ; case 9 -_021D3624: - add r1, sp, #0 - bl ov19_021D357C - cmp r0, #0 - beq _021D3650 - add r0, r4, #0 - mov r1, #2 - bl ov19_021D5408 - add r0, r4, #0 - mov r1, #1 - bl ov19_021DF964 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3650: - ldr r0, _021D38D8 ; =0x000005F3 - bl sub_02005748 - ldr r1, [sp] - add r0, r4, #0 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1b - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D367C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D36A4 - add r0, r4, #0 - bl ov19_021DFD2C - cmp r0, #0x36 - bgt _021D36AE - bge _021D36D4 - mov r2, #0 - mvn r2, r2 - cmp r0, r2 - bgt _021D36A4 - sub r1, r2, #1 - cmp r0, r1 - bge _021D36A6 -_021D36A4: - b _021D38D6 -_021D36A6: - beq _021D36B4 - cmp r0, r2 - beq _021D36C2 - pop {r3, r4, r5, pc} -_021D36AE: - cmp r0, #0x37 - beq _021D36C2 - pop {r3, r4, r5, pc} -_021D36B4: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D36C2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #9 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D36D4: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D36E6: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D37D0 - add r0, r4, #0 - bl ov19_021D5E9C - add r2, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B5CC - add r0, r4, #0 - bl ov19_021D38E0 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D3730 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xe - bl ov19_021D6594 - mov r0, #0x6e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _021D3764 -_021D3730: - add r0, r4, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D3750 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xf - bl ov19_021D6594 - mov r0, #0x6e - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - b _021D3764 -_021D3750: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x10 - bl ov19_021D6594 - mov r0, #0x6e - mov r1, #2 - lsl r0, r0, #2 - str r1, [r4, r0] -_021D3764: - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D376A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D37D0 - add r0, r4, #0 - bl ov19_021D3B20 - cmp r0, #0 - beq _021D37A8 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D3794 - add r0, r4, #0 - bl ov19_021D5834 - b _021D379A -_021D3794: - add r0, r4, #0 - bl ov19_021D584C -_021D379A: - add r0, r4, #0 - mov r1, #3 - bl ov19_021D5408 - mov r0, #5 - str r0, [r5, #0] - b _021D37B4 -_021D37A8: - add r0, r4, #0 - mov r1, #0x20 - bl ov19_021D5408 - mov r0, #4 - str r0, [r5, #0] -_021D37B4: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D37C2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - bne _021D37D2 -_021D37D0: - b _021D38D6 -_021D37D2: - ldr r0, _021D38DC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D38D6 - add r0, r4, #0 - mov r1, #4 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D37F6: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D38D6 - ldr r0, _021D38DC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D38D6 - add r0, r4, #0 - mov r1, #0x21 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3828: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D38D6 - ldr r0, _021D38DC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D38D6 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #7 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3852: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D38D6 - add r0, r4, #0 - bl ov19_021D3B20 - cmp r0, #0 - beq _021D3884 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #2 - bne _021D387E - sub r0, #0xa4 - ldr r0, [r4, r0] - mov r1, #0x25 - bl ov19_021D6594 -_021D387E: - add r0, r4, #0 - bl ov19_021D0F14 -_021D3884: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #9 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3896: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D38D6 - ldr r0, _021D38DC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D38D6 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #9 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D38C2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D38D6 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D38D6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D38D8: .word 0x000005F3 -_021D38DC: .word 0x021BF67C - thumb_func_end ov19_021D35F8 - - thumb_func_start ov19_021D38E0 -ov19_021D38E0: ; 0x021D38E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [sp] - add r7, r0, r1 - ldr r0, [r0, #0x4c] - mov r4, #0 - ldr r5, _021D3970 ; =0x021DFDF0 - str r0, [r7, #0x10] - str r4, [sp, #4] -_021D38F6: - ldrh r1, [r5] - ldr r0, [r7, #0x10] - add r6, r7, r4 - bl ov19_021D3AC8 - strb r0, [r6, #4] - ldrb r0, [r6, #4] - cmp r0, #0 - beq _021D390E - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] -_021D390E: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #3 - blo _021D38F6 - ldr r0, [sp, #4] - cmp r0, #0 - bne _021D3926 - mov r0, #1 - strb r0, [r7] - add sp, #8 - strb r0, [r7, #1] - pop {r3, r4, r5, r6, r7, pc} -_021D3926: - mov r0, #0 - strb r0, [r7] - strb r0, [r7, #1] - strb r0, [r7, #2] - strb r0, [r7, #3] - mov r1, #0x12 - ldr r0, [sp] - lsl r1, r1, #4 - ldr r0, [r0, r1] - add r1, r1, #4 - str r0, [r7, #0x14] - ldr r0, [sp] - ldr r0, [r0, r1] - str r0, [r7, #0x18] - ldr r0, [sp] - bl ov19_021D5E38 - cmp r0, #1 - beq _021D3950 - mov r0, #1 - b _021D3952 -_021D3950: - mov r0, #0 -_021D3952: - mov r1, #0 - str r0, [r7, #0x1c] - add r0, r7, #0 - add r2, r1, #0 -_021D395A: - add r1, r1, #1 - strh r2, [r0, #8] - add r0, r0, #2 - cmp r1, #3 - blo _021D395A - ldr r0, _021D3974 ; =ov19_021D3978 - add r1, r7, #0 - bl sub_0200D9E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3970: .word 0x021DFDF0 -_021D3974: .word ov19_021D3978 - thumb_func_end ov19_021D38E0 - - thumb_func_start ov19_021D3978 -ov19_021D3978: ; 0x021D3978 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - ldrb r0, [r1, #2] - str r1, [sp, #4] - cmp r0, #0x12 - bhs _021D3A0E - add r0, r1, #0 - ldrb r0, [r0, #3] - str r0, [sp, #0xc] - str r0, [sp, #0x14] - add r0, #0xf - str r0, [sp, #0x14] - cmp r0, #0x1e - ble _021D399A - mov r0, #0x1e - str r0, [sp, #0x14] -_021D399A: - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x14] - cmp r1, r0 - bge _021D39EC -_021D39A2: - ldr r1, [sp, #4] - ldr r0, [sp, #4] - ldrb r1, [r1, #2] - ldr r0, [r0, #0x14] - ldr r2, [sp, #0xc] - bl sub_02079C9C - mov r1, #0xac - mov r2, #0 - add r7, r0, #0 - bl sub_02074570 - cmp r0, #0 - beq _021D39E0 - ldr r4, _021D3AC4 ; =0x021DFDF0 - ldr r5, [sp, #4] - mov r6, #0 -_021D39C4: - ldrh r1, [r4] - add r0, r7, #0 - bl ov19_021D3AC8 - cmp r0, #0 - beq _021D39D6 - ldrh r0, [r5, #8] - add r0, r0, #1 - strh r0, [r5, #8] -_021D39D6: - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, #2 - cmp r6, #3 - blo _021D39C4 -_021D39E0: - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp, #0x14] - str r1, [sp, #0xc] - cmp r1, r0 - blt _021D39A2 -_021D39EC: - ldr r0, [sp, #0x14] - cmp r0, #0x1e - bne _021D3A04 - ldr r0, [sp, #4] - mov r1, #0 - strb r1, [r0, #3] - ldrb r0, [r0, #2] - add r1, r0, #1 - ldr r0, [sp, #4] - add sp, #0x18 - strb r1, [r0, #2] - pop {r3, r4, r5, r6, r7, pc} -_021D3A04: - add r1, r0, #0 - ldr r0, [sp, #4] - add sp, #0x18 - strb r1, [r0, #3] - pop {r3, r4, r5, r6, r7, pc} -_021D3A0E: - add r0, r1, #0 - ldr r0, [r0, #0x18] - bl sub_0207A0F8 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - cmp r0, #0 - ble _021D3A5C -_021D3A22: - ldr r0, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [r0, #0x18] - bl sub_0207A0FC - ldr r4, _021D3AC4 ; =0x021DFDF0 - ldr r5, [sp, #4] - add r7, r0, #0 - mov r6, #0 -_021D3A34: - ldrh r1, [r4] - add r0, r7, #0 - bl ov19_021D3AC8 - cmp r0, #0 - beq _021D3A46 - ldrh r0, [r5, #8] - add r0, r0, #1 - strh r0, [r5, #8] -_021D3A46: - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, #2 - cmp r6, #3 - blo _021D3A34 - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #0x10] - str r1, [sp, #8] - cmp r1, r0 - blt _021D3A22 -_021D3A5C: - ldr r0, [sp, #4] - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _021D3A88 - ldr r4, _021D3AC4 ; =0x021DFDF0 - ldr r5, [sp, #4] - mov r6, #0 -_021D3A6A: - ldr r0, [sp, #4] - ldrh r1, [r4] - ldr r0, [r0, #0x10] - bl ov19_021D3AC8 - cmp r0, #0 - beq _021D3A7E - ldrh r0, [r5, #8] - add r0, r0, #1 - strh r0, [r5, #8] -_021D3A7E: - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, #2 - cmp r6, #3 - blo _021D3A6A -_021D3A88: - ldr r0, [sp, #4] - mov r1, #1 - strb r1, [r0, #1] - mov r2, #0 - add r1, r0, #0 -_021D3A92: - ldrh r0, [r1, #8] - cmp r0, #1 - bne _021D3AAA - ldr r0, [sp, #4] - add r0, r0, r2 - ldrb r0, [r0, #4] - cmp r0, #1 - bne _021D3AAA - ldr r0, [sp, #4] - mov r1, #0 - strb r1, [r0, #1] - b _021D3AB2 -_021D3AAA: - add r2, r2, #1 - add r1, r1, #2 - cmp r2, #3 - blo _021D3A92 -_021D3AB2: - ldr r0, [sp, #4] - mov r1, #1 - strb r1, [r0] - ldr r0, [sp] - bl sub_0200DA58 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D3AC4: .word 0x021DFDF0 - thumb_func_end ov19_021D3978 - - thumb_func_start ov19_021D3AC8 -ov19_021D3AC8: ; 0x021D3AC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0 - add r5, r0, #0 - str r1, [sp, #4] - bl sub_02073D20 - str r0, [sp] - add r0, r5, #0 - mov r1, #0xad - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _021D3B08 - mov r4, #0 - add r7, r4, #0 -_021D3AEC: - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x36 - add r2, r7, #0 - bl sub_02074570 - cmp r6, r0 - bne _021D3B02 - mov r0, #1 - str r0, [sp, #4] - b _021D3B08 -_021D3B02: - add r4, r4, #1 - cmp r4, #4 - blt _021D3AEC -_021D3B08: - ldr r1, [sp] - add r0, r5, #0 - bl sub_02073D48 - ldr r0, [sp, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D3AC8 - - thumb_func_start ov19_021D3B18 -ov19_021D3B18: ; 0x021D3B18 - mov r1, #0x57 - lsl r1, r1, #2 - ldrb r0, [r0, r1] - bx lr - thumb_func_end ov19_021D3B18 - - thumb_func_start ov19_021D3B20 -ov19_021D3B20: ; 0x021D3B20 - mov r1, #0x57 - lsl r1, r1, #2 - add r1, r0, r1 - ldrb r0, [r1] - cmp r0, #0 - beq _021D3B30 - ldrb r0, [r1, #1] - bx lr -_021D3B30: - mov r0, #0 - bx lr - thumb_func_end ov19_021D3B20 - - thumb_func_start ov19_021D3B34 -ov19_021D3B34: ; 0x021D3B34 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D3B4A - cmp r0, #1 - beq _021D3B5E - cmp r0, #2 - beq _021D3BB6 - pop {r3, r4, r5, pc} -_021D3B4A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3B5E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3C1C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D64A0 - mov r0, #0xa - bl sub_0201807C - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0207999C - mov r2, #0x12 - lsl r2, r2, #4 - add r1, r0, #0 - ldr r0, [r4, r2] - add r2, #8 - ldr r2, [r4, r2] - ldr r2, [r2, #0x18] - bl sub_02079AF4 - mov r1, #0x4a - lsl r1, r1, #2 - ldr r0, _021D3C20 ; =0x020F2DAC - ldr r1, [r4, r1] - mov r2, #9 - bl sub_020067E8 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D3BB6: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02006844 - cmp r0, #0 - beq _021D3C1C - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0207999C - add r5, r0, #0 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02006814 - mov r2, #0xf - mov r0, #3 - mov r1, #0xa - lsl r2, r2, #0xe - bl sub_02017FC8 - mov r2, #0x12 - lsl r2, r2, #4 - ldr r0, [r4, r2] - add r2, #8 - ldr r2, [r4, r2] - add r1, r5, #0 - ldr r2, [r2, #0x18] - bl sub_02079B24 - mov r0, #0x12 - lsl r0, r0, #4 - add r1, r4, #0 - ldr r0, [r4, r0] - add r1, #0x40 - bl ov19_021D4F40 - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, #0 - add r2, r4, #0 - bl ov19_021D61B0 - ldr r1, _021D3C24 ; =ov19_021D0F88 - add r0, r4, #0 - bl ov19_021D0EB0 -_021D3C1C: - pop {r3, r4, r5, pc} - nop -_021D3C20: .word 0x020F2DAC -_021D3C24: .word ov19_021D0F88 - thumb_func_end ov19_021D3B34 - - thumb_func_start ov19_021D3C28 -ov19_021D3C28: ; 0x021D3C28 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D3C3E - cmp r0, #1 - beq _021D3C52 - cmp r0, #2 - beq _021D3C94 - pop {r3, r4, r5, pc} -_021D3C3E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D3C52: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3CF0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov19_021D64A0 - mov r0, #0xa - bl sub_0201807C - add r0, r5, #0 - bl ov19_021D1C84 - mov r1, #0x4b - lsl r1, r1, #2 - ldr r0, _021D3CF4 ; =0x020F410C - add r1, r5, r1 - mov r2, #9 - bl sub_020067E8 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D3C94: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02006844 - cmp r0, #0 - beq _021D3CF0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0207999C - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02006814 - mov r2, #0xf - mov r0, #3 - mov r1, #0xa - lsl r2, r2, #0xe - bl sub_02017FC8 - add r0, r5, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D3CD4 - add r0, r5, #0 - add r1, r5, #0 - bl ov19_021D3CFC -_021D3CD4: - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r5, #0 - add r2, r5, #0 - bl ov19_021D61B0 - ldr r1, _021D3CF8 ; =ov19_021D0F88 - add r0, r5, #0 - bl ov19_021D0EB0 - add r0, r5, #0 - bl ov19_021D0F14 -_021D3CF0: - pop {r3, r4, r5, pc} - nop -_021D3CF4: .word 0x020F410C -_021D3CF8: .word ov19_021D0F88 - thumb_func_end ov19_021D3C28 - - thumb_func_start ov19_021D3CFC -ov19_021D3CFC: ; 0x021D3CFC - push {r3, r4, r5, lr} - add r4, r0, #0 - add r4, #8 - ldrb r0, [r4, #4] - add r5, r1, #0 - cmp r0, #0 - beq _021D3D10 - cmp r0, #1 - beq _021D3D32 - pop {r3, r4, r5, pc} -_021D3D10: - mov r0, #5 - lsl r0, r0, #6 - ldrb r0, [r5, r0] - mov r1, #6 - strb r0, [r4, #7] - mov r0, #7 - ldrsb r0, [r4, r0] - bl sub_020E1F6C - strb r1, [r4, #5] - mov r0, #7 - ldrsb r0, [r4, r0] - mov r1, #6 - bl sub_020E1F6C - strb r0, [r4, #6] - b _021D3D3A -_021D3D32: - mov r0, #5 - lsl r0, r0, #6 - ldrb r0, [r5, r0] - strb r0, [r4, #8] -_021D3D3A: - add r0, r5, #0 - bl ov19_021D52F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D3CFC - - thumb_func_start ov19_021D3D44 -ov19_021D3D44: ; 0x021D3D44 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #6 - bhi _021D3DF6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D3D5C: ; jump table - .short _021D3D6A - _021D3D5C - 2 ; case 0 - .short _021D3D7E - _021D3D5C - 2 ; case 1 - .short _021D3DE8 - _021D3D5C - 2 ; case 2 - .short _021D3E9A - _021D3D5C - 2 ; case 3 - .short _021D3EBE - _021D3D5C - 2 ; case 4 - .short _021D3F48 - _021D3D5C - 2 ; case 5 - .short _021D3F7C - _021D3D5C - 2 ; case 6 -_021D3D6A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3D7E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3DF6 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D64A0 - mov r0, #0xa - bl sub_0201807C - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207D990 - ldr r1, _021D3F94 ; =0x021DFE30 - mov r2, #9 - bl sub_0207D824 - mov r1, #0x85 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - sub r1, #0xf8 - ldr r1, [r4, r1] - mov r2, #1 - mov r3, #0 - bl sub_0207CB2C - ldr r0, _021D3F98 ; =0x00000054 - mov r1, #2 - bl sub_02006590 - mov r1, #0x85 - lsl r1, r1, #2 - ldr r0, _021D3F9C ; =0x02241130 - ldr r1, [r4, r1] - mov r2, #9 - bl sub_020067E8 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3DE8: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02006844 - cmp r0, #0 - bne _021D3DF8 -_021D3DF6: - b _021D3F90 -_021D3DF8: - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207CB94 - ldr r1, _021D3FA0 ; =0x021E05E0 - str r0, [r1, #8] - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02006814 - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r0, _021D3F98 ; =0x00000054 - bl sub_02006514 - ldr r0, _021D3FA0 ; =0x021E05E0 - ldr r0, [r0, #8] - cmp r0, #0x70 - bne _021D3E38 - ldr r0, [r4, #0x4c] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - ldr r1, _021D3FA4 ; =0x000001E7 - cmp r0, r1 - bne _021D3E6C -_021D3E38: - ldr r0, _021D3FA0 ; =0x021E05E0 - ldr r6, [r0, #8] - cmp r6, #0 - beq _021D3E6C - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207D990 - lsl r1, r6, #0x10 - lsr r1, r1, #0x10 - mov r2, #1 - mov r3, #9 - bl sub_0207D60C - ldr r1, _021D3FA0 ; =0x021E05E0 - add r0, r4, #0 - ldr r1, [r1, #8] - add r2, r4, #0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl ov19_021D5BE8 - add r0, r4, #0 - bl ov19_021D0F14 -_021D3E6C: - mov r2, #0xf - mov r0, #3 - mov r1, #0xa - lsl r2, r2, #0xe - bl sub_02017FC8 - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, #0 - add r2, r4, #0 - bl ov19_021D61B0 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3E9A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3F90 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3EBE: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3F90 - ldr r0, _021D3FA0 ; =0x021E05E0 - ldr r0, [r0, #8] - cmp r0, #0 - bne _021D3EDE - add r0, r4, #0 - bl ov19_021D0EC0 - pop {r4, r5, r6, pc} -_021D3EDE: - cmp r0, #0x70 - bne _021D3F1C - ldr r0, [r4, #0x4c] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - ldr r1, _021D3FA4 ; =0x000001E7 - cmp r0, r1 - beq _021D3F1C - ldr r2, _021D3FA0 ; =0x021E05E0 - sub r1, #0x4b - ldr r0, [r4, r1] - ldr r2, [r2, #8] - mov r1, #0 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x2d - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3F1C: - mov r0, #0x67 - ldr r2, _021D3FA0 ; =0x021E05E0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [r2, #8] - mov r1, #0 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x10 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3F48: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D3F90 - ldr r0, _021D3FA8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D3F90 - ldr r0, _021D3FAC ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D3F7C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D3F90 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D3F90: - pop {r4, r5, r6, pc} - nop -_021D3F94: .word 0x021DFE30 -_021D3F98: .word 0x00000054 -_021D3F9C: .word 0x02241130 -_021D3FA0: .word 0x021E05E0 -_021D3FA4: .word 0x000001E7 -_021D3FA8: .word 0x021BF67C -_021D3FAC: .word 0x000005DD - thumb_func_end ov19_021D3D44 - - thumb_func_start ov19_021D3FB0 -ov19_021D3FB0: ; 0x021D3FB0 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #5 - bhi _021D4062 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D3FC8: ; jump table - .short _021D3FD4 - _021D3FC8 - 2 ; case 0 - .short _021D403A - _021D3FC8 - 2 ; case 1 - .short _021D40A4 - _021D3FC8 - 2 ; case 2 - .short _021D4104 - _021D3FC8 - 2 ; case 3 - .short _021D412C - _021D3FC8 - 2 ; case 4 - .short _021D415E - _021D3FC8 - 2 ; case 5 -_021D3FD4: - bl ov19_021D5E74 - ldr r1, _021D4174 ; =0x021E05E0 - str r0, [r1, #4] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _021D4008 - ldr r0, _021D4178 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x18 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4008: - mov r0, #0x67 - ldr r2, _021D4174 ; =0x021E05E0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [r2, #4] - mov r1, #0 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0 - bl ov19_021DF964 - add r0, r4, #0 - mov r1, #0x17 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D403A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D4062 - add r0, r4, #0 - bl ov19_021DFD2C - cmp r0, #0x36 - bgt _021D406C - bge _021D4092 - mov r2, #0 - mvn r2, r2 - cmp r0, r2 - bgt _021D4062 - sub r1, r2, #1 - cmp r0, r1 - bge _021D4064 -_021D4062: - b _021D4172 -_021D4064: - beq _021D4072 - cmp r0, r2 - beq _021D4080 - pop {r3, r4, r5, pc} -_021D406C: - cmp r0, #0x37 - beq _021D4080 - pop {r3, r4, r5, pc} -_021D4072: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D4080: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4092: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1b - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D40A4: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207D990 - ldr r1, _021D4174 ; =0x021E05E0 - mov r2, #1 - ldr r1, [r1, #4] - mov r3, #9 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0207D570 - cmp r0, #0 - beq _021D40EA - add r0, r4, #0 - mov r1, #0 - add r2, r4, #0 - bl ov19_021D5BE8 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x16 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D40EA: - add r0, r4, #0 - mov r1, #0xe - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4104: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D4172 - add r0, r4, #0 - mov r1, #0xf - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D412C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D4172 - ldr r0, _021D417C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D4172 - ldr r0, _021D4180 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D415E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D4172 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D4172: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D4174: .word 0x021E05E0 -_021D4178: .word 0x000005F3 -_021D417C: .word 0x021BF67C -_021D4180: .word 0x000005DD - thumb_func_end ov19_021D3FB0 - - thumb_func_start ov19_021D4184 -ov19_021D4184: ; 0x021D4184 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #6 - bhi _021D4238 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D419C: ; jump table - .short _021D41AA - _021D419C - 2 ; case 0 - .short _021D4210 - _021D419C - 2 ; case 1 - .short _021D427A - _021D419C - 2 ; case 2 - .short _021D42E2 - _021D419C - 2 ; case 3 - .short _021D4310 - _021D419C - 2 ; case 4 - .short _021D4338 - _021D419C - 2 ; case 5 - .short _021D436A - _021D419C - 2 ; case 6 -_021D41AA: - bl ov19_021D5F88 - ldr r1, _021D4380 ; =0x021E05E0 - str r0, [r1, #0] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _021D41DE - ldr r0, _021D4384 ; =0x000005F3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x18 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D41DE: - mov r0, #0x67 - ldr r2, _021D4380 ; =0x021E05E0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200B70C - add r0, r4, #0 - mov r1, #0x1a - bl ov19_021D5408 - add r0, r4, #0 - mov r1, #0 - bl ov19_021DF964 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl ov19_021D6594 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4210: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D4238 - add r0, r4, #0 - bl ov19_021DFD2C - cmp r0, #0x36 - bgt _021D4242 - bge _021D4268 - mov r2, #0 - mvn r2, r2 - cmp r0, r2 - bgt _021D4238 - sub r1, r2, #1 - cmp r0, r1 - bge _021D423A -_021D4238: - b _021D437E -_021D423A: - beq _021D4248 - cmp r0, r2 - beq _021D4256 - pop {r3, r4, r5, pc} -_021D4242: - cmp r0, #0x37 - beq _021D4256 - pop {r3, r4, r5, pc} -_021D4248: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1c - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D4256: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4268: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D427A: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207D990 - ldr r1, _021D4380 ; =0x021E05E0 - mov r2, #1 - ldr r1, [r1, #0] - mov r3, #9 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0207D570 - cmp r0, #0 - beq _021D42C8 - add r0, r4, #0 - bl ov19_021D5F7C - cmp r0, #0 - beq _021D42AC - add r0, r4, #0 - bl ov19_021D5D54 - mov r0, #4 - b _021D42B8 -_021D42AC: - add r0, r4, #0 - mov r1, #0 - add r2, r4, #0 - bl ov19_021D5BE8 - mov r0, #3 -_021D42B8: - str r0, [r5, #0] - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x17 - bl ov19_021D6594 - pop {r3, r4, r5, pc} -_021D42C8: - add r0, r4, #0 - mov r1, #0xe - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D42E2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x17 - bl ov19_021D6600 - cmp r0, #0 - beq _021D437E - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x16 - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4310: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D437E - add r0, r4, #0 - mov r1, #0x1b - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #5 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D4338: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D437E - ldr r0, _021D4388 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021D437E - ldr r0, _021D438C ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1a - bl ov19_021D6594 - mov r0, #6 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D436A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D437E - add r0, r4, #0 - bl ov19_021D0EC0 -_021D437E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D4380: .word 0x021E05E0 -_021D4384: .word 0x000005F3 -_021D4388: .word 0x021BF67C -_021D438C: .word 0x000005DD - thumb_func_end ov19_021D4184 - - thumb_func_start ov19_021D4390 -ov19_021D4390: ; 0x021D4390 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #4 - bhi _021D4434 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D43A8: ; jump table - .short _021D43B2 - _021D43A8 - 2 ; case 0 - .short _021D43C6 - _021D43A8 - 2 ; case 1 - .short _021D43EA - _021D43A8 - 2 ; case 2 - .short _021D4402 - _021D43A8 - 2 ; case 3 - .short _021D441E - _021D43A8 - 2 ; case 4 -_021D43B2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1a - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D43C6: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1a - bl ov19_021D6600 - cmp r0, #0 - beq _021D4434 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x11 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D43EA: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x11 - bl ov19_021D6600 - cmp r0, #0 - beq _021D4434 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D4402: - ldr r0, _021D4438 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0xf3 - tst r1, r0 - beq _021D4434 - add r0, #0x21 - ldr r0, [r5, r0] - mov r1, #0x12 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D441E: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x12 - bl ov19_021D6600 - cmp r0, #0 - beq _021D4434 - add r0, r5, #0 - bl ov19_021D0EC0 -_021D4434: - pop {r3, r4, r5, pc} - nop -_021D4438: .word 0x021BF67C - thumb_func_end ov19_021D4390 - - thumb_func_start ov19_021D443C -ov19_021D443C: ; 0x021D443C - push {r4, r5} - mov r3, #0x6f - lsl r3, r3, #2 - mov r5, #0 - str r5, [r0, r3] - add r4, r3, #5 - strb r1, [r0, r4] - add r1, r3, #6 - strh r2, [r0, r1] - add r1, r3, #4 - strb r5, [r0, r1] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D443C - - thumb_func_start ov19_021D4458 -ov19_021D4458: ; 0x021D4458 - mov r1, #0x6f - mov r2, #0 - lsl r1, r1, #2 - str r2, [r0, r1] - mov r2, #1 - add r1, r1, #4 - strb r2, [r0, r1] - bx lr - thumb_func_end ov19_021D4458 - - thumb_func_start ov19_021D4468 -ov19_021D4468: ; 0x021D4468 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x6f - lsl r0, r0, #2 - add r4, r5, r0 - ldr r1, [r4, #0] - cmp r1, #3 - bls _021D447A - b _021D459C -_021D447A: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D4486: ; jump table - .short _021D448E - _021D4486 - 2 ; case 0 - .short _021D44C4 - _021D4486 - 2 ; case 1 - .short _021D44EC - _021D4486 - 2 ; case 2 - .short _021D44FE - _021D4486 - 2 ; case 3 -_021D448E: - ldrb r0, [r4, #4] - cmp r0, #1 - bne _021D449A - mov r0, #1 - str r0, [r4, #0] - b _021D459C -_021D449A: - mov r0, #5 - ldrsb r1, [r4, r0] - sub r0, r0, #6 - cmp r1, r0 - bne _021D44A8 - mov r0, #0 - strb r0, [r4, #5] -_021D44A8: - mov r1, #5 - ldrsb r1, [r4, r1] - add r0, r5, #0 - bl ov19_021D5D20 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1e - bl ov19_021D6594 - mov r0, #1 - str r0, [r4, #0] - b _021D459C -_021D44C4: - sub r0, #0xa8 - ldr r0, [r5, r0] - mov r1, #0x1e - bl ov19_021D6600 - cmp r0, #0 - beq _021D459C - ldrh r1, [r4, #6] - add r0, r5, #0 - bl ov19_021D5408 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x18 - bl ov19_021D6594 - mov r0, #2 - str r0, [r4, #0] - b _021D459C -_021D44EC: - sub r0, #0xa8 - ldr r0, [r5, r0] - mov r1, #0x18 - bl ov19_021D6600 - cmp r0, #0 - beq _021D459C - mov r0, #3 - str r0, [r4, #0] -_021D44FE: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1f - bl ov19_021D6600 - cmp r0, #0 - beq _021D459C - ldr r0, _021D45A0 ; =0x021BF67C - mov r1, #0x22 - ldr r0, [r0, #0x48] - lsl r1, r1, #4 - add r2, r0, #0 - tst r2, r1 - beq _021D4546 - mov r0, #5 - ldrsb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, #5] - ldrsb r0, [r4, r0] - cmp r0, #0 - bge _021D452E - mov r0, #0x11 - strb r0, [r4, #5] -_021D452E: - mov r1, #5 - ldrsb r1, [r4, r1] - add r0, r5, #0 - bl ov19_021D5D20 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1f - bl ov19_021D6594 - b _021D459C -_021D4546: - lsr r1, r1, #1 - tst r1, r0 - beq _021D4576 - mov r0, #5 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #5] - ldrsb r0, [r4, r0] - cmp r0, #0x12 - blt _021D455E - mov r0, #0 - strb r0, [r4, #5] -_021D455E: - mov r1, #5 - ldrsb r1, [r4, r1] - add r0, r5, #0 - bl ov19_021D5D20 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x1f - bl ov19_021D6594 - b _021D459C -_021D4576: - mov r1, #1 - tst r1, r0 - beq _021D4586 - ldr r0, _021D45A4 ; =0x000005DD - bl sub_02005748 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D4586: - mov r1, #2 - tst r0, r1 - beq _021D459C - ldr r0, _021D45A4 ; =0x000005DD - bl sub_02005748 - mov r0, #0 - mvn r0, r0 - strb r0, [r4, #5] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D459C: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D45A0: .word 0x021BF67C -_021D45A4: .word 0x000005DD - thumb_func_end ov19_021D4468 - - thumb_func_start ov19_021D45A8 -ov19_021D45A8: ; 0x021D45A8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0 - beq _021D45BE - cmp r1, #1 - beq _021D45E8 - cmp r1, #2 - beq _021D4628 - pop {r3, r4, r5, pc} -_021D45BE: - bl ov19_021D5E68 - add r1, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02079A94 - add r0, r5, #0 - bl ov19_021D52F4 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #4 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D45E8: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #4 - bl ov19_021D6600 - cmp r0, #0 - beq _021D463E - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D4620 - add r0, r5, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D4620 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl ov19_021D6594 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D4620: - add r0, r5, #0 - bl ov19_021D0EC0 - pop {r3, r4, r5, pc} -_021D4628: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl ov19_021D6600 - cmp r0, #0 - beq _021D463E - add r0, r5, #0 - bl ov19_021D0EC0 -_021D463E: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D45A8 - - thumb_func_start ov19_021D4640 -ov19_021D4640: ; 0x021D4640 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r0, #0 - ldr r0, [r6, #0] - cmp r0, #5 - bhi _021D46C2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4658: ; jump table - .short _021D4664 - _021D4658 - 2 ; case 0 - .short _021D46B2 - _021D4658 - 2 ; case 1 - .short _021D4862 - _021D4658 - 2 ; case 2 - .short _021D48B8 - _021D4658 - 2 ; case 3 - .short _021D48F4 - _021D4658 - 2 ; case 4 - .short _021D490A - _021D4658 - 2 ; case 5 -_021D4664: - ldr r0, _021D4920 ; =0x000005E4 - bl sub_02005748 - add r0, r4, #0 - mov r1, #1 - bl ov19_021D5D94 - add r0, r4, #0 - bl ov19_021D5E68 - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D5D9C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x28 - bl ov19_021D6594 - mov r0, #0x58 - str r0, [sp] - mov r0, #0x72 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - mov r2, #0xc0 - mov r3, #0x38 - bl ov19_021D603C - mov r0, #0x81 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r1, #1 - add r0, r0, #4 - str r1, [r4, r0] - str r1, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D46B2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x28 - bl ov19_021D6600 - cmp r0, #0 - bne _021D46C4 -_021D46C2: - b _021D491E -_021D46C4: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D46F4 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #1 - bne _021D46F4 - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D46EC - ldr r1, _021D4924 ; =ov19_021D4938 - add r0, r4, #0 - bl ov19_021D0EB0 - pop {r3, r4, r5, r6, r7, pc} -_021D46EC: - ldr r0, _021D4928 ; =0x000005F3 - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021D46F4: - ldr r0, _021D492C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0xf3 - tst r0, r1 - beq _021D472C - ldr r0, _021D4930 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - bl ov19_021D5D94 - add r0, r4, #0 - bl ov19_021D5E68 - add r1, r0, #0 - add r0, r4, #0 - bl ov19_021D5D9C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x28 - bl ov19_021D6594 - mov r0, #5 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D472C: - mov r1, #0x81 - lsl r1, r1, #2 - ldr r0, [r4, r1] - cmp r0, #0 - beq _021D47A4 - add r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D47A4 - sub r0, r1, #4 - ldr r0, [r4, r0] - add r2, r0, #1 - sub r0, r1, #4 - str r2, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0x14 - bls _021D47A4 - add r0, r4, #0 - bl ov19_021D5EB8 - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov19_021D5D08 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, r5, #0 - bl sub_02079A94 - add r0, r4, #0 - bl ov19_021D52F4 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D4786 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #8 - bl ov19_021D6594 -_021D4786: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl ov19_021D6594 - mov r0, #0x81 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, r0, #4 - str r1, [r4, r0] - mov r0, #3 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D47A4: - mov r0, #0x72 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov19_021D60A8 - cmp r0, #1 - beq _021D47BC - cmp r0, #2 - beq _021D47DC - cmp r0, #3 - beq _021D4836 - pop {r3, r4, r5, r6, r7, pc} -_021D47BC: - add r0, r4, #0 - bl ov19_021D5EB8 - mov r1, #0x7f - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - mov r2, #0 - add r0, #8 - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0x10 - str r2, [r4, r0] - add r1, #0xc - str r2, [r4, r1] - pop {r3, r4, r5, r6, r7, pc} -_021D47DC: - mov r0, #0x72 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov19_021D614C - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r5, r0 - bne _021D47F4 - b _021D491E -_021D47F4: - sub r7, r5, r0 - add r0, r4, #0 - bl ov19_021D5EB8 - add r1, r7, r0 - bpl _021D4804 - add r1, #0x12 - b _021D480A -_021D4804: - cmp r1, #0x12 - blt _021D480A - sub r1, #0x12 -_021D480A: - mov r0, #0x83 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - bl ov19_021D5D9C - add r0, r4, #0 - add r1, r7, #0 - bl ov19_021D5DAC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x29 - bl ov19_021D6594 - ldr r0, _021D4934 ; =0x000005DC - bl sub_02005748 - mov r0, #2 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D4836: - add r0, r4, #0 - bl ov19_021D5E68 - add r5, r0, #0 - add r0, r4, #0 - bl ov19_021D5EB8 - cmp r5, r0 - beq _021D484C - mov r1, #1 - b _021D484E -_021D484C: - mov r1, #0 -_021D484E: - mov r0, #0x81 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r1, r0, #4 - mov r2, #0 - str r2, [r4, r1] - mov r1, #1 - add r0, r0, #4 - str r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D4862: - mov r0, #0x82 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _021D48A2 - sub r0, #0x40 - add r0, r4, r0 - bl ov19_021D60A8 - cmp r0, #3 - bne _021D48A2 - add r0, r4, #0 - bl ov19_021D5E68 - add r5, r0, #0 - add r0, r4, #0 - bl ov19_021D5EB8 - cmp r5, r0 - beq _021D488E - mov r1, #1 - b _021D4890 -_021D488E: - mov r1, #0 -_021D4890: - mov r0, #0x81 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r1, r0, #4 - mov r2, #0 - str r2, [r4, r1] - mov r1, #1 - add r0, r0, #4 - str r1, [r4, r0] -_021D48A2: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x29 - bl ov19_021D6600 - cmp r0, #0 - beq _021D491E - mov r0, #1 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D48B8: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl ov19_021D6600 - cmp r0, #0 - beq _021D491E - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D48EE - add r0, r4, #0 - bl ov19_021D5E34 - cmp r0, #0 - beq _021D48EE - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6594 - mov r0, #4 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D48EE: - mov r0, #1 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D48F4: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl ov19_021D6600 - cmp r0, #0 - beq _021D491E - mov r0, #1 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D490A: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D491E - add r0, r4, #0 - bl ov19_021D0EC0 -_021D491E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4920: .word 0x000005E4 -_021D4924: .word ov19_021D4938 -_021D4928: .word 0x000005F3 -_021D492C: .word 0x021BF67C -_021D4930: .word 0x000005DD -_021D4934: .word 0x000005DC - thumb_func_end ov19_021D4640 - - thumb_func_start ov19_021D4938 -ov19_021D4938: ; 0x021D4938 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - add r4, r0, #0 - ldr r0, [r6, #0] - cmp r0, #3 - bhi _021D49BC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4952: ; jump table - .short _021D495A - _021D4952 - 2 ; case 0 - .short _021D49AC - _021D4952 - 2 ; case 1 - .short _021D4B04 - _021D4952 - 2 ; case 2 - .short _021D4B5C - _021D4952 - 2 ; case 3 -_021D495A: - ldr r0, _021D4B74 ; =0x000005E4 - bl sub_02005748 - add r0, r4, #0 - mov r1, #2 - bl ov19_021D5D94 - add r0, r4, #0 - mov r1, #0 - bl ov19_021D5DA4 - add r0, r4, #0 - mov r1, #0 - bl ov19_021D5D9C - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x28 - bl ov19_021D6594 - mov r0, #0x58 - str r0, [sp] - mov r0, #0x72 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0xff - mov r2, #0xc0 - mov r3, #0x38 - bl ov19_021D603C - mov r0, #0x81 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r1, #1 - add r0, r0, #4 - str r1, [r4, r0] - add sp, #8 - str r1, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D49AC: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x28 - bl ov19_021D6600 - cmp r0, #0 - bne _021D49BE -_021D49BC: - b _021D4B70 -_021D49BE: - add r0, r4, #0 - bl ov19_021D538C - cmp r0, #0 - beq _021D49DE - mov r0, #0x61 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021D49DE - ldr r1, _021D4B78 ; =ov19_021D4640 - add r0, r4, #0 - bl ov19_021D0EB0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_021D49DE: - ldr r0, _021D4B7C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0xf3 - tst r0, r1 - beq _021D4A06 - ldr r0, _021D4B80 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - bl ov19_021D5D94 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x28 - bl ov19_021D6594 - mov r0, #3 - str r0, [r6, #0] -_021D4A06: - add r0, r4, #0 - bl ov19_021D4B88 - cmp r0, #0 - beq _021D4A32 - ldr r0, _021D4B80 ; =0x000005DD - bl sub_02005748 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x2a - bl ov19_021D6594 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x27 - bl ov19_021D6594 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_021D4A32: - mov r0, #0x72 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov19_021D60A8 - cmp r0, #1 - beq _021D4A4C - cmp r0, #2 - beq _021D4A6E - cmp r0, #3 - beq _021D4AD6 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_021D4A4C: - add r0, r4, #0 - bl ov19_021D5EB8 - mov r1, #0x7f - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - mov r2, #0 - add r0, #8 - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0x10 - str r2, [r4, r0] - add r1, #0xc - add sp, #8 - str r2, [r4, r1] - pop {r3, r4, r5, r6, r7, pc} -_021D4A6E: - mov r0, #0x72 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov19_021D614C - add r7, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r7, r0 - beq _021D4B70 - sub r0, r7, r0 - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D5EB8 - ldr r1, [sp, #4] - add r5, r1, r0 - bpl _021D4A98 - add r5, #8 - b _021D4A9E -_021D4A98: - cmp r5, #8 - blt _021D4A9E - sub r5, #8 -_021D4A9E: - mov r0, #0x83 - lsl r0, r0, #2 - str r7, [r4, r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov19_021D5D9C - add r0, r4, #0 - add r1, r5, #0 - bl ov19_021D5DA4 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov19_021D5DAC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x29 - bl ov19_021D6594 - ldr r0, _021D4B84 ; =0x000005DC - bl sub_02005748 - mov r0, #2 - add sp, #8 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D4AD6: - add r0, r4, #0 - bl ov19_021D5E68 - add r5, r0, #0 - add r0, r4, #0 - bl ov19_021D5EB8 - cmp r5, r0 - beq _021D4AEC - mov r1, #1 - b _021D4AEE -_021D4AEC: - mov r1, #0 -_021D4AEE: - mov r0, #0x81 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r1, r0, #4 - mov r2, #0 - str r2, [r4, r1] - mov r1, #1 - add r0, r0, #4 - add sp, #8 - str r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D4B04: - mov r0, #0x82 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _021D4B44 - sub r0, #0x40 - add r0, r4, r0 - bl ov19_021D60A8 - cmp r0, #3 - bne _021D4B44 - add r0, r4, #0 - bl ov19_021D5E68 - add r5, r0, #0 - add r0, r4, #0 - bl ov19_021D5EB8 - cmp r5, r0 - beq _021D4B30 - mov r1, #1 - b _021D4B32 -_021D4B30: - mov r1, #0 -_021D4B32: - mov r0, #0x81 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r1, r0, #4 - mov r2, #0 - str r2, [r4, r1] - mov r1, #1 - add r0, r0, #4 - str r1, [r4, r0] -_021D4B44: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x29 - bl ov19_021D6600 - cmp r0, #0 - beq _021D4B70 - mov r0, #1 - add sp, #8 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D4B5C: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov19_021D6628 - cmp r0, #0 - beq _021D4B70 - add r0, r4, #0 - bl ov19_021D0EC0 -_021D4B70: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4B74: .word 0x000005E4 -_021D4B78: .word ov19_021D4640 -_021D4B7C: .word 0x021BF67C -_021D4B80: .word 0x000005DD -_021D4B84: .word 0x000005DC - thumb_func_end ov19_021D4938 - - thumb_func_start ov19_021D4B88 -ov19_021D4B88: ; 0x021D4B88 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x62 - mov r1, #8 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #8 - ldr r0, [r4, r0] - bl sub_0202404C - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #8 - beq _021D4BAA - mov r0, #1 - pop {r4, pc} -_021D4BAA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4B88 - - thumb_func_start ov19_021D4BB0 -ov19_021D4BB0: ; 0x021D4BB0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x62 - add r4, r2, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #8 - bne _021D4BDE - cmp r1, #0 - bne _021D4BDE - add r0, r4, #0 - bl ov19_021D5EC0 - add r1, r0, r5 - cmp r1, #8 - blo _021D4BD2 - sub r1, #8 -_021D4BD2: - add r0, r4, #0 - bl ov19_021D5DB4 - mov r0, #0x62 - lsl r0, r0, #2 - str r5, [r4, r0] -_021D4BDE: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D4BB0 - - thumb_func_start ov19_021D4BE0 -ov19_021D4BE0: ; 0x021D4BE0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl sub_02024420 - mov r1, #0x12 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r2, [r4, #0] - sub r0, r1, #4 - str r2, [r5, r0] - ldr r0, [r4, #0] - bl sub_0207A268 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #0] - bl sub_02025E44 - mov r1, #0x69 - lsl r1, r1, #2 - str r0, [r5, r1] - sub r1, #0x8c - str r4, [r5, r1] - mov r0, #0 - mov r1, #0x1a - mov r2, #0x13 - mov r3, #9 - str r0, [r4, #8] - bl sub_0200B144 - mov r2, #0x63 - lsl r2, r2, #2 - str r0, [r5, r2] - mov r0, #1 - mov r1, #0x1a - add r2, #0x10 - mov r3, #9 - bl sub_0200B144 - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xca - mov r3, #9 - bl sub_0200B144 - mov r2, #0x65 - lsl r2, r2, #2 - str r0, [r5, r2] - mov r0, #0 - mov r1, #0x1a - add r2, #0xce - mov r3, #9 - bl sub_0200B144 - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #9 - bl sub_0200B358 - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r5, r1] - bl sub_02073C70 - add r1, r0, #0 - mov r0, #9 - bl sub_02018144 - mov r1, #0x1a - lsl r1, r1, #4 - str r0, [r5, r1] - sub r0, r1, #4 - ldr r0, [r5, r0] - cmp r0, #0 - bne _021D4C88 - bl sub_02022974 -_021D4C88: - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - str r0, [sp] - mov r0, #9 - mov r2, #0 - mov r3, #8 - bl sub_0208712C - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #4] - cmp r0, #4 - beq _021D4CBA - mov r0, #9 - str r0, [sp] - ldr r0, _021D4D44 ; =0x021DFDF6 - ldr r2, _021D4D48 ; =ov19_021D53B8 - mov r1, #3 - add r3, r5, #0 - bl sub_02023FCC - b _021D4CCA -_021D4CBA: - mov r0, #9 - str r0, [sp] - ldr r0, _021D4D4C ; =0x021DFE02 - ldr r2, _021D4D48 ; =ov19_021D53B8 - mov r1, #4 - add r3, r5, #0 - bl sub_02023FCC -_021D4CCA: - mov r1, #0x5f - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #9 - str r0, [sp] - ldr r0, _021D4D50 ; =0x021DFE12 - ldr r2, _021D4D54 ; =ov19_021D4BB0 - mov r1, #7 - add r3, r5, #0 - bl sub_02023FCC - mov r1, #6 - lsl r1, r1, #6 - str r0, [r5, r1] - add r0, r1, #0 - sub r0, #0x60 - ldr r0, [r5, r0] - mov r2, #0 - str r0, [r5, #0] - add r0, r1, #0 - sub r0, #0x5c - ldr r0, [r5, r0] - str r0, [r5, #4] - add r0, r1, #0 - sub r0, #0x70 - strh r2, [r5, r0] - sub r1, #0x6e - strh r2, [r5, r1] - add r0, r5, #0 - ldr r1, [r4, #4] - add r0, #0x48 - bl ov19_021D4DE4 - add r0, r5, #0 - add r0, #0x4c - bl ov19_021D4E88 - mov r0, #0x12 - lsl r0, r0, #4 - add r1, r5, #0 - ldr r0, [r5, r0] - add r1, #0x40 - bl ov19_021D4E5C - add r0, r5, #0 - add r0, #0xa4 - bl ov19_021D4EE4 - add r0, r5, #0 - bl ov19_021D4DF0 - add r0, r5, #0 - add r0, #0x14 - bl ov19_021D4E30 - add r5, #0x9c - add r0, r5, #0 - bl ov19_021D4F34 - pop {r3, r4, r5, pc} - nop -_021D4D44: .word 0x021DFDF6 -_021D4D48: .word ov19_021D53B8 -_021D4D4C: .word 0x021DFE02 -_021D4D50: .word 0x021DFE12 -_021D4D54: .word ov19_021D4BB0 - thumb_func_end ov19_021D4BE0 - - thumb_func_start ov19_021D4D58 -ov19_021D4D58: ; 0x021D4D58 - push {r4, lr} - add r4, r0, #0 - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D4D7E - bl sub_020181C4 -_021D4D7E: - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200B3F0 - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0208716C - add r0, r4, #0 - add r0, #0x4c - bl ov19_021D4EC0 - add r0, r4, #0 - add r0, #0x14 - bl ov19_021D4E50 - add r0, r4, #0 - add r0, #0x40 - bl ov19_021D4E7C - add r0, r4, #0 - add r0, #0xa4 - bl ov19_021D4F18 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4D58 - - thumb_func_start ov19_021D4DE4 -ov19_021D4DE4: ; 0x021D4DE4 - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - strh r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D4DE4 - - thumb_func_start ov19_021D4DF0 -ov19_021D4DF0: ; 0x021D4DF0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0 - add r4, r5, #0 - add r2, r1, #0 - add r4, #8 - bl ov19_021D5410 - mov r2, #0 - add r0, r5, #0 - strb r2, [r4, #8] - mov r1, #1 - strb r1, [r4, #9] - add r0, #0x48 - ldrb r0, [r0] - cmp r0, #0 - beq _021D4E18 - cmp r0, #4 - beq _021D4E1C - b _021D4E22 -_021D4E18: - strb r1, [r4, #4] - b _021D4E24 -_021D4E1C: - mov r0, #2 - strb r0, [r4, #4] - b _021D4E24 -_021D4E22: - strb r2, [r4, #4] -_021D4E24: - mov r0, #1 - strb r0, [r4, #0xb] - add r0, r5, #0 - bl ov19_021D52F4 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D4DF0 - - thumb_func_start ov19_021D4E30 -ov19_021D4E30: ; 0x021D4E30 - push {r4, lr} - add r4, r0, #0 - bl sub_02076AF4 - add r2, r0, #0 - mov r1, #0x1e - mov r0, #9 - mul r1, r2 - bl sub_02018144 - str r0, [r4, #0] - mov r0, #0 - strb r0, [r4, #8] - strb r0, [r4, #0xb] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4E30 - - thumb_func_start ov19_021D4E50 -ov19_021D4E50: ; 0x021D4E50 - ldr r3, _021D4E58 ; =sub_020181C4 - ldr r0, [r0, #0] - bx r3 - nop -_021D4E58: .word sub_020181C4 - thumb_func_end ov19_021D4E50 - - thumb_func_start ov19_021D4E5C -ov19_021D4E5C: ; 0x021D4E5C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl sub_0207999C - strb r0, [r4] - mov r0, #0x14 - mov r1, #9 - bl sub_02023790 - str r0, [r4, #4] - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021D4F40 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D4E5C - - thumb_func_start ov19_021D4E7C -ov19_021D4E7C: ; 0x021D4E7C - ldr r3, _021D4E84 ; =sub_020237BC - ldr r0, [r0, #4] - bx r3 - nop -_021D4E84: .word sub_020237BC - thumb_func_end ov19_021D4E7C - - thumb_func_start ov19_021D4E88 -ov19_021D4E88: ; 0x021D4E88 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xc - mov r1, #9 - bl sub_02023790 - str r0, [r4, #0x14] - mov r0, #0xc - mov r1, #9 - bl sub_02023790 - str r0, [r4, #0x18] - mov r0, #0x12 - mov r1, #9 - bl sub_02023790 - str r0, [r4, #0x1c] - mov r0, #0xc - mov r1, #9 - bl sub_02023790 - str r0, [r4, #0x20] - mov r0, #0x10 - mov r1, #9 - bl sub_02023790 - str r0, [r4, #0x24] - pop {r4, pc} - thumb_func_end ov19_021D4E88 - - thumb_func_start ov19_021D4EC0 -ov19_021D4EC0: ; 0x021D4EC0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_020237BC - ldr r0, [r4, #0x18] - bl sub_020237BC - ldr r0, [r4, #0x1c] - bl sub_020237BC - ldr r0, [r4, #0x20] - bl sub_020237BC - ldr r0, [r4, #0x24] - bl sub_020237BC - pop {r4, pc} - thumb_func_end ov19_021D4EC0 - - thumb_func_start ov19_021D4EE4 -ov19_021D4EE4: ; 0x021D4EE4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r4, #0 - strb r4, [r6] - strb r4, [r6, #1] - str r4, [r6, #4] - add r5, r6, #0 - add r7, r4, #0 -_021D4EF4: - add r0, r6, r4 - strb r7, [r0, #2] - mov r0, #0xc - mov r1, #9 - bl sub_02023790 - str r0, [r5, #0x30] - mov r0, #0xc - mov r1, #9 - bl sub_02023790 - str r0, [r5, #0x34] - add r4, r4, #1 - add r5, #0x30 - cmp r4, #2 - blt _021D4EF4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4EE4 - - thumb_func_start ov19_021D4F18 -ov19_021D4F18: ; 0x021D4F18 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021D4F1E: - ldr r0, [r5, #0x30] - bl sub_020237BC - ldr r0, [r5, #0x34] - bl sub_020237BC - add r4, r4, #1 - add r5, #0x30 - cmp r4, #2 - blt _021D4F1E - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D4F18 - - thumb_func_start ov19_021D4F34 -ov19_021D4F34: ; 0x021D4F34 - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #2] - strb r1, [r0, #1] - strh r1, [r0, #4] - bx lr - thumb_func_end ov19_021D4F34 - - thumb_func_start ov19_021D4F40 -ov19_021D4F40: ; 0x021D4F40 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4] - add r5, r0, #0 - bl sub_02079AA8 - strb r0, [r4, #1] - ldrb r1, [r4] - ldr r2, [r4, #4] - add r0, r5, #0 - bl sub_02079AF4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4F40 - - thumb_func_start ov19_021D4F5C -ov19_021D4F5C: ; 0x021D4F5C - push {r4, lr} - add r2, r0, #0 - add r4, r2, #0 - add r2, #0x40 - add r0, r1, #0 - ldrb r1, [r2] - add r4, #0x40 - bl sub_02079AA8 - strb r0, [r4, #1] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4F5C - - thumb_func_start ov19_021D4F74 -ov19_021D4F74: ; 0x021D4F74 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r4, #0 - tst r2, r1 - beq _021D4F90 - add r0, r5, #0 - sub r1, #0x21 - add r2, r4, #0 - bl ov19_021D4FDC - add r4, r0, #0 - b _021D4FCC -_021D4F90: - mov r1, #0x10 - tst r1, r0 - beq _021D4FA4 - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - bl ov19_021D4FDC - add r4, r0, #0 - b _021D4FCC -_021D4FA4: - mov r2, #0x40 - add r1, r0, #0 - tst r1, r2 - beq _021D4FBA - add r0, r5, #0 - add r1, r4, #0 - sub r2, #0x41 - bl ov19_021D4FDC - add r4, r0, #0 - b _021D4FCC -_021D4FBA: - mov r1, #0x80 - tst r0, r1 - beq _021D4FCC - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov19_021D4FDC - add r4, r0, #0 -_021D4FCC: - cmp r4, #1 - bne _021D4FD6 - add r0, r5, #0 - bl ov19_021D52F4 -_021D4FD6: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4F74 - - thumb_func_start ov19_021D4FDC -ov19_021D4FDC: ; 0x021D4FDC - push {r4, lr} - add r3, r0, #0 - add r3, #8 - ldrb r4, [r3, #4] - cmp r4, #4 - bhi _021D502A - add r4, r4, r4 - add r4, pc - ldrh r4, [r4, #6] - lsl r4, r4, #0x10 - asr r4, r4, #0x10 - add pc, r4 -_021D4FF4: ; jump table - .short _021D4FFE - _021D4FF4 - 2 ; case 0 - .short _021D50E0 - _021D4FF4 - 2 ; case 1 - .short _021D505E - _021D4FF4 - 2 ; case 2 - .short _021D50B4 - _021D4FF4 - 2 ; case 3 - .short _021D5088 - _021D4FF4 - 2 ; case 4 -_021D4FFE: - cmp r1, #0 - beq _021D5026 - mov r2, #5 - ldrsb r4, [r3, r2] - add r1, r4, r1 - strb r1, [r3, #5] - ldrsb r1, [r3, r2] - cmp r1, #0 - bge _021D5014 - add r1, r2, #0 - b _021D501A -_021D5014: - cmp r1, #6 - blt _021D501A - mov r1, #0 -_021D501A: - mov r2, #6 - ldrsb r2, [r3, r2] - bl ov19_021D5410 - mov r0, #1 - pop {r4, pc} -_021D5026: - cmp r2, #0 - bne _021D502C -_021D502A: - b _021D514A -_021D502C: - mov r1, #6 - ldrsb r1, [r3, r1] - add r2, r1, r2 - bpl _021D503C - mov r1, #2 - mov r2, #0 - strb r1, [r3, #4] - b _021D5052 -_021D503C: - cmp r2, #4 - ble _021D5052 - mov r1, #5 - ldrsb r1, [r3, r1] - mov r2, #4 - cmp r1, #5 - bne _021D504E - add r1, r2, #0 - b _021D5050 -_021D504E: - mov r1, #3 -_021D5050: - strb r1, [r3, #4] -_021D5052: - mov r1, #5 - ldrsb r1, [r3, r1] - bl ov19_021D5410 - mov r0, #1 - pop {r4, pc} -_021D505E: - cmp r2, #0 - ble _021D5072 - mov r2, #0 - strb r2, [r3, #4] - mov r1, #5 - ldrsb r1, [r3, r1] - bl ov19_021D5410 - mov r0, #1 - pop {r4, pc} -_021D5072: - bge _021D514A - mov r0, #5 - ldrsb r0, [r3, r0] - cmp r0, #5 - bne _021D5080 - mov r0, #4 - b _021D5082 -_021D5080: - mov r0, #3 -_021D5082: - strb r0, [r3, #4] - mov r0, #1 - pop {r4, pc} -_021D5088: - cmp r2, #0 - bge _021D509E - mov r1, #0 - strb r1, [r3, #4] - mov r1, #5 - ldrsb r1, [r3, r1] - mov r2, #4 - bl ov19_021D5410 - mov r0, #1 - pop {r4, pc} -_021D509E: - ble _021D50A8 - mov r0, #2 - strb r0, [r3, #4] - mov r0, #1 - pop {r4, pc} -_021D50A8: - cmp r1, #0 - beq _021D514A - mov r0, #3 - strb r0, [r3, #4] - mov r0, #1 - pop {r4, pc} -_021D50B4: - cmp r2, #0 - bge _021D50CA - mov r1, #0 - strb r1, [r3, #4] - mov r1, #5 - ldrsb r1, [r3, r1] - mov r2, #4 - bl ov19_021D5410 - mov r0, #1 - pop {r4, pc} -_021D50CA: - ble _021D50D4 - mov r0, #2 - strb r0, [r3, #4] - mov r0, #1 - pop {r4, pc} -_021D50D4: - cmp r1, #0 - beq _021D514A - mov r0, #4 - strb r0, [r3, #4] - mov r0, #1 - pop {r4, pc} -_021D50E0: - mov r4, #8 - ldrsb r0, [r3, r4] - cmp r2, #0 - bge _021D5102 - cmp r0, #6 - bne _021D50F2 - mov r1, #5 - strb r1, [r3, #8] - b _021D513E -_021D50F2: - sub r1, r0, #2 - strb r1, [r3, #8] - ldrsb r1, [r3, r4] - cmp r1, #0 - bge _021D513E - mov r1, #6 - strb r1, [r3, #8] - b _021D513E -_021D5102: - ble _021D511E - cmp r0, #6 - bne _021D510E - mov r1, #0 - strb r1, [r3, #8] - b _021D513E -_021D510E: - add r1, r0, #2 - strb r1, [r3, #8] - ldrsb r1, [r3, r4] - cmp r1, #6 - blt _021D513E - mov r1, #6 - strb r1, [r3, #8] - b _021D513E -_021D511E: - cmp r1, #0 - bge _021D512E - mov r1, #1 - tst r1, r0 - beq _021D513E - sub r1, r0, #1 - strb r1, [r3, #8] - b _021D513E -_021D512E: - ble _021D513E - cmp r0, #6 - beq _021D513E - mov r1, #1 - tst r1, r0 - bne _021D513E - add r1, r0, #1 - strb r1, [r3, #8] -_021D513E: - mov r1, #8 - ldrsb r1, [r3, r1] - cmp r0, r1 - beq _021D514A - mov r0, #1 - pop {r4, pc} -_021D514A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D4FDC - - thumb_func_start ov19_021D5150 -ov19_021D5150: ; 0x021D5150 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r4, #0 - tst r2, r1 - beq _021D516C - add r0, r5, #0 - sub r1, #0x21 - add r2, r4, #0 - bl ov19_021D51CC - add r4, r0, #0 - b _021D51BE -_021D516C: - mov r1, #0x10 - tst r1, r0 - beq _021D5180 - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - bl ov19_021D51CC - add r4, r0, #0 - b _021D51BE -_021D5180: - mov r2, #0x40 - add r1, r0, #0 - tst r1, r2 - beq _021D5196 - add r0, r5, #0 - add r1, r4, #0 - sub r2, #0x41 - bl ov19_021D51CC - add r4, r0, #0 - b _021D51BE -_021D5196: - mov r2, #0x80 - add r1, r0, #0 - tst r1, r2 - beq _021D51AC - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov19_021D51CC - add r4, r0, #0 - b _021D51BE -_021D51AC: - lsl r1, r2, #2 - tst r1, r0 - beq _021D51B6 - mov r4, #3 - b _021D51BE -_021D51B6: - add r2, #0x80 - tst r0, r2 - beq _021D51BE - mov r4, #4 -_021D51BE: - cmp r4, #1 - bne _021D51C8 - add r0, r5, #0 - bl ov19_021D52F4 -_021D51C8: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D5150 - - thumb_func_start ov19_021D51CC -ov19_021D51CC: ; 0x021D51CC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r4, r7, #0 - add r4, #8 - ldrb r3, [r4, #4] - add r6, r7, #0 - add r6, #0x14 - cmp r3, #0 - bne _021D5286 - cmp r1, #0 - beq _021D5234 - mov r2, #5 - ldrsb r2, [r4, r2] - add r5, r2, r1 - bl ov19_021D5E38 - mov r1, #0xc - tst r0, r1 - beq _021D5218 - ldrb r0, [r6, #4] - ldrb r3, [r6, #6] - add r2, r5, #0 - add r1, r5, #0 - cmp r3, r0 - bls _021D5204 - sub r0, r3, r0 - sub r1, r5, r0 - b _021D5208 -_021D5204: - sub r0, r0, r3 - add r2, r5, r0 -_021D5208: - cmp r1, #0 - bge _021D5210 - mov r0, #3 - pop {r3, r4, r5, r6, r7, pc} -_021D5210: - cmp r2, #6 - blt _021D5224 - mov r0, #4 - pop {r3, r4, r5, r6, r7, pc} -_021D5218: - cmp r5, #0 - blt _021D5220 - cmp r5, #6 - blt _021D5224 -_021D5220: - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_021D5224: - mov r2, #6 - ldrsb r2, [r4, r2] - add r0, r7, #0 - add r1, r5, #0 - bl ov19_021D5410 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D5234: - cmp r2, #0 - beq _021D5286 - mov r1, #6 - ldrsb r1, [r4, r1] - add r5, r1, r2 - bl ov19_021D5E38 - mov r1, #0xc - tst r0, r1 - beq _021D526A - ldrb r0, [r6, #5] - ldrb r3, [r6, #7] - add r2, r5, #0 - add r1, r5, #0 - cmp r3, r0 - bls _021D525A - sub r0, r3, r0 - sub r1, r5, r0 - b _021D525E -_021D525A: - sub r0, r0, r3 - add r2, r5, r0 -_021D525E: - cmp r1, #0 - blt _021D5266 - cmp r2, #5 - blt _021D5276 -_021D5266: - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_021D526A: - cmp r5, #0 - blt _021D5272 - cmp r5, #5 - blt _021D5276 -_021D5272: - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_021D5276: - mov r1, #5 - ldrsb r1, [r4, r1] - add r0, r7, #0 - add r2, r5, #0 - bl ov19_021D5410 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D5286: - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D51CC - - thumb_func_start ov19_021D5290 -ov19_021D5290: ; 0x021D5290 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #8 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D52BA - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0207A0F8 - strb r0, [r4, #8] - mov r0, #8 - ldrsb r0, [r4, r0] - cmp r0, #6 - blt _021D52BE - mov r0, #5 - strb r0, [r4, #8] - b _021D52BE -_021D52BA: - mov r0, #0 - strb r0, [r4, #8] -_021D52BE: - ldrb r0, [r4, #4] - strb r0, [r4, #9] - mov r0, #1 - strb r0, [r4, #4] - add r0, r5, #0 - bl ov19_021D52F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5290 - - thumb_func_start ov19_021D52D0 -ov19_021D52D0: ; 0x021D52D0 - push {r4, lr} - add r4, r0, #0 - add r3, r4, #0 - add r3, #8 - mov r1, #0 - strb r1, [r3, #4] - mov r2, #9 - ldrsb r2, [r3, r2] - cmp r2, #0 - beq _021D52EA - add r2, r1, #0 - bl ov19_021D5410 -_021D52EA: - add r0, r4, #0 - bl ov19_021D52F4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D52D0 - - thumb_func_start ov19_021D52F4 -ov19_021D52F4: ; 0x021D52F4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #8 - mov r1, #0 - strb r1, [r4, #0xa] - ldrb r0, [r4, #4] - cmp r0, #4 - bhi _021D5354 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5312: ; jump table - .short _021D531C - _021D5312 - 2 ; case 0 - .short _021D532C - _021D5312 - 2 ; case 1 - .short _021D5354 - _021D5312 - 2 ; case 2 - .short _021D5354 - _021D5312 - 2 ; case 3 - .short _021D5354 - _021D5312 - 2 ; case 4 -_021D531C: - mov r2, #7 - ldrsb r2, [r4, r2] - ldr r0, [r5, #0] - sub r1, r1, #1 - bl sub_02079C9C - str r0, [r4, #0] - b _021D5358 -_021D532C: - mov r0, #8 - ldrsb r6, [r4, r0] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0207A0F8 - cmp r6, r0 - bge _021D534E - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_0207A0FC - str r0, [r4, #0] - b _021D5358 -_021D534E: - mov r0, #0 - str r0, [r4, #0] - b _021D5358 -_021D5354: - mov r0, #0 - str r0, [r4, #0] -_021D5358: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D5388 - mov r1, #0xac - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021D5388 - mov r0, #1 - strb r0, [r4, #0xa] - add r0, r5, #0 - bl ov19_021D5E38 - mov r1, #6 - tst r0, r1 - bne _021D5388 - ldr r1, [r4, #0] - add r0, r5, #0 - add r2, r5, #0 - bl ov19_021D5888 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D5388: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021D52F4 - - thumb_func_start ov19_021D538C -ov19_021D538C: ; 0x021D538C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x61 - ldr r1, _021D53B4 ; =0x0000FFFF - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #8 - ldr r0, [r4, r0] - bl sub_0202404C - mov r0, #0x61 - lsl r0, r0, #2 - ldr r1, [r4, r0] - ldr r0, _021D53B4 ; =0x0000FFFF - cmp r1, r0 - beq _021D53B0 - mov r0, #1 - pop {r4, pc} -_021D53B0: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D53B4: .word 0x0000FFFF - thumb_func_end ov19_021D538C - - thumb_func_start ov19_021D53B8 -ov19_021D53B8: ; 0x021D53B8 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _021D53D2 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r2, [r4, r0] - ldr r1, _021D5404 ; =0x0000FFFF - cmp r2, r1 - bne _021D53D2 - str r6, [r4, r0] -_021D53D2: - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - bne _021D5400 - cmp r6, #2 - bne _021D5400 - cmp r5, #0 - beq _021D53EE - cmp r5, #1 - beq _021D53F8 - cmp r5, #3 - beq _021D53F8 - pop {r4, r5, r6, pc} -_021D53EE: - add r0, r4, #0 - mov r1, #1 - bl ov19_021D5BA0 - pop {r4, r5, r6, pc} -_021D53F8: - add r0, r4, #0 - mov r1, #0 - bl ov19_021D5BA0 -_021D5400: - pop {r4, r5, r6, pc} - nop -_021D5404: .word 0x0000FFFF - thumb_func_end ov19_021D53B8 - - thumb_func_start ov19_021D5408 -ov19_021D5408: ; 0x021D5408 - mov r2, #0x43 - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov19_021D5408 - - thumb_func_start ov19_021D5410 -ov19_021D5410: ; 0x021D5410 - add r0, #8 - mov r3, #6 - strb r1, [r0, #5] - mul r3, r2 - strb r2, [r0, #6] - add r1, r1, r3 - strb r1, [r0, #7] - bx lr - thumb_func_end ov19_021D5410 - - thumb_func_start ov19_021D5420 -ov19_021D5420: ; 0x021D5420 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r6, r0, #0 - add r4, r7, #0 - add r5, r7, #0 - add r0, r7, #0 - add r4, #0x14 - add r5, #8 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D545C - bl sub_02076AF4 - add r2, r0, #0 - ldr r0, [r5, #0] - ldr r1, [r4, #0] - bl sub_020C4B68 - mov r0, #0x12 - mov r2, #7 - lsl r0, r0, #4 - mov r1, #0 - ldrsb r2, [r5, r2] - ldr r0, [r6, r0] - mvn r1, r1 - bl sub_02079968 - mov r0, #0 - b _021D547A -_021D545C: - bl sub_02076AF0 - add r2, r0, #0 - ldr r0, [r5, #0] - ldr r1, [r4, #0] - bl sub_020C4B68 - mov r0, #0x49 - mov r1, #8 - lsl r0, r0, #2 - ldrsb r1, [r5, r1] - ldr r0, [r6, r0] - bl sub_0207A080 - mov r0, #1 -_021D547A: - strb r0, [r4, #0xb] - ldr r1, [r4, #0] - add r0, r7, #0 - bl ov19_021D5BA8 - mov r0, #5 - ldrsb r0, [r5, r0] - strb r0, [r4, #6] - ldrb r0, [r4, #6] - strb r0, [r4, #4] - mov r0, #6 - ldrsb r0, [r5, r0] - strb r0, [r4, #7] - ldrb r0, [r4, #7] - strb r0, [r4, #5] - mov r0, #2 - strb r0, [r7, #0x13] - mov r0, #0 - strb r0, [r7, #0x12] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5420 - - thumb_func_start ov19_021D54A4 -ov19_021D54A4: ; 0x021D54A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r6, r1, #0 - add r7, r0, #0 - add r6, #0x14 - mov r0, #1 - strb r0, [r6, #0xa] - add r0, r1, #0 - str r1, [sp, #4] - bl ov19_021D5E24 - str r0, [sp, #0x14] - bl sub_02076AF4 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - add r1, sp, #0x30 - ldr r5, [r0, #0x14] - add r0, sp, #0x24 - str r0, [sp] - ldr r0, [sp, #4] - add r2, sp, #0x2c - add r3, sp, #0x28 - bl ov19_021D5EE8 - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x24] - str r0, [sp, #0x18] - cmp r0, r1 - bhi _021D556A - mov r1, #6 - mul r1, r0 - str r1, [sp, #8] -_021D54EA: - ldr r1, [sp, #0x30] - ldr r0, [sp, #8] - str r1, [sp, #0x1c] - add r4, r1, r0 - ldr r1, [sp, #0x2c] - ldr r0, [sp, #0x1c] - cmp r0, r1 - bhi _021D5558 -_021D54FA: - mov r0, #0x12 - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r7, r0] - mvn r1, r1 - add r2, r4, #0 - bl sub_02079C9C - mov r1, #0xac - mov r2, #0 - str r0, [sp, #0x20] - bl sub_02074570 - cmp r0, #0 - beq _021D554A - ldr r0, [sp, #0x20] - ldr r2, [sp, #0x10] - add r1, r5, #0 - bl sub_020C4B68 - mov r0, #0x12 - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r7, r0] - mvn r1, r1 - add r2, r4, #0 - bl sub_02079968 - ldr r0, [sp, #0x10] - add r5, r5, r0 - ldr r0, [sp, #0xc] - add r1, r6, r0 - add r0, r0, #1 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - strb r4, [r1, #0xc] - cmp r4, r0 - bne _021D554A - mov r0, #0 - strb r0, [r6, #0xa] -_021D554A: - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x2c] - add r0, r0, #1 - add r4, r4, #1 - str r0, [sp, #0x1c] - cmp r0, r1 - bls _021D54FA -_021D5558: - ldr r0, [sp, #8] - ldr r1, [sp, #0x24] - add r0, r0, #6 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, r1 - bls _021D54EA -_021D556A: - ldr r0, [sp, #0xc] - strb r0, [r6, #8] - ldr r1, [sp, #0x28] - mov r0, #6 - ldr r2, [sp, #0x30] - mul r0, r1 - add r0, r2, r0 - strb r0, [r6, #9] - ldr r0, [sp, #4] - ldrb r0, [r0, #0x12] - cmp r0, #0 - beq _021D5586 - mov r1, #4 - b _021D5588 -_021D5586: - mov r1, #8 -_021D5588: - ldr r0, [sp, #4] - strb r1, [r0, #0x13] - mov r1, #0 - strb r1, [r0, #0x12] - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov19_021D54A4 - - thumb_func_start ov19_021D5594 -ov19_021D5594: ; 0x021D5594 - add r2, r1, #0 - add r1, #8 - mov r0, #5 - ldrsb r0, [r1, r0] - add r2, #0x14 - strb r0, [r2, #6] - ldrb r0, [r2, #6] - strb r0, [r2, #4] - mov r0, #6 - ldrsb r0, [r1, r0] - strb r0, [r2, #7] - ldrb r0, [r2, #7] - strb r0, [r2, #5] - bx lr - thumb_func_end ov19_021D5594 - - thumb_func_start ov19_021D55B0 -ov19_021D55B0: ; 0x021D55B0 - add r2, r1, #0 - add r1, #8 - mov r0, #5 - ldrsb r0, [r1, r0] - add r2, #0x14 - strb r0, [r2, #6] - mov r0, #6 - ldrsb r0, [r1, r0] - strb r0, [r2, #7] - bx lr - thumb_func_end ov19_021D55B0 - - thumb_func_start ov19_021D55C4 -ov19_021D55C4: ; 0x021D55C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r1, #0 - add r0, r1, #0 - str r1, [sp] - add r4, #0x14 - add r6, #8 - mov r7, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D562A - ldr r0, [r4, #0] - mov r1, #0x70 - add r2, r7, #0 - bl sub_02074570 - str r0, [sp, #4] - mov r0, #0x12 - mov r2, #7 - lsl r0, r0, #4 - ldrsb r2, [r6, r2] - ldr r0, [r5, r0] - ldr r3, [r4, #0] - sub r1, r7, #1 - bl sub_02079914 - mov r0, #0x12 - mov r2, #7 - lsl r0, r0, #4 - ldrsb r2, [r6, r2] - ldr r0, [r5, r0] - sub r1, r7, #1 - bl sub_02079C9C - mov r1, #5 - add r2, r7, #0 - add r4, r0, #0 - bl sub_02074570 - mov r1, #0x7b - lsl r1, r1, #2 - cmp r0, r1 - bne _021D5672 - ldr r0, [sp, #4] - cmp r0, #1 - bne _021D5672 - mov r7, #1 - b _021D5672 -_021D562A: - ldrb r0, [r4, #0xb] - cmp r0, #0 - beq _021D563E - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0] - bl sub_0207A048 - b _021D5658 -_021D563E: - mov r1, #0x1a - lsl r1, r1, #4 - ldr r0, [r4, #0] - ldr r1, [r5, r1] - bl sub_020774C8 - mov r1, #0x49 - lsl r1, r1, #2 - ldr r0, [r5, r1] - add r1, #0x7c - ldr r1, [r5, r1] - bl sub_0207A048 -_021D5658: - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0207A0F8 - add r1, r0, #0 - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - sub r1, r1, #1 - bl sub_0207A0FC - add r4, r0, #0 -_021D5672: - ldr r0, [sp] - add r1, r4, #0 - bl ov19_021D5BA8 - add r0, r5, #0 - bl ov19_021D52F4 - cmp r0, #0 - bne _021D569E - cmp r7, #1 - bne _021D569E - ldr r0, [sp] - add r1, r4, #0 - add r2, r5, #0 - bl ov19_021D58AC - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #6 - bl ov19_021D6594 -_021D569E: - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - strb r1, [r0, #0x12] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D55C4 - - thumb_func_start ov19_021D56AC -ov19_021D56AC: ; 0x021D56AC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - add r7, r0, #0 - add r6, #0x14 - add r0, r1, #0 - str r1, [sp] - bl ov19_021D5F3C - str r0, [sp, #8] - ldrb r0, [r6, #9] - str r0, [sp, #0xc] - bl sub_02076AF4 - str r0, [sp, #4] - ldr r0, [sp] - mov r5, #0 - ldr r4, [r0, #0x14] - ldrb r0, [r6, #8] - cmp r0, #0 - ble _021D5700 -_021D56D6: - add r3, r6, r5 - mov r2, #0xc - ldrsb r3, [r3, r2] - ldr r2, [sp, #0xc] - mov r0, #0x12 - lsl r0, r0, #4 - sub r3, r3, r2 - ldr r2, [sp, #8] - mov r1, #0 - add r2, r2, r3 - ldr r0, [r7, r0] - mvn r1, r1 - add r3, r4, #0 - bl sub_02079914 - ldr r0, [sp, #4] - add r5, r5, #1 - add r4, r4, r0 - ldrb r0, [r6, #8] - cmp r5, r0 - blt _021D56D6 -_021D5700: - ldr r0, [sp] - bl ov19_021D5E24 - add r2, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r7, r0] - mvn r1, r1 - bl sub_02079C9C - add r1, r0, #0 - ldr r0, [sp] - bl ov19_021D5BA8 - add r0, r7, #0 - bl ov19_021D52F4 - mov r0, #0 - strb r0, [r6, #8] - ldr r0, [sp] - mov r1, #1 - strb r1, [r0, #0x13] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D56AC - - thumb_func_start ov19_021D5734 -ov19_021D5734: ; 0x021D5734 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - str r1, [sp] - add r5, r0, #0 - add r4, #0x14 - bl sub_02076AF0 - add r6, r0, #0 - ldr r0, [sp] - add r2, r6, #0 - ldr r7, [r0, #0x14] - str r0, [sp, #4] - add r0, #8 - str r0, [sp, #4] - add r0, r7, #0 - add r1, r7, r6 - bl sub_020C4B68 - ldr r0, [sp] - ldr r1, [sp] - ldr r0, [r0, #8] - ldr r1, [r1, #0x14] - add r2, r6, #0 - bl sub_020C4B68 - ldr r0, [sp] - bl ov19_021D5E10 - cmp r0, #0 - bne _021D578E - ldr r2, [sp, #4] - mov r0, #0x12 - mov r3, #7 - lsl r0, r0, #4 - ldrsb r2, [r2, r3] - mov r1, #0 - ldr r0, [r5, r0] - mvn r1, r1 - add r3, r7, r6 - bl sub_02079914 - mov r0, #0 - strb r0, [r4, #0xb] - b _021D57C8 -_021D578E: - ldrb r0, [r4, #0xb] - cmp r0, #0 - bne _021D57A2 - mov r1, #0x1a - lsl r1, r1, #4 - ldr r1, [r5, r1] - add r0, r7, r6 - bl sub_020774C8 - b _021D57B0 -_021D57A2: - mov r1, #0x1a - lsl r1, r1, #4 - ldr r1, [r5, r1] - add r0, r7, r6 - add r2, r6, #0 - bl sub_020C4B68 -_021D57B0: - mov r3, #0x49 - lsl r3, r3, #2 - ldr r0, [r5, r3] - ldr r1, [sp, #4] - mov r2, #8 - ldrsb r1, [r1, r2] - add r3, #0x7c - ldr r2, [r5, r3] - bl sub_0207A128 - mov r0, #1 - strb r0, [r4, #0xb] -_021D57C8: - ldr r0, [sp] - ldr r1, [r4, #0] - add r2, r5, #0 - bl ov19_021D5888 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5734 - - thumb_func_start ov19_021D57D8 -ov19_021D57D8: ; 0x021D57D8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, [r4, #0x14] - bl sub_020798A0 - cmp r0, #0 - beq _021D57FA - mov r0, #1 - strb r0, [r4, #0x13] - add r0, r4, #0 - bl ov19_021D52F4 - mov r0, #1 - pop {r4, pc} -_021D57FA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D57D8 - - thumb_func_start ov19_021D5800 -ov19_021D5800: ; 0x021D5800 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - add r4, r5, #0 - ldr r0, [r5, r0] - ldr r2, [r5, #8] - add r4, #8 - bl sub_020798A0 - cmp r0, #0 - beq _021D5830 - mov r0, #0x49 - mov r1, #8 - lsl r0, r0, #2 - ldrsb r1, [r4, r1] - ldr r0, [r5, r0] - bl sub_0207A080 - add r0, r5, #0 - bl ov19_021D52F4 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D5830: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D5800 - - thumb_func_start ov19_021D5834 -ov19_021D5834: ; 0x021D5834 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_02073C54 - mov r0, #1 - strb r0, [r4, #0x13] - add r0, r4, #0 - bl ov19_021D52F4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5834 - - thumb_func_start ov19_021D584C -ov19_021D584C: ; 0x021D584C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #8 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D5870 - mov r0, #0x12 - mov r2, #7 - lsl r0, r0, #4 - mov r1, #0 - ldrsb r2, [r4, r2] - ldr r0, [r5, r0] - mvn r1, r1 - bl sub_02079968 - b _021D587E -_021D5870: - mov r0, #0x49 - mov r1, #8 - lsl r0, r0, #2 - ldrsb r1, [r4, r1] - ldr r0, [r5, r0] - bl sub_0207A080 -_021D587E: - add r0, r5, #0 - bl ov19_021D52F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D584C - - thumb_func_start ov19_021D5888 -ov19_021D5888: ; 0x021D5888 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov19_021D58AC - add r0, r5, #0 - bl ov19_021D5E08 - cmp r0, #4 - bne _021D58A8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov19_021D59F4 -_021D58A8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5888 - - thumb_func_start ov19_021D58AC -ov19_021D58AC: ; 0x021D58AC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - add r4, r7, #0 - add r0, r5, #0 - add r6, r2, #0 - add r4, #0x4c - bl sub_02073D20 - str r0, [sp] - str r5, [r7, #0x4c] - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - strh r0, [r4, #4] - add r0, r5, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074570 - strh r0, [r4, #6] - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0207A274 - ldrh r1, [r4, #4] - bl sub_0207A294 - strh r0, [r4, #8] - add r0, r5, #0 - mov r1, #0xad - mov r2, #0 - bl sub_02074570 - strb r0, [r4, #0xf] - ldrh r0, [r4, #4] - mov r1, #9 - bl sub_02075894 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl sub_02074570 - add r2, r0, #0 - ldrh r1, [r4, #4] - add r0, r7, #0 - bl sub_02075B9C - strb r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #0xb - mov r2, #0 - bl sub_02074570 - strb r0, [r4, #0xb] - add r0, r5, #0 - mov r1, #0xb1 - mov r2, #0 - bl sub_02074570 - strb r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #0xb2 - mov r2, #0 - bl sub_02074570 - strb r0, [r4, #0xd] - ldrb r0, [r4, #0xf] - cmp r0, #0 - bne _021D5968 - add r0, r5, #0 - mov r1, #0xb0 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021D5968 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl sub_02074570 - add r2, r0, #0 - ldrh r1, [r4, #4] - add r0, r7, #0 - bl sub_02075DD0 - strb r0, [r4, #0xe] - b _021D596C -_021D5968: - mov r0, #0xff - strb r0, [r4, #0xe] -_021D596C: - ldr r2, [r4, #0x14] - add r0, r5, #0 - mov r1, #0x77 - bl sub_02074570 - ldrb r0, [r4, #0xf] - cmp r0, #0 - bne _021D598C - mov r0, #0x19 - lsl r0, r0, #4 - ldrh r1, [r4, #4] - ldr r0, [r6, r0] - ldr r2, [r4, #0x18] - bl sub_0200B1B8 - b _021D599A -_021D598C: - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x14] - bl sub_02023810 - ldr r0, [r4, #0x14] - bl sub_020237E8 -_021D599A: - ldrh r1, [r4, #6] - cmp r1, #0 - beq _021D59AA - ldr r0, [r4, #0x1c] - mov r2, #9 - bl sub_0207CFA0 - b _021D59B8 -_021D59AA: - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200B1B8 -_021D59B8: - add r0, r5, #0 - bl sub_02075BD4 - add r1, r0, #0 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [r4, #0x20] - bl sub_0200B1B8 - add r0, r5, #0 - mov r1, #0xa - mov r2, #0 - bl sub_02074570 - add r1, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [r4, #0x24] - bl sub_0200B1B8 - add r0, r7, #0 - bl sub_020759B8 - ldr r1, [sp] - add r0, r5, #0 - bl sub_02073D48 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021D58AC - - thumb_func_start ov19_021D59F4 -ov19_021D59F4: ; 0x021D59F4 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r7, r1, #0 - ldr r1, [sp] - add r6, r0, #0 - add r1, #0xa4 - add r5, r2, #0 - ldrb r2, [r1] - mov r1, #0x30 - add r6, #0x4c - add r0, #0xac - mul r1, r2 - add r4, r0, r1 - str r7, [r0, r1] - ldrh r0, [r6, #4] - strh r0, [r4, #4] - ldrb r0, [r6, #0xf] - strb r0, [r4, #6] - ldrb r0, [r6, #0xa] - strh r0, [r4, #8] - ldrb r0, [r4, #6] - cmp r0, #0 - ldr r0, [r4, #0x28] - beq _021D5A2C - ldr r1, [r6, #0x18] - bl sub_02023810 - b _021D5A32 -_021D5A2C: - ldr r1, [r6, #0x14] - bl sub_02023810 -_021D5A32: - ldr r0, [r4, #0x2c] - ldr r1, [r6, #0x20] - bl sub_02023810 - mov r1, #0x1a - lsl r1, r1, #4 - ldr r1, [r5, r1] - add r0, r7, #0 - bl sub_020774C8 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02073C88 - add r6, r0, #0 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0xa4 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xa] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0xa5 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xc] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0xa6 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0xe] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0xa8 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x10] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0xa9 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x12] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0xa7 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x14] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x13 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x16] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x14 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x18] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x15 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x1a] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x16 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x1c] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x17 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x1e] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x36 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x20] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x37 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x22] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x38 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x24] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x39 - mov r2, #0 - bl sub_02074470 - strh r0, [r4, #0x26] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - strb r0, [r4, #7] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_02073CD4 - ldr r0, [sp] - mov r2, #1 - add r0, #0xa4 - ldrb r1, [r0] - ldr r0, [sp] - add r0, r0, r1 - add r0, #0xa6 - strb r2, [r0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021D59F4 - - thumb_func_start ov19_021D5B70 -ov19_021D5B70: ; 0x021D5B70 - add r1, r0, #0 - add r1, #0xa4 - ldrb r2, [r1] - mov r1, #1 - add r0, #0xa4 - eor r1, r2 - strb r1, [r0] - bx lr - thumb_func_end ov19_021D5B70 - - thumb_func_start ov19_021D5B80 -ov19_021D5B80: ; 0x021D5B80 - add r1, r0, #0 - add r1, #0xa5 - ldrb r1, [r1] - add r2, r1, #1 - add r1, r0, #0 - add r1, #0xa5 - strb r2, [r1] - add r1, r0, #0 - add r1, #0xa5 - ldrb r1, [r1] - cmp r1, #3 - blo _021D5B9E - mov r1, #0 - add r0, #0xa5 - strb r1, [r0] -_021D5B9E: - bx lr - thumb_func_end ov19_021D5B80 - - thumb_func_start ov19_021D5BA0 -ov19_021D5BA0: ; 0x021D5BA0 - add r0, #0xa8 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5BA0 - - thumb_func_start ov19_021D5BA8 -ov19_021D5BA8: ; 0x021D5BA8 - str r1, [r0, #0x4c] - bx lr - thumb_func_end ov19_021D5BA8 - - thumb_func_start ov19_021D5BAC -ov19_021D5BAC: ; 0x021D5BAC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - add r0, #0x96 - ldrb r1, [r0] - add r2, r4, #0 - add r0, sp, #0 - add r2, #0x4c - strb r1, [r0] - strb r1, [r2, #0xb] - ldr r0, [r4, #0x4c] - mov r1, #0xb - add r2, sp, #0 - bl sub_02074C60 - add r0, r4, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D5BE2 - add r0, r4, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D5BE2 - bl sub_02024804 -_021D5BE2: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5BAC - - thumb_func_start ov19_021D5BE8 -ov19_021D5BE8: ; 0x021D5BE8 - push {r0, r1, r2, r3} - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - add r0, sp, #0x18 - add r4, r6, #0 - ldrh r1, [r0, #4] - add r4, #0x4c - add r5, r2, #0 - strh r1, [r4, #6] - cmp r1, #0 - beq _021D5C0A - ldr r0, [r4, #0x1c] - mov r2, #9 - bl sub_0207CFA0 - b _021D5C18 -_021D5C0A: - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [r4, #0x1c] - mov r1, #0x14 - bl sub_0200B1B8 -_021D5C18: - add r0, r6, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D5C48 - add r0, r6, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D5C48 - add r0, r6, #0 - bl ov19_021D5E24 - add r2, r0, #0 - add r0, sp, #0x1c - str r0, [sp] - mov r0, #0x12 - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r5, r0] - mvn r1, r1 - mov r3, #6 - bl sub_02079C50 -_021D5C48: - ldr r0, [r4, #0] - mov r1, #6 - add r2, sp, #0x1c - bl sub_02074C60 - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - ldr r1, _021D5CB8 ; =0x000001ED - cmp r0, r1 - bne _021D5C8A - ldr r0, [r4, #0] - bl sub_02077930 - ldr r0, [r4, #0] - mov r1, #0xb1 - mov r2, #0 - bl sub_02074570 - strb r0, [r4, #0xc] - ldr r0, [r4, #0] - mov r1, #0xb2 - mov r2, #0 - bl sub_02074570 - add sp, #4 - strb r0, [r4, #0xd] - pop {r3, r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 -_021D5C8A: - sub r1, r1, #6 - cmp r0, r1 - bne _021D5CAE - ldr r0, [r4, #0] - bl sub_02077A1C - ldr r0, [r4, #0] - mov r1, #0xa - mov r2, #0 - bl sub_02074570 - add r1, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [r4, #0x24] - bl sub_0200B1B8 -_021D5CAE: - add sp, #4 - pop {r3, r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 -_021D5CB8: .word 0x000001ED - thumb_func_end ov19_021D5BE8 - - thumb_func_start ov19_021D5CBC -ov19_021D5CBC: ; 0x021D5CBC - add r2, r0, #0 - add r2, #0x40 - ldrb r2, [r2] - add r1, r0, #0 - add r1, #0x40 - add r3, r2, #1 - add r2, r0, #0 - add r2, #0x40 - strb r3, [r2] - add r2, r0, #0 - add r2, #0x40 - ldrb r2, [r2] - cmp r2, #0x12 - blo _021D5CDC - mov r2, #0 - strb r2, [r1] -_021D5CDC: - ldr r3, _021D5CE4 ; =ov19_021D4F40 - ldr r0, [r0, #0] - bx r3 - nop -_021D5CE4: .word ov19_021D4F40 - thumb_func_end ov19_021D5CBC - - thumb_func_start ov19_021D5CE8 -ov19_021D5CE8: ; 0x021D5CE8 - add r2, r0, #0 - add r2, #0x40 - ldrb r2, [r2] - add r1, r0, #0 - add r1, #0x40 - cmp r2, #0 - beq _021D5CFA - sub r2, r2, #1 - b _021D5CFC -_021D5CFA: - mov r2, #0x11 -_021D5CFC: - ldr r3, _021D5D04 ; =ov19_021D4F40 - strb r2, [r1] - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_021D5D04: .word ov19_021D4F40 - thumb_func_end ov19_021D5CE8 - - thumb_func_start ov19_021D5D08 -ov19_021D5D08: ; 0x021D5D08 - add r3, r0, #0 - add r2, r0, #0 - add r2, #0x40 - strb r1, [r2] - add r3, #0x40 - add r1, r3, #0 - ldr r3, _021D5D1C ; =ov19_021D4F40 - ldr r0, [r0, #0] - bx r3 - nop -_021D5D1C: .word ov19_021D4F40 - thumb_func_end ov19_021D5D08 - - thumb_func_start ov19_021D5D20 -ov19_021D5D20: ; 0x021D5D20 - add r0, #0x98 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5D20 - - thumb_func_start ov19_021D5D28 -ov19_021D5D28: ; 0x021D5D28 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r2, r5, #0 - add r2, #0x4c - add r4, r1, #0 - ldrh r1, [r2, #6] - ldr r0, _021D5D50 ; =0x00000112 - strh r1, [r5, r0] - add r0, #0x7a - ldr r0, [r4, r0] - ldr r2, [r2, #0x1c] - mov r1, #0x14 - bl sub_0200B1B8 - add r0, r5, #0 - mov r1, #0 - add r2, r4, #0 - bl ov19_021D5BE8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D5D50: .word 0x00000112 - thumb_func_end ov19_021D5D28 - - thumb_func_start ov19_021D5D54 -ov19_021D5D54: ; 0x021D5D54 - ldr r1, _021D5D5C ; =0x00000112 - mov r2, #0 - strh r2, [r0, r1] - bx lr - ; .align 2, 0 -_021D5D5C: .word 0x00000112 - thumb_func_end ov19_021D5D54 - - thumb_func_start ov19_021D5D60 -ov19_021D5D60: ; 0x021D5D60 - push {r4, lr} - ldr r3, _021D5D74 ; =0x00000112 - add r2, r1, #0 - ldrh r1, [r0, r3] - mov r4, #0 - strh r4, [r0, r3] - bl ov19_021D5BE8 - pop {r4, pc} - nop -_021D5D74: .word 0x00000112 - thumb_func_end ov19_021D5D60 - - thumb_func_start ov19_021D5D78 -ov19_021D5D78: ; 0x021D5D78 - push {r4, lr} - add r3, r0, #0 - add r3, #0x52 - ldr r4, _021D5D90 ; =0x00000112 - add r2, r1, #0 - ldrh r1, [r0, r4] - ldrh r3, [r3] - strh r3, [r0, r4] - bl ov19_021D5BE8 - pop {r4, pc} - nop -_021D5D90: .word 0x00000112 - thumb_func_end ov19_021D5D78 - - thumb_func_start ov19_021D5D94 -ov19_021D5D94: ; 0x021D5D94 - add r0, #0x9c - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5D94 - - thumb_func_start ov19_021D5D9C -ov19_021D5D9C: ; 0x021D5D9C - add r0, #0x9e - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5D9C - - thumb_func_start ov19_021D5DA4 -ov19_021D5DA4: ; 0x021D5DA4 - add r0, #0x9d - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5DA4 - - thumb_func_start ov19_021D5DAC -ov19_021D5DAC: ; 0x021D5DAC - add r0, #0xa0 - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5DAC - - thumb_func_start ov19_021D5DB4 -ov19_021D5DB4: ; 0x021D5DB4 - cmp r1, #0 - bne _021D5DC0 - mov r1, #0 - add r0, #0x4a - strh r1, [r0] - bx lr -_021D5DC0: - add r2, r0, #0 - add r2, #0x4a - ldrh r3, [r2] - mov r2, #1 - sub r1, r1, #1 - lsl r2, r1 - add r1, r3, #0 - eor r1, r2 - add r0, #0x4a - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5DB4 - - thumb_func_start ov19_021D5DD8 -ov19_021D5DD8: ; 0x021D5DD8 - add r1, r0, #0 - add r1, #0x49 - ldrb r2, [r1] - mov r1, #1 - add r0, #0x49 - eor r1, r2 - strb r1, [r0] - bx lr - thumb_func_end ov19_021D5DD8 - - thumb_func_start ov19_021D5DE8 -ov19_021D5DE8: ; 0x021D5DE8 - mov r1, #0x63 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov19_021D5DE8 - - thumb_func_start ov19_021D5DF0 -ov19_021D5DF0: ; 0x021D5DF0 - mov r1, #0x67 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov19_021D5DF0 - - thumb_func_start ov19_021D5DF8 -ov19_021D5DF8: ; 0x021D5DF8 - mov r1, #0x69 - lsl r1, r1, #2 - ldr r3, _021D5E04 ; =sub_02027B50 - ldr r0, [r0, r1] - bx r3 - nop -_021D5E04: .word sub_02027B50 - thumb_func_end ov19_021D5DF8 - - thumb_func_start ov19_021D5E08 -ov19_021D5E08: ; 0x021D5E08 - add r0, #0x48 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E08 - - thumb_func_start ov19_021D5E10 -ov19_021D5E10: ; 0x021D5E10 - ldrb r0, [r0, #0xc] - bx lr - thumb_func_end ov19_021D5E10 - - thumb_func_start ov19_021D5E14 -ov19_021D5E14: ; 0x021D5E14 - mov r1, #0xd - ldrsb r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E14 - - thumb_func_start ov19_021D5E1C -ov19_021D5E1C: ; 0x021D5E1C - mov r1, #0xe - ldrsb r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E1C - - thumb_func_start ov19_021D5E24 -ov19_021D5E24: ; 0x021D5E24 - mov r1, #0xf - ldrsb r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E24 - - thumb_func_start ov19_021D5E2C -ov19_021D5E2C: ; 0x021D5E2C - mov r1, #0x10 - ldrsb r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E2C - - thumb_func_start ov19_021D5E34 -ov19_021D5E34: ; 0x021D5E34 - ldrb r0, [r0, #0x12] - bx lr - thumb_func_end ov19_021D5E34 - - thumb_func_start ov19_021D5E38 -ov19_021D5E38: ; 0x021D5E38 - ldrb r0, [r0, #0x13] - bx lr - thumb_func_end ov19_021D5E38 - - thumb_func_start ov19_021D5E3C -ov19_021D5E3C: ; 0x021D5E3C - ldrb r1, [r0, #0x13] - cmp r1, #0 - beq _021D5E46 - ldrb r0, [r0, #0x1f] - bx lr -_021D5E46: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E3C - - thumb_func_start ov19_021D5E4C -ov19_021D5E4C: ; 0x021D5E4C - ldrb r1, [r0, #0x13] - cmp r1, #2 - beq _021D5E56 - cmp r1, #4 - bne _021D5E5A -_021D5E56: - mov r0, #1 - bx lr -_021D5E5A: - ldrb r0, [r0, #0x12] - cmp r0, #0 - beq _021D5E64 - mov r0, #1 - bx lr -_021D5E64: - mov r0, #0 - bx lr - thumb_func_end ov19_021D5E4C - - thumb_func_start ov19_021D5E68 -ov19_021D5E68: ; 0x021D5E68 - add r0, #0x40 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5E68 - - thumb_func_start ov19_021D5E70 -ov19_021D5E70: ; 0x021D5E70 - add r0, #0x4c - bx lr - thumb_func_end ov19_021D5E70 - - thumb_func_start ov19_021D5E74 -ov19_021D5E74: ; 0x021D5E74 - push {r4, lr} - add r4, r0, #0 - bl ov19_021D5E4C - cmp r0, #0 - beq _021D5E86 - add r4, #0x52 - ldrh r0, [r4] - pop {r4, pc} -_021D5E86: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5E74 - - thumb_func_start ov19_021D5E8C -ov19_021D5E8C: ; 0x021D5E8C - add r0, #0x40 - bx lr - thumb_func_end ov19_021D5E8C - - thumb_func_start ov19_021D5E90 -ov19_021D5E90: ; 0x021D5E90 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov19_021D5E90 - - thumb_func_start ov19_021D5E94 -ov19_021D5E94: ; 0x021D5E94 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov19_021D5E94 - - thumb_func_start ov19_021D5E9C -ov19_021D5E9C: ; 0x021D5E9C - ldr r0, [r0, #0x4c] - bx lr - thumb_func_end ov19_021D5E9C - - thumb_func_start ov19_021D5EA0 -ov19_021D5EA0: ; 0x021D5EA0 - add r0, #0x57 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EA0 - - thumb_func_start ov19_021D5EA8 -ov19_021D5EA8: ; 0x021D5EA8 - add r0, #0x98 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EA8 - - thumb_func_start ov19_021D5EB0 -ov19_021D5EB0: ; 0x021D5EB0 - mov r1, #0xa0 - ldrsh r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EB0 - - thumb_func_start ov19_021D5EB8 -ov19_021D5EB8: ; 0x021D5EB8 - add r0, #0x9e - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EB8 - - thumb_func_start ov19_021D5EC0 -ov19_021D5EC0: ; 0x021D5EC0 - add r0, #0x9d - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EC0 - - thumb_func_start ov19_021D5EC8 -ov19_021D5EC8: ; 0x021D5EC8 - push {r4, lr} - add r4, r0, #0 - bl ov19_021D5E08 - cmp r0, #3 - beq _021D5EDA - add r4, #0x4a - ldrh r0, [r4] - pop {r4, pc} -_021D5EDA: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D5EC8 - - thumb_func_start ov19_021D5EE0 -ov19_021D5EE0: ; 0x021D5EE0 - add r0, #0x49 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EE0 - - thumb_func_start ov19_021D5EE8 -ov19_021D5EE8: ; 0x021D5EE8 - push {r3, r4, r5, r6} - add r0, #0x14 - ldrb r6, [r0, #6] - ldrb r5, [r0, #4] - ldr r4, [sp, #0x10] - cmp r5, r6 - bhi _021D5EFC - str r5, [r1, #0] - ldrb r1, [r0, #6] - b _021D5F00 -_021D5EFC: - str r6, [r1, #0] - ldrb r1, [r0, #4] -_021D5F00: - str r1, [r2, #0] - ldrb r2, [r0, #7] - ldrb r1, [r0, #5] - cmp r1, r2 - bhi _021D5F14 - str r1, [r3, #0] - ldrb r0, [r0, #7] - str r0, [r4, #0] - pop {r3, r4, r5, r6} - bx lr -_021D5F14: - str r2, [r3, #0] - ldrb r0, [r0, #5] - str r0, [r4, #0] - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5EE8 - - thumb_func_start ov19_021D5F20 -ov19_021D5F20: ; 0x021D5F20 - add r0, #0x14 - ldrb r2, [r0, #4] - ldrb r1, [r0, #6] - cmp r2, r1 - bne _021D5F36 - ldrb r1, [r0, #5] - ldrb r0, [r0, #7] - cmp r1, r0 - bne _021D5F36 - mov r0, #1 - bx lr -_021D5F36: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5F20 - - thumb_func_start ov19_021D5F3C -ov19_021D5F3C: ; 0x021D5F3C - push {r3, r4} - add r1, r0, #0 - add r1, #0x14 - mov r2, #0xd - mov r3, #0xe - ldrsb r2, [r0, r2] - ldrsb r0, [r0, r3] - ldrb r4, [r1, #4] - ldrb r3, [r1, #6] - cmp r3, r4 - bls _021D5F56 - sub r3, r3, r4 - sub r2, r2, r3 -_021D5F56: - ldrb r3, [r1, #5] - ldrb r1, [r1, #7] - cmp r1, r3 - bls _021D5F62 - sub r1, r1, r3 - sub r0, r0, r1 -_021D5F62: - mov r1, #6 - mul r1, r0 - add r0, r2, r1 - pop {r3, r4} - bx lr - thumb_func_end ov19_021D5F3C - - thumb_func_start ov19_021D5F6C -ov19_021D5F6C: ; 0x021D5F6C - add r0, #0x14 - add r2, r0, r1 - mov r1, #0xc - ldrsb r1, [r2, r1] - ldrb r0, [r0, #9] - sub r0, r1, r0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5F6C - - thumb_func_start ov19_021D5F7C -ov19_021D5F7C: ; 0x021D5F7C - ldr r1, _021D5F84 ; =0x00000112 - ldrh r0, [r0, r1] - bx lr - nop -_021D5F84: .word 0x00000112 - thumb_func_end ov19_021D5F7C - - thumb_func_start ov19_021D5F88 -ov19_021D5F88: ; 0x021D5F88 - push {r4, lr} - add r4, r0, #0 - bl ov19_021D5F7C - cmp r0, #0 - bne _021D5F9A - add r0, r4, #0 - bl ov19_021D5E74 -_021D5F9A: - pop {r4, pc} - thumb_func_end ov19_021D5F88 - - thumb_func_start ov19_021D5F9C -ov19_021D5F9C: ; 0x021D5F9C - add r0, #0xa4 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5F9C - - thumb_func_start ov19_021D5FA4 -ov19_021D5FA4: ; 0x021D5FA4 - add r0, #0xa5 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5FA4 - - thumb_func_start ov19_021D5FAC -ov19_021D5FAC: ; 0x021D5FAC - mov r2, #0x30 - add r0, #0xac - mul r2, r1 - add r0, r0, r2 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5FAC - - thumb_func_start ov19_021D5FB8 -ov19_021D5FB8: ; 0x021D5FB8 - add r0, r0, r1 - add r0, #0xa6 - ldrb r0, [r0] - bx lr - thumb_func_end ov19_021D5FB8 - - thumb_func_start ov19_021D5FC0 -ov19_021D5FC0: ; 0x021D5FC0 - add r0, #0xa8 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5FC0 - - thumb_func_start ov19_021D5FC8 -ov19_021D5FC8: ; 0x021D5FC8 - add r0, #0x5b - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D5FC8 - - thumb_func_start ov19_021D5FD0 -ov19_021D5FD0: ; 0x021D5FD0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov19_021D5E38 - cmp r0, #1 - bne _021D5FF6 - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D6008 - ldr r0, [r5, #0x4c] - add r1, r4, #0 - add r2, r6, #0 - bl sub_02074570 - pop {r4, r5, r6, pc} -_021D5FF6: - ldrb r0, [r5, #0x1f] - cmp r0, #0 - bne _021D6008 - ldr r0, [r5, #0x4c] - add r1, r4, #0 - add r2, r6, #0 - bl sub_02074570 - pop {r4, r5, r6, pc} -_021D6008: - ldr r0, [r5, #0x4c] - add r1, r4, #0 - add r2, r6, #0 - bl sub_02074470 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021D5FD0 - - thumb_func_start ov19_021D6014 -ov19_021D6014: ; 0x021D6014 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021D6030 - ldr r0, [r5, #0x4c] - add r1, r4, #0 - add r2, r6, #0 - bl sub_02074570 - pop {r4, r5, r6, pc} -_021D6030: - ldr r0, [r5, #8] - add r1, r4, #0 - add r2, r6, #0 - bl sub_02074470 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021D6014 - - thumb_func_start ov19_021D603C -ov19_021D603C: ; 0x021D603C - push {r3, r4, r5, r6} - ldr r4, _021D60A4 ; =ov19_021D6104 - add r6, r0, #0 - str r4, [r0, #0x30] - mov r4, #0 - str r4, [r0, #0x1c] - str r1, [r0, #0xc] - str r2, [r0, #0x10] - str r1, [r0, #0x14] - str r2, [r0, #0x18] - str r1, [r0, #4] - add r4, r0, #0 - str r2, [r0, #8] - lsl r2, r2, #0x18 - mov r5, #0xfe - add r4, #0x28 - strb r5, [r4] - lsl r4, r1, #0x18 - lsr r4, r4, #0x18 - add r6, #0x29 - strb r4, [r6] - add r6, r0, #0 - lsr r2, r2, #0x18 - add r6, #0x2a - strb r2, [r6] - add r6, r0, #0 - add r6, #0x2b - strb r3, [r6] - add r3, r0, #0 - add r3, #0x2c - strb r5, [r3] - add r3, r0, #0 - add r3, #0x2d - strb r4, [r3] - add r3, r0, #0 - add r3, #0x2e - strb r2, [r3] - add r2, r0, #0 - add r2, #0x2f - ldr r3, [sp, #0x10] - cmp r1, #0x80 - strb r3, [r2] - bge _021D609A - mov r1, #1 - str r1, [r0, #0x24] - pop {r3, r4, r5, r6} - bx lr -_021D609A: - sub r5, #0xff - str r5, [r0, #0x24] - pop {r3, r4, r5, r6} - bx lr - nop -_021D60A4: .word ov19_021D6104 - thumb_func_end ov19_021D603C - - thumb_func_start ov19_021D60A8 -ov19_021D60A8: ; 0x021D60A8 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r0, #0x2c - bl sub_02022734 - cmp r0, #1 - bne _021D60E8 - add r0, r5, #0 - add r0, #0x28 - bl sub_02022734 - cmp r0, #0 - bne _021D60E8 - ldr r0, [r5, #0x1c] - mov r4, #1 - cmp r0, #0 - bne _021D60D0 - add r6, r4, #0 - b _021D60D2 -_021D60D0: - mov r6, #0 -_021D60D2: - add r0, sp, #4 - add r1, sp, #0 - bl sub_020227A4 - cmp r0, #0 - beq _021D60EC - ldr r0, [sp, #4] - str r0, [r5, #0x14] - ldr r0, [sp] - str r0, [r5, #0x18] - b _021D60EC -_021D60E8: - mov r4, #0 - add r6, r4, #0 -_021D60EC: - str r4, [r5, #0x1c] - ldr r3, [r5, #0x30] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - blx r3 - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021D60A8 - - thumb_func_start ov19_021D60FC -ov19_021D60FC: ; 0x021D60FC - mov r2, #0 - str r2, [r0, #0] - str r1, [r0, #0x30] - bx lr - thumb_func_end ov19_021D60FC - - thumb_func_start ov19_021D6104 -ov19_021D6104: ; 0x021D6104 - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - beq _021D612C - cmp r2, #0 - beq _021D612C - ldr r1, [r4, #0x14] - str r1, [r4, #4] - ldr r2, [r4, #0x18] - str r2, [r4, #8] - ldr r1, [r4, #4] - bl ov19_021D6164 - strh r0, [r4, #0x20] - ldr r1, _021D6130 ; =ov19_021D6134 - add r0, r4, #0 - bl ov19_021D60FC - mov r0, #1 - pop {r4, pc} -_021D612C: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D6130: .word ov19_021D6134 - thumb_func_end ov19_021D6104 - - thumb_func_start ov19_021D6134 -ov19_021D6134: ; 0x021D6134 - push {r3, lr} - cmp r1, #0 - bne _021D6144 - ldr r1, _021D6148 ; =ov19_021D6104 - bl ov19_021D60FC - mov r0, #3 - pop {r3, pc} -_021D6144: - mov r0, #2 - pop {r3, pc} - ; .align 2, 0 -_021D6148: .word ov19_021D6104 - thumb_func_end ov19_021D6134 - - thumb_func_start ov19_021D614C -ov19_021D614C: ; 0x021D614C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x14] - ldr r2, [r4, #0x18] - bl ov19_021D6164 - add r2, r0, #0 - ldrh r1, [r4, #0x20] - add r0, r4, #0 - bl ov19_021D617C - pop {r4, pc} - thumb_func_end ov19_021D614C - - thumb_func_start ov19_021D6164 -ov19_021D6164: ; 0x021D6164 - add r3, r0, #0 - ldr r0, [r3, #0x10] - sub r0, r2, r0 - ldr r2, [r3, #0xc] - ldr r3, _021D6178 ; =sub_020BDA20 - sub r1, r1, r2 - lsl r0, r0, #0xc - lsl r1, r1, #0xc - bx r3 - nop -_021D6178: .word sub_020BDA20 - thumb_func_end ov19_021D6164 - - thumb_func_start ov19_021D617C -ov19_021D617C: ; 0x021D617C - push {r4, r5} - sub r2, r2, r1 - bpl _021D618A - mov r4, #0 - mvn r4, r4 - mul r2, r4 - b _021D618C -_021D618A: - mov r4, #1 -_021D618C: - ldr r5, _021D61AC ; =0x021DFE44 - mov r3, #0 -_021D6190: - ldrh r1, [r5] - cmp r2, r1 - blt _021D619E - add r3, r3, #1 - add r5, r5, #2 - cmp r3, #2 - blo _021D6190 -_021D619E: - ldr r1, [r0, #0x24] - add r0, r3, #0 - mul r0, r4 - mul r0, r1 - pop {r4, r5} - bx lr - nop -_021D61AC: .word 0x021DFE44 - thumb_func_end ov19_021D617C - - thumb_func_start ov19_021D61B0 -ov19_021D61B0: ; 0x021D61B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r1, #0 - str r0, [sp, #0x14] - ldr r1, _021D6430 ; =0x0000B3B4 - mov r0, #0xa - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - beq _021D61DE - mov r0, #0x16 - lsl r0, r0, #4 - str r5, [r4, r0] - mov r0, #0xa - bl sub_02018340 - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - cmp r0, #0 - bne _021D61E0 -_021D61DE: - b _021D642A -_021D61E0: - mov r0, #0x12 - mov r1, #0xa - mov r5, #1 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r1, #1 - lsl r1, r1, #0x1a - ldr r0, [r1, #0] - ldr r3, _021D6434 ; =0xFFFFE0FF - and r0, r3 - str r0, [r1, #0] - ldr r0, _021D6438 ; =0x04001000 - ldr r2, [r0, #0] - and r2, r3 - str r2, [r0, #0] - ldr r3, [r1, #0] - ldr r2, _021D643C ; =0xFFCFFFEF - and r3, r2 - ldr r2, _021D6440 ; =0x00100010 - orr r2, r3 - str r2, [r1, #0] - ldr r2, [r0, #0] - ldr r1, _021D643C ; =0xFFCFFFEF - and r2, r1 - mov r1, #0x10 - orr r1, r2 - str r1, [r0, #0] - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r2, #0x80 - str r2, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r1, #0xa - str r1, [sp, #0x10] - add r1, r2, #0 - add r2, r0, #0 - bl sub_0200A784 - add r1, r4, #0 - mov r0, #0x80 - add r1, #0x1c - mov r2, #0xa - bl sub_020095C4 - str r0, [r4, #0x18] - add r0, r4, #0 - mov r2, #6 - add r0, #0x1c - mov r1, #0 - lsl r2, r2, #0x12 - bl sub_0200964C - mov r0, #0x51 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_020A81D0 - mov r0, #0xa - str r0, [sp] - mov r0, #0x51 - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #0x1a - add r2, r5, #0 - mov r3, #0 - bl sub_0200716C - mov r0, #0 - mov r1, #0xa - bl sub_02002BEC - mov r0, #0xa - bl sub_0200762C - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r1, #0 - add r2, r4, #0 - add r0, r1, #0 -_021D62A2: - add r1, r1, #1 - str r0, [r2, #8] - add r2, r2, #4 - cmp r1, #4 - blo _021D62A2 - bl ov19_021D7970 - ldr r0, [sp, #0x14] - mov r2, #0x59 - str r4, [r0, #0] - lsl r2, r2, #2 - str r6, [sp] - add r0, r4, r2 - sub r2, r2, #4 - ldr r2, [r4, r2] - ldr r3, [r4, #0x18] - add r1, r4, #0 - bl ov19_021DA270 - and r5, r0 - ldr r0, [r4, #0x18] - mov r3, #0x16 - str r0, [sp] - lsl r3, r3, #4 - mov r0, #0x43 - ldr r2, [r4, r3] - sub r3, r3, #4 - lsl r0, r0, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021D79F8 - mov r2, #0x16 - and r5, r0 - str r6, [sp] - ldr r0, _021D6444 ; =0x00005DC0 - lsl r2, r2, #4 - ldr r2, [r4, r2] - ldr r3, [r4, #0x18] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021D8B54 - mov r2, #0x16 - and r5, r0 - str r6, [sp] - ldr r0, _021D6448 ; =0x00006558 - lsl r2, r2, #4 - ldr r2, [r4, r2] - ldr r3, [r4, #0x18] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DA814 - and r5, r0 - add r0, r7, #0 - bl ov19_021D5DE8 - ldr r1, [r4, #0x18] - mov r3, #0x16 - str r1, [sp] - str r0, [sp, #4] - ldr r0, _021D644C ; =0x000065A0 - str r6, [sp, #8] - lsl r3, r3, #4 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DA92C - and r5, r0 - add r0, r7, #0 - bl ov19_021D5DE8 - str r0, [sp, #0x18] - add r0, r7, #0 - bl ov19_021D5DF0 - str r0, [sp, #0x1c] - add r0, r7, #0 - bl ov19_021D5DF8 - ldr r1, [r4, #0x18] - mov r3, #0x16 - str r1, [sp] - ldr r1, [sp, #0x18] - lsl r3, r3, #4 - str r1, [sp, #4] - ldr r1, [sp, #0x1c] - str r1, [sp, #8] - str r0, [sp, #0xc] - str r6, [sp, #0x10] - ldr r0, _021D6450 ; =0x000065F4 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DB2FC - and r5, r0 - ldr r0, [r4, #0x18] - mov r3, #0x16 - str r0, [sp] - ldr r0, _021D6454 ; =0x0000662C - str r6, [sp, #4] - lsl r3, r3, #4 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DB8E4 - and r5, r0 - ldr r0, [r4, #0x18] - mov r3, #0x16 - str r0, [sp] - ldr r0, _021D6458 ; =0x0000B22C - str r6, [sp, #4] - lsl r3, r3, #4 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DC5F0 - and r5, r0 - ldr r0, [r4, #0x18] - mov r3, #0x16 - str r0, [sp] - lsl r3, r3, #4 - ldr r0, _021D645C ; =0x0000B3A4 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DCF88 - and r5, r0 - ldr r0, [r4, #0x18] - mov r3, #0x16 - str r0, [sp] - lsl r3, r3, #4 - ldr r0, _021D6460 ; =0x0000B3A8 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DE3E8 - and r5, r0 - add r0, r7, #0 - bl ov19_021D5DE8 - ldr r1, [r4, #0x18] - mov r3, #0x16 - str r1, [sp] - str r0, [sp, #4] - ldr r0, _021D6464 ; =0x0000B3AC - str r6, [sp, #8] - lsl r3, r3, #4 - ldr r2, [r4, r3] - sub r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, #0 - bl ov19_021DEC04 - and r5, r0 - ldr r0, _021D6468 ; =0x0000B3B0 - add r1, r4, #0 - str r7, [r4, r0] - ldr r0, _021D646C ; =ov19_021D6474 - mov r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0] - ldr r0, _021D6470 ; =ov19_021D6664 - add r1, r4, #0 - mov r2, #1 - bl ov19_021D77C8 - str r0, [r4, #4] - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x20 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D642A: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6430: .word 0x0000B3B4 -_021D6434: .word 0xFFFFE0FF -_021D6438: .word 0x04001000 -_021D643C: .word 0xFFCFFFEF -_021D6440: .word 0x00100010 -_021D6444: .word 0x00005DC0 -_021D6448: .word 0x00006558 -_021D644C: .word 0x000065A0 -_021D6450: .word 0x000065F4 -_021D6454: .word 0x0000662C -_021D6458: .word 0x0000B22C -_021D645C: .word 0x0000B3A4 -_021D6460: .word 0x0000B3A8 -_021D6464: .word 0x0000B3AC -_021D6468: .word 0x0000B3B0 -_021D646C: .word ov19_021D6474 -_021D6470: .word ov19_021D6664 - thumb_func_end ov19_021D61B0 - - thumb_func_start ov19_021D6474 -ov19_021D6474: ; 0x021D6474 - push {r4, lr} - add r4, r1, #0 - bl ov19_021D797C - bl sub_020BFAB8 - bl sub_020BFBE4 - bl sub_020A73C0 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02007768 - ldr r0, _021D649C ; =0x04000540 - mov r1, #0 - str r1, [r0, #0] - pop {r4, pc} - nop -_021D649C: .word 0x04000540 - thumb_func_end ov19_021D6474 - - thumb_func_start ov19_021D64A0 -ov19_021D64A0: ; 0x021D64A0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - ldr r0, [r4, #0] - bl sub_0200DA58 - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, _021D6570 ; =0x0000B3AC - ldr r0, [r4, r0] - bl ov19_021DECAC - ldr r0, _021D6574 ; =0x0000B3A8 - ldr r0, [r4, r0] - bl ov19_021DE440 - ldr r0, _021D6578 ; =0x0000B3A4 - ldr r0, [r4, r0] - bl ov19_021DD078 - ldr r0, _021D657C ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DC680 - ldr r0, _021D6580 ; =0x0000662C - add r0, r4, r0 - bl ov19_021DBAD0 - ldr r0, _021D6584 ; =0x000065F4 - add r0, r4, r0 - bl ov19_021DB370 - ldr r0, _021D6588 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DA9E0 - ldr r0, _021D658C ; =0x00006558 - add r0, r4, r0 - bl ov19_021DA8D8 - ldr r0, _021D6590 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D8E84 - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov19_021D7A74 - mov r0, #0x59 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov19_021DA384 - ldr r0, [r4, #0x18] - bl sub_02021964 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl sub_02019044 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02019044 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02019044 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_02019044 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02007B6C - mov r0, #0 - bl sub_02002C28 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - bl sub_0200A878 - pop {r4, pc} - ; .align 2, 0 -_021D6570: .word 0x0000B3AC -_021D6574: .word 0x0000B3A8 -_021D6578: .word 0x0000B3A4 -_021D657C: .word 0x0000B22C -_021D6580: .word 0x0000662C -_021D6584: .word 0x000065F4 -_021D6588: .word 0x000065A0 -_021D658C: .word 0x00006558 -_021D6590: .word 0x00005DC0 - thumb_func_end ov19_021D64A0 - - thumb_func_start ov19_021D6594 -ov19_021D6594: ; 0x021D6594 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - cmp r6, #0x34 - bhs _021D65F0 - mov r4, #0 - add r1, r5, #0 -_021D65A2: - ldr r0, [r1, #8] - cmp r0, #0 - bne _021D65E6 - ldr r0, _021D65F8 ; =0x021DFF9C - lsl r7, r6, #3 - ldr r0, [r0, r7] - str r0, [sp] - ldr r1, [sp] - mov r0, #0xa - add r1, #0x14 - bl sub_02018144 - add r1, r0, #0 - beq _021D65E0 - str r6, [r1, #0] - strh r4, [r1, #4] - mov r0, #0 - strh r0, [r1, #6] - ldr r0, [sp] - str r5, [r1, #0xc] - add r0, r1, r0 - str r0, [r1, #0x10] - ldr r0, _021D65FC ; =0x021DFF98 - mov r2, #1 - ldr r0, [r0, r7] - bl sub_0200D9E8 - lsl r1, r4, #2 - add r1, r5, r1 - str r0, [r1, #8] - pop {r3, r4, r5, r6, r7, pc} -_021D65E0: - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} -_021D65E6: - add r4, r4, #1 - add r1, r1, #4 - cmp r4, #4 - blo _021D65A2 - pop {r3, r4, r5, r6, r7, pc} -_021D65F0: - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D65F8: .word 0x021DFF9C -_021D65FC: .word 0x021DFF98 - thumb_func_end ov19_021D6594 - - thumb_func_start ov19_021D6600 -ov19_021D6600: ; 0x021D6600 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_021D6608: - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D661C - bl sub_0201CED0 - ldr r0, [r0, #0] - cmp r0, r6 - bne _021D661C - mov r0, #0 - pop {r4, r5, r6, pc} -_021D661C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D6608 - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021D6600 - - thumb_func_start ov19_021D6628 -ov19_021D6628: ; 0x021D6628 - mov r2, #0 -_021D662A: - ldr r1, [r0, #8] - cmp r1, #0 - beq _021D6634 - mov r0, #0 - bx lr -_021D6634: - add r2, r2, #1 - add r0, r0, #4 - cmp r2, #4 - blt _021D662A - mov r0, #1 - bx lr - thumb_func_end ov19_021D6628 - - thumb_func_start ov19_021D6640 -ov19_021D6640: ; 0x021D6640 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrh r0, [r5, #4] - ldr r4, [r5, #0xc] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl sub_0200DA58 - ldrh r0, [r5, #4] - mov r1, #0 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #8] - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D6640 - - thumb_func_start ov19_021D6664 -ov19_021D6664: ; 0x021D6664 - push {r4, lr} - ldr r0, _021D6688 ; =0x000065A0 - add r4, r1, #0 - add r0, r4, r0 - bl ov19_021DAA80 - ldr r0, [r4, #0x18] - bl sub_020219F8 - bl sub_0200A858 - ldr r3, _021D668C ; =0x027E0000 - ldr r1, _021D6690 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - ; .align 2, 0 -_021D6688: .word 0x000065A0 -_021D668C: .word 0x027E0000 -_021D6690: .word 0x00003FF8 - thumb_func_end ov19_021D6664 - - thumb_func_start ov19_021D6694 -ov19_021D6694: ; 0x021D6694 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r0, #0x16 - ldr r4, [r5, #0xc] - lsl r0, r0, #4 - ldr r6, [r4, r0] - ldrh r0, [r5, #6] - cmp r0, #0 - beq _021D66AC - cmp r0, #1 - beq _021D66FA - pop {r3, r4, r5, r6, r7, pc} -_021D66AC: - mov r0, #0x12 - mov r1, #0xa - bl sub_02006C24 - add r7, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov19_021D74B4 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov19_021D75CC - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov19_021D7774 - add r0, r7, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D66F2 - ldr r0, _021D6718 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DAA90 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, r6, r7, pc} -_021D66F2: - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, r6, r7, pc} -_021D66FA: - ldr r0, _021D6718 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DAAC4 - cmp r0, #0 - beq _021D6714 - ldr r0, _021D6718 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DAF98 - add r0, r5, #0 - bl ov19_021D6640 -_021D6714: - pop {r3, r4, r5, r6, r7, pc} - nop -_021D6718: .word 0x000065A0 - thumb_func_end ov19_021D6694 - - thumb_func_start ov19_021D671C -ov19_021D671C: ; 0x021D671C - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldrh r0, [r4, #6] - cmp r0, #0 - beq _021D6730 - cmp r0, #1 - beq _021D6766 - add sp, #0xc - pop {r3, r4, pc} -_021D6730: - ldr r0, _021D6778 ; =0x0000060D - bl sub_02005748 - mov r0, #0xa - str r0, [sp] - ldr r0, _021D677C ; =0x04000050 - mov r1, #0 - mov r2, #0x3f - mov r3, #6 - bl sub_020BF55C - mov r0, #8 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrh r0, [r4, #6] - add sp, #0xc - add r0, r0, #1 - strh r0, [r4, #6] - pop {r3, r4, pc} -_021D6766: - bl sub_0200F2AC - cmp r0, #0 - beq _021D6774 - add r0, r4, #0 - bl ov19_021D6640 -_021D6774: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021D6778: .word 0x0000060D -_021D677C: .word 0x04000050 - thumb_func_end ov19_021D671C - - thumb_func_start ov19_021D6780 -ov19_021D6780: ; 0x021D6780 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldrh r0, [r4, #6] - cmp r0, #0 - beq _021D6794 - cmp r0, #1 - beq _021D67C4 - add sp, #0xc - pop {r3, r4, pc} -_021D6794: - mov r0, #0xa - str r0, [sp] - ldr r0, _021D67D8 ; =0x04000050 - mov r1, #0 - mov r2, #0x3f - mov r3, #6 - bl sub_020BF55C - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrh r0, [r4, #6] - add sp, #0xc - add r0, r0, #1 - strh r0, [r4, #6] - pop {r3, r4, pc} -_021D67C4: - bl sub_0200F2AC - cmp r0, #0 - beq _021D67D2 - add r0, r4, #0 - bl ov19_021D6640 -_021D67D2: - add sp, #0xc - pop {r3, r4, pc} - nop -_021D67D8: .word 0x04000050 - thumb_func_end ov19_021D6780 - - thumb_func_start ov19_021D67DC -ov19_021D67DC: ; 0x021D67DC - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldrh r0, [r4, #6] - cmp r0, #0 - beq _021D67F0 - cmp r0, #1 - beq _021D6812 - add sp, #0xc - pop {r3, r4, pc} -_021D67F0: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrh r0, [r4, #6] - add sp, #0xc - add r0, r0, #1 - strh r0, [r4, #6] - pop {r3, r4, pc} -_021D6812: - bl sub_0200F2AC - cmp r0, #0 - beq _021D6820 - add r0, r4, #0 - bl ov19_021D6640 -_021D6820: - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov19_021D67DC - - thumb_func_start ov19_021D6824 -ov19_021D6824: ; 0x021D6824 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r0, #0x16 - ldr r5, [r4, #0xc] - lsl r0, r0, #4 - ldr r6, [r5, r0] - ldrh r0, [r4, #6] - cmp r0, #4 - bhi _021D68DA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D6842: ; jump table - .short _021D684C - _021D6842 - 2 ; case 0 - .short _021D685A - _021D6842 - 2 ; case 1 - .short _021D686C - _021D6842 - 2 ; case 2 - .short _021D68AC - _021D6842 - 2 ; case 3 - .short _021D68C8 - _021D6842 - 2 ; case 4 -_021D684C: - ldr r0, _021D68DC ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE9B8 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] -_021D685A: - ldr r0, _021D68DC ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE9E4 - cmp r0, #0 - beq _021D68DA - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] -_021D686C: - mov r0, #0x43 - add r1, r6, #0 - lsl r0, r0, #4 - add r1, #0x40 - ldrb r0, [r5, r0] - ldrb r1, [r1] - bl ov19_021D77A4 - add r7, r0, #0 - mov r0, #0x43 - lsl r0, r0, #4 - add r1, r6, #0 - add r0, r5, r0 - add r1, #0x40 - add r2, r7, #0 - mov r3, #1 - bl ov19_021D7B4C - mov r0, #0x43 - lsl r0, r0, #4 - add r6, #0x40 - add r0, r5, r0 - add r1, r6, #0 - add r2, r7, #0 - bl ov19_021D7D70 - ldr r0, _021D68E0 ; =0x000005DC - bl sub_02005748 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] -_021D68AC: - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov19_021D7E1C - cmp r0, #0 - beq _021D68DA - ldr r0, _021D68DC ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE7A0 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] -_021D68C8: - ldr r0, _021D68DC ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE800 - cmp r0, #0 - beq _021D68DA - add r0, r4, #0 - bl ov19_021D6640 -_021D68DA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D68DC: .word 0x0000B3A8 -_021D68E0: .word 0x000005DC - thumb_func_end ov19_021D6824 - - thumb_func_start ov19_021D68E4 -ov19_021D68E4: ; 0x021D68E4 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D68F6 - cmp r0, #1 - beq _021D6914 - pop {r3, r4, r5, pc} -_021D68F6: - ldr r0, _021D6934 ; =0x000005DC - bl sub_02005748 - ldr r0, _021D6938 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D8F60 - ldr r0, _021D693C ; =0x0000B3A8 - ldr r0, [r4, r0] - bl ov19_021DE7A0 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6914: - ldr r0, _021D6938 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9074 - cmp r0, #0 - beq _021D6932 - ldr r0, _021D693C ; =0x0000B3A8 - ldr r0, [r4, r0] - bl ov19_021DE800 - cmp r0, #0 - beq _021D6932 - add r0, r5, #0 - bl ov19_021D6640 -_021D6932: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6934: .word 0x000005DC -_021D6938: .word 0x00005DC0 -_021D693C: .word 0x0000B3A8 - thumb_func_end ov19_021D68E4 - - thumb_func_start ov19_021D6940 -ov19_021D6940: ; 0x021D6940 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x16 - ldr r4, [r5, #0xc] - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E08 - cmp r0, #4 - ldrh r0, [r5, #6] - beq _021D6984 - cmp r0, #0 - beq _021D6960 - cmp r0, #1 - beq _021D6970 - pop {r3, r4, r5, pc} -_021D6960: - ldr r0, _021D69B4 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DAFF8 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6970: - ldr r0, _021D69B4 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DB220 - cmp r0, #0 - beq _021D69B0 - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, pc} -_021D6984: - cmp r0, #0 - beq _021D698E - cmp r0, #1 - beq _021D699E - pop {r3, r4, r5, pc} -_021D698E: - ldr r0, _021D69B8 ; =0x0000B3AC - ldr r0, [r4, r0] - bl ov19_021DEE34 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D699E: - ldr r0, _021D69B8 ; =0x0000B3AC - ldr r0, [r4, r0] - bl ov19_021DEE84 - cmp r0, #0 - beq _021D69B0 - add r0, r5, #0 - bl ov19_021D6640 -_021D69B0: - pop {r3, r4, r5, pc} - nop -_021D69B4: .word 0x000065A0 -_021D69B8: .word 0x0000B3AC - thumb_func_end ov19_021D6940 - - thumb_func_start ov19_021D69BC -ov19_021D69BC: ; 0x021D69BC - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r0, #0x16 - ldr r4, [r5, #0xc] - lsl r0, r0, #4 - ldr r6, [r4, r0] - add r0, r6, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D69DC - ldr r0, _021D6A10 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9A64 - b _021D6A00 -_021D69DC: - add r0, r6, #0 - bl ov19_021D5E10 - cmp r0, #0 - beq _021D69EC - cmp r0, #1 - beq _021D69F8 - b _021D6A00 -_021D69EC: - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov19_021D8A24 - b _021D6A00 -_021D69F8: - ldr r0, _021D6A14 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DCC14 -_021D6A00: - ldr r0, _021D6A18 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DB224 - add r0, r5, #0 - bl ov19_021D6640 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D6A10: .word 0x00005DC0 -_021D6A14: .word 0x0000B22C -_021D6A18: .word 0x000065A0 - thumb_func_end ov19_021D69BC - - thumb_func_start ov19_021D6A1C -ov19_021D6A1C: ; 0x021D6A1C - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D6A34 ; =0x000065A0 - add r0, r1, r0 - bl ov19_021DB078 - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - nop -_021D6A34: .word 0x000065A0 - thumb_func_end ov19_021D6A1C - - thumb_func_start ov19_021D6A38 -ov19_021D6A38: ; 0x021D6A38 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6A4A - cmp r0, #1 - beq _021D6A5A - pop {r4, pc} -_021D6A4A: - ldr r0, _021D6A70 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9230 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6A5A: - ldr r0, _021D6A70 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9278 - cmp r0, #0 - beq _021D6A6C - add r0, r4, #0 - bl ov19_021D6640 -_021D6A6C: - pop {r4, pc} - nop -_021D6A70: .word 0x00005DC0 - thumb_func_end ov19_021D6A38 - - thumb_func_start ov19_021D6A74 -ov19_021D6A74: ; 0x021D6A74 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6A86 - cmp r0, #1 - beq _021D6A96 - pop {r4, pc} -_021D6A86: - ldr r0, _021D6AAC ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9368 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6A96: - ldr r0, _021D6AAC ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D939C - cmp r0, #0 - beq _021D6AA8 - add r0, r4, #0 - bl ov19_021D6640 -_021D6AA8: - pop {r4, pc} - nop -_021D6AAC: .word 0x00005DC0 - thumb_func_end ov19_021D6A74 - - thumb_func_start ov19_021D6AB0 -ov19_021D6AB0: ; 0x021D6AB0 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6AC2 - cmp r0, #1 - beq _021D6AD2 - pop {r4, pc} -_021D6AC2: - ldr r0, _021D6AE8 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D94B4 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6AD2: - ldr r0, _021D6AE8 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9530 - cmp r0, #0 - beq _021D6AE4 - add r0, r4, #0 - bl ov19_021D6640 -_021D6AE4: - pop {r4, pc} - nop -_021D6AE8: .word 0x00005DC0 - thumb_func_end ov19_021D6AB0 - - thumb_func_start ov19_021D6AEC -ov19_021D6AEC: ; 0x021D6AEC - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6AFE - cmp r0, #1 - beq _021D6B0E - pop {r4, pc} -_021D6AFE: - ldr r0, _021D6B18 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9900 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6B0E: - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - nop -_021D6B18: .word 0x00005DC0 - thumb_func_end ov19_021D6AEC - - thumb_func_start ov19_021D6B1C -ov19_021D6B1C: ; 0x021D6B1C - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6B32 - cmp r0, #1 - beq _021D6B42 - cmp r0, #2 - beq _021D6B52 - pop {r4, pc} -_021D6B32: - ldr r0, _021D6B68 ; =0x0000B22C - add r0, r1, r0 - bl ov19_021DCAC0 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6B42: - ldr r0, _021D6B68 ; =0x0000B22C - add r0, r1, r0 - bl ov19_021DC834 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6B52: - ldr r0, _021D6B68 ; =0x0000B22C - add r0, r1, r0 - bl ov19_021DC95C - cmp r0, #0 - beq _021D6B64 - add r0, r4, #0 - bl ov19_021D6640 -_021D6B64: - pop {r4, pc} - nop -_021D6B68: .word 0x0000B22C - thumb_func_end ov19_021D6B1C - - thumb_func_start ov19_021D6B6C -ov19_021D6B6C: ; 0x021D6B6C - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6B7E - cmp r0, #1 - beq _021D6B8E - pop {r4, pc} -_021D6B7E: - ldr r0, _021D6BA4 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9938 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6B8E: - ldr r0, _021D6BA4 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D995C - cmp r0, #0 - beq _021D6BA0 - add r0, r4, #0 - bl ov19_021D6640 -_021D6BA0: - pop {r4, pc} - nop -_021D6BA4: .word 0x00005DC0 - thumb_func_end ov19_021D6B6C - - thumb_func_start ov19_021D6BA8 -ov19_021D6BA8: ; 0x021D6BA8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r1, [r5, #6] - mov r0, #0x16 - lsl r0, r0, #4 - ldr r4, [r5, #0xc] - cmp r1, #0 - ldr r0, [r4, r0] - beq _021D6BC0 - cmp r1, #1 - beq _021D6BD8 - pop {r3, r4, r5, pc} -_021D6BC0: - bl ov19_021D5E24 - add r1, r0, #0 - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov19_021D8860 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6BD8: - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov19_021D8898 - cmp r0, #0 - beq _021D6BEC - add r0, r5, #0 - bl ov19_021D6640 -_021D6BEC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021D6BA8 - - thumb_func_start ov19_021D6BF0 -ov19_021D6BF0: ; 0x021D6BF0 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r1, [r5, #6] - mov r0, #0x16 - lsl r0, r0, #4 - ldr r4, [r5, #0xc] - cmp r1, #0 - ldr r0, [r4, r0] - beq _021D6C08 - cmp r1, #1 - beq _021D6C1E - pop {r3, r4, r5, pc} -_021D6C08: - bl ov19_021D5E2C - add r1, r0, #0 - ldr r0, _021D6C34 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DCAFC - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6C1E: - ldr r0, _021D6C34 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DCB20 - cmp r0, #0 - beq _021D6C30 - add r0, r5, #0 - bl ov19_021D6640 -_021D6C30: - pop {r3, r4, r5, pc} - nop -_021D6C34: .word 0x0000B22C - thumb_func_end ov19_021D6BF0 - - thumb_func_start ov19_021D6C38 -ov19_021D6C38: ; 0x021D6C38 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6C4A - cmp r0, #1 - beq _021D6C5A - pop {r4, pc} -_021D6C4A: - ldr r0, _021D6C70 ; =0x0000662C - add r0, r1, r0 - bl ov19_021DC29C - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6C5A: - ldr r0, _021D6C70 ; =0x0000662C - add r0, r1, r0 - bl ov19_021DC364 - cmp r0, #0 - beq _021D6C6C - add r0, r4, #0 - bl ov19_021D6640 -_021D6C6C: - pop {r4, pc} - nop -_021D6C70: .word 0x0000662C - thumb_func_end ov19_021D6C38 - - thumb_func_start ov19_021D6C74 -ov19_021D6C74: ; 0x021D6C74 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6C86 - cmp r0, #1 - beq _021D6C96 - pop {r4, pc} -_021D6C86: - ldr r0, _021D6CAC ; =0x0000662C - add r0, r1, r0 - bl ov19_021DC3F4 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6C96: - ldr r0, _021D6CAC ; =0x0000662C - add r0, r1, r0 - bl ov19_021DC43C - cmp r0, #0 - beq _021D6CA8 - add r0, r4, #0 - bl ov19_021D6640 -_021D6CA8: - pop {r4, pc} - nop -_021D6CAC: .word 0x0000662C - thumb_func_end ov19_021D6C74 - - thumb_func_start ov19_021D6CB0 -ov19_021D6CB0: ; 0x021D6CB0 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D6CC2 - cmp r0, #1 - beq _021D6CD2 - pop {r3, r4, r5, pc} -_021D6CC2: - ldr r0, _021D6CF0 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9B34 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6CD2: - ldr r0, _021D6CF0 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9B64 - cmp r0, #0 - beq _021D6CEC - ldr r0, _021D6CF4 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DB2B0 - add r0, r5, #0 - bl ov19_021D6640 -_021D6CEC: - pop {r3, r4, r5, pc} - nop -_021D6CF0: .word 0x00005DC0 -_021D6CF4: .word 0x000065A0 - thumb_func_end ov19_021D6CB0 - - thumb_func_start ov19_021D6CF8 -ov19_021D6CF8: ; 0x021D6CF8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D6D0A - cmp r0, #1 - beq _021D6D1A - pop {r3, r4, r5, pc} -_021D6D0A: - ldr r0, _021D6D38 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9BD4 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6D1A: - ldr r0, _021D6D38 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9C04 - cmp r0, #0 - beq _021D6D34 - ldr r0, _021D6D3C ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DB2B0 - add r0, r5, #0 - bl ov19_021D6640 -_021D6D34: - pop {r3, r4, r5, pc} - nop -_021D6D38: .word 0x00005DC0 -_021D6D3C: .word 0x000065A0 - thumb_func_end ov19_021D6CF8 - - thumb_func_start ov19_021D6D40 -ov19_021D6D40: ; 0x021D6D40 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D6D52 - cmp r0, #1 - beq _021D6D62 - pop {r3, r4, r5, pc} -_021D6D52: - ldr r0, _021D6D80 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9C74 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6D62: - ldr r0, _021D6D80 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9CA0 - cmp r0, #0 - beq _021D6D7C - ldr r0, _021D6D84 ; =0x000065A0 - add r0, r4, r0 - bl ov19_021DB2B0 - add r0, r5, #0 - bl ov19_021D6640 -_021D6D7C: - pop {r3, r4, r5, pc} - nop -_021D6D80: .word 0x00005DC0 -_021D6D84: .word 0x000065A0 - thumb_func_end ov19_021D6D40 - - thumb_func_start ov19_021D6D88 -ov19_021D6D88: ; 0x021D6D88 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r0, #0x16 - ldr r4, [r7, #0xc] - lsl r0, r0, #4 - ldr r5, [r4, r0] - add r0, r5, #0 - bl ov19_021D5E74 - add r6, r0, #0 - add r0, r5, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021D6DB2 - ldr r0, _021D6DF0 ; =0x00005DC0 - add r1, r6, #0 - add r0, r4, r0 - bl ov19_021D9AB0 - b _021D6DE8 -_021D6DB2: - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #0 - beq _021D6DD4 - cmp r0, #1 - bne _021D6DE8 - add r0, r5, #0 - bl ov19_021D5E2C - add r1, r0, #0 - ldr r0, _021D6DF4 ; =0x0000B22C - add r2, r6, #0 - add r0, r4, r0 - bl ov19_021DCBDC - b _021D6DE8 -_021D6DD4: - add r0, r5, #0 - bl ov19_021D5E24 - add r1, r0, #0 - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r4, r0 - add r2, r6, #0 - bl ov19_021D8988 -_021D6DE8: - add r0, r7, #0 - bl ov19_021D6640 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6DF0: .word 0x00005DC0 -_021D6DF4: .word 0x0000B22C - thumb_func_end ov19_021D6D88 - - thumb_func_start ov19_021D6DF8 -ov19_021D6DF8: ; 0x021D6DF8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D6E0A - cmp r0, #1 - beq _021D6E22 - pop {r3, r4, r5, pc} -_021D6E0A: - ldr r0, _021D6E40 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9D10 - ldr r0, _021D6E44 ; =0x0000B3A8 - ldr r0, [r4, r0] - bl ov19_021DEB18 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6E22: - ldr r0, _021D6E44 ; =0x0000B3A8 - ldr r0, [r4, r0] - bl ov19_021DEB60 - cmp r0, #0 - beq _021D6E3C - ldr r0, _021D6E40 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9D28 - add r0, r5, #0 - bl ov19_021D6640 -_021D6E3C: - pop {r3, r4, r5, pc} - nop -_021D6E40: .word 0x00005DC0 -_021D6E44: .word 0x0000B3A8 - thumb_func_end ov19_021D6DF8 - - thumb_func_start ov19_021D6E48 -ov19_021D6E48: ; 0x021D6E48 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x16 - ldr r4, [r5, #0xc] - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E94 - add r1, r0, #0 - ldr r0, _021D6E6C ; =0x000065F4 - add r0, r4, r0 - bl ov19_021DB448 - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, pc} - nop -_021D6E6C: .word 0x000065F4 - thumb_func_end ov19_021D6E48 - - thumb_func_start ov19_021D6E70 -ov19_021D6E70: ; 0x021D6E70 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r0, #0x16 - ldr r4, [r6, #0xc] - lsl r0, r0, #4 - ldr r5, [r4, r0] - add r0, r5, #0 - bl ov19_021D5E94 - add r1, r0, #0 - ldr r0, _021D6EA0 ; =0x000065F4 - add r0, r4, r0 - bl ov19_021DB448 - ldr r0, _021D6EA0 ; =0x000065F4 - add r5, #0x74 - add r0, r4, r0 - add r1, r5, #0 - bl ov19_021DB57C - add r0, r6, #0 - bl ov19_021D6640 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D6EA0: .word 0x000065F4 - thumb_func_end ov19_021D6E70 - - thumb_func_start ov19_021D6EA4 -ov19_021D6EA4: ; 0x021D6EA4 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D6EBC ; =0x000065F4 - add r0, r1, r0 - bl ov19_021DB6F0 - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - nop -_021D6EBC: .word 0x000065F4 - thumb_func_end ov19_021D6EA4 - - thumb_func_start ov19_021D6EC0 -ov19_021D6EC0: ; 0x021D6EC0 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D6ED8 ; =0x000065F4 - add r0, r1, r0 - bl ov19_021DB724 - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - nop -_021D6ED8: .word 0x000065F4 - thumb_func_end ov19_021D6EC0 - - thumb_func_start ov19_021D6EDC -ov19_021D6EDC: ; 0x021D6EDC - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r0, #0x16 - ldr r4, [r6, #0xc] - lsl r0, r0, #4 - ldr r5, [r4, r0] - ldr r0, _021D6F04 ; =0x000005DC - bl sub_02005748 - ldr r0, _021D6F08 ; =0x000065F4 - add r5, #0x74 - add r0, r4, r0 - add r1, r5, #0 - bl ov19_021DB748 - add r0, r6, #0 - bl ov19_021D6640 - pop {r4, r5, r6, pc} - nop -_021D6F04: .word 0x000005DC -_021D6F08: .word 0x000065F4 - thumb_func_end ov19_021D6EDC - - thumb_func_start ov19_021D6F0C -ov19_021D6F0C: ; 0x021D6F0C - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r0, #0x16 - ldr r4, [r6, #0xc] - lsl r0, r0, #4 - ldr r5, [r4, r0] - ldr r0, _021D6F34 ; =0x000005DD - bl sub_02005748 - ldr r0, _021D6F38 ; =0x000065F4 - add r5, #0x74 - add r0, r4, r0 - add r1, r5, #0 - bl ov19_021DB790 - add r0, r6, #0 - bl ov19_021D6640 - pop {r4, r5, r6, pc} - nop -_021D6F34: .word 0x000005DD -_021D6F38: .word 0x000065F4 - thumb_func_end ov19_021D6F0C - - thumb_func_start ov19_021D6F3C -ov19_021D6F3C: ; 0x021D6F3C - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6F4E - cmp r0, #1 - beq _021D6F5E - pop {r4, pc} -_021D6F4E: - ldr r0, _021D6F74 ; =0x0000662C - add r0, r1, r0 - bl ov19_021DBB48 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6F5E: - ldr r0, _021D6F74 ; =0x0000662C - add r0, r1, r0 - bl ov19_021DBB68 - cmp r0, #0 - beq _021D6F70 - add r0, r4, #0 - bl ov19_021D6640 -_021D6F70: - pop {r4, pc} - nop -_021D6F74: .word 0x0000662C - thumb_func_end ov19_021D6F3C - - thumb_func_start ov19_021D6F78 -ov19_021D6F78: ; 0x021D6F78 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D6F8A - cmp r0, #1 - beq _021D6FA0 - pop {r3, r4, r5, pc} -_021D6F8A: - ldr r0, _021D6FA8 ; =0x000005DD - bl sub_02005748 - ldr r0, _021D6FAC ; =0x0000662C - add r0, r4, r0 - bl ov19_021DBB70 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D6FA0: - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6FA8: .word 0x000005DD -_021D6FAC: .word 0x0000662C - thumb_func_end ov19_021D6F78 - - thumb_func_start ov19_021D6FB0 -ov19_021D6FB0: ; 0x021D6FB0 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6FC2 - cmp r0, #1 - beq _021D6FD2 - pop {r4, pc} -_021D6FC2: - ldr r0, _021D6FE8 ; =0x0000662C - add r0, r1, r0 - bl ov19_021DBB94 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D6FD2: - ldr r0, _021D6FE8 ; =0x0000662C - add r0, r1, r0 - bl ov19_021DBBA0 - cmp r0, #0 - beq _021D6FE4 - add r0, r4, #0 - bl ov19_021D6640 -_021D6FE4: - pop {r4, pc} - nop -_021D6FE8: .word 0x0000662C - thumb_func_end ov19_021D6FB0 - - thumb_func_start ov19_021D6FEC -ov19_021D6FEC: ; 0x021D6FEC - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D6FFE - cmp r0, #1 - beq _021D7010 - pop {r4, pc} -_021D6FFE: - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r1, r0 - bl ov19_021D8350 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D7010: - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r1, r0 - bl ov19_021D8370 - cmp r0, #0 - beq _021D7024 - add r0, r4, #0 - bl ov19_021D6640 -_021D7024: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D6FEC - - thumb_func_start ov19_021D7028 -ov19_021D7028: ; 0x021D7028 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r0, #0x16 - ldr r5, [r4, #0xc] - lsl r0, r0, #4 - ldr r6, [r5, r0] - ldrh r0, [r4, #6] - cmp r0, #3 - bhi _021D70DA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D7046: ; jump table - .short _021D704E - _021D7046 - 2 ; case 0 - .short _021D7064 - _021D7046 - 2 ; case 1 - .short _021D70A2 - _021D7046 - 2 ; case 2 - .short _021D70C8 - _021D7046 - 2 ; case 3 -_021D704E: - ldr r0, _021D70DC ; =0x000005DD - bl sub_02005748 - ldr r0, _021D70E0 ; =0x00005DC0 - add r0, r5, r0 - bl ov19_021D9690 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, r5, r6, pc} -_021D7064: - ldr r0, _021D70E0 ; =0x00005DC0 - add r0, r5, r0 - bl ov19_021D9704 - cmp r0, #0 - beq _021D70DA - add r0, r6, #0 - bl ov19_021D5E10 - cmp r0, #3 - beq _021D7080 - cmp r0, #4 - beq _021D708C - b _021D7096 -_021D7080: - ldr r0, _021D70E4 ; =0x00006558 - mov r1, #1 - add r0, r5, r0 - bl ov19_021DA8FC - b _021D7096 -_021D708C: - ldr r0, _021D70E4 ; =0x00006558 - mov r1, #2 - add r0, r5, r0 - bl ov19_021DA8FC -_021D7096: - mov r0, #0 - strh r0, [r4, #8] - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, r5, r6, pc} -_021D70A2: - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldrh r0, [r4, #8] - cmp r0, #6 - blo _021D70DA - ldr r0, _021D70E0 ; =0x00005DC0 - add r0, r5, r0 - bl ov19_021D97FC - ldr r0, _021D70E4 ; =0x00006558 - mov r1, #0 - add r0, r5, r0 - bl ov19_021DA8FC - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, r5, r6, pc} -_021D70C8: - ldr r0, _021D70E0 ; =0x00005DC0 - add r0, r5, r0 - bl ov19_021D9858 - cmp r0, #0 - beq _021D70DA - add r0, r4, #0 - bl ov19_021D6640 -_021D70DA: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D70DC: .word 0x000005DD -_021D70E0: .word 0x00005DC0 -_021D70E4: .word 0x00006558 - thumb_func_end ov19_021D7028 - - thumb_func_start ov19_021D70E8 -ov19_021D70E8: ; 0x021D70E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r0, [r5, #6] - ldr r4, [r5, #0xc] - cmp r0, #0 - beq _021D70FA - cmp r0, #1 - beq _021D7118 - pop {r3, r4, r5, pc} -_021D70FA: - ldr r0, _021D712C ; =0x00000633 - bl sub_02005748 - ldr r0, _021D7130 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D99F4 - ldr r0, _021D7134 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DC6C8 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D7118: - ldr r0, _021D7134 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DC6F8 - cmp r0, #0 - beq _021D712A - add r0, r5, #0 - bl ov19_021D6640 -_021D712A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D712C: .word 0x00000633 -_021D7130: .word 0x00005DC0 -_021D7134: .word 0x0000B22C - thumb_func_end ov19_021D70E8 - - thumb_func_start ov19_021D7138 -ov19_021D7138: ; 0x021D7138 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r5, [r4, #0xc] - cmp r0, #3 - bhi _021D71A8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D7150: ; jump table - .short _021D7158 - _021D7150 - 2 ; case 0 - .short _021D7166 - _021D7150 - 2 ; case 1 - .short _021D7178 - _021D7150 - 2 ; case 2 - .short _021D718E - _021D7150 - 2 ; case 3 -_021D7158: - ldr r0, _021D71AC ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE9B8 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] -_021D7166: - ldr r0, _021D71AC ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE9E4 - cmp r0, #0 - beq _021D71A8 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] -_021D7178: - ldr r0, _021D71B0 ; =0x00000634 - bl sub_02005748 - ldr r0, _021D71B4 ; =0x0000B22C - add r0, r5, r0 - bl ov19_021DC768 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r3, r4, r5, pc} -_021D718E: - ldr r0, _021D71B4 ; =0x0000B22C - add r0, r5, r0 - bl ov19_021DC788 - cmp r0, #0 - beq _021D71A8 - ldr r0, _021D71B8 ; =0x00005DC0 - add r0, r5, r0 - bl ov19_021D9A2C - add r0, r4, #0 - bl ov19_021D6640 -_021D71A8: - pop {r3, r4, r5, pc} - nop -_021D71AC: .word 0x0000B3A8 -_021D71B0: .word 0x00000634 -_021D71B4: .word 0x0000B22C -_021D71B8: .word 0x00005DC0 - thumb_func_end ov19_021D7138 - - thumb_func_start ov19_021D71BC -ov19_021D71BC: ; 0x021D71BC - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D71CE - cmp r0, #1 - beq _021D71DE - pop {r4, pc} -_021D71CE: - ldr r0, _021D71F4 ; =0x0000B22C - add r0, r1, r0 - bl ov19_021DC834 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D71DE: - ldr r0, _021D71F4 ; =0x0000B22C - add r0, r1, r0 - bl ov19_021DC95C - cmp r0, #0 - beq _021D71F0 - add r0, r4, #0 - bl ov19_021D6640 -_021D71F0: - pop {r4, pc} - nop -_021D71F4: .word 0x0000B22C - thumb_func_end ov19_021D71BC - - thumb_func_start ov19_021D71F8 -ov19_021D71F8: ; 0x021D71F8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrh r1, [r5, #6] - mov r0, #0x16 - lsl r0, r0, #4 - ldr r4, [r5, #0xc] - cmp r1, #0 - ldr r0, [r4, r0] - beq _021D7210 - cmp r1, #1 - beq _021D7230 - pop {r3, r4, r5, pc} -_021D7210: - bl ov19_021D5E10 - cmp r0, #1 - bne _021D7228 - ldr r0, _021D7244 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DC96C - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r3, r4, r5, pc} -_021D7228: - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, pc} -_021D7230: - ldr r0, _021D7244 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DCA08 - cmp r0, #0 - beq _021D7242 - add r0, r5, #0 - bl ov19_021D6640 -_021D7242: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D7244: .word 0x0000B22C - thumb_func_end ov19_021D71F8 - - thumb_func_start ov19_021D7248 -ov19_021D7248: ; 0x021D7248 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x43 - ldr r4, [r5, #0xc] - lsl r0, r0, #4 - add r0, r4, r0 - bl ov19_021D8938 - ldr r0, _021D7270 ; =0x0000B22C - add r0, r4, r0 - bl ov19_021DCBA0 - ldr r0, _021D7274 ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9A8C - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D7270: .word 0x0000B22C -_021D7274: .word 0x00005DC0 - thumb_func_end ov19_021D7248 - - thumb_func_start ov19_021D7278 -ov19_021D7278: ; 0x021D7278 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r0, #0x16 - ldr r4, [r5, #0xc] - lsl r0, r0, #4 - ldr r6, [r4, r0] - ldrh r0, [r5, #6] - cmp r0, #0 - beq _021D7294 - cmp r0, #1 - beq _021D72A4 - cmp r0, #2 - beq _021D72D0 - pop {r4, r5, r6, pc} -_021D7294: - ldr r0, _021D72E4 ; =0x0000B3A4 - ldr r0, [r4, r0] - bl ov19_021DD378 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r4, r5, r6, pc} -_021D72A4: - ldr r0, _021D72E4 ; =0x0000B3A4 - ldr r0, [r4, r0] - bl ov19_021DD45C - cmp r0, #0 - beq _021D72E2 - add r6, #0x9c - ldrb r0, [r6] - cmp r0, #0 - bne _021D72C0 - add r0, r5, #0 - bl ov19_021D6640 - pop {r4, r5, r6, pc} -_021D72C0: - ldr r0, _021D72E4 ; =0x0000B3A4 - ldr r0, [r4, r0] - bl ov19_021DD714 - ldrh r0, [r5, #6] - add r0, r0, #1 - strh r0, [r5, #6] - pop {r4, r5, r6, pc} -_021D72D0: - ldr r0, _021D72E4 ; =0x0000B3A4 - ldr r0, [r4, r0] - bl ov19_021DD740 - cmp r0, #0 - beq _021D72E2 - add r0, r5, #0 - bl ov19_021D6640 -_021D72E2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D72E4: .word 0x0000B3A4 - thumb_func_end ov19_021D7278 - - thumb_func_start ov19_021D72E8 -ov19_021D72E8: ; 0x021D72E8 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D72FA - cmp r0, #1 - beq _021D730A - pop {r4, pc} -_021D72FA: - ldr r0, _021D7320 ; =0x0000B3A4 - ldr r0, [r1, r0] - bl ov19_021DD768 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D730A: - ldr r0, _021D7320 ; =0x0000B3A4 - ldr r0, [r1, r0] - bl ov19_021DD820 - cmp r0, #0 - beq _021D731C - add r0, r4, #0 - bl ov19_021D6640 -_021D731C: - pop {r4, pc} - nop -_021D7320: .word 0x0000B3A4 - thumb_func_end ov19_021D72E8 - - thumb_func_start ov19_021D7324 -ov19_021D7324: ; 0x021D7324 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D733C ; =0x0000B3A4 - ldr r0, [r1, r0] - bl ov19_021DE2F4 - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - nop -_021D733C: .word 0x0000B3A4 - thumb_func_end ov19_021D7324 - - thumb_func_start ov19_021D7340 -ov19_021D7340: ; 0x021D7340 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D7358 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9AEC - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - nop -_021D7358: .word 0x00005DC0 - thumb_func_end ov19_021D7340 - - thumb_func_start ov19_021D735C -ov19_021D735C: ; 0x021D735C - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r5, #0xc] - ldr r0, _021D737C ; =0x00005DC0 - add r0, r4, r0 - bl ov19_021D9B10 - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov19_021D8A6C - add r0, r5, #0 - bl ov19_021D6640 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D737C: .word 0x00005DC0 - thumb_func_end ov19_021D735C - - thumb_func_start ov19_021D7380 -ov19_021D7380: ; 0x021D7380 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x43 - ldr r1, [r4, #0xc] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov19_021D8B14 - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - thumb_func_end ov19_021D7380 - - thumb_func_start ov19_021D7398 -ov19_021D7398: ; 0x021D7398 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x43 - ldr r1, [r4, #0xc] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov19_021D8A6C - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - thumb_func_end ov19_021D7398 - - thumb_func_start ov19_021D73B0 -ov19_021D73B0: ; 0x021D73B0 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D73C2 - cmp r0, #1 - beq _021D73D2 - pop {r4, pc} -_021D73C2: - ldr r0, _021D73E8 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9230 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D73D2: - ldr r0, _021D73E8 ; =0x00005DC0 - add r0, r1, r0 - bl ov19_021D9278 - cmp r0, #0 - beq _021D73E4 - add r0, r4, #0 - bl ov19_021D6640 -_021D73E4: - pop {r4, pc} - nop -_021D73E8: .word 0x00005DC0 - thumb_func_end ov19_021D73B0 - - thumb_func_start ov19_021D73EC -ov19_021D73EC: ; 0x021D73EC - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D7404 ; =0x0000B3AC - ldr r0, [r1, r0] - mov r1, #0 - bl ov19_021DEDDC - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - ; .align 2, 0 -_021D7404: .word 0x0000B3AC - thumb_func_end ov19_021D73EC - - thumb_func_start ov19_021D7408 -ov19_021D7408: ; 0x021D7408 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - ldr r0, _021D7420 ; =0x0000B3AC - ldr r0, [r1, r0] - mov r1, #1 - bl ov19_021DEDDC - add r0, r4, #0 - bl ov19_021D6640 - pop {r4, pc} - ; .align 2, 0 -_021D7420: .word 0x0000B3AC - thumb_func_end ov19_021D7408 - - thumb_func_start ov19_021D7424 -ov19_021D7424: ; 0x021D7424 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #6] - ldr r1, [r4, #0xc] - cmp r0, #0 - beq _021D7436 - cmp r0, #1 - beq _021D7446 - pop {r4, pc} -_021D7436: - ldr r0, _021D745C ; =0x0000B3AC - ldr r0, [r1, r0] - bl ov19_021DEE88 - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - pop {r4, pc} -_021D7446: - ldr r0, _021D745C ; =0x0000B3AC - ldr r0, [r1, r0] - bl ov19_021DEEA8 - cmp r0, #0 - beq _021D7458 - add r0, r4, #0 - bl ov19_021D6640 -_021D7458: - pop {r4, pc} - nop -_021D745C: .word 0x0000B3AC - thumb_func_end ov19_021D7424 - - thumb_func_start ov19_021D7460 -ov19_021D7460: ; 0x021D7460 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldrh r0, [r4, #6] - cmp r0, #0 - beq _021D7474 - cmp r0, #1 - beq _021D749C - add sp, #0xc - pop {r3, r4, pc} -_021D7474: - ldr r0, _021D74B0 ; =0x0000060E - bl sub_02005748 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrh r0, [r4, #6] - add sp, #0xc - add r0, r0, #1 - strh r0, [r4, #6] - pop {r3, r4, pc} -_021D749C: - bl sub_0200F2AC - cmp r0, #0 - beq _021D74AA - add r0, r4, #0 - bl ov19_021D6640 -_021D74AA: - add sp, #0xc - pop {r3, r4, pc} - nop -_021D74B0: .word 0x0000060E - thumb_func_end ov19_021D7460 - - thumb_func_start ov19_021D74B4 -ov19_021D74B4: ; 0x021D74B4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D759C ; =0x021DFF70 - add r4, r1, #0 - bl sub_0201FE94 - ldr r2, _021D75A0 ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - mov r0, #1 - mov r1, #0 - add r2, r0, #0 - bl sub_020BDE40 - ldr r0, _021D75A4 ; =0x021DFE48 - bl sub_02018368 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75A8 ; =0x021DFF1C - mov r1, #1 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75AC ; =0x021DFF00 - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75B0 ; =0x021DFEC8 - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D7556 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75B4 ; =0x021DFEE4 - mov r1, #4 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75B8 ; =0x021DFEAC - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75BC ; =0x021DFE90 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75C0 ; =0x021DFE74 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - b _021D7596 -_021D7556: - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75B4 ; =0x021DFEE4 - mov r1, #4 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75C4 ; =0x021DFF54 - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75C8 ; =0x021DFE58 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, _021D75C0 ; =0x021DFE74 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 -_021D7596: - bl ov19_021D76FC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D759C: .word 0x021DFF70 -_021D75A0: .word 0x04000304 -_021D75A4: .word 0x021DFE48 -_021D75A8: .word 0x021DFF1C -_021D75AC: .word 0x021DFF00 -_021D75B0: .word 0x021DFEC8 -_021D75B4: .word 0x021DFEE4 -_021D75B8: .word 0x021DFEAC -_021D75BC: .word 0x021DFE90 -_021D75C0: .word 0x021DFE74 -_021D75C4: .word 0x021DFF54 -_021D75C8: .word 0x021DFE58 - thumb_func_end ov19_021D74B4 - - thumb_func_start ov19_021D75CC -ov19_021D75CC: ; 0x021D75CC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r3, #1 - add r4, r2, #0 - mov r2, #0x57 - add r6, r1, #0 - str r3, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r1, #4 - bl sub_020070E8 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - add r3, r2, #0 - bl sub_02019CB8 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02019448 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r1, #1 - mov r2, #0x57 - str r1, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r3, #2 - bl sub_020070E8 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0xa - mov r2, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #5 - add r3, r2, #0 - bl sub_02007130 - add r0, r6, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021D7670 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - mov r2, #0x57 - str r0, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r3, #2 - bl sub_0200710C -_021D7670: - mov r0, #0x43 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov19_021D7A9C - mov r0, #0x43 - lsl r0, r0, #4 - add r1, r6, #0 - add r0, r5, r0 - add r1, #0x40 - mov r2, #0 - mov r3, #1 - bl ov19_021D7B4C - ldr r0, _021D76E4 ; =0x000065A0 - add r0, r5, r0 - bl ov19_021DAADC - ldr r0, _021D76E8 ; =0x000065F4 - add r0, r5, r0 - bl ov19_021DB3C4 - ldr r0, _021D76EC ; =0x0000662C - add r0, r5, r0 - bl ov19_021DBA9C - ldr r0, _021D76F0 ; =0x0000B3A4 - add r1, r4, #0 - ldr r0, [r5, r0] - bl ov19_021DD114 - ldr r0, _021D76F4 ; =0x0000B3AC - add r1, r4, #0 - ldr r0, [r5, r0] - bl ov19_021DECE8 - add r0, r6, #0 - bl ov19_021D5E10 - cmp r0, #1 - bne _021D76CA - ldr r0, _021D76F8 ; =0x0000B22C - add r0, r5, r0 - bl ov19_021DC6A0 -_021D76CA: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - bl sub_020BDDF8 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D76E4: .word 0x000065A0 -_021D76E8: .word 0x000065F4 -_021D76EC: .word 0x0000662C -_021D76F0: .word 0x0000B3A4 -_021D76F4: .word 0x0000B3AC -_021D76F8: .word 0x0000B22C - thumb_func_end ov19_021D75CC - - thumb_func_start ov19_021D76FC -ov19_021D76FC: ; 0x021D76FC - push {r3, lr} - bl sub_020B28CC - bl sub_020BFB4C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _021D7760 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r1, [r0] - ldr r2, _021D7764 ; =0xFFFFCFFD - and r1, r2 - strh r1, [r0] - ldrh r3, [r0] - add r1, r2, #2 - and r3, r1 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0] - ldr r1, _021D7768 ; =0x0000CFFB - and r1, r3 - strh r1, [r0] - add r1, r2, #2 - ldrh r3, [r0] - lsr r2, r2, #0x11 - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _021D776C ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _021D7770 ; =0xBFFF0000 - str r0, [r1, #0x40] - pop {r3, pc} - ; .align 2, 0 -_021D7760: .word 0x04000008 -_021D7764: .word 0xFFFFCFFD -_021D7768: .word 0x0000CFFB -_021D776C: .word 0x04000540 -_021D7770: .word 0xBFFF0000 - thumb_func_end ov19_021D76FC - - thumb_func_start ov19_021D7774 -ov19_021D7774: ; 0x021D7774 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D7798 ; =0x00005DC0 - add r4, r2, #0 - add r0, r5, r0 - add r1, r4, #0 - bl ov19_021D8C1C - ldr r0, _021D779C ; =0x00006558 - add r1, r4, #0 - add r0, r5, r0 - bl ov19_021DA864 - ldr r0, _021D77A0 ; =0x0000B3A8 - ldr r0, [r5, r0] - bl ov19_021DE584 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D7798: .word 0x00005DC0 -_021D779C: .word 0x00006558 -_021D77A0: .word 0x0000B3A8 - thumb_func_end ov19_021D7774 - - thumb_func_start ov19_021D77A4 -ov19_021D77A4: ; 0x021D77A4 - cmp r1, r0 - bls _021D77B2 - mov r2, #0x12 - sub r3, r1, r0 - sub r1, r2, r1 - add r0, r0, r1 - b _021D77BA -_021D77B2: - mov r2, #0x12 - sub r2, r2, r0 - add r3, r1, r2 - sub r0, r0, r1 -_021D77BA: - cmp r3, r0 - blt _021D77C4 - mov r0, #0 - mvn r0, r0 - bx lr -_021D77C4: - mov r0, #1 - bx lr - thumb_func_end ov19_021D77A4 - - thumb_func_start ov19_021D77C8 -ov19_021D77C8: ; 0x021D77C8 - ldr r3, _021D77CC ; =sub_0200DA04 - bx r3 - ; .align 2, 0 -_021D77CC: .word sub_0200DA04 - thumb_func_end ov19_021D77C8 - - thumb_func_start ov19_021D77D0 -ov19_021D77D0: ; 0x021D77D0 - mov r1, #0x51 - lsl r1, r1, #2 - add r0, r0, r1 - bx lr - thumb_func_end ov19_021D77D0 - - thumb_func_start ov19_021D77D8 -ov19_021D77D8: ; 0x021D77D8 - mov r1, #0x59 - lsl r1, r1, #2 - add r0, r0, r1 - bx lr - thumb_func_end ov19_021D77D8 - - thumb_func_start ov19_021D77E0 -ov19_021D77E0: ; 0x021D77E0 - mov r1, #0x43 - lsl r1, r1, #4 - add r0, r0, r1 - bx lr - thumb_func_end ov19_021D77E0 - - thumb_func_start ov19_021D77E8 -ov19_021D77E8: ; 0x021D77E8 - ldr r1, _021D77F0 ; =0x0000B22C - add r0, r0, r1 - bx lr - nop -_021D77F0: .word 0x0000B22C - thumb_func_end ov19_021D77E8 - - thumb_func_start ov19_021D77F4 -ov19_021D77F4: ; 0x021D77F4 - ldr r1, _021D77FC ; =0x00005DC0 - add r0, r0, r1 - bx lr - nop -_021D77FC: .word 0x00005DC0 - thumb_func_end ov19_021D77F4 - - thumb_func_start ov19_021D7800 -ov19_021D7800: ; 0x021D7800 - ldr r1, _021D7808 ; =0x0000B3A8 - ldr r0, [r0, r1] - bx lr - nop -_021D7808: .word 0x0000B3A8 - thumb_func_end ov19_021D7800 - - thumb_func_start ov19_021D780C -ov19_021D780C: ; 0x021D780C - ldr r1, _021D7814 ; =0x0000662C - add r0, r0, r1 - bx lr - nop -_021D7814: .word 0x0000662C - thumb_func_end ov19_021D780C - - thumb_func_start ov19_021D7818 -ov19_021D7818: ; 0x021D7818 - mov r1, #0x56 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov19_021D7818 - - thumb_func_start ov19_021D7820 -ov19_021D7820: ; 0x021D7820 - push {r3, lr} - mov r1, #0x16 - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl ov19_021D5E08 - cmp r0, #4 - beq _021D7834 - mov r0, #0 - pop {r3, pc} -_021D7834: - mov r0, #0x2b - mvn r0, r0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov19_021D7820 - - thumb_func_start ov19_021D783C -ov19_021D783C: ; 0x021D783C - str r1, [r0, #0] - str r2, [r0, #8] - ldr r1, [sp] - str r3, [r0, #0xc] - str r1, [r0, #0x10] - add r1, r0, #0 - ldr r2, [sp, #4] - add r1, #0x20 - strb r2, [r1] - mov r1, #0 - str r1, [r0, #4] - str r1, [r0, #0x14] - str r1, [r0, #0x18] - str r1, [r0, #0x1c] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D783C - - thumb_func_start ov19_021D785C -ov19_021D785C: ; 0x021D785C - push {r3, r4, r5, lr} - sub sp, #0x20 - str r0, [sp] - lsl r0, r2, #0xc - str r0, [sp, #8] - lsl r0, r3, #0xc - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x30] - str r1, [sp, #4] - str r0, [sp, #0x14] - ldr r0, [sp, #0x34] - str r0, [sp, #0x18] - mov r0, #0xa - str r0, [sp, #0x1c] - bl sub_020C3D98 - add r4, r0, #0 - add r0, sp, #0 - bl sub_02021B90 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020C3DAC - cmp r5, #0 - beq _021D78A6 - add r0, r5, #0 - mov r1, #1 - bl sub_02021CC8 - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 -_021D78A6: - add r0, r5, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021D785C - - thumb_func_start ov19_021D78AC -ov19_021D78AC: ; 0x021D78AC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020C3D98 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021F58 - add r0, r6, #0 - bl sub_020C3DAC - pop {r4, r5, r6, pc} - thumb_func_end ov19_021D78AC - - thumb_func_start ov19_021D78C8 -ov19_021D78C8: ; 0x021D78C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - lsl r1, r3, #0x1b - lsr r1, r1, #0x13 - mov ip, r1 - asr r1, r3, #5 - lsl r1, r1, #0x1b - lsr r1, r1, #0x13 - mov lr, r1 - asr r1, r3, #0xa - lsl r1, r1, #0x1b - lsr r1, r1, #0x13 - str r1, [sp, #4] - add r7, r0, #0 - str r2, [sp] - add r1, r2, #0 - sub r2, r2, #1 - ldr r0, [sp, #0x20] - str r2, [sp] - cmp r1, #0 - beq _021D795E -_021D78F4: - ldrh r1, [r7] - add r7, r7, #2 - lsl r2, r1, #0x1b - lsr r4, r2, #0x13 - asr r2, r1, #5 - asr r1, r1, #0xa - lsl r2, r2, #0x1b - lsl r1, r1, #0x1b - lsr r3, r2, #0x13 - lsr r2, r1, #0x13 - mov r1, ip - sub r5, r1, r4 - asr r1, r5, #3 - lsr r1, r1, #0x1c - add r1, r5, r1 - asr r1, r1, #4 - mul r1, r0 - add r5, r4, r1 - mov r1, lr - sub r1, r1, r3 - asr r4, r1, #3 - lsr r4, r4, #0x1c - add r4, r1, r4 - asr r1, r4, #4 - mul r1, r0 - add r3, r3, r1 - ldr r1, [sp, #4] - sub r1, r1, r2 - asr r4, r1, #3 - lsr r4, r4, #0x1c - add r4, r1, r4 - asr r1, r4, #4 - mul r1, r0 - add r4, r2, r1 - asr r2, r5, #8 - mov r1, #0x1f - and r1, r2 - asr r2, r3, #8 - asr r3, r4, #8 - lsl r3, r3, #0x1b - lsl r2, r2, #0x1b - lsr r3, r3, #0x11 - lsr r2, r2, #0x16 - orr r2, r3 - orr r1, r2 - strh r1, [r6] - ldr r1, [sp] - add r6, r6, #2 - add r2, r1, #0 - sub r2, r2, #1 - str r2, [sp] - cmp r1, #0 - bne _021D78F4 -_021D795E: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D78C8 - - thumb_func_start ov19_021D7964 -ov19_021D7964: ; 0x021D7964 - ldr r1, _021D796C ; =0x0000B3B0 - ldr r0, [r0, r1] - bx lr - nop -_021D796C: .word 0x0000B3B0 - thumb_func_end ov19_021D7964 - - thumb_func_start ov19_021D7970 -ov19_021D7970: ; 0x021D7970 - ldr r0, _021D7978 ; =0x021E05EC - mov r1, #0 - str r1, [r0, #0] - bx lr - ; .align 2, 0 -_021D7978: .word 0x021E05EC - thumb_func_end ov19_021D7970 - - thumb_func_start ov19_021D797C -ov19_021D797C: ; 0x021D797C - push {r4, r5, r6, lr} - ldr r6, _021D79B0 ; =0x021E05EC - ldr r0, [r6, #0] - cmp r0, #0 - beq _021D79AE - mov r4, #0 - cmp r0, #0 - bls _021D79A8 - ldr r5, _021D79B4 ; =0x021E05F0 -_021D798E: - ldr r0, [r5, #8] - bl sub_020181C4 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021D799E - ldr r0, [r5, #4] - blx r1 -_021D799E: - ldr r0, [r6, #0] - add r4, r4, #1 - add r5, #0xc - cmp r4, r0 - blo _021D798E -_021D79A8: - ldr r0, _021D79B0 ; =0x021E05EC - mov r1, #0 - str r1, [r0, #0] -_021D79AE: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D79B0: .word 0x021E05EC -_021D79B4: .word 0x021E05F0 - thumb_func_end ov19_021D797C - - thumb_func_start ov19_021D79B8 -ov19_021D79B8: ; 0x021D79B8 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _021D79E8 ; =0x021E05EC - add r4, r1, #0 - ldr r0, [r0, #0] - add r6, r2, #0 - cmp r0, #0x20 - blo _021D79CC - bl sub_02022974 -_021D79CC: - ldr r2, _021D79E8 ; =0x021E05EC - mov r1, #0xc - ldr r0, [r2, #0] - ldr r3, _021D79EC ; =0x021E05F8 - mul r1, r0 - str r5, [r3, r1] - ldr r3, _021D79F0 ; =0x021E05F0 - add r0, r0, #1 - str r4, [r3, r1] - ldr r3, _021D79F4 ; =0x021E05F4 - str r0, [r2, #0] - str r6, [r3, r1] - pop {r4, r5, r6, pc} - nop -_021D79E8: .word 0x021E05EC -_021D79EC: .word 0x021E05F8 -_021D79F0: .word 0x021E05F0 -_021D79F4: .word 0x021E05F4 - thumb_func_end ov19_021D79B8 - - thumb_func_start ov19_021D79F8 -ov19_021D79F8: ; 0x021D79F8 - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r0, #0x40 - ldrb r0, [r0] - add r4, r1, #0 - add r7, r3, #0 - strb r0, [r5] - mov r0, #0xb - strb r0, [r5, #1] - mov r0, #0 - strb r0, [r5, #2] - add r0, r4, #0 - bl ov19_021D7820 - ldr r1, _021D7A68 ; =0x0000585C - str r0, [r5, r1] - ldr r2, [r5, r1] - add r0, r1, #0 - add r2, #0x48 - sub r0, #8 - str r2, [r5, r0] - mov r0, #0x11 - ldr r2, [r5, r1] - lsl r0, r0, #4 - add r2, r2, r0 - sub r0, r1, #4 - str r2, [r5, r0] - add r0, r4, #0 - bl ov19_021D77D8 - ldr r1, _021D7A6C ; =0x00005980 - mov r2, #0x1e - str r0, [r5, r1] - ldr r0, [r5, r1] - add r1, r5, #0 - add r1, #0xa8 - bl ov19_021DA3CC - ldr r0, _021D7A6C ; =0x00005980 - mov r1, #0x1b - lsl r1, r1, #6 - ldr r0, [r5, r0] - add r1, r5, r1 - mov r2, #0x1e - bl ov19_021DA3CC - ldr r1, _021D7A70 ; =0x00005984 - str r7, [r5, r1] - add r0, r1, #4 - str r6, [r5, r0] - add r1, #8 - str r4, [r5, r1] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7A68: .word 0x0000585C -_021D7A6C: .word 0x00005980 -_021D7A70: .word 0x00005984 - thumb_func_end ov19_021D79F8 - - thumb_func_start ov19_021D7A74 -ov19_021D7A74: ; 0x021D7A74 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D7A98 ; =0x00005980 - add r1, r4, #0 - ldr r0, [r4, r0] - add r1, #0xa8 - mov r2, #0x1e - bl ov19_021DA3F0 - ldr r0, _021D7A98 ; =0x00005980 - mov r1, #0x1b - lsl r1, r1, #6 - ldr r0, [r4, r0] - add r1, r4, r1 - mov r2, #0x1e - bl ov19_021DA3F0 - pop {r4, pc} - ; .align 2, 0 -_021D7A98: .word 0x00005980 - thumb_func_end ov19_021D7A74 - - thumb_func_start ov19_021D7A9C -ov19_021D7A9C: ; 0x021D7A9C - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _021D7AE8 ; =0x00005984 - mov r1, #3 - ldr r0, [r4, r0] - bl sub_020192EC - ldr r1, _021D7AEC ; =0x0000585C - str r0, [r4, #0xc] - ldr r1, [r4, r1] - mov r2, #0 - sub r1, r0, r1 - add r3, r1, #0 - ldr r0, _021D7AF0 ; =0x000001FF - mov r1, #3 - and r3, r0 - ldr r0, _021D7AE8 ; =0x00005984 - str r3, [r4, #0xc] - ldr r0, [r4, r0] - bl sub_02019184 - mov r3, #0 - str r3, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x20 - str r0, [sp, #8] - mov r0, #9 - str r0, [sp, #0xc] - ldr r0, _021D7AE8 ; =0x00005984 - mov r1, #3 - ldr r0, [r4, r0] - mov r2, #0x18 - bl sub_02019CB8 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_021D7AE8: .word 0x00005984 -_021D7AEC: .word 0x0000585C -_021D7AF0: .word 0x000001FF - thumb_func_end ov19_021D7A9C - - thumb_func_start ov19_021D7AF4 -ov19_021D7AF4: ; 0x021D7AF4 - push {r4, r5, r6, r7} - ldr r5, [sp, #0x10] - cmp r1, #0 - beq _021D7B2A - ldrb r6, [r0, #2] - mov r4, #1 - add r7, r6, #0 - mov r6, #0x69 - eor r7, r4 - lsl r6, r6, #2 - mul r6, r7 - str r6, [r2, #0] - mov r2, #0x17 - mul r2, r1 - ldrb r6, [r0, #1] - mov r1, #0x3f - add r2, r6, r2 - and r1, r2 - str r1, [r3, #0] - ldrb r0, [r0, #2] - eor r0, r4 - lsl r1, r0, #1 - ldr r0, _021D7B48 ; =0x021E0138 - ldrh r0, [r0, r1] - str r0, [r5, #0] - pop {r4, r5, r6, r7} - bx lr -_021D7B2A: - ldrb r4, [r0, #2] - mov r1, #0x69 - lsl r1, r1, #2 - mul r1, r4 - str r1, [r2, #0] - ldrb r1, [r0, #1] - str r1, [r3, #0] - ldrb r0, [r0, #2] - lsl r1, r0, #1 - ldr r0, _021D7B48 ; =0x021E0138 - ldrh r0, [r0, r1] - str r0, [r5, #0] - pop {r4, r5, r6, r7} - bx lr - nop -_021D7B48: .word 0x021E0138 - thumb_func_end ov19_021D7AF4 - - thumb_func_start ov19_021D7B4C -ov19_021D7B4C: ; 0x021D7B4C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - add r6, r2, #0 - add r1, sp, #8 - add r7, r3, #0 - str r1, [sp] - add r1, r6, #0 - add r2, sp, #0x10 - add r3, sp, #0xc - add r5, r0, #0 - bl ov19_021D7AF4 - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r3, r7, #0 - bl ov19_021D7BC0 - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021D7C58 - ldr r0, [sp, #8] - add r1, r4, #0 - str r0, [sp] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - add r0, r5, #0 - bl ov19_021D7D00 - cmp r7, #0 - beq _021D7BB4 - cmp r6, #0 - bne _021D7BB4 - ldrb r3, [r5, #2] - mov r0, #0xb8 - mul r0, r6 - str r0, [sp] - ldr r0, _021D7BB8 ; =0x00000618 - add r1, r5, #0 - add r1, #0xa8 - mul r0, r3 - add r0, r1, r0 - str r0, [sp, #4] - ldr r1, _021D7BBC ; =0x00005980 - ldrb r2, [r4] - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov19_021D85C4 -_021D7BB4: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7BB8: .word 0x00000618 -_021D7BBC: .word 0x00005980 - thumb_func_end ov19_021D7B4C - - thumb_func_start ov19_021D7BC0 -ov19_021D7BC0: ; 0x021D7BC0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - ldrb r2, [r1, #1] - add r7, r0, #0 - add r5, r3, #0 - lsl r1, r2, #1 - add r2, r2, r1 - ldr r1, _021D7C4C ; =0x021E017A - mov r0, #0x12 - ldrb r1, [r1, r2] - add r2, sp, #8 - mov r3, #0xa - bl sub_02006F88 - str r0, [sp, #4] - cmp r0, #0 - beq _021D7C48 - cmp r5, #0 - beq _021D7BFE - ldr r0, [sp, #8] - mov r1, #0x20 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [sp, #8] - lsl r1, r4, #5 - ldr r0, [r0, #0xc] - mov r2, #0x20 - bl sub_020C00B4 -_021D7BFE: - ldr r0, _021D7C50 ; =0x00005860 - mov r6, #0 - add r4, r6, #0 - add r5, r7, r0 -_021D7C06: - str r4, [sp] - ldr r0, [sp, #8] - ldr r3, _021D7C54 ; =0x00007FFF - ldr r0, [r0, #0xc] - add r1, r5, #0 - mov r2, #0x10 - bl ov19_021D78C8 - add r6, r6, #1 - add r4, r4, #2 - add r5, #0x20 - cmp r6, #8 - blt _021D7C06 - mov r2, #0x10 - str r2, [sp] - ldr r1, _021D7C50 ; =0x00005860 - ldr r0, [sp, #8] - add r3, r7, r1 - lsl r1, r6, #5 - add r1, r3, r1 - ldr r0, [r0, #0xc] - ldr r3, _021D7C54 ; =0x00007FFF - bl ov19_021D78C8 - ldr r0, _021D7C50 ; =0x00005860 - mov r1, #0x12 - add r0, r7, r0 - lsl r1, r1, #4 - bl sub_020C2C54 - ldr r0, [sp, #4] - bl sub_020181C4 -_021D7C48: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7C4C: .word 0x021E017A -_021D7C50: .word 0x00005860 -_021D7C54: .word 0x00007FFF - thumb_func_end ov19_021D7BC0 - - thumb_func_start ov19_021D7C58 -ov19_021D7C58: ; 0x021D7C58 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r2, #0 - mov r2, #1 - add r5, r1, #0 - str r2, [sp] - ldrb r3, [r5, #1] - add r6, r0, #0 - mov r0, #0x12 - lsl r1, r3, #1 - add r3, r3, r1 - ldr r1, _021D7CF4 ; =0x021E0179 - ldrb r1, [r1, r3] - mov r3, #0xa - bl sub_02006FE8 - str r0, [sp, #0x10] - cmp r0, #0 - beq _021D7CF0 - add r1, sp, #0x14 - bl sub_020A7164 - cmp r0, #0 - beq _021D7CEA - mov r0, #0xa - mov r1, #1 - bl sub_0201A778 - add r4, r0, #0 - beq _021D7CD8 - ldr r0, _021D7CF8 ; =0x00005984 - ldr r0, [r6, r0] - str r0, [r4, #0] - mov r0, #0x15 - strb r0, [r4, #7] - mov r0, #4 - strb r0, [r4, #8] - ldr r0, [sp, #0x14] - ldr r0, [r0, #0x14] - str r0, [r4, #0xc] - mov r0, #0 - ldr r1, [r5, #4] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #0xd - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D7CFC ; =0x00020100 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r5, #4] - lsr r5, r3, #1 - mov r3, #0x54 - add r0, r4, #0 - sub r3, r3, r5 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020181C4 -_021D7CD8: - ldr r3, [sp, #0x14] - ldr r0, _021D7CF8 ; =0x00005984 - str r7, [sp] - ldr r2, [r3, #0x14] - ldr r0, [r6, r0] - ldr r3, [r3, #0x10] - mov r1, #3 - bl sub_0201958C -_021D7CEA: - ldr r0, [sp, #0x10] - bl sub_020181C4 -_021D7CF0: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7CF4: .word 0x021E0179 -_021D7CF8: .word 0x00005984 -_021D7CFC: .word 0x00020100 - thumb_func_end ov19_021D7C58 - - thumb_func_start ov19_021D7D00 -ov19_021D7D00: ; 0x021D7D00 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - mov r2, #1 - str r2, [sp] - add r6, r3, #0 - ldrb r3, [r1, #1] - add r5, r0, #0 - mov r0, #0x12 - lsl r1, r3, #1 - add r3, r3, r1 - ldr r1, _021D7D68 ; =0x021E0178 - ldrb r1, [r1, r3] - mov r3, #0xa - bl sub_02006FE8 - str r0, [sp, #4] - cmp r0, #0 - beq _021D7D64 - add r1, sp, #8 - bl sub_020A7248 - ldr r0, _021D7D6C ; =0x00005984 - mov r1, #3 - ldr r0, [r5, r0] - bl sub_02019FE4 - add r7, r0, #0 - beq _021D7D4A - ldr r1, [sp, #0x20] - add r2, r4, #0 - str r1, [sp] - ldr r1, [sp, #8] - add r3, r6, #0 - add r1, #0xc - bl ov19_021D8764 -_021D7D4A: - ldr r0, [sp, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [sp] - ldr r0, _021D7D6C ; =0x00005984 - mov r3, #1 - ldr r0, [r5, r0] - mov r1, #3 - add r2, r7, #0 - lsl r3, r3, #0xc - bl sub_02019460 -_021D7D64: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7D68: .word 0x021E0178 -_021D7D6C: .word 0x00005984 - thumb_func_end ov19_021D7D00 - - thumb_func_start ov19_021D7D70 -ov19_021D7D70: ; 0x021D7D70 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021D7E0C ; =0x00005984 - add r4, r1, #0 - ldr r0, [r5, r0] - mov r1, #3 - add r6, r2, #0 - bl sub_020192EC - lsl r0, r0, #0x17 - lsr r1, r0, #0xb - mov r0, #0xb8 - add r7, r6, #0 - mul r7, r0 - lsl r0, r7, #0xc - str r1, [r5, #8] - add r1, r1, r0 - str r1, [r5, #0x14] - ldr r0, [r5, #8] - sub r0, r1, r0 - mov r1, #0x1e - bl sub_020E1F6C - str r0, [r5, #0x10] - ldr r0, [r5, #0x14] - asr r1, r0, #0xc - ldr r0, _021D7E10 ; =0x000001FF - and r0, r1 - str r0, [r5, #0x14] - mov r0, #0x1e - str r0, [r5, #4] - ldrb r0, [r5, #2] - strb r0, [r5, #3] - mov r0, #0x17 - ldrb r1, [r5, #1] - mul r0, r6 - add r0, r1, r0 - strb r0, [r5, #1] - ldrb r1, [r5, #1] - mov r0, #0x3f - and r0, r1 - strb r0, [r5, #1] - ldrb r1, [r5, #2] - mov r0, #1 - eor r0, r1 - strb r0, [r5, #2] - ldrb r1, [r4] - add r0, r5, #0 - bl ov19_021D813C - ldr r1, [r5, #0x10] - add r0, r5, #0 - add r2, r7, #0 - bl ov19_021D7F14 - ldrb r0, [r4] - mov r1, #1 - mov r2, #0 - str r0, [r5, #0x30] - ldrb r0, [r5, #2] - str r0, [r5, #0x34] - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x9c - str r2, [r0, #0] - ldr r0, _021D7E14 ; =ov19_021D7E24 - add r1, r5, #0 - bl sub_0200D9E8 - ldr r0, _021D7E18 ; =ov19_021D7E6C - add r1, r5, #0 - mov r2, #1 - bl ov19_021D77C8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D7E0C: .word 0x00005984 -_021D7E10: .word 0x000001FF -_021D7E14: .word ov19_021D7E24 -_021D7E18: .word ov19_021D7E6C - thumb_func_end ov19_021D7D70 - - thumb_func_start ov19_021D7E1C -ov19_021D7E1C: ; 0x021D7E1C - add r0, #0x9c - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021D7E1C - - thumb_func_start ov19_021D7E24 -ov19_021D7E24: ; 0x021D7E24 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021D7E4A - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #2 - bne _021D7E64 - ldr r1, [r4, #0x10] - add r0, r4, #0 - bl ov19_021D7F9C - mov r0, #0 - add r4, #0x98 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D7E4A: - ldr r0, [r4, #0x14] - str r0, [r4, #0xc] - ldr r0, _021D7E68 ; =0x00005988 - ldr r0, [r4, r0] - bl ov19_021D5E68 - strb r0, [r4] - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #1 - add r4, #0x9c - str r0, [r4, #0] -_021D7E64: - pop {r3, r4, r5, pc} - nop -_021D7E68: .word 0x00005988 - thumb_func_end ov19_021D7E24 - - thumb_func_start ov19_021D7E6C -ov19_021D7E6C: ; 0x021D7E6C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldrb r3, [r5, #3] - add r6, r0, #0 - mov r0, #1 - add r4, r3, #0 - eor r4, r0 - ldr r0, [r5, #4] - cmp r0, #0 - beq _021D7EE4 - add r0, r5, #0 - add r0, #0x98 - ldr r2, [r0, #0] - cmp r2, #2 - bhs _021D7F06 - ldr r6, _021D7F08 ; =0x00000618 - add r1, #0xa8 - mul r6, r3 - add r0, r5, #0 - add r1, r1, r6 - bl ov19_021D865C - ldr r1, _021D7F08 ; =0x00000618 - add r2, r5, #0 - add r2, #0xa8 - mul r1, r4 - add r1, r2, r1 - add r2, r5, #0 - add r2, #0x98 - ldr r2, [r2, #0] - add r0, r5, #0 - bl ov19_021D86B4 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r2, #0 - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - ldr r0, [r5, #8] - asr r1, r0, #0xc - ldr r0, _021D7F0C ; =0x000001FF - and r0, r1 - str r0, [r5, #0xc] - ldr r1, [r5, #8] - ldr r0, [r5, #0x10] - add r0, r1, r0 - str r0, [r5, #8] - ldr r0, _021D7F10 ; =0x00005984 - ldr r3, [r5, #0xc] - ldr r0, [r5, r0] - mov r1, #3 - bl sub_02019184 - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] - pop {r4, r5, r6, pc} -_021D7EE4: - ldr r0, _021D7F10 ; =0x00005984 - ldr r3, [r5, #0x14] - ldr r0, [r5, r0] - mov r1, #3 - mov r2, #0 - bl sub_02019184 - ldr r1, _021D7F08 ; =0x00000618 - add r0, r5, #0 - add r5, #0xa8 - mul r1, r4 - add r1, r5, r1 - bl ov19_021D870C - add r0, r6, #0 - bl sub_0200DA58 -_021D7F06: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D7F08: .word 0x00000618 -_021D7F0C: .word 0x000001FF -_021D7F10: .word 0x00005984 - thumb_func_end ov19_021D7E6C - - thumb_func_start ov19_021D7F14 -ov19_021D7F14: ; 0x021D7F14 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r7, #0 - str r0, [sp, #8] - add r0, #0xa8 - str r1, [sp] - str r2, [sp, #4] - add r6, r7, #0 - add r4, r5, #0 - str r0, [sp, #8] -_021D7F2A: - ldr r0, _021D7F8C ; =0x0000585C - ldr r0, [r5, r0] - add r0, #0x70 - add r0, r0, r6 - lsl r1, r0, #0xc - ldr r0, [sp] - str r1, [r4, #0x68] - sub r1, r1, r0 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - ldr r0, _021D7F8C ; =0x0000585C - ldr r0, [r5, r0] - add r0, #0x70 - add r1, r0, r6 - ldr r0, [sp, #4] - add r0, r0, r1 - lsl r1, r0, #0xc - ldr r0, [sp] - str r1, [r4, #0x38] - sub r0, r1, r0 - str r0, [r4, #0x50] - asr r2, r0, #0xc - ldr r0, _021D7F90 ; =0x00005854 - ldr r0, [r5, r0] - cmp r2, r0 - ble _021D7F7E - ldr r0, _021D7F94 ; =0x00005858 - ldr r0, [r5, r0] - cmp r2, r0 - bge _021D7F7E - ldrb r3, [r5, #3] - mov r1, #1 - add r0, r5, #0 - eor r1, r3 - ldr r3, _021D7F98 ; =0x00000618 - mul r3, r1 - ldr r1, [sp, #8] - add r1, r1, r3 - add r3, r7, #0 - bl ov19_021D803C -_021D7F7E: - add r7, r7, #1 - add r6, #0x18 - add r4, r4, #4 - cmp r7, #6 - blt _021D7F2A - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7F8C: .word 0x0000585C -_021D7F90: .word 0x00005854 -_021D7F94: .word 0x00005858 -_021D7F98: .word 0x00000618 - thumb_func_end ov19_021D7F14 - - thumb_func_start ov19_021D7F9C -ov19_021D7F9C: ; 0x021D7F9C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r6, r1, #0 - ldrb r1, [r5, #3] - str r0, [sp] - add r0, #0xa8 - str r0, [sp] - ldr r0, _021D8030 ; =0x00000618 - add r2, r1, #0 - mul r2, r0 - str r2, [sp, #4] - mov r2, #1 - eor r1, r2 - mul r0, r1 - mov r7, #0 - add r4, r5, #0 - str r0, [sp, #8] -_021D7FC0: - add r0, r4, #0 - add r0, #0x80 - ldr r1, _021D8034 ; =0x00005854 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - asr r0, r0, #0xc - cmp r0, r1 - ble _021D7FD8 - ldr r1, _021D8038 ; =0x00005858 - ldr r1, [r5, r1] - cmp r0, r1 - blt _021D7FE6 -_021D7FD8: - ldr r2, [sp] - ldr r1, [sp, #4] - add r0, r5, #0 - add r1, r2, r1 - add r2, r7, #0 - bl ov19_021D8114 -_021D7FE6: - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - sub r0, r0, r6 - str r0, [r4, #0x68] - sub r1, r0, r6 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - ldr r0, [r4, #0x50] - sub r0, r0, r6 - str r0, [r4, #0x38] - sub r0, r0, r6 - str r0, [r4, #0x50] - asr r2, r0, #0xc - ldr r0, _021D8034 ; =0x00005854 - ldr r0, [r5, r0] - cmp r2, r0 - ble _021D8022 - ldr r0, _021D8038 ; =0x00005858 - ldr r0, [r5, r0] - cmp r2, r0 - bge _021D8022 - ldr r3, [sp] - ldr r1, [sp, #8] - add r0, r5, #0 - add r1, r3, r1 - add r3, r7, #0 - bl ov19_021D803C -_021D8022: - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #6 - blt _021D7FC0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021D8030: .word 0x00000618 -_021D8034: .word 0x00005854 -_021D8038: .word 0x00005858 - thumb_func_end ov19_021D7F9C - - thumb_func_start ov19_021D803C -ov19_021D803C: ; 0x021D803C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r1, #0 - ldr r1, _021D8100 ; =0x00005988 - str r0, [sp, #0x1c] - ldr r0, [r0, r1] - str r2, [sp, #0x20] - add r4, r3, #0 - bl ov19_021D5E90 - str r0, [sp, #0x30] - ldr r0, [sp, #0x1c] - mov r7, #0x28 - ldr r1, [r0, #0x34] - mov r0, #0x1e - add r2, r1, #0 - lsl r0, r0, #4 - mul r2, r0 - add r2, #0x58 - lsl r0, r4, #4 - add r0, r2, r0 - str r0, [sp, #0x28] - mov r0, #0x34 - mul r0, r4 - add r5, r5, r0 - mov r0, #0 - str r0, [sp, #0x2c] - ldr r1, _021D8104 ; =0x00000CD8 - ldr r0, [sp, #0x1c] - add r1, r0, r1 - lsl r0, r7, #4 - mul r0, r4 - add r0, r1, r0 - str r0, [sp, #0x24] - ldr r0, [sp, #0x1c] - lsl r1, r4, #1 - add r6, r0, r1 -_021D8086: - ldr r0, [r5, #0] - cmp r0, #0 - bne _021D80D6 - ldr r1, [sp, #0x1c] - ldr r0, [sp, #0x30] - ldr r1, [r1, #0x30] - add r2, r4, #0 - bl sub_02079C9C - mov r1, #0xac - mov r2, #0 - str r0, [sp, #0x34] - bl sub_02074570 - cmp r0, #0 - beq _021D80D6 - add r0, r4, #0 - bl ov19_021D85B4 - ldr r1, [sp, #0x24] - ldr r2, _021D8108 ; =0x00005814 - str r1, [sp] - ldr r1, [sp, #0x20] - ldr r3, _021D810C ; =0x000057D8 - str r1, [sp, #4] - str r7, [sp, #8] - mov r1, #2 - str r1, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x1c] - str r0, [sp, #0x14] - str r5, [sp, #0x18] - ldr r0, _021D8110 ; =0x00005980 - ldrh r2, [r6, r2] - ldr r0, [r1, r0] - ldrh r3, [r6, r3] - ldr r1, [sp, #0x34] - bl ov19_021DA548 -_021D80D6: - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x24] - add r0, #0x60 - str r0, [sp, #0x28] - mov r0, #0x4e - lsl r0, r0, #2 - add r5, r5, r0 - mov r0, #0xf - lsl r0, r0, #8 - add r0, r1, r0 - str r0, [sp, #0x24] - ldr r0, [sp, #0x2c] - add r6, #0xc - add r0, r0, #1 - add r4, r4, #6 - add r7, #0x18 - str r0, [sp, #0x2c] - cmp r0, #5 - blt _021D8086 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D8100: .word 0x00005988 -_021D8104: .word 0x00000CD8 -_021D8108: .word 0x00005814 -_021D810C: .word 0x000057D8 -_021D8110: .word 0x00005980 - thumb_func_end ov19_021D803C - - thumb_func_start ov19_021D8114 -ov19_021D8114: ; 0x021D8114 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x34 - mov r4, #0 - mov r7, #0x4e - add r5, r1, #0 - mul r0, r2 - add r5, r5, r0 - add r6, r4, #0 - lsl r7, r7, #2 -_021D8126: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D8132 - bl sub_02021BD4 - str r6, [r5, #0] -_021D8132: - add r4, r4, #1 - add r5, r5, r7 - cmp r4, #5 - blt _021D8126 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021D8114 - - thumb_func_start ov19_021D813C -ov19_021D813C: ; 0x021D813C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r1, [sp, #4] - ldr r1, _021D81A4 ; =0x00005988 - str r0, [sp] - ldr r0, [r0, r1] - bl ov19_021D5E90 - ldr r4, [sp] - str r0, [sp, #8] - ldr r1, _021D81A8 ; =0x00000CD8 - add r0, r4, #0 - mov r6, #0 - add r5, r0, r1 -_021D8158: - ldr r0, [sp, #8] - ldr r1, [sp, #4] - add r2, r6, #0 - bl sub_02079C9C - mov r1, #5 - mov r2, #0 - add r7, r0, #0 - bl sub_02074570 - cmp r0, #0 - beq _021D8192 - ldr r1, _021D81AC ; =0x00005814 - strh r0, [r4, r1] - add r0, r7, #0 - bl sub_02079D40 - ldr r1, _021D81B0 ; =0x000057D8 - mov r3, #0xa - strh r0, [r4, r1] - ldr r2, _021D81B0 ; =0x000057D8 - ldr r1, [sp] - ldr r0, _021D81B4 ; =0x00005980 - ldrh r2, [r4, r2] - ldr r0, [r1, r0] - add r1, r5, #0 - lsl r3, r3, #6 - bl ov19_021DA744 -_021D8192: - mov r0, #0xa - lsl r0, r0, #6 - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, r0 - cmp r6, #0x1e - blo _021D8158 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D81A4: .word 0x00005988 -_021D81A8: .word 0x00000CD8 -_021D81AC: .word 0x00005814 -_021D81B0: .word 0x000057D8 -_021D81B4: .word 0x00005980 - thumb_func_end ov19_021D813C - - thumb_func_start ov19_021D81B8 -ov19_021D81B8: ; 0x021D81B8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r1, #0 - add r0, #0xa3 - strb r1, [r0] - mov r0, #0xa - mov r1, #0x10 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _021D820A - str r5, [r4, #0] - strh r6, [r4, #4] - ldr r0, [sp] - strh r7, [r4, #6] - str r0, [r4, #0xc] - mov r0, #2 - strh r0, [r4, #0xa] - cmp r7, r6 - ble _021D81EA - mov r0, #1 - b _021D81EC -_021D81EA: - sub r0, r0, #3 -_021D81EC: - strh r0, [r4, #8] - ldr r0, _021D820C ; =ov19_021D8210 - add r1, r4, #0 - mov r2, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021D8204 - mov r0, #1 - add r5, #0xa3 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} -_021D8204: - add r0, r4, #0 - bl sub_020181C4 -_021D820A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D820C: .word ov19_021D8210 - thumb_func_end ov19_021D81B8 - - thumb_func_start ov19_021D8210 -ov19_021D8210: ; 0x021D8210 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0xa - ldrsh r0, [r4, r0] - cmp r0, #0 - beq _021D8224 - sub r0, r0, #1 - strh r0, [r4, #0xa] - pop {r3, r4, r5, pc} -_021D8224: - mov r2, #4 - mov r1, #6 - ldrsh r0, [r4, r2] - ldrsh r1, [r4, r1] - cmp r0, r1 - beq _021D8252 - mov r1, #8 - ldrsh r1, [r4, r1] - add r0, r0, r1 - strh r0, [r4, #4] - ldr r1, [r4, #0] - ldr r0, _021D8264 ; =0x00005860 - add r1, r1, r0 - ldrsh r0, [r4, r2] - mov r2, #0x20 - lsl r0, r0, #5 - add r0, r1, r0 - ldr r1, [r4, #0xc] - bl sub_020C00B4 - mov r0, #2 - strh r0, [r4, #0xa] - pop {r3, r4, r5, pc} -_021D8252: - ldr r1, _021D8268 ; =ov19_021D826C - ldr r2, [r4, #0] - add r0, r4, #0 - bl ov19_021D79B8 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D8264: .word 0x00005860 -_021D8268: .word ov19_021D826C - thumb_func_end ov19_021D8210 - - thumb_func_start ov19_021D826C -ov19_021D826C: ; 0x021D826C - mov r1, #0 - add r0, #0xa3 - strb r1, [r0] - bx lr - thumb_func_end ov19_021D826C - - thumb_func_start ov19_021D8274 -ov19_021D8274: ; 0x021D8274 - push {r3, r4, lr} - sub sp, #4 - ldr r3, _021D8300 ; =0x021E0770 - add r4, r1, #0 - ldr r1, [r3, #0xc] - cmp r1, #0 - beq _021D828E - cmp r1, #1 - beq _021D82C4 - cmp r1, #2 - beq _021D82F0 - add sp, #4 - pop {r3, r4, pc} -_021D828E: - ldr r0, _021D8304 ; =0x021E0774 - ldr r2, _021D8308 ; =0x021E0778 - str r0, [sp] - ldr r3, _021D830C ; =0x021E0770 - add r0, r4, #0 - mov r1, #0 - bl ov19_021D7AF4 - ldr r0, _021D8310 ; =0x00005988 - ldr r0, [r4, r0] - bl ov19_021D5E8C - ldr r2, _021D8300 ; =0x021E0770 - add r1, r0, #0 - ldr r0, _021D8314 ; =0x021E05C0 - ldr r2, [r2, #4] - str r1, [r0, #0] - add r0, r4, #0 - mov r3, #0 - bl ov19_021D7BC0 - ldr r0, _021D8300 ; =0x021E0770 - add sp, #4 - ldr r1, [r0, #0xc] - add r1, r1, #1 - str r1, [r0, #0xc] - pop {r3, r4, pc} -_021D82C4: - ldr r0, [r3, #4] - ldr r1, _021D8314 ; =0x021E05C0 - str r0, [sp] - ldr r2, [r3, #0] - ldr r1, [r1, #0] - ldr r3, [r3, #8] - add r0, r4, #0 - bl ov19_021D7D00 - ldr r1, _021D8314 ; =0x021E05C0 - ldr r2, _021D8300 ; =0x021E0770 - ldr r1, [r1, #0] - ldr r2, [r2, #8] - add r0, r4, #0 - bl ov19_021D7C58 - ldr r0, _021D8300 ; =0x021E0770 - add sp, #4 - ldr r1, [r0, #0xc] - add r1, r1, #1 - str r1, [r0, #0xc] - pop {r3, r4, pc} -_021D82F0: - mov r1, #0 - add r4, #0xa3 - strb r1, [r4] - str r1, [r3, #0xc] - bl sub_0200DA58 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_021D8300: .word 0x021E0770 -_021D8304: .word 0x021E0774 -_021D8308: .word 0x021E0778 -_021D830C: .word 0x021E0770 -_021D8310: .word 0x00005988 -_021D8314: .word 0x021E05C0 - thumb_func_end ov19_021D8274 - - thumb_func_start ov19_021D8318 -ov19_021D8318: ; 0x021D8318 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D8348 ; =ov19_021D8274 - add r1, r4, #0 - mov r2, #0 - bl sub_0200DA3C - cmp r0, #0 - beq _021D832E - mov r1, #1 - b _021D8330 -_021D832E: - mov r1, #0 -_021D8330: - add r0, r4, #0 - add r0, #0xa3 - add r4, #0xa3 - strb r1, [r0] - ldrb r0, [r4] - cmp r0, #0 - beq _021D8344 - ldr r0, _021D834C ; =0x021E0770 - mov r1, #0 - str r1, [r0, #0xc] -_021D8344: - pop {r4, pc} - nop -_021D8348: .word ov19_021D8274 -_021D834C: .word 0x021E0770 - thumb_func_end ov19_021D8318 - - thumb_func_start ov19_021D8350 -ov19_021D8350: ; 0x021D8350 - push {r4, lr} - add r2, r0, #0 - mov r1, #0 - add r2, #0xa2 - strb r1, [r2] - ldrb r3, [r0, #2] - mov r2, #8 - lsl r4, r3, #1 - ldr r3, _021D836C ; =0x021E0138 - ldrh r3, [r3, r4] - lsl r3, r3, #5 - bl ov19_021D81B8 - pop {r4, pc} - ; .align 2, 0 -_021D836C: .word 0x021E0138 - thumb_func_end ov19_021D8350 - - thumb_func_start ov19_021D8370 -ov19_021D8370: ; 0x021D8370 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0xa2 - ldrb r1, [r1] - cmp r1, #4 - bhi _021D83FE - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D838A: ; jump table - .short _021D8394 - _021D838A - 2 ; case 0 - .short _021D83AA - _021D838A - 2 ; case 1 - .short _021D83BC - _021D838A - 2 ; case 2 - .short _021D83D2 - _021D838A - 2 ; case 3 - .short _021D83F2 - _021D838A - 2 ; case 4 -_021D8394: - add r0, #0xa3 - ldrb r0, [r0] - cmp r0, #0 - bne _021D83FE - add r0, r4, #0 - add r0, #0xa2 - ldrb r0, [r0] - add r4, #0xa2 - add r0, r0, #1 - strb r0, [r4] - b _021D83FE -_021D83AA: - bl ov19_021D8318 - add r0, r4, #0 - add r0, #0xa2 - ldrb r0, [r0] - add r4, #0xa2 - add r0, r0, #1 - strb r0, [r4] - b _021D83FE -_021D83BC: - add r0, #0xa3 - ldrb r0, [r0] - cmp r0, #0 - bne _021D83FE - add r0, r4, #0 - add r0, #0xa2 - ldrb r0, [r0] - add r4, #0xa2 - add r0, r0, #1 - strb r0, [r4] - b _021D83FE -_021D83D2: - ldrb r3, [r4, #2] - mov r1, #8 - mov r2, #0 - lsl r5, r3, #1 - ldr r3, _021D8404 ; =0x021E0138 - ldrh r3, [r3, r5] - lsl r3, r3, #5 - bl ov19_021D81B8 - add r0, r4, #0 - add r0, #0xa2 - ldrb r0, [r0] - add r4, #0xa2 - add r0, r0, #1 - strb r0, [r4] - b _021D83FE -_021D83F2: - add r4, #0xa3 - ldrb r0, [r4] - cmp r0, #0 - bne _021D83FE - mov r0, #1 - pop {r3, r4, r5, pc} -_021D83FE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D8404: .word 0x021E0138 - thumb_func_end ov19_021D8370 - - thumb_func_start ov19_021D8408 -ov19_021D8408: ; 0x021D8408 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r2, #0 - add r4, r1, #0 - mov r0, #0x34 - mul r4, r0 - add r0, r5, #0 - ldrb r2, [r5, #2] - ldr r1, _021D8454 ; =0x00000618 - add r0, #0xa8 - mul r1, r2 - add r0, r0, r1 - add r6, r3, #0 - add r0, r0, r4 - add r1, r6, #0 - mov r2, #1 - bl ov19_021DA418 - ldr r0, _021D8458 ; =0x00005980 - add r1, r6, #0 - ldr r0, [r5, r0] - add r2, r7, #0 - bl ov19_021DA754 - ldr r0, _021D8458 ; =0x00005980 - add r3, r5, #0 - ldrb r2, [r5, #2] - ldr r1, _021D8454 ; =0x00000618 - add r3, #0xa8 - mul r1, r2 - add r1, r3, r1 - ldr r0, [r5, r0] - add r1, r1, r4 - mov r2, #1 - bl ov19_021DA3CC - pop {r3, r4, r5, r6, r7, pc} - nop -_021D8454: .word 0x00000618 -_021D8458: .word 0x00005980 - thumb_func_end ov19_021D8408 - - thumb_func_start ov19_021D845C -ov19_021D845C: ; 0x021D845C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldrb r0, [r6, #2] - add r7, r1, #0 - add r3, r6, #0 - str r0, [sp] - ldr r1, _021D84C0 ; =0x00000618 - ldr r0, [sp] - add r3, #0xa8 - mul r1, r0 - mov r0, #0x34 - add r4, r7, #0 - mul r4, r0 - add r5, r3, r1 - add r0, r2, #0 - add r1, r5, r4 - mov r2, #1 - bl ov19_021DA418 - ldr r0, _021D84C4 ; =0x00005980 - add r1, r5, r4 - ldr r0, [r6, r0] - mov r2, #0 - bl ov19_021DA7F4 - mov r2, #0x1e - ldr r0, _021D84C4 ; =0x00005980 - ldr r3, [sp] - lsl r2, r2, #4 - mul r2, r3 - ldr r0, [r6, r0] - add r2, #0x58 - lsl r3, r7, #4 - add r1, r5, r4 - add r2, r2, r3 - bl ov19_021DA754 - add r0, r7, #0 - bl ov19_021D85B4 - add r1, r0, #0 - ldr r0, [r5, r4] - bl ov19_021D78AC - add r0, r6, #0 - add r1, r7, #0 - bl ov19_021D89F4 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D84C0: .word 0x00000618 -_021D84C4: .word 0x00005980 - thumb_func_end ov19_021D845C - - thumb_func_start ov19_021D84C8 -ov19_021D84C8: ; 0x021D84C8 - ldrb r2, [r0, #2] - add r3, r0, #0 - ldr r0, _021D84DC ; =0x00000618 - add r3, #0xa8 - mul r0, r2 - add r2, r3, r0 - mov r0, #0x34 - mul r0, r1 - add r0, r2, r0 - bx lr - ; .align 2, 0 -_021D84DC: .word 0x00000618 - thumb_func_end ov19_021D84C8 - - thumb_func_start ov19_021D84E0 -ov19_021D84E0: ; 0x021D84E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, _021D85A4 ; =0x00005988 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - bl sub_0207999C - mov r4, #0 - str r0, [sp, #0x1c] - add r0, r5, #0 - str r0, [sp, #0x28] - add r0, #0xa8 - add r7, r4, #0 - str r4, [sp, #0x2c] - str r0, [sp, #0x28] -_021D8500: - ldr r0, _021D85A4 ; =0x00005988 - ldr r1, [sp, #0x1c] - ldr r0, [r5, r0] - add r2, r4, #0 - ldr r0, [r0, #0] - bl sub_02079C9C - mov r1, #0xac - mov r2, #0 - str r0, [sp, #0x20] - bl sub_02074570 - cmp r0, #0 - beq _021D8592 - ldrb r1, [r5, #2] - ldr r0, _021D85A8 ; =0x00000618 - mul r0, r1 - str r0, [sp, #0x18] - add r0, r5, r0 - add r0, r7, r0 - str r1, [sp, #0x14] - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021D8592 - add r0, r4, #0 - bl ov19_021D85B4 - str r0, [sp, #0x24] - add r0, r4, #0 - mov r1, #6 - bl sub_020E1F6C - str r1, [sp, #0x10] - add r0, r4, #0 - mov r1, #6 - bl sub_020E1F6C - mov ip, r0 - mov r0, #2 - str r0, [sp] - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x10] - str r0, [sp, #4] - ldr r1, [sp, #0x14] - mov r0, #0x1e - add r2, r1, #0 - lsl r0, r0, #4 - mul r2, r0 - ldr r0, [sp, #0x2c] - add r2, #0x58 - add r0, r2, r0 - str r0, [sp, #8] - ldr r1, [sp, #0x28] - ldr r0, [sp, #0x18] - ldr r2, _021D85AC ; =0x0000585C - add r0, r1, r0 - add r0, r0, r7 - str r0, [sp, #0xc] - ldr r6, [r5, r2] - mov r2, #0x18 - ldr r0, _021D85B0 ; =0x00005980 - mul r2, r3 - add r6, #0x70 - add r2, r6, r2 - mov r6, ip - mov r3, #0x18 - mul r3, r6 - ldr r0, [r5, r0] - ldr r1, [sp, #0x20] - add r3, #0x28 - bl ov19_021DA428 -_021D8592: - ldr r0, [sp, #0x2c] - add r4, r4, #1 - add r0, #0x10 - add r7, #0x34 - str r0, [sp, #0x2c] - cmp r4, #0x1e - blt _021D8500 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D85A4: .word 0x00005988 -_021D85A8: .word 0x00000618 -_021D85AC: .word 0x0000585C -_021D85B0: .word 0x00005980 - thumb_func_end ov19_021D84E0 - - thumb_func_start ov19_021D85B4 -ov19_021D85B4: ; 0x021D85B4 - lsl r1, r0, #1 - ldr r0, _021D85C0 ; =0x021E013C - ldrh r0, [r0, r1] - add r0, #0xb - bx lr - nop -_021D85C0: .word 0x021E013C - thumb_func_end ov19_021D85B4 - - thumb_func_start ov19_021D85C4 -ov19_021D85C4: ; 0x021D85C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - str r0, [sp, #0x10] - mov r0, #0x1e - lsl r0, r0, #4 - add r6, r3, #0 - mul r6, r0 - mov r0, #0x28 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x48] - mov r4, #0 - ldr r7, [sp, #0x4c] - str r1, [sp, #0x14] - str r2, [sp, #0x18] - add r6, #0x58 - str r4, [sp, #0x24] - str r0, [sp, #0x20] -_021D85E6: - mov r0, #0 - str r0, [sp, #0x28] - add r5, r0, #0 -_021D85EC: - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [r0, #0x40] - add r2, r4, #0 - ldr r0, [r0, #0] - bl sub_02079C9C - mov r1, #5 - mov r2, #0 - str r0, [sp, #0x2c] - bl sub_02074570 - cmp r0, #0 - beq _021D8630 - add r0, r4, #0 - bl ov19_021D85B4 - mov r1, #2 - str r1, [sp] - str r0, [sp, #4] - str r6, [sp, #8] - ldr r3, [sp, #0x10] - ldr r2, _021D8658 ; =0x0000585C - str r7, [sp, #0xc] - ldr r2, [r3, r2] - ldr r0, [sp, #0x14] - add r2, #0x70 - add r3, r2, r5 - ldr r2, [sp, #0x20] - ldr r1, [sp, #0x2c] - add r2, r2, r3 - ldr r3, [sp, #0x1c] - bl ov19_021DA428 -_021D8630: - ldr r0, [sp, #0x28] - add r7, #0x34 - add r0, r0, #1 - add r4, r4, #1 - add r6, #0x10 - add r5, #0x18 - str r0, [sp, #0x28] - cmp r0, #6 - blo _021D85EC - ldr r0, [sp, #0x1c] - add r0, #0x18 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x24] - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, #5 - blo _021D85E6 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D8658: .word 0x0000585C - thumb_func_end ov19_021D85C4 - - thumb_func_start ov19_021D865C -ov19_021D865C: ; 0x021D865C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #0x18 - mul r0, r2 - add r5, r1, #0 - str r0, [sp, #8] -_021D866E: - ldr r1, [sp] - ldr r0, [sp, #8] - mov r7, #0 - add r4, r1, r0 -_021D8676: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D869A - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0xc - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - ldr r0, [r4, #0x68] - str r0, [sp, #0xc] - ldr r0, [r5, #0] - bl sub_02021C50 -_021D869A: - add r7, r7, #1 - add r5, #0x34 - add r4, r4, #4 - cmp r7, #6 - blt _021D8676 - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _021D866E - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D865C - - thumb_func_start ov19_021D86B4 -ov19_021D86B4: ; 0x021D86B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #0x18 - mul r0, r2 - add r5, r1, #0 - str r0, [sp, #8] -_021D86C6: - ldr r1, [sp] - ldr r0, [sp, #8] - mov r7, #0 - add r4, r1, r0 -_021D86CE: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D86F2 - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0xc - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - ldr r0, [r4, #0x38] - str r0, [sp, #0xc] - ldr r0, [r5, #0] - bl sub_02021C50 -_021D86F2: - add r7, r7, #1 - add r5, #0x34 - add r4, r4, #4 - cmp r7, #6 - blt _021D86CE - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _021D86C6 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021D86B4 - - thumb_func_start ov19_021D870C -ov19_021D870C: ; 0x021D870C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #0x10] - mov r0, #0x28 - add r5, r1, #0 - str r0, [sp] -_021D871E: - ldr r0, [sp] - mov r6, #0 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r4, r6, #0 -_021D8728: - ldr r0, _021D8760 ; =0x0000585C - ldr r0, [r7, r0] - add r0, #0x70 - add r0, r0, r4 - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D8740 - add r1, sp, #8 - bl sub_02021C50 -_021D8740: - add r6, r6, #1 - add r5, #0x34 - add r4, #0x18 - cmp r6, #6 - blt _021D8728 - ldr r0, [sp] - add r0, #0x18 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _021D871E - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021D8760: .word 0x0000585C - thumb_func_end ov19_021D870C - - thumb_func_start ov19_021D8764 -ov19_021D8764: ; 0x021D8764 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - add r0, r2, #0 - add r7, r3, #0 - str r1, [sp, #4] - str r2, [sp, #8] - cmp r0, #0x20 - blo _021D8780 - mov r1, #2 - ldr r0, [sp] - lsl r1, r1, #0xa - add r0, r0, r1 - str r0, [sp] -_021D8780: - mov r0, #0 - mov ip, r0 - ldr r0, [sp, #0x28] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - orr r0, r7 - mov lr, r0 -_021D878E: - ldr r0, [sp, #8] - mov r2, #0 - lsl r0, r0, #0x1b - lsr r1, r0, #0x1a - ldr r0, [sp] - add r4, r2, #0 - add r3, r0, r1 - mov r0, ip - lsl r1, r0, #1 - ldr r0, [sp, #4] - add r6, r0, r1 -_021D87A4: - lsl r0, r4, #1 - ldrh r1, [r6, r0] - mov r0, #3 - lsl r0, r0, #0xa - add r5, r1, #0 - and r5, r0 - ldr r0, _021D885C ; =0x000003FF - add r2, r2, #1 - and r0, r1 - add r0, r0, r7 - add r1, r5, #0 - orr r1, r0 - ldr r0, [sp, #0xc] - add r4, #0x15 - orr r0, r1 - strh r0, [r3] - add r3, #0x40 - cmp r2, #0x14 - blo _021D87A4 - mov r1, lr - lsl r1, r1, #0x10 - mov r0, #0 - lsr r1, r1, #0x10 -_021D87D2: - add r0, r0, #1 - strh r1, [r3] - add r3, #0x40 - cmp r0, #4 - blo _021D87D2 - ldr r0, [sp, #8] - add r1, r0, #1 - mov r0, #0x3f - and r0, r1 - str r0, [sp, #8] - bne _021D87F2 - mov r1, #2 - ldr r0, [sp] - lsl r1, r1, #0xa - sub r0, r0, r1 - str r0, [sp] -_021D87F2: - ldr r0, [sp, #8] - cmp r0, #0x20 - bne _021D8802 - mov r1, #2 - ldr r0, [sp] - lsl r1, r1, #0xa - add r0, r0, r1 - str r0, [sp] -_021D8802: - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #0x15 - blo _021D878E - mov r1, lr - mov r3, #2 - mov r0, #0 - lsl r1, r1, #0x10 - lsl r3, r3, #0xa - lsr r5, r1, #0x10 - add r7, r0, #0 - mov r4, #0x3f - add r2, r3, #0 -_021D881E: - ldr r1, [sp, #8] - lsl r1, r1, #0x1b - lsr r6, r1, #0x1a - ldr r1, [sp] - add r1, r1, r6 - add r6, r7, #0 -_021D882A: - add r6, r6, #1 - strh r5, [r1] - add r1, #0x40 - cmp r6, #0x18 - blo _021D882A - ldr r1, [sp, #8] - add r1, r1, #1 - and r1, r4 - str r1, [sp, #8] - bne _021D8844 - ldr r1, [sp] - sub r1, r1, r3 - str r1, [sp] -_021D8844: - ldr r1, [sp, #8] - cmp r1, #0x20 - bne _021D8850 - ldr r1, [sp] - add r1, r1, r2 - str r1, [sp] -_021D8850: - add r0, r0, #1 - cmp r0, #2 - blo _021D881E - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D885C: .word 0x000003FF - thumb_func_end ov19_021D8764 - - thumb_func_start ov19_021D8860 -ov19_021D8860: ; 0x021D8860 - push {r4, lr} - add r2, r0, #0 - add r0, #0xa0 - strh r1, [r0] - add r0, r2, #0 - mov r3, #0 - add r0, #0xa4 - strb r3, [r0] - ldr r0, _021D8890 ; =0x00005980 - add r4, r2, #0 - ldrb r3, [r2, #2] - ldr r0, [r2, r0] - ldr r2, _021D8894 ; =0x00000618 - add r4, #0xa8 - mul r2, r3 - add r3, r4, r2 - mov r2, #0x34 - mul r2, r1 - add r1, r3, r2 - mov r2, #1 - bl ov19_021DA7B8 - pop {r4, pc} - nop -_021D8890: .word 0x00005980 -_021D8894: .word 0x00000618 - thumb_func_end ov19_021D8860 - - thumb_func_start ov19_021D8898 -ov19_021D8898: ; 0x021D8898 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrb r1, [r5, #2] - ldr r0, _021D892C ; =0x00000618 - add r2, r5, #0 - add r2, #0xa8 - mul r0, r1 - add r4, r2, r0 - add r0, r5, #0 - add r0, #0xa0 - ldrh r1, [r0] - mov r0, #0x34 - add r6, r1, #0 - mul r6, r0 - add r0, r5, #0 - add r0, #0xa4 - ldrb r0, [r0] - cmp r0, #0 - beq _021D88C4 - cmp r0, #1 - beq _021D8916 - b _021D8928 -_021D88C4: - ldr r0, _021D8930 ; =0x00005980 - add r1, r4, r6 - ldr r0, [r5, r0] - bl ov19_021DA7E0 - cmp r0, #0 - beq _021D8928 - ldr r0, _021D8934 ; =0x0000598C - ldr r0, [r5, r0] - bl ov19_021D7964 - add r7, r0, #0 - bl ov19_021D3B18 - cmp r0, #0 - beq _021D8928 - add r0, r7, #0 - bl ov19_021D3B20 - cmp r0, #0 - ldr r0, _021D8930 ; =0x00005980 - beq _021D88FE - ldr r0, [r5, r0] - add r1, r4, r6 - mov r2, #1 - bl ov19_021DA3F0 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D88FE: - ldr r0, [r5, r0] - add r1, r4, r6 - mov r2, #2 - bl ov19_021DA7B8 - add r0, r5, #0 - add r0, #0xa4 - ldrb r0, [r0] - add r5, #0xa4 - add r0, r0, #1 - strb r0, [r5] - b _021D8928 -_021D8916: - ldr r0, _021D8930 ; =0x00005980 - add r1, r4, r6 - ldr r0, [r5, r0] - bl ov19_021DA7E0 - cmp r0, #0 - beq _021D8928 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D8928: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D892C: .word 0x00000618 -_021D8930: .word 0x00005980 -_021D8934: .word 0x0000598C - thumb_func_end ov19_021D8898 - - thumb_func_start ov19_021D8938 -ov19_021D8938: ; 0x021D8938 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021D897C ; =0x00005988 - ldr r0, [r5, r0] - bl ov19_021D5EC8 - mov r6, #0 - add r7, r5, #0 - str r0, [sp] - add r4, r6, #0 - add r7, #0xa8 -_021D894E: - ldrb r2, [r5, #2] - ldr r0, _021D8980 ; =0x00000618 - add r1, r2, #0 - mul r1, r0 - add r0, r5, r1 - add r0, r4, r0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D8970 - ldr r0, _021D8984 ; =0x00005980 - add r1, r7, r1 - ldr r0, [r5, r0] - ldr r2, [sp] - add r1, r1, r4 - bl ov19_021DA63C -_021D8970: - add r6, r6, #1 - add r4, #0x34 - cmp r6, #0x1e - blt _021D894E - pop {r3, r4, r5, r6, r7, pc} - nop -_021D897C: .word 0x00005988 -_021D8980: .word 0x00000618 -_021D8984: .word 0x00005980 - thumb_func_end ov19_021D8938 - - thumb_func_start ov19_021D8988 -ov19_021D8988: ; 0x021D8988 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x34 - mul r4, r0 - add r3, r5, #0 - ldrb r1, [r5, #2] - ldr r0, _021D89E8 ; =0x00000618 - add r3, #0xa8 - mul r0, r1 - add r1, r3, r0 - ldr r0, [r1, r4] - cmp r0, #0 - beq _021D89E6 - ldr r0, _021D89EC ; =0x00005980 - add r1, r1, r4 - ldr r0, [r5, r0] - bl ov19_021DA690 - ldr r0, _021D89F0 ; =0x00005988 - ldr r0, [r5, r0] - bl ov19_021D5EC8 - add r2, r0, #0 - ldr r0, _021D89EC ; =0x00005980 - add r1, r5, #0 - ldrb r6, [r5, #2] - ldr r3, _021D89E8 ; =0x00000618 - add r1, #0xa8 - mul r3, r6 - add r1, r1, r3 - ldr r0, [r5, r0] - add r1, r1, r4 - bl ov19_021DA63C - ldr r0, _021D89EC ; =0x00005980 - add r3, r5, #0 - ldrb r2, [r5, #2] - ldr r1, _021D89E8 ; =0x00000618 - add r3, #0xa8 - mul r1, r2 - add r1, r3, r1 - ldr r0, [r5, r0] - add r1, r1, r4 - mov r2, #1 - bl ov19_021DA694 -_021D89E6: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D89E8: .word 0x00000618 -_021D89EC: .word 0x00005980 -_021D89F0: .word 0x00005988 - thumb_func_end ov19_021D8988 - - thumb_func_start ov19_021D89F4 -ov19_021D89F4: ; 0x021D89F4 - push {r4, lr} - ldrb r3, [r0, #2] - ldr r2, _021D8A1C ; =0x00000618 - add r4, r0, #0 - add r4, #0xa8 - mul r2, r3 - add r3, r4, r2 - mov r2, #0x34 - mul r2, r1 - ldr r1, [r3, r2] - cmp r1, #0 - beq _021D8A18 - ldr r1, _021D8A20 ; =0x00005980 - ldr r0, [r0, r1] - add r1, r3, r2 - mov r2, #1 - bl ov19_021DA694 -_021D8A18: - pop {r4, pc} - nop -_021D8A1C: .word 0x00000618 -_021D8A20: .word 0x00005980 - thumb_func_end ov19_021D89F4 - - thumb_func_start ov19_021D8A24 -ov19_021D8A24: ; 0x021D8A24 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D8A60 ; =0x00005988 - ldr r0, [r5, r0] - bl ov19_021D5E24 - add r4, r0, #0 - ldr r0, _021D8A60 ; =0x00005988 - ldr r0, [r5, r0] - bl ov19_021D5EA0 - add r2, r0, #0 - add r3, r5, #0 - ldrb r1, [r5, #2] - ldr r0, _021D8A64 ; =0x00000618 - add r3, #0xa8 - mul r0, r1 - add r3, r3, r0 - mov r0, #0x34 - add r1, r4, #0 - mul r1, r0 - ldr r0, [r3, r1] - cmp r0, #0 - beq _021D8A5E - ldr r0, _021D8A68 ; =0x00005980 - add r1, r3, r1 - ldr r0, [r5, r0] - bl ov19_021DA68C -_021D8A5E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D8A60: .word 0x00005988 -_021D8A64: .word 0x00000618 -_021D8A68: .word 0x00005980 - thumb_func_end ov19_021D8A24 - - thumb_func_start ov19_021D8A6C -ov19_021D8A6C: ; 0x021D8A6C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r0, #0 - add r0, sp, #0xc - str r0, [sp] - ldr r0, _021D8B08 ; =0x00005988 - add r1, sp, #0x18 - ldr r0, [r4, r0] - add r2, sp, #0x14 - add r3, sp, #0x10 - bl ov19_021D5EE8 - mov r5, #0 - str r5, [sp, #4] -_021D8A88: - add r0, r4, #0 - str r0, [sp, #8] - add r0, #0xa8 - mov r7, #0 - str r0, [sp, #8] -_021D8A92: - ldrb r2, [r4, #2] - ldr r0, _021D8B0C ; =0x00000618 - add r1, r2, #0 - mul r1, r0 - add r0, r4, r1 - add r0, r5, r0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D8AF0 - ldr r6, [sp, #0x18] - ldr r2, [sp, #0x14] - sub r3, r7, r6 - sub r2, r2, r6 - ldr r0, [sp, #0x10] - cmp r3, r2 - bhi _021D8AB8 - mov r6, #1 - b _021D8ABA -_021D8AB8: - mov r6, #0 -_021D8ABA: - ldr r2, [sp, #4] - sub r3, r2, r0 - ldr r2, [sp, #0xc] - sub r0, r2, r0 - cmp r3, r0 - bhi _021D8ACA - mov r0, #1 - b _021D8ACC -_021D8ACA: - mov r0, #0 -_021D8ACC: - tst r0, r6 - ldr r0, _021D8B10 ; =0x00005980 - beq _021D8AE2 - ldr r2, [sp, #8] - ldr r0, [r4, r0] - add r1, r2, r1 - add r1, r1, r5 - mov r2, #1 - bl ov19_021DA7F4 - b _021D8AF0 -_021D8AE2: - ldr r2, [sp, #8] - ldr r0, [r4, r0] - add r1, r2, r1 - add r1, r1, r5 - mov r2, #0 - bl ov19_021DA7F4 -_021D8AF0: - add r7, r7, #1 - add r5, #0x34 - cmp r7, #6 - blo _021D8A92 - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blo _021D8A88 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D8B08: .word 0x00005988 -_021D8B0C: .word 0x00000618 -_021D8B10: .word 0x00005980 - thumb_func_end ov19_021D8A6C - - thumb_func_start ov19_021D8B14 -ov19_021D8B14: ; 0x021D8B14 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r7, r5, #0 - add r4, r6, #0 - add r7, #0xa8 -_021D8B20: - ldrb r2, [r5, #2] - ldr r0, _021D8B4C ; =0x00000618 - add r1, r2, #0 - mul r1, r0 - add r0, r5, r1 - add r0, r4, r0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D8B42 - ldr r0, _021D8B50 ; =0x00005980 - add r1, r7, r1 - ldr r0, [r5, r0] - add r1, r1, r4 - mov r2, #0 - bl ov19_021DA7F4 -_021D8B42: - add r6, r6, #1 - add r4, #0x34 - cmp r6, #0x1e - blt _021D8B20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D8B4C: .word 0x00000618 -_021D8B50: .word 0x00005980 - thumb_func_end ov19_021D8B14 - - thumb_func_start ov19_021D8B54 -ov19_021D8B54: ; 0x021D8B54 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _021D8C00 ; =0x00000794 - add r6, r1, #0 - str r6, [r5, r0] - add r4, r2, #0 - sub r0, r0, #4 - str r4, [r5, r0] - add r0, r6, #0 - str r3, [r5, #0] - bl ov19_021D77E0 - ldr r1, _021D8C04 ; =0x00000758 - str r0, [r5, r1] - add r0, r6, #0 - bl ov19_021D77E8 - ldr r1, _021D8C08 ; =0x0000075C - str r0, [r5, r1] - add r0, r6, #0 - bl ov19_021D77D8 - str r0, [r5, #0x48] - add r0, r4, #0 - bl ov19_021D5E10 - ldr r1, _021D8C0C ; =0x00000785 - strb r0, [r5, r1] - add r0, r4, #0 - bl ov19_021D5E14 - ldr r1, _021D8C10 ; =0x00000789 - strb r0, [r5, r1] - add r0, r4, #0 - bl ov19_021D5E1C - ldr r1, _021D8C14 ; =0x0000078A - strb r0, [r5, r1] - add r0, r4, #0 - bl ov19_021D5E2C - ldr r1, _021D8C18 ; =0x0000078B - add r3, r5, #0 - strb r0, [r5, r1] - mov r2, #0 - str r2, [r5, #4] - str r2, [r5, #8] - str r2, [r5, #0xc] - add r0, r1, #0 - str r2, [r5, #0x10] - sub r0, #0x37 - str r2, [r5, r0] - add r0, r1, #3 - mov r2, #1 - strb r2, [r5, r0] - mov r0, #0xa - str r0, [sp] - ldr r0, [sp, #0x18] - mov r1, #0xd - add r3, #0x1c - bl sub_02007204 - str r0, [r5, #0x14] - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x18] - mov r1, #0xe - mov r2, #1 - add r3, #0x20 - bl sub_02007220 - str r0, [r5, #0x18] - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021D8BF4 - ldr r0, [r5, #0x18] - cmp r0, #0 - bne _021D8BFA -_021D8BF4: - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D8BFA: - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D8C00: .word 0x00000794 -_021D8C04: .word 0x00000758 -_021D8C08: .word 0x0000075C -_021D8C0C: .word 0x00000785 -_021D8C10: .word 0x00000789 -_021D8C14: .word 0x0000078A -_021D8C18: .word 0x0000078B - thumb_func_end ov19_021D8B54 - - thumb_func_start ov19_021D8C1C -ov19_021D8C1C: ; 0x021D8C1C - push {r4, r5, r6, lr} - sub sp, #0x38 - add r4, r0, #0 - add r0, #0x24 - add r5, r1, #0 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, r4, #0 - add r0, #0x24 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r1, #0xc - bl sub_0200718C - ldr r0, _021D8DEC ; =0x00000785 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _021D8C52 - mov r5, #1 - b _021D8C54 -_021D8C52: - mov r5, #2 -_021D8C54: - ldr r0, _021D8DF0 ; =0x00000794 - ldr r0, [r4, r0] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r4, #0x20] - add r1, r4, #0 - str r0, [sp] - str r5, [sp, #4] - ldr r3, [r4, #0x1c] - add r0, sp, #0x14 - add r1, #0x24 - bl ov19_021D783C - ldr r2, _021D8DF4 ; =0x00000764 - add r3, r4, #0 - add r1, r2, #4 - add r0, r4, r2 - add r2, #0x21 - add r1, r4, r1 - add r2, r4, r2 - bl ov19_021D9D48 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r3, _021D8DF4 ; =0x00000764 - ldr r0, [r4, #0] - ldr r2, [r4, r3] - add r3, r3, #4 - ldr r3, [r4, r3] - add r1, sp, #0x14 - bl ov19_021D785C - str r0, [r4, #4] - mov r0, #0x2a - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r3, _021D8DF4 ; =0x00000764 - ldr r0, [r4, #0] - ldr r2, [r4, r3] - add r3, r3, #4 - ldr r3, [r4, r3] - add r1, sp, #0x14 - add r3, #0x18 - bl ov19_021D785C - str r0, [r4, #8] - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E10 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E08 - add r6, r0, #0 - cmp r6, #4 - beq _021D8CD6 - mov r2, #0x6c - mov r5, #0xec - b _021D8CDA -_021D8CD6: - mov r2, #0x40 - mov r5, #0xc0 -_021D8CDA: - mov r1, #2 - add r0, sp, #0x34 - strb r1, [r0] - mov r0, #0x2b - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r3, #0x14 - bl ov19_021D785C - str r0, [r4, #0xc] - mov r0, #0x2b - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - add r2, r5, #0 - mov r3, #0x14 - bl ov19_021D785C - str r0, [r4, #0x10] - ldr r0, [r4, #8] - mov r1, #5 - bl sub_02021D6C - ldr r0, [r4, #8] - mov r1, #2 - bl sub_02021E80 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E10 - add r5, r0, #0 - cmp r5, #2 - ldr r0, [r4, #0xc] - beq _021D8D3C - mov r1, #6 - bl sub_02021D6C - ldr r0, [r4, #0x10] - mov r1, #7 - bl sub_02021D6C - b _021D8D4A -_021D8D3C: - mov r1, #8 - bl sub_02021D6C - ldr r0, [r4, #0x10] - mov r1, #9 - bl sub_02021D6C -_021D8D4A: - cmp r5, #0 - beq _021D8D56 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02021CAC -_021D8D56: - cmp r6, #3 - beq _021D8D9A - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E38 - cmp r0, #1 - ldr r0, [r4, #4] - bne _021D8D80 - mov r1, #0 - bl sub_02021D6C - add r1, r4, #0 - ldr r0, [r4, #0x48] - add r1, #0x4c - mov r2, #0x1e - bl ov19_021DA3CC - mov r1, #0 - b _021D8D8E -_021D8D80: - mov r1, #2 - bl sub_02021D6C - add r0, r4, #0 - bl ov19_021D8E00 - mov r1, #1 -_021D8D8E: - ldr r0, _021D8DF8 ; =0x0000078C - strb r1, [r4, r0] - ldr r0, _021D8DFC ; =0x0000078D - mov r1, #0 - strb r1, [r4, r0] - b _021D8DD2 -_021D8D9A: - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5F7C - cmp r0, #0 - ldr r0, [r4, #4] - bne _021D8DB4 - mov r1, #0 - bl sub_02021D6C - mov r1, #0 - b _021D8DBC -_021D8DB4: - mov r1, #2 - bl sub_02021D6C - mov r1, #1 -_021D8DBC: - ldr r0, _021D8DFC ; =0x0000078D - mov r2, #0x1e - strb r1, [r4, r0] - add r1, r4, #0 - ldr r0, [r4, #0x48] - add r1, #0x4c - bl ov19_021DA3CC - ldr r0, _021D8DF8 ; =0x0000078C - mov r1, #0 - strb r1, [r4, r0] -_021D8DD2: - ldr r0, _021D8DF0 ; =0x00000794 - ldr r0, [r4, r0] - bl ov19_021D7800 - mov r1, #0x76 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - bl ov19_021D9AEC - add sp, #0x38 - pop {r4, r5, r6, pc} - nop -_021D8DEC: .word 0x00000785 -_021D8DF0: .word 0x00000794 -_021D8DF4: .word 0x00000764 -_021D8DF8: .word 0x0000078C -_021D8DFC: .word 0x0000078D - thumb_func_end ov19_021D8C1C - - thumb_func_start ov19_021D8E00 -ov19_021D8E00: ; 0x021D8E00 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #4] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r5, #0 - str r0, [r2, #0] - ldr r0, [r5, #0x48] - add r1, #0x4c - mov r2, #1 - bl ov19_021DA3CC - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E9C - add r4, r0, #0 - ldr r0, [r5, #4] - bl sub_02021E88 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _021D8E74 ; =0x000004D8 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x4c - str r0, [sp, #0xc] - ldr r3, [sp, #0x14] - ldr r2, [sp, #0x10] - asr r3, r3, #0xc - ldr r0, [r5, #0x48] - asr r2, r2, #0xc - add r3, r3, #4 - bl ov19_021DA428 - ldr r1, _021D8E78 ; =0x00000664 - mov r0, #0 - str r0, [r5, r1] - add r0, r1, #4 - ldr r2, _021D8E7C ; =0xFFFFC000 - add r1, #0xf0 - str r2, [r5, r0] - mov r2, #1 - ldr r0, _021D8E80 ; =0x0000078C - str r2, [r5, r1] - strb r2, [r5, r0] - add sp, #0x1c - pop {r4, r5, pc} - nop -_021D8E74: .word 0x000004D8 -_021D8E78: .word 0x00000664 -_021D8E7C: .word 0xFFFFC000 -_021D8E80: .word 0x0000078C - thumb_func_end ov19_021D8E00 - - thumb_func_start ov19_021D8E84 -ov19_021D8E84: ; 0x021D8E84 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D8E96 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x14] -_021D8E96: - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _021D8EA4 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x18] -_021D8EA4: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021D8EB2 - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #4] -_021D8EB2: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D8EC0 - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #8] -_021D8EC0: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D8ECE - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0xc] -_021D8ECE: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _021D8EDC - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0x10] -_021D8EDC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D8E84 - - thumb_func_start ov19_021D8EE0 -ov19_021D8EE0: ; 0x021D8EE0 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0 - add r5, r1, #0 - str r0, [r2, #0] - str r0, [r5, #0] - ldr r0, _021D8F58 ; =0x00000785 - ldrb r1, [r4, r0] - cmp r1, #4 - bhi _021D8F54 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D8F00: ; jump table - .short _021D8F0A - _021D8F00 - 2 ; case 0 - .short _021D8F54 - _021D8F00 - 2 ; case 1 - .short _021D8F34 - _021D8F00 - 2 ; case 2 - .short _021D8F48 - _021D8F00 - 2 ; case 3 - .short _021D8F48 - _021D8F00 - 2 ; case 4 -_021D8F0A: - add r1, r0, #1 - ldrb r1, [r4, r1] - cmp r1, #0 - bne _021D8F54 - add r0, #0xb - ldr r0, [r4, r0] - bl ov19_021D5E14 - ldr r1, _021D8F5C ; =0x00000789 - ldrsb r1, [r4, r1] - cmp r1, #0 - bne _021D8F26 - cmp r0, #5 - beq _021D8F2E -_021D8F26: - cmp r1, #5 - bne _021D8F54 - cmp r0, #0 - bne _021D8F54 -_021D8F2E: - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D8F34: - add r0, r0, #1 - ldrb r0, [r4, r0] - add r0, #0xfd - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bhi _021D8F54 - mov r0, #1 - str r0, [r2, #0] - pop {r3, r4, r5, pc} -_021D8F48: - add r0, r0, #1 - ldrb r0, [r4, r0] - cmp r0, #2 - bne _021D8F54 - mov r0, #1 - str r0, [r2, #0] -_021D8F54: - pop {r3, r4, r5, pc} - nop -_021D8F58: .word 0x00000785 -_021D8F5C: .word 0x00000789 - thumb_func_end ov19_021D8EE0 - - thumb_func_start ov19_021D8F60 -ov19_021D8F60: ; 0x021D8F60 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r2, _021D905C ; =0x0000076C - add r5, r0, #0 - add r1, r2, #4 - add r0, r5, r2 - add r2, #0x1a - add r1, r5, r1 - add r2, r5, r2 - add r3, r5, #0 - bl ov19_021D9D48 - add r0, r5, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov19_021D8EE0 - ldr r0, _021D9060 ; =0x00000786 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _021D8F92 - ldr r0, [r5, #8] - mov r1, #0 - bl sub_02021CAC -_021D8F92: - ldr r6, _021D9064 ; =0x00000764 - ldr r0, [r5, r6] - add r2, r6, #0 - lsl r1, r0, #0xc - add r0, r6, #0 - add r0, #0x10 - str r1, [r5, r0] - add r0, r6, #4 - ldr r0, [r5, r0] - add r2, #0xc - lsl r1, r0, #0xc - add r0, r6, #0 - add r0, #0x14 - str r1, [r5, r0] - add r0, r6, #0 - add r0, #8 - ldr r1, [r5, r0] - ldr r3, [r5, r2] - ldr r7, [sp, #4] - lsl r0, r1, #0xc - lsl r2, r3, #0xc - cmp r7, #0 - bne _021D8FC8 - add r6, #0x10 - ldr r1, [r5, r6] - sub r0, r0, r1 - b _021D8FF0 -_021D8FC8: - add r4, r6, #0 - add r4, #0x10 - ldr r4, [r5, r4] - cmp r0, r4 - ble _021D8FE2 - mov r0, #0x11 - lsl r0, r0, #4 - sub r1, r0, r1 - ldr r0, [r5, r6] - sub r0, #0x46 - add r0, r1, r0 - neg r0, r0 - b _021D8FEE -_021D8FE2: - mov r0, #0x11 - ldr r4, [r5, r6] - lsl r0, r0, #4 - sub r0, r0, r4 - sub r1, #0x46 - add r0, r0, r1 -_021D8FEE: - lsl r0, r0, #0xc -_021D8FF0: - ldr r1, [sp] - cmp r1, #0 - bne _021D8FFE - ldr r3, _021D9068 ; =0x00000778 - ldr r3, [r5, r3] - sub r4, r2, r3 - b _021D9024 -_021D8FFE: - ldr r4, _021D9068 ; =0x00000778 - ldr r6, [r5, r4] - cmp r2, r6 - ble _021D9016 - mov r2, #0xd0 - sub r4, #0x10 - sub r3, r2, r3 - ldr r2, [r5, r4] - add r2, #0x18 - add r2, r3, r2 - neg r4, r2 - b _021D9022 -_021D9016: - sub r4, #0x10 - ldr r4, [r5, r4] - mov r2, #0xd0 - sub r2, r2, r4 - add r3, #0x18 - add r4, r2, r3 -_021D9022: - lsl r4, r4, #0xc -_021D9024: - cmp r7, #0 - bne _021D902C - cmp r1, #0 - beq _021D9030 -_021D902C: - mov r6, #0xc - b _021D9032 -_021D9030: - mov r6, #6 -_021D9032: - add r1, r6, #0 - bl sub_020E1F6C - ldr r1, _021D906C ; =0x0000077C - str r0, [r5, r1] - add r0, r4, #0 - add r1, r6, #0 - bl sub_020E1F6C - mov r1, #0x1e - lsl r1, r1, #6 - str r0, [r5, r1] - add r0, r1, #7 - strb r6, [r5, r0] - ldr r0, _021D9070 ; =ov19_021D9088 - add r1, r5, #0 - mov r2, #0 - bl ov19_021D77C8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D905C: .word 0x0000076C -_021D9060: .word 0x00000786 -_021D9064: .word 0x00000764 -_021D9068: .word 0x00000778 -_021D906C: .word 0x0000077C -_021D9070: .word ov19_021D9088 - thumb_func_end ov19_021D8F60 - - thumb_func_start ov19_021D9074 -ov19_021D9074: ; 0x021D9074 - ldr r1, _021D9084 ; =0x00000787 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021D9080 - mov r0, #1 - bx lr -_021D9080: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D9084: .word 0x00000787 - thumb_func_end ov19_021D9074 - - thumb_func_start ov19_021D9088 -ov19_021D9088: ; 0x021D9088 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - ldr r0, _021D9204 ; =0x00000787 - str r1, [sp, #8] - ldrb r2, [r4, r0] - cmp r2, #0 - beq _021D9162 - add r1, r0, #0 - sub r1, #0x13 - ldr r2, [r4, r1] - add r1, r0, #0 - sub r1, #0xb - ldr r1, [r4, r1] - add r2, r2, r1 - add r1, r0, #0 - sub r1, #0x13 - str r2, [r4, r1] - add r1, r0, #0 - sub r1, #0xb - ldr r1, [r4, r1] - cmp r1, #0 - ble _021D90D0 - add r1, r0, #0 - sub r1, #0x13 - ldr r2, [r4, r1] - mov r1, #0x11 - lsl r1, r1, #0x10 - cmp r2, r1 - ble _021D90D0 - ldr r1, _021D9208 ; =0x00156000 - sub r0, #0x13 - sub r1, r1, r2 - str r1, [r4, r0] -_021D90D0: - ldr r1, _021D920C ; =0x0000077C - ldr r0, [r4, r1] - cmp r0, #0 - bge _021D90F2 - add r0, r1, #0 - sub r0, #8 - ldr r2, [r4, r0] - mov r0, #0x46 - lsl r0, r0, #0xc - cmp r2, r0 - bge _021D90F2 - sub r2, r0, r2 - mov r0, #0x11 - lsl r0, r0, #0x10 - sub r0, r0, r2 - sub r1, #8 - str r0, [r4, r1] -_021D90F2: - ldr r1, _021D9210 ; =0x00000778 - add r0, r1, #0 - add r0, #8 - ldr r2, [r4, r1] - ldr r0, [r4, r0] - add r0, r2, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #8 - ldr r0, [r4, r0] - cmp r0, #0 - ble _021D911C - mov r0, #0xd - ldr r2, [r4, r1] - lsl r0, r0, #0x10 - cmp r2, r0 - ble _021D911C - mov r0, #0x2e - lsl r0, r0, #0xe - sub r0, r0, r2 - str r0, [r4, r1] -_021D911C: - mov r1, #0x1e - lsl r1, r1, #6 - ldr r0, [r4, r1] - cmp r0, #0 - bge _021D913E - add r0, r1, #0 - sub r0, #8 - ldr r2, [r4, r0] - ldr r0, _021D9214 ; =0xFFFE8000 - cmp r2, r0 - bge _021D913E - sub r2, r0, r2 - mov r0, #0xd - lsl r0, r0, #0x10 - sub r0, r0, r2 - sub r1, #8 - str r0, [r4, r1] -_021D913E: - ldr r0, _021D9218 ; =0x00000774 - ldr r1, [r4, r0] - add r0, r0, #4 - str r1, [sp] - ldr r0, [r4, r0] - add r1, sp, #0 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, _021D9204 ; =0x00000787 - add sp, #0xc - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r4, r5, pc} -_021D9162: - add r2, r0, #0 - sub r2, #0x1b - ldr r2, [r4, r2] - sub r0, #0x17 - lsl r2, r2, #0xc - str r2, [sp] - ldr r0, [r4, r0] - lsl r0, r0, #0xc - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl ov19_021D9E04 - ldr r0, _021D921C ; =0x0000076C - add r1, r0, #0 - ldr r2, [r4, r0] - sub r1, #8 - str r2, [r4, r1] - add r1, r0, #4 - ldr r2, [r4, r1] - sub r1, r0, #4 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0x1a - ldrb r2, [r4, r1] - add r1, r0, #0 - add r1, #0x19 - strb r2, [r4, r1] - add r0, #0x24 - ldr r0, [r4, r0] - bl ov19_021D5E14 - ldr r1, _021D9220 ; =0x00000789 - strb r0, [r4, r1] - add r0, r1, #7 - ldr r0, [r4, r0] - bl ov19_021D5E1C - ldr r1, _021D9224 ; =0x0000078A - strb r0, [r4, r1] - add r0, r1, #6 - ldr r0, [r4, r0] - bl ov19_021D5E2C - ldr r1, _021D9228 ; =0x0000078B - strb r0, [r4, r1] - sub r0, r1, #5 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _021D91D0 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02021CAC -_021D91D0: - ldr r0, _021D922C ; =0x00000786 - ldrb r0, [r4, r0] - cmp r0, #2 - ldr r0, [r4, #0xc] - beq _021D91EA - mov r1, #6 - bl sub_02021D6C - ldr r0, [r4, #0x10] - mov r1, #7 - bl sub_02021D6C - b _021D91F8 -_021D91EA: - mov r1, #8 - bl sub_02021D6C - ldr r0, [r4, #0x10] - mov r1, #9 - bl sub_02021D6C -_021D91F8: - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0xc - pop {r4, r5, pc} - nop -_021D9204: .word 0x00000787 -_021D9208: .word 0x00156000 -_021D920C: .word 0x0000077C -_021D9210: .word 0x00000778 -_021D9214: .word 0xFFFE8000 -_021D9218: .word 0x00000774 -_021D921C: .word 0x0000076C -_021D9220: .word 0x00000789 -_021D9224: .word 0x0000078A -_021D9228: .word 0x0000078B -_021D922C: .word 0x00000786 - thumb_func_end ov19_021D9088 - - thumb_func_start ov19_021D9230 -ov19_021D9230: ; 0x021D9230 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021D6C - mov r1, #2 - mov r0, #0x1e - lsl r1, r1, #0xc - lsl r0, r0, #6 - str r1, [r4, r0] - add r1, r0, #0 - sub r1, #0x18 - ldr r2, [r4, r1] - add r1, r0, #0 - add r2, #0xc - sub r1, #0x10 - str r2, [r4, r1] - add r1, r0, #7 - mov r2, #6 - strb r2, [r4, r1] - mov r1, #0 - add r0, r0, #4 - strb r1, [r4, r0] - add r0, r4, #0 - bl ov19_021D9EB0 - ldr r0, _021D9274 ; =ov19_021D928C - add r1, r4, #0 - mov r2, #0 - bl ov19_021D77C8 - pop {r4, pc} - nop -_021D9274: .word ov19_021D928C - thumb_func_end ov19_021D9230 - - thumb_func_start ov19_021D9278 -ov19_021D9278: ; 0x021D9278 - ldr r1, _021D9288 ; =0x00000784 - ldrb r0, [r0, r1] - cmp r0, #0xff - bne _021D9284 - mov r0, #1 - bx lr -_021D9284: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D9288: .word 0x00000784 - thumb_func_end ov19_021D9278 - - thumb_func_start ov19_021D928C -ov19_021D928C: ; 0x021D928C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - ldr r1, _021D9360 ; =0x00000784 - str r0, [r3, #0] - ldrb r0, [r4, r1] - cmp r0, #0 - beq _021D92B8 - cmp r0, #1 - beq _021D9314 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021D92B8: - add r0, r1, #0 - mov r3, #0 - add r0, #0xa - strb r3, [r4, r0] - add r0, r1, #3 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _021D92E6 - sub r0, r1, #4 - ldr r3, [sp, #4] - ldr r0, [r4, r0] - add r1, r2, #0 - add r0, r3, r0 - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, _021D9364 ; =0x00000787 - add sp, #0xc - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_021D92E6: - sub r1, #0x14 - ldr r0, [r4, r1] - add r1, r2, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02021D6C - add r0, r4, #0 - bl ov19_021DA038 - ldr r0, _021D9364 ; =0x00000787 - mov r1, #6 - strb r1, [r4, r0] - sub r1, r0, #3 - ldrb r1, [r4, r1] - sub r0, r0, #3 - add r1, r1, #1 - strb r1, [r4, r0] -_021D9314: - ldr r0, _021D9364 ; =0x00000787 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D933A - sub r0, r0, #7 - ldr r1, [sp, #4] - ldr r0, [r4, r0] - sub r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - bl ov19_021D9E04 - ldr r0, _021D9364 ; =0x00000787 - add sp, #0xc - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_021D933A: - sub r0, #0x1f - ldr r0, [r4, r0] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, _021D9360 ; =0x00000784 - mov r1, #0xff - strb r1, [r4, r0] - mov r1, #1 - add r0, #0xa - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D9360: .word 0x00000784 -_021D9364: .word 0x00000787 - thumb_func_end ov19_021D928C - - thumb_func_start ov19_021D9368 -ov19_021D9368: ; 0x021D9368 - add r1, r0, #0 - mov r2, #2 - mov r0, #0x1e - lsl r2, r2, #0xc - lsl r0, r0, #6 - str r2, [r1, r0] - add r2, r0, #0 - sub r2, #0x18 - ldr r3, [r1, r2] - add r2, r0, #0 - add r3, #0xc - sub r2, #0x10 - str r3, [r1, r2] - add r2, r0, #7 - mov r3, #6 - strb r3, [r1, r2] - ldr r3, _021D9394 ; =ov19_021D77C8 - mov r2, #0 - add r0, r0, #4 - strb r2, [r1, r0] - ldr r0, _021D9398 ; =ov19_021D93D0 - bx r3 - ; .align 2, 0 -_021D9394: .word ov19_021D77C8 -_021D9398: .word ov19_021D93D0 - thumb_func_end ov19_021D9368 - - thumb_func_start ov19_021D939C -ov19_021D939C: ; 0x021D939C - push {r4, lr} - ldr r1, _021D93C8 ; =0x00000784 - add r4, r0, #0 - ldrb r1, [r4, r1] - cmp r1, #0xff - bne _021D93C4 - bl ov19_021DA06C - ldr r2, _021D93CC ; =0x00000754 - add r1, r4, #0 - ldr r0, [r4, #0x48] - ldr r2, [r4, r2] - add r1, #0x4c - bl ov19_021DA3CC - ldr r0, _021D93CC ; =0x00000754 - mov r1, #0 - str r1, [r4, r0] - mov r0, #1 - pop {r4, pc} -_021D93C4: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D93C8: .word 0x00000784 -_021D93CC: .word 0x00000754 - thumb_func_end ov19_021D939C - - thumb_func_start ov19_021D93D0 -ov19_021D93D0: ; 0x021D93D0 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - ldr r1, _021D94AC ; =0x00000784 - str r0, [r3, #0] - ldrb r0, [r4, r1] - cmp r0, #0 - beq _021D93FC - cmp r0, #1 - beq _021D9458 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021D93FC: - add r0, r1, #0 - mov r3, #0 - add r0, #0xa - strb r3, [r4, r0] - add r0, r1, #3 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _021D942A - sub r0, r1, #4 - ldr r3, [sp, #4] - ldr r0, [r4, r0] - add r1, r2, #0 - add r0, r3, r0 - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, _021D94B0 ; =0x00000787 - add sp, #0xc - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_021D942A: - sub r1, #0x14 - ldr r0, [r4, r1] - add r1, r2, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021D6C - add r0, r4, #0 - bl ov19_021DA1F8 - ldr r0, _021D94B0 ; =0x00000787 - mov r1, #6 - strb r1, [r4, r0] - sub r1, r0, #3 - ldrb r1, [r4, r1] - sub r0, r0, #3 - add r1, r1, #1 - strb r1, [r4, r0] -_021D9458: - ldr r0, _021D94B0 ; =0x00000787 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D947E - sub r0, r0, #7 - ldr r1, [sp, #4] - ldr r0, [r4, r0] - sub r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - bl ov19_021D9E04 - ldr r0, _021D94B0 ; =0x00000787 - add sp, #0xc - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_021D947E: - sub r0, #0x1f - ldr r0, [r4, r0] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021D6C - ldr r0, _021D94AC ; =0x00000784 - mov r1, #0xff - strb r1, [r4, r0] - mov r1, #1 - add r0, #0xa - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D94AC: .word 0x00000784 -_021D94B0: .word 0x00000787 - thumb_func_end ov19_021D93D0 - - thumb_func_start ov19_021D94B4 -ov19_021D94B4: ; 0x021D94B4 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021D6C - ldr r0, _021D9528 ; =0x00000788 - mov r1, #0 - strb r1, [r5, r0] - add r0, r5, #0 - bl ov19_021DA224 - add r4, r0, #0 - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r4, #0 - bl sub_02021F74 - str r0, [sp] - ldr r1, [r5, #0x4c] - ldr r2, [sp, #0x14] - add r0, r5, #0 - mov r3, #1 - bl ov19_021D9554 - ldr r0, [r5, #0x4c] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r5, #0x4c] - bl sub_02021F74 - str r0, [sp] - mov r3, #0 - ldr r2, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - mvn r3, r3 - bl ov19_021D9554 - ldr r0, _021D952C ; =0x00000784 - mov r1, #0 - strb r1, [r5, r0] - add sp, #0x1c - pop {r4, r5, pc} - nop -_021D9528: .word 0x00000788 -_021D952C: .word 0x00000784 - thumb_func_end ov19_021D94B4 - - thumb_func_start ov19_021D9530 -ov19_021D9530: ; 0x021D9530 - push {r4, lr} - add r4, r0, #0 - bl ov19_021D95E0 - cmp r0, #0 - beq _021D954E - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02021D6C - add r0, r4, #0 - bl ov19_021DA110 - mov r0, #1 - pop {r4, pc} -_021D954E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D9530 - - thumb_func_start ov19_021D9554 -ov19_021D9554: ; 0x021D9554 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0xa - mov r1, #0x2c - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _021D95D4 - add r0, r6, #0 - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #0xc - str r0, [r2, #0] - str r6, [r4, #0] - strh r1, [r4, #4] - mov r0, #6 - strh r0, [r4, #6] - ldr r0, [sp, #0x28] - str r0, [r4, #8] - ldr r0, [sp, #8] - str r0, [r4, #0xc] - ldr r0, [sp, #4] - str r0, [r4, #0x14] - str r7, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x18] - ldr r0, [sp] - add r2, r0, #0 - mul r2, r1 - str r2, [r4, #0x24] - ldr r2, [r4, #0x10] - ldr r0, [r4, #0xc] - sub r0, r2, r0 - bl sub_020E1F6C - str r0, [r4, #0x1c] - mov r0, #0xf - lsl r0, r0, #0xc - str r0, [r4, #0x20] - ldr r0, _021D95D8 ; =ov19_021D9600 - add r1, r4, #0 - mov r2, #0 - str r5, [r4, #0x28] - bl ov19_021D77C8 - cmp r0, #0 - beq _021D95CE - ldr r0, _021D95DC ; =0x00000788 - mov r1, #1 - add sp, #0x10 - strb r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D95CE: - add r0, r4, #0 - bl sub_020181C4 -_021D95D4: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D95D8: .word ov19_021D9600 -_021D95DC: .word 0x00000788 - thumb_func_end ov19_021D9554 - - thumb_func_start ov19_021D95E0 -ov19_021D95E0: ; 0x021D95E0 - ldr r1, _021D95F0 ; =0x00000788 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021D95EC - mov r0, #1 - bx lr -_021D95EC: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D95F0: .word 0x00000788 - thumb_func_end ov19_021D95E0 - - thumb_func_start ov19_021D95F4 -ov19_021D95F4: ; 0x021D95F4 - ldr r1, _021D95FC ; =0x00000788 - mov r2, #0 - strb r2, [r0, r1] - bx lr - ; .align 2, 0 -_021D95FC: .word 0x00000788 - thumb_func_end ov19_021D95F4 - - thumb_func_start ov19_021D9600 -ov19_021D9600: ; 0x021D9600 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldrh r0, [r4, #4] - cmp r0, #0 - beq _021D9668 - sub r0, r0, #1 - strh r0, [r4, #4] - ldrh r1, [r4, #4] - ldrh r0, [r4, #6] - cmp r1, r0 - bne _021D9636 - ldr r0, [r4, #0] - ldr r1, [r4, #8] - bl ov19_021D78AC -_021D9636: - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x1c] - add r0, r1, r0 - str r0, [r4, #0xc] - str r0, [sp, #4] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x20] - add r0, r1, r0 - str r0, [r4, #0x18] - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D15C - ldr r1, [r4, #0x24] - add r2, r1, #0 - mul r2, r0 - ldr r0, [r4, #0x14] - add r1, sp, #0 - add r0, r0, r2 - str r0, [sp] - ldr r0, [r4, #0] - bl sub_02021C50 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021D9668: - ldr r0, [r4, #0x14] - add r1, r2, #0 - str r0, [sp] - ldr r0, [r4, #0x10] - str r0, [sp, #4] - ldr r0, [r4, #0] - bl sub_02021C50 - ldr r1, _021D968C ; =ov19_021D95F4 - ldr r2, [r4, #0x28] - add r0, r4, #0 - bl ov19_021D79B8 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D968C: .word ov19_021D95F4 - thumb_func_end ov19_021D9600 - - thumb_func_start ov19_021D9690 -ov19_021D9690: ; 0x021D9690 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, _021D96F4 ; =0x0000078C - ldrb r1, [r4, r0] - cmp r1, #0 - bne _021D96AE - add r0, r0, #1 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _021D96AE - ldr r0, [r4, #4] - mov r1, #3 - bl sub_02021D6C -_021D96AE: - ldr r0, [r4, #4] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #2 - ldr r1, [sp, #4] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - bl ov19_021D9E04 - ldr r0, _021D96F8 ; =0x00000784 - mov r2, #0 - strb r2, [r4, r0] - add r0, r0, #3 - strb r2, [r4, r0] - ldr r0, _021D96FC ; =ov19_021D9718 - add r1, r4, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021D96F0 - ldr r0, _021D9700 ; =0x00000788 - mov r1, #1 - strb r1, [r4, r0] -_021D96F0: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D96F4: .word 0x0000078C -_021D96F8: .word 0x00000784 -_021D96FC: .word ov19_021D9718 -_021D9700: .word 0x00000788 - thumb_func_end ov19_021D9690 - - thumb_func_start ov19_021D9704 -ov19_021D9704: ; 0x021D9704 - ldr r1, _021D9714 ; =0x00000788 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021D9710 - mov r0, #1 - bx lr -_021D9710: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D9714: .word 0x00000788 - thumb_func_end ov19_021D9704 - - thumb_func_start ov19_021D9718 -ov19_021D9718: ; 0x021D9718 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r4, r1, #0 - ldr r1, _021D97F0 ; =0x00000784 - add r5, r0, #0 - ldrb r0, [r4, r1] - cmp r0, #0 - beq _021D9730 - cmp r0, #1 - beq _021D9796 - add sp, #0x18 - pop {r4, r5, r6, pc} -_021D9730: - add r0, r1, #3 - ldrb r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #3 - strb r2, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #4 - blo _021D97EC - ldr r0, [r4, #4] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #0x10] - mov r2, #3 - asr r0, r0, #0xc - add r1, r0, #6 - mov r0, #0x77 - lsl r0, r0, #4 - str r1, [r4, r0] - add r1, r0, #0 - lsl r2, r2, #0xc - add r1, #0x10 - str r2, [r4, r1] - add r1, r0, #0 - mov r2, #2 - add r1, #0x17 - strb r2, [r4, r1] - add r1, r0, #0 - add r1, #0x1c - ldrb r1, [r4, r1] - cmp r1, #0 - bne _021D978A - add r0, #0x1d - ldrb r0, [r4, r0] - cmp r0, #0 - bne _021D978A - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02021D6C -_021D978A: - ldr r0, _021D97F0 ; =0x00000784 - add sp, #0x18 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9796: - ldr r0, [r4, #4] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r0, _021D97F4 ; =0x00000787 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D97D0 - sub r0, r0, #7 - ldr r1, [sp, #4] - ldr r0, [r4, r0] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - bl ov19_021D9E04 - ldr r0, _021D97F4 ; =0x00000787 - add sp, #0x18 - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D97D0: - sub r0, #0x17 - ldr r0, [r4, r0] - add r1, r2, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, _021D97F8 ; =0x00000788 - mov r1, #0 - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 -_021D97EC: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D97F0: .word 0x00000784 -_021D97F4: .word 0x00000787 -_021D97F8: .word 0x00000788 - thumb_func_end ov19_021D9718 - - thumb_func_start ov19_021D97FC -ov19_021D97FC: ; 0x021D97FC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #0x77 - str r0, [r2, #0] - ldr r0, [sp, #4] - lsl r1, r1, #4 - asr r0, r0, #0xc - sub r0, r0, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r2, _021D984C ; =0xFFFFF000 - add r0, #0x10 - str r2, [r4, r0] - add r0, r1, #0 - mov r2, #4 - add r0, #0x17 - strb r2, [r4, r0] - mov r2, #0 - add r1, #0x14 - strb r2, [r4, r1] - ldr r0, _021D9850 ; =ov19_021D9894 - add r1, r4, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021D9848 - ldr r0, _021D9854 ; =0x00000788 - mov r1, #1 - strb r1, [r4, r0] -_021D9848: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021D984C: .word 0xFFFFF000 -_021D9850: .word ov19_021D9894 -_021D9854: .word 0x00000788 - thumb_func_end ov19_021D97FC - - thumb_func_start ov19_021D9858 -ov19_021D9858: ; 0x021D9858 - push {r4, lr} - ldr r1, _021D9890 ; =0x00000788 - add r4, r0, #0 - ldrb r0, [r4, r1] - cmp r0, #0 - bne _021D988A - add r0, r1, #4 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _021D9886 - add r0, r1, #5 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _021D9886 - ldr r0, [r4, #4] - bl sub_02021E24 - cmp r0, #0 - beq _021D9886 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021D6C -_021D9886: - mov r0, #1 - pop {r4, pc} -_021D988A: - mov r0, #0 - pop {r4, pc} - nop -_021D9890: .word 0x00000788 - thumb_func_end ov19_021D9858 - - thumb_func_start ov19_021D9894 -ov19_021D9894: ; 0x021D9894 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r0, _021D98F8 ; =0x00000787 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D98D6 - sub r0, r0, #7 - ldr r1, [sp, #4] - ldr r0, [r4, r0] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r2, #0 - bl ov19_021D9E04 - ldr r0, _021D98F8 ; =0x00000787 - add sp, #0xc - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_021D98D6: - sub r0, #0x17 - ldr r0, [r4, r0] - add r1, r2, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r4, #0 - bl ov19_021D9E04 - ldr r0, _021D98FC ; =0x00000788 - mov r1, #0 - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021D98F8: .word 0x00000787 -_021D98FC: .word 0x00000788 - thumb_func_end ov19_021D9894 - - thumb_func_start ov19_021D9900 -ov19_021D9900: ; 0x021D9900 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E68 - mov r1, #0x79 - lsl r1, r1, #4 - mov r2, #0x11 - ldr r3, [r4, r1] - lsl r2, r2, #4 - ldrh r2, [r3, r2] - cmp r2, r0 - bne _021D9926 - sub r1, #0x38 - ldr r0, [r4, r1] - bl ov19_021D84E0 -_021D9926: - add r0, r4, #0 - bl ov19_021DA204 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021D6C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D9900 - - thumb_func_start ov19_021D9938 -ov19_021D9938: ; 0x021D9938 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021D6C - add r1, r4, #0 - ldr r0, [r4, #0x48] - add r1, #0x4c - mov r2, #1 - bl ov19_021DA7B8 - ldr r0, _021D9958 ; =0x00000784 - mov r1, #0 - strb r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D9958: .word 0x00000784 - thumb_func_end ov19_021D9938 - - thumb_func_start ov19_021D995C -ov19_021D995C: ; 0x021D995C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D99EC ; =0x00000794 - ldr r0, [r5, r0] - bl ov19_021D7964 - ldr r1, _021D99F0 ; =0x00000784 - add r4, r0, #0 - ldrb r1, [r5, r1] - cmp r1, #0 - beq _021D997C - cmp r1, #1 - beq _021D9994 - cmp r1, #2 - beq _021D99CE - b _021D99E8 -_021D997C: - add r1, r5, #0 - ldr r0, [r5, #0x48] - add r1, #0x4c - bl ov19_021DA7E0 - cmp r0, #0 - beq _021D99E8 - ldr r0, _021D99F0 ; =0x00000784 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - b _021D99E8 -_021D9994: - bl ov19_021D3B18 - cmp r0, #0 - beq _021D99E8 - add r0, r4, #0 - bl ov19_021D3B20 - cmp r0, #0 - beq _021D99B8 - ldr r0, [r5, #4] - mov r1, #0 - bl sub_02021D6C - add r0, r5, #0 - bl ov19_021DA204 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D99B8: - add r1, r5, #0 - ldr r0, [r5, #0x48] - add r1, #0x4c - mov r2, #2 - bl ov19_021DA7B8 - ldr r0, _021D99F0 ; =0x00000784 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - b _021D99E8 -_021D99CE: - add r1, r5, #0 - ldr r0, [r5, #0x48] - add r1, #0x4c - bl ov19_021DA7E0 - cmp r0, #0 - beq _021D99E8 - ldr r0, [r5, #4] - mov r1, #2 - bl sub_02021D6C - mov r0, #1 - pop {r3, r4, r5, pc} -_021D99E8: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D99EC: .word 0x00000794 -_021D99F0: .word 0x00000784 - thumb_func_end ov19_021D995C - - thumb_func_start ov19_021D99F4 -ov19_021D99F4: ; 0x021D99F4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021E80 - ldr r0, _021D9A24 ; =0x0000078C - ldrb r0, [r4, r0] - cmp r0, #0 - beq _021D9A10 - ldr r0, [r4, #0x4c] - mov r1, #1 - bl sub_02021E80 -_021D9A10: - ldr r0, _021D9A28 ; =0x0000078D - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D9A22 - sub r0, #0x2d - ldr r0, [r4, r0] - mov r1, #1 - bl ov19_021DEBDC -_021D9A22: - pop {r4, pc} - ; .align 2, 0 -_021D9A24: .word 0x0000078C -_021D9A28: .word 0x0000078D - thumb_func_end ov19_021D99F4 - - thumb_func_start ov19_021D9A2C -ov19_021D9A2C: ; 0x021D9A2C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02021E80 - ldr r0, _021D9A5C ; =0x0000078C - ldrb r0, [r4, r0] - cmp r0, #0 - beq _021D9A48 - ldr r0, [r4, #0x4c] - mov r1, #2 - bl sub_02021E80 -_021D9A48: - ldr r0, _021D9A60 ; =0x0000078D - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D9A5A - sub r0, #0x2d - ldr r0, [r4, r0] - mov r1, #2 - bl ov19_021DEBDC -_021D9A5A: - pop {r4, pc} - ; .align 2, 0 -_021D9A5C: .word 0x0000078C -_021D9A60: .word 0x0000078D - thumb_func_end ov19_021D9A2C - - thumb_func_start ov19_021D9A64 -ov19_021D9A64: ; 0x021D9A64 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D9A88 ; =0x0000078C - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D9A84 - add r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5EA0 - add r2, r0, #0 - ldr r0, [r4, #0x48] - add r4, #0x4c - add r1, r4, #0 - bl ov19_021DA68C -_021D9A84: - pop {r4, pc} - nop -_021D9A88: .word 0x0000078C - thumb_func_end ov19_021D9A64 - - thumb_func_start ov19_021D9A8C -ov19_021D9A8C: ; 0x021D9A8C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5EC8 - add r2, r0, #0 - ldr r0, [r4, #0x4c] - cmp r0, #0 - beq _021D9AAC - ldr r0, [r4, #0x48] - add r4, #0x4c - add r1, r4, #0 - bl ov19_021DA63C -_021D9AAC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D9A8C - - thumb_func_start ov19_021D9AB0 -ov19_021D9AB0: ; 0x021D9AB0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x4c] - add r2, r1, #0 - cmp r0, #0 - beq _021D9AE8 - add r1, r4, #0 - ldr r0, [r4, #0x48] - add r1, #0x4c - bl ov19_021DA690 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5EC8 - add r2, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #0x48] - add r1, #0x4c - bl ov19_021DA63C - ldr r0, [r4, #0x48] - add r4, #0x4c - add r1, r4, #0 - mov r2, #0 - bl ov19_021DA694 -_021D9AE8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D9AB0 - - thumb_func_start ov19_021D9AEC -ov19_021D9AEC: ; 0x021D9AEC - push {r4, lr} - add r4, r0, #0 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5EE0 - cmp r0, #0 - ldr r0, [r4, #4] - beq _021D9B08 - mov r1, #1 - bl sub_02021E90 - pop {r4, pc} -_021D9B08: - mov r1, #0 - bl sub_02021E90 - pop {r4, pc} - thumb_func_end ov19_021D9AEC - - thumb_func_start ov19_021D9B10 -ov19_021D9B10: ; 0x021D9B10 - ldr r3, _021D9B18 ; =sub_02021D6C - ldr r0, [r0, #4] - mov r1, #1 - bx r3 - ; .align 2, 0 -_021D9B18: .word sub_02021D6C - thumb_func_end ov19_021D9B10 - - thumb_func_start ov19_021D9B1C -ov19_021D9B1C: ; 0x021D9B1C - push {r4, lr} - ldr r0, [r0, #4] - add r4, r1, #0 - bl sub_02021D28 - add r2, r0, #0 - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021D9B1C - - thumb_func_start ov19_021D9B34 -ov19_021D9B34: ; 0x021D9B34 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D9B58 ; =0x00000784 - mov r2, #0 - strb r2, [r4, r0] - ldr r0, _021D9B5C ; =ov19_021D9B78 - add r1, r4, #0 - bl sub_0200D9E8 - cmp r0, #0 - beq _021D9B54 - ldr r0, _021D9B60 ; =0x0000078D - mov r1, #1 - strb r1, [r4, r0] - sub r0, r0, #5 - strb r1, [r4, r0] -_021D9B54: - pop {r4, pc} - nop -_021D9B58: .word 0x00000784 -_021D9B5C: .word ov19_021D9B78 -_021D9B60: .word 0x0000078D - thumb_func_end ov19_021D9B34 - - thumb_func_start ov19_021D9B64 -ov19_021D9B64: ; 0x021D9B64 - ldr r1, _021D9B74 ; =0x00000788 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021D9B70 - mov r0, #1 - bx lr -_021D9B70: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D9B74: .word 0x00000788 - thumb_func_end ov19_021D9B64 - - thumb_func_start ov19_021D9B78 -ov19_021D9B78: ; 0x021D9B78 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D9BCC ; =0x00000784 - add r4, r1, #0 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D9B8C - cmp r1, #1 - beq _021D9BA8 - pop {r3, r4, r5, pc} -_021D9B8C: - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021D6C - mov r0, #0x76 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021DE954 - ldr r0, _021D9BCC ; =0x00000784 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D9BA8: - sub r0, #0x24 - ldr r0, [r4, r0] - bl ov19_021DE9A8 - cmp r0, #0 - beq _021D9BC8 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02021D6C - ldr r0, _021D9BD0 ; =0x00000788 - mov r1, #0 - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 -_021D9BC8: - pop {r3, r4, r5, pc} - nop -_021D9BCC: .word 0x00000784 -_021D9BD0: .word 0x00000788 - thumb_func_end ov19_021D9B78 - - thumb_func_start ov19_021D9BD4 -ov19_021D9BD4: ; 0x021D9BD4 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D9BF8 ; =0x00000784 - mov r2, #0 - strb r2, [r4, r0] - ldr r0, _021D9BFC ; =ov19_021D9C18 - add r1, r4, #0 - bl sub_0200D9E8 - cmp r0, #0 - beq _021D9BF6 - ldr r0, _021D9C00 ; =0x0000078D - mov r1, #0 - strb r1, [r4, r0] - mov r1, #1 - sub r0, r0, #5 - strb r1, [r4, r0] -_021D9BF6: - pop {r4, pc} - ; .align 2, 0 -_021D9BF8: .word 0x00000784 -_021D9BFC: .word ov19_021D9C18 -_021D9C00: .word 0x0000078D - thumb_func_end ov19_021D9BD4 - - thumb_func_start ov19_021D9C04 -ov19_021D9C04: ; 0x021D9C04 - ldr r1, _021D9C14 ; =0x00000788 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021D9C10 - mov r0, #1 - bx lr -_021D9C10: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D9C14: .word 0x00000788 - thumb_func_end ov19_021D9C04 - - thumb_func_start ov19_021D9C18 -ov19_021D9C18: ; 0x021D9C18 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D9C6C ; =0x00000784 - add r4, r1, #0 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D9C2C - cmp r1, #1 - beq _021D9C48 - pop {r3, r4, r5, pc} -_021D9C2C: - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021D6C - mov r0, #0x76 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021DEA18 - ldr r0, _021D9C6C ; =0x00000784 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D9C48: - sub r0, #0x24 - ldr r0, [r4, r0] - bl ov19_021DEA64 - cmp r0, #0 - beq _021D9C68 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021D6C - ldr r0, _021D9C70 ; =0x00000788 - mov r1, #0 - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 -_021D9C68: - pop {r3, r4, r5, pc} - nop -_021D9C6C: .word 0x00000784 -_021D9C70: .word 0x00000788 - thumb_func_end ov19_021D9C18 - - thumb_func_start ov19_021D9C74 -ov19_021D9C74: ; 0x021D9C74 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D9C94 ; =0x00000784 - mov r2, #0 - strb r2, [r4, r0] - ldr r0, _021D9C98 ; =ov19_021D9CB4 - add r1, r4, #0 - bl sub_0200D9E8 - cmp r0, #0 - beq _021D9C90 - ldr r0, _021D9C9C ; =0x00000788 - mov r1, #1 - strb r1, [r4, r0] -_021D9C90: - pop {r4, pc} - nop -_021D9C94: .word 0x00000784 -_021D9C98: .word ov19_021D9CB4 -_021D9C9C: .word 0x00000788 - thumb_func_end ov19_021D9C74 - - thumb_func_start ov19_021D9CA0 -ov19_021D9CA0: ; 0x021D9CA0 - ldr r1, _021D9CB0 ; =0x00000788 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021D9CAC - mov r0, #1 - bx lr -_021D9CAC: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D9CB0: .word 0x00000788 - thumb_func_end ov19_021D9CA0 - - thumb_func_start ov19_021D9CB4 -ov19_021D9CB4: ; 0x021D9CB4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D9D08 ; =0x00000784 - add r4, r1, #0 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D9CC8 - cmp r1, #1 - beq _021D9CE4 - pop {r3, r4, r5, pc} -_021D9CC8: - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021D6C - mov r0, #0x76 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021DEA74 - ldr r0, _021D9D08 ; =0x00000784 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D9CE4: - sub r0, #0x24 - ldr r0, [r4, r0] - bl ov19_021DEB08 - cmp r0, #0 - beq _021D9D04 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02021D6C - ldr r0, _021D9D0C ; =0x00000788 - mov r1, #0 - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 -_021D9D04: - pop {r3, r4, r5, pc} - nop -_021D9D08: .word 0x00000784 -_021D9D0C: .word 0x00000788 - thumb_func_end ov19_021D9CB4 - - thumb_func_start ov19_021D9D10 -ov19_021D9D10: ; 0x021D9D10 - push {r3, lr} - ldr r1, _021D9D24 ; =0x0000078D - ldrb r1, [r0, r1] - cmp r1, #0 - beq _021D9D22 - ldr r0, [r0, #4] - mov r1, #1 - bl sub_02021D6C -_021D9D22: - pop {r3, pc} - ; .align 2, 0 -_021D9D24: .word 0x0000078D - thumb_func_end ov19_021D9D10 - - thumb_func_start ov19_021D9D28 -ov19_021D9D28: ; 0x021D9D28 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D9D44 ; =0x0000078D - ldrb r0, [r4, r0] - cmp r0, #0 - beq _021D9D42 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021D6C - ldr r0, _021D9D44 ; =0x0000078D - mov r1, #0 - strb r1, [r4, r0] -_021D9D42: - pop {r4, pc} - ; .align 2, 0 -_021D9D44: .word 0x0000078D - thumb_func_end ov19_021D9D28 - - thumb_func_start ov19_021D9D48 -ov19_021D9D48: ; 0x021D9D48 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x79 - add r5, r3, #0 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r7, r2, #0 - add r4, r1, #0 - str r0, [sp] - bl ov19_021D5E10 - strb r0, [r7] - ldrb r0, [r7] - cmp r0, #4 - bhi _021D9DFC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9D72: ; jump table - .short _021D9D7C - _021D9D72 - 2 ; case 0 - .short _021D9DA6 - _021D9D72 - 2 ; case 1 - .short _021D9DC8 - _021D9D72 - 2 ; case 2 - .short _021D9DDA - _021D9D72 - 2 ; case 3 - .short _021D9DEC - _021D9D72 - 2 ; case 4 -_021D9D7C: - ldr r0, _021D9E00 ; =0x00000794 - ldr r0, [r5, r0] - bl ov19_021D7820 - add r5, r0, #0 - ldr r0, [sp] - bl ov19_021D5E14 - mov r1, #0x18 - add r5, #0x70 - mul r1, r0 - add r0, r5, r1 - str r0, [r6, #0] - ldr r0, [sp] - bl ov19_021D5E1C - mov r1, #0x18 - mul r1, r0 - add r1, #0x18 - str r1, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D9DA6: - ldr r0, [sp] - bl ov19_021D5E2C - add r7, r0, #0 - ldr r0, _021D9E00 ; =0x00000794 - ldr r0, [r5, r0] - bl ov19_021D77E8 - add r1, r7, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov19_021DCD30 - ldr r0, [r4, #0] - sub r0, #0x10 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D9DC8: - ldr r0, _021D9E00 ; =0x00000794 - ldr r0, [r5, r0] - bl ov19_021D7820 - add r0, #0xa8 - str r0, [r6, #0] - mov r0, #8 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D9DDA: - ldr r0, _021D9E00 ; =0x00000794 - ldr r0, [r5, r0] - bl ov19_021D7820 - add r0, #0x9f - str r0, [r6, #0] - mov r0, #0xa0 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D9DEC: - ldr r0, _021D9E00 ; =0x00000794 - ldr r0, [r5, r0] - bl ov19_021D7820 - add r0, #0xeb - str r0, [r6, #0] - mov r0, #0xa0 - str r0, [r4, #0] -_021D9DFC: - pop {r3, r4, r5, r6, r7, pc} - nop -_021D9E00: .word 0x00000794 - thumb_func_end ov19_021D9D48 - - thumb_func_start ov19_021D9E04 -ov19_021D9E04: ; 0x021D9E04 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - ldr r0, [r7, #4] - add r6, r1, #0 - bl sub_02021C50 - ldr r1, _021D9E98 ; =0x0000078C - ldrb r0, [r7, r1] - cmp r0, #0 - beq _021D9E5C - mov r0, #0 - sub r1, #0x38 - str r0, [sp] - str r0, [sp, #0x18] - ldr r0, [r7, r1] - cmp r0, #0 - bls _021D9E5C - add r4, r7, #0 - add r5, r7, #0 -_021D9E2C: - ldr r0, _021D9E9C ; =0x00000664 - ldr r1, [r6, #0] - ldr r0, [r4, r0] - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r0, _021D9EA0 ; =0x00000668 - ldr r1, [r6, #4] - ldr r0, [r4, r0] - sub r0, r1, r0 - str r0, [sp, #0x14] - ldr r0, [r5, #0x4c] - add r1, sp, #0x10 - bl sub_02021C50 - ldr r0, [sp] - add r4, #8 - add r0, r0, #1 - str r0, [sp] - ldr r0, _021D9EA4 ; =0x00000754 - add r5, #0x34 - ldr r1, [r7, r0] - ldr r0, [sp] - cmp r0, r1 - blo _021D9E2C -_021D9E5C: - ldr r0, _021D9EA8 ; =0x0000078D - ldrb r1, [r7, r0] - cmp r1, #0 - beq _021D9E6E - sub r0, #0x2d - ldr r0, [r7, r0] - add r1, r6, #0 - bl ov19_021DEB9C -_021D9E6E: - ldr r0, _021D9EAC ; =0x0000078E - ldrb r0, [r7, r0] - cmp r0, #0 - beq _021D9E94 - ldmia r6!, {r0, r1} - add r3, sp, #4 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - mov r0, #6 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [r7, #8] - add r1, r2, #0 - bl sub_02021C50 -_021D9E94: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D9E98: .word 0x0000078C -_021D9E9C: .word 0x00000664 -_021D9EA0: .word 0x00000668 -_021D9EA4: .word 0x00000754 -_021D9EA8: .word 0x0000078D -_021D9EAC: .word 0x0000078E - thumb_func_end ov19_021D9E04 - - thumb_func_start ov19_021D9EB0 -ov19_021D9EB0: ; 0x021D9EB0 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - mov r1, #0x79 - lsl r1, r1, #4 - str r0, [sp, #4] - ldr r0, [r0, r1] - bl ov19_021D5E10 - cmp r0, #0 - beq _021D9EC6 - b _021D9FE8 -_021D9EC6: - mov r1, #0x79 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl ov19_021D5F20 - cmp r0, #0 - beq _021D9F0E - mov r1, #0x79 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl ov19_021D5E24 - add r1, r0, #0 - ldr r3, [sp, #4] - ldr r2, _021DA020 ; =0x00000758 - ldr r0, [sp, #4] - add r3, #0x4c - ldr r0, [r0, r2] - ldr r2, _021DA024 ; =0x000004D8 - bl ov19_021D8408 - ldr r0, [sp, #4] - ldr r2, _021DA028 ; =0x00000754 - mov r1, #1 - str r1, [r0, r2] - add r1, r2, #0 - mov r3, #0 - sub r1, #0xf0 - str r3, [r0, r1] - ldr r1, _021DA02C ; =0xFFFFC000 - sub r2, #0xec - str r1, [r0, r2] - add sp, #0x34 - pop {r4, r5, r6, r7, pc} -_021D9F0E: - add r0, sp, #0x24 - str r0, [sp] - mov r1, #0x79 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - add r1, sp, #0x30 - add r2, sp, #0x2c - add r3, sp, #0x28 - bl ov19_021D5EE8 - mov r1, #0x79 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl ov19_021D5E14 - str r0, [sp, #0x18] - mov r1, #0x79 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl ov19_021D5E1C - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x24] - str r0, [sp, #0x1c] - cmp r0, r1 - bhi _021D9FDC - ldr r0, [sp, #4] - ldr r6, [sp, #4] - str r0, [sp, #0x10] - add r0, #0x4c - str r0, [sp, #0x10] - mov r7, #0x5f - ldr r0, [sp, #0x1c] - mov r1, #6 - mul r1, r0 - lsl r7, r7, #4 - str r1, [sp, #0xc] - add r5, r6, #0 -_021D9F66: - ldr r4, [sp, #0x30] - ldr r0, [sp, #0x2c] - cmp r4, r0 - bhi _021D9FCA - ldr r1, [sp, #0x1c] - ldr r0, [sp, #0x14] - sub r1, r1, r0 - mov r0, #0x18 - add r2, r1, #0 - mul r2, r0 - sub r0, #0x1c - sub r0, r0, r2 - lsl r0, r0, #0xc - str r0, [sp, #8] -_021D9F82: - ldr r1, [sp, #4] - ldr r0, _021DA020 ; =0x00000758 - ldr r3, [sp, #0x10] - ldr r0, [r1, r0] - ldr r1, [sp, #0xc] - add r2, r7, #0 - add r1, r4, r1 - bl ov19_021D8408 - ldr r0, [r6, #0x4c] - cmp r0, #0 - beq _021D9FC2 - ldr r0, [sp, #0x18] - add r7, #0x10 - sub r1, r4, r0 - mov r0, #6 - add r2, r1, #0 - lsl r0, r0, #0xe - mul r2, r0 - ldr r0, _021DA030 ; =0x00000664 - ldr r1, [sp, #8] - str r2, [r5, r0] - add r0, r0, #4 - str r1, [r5, r0] - ldr r0, [sp, #0x10] - add r6, #0x34 - add r0, #0x34 - str r0, [sp, #0x10] - ldr r0, [sp, #0x20] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #0x20] -_021D9FC2: - ldr r0, [sp, #0x2c] - add r4, r4, #1 - cmp r4, r0 - bls _021D9F82 -_021D9FCA: - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x24] - add r0, r0, #6 - str r0, [sp, #0xc] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, r1 - bls _021D9F66 -_021D9FDC: - ldr r2, _021DA028 ; =0x00000754 - ldr r1, [sp, #0x20] - ldr r0, [sp, #4] - add sp, #0x34 - str r1, [r0, r2] - pop {r4, r5, r6, r7, pc} -_021D9FE8: - mov r1, #0x79 - ldr r0, [sp, #4] - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl ov19_021D5E2C - add r1, r0, #0 - ldr r3, [sp, #4] - ldr r2, _021DA034 ; =0x0000075C - ldr r0, [sp, #4] - add r3, #0x4c - ldr r0, [r0, r2] - ldr r2, _021DA024 ; =0x000004D8 - bl ov19_021DCC44 - ldr r2, _021DA028 ; =0x00000754 - ldr r0, [sp, #4] - mov r1, #1 - str r1, [r0, r2] - add r1, r2, #0 - mov r3, #0 - sub r1, #0xf0 - str r3, [r0, r1] - ldr r1, _021DA02C ; =0xFFFFC000 - sub r2, #0xec - str r1, [r0, r2] - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DA020: .word 0x00000758 -_021DA024: .word 0x000004D8 -_021DA028: .word 0x00000754 -_021DA02C: .word 0xFFFFC000 -_021DA030: .word 0x00000664 -_021DA034: .word 0x0000075C - thumb_func_end ov19_021D9EB0 - - thumb_func_start ov19_021DA038 -ov19_021DA038: ; 0x021DA038 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _021DA064 ; =0x00000754 - mov r4, #0 - ldr r0, [r6, r0] - cmp r0, #0 - bls _021DA05C - ldr r7, _021DA064 ; =0x00000754 - add r5, r6, #0 -_021DA04A: - ldr r0, [r5, #0x4c] - mov r1, #2 - bl ov19_021D78AC - ldr r0, [r6, r7] - add r4, r4, #1 - add r5, #0x34 - cmp r4, r0 - blo _021DA04A -_021DA05C: - ldr r0, _021DA068 ; =0x0000078C - mov r1, #1 - strb r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DA064: .word 0x00000754 -_021DA068: .word 0x0000078C - thumb_func_end ov19_021DA038 - - thumb_func_start ov19_021DA06C -ov19_021DA06C: ; 0x021DA06C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E10 - cmp r0, #0 - bne _021DA0E8 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5F20 - cmp r0, #0 - beq _021DA0A6 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E24 - add r1, r0, #0 - ldr r0, _021DA104 ; =0x00000758 - ldr r0, [r5, r0] - add r5, #0x4c - add r2, r5, #0 - bl ov19_021D845C - pop {r3, r4, r5, r6, r7, pc} -_021DA0A6: - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5F3C - add r7, r0, #0 - ldr r0, _021DA108 ; =0x00000754 - mov r4, #0 - ldr r0, [r5, r0] - cmp r0, #0 - bls _021DA100 - add r6, r5, #0 - add r6, #0x4c -_021DA0C0: - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov19_021D5F6C - add r1, r0, #0 - ldr r0, _021DA104 ; =0x00000758 - add r1, r7, r1 - ldr r0, [r5, r0] - add r2, r6, #0 - bl ov19_021D845C - ldr r0, _021DA108 ; =0x00000754 - add r4, r4, #1 - ldr r0, [r5, r0] - add r6, #0x34 - cmp r4, r0 - blo _021DA0C0 - pop {r3, r4, r5, r6, r7, pc} -_021DA0E8: - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E2C - add r1, r0, #0 - ldr r0, _021DA10C ; =0x0000075C - ldr r0, [r5, r0] - add r5, #0x4c - add r2, r5, #0 - bl ov19_021DCC80 -_021DA100: - pop {r3, r4, r5, r6, r7, pc} - nop -_021DA104: .word 0x00000758 -_021DA108: .word 0x00000754 -_021DA10C: .word 0x0000075C - thumb_func_end ov19_021DA06C - - thumb_func_start ov19_021DA110 -ov19_021DA110: ; 0x021DA110 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E10 - cmp r0, #0 - bne _021DA186 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E24 - add r4, r0, #0 - ldr r0, _021DA1EC ; =0x00000758 - add r1, r4, #0 - ldr r0, [r5, r0] - bl ov19_021D84C8 - add r6, r0, #0 - add r1, r5, #0 - mov r2, #0x5f - ldr r0, [r5, #0x48] - add r1, #0x4c - lsl r2, r2, #4 - bl ov19_021DA754 - mov r2, #6 - ldr r0, [r5, #0x48] - add r1, r6, #0 - lsl r2, r2, #8 - bl ov19_021DA754 - bl sub_020C3E14 - ldr r0, _021DA1EC ; =0x00000758 - add r3, r5, #0 - ldr r0, [r5, r0] - ldr r2, _021DA1F0 ; =0x000004D8 - add r1, r4, #0 - add r3, #0x80 - bl ov19_021D8408 - ldr r0, _021DA1EC ; =0x00000758 - add r2, r5, #0 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, #0x4c - bl ov19_021D845C - add r0, r5, #0 - add r5, #0x4c - add r0, #0x80 - add r1, r5, #0 - mov r2, #1 - bl ov19_021DA418 - pop {r4, r5, r6, pc} -_021DA186: - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl ov19_021D5E2C - add r4, r0, #0 - ldr r0, _021DA1F4 ; =0x0000075C - add r1, r4, #0 - ldr r0, [r5, r0] - bl ov19_021DCD18 - add r6, r0, #0 - add r1, r5, #0 - mov r2, #0x5f - ldr r0, [r5, #0x48] - add r1, #0x4c - lsl r2, r2, #4 - bl ov19_021DA754 - mov r2, #6 - ldr r0, [r5, #0x48] - add r1, r6, #0 - lsl r2, r2, #8 - bl ov19_021DA754 - bl sub_020C3E14 - ldr r0, _021DA1F4 ; =0x0000075C - add r3, r5, #0 - ldr r0, [r5, r0] - ldr r2, _021DA1F0 ; =0x000004D8 - add r1, r4, #0 - add r3, #0x80 - bl ov19_021DCC44 - ldr r0, _021DA1F4 ; =0x0000075C - add r2, r5, #0 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, #0x4c - bl ov19_021DCCD4 - add r0, r5, #0 - add r5, #0x4c - add r0, #0x80 - add r1, r5, #0 - mov r2, #1 - bl ov19_021DA418 - pop {r4, r5, r6, pc} - nop -_021DA1EC: .word 0x00000758 -_021DA1F0: .word 0x000004D8 -_021DA1F4: .word 0x0000075C - thumb_func_end ov19_021DA110 - - thumb_func_start ov19_021DA1F8 -ov19_021DA1F8: ; 0x021DA1F8 - ldr r1, _021DA200 ; =0x0000078C - mov r2, #0 - strb r2, [r0, r1] - bx lr - ; .align 2, 0 -_021DA200: .word 0x0000078C - thumb_func_end ov19_021DA1F8 - - thumb_func_start ov19_021DA204 -ov19_021DA204: ; 0x021DA204 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #0x48] - add r1, #0x4c - mov r2, #1 - bl ov19_021DA3F0 - ldr r0, _021DA220 ; =0x0000078C - mov r1, #0 - strb r1, [r4, r0] - sub r0, #0x38 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021DA220: .word 0x0000078C - thumb_func_end ov19_021DA204 - - thumb_func_start ov19_021DA224 -ov19_021DA224: ; 0x021DA224 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E10 - cmp r0, #0 - bne _021DA24E - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E24 - add r1, r0, #0 - ldr r0, _021DA268 ; =0x00000758 - ldr r0, [r4, r0] - bl ov19_021D84C8 - ldr r0, [r0, #0] - pop {r4, pc} -_021DA24E: - mov r0, #0x79 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov19_021D5E2C - add r1, r0, #0 - ldr r0, _021DA26C ; =0x0000075C - ldr r0, [r4, r0] - bl ov19_021DCD18 - ldr r0, [r0, #0] - pop {r4, pc} - nop -_021DA268: .word 0x00000758 -_021DA26C: .word 0x0000075C - thumb_func_end ov19_021DA224 - - thumb_func_start ov19_021DA270 -ov19_021DA270: ; 0x021DA270 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x13 - mov r1, #0xa - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r4, [sp, #0x48] - bl sub_02006C24 - str r0, [r5, #0x48] - add r0, sp, #0x1c - bl sub_020A81D0 - bl sub_02079FD0 - add r1, r0, #0 - mov r0, #0xa - str r0, [sp] - add r0, sp, #0x1c - str r0, [sp, #4] - ldr r0, [r5, #0x48] - mov r2, #1 - mov r3, #0x40 - bl sub_0200716C - bl sub_02079FD0 - add r1, r0, #0 - ldr r0, [r5, #0x48] - add r2, sp, #0x18 - mov r3, #0xa - bl sub_020071EC - str r0, [sp, #0x10] - cmp r0, #0 - beq _021DA308 - add r0, sp, #0x1c - bl sub_020A81D0 - ldr r0, [sp, #0x10] - add r1, sp, #0x14 - bl sub_020A71EC - ldr r2, [sp, #0x18] - add r7, r0, #0 - ldr r0, [r2, #0xc] - mov r1, #8 - str r1, [sp] - ldr r2, [r2, #8] - ldr r3, _021DA380 ; =0x0000057F - add r1, r0, #0 - lsr r2, r2, #1 - bl ov19_021D78C8 - cmp r7, #0 - beq _021DA2F6 - add r0, sp, #0x1c - str r0, [sp] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - mov r2, #0xc0 - mov r3, #1 - bl sub_020A8948 - b _021DA302 -_021DA2F6: - ldr r0, [sp, #0x18] - mov r1, #0xc0 - mov r2, #1 - add r3, sp, #0x1c - bl sub_020A8850 -_021DA302: - ldr r0, [sp, #0x10] - bl sub_020181C4 -_021DA308: - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x15 - mov r2, #1 - add r3, #0x10 - bl sub_02007204 - str r0, [r5, #8] - mov r0, #0xa - str r0, [sp] - add r0, r4, #0 - mov r1, #0x16 - mov r2, #1 - add r3, r5, #4 - bl sub_02007220 - str r0, [r5, #0] - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - add r3, #0x1c - bl sub_02007204 - str r0, [r5, #0x14] - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x18 - mov r2, #1 - add r3, #0x20 - bl sub_02007220 - str r0, [r5, #0x18] - ldr r0, [r5, #8] - cmp r0, #0 - beq _021DA368 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DA368 - ldr r0, [r5, #0x48] - cmp r0, #0 - bne _021DA36E -_021DA368: - add sp, #0x30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DA36E: - ldr r0, [sp, #0xc] - str r0, [r5, #0x24] - ldr r0, [sp, #8] - str r0, [r5, #0x40] - str r6, [r5, #0x44] - mov r0, #1 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DA380: .word 0x0000057F - thumb_func_end ov19_021DA270 - - thumb_func_start ov19_021DA384 -ov19_021DA384: ; 0x021DA384 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021DA396 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] -_021DA396: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021DA3A4 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] -_021DA3A4: - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021DA3B2 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x14] -_021DA3B2: - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _021DA3C0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x18] -_021DA3C0: - ldr r0, [r4, #0x48] - cmp r0, #0 - beq _021DA3CA - bl sub_02006CA8 -_021DA3CA: - pop {r4, pc} - thumb_func_end ov19_021DA384 - - thumb_func_start ov19_021DA3CC -ov19_021DA3CC: ; 0x021DA3CC - push {r4, r5, r6, lr} - add r4, r2, #0 - add r0, r4, #0 - add r5, r1, #0 - sub r4, r4, #1 - cmp r0, #0 - beq _021DA3EE - mov r6, #0 -_021DA3DC: - add r0, r5, #4 - str r6, [r5, #0] - bl sub_020A818C - add r0, r4, #0 - add r5, #0x34 - sub r4, r4, #1 - cmp r0, #0 - bne _021DA3DC -_021DA3EE: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DA3CC - - thumb_func_start ov19_021DA3F0 -ov19_021DA3F0: ; 0x021DA3F0 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r0, r4, #0 - add r5, r1, #0 - sub r4, r4, #1 - cmp r0, #0 - beq _021DA416 - mov r6, #0 -_021DA400: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DA40C - bl sub_02021BD4 - str r6, [r5, #0] -_021DA40C: - add r0, r4, #0 - add r5, #0x34 - sub r4, r4, #1 - cmp r0, #0 - bne _021DA400 -_021DA416: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DA3F0 - - thumb_func_start ov19_021DA418 -ov19_021DA418: ; 0x021DA418 - mov r3, #0x34 - mul r3, r2 - add r2, r3, #0 - ldr r3, _021DA424 ; =sub_020C4B68 - bx r3 - nop -_021DA424: .word sub_020C4B68 - thumb_func_end ov19_021DA418 - - thumb_func_start ov19_021DA428 -ov19_021DA428: ; 0x021DA428 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r4, [sp, #0x64] - bl sub_02073D20 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - ldr r0, [r5, #0x44] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r5, #4] - mov r1, #0 - str r0, [sp] - ldr r0, [sp, #0x58] - str r0, [sp, #4] - ldr r3, [r5, #0x10] - add r0, sp, #0x20 - bl ov19_021D783C - add r0, r6, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x18] - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r6, #0 - bl sub_02079D40 - str r0, [r4, #0x28] - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x14] - add r1, r7, #0 - bl sub_02079EDC - strh r0, [r4, #0x2c] - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074570 - strh r0, [r4, #0x30] - add r0, r6, #0 - mov r1, #0xb - mov r2, #0 - bl sub_02074570 - strh r0, [r4, #0x2e] - add r0, r4, #4 - bl sub_020A818C - add r0, r5, #0 - add r0, #0x4c - str r0, [sp] - mov r3, #0xa - ldr r0, [r5, #0x48] - ldr r1, [r4, #0x28] - mov r2, #0 - lsl r3, r3, #6 - bl sub_02006DC8 - add r0, r5, #0 - add r0, #0x4c - add r1, sp, #0x1c - bl sub_020A7118 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021DA544 ; =0x00300010 - add r3, r4, #4 - and r1, r0 - ldr r0, [sp, #0x1c] - str r1, [r0, #8] - lsr r1, r2, #0x11 - ldr r0, [sp, #0x1c] - mov r2, #1 - str r1, [r0, #0x10] - ldr r1, [sp, #0x60] - ldr r0, [sp, #0x1c] - lsl r1, r1, #5 - bl sub_020A8224 - add r0, r4, #4 - str r0, [sp, #0x20] - ldr r0, [sp, #0x5c] - ldr r2, [sp, #8] - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x24] - ldr r3, [sp, #0xc] - add r1, sp, #0x20 - bl ov19_021D785C - str r0, [r4, #0] - cmp r0, #0 - bne _021DA51E - bl sub_02022974 -_021DA51E: - ldrh r1, [r4, #0x2c] - ldr r0, [r4, #0] - add r1, r1, #2 - bl sub_02021E90 - ldr r0, [r5, #0x40] - bl ov19_021D5EC8 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DA63C - ldr r1, [sp, #0x10] - add r0, r6, #0 - bl sub_02073D48 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DA544: .word 0x00300010 - thumb_func_end ov19_021DA428 - - thumb_func_start ov19_021DA548 -ov19_021DA548: ; 0x021DA548 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - str r2, [sp, #8] - add r7, r3, #0 - ldr r4, [sp, #0x70] - bl sub_02073D20 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - add r0, r6, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [r5, #0x44] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r5, #4] - mov r1, #0 - str r0, [sp] - ldr r0, [sp, #0x64] - str r0, [sp, #4] - ldr r3, [r5, #0x10] - add r0, sp, #0x1c - bl ov19_021D783C - str r7, [r4, #0x28] - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - bl sub_02079EDC - strh r0, [r4, #0x2c] - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074570 - strh r0, [r4, #0x30] - add r0, r6, #0 - mov r1, #0xb - mov r2, #0 - bl sub_02074570 - strh r0, [r4, #0x2e] - add r0, r4, #4 - bl sub_020A818C - ldr r0, [sp, #0x58] - add r1, sp, #0x18 - bl sub_020A7118 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021DA638 ; =0x00300010 - add r3, r4, #4 - and r1, r0 - ldr r0, [sp, #0x18] - str r1, [r0, #8] - lsr r1, r2, #0x11 - ldr r0, [sp, #0x18] - mov r2, #1 - str r1, [r0, #0x10] - ldr r1, [sp, #0x6c] - ldr r0, [sp, #0x18] - lsl r1, r1, #5 - bl sub_020A8224 - add r0, r4, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x68] - ldr r2, [sp, #0x5c] - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x24] - ldr r3, [sp, #0x60] - add r1, sp, #0x1c - bl ov19_021D785C - str r0, [r4, #0] - cmp r0, #0 - bne _021DA610 - bl sub_02022974 -_021DA610: - ldrh r1, [r4, #0x2c] - ldr r0, [r4, #0] - add r1, r1, #2 - bl sub_02021E90 - ldr r0, [r5, #0x40] - bl ov19_021D5EC8 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DA63C - ldr r1, [sp, #0x14] - add r0, r6, #0 - bl sub_02073D48 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DA638: .word 0x00300010 - thumb_func_end ov19_021DA548 - - thumb_func_start ov19_021DA63C -ov19_021DA63C: ; 0x021DA63C - push {r4, r5, r6, lr} - cmp r2, #0 - beq _021DA682 - mov r3, #1 - add r0, r2, #0 - tst r0, r3 - beq _021DA65A - ldrh r0, [r1, #0x30] - cmp r0, #0 - bne _021DA65A - ldr r0, [r1, #0] - add r1, r3, #0 - bl sub_02021FE0 - pop {r4, r5, r6, pc} -_021DA65A: - mov r3, #0 - mov r4, #1 - mov r0, #2 -_021DA660: - add r5, r0, #0 - lsl r5, r3 - tst r5, r2 - beq _021DA67C - add r5, r4, #0 - ldrh r6, [r1, #0x2e] - lsl r5, r3 - tst r5, r6 - bne _021DA67C - ldr r0, [r1, #0] - add r1, r4, #0 - bl sub_02021FE0 - pop {r4, r5, r6, pc} -_021DA67C: - add r3, r3, #1 - cmp r3, #6 - blt _021DA660 -_021DA682: - ldr r0, [r1, #0] - mov r1, #0 - bl sub_02021FE0 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DA63C - - thumb_func_start ov19_021DA68C -ov19_021DA68C: ; 0x021DA68C - strh r2, [r1, #0x2e] - bx lr - thumb_func_end ov19_021DA68C - - thumb_func_start ov19_021DA690 -ov19_021DA690: ; 0x021DA690 - strh r2, [r1, #0x30] - bx lr - thumb_func_end ov19_021DA690 - - thumb_func_start ov19_021DA694 -ov19_021DA694: ; 0x021DA694 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #0x30] - add r6, r2, #0 - cmp r0, #0x70 - bne _021DA6C2 - mov r1, #0 - ldr r0, _021DA740 ; =0x000001E7 - add r2, r1, #0 - bl sub_02079D8C - ldr r1, [r4, #0x28] - cmp r1, r0 - bne _021DA6C2 - ldr r0, _021DA740 ; =0x000001E7 - mov r1, #0 - mov r2, #1 - bl sub_02079D8C - str r0, [r4, #0x28] - b _021DA70A -_021DA6C2: - ldrh r0, [r4, #0x30] - cmp r0, #0x70 - beq _021DA6E6 - ldr r0, _021DA740 ; =0x000001E7 - mov r1, #0 - mov r2, #1 - bl sub_02079D8C - ldr r1, [r4, #0x28] - cmp r1, r0 - bne _021DA6E6 - mov r1, #0 - ldr r0, _021DA740 ; =0x000001E7 - add r2, r1, #0 - bl sub_02079D8C - str r0, [r4, #0x28] - b _021DA70A -_021DA6E6: - cmp r6, #1 - bne _021DA73C - mov r0, #0x7b - lsl r0, r0, #2 - mov r1, #0 - mov r2, #1 - bl sub_02079D8C - ldr r1, [r4, #0x28] - cmp r1, r0 - bne _021DA73C - mov r0, #0x7b - mov r1, #0 - lsl r0, r0, #2 - add r2, r1, #0 - bl sub_02079D8C - str r0, [r4, #0x28] -_021DA70A: - add r0, r5, #0 - ldr r6, [r4, #8] - add r0, #0x4c - str r0, [sp] - mov r3, #0xa - mov r7, #0x19 - ldr r0, [r5, #0x48] - ldr r1, [r4, #0x28] - mov r2, #0 - lsl r3, r3, #6 - lsl r7, r7, #0x16 - bl sub_02006DC8 - add r5, #0x4c - add r0, r5, #0 - add r1, sp, #4 - bl sub_020A7118 - ldr r0, [sp, #4] - mov r2, #2 - ldr r0, [r0, #0x14] - add r1, r6, r7 - lsl r2, r2, #8 - bl sub_020C4B68 -_021DA73C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DA740: .word 0x000001E7 - thumb_func_end ov19_021DA694 - - thumb_func_start ov19_021DA744 -ov19_021DA744: ; 0x021DA744 - push {r3, lr} - str r1, [sp] - ldr r0, [r0, #0x48] - add r1, r2, #0 - mov r2, #0 - bl sub_02006DC8 - pop {r3, pc} - thumb_func_end ov19_021DA744 - - thumb_func_start ov19_021DA754 -ov19_021DA754: ; 0x021DA754 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r6, r2, #0 - cmp r0, #0 - beq _021DA7B0 - add r0, r4, #4 - bl sub_020A818C - add r0, r5, #0 - add r0, #0x4c - str r0, [sp] - mov r3, #0xa - ldr r0, [r5, #0x48] - ldr r1, [r4, #0x28] - mov r2, #0 - lsl r3, r3, #6 - bl sub_02006DC8 - add r5, #0x4c - add r0, r5, #0 - add r1, sp, #4 - bl sub_020A7118 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021DA7B4 ; =0x00300010 - add r3, r4, #4 - and r1, r0 - ldr r0, [sp, #4] - str r1, [r0, #8] - lsr r1, r2, #0x11 - ldr r0, [sp, #4] - mov r2, #1 - str r1, [r0, #0x10] - ldr r0, [sp, #4] - lsl r1, r6, #5 - bl sub_020A8224 - ldr r0, [r4, #0] - add r1, r4, #4 - bl sub_02021F7C -_021DA7B0: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DA7B4: .word 0x00300010 - thumb_func_end ov19_021DA754 - - thumb_func_start ov19_021DA7B8 -ov19_021DA7B8: ; 0x021DA7B8 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - sub r0, r4, #1 - cmp r0, #1 - ldr r0, [r5, #0] - bhi _021DA7CE - mov r1, #1 - bl sub_02021CF8 - b _021DA7D4 -_021DA7CE: - mov r1, #0 - bl sub_02021CF8 -_021DA7D4: - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_02021D6C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DA7B8 - - thumb_func_start ov19_021DA7E0 -ov19_021DA7E0: ; 0x021DA7E0 - push {r3, lr} - ldr r0, [r1, #0] - bl sub_02021FD0 - cmp r0, #0 - bne _021DA7F0 - mov r0, #1 - pop {r3, pc} -_021DA7F0: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov19_021DA7E0 - - thumb_func_start ov19_021DA7F4 -ov19_021DA7F4: ; 0x021DA7F4 - cmp r2, #0 - beq _021DA7FC - mov r2, #6 - b _021DA7FE -_021DA7FC: - mov r2, #2 -_021DA7FE: - ldr r0, [r1, #0] - ldrh r1, [r1, #0x2c] - ldr r3, _021DA808 ; =sub_02021E90 - add r1, r1, r2 - bx r3 - ; .align 2, 0 -_021DA808: .word sub_02021E90 - thumb_func_end ov19_021DA7F4 - - thumb_func_start ov19_021DA80C -ov19_021DA80C: ; 0x021DA80C - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov19_021DA80C - - thumb_func_start ov19_021DA810 -ov19_021DA810: ; 0x021DA810 - ldr r0, [r0, #4] - bx lr - thumb_func_end ov19_021DA810 - - thumb_func_start ov19_021DA814 -ov19_021DA814: ; 0x021DA814 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - str r1, [r4, #0x44] - str r3, [r4, #0x3c] - str r2, [r4, #0x40] - str r3, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - mov r1, #0xa - add r3, r4, #0 - ldr r0, [sp, #0x10] - str r1, [sp] - mov r2, #1 - add r3, #0x10 - bl sub_02007204 - str r0, [r4, #8] - mov r0, #0xa - str r0, [sp] - add r3, r4, #0 - ldr r0, [sp, #0x10] - mov r1, #0xb - mov r2, #1 - add r3, #0x14 - bl sub_02007220 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - cmp r0, #0 - beq _021DA858 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _021DA85E -_021DA858: - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_021DA85E: - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov19_021DA814 - - thumb_func_start ov19_021DA864 -ov19_021DA864: ; 0x021DA864 - push {r3, r4, r5, lr} - sub sp, #0x38 - add r5, r0, #0 - add r0, #0x18 - add r4, r1, #0 - bl sub_020A818C - mov r3, #0 - mov r0, #0x9d - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - lsl r0, r0, #8 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0x18 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #9 - bl sub_0200718C - ldr r0, [r5, #0x44] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r5, #0x14] - add r1, r5, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r3, [r5, #0x10] - add r0, sp, #0x14 - add r1, #0x18 - bl ov19_021D783C - ldr r0, [r5, #0x44] - bl ov19_021D7820 - add r2, r0, #0 - mov r0, #0x2c - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r1, sp, #0x14 - add r2, #0xb7 - mov r3, #0xb0 - bl ov19_021D785C - mov r1, #1 - str r0, [r5, #4] - bl sub_02021E90 - add sp, #0x38 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DA864 - - thumb_func_start ov19_021DA8D8 -ov19_021DA8D8: ; 0x021DA8D8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021DA8EA - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] -_021DA8EA: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021DA8F8 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0xc] -_021DA8F8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DA8D8 - - thumb_func_start ov19_021DA8FC -ov19_021DA8FC: ; 0x021DA8FC - push {r3, lr} - cmp r1, #0 - beq _021DA90C - cmp r1, #1 - beq _021DA916 - cmp r1, #2 - beq _021DA920 - pop {r3, pc} -_021DA90C: - ldr r0, [r0, #4] - mov r1, #0 - bl sub_02021D6C - pop {r3, pc} -_021DA916: - ldr r0, [r0, #4] - mov r1, #1 - bl sub_02021D6C - pop {r3, pc} -_021DA920: - ldr r0, [r0, #4] - mov r1, #2 - bl sub_02021D6C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov19_021DA8FC - - thumb_func_start ov19_021DA92C -ov19_021DA92C: ; 0x021DA92C - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r1, #0 - add r7, r3, #0 - bl ov19_021D5E08 - cmp r0, #4 - bne _021DA948 - mov r0, #0 - str r0, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DA948: - str r4, [r5, #0x14] - str r7, [r5, #8] - ldr r0, [sp, #0x18] - str r6, [r5, #0x10] - str r0, [r5, #0xc] - mov r0, #0 - str r0, [r5, #4] - str r0, [r5, #0x4c] - str r0, [r5, #0x24] - add r0, r4, #0 - bl ov19_021D7818 - str r0, [r5, #0x20] - mov r0, #9 - mov r1, #6 - mov r2, #0xf - mov r3, #0xa - bl sub_0200C440 - str r0, [r5, #0x18] - mov r0, #1 - mov r1, #2 - mov r2, #0xf - mov r3, #0xa - bl sub_0200C440 - str r0, [r5, #0x1c] - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x20] - mov r1, #0x10 - mov r2, #1 - add r3, #0x2c - bl sub_02007204 - str r0, [r5, #0x28] - mov r0, #0 - str r0, [r5, #0x30] - ldr r0, [sp, #0x1c] - mov r1, #0x15 - bl sub_0200B1EC - str r0, [r5, #0x44] - ldr r0, [sp, #0x1c] - mov r1, #0x16 - bl sub_0200B1EC - str r0, [r5, #0x48] - bl sub_0207C944 - add r4, r0, #0 - bl sub_0207C924 - add r1, r0, #0 - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r2, #1 - add r3, #0x38 - bl sub_02006FA0 - mov r1, #0 - str r0, [r5, #0x34] - add r2, r5, #0 - add r0, r1, #0 -_021DA9CE: - add r1, r1, #1 - str r0, [r2, #0x3c] - add r2, r2, #4 - cmp r1, #2 - blt _021DA9CE - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DA92C - - thumb_func_start ov19_021DA9E0 -ov19_021DA9E0: ; 0x021DA9E0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DAA7E - ldr r0, [r5, #4] - cmp r0, #0 - beq _021DAA0E - mov r6, #0 - add r4, r6, #0 -_021DA9F4: - ldr r0, [r5, #4] - add r0, r0, r4 - bl sub_0201A8FC - add r6, r6, #1 - add r4, #0x10 - cmp r6, #4 - blt _021DA9F4 - ldr r0, [r5, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r5, #4] -_021DAA0E: - ldr r0, [r5, #0x18] - cmp r0, #0 - beq _021DAA18 - bl sub_0200C560 -_021DAA18: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _021DAA22 - bl sub_0200C560 -_021DAA22: - ldr r0, [r5, #0x44] - cmp r0, #0 - beq _021DAA2C - bl sub_020237BC -_021DAA2C: - ldr r0, [r5, #0x48] - cmp r0, #0 - beq _021DAA36 - bl sub_020237BC -_021DAA36: - ldr r0, [r5, #0x24] - cmp r0, #0 - beq _021DAA44 - bl sub_02007DC8 - mov r0, #0 - str r0, [r5, #0x24] -_021DAA44: - ldr r0, [r5, #0x28] - cmp r0, #0 - beq _021DAA4E - bl sub_020181C4 -_021DAA4E: - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021DAA58 - bl sub_02021BD4 -_021DAA58: - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DAA62 - bl sub_020181C4 -_021DAA62: - mov r6, #0 - add r4, r5, #0 -_021DAA66: - ldr r0, [r4, #0x3c] - cmp r0, #0 - beq _021DAA70 - bl sub_02021BD4 -_021DAA70: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #2 - blt _021DAA66 - add r0, r5, #0 - bl ov19_021DAC90 -_021DAA7E: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DA9E0 - - thumb_func_start ov19_021DAA80 -ov19_021DAA80: ; 0x021DAA80 - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #0 - beq _021DAA8E - ldr r0, [r0, #0x20] - bl sub_02008A94 -_021DAA8E: - pop {r3, pc} - thumb_func_end ov19_021DAA80 - - thumb_func_start ov19_021DAA90 -ov19_021DAA90: ; 0x021DAA90 - push {r4, lr} - sub sp, #0x20 - mov r2, #0 - str r2, [sp] - add r4, r0, #0 - str r2, [sp, #4] - add r0, sp, #0x10 - mov r1, #1 - add r3, r2, #0 - str r2, [sp, #8] - bl sub_02075FB4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r4, #0x20] - add r1, sp, #0x10 - mov r2, #0x2c - mov r3, #0x54 - bl sub_02007C34 - str r0, [r4, #0x24] - add sp, #0x20 - pop {r4, pc} - thumb_func_end ov19_021DAA90 - - thumb_func_start ov19_021DAAC4 -ov19_021DAAC4: ; 0x021DAAC4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021DAAD8 - bl sub_02007DC8 - mov r0, #0 - str r0, [r4, #0x24] - pop {r4, pc} -_021DAAD8: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov19_021DAAC4 - - thumb_func_start ov19_021DAADC -ov19_021DAADC: ; 0x021DAADC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DAB3C - mov r0, #0xa - mov r1, #4 - bl sub_0201A778 - str r0, [r5, #4] - cmp r0, #0 - beq _021DAB30 - mov r7, #0 - ldr r6, _021DAB40 ; =0x021E01D8 - add r4, r7, #0 -_021DAAFA: - ldr r1, [r5, #4] - ldr r0, [r5, #8] - add r1, r1, r4 - add r2, r6, #0 - bl sub_0201A8D4 - cmp r7, #3 - ldr r0, [r5, #4] - beq _021DAB14 - add r0, r0, r4 - bl sub_0201A9F4 - b _021DAB1E -_021DAB14: - add r0, r0, r4 - mov r1, #0xc - mov r2, #2 - bl sub_0201AA10 -_021DAB1E: - add r7, r7, #1 - add r6, #8 - add r4, #0x10 - cmp r7, #4 - blt _021DAAFA - ldr r0, [r5, #8] - mov r1, #2 - bl sub_02019448 -_021DAB30: - add r0, r5, #0 - bl ov19_021DAB44 - add r0, r5, #0 - bl ov19_021DAC4C -_021DAB3C: - pop {r3, r4, r5, r6, r7, pc} - nop -_021DAB40: .word 0x021E01D8 - thumb_func_end ov19_021DAADC - - thumb_func_start ov19_021DAB44 -ov19_021DAB44: ; 0x021DAB44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x68 - add r5, r0, #0 - bl sub_0207C944 - str r0, [sp, #0x1c] - mov r0, #2 - bl sub_0207C908 - str r0, [sp, #0x18] - bl sub_0207C920 - add r1, r0, #0 - mov r0, #0x60 - str r0, [sp] - mov r3, #0xa - str r3, [sp, #4] - ldr r0, [sp, #0x1c] - mov r2, #1 - lsl r3, r3, #5 - bl sub_02006E84 - mov r0, #0 - mov r6, #0x5e - str r0, [sp, #0x14] - lsl r6, r6, #4 - mov r7, #0x18 - add r4, r5, #0 -_021DAB7C: - add r0, sp, #0x44 - bl sub_020A818C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - lsl r0, r6, #5 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, sp, #0x44 - str r0, [sp, #0x10] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - mov r2, #1 - mov r3, #0 - bl sub_02006F28 - ldr r0, [r5, #0x14] - bl ov19_021D77D0 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r3, [r5, #0x38] - add r0, sp, #0x20 - add r1, sp, #0x44 - bl ov19_021D783C - mov r0, #0x2e - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - add r1, sp, #0x20 - add r2, r7, #0 - mov r3, #0xb0 - bl ov19_021D785C - str r0, [r4, #0x3c] - cmp r0, #0 - bne _021DABDA - bl sub_02022974 -_021DABDA: - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_02021CAC - ldr r0, [sp, #0x14] - add r6, #8 - add r0, r0, #1 - add r7, #0x24 - add r4, r4, #4 - str r0, [sp, #0x14] - cmp r0, #2 - blo _021DAB7C - add r0, sp, #0x44 - bl sub_020A818C - mov r3, #0 - mov r0, #0xb9 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - lsl r0, r0, #8 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, sp, #0x44 - str r0, [sp, #0x10] - mov r0, #0x12 - mov r1, #0xf - bl sub_02006F00 - ldr r0, [r5, #0x14] - bl ov19_021D77D0 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r3, [r5, #0x2c] - add r0, sp, #0x20 - add r1, sp, #0x44 - bl ov19_021D783C - mov r0, #0x2f - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - add r1, sp, #0x20 - mov r2, #0x38 - mov r3, #0xb0 - bl ov19_021D785C - str r0, [r5, #0x30] - add sp, #0x68 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DAB44 - - thumb_func_start ov19_021DAC4C -ov19_021DAC4C: ; 0x021DAC4C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x4c] - cmp r0, #0 - bne _021DAC8A - mov r0, #0xa - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - beq _021DAC86 - ldr r0, [r5, #0x10] - bl ov19_021D5E70 - ldrb r0, [r0, #0xf] - cmp r0, #0 - beq _021DAC72 - mov r0, #4 - b _021DAC74 -_021DAC72: - mov r0, #0 -_021DAC74: - strh r0, [r4] - ldr r0, _021DAC8C ; =ov19_021DACF8 - str r5, [r4, #8] - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - str r0, [r5, #0x4c] - pop {r3, r4, r5, pc} -_021DAC86: - bl sub_02022974 -_021DAC8A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DAC8C: .word ov19_021DACF8 - thumb_func_end ov19_021DAC4C - - thumb_func_start ov19_021DAC90 -ov19_021DAC90: ; 0x021DAC90 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x4c] - cmp r0, #0 - beq _021DACAC - bl sub_0201CED0 - bl sub_020181C4 - ldr r0, [r4, #0x4c] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x4c] -_021DACAC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DAC90 - - thumb_func_start ov19_021DACB0 -ov19_021DACB0: ; 0x021DACB0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x4c] - bl sub_0201CED0 - add r4, r0, #0 - beq _021DACD8 - ldr r0, [r5, #0x10] - bl ov19_021D5E70 - ldrb r0, [r0, #0xf] - cmp r0, #0 - beq _021DACCE - mov r0, #4 - b _021DACD0 -_021DACCE: - mov r0, #0 -_021DACD0: - strh r0, [r4] - add r0, r5, #0 - bl ov19_021DAE10 -_021DACD8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DACB0 - - thumb_func_start ov19_021DACDC -ov19_021DACDC: ; 0x021DACDC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x4c] - bl sub_0201CED0 - cmp r0, #0 - beq _021DACF4 - mov r1, #4 - strh r1, [r0] - add r0, r4, #0 - bl ov19_021DAE10 -_021DACF4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DACDC - - thumb_func_start ov19_021DACF8 -ov19_021DACF8: ; 0x021DACF8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r0, [r4] - ldr r5, [r4, #8] - cmp r0, #4 - bhi _021DADC8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DAD10: ; jump table - .short _021DAD1A - _021DAD10 - 2 ; case 0 - .short _021DAD2C - _021DAD10 - 2 ; case 1 - .short _021DAD4C - _021DAD10 - 2 ; case 2 - .short _021DAD76 - _021DAD10 - 2 ; case 3 - .short _021DADC8 - _021DAD10 - 2 ; case 4 -_021DAD1A: - ldr r0, [r5, #0x10] - bl ov19_021D5E4C - cmp r0, #0 - beq _021DADC8 - mov r0, #0 - strh r0, [r4, #2] - mov r0, #1 - strh r0, [r4] -_021DAD2C: - ldr r0, [r5, #4] - ldrh r2, [r4, #2] - add r0, #0x30 - add r1, r5, #0 - mov r3, #0 - bl ov19_021DAE60 - ldr r0, [r5, #4] - add r0, #0x30 - bl sub_0201ACCC - mov r0, #0 - strh r0, [r4, #4] - mov r0, #2 - strh r0, [r4] - pop {r3, r4, r5, pc} -_021DAD4C: - ldr r0, [r5, #0x10] - bl ov19_021D5E70 - ldrb r0, [r0, #0xf] - cmp r0, #0 - bne _021DADC8 - ldrh r0, [r4, #4] - add r0, r0, #1 - strh r0, [r4, #4] - ldrh r0, [r4, #4] - cmp r0, #0x50 - bls _021DADC8 - add r0, r4, #0 - bl ov19_021DAE2C - mov r0, #0 - strh r0, [r4, #4] - strh r0, [r4, #6] - mov r0, #3 - strh r0, [r4] - pop {r3, r4, r5, pc} -_021DAD76: - ldrh r0, [r4, #6] - mov r1, #1 - lsl r1, r1, #0xe - add r0, r0, #4 - strh r0, [r4, #6] - add r0, r5, #0 - bl ov19_021DADCC - ldr r0, [r5, #4] - mov r1, #0 - add r0, #0x30 - mov r2, #4 - add r3, r1, #0 - bl sub_0201C04C - ldr r0, [r5, #4] - add r0, #0x30 - bl sub_0201ACCC - ldrh r0, [r4, #6] - cmp r0, #0x10 - blo _021DADC8 - ldrh r0, [r4, #2] - cmp r0, #1 - bne _021DADAE - add r0, r5, #0 - bl ov19_021DAE10 -_021DADAE: - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - ldrh r0, [r4, #2] - cmp r0, #4 - blo _021DADBE - mov r0, #0 - strh r0, [r4, #2] -_021DADBE: - mov r0, #0 - strh r0, [r4, #6] - strh r0, [r4, #4] - mov r0, #2 - strh r0, [r4] -_021DADC8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DACF8 - - thumb_func_start ov19_021DADCC -ov19_021DADCC: ; 0x021DADCC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r7, r1, #0 - mov r4, #0 -_021DADD6: - ldr r0, [r5, #0x3c] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - ldr r0, [sp, #4] - sub r0, r0, r7 - str r0, [sp, #4] - ldr r0, [r5, #0x3c] - bl sub_02021C50 - cmp r4, #0 - bne _021DAE02 - ldr r0, [r5, #0x3c] - bl sub_02021D34 -_021DAE02: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021DADD6 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DADCC - - thumb_func_start ov19_021DAE10 -ov19_021DAE10: ; 0x021DAE10 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DAE18: - ldr r0, [r5, #0x3c] - add r1, r6, #0 - bl sub_02021CAC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021DAE18 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DAE10 - - thumb_func_start ov19_021DAE2C -ov19_021DAE2C: ; 0x021DAE2C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - mov r1, #0 - ldr r4, [r0, #4] - add r4, #0x30 - add r0, r4, #0 - bl sub_0201ADA4 - ldrh r2, [r5, #2] - ldr r1, [r5, #8] - add r0, r4, #0 - mov r3, #0 - bl ov19_021DAE60 - ldrh r0, [r5, #2] - add r2, r0, #1 - cmp r2, #4 - blo _021DAE54 - mov r2, #0 -_021DAE54: - ldr r1, [r5, #8] - add r0, r4, #0 - mov r3, #1 - bl ov19_021DAE60 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DAE2C - - thumb_func_start ov19_021DAE60 -ov19_021DAE60: ; 0x021DAE60 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r4, r1, #0 - lsl r5, r3, #4 - cmp r2, #3 - bls _021DAE6E - b _021DAF8E -_021DAE6E: - add r1, r2, r2 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DAE7A: ; jump table - .short _021DAE82 - _021DAE7A - 2 ; case 0 - .short _021DAE94 - _021DAE7A - 2 ; case 1 - .short _021DAE88 - _021DAE7A - 2 ; case 2 - .short _021DAE8E - _021DAE7A - 2 ; case 3 -_021DAE82: - ldr r1, [r4, #0x10] - ldr r2, [r1, #0x68] - b _021DAF7A -_021DAE88: - ldr r1, [r4, #0x10] - ldr r2, [r1, #0x6c] - b _021DAF7A -_021DAE8E: - ldr r1, [r4, #0x10] - ldr r2, [r1, #0x70] - b _021DAF7A -_021DAE94: - bl sub_0207C944 - ldr r0, [r4, #0x10] - add r0, #0x58 - ldrb r0, [r0] - bl sub_0207C908 - bl sub_0207C944 - add r6, r0, #0 - ldr r0, [r4, #0x10] - add r0, #0x58 - ldrb r0, [r0] - bl sub_0207C908 - mov r2, #0 - add r1, r0, #0 - mov r3, #0x2f - str r2, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - add r0, r6, #0 - lsl r3, r3, #0xa - bl sub_02006EC0 - ldr r0, [r4, #0x3c] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0x10 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r5, #0xb0 - str r0, [r3, #0] - lsl r0, r5, #0xc - str r0, [sp, #0x14] - ldr r0, [r4, #0x3c] - add r1, r2, #0 - bl sub_02021C50 - ldr r0, [r4, #0x10] - add r0, #0x58 - ldrb r0, [r0] - bl sub_0207C92C - add r1, r0, #0 - ldr r0, [r4, #0x3c] - add r1, #0xa - bl sub_02021E90 - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_02021CAC - ldr r1, [r4, #0x10] - add r0, r1, #0 - add r0, #0x59 - add r1, #0x58 - ldrb r5, [r0] - ldrb r0, [r1] - cmp r0, r5 - beq _021DAF6E - bl sub_0207C944 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0207C908 - mov r2, #0 - add r1, r0, #0 - mov r3, #0xbd - str r2, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - add r0, r6, #0 - lsl r3, r3, #8 - bl sub_02006EC0 - mov r0, #9 - ldr r1, [sp, #0x10] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r0, [r4, #0x40] - add r1, sp, #0x10 - bl sub_02021C50 - ldr r0, [r4, #0x10] - add r0, #0x59 - ldrb r0, [r0] - bl sub_0207C92C - add r1, r0, #0 - ldr r0, [r4, #0x40] - add r1, #0xa - bl sub_02021E90 - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02021CAC - add sp, #0x1c - pop {r3, r4, r5, r6, pc} -_021DAF6E: - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_02021CAC - add sp, #0x1c - pop {r3, r4, r5, r6, pc} -_021DAF7A: - str r5, [sp] - mov r1, #0xff - str r1, [sp, #4] - ldr r1, _021DAF94 ; =0x00090600 - str r1, [sp, #8] - mov r1, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C -_021DAF8E: - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - nop -_021DAF94: .word 0x00090600 - thumb_func_end ov19_021DAE60 - - thumb_func_start ov19_021DAF98 -ov19_021DAF98: ; 0x021DAF98 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021DAFF6 - ldr r0, [r4, #4] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0xf - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0xf - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, [r4, #0x10] - bl ov19_021D5E4C - cmp r0, #0 - beq _021DAFD8 - add r0, r4, #0 - bl ov19_021DB0E4 -_021DAFD8: - ldr r0, [r4, #4] - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x10 - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x20 - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x30 - bl sub_0201ACCC -_021DAFF6: - pop {r4, pc} - thumb_func_end ov19_021DAF98 - - thumb_func_start ov19_021DAFF8 -ov19_021DAFF8: ; 0x021DAFF8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021DB074 - ldr r0, [r4, #4] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0xf - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0xf - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021DB036 - bl sub_02007DC8 - mov r0, #0 - str r0, [r4, #0x24] -_021DB036: - ldr r0, [r4, #0x10] - bl ov19_021D5E4C - cmp r0, #0 - beq _021DB048 - add r0, r4, #0 - bl ov19_021DB0E4 - b _021DB050 -_021DB048: - add r0, r4, #0 - mov r1, #0 - bl ov19_021DB24C -_021DB050: - ldr r0, [r4, #4] - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x10 - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x20 - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x30 - bl sub_0201ACCC - add r0, r4, #0 - bl ov19_021DACB0 -_021DB074: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DAFF8 - - thumb_func_start ov19_021DB078 -ov19_021DB078: ; 0x021DB078 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021DB0E2 - ldr r0, [r4, #4] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0xf - add r0, #0x10 - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0xf - add r0, #0x20 - bl sub_0201ADA4 - ldr r0, [r4, #4] - mov r1, #0 - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021DB0B6 - bl sub_02007DC8 - mov r0, #0 - str r0, [r4, #0x24] -_021DB0B6: - add r0, r4, #0 - mov r1, #0 - bl ov19_021DB24C - ldr r0, [r4, #4] - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x10 - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x20 - bl sub_0201ACCC - ldr r0, [r4, #4] - add r0, #0x30 - bl sub_0201ACCC - add r0, r4, #0 - bl ov19_021DACDC -_021DB0E2: - pop {r4, pc} - thumb_func_end ov19_021DB078 - - thumb_func_start ov19_021DB0E4 -ov19_021DB0E4: ; 0x021DB0E4 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0x10] - bl ov19_021D5E70 - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB20C ; =0x0009060F - mov r3, #2 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r4, #0x18] - bl sub_0201D78C - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB210 ; =0x0001020F - mov r3, #2 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r4, #0x14] - add r0, #0x20 - bl sub_0201D78C - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB210 ; =0x0001020F - mov r3, #2 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r4, #0x14] - add r0, #0x20 - bl sub_0201D78C - ldrb r0, [r4, #0xe] - cmp r0, #0 - beq _021DB14A - cmp r0, #1 - beq _021DB166 - b _021DB180 -_021DB14A: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB214 ; =0x0007080F - mov r3, #0x46 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r5, #0x44] - add r0, #0x20 - bl sub_0201D78C - b _021DB180 -_021DB166: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB218 ; =0x0003040F - mov r3, #0x46 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r5, #0x48] - add r0, #0x20 - bl sub_0201D78C -_021DB180: - ldrb r0, [r4, #0xf] - cmp r0, #0 - bne _021DB1DA - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB21C ; =0x00090600 - add r3, r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r4, #0x1c] - add r0, #0x30 - bl sub_0201D78C - ldrh r2, [r4, #8] - cmp r2, #0 - beq _021DB1BE - mov r1, #2 - str r1, [sp] - ldr r0, [r5, #4] - mov r3, #3 - add r0, #0x10 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - bl sub_0200C648 -_021DB1BE: - mov r1, #1 - str r1, [sp] - ldr r0, [r5, #4] - mov r3, #3 - add r0, #0x20 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - ldrb r2, [r4, #0xa] - ldr r0, [r5, #0x1c] - bl sub_0200C648 -_021DB1DA: - ldr r1, [r4, #0] - add r0, sp, #0x10 - mov r2, #2 - mov r3, #0 - bl sub_02075F0C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r5, #0x20] - add r1, sp, #0x10 - mov r2, #0x2c - mov r3, #0x54 - bl sub_02007C34 - str r0, [r5, #0x24] - ldrb r1, [r4, #0xb] - add r0, r5, #0 - bl ov19_021DB24C - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_021DB20C: .word 0x0009060F -_021DB210: .word 0x0001020F -_021DB214: .word 0x0007080F -_021DB218: .word 0x0003040F -_021DB21C: .word 0x00090600 - thumb_func_end ov19_021DB0E4 - - thumb_func_start ov19_021DB220 -ov19_021DB220: ; 0x021DB220 - mov r0, #1 - bx lr - thumb_func_end ov19_021DB220 - - thumb_func_start ov19_021DB224 -ov19_021DB224: ; 0x021DB224 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021DB248 - ldr r0, [r4, #0x10] - bl ov19_021D5E4C - cmp r0, #0 - beq _021DB248 - ldr r0, [r4, #0x10] - bl ov19_021D5E70 - add r1, r0, #0 - ldrb r1, [r1, #0xb] - add r0, r4, #0 - bl ov19_021DB24C -_021DB248: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB224 - - thumb_func_start ov19_021DB24C -ov19_021DB24C: ; 0x021DB24C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp, #4] - add r4, r1, #0 - ldr r0, [r0, #8] - mov r1, #2 - bl sub_02019FE4 - mov ip, r0 - add r2, r0, #0 - mov r0, #1 - ldr r6, _021DB2AC ; =0x000004C8 - mov r1, #0 - lsl r7, r0, #0xd -_021DB268: - add r3, r0, #0 - lsl r3, r1 - tst r3, r4 - beq _021DB27A - add r3, r1, #0 - add r3, #0x98 - orr r3, r7 - strh r3, [r2, r6] - b _021DB288 -_021DB27A: - add r5, r1, #0 - mov r3, #2 - add r5, #0x84 - lsl r3, r3, #0xc - orr r5, r3 - ldr r3, _021DB2AC ; =0x000004C8 - strh r5, [r2, r3] -_021DB288: - add r1, r1, #1 - add r2, r2, #2 - cmp r1, #6 - blt _021DB268 - mov r2, #0x99 - lsl r2, r2, #2 - ldr r0, [sp, #4] - str r2, [sp] - lsl r3, r2, #1 - mov r2, ip - add r2, r2, r3 - ldr r0, [r0, #8] - mov r1, #2 - mov r3, #0xc - bl sub_02019460 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB2AC: .word 0x000004C8 - thumb_func_end ov19_021DB24C - - thumb_func_start ov19_021DB2B0 -ov19_021DB2B0: ; 0x021DB2B0 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DB2F4 - ldr r0, [r5, #0x10] - bl ov19_021D5E70 - add r4, r0, #0 - ldr r0, [r5, #4] - mov r1, #0 - add r0, #0x30 - bl sub_0201ADA4 - ldrb r0, [r4, #0xf] - cmp r0, #0 - bne _021DB2EE - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB2F8 ; =0x00090600 - add r3, r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r4, #0x1c] - add r0, #0x30 - bl sub_0201D78C -_021DB2EE: - add r0, r5, #0 - bl ov19_021DACB0 -_021DB2F4: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DB2F8: .word 0x00090600 - thumb_func_end ov19_021DB2B0 - - thumb_func_start ov19_021DB2FC -ov19_021DB2FC: ; 0x021DB2FC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - str r1, [r4, #0xc] - str r3, [r4, #0] - str r2, [r4, #8] - ldr r0, [sp, #0x18] - mov r1, #0x1a - str r0, [r4, #0x2c] - ldr r0, [sp, #0x1c] - mov r2, #0x12 - str r0, [r4, #0x20] - ldr r0, [sp, #0x14] - mov r3, #0xa - str r0, [r4, #0x10] - mov r0, #0 - bl sub_0200B144 - str r0, [r4, #0x14] - mov r0, #0x40 - mov r1, #0xa - bl sub_02023790 - str r0, [r4, #0x30] - mov r0, #0x40 - mov r1, #0xa - bl sub_02023790 - str r0, [r4, #0x34] - mov r0, #0 - strh r0, [r4, #0x1c] - strh r0, [r4, #0x1e] - str r0, [r4, #0x18] - mov r0, #0xa - str r0, [sp] - add r3, r4, #0 - ldr r0, [sp, #0x20] - mov r1, #0x19 - mov r2, #1 - add r3, #0x28 - bl sub_020071B4 - str r0, [r4, #0x24] - cmp r0, #0 - beq _021DB362 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _021DB362 - ldr r0, [r4, #0x34] - cmp r0, #0 - bne _021DB368 -_021DB362: - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_021DB368: - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB2FC - - thumb_func_start ov19_021DB370 -ov19_021DB370: ; 0x021DB370 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - cmp r0, #0 - beq _021DB3C0 - mov r6, #0 - add r4, r6, #0 -_021DB37E: - ldr r0, [r5, #0x18] - add r0, r0, r4 - bl sub_0201A8FC - add r6, r6, #1 - add r4, #0x10 - cmp r6, #2 - blt _021DB37E - ldr r0, [r5, #0x24] - cmp r0, #0 - beq _021DB398 - bl sub_020181C4 -_021DB398: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021DB3A2 - bl sub_0200B190 -_021DB3A2: - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021DB3AC - bl sub_020237BC -_021DB3AC: - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DB3B6 - bl sub_020237BC -_021DB3B6: - ldr r0, [r5, #0x18] - bl sub_020181C4 - mov r0, #0 - str r0, [r5, #0x18] -_021DB3C0: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB370 - - thumb_func_start ov19_021DB3C4 -ov19_021DB3C4: ; 0x021DB3C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r0, #0 - mov r0, #0xa - mov r1, #2 - bl sub_0201A778 - str r0, [r6, #0x18] - cmp r0, #0 - beq _021DB3F4 - mov r7, #0 - ldr r4, _021DB440 ; =0x021E01F8 - add r5, r7, #0 -_021DB3DE: - ldr r1, [r6, #0x18] - ldr r0, [r6, #0] - add r1, r1, r5 - add r2, r4, #0 - bl sub_0201A8D4 - add r7, r7, #1 - add r4, #8 - add r5, #0x10 - cmp r7, #2 - blt _021DB3DE -_021DB3F4: - mov r0, #2 - lsl r0, r0, #8 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - str r1, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r6, #0] - mov r0, #0x26 - mov r3, #1 - bl sub_02006E3C - mov r0, #0x20 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0x26 - mov r1, #0x18 - mov r2, #0 - mov r3, #0xe0 - bl sub_02006E84 - ldr r0, [r6, #0x20] - ldr r2, _021DB444 ; =0x00000209 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - ldr r0, [r6, #0] - mov r1, #1 - mov r3, #8 - bl sub_0200DD0C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DB440: .word 0x021E01F8 -_021DB444: .word 0x00000209 - thumb_func_end ov19_021DB3C4 - - thumb_func_start ov19_021DB448 -ov19_021DB448: ; 0x021DB448 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r4, r1, #0 - bl sub_0201A9F4 - ldr r3, [r5, #0x18] - ldrb r0, [r3, #7] - str r0, [sp] - ldrb r0, [r3, #8] - str r0, [sp, #4] - ldrb r1, [r3, #4] - ldrb r2, [r3, #5] - ldrb r3, [r3, #6] - ldr r0, [r5, #0] - bl ov19_021DB4B4 - ldr r0, [r5, #0x18] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x30] - add r1, r4, #0 - bl sub_0200B1B8 - ldr r0, [r5, #0x2c] - ldr r1, [r5, #0x34] - ldr r2, [r5, #0x30] - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r3, [sp, #8] - ldr r0, [r5, #0x18] - ldr r2, [r5, #0x34] - mov r1, #1 - bl sub_0201D738 - ldr r0, [r5, #0x18] - bl sub_0201ACCC - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02019448 - mov r0, #1 - strh r0, [r5, #0x1c] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB448 - - thumb_func_start ov19_021DB4B4 -ov19_021DB4B4: ; 0x021DB4B4 - push {r3, r4, r5, r6, r7, lr} - lsl r1, r1, #0x18 - add r7, r3, #0 - lsr r1, r1, #0x18 - add r6, r2, #0 - ldr r4, [sp, #0x18] - ldr r5, [sp, #0x1c] - bl sub_02019FE4 - sub r1, r7, #1 - sub r2, r6, #2 - lsl r1, r1, #5 - add r1, r2, r1 - lsl r3, r1, #1 - ldr r2, _021DB558 ; =0x00008209 - add r1, r0, r3 - strh r2, [r0, r3] - add r0, r2, #1 - mov r2, #0 - strh r0, [r1, #2] - cmp r4, #0 - bls _021DB4EE - ldr r0, _021DB55C ; =0x0000820B - add r3, r1, #0 -_021DB4E4: - add r2, r2, #1 - strh r0, [r3, #4] - add r3, r3, #2 - cmp r2, r4 - blo _021DB4E4 -_021DB4EE: - lsl r0, r4, #1 - add r2, r1, r0 - ldr r3, _021DB560 ; =0x0000820C - mov ip, r0 - strh r3, [r2, #4] - add r0, r3, #1 - strh r0, [r2, #6] - add r0, r3, #2 - strh r0, [r2, #8] - add r1, #0x40 - mov r3, #0 - cmp r5, #0 - bls _021DB52A - mov r0, ip - add r2, r0, r1 - ldr r0, _021DB564 ; =0x0000820F - add r7, r0, #1 -_021DB510: - strh r0, [r1] - strh r7, [r1, #2] - ldr r6, _021DB568 ; =0x00008212 - add r3, r3, #1 - strh r6, [r2, #4] - add r6, r6, #1 - strh r6, [r2, #6] - ldr r6, _021DB56C ; =0x00008214 - add r1, #0x40 - strh r6, [r2, #8] - add r2, #0x40 - cmp r3, r5 - blo _021DB510 -_021DB52A: - ldr r0, _021DB570 ; =0x00008215 - mov r3, #0 - strh r0, [r1] - add r0, r0, #1 - strh r0, [r1, #2] - cmp r4, #0 - bls _021DB546 - ldr r0, _021DB574 ; =0x00008217 - add r2, r1, #0 -_021DB53C: - add r3, r3, #1 - strh r0, [r2, #4] - add r2, r2, #2 - cmp r3, r4 - blo _021DB53C -_021DB546: - mov r0, ip - ldr r2, _021DB578 ; =0x00008218 - add r1, r1, r0 - strh r2, [r1, #4] - add r0, r2, #1 - strh r0, [r1, #6] - add r0, r2, #2 - strh r0, [r1, #8] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB558: .word 0x00008209 -_021DB55C: .word 0x0000820B -_021DB560: .word 0x0000820C -_021DB564: .word 0x0000820F -_021DB568: .word 0x00008212 -_021DB56C: .word 0x00008214 -_021DB570: .word 0x00008215 -_021DB574: .word 0x00008217 -_021DB578: .word 0x00008218 - thumb_func_end ov19_021DB4B4 - - thumb_func_start ov19_021DB57C -ov19_021DB57C: ; 0x021DB57C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldrh r0, [r5, #0x1e] - str r1, [sp, #0x10] - cmp r0, #0 - beq _021DB594 - ldr r1, [r5, #0x18] - ldr r0, [r5, #0] - add r1, #0x10 - bl ov19_021DB84C -_021DB594: - ldr r0, [r5, #0x18] - mov r1, #0xf - str r0, [sp, #0x14] - add r0, #0x10 - str r0, [sp, #0x14] - bl sub_0201ADA4 - ldr r0, [sp, #0x10] - mov r6, #0 - add r0, #0x21 - ldrb r1, [r0] - mov r0, #8 - sub r0, r0, r1 - lsl r7, r0, #4 - cmp r1, #0 - bls _021DB608 - ldr r4, [sp, #0x10] -_021DB5B6: - ldr r3, [r4, #0] - cmp r3, #0x38 - blt _021DB5D2 - cmp r3, #0x3d - bgt _021DB5D2 - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x14] - add r2, #0x22 - ldrb r2, [r2] - add r0, r5, #0 - sub r3, #0x38 - bl ov19_021DB638 - b _021DB5F8 -_021DB5D2: - add r3, #0x18 - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x30] - add r1, r3, #0 - bl sub_0200B1B8 - str r7, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DB634 ; =0x000B0C0F - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - ldr r2, [r5, #0x30] - mov r3, #0xa - bl sub_0201D78C -_021DB5F8: - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r0, #0x21 - ldrb r0, [r0] - add r7, #0x10 - add r4, r4, #4 - cmp r6, r0 - blo _021DB5B6 -_021DB608: - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl ov19_021DB748 - ldr r1, [sp, #0x10] - add r0, r5, #0 - add r1, #0x21 - str r1, [sp, #0x10] - ldrb r1, [r1] - bl ov19_021DB684 - ldr r0, [sp, #0x14] - bl sub_0201ACCC - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02019448 - mov r0, #1 - strh r0, [r5, #0x1e] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB634: .word 0x000B0C0F - thumb_func_end ov19_021DB57C - - thumb_func_start ov19_021DB638 -ov19_021DB638: ; 0x021DB638 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #1 - lsl r0, r3 - tst r0, r2 - beq _021DB64A - mov r4, #0 - b _021DB64C -_021DB64A: - mov r4, #8 -_021DB64C: - mov r0, #0x30 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - lsl r0, r3, #4 - add r0, r0, #4 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0xc] - mov r0, #8 - str r0, [sp, #0x10] - lsl r2, r3, #0x13 - str r0, [sp, #0x14] - mov r0, #0xff - str r0, [sp, #0x18] - add r0, r1, #0 - ldr r1, [r5, #0x28] - lsl r3, r4, #0x10 - ldr r1, [r1, #0x14] - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE08 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB638 - - thumb_func_start ov19_021DB684 -ov19_021DB684: ; 0x021DB684 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #8] - add r5, r1, #0 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02019FE4 - mov r2, #8 - sub r2, r2, r5 - mov ip, r2 - add r0, #0xe6 - lsl r2, r2, #7 - add r2, r0, r2 - ldr r1, _021DB6EC ; =0x00000251 - mov r3, #0x18 - mov r0, ip - mul r3, r0 - add r4, r1, r3 - mov r6, #0 - lsl r7, r5, #1 - beq _021DB6D0 - mov r0, #1 - lsl r0, r0, #0xe -_021DB6B4: - mov r3, #0 - add r5, r2, #0 -_021DB6B8: - add r1, r4, #0 - orr r1, r0 - strh r1, [r5] - add r3, r3, #1 - add r4, r4, #1 - add r5, r5, #2 - cmp r3, #0xc - blo _021DB6B8 - add r6, r6, #1 - add r2, #0x40 - cmp r6, r7 - blo _021DB6B4 -_021DB6D0: - mov r0, #0xc - str r0, [sp] - mov r3, ip - lsl r3, r3, #1 - ldr r0, [sp, #8] - str r7, [sp, #4] - ldr r0, [r0, #0] - mov r1, #1 - mov r2, #0x13 - add r3, r3, #3 - bl ov19_021DB7BC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB6EC: .word 0x00000251 - thumb_func_end ov19_021DB684 - - thumb_func_start ov19_021DB6F0 -ov19_021DB6F0: ; 0x021DB6F0 - push {r4, lr} - add r4, r0, #0 - ldrh r0, [r4, #0x1c] - cmp r0, #0 - beq _021DB706 - ldr r0, [r4, #0] - ldr r1, [r4, #0x18] - bl ov19_021DB898 - mov r0, #0 - strh r0, [r4, #0x1c] -_021DB706: - ldrh r0, [r4, #0x1e] - cmp r0, #0 - beq _021DB71A - ldr r1, [r4, #0x18] - ldr r0, [r4, #0] - add r1, #0x10 - bl ov19_021DB84C - mov r0, #0 - strh r0, [r4, #0x1e] -_021DB71A: - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02019448 - pop {r4, pc} - thumb_func_end ov19_021DB6F0 - - thumb_func_start ov19_021DB724 -ov19_021DB724: ; 0x021DB724 - push {r4, lr} - add r4, r0, #0 - ldrh r0, [r4, #0x1e] - cmp r0, #0 - beq _021DB73C - ldr r1, [r4, #0x18] - ldr r0, [r4, #0] - add r1, #0x10 - bl ov19_021DB84C - mov r0, #0 - strh r0, [r4, #0x1e] -_021DB73C: - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02019448 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB724 - - thumb_func_start ov19_021DB748 -ov19_021DB748: ; 0x021DB748 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r1, #0 - ldr r4, [r0, #0x18] - add r0, r6, #0 - add r0, #0x21 - ldrb r1, [r0] - mov r0, #8 - add r4, #0x10 - sub r0, r0, r1 - lsl r5, r0, #4 - mov r0, #0xa - str r0, [sp] - lsl r0, r1, #0x14 - lsr r0, r0, #0x10 - lsl r3, r5, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0xf - mov r2, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - add r6, #0x20 - ldrb r2, [r6] - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #4 - add r2, r5, r2 - bl sub_02002180 - add r0, r4, #0 - bl sub_0201ACCC - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DB748 - - thumb_func_start ov19_021DB790 -ov19_021DB790: ; 0x021DB790 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r4, [r6, #0x18] - add r7, r1, #0 - add r4, #0x10 - mov r5, #0 -_021DB79C: - add r2, r7, #0 - add r2, #0x22 - ldrb r2, [r2] - add r0, r6, #0 - add r1, r4, #0 - add r3, r5, #0 - bl ov19_021DB638 - add r5, r5, #1 - cmp r5, #6 - blt _021DB79C - add r0, r4, #0 - bl sub_0201ACCC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DB790 - - thumb_func_start ov19_021DB7BC -ov19_021DB7BC: ; 0x021DB7BC - push {r3, r4, r5, r6, r7, lr} - lsl r1, r1, #0x18 - add r7, r3, #0 - lsr r1, r1, #0x18 - add r6, r2, #0 - ldr r5, [sp, #0x18] - ldr r4, [sp, #0x1c] - bl sub_02019FE4 - sub r1, r7, #1 - sub r2, r6, #1 - lsl r1, r1, #5 - add r1, r2, r1 - mov r2, #0x72 - lsl r3, r1, #1 - lsl r2, r2, #8 - strh r2, [r0, r3] - add r1, r0, r3 - mov r2, #0 - cmp r5, #0 - bls _021DB7F4 - ldr r0, _021DB838 ; =0x00007201 - add r3, r1, #0 -_021DB7EA: - add r2, r2, #1 - strh r0, [r3, #2] - add r3, r3, #2 - cmp r2, r5 - blo _021DB7EA -_021DB7F4: - lsl r0, r5, #1 - add r2, r1, r0 - ldr r3, _021DB83C ; =0x00007202 - add r1, #0x40 - mov r7, #0 - strh r3, [r2, #2] - cmp r4, #0 - bls _021DB818 - ldr r2, _021DB840 ; =0x00007205 - add r6, r0, r1 - add r3, r3, #1 -_021DB80A: - strh r3, [r1] - strh r2, [r6, #2] - add r7, r7, #1 - add r6, #0x40 - add r1, #0x40 - cmp r7, r4 - blo _021DB80A -_021DB818: - ldr r2, _021DB844 ; =0x00007206 - mov r4, #0 - strh r2, [r1] - cmp r5, #0 - bls _021DB830 - add r3, r1, #0 - add r2, r2, #1 -_021DB826: - add r4, r4, #1 - strh r2, [r3, #2] - add r3, r3, #2 - cmp r4, r5 - blo _021DB826 -_021DB830: - ldr r2, _021DB848 ; =0x00007208 - add r0, r1, r0 - strh r2, [r0, #2] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB838: .word 0x00007201 -_021DB83C: .word 0x00007202 -_021DB840: .word 0x00007205 -_021DB844: .word 0x00007206 -_021DB848: .word 0x00007208 - thumb_func_end ov19_021DB7BC - - thumb_func_start ov19_021DB84C -ov19_021DB84C: ; 0x021DB84C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldrb r1, [r4, #4] - bl sub_02019FE4 - ldrb r1, [r4, #5] - mov r5, #0 - sub r2, r1, #1 - ldrb r1, [r4, #6] - sub r1, r1, #1 - lsl r1, r1, #5 - add r1, r2, r1 - lsl r1, r1, #1 - add r2, r0, r1 - ldrb r0, [r4, #8] - add r0, r0, #2 - beq _021DB896 - add r0, r5, #0 - add r1, r5, #0 -_021DB872: - ldrb r6, [r4, #7] - add r3, r1, #0 - add r6, r6, #2 - beq _021DB88A - add r6, r2, #0 -_021DB87C: - strh r0, [r6] - ldrb r7, [r4, #7] - add r3, r3, #1 - add r6, r6, #2 - add r7, r7, #2 - cmp r3, r7 - blo _021DB87C -_021DB88A: - ldrb r3, [r4, #8] - add r5, r5, #1 - add r2, #0x40 - add r3, r3, #2 - cmp r5, r3 - blo _021DB872 -_021DB896: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DB84C - - thumb_func_start ov19_021DB898 -ov19_021DB898: ; 0x021DB898 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldrb r1, [r4, #4] - bl sub_02019FE4 - ldrb r1, [r4, #5] - mov r5, #0 - sub r2, r1, #2 - ldrb r1, [r4, #6] - sub r1, r1, #1 - lsl r1, r1, #5 - add r1, r2, r1 - lsl r1, r1, #1 - add r2, r0, r1 - ldrb r0, [r4, #8] - add r0, r0, #2 - beq _021DB8E2 - add r0, r5, #0 - add r1, r5, #0 -_021DB8BE: - ldrb r6, [r4, #7] - add r3, r1, #0 - add r6, r6, #5 - beq _021DB8D6 - add r6, r2, #0 -_021DB8C8: - strh r0, [r6] - ldrb r7, [r4, #7] - add r3, r3, #1 - add r6, r6, #2 - add r7, r7, #5 - cmp r3, r7 - blo _021DB8C8 -_021DB8D6: - ldrb r3, [r4, #8] - add r5, r5, #1 - add r2, #0x40 - add r3, r3, #2 - cmp r5, r3 - blo _021DB8BE -_021DB8E2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DB898 - - thumb_func_start ov19_021DB8E4 -ov19_021DB8E4: ; 0x021DB8E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - str r1, [r5, #0] - ldr r0, [sp, #0x34] - str r3, [r5, #4] - str r0, [sp, #0x34] - str r2, [r5, #0xc] - ldr r0, [sp, #0x30] - mov r4, #1 - str r0, [r5, #8] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r2, r3, #0 - str r4, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r0, [sp, #0x34] - mov r1, #4 - add r3, r4, #0 - bl sub_020070E8 - ldr r0, [sp, #0x34] - mov r1, #0x1b - add r2, sp, #0x14 - mov r3, #0xa - bl sub_020071EC - add r4, r0, #0 - ldr r0, [sp, #0x14] - add r1, r5, #0 - ldr r0, [r0, #0xc] - add r1, #0xe4 - mov r2, #0x40 - bl sub_020C4B18 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x34] - mov r1, #0x14 - add r2, sp, #0x14 - mov r3, #0xa - bl sub_020071EC - add r4, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0x49 - lsl r1, r1, #2 - ldr r0, [r0, #0xc] - add r1, r5, r1 - mov r2, #0x20 - bl sub_020C4B18 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - mov r1, #0x2a - mov r4, #1 - str r0, [sp, #0x10] - add r0, #0xe4 - lsl r1, r1, #4 - lsl r4, r4, #0x10 - mov r7, #7 - str r0, [sp, #0x10] - add r6, r0, r1 -_021DB96C: - asr r0, r4, #0xc - str r0, [sp] - ldr r0, [sp, #0x10] - ldr r3, _021DBA88 ; =0x00007FFF - add r1, r6, #0 - mov r2, #0x30 - bl ov19_021D78C8 - ldr r0, _021DBA8C ; =0x00002492 - sub r7, r7, #1 - sub r4, r4, r0 - sub r6, #0x60 - cmp r7, #1 - bge _021DB96C - add r0, r5, #0 - mov r1, #3 - add r0, #0xe4 - lsl r1, r1, #8 - bl sub_020C2C54 - mov r0, #0xe1 - lsl r0, r0, #2 - mov r1, #0x1a - add r0, r5, r0 - lsl r1, r1, #4 - mov r2, #0x60 - bl sub_020C0160 - add r0, r5, #0 - mov r1, #0x1a - add r0, #0xe4 - lsl r1, r1, #4 - mov r2, #0x60 - bl sub_020C01B8 - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x34] - mov r1, #0x11 - mov r2, #1 - add r3, #0x18 - bl sub_020071B4 - str r0, [r5, #0x14] - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x34] - mov r1, #0x12 - mov r2, #1 - add r3, #0x20 - bl sub_02007204 - str r0, [r5, #0x1c] - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x34] - mov r1, #2 - mov r2, #1 - add r3, #0x38 - bl sub_020071D0 - str r0, [r5, #0x34] - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x34] - mov r1, #3 - mov r2, #1 - add r3, #0x30 - bl sub_020071D0 - str r0, [r5, #0x2c] - mov r0, #2 - mov r1, #0xd - mov r2, #4 - mov r3, #0xa - bl sub_0200C440 - str r0, [r5, #0x44] - mov r0, #0x7d - lsl r0, r0, #2 - mov r1, #0xa - bl sub_02023790 - ldr r1, _021DBA90 ; =0x00004BFC - ldr r2, _021DBA94 ; =0x00000187 - str r0, [r5, r1] - mov r0, #0 - str r0, [r5, #0x10] - ldr r0, [r5, #0x18] - mov r1, #0x20 - ldr r0, [r0, #0x14] - mov r3, #0xa - str r0, [r5, #0x3c] - add r0, r5, #0 - add r0, #0x40 - strh r1, [r0] - add r0, r5, #0 - add r0, #0x42 - strh r1, [r0] - mov r0, #1 - mov r1, #0x1a - bl sub_0200B144 - ldr r1, _021DBA98 ; =0x00004BF8 - add r2, r5, #0 - str r0, [r5, r1] - mov r1, #0 - add r0, r1, #0 -_021DBA4C: - add r1, r1, #1 - str r0, [r2, #0x48] - add r2, r2, #4 - cmp r1, #0x12 - blt _021DBA4C - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021DBA7C - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _021DBA7C - ldr r0, [r5, #0x2c] - cmp r0, #0 - beq _021DBA7C - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DBA7C - ldr r0, [r5, #0x44] - cmp r0, #0 - beq _021DBA7C - ldr r0, _021DBA90 ; =0x00004BFC - ldr r0, [r5, r0] - cmp r0, #0 - bne _021DBA82 -_021DBA7C: - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DBA82: - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DBA88: .word 0x00007FFF -_021DBA8C: .word 0x00002492 -_021DBA90: .word 0x00004BFC -_021DBA94: .word 0x00000187 -_021DBA98: .word 0x00004BF8 - thumb_func_end ov19_021DB8E4 - - thumb_func_start ov19_021DBA9C -ov19_021DBA9C: ; 0x021DBA9C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0xa - mov r1, #3 - bl sub_0201A778 - str r0, [r7, #0x10] - cmp r0, #0 - beq _021DBACA - mov r6, #0 - ldr r4, _021DBACC ; =0x021E0210 - add r5, r6, #0 -_021DBAB4: - ldr r1, [r7, #0x10] - ldr r0, [r7, #4] - add r1, r1, r5 - add r2, r4, #0 - bl sub_0201A8D4 - add r6, r6, #1 - add r4, #8 - add r5, #0x10 - cmp r6, #3 - blo _021DBAB4 -_021DBACA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DBACC: .word 0x021E0210 - thumb_func_end ov19_021DBA9C - - thumb_func_start ov19_021DBAD0 -ov19_021DBAD0: ; 0x021DBAD0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _021DBB40 ; =0x00004BF8 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021DBAE0 - bl sub_0200B190 -_021DBAE0: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021DBAEA - bl sub_020181C4 -_021DBAEA: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _021DBAF4 - bl sub_020181C4 -_021DBAF4: - ldr r0, [r5, #0x2c] - cmp r0, #0 - beq _021DBAFE - bl sub_020181C4 -_021DBAFE: - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DBB08 - bl sub_020181C4 -_021DBB08: - ldr r0, [r5, #0x44] - cmp r0, #0 - beq _021DBB12 - bl sub_0200C560 -_021DBB12: - ldr r0, _021DBB44 ; =0x00004BFC - ldr r0, [r5, r0] - cmp r0, #0 - beq _021DBB1E - bl sub_020237BC -_021DBB1E: - ldr r0, [r5, #0x10] - cmp r0, #0 - beq _021DBB3E - mov r6, #0 - add r4, r6, #0 -_021DBB28: - ldr r0, [r5, #0x10] - add r0, r0, r4 - bl sub_0201A8FC - add r6, r6, #1 - add r4, #0x10 - cmp r6, #3 - blt _021DBB28 - ldr r0, [r5, #0x10] - bl sub_020181C4 -_021DBB3E: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DBB40: .word 0x00004BF8 -_021DBB44: .word 0x00004BFC - thumb_func_end ov19_021DBAD0 - - thumb_func_start ov19_021DBB48 -ov19_021DBB48: ; 0x021DBB48 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl ov19_021D5EA8 - add r1, r4, #0 - add r1, #0xe0 - str r0, [r1, #0] - add r0, r4, #0 - bl ov19_021DBDF4 - add r0, r4, #0 - mov r1, #0 - bl ov19_021DC034 - pop {r4, pc} - thumb_func_end ov19_021DBB48 - - thumb_func_start ov19_021DBB68 -ov19_021DBB68: ; 0x021DBB68 - ldr r3, _021DBB6C ; =ov19_021DC090 - bx r3 - ; .align 2, 0 -_021DBB6C: .word ov19_021DC090 - thumb_func_end ov19_021DBB68 - - thumb_func_start ov19_021DBB70 -ov19_021DBB70: ; 0x021DBB70 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl ov19_021D5EA8 - add r1, r4, #0 - add r1, #0xe0 - str r0, [r1, #0] - add r0, r4, #0 - bl ov19_021DBF18 - add r0, r4, #0 - bl ov19_021DBF4C - add r0, r4, #0 - bl ov19_021DBFC4 - pop {r4, pc} - thumb_func_end ov19_021DBB70 - - thumb_func_start ov19_021DBB94 -ov19_021DBB94: ; 0x021DBB94 - ldr r3, _021DBB9C ; =ov19_021DC034 - mov r1, #1 - bx r3 - nop -_021DBB9C: .word ov19_021DC034 - thumb_func_end ov19_021DBB94 - - thumb_func_start ov19_021DBBA0 -ov19_021DBBA0: ; 0x021DBBA0 - ldr r3, _021DBBA4 ; =ov19_021DC090 - bx r3 - ; .align 2, 0 -_021DBBA4: .word ov19_021DC090 - thumb_func_end ov19_021DBBA0 - - thumb_func_start ov19_021DBBA8 -ov19_021DBBA8: ; 0x021DBBA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r0, [sp, #8] - ldr r0, [r0, #0xc] - str r1, [sp, #0xc] - str r2, [sp, #0x10] - str r3, [sp, #0x14] - bl ov19_021D5E90 - ldr r1, [sp, #0xc] - str r0, [sp, #0x28] - bl sub_02079AA8 - cmp r0, #0x18 - blt _021DBBC8 - sub r0, #8 -_021DBBC8: - add r0, #0xd0 - mov r1, #0xc - lsl r0, r0, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #8] - mov r1, #9 - add r0, #0x3c - mov r2, #0xa - mov r3, #0xe - bl sub_0201A6D0 - mov r4, #0 - mov r0, #0xb - str r4, [sp, #0x20] - str r0, [sp, #0x18] -_021DBBEA: - mov r0, #0 - str r0, [sp, #0x24] - ldr r0, [sp, #8] - mov r6, #0xa - str r0, [sp, #0x2c] - add r0, #0x3c - str r0, [sp, #0x2c] - ldr r0, [sp, #0x18] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x30] -_021DBC00: - ldr r0, [sp, #0x28] - ldr r1, [sp, #0xc] - add r2, r4, #0 - bl sub_02079C9C - add r4, r4, #1 - add r5, r0, #0 - bl sub_02073D20 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - add r7, r0, #0 - beq _021DBC7E - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _021DBC50 - add r0, r5, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - add r0, r7, #0 - mov r2, #0x1b - bl sub_020759CC - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - b _021DBC60 -_021DBC50: - ldr r0, _021DBD2C ; =0x000001EA - cmp r7, r0 - beq _021DBC5A - mov r0, #8 - b _021DBC5C -_021DBC5A: - mov r0, #1 -_021DBC5C: - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 -_021DBC60: - ldr r0, _021DBD30 ; =0x021E0228 - ldr r2, [sp, #0x30] - ldrb r0, [r0, r1] - mov r3, #2 - add r0, #0xe0 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - mov r0, #2 - str r0, [sp] - str r1, [sp, #4] - lsl r1, r6, #0x10 - ldr r0, [sp, #0x2c] - lsr r1, r1, #0x10 - bl sub_0201A6D0 -_021DBC7E: - ldr r1, [sp, #0x1c] - add r0, r5, #0 - bl sub_02073D48 - ldr r0, [sp, #0x24] - add r6, r6, #2 - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, #6 - blo _021DBC00 - ldr r0, [sp, #0x18] - add r0, r0, #2 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #5 - blo _021DBBEA - ldr r0, [sp, #0x48] - cmp r0, #0 - beq _021DBCE8 - ldr r0, [sp, #0x14] - cmp r0, #1 - beq _021DBCB4 - cmp r0, #2 - beq _021DBCC6 - b _021DBCD4 -_021DBCB4: - mov r0, #1 - lsl r0, r0, #0x1a - ldr r1, [r0, #0] - ldr r0, _021DBD34 ; =0x00300010 - and r1, r0 - ldr r0, [sp, #8] - ldr r0, [r0, #0x18] - str r1, [r0, #8] - b _021DBCD4 -_021DBCC6: - ldr r0, _021DBD38 ; =0x04001000 - ldr r1, [r0, #0] - ldr r0, _021DBD34 ; =0x00300010 - and r1, r0 - ldr r0, [sp, #8] - ldr r0, [r0, #0x18] - str r1, [r0, #8] -_021DBCD4: - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - ldr r0, [r0, #0x18] - ldr r2, [sp, #0x14] - ldr r3, [sp, #0x48] - lsl r1, r1, #5 - bl sub_020A8224 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} -_021DBCE8: - ldr r0, [sp, #8] - ldr r1, [r0, #0x18] - ldr r0, [r1, #0x14] - ldr r1, [r1, #0x10] - bl sub_020C2C54 - ldr r0, [sp, #0x14] - cmp r0, #1 - beq _021DBD02 - cmp r0, #2 - beq _021DBD16 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} -_021DBD02: - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - ldr r2, [r0, #0x18] - lsl r1, r1, #5 - ldr r0, [r2, #0x14] - ldr r2, [r2, #0x10] - bl sub_020C02BC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} -_021DBD16: - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - ldr r2, [r0, #0x18] - lsl r1, r1, #5 - ldr r0, [r2, #0x14] - ldr r2, [r2, #0x10] - bl sub_020C0314 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_021DBD2C: .word 0x000001EA -_021DBD30: .word 0x021E0228 -_021DBD34: .word 0x00300010 -_021DBD38: .word 0x04001000 - thumb_func_end ov19_021DBBA8 - - thumb_func_start ov19_021DBD3C -ov19_021DBD3C: ; 0x021DBD3C - ldr r0, [r0, #0x20] - bx lr - thumb_func_end ov19_021DBD3C - - thumb_func_start ov19_021DBD40 -ov19_021DBD40: ; 0x021DBD40 - add r0, #0xe0 - ldr r0, [r0, #0] - sub r0, r0, #3 - bpl _021DBD4A - add r0, #0x12 -_021DBD4A: - bx lr - thumb_func_end ov19_021DBD40 - - thumb_func_start ov19_021DBD4C -ov19_021DBD4C: ; 0x021DBD4C - push {r3, r4} - mov r4, #0 - ldr r1, _021DBD64 ; =0x00004BE4 - add r3, r4, #0 -_021DBD54: - add r2, r0, r4 - add r4, r4, #1 - strb r3, [r2, r1] - cmp r4, #0x12 - blt _021DBD54 - pop {r3, r4} - bx lr - nop -_021DBD64: .word 0x00004BE4 - thumb_func_end ov19_021DBD4C - - thumb_func_start ov19_021DBD68 -ov19_021DBD68: ; 0x021DBD68 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - mov r2, #0xf9 - add r4, r1, #0 - lsl r2, r2, #2 - add r3, r5, r2 - lsl r1, r4, #0xa - ldr r0, [r0, #0x14] - add r1, r3, r1 - add r2, #0x1c - bl sub_020C4B68 - mov r1, #0xf9 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, #0x1c - bl sub_020C2C54 - ldr r0, _021DBD98 ; =0x00004BE4 - mov r2, #1 - add r1, r5, r4 - strb r2, [r1, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DBD98: .word 0x00004BE4 - thumb_func_end ov19_021DBD68 - - thumb_func_start ov19_021DBD9C -ov19_021DBD9C: ; 0x021DBD9C - push {r4, r5, r6, lr} - sub sp, #0x28 - add r5, r0, #0 - mov r0, #0x63 - lsl r1, r1, #5 - lsl r0, r0, #4 - add r6, r1, r0 - add r4, r2, #0 - ldr r0, _021DBDF0 ; =0x00004BE4 - add r1, r5, r4 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _021DBDCC - mov r2, #0xf9 - lsl r2, r2, #2 - add r1, r5, r2 - lsl r0, r4, #0xa - add r0, r1, r0 - lsl r1, r6, #5 - add r2, #0x1c - bl sub_020C02BC - add sp, #0x28 - pop {r4, r5, r6, pc} -_021DBDCC: - add r0, sp, #4 - bl sub_020A818C - add r0, sp, #4 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #1 - bl ov19_021DBBA8 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DBD68 - add sp, #0x28 - pop {r4, r5, r6, pc} - nop -_021DBDF0: .word 0x00004BE4 - thumb_func_end ov19_021DBD9C - - thumb_func_start ov19_021DBDF4 -ov19_021DBDF4: ; 0x021DBDF4 - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - add r6, r0, #0 - bl ov19_021DBD4C - ldr r0, [r6, #0] - bl ov19_021D77D8 - add r4, r0, #0 - ldr r0, [r6, #0] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r4, #4] - mov r1, #0 - str r0, [sp] - str r1, [sp, #4] - ldr r3, [r6, #0x20] - add r0, sp, #0x40 - bl ov19_021D783C - add r0, r6, #0 - bl ov19_021DBD40 - add r7, r0, #0 - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0x63 - lsl r0, r0, #4 - str r0, [sp, #8] - add r4, r6, #0 - mov r5, #0x20 -_021DBE34: - add r0, sp, #0x1c - bl sub_020A818C - add r0, sp, #0x1c - str r0, [sp] - ldr r2, [sp, #8] - add r0, r6, #0 - add r1, r7, #0 - mov r3, #1 - bl ov19_021DBBA8 - add r0, sp, #0x1c - str r0, [sp, #0x40] - mov r0, #0xb - str r0, [sp] - mov r0, #1 - mov r2, #2 - str r0, [sp, #4] - lsl r2, r2, #8 - ldr r0, [r6, #8] - add r1, sp, #0x40 - lsr r3, r2, #1 - bl ov19_021D785C - str r0, [r4, #0x48] - cmp r0, #0 - bne _021DBE6E - bl sub_02022974 -_021DBE6E: - ldr r0, [r4, #0x48] - mov r1, #0 - bl sub_02021CAC - cmp r5, #0 - ble _021DBE8C - lsl r0, r5, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021DBE9A -_021DBE8C: - lsl r0, r5, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021DBE9A: - bl sub_020E1740 - str r0, [sp, #0x10] - mov r0, #0x16 - lsl r0, r0, #0xe - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #0x48] - add r1, sp, #0x10 - bl sub_02021C50 - add r0, r6, #0 - add r1, r7, #0 - bl ov19_021DBD68 - add r7, r7, #1 - cmp r7, #0x12 - blt _021DBEC2 - mov r7, #0 -_021DBEC2: - ldr r0, [sp, #8] - add r4, r4, #4 - add r0, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r5, #0x20 - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #7 - blt _021DBE34 - mov r4, #0 - add r5, r6, #0 -_021DBEDA: - ldr r0, [r6, #0xc] - bl ov19_021D5E90 - add r1, r4, #0 - bl sub_02079B54 - add r1, r5, #0 - add r1, #0x94 - add r4, r4, #1 - add r5, r5, #4 - str r0, [r1, #0] - cmp r4, #0x12 - blt _021DBEDA - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov19_021DBDF4 - - thumb_func_start ov19_021DBEF8 -ov19_021DBEF8: ; 0x021DBEF8 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DBF00: - ldr r0, [r5, #0x48] - cmp r0, #0 - beq _021DBF0C - bl sub_02021BD4 - str r6, [r5, #0x48] -_021DBF0C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - blt _021DBF00 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DBEF8 - - thumb_func_start ov19_021DBF18 -ov19_021DBF18: ; 0x021DBF18 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl ov19_021DBD40 - add r4, r0, #0 - mov r6, #0 - add r5, r7, #0 -_021DBF26: - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov19_021DBD9C - ldr r0, [r5, #0x48] - mov r1, #1 - bl sub_02021CAC - add r4, r4, #1 - cmp r4, #0x12 - blt _021DBF40 - mov r4, #0 -_021DBF40: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #7 - blt _021DBF26 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DBF18 - - thumb_func_start ov19_021DBF4C -ov19_021DBF4C: ; 0x021DBF4C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl ov19_021D5E90 - add r1, r5, #0 - ldr r2, _021DBFA8 ; =0x00004BFC - add r1, #0xe0 - ldr r1, [r1, #0] - ldr r2, [r5, r2] - ldr r4, [r5, #0x10] - bl sub_02079AF4 - ldr r1, _021DBFA8 ; =0x00004BFC - mov r0, #0 - ldr r1, [r5, r1] - add r2, r0, #0 - bl sub_02002D7C - add r6, r0, #0 - add r0, r4, #0 - mov r1, #7 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DBFAC ; =0x00020807 - ldr r2, _021DBFA8 ; =0x00004BFC - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r5, r2] - lsr r5, r6, #1 - mov r3, #0x30 - add r0, r4, #0 - sub r3, r3, r5 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201ACCC - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021DBFA8: .word 0x00004BFC -_021DBFAC: .word 0x00020807 - thumb_func_end ov19_021DBF4C - - thumb_func_start ov19_021DBFB0 -ov19_021DBFB0: ; 0x021DBFB0 - push {r4, lr} - ldr r4, [r0, #0x10] - mov r1, #7 - add r0, r4, #0 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201ACCC - pop {r4, pc} - thumb_func_end ov19_021DBFB0 - - thumb_func_start ov19_021DBFC4 -ov19_021DBFC4: ; 0x021DBFC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - ldr r0, [r7, #0x10] - mov r1, #4 - str r0, [sp, #0xc] - add r0, #0x10 - str r0, [sp, #0xc] - bl sub_0201ADA4 - add r0, r7, #0 - bl ov19_021DBD40 - mov r6, #0 - add r4, r0, #0 - add r5, r6, #0 -_021DBFE4: - ldr r0, [sp, #0xc] - lsl r1, r4, #2 - str r0, [sp] - add r1, r7, r1 - str r5, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r1, #0x94 - mov r2, #2 - ldr r0, [r7, #0x44] - ldr r1, [r1, #0] - add r3, r2, #0 - bl sub_0200C5BC - add r4, r4, #1 - cmp r4, #0x12 - blt _021DC008 - mov r4, #0 -_021DC008: - add r6, r6, #1 - add r5, #0x20 - cmp r6, #7 - blt _021DBFE4 - ldr r0, [sp, #0xc] - bl sub_0201ACCC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DBFC4 - - thumb_func_start ov19_021DC01C -ov19_021DC01C: ; 0x021DC01C - push {r4, lr} - ldr r4, [r0, #0x10] - mov r1, #4 - add r4, #0x10 - add r0, r4, #0 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201ACCC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DC01C - - thumb_func_start ov19_021DC034 -ov19_021DC034: ; 0x021DC034 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0xa - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - beq _021DC06E - ldr r0, _021DC070 ; =0x021E0208 - lsl r1, r6, #2 - ldr r0, [r0, r1] - str r5, [r4, #0] - mov r2, #0 - strb r2, [r4, #4] - add r1, r4, #0 - strb r2, [r4, #5] - bl sub_0200D9E8 - add r1, r5, #0 - add r1, #0xdc - add r5, #0xdc - str r0, [r1, #0] - ldr r0, [r5, #0] - cmp r0, #0 - bne _021DC06E - add r0, r4, #0 - bl sub_020181C4 -_021DC06E: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DC070: .word 0x021E0208 - thumb_func_end ov19_021DC034 - - thumb_func_start ov19_021DC074 -ov19_021DC074: ; 0x021DC074 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0] - mov r2, #0 - add r0, #0xdc - str r2, [r0, #0] - add r0, r1, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DC074 - - thumb_func_start ov19_021DC090 -ov19_021DC090: ; 0x021DC090 - add r0, #0xdc - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DC09C - mov r0, #1 - bx lr -_021DC09C: - mov r0, #0 - bx lr - thumb_func_end ov19_021DC090 - - thumb_func_start ov19_021DC0A0 -ov19_021DC0A0: ; 0x021DC0A0 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r4, r1, #0 - ldrb r2, [r4, #4] - ldr r5, [r4, #0] - cmp r2, #3 - bls _021DC0B0 - b _021DC1C6 -_021DC0B0: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DC0BC: ; jump table - .short _021DC0C4 - _021DC0BC - 2 ; case 0 - .short _021DC14A - _021DC0BC - 2 ; case 1 - .short _021DC170 - _021DC0BC - 2 ; case 2 - .short _021DC1C2 - _021DC0BC - 2 ; case 3 -_021DC0C4: - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - ldrb r0, [r4, #5] - lsl r1, r0, #1 - cmp r1, #0xa - bge _021DC11A - mov r1, #0xa - sub r1, r1, r0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #0x20 - str r1, [sp, #4] - str r0, [sp, #8] - ldr r2, [r5, #0x30] - ldr r0, [r5, #4] - mov r1, #1 - add r2, #0xc - mov r3, #0 - bl sub_020198C0 - ldrb r6, [r4, #5] - mov r0, #0x20 - mov r3, #0xa - str r0, [sp] - str r6, [sp, #4] - ldr r1, [r5, #0x30] - mov r2, #0 - add r1, #0xc - str r1, [sp, #8] - sub r1, r3, r6 - lsl r1, r1, #0x18 - str r2, [sp, #0xc] - lsr r1, r1, #0x18 - str r1, [sp, #0x10] - str r0, [sp, #0x14] - str r3, [sp, #0x18] - ldr r0, [r5, #4] - mov r1, #1 - bl sub_020198E8 - b _021DC13A -_021DC11A: - mov r0, #5 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - ldr r2, [r5, #0x30] - ldr r0, [r5, #4] - mov r1, #1 - add r2, #0xc - mov r3, #0 - bl sub_020198C0 - ldrb r0, [r4, #4] - add r0, r0, #1 - strb r0, [r4, #4] -_021DC13A: - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02019448 - mov r0, #7 - add sp, #0x1c - strb r0, [r4, #5] - pop {r3, r4, r5, r6, pc} -_021DC14A: - ldrb r0, [r4, #5] - add r3, r5, #0 - mov r2, #0x60 - add r1, r0, #0 - add r3, #0xe4 - mul r1, r2 - add r0, r3, r1 - mov r1, #0x1a - lsl r1, r1, #4 - bl sub_020C0160 - add r0, r5, #0 - bl ov19_021DBF18 - ldrb r0, [r4, #4] - add sp, #0x1c - add r0, r0, #1 - strb r0, [r4, #4] - pop {r3, r4, r5, r6, pc} -_021DC170: - ldrb r0, [r4, #5] - cmp r0, #0 - beq _021DC17A - sub r0, r0, #1 - strb r0, [r4, #5] -_021DC17A: - ldrb r0, [r4, #5] - add r3, r5, #0 - mov r2, #0x60 - add r1, r0, #0 - add r3, #0xe4 - mul r1, r2 - add r0, r3, r1 - mov r1, #0x1a - lsl r1, r1, #4 - bl sub_020C0160 - ldrb r0, [r4, #5] - cmp r0, #0 - bne _021DC1C6 - ldr r0, [r5, #0x10] - bl sub_0201A9F4 - ldr r0, [r5, #0x10] - add r0, #0x10 - bl sub_0201A9F4 - add r0, r5, #0 - bl ov19_021DBF4C - add r0, r5, #0 - bl ov19_021DBFC4 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02019448 - ldrb r0, [r4, #4] - add sp, #0x1c - add r0, r0, #1 - strb r0, [r4, #4] - pop {r3, r4, r5, r6, pc} -_021DC1C2: - bl ov19_021DC074 -_021DC1C6: - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DC0A0 - - thumb_func_start ov19_021DC1CC -ov19_021DC1CC: ; 0x021DC1CC - push {r4, r5, lr} - sub sp, #0x1c - add r5, r1, #0 - ldrb r2, [r5, #4] - ldr r4, [r5, #0] - cmp r2, #0 - beq _021DC1E6 - cmp r2, #1 - beq _021DC202 - cmp r2, #2 - beq _021DC294 - add sp, #0x1c - pop {r4, r5, pc} -_021DC1E6: - add r0, r4, #0 - bl ov19_021DBEF8 - add r0, r4, #0 - bl ov19_021DBFB0 - add r0, r4, #0 - bl ov19_021DC01C - ldrb r0, [r5, #4] - add sp, #0x1c - add r0, r0, #1 - strb r0, [r5, #4] - pop {r4, r5, pc} -_021DC202: - mov r0, #5 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - mov r2, #0 - ldr r0, [r4, #4] - mov r1, #1 - add r3, r2, #0 - bl sub_02019CB8 - ldrb r0, [r5, #5] - add r0, r0, #1 - strb r0, [r5, #5] - ldrb r0, [r5, #5] - lsl r1, r0, #1 - cmp r1, #0xa - bge _021DC282 - add r1, r0, #5 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #0x20 - str r1, [sp, #4] - mov r1, #5 - sub r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r2, [r4, #0x30] - ldr r0, [r4, #4] - mov r1, #1 - add r2, #0xc - mov r3, #0 - bl sub_020198C0 - ldrb r1, [r5, #5] - mov r2, #5 - mov r0, #0x20 - sub r2, r2, r1 - lsl r2, r2, #0x18 - mov r3, #0xa - sub r1, r3, r1 - lsl r1, r1, #0x18 - str r0, [sp] - lsr r2, r2, #0x18 - str r2, [sp, #4] - ldr r2, [r4, #0x30] - lsr r1, r1, #0x18 - add r2, #0xc - str r2, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - str r1, [sp, #0x10] - str r0, [sp, #0x14] - str r3, [sp, #0x18] - ldr r0, [r4, #4] - mov r1, #1 - bl sub_020198E8 - b _021DC288 -_021DC282: - ldrb r0, [r5, #4] - add r0, r0, #1 - strb r0, [r5, #4] -_021DC288: - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02019448 - add sp, #0x1c - pop {r4, r5, pc} -_021DC294: - bl ov19_021DC074 - add sp, #0x1c - pop {r4, r5, pc} - thumb_func_end ov19_021DC1CC - - thumb_func_start ov19_021DC29C -ov19_021DC29C: ; 0x021DC29C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0xa - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - beq _021DC350 - ldr r0, [r5, #0xc] - bl ov19_021D5F88 - add r6, r0, #0 - ldr r0, [r5, #4] - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r0, #0x18 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - ldr r2, [r5, #0x38] - ldr r0, [r5, #4] - mov r1, #1 - add r2, #0xc - mov r3, #0 - bl sub_020198C0 - ldr r0, [r5, #0x10] - mov r1, #4 - add r0, #0x20 - bl sub_0201ADA4 - ldr r2, _021DC354 ; =0x00004BF8 - add r1, r6, #0 - ldr r0, [r5, r2] - add r2, r2, #4 - ldr r2, [r5, r2] - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DC358 ; =0x00020104 - ldr r2, _021DC35C ; =0x00004BFC - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0x10] - ldr r2, [r5, r2] - add r0, #0x20 - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [r5, #0x10] - add r0, #0x20 - bl sub_0201A954 - add r0, r5, #0 - add r1, r6, #0 - bl ov19_021DC4F8 - mov r1, #0 - strh r1, [r4, #0x16] - str r5, [r4, #0] - ldr r0, [r5, #4] - str r0, [r4, #4] - str r1, [r4, #8] - mov r1, #0xe - lsl r1, r1, #0xe - str r1, [r4, #0xc] - ldr r0, [r4, #8] - sub r0, r1, r0 - mov r1, #6 - bl sub_020E1F6C - str r0, [r4, #0x10] - mov r0, #6 - strh r0, [r4, #0x14] - ldr r0, _021DC360 ; =ov19_021DC37C - add r1, r4, #0 - mov r2, #0 - bl ov19_021D77C8 - add r5, #0xdc - str r0, [r5, #0] -_021DC350: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DC354: .word 0x00004BF8 -_021DC358: .word 0x00020104 -_021DC35C: .word 0x00004BFC -_021DC360: .word ov19_021DC37C - thumb_func_end ov19_021DC29C - - thumb_func_start ov19_021DC364 -ov19_021DC364: ; 0x021DC364 - add r0, #0xdc - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DC370 - mov r0, #1 - bx lr -_021DC370: - mov r0, #0 - bx lr - thumb_func_end ov19_021DC364 - - thumb_func_start ov19_021DC374 -ov19_021DC374: ; 0x021DC374 - mov r1, #0 - add r0, #0xdc - str r1, [r0, #0] - bx lr - thumb_func_end ov19_021DC374 - - thumb_func_start ov19_021DC37C -ov19_021DC37C: ; 0x021DC37C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #0x16] - cmp r0, #0 - beq _021DC38E - cmp r0, #1 - beq _021DC394 - pop {r3, r4, r5, pc} -_021DC38E: - add r0, r0, #1 - strh r0, [r4, #0x16] - pop {r3, r4, r5, pc} -_021DC394: - ldrh r0, [r4, #0x14] - cmp r0, #0 - beq _021DC3C2 - sub r0, r0, #1 - strh r0, [r4, #0x14] - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - mov r2, #3 - add r3, r1, r0 - str r3, [r4, #8] - ldr r0, [r4, #4] - mov r1, #1 - asr r3, r3, #0xc - bl sub_02019184 - mov r1, #0xe - ldr r2, [r4, #8] - lsl r1, r1, #0x10 - ldr r0, [r4, #0] - sub r1, r1, r2 - bl ov19_021DC5B8 - pop {r3, r4, r5, pc} -_021DC3C2: - ldr r3, [r4, #0xc] - ldr r0, [r4, #4] - mov r1, #1 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - mov r1, #0xe - ldr r2, [r4, #0xc] - lsl r1, r1, #0x10 - ldr r0, [r4, #0] - sub r1, r1, r2 - bl ov19_021DC5B8 - ldr r1, _021DC3F0 ; =ov19_021DC374 - ldr r2, [r4, #0] - add r0, r4, #0 - bl ov19_021D79B8 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DC3F0: .word ov19_021DC374 - thumb_func_end ov19_021DC37C - - thumb_func_start ov19_021DC3F4 -ov19_021DC3F4: ; 0x021DC3F4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xa - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - beq _021DC434 - mov r1, #0 - strh r1, [r4, #0x16] - str r5, [r4, #0] - ldr r0, [r5, #4] - str r0, [r4, #4] - mov r0, #0xe - lsl r0, r0, #0xe - str r0, [r4, #8] - str r1, [r4, #0xc] - ldr r0, [r4, #8] - sub r0, r1, r0 - mov r1, #6 - bl sub_020E1F6C - str r0, [r4, #0x10] - mov r0, #6 - strh r0, [r4, #0x14] - ldr r0, _021DC438 ; =ov19_021DC46C - add r1, r4, #0 - mov r2, #0 - bl ov19_021D77C8 - add r5, #0xdc - str r0, [r5, #0] -_021DC434: - pop {r3, r4, r5, pc} - nop -_021DC438: .word ov19_021DC46C - thumb_func_end ov19_021DC3F4 - - thumb_func_start ov19_021DC43C -ov19_021DC43C: ; 0x021DC43C - push {r4, lr} - add r4, r0, #0 - add r0, #0xdc - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DC45E - ldr r0, [r4, #4] - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - bl ov19_021DC5E0 - mov r0, #1 - pop {r4, pc} -_021DC45E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DC43C - - thumb_func_start ov19_021DC464 -ov19_021DC464: ; 0x021DC464 - mov r1, #0 - add r0, #0xdc - str r1, [r0, #0] - bx lr - thumb_func_end ov19_021DC464 - - thumb_func_start ov19_021DC46C -ov19_021DC46C: ; 0x021DC46C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #0x14] - cmp r0, #0 - beq _021DC4A4 - sub r0, r0, #1 - strh r0, [r4, #0x14] - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - mov r2, #3 - add r3, r1, r0 - str r3, [r4, #8] - ldr r0, [r4, #4] - mov r1, #1 - asr r3, r3, #0xc - bl sub_02019184 - mov r1, #0xe - ldr r2, [r4, #8] - lsl r1, r1, #0x10 - ldr r0, [r4, #0] - sub r1, r1, r2 - bl ov19_021DC5B8 - add sp, #0x10 - pop {r3, r4, r5, pc} -_021DC4A4: - ldr r3, [r4, #0xc] - ldr r0, [r4, #4] - mov r1, #1 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - mov r1, #0xe - ldr r2, [r4, #0xc] - lsl r1, r1, #0x10 - ldr r0, [r4, #0] - sub r1, r1, r2 - bl ov19_021DC5B8 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r0, [r4, #4] - mov r1, #1 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02019448 - ldr r1, _021DC4F4 ; =ov19_021DC464 - ldr r2, [r4, #0] - add r0, r4, #0 - bl ov19_021D79B8 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DC4F4: .word ov19_021DC464 - thumb_func_end ov19_021DC46C - - thumb_func_start ov19_021DC4F8 -ov19_021DC4F8: ; 0x021DC4F8 - push {r3, r4, r5, r6, lr} - sub sp, #0x54 - add r5, r0, #0 - add r4, r1, #0 - beq _021DC5AE - ldr r0, [r5, #0] - bl ov19_021D77D8 - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r6, #0x20] - add r1, sp, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r3, [r6, #0x1c] - add r0, sp, #0x30 - bl ov19_021D783C - add r0, sp, #0xc - bl sub_020A818C - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - mov r1, #1 - bl sub_0207CE78 - add r1, r0, #0 - mov r0, #0xa - str r0, [sp] - mov r0, #0x10 - mov r2, #0 - add r3, sp, #8 - bl sub_02006F50 - add r6, r0, #0 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r1, [r0, #0] - ldr r0, _021DC5B4 ; =0x00300010 - mov r2, #1 - and r1, r0 - ldr r0, [sp, #8] - add r3, sp, #0xc - str r1, [r0, #8] - mov r1, #0xbe - ldr r0, [sp, #8] - lsl r1, r1, #8 - bl sub_020A8224 - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - mov r1, #2 - bl sub_0207CE78 - add r1, r0, #0 - mov r0, #0x20 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0x10 - mov r2, #1 - mov r3, #0xc0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #8] - add r1, sp, #0x30 - mov r2, #0x12 - mov r3, #0xe0 - bl ov19_021D785C - add r1, r5, #0 - add r1, #0x90 - add r5, #0x90 - str r0, [r1, #0] - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DC5A8 - mov r1, #6 - bl sub_02021E90 -_021DC5A8: - add r0, r6, #0 - bl sub_020181C4 -_021DC5AE: - add sp, #0x54 - pop {r3, r4, r5, r6, pc} - nop -_021DC5B4: .word 0x00300010 - thumb_func_end ov19_021DC4F8 - - thumb_func_start ov19_021DC5B8 -ov19_021DC5B8: ; 0x021DC5B8 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r2, #0x90 - ldr r2, [r2, #0] - cmp r2, #0 - beq _021DC5DC - mov r2, #0x12 - lsl r2, r2, #0xc - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - str r2, [sp] - add r0, #0x90 - ldr r0, [r0, #0] - add r1, sp, #0 - bl sub_02021C50 -_021DC5DC: - add sp, #0xc - pop {pc} - thumb_func_end ov19_021DC5B8 - - thumb_func_start ov19_021DC5E0 -ov19_021DC5E0: ; 0x021DC5E0 - push {r3, lr} - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DC5EE - bl sub_02021BD4 -_021DC5EE: - pop {r3, pc} - thumb_func_end ov19_021DC5E0 - - thumb_func_start ov19_021DC5F0 -ov19_021DC5F0: ; 0x021DC5F0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - str r4, [r5, #0] - ldr r0, [sp, #0x18] - str r6, [r5, #0xc] - str r0, [r5, #8] - str r3, [r5, #4] - add r0, r4, #0 - bl ov19_021D77D8 - str r0, [r5, #0x38] - add r0, r4, #0 - bl ov19_021D77E0 - str r0, [r5, #0x10] - add r0, r6, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021DC626 - mov r0, #0xe - str r0, [r5, #0x30] - mov r0, #0 - b _021DC62C -_021DC626: - mov r0, #9 - str r0, [r5, #0x30] - sub r0, #0x31 -_021DC62C: - str r0, [r5, #0x34] - add r0, r5, #0 - mov r1, #0 - add r0, #0x2b - strb r1, [r0] - str r1, [r5, #0x2c] - add r1, r5, #0 - ldr r0, [r5, #0x38] - add r1, #0x3c - mov r2, #6 - bl ov19_021DA3CC - mov r1, #9 - mov r0, #0xa - lsl r1, r1, #6 - bl sub_02018144 - str r0, [r5, #0x1c] - mov r0, #0xa - str r0, [sp] - add r3, r5, #0 - ldr r0, [sp, #0x1c] - mov r1, #6 - mov r2, #1 - add r3, #0x18 - bl sub_020071D0 - str r0, [r5, #0x14] - cmp r0, #0 - beq _021DC66E - ldr r1, [r5, #0x1c] - cmp r1, #0 - bne _021DC674 -_021DC66E: - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021DC674: - add r0, r5, #0 - bl ov19_021DCDB4 - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov19_021DC5F0 - - thumb_func_start ov19_021DC680 -ov19_021DC680: ; 0x021DC680 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021DC68E - bl sub_020181C4 -_021DC68E: - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _021DC698 - bl sub_020181C4 -_021DC698: - add r0, r4, #0 - bl ov19_021DCF50 - pop {r4, pc} - thumb_func_end ov19_021DC680 - - thumb_func_start ov19_021DC6A0 -ov19_021DC6A0: ; 0x021DC6A0 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - mov r2, #0 - add r1, #0x2b - strb r2, [r1] - add r1, r4, #0 - add r1, #0x2b - ldrb r1, [r1] - bl ov19_021DCD64 - add r0, r4, #0 - mov r1, #1 - bl ov19_021DCEB8 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019448 - pop {r4, pc} - thumb_func_end ov19_021DC6A0 - - thumb_func_start ov19_021DC6C8 -ov19_021DC6C8: ; 0x021DC6C8 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl ov19_021DCEB8 - add r0, r4, #0 - mov r1, #0x1a - add r0, #0x2b - strb r1, [r0] - ldr r0, _021DC6F4 ; =ov19_021DC708 - add r1, r4, #0 - mov r2, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021DC6EC - mov r0, #1 - b _021DC6EE -_021DC6EC: - mov r0, #0 -_021DC6EE: - str r0, [r4, #0x2c] - pop {r4, pc} - nop -_021DC6F4: .word ov19_021DC708 - thumb_func_end ov19_021DC6C8 - - thumb_func_start ov19_021DC6F8 -ov19_021DC6F8: ; 0x021DC6F8 - ldr r0, [r0, #0x2c] - cmp r0, #0 - bne _021DC702 - mov r0, #1 - bx lr -_021DC702: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DC6F8 - - thumb_func_start ov19_021DC708 -ov19_021DC708: ; 0x021DC708 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #2 - bls _021DC724 - add r0, r5, #0 - add r0, #0x2b - ldrb r0, [r0] - ldr r4, _021DC764 ; =0xFFFF0000 - sub r1, r0, #2 - b _021DC72A -_021DC724: - lsl r0, r0, #0xf - neg r4, r0 - mov r1, #0 -_021DC72A: - add r0, r5, #0 - add r0, #0x2b - strb r1, [r0] - add r1, r5, #0 - add r1, #0x2b - ldrb r1, [r1] - add r0, r5, #0 - bl ov19_021DCD64 - ldr r0, [r5, #4] - mov r1, #2 - bl sub_02019448 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DCE50 - add r0, r5, #0 - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #0 - bne _021DC760 - mov r0, #0 - str r0, [r5, #0x2c] - add r0, r6, #0 - bl sub_0200DA58 -_021DC760: - pop {r4, r5, r6, pc} - nop -_021DC764: .word 0xFFFF0000 - thumb_func_end ov19_021DC708 - - thumb_func_start ov19_021DC768 -ov19_021DC768: ; 0x021DC768 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DC784 ; =ov19_021DC79C - add r1, r4, #0 - mov r2, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021DC77E - mov r0, #1 - b _021DC780 -_021DC77E: - mov r0, #0 -_021DC780: - str r0, [r4, #0x2c] - pop {r4, pc} - ; .align 2, 0 -_021DC784: .word ov19_021DC79C - thumb_func_end ov19_021DC768 - - thumb_func_start ov19_021DC788 -ov19_021DC788: ; 0x021DC788 - push {r3, lr} - ldr r1, [r0, #0x2c] - cmp r1, #0 - bne _021DC798 - bl ov19_021DCF50 - mov r0, #1 - pop {r3, pc} -_021DC798: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov19_021DC788 - - thumb_func_start ov19_021DC79C -ov19_021DC79C: ; 0x021DC79C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #0x18 - bhs _021DC7BC - add r0, r5, #0 - add r0, #0x2b - ldrb r0, [r0] - mov r4, #1 - lsl r4, r4, #0x10 - add r1, r0, #2 - b _021DC7C2 -_021DC7BC: - mov r1, #0x1a - sub r0, r1, r0 - lsl r4, r0, #0xf -_021DC7C2: - add r0, r5, #0 - add r0, #0x2b - strb r1, [r0] - add r0, r5, #0 - add r0, #0x2b - ldrb r1, [r0] - cmp r1, #2 - bls _021DC7FE - asr r0, r4, #0xc - lsr r0, r0, #3 - sub r1, r1, #2 - sub r1, r1, r0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #0xf - lsl r0, r0, #0x18 - str r1, [sp, #4] - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r3, [r5, #0x30] - ldr r0, [r5, #4] - lsl r3, r3, #0x18 - mov r1, #2 - mov r2, #0 - lsr r3, r3, #0x18 - bl sub_02019CB8 -_021DC7FE: - add r1, r5, #0 - add r1, #0x2b - ldrb r1, [r1] - add r0, r5, #0 - bl ov19_021DCD64 - ldr r0, [r5, #4] - mov r1, #2 - bl sub_02019448 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DCE50 - add r0, r5, #0 - add r0, #0x2b - ldrb r0, [r0] - cmp r0, #0x1a - bne _021DC82E - mov r0, #0 - str r0, [r5, #0x2c] - add r0, r6, #0 - bl sub_0200DA58 -_021DC82E: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DC79C - - thumb_func_start ov19_021DC834 -ov19_021DC834: ; 0x021DC834 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r0, #0 - ldr r0, [r6, #0xc] - ldr r0, [r0, #4] - bl sub_0207A0F8 - add r1, r6, #0 - add r1, #0x28 - ldrb r4, [r1] - cmp r4, r0 - bge _021DC8D8 - sub r0, r0, r4 - str r0, [sp, #8] - cmp r4, #5 - bge _021DC8B0 - mov r0, #0x34 - add r1, r4, #0 - mul r1, r0 - add r0, r6, #0 - str r0, [sp, #0xc] - add r0, #0x3c - str r0, [sp, #0xc] - add r5, r0, r1 - add r7, r6, r1 - ldr r0, _021DC8E0 ; =0x00000418 - lsl r1, r4, #5 - add r0, r1, r0 - str r0, [sp, #4] -_021DC86E: - add r1, r4, #1 - mov r0, #0x34 - mul r0, r1 - ldr r1, [sp, #0xc] - str r0, [sp] - add r0, r1, r0 - add r1, r5, #0 - mov r2, #1 - bl ov19_021DA418 - ldr r2, [sp, #0xc] - ldr r1, [sp] - ldr r0, [r6, #0x38] - add r1, r2, r1 - mov r2, #1 - bl ov19_021DA3CC - ldr r0, [r7, #0x3c] - cmp r0, #0 - beq _021DC8A0 - ldr r0, [r6, #0x38] - ldr r2, [sp, #4] - add r1, r5, #0 - bl ov19_021DA754 -_021DC8A0: - ldr r0, [sp, #4] - add r4, r4, #1 - add r0, #0x20 - add r5, #0x34 - add r7, #0x34 - str r0, [sp, #4] - cmp r4, #5 - blt _021DC86E -_021DC8B0: - add r1, r6, #0 - ldr r0, [sp, #8] - add r1, #0x29 - strb r0, [r1] - add r0, r6, #0 - mov r2, #0 - add r0, #0x2a - strb r2, [r0] - ldr r0, _021DC8E4 ; =ov19_021DC8E8 - add r1, r6, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021DC8D0 - mov r0, #1 - b _021DC8D2 -_021DC8D0: - mov r0, #0 -_021DC8D2: - add sp, #0x10 - str r0, [r6, #0x2c] - pop {r3, r4, r5, r6, r7, pc} -_021DC8D8: - mov r0, #0 - str r0, [r6, #0x2c] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DC8E0: .word 0x00000418 -_021DC8E4: .word ov19_021DC8E8 - thumb_func_end ov19_021DC834 - - thumb_func_start ov19_021DC8E8 -ov19_021DC8E8: ; 0x021DC8E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r1, [sp, #4] - ldr r2, [sp, #4] - str r0, [sp] - add r1, #0x28 - ldr r0, [sp, #4] - add r2, #0x2a - add r0, #0x29 - ldrb r7, [r0] - ldr r0, [sp, #4] - ldrb r1, [r1] - ldrb r3, [r2] - ldr r0, [r0, #0x1c] - lsl r2, r1, #3 - add r3, r3, r2 - mov r2, #0xc - mul r2, r3 - add r4, r0, r2 - mov r6, #0 - cmp r7, #0 - ble _021DC934 - mov r0, #0x34 - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #4] - add r5, r0, r2 -_021DC91E: - ldr r0, [r5, #0x3c] - cmp r0, #0 - beq _021DC92A - add r1, r4, #0 - bl sub_02021C50 -_021DC92A: - add r6, r6, #1 - add r5, #0x34 - add r4, #0x60 - cmp r6, r7 - blt _021DC91E -_021DC934: - ldr r0, [sp, #4] - add r0, #0x2a - ldrb r0, [r0] - add r1, r0, #1 - ldr r0, [sp, #4] - add r0, #0x2a - strb r1, [r0] - ldr r0, [sp, #4] - add r0, #0x2a - ldrb r0, [r0] - cmp r0, #8 - blo _021DC958 - ldr r0, [sp, #4] - mov r1, #0 - str r1, [r0, #0x2c] - ldr r0, [sp] - bl sub_0200DA58 -_021DC958: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DC8E8 - - thumb_func_start ov19_021DC95C -ov19_021DC95C: ; 0x021DC95C - ldr r0, [r0, #0x2c] - cmp r0, #0 - bne _021DC966 - mov r0, #1 - bx lr -_021DC966: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DC95C - - thumb_func_start ov19_021DC96C -ov19_021DC96C: ; 0x021DC96C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0xc] - ldr r0, [r0, #4] - bl sub_0207A0F8 - sub r4, r0, #1 - add r0, r5, #0 - add r0, #0x28 - ldrb r0, [r0] - cmp r0, r4 - bls _021DC9F2 - mov r0, #0x34 - mul r0, r4 - add r0, r5, r0 - ldr r0, [r0, #0x3c] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r1, _021DC9FC ; =0x021E0234 - str r0, [r2, #0] - lsl r0, r4, #2 - ldrh r1, [r1, r0] - ldr r2, [r5, #0x34] - add r1, r2, r1 - lsl r2, r1, #0xc - ldr r1, [sp] - sub r2, r2, r1 - asr r1, r2, #2 - lsr r1, r1, #0x1d - add r1, r2, r1 - asr r1, r1, #3 - str r1, [r5, #0x20] - ldr r1, _021DCA00 ; =0x021E0236 - mov r2, #0 - ldrh r0, [r1, r0] - lsl r1, r0, #0xc - ldr r0, [sp, #4] - sub r1, r1, r0 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r0, r0, #3 - str r0, [r5, #0x24] - add r0, r5, #0 - add r0, #0x2a - strb r2, [r0] - add r0, r5, #0 - add r0, #0x28 - strb r4, [r0] - ldr r0, _021DCA04 ; =ov19_021DCA18 - add r1, r5, #0 - bl ov19_021D77C8 - cmp r0, #0 - beq _021DC9EA - mov r0, #1 - b _021DC9EC -_021DC9EA: - mov r0, #0 -_021DC9EC: - add sp, #0xc - str r0, [r5, #0x2c] - pop {r4, r5, pc} -_021DC9F2: - mov r0, #0 - str r0, [r5, #0x2c] - add sp, #0xc - pop {r4, r5, pc} - nop -_021DC9FC: .word 0x021E0234 -_021DCA00: .word 0x021E0236 -_021DCA04: .word ov19_021DCA18 - thumb_func_end ov19_021DC96C - - thumb_func_start ov19_021DCA08 -ov19_021DCA08: ; 0x021DCA08 - ldr r0, [r0, #0x2c] - cmp r0, #0 - bne _021DCA12 - mov r0, #1 - bx lr -_021DCA12: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DCA08 - - thumb_func_start ov19_021DCA18 -ov19_021DCA18: ; 0x021DCA18 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x28 - ldrb r1, [r0] - mov r0, #0x34 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x3c] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r5, #0 - add r0, #0x2a - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x2a - strb r1, [r0] - add r0, r5, #0 - add r0, #0x2a - ldrb r0, [r0] - cmp r0, #8 - blo _021DCA7E - add r1, r5, #0 - add r1, #0x28 - ldrb r1, [r1] - ldr r0, [r5, #0x34] - mov r4, #1 - lsl r2, r1, #2 - ldr r1, _021DCAB8 ; =0x021E0234 - ldrh r1, [r1, r2] - add r0, r0, r1 - lsl r0, r0, #0xc - str r0, [sp] - add r0, r5, #0 - add r0, #0x28 - ldrb r0, [r0] - lsl r1, r0, #2 - ldr r0, _021DCABC ; =0x021E0236 - ldrh r0, [r0, r1] - lsl r0, r0, #0xc - str r0, [sp, #4] - b _021DCA90 -_021DCA7E: - ldr r1, [sp] - ldr r0, [r5, #0x20] - mov r4, #0 - add r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r5, #0x24] - add r0, r1, r0 - str r0, [sp, #4] -_021DCA90: - add r0, r5, #0 - add r0, #0x28 - ldrb r1, [r0] - mov r0, #0x34 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x3c] - add r1, sp, #0 - bl sub_02021C50 - cmp r4, #0 - beq _021DCAB2 - mov r0, #0 - str r0, [r5, #0x2c] - add r0, r6, #0 - bl sub_0200DA58 -_021DCAB2: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021DCAB8: .word 0x021E0234 -_021DCABC: .word 0x021E0236 - thumb_func_end ov19_021DCA18 - - thumb_func_start ov19_021DCAC0 -ov19_021DCAC0: ; 0x021DCAC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl ov19_021D5E68 - mov r1, #0x11 - ldr r2, [r5, #0xc] - lsl r1, r1, #4 - ldrh r1, [r2, r1] - cmp r1, r0 - bne _021DCADC - ldr r0, [r5, #0x10] - bl ov19_021D84E0 -_021DCADC: - ldr r0, [r5, #0xc] - bl ov19_021D5E2C - add r4, r0, #0 - add r2, r5, #0 - mov r1, #0x34 - ldr r0, [r5, #0x38] - add r2, #0x3c - mul r1, r4 - add r1, r2, r1 - mov r2, #1 - bl ov19_021DA3F0 - add r5, #0x28 - strb r4, [r5] - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DCAC0 - - thumb_func_start ov19_021DCAFC -ov19_021DCAFC: ; 0x021DCAFC - add r2, r0, #0 - mov r0, #0x5d - mov r3, #0 - lsl r0, r0, #2 - strb r3, [r2, r0] - add r0, r2, #0 - add r0, #0x28 - mov r3, #0x34 - strb r1, [r0] - ldr r0, [r2, #0x38] - add r2, #0x3c - mul r3, r1 - add r1, r2, r3 - ldr r3, _021DCB1C ; =ov19_021DA7B8 - mov r2, #1 - bx r3 - ; .align 2, 0 -_021DCB1C: .word ov19_021DA7B8 - thumb_func_end ov19_021DCAFC - - thumb_func_start ov19_021DCB20 -ov19_021DCB20: ; 0x021DCB20 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0x28 - ldrb r1, [r0] - add r4, r5, #0 - mov r0, #0x34 - add r6, r1, #0 - mul r6, r0 - mov r0, #0x5d - lsl r0, r0, #2 - ldrb r0, [r5, r0] - add r4, #0x3c - cmp r0, #0 - beq _021DCB42 - cmp r0, #1 - beq _021DCB8A - b _021DCB9A -_021DCB42: - ldr r0, [r5, #0x38] - add r1, r4, r6 - bl ov19_021DA7E0 - cmp r0, #0 - beq _021DCB9A - ldr r0, [r5, #0] - bl ov19_021D7964 - add r7, r0, #0 - bl ov19_021D3B18 - cmp r0, #0 - beq _021DCB9A - add r0, r7, #0 - bl ov19_021D3B20 - cmp r0, #0 - ldr r0, [r5, #0x38] - beq _021DCB76 - add r1, r4, r6 - mov r2, #1 - bl ov19_021DA3F0 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DCB76: - add r1, r4, r6 - mov r2, #2 - bl ov19_021DA7B8 - mov r0, #0x5d - lsl r0, r0, #2 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - b _021DCB9A -_021DCB8A: - ldr r0, [r5, #0x38] - add r1, r4, r6 - bl ov19_021DA7E0 - cmp r0, #0 - beq _021DCB9A - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DCB9A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DCB20 - - thumb_func_start ov19_021DCBA0 -ov19_021DCBA0: ; 0x021DCBA0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0xc] - bl ov19_021D5E10 - cmp r0, #1 - bne _021DCBD8 - ldr r0, [r7, #0xc] - bl ov19_021D5EC8 - add r5, r7, #0 - str r0, [sp] - mov r6, #0 - add r4, r7, #0 - add r5, #0x3c -_021DCBBE: - ldr r0, [r4, #0x3c] - cmp r0, #0 - beq _021DCBCE - ldr r0, [r7, #0x38] - ldr r2, [sp] - add r1, r5, #0 - bl ov19_021DA63C -_021DCBCE: - add r6, r6, #1 - add r4, #0x34 - add r5, #0x34 - cmp r6, #6 - blt _021DCBBE -_021DCBD8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DCBA0 - - thumb_func_start ov19_021DCBDC -ov19_021DCBDC: ; 0x021DCBDC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r5, #0 - mov r0, #0x34 - add r4, r1, #0 - mul r4, r0 - add r6, #0x3c - ldr r0, [r6, r4] - cmp r0, #0 - beq _021DCC12 - ldr r0, [r5, #0x38] - add r1, r6, r4 - bl ov19_021DA690 - ldr r0, [r5, #0xc] - bl ov19_021D5EC8 - add r2, r0, #0 - ldr r0, [r5, #0x38] - add r1, r6, r4 - bl ov19_021DA63C - ldr r0, [r5, #0x38] - add r1, r6, r4 - mov r2, #0 - bl ov19_021DA694 -_021DCC12: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DCBDC - - thumb_func_start ov19_021DCC14 -ov19_021DCC14: ; 0x021DCC14 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl ov19_021D5E2C - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl ov19_021D5EA0 - add r2, r0, #0 - add r1, r5, #0 - mov r0, #0x34 - add r3, r4, #0 - add r1, #0x3c - mul r3, r0 - ldr r0, [r1, r3] - cmp r0, #0 - beq _021DCC40 - ldr r0, [r5, #0x38] - add r1, r1, r3 - bl ov19_021DA68C -_021DCC40: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DCC14 - - thumb_func_start ov19_021DCC44 -ov19_021DCC44: ; 0x021DCC44 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r0, #0x34 - add r6, r4, #0 - mul r6, r0 - add r0, r5, #0 - add r7, r3, #0 - add r0, #0x3c - str r2, [sp] - add r0, r0, r6 - add r1, r7, #0 - mov r2, #1 - bl ov19_021DA418 - ldr r0, [r5, #0x38] - ldr r2, [sp] - add r1, r7, #0 - bl ov19_021DA754 - add r1, r5, #0 - add r1, #0x3c - ldr r0, [r5, #0x38] - add r1, r1, r6 - mov r2, #1 - bl ov19_021DA3CC - add r5, #0x28 - strb r4, [r5] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DCC44 - - thumb_func_start ov19_021DCC80 -ov19_021DCC80: ; 0x021DCC80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0xc] - str r1, [sp] - ldr r0, [r0, #4] - str r2, [sp, #4] - bl sub_0207A0F8 - sub r7, r0, #1 - add r4, r5, #0 - mov r0, #0x34 - add r6, r7, #0 - mul r6, r0 - add r4, #0x3c - ldr r0, [sp, #4] - add r1, r4, r6 - mov r2, #1 - bl ov19_021DA418 - ldr r2, _021DCCD0 ; =0x00000418 - lsl r3, r7, #5 - ldr r0, [r5, #0x38] - add r1, r4, r6 - add r2, r3, r2 - bl ov19_021DA754 - ldr r0, [r4, r6] - mov r1, #1 - bl sub_02021E80 - ldr r0, [r4, r6] - add r1, r7, #4 - bl ov19_021D78AC - ldr r0, [sp] - add r5, #0x28 - strb r0, [r5] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DCCD0: .word 0x00000418 - thumb_func_end ov19_021DCC80 - - thumb_func_start ov19_021DCCD4 -ov19_021DCCD4: ; 0x021DCCD4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - add r5, r6, #0 - mov r0, #0x34 - add r4, r7, #0 - mul r4, r0 - add r5, #0x3c - add r0, r2, #0 - add r1, r5, r4 - mov r2, #1 - bl ov19_021DA418 - ldr r2, _021DCD14 ; =0x00000418 - lsl r3, r7, #5 - ldr r0, [r6, #0x38] - add r1, r5, r4 - add r2, r3, r2 - bl ov19_021DA754 - ldr r0, [r5, r4] - mov r1, #1 - bl sub_02021E80 - ldr r0, [r5, r4] - add r1, r7, #4 - bl ov19_021D78AC - add r6, #0x28 - strb r7, [r6] - pop {r3, r4, r5, r6, r7, pc} - nop -_021DCD14: .word 0x00000418 - thumb_func_end ov19_021DCCD4 - - thumb_func_start ov19_021DCD18 -ov19_021DCD18: ; 0x021DCD18 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #6 - blo _021DCD26 - bl sub_02022974 -_021DCD26: - mov r0, #0x34 - add r5, #0x3c - mul r0, r4 - add r0, r5, r0 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DCD18 - - thumb_func_start ov19_021DCD30 -ov19_021DCD30: ; 0x021DCD30 - push {r3, r4} - cmp r1, #6 - bne _021DCD44 - ldr r0, [r0, #0x34] - add r0, #0xc0 - str r0, [r2, #0] - mov r0, #0xb8 - str r0, [r3, #0] - pop {r3, r4} - bx lr -_021DCD44: - ldr r4, [r0, #0x34] - ldr r0, _021DCD5C ; =0x021E0234 - lsl r1, r1, #2 - ldrh r0, [r0, r1] - add r0, r4, r0 - str r0, [r2, #0] - ldr r0, _021DCD60 ; =0x021E0236 - ldrh r0, [r0, r1] - str r0, [r3, #0] - pop {r3, r4} - bx lr - nop -_021DCD5C: .word 0x021E0234 -_021DCD60: .word 0x021E0236 - thumb_func_end ov19_021DCD30 - - thumb_func_start ov19_021DCD64 -ov19_021DCD64: ; 0x021DCD64 - push {r3, r4, lr} - sub sp, #0xc - add r3, r0, #0 - cmp r1, #2 - bhi _021DCD7E - mov r0, #2 - sub r1, r0, r1 - add r2, r1, #0 - mov r0, #0x1e - mul r2, r0 - mov r1, #0x18 - mov r0, #0 - b _021DCD8C -_021DCD7E: - cmp r1, #0x1a - bhs _021DCDB0 - mov r0, #0x1a - sub r1, r0, r1 - mov r0, #0x18 - mov r2, #0 - sub r0, r0, r1 -_021DCD8C: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xf - str r0, [sp, #4] - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r4, [r3, #0x18] - ldr r0, [r3, #4] - ldr r3, [r3, #0x30] - add r4, #0xc - lsl r3, r3, #0x18 - mov r1, #2 - add r2, r4, r2 - lsr r3, r3, #0x18 - bl sub_020198C0 -_021DCDB0: - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov19_021DCD64 - - thumb_func_start ov19_021DCDB4 -ov19_021DCDB4: ; 0x021DCDB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - str r1, [sp, #4] - mov r0, #0 - ldr r1, _021DCE4C ; =0x021E0234 - mov ip, r0 -_021DCDC2: - ldrh r3, [r1] - ldrh r2, [r1, #4] - mov r0, #0 - ldrh r4, [r1, #2] - sub r2, r3, r2 - lsl r3, r2, #0xc - asr r2, r3, #2 - lsr r2, r2, #0x1d - add r2, r3, r2 - ldrh r3, [r1, #6] - asr r2, r2, #3 - mov lr, r2 - sub r3, r4, r3 - lsl r4, r3, #0xc - asr r3, r4, #2 - lsr r3, r3, #0x1d - add r3, r4, r3 - ldr r2, [sp, #4] - add r6, r0, #0 - asr r7, r3, #3 - add r5, r0, #0 -_021DCDEC: - ldr r3, [sp] - add r5, r5, r7 - ldr r4, [r3, #0x34] - ldrh r3, [r1, #4] - add r0, r0, #1 - add r3, r4, r3 - lsl r4, r3, #0xc - mov r3, lr - add r6, r6, r3 - add r3, r4, r6 - str r3, [r2, #0] - ldrh r3, [r1, #6] - lsl r3, r3, #0xc - add r3, r3, r5 - str r3, [r2, #4] - mov r3, #0 - str r3, [r2, #8] - add r2, #0xc - cmp r0, #7 - blo _021DCDEC - ldr r3, [sp] - mov r2, #0xc - ldr r4, [r3, #0x34] - ldrh r3, [r1] - mul r2, r0 - ldr r0, [sp, #4] - add r3, r4, r3 - lsl r4, r3, #0xc - ldr r3, [sp, #4] - add r0, r0, r2 - str r4, [r3, r2] - ldrh r2, [r1, #2] - add r1, r1, #4 - lsl r2, r2, #0xc - str r2, [r0, #4] - mov r2, #0 - str r2, [r0, #8] - add r0, r3, #0 - add r0, #0x60 - str r0, [sp, #4] - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #5 - blo _021DCDC2 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DCE4C: .word 0x021E0234 - thumb_func_end ov19_021DCDB4 - - thumb_func_start ov19_021DCE50 -ov19_021DCE50: ; 0x021DCE50 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - mov r7, #0 -_021DCE5A: - ldr r0, [r5, #0x3c] - cmp r0, #0 - beq _021DCEB2 - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - ldr r0, [sp, #4] - add r0, r0, r4 - str r0, [sp, #4] - ldr r0, [r5, #0x3c] - bl sub_02021C50 - cmp r4, #0 - bge _021DCE98 - mov r0, #0xd - ldr r1, [sp, #4] - lsl r0, r0, #0x10 - cmp r1, r0 - bge _021DCEAA - ldr r0, [r5, #0x3c] - mov r1, #1 - bl sub_02021CAC - b _021DCEAA -_021DCE98: - mov r0, #0xd - ldr r1, [sp, #4] - lsl r0, r0, #0x10 - cmp r1, r0 - blt _021DCEAA - ldr r0, [r5, #0x3c] - mov r1, #0 - bl sub_02021CAC -_021DCEAA: - add r7, r7, #1 - add r5, #0x34 - cmp r7, #6 - blt _021DCE5A -_021DCEB2: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DCE50 - - thumb_func_start ov19_021DCEB8 -ov19_021DCEB8: ; 0x021DCEB8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #0x24] - str r1, [sp, #0x10] - cmp r1, #0 - beq _021DCECA - mov r0, #0 - str r0, [sp, #0x14] - b _021DCECE -_021DCECA: - mov r0, #0xd0 - str r0, [sp, #0x14] -_021DCECE: - ldr r0, [sp, #0x24] - ldr r0, [r0, #0xc] - ldr r0, [r0, #4] - bl sub_0207A0F8 - mov r4, #0 - str r0, [sp, #0x20] - cmp r0, #0 - ble _021DCF44 - ldr r0, [sp, #0x24] - ldr r7, _021DCF48 ; =0x00000418 - str r0, [sp, #0x1c] - add r0, #0x3c - str r0, [sp, #0x1c] - ldr r0, [sp, #0x24] - ldr r5, _021DCF4C ; =0x021E0234 - str r0, [sp, #0x18] -_021DCEF0: - ldr r0, [sp, #0x24] - add r1, r4, #0 - ldr r0, [r0, #0xc] - ldr r0, [r0, #4] - bl sub_0207A0FC - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - add r0, r4, #4 - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - str r7, [sp, #8] - str r0, [sp, #0xc] - ldr r2, [sp, #0x24] - ldr r0, [sp, #0x24] - ldr r3, [r2, #0x34] - ldrh r2, [r5] - ldrh r6, [r5, #2] - ldr r0, [r0, #0x38] - add r2, r3, r2 - ldr r3, [sp, #0x14] - add r3, r3, r6 - bl ov19_021DA428 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - ldr r0, [r0, #0x3c] - bl sub_02021CAC - ldr r0, [sp, #0x1c] - add r4, r4, #1 - add r0, #0x34 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r7, #0x20 - add r0, #0x34 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r5, r5, #4 - cmp r4, r0 - blt _021DCEF0 -_021DCF44: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DCF48: .word 0x00000418 -_021DCF4C: .word 0x021E0234 - thumb_func_end ov19_021DCEB8 - - thumb_func_start ov19_021DCF50 -ov19_021DCF50: ; 0x021DCF50 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0xc] - ldr r0, [r0, #4] - bl sub_0207A0F8 - mov r6, #0 - str r0, [sp] - cmp r0, #0 - ble _021DCF86 - add r5, r7, #0 - add r4, r7, #0 - add r5, #0x3c -_021DCF6A: - ldr r0, [r4, #0x3c] - cmp r0, #0 - beq _021DCF7A - ldr r0, [r7, #0x38] - add r1, r5, #0 - mov r2, #1 - bl ov19_021DA3F0 -_021DCF7A: - ldr r0, [sp] - add r6, r6, #1 - add r4, #0x34 - add r5, #0x34 - cmp r6, r0 - blt _021DCF6A -_021DCF86: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DCF50 - - thumb_func_start ov19_021DCF88 -ov19_021DCF88: ; 0x021DCF88 - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - add r6, r0, #0 - add r0, r5, #0 - add r7, r1, #0 - str r3, [sp] - bl ov19_021D5E08 - cmp r0, #4 - bne _021DCFA4 - mov r0, #0 - str r0, [r6, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DCFA4: - mov r0, #0xa - mov r1, #0xf4 - bl sub_02018144 - add r4, r0, #0 - beq _021DD020 - ldr r0, [sp] - mov r1, #0xa - str r0, [r4, #8] - str r7, [r4, #0] - ldr r0, [sp, #0x18] - str r5, [r4, #4] - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x14] - mov r0, #0x20 - bl sub_02023790 - add r1, r4, #0 - add r1, #0x84 - str r0, [r1, #0] - add r5, #0x9c - ldrb r0, [r5] - mov r1, #0 - add r2, r1, #0 - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xb0 - str r1, [r0, #0] - str r1, [r4, #0x2c] - str r1, [r4, #0x30] - add r0, r4, #0 -_021DCFF6: - add r1, r1, #1 - str r2, [r0, #0x34] - add r0, r0, #4 - cmp r1, #8 - blt _021DCFF6 - add r0, r4, #0 - mov r1, #0 -_021DD004: - add r2, r2, #1 - str r1, [r0, #0x54] - add r0, r0, #4 - cmp r2, #0xa - blt _021DD004 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - bl ov19_021DD024 - str r4, [r6, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DD020: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DCF88 - - thumb_func_start ov19_021DD024 -ov19_021DD024: ; 0x021DD024 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r0, #0xd4 - strb r6, [r0] - add r0, r5, #0 - mov r1, #0x10 - add r0, #0xe4 - strb r1, [r0] - mov r4, #1 - add r7, r1, #0 -_021DD03A: - mov r0, #0x5a - lsl r0, r0, #8 - add r6, r6, r0 - lsl r0, r6, #4 - lsr r0, r0, #0x10 - bl sub_0201D15C - lsl r0, r0, #4 - asr r1, r0, #0xc - add r0, r5, r4 - add r0, #0xd4 - strb r1, [r0] - add r0, r5, r4 - add r0, #0xd4 - ldrb r0, [r0] - sub r1, r7, r0 - add r0, r5, r4 - add r0, #0xe4 - add r4, r4, #1 - strb r1, [r0] - cmp r4, #0xf - blt _021DD03A - add r0, r5, r4 - mov r1, #0x10 - add r0, #0xd4 - strb r1, [r0] - add r0, r5, r4 - mov r1, #0 - add r0, #0xe4 - strb r1, [r0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DD024 - - thumb_func_start ov19_021DD078 -ov19_021DD078: ; 0x021DD078 - push {r4, r5, r6, lr} - add r6, r0, #0 - beq _021DD110 - add r0, #0x88 - bl sub_0201A8FC - add r0, r6, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DD092 - bl sub_020181C4 -_021DD092: - add r0, r6, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DD0A0 - bl sub_020181C4 -_021DD0A0: - add r0, r6, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DD0AE - bl sub_020181C4 -_021DD0AE: - add r0, r6, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DD0BC - bl sub_020181C4 -_021DD0BC: - ldr r0, [r6, #0x2c] - cmp r0, #0 - beq _021DD0C6 - bl sub_02021BD4 -_021DD0C6: - ldr r0, [r6, #0x30] - cmp r0, #0 - beq _021DD0D0 - bl sub_02021BD4 -_021DD0D0: - add r0, r6, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DD0DE - bl sub_020237BC -_021DD0DE: - mov r4, #0 - add r5, r6, #0 -_021DD0E2: - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DD0EC - bl sub_02021BD4 -_021DD0EC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021DD0E2 - mov r5, #0 - add r4, r6, #0 -_021DD0F8: - ldr r0, [r4, #0x54] - cmp r0, #0 - beq _021DD102 - bl sub_02021BD4 -_021DD102: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #0xa - blt _021DD0F8 - add r0, r6, #0 - bl sub_020181C4 -_021DD110: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD078 - - thumb_func_start ov19_021DD114 -ov19_021DD114: ; 0x021DD114 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - beq _021DD21A - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #8] - add r0, r4, #0 - mov r1, #0x7f - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #8] - add r0, r4, #0 - mov r1, #0x7c - mov r3, #7 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #8] - add r0, r4, #0 - mov r1, #0x7d - mov r3, #6 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #8] - add r0, r4, #0 - mov r1, #0x7e - mov r3, #5 - bl sub_0200710C - mov r2, #0 - str r2, [sp] - ldr r0, [r5, #8] - mov r1, #4 - mov r3, #1 - bl sub_020196C0 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r0, [r5, #8] - mov r1, #4 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r5, #8] - mov r1, #4 - bl sub_02019448 - ldr r3, [r5, #0x10] - ldr r0, [r5, #8] - lsl r6, r3, #2 - ldr r3, _021DD220 ; =0x021E0258 - mov r1, #5 - ldr r3, [r3, r6] - mov r2, #0 - bl sub_02019184 - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - str r3, [sp, #0x10] - add r1, r5, #0 - ldr r0, [r5, #8] - add r1, #0x88 - mov r2, #4 - bl sub_0201A7E8 - add r0, r5, #0 - add r0, #0x88 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x88 - bl sub_0201A954 - add r0, r5, #0 - bl ov19_021DE324 - mov r0, #0x60 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #4 - mov r3, #0 - bl sub_02007130 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DD224 -_021DD21A: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_021DD220: .word 0x021E0258 - thumb_func_end ov19_021DD114 - - thumb_func_start ov19_021DD224 -ov19_021DD224: ; 0x021DD224 - push {r4, r5, lr} - sub sp, #0x5c - add r5, r0, #0 - add r4, r1, #0 - bl ov19_021DD2BC - add r0, sp, #0x14 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - str r3, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, sp, #0x14 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #0x8a - mov r2, #1 - bl sub_0200718C - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - add r3, r5, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - add r3, #0x9c - add r2, r5, #0 - ldr r3, [r3, #0] - add r0, sp, #0x38 - add r1, sp, #0x14 - add r2, #0x18 - bl ov19_021D783C - mov r0, #0x31 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r3, #0x8e - ldr r0, [r5, #0xc] - add r1, sp, #0x38 - mov r2, #0 - lsl r3, r3, #2 - bl ov19_021D785C - str r0, [r5, #0x2c] - mov r0, #0x31 - mov r3, #0x8e - str r0, [sp] - mov r2, #2 - str r2, [sp, #4] - ldr r0, [r5, #0xc] - add r1, sp, #0x38 - add r2, #0xfe - lsl r3, r3, #2 - bl ov19_021D785C - str r0, [r5, #0x30] - mov r1, #1 - bl sub_02021D0C - ldr r0, [r5, #4] - bl ov19_021D5E08 - cmp r0, #3 - bne _021DD2B8 - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_02021D6C -_021DD2B8: - add sp, #0x5c - pop {r4, r5, pc} - thumb_func_end ov19_021DD224 - - thumb_func_start ov19_021DD2BC -ov19_021DD2BC: ; 0x021DD2BC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x8b - mov r2, #1 - add r3, #0x9c - bl sub_02007204 - add r1, r5, #0 - add r1, #0x98 - str r0, [r1, #0] - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x8c - mov r2, #1 - add r3, #0xa4 - bl sub_02007220 - add r1, r5, #0 - add r1, #0xa0 - str r0, [r1, #0] - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x8e - mov r2, #1 - add r3, #0xac - bl sub_02007204 - add r1, r5, #0 - add r1, #0xa8 - str r0, [r1, #0] - mov r0, #0xa - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x8f - mov r2, #1 - add r3, #0xb4 - bl sub_02007220 - add r1, r5, #0 - add r1, #0xb0 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0x18 - bl sub_020A81D0 - mov r0, #0xa - str r0, [sp] - add r5, #0x18 - add r0, r4, #0 - mov r1, #0x90 - mov r2, #2 - mov r3, #0 - str r5, [sp, #4] - bl sub_0200716C - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DD2BC - - thumb_func_start ov19_021DD344 -ov19_021DD344: ; 0x021DD344 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - mov r2, #0 - bl ov19_021D77C8 - str r0, [r4, #0x14] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD344 - - thumb_func_start ov19_021DD358 -ov19_021DD358: ; 0x021DD358 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x14] - pop {r4, pc} - thumb_func_end ov19_021DD358 - - thumb_func_start ov19_021DD368 -ov19_021DD368: ; 0x021DD368 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _021DD372 - mov r0, #1 - bx lr -_021DD372: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DD368 - - thumb_func_start ov19_021DD378 -ov19_021DD378: ; 0x021DD378 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - beq _021DD44A - ldr r1, [r5, #4] - add r1, #0x9c - ldrb r6, [r1] - ldr r1, [r5, #0x10] - cmp r1, r6 - beq _021DD44A - add r1, r5, #0 - add r4, r5, #0 - add r1, #0xb8 - str r5, [r1, #0] - add r4, #0xb8 - mov r1, #0 - str r1, [r4, #8] - str r1, [r4, #4] - cmp r6, #0 - beq _021DD3A8 - cmp r6, #1 - beq _021DD3C0 - cmp r6, #2 - beq _021DD3E2 - b _021DD40A -_021DD3A8: - mov r1, #8 - strh r1, [r4, #0xc] - ldr r7, _021DD44C ; =ov19_021DD670 - bl ov19_021DD998 - add r0, r5, #0 - bl ov19_021DDA7C - add r0, r5, #0 - bl ov19_021DE324 - b _021DD412 -_021DD3C0: - mov r0, #8 - strh r0, [r4, #0xc] - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _021DD3CE - ldr r7, _021DD450 ; =ov19_021DD46C - b _021DD3D6 -_021DD3CE: - ldrh r0, [r4, #0xc] - ldr r7, _021DD454 ; =ov19_021DD544 - add r0, #8 - strh r0, [r4, #0xc] -_021DD3D6: - add r0, r5, #0 - bl ov19_021DDA7C - ldr r0, [r5, #0x2c] - str r0, [r4, #8] - b _021DD412 -_021DD3E2: - mov r0, #8 - strh r0, [r4, #0xc] - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _021DD3F0 - ldr r7, _021DD450 ; =ov19_021DD46C - b _021DD3F8 -_021DD3F0: - ldrh r0, [r4, #0xc] - ldr r7, _021DD454 ; =ov19_021DD544 - add r0, #8 - strh r0, [r4, #0xc] -_021DD3F8: - ldr r0, [r5, #0x30] - str r0, [r4, #8] - add r0, r5, #0 - bl ov19_021DD998 - add r0, r5, #0 - bl ov19_021DE324 - b _021DD412 -_021DD40A: - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} -_021DD412: - str r6, [r5, #0x10] - ldr r0, [r5, #8] - mov r1, #5 - bl sub_020192EC - lsl r0, r0, #0xc - ldr r1, _021DD458 ; =0x021E0258 - lsl r2, r6, #2 - str r0, [r4, #0x10] - ldr r6, [r1, r2] - ldrh r1, [r4, #0xc] - sub r0, r6, r0 - bl sub_020E1F6C - str r0, [r4, #0x14] - asr r0, r6, #0xc - str r0, [r4, #0x18] - ldr r0, [r4, #8] - cmp r0, #0 - beq _021DD440 - mov r1, #1 - bl sub_02021D6C -_021DD440: - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov19_021DD344 -_021DD44A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD44C: .word ov19_021DD670 -_021DD450: .word ov19_021DD46C -_021DD454: .word ov19_021DD544 -_021DD458: .word 0x021E0258 - thumb_func_end ov19_021DD378 - - thumb_func_start ov19_021DD45C -ov19_021DD45C: ; 0x021DD45C - push {r3, lr} - cmp r0, #0 - beq _021DD468 - bl ov19_021DD368 - pop {r3, pc} -_021DD468: - mov r0, #1 - pop {r3, pc} - thumb_func_end ov19_021DD45C - - thumb_func_start ov19_021DD46C -ov19_021DD46C: ; 0x021DD46C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - ldr r5, [r4, #0] - cmp r0, #3 - bhi _021DD534 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DD484: ; jump table - .short _021DD48C - _021DD484 - 2 ; case 0 - .short _021DD49E - _021DD484 - 2 ; case 1 - .short _021DD4E4 - _021DD484 - 2 ; case 2 - .short _021DD502 - _021DD484 - 2 ; case 3 -_021DD48C: - ldr r0, [r4, #8] - bl sub_02021FD0 - cmp r0, #0 - bne _021DD534 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD49E: - ldrh r0, [r4, #0xc] - cmp r0, #0 - beq _021DD4C0 - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x14] - mov r2, #0 - add r3, r1, r0 - str r3, [r4, #0x10] - ldr r0, [r5, #8] - mov r1, #5 - asr r3, r3, #0xc - bl sub_02019184 - ldrh r0, [r4, #0xc] - sub r0, r0, #1 - strh r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_021DD4C0: - ldr r0, [r5, #8] - ldr r3, [r4, #0x18] - mov r1, #5 - mov r2, #0 - bl sub_02019184 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021DD538 ; =0x04001050 - mov r1, #4 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD4E4: - ldr r3, [r5, #0x10] - ldr r0, [r5, #8] - lsl r5, r3, #2 - ldr r3, _021DD53C ; =0x021E024C - mov r1, #6 - ldr r3, [r3, r5] - mov r2, #0 - bl sub_02019184 - mov r0, #0 - strh r0, [r4, #0xe] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD502: - mov r1, #0xe - ldrsh r3, [r4, r1] - add r0, r5, r3 - add r0, #0xd4 - ldrb r2, [r0] - add r0, r5, r3 - add r0, #0xe4 - ldrb r0, [r0] - lsl r0, r0, #8 - orr r2, r0 - ldr r0, _021DD540 ; =0x04001052 - strh r2, [r0] - ldrsh r0, [r4, r1] - add r0, r0, #1 - strh r0, [r4, #0xe] - ldrsh r0, [r4, r1] - cmp r0, #0x10 - blt _021DD534 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02021D6C - add r0, r5, #0 - bl ov19_021DD358 -_021DD534: - pop {r3, r4, r5, pc} - nop -_021DD538: .word 0x04001050 -_021DD53C: .word 0x021E024C -_021DD540: .word 0x04001052 - thumb_func_end ov19_021DD46C - - thumb_func_start ov19_021DD544 -ov19_021DD544: ; 0x021DD544 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - ldr r5, [r4, #0] - cmp r0, #4 - bls _021DD552 - b _021DD662 -_021DD552: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DD55E: ; jump table - .short _021DD568 - _021DD55E - 2 ; case 0 - .short _021DD58E - _021DD55E - 2 ; case 1 - .short _021DD5CC - _021DD55E - 2 ; case 2 - .short _021DD612 - _021DD55E - 2 ; case 3 - .short _021DD630 - _021DD55E - 2 ; case 4 -_021DD568: - ldr r0, [r4, #8] - bl sub_02021FD0 - cmp r0, #0 - bne _021DD662 - mov r0, #0 - str r0, [sp] - ldr r0, _021DD664 ; =0x04001050 - mov r1, #4 - mov r2, #8 - mov r3, #0x10 - bl sub_020BF55C - mov r0, #0xf - strh r0, [r4, #0xe] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD58E: - mov r1, #0xe - ldrsh r0, [r4, r1] - sub r0, r0, #1 - strh r0, [r4, #0xe] - ldrsh r3, [r4, r1] - add r0, r5, r3 - add r0, #0xd4 - ldrb r2, [r0] - add r0, r5, r3 - add r0, #0xe4 - ldrb r0, [r0] - lsl r0, r0, #8 - orr r2, r0 - ldr r0, _021DD668 ; =0x04001052 - strh r2, [r0] - ldrsh r0, [r4, r1] - cmp r0, #0 - bne _021DD662 - ldr r3, [r5, #0x10] - ldr r0, [r5, #8] - lsl r5, r3, #2 - ldr r3, _021DD66C ; =0x021E024C - mov r1, #6 - ldr r3, [r3, r5] - mov r2, #0 - bl sub_02019184 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD5CC: - ldrh r0, [r4, #0xc] - cmp r0, #0 - beq _021DD5EE - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x14] - mov r2, #0 - add r3, r1, r0 - str r3, [r4, #0x10] - ldr r0, [r5, #8] - mov r1, #5 - asr r3, r3, #0xc - bl sub_02019184 - ldrh r0, [r4, #0xc] - sub r0, r0, #1 - strh r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_021DD5EE: - ldr r0, [r5, #8] - ldr r3, [r4, #0x18] - mov r1, #5 - mov r2, #0 - bl sub_02019184 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021DD664 ; =0x04001050 - mov r1, #4 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD612: - ldr r3, [r5, #0x10] - ldr r0, [r5, #8] - lsl r5, r3, #2 - ldr r3, _021DD66C ; =0x021E024C - mov r1, #6 - ldr r3, [r3, r5] - mov r2, #0 - bl sub_02019184 - mov r0, #0 - strh r0, [r4, #0xe] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD630: - mov r1, #0xe - ldrsh r3, [r4, r1] - add r0, r5, r3 - add r0, #0xd4 - ldrb r2, [r0] - add r0, r5, r3 - add r0, #0xe4 - ldrb r0, [r0] - lsl r0, r0, #8 - orr r2, r0 - ldr r0, _021DD668 ; =0x04001052 - strh r2, [r0] - ldrsh r0, [r4, r1] - add r0, r0, #1 - strh r0, [r4, #0xe] - ldrsh r0, [r4, r1] - cmp r0, #0x10 - blt _021DD662 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02021D6C - add r0, r5, #0 - bl ov19_021DD358 -_021DD662: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DD664: .word 0x04001050 -_021DD668: .word 0x04001052 -_021DD66C: .word 0x021E024C - thumb_func_end ov19_021DD544 - - thumb_func_start ov19_021DD670 -ov19_021DD670: ; 0x021DD670 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #4] - ldr r0, [r4, #0] - cmp r1, #3 - bhi _021DD70C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DD688: ; jump table - .short _021DD690 - _021DD688 - 2 ; case 0 - .short _021DD69A - _021DD688 - 2 ; case 1 - .short _021DD6D2 - _021DD688 - 2 ; case 2 - .short _021DD708 - _021DD688 - 2 ; case 3 -_021DD690: - mov r1, #0xf - strh r1, [r4, #0xe] - ldr r1, [r4, #4] - add r1, r1, #1 - str r1, [r4, #4] -_021DD69A: - mov r2, #0xe - ldrsh r1, [r4, r2] - sub r1, r1, #1 - strh r1, [r4, #0xe] - ldrsh r5, [r4, r2] - add r1, r0, r5 - add r1, #0xd4 - ldrb r3, [r1] - add r1, r0, r5 - add r1, #0xe4 - ldrb r1, [r1] - lsl r1, r1, #8 - orr r3, r1 - ldr r1, _021DD710 ; =0x04001052 - strh r3, [r1] - ldrsh r1, [r4, r2] - cmp r1, #0 - bne _021DD70C - mov r2, #0 - ldr r0, [r0, #8] - mov r1, #6 - add r3, r2, #0 - bl sub_02019184 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD6D2: - ldrh r1, [r4, #0xc] - cmp r1, #0 - beq _021DD6F4 - ldr r2, [r4, #0x10] - ldr r1, [r4, #0x14] - add r3, r2, r1 - str r3, [r4, #0x10] - ldr r0, [r0, #8] - mov r1, #5 - mov r2, #0 - asr r3, r3, #0xc - bl sub_02019184 - ldrh r0, [r4, #0xc] - sub r0, r0, #1 - strh r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_021DD6F4: - ldr r0, [r0, #8] - ldr r3, [r4, #0x18] - mov r1, #5 - mov r2, #0 - bl sub_02019184 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_021DD708: - bl ov19_021DD358 -_021DD70C: - pop {r3, r4, r5, pc} - nop -_021DD710: .word 0x04001052 - thumb_func_end ov19_021DD670 - - thumb_func_start ov19_021DD714 -ov19_021DD714: ; 0x021DD714 - push {r4, lr} - add r4, r0, #0 - beq _021DD73C - ldr r1, [r4, #0x10] - cmp r1, #1 - beq _021DD726 - cmp r1, #2 - beq _021DD732 - pop {r4, pc} -_021DD726: - bl ov19_021DD854 - add r0, r4, #0 - bl ov19_021DDD80 - pop {r4, pc} -_021DD732: - bl ov19_021DD9DC - add r0, r4, #0 - bl ov19_021DE0A0 -_021DD73C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD714 - - thumb_func_start ov19_021DD740 -ov19_021DD740: ; 0x021DD740 - push {r4, lr} - add r4, r0, #0 - beq _021DD762 - bl ov19_021DD368 - cmp r0, #0 - beq _021DD75E - ldr r0, [r4, #0x10] - cmp r0, #1 - bne _021DD75A - add r0, r4, #0 - bl ov19_021DE350 -_021DD75A: - mov r0, #1 - pop {r4, pc} -_021DD75E: - mov r0, #0 - pop {r4, pc} -_021DD762: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD740 - - thumb_func_start ov19_021DD768 -ov19_021DD768: ; 0x021DD768 - push {r4, lr} - add r4, r0, #0 - beq _021DD790 - ldr r1, [r4, #0x10] - cmp r1, #1 - beq _021DD77A - cmp r1, #2 - beq _021DD78C - pop {r4, pc} -_021DD77A: - bl ov19_021DE324 - add r0, r4, #0 - bl ov19_021DD8F8 - add r0, r4, #0 - bl ov19_021DDFA8 - pop {r4, pc} -_021DD78C: - bl ov19_021DE2A4 -_021DD790: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD768 - - thumb_func_start ov19_021DD794 -ov19_021DD794: ; 0x021DD794 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov19_021D5EB0 - cmp r0, #0 - ble _021DD7C4 - add r2, r4, #0 - add r2, #0x80 - ldr r2, [r2, #0] - add r1, r4, #0 - sub r2, r2, r0 - add r0, r4, #0 - add r0, #0x80 - add r4, #0x80 - str r2, [r0, #0] - ldr r0, [r4, #0] - add r1, #0x80 - cmp r0, #0 - bge _021DD7E4 - ldr r0, [r1, #0] - add r0, #0xa - str r0, [r1, #0] - pop {r4, pc} -_021DD7C4: - add r2, r4, #0 - add r2, #0x80 - ldr r2, [r2, #0] - add r1, r4, #0 - sub r2, r2, r0 - add r0, r4, #0 - add r0, #0x80 - add r4, #0x80 - str r2, [r0, #0] - ldr r0, [r4, #0] - add r1, #0x80 - cmp r0, #0xa - blt _021DD7E4 - ldr r0, [r1, #0] - sub r0, #0xa - str r0, [r1, #0] -_021DD7E4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD794 - - thumb_func_start ov19_021DD7E8 -ov19_021DD7E8: ; 0x021DD7E8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov19_021D5EB0 - add r2, r4, #0 - add r2, #0x80 - ldr r2, [r2, #0] - add r1, r4, #0 - add r2, r2, r0 - add r0, r4, #0 - add r0, #0x80 - add r4, #0x80 - str r2, [r0, #0] - ldr r0, [r4, #0] - add r1, #0x80 - cmp r0, #0 - bge _021DD814 - ldr r0, [r1, #0] - add r0, #8 - str r0, [r1, #0] - pop {r4, pc} -_021DD814: - cmp r0, #8 - blt _021DD81E - ldr r0, [r1, #0] - sub r0, #8 - str r0, [r1, #0] -_021DD81E: - pop {r4, pc} - thumb_func_end ov19_021DD7E8 - - thumb_func_start ov19_021DD820 -ov19_021DD820: ; 0x021DD820 - push {r4, lr} - add r4, r0, #0 - beq _021DD850 - bl ov19_021DD368 - cmp r0, #0 - beq _021DD84C - ldr r0, [r4, #0x10] - cmp r0, #1 - bne _021DD842 - add r0, r4, #0 - bl ov19_021DE350 - add r0, r4, #0 - bl ov19_021DD794 - b _021DD848 -_021DD842: - add r0, r4, #0 - bl ov19_021DD7E8 -_021DD848: - mov r0, #1 - pop {r4, pc} -_021DD84C: - mov r0, #0 - pop {r4, pc} -_021DD850: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov19_021DD820 - - thumb_func_start ov19_021DD854 -ov19_021DD854: ; 0x021DD854 - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - str r0, [sp, #8] - ldr r0, [r0, #0] - bl ov19_021D780C - add r7, r0, #0 - ldr r0, [sp, #8] - ldr r0, [r0, #4] - bl ov19_021D5EB8 - add r4, r0, #3 - cmp r4, #0x12 - blt _021DD872 - sub r4, #0x12 -_021DD872: - ldr r5, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - str r0, [sp, #0x10] - add r0, #0x18 - mov r6, #0xc0 - str r0, [sp, #0x10] -_021DD882: - add r0, sp, #0x14 - bl sub_020A818C - add r0, sp, #0x14 - str r0, [sp] - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #2 - bl ov19_021DBBA8 - add r0, r7, #0 - bl ov19_021DBD3C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - add r0, sp, #0x38 - add r1, sp, #0x14 - bl ov19_021D783C - mov r0, #0x30 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #8] - mov r3, #0x17 - ldr r0, [r0, #0xc] - add r1, sp, #0x38 - mov r2, #0x10 - lsl r3, r3, #4 - bl ov19_021D785C - str r0, [r5, #0x54] - cmp r0, #0 - bne _021DD8D4 - bl sub_02022974 -_021DD8D4: - sub r4, r4, #1 - bpl _021DD8DA - mov r4, #0x11 -_021DD8DA: - ldr r0, [sp, #0xc] - add r6, #0x20 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r0, #0xa - blt _021DD882 - ldr r0, [sp, #8] - mov r1, #0 - add r0, #0x80 - str r0, [sp, #8] - str r1, [r0, #0] - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD854 - - thumb_func_start ov19_021DD8F8 -ov19_021DD8F8: ; 0x021DD8F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp, #4] - ldr r0, [r0, #0] - bl ov19_021D780C - str r0, [sp, #0xc] - ldr r0, [sp, #4] - ldr r0, [r0, #4] - bl ov19_021D5EB8 - ldr r1, [sp, #4] - ldr r2, [r1, #4] - mov r1, #0xa0 - ldrsh r7, [r2, r1] - cmp r7, #0 - ble _021DD934 - sub r0, r0, r7 - add r5, r0, #4 - cmp r5, #0x12 - blt _021DD924 - sub r5, #0x12 -_021DD924: - ldr r0, [sp, #4] - mov r6, #1 - add r0, #0x80 - ldr r0, [r0, #0] - sub r4, r0, #1 - bpl _021DD950 - add r4, #0xa - b _021DD950 -_021DD934: - sub r0, r0, r7 - sub r5, r0, #3 - bpl _021DD93C - add r5, #0x12 -_021DD93C: - ldr r0, [sp, #4] - mov r6, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mvn r6, r6 - add r4, r0, #6 - cmp r4, #0xa - blt _021DD94E - sub r4, #0xa -_021DD94E: - neg r7, r7 -_021DD950: - ldr r0, [sp, #4] - str r7, [r0, #0x7c] - mov r0, #0 - str r0, [sp, #8] - cmp r7, #0 - ble _021DD994 -_021DD95C: - mov r0, #0 - str r0, [sp] - lsl r2, r4, #5 - ldr r0, [sp, #0xc] - add r1, r5, #0 - add r2, #0xc0 - mov r3, #2 - bl ov19_021DBBA8 - add r5, r5, r6 - bpl _021DD976 - mov r5, #0x11 - b _021DD97C -_021DD976: - cmp r5, #0x12 - blt _021DD97C - mov r5, #0 -_021DD97C: - sub r4, r4, r6 - bpl _021DD984 - mov r4, #9 - b _021DD98A -_021DD984: - cmp r4, #0xa - blt _021DD98A - mov r4, #0 -_021DD98A: - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, r7 - blt _021DD95C -_021DD994: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DD8F8 - - thumb_func_start ov19_021DD998 -ov19_021DD998: ; 0x021DD998 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DD9A0: - ldr r0, [r5, #0x54] - cmp r0, #0 - beq _021DD9AC - bl sub_02021BD4 - str r6, [r5, #0x54] -_021DD9AC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xa - blt _021DD9A0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD998 - - thumb_func_start ov19_021DD9B8 -ov19_021DD9B8: ; 0x021DD9B8 - cmp r0, #0 - bne _021DD9C8 - cmp r1, #0 - bne _021DD9C4 - mov r0, #1 - bx lr -_021DD9C4: - mov r0, #0 - bx lr -_021DD9C8: - mov r3, #1 - sub r2, r0, #1 - lsl r3, r2 - tst r1, r3 - beq _021DD9D8 - lsl r0, r0, #1 - add r0, r0, #1 - bx lr -_021DD9D8: - lsl r0, r0, #1 - bx lr - thumb_func_end ov19_021DD9B8 - - thumb_func_start ov19_021DD9DC -ov19_021DD9DC: ; 0x021DD9DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r5, r0, #0 - ldr r0, [r5, #4] - bl ov19_021D5EC8 - str r0, [sp, #0x14] - add r0, sp, #0x18 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #6 - lsl r0, r0, #0xa - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, sp, #0x18 - str r0, [sp, #0x10] - mov r0, #0x12 - mov r1, #0x8d - mov r2, #1 - bl sub_02006F00 - add r7, r5, #0 - mov r6, #0 - add r4, r5, #0 - add r7, #0x18 -_021DDA18: - add r0, r5, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r3, r5, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - add r3, #0xac - ldr r3, [r3, #0] - add r0, sp, #0x3c - add r1, sp, #0x18 - add r2, r7, #0 - bl ov19_021D783C - mov r0, #0x30 - str r0, [sp] - mov r0, #2 - mov r2, #0xf0 - str r0, [sp, #4] - add r3, r2, #0 - ldr r0, [r5, #0xc] - add r1, sp, #0x3c - add r3, #0x80 - bl ov19_021D785C - str r0, [r4, #0x34] - cmp r0, #0 - bne _021DDA54 - bl sub_02022974 -_021DDA54: - ldr r1, [sp, #0x14] - add r0, r6, #0 - bl ov19_021DD9B8 - add r1, r0, #0 - ldr r0, [r4, #0x34] - bl sub_02021D6C - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #8 - blt _021DDA18 - ldr r0, [r5, #4] - bl ov19_021D5EC0 - add r5, #0x80 - str r0, [r5, #0] - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DD9DC - - thumb_func_start ov19_021DDA7C -ov19_021DDA7C: ; 0x021DDA7C - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DDA84: - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DDA90 - bl sub_02021BD4 - str r6, [r5, #0x34] -_021DDA90: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021DDA84 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DDA7C - - thumb_func_start ov19_021DDA9C -ov19_021DDA9C: ; 0x021DDA9C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #0x16] - cmp r0, #0 - beq _021DDAB2 - sub r0, r0, #1 - add sp, #0xc - strh r0, [r4, #0x16] - pop {r4, r5, pc} -_021DDAB2: - ldrh r0, [r4, #0x14] - cmp r0, #0 - beq _021DDAE8 - sub r0, r0, #1 - strh r0, [r4, #0x14] - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - add r0, r1, r0 - str r0, [r4, #8] - asr r0, r0, #0xc - lsl r1, r0, #2 - ldr r0, _021DDB18 ; =0x021E028C - ldrsh r0, [r0, r1] - lsl r0, r0, #0xc - str r0, [sp] - ldr r0, _021DDB1C ; =0x021E028E - ldrsh r0, [r0, r1] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, pc} -_021DDAE8: - ldr r0, [r4, #0xc] - asr r0, r0, #0xc - lsl r1, r0, #2 - ldr r0, _021DDB18 ; =0x021E028C - ldrsh r0, [r0, r1] - lsl r0, r0, #0xc - str r0, [sp] - ldr r0, _021DDB1C ; =0x021E028E - ldrsh r0, [r0, r1] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_02021C50 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DDBD0 - add sp, #0xc - pop {r4, r5, pc} - nop -_021DDB18: .word 0x021E028C -_021DDB1C: .word 0x021E028E - thumb_func_end ov19_021DDA9C - - thumb_func_start ov19_021DDB20 -ov19_021DDB20: ; 0x021DDB20 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #0x16] - cmp r0, #0 - beq _021DDB36 - sub r0, r0, #1 - add sp, #0xc - strh r0, [r4, #0x16] - pop {r4, r5, pc} -_021DDB36: - ldrh r0, [r4, #0x14] - cmp r0, #0 - beq _021DDB72 - sub r0, r0, #1 - strh r0, [r4, #0x14] - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - add r0, r1, r0 - str r0, [r4, #8] - asr r0, r0, #0xc - ldr r1, _021DDBC8 ; =0x021E028C - lsl r0, r0, #2 - ldrsh r2, [r1, r0] - mov r1, #1 - lsl r1, r1, #8 - sub r1, r1, r2 - lsl r1, r1, #0xc - str r1, [sp] - ldr r1, _021DDBCC ; =0x021E028E - ldrsh r0, [r1, r0] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, pc} -_021DDB72: - ldr r0, [r4, #0xc] - ldr r1, _021DDBC8 ; =0x021E028C - asr r0, r0, #0xc - lsl r0, r0, #2 - ldrsh r2, [r1, r0] - mov r1, #1 - lsl r1, r1, #8 - sub r1, r1, r2 - lsl r1, r1, #0xc - str r1, [sp] - ldr r1, _021DDBCC ; =0x021E028E - ldrsh r0, [r1, r0] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_02021C50 - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _021DDBBC - ldrh r0, [r4, #0x28] - add sp, #0xc - strh r0, [r4, #0x14] - ldr r0, [r4, #0x1c] - str r0, [r4, #8] - ldr r0, [r4, #0x24] - str r0, [r4, #0x10] - ldr r0, [r4, #0x20] - str r0, [r4, #0xc] - ldrh r0, [r4, #0x2a] - strh r0, [r4, #0x16] - mov r0, #0 - str r0, [r4, #0x18] - pop {r4, r5, pc} -_021DDBBC: - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DDBD0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021DDBC8: .word 0x021E028C -_021DDBCC: .word 0x021E028E - thumb_func_end ov19_021DDB20 - - thumb_func_start ov19_021DDBD0 -ov19_021DDBD0: ; 0x021DDBD0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r1, #0] - ldr r0, _021DDBF4 ; =0x000001CB - ldrb r0, [r4, r0] - cmp r0, #0 - bne _021DDBE2 - bl sub_02022974 -_021DDBE2: - ldr r0, _021DDBF4 ; =0x000001CB - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_021DDBF4: .word 0x000001CB - thumb_func_end ov19_021DDBD0 - - thumb_func_start ov19_021DDBF8 -ov19_021DDBF8: ; 0x021DDBF8 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r6, r0, #0 - add r5, r2, #0 - str r3, [sp] - ldr r4, [sp, #0x20] - cmp r7, #0 - bne _021DDC0C - bl sub_02022974 -_021DDC0C: - cmp r4, #0 - beq _021DDC12 - sub r4, r4, #1 -_021DDC12: - str r6, [r5, #0] - ldr r0, [sp, #0x1c] - str r7, [r5, #4] - strh r0, [r5, #0x14] - ldr r0, [sp, #0x24] - strh r4, [r5, #0x16] - cmp r0, #0 - beq _021DDC26 - ldr r4, _021DDC64 ; =ov19_021DDB20 - b _021DDC28 -_021DDC26: - ldr r4, _021DDC68 ; =ov19_021DDA9C -_021DDC28: - ldr r0, [sp] - ldr r1, _021DDC6C ; =0x021E0264 - lsl r0, r0, #1 - ldrh r0, [r1, r0] - lsl r0, r0, #0xc - str r0, [r5, #8] - ldr r0, [sp, #0x18] - lsl r0, r0, #1 - ldrh r0, [r1, r0] - lsl r1, r0, #0xc - str r1, [r5, #0xc] - ldr r0, [r5, #8] - sub r0, r1, r0 - ldr r1, [sp, #0x1c] - bl sub_020E1F6C - str r0, [r5, #0x10] - mov r2, #0 - add r0, r4, #0 - add r1, r5, #0 - str r2, [r5, #0x18] - bl ov19_021D77C8 - cmp r0, #0 - beq _021DDC62 - ldr r0, _021DDC70 ; =0x000001CB - ldrb r1, [r6, r0] - add r1, r1, #1 - strb r1, [r6, r0] -_021DDC62: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DDC64: .word ov19_021DDB20 -_021DDC68: .word ov19_021DDA9C -_021DDC6C: .word 0x021E0264 -_021DDC70: .word 0x000001CB - thumb_func_end ov19_021DDBF8 - - thumb_func_start ov19_021DDC74 -ov19_021DDC74: ; 0x021DDC74 - push {r4, lr} - add r4, r1, #0 - mov r0, #1 - str r0, [r4, #0x18] - strh r2, [r4, #0x2a] - cmp r2, #0 - beq _021DDC88 - ldrh r0, [r4, #0x2a] - sub r0, r0, #1 - strh r0, [r4, #0x2a] -_021DDC88: - ldr r0, [sp, #8] - sub r2, r0, r3 - bpl _021DDC94 - mov r0, #0 - mvn r0, r0 - mul r2, r0 -_021DDC94: - add r1, r2, #0 - mov r0, #6 - mul r1, r0 - ldr r2, _021DDCBC ; =0x021E0264 - lsl r0, r3, #1 - ldrh r0, [r2, r0] - strh r1, [r4, #0x28] - lsl r0, r0, #0xc - str r0, [r4, #0x1c] - ldr r0, [sp, #8] - lsl r0, r0, #1 - ldrh r0, [r2, r0] - lsl r2, r0, #0xc - str r2, [r4, #0x20] - ldr r0, [r4, #0x1c] - sub r0, r2, r0 - bl sub_020E1F6C - str r0, [r4, #0x24] - pop {r4, pc} - ; .align 2, 0 -_021DDCBC: .word 0x021E0264 - thumb_func_end ov19_021DDC74 - - thumb_func_start ov19_021DDCC0 -ov19_021DDCC0: ; 0x021DDCC0 - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r0, #0x73 - add r4, r1, #0 - lsl r0, r0, #2 - ldrb r3, [r4, r0] - ldr r2, [r4, #0] - cmp r3, #0 - beq _021DDCDE - cmp r3, #1 - beq _021DDD40 - cmp r3, #2 - beq _021DDD58 - add sp, #0x10 - pop {r4, r5, r6, pc} -_021DDCDE: - sub r1, r0, #2 - ldrb r1, [r4, r1] - mov r6, #0x2c - add r3, r1, #1 - sub r1, r0, #2 - strb r3, [r4, r1] - sub r0, r0, #2 - ldrb r3, [r4, r0] - mov r1, #6 - mov r0, #7 - sub r5, r1, r3 - sub r0, r0, r3 - str r0, [sp] - add r0, r5, #1 - mul r1, r0 - str r1, [sp, #4] - mov r3, #0 - str r3, [sp, #8] - lsl r1, r5, #2 - add r1, r2, r1 - str r3, [sp, #0xc] - add r2, r4, #0 - ldr r1, [r1, #0x54] - add r2, #8 - mul r6, r5 - add r0, r4, #0 - add r2, r2, r6 - bl ov19_021DDBF8 - ldr r0, _021DDD70 ; =0x000001CD - mov r1, #4 - strb r1, [r4, r0] - sub r1, r0, #3 - ldrb r1, [r4, r1] - cmp r1, #6 - blo _021DDD30 - mov r1, #2 - sub r0, r0, #1 - add sp, #0x10 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DDD30: - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021DDD6C - mov r1, #1 - sub r0, r0, #1 - add sp, #0x10 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DDD40: - add r1, r0, #1 - ldrb r1, [r4, r1] - sub r2, r1, #2 - add r1, r0, #1 - strb r2, [r4, r1] - ldrb r1, [r4, r1] - cmp r1, #0 - bne _021DDD6C - mov r1, #0 - add sp, #0x10 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DDD58: - sub r1, r0, #1 - ldrb r1, [r4, r1] - cmp r1, #0 - bne _021DDD6C - add r1, r3, #1 - strb r1, [r4, r0] - ldr r1, _021DDD74 ; =ov19_021DDD78 - add r0, r4, #0 - bl ov19_021D79B8 -_021DDD6C: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DDD70: .word 0x000001CD -_021DDD74: .word ov19_021DDD78 - thumb_func_end ov19_021DDCC0 - - thumb_func_start ov19_021DDD78 -ov19_021DDD78: ; 0x021DDD78 - ldr r3, _021DDD7C ; =ov19_021DD358 - bx r3 - ; .align 2, 0 -_021DDD7C: .word ov19_021DD358 - thumb_func_end ov19_021DDD78 - - thumb_func_start ov19_021DDD80 -ov19_021DDD80: ; 0x021DDD80 - push {r3, r4, r5, lr} - mov r1, #0x1d - add r4, r0, #0 - mov r0, #0xa - lsl r1, r1, #4 - bl sub_02018144 - add r5, r0, #0 - beq _021DDDC8 - mov r1, #0x73 - mov r0, #0 - lsl r1, r1, #2 - str r4, [r5, #0] - strb r0, [r5, r1] - sub r2, r1, #2 - strb r0, [r5, r2] - sub r1, r1, #1 - strb r0, [r5, r1] - mov r1, #7 - add r3, r0, #0 - lsl r1, r1, #6 -_021DDDAA: - add r2, r5, r0 - add r0, r0, #1 - strb r3, [r2, r1] - cmp r0, #8 - blt _021DDDAA - ldr r1, _021DDDCC ; =ov19_021DDCC0 - add r0, r4, #0 - add r2, r5, #0 - bl ov19_021DD344 - cmp r0, #0 - bne _021DDDC8 - add r0, r5, #0 - bl sub_020181C4 -_021DDDC8: - pop {r3, r4, r5, pc} - nop -_021DDDCC: .word ov19_021DDCC0 - thumb_func_end ov19_021DDD80 - - thumb_func_start ov19_021DDDD0 -ov19_021DDDD0: ; 0x021DDDD0 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - mov r2, #0x73 - lsl r2, r2, #2 - add r0, r1, #0 - ldrb r3, [r0, r2] - str r1, [sp, #0x10] - ldr r7, [r1, #0] - cmp r3, #0 - beq _021DDDEE - cmp r3, #1 - bne _021DDDEA - b _021DDF86 -_021DDDEA: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} -_021DDDEE: - ldr r1, [r7, #4] - mov r0, #0xa0 - ldrsh r0, [r1, r0] - cmp r0, #0 - ble _021DDE12 - add r0, r7, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r4, r0, #5 - cmp r4, #0xa - blt _021DDE06 - sub r4, #0xa -_021DDE06: - mov r5, #0 - mov r0, #7 - mvn r5, r5 - mov r6, #6 - str r0, [sp, #0x24] - b _021DDE20 -_021DDE12: - add r0, r7, #0 - add r0, #0x80 - ldr r4, [r0, #0] - mov r5, #1 - mov r0, #0 - add r6, r5, #0 - str r0, [sp, #0x24] -_021DDE20: - ldr r1, [r7, #0x7c] - mov r0, #0 - str r0, [sp, #0x34] - cmp r1, #0 - ble _021DDE82 - str r0, [sp, #0x28] - ldr r0, [sp, #0x10] - str r0, [sp, #0x38] - add r0, #8 - str r0, [sp, #0x38] -_021DDE34: - ldr r0, [sp, #0x24] - add r3, r4, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - add r0, r0, #6 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r1, r0, #0 - ldr r2, [r1, #4] - lsl r1, r4, #2 - ldr r1, [r2, r1] - mov r2, #0x2c - mul r3, r2 - ldr r2, [sp, #0x38] - add r2, r2, r3 - add r3, r6, #0 - bl ov19_021DDBF8 - add r4, r4, r5 - add r6, r6, r5 - cmp r4, #0xa - blt _021DDE6A - mov r4, #0 - b _021DDE70 -_021DDE6A: - cmp r4, #0 - bge _021DDE70 - mov r4, #9 -_021DDE70: - ldr r0, [sp, #0x28] - ldr r1, [r7, #0x7c] - add r0, r0, #6 - str r0, [sp, #0x28] - ldr r0, [sp, #0x34] - add r0, r0, #1 - str r0, [sp, #0x34] - cmp r0, r1 - blt _021DDE34 -_021DDE82: - mov r0, #6 - sub r0, r0, r1 - str r0, [sp, #0x30] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x30] - cmp r0, #0 - ble _021DDEE8 - ldr r0, [sp, #0x10] - str r0, [sp, #0x3c] - add r0, #8 - str r0, [sp, #0x3c] -_021DDE9A: - ldr r0, [r7, #0x7c] - add r1, r5, #0 - mul r1, r0 - sub r1, r6, r1 - str r1, [sp] - mov r1, #6 - mul r1, r0 - str r1, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r3, r4, #0 - add r1, r0, #0 - ldr r2, [r1, #4] - lsl r1, r4, #2 - ldr r1, [r2, r1] - mov r2, #0x2c - mul r3, r2 - ldr r2, [sp, #0x3c] - add r2, r2, r3 - add r3, r6, #0 - bl ov19_021DDBF8 - add r4, r4, r5 - add r6, r6, r5 - cmp r4, #0xa - blt _021DDED6 - mov r4, #0 - b _021DDEDC -_021DDED6: - cmp r4, #0 - bge _021DDEDC - mov r4, #9 -_021DDEDC: - ldr r0, [sp, #0x14] - add r1, r0, #1 - ldr r0, [sp, #0x30] - str r1, [sp, #0x14] - cmp r1, r0 - blt _021DDE9A -_021DDEE8: - ldr r1, [r7, #4] - mov r0, #0xa0 - ldrsh r0, [r1, r0] - cmp r0, #0 - ble _021DDEFE - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [r7, #0x7c] - str r0, [sp, #0x20] - str r0, [sp, #0x18] - b _021DDF0C -_021DDEFE: - mov r0, #7 - str r0, [sp, #0x1c] - ldr r0, [r7, #0x7c] - ldr r1, [sp, #0x1c] - str r0, [sp, #0x20] - sub r0, r1, r0 - str r0, [sp, #0x18] -_021DDF0C: - ldr r0, [sp, #0x20] - mov r6, #0 - cmp r0, #0 - ble _021DDF74 - ldr r0, [sp, #0x10] - str r6, [sp, #0x2c] - str r0, [sp, #0x40] - add r0, #8 - str r0, [sp, #0x40] -_021DDF1E: - ldr r0, [sp, #0x18] - add r3, r4, #0 - str r0, [sp] - ldr r0, [r7, #0x7c] - sub r1, r0, r6 - mov r0, #6 - mul r0, r1 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - add r0, r0, #6 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r1, r0, #0 - ldr r2, [r1, #4] - lsl r1, r4, #2 - ldr r1, [r2, r1] - mov r2, #0x2c - mul r3, r2 - ldr r2, [sp, #0x40] - add r2, r2, r3 - ldr r3, [sp, #0x1c] - bl ov19_021DDBF8 - ldr r0, [sp, #0x18] - add r4, r4, r5 - add r0, r0, r5 - str r0, [sp, #0x18] - cmp r4, #0xa - blt _021DDF60 - sub r4, #0xa - b _021DDF66 -_021DDF60: - cmp r4, #0 - bge _021DDF66 - add r4, #0xa -_021DDF66: - ldr r0, [sp, #0x2c] - add r6, r6, #1 - add r0, r0, #6 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x20] - cmp r6, r0 - blt _021DDF1E -_021DDF74: - mov r1, #0x73 - ldr r0, [sp, #0x10] - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r2, r0, #1 - ldr r0, [sp, #0x10] - add sp, #0x44 - strb r2, [r0, r1] - pop {r4, r5, r6, r7, pc} -_021DDF86: - ldr r0, [sp, #0x10] - sub r1, r2, #1 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021DDF9E - ldr r0, [sp, #0x10] - add r1, r3, #1 - strb r1, [r0, r2] - ldr r1, _021DDFA4 ; =ov19_021DDD78 - add r2, r7, #0 - bl ov19_021D79B8 -_021DDF9E: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_021DDFA4: .word ov19_021DDD78 - thumb_func_end ov19_021DDDD0 - - thumb_func_start ov19_021DDFA8 -ov19_021DDFA8: ; 0x021DDFA8 - push {r3, r4, r5, lr} - mov r1, #0x1d - add r4, r0, #0 - mov r0, #0xa - lsl r1, r1, #4 - bl sub_02018144 - add r5, r0, #0 - beq _021DDFF6 - add r0, r4, #0 - mov r1, #0x73 - lsl r1, r1, #2 - str r4, [r5, #0] - add r0, #0x54 - str r0, [r5, #4] - mov r0, #0 - strb r0, [r5, r1] - sub r2, r1, #2 - strb r0, [r5, r2] - sub r1, r1, #1 - strb r0, [r5, r1] - mov r1, #7 - add r3, r0, #0 - lsl r1, r1, #6 -_021DDFD8: - add r2, r5, r0 - add r0, r0, #1 - strb r3, [r2, r1] - cmp r0, #0xa - blt _021DDFD8 - ldr r1, _021DDFF8 ; =ov19_021DDDD0 - add r0, r4, #0 - add r2, r5, #0 - bl ov19_021DD344 - cmp r0, #0 - bne _021DDFF6 - add r0, r5, #0 - bl sub_020181C4 -_021DDFF6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DDFF8: .word ov19_021DDDD0 - thumb_func_end ov19_021DDFA8 - - thumb_func_start ov19_021DDFFC -ov19_021DDFFC: ; 0x021DDFFC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - ldr r0, [r1, #0] - mov r2, #0x73 - str r0, [sp, #0x18] - lsl r2, r2, #2 - add r0, r1, #0 - ldrb r3, [r0, r2] - str r1, [sp, #0x10] - cmp r3, #0 - beq _021DE01A - cmp r3, #1 - beq _021DE07E - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_021DE01A: - ldr r0, [sp, #0x18] - mov r5, #0 - add r0, #0x80 - ldr r4, [r0, #0] - add r0, r1, #0 - str r0, [sp, #0x1c] - add r0, #8 - mov r7, #6 - str r5, [sp, #0x14] - mov r6, #0x24 - str r0, [sp, #0x1c] -_021DE030: - str r7, [sp] - str r6, [sp, #4] - ldr r1, [sp, #0x18] - lsl r2, r4, #2 - add r1, r1, r2 - str r5, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r2, #0x2c - add r3, r4, #0 - mul r3, r2 - ldr r2, [sp, #0x1c] - ldr r0, [sp, #0x10] - add r2, r2, r3 - ldr r1, [r1, #0x34] - mov r3, #0 - bl ov19_021DDBF8 - add r4, r4, #1 - sub r6, r6, #6 - sub r7, r7, #1 - cmp r4, #8 - blt _021DE060 - mov r4, #0 -_021DE060: - ldr r0, [sp, #0x14] - add r5, r5, #6 - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #6 - blt _021DE030 - mov r1, #0x73 - ldr r0, [sp, #0x10] - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r2, r0, #1 - ldr r0, [sp, #0x10] - add sp, #0x20 - strb r2, [r0, r1] - pop {r3, r4, r5, r6, r7, pc} -_021DE07E: - ldr r0, [sp, #0x10] - sub r1, r2, #1 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021DE096 - ldr r0, [sp, #0x10] - add r1, r3, #1 - strb r1, [r0, r2] - ldr r1, _021DE09C ; =ov19_021DDD78 - ldr r2, [sp, #0x18] - bl ov19_021D79B8 -_021DE096: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DE09C: .word ov19_021DDD78 - thumb_func_end ov19_021DDFFC - - thumb_func_start ov19_021DE0A0 -ov19_021DE0A0: ; 0x021DE0A0 - push {r3, r4, r5, lr} - mov r1, #0x1d - add r4, r0, #0 - mov r0, #0xa - lsl r1, r1, #4 - bl sub_02018144 - add r5, r0, #0 - beq _021DE0E8 - mov r1, #0x73 - mov r0, #0 - lsl r1, r1, #2 - str r4, [r5, #0] - strb r0, [r5, r1] - sub r2, r1, #2 - strb r0, [r5, r2] - sub r1, r1, #1 - strb r0, [r5, r1] - mov r1, #7 - add r3, r0, #0 - lsl r1, r1, #6 -_021DE0CA: - add r2, r5, r0 - add r0, r0, #1 - strb r3, [r2, r1] - cmp r0, #8 - blt _021DE0CA - ldr r1, _021DE0EC ; =ov19_021DDFFC - add r0, r4, #0 - add r2, r5, #0 - bl ov19_021DD344 - cmp r0, #0 - bne _021DE0E8 - add r0, r5, #0 - bl sub_020181C4 -_021DE0E8: - pop {r3, r4, r5, pc} - nop -_021DE0EC: .word ov19_021DDFFC - thumb_func_end ov19_021DE0A0 - - thumb_func_start ov19_021DE0F0 -ov19_021DE0F0: ; 0x021DE0F0 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - ldr r0, [r1, #0] - mov r2, #0x73 - str r0, [sp, #0x34] - lsl r2, r2, #2 - add r0, r1, #0 - ldrb r3, [r0, r2] - str r1, [sp, #0x10] - cmp r3, #0 - beq _021DE110 - cmp r3, #1 - bne _021DE10C - b _021DE282 -_021DE10C: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} -_021DE110: - ldr r0, [sp, #0x34] - ldr r0, [r0, #4] - bl ov19_021D5EB0 - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - add r0, #0x80 - ldr r4, [r0, #0] - ldr r0, [sp, #0x30] - cmp r0, #0 - bge _021DE140 - add r4, r4, #5 - cmp r4, #8 - blt _021DE12E - sub r4, #8 -_021DE12E: - ldr r0, [sp, #0x30] - mov r5, #0 - neg r0, r0 - str r0, [sp, #0x28] - mov r0, #0 - mvn r5, r5 - mov r6, #1 - str r0, [sp, #0x18] - b _021DE14A -_021DE140: - str r0, [sp, #0x28] - mov r0, #7 - mov r5, #1 - mov r6, #6 - str r0, [sp, #0x18] -_021DE14A: - ldr r0, [sp, #0x28] - mov r7, #0 - add r0, r0, #6 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - cmp r0, #0 - ble _021DE1AC - ldr r0, [sp, #0x10] - str r7, [sp, #0x1c] - str r0, [sp, #0x38] - add r0, #8 - str r0, [sp, #0x38] -_021DE162: - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x34] - str r0, [sp] - ldr r0, [sp, #0x1c] - lsl r2, r4, #2 - add r0, r0, #6 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - add r1, r1, r2 - str r0, [sp, #0xc] - mov r2, #0x2c - add r3, r4, #0 - mul r3, r2 - ldr r2, [sp, #0x38] - ldr r0, [sp, #0x10] - add r2, r2, r3 - ldr r1, [r1, #0x34] - add r3, r6, #0 - bl ov19_021DDBF8 - sub r6, r6, r5 - add r4, r4, r5 - bpl _021DE198 - add r4, #8 - b _021DE19E -_021DE198: - cmp r4, #8 - blt _021DE19E - sub r4, #8 -_021DE19E: - ldr r0, [sp, #0x1c] - add r7, r7, #1 - add r0, r0, #6 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x28] - cmp r7, r0 - blt _021DE162 -_021DE1AC: - mov r0, #0 - str r0, [sp, #0x24] - cmp r7, #8 - bge _021DE218 - ldr r0, [sp, #0x28] - mov r1, #6 - mul r1, r0 - ldr r0, [sp, #0x10] - str r1, [sp, #0x20] - str r0, [sp, #0x3c] - add r0, #8 - str r0, [sp, #0x3c] -_021DE1C4: - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x34] - sub r0, r0, r5 - str r0, [sp, #0x18] - str r0, [sp] - ldr r0, [sp, #0x20] - lsl r2, r4, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x24] - add r1, r1, r2 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r2, #0x2c - add r3, r4, #0 - mul r3, r2 - ldr r2, [sp, #0x3c] - ldr r0, [sp, #0x10] - add r2, r2, r3 - ldr r1, [r1, #0x34] - add r3, r6, #0 - bl ov19_021DDBF8 - cmp r6, #0 - beq _021DE1FE - cmp r6, #7 - beq _021DE1FE - sub r6, r6, r5 - b _021DE204 -_021DE1FE: - ldr r0, [sp, #0x24] - add r0, r0, #6 - str r0, [sp, #0x24] -_021DE204: - add r4, r4, r5 - bpl _021DE20C - add r4, #8 - b _021DE212 -_021DE20C: - cmp r4, #8 - blt _021DE212 - sub r4, #8 -_021DE212: - add r7, r7, #1 - cmp r7, #8 - blt _021DE1C4 -_021DE218: - ldr r0, [sp, #0x30] - cmp r0, #0 - bge _021DE22C - mov r0, #7 - str r0, [sp, #0x14] - ldr r0, [sp, #0x28] - sub r1, r0, #2 - ldr r0, [sp, #0x14] - sub r6, r0, r1 - b _021DE234 -_021DE22C: - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x28] - sub r6, r0, #2 -_021DE234: - ldr r0, [sp, #0x2c] - cmp r7, r0 - bge _021DE270 - ldr r0, [sp, #0x10] - str r0, [sp, #0x40] - add r0, #8 - str r0, [sp, #0x40] -_021DE242: - mov r1, #0x2c - add r2, r4, #0 - mul r2, r1 - ldr r1, [sp, #0x40] - ldr r0, [sp, #0x10] - add r1, r1, r2 - ldr r3, [sp, #0x14] - mov r2, #6 - str r6, [sp] - bl ov19_021DDC74 - sub r6, r6, r5 - add r4, r4, r5 - bpl _021DE262 - add r4, #8 - b _021DE268 -_021DE262: - cmp r4, #8 - blt _021DE268 - sub r4, #8 -_021DE268: - ldr r0, [sp, #0x2c] - add r7, r7, #1 - cmp r7, r0 - blt _021DE242 -_021DE270: - mov r1, #0x73 - ldr r0, [sp, #0x10] - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r2, r0, #1 - ldr r0, [sp, #0x10] - add sp, #0x44 - strb r2, [r0, r1] - pop {r4, r5, r6, r7, pc} -_021DE282: - ldr r0, [sp, #0x10] - sub r1, r2, #1 - ldrb r0, [r0, r1] - cmp r0, #0 - bne _021DE29A - ldr r0, [sp, #0x10] - add r1, r3, #1 - strb r1, [r0, r2] - ldr r1, _021DE2A0 ; =ov19_021DDD78 - ldr r2, [sp, #0x34] - bl ov19_021D79B8 -_021DE29A: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_021DE2A0: .word ov19_021DDD78 - thumb_func_end ov19_021DE0F0 - - thumb_func_start ov19_021DE2A4 -ov19_021DE2A4: ; 0x021DE2A4 - push {r3, r4, r5, lr} - mov r1, #0x1d - add r4, r0, #0 - mov r0, #0xa - lsl r1, r1, #4 - bl sub_02018144 - add r5, r0, #0 - beq _021DE2EC - mov r1, #0x73 - mov r0, #0 - lsl r1, r1, #2 - str r4, [r5, #0] - strb r0, [r5, r1] - sub r2, r1, #2 - strb r0, [r5, r2] - sub r1, r1, #1 - strb r0, [r5, r1] - mov r1, #7 - add r3, r0, #0 - lsl r1, r1, #6 -_021DE2CE: - add r2, r5, r0 - add r0, r0, #1 - strb r3, [r2, r1] - cmp r0, #8 - blt _021DE2CE - ldr r1, _021DE2F0 ; =ov19_021DE0F0 - add r0, r4, #0 - add r2, r5, #0 - bl ov19_021DD344 - cmp r0, #0 - bne _021DE2EC - add r0, r5, #0 - bl sub_020181C4 -_021DE2EC: - pop {r3, r4, r5, pc} - nop -_021DE2F0: .word ov19_021DE0F0 - thumb_func_end ov19_021DE2A4 - - thumb_func_start ov19_021DE2F4 -ov19_021DE2F4: ; 0x021DE2F4 - push {r4, r5, r6, lr} - add r5, r0, #0 - beq _021DE322 - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021DE322 - ldr r0, [r5, #4] - bl ov19_021D5EC8 - add r6, r0, #0 - mov r4, #0 -_021DE30A: - add r0, r4, #0 - add r1, r6, #0 - bl ov19_021DD9B8 - add r1, r0, #0 - ldr r0, [r5, #0x34] - bl sub_02021D6C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021DE30A -_021DE322: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DE2F4 - - thumb_func_start ov19_021DE324 -ov19_021DE324: ; 0x021DE324 - ldr r3, _021DE32C ; =sub_02019120 - mov r0, #4 - mov r1, #0 - bx r3 - ; .align 2, 0 -_021DE32C: .word sub_02019120 - thumb_func_end ov19_021DE324 - - thumb_func_start ov19_021DE330 -ov19_021DE330: ; 0x021DE330 - push {r3, lr} - mov r0, #2 - str r0, [sp] - ldr r0, _021DE34C ; =0x04001050 - mov r1, #1 - mov r2, #0x3f - mov r3, #0xe - bl sub_020BF55C - mov r0, #4 - mov r1, #1 - bl sub_02019120 - pop {r3, pc} - ; .align 2, 0 -_021DE34C: .word 0x04001050 - thumb_func_end ov19_021DE330 - - thumb_func_start ov19_021DE350 -ov19_021DE350: ; 0x021DE350 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldr r0, [r6, #4] - bl ov19_021D5EB8 - add r4, r0, #3 - cmp r4, #0x12 - blt _021DE364 - sub r4, #0x12 -_021DE364: - mov r0, #0 - add r7, r6, #0 - ldr r5, _021DE3E0 ; =0x021E0274 - str r0, [sp, #0x10] - add r7, #0x88 -_021DE36E: - ldr r0, [r6, #4] - add r2, r6, #0 - add r2, #0x84 - ldr r0, [r0, #0] - ldr r2, [r2, #0] - add r1, r4, #0 - bl sub_02079AF4 - mov r0, #0x68 - str r0, [sp] - mov r0, #0x11 - str r0, [sp, #4] - ldrh r2, [r5] - ldrh r3, [r5, #2] - add r0, r7, #0 - mov r1, #0 - bl sub_0201AE78 - mov r0, #2 - ldrsh r0, [r5, r0] - mov r1, #0 - add r2, r6, #0 - add r0, r0, #2 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DE3E4 ; =0x00010200 - add r3, r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldrsh r3, [r5, r3] - add r2, #0x84 - ldr r2, [r2, #0] - add r0, r7, #0 - add r3, r3, #4 - bl sub_0201D78C - sub r4, r4, #1 - bpl _021DE3C0 - mov r4, #0x11 -_021DE3C0: - ldr r0, [sp, #0x10] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #6 - blo _021DE36E - add r0, r6, #0 - add r0, #0x88 - bl sub_0201ACCC - add r0, r6, #0 - bl ov19_021DE330 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DE3E0: .word 0x021E0274 -_021DE3E4: .word 0x00010200 - thumb_func_end ov19_021DE350 - - thumb_func_start ov19_021DE3E8 -ov19_021DE3E8: ; 0x021DE3E8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0xa - mov r1, #0x3c - add r6, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _021DE43C - str r5, [r4, #4] - ldr r0, [sp] - str r6, [r4, #8] - str r0, [r4, #0xc] - ldr r0, [sp, #0x18] - str r0, [r4, #0x10] - add r0, r5, #0 - bl ov19_021D77D8 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov19_021D77F4 - str r0, [r4, #0x18] - mov r0, #0 - str r0, [r4, #0x34] - add r0, r6, #0 - bl ov19_021D5E08 - cmp r0, #3 - bne _021DE42C - mov r0, #1 - b _021DE42E -_021DE42C: - mov r0, #0 -_021DE42E: - str r0, [r4, #0] - add r0, r4, #0 - bl ov19_021DE450 - str r4, [r7, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DE43C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DE3E8 - - thumb_func_start ov19_021DE440 -ov19_021DE440: ; 0x021DE440 - push {r4, lr} - add r4, r0, #0 - bl ov19_021DE51C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov19_021DE440 - - thumb_func_start ov19_021DE450 -ov19_021DE450: ; 0x021DE450 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - add r6, r0, #0 - ldr r0, [r6, #0] - cmp r0, #0 - beq _021DE500 - ldr r4, [r6, #0x14] - ldr r0, [r6, #4] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r4, #0x20] - add r1, sp, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r3, [r4, #0x1c] - add r0, sp, #0x34 - bl ov19_021D783C - mov r0, #1 - add r1, r0, #0 - bl sub_0207CE78 - add r1, r0, #0 - mov r0, #0xa - str r0, [sp] - mov r0, #0x10 - mov r2, #0 - add r3, sp, #0xc - bl sub_02006F50 - str r0, [sp, #8] - cmp r0, #0 - beq _021DE510 - mov r0, #1 - lsl r0, r0, #0x1a - ldr r1, [r0, #0] - ldr r0, _021DE514 ; =0x00300010 - ldr r4, _021DE518 ; =0x021E04CC - and r1, r0 - ldr r0, [sp, #0xc] - mov r7, #0 - str r1, [r0, #8] - add r5, r6, #0 -_021DE4AA: - add r0, sp, #0x10 - bl sub_020A818C - ldr r0, [sp, #0xc] - ldr r1, [r4, #0] - mov r2, #1 - add r3, sp, #0x10 - bl sub_020A8224 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r2, #0 - ldr r0, [r6, #0x10] - add r1, sp, #0x34 - add r3, r2, #0 - bl ov19_021D785C - str r0, [r5, #0x1c] - ldr r1, [r4, #4] - bl sub_02021E90 - ldr r0, [r5, #0x1c] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #0x1c] - mov r1, #1 - bl sub_02021CF8 - mov r0, #0 - str r0, [r5, #0x28] - add r7, r7, #1 - add r4, #8 - add r5, r5, #4 - cmp r7, #3 - blt _021DE4AA - ldr r0, [sp, #8] - bl sub_020181C4 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_021DE500: - mov r1, #0 - add r0, r1, #0 -_021DE504: - str r0, [r6, #0x1c] - str r0, [r6, #0x28] - add r1, r1, #1 - add r6, r6, #4 - cmp r1, #3 - blt _021DE504 -_021DE510: - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE514: .word 0x00300010 -_021DE518: .word 0x021E04CC - thumb_func_end ov19_021DE450 - - thumb_func_start ov19_021DE51C -ov19_021DE51C: ; 0x021DE51C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021DE522: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _021DE52C - bl sub_02021BD4 -_021DE52C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DE522 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DE51C - - thumb_func_start ov19_021DE538 -ov19_021DE538: ; 0x021DE538 - push {r3, r4} - mov r3, #0 - add r4, r0, #0 -_021DE53E: - ldr r2, [r4, #0x28] - cmp r2, #0 - bne _021DE550 - lsl r2, r3, #2 - add r0, r0, r2 - str r1, [r0, #0x28] - add r0, r3, #0 - pop {r3, r4} - bx lr -_021DE550: - add r3, r3, #1 - add r4, r4, #4 - cmp r3, #3 - blt _021DE53E - mov r0, #0 - mvn r0, r0 - pop {r3, r4} - bx lr - thumb_func_end ov19_021DE538 - - thumb_func_start ov19_021DE560 -ov19_021DE560: ; 0x021DE560 - mov r3, #0 -_021DE562: - ldr r2, [r0, #0x28] - cmp r1, r2 - bne _021DE56C - add r0, r3, #0 - bx lr -_021DE56C: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, #3 - blt _021DE562 - mov r0, #0 - mvn r0, r0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DE560 - - thumb_func_start ov19_021DE57C -ov19_021DE57C: ; 0x021DE57C - lsl r1, r1, #2 - add r0, r0, r1 - str r2, [r0, #0x28] - bx lr - thumb_func_end ov19_021DE57C - - thumb_func_start ov19_021DE584 -ov19_021DE584: ; 0x021DE584 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021DE598 - bl ov19_021DE59C - add r0, r4, #0 - bl ov19_021DE5D4 -_021DE598: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DE584 - - thumb_func_start ov19_021DE59C -ov19_021DE59C: ; 0x021DE59C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5E74 - add r4, r0, #0 - beq _021DE5D2 - add r0, r5, #0 - mov r1, #1 - bl ov19_021DE538 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov19_021DE718 - add r5, #0x1c - lsl r4, r6, #2 - ldr r0, [r5, r4] - mov r1, #6 - bl sub_02021D6C - ldr r0, [r5, r4] - mov r1, #1 - bl sub_02021CAC -_021DE5D2: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DE59C - - thumb_func_start ov19_021DE5D4 -ov19_021DE5D4: ; 0x021DE5D4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5F7C - add r7, r0, #0 - beq _021DE688 - add r0, r5, #0 - mov r1, #3 - bl ov19_021DE538 - add r6, r0, #0 - ldr r0, [r5, #0x18] - add r1, sp, #0x10 - bl ov19_021D9B1C - mov r0, #2 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x14] - ldr r0, [r5, #8] - bl ov19_021D5E10 - cmp r0, #1 - bne _021DE610 - mov r0, #1 - str r0, [sp, #0xc] - b _021DE614 -_021DE610: - mov r0, #2 - str r0, [sp, #0xc] -_021DE614: - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - mov r1, #1 - lsl r4, r6, #3 - bl sub_0207CE78 - mov r2, #0 - ldr r3, _021DE68C ; =0x021E04CC - str r2, [sp] - add r1, r0, #0 - str r2, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - ldr r3, [r3, r4] - mov r0, #0x10 - bl sub_02006EC0 - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - mov r1, #2 - bl sub_0207CE78 - ldr r3, _021DE690 ; =0x021E04D0 - add r1, r0, #0 - mov r0, #0x20 - ldr r3, [r3, r4] - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0x10 - mov r2, #1 - lsl r3, r3, #5 - bl sub_02006E84 - ldr r1, [sp, #0xc] - add r5, #0x1c - lsl r4, r6, #2 - lsl r1, r1, #0x18 - ldr r0, [r5, r4] - lsr r1, r1, #0x18 - bl sub_02021E80 - ldr r0, [r5, r4] - mov r1, #2 - bl ov19_021D78AC - ldr r0, [r5, r4] - add r1, sp, #0x10 - bl sub_02021C50 - ldr r0, [r5, r4] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r5, r4] - mov r1, #1 - bl sub_02021CAC -_021DE688: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE68C: .word 0x021E04CC -_021DE690: .word 0x021E04D0 - thumb_func_end ov19_021DE5D4 - - thumb_func_start ov19_021DE694 -ov19_021DE694: ; 0x021DE694 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #8] - add r6, r2, #0 - bl ov19_021D5E10 - cmp r0, #1 - ldr r0, [r5, #4] - bne _021DE6DE - bl ov19_021D77E8 - add r7, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5E2C - add r1, r0, #0 - add r0, r7, #0 - add r2, sp, #4 - add r3, sp, #0 - bl ov19_021DCD30 - ldr r0, [sp, #4] - add r0, #0xa - lsl r0, r0, #0xc - str r0, [r4, #0] - ldr r0, [sp] - add sp, #8 - add r0, #8 - lsl r0, r0, #0xc - str r0, [r4, #4] - mov r0, #1 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_021DE6DE: - bl ov19_021D7820 - add r7, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5E14 - mov r1, #0x18 - add r7, #0x70 - mul r1, r0 - add r0, r7, r1 - add r0, #0xa - str r0, [r4, #0] - ldr r0, [r5, #8] - bl ov19_021D5E1C - mov r1, #0x18 - mul r1, r0 - add r1, #0x30 - str r1, [r4, #4] - ldr r0, [r4, #0] - lsl r0, r0, #0xc - str r0, [r4, #0] - ldr r0, [r4, #4] - lsl r0, r0, #0xc - str r0, [r4, #4] - mov r0, #2 - str r0, [r6, #0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DE694 - - thumb_func_start ov19_021DE718 -ov19_021DE718: ; 0x021DE718 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - add r7, r2, #0 - cmp r4, #0 - blt _021DE792 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov19_021DE694 - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - mov r1, #1 - lsl r6, r4, #3 - bl sub_0207CE78 - mov r2, #0 - ldr r3, _021DE798 ; =0x021E04CC - str r2, [sp] - add r1, r0, #0 - str r2, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - ldr r3, [r3, r6] - mov r0, #0x10 - bl sub_02006EC0 - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - mov r1, #2 - bl sub_0207CE78 - ldr r3, _021DE79C ; =0x021E04D0 - add r1, r0, #0 - mov r0, #0x20 - ldr r3, [r3, r6] - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0x10 - mov r2, #1 - lsl r3, r3, #5 - bl sub_02006E84 - ldr r1, [sp, #0xc] - add r5, #0x1c - lsl r4, r4, #2 - lsl r1, r1, #0x18 - ldr r0, [r5, r4] - lsr r1, r1, #0x18 - bl sub_02021E80 - ldr r0, [r5, r4] - mov r1, #3 - bl ov19_021D78AC - ldr r0, [r5, r4] - add r1, sp, #0x10 - bl sub_02021C50 -_021DE792: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021DE798: .word 0x021E04CC -_021DE79C: .word 0x021E04D0 - thumb_func_end ov19_021DE718 - - thumb_func_start ov19_021DE7A0 -ov19_021DE7A0: ; 0x021DE7A0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DE7FE - mov r1, #1 - bl ov19_021DE560 - add r4, r0, #0 - bmi _021DE7CA - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov19_021DE57C - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - mov r1, #2 - bl sub_02021D6C -_021DE7CA: - ldr r0, [r5, #8] - bl ov19_021D5E74 - add r6, r0, #0 - beq _021DE7FE - add r0, r5, #0 - mov r1, #1 - bl ov19_021DE538 - add r4, r0, #0 - bmi _021DE7FE - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov19_021DE718 - add r5, #0x1c - lsl r4, r4, #2 - ldr r0, [r5, r4] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r5, r4] - mov r1, #1 - bl sub_02021CAC -_021DE7FE: - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DE7A0 - - thumb_func_start ov19_021DE800 -ov19_021DE800: ; 0x021DE800 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - cmp r1, #0 - bne _021DE80E - mov r0, #1 - pop {r3, r4, r5, pc} -_021DE80E: - mov r1, #1 - bl ov19_021DE560 - cmp r0, #0 - blt _021DE82A - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - bl sub_02021FD0 - cmp r0, #0 - beq _021DE82A - mov r0, #0 - pop {r3, r4, r5, pc} -_021DE82A: - add r0, r5, #0 - mov r1, #2 - bl ov19_021DE560 - add r4, r0, #0 - bmi _021DE852 - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - bl sub_02021FD0 - cmp r0, #0 - beq _021DE848 - mov r0, #0 - pop {r3, r4, r5, pc} -_021DE848: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov19_021DE57C -_021DE852: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DE800 - - thumb_func_start ov19_021DE858 -ov19_021DE858: ; 0x021DE858 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - mov r0, #0xa - mov r1, #0x34 - add r6, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _021DE8DA - lsl r0, r7, #2 - str r5, [r4, #0] - add r0, r5, r0 - ldr r0, [r0, #0x1c] - str r0, [r4, #4] - bl sub_02021D28 - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #8 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r2, r4, #0 - ldmia r6!, {r0, r1} - add r2, #0x14 - stmia r2!, {r0, r1} - ldr r0, [r6, #0] - ldr r6, [sp, #0x18] - str r0, [r2, #0] - ldr r1, [r4, #0x14] - ldr r0, [r4, #8] - sub r0, r1, r0 - add r1, r6, #0 - bl sub_020E1F6C - str r0, [r4, #0x20] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0xc] - sub r0, r1, r0 - add r1, r6, #0 - bl sub_020E1F6C - str r0, [r4, #0x24] - ldr r0, [sp, #0x18] - mov r2, #0 - str r0, [r4, #0x2c] - ldr r0, [sp] - add r1, r4, #0 - str r0, [r4, #0x28] - ldr r0, _021DE8DC ; =ov19_021DE8E0 - str r2, [r4, #0x30] - bl ov19_021D77C8 - cmp r0, #0 - beq _021DE8D4 - ldr r0, [r5, #0x34] - add r0, r0, #1 - str r0, [r5, #0x34] - pop {r3, r4, r5, r6, r7, pc} -_021DE8D4: - add r0, r4, #0 - bl sub_020181C4 -_021DE8DA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE8DC: .word ov19_021DE8E0 - thumb_func_end ov19_021DE858 - - thumb_func_start ov19_021DE8E0 -ov19_021DE8E0: ; 0x021DE8E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _021DE8F2 - cmp r0, #1 - beq _021DE928 - pop {r3, r4, r5, pc} -_021DE8F2: - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021DE918 - ldr r2, [r4, #8] - ldr r0, [r4, #0x20] - add r1, #8 - add r0, r2, r0 - str r0, [r4, #8] - ldr r2, [r4, #0xc] - ldr r0, [r4, #0x24] - add r0, r2, r0 - str r0, [r4, #0xc] - ldr r0, [r4, #4] - bl sub_02021C50 - ldr r0, [r4, #0x2c] - sub r0, r0, #1 - str r0, [r4, #0x2c] - pop {r3, r4, r5, pc} -_021DE918: - ldr r0, [r4, #4] - add r1, #0x14 - bl sub_02021C50 - ldr r0, [r4, #0x30] - add r0, r0, #1 - str r0, [r4, #0x30] - pop {r3, r4, r5, pc} -_021DE928: - ldr r0, [r4, #4] - bl sub_02021FD0 - cmp r0, #0 - bne _021DE952 - ldr r0, [r4, #4] - ldr r1, [r4, #0x28] - bl ov19_021D78AC - ldr r1, [r4, #0] - ldr r0, [r1, #0x34] - sub r0, r0, #1 - str r0, [r1, #0x34] - add r0, r5, #0 - bl sub_0200DA58 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov19_021D79B8 -_021DE952: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DE8E0 - - thumb_func_start ov19_021DE954 -ov19_021DE954: ; 0x021DE954 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DE9A2 - mov r1, #1 - bl ov19_021DE560 - add r4, r0, #0 - bmi _021DE9A2 - ldr r0, [r5, #0x18] - add r1, sp, #4 - bl ov19_021D9B1C - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #3 - bl ov19_021DE57C - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - mov r1, #3 - bl sub_02021D6C - mov r0, #0xc - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #4 - mov r3, #2 - bl ov19_021DE858 -_021DE9A2: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DE954 - - thumb_func_start ov19_021DE9A8 -ov19_021DE9A8: ; 0x021DE9A8 - ldr r0, [r0, #0x34] - cmp r0, #0 - bne _021DE9B2 - mov r0, #1 - bx lr -_021DE9B2: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DE9A8 - - thumb_func_start ov19_021DE9B8 -ov19_021DE9B8: ; 0x021DE9B8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021DE9E2 - mov r1, #1 - bl ov19_021DE560 - add r5, r0, #0 - bmi _021DE9E2 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #2 - bl ov19_021DE57C - lsl r0, r5, #2 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - mov r1, #2 - bl sub_02021D6C -_021DE9E2: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DE9B8 - - thumb_func_start ov19_021DE9E4 -ov19_021DE9E4: ; 0x021DE9E4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DEA14 - mov r1, #2 - bl ov19_021DE560 - add r4, r0, #0 - bmi _021DEA14 - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - bl sub_02021FD0 - cmp r0, #0 - beq _021DEA0A - mov r0, #0 - pop {r3, r4, r5, pc} -_021DEA0A: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov19_021DE57C -_021DEA14: - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DE9E4 - - thumb_func_start ov19_021DEA18 -ov19_021DEA18: ; 0x021DEA18 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DEA5E - mov r1, #3 - bl ov19_021DE560 - add r4, r0, #0 - bmi _021DEA5E - add r0, r5, #0 - add r1, sp, #8 - add r2, sp, #4 - bl ov19_021DE694 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov19_021DE57C - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - mov r1, #4 - bl sub_02021D6C - mov r0, #0xc - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #8 - mov r3, #3 - bl ov19_021DE858 -_021DEA5E: - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEA18 - - thumb_func_start ov19_021DEA64 -ov19_021DEA64: ; 0x021DEA64 - ldr r0, [r0, #0x34] - cmp r0, #0 - bne _021DEA6E - mov r0, #1 - bx lr -_021DEA6E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DEA64 - - thumb_func_start ov19_021DEA74 -ov19_021DEA74: ; 0x021DEA74 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DEB02 - mov r1, #3 - bl ov19_021DE560 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl ov19_021DE560 - add r6, r0, #0 - cmp r4, #0 - blt _021DEB02 - cmp r6, #0 - blt _021DEB02 - add r0, r5, #0 - add r1, sp, #8 - add r2, sp, #4 - bl ov19_021DE694 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov19_021DE57C - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - mov r1, #4 - bl sub_02021D6C - mov r0, #0xc - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #8 - mov r3, #3 - bl ov19_021DE858 - ldr r0, [r5, #0x18] - add r1, sp, #8 - bl ov19_021D9B1C - mov r0, #2 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #3 - bl ov19_021DE57C - lsl r0, r6, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - mov r1, #3 - bl sub_02021D6C - mov r0, #0xc - str r0, [sp] - add r0, r5, #0 - add r1, r6, #0 - add r2, sp, #8 - mov r3, #2 - bl ov19_021DE858 -_021DEB02: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEA74 - - thumb_func_start ov19_021DEB08 -ov19_021DEB08: ; 0x021DEB08 - ldr r0, [r0, #0x34] - cmp r0, #0 - bne _021DEB12 - mov r0, #1 - bx lr -_021DEB12: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DEB08 - - thumb_func_start ov19_021DEB18 -ov19_021DEB18: ; 0x021DEB18 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021DEB5E - mov r1, #3 - bl ov19_021DE560 - add r5, r0, #0 - bmi _021DEB3C - lsl r0, r5, #2 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - mov r1, #5 - bl sub_02021D6C - str r5, [r4, #0x38] - pop {r3, r4, r5, pc} -_021DEB3C: - add r0, r4, #0 - mov r1, #1 - bl ov19_021DE560 - add r5, r0, #0 - bmi _021DEB58 - lsl r0, r5, #2 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - mov r1, #2 - bl sub_02021D6C - str r5, [r4, #0x38] - pop {r3, r4, r5, pc} -_021DEB58: - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x38] -_021DEB5E: - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DEB18 - - thumb_func_start ov19_021DEB60 -ov19_021DEB60: ; 0x021DEB60 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021DEB96 - mov r0, #0 - ldr r1, [r4, #0x38] - mvn r0, r0 - cmp r1, r0 - beq _021DEB96 - lsl r0, r1, #2 - add r0, r4, r0 - ldr r0, [r0, #0x1c] - bl sub_02021FD0 - cmp r0, #0 - beq _021DEB86 - mov r0, #0 - pop {r4, pc} -_021DEB86: - ldr r1, [r4, #0x38] - add r0, r4, #0 - mov r2, #0 - bl ov19_021DE57C - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x38] -_021DEB96: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEB60 - - thumb_func_start ov19_021DEB9C -ov19_021DEB9C: ; 0x021DEB9C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DEBD6 - mov r1, #3 - bl ov19_021DE560 - add r6, r0, #0 - bmi _021DEBD6 - ldmia r4!, {r0, r1} - add r3, sp, #0 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - mov r0, #2 - ldr r1, [sp, #4] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #4] - lsl r0, r6, #2 - add r0, r5, r0 - ldr r0, [r0, #0x1c] - add r1, r2, #0 - bl sub_02021C50 -_021DEBD6: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEB9C - - thumb_func_start ov19_021DEBDC -ov19_021DEBDC: ; 0x021DEBDC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0] - cmp r1, #0 - beq _021DEC00 - mov r1, #3 - bl ov19_021DE560 - cmp r0, #0 - blt _021DEC00 - lsl r0, r0, #2 - add r0, r5, r0 - lsl r1, r4, #0x18 - ldr r0, [r0, #0x1c] - lsr r1, r1, #0x18 - bl sub_02021E80 -_021DEC00: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEBDC - - thumb_func_start ov19_021DEC04 -ov19_021DEC04: ; 0x021DEC04 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r2, #0 - add r5, r0, #0 - add r0, r7, #0 - add r6, r1, #0 - str r3, [sp, #4] - bl ov19_021D5E08 - cmp r0, #4 - beq _021DEC24 - mov r0, #0 - str r0, [r5, #0] - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DEC24: - mov r1, #0xe1 - mov r0, #0xa - lsl r1, r1, #2 - bl sub_02018144 - add r4, r0, #0 - beq _021DECA4 - str r6, [r4, #4] - ldr r0, [sp, #4] - str r7, [r4, #8] - str r0, [r4, #0xc] - ldr r0, [sp, #0x20] - str r0, [r4, #0x10] - add r0, r6, #0 - bl ov19_021D77D8 - str r0, [r4, #0x14] - mov r0, #0xa - mov r3, #0xda - str r0, [sp] - lsl r3, r3, #2 - ldr r0, [sp, #0x28] - mov r1, #7 - mov r2, #1 - add r3, r4, r3 - bl sub_020071D0 - mov r3, #0x37 - lsl r3, r3, #4 - str r0, [r4, r3] - mov r0, #0xa - str r0, [sp] - sub r3, r3, #4 - ldr r0, [sp, #0x28] - mov r1, #8 - mov r2, #1 - add r3, r4, r3 - bl sub_020071D0 - mov r2, #0xdd - lsl r2, r2, #2 - str r0, [r4, r2] - ldr r0, [sp, #0x24] - mov r1, #0x1a - str r0, [r4, #0x6c] - mov r0, #1 - sub r2, #0xed - mov r3, #0xa - bl sub_0200B144 - str r0, [r4, #0x70] - mov r0, #0x20 - mov r1, #0xa - bl sub_02023790 - str r0, [r4, #0x74] - mov r0, #0xe - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] - add sp, #8 - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DECA4: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEC04 - - thumb_func_start ov19_021DECAC -ov19_021DECAC: ; 0x021DECAC - push {r4, lr} - add r4, r0, #0 - beq _021DECE4 - mov r0, #0x37 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0xdd - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r0, [r4, #0x70] - bl sub_0200B190 - add r0, r4, #0 - bl ov19_021DF7D0 - add r0, r4, #0 - bl ov19_021DF03C - ldr r0, [r4, #0x74] - bl sub_020237BC - add r0, r4, #0 - bl sub_020181C4 -_021DECE4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DECAC - - thumb_func_start ov19_021DECE8 -ov19_021DECE8: ; 0x021DECE8 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - beq _021DEDD6 - bl ov19_021DEEFC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #0xc] - add r0, r4, #0 - mov r1, #0x84 - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #0xc] - add r0, r4, #0 - mov r1, #0x81 - mov r3, #5 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #0xc] - add r0, r4, #0 - mov r1, #0x82 - mov r3, #6 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r2, [r5, #0xc] - add r0, r4, #0 - mov r1, #0x83 - mov r3, #7 - bl sub_0200710C - mov r0, #0x80 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x85 - mov r2, #4 - mov r3, #0 - bl sub_02007130 - bl sub_02079FD0 - mov r3, #0x80 - add r1, r0, #0 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0x13 - mov r2, #5 - bl sub_02006E84 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0xa - bl sub_02019690 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r0, [r5, #0xc] - mov r1, #4 - add r3, r2, #0 - bl sub_02019CB8 - add r0, r5, #0 - bl ov19_021DEF64 - add r0, r5, #0 - bl ov19_021DEFC8 - ldr r0, [r5, #8] - bl ov19_021D5FA4 - mov r1, #0xde - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, #0xc] - mov r1, #4 - bl sub_02019448 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DF5D0 -_021DEDD6: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DECE8 - - thumb_func_start ov19_021DEDDC -ov19_021DEDDC: ; 0x021DEDDC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - cmp r5, #0 - beq _021DEE30 - ldr r0, [r5, #8] - bl ov19_021D5F9C - add r4, r0, #0 - cmp r6, #0 - beq _021DEE10 - mov r0, #1 - eor r0, r4 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x28] - mov r1, #2 - bl sub_02021D6C - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x28] - mov r1, #0 - bl sub_02021D6C - b _021DEE2A -_021DEE10: - mov r1, #1 - eor r0, r1 - lsl r0, r0, #2 - add r0, r5, r0 - ldr r0, [r0, #0x28] - bl sub_02021D6C - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x28] - mov r1, #0 - bl sub_02021D6C -_021DEE2A: - add r0, r5, #0 - bl ov19_021DEEFC -_021DEE30: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEDDC - - thumb_func_start ov19_021DEE34 -ov19_021DEE34: ; 0x021DEE34 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov19_021DF834 - cmp r5, #0 - beq _021DEE80 - ldr r0, [r5, #8] - bl ov19_021D5F9C - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DF8C8 - ldr r0, [r5, #8] - bl ov19_021D5FA4 - cmp r0, #0 - beq _021DEE64 - cmp r0, #1 - beq _021DEE6E - cmp r0, #2 - beq _021DEE78 - pop {r3, r4, r5, pc} -_021DEE64: - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DF3AC - pop {r3, r4, r5, pc} -_021DEE6E: - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DF178 - pop {r3, r4, r5, pc} -_021DEE78: - add r0, r5, #0 - add r1, r4, #0 - bl ov19_021DF4D0 -_021DEE80: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DEE34 - - thumb_func_start ov19_021DEE84 -ov19_021DEE84: ; 0x021DEE84 - mov r0, #1 - bx lr - thumb_func_end ov19_021DEE84 - - thumb_func_start ov19_021DEE88 -ov19_021DEE88: ; 0x021DEE88 - push {r4, lr} - add r4, r0, #0 - beq _021DEEA6 - mov r1, #0xdf - mov r2, #0 - lsl r1, r1, #2 - str r2, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl ov19_021DF0CC - ldr r0, [r4, #0xc] - mov r1, #4 - bl sub_02019448 -_021DEEA6: - pop {r4, pc} - thumb_func_end ov19_021DEE88 - - thumb_func_start ov19_021DEEA8 -ov19_021DEEA8: ; 0x021DEEA8 - push {r4, lr} - add r4, r0, #0 - beq _021DEEF8 - mov r1, #0xdf - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - beq _021DEEC2 - cmp r1, #1 - beq _021DEED2 - cmp r1, #2 - beq _021DEEF0 - b _021DEEF4 -_021DEEC2: - bl ov19_021DEF64 - mov r0, #0xdf - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _021DEEF4 -_021DEED2: - bl ov19_021DF2E0 - add r0, r4, #0 - bl ov19_021DF064 - ldr r0, [r4, #0xc] - mov r1, #4 - bl sub_02019448 - mov r0, #0xdf - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _021DEEF4 -_021DEEF0: - mov r0, #1 - pop {r4, pc} -_021DEEF4: - mov r0, #0 - pop {r4, pc} -_021DEEF8: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov19_021DEEA8 - - thumb_func_start ov19_021DEEFC -ov19_021DEEFC: ; 0x021DEEFC - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5F9C - cmp r0, #0 - bne _021DEF10 - mov r0, #0xda - b _021DEF12 -_021DEF10: - mov r0, #0xdb -_021DEF12: - lsl r0, r0, #2 - ldr r4, [r5, r0] - mov r0, #6 - str r0, [sp] - mov r1, #0x20 - add r0, r4, #0 - mov r2, #0 - str r1, [sp, #4] - add r0, #0xc - str r0, [sp, #8] - str r2, [sp, #0xc] - str r2, [sp, #0x10] - str r1, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r5, #0xc] - mov r1, #2 - add r3, r2, #0 - bl sub_020198E8 - mov r0, #6 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - add r4, #0xc - str r4, [sp, #8] - mov r2, #0x1a - str r2, [sp, #0xc] - mov r3, #0 - str r3, [sp, #0x10] - str r0, [sp, #0x14] - str r0, [sp, #0x18] - ldr r0, [r5, #0xc] - mov r1, #2 - bl sub_020198E8 - ldr r0, [r5, #0xc] - mov r1, #2 - bl sub_02019448 - add sp, #0x1c - pop {r4, r5, pc} - thumb_func_end ov19_021DEEFC - - thumb_func_start ov19_021DEF64 -ov19_021DEF64: ; 0x021DEF64 - push {r3, lr} - ldr r0, [r0, #8] - bl ov19_021D5FA4 - cmp r0, #0 - beq _021DEF7A - cmp r0, #1 - beq _021DEF94 - cmp r0, #2 - beq _021DEFAE - pop {r3, pc} -_021DEF7A: - mov r0, #5 - mov r1, #1 - bl sub_02019120 - mov r0, #6 - mov r1, #0 - bl sub_02019120 - mov r0, #7 - mov r1, #0 - bl sub_02019120 - pop {r3, pc} -_021DEF94: - mov r0, #6 - mov r1, #1 - bl sub_02019120 - mov r0, #5 - mov r1, #0 - bl sub_02019120 - mov r0, #7 - mov r1, #0 - bl sub_02019120 - pop {r3, pc} -_021DEFAE: - mov r0, #7 - mov r1, #1 - bl sub_02019120 - mov r0, #5 - mov r1, #0 - bl sub_02019120 - mov r0, #6 - mov r1, #0 - bl sub_02019120 - pop {r3, pc} - thumb_func_end ov19_021DEF64 - - thumb_func_start ov19_021DEFC8 -ov19_021DEFC8: ; 0x021DEFC8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r1, #0 - add r2, r7, #0 - add r5, r1, #0 -_021DEFD2: - add r0, r2, #0 - add r0, #0x84 - add r1, r1, #1 - add r2, #0x10 - str r5, [r0, #0] - cmp r1, #7 - blt _021DEFD2 - add r4, r7, #0 - ldr r6, _021DF038 ; =0x021E0524 - add r4, #0x78 -_021DEFE6: - ldr r0, [r7, #0xc] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0201A8D4 - add r0, r4, #0 - bl sub_0201A9F4 - add r5, r5, #1 - add r6, #8 - add r4, #0x10 - cmp r5, #3 - blo _021DEFE6 - add r0, r7, #0 - bl ov19_021DF2E0 - add r0, r7, #0 - add r0, #0x78 - mov r1, #0 - bl sub_0201ADA4 - add r0, r7, #0 - add r0, #0x88 - mov r1, #0 - bl sub_0201ADA4 - add r4, r7, #0 - mov r5, #0 - add r4, #0x78 -_021DF020: - add r0, r4, #0 - bl sub_0201ACCC - add r5, r5, #1 - add r4, #0x10 - cmp r5, #3 - blo _021DF020 - add r0, r7, #0 - bl ov19_021DF064 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DF038: .word 0x021E0524 - thumb_func_end ov19_021DEFC8 - - thumb_func_start ov19_021DF03C -ov19_021DF03C: ; 0x021DF03C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r5, #0 - mov r6, #0 - add r4, #0x78 -_021DF046: - add r0, r5, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DF056 - add r0, r4, #0 - bl sub_0201A8FC -_021DF056: - add r6, r6, #1 - add r5, #0x10 - add r4, #0x10 - cmp r6, #7 - blt _021DF046 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DF03C - - thumb_func_start ov19_021DF064 -ov19_021DF064: ; 0x021DF064 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5FA4 - add r4, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5FA4 - cmp r0, #0 - beq _021DF084 - cmp r0, #1 - beq _021DF09C - cmp r0, #2 - beq _021DF0AE - b _021DF0C4 -_021DF084: - add r0, r5, #0 - bl ov19_021DF108 - add r0, r5, #0 - mov r1, #0 - bl ov19_021DF3AC - add r0, r5, #0 - mov r1, #1 - bl ov19_021DF3AC - b _021DF0C4 -_021DF09C: - add r0, r5, #0 - mov r1, #0 - bl ov19_021DF178 - add r0, r5, #0 - mov r1, #1 - bl ov19_021DF178 - b _021DF0C4 -_021DF0AE: - add r0, r5, #0 - bl ov19_021DF270 - add r0, r5, #0 - mov r1, #0 - bl ov19_021DF4D0 - add r0, r5, #0 - mov r1, #1 - bl ov19_021DF4D0 -_021DF0C4: - mov r0, #0xde - lsl r0, r0, #2 - str r4, [r5, r0] - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DF064 - - thumb_func_start ov19_021DF0CC -ov19_021DF0CC: ; 0x021DF0CC - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - beq _021DF0DE - cmp r1, #1 - beq _021DF0EA - cmp r1, #2 - beq _021DF0FA - pop {r4, pc} -_021DF0DE: - bl ov19_021DF140 - add r0, r4, #0 - bl ov19_021DF394 - pop {r4, pc} -_021DF0EA: - mov r1, #0 - bl ov19_021DF250 - add r0, r4, #0 - mov r1, #1 - bl ov19_021DF250 - pop {r4, pc} -_021DF0FA: - bl ov19_021DF2A8 - add r0, r4, #0 - bl ov19_021DF394 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DF0CC - - thumb_func_start ov19_021DF108 -ov19_021DF108: ; 0x021DF108 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r7, _021DF13C ; =0x021E0514 - str r0, [sp] - mov r6, #0 - add r5, #0x78 -_021DF114: - add r0, r6, #3 - lsl r4, r0, #4 - ldr r0, [sp] - add r1, r5, r4 - ldr r0, [r0, #0xc] - add r2, r7, #0 - bl sub_0201A8D4 - add r0, r5, r4 - bl sub_0201A9F4 - add r0, r5, r4 - mov r1, #0 - bl sub_0201ADA4 - add r6, r6, #1 - add r7, #8 - cmp r6, #2 - blo _021DF114 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF13C: .word 0x021E0514 - thumb_func_end ov19_021DF108 - - thumb_func_start ov19_021DF140 -ov19_021DF140: ; 0x021DF140 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r0, #0x78 - add r5, r0, #0 - mov r6, #3 - add r4, #0x30 - add r5, #0x30 - mov r7, #0 -_021DF150: - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DF16C - add r0, r5, #0 - bl sub_0201AA3C - add r0, r5, #0 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x84 - str r7, [r0, #0] -_021DF16C: - add r6, r6, #1 - add r4, #0x10 - add r5, #0x10 - cmp r6, #4 - ble _021DF150 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DF140 - - thumb_func_start ov19_021DF178 -ov19_021DF178: ; 0x021DF178 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - ldr r0, [r7, #8] - str r1, [sp] - bl ov19_021D5FAC - add r4, r0, #0 - ldr r0, [r7, #8] - bl ov19_021D5E34 - add r6, r0, #0 - ldr r0, [r7, #8] - bl ov19_021D5F9C - ldr r1, [sp] - cmp r1, r0 - bne _021DF1A0 - mov r5, #1 - b _021DF1A2 -_021DF1A0: - mov r5, #0 -_021DF1A2: - ldr r0, [r7, #8] - ldr r1, [sp] - bl ov19_021D5FB8 - cmp r6, #1 - bne _021DF1B2 - cmp r5, #1 - beq _021DF1BA -_021DF1B2: - cmp r5, #0 - bne _021DF23E - cmp r0, #1 - bne _021DF23E -_021DF1BA: - ldrb r0, [r4, #6] - cmp r0, #0 - bne _021DF23E - ldr r1, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #0x10] - mov r0, #0x14 - add r2, r1, #0 - mul r2, r0 - add r5, r7, r2 - mov r2, #1 - eor r1, r2 - mul r0, r1 - ldr r6, _021DF24C ; =0x021E053C - add r4, #0x16 - add r7, r7, r0 -_021DF1DC: - ldr r3, [r6, #0] - ldr r0, [r6, #8] - ldrh r2, [r4] - sub r1, r0, r3 - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r0, r0, #8 - mul r0, r2 - add r0, r3, r0 - str r0, [sp, #8] - ldr r3, [r6, #4] - ldr r0, [r6, #0xc] - ldrh r2, [r4] - sub r1, r0, r3 - asr r0, r1, #7 - lsr r0, r0, #0x18 - add r0, r1, r0 - asr r0, r0, #8 - mul r0, r2 - add r0, r3, r0 - str r0, [sp, #0xc] - ldr r0, [r5, #0x34] - add r1, sp, #8 - bl sub_02021C50 - ldr r0, [r5, #0x34] - mov r1, #0 - bl ov19_021D78AC - ldr r0, [r7, #0x34] - mov r1, #1 - bl ov19_021D78AC - ldr r0, [r5, #0x34] - mov r1, #1 - bl sub_02021CAC - ldr r0, [sp, #4] - add r4, r4, #2 - add r0, r0, #1 - add r6, #0x10 - add r5, r5, #4 - add r7, r7, #4 - str r0, [sp, #4] - cmp r0, #5 - blt _021DF1DC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021DF23E: - ldr r1, [sp] - add r0, r7, #0 - bl ov19_021DF250 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DF24C: .word 0x021E053C - thumb_func_end ov19_021DF178 - - thumb_func_start ov19_021DF250 -ov19_021DF250: ; 0x021DF250 - push {r4, r5, r6, lr} - mov r2, #0x14 - mov r4, #0 - mul r2, r1 - add r5, r0, r2 - add r6, r4, #0 -_021DF25C: - ldr r0, [r5, #0x34] - add r1, r6, #0 - bl sub_02021CAC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _021DF25C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov19_021DF250 - - thumb_func_start ov19_021DF270 -ov19_021DF270: ; 0x021DF270 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r7, _021DF2A4 ; =0x021E0504 - str r0, [sp] - mov r6, #0 - add r5, #0x78 -_021DF27C: - add r0, r6, #5 - lsl r4, r0, #4 - ldr r0, [sp] - add r1, r5, r4 - ldr r0, [r0, #0xc] - add r2, r7, #0 - bl sub_0201A8D4 - add r0, r5, r4 - bl sub_0201A9F4 - add r0, r5, r4 - mov r1, #0 - bl sub_0201ADA4 - add r6, r6, #1 - add r7, #8 - cmp r6, #2 - blo _021DF27C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF2A4: .word 0x021E0504 - thumb_func_end ov19_021DF270 - - thumb_func_start ov19_021DF2A8 -ov19_021DF2A8: ; 0x021DF2A8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r0, #0x78 - add r5, r0, #0 - mov r6, #5 - add r4, #0x50 - add r5, #0x50 - mov r7, #0 -_021DF2B8: - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DF2D4 - add r0, r5, #0 - bl sub_0201AA3C - add r0, r5, #0 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x84 - str r7, [r0, #0] -_021DF2D4: - add r6, r6, #1 - add r4, #0x10 - add r5, #0x10 - cmp r6, #6 - ble _021DF2B8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DF2A8 - - thumb_func_start ov19_021DF2E0 -ov19_021DF2E0: ; 0x021DF2E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r5, #0 - add r7, #0x98 - add r0, r7, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #8] - bl ov19_021D5FA4 - cmp r0, #0 - beq _021DF302 - cmp r0, #2 - beq _021DF34E - b _021DF380 -_021DF302: - mov r0, #0 - ldr r6, _021DF38C ; =0x021E04F4 - str r0, [sp, #0x10] - add r4, r0, #0 -_021DF30A: - ldrh r1, [r6] - ldr r0, [r5, #0x6c] - ldr r2, [r5, #0x74] - bl sub_0200B1B8 - mov r0, #0 - ldr r1, [r5, #0x74] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r7, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - lsr r3, r0, #1 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF390 ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r5, #0x74] - add r0, r7, #0 - bl sub_0201D78C - ldr r0, [sp, #0x10] - add r6, r6, #2 - add r0, r0, #1 - add r4, #0x10 - str r0, [sp, #0x10] - cmp r0, #8 - blo _021DF30A - b _021DF380 -_021DF34E: - ldr r0, [r5, #0x6c] - ldr r2, [r5, #0x74] - mov r1, #0x2b - bl sub_0200B1B8 - mov r0, #0 - ldr r1, [r5, #0x74] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r7, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF390 ; =0x000F0E00 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r5, #0x74] - add r0, r7, #0 - bl sub_0201D78C -_021DF380: - add r0, r7, #0 - bl sub_0201ACCC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DF38C: .word 0x021E04F4 -_021DF390: .word 0x000F0E00 - thumb_func_end ov19_021DF2E0 - - thumb_func_start ov19_021DF394 -ov19_021DF394: ; 0x021DF394 - push {r4, lr} - add r4, r0, #0 - add r4, #0x98 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201ACCC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov19_021DF394 - - thumb_func_start ov19_021DF3AC -ov19_021DF3AC: ; 0x021DF3AC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r0, r1, #0 - add r2, r5, #0 - add r0, r0, #3 - add r2, #0x78 - lsl r0, r0, #4 - add r4, r2, r0 - ldr r0, [r5, #8] - str r1, [sp, #0x10] - bl ov19_021D5FAC - add r6, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5E34 - str r0, [sp, #0x18] - ldr r0, [r5, #8] - bl ov19_021D5F9C - ldr r1, [sp, #0x10] - cmp r1, r0 - bne _021DF3E0 - mov r7, #1 - b _021DF3E2 -_021DF3E0: - mov r7, #0 -_021DF3E2: - ldr r0, [r5, #8] - ldr r1, [sp, #0x10] - bl ov19_021D5FB8 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _021DF3FE - cmp r7, #1 - beq _021DF408 -_021DF3FE: - cmp r7, #0 - bne _021DF4C2 - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _021DF4C2 -_021DF408: - ldrb r0, [r6, #6] - cmp r0, #0 - bne _021DF482 - mov r0, #0 - ldr r1, [r6, #0x2c] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF4CC ; =0x000F0E00 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r6, #0x2c] - add r0, r4, #0 - bl sub_0201D78C - mov r7, #0 - add r6, #8 -_021DF43A: - mov r0, #1 - str r0, [sp] - ldrh r1, [r6] - ldr r0, [r5, #0x74] - mov r2, #3 - mov r3, #0 - bl sub_020238A0 - mov r0, #0 - ldr r1, [r5, #0x74] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - lsr r3, r0, #1 - add r0, r7, #1 - lsl r0, r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF4CC ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r5, #0x74] - add r0, r4, #0 - bl sub_0201D78C - add r7, r7, #1 - add r6, r6, #2 - cmp r7, #7 - blt _021DF43A - b _021DF4C2 -_021DF482: - ldr r0, [r5, #0x6c] - ldr r2, [r5, #0x74] - mov r1, #0x2c - bl sub_0200B1B8 - mov r7, #0 - add r6, r7, #0 -_021DF490: - mov r0, #0 - ldr r1, [r5, #0x74] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - lsr r3, r0, #1 - str r6, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF4CC ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r5, #0x74] - add r0, r4, #0 - bl sub_0201D78C - add r7, r7, #1 - add r6, #0x10 - cmp r7, #8 - blt _021DF490 -_021DF4C2: - add r0, r4, #0 - bl sub_0201ACCC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF4CC: .word 0x000F0E00 - thumb_func_end ov19_021DF3AC - - thumb_func_start ov19_021DF4D0 -ov19_021DF4D0: ; 0x021DF4D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - add r0, r1, #0 - add r2, r5, #0 - add r0, r0, #5 - add r2, #0x78 - lsl r0, r0, #4 - add r4, r2, r0 - ldr r0, [r5, #8] - str r1, [sp, #0x10] - bl ov19_021D5FAC - add r6, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5E34 - str r0, [sp, #0x1c] - ldr r0, [r5, #8] - bl ov19_021D5F9C - ldr r1, [sp, #0x10] - cmp r1, r0 - bne _021DF504 - mov r7, #1 - b _021DF506 -_021DF504: - mov r7, #0 -_021DF506: - ldr r0, [r5, #8] - ldr r1, [sp, #0x10] - bl ov19_021D5FB8 - str r0, [sp, #0x18] - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x1c] - cmp r0, #1 - bne _021DF522 - cmp r7, #1 - beq _021DF52C -_021DF522: - cmp r7, #0 - bne _021DF5C0 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _021DF5C0 -_021DF52C: - ldrb r0, [r6, #6] - cmp r0, #0 - bne _021DF580 - mov r0, #0 - str r0, [sp, #0x14] - mov r7, #4 -_021DF538: - ldrh r1, [r6, #0x20] - cmp r1, #0 - beq _021DF570 - ldr r0, [r5, #0x70] - ldr r2, [r5, #0x74] - bl sub_0200B1B8 - mov r0, #0 - ldr r1, [r5, #0x74] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - lsr r3, r0, #1 - str r7, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF5CC ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r5, #0x74] - add r0, r4, #0 - bl sub_0201D78C -_021DF570: - ldr r0, [sp, #0x14] - add r6, r6, #2 - add r0, r0, #1 - add r7, #0x18 - str r0, [sp, #0x14] - cmp r0, #4 - blt _021DF538 - b _021DF5C0 -_021DF580: - ldr r0, [r5, #0x6c] - ldr r2, [r5, #0x74] - mov r1, #0x2c - bl sub_0200B1B8 - mov r7, #0 - mov r6, #4 -_021DF58E: - mov r0, #0 - ldr r1, [r5, #0x74] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - lsr r3, r0, #1 - str r6, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF5CC ; =0x000F0E00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r5, #0x74] - add r0, r4, #0 - bl sub_0201D78C - add r7, r7, #1 - add r6, #0x18 - cmp r7, #4 - blt _021DF58E -_021DF5C0: - add r0, r4, #0 - bl sub_0201ACCC - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DF5CC: .word 0x000F0E00 - thumb_func_end ov19_021DF4D0 - - thumb_func_start ov19_021DF5D0 -ov19_021DF5D0: ; 0x021DF5D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x6c - add r7, r0, #0 - add r4, r1, #0 - mov r0, #0xa - add r3, r7, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x87 - mov r2, #1 - add r3, #0x60 - bl sub_02007204 - str r0, [r7, #0x5c] - mov r0, #0xa - add r3, r7, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x88 - mov r2, #1 - add r3, #0x68 - bl sub_02007220 - str r0, [r7, #0x64] - mov r0, #0x60 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x89 - mov r2, #5 - mov r3, #0 - bl sub_02007130 - add r0, sp, #0x48 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - str r3, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - add r0, sp, #0x48 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #0x86 - mov r2, #1 - bl sub_0200718C - str r0, [sp, #0x20] - ldr r0, [r7, #4] - bl ov19_021D77D0 - add r2, r0, #0 - ldr r0, [r7, #0x68] - add r1, sp, #0x48 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r3, [r7, #0x60] - add r0, sp, #0x24 - bl ov19_021D783C - ldr r0, _021DF728 ; =0x021E04E4 - mov r4, #0 - str r0, [sp, #0x1c] - str r7, [sp, #0x18] - str r7, [sp, #0x14] -_021DF65C: - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - mov r3, #0 - ldrsh r2, [r2, r3] - ldr r3, [sp, #0x1c] - mov r5, #2 - ldrsh r3, [r3, r5] - ldr r0, [r7, #0x10] - add r1, sp, #0x24 - bl ov19_021D785C - ldr r1, [sp, #0x18] - str r0, [r1, #0x28] - add r1, r4, #0 - bl sub_02021E90 - ldr r0, [sp, #0x18] - mov r1, #0 - ldr r0, [r0, #0x28] - bl sub_02021D6C - ldr r5, [sp, #0x14] - mov r6, #0 -_021DF690: - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r2, #0 - ldr r0, [r7, #0x10] - add r1, sp, #0x24 - add r3, r2, #0 - bl ov19_021D785C - str r0, [r5, #0x34] - add r1, r4, #5 - bl sub_02021D6C - ldr r0, [r5, #0x34] - add r1, r4, #0 - bl sub_02021E90 - ldr r0, [r5, #0x34] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #5 - blo _021DF690 - ldr r0, [sp, #0x1c] - add r4, r4, #1 - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, r0, #4 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r0, #0x14 - str r0, [sp, #0x14] - cmp r4, #2 - blo _021DF65C - ldr r0, [r7, #0x2c] - mov r1, #1 - bl sub_02021D0C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r3, #0x23 - ldr r0, [r7, #0x10] - add r1, sp, #0x24 - mov r2, #0x80 - lsl r3, r3, #4 - bl ov19_021D785C - str r0, [r7, #0x30] - mov r1, #3 - bl sub_02021D6C - ldr r0, [r7, #0x30] - mov r1, #2 - bl sub_02021E90 - ldr r0, _021DF72C ; =ov19_021DF930 - add r1, r7, #0 - mov r2, #1 - bl sub_0200D9E8 - mov r1, #0xe - lsl r1, r1, #6 - str r0, [r7, r1] - ldr r1, [sp, #0x20] - add r0, r7, #0 - bl ov19_021DF730 - add sp, #0x6c - pop {r4, r5, r6, r7, pc} - nop -_021DF728: .word 0x021E04E4 -_021DF72C: .word ov19_021DF930 - thumb_func_end ov19_021DF5D0 - - thumb_func_start ov19_021DF730 -ov19_021DF730: ; 0x021DF730 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - str r0, [sp, #8] - ldr r0, [r0, #4] - str r1, [sp, #0xc] - bl ov19_021D77D0 - add r5, r0, #0 - ldr r0, [sp, #8] - ldr r0, [r0, #0x14] - bl ov19_021DA80C - add r4, r0, #0 - ldr r0, [sp, #8] - ldr r0, [r0, #0x14] - bl ov19_021DA810 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, sp, #0x10 - add r1, sp, #0x34 - add r2, r5, #0 - add r3, r4, #0 - bl ov19_021D783C - mov r7, #0 - ldr r4, [sp, #8] - ldr r5, _021DF7C4 ; =0x021E04EC - add r6, r7, #0 -_021DF76C: - ldr r0, [sp, #0xc] - add r0, r0, r6 - str r0, [r4, #0x18] - add r0, sp, #0x34 - bl sub_020A818C - ldr r2, [r4, #0x18] - add r0, sp, #0x34 - mov r1, #2 - bl sub_020A81A8 - ldr r0, _021DF7C8 ; =0x04001000 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _021DF7CC ; =0x00300010 - mov r3, #2 - and r0, r1 - str r0, [sp, #0x54] - mov r0, #1 - sub r0, r0, r7 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #8] - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - ldr r0, [r0, #0x10] - add r1, sp, #0x10 - bl ov19_021D785C - mov r1, #0 - str r0, [r4, #0x20] - bl sub_02021CAC - mov r0, #2 - lsl r0, r0, #8 - add r7, r7, #1 - add r6, r6, r0 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #2 - blt _021DF76C - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF7C4: .word 0x021E04EC -_021DF7C8: .word 0x04001000 -_021DF7CC: .word 0x00300010 - thumb_func_end ov19_021DF730 - - thumb_func_start ov19_021DF7D0 -ov19_021DF7D0: ; 0x021DF7D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0xe - lsl r1, r1, #6 - str r0, [sp] - ldr r0, [r0, r1] - cmp r0, #0 - beq _021DF7E4 - bl sub_0200DA58 -_021DF7E4: - ldr r6, [sp] - mov r0, #0 - str r0, [sp, #4] - add r7, r6, #0 -_021DF7EC: - ldr r0, [r6, #0x20] - bl sub_02021BD4 - ldr r0, [r6, #0x28] - bl sub_02021BD4 - mov r4, #0 - add r5, r7, #0 -_021DF7FC: - ldr r0, [r5, #0x34] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _021DF7FC - ldr r0, [sp, #4] - add r6, r6, #4 - add r0, r0, #1 - add r7, #0x14 - str r0, [sp, #4] - cmp r0, #2 - blt _021DF7EC - ldr r0, [sp] - ldr r0, [r0, #0x30] - bl sub_02021BD4 - ldr r0, [sp] - ldr r0, [r0, #0x5c] - bl sub_020181C4 - ldr r0, [sp] - ldr r0, [r0, #0x64] - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DF7D0 - - thumb_func_start ov19_021DF834 -ov19_021DF834: ; 0x021DF834 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5F9C - add r4, r0, #0 - ldr r0, [r5, #8] - add r1, r4, #0 - bl ov19_021D5FAC - lsl r7, r4, #2 - add r6, r0, #0 - add r0, r5, r7 - ldr r4, [r0, #0x20] - ldr r0, [r6, #0] - str r0, [sp] - ldr r0, [r5, #8] - bl ov19_021D5E34 - cmp r0, #0 - beq _021DF8BC - ldrh r0, [r6, #4] - ldrb r1, [r6, #7] - ldrb r2, [r6, #6] - bl sub_02079EDC - add r6, r0, #0 - ldr r0, [sp] - bl sub_02079D40 - add r2, r0, #0 - add r1, r5, #0 - mov r3, #0xa - ldr r0, [r5, #0x14] - add r1, #0xe8 - lsl r3, r3, #6 - bl ov19_021DA744 - add r0, r5, #0 - add r0, #0xe8 - add r1, sp, #4 - bl sub_020A7118 - ldr r0, [sp, #4] - mov r1, #2 - ldr r0, [r0, #0x14] - lsl r1, r1, #8 - bl sub_020C2C54 - ldr r0, [sp, #4] - add r1, r5, r7 - mov r2, #2 - ldr r0, [r0, #0x14] - ldr r1, [r1, #0x18] - lsl r2, r2, #8 - bl sub_020C0314 - add r0, r4, #0 - add r1, r6, #4 - bl sub_02021E90 - add r0, r4, #0 - mov r1, #1 - bl sub_02021CAC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_021DF8BC: - add r0, r4, #0 - mov r1, #0 - bl sub_02021CAC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov19_021DF834 - - thumb_func_start ov19_021DF8C8 -ov19_021DF8C8: ; 0x021DF8C8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #8] - bl ov19_021D5F9C - add r6, r0, #0 - add r1, r5, #0 - add r1, #0x78 - lsl r0, r6, #4 - add r4, r1, r0 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #8] - bl ov19_021D5E34 - cmp r0, #0 - beq _021DF922 - ldr r0, [r5, #8] - add r1, r6, #0 - bl ov19_021D5FAC - add r5, r0, #0 - mov r0, #0 - ldr r1, [r5, #0x28] - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021DF92C ; =0x000F0E00 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r5, #0x28] - add r0, r4, #0 - bl sub_0201D78C -_021DF922: - add r0, r4, #0 - bl sub_0201ACCC - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DF92C: .word 0x000F0E00 - thumb_func_end ov19_021DF8C8 - - thumb_func_start ov19_021DF930 -ov19_021DF930: ; 0x021DF930 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #8] - bl ov19_021D5FC0 - add r4, r0, #0 - ldr r0, [r5, #0x30] - bl sub_02021E24 - cmp r0, #3 - bne _021DF954 - cmp r4, #0 - beq _021DF960 - ldr r0, [r5, #0x30] - mov r1, #4 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021DF954: - cmp r4, #0 - bne _021DF960 - ldr r0, [r5, #0x30] - mov r1, #3 - bl sub_02021D6C -_021DF960: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DF930 - - thumb_func_start ov19_021DF964 -ov19_021DF964: ; 0x021DF964 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r4, #0x74 - add r0, r4, #0 - add r5, r1, #0 - bl ov19_021DFCF8 - add r0, r4, #0 - mov r1, #0x36 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x37 - bl ov19_021DFD08 - add r0, r4, #0 - add r0, #0x20 - strb r5, [r0] - mov r0, #0 - add r4, #0x23 - strb r0, [r4] - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DF964 - - thumb_func_start ov19_021DF990 -ov19_021DF990: ; 0x021DF990 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #0x74 - add r0, r4, #0 - bl ov19_021DFCF8 - add r0, r4, #0 - mov r1, #1 - add r0, #0x23 - strb r1, [r0] - add r0, r5, #0 - bl ov19_021D5E08 - cmp r0, #4 - bhi _021DF9C6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DF9BC: ; jump table - .short _021DFA3C - _021DF9BC - 2 ; case 0 - .short _021DFA66 - _021DF9BC - 2 ; case 1 - .short _021DF9C6 - _021DF9BC - 2 ; case 2 - .short _021DF9C6 - _021DF9BC - 2 ; case 3 - .short _021DFA90 - _021DF9BC - 2 ; case 4 -_021DF9C6: - add r0, r5, #0 - bl ov19_021D5E38 - cmp r0, #2 - bne _021DF9E8 - add r0, r5, #0 - bl ov19_021D5E34 - cmp r0, #0 - beq _021DF9DE - mov r1, #0x24 - b _021DF9E0 -_021DF9DE: - mov r1, #0x23 -_021DF9E0: - add r0, r4, #0 - bl ov19_021DFD08 - b _021DF9F0 -_021DF9E8: - add r0, r4, #0 - mov r1, #0x22 - bl ov19_021DFD08 -_021DF9F0: - add r0, r4, #0 - mov r1, #0x25 - bl ov19_021DFD08 - add r0, r5, #0 - bl ov19_021D5E70 - ldrb r0, [r0, #0xf] - cmp r0, #0 - bne _021DFA0C - add r0, r4, #0 - mov r1, #0x28 - bl ov19_021DFD08 -_021DFA0C: - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021DFA1A - mov r1, #0x26 - b _021DFA1C -_021DFA1A: - mov r1, #0x27 -_021DFA1C: - add r0, r4, #0 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x29 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2a - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2b - bl ov19_021DFD08 - pop {r3, r4, r5, pc} -_021DFA3C: - add r0, r4, #0 - mov r1, #0x27 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x25 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x29 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2a - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2b - bl ov19_021DFD08 - pop {r3, r4, r5, pc} -_021DFA66: - add r0, r4, #0 - mov r1, #0x26 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x25 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x29 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2a - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2b - bl ov19_021DFD08 - pop {r3, r4, r5, pc} -_021DFA90: - add r0, r5, #0 - bl ov19_021D5F9C - cmp r0, #0 - bne _021DFA9E - mov r1, #0x34 - b _021DFAA0 -_021DFA9E: - mov r1, #0x35 -_021DFAA0: - add r0, r4, #0 - bl ov19_021DFD08 - add r0, r5, #0 - bl ov19_021D5E10 - cmp r0, #0 - bne _021DFAB4 - mov r1, #0x26 - b _021DFAB6 -_021DFAB4: - mov r1, #0x27 -_021DFAB6: - add r0, r4, #0 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x29 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2b - bl ov19_021DFD08 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DF990 - - thumb_func_start ov19_021DFAD0 -ov19_021DFAD0: ; 0x021DFAD0 - push {r4, r5, r6, lr} - add r4, r0, #0 - add r5, r4, #0 - add r5, #0x74 - bl ov19_021D5F7C - add r6, r0, #0 - add r0, r4, #0 - bl ov19_021D5E74 - add r4, r0, #0 - add r0, r5, #0 - bl ov19_021DFCF8 - add r0, r5, #0 - mov r1, #1 - add r0, #0x23 - strb r1, [r0] - cmp r6, #0 - beq _021DFB20 - cmp r4, #0 - beq _021DFB06 - add r0, r5, #0 - mov r1, #0x31 - bl ov19_021DFD08 - b _021DFB0E -_021DFB06: - add r0, r5, #0 - mov r1, #0x2e - bl ov19_021DFD08 -_021DFB0E: - add r0, r5, #0 - mov r1, #0x32 - bl ov19_021DFD08 - add r0, r5, #0 - mov r1, #0x30 - bl ov19_021DFD08 - b _021DFB46 -_021DFB20: - cmp r4, #0 - beq _021DFB3E - add r0, r5, #0 - mov r1, #0x2f - bl ov19_021DFD08 - add r0, r5, #0 - mov r1, #0x32 - bl ov19_021DFD08 - add r0, r5, #0 - mov r1, #0x30 - bl ov19_021DFD08 - b _021DFB46 -_021DFB3E: - add r0, r5, #0 - mov r1, #0x2e - bl ov19_021DFD08 -_021DFB46: - add r0, r5, #0 - mov r1, #0x33 - bl ov19_021DFD08 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DFAD0 - - thumb_func_start ov19_021DFB50 -ov19_021DFB50: ; 0x021DFB50 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #0x74 - bl ov19_021D5E90 - add r0, r4, #0 - bl ov19_021DFCF8 - add r0, r4, #0 - mov r1, #0 - bl ov19_021DFD08 - add r0, r5, #0 - bl ov19_021D5E08 - cmp r0, #4 - beq _021DFB84 - add r0, r4, #0 - mov r1, #1 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #2 - bl ov19_021DFD08 -_021DFB84: - add r0, r4, #0 - mov r1, #3 - bl ov19_021DFD08 - mov r0, #2 - add r4, #0x23 - strb r0, [r4] - pop {r3, r4, r5, pc} - thumb_func_end ov19_021DFB50 - - thumb_func_start ov19_021DFB94 -ov19_021DFB94: ; 0x021DFB94 - push {r4, r5, r6, lr} - add r4, r0, #0 - add r4, #0x74 - add r5, r1, #0 - bl ov19_021D5E90 - add r6, r0, #0 - add r0, r4, #0 - bl ov19_021DFCF8 - add r0, r4, #0 - mov r1, #4 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #5 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #6 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #7 - bl ov19_021DFD08 - add r0, r6, #0 - bl sub_02079D20 - add r6, r0, #0 - beq _021DFBDA - add r0, r4, #0 - mov r1, #8 - bl ov19_021DFD08 -_021DFBDA: - cmp r6, #4 - bls _021DFBE6 - add r0, r4, #0 - mov r1, #9 - bl ov19_021DFD08 -_021DFBE6: - add r0, r4, #0 - mov r1, #3 - add r0, #0x23 - strb r1, [r0] - cmp r5, #4 - blt _021DFBFE - cmp r5, #9 - bgt _021DFBFE - sub r0, r5, #4 - add r4, #0x20 - strb r0, [r4] - pop {r4, r5, r6, pc} -_021DFBFE: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov19_021DFB94 - - thumb_func_start ov19_021DFC04 -ov19_021DFC04: ; 0x021DFC04 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r6, #0x74 - add r5, r1, #0 - bl ov19_021D5E90 - str r0, [sp] - add r0, r6, #0 - bl ov19_021DFCF8 - cmp r5, #4 - blt _021DFC3C - cmp r5, #7 - bgt _021DFC3C - sub r0, r5, #4 - ldr r1, _021DFC7C ; =0x021E058C - lsl r0, r0, #3 - mov r5, #0 - add r4, r1, r0 -_021DFC2A: - ldrh r1, [r4] - add r0, r6, #0 - bl ov19_021DFD08 - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _021DFC2A - b _021DFC72 -_021DFC3C: - mov r4, #0 - add r7, r4, #0 - cmp r5, #9 - bne _021DFC46 - mov r4, #4 -_021DFC46: - mov r5, #0 -_021DFC48: - ldr r0, [sp] - add r1, r5, #0 - bl sub_02079CFC - cmp r0, #0 - beq _021DFC6C - cmp r4, #0 - beq _021DFC5C - sub r4, r4, #1 - b _021DFC6C -_021DFC5C: - add r1, r5, #0 - add r0, r6, #0 - add r1, #0x1a - bl ov19_021DFD08 - add r7, r7, #1 - cmp r7, #4 - bge _021DFC72 -_021DFC6C: - add r5, r5, #1 - cmp r5, #8 - blt _021DFC48 -_021DFC72: - mov r0, #3 - add r6, #0x23 - strb r0, [r6] - pop {r3, r4, r5, r6, r7, pc} - nop -_021DFC7C: .word 0x021E058C - thumb_func_end ov19_021DFC04 - - thumb_func_start ov19_021DFC80 -ov19_021DFC80: ; 0x021DFC80 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #0x74 - add r0, r4, #0 - bl ov19_021DFCF8 - add r0, r4, #0 - mov r1, #4 - add r0, #0x23 - strb r1, [r0] - add r5, #0x57 - add r0, r4, #0 - ldrb r1, [r5] - add r0, #0x22 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0x38 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x39 - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x3a - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x3b - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x3c - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x3d - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2c - bl ov19_021DFD08 - add r0, r4, #0 - mov r1, #0x2d - bl ov19_021DFD08 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov19_021DFC80 - - thumb_func_start ov19_021DFCE4 -ov19_021DFCE4: ; 0x021DFCE4 - add r2, r0, #0 - add r2, #0x96 - ldrb r3, [r2] - mov r2, #1 - lsl r2, r1 - add r1, r3, #0 - eor r1, r2 - add r0, #0x96 - strb r1, [r0] - bx lr - thumb_func_end ov19_021DFCE4 - - thumb_func_start ov19_021DFCF8 -ov19_021DFCF8: ; 0x021DFCF8 - add r1, r0, #0 - mov r2, #0 - add r1, #0x21 - strb r2, [r1] - add r0, #0x20 - strb r2, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DFCF8 - - thumb_func_start ov19_021DFD08 -ov19_021DFD08: ; 0x021DFD08 - push {r3, r4} - add r2, r0, #0 - add r2, #0x21 - ldrb r4, [r2] - cmp r4, #8 - bhs _021DFD26 - add r2, r0, #0 - add r2, #0x21 - ldrb r2, [r2] - add r3, r2, #1 - add r2, r0, #0 - add r2, #0x21 - strb r3, [r2] - lsl r2, r4, #2 - str r1, [r0, r2] -_021DFD26: - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DFD08 - - thumb_func_start ov19_021DFD2C -ov19_021DFD2C: ; 0x021DFD2C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, _021DFDD4 ; =0x021BF67C - add r4, #0x74 - ldr r1, [r0, #0x48] - mov r0, #0x40 - add r2, r1, #0 - tst r2, r0 - beq _021DFD6C - add r2, r4, #0 - add r2, #0x20 - ldrb r2, [r2] - cmp r2, #0 - beq _021DFD58 - add r1, r4, #0 - add r1, #0x20 - ldrb r1, [r1] - add r4, #0x20 - sub r0, #0x42 - sub r1, r1, #1 - strb r1, [r4] - pop {r3, r4, r5, pc} -_021DFD58: - add r2, r4, #0 - add r2, #0x21 - ldrb r2, [r2] - cmp r2, #3 - blo _021DFD6C - sub r1, r2, #1 - add r4, #0x20 - strb r1, [r4] - sub r0, #0x42 - pop {r3, r4, r5, pc} -_021DFD6C: - mov r0, #0x80 - add r2, r1, #0 - tst r2, r0 - beq _021DFDA4 - add r2, r4, #0 - add r2, #0x21 - ldrb r5, [r2] - add r2, r4, #0 - add r2, #0x20 - ldrb r3, [r2] - sub r2, r5, #1 - cmp r3, r2 - bge _021DFD96 - add r1, r4, #0 - add r1, #0x20 - ldrb r1, [r1] - add r4, #0x20 - sub r0, #0x82 - add r1, r1, #1 - strb r1, [r4] - pop {r3, r4, r5, pc} -_021DFD96: - cmp r5, #3 - blo _021DFDA4 - mov r0, #0 - add r4, #0x20 - strb r0, [r4] - sub r0, r0, #2 - pop {r3, r4, r5, pc} -_021DFDA4: - mov r0, #2 - tst r0, r1 - beq _021DFDB6 - ldr r0, _021DFDD8 ; =0x000005DD - bl sub_02005748 - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, pc} -_021DFDB6: - mov r0, #1 - tst r1, r0 - beq _021DFDCE - ldr r0, _021DFDD8 ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - lsl r0, r0, #2 - ldr r0, [r4, r0] - pop {r3, r4, r5, pc} -_021DFDCE: - sub r0, r0, #4 - pop {r3, r4, r5, pc} - nop -_021DFDD4: .word 0x021BF67C -_021DFDD8: .word 0x000005DD - thumb_func_end ov19_021DFD2C - - thumb_func_start ov19_021DFDDC -ov19_021DFDDC: ; 0x021DFDDC - add r0, #0x74 - add r1, r0, #0 - add r1, #0x20 - ldrb r1, [r1] - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov19_021DFDDC - - thumb_func_start ov19_021DFDEC -ov19_021DFDEC: ; 0x021DFDEC - ldr r0, [r0, #0x74] - bx lr - thumb_func_end ov19_021DFDEC - ; 0x021DFDF0 - - - .rodata - .incbin "incbin/overlay19_rodata.bin" - - .data - .incbin "incbin/overlay19_data.bin" - - .bss - .space 0x1A0 diff --git a/asm/overlay20.s b/asm/overlay20.s deleted file mode 100644 index dd11764c6..000000000 --- a/asm/overlay20.s +++ /dev/null @@ -1,9005 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov20_021D0D80 -ov20_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0 - beq _021D0D92 - cmp r1, #1 - beq _021D0DCA - b _021D0DF2 -_021D0D92: - mov r1, #0 - mov r0, #0x3e - add r2, r1, #0 - bl sub_02004550 - mov r2, #2 - mov r0, #3 - mov r1, #0x22 - lsl r2, r2, #0xe - bl sub_02017FC8 - mov r2, #0xa - mov r0, #3 - mov r1, #0x23 - lsl r2, r2, #0xe - bl sub_02017FC8 - add r0, r5, #0 - bl ov20_021D0EC8 - ldr r0, [r0, #0x14] - mov r1, #0 - bl ov20_021D21A0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D0DF2 -_021D0DCA: - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D0DF2 - ldr r0, [r4, #4] - cmp r0, #2 - bne _021D0DE8 - ldr r0, [r4, #0x14] - bl ov20_021D2DF4 - b _021D0DEA -_021D0DE8: - mov r0, #0 -_021D0DEA: - add r4, #0x64 - strb r0, [r4] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D0DF2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D0D80 - - thumb_func_start ov20_021D0DF8 -ov20_021D0DF8: ; 0x021D0DF8 - push {r4, lr} - bl sub_0200682C - add r4, r0, #0 - ldr r0, _021D0E34 ; =0x021BF67C - ldr r1, [r0, #0x48] - strh r1, [r4, #0x30] - ldr r1, [r0, #0x44] - strh r1, [r4, #0x32] - ldr r0, [r0, #0x4c] - strh r0, [r4, #0x34] - ldr r0, [r4, #0x40] - bl sub_0202404C - ldr r2, [r4, #0x2c] - cmp r2, #0 - beq _021D0E26 - add r0, r4, #0 - add r4, #0x28 - add r1, r4, #0 - blx r2 - mov r0, #0 - pop {r4, pc} -_021D0E26: - add r1, r4, #0 - ldr r2, [r4, #0x20] - add r0, r4, #0 - add r1, #0x1c - blx r2 - pop {r4, pc} - nop -_021D0E34: .word 0x021BF67C - thumb_func_end ov20_021D0DF8 - - thumb_func_start ov20_021D0E38 -ov20_021D0E38: ; 0x021D0E38 - push {r4, lr} - add r4, r2, #0 - cmp r1, #3 - bhi _021D0EA0 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D0E4C: ; jump table - .short _021D0E54 - _021D0E4C - 2 ; case 0 - .short _021D0E74 - _021D0E4C - 2 ; case 1 - .short _021D0E96 - _021D0E4C - 2 ; case 2 - .short _021D0E74 - _021D0E4C - 2 ; case 3 -_021D0E54: - str r0, [r4, #0x38] - cmp r0, #2 - beq _021D0E60 - cmp r0, #3 - beq _021D0E6A - pop {r4, pc} -_021D0E60: - ldr r0, [r4, #0x14] - mov r1, #0x19 - bl ov20_021D21A0 - pop {r4, pc} -_021D0E6A: - ldr r0, [r4, #0x14] - mov r1, #0x1a - bl ov20_021D21A0 - pop {r4, pc} -_021D0E74: - cmp r0, #2 - beq _021D0E7E - cmp r0, #3 - beq _021D0E88 - b _021D0E90 -_021D0E7E: - ldr r0, [r4, #0x14] - mov r1, #0x1b - bl ov20_021D21A0 - b _021D0E90 -_021D0E88: - ldr r0, [r4, #0x14] - mov r1, #0x1c - bl ov20_021D21A0 -_021D0E90: - mov r0, #4 - str r0, [r4, #0x38] - pop {r4, pc} -_021D0E96: - sub r1, r0, #2 - cmp r1, #1 - bhi _021D0EA4 - str r0, [r4, #0x38] - pop {r4, pc} -_021D0EA0: - mov r0, #4 - str r0, [r4, #0x38] -_021D0EA4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D0E38 - - thumb_func_start ov20_021D0EA8 -ov20_021D0EA8: ; 0x021D0EA8 - push {r4, lr} - add r4, r0, #0 - bl sub_0200682C - add r1, r4, #0 - bl ov20_021D1014 - mov r0, #0x22 - bl sub_0201807C - mov r0, #0x23 - bl sub_0201807C - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D0EA8 - - thumb_func_start ov20_021D0EC8 -ov20_021D0EC8: ; 0x021D0EC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x68 - mov r2, #0x22 - bl sub_0200681C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - str r0, [r4, #0] - bl sub_02097550 - str r0, [r4, #4] - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0] - add r1, #0x10 - add r2, #8 - bl sub_0209756C - ldr r0, [r4, #4] - cmp r0, #2 - bne _021D0F04 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x60 - add r1, #8 - bl ov20_021D0F64 -_021D0F04: - ldr r1, [r4, #0] - mov r0, #0x22 - bl sub_020998EC - str r0, [r4, #0x18] - ldr r1, [r4, #0x18] - add r0, r4, #0 - bl ov20_021D2098 - str r0, [r4, #0x14] - mov r0, #0x22 - str r0, [sp] - ldr r0, _021D0F54 ; =0x021D5154 - ldr r2, _021D0F58 ; =ov20_021D0E38 - mov r1, #5 - add r3, r4, #0 - bl sub_02023FCC - str r0, [r4, #0x40] - mov r1, #0 - str r1, [r4, #0x44] - add r0, r4, #0 - str r1, [r4, #0x48] - add r0, #0x65 - strb r1, [r0] - str r1, [r4, #0x2c] - ldr r0, _021D0F5C ; =ov20_021D103C - str r1, [r4, #0x28] - str r0, [r4, #0x20] - add r0, r4, #0 - str r1, [r4, #0x1c] - add r0, #0x4e - strh r1, [r0] - ldr r1, _021D0F60 ; =ov20_021D1C5C - add r0, r4, #0 - bl ov20_021D1C4C - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_021D0F54: .word 0x021D5154 -_021D0F58: .word ov20_021D0E38 -_021D0F5C: .word ov20_021D103C -_021D0F60: .word ov20_021D1C5C - thumb_func_end ov20_021D0EC8 - - thumb_func_start ov20_021D0F64 -ov20_021D0F64: ; 0x021D0F64 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02014C80 - strh r0, [r5] - mov r0, #0 - ldrsh r0, [r5, r0] - bl sub_02014CD4 - strb r0, [r5, #3] - add r0, r4, #0 - bl sub_02014C84 - strb r0, [r5, #2] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D0F64 - - thumb_func_start ov20_021D0F88 -ov20_021D0F88: ; 0x021D0F88 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - add r4, r1, #0 - ldrsb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, #2] - ldrsb r1, [r5, r0] - mov r0, #3 - ldrsb r0, [r5, r0] - cmp r1, r0 - blt _021D0FBC - mov r1, #0 - strb r1, [r5, #2] - ldrsh r0, [r5, r1] - add r0, r0, #1 - strh r0, [r5] - ldrsh r0, [r5, r1] - cmp r0, #5 - blt _021D0FB2 - strh r1, [r5] -_021D0FB2: - mov r0, #0 - ldrsh r0, [r5, r0] - bl sub_02014CD4 - strb r0, [r5, #3] -_021D0FBC: - mov r1, #0 - mov r2, #2 - ldrsh r1, [r5, r1] - ldrsb r2, [r5, r2] - add r0, r4, #0 - bl sub_02014CE0 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D0F88 - - thumb_func_start ov20_021D0FCC -ov20_021D0FCC: ; 0x021D0FCC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - add r4, r1, #0 - ldrsb r1, [r5, r0] - sub r1, r1, #1 - strb r1, [r5, #2] - ldrsb r0, [r5, r0] - cmp r0, #0 - bge _021D1004 - mov r0, #0 - ldrsh r1, [r5, r0] - sub r1, r1, #1 - strh r1, [r5] - ldrsh r0, [r5, r0] - cmp r0, #0 - bge _021D0FF2 - mov r0, #4 - strh r0, [r5] -_021D0FF2: - mov r0, #0 - ldrsh r0, [r5, r0] - bl sub_02014CD4 - strb r0, [r5, #3] - mov r0, #3 - ldrsb r0, [r5, r0] - sub r0, r0, #1 - strb r0, [r5, #2] -_021D1004: - mov r1, #0 - mov r2, #2 - ldrsh r1, [r5, r1] - ldrsb r2, [r5, r2] - add r0, r4, #0 - bl sub_02014CE0 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D0FCC - - thumb_func_start ov20_021D1014 -ov20_021D1014: ; 0x021D1014 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x40] - add r4, r1, #0 - bl sub_02024034 - ldr r0, [r5, #0x14] - bl ov20_021D2128 - ldr r0, [r5, #0x18] - bl sub_0209992C - add r0, r4, #0 - bl sub_02006830 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D1014 - - thumb_func_start ov20_021D1034 -ov20_021D1034: ; 0x021D1034 - str r1, [r0, #0x20] - mov r1, #0 - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov20_021D1034 - - thumb_func_start ov20_021D103C -ov20_021D103C: ; 0x021D103C - push {r3, lr} - ldr r2, [r0, #4] - lsl r3, r2, #2 - ldr r2, _021D104C ; =0x021D5148 - ldr r2, [r2, r3] - blx r2 - pop {r3, pc} - nop -_021D104C: .word 0x021D5148 - thumb_func_end ov20_021D103C - - thumb_func_start ov20_021D1050 -ov20_021D1050: ; 0x021D1050 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D1066 - cmp r0, #1 - beq _021D10F0 - cmp r0, #2 - beq _021D1104 - b _021D1116 -_021D1066: - ldr r1, [r5, #0x38] - cmp r1, #0 - bne _021D1076 - add r0, r5, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - bne _021D108C -_021D1076: - cmp r1, #1 - bne _021D1084 - add r0, r5, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #1 - bne _021D108C -_021D1084: - ldrh r0, [r5, #0x30] - mov r1, #4 - tst r1, r0 - beq _021D1096 -_021D108C: - ldr r1, _021D111C ; =ov20_021D1F38 - add r0, r5, #0 - bl ov20_021D1C4C - b _021D1116 -_021D1096: - mov r1, #0x88 - tst r1, r0 - beq _021D10B8 - ldr r0, _021D1120 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - add r0, #0x4c - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #4 - bl ov20_021D21A0 - mov r0, #1 - str r0, [r4, #0] - b _021D1116 -_021D10B8: - mov r1, #2 - tst r1, r0 - beq _021D10CE - ldr r0, _021D1120 ; =0x000005DC - bl sub_02005748 - ldr r1, _021D1124 ; =ov20_021D1DBC - add r0, r5, #0 - bl ov20_021D1C4C - b _021D1116 -_021D10CE: - mov r1, #1 - tst r0, r1 - beq _021D1116 - ldr r0, _021D1120 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #6 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r4, #0] - b _021D1116 -_021D10F0: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1116 - ldr r1, _021D1128 ; =ov20_021D1468 - add r0, r5, #0 - bl ov20_021D1034 - b _021D1116 -_021D1104: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1116 - ldr r1, _021D112C ; =ov20_021D15A0 - add r0, r5, #0 - bl ov20_021D1034 -_021D1116: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D111C: .word ov20_021D1F38 -_021D1120: .word 0x000005DC -_021D1124: .word ov20_021D1DBC -_021D1128: .word ov20_021D1468 -_021D112C: .word ov20_021D15A0 - thumb_func_end ov20_021D1050 - - thumb_func_start ov20_021D1130 -ov20_021D1130: ; 0x021D1130 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D1146 - cmp r0, #1 - beq _021D1220 - cmp r0, #2 - beq _021D1234 - b _021D1246 -_021D1146: - ldr r1, [r5, #0x38] - cmp r1, #0 - bne _021D1156 - add r0, r5, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - bne _021D116C -_021D1156: - cmp r1, #1 - bne _021D1164 - add r0, r5, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #1 - bne _021D116C -_021D1164: - ldrh r0, [r5, #0x30] - mov r1, #4 - tst r1, r0 - beq _021D1176 -_021D116C: - ldr r1, _021D124C ; =ov20_021D1F38 - add r0, r5, #0 - bl ov20_021D1C4C - b _021D1246 -_021D1176: - mov r1, #0x88 - tst r1, r0 - beq _021D1198 - ldr r0, _021D1250 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - add r0, #0x4c - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #4 - bl ov20_021D21A0 - mov r0, #1 - str r0, [r4, #0] - b _021D1246 -_021D1198: - mov r1, #0x20 - tst r1, r0 - beq _021D11C0 - add r0, r5, #0 - add r0, #0x4e - ldrh r0, [r0] - cmp r0, #0 - beq _021D1246 - ldr r0, _021D1250 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - add r0, #0x4e - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #0xc - bl ov20_021D21A0 - b _021D1246 -_021D11C0: - mov r1, #0x10 - tst r1, r0 - beq _021D11E8 - add r0, r5, #0 - add r0, #0x4e - ldrh r0, [r0] - cmp r0, #0 - bne _021D1246 - ldr r0, _021D1250 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #1 - add r0, #0x4e - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #0xc - bl ov20_021D21A0 - b _021D1246 -_021D11E8: - mov r1, #2 - tst r1, r0 - beq _021D11FE - ldr r0, _021D1250 ; =0x000005DC - bl sub_02005748 - ldr r1, _021D1254 ; =ov20_021D1DBC - add r0, r5, #0 - bl ov20_021D1C4C - b _021D1246 -_021D11FE: - mov r1, #1 - tst r0, r1 - beq _021D1246 - ldr r0, _021D1250 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #6 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r4, #0] - b _021D1246 -_021D1220: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1246 - ldr r1, _021D1258 ; =ov20_021D1468 - add r0, r5, #0 - bl ov20_021D1034 - b _021D1246 -_021D1234: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1246 - ldr r1, _021D125C ; =ov20_021D15A0 - add r0, r5, #0 - bl ov20_021D1034 -_021D1246: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D124C: .word ov20_021D1F38 -_021D1250: .word 0x000005DC -_021D1254: .word ov20_021D1DBC -_021D1258: .word ov20_021D1468 -_021D125C: .word ov20_021D15A0 - thumb_func_end ov20_021D1130 - - thumb_func_start ov20_021D1260 -ov20_021D1260: ; 0x021D1260 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #4 - bhi _021D12DC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D1278: ; jump table - .short _021D1282 - _021D1278 - 2 ; case 0 - .short _021D1292 - _021D1278 - 2 ; case 1 - .short _021D1416 - _021D1278 - 2 ; case 2 - .short _021D1428 - _021D1278 - 2 ; case 3 - .short _021D143C - _021D1278 - 2 ; case 4 -_021D1282: - ldr r0, [r4, #0x14] - bl ov20_021D2DF4 - add r1, r4, #0 - add r1, #0x64 - strb r0, [r1] - mov r0, #1 - str r0, [r5, #0] -_021D1292: - ldr r1, [r4, #0x38] - cmp r1, #0 - bne _021D12A2 - add r0, r4, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - bne _021D12B8 -_021D12A2: - cmp r1, #1 - bne _021D12B0 - add r0, r4, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #1 - bne _021D12B8 -_021D12B0: - ldrh r0, [r4, #0x30] - mov r1, #4 - tst r1, r0 - beq _021D12C2 -_021D12B8: - ldr r1, _021D1454 ; =ov20_021D1F38 - add r0, r4, #0 - bl ov20_021D1C4C - b _021D144E -_021D12C2: - mov r1, #0x40 - tst r1, r0 - beq _021D12FC - add r0, r4, #0 - add r0, #0x64 - ldrb r0, [r0] - cmp r0, #0 - beq _021D12DC - add r0, r4, #0 - add r0, #0x4e - ldrh r0, [r0] - cmp r0, #0 - bne _021D12DE -_021D12DC: - b _021D144E -_021D12DE: - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - add r0, #0x4e - ldrh r0, [r0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x4e - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #0xc - bl ov20_021D21A0 - b _021D144E -_021D12FC: - mov r1, #0x80 - tst r0, r1 - beq _021D134C - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - add r0, #0x64 - ldrb r2, [r0] - cmp r2, #0 - beq _021D1336 - add r0, r4, #0 - add r0, #0x4e - ldrh r1, [r0] - sub r0, r2, #1 - cmp r1, r0 - bge _021D1336 - add r0, r4, #0 - add r0, #0x4e - ldrh r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x4e - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #0xc - bl ov20_021D21A0 - b _021D134C -_021D1336: - add r0, r4, #0 - mov r1, #0 - add r0, #0x4c - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #4 - bl ov20_021D21A0 - mov r0, #3 - str r0, [r5, #0] - b _021D144E -_021D134C: - ldrh r1, [r4, #0x30] - mov r0, #8 - tst r0, r1 - bne _021D1366 - mov r0, #1 - add r2, r1, #0 - and r2, r0 - beq _021D1382 - add r0, r4, #0 - add r0, #0x64 - ldrb r0, [r0] - cmp r0, #0 - bne _021D1382 -_021D1366: - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - add r0, #0x4c - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #4 - bl ov20_021D21A0 - mov r0, #3 - str r0, [r5, #0] - b _021D144E -_021D1382: - ldrh r0, [r4, #0x34] - mov r3, #0x20 - tst r3, r0 - beq _021D13B2 - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - add r0, #0x4e - strh r1, [r0] - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x60 - add r1, #8 - bl ov20_021D0FCC - ldr r0, [r4, #0x14] - mov r1, #3 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r5, #0] - b _021D144E -_021D13B2: - mov r3, #0x10 - tst r0, r3 - beq _021D13E0 - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - add r0, #0x4e - strh r1, [r0] - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x60 - add r1, #8 - bl ov20_021D0F88 - ldr r0, [r4, #0x14] - mov r1, #3 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r5, #0] - b _021D144E -_021D13E0: - mov r0, #2 - tst r0, r1 - beq _021D13F6 - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - ldr r1, _021D145C ; =ov20_021D1DBC - add r0, r4, #0 - bl ov20_021D1C4C - b _021D144E -_021D13F6: - cmp r2, #0 - beq _021D144E - ldr r0, _021D1458 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #6 - bl ov20_021D21A0 - mov r0, #4 - str r0, [r5, #0] - b _021D144E -_021D1416: - ldr r0, [r4, #0x14] - mov r1, #3 - bl ov20_021D2210 - cmp r0, #0 - beq _021D144E - mov r0, #0 - str r0, [r5, #0] - b _021D144E -_021D1428: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D144E - ldr r1, _021D1460 ; =ov20_021D1468 - add r0, r4, #0 - bl ov20_021D1034 - b _021D144E -_021D143C: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D144E - ldr r1, _021D1464 ; =ov20_021D15A0 - add r0, r4, #0 - bl ov20_021D1034 -_021D144E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D1454: .word ov20_021D1F38 -_021D1458: .word 0x000005DC -_021D145C: .word ov20_021D1DBC -_021D1460: .word ov20_021D1468 -_021D1464: .word ov20_021D15A0 - thumb_func_end ov20_021D1260 - - thumb_func_start ov20_021D1468 -ov20_021D1468: ; 0x021D1468 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #5 - bls _021D1476 - b _021D1588 -_021D1476: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D1482: ; jump table - .short _021D148E - _021D1482 - 2 ; case 0 - .short _021D1558 - _021D1482 - 2 ; case 1 - .short _021D1564 - _021D1482 - 2 ; case 2 - .short _021D1570 - _021D1482 - 2 ; case 3 - .short _021D1570 - _021D1482 - 2 ; case 4 - .short _021D1576 - _021D1482 - 2 ; case 5 -_021D148E: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1588 - ldr r1, [r4, #0x38] - cmp r1, #0 - bne _021D14A8 - add r0, r4, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - bne _021D14BE -_021D14A8: - cmp r1, #1 - bne _021D14B6 - add r0, r4, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #1 - bne _021D14BE -_021D14B6: - ldrh r0, [r4, #0x30] - mov r1, #4 - tst r1, r0 - beq _021D14C8 -_021D14BE: - ldr r1, _021D158C ; =ov20_021D1F38 - add r0, r4, #0 - bl ov20_021D1C4C - b _021D1588 -_021D14C8: - mov r1, #0x30 - tst r1, r0 - beq _021D14EE - ldr r0, _021D1590 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - add r0, #0x4c - ldrh r1, [r0] - mov r0, #1 - eor r1, r0 - add r0, r4, #0 - add r0, #0x4c - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #0xd - bl ov20_021D21A0 - b _021D1588 -_021D14EE: - mov r1, #8 - tst r1, r0 - beq _021D150C - ldr r0, _021D1590 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - add r0, #0x4c - strh r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #0xd - bl ov20_021D21A0 - b _021D1588 -_021D150C: - mov r1, #0x40 - tst r1, r0 - beq _021D1526 - ldr r0, _021D1590 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #5 - bl ov20_021D21A0 - mov r0, #5 - str r0, [r5, #0] - b _021D1588 -_021D1526: - mov r1, #1 - tst r1, r0 - beq _021D1546 - ldr r0, _021D1590 ; =0x000005DC - bl sub_02005748 - add r4, #0x4c - ldrh r0, [r4] - cmp r0, #0 - bne _021D1540 - mov r0, #1 - str r0, [r5, #0] - b _021D1588 -_021D1540: - mov r0, #2 - str r0, [r5, #0] - b _021D1588 -_021D1546: - mov r1, #2 - tst r0, r1 - beq _021D1588 - ldr r0, _021D1590 ; =0x000005DC - bl sub_02005748 - mov r0, #2 - str r0, [r5, #0] - b _021D1588 -_021D1558: - mov r1, #3 - str r1, [r5, #0] - ldr r1, _021D1594 ; =ov20_021D1C90 - bl ov20_021D1C4C - b _021D1588 -_021D1564: - mov r1, #4 - str r1, [r5, #0] - ldr r1, _021D1598 ; =ov20_021D1DBC - bl ov20_021D1C4C - b _021D1588 -_021D1570: - mov r0, #0 - str r0, [r5, #0] - b _021D1588 -_021D1576: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1588 - ldr r1, _021D159C ; =ov20_021D103C - add r0, r4, #0 - bl ov20_021D1034 -_021D1588: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D158C: .word ov20_021D1F38 -_021D1590: .word 0x000005DC -_021D1594: .word ov20_021D1C90 -_021D1598: .word ov20_021D1DBC -_021D159C: .word ov20_021D103C - thumb_func_end ov20_021D1468 - - thumb_func_start ov20_021D15A0 -ov20_021D15A0: ; 0x021D15A0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D15B8 - cmp r0, #1 - beq _021D16AC - cmp r0, #2 - bne _021D15B6 - b _021D16C0 -_021D15B6: - b _021D16D0 -_021D15B8: - ldr r0, [r5, #0x14] - mov r1, #0xf - bl ov20_021D2210 - cmp r0, #0 - bne _021D15C6 - b _021D16D0 -_021D15C6: - ldr r1, [r5, #0x38] - cmp r1, #0 - bne _021D15D6 - add r0, r5, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - bne _021D15EC -_021D15D6: - cmp r1, #1 - bne _021D15E4 - add r0, r5, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #1 - bne _021D15EC -_021D15E4: - ldrh r0, [r5, #0x30] - mov r1, #4 - tst r1, r0 - beq _021D1618 -_021D15EC: - ldr r0, _021D16D4 ; =0x000005E4 - bl sub_02005748 - add r0, r5, #0 - add r0, #0x65 - ldrb r1, [r0] - mov r0, #1 - eor r1, r0 - add r0, r5, #0 - add r0, #0x65 - strb r1, [r0] - add r0, r5, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #0x18 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r4, #0] - b _021D16D0 -_021D1618: - mov r1, #2 - tst r1, r0 - beq _021D1636 - ldr r0, _021D16D8 ; =0x000005DC - bl sub_02005748 - ldr r0, [r5, #0x14] - mov r1, #7 - bl ov20_021D21A0 - ldr r0, _021D16DC ; =ov20_021D103C - str r0, [r5, #0x24] - mov r0, #1 - str r0, [r4, #0] - b _021D16D0 -_021D1636: - mov r1, #1 - tst r0, r1 - beq _021D1692 - add r0, r5, #0 - add r0, #0x50 - ldrh r0, [r0] - cmp r0, #0xfe - bne _021D165E - ldr r0, _021D16D8 ; =0x000005DC - bl sub_02005748 - ldr r0, [r5, #0x14] - mov r1, #7 - bl ov20_021D21A0 - ldr r0, _021D16DC ; =ov20_021D103C - str r0, [r5, #0x24] - mov r0, #1 - str r0, [r4, #0] - b _021D16D0 -_021D165E: - add r0, r5, #0 - bl ov20_021D16E8 - cmp r0, #0 - beq _021D168A - ldr r0, _021D16D8 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0x54 - add r1, r5, #0 - bl ov20_021D1884 - ldr r0, _021D16E0 ; =ov20_021D18E4 - mov r1, #8 - str r0, [r5, #0x24] - ldr r0, [r5, #0x14] - bl ov20_021D21A0 - mov r0, #1 - str r0, [r4, #0] - b _021D16D0 -_021D168A: - ldr r0, _021D16E4 ; =0x000005F2 - bl sub_02005748 - b _021D16D0 -_021D1692: - add r0, r5, #0 - bl ov20_021D1720 - cmp r0, #0 - beq _021D16D0 - ldr r0, _021D16D8 ; =0x000005DC - bl sub_02005748 - ldr r0, [r5, #0x14] - mov r1, #0xe - bl ov20_021D21A0 - b _021D16D0 -_021D16AC: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D16D0 - ldr r1, [r5, #0x24] - add r0, r5, #0 - bl ov20_021D1034 - b _021D16D0 -_021D16C0: - ldr r0, [r5, #0x14] - mov r1, #0x18 - bl ov20_021D2210 - cmp r0, #0 - beq _021D16D0 - mov r0, #0 - str r0, [r4, #0] -_021D16D0: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D16D4: .word 0x000005E4 -_021D16D8: .word 0x000005DC -_021D16DC: .word ov20_021D103C -_021D16E0: .word ov20_021D18E4 -_021D16E4: .word 0x000005F2 - thumb_func_end ov20_021D15A0 - - thumb_func_start ov20_021D16E8 -ov20_021D16E8: ; 0x021D16E8 - push {r3, lr} - add r1, r0, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - ldr r0, [r1, #0x18] - bne _021D170A - add r1, #0x50 - ldrh r1, [r1] - bl sub_02099CA0 - cmp r0, #0 - beq _021D1706 - mov r0, #1 - pop {r3, pc} -_021D1706: - mov r0, #0 - pop {r3, pc} -_021D170A: - add r1, #0x50 - ldrh r1, [r1] - bl sub_02099CDC - cmp r0, #0 - beq _021D171A - mov r0, #1 - pop {r3, pc} -_021D171A: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov20_021D16E8 - - thumb_func_start ov20_021D1720 -ov20_021D1720: ; 0x021D1720 - push {r3, lr} - add r1, r0, #0 - add r1, #0x65 - ldrb r1, [r1] - lsl r2, r1, #2 - ldr r1, _021D1734 ; =0x021D5140 - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - nop -_021D1734: .word 0x021D5140 - thumb_func_end ov20_021D1720 - - thumb_func_start ov20_021D1738 -ov20_021D1738: ; 0x021D1738 - push {r4, lr} - add r4, r0, #0 - add r0, #0x50 - ldrh r2, [r0] - add r1, r2, #0 - cmp r2, #0xfe - bne _021D1748 - mov r1, #0xc -_021D1748: - cmp r2, #0xfe - beq _021D17A4 - add r0, r4, #0 - add r0, #0x52 - strh r2, [r0] - ldrh r0, [r4, #0x34] - mov r2, #0x40 - tst r2, r0 - beq _021D1768 - ldr r0, _021D17E0 ; =0x021D5168 - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r4, #0x50 - strh r0, [r4] - mov r0, #1 - pop {r4, pc} -_021D1768: - mov r2, #0x80 - tst r2, r0 - beq _021D177C - ldr r0, _021D17E4 ; =0x021D5169 - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r4, #0x50 - strh r0, [r4] - mov r0, #1 - pop {r4, pc} -_021D177C: - mov r2, #0x20 - tst r2, r0 - beq _021D1790 - ldr r0, _021D17E8 ; =0x021D516A - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r4, #0x50 - strh r0, [r4] - mov r0, #1 - pop {r4, pc} -_021D1790: - mov r2, #0x10 - tst r0, r2 - beq _021D17DC - ldr r0, _021D17EC ; =0x021D516B - lsl r1, r1, #2 - ldrb r0, [r0, r1] - add r4, #0x50 - strh r0, [r4] - mov r0, #1 - pop {r4, pc} -_021D17A4: - ldrh r1, [r4, #0x34] - mov r0, #0x40 - tst r0, r1 - beq _021D17C2 - add r0, r4, #0 - add r0, #0x52 - ldrh r0, [r0] - mov r1, #3 - bl sub_020E1F6C - add r1, #9 - add r4, #0x50 - strh r1, [r4] - mov r0, #1 - pop {r4, pc} -_021D17C2: - mov r0, #0x80 - tst r0, r1 - beq _021D17DC - add r0, r4, #0 - add r0, #0x52 - ldrh r0, [r0] - mov r1, #3 - bl sub_020E1F6C - add r4, #0x50 - strh r1, [r4] - mov r0, #1 - pop {r4, pc} -_021D17DC: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D17E0: .word 0x021D5168 -_021D17E4: .word 0x021D5169 -_021D17E8: .word 0x021D516A -_021D17EC: .word 0x021D516B - thumb_func_end ov20_021D1738 - - thumb_func_start ov20_021D17F0 -ov20_021D17F0: ; 0x021D17F0 - push {r4, lr} - add r4, r0, #0 - add r0, #0x50 - ldrh r0, [r0] - cmp r0, #0xfe - beq _021D184E - ldrh r1, [r4, #0x34] - mov r3, #0x40 - mov r2, #0xff - tst r3, r1 - beq _021D180E - bl ov20_021D5098 - add r2, r0, #0 - b _021D1836 -_021D180E: - mov r3, #0x80 - tst r3, r1 - beq _021D181C - bl ov20_021D50B4 - add r2, r0, #0 - b _021D1836 -_021D181C: - mov r3, #0x10 - tst r3, r1 - beq _021D182A - bl ov20_021D50EC - add r2, r0, #0 - b _021D1836 -_021D182A: - mov r3, #0x20 - tst r1, r3 - beq _021D1836 - bl ov20_021D50D0 - add r2, r0, #0 -_021D1836: - cmp r2, #0xff - beq _021D1880 - add r0, r4, #0 - add r0, #0x50 - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x52 - strh r1, [r0] - add r4, #0x50 - strh r2, [r4] - mov r0, #1 - pop {r4, pc} -_021D184E: - ldrh r1, [r4, #0x34] - mov r0, #0x40 - tst r0, r1 - beq _021D1868 - add r0, r4, #0 - add r0, #0x52 - ldrh r0, [r0] - bl ov20_021D5124 - add r4, #0x50 - strh r0, [r4] - mov r0, #1 - pop {r4, pc} -_021D1868: - mov r0, #0x80 - tst r0, r1 - beq _021D1880 - add r0, r4, #0 - add r0, #0x52 - ldrh r0, [r0] - bl ov20_021D5108 - add r4, #0x50 - strh r0, [r4] - mov r0, #1 - pop {r4, pc} -_021D1880: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov20_021D17F0 - - thumb_func_start ov20_021D1884 -ov20_021D1884: ; 0x021D1884 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - strh r0, [r4] - strb r0, [r4, #6] - strb r0, [r4, #7] - add r0, r1, #0 - bl ov20_021D1FE4 - strh r0, [r4, #4] - mov r0, #0 - str r0, [r4, #8] - ldrh r2, [r4, #4] - cmp r2, #0xa - bls _021D18B6 - add r1, r2, #0 - sub r1, #0xa - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - mov r0, #1 - and r0, r2 - add r0, r1, r0 - strh r0, [r4, #2] - pop {r4, pc} -_021D18B6: - strh r0, [r4, #2] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D1884 - - thumb_func_start ov20_021D18BC -ov20_021D18BC: ; 0x021D18BC - ldrb r1, [r0, #6] - ldrb r0, [r0, #7] - lsl r0, r0, #1 - add r0, r1, r0 - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D18BC - - thumb_func_start ov20_021D18C8 -ov20_021D18C8: ; 0x021D18C8 - push {r4, lr} - add r4, r0, #0 - bl ov20_021D18BC - ldrh r1, [r4] - lsl r1, r1, #1 - add r0, r1, r0 - pop {r4, pc} - thumb_func_end ov20_021D18C8 - - thumb_func_start ov20_021D18D8 -ov20_021D18D8: ; 0x021D18D8 - ldr r0, [r0, #8] - bx lr - thumb_func_end ov20_021D18D8 - - thumb_func_start ov20_021D18DC -ov20_021D18DC: ; 0x021D18DC - ldrh r0, [r0] - bx lr - thumb_func_end ov20_021D18DC - - thumb_func_start ov20_021D18E0 -ov20_021D18E0: ; 0x021D18E0 - ldrh r0, [r0, #2] - bx lr - thumb_func_end ov20_021D18E0 - - thumb_func_start ov20_021D18E4 -ov20_021D18E4: ; 0x021D18E4 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #3 - bls _021D18F2 - b _021D1A54 -_021D18F2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D18FE: ; jump table - .short _021D1906 - _021D18FE - 2 ; case 0 - .short _021D1A12 - _021D18FE - 2 ; case 1 - .short _021D1A24 - _021D18FE - 2 ; case 2 - .short _021D1A3E - _021D18FE - 2 ; case 3 -_021D1906: - ldr r0, [r4, #0x38] - cmp r0, #0 - bne _021D1916 - add r1, r4, #0 - add r1, #0x65 - ldrb r1, [r1] - cmp r1, #0 - bne _021D192C -_021D1916: - cmp r0, #1 - bne _021D1924 - add r1, r4, #0 - add r1, #0x65 - ldrb r1, [r1] - cmp r1, #1 - bne _021D192C -_021D1924: - ldrh r2, [r4, #0x30] - mov r1, #4 - tst r1, r2 - beq _021D195C -_021D192C: - ldr r0, _021D1A58 ; =0x000005E4 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x65 - ldrb r1, [r0] - mov r0, #1 - eor r1, r0 - add r0, r4, #0 - add r0, #0x65 - strb r1, [r0] - ldr r0, [r4, #0x14] - mov r1, #9 - bl ov20_021D21A0 - ldr r0, _021D1A5C ; =ov20_021D15A0 - str r0, [r4, #0x24] - mov r0, #3 - str r0, [r5, #0] - b _021D1A54 -_021D195C: - cmp r0, #2 - bne _021D196A - add r0, r4, #0 - add r0, #0x54 - bl ov20_021D1B48 - b _021D1982 -_021D196A: - cmp r0, #3 - bne _021D1978 - add r0, r4, #0 - add r0, #0x54 - bl ov20_021D1B70 - b _021D1982 -_021D1978: - ldrh r1, [r4, #0x34] - add r0, r4, #0 - add r0, #0x54 - bl ov20_021D1A68 -_021D1982: - cmp r0, #1 - beq _021D1990 - cmp r0, #2 - beq _021D19A2 - cmp r0, #3 - beq _021D19B8 - b _021D19CE -_021D1990: - ldr r0, _021D1A60 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0xf - bl ov20_021D21A0 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D19A2: - ldr r0, _021D1A60 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0x10 - bl ov20_021D21A0 - mov r0, #1 - str r0, [r5, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D19B8: - ldr r0, _021D1A60 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0x10 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r5, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D19CE: - ldrh r1, [r4, #0x30] - mov r0, #2 - tst r0, r1 - beq _021D19EE - ldr r0, _021D1A60 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #9 - bl ov20_021D21A0 - ldr r0, _021D1A5C ; =ov20_021D15A0 - str r0, [r4, #0x24] - mov r0, #3 - str r0, [r5, #0] - b _021D1A54 -_021D19EE: - mov r0, #1 - tst r0, r1 - beq _021D1A54 - ldr r0, _021D1A60 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - bl ov20_021D1BB0 - ldr r0, _021D1A64 ; =ov20_021D103C - mov r1, #0xa - str r0, [r4, #0x24] - ldr r0, [r4, #0x14] - bl ov20_021D21A0 - mov r0, #3 - str r0, [r5, #0] - b _021D1A54 -_021D1A12: - ldr r0, [r4, #0x14] - mov r1, #0x10 - bl ov20_021D2210 - cmp r0, #0 - beq _021D1A54 - mov r0, #0 - str r0, [r5, #0] - b _021D1A54 -_021D1A24: - ldr r0, [r4, #0x14] - mov r1, #0x10 - bl ov20_021D2210 - cmp r0, #0 - beq _021D1A54 - ldr r0, [r4, #0x14] - mov r1, #0xf - bl ov20_021D21A0 - mov r0, #0 - str r0, [r5, #0] - b _021D1A54 -_021D1A3E: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1A54 - ldr r1, [r4, #0x24] - add r0, r4, #0 - bl ov20_021D1034 - mov r0, #0 - str r0, [r5, #0] -_021D1A54: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1A58: .word 0x000005E4 -_021D1A5C: .word ov20_021D15A0 -_021D1A60: .word 0x000005DC -_021D1A64: .word ov20_021D103C - thumb_func_end ov20_021D18E4 - - thumb_func_start ov20_021D1A68 -ov20_021D1A68: ; 0x021D1A68 - push {r3, r4, r5, lr} - mov r2, #0x80 - add r4, r0, #0 - tst r2, r1 - beq _021D1AD2 - ldrb r1, [r4, #7] - cmp r1, #4 - bhs _021D1AA6 - add r1, r1, #1 - strb r1, [r4, #7] - bl ov20_021D18C8 - ldrh r1, [r4, #4] - cmp r0, r1 - bhs _021D1A8A - mov r0, #1 - pop {r3, r4, r5, pc} -_021D1A8A: - cmp r0, r1 - bne _021D1A9C - mov r1, #1 - tst r0, r1 - beq _021D1A9C - mov r0, #0 - strb r0, [r4, #6] - add r0, r1, #0 - pop {r3, r4, r5, pc} -_021D1A9C: - ldrb r0, [r4, #7] - sub r0, r0, #1 - strb r0, [r4, #7] - mov r0, #4 - pop {r3, r4, r5, pc} -_021D1AA6: - ldrh r2, [r4] - ldrh r1, [r4, #2] - cmp r2, r1 - bhs _021D1ACE - mov r1, #1 - str r1, [r4, #8] - ldrh r1, [r4] - add r1, r1, #1 - strh r1, [r4] - bl ov20_021D18C8 - ldrh r1, [r4, #4] - cmp r0, r1 - bhs _021D1AC6 - mov r0, #2 - pop {r3, r4, r5, pc} -_021D1AC6: - mov r0, #0 - strb r0, [r4, #6] - mov r0, #3 - pop {r3, r4, r5, pc} -_021D1ACE: - mov r0, #4 - pop {r3, r4, r5, pc} -_021D1AD2: - mov r5, #0x40 - add r2, r1, #0 - tst r2, r5 - beq _021D1B00 - ldrb r0, [r4, #7] - cmp r0, #0 - beq _021D1AE8 - sub r0, r0, #1 - strb r0, [r4, #7] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D1AE8: - ldrh r0, [r4] - cmp r0, #0 - beq _021D1AFC - sub r5, #0x41 - str r5, [r4, #8] - ldrh r0, [r4] - sub r0, r0, #1 - strh r0, [r4] - mov r0, #2 - pop {r3, r4, r5, pc} -_021D1AFC: - mov r0, #4 - pop {r3, r4, r5, pc} -_021D1B00: - mov r3, #0x30 - add r2, r1, #0 - tst r2, r3 - beq _021D1B2A - ldrb r2, [r4, #6] - mov r1, #1 - eor r1, r2 - strb r1, [r4, #6] - bl ov20_021D18C8 - ldrh r1, [r4, #4] - cmp r0, r1 - bhs _021D1B1E - mov r0, #1 - pop {r3, r4, r5, pc} -_021D1B1E: - ldrb r1, [r4, #6] - mov r0, #1 - eor r0, r1 - strb r0, [r4, #6] - mov r0, #4 - pop {r3, r4, r5, pc} -_021D1B2A: - lsl r2, r5, #3 - tst r2, r1 - beq _021D1B36 - bl ov20_021D1B48 - pop {r3, r4, r5, pc} -_021D1B36: - add r3, #0xd0 - tst r1, r3 - beq _021D1B42 - bl ov20_021D1B70 - pop {r3, r4, r5, pc} -_021D1B42: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D1A68 - - thumb_func_start ov20_021D1B48 -ov20_021D1B48: ; 0x021D1B48 - ldrh r1, [r0] - cmp r1, #0 - beq _021D1B6A - cmp r1, #5 - blo _021D1B5E - sub r1, r1, #5 - strh r1, [r0] - mov r1, #4 - mvn r1, r1 - str r1, [r0, #8] - b _021D1B66 -_021D1B5E: - neg r1, r1 - str r1, [r0, #8] - mov r1, #0 - strh r1, [r0] -_021D1B66: - mov r0, #2 - bx lr -_021D1B6A: - mov r0, #4 - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1B48 - - thumb_func_start ov20_021D1B70 -ov20_021D1B70: ; 0x021D1B70 - push {r4, lr} - add r4, r0, #0 - ldrh r2, [r4, #2] - ldrh r1, [r4] - cmp r1, r2 - bhs _021D1BAC - add r0, r1, #5 - cmp r0, r2 - bgt _021D1B8C - mov r0, #5 - str r0, [r4, #8] - ldrh r0, [r4] - add r0, r0, #5 - b _021D1B92 -_021D1B8C: - sub r0, r2, r1 - str r0, [r4, #8] - ldrh r0, [r4, #2] -_021D1B92: - strh r0, [r4] - add r0, r4, #0 - bl ov20_021D18C8 - ldrh r1, [r4, #4] - cmp r0, r1 - bhs _021D1BA4 - mov r0, #2 - pop {r4, pc} -_021D1BA4: - mov r0, #0 - strb r0, [r4, #6] - mov r0, #3 - pop {r4, pc} -_021D1BAC: - mov r0, #4 - pop {r4, pc} - thumb_func_end ov20_021D1B70 - - thumb_func_start ov20_021D1BB0 -ov20_021D1BB0: ; 0x021D1BB0 - push {r4, lr} - add r4, r0, #0 - add r0, #0x54 - bl ov20_021D18C8 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - ldr r0, [r4, #0x18] - bne _021D1BD4 - add r1, r4, #0 - add r1, #0x50 - ldrh r1, [r1] - bl sub_02099CC8 - b _021D1BDE -_021D1BD4: - add r1, r4, #0 - add r1, #0x50 - ldrh r1, [r1] - bl sub_02099D14 -_021D1BDE: - add r2, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021D1BF0 - cmp r0, #1 - beq _021D1BF4 - cmp r0, #2 - beq _021D1C02 - b _021D1C10 -_021D1BF0: - strh r2, [r4, #0x10] - b _021D1C10 -_021D1BF4: - add r0, r4, #0 - add r0, #0x4e - ldrh r0, [r0] - lsl r0, r0, #1 - add r0, r4, r0 - strh r2, [r0, #0x10] - b _021D1C10 -_021D1C02: - add r1, r4, #0 - add r1, #0x4e - ldrh r1, [r1] - add r0, r4, #0 - add r0, #8 - bl sub_02014CF8 -_021D1C10: - add r0, r4, #0 - bl ov20_021D1E8C - pop {r4, pc} - thumb_func_end ov20_021D1BB0 - - thumb_func_start ov20_021D1C18 -ov20_021D1C18: ; 0x021D1C18 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D1C28 - cmp r1, #1 - beq _021D1C38 - b _021D1C46 -_021D1C28: - ldr r0, [r0, #0x14] - mov r1, #1 - bl ov20_021D21A0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D1C46 -_021D1C38: - ldr r0, [r0, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1C46 - mov r0, #1 - pop {r4, pc} -_021D1C46: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D1C18 - - thumb_func_start ov20_021D1C4C -ov20_021D1C4C: ; 0x021D1C4C - str r1, [r0, #0x2c] - mov r1, #0 - str r1, [r0, #0x28] - bx lr - thumb_func_end ov20_021D1C4C - - thumb_func_start ov20_021D1C54 -ov20_021D1C54: ; 0x021D1C54 - mov r1, #0 - str r1, [r0, #0x2c] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1C54 - - thumb_func_start ov20_021D1C5C -ov20_021D1C5C: ; 0x021D1C5C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D1C6E - cmp r0, #1 - beq _021D1C7E - pop {r3, r4, r5, pc} -_021D1C6E: - ldr r0, [r5, #0x14] - mov r1, #2 - bl ov20_021D21A0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D1C7E: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1C8E - add r0, r5, #0 - bl ov20_021D1C54 -_021D1C8E: - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D1C5C - - thumb_func_start ov20_021D1C90 -ov20_021D1C90: ; 0x021D1C90 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #3 - bls _021D1C9E - b _021D1DAC -_021D1C9E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D1CAA: ; jump table - .short _021D1CB2 - _021D1CAA - 2 ; case 0 - .short _021D1D00 - _021D1CAA - 2 ; case 1 - .short _021D1D86 - _021D1CAA - 2 ; case 2 - .short _021D1D9C - _021D1CAA - 2 ; case 3 -_021D1CB2: - bl ov20_021D1E70 - cmp r0, #0 - bne _021D1CC4 - ldr r0, [r4, #0] - bl sub_02097568 - cmp r0, #0 - beq _021D1CF6 -_021D1CC4: - add r0, r4, #0 - bl ov20_021D1E8C - cmp r0, #0 - beq _021D1CE8 - add r0, r4, #0 - add r0, #0x66 - mov r1, #1 - mov r2, #0 - bl ov20_021D1ED4 - ldr r0, [r4, #0x14] - mov r1, #0x12 - bl ov20_021D21A0 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1CE8: - ldr r0, [r4, #0x14] - mov r1, #0x14 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1CF6: - ldr r1, _021D1DB0 ; =ov20_021D1DBC - add r0, r4, #0 - bl ov20_021D1C4C - pop {r3, r4, r5, pc} -_021D1D00: - ldr r0, [r4, #0x14] - mov r1, #0x15 - bl ov20_021D2210 - cmp r0, #0 - beq _021D1DAC - ldrh r1, [r4, #0x30] - add r0, r4, #0 - add r0, #0x66 - bl ov20_021D1EDC - add r0, r0, #3 - cmp r0, #4 - bhi _021D1DAC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D1D28: ; jump table - .short _021D1D32 - _021D1D28 - 2 ; case 0 - .short _021D1D42 - _021D1D28 - 2 ; case 1 - .short _021D1DAC - _021D1D28 - 2 ; case 2 - .short _021D1D56 - _021D1D28 - 2 ; case 3 - .short _021D1D42 - _021D1D28 - 2 ; case 4 -_021D1D32: - ldr r0, _021D1DB4 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0x15 - bl ov20_021D21A0 - pop {r3, r4, r5, pc} -_021D1D42: - ldr r0, _021D1DB4 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0x16 - bl ov20_021D21A0 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1D56: - ldr r0, _021D1DB4 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #4] - cmp r0, #2 - bne _021D1D6A - add r0, r4, #0 - add r0, #8 - bl sub_02014D10 -_021D1D6A: - add r1, r4, #0 - add r2, r4, #0 - ldr r0, [r4, #0] - add r1, #0x10 - add r2, #8 - bl sub_020975E4 - ldr r1, _021D1DB8 ; =ov20_021D1C18 - add r0, r4, #0 - bl ov20_021D1034 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1D86: - ldrh r1, [r4, #0x30] - mov r0, #0xf3 - tst r0, r1 - beq _021D1DAC - ldr r0, [r4, #0x14] - mov r1, #0x11 - bl ov20_021D21A0 - mov r0, #3 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1D9C: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1DAC - add r0, r4, #0 - bl ov20_021D1C54 -_021D1DAC: - pop {r3, r4, r5, pc} - nop -_021D1DB0: .word ov20_021D1DBC -_021D1DB4: .word 0x000005DC -_021D1DB8: .word ov20_021D1C18 - thumb_func_end ov20_021D1C90 - - thumb_func_start ov20_021D1DBC -ov20_021D1DBC: ; 0x021D1DBC - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D1DD2 - cmp r0, #1 - beq _021D1DEC - cmp r0, #2 - beq _021D1E56 - pop {r3, r4, r5, pc} -_021D1DD2: - add r0, r4, #0 - mov r1, #1 - add r0, #0x66 - add r2, r1, #0 - bl ov20_021D1ED4 - ldr r0, [r4, #0x14] - mov r1, #0x13 - bl ov20_021D21A0 - mov r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1DEC: - ldr r0, [r4, #0x14] - mov r1, #0x15 - bl ov20_021D2210 - cmp r0, #0 - beq _021D1E66 - ldrh r1, [r4, #0x30] - add r0, r4, #0 - add r0, #0x66 - bl ov20_021D1EDC - add r0, r0, #3 - cmp r0, #4 - bhi _021D1E66 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D1E14: ; jump table - .short _021D1E1E - _021D1E14 - 2 ; case 0 - .short _021D1E2E - _021D1E14 - 2 ; case 1 - .short _021D1E66 - _021D1E14 - 2 ; case 2 - .short _021D1E42 - _021D1E14 - 2 ; case 3 - .short _021D1E2E - _021D1E14 - 2 ; case 4 -_021D1E1E: - ldr r0, _021D1E68 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0x15 - bl ov20_021D21A0 - pop {r3, r4, r5, pc} -_021D1E2E: - ldr r0, _021D1E68 ; =0x000005DC - bl sub_02005748 - ldr r0, [r4, #0x14] - mov r1, #0x16 - bl ov20_021D21A0 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1E42: - ldr r0, _021D1E68 ; =0x000005DC - bl sub_02005748 - ldr r1, _021D1E6C ; =ov20_021D1C18 - add r0, r4, #0 - bl ov20_021D1034 - mov r0, #2 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D1E56: - ldr r0, [r4, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1E66 - add r0, r4, #0 - bl ov20_021D1C54 -_021D1E66: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1E68: .word 0x000005DC -_021D1E6C: .word ov20_021D1C18 - thumb_func_end ov20_021D1DBC - - thumb_func_start ov20_021D1E70 -ov20_021D1E70: ; 0x021D1E70 - push {r3, lr} - add r2, r0, #0 - add r1, r2, #0 - ldr r0, [r2, #0] - add r1, #0x10 - add r2, #8 - bl sub_020975A0 - cmp r0, #0 - bne _021D1E88 - mov r0, #1 - pop {r3, pc} -_021D1E88: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov20_021D1E70 - - thumb_func_start ov20_021D1E8C -ov20_021D1E8C: ; 0x021D1E8C - push {r3, lr} - ldr r1, [r0, #4] - cmp r1, #0 - beq _021D1E9E - cmp r1, #1 - beq _021D1EAE - cmp r1, #2 - beq _021D1EC4 - b _021D1ECC -_021D1E9E: - ldrh r1, [r0, #0x10] - ldr r0, _021D1ED0 ; =0x0000FFFF - cmp r1, r0 - beq _021D1EAA - mov r0, #1 - pop {r3, pc} -_021D1EAA: - mov r0, #0 - pop {r3, pc} -_021D1EAE: - ldrh r2, [r0, #0x10] - ldr r1, _021D1ED0 ; =0x0000FFFF - cmp r2, r1 - beq _021D1EC0 - ldrh r0, [r0, #0x12] - cmp r0, r1 - beq _021D1EC0 - mov r0, #1 - pop {r3, pc} -_021D1EC0: - mov r0, #0 - pop {r3, pc} -_021D1EC4: - add r0, #8 - bl sub_02014BD0 - pop {r3, pc} -_021D1ECC: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021D1ED0: .word 0x0000FFFF - thumb_func_end ov20_021D1E8C - - thumb_func_start ov20_021D1ED4 -ov20_021D1ED4: ; 0x021D1ED4 - strb r2, [r0] - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1ED4 - - thumb_func_start ov20_021D1EDC -ov20_021D1EDC: ; 0x021D1EDC - mov r2, #0x40 - add r3, r1, #0 - tst r3, r2 - beq _021D1EFA - ldrb r1, [r0] - cmp r1, #0 - bne _021D1EF0 - sub r2, #0x44 - add r0, r2, #0 - bx lr -_021D1EF0: - sub r1, r1, #1 - sub r2, #0x43 - strb r1, [r0] - add r0, r2, #0 - bx lr -_021D1EFA: - mov r2, #0x80 - add r3, r1, #0 - tst r3, r2 - beq _021D1F1A - ldrb r3, [r0] - ldrb r1, [r0, #1] - cmp r3, r1 - bne _021D1F10 - sub r2, #0x84 - add r0, r2, #0 - bx lr -_021D1F10: - add r1, r3, #1 - sub r2, #0x83 - strb r1, [r0] - add r0, r2, #0 - bx lr -_021D1F1A: - mov r2, #1 - tst r2, r1 - beq _021D1F24 - ldrb r0, [r0] - bx lr -_021D1F24: - mov r0, #2 - tst r1, r0 - beq _021D1F2E - sub r0, r0, #4 - bx lr -_021D1F2E: - sub r0, r0, #3 - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1EDC - - thumb_func_start ov20_021D1F34 -ov20_021D1F34: ; 0x021D1F34 - ldrb r0, [r0] - bx lr - thumb_func_end ov20_021D1F34 - - thumb_func_start ov20_021D1F38 -ov20_021D1F38: ; 0x021D1F38 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D1F4A - cmp r0, #1 - beq _021D1F6E - pop {r3, r4, r5, pc} -_021D1F4A: - ldr r0, _021D1F80 ; =0x000005E4 - bl sub_02005748 - add r0, r5, #0 - add r0, #0x65 - ldrb r1, [r0] - mov r0, #1 - eor r1, r0 - add r0, r5, #0 - add r0, #0x65 - strb r1, [r0] - ldr r0, [r5, #0x14] - mov r1, #0x17 - bl ov20_021D21A0 - mov r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D1F6E: - ldr r0, [r5, #0x14] - bl ov20_021D21F8 - cmp r0, #0 - beq _021D1F7E - add r0, r5, #0 - bl ov20_021D1C54 -_021D1F7E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1F80: .word 0x000005E4 - thumb_func_end ov20_021D1F38 - - thumb_func_start ov20_021D1F84 -ov20_021D1F84: ; 0x021D1F84 - ldr r0, [r0, #4] - bx lr - thumb_func_end ov20_021D1F84 - - thumb_func_start ov20_021D1F88 -ov20_021D1F88: ; 0x021D1F88 - ldr r3, _021D1F90 ; =sub_02097554 - ldr r0, [r0, #0] - bx r3 - nop -_021D1F90: .word sub_02097554 - thumb_func_end ov20_021D1F88 - - thumb_func_start ov20_021D1F94 -ov20_021D1F94: ; 0x021D1F94 - add r0, #0x65 - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1F94 - - thumb_func_start ov20_021D1F9C -ov20_021D1F9C: ; 0x021D1F9C - ldr r3, _021D1FA4 ; =sub_02014C80 - add r0, #8 - bx r3 - nop -_021D1FA4: .word sub_02014C80 - thumb_func_end ov20_021D1F9C - - thumb_func_start ov20_021D1FA8 -ov20_021D1FA8: ; 0x021D1FA8 - push {r3, lr} - ldr r2, [r0, #4] - cmp r2, #2 - bne _021D1FB8 - add r0, #8 - bl sub_02014C78 - pop {r3, pc} -_021D1FB8: - lsl r1, r1, #1 - add r0, r0, r1 - ldrh r0, [r0, #0x10] - pop {r3, pc} - thumb_func_end ov20_021D1FA8 - - thumb_func_start ov20_021D1FC0 -ov20_021D1FC0: ; 0x021D1FC0 - ldr r3, _021D1FC8 ; =sub_02014BA0 - add r0, #8 - bx r3 - nop -_021D1FC8: .word sub_02014BA0 - thumb_func_end ov20_021D1FC0 - - thumb_func_start ov20_021D1FCC -ov20_021D1FCC: ; 0x021D1FCC - add r0, #0x4e - ldrh r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1FCC - - thumb_func_start ov20_021D1FD4 -ov20_021D1FD4: ; 0x021D1FD4 - add r0, #0x4c - ldrh r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1FD4 - - thumb_func_start ov20_021D1FDC -ov20_021D1FDC: ; 0x021D1FDC - add r0, #0x50 - ldrh r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D1FDC - - thumb_func_start ov20_021D1FE4 -ov20_021D1FE4: ; 0x021D1FE4 - push {r3, lr} - add r1, r0, #0 - add r0, #0x65 - ldrb r0, [r0] - cmp r0, #0 - ldr r0, [r1, #0x18] - bne _021D1FFC - add r1, #0x50 - ldrh r1, [r1] - bl sub_02099CA0 - pop {r3, pc} -_021D1FFC: - add r1, #0x50 - ldrh r1, [r1] - bl sub_02099CDC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov20_021D1FE4 - - thumb_func_start ov20_021D2008 -ov20_021D2008: ; 0x021D2008 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x65 - ldrb r0, [r0] - add r4, r1, #0 - add r3, r2, #0 - cmp r0, #0 - ldr r0, [r5, #0x18] - bne _021D2026 - add r5, #0x50 - ldrh r1, [r5] - add r2, r4, #0 - bl sub_02099CA8 - pop {r3, r4, r5, pc} -_021D2026: - add r5, #0x50 - ldrh r1, [r5] - add r2, r4, #0 - bl sub_02099CEC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2008 - - thumb_func_start ov20_021D2034 -ov20_021D2034: ; 0x021D2034 - ldr r3, _021D203C ; =ov20_021D18BC - add r0, #0x54 - bx r3 - nop -_021D203C: .word ov20_021D18BC - thumb_func_end ov20_021D2034 - - thumb_func_start ov20_021D2040 -ov20_021D2040: ; 0x021D2040 - ldr r3, _021D2048 ; =ov20_021D18D8 - add r0, #0x54 - bx r3 - nop -_021D2048: .word ov20_021D18D8 - thumb_func_end ov20_021D2040 - - thumb_func_start ov20_021D204C -ov20_021D204C: ; 0x021D204C - push {r3, lr} - add r0, #0x54 - bl ov20_021D18DC - cmp r0, #0 - beq _021D205C - mov r0, #1 - pop {r3, pc} -_021D205C: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov20_021D204C - - thumb_func_start ov20_021D2060 -ov20_021D2060: ; 0x021D2060 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x54 - bl ov20_021D18DC - add r5, #0x54 - add r4, r0, #0 - add r0, r5, #0 - bl ov20_021D18E0 - cmp r4, r0 - bge _021D207C - mov r0, #1 - pop {r3, r4, r5, pc} -_021D207C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2060 - - thumb_func_start ov20_021D2080 -ov20_021D2080: ; 0x021D2080 - ldr r3, _021D2088 ; =sub_02097558 - ldr r0, [r0, #0] - bx r3 - nop -_021D2088: .word sub_02097558 - thumb_func_end ov20_021D2080 - - thumb_func_start ov20_021D208C -ov20_021D208C: ; 0x021D208C - ldr r3, _021D2094 ; =ov20_021D1F34 - add r0, #0x66 - bx r3 - nop -_021D2094: .word ov20_021D1F34 - thumb_func_end ov20_021D208C - - thumb_func_start ov20_021D2098 -ov20_021D2098: ; 0x021D2098 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r6, r1, #0 - mov r1, #0x7d - add r5, r0, #0 - mov r0, #0x23 - lsl r1, r1, #2 - bl sub_02018144 - add r4, r0, #0 - beq _021D2118 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - str r5, [r4, #0x18] - str r6, [r4, #0x1c] - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x80 - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r2, #0x23 - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - add r1, r4, #0 - mov r0, #0x80 - add r1, #0x28 - mov r2, #0x23 - bl sub_020095C4 - str r0, [r4, #0x24] - mov r0, #0x23 - bl sub_02018340 - str r0, [r4, #0x20] - ldr r0, _021D2120 ; =ov20_021D2178 - add r1, r4, #0 - mov r2, #2 - bl sub_0200D9E8 - str r0, [r4, #0] - ldr r0, _021D2124 ; =ov20_021D217C - add r1, r4, #0 - mov r2, #1 - bl ov20_021D2170 - mov r1, #0 - str r0, [r4, #4] - add r2, r4, #0 - add r0, r1, #0 -_021D210E: - add r1, r1, #1 - str r0, [r2, #8] - add r2, r2, #4 - cmp r1, #4 - blt _021D210E -_021D2118: - add r0, r4, #0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_021D2120: .word ov20_021D2178 -_021D2124: .word ov20_021D217C - thumb_func_end ov20_021D2098 - - thumb_func_start ov20_021D2128 -ov20_021D2128: ; 0x021D2128 - push {r4, r5, r6, lr} - add r6, r0, #0 - beq _021D216E - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - mov r4, #0 - add r5, r6, #0 -_021D213A: - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D2144 - bl sub_0200DA58 -_021D2144: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D213A - ldr r0, [r6, #0] - bl sub_0200DA58 - ldr r0, [r6, #4] - bl sub_0200DA58 - bl sub_0200A878 - ldr r0, [r6, #0x24] - bl sub_02021964 - ldr r0, [r6, #0x20] - bl sub_020181C4 - add r0, r6, #0 - bl sub_020181C4 -_021D216E: - pop {r4, r5, r6, pc} - thumb_func_end ov20_021D2128 - - thumb_func_start ov20_021D2170 -ov20_021D2170: ; 0x021D2170 - ldr r3, _021D2174 ; =sub_0200DA04 - bx r3 - ; .align 2, 0 -_021D2174: .word sub_0200DA04 - thumb_func_end ov20_021D2170 - - thumb_func_start ov20_021D2178 -ov20_021D2178: ; 0x021D2178 - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D2178 - - thumb_func_start ov20_021D217C -ov20_021D217C: ; 0x021D217C - push {r3, lr} - ldr r0, [r1, #0x24] - bl sub_020219F8 - bl sub_0200A858 - ldr r3, _021D2198 ; =0x027E0000 - ldr r1, _021D219C ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r3, pc} - nop -_021D2198: .word 0x027E0000 -_021D219C: .word 0x00003FF8 - thumb_func_end ov20_021D217C - - thumb_func_start ov20_021D21A0 -ov20_021D21A0: ; 0x021D21A0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - cmp r6, #0x1d - bhs _021D21EE - mov r0, #0x23 - mov r1, #0x18 - bl sub_02018144 - add r1, r0, #0 - beq _021D21F2 - mov r4, #0 - str r4, [r1, #0x14] - str r6, [r1, #0xc] - str r5, [r1, #0] - ldr r0, [r5, #0x18] - add r2, r5, #0 - str r0, [r1, #4] - ldr r0, [r5, #0x1c] - str r0, [r1, #8] -_021D21C8: - ldr r0, [r2, #8] - cmp r0, #0 - bne _021D21E4 - ldr r0, _021D21F4 ; =0x021D5260 - lsl r2, r6, #2 - ldr r0, [r0, r2] - mov r2, #1 - str r4, [r1, #0x10] - bl sub_0200D9E8 - lsl r1, r4, #2 - add r1, r5, r1 - str r0, [r1, #8] - pop {r4, r5, r6, pc} -_021D21E4: - add r4, r4, #1 - add r2, r2, #4 - cmp r4, #4 - blt _021D21C8 - pop {r4, r5, r6, pc} -_021D21EE: - bl sub_02022974 -_021D21F2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D21F4: .word 0x021D5260 - thumb_func_end ov20_021D21A0 - - thumb_func_start ov20_021D21F8 -ov20_021D21F8: ; 0x021D21F8 - mov r2, #0 -_021D21FA: - ldr r1, [r0, #8] - cmp r1, #0 - beq _021D2204 - mov r0, #0 - bx lr -_021D2204: - add r2, r2, #1 - add r0, r0, #4 - cmp r2, #4 - blt _021D21FA - mov r0, #1 - bx lr - thumb_func_end ov20_021D21F8 - - thumb_func_start ov20_021D2210 -ov20_021D2210: ; 0x021D2210 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_021D2218: - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D222C - bl sub_0201CED0 - ldr r0, [r0, #0xc] - cmp r0, r6 - bne _021D222C - mov r0, #0 - pop {r4, r5, r6, pc} -_021D222C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D2218 - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov20_021D2210 - - thumb_func_start ov20_021D2238 -ov20_021D2238: ; 0x021D2238 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #8] - bl sub_0200DA58 - ldr r0, [r4, #0x10] - ldr r1, [r4, #0] - lsl r0, r0, #2 - mov r2, #0 - add r0, r1, r0 - str r2, [r0, #8] - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2238 - - thumb_func_start ov20_021D2260 -ov20_021D2260: ; 0x021D2260 - push {r3, r4, r5, lr} - add r4, r1, #0 - bl sub_0201FF00 - bl sub_0201FF68 - mov r1, #1 - lsl r1, r1, #0x1a - ldr r0, [r1, #0] - ldr r2, _021D2360 ; =0xFFFFE0FF - and r0, r2 - str r0, [r1, #0] - ldr r0, _021D2364 ; =0x04001000 - ldr r3, [r0, #0] - and r2, r3 - str r2, [r0, #0] - ldr r2, [r1, #0] - ldr r3, _021D2368 ; =0xFFCFFFEF - add r5, r2, #0 - ldr r2, _021D236C ; =0x00100010 - and r5, r3 - orr r2, r5 - str r2, [r1, #0] - ldr r1, [r0, #0] - add r2, r1, #0 - and r2, r3 - mov r1, #0x10 - orr r1, r2 - str r1, [r0, #0] - mov r0, #0x4c - mov r1, #0x23 - bl sub_02006C24 - add r5, r0, #0 - add r0, r4, #0 - bl ov20_021D24EC - add r0, r4, #0 - add r1, r5, #0 - bl ov20_021D2370 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl ov20_021D2EA4 - mov r1, #0x1e - ldr r2, [r4, #0] - lsl r1, r1, #4 - str r0, [r2, r1] - ldr r0, [r4, #0] - ldr r0, [r0, r1] - add r1, r5, #0 - bl ov20_021D2F50 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl ov20_021D3864 - mov r1, #0x79 - ldr r2, [r4, #0] - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - ldr r0, [r0, r1] - add r1, r5, #0 - bl ov20_021D3898 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl ov20_021D3A54 - mov r1, #0x7a - ldr r2, [r4, #0] - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - ldr r0, [r0, r1] - add r1, r5, #0 - bl ov20_021D3A98 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl ov20_021D40E8 - mov r1, #0x7b - ldr r2, [r4, #0] - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - ldr r0, [r0, r1] - bl ov20_021D41A8 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - bl ov20_021D4728 - mov r1, #0x1f - ldr r2, [r4, #0] - lsl r1, r1, #4 - str r0, [r2, r1] - ldr r0, [r4, #0] - ldr r0, [r0, r1] - add r1, r5, #0 - bl ov20_021D4774 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - bl sub_020BDDF8 - add r0, r5, #0 - bl sub_02006CA8 - add r0, r4, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - nop -_021D2360: .word 0xFFFFE0FF -_021D2364: .word 0x04001000 -_021D2368: .word 0xFFCFFFEF -_021D236C: .word 0x00100010 - thumb_func_end ov20_021D2260 - - thumb_func_start ov20_021D2370 -ov20_021D2370: ; 0x021D2370 - push {r4, r5, lr} - sub sp, #0x14 - ldr r4, [r0, #0] - mov r0, #0x66 - lsl r0, r0, #2 - add r0, r4, r0 - add r5, r1, #0 - bl sub_020A81D0 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_020A81D0 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_020A818C - mov r0, #0x5d - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r1, #9 - bl sub_0200718C - mov r0, #0x23 - str r0, [sp] - mov r0, #0x66 - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl sub_0200716C - mov r1, #7 - mov r0, #0x23 - lsl r3, r1, #6 - str r0, [sp] - add r0, r5, #0 - mov r2, #1 - add r3, r4, r3 - bl sub_02007204 - mov r3, #0x1d - lsl r3, r3, #4 - str r0, [r4, r3] - mov r0, #0x23 - sub r3, #8 - str r0, [sp] - add r0, r5, #0 - mov r1, #8 - mov r2, #1 - add r3, r4, r3 - bl sub_02007220 - mov r1, #0x76 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r2, #0 - sub r0, r1, #4 - str r2, [r4, r0] - add r0, r1, #4 - str r2, [r4, r0] - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov20_021D2370 - - thumb_func_start ov20_021D2414 -ov20_021D2414: ; 0x021D2414 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - ldr r0, [r6, #0x14] - ldr r7, [r6, #0] - cmp r0, #0 - beq _021D242A - cmp r0, #1 - beq _021D244C - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021D242A: - mov r0, #5 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x23 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r6, #0x14] - add sp, #0xc - add r0, r0, #1 - str r0, [r6, #0x14] - pop {r4, r5, r6, r7, pc} -_021D244C: - bl sub_0200F2AC - cmp r0, #0 - beq _021D24E6 - mov r0, #0x1e - ldr r1, [r6, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov20_021D2EF0 - mov r0, #0x79 - ldr r1, [r6, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov20_021D3880 - mov r0, #0x7a - ldr r1, [r6, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov20_021D3A80 - mov r0, #0x7b - ldr r1, [r6, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov20_021D4164 - mov r0, #0x1f - ldr r1, [r6, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov20_021D4764 - mov r4, #0 - add r5, r7, #0 -_021D2494: - mov r0, #0x1d - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021D24A2 - bl sub_020181C4 -_021D24A2: - mov r0, #0x76 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021D24B0 - bl sub_020181C4 -_021D24B0: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021D2494 - ldr r0, [r7, #0x20] - mov r1, #0 - bl sub_02019044 - ldr r0, [r7, #0x20] - mov r1, #1 - bl sub_02019044 - ldr r0, [r7, #0x20] - mov r1, #2 - bl sub_02019044 - ldr r0, [r7, #0x20] - mov r1, #3 - bl sub_02019044 - ldr r0, [r7, #0x20] - mov r1, #4 - bl sub_02019044 - add r0, r6, #0 - bl ov20_021D2238 -_021D24E6: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2414 - - thumb_func_start ov20_021D24EC -ov20_021D24EC: ; 0x021D24EC - push {r4, lr} - ldr r2, _021D2550 ; =0x04000304 - ldr r4, [r0, #0] - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - mov r0, #1 - mov r1, #0 - add r2, r0, #0 - bl sub_020BDE40 - ldr r0, _021D2554 ; =0x021D5238 - bl sub_0201FE94 - ldr r0, _021D2558 ; =0x021D519C - bl sub_02018368 - mov r1, #0 - ldr r0, [r4, #0x20] - ldr r2, _021D255C ; =0x021D51E4 - add r3, r1, #0 - bl sub_020183C4 - ldr r0, [r4, #0x20] - ldr r2, _021D2560 ; =0x021D51AC - mov r1, #1 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x20] - ldr r2, _021D2564 ; =0x021D521C - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x20] - ldr r2, _021D2568 ; =0x021D51C8 - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x20] - ldr r2, _021D256C ; =0x021D5200 - mov r1, #4 - mov r3, #0 - bl sub_020183C4 - pop {r4, pc} - nop -_021D2550: .word 0x04000304 -_021D2554: .word 0x021D5238 -_021D2558: .word 0x021D519C -_021D255C: .word 0x021D51E4 -_021D2560: .word 0x021D51AC -_021D2564: .word 0x021D521C -_021D2568: .word 0x021D51C8 -_021D256C: .word 0x021D5200 - thumb_func_end ov20_021D24EC - - thumb_func_start ov20_021D2570 -ov20_021D2570: ; 0x021D2570 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D2582 - cmp r0, #1 - beq _021D25A2 - b _021D25B4 -_021D2582: - mov r0, #5 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x23 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0x14] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0x14] - pop {r3, r4, pc} -_021D25A2: - bl sub_0200F2AC - cmp r0, #0 - beq _021D25BA - ldr r0, [r4, #0x14] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0x14] - pop {r3, r4, pc} -_021D25B4: - add r0, r4, #0 - bl ov20_021D2238 -_021D25BA: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2570 - - thumb_func_start ov20_021D25C0 -ov20_021D25C0: ; 0x021D25C0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x1e - ldr r4, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3228 - ldr r0, [r5, #4] - bl ov20_021D1FCC - add r1, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3700 - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D25C0 - - thumb_func_start ov20_021D25EC -ov20_021D25EC: ; 0x021D25EC - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x1e - ldr r4, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D369C - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D36B0 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D39D4 - ldr r0, [r4, #0x18] - bl ov20_021D1FD4 - add r1, r0, #0 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39EC - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D25EC - - thumb_func_start ov20_021D2630 -ov20_021D2630: ; 0x021D2630 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x79 - ldr r4, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D39D4 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D36D0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D369C - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2630 - - thumb_func_start ov20_021D2660 -ov20_021D2660: ; 0x021D2660 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #0 - beq _021D2672 - cmp r0, #1 - beq _021D2698 - pop {r3, r4, r5, pc} -_021D2672: - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3684 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D36B0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3EF8 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2698: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3F10 - cmp r0, #0 - beq _021D26D4 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3A2C - ldr r0, [r4, #0x18] - bl ov20_021D1FDC - add r1, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3E74 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D3E48 - add r0, r5, #0 - bl ov20_021D2238 -_021D26D4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2660 - - thumb_func_start ov20_021D26D8 -ov20_021D26D8: ; 0x021D26D8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #0 - beq _021D26EE - cmp r0, #1 - beq _021D2700 - cmp r0, #2 - beq _021D2712 - pop {r3, r4, r5, pc} -_021D26EE: - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D4BA4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2700: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D40A8 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2712: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D40DC - cmp r0, #0 - beq _021D273E - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D4C2C - cmp r0, #0 - beq _021D273E - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4084 - add r0, r5, #0 - bl ov20_021D2238 -_021D273E: - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D26D8 - - thumb_func_start ov20_021D2740 -ov20_021D2740: ; 0x021D2740 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #3 - bhi _021D27E2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2758: ; jump table - .short _021D2760 - _021D2758 - 2 ; case 0 - .short _021D2772 - _021D2758 - 2 ; case 1 - .short _021D2790 - _021D2758 - 2 ; case 2 - .short _021D27B0 - _021D2758 - 2 ; case 3 -_021D2760: - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D4BA4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2772: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D3E48 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D40A8 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2790: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D40DC - cmp r0, #0 - beq _021D27E2 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4084 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D27B0: - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D4C2C - cmp r0, #0 - beq _021D27E2 - ldr r0, [r4, #0x18] - bl ov20_021D1FDC - add r1, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3E74 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D3E48 - add r0, r5, #0 - bl ov20_021D2238 -_021D27E2: - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2740 - - thumb_func_start ov20_021D27E4 -ov20_021D27E4: ; 0x021D27E4 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #0 - beq _021D27F6 - cmp r0, #1 - beq _021D281E - pop {r3, r4, r5, pc} -_021D27F6: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3A40 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D3E48 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3F60 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D281E: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3F84 - cmp r0, #0 - beq _021D2846 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D36D0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3690 - add r0, r5, #0 - bl ov20_021D2238 -_021D2846: - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D27E4 - - thumb_func_start ov20_021D2848 -ov20_021D2848: ; 0x021D2848 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #0 - beq _021D285E - cmp r0, #1 - beq _021D2886 - cmp r0, #2 - beq _021D28A6 - pop {r3, r4, r5, pc} -_021D285E: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4294 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D3E48 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4004 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2886: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4020 - cmp r0, #0 - beq _021D28E4 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D42E4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D28A6: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4390 - cmp r0, #0 - beq _021D28E4 - ldr r0, [r4, #0x18] - bl ov20_021D2034 - add r1, r0, #0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4480 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D4440 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D4DBC - add r0, r5, #0 - bl ov20_021D2238 -_021D28E4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2848 - - thumb_func_start ov20_021D28E8 -ov20_021D28E8: ; 0x021D28E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #4 - bhi _021D29B8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2900: ; jump table - .short _021D290A - _021D2900 - 2 ; case 0 - .short _021D291C - _021D2900 - 2 ; case 1 - .short _021D2946 - _021D2900 - 2 ; case 2 - .short _021D2966 - _021D2900 - 2 ; case 3 - .short _021D2978 - _021D2900 - 2 ; case 4 -_021D290A: - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D4BA4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D291C: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D4440 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D4DBC - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D43B4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2946: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D43D8 - cmp r0, #0 - beq _021D29B8 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4084 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2966: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D403C - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2978: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4078 - cmp r0, #0 - beq _021D29B8 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D4C2C - cmp r0, #0 - beq _021D29B8 - ldr r0, [r4, #0x18] - bl ov20_021D1FDC - add r1, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3E74 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D3E48 - add r0, r5, #0 - bl ov20_021D2238 -_021D29B8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D28E8 - - thumb_func_start ov20_021D29BC -ov20_021D29BC: ; 0x021D29BC - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #3 - bhi _021D2A98 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D29D4: ; jump table - .short _021D29DC - _021D29D4 - 2 ; case 0 - .short _021D2A10 - _021D29D4 - 2 ; case 1 - .short _021D2A3A - _021D29D4 - 2 ; case 2 - .short _021D2A5A - _021D29D4 - 2 ; case 3 -_021D29DC: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3A40 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D4440 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D4DBC - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D43B4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2A10: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D43D8 - cmp r0, #0 - beq _021D2A98 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3FD0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D403C - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2A3A: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4078 - cmp r0, #0 - beq _021D2A98 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3FE0 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2A5A: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3FF8 - cmp r0, #0 - beq _021D2A98 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3228 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D369C - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D36D0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3690 - add r0, r5, #0 - bl ov20_021D2238 -_021D2A98: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D29BC - - thumb_func_start ov20_021D2A9C -ov20_021D2A9C: ; 0x021D2A9C - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #3 - bhi _021D2B70 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2AB4: ; jump table - .short _021D2ABC - _021D2AB4 - 2 ; case 0 - .short _021D2AF0 - _021D2AB4 - 2 ; case 1 - .short _021D2B1A - _021D2AB4 - 2 ; case 2 - .short _021D2B3A - _021D2AB4 - 2 ; case 3 -_021D2ABC: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3A40 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D4440 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D4DBC - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D43B4 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2AF0: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D43D8 - cmp r0, #0 - beq _021D2B70 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3FD0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D403C - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2B1A: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4078 - cmp r0, #0 - beq _021D2B70 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3FE0 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2B3A: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3FF8 - cmp r0, #0 - beq _021D2B70 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3228 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D369C - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D39D4 - add r0, r5, #0 - bl ov20_021D2238 -_021D2B70: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2A9C - - thumb_func_start ov20_021D2B74 -ov20_021D2B74: ; 0x021D2B74 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #0x18] - bl ov20_021D1FCC - add r1, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3700 - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2B74 - - thumb_func_start ov20_021D2B94 -ov20_021D2B94: ; 0x021D2B94 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #0x18] - bl ov20_021D1FD4 - add r1, r0, #0 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39EC - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2B94 - - thumb_func_start ov20_021D2BB4 -ov20_021D2BB4: ; 0x021D2BB4 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #0x18] - bl ov20_021D1FDC - add r1, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D3E74 - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2BB4 - - thumb_func_start ov20_021D2BD4 -ov20_021D2BD4: ; 0x021D2BD4 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #0x18] - bl ov20_021D2034 - add r1, r0, #0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4480 - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2BD4 - - thumb_func_start ov20_021D2BF4 -ov20_021D2BF4: ; 0x021D2BF4 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x14] - ldr r4, [r5, #0] - cmp r0, #0 - beq _021D2C06 - cmp r0, #1 - beq _021D2C20 - pop {r3, r4, r5, pc} -_021D2C06: - ldr r0, [r4, #0x18] - bl ov20_021D2040 - add r1, r0, #0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D44BC - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - pop {r3, r4, r5, pc} -_021D2C20: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D4578 - cmp r0, #0 - beq _021D2C40 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl ov20_021D4DBC - add r0, r5, #0 - bl ov20_021D2238 -_021D2C40: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2BF4 - - thumb_func_start ov20_021D2C44 -ov20_021D2C44: ; 0x021D2C44 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x1e - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0 - bl ov20_021D3578 - add r0, r4, #0 - bl ov20_021D2238 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2C44 - - thumb_func_start ov20_021D2C60 -ov20_021D2C60: ; 0x021D2C60 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x1e - ldr r4, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #2 - bl ov20_021D3578 - ldr r0, [r5, #4] - bl ov20_021D208C - add r1, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3790 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39E0 - cmp r0, #0 - beq _021D2C9E - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39BC - b _021D2CA8 -_021D2C9E: - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3684 -_021D2CA8: - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2C60 - - thumb_func_start ov20_021D2CB0 -ov20_021D2CB0: ; 0x021D2CB0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x1e - ldr r4, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #3 - bl ov20_021D3578 - ldr r0, [r5, #4] - bl ov20_021D208C - add r1, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3790 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39E0 - cmp r0, #0 - beq _021D2CEE - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39BC - b _021D2CF8 -_021D2CEE: - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3684 -_021D2CF8: - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2CB0 - - thumb_func_start ov20_021D2D00 -ov20_021D2D00: ; 0x021D2D00 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x1e - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl ov20_021D3578 - add r0, r4, #0 - bl ov20_021D2238 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2D00 - - thumb_func_start ov20_021D2D1C -ov20_021D2D1C: ; 0x021D2D1C - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #4] - ldr r4, [r5, #0] - bl ov20_021D208C - add r1, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D381C - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2D1C - - thumb_func_start ov20_021D2D3C -ov20_021D2D3C: ; 0x021D2D3C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #0x1e - ldr r4, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl ov20_021D3578 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D384C - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39E0 - cmp r0, #0 - beq _021D2D72 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov20_021D39C8 - b _021D2D7C -_021D2D72: - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov20_021D3690 -_021D2D7C: - add r0, r5, #0 - bl ov20_021D2238 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D2D3C - - thumb_func_start ov20_021D2D84 -ov20_021D2D84: ; 0x021D2D84 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x1f - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0 - mov r2, #1 - bl ov20_021D4DF4 - add r0, r4, #0 - bl ov20_021D2238 - pop {r4, pc} - thumb_func_end ov20_021D2D84 - - thumb_func_start ov20_021D2DA0 -ov20_021D2DA0: ; 0x021D2DA0 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x1f - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - add r2, r1, #0 - bl ov20_021D4DF4 - add r0, r4, #0 - bl ov20_021D2238 - pop {r4, pc} - thumb_func_end ov20_021D2DA0 - - thumb_func_start ov20_021D2DBC -ov20_021D2DBC: ; 0x021D2DBC - push {r4, lr} - add r4, r1, #0 - mov r0, #0x1f - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0 - add r2, r1, #0 - bl ov20_021D4DF4 - add r0, r4, #0 - bl ov20_021D2238 - pop {r4, pc} - thumb_func_end ov20_021D2DBC - - thumb_func_start ov20_021D2DD8 -ov20_021D2DD8: ; 0x021D2DD8 - push {r4, lr} - add r4, r1, #0 - mov r0, #0x1f - ldr r1, [r4, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - mov r2, #0 - bl ov20_021D4DF4 - add r0, r4, #0 - bl ov20_021D2238 - pop {r4, pc} - thumb_func_end ov20_021D2DD8 - - thumb_func_start ov20_021D2DF4 -ov20_021D2DF4: ; 0x021D2DF4 - mov r1, #0x1e - lsl r1, r1, #4 - ldr r3, _021D2E00 ; =ov20_021D3574 - ldr r0, [r0, r1] - bx r3 - nop -_021D2E00: .word ov20_021D3574 - thumb_func_end ov20_021D2DF4 - - thumb_func_start ov20_021D2E04 -ov20_021D2E04: ; 0x021D2E04 - ldr r0, [r0, #0x20] - bx lr - thumb_func_end ov20_021D2E04 - - thumb_func_start ov20_021D2E08 -ov20_021D2E08: ; 0x021D2E08 - ldr r0, [r0, #0x24] - bx lr - thumb_func_end ov20_021D2E08 - - thumb_func_start ov20_021D2E0C -ov20_021D2E0C: ; 0x021D2E0C - push {r3, r4, r5, r6} - mov r4, #0x15 - lsl r4, r4, #4 - mov r5, #0x24 - add r6, r0, r4 - mul r5, r2 - add r5, r6, r5 - str r5, [r1, #0] - add r5, r4, #0 - add r5, #0x48 - add r6, r0, r5 - mov r5, #0x14 - mul r5, r2 - lsl r2, r2, #2 - add r5, r6, r5 - add r2, r0, r2 - add r0, r4, #0 - str r5, [r1, #8] - add r0, #0x70 - ldr r0, [r2, r0] - add r4, #0x78 - str r0, [r1, #0xc] - ldr r0, [r2, r4] - str r0, [r1, #0x10] - add r0, r1, #0 - add r0, #0x20 - strb r3, [r0] - mov r0, #0 - str r0, [r1, #4] - str r0, [r1, #0x14] - str r0, [r1, #0x18] - str r0, [r1, #0x1c] - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov20_021D2E0C - - thumb_func_start ov20_021D2E50 -ov20_021D2E50: ; 0x021D2E50 - push {r3, r4, r5, lr} - sub sp, #0x20 - ldr r0, [r0, #0x24] - str r0, [sp] - lsl r0, r2, #0xc - str r0, [sp, #8] - lsl r0, r3, #0xc - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x30] - str r1, [sp, #4] - str r0, [sp, #0x14] - ldr r0, [sp, #0x34] - str r0, [sp, #0x18] - mov r0, #0x23 - str r0, [sp, #0x1c] - bl sub_020C3D98 - add r4, r0, #0 - add r0, sp, #0 - bl sub_02021B90 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020C3DAC - cmp r5, #0 - beq _021D2E9C - add r0, r5, #0 - mov r1, #1 - bl sub_02021CC8 - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 -_021D2E9C: - add r0, r5, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D2E50 - - thumb_func_start ov20_021D2EA4 -ov20_021D2EA4: ; 0x021D2EA4 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x1b - add r5, r0, #0 - mov r0, #0x23 - lsl r1, r1, #4 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - mov r0, #0 - str r0, [r4, #0x3c] - str r0, [r4, #0x40] - str r0, [r4, #0x44] - mov r0, #0x80 - mov r1, #0x23 - bl sub_02023790 - str r0, [r4, #0x4c] - ldr r2, _021D2EEC ; =0x000001B5 - mov r0, #0 - mov r1, #0x1a - mov r3, #0x23 - bl sub_0200B144 - str r0, [r4, #0x48] - mov r0, #0x23 - bl sub_020149F0 - str r0, [r4, #0x50] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D2EEC: .word 0x000001B5 - thumb_func_end ov20_021D2EA4 - - thumb_func_start ov20_021D2EF0 -ov20_021D2EF0: ; 0x021D2EF0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #0 - beq _021D2EFE - bl sub_02014A20 -_021D2EFE: - ldr r0, [r4, #0x3c] - cmp r0, #0 - beq _021D2F08 - bl sub_02021BD4 -_021D2F08: - ldr r0, [r4, #0x40] - cmp r0, #0 - beq _021D2F12 - bl sub_02021BD4 -_021D2F12: - ldr r0, [r4, #0x44] - cmp r0, #0 - beq _021D2F1C - bl sub_02021BD4 -_021D2F1C: - ldr r0, [r4, #0x48] - cmp r0, #0 - beq _021D2F26 - bl sub_0200B190 -_021D2F26: - ldr r0, [r4, #0x4c] - cmp r0, #0 - beq _021D2F30 - bl sub_020237BC -_021D2F30: - add r0, r4, #0 - add r0, #0xc - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x1c - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x2c - bl sub_0201A8FC - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov20_021D2EF0 - - thumb_func_start ov20_021D2F50 -ov20_021D2F50: ; 0x021D2F50 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov20_021D2E04 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D30A4 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - bl sub_0200710C - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r6, #0 - bl sub_020070E8 - lsr r4, r0, #5 - mov r0, #1 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r2, #0 - lsl r0, r4, #0x10 - add r1, r5, #0 - str r2, [sp, #0xc] - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, #0xc - mov r3, #3 - bl sub_0201A7E8 - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - add r1, r5, #0 - str r3, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - add r0, r4, #0 - add r0, #0x6c - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, #0x1c - mov r2, #0 - bl sub_0201A7E8 - mov r0, #0xf - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - add r0, r4, #0 - add r0, #0xa2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r1, r5, #0 - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, #0x2c - mov r2, #0 - mov r3, #0x17 - bl sub_0201A7E8 - add r0, r4, #0 - add r0, #0xc2 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - str r1, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - mov r0, #0x26 - add r2, r6, #0 - add r3, r1, #0 - bl sub_02006E3C - add r0, r4, #0 - add r0, #0xc2 - str r0, [r5, #0x60] - mov r0, #0x20 - str r0, [sp] - mov r0, #0x23 - mov r3, #7 - str r0, [sp, #4] - mov r0, #0x26 - mov r1, #0x18 - mov r2, #0 - lsl r3, r3, #6 - bl sub_02006E84 - ldr r0, [r5, #4] - bl ov20_021D2080 - lsl r0, r0, #0x18 - add r2, r4, #0 - lsr r0, r0, #0x18 - add r2, #0xcb - str r0, [sp] - mov r0, #0x23 - lsl r2, r2, #0x10 - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #0 - lsr r2, r2, #0x10 - mov r3, #0xf - bl sub_0200DD0C - add r0, r5, #0 - add r4, #0xcb - add r0, #0x1c - add r1, r4, #0 - mov r2, #0xf - bl sub_0200E010 - add r0, r5, #0 - add r0, #0xc - bl sub_0201A9F4 - add r0, r5, #0 - add r0, #0x1c - bl sub_0201A9F4 - add r0, r5, #0 - bl ov20_021D312C - add r0, r5, #0 - bl ov20_021D3228 - add r0, r5, #0 - mov r1, #0 - bl ov20_021D3578 - add r0, r5, #0 - bl ov20_021D3184 - add r0, r6, #0 - mov r1, #0 - bl sub_02019448 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov20_021D2F50 - - thumb_func_start ov20_021D30A4 -ov20_021D30A4: ; 0x021D30A4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #7 - lsl r0, r0, #6 - add r5, r1, #0 - str r0, [sp] - mov r0, #0x23 - mov r2, #0 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #6 - add r3, r2, #0 - bl sub_02007130 - add r0, r5, #0 - mov r1, #6 - add r2, sp, #8 - mov r3, #0x23 - bl sub_020071EC - add r5, r0, #0 - ldr r0, [sp, #8] - add r1, r4, #0 - mov r2, #5 - ldr r0, [r0, #0xc] - add r1, #0x70 - lsl r2, r2, #6 - bl sub_020C4B18 - add r4, #0x70 - mov r1, #5 - add r0, r4, #0 - lsl r1, r1, #6 - bl sub_020C2C54 - add r0, r5, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D30A4 - - thumb_func_start ov20_021D30F8 -ov20_021D30F8: ; 0x021D30F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov20_021D1F84 - cmp r0, #2 - bne _021D311E - ldr r0, [r4, #4] - bl ov20_021D1F9C - add r0, r0, #1 - add r4, #0x70 - lsl r0, r0, #5 - add r0, r4, r0 - mov r1, #0 - mov r2, #0x20 - bl sub_020C00B4 - pop {r4, pc} -_021D311E: - add r4, #0x70 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020C00B4 - pop {r4, pc} - thumb_func_end ov20_021D30F8 - - thumb_func_start ov20_021D312C -ov20_021D312C: ; 0x021D312C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov20_021D1F84 - cmp r0, #0 - beq _021D3144 - cmp r0, #1 - beq _021D315A - cmp r0, #2 - beq _021D317E - pop {r4, pc} -_021D3144: - add r0, r4, #0 - mov r1, #0x68 - add r0, #0x54 - strh r1, [r0] - add r0, r4, #0 - mov r1, #0x10 - add r0, #0x56 - strh r1, [r0] - mov r0, #1 - str r0, [r4, #0x5c] - pop {r4, pc} -_021D315A: - add r0, r4, #0 - mov r1, #0x30 - add r0, #0x54 - strh r1, [r0] - add r0, r4, #0 - mov r2, #0x10 - add r0, #0x56 - strh r2, [r0] - add r0, r4, #0 - mov r1, #0xa0 - add r0, #0x58 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x5a - strh r2, [r0] - mov r0, #2 - str r0, [r4, #0x5c] - pop {r4, pc} -_021D317E: - mov r0, #0 - str r0, [r4, #0x5c] - pop {r4, pc} - thumb_func_end ov20_021D312C - - thumb_func_start ov20_021D3184 -ov20_021D3184: ; 0x021D3184 - push {r3, r4, r5, lr} - sub sp, #0x30 - add r4, r0, #0 - ldr r0, [r4, #0x5c] - cmp r0, #0 - beq _021D319C - add r0, r4, #0 - add r0, #0x54 - add r1, sp, #8 - bl ov20_021D34E0 - b _021D31A6 -_021D319C: - mov r1, #0x80 - add r0, sp, #8 - strh r1, [r0] - mov r1, #0x18 - strh r1, [r0, #2] -_021D31A6: - mov r2, #0 - ldr r0, [r4, #0] - add r1, sp, #0xc - add r3, r2, #0 - bl ov20_021D2E0C - mov r2, #0 - str r2, [sp] - mov r0, #1 - str r0, [sp, #4] - add r5, sp, #8 - mov r3, #2 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - ldr r0, [r4, #0] - add r1, sp, #0xc - bl ov20_021D2E50 - str r0, [r4, #0x3c] - add r0, r4, #0 - mov r1, #1 - bl ov20_021D375C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0xc - mov r2, #6 - mov r3, #0x18 - bl ov20_021D2E50 - mov r1, #0xd - str r0, [r4, #0x40] - bl sub_02021D6C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0xc - mov r2, #0xfa - mov r3, #0x18 - bl ov20_021D2E50 - str r0, [r4, #0x44] - mov r1, #0xc - bl sub_02021D6C - ldr r0, [r4, #4] - bl ov20_021D1F84 - cmp r0, #2 - beq _021D3222 - ldr r0, [r4, #0x44] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_02021CAC -_021D3222: - add sp, #0x30 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3184 - - thumb_func_start ov20_021D3228 -ov20_021D3228: ; 0x021D3228 - push {r4, lr} - add r4, r0, #0 - bl ov20_021D30F8 - add r0, r4, #0 - add r0, #0xc - mov r1, #0xd - bl sub_0201ADA4 - ldr r0, [r4, #4] - bl ov20_021D1F84 - cmp r0, #0 - beq _021D324E - cmp r0, #1 - beq _021D3274 - cmp r0, #2 - beq _021D32BE - b _021D32C6 -_021D324E: - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xc - add r1, #0x54 - bl ov20_021D34F4 - ldr r0, [r4, #4] - mov r1, #0 - bl ov20_021D1FA8 - add r1, r4, #0 - add r2, r4, #0 - add r3, r0, #0 - add r0, r4, #0 - add r1, #0xc - add r2, #0x54 - bl ov20_021D351C - b _021D32C6 -_021D3274: - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xc - add r1, #0x54 - bl ov20_021D34F4 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xc - add r1, #0x58 - bl ov20_021D34F4 - ldr r0, [r4, #4] - mov r1, #0 - bl ov20_021D1FA8 - add r1, r4, #0 - add r2, r4, #0 - add r3, r0, #0 - add r0, r4, #0 - add r1, #0xc - add r2, #0x54 - bl ov20_021D351C - ldr r0, [r4, #4] - mov r1, #1 - bl ov20_021D1FA8 - add r1, r4, #0 - add r2, r4, #0 - add r3, r0, #0 - add r0, r4, #0 - add r1, #0xc - add r2, #0x58 - bl ov20_021D351C - b _021D32C6 -_021D32BE: - add r0, r4, #0 - bl ov20_021D32D0 - str r0, [r4, #0x5c] -_021D32C6: - add r4, #0xc - add r0, r4, #0 - bl sub_0201ACCC - pop {r4, pc} - thumb_func_end ov20_021D3228 - - thumb_func_start ov20_021D32D0 -ov20_021D32D0: ; 0x021D32D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #0x10] - ldr r0, [r0, #4] - mov r1, #0x23 - bl ov20_021D1FC0 - mov r4, #0 - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x10] - add r0, #0x64 - str r4, [sp, #0x18] - add r5, r4, #0 - bl ov20_021D33C8 - ldr r7, [sp, #0x10] - add r0, r7, #0 - str r0, [sp, #0x24] - add r0, #0xc - str r0, [sp, #0x24] - add r0, r7, #0 - add r6, r7, #0 - str r0, [sp, #0x20] - add r0, #0x64 - add r6, #0x54 - str r0, [sp, #0x20] -_021D330A: - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x1c] - bl ov20_021D3400 - cmp r0, #3 - bhi _021D33A2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D3322: ; jump table - .short _021D332A - _021D3322 - 2 ; case 0 - .short _021D3352 - _021D3322 - 2 ; case 1 - .short _021D3398 - _021D3322 - 2 ; case 2 - .short _021D339E - _021D3322 - 2 ; case 3 -_021D332A: - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D33C0 ; =0x0003040D - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x24] - mov r1, #1 - add r3, r5, #0 - bl sub_0201D78C - ldr r1, [sp, #0x1c] - mov r0, #1 - mov r2, #0 - bl sub_02002D7C - add r5, r5, r0 - b _021D33A2 -_021D3352: - add r1, r5, #0 - add r0, r7, #0 - add r1, #0x32 - add r0, #0x54 - strh r1, [r0] - add r1, r4, #0 - add r0, r7, #0 - add r1, #8 - add r0, #0x56 - strh r1, [r0] - ldr r0, [sp, #0x24] - add r1, r6, #0 - bl ov20_021D34F4 - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x18] - ldr r0, [r0, #4] - bl ov20_021D1FA8 - add r3, r0, #0 - ldr r0, _021D33C4 ; =0x0000FFFF - cmp r3, r0 - beq _021D338A - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x24] - add r2, r6, #0 - bl ov20_021D351C -_021D338A: - ldr r0, [sp, #0x18] - add r7, r7, #4 - add r0, r0, #1 - add r6, r6, #4 - str r0, [sp, #0x18] - add r5, #0x64 - b _021D33A2 -_021D3398: - add r4, #0x10 - mov r5, #0 - b _021D33A2 -_021D339E: - mov r0, #0 - str r0, [sp, #0x14] -_021D33A2: - ldr r0, [sp, #0x14] - cmp r0, #0 - bne _021D330A - ldr r0, [sp, #0x10] - add r0, #0x64 - str r0, [sp, #0x10] - bl ov20_021D33F4 - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x18] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D33C0: .word 0x0003040D -_021D33C4: .word 0x0000FFFF - thumb_func_end ov20_021D32D0 - - thumb_func_start ov20_021D33C8 -ov20_021D33C8: ; 0x021D33C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #4] - mov r1, #0x23 - bl ov20_021D1FC0 - str r0, [r4, #0] - bl sub_02023E2C - str r0, [r4, #4] - ldrh r1, [r0] - ldr r0, _021D33F0 ; =0x0000FFFE - cmp r1, r0 - bne _021D33EA - mov r0, #1 - str r0, [r4, #8] - pop {r4, pc} -_021D33EA: - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_021D33F0: .word 0x0000FFFE - thumb_func_end ov20_021D33C8 - - thumb_func_start ov20_021D33F4 -ov20_021D33F4: ; 0x021D33F4 - ldr r3, _021D33FC ; =sub_020237BC - ldr r0, [r0, #0] - bx r3 - nop -_021D33FC: .word sub_020237BC - thumb_func_end ov20_021D33F4 - - thumb_func_start ov20_021D3400 -ov20_021D3400: ; 0x021D3400 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - str r1, [sp] - mov ip, r0 - ldr r0, [r4, #8] - cmp r0, #3 - bhi _021D3490 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D341C: ; jump table - .short _021D3424 - _021D341C - 2 ; case 0 - .short _021D347A - _021D341C - 2 ; case 1 - .short _021D3486 - _021D341C - 2 ; case 2 - .short _021D3490 - _021D341C - 2 ; case 3 -_021D3424: - cmp r0, #0 - bne _021D3460 - ldr r6, _021D34C8 ; =0x0000FFFE - mov r3, #0xe - mov r0, #1 - mov r1, #3 - mov r2, #2 - add r7, r6, #1 - lsl r3, r3, #0xc -_021D3436: - ldr r5, [r4, #4] - ldrh r5, [r5] - cmp r5, r3 - beq _021D3448 - cmp r5, r6 - beq _021D3450 - cmp r5, r7 - beq _021D344C - b _021D3454 -_021D3448: - str r2, [r4, #8] - b _021D345A -_021D344C: - str r1, [r4, #8] - b _021D345A -_021D3450: - str r0, [r4, #8] - b _021D345A -_021D3454: - ldr r5, [r4, #4] - add r5, r5, #2 - str r5, [r4, #4] -_021D345A: - ldr r5, [r4, #8] - cmp r5, #0 - beq _021D3436 -_021D3460: - ldr r3, [r4, #4] - mov r2, ip - sub r3, r3, r2 - lsr r2, r3, #0x1f - add r2, r3, r2 - asr r2, r2, #1 - ldr r0, [sp] - mov r1, ip - add r2, r2, #1 - bl sub_02023D8C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D347A: - mov r0, ip - bl sub_0201D0C8 - str r0, [r4, #4] - mov r0, #1 - b _021D3494 -_021D3486: - mov r0, ip - add r0, r0, #2 - str r0, [r4, #4] - mov r0, #2 - b _021D3494 -_021D3490: - mov r0, #3 - pop {r3, r4, r5, r6, r7, pc} -_021D3494: - ldr r1, [r4, #4] - ldrh r2, [r1] - mov r1, #0xe - lsl r1, r1, #0xc - cmp r2, r1 - beq _021D34AE - ldr r1, _021D34C8 ; =0x0000FFFE - cmp r2, r1 - beq _021D34BA - add r1, r1, #1 - cmp r2, r1 - beq _021D34B4 - b _021D34C0 -_021D34AE: - mov r1, #2 - str r1, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_021D34B4: - mov r1, #3 - str r1, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_021D34BA: - mov r1, #1 - str r1, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_021D34C0: - mov r1, #0 - str r1, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} - nop -_021D34C8: .word 0x0000FFFE - thumb_func_end ov20_021D3400 - - thumb_func_start ov20_021D34CC -ov20_021D34CC: ; 0x021D34CC - mov r2, #0 - ldrsh r2, [r0, r2] - sub r2, #0x30 - strh r2, [r1] - mov r2, #2 - ldrsh r0, [r0, r2] - sub r0, #8 - strh r0, [r1, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D34CC - - thumb_func_start ov20_021D34E0 -ov20_021D34E0: ; 0x021D34E0 - mov r2, #0 - ldrsh r2, [r0, r2] - add r2, #0x18 - strh r2, [r1] - mov r2, #2 - ldrsh r0, [r0, r2] - add r0, #8 - strh r0, [r1, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov20_021D34E0 - - thumb_func_start ov20_021D34F4 -ov20_021D34F4: ; 0x021D34F4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, r1, #0 - add r1, sp, #8 - bl ov20_021D34CC - mov r0, #0x60 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r3, sp, #8 - ldrh r2, [r3] - ldrh r3, [r3, #2] - add r0, r4, #0 - mov r1, #0xe - bl sub_0201AE78 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov20_021D34F4 - - thumb_func_start ov20_021D351C -ov20_021D351C: ; 0x021D351C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, _021D356C ; =0x0000FFFF - add r6, r3, #0 - add r4, r1, #0 - cmp r6, r0 - beq _021D3566 - add r0, r2, #0 - add r1, sp, #0x10 - bl ov20_021D34CC - ldr r1, [r5, #0x4c] - add r0, r6, #0 - bl sub_02014DB8 - ldr r1, [r5, #0x4c] - mov r0, #1 - mov r2, #0 - bl sub_02002D7C - add r3, sp, #0x10 - mov r0, #2 - ldrsh r0, [r3, r0] - mov r6, #0 - mov r1, #1 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3570 ; =0x0005060E - str r0, [sp, #8] - str r6, [sp, #0xc] - ldrsh r3, [r3, r6] - ldr r2, [r5, #0x4c] - add r0, r4, #0 - bl sub_0201D78C -_021D3566: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_021D356C: .word 0x0000FFFF -_021D3570: .word 0x0005060E - thumb_func_end ov20_021D351C - - thumb_func_start ov20_021D3574 -ov20_021D3574: ; 0x021D3574 - ldr r0, [r0, #0x5c] - bx lr - thumb_func_end ov20_021D3574 - - thumb_func_start ov20_021D3578 -ov20_021D3578: ; 0x021D3578 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - add r5, r1, #0 - add r0, #0x1c - mov r1, #9 - bl sub_0201ADA4 - cmp r5, #3 - bhi _021D3674 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D3598: ; jump table - .short _021D35A0 - _021D3598 - 2 ; case 0 - .short _021D362A - _021D3598 - 2 ; case 1 - .short _021D3604 - _021D3598 - 2 ; case 2 - .short _021D3650 - _021D3598 - 2 ; case 3 -_021D35A0: - mov r0, #2 - mov r1, #0x3c - mov r2, #0 - bl sub_0200B368 - add r5, r0, #0 - mov r0, #0x4b - lsl r0, r0, #2 - mov r1, #0 - bl sub_02023790 - mov r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r2, r1, #0 - bl sub_0200B7B4 - ldr r0, [r4, #4] - bl ov20_021D1F88 - add r1, r0, #0 - ldr r0, [r4, #0x48] - ldr r2, [r4, #0x4c] - bl sub_0200B1B8 - ldr r2, [r4, #0x4c] - add r0, r5, #0 - add r1, r6, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3680 ; =0x00010209 - mov r1, #1 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x1c - add r2, r6, #0 - str r3, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_0200B3F0 - b _021D3674 -_021D3604: - ldr r0, [r4, #0x48] - ldr r2, [r4, #0x4c] - mov r1, #6 - bl sub_0200B1B8 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3680 ; =0x00010209 - mov r1, #1 - str r0, [sp, #8] - str r3, [sp, #0xc] - add r0, r4, #0 - ldr r2, [r4, #0x4c] - add r0, #0x1c - bl sub_0201D78C - b _021D3674 -_021D362A: - ldr r0, [r4, #0x48] - ldr r2, [r4, #0x4c] - mov r1, #7 - bl sub_0200B1B8 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3680 ; =0x00010209 - mov r1, #1 - str r0, [sp, #8] - str r3, [sp, #0xc] - add r0, r4, #0 - ldr r2, [r4, #0x4c] - add r0, #0x1c - bl sub_0201D78C - b _021D3674 -_021D3650: - ldr r0, [r4, #0x48] - ldr r2, [r4, #0x4c] - mov r1, #8 - bl sub_0200B1B8 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3680 ; =0x00010209 - mov r1, #1 - str r0, [sp, #8] - str r3, [sp, #0xc] - add r0, r4, #0 - ldr r2, [r4, #0x4c] - add r0, #0x1c - bl sub_0201D78C -_021D3674: - add r4, #0x1c - add r0, r4, #0 - bl sub_0201ACCC - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D3680: .word 0x00010209 - thumb_func_end ov20_021D3578 - - thumb_func_start ov20_021D3684 -ov20_021D3684: ; 0x021D3684 - ldr r3, _021D368C ; =ov20_021D375C - mov r1, #0 - bx r3 - nop -_021D368C: .word ov20_021D375C - thumb_func_end ov20_021D3684 - - thumb_func_start ov20_021D3690 -ov20_021D3690: ; 0x021D3690 - ldr r3, _021D3698 ; =ov20_021D375C - mov r1, #1 - bx r3 - nop -_021D3698: .word ov20_021D375C - thumb_func_end ov20_021D3690 - - thumb_func_start ov20_021D369C -ov20_021D369C: ; 0x021D369C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_02021CAC - add r0, r4, #0 - mov r1, #1 - bl ov20_021D375C - pop {r4, pc} - thumb_func_end ov20_021D369C - - thumb_func_start ov20_021D36B0 -ov20_021D36B0: ; 0x021D36B0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov20_021D1F84 - cmp r0, #2 - bne _021D36CE - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x44] - mov r1, #0 - bl sub_02021CAC -_021D36CE: - pop {r4, pc} - thumb_func_end ov20_021D36B0 - - thumb_func_start ov20_021D36D0 -ov20_021D36D0: ; 0x021D36D0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov20_021D1F84 - cmp r0, #2 - bne _021D36FE - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0x44] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0x40] - mov r1, #0xd - bl sub_02021D6C - ldr r0, [r4, #0x44] - mov r1, #0xc - bl sub_02021D6C -_021D36FE: - pop {r4, pc} - thumb_func_end ov20_021D36D0 - - thumb_func_start ov20_021D3700 -ov20_021D3700: ; 0x021D3700 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #0x5c] - cmp r0, #0 - beq _021D3730 - add r2, r4, #0 - lsl r0, r1, #2 - add r2, #0x54 - add r0, r2, r0 - add r1, sp, #0 - bl ov20_021D34E0 - add r1, sp, #0 - mov r2, #0 - ldrsh r0, [r1, r2] - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #2 - ldrsh r0, [r1, r0] - lsl r0, r0, #0xc - str r0, [sp, #8] - str r2, [sp, #0xc] - b _021D3748 -_021D3730: - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #4] - mov r0, #6 - lsl r0, r0, #0xe - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [r4, #0x3c] - add r1, sp, #4 - bl sub_02021C50 -_021D3748: - ldr r0, [r4, #0x3c] - add r1, sp, #4 - bl sub_02021C50 - add r0, r4, #0 - mov r1, #1 - bl ov20_021D375C - add sp, #0x10 - pop {r4, pc} - thumb_func_end ov20_021D3700 - - thumb_func_start ov20_021D375C -ov20_021D375C: ; 0x021D375C - push {r3, lr} - ldr r2, [r0, #0x5c] - cmp r2, #0 - beq _021D377A - cmp r1, #0 - ldr r0, [r0, #0x3c] - beq _021D3772 - mov r1, #0 - bl sub_02021D6C - pop {r3, pc} -_021D3772: - mov r1, #1 - bl sub_02021D6C - pop {r3, pc} -_021D377A: - cmp r1, #0 - ldr r0, [r0, #0x3c] - beq _021D3788 - mov r1, #0xe - bl sub_02021D6C - pop {r3, pc} -_021D3788: - mov r1, #0xf - bl sub_02021D6C - pop {r3, pc} - thumb_func_end ov20_021D375C - - thumb_func_start ov20_021D3790 -ov20_021D3790: ; 0x021D3790 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x2c - mov r1, #9 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - ldr r2, [r5, #0x4c] - mov r1, #9 - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3818 ; =0x00010209 - mov r3, #0xe - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - ldr r2, [r5, #0x4c] - add r0, #0x2c - bl sub_0201D78C - ldr r0, [r5, #0x48] - ldr r2, [r5, #0x4c] - mov r1, #0xa - bl sub_0200B1B8 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3818 ; =0x00010209 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - ldr r2, [r5, #0x4c] - add r0, #0x2c - mov r3, #0xe - bl sub_0201D78C - ldr r2, [r5, #0x60] - add r0, r5, #0 - lsl r2, r2, #0x10 - add r0, #0x2c - mov r1, #0 - lsr r2, r2, #0x10 - mov r3, #0xe - bl sub_0200DC48 - add r1, r5, #0 - ldr r0, [r5, #0x50] - add r1, #0x2c - mov r2, #0 - lsl r3, r4, #4 - bl sub_02014A58 - add r5, #0x2c - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_021D3818: .word 0x00010209 - thumb_func_end ov20_021D3790 - - thumb_func_start ov20_021D381C -ov20_021D381C: ; 0x021D381C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0xe - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0 - add r4, r1, #0 - add r0, #0x2c - mov r1, #9 - add r3, r2, #0 - bl sub_0201AE78 - ldr r0, [r5, #0x50] - add r5, #0x2c - add r1, r5, #0 - mov r2, #0 - lsl r3, r4, #4 - bl sub_02014A58 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D381C - - thumb_func_start ov20_021D384C -ov20_021D384C: ; 0x021D384C - push {r4, lr} - add r4, r0, #0 - add r0, #0x2c - mov r1, #0 - bl sub_0200DC9C - add r4, #0x2c - add r0, r4, #0 - bl sub_0201ACF4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D384C - - thumb_func_start ov20_021D3864 -ov20_021D3864: ; 0x021D3864 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x23 - mov r1, #0x10 - add r6, r2, #0 - bl sub_02018144 - str r5, [r0, #0] - str r4, [r0, #4] - str r6, [r0, #8] - mov r1, #0 - str r1, [r0, #0xc] - pop {r4, r5, r6, pc} - thumb_func_end ov20_021D3864 - - thumb_func_start ov20_021D3880 -ov20_021D3880: ; 0x021D3880 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D388E - bl sub_02021BD4 -_021D388E: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3880 - - thumb_func_start ov20_021D3898 -ov20_021D3898: ; 0x021D3898 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - bl ov20_021D2E04 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #4 - add r2, r4, #0 - mov r3, #3 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #5 - add r2, r4, #0 - mov r3, #3 - bl sub_020070E8 - ldr r1, _021D3904 ; =0x021D52D4 - add r0, r4, #0 - mov r2, #0 - bl ov20_021D390C - ldr r1, _021D3908 ; =0x021D52DC - add r0, r4, #0 - mov r2, #1 - bl ov20_021D390C - add r0, r5, #0 - bl ov20_021D3980 - add r0, r4, #0 - mov r1, #3 - bl sub_02019448 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D3904: .word 0x021D52D4 -_021D3908: .word 0x021D52DC - thumb_func_end ov20_021D3898 - - thumb_func_start ov20_021D390C -ov20_021D390C: ; 0x021D390C - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r1, #0 - add r4, r2, #0 - add r1, sp, #0x10 - add r2, r5, #0 - bl sub_0201A8D4 - add r0, sp, #0x10 - bl sub_0201A9F4 - add r0, sp, #0x10 - mov r1, #0xe - bl sub_0201ADA4 - ldr r1, _021D3978 ; =0x000001B6 - mov r0, #0x1a - add r2, r4, #0 - mov r3, #0x23 - bl sub_0200B010 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - ldrb r1, [r5, #3] - add r2, r4, #0 - lsl r1, r1, #3 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D397C ; =0x0001020E - str r0, [sp, #8] - add r0, sp, #0x10 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, sp, #0x10 - bl sub_0201ACCC - add r0, r4, #0 - bl sub_020237BC - add r0, sp, #0x10 - bl sub_0201A8FC - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_021D3978: .word 0x000001B6 -_021D397C: .word 0x0001020E - thumb_func_end ov20_021D390C - - thumb_func_start ov20_021D3980 -ov20_021D3980: ; 0x021D3980 - push {r3, r4, lr} - sub sp, #0x2c - add r4, r0, #0 - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0 - mov r3, #3 - bl ov20_021D2E0C - mov r0, #5 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0x40 - mov r3, #0x38 - bl ov20_021D2E50 - str r0, [r4, #0xc] - mov r1, #2 - bl sub_02021D6C - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02021CAC - add sp, #0x2c - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3980 - - thumb_func_start ov20_021D39BC -ov20_021D39BC: ; 0x021D39BC - ldr r3, _021D39C4 ; =sub_02021D6C - ldr r0, [r0, #0xc] - mov r1, #3 - bx r3 - ; .align 2, 0 -_021D39C4: .word sub_02021D6C - thumb_func_end ov20_021D39BC - - thumb_func_start ov20_021D39C8 -ov20_021D39C8: ; 0x021D39C8 - ldr r3, _021D39D0 ; =sub_02021D6C - ldr r0, [r0, #0xc] - mov r1, #2 - bx r3 - ; .align 2, 0 -_021D39D0: .word sub_02021D6C - thumb_func_end ov20_021D39C8 - - thumb_func_start ov20_021D39D4 -ov20_021D39D4: ; 0x021D39D4 - ldr r3, _021D39DC ; =sub_02021CAC - ldr r0, [r0, #0xc] - bx r3 - nop -_021D39DC: .word sub_02021CAC - thumb_func_end ov20_021D39D4 - - thumb_func_start ov20_021D39E0 -ov20_021D39E0: ; 0x021D39E0 - ldr r3, _021D39E8 ; =sub_02021D34 - ldr r0, [r0, #0xc] - bx r3 - nop -_021D39E8: .word sub_02021D34 - thumb_func_end ov20_021D39E0 - - thumb_func_start ov20_021D39EC -ov20_021D39EC: ; 0x021D39EC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0 - str r0, [sp, #8] - cmp r1, #0 - beq _021D39FE - cmp r1, #1 - beq _021D3A0C -_021D39FE: - mov r0, #1 - lsl r0, r0, #0x12 - str r0, [sp] - mov r0, #0xe - lsl r0, r0, #0xe - str r0, [sp, #4] - b _021D3A18 -_021D3A0C: - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [sp] - mov r0, #0xe - lsl r0, r0, #0xe - str r0, [sp, #4] -_021D3A18: - ldr r0, [r4, #0xc] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0xc] - mov r1, #2 - bl sub_02021D6C - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov20_021D39EC - - thumb_func_start ov20_021D3A2C -ov20_021D3A2C: ; 0x021D3A2C - push {r3, lr} - ldr r0, [r0, #0] - bl ov20_021D2E04 - mov r1, #3 - add r2, r1, #0 - mov r3, #0x40 - bl sub_02019184 - pop {r3, pc} - thumb_func_end ov20_021D3A2C - - thumb_func_start ov20_021D3A40 -ov20_021D3A40: ; 0x021D3A40 - push {r3, lr} - ldr r0, [r0, #0] - bl ov20_021D2E04 - mov r1, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - pop {r3, pc} - thumb_func_end ov20_021D3A40 - - thumb_func_start ov20_021D3A54 -ov20_021D3A54: ; 0x021D3A54 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x23 - mov r1, #0x60 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - add r0, r5, #0 - bl ov20_021D2E04 - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x10] - str r0, [r4, #0x18] - str r0, [r4, #0x5c] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov20_021D3A54 - - thumb_func_start ov20_021D3A80 -ov20_021D3A80: ; 0x021D3A80 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x5c] - cmp r0, #0 - beq _021D3A8E - bl sub_02021BD4 -_021D3A8E: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3A80 - - thumb_func_start ov20_021D3A98 -ov20_021D3A98: ; 0x021D3A98 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - bl ov20_021D2E04 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #2 - add r2, r4, #0 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #3 - add r2, r4, #0 - bl sub_020070E8 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - lsr r2, r2, #5 - bl ov20_021D3B74 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D3C78 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D3D44 - mov r2, #0 - add r0, r4, #0 - mov r1, #1 - sub r3, r2, #4 - bl sub_02019184 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - mov r3, #2 - bl sub_02019184 - add r0, r5, #0 - bl ov20_021D3E0C - mov r1, #2 - add r2, r1, #0 - ldr r0, _021D3B68 ; =0x04000050 - sub r2, #0xc - bl sub_020BF578 - ldr r0, _021D3B6C ; =0x04000048 - mov r2, #0x3f - ldrh r3, [r0] - mov r1, #0x1f - bic r3, r2 - orr r1, r3 - mov r3, #0x20 - orr r1, r3 - strh r1, [r0] - ldrh r5, [r0, #2] - mov r1, #0x1d - bic r5, r2 - orr r1, r5 - orr r1, r3 - strh r1, [r0, #2] - add r1, r0, #0 - mov r2, #0xff - sub r1, #8 - strh r2, [r1] - mov r1, #0xa0 - sub r0, r0, #4 - strh r1, [r0] - lsl r2, r3, #0x15 - ldr r1, [r2, #0] - ldr r0, _021D3B70 ; =0xFFFF1FFF - and r1, r0 - lsl r0, r3, #8 - orr r0, r1 - str r0, [r2, #0] - add r0, r4, #0 - mov r1, #1 - bl sub_02019448 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D3B68: .word 0x04000050 -_021D3B6C: .word 0x04000048 -_021D3B70: .word 0xFFFF1FFF - thumb_func_end ov20_021D3A98 - - thumb_func_start ov20_021D3B74 -ov20_021D3B74: ; 0x021D3B74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r6, r2, #0 - mov r2, #0x6d - str r0, [sp, #0x14] - str r1, [sp, #0x18] - mov r0, #1 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x23 - bl sub_0200B144 - str r0, [sp, #0x20] - mov r0, #9 - mov r7, #1 - str r0, [sp, #0x24] - mov r4, #0 -_021D3B96: - cmp r4, #0 - beq _021D3BAE - add r0, r4, #0 - mov r1, #3 - bl sub_020E1F6C - cmp r1, #0 - bne _021D3BAE - ldr r0, [sp, #0x24] - mov r7, #1 - add r0, r0, #3 - str r0, [sp, #0x24] -_021D3BAE: - ldr r0, [sp, #0x14] - add r1, r4, #0 - ldr r0, [r0, #8] - bl sub_02099CA0 - cmp r0, #0 - beq _021D3BCC - ldr r0, [sp, #0x20] - add r1, r4, #0 - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, _021D3C6C ; =0x0001020F - str r0, [sp, #0x1c] - b _021D3BDA -_021D3BCC: - ldr r0, [sp, #0x20] - mov r1, #0xc - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, _021D3C70 ; =0x0003040F - str r0, [sp, #0x1c] -_021D3BDA: - ldr r0, _021D3C74 ; =0x000003EE - cmp r6, r0 - blo _021D3BE4 - bl sub_02022974 -_021D3BE4: - ldr r0, [sp, #0x24] - lsl r3, r7, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - add r1, sp, #0x28 - mov r2, #1 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, sp, #0x28 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x48 - sub r0, r1, r0 - lsr r3, r0, #1 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, sp, #0x28 - add r2, r5, #0 - bl sub_0201D78C - add r0, sp, #0x28 - bl sub_0201A9F4 - add r0, sp, #0x28 - bl sub_0201ACCC - add r0, r5, #0 - bl sub_020237BC - add r0, sp, #0x28 - bl sub_0201A8FC - add r4, r4, #1 - add r6, #0x12 - add r7, #0xa - cmp r4, #0xc - blt _021D3B96 - ldr r0, [sp, #0x20] - bl sub_0200B190 - add r0, r6, #0 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3C6C: .word 0x0001020F -_021D3C70: .word 0x0003040F -_021D3C74: .word 0x000003EE - thumb_func_end ov20_021D3B74 - - thumb_func_start ov20_021D3C78 -ov20_021D3C78: ; 0x021D3C78 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r4, r1, #0 - mov r1, #0xce - add r6, r0, #0 - lsl r1, r1, #2 - add r0, r2, #0 - str r2, [sp, #0x14] - cmp r0, r1 - blo _021D3C90 - bl sub_02022974 -_021D3C90: - mov r0, #0xa - str r0, [sp] - mov r0, #0x19 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - add r1, sp, #0x20 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r2, #1 - mov r3, #0x22 - bl sub_0201A7E8 - mov r0, #4 - mov r1, #0x23 - bl sub_02023790 - add r4, r0, #0 - add r0, sp, #0x20 - mov r1, #0xf - bl sub_0201ADA4 - bl ov20_021D5044 - add r7, r0, #0 - ldr r5, _021D3D38 ; =0x00000000 - beq _021D3D16 -_021D3CD0: - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D5048 - add r0, r5, #0 - add r1, sp, #0x1c - add r2, sp, #0x18 - bl ov20_021D506C - ldr r0, [r6, #8] - add r1, r5, #0 - bl sub_02099CDC - cmp r0, #0 - beq _021D3CF2 - ldr r1, _021D3D3C ; =0x0001020F - b _021D3CF4 -_021D3CF2: - ldr r1, _021D3D40 ; =0x0003040F -_021D3CF4: - ldr r0, [sp, #0x18] - add r2, r4, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r3, [sp, #0x1c] - add r0, sp, #0x20 - mov r1, #0 - add r3, r3, #3 - bl sub_0201D78C - add r5, r5, #1 - cmp r5, r7 - blo _021D3CD0 -_021D3D16: - add r0, sp, #0x20 - bl sub_0201ACCC - add r0, sp, #0x20 - bl sub_0201A9F4 - add r0, r4, #0 - bl sub_020237BC - add r0, sp, #0x20 - bl sub_0201A8FC - ldr r0, [sp, #0x14] - add r0, #0xc8 - str r0, [sp, #0x14] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3D38: .word 0x00000000 -_021D3D3C: .word 0x0001020F -_021D3D40: .word 0x0003040F - thumb_func_end ov20_021D3C78 - - thumb_func_start ov20_021D3D44 -ov20_021D3D44: ; 0x021D3D44 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r2, #0 - mov r2, #0x6d - str r1, [sp, #0x14] - mov r0, #1 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x23 - bl sub_0200B144 - mov r1, #0xd - str r0, [sp, #0x20] - bl sub_0200B1EC - str r0, [sp, #0x1c] - mov r0, #0 - ldr r1, [sp, #0x1c] - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x40 - sub r0, r1, r0 - lsr r0, r0, #1 - ldr r4, _021D3E04 ; =0x021D52E4 - str r0, [sp, #0x18] - mov r7, #0 - add r6, sp, #0x24 -_021D3D7C: - mov r0, #0x3f - lsl r0, r0, #4 - cmp r5, r0 - blo _021D3D88 - bl sub_02022974 -_021D3D88: - ldrh r0, [r4, #2] - add r1, r6, #0 - mov r2, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [sp, #0x14] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r6, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D3E08 ; =0x0001020F - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r3, [sp, #0x18] - add r0, r6, #0 - mov r1, #0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_0201A9F4 - add r0, r6, #0 - bl sub_0201ACCC - add r0, r6, #0 - bl sub_0201A8FC - add r7, r7, #1 - add r5, #0x10 - add r4, r4, #4 - cmp r7, #2 - blo _021D3D7C - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_0200B190 - add r0, r5, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3E04: .word 0x021D52E4 -_021D3E08: .word 0x0001020F - thumb_func_end ov20_021D3D44 - - thumb_func_start ov20_021D3E0C -ov20_021D3E0C: ; 0x021D3E0C - push {r3, r4, lr} - sub sp, #0x2c - add r4, r0, #0 - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0 - mov r3, #1 - bl ov20_021D2E0C - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0x30 - mov r3, #0x36 - bl ov20_021D2E50 - str r0, [r4, #0x5c] - mov r1, #4 - bl sub_02021D6C - ldr r0, [r4, #0x5c] - mov r1, #0 - bl sub_02021CAC - add sp, #0x2c - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3E0C - - thumb_func_start ov20_021D3E48 -ov20_021D3E48: ; 0x021D3E48 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x5c] - add r4, r1, #0 - bl sub_02021CAC - cmp r4, #0 - beq _021D3E72 - ldr r0, [r5, #4] - bl ov20_021D1F94 - cmp r0, #0 - ldr r0, [r5, #0x5c] - bne _021D3E6C - mov r1, #4 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D3E6C: - mov r1, #6 - bl sub_02021D6C -_021D3E72: - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D3E48 - - thumb_func_start ov20_021D3E74 -ov20_021D3E74: ; 0x021D3E74 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #4] - add r5, r1, #0 - bl ov20_021D1F94 - mov r1, #0 - str r1, [sp, #0x10] - cmp r5, #0xfe - bne _021D3E96 - mov r0, #0x84 - str r0, [sp, #8] - mov r0, #0x96 - str r0, [sp, #0xc] - mov r5, #0x10 - b _021D3ED6 -_021D3E96: - cmp r0, #0 - bne _021D3EBE - add r0, r5, #0 - mov r1, #3 - bl sub_020E2178 - mov r0, #0x50 - mul r0, r1 - add r0, #0x30 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #3 - bl sub_020E2178 - mov r1, #0x18 - mul r1, r0 - add r1, #0x36 - str r1, [sp, #0xc] - mov r5, #4 - b _021D3ED6 -_021D3EBE: - add r0, r5, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov20_021D506C - ldr r0, [sp, #4] - mov r5, #6 - add r0, #0x1a - str r0, [sp, #8] - ldr r0, [sp] - add r0, #0x3e - str r0, [sp, #0xc] -_021D3ED6: - ldr r0, [sp, #8] - add r1, sp, #8 - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [sp, #0xc] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, [r4, #0x5c] - bl sub_02021C50 - ldr r0, [r4, #0x5c] - add r1, r5, #0 - bl sub_02021D6C - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3E74 - - thumb_func_start ov20_021D3EF8 -ov20_021D3EF8: ; 0x021D3EF8 - push {r3, lr} - mov r3, #0 - str r3, [r0, #0x14] - mov r1, #0x10 - str r1, [sp] - mov r1, #2 - add r2, r1, #0 - add r0, #0x1c - sub r2, #0xc - bl ov20_021D4FB0 - pop {r3, pc} - thumb_func_end ov20_021D3EF8 - - thumb_func_start ov20_021D3F10 -ov20_021D3F10: ; 0x021D3F10 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D3F22 - cmp r0, #1 - beq _021D3F4C - b _021D3F58 -_021D3F22: - add r0, r4, #0 - add r0, #0x1c - bl ov20_021D4FF0 - cmp r0, #0 - beq _021D3F58 - mov r0, #0x18 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #1 - ldr r1, [r4, #0xc] - add r0, #0x3c - add r3, r2, #0 - bl ov20_021D4E38 - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - b _021D3F58 -_021D3F4C: - add r4, #0x3c - add r0, r4, #0 - bl ov20_021D4E8C - add sp, #8 - pop {r4, pc} -_021D3F58: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3F10 - - thumb_func_start ov20_021D3F60 -ov20_021D3F60: ; 0x021D3F60 - push {r3, lr} - sub sp, #8 - add r1, r0, #0 - mov r0, #0 - str r0, [r1, #0x14] - sub r0, #0x18 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - add r0, r1, #0 - mov r2, #1 - ldr r1, [r1, #0xc] - add r0, #0x3c - add r3, r2, #0 - bl ov20_021D4E38 - add sp, #8 - pop {r3, pc} - thumb_func_end ov20_021D3F60 - - thumb_func_start ov20_021D3F84 -ov20_021D3F84: ; 0x021D3F84 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D3F96 - cmp r0, #1 - beq _021D3FBE - b _021D3FCA -_021D3F96: - add r0, r4, #0 - add r0, #0x3c - bl ov20_021D4E8C - cmp r0, #0 - beq _021D3FCA - mov r0, #0x10 - mov r2, #0 - str r0, [sp] - add r0, r4, #0 - add r3, r2, #0 - add r0, #0x1c - mov r1, #2 - sub r3, #0xa - bl ov20_021D4FB0 - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - b _021D3FCA -_021D3FBE: - add r4, #0x1c - add r0, r4, #0 - bl ov20_021D4FF0 - add sp, #4 - pop {r3, r4, pc} -_021D3FCA: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov20_021D3F84 - - thumb_func_start ov20_021D3FD0 -ov20_021D3FD0: ; 0x021D3FD0 - push {r3, lr} - ldr r0, [r0, #0xc] - mov r1, #1 - mov r2, #3 - mov r3, #2 - bl sub_02019184 - pop {r3, pc} - thumb_func_end ov20_021D3FD0 - - thumb_func_start ov20_021D3FE0 -ov20_021D3FE0: ; 0x021D3FE0 - push {r3, lr} - mov r2, #0 - mov r1, #0x10 - add r3, r2, #0 - str r1, [sp] - add r0, #0x1c - mov r1, #2 - sub r3, #0xa - bl ov20_021D4FB0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov20_021D3FE0 - - thumb_func_start ov20_021D3FF8 -ov20_021D3FF8: ; 0x021D3FF8 - ldr r3, _021D4000 ; =ov20_021D4FF0 - add r0, #0x1c - bx r3 - nop -_021D4000: .word ov20_021D4FF0 - thumb_func_end ov20_021D3FF8 - - thumb_func_start ov20_021D4004 -ov20_021D4004: ; 0x021D4004 - push {r3, lr} - sub sp, #8 - mov r1, #0 - str r1, [sp] - mov r1, #0xc - str r1, [sp, #4] - add r0, #0x1c - mov r1, #2 - mov r2, #0x3f - mov r3, #0x7c - bl ov20_021D4F1C - add sp, #8 - pop {r3, pc} - thumb_func_end ov20_021D4004 - - thumb_func_start ov20_021D4020 -ov20_021D4020: ; 0x021D4020 - push {r3, lr} - add r0, #0x1c - bl ov20_021D4F4C - cmp r0, #0 - beq _021D4038 - mov r0, #1 - mov r1, #0 - bl sub_02019120 - mov r0, #1 - pop {r3, pc} -_021D4038: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov20_021D4020 - - thumb_func_start ov20_021D403C -ov20_021D403C: ; 0x021D403C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D4074 ; =0x04000050 - mov r1, #2 - mov r2, #0x3f - mov r3, #0 - bl sub_020BF55C - mov r0, #1 - add r1, r0, #0 - bl sub_02019120 - mov r0, #0x7c - str r0, [sp] - mov r0, #0xc - add r4, #0x1c - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #2 - mov r2, #0x3f - mov r3, #0 - bl ov20_021D4F1C - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_021D4074: .word 0x04000050 - thumb_func_end ov20_021D403C - - thumb_func_start ov20_021D4078 -ov20_021D4078: ; 0x021D4078 - ldr r3, _021D4080 ; =ov20_021D4F4C - add r0, #0x1c - bx r3 - nop -_021D4080: .word ov20_021D4F4C - thumb_func_end ov20_021D4078 - - thumb_func_start ov20_021D4084 -ov20_021D4084: ; 0x021D4084 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov20_021D1F94 - cmp r0, #0 - bne _021D4098 - mov r3, #3 - mvn r3, r3 - b _021D409A -_021D4098: - mov r3, #0xfc -_021D409A: - ldr r0, [r4, #0xc] - mov r1, #1 - mov r2, #0 - bl sub_02019184 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4084 - - thumb_func_start ov20_021D40A8 -ov20_021D40A8: ; 0x021D40A8 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov20_021D1F94 - cmp r0, #0 - bne _021D40BE - mov r0, #0xff - mvn r0, r0 - b _021D40C2 -_021D40BE: - mov r0, #1 - lsl r0, r0, #8 -_021D40C2: - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x3c - mov r2, #1 - mov r3, #0 - bl ov20_021D4E38 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D40A8 - - thumb_func_start ov20_021D40DC -ov20_021D40DC: ; 0x021D40DC - ldr r3, _021D40E4 ; =ov20_021D4E8C - add r0, #0x3c - bx r3 - nop -_021D40E4: .word ov20_021D4E8C - thumb_func_end ov20_021D40DC - - thumb_func_start ov20_021D40E8 -ov20_021D40E8: ; 0x021D40E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x23 - mov r1, #0x94 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - add r0, r5, #0 - bl ov20_021D2E04 - str r0, [r4, #0xc] - mov r0, #0x20 - mov r1, #0x23 - bl sub_02023790 - str r0, [r4, #0x3c] - mov r0, #0 - str r0, [sp] - mov r0, #0x1a - str r0, [sp, #4] - mov r0, #0x20 - str r0, [sp, #8] - mov r0, #0xc - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x10 - mov r2, #2 - mov r3, #4 - bl sub_0201A7E8 - mov r3, #0 - str r3, [sp] - mov r1, #0xc - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x20 - mov r2, #2 - bl sub_0201A7E8 - mov r0, #0 - str r0, [r4, #0x30] - str r0, [r4, #0x34] - str r0, [r4, #0x38] - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov20_021D40E8 - - thumb_func_start ov20_021D4164 -ov20_021D4164: ; 0x021D4164 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _021D4172 - bl sub_02021BD4 -_021D4172: - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _021D417C - bl sub_02021BD4 -_021D417C: - ldr r0, [r4, #0x38] - cmp r0, #0 - beq _021D4186 - bl sub_02021BD4 -_021D4186: - ldr r0, [r4, #0x3c] - cmp r0, #0 - beq _021D4190 - bl sub_020237BC -_021D4190: - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A8FC - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov20_021D4164 - - thumb_func_start ov20_021D41A8 -ov20_021D41A8: ; 0x021D41A8 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov20_021D2E04 - add r4, r0, #0 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x23 - bl sub_02019690 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xc - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #2 - add r3, r2, #0 - bl sub_02019CB8 - add r0, r5, #0 - add r0, #0x10 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x10 - bl sub_0201A9F4 - add r0, r5, #0 - add r0, #0x10 - bl sub_0201ACCC - add r0, r4, #0 - mov r1, #2 - bl sub_02019448 - add r0, r5, #0 - bl ov20_021D4210 - mov r0, #2 - mov r1, #0 - bl sub_02019120 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D41A8 - - thumb_func_start ov20_021D4210 -ov20_021D4210: ; 0x021D4210 - push {r3, r4, lr} - sub sp, #0x2c - add r4, r0, #0 - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0 - mov r3, #2 - bl ov20_021D2E0C - mov r0, #3 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0x48 - mov r3, #0x38 - bl ov20_021D2E50 - str r0, [r4, #0x30] - mov r1, #8 - bl sub_02021D6C - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_02021CAC - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0xf0 - mov r3, #0x40 - bl ov20_021D2E50 - str r0, [r4, #0x34] - mov r1, #0xb - bl sub_02021D6C - ldr r0, [r4, #0x34] - mov r1, #0 - bl sub_02021CAC - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #8 - mov r2, #0xf0 - mov r3, #0x90 - bl ov20_021D2E50 - str r0, [r4, #0x38] - mov r1, #0xa - bl sub_02021D6C - ldr r0, [r4, #0x38] - mov r1, #0 - bl sub_02021CAC - add sp, #0x2c - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4210 - - thumb_func_start ov20_021D4294 -ov20_021D4294: ; 0x021D4294 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r0, #0x10 - mov r1, #0 - bl sub_0201ADA4 - add r0, r6, #0 - bl ov20_021D4638 - ldr r0, [r6, #4] - bl ov20_021D1FE4 - add r7, r0, #0 - cmp r7, #0xa - bls _021D42B4 - mov r7, #0xa -_021D42B4: - add r0, r6, #0 - add r0, #0x8c - mov r5, #0 - ldr r4, [r0, #0] - cmp r7, #0 - bls _021D42D8 -_021D42C0: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov20_021D4658 - mov r0, #1 - tst r0, r5 - beq _021D42D2 - add r4, #0x18 -_021D42D2: - add r5, r5, #1 - cmp r5, r7 - blo _021D42C0 -_021D42D8: - add r6, #0x10 - add r0, r6, #0 - bl sub_0201ACCC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4294 - - thumb_func_start ov20_021D42E4 -ov20_021D42E4: ; 0x021D42E4 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D437C ; =0x04000050 - mov r1, #4 - mov r2, #0x3f - mov r3, #0 - bl sub_020BF55C - mov r0, #2 - mov r1, #1 - bl sub_02019120 - ldr r1, _021D4380 ; =0x04000048 - ldr r0, _021D4384 ; =0xFFFFC0FF - ldrh r2, [r1] - mov r5, #0xff - and r2, r0 - mov r0, #0x1f - lsl r0, r0, #8 - orr r2, r0 - lsr r0, r1, #0xd - orr r0, r2 - strh r0, [r1] - add r0, r4, #0 - ldrb r2, [r1, #2] - add r0, #0x84 - strb r2, [r0] - add r0, r1, #0 - sub r0, #0x48 - mov r2, #0xe - ldr r3, [r0, #0] - lsl r2, r2, #0xc - and r2, r3 - lsr r3, r2, #0xd - add r2, r4, #0 - add r2, #0x88 - str r3, [r2, #0] - ldrh r3, [r1, #2] - mov r2, #0x3f - bic r3, r2 - mov r2, #0x1b - orr r3, r2 - mov r2, #0x20 - orr r3, r2 - strh r3, [r1, #2] - sub r3, r1, #6 - strh r5, [r3] - ldr r3, _021D4388 ; =0x00002EB0 - sub r1, r1, #2 - strh r3, [r1] - ldr r3, [r0, #0] - ldr r1, _021D438C ; =0xFFFF1FFF - and r3, r1 - lsl r1, r2, #9 - orr r1, r3 - str r1, [r0, #0] - add r0, r4, #0 - mov r3, #0 - add r0, #0x80 - str r3, [r0, #0] - mov r0, #0x7c - str r0, [sp] - mov r0, #0xc - add r4, #0x40 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #4 - mov r2, #0x3f - bl ov20_021D4F1C - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021D437C: .word 0x04000050 -_021D4380: .word 0x04000048 -_021D4384: .word 0xFFFFC0FF -_021D4388: .word 0x00002EB0 -_021D438C: .word 0xFFFF1FFF - thumb_func_end ov20_021D42E4 - - thumb_func_start ov20_021D4390 -ov20_021D4390: ; 0x021D4390 - push {r3, lr} - add r1, r0, #0 - add r1, #0x80 - ldr r1, [r1, #0] - cmp r1, #0 - bne _021D43AE - add r0, #0x40 - bl ov20_021D4F4C - cmp r0, #0 - beq _021D43AA - mov r0, #1 - pop {r3, pc} -_021D43AA: - mov r0, #0 - pop {r3, pc} -_021D43AE: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4390 - - thumb_func_start ov20_021D43B4 -ov20_021D43B4: ; 0x021D43B4 - push {r3, lr} - sub sp, #8 - add r1, r0, #0 - mov r2, #0 - add r1, #0x80 - str r2, [r1, #0] - str r2, [sp] - mov r1, #0xc - str r1, [sp, #4] - add r0, #0x40 - mov r1, #4 - mov r2, #0x3f - mov r3, #0x7c - bl ov20_021D4F1C - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov20_021D43B4 - - thumb_func_start ov20_021D43D8 -ov20_021D43D8: ; 0x021D43D8 - push {r4, lr} - add r4, r0, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021D4430 - add r0, r4, #0 - add r0, #0x40 - bl ov20_021D4F4C - cmp r0, #0 - beq _021D4434 - mov r0, #2 - mov r1, #0 - bl sub_02019120 - ldr r0, _021D4438 ; =0x0400004A - ldrh r2, [r0] - mov r0, #0x3f - bic r2, r0 - add r0, r4, #0 - add r0, #0x84 - ldrb r0, [r0] - lsl r1, r0, #0x1b - lsr r1, r1, #0x1b - lsl r0, r0, #0x1a - orr r1, r2 - lsr r0, r0, #0x1f - beq _021D4416 - mov r0, #0x20 - orr r1, r0 -_021D4416: - ldr r2, _021D4438 ; =0x0400004A - ldr r0, _021D443C ; =0xFFFF1FFF - strh r1, [r2] - sub r2, #0x4a - ldr r1, [r2, #0] - add r4, #0x88 - and r1, r0 - ldr r0, [r4, #0] - lsl r0, r0, #0xd - orr r0, r1 - str r0, [r2, #0] - mov r0, #1 - pop {r4, pc} -_021D4430: - mov r0, #1 - pop {r4, pc} -_021D4434: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D4438: .word 0x0400004A -_021D443C: .word 0xFFFF1FFF - thumb_func_end ov20_021D43D8 - - thumb_func_start ov20_021D4440 -ov20_021D4440: ; 0x021D4440 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x30] - add r4, r1, #0 - bl sub_02021CAC - cmp r4, #0 - beq _021D446E - ldr r0, [r5, #4] - bl ov20_021D204C - add r1, r0, #0 - ldr r0, [r5, #0x34] - bl sub_02021CAC - ldr r0, [r5, #4] - bl ov20_021D2060 - add r1, r0, #0 - ldr r0, [r5, #0x38] - bl sub_02021CAC - pop {r3, r4, r5, pc} -_021D446E: - ldr r0, [r5, #0x34] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #0x38] - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D4440 - - thumb_func_start ov20_021D4480 -ov20_021D4480: ; 0x021D4480 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r2, r1, #0 - mov r0, #1 - and r2, r0 - mov r0, #0x70 - mul r0, r2 - add r0, #0x48 - lsl r0, r0, #0xc - str r0, [sp] - lsr r1, r1, #1 - mov r0, #0x18 - mul r0, r1 - add r0, #0x38 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #0x30] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0x30] - mov r1, #8 - bl sub_02021D6C - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4480 - - thumb_func_start ov20_021D44BC -ov20_021D44BC: ; 0x021D44BC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - add r4, r1, #0 - bl ov20_021D45AC - add r0, r7, #0 - add r0, #0x90 - ldr r0, [r0, #0] - lsl r6, r4, #1 - str r0, [sp, #0x10] - add r0, r0, r6 - str r0, [sp, #0x14] - mov r0, #0x18 - mul r0, r4 - str r0, [sp, #8] - add r0, r7, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [sp, #8] - add r1, r0, r1 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp, #0x18] - cmp r4, #0 - bge _021D4500 - ldr r0, [sp, #0x14] - add r5, r1, #0 - str r0, [sp, #0x10] - lsl r0, r4, #2 - neg r0, r0 - neg r6, r6 - str r0, [sp, #0xc] - b _021D4520 -_021D4500: - add r0, #0x78 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldr r0, [sp, #0x10] - add r0, #0xa - str r0, [sp, #0x10] - ldr r0, [r7, #4] - bl ov20_021D1FE4 - ldr r1, [sp, #0x10] - add r1, r6, r1 - cmp r1, r0 - bls _021D451C - sub r6, r6, #1 -_021D451C: - lsl r0, r4, #2 - str r0, [sp, #0xc] -_021D4520: - mov r4, #0 - cmp r6, #0 - ble _021D4544 -_021D4526: - ldr r1, [sp, #0x10] - add r0, r7, #0 - add r1, r1, r4 - add r2, r5, #0 - bl ov20_021D4658 - mov r0, #1 - tst r0, r4 - beq _021D453E - add r5, #0x18 - lsl r0, r5, #0x18 - lsr r5, r0, #0x18 -_021D453E: - add r4, r4, #1 - cmp r4, r6 - blt _021D4526 -_021D4544: - add r1, r7, #0 - ldr r0, [sp, #0x18] - add r1, #0x8c - str r0, [r1, #0] - add r1, r7, #0 - ldr r0, [sp, #0x14] - add r1, #0x90 - str r0, [r1, #0] - add r0, r7, #0 - add r0, #0x10 - bl sub_0201ACCC - ldr r0, [sp, #8] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r3, #1 - str r0, [sp, #4] - add r0, r7, #0 - ldr r1, [r7, #0xc] - add r0, #0x60 - bl ov20_021D4E38 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov20_021D44BC - - thumb_func_start ov20_021D4578 -ov20_021D4578: ; 0x021D4578 - push {r4, lr} - add r4, r0, #0 - add r0, #0x60 - bl ov20_021D4E8C - cmp r0, #0 - beq _021D45A6 - ldr r0, [r4, #4] - bl ov20_021D204C - add r1, r0, #0 - ldr r0, [r4, #0x34] - bl sub_02021CAC - ldr r0, [r4, #4] - bl ov20_021D2060 - add r1, r0, #0 - ldr r0, [r4, #0x38] - bl sub_02021CAC - mov r0, #1 - pop {r4, pc} -_021D45A6: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4578 - - thumb_func_start ov20_021D45AC -ov20_021D45AC: ; 0x021D45AC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - cmp r1, #0 - ble _021D45CC - add r0, #0x8c - ldr r0, [r0, #0] - add r0, #0x78 - lsl r0, r0, #0x18 - lsr r3, r0, #0x18 - mov r0, #0x18 - mul r0, r1 - add r0, r3, r0 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - b _021D45DA -_021D45CC: - add r0, #0x8c - ldr r4, [r0, #0] - mov r0, #0x18 - mul r0, r1 - add r0, r4, r0 - lsl r0, r0, #0x18 - lsr r3, r0, #0x18 -_021D45DA: - cmp r3, r4 - bge _021D45FE - mov r0, #0xd0 - str r0, [sp] - sub r0, r4, r3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - mov r1, #0 - lsl r3, r3, #0x10 - add r5, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r1, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - add sp, #8 - pop {r3, r4, r5, pc} -_021D45FE: - mov r0, #0xd0 - str r0, [sp] - add r0, #0x30 - sub r0, r0, r3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - lsl r3, r3, #0x10 - add r0, #0x10 - add r2, r1, #0 - lsr r3, r3, #0x10 - bl sub_0201AE78 - mov r1, #0 - mov r0, #0xd0 - str r0, [sp] - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - add r5, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov20_021D45AC - - thumb_func_start ov20_021D4638 -ov20_021D4638: ; 0x021D4638 - push {r3, lr} - add r1, r0, #0 - mov r2, #0x30 - add r1, #0x8c - str r2, [r1, #0] - add r1, r0, #0 - mov r3, #0 - add r1, #0x90 - str r3, [r1, #0] - ldr r0, [r0, #0xc] - mov r1, #2 - mov r2, #3 - bl sub_02019184 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4638 - - thumb_func_start ov20_021D4658 -ov20_021D4658: ; 0x021D4658 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r2, #0 - ldr r0, [r5, #4] - ldr r2, [r5, #0x3c] - add r7, r1, #0 - bl ov20_021D2008 - cmp r4, #0xf0 - bhi _021D4694 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D4724 ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - mov r3, #1 - add r4, r7, #0 - and r4, r3 - mov r3, #0x70 - ldr r2, [r5, #0x3c] - add r0, #0x10 - mul r3, r4 - bl sub_0201D78C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D4694: - mov r0, #1 - lsl r0, r0, #8 - sub r6, r0, r4 - add r0, r5, #0 - add r0, #0x20 - mov r1, #0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D4724 ; =0x00010200 - add r3, r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - ldr r2, [r5, #0x3c] - add r0, #0x20 - bl sub_0201D78C - mov r2, #0 - mov r0, #1 - add r1, r7, #0 - and r1, r0 - add r7, r1, #0 - mov r0, #0x70 - mul r7, r0 - mov r0, #0x60 - str r0, [sp] - mov r1, #0x10 - str r1, [sp, #4] - lsl r1, r7, #0x10 - lsr r1, r1, #0x10 - str r1, [sp, #8] - lsl r1, r4, #0x10 - lsr r1, r1, #0x10 - str r1, [sp, #0xc] - str r0, [sp, #0x10] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x14] - add r0, r5, #0 - ldr r1, [r5, #0x2c] - add r0, #0x10 - add r3, r2, #0 - bl sub_0201ADDC - mov r1, #0x60 - lsl r2, r7, #0x10 - lsl r3, r6, #0x10 - str r1, [sp] - mov r0, #0x10 - str r0, [sp, #4] - lsr r2, r2, #0x10 - str r2, [sp, #8] - mov r2, #0 - sub r0, r0, r6 - str r2, [sp, #0xc] - lsl r0, r0, #0x10 - str r1, [sp, #0x10] - lsr r0, r0, #0x10 - str r0, [sp, #0x14] - add r0, r5, #0 - ldr r1, [r5, #0x2c] - add r0, #0x10 - lsr r3, r3, #0x10 - bl sub_0201ADDC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D4724: .word 0x00010200 - thumb_func_end ov20_021D4658 - - thumb_func_start ov20_021D4728 -ov20_021D4728: ; 0x021D4728 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #5 - add r5, r0, #0 - mov r0, #0x23 - lsl r1, r1, #8 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - str r7, [r4, #8] - add r0, r5, #0 - bl ov20_021D2E04 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov20_021D2E08 - str r0, [r4, #0x10] - mov r1, #0 - str r1, [r4, #0x14] - ldr r0, _021D4760 ; =0x000004FC - str r1, [r4, #0x18] - str r1, [r4, r0] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4760: .word 0x000004FC - thumb_func_end ov20_021D4728 - - thumb_func_start ov20_021D4764 -ov20_021D4764: ; 0x021D4764 - push {r4, lr} - add r4, r0, #0 - bl ov20_021D4AD4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov20_021D4764 - - thumb_func_start ov20_021D4774 -ov20_021D4774: ; 0x021D4774 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0x40 - add r4, r1, #0 - str r0, [sp] - mov r0, #0x23 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x15 - mov r2, #4 - mov r3, #0 - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - ldr r2, [r5, #0xc] - add r0, r4, #0 - mov r1, #0xb - mov r3, #4 - bl sub_0200710C - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D4874 - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D48C4 - ldr r0, [r5, #4] - bl ov20_021D1F94 - cmp r0, #0 - bne _021D4810 - mov r2, #0xb - ldr r0, _021D486C ; =0x000001FA - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - add r0, r5, r0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - mov r2, #3 - ldr r0, [r5, #0xc] - mov r1, #4 - add r3, r2, #0 - bl sub_020198E8 - mov r2, #0xb - mov r0, #0xa5 - lsl r0, r0, #2 - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - add r0, r5, r0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r5, #0xc] - mov r1, #4 - mov r2, #3 - mov r3, #0xe - bl sub_020198E8 - b _021D4858 -_021D4810: - mov r2, #0xb - add r0, r5, #0 - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - add r0, #0x2c - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - mov r2, #3 - ldr r0, [r5, #0xc] - mov r1, #4 - add r3, r2, #0 - bl sub_020198E8 - mov r2, #0xb - ldr r0, _021D4870 ; =0x00000462 - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - add r0, r5, r0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r5, #0xc] - mov r1, #4 - mov r2, #3 - mov r3, #0xe - bl sub_020198E8 -_021D4858: - add r0, r5, #0 - add r1, r4, #0 - bl ov20_021D4A24 - ldr r0, [r5, #0xc] - mov r1, #4 - bl sub_02019448 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 -_021D486C: .word 0x000001FA -_021D4870: .word 0x00000462 - thumb_func_end ov20_021D4774 - - thumb_func_start ov20_021D4874 -ov20_021D4874: ; 0x021D4874 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r4, _021D48C0 ; =0x021D52F4 - str r1, [sp, #4] - mov r6, #0 - add r5, #0x2c -_021D4882: - mov r0, #0x23 - str r0, [sp] - ldrh r1, [r4] - ldr r0, [sp, #4] - mov r2, #1 - add r3, sp, #8 - bl sub_020071D0 - add r7, r0, #0 - beq _021D48B0 - ldr r0, [sp, #8] - add r1, r5, #0 - add r0, #0xc - mov r2, #0x9a - bl sub_020C4B18 - add r0, r5, #0 - mov r1, #0x9a - bl sub_020C2C54 - add r0, r7, #0 - bl sub_020181C4 -_021D48B0: - add r6, r6, #1 - add r4, r4, #2 - add r5, #0x9a - cmp r6, #8 - blo _021D4882 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021D48C0: .word 0x021D52F4 - thumb_func_end ov20_021D4874 - - thumb_func_start ov20_021D48C4 -ov20_021D48C4: ; 0x021D48C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r7, r1, #0 - mov r0, #2 - mov r1, #0 - bl sub_02002BB8 - ldr r1, _021D4984 ; =0x000001B5 - mov r0, #0x1a - mov r2, #0xb - mov r3, #0x23 - bl sub_0200B010 - add r6, r0, #0 - ldr r1, _021D4984 ; =0x000001B5 - mov r0, #0x1a - mov r2, #0xc - mov r3, #0x23 - bl sub_0200B010 - add r4, r0, #0 - mov r0, #0x23 - str r0, [sp] - add r0, r7, #0 - mov r1, #0x14 - mov r2, #1 - add r3, sp, #4 - bl sub_020071B4 - add r7, r0, #0 - beq _021D496C - add r0, sp, #8 - bl sub_0201A7A0 - ldr r0, [r5, #0xc] - add r1, sp, #4 - str r0, [sp, #8] - mov r0, #0xb - strb r0, [r1, #0xb] - mov r0, #0x39 - strb r0, [r1, #0xc] - ldrh r2, [r1, #0xe] - ldr r0, _021D4988 ; =0xFFFF7FFF - mov r3, #0 - and r0, r2 - strh r0, [r1, #0xe] - ldr r0, [sp, #4] - add r2, r6, #0 - ldr r0, [r0, #0x14] - str r0, [sp, #0x14] - ldr r1, [r5, #0xc] - add r0, sp, #8 - bl ov20_021D498C - ldr r0, [sp, #4] - add r2, r4, #0 - ldr r1, [r0, #0x14] - mov r0, #0x9a - lsl r0, r0, #6 - add r0, r1, r0 - str r0, [sp, #0x14] - ldr r1, [r5, #0xc] - add r0, sp, #8 - mov r3, #0 - bl ov20_021D498C - ldr r1, [sp, #4] - ldr r0, [r1, #0x14] - ldr r1, [r1, #0x10] - bl sub_020C2C54 - ldr r3, [sp, #4] - mov r0, #0 - str r0, [sp] - ldr r2, [r3, #0x14] - ldr r0, [r5, #0xc] - ldr r3, [r3, #0x10] - mov r1, #4 - bl sub_0201958C - add r0, r7, #0 - bl sub_020181C4 -_021D496C: - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - mov r0, #2 - bl sub_02002C60 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D4984: .word 0x000001B5 -_021D4988: .word 0xFFFF7FFF - thumb_func_end ov20_021D48C4 - - thumb_func_start ov20_021D498C -ov20_021D498C: ; 0x021D498C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x10] - add r0, r2, #0 - str r2, [sp, #0x14] - add r7, r3, #0 - bl sub_02023C5C - str r0, [sp, #0x1c] - mov r0, #0x20 - mov r1, #0x23 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x1c] - mov r1, #2 - sub r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #1 - add r7, r7, r0 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - cmp r0, #0 - bls _021D4A10 -_021D49BE: - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x20] - add r0, r6, #0 - bl sub_02023C9C - mov r0, #2 - add r1, r6, #0 - mov r2, #0 - mov r3, #0x58 - bl sub_02002EEC - ldr r5, _021D4A1C ; =0x021D52EC - str r0, [sp, #0x18] - mov r4, #0 -_021D49DA: - mov r0, #0 - ldrsh r0, [r5, r0] - ldr r3, [sp, #0x18] - mov r1, #2 - add r0, r7, r0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D4A20 ; =0x00010203 - add r2, r6, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - bl sub_0201D78C - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blo _021D49DA - ldr r0, [sp, #0x20] - add r7, #0x10 - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [sp, #0x20] - cmp r1, r0 - blo _021D49BE -_021D4A10: - add r0, r6, #0 - bl sub_020237BC - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021D4A1C: .word 0x021D52EC -_021D4A20: .word 0x00010203 - thumb_func_end ov20_021D498C - - thumb_func_start ov20_021D4A24 -ov20_021D4A24: ; 0x021D4A24 - push {r4, r5, lr} - sub sp, #0x4c - add r5, r0, #0 - add r0, sp, #0x38 - add r4, r1, #0 - bl sub_020A81D0 - add r0, sp, #0x14 - bl sub_020A818C - mov r0, #0x23 - str r0, [sp] - add r0, sp, #0x38 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x19 - mov r2, #2 - mov r3, #0 - bl sub_0200716C - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - str r3, [sp, #8] - mov r0, #0x23 - str r0, [sp, #0xc] - add r0, sp, #0x14 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #0x18 - mov r2, #1 - bl sub_0200718C - add r0, r5, #0 - add r0, #0x1c - add r1, r4, #0 - mov r2, #0x16 - mov r3, #0x17 - bl ov20_021D4AF8 - mov r0, #0xc0 - str r0, [sp] - mov r0, #0x38 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r3, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, sp, #0x14 - add r2, sp, #0x38 - add r3, #0x1c - bl ov20_021D4B40 - str r0, [r5, #0x14] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_02021CAC - mov r0, #0xc0 - str r0, [sp] - mov r0, #0x88 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r3, r5, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, sp, #0x14 - add r2, sp, #0x38 - add r3, #0x1c - bl ov20_021D4B40 - str r0, [r5, #0x18] - mov r1, #2 - bl sub_02021D6C - ldr r0, [r5, #0x18] - mov r1, #0 - bl sub_02021CAC - add sp, #0x4c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4A24 - - thumb_func_start ov20_021D4AD4 -ov20_021D4AD4: ; 0x021D4AD4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D4AE2 - bl sub_02021BD4 -_021D4AE2: - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _021D4AEC - bl sub_02021BD4 -_021D4AEC: - add r4, #0x1c - add r0, r4, #0 - bl ov20_021D4B2C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4AD4 - - thumb_func_start ov20_021D4AF8 -ov20_021D4AF8: ; 0x021D4AF8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x23 - add r6, r3, #0 - str r0, [sp] - add r1, r2, #0 - add r0, r4, #0 - mov r2, #1 - add r3, r5, #4 - bl sub_02007204 - str r0, [r5, #0] - mov r0, #0x23 - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - add r1, r6, #0 - mov r2, #1 - add r3, #0xc - bl sub_02007220 - str r0, [r5, #8] - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov20_021D4AF8 - - thumb_func_start ov20_021D4B2C -ov20_021D4B2C: ; 0x021D4B2C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov20_021D4B2C - - thumb_func_start ov20_021D4B40 -ov20_021D4B40: ; 0x021D4B40 - push {r3, r4, lr} - sub sp, #0x44 - str r2, [sp, #0x28] - str r1, [sp, #0x20] - ldr r1, [r3, #4] - ldr r2, [sp, #0x58] - str r1, [sp, #0x2c] - ldr r1, [r3, #0xc] - str r1, [sp, #0x30] - add r1, sp, #0x40 - strb r2, [r1] - mov r1, #0 - str r1, [sp, #0x24] - str r1, [sp, #0x34] - str r1, [sp, #0x38] - str r1, [sp, #0x3c] - ldr r0, [r0, #0x10] - str r0, [sp] - add r0, sp, #0x20 - str r0, [sp, #4] - ldr r0, [sp, #0x50] - str r1, [sp, #0x10] - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [sp, #0x54] - add r0, #0xc0 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, [sp, #0x5c] - str r0, [sp, #0x14] - mov r0, #2 - str r0, [sp, #0x18] - mov r0, #0x23 - str r0, [sp, #0x1c] - add r0, sp, #0 - bl sub_02021B90 - add r4, r0, #0 - beq _021D4B9E - mov r1, #1 - bl sub_02021CC8 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 -_021D4B9E: - add r0, r4, #0 - add sp, #0x44 - pop {r3, r4, pc} - thumb_func_end ov20_021D4B40 - - thumb_func_start ov20_021D4BA4 -ov20_021D4BA4: ; 0x021D4BA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x23 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - beq _021D4C00 - ldr r0, [r5, #4] - bl ov20_021D1F94 - str r5, [r4, #0] - mov r1, #0 - str r1, [r4, #4] - strh r1, [r4, #8] - mov r1, #0xe - mul r1, r0 - ldr r0, _021D4C08 ; =0x021D5304 - mov r2, #1 - ldrh r0, [r0, r1] - strh r0, [r4, #0xa] - ldr r0, _021D4C0C ; =0x021D5306 - ldrh r0, [r0, r1] - strh r0, [r4, #0xc] - ldr r0, _021D4C10 ; =0x021D5308 - ldrh r0, [r0, r1] - strh r0, [r4, #0xe] - ldr r0, _021D4C14 ; =0x021D530A - ldrh r0, [r0, r1] - strh r0, [r4, #0x10] - ldr r0, _021D4C18 ; =0x021D530C - ldrh r0, [r0, r1] - strh r0, [r4, #0x12] - ldr r0, _021D4C1C ; =0x021D530E - ldrh r0, [r0, r1] - strh r0, [r4, #0x14] - ldr r0, _021D4C20 ; =0x021D5310 - ldrh r0, [r0, r1] - add r1, r4, #0 - strh r0, [r4, #0x16] - ldr r0, _021D4C24 ; =ov20_021D4C40 - bl sub_0200D9E8 - ldr r1, _021D4C28 ; =0x000004FC - str r0, [r5, r1] - pop {r3, r4, r5, pc} -_021D4C00: - ldr r0, _021D4C28 ; =0x000004FC - mov r1, #0 - str r1, [r5, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D4C08: .word 0x021D5304 -_021D4C0C: .word 0x021D5306 -_021D4C10: .word 0x021D5308 -_021D4C14: .word 0x021D530A -_021D4C18: .word 0x021D530C -_021D4C1C: .word 0x021D530E -_021D4C20: .word 0x021D5310 -_021D4C24: .word ov20_021D4C40 -_021D4C28: .word 0x000004FC - thumb_func_end ov20_021D4BA4 - - thumb_func_start ov20_021D4C2C -ov20_021D4C2C: ; 0x021D4C2C - ldr r1, _021D4C3C ; =0x000004FC - ldr r0, [r0, r1] - cmp r0, #0 - bne _021D4C38 - mov r0, #1 - bx lr -_021D4C38: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D4C3C: .word 0x000004FC - thumb_func_end ov20_021D4C2C - - thumb_func_start ov20_021D4C40 -ov20_021D4C40: ; 0x021D4C40 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #3 - bls _021D4C50 - b _021D4DB4 -_021D4C50: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4C5C: ; jump table - .short _021D4C64 - _021D4C5C - 2 ; case 0 - .short _021D4CEA - _021D4C5C - 2 ; case 1 - .short _021D4D4A - _021D4C5C - 2 ; case 2 - .short _021D4DA0 - _021D4C5C - 2 ; case 3 -_021D4C64: - ldr r3, [r4, #0] - mov r2, #0xb - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - ldrh r6, [r4, #0xa] - add r0, r3, #0 - mov r5, #0x9a - add r0, #0x2c - mul r5, r6 - add r0, r0, r5 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r3, #0xc] - ldrh r2, [r4, #0xe] - ldrh r3, [r4, #0x10] - mov r1, #4 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - ldr r3, [r4, #0] - mov r2, #0xb - add r0, r3, #0 - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - ldrh r6, [r4, #0x12] - mov r5, #0x9a - add r0, #0x2c - mul r5, r6 - add r0, r0, r5 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r3, #0xc] - ldrh r2, [r4, #0x14] - ldrh r3, [r4, #0x16] - mov r1, #4 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - ldr r0, [r4, #0] - mov r1, #4 - ldr r0, [r0, #0xc] - bl sub_02019448 - ldrh r0, [r4, #0xa] - add sp, #0x1c - add r0, r0, #1 - strh r0, [r4, #0xa] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, r6, pc} -_021D4CEA: - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldrh r0, [r4, #8] - cmp r0, #2 - blo _021D4DB4 - ldr r3, [r4, #0] - mov r2, #0xb - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - ldrh r6, [r4, #0xa] - add r0, r3, #0 - mov r5, #0x9a - add r0, #0x2c - mul r5, r6 - add r0, r0, r5 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r3, #0xc] - ldrh r2, [r4, #0xe] - ldrh r3, [r4, #0x10] - mov r1, #4 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - ldr r0, [r4, #0] - mov r1, #4 - ldr r0, [r0, #0xc] - bl sub_02019448 - mov r0, #0 - strh r0, [r4, #8] - ldrh r0, [r4, #0xa] - add sp, #0x1c - add r0, r0, #1 - strh r0, [r4, #0xa] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, r6, pc} -_021D4D4A: - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldrh r0, [r4, #8] - cmp r0, #4 - blo _021D4DB4 - ldr r3, [r4, #0] - mov r2, #0xb - str r2, [sp] - mov r1, #7 - str r1, [sp, #4] - ldrh r6, [r4, #0xa] - add r0, r3, #0 - mov r5, #0x9a - add r0, #0x2c - mul r5, r6 - add r0, r0, r5 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x18] - ldr r0, [r3, #0xc] - ldrh r2, [r4, #0xe] - ldrh r3, [r4, #0x10] - mov r1, #4 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - ldr r0, [r4, #0] - mov r1, #4 - ldr r0, [r0, #0xc] - bl sub_02019448 - ldr r0, [r4, #4] - add sp, #0x1c - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, r6, pc} -_021D4DA0: - ldr r1, [r4, #0] - ldr r0, _021D4DB8 ; =0x000004FC - mov r2, #0 - str r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_021D4DB4: - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D4DB8: .word 0x000004FC - thumb_func_end ov20_021D4C40 - - thumb_func_start ov20_021D4DBC -ov20_021D4DBC: ; 0x021D4DBC - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - beq _021D4DE2 - ldr r0, [r4, #4] - bl ov20_021D204C - add r1, r0, #0 - ldr r0, [r4, #0x14] - bl sub_02021CAC - ldr r0, [r4, #4] - bl ov20_021D2060 - add r1, r0, #0 - ldr r0, [r4, #0x18] - bl sub_02021CAC - pop {r4, pc} -_021D4DE2: - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_02021CAC - pop {r4, pc} - thumb_func_end ov20_021D4DBC - - thumb_func_start ov20_021D4DF4 -ov20_021D4DF4: ; 0x021D4DF4 - push {r3, lr} - cmp r1, #0 - beq _021D4E00 - cmp r1, #1 - beq _021D4E1C - pop {r3, pc} -_021D4E00: - cmp r2, #0 - beq _021D4E12 - cmp r2, #1 - bne _021D4E36 - ldr r0, [r0, #0x14] - mov r1, #1 - bl sub_02021D6C - pop {r3, pc} -_021D4E12: - ldr r0, [r0, #0x14] - mov r1, #0 - bl sub_02021D6C - pop {r3, pc} -_021D4E1C: - cmp r2, #0 - beq _021D4E2E - cmp r2, #1 - bne _021D4E36 - ldr r0, [r0, #0x18] - mov r1, #3 - bl sub_02021D6C - pop {r3, pc} -_021D4E2E: - ldr r0, [r0, #0x18] - mov r1, #2 - bl sub_02021D6C -_021D4E36: - pop {r3, pc} - thumb_func_end ov20_021D4DF4 - - thumb_func_start ov20_021D4E38 -ov20_021D4E38: ; 0x021D4E38 - push {r4, lr} - add r4, r0, #0 - str r1, [r4, #0] - str r2, [r4, #4] - cmp r3, #0 - bne _021D4E52 - add r0, r1, #0 - add r1, r2, #0 - bl sub_020192EC - str r0, [r4, #0xc] - mov r0, #0 - b _021D4E5E -_021D4E52: - add r0, r1, #0 - add r1, r2, #0 - bl sub_020192F8 - str r0, [r4, #0xc] - mov r0, #3 -_021D4E5E: - str r0, [r4, #8] - ldr r0, [sp, #8] - ldr r1, [r4, #0xc] - add r2, r1, r0 - ldr r1, _021D4E88 ; =0x000001FF - lsl r0, r0, #0xc - and r1, r2 - str r1, [r4, #0x10] - ldr r1, [r4, #0xc] - lsl r1, r1, #0xc - str r1, [r4, #0xc] - ldr r1, [sp, #0xc] - bl sub_020E1F6C - str r0, [r4, #0x14] - ldr r0, [sp, #0xc] - strh r0, [r4, #0x18] - mov r0, #0 - strh r0, [r4, #0x1a] - pop {r4, pc} - nop -_021D4E88: .word 0x000001FF - thumb_func_end ov20_021D4E38 - - thumb_func_start ov20_021D4E8C -ov20_021D4E8C: ; 0x021D4E8C - push {r4, lr} - add r4, r0, #0 - ldrh r0, [r4, #0x1a] - cmp r0, #0 - beq _021D4EA0 - cmp r0, #1 - beq _021D4EB4 - cmp r0, #2 - beq _021D4ECA - b _021D4ECE -_021D4EA0: - ldr r0, _021D4ED4 ; =ov20_021D4ED8 - add r1, r4, #0 - mov r2, #0 - bl ov20_021D2170 - str r0, [r4, #0x1c] - ldrh r0, [r4, #0x1a] - add r0, r0, #1 - strh r0, [r4, #0x1a] - b _021D4ECE -_021D4EB4: - ldrh r0, [r4, #0x18] - cmp r0, #0 - bne _021D4ECE - ldr r0, [r4, #0x1c] - bl sub_0200DA58 - ldrh r0, [r4, #0x1a] - add r0, r0, #1 - strh r0, [r4, #0x1a] - mov r0, #1 - pop {r4, pc} -_021D4ECA: - mov r0, #1 - pop {r4, pc} -_021D4ECE: - mov r0, #0 - pop {r4, pc} - nop -_021D4ED4: .word ov20_021D4ED8 - thumb_func_end ov20_021D4E8C - - thumb_func_start ov20_021D4ED8 -ov20_021D4ED8: ; 0x021D4ED8 - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #0x18] - cmp r0, #0 - beq _021D4F06 - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x14] - add r3, r1, r0 - str r3, [r4, #0xc] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - ldr r0, [r4, #0] - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - asr r3, r3, #0xc - bl sub_02019184 - ldrh r0, [r4, #0x18] - sub r0, r0, #1 - strh r0, [r4, #0x18] - pop {r4, pc} -_021D4F06: - ldr r1, [r4, #4] - ldr r2, [r4, #8] - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - ldr r0, [r4, #0] - ldr r3, [r4, #0x10] - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl sub_02019184 - pop {r4, pc} - thumb_func_end ov20_021D4ED8 - - thumb_func_start ov20_021D4F1C -ov20_021D4F1C: ; 0x021D4F1C - push {r4, lr} - add r4, r0, #0 - str r1, [r4, #0] - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - str r2, [r4, #4] - str r1, [r4, #0x14] - str r3, [r4, #8] - sub r0, r0, r3 - bl sub_020E1F6C - str r0, [r4, #0x10] - ldr r0, [sp, #8] - mov r2, #0 - str r0, [r4, #0xc] - ldr r0, _021D4F48 ; =ov20_021D4F74 - add r1, r4, #0 - str r2, [r4, #0x18] - bl ov20_021D2170 - str r0, [r4, #0x1c] - pop {r4, pc} - ; .align 2, 0 -_021D4F48: .word ov20_021D4F74 - thumb_func_end ov20_021D4F1C - - thumb_func_start ov20_021D4F4C -ov20_021D4F4C: ; 0x021D4F4C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _021D4F6C - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021D4F70 - ldr r0, [r4, #0x1c] - bl sub_0200DA58 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - mov r0, #1 - pop {r4, pc} -_021D4F6C: - mov r0, #1 - pop {r4, pc} -_021D4F70: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov20_021D4F4C - - thumb_func_start ov20_021D4F74 -ov20_021D4F74: ; 0x021D4F74 - push {r3, lr} - add r2, r1, #0 - ldr r0, [r2, #0x14] - cmp r0, #0 - beq _021D4F90 - ldr r1, [r2, #8] - ldr r0, [r2, #0x10] - add r0, r1, r0 - str r0, [r2, #8] - asr r3, r0, #3 - ldr r0, [r2, #0x14] - sub r0, r0, #1 - str r0, [r2, #0x14] - b _021D4F94 -_021D4F90: - ldr r0, [r2, #0xc] - asr r3, r0, #3 -_021D4F94: - cmp r3, #0x10 - ble _021D4F9A - mov r3, #0x10 -_021D4F9A: - mov r0, #0x10 - sub r0, r0, r3 - str r0, [sp] - ldr r0, _021D4FAC ; =0x04000050 - ldmia r2!, {r1, r2} - bl sub_020BF55C - pop {r3, pc} - nop -_021D4FAC: .word 0x04000050 - thumb_func_end ov20_021D4F74 - - thumb_func_start ov20_021D4FB0 -ov20_021D4FB0: ; 0x021D4FB0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021D4FE8 ; =0x04000050 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_020BF578 - ldr r1, [sp, #0x18] - str r4, [r5, #0] - str r1, [r5, #0x14] - lsl r0, r6, #0xc - str r0, [r5, #8] - lsl r2, r7, #0xc - str r2, [r5, #0xc] - ldr r0, [r5, #8] - sub r0, r2, r0 - bl sub_020E1F6C - str r0, [r5, #0x10] - mov r2, #0 - ldr r0, _021D4FEC ; =ov20_021D5018 - add r1, r5, #0 - str r2, [r5, #0x18] - bl ov20_021D2170 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4FE8: .word 0x04000050 -_021D4FEC: .word ov20_021D5018 - thumb_func_end ov20_021D4FB0 - - thumb_func_start ov20_021D4FF0 -ov20_021D4FF0: ; 0x021D4FF0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _021D5010 - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021D5014 - ldr r0, [r4, #0x1c] - bl sub_0200DA58 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - mov r0, #1 - pop {r4, pc} -_021D5010: - mov r0, #1 - pop {r4, pc} -_021D5014: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov20_021D4FF0 - - thumb_func_start ov20_021D5018 -ov20_021D5018: ; 0x021D5018 - ldr r0, [r1, #0x14] - cmp r0, #0 - beq _021D5030 - ldr r2, [r1, #8] - ldr r0, [r1, #0x10] - add r0, r2, r0 - str r0, [r1, #8] - asr r2, r0, #0xc - ldr r0, [r1, #0x14] - sub r0, r0, #1 - str r0, [r1, #0x14] - b _021D5034 -_021D5030: - ldr r0, [r1, #0xc] - asr r2, r0, #0xc -_021D5034: - ldr r3, _021D503C ; =sub_020BF578 - ldr r0, _021D5040 ; =0x04000050 - ldr r1, [r1, #0] - bx r3 - ; .align 2, 0 -_021D503C: .word sub_020BF578 -_021D5040: .word 0x04000050 - thumb_func_end ov20_021D5018 - - thumb_func_start ov20_021D5044 -ov20_021D5044: ; 0x021D5044 - mov r0, #0x1b - bx lr - thumb_func_end ov20_021D5044 - - thumb_func_start ov20_021D5048 -ov20_021D5048: ; 0x021D5048 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r4, #0x1b - blo _021D5056 - bl sub_02022974 -_021D5056: - mov r1, #0xa - ldr r2, _021D5068 ; =0x021D5320 - mul r1, r4 - add r1, r2, r1 - add r0, r5, #0 - mov r2, #2 - bl sub_02023D8C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D5068: .word 0x021D5320 - thumb_func_end ov20_021D5048 - - thumb_func_start ov20_021D506C -ov20_021D506C: ; 0x021D506C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0x1b - blo _021D507C - bl sub_02022974 -_021D507C: - mov r0, #0xa - add r1, r5, #0 - mul r1, r0 - ldr r0, _021D5090 ; =0x021D5322 - ldrb r0, [r0, r1] - str r0, [r4, #0] - ldr r0, _021D5094 ; =0x021D5323 - ldrb r0, [r0, r1] - str r0, [r6, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D5090: .word 0x021D5322 -_021D5094: .word 0x021D5323 - thumb_func_end ov20_021D506C - - thumb_func_start ov20_021D5098 -ov20_021D5098: ; 0x021D5098 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x1b - blo _021D50A4 - bl sub_02022974 -_021D50A4: - mov r0, #0xa - add r1, r4, #0 - mul r1, r0 - ldr r0, _021D50B0 ; =0x021D5324 - ldrb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_021D50B0: .word 0x021D5324 - thumb_func_end ov20_021D5098 - - thumb_func_start ov20_021D50B4 -ov20_021D50B4: ; 0x021D50B4 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x1b - blo _021D50C0 - bl sub_02022974 -_021D50C0: - mov r0, #0xa - add r1, r4, #0 - mul r1, r0 - ldr r0, _021D50CC ; =0x021D5325 - ldrb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_021D50CC: .word 0x021D5325 - thumb_func_end ov20_021D50B4 - - thumb_func_start ov20_021D50D0 -ov20_021D50D0: ; 0x021D50D0 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x1b - blo _021D50DC - bl sub_02022974 -_021D50DC: - mov r0, #0xa - add r1, r4, #0 - mul r1, r0 - ldr r0, _021D50E8 ; =0x021D5326 - ldrb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_021D50E8: .word 0x021D5326 - thumb_func_end ov20_021D50D0 - - thumb_func_start ov20_021D50EC -ov20_021D50EC: ; 0x021D50EC - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x1b - blo _021D50F8 - bl sub_02022974 -_021D50F8: - mov r0, #0xa - add r1, r4, #0 - mul r1, r0 - ldr r0, _021D5104 ; =0x021D5327 - ldrb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_021D5104: .word 0x021D5327 - thumb_func_end ov20_021D50EC - - thumb_func_start ov20_021D5108 -ov20_021D5108: ; 0x021D5108 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x1b - blo _021D5114 - bl sub_02022974 -_021D5114: - mov r0, #0xa - add r1, r4, #0 - mul r1, r0 - ldr r0, _021D5120 ; =0x021D5328 - ldrb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_021D5120: .word 0x021D5328 - thumb_func_end ov20_021D5108 - - thumb_func_start ov20_021D5124 -ov20_021D5124: ; 0x021D5124 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x1b - blo _021D5130 - bl sub_02022974 -_021D5130: - mov r0, #0xa - add r1, r4, #0 - mul r1, r0 - ldr r0, _021D513C ; =0x021D5329 - ldrb r0, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_021D513C: .word 0x021D5329 - thumb_func_end ov20_021D5124 - ; 0x021D5140 - - - .rodata - .incbin "incbin/overlay20_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay21.s b/asm/overlay21.s deleted file mode 100644 index 45d58e502..000000000 --- a/asm/overlay21.s +++ /dev/null @@ -1,53449 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov21_021D0D80 -ov21_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - sub sp, #0x20 - mov r1, #0 - add r5, r0, #0 - mov r0, #0x36 - add r2, r1, #0 - bl sub_02004550 - mov r2, #1 - mov r0, #3 - mov r1, #0x25 - lsl r2, r2, #0x12 - bl sub_02017FC8 - add r0, r5, #0 - mov r1, #4 - mov r2, #0x25 - bl sub_0200681C - add r4, r0, #0 - bne _021D0DAE - bl sub_02022974 -_021D0DAE: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - mov r0, #8 - mov r1, #0x25 - bl sub_0201DBEC - add r0, r5, #0 - bl sub_02006840 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r1, _021D0E34 ; =0x000001E7 - mov r2, #0 - bl sub_0202756C - bl sub_02098988 - ldr r0, _021D0E38 ; =ov21_021D0F04 - add r1, r4, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - cmp r0, #1 - beq _021D0DF4 - bl sub_02022974 -_021D0DF4: - mov r0, #0x25 - bl ov21_021D12B0 - ldr r0, [r5, #0] - add r1, sp, #0 - str r0, [sp] - ldr r0, [r5, #4] - str r0, [sp, #4] - ldr r0, [r5, #8] - str r0, [sp, #8] - ldr r0, [r5, #0xc] - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - str r0, [sp, #0x18] - ldr r0, [r5, #0x10] - str r0, [sp, #0x10] - ldr r0, [r5, #0x14] - str r0, [sp, #0x14] - ldr r0, [r5, #0x1c] - str r0, [sp, #0x1c] - mov r0, #0x25 - bl ov21_021D0F60 - str r0, [r4, #0] - mov r0, #1 - mov r1, #0x2a - bl sub_0200544C - mov r0, #1 - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_021D0E34: .word 0x000001E7 -_021D0E38: .word ov21_021D0F04 - thumb_func_end ov21_021D0D80 - - thumb_func_start ov21_021D0E3C -ov21_021D0E3C: ; 0x021D0E3C - push {r3, r4, r5, lr} - add r4, r1, #0 - bl sub_0200682C - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #3 - bhi _021D0EBC - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D0E58: ; jump table - .short _021D0E60 - _021D0E58 - 2 ; case 0 - .short _021D0E78 - _021D0E58 - 2 ; case 1 - .short _021D0E8E - _021D0E58 - 2 ; case 2 - .short _021D0E9A - _021D0E58 - 2 ; case 3 -_021D0E60: - bl ov21_021D0F18 - mov r0, #0xf - mvn r0, r0 - mov r1, #0x3f - mov r2, #3 - bl sub_0200AB4C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D0EBC -_021D0E78: - ldr r0, [r5, #0] - bl ov21_021D10B8 - cmp r0, #1 - bne _021D0EBC - mov r0, #0 - str r0, [r5, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D0EBC -_021D0E8E: - bl ov21_021D0F38 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D0EBC -_021D0E9A: - bl ov21_021D0F58 - cmp r0, #0 - beq _021D0EBC - mov r0, #0 - bl sub_0200F32C - mov r0, #1 - bl sub_0200F32C - ldr r0, _021D0EC0 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, _021D0EC4 ; =0x04001050 - strh r1, [r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D0EBC: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D0EC0: .word 0x04000050 -_021D0EC4: .word 0x04001050 - thumb_func_end ov21_021D0E3C - - thumb_func_start ov21_021D0EC8 -ov21_021D0EC8: ; 0x021D0EC8 - push {r4, lr} - add r4, r0, #0 - bl sub_0200682C - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_0201E530 - cmp r0, #1 - beq _021D0EE4 - bl sub_02022974 -_021D0EE4: - bl ov21_021D12C4 - bl sub_0201DC3C - add r0, r4, #0 - bl sub_02006830 - mov r0, #0x25 - bl sub_0201807C - mov r0, #1 - mov r1, #0x7f - bl sub_0200544C - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021D0EC8 - - thumb_func_start ov21_021D0F04 -ov21_021D0F04: ; 0x021D0F04 - push {r3, lr} - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D0F10 - bl ov21_021D12D8 -_021D0F10: - bl sub_0201DCAC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D0F04 - - thumb_func_start ov21_021D0F18 -ov21_021D0F18: ; 0x021D0F18 - push {lr} - sub sp, #0xc - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x25 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov21_021D0F18 - - thumb_func_start ov21_021D0F38 -ov21_021D0F38: ; 0x021D0F38 - push {lr} - sub sp, #0xc - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x25 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} - thumb_func_end ov21_021D0F38 - - thumb_func_start ov21_021D0F58 -ov21_021D0F58: ; 0x021D0F58 - ldr r3, _021D0F5C ; =sub_0200F2AC - bx r3 - ; .align 2, 0 -_021D0F5C: .word sub_0200F2AC - thumb_func_end ov21_021D0F58 - - thumb_func_start ov21_021D0F60 -ov21_021D0F60: ; 0x021D0F60 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r1, #0 - ldr r1, _021D1084 ; =0x00001D10 - add r7, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D0F76 - bl sub_02022974 -_021D0F76: - ldr r2, _021D1084 ; =0x00001D10 - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - str r7, [r4, #4] - ldr r0, [r5, #0x1c] - str r0, [r4, #8] - add r0, r7, #0 - bl ov21_021D423C - ldr r1, _021D1088 ; =0x00001A0C - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D423C - ldr r1, _021D108C ; =0x00001A10 - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D423C - ldr r1, _021D1090 ; =0x00001A14 - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D423C - ldr r1, _021D1094 ; =0x00001A18 - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D3FE0 - mov r1, #0x1d - lsl r1, r1, #8 - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D3FE0 - ldr r1, _021D1098 ; =0x00001D04 - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D3FE0 - ldr r1, _021D109C ; =0x00001D08 - str r0, [r4, r1] - add r0, r7, #0 - bl ov21_021D3FE0 - ldr r1, _021D10A0 ; =0x00001D0C - str r0, [r4, r1] - ldr r0, [r5, #0] - str r0, [sp, #8] - ldr r0, [r5, #4] - str r0, [sp, #0xc] - ldr r0, [r5, #8] - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - str r0, [sp, #0x14] - ldr r0, [r5, #0x10] - str r0, [sp, #0x18] - ldr r0, [r5, #0x14] - str r0, [sp, #0x1c] - ldr r0, [r5, #0x18] - str r0, [sp, #0x20] - ldr r0, [r5, #0x1c] - bl sub_0209ACE4 - str r0, [sp, #0x24] - ldr r0, [r5, #0x1c] - bl sub_0209ACEC - str r0, [sp, #0x28] - add r0, r4, #0 - add r0, #0xc - add r1, sp, #8 - add r2, r7, #0 - bl ov21_021D3208 - ldr r0, _021D10A4 ; =0x0000177C - add r1, r7, #0 - add r0, r4, r0 - bl ov21_021D1FA4 - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021D10A8 ; =0x00001A30 - ldr r5, _021D10AC ; =0x021E9B74 - add r6, r4, r0 -_021D1024: - ldr r3, [r5, #0] - cmp r3, #0 - beq _021D1032 - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - blx r3 -_021D1032: - ldr r0, [sp, #4] - add r5, r5, #4 - add r0, r0, #1 - add r6, #0x28 - str r0, [sp, #4] - cmp r0, #0xa - blt _021D1024 - mov r0, #0 - str r0, [sp] - mov r0, #0x6f - lsl r0, r0, #6 - ldr r5, _021D10B0 ; =0x021E9B34 - add r6, r4, r0 -_021D104C: - ldr r3, [r5, #0] - cmp r3, #0 - beq _021D105A - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - blx r3 -_021D105A: - ldr r0, [sp] - add r5, r5, #4 - add r0, r0, #1 - add r6, #0x28 - str r0, [sp] - cmp r0, #8 - blt _021D104C - ldr r1, _021D10B4 ; =0x00001A1C - add r0, r7, #0 - add r1, r4, r1 - add r2, r4, #0 - mov r3, #1 - bl ov21_021D47F0 - add r0, r4, #0 - bl ov21_021D1EEC - add r0, r4, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021D1084: .word 0x00001D10 -_021D1088: .word 0x00001A0C -_021D108C: .word 0x00001A10 -_021D1090: .word 0x00001A14 -_021D1094: .word 0x00001A18 -_021D1098: .word 0x00001D04 -_021D109C: .word 0x00001D08 -_021D10A0: .word 0x00001D0C -_021D10A4: .word 0x0000177C -_021D10A8: .word 0x00001A30 -_021D10AC: .word 0x021E9B74 -_021D10B0: .word 0x021E9B34 -_021D10B4: .word 0x00001A1C - thumb_func_end ov21_021D0F60 - - thumb_func_start ov21_021D10B8 -ov21_021D10B8: ; 0x021D10B8 - push {r4, lr} - add r4, r0, #0 - bne _021D10C2 - bl sub_02022974 -_021D10C2: - add r0, r4, #0 - add r0, #0xc - bl ov21_021D3960 - ldr r0, _021D128C ; =0x00001A14 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1126 - ldr r0, _021D1290 ; =0x00001A0C - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1126 - ldr r0, _021D1294 ; =0x00001A18 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1126 - ldr r0, _021D1298 ; =0x00001A10 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1126 - ldr r0, _021D129C ; =0x00001D08 - mov r1, #0 - ldr r0, [r4, r0] - bl ov21_021D4194 - ldr r0, _021D12A0 ; =0x00001D0C - mov r1, #0 - ldr r0, [r4, r0] - bl ov21_021D4194 - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r4, r0] - mov r1, #0 - bl ov21_021D4194 - ldr r0, _021D12A4 ; =0x00001D04 - mov r1, #0 - ldr r0, [r4, r0] - bl ov21_021D4194 - b _021D1150 -_021D1126: - ldr r0, _021D129C ; =0x00001D08 - mov r1, #1 - ldr r0, [r4, r0] - bl ov21_021D4194 - ldr r0, _021D12A0 ; =0x00001D0C - mov r1, #1 - ldr r0, [r4, r0] - bl ov21_021D4194 - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r4, r0] - mov r1, #1 - bl ov21_021D4194 - ldr r0, _021D12A4 ; =0x00001D04 - mov r1, #1 - ldr r0, [r4, r0] - bl ov21_021D4194 -_021D1150: - ldr r0, _021D129C ; =0x00001D08 - ldr r0, [r4, r0] - bl ov21_021D4078 - ldr r0, _021D12A0 ; =0x00001D0C - ldr r0, [r4, r0] - bl ov21_021D4078 - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r4, r0] - bl ov21_021D4078 - ldr r0, _021D12A4 ; =0x00001D04 - ldr r0, [r4, r0] - bl ov21_021D4078 - ldr r0, _021D129C ; =0x00001D08 - ldr r0, [r4, r0] - bl ov21_021D4100 - ldr r0, _021D12A0 ; =0x00001D0C - ldr r0, [r4, r0] - bl ov21_021D4100 - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r4, r0] - bl ov21_021D4100 - ldr r0, _021D12A4 ; =0x00001D04 - ldr r0, [r4, r0] - bl ov21_021D4100 - ldr r0, _021D1290 ; =0x00001A0C - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D11C4 - ldr r0, _021D1294 ; =0x00001A18 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D11C4 - ldr r0, _021D1298 ; =0x00001A10 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D11C4 - ldr r1, _021D128C ; =0x00001A14 - ldr r0, [r4, r1] - sub r1, #0x10 - ldr r1, [r4, r1] - bl ov21_021D4284 -_021D11C4: - ldr r0, _021D128C ; =0x00001A14 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D11F4 - ldr r0, _021D1294 ; =0x00001A18 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D11F4 - ldr r0, _021D1298 ; =0x00001A10 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D11F4 - ldr r1, _021D1290 ; =0x00001A0C - ldr r0, [r4, r1] - sub r1, #0x10 - ldr r1, [r4, r1] - bl ov21_021D4284 -_021D11F4: - ldr r0, _021D128C ; =0x00001A14 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1224 - ldr r0, _021D1290 ; =0x00001A0C - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1224 - ldr r0, _021D1298 ; =0x00001A10 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1224 - ldr r1, _021D1294 ; =0x00001A18 - ldr r0, [r4, r1] - sub r1, #0x10 - ldr r1, [r4, r1] - bl ov21_021D4284 -_021D1224: - ldr r0, _021D128C ; =0x00001A14 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1254 - ldr r0, _021D1290 ; =0x00001A0C - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1254 - ldr r0, _021D1294 ; =0x00001A18 - ldr r0, [r4, r0] - bl ov21_021D42D4 - cmp r0, #0 - bne _021D1254 - ldr r1, _021D1298 ; =0x00001A10 - ldr r0, [r4, r1] - sub r1, #0x10 - ldr r1, [r4, r1] - bl ov21_021D4284 -_021D1254: - bl sub_020241B4 - ldr r0, _021D12A8 ; =0x0000177C - add r0, r4, r0 - bl ov21_021D2124 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - ldr r1, _021D12AC ; =0x00001A04 - mov r0, #0 - str r0, [r4, r1] - add r2, r1, #4 - str r0, [r4, r2] - add r2, r1, #0 - sub r2, #8 - str r0, [r4, r2] - sub r1, r1, #4 - str r0, [r4, r1] - ldr r1, [r4, #0] - cmp r1, #1 - bne _021D128A - add r0, r4, #0 - bl ov21_021D1D08 - mov r0, #1 -_021D128A: - pop {r4, pc} - ; .align 2, 0 -_021D128C: .word 0x00001A14 -_021D1290: .word 0x00001A0C -_021D1294: .word 0x00001A18 -_021D1298: .word 0x00001A10 -_021D129C: .word 0x00001D08 -_021D12A0: .word 0x00001D0C -_021D12A4: .word 0x00001D04 -_021D12A8: .word 0x0000177C -_021D12AC: .word 0x00001A04 - thumb_func_end ov21_021D10B8 - - thumb_func_start ov21_021D12B0 -ov21_021D12B0: ; 0x021D12B0 - push {r4, lr} - add r4, r0, #0 - bl ov21_021D1E74 - add r0, r4, #0 - bl ov21_021D1E94 - bl ov21_021D1F10 - pop {r4, pc} - thumb_func_end ov21_021D12B0 - - thumb_func_start ov21_021D12C4 -ov21_021D12C4: ; 0x021D12C4 - push {r3, lr} - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - bl ov21_021D1F84 - pop {r3, pc} - thumb_func_end ov21_021D12C4 - - thumb_func_start ov21_021D12D8 -ov21_021D12D8: ; 0x021D12D8 - push {r3, lr} - ldr r1, _021D12E8 ; =0x0000177C - add r0, r0, r1 - bl ov21_021D214C - bl sub_0200A858 - pop {r3, pc} - ; .align 2, 0 -_021D12E8: .word 0x0000177C - thumb_func_end ov21_021D12D8 - - thumb_func_start ov21_021D12EC -ov21_021D12EC: ; 0x021D12EC - push {r4, lr} - add r4, r0, #0 - bne _021D12F6 - bl sub_02022974 -_021D12F6: - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D12EC - - thumb_func_start ov21_021D1300 -ov21_021D1300: ; 0x021D1300 - push {r4, lr} - add r4, r0, #0 - bne _021D130A - bl sub_02022974 -_021D130A: - ldr r0, _021D1310 ; =0x00001D04 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D1310: .word 0x00001D04 - thumb_func_end ov21_021D1300 - - thumb_func_start ov21_021D1314 -ov21_021D1314: ; 0x021D1314 - push {r4, lr} - add r4, r0, #0 - bne _021D131E - bl sub_02022974 -_021D131E: - ldr r0, _021D1324 ; =0x00001D08 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D1324: .word 0x00001D08 - thumb_func_end ov21_021D1314 - - thumb_func_start ov21_021D1328 -ov21_021D1328: ; 0x021D1328 - push {r4, lr} - add r4, r0, #0 - bne _021D1332 - bl sub_02022974 -_021D1332: - ldr r0, _021D1338 ; =0x00001D0C - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D1338: .word 0x00001D0C - thumb_func_end ov21_021D1328 - - thumb_func_start ov21_021D133C -ov21_021D133C: ; 0x021D133C - push {r4, lr} - add r4, r0, #0 - bne _021D1346 - bl sub_02022974 -_021D1346: - ldr r0, _021D134C ; =0x00001A0C - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D134C: .word 0x00001A0C - thumb_func_end ov21_021D133C - - thumb_func_start ov21_021D1350 -ov21_021D1350: ; 0x021D1350 - push {r4, lr} - add r4, r0, #0 - bne _021D135A - bl sub_02022974 -_021D135A: - ldr r0, _021D1360 ; =0x00001A10 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D1360: .word 0x00001A10 - thumb_func_end ov21_021D1350 - - thumb_func_start ov21_021D1364 -ov21_021D1364: ; 0x021D1364 - push {r4, lr} - add r4, r0, #0 - bne _021D136E - bl sub_02022974 -_021D136E: - ldr r0, _021D1374 ; =0x00001A14 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D1374: .word 0x00001A14 - thumb_func_end ov21_021D1364 - - thumb_func_start ov21_021D1378 -ov21_021D1378: ; 0x021D1378 - push {r4, lr} - add r4, r0, #0 - bne _021D1382 - bl sub_02022974 -_021D1382: - ldr r0, _021D1388 ; =0x00001A18 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D1388: .word 0x00001A18 - thumb_func_end ov21_021D1378 - - thumb_func_start ov21_021D138C -ov21_021D138C: ; 0x021D138C - push {r4, lr} - add r4, r0, #0 - bne _021D1396 - bl sub_02022974 -_021D1396: - ldr r0, _021D139C ; =0x000019FC - add r0, r4, r0 - pop {r4, pc} - ; .align 2, 0 -_021D139C: .word 0x000019FC - thumb_func_end ov21_021D138C - - thumb_func_start ov21_021D13A0 -ov21_021D13A0: ; 0x021D13A0 - push {r4, lr} - add r4, r0, #0 - bne _021D13AA - bl sub_02022974 -_021D13AA: - mov r0, #0x1a - lsl r0, r0, #8 - add r0, r4, r0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D13A0 - - thumb_func_start ov21_021D13B4 -ov21_021D13B4: ; 0x021D13B4 - push {r4, lr} - add r4, r0, #0 - bne _021D13BE - bl sub_02022974 -_021D13BE: - ldr r0, _021D13C4 ; =0x00001A04 - add r0, r4, r0 - pop {r4, pc} - ; .align 2, 0 -_021D13C4: .word 0x00001A04 - thumb_func_end ov21_021D13B4 - - thumb_func_start ov21_021D13C8 -ov21_021D13C8: ; 0x021D13C8 - push {r4, lr} - add r4, r0, #0 - bne _021D13D2 - bl sub_02022974 -_021D13D2: - ldr r0, _021D13D8 ; =0x00001A08 - add r0, r4, r0 - pop {r4, pc} - ; .align 2, 0 -_021D13D8: .word 0x00001A08 - thumb_func_end ov21_021D13C8 - - thumb_func_start ov21_021D13DC -ov21_021D13DC: ; 0x021D13DC - push {r4, lr} - add r4, r0, #0 - bne _021D13E6 - bl sub_02022974 -_021D13E6: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D13DC - - thumb_func_start ov21_021D13EC -ov21_021D13EC: ; 0x021D13EC - push {r4, lr} - add r4, r0, #0 - bne _021D13F6 - bl sub_02022974 -_021D13F6: - add r4, #0xc - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov21_021D13EC - - thumb_func_start ov21_021D13FC -ov21_021D13FC: ; 0x021D13FC - push {r4, lr} - add r4, r0, #0 - bne _021D1406 - bl sub_02022974 -_021D1406: - ldr r0, _021D140C ; =0x0000177C - add r0, r4, r0 - pop {r4, pc} - ; .align 2, 0 -_021D140C: .word 0x0000177C - thumb_func_end ov21_021D13FC - - thumb_func_start ov21_021D1410 -ov21_021D1410: ; 0x021D1410 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0xa - blt _021D141E - bl sub_02022974 -_021D141E: - ldr r0, _021D142C ; =0x00001A30 - add r1, r5, r0 - mov r0, #0x28 - mul r0, r4 - add r0, r1, r0 - pop {r3, r4, r5, pc} - nop -_021D142C: .word 0x00001A30 - thumb_func_end ov21_021D1410 - - thumb_func_start ov21_021D1430 -ov21_021D1430: ; 0x021D1430 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #8 - blt _021D143E - bl sub_02022974 -_021D143E: - mov r0, #0x6f - lsl r0, r0, #6 - add r1, r5, r0 - mov r0, #0x28 - mul r0, r4 - add r0, r1, r0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D1430 - - thumb_func_start ov21_021D144C -ov21_021D144C: ; 0x021D144C - push {r4, lr} - add r4, r0, #0 - cmp r1, #4 - bhi _021D1492 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D1460: ; jump table - .short _021D146A - _021D1460 - 2 ; case 0 - .short _021D147A - _021D1460 - 2 ; case 1 - .short _021D1472 - _021D1460 - 2 ; case 2 - .short _021D1482 - _021D1460 - 2 ; case 3 - .short _021D1482 - _021D1460 - 2 ; case 4 -_021D146A: - mov r1, #1 - bl sub_02021E50 - pop {r4, pc} -_021D1472: - mov r1, #2 - bl sub_02021E50 - pop {r4, pc} -_021D147A: - mov r1, #3 - bl sub_02021E50 - pop {r4, pc} -_021D1482: - bl sub_02021E74 - cmp r0, #0 - beq _021D1492 - ldr r1, _021D1494 ; =0xFFFFE000 - add r0, r4, #0 - bl sub_02021E2C -_021D1492: - pop {r4, pc} - ; .align 2, 0 -_021D1494: .word 0xFFFFE000 - thumb_func_end ov21_021D144C - - thumb_func_start ov21_021D1498 -ov21_021D1498: ; 0x021D1498 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r2, #0 - bl sub_02021E74 - cmp r0, #3 - bhi _021D1520 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D14B4: ; jump table - .short _021D14BC - _021D14B4 - 2 ; case 0 - .short _021D14D6 - _021D14B4 - 2 ; case 1 - .short _021D14F0 - _021D14B4 - 2 ; case 2 - .short _021D150A - _021D14B4 - 2 ; case 3 -_021D14BC: - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, sp, #0 - bl sub_020129A4 - str r5, [sp] - ldr r0, [r4, #0] - ldr r1, [sp, #4] - add r2, r5, #0 - bl sub_020128C4 - add sp, #8 - pop {r3, r4, r5, pc} -_021D14D6: - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, sp, #0 - bl sub_020129A4 - sub r2, r5, #2 - str r2, [sp] - ldr r0, [r4, #0] - ldr r1, [sp, #4] - bl sub_020128C4 - add sp, #8 - pop {r3, r4, r5, pc} -_021D14F0: - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, sp, #0 - bl sub_020129A4 - sub r2, r5, #4 - str r2, [sp] - ldr r0, [r4, #0] - ldr r1, [sp, #4] - bl sub_020128C4 - add sp, #8 - pop {r3, r4, r5, pc} -_021D150A: - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, sp, #0 - bl sub_020129A4 - sub r2, r5, #2 - str r2, [sp] - ldr r0, [r4, #0] - ldr r1, [sp, #4] - bl sub_020128C4 -_021D1520: - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D1498 - - thumb_func_start ov21_021D1524 -ov21_021D1524: ; 0x021D1524 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - bl ov21_021D1498 - add r0, r5, #0 - bl sub_02021E74 - cmp r0, #2 - ldr r0, [r4, #0] - bge _021D1544 - add r1, r6, #0 - bl sub_02012AC0 - pop {r4, r5, r6, pc} -_021D1544: - ldr r1, [sp, #0x10] - bl sub_02012AC0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D1524 - - thumb_func_start ov21_021D154C -ov21_021D154C: ; 0x021D154C - strb r1, [r0] - strb r2, [r0, #1] - ldr r1, [sp] - strb r3, [r0, #2] - strb r1, [r0, #3] - bx lr - thumb_func_end ov21_021D154C - - thumb_func_start ov21_021D1558 -ov21_021D1558: ; 0x021D1558 - str r1, [r0, #0] - str r2, [r0, #8] - ldr r2, [sp] - ldr r1, [sp, #4] - str r3, [r0, #4] - str r2, [r0, #0xc] - sub r1, r1, r2 - str r1, [r0, #0x14] - ldr r2, [sp, #8] - ldr r1, [sp, #0xc] - str r2, [r0, #0x10] - sub r1, r1, r2 - str r1, [r0, #0x18] - ldr r1, [sp, #0x10] - str r1, [r0, #0x20] - mov r1, #0 - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov21_021D1558 - - thumb_func_start ov21_021D157C -ov21_021D157C: ; 0x021D157C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r1, [r5, #0x1c] - ldr r0, [r5, #0x20] - cmp r1, r0 - bgt _021D1648 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - ldr r1, [r5, #8] - ldr r0, [r5, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02019CB8 - ldr r1, [r5, #0x14] - ldr r6, [r5, #0x1c] - add r0, r1, #0 - ldr r4, [r5, #0x20] - mul r0, r6 - add r1, r4, #0 - bl sub_020E1F6C - ldr r1, [r5, #0x18] - add r7, r0, #0 - add r0, r1, #0 - mul r0, r6 - add r1, r4, #0 - bl sub_020E1F6C - ldr r1, [r5, #0xc] - ldr r2, [r5, #0x10] - add r1, r7, r1 - add r4, r0, r2 - cmp r1, #0 - ble _021D1600 - mov r0, #0x20 - lsl r2, r1, #0x18 - str r0, [sp] - lsr r2, r2, #0x18 - str r2, [sp, #4] - ldr r2, [r5, #4] - sub r1, r0, r1 - add r2, #0xc - str r2, [sp, #8] - mov r2, #0 - lsl r1, r1, #0x18 - str r2, [sp, #0xc] - lsr r1, r1, #0x18 - str r1, [sp, #0x10] - str r0, [sp, #0x14] - str r0, [sp, #0x18] - ldr r1, [r5, #8] - ldr r0, [r5, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_020198E8 -_021D1600: - mov r0, #0x20 - sub r3, r0, r4 - cmp r3, #0 - ble _021D1630 - lsl r1, r4, #0x18 - str r0, [sp] - lsr r1, r1, #0x18 - str r1, [sp, #4] - ldr r1, [r5, #4] - mov r2, #0 - add r1, #0xc - str r1, [sp, #8] - str r2, [sp, #0xc] - str r2, [sp, #0x10] - str r0, [sp, #0x14] - str r0, [sp, #0x18] - ldr r1, [r5, #8] - lsl r3, r3, #0x18 - lsl r1, r1, #0x18 - ldr r0, [r5, #0] - lsr r1, r1, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 -_021D1630: - ldr r1, [r5, #8] - ldr r0, [r5, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201C3C0 - ldr r0, [r5, #0x1c] - add sp, #0x1c - add r0, r0, #1 - str r0, [r5, #0x1c] - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D1648: - mov r0, #1 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D157C - - thumb_func_start ov21_021D1650 -ov21_021D1650: ; 0x021D1650 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r6, r0, #0 - add r4, r3, #0 - str r2, [sp, #0x10] - cmp r5, #0 - ble _021D167A - mov r0, #4 - add r1, r4, #0 - bl sub_02023790 - mov r1, #1 - str r1, [sp] - add r1, r5, #0 - mov r2, #3 - mov r3, #2 - add r7, r0, #0 - bl sub_020238A0 - b _021D1684 -_021D167A: - mov r0, #0x64 - add r1, r4, #0 - bl ov21_021D1CE0 - add r7, r0, #0 -_021D1684: - ldr r0, [sp, #0x10] - mov r1, #2 - add r2, r4, #0 - bl ov21_021D561C - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D16D4 ; =0x00030201 - add r2, r7, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r6, #0 - mov r1, #2 - mov r3, #0x16 - bl sub_0201D78C - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D16D4 ; =0x00030201 - add r2, r4, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r6, #0 - mov r1, #2 - mov r3, #0x31 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl ov21_021D5600 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D16D4: .word 0x00030201 - thumb_func_end ov21_021D1650 - - thumb_func_start ov21_021D16D8 -ov21_021D16D8: ; 0x021D16D8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021D36D8 - cmp r0, #0 - bne _021D16FA - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021D172C - pop {r4, r5, r6, pc} -_021D16FA: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021D170C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D16D8 - - thumb_func_start ov21_021D170C -ov21_021D170C: ; 0x021D170C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - mov r1, #0xf - mov r2, #2 - bl ov21_021D4D6C - add r1, r6, #0 - add r2, r6, #0 - add r3, r5, #0 - add r4, r0, #0 - bl ov21_021D1650 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D170C - - thumb_func_start ov21_021D172C -ov21_021D172C: ; 0x021D172C - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - add r6, r0, #0 - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - add r7, r1, #0 - bl sub_020775A4 - ldr r1, _021D1774 ; =0x00000179 - add r4, r0, #0 - cmp r5, r1 - beq _021D1758 - add r0, r1, #1 - cmp r5, r0 - beq _021D1758 - add r0, r1, #2 - cmp r5, r0 - beq _021D1758 - cmp r4, #0 - bgt _021D1758 - bl sub_02022974 -_021D1758: - add r0, r6, #0 - mov r1, #0xf - mov r2, #2 - bl ov21_021D4D6C - add r1, r4, #0 - add r2, r5, #0 - add r3, r7, #0 - add r6, r0, #0 - bl ov21_021D1650 - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1774: .word 0x00000179 - thumb_func_end ov21_021D172C - - thumb_func_start ov21_021D1778 -ov21_021D1778: ; 0x021D1778 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r7, r1, #0 - add r5, r0, #0 - add r4, r3, #0 - add r0, r7, #0 - str r2, [sp, #4] - bl ov21_021D36D8 - str r0, [sp, #8] - add r0, r7, #0 - add r1, r4, #0 - bl ov21_021D37DC - add r4, r0, #0 - add r0, r5, #0 - bl ov21_021D22A8 - add r6, r0, #0 - add r0, r5, #0 - bl ov21_021D22C4 - str r0, [sp, #0xc] - ldr r0, [sp, #0x58] - add r1, sp, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x5c] - str r0, [sp, #0x14] - add r0, r6, #0 - bl sub_02021C50 - add r0, r6, #0 - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #4] - cmp r0, #2 - bne _021D17E4 - mov r0, #0x36 - ldr r1, [sp, #0x58] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x5c] - add r1, sp, #0x10 - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - bl sub_02021C50 - ldr r0, [sp, #0xc] - mov r1, #1 - bl sub_02021CAC - b _021D17EC -_021D17E4: - ldr r0, [sp, #0xc] - mov r1, #0 - bl sub_02021CAC -_021D17EC: - add r0, r5, #0 - mov r1, #1 - bl ov21_021D2344 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r5, r1] - str r1, [sp, #0x1c] - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #0x24] - mov r0, #0x3f - mvn r0, r0 - str r0, [sp, #0x2c] - add r0, #0x38 - str r0, [sp, #0x30] - mov r0, #0 - str r0, [sp, #0x34] - str r0, [sp, #0x38] - mov r0, #1 - str r0, [sp, #0x3c] - ldr r0, [sp, #4] - str r6, [sp, #0x28] - str r0, [sp, #0x40] - ldr r2, [sp, #4] - ldr r3, [r4, #0] - add r0, r5, #0 - add r1, r7, #0 - bl ov21_021D16D8 - add r6, r0, #0 - ldr r0, [sp, #8] - str r6, [sp, #0x20] - str r0, [sp] - ldr r3, [r4, #0] - add r0, r5, #0 - add r1, sp, #0x1c - mov r2, #0 - bl ov21_021D22E0 - add r0, r6, #0 - bl ov21_021D4DA0 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021D1778 - - thumb_func_start ov21_021D1848 -ov21_021D1848: ; 0x021D1848 - mov r3, #0x6d - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _021D1854 ; =ov21_021D1858 - bx r3 - nop -_021D1854: .word ov21_021D1858 - thumb_func_end ov21_021D1848 - - thumb_func_start ov21_021D1858 -ov21_021D1858: ; 0x021D1858 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - lsl r0, r1, #0xc - str r0, [sp] - lsl r0, r2, #0xc - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0 - bl sub_02021C50 - mov r0, #0x36 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #4] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #8] - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D188C - bl sub_02012938 -_021D188C: - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov21_021D1858 - - thumb_func_start ov21_021D1890 -ov21_021D1890: ; 0x021D1890 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r2, #0 - ldr r2, _021D19D4 ; =0x000001A6 - add r7, r3, #0 - ldr r4, [sp, #0x28] - ldr r3, [sp, #0x2c] - cmp r5, r2 - bgt _021D18D8 - bge _021D1944 - add r6, r2, #0 - sub r6, #0x24 - cmp r5, r6 - bgt _021D18B8 - sub r2, #0x24 - cmp r5, r2 - bge _021D196C - cmp r5, #0xc9 - beq _021D1908 - b _021D19BC -_021D18B8: - add r6, r2, #0 - sub r6, #9 - cmp r5, r6 - bgt _021D19BC - add r6, r2, #0 - sub r6, #0xa - cmp r5, r6 - blt _021D19BC - add r6, r2, #0 - sub r6, #0xa - cmp r5, r6 - beq _021D191C - sub r2, #9 - cmp r5, r2 - beq _021D1930 - b _021D19BC -_021D18D8: - add r6, r2, #0 - add r6, #0x39 - cmp r5, r6 - bgt _021D18F0 - add r6, r2, #0 - add r6, #0x39 - cmp r5, r6 - bge _021D19A8 - add r2, r2, #1 - cmp r5, r2 - beq _021D1958 - b _021D19BC -_021D18F0: - add r6, r2, #0 - add r6, #0x41 - cmp r5, r6 - bgt _021D1900 - add r2, #0x41 - cmp r5, r2 - beq _021D1994 - b _021D19BC -_021D1900: - add r2, #0x46 - cmp r5, r2 - beq _021D1980 - b _021D19BC -_021D1908: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1A34 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D191C: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1B08 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D1930: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1B4C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D1944: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1A78 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D1958: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1AC0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D196C: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1B94 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D1980: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1BD8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D1994: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1C30 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D19A8: - str r3, [sp] - mov r2, #0 - str r2, [sp, #4] - str r2, [sp, #8] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D1C88 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D19BC: - str r4, [sp] - str r3, [sp, #4] - mov r2, #0 - str r2, [sp, #8] - str r2, [sp, #0xc] - add r2, r5, #0 - add r3, r7, #0 - bl ov21_021D19D8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D19D4: .word 0x000001A6 - thumb_func_end ov21_021D1890 - - thumb_func_start ov21_021D19D8 -ov21_021D19D8: ; 0x021D19D8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - ldr r0, _021D1A30 ; =0x00000147 - add r5, r2, #0 - add r6, r1, #0 - mov r4, #0 - str r3, [sp, #0x18] - cmp r5, r0 - bne _021D19F4 - add r0, r6, #0 - bl ov21_021D33F8 - add r4, r0, #0 -_021D19F4: - ldr r2, [sp, #0x38] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021D334C - add r6, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _021D1A28 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x30] - str r4, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x34] - ldr r3, [sp, #0x18] - str r0, [sp, #0x10] - ldr r0, [sp, #0x3c] - add r1, r5, #0 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r6, #0 - bl ov21_021D2188 -_021D1A28: - add r0, r6, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D1A30: .word 0x00000147 - thumb_func_end ov21_021D19D8 - - thumb_func_start ov21_021D1A34 -ov21_021D1A34: ; 0x021D1A34 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, r1, #0 - ldr r1, [sp, #0x34] - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D335C - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D1A72 - mov r1, #0 - lsl r0, r4, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - mov r1, #0xc9 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r2, #2 - add r3, r7, #0 - bl ov21_021D2188 -_021D1A72: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D1A34 - - thumb_func_start ov21_021D1A78 -ov21_021D1A78: ; 0x021D1A78 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, r1, #0 - ldr r1, [sp, #0x34] - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D3374 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D1AB4 - mov r2, #0 - lsl r0, r4, #0x18 - str r2, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r2, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, _021D1ABC ; =0x000001A6 - str r0, [sp, #0x14] - add r0, r6, #0 - add r3, r7, #0 - bl ov21_021D2188 -_021D1AB4: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1ABC: .word 0x000001A6 - thumb_func_end ov21_021D1A78 - - thumb_func_start ov21_021D1AC0 -ov21_021D1AC0: ; 0x021D1AC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, r1, #0 - ldr r1, [sp, #0x34] - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D338C - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D1AFC - mov r2, #0 - lsl r0, r4, #0x18 - str r2, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r2, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, _021D1B04 ; =0x000001A7 - str r0, [sp, #0x14] - add r0, r6, #0 - add r3, r7, #0 - bl ov21_021D2188 -_021D1AFC: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1B04: .word 0x000001A7 - thumb_func_end ov21_021D1AC0 - - thumb_func_start ov21_021D1B08 -ov21_021D1B08: ; 0x021D1B08 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, r1, #0 - ldr r1, [sp, #0x34] - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D33A4 - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D1B46 - mov r2, #0 - lsl r0, r4, #0x18 - str r2, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r2, [sp, #8] - mov r1, #0x67 - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - lsl r1, r1, #2 - str r0, [sp, #0x14] - add r0, r6, #0 - add r3, r7, #0 - bl ov21_021D2188 -_021D1B46: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D1B08 - - thumb_func_start ov21_021D1B4C -ov21_021D1B4C: ; 0x021D1B4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, r1, #0 - ldr r1, [sp, #0x34] - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D33BC - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D1B8A - mov r1, #0 - lsl r0, r4, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, _021D1B90 ; =0x0000019D - str r0, [sp, #0x14] - add r0, r6, #0 - mov r2, #1 - add r3, r7, #0 - bl ov21_021D2188 -_021D1B8A: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1B90: .word 0x0000019D - thumb_func_end ov21_021D1B4C - - thumb_func_start ov21_021D1B94 -ov21_021D1B94: ; 0x021D1B94 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, r1, #0 - ldr r1, [sp, #0x34] - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D3404 - add r4, r0, #0 - cmp r4, #0xf - beq _021D1BCE - mov r1, #0 - lsl r0, r4, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, _021D1BD4 ; =0x00000182 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r2, #1 - add r3, r7, #0 - bl ov21_021D2188 -_021D1BCE: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1BD4: .word 0x00000182 - thumb_func_end ov21_021D1B94 - - thumb_func_start ov21_021D1BD8 -ov21_021D1BD8: ; 0x021D1BD8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - mov r1, #0x7b - add r6, r0, #0 - add r0, r4, #0 - lsl r1, r1, #2 - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D341C - ldr r2, [sp, #0x34] - cmp r0, r2 - ble _021D1C26 - mov r1, #0x7b - add r0, r4, #0 - lsl r1, r1, #2 - bl ov21_021D3410 - add r4, r0, #0 - mov r1, #0 - lsl r0, r4, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #0x7b - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - lsl r1, r1, #2 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r2, #1 - add r3, r7, #0 - bl ov21_021D2188 - b _021D1C2A -_021D1C26: - mov r4, #0 - mvn r4, r4 -_021D1C2A: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D1BD8 - - thumb_func_start ov21_021D1C30 -ov21_021D1C30: ; 0x021D1C30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r6, r0, #0 - ldr r1, _021D1C84 ; =0x000001E7 - add r0, r4, #0 - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D341C - ldr r2, [sp, #0x34] - cmp r0, r2 - ble _021D1C78 - ldr r1, _021D1C84 ; =0x000001E7 - add r0, r4, #0 - bl ov21_021D3410 - add r4, r0, #0 - mov r1, #0 - lsl r0, r4, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, _021D1C84 ; =0x000001E7 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r2, #1 - add r3, r7, #0 - bl ov21_021D2188 - b _021D1C7C -_021D1C78: - mov r4, #0 - mvn r4, r4 -_021D1C7C: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1C84: .word 0x000001E7 - thumb_func_end ov21_021D1C30 - - thumb_func_start ov21_021D1C88 -ov21_021D1C88: ; 0x021D1C88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r6, r0, #0 - ldr r1, _021D1CDC ; =0x000001DF - add r0, r4, #0 - add r7, r2, #0 - add r5, r3, #0 - bl ov21_021D341C - ldr r2, [sp, #0x34] - cmp r0, r2 - ble _021D1CD0 - ldr r1, _021D1CDC ; =0x000001DF - add r0, r4, #0 - bl ov21_021D3410 - add r4, r0, #0 - mov r1, #0 - lsl r0, r4, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [sp, #0x30] - str r5, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, _021D1CDC ; =0x000001DF - str r0, [sp, #0x14] - add r0, r6, #0 - mov r2, #1 - add r3, r7, #0 - bl ov21_021D2188 - b _021D1CD4 -_021D1CD0: - mov r4, #0 - mvn r4, r4 -_021D1CD4: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1CDC: .word 0x000001DF - thumb_func_end ov21_021D1C88 - - thumb_func_start ov21_021D1CE0 -ov21_021D1CE0: ; 0x021D1CE0 - push {r3, r4, r5, lr} - ldr r2, _021D1D04 ; =0x000002B9 - add r4, r0, #0 - add r3, r1, #0 - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - add r5, r0, #0 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - bl sub_0200B190 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1D04: .word 0x000002B9 - thumb_func_end ov21_021D1CE0 - - thumb_func_start ov21_021D1D08 -ov21_021D1D08: ; 0x021D1D08 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _021D1E44 ; =0x00001A1C - add r0, r6, r0 - bl ov21_021D4660 - ldr r0, _021D1E48 ; =0x00001A0C - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D20 - bl sub_02022974 -_021D1D20: - ldr r0, _021D1E48 ; =0x00001A0C - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E4C ; =0x00001A10 - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D34 - bl sub_02022974 -_021D1D34: - ldr r0, _021D1E4C ; =0x00001A10 - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E50 ; =0x00001A14 - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D48 - bl sub_02022974 -_021D1D48: - ldr r0, _021D1E50 ; =0x00001A14 - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E54 ; =0x00001A18 - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D5C - bl sub_02022974 -_021D1D5C: - ldr r0, _021D1E54 ; =0x00001A18 - ldr r0, [r6, r0] - bl sub_020181C4 - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D72 - bl sub_02022974 -_021D1D72: - mov r0, #0x1d - lsl r0, r0, #8 - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E58 ; =0x00001D04 - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D88 - bl sub_02022974 -_021D1D88: - ldr r0, _021D1E58 ; =0x00001D04 - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E5C ; =0x00001D08 - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1D9C - bl sub_02022974 -_021D1D9C: - ldr r0, _021D1E5C ; =0x00001D08 - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E60 ; =0x00001D0C - ldr r0, [r6, r0] - cmp r0, #0 - bne _021D1DB0 - bl sub_02022974 -_021D1DB0: - ldr r0, _021D1E60 ; =0x00001D0C - ldr r0, [r6, r0] - bl sub_020181C4 - ldr r0, _021D1E64 ; =0x00001A30 - ldr r4, _021D1E68 ; =0x021E9B9C - mov r7, #0 - add r5, r6, r0 -_021D1DC0: - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D1DCA - add r0, r5, #0 - blx r1 -_021D1DCA: - add r7, r7, #1 - add r4, r4, #4 - add r5, #0x28 - cmp r7, #0xa - blt _021D1DC0 - mov r0, #0x6f - lsl r0, r0, #6 - ldr r4, _021D1E6C ; =0x021E9B54 - mov r7, #0 - add r5, r6, r0 -_021D1DDE: - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D1DE8 - add r0, r5, #0 - blx r1 -_021D1DE8: - add r7, r7, #1 - add r4, r4, #4 - add r5, #0x28 - cmp r7, #8 - blt _021D1DDE - add r0, r6, #0 - add r0, #0xc - bl ov21_021D3440 - add r1, r0, #0 - ldr r0, [r6, #8] - bl sub_0209ACE8 - add r0, r6, #0 - add r0, #0xc - mov r1, #1 - bl ov21_021D36A4 - cmp r0, #1 - bne _021D1E22 - add r0, r6, #0 - add r0, #0xc - bl ov21_021D3458 - add r1, r0, #0 - ldr r0, [r6, #8] - bl sub_0209ACF0 - b _021D1E2A -_021D1E22: - ldr r0, [r6, #8] - mov r1, #2 - bl sub_0209ACF0 -_021D1E2A: - add r0, r6, #0 - add r0, #0xc - bl ov21_021D3320 - ldr r0, _021D1E70 ; =0x0000177C - add r0, r6, r0 - bl ov21_021D2098 - add r0, r6, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1E44: .word 0x00001A1C -_021D1E48: .word 0x00001A0C -_021D1E4C: .word 0x00001A10 -_021D1E50: .word 0x00001A14 -_021D1E54: .word 0x00001A18 -_021D1E58: .word 0x00001D04 -_021D1E5C: .word 0x00001D08 -_021D1E60: .word 0x00001D0C -_021D1E64: .word 0x00001A30 -_021D1E68: .word 0x021E9B9C -_021D1E6C: .word 0x021E9B54 -_021D1E70: .word 0x0000177C - thumb_func_end ov21_021D1D08 - - thumb_func_start ov21_021D1E74 -ov21_021D1E74: ; 0x021D1E74 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D1E90 ; =0x021E9BC4 - add r3, sp, #0 - mov r2, #5 -_021D1E7E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D1E7E - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D1E90: .word 0x021E9BC4 - thumb_func_end ov21_021D1E74 - - thumb_func_start ov21_021D1E94 -ov21_021D1E94: ; 0x021D1E94 - push {r4, r5, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x80 - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - add r2, r0, #0 - str r4, [sp, #0x10] - bl sub_0200A784 - ldr r5, _021D1EE4 ; =0x021E9B24 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - ldr r1, _021D1EE8 ; =0x00200010 - mov r2, #0x10 - str r4, [sp, #0x20] - bl sub_0201E88C - mov r0, #0x20 - add r1, r4, #0 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x24 - pop {r4, r5, pc} - nop -_021D1EE4: .word 0x021E9B24 -_021D1EE8: .word 0x00200010 - thumb_func_end ov21_021D1E94 - - thumb_func_start ov21_021D1EEC -ov21_021D1EEC: ; 0x021D1EEC - push {r4, lr} - ldr r1, _021D1F08 ; =0x00001A0C - add r4, r0, #0 - ldr r0, [r4, r1] - add r1, #0x10 - add r1, r4, r1 - mov r2, #1 - bl ov21_021D426C - ldr r0, _021D1F0C ; =0x000019FC - mov r1, #1 - str r1, [r4, r0] - pop {r4, pc} - nop -_021D1F08: .word 0x00001A0C -_021D1F0C: .word 0x000019FC - thumb_func_end ov21_021D1EEC - - thumb_func_start ov21_021D1F10 -ov21_021D1F10: ; 0x021D1F10 - push {r3, lr} - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _021D1F70 ; =0x04000060 - ldr r2, _021D1F74 ; =0xFFFFCFFD - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - ldrh r3, [r0] - add r1, r2, #2 - and r3, r1 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0] - ldr r1, _021D1F78 ; =0x0000CFFB - and r1, r3 - strh r1, [r0] - add r1, r2, #2 - ldrh r3, [r0] - lsr r2, r2, #0x11 - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _021D1F7C ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _021D1F80 ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - pop {r3, pc} - ; .align 2, 0 -_021D1F70: .word 0x04000060 -_021D1F74: .word 0xFFFFCFFD -_021D1F78: .word 0x0000CFFB -_021D1F7C: .word 0x04000540 -_021D1F80: .word 0xBFFF0000 - thumb_func_end ov21_021D1F10 - - thumb_func_start ov21_021D1F84 -ov21_021D1F84: ; 0x021D1F84 - push {r3, lr} - bl sub_020A5B1C - bl sub_020A5F50 - pop {r3, pc} - thumb_func_end ov21_021D1F84 - - thumb_func_start ov21_021D1F90 -ov21_021D1F90: ; 0x021D1F90 - mov r0, #0x46 - bx lr - thumb_func_end ov21_021D1F90 - - thumb_func_start ov21_021D1F94 -ov21_021D1F94: ; 0x021D1F94 - add r0, r0, #3 - bx lr - thumb_func_end ov21_021D1F94 - - thumb_func_start ov21_021D1F98 -ov21_021D1F98: ; 0x021D1F98 - mov r0, #0 - bx lr - thumb_func_end ov21_021D1F98 - - thumb_func_start ov21_021D1F9C -ov21_021D1F9C: ; 0x021D1F9C - mov r0, #2 - bx lr - thumb_func_end ov21_021D1F9C - - thumb_func_start ov21_021D1FA0 -ov21_021D1FA0: ; 0x021D1FA0 - mov r0, #1 - bx lr - thumb_func_end ov21_021D1FA0 - - thumb_func_start ov21_021D1FA4 -ov21_021D1FA4: ; 0x021D1FA4 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0x45 - add r4, r1, #0 - bl sub_02006C24 - mov r1, #0x9f - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r4, #0 - bl sub_02018340 - str r0, [r5, #0] - mov r1, #1 - mov r0, #0 - str r0, [sp, #0x14] - str r1, [sp, #0x10] - str r1, [sp, #0x18] - str r1, [sp, #0x1c] - add r0, sp, #0x10 - bl sub_02018368 - ldr r0, [r5, #0] - add r1, r4, #0 - bl ov21_021D2830 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D29D0 - add r1, r5, #0 - mov r0, #0x80 - add r1, #0x14 - add r2, r4, #0 - bl sub_020095C4 - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x20 - mov r1, #0 - add r2, r4, #0 - bl sub_02009714 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r0, #0x20 - mov r1, #1 - add r2, r4, #0 - bl sub_02009714 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x20 - mov r1, #2 - add r2, r4, #0 - bl sub_02009714 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x20 - mov r1, #3 - add r2, r4, #0 - bl sub_02009714 - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - str r0, [sp] - ldr r0, [r5, #0] - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - add r0, sp, #0 - str r4, [sp, #0xc] - bl ov21_021D4C0C - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #2 - add r1, r4, #0 - bl sub_02002BB8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D2A0C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D2AE8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D2C8C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D2E70 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D2F5C - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D1FA4 - - thumb_func_start ov21_021D2098 -ov21_021D2098: ; 0x021D2098 - push {r4, lr} - add r4, r0, #0 - bl ov21_021D2D4C - add r0, r4, #0 - bl ov21_021D2C10 - add r0, r4, #0 - bl ov21_021D300C - add r0, r4, #0 - bl ov21_021D2F14 - add r0, r4, #0 - bl ov21_021D2A00 - ldr r0, [r4, #0] - bl ov21_021D299C - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021964 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02009754 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02009754 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02009754 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02009754 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov21_021D4C6C - mov r0, #2 - bl sub_02002C60 - add r0, r4, #0 - bl ov21_021D2AB4 - mov r0, #0x9f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02006CA8 - mov r2, #0xa - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #6 - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov21_021D2098 - - thumb_func_start ov21_021D2124 -ov21_021D2124: ; 0x021D2124 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020219F8 - bl sub_020A73C0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02007768 - mov r0, #0x5a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020150EC - pop {r4, pc} - thumb_func_end ov21_021D2124 - - thumb_func_start ov21_021D214C -ov21_021D214C: ; 0x021D214C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0201C2B8 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02008A94 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D214C - - thumb_func_start ov21_021D2164 -ov21_021D2164: ; 0x021D2164 - push {r3, lr} - mov r3, #0 - bl ov21_021D222C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D2164 - - thumb_func_start ov21_021D2170 -ov21_021D2170: ; 0x021D2170 - ldr r3, _021D2178 ; =ov21_021D2274 - mov r1, #0 - bx r3 - nop -_021D2178: .word ov21_021D2274 - thumb_func_end ov21_021D2170 - - thumb_func_start ov21_021D217C -ov21_021D217C: ; 0x021D217C - ldr r3, _021D2184 ; =ov21_021D2280 - mov r2, #0 - bx r3 - nop -_021D2184: .word ov21_021D2280 - thumb_func_end ov21_021D217C - - thumb_func_start ov21_021D2188 -ov21_021D2188: ; 0x021D2188 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r1, #0 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [sp, #0x10] - add r7, r0, r1 - ldr r0, [sp, #0x54] - add r4, r2, #0 - lsl r0, r0, #2 - str r0, [sp, #0x14] - ldr r0, [r7, r0] - add r6, r3, #0 - cmp r0, #0 - beq _021D21AA - bl sub_02007DC8 -_021D21AA: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _021D21BE - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - mov r1, #0 - bl sub_02075DAC - add r4, r0, #0 -_021D21BE: - ldr r0, [sp, #0x40] - lsl r1, r5, #0x10 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - add r0, sp, #0x30 - ldrb r0, [r0, #0x14] - lsl r2, r4, #0x18 - lsl r3, r6, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x48] - lsr r1, r1, #0x10 - str r0, [sp, #8] - add r0, sp, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_02075FB4 - cmp r6, #0 - bne _021D2202 - ldr r0, [sp, #0x48] - lsl r1, r4, #0x18 - str r0, [sp] - add r3, sp, #0x30 - lsl r0, r5, #0x10 - lsl r2, r6, #0x18 - ldrb r3, [r3, #0x14] - lsr r0, r0, #0x10 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl sub_02076648 - add r3, r0, #0 - b _021D2204 -_021D2202: - mov r3, #0 -_021D2204: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r1, #0x55 - ldr r4, [sp, #0x50] - ldr r0, [sp, #0x10] - lsl r1, r1, #2 - ldr r0, [r0, r1] - ldr r2, [sp, #0x4c] - add r1, sp, #0x18 - add r3, r4, r3 - bl sub_02007C34 - ldr r1, [sp, #0x14] - str r0, [r7, r1] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D2188 - - thumb_func_start ov21_021D222C -ov21_021D222C: ; 0x021D222C - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x56 - lsl r1, r1, #2 - add r5, r0, r1 - lsl r4, r3, #2 - add r7, r2, #0 - ldr r0, [r5, r4] - mov r1, #0 - add r2, r6, #0 - bl sub_02007DEC - ldr r0, [r5, r4] - mov r1, #1 - add r2, r7, #0 - bl sub_02007DEC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D222C - - thumb_func_start ov21_021D2250 -ov21_021D2250: ; 0x021D2250 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x56 - lsl r1, r1, #2 - add r5, r0, r1 - lsl r4, r3, #2 - ldr r0, [r5, r4] - mov r1, #0 - add r7, r2, #0 - bl sub_020080C0 - str r0, [r6, #0] - ldr r0, [r5, r4] - mov r1, #1 - bl sub_020080C0 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D2250 - - thumb_func_start ov21_021D2274 -ov21_021D2274: ; 0x021D2274 - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bx lr - thumb_func_end ov21_021D2274 - - thumb_func_start ov21_021D2280 -ov21_021D2280: ; 0x021D2280 - push {r3, lr} - lsl r2, r2, #2 - add r2, r0, r2 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r2, r0] - cmp r0, #0 - beq _021D22A6 - cmp r1, #1 - bne _021D229E - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - pop {r3, pc} -_021D229E: - mov r1, #6 - mov r2, #1 - bl sub_02007DEC -_021D22A6: - pop {r3, pc} - thumb_func_end ov21_021D2280 - - thumb_func_start ov21_021D22A8 -ov21_021D22A8: ; 0x021D22A8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6d - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021D22BA - bl sub_02022974 -_021D22BA: - mov r0, #0x6d - lsl r0, r0, #2 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D22A8 - - thumb_func_start ov21_021D22C4 -ov21_021D22C4: ; 0x021D22C4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021D22D6 - bl sub_02022974 -_021D22D6: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D22C4 - - thumb_func_start ov21_021D22E0 -ov21_021D22E0: ; 0x021D22E0 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - mov r4, #0x6d - lsl r4, r4, #2 - add r0, r0, r4 - bl ov21_021D22F8 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D22E0 - - thumb_func_start ov21_021D22F8 -ov21_021D22F8: ; 0x021D22F8 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x28] - add r6, r1, #0 - add r4, r2, #0 - cmp r3, r0 - bne _021D231A - ldr r1, [sp, #0x10] - ldr r0, [r5, #0x2c] - cmp r1, r0 - bne _021D231A - ldr r0, [r5, #8] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_020129D0 - pop {r4, r5, r6, pc} -_021D231A: - ldr r0, [sp, #0x10] - str r3, [r5, #0x28] - str r0, [r5, #0x2c] - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D232A - bl ov21_021D4D1C -_021D232A: - cmp r4, #0 - beq _021D233A - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021D4CB8 - str r0, [r5, #8] - pop {r4, r5, r6, pc} -_021D233A: - add r0, r6, #0 - bl ov21_021D4CA0 - str r0, [r5, #8] - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D22F8 - - thumb_func_start ov21_021D2344 -ov21_021D2344: ; 0x021D2344 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #3 - ble _021D2352 - bl sub_02022974 -_021D2352: - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r1, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D2344 - - thumb_func_start ov21_021D2360 -ov21_021D2360: ; 0x021D2360 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x6d - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r4, r1, #0 - bl sub_02021FE0 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02021FE0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D2360 - - thumb_func_start ov21_021D238C -ov21_021D238C: ; 0x021D238C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x6d - add r4, r1, #0 - lsl r0, r0, #2 - lsl r1, r4, #0x18 - ldr r0, [r5, r0] - lsr r1, r1, #0x18 - bl sub_02021E80 - mov r0, #0x6e - lsl r0, r0, #2 - lsl r1, r4, #0x18 - ldr r0, [r5, r0] - lsr r1, r1, #0x18 - bl sub_02021E80 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r5, r0] - lsl r1, r4, #0x18 - ldr r0, [r0, #0] - lsr r1, r1, #0x18 - bl sub_02012A00 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D238C - - thumb_func_start ov21_021D23C0 -ov21_021D23C0: ; 0x021D23C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x6d - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r4, r1, #0 - cmp r0, #0 - beq _021D23D4 - bl sub_02021CAC -_021D23D4: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021D23E4 - add r1, r4, #0 - bl sub_02021CAC -_021D23E4: - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D23F6 - add r1, r4, #0 - bl sub_020129D0 -_021D23F6: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D23C0 - - thumb_func_start ov21_021D23F8 -ov21_021D23F8: ; 0x021D23F8 - push {r4, r5} - ldr r4, [sp, #0x18] - ldr r5, [sp, #0x14] - str r4, [r0, #0] - ldr r4, [sp, #0x10] - str r4, [r0, #4] - mov r4, #0x20 - orr r4, r5 - str r4, [r0, #8] - str r2, [r0, #0xc] - sub r2, r3, r2 - str r2, [r0, #0x10] - ldr r3, [sp, #8] - ldr r2, [sp, #0xc] - str r3, [r0, #0x14] - sub r2, r2, r3 - str r2, [r0, #0x18] - str r1, [r0, #0x1c] - mov r1, #0 - str r1, [r0, #0x20] - pop {r4, r5} - bx lr - thumb_func_end ov21_021D23F8 - - thumb_func_start ov21_021D2424 -ov21_021D2424: ; 0x021D2424 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - bl ov21_021D24EC - cmp r0, #0 - bne _021D2472 - add r0, r5, #0 - bl ov21_021D2484 - add r4, r0, #0 - add r0, r5, #0 - bl ov21_021D24B8 - ldr r1, [r5, #0] - cmp r1, #0 - bne _021D245A - mov r1, #0 - str r1, [sp] - str r0, [sp, #4] - ldr r0, _021D247C ; =0x04000050 - ldr r1, [r5, #4] - ldr r2, [r5, #8] - add r3, r4, #0 - bl sub_020BF5A0 - b _021D246C -_021D245A: - mov r1, #0 - str r1, [sp] - str r0, [sp, #4] - ldr r0, _021D2480 ; =0x04001050 - ldr r1, [r5, #4] - ldr r2, [r5, #8] - add r3, r4, #0 - bl sub_020BF5A0 -_021D246C: - ldr r0, [r5, #0x20] - add r0, r0, #1 - str r0, [r5, #0x20] -_021D2472: - add r0, r5, #0 - bl ov21_021D24EC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D247C: .word 0x04000050 -_021D2480: .word 0x04001050 - thumb_func_end ov21_021D2424 - - thumb_func_start ov21_021D2484 -ov21_021D2484: ; 0x021D2484 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - ldr r2, [r4, #0x20] - lsl r0, r0, #0xc - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r4, #0x1c] - lsl r1, r1, #0xc - bl sub_020BCFD0 - asr r1, r0, #0xc - ldr r0, [r4, #0x14] - add r0, r1, r0 - pop {r4, pc} - thumb_func_end ov21_021D2484 - - thumb_func_start ov21_021D24B8 -ov21_021D24B8: ; 0x021D24B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - ldr r2, [r4, #0x20] - lsl r0, r0, #0xc - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r4, #0x1c] - lsl r1, r1, #0xc - bl sub_020BCFD0 - asr r1, r0, #0xc - ldr r0, [r4, #0xc] - add r0, r1, r0 - pop {r4, pc} - thumb_func_end ov21_021D24B8 - - thumb_func_start ov21_021D24EC -ov21_021D24EC: ; 0x021D24EC - ldr r1, [r0, #0x20] - ldr r0, [r0, #0x1c] - cmp r1, r0 - ble _021D24F8 - mov r0, #1 - bx lr -_021D24F8: - mov r0, #0 - bx lr - thumb_func_end ov21_021D24EC - - thumb_func_start ov21_021D24FC -ov21_021D24FC: ; 0x021D24FC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - bl ov21_021D24B8 - neg r4, r0 - add r0, r5, #0 - bl ov21_021D2170 - mov r3, #0 - add r1, r4, #0 - add r2, r4, #0 - str r3, [sp] - bl sub_020086FC - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D24FC - - thumb_func_start ov21_021D251C -ov21_021D251C: ; 0x021D251C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r2, #0 - add r0, r1, #0 - bl ov21_021D24B8 - neg r6, r0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D2274 - mov r3, #0 - add r1, r6, #0 - add r2, r6, #0 - str r3, [sp] - bl sub_020086FC - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021D251C - - thumb_func_start ov21_021D2544 -ov21_021D2544: ; 0x021D2544 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021D4F94 - add r0, r5, #0 - add r1, sp, #8 - add r2, sp, #4 - bl ov21_021D4FBC - ldr r0, [sp, #4] - str r0, [sp] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov21_021D2574 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D2544 - - thumb_func_start ov21_021D2574 -ov21_021D2574: ; 0x021D2574 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - bl ov21_021D3124 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021D2574 - - thumb_func_start ov21_021D2584 -ov21_021D2584: ; 0x021D2584 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_021D258C: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021CAC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D258C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D2584 - - thumb_func_start ov21_021D25A0 -ov21_021D25A0: ; 0x021D25A0 - ldr r3, _021D25A8 ; =sub_02021D34 - ldr r0, [r0, #0] - bx r3 - nop -_021D25A8: .word sub_02021D34 - thumb_func_end ov21_021D25A0 - - thumb_func_start ov21_021D25AC -ov21_021D25AC: ; 0x021D25AC - str r1, [r0, #0x30] - cmp r1, #0 - bne _021D25B6 - mov r1, #0 - str r1, [r0, #0x34] -_021D25B6: - bx lr - thumb_func_end ov21_021D25AC - - thumb_func_start ov21_021D25B8 -ov21_021D25B8: ; 0x021D25B8 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021D4F94 - add r0, r5, #0 - add r1, sp, #8 - add r2, sp, #4 - bl ov21_021D4FBC - ldr r0, [sp, #4] - str r0, [sp] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov21_021D25E8 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D25B8 - - thumb_func_start ov21_021D25E8 -ov21_021D25E8: ; 0x021D25E8 - push {r3, r4, r5, r6, r7, lr} - add r7, r3, #0 - mov r3, #0x81 - add r4, r1, #0 - add r5, r0, #0 - lsl r3, r3, #2 - add r6, r2, #0 - str r4, [r5, r3] - add r0, r3, #4 - str r6, [r5, r0] - add r0, r3, #0 - add r0, #8 - str r7, [r5, r0] - add r0, r3, #0 - ldr r1, [sp, #0x18] - add r0, #0xc - str r1, [r5, r0] - add r0, r3, #0 - add r0, #0xc - ldr r0, [r5, r0] - add r2, r3, #4 - str r0, [sp] - add r0, r3, #0 - ldr r1, [r5, r3] - add r3, #8 - sub r0, #0x20 - ldr r2, [r5, r2] - ldr r3, [r5, r3] - add r0, r5, r0 - bl ov21_021D30D8 - mov r0, #0x26 - lsl r0, r0, #4 - str r4, [r5, r0] - add r1, r0, #4 - str r6, [r5, r1] - add r1, r0, #0 - add r1, #8 - str r7, [r5, r1] - add r1, r0, #0 - ldr r2, [sp, #0x18] - add r1, #0xc - str r2, [r5, r1] - mov r1, #0 - add r0, #0x10 - str r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D25E8 - - thumb_func_start ov21_021D2648 -ov21_021D2648: ; 0x021D2648 - str r1, [r0, #0] - str r3, [r0, #4] - str r1, [r0, #8] - str r3, [r0, #0xc] - sub r1, r2, r1 - str r1, [r0, #0x10] - ldr r1, [sp] - sub r1, r1, r3 - str r1, [r0, #0x14] - ldr r1, [sp, #4] - str r1, [r0, #0x1c] - mov r1, #0 - str r1, [r0, #0x18] - bx lr - thumb_func_end ov21_021D2648 - - thumb_func_start ov21_021D2664 -ov21_021D2664: ; 0x021D2664 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - ldr r2, [r5, #0x18] - lsl r0, r0, #0xc - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r5, #0x1c] - lsl r1, r1, #0xc - bl sub_020BCFD0 - add r4, r0, #0 - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x18] - lsl r0, r0, #0xc - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r5, #0x1c] - lsl r1, r1, #0xc - bl sub_020BCFD0 - ldr r1, [r5, #8] - asr r2, r4, #0xc - add r1, r2, r1 - str r1, [r5, #0] - asr r1, r0, #0xc - ldr r0, [r5, #0xc] - add r0, r1, r0 - str r0, [r5, #4] - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - add r0, r0, #1 - cmp r0, r1 - bgt _021D26DA - str r0, [r5, #0x18] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D26DA: - str r1, [r5, #0x18] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D2664 - - thumb_func_start ov21_021D26E0 -ov21_021D26E0: ; 0x021D26E0 - mov r1, #0x9f - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov21_021D26E0 - - thumb_func_start ov21_021D26E8 -ov21_021D26E8: ; 0x021D26E8 - push {r4, r5, r6, lr} - add r5, r2, #0 - mov r2, #0x9f - lsl r2, r2, #2 - add r6, r3, #0 - ldr r0, [r0, r2] - add r2, r6, #0 - bl sub_02006CB8 - add r4, r0, #0 - beq _021D2720 - cmp r5, #0 - beq _021D2720 - ldr r1, [r4, #0] - add r0, r6, #0 - lsr r1, r1, #8 - bl sub_02018144 - add r5, r0, #0 - beq _021D271E - add r0, r4, #0 - add r1, r5, #0 - bl sub_020C4F48 - add r0, r4, #0 - bl sub_020181C4 -_021D271E: - add r4, r5, #0 -_021D2720: - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D26E8 - - thumb_func_start ov21_021D2724 -ov21_021D2724: ; 0x021D2724 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r2, #0 - add r5, r3, #0 - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x2c] - ldr r4, [sp, #0x24] - bl ov21_021D26E8 - add r7, r0, #0 - beq _021D2766 - add r1, sp, #4 - bl sub_020A7164 - cmp r0, #0 - beq _021D2760 - cmp r4, #0 - bne _021D274C - ldr r0, [sp, #4] - ldr r4, [r0, #0x10] -_021D274C: - ldr r0, [sp, #0x20] - lsl r1, r5, #0x18 - str r0, [sp] - ldr r2, [sp, #4] - add r0, r6, #0 - ldr r2, [r2, #0x14] - lsr r1, r1, #0x18 - add r3, r4, #0 - bl sub_0201958C -_021D2760: - add r0, r7, #0 - bl sub_020181C4 -_021D2766: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D2724 - - thumb_func_start ov21_021D276C -ov21_021D276C: ; 0x021D276C - push {r3, r4, r5, r6, r7, lr} - add r6, r3, #0 - add r5, r2, #0 - ldr r3, [sp, #0x1c] - mov r2, #0 - ldr r4, [sp, #0x18] - bl ov21_021D26E8 - add r7, r0, #0 - beq _021D27B2 - add r1, sp, #0 - bl sub_020A71B0 - cmp r0, #0 - beq _021D27AC - cmp r4, #0 - bne _021D2792 - ldr r0, [sp] - ldr r4, [r0, #8] -_021D2792: - ldr r0, [sp] - add r1, r4, #0 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [sp] - add r2, r4, #0 - ldr r3, _021D27B4 ; =0x021E9CA4 - lsl r4, r5, #2 - ldr r0, [r0, #0xc] - ldr r3, [r3, r4] - add r1, r6, #0 - blx r3 -_021D27AC: - add r0, r7, #0 - bl sub_020181C4 -_021D27B2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D27B4: .word 0x021E9CA4 - thumb_func_end ov21_021D276C - - thumb_func_start ov21_021D27B8 -ov21_021D27B8: ; 0x021D27B8 - push {r3, r4, r5, lr} - add r5, r3, #0 - ldr r3, [sp, #0x10] - bl ov21_021D26E8 - add r4, r0, #0 - beq _021D27DA - add r1, r5, #0 - bl sub_020A7248 - cmp r0, #0 - bne _021D27DA - add r0, r4, #0 - bl sub_020181C4 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D27DA: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D27B8 - - thumb_func_start ov21_021D27E0 -ov21_021D27E0: ; 0x021D27E0 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #0 - bl ov21_021D26E8 - add r4, r0, #0 - beq _021D2802 - add r1, r5, #0 - bl sub_020A71B0 - cmp r0, #0 - bne _021D2802 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2802: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D27E0 - - thumb_func_start ov21_021D2808 -ov21_021D2808: ; 0x021D2808 - push {r3, r4, r5, lr} - add r5, r3, #0 - ldr r3, [sp, #0x10] - bl ov21_021D26E8 - add r4, r0, #0 - beq _021D282A - add r1, r5, #0 - bl sub_020A7164 - cmp r0, #0 - bne _021D282A - add r0, r4, #0 - bl sub_020181C4 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D282A: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D2808 - - thumb_func_start ov21_021D2830 -ov21_021D2830: ; 0x021D2830 - push {r4, r5, r6, lr} - sub sp, #0xa8 - ldr r6, _021D2984 ; =0x021E9C6C - add r3, sp, #0x8c - add r5, r0, #0 - add r4, r1, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #1 - bl sub_02019EBC - ldr r6, _021D2988 ; =0x021E9C50 - add r3, sp, #0x70 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #2 - bl sub_02019EBC - mov r0, #0 - mov r1, #2 - bl sub_02019060 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r6, _021D298C ; =0x021E9C34 - add r3, sp, #0x54 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #3 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #3 - bl sub_02019EBC - ldr r6, _021D2990 ; =0x021E9C18 - add r3, sp, #0x38 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #5 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #5 - bl sub_02019EBC - ldr r6, _021D2994 ; =0x021E9BFC - add r3, sp, #0x1c - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #6 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #6 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #6 - bl sub_02019EBC - ldr r6, _021D2998 ; =0x021E9C88 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #7 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #1 - bl sub_020183C4 - mov r0, #7 - mov r1, #0x40 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #7 - bl sub_02019EBC - add sp, #0xa8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D2984: .word 0x021E9C6C -_021D2988: .word 0x021E9C50 -_021D298C: .word 0x021E9C34 -_021D2990: .word 0x021E9C18 -_021D2994: .word 0x021E9BFC -_021D2998: .word 0x021E9C88 - thumb_func_end ov21_021D2830 - - thumb_func_start ov21_021D299C -ov21_021D299C: ; 0x021D299C - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #3 - bl sub_02019044 - add r0, r4, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #7 - bl sub_02019044 - add r0, r4, #0 - mov r1, #6 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov21_021D299C - - thumb_func_start ov21_021D29D0 -ov21_021D29D0: ; 0x021D29D0 - push {r3, r4, lr} - sub sp, #0x14 - mov r3, #0 - add r4, r0, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r2, #1 - bl sub_0201A7E8 - add r0, r4, #4 - mov r1, #0 - bl sub_0201ADA4 - add r0, r4, #4 - bl sub_0201A954 - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov21_021D29D0 - - thumb_func_start ov21_021D2A00 -ov21_021D2A00: ; 0x021D2A00 - ldr r3, _021D2A08 ; =sub_0201A8FC - add r0, r0, #4 - bx r3 - nop -_021D2A08: .word sub_0201A8FC - thumb_func_end ov21_021D2A00 - - thumb_func_start ov21_021D2A0C -ov21_021D2A0C: ; 0x021D2A0C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - add r5, r0, #0 - add r0, r7, #0 - bl sub_0200762C - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r3, _021D2AA0 ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _021D2AA4 ; =0x02100DF4 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - mov r1, #0 - mov r2, #1 - blx r3 - ldr r2, _021D2AA8 ; =0x7FFF0000 - add r6, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - and r2, r4 - lsl r1, r4, #0x10 - lsr r2, r2, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0xd - lsl r2, r2, #4 - bl sub_02008A78 - ldr r2, _021D2AAC ; =0xFFFF0000 - mov r0, #0x55 - lsl r0, r0, #2 - and r2, r6 - lsl r1, r6, #0x10 - lsr r2, r2, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0xd - lsl r2, r2, #3 - bl sub_02008A84 - mov r2, #0 - mov r0, #0x56 - add r3, r5, #0 - add r1, r2, #0 - lsl r0, r0, #2 -_021D2A74: - add r2, r2, #1 - str r1, [r3, r0] - add r3, r3, #4 - cmp r2, #4 - blt _021D2A74 - ldr r4, _021D2AB0 ; =0x021E9BEC - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - str r7, [sp, #0xc] - bl sub_02015064 - mov r1, #0x5a - lsl r1, r1, #2 - str r0, [r5, r1] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D2AA0: .word 0x02100DEC -_021D2AA4: .word 0x02100DF4 -_021D2AA8: .word 0x7FFF0000 -_021D2AAC: .word 0xFFFF0000 -_021D2AB0: .word 0x021E9BEC - thumb_func_end ov21_021D2A0C - - thumb_func_start ov21_021D2AB4 -ov21_021D2AB4: ; 0x021D2AB4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r6, #0x56 - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #2 -_021D2AC0: - ldr r0, [r5, r6] - cmp r0, #0 - beq _021D2ACA - bl sub_02007DC8 -_021D2ACA: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D2AC0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_02007B6C - mov r0, #0x5a - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_020150A8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D2AB4 - - thumb_func_start ov21_021D2AE8 -ov21_021D2AE8: ; 0x021D2AE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - mov r1, #0x6d - add r5, r0, #0 - lsl r1, r1, #2 - add r4, r5, r1 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021D2B84 ; =0x00000BB8 - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r6, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r5, r0] - add r1, r7, #0 - mov r2, #0x4e - bl sub_02009A4C - str r0, [r4, #0xc] - bl sub_0200A3DC - ldr r0, [r4, #0xc] - bl sub_02009D4C - ldr r0, _021D2B84 ; =0x00000BB8 - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x51 - str r6, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - str r0, [r4, #0x10] - bl sub_0200A640 - ldr r0, [r4, #0x10] - bl sub_02009D4C - ldr r0, _021D2B84 ; =0x00000BB8 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r6, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0x4c - mov r3, #1 - bl sub_02009BC4 - str r0, [r4, #0x14] - ldr r0, _021D2B84 ; =0x00000BB8 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r6, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0x4d - mov r3, #1 - bl sub_02009BC4 - str r0, [r4, #0x18] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2B84: .word 0x00000BB8 - thumb_func_end ov21_021D2AE8 - - thumb_func_start ov21_021D2B88 -ov21_021D2B88: ; 0x021D2B88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _021D2C0C ; =0x00000BB8 - add r7, r3, #0 - add r6, r2, #0 - add r4, r1, #0 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #0] - add r1, r7, #0 - mov r2, #0x4e - bl sub_02009A4C - str r0, [r5, #0xc] - bl sub_0200A3DC - ldr r0, [r5, #0xc] - bl sub_02009D4C - ldr r0, _021D2C0C ; =0x00000BB8 - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r6, [sp, #0xc] - ldr r0, [r4, #4] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x10] - bl sub_0200A640 - ldr r0, [r5, #0x10] - bl sub_02009D4C - ldr r0, _021D2C0C ; =0x00000BB8 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #8] - mov r2, #0x4c - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x14] - ldr r0, _021D2C0C ; =0x00000BB8 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #0xc] - mov r2, #0x4d - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x18] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2C0C: .word 0x00000BB8 - thumb_func_end ov21_021D2B88 - - thumb_func_start ov21_021D2C10 -ov21_021D2C10: ; 0x021D2C10 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x6d - lsl r0, r0, #2 - add r4, r5, r0 - ldr r0, [r4, #0xc] - bl sub_0200A4E4 - ldr r0, [r4, #0x10] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - ldr r1, [r4, #0xc] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0x10] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0x14] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0x18] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D2C10 - - thumb_func_start ov21_021D2C58 -ov21_021D2C58: ; 0x021D2C58 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - bl sub_0200A4E4 - ldr r0, [r5, #0x10] - bl sub_0200A6DC - ldr r0, [r4, #0] - ldr r1, [r5, #0xc] - bl sub_02009D68 - ldr r0, [r4, #4] - ldr r1, [r5, #0x10] - bl sub_02009D68 - ldr r0, [r4, #8] - ldr r1, [r5, #0x14] - bl sub_02009D68 - ldr r0, [r4, #0xc] - ldr r1, [r5, #0x18] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D2C58 - - thumb_func_start ov21_021D2C8C -ov21_021D2C8C: ; 0x021D2C8C - push {r3, r4, r5, lr} - sub sp, #0x70 - add r4, r1, #0 - ldr r1, _021D2D48 ; =0x00000BB8 - add r5, r0, #0 - mov r0, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r3, #5 - str r0, [sp, #0x10] - lsl r3, r3, #6 - ldr r2, [r5, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r5, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r5, r2] - add r3, #0xc - str r2, [sp, #0x1c] - ldr r2, [r5, r3] - add r3, r1, #0 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x4c - add r2, r1, #0 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #1 - str r0, [sp, #0x44] - add r0, sp, #0x2c - str r1, [sp, #0x40] - str r4, [sp, #0x48] - str r1, [sp, #0x34] - str r1, [sp, #0x38] - bl sub_02021B90 - mov r1, #0x6d - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x6d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021F58 - mov r0, #0 - str r0, [sp, #0x34] - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021D6C - mov r1, #0x6f - lsl r1, r1, #2 - mov r2, #0 - add r0, r1, #0 - str r2, [r5, r1] - add r0, #0x20 - str r2, [r5, r0] - add r1, #0x24 - str r2, [r5, r1] - add sp, #0x70 - pop {r3, r4, r5, pc} - nop -_021D2D48: .word 0x00000BB8 - thumb_func_end ov21_021D2C8C - - thumb_func_start ov21_021D2D4C -ov21_021D2D4C: ; 0x021D2D4C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021BD4 - mov r0, #0x6d - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02021BD4 - mov r0, #0x6e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D2D86 - bl ov21_021D4D1C - mov r0, #0x6f - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_021D2D86: - pop {r4, pc} - thumb_func_end ov21_021D2D4C - - thumb_func_start ov21_021D2D88 -ov21_021D2D88: ; 0x021D2D88 - push {r4, r5, r6, lr} - sub sp, #0x70 - add r4, r1, #0 - ldr r1, _021D2E18 ; =0x00000BB8 - add r5, r0, #0 - mov r0, #0 - add r6, r3, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - ldr r3, [sp, #0x80] - str r0, [sp, #0xc] - str r3, [sp, #0x10] - ldr r3, [r2, #0] - str r3, [sp, #0x14] - ldr r3, [r2, #4] - str r3, [sp, #0x18] - ldr r3, [r2, #8] - str r3, [sp, #0x1c] - ldr r2, [r2, #0xc] - add r3, r1, #0 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x4c - add r2, r1, #0 - bl sub_020093B4 - mov r1, #0 - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #1 - str r0, [sp, #0x44] - str r4, [sp, #0x2c] - str r1, [sp, #0x40] - str r6, [sp, #0x48] - str r1, [sp, #0x34] - str r1, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02021F58 - mov r0, #0 - str r0, [sp, #0x34] - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #4] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021D6C - mov r0, #0 - str r0, [r5, #8] - str r0, [r5, #0x28] - str r0, [r5, #0x2c] - add sp, #0x70 - pop {r4, r5, r6, pc} - nop -_021D2E18: .word 0x00000BB8 - thumb_func_end ov21_021D2D88 - - thumb_func_start ov21_021D2E1C -ov21_021D2E1C: ; 0x021D2E1C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #4] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D2E42 - bl ov21_021D4D1C - mov r0, #0 - str r0, [r4, #8] -_021D2E42: - pop {r4, pc} - thumb_func_end ov21_021D2E1C - - thumb_func_start ov21_021D2E44 -ov21_021D2E44: ; 0x021D2E44 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #0 - beq _021D2E54 - bl sub_02021CAC -_021D2E54: - ldr r0, [r5, #4] - cmp r0, #0 - beq _021D2E60 - add r1, r4, #0 - bl sub_02021CAC -_021D2E60: - ldr r0, [r5, #8] - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D2E6E - add r1, r4, #0 - bl sub_020129D0 -_021D2E6E: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D2E44 - - thumb_func_start ov21_021D2E70 -ov21_021D2E70: ; 0x021D2E70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - mov r1, #0x79 - add r5, r0, #0 - lsl r1, r1, #2 - add r4, r5, r1 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021D2F10 ; =0x00002EE0 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r6, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r2, #0x77 - mov r3, #1 - bl sub_02009A4C - str r0, [r4, #0x10] - bl sub_0200A3DC - ldr r0, [r4, #0x10] - bl sub_02009D4C - ldr r0, _021D2F10 ; =0x00002EE0 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x51 - str r6, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0x15 - mov r3, #0 - bl sub_02009B04 - str r0, [r4, #0x14] - bl sub_0200A640 - ldr r0, [r4, #0x14] - bl sub_02009D4C - ldr r0, _021D2F10 ; =0x00002EE0 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r6, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0x78 - mov r3, #1 - bl sub_02009BC4 - str r0, [r4, #0x18] - ldr r0, _021D2F10 ; =0x00002EE0 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r6, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0x76 - mov r3, #1 - bl sub_02009BC4 - str r0, [r4, #0x1c] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2F10: .word 0x00002EE0 - thumb_func_end ov21_021D2E70 - - thumb_func_start ov21_021D2F14 -ov21_021D2F14: ; 0x021D2F14 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x79 - lsl r0, r0, #2 - add r4, r5, r0 - ldr r0, [r4, #0x10] - bl sub_0200A4E4 - ldr r0, [r4, #0x14] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - ldr r1, [r4, #0x10] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0x14] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0x18] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0x1c] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D2F14 - - thumb_func_start ov21_021D2F5C -ov21_021D2F5C: ; 0x021D2F5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x70 - add r5, r1, #0 - ldr r1, _021D3008 ; =0x00002EE0 - add r6, r0, #0 - mov r0, #0 - mov r2, #0x79 - lsl r2, r2, #2 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - sub r2, #0xa4 - ldr r2, [r6, r2] - add r3, r1, #0 - str r2, [sp, #0x14] - mov r2, #0x79 - lsl r2, r2, #2 - sub r2, #0xa0 - ldr r2, [r6, r2] - str r2, [sp, #0x18] - mov r2, #0x79 - lsl r2, r2, #2 - sub r2, #0x9c - ldr r2, [r6, r2] - str r2, [sp, #0x1c] - mov r2, #0x79 - lsl r2, r2, #2 - sub r2, #0x98 - ldr r2, [r6, r2] - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x4c - add r2, r1, #0 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r4, #0 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #2 - str r0, [sp, #0x44] - mov r0, #0x49 - lsl r0, r0, #0xe - str r0, [sp, #0x38] - mov r0, #0x19 - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r0, #0x79 - lsl r0, r0, #2 - str r5, [sp, #0x48] - str r4, [sp, #0x40] - add r5, r6, r0 - add r7, sp, #0x2c -_021D2FD6: - add r0, r7, #0 - bl sub_02021B90 - add r1, r4, #0 - stmia r5!, {r0} - bl sub_02021D6C - add r4, r4, #1 - cmp r4, #4 - blt _021D2FD6 - mov r0, #0x79 - lsl r0, r0, #2 - add r0, r6, r0 - mov r1, #0 - bl ov21_021D2584 - add r0, r6, #0 - bl ov21_021D3034 - add r0, r6, #0 - bl ov21_021D31D0 - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D3008: .word 0x00002EE0 - thumb_func_end ov21_021D2F5C - - thumb_func_start ov21_021D300C -ov21_021D300C: ; 0x021D300C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov21_021D31F0 - add r0, r5, #0 - bl ov21_021D3054 - mov r0, #0x79 - lsl r0, r0, #2 - mov r4, #0 - add r5, r5, r0 -_021D3022: - ldr r0, [r5, #0] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D3022 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D300C - - thumb_func_start ov21_021D3034 -ov21_021D3034: ; 0x021D3034 - push {r4, lr} - mov r1, #0x79 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r0, _021D3050 ; =ov21_021D3064 - add r1, r4, r1 - mov r2, #1 - bl sub_0200D9E8 - mov r1, #0x9d - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r4, pc} - nop -_021D3050: .word ov21_021D3064 - thumb_func_end ov21_021D3034 - - thumb_func_start ov21_021D3054 -ov21_021D3054: ; 0x021D3054 - mov r1, #0x9d - lsl r1, r1, #2 - ldr r3, _021D3060 ; =sub_0200DA58 - ldr r0, [r0, r1] - bx r3 - nop -_021D3060: .word sub_0200DA58 - thumb_func_end ov21_021D3054 - - thumb_func_start ov21_021D3064 -ov21_021D3064: ; 0x021D3064 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _021D3080 - ldr r0, [r4, #0x2c] - str r0, [sp] - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - ldr r3, [r4, #0x28] - add r0, r4, #0 - bl ov21_021D30D8 - pop {r3, r4, r5, pc} -_021D3080: - ldr r0, [r4, #0x34] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1a - sub r1, r1, r2 - mov r0, #0x1a - ror r1, r0 - add r0, r2, r1 - str r0, [r4, #0x34] - cmp r0, #0x20 - blt _021D309C - add r1, r0, #1 - mov r0, #0x40 - sub r0, r0, r1 -_021D309C: - lsl r2, r0, #0xc - asr r1, r2, #0x1f - lsr r0, r2, #0x12 - lsl r3, r1, #0xe - mov r1, #2 - orr r3, r0 - lsl r2, r2, #0xe - mov r0, #0 - lsl r1, r1, #0xa - add r5, r2, r1 - adc r3, r0 - lsl r2, r3, #0x14 - lsr r0, r5, #0xc - orr r0, r2 - lsl r1, r1, #6 - bl sub_020BCFD0 - asr r3, r0, #0xc - ldr r0, [r4, #0x2c] - add r0, r0, r3 - str r0, [sp] - add r0, r4, #0 - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - ldr r4, [r4, #0x28] - add r3, r4, r3 - bl ov21_021D30D8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3064 - - thumb_func_start ov21_021D30D8 -ov21_021D30D8: ; 0x021D30D8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - ldr r6, [sp, #0x40] - add r5, r0, #0 - str r1, [sp, #0xc] - add r7, r2, #0 - str r3, [sp, #0x10] - mov r4, #0 -_021D30E8: - ldr r0, [sp, #0x10] - str r7, [sp] - str r0, [sp, #4] - ldr r3, [sp, #0xc] - str r6, [sp, #8] - add r0, r4, #0 - add r1, sp, #0x18 - add r2, sp, #0x14 - bl ov21_021D4FFC - ldr r0, [sp, #0x18] - lsl r0, r0, #0xc - str r0, [sp, #0x1c] - ldr r0, [sp, #0x14] - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x20] - ldr r0, [r5, #0] - add r1, sp, #0x1c - bl sub_02021C50 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D30E8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D30D8 - - thumb_func_start ov21_021D3124 -ov21_021D3124: ; 0x021D3124 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0x87 - lsl r1, r1, #2 - add r4, r0, r1 - ldr r1, [r4, #0x44] - add r5, r2, #0 - add r7, r3, #0 - cmp r1, r6 - bne _021D314E - ldr r1, [r4, #0x48] - cmp r1, r5 - bne _021D314E - ldr r1, [r4, #0x4c] - cmp r1, r7 - bne _021D314E - ldr r2, [r4, #0x50] - ldr r1, [sp, #0x20] - cmp r2, r1 - beq _021D318E -_021D314E: - mov r1, #0x79 - lsl r1, r1, #2 - add r3, r0, r1 - str r3, [r4, #0] - str r5, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r1, [r3, #0x20] - ldr r3, [r3, #0x24] - add r0, r4, #4 - add r2, r6, #0 - bl ov21_021D2648 - ldr r3, [r4, #0] - ldr r0, [sp, #0x20] - add r2, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - add r0, r4, #0 - ldr r1, [r3, #0x28] - ldr r3, [r3, #0x2c] - add r0, #0x24 - bl ov21_021D2648 - str r6, [r4, #0x44] - str r5, [r4, #0x48] - ldr r0, [sp, #0x20] - str r7, [r4, #0x4c] - str r0, [r4, #0x50] - mov r0, #1 - str r0, [r4, #0x54] -_021D318E: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3124 - - thumb_func_start ov21_021D3194 -ov21_021D3194: ; 0x021D3194 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x54] - cmp r0, #0 - beq _021D31CE - add r0, r5, #4 - bl ov21_021D2664 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x24 - bl ov21_021D2664 - ldr r1, [r5, #4] - ldr r0, [r5, #0] - cmp r4, #1 - str r1, [r0, #0x20] - ldr r1, [r5, #8] - ldr r0, [r5, #0] - str r1, [r0, #0x24] - ldr r1, [r5, #0x24] - ldr r0, [r5, #0] - str r1, [r0, #0x28] - ldr r1, [r5, #0x28] - ldr r0, [r5, #0] - str r1, [r0, #0x2c] - bne _021D31CE - mov r0, #0 - str r0, [r5, #0x54] -_021D31CE: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D3194 - - thumb_func_start ov21_021D31D0 -ov21_021D31D0: ; 0x021D31D0 - push {r4, lr} - mov r1, #0x87 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r0, _021D31EC ; =ov21_021D3194 - add r1, r4, r1 - mov r2, #0 - bl sub_0200D9E8 - mov r1, #0x9e - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r4, pc} - nop -_021D31EC: .word ov21_021D3194 - thumb_func_end ov21_021D31D0 - - thumb_func_start ov21_021D31F0 -ov21_021D31F0: ; 0x021D31F0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x9e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200DA58 - mov r0, #0x9e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} - thumb_func_end ov21_021D31F0 - - thumb_func_start ov21_021D3208 -ov21_021D3208: ; 0x021D3208 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r2, #0 - add r4, r1, #0 - ldr r2, _021D32FC ; =0x00001770 - mov r1, #0 - add r5, r0, #0 - bl sub_020D5124 - ldr r0, [r4, #0] - str r0, [r5, #0] - ldr r1, [r4, #8] - ldr r0, _021D3300 ; =0x00001744 - str r1, [r5, r0] - ldr r0, [r5, #0] - bl sub_02027474 - cmp r0, #0 - beq _021D3232 - mov r1, #1 - b _021D3234 -_021D3232: - mov r1, #0 -_021D3234: - ldr r0, _021D3304 ; =0x00001734 - str r1, [r5, r0] - ldr r0, [r4, #0x20] - cmp r0, #2 - bne _021D324C - ldr r0, _021D3304 ; =0x00001734 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021D324A - mov r0, #1 - b _021D324C -_021D324A: - mov r0, #0 -_021D324C: - cmp r0, #1 - ldr r0, _021D3308 ; =0x00001730 - bne _021D325A - mov r1, #1 - str r1, [r5, r0] - mov r1, #0 - b _021D325E -_021D325A: - mov r1, #0 - str r1, [r5, r0] -_021D325E: - str r1, [sp] - ldr r0, _021D3308 ; =0x00001730 - str r1, [sp, #4] - ldr r0, [r5, r0] - add r2, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r3, r1, #0 - str r6, [sp, #0xc] - bl ov21_021D3684 - cmp r0, #0 - bne _021D327C - bl sub_02022974 -_021D327C: - ldr r1, [r4, #0x1c] - add r0, r5, #0 - bl ov21_021D3794 - ldr r1, [r4, #0x1c] - add r0, r5, #0 - bl ov21_021D3434 - ldr r1, [r4, #0x20] - add r0, r5, #0 - bl ov21_021D344C - ldr r0, [r4, #4] - bl sub_02025FCC - ldr r1, _021D330C ; =0x0000174C - str r0, [r5, r1] - ldr r0, [r4, #4] - bl sub_02025F30 - ldr r1, _021D3310 ; =0x00001750 - str r0, [r5, r1] - ldr r0, [r4, #4] - add r1, r6, #0 - bl sub_02025F04 - ldr r1, _021D3314 ; =0x00001754 - str r0, [r5, r1] - add r0, r6, #0 - bl sub_02098700 - ldr r1, _021D3318 ; =0x00001748 - str r0, [r5, r1] - add r0, r1, #0 - add r0, #8 - ldr r0, [r5, r0] - cmp r0, #0 - ldr r0, [r5, r1] - bne _021D32D4 - mov r1, #0 - add r2, r6, #0 - bl sub_0209872C - b _021D32DC -_021D32D4: - mov r1, #1 - add r2, r6, #0 - bl sub_0209872C -_021D32DC: - ldr r0, [r4, #0xc] - ldr r1, _021D331C ; =0x00001760 - str r0, [r5, r1] - ldr r2, [r4, #0x10] - add r0, r1, #4 - str r2, [r5, r0] - add r0, r1, #0 - ldr r2, [r4, #0x14] - add r0, #8 - str r2, [r5, r0] - ldr r0, [r4, #0x18] - add r1, #0xc - str r0, [r5, r1] - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D32FC: .word 0x00001770 -_021D3300: .word 0x00001744 -_021D3304: .word 0x00001734 -_021D3308: .word 0x00001730 -_021D330C: .word 0x0000174C -_021D3310: .word 0x00001750 -_021D3314: .word 0x00001754 -_021D3318: .word 0x00001748 -_021D331C: .word 0x00001760 - thumb_func_end ov21_021D3208 - - thumb_func_start ov21_021D3320 -ov21_021D3320: ; 0x021D3320 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D3344 ; =0x00001754 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _021D3348 ; =0x00001748 - ldr r0, [r4, r0] - bl sub_020987BC - ldr r0, _021D3348 ; =0x00001748 - ldr r0, [r4, r0] - bl sub_02098718 - ldr r0, _021D3348 ; =0x00001748 - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D3344: .word 0x00001754 -_021D3348: .word 0x00001748 - thumb_func_end ov21_021D3320 - - thumb_func_start ov21_021D334C -ov21_021D334C: ; 0x021D334C - ldr r3, _021D3358 ; =sub_02027058 - lsl r1, r1, #0x10 - ldr r0, [r0, #0] - lsr r1, r1, #0x10 - bx r3 - nop -_021D3358: .word sub_02027058 - thumb_func_end ov21_021D334C - - thumb_func_start ov21_021D335C -ov21_021D335C: ; 0x021D335C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0x1c - blt _021D336A - bl sub_02022974 -_021D336A: - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_020270AC - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D335C - - thumb_func_start ov21_021D3374 -ov21_021D3374: ; 0x021D3374 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #2 - blt _021D3382 - bl sub_02022974 -_021D3382: - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_020270F8 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D3374 - - thumb_func_start ov21_021D338C -ov21_021D338C: ; 0x021D338C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #2 - blt _021D339A - bl sub_02022974 -_021D339A: - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_02027154 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D338C - - thumb_func_start ov21_021D33A4 -ov21_021D33A4: ; 0x021D33A4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #3 - blt _021D33B2 - bl sub_02022974 -_021D33B2: - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_020271B0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D33A4 - - thumb_func_start ov21_021D33BC -ov21_021D33BC: ; 0x021D33BC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #3 - blt _021D33CA - bl sub_02022974 -_021D33CA: - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_02027208 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D33BC - - thumb_func_start ov21_021D33D4 -ov21_021D33D4: ; 0x021D33D4 - ldr r3, _021D33DC ; =sub_0202756C - ldr r0, [r0, #0] - mov r2, #0 - bx r3 - ; .align 2, 0 -_021D33DC: .word sub_0202756C - thumb_func_end ov21_021D33D4 - - thumb_func_start ov21_021D33E0 -ov21_021D33E0: ; 0x021D33E0 - push {r3, lr} - mov r2, #1 - bl ov21_021D334C - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021D33F4 - mov r0, #1 - pop {r3, pc} -_021D33F4: - mov r0, #2 - pop {r3, pc} - thumb_func_end ov21_021D33E0 - - thumb_func_start ov21_021D33F8 -ov21_021D33F8: ; 0x021D33F8 - ldr r3, _021D3400 ; =sub_0202702C - ldr r0, [r0, #0] - mov r1, #0 - bx r3 - ; .align 2, 0 -_021D3400: .word sub_0202702C - thumb_func_end ov21_021D33F8 - - thumb_func_start ov21_021D3404 -ov21_021D3404: ; 0x021D3404 - ldr r3, _021D340C ; =sub_02027264 - ldr r0, [r0, #0] - bx r3 - nop -_021D340C: .word sub_02027264 - thumb_func_end ov21_021D3404 - - thumb_func_start ov21_021D3410 -ov21_021D3410: ; 0x021D3410 - ldr r3, _021D3418 ; =sub_0202756C - ldr r0, [r0, #0] - bx r3 - nop -_021D3418: .word sub_0202756C - thumb_func_end ov21_021D3410 - - thumb_func_start ov21_021D341C -ov21_021D341C: ; 0x021D341C - ldr r3, _021D3424 ; =sub_020276C8 - ldr r0, [r0, #0] - bx r3 - nop -_021D3424: .word sub_020276C8 - thumb_func_end ov21_021D341C - - thumb_func_start ov21_021D3428 -ov21_021D3428: ; 0x021D3428 - ldr r3, _021D3430 ; =sub_02027474 - ldr r0, [r0, #0] - bx r3 - nop -_021D3430: .word sub_02027474 - thumb_func_end ov21_021D3428 - - thumb_func_start ov21_021D3434 -ov21_021D3434: ; 0x021D3434 - ldr r2, _021D343C ; =0x0000175C - strh r1, [r0, r2] - bx lr - nop -_021D343C: .word 0x0000175C - thumb_func_end ov21_021D3434 - - thumb_func_start ov21_021D3440 -ov21_021D3440: ; 0x021D3440 - ldr r1, _021D3448 ; =0x0000175C - ldrh r0, [r0, r1] - bx lr - nop -_021D3448: .word 0x0000175C - thumb_func_end ov21_021D3440 - - thumb_func_start ov21_021D344C -ov21_021D344C: ; 0x021D344C - ldr r2, _021D3454 ; =0x0000175E - strh r1, [r0, r2] - bx lr - nop -_021D3454: .word 0x0000175E - thumb_func_end ov21_021D344C - - thumb_func_start ov21_021D3458 -ov21_021D3458: ; 0x021D3458 - ldr r1, _021D3460 ; =0x0000175E - ldrh r0, [r0, r1] - bx lr - nop -_021D3460: .word 0x0000175E - thumb_func_end ov21_021D3458 - - thumb_func_start ov21_021D3464 -ov21_021D3464: ; 0x021D3464 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - ldr r7, [sp, #0x4c] - str r1, [sp, #0xc] - add r5, r0, #0 - ldr r1, _021D367C ; =0x000003DA - add r0, r7, #0 - str r2, [sp, #0x10] - str r3, [sp, #0x14] - bl sub_02018184 - add r6, r0, #0 - bne _021D3482 - bl sub_02022974 -_021D3482: - ldr r2, _021D367C ; =0x000003DA - add r0, r6, #0 - mov r1, #0 - bl sub_020D5124 - mov r0, #0 - str r0, [sp, #0x24] - ldr r1, _021D367C ; =0x000003DA - add r0, r7, #0 - bl sub_02018184 - add r4, r0, #0 - bne _021D34A0 - bl sub_02022974 -_021D34A0: - ldr r2, _021D367C ; =0x000003DA - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - mov r1, #0 - ldr r0, [sp, #0x48] - str r1, [sp, #0x20] - cmp r0, #0 - add r2, sp, #0x1c - bne _021D34D2 - add r0, r7, #0 - mov r1, #1 - bl ov21_021D3B64 - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x18] - str r0, [sp] - ldr r2, [r5, #0] - add r0, r6, #0 - add r1, sp, #0x24 - bl ov21_021D39A4 - b _021D34EA -_021D34D2: - add r0, r7, #0 - bl ov21_021D3B64 - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x18] - str r0, [sp] - ldr r2, [r5, #0] - add r0, r6, #0 - add r1, sp, #0x24 - bl ov21_021D39A4 -_021D34EA: - ldr r0, [sp, #0x24] - add r1, r4, #0 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [r5, #0] - add r2, sp, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r3, r6, #0 - bl ov21_021D3B98 - ldr r2, [sp, #0x20] - add r0, r6, #0 - add r1, r4, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r2, [sp, #0x20] - add r0, r4, #0 - str r2, [sp, #0x24] - mov r1, #0 - lsl r2, r2, #1 - bl sub_020D5124 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r1, r4, #0 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [r5, #0] - add r2, sp, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r3, r6, #0 - bl ov21_021D3C48 - ldr r2, [sp, #0x20] - cmp r2, #0 - bne _021D353E - mov r7, #0 - b _021D3656 -_021D353E: - add r0, r6, #0 - add r1, r4, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r2, [sp, #0x20] - add r0, r4, #0 - str r2, [sp, #0x24] - mov r1, #0 - lsl r2, r2, #1 - bl sub_020D5124 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r1, r4, #0 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [r5, #0] - add r2, sp, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #0x14] - add r3, r6, #0 - bl ov21_021D3D2C - ldr r2, [sp, #0x20] - cmp r2, #0 - bne _021D357A - mov r7, #0 - b _021D3656 -_021D357A: - add r0, r6, #0 - add r1, r4, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r2, [sp, #0x20] - add r0, r4, #0 - str r2, [sp, #0x24] - mov r1, #0 - lsl r2, r2, #1 - bl sub_020D5124 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r1, r4, #0 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [r5, #0] - add r2, sp, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #0x40] - add r3, r6, #0 - bl ov21_021D3D2C - ldr r2, [sp, #0x20] - cmp r2, #0 - bne _021D35B6 - mov r7, #0 - b _021D3656 -_021D35B6: - add r0, r6, #0 - add r1, r4, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r2, [sp, #0x20] - add r0, r4, #0 - str r2, [sp, #0x24] - mov r1, #0 - lsl r2, r2, #1 - bl sub_020D5124 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r1, r4, #0 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [r5, #0] - add r2, sp, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #0x44] - add r3, r6, #0 - bl ov21_021D3E80 - ldr r2, [sp, #0x20] - cmp r2, #0 - bne _021D35F2 - mov r7, #0 - b _021D3656 -_021D35F2: - add r0, r6, #0 - add r1, r4, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r2, [sp, #0x20] - add r0, r4, #0 - str r2, [sp, #0x24] - mov r1, #0 - lsl r2, r2, #1 - bl sub_020D5124 - mov r0, #0 - str r0, [sp, #0x20] - ldr r1, [r5, #0] - ldr r3, [sp, #0x24] - add r0, r5, #4 - add r2, r6, #0 - bl ov21_021D3A60 - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _021D3638 - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _021D3638 - ldr r0, [sp, #0x14] - cmp r0, #0 - bne _021D3638 - ldr r0, [sp, #0x40] - cmp r0, #0 - bne _021D3638 - ldr r0, [sp, #0x44] - cmp r0, #0 - beq _021D363C -_021D3638: - mov r0, #1 - str r0, [sp, #0x50] -_021D363C: - ldr r0, [sp, #0x50] - cmp r0, #0 - bne _021D364E - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r0, r5, #4 - bl ov21_021D3AB8 - b _021D3654 -_021D364E: - add r0, r5, #4 - bl ov21_021D3B28 -_021D3654: - mov r7, #1 -_021D3656: - ldr r2, _021D3680 ; =0x00001738 - add r0, r5, #4 - add r1, r5, r2 - add r2, r2, #4 - add r2, r5, r2 - bl ov21_021D3FA8 - add r0, r6, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [sp, #0x18] - bl sub_020181C4 - add r0, r7, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D367C: .word 0x000003DA -_021D3680: .word 0x00001738 - thumb_func_end ov21_021D3464 - - thumb_func_start ov21_021D3684 -ov21_021D3684: ; 0x021D3684 - push {r3, r4, lr} - sub sp, #0x14 - ldr r4, [sp, #0x20] - str r4, [sp] - ldr r4, [sp, #0x24] - str r4, [sp, #4] - ldr r4, [sp, #0x28] - str r4, [sp, #8] - ldr r4, [sp, #0x2c] - str r4, [sp, #0xc] - mov r4, #0 - str r4, [sp, #0x10] - bl ov21_021D3464 - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov21_021D3684 - - thumb_func_start ov21_021D36A4 -ov21_021D36A4: ; 0x021D36A4 - cmp r1, #0 - bne _021D36AC - mov r0, #1 - bx lr -_021D36AC: - ldr r1, _021D36BC ; =0x00001734 - ldr r0, [r0, r1] - cmp r0, #0 - beq _021D36B8 - mov r0, #1 - bx lr -_021D36B8: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D36BC: .word 0x00001734 - thumb_func_end ov21_021D36A4 - - thumb_func_start ov21_021D36C0 -ov21_021D36C0: ; 0x021D36C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D36A4 - cmp r0, #0 - beq _021D36D2 - ldr r1, _021D36D4 ; =0x00001730 - str r4, [r5, r1] -_021D36D2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D36D4: .word 0x00001730 - thumb_func_end ov21_021D36C0 - - thumb_func_start ov21_021D36D8 -ov21_021D36D8: ; 0x021D36D8 - ldr r1, _021D36E0 ; =0x00001730 - ldr r0, [r0, r1] - bx lr - nop -_021D36E0: .word 0x00001730 - thumb_func_end ov21_021D36D8 - - thumb_func_start ov21_021D36E4 -ov21_021D36E4: ; 0x021D36E4 - cmp r1, #0 - blt _021D36F6 - mov r2, #0xf7 - lsl r2, r2, #4 - ldr r0, [r0, r2] - cmp r1, r0 - bge _021D36F6 - mov r0, #1 - bx lr -_021D36F6: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D36E4 - - thumb_func_start ov21_021D36FC -ov21_021D36FC: ; 0x021D36FC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D36E4 - cmp r0, #0 - beq _021D3712 - ldr r0, _021D3718 ; =0x00000F6C - str r4, [r5, r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D3712: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D3718: .word 0x00000F6C - thumb_func_end ov21_021D36FC - - thumb_func_start ov21_021D371C -ov21_021D371C: ; 0x021D371C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, _021D3758 ; =0x00000F6C - add r5, r0, #0 - ldr r1, [r5, r1] - add r1, r1, r4 - bl ov21_021D36E4 - cmp r0, #0 - beq _021D373C - ldr r0, _021D3758 ; =0x00000F6C - ldr r1, [r5, r0] - add r1, r1, r4 - str r1, [r5, r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D373C: - cmp r4, #0 - blt _021D374C - mov r0, #0xf7 - lsl r0, r0, #4 - ldr r1, [r5, r0] - sub r0, r0, #4 - sub r1, r1, #1 - b _021D3750 -_021D374C: - ldr r0, _021D3758 ; =0x00000F6C - mov r1, #0 -_021D3750: - str r1, [r5, r0] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D3758: .word 0x00000F6C - thumb_func_end ov21_021D371C - - thumb_func_start ov21_021D375C -ov21_021D375C: ; 0x021D375C - ldr r1, _021D3764 ; =0x00000F6C - ldr r0, [r0, r1] - bx lr - nop -_021D3764: .word 0x00000F6C - thumb_func_end ov21_021D375C - - thumb_func_start ov21_021D3768 -ov21_021D3768: ; 0x021D3768 - mov r1, #0xf7 - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov21_021D3768 - - thumb_func_start ov21_021D3770 -ov21_021D3770: ; 0x021D3770 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D3768 - mov r2, #0 - cmp r0, #0 - ble _021D378E -_021D3780: - ldr r1, [r5, #4] - cmp r1, r4 - beq _021D378E - add r2, r2, #1 - add r5, #8 - cmp r2, r0 - blt _021D3780 -_021D378E: - add r0, r2, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3770 - - thumb_func_start ov21_021D3794 -ov21_021D3794: ; 0x021D3794 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021D3768 - add r4, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021D3770 - add r1, r0, #0 - cmp r4, r1 - bls _021D37B6 - add r0, r5, #0 - bl ov21_021D36FC - pop {r4, r5, r6, pc} -_021D37B6: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3794 - - thumb_func_start ov21_021D37BC -ov21_021D37BC: ; 0x021D37BC - ldr r1, _021D37C8 ; =0x00000F6C - ldr r1, [r0, r1] - lsl r1, r1, #3 - add r0, r0, r1 - ldr r0, [r0, #4] - bx lr - ; .align 2, 0 -_021D37C8: .word 0x00000F6C - thumb_func_end ov21_021D37BC - - thumb_func_start ov21_021D37CC -ov21_021D37CC: ; 0x021D37CC - ldr r1, _021D37D8 ; =0x00000F6C - ldr r1, [r0, r1] - lsl r1, r1, #3 - add r0, r0, r1 - ldr r0, [r0, #8] - bx lr - ; .align 2, 0 -_021D37D8: .word 0x00000F6C - thumb_func_end ov21_021D37CC - - thumb_func_start ov21_021D37DC -ov21_021D37DC: ; 0x021D37DC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D36E4 - cmp r0, #0 - beq _021D37F2 - add r1, r5, #4 - lsl r0, r4, #3 - add r0, r1, r0 - pop {r3, r4, r5, pc} -_021D37F2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D37DC - - thumb_func_start ov21_021D37F8 -ov21_021D37F8: ; 0x021D37F8 - ldr r2, _021D380C ; =0x0000172C - ldr r0, [r0, r2] - cmp r0, r1 - ble _021D3808 - cmp r1, #0 - blt _021D3808 - mov r0, #1 - bx lr -_021D3808: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D380C: .word 0x0000172C - thumb_func_end ov21_021D37F8 - - thumb_func_start ov21_021D3810 -ov21_021D3810: ; 0x021D3810 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D37F8 - cmp r0, #0 - beq _021D3836 - ldr r1, _021D383C ; =0x00001728 - add r0, r5, #0 - str r4, [r5, r1] - ldr r1, [r5, r1] - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _021D3840 ; =0x00000F74 - ldr r1, [r2, r1] - bl ov21_021D36FC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D3836: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D383C: .word 0x00001728 -_021D3840: .word 0x00000F74 - thumb_func_end ov21_021D3810 - - thumb_func_start ov21_021D3844 -ov21_021D3844: ; 0x021D3844 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D387C - cmp r0, #0 - beq _021D386E - ldr r1, _021D3874 ; =0x00001728 - ldr r0, [r5, r1] - add r0, r0, r4 - str r0, [r5, r1] - ldr r1, [r5, r1] - add r0, r5, #0 - lsl r1, r1, #2 - add r2, r5, r1 - ldr r1, _021D3878 ; =0x00000F74 - ldr r1, [r2, r1] - bl ov21_021D36FC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D386E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D3874: .word 0x00001728 -_021D3878: .word 0x00000F74 - thumb_func_end ov21_021D3844 - - thumb_func_start ov21_021D387C -ov21_021D387C: ; 0x021D387C - push {r3, lr} - ldr r2, _021D3894 ; =0x00001728 - ldr r2, [r0, r2] - add r1, r2, r1 - bl ov21_021D37F8 - cmp r0, #0 - beq _021D3890 - mov r0, #1 - pop {r3, pc} -_021D3890: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021D3894: .word 0x00001728 - thumb_func_end ov21_021D387C - - thumb_func_start ov21_021D3898 -ov21_021D3898: ; 0x021D3898 - ldr r1, _021D38A0 ; =0x00001728 - ldr r0, [r0, r1] - bx lr - nop -_021D38A0: .word 0x00001728 - thumb_func_end ov21_021D3898 - - thumb_func_start ov21_021D38A4 -ov21_021D38A4: ; 0x021D38A4 - ldr r1, _021D38AC ; =0x0000172C - ldr r0, [r0, r1] - bx lr - nop -_021D38AC: .word 0x0000172C - thumb_func_end ov21_021D38A4 - - thumb_func_start ov21_021D38B0 -ov21_021D38B0: ; 0x021D38B0 - lsl r1, r1, #2 - add r1, r0, r1 - ldr r0, _021D38BC ; =0x00000F74 - ldr r0, [r1, r0] - bx lr - nop -_021D38BC: .word 0x00000F74 - thumb_func_end ov21_021D38B0 - - thumb_func_start ov21_021D38C0 -ov21_021D38C0: ; 0x021D38C0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021D38F8 ; =0x0000172C - mov r6, #0 - ldr r0, [r5, r0] - cmp r0, #0 - ble _021D38F6 - ldr r7, _021D38F8 ; =0x0000172C -_021D38D0: - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021D38B0 - add r4, r0, #0 - add r0, r5, #0 - bl ov21_021D375C - cmp r4, r0 - bne _021D38EE - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021D3810 - pop {r3, r4, r5, r6, r7, pc} -_021D38EE: - ldr r0, [r5, r7] - add r6, r6, #1 - cmp r6, r0 - blt _021D38D0 -_021D38F6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D38F8: .word 0x0000172C - thumb_func_end ov21_021D38C0 - - thumb_func_start ov21_021D38FC -ov21_021D38FC: ; 0x021D38FC - ldr r1, _021D3904 ; =0x00001738 - ldr r0, [r0, r1] - bx lr - nop -_021D3904: .word 0x00001738 - thumb_func_end ov21_021D38FC - - thumb_func_start ov21_021D3908 -ov21_021D3908: ; 0x021D3908 - ldr r1, _021D3910 ; =0x0000173C - ldr r0, [r0, r1] - bx lr - nop -_021D3910: .word 0x0000173C - thumb_func_end ov21_021D3908 - - thumb_func_start ov21_021D3914 -ov21_021D3914: ; 0x021D3914 - ldr r1, _021D391C ; =0x00001754 - ldr r0, [r0, r1] - bx lr - nop -_021D391C: .word 0x00001754 - thumb_func_end ov21_021D3914 - - thumb_func_start ov21_021D3920 -ov21_021D3920: ; 0x021D3920 - ldr r1, _021D3928 ; =0x00001750 - ldr r0, [r0, r1] - bx lr - nop -_021D3928: .word 0x00001750 - thumb_func_end ov21_021D3920 - - thumb_func_start ov21_021D392C -ov21_021D392C: ; 0x021D392C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021D37BC - add r4, r0, #0 - ldr r0, [r5, #0] - bl sub_02027514 - cmp r0, #0 - bne _021D3946 - mov r0, #0 - pop {r4, r5, r6, pc} -_021D3946: - lsl r1, r4, #0x10 - ldr r0, [r5, #0] - lsr r1, r1, #0x10 - add r2, r6, #0 - bl sub_020274D0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D392C - - thumb_func_start ov21_021D3954 -ov21_021D3954: ; 0x021D3954 - ldr r3, _021D395C ; =sub_02027494 - ldr r0, [r0, #0] - bx r3 - nop -_021D395C: .word sub_02027494 - thumb_func_end ov21_021D3954 - - thumb_func_start ov21_021D3960 -ov21_021D3960: ; 0x021D3960 - ldr r1, _021D398C ; =0x021BF6BC - ldrh r1, [r1, #0x22] - cmp r1, #0 - beq _021D3970 - ldr r1, _021D3990 ; =0x00001758 - mov r2, #0 - str r2, [r0, r1] - bx lr -_021D3970: - ldr r1, _021D3994 ; =0x021BF67C - ldr r1, [r1, #0x48] - cmp r1, #0 - beq _021D398A - ldr r1, _021D3990 ; =0x00001758 - ldr r2, [r0, r1] - cmp r2, #0 - bne _021D3986 - mov r2, #1 - str r2, [r0, r1] - bx lr -_021D3986: - mov r2, #2 - str r2, [r0, r1] -_021D398A: - bx lr - ; .align 2, 0 -_021D398C: .word 0x021BF6BC -_021D3990: .word 0x00001758 -_021D3994: .word 0x021BF67C - thumb_func_end ov21_021D3960 - - thumb_func_start ov21_021D3998 -ov21_021D3998: ; 0x021D3998 - ldr r1, _021D39A0 ; =0x00001758 - ldr r0, [r0, r1] - bx lr - nop -_021D39A0: .word 0x00001758 - thumb_func_end ov21_021D3998 - - thumb_func_start ov21_021D39A4 -ov21_021D39A4: ; 0x021D39A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r7, [sp, #0x20] - add r5, r1, #0 - mov r6, #0 - add r4, r3, #0 - str r0, [sp] - str r2, [sp, #4] - str r6, [r5, #0] - cmp r7, #0 - ble _021D39DE -_021D39BA: - ldrh r1, [r4] - ldr r0, [sp, #4] - bl sub_02026FE8 - cmp r0, #0 - beq _021D39D6 - ldr r1, [r5, #0] - ldrh r0, [r4] - lsl r2, r1, #1 - ldr r1, [sp] - strh r0, [r1, r2] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] -_021D39D6: - add r6, r6, #1 - add r4, r4, #2 - cmp r6, r7 - blt _021D39BA -_021D39DE: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D39A4 - - thumb_func_start ov21_021D39E4 -ov21_021D39E4: ; 0x021D39E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - ldr r0, [sp, #0x28] - str r1, [sp, #4] - str r0, [sp, #0x28] - ldr r0, [sp, #0x30] - mov r1, #0 - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - add r6, r2, #0 - str r0, [sp, #0x34] - ldr r0, [sp, #4] - str r3, [sp, #8] - str r1, [r0, #0] - add r0, r3, #0 - ldr r7, [sp, #0x2c] - str r1, [sp, #0xc] - cmp r0, #0 - ble _021D3A5C -_021D3A0C: - mov r4, #0 - cmp r7, #0 - ble _021D3A34 - ldr r5, [sp, #0x28] -_021D3A14: - ldrh r1, [r6] - ldrh r0, [r5] - cmp r1, r0 - bne _021D3A2C - ldr r0, [sp, #0x30] - cmp r0, #1 - beq _021D3A34 - ldr r0, [sp, #0x34] - bl sub_02026F9C - cmp r0, #0 - bne _021D3A34 -_021D3A2C: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, r7 - blt _021D3A14 -_021D3A34: - cmp r4, r7 - bge _021D3A4E - ldr r0, [sp, #4] - ldrh r2, [r6] - ldr r0, [r0, #0] - lsl r1, r0, #1 - ldr r0, [sp] - strh r2, [r0, r1] - ldr r0, [sp, #4] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [r0, #0] -_021D3A4E: - ldr r0, [sp, #0xc] - add r6, r6, #2 - add r1, r0, #1 - ldr r0, [sp, #8] - str r1, [sp, #0xc] - cmp r1, r0 - blt _021D3A0C -_021D3A5C: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D39E4 - - thumb_func_start ov21_021D3A60 -ov21_021D3A60: ; 0x021D3A60 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021D3AB4 ; =0x00000F6C - mov r6, #0 - add r7, r3, #0 - add r4, r2, #0 - str r1, [sp] - str r6, [r5, r0] - cmp r7, #0 - ble _021D3AB2 -_021D3A74: - ldrh r1, [r4] - ldr r0, [sp] - bl sub_02026F9C - cmp r0, #0 - ldr r0, _021D3AB4 ; =0x00000F6C - beq _021D3A8C - ldr r0, [r5, r0] - lsl r0, r0, #3 - add r1, r5, r0 - mov r0, #2 - b _021D3A94 -_021D3A8C: - ldr r0, [r5, r0] - lsl r0, r0, #3 - add r1, r5, r0 - mov r0, #1 -_021D3A94: - str r0, [r1, #4] - ldr r1, _021D3AB4 ; =0x00000F6C - ldrh r0, [r4] - ldr r1, [r5, r1] - add r6, r6, #1 - lsl r1, r1, #3 - str r0, [r5, r1] - ldr r0, _021D3AB4 ; =0x00000F6C - add r4, r4, #2 - ldr r0, [r5, r0] - add r1, r0, #1 - ldr r0, _021D3AB4 ; =0x00000F6C - str r1, [r5, r0] - cmp r6, r7 - blt _021D3A74 -_021D3AB2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3AB4: .word 0x00000F6C - thumb_func_end ov21_021D3A60 - - thumb_func_start ov21_021D3AB8 -ov21_021D3AB8: ; 0x021D3AB8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r4, #0 - ldr r1, _021D3B1C ; =0x00001728 - mov ip, r2 - str r4, [r0, r1] - add r1, r2, #0 - mov lr, r4 - cmp r1, #0 - ble _021D3B1A - ldr r7, _021D3B1C ; =0x00001728 - add r5, r0, #0 -_021D3AD0: - ldr r1, _021D3B20 ; =0x00000F6C - ldr r1, [r0, r1] - cmp r4, r1 - bge _021D3B0C - ldrh r1, [r6] - ldr r2, [r5, #0] - cmp r2, r1 - ldr r1, _021D3B1C ; =0x00001728 - bne _021D3AFA - ldr r1, [r0, r1] - add r5, #8 - lsl r1, r1, #2 - add r2, r0, r1 - mov r1, #0xf7 - lsl r1, r1, #4 - str r4, [r2, r1] - ldr r1, [r0, r7] - add r4, r4, #1 - add r1, r1, #1 - str r1, [r0, r7] - b _021D3B0C -_021D3AFA: - ldr r1, [r0, r1] - ldr r2, _021D3B24 ; =0x000001EE - lsl r1, r1, #2 - add r3, r0, r1 - lsl r1, r2, #3 - str r2, [r3, r1] - ldr r1, [r0, r7] - add r1, r1, #1 - str r1, [r0, r7] -_021D3B0C: - mov r1, lr - add r1, r1, #1 - mov r2, ip - add r6, r6, #2 - mov lr, r1 - cmp r1, r2 - blt _021D3AD0 -_021D3B1A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3B1C: .word 0x00001728 -_021D3B20: .word 0x00000F6C -_021D3B24: .word 0x000001EE - thumb_func_end ov21_021D3AB8 - - thumb_func_start ov21_021D3B28 -ov21_021D3B28: ; 0x021D3B28 - push {r3, r4, r5, r6} - ldr r2, _021D3B5C ; =0x00001728 - mov r1, #0 - str r1, [r0, r2] - ldr r2, _021D3B60 ; =0x00000F6C - ldr r2, [r0, r2] - cmp r2, #0 - ble _021D3B58 - ldr r5, _021D3B5C ; =0x00001728 - mov r3, #0xf7 - lsl r3, r3, #4 - add r2, r5, #0 - sub r4, r3, #4 -_021D3B42: - ldr r6, [r0, r2] - lsl r6, r6, #2 - add r6, r0, r6 - str r1, [r6, r3] - ldr r6, [r0, r5] - add r1, r1, #1 - add r6, r6, #1 - str r6, [r0, r5] - ldr r6, [r0, r4] - cmp r1, r6 - blt _021D3B42 -_021D3B58: - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_021D3B5C: .word 0x00001728 -_021D3B60: .word 0x00000F6C - thumb_func_end ov21_021D3B28 - - thumb_func_start ov21_021D3B64 -ov21_021D3B64: ; 0x021D3B64 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - cmp r5, #0x2f - blt _021D3B76 - bl sub_02022974 -_021D3B76: - bl sub_020989B8 - mov r2, #0 - str r2, [sp] - add r1, sp, #8 - add r5, #0xb - str r1, [sp, #4] - add r1, r5, #0 - add r3, r6, #0 - bl sub_02007068 - ldr r1, [sp, #8] - lsr r1, r1, #1 - str r1, [r4, #0] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3B64 - - thumb_func_start ov21_021D3B98 -ov21_021D3B98: ; 0x021D3B98 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - str r1, [sp, #0x10] - add r7, r2, #0 - mov r4, #0 - str r3, [sp, #0x14] - ldr r0, [sp, #0x34] - cmp r5, #5 - bhi _021D3C06 - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D3BB8: ; jump table - .short _021D3BC4 - _021D3BB8 - 2 ; case 0 - .short _021D3BC8 - _021D3BB8 - 2 ; case 1 - .short _021D3BD6 - _021D3BB8 - 2 ; case 2 - .short _021D3BE2 - _021D3BB8 - 2 ; case 3 - .short _021D3BEE - _021D3BB8 - 2 ; case 4 - .short _021D3BFA - _021D3BB8 - 2 ; case 5 -_021D3BC4: - add r6, r4, #0 - b _021D3C0A -_021D3BC8: - mov r1, #2 - add r2, sp, #0x18 - bl ov21_021D3B64 - add r6, r0, #0 - mov r4, #1 - b _021D3C0A -_021D3BD6: - mov r1, #3 - add r2, sp, #0x18 - bl ov21_021D3B64 - add r6, r0, #0 - b _021D3C0A -_021D3BE2: - mov r1, #4 - add r2, sp, #0x18 - bl ov21_021D3B64 - add r6, r0, #0 - b _021D3C0A -_021D3BEE: - mov r1, #5 - add r2, sp, #0x18 - bl ov21_021D3B64 - add r6, r0, #0 - b _021D3C0A -_021D3BFA: - mov r1, #6 - add r2, sp, #0x18 - bl ov21_021D3B64 - add r6, r0, #0 - b _021D3C0A -_021D3C06: - bl sub_02022974 -_021D3C0A: - cmp r6, #0 - beq _021D3C32 - ldr r0, [sp, #0x14] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #0x30] - add r2, r6, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x38] - str r4, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - ldr r3, [sp, #0x18] - bl ov21_021D39E4 - add r0, r6, #0 - bl sub_020181C4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} -_021D3C32: - ldr r2, [sp, #0x30] - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x14] - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r0, [sp, #0x30] - str r0, [r7, #0] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3B98 - - thumb_func_start ov21_021D3C48 -ov21_021D3C48: ; 0x021D3C48 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - str r3, [sp, #0x10] - ldr r0, [sp, #0x34] - cmp r5, #9 - bhi _021D3CEA - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D3C66: ; jump table - .short _021D3C7A - _021D3C66 - 2 ; case 0 - .short _021D3C7E - _021D3C66 - 2 ; case 1 - .short _021D3C8A - _021D3C66 - 2 ; case 2 - .short _021D3C96 - _021D3C66 - 2 ; case 3 - .short _021D3CA2 - _021D3C66 - 2 ; case 4 - .short _021D3CAE - _021D3C66 - 2 ; case 5 - .short _021D3CBA - _021D3C66 - 2 ; case 6 - .short _021D3CC6 - _021D3C66 - 2 ; case 7 - .short _021D3CD2 - _021D3C66 - 2 ; case 8 - .short _021D3CDE - _021D3C66 - 2 ; case 9 -_021D3C7A: - mov r4, #0 - b _021D3CEE -_021D3C7E: - mov r1, #7 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3C8A: - mov r1, #8 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3C96: - mov r1, #9 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CA2: - mov r1, #0xa - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CAE: - mov r1, #0xb - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CBA: - mov r1, #0xc - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CC6: - mov r1, #0xd - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CD2: - mov r1, #0xe - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CDE: - mov r1, #0xf - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3CEE -_021D3CEA: - bl sub_02022974 -_021D3CEE: - cmp r4, #0 - beq _021D3D16 - str r4, [sp] - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [sp, #0x38] - ldr r3, [sp, #0x30] - str r0, [sp, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D39E4 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D3D16: - ldr r2, [sp, #0x30] - ldr r1, [sp, #0x10] - add r0, r7, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r0, [sp, #0x30] - str r0, [r6, #0] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3C48 - - thumb_func_start ov21_021D3D2C -ov21_021D3D2C: ; 0x021D3D2C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - str r3, [sp, #0x10] - ldr r0, [sp, #0x34] - cmp r5, #0x11 - bhi _021D3E3E - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D3D4A: ; jump table - .short _021D3D6E - _021D3D4A - 2 ; case 0 - .short _021D3D72 - _021D3D4A - 2 ; case 1 - .short _021D3D7E - _021D3D4A - 2 ; case 2 - .short _021D3D8A - _021D3D4A - 2 ; case 3 - .short _021D3D96 - _021D3D4A - 2 ; case 4 - .short _021D3DA2 - _021D3D4A - 2 ; case 5 - .short _021D3DAE - _021D3D4A - 2 ; case 6 - .short _021D3DBA - _021D3D4A - 2 ; case 7 - .short _021D3DC6 - _021D3D4A - 2 ; case 8 - .short _021D3DD2 - _021D3D4A - 2 ; case 9 - .short _021D3DDE - _021D3D4A - 2 ; case 10 - .short _021D3DEA - _021D3D4A - 2 ; case 11 - .short _021D3DF6 - _021D3D4A - 2 ; case 12 - .short _021D3E02 - _021D3D4A - 2 ; case 13 - .short _021D3E0E - _021D3D4A - 2 ; case 14 - .short _021D3E1A - _021D3D4A - 2 ; case 15 - .short _021D3E26 - _021D3D4A - 2 ; case 16 - .short _021D3E32 - _021D3D4A - 2 ; case 17 -_021D3D6E: - mov r4, #0 - b _021D3E42 -_021D3D72: - mov r1, #0x10 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3D7E: - mov r1, #0x11 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3D8A: - mov r1, #0x12 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3D96: - mov r1, #0x13 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DA2: - mov r1, #0x14 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DAE: - mov r1, #0x15 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DBA: - mov r1, #0x16 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DC6: - mov r1, #0x17 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DD2: - mov r1, #0x18 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DDE: - mov r1, #0x19 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DEA: - mov r1, #0x1a - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3DF6: - mov r1, #0x1b - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3E02: - mov r1, #0x1c - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3E0E: - mov r1, #0x1d - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3E1A: - mov r1, #0x1e - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3E26: - mov r1, #0x1f - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3E32: - mov r1, #0x20 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3E42 -_021D3E3E: - bl sub_02022974 -_021D3E42: - cmp r4, #0 - beq _021D3E6A - str r4, [sp] - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x38] - ldr r3, [sp, #0x30] - str r0, [sp, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D39E4 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D3E6A: - ldr r2, [sp, #0x30] - ldr r1, [sp, #0x10] - add r0, r7, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r0, [sp, #0x30] - str r0, [r6, #0] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3D2C - - thumb_func_start ov21_021D3E80 -ov21_021D3E80: ; 0x021D3E80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - str r3, [sp, #0x10] - ldr r0, [sp, #0x34] - cmp r5, #0xe - bhi _021D3F68 - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D3E9E: ; jump table - .short _021D3EBC - _021D3E9E - 2 ; case 0 - .short _021D3EC0 - _021D3E9E - 2 ; case 1 - .short _021D3ECC - _021D3E9E - 2 ; case 2 - .short _021D3ED8 - _021D3E9E - 2 ; case 3 - .short _021D3EE4 - _021D3E9E - 2 ; case 4 - .short _021D3EF0 - _021D3E9E - 2 ; case 5 - .short _021D3EFC - _021D3E9E - 2 ; case 6 - .short _021D3F08 - _021D3E9E - 2 ; case 7 - .short _021D3F14 - _021D3E9E - 2 ; case 8 - .short _021D3F20 - _021D3E9E - 2 ; case 9 - .short _021D3F2C - _021D3E9E - 2 ; case 10 - .short _021D3F38 - _021D3E9E - 2 ; case 11 - .short _021D3F44 - _021D3E9E - 2 ; case 12 - .short _021D3F50 - _021D3E9E - 2 ; case 13 - .short _021D3F5C - _021D3E9E - 2 ; case 14 -_021D3EBC: - mov r4, #0 - b _021D3F6C -_021D3EC0: - mov r1, #0x21 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3ECC: - mov r1, #0x22 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3ED8: - mov r1, #0x23 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3EE4: - mov r1, #0x24 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3EF0: - mov r1, #0x25 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3EFC: - mov r1, #0x26 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F08: - mov r1, #0x27 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F14: - mov r1, #0x28 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F20: - mov r1, #0x29 - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F2C: - mov r1, #0x2a - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F38: - mov r1, #0x2b - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F44: - mov r1, #0x2c - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F50: - mov r1, #0x2d - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F5C: - mov r1, #0x2e - add r2, sp, #0x14 - bl ov21_021D3B64 - add r4, r0, #0 - b _021D3F6C -_021D3F68: - bl sub_02022974 -_021D3F6C: - cmp r4, #0 - beq _021D3F94 - str r4, [sp] - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [sp, #0x38] - ldr r3, [sp, #0x30] - str r0, [sp, #0xc] - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D39E4 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D3F94: - ldr r2, [sp, #0x30] - ldr r1, [sp, #0x10] - add r0, r7, #0 - lsl r2, r2, #1 - bl sub_020D50B8 - ldr r0, [sp, #0x30] - str r0, [r6, #0] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D3E80 - - thumb_func_start ov21_021D3FA8 -ov21_021D3FA8: ; 0x021D3FA8 - push {r3, r4, r5, r6} - mov r3, #0 - str r3, [r1, #0] - ldr r4, _021D3FDC ; =0x00000F6C - str r3, [r2, #0] - ldr r4, [r0, r4] - cmp r4, #0 - ble _021D3FD8 - ldr r5, _021D3FDC ; =0x00000F6C - add r4, r0, #0 -_021D3FBC: - ldr r6, [r4, #4] - cmp r6, #2 - bne _021D3FC8 - ldr r6, [r2, #0] - add r6, r6, #1 - str r6, [r2, #0] -_021D3FC8: - ldr r6, [r1, #0] - add r3, r3, #1 - add r6, r6, #1 - str r6, [r1, #0] - ldr r6, [r0, r5] - add r4, #8 - cmp r3, r6 - blt _021D3FBC -_021D3FD8: - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_021D3FDC: .word 0x00000F6C - thumb_func_end ov21_021D3FA8 - - thumb_func_start ov21_021D3FE0 -ov21_021D3FE0: ; 0x021D3FE0 - push {r3, r4, r5, lr} - mov r1, #0x48 - add r5, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D3FF2 - bl sub_02022974 -_021D3FF2: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x48 - bl sub_020D5124 - mov r0, #5 - str r0, [r4, #8] - str r5, [r4, #0x44] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D3FE0 - - thumb_func_start ov21_021D4008 -ov21_021D4008: ; 0x021D4008 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _021D4016 - bl sub_02022974 -_021D4016: - cmp r4, #0 - bne _021D401E - bl sub_02022974 -_021D401E: - add r0, r5, #0 - bl ov21_021D41A8 - cmp r0, #0 - bne _021D402C - bl sub_02022974 -_021D402C: - ldr r0, [r4, #0] - str r0, [r5, #0] - ldr r0, [r4, #4] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #8] - add r0, r5, #0 - add r0, #0xc - bl ov21_021D41D8 - ldr r0, [r5, #0x44] - str r0, [r5, #0x10] - add r0, r5, #0 - add r0, #0x2c - bl ov21_021D41E4 - ldr r0, [r5, #0x44] - str r0, [r5, #0x30] - ldr r0, [r4, #8] - ldr r0, [r0, #0] - str r0, [r5, #0x20] - ldr r0, [r4, #8] - ldr r0, [r0, #4] - str r0, [r5, #0x24] - ldr r0, [r4, #8] - ldr r0, [r0, #8] - str r0, [r5, #0x28] - ldr r0, [r4, #0xc] - ldr r0, [r0, #0] - str r0, [r5, #0x38] - ldr r0, [r4, #0xc] - ldr r0, [r0, #4] - str r0, [r5, #0x3c] - ldr r0, [r4, #0xc] - ldr r0, [r0, #8] - str r0, [r5, #0x40] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4008 - - thumb_func_start ov21_021D4078 -ov21_021D4078: ; 0x021D4078 - push {r4, lr} - add r4, r0, #0 - bne _021D4082 - bl sub_02022974 -_021D4082: - ldr r0, [r4, #8] - cmp r0, #5 - bhi _021D40F6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4094: ; jump table - .short _021D40A0 - _021D4094 - 2 ; case 0 - .short _021D40FA - _021D4094 - 2 ; case 1 - .short _021D40BC - _021D4094 - 2 ; case 2 - .short _021D40FA - _021D4094 - 2 ; case 3 - .short _021D40DA - _021D4094 - 2 ; case 4 - .short _021D40F2 - _021D4094 - 2 ; case 5 -_021D40A0: - add r1, r4, #0 - ldr r0, [r4, #0x20] - ldr r2, [r4, #0] - add r1, #0xc - bl ov21_021D41EC - cmp r0, #1 - bne _021D40FA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0xc] - b _021D40FA -_021D40BC: - add r1, r4, #0 - ldr r0, [r4, #0x24] - ldr r2, [r4, #0] - add r1, #0xc - bl ov21_021D41EC - cmp r0, #1 - bne _021D40FA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0xc] - str r0, [r4, #0x2c] - b _021D40FA -_021D40DA: - add r1, r4, #0 - ldr r0, [r4, #0x28] - ldr r2, [r4, #0] - add r1, #0xc - bl ov21_021D41EC - cmp r0, #1 - bne _021D40FA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _021D40FA -_021D40F2: - mov r0, #1 - pop {r4, pc} -_021D40F6: - bl sub_02022974 -_021D40FA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4078 - - thumb_func_start ov21_021D4100 -ov21_021D4100: ; 0x021D4100 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bne _021D410C - bl sub_02022974 -_021D410C: - ldr r0, [r4, #8] - cmp r0, #5 - bhi _021D418A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D411E: ; jump table - .short _021D418E - _021D411E - 2 ; case 0 - .short _021D412A - _021D411E - 2 ; case 1 - .short _021D414E - _021D411E - 2 ; case 2 - .short _021D4164 - _021D411E - 2 ; case 3 - .short _021D418E - _021D411E - 2 ; case 4 - .short _021D4184 - _021D411E - 2 ; case 5 -_021D412A: - add r0, r4, #0 - add r0, #0xc - str r0, [sp] - add r2, r4, #0 - ldr r0, [r4, #0x38] - ldr r1, [r4, #4] - ldr r3, [r4, #0] - add r2, #0x2c - bl ov21_021D420C - cmp r0, #1 - bne _021D418E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0x2c] - b _021D418E -_021D414E: - add r0, r4, #0 - add r0, #0xc - str r0, [sp] - add r2, r4, #0 - ldr r0, [r4, #0x3c] - ldr r1, [r4, #4] - ldr r3, [r4, #0] - add r2, #0x2c - bl ov21_021D420C - b _021D418E -_021D4164: - add r0, r4, #0 - add r0, #0xc - str r0, [sp] - add r2, r4, #0 - ldr r0, [r4, #0x40] - ldr r1, [r4, #4] - ldr r3, [r4, #0] - add r2, #0x2c - bl ov21_021D420C - cmp r0, #1 - bne _021D418E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _021D418E -_021D4184: - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_021D418A: - bl sub_02022974 -_021D418E: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021D4100 - - thumb_func_start ov21_021D4194 -ov21_021D4194: ; 0x021D4194 - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov21_021D4194 - - thumb_func_start ov21_021D4198 -ov21_021D4198: ; 0x021D4198 - push {r4, lr} - add r4, r0, #0 - bne _021D41A2 - bl sub_02022974 -_021D41A2: - mov r0, #1 - str r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov21_021D4198 - - thumb_func_start ov21_021D41A8 -ov21_021D41A8: ; 0x021D41A8 - push {r4, lr} - add r4, r0, #0 - bne _021D41B2 - bl sub_02022974 -_021D41B2: - ldr r0, [r4, #8] - cmp r0, #5 - bne _021D41BC - mov r0, #1 - pop {r4, pc} -_021D41BC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov21_021D41A8 - - thumb_func_start ov21_021D41C0 -ov21_021D41C0: ; 0x021D41C0 - push {r4, lr} - add r4, r0, #0 - bne _021D41CA - bl sub_02022974 -_021D41CA: - ldr r0, [r4, #8] - cmp r0, #2 - bne _021D41D4 - mov r0, #1 - pop {r4, pc} -_021D41D4: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov21_021D41C0 - - thumb_func_start ov21_021D41D8 -ov21_021D41D8: ; 0x021D41D8 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #8] - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D41D8 - - thumb_func_start ov21_021D41E4 -ov21_021D41E4: ; 0x021D41E4 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #8] - bx lr - thumb_func_end ov21_021D41E4 - - thumb_func_start ov21_021D41EC -ov21_021D41EC: ; 0x021D41EC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0 - bne _021D41FC - bl sub_02022974 -_021D41FC: - cmp r4, #0 - bne _021D4204 - bl sub_02022974 -_021D4204: - add r0, r4, #0 - add r1, r6, #0 - blx r5 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D41EC - - thumb_func_start ov21_021D420C -ov21_021D420C: ; 0x021D420C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _021D421E - bl sub_02022974 -_021D421E: - cmp r4, #0 - bne _021D4226 - bl sub_02022974 -_021D4226: - ldr r0, [sp, #0x18] - cmp r0, #0 - bne _021D4230 - bl sub_02022974 -_021D4230: - ldr r3, [sp, #0x18] - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - blx r5 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D420C - - thumb_func_start ov21_021D423C -ov21_021D423C: ; 0x021D423C - push {r4, lr} - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021D424C - bl sub_02022974 -_021D424C: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D423C - - thumb_func_start ov21_021D426C -ov21_021D426C: ; 0x021D426C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0 - bne _021D427C - bl sub_02022974 -_021D427C: - str r4, [r5, #0] - str r6, [r5, #4] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D426C - - thumb_func_start ov21_021D4284 -ov21_021D4284: ; 0x021D4284 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r4, #0 - bne _021D4292 - bl sub_02022974 -_021D4292: - add r0, r4, #0 - bl ov21_021D42EC - cmp r0, #0 - bne _021D42AE - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D42FC - add r1, r0, #0 - beq _021D42AE - add r0, r4, #0 - bl ov21_021D4334 -_021D42AE: - add r0, r4, #0 - bl ov21_021D42EC - cmp r0, #1 - bne _021D42CE - ldr r1, [r4, #8] - add r0, r1, #0 - ldr r1, [r1, #4] - add r0, #8 - blx r1 - cmp r0, #1 - bne _021D42CE - add r0, r4, #0 - mov r1, #0 - bl ov21_021D4334 -_021D42CE: - ldr r0, [r4, #8] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4284 - - thumb_func_start ov21_021D42D4 -ov21_021D42D4: ; 0x021D42D4 - push {r4, lr} - add r4, r0, #0 - bne _021D42DE - bl sub_02022974 -_021D42DE: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D42E8 - mov r0, #1 - pop {r4, pc} -_021D42E8: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov21_021D42D4 - - thumb_func_start ov21_021D42EC -ov21_021D42EC: ; 0x021D42EC - ldr r0, [r0, #8] - cmp r0, #0 - beq _021D42F6 - mov r0, #1 - bx lr -_021D42F6: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D42EC - - thumb_func_start ov21_021D42FC -ov21_021D42FC: ; 0x021D42FC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r7, r1, #0 - mov r6, #0 - cmp r0, #0 - ble _021D4330 - add r4, r6, #0 -_021D430C: - ldr r0, [r5, #0] - cmp r0, #0 - bne _021D4316 - bl sub_02022974 -_021D4316: - ldr r0, [r5, #0] - ldr r1, [r0, r4] - tst r1, r7 - beq _021D4326 - mov r1, #0x14 - mul r1, r6 - add r0, r0, r1 - pop {r3, r4, r5, r6, r7, pc} -_021D4326: - ldr r0, [r5, #4] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _021D430C -_021D4330: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D42FC - - thumb_func_start ov21_021D4334 -ov21_021D4334: ; 0x021D4334 - str r1, [r0, #8] - cmp r1, #0 - beq _021D433E - mov r0, #0 - str r0, [r1, #8] -_021D433E: - bx lr - thumb_func_end ov21_021D4334 - - thumb_func_start ov21_021D4340 -ov21_021D4340: ; 0x021D4340 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r2, [r4, #8] - cmp r0, #3 - bhi _021D43A0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4358: ; jump table - .short _021D4360 - _021D4358 - 2 ; case 0 - .short _021D436E - _021D4358 - 2 ; case 1 - .short _021D4380 - _021D4358 - 2 ; case 2 - .short _021D4392 - _021D4358 - 2 ; case 3 -_021D4360: - ldr r0, [r2, #4] - bl ov21_021D4198 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D43A4 -_021D436E: - ldr r0, [r2, #4] - bl ov21_021D41A8 - cmp r0, #1 - bne _021D43A4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D43A4 -_021D4380: - ldr r0, [r2, #0] - ldr r1, [r2, #8] - ldr r2, [r2, #4] - bl ov21_021D4628 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D43A4 -_021D4392: - ldr r0, [r2, #4] - bl ov21_021D41C0 - cmp r0, #1 - bne _021D43A4 - mov r0, #1 - pop {r4, pc} -_021D43A0: - bl sub_02022974 -_021D43A4: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov21_021D4340 - - thumb_func_start ov21_021D43A8 -ov21_021D43A8: ; 0x021D43A8 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r4, [r5, #8] - cmp r0, #0 - beq _021D43C0 - cmp r0, #1 - beq _021D43E0 - cmp r0, #2 - beq _021D441E - b _021D4428 -_021D43C0: - ldr r0, [r4, #0] - bl ov21_021D4198 - ldr r0, [r4, #4] - bl ov21_021D4198 - ldr r0, [r4, #8] - bl ov21_021D4198 - ldr r0, [r4, #0xc] - bl ov21_021D4198 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D442C -_021D43E0: - ldr r0, [r4, #0] - bl ov21_021D41A8 - str r0, [sp] - ldr r0, [r4, #4] - bl ov21_021D41A8 - str r0, [sp, #4] - ldr r0, [r4, #8] - bl ov21_021D41A8 - str r0, [sp, #8] - ldr r0, [r4, #0xc] - bl ov21_021D41A8 - str r0, [sp, #0xc] - mov r1, #0 - add r2, sp, #0 -_021D4404: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021D4412 - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #4 - blt _021D4404 -_021D4412: - cmp r1, #4 - blt _021D442C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D442C -_021D441E: - ldr r1, [r4, #0x10] - mov r0, #1 - str r0, [r1, #0] - add sp, #0x10 - pop {r3, r4, r5, pc} -_021D4428: - bl sub_02022974 -_021D442C: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D43A8 - - thumb_func_start ov21_021D4434 -ov21_021D4434: ; 0x021D4434 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r4, [r5, #8] - cmp r0, #3 - bls _021D4444 - b _021D454C -_021D4444: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4450: ; jump table - .short _021D4458 - _021D4450 - 2 ; case 0 - .short _021D4478 - _021D4450 - 2 ; case 1 - .short _021D44B6 - _021D4450 - 2 ; case 2 - .short _021D44E6 - _021D4450 - 2 ; case 3 -_021D4458: - ldr r0, [r4, #0] - bl ov21_021D4198 - ldr r0, [r4, #4] - bl ov21_021D4198 - ldr r0, [r4, #8] - bl ov21_021D4198 - ldr r0, [r4, #0xc] - bl ov21_021D4198 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4550 -_021D4478: - ldr r0, [r4, #0] - bl ov21_021D41A8 - str r0, [sp] - ldr r0, [r4, #4] - bl ov21_021D41A8 - str r0, [sp, #4] - ldr r0, [r4, #8] - bl ov21_021D41A8 - str r0, [sp, #8] - ldr r0, [r4, #0xc] - bl ov21_021D41A8 - str r0, [sp, #0xc] - mov r1, #0 - add r2, sp, #0 -_021D449C: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021D44AA - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #4 - blt _021D449C -_021D44AA: - cmp r1, #4 - blt _021D4550 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4550 -_021D44B6: - ldr r0, [r4, #0x20] - ldr r1, [r4, #0x10] - ldr r2, [r4, #0] - bl ov21_021D4628 - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x14] - ldr r2, [r4, #4] - bl ov21_021D4628 - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x18] - ldr r2, [r4, #8] - bl ov21_021D4628 - ldr r0, [r4, #0x2c] - ldr r1, [r4, #0x1c] - ldr r2, [r4, #0xc] - bl ov21_021D4628 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4550 -_021D44E6: - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _021D44F6 - ldr r0, [r4, #0] - bl ov21_021D41C0 - str r0, [sp] - b _021D44FA -_021D44F6: - mov r0, #1 - str r0, [sp] -_021D44FA: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021D4508 - ldr r0, [r4, #4] - bl ov21_021D41C0 - str r0, [sp, #4] -_021D4508: - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _021D4518 - ldr r0, [r4, #8] - bl ov21_021D41C0 - str r0, [sp, #8] - b _021D451C -_021D4518: - mov r0, #1 - str r0, [sp, #8] -_021D451C: - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021D452C - ldr r0, [r4, #0xc] - bl ov21_021D41C0 - str r0, [sp, #0xc] - b _021D4530 -_021D452C: - mov r0, #1 - str r0, [sp, #0xc] -_021D4530: - mov r2, #0 - add r1, sp, #0 -_021D4534: - ldr r0, [r1, #0] - cmp r0, #0 - beq _021D4542 - add r2, r2, #1 - add r1, r1, #4 - cmp r2, #4 - blt _021D4534 -_021D4542: - cmp r2, #4 - blt _021D4550 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D454C: - bl sub_02022974 -_021D4550: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4434 - - thumb_func_start ov21_021D4558 -ov21_021D4558: ; 0x021D4558 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r4, [r5, #8] - cmp r0, #3 - bhi _021D461C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4572: ; jump table - .short _021D457A - _021D4572 - 2 ; case 0 - .short _021D458E - _021D4572 - 2 ; case 1 - .short _021D45BC - _021D4572 - 2 ; case 2 - .short _021D45D8 - _021D4572 - 2 ; case 3 -_021D457A: - ldr r0, [r4, #0] - bl ov21_021D4198 - ldr r0, [r4, #4] - bl ov21_021D4198 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4620 -_021D458E: - ldr r0, [r4, #0] - bl ov21_021D41A8 - str r0, [sp] - ldr r0, [r4, #4] - bl ov21_021D41A8 - str r0, [sp, #4] - mov r1, #0 - add r2, sp, #0 -_021D45A2: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021D45B0 - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #2 - blt _021D45A2 -_021D45B0: - cmp r1, #2 - blt _021D4620 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4620 -_021D45BC: - ldr r0, [r4, #0x10] - ldr r1, [r4, #8] - ldr r2, [r4, #0] - bl ov21_021D4628 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0xc] - ldr r2, [r4, #4] - bl ov21_021D4628 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4620 -_021D45D8: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _021D45E8 - ldr r0, [r4, #0] - bl ov21_021D41C0 - str r0, [sp] - b _021D45EC -_021D45E8: - mov r0, #1 - str r0, [sp] -_021D45EC: - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D45FC - ldr r0, [r4, #4] - bl ov21_021D41C0 - str r0, [sp, #4] - b _021D4600 -_021D45FC: - mov r0, #1 - str r0, [sp, #4] -_021D4600: - mov r2, #0 - add r1, sp, #0 -_021D4604: - ldr r0, [r1, #0] - cmp r0, #0 - beq _021D4612 - add r2, r2, #1 - add r1, r1, #4 - cmp r2, #2 - blt _021D4604 -_021D4612: - cmp r2, #2 - blt _021D4620 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D461C: - bl sub_02022974 -_021D4620: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4558 - - thumb_func_start ov21_021D4628 -ov21_021D4628: ; 0x021D4628 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - beq _021D465A - ldr r0, [r5, #0] - add r1, sp, #0 - str r0, [sp] - ldr r0, [r5, #4] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #8 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x14 - str r0, [sp, #0xc] - add r0, r2, #0 - bl ov21_021D4008 - ldr r1, [r5, #0x20] - ldr r2, [r5, #0x24] - add r0, r4, #0 - bl ov21_021D426C -_021D465A: - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4628 - - thumb_func_start ov21_021D4660 -ov21_021D4660: ; 0x021D4660 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _021D466E - bl sub_02022974 -_021D466E: - ldr r0, [r4, #0x10] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x10] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4660 - - thumb_func_start ov21_021D467C -ov21_021D467C: ; 0x021D467C - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r1, _021D4700 ; =ov21_021D4434 - str r3, [r6, #0] - str r1, [r6, #4] - mov r1, #0x30 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4696 - bl sub_02022974 -_021D4696: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x30 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r5, #0 - bl ov21_021D1314 - str r0, [r4, #8] - add r0, r5, #0 - bl ov21_021D1328 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov21_021D133C - str r0, [r4, #0x10] - add r0, r5, #0 - bl ov21_021D1350 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov21_021D1364 - str r0, [r4, #0x18] - add r0, r5, #0 - bl ov21_021D1378 - str r0, [r4, #0x1c] - add r0, r5, #0 - mov r1, #1 - bl ov21_021D1410 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #1 - bl ov21_021D1430 - str r0, [r4, #0x24] - mov r0, #0 - str r0, [r4, #0x28] - str r0, [r4, #0x2c] - str r4, [r6, #0x10] - pop {r4, r5, r6, pc} - nop -_021D4700: .word ov21_021D4434 - thumb_func_end ov21_021D467C - - thumb_func_start ov21_021D4704 -ov21_021D4704: ; 0x021D4704 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4758 ; =ov21_021D43A8 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0x14 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D471E - bl sub_02022974 -_021D471E: - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_021D4724: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D4724 - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D1314 - str r0, [r4, #8] - add r0, r6, #0 - bl ov21_021D1328 - str r0, [r4, #0xc] - add r0, r6, #0 - bl ov21_021D13DC - str r0, [r4, #0x10] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D4758: .word ov21_021D43A8 - thumb_func_end ov21_021D4704 - - thumb_func_start ov21_021D475C -ov21_021D475C: ; 0x021D475C - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r1, _021D47EC ; =ov21_021D4434 - str r3, [r6, #0] - str r1, [r6, #4] - mov r1, #0x30 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4776 - bl sub_02022974 -_021D4776: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x30 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r5, #0 - bl ov21_021D1314 - str r0, [r4, #8] - add r0, r5, #0 - bl ov21_021D1328 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov21_021D133C - str r0, [r4, #0x10] - add r0, r5, #0 - bl ov21_021D1350 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov21_021D1364 - str r0, [r4, #0x18] - add r0, r5, #0 - bl ov21_021D1378 - str r0, [r4, #0x1c] - add r0, r5, #0 - mov r1, #2 - bl ov21_021D1410 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #2 - bl ov21_021D1430 - str r0, [r4, #0x24] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #0x28] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1430 - str r0, [r4, #0x2c] - str r4, [r6, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D47EC: .word ov21_021D4434 - thumb_func_end ov21_021D475C - - thumb_func_start ov21_021D47F0 -ov21_021D47F0: ; 0x021D47F0 - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r1, _021D4874 ; =ov21_021D4434 - str r3, [r6, #0] - str r1, [r6, #4] - mov r1, #0x30 - add r5, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D480A - bl sub_02022974 -_021D480A: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x30 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r5, #0 - bl ov21_021D1314 - str r0, [r4, #8] - add r0, r5, #0 - bl ov21_021D1328 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov21_021D133C - str r0, [r4, #0x10] - add r0, r5, #0 - bl ov21_021D1350 - str r0, [r4, #0x14] - add r0, r5, #0 - bl ov21_021D1364 - str r0, [r4, #0x18] - add r0, r5, #0 - bl ov21_021D1378 - str r0, [r4, #0x1c] - add r0, r5, #0 - mov r1, #0 - bl ov21_021D1410 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #0 - bl ov21_021D1430 - str r0, [r4, #0x24] - mov r0, #0 - str r0, [r4, #0x28] - str r0, [r4, #0x2c] - str r4, [r6, #0x10] - pop {r4, r5, r6, pc} - nop -_021D4874: .word ov21_021D4434 - thumb_func_end ov21_021D47F0 - - thumb_func_start ov21_021D4878 -ov21_021D4878: ; 0x021D4878 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _021D48B4 ; =ov21_021D4340 - str r3, [r5, #0] - add r6, r1, #0 - str r0, [r5, #4] - add r0, r2, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021D4894 - bl sub_02022974 -_021D4894: - add r0, r6, #0 - mov r1, #0 - bl ov21_021D1410 - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - nop -_021D48B4: .word ov21_021D4340 - thumb_func_end ov21_021D4878 - - thumb_func_start ov21_021D48B8 -ov21_021D48B8: ; 0x021D48B8 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4918 ; =ov21_021D4558 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0x18 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D48D2 - bl sub_02022974 -_021D48D2: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D48D8: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D48D8 - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - bl ov21_021D1350 - str r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #6 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r6, #0 - mov r1, #4 - bl ov21_021D1430 - str r0, [r4, #0x14] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D4918: .word ov21_021D4558 - thumb_func_end ov21_021D48B8 - - thumb_func_start ov21_021D491C -ov21_021D491C: ; 0x021D491C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D497C ; =ov21_021D4558 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0x18 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4936 - bl sub_02022974 -_021D4936: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D493C: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D493C - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - bl ov21_021D1350 - str r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #7 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r6, #0 - mov r1, #5 - bl ov21_021D1430 - str r0, [r4, #0x14] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D497C: .word ov21_021D4558 - thumb_func_end ov21_021D491C - - thumb_func_start ov21_021D4980 -ov21_021D4980: ; 0x021D4980 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D49E0 ; =ov21_021D4558 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0x18 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D499A - bl sub_02022974 -_021D499A: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D49A0: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D49A0 - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - bl ov21_021D1350 - str r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #8 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r6, #0 - mov r1, #6 - bl ov21_021D1430 - str r0, [r4, #0x14] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D49E0: .word ov21_021D4558 - thumb_func_end ov21_021D4980 - - thumb_func_start ov21_021D49E4 -ov21_021D49E4: ; 0x021D49E4 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4A38 ; =ov21_021D4340 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0xc - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D49FE - bl sub_02022974 -_021D49FE: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - mov r1, #8 - bl ov21_021D1410 - str r0, [r4, #0] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - nop -_021D4A38: .word ov21_021D4340 - thumb_func_end ov21_021D49E4 - - thumb_func_start ov21_021D4A3C -ov21_021D4A3C: ; 0x021D4A3C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4A90 ; =ov21_021D4340 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0xc - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4A56 - bl sub_02022974 -_021D4A56: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - mov r1, #9 - bl ov21_021D1410 - str r0, [r4, #0] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - nop -_021D4A90: .word ov21_021D4340 - thumb_func_end ov21_021D4A3C - - thumb_func_start ov21_021D4A94 -ov21_021D4A94: ; 0x021D4A94 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4AF4 ; =ov21_021D4558 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0x18 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4AAE - bl sub_02022974 -_021D4AAE: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D4AB4: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D4AB4 - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - bl ov21_021D1350 - str r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #2 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r6, #0 - mov r1, #2 - bl ov21_021D1430 - str r0, [r4, #0x14] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D4AF4: .word ov21_021D4558 - thumb_func_end ov21_021D4A94 - - thumb_func_start ov21_021D4AF8 -ov21_021D4AF8: ; 0x021D4AF8 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4B4C ; =ov21_021D4340 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0xc - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4B12 - bl sub_02022974 -_021D4B12: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - mov r1, #2 - bl ov21_021D1410 - str r0, [r4, #0] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - nop -_021D4B4C: .word ov21_021D4340 - thumb_func_end ov21_021D4AF8 - - thumb_func_start ov21_021D4B50 -ov21_021D4B50: ; 0x021D4B50 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4BB0 ; =ov21_021D4558 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0x18 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4B6A - bl sub_02022974 -_021D4B6A: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D4B70: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D4B70 - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #0] - add r0, r6, #0 - bl ov21_021D1300 - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - bl ov21_021D1350 - str r0, [r4, #0xc] - add r0, r6, #0 - mov r1, #3 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r6, #0 - mov r1, #7 - bl ov21_021D1430 - str r0, [r4, #0x14] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D4BB0: .word ov21_021D4558 - thumb_func_end ov21_021D4B50 - - thumb_func_start ov21_021D4BB4 -ov21_021D4BB4: ; 0x021D4BB4 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _021D4C08 ; =ov21_021D4340 - str r3, [r5, #0] - str r1, [r5, #4] - mov r1, #0xc - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D4BCE - bl sub_02022974 -_021D4BCE: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r6, #0 - bl ov21_021D12EC - str r0, [r4, #4] - add r0, r6, #0 - bl ov21_021D133C - str r0, [r4, #8] - add r0, r6, #0 - mov r1, #4 - bl ov21_021D1410 - str r0, [r4, #0] - str r4, [r5, #0x10] - pop {r4, r5, r6, pc} - nop -_021D4C08: .word ov21_021D4340 - thumb_func_end ov21_021D4BB4 - - thumb_func_start ov21_021D4C0C -ov21_021D4C0C: ; 0x021D4C0C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bne _021D4C20 - bl sub_02022974 -_021D4C20: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D4C26: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D4C26 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - bl sub_02012744 - str r0, [r4, #0] - ldr r1, [r5, #8] - ldr r0, [r5, #0xc] - lsl r1, r1, #4 - bl sub_02018144 - str r0, [r4, #0xc] - cmp r0, #0 - bne _021D4C4C - bl sub_02022974 -_021D4C4C: - ldr r2, [r5, #8] - ldr r0, [r4, #0xc] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r0, [r5, #8] - str r0, [r4, #0x10] - ldr r0, [r5, #0] - str r0, [r4, #4] - ldr r0, [r5, #4] - str r0, [r4, #8] - ldr r0, [r5, #0xc] - str r0, [r4, #0x14] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D4C0C - - thumb_func_start ov21_021D4C6C -ov21_021D4C6C: ; 0x021D4C6C - push {r4, lr} - add r4, r0, #0 - bne _021D4C76 - bl sub_02022974 -_021D4C76: - add r0, r4, #0 - bl ov21_021D4D3C - ldr r0, [r4, #0xc] - bl sub_020181C4 - ldr r0, [r4, #0] - bl sub_020127BC - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D4C8E: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D4C8E - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4C6C - - thumb_func_start ov21_021D4CA0 -ov21_021D4CA0: ; 0x021D4CA0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - bl sub_02012898 - add r1, r0, #0 - add r0, r4, #0 - bl ov21_021D4CB8 - pop {r4, pc} - thumb_func_end ov21_021D4CA0 - - thumb_func_start ov21_021D4CB8 -ov21_021D4CB8: ; 0x021D4CB8 - push {r4, r5, r6, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - bl ov21_021D4EB4 - add r4, r0, #0 - bne _021D4CCE - bl sub_02022974 -_021D4CCE: - ldr r2, [r5, #0x20] - add r0, r6, #0 - mov r1, #1 - add r3, r4, #4 - bl sub_0201ED94 - ldr r0, [r5, #0] - ldr r0, [r0, #0] - str r0, [sp] - ldr r0, [r5, #4] - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r0, [r0, #4] - str r0, [sp, #8] - ldr r0, [r5, #8] - str r0, [sp, #0xc] - ldr r0, [r5, #0xc] - str r0, [sp, #0x10] - ldr r0, [r4, #8] - str r0, [sp, #0x14] - ldr r0, [r5, #0x10] - str r0, [sp, #0x18] - ldr r0, [r5, #0x14] - str r0, [sp, #0x1c] - ldr r0, [r5, #0x18] - str r0, [sp, #0x20] - ldr r0, [r5, #0x1c] - str r0, [sp, #0x24] - ldr r0, [r5, #0x20] - str r0, [sp, #0x28] - ldr r0, [r5, #0x24] - str r0, [sp, #0x2c] - add r0, sp, #0 - bl sub_020127E8 - str r0, [r4, #0] - add r0, r4, #0 - add sp, #0x30 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D4CB8 - - thumb_func_start ov21_021D4D1C -ov21_021D4D1C: ; 0x021D4D1C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02012870 - add r0, r4, #4 - bl sub_0201EE28 - mov r1, #0x10 - mov r0, #0 -_021D4D30: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _021D4D30 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4D1C - - thumb_func_start ov21_021D4D3C -ov21_021D4D3C: ; 0x021D4D3C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - mov r6, #0 - cmp r0, #0 - ble _021D4D68 - add r4, r6, #0 -_021D4D4A: - ldr r0, [r5, #0xc] - add r0, r0, r4 - bl ov21_021D4EA4 - cmp r0, #0 - beq _021D4D5E - ldr r0, [r5, #0xc] - add r0, r0, r4 - bl ov21_021D4D1C -_021D4D5E: - ldr r0, [r5, #0x10] - add r6, r6, #1 - add r4, #0x10 - cmp r6, r0 - blt _021D4D4A -_021D4D68: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D4D3C - - thumb_func_start ov21_021D4D6C -ov21_021D4D6C: ; 0x021D4D6C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x14] - add r4, r1, #0 - mov r1, #1 - add r6, r2, #0 - bl sub_0201A778 - add r7, r0, #0 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - lsl r2, r4, #0x18 - lsl r3, r6, #0x18 - ldr r0, [r5, #8] - add r1, r7, #0 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A870 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D4D6C - - thumb_func_start ov21_021D4DA0 -ov21_021D4DA0: ; 0x021D4DA0 - ldr r3, _021D4DA8 ; =sub_0201A928 - mov r1, #1 - bx r3 - nop -_021D4DA8: .word sub_0201A928 - thumb_func_end ov21_021D4DA0 - - thumb_func_start ov21_021D4DAC -ov21_021D4DAC: ; 0x021D4DAC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r3, #0 - add r6, r1, #0 - ldr r3, [r5, #0x14] - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - add r5, r0, #0 - bne _021D4DC8 - bl sub_02022974 -_021D4DC8: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x20] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D4E0C ; =0x00030201 - mov r1, #2 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r6, #0 - add r2, r4, #0 - bl sub_0201D78C - mov r0, #2 - add r1, r4, #0 - mov r2, #0 - bl sub_02002D7C - add r6, r0, #0 - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_0200B190 - add r0, r6, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D4E0C: .word 0x00030201 - thumb_func_end ov21_021D4DAC - - thumb_func_start ov21_021D4E10 -ov21_021D4E10: ; 0x021D4E10 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r0, #0 - add r6, r3, #0 - add r5, r1, #0 - ldr r3, [r4, #0x14] - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - add r4, r0, #0 - bne _021D4E2C - bl sub_02022974 -_021D4E2C: - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #2 - add r1, r7, #0 - mov r2, #0 - bl sub_02002D7C - add r6, r0, #0 - add r0, r5, #0 - bl sub_0201C294 - lsl r0, r0, #3 - mov r1, #0 - sub r3, r0, r6 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D4E7C ; =0x00030201 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r5, #0 - lsr r5, r3, #0x1f - add r5, r3, r5 - str r1, [sp, #0xc] - mov r1, #2 - asr r3, r5, #1 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B190 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D4E7C: .word 0x00030201 - thumb_func_end ov21_021D4E10 - - thumb_func_start ov21_021D4E80 -ov21_021D4E80: ; 0x021D4E80 - push {r3, lr} - sub sp, #0x10 - ldr r0, [sp, #0x18] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D4EA0 ; =0x00030201 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r1, #0 - mov r1, #2 - bl sub_0201D78C - add sp, #0x10 - pop {r3, pc} - ; .align 2, 0 -_021D4EA0: .word 0x00030201 - thumb_func_end ov21_021D4E80 - - thumb_func_start ov21_021D4EA4 -ov21_021D4EA4: ; 0x021D4EA4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D4EAE - mov r0, #1 - bx lr -_021D4EAE: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D4EA4 - - thumb_func_start ov21_021D4EB4 -ov21_021D4EB4: ; 0x021D4EB4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - mov r6, #0 - cmp r0, #0 - ble _021D4EE0 - add r4, r6, #0 -_021D4EC2: - ldr r0, [r5, #0xc] - add r0, r0, r4 - bl ov21_021D4EA4 - cmp r0, #0 - bne _021D4ED6 - ldr r1, [r5, #0xc] - lsl r0, r6, #4 - add r0, r1, r0 - pop {r4, r5, r6, pc} -_021D4ED6: - ldr r0, [r5, #0x10] - add r6, r6, #1 - add r4, #0x10 - cmp r6, r0 - blt _021D4EC2 -_021D4EE0: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D4EB4 - - thumb_func_start ov21_021D4EE4 -ov21_021D4EE4: ; 0x021D4EE4 - push {r3, lr} - mov r1, #0x14 - bl sub_02018144 - add r3, r0, #0 - mov r2, #0x14 - mov r1, #0 -_021D4EF2: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _021D4EF2 - pop {r3, pc} - thumb_func_end ov21_021D4EE4 - - thumb_func_start ov21_021D4EFC -ov21_021D4EFC: ; 0x021D4EFC - ldr r3, _021D4F00 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021D4F00: .word sub_020181C4 - thumb_func_end ov21_021D4EFC - - thumb_func_start ov21_021D4F04 -ov21_021D4F04: ; 0x021D4F04 - push {r3, r4, r5, r6} - add r6, r0, #0 - mov r5, #0x14 - mov r4, #0 -_021D4F0C: - strb r4, [r6] - add r6, r6, #1 - sub r5, r5, #1 - bne _021D4F0C - str r1, [r0, #0] - str r2, [r0, #4] - str r3, [r0, #8] - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D4F04 - - thumb_func_start ov21_021D4F20 -ov21_021D4F20: ; 0x021D4F20 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #4 - bhi _021D4F7A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D4F36: ; jump table - .short _021D4F40 - _021D4F36 - 2 ; case 0 - .short _021D4F48 - _021D4F36 - 2 ; case 1 - .short _021D4F50 - _021D4F36 - 2 ; case 2 - .short _021D4F62 - _021D4F36 - 2 ; case 3 - .short _021D4F74 - _021D4F36 - 2 ; case 4 -_021D4F40: - add r1, r4, #0 - bl ov21_021D50E0 - pop {r3, r4, r5, pc} -_021D4F48: - add r1, r4, #0 - bl ov21_021D5110 - pop {r3, r4, r5, pc} -_021D4F50: - cmp r4, #0 - blt _021D4F5A - ldr r0, [r5, #4] - cmp r4, r0 - blt _021D4F5E -_021D4F5A: - bl sub_02022974 -_021D4F5E: - str r4, [r5, #0xc] - pop {r3, r4, r5, pc} -_021D4F62: - cmp r4, #0 - blt _021D4F6C - ldr r0, [r5, #8] - cmp r4, r0 - blt _021D4F70 -_021D4F6C: - bl sub_02022974 -_021D4F70: - str r4, [r5, #0x10] - pop {r3, r4, r5, pc} -_021D4F74: - add r1, r4, #0 - bl ov21_021D5140 -_021D4F7A: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D4F20 - - thumb_func_start ov21_021D4F7C -ov21_021D4F7C: ; 0x021D4F7C - ldr r2, [r0, #0x10] - ldr r1, [r0, #4] - add r3, r2, #0 - mul r3, r1 - ldr r1, [r0, #0xc] - add r2, r3, r1 - ldr r1, [r0, #0] - mov r0, #0x1c - mul r0, r2 - add r0, r1, r0 - ldr r0, [r0, #0x18] - bx lr - thumb_func_end ov21_021D4F7C - - thumb_func_start ov21_021D4F94 -ov21_021D4F94: ; 0x021D4F94 - push {r4, r5} - ldr r4, [r0, #0x10] - ldr r3, [r0, #4] - add r5, r4, #0 - mul r5, r3 - ldr r3, [r0, #0xc] - add r5, r5, r3 - mov r3, #0x1c - add r4, r5, #0 - mul r4, r3 - ldr r3, [r0, #0] - ldr r3, [r3, r4] - str r3, [r1, #0] - ldr r0, [r0, #0] - add r0, r0, r4 - ldr r0, [r0, #4] - str r0, [r2, #0] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D4F94 - - thumb_func_start ov21_021D4FBC -ov21_021D4FBC: ; 0x021D4FBC - push {r4, r5} - ldr r4, [r0, #0x10] - ldr r3, [r0, #4] - add r5, r4, #0 - mul r5, r3 - ldr r3, [r0, #0xc] - add r5, r5, r3 - mov r3, #0x1c - add r4, r5, #0 - mul r4, r3 - ldr r3, [r0, #0] - add r3, r3, r4 - ldr r3, [r3, #8] - str r3, [r1, #0] - ldr r0, [r0, #0] - add r0, r0, r4 - ldr r0, [r0, #0xc] - str r0, [r2, #0] - pop {r4, r5} - bx lr - thumb_func_end ov21_021D4FBC - - thumb_func_start ov21_021D4FE4 -ov21_021D4FE4: ; 0x021D4FE4 - str r1, [r0, #0] - str r2, [r0, #4] - ldr r1, [sp] - str r3, [r0, #8] - str r1, [r0, #0xc] - ldr r1, [sp, #4] - str r1, [r0, #0x10] - ldr r1, [sp, #8] - str r1, [r0, #0x14] - ldr r1, [sp, #0xc] - str r1, [r0, #0x18] - bx lr - thumb_func_end ov21_021D4FE4 - - thumb_func_start ov21_021D4FFC -ov21_021D4FFC: ; 0x021D4FFC - push {r3, r4, r5, r6} - ldr r4, [sp, #0x10] - cmp r0, #0 - beq _021D5008 - cmp r0, #2 - bne _021D5014 -_021D5008: - ldr r6, [sp, #0x14] - lsr r5, r6, #0x1f - add r5, r6, r5 - asr r5, r5, #1 - sub r3, r3, r5 - b _021D501E -_021D5014: - ldr r6, [sp, #0x14] - lsr r5, r6, #0x1f - add r5, r6, r5 - asr r5, r5, #1 - add r3, r3, r5 -_021D501E: - cmp r0, #1 - bhi _021D502E - ldr r5, [sp, #0x18] - lsr r0, r5, #0x1f - add r0, r5, r0 - asr r0, r0, #1 - sub r4, r4, r0 - b _021D5038 -_021D502E: - ldr r5, [sp, #0x18] - lsr r0, r5, #0x1f - add r0, r5, r0 - asr r0, r0, #1 - add r4, r4, r0 -_021D5038: - str r3, [r1, #0] - str r4, [r2, #0] - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov21_021D4FFC - - thumb_func_start ov21_021D5040 -ov21_021D5040: ; 0x021D5040 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0 - add r4, r1, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D5056 - cmp r4, #1 - beq _021D5056 - bl sub_02022974 -_021D5056: - ldr r0, [r5, #0xc] - mov r1, #0x1c -_021D505A: - add r0, r0, r4 - bmi _021D507A - ldr r2, [r5, #4] - cmp r0, r2 - bge _021D507A - ldr r3, [r5, #0x10] - ldr r2, [r5, #4] - mul r2, r3 - add r6, r2, r0 - add r2, r6, #0 - ldr r3, [r5, #0] - mul r2, r1 - add r6, r3, r2 - ldr r2, [r6, #0x10] - cmp r2, #2 - beq _021D505A -_021D507A: - cmp r0, #0 - blt _021D508C - ldr r1, [r5, #4] - cmp r0, r1 - bge _021D508C - ldr r1, [r6, #0x10] - cmp r1, #0 - bne _021D508C - str r0, [r5, #0xc] -_021D508C: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5040 - - thumb_func_start ov21_021D5090 -ov21_021D5090: ; 0x021D5090 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0 - add r4, r1, #0 - mvn r0, r0 - cmp r4, r0 - beq _021D50A6 - cmp r4, #1 - beq _021D50A6 - bl sub_02022974 -_021D50A6: - ldr r0, [r5, #0x10] - mov r1, #0x1c -_021D50AA: - add r0, r0, r4 - bmi _021D50CC - ldr r2, [r5, #8] - cmp r0, r2 - bge _021D50CC - ldr r2, [r5, #4] - add r3, r0, #0 - mul r3, r2 - ldr r2, [r5, #0xc] - add r6, r3, r2 - add r2, r6, #0 - ldr r3, [r5, #0] - mul r2, r1 - add r6, r3, r2 - ldr r2, [r6, #0x14] - cmp r2, #2 - beq _021D50AA -_021D50CC: - cmp r0, #0 - blt _021D50DE - ldr r1, [r5, #8] - cmp r0, r1 - bge _021D50DE - ldr r1, [r6, #0x10] - cmp r1, #0 - bne _021D50DE - str r0, [r5, #0x10] -_021D50DE: - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D5090 - - thumb_func_start ov21_021D50E0 -ov21_021D50E0: ; 0x021D50E0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - cmp r1, #0 - bge _021D50EC - neg r5, r1 - b _021D50EE -_021D50EC: - add r5, r1, #0 -_021D50EE: - add r0, r1, #0 - add r1, r5, #0 - bl sub_020E1F6C - add r7, r0, #0 - mov r4, #0 - cmp r5, #0 - ble _021D510C -_021D50FE: - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021D5040 - add r4, r4, #1 - cmp r4, r5 - blt _021D50FE -_021D510C: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D50E0 - - thumb_func_start ov21_021D5110 -ov21_021D5110: ; 0x021D5110 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - cmp r1, #0 - bge _021D511C - neg r5, r1 - b _021D511E -_021D511C: - add r5, r1, #0 -_021D511E: - add r0, r1, #0 - add r1, r5, #0 - bl sub_020E1F6C - add r7, r0, #0 - mov r4, #0 - cmp r5, #0 - ble _021D513C -_021D512E: - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021D5090 - add r4, r4, #1 - cmp r4, r5 - blt _021D512E -_021D513C: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5110 - - thumb_func_start ov21_021D5140 -ov21_021D5140: ; 0x021D5140 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r2, [r4, #4] - ldr r0, [r4, #8] - add r3, r2, #0 - mul r3, r0 - mov r5, #0 - cmp r3, #0 - ble _021D5178 - ldr r6, [r4, #0] -_021D5154: - ldr r0, [r6, #0x18] - cmp r1, r0 - bne _021D5170 - add r0, r5, #0 - add r1, r2, #0 - bl sub_020E1F6C - str r1, [r4, #0xc] - ldr r1, [r4, #4] - add r0, r5, #0 - bl sub_020E1F6C - str r0, [r4, #0x10] - pop {r4, r5, r6, pc} -_021D5170: - add r5, r5, #1 - add r6, #0x1c - cmp r5, r3 - blt _021D5154 -_021D5178: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5140 - - thumb_func_start ov21_021D517C -ov21_021D517C: ; 0x021D517C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - str r0, [sp, #0x10] - ldr r0, [sp, #0x5c] - str r2, [sp, #0x18] - str r1, [sp, #0x14] - str r0, [sp, #0x5c] - mov r0, #0 - str r3, [sp, #0x1c] - add r1, sp, #0x48 - str r0, [sp, #0x38] - ldrb r0, [r1, #0x1c] - str r0, [sp, #0x20] - cmp r0, #0 - ble _021D5210 - ldr r0, [sp, #0x38] - ldrb r6, [r1, #0x10] - str r0, [sp, #0x34] - str r0, [sp, #0x30] - ldrh r0, [r1, #0x24] - str r0, [sp, #0x2c] - ldrh r0, [r1, #0x20] - str r0, [sp, #0x28] - ldrb r0, [r1, #0x18] - str r0, [sp, #0x24] -_021D51AE: - ldr r0, [sp, #0x24] - mov r7, #0 - cmp r0, #0 - ble _021D51F6 - ldr r1, [sp, #0x5c] - ldr r0, [sp, #0x30] - add r4, r7, #0 - add r5, r1, r0 - ldr r1, [sp, #0x2c] - ldr r0, [sp, #0x34] - add r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x3c] -_021D51CA: - str r6, [sp] - ldrb r0, [r5] - ldr r1, [sp, #0x14] - str r0, [sp, #4] - ldr r0, [sp, #0x28] - add r0, r0, r4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [sp, #0x3c] - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x18] - ldr r3, [sp, #0x1c] - bl ov21_021D5248 - ldr r0, [sp, #0x24] - add r7, r7, #1 - add r4, r4, r6 - add r5, r5, #1 - cmp r7, r0 - blt _021D51CA -_021D51F6: - ldr r0, [sp, #0x34] - ldr r1, [sp, #0x30] - add r0, r0, r6 - str r0, [sp, #0x34] - ldr r0, [sp, #0x20] - add r0, r1, r0 - str r0, [sp, #0x30] - ldr r0, [sp, #0x38] - add r1, r0, #1 - ldr r0, [sp, #0x20] - str r1, [sp, #0x38] - cmp r1, r0 - blt _021D51AE -_021D5210: - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D517C - - thumb_func_start ov21_021D5214 -ov21_021D5214: ; 0x021D5214 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r2, #0 - str r0, [sp, #4] - add r5, r1, #0 - mov r6, #0 - cmp r7, #0 - ble _021D5244 -_021D5224: - mov r4, #0 - cmp r5, #0 - ble _021D523E -_021D522A: - ldr r0, [sp, #4] - add r1, r4, #0 - add r2, r6, #0 - add r3, r5, #0 - str r7, [sp] - bl ov21_021D52A0 - add r4, r4, #1 - cmp r4, r5 - blt _021D522A -_021D523E: - add r6, r6, #1 - cmp r6, r7 - blt _021D5224 -_021D5244: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D5214 - - thumb_func_start ov21_021D5248 -ov21_021D5248: ; 0x021D5248 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r1, [sp, #0x1c] - ldr r1, [sp, #0x3c] - str r0, [sp, #0x18] - add r5, r2, #0 - add r6, r3, #0 - cmp r1, #0 - beq _021D529C - ldr r0, [sp, #0x38] - add r4, r1, #0 - mul r4, r0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_020E1F6C - add r7, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_020E1F6C - str r5, [sp] - add r4, r1, #0 - str r6, [sp, #4] - add r0, sp, #0x28 - ldrb r1, [r0, #0x18] - lsl r2, r4, #0x10 - lsl r3, r7, #0x10 - str r1, [sp, #8] - ldrb r0, [r0, #0x1c] - ldr r1, [sp, #0x1c] - lsr r2, r2, #0x10 - str r0, [sp, #0xc] - ldr r0, [sp, #0x38] - lsr r3, r3, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - bl sub_0201ADDC -_021D529C: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D5248 - - thumb_func_start ov21_021D52A0 -ov21_021D52A0: ; 0x021D52A0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r2, #0 - add r6, r1, #0 - add r1, r7, #0 - mul r1, r3 - add r4, r0, #0 - add r5, r6, r1 - ldrb r1, [r4, r5] - cmp r1, #0 - bne _021D52CE - ldr r1, [sp, #0x20] - str r3, [sp] - str r1, [sp, #4] - add r1, sp, #8 - add r2, r6, #0 - add r3, r7, #0 - bl ov21_021D5304 - ldr r0, [sp, #8] - bl ov21_021D5424 - strb r0, [r4, r5] -_021D52CE: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D52A0 - - thumb_func_start ov21_021D52D4 -ov21_021D52D4: ; 0x021D52D4 - push {r3, r4} - cmp r1, #0 - blt _021D52DE - cmp r1, r3 - blt _021D52E6 -_021D52DE: - mov r0, #0 - mvn r0, r0 - pop {r3, r4} - bx lr -_021D52E6: - cmp r2, #0 - blt _021D52F0 - ldr r4, [sp, #8] - cmp r2, r4 - blt _021D52F8 -_021D52F0: - mov r0, #0 - mvn r0, r0 - pop {r3, r4} - bx lr -_021D52F8: - mul r3, r2 - add r1, r1, r3 - ldrb r0, [r0, r1] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D52D4 - - thumb_func_start ov21_021D5304 -ov21_021D5304: ; 0x021D5304 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, [sp, #0x20] - add r6, r2, #0 - str r1, [sp, #0x20] - add r7, r3, #0 - mov r1, #0 - str r1, [r5, #0] - ldr r4, [sp, #0x24] - ldr r3, [sp, #0x20] - add r1, r6, #0 - sub r2, r7, #1 - str r0, [sp, #4] - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D5332 - ldr r1, [r5, #0] - mov r0, #1 - orr r0, r1 - str r0, [r5, #0] -_021D5332: - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r6, #0 - add r2, r7, #1 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D534C - ldr r1, [r5, #0] - mov r0, #2 - orr r0, r1 - str r0, [r5, #0] -_021D534C: - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - sub r1, r6, #1 - add r2, r7, #0 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D5366 - ldr r1, [r5, #0] - mov r0, #4 - orr r0, r1 - str r0, [r5, #0] -_021D5366: - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r6, #1 - add r2, r7, #0 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D5380 - ldr r1, [r5, #0] - mov r0, #8 - orr r0, r1 - str r0, [r5, #0] -_021D5380: - ldr r0, [r5, #0] - mov r1, #1 - tst r1, r0 - bne _021D53A8 - mov r1, #4 - tst r0, r1 - bne _021D53A8 - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - sub r1, r6, #1 - sub r2, r7, #1 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D53A8 - ldr r1, [r5, #0] - mov r0, #0x10 - orr r0, r1 - str r0, [r5, #0] -_021D53A8: - ldr r0, [r5, #0] - mov r1, #1 - tst r1, r0 - bne _021D53D0 - mov r1, #8 - tst r0, r1 - bne _021D53D0 - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r6, #1 - sub r2, r7, #1 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D53D0 - ldr r1, [r5, #0] - mov r0, #0x20 - orr r0, r1 - str r0, [r5, #0] -_021D53D0: - ldr r0, [r5, #0] - mov r1, #2 - tst r1, r0 - bne _021D53F8 - mov r1, #4 - tst r0, r1 - bne _021D53F8 - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - sub r1, r6, #1 - add r2, r7, #1 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D53F8 - ldr r1, [r5, #0] - mov r0, #0x40 - orr r0, r1 - str r0, [r5, #0] -_021D53F8: - ldr r0, [r5, #0] - mov r1, #2 - tst r1, r0 - bne _021D5420 - mov r1, #8 - tst r0, r1 - bne _021D5420 - ldr r0, [sp, #4] - ldr r3, [sp, #0x20] - add r1, r6, #1 - add r2, r7, #1 - str r4, [sp] - bl ov21_021D52D4 - cmp r0, #1 - bne _021D5420 - ldr r1, [r5, #0] - mov r0, #0x80 - orr r0, r1 - str r0, [r5, #0] -_021D5420: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D5304 - - thumb_func_start ov21_021D5424 -ov21_021D5424: ; 0x021D5424 - push {r4, lr} - cmp r0, #0x84 - bgt _021D54FA - blt _021D542E - b _021D55EC -_021D542E: - cmp r0, #0x58 - bgt _021D54E0 - blt _021D5436 - b _021D55C4 -_021D5436: - cmp r0, #0x48 - bgt _021D54D2 - blt _021D543E - b _021D55F4 -_021D543E: - cmp r0, #0x41 - bhi _021D54D8 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D544E: ; jump table - .short _021D553C - _021D544E - 2 ; case 0 - .short _021D5540 - _021D544E - 2 ; case 1 - .short _021D5544 - _021D544E - 2 ; case 2 - .short _021D5550 - _021D544E - 2 ; case 3 - .short _021D5548 - _021D544E - 2 ; case 4 - .short _021D5554 - _021D544E - 2 ; case 5 - .short _021D555C - _021D544E - 2 ; case 6 - .short _021D5568 - _021D544E - 2 ; case 7 - .short _021D554C - _021D544E - 2 ; case 8 - .short _021D5558 - _021D544E - 2 ; case 9 - .short _021D5560 - _021D544E - 2 ; case 10 - .short _021D556C - _021D544E - 2 ; case 11 - .short _021D5564 - _021D544E - 2 ; case 12 - .short _021D5570 - _021D544E - 2 ; case 13 - .short _021D5574 - _021D544E - 2 ; case 14 - .short _021D5578 - _021D544E - 2 ; case 15 - .short _021D557C - _021D544E - 2 ; case 16 - .short _021D55F8 - _021D544E - 2 ; case 17 - .short _021D55E0 - _021D544E - 2 ; case 18 - .short _021D55F8 - _021D544E - 2 ; case 19 - .short _021D55F8 - _021D544E - 2 ; case 20 - .short _021D55F8 - _021D544E - 2 ; case 21 - .short _021D55F8 - _021D544E - 2 ; case 22 - .short _021D55F8 - _021D544E - 2 ; case 23 - .short _021D55F0 - _021D544E - 2 ; case 24 - .short _021D55F8 - _021D544E - 2 ; case 25 - .short _021D55D4 - _021D544E - 2 ; case 26 - .short _021D55F8 - _021D544E - 2 ; case 27 - .short _021D55F8 - _021D544E - 2 ; case 28 - .short _021D55F8 - _021D544E - 2 ; case 29 - .short _021D55F8 - _021D544E - 2 ; case 30 - .short _021D55F8 - _021D544E - 2 ; case 31 - .short _021D5580 - _021D544E - 2 ; case 32 - .short _021D55F8 - _021D544E - 2 ; case 33 - .short _021D55E4 - _021D544E - 2 ; case 34 - .short _021D55F8 - _021D544E - 2 ; case 35 - .short _021D55E8 - _021D544E - 2 ; case 36 - .short _021D55F8 - _021D544E - 2 ; case 37 - .short _021D55D0 - _021D544E - 2 ; case 38 - .short _021D55F8 - _021D544E - 2 ; case 39 - .short _021D55F8 - _021D544E - 2 ; case 40 - .short _021D55F8 - _021D544E - 2 ; case 41 - .short _021D55F8 - _021D544E - 2 ; case 42 - .short _021D55F8 - _021D544E - 2 ; case 43 - .short _021D55F8 - _021D544E - 2 ; case 44 - .short _021D55F8 - _021D544E - 2 ; case 45 - .short _021D55F8 - _021D544E - 2 ; case 46 - .short _021D55F8 - _021D544E - 2 ; case 47 - .short _021D558C - _021D544E - 2 ; case 48 - .short _021D55F8 - _021D544E - 2 ; case 49 - .short _021D55BC - _021D544E - 2 ; case 50 - .short _021D55F8 - _021D544E - 2 ; case 51 - .short _021D55F8 - _021D544E - 2 ; case 52 - .short _021D55F8 - _021D544E - 2 ; case 53 - .short _021D55F8 - _021D544E - 2 ; case 54 - .short _021D55F8 - _021D544E - 2 ; case 55 - .short _021D55F8 - _021D544E - 2 ; case 56 - .short _021D55F8 - _021D544E - 2 ; case 57 - .short _021D55F8 - _021D544E - 2 ; case 58 - .short _021D55F8 - _021D544E - 2 ; case 59 - .short _021D55F8 - _021D544E - 2 ; case 60 - .short _021D55F8 - _021D544E - 2 ; case 61 - .short _021D55F8 - _021D544E - 2 ; case 62 - .short _021D55F8 - _021D544E - 2 ; case 63 - .short _021D5584 - _021D544E - 2 ; case 64 - .short _021D55D8 - _021D544E - 2 ; case 65 -_021D54D2: - cmp r0, #0x49 - bgt _021D54DA - beq _021D55CC -_021D54D8: - b _021D55F8 -_021D54DA: - cmp r0, #0x50 - beq _021D5590 - b _021D55F8 -_021D54E0: - cmp r0, #0x70 - bgt _021D54EC - bge _021D55A4 - cmp r0, #0x60 - beq _021D5598 - b _021D55F8 -_021D54EC: - cmp r0, #0x80 - bgt _021D54F4 - beq _021D5588 - b _021D55F8 -_021D54F4: - cmp r0, #0x81 - beq _021D55DC - b _021D55F8 -_021D54FA: - cmp r0, #0xb0 - bgt _021D551A - bge _021D55A8 - cmp r0, #0x90 - bgt _021D550C - bge _021D5594 - cmp r0, #0x85 - beq _021D55C8 - b _021D55F8 -_021D550C: - cmp r0, #0xa0 - bgt _021D5514 - beq _021D559C - b _021D55F8 -_021D5514: - cmp r0, #0xa4 - beq _021D55C0 - b _021D55F8 -_021D551A: - cmp r0, #0xd0 - bgt _021D552E - bge _021D55AC - cmp r0, #0xc0 - bgt _021D5528 - beq _021D55A0 - b _021D55F8 -_021D5528: - cmp r0, #0xc1 - beq _021D55B8 - b _021D55F8 -_021D552E: - cmp r0, #0xe0 - bgt _021D5536 - beq _021D55B0 - b _021D55F8 -_021D5536: - cmp r0, #0xf0 - beq _021D55B4 - b _021D55F8 -_021D553C: - mov r4, #0 - b _021D55FC -_021D5540: - mov r4, #2 - b _021D55FC -_021D5544: - mov r4, #3 - b _021D55FC -_021D5548: - mov r4, #4 - b _021D55FC -_021D554C: - mov r4, #5 - b _021D55FC -_021D5550: - mov r4, #6 - b _021D55FC -_021D5554: - mov r4, #7 - b _021D55FC -_021D5558: - mov r4, #8 - b _021D55FC -_021D555C: - mov r4, #9 - b _021D55FC -_021D5560: - mov r4, #0xa - b _021D55FC -_021D5564: - mov r4, #0xb - b _021D55FC -_021D5568: - mov r4, #0xc - b _021D55FC -_021D556C: - mov r4, #0xd - b _021D55FC -_021D5570: - mov r4, #0xe - b _021D55FC -_021D5574: - mov r4, #0xf - b _021D55FC -_021D5578: - mov r4, #0x10 - b _021D55FC -_021D557C: - mov r4, #0x11 - b _021D55FC -_021D5580: - mov r4, #0x12 - b _021D55FC -_021D5584: - mov r4, #0x13 - b _021D55FC -_021D5588: - mov r4, #0x14 - b _021D55FC -_021D558C: - mov r4, #0x15 - b _021D55FC -_021D5590: - mov r4, #0x16 - b _021D55FC -_021D5594: - mov r4, #0x17 - b _021D55FC -_021D5598: - mov r4, #0x18 - b _021D55FC -_021D559C: - mov r4, #0x19 - b _021D55FC -_021D55A0: - mov r4, #0x1a - b _021D55FC -_021D55A4: - mov r4, #0x1b - b _021D55FC -_021D55A8: - mov r4, #0x1c - b _021D55FC -_021D55AC: - mov r4, #0x1d - b _021D55FC -_021D55B0: - mov r4, #0x1e - b _021D55FC -_021D55B4: - mov r4, #0x1f - b _021D55FC -_021D55B8: - mov r4, #0x20 - b _021D55FC -_021D55BC: - mov r4, #0x21 - b _021D55FC -_021D55C0: - mov r4, #0x22 - b _021D55FC -_021D55C4: - mov r4, #0x23 - b _021D55FC -_021D55C8: - mov r4, #0x24 - b _021D55FC -_021D55CC: - mov r4, #0x25 - b _021D55FC -_021D55D0: - mov r4, #0x26 - b _021D55FC -_021D55D4: - mov r4, #0x27 - b _021D55FC -_021D55D8: - mov r4, #0x28 - b _021D55FC -_021D55DC: - mov r4, #0x29 - b _021D55FC -_021D55E0: - mov r4, #0x2a - b _021D55FC -_021D55E4: - mov r4, #0x2b - b _021D55FC -_021D55E8: - mov r4, #0x2c - b _021D55FC -_021D55EC: - mov r4, #0x2d - b _021D55FC -_021D55F0: - mov r4, #0x2e - b _021D55FC -_021D55F4: - mov r4, #0x2f - b _021D55FC -_021D55F8: - bl sub_02022974 -_021D55FC: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov21_021D5424 - - thumb_func_start ov21_021D5600 -ov21_021D5600: ; 0x021D5600 - ldr r3, _021D5604 ; =sub_020237BC - bx r3 - ; .align 2, 0 -_021D5604: .word sub_020237BC - thumb_func_end ov21_021D5600 - - thumb_func_start ov21_021D5608 -ov21_021D5608: ; 0x021D5608 - add r1, r0, #1 - ldr r0, _021D5614 ; =0x021E9CC4 - ldr r3, _021D5618 ; =sub_020986E8 - ldrb r0, [r0, r1] - bx r3 - nop -_021D5614: .word 0x021E9CC4 -_021D5618: .word sub_020986E8 - thumb_func_end ov21_021D5608 - - thumb_func_start ov21_021D561C -ov21_021D561C: ; 0x021D561C - push {r4, r5, r6, lr} - sub sp, #0x28 - add r4, r2, #0 - add r2, sp, #4 - str r2, [sp] - add r2, sp, #0xc - add r3, sp, #8 - add r5, r0, #0 - bl ov21_021D5764 - ldr r2, [sp, #4] - cmp r2, #6 - bne _021D5642 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200B32C - add sp, #0x28 - pop {r4, r5, r6, pc} -_021D5642: - ldr r6, _021D5668 ; =0x021E9CCC - add r5, sp, #0x10 - add r3, r5, #0 - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - lsl r0, r2, #2 - ldr r1, [sp, #0xc] - ldr r0, [r3, r0] - add r2, r4, #0 - str r1, [sp, #4] - bl ov21_021D5724 - add sp, #0x28 - pop {r4, r5, r6, pc} - nop -_021D5668: .word 0x021E9CCC - thumb_func_end ov21_021D561C - - thumb_func_start ov21_021D566C -ov21_021D566C: ; 0x021D566C - push {r4, r5, r6, lr} - sub sp, #0x28 - add r4, r2, #0 - add r2, sp, #4 - str r2, [sp] - add r2, sp, #0xc - add r3, sp, #8 - add r5, r0, #0 - bl ov21_021D5764 - ldr r2, [sp, #4] - cmp r2, #6 - bne _021D568C - str r5, [sp, #4] - ldr r0, _021D56B4 ; =0x000002C7 - b _021D56A6 -_021D568C: - ldr r6, _021D56B8 ; =0x021E9CE4 - add r5, sp, #0x10 - add r3, r5, #0 - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - lsl r0, r2, #2 - ldr r1, [sp, #0xc] - ldr r0, [r3, r0] - str r1, [sp, #4] -_021D56A6: - ldr r1, [sp, #4] - add r2, r4, #0 - bl ov21_021D5724 - add sp, #0x28 - pop {r4, r5, r6, pc} - nop -_021D56B4: .word 0x000002C7 -_021D56B8: .word 0x021E9CE4 - thumb_func_end ov21_021D566C - - thumb_func_start ov21_021D56BC -ov21_021D56BC: ; 0x021D56BC - push {r4, r5, r6, lr} - sub sp, #0x28 - add r4, r2, #0 - add r2, sp, #4 - add r6, r3, #0 - str r2, [sp] - add r2, sp, #0xc - add r3, sp, #8 - add r5, r0, #0 - bl ov21_021D5764 - ldr r0, [sp, #4] - cmp r0, #6 - bne _021D56E8 - cmp r4, #1 - blt _021D56E0 - bl sub_02022974 -_021D56E0: - add r0, r5, r4 - str r0, [sp, #4] - ldr r0, _021D571C ; =0x000002C2 - b _021D570E -_021D56E8: - ldr r3, _021D5720 ; =0x021E9CFC - add r2, sp, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - cmp r4, #1 - blt _021D5700 - bl sub_02022974 -_021D5700: - ldr r0, [sp, #4] - lsl r1, r0, #2 - add r0, sp, #0x10 - ldr r0, [r0, r1] - ldr r1, [sp, #0xc] - add r1, r1, r4 - str r1, [sp, #4] -_021D570E: - ldr r1, [sp, #4] - add r2, r6, #0 - bl ov21_021D5724 - add sp, #0x28 - pop {r4, r5, r6, pc} - nop -_021D571C: .word 0x000002C2 -_021D5720: .word 0x021E9CFC - thumb_func_end ov21_021D56BC - - thumb_func_start ov21_021D5724 -ov21_021D5724: ; 0x021D5724 - push {r4, r5, r6, lr} - add r3, r0, #0 - add r5, r2, #0 - add r6, r1, #0 - add r2, r3, #0 - mov r0, #1 - mov r1, #0x1a - add r3, r5, #0 - bl sub_0200B144 - add r4, r0, #0 - beq _021D575E - mov r0, #1 - lsl r0, r0, #8 - add r1, r5, #0 - bl sub_02023790 - add r5, r0, #0 - beq _021D5754 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl sub_0200B1B8 -_021D5754: - add r0, r4, #0 - bl sub_0200B190 - add r0, r5, #0 - pop {r4, r5, r6, pc} -_021D575E: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5724 - - thumb_func_start ov21_021D5764 -ov21_021D5764: ; 0x021D5764 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - add r5, r3, #0 - ldr r6, [sp, #0x18] - bl sub_020986CC - str r0, [r5, #0] - cmp r0, #6 - blt _021D577E - bl sub_02022974 -_021D577E: - str r7, [r4, #0] - ldr r5, [r5, #0] - cmp r5, #6 - blt _021D578A - bl sub_02022974 -_021D578A: - cmp r5, #1 - bne _021D5790 - mov r5, #6 -_021D5790: - str r5, [r6, #0] - ldr r1, [r4, #0] - ldr r0, _021D57B0 ; =0x000001ED - cmp r1, r0 - ble _021D57A2 - cmp r5, #6 - beq _021D57A2 - mov r0, #0 - b _021D57A4 -_021D57A2: - mov r0, #1 -_021D57A4: - cmp r0, #0 - bne _021D57AC - bl sub_02022974 -_021D57AC: - pop {r3, r4, r5, r6, r7, pc} - nop -_021D57B0: .word 0x000001ED - thumb_func_end ov21_021D5764 - - thumb_func_start ov21_021D57B4 -ov21_021D57B4: ; 0x021D57B4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - cmp r2, #9 - bhi _021D5806 - add r0, r2, r2 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D57CA: ; jump table - .short _021D57DE - _021D57CA - 2 ; case 0 - .short _021D57E2 - _021D57CA - 2 ; case 1 - .short _021D57E6 - _021D57CA - 2 ; case 2 - .short _021D57EA - _021D57CA - 2 ; case 3 - .short _021D57EE - _021D57CA - 2 ; case 4 - .short _021D57F4 - _021D57CA - 2 ; case 5 - .short _021D57F8 - _021D57CA - 2 ; case 6 - .short _021D57FC - _021D57CA - 2 ; case 7 - .short _021D5800 - _021D57CA - 2 ; case 8 - .short _021D5804 - _021D57CA - 2 ; case 9 -_021D57DE: - mov r5, #4 - b _021D5806 -_021D57E2: - ldr r5, _021D5824 ; =0x000001F3 - b _021D5806 -_021D57E6: - ldr r5, _021D5828 ; =0x000003E2 - b _021D5806 -_021D57EA: - ldr r5, _021D582C ; =0x000005D1 - b _021D5806 -_021D57EE: - mov r5, #0x1f - lsl r5, r5, #6 - b _021D5806 -_021D57F4: - ldr r5, _021D5830 ; =0x000009AF - b _021D5806 -_021D57F8: - ldr r5, _021D5834 ; =0x00000B9E - b _021D5806 -_021D57FC: - ldr r5, _021D5838 ; =0x00000D8D - b _021D5806 -_021D5800: - ldr r5, _021D583C ; =0x00000F7C - b _021D5806 -_021D5804: - ldr r5, _021D5840 ; =0x0000116B -_021D5806: - mov r2, #0 - str r2, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0xbc - add r1, r5, r1 - bl sub_02007068 - str r0, [r4, #0] - ldr r0, [sp, #8] - lsr r0, r0, #2 - str r0, [r4, #4] - add sp, #0xc - pop {r4, r5, pc} - nop -_021D5824: .word 0x000001F3 -_021D5828: .word 0x000003E2 -_021D582C: .word 0x000005D1 -_021D5830: .word 0x000009AF -_021D5834: .word 0x00000B9E -_021D5838: .word 0x00000D8D -_021D583C: .word 0x00000F7C -_021D5840: .word 0x0000116B - thumb_func_end ov21_021D57B4 - - thumb_func_start ov21_021D5844 -ov21_021D5844: ; 0x021D5844 - push {r4, lr} - add r4, r0, #0 - bne _021D584E - bl sub_02022974 -_021D584E: - ldr r0, [r4, #0] - cmp r0, #0 - bne _021D5858 - bl sub_02022974 -_021D5858: - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5844 - - thumb_func_start ov21_021D5868 -ov21_021D5868: ; 0x021D5868 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0xbc - add r2, r1, #0 - bl sub_02007068 - cmp r4, #0 - beq _021D588A - ldr r1, [sp, #8] - lsr r1, r1, #2 - str r1, [r4, #0] -_021D588A: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5868 - - thumb_func_start ov21_021D5890 -ov21_021D5890: ; 0x021D5890 - push {r4, r5, lr} - sub sp, #0xc - mov r2, #0 - add r3, r0, #0 - add r4, r1, #0 - str r2, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0xbc - mov r1, #2 - bl sub_02007068 - add r5, r0, #0 - cmp r4, #0 - beq _021D58B8 - ldr r0, [sp, #8] - mov r1, #0x24 - bl sub_020E2178 - str r0, [r4, #0] -_021D58B8: - add r0, r5, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5890 - - thumb_func_start ov21_021D58C0 -ov21_021D58C0: ; 0x021D58C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r1, [sp, #4] - add r4, r3, #0 - str r0, [sp] - ldrb r1, [r4, #1] - ldrb r0, [r4, #3] - add r0, r1, r0 - cmp r0, r2 - blt _021D58D8 - bl sub_02022974 -_021D58D8: - ldrb r1, [r4] - ldrb r0, [r4, #2] - add r1, r1, r0 - ldr r0, [sp, #4] - cmp r1, r0 - blt _021D58E8 - bl sub_02022974 -_021D58E8: - ldrb r7, [r4, #1] - ldrb r0, [r4, #3] - add r0, r7, r0 - cmp r7, r0 - bge _021D5942 - ldr r0, [sp, #4] - mul r0, r7 - mov ip, r0 -_021D58F8: - ldrb r5, [r4] - ldrb r3, [r4, #2] - add r1, r5, #0 - add r0, r5, r3 - cmp r5, r0 - bge _021D592E - ldr r2, [sp] - mov r0, ip - add r0, r2, r0 - add r2, r0, r5 -_021D590C: - sub r6, r1, r5 - ldrb r5, [r4, #1] - ldrb r0, [r2] - add r1, r1, #1 - sub r5, r7, r5 - mul r5, r3 - add r3, r4, r6 - add r3, r5, r3 - ldrb r3, [r3, #4] - orr r0, r3 - strb r0, [r2] - ldrb r3, [r4, #2] - ldrb r5, [r4] - add r2, r2, #1 - add r0, r5, r3 - cmp r1, r0 - blt _021D590C -_021D592E: - ldr r0, [sp, #4] - mov r1, ip - add r0, r1, r0 - mov ip, r0 - ldrb r1, [r4, #1] - ldrb r0, [r4, #3] - add r7, r7, #1 - add r0, r1, r0 - cmp r7, r0 - blt _021D58F8 -_021D5942: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D58C0 - - thumb_func_start ov21_021D5948 -ov21_021D5948: ; 0x021D5948 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - ldr r0, [sp, #0x30] - str r3, [sp, #4] - str r0, [sp, #0x30] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x30] - ldr r5, [sp, #0x34] - ldr r0, [r0, #4] - ldr r4, [sp, #0x38] - sub r0, r0, #1 - cmp r0, #0 - ble _021D59D2 - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - lsl r0, r2, #0x18 - lsr r0, r0, #0x18 - ldr r7, [sp, #8] - str r0, [sp, #0x14] -_021D5976: - ldr r0, [sp, #0x30] - ldr r0, [r0, #0] - ldr r0, [r0, r7] - cmp r0, #0 - bne _021D5984 - bl sub_02022974 -_021D5984: - mov r1, #0 - cmp r4, #0 - bls _021D599C - ldr r0, [sp, #0x30] - ldr r0, [r0, #0] - ldr r2, [r0, r7] -_021D5990: - ldrb r0, [r5, r1] - cmp r2, r0 - beq _021D599C - add r1, r1, #1 - cmp r1, r4 - blo _021D5990 -_021D599C: - cmp r1, r4 - blo _021D59BE - ldr r3, [sp, #0x30] - mov r6, #0x24 - ldr r3, [r3, #0] - ldr r0, [sp] - ldr r3, [r3, r7] - ldr r1, [sp, #0x10] - mul r6, r3 - ldr r3, [sp, #4] - ldr r2, [sp, #0x14] - add r3, r3, r6 - bl ov21_021D58C0 - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_021D59BE: - ldr r0, [sp, #0xc] - add r7, r7, #4 - add r0, r0, #1 - str r0, [sp, #0xc] - ldr r0, [sp, #0x30] - ldr r0, [r0, #4] - sub r1, r0, #1 - ldr r0, [sp, #0xc] - cmp r0, r1 - blt _021D5976 -_021D59D2: - ldr r0, [sp, #8] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D5948 - - thumb_func_start ov21_021D59D8 -ov21_021D59D8: ; 0x021D59D8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r4, [sp, #0x24] - add r5, r0, #0 - ldrb r6, [r4] - mul r3, r6 - add r1, r1, r3 - str r1, [sp] - ldrb r6, [r4, #1] - ldr r3, [sp, #0x20] - lsl r1, r1, #0xc - mul r3, r6 - add r2, r2, r3 - str r1, [sp] - str r2, [sp, #4] - lsl r1, r2, #0xc - str r1, [sp, #4] - add r1, sp, #0 - bl sub_02021C50 - ldrb r0, [r4, #2] - cmp r0, #0 - beq _021D5A12 - ldr r1, [sp, #0x2c] - add r0, r5, #0 - bl sub_02021D6C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021D5A12: - ldr r1, [sp, #0x28] - add r0, r5, #0 - bl sub_02021D6C - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D59D8 - - thumb_func_start ov21_021D5A20 -ov21_021D5A20: ; 0x021D5A20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - mov ip, r0 - ldr r0, [sp, #0x40] - ldr r7, [sp, #0x50] - str r0, [sp, #0x40] - ldr r0, [sp, #0x44] - str r1, [sp, #0x10] - str r0, [sp, #0x44] - ldr r0, [sp, #0x48] - str r2, [sp, #0x14] - str r0, [sp, #0x48] - ldr r0, [sp, #0x4c] - str r3, [sp, #0x18] - str r0, [sp, #0x4c] - ldr r0, [sp, #0x54] - ldr r5, [sp, #0x5c] - str r0, [sp, #0x54] - ldr r0, [sp, #0x58] - ldr r4, [sp, #0x60] - str r0, [sp, #0x58] - mov r0, #0 - str r0, [sp, #0x20] - str r0, [sp, #0x24] - ldr r0, [r7, #4] - sub r0, r0, #1 - cmp r0, #0 - ble _021D5AE0 - add r0, r1, #0 - lsl r1, r0, #2 - mov r0, ip - add r0, r0, r1 - ldr r6, [sp, #0x20] - str r0, [sp, #0x1c] -_021D5A64: - ldr r0, [r7, #0] - ldr r0, [r0, r6] - cmp r0, #0 - bne _021D5A70 - bl sub_02022974 -_021D5A70: - ldr r1, [sp, #0x10] - ldr r0, [sp, #0x14] - cmp r1, r0 - blt _021D5A7C - bl sub_02022974 -_021D5A7C: - mov r1, #0 - cmp r4, #0 - bls _021D5A92 - ldr r0, [r7, #0] - ldr r2, [r0, r6] -_021D5A86: - ldrb r0, [r5, r1] - cmp r2, r0 - beq _021D5A92 - add r1, r1, #1 - cmp r1, r4 - blo _021D5A86 -_021D5A92: - cmp r1, r4 - blo _021D5ACE - ldr r0, [sp, #0x48] - ldr r2, [sp, #0x40] - str r0, [sp] - ldr r0, [r7, #0] - ldr r3, [sp, #0x44] - ldr r0, [r0, r6] - lsl r1, r0, #2 - ldr r0, [sp, #0x4c] - add r0, r0, r1 - str r0, [sp, #4] - ldr r0, [sp, #0x54] - ldr r1, [sp, #0x18] - str r0, [sp, #8] - ldr r0, [sp, #0x58] - str r0, [sp, #0xc] - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - bl ov21_021D59D8 - ldr r0, [sp, #0x1c] - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] -_021D5ACE: - ldr r0, [sp, #0x24] - add r6, r6, #4 - add r0, r0, #1 - str r0, [sp, #0x24] - ldr r0, [r7, #4] - sub r1, r0, #1 - ldr r0, [sp, #0x24] - cmp r0, r1 - blt _021D5A64 -_021D5AE0: - ldr r1, [sp, #0x64] - ldr r0, [sp, #0x20] - str r0, [r1, #0] - ldr r0, [sp, #0x10] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D5A20 - - thumb_func_start ov21_021D5AEC -ov21_021D5AEC: ; 0x021D5AEC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021D5B90 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D5BE0 - add r7, r0, #0 - ldr r0, [sp] - add r1, r5, #0 - add r2, r4, #0 - bl ov21_021D5C1C - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021D5CB4 - str r0, [r5, #0x24] - ldr r0, _021D5B38 ; =ov21_021D5CB8 - str r0, [r5, #8] - ldr r0, _021D5B3C ; =ov21_021D5D04 - str r0, [r5, #0xc] - ldr r0, _021D5B40 ; =ov21_021D5D34 - str r0, [r5, #0x10] - ldr r0, _021D5B44 ; =ov21_021D5D48 - str r0, [r5, #0x14] - ldr r0, _021D5B48 ; =ov21_021D5E2C - str r0, [r5, #0x18] - ldr r0, _021D5B4C ; =ov21_021D5EA8 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - nop -_021D5B38: .word ov21_021D5CB8 -_021D5B3C: .word ov21_021D5D04 -_021D5B40: .word ov21_021D5D34 -_021D5B44: .word ov21_021D5D48 -_021D5B48: .word ov21_021D5E2C -_021D5B4C: .word ov21_021D5EA8 - thumb_func_end ov21_021D5AEC - - thumb_func_start ov21_021D5B50 -ov21_021D5B50: ; 0x021D5B50 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021D5BCC - ldr r0, [r4, #4] - bl ov21_021D5C08 - ldr r0, [r4, #0x20] - bl ov21_021D5C7C - pop {r4, pc} - thumb_func_end ov21_021D5B50 - - thumb_func_start ov21_021D5B68 -ov21_021D5B68: ; 0x021D5B68 - ldr r1, [r0, #0x24] - cmp r1, #1 - beq _021D5B86 - ldr r1, [r0, #0x28] - cmp r1, #1 - beq _021D5B86 - ldr r1, [r0, #0x2c] - cmp r1, #1 - beq _021D5B86 - ldr r1, [r0, #0x30] - cmp r1, #1 - beq _021D5B86 - ldr r0, [r0, #0x34] - cmp r0, #1 - bne _021D5B8A -_021D5B86: - mov r0, #0 - bx lr -_021D5B8A: - mov r0, #1 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D5B68 - - thumb_func_start ov21_021D5B90 -ov21_021D5B90: ; 0x021D5B90 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x38 - bl sub_02018144 - add r4, r0, #0 - bne _021D5BA2 - bl sub_02022974 -_021D5BA2: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x38 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0x10] - str r0, [r4, #0x14] - mov r0, #1 - str r0, [r4, #0x1c] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5B90 - - thumb_func_start ov21_021D5BCC -ov21_021D5BCC: ; 0x021D5BCC - push {r4, lr} - add r4, r0, #0 - bne _021D5BD6 - bl sub_02022974 -_021D5BD6: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5BCC - - thumb_func_start ov21_021D5BE0 -ov21_021D5BE0: ; 0x021D5BE0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021D5BF2 - bl sub_02022974 -_021D5BF2: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D5BE0 - - thumb_func_start ov21_021D5C08 -ov21_021D5C08: ; 0x021D5C08 - push {r4, lr} - add r4, r0, #0 - bne _021D5C12 - bl sub_02022974 -_021D5C12: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5C08 - - thumb_func_start ov21_021D5C1C -ov21_021D5C1C: ; 0x021D5C1C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - bl ov21_021D5CB4 - add r2, r0, #0 - mov r1, #0x14 - add r0, r5, #0 - mul r1, r2 - bl sub_02018144 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - mov r3, #1 - bl ov21_021D467C - add r1, r6, #0 - add r0, r5, #0 - add r1, #0x14 - add r2, r4, #0 - mov r3, #2 - bl ov21_021D475C - add r1, r6, #0 - add r0, r5, #0 - add r1, #0x28 - add r2, r4, #0 - mov r3, #4 - bl ov21_021D4704 - add r0, r6, #0 - add r0, #0x3c - add r1, r4, #0 - add r2, r5, #0 - mov r3, #8 - bl ov21_021D4878 - add r1, r6, #0 - add r0, r5, #0 - add r1, #0x50 - add r2, r4, #0 - mov r3, #0x10 - bl ov21_021D47F0 - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D5C1C - - thumb_func_start ov21_021D5C7C -ov21_021D5C7C: ; 0x021D5C7C - push {r4, lr} - add r4, r0, #0 - bne _021D5C86 - bl sub_02022974 -_021D5C86: - add r0, r4, #0 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x14 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x28 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x3c - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x50 - bl ov21_021D4660 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov21_021D5C7C - - thumb_func_start ov21_021D5CB4 -ov21_021D5CB4: ; 0x021D5CB4 - mov r0, #5 - bx lr - thumb_func_end ov21_021D5CB4 - - thumb_func_start ov21_021D5CB8 -ov21_021D5CB8: ; 0x021D5CB8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - mov r1, #0x24 - bl sub_02018144 - str r0, [r5, #8] - cmp r0, #0 - bne _021D5CD0 - bl sub_02022974 -_021D5CD0: - ldr r0, [r5, #8] - mov r1, #0 - mov r2, #0x24 - bl sub_020D5124 - ldr r1, [r5, #8] - add r0, r4, #0 - bl ov21_021D5F58 - ldr r0, [r4, #4] - bl ov21_021D38C0 - mov r1, #1 - str r1, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0x20] - ldr r0, [r4, #0x18] - cmp r0, #1 - bne _021D5CF8 - str r1, [r4, #0x10] -_021D5CF8: - add r0, r4, #0 - bl ov21_021D5FC4 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5CB8 - - thumb_func_start ov21_021D5D04 -ov21_021D5D04: ; 0x021D5D04 - push {r3, lr} - add r2, r0, #0 - ldr r0, [r2, #0xc] - ldr r3, [r2, #8] - cmp r0, #1 - bne _021D5D14 - mov r0, #1 - pop {r3, pc} -_021D5D14: - ldr r0, [r2, #0] - cmp r0, #0 - bne _021D5D24 - mov r0, #0 - str r0, [r1, #0x18] - mov r0, #1 - str r0, [r2, #0] - b _021D5D2E -_021D5D24: - ldr r2, [r2, #4] - add r0, r1, #0 - add r1, r3, #0 - bl ov21_021D5F7C -_021D5D2E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5D04 - - thumb_func_start ov21_021D5D34 -ov21_021D5D34: ; 0x021D5D34 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D5D34 - - thumb_func_start ov21_021D5D48 -ov21_021D5D48: ; 0x021D5D48 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r6, r2, #0 - ldr r7, [r4, #8] - cmp r0, #3 - bhi _021D5E20 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5D64: ; jump table - .short _021D5D6C - _021D5D64 - 2 ; case 0 - .short _021D5D9A - _021D5D64 - 2 ; case 1 - .short _021D5DE4 - _021D5D64 - 2 ; case 2 - .short _021D5E0C - _021D5D64 - 2 ; case 3 -_021D5D6C: - mov r1, #0x52 - ldr r0, [r4, #4] - lsl r1, r1, #2 - bl sub_02018144 - add r7, r0, #0 - bne _021D5D7E - bl sub_02022974 -_021D5D7E: - str r7, [r4, #8] - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D6C24 - ldr r1, [r5, #0] - add r0, r7, #0 - add r2, r6, #0 - bl ov21_021D68C8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5E24 -_021D5D9A: - mov r0, #0x5d - ldr r1, [r6, #4] - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #0 - bne _021D5DB2 - ldr r1, [r5, #0] - ldr r3, [r4, #4] - add r0, r7, #0 - bl ov21_021D6114 - b _021D5DBC -_021D5DB2: - ldr r1, [r5, #0] - ldr r3, [r4, #4] - add r0, r7, #0 - bl ov21_021D61F4 -_021D5DBC: - ldr r0, [r6, #0x14] - cmp r0, #0 - beq _021D5DD0 - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #1 - bl ov21_021D7248 - b _021D5DDC -_021D5DD0: - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #1 - bl ov21_021D71A8 -_021D5DDC: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5E24 -_021D5DE4: - ldr r0, [r6, #0x14] - cmp r0, #0 - beq _021D5DF6 - add r0, r7, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021D72D4 - b _021D5E00 -_021D5DF6: - add r0, r7, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021D71E4 -_021D5E00: - cmp r0, #0 - beq _021D5E24 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5E24 -_021D5E0C: - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D5E28 ; =0x04000050 - mov r1, #1 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D5E20: - bl sub_02022974 -_021D5E24: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D5E28: .word 0x04000050 - thumb_func_end ov21_021D5D48 - - thumb_func_start ov21_021D5E2C -ov21_021D5E2C: ; 0x021D5E2C - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - add r6, r0, #0 - add r7, r1, #0 - ldr r0, [r5, #0x1c] - ldr r4, [r7, #8] - cmp r0, #0 - bne _021D5E40 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D5E40: - ldr r0, [r5, #4] - bl ov21_021D3898 - mov r1, #0x51 - lsl r1, r1, #2 - ldr r2, [r4, r1] - cmp r2, r0 - beq _021D5E70 - str r0, [r4, r1] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D6A58 - ldr r1, [r6, #0] - ldr r3, [r7, #4] - add r0, r4, #0 - add r2, r5, #0 - bl ov21_021D6CC8 - ldr r1, [r6, #0] - add r0, r4, #0 - add r2, r5, #0 - bl ov21_021D68C8 -_021D5E70: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D69A0 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D6AE4 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D6BB0 - ldr r1, [r6, #0] - ldr r3, [r7, #4] - add r0, r4, #0 - add r2, r5, #0 - bl ov21_021D6C44 - ldr r1, [r6, #0] - add r0, r4, #0 - add r2, r5, #0 - bl ov21_021D6F20 - add r0, r5, #0 - bl ov21_021D6F74 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D5E2C - - thumb_func_start ov21_021D5EA8 -ov21_021D5EA8: ; 0x021D5EA8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021D5F4A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5EC4: ; jump table - .short _021D5ECC - _021D5EC4 - 2 ; case 0 - .short _021D5F08 - _021D5EC4 - 2 ; case 1 - .short _021D5F30 - _021D5EC4 - 2 ; case 2 - .short _021D5F46 - _021D5EC4 - 2 ; case 3 -_021D5ECC: - ldr r0, _021D5F54 ; =0x04000050 - mov r3, #0 - strh r3, [r0] - ldr r0, [r7, #0x14] - cmp r0, #0 - beq _021D5EF8 - ldr r1, [r5, #0] - ldr r3, [r4, #4] - add r0, r6, #0 - bl ov21_021D7160 - ldr r0, [r5, #0] - add r1, r7, #0 - bl ov21_021D6F64 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021D7248 - b _021D5F00 -_021D5EF8: - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021D71A8 -_021D5F00: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5F4E -_021D5F08: - ldr r0, [r7, #0x14] - cmp r0, #0 - beq _021D5F1A - add r0, r6, #0 - add r1, r5, #0 - mov r3, #0 - bl ov21_021D72D4 - b _021D5F24 -_021D5F1A: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #0 - bl ov21_021D71E4 -_021D5F24: - cmp r0, #0 - beq _021D5F4E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5F4E -_021D5F30: - ldr r1, [r5, #0] - add r0, r6, #0 - bl ov21_021D61D8 - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5F4E -_021D5F46: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D5F4A: - bl sub_02022974 -_021D5F4E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D5F54: .word 0x04000050 - thumb_func_end ov21_021D5EA8 - - thumb_func_start ov21_021D5F58 -ov21_021D5F58: ; 0x021D5F58 - mov r2, #0 - str r2, [r0, #8] - str r2, [r1, #0] - mov r0, #0x3c - str r0, [r1, #4] - mov r0, #4 - str r0, [r1, #8] - str r0, [r1, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D5F58 - - thumb_func_start ov21_021D5F6C -ov21_021D5F6C: ; 0x021D5F6C - mov r0, #0xa - lsl r0, r0, #6 - str r0, [r1, #4] - mov r0, #0 - str r0, [r1, #8] - str r0, [r1, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D5F6C - - thumb_func_start ov21_021D5F7C -ov21_021D5F7C: ; 0x021D5F7C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D601C - cmp r0, #1 - beq _021D5FC2 - add r0, r5, #0 - bl ov21_021D5FC4 - ldr r0, [r4, #0] - cmp r0, #0 - bne _021D5FAE - ldr r0, [r4, #0x14] - cmp r0, #1 - bne _021D5FA6 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D7590 - b _021D5FAE -_021D5FA6: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D75DC -_021D5FAE: - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _021D5FBC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D60A4 -_021D5FBC: - add r0, r5, #0 - bl ov21_021D5FD4 -_021D5FC2: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D5F7C - - thumb_func_start ov21_021D5FC4 -ov21_021D5FC4: ; 0x021D5FC4 - mov r1, #0 - str r1, [r0, #0x24] - str r1, [r0, #0x28] - str r1, [r0, #0x2c] - str r1, [r0, #0x30] - str r1, [r0, #0x34] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D5FC4 - - thumb_func_start ov21_021D5FD4 -ov21_021D5FD4: ; 0x021D5FD4 - ldr r1, _021D6018 ; =0x021BF67C - mov r2, #2 - ldr r1, [r1, #0x48] - tst r2, r1 - beq _021D5FF6 - mov r1, #0x5d - ldr r2, [r0, #4] - lsl r1, r1, #6 - ldr r1, [r2, r1] - cmp r1, #0 - bne _021D5FF0 - mov r1, #1 - str r1, [r0, #0x28] - bx lr -_021D5FF0: - mov r1, #1 - str r1, [r0, #0x24] - bx lr -_021D5FF6: - mov r3, #1 - add r2, r1, #0 - tst r2, r3 - beq _021D6002 - str r3, [r0, #0x2c] - bx lr -_021D6002: - lsl r2, r3, #0xa - tst r2, r1 - beq _021D600C - str r3, [r0, #0x34] - bx lr -_021D600C: - mov r2, #4 - tst r1, r2 - beq _021D6014 - str r3, [r0, #0x30] -_021D6014: - bx lr - nop -_021D6018: .word 0x021BF67C - thumb_func_end ov21_021D5FD4 - - thumb_func_start ov21_021D601C -ov21_021D601C: ; 0x021D601C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0x28] - add r4, r2, #0 - cmp r1, #0 - beq _021D6038 - bl ov21_021D744C - ldr r0, _021D609C ; =0x000005DD - bl sub_02005748 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D6038: - ldr r1, [r5, #0x24] - cmp r1, #0 - beq _021D604E - add r1, r4, #0 - bl ov21_021D7538 - ldr r0, _021D609C ; =0x000005DD - bl sub_02005748 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D604E: - ldr r0, [r5, #0x2c] - cmp r0, #0 - beq _021D607A - ldr r0, [r5, #4] - bl ov21_021D3898 - add r1, r0, #0 - ldr r0, [r5, #4] - bl ov21_021D38B0 - ldr r1, _021D60A0 ; =0x000001EE - cmp r0, r1 - beq _021D607A - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021D7464 - ldr r0, _021D609C ; =0x000005DD - bl sub_02005748 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D607A: - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021D6088 - add r0, r5, #0 - bl ov21_021D747C - pop {r4, r5, r6, pc} -_021D6088: - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021D6098 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D74B0 - pop {r4, r5, r6, pc} -_021D6098: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D609C: .word 0x000005DD -_021D60A0: .word 0x000001EE - thumb_func_end ov21_021D601C - - thumb_func_start ov21_021D60A4 -ov21_021D60A4: ; 0x021D60A4 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D60F4 - ldr r2, [r4, #4] - ldr r1, [r0, #0xc] - sub r1, r1, r2 - cmp r1, #0 - ble _021D60BC - str r1, [r0, #0xc] - pop {r4, pc} -_021D60BC: - mov r1, #0 - str r1, [r0, #0xc] - str r1, [r4, #0] - ldr r0, [r4, #0xc] - cmp r0, #0 - ble _021D60F4 - ldr r0, [r4, #8] - sub r0, r0, #1 - cmp r0, #0 - ble _021D60D4 - str r0, [r4, #8] - pop {r4, pc} -_021D60D4: - ldr r0, [r4, #4] - bl sub_020E17B4 - ldr r1, _021D60F8 ; =0x3FCCCCCD - bl sub_020E18B0 - bl sub_020E1740 - str r0, [r4, #4] - ldr r0, [r4, #0xc] - sub r1, r0, #1 - mov r0, #4 - sub r0, r0, r1 - str r1, [r4, #0xc] - lsl r0, r0, #2 - str r0, [r4, #8] -_021D60F4: - pop {r4, pc} - nop -_021D60F8: .word 0x3FCCCCCD - thumb_func_end ov21_021D60A4 - - thumb_func_start ov21_021D60FC -ov21_021D60FC: ; 0x021D60FC - mov r3, #0xa - lsl r3, r3, #6 - str r3, [r0, #0xc] - str r2, [r1, #0] - str r2, [r0, #8] - bx lr - thumb_func_end ov21_021D60FC - - thumb_func_start ov21_021D6108 -ov21_021D6108: ; 0x021D6108 - ldr r3, _021D6110 ; =ov21_021D3844 - ldr r0, [r0, #4] - bx r3 - nop -_021D6110: .word ov21_021D3844 - thumb_func_end ov21_021D6108 - - thumb_func_start ov21_021D6114 -ov21_021D6114: ; 0x021D6114 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - mov r1, #0 - add r5, r0, #0 - add r4, r2, #0 - add r7, r3, #0 - str r1, [sp] - add r0, r6, #0 - add r2, r1, #0 - add r3, r1, #0 - str r7, [sp, #4] - bl ov21_021D276C - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021D62E4 - ldr r0, [r4, #4] - bl ov21_021D36D8 - add r3, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021D637C - ldr r0, [r4, #4] - bl ov21_021D38FC - str r0, [sp, #8] - ldr r0, [r4, #4] - bl ov21_021D3908 - add r3, r0, #0 - ldr r2, [sp, #8] - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021D63DC - add r0, r5, #0 - add r1, r7, #0 - bl ov21_021D6538 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021D65DC - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021D6744 - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021D70C0 - str r0, [r5, #0x4c] - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov21_021D67EC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6994 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D69A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6AE4 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6B94 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6BB0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov21_021D6C44 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021D6F20 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021D6114 - - thumb_func_start ov21_021D61D8 -ov21_021D61D8: ; 0x021D61D8 - push {r4, lr} - add r4, r0, #0 - bl ov21_021D695C - add r0, r4, #0 - bl ov21_021D6580 - add r0, r4, #0 - bl ov21_021D6940 - add r0, r4, #0 - bl ov21_021D63C0 - pop {r4, pc} - thumb_func_end ov21_021D61D8 - - thumb_func_start ov21_021D61F4 -ov21_021D61F4: ; 0x021D61F4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r1, #0 - add r4, r2, #0 - mov r0, #0x20 - str r0, [sp] - add r6, r3, #0 - mov r2, #0 - add r0, r7, #0 - mov r1, #4 - add r3, r2, #0 - str r6, [sp, #4] - bl ov21_021D276C - add r0, r7, #0 - mov r1, #0 - add r2, sp, #0x10 - add r3, r6, #0 - bl ov21_021D27E0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - mov r1, #2 - ldr r0, [r0, #0xc] - lsl r1, r1, #8 - str r0, [sp, #8] - bl sub_020C2C54 - ldr r0, [sp, #8] - mov r2, #0x1e - add r0, #0x20 - mov r1, #0x20 - lsl r2, r2, #4 - str r0, [sp, #8] - bl sub_020C00B4 - ldr r0, [sp, #0xc] - bl sub_020181C4 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D62E4 - ldr r0, [r4, #4] - bl ov21_021D36D8 - add r3, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - bl ov21_021D637C - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021D6538 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - bl ov21_021D65DC - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - bl ov21_021D6744 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D70C0 - str r0, [r5, #0x4c] - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021D67EC - ldr r0, [r4, #4] - bl ov21_021D38FC - add r2, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021D64B0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6994 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D69A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6AE4 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6B94 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6BB0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021D6C44 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov21_021D6F20 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D61F4 - - thumb_func_start ov21_021D62E4 -ov21_021D62E4: ; 0x021D62E4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r5, r0, #0 - str r4, [sp, #0xc] - ldr r2, [r5, #0] - mov r1, #0x1c - mov r3, #3 - bl ov21_021D2724 - str r4, [sp] - add r0, r5, #0 - mov r1, #0x26 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - add r0, r5, #0 - mov r1, #0x27 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r4, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #4 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #1 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #3 - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021D62E4 - - thumb_func_start ov21_021D637C -ov21_021D637C: ; 0x021D637C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - add r6, r1, #0 - str r0, [sp, #8] - add r4, r2, #0 - str r4, [sp, #0xc] - add r7, r3, #0 - ldr r2, [r6, #0] - add r0, r6, #0 - mov r1, #0x1c - mov r3, #2 - bl ov21_021D2724 - cmp r7, #1 - bne _021D63A8 - mov r1, #0x2a - b _021D63AA -_021D63A8: - mov r1, #0x28 -_021D63AA: - add r3, r5, #0 - add r0, r6, #0 - mov r2, #1 - add r3, #0xdc - str r4, [sp] - bl ov21_021D27B8 - add r5, #0xd8 - str r0, [r5, #0] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D637C - - thumb_func_start ov21_021D63C0 -ov21_021D63C0: ; 0x021D63C0 - push {r4, lr} - add r4, r0, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r4, #0 - mov r1, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r4, #0xdc - str r1, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D63C0 - - thumb_func_start ov21_021D63DC -ov21_021D63DC: ; 0x021D63DC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x20 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp, #0x10] - bl sub_02023790 - add r4, r0, #0 - ldr r2, _021D64A8 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - mov r1, #0 - add r2, r4, #0 - add r6, r0, #0 - bl sub_0200B1B8 - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021D64AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - mov r3, #8 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - mov r1, #1 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021D64AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - mov r3, #0x80 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #1 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - mov r2, #3 - mov r3, #2 - bl sub_020238A0 - mov r0, #0xaa - str r0, [sp] - mov r1, #0 - ldr r0, _021D64AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - mov r3, #0x30 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #1 - str r0, [sp] - ldr r1, [sp, #0x10] - add r0, r4, #0 - mov r2, #3 - mov r3, #2 - bl sub_020238A0 - mov r0, #0xaa - str r0, [sp] - mov r1, #0 - ldr r0, _021D64AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - mov r3, #0xb4 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D64A8: .word 0x000002B9 -_021D64AC: .word 0x00020100 - thumb_func_end ov21_021D63DC - - thumb_func_start ov21_021D64B0 -ov21_021D64B0: ; 0x021D64B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x20 - add r6, r1, #0 - add r7, r2, #0 - bl sub_02023790 - add r4, r0, #0 - ldr r2, _021D6530 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - mov r1, #0x6d - add r2, r4, #0 - add r6, r0, #0 - bl sub_0200B1B8 - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021D6534 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - mov r3, #8 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #1 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - mov r2, #3 - mov r3, #2 - bl sub_020238A0 - mov r0, #0xaa - str r0, [sp] - mov r1, #0 - ldr r0, _021D6534 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - mov r3, #0x30 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_0201C3C0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6530: .word 0x000002B9 -_021D6534: .word 0x00020100 - thumb_func_end ov21_021D64B0 - - thumb_func_start ov21_021D6538 -ov21_021D6538: ; 0x021D6538 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r0, #2 - mov r1, #0 - add r2, r4, #0 - bl sub_02009714 - add r1, r5, #0 - add r1, #0x80 - str r0, [r1, #0] - mov r0, #2 - mov r1, #1 - add r2, r4, #0 - bl sub_02009714 - add r1, r5, #0 - add r1, #0x84 - str r0, [r1, #0] - mov r0, #2 - add r1, r0, #0 - add r2, r4, #0 - bl sub_02009714 - add r1, r5, #0 - add r1, #0x88 - str r0, [r1, #0] - mov r0, #2 - mov r1, #3 - add r2, r4, #0 - bl sub_02009714 - add r5, #0x8c - str r0, [r5, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6538 - - thumb_func_start ov21_021D6580 -ov21_021D6580: ; 0x021D6580 - push {r4, lr} - add r4, r0, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0x51 - bl sub_02009DC8 - bl sub_0200A4E4 - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_02009DC8 - bl sub_0200A6DC - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0x6f - bl sub_02009DC8 - bl sub_0200A4E4 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_02009754 - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - bl sub_02009754 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_02009754 - add r4, #0x8c - ldr r0, [r4, #0] - bl sub_02009754 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6580 - - thumb_func_start ov21_021D65DC -ov21_021D65DC: ; 0x021D65DC - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r6, r0, #0 - mov r2, #0x51 - add r0, r5, #0 - str r2, [sp] - mov r3, #1 - str r3, [sp, #4] - str r4, [sp, #8] - add r0, #0x80 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_02009A4C - add r7, r0, #0 - bl sub_0200A3DC - add r0, r7, #0 - bl sub_02009D4C - mov r2, #3 - str r2, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xc - str r0, [sp, #8] - add r0, r5, #0 - str r4, [sp, #0xc] - add r0, #0x84 - ldr r0, [r0, #0] - add r1, r6, #0 - mov r3, #0 - bl sub_02009B04 - add r7, r0, #0 - bl sub_0200A640 - add r0, r7, #0 - bl sub_02009D4C - mov r2, #0x4f - str r2, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, r5, #0 - str r4, [sp, #8] - add r0, #0x88 - ldr r0, [r0, #0] - add r1, r6, #0 - mov r3, #1 - bl sub_02009BC4 - mov r2, #0x50 - str r2, [sp] - mov r0, #3 - str r0, [sp, #4] - add r0, r5, #0 - str r4, [sp, #8] - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r6, #0 - mov r3, #1 - bl sub_02009BC4 - mov r0, #0x50 - str r0, [sp] - sub r0, #0x51 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r1, #2 - str r1, [sp, #0x10] - add r1, r5, #0 - add r1, #0x80 - ldr r1, [r1, #0] - mov r2, #3 - str r1, [sp, #0x14] - add r1, r5, #0 - add r1, #0x84 - ldr r1, [r1, #0] - mov r3, #0x4f - str r1, [sp, #0x18] - add r1, r5, #0 - add r1, #0x88 - ldr r1, [r1, #0] - str r1, [sp, #0x1c] - add r1, r5, #0 - add r1, #0x8c - ldr r1, [r1, #0] - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r5, #0 - add r0, #0x90 - mov r1, #0x51 - bl sub_020093B4 - mov r2, #0x6f - str r2, [sp] - mov r3, #1 - str r3, [sp, #4] - add r0, r5, #0 - str r4, [sp, #8] - add r0, #0x80 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_02009A4C - add r7, r0, #0 - bl sub_0200A3DC - add r0, r7, #0 - bl sub_02009D4C - mov r2, #0x6d - str r2, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, r5, #0 - str r4, [sp, #8] - add r0, #0x88 - ldr r0, [r0, #0] - add r1, r6, #0 - mov r3, #1 - bl sub_02009BC4 - mov r2, #0x6e - str r2, [sp] - mov r0, #3 - str r0, [sp, #4] - add r0, r5, #0 - str r4, [sp, #8] - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r6, #0 - mov r3, #1 - bl sub_02009BC4 - mov r0, #0x6e - str r0, [sp] - sub r0, #0x6f - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r1, #2 - str r1, [sp, #0x10] - add r1, r5, #0 - add r1, #0x80 - ldr r1, [r1, #0] - mov r2, #3 - str r1, [sp, #0x14] - add r1, r5, #0 - add r1, #0x84 - ldr r1, [r1, #0] - mov r3, #0x6d - str r1, [sp, #0x18] - add r1, r5, #0 - add r1, #0x88 - ldr r1, [r1, #0] - str r1, [sp, #0x1c] - add r1, r5, #0 - add r1, #0x8c - ldr r1, [r1, #0] - add r5, #0xb4 - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r5, #0 - mov r1, #0x6f - bl sub_020093B4 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021D65DC - - thumb_func_start ov21_021D6744 -ov21_021D6744: ; 0x021D6744 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - mov r4, #0 - add r6, r0, #0 - add r3, r1, #0 - add r5, sp, #0 - add r0, r4, #0 - add r1, r4, #0 - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r3, r0] - add r5, r6, #0 - str r0, [sp] - add r0, r6, #0 - add r0, #0x90 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #0x18] - mov r0, #0x20 - str r2, [sp, #0x1c] - str r0, [sp, #0x14] - add r7, r4, #0 -_021D6778: - add r0, sp, #0 - bl sub_02021B90 - add r1, r7, #0 - stmia r5!, {r0} - bl sub_02021D6C - add r4, r4, #1 - cmp r4, #9 - blt _021D6778 - mov r5, #0 - str r5, [sp, #0x14] - add r4, r6, #0 - add r7, sp, #0 -_021D6794: - add r0, r7, #0 - bl sub_02021B90 - mov r1, #1 - str r0, [r4, #0x50] - bl sub_02021D6C - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #9 - blt _021D6794 - mov r0, #0 - str r0, [sp, #0x14] - add r0, sp, #0 - bl sub_02021B90 - mov r1, #2 - str r0, [r6, #0x74] - bl sub_02021D6C - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0xe - lsl r0, r0, #0xe - str r0, [sp, #8] - mov r0, #5 - lsl r0, r0, #0x10 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0xb4 - str r0, [sp, #4] - add r0, sp, #0 - bl sub_02021B90 - str r0, [r6, #0x7c] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r6, #0x7c] - mov r1, #1 - bl sub_02021FE0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D6744 - - thumb_func_start ov21_021D67EC -ov21_021D67EC: ; 0x021D67EC - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r1, [sp, #8] - str r0, [sp, #4] - mov r1, #0x15 - ldr r0, [sp, #8] - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r1, #0 - str r0, [sp, #0x1c] - ldr r0, [sp, #4] - add r7, r2, #0 - add r0, #0x98 - ldr r0, [r0, #0] - str r3, [sp, #0xc] - str r0, [sp, #0x24] - mov r0, #2 - str r0, [sp, #0x34] - mov r0, #1 - str r0, [sp, #0x3c] - add r0, r3, #0 - str r1, [sp, #0x28] - str r1, [sp, #0x2c] - str r1, [sp, #0x30] - str r1, [sp, #0x38] - str r0, [sp, #0x40] - ldr r0, [r7, #4] - bl ov21_021D3898 - sub r4, r0, #4 - ldr r0, [sp, #4] - ldr r6, [r0, #0x24] - ldr r0, [r7, #4] - bl ov21_021D38A4 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] -_021D6838: - ldr r0, [sp, #4] - lsl r1, r6, #2 - add r5, r0, r1 - ldr r0, [r5, #0x28] - cmp r0, #0 - beq _021D684C - bl ov21_021D4D1C - mov r0, #0 - str r0, [r5, #0x28] -_021D684C: - cmp r4, #0 - blt _021D68A4 - ldr r0, [sp, #0x10] - cmp r4, r0 - bge _021D68A4 - ldr r0, [r7, #4] - add r1, r4, #0 - bl ov21_021D38B0 - add r1, r0, #0 - ldr r0, _021D68C4 ; =0x000001EE - cmp r1, r0 - beq _021D6892 - ldr r0, [r7, #4] - bl ov21_021D37DC - add r3, r0, #0 - ldr r0, [sp, #8] - ldr r1, [r7, #4] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - bl ov21_021D16D8 - ldr r1, [sp, #4] - str r0, [sp, #0x20] - str r0, [sp, #0x18] - ldr r1, [r1, #0x4c] - add r0, sp, #0x1c - bl ov21_021D4CB8 - str r0, [r5, #0x28] - ldr r0, [sp, #0x18] - bl ov21_021D4DA0 - b _021D68A8 -_021D6892: - add r0, r4, #1 - str r0, [sp] - ldr r0, [sp, #4] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - add r3, r6, #0 - bl ov21_021D6DF4 - b _021D68A8 -_021D68A4: - mov r0, #0 - str r0, [r5, #0x28] -_021D68A8: - add r0, r6, #1 - mov r1, #9 - bl sub_020E1F6C - ldr r0, [sp, #0x14] - add r6, r1, #0 - add r0, r0, #1 - add r4, r4, #1 - str r0, [sp, #0x14] - cmp r0, #9 - blt _021D6838 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_021D68C4: .word 0x000001EE - thumb_func_end ov21_021D67EC - - thumb_func_start ov21_021D68C8 -ov21_021D68C8: ; 0x021D68C8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - add r6, r1, #0 - bl ov21_021D3898 - str r0, [sp, #8] - ldr r0, [r4, #4] - bl ov21_021D375C - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37DC - add r7, r0, #0 - ldr r0, [r4, #4] - ldr r1, [sp, #8] - bl ov21_021D38B0 - ldr r1, _021D693C ; =0x000001EE - cmp r0, r1 - bne _021D6910 - add r0, r6, #0 - mov r1, #0 - bl ov21_021D217C - ldr r0, [r5, #0x7c] - cmp r0, #0 - beq _021D6938 - mov r1, #1 - bl sub_02021CAC - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021D6910: - mov r0, #0x38 - str r0, [sp] - mov r0, #0x50 - str r0, [sp, #4] - ldr r1, [r4, #4] - ldr r2, [r7, #0] - add r0, r6, #0 - mov r3, #2 - bl ov21_021D1890 - add r0, r6, #0 - mov r1, #1 - bl ov21_021D217C - ldr r0, [r5, #0x7c] - cmp r0, #0 - beq _021D6938 - mov r1, #0 - bl sub_02021CAC -_021D6938: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D693C: .word 0x000001EE - thumb_func_end ov21_021D68C8 - - thumb_func_start ov21_021D6940 -ov21_021D6940: ; 0x021D6940 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021D6946: - ldr r0, [r5, #0x28] - cmp r0, #0 - beq _021D6950 - bl ov21_021D4D1C -_021D6950: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #9 - blt _021D6946 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6940 - - thumb_func_start ov21_021D695C -ov21_021D695C: ; 0x021D695C - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021D6964: - ldr r0, [r5, #0] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #9 - blt _021D6964 - mov r5, #0 - add r4, r6, #0 -_021D6976: - ldr r0, [r4, #0x50] - bl sub_02021BD4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #9 - blt _021D6976 - ldr r0, [r6, #0x74] - bl sub_02021BD4 - ldr r0, [r6, #0x7c] - bl sub_02021BD4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D695C - - thumb_func_start ov21_021D6994 -ov21_021D6994: ; 0x021D6994 - ldr r3, _021D699C ; =ov21_021D6ED0 - mov r2, #0 - str r2, [r0, #0x24] - bx r3 - ; .align 2, 0 -_021D699C: .word ov21_021D6ED0 - thumb_func_end ov21_021D6994 - - thumb_func_start ov21_021D69A0 -ov21_021D69A0: ; 0x021D69A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0x24] - str r1, [sp] - str r0, [sp, #4] - mov r4, #0 -_021D69AE: - ldr r0, [sp] - ldr r0, [r0, #8] - cmp r0, #1 - bne _021D69BA - add r0, r4, #2 - b _021D69BC -_021D69BA: - add r0, r4, #0 -_021D69BC: - add r1, r4, #1 - ldr r3, [sp] - lsl r7, r1, #2 - mov r2, #0xa - lsl r0, r0, #2 - ldr r1, _021D6A50 ; =0x021E9D14 - str r0, [sp, #8] - ldr r0, [r1, r0] - lsl r2, r2, #6 - ldr r6, [r3, #0xc] - add r3, r2, #0 - ldr r1, [r1, r7] - sub r3, r3, r6 - bl ov21_021D6BF8 - str r0, [sp, #0xc] - ldr r3, [sp] - mov r2, #0xa - ldr r1, _021D6A54 ; =0x021E9D40 - ldr r0, [sp, #8] - lsl r2, r2, #6 - ldr r6, [r3, #0xc] - ldr r0, [r1, r0] - add r3, r2, #0 - ldr r1, [r1, r7] - sub r3, r3, r6 - bl ov21_021D6BF8 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - add r1, sp, #0xc - lsl r6, r0, #2 - ldr r0, [r5, r6] - bl sub_02021C50 - mov r0, #4 - sub r7, r0, r4 - bpl _021D6A0A - neg r7, r7 -_021D6A0A: - lsl r1, r7, #1 - bpl _021D6A10 - neg r1, r1 -_021D6A10: - ldr r0, [r5, r6] - add r1, #0x20 - bl sub_02021F58 - cmp r4, #4 - bne _021D6A26 - ldr r0, [r5, r6] - mov r1, #0 - bl sub_02021F24 - b _021D6A3A -_021D6A26: - add r1, r7, #6 - cmp r1, #9 - ldr r0, [r5, r6] - bge _021D6A34 - bl sub_02021F24 - b _021D6A3A -_021D6A34: - mov r1, #9 - bl sub_02021F24 -_021D6A3A: - ldr r0, [sp, #4] - mov r1, #9 - add r0, r0, #1 - bl sub_020E1F6C - add r4, r4, #1 - str r1, [sp, #4] - cmp r4, #9 - blt _021D69AE - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6A50: .word 0x021E9D14 -_021D6A54: .word 0x021E9D40 - thumb_func_end ov21_021D69A0 - - thumb_func_start ov21_021D6A58 -ov21_021D6A58: ; 0x021D6A58 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D3898 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D38A4 - add r7, r0, #0 - ldr r0, [r4, #8] - cmp r0, #1 - bne _021D6AAA - ldr r0, [r5, #0x24] - add r0, r0, #1 - cmp r0, #9 - bge _021D6A7E - b _021D6A80 -_021D6A7E: - mov r0, #0 -_021D6A80: - str r0, [r5, #0x24] - ldr r0, [r5, #0x24] - mov r1, #9 - add r0, #8 - bl sub_020E1F6C - add r0, r6, #4 - cmp r0, r7 - blt _021D6A9E - lsl r0, r1, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, r6, r7, pc} -_021D6A9E: - lsl r0, r1, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - pop {r3, r4, r5, r6, r7, pc} -_021D6AAA: - cmp r0, #2 - bne _021D6AD8 - ldr r0, [r5, #0x24] - sub r0, r0, #1 - bmi _021D6AB6 - b _021D6AB8 -_021D6AB6: - mov r0, #8 -_021D6AB8: - str r0, [r5, #0x24] - ldr r1, [r5, #0x24] - sub r0, r6, #4 - bpl _021D6ACC - lsl r0, r1, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, r6, r7, pc} -_021D6ACC: - lsl r0, r1, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - pop {r3, r4, r5, r6, r7, pc} -_021D6AD8: - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D6ED0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6A58 - - thumb_func_start ov21_021D6AE4 -ov21_021D6AE4: ; 0x021D6AE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r1, #0 - str r0, [sp] - ldr r0, [r7, #4] - bl ov21_021D3898 - add r5, r0, #0 - ldr r0, [r7, #4] - bl ov21_021D38A4 - str r0, [sp, #4] - sub r0, r5, #4 - mov r4, #0 - str r0, [sp, #8] -_021D6B02: - ldr r0, [sp] - mov r1, #9 - ldr r0, [r0, #0x24] - add r0, r0, r4 - bl sub_020E1F6C - ldr r0, [sp, #8] - add r5, r1, #0 - mov r6, #0 - add r1, r0, r4 - bmi _021D6B3A - ldr r0, [sp, #4] - cmp r1, r0 - bge _021D6B3A - ldr r0, [r7, #4] - bl ov21_021D38B0 - add r1, r0, #0 - ldr r0, _021D6B90 ; =0x000001EE - cmp r1, r0 - beq _021D6B3A - ldr r0, [r7, #4] - bl ov21_021D37DC - ldr r0, [r0, #4] - cmp r0, #2 - bne _021D6B3A - mov r6, #1 -_021D6B3A: - ldr r0, [sp] - lsl r1, r5, #2 - add r5, r0, r1 - ldr r0, [r5, #0x50] - add r1, r6, #0 - bl sub_02021CAC - cmp r6, #0 - beq _021D6B86 - ldr r0, [r5, #0] - bl sub_02021D28 - mov r1, #0x36 - ldr r2, [r0, #0] - lsl r1, r1, #0xc - sub r1, r2, r1 - str r1, [sp, #0xc] - ldr r0, [r0, #4] - add r1, sp, #0xc - str r0, [sp, #0x10] - ldr r0, [r5, #0x50] - bl sub_02021C50 - ldr r0, [r5, #0] - bl sub_02021F48 - add r1, r0, #0 - ldr r0, [r5, #0x50] - bl sub_02021EF0 - ldr r0, [r5, #0] - bl sub_02021F74 - add r1, r0, #0 - ldr r0, [r5, #0x50] - sub r1, r1, #1 - bl sub_02021F58 -_021D6B86: - add r4, r4, #1 - cmp r4, #9 - blt _021D6B02 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6B90: .word 0x000001EE - thumb_func_end ov21_021D6AE4 - - thumb_func_start ov21_021D6B94 -ov21_021D6B94: ; 0x021D6B94 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #4] - bl ov21_021D38A4 - add r1, r0, #0 - mov r0, #0x36 - lsl r0, r0, #0xc - lsl r1, r1, #0xc - bl sub_020BCFD0 - str r0, [r4, #0x78] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6B94 - - thumb_func_start ov21_021D6BB0 -ov21_021D6BB0: ; 0x021D6BB0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r1, #4] - bl ov21_021D3898 - add r2, r0, #0 - ldr r0, [r4, #0x78] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - mov r0, #0x3a - lsl r0, r0, #0xc - str r1, [sp, #4] - add r0, r1, r0 - str r0, [sp, #4] - mov r0, #0x3e - lsl r0, r0, #0xe - str r0, [sp] - ldr r0, [r4, #0x74] - add r1, sp, #0 - bl sub_02021C50 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6BB0 - - thumb_func_start ov21_021D6BF8 -ov21_021D6BF8: ; 0x021D6BF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - sub r0, r1, r5 - lsl r2, r3, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - lsl r1, r4, #0xc - bl sub_020BCFD0 - add r0, r0, r5 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D6BF8 - - thumb_func_start ov21_021D6C24 -ov21_021D6C24: ; 0x021D6C24 - push {r3, r4, r5, lr} - mov r2, #0x52 - add r5, r1, #0 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, [r5, #4] - bl ov21_021D3898 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6C24 - - thumb_func_start ov21_021D6C44 -ov21_021D6C44: ; 0x021D6C44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - ldr r5, [r7, #0x24] - mov r6, #0 -_021D6C4E: - lsl r0, r5, #2 - add r4, r7, r0 - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _021D6C90 - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, sp, #0 - bl ov21_021D6CA4 - ldr r0, [r4, #0x28] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r2, [sp] - bl sub_020128C4 - ldr r0, [r4, #0] - bl sub_02021F74 - add r1, r0, #0 - ldr r0, [r4, #0x28] - sub r1, r1, #1 - ldr r0, [r0, #0] - bl sub_02012A30 - ldr r0, [r4, #0] - bl sub_02021F48 - add r1, r0, #0 - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - bl sub_02012A90 -_021D6C90: - add r0, r5, #1 - mov r1, #9 - bl sub_020E1F6C - add r6, r6, #1 - add r5, r1, #0 - cmp r6, #9 - blt _021D6C4E - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D6C44 - - thumb_func_start ov21_021D6CA4 -ov21_021D6CA4: ; 0x021D6CA4 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_02021D28 - ldr r1, [r0, #0] - asr r1, r1, #0xc - str r1, [r5, #0] - ldr r0, [r0, #4] - asr r0, r0, #0xc - str r0, [r4, #0] - ldr r0, [r5, #0] - sub r0, #0x40 - str r0, [r5, #0] - ldr r0, [r4, #0] - sub r0, #8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D6CA4 - - thumb_func_start ov21_021D6CC8 -ov21_021D6CC8: ; 0x021D6CC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r2, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - str r1, [sp, #8] - str r3, [sp, #0xc] - bl ov21_021D3898 - str r0, [sp, #0x14] - ldr r0, [r4, #4] - bl ov21_021D38A4 - ldr r1, [r4, #8] - str r0, [sp, #0x10] - cmp r1, #1 - beq _021D6CF0 - cmp r1, #2 - beq _021D6CFA - b _021D6D00 -_021D6CF0: - ldr r6, [r5, #0x24] - ldr r0, [sp, #0x14] - add r6, #8 - add r7, r0, #4 - b _021D6D00 -_021D6CFA: - ldr r0, [sp, #0x14] - ldr r6, [r5, #0x24] - sub r7, r0, #4 -_021D6D00: - cmp r1, #0 - bne _021D6D14 - ldr r1, [sp, #8] - ldr r3, [sp, #0xc] - add r0, r5, #0 - add r2, r4, #0 - bl ov21_021D67EC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D6D14: - add r0, r6, #0 - mov r1, #9 - bl sub_020E1F6C - ldr r0, [sp, #0x10] - add r6, r1, #0 - cmp r7, r0 - bge _021D6D5E - cmp r7, #0 - blt _021D6D5E - ldr r0, [r4, #4] - add r1, r7, #0 - bl ov21_021D38B0 - ldr r1, _021D6D74 ; =0x000001EE - cmp r0, r1 - beq _021D6D4A - str r6, [sp] - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r3, [sp, #0xc] - add r0, r5, #0 - add r2, r4, #0 - bl ov21_021D6D78 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D6D4A: - add r0, r7, #1 - str r0, [sp] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - add r0, r5, #0 - add r3, r6, #0 - bl ov21_021D6DF4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021D6D5E: - lsl r4, r6, #2 - add r5, #0x28 - ldr r0, [r5, r4] - cmp r0, #0 - beq _021D6D70 - bl ov21_021D4D1C - mov r0, #0 - str r0, [r5, r4] -_021D6D70: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6D74: .word 0x000001EE - thumb_func_end ov21_021D6CC8 - - thumb_func_start ov21_021D6D78 -ov21_021D6D78: ; 0x021D6D78 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r4, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - ldr r0, [r4, #4] - ldr r1, [sp, #0x44] - add r7, r3, #0 - bl ov21_021D37DC - str r0, [sp] - cmp r0, #0 - bne _021D6D96 - bl sub_02022974 -_021D6D96: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r6, r0] - mov r1, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - ldr r3, [sp] - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x24] - str r1, [sp, #0x10] - str r1, [sp, #0x14] - str r1, [sp, #0x18] - str r1, [sp, #0x20] - str r7, [sp, #0x28] - ldr r1, [r4, #4] - ldr r3, [r3, #0] - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D16D8 - add r6, r0, #0 - ldr r0, [sp, #0x40] - add r4, r5, #0 - add r4, #0x28 - lsl r7, r0, #2 - ldr r0, [r4, r7] - cmp r0, #0 - beq _021D6DDC - bl ov21_021D4D1C -_021D6DDC: - str r6, [sp, #8] - ldr r1, [r5, #0x4c] - add r0, sp, #4 - bl ov21_021D4CB8 - str r0, [r4, r7] - add r0, r6, #0 - bl ov21_021D4DA0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D6D78 - - thumb_func_start ov21_021D6DF4 -ov21_021D6DF4: ; 0x021D6DF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r4, r2, #0 - str r0, [sp, #0x10] - add r5, r1, #0 - mov r0, #0x20 - add r1, r4, #0 - add r6, r3, #0 - bl sub_02023790 - add r7, r0, #0 - ldr r2, _021D6EC8 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r4, #0 - bl sub_0200B144 - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r0, [r5, r1] - mov r2, #2 - str r0, [sp, #0x18] - ldr r0, [sp, #0x10] - add r0, #0x98 - ldr r0, [r0, #0] - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - str r0, [sp, #0x2c] - str r0, [sp, #0x34] - mov r0, #1 - str r2, [sp, #0x30] - str r4, [sp, #0x3c] - str r0, [sp, #0x38] - ldr r0, [r5, r1] - mov r1, #0xf - bl ov21_021D4D6C - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r1, [sp, #0x58] - add r0, r7, #0 - mov r2, #3 - mov r3, #2 - bl sub_020238A0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D6ECC ; =0x00030201 - add r2, r7, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - mov r1, #2 - mov r3, #0x16 - bl sub_0201D78C - ldr r0, [sp, #0x14] - mov r1, #0x63 - add r2, r7, #0 - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _021D6ECC ; =0x00030201 - add r2, r7, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - mov r1, #2 - mov r3, #0x31 - bl sub_0201D78C - ldr r4, [sp, #0x10] - lsl r6, r6, #2 - add r4, #0x28 - ldr r0, [r4, r6] - cmp r0, #0 - beq _021D6EA4 - bl ov21_021D4D1C -_021D6EA4: - ldr r1, [sp, #0x10] - str r5, [sp, #0x1c] - ldr r1, [r1, #0x4c] - add r0, sp, #0x18 - bl ov21_021D4CB8 - str r0, [r4, r6] - add r0, r5, #0 - bl ov21_021D4DA0 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_0200B190 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6EC8: .word 0x000002B9 -_021D6ECC: .word 0x00030201 - thumb_func_end ov21_021D6DF4 - - thumb_func_start ov21_021D6ED0 -ov21_021D6ED0: ; 0x021D6ED0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D3898 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D38A4 - sub r4, r5, #4 - ldr r5, [r6, #0x24] - str r0, [sp] - mov r7, #0 -_021D6EEC: - cmp r4, #0 - blt _021D6F02 - ldr r0, [sp] - cmp r4, r0 - bge _021D6F02 - lsl r0, r5, #2 - ldr r0, [r6, r0] - mov r1, #1 - bl sub_02021CAC - b _021D6F0C -_021D6F02: - lsl r0, r5, #2 - ldr r0, [r6, r0] - mov r1, #0 - bl sub_02021CAC -_021D6F0C: - add r0, r5, #1 - mov r1, #9 - bl sub_020E1F6C - add r7, r7, #1 - add r5, r1, #0 - add r4, r4, #1 - cmp r7, #9 - blt _021D6EEC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D6ED0 - - thumb_func_start ov21_021D6F20 -ov21_021D6F20: ; 0x021D6F20 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r2, #0xc] - mov r0, #0xa - lsl r0, r0, #6 - sub r0, r0, r1 - lsl r0, r0, #0xc - mov r2, #0x1f - asr r1, r0, #0x1f - lsl r2, r2, #0xc - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #0xa - lsl r1, r1, #0x12 - bl sub_020BCFD0 - add r5, r0, #0 - add r0, r4, #0 - bl ov21_021D2170 - mov r1, #0x17 - asr r2, r5, #0xc - bl sub_02007DEC - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D6F20 - - thumb_func_start ov21_021D6F64 -ov21_021D6F64: ; 0x021D6F64 - push {r3, lr} - bl ov21_021D2170 - mov r1, #0x17 - mov r2, #0x1f - bl sub_02007DEC - pop {r3, pc} - thumb_func_end ov21_021D6F64 - - thumb_func_start ov21_021D6F74 -ov21_021D6F74: ; 0x021D6F74 - push {r4, lr} - mov r1, #0xa - ldr r0, [r0, #0xc] - lsl r1, r1, #6 - sub r0, r1, r0 - lsl r3, r0, #0xc - asr r2, r3, #0x1f - lsr r0, r3, #0x10 - lsl r4, r2, #0x10 - orr r4, r0 - mov r0, #2 - lsl r3, r3, #0x10 - mov r2, #0 - lsl r0, r0, #0xa - add r0, r3, r0 - adc r4, r2 - lsl r2, r4, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - lsl r1, r1, #0xc - bl sub_020BCFD0 - asr r1, r0, #0xc - mov r0, #0x10 - sub r0, r0, r1 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _021D6FB0 ; =0x04000052 - strh r1, [r0] - pop {r4, pc} - ; .align 2, 0 -_021D6FB0: .word 0x04000052 - thumb_func_end ov21_021D6F74 - - thumb_func_start ov21_021D6FB4 -ov21_021D6FB4: ; 0x021D6FB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #0x14] - ldr r0, _021D7040 ; =0x00000685 - add r5, r2, #0 - str r1, [sp, #0x18] - add r4, r3, #0 - bl sub_02005748 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _021D6FFA - cmp r4, #0 - beq _021D6FEC - ldr r0, [sp, #0x18] - mov r6, #3 - ldr r0, [r0, #0] - mov r4, #0 - ldr r0, [r0, #0] - mov r1, #1 - add r2, r6, #0 - mov r3, #0xc0 - str r4, [sp, #0x1c] - mov r7, #0xe - mov r5, #4 - bl sub_02019184 - b _021D7018 -_021D6FEC: - mov r0, #3 - mov r6, #0 - str r0, [sp, #0x1c] - mov r4, #0xe - add r7, r6, #0 - mov r5, #4 - b _021D7018 -_021D6FFA: - cmp r4, #0 - beq _021D700C - mov r0, #0xc - str r0, [sp, #0x1c] - mov r4, #0x14 - mov r6, #3 - mov r7, #0xe - mov r5, #4 - b _021D7018 -_021D700C: - mov r0, #3 - str r0, [sp, #0x1c] - mov r4, #0xe - mov r6, #0xc - mov r7, #0x14 - mov r5, #4 -_021D7018: - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x14] - str r0, [sp] - str r6, [sp, #4] - str r4, [sp, #8] - str r7, [sp, #0xc] - ldr r1, [sp, #0x18] - str r5, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r1, [r1, #0] - add r3, #0xdc - str r3, [sp, #0x14] - ldr r1, [r1, #0] - ldr r3, [r3, #0] - add r0, #0xe0 - mov r2, #2 - bl ov21_021D1558 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7040: .word 0x00000685 - thumb_func_end ov21_021D6FB4 - - thumb_func_start ov21_021D7044 -ov21_021D7044: ; 0x021D7044 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xe0 - add r4, r1, #0 - bl ov21_021D157C - add r6, r0, #0 - bne _021D708E - add r0, r5, #0 - add r0, #0xf8 - ldr r1, [r0, #0] - add r0, r5, #0 - add r0, #0xfc - ldr r0, [r0, #0] - sub r0, r0, #1 - mul r0, r1 - mov r1, #1 - lsl r1, r1, #8 - ldr r1, [r5, r1] - bl sub_020E1F6C - add r5, #0xf0 - ldr r1, [r5, #0] - add r0, r0, r1 - lsl r3, r0, #3 - mov r0, #0x2f - sub r3, #0x70 - mvn r0, r0 - cmp r3, r0 - bge _021D7082 - add r3, r0, #0 -_021D7082: - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - mov r2, #3 - bl sub_0201C63C -_021D708E: - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7044 - - thumb_func_start ov21_021D7094 -ov21_021D7094: ; 0x021D7094 - push {r3, lr} - ldr r1, [r1, #0x10] - cmp r1, #0 - bne _021D70AE - cmp r2, #0 - bne _021D70AE - ldr r0, [r0, #0] - mov r1, #1 - ldr r0, [r0, #0] - mov r2, #3 - mov r3, #0 - bl sub_02019184 -_021D70AE: - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D70BC ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - pop {r3, pc} - ; .align 2, 0 -_021D70BC: .word 0xFFFF1FFF - thumb_func_end ov21_021D7094 - - thumb_func_start ov21_021D70C0 -ov21_021D70C0: ; 0x021D70C0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r1, #0xf - mov r2, #2 - bl ov21_021D4D6C - add r4, r0, #0 - mov r1, #1 - add r2, r5, #0 - bl sub_02012898 - add r5, r0, #0 - add r0, r4, #0 - bl ov21_021D4DA0 - add r0, r5, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D70C0 - - thumb_func_start ov21_021D70E8 -ov21_021D70E8: ; 0x021D70E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x74] - mov r1, #1 - bl sub_02021FE0 - mov r6, #1 - mov r4, #0 - add r7, r6, #0 -_021D70FA: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021FE0 - ldr r0, [r5, #0x50] - add r1, r7, #0 - bl sub_02021FE0 - ldr r0, [r5, #0x28] - cmp r0, #0 - beq _021D7118 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02012AF0 -_021D7118: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #9 - blt _021D70FA - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D70E8 - - thumb_func_start ov21_021D7124 -ov21_021D7124: ; 0x021D7124 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x74] - mov r1, #0 - bl sub_02021FE0 - mov r4, #0 - add r6, r4, #0 - add r7, r4, #0 -_021D7136: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021FE0 - ldr r0, [r5, #0x50] - add r1, r7, #0 - bl sub_02021FE0 - ldr r0, [r5, #0x28] - cmp r0, #0 - beq _021D7154 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02012AF0 -_021D7154: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #9 - blt _021D7136 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7124 - - thumb_func_start ov21_021D7160 -ov21_021D7160: ; 0x021D7160 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x24] - add r6, r1, #0 - add r0, r0, #4 - mov r1, #9 - add r5, r2, #0 - add r7, r3, #0 - bl sub_020E1F6C - lsl r0, r1, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r4, r0, #0 - ldr r0, [r5, #4] - bl ov21_021D375C - add r3, r0, #0 - ldr r0, [r4, #0] - add r2, r7, #0 - str r0, [sp] - ldr r0, [r4, #4] - str r0, [sp, #4] - ldr r1, [r5, #4] - add r0, r6, #0 - bl ov21_021D1778 - add r0, r6, #0 - mov r1, #0 - bl ov21_021D238C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7160 - - thumb_func_start ov21_021D71A8 -ov21_021D71A8: ; 0x021D71A8 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - bl ov21_021D6FB4 - ldr r0, [r5, #0x10] - cmp r0, #1 - beq _021D71E2 - cmp r4, #0 - beq _021D71D0 - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - str r0, [sp] - mov r0, #4 - sub r2, #0x10 - mov r3, #0x39 - bl sub_0200AAE0 - pop {r3, r4, r5, pc} -_021D71D0: - mov r0, #1 - str r0, [sp] - mov r0, #4 - add r1, r0, #0 - sub r1, #0x14 - mov r2, #0 - mov r3, #0x39 - bl sub_0200AAE0 -_021D71E2: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D71A8 - - thumb_func_start ov21_021D71E4 -ov21_021D71E4: ; 0x021D71E4 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021D7044 - add r7, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #1 - beq _021D7200 - mov r0, #1 - bl sub_0200AC1C - b _021D7202 -_021D7200: - mov r0, #1 -_021D7202: - cmp r7, #1 - bne _021D7242 - cmp r0, #1 - bne _021D7242 - ldr r0, [r4, #0x10] - cmp r0, #1 - beq _021D7234 - cmp r6, #0 - bne _021D7234 - mov r0, #0xf - mvn r0, r0 - mov r1, #0x3f - mov r2, #1 - bl sub_0200AB4C - ldr r0, [r5, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC -_021D7234: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021D7094 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D7242: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D71E4 - - thumb_func_start ov21_021D7248 -ov21_021D7248: ; 0x021D7248 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - bl ov21_021D70E8 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021D6FB4 - cmp r4, #0 - bne _021D7278 - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021D7394 - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021D73F0 -_021D7278: - ldr r0, [r7, #0x10] - cmp r0, #1 - beq _021D72CE - cmp r4, #0 - beq _021D72AA - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x28 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r2, r1, #0 - sub r2, #0x14 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021D72AA: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x28 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r3, r1, #0 - sub r3, #0x14 - bl ov21_021D23F8 -_021D72CE: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7248 - - thumb_func_start ov21_021D72D4 -ov21_021D72D4: ; 0x021D72D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r2, #0 - add r7, r0, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021D7044 - str r0, [sp, #8] - ldr r0, [r4, #0x10] - cmp r0, #1 - beq _021D72FA - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #0xc] -_021D72FA: - cmp r6, #0 - bne _021D7314 - add r0, r7, #0 - add r1, r5, #0 - bl ov21_021D73C8 - str r0, [sp, #0x10] - add r0, r7, #0 - add r1, r5, #0 - bl ov21_021D7424 - str r0, [sp, #0x14] - b _021D731A -_021D7314: - mov r0, #1 - str r0, [sp, #0x10] - str r0, [sp, #0x14] -_021D731A: - mov r1, #0 - add r2, sp, #8 -_021D731E: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021D732C - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #4 - blt _021D731E -_021D732C: - cmp r1, #4 - bne _021D738A - cmp r6, #0 - bne _021D7364 - ldr r0, [r4, #0x10] - cmp r0, #1 - beq _021D737A - mov r3, #0 - add r0, r3, #0 - str r3, [sp] - sub r0, #0x10 - str r0, [sp, #4] - ldr r0, _021D7390 ; =0x04000050 - mov r1, #0x2e - mov r2, #8 - bl sub_020BF5A0 - ldr r0, [r5, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - b _021D737A -_021D7364: - add r0, r7, #0 - bl ov21_021D7124 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D23C0 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D2360 -_021D737A: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021D7094 - add sp, #0x18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D738A: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7390: .word 0x04000050 - thumb_func_end ov21_021D72D4 - - thumb_func_start ov21_021D7394 -ov21_021D7394: ; 0x021D7394 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - mov r1, #0x48 - add r5, r0, #0 - str r1, [sp] - mov r0, #4 - add r1, #0xbc - str r0, [sp, #4] - add r0, r5, r1 - mov r1, #0x38 - mov r2, #0x30 - mov r3, #0x50 - bl ov21_021D2648 - mov r2, #0x41 - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r2, r2, #4 - ldr r0, [r4, #0] - ldr r2, [r5, r2] - bl ov21_021D2164 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7394 - - thumb_func_start ov21_021D73C8 -ov21_021D73C8: ; 0x021D73C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x41 - lsl r0, r0, #2 - add r0, r5, r0 - add r4, r1, #0 - bl ov21_021D2664 - mov r2, #0x41 - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r2, r2, #4 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r2, [r5, r2] - bl ov21_021D2164 - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D73C8 - - thumb_func_start ov21_021D73F0 -ov21_021D73F0: ; 0x021D73F0 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x20 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0x49 - lsl r0, r0, #2 - add r4, r1, #0 - add r0, r5, r0 - mov r1, #0xaa - mov r2, #0xac - mov r3, #0x52 - bl ov21_021D2648 - mov r2, #0x49 - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r2, r2, #4 - ldr r0, [r4, #0] - ldr r2, [r5, r2] - bl ov21_021D1848 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D73F0 - - thumb_func_start ov21_021D7424 -ov21_021D7424: ; 0x021D7424 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x49 - lsl r0, r0, #2 - add r0, r5, r0 - add r4, r1, #0 - bl ov21_021D2664 - mov r2, #0x49 - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r2, r2, #4 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r2, [r5, r2] - bl ov21_021D1848 - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7424 - - thumb_func_start ov21_021D744C -ov21_021D744C: ; 0x021D744C - ldr r3, [r0, #0] - mov r1, #4 - ldr r2, [r3, #0] - orr r1, r2 - str r1, [r3, #0] - mov r1, #0 - str r1, [r0, #0x10] - str r1, [r0, #0x14] - mov r1, #2 - str r1, [r0, #0x20] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D744C - - thumb_func_start ov21_021D7464 -ov21_021D7464: ; 0x021D7464 - ldr r3, [r1, #0] - mov r0, #2 - ldr r2, [r3, #0] - orr r2, r0 - str r2, [r3, #0] - mov r3, #0 - str r3, [r1, #0x10] - mov r2, #1 - str r2, [r1, #0x14] - str r3, [r1, #0xc] - str r0, [r1, #0x20] - bx lr - thumb_func_end ov21_021D7464 - - thumb_func_start ov21_021D747C -ov21_021D747C: ; 0x021D747C - push {r3, lr} - mov r1, #0x5d - ldr r2, [r0, #4] - lsl r1, r1, #6 - ldr r1, [r2, r1] - cmp r1, #0 - bne _021D74A8 - ldr r3, [r0, #0] - mov r1, #1 - ldr r2, [r3, #0] - orr r1, r2 - str r1, [r3, #0] - mov r1, #0 - str r1, [r0, #0x10] - str r1, [r0, #0x14] - mov r1, #2 - str r1, [r0, #0x20] - ldr r0, _021D74AC ; =0x000005DD - bl sub_02005748 - mov r0, #1 - pop {r3, pc} -_021D74A8: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021D74AC: .word 0x000005DD - thumb_func_end ov21_021D747C - - thumb_func_start ov21_021D74B0 -ov21_021D74B0: ; 0x021D74B0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - mov r1, #0x5d - ldr r0, [r5, #4] - lsl r1, r1, #6 - ldr r1, [r0, r1] - cmp r1, #1 - bne _021D74CA - add sp, #0x10 - mov r0, #0 - pop {r4, r5, r6, pc} -_021D74CA: - bl ov21_021D36D8 - cmp r0, #0 - bne _021D74D6 - mov r4, #1 - b _021D74D8 -_021D74D6: - mov r4, #0 -_021D74D8: - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov21_021D36A4 - cmp r0, #0 - beq _021D752C - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov21_021D36C0 - ldr r0, _021D7534 ; =0x000005DD - bl sub_02005748 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r4, [sp, #8] - str r6, [sp, #0xc] - ldr r0, [r5, #4] - add r2, r1, #0 - add r3, r1, #0 - bl ov21_021D3684 - ldr r0, [r5, #4] - mov r1, #0 - bl ov21_021D36FC - mov r3, #0 - str r3, [r5, #0xc] - ldr r2, [r5, #0] - mov r0, #0x10 - ldr r1, [r2, #0] - add sp, #0x10 - orr r0, r1 - str r0, [r2, #0] - str r3, [r5, #0x10] - str r3, [r5, #0x14] - mov r0, #2 - str r0, [r5, #0x20] - str r3, [r5, #0x1c] - mov r0, #1 - pop {r4, r5, r6, pc} -_021D752C: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D7534: .word 0x000005DD - thumb_func_end ov21_021D74B0 - - thumb_func_start ov21_021D7538 -ov21_021D7538: ; 0x021D7538 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - bl ov21_021D37BC - add r6, r0, #0 - ldr r0, [r5, #4] - bl ov21_021D36D8 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldr r0, [r5, #4] - add r2, r1, #0 - add r3, r1, #0 - bl ov21_021D3684 - ldr r2, [r5, #0] - mov r0, #0x10 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] - ldr r0, [r5, #4] - add r1, r6, #0 - bl ov21_021D3794 - mov r2, #0 - str r2, [r5, #0xc] - mov r0, #0x5d - ldr r1, [r5, #4] - lsl r0, r0, #6 - str r2, [r1, r0] - str r2, [r5, #0x10] - str r2, [r5, #0x14] - str r2, [r5, #8] - mov r0, #2 - str r0, [r5, #0x20] - str r2, [r5, #0x1c] - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D7538 - - thumb_func_start ov21_021D7590 -ov21_021D7590: ; 0x021D7590 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r4, r1, #0 - sub r0, r0, #1 - str r0, [r5, #0x18] - bmi _021D75C6 - ldr r1, [r5, #0x1c] - add r0, r4, #0 - bl ov21_021D6108 - cmp r0, #0 - beq _021D75C0 - ldr r2, [r5, #0x20] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D60FC - mov r0, #1 - str r0, [r4, #0x20] - ldr r0, _021D75D8 ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D75C0: - mov r0, #0 - str r0, [r5, #0x18] - pop {r3, r4, r5, pc} -_021D75C6: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D5F58 - mov r0, #0 - str r0, [r5, #0x14] - str r0, [r4, #0x20] - pop {r3, r4, r5, pc} - nop -_021D75D8: .word 0x0000068B - thumb_func_end ov21_021D7590 - - thumb_func_start ov21_021D75DC -ov21_021D75DC: ; 0x021D75DC - push {r3, r4, r5, lr} - ldr r2, _021D76A8 ; =0x021BF67C - add r4, r1, #0 - ldr r3, [r2, #0x44] - add r5, r0, #0 - mov r1, #0x40 - add r0, r3, #0 - tst r0, r1 - beq _021D761E - add r0, r4, #0 - sub r1, #0x41 - bl ov21_021D6108 - cmp r0, #0 - beq _021D7610 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #2 - bl ov21_021D60FC - mov r0, #1 - str r0, [r4, #0x20] - ldr r0, _021D76AC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D7610: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D5F58 - mov r0, #0 - str r0, [r4, #0x20] - pop {r3, r4, r5, pc} -_021D761E: - mov r0, #0x80 - tst r0, r3 - beq _021D7654 - add r0, r4, #0 - mov r1, #1 - bl ov21_021D6108 - cmp r0, #0 - beq _021D7646 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov21_021D60FC - mov r0, #1 - str r0, [r4, #0x20] - ldr r0, _021D76AC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021D7646: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D5F58 - mov r0, #0 - str r0, [r4, #0x20] - pop {r3, r4, r5, pc} -_021D7654: - ldr r1, [r2, #0x48] - mov r0, #0x20 - tst r0, r1 - beq _021D7676 - mov r0, #1 - str r0, [r5, #0x14] - mov r0, #5 - str r0, [r5, #0x18] - sub r0, r0, #6 - str r0, [r5, #0x1c] - mov r0, #2 - str r0, [r5, #0x20] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D5F6C - pop {r3, r4, r5, pc} -_021D7676: - mov r0, #0x10 - tst r0, r1 - beq _021D7692 - mov r1, #1 - str r1, [r5, #0x14] - mov r0, #5 - str r0, [r5, #0x18] - str r1, [r5, #0x1c] - str r1, [r5, #0x20] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D5F6C - pop {r3, r4, r5, pc} -_021D7692: - ldr r0, [r4, #0x20] - cmp r0, #1 - bne _021D76A4 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D5F58 - mov r0, #0 - str r0, [r4, #0x20] -_021D76A4: - pop {r3, r4, r5, pc} - nop -_021D76A8: .word 0x021BF67C -_021D76AC: .word 0x0000068B - thumb_func_end ov21_021D75DC - - thumb_func_start ov21_021D76B0 -ov21_021D76B0: ; 0x021D76B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021D7728 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D7770 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D7798 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021D7814 - str r0, [r5, #0x24] - ldr r0, _021D76F8 ; =ov21_021D7818 - str r0, [r5, #8] - ldr r0, _021D76FC ; =ov21_021D7860 - str r0, [r5, #0xc] - ldr r0, _021D7700 ; =ov21_021D78AC - str r0, [r5, #0x10] - ldr r0, _021D7704 ; =ov21_021D78C0 - str r0, [r5, #0x14] - ldr r0, _021D7708 ; =ov21_021D7950 - str r0, [r5, #0x18] - ldr r0, _021D770C ; =ov21_021D79E4 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D76F8: .word ov21_021D7818 -_021D76FC: .word ov21_021D7860 -_021D7700: .word ov21_021D78AC -_021D7704: .word ov21_021D78C0 -_021D7708: .word ov21_021D7950 -_021D770C: .word ov21_021D79E4 - thumb_func_end ov21_021D76B0 - - thumb_func_start ov21_021D7710 -ov21_021D7710: ; 0x021D7710 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021D77D4 - ldr r0, [r4, #0] - bl ov21_021D77E8 - ldr r0, [r4, #0x20] - bl ov21_021D77FC - pop {r4, pc} - thumb_func_end ov21_021D7710 - - thumb_func_start ov21_021D7728 -ov21_021D7728: ; 0x021D7728 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x28 - add r5, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D773C - bl sub_02022974 -_021D773C: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x28 - bl sub_020D5124 - add r0, r6, #0 - mov r1, #0 - bl ov21_021D1410 - ldr r0, [r0, #0] - mov r1, #0 - str r0, [r4, #0x1c] - add r2, r4, #0 - mov r0, #4 -_021D7758: - add r1, r1, #1 - stmia r2!, {r0} - cmp r1, #7 - blt _021D7758 - add r0, r6, #0 - bl ov21_021D13A0 - str r0, [r4, #0x20] - str r5, [r4, #0x24] - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7728 - - thumb_func_start ov21_021D7770 -ov21_021D7770: ; 0x021D7770 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021D7782 - bl sub_02022974 -_021D7782: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D7770 - - thumb_func_start ov21_021D7798 -ov21_021D7798: ; 0x021D7798 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021D7814 - add r7, r0, #0 - mov r1, #0x14 - mul r7, r1 - add r0, r5, #0 - add r1, r7, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D77B8 - bl sub_02022974 -_021D77B8: - add r0, r4, #0 - mov r1, #0 - add r2, r7, #0 - bl sub_020D5124 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - mov r3, #1 - bl ov21_021D4878 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7798 - - thumb_func_start ov21_021D77D4 -ov21_021D77D4: ; 0x021D77D4 - push {r4, lr} - add r4, r0, #0 - bne _021D77DE - bl sub_02022974 -_021D77DE: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D77D4 - - thumb_func_start ov21_021D77E8 -ov21_021D77E8: ; 0x021D77E8 - push {r4, lr} - add r4, r0, #0 - bne _021D77F2 - bl sub_02022974 -_021D77F2: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D77E8 - - thumb_func_start ov21_021D77FC -ov21_021D77FC: ; 0x021D77FC - push {r4, lr} - add r4, r0, #0 - bne _021D7806 - bl sub_02022974 -_021D7806: - add r0, r4, #0 - bl ov21_021D4660 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov21_021D77FC - - thumb_func_start ov21_021D7814 -ov21_021D7814: ; 0x021D7814 - mov r0, #1 - bx lr - thumb_func_end ov21_021D7814 - - thumb_func_start ov21_021D7818 -ov21_021D7818: ; 0x021D7818 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - mov r1, #0x24 - bl sub_02018144 - str r0, [r5, #8] - cmp r0, #0 - bne _021D7830 - bl sub_02022974 -_021D7830: - ldr r0, [r5, #8] - mov r1, #0 - mov r2, #0x24 - bl sub_020D5124 - ldr r1, _021D785C ; =0x000004CD - ldr r0, [r5, #8] - add r2, r4, #0 - str r1, [r0, #0x1c] - mov r1, #0 - mov r0, #4 -_021D7846: - add r1, r1, #1 - stmia r2!, {r0} - cmp r1, #7 - blt _021D7846 - ldr r0, [r5, #8] - ldr r2, [r5, #4] - add r1, r4, #0 - bl ov21_021D7A64 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D785C: .word 0x000004CD - thumb_func_end ov21_021D7818 - - thumb_func_start ov21_021D7860 -ov21_021D7860: ; 0x021D7860 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021D7870 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D7870: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021D787A - mov r0, #0 - pop {r3, r4, r5, pc} -_021D787A: - ldr r2, [r5, #0x1c] - add r0, r4, #0 - ldr r1, [r2, #0xc] - ldr r2, [r2, #8] - bl ov21_021D8434 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D7B20 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0x20] - cmp r0, #0 - bne _021D78A0 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021D82A8 - b _021D78A6 -_021D78A0: - mov r0, #0 - str r0, [r4, #0xc] - str r0, [r4, #0x10] -_021D78A6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7860 - - thumb_func_start ov21_021D78AC -ov21_021D78AC: ; 0x021D78AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl ov21_021D7B70 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021D78AC - - thumb_func_start ov21_021D78C0 -ov21_021D78C0: ; 0x021D78C0 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r3, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021D794C - add r5, r1, r1 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_021D78DA: ; jump table - .short _021D78E4 - _021D78DA - 2 ; case 0 - .short _021D7908 - _021D78DA - 2 ; case 1 - .short _021D7918 - _021D78DA - 2 ; case 2 - .short _021D7932 - _021D78DA - 2 ; case 3 - .short _021D7944 - _021D78DA - 2 ; case 4 -_021D78E4: - ldr r0, [r4, #4] - mov r1, #0x3c - bl sub_02018144 - str r0, [r4, #8] - cmp r0, #0 - bne _021D78F6 - bl sub_02022974 -_021D78F6: - ldr r0, [r4, #8] - mov r1, #0 - mov r2, #0x3c - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D794C -_021D7908: - add r1, r3, #0 - ldr r3, [r4, #4] - bl ov21_021D7C64 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D794C -_021D7918: - mov r1, #0 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #4 - sub r2, #0x10 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D794C -_021D7932: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021D794C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D794C -_021D7944: - add r0, r1, #1 - str r0, [r4, #0] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D794C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D78C0 - - thumb_func_start ov21_021D7950 -ov21_021D7950: ; 0x021D7950 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [r1, #8] - add r5, r2, #0 - add r7, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r5, #0] - ldr r6, [r3, #8] - bl ov21_021D144C - ldr r0, [r4, #4] - ldr r1, [r5, #4] - bl ov21_021D144C - ldr r0, [r4, #8] - ldr r1, [r5, #8] - bl ov21_021D144C - ldr r0, [r4, #0x18] - ldr r1, [r5, #0xc] - bl ov21_021D144C - ldr r0, [r4, #0x1c] - ldr r1, [r5, #0x10] - bl ov21_021D144C - mov r2, #5 - str r2, [sp] - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - sub r2, #0x13 - mov r3, #3 - bl ov21_021D84A8 - mov r2, #5 - str r2, [sp] - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - sub r2, #0x13 - mov r3, #3 - bl ov21_021D84A8 - mov r2, #5 - str r2, [sp] - ldr r0, [r4, #8] - ldr r1, [r4, #0x14] - sub r2, #0x13 - mov r3, #2 - bl ov21_021D84A8 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0x20] - cmp r0, #0 - bne _021D79D2 - mov r0, #0x83 - ldr r1, [r6, #0xc] - lsl r0, r0, #2 - bl sub_0201D580 - add r2, r0, #0 - ldr r3, [r6, #0x1c] - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021D8354 - b _021D79E0 -_021D79D2: - cmp r0, #1 - bne _021D79E0 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov21_021D83C0 -_021D79E0: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D7950 - - thumb_func_start ov21_021D79E4 -ov21_021D79E4: ; 0x021D79E4 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0] - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021D7A5C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D7A00: ; jump table - .short _021D7A0A - _021D7A00 - 2 ; case 0 - .short _021D7A24 - _021D7A00 - 2 ; case 1 - .short _021D7A36 - _021D7A00 - 2 ; case 2 - .short _021D7A46 - _021D7A00 - 2 ; case 3 - .short _021D7A56 - _021D7A00 - 2 ; case 4 -_021D7A0A: - mov r0, #2 - str r0, [sp] - mov r0, #4 - add r1, r0, #0 - sub r1, #0x14 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D7A5C -_021D7A24: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021D7A5C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D7A5C -_021D7A36: - add r1, r2, #0 - ldr r2, [r4, #4] - bl ov21_021D7CAC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D7A5C -_021D7A46: - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D7A5C -_021D7A56: - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_021D7A5C: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D79E4 - - thumb_func_start ov21_021D7A64 -ov21_021D7A64: ; 0x021D7A64 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #0x1c - bl sub_02018144 - str r0, [r5, #8] - mov r0, #0x60 - str r0, [sp] - ldr r0, [r5, #8] - mov r1, #0x10 - mov r2, #0x40 - mov r3, #0 - bl ov21_021D154C - mov r0, #0x60 - str r0, [sp] - ldr r0, [r5, #8] - mov r1, #0x40 - add r0, r0, #4 - mov r2, #0x70 - mov r3, #0 - bl ov21_021D154C - mov r0, #0x60 - str r0, [sp] - ldr r0, [r5, #8] - mov r1, #0x70 - add r0, #8 - mov r2, #0xc0 - mov r3, #0 - bl ov21_021D154C - mov r0, #0x84 - str r0, [sp] - ldr r0, [r5, #8] - mov r1, #0x38 - add r0, #0xc - mov r2, #0x48 - mov r3, #0x74 - bl ov21_021D154C - mov r0, #0x84 - str r0, [sp] - ldr r0, [r5, #8] - mov r1, #0x8a - add r0, #0x10 - mov r2, #0x9a - mov r3, #0x74 - bl ov21_021D154C - ldr r0, [r5, #8] - mov r1, #0xfe - strb r1, [r0, #0x14] - ldr r0, [r5, #8] - mov r1, #0xf8 - strb r1, [r0, #0x15] - ldr r0, [r5, #8] - mov r1, #0x68 - strb r1, [r0, #0x16] - ldr r0, [r5, #8] - mov r2, #0x10 - strb r1, [r0, #0x17] - mov r0, #0xb4 - str r0, [sp] - ldr r0, [r5, #8] - mov r1, #0 - add r0, #0x18 - mov r3, #0x74 - bl ov21_021D154C - add r0, r6, #0 - mov r1, #8 - bl sub_02018144 - add r3, r0, #0 - str r5, [r3, #0] - str r4, [r3, #4] - str r3, [r5, #4] - str r6, [sp] - ldr r0, [r5, #8] - ldr r2, _021D7B1C ; =ov21_021D7B8C - mov r1, #7 - bl sub_02023FCC - str r0, [r5, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021D7B1C: .word ov21_021D7B8C - thumb_func_end ov21_021D7A64 - - thumb_func_start ov21_021D7B20 -ov21_021D7B20: ; 0x021D7B20 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - add r2, r4, #0 - mov r0, #4 -_021D7B2C: - add r1, r1, #1 - stmia r2!, {r0} - cmp r1, #7 - blt _021D7B2C - add r0, r4, #0 - bl ov21_021D84B8 - ldr r0, [r5, #0] - bl sub_0202404C - ldr r1, [r4, #0x1c] - add r0, r5, #0 - ldr r1, [r1, #4] - bl ov21_021D84E0 - cmp r0, #0 - bne _021D7B52 - mov r0, #0 - str r0, [r5, #0xc] -_021D7B52: - ldr r0, [r4, #0x14] - cmp r0, #4 - ldr r0, [r5, #0x1c] - beq _021D7B64 - ldr r1, [r5, #0xc] - bl ov21_021D8580 - str r0, [r5, #0x1c] - pop {r3, r4, r5, pc} -_021D7B64: - mov r1, #0 - bl ov21_021D8580 - str r0, [r5, #0x1c] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7B20 - - thumb_func_start ov21_021D7B70 -ov21_021D7B70: ; 0x021D7B70 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} - thumb_func_end ov21_021D7B70 - - thumb_func_start ov21_021D7B8C -ov21_021D7B8C: ; 0x021D7B8C - push {r4, r5, r6, lr} - ldr r5, [r2, #4] - add r6, r0, #0 - ldr r0, [r5, #0x1c] - ldr r4, [r2, #0] - ldr r0, [r0, #4] - lsl r2, r6, #2 - str r1, [r5, r2] - cmp r1, #0 - beq _021D7BA6 - cmp r1, #2 - beq _021D7BB2 - b _021D7C5A -_021D7BA6: - ldr r0, _021D7C60 ; =0x021BF6BC - ldrh r1, [r0, #0x1c] - str r1, [r4, #0x14] - ldrh r0, [r0, #0x1e] - str r0, [r4, #0x18] - pop {r4, r5, r6, pc} -_021D7BB2: - cmp r6, #6 - bhi _021D7C26 - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D7BC2: ; jump table - .short _021D7BD0 - _021D7BC2 - 2 ; case 0 - .short _021D7BD8 - _021D7BC2 - 2 ; case 1 - .short _021D7BE0 - _021D7BC2 - 2 ; case 2 - .short _021D7BE8 - _021D7BC2 - 2 ; case 3 - .short _021D7BF8 - _021D7BC2 - 2 ; case 4 - .short _021D7C26 - _021D7BC2 - 2 ; case 5 - .short _021D7C0E - _021D7BC2 - 2 ; case 6 -_021D7BD0: - ldr r0, [r5, #0x1c] - mov r1, #1 - str r1, [r0, #0x34] - b _021D7C26 -_021D7BD8: - ldr r0, [r5, #0x1c] - mov r1, #1 - str r1, [r0, #0x30] - b _021D7C26 -_021D7BE0: - ldr r0, [r5, #0x1c] - mov r1, #1 - str r1, [r0, #0x2c] - b _021D7C26 -_021D7BE8: - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _021D7C26 - add r0, r5, #0 - mov r1, #0 - bl ov21_021D853C - b _021D7C26 -_021D7BF8: - ldr r1, [r4, #0x20] - cmp r1, #0 - bne _021D7C26 - bl ov21_021D3768 - add r1, r0, #0 - add r0, r5, #0 - sub r1, r1, #1 - bl ov21_021D853C - b _021D7C26 -_021D7C0E: - ldr r0, [r5, #0x1c] - mov r1, #0x5d - ldr r2, [r0, #4] - lsl r1, r1, #6 - ldr r1, [r2, r1] - cmp r1, #0 - bne _021D7C22 - mov r1, #1 - str r1, [r0, #0x28] - b _021D7C26 -_021D7C22: - mov r1, #1 - str r1, [r0, #0x24] -_021D7C26: - cmp r6, #5 - bne _021D7C54 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0x20] - cmp r0, #0 - bne _021D7C4A - add r0, r4, #0 - bl ov21_021D8324 - ldr r1, [r4, #0xc] - cmp r1, #0x10 - bgt _021D7C4A - mov r0, #0xf - mvn r0, r0 - cmp r1, r0 - blt _021D7C4A - mov r0, #0 - str r0, [r4, #0xc] -_021D7C4A: - ldr r0, _021D7C60 ; =0x021BF6BC - ldrh r1, [r0, #0x1c] - str r1, [r4, #0x14] - ldrh r0, [r0, #0x1e] - str r0, [r4, #0x18] -_021D7C54: - mov r0, #1 - str r0, [r4, #0x20] - pop {r4, r5, r6, pc} -_021D7C5A: - mov r0, #0 - str r0, [r4, #0x20] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D7C60: .word 0x021BF6BC - thumb_func_end ov21_021D7B8C - - thumb_func_start ov21_021D7C64 -ov21_021D7C64: ; 0x021D7C64 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021D7CD8 - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021D820C - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov21_021D7D8C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov21_021D7E80 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov21_021D8018 - mov r0, #7 - mov r1, #3 - bl sub_02019060 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D7C64 - - thumb_func_start ov21_021D7CAC -ov21_021D7CAC: ; 0x021D7CAC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov21_021D81EC - add r0, r5, #0 - bl ov21_021D7FEC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D7E3C - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021D828C - mov r0, #7 - mov r1, #1 - bl sub_02019060 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D7CAC - - thumb_func_start ov21_021D7CD8 -ov21_021D7CD8: ; 0x021D7CD8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r7, r1, #0 - ldr r6, [r0, #0] - mov r1, #0 - add r4, r2, #0 - str r1, [sp] - str r4, [sp, #4] - mov r2, #4 - add r3, r1, #0 - bl ov21_021D276C - ldr r0, [r7, #0x1c] - mov r1, #0x5d - ldr r0, [r0, #4] - lsl r1, r1, #6 - ldr r1, [r0, r1] - cmp r1, #1 - bne _021D7D16 - mov r0, #0x20 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0] - mov r1, #1 - mov r2, #4 - mov r3, #0x60 - bl ov21_021D276C - b _021D7D30 -_021D7D16: - bl ov21_021D36D8 - cmp r0, #1 - bne _021D7D30 - mov r0, #0x20 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0] - mov r1, #0x19 - mov r2, #4 - mov r3, #0x60 - bl ov21_021D276C -_021D7D30: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r4, [sp, #0xc] - ldr r0, [r5, #0] - mov r1, #0x1d - add r2, r6, #0 - mov r3, #6 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x29 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r4, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r6, #0 - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - mov r1, #6 - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7CD8 - - thumb_func_start ov21_021D7D8C -ov21_021D7D8C: ; 0x021D7D8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021D7E2C ; =0x0000043C - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x54 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #0x2c] - bl sub_0200A3DC - ldr r0, [r5, #0x2c] - bl sub_02009D4C - ldr r0, _021D7E30 ; =0x000003EB - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0xc - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x30] - bl sub_0200A640 - ldr r0, [r5, #0x30] - bl sub_02009D4C - ldr r0, _021D7E34 ; =0x0000043A - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x52 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x34] - ldr r0, _021D7E38 ; =0x0000043B - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x53 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x38] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D7E2C: .word 0x0000043C -_021D7E30: .word 0x000003EB -_021D7E34: .word 0x0000043A -_021D7E38: .word 0x0000043B - thumb_func_end ov21_021D7D8C - - thumb_func_start ov21_021D7E3C -ov21_021D7E3C: ; 0x021D7E3C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x2c] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x30] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x2c] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x30] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x34] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x38] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D7E3C - - thumb_func_start ov21_021D7E80 -ov21_021D7E80: ; 0x021D7E80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x70 - add r7, r3, #0 - add r5, r0, #0 - mov r0, #0 - ldr r4, [r1, #0] - ldr r3, _021D7FE8 ; =0x0000043B - add r6, r2, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #5 - str r2, [sp, #0x10] - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x4c - sub r2, #0x50 - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #8 - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - mov r0, #3 - lsl r0, r0, #0x10 - str r0, [sp, #0x34] - lsl r1, r1, #0xe - lsl r0, r0, #2 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - str r7, [sp, #0x48] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0] - mov r1, #2 - bl sub_02021D6C - ldr r0, [r6, #0x1c] - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #1 - bne _021D7F18 - ldr r0, [r5, #0] - mov r1, #0 - bl sub_02021CAC -_021D7F18: - mov r0, #3 - lsl r0, r0, #0x10 - mov r1, #0x16 - str r0, [sp, #0x34] - lsl r1, r1, #0xe - lsl r0, r0, #2 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #4] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r6, #0x1c] - mov r1, #1 - ldr r0, [r0, #4] - bl ov21_021D36A4 - cmp r0, #0 - beq _021D7F54 - ldr r0, [r6, #0x1c] - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #1 - bne _021D7F5C -_021D7F54: - ldr r0, [r5, #4] - mov r1, #0 - bl sub_02021CAC -_021D7F5C: - mov r0, #3 - lsl r0, r0, #0x10 - mov r1, #0x26 - str r0, [sp, #0x34] - lsl r1, r1, #0xe - lsl r0, r0, #2 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - mov r1, #1 - str r0, [r5, #8] - bl sub_02021D6C - mov r0, #0x1f - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r1, #1 - mov r0, #3 - lsl r1, r1, #0x12 - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - mov r1, #3 - str r0, [r5, #0x18] - bl sub_02021D6C - mov r0, #0x1f - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r1, #0x92 - mov r0, #3 - lsl r1, r1, #0xc - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - mov r1, #4 - str r0, [r5, #0x1c] - bl sub_02021D6C - mov r0, #0x1f - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r1, #2 - mov r0, #3 - lsl r1, r1, #0xe - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - mov r1, #5 - str r0, [r5, #0x20] - bl sub_02021D6C - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D7FE8: .word 0x0000043B - thumb_func_end ov21_021D7E80 - - thumb_func_start ov21_021D7FEC -ov21_021D7FEC: ; 0x021D7FEC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02021BD4 - ldr r0, [r4, #4] - bl sub_02021BD4 - ldr r0, [r4, #8] - bl sub_02021BD4 - ldr r0, [r4, #0x18] - bl sub_02021BD4 - ldr r0, [r4, #0x1c] - bl sub_02021BD4 - ldr r0, [r4, #0x20] - bl sub_02021BD4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D7FEC - - thumb_func_start ov21_021D8018 -ov21_021D8018: ; 0x021D8018 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r2, #0 - add r7, r3, #0 - ldr r4, [r1, #0] - cmp r0, #0 - bne _021D802E - bl sub_02022974 -_021D802E: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021D81E4 ; =0x000003EB - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - mov r1, #0 - bl sub_0200A72C - mov r1, #0x27 - mvn r1, r1 - str r1, [sp, #0x28] - add r1, #0x1a - str r1, [sp, #0x2c] - mov r1, #0 - str r1, [sp, #0x30] - str r1, [sp, #0x34] - mov r1, #2 - str r0, [sp, #0x20] - str r1, [sp, #0x38] - str r7, [sp, #0x3c] - bl sub_0201FAB4 - add r7, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0xa - mov r2, #4 - bl ov21_021D4D6C - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, [sp, #0x10] - ldr r2, _021D81E8 ; =0x000002B9 - mov r3, #7 - bl ov21_021D4DAC - ldr r0, [sp, #0x10] - str r0, [sp, #0x1c] - ldr r0, [r5, #0] - str r0, [sp, #0x24] - add r0, sp, #0x18 - bl ov21_021D4CA0 - str r0, [r5, #0xc] - ldr r0, [r0, #0] - add r1, r7, #3 - bl sub_02012A60 - ldr r0, [r6, #0x1c] - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #1 - bne _021D80BC - ldr r0, [r5, #0xc] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 -_021D80BC: - ldr r0, [sp, #0x10] - bl ov21_021D4DA0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0xa - mov r2, #4 - bl ov21_021D4D6C - str r0, [sp, #8] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, [sp, #8] - ldr r2, _021D81E8 ; =0x000002B9 - mov r3, #5 - bl ov21_021D4DAC - ldr r0, [sp, #8] - str r0, [sp, #0x1c] - ldr r0, [r5, #4] - str r0, [sp, #0x24] - add r0, sp, #0x18 - bl ov21_021D4CA0 - str r0, [r5, #0x10] - ldr r0, [r0, #0] - add r1, r7, #3 - bl sub_02012A60 - ldr r0, [r6, #0x1c] - mov r1, #1 - ldr r0, [r0, #4] - bl ov21_021D36A4 - cmp r0, #0 - beq _021D811C - ldr r0, [r6, #0x1c] - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #1 - bne _021D8126 -_021D811C: - ldr r0, [r5, #0x10] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 -_021D8126: - ldr r0, [sp, #8] - bl ov21_021D4DA0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0xa - mov r2, #4 - bl ov21_021D4D6C - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, [sp, #0x14] - ldr r2, _021D81E8 ; =0x000002B9 - mov r3, #0x1d - bl ov21_021D4DAC - ldr r0, [sp, #0x14] - str r0, [sp, #0x1c] - ldr r0, [r5, #8] - str r0, [sp, #0x24] - add r0, sp, #0x18 - bl ov21_021D4CA0 - str r0, [r5, #0x14] - ldr r0, [r0, #0] - add r1, r7, #2 - bl sub_02012A60 - ldr r0, [sp, #0x14] - bl ov21_021D4DA0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0xe - mov r2, #2 - bl ov21_021D4D6C - str r0, [sp, #0xc] - ldr r0, [r6, #0x1c] - ldr r2, _021D81E8 ; =0x000002B9 - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #0 - bne _021D81A6 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, [sp, #0xc] - mov r3, #0x6b - bl ov21_021D4DAC - b _021D81BA -_021D81A6: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, [sp, #0xc] - mov r3, #0x6c - bl ov21_021D4DAC -_021D81BA: - ldr r0, [sp, #0xc] - str r0, [sp, #0x1c] - ldr r0, [r5, #0x20] - str r0, [sp, #0x24] - mov r0, #0xa - str r0, [sp, #0x28] - sub r0, #0x12 - str r0, [sp, #0x2c] - add r0, sp, #0x18 - bl ov21_021D4CA0 - str r0, [r5, #0x24] - ldr r0, [r0, #0] - add r1, r7, #1 - bl sub_02012A60 - ldr r0, [sp, #0xc] - bl ov21_021D4DA0 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D81E4: .word 0x000003EB -_021D81E8: .word 0x000002B9 - thumb_func_end ov21_021D8018 - - thumb_func_start ov21_021D81EC -ov21_021D81EC: ; 0x021D81EC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl ov21_021D4D1C - ldr r0, [r4, #0x10] - bl ov21_021D4D1C - ldr r0, [r4, #0x14] - bl ov21_021D4D1C - ldr r0, [r4, #0x24] - bl ov21_021D4D1C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D81EC - - thumb_func_start ov21_021D820C -ov21_021D820C: ; 0x021D820C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - ldr r4, [r0, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r6, [sp, #0xc] - mov r1, #0x1b - add r2, r4, #0 - mov r3, #7 - bl ov21_021D2724 - str r6, [sp] - ldr r0, [r5, #0] - mov r1, #0x25 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #7 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r4, #0 - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - mov r1, #7 - bl sub_0201C3C0 - mov r2, #0 - add r3, r2, #0 - add r0, r4, #0 - mov r1, #7 - sub r3, #0x78 - bl sub_02019184 - add r0, r4, #0 - mov r1, #7 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D820C - - thumb_func_start ov21_021D828C -ov21_021D828C: ; 0x021D828C - push {r4, lr} - ldr r0, [r0, #0] - add r3, r1, #0 - ldr r4, [r0, #0] - mov r0, #7 - mov r1, #0x40 - mov r2, #0 - bl sub_02019690 - add r0, r4, #0 - mov r1, #7 - bl sub_02019EBC - pop {r4, pc} - thumb_func_end ov21_021D828C - - thumb_func_start ov21_021D82A8 -ov21_021D82A8: ; 0x021D82A8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0x1c] - add r5, r0, #0 - ldr r3, [r2, #0xc] - ldr r1, [r2, #4] - cmp r3, #0 - bgt _021D82E4 - ldr r3, [r5, #0x10] - cmp r3, #0 - beq _021D82E0 - bl ov21_021D8508 - cmp r0, #0 - bne _021D82D0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D8530 - b _021D82E4 -_021D82D0: - mov r1, #0xa - ldr r0, [r4, #0x1c] - lsl r1, r1, #6 - str r1, [r0, #0xc] - ldr r0, _021D8320 ; =0x0000068B - bl sub_02005748 - b _021D82E4 -_021D82E0: - mov r0, #0 - str r0, [r2, #8] -_021D82E4: - ldr r0, [r5, #0x10] - cmp r0, #0 - bge _021D82F2 - ldr r0, [r4, #0x1c] - mov r1, #1 - str r1, [r0, #8] - b _021D82FA -_021D82F2: - ble _021D82FA - ldr r0, [r4, #0x1c] - mov r1, #2 - str r1, [r0, #8] -_021D82FA: - ldr r2, [r4, #0x1c] - ldr r0, [r2, #8] - cmp r0, #0 - beq _021D831C - ldr r1, [r5, #0x10] - cmp r1, #0 - bge _021D830A - neg r1, r1 -_021D830A: - ldr r0, [r2, #0xc] - sub r0, r0, r1 - str r0, [r2, #0xc] - ldr r1, [r4, #0x1c] - ldr r0, [r1, #0xc] - cmp r0, #0 - bge _021D831C - mov r0, #0 - str r0, [r1, #0xc] -_021D831C: - pop {r3, r4, r5, pc} - nop -_021D8320: .word 0x0000068B - thumb_func_end ov21_021D82A8 - - thumb_func_start ov21_021D8324 -ov21_021D8324: ; 0x021D8324 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x83 - lsl r0, r0, #2 - str r0, [sp] - ldr r3, _021D8350 ; =0x021BF6BC - ldr r0, [r4, #0x14] - ldrh r2, [r3, #0x1c] - ldrh r3, [r3, #0x1e] - ldr r1, [r4, #0x18] - sub r0, #0xf8 - sub r1, #0x68 - sub r2, #0xf8 - sub r3, #0x68 - bl sub_0201D4CC - mov r1, #0xa - mul r1, r0 - str r1, [r4, #0xc] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_021D8350: .word 0x021BF6BC - thumb_func_end ov21_021D8324 - - thumb_func_start ov21_021D8354 -ov21_021D8354: ; 0x021D8354 - push {r4, r5, r6, lr} - add r5, r0, #0 - lsl r0, r2, #0xc - add r4, r1, #0 - asr r6, r3, #0x1f - add r2, r3, #0 - asr r1, r0, #0x1f - add r3, r6, #0 - bl sub_020E1F1C - mov r3, #2 - mov r6, #0 - lsl r3, r3, #0xa - add r3, r0, r3 - adc r1, r6 - lsl r0, r1, #0x14 - lsr r1, r3, #0xc - orr r1, r0 - asr r0, r1, #0xc - ldrh r2, [r5, #0x28] - mov r1, #0xb6 - add r0, r2, r0 - strh r0, [r5, #0x28] - ldrh r0, [r5, #0x28] - strh r0, [r5, #0x28] - bl sub_020E1F6C - add r3, r0, #0 - ldr r0, [r4, #0] - lsl r3, r3, #0x10 - ldr r0, [r0, #0] - mov r1, #7 - add r2, r6, #0 - lsr r3, r3, #0x10 - bl sub_0201C660 - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - mov r2, #9 - mov r3, #0x80 - bl sub_0201C718 - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - mov r2, #0xc - mov r3, #0x68 - bl sub_0201C718 - ldrh r0, [r5, #0x28] - strh r0, [r5, #0x2a] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8354 - - thumb_func_start ov21_021D83C0 -ov21_021D83C0: ; 0x021D83C0 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - ldr r6, [r7, #0x1c] - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0xa - ldr r0, [r6, #0xc] - lsl r1, r1, #6 - sub r2, r1, r0 - ldr r0, _021D8430 ; =0x000011C7 - mul r0, r2 - bl sub_020E1F6C - ldr r1, [r6, #8] - cmp r1, #1 - bne _021D83E2 - neg r0, r0 -_021D83E2: - ldrh r1, [r5, #0x2a] - add r0, r1, r0 - strh r0, [r5, #0x28] - ldrh r0, [r5, #0x28] - mov r1, #0xb6 - strh r0, [r5, #0x28] - bl sub_020E1F6C - add r3, r0, #0 - ldr r0, [r4, #0] - lsl r3, r3, #0x10 - ldr r0, [r0, #0] - mov r1, #7 - mov r2, #0 - lsr r3, r3, #0x10 - bl sub_0201C660 - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - mov r2, #9 - mov r3, #0x80 - bl sub_0201C718 - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - mov r2, #0xc - mov r3, #0x68 - bl sub_0201C718 - ldr r0, [r7, #0x1c] - ldr r0, [r0, #0xc] - cmp r0, #0 - bne _021D842C - ldrh r0, [r5, #0x28] - strh r0, [r5, #0x2a] -_021D842C: - pop {r3, r4, r5, r6, r7, pc} - nop -_021D8430: .word 0x000011C7 - thumb_func_end ov21_021D83C0 - - thumb_func_start ov21_021D8434 -ov21_021D8434: ; 0x021D8434 - push {r3, r4} - ldr r3, [r0, #0xc] - cmp r3, #0 - ble _021D844C - sub r3, r3, #2 - cmp r3, #4 - blt _021D8446 - str r3, [r0, #0xc] - b _021D845C -_021D8446: - mov r3, #4 - str r3, [r0, #0xc] - b _021D845C -_021D844C: - add r4, r3, #2 - mov r3, #3 - mvn r3, r3 - cmp r4, r3 - bgt _021D845A - str r4, [r0, #0xc] - b _021D845C -_021D845A: - str r3, [r0, #0xc] -_021D845C: - ldr r3, [r0, #0xc] - str r3, [r0, #0x10] - ldr r4, [r0, #0xc] - cmp r4, #0x21 - bgt _021D849E - mov r3, #0x20 - mvn r3, r3 - cmp r4, r3 - blt _021D849E - cmp r1, #0 - bne _021D848C - mov r3, #0 - str r3, [r0, #0x10] - ldr r2, [r0, #0xc] - cmp r2, #4 - bgt _021D849E - sub r1, r3, #4 - cmp r2, r1 - blt _021D849E - ldr r1, _021D84A4 ; =0x000004CD - str r3, [r0, #0xc] - str r1, [r0, #0x1c] - pop {r3, r4} - bx lr -_021D848C: - cmp r2, #1 - bne _021D8498 - str r3, [r0, #0x10] - str r3, [r0, #0xc] - pop {r3, r4} - bx lr -_021D8498: - mov r1, #0x21 - str r1, [r0, #0x10] - str r1, [r0, #0xc] -_021D849E: - pop {r3, r4} - bx lr - nop -_021D84A4: .word 0x000004CD - thumb_func_end ov21_021D8434 - - thumb_func_start ov21_021D84A8 -ov21_021D84A8: ; 0x021D84A8 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - bl ov21_021D1524 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021D84A8 - - thumb_func_start ov21_021D84B8 -ov21_021D84B8: ; 0x021D84B8 - ldr r2, [r0, #0x1c] - ldr r1, [r2, #0x2c] - cmp r1, #0 - beq _021D84C6 - mov r1, #2 - str r1, [r0, #8] - bx lr -_021D84C6: - ldr r1, [r2, #0x34] - cmp r1, #0 - beq _021D84D2 - mov r1, #2 - str r1, [r0, #0] - bx lr -_021D84D2: - ldr r1, [r2, #0x30] - cmp r1, #0 - beq _021D84DC - mov r1, #2 - str r1, [r0, #4] -_021D84DC: - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D84B8 - - thumb_func_start ov21_021D84E0 -ov21_021D84E0: ; 0x021D84E0 - push {r3, lr} - ldr r0, [r0, #0xc] - cmp r0, #0 - beq _021D8502 - bge _021D84EE - mov r2, #1 - b _021D84F2 -_021D84EE: - mov r2, #0 - mvn r2, r2 -_021D84F2: - add r0, r1, #0 - add r1, r2, #0 - bl ov21_021D387C - cmp r0, #0 - bne _021D8502 - mov r0, #0 - pop {r3, pc} -_021D8502: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D84E0 - - thumb_func_start ov21_021D8508 -ov21_021D8508: ; 0x021D8508 - push {r3, lr} - ldr r0, [r0, #0x10] - cmp r0, #0 - beq _021D852A - bge _021D8516 - mov r2, #1 - b _021D851A -_021D8516: - mov r2, #0 - mvn r2, r2 -_021D851A: - add r0, r1, #0 - add r1, r2, #0 - bl ov21_021D3844 - cmp r0, #0 - bne _021D852A - mov r0, #0 - pop {r3, pc} -_021D852A: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8508 - - thumb_func_start ov21_021D8530 -ov21_021D8530: ; 0x021D8530 - mov r2, #0 - str r2, [r0, #0x10] - str r2, [r0, #0xc] - ldr r0, [r1, #0x1c] - str r2, [r0, #8] - bx lr - thumb_func_end ov21_021D8530 - - thumb_func_start ov21_021D853C -ov21_021D853C: ; 0x021D853C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - add r5, r1, #0 - bl ov21_021D5B68 - cmp r0, #0 - beq _021D857C - ldr r0, [r4, #0x1c] - add r1, r5, #0 - ldr r0, [r0, #4] - bl ov21_021D36FC - ldr r1, [r4, #0x20] - mov r2, #1 - ldr r0, [r1, #0] - mov r3, #2 - orr r0, r2 - str r0, [r1, #0] - ldr r1, [r4, #0x1c] - mov r0, #0 - str r0, [r1, #0xc] - ldr r1, [r4, #0x1c] - str r3, [r1, #0x20] - ldr r1, [r4, #0x1c] - str r2, [r1, #0x10] - ldr r1, [r4, #0x1c] - str r0, [r1, #0x14] - ldr r1, [r4, #0x1c] - str r0, [r1, #8] - ldr r1, [r4, #0x1c] - str r0, [r1, #0x1c] -_021D857C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D853C - - thumb_func_start ov21_021D8580 -ov21_021D8580: ; 0x021D8580 - cmp r1, #0 - bge _021D8586 - neg r1, r1 -_021D8586: - cmp r1, #0x40 - bge _021D8598 - add r2, r0, #0 - ldr r1, _021D85A8 ; =0x000004CD - sub r2, #0x29 - cmp r2, r1 - blt _021D85A6 - sub r0, #0x29 - bx lr -_021D8598: - ldr r1, _021D85AC ; =0x00000333 - add r2, r0, r1 - mov r1, #1 - lsl r1, r1, #0xc - cmp r2, r1 - bgt _021D85A6 - add r0, r2, #0 -_021D85A6: - bx lr - ; .align 2, 0 -_021D85A8: .word 0x000004CD -_021D85AC: .word 0x00000333 - thumb_func_end ov21_021D8580 - - thumb_func_start ov21_021D85B0 -ov21_021D85B0: ; 0x021D85B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021D86E8 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D8724 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D874C - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021D87C8 - str r0, [r5, #0x24] - ldr r0, _021D85F8 ; =ov21_021D87CC - str r0, [r5, #8] - ldr r0, _021D85FC ; =ov21_021D8804 - str r0, [r5, #0xc] - ldr r0, _021D8600 ; =ov21_021D8928 - str r0, [r5, #0x10] - ldr r0, _021D8604 ; =ov21_021D893C - str r0, [r5, #0x14] - ldr r0, _021D8608 ; =ov21_021D89B8 - str r0, [r5, #0x18] - ldr r0, _021D860C ; =ov21_021D89F4 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D85F8: .word ov21_021D87CC -_021D85FC: .word ov21_021D8804 -_021D8600: .word ov21_021D8928 -_021D8604: .word ov21_021D893C -_021D8608: .word ov21_021D89B8 -_021D860C: .word ov21_021D89F4 - thumb_func_end ov21_021D85B0 - - thumb_func_start ov21_021D8610 -ov21_021D8610: ; 0x021D8610 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021D8788 - ldr r0, [r4, #4] - bl ov21_021D879C - ldr r0, [r4, #0x20] - bl ov21_021D87B0 - pop {r4, pc} - thumb_func_end ov21_021D8610 - - thumb_func_start ov21_021D8628 -ov21_021D8628: ; 0x021D8628 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r0, #0] - cmp r5, #4 - blt _021D8636 - bl sub_02022974 -_021D8636: - str r5, [r4, #0xc] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8628 - - thumb_func_start ov21_021D863C -ov21_021D863C: ; 0x021D863C - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D863C - - thumb_func_start ov21_021D8644 -ov21_021D8644: ; 0x021D8644 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r0, #0] - cmp r5, #6 - blt _021D8652 - bl sub_02022974 -_021D8652: - str r5, [r4, #0x10] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8644 - - thumb_func_start ov21_021D8658 -ov21_021D8658: ; 0x021D8658 - ldr r0, [r0, #0] - ldr r0, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D8658 - - thumb_func_start ov21_021D8660 -ov21_021D8660: ; 0x021D8660 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r0, #0] - cmp r5, #0xa - blt _021D866E - bl sub_02022974 -_021D866E: - str r5, [r4, #0x14] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8660 - - thumb_func_start ov21_021D8674 -ov21_021D8674: ; 0x021D8674 - ldr r0, [r0, #0] - ldr r0, [r0, #0x14] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D8674 - - thumb_func_start ov21_021D867C -ov21_021D867C: ; 0x021D867C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - ldr r4, [r0, #0] - cmp r5, #0x12 - blt _021D868C - bl sub_02022974 -_021D868C: - cmp r6, #0 - bne _021D8694 - str r5, [r4, #0x18] - pop {r4, r5, r6, pc} -_021D8694: - str r5, [r4, #0x1c] - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D867C - - thumb_func_start ov21_021D8698 -ov21_021D8698: ; 0x021D8698 - ldr r0, [r0, #0] - cmp r1, #0 - bne _021D86A2 - ldr r0, [r0, #0x18] - bx lr -_021D86A2: - ldr r0, [r0, #0x1c] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D8698 - - thumb_func_start ov21_021D86A8 -ov21_021D86A8: ; 0x021D86A8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r0, #0] - cmp r5, #0xf - blt _021D86B6 - bl sub_02022974 -_021D86B6: - str r5, [r4, #0x20] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D86A8 - - thumb_func_start ov21_021D86BC -ov21_021D86BC: ; 0x021D86BC - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D86BC - - thumb_func_start ov21_021D86C4 -ov21_021D86C4: ; 0x021D86C4 - ldr r2, [r0, #0] - mov r0, #1 - str r0, [r2, #0x24] - str r1, [r2, #0x28] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D86C4 - - thumb_func_start ov21_021D86D0 -ov21_021D86D0: ; 0x021D86D0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x28] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D86D0 - - thumb_func_start ov21_021D86D8 -ov21_021D86D8: ; 0x021D86D8 - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D86D8 - - thumb_func_start ov21_021D86E0 -ov21_021D86E0: ; 0x021D86E0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x34] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D86E0 - - thumb_func_start ov21_021D86E8 -ov21_021D86E8: ; 0x021D86E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x38 - bl sub_02018144 - add r4, r0, #0 - bne _021D86FA - bl sub_02022974 -_021D86FA: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x38 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #0 - bl ov21_021D1410 - ldr r0, [r0, #0] - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D86E8 - - thumb_func_start ov21_021D8724 -ov21_021D8724: ; 0x021D8724 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021D8736 - bl sub_02022974 -_021D8736: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D8724 - - thumb_func_start ov21_021D874C -ov21_021D874C: ; 0x021D874C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021D87C8 - add r7, r0, #0 - mov r1, #0x14 - mul r7, r1 - add r0, r5, #0 - add r1, r7, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021D876C - bl sub_02022974 -_021D876C: - add r0, r4, #0 - mov r1, #0 - add r2, r7, #0 - bl sub_020D5124 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #2 - bl ov21_021D47F0 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D874C - - thumb_func_start ov21_021D8788 -ov21_021D8788: ; 0x021D8788 - push {r4, lr} - add r4, r0, #0 - bne _021D8792 - bl sub_02022974 -_021D8792: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8788 - - thumb_func_start ov21_021D879C -ov21_021D879C: ; 0x021D879C - push {r4, lr} - add r4, r0, #0 - bne _021D87A6 - bl sub_02022974 -_021D87A6: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D879C - - thumb_func_start ov21_021D87B0 -ov21_021D87B0: ; 0x021D87B0 - push {r4, lr} - add r4, r0, #0 - bne _021D87BA - bl sub_02022974 -_021D87BA: - add r0, r4, #0 - bl ov21_021D4660 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov21_021D87B0 - - thumb_func_start ov21_021D87C8 -ov21_021D87C8: ; 0x021D87C8 - mov r0, #1 - bx lr - thumb_func_end ov21_021D87C8 - - thumb_func_start ov21_021D87CC -ov21_021D87CC: ; 0x021D87CC - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - mov r1, #4 - bl sub_02018144 - add r6, r0, #0 - bne _021D87E2 - bl sub_02022974 -_021D87E2: - mov r0, #0 - strb r0, [r6] - strb r0, [r6, #1] - strb r0, [r6, #2] - strb r0, [r6, #3] - str r6, [r5, #8] - str r0, [r4, #0xc] - str r0, [r4, #0x10] - str r0, [r4, #0x14] - str r0, [r4, #0x18] - str r0, [r4, #0x1c] - str r0, [r4, #0x20] - str r0, [r4, #0x24] - str r0, [r4, #0x28] - str r0, [r4, #0x30] - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D87CC - - thumb_func_start ov21_021D8804 -ov21_021D8804: ; 0x021D8804 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - cmp r0, #1 - bne _021D8818 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, pc} -_021D8818: - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _021D8824 - add sp, #0x14 - mov r0, #0 - pop {r4, r5, pc} -_021D8824: - ldr r0, [r5, #0] - cmp r0, #4 - bhi _021D891A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D8836: ; jump table - .short _021D8840 - _021D8836 - 2 ; case 0 - .short _021D8876 - _021D8836 - 2 ; case 1 - .short _021D8894 - _021D8836 - 2 ; case 2 - .short _021D88A4 - _021D8836 - 2 ; case 3 - .short _021D8908 - _021D8836 - 2 ; case 4 -_021D8840: - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021D884A - mov r0, #0 - str r0, [r4, #0x2c] -_021D884A: - ldr r0, [r4, #0x24] - cmp r0, #1 - bne _021D891E - ldr r0, [r4, #0x28] - cmp r0, #0 - bne _021D8866 - ldr r2, [r4, #0] - mov r0, #2 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] - mov r0, #4 - str r0, [r4, #0x30] - b _021D891E -_021D8866: - mov r0, #1 - str r0, [r4, #0x30] - mov r0, #4 - str r0, [r4, #0x34] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D891E -_021D8876: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bpl _021D891E - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #2 - str r0, [r4, #0x30] - mov r0, #0x20 - str r0, [r4, #0x34] - ldr r0, _021D8924 ; =0x000005FF - bl sub_02005748 - b _021D891E -_021D8894: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bpl _021D891E - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D891E -_021D88A4: - ldr r0, [r4, #4] - bl ov21_021D36D8 - ldr r1, [r4, #0x1c] - str r1, [sp] - ldr r1, [r4, #0x20] - str r1, [sp, #4] - str r0, [sp, #8] - ldr r0, [r5, #4] - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - ldr r2, [r4, #0x14] - ldr r3, [r4, #0x18] - bl ov21_021D3464 - cmp r0, #1 - bne _021D88EE - ldr r2, [r4, #0] - mov r0, #2 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] - ldr r0, [r4, #4] - mov r1, #0 - bl ov21_021D3810 - mov r0, #0x5d - ldr r1, [r4, #4] - mov r2, #1 - lsl r0, r0, #6 - str r2, [r1, r0] - ldr r0, [r4, #8] - str r2, [r0, #0x18] - b _021D891E -_021D88EE: - mov r0, #0 - str r0, [r4, #0x28] - str r0, [r4, #0x24] - mov r0, #1 - str r0, [r4, #0x2c] - mov r0, #3 - str r0, [r4, #0x30] - mov r0, #4 - str r0, [r4, #0x34] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D891E -_021D8908: - ldr r0, [r4, #0x34] - sub r0, r0, #1 - str r0, [r4, #0x34] - bpl _021D891E - mov r0, #0 - str r0, [r4, #0x30] - str r0, [r4, #0x34] - str r0, [r5, #0] - b _021D891E -_021D891A: - bl sub_02022974 -_021D891E: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_021D8924: .word 0x000005FF - thumb_func_end ov21_021D8804 - - thumb_func_start ov21_021D8928 -ov21_021D8928: ; 0x021D8928 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8928 - - thumb_func_start ov21_021D893C -ov21_021D893C: ; 0x021D893C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - ldr r3, [r3, #8] - ldr r0, [r4, #8] - cmp r1, #3 - bhi _021D89B2 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D8958: ; jump table - .short _021D8960 - _021D8958 - 2 ; case 0 - .short _021D897A - _021D8958 - 2 ; case 1 - .short _021D899C - _021D8958 - 2 ; case 2 - .short _021D89AE - _021D8958 - 2 ; case 3 -_021D8960: - ldr r0, [r4, #4] - mov r1, #0x64 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x64 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D89B2 -_021D897A: - ldr r1, [r4, #4] - str r1, [sp] - add r1, r5, #0 - bl ov21_021D8A7C - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - str r0, [sp] - sub r2, #0x10 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D89B2 -_021D899C: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _021D89B2 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D89B2 -_021D89AE: - mov r0, #1 - pop {r3, r4, r5, pc} -_021D89B2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D893C - - thumb_func_start ov21_021D89B8 -ov21_021D89B8: ; 0x021D89B8 - push {r4, lr} - add r3, r1, #0 - ldr r1, [r2, #0x30] - add r4, r0, #0 - ldr r0, [r3, #8] - cmp r1, #0 - bne _021D89D0 - ldr r3, [r3, #4] - add r1, r4, #0 - bl ov21_021D8ED4 - b _021D89EE -_021D89D0: - cmp r1, #1 - beq _021D89D8 - cmp r1, #3 - bne _021D89E2 -_021D89D8: - ldr r3, [r3, #4] - add r1, r4, #0 - bl ov21_021D9320 - b _021D89EE -_021D89E2: - cmp r1, #4 - beq _021D89EE - ldr r3, [r3, #4] - add r1, r4, #0 - bl ov21_021D9390 -_021D89EE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D89B8 - - thumb_func_start ov21_021D89F4 -ov21_021D89F4: ; 0x021D89F4 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0] - add r3, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021D8A76 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D8A10: ; jump table - .short _021D8A1A - _021D8A10 - 2 ; case 0 - .short _021D8A40 - _021D8A10 - 2 ; case 1 - .short _021D8A52 - _021D8A10 - 2 ; case 2 - .short _021D8A60 - _021D8A10 - 2 ; case 3 - .short _021D8A70 - _021D8A10 - 2 ; case 4 -_021D8A1A: - ldr r0, [r2, #0x28] - cmp r0, #0 - bne _021D8A3A - mov r0, #1 - str r0, [sp] - mov r0, #6 - add r1, r0, #0 - sub r1, #0x16 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D8A76 -_021D8A3A: - mov r0, #2 - str r0, [r4, #0] - b _021D8A76 -_021D8A40: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _021D8A76 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D8A76 -_021D8A52: - add r1, r3, #0 - bl ov21_021D8B40 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D8A76 -_021D8A60: - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D8A76 -_021D8A70: - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_021D8A76: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021D89F4 - - thumb_func_start ov21_021D8A7C -ov21_021D8A7C: ; 0x021D8A7C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #2 - ldr r0, [r0, #0] - add r4, r2, #0 - ldr r6, [sp, #0x18] - bl sub_02019EBC - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - ldr r0, [r5, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r5, #0] - mov r1, #7 - add r0, r0, #4 - bl sub_0201C2B4 - add r0, r5, #0 - bl ov21_021D8C00 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021D8B8C - ldr r0, [r4, #4] - bl ov21_021D36D8 - str r0, [sp] - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021D8BC4 - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov21_021D8C1C - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021D8D0C - ldr r1, [r4, #0xc] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D8DD4 - ldr r1, [r4, #0xc] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D8F98 - ldr r1, [r4, #0x10] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9054 - ldr r1, [r4, #0x14] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D90B4 - ldr r1, [r4, #0x18] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9234 - ldr r1, [r4, #0x1c] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9240 - ldr r1, [r4, #0x20] - add r0, r7, #0 - bl ov21_021D924C - mov r0, #1 - add r1, r0, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8A7C - - thumb_func_start ov21_021D8B40 -ov21_021D8B40: ; 0x021D8B40 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D8DC0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D8CC8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D8BEC - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201C2B4 - mov r0, #1 - mov r1, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8B40 - - thumb_func_start ov21_021D8B8C -ov21_021D8B8C: ; 0x021D8B8C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r4, r2, #0 - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x1c - mov r3, #3 - bl ov21_021D2724 - mov r0, #0x20 - str r0, [sp] - str r4, [sp, #4] - mov r2, #0 - ldr r0, [r5, #0] - mov r1, #5 - add r3, r2, #0 - bl ov21_021D276C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8B8C - - thumb_func_start ov21_021D8BC4 -ov21_021D8BC4: ; 0x021D8BC4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [sp, #0x10] - cmp r0, #1 - bne _021D8BD4 - mov r2, #0x2a - b _021D8BD6 -_021D8BD4: - mov r2, #0x28 -_021D8BD6: - str r3, [sp] - ldr r0, [r1, #0] - add r3, r4, #0 - add r1, r2, #0 - mov r2, #1 - add r3, #0x60 - bl ov21_021D27B8 - str r0, [r4, #0x5c] - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021D8BC4 - - thumb_func_start ov21_021D8BEC -ov21_021D8BEC: ; 0x021D8BEC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x5c] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x5c] - str r0, [r4, #0x60] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8BEC - - thumb_func_start ov21_021D8C00 -ov21_021D8C00: ; 0x021D8C00 - push {r4, lr} - ldr r0, [r0, #0] - bl ov21_021D2170 - add r4, r0, #0 - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - add r0, r4, #0 - bl sub_02008780 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8C00 - - thumb_func_start ov21_021D8C1C -ov21_021D8C1C: ; 0x021D8C1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021D8CB8 ; =0x00003AE9 - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x51 - bl sub_02009A4C - str r0, [r5, #0x24] - bl sub_0200A3DC - ldr r0, [r5, #0x24] - bl sub_02009D4C - ldr r0, _021D8CBC ; =0x00003A9B - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xc - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x28] - bl sub_0200A640 - ldr r0, [r5, #0x28] - bl sub_02009D4C - ldr r0, _021D8CC0 ; =0x00003AE7 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x4f - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x2c] - ldr r0, _021D8CC4 ; =0x00003AE8 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x50 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x30] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D8CB8: .word 0x00003AE9 -_021D8CBC: .word 0x00003A9B -_021D8CC0: .word 0x00003AE7 -_021D8CC4: .word 0x00003AE8 - thumb_func_end ov21_021D8C1C - - thumb_func_start ov21_021D8CC8 -ov21_021D8CC8: ; 0x021D8CC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x24] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x28] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x24] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x28] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x2c] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x30] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D8CC8 - - thumb_func_start ov21_021D8D0C -ov21_021D8D0C: ; 0x021D8D0C - push {r4, r5, r6, lr} - sub sp, #0x70 - add r6, r3, #0 - ldr r4, [r1, #0] - ldr r3, _021D8DBC ; =0x00003AE8 - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r2, #0x4d - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x44] - lsl r0, r0, #0x13 - str r0, [sp, #0x34] - mov r0, #0x29 - lsl r0, r0, #0xe - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r6, [sp, #0x48] - bl sub_02021B90 - mov r1, #3 - str r0, [r5, #0x20] - bl sub_02021D6C - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x34] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0x58] - mov r1, #0x11 - bl sub_02021D6C - ldr r0, [r5, #0x58] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #0x58] - mov r1, #1 - bl sub_02021CF8 - ldr r0, [r5, #0x58] - mov r1, #0 - bl sub_02021E80 - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D8DBC: .word 0x00003AE8 - thumb_func_end ov21_021D8D0C - - thumb_func_start ov21_021D8DC0 -ov21_021D8DC0: ; 0x021D8DC0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - bl sub_02021BD4 - ldr r0, [r4, #0x58] - bl sub_02021BD4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D8DC0 - - thumb_func_start ov21_021D8DD4 -ov21_021D8DD4: ; 0x021D8DD4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r5, [r0, #0] - mov r0, #0xd0 - str r0, [sp] - mov r0, #0x20 - add r6, r1, #0 - add r7, r2, #0 - str r0, [sp, #4] - add r0, r5, #4 - mov r1, #0 - mov r2, #0x18 - mov r3, #8 - bl sub_0201AE78 - cmp r6, #3 - bhi _021D8E18 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D8E02: ; jump table - .short _021D8E0A - _021D8E02 - 2 ; case 0 - .short _021D8E0E - _021D8E02 - 2 ; case 1 - .short _021D8E12 - _021D8E02 - 2 ; case 2 - .short _021D8E16 - _021D8E02 - 2 ; case 3 -_021D8E0A: - mov r4, #0x5a - b _021D8E18 -_021D8E0E: - mov r4, #0x57 - b _021D8E18 -_021D8E12: - mov r4, #0x58 - b _021D8E18 -_021D8E16: - mov r4, #0x59 -_021D8E18: - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021D1CE0 - add r6, r0, #0 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #0xd0 - sub r0, r1, r0 - lsr r4, r0, #1 - add r0, r6, #0 - add r4, #0x18 - bl sub_02023C5C - lsl r1, r0, #4 - mov r0, #0x20 - sub r0, r0, r1 - lsr r0, r0, #1 - add r0, #8 - str r0, [sp] - mov r1, #0 - ldr r0, _021D8E64 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r6, #0 - add r3, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D8E64: .word 0x00020100 - thumb_func_end ov21_021D8DD4 - - thumb_func_start ov21_021D8E68 -ov21_021D8E68: ; 0x021D8E68 - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r4, [r0, #0] - mov r0, #0xd0 - str r0, [sp] - mov r0, #0x20 - add r5, r1, #0 - str r0, [sp, #4] - add r0, r4, #4 - mov r1, #0 - mov r2, #0x18 - mov r3, #8 - bl sub_0201AE78 - mov r0, #0x5d - add r1, r5, #0 - bl ov21_021D1CE0 - add r6, r0, #0 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #0xd0 - sub r0, r1, r0 - lsr r5, r0, #1 - add r0, r6, #0 - add r5, #0x18 - bl sub_02023C5C - lsl r1, r0, #4 - mov r0, #0x20 - sub r0, r0, r1 - lsr r0, r0, #1 - add r0, #8 - str r0, [sp] - mov r1, #0 - ldr r0, _021D8ED0 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r4, #4 - add r2, r6, #0 - add r3, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D8ED0: .word 0x00020100 - thumb_func_end ov21_021D8E68 - - thumb_func_start ov21_021D8ED4 -ov21_021D8ED4: ; 0x021D8ED4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r2, #0 - add r6, r1, #0 - ldr r1, [r4, #0x2c] - ldr r0, [r5, #0x18] - add r7, r3, #0 - cmp r1, r0 - beq _021D8EF8 - str r1, [r5, #0x18] - cmp r1, #1 - bne _021D8EF8 - mov r0, #0x40 - str r0, [r5, #0x1c] - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021D8E68 -_021D8EF8: - ldr r0, [r5, #0x1c] - cmp r0, #0 - ble _021D8F04 - sub r0, r0, #1 - str r0, [r5, #0x1c] - b _021D8F16 -_021D8F04: - bne _021D8F16 - ldr r1, [r4, #0xc] - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D8DD4 - ldr r0, [r5, #0x1c] - sub r0, r0, #1 - str r0, [r5, #0x1c] -_021D8F16: - ldr r1, [r4, #0xc] - ldr r0, [r5, #0] - cmp r0, r1 - beq _021D8F34 - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D8F98 - ldr r1, [r4, #0xc] - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D8DD4 - ldr r0, [r4, #0xc] - str r0, [r5, #0] -_021D8F34: - ldr r1, [r4, #0x10] - ldr r0, [r5, #4] - cmp r0, r1 - beq _021D8F48 - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D9054 - ldr r0, [r4, #0x10] - str r0, [r5, #4] -_021D8F48: - ldr r1, [r4, #0x14] - ldr r0, [r5, #8] - cmp r0, r1 - beq _021D8F5C - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D90B4 - ldr r0, [r4, #0x14] - str r0, [r5, #8] -_021D8F5C: - ldr r1, [r4, #0x18] - ldr r0, [r5, #0xc] - cmp r0, r1 - beq _021D8F70 - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D9234 - ldr r0, [r4, #0x18] - str r0, [r5, #0xc] -_021D8F70: - ldr r1, [r4, #0x1c] - ldr r0, [r5, #0x10] - cmp r0, r1 - beq _021D8F84 - add r0, r6, #0 - add r2, r7, #0 - bl ov21_021D9240 - ldr r0, [r4, #0x1c] - str r0, [r5, #0x10] -_021D8F84: - ldr r1, [r4, #0x20] - ldr r0, [r5, #0x14] - cmp r0, r1 - beq _021D8F96 - add r0, r5, #0 - bl ov21_021D924C - ldr r0, [r4, #0x20] - str r0, [r5, #0x14] -_021D8F96: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D8ED4 - - thumb_func_start ov21_021D8F98 -ov21_021D8F98: ; 0x021D8F98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r0, #0 - str r2, [sp] - add r7, r1, #0 - str r2, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #0x2b - mov r2, #1 - add r3, sp, #0x14 - bl ov21_021D27B8 - ldr r2, [sp, #0x14] - mov r3, #0 - str r3, [sp] - str r0, [sp, #0x10] - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - ldr r0, [sp, #0x10] - bl sub_020181C4 - cmp r7, #3 - bhi _021D9008 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D8FEA: ; jump table - .short _021D8FF2 - _021D8FEA - 2 ; case 0 - .short _021D8FF8 - _021D8FEA - 2 ; case 1 - .short _021D8FFE - _021D8FEA - 2 ; case 2 - .short _021D9004 - _021D8FEA - 2 ; case 3 -_021D8FF2: - mov r5, #6 - mov r6, #0x2c - b _021D9008 -_021D8FF8: - mov r5, #9 - mov r6, #0x2d - b _021D9008 -_021D8FFE: - mov r5, #0xc - mov r6, #0x2e - b _021D9008 -_021D9004: - mov r5, #0x11 - mov r6, #0x2f -_021D9008: - ldr r0, [sp, #0xc] - add r1, r6, #0 - str r0, [sp] - ldr r0, [r4, #0] - mov r2, #1 - add r3, sp, #0x14 - bl ov21_021D27B8 - add r6, r0, #0 - lsl r0, r5, #0x18 - ldr r2, [sp, #0x14] - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021D8F98 - - thumb_func_start ov21_021D9054 -ov21_021D9054: ; 0x021D9054 - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r4, [r0, #0] - mov r0, #0x50 - str r0, [sp] - mov r0, #0x10 - add r5, r1, #0 - add r6, r2, #0 - str r0, [sp, #4] - add r0, r4, #4 - mov r1, #0 - mov r2, #0x58 - mov r3, #0x34 - bl sub_0201AE78 - add r5, #0x51 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021D1CE0 - add r5, r0, #0 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - mov r3, #0x50 - bl sub_02002EEC - add r3, r0, #0 - mov r0, #0x34 - str r0, [sp] - mov r1, #0 - ldr r0, _021D90B0 ; =0x00040300 - str r1, [sp, #4] - str r0, [sp, #8] - add r3, #0x58 - add r0, r4, #4 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D90B0: .word 0x00040300 - thumb_func_end ov21_021D9054 - - thumb_func_start ov21_021D90B4 -ov21_021D90B4: ; 0x021D90B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r5, [r0, #0] - mov r0, #0x50 - str r0, [sp] - mov r0, #0x10 - add r6, r1, #0 - add r7, r2, #0 - str r0, [sp, #4] - add r0, r5, #4 - mov r1, #0 - mov r2, #0x58 - mov r3, #0x4d - bl sub_0201AE78 - cmp r6, #9 - bhi _021D911C - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D90E2: ; jump table - .short _021D90F6 - _021D90E2 - 2 ; case 0 - .short _021D90FA - _021D90E2 - 2 ; case 1 - .short _021D90FE - _021D90E2 - 2 ; case 2 - .short _021D9102 - _021D90E2 - 2 ; case 3 - .short _021D9106 - _021D90E2 - 2 ; case 4 - .short _021D910A - _021D90E2 - 2 ; case 5 - .short _021D910E - _021D90E2 - 2 ; case 6 - .short _021D9112 - _021D90E2 - 2 ; case 7 - .short _021D9116 - _021D90E2 - 2 ; case 8 - .short _021D911A - _021D90E2 - 2 ; case 9 -_021D90F6: - mov r4, #0x7e - b _021D911C -_021D90FA: - mov r4, #0x36 - b _021D911C -_021D90FE: - mov r4, #0x37 - b _021D911C -_021D9102: - mov r4, #0x38 - b _021D911C -_021D9106: - mov r4, #0x39 - b _021D911C -_021D910A: - mov r4, #0x3a - b _021D911C -_021D910E: - mov r4, #0x3b - b _021D911C -_021D9112: - mov r4, #0x3c - b _021D911C -_021D9116: - mov r4, #0x3d - b _021D911C -_021D911A: - mov r4, #0x3e -_021D911C: - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021D1CE0 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - mov r3, #0x50 - bl sub_02002EEC - add r3, r0, #0 - mov r0, #0x4d - str r0, [sp] - mov r1, #0 - ldr r0, _021D9158 ; =0x00040300 - str r1, [sp, #4] - str r0, [sp, #8] - add r3, #0x58 - add r0, r5, #4 - add r2, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D9158: .word 0x00040300 - thumb_func_end ov21_021D90B4 - - thumb_func_start ov21_021D915C -ov21_021D915C: ; 0x021D915C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r5, [r0, #0] - add r7, r3, #0 - mov r0, #0x50 - str r0, [sp] - mov r0, #0x10 - lsl r3, r7, #0x10 - add r6, r1, #0 - str r2, [sp, #0x10] - str r0, [sp, #4] - add r0, r5, #4 - mov r1, #0 - mov r2, #0x58 - lsr r3, r3, #0x10 - bl sub_0201AE78 - cmp r6, #0x11 - bhi _021D91F8 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D918E: ; jump table - .short _021D91B2 - _021D918E - 2 ; case 0 - .short _021D91B6 - _021D918E - 2 ; case 1 - .short _021D91BA - _021D918E - 2 ; case 2 - .short _021D91BE - _021D918E - 2 ; case 3 - .short _021D91C2 - _021D918E - 2 ; case 4 - .short _021D91C6 - _021D918E - 2 ; case 5 - .short _021D91CA - _021D918E - 2 ; case 6 - .short _021D91CE - _021D918E - 2 ; case 7 - .short _021D91D2 - _021D918E - 2 ; case 8 - .short _021D91D6 - _021D918E - 2 ; case 9 - .short _021D91DA - _021D918E - 2 ; case 10 - .short _021D91DE - _021D918E - 2 ; case 11 - .short _021D91E2 - _021D918E - 2 ; case 12 - .short _021D91E6 - _021D918E - 2 ; case 13 - .short _021D91EA - _021D918E - 2 ; case 14 - .short _021D91EE - _021D918E - 2 ; case 15 - .short _021D91F2 - _021D918E - 2 ; case 16 - .short _021D91F6 - _021D918E - 2 ; case 17 -_021D91B2: - mov r4, #0x35 - b _021D91F8 -_021D91B6: - mov r4, #0x40 - b _021D91F8 -_021D91BA: - mov r4, #0x46 - b _021D91F8 -_021D91BE: - mov r4, #0x49 - b _021D91F8 -_021D91C2: - mov r4, #0x47 - b _021D91F8 -_021D91C6: - mov r4, #0x48 - b _021D91F8 -_021D91CA: - mov r4, #0x4c - b _021D91F8 -_021D91CE: - mov r4, #0x4b - b _021D91F8 -_021D91D2: - mov r4, #0x4d - b _021D91F8 -_021D91D6: - mov r4, #0x50 - b _021D91F8 -_021D91DA: - mov r4, #0x41 - b _021D91F8 -_021D91DE: - mov r4, #0x42 - b _021D91F8 -_021D91E2: - mov r4, #0x44 - b _021D91F8 -_021D91E6: - mov r4, #0x43 - b _021D91F8 -_021D91EA: - mov r4, #0x4a - b _021D91F8 -_021D91EE: - mov r4, #0x45 - b _021D91F8 -_021D91F2: - mov r4, #0x4e - b _021D91F8 -_021D91F6: - mov r4, #0x4f -_021D91F8: - ldr r1, [sp, #0x10] - add r0, r4, #0 - bl ov21_021D1CE0 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - mov r3, #0x50 - bl sub_02002EEC - add r3, r0, #0 - str r7, [sp] - mov r1, #0 - ldr r0, _021D9230 ; =0x00040300 - str r1, [sp, #4] - str r0, [sp, #8] - add r3, #0x58 - add r0, r5, #4 - add r2, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D9230: .word 0x00040300 - thumb_func_end ov21_021D915C - - thumb_func_start ov21_021D9234 -ov21_021D9234: ; 0x021D9234 - push {r3, lr} - mov r3, #0x66 - bl ov21_021D915C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9234 - - thumb_func_start ov21_021D9240 -ov21_021D9240: ; 0x021D9240 - push {r3, lr} - mov r3, #0x78 - bl ov21_021D915C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9240 - - thumb_func_start ov21_021D924C -ov21_021D924C: ; 0x021D924C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - ldr r0, [r4, #0x20] - bne _021D925E - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, pc} -_021D925E: - mov r1, #1 - bl sub_02021CAC - cmp r5, #0xe - bhi _021D931C - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9274: ; jump table - .short _021D931C - _021D9274 - 2 ; case 0 - .short _021D9292 - _021D9274 - 2 ; case 1 - .short _021D929C - _021D9274 - 2 ; case 2 - .short _021D92A6 - _021D9274 - 2 ; case 3 - .short _021D92B0 - _021D9274 - 2 ; case 4 - .short _021D92BA - _021D9274 - 2 ; case 5 - .short _021D92C4 - _021D9274 - 2 ; case 6 - .short _021D92CE - _021D9274 - 2 ; case 7 - .short _021D92D8 - _021D9274 - 2 ; case 8 - .short _021D92E2 - _021D9274 - 2 ; case 9 - .short _021D92EC - _021D9274 - 2 ; case 10 - .short _021D92F6 - _021D9274 - 2 ; case 11 - .short _021D9300 - _021D9274 - 2 ; case 12 - .short _021D930A - _021D9274 - 2 ; case 13 - .short _021D9314 - _021D9274 - 2 ; case 14 -_021D9292: - ldr r0, [r4, #0x20] - mov r1, #3 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D929C: - ldr r0, [r4, #0x20] - mov r1, #4 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92A6: - ldr r0, [r4, #0x20] - mov r1, #5 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92B0: - ldr r0, [r4, #0x20] - mov r1, #6 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92BA: - ldr r0, [r4, #0x20] - mov r1, #7 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92C4: - ldr r0, [r4, #0x20] - mov r1, #8 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92CE: - ldr r0, [r4, #0x20] - mov r1, #9 - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92D8: - ldr r0, [r4, #0x20] - mov r1, #0xa - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92E2: - ldr r0, [r4, #0x20] - mov r1, #0xb - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92EC: - ldr r0, [r4, #0x20] - mov r1, #0xc - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D92F6: - ldr r0, [r4, #0x20] - mov r1, #0xd - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D9300: - ldr r0, [r4, #0x20] - mov r1, #0xe - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D930A: - ldr r0, [r4, #0x20] - mov r1, #0xf - bl sub_02021D6C - pop {r3, r4, r5, pc} -_021D9314: - ldr r0, [r4, #0x20] - mov r1, #0x10 - bl sub_02021D6C -_021D931C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D924C - - thumb_func_start ov21_021D9320 -ov21_021D9320: ; 0x021D9320 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r2, #0x34] - add r4, r1, #0 - cmp r0, #4 - bne _021D9384 - ldr r0, [r2, #0x30] - cmp r0, #1 - bne _021D9358 - mov r1, #0 - str r1, [sp] - mov r0, #0xc - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #0x14 - str r0, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - ldr r1, [r4, #0] - add r0, r5, #0 - ldr r1, [r1, #0] - ldr r3, [r5, #0x60] - add r0, #0x34 - mov r2, #2 - bl ov21_021D1558 - b _021D9384 -_021D9358: - add r0, r4, #0 - add r1, r5, #0 - add r2, r3, #0 - bl ov21_021D9454 - mov r0, #0xc - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - mov r0, #0x14 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - ldr r1, [r4, #0] - add r0, r5, #0 - ldr r1, [r1, #0] - ldr r3, [r5, #0x60] - add r0, #0x34 - mov r2, #2 - bl ov21_021D1558 -_021D9384: - add r5, #0x34 - add r0, r5, #0 - bl ov21_021D157C - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov21_021D9320 - - thumb_func_start ov21_021D9390 -ov21_021D9390: ; 0x021D9390 - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r5, r0, #0 - ldr r0, [r6, #0x34] - add r4, r1, #0 - add r7, r3, #0 - cmp r0, #0x20 - bne _021D93B2 - ldr r0, [r5, #0x58] - mov r1, #1 - bl sub_02021CAC - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021D93F4 - b _021D93D0 -_021D93B2: - cmp r0, #0 - bne _021D93D0 - ldr r0, [r5, #0x58] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r4, #0] - add r0, r0, #4 - bl sub_0201A9A4 -_021D93D0: - ldr r2, [r6, #0x34] - mov r1, #4 - sub r2, r1, r2 - ldr r1, _021D93F0 ; =0x00007FFF - add r3, r2, #0 - mul r3, r1 - asr r1, r3, #1 - lsr r1, r1, #0x1e - add r1, r3, r1 - lsl r1, r1, #0xe - ldr r0, [r5, #0x58] - lsr r1, r1, #0x10 - bl sub_02021C94 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D93F0: .word 0x00007FFF - thumb_func_end ov21_021D9390 - - thumb_func_start ov21_021D93F4 -ov21_021D93F4: ; 0x021D93F4 - push {r3, r4, r5, lr} - sub sp, #0x10 - ldr r5, [r0, #0] - add r4, r1, #0 - add r0, r5, #4 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x5e - add r1, r4, #0 - bl ov21_021D1CE0 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #1 - lsl r1, r1, #8 - sub r0, r1, r0 - lsr r3, r0, #1 - mov r0, #0x80 - str r0, [sp] - mov r1, #0 - ldr r0, _021D9450 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #4 - add r2, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - mov r0, #1 - mov r1, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D9450: .word 0x00020100 - thumb_func_end ov21_021D93F4 - - thumb_func_start ov21_021D9454 -ov21_021D9454: ; 0x021D9454 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #1 - add r4, r1, #0 - add r1, r0, #0 - add r6, r2, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - ldr r0, [r5, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r1, [r4, #0] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D8F98 - ldr r1, [r4, #0] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D8DD4 - ldr r1, [r4, #4] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9054 - ldr r1, [r4, #8] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D90B4 - ldr r1, [r4, #0xc] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9234 - ldr r1, [r4, #0x10] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9240 - ldr r1, [r4, #0x14] - add r0, r4, #0 - bl ov21_021D924C - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D9454 - - thumb_func_start ov21_021D94BC -ov21_021D94BC: ; 0x021D94BC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021D9534 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D957C - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021D95B4 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021D95E4 - str r0, [r5, #0x24] - ldr r0, _021D9504 ; =ov21_021D95E8 - str r0, [r5, #8] - ldr r0, _021D9508 ; =ov21_021D964C - str r0, [r5, #0xc] - ldr r0, _021D950C ; =ov21_021D9780 - str r0, [r5, #0x10] - ldr r0, _021D9510 ; =ov21_021D97A0 - str r0, [r5, #0x14] - ldr r0, _021D9514 ; =ov21_021D9830 - str r0, [r5, #0x18] - ldr r0, _021D9518 ; =ov21_021D9960 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D9504: .word ov21_021D95E8 -_021D9508: .word ov21_021D964C -_021D950C: .word ov21_021D9780 -_021D9510: .word ov21_021D97A0 -_021D9514: .word ov21_021D9830 -_021D9518: .word ov21_021D9960 - thumb_func_end ov21_021D94BC - - thumb_func_start ov21_021D951C -ov21_021D951C: ; 0x021D951C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021D95B8 - ldr r0, [r4, #4] - bl ov21_021D95CC - ldr r0, [r4, #0x20] - bl ov21_021D95E0 - pop {r4, pc} - thumb_func_end ov21_021D951C - - thumb_func_start ov21_021D9534 -ov21_021D9534: ; 0x021D9534 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - bne _021D9546 - bl sub_02022974 -_021D9546: - add r2, r4, #0 - mov r1, #0x10 - mov r0, #0 -_021D954C: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D954C - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #1 - bl ov21_021D1410 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl ov21_021D1430 - str r0, [r4, #0xc] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D9534 - - thumb_func_start ov21_021D957C -ov21_021D957C: ; 0x021D957C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021D958E - bl sub_02022974 -_021D958E: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D957C - - thumb_func_start ov21_021D95B4 -ov21_021D95B4: ; 0x021D95B4 - mov r0, #0 - bx lr - thumb_func_end ov21_021D95B4 - - thumb_func_start ov21_021D95B8 -ov21_021D95B8: ; 0x021D95B8 - push {r4, lr} - add r4, r0, #0 - bne _021D95C2 - bl sub_02022974 -_021D95C2: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D95B8 - - thumb_func_start ov21_021D95CC -ov21_021D95CC: ; 0x021D95CC - push {r4, lr} - add r4, r0, #0 - bne _021D95D6 - bl sub_02022974 -_021D95D6: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D95CC - - thumb_func_start ov21_021D95E0 -ov21_021D95E0: ; 0x021D95E0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021D95E0 - - thumb_func_start ov21_021D95E4 -ov21_021D95E4: ; 0x021D95E4 - mov r0, #0 - bx lr - thumb_func_end ov21_021D95E4 - - thumb_func_start ov21_021D95E8 -ov21_021D95E8: ; 0x021D95E8 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - mov r1, #0x9c - bl sub_02018144 - add r4, r0, #0 - bne _021D95FE - bl sub_02022974 -_021D95FE: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x9c - bl sub_020D5124 - add r0, r4, #0 - ldr r1, _021D9648 ; =0x0000FFFF - str r4, [r5, #8] - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DC35C - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021D9ADC - ldr r1, [r5, #4] - add r0, r4, #0 - bl ov21_021DB3E0 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DB428 - mov r1, #0 - mov r0, #4 -_021D9638: - add r1, r1, #1 - str r0, [r4, #0x2c] - add r4, r4, #4 - cmp r1, #6 - blt _021D9638 - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_021D9648: .word 0x0000FFFF - thumb_func_end ov21_021D95E8 - - thumb_func_start ov21_021D964C -ov21_021D964C: ; 0x021D964C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #0xc] - ldr r4, [r5, #8] - ldr r7, [r0, #4] - ldr r0, [r5, #0xc] - cmp r0, #1 - bne _021D9666 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D9666: - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _021D9672 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D9672: - ldr r0, [r6, #8] - bl ov21_021D86D8 - cmp r0, #0 - beq _021D9682 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D9682: - ldr r0, [r6, #8] - bl ov21_021D863C - str r0, [sp, #4] - ldr r0, [r5, #0] - cmp r0, #4 - bhi _021D9778 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D969C: ; jump table - .short _021D96A6 - _021D969C - 2 ; case 0 - .short _021D9702 - _021D969C - 2 ; case 1 - .short _021D9710 - _021D969C - 2 ; case 2 - .short _021D9766 - _021D969C - 2 ; case 3 - .short _021D9774 - _021D969C - 2 ; case 4 -_021D96A6: - ldr r1, [r4, #0x24] - ldr r0, [sp, #4] - cmp r1, r0 - bne _021D96B6 - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x20] - cmp r1, r0 - beq _021D96DE -_021D96B6: - add r0, r4, #0 - mov r1, #0 - add r0, #0x98 - str r1, [r0, #0] - mov r0, #2 - str r0, [r7, #4] - add r0, r4, #0 - add r0, #0x98 - str r0, [r7, #8] - add r0, r4, #0 - bl ov21_021D9CA8 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov21_021D9CB8 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D9778 -_021D96DE: - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021D9B98 - ldr r0, [r6, #4] - bl ov21_021D3998 - cmp r0, #2 - bne _021D96F8 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DB2FC -_021D96F8: - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DC368 - b _021D9778 -_021D9702: - add r4, #0x98 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D9778 - add r0, r0, #1 - str r0, [r5, #0] - b _021D9778 -_021D9710: - ldr r0, [r4, #0x24] - add r1, r6, #0 - str r0, [sp] - ldr r0, [sp, #4] - str r0, [r4, #0x24] - ldr r0, [r4, #0x20] - str r0, [r4, #0x28] - ldr r2, [r5, #4] - add r0, r4, #0 - bl ov21_021D9B34 - ldr r1, [r5, #4] - add r0, r4, #0 - bl ov21_021DB468 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DC35C - ldr r1, [r4, #0x24] - ldr r0, [sp] - cmp r0, r1 - beq _021D9746 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DB428 -_021D9746: - add r0, r4, #0 - mov r1, #0 - add r0, #0x98 - str r1, [r0, #0] - mov r0, #1 - str r0, [r7, #4] - add r0, r4, #0 - add r0, #0x98 - str r0, [r7, #8] - add r0, r4, #0 - bl ov21_021D9D68 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D9778 -_021D9766: - add r4, #0x98 - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D9778 - add r0, r0, #1 - str r0, [r5, #0] - b _021D9778 -_021D9774: - mov r0, #0 - str r0, [r5, #0] -_021D9778: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D964C - - thumb_func_start ov21_021D9780 -ov21_021D9780: ; 0x021D9780 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r5, [r4, #8] - add r0, r5, #0 - bl ov21_021D9B24 - add r0, r5, #0 - bl ov21_021DB3C8 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D9780 - - thumb_func_start ov21_021D97A0 -ov21_021D97A0: ; 0x021D97A0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r6, r0, #0 - add r7, r2, #0 - ldr r5, [r3, #8] - ldr r0, [r4, #8] - cmp r1, #3 - bhi _021D982A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D97BE: ; jump table - .short _021D97C6 - _021D97BE - 2 ; case 0 - .short _021D97E4 - _021D97BE - 2 ; case 1 - .short _021D9814 - _021D97BE - 2 ; case 2 - .short _021D9826 - _021D97BE - 2 ; case 3 -_021D97C6: - mov r1, #0x4e - ldr r0, [r4, #4] - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x4e - str r0, [r4, #8] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D982A -_021D97E4: - ldr r1, [r4, #4] - add r3, r5, #0 - str r1, [sp] - add r1, r6, #0 - bl ov21_021D9A08 - mov r1, #0 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x10 - mov r3, #0x3f - bl sub_0200AAE0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021DB480 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D982A -_021D9814: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021D982A - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D982A -_021D9826: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D982A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021D97A0 - - thumb_func_start ov21_021D9830 -ov21_021D9830: ; 0x021D9830 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r0, r2, #0 - add r5, r1, #0 - ldr r0, [r0, #8] - str r2, [sp, #4] - ldr r6, [r3, #8] - ldr r4, [r5, #8] - bl ov21_021D86D8 - cmp r0, #0 - beq _021D9856 - ldr r2, [sp, #4] - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DC96C - b _021D98E0 -_021D9856: - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DC7C0 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r2, [r6, #0x24] - ldr r3, [r4, r0] - cmp r3, r2 - bne _021D9874 - add r0, r0, #4 - ldr r1, [r4, r0] - ldr r0, [r6, #0x28] - cmp r1, r0 - beq _021D98D6 -_021D9874: - mov r0, #0x41 - lsl r0, r0, #2 - str r2, [r4, r0] - ldr r1, [r6, #0x28] - add r0, r0, #4 - str r1, [r4, r0] - cmp r3, #3 - bne _021D9892 - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DB6C8 - add r0, r4, #0 - bl ov21_021DBDA0 -_021D9892: - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DB79C - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DBE3C - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #3 - bne _021D98C4 - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DB634 - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DBBE4 -_021D98C4: - mov r3, #0x41 - lsl r3, r3, #2 - ldr r2, [r4, r3] - add r3, r3, #4 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #1 - bl ov21_021DC8B4 -_021D98D6: - ldr r2, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021DB49C -_021D98E0: - mov r7, #0 - str r6, [sp, #8] - add r5, r4, #0 -_021D98E6: - ldr r1, [sp, #8] - ldr r0, [r5, #0] - ldr r1, [r1, #0x2c] - bl ov21_021D144C - ldr r1, [r5, #0x18] - cmp r1, #0 - beq _021D990E - cmp r7, #5 - bne _021D98FE - mov r3, #1 - b _021D9900 -_021D98FE: - mov r3, #3 -_021D9900: - mov r0, #5 - str r0, [sp] - mov r2, #5 - ldr r0, [r5, #0] - mvn r2, r2 - bl ov21_021D1524 -_021D990E: - ldr r0, [sp, #8] - add r7, r7, #1 - add r0, r0, #4 - add r5, r5, #4 - str r0, [sp, #8] - cmp r7, #6 - blt _021D98E6 - mov r5, #0 - mov r7, #6 -_021D9920: - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _021D992C - ldr r1, [r6, #0x44] - bl ov21_021D144C -_021D992C: - ldr r1, [r4, #0x6c] - cmp r1, #0 - beq _021D9940 - str r7, [sp] - mov r2, #5 - ldr r0, [r4, #0x30] - mvn r2, r2 - mov r3, #0xb - bl ov21_021D1524 -_021D9940: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D9950 - ldr r1, [r6, #0x44] - bl ov21_021D144C -_021D9950: - add r5, r5, #1 - add r4, r4, #4 - add r6, r6, #4 - cmp r5, #0xf - blt _021D9920 - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021D9830 - - thumb_func_start ov21_021D9960 -ov21_021D9960: ; 0x021D9960 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #8] - cmp r0, #4 - bhi _021D9A02 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D997C: ; jump table - .short _021D9986 - _021D997C - 2 ; case 0 - .short _021D99B0 - _021D997C - 2 ; case 1 - .short _021D99C2 - _021D997C - 2 ; case 2 - .short _021D99EA - _021D997C - 2 ; case 3 - .short _021D99FC - _021D997C - 2 ; case 4 -_021D9986: - ldr r0, [r2, #8] - bl ov21_021D86D0 - cmp r0, #1 - bne _021D9996 - mov r0, #2 - str r0, [r4, #0] - b _021D9A02 -_021D9996: - mov r0, #2 - str r0, [sp] - mov r0, #6 - add r1, r0, #0 - sub r1, #0x16 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D9A02 -_021D99B0: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021D9A02 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D9A02 -_021D99C2: - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021D9A4C - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #3 - bne _021D99E2 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021DB6C8 - add r0, r5, #0 - bl ov21_021DBDA0 -_021D99E2: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D9A02 -_021D99EA: - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D9A02 -_021D99FC: - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D9A02: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021D9960 - - thumb_func_start ov21_021D9A08 -ov21_021D9A08: ; 0x021D9A08 - push {r4, r5, r6, lr} - ldr r4, [sp, #0x10] - add r6, r1, #0 - add r5, r0, #0 - add r1, r2, #0 - add r0, r6, #0 - add r2, r4, #0 - bl ov21_021D9A74 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DB50C - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DB708 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DBDC8 - mov r3, #0x41 - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, r3, #4 - ldr r3, [r5, r3] - add r0, r5, #0 - mov r1, #1 - bl ov21_021DC8B4 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021D9A08 - - thumb_func_start ov21_021D9A4C -ov21_021D9A4C: ; 0x021D9A4C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021DBE2C - add r0, r5, #0 - bl ov21_021DB78C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DB5DC - mov r0, #0x79 - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D2584 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D9A4C - - thumb_func_start ov21_021D9A74 -ov21_021D9A74: ; 0x021D9A74 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r5, r2, #0 - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x1d - mov r3, #6 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x4b - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9A74 - - thumb_func_start ov21_021D9ADC -ov21_021D9ADC: ; 0x021D9ADC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov21_021D9BEC - ldr r0, [r5, #0x28] - add r1, r4, #0 - str r0, [sp] - ldr r3, [r5, #0x24] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9B58 - add r0, r5, #0 - bl ov21_021D9B04 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021D9ADC - - thumb_func_start ov21_021D9B04 -ov21_021D9B04: ; 0x021D9B04 - mov r2, #0 - add r3, r0, #0 - mov r1, #3 -_021D9B0A: - add r2, r2, #1 - str r1, [r3, #0x2c] - add r3, r3, #4 - cmp r2, #6 - blt _021D9B0A - mov r2, #0 - mov r1, #3 -_021D9B18: - add r2, r2, #1 - str r1, [r0, #0x44] - add r0, r0, #4 - cmp r2, #0xf - blt _021D9B18 - bx lr - thumb_func_end ov21_021D9B04 - - thumb_func_start ov21_021D9B24 -ov21_021D9B24: ; 0x021D9B24 - push {r4, lr} - add r4, r0, #0 - bl ov21_021D9D00 - add r0, r4, #0 - bl ov21_021D9D50 - pop {r4, pc} - thumb_func_end ov21_021D9B24 - - thumb_func_start ov21_021D9B34 -ov21_021D9B34: ; 0x021D9B34 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov21_021D9D50 - ldr r0, [r5, #0x28] - add r1, r4, #0 - str r0, [sp] - ldr r3, [r5, #0x24] - add r0, r5, #0 - add r2, r6, #0 - bl ov21_021D9B58 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9B34 - - thumb_func_start ov21_021D9B58 -ov21_021D9B58: ; 0x021D9B58 - push {r3, lr} - cmp r3, #3 - bhi _021D9B94 - add r3, r3, r3 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_021D9B6A: ; jump table - .short _021D9B72 - _021D9B6A - 2 ; case 0 - .short _021D9B78 - _021D9B6A - 2 ; case 1 - .short _021D9B7E - _021D9B6A - 2 ; case 2 - .short _021D9B90 - _021D9B6A - 2 ; case 3 -_021D9B72: - bl ov21_021D9D78 - pop {r3, pc} -_021D9B78: - bl ov21_021D9EB4 - pop {r3, pc} -_021D9B7E: - ldr r3, [sp, #8] - cmp r3, #0 - bne _021D9B8A - bl ov21_021DA018 - pop {r3, pc} -_021D9B8A: - bl ov21_021DA1C8 - pop {r3, pc} -_021D9B90: - bl ov21_021DA38C -_021D9B94: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9B58 - - thumb_func_start ov21_021D9B98 -ov21_021D9B98: ; 0x021D9B98 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021D9C90 - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021D9BB0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D9B98 - - thumb_func_start ov21_021D9BB0 -ov21_021D9BB0: ; 0x021D9BB0 - push {r3, lr} - cmp r2, #3 - bhi _021D9BEA - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D9BC2: ; jump table - .short _021D9BCA - _021D9BC2 - 2 ; case 0 - .short _021D9BD0 - _021D9BC2 - 2 ; case 1 - .short _021D9BD6 - _021D9BC2 - 2 ; case 2 - .short _021D9BE6 - _021D9BC2 - 2 ; case 3 -_021D9BCA: - bl ov21_021D9E08 - pop {r3, pc} -_021D9BD0: - bl ov21_021D9F44 - pop {r3, pc} -_021D9BD6: - cmp r3, #0 - bne _021D9BE0 - bl ov21_021DA0BC - pop {r3, pc} -_021D9BE0: - bl ov21_021DA280 - pop {r3, pc} -_021D9BE6: - bl ov21_021DA41C -_021D9BEA: - pop {r3, pc} - thumb_func_end ov21_021D9BB0 - - thumb_func_start ov21_021D9BEC -ov21_021D9BEC: ; 0x021D9BEC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #0x18 - bl sub_02018144 - str r0, [r5, #4] - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x20 - add r0, r0, #4 - mov r2, #0x40 - mov r3, #0xc0 - bl ov21_021D154C - mov r0, #0xec - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0 - mov r2, #0x20 - mov r3, #0xbc - bl ov21_021D154C - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x40 - add r0, #8 - mov r2, #0x60 - mov r3, #0xc0 - bl ov21_021D154C - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x60 - add r0, #0xc - mov r2, #0x80 - mov r3, #0xc0 - bl ov21_021D154C - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x80 - add r0, #0x10 - mov r2, #0xa0 - mov r3, #0xc0 - bl ov21_021D154C - mov r0, #0xfc - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #0x14 - mov r2, #0xc0 - mov r3, #0xac - bl ov21_021D154C - str r4, [r5, #0x10] - str r5, [r5, #0x14] - str r6, [sp] - add r3, r5, #0 - ldr r0, [r5, #4] - ldr r2, _021D9C8C ; =ov21_021D9D18 - mov r1, #6 - add r3, #0x10 - bl sub_02023FCC - str r0, [r5, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D9C8C: .word ov21_021D9D18 - thumb_func_end ov21_021D9BEC - - thumb_func_start ov21_021D9C90 -ov21_021D9C90: ; 0x021D9C90 - push {r4, lr} - add r4, r0, #0 - bl ov21_021D9CA8 - ldr r0, [r4, #0] - bl sub_0202404C - ldr r1, [r4, #0x24] - add r0, r4, #0 - bl ov21_021D9CB8 - pop {r4, pc} - thumb_func_end ov21_021D9C90 - - thumb_func_start ov21_021D9CA8 -ov21_021D9CA8: ; 0x021D9CA8 - mov r2, #0 - mov r1, #3 -_021D9CAC: - add r2, r2, #1 - str r1, [r0, #0x2c] - add r0, r0, #4 - cmp r2, #6 - blt _021D9CAC - bx lr - thumb_func_end ov21_021D9CA8 - - thumb_func_start ov21_021D9CB8 -ov21_021D9CB8: ; 0x021D9CB8 - cmp r1, #3 - bhi _021D9CFE - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D9CC8: ; jump table - .short _021D9CD0 - _021D9CC8 - 2 ; case 0 - .short _021D9CDC - _021D9CC8 - 2 ; case 1 - .short _021D9CE8 - _021D9CC8 - 2 ; case 2 - .short _021D9CF4 - _021D9CC8 - 2 ; case 3 -_021D9CD0: - ldr r1, [r0, #0x30] - cmp r1, #2 - beq _021D9CFE - mov r1, #1 - str r1, [r0, #0x30] - bx lr -_021D9CDC: - ldr r1, [r0, #0x34] - cmp r1, #2 - beq _021D9CFE - mov r1, #1 - str r1, [r0, #0x34] - bx lr -_021D9CE8: - ldr r1, [r0, #0x38] - cmp r1, #2 - beq _021D9CFE - mov r1, #1 - str r1, [r0, #0x38] - bx lr -_021D9CF4: - ldr r1, [r0, #0x3c] - cmp r1, #2 - beq _021D9CFE - mov r1, #1 - str r1, [r0, #0x3c] -_021D9CFE: - bx lr - thumb_func_end ov21_021D9CB8 - - thumb_func_start ov21_021D9D00 -ov21_021D9D00: ; 0x021D9D00 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9D00 - - thumb_func_start ov21_021D9D18 -ov21_021D9D18: ; 0x021D9D18 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #4] - lsl r0, r5, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] - cmp r1, #2 - bne _021D9D46 - ldr r0, [r4, #0x18] - mov r1, #4 - add r2, r5, #0 - bl ov21_021D4F20 - add r0, r4, #0 - add r0, #0x80 - str r5, [r0, #0] - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r4, #0x94 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021D9D46: - mov r0, #0 - add r4, #0x94 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9D18 - - thumb_func_start ov21_021D9D50 -ov21_021D9D50: ; 0x021D9D50 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_02024034 - ldr r0, [r4, #0xc] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0xc] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9D50 - - thumb_func_start ov21_021D9D68 -ov21_021D9D68: ; 0x021D9D68 - mov r2, #0 - mov r1, #3 -_021D9D6C: - add r2, r2, #1 - str r1, [r0, #0x44] - add r0, r0, #4 - cmp r2, #0xf - blt _021D9D6C - bx lr - thumb_func_end ov21_021D9D68 - - thumb_func_start ov21_021D9D78 -ov21_021D9D78: ; 0x021D9D78 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - mov r1, #0x18 - str r2, [sp, #0xc] - bl sub_02018144 - ldr r1, [sp, #4] - str r0, [r1, #0xc] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x30 - ldr r6, [sp, #0x14] - str r0, [sp, #0x10] -_021D9D98: - ldr r0, [sp, #0x10] - ldr r7, [sp, #0x10] - str r0, [sp, #0x18] - add r0, #0x10 - mov r4, #0 - mov r5, #0x30 - sub r7, #0x10 - str r0, [sp, #0x18] -_021D9DA8: - add r0, r5, #0 - add r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r5, #0 - ldr r1, [r0, #0xc] - add r0, r4, r6 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r2, [sp, #0x18] - add r1, r7, #0 - sub r3, #0x28 - bl ov21_021D154C - add r4, r4, #1 - add r5, #0x50 - cmp r4, #2 - blt _021D9DA8 - ldr r0, [sp, #0x10] - add r6, r6, #2 - add r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #3 - blt _021D9D98 - ldr r1, [sp, #8] - ldr r0, [sp, #4] - ldr r3, [sp, #4] - str r1, [r0, #0x10] - str r0, [r0, #0x14] - ldr r0, [sp, #0xc] - ldr r2, _021D9E04 ; =ov21_021D9E90 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #6 - ldr r0, [r0, #0xc] - add r3, #0x10 - bl sub_02023FCC - ldr r1, [sp, #4] - str r0, [r1, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D9E04: .word ov21_021D9E90 - thumb_func_end ov21_021D9D78 - - thumb_func_start ov21_021D9E08 -ov21_021D9E08: ; 0x021D9E08 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - mov r1, #0 - add r2, r4, #0 - mov r0, #3 -_021D9E14: - add r1, r1, #1 - str r0, [r2, #0x44] - add r2, r2, #4 - cmp r1, #6 - blt _021D9E14 - ldr r0, [r4, #8] - bl sub_0202404C - ldr r0, [r5, #8] - bl ov21_021D8658 - cmp r0, #5 - bhi _021D9E8C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9E3A: ; jump table - .short _021D9E46 - _021D9E3A - 2 ; case 0 - .short _021D9E52 - _021D9E3A - 2 ; case 1 - .short _021D9E5E - _021D9E3A - 2 ; case 2 - .short _021D9E6A - _021D9E3A - 2 ; case 3 - .short _021D9E76 - _021D9E3A - 2 ; case 4 - .short _021D9E82 - _021D9E3A - 2 ; case 5 -_021D9E46: - ldr r0, [r4, #0x44] - cmp r0, #2 - beq _021D9E8C - mov r0, #1 - str r0, [r4, #0x44] - pop {r3, r4, r5, pc} -_021D9E52: - ldr r0, [r4, #0x48] - cmp r0, #2 - beq _021D9E8C - mov r0, #1 - str r0, [r4, #0x48] - pop {r3, r4, r5, pc} -_021D9E5E: - ldr r0, [r4, #0x4c] - cmp r0, #2 - beq _021D9E8C - mov r0, #1 - str r0, [r4, #0x4c] - pop {r3, r4, r5, pc} -_021D9E6A: - ldr r0, [r4, #0x50] - cmp r0, #2 - beq _021D9E8C - mov r0, #1 - str r0, [r4, #0x50] - pop {r3, r4, r5, pc} -_021D9E76: - ldr r0, [r4, #0x54] - cmp r0, #2 - beq _021D9E8C - mov r0, #1 - str r0, [r4, #0x54] - pop {r3, r4, r5, pc} -_021D9E82: - ldr r0, [r4, #0x58] - cmp r0, #2 - beq _021D9E8C - mov r0, #1 - str r0, [r4, #0x58] -_021D9E8C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9E08 - - thumb_func_start ov21_021D9E90 -ov21_021D9E90: ; 0x021D9E90 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #4] - lsl r0, r5, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - cmp r1, #2 - bne _021D9EB0 - add r2, r5, #0 - ldr r0, [r4, #0x18] - mov r1, #4 - add r2, #8 - bl ov21_021D4F20 - add r4, #0x84 - str r5, [r4, #0] -_021D9EB0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9E90 - - thumb_func_start ov21_021D9EB4 -ov21_021D9EB4: ; 0x021D9EB4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - mov r1, #0x28 - str r2, [sp, #0xc] - bl sub_02018144 - ldr r1, [sp, #4] - str r0, [r1, #0xc] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x10 - ldr r6, [sp, #0x14] - str r0, [sp, #0x10] -_021D9ED4: - ldr r0, [sp, #0x10] - ldr r7, [sp, #0x10] - str r0, [sp, #0x18] - add r0, #0x10 - mov r4, #0 - mov r5, #0x30 - sub r7, #0x10 - str r0, [sp, #0x18] -_021D9EE4: - add r0, r5, #0 - add r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r5, #0 - ldr r1, [r0, #0xc] - add r0, r4, r6 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r2, [sp, #0x18] - add r1, r7, #0 - sub r3, #0x28 - bl ov21_021D154C - add r4, r4, #1 - add r5, #0x50 - cmp r4, #2 - blt _021D9EE4 - ldr r0, [sp, #0x10] - add r6, r6, #2 - add r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #5 - blt _021D9ED4 - ldr r1, [sp, #8] - ldr r0, [sp, #4] - ldr r3, [sp, #4] - str r1, [r0, #0x10] - str r0, [r0, #0x14] - ldr r0, [sp, #0xc] - ldr r2, _021D9F40 ; =ov21_021D9FF8 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #0xa - ldr r0, [r0, #0xc] - add r3, #0x10 - bl sub_02023FCC - ldr r1, [sp, #4] - str r0, [r1, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D9F40: .word ov21_021D9FF8 - thumb_func_end ov21_021D9EB4 - - thumb_func_start ov21_021D9F44 -ov21_021D9F44: ; 0x021D9F44 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - mov r1, #0 - add r2, r4, #0 - mov r0, #3 -_021D9F50: - add r1, r1, #1 - str r0, [r2, #0x44] - add r2, r2, #4 - cmp r1, #0xa - blt _021D9F50 - ldr r0, [r4, #8] - bl sub_0202404C - ldr r0, [r5, #8] - bl ov21_021D8674 - cmp r0, #9 - bhi _021D9FF4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9F76: ; jump table - .short _021D9FF4 - _021D9F76 - 2 ; case 0 - .short _021D9F8A - _021D9F76 - 2 ; case 1 - .short _021D9F96 - _021D9F76 - 2 ; case 2 - .short _021D9FA2 - _021D9F76 - 2 ; case 3 - .short _021D9FAE - _021D9F76 - 2 ; case 4 - .short _021D9FBA - _021D9F76 - 2 ; case 5 - .short _021D9FC6 - _021D9F76 - 2 ; case 6 - .short _021D9FD2 - _021D9F76 - 2 ; case 7 - .short _021D9FDE - _021D9F76 - 2 ; case 8 - .short _021D9FEA - _021D9F76 - 2 ; case 9 -_021D9F8A: - ldr r0, [r4, #0x44] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x44] - pop {r3, r4, r5, pc} -_021D9F96: - ldr r0, [r4, #0x48] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x48] - pop {r3, r4, r5, pc} -_021D9FA2: - ldr r0, [r4, #0x4c] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x4c] - pop {r3, r4, r5, pc} -_021D9FAE: - ldr r0, [r4, #0x50] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x50] - pop {r3, r4, r5, pc} -_021D9FBA: - ldr r0, [r4, #0x54] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x54] - pop {r3, r4, r5, pc} -_021D9FC6: - ldr r0, [r4, #0x58] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x58] - pop {r3, r4, r5, pc} -_021D9FD2: - ldr r0, [r4, #0x5c] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x5c] - pop {r3, r4, r5, pc} -_021D9FDE: - ldr r0, [r4, #0x60] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x60] - pop {r3, r4, r5, pc} -_021D9FEA: - ldr r0, [r4, #0x64] - cmp r0, #2 - beq _021D9FF4 - mov r0, #1 - str r0, [r4, #0x64] -_021D9FF4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021D9F44 - - thumb_func_start ov21_021D9FF8 -ov21_021D9FF8: ; 0x021D9FF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #4] - lsl r0, r5, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - cmp r1, #2 - bne _021DA016 - ldr r0, [r4, #0x18] - mov r1, #4 - add r2, r5, #6 - bl ov21_021D4F20 - add r4, #0x84 - str r5, [r4, #0] -_021DA016: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021D9FF8 - - thumb_func_start ov21_021DA018 -ov21_021DA018: ; 0x021DA018 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - mov r1, #0x2c - str r2, [sp, #0xc] - bl sub_02018144 - ldr r1, [sp, #4] - str r0, [r1, #0xc] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x10 - ldr r6, [sp, #0x14] - str r0, [sp, #0x10] -_021DA038: - ldr r0, [sp, #0x10] - ldr r7, [sp, #0x10] - str r0, [sp, #0x18] - add r0, #0x10 - mov r4, #0 - mov r5, #0x30 - sub r7, #0x10 - str r0, [sp, #0x18] -_021DA048: - add r0, r5, #0 - add r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r5, #0 - ldr r1, [r0, #0xc] - add r0, r4, r6 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r2, [sp, #0x18] - add r1, r7, #0 - sub r3, #0x28 - bl ov21_021D154C - add r4, r4, #1 - add r5, #0x50 - cmp r4, #2 - blt _021DA048 - ldr r0, [sp, #0x10] - add r6, r6, #2 - add r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #5 - blt _021DA038 - mov r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #0xa0 - ldr r0, [r0, #0xc] - mov r2, #0xc0 - add r0, #0x28 - mov r3, #8 - bl ov21_021D154C - ldr r3, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [sp, #4] - ldr r2, _021DA0B8 ; =ov21_021DA18C - str r1, [r0, #0x10] - str r0, [r0, #0x14] - ldr r0, [sp, #0xc] - mov r1, #0xb - str r0, [sp] - ldr r0, [sp, #4] - add r3, #0x10 - ldr r0, [r0, #0xc] - bl sub_02023FCC - ldr r1, [sp, #4] - str r0, [r1, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021DA0B8: .word ov21_021DA18C - thumb_func_end ov21_021DA018 - - thumb_func_start ov21_021DA0BC -ov21_021DA0BC: ; 0x021DA0BC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - add r2, r5, #0 - mov r0, #3 -_021DA0C8: - add r1, r1, #1 - str r0, [r2, #0x44] - add r2, r2, #4 - cmp r1, #0xb - blt _021DA0C8 - ldr r0, [r5, #8] - bl sub_0202404C - ldr r0, [r4, #8] - mov r1, #0 - bl ov21_021D8698 - add r1, r0, #0 - add r0, r5, #0 - bl ov21_021DA0FC - ldr r0, [r4, #8] - mov r1, #1 - bl ov21_021D8698 - add r1, r0, #0 - add r0, r5, #0 - bl ov21_021DA0FC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DA0BC - - thumb_func_start ov21_021DA0FC -ov21_021DA0FC: ; 0x021DA0FC - cmp r1, #9 - bhi _021DA18A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DA10C: ; jump table - .short _021DA18A - _021DA10C - 2 ; case 0 - .short _021DA120 - _021DA10C - 2 ; case 1 - .short _021DA12C - _021DA10C - 2 ; case 2 - .short _021DA138 - _021DA10C - 2 ; case 3 - .short _021DA144 - _021DA10C - 2 ; case 4 - .short _021DA150 - _021DA10C - 2 ; case 5 - .short _021DA15C - _021DA10C - 2 ; case 6 - .short _021DA168 - _021DA10C - 2 ; case 7 - .short _021DA174 - _021DA10C - 2 ; case 8 - .short _021DA180 - _021DA10C - 2 ; case 9 -_021DA120: - ldr r1, [r0, #0x44] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x44] - bx lr -_021DA12C: - ldr r1, [r0, #0x48] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x48] - bx lr -_021DA138: - ldr r1, [r0, #0x4c] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x4c] - bx lr -_021DA144: - ldr r1, [r0, #0x50] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x50] - bx lr -_021DA150: - ldr r1, [r0, #0x54] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x54] - bx lr -_021DA15C: - ldr r1, [r0, #0x58] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x58] - bx lr -_021DA168: - ldr r1, [r0, #0x5c] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x5c] - bx lr -_021DA174: - ldr r1, [r0, #0x60] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x60] - bx lr -_021DA180: - ldr r1, [r0, #0x64] - cmp r1, #2 - beq _021DA18A - mov r1, #1 - str r1, [r0, #0x64] -_021DA18A: - bx lr - thumb_func_end ov21_021DA0FC - - thumb_func_start ov21_021DA18C -ov21_021DA18C: ; 0x021DA18C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #4] - lsl r0, r5, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - cmp r1, #2 - bne _021DA1BE - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DA1C4 - ldr r0, [r4, #0x18] - mov r1, #4 - add r2, r5, #6 - bl ov21_021D4F20 - add r0, r4, #0 - add r0, #0x84 - str r5, [r0, #0] - mov r0, #1 - add r4, #0x90 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021DA1BE: - mov r0, #0 - add r4, #0x90 - str r0, [r4, #0] -_021DA1C4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DA18C - - thumb_func_start ov21_021DA1C8 -ov21_021DA1C8: ; 0x021DA1C8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - mov r1, #0x28 - str r2, [sp, #0xc] - bl sub_02018144 - ldr r1, [sp, #4] - str r0, [r1, #0xc] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x10 - ldr r6, [sp, #0x14] - str r0, [sp, #0x10] -_021DA1E8: - ldr r0, [sp, #0x10] - ldr r7, [sp, #0x10] - str r0, [sp, #0x18] - add r0, #0x10 - mov r4, #0 - mov r5, #0x30 - sub r7, #0x10 - str r0, [sp, #0x18] -_021DA1F8: - add r0, r5, #0 - add r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r5, #0 - ldr r1, [r0, #0xc] - add r0, r4, r6 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r2, [sp, #0x18] - add r1, r7, #0 - sub r3, #0x28 - bl ov21_021D154C - add r4, r4, #1 - add r5, #0x50 - cmp r4, #2 - blt _021DA1F8 - ldr r0, [sp, #0x10] - add r6, r6, #2 - add r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #4 - blt _021DA1E8 - mov r0, #0xa8 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #0x80 - ldr r0, [r0, #0xc] - mov r2, #0xa0 - add r0, #0x20 - mov r3, #0x58 - bl ov21_021D154C - mov r0, #0x28 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #0xa0 - ldr r0, [r0, #0xc] - mov r2, #0xc0 - add r0, #0x24 - mov r3, #8 - bl ov21_021D154C - ldr r3, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [sp, #4] - ldr r2, _021DA27C ; =ov21_021DA2C0 - str r1, [r0, #0x10] - str r0, [r0, #0x14] - ldr r0, [sp, #0xc] - mov r1, #0xa - str r0, [sp] - ldr r0, [sp, #4] - add r3, #0x10 - ldr r0, [r0, #0xc] - bl sub_02023FCC - ldr r1, [sp, #4] - str r0, [r1, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021DA27C: .word ov21_021DA2C0 - thumb_func_end ov21_021DA1C8 - - thumb_func_start ov21_021DA280 -ov21_021DA280: ; 0x021DA280 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r1, #0 - add r2, r5, #0 - mov r0, #3 -_021DA28C: - add r1, r1, #1 - str r0, [r2, #0x44] - add r2, r2, #4 - cmp r1, #0xa - blt _021DA28C - ldr r0, [r5, #8] - bl sub_0202404C - ldr r0, [r4, #8] - mov r1, #0 - bl ov21_021D8698 - add r1, r0, #0 - add r0, r5, #0 - bl ov21_021DA308 - ldr r0, [r4, #8] - mov r1, #1 - bl ov21_021D8698 - add r1, r0, #0 - add r0, r5, #0 - bl ov21_021DA308 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DA280 - - thumb_func_start ov21_021DA2C0 -ov21_021DA2C0: ; 0x021DA2C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #4] - lsl r0, r5, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - cmp r1, #2 - bne _021DA300 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DA306 - cmp r5, #8 - ldr r0, [r4, #0x18] - bne _021DA2EA - mov r1, #4 - add r2, r5, #7 - bl ov21_021D4F20 - b _021DA2F2 -_021DA2EA: - mov r1, #4 - add r2, r5, #6 - bl ov21_021D4F20 -_021DA2F2: - add r0, r4, #0 - add r0, #0x84 - str r5, [r0, #0] - mov r0, #1 - add r4, #0x90 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_021DA300: - mov r0, #0 - add r4, #0x90 - str r0, [r4, #0] -_021DA306: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DA2C0 - - thumb_func_start ov21_021DA308 -ov21_021DA308: ; 0x021DA308 - sub r1, #0xa - cmp r1, #7 - bhi _021DA388 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DA31A: ; jump table - .short _021DA32A - _021DA31A - 2 ; case 0 - .short _021DA336 - _021DA31A - 2 ; case 1 - .short _021DA342 - _021DA31A - 2 ; case 2 - .short _021DA34E - _021DA31A - 2 ; case 3 - .short _021DA35A - _021DA31A - 2 ; case 4 - .short _021DA366 - _021DA31A - 2 ; case 5 - .short _021DA372 - _021DA31A - 2 ; case 6 - .short _021DA37E - _021DA31A - 2 ; case 7 -_021DA32A: - ldr r1, [r0, #0x44] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x44] - bx lr -_021DA336: - ldr r1, [r0, #0x48] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x48] - bx lr -_021DA342: - ldr r1, [r0, #0x4c] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x4c] - bx lr -_021DA34E: - ldr r1, [r0, #0x50] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x50] - bx lr -_021DA35A: - ldr r1, [r0, #0x54] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x54] - bx lr -_021DA366: - ldr r1, [r0, #0x58] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x58] - bx lr -_021DA372: - ldr r1, [r0, #0x5c] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x5c] - bx lr -_021DA37E: - ldr r1, [r0, #0x60] - cmp r1, #2 - beq _021DA388 - mov r1, #1 - str r1, [r0, #0x60] -_021DA388: - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DA308 - - thumb_func_start ov21_021DA38C -ov21_021DA38C: ; 0x021DA38C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - mov r1, #0x3c - str r2, [sp, #0xc] - bl sub_02018144 - ldr r1, [sp, #4] - str r0, [r1, #0xc] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x10 - ldr r6, [sp, #0x14] - str r0, [sp, #0x10] -_021DA3AC: - ldr r0, [sp, #0x10] - ldr r7, [sp, #0x10] - str r0, [sp, #0x18] - add r0, #0x10 - mov r4, #0 - mov r5, #0x1c - sub r7, #0x10 - str r0, [sp, #0x18] -_021DA3BC: - add r0, r5, #0 - add r0, #0x18 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r5, #0 - ldr r1, [r0, #0xc] - add r0, r4, r6 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r2, [sp, #0x18] - add r1, r7, #0 - sub r3, #0x18 - bl ov21_021D154C - add r4, r4, #1 - add r5, #0x38 - cmp r4, #3 - blt _021DA3BC - ldr r0, [sp, #0x10] - add r6, r6, #3 - add r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #5 - blt _021DA3AC - ldr r1, [sp, #8] - ldr r0, [sp, #4] - ldr r3, [sp, #4] - str r1, [r0, #0x10] - str r0, [r0, #0x14] - ldr r0, [sp, #0xc] - ldr r2, _021DA418 ; =ov21_021DA514 - str r0, [sp] - ldr r0, [sp, #4] - mov r1, #0xf - ldr r0, [r0, #0xc] - add r3, #0x10 - bl sub_02023FCC - ldr r1, [sp, #4] - str r0, [r1, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021DA418: .word ov21_021DA514 - thumb_func_end ov21_021DA38C - - thumb_func_start ov21_021DA41C -ov21_021DA41C: ; 0x021DA41C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - mov r1, #0 - add r2, r4, #0 - mov r0, #3 -_021DA428: - add r1, r1, #1 - str r0, [r2, #0x44] - add r2, r2, #4 - cmp r1, #0xf - blt _021DA428 - ldr r0, [r4, #8] - bl sub_0202404C - ldr r0, [r5, #8] - bl ov21_021D86BC - cmp r0, #0xe - bhi _021DA512 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA44E: ; jump table - .short _021DA512 - _021DA44E - 2 ; case 0 - .short _021DA46C - _021DA44E - 2 ; case 1 - .short _021DA478 - _021DA44E - 2 ; case 2 - .short _021DA484 - _021DA44E - 2 ; case 3 - .short _021DA490 - _021DA44E - 2 ; case 4 - .short _021DA49C - _021DA44E - 2 ; case 5 - .short _021DA4A8 - _021DA44E - 2 ; case 6 - .short _021DA4B4 - _021DA44E - 2 ; case 7 - .short _021DA4C0 - _021DA44E - 2 ; case 8 - .short _021DA4CC - _021DA44E - 2 ; case 9 - .short _021DA4D8 - _021DA44E - 2 ; case 10 - .short _021DA4E4 - _021DA44E - 2 ; case 11 - .short _021DA4F0 - _021DA44E - 2 ; case 12 - .short _021DA4FC - _021DA44E - 2 ; case 13 - .short _021DA508 - _021DA44E - 2 ; case 14 -_021DA46C: - ldr r0, [r4, #0x60] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x60] - pop {r3, r4, r5, pc} -_021DA478: - ldr r0, [r4, #0x70] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x70] - pop {r3, r4, r5, pc} -_021DA484: - ldr r0, [r4, #0x58] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x58] - pop {r3, r4, r5, pc} -_021DA490: - ldr r0, [r4, #0x48] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x48] - pop {r3, r4, r5, pc} -_021DA49C: - ldr r0, [r4, #0x74] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x74] - pop {r3, r4, r5, pc} -_021DA4A8: - ldr r0, [r4, #0x64] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x64] - pop {r3, r4, r5, pc} -_021DA4B4: - ldr r0, [r4, #0x78] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x78] - pop {r3, r4, r5, pc} -_021DA4C0: - ldr r0, [r4, #0x54] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x54] - pop {r3, r4, r5, pc} -_021DA4CC: - ldr r0, [r4, #0x50] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x50] - pop {r3, r4, r5, pc} -_021DA4D8: - ldr r0, [r4, #0x5c] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x5c] - pop {r3, r4, r5, pc} -_021DA4E4: - ldr r0, [r4, #0x68] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x68] - pop {r3, r4, r5, pc} -_021DA4F0: - ldr r0, [r4, #0x4c] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x4c] - pop {r3, r4, r5, pc} -_021DA4FC: - ldr r0, [r4, #0x44] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x44] - pop {r3, r4, r5, pc} -_021DA508: - ldr r0, [r4, #0x6c] - cmp r0, #2 - beq _021DA512 - mov r0, #1 - str r0, [r4, #0x6c] -_021DA512: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DA41C - - thumb_func_start ov21_021DA514 -ov21_021DA514: ; 0x021DA514 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #4] - lsl r0, r5, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - cmp r1, #2 - bne _021DA532 - ldr r0, [r4, #0x18] - mov r1, #4 - add r2, r5, #6 - bl ov21_021D4F20 - add r4, #0x84 - str r5, [r4, #0] -_021DA532: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DA514 - - thumb_func_start ov21_021DA534 -ov21_021DA534: ; 0x021DA534 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r1, #0 - add r6, r0, #0 - cmp r4, #5 - bhi _021DA592 - add r5, r4, r4 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_021DA54C: ; jump table - .short _021DA558 - _021DA54C - 2 ; case 0 - .short _021DA562 - _021DA54C - 2 ; case 1 - .short _021DA56C - _021DA54C - 2 ; case 2 - .short _021DA576 - _021DA54C - 2 ; case 3 - .short _021DA580 - _021DA54C - 2 ; case 4 - .short _021DA58A - _021DA54C - 2 ; case 5 -_021DA558: - mov r2, #0x10 - mov r1, #0xd4 - mov r3, #0x1c - add r0, r2, #0 - b _021DA592 -_021DA562: - mov r1, #0xe0 - mov r2, #0x30 - mov r3, #0x2c - mov r0, #0x10 - b _021DA592 -_021DA56C: - mov r1, #0xe0 - mov r2, #0x50 - mov r3, #0x2c - mov r0, #0x10 - b _021DA592 -_021DA576: - mov r1, #0xe0 - mov r2, #0x70 - mov r3, #0x2c - mov r0, #0x10 - b _021DA592 -_021DA580: - mov r1, #0xe0 - mov r2, #0x90 - mov r3, #0x2c - mov r0, #0x10 - b _021DA592 -_021DA58A: - mov r1, #0xd4 - mov r2, #0xb0 - mov r3, #0x3c - mov r0, #0x10 -_021DA592: - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - str r4, [sp, #0xc] - bl ov21_021D4FE4 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DA534 - - thumb_func_start ov21_021DA5A8 -ov21_021DA5A8: ; 0x021DA5A8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DA6AC ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #1 - tst r0, r1 - beq _021DA67E - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DA68C - ldr r0, [r4, #0x18] - bl ov21_021D4F7C - cmp r0, #5 - bhi _021DA66E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA5D6: ; jump table - .short _021DA658 - _021DA5D6 - 2 ; case 0 - .short _021DA5E2 - _021DA5D6 - 2 ; case 1 - .short _021DA5FA - _021DA5D6 - 2 ; case 2 - .short _021DA610 - _021DA5D6 - 2 ; case 3 - .short _021DA628 - _021DA5D6 - 2 ; case 4 - .short _021DA640 - _021DA5D6 - 2 ; case 5 -_021DA5E2: - add r0, r4, #0 - mov r1, #1 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] - b _021DA66E -_021DA5FA: - add r0, r4, #0 - mov r1, #2 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] - b _021DA66E -_021DA610: - add r0, r4, #0 - mov r1, #3 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] - b _021DA66E -_021DA628: - add r0, r4, #0 - mov r1, #4 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] - b _021DA66E -_021DA640: - add r0, r4, #0 - mov r1, #5 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] - b _021DA66E -_021DA658: - add r0, r4, #0 - mov r1, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] -_021DA66E: - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x94 - str r1, [r0, #0] - b _021DA68C -_021DA67E: - add r0, r4, #0 - mov r1, #0 - add r0, #0x94 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x8c - str r1, [r0, #0] -_021DA68C: - ldr r0, _021DA6AC ; =0x021BF67C - mov r1, #2 - ldr r0, [r0, #0x48] - tst r0, r1 - beq _021DA6AA - add r0, r4, #0 - mov r2, #0 - add r0, #0x80 - str r2, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x2c] -_021DA6AA: - pop {r4, pc} - ; .align 2, 0 -_021DA6AC: .word 0x021BF67C - thumb_func_end ov21_021DA5A8 - - thumb_func_start ov21_021DA6B0 -ov21_021DA6B0: ; 0x021DA6B0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r1, #0 - mov r1, #0x7e - lsl r1, r1, #2 - bl sub_02018144 - ldr r1, [sp, #0x10] - str r0, [r1, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - mov r0, #0x10 - str r0, [sp, #0x1c] - mov r0, #6 - ldr r7, [sp, #0x20] - str r0, [sp, #0x18] -_021DA6D4: - mov r4, #0 - mov r6, #0x30 -_021DA6D8: - ldr r0, [sp, #0x18] - add r1, r4, r0 - ldr r0, [sp, #0x20] - cmp r0, #5 - bhi _021DA740 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA6EE: ; jump table - .short _021DA6FA - _021DA6EE - 2 ; case 0 - .short _021DA706 - _021DA6EE - 2 ; case 1 - .short _021DA712 - _021DA6EE - 2 ; case 2 - .short _021DA71E - _021DA6EE - 2 ; case 3 - .short _021DA72A - _021DA6EE - 2 ; case 4 - .short _021DA736 - _021DA6EE - 2 ; case 5 -_021DA6FA: - cmp r4, #2 - bne _021DA702 - mov r1, #0 - b _021DA740 -_021DA702: - mov r5, #1 - b _021DA740 -_021DA706: - cmp r4, #2 - bne _021DA70E - mov r1, #1 - b _021DA740 -_021DA70E: - mov r5, #0 - b _021DA740 -_021DA712: - cmp r4, #2 - bne _021DA71A - mov r1, #2 - b _021DA740 -_021DA71A: - mov r5, #0 - b _021DA740 -_021DA71E: - cmp r4, #2 - bne _021DA726 - mov r1, #3 - b _021DA740 -_021DA726: - mov r5, #0 - b _021DA740 -_021DA72A: - cmp r4, #2 - bne _021DA732 - mov r1, #4 - b _021DA740 -_021DA732: - mov r5, #1 - b _021DA740 -_021DA736: - cmp r4, #2 - bne _021DA73E - mov r1, #5 - b _021DA740 -_021DA73E: - mov r5, #1 -_021DA740: - cmp r4, #2 - bge _021DA766 - mov r0, #0x10 - str r0, [sp] - str r5, [sp, #4] - str r5, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [sp, #0x10] - add r2, r4, r7 - mov r1, #0x1c - mul r1, r2 - ldr r0, [r0, #0x1c] - ldr r2, [sp, #0x1c] - add r0, r0, r1 - add r1, r6, #0 - mov r3, #0x3c - bl ov21_021D4FE4 - b _021DA776 -_021DA766: - ldr r0, [sp, #0x10] - add r2, r4, r7 - ldr r3, [r0, #0x1c] - mov r0, #0x1c - mul r0, r2 - add r0, r3, r0 - bl ov21_021DA534 -_021DA776: - add r4, r4, #1 - add r6, #0x50 - cmp r4, #3 - blt _021DA6D8 - ldr r0, [sp, #0x1c] - add r7, r7, #3 - add r0, #0x20 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, r0, #2 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #6 - blt _021DA6D4 - ldr r0, [sp, #0x14] - bl ov21_021D4EE4 - ldr r1, [sp, #0x10] - mov r2, #3 - str r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - mov r3, #6 - bl ov21_021D4F04 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DA6B0 - - thumb_func_start ov21_021DA7B0 -ov21_021DA7B0: ; 0x021DA7B0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DA884 ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #1 - tst r0, r1 - beq _021DA87A - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DA880 - ldr r0, [r4, #0x18] - bl ov21_021D4F7C - sub r0, #8 - cmp r0, #5 - bhi _021DA880 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA7E0: ; jump table - .short _021DA7EC - _021DA7E0 - 2 ; case 0 - .short _021DA804 - _021DA7E0 - 2 ; case 1 - .short _021DA81C - _021DA7E0 - 2 ; case 2 - .short _021DA832 - _021DA7E0 - 2 ; case 3 - .short _021DA84A - _021DA7E0 - 2 ; case 4 - .short _021DA862 - _021DA7E0 - 2 ; case 5 -_021DA7EC: - add r0, r4, #0 - mov r1, #0 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA804: - add r0, r4, #0 - mov r1, #1 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA81C: - add r0, r4, #0 - mov r1, #2 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA832: - add r0, r4, #0 - mov r1, #3 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA84A: - add r0, r4, #0 - mov r1, #4 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA862: - add r0, r4, #0 - mov r1, #5 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA87A: - mov r0, #0 - add r4, #0x8c - str r0, [r4, #0] -_021DA880: - pop {r4, pc} - nop -_021DA884: .word 0x021BF67C - thumb_func_end ov21_021DA7B0 - - thumb_func_start ov21_021DA888 -ov21_021DA888: ; 0x021DA888 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r1, #0 - mov r1, #0x7e - lsl r1, r1, #2 - bl sub_02018144 - ldr r1, [sp, #0x10] - str r0, [r1, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - mov r0, #0x10 - str r0, [sp, #0x1c] - mov r0, #6 - ldr r7, [sp, #0x20] - str r0, [sp, #0x18] -_021DA8AC: - mov r4, #0 - mov r6, #0x30 -_021DA8B0: - ldr r0, [sp, #0x18] - add r1, r4, r0 - ldr r0, [sp, #0x20] - cmp r0, #5 - bhi _021DA918 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA8C6: ; jump table - .short _021DA8D2 - _021DA8C6 - 2 ; case 0 - .short _021DA8DE - _021DA8C6 - 2 ; case 1 - .short _021DA8EA - _021DA8C6 - 2 ; case 2 - .short _021DA8F6 - _021DA8C6 - 2 ; case 3 - .short _021DA902 - _021DA8C6 - 2 ; case 4 - .short _021DA90E - _021DA8C6 - 2 ; case 5 -_021DA8D2: - cmp r4, #2 - bne _021DA8DA - mov r1, #0 - b _021DA918 -_021DA8DA: - mov r5, #0 - b _021DA918 -_021DA8DE: - cmp r4, #2 - bne _021DA8E6 - mov r1, #1 - b _021DA918 -_021DA8E6: - mov r5, #0 - b _021DA918 -_021DA8EA: - cmp r4, #2 - bne _021DA8F2 - mov r1, #2 - b _021DA918 -_021DA8F2: - mov r5, #0 - b _021DA918 -_021DA8F6: - cmp r4, #2 - bne _021DA8FE - mov r1, #3 - b _021DA918 -_021DA8FE: - mov r5, #0 - b _021DA918 -_021DA902: - cmp r4, #2 - bne _021DA90A - mov r1, #4 - b _021DA918 -_021DA90A: - mov r5, #0 - b _021DA918 -_021DA90E: - cmp r4, #2 - bne _021DA916 - mov r1, #5 - b _021DA918 -_021DA916: - mov r5, #1 -_021DA918: - cmp r4, #2 - bge _021DA93E - mov r0, #0x10 - str r0, [sp] - str r5, [sp, #4] - str r5, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [sp, #0x10] - add r2, r4, r7 - mov r1, #0x1c - mul r1, r2 - ldr r0, [r0, #0x1c] - ldr r2, [sp, #0x1c] - add r0, r0, r1 - add r1, r6, #0 - mov r3, #0x3c - bl ov21_021D4FE4 - b _021DA94E -_021DA93E: - ldr r0, [sp, #0x10] - add r2, r4, r7 - ldr r3, [r0, #0x1c] - mov r0, #0x1c - mul r0, r2 - add r0, r3, r0 - bl ov21_021DA534 -_021DA94E: - add r4, r4, #1 - add r6, #0x50 - cmp r4, #3 - blt _021DA8B0 - ldr r0, [sp, #0x1c] - add r7, r7, #3 - add r0, #0x20 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, r0, #2 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #6 - blt _021DA8AC - ldr r0, [sp, #0x14] - bl ov21_021D4EE4 - ldr r1, [sp, #0x10] - mov r2, #3 - str r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - mov r3, #6 - bl ov21_021D4F04 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DA888 - - thumb_func_start ov21_021DA988 -ov21_021DA988: ; 0x021DA988 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DAAD0 ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #1 - tst r0, r1 - bne _021DA998 - b _021DAAC8 -_021DA998: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DA9AC - ldr r0, [r4, #0x18] - bl ov21_021D4F7C - cmp r0, #0xf - bls _021DA9AE -_021DA9AC: - b _021DAACE -_021DA9AE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA9BA: ; jump table - .short _021DAACE - _021DA9BA - 2 ; case 0 - .short _021DAACE - _021DA9BA - 2 ; case 1 - .short _021DAACE - _021DA9BA - 2 ; case 2 - .short _021DAACE - _021DA9BA - 2 ; case 3 - .short _021DAACE - _021DA9BA - 2 ; case 4 - .short _021DAACE - _021DA9BA - 2 ; case 5 - .short _021DA9DA - _021DA9BA - 2 ; case 6 - .short _021DA9F2 - _021DA9BA - 2 ; case 7 - .short _021DAA0A - _021DA9BA - 2 ; case 8 - .short _021DAA20 - _021DA9BA - 2 ; case 9 - .short _021DAA38 - _021DA9BA - 2 ; case 10 - .short _021DAA50 - _021DA9BA - 2 ; case 11 - .short _021DAA68 - _021DA9BA - 2 ; case 12 - .short _021DAA80 - _021DA9BA - 2 ; case 13 - .short _021DAA98 - _021DA9BA - 2 ; case 14 - .short _021DAAB0 - _021DA9BA - 2 ; case 15 -_021DA9DA: - add r0, r4, #0 - mov r1, #0 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DA9F2: - add r0, r4, #0 - mov r1, #1 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA0A: - add r0, r4, #0 - mov r1, #2 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA20: - add r0, r4, #0 - mov r1, #3 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA38: - add r0, r4, #0 - mov r1, #4 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA50: - add r0, r4, #0 - mov r1, #5 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA68: - add r0, r4, #0 - mov r1, #6 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA80: - add r0, r4, #0 - mov r1, #7 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAA98: - add r0, r4, #0 - mov r1, #8 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAAB0: - add r0, r4, #0 - mov r1, #9 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAAC8: - mov r0, #0 - add r4, #0x8c - str r0, [r4, #0] -_021DAACE: - pop {r4, pc} - ; .align 2, 0 -_021DAAD0: .word 0x021BF67C - thumb_func_end ov21_021DA988 - - thumb_func_start ov21_021DAAD4 -ov21_021DAAD4: ; 0x021DAAD4 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r1, #0 - mov r1, #0x7e - lsl r1, r1, #2 - bl sub_02018144 - ldr r1, [sp, #0x10] - str r0, [r1, #0x1c] - mov r0, #0 - str r0, [sp, #0x28] - mov r0, #0x10 - str r0, [sp, #0x24] - mov r0, #6 - str r0, [sp, #0x20] - ldr r0, [sp, #0x28] - str r0, [sp, #0x1c] -_021DAAFA: - mov r0, #0x30 - mov r4, #0 - str r0, [sp, #0x18] -_021DAB00: - ldr r0, [sp, #0x20] - ldr r3, [sp, #0x18] - add r1, r4, r0 - ldr r0, [sp, #0x28] - cmp r0, #5 - bhi _021DAB90 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DAB18: ; jump table - .short _021DAB24 - _021DAB18 - 2 ; case 0 - .short _021DAB34 - _021DAB18 - 2 ; case 1 - .short _021DAB44 - _021DAB18 - 2 ; case 2 - .short _021DAB54 - _021DAB18 - 2 ; case 3 - .short _021DAB64 - _021DAB18 - 2 ; case 4 - .short _021DAB74 - _021DAB18 - 2 ; case 5 -_021DAB24: - cmp r4, #2 - bne _021DAB2C - mov r1, #0 - b _021DAB90 -_021DAB2C: - mov r5, #0 - mov r7, #0x3c - mov r6, #0x10 - b _021DAB90 -_021DAB34: - cmp r4, #2 - bne _021DAB3C - mov r1, #1 - b _021DAB90 -_021DAB3C: - mov r5, #0 - mov r7, #0x3c - mov r6, #0x10 - b _021DAB90 -_021DAB44: - cmp r4, #2 - bne _021DAB4C - mov r1, #2 - b _021DAB90 -_021DAB4C: - mov r5, #0 - mov r7, #0x3c - mov r6, #0x10 - b _021DAB90 -_021DAB54: - cmp r4, #2 - bne _021DAB5C - mov r1, #3 - b _021DAB90 -_021DAB5C: - mov r5, #0 - mov r7, #0x3c - mov r6, #0x10 - b _021DAB90 -_021DAB64: - cmp r4, #2 - bne _021DAB6C - mov r1, #4 - b _021DAB90 -_021DAB6C: - mov r5, #0 - mov r7, #0x3c - mov r6, #0x10 - b _021DAB90 -_021DAB74: - cmp r4, #2 - bne _021DAB7C - mov r1, #5 - b _021DAB90 -_021DAB7C: - cmp r4, #0 - bne _021DAB8A - mov r7, #0x10 - mov r5, #0 - add r6, r7, #0 - mov r3, #0x18 - b _021DAB90 -_021DAB8A: - mov r5, #1 - mov r7, #0x3c - mov r6, #0x10 -_021DAB90: - cmp r4, #2 - bge _021DABB6 - str r6, [sp] - str r5, [sp, #4] - str r5, [sp, #8] - ldr r0, [sp, #0x10] - str r1, [sp, #0xc] - ldr r2, [r0, #0x1c] - ldr r0, [sp, #0x1c] - add r1, r4, r0 - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - add r1, r3, #0 - ldr r2, [sp, #0x24] - add r3, r7, #0 - bl ov21_021D4FE4 - b _021DABC8 -_021DABB6: - ldr r0, [sp, #0x10] - ldr r3, [r0, #0x1c] - ldr r0, [sp, #0x1c] - add r2, r4, r0 - mov r0, #0x1c - mul r0, r2 - add r0, r3, r0 - bl ov21_021DA534 -_021DABC8: - ldr r0, [sp, #0x18] - add r4, r4, #1 - add r0, #0x50 - str r0, [sp, #0x18] - cmp r4, #3 - blt _021DAB00 - ldr r0, [sp, #0x24] - add r0, #0x20 - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - add r0, r0, #2 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r0, r0, #3 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x28] - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, #6 - blt _021DAAFA - ldr r0, [sp, #0x14] - bl ov21_021D4EE4 - ldr r1, [sp, #0x10] - mov r2, #3 - str r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - mov r3, #6 - bl ov21_021D4F04 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DAAD4 - - thumb_func_start ov21_021DAC08 -ov21_021DAC08: ; 0x021DAC08 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DAD70 ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #1 - tst r0, r1 - bne _021DAC18 - b _021DAD68 -_021DAC18: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DAC2C - ldr r0, [r4, #0x18] - bl ov21_021D4F7C - cmp r0, #0x10 - bls _021DAC2E -_021DAC2C: - b _021DAD6E -_021DAC2E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DAC3A: ; jump table - .short _021DAD6E - _021DAC3A - 2 ; case 0 - .short _021DAD6E - _021DAC3A - 2 ; case 1 - .short _021DAD6E - _021DAC3A - 2 ; case 2 - .short _021DAD6E - _021DAC3A - 2 ; case 3 - .short _021DAD6E - _021DAC3A - 2 ; case 4 - .short _021DAD6E - _021DAC3A - 2 ; case 5 - .short _021DAC5C - _021DAC3A - 2 ; case 6 - .short _021DAC74 - _021DAC3A - 2 ; case 7 - .short _021DAC8C - _021DAC3A - 2 ; case 8 - .short _021DACA2 - _021DAC3A - 2 ; case 9 - .short _021DACBA - _021DAC3A - 2 ; case 10 - .short _021DACD2 - _021DAC3A - 2 ; case 11 - .short _021DACEA - _021DAC3A - 2 ; case 12 - .short _021DAD02 - _021DAC3A - 2 ; case 13 - .short _021DAD1A - _021DAC3A - 2 ; case 14 - .short _021DAD32 - _021DAC3A - 2 ; case 15 - .short _021DAD50 - _021DAC3A - 2 ; case 16 -_021DAC5C: - add r0, r4, #0 - mov r1, #0 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAC74: - add r0, r4, #0 - mov r1, #1 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAC8C: - add r0, r4, #0 - mov r1, #2 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DACA2: - add r0, r4, #0 - mov r1, #3 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DACBA: - add r0, r4, #0 - mov r1, #4 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DACD2: - add r0, r4, #0 - mov r1, #5 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DACEA: - add r0, r4, #0 - mov r1, #6 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAD02: - add r0, r4, #0 - mov r1, #7 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAD1A: - add r0, r4, #0 - mov r1, #8 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAD32: - add r0, r4, #0 - mov r1, #9 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - mov r0, #1 - add r4, #0x8c - str r0, [r4, #0] - pop {r4, pc} -_021DAD50: - add r0, r4, #0 - mov r1, #0xa - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAD68: - mov r0, #0 - add r4, #0x8c - str r0, [r4, #0] -_021DAD6E: - pop {r4, pc} - ; .align 2, 0 -_021DAD70: .word 0x021BF67C - thumb_func_end ov21_021DAC08 - - thumb_func_start ov21_021DAD74 -ov21_021DAD74: ; 0x021DAD74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r1, #0 - mov r1, #0x7e - lsl r1, r1, #2 - bl sub_02018144 - ldr r1, [sp, #0x10] - str r0, [r1, #0x1c] - mov r0, #0 - str r0, [sp, #0x2c] - mov r0, #0x10 - str r0, [sp, #0x24] - mov r0, #6 - str r0, [sp, #0x20] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x1c] -_021DAD9A: - mov r0, #0x30 - mov r4, #0 - str r0, [sp, #0x18] -_021DADA0: - ldr r0, [sp, #0x20] - ldr r3, [sp, #0x18] - add r1, r4, r0 - ldr r0, [sp, #0x2c] - cmp r0, #5 - bhi _021DAE5C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DADB8: ; jump table - .short _021DADC4 - _021DADB8 - 2 ; case 0 - .short _021DADD8 - _021DADB8 - 2 ; case 1 - .short _021DADEC - _021DADB8 - 2 ; case 2 - .short _021DAE00 - _021DADB8 - 2 ; case 3 - .short _021DAE14 - _021DADB8 - 2 ; case 4 - .short _021DAE38 - _021DADB8 - 2 ; case 5 -_021DADC4: - cmp r4, #2 - bne _021DADCC - mov r1, #0 - b _021DAE5C -_021DADCC: - mov r6, #0 - mov r0, #0x3c - add r5, r6, #0 - str r0, [sp, #0x28] - mov r7, #0x10 - b _021DAE5C -_021DADD8: - cmp r4, #2 - bne _021DADE0 - mov r1, #1 - b _021DAE5C -_021DADE0: - mov r6, #0 - mov r0, #0x3c - add r5, r6, #0 - str r0, [sp, #0x28] - mov r7, #0x10 - b _021DAE5C -_021DADEC: - cmp r4, #2 - bne _021DADF4 - mov r1, #2 - b _021DAE5C -_021DADF4: - mov r6, #0 - mov r0, #0x3c - add r5, r6, #0 - str r0, [sp, #0x28] - mov r7, #0x10 - b _021DAE5C -_021DAE00: - cmp r4, #2 - bne _021DAE08 - mov r1, #3 - b _021DAE5C -_021DAE08: - mov r6, #0 - mov r0, #0x3c - add r5, r6, #0 - str r0, [sp, #0x28] - mov r7, #0x10 - b _021DAE5C -_021DAE14: - cmp r4, #2 - bne _021DAE1C - mov r1, #4 - b _021DAE5C -_021DAE1C: - cmp r4, #0 - bne _021DAE2C - mov r0, #0x3c - mov r6, #1 - mov r5, #2 - str r0, [sp, #0x28] - mov r7, #0x10 - b _021DAE5C -_021DAE2C: - mov r6, #0 - mov r0, #0x3c - add r5, r6, #0 - str r0, [sp, #0x28] - mov r7, #0x10 - b _021DAE5C -_021DAE38: - cmp r4, #2 - bne _021DAE40 - mov r1, #5 - b _021DAE5C -_021DAE40: - cmp r4, #0 - bne _021DAE52 - mov r0, #0x10 - mov r6, #0 - add r5, r6, #0 - str r0, [sp, #0x28] - add r7, r0, #0 - mov r3, #0x18 - b _021DAE5C -_021DAE52: - mov r6, #1 - mov r0, #0x3c - add r5, r6, #0 - str r0, [sp, #0x28] - mov r7, #0x10 -_021DAE5C: - cmp r4, #2 - bge _021DAE82 - str r7, [sp] - str r6, [sp, #4] - str r5, [sp, #8] - ldr r0, [sp, #0x10] - str r1, [sp, #0xc] - ldr r2, [r0, #0x1c] - ldr r0, [sp, #0x1c] - add r1, r4, r0 - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - add r1, r3, #0 - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - bl ov21_021D4FE4 - b _021DAE94 -_021DAE82: - ldr r0, [sp, #0x10] - ldr r3, [r0, #0x1c] - ldr r0, [sp, #0x1c] - add r2, r4, r0 - mov r0, #0x1c - mul r0, r2 - add r0, r3, r0 - bl ov21_021DA534 -_021DAE94: - ldr r0, [sp, #0x18] - add r4, r4, #1 - add r0, #0x50 - str r0, [sp, #0x18] - cmp r4, #3 - bge _021DAEA2 - b _021DADA0 -_021DAEA2: - ldr r0, [sp, #0x24] - add r0, #0x20 - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - add r0, r0, #2 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r0, r0, #3 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x2c] - add r0, r0, #1 - str r0, [sp, #0x2c] - cmp r0, #6 - bge _021DAEC0 - b _021DAD9A -_021DAEC0: - ldr r0, [sp, #0x14] - bl ov21_021D4EE4 - ldr r1, [sp, #0x10] - mov r2, #3 - str r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - mov r3, #6 - bl ov21_021D4F04 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DAD74 - - thumb_func_start ov21_021DAED8 -ov21_021DAED8: ; 0x021DAED8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DB028 ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #1 - tst r0, r1 - bne _021DAEE8 - b _021DB020 -_021DAEE8: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DAEFC - ldr r0, [r4, #0x18] - bl ov21_021D4F7C - cmp r0, #0x10 - bls _021DAEFE -_021DAEFC: - b _021DB026 -_021DAEFE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DAF0A: ; jump table - .short _021DB026 - _021DAF0A - 2 ; case 0 - .short _021DB026 - _021DAF0A - 2 ; case 1 - .short _021DB026 - _021DAF0A - 2 ; case 2 - .short _021DB026 - _021DAF0A - 2 ; case 3 - .short _021DB026 - _021DAF0A - 2 ; case 4 - .short _021DB026 - _021DAF0A - 2 ; case 5 - .short _021DAF2C - _021DAF0A - 2 ; case 6 - .short _021DAF44 - _021DAF0A - 2 ; case 7 - .short _021DAF5C - _021DAF0A - 2 ; case 8 - .short _021DAF72 - _021DAF0A - 2 ; case 9 - .short _021DAF8A - _021DAF0A - 2 ; case 10 - .short _021DAFA2 - _021DAF0A - 2 ; case 11 - .short _021DAFBA - _021DAF0A - 2 ; case 12 - .short _021DAFD2 - _021DAF0A - 2 ; case 13 - .short _021DB026 - _021DAF0A - 2 ; case 14 - .short _021DAFEA - _021DAF0A - 2 ; case 15 - .short _021DB008 - _021DAF0A - 2 ; case 16 -_021DAF2C: - add r0, r4, #0 - mov r1, #0 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAF44: - add r0, r4, #0 - mov r1, #1 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAF5C: - add r0, r4, #0 - mov r1, #2 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAF72: - add r0, r4, #0 - mov r1, #3 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAF8A: - add r0, r4, #0 - mov r1, #4 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAFA2: - add r0, r4, #0 - mov r1, #5 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAFBA: - add r0, r4, #0 - mov r1, #6 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAFD2: - add r0, r4, #0 - mov r1, #7 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DAFEA: - add r0, r4, #0 - mov r1, #8 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - mov r0, #1 - add r4, #0x8c - str r0, [r4, #0] - pop {r4, pc} -_021DB008: - add r0, r4, #0 - mov r1, #9 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB020: - mov r0, #0 - add r4, #0x8c - str r0, [r4, #0] -_021DB026: - pop {r4, pc} - ; .align 2, 0 -_021DB028: .word 0x021BF67C - thumb_func_end ov21_021DAED8 - - thumb_func_start ov21_021DB02C -ov21_021DB02C: ; 0x021DB02C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r1, #0 - mov r1, #0x2a - lsl r1, r1, #4 - bl sub_02018144 - ldr r1, [sp, #0x10] - str r0, [r1, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - mov r0, #0x10 - str r0, [sp, #0x1c] - mov r0, #6 - ldr r7, [sp, #0x20] - str r0, [sp, #0x18] -_021DB050: - mov r4, #0 - mov r6, #0x1c -_021DB054: - ldr r0, [sp, #0x18] - add r1, r4, r0 - ldr r0, [sp, #0x20] - cmp r0, #5 - bhi _021DB0BC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DB06A: ; jump table - .short _021DB076 - _021DB06A - 2 ; case 0 - .short _021DB082 - _021DB06A - 2 ; case 1 - .short _021DB08E - _021DB06A - 2 ; case 2 - .short _021DB09A - _021DB06A - 2 ; case 3 - .short _021DB0A6 - _021DB06A - 2 ; case 4 - .short _021DB0B2 - _021DB06A - 2 ; case 5 -_021DB076: - cmp r4, #3 - bne _021DB07E - mov r1, #0 - b _021DB0BC -_021DB07E: - mov r5, #0 - b _021DB0BC -_021DB082: - cmp r4, #3 - bne _021DB08A - mov r1, #1 - b _021DB0BC -_021DB08A: - mov r5, #0 - b _021DB0BC -_021DB08E: - cmp r4, #3 - bne _021DB096 - mov r1, #2 - b _021DB0BC -_021DB096: - mov r5, #0 - b _021DB0BC -_021DB09A: - cmp r4, #3 - bne _021DB0A2 - mov r1, #3 - b _021DB0BC -_021DB0A2: - mov r5, #0 - b _021DB0BC -_021DB0A6: - cmp r4, #3 - bne _021DB0AE - mov r1, #4 - b _021DB0BC -_021DB0AE: - mov r5, #0 - b _021DB0BC -_021DB0B2: - cmp r4, #3 - bne _021DB0BA - mov r1, #5 - b _021DB0BC -_021DB0BA: - mov r5, #1 -_021DB0BC: - cmp r4, #3 - bge _021DB0E2 - mov r0, #0x14 - str r0, [sp] - str r5, [sp, #4] - str r5, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [sp, #0x10] - add r2, r4, r7 - mov r1, #0x1c - mul r1, r2 - ldr r0, [r0, #0x1c] - ldr r2, [sp, #0x1c] - add r0, r0, r1 - add r1, r6, #0 - mov r3, #0x20 - bl ov21_021D4FE4 - b _021DB0F2 -_021DB0E2: - ldr r0, [sp, #0x10] - add r2, r4, r7 - ldr r3, [r0, #0x1c] - mov r0, #0x1c - mul r0, r2 - add r0, r3, r0 - bl ov21_021DA534 -_021DB0F2: - add r4, r4, #1 - add r6, #0x38 - cmp r4, #4 - blt _021DB054 - ldr r0, [sp, #0x1c] - add r7, r7, #4 - add r0, #0x20 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, r0, #3 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #6 - blt _021DB050 - ldr r0, [sp, #0x14] - bl ov21_021D4EE4 - ldr r1, [sp, #0x10] - mov r2, #4 - str r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - mov r3, #6 - bl ov21_021D4F04 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DB02C - - thumb_func_start ov21_021DB12C -ov21_021DB12C: ; 0x021DB12C - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DB2F8 ; =0x021BF67C - ldr r1, [r0, #0x44] - mov r0, #1 - tst r0, r1 - bne _021DB13C - b _021DB2EE -_021DB13C: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DB150 - ldr r0, [r4, #0x18] - bl ov21_021D4F7C - cmp r0, #0x14 - bls _021DB152 -_021DB150: - b _021DB2F4 -_021DB152: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DB15E: ; jump table - .short _021DB2F4 - _021DB15E - 2 ; case 0 - .short _021DB2F4 - _021DB15E - 2 ; case 1 - .short _021DB2F4 - _021DB15E - 2 ; case 2 - .short _021DB2F4 - _021DB15E - 2 ; case 3 - .short _021DB2F4 - _021DB15E - 2 ; case 4 - .short _021DB2F4 - _021DB15E - 2 ; case 5 - .short _021DB188 - _021DB15E - 2 ; case 6 - .short _021DB1A0 - _021DB15E - 2 ; case 7 - .short _021DB1B8 - _021DB15E - 2 ; case 8 - .short _021DB1CE - _021DB15E - 2 ; case 9 - .short _021DB1E6 - _021DB15E - 2 ; case 10 - .short _021DB1FE - _021DB15E - 2 ; case 11 - .short _021DB216 - _021DB15E - 2 ; case 12 - .short _021DB22E - _021DB15E - 2 ; case 13 - .short _021DB246 - _021DB15E - 2 ; case 14 - .short _021DB25E - _021DB15E - 2 ; case 15 - .short _021DB276 - _021DB15E - 2 ; case 16 - .short _021DB28E - _021DB15E - 2 ; case 17 - .short _021DB2A6 - _021DB15E - 2 ; case 18 - .short _021DB2BE - _021DB15E - 2 ; case 19 - .short _021DB2D6 - _021DB15E - 2 ; case 20 -_021DB188: - add r0, r4, #0 - mov r1, #0 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB1A0: - add r0, r4, #0 - mov r1, #1 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB1B8: - add r0, r4, #0 - mov r1, #2 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB1CE: - add r0, r4, #0 - mov r1, #3 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB1E6: - add r0, r4, #0 - mov r1, #4 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB1FE: - add r0, r4, #0 - mov r1, #5 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB216: - add r0, r4, #0 - mov r1, #6 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB22E: - add r0, r4, #0 - mov r1, #7 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB246: - add r0, r4, #0 - mov r1, #8 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB25E: - add r0, r4, #0 - mov r1, #9 - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB276: - add r0, r4, #0 - mov r1, #0xa - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB28E: - add r0, r4, #0 - mov r1, #0xb - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB2A6: - add r0, r4, #0 - mov r1, #0xc - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB2BE: - add r0, r4, #0 - mov r1, #0xd - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB2D6: - add r0, r4, #0 - mov r1, #0xe - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - mov r1, #2 - lsl r0, r0, #2 - add r0, r4, r0 - str r1, [r0, #0x44] - pop {r4, pc} -_021DB2EE: - mov r0, #0 - add r4, #0x8c - str r0, [r4, #0] -_021DB2F4: - pop {r4, pc} - nop -_021DB2F8: .word 0x021BF67C - thumb_func_end ov21_021DB12C - - thumb_func_start ov21_021DB2FC -ov21_021DB2FC: ; 0x021DB2FC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021DB388 ; =0x021BF67C - add r4, r1, #0 - ldr r1, [r0, #0x48] - mov r0, #0x10 - tst r0, r1 - beq _021DB31E - ldr r0, [r5, #0x18] - mov r1, #0 - mov r2, #1 - bl ov21_021D4F20 - add r0, r5, #0 - mov r1, #1 - add r0, #0x8c - str r1, [r0, #0] -_021DB31E: - ldr r0, _021DB388 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x20 - tst r0, r1 - beq _021DB33A - mov r1, #0 - ldr r0, [r5, #0x18] - sub r2, r1, #1 - bl ov21_021D4F20 - add r0, r5, #0 - mov r1, #1 - add r0, #0x8c - str r1, [r0, #0] -_021DB33A: - ldr r0, _021DB388 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x40 - tst r0, r1 - beq _021DB356 - mov r1, #1 - ldr r0, [r5, #0x18] - sub r2, r1, #2 - bl ov21_021D4F20 - add r0, r5, #0 - mov r1, #1 - add r0, #0x8c - str r1, [r0, #0] -_021DB356: - ldr r0, _021DB388 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x80 - tst r0, r1 - beq _021DB372 - mov r1, #1 - ldr r0, [r5, #0x18] - add r2, r1, #0 - bl ov21_021D4F20 - add r0, r5, #0 - mov r1, #1 - add r0, #0x8c - str r1, [r0, #0] -_021DB372: - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DA5A8 - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DB38C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DB388: .word 0x021BF67C - thumb_func_end ov21_021DB2FC - - thumb_func_start ov21_021DB38C -ov21_021DB38C: ; 0x021DB38C - push {r3, lr} - cmp r2, #3 - bhi _021DB3C6 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DB39E: ; jump table - .short _021DB3A6 - _021DB39E - 2 ; case 0 - .short _021DB3AC - _021DB39E - 2 ; case 1 - .short _021DB3B2 - _021DB39E - 2 ; case 2 - .short _021DB3C2 - _021DB39E - 2 ; case 3 -_021DB3A6: - bl ov21_021DA7B0 - pop {r3, pc} -_021DB3AC: - bl ov21_021DA988 - pop {r3, pc} -_021DB3B2: - cmp r3, #0 - bne _021DB3BC - bl ov21_021DAC08 - pop {r3, pc} -_021DB3BC: - bl ov21_021DAED8 - pop {r3, pc} -_021DB3C2: - bl ov21_021DB12C -_021DB3C6: - pop {r3, pc} - thumb_func_end ov21_021DB38C - - thumb_func_start ov21_021DB3C8 -ov21_021DB3C8: ; 0x021DB3C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_020181C4 - ldr r0, [r4, #0x18] - bl ov21_021D4EFC - mov r0, #0 - str r0, [r4, #0x18] - str r0, [r4, #0x1c] - pop {r4, pc} - thumb_func_end ov21_021DB3C8 - - thumb_func_start ov21_021DB3E0 -ov21_021DB3E0: ; 0x021DB3E0 - push {r3, lr} - ldr r2, [r0, #0x24] - ldr r3, [r0, #0x28] - bl ov21_021DB3EC - pop {r3, pc} - thumb_func_end ov21_021DB3E0 - - thumb_func_start ov21_021DB3EC -ov21_021DB3EC: ; 0x021DB3EC - push {r3, lr} - cmp r2, #3 - bhi _021DB426 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DB3FE: ; jump table - .short _021DB406 - _021DB3FE - 2 ; case 0 - .short _021DB40C - _021DB3FE - 2 ; case 1 - .short _021DB412 - _021DB3FE - 2 ; case 2 - .short _021DB422 - _021DB3FE - 2 ; case 3 -_021DB406: - bl ov21_021DA6B0 - pop {r3, pc} -_021DB40C: - bl ov21_021DA888 - pop {r3, pc} -_021DB412: - cmp r3, #0 - bne _021DB41C - bl ov21_021DAAD4 - pop {r3, pc} -_021DB41C: - bl ov21_021DAD74 - pop {r3, pc} -_021DB422: - bl ov21_021DB02C -_021DB426: - pop {r3, pc} - thumb_func_end ov21_021DB3EC - - thumb_func_start ov21_021DB428 -ov21_021DB428: ; 0x021DB428 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x24] - cmp r0, #3 - bhi _021DB456 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DB43E: ; jump table - .short _021DB446 - _021DB43E - 2 ; case 0 - .short _021DB44A - _021DB43E - 2 ; case 1 - .short _021DB44E - _021DB43E - 2 ; case 2 - .short _021DB452 - _021DB43E - 2 ; case 3 -_021DB446: - mov r4, #1 - b _021DB45A -_021DB44A: - mov r4, #2 - b _021DB45A -_021DB44E: - mov r4, #3 - b _021DB45A -_021DB452: - mov r4, #4 - b _021DB45A -_021DB456: - bl sub_02022974 -_021DB45A: - ldr r0, [r5, #0x18] - mov r1, #4 - add r2, r4, #0 - bl ov21_021D4F20 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DB428 - - thumb_func_start ov21_021DB468 -ov21_021DB468: ; 0x021DB468 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021DB3C8 - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DB3EC - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DB468 - - thumb_func_start ov21_021DB480 -ov21_021DB480: ; 0x021DB480 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, [r4, #0x18] - ldr r1, [r5, #0] - add r6, r2, #0 - bl ov21_021D25B8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DB49C - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DB480 - - thumb_func_start ov21_021DB49C -ov21_021DB49C: ; 0x021DB49C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r2, #4] - add r4, r1, #0 - bl ov21_021D3998 - cmp r0, #0 - beq _021DB4CA - add r0, r5, #0 - mov r1, #1 - bl ov21_021DB4E4 - cmp r0, #0 - beq _021DB4C0 - ldr r0, [r4, #0x18] - ldr r1, [r5, #0] - bl ov21_021D25B8 -_021DB4C0: - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DB4D4 - pop {r3, r4, r5, pc} -_021DB4CA: - add r0, r5, #0 - mov r1, #0 - bl ov21_021DB4E4 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DB49C - - thumb_func_start ov21_021DB4D4 -ov21_021DB4D4: ; 0x021DB4D4 - ldr r3, _021DB4E0 ; =ov21_021D2544 - add r2, r0, #0 - ldr r0, [r1, #0x18] - ldr r1, [r2, #0] - bx r3 - nop -_021DB4E0: .word ov21_021D2544 - thumb_func_end ov21_021DB4D4 - - thumb_func_start ov21_021DB4E4 -ov21_021DB4E4: ; 0x021DB4E4 - push {r3, r4, r5, lr} - ldr r4, [r0, #0] - mov r0, #0x79 - lsl r0, r0, #2 - add r0, r4, r0 - add r5, r1, #0 - bl ov21_021D25A0 - cmp r5, r0 - beq _021DB508 - mov r0, #0x79 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r5, #0 - bl ov21_021D2584 - mov r0, #1 - pop {r3, r4, r5, pc} -_021DB508: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DB4E4 - - thumb_func_start ov21_021DB50C -ov21_021DB50C: ; 0x021DB50C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021DB5CC ; =0x00003EFD - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x7d - mov r3, #1 - bl sub_02009A4C - add r1, r5, #0 - add r1, #0xe4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - bl sub_0200A3DC - add r0, r5, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - bl sub_02009D4C - ldr r0, _021DB5D0 ; =0x00003E83 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - add r1, r5, #0 - add r1, #0xe8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200A640 - add r0, r5, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_02009D4C - ldr r0, _021DB5D4 ; =0x00003EFE - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x7e - mov r3, #1 - bl sub_02009BC4 - add r1, r5, #0 - add r1, #0xec - str r0, [r1, #0] - ldr r0, _021DB5D8 ; =0x00003EFC - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x7c - mov r3, #1 - bl sub_02009BC4 - add r5, #0xf0 - str r0, [r5, #0] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB5CC: .word 0x00003EFD -_021DB5D0: .word 0x00003E83 -_021DB5D4: .word 0x00003EFE -_021DB5D8: .word 0x00003EFC - thumb_func_end ov21_021DB50C - - thumb_func_start ov21_021DB5DC -ov21_021DB5DC: ; 0x021DB5DC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - ldr r4, [r1, #0] - bl sub_0200A4E4 - add r0, r5, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200A6DC - mov r0, #5 - add r1, r5, #0 - lsl r0, r0, #6 - add r1, #0xe4 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x51 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xe8 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x52 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xec - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - add r5, #0xf0 - ldr r0, [r4, r0] - ldr r1, [r5, #0] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DB5DC - - thumb_func_start ov21_021DB634 -ov21_021DB634: ; 0x021DB634 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - mov r0, #0x3f - lsl r0, r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x80 - mov r3, #1 - bl sub_02009A4C - add r1, r5, #0 - add r1, #0xf4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - bl sub_0200A3DC - add r0, r5, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - bl sub_02009D4C - ldr r0, _021DB6C0 ; =0x00003F01 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x81 - mov r3, #1 - bl sub_02009BC4 - add r1, r5, #0 - add r1, #0xfc - str r0, [r1, #0] - ldr r0, _021DB6C4 ; =0x00003EFF - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x7f - mov r3, #1 - bl sub_02009BC4 - mov r1, #1 - lsl r1, r1, #8 - str r0, [r5, r1] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB6C0: .word 0x00003F01 -_021DB6C4: .word 0x00003EFF - thumb_func_end ov21_021DB634 - - thumb_func_start ov21_021DB6C8 -ov21_021DB6C8: ; 0x021DB6C8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #5 - add r1, r5, #0 - lsl r0, r0, #6 - add r1, #0xf4 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x52 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xfc - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r1, #0x53 - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, #0x4c - ldr r1, [r5, r1] - bl sub_02009D68 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DB6C8 - - thumb_func_start ov21_021DB708 -ov21_021DB708: ; 0x021DB708 - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021DB788 ; =0x00003EFC - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #5 - str r1, [sp, #0x10] - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r2, #0x79 - add r3, r3, #2 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x2c - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x20 - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - add r0, r5, #0 - str r6, [sp, #0x48] - bl ov21_021DB858 - mov r3, #0x41 - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, r3, #4 - ldr r3, [r5, r3] - add r0, r5, #0 - add r1, sp, #0x2c - bl ov21_021DB81C - add sp, #0x70 - pop {r4, r5, r6, pc} - nop -_021DB788: .word 0x00003EFC - thumb_func_end ov21_021DB708 - - thumb_func_start ov21_021DB78C -ov21_021DB78C: ; 0x021DB78C - push {r4, lr} - add r4, r0, #0 - bl ov21_021DB90C - add r0, r4, #0 - bl ov21_021DB924 - pop {r4, pc} - thumb_func_end ov21_021DB78C - - thumb_func_start ov21_021DB79C -ov21_021DB79C: ; 0x021DB79C - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021DB818 ; =0x00003EFC - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #5 - str r1, [sp, #0x10] - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r2, #0x79 - add r3, r3, #2 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x20 - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - add r0, r5, #0 - str r6, [sp, #0x48] - bl ov21_021DB924 - mov r3, #0x41 - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, r3, #4 - ldr r3, [r5, r3] - add r0, r5, #0 - add r1, sp, #0x2c - bl ov21_021DB81C - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DB818: .word 0x00003EFC - thumb_func_end ov21_021DB79C - - thumb_func_start ov21_021DB81C -ov21_021DB81C: ; 0x021DB81C - push {r3, lr} - cmp r2, #3 - bhi _021DB856 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DB82E: ; jump table - .short _021DB836 - _021DB82E - 2 ; case 0 - .short _021DB83C - _021DB82E - 2 ; case 1 - .short _021DB842 - _021DB82E - 2 ; case 2 - .short _021DB852 - _021DB82E - 2 ; case 3 -_021DB836: - bl ov21_021DB944 - pop {r3, pc} -_021DB83C: - bl ov21_021DB9B4 - pop {r3, pc} -_021DB842: - cmp r3, #0 - bne _021DB84C - bl ov21_021DBA24 - pop {r3, pc} -_021DB84C: - bl ov21_021DBAB8 - pop {r3, pc} -_021DB852: - bl ov21_021DBB74 -_021DB856: - pop {r3, pc} - thumb_func_end ov21_021DB81C - - thumb_func_start ov21_021DB858 -ov21_021DB858: ; 0x021DB858 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0xe - add r6, r0, #0 - add r4, r1, #0 - mov r5, #0 - lsl r7, r7, #0x10 -_021DB864: - cmp r5, #5 - bhi _021DB8C2 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DB874: ; jump table - .short _021DB880 - _021DB874 - 2 ; case 0 - .short _021DB88E - _021DB874 - 2 ; case 1 - .short _021DB898 - _021DB874 - 2 ; case 2 - .short _021DB8A2 - _021DB874 - 2 ; case 3 - .short _021DB8AC - _021DB874 - 2 ; case 4 - .short _021DB8B6 - _021DB874 - 2 ; case 5 -_021DB880: - mov r0, #0xd - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - mov r0, #0x35 - lsl r0, r0, #0xe - str r0, [r4, #8] - b _021DB8C2 -_021DB88E: - mov r0, #0xf - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - str r7, [r4, #8] - b _021DB8C2 -_021DB898: - mov r0, #0x11 - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - str r7, [r4, #8] - b _021DB8C2 -_021DB8A2: - mov r0, #0x13 - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - str r7, [r4, #8] - b _021DB8C2 -_021DB8AC: - mov r0, #0x15 - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - str r7, [r4, #8] - b _021DB8C2 -_021DB8B6: - mov r0, #0x17 - lsl r0, r0, #0x10 - str r0, [r4, #0xc] - mov r0, #0x35 - lsl r0, r0, #0xe - str r0, [r4, #8] -_021DB8C2: - add r0, r4, #0 - bl sub_02021B90 - str r0, [r6, #0] - cmp r5, #5 - bhi _021DB902 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DB8DA: ; jump table - .short _021DB8E6 - _021DB8DA - 2 ; case 0 - .short _021DB8F0 - _021DB8DA - 2 ; case 1 - .short _021DB8F0 - _021DB8DA - 2 ; case 2 - .short _021DB8F0 - _021DB8DA - 2 ; case 3 - .short _021DB8F0 - _021DB8DA - 2 ; case 4 - .short _021DB8FA - _021DB8DA - 2 ; case 5 -_021DB8E6: - ldr r0, [r6, #0] - mov r1, #3 - bl sub_02021D6C - b _021DB902 -_021DB8F0: - ldr r0, [r6, #0] - mov r1, #2 - bl sub_02021D6C - b _021DB902 -_021DB8FA: - ldr r0, [r6, #0] - mov r1, #1 - bl sub_02021D6C -_021DB902: - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #6 - blt _021DB864 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DB858 - - thumb_func_start ov21_021DB90C -ov21_021DB90C: ; 0x021DB90C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021DB912: - ldr r0, [r5, #0] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _021DB912 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DB90C - - thumb_func_start ov21_021DB924 -ov21_021DB924: ; 0x021DB924 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DB92C: - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021DB938 - bl sub_02021BD4 - str r6, [r5, #0x30] -_021DB938: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _021DB92C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DB924 - - thumb_func_start ov21_021DB944 -ov21_021DB944: ; 0x021DB944 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #0x30 - add r6, r1, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r7, r6, #0 - str r0, [sp, #4] - add r7, #8 -_021DB95C: - ldr r0, [sp, #8] - mov r4, #0x30 - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [r6, #0xc] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - lsl r1, r0, #2 - ldr r0, [sp] - add r5, r0, r1 -_021DB976: - str r4, [r6, #8] - ldr r0, [r7, #0] - lsl r0, r0, #0xc - str r0, [r7, #0] - add r0, r6, #0 - bl sub_02021B90 - mov r1, #0 - str r0, [r5, #0x30] - bl sub_02021D6C - ldr r0, [sp, #0xc] - add r4, #0x50 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r0, #2 - blt _021DB976 - ldr r0, [sp, #8] - add r0, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #3 - blt _021DB95C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DB944 - - thumb_func_start ov21_021DB9B4 -ov21_021DB9B4: ; 0x021DB9B4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #0x10 - add r6, r1, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r7, r6, #0 - str r0, [sp, #4] - add r7, #8 -_021DB9CC: - ldr r0, [sp, #8] - mov r4, #0x30 - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [r6, #0xc] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - lsl r1, r0, #2 - ldr r0, [sp] - add r5, r0, r1 -_021DB9E6: - str r4, [r6, #8] - ldr r0, [r7, #0] - lsl r0, r0, #0xc - str r0, [r7, #0] - add r0, r6, #0 - bl sub_02021B90 - mov r1, #0 - str r0, [r5, #0x30] - bl sub_02021D6C - ldr r0, [sp, #0xc] - add r4, #0x50 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r0, #2 - blt _021DB9E6 - ldr r0, [sp, #8] - add r0, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #5 - blt _021DB9CC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DB9B4 - - thumb_func_start ov21_021DBA24 -ov21_021DBA24: ; 0x021DBA24 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #0x10 - add r6, r1, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r7, r6, #0 - str r0, [sp, #4] - add r7, #8 -_021DBA3C: - ldr r0, [sp, #8] - mov r4, #0x30 - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [r6, #0xc] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - lsl r1, r0, #2 - ldr r0, [sp] - add r5, r0, r1 -_021DBA56: - str r4, [r6, #8] - ldr r0, [r7, #0] - lsl r0, r0, #0xc - str r0, [r7, #0] - add r0, r6, #0 - bl sub_02021B90 - mov r1, #0 - str r0, [r5, #0x30] - bl sub_02021D6C - ldr r0, [sp, #0xc] - add r4, #0x50 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r0, #2 - blt _021DBA56 - ldr r0, [sp, #8] - add r0, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #5 - blt _021DBA3C - mov r0, #0xb0 - mov r2, #0x18 - str r0, [r6, #0xc] - lsl r0, r2, #0xc - str r0, [r6, #8] - ldr r0, [r6, #0xc] - lsl r1, r0, #0xc - lsl r0, r2, #0xf - add r0, r1, r0 - str r0, [r6, #0xc] - add r0, r6, #0 - bl sub_02021B90 - ldr r1, [sp] - str r0, [r1, #0x58] - mov r1, #5 - bl sub_02021D6C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DBA24 - - thumb_func_start ov21_021DBAB8 -ov21_021DBAB8: ; 0x021DBAB8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #0x10 - add r6, r1, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r7, r6, #0 - str r0, [sp, #4] - add r7, #8 -_021DBAD0: - ldr r0, [sp, #8] - mov r4, #0x30 - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [r6, #0xc] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - lsl r1, r0, #2 - ldr r0, [sp] - add r5, r0, r1 -_021DBAEA: - str r4, [r6, #8] - ldr r0, [r7, #0] - lsl r0, r0, #0xc - str r0, [r7, #0] - add r0, r6, #0 - bl sub_02021B90 - mov r1, #0 - str r0, [r5, #0x30] - bl sub_02021D6C - ldr r0, [sp, #0xc] - add r4, #0x50 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r0, #2 - blt _021DBAEA - ldr r0, [sp, #8] - add r0, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #4 - blt _021DBAD0 - mov r0, #0x90 - str r0, [r6, #0xc] - mov r0, #0x80 - lsl r0, r0, #0xc - str r0, [r6, #8] - ldr r0, [r6, #0xc] - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [r6, #0xc] - add r0, r6, #0 - bl sub_02021B90 - ldr r1, [sp] - str r0, [r1, #0x50] - mov r1, #0 - bl sub_02021D6C - mov r0, #0xb0 - mov r2, #0x18 - str r0, [r6, #0xc] - lsl r0, r2, #0xc - str r0, [r6, #8] - ldr r0, [r6, #0xc] - lsl r1, r0, #0xc - lsl r0, r2, #0xf - add r0, r1, r0 - str r0, [r6, #0xc] - add r0, r6, #0 - bl sub_02021B90 - ldr r1, [sp] - str r0, [r1, #0x54] - mov r1, #4 - bl sub_02021D6C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DBAB8 - - thumb_func_start ov21_021DBB74 -ov21_021DBB74: ; 0x021DBB74 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #0x10 - add r6, r1, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r7, r6, #0 - str r0, [sp, #4] - add r7, #8 -_021DBB8C: - ldr r0, [sp, #8] - mov r4, #0x1c - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [r6, #0xc] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - lsl r1, r0, #2 - ldr r0, [sp] - add r5, r0, r1 -_021DBBA6: - str r4, [r6, #8] - ldr r0, [r7, #0] - lsl r0, r0, #0xc - str r0, [r7, #0] - add r0, r6, #0 - bl sub_02021B90 - mov r1, #6 - str r0, [r5, #0x30] - bl sub_02021D6C - ldr r0, [sp, #0xc] - add r4, #0x38 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0xc] - cmp r0, #3 - blt _021DBBA6 - ldr r0, [sp, #8] - add r0, #0x20 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, r0, #3 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #5 - blt _021DBB8C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DBB74 - - thumb_func_start ov21_021DBBE4 -ov21_021DBBE4: ; 0x021DBBE4 - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - ldr r4, [r1, #0] - ldr r3, _021DBD9C ; =0x00003EFF - str r0, [sp, #0x2c] - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #5 - str r1, [sp, #0x10] - lsl r0, r0, #6 - add r5, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x58 - sub r2, #0x7c - add r3, r3, #2 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x38] - add r0, sp, #0x58 - str r0, [sp, #0x3c] - mov r0, #0xf - str r0, [sp, #0x4c] - mov r0, #2 - str r0, [sp, #0x50] - mov r0, #0 - str r0, [sp, #0x34] - mov r0, #0x10 - ldr r7, [sp, #0x34] - str r5, [sp, #0x54] - str r0, [sp, #0x30] -_021DBC4E: - ldr r0, [sp, #0x30] - mov r6, #0 - str r0, [sp, #0x44] - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x44] - ldr r0, [sp, #0x2c] - lsl r1, r7, #2 - mov r5, #0x1c - add r4, r0, r1 -_021DBC66: - str r5, [sp, #0x40] - lsl r0, r5, #0xc - str r0, [sp, #0x40] - add r0, sp, #0x38 - bl sub_02021B90 - add r1, r4, #0 - add r1, #0xa8 - str r0, [r1, #0] - add r0, r6, r7 - cmp r0, #0xe - bhi _021DBD78 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DBC8A: ; jump table - .short _021DBCA8 - _021DBC8A - 2 ; case 0 - .short _021DBCB6 - _021DBC8A - 2 ; case 1 - .short _021DBCC4 - _021DBC8A - 2 ; case 2 - .short _021DBCD2 - _021DBC8A - 2 ; case 3 - .short _021DBCE0 - _021DBC8A - 2 ; case 4 - .short _021DBCEE - _021DBC8A - 2 ; case 5 - .short _021DBCFC - _021DBC8A - 2 ; case 6 - .short _021DBD0A - _021DBC8A - 2 ; case 7 - .short _021DBD18 - _021DBC8A - 2 ; case 8 - .short _021DBD26 - _021DBC8A - 2 ; case 9 - .short _021DBD34 - _021DBC8A - 2 ; case 10 - .short _021DBD42 - _021DBC8A - 2 ; case 11 - .short _021DBD50 - _021DBC8A - 2 ; case 12 - .short _021DBD5E - _021DBC8A - 2 ; case 13 - .short _021DBD6C - _021DBC8A - 2 ; case 14 -_021DBCA8: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021D6C - b _021DBD78 -_021DBCB6: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #5 - bl sub_02021D6C - b _021DBD78 -_021DBCC4: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0xa - bl sub_02021D6C - b _021DBD78 -_021DBCD2: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021D6C - b _021DBD78 -_021DBCE0: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #6 - bl sub_02021D6C - b _021DBD78 -_021DBCEE: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0xb - bl sub_02021D6C - b _021DBD78 -_021DBCFC: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_02021D6C - b _021DBD78 -_021DBD0A: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #9 - bl sub_02021D6C - b _021DBD78 -_021DBD18: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0xc - bl sub_02021D6C - b _021DBD78 -_021DBD26: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_02021D6C - b _021DBD78 -_021DBD34: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #8 - bl sub_02021D6C - b _021DBD78 -_021DBD42: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0xd - bl sub_02021D6C - b _021DBD78 -_021DBD50: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #4 - bl sub_02021D6C - b _021DBD78 -_021DBD5E: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #7 - bl sub_02021D6C - b _021DBD78 -_021DBD6C: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021CAC -_021DBD78: - add r6, r6, #1 - add r5, #0x38 - add r4, r4, #4 - cmp r6, #3 - bge _021DBD84 - b _021DBC66 -_021DBD84: - ldr r0, [sp, #0x30] - add r7, r7, #3 - add r0, #0x20 - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - add r0, r0, #1 - str r0, [sp, #0x34] - cmp r0, #5 - bge _021DBD98 - b _021DBC4E -_021DBD98: - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DBD9C: .word 0x00003EFF - thumb_func_end ov21_021DBBE4 - - thumb_func_start ov21_021DBDA0 -ov21_021DBDA0: ; 0x021DBDA0 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DBDA8: - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DBDBC - bl sub_02021BD4 - add r0, r5, #0 - add r0, #0xa8 - str r6, [r0, #0] -_021DBDBC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _021DBDA8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DBDA0 - - thumb_func_start ov21_021DBDC8 -ov21_021DBDC8: ; 0x021DBDC8 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r5, r0, #0 - ldr r4, [r1, #0] - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021DBE28 ; =0x00003E83 - add r6, r2, #0 - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #4] - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #0xc] - mov r0, #0 - mov r2, #0x15 - str r0, [sp, #0x1c] - str r0, [sp, #0x20] - mov r0, #2 - str r0, [sp, #0x24] - str r6, [sp, #0x28] - lsl r2, r2, #4 - ldr r2, [r4, r2] - add r0, r5, #0 - add r1, sp, #4 - bl ov21_021DBEC8 - mov r3, #0x42 - lsl r3, r3, #2 - ldr r0, [r5, r3] - add r2, r3, #0 - str r0, [sp] - add r2, #0x48 - sub r3, r3, #4 - ldr r2, [r4, r2] - ldr r3, [r5, r3] - add r0, r5, #0 - add r1, sp, #4 - bl ov21_021DBE98 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - nop -_021DBE28: .word 0x00003E83 - thumb_func_end ov21_021DBDC8 - - thumb_func_start ov21_021DBE2C -ov21_021DBE2C: ; 0x021DBE2C - push {r4, lr} - add r4, r0, #0 - bl ov21_021DC04C - add r0, r4, #0 - bl ov21_021DC068 - pop {r4, pc} - thumb_func_end ov21_021DBE2C - - thumb_func_start ov21_021DBE3C -ov21_021DBE3C: ; 0x021DBE3C - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r5, r0, #0 - ldr r4, [r1, #0] - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021DBE94 ; =0x00003E83 - add r6, r2, #0 - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #4] - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x1c] - str r0, [sp, #0x20] - mov r0, #2 - str r0, [sp, #0x24] - add r0, r5, #0 - str r6, [sp, #0x28] - bl ov21_021DC068 - mov r3, #0x42 - lsl r3, r3, #2 - ldr r0, [r5, r3] - add r2, r3, #0 - str r0, [sp] - add r2, #0x48 - sub r3, r3, #4 - ldr r2, [r4, r2] - ldr r3, [r5, r3] - add r0, r5, #0 - add r1, sp, #4 - bl ov21_021DBE98 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - nop -_021DBE94: .word 0x00003E83 - thumb_func_end ov21_021DBE3C - - thumb_func_start ov21_021DBE98 -ov21_021DBE98: ; 0x021DBE98 - push {r3, lr} - cmp r3, #0 - beq _021DBEA8 - cmp r3, #1 - beq _021DBEAE - cmp r3, #2 - beq _021DBEB4 - pop {r3, pc} -_021DBEA8: - bl ov21_021DC088 - pop {r3, pc} -_021DBEAE: - bl ov21_021DC12C - pop {r3, pc} -_021DBEB4: - ldr r3, [sp, #8] - cmp r3, #0 - bne _021DBEC0 - bl ov21_021DC1E8 - pop {r3, pc} -_021DBEC0: - bl ov21_021DC2A4 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021DBE98 - - thumb_func_start ov21_021DBEC8 -ov21_021DBEC8: ; 0x021DBEC8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - add r6, r2, #0 - mov r1, #2 - bl sub_0201FAB4 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - str r0, [sp, #8] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r2, _021DC048 ; =0x000002B9 - add r0, r6, #0 - mov r3, #0x32 - bl ov21_021D4DAC - ldr r1, [sp, #8] - neg r0, r0 - str r1, [r4, #4] - ldr r1, [r5, #4] - lsr r0, r0, #1 - str r1, [r4, #0xc] - str r0, [r4, #0x10] - mov r0, #5 - mvn r0, r0 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov21_021D4CA0 - str r0, [r5, #0x1c] - ldr r0, [r0, #0] - add r1, r7, #3 - bl sub_02012A60 - ldr r0, [sp, #8] - bl ov21_021D4DA0 - add r0, r6, #0 - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0xc] - ldr r2, _021DC048 ; =0x000002B9 - add r0, r6, #0 - mov r3, #0x2f - bl ov21_021D4DAC - ldr r1, [sp, #0xc] - neg r0, r0 - str r1, [r4, #4] - ldr r1, [r5, #8] - lsr r0, r0, #1 - str r1, [r4, #0xc] - str r0, [r4, #0x10] - mov r0, #5 - mvn r0, r0 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov21_021D4CA0 - str r0, [r5, #0x20] - ldr r0, [r0, #0] - add r1, r7, #3 - bl sub_02012A60 - ldr r0, [sp, #0xc] - bl ov21_021D4DA0 - add r0, r6, #0 - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x10] - ldr r2, _021DC048 ; =0x000002B9 - add r0, r6, #0 - mov r3, #0x30 - bl ov21_021D4DAC - ldr r1, [sp, #0x10] - neg r0, r0 - str r1, [r4, #4] - ldr r1, [r5, #0xc] - lsr r0, r0, #1 - str r1, [r4, #0xc] - str r0, [r4, #0x10] - mov r0, #5 - mvn r0, r0 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov21_021D4CA0 - str r0, [r5, #0x24] - ldr r0, [r0, #0] - add r1, r7, #3 - bl sub_02012A60 - ldr r0, [sp, #0x10] - bl ov21_021D4DA0 - add r0, r6, #0 - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x14] - ldr r2, _021DC048 ; =0x000002B9 - add r0, r6, #0 - mov r3, #0x31 - bl ov21_021D4DAC - ldr r1, [sp, #0x14] - neg r0, r0 - str r1, [r4, #4] - ldr r1, [r5, #0x10] - lsr r0, r0, #1 - str r1, [r4, #0xc] - str r0, [r4, #0x10] - mov r0, #5 - mvn r0, r0 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov21_021D4CA0 - str r0, [r5, #0x28] - ldr r0, [r0, #0] - add r1, r7, #3 - bl sub_02012A60 - ldr r0, [sp, #0x14] - bl ov21_021D4DA0 - add r0, r6, #0 - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x18] - ldr r2, _021DC048 ; =0x000002B9 - add r0, r6, #0 - mov r3, #0x33 - bl ov21_021D4DAC - ldr r1, [sp, #0x18] - neg r0, r0 - str r1, [r4, #4] - ldr r1, [r5, #0x14] - lsr r0, r0, #1 - str r1, [r4, #0xc] - str r0, [r4, #0x10] - mov r0, #5 - mvn r0, r0 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov21_021D4CA0 - str r0, [r5, #0x2c] - ldr r0, [r0, #0] - add r1, r7, #1 - bl sub_02012A60 - ldr r0, [sp, #0x18] - bl ov21_021D4DA0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DC048: .word 0x000002B9 - thumb_func_end ov21_021DBEC8 - - thumb_func_start ov21_021DC04C -ov21_021DC04C: ; 0x021DC04C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021DC052: - ldr r0, [r5, #0x18] - cmp r0, #0 - beq _021DC05C - bl ov21_021D4D1C -_021DC05C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _021DC052 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DC04C - - thumb_func_start ov21_021DC068 -ov21_021DC068: ; 0x021DC068 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DC070: - ldr r0, [r5, #0x6c] - cmp r0, #0 - beq _021DC07C - bl ov21_021D4D1C - str r6, [r5, #0x6c] -_021DC07C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _021DC070 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DC068 - - thumb_func_start ov21_021DC088 -ov21_021DC088: ; 0x021DC088 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r0, r1, #0 - str r1, [sp, #8] - ldr r0, [r0, #8] - mov r1, #2 - str r2, [sp, #0xc] - bl sub_0201FAB4 - str r0, [sp, #0x10] - add r0, #0xb - mov r5, #0 - str r0, [sp, #0x10] -_021DC0A4: - ldr r0, [sp, #0xc] - mov r1, #0xa - mov r2, #2 - bl ov21_021D4D6C - add r7, r0, #0 - cmp r5, #5 - bhi _021DC0E2 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC0C0: ; jump table - .short _021DC0CC - _021DC0C0 - 2 ; case 0 - .short _021DC0D0 - _021DC0C0 - 2 ; case 1 - .short _021DC0D4 - _021DC0C0 - 2 ; case 2 - .short _021DC0D8 - _021DC0C0 - 2 ; case 3 - .short _021DC0DC - _021DC0C0 - 2 ; case 4 - .short _021DC0E0 - _021DC0C0 - 2 ; case 5 -_021DC0CC: - mov r4, #0x51 - b _021DC0E2 -_021DC0D0: - mov r4, #0x52 - b _021DC0E2 -_021DC0D4: - mov r4, #0x53 - b _021DC0E2 -_021DC0D8: - mov r4, #0x54 - b _021DC0E2 -_021DC0DC: - mov r4, #0x55 - b _021DC0E2 -_021DC0E0: - mov r4, #0x56 -_021DC0E2: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _021DC128 ; =0x000002B9 - add r1, r7, #0 - add r3, r4, #0 - bl ov21_021D4DAC - neg r0, r0 - lsr r1, r0, #1 - ldr r0, [sp, #8] - str r1, [r0, #0x10] - str r7, [r0, #4] - ldr r1, [r6, #0x30] - str r1, [r0, #0xc] - mov r1, #5 - mvn r1, r1 - str r1, [r0, #0x14] - bl ov21_021D4CA0 - str r0, [r6, #0x6c] - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - bl sub_02012A60 - add r0, r7, #0 - bl ov21_021D4DA0 - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #6 - blt _021DC0A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DC128: .word 0x000002B9 - thumb_func_end ov21_021DC088 - - thumb_func_start ov21_021DC12C -ov21_021DC12C: ; 0x021DC12C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r0, r1, #0 - str r1, [sp, #8] - ldr r0, [r0, #8] - mov r1, #2 - str r2, [sp, #0xc] - bl sub_0201FAB4 - str r0, [sp, #0x10] - add r0, #0xb - mov r5, #0 - str r0, [sp, #0x10] -_021DC148: - ldr r0, [sp, #0xc] - mov r1, #0xa - mov r2, #2 - bl ov21_021D4D6C - add r7, r0, #0 - cmp r5, #9 - bhi _021DC19E - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC164: ; jump table - .short _021DC178 - _021DC164 - 2 ; case 0 - .short _021DC17C - _021DC164 - 2 ; case 1 - .short _021DC180 - _021DC164 - 2 ; case 2 - .short _021DC184 - _021DC164 - 2 ; case 3 - .short _021DC188 - _021DC164 - 2 ; case 4 - .short _021DC18C - _021DC164 - 2 ; case 5 - .short _021DC190 - _021DC164 - 2 ; case 6 - .short _021DC194 - _021DC164 - 2 ; case 7 - .short _021DC198 - _021DC164 - 2 ; case 8 - .short _021DC19C - _021DC164 - 2 ; case 9 -_021DC178: - mov r4, #0x36 - b _021DC19E -_021DC17C: - mov r4, #0x37 - b _021DC19E -_021DC180: - mov r4, #0x38 - b _021DC19E -_021DC184: - mov r4, #0x39 - b _021DC19E -_021DC188: - mov r4, #0x3a - b _021DC19E -_021DC18C: - mov r4, #0x3b - b _021DC19E -_021DC190: - mov r4, #0x3c - b _021DC19E -_021DC194: - mov r4, #0x3d - b _021DC19E -_021DC198: - mov r4, #0x3e - b _021DC19E -_021DC19C: - mov r4, #0x7e -_021DC19E: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _021DC1E4 ; =0x000002B9 - add r1, r7, #0 - add r3, r4, #0 - bl ov21_021D4DAC - neg r0, r0 - lsr r1, r0, #1 - ldr r0, [sp, #8] - str r1, [r0, #0x10] - str r7, [r0, #4] - ldr r1, [r6, #0x30] - str r1, [r0, #0xc] - mov r1, #5 - mvn r1, r1 - str r1, [r0, #0x14] - bl ov21_021D4CA0 - str r0, [r6, #0x6c] - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - bl sub_02012A60 - add r0, r7, #0 - bl ov21_021D4DA0 - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #0xa - blt _021DC148 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DC1E4: .word 0x000002B9 - thumb_func_end ov21_021DC12C - - thumb_func_start ov21_021DC1E8 -ov21_021DC1E8: ; 0x021DC1E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r0, r1, #0 - str r1, [sp, #8] - ldr r0, [r0, #8] - mov r1, #2 - str r2, [sp, #0xc] - bl sub_0201FAB4 - str r0, [sp, #0x10] - add r0, #0xb - mov r5, #0 - str r0, [sp, #0x10] -_021DC204: - ldr r0, [sp, #0xc] - mov r1, #0xa - mov r2, #2 - bl ov21_021D4D6C - add r7, r0, #0 - cmp r5, #9 - bhi _021DC25A - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC220: ; jump table - .short _021DC234 - _021DC220 - 2 ; case 0 - .short _021DC238 - _021DC220 - 2 ; case 1 - .short _021DC23C - _021DC220 - 2 ; case 2 - .short _021DC240 - _021DC220 - 2 ; case 3 - .short _021DC244 - _021DC220 - 2 ; case 4 - .short _021DC248 - _021DC220 - 2 ; case 5 - .short _021DC24C - _021DC220 - 2 ; case 6 - .short _021DC250 - _021DC220 - 2 ; case 7 - .short _021DC254 - _021DC220 - 2 ; case 8 - .short _021DC258 - _021DC220 - 2 ; case 9 -_021DC234: - mov r4, #0x40 - b _021DC25A -_021DC238: - mov r4, #0x46 - b _021DC25A -_021DC23C: - mov r4, #0x49 - b _021DC25A -_021DC240: - mov r4, #0x47 - b _021DC25A -_021DC244: - mov r4, #0x48 - b _021DC25A -_021DC248: - mov r4, #0x4c - b _021DC25A -_021DC24C: - mov r4, #0x4b - b _021DC25A -_021DC250: - mov r4, #0x4d - b _021DC25A -_021DC254: - mov r4, #0x50 - b _021DC25A -_021DC258: - mov r4, #0x7f -_021DC25A: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _021DC2A0 ; =0x000002B9 - add r1, r7, #0 - add r3, r4, #0 - bl ov21_021D4DAC - neg r0, r0 - lsr r1, r0, #1 - ldr r0, [sp, #8] - str r1, [r0, #0x10] - str r7, [r0, #4] - ldr r1, [r6, #0x30] - str r1, [r0, #0xc] - mov r1, #5 - mvn r1, r1 - str r1, [r0, #0x14] - bl ov21_021D4CA0 - str r0, [r6, #0x6c] - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - bl sub_02012A60 - add r0, r7, #0 - bl ov21_021D4DA0 - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #0xa - blt _021DC204 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DC2A0: .word 0x000002B9 - thumb_func_end ov21_021DC1E8 - - thumb_func_start ov21_021DC2A4 -ov21_021DC2A4: ; 0x021DC2A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r0, r1, #0 - str r1, [sp, #8] - ldr r0, [r0, #8] - mov r1, #2 - str r2, [sp, #0xc] - bl sub_0201FAB4 - str r0, [sp, #0x10] - add r0, #0xb - mov r5, #0 - str r0, [sp, #0x10] -_021DC2C0: - ldr r0, [sp, #0xc] - mov r1, #0xa - mov r2, #2 - bl ov21_021D4D6C - add r7, r0, #0 - cmp r5, #8 - bhi _021DC310 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC2DC: ; jump table - .short _021DC2EE - _021DC2DC - 2 ; case 0 - .short _021DC2F2 - _021DC2DC - 2 ; case 1 - .short _021DC2F6 - _021DC2DC - 2 ; case 2 - .short _021DC2FA - _021DC2DC - 2 ; case 3 - .short _021DC2FE - _021DC2DC - 2 ; case 4 - .short _021DC302 - _021DC2DC - 2 ; case 5 - .short _021DC306 - _021DC2DC - 2 ; case 6 - .short _021DC30A - _021DC2DC - 2 ; case 7 - .short _021DC30E - _021DC2DC - 2 ; case 8 -_021DC2EE: - mov r4, #0x41 - b _021DC310 -_021DC2F2: - mov r4, #0x42 - b _021DC310 -_021DC2F6: - mov r4, #0x44 - b _021DC310 -_021DC2FA: - mov r4, #0x43 - b _021DC310 -_021DC2FE: - mov r4, #0x4a - b _021DC310 -_021DC302: - mov r4, #0x45 - b _021DC310 -_021DC306: - mov r4, #0x4e - b _021DC310 -_021DC30A: - mov r4, #0x4f - b _021DC310 -_021DC30E: - mov r4, #0x7f -_021DC310: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r2, _021DC358 ; =0x000002B9 - add r1, r7, #0 - add r3, r4, #0 - bl ov21_021D4DAC - neg r0, r0 - lsr r1, r0, #1 - ldr r0, [sp, #8] - str r1, [r0, #0x10] - str r7, [r0, #4] - ldr r1, [r6, #0x30] - str r1, [r0, #0xc] - mov r1, #5 - mvn r1, r1 - str r1, [r0, #0x14] - bl ov21_021D4CA0 - str r0, [r6, #0x6c] - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - bl sub_02012A60 - add r0, r7, #0 - bl ov21_021D4DA0 - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #9 - blt _021DC2C0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DC358: .word 0x000002B9 - thumb_func_end ov21_021DC2A4 - - thumb_func_start ov21_021DC35C -ov21_021DC35C: ; 0x021DC35C - ldr r1, _021DC364 ; =0x0000FFFF - add r0, #0x84 - str r1, [r0, #0] - bx lr - ; .align 2, 0 -_021DC364: .word 0x0000FFFF - thumb_func_end ov21_021DC35C - - thumb_func_start ov21_021DC368 -ov21_021DC368: ; 0x021DC368 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021DC3BC - ldr r2, [r5, #0x24] - ldr r3, [r5, #0x28] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DC380 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DC368 - - thumb_func_start ov21_021DC380 -ov21_021DC380: ; 0x021DC380 - push {r3, lr} - cmp r2, #3 - bhi _021DC3BA - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DC392: ; jump table - .short _021DC39A - _021DC392 - 2 ; case 0 - .short _021DC3A0 - _021DC392 - 2 ; case 1 - .short _021DC3A6 - _021DC392 - 2 ; case 2 - .short _021DC3B6 - _021DC392 - 2 ; case 3 -_021DC39A: - bl ov21_021DC48C - pop {r3, pc} -_021DC3A0: - bl ov21_021DC4F8 - pop {r3, pc} -_021DC3A6: - cmp r3, #0 - bne _021DC3B0 - bl ov21_021DC57C - pop {r3, pc} -_021DC3B0: - bl ov21_021DC600 - pop {r3, pc} -_021DC3B6: - bl ov21_021DC720 -_021DC3BA: - pop {r3, pc} - thumb_func_end ov21_021DC380 - - thumb_func_start ov21_021DC3BC -ov21_021DC3BC: ; 0x021DC3BC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r4, r1, #0 - cmp r0, #5 - bhi _021DC47A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC3D6: ; jump table - .short _021DC3E2 - _021DC3D6 - 2 ; case 0 - .short _021DC3F2 - _021DC3D6 - 2 ; case 1 - .short _021DC40C - _021DC3D6 - 2 ; case 2 - .short _021DC426 - _021DC3D6 - 2 ; case 3 - .short _021DC448 - _021DC3D6 - 2 ; case 4 - .short _021DC462 - _021DC3D6 - 2 ; case 5 -_021DC3E2: - ldr r0, [r4, #8] - mov r1, #0 - bl ov21_021D86C4 - ldr r0, _021DC484 ; =0x000005DD - bl sub_02005748 - b _021DC47A -_021DC3F2: - ldr r0, [r4, #8] - bl ov21_021D863C - cmp r0, #0 - beq _021DC47A - ldr r0, [r4, #8] - mov r1, #0 - bl ov21_021D8628 - ldr r0, _021DC484 ; =0x000005DD - bl sub_02005748 - b _021DC47A -_021DC40C: - ldr r0, [r4, #8] - bl ov21_021D863C - cmp r0, #1 - beq _021DC47A - ldr r0, [r4, #8] - mov r1, #1 - bl ov21_021D8628 - ldr r0, _021DC484 ; =0x000005DD - bl sub_02005748 - b _021DC47A -_021DC426: - ldr r0, [r4, #8] - bl ov21_021D863C - cmp r0, #2 - beq _021DC47A - ldr r0, [r4, #8] - mov r1, #2 - bl ov21_021D8628 - ldr r0, _021DC484 ; =0x000005DD - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - add r0, #0x88 - str r1, [r0, #0] - b _021DC47A -_021DC448: - ldr r0, [r4, #8] - bl ov21_021D863C - cmp r0, #3 - beq _021DC47A - ldr r0, [r4, #8] - mov r1, #3 - bl ov21_021D8628 - ldr r0, _021DC484 ; =0x000005DD - bl sub_02005748 - b _021DC47A -_021DC462: - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - cmp r0, #1 - bgt _021DC47A - ldr r0, [r4, #8] - mov r1, #1 - bl ov21_021D86C4 - ldr r0, _021DC484 ; =0x000005DD - bl sub_02005748 -_021DC47A: - ldr r0, _021DC488 ; =0x0000FFFF - add r5, #0x80 - str r0, [r5, #0] - pop {r3, r4, r5, pc} - nop -_021DC484: .word 0x000005DD -_021DC488: .word 0x0000FFFF - thumb_func_end ov21_021DC3BC - - thumb_func_start ov21_021DC48C -ov21_021DC48C: ; 0x021DC48C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r6, r1, #0 - mov r4, #0x64 - cmp r0, #5 - bhi _021DC4CA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC4A8: ; jump table - .short _021DC4B4 - _021DC4A8 - 2 ; case 0 - .short _021DC4B8 - _021DC4A8 - 2 ; case 1 - .short _021DC4BC - _021DC4A8 - 2 ; case 2 - .short _021DC4C0 - _021DC4A8 - 2 ; case 3 - .short _021DC4C4 - _021DC4A8 - 2 ; case 4 - .short _021DC4C8 - _021DC4A8 - 2 ; case 5 -_021DC4B4: - mov r4, #0 - b _021DC4CA -_021DC4B8: - mov r4, #1 - b _021DC4CA -_021DC4BC: - mov r4, #2 - b _021DC4CA -_021DC4C0: - mov r4, #3 - b _021DC4CA -_021DC4C4: - mov r4, #4 - b _021DC4CA -_021DC4C8: - mov r4, #5 -_021DC4CA: - cmp r4, #0x64 - beq _021DC4E6 - ldr r0, [r6, #8] - bl ov21_021D8658 - cmp r4, r0 - beq _021DC4E6 - ldr r0, _021DC4F0 ; =0x000005DD - bl sub_02005748 - ldr r0, [r6, #8] - add r1, r4, #0 - bl ov21_021D8644 -_021DC4E6: - ldr r0, _021DC4F4 ; =0x0000FFFF - add r5, #0x84 - str r0, [r5, #0] - pop {r4, r5, r6, pc} - nop -_021DC4F0: .word 0x000005DD -_021DC4F4: .word 0x0000FFFF - thumb_func_end ov21_021DC48C - - thumb_func_start ov21_021DC4F8 -ov21_021DC4F8: ; 0x021DC4F8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r6, r1, #0 - mov r4, #0x64 - cmp r0, #9 - bhi _021DC54E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC514: ; jump table - .short _021DC528 - _021DC514 - 2 ; case 0 - .short _021DC52C - _021DC514 - 2 ; case 1 - .short _021DC530 - _021DC514 - 2 ; case 2 - .short _021DC534 - _021DC514 - 2 ; case 3 - .short _021DC538 - _021DC514 - 2 ; case 4 - .short _021DC53C - _021DC514 - 2 ; case 5 - .short _021DC540 - _021DC514 - 2 ; case 6 - .short _021DC544 - _021DC514 - 2 ; case 7 - .short _021DC548 - _021DC514 - 2 ; case 8 - .short _021DC54C - _021DC514 - 2 ; case 9 -_021DC528: - mov r4, #1 - b _021DC54E -_021DC52C: - mov r4, #2 - b _021DC54E -_021DC530: - mov r4, #3 - b _021DC54E -_021DC534: - mov r4, #4 - b _021DC54E -_021DC538: - mov r4, #5 - b _021DC54E -_021DC53C: - mov r4, #6 - b _021DC54E -_021DC540: - mov r4, #7 - b _021DC54E -_021DC544: - mov r4, #8 - b _021DC54E -_021DC548: - mov r4, #9 - b _021DC54E -_021DC54C: - mov r4, #0 -_021DC54E: - cmp r4, #0x64 - beq _021DC56A - ldr r0, [r6, #8] - bl ov21_021D8674 - cmp r4, r0 - beq _021DC56A - ldr r0, _021DC574 ; =0x000005DD - bl sub_02005748 - ldr r0, [r6, #8] - add r1, r4, #0 - bl ov21_021D8660 -_021DC56A: - ldr r0, _021DC578 ; =0x0000FFFF - add r5, #0x84 - str r0, [r5, #0] - pop {r4, r5, r6, pc} - nop -_021DC574: .word 0x000005DD -_021DC578: .word 0x0000FFFF - thumb_func_end ov21_021DC4F8 - - thumb_func_start ov21_021DC57C -ov21_021DC57C: ; 0x021DC57C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r6, r1, #0 - mov r4, #0x64 - cmp r0, #0xa - bhi _021DC5E0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC598: ; jump table - .short _021DC5AE - _021DC598 - 2 ; case 0 - .short _021DC5B2 - _021DC598 - 2 ; case 1 - .short _021DC5B6 - _021DC598 - 2 ; case 2 - .short _021DC5BA - _021DC598 - 2 ; case 3 - .short _021DC5BE - _021DC598 - 2 ; case 4 - .short _021DC5C2 - _021DC598 - 2 ; case 5 - .short _021DC5C6 - _021DC598 - 2 ; case 6 - .short _021DC5CA - _021DC598 - 2 ; case 7 - .short _021DC5CE - _021DC598 - 2 ; case 8 - .short _021DC5D2 - _021DC598 - 2 ; case 9 - .short _021DC5D6 - _021DC598 - 2 ; case 10 -_021DC5AE: - mov r4, #1 - b _021DC5E0 -_021DC5B2: - mov r4, #2 - b _021DC5E0 -_021DC5B6: - mov r4, #3 - b _021DC5E0 -_021DC5BA: - mov r4, #4 - b _021DC5E0 -_021DC5BE: - mov r4, #5 - b _021DC5E0 -_021DC5C2: - mov r4, #6 - b _021DC5E0 -_021DC5C6: - mov r4, #7 - b _021DC5E0 -_021DC5CA: - mov r4, #8 - b _021DC5E0 -_021DC5CE: - mov r4, #9 - b _021DC5E0 -_021DC5D2: - mov r4, #0 - b _021DC5E0 -_021DC5D6: - mov r0, #1 - str r0, [r5, #0x20] - ldr r0, _021DC5F8 ; =0x000005DD - bl sub_02005748 -_021DC5E0: - cmp r4, #0x64 - beq _021DC5EE - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DC67C -_021DC5EE: - ldr r0, _021DC5FC ; =0x0000FFFF - add r5, #0x84 - str r0, [r5, #0] - pop {r4, r5, r6, pc} - nop -_021DC5F8: .word 0x000005DD -_021DC5FC: .word 0x0000FFFF - thumb_func_end ov21_021DC57C - - thumb_func_start ov21_021DC600 -ov21_021DC600: ; 0x021DC600 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r6, r1, #0 - mov r4, #0x64 - cmp r0, #9 - bhi _021DC65E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC61C: ; jump table - .short _021DC630 - _021DC61C - 2 ; case 0 - .short _021DC634 - _021DC61C - 2 ; case 1 - .short _021DC638 - _021DC61C - 2 ; case 2 - .short _021DC63C - _021DC61C - 2 ; case 3 - .short _021DC640 - _021DC61C - 2 ; case 4 - .short _021DC644 - _021DC61C - 2 ; case 5 - .short _021DC648 - _021DC61C - 2 ; case 6 - .short _021DC64C - _021DC61C - 2 ; case 7 - .short _021DC650 - _021DC61C - 2 ; case 8 - .short _021DC654 - _021DC61C - 2 ; case 9 -_021DC630: - mov r4, #0xa - b _021DC65E -_021DC634: - mov r4, #0xb - b _021DC65E -_021DC638: - mov r4, #0xc - b _021DC65E -_021DC63C: - mov r4, #0xd - b _021DC65E -_021DC640: - mov r4, #0xe - b _021DC65E -_021DC644: - mov r4, #0xf - b _021DC65E -_021DC648: - mov r4, #0x10 - b _021DC65E -_021DC64C: - mov r4, #0x11 - b _021DC65E -_021DC650: - mov r4, #0 - b _021DC65E -_021DC654: - mov r0, #0 - str r0, [r5, #0x20] - ldr r0, _021DC674 ; =0x000005DD - bl sub_02005748 -_021DC65E: - cmp r4, #0x64 - beq _021DC66C - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DC67C -_021DC66C: - ldr r0, _021DC678 ; =0x0000FFFF - add r5, #0x84 - str r0, [r5, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DC674: .word 0x000005DD -_021DC678: .word 0x0000FFFF - thumb_func_end ov21_021DC600 - - thumb_func_start ov21_021DC67C -ov21_021DC67C: ; 0x021DC67C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - ldr r0, [r4, #8] - beq _021DC6DC - mov r1, #0 - bl ov21_021D8698 - cmp r6, r0 - beq _021DC718 - ldr r0, [r4, #8] - mov r1, #1 - bl ov21_021D8698 - cmp r6, r0 - beq _021DC718 - add r1, r5, #0 - add r1, #0x88 - ldr r0, [r4, #8] - ldr r1, [r1, #0] - bl ov21_021D8698 - cmp r6, r0 - beq _021DC718 - add r2, r5, #0 - add r2, #0x88 - ldr r0, [r4, #8] - ldr r2, [r2, #0] - add r1, r6, #0 - bl ov21_021D867C - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - add r5, #0x88 - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - str r0, [r5, #0] - ldr r0, _021DC71C ; =0x000005DD - bl sub_02005748 - pop {r4, r5, r6, pc} -_021DC6DC: - mov r1, #0 - bl ov21_021D8698 - cmp r0, #0 - ldr r0, [r4, #8] - beq _021DC6F8 - add r1, r6, #0 - mov r2, #0 - bl ov21_021D867C - ldr r0, _021DC71C ; =0x000005DD - bl sub_02005748 - b _021DC712 -_021DC6F8: - mov r1, #1 - bl ov21_021D8698 - cmp r0, #0 - beq _021DC712 - ldr r0, [r4, #8] - add r1, r6, #0 - mov r2, #1 - bl ov21_021D867C - ldr r0, _021DC71C ; =0x000005DD - bl sub_02005748 -_021DC712: - mov r0, #0 - add r5, #0x88 - str r0, [r5, #0] -_021DC718: - pop {r4, r5, r6, pc} - nop -_021DC71C: .word 0x000005DD - thumb_func_end ov21_021DC67C - - thumb_func_start ov21_021DC720 -ov21_021DC720: ; 0x021DC720 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r6, r1, #0 - mov r4, #0x64 - cmp r0, #0xe - bhi _021DC794 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DC73C: ; jump table - .short _021DC75A - _021DC73C - 2 ; case 0 - .short _021DC75E - _021DC73C - 2 ; case 1 - .short _021DC762 - _021DC73C - 2 ; case 2 - .short _021DC766 - _021DC73C - 2 ; case 3 - .short _021DC76A - _021DC73C - 2 ; case 4 - .short _021DC76E - _021DC73C - 2 ; case 5 - .short _021DC772 - _021DC73C - 2 ; case 6 - .short _021DC776 - _021DC73C - 2 ; case 7 - .short _021DC77A - _021DC73C - 2 ; case 8 - .short _021DC77E - _021DC73C - 2 ; case 9 - .short _021DC782 - _021DC73C - 2 ; case 10 - .short _021DC786 - _021DC73C - 2 ; case 11 - .short _021DC78A - _021DC73C - 2 ; case 12 - .short _021DC78E - _021DC73C - 2 ; case 13 - .short _021DC792 - _021DC73C - 2 ; case 14 -_021DC75A: - mov r4, #0xd - b _021DC794 -_021DC75E: - mov r4, #4 - b _021DC794 -_021DC762: - mov r4, #0xc - b _021DC794 -_021DC766: - mov r4, #9 - b _021DC794 -_021DC76A: - mov r4, #8 - b _021DC794 -_021DC76E: - mov r4, #3 - b _021DC794 -_021DC772: - mov r4, #0xa - b _021DC794 -_021DC776: - mov r4, #1 - b _021DC794 -_021DC77A: - mov r4, #6 - b _021DC794 -_021DC77E: - mov r4, #0xb - b _021DC794 -_021DC782: - mov r4, #0xe - b _021DC794 -_021DC786: - mov r4, #2 - b _021DC794 -_021DC78A: - mov r4, #5 - b _021DC794 -_021DC78E: - mov r4, #7 - b _021DC794 -_021DC792: - mov r4, #0 -_021DC794: - cmp r4, #0x64 - beq _021DC7B0 - ldr r0, [r6, #8] - bl ov21_021D86BC - cmp r4, r0 - beq _021DC7B0 - ldr r0, _021DC7B8 ; =0x000005DD - bl sub_02005748 - ldr r0, [r6, #8] - add r1, r4, #0 - bl ov21_021D86A8 -_021DC7B0: - ldr r0, _021DC7BC ; =0x0000FFFF - add r5, #0x84 - str r0, [r5, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DC7B8: .word 0x000005DD -_021DC7BC: .word 0x0000FFFF - thumb_func_end ov21_021DC720 - - thumb_func_start ov21_021DC7C0 -ov21_021DC7C0: ; 0x021DC7C0 - push {r3, r4, r5, lr} - mov r3, #0x4b - lsl r3, r3, #2 - ldr r2, [r0, r3] - cmp r2, #0 - bne _021DC7EC - ldr r2, [r1, #4] - cmp r2, #0 - ble _021DC7F0 - str r2, [r0, r3] - mov r5, #0 - add r2, r3, #4 - str r5, [r0, r2] - add r2, r3, #0 - ldr r4, [r1, #8] - add r2, #8 - add r3, #8 - str r4, [r0, r2] - ldr r0, [r0, r3] - str r5, [r0, #0] - str r5, [r1, #4] - pop {r3, r4, r5, pc} -_021DC7EC: - bl ov21_021DC7F4 -_021DC7F0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DC7C0 - - thumb_func_start ov21_021DC7F4 -ov21_021DC7F4: ; 0x021DC7F4 - push {r4, lr} - sub sp, #8 - mov r3, #0x4b - add r4, r0, #0 - lsl r3, r3, #2 - ldr r1, [r4, r3] - cmp r1, #0 - beq _021DC8A6 - add r0, r3, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021DC814 - cmp r0, #1 - beq _021DC866 - add sp, #8 - pop {r4, pc} -_021DC814: - cmp r1, #1 - bne _021DC82E - mov r1, #0 - str r1, [sp] - mov r0, #2 - sub r3, #0x20 - str r0, [sp, #4] - add r0, r4, r3 - mov r2, #0x10 - add r3, r1, #0 - bl ov21_021D2648 - b _021DC842 -_021DC82E: - mov r2, #0 - str r2, [sp] - mov r0, #2 - sub r3, #0x20 - str r0, [sp, #4] - add r0, r4, r3 - mov r1, #0x10 - add r3, r2, #0 - bl ov21_021D2648 -_021DC842: - mov r0, #0x43 - lsl r0, r0, #2 - ldr r3, [r4, r0] - mov r0, #0x10 - sub r0, r0, r3 - str r0, [sp] - ldr r0, _021DC8AC ; =0x04001050 - mov r1, #0 - mov r2, #4 - bl sub_020BF55C - mov r0, #0x13 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add sp, #8 - add r1, r1, #1 - str r1, [r4, r0] - pop {r4, pc} -_021DC866: - sub r3, #0x20 - add r0, r4, r3 - bl ov21_021D2664 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r3, [r4, r1] - mov r2, #0x10 - sub r2, r2, r3 - lsl r2, r2, #8 - orr r3, r2 - ldr r2, _021DC8B0 ; =0x04001052 - cmp r0, #1 - strh r3, [r2] - bne _021DC8A6 - add r1, #0x20 - ldr r0, [r4, r1] - cmp r0, #1 - bne _021DC892 - mov r1, #0 - sub r0, r2, #2 - strh r1, [r0] -_021DC892: - mov r1, #0x4d - lsl r1, r1, #2 - ldr r0, [r4, r1] - mov r2, #1 - str r2, [r0, #0] - sub r0, r1, #4 - mov r2, #0 - str r2, [r4, r0] - sub r1, #8 - str r2, [r4, r1] -_021DC8A6: - add sp, #8 - pop {r4, pc} - nop -_021DC8AC: .word 0x04001050 -_021DC8B0: .word 0x04001052 - thumb_func_end ov21_021DC7F4 - - thumb_func_start ov21_021DC8B4 -ov21_021DC8B4: ; 0x021DC8B4 - push {r3, lr} - cmp r2, #2 - bne _021DC8CA - cmp r3, #0 - bne _021DC8C4 - bl ov21_021DC90C - pop {r3, pc} -_021DC8C4: - bl ov21_021DC93C - pop {r3, pc} -_021DC8CA: - bl ov21_021DC8D0 - pop {r3, pc} - thumb_func_end ov21_021DC8B4 - - thumb_func_start ov21_021DC8D0 -ov21_021DC8D0: ; 0x021DC8D0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r6, #0 -_021DC8D8: - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021DC8E4 - add r1, r4, #0 - bl sub_02021FE0 -_021DC8E4: - ldr r0, [r5, #0x6c] - cmp r0, #0 - beq _021DC8F2 - ldr r0, [r0, #0] - add r1, r4, #0 - bl sub_02012AF0 -_021DC8F2: - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DC902 - add r1, r4, #0 - bl sub_02021FE0 -_021DC902: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #0xf - blt _021DC8D8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DC8D0 - - thumb_func_start ov21_021DC90C -ov21_021DC90C: ; 0x021DC90C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_021DC914: - cmp r4, #0xa - beq _021DC932 - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021DC924 - add r1, r6, #0 - bl sub_02021FE0 -_021DC924: - ldr r0, [r5, #0x6c] - cmp r0, #0 - beq _021DC932 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_02012AF0 -_021DC932: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _021DC914 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DC90C - - thumb_func_start ov21_021DC93C -ov21_021DC93C: ; 0x021DC93C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_021DC944: - cmp r4, #9 - beq _021DC962 - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _021DC954 - add r1, r6, #0 - bl sub_02021FE0 -_021DC954: - ldr r0, [r5, #0x6c] - cmp r0, #0 - beq _021DC962 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_02012AF0 -_021DC962: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xf - blt _021DC944 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DC93C - - thumb_func_start ov21_021DC96C -ov21_021DC96C: ; 0x021DC96C - push {r3, r4, lr} - sub sp, #4 - add r4, r2, #0 - ldr r0, [r4, #8] - bl ov21_021D86E0 - cmp r0, #4 - bne _021DC9B8 - ldr r0, [r4, #8] - bl ov21_021D86D8 - cmp r0, #3 - bne _021DC99C - mov r1, #0 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #4 - sub r2, #0x10 - mov r3, #0x3f - bl sub_0200AAE0 - add sp, #4 - pop {r3, r4, pc} -_021DC99C: - ldr r0, [r4, #8] - bl ov21_021D86D8 - cmp r0, #1 - bne _021DC9B8 - mov r0, #2 - str r0, [sp] - mov r0, #4 - add r1, r0, #0 - sub r1, #0x14 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 -_021DC9B8: - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021DC96C - - thumb_func_start ov21_021DC9BC -ov21_021DC9BC: ; 0x021DC9BC - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - bl ov21_021DCA5C - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021DCAA0 - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0x20] - bl ov21_021DCAF4 - str r0, [r5, #0x24] - ldr r0, _021DC9FC ; =ov21_021DCAF8 - str r0, [r5, #8] - ldr r0, _021DCA00 ; =ov21_021DCB6C - str r0, [r5, #0xc] - ldr r0, _021DCA04 ; =ov21_021DCBA8 - str r0, [r5, #0x10] - ldr r0, _021DCA08 ; =ov21_021DCBD8 - str r0, [r5, #0x14] - ldr r0, _021DCA0C ; =ov21_021DCCD8 - str r0, [r5, #0x18] - ldr r0, _021DCA10 ; =ov21_021DCD04 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DC9FC: .word ov21_021DCAF8 -_021DCA00: .word ov21_021DCB6C -_021DCA04: .word ov21_021DCBA8 -_021DCA08: .word ov21_021DCBD8 -_021DCA0C: .word ov21_021DCCD8 -_021DCA10: .word ov21_021DCD04 - thumb_func_end ov21_021DC9BC - - thumb_func_start ov21_021DCA14 -ov21_021DCA14: ; 0x021DCA14 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021DCACC - ldr r0, [r4, #4] - bl ov21_021DCAE0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCA14 - - thumb_func_start ov21_021DCA28 -ov21_021DCA28: ; 0x021DCA28 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DCA28 - - thumb_func_start ov21_021DCA30 -ov21_021DCA30: ; 0x021DCA30 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r0, #0] - cmp r5, #3 - blt _021DCA3E - bl sub_02022974 -_021DCA3E: - str r5, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCA30 - - thumb_func_start ov21_021DCA44 -ov21_021DCA44: ; 0x021DCA44 - ldr r0, [r0, #4] - str r1, [r0, #4] - str r2, [r0, #8] - bx lr - thumb_func_end ov21_021DCA44 - - thumb_func_start ov21_021DCA4C -ov21_021DCA4C: ; 0x021DCA4C - ldr r0, [r0, #4] - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DCA4C - - thumb_func_start ov21_021DCA54 -ov21_021DCA54: ; 0x021DCA54 - ldr r0, [r0, #4] - str r1, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DCA54 - - thumb_func_start ov21_021DCA5C -ov21_021DCA5C: ; 0x021DCA5C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021DCA6E - bl sub_02022974 -_021DCA6E: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCA5C - - thumb_func_start ov21_021DCAA0 -ov21_021DCAA0: ; 0x021DCAA0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - bne _021DCAB2 - bl sub_02022974 -_021DCAB2: - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_021DCAB8: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021DCAB8 - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DCAA0 - - thumb_func_start ov21_021DCACC -ov21_021DCACC: ; 0x021DCACC - push {r4, lr} - add r4, r0, #0 - bne _021DCAD6 - bl sub_02022974 -_021DCAD6: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCACC - - thumb_func_start ov21_021DCAE0 -ov21_021DCAE0: ; 0x021DCAE0 - push {r4, lr} - add r4, r0, #0 - bne _021DCAEA - bl sub_02022974 -_021DCAEA: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCAE0 - - thumb_func_start ov21_021DCAF4 -ov21_021DCAF4: ; 0x021DCAF4 - mov r0, #0 - bx lr - thumb_func_end ov21_021DCAF4 - - thumb_func_start ov21_021DCAF8 -ov21_021DCAF8: ; 0x021DCAF8 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #4] - add r5, r1, #0 - mov r1, #0x34 - bl sub_02018144 - add r4, r0, #0 - bne _021DCB0E - bl sub_02022974 -_021DCB0E: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - str r4, [r6, #8] - ldr r1, [r5, #0] - ldr r0, _021DCB68 ; =0x00001744 - ldr r0, [r1, r0] - cmp r0, #0 - bne _021DCB2A - mov r0, #0 - str r0, [r5, #4] - b _021DCB3A -_021DCB2A: - sub r0, r0, #1 - cmp r0, #1 - bhi _021DCB36 - mov r0, #1 - str r0, [r5, #4] - b _021DCB3A -_021DCB36: - mov r0, #2 - str r0, [r5, #4] -_021DCB3A: - add r2, r4, #0 - ldr r0, [r6, #4] - add r1, r5, #0 - add r2, #0xc - bl ov21_021DD900 - str r0, [r4, #4] - add r2, r4, #0 - ldr r0, [r6, #4] - add r1, r5, #0 - add r2, #0x10 - bl ov21_021DD908 - str r0, [r4, #8] - ldr r2, [r6, #4] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021DDABC - ldr r0, [r5, #4] - str r0, [r4, #0] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DCB68: .word 0x00001744 - thumb_func_end ov21_021DCAF8 - - thumb_func_start ov21_021DCB6C -ov21_021DCB6C: ; 0x021DCB6C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r6, r1, #0 - ldr r4, [r5, #8] - cmp r0, #1 - bne _021DCB7E - mov r0, #1 - pop {r4, r5, r6, pc} -_021DCB7E: - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _021DCB88 - mov r0, #0 - pop {r4, r5, r6, pc} -_021DCB88: - ldr r1, [r4, #0] - ldr r0, [r6, #4] - cmp r1, r0 - beq _021DCBA4 - add r0, r4, #0 - bl ov21_021DDB68 - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DDABC - ldr r0, [r6, #4] - str r0, [r4, #0] -_021DCBA4: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DCB6C - - thumb_func_start ov21_021DCBA8 -ov21_021DCBA8: ; 0x021DCBA8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r5, [r4, #8] - ldr r0, [r5, #4] - cmp r0, #0 - beq _021DCBB8 - bl sub_020181C4 -_021DCBB8: - ldr r0, [r5, #8] - cmp r0, #0 - beq _021DCBC2 - bl sub_020181C4 -_021DCBC2: - add r0, r5, #0 - bl ov21_021DDB68 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCBA8 - - thumb_func_start ov21_021DCBD8 -ov21_021DCBD8: ; 0x021DCBD8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r3, #8] - add r4, r1, #0 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021DCCC6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DCBFA: ; jump table - .short _021DCC02 - _021DCBFA - 2 ; case 0 - .short _021DCC3A - _021DCBFA - 2 ; case 1 - .short _021DCC92 - _021DCBFA - 2 ; case 2 - .short _021DCCBA - _021DCBFA - 2 ; case 3 -_021DCC02: - ldr r0, [r4, #4] - ldr r1, _021DCCCC ; =0x00000844 - bl sub_02018144 - ldr r2, _021DCCCC ; =0x00000844 - str r0, [r4, #8] - mov r1, #0 - bl sub_020D5124 - ldr r5, [r4, #8] - ldr r0, [r7, #4] - mov r1, #0 - str r0, [r5, #0] - ldr r0, [r4, #4] - bl ov21_021D5868 - ldr r1, _021DCCD0 ; =0x00000804 - str r0, [r5, r1] - ldr r0, [r4, #4] - mov r1, #0 - bl ov21_021D5890 - ldr r1, _021DCCD4 ; =0x00000808 - str r0, [r5, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCCC6 -_021DCC3A: - ldr r0, [r4, #4] - ldr r3, [sp, #4] - str r0, [sp] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021DCDD0 - ldr r0, [r4, #8] - ldr r2, [sp, #4] - ldr r3, [r4, #4] - add r1, r7, #0 - bl ov21_021DD710 - ldr r0, [r4, #8] - ldr r1, [sp, #4] - bl ov21_021DD9E8 - add r0, r6, #0 - bl ov21_021DDB8C - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021DD964 - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _021DCC7E - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DD490 - b _021DCC8A -_021DCC7E: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DD554 -_021DCC8A: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCCC6 -_021DCC92: - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _021DCCA4 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021DD508 - b _021DCCAE -_021DCCA4: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021DD5E4 -_021DCCAE: - cmp r0, #0 - beq _021DCCC6 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCCC6 -_021DCCBA: - add r0, r6, #0 - bl ov21_021DDBCC - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DCCC6: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DCCCC: .word 0x00000844 -_021DCCD0: .word 0x00000804 -_021DCCD4: .word 0x00000808 - thumb_func_end ov21_021DCBD8 - - thumb_func_start ov21_021DCCD8 -ov21_021DCCD8: ; 0x021DCCD8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #8] - add r7, r2, #0 - ldr r4, [r3, #8] - str r0, [sp, #4] - bl ov21_021DDC14 - ldr r0, [r5, #4] - add r1, r6, #0 - str r0, [sp] - ldr r0, [sp, #4] - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021DDA80 - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DCCD8 - - thumb_func_start ov21_021DCD04 -ov21_021DCD04: ; 0x021DCD04 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r5, [r4, #8] - cmp r0, #4 - bhi _021DCDC4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DCD20: ; jump table - .short _021DCD2A - _021DCD20 - 2 ; case 0 - .short _021DCD58 - _021DCD20 - 2 ; case 1 - .short _021DCD80 - _021DCD20 - 2 ; case 2 - .short _021DCD96 - _021DCD20 - 2 ; case 3 - .short _021DCDC0 - _021DCD20 - 2 ; case 4 -_021DCD2A: - add r0, r5, #0 - bl ov21_021DDB8C - ldr r0, [r6, #0xc] - cmp r0, #0 - bne _021DCD44 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021DD490 - b _021DCD50 -_021DCD44: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021DD554 -_021DCD50: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCDC4 -_021DCD58: - ldr r0, [r6, #0xc] - cmp r0, #0 - bne _021DCD6A - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0 - bl ov21_021DD508 - b _021DCD74 -_021DCD6A: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0 - bl ov21_021DD5E4 -_021DCD74: - cmp r0, #0 - beq _021DCDC4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCDC4 -_021DCD80: - add r0, r5, #0 - bl ov21_021DD8B4 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021DCE20 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCDC4 -_021DCD96: - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DCDC8 ; =0x00000804 - ldr r0, [r5, r0] - bl sub_020181C4 - ldr r0, _021DCDCC ; =0x00000808 - ldr r0, [r5, r0] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DCDC4 -_021DCDC0: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DCDC4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DCDC8: .word 0x00000804 -_021DCDCC: .word 0x00000808 - thumb_func_end ov21_021DCD04 - - thumb_func_start ov21_021DCDD0 -ov21_021DCDD0: ; 0x021DCDD0 - push {r3, r4, r5, r6, r7, lr} - ldr r6, [sp, #0x18] - add r7, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - add r2, r6, #0 - bl ov21_021DCE40 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DD668 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DCFC8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DD1A8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov21_021DD2E0 - ldr r1, [r7, #4] - add r0, r5, #0 - bl ov21_021DDA48 - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021DDCF4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DCDD0 - - thumb_func_start ov21_021DCE20 -ov21_021DCE20: ; 0x021DCE20 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021DD6C0 - add r0, r5, #0 - bl ov21_021DD3FC - add r0, r5, #0 - bl ov21_021DD2B8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DD114 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DCE20 - - thumb_func_start ov21_021DCE40 -ov21_021DCE40: ; 0x021DCE40 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r4, r2, #0 - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x40 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r7, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 - ldr r1, [r6, #0] - ldr r0, _021DCFB8 ; =0x00001764 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021DCEDE - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x41 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r7, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #8 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0xd - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 -_021DCEDE: - ldr r1, [r6, #0] - ldr r0, _021DCFBC ; =0x0000176C - ldr r0, [r1, r0] - cmp r0, #0 - beq _021DCF22 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x42 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r7, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #7 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0x1c - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 -_021DCF22: - ldr r1, [r6, #0] - ldr r0, _021DCFC0 ; =0x00001760 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021DCF66 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x43 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r7, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #8 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0xb - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 -_021DCF66: - ldr r1, [r6, #0] - ldr r0, _021DCFC4 ; =0x00001768 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021DCFAA - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x44 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r4, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #0x10 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0x19 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 -_021DCFAA: - ldr r0, [r5, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DCFB8: .word 0x00001764 -_021DCFBC: .word 0x0000176C -_021DCFC0: .word 0x00001760 -_021DCFC4: .word 0x00001768 - thumb_func_end ov21_021DCE40 - - thumb_func_start ov21_021DCFC8 -ov21_021DCFC8: ; 0x021DCFC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021DD0F8 ; =0x000017DC - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x6c - bl sub_02009A4C - add r1, r5, #0 - add r1, #0xb4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - bl sub_0200A3DC - add r0, r5, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - bl sub_02009D4C - ldr r0, _021DD0FC ; =0x000017DA - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x6a - mov r3, #1 - bl sub_02009BC4 - add r1, r5, #0 - add r1, #0xbc - str r0, [r1, #0] - ldr r0, _021DD100 ; =0x000017DB - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x6b - mov r3, #1 - bl sub_02009BC4 - add r1, r5, #0 - add r1, #0xc0 - str r0, [r1, #0] - ldr r0, _021DD104 ; =0x000017CD - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x5d - bl sub_02009A4C - add r1, r5, #0 - add r1, #0xd0 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_0200A3DC - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_02009D4C - ldr r0, _021DD108 ; =0x0000177E - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xe - mov r3, #0 - bl sub_02009B04 - add r1, r5, #0 - add r1, #0xd4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl sub_0200A640 - add r0, r5, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl sub_02009D4C - ldr r0, _021DD10C ; =0x000017CB - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5b - mov r3, #1 - bl sub_02009BC4 - add r1, r5, #0 - add r1, #0xd8 - str r0, [r1, #0] - ldr r0, _021DD110 ; =0x000017CC - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5c - mov r3, #1 - bl sub_02009BC4 - add r5, #0xdc - str r0, [r5, #0] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD0F8: .word 0x000017DC -_021DD0FC: .word 0x000017DA -_021DD100: .word 0x000017DB -_021DD104: .word 0x000017CD -_021DD108: .word 0x0000177E -_021DD10C: .word 0x000017CB -_021DD110: .word 0x000017CC - thumb_func_end ov21_021DCFC8 - - thumb_func_start ov21_021DD114 -ov21_021DD114: ; 0x021DD114 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #5 - add r1, r5, #0 - lsl r0, r0, #6 - add r1, #0xb4 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x52 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xbc - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x53 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xc0 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_0200A4E4 - add r0, r5, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - bl sub_0200A6DC - mov r0, #5 - add r1, r5, #0 - lsl r0, r0, #6 - add r1, #0xd0 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x51 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xd4 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x52 - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xd8 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - add r5, #0xdc - ldr r0, [r4, r0] - ldr r1, [r5, #0] - bl sub_02009D68 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DD114 - - thumb_func_start ov21_021DD1A8 -ov21_021DD1A8: ; 0x021DD1A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021DD2B0 ; =0x000017CC - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r2, #0x4e - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x44] - mov r0, #0xa - lsl r0, r0, #0x10 - str r0, [sp, #0x34] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r6, [sp, #0x48] - bl sub_02021B90 - add r1, r5, #0 - add r1, #0xc8 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_02021D6C - ldr r3, _021DD2B4 ; =0x000017DB - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #5 - str r1, [sp, #0x10] - lsl r0, r0, #6 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r2, #0x5d - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r4, #0 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x44] - str r6, [sp, #0x48] - str r4, [sp, #0x34] - str r4, [sp, #0x38] - add r6, sp, #0x2c - add r7, r4, #0 -_021DD28E: - add r0, r6, #0 - bl sub_02021B90 - str r0, [r5, #4] - add r1, r7, #0 - bl sub_02021CAC - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021FE0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x2c - blt _021DD28E - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD2B0: .word 0x000017CC -_021DD2B4: .word 0x000017DB - thumb_func_end ov21_021DD1A8 - - thumb_func_start ov21_021DD2B8 -ov21_021DD2B8: ; 0x021DD2B8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_02021BD4 - add r0, r5, #0 - mov r4, #0 - add r0, #0xc8 - str r4, [r0, #0] - add r6, r4, #0 -_021DD2CE: - ldr r0, [r5, #4] - bl sub_02021BD4 - str r6, [r5, #4] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x2c - blt _021DD2CE - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DD2B8 - - thumb_func_start ov21_021DD2E0 -ov21_021DD2E0: ; 0x021DD2E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - add r0, #0xc8 - add r4, r1, #0 - ldr r0, [r0, #0] - add r6, r3, #0 - ldr r7, [r4, #0] - cmp r0, #0 - bne _021DD2F8 - bl sub_02022974 -_021DD2F8: - mov r0, #0x51 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, _021DD3F4 ; =0x0000177E - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r7, r1] - str r1, [sp, #0xc] - mov r1, #0 - bl sub_0200A72C - mov r1, #1 - mov r2, #0x1e - str r0, [sp, #0x14] - str r1, [sp, #0x24] - str r2, [sp, #0x28] - str r1, [sp, #0x2c] - str r6, [sp, #0x30] - bl sub_0201FAB4 - str r0, [sp, #8] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r7, r0] - mov r1, #0x10 - mov r2, #2 - bl ov21_021D4D6C - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r7, r0] - ldr r2, _021DD3F8 ; =0x000002B9 - add r1, r4, #0 - mov r3, #0x23 - bl ov21_021D4DAC - add r1, r5, #0 - lsr r0, r0, #1 - str r4, [sp, #0x10] - add r1, #0xc8 - ldr r1, [r1, #0] - neg r0, r0 - str r0, [sp, #0x1c] - mov r0, #7 - mvn r0, r0 - str r0, [sp, #0x20] - add r0, sp, #0xc - str r1, [sp, #0x18] - bl ov21_021D4CA0 - add r1, r5, #0 - add r1, #0xcc - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - add r1, r1, #2 - bl sub_02012A60 - add r0, r4, #0 - bl ov21_021D4DA0 - mov r6, #0 -_021DD388: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r7, r0] - mov r1, #9 - mov r2, #2 - bl ov21_021D4D6C - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - add r3, r6, #0 - ldr r0, [r7, r0] - ldr r2, _021DD3F8 ; =0x000002B9 - add r1, r4, #0 - add r3, #0x24 - bl ov21_021D4DAC - mov r1, #0 - str r1, [sp, #0x18] - mov r1, #0x48 - sub r0, r1, r0 - lsr r0, r0, #1 - add r0, #8 - str r0, [sp, #0x1c] - mov r0, #0x20 - str r0, [sp, #0x20] - add r0, sp, #0xc - str r4, [sp, #0x10] - bl ov21_021D4CA0 - add r1, r5, #0 - add r1, #0xe0 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - add r1, r1, #2 - bl sub_02012A60 - add r0, r4, #0 - bl ov21_021D4DA0 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _021DD388 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_021DD3F4: .word 0x0000177E -_021DD3F8: .word 0x000002B9 - thumb_func_end ov21_021DD2E0 - - thumb_func_start ov21_021DD3FC -ov21_021DD3FC: ; 0x021DD3FC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xcc - ldr r0, [r0, #0] - bl ov21_021D4D1C - mov r4, #0 -_021DD40A: - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - bl ov21_021D4D1C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DD40A - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DD3FC - - thumb_func_start ov21_021DD420 -ov21_021DD420: ; 0x021DD420 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021FE0 - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02012AF0 - mov r4, #0 - mov r6, #1 -_021DD440: - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DD440 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DD420 - - thumb_func_start ov21_021DD458 -ov21_021DD458: ; 0x021DD458 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021FE0 - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - mov r4, #0 - add r6, r4, #0 -_021DD478: - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DD478 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DD458 - - thumb_func_start ov21_021DD490 -ov21_021DD490: ; 0x021DD490 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021DD420 - ldr r0, [r4, #8] - bl ov21_021E2A54 - cmp r0, #0 - beq _021DD4F6 - cmp r6, #0 - beq _021DD4D2 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - b _021DD4F6 -_021DD4D2: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021DD4F6: - mov r1, #0x5b - ldr r0, [r5, #0] - lsl r1, r1, #2 - add r1, r0, r1 - bl ov21_021D24FC - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DD490 - - thumb_func_start ov21_021DD508 -ov21_021DD508: ; 0x021DD508 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021DD528 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021DD532 -_021DD528: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021DD532: - cmp r0, #0 - beq _021DD544 - cmp r4, #0 - beq _021DD540 - add r0, r6, #0 - bl ov21_021DD458 -_021DD540: - mov r0, #1 - pop {r4, r5, r6, pc} -_021DD544: - mov r1, #0x5b - ldr r0, [r5, #0] - lsl r1, r1, #2 - add r1, r0, r1 - bl ov21_021D24FC - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DD508 - - thumb_func_start ov21_021DD554 -ov21_021DD554: ; 0x021DD554 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - bl ov21_021DD420 - cmp r4, #0 - bne _021DD57E - ldr r0, [r5, #8] - mov r1, #0x28 - str r0, [sp] - ldr r0, [r5, #0x10] - mov r3, #0x78 - str r0, [sp, #4] - ldr r0, _021DD5E0 ; =0x00000814 - ldr r2, [r5, #4] - add r0, r6, r0 - bl ov21_021D2648 -_021DD57E: - ldr r0, [r7, #8] - bl ov21_021E2A54 - cmp r0, #0 - beq _021DD5DC - cmp r4, #0 - beq _021DD5B6 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r2, #0x2f - str r2, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r1, [r5, #0x10] - sub r2, #0x3f - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021DD5B6: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r3, #0x2f - str r3, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r1, [r5, #0x10] - sub r3, #0x3f - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov21_021D23F8 -_021DD5DC: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD5E0: .word 0x00000814 - thumb_func_end ov21_021DD554 - - thumb_func_start ov21_021DD5E4 -ov21_021DD5E4: ; 0x021DD5E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bne _021DD60C - ldr r0, _021DD664 ; =0x00000814 - add r0, r5, r0 - bl ov21_021D2664 - str r0, [sp] - ldr r2, _021DD664 ; =0x00000814 - ldr r0, [r4, #0] - ldr r1, [r5, r2] - add r2, r2, #4 - ldr r2, [r5, r2] - bl ov21_021D2164 - b _021DD610 -_021DD60C: - mov r0, #1 - str r0, [sp] -_021DD610: - ldr r0, [r6, #8] - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r4, #0] - beq _021DD62A - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #4] - b _021DD636 -_021DD62A: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC - str r0, [sp, #4] -_021DD636: - mov r1, #0 - add r2, sp, #0 -_021DD63A: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021DD648 - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #2 - blt _021DD63A -_021DD648: - cmp r1, #2 - bne _021DD65C - cmp r7, #1 - bne _021DD656 - add r0, r5, #0 - bl ov21_021DD458 -_021DD656: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DD65C: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DD664: .word 0x00000814 - thumb_func_end ov21_021DD5E4 - - thumb_func_start ov21_021DD668 -ov21_021DD668: ; 0x021DD668 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r6, r2, #0 - add r0, r0, #4 - mov r1, #0 - bl sub_0201ADA4 - str r6, [sp] - ldr r3, _021DD6B4 ; =0x000007F8 - ldr r0, [r4, #0] - mov r1, #0x1e - mov r2, #1 - add r3, r5, r3 - bl ov21_021D2808 - ldr r1, _021DD6B8 ; =0x000007F4 - mov r2, #1 - str r0, [r5, r1] - str r6, [sp] - lsl r3, r2, #0xb - ldr r0, [r4, #0] - mov r1, #0x1f - add r3, r5, r3 - bl ov21_021D2808 - ldr r1, _021DD6BC ; =0x000007FC - str r0, [r5, r1] - ldr r0, [r4, #0] - mov r1, #8 - add r0, r0, #4 - bl sub_0201C2B4 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021DD6B4: .word 0x000007F8 -_021DD6B8: .word 0x000007F4 -_021DD6BC: .word 0x000007FC - thumb_func_end ov21_021DD668 - - thumb_func_start ov21_021DD6C0 -ov21_021DD6C0: ; 0x021DD6C0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - ldr r0, _021DD708 ; =0x000007F4 - ldr r0, [r5, r0] - bl sub_020181C4 - ldr r1, _021DD708 ; =0x000007F4 - mov r2, #0 - str r2, [r5, r1] - add r0, r1, #4 - add r1, #8 - str r2, [r5, r0] - ldr r0, [r5, r1] - bl sub_020181C4 - ldr r0, _021DD70C ; =0x000007FC - mov r1, #0 - str r1, [r5, r0] - add r0, r0, #4 - str r1, [r5, r0] - ldr r0, [r4, #0] - add r0, r0, #4 - bl sub_0201C2B4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DD708: .word 0x000007F4 -_021DD70C: .word 0x000007FC - thumb_func_end ov21_021DD6C0 - - thumb_func_start ov21_021DD710 -ov21_021DD710: ; 0x021DD710 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r4, r2, #0 - add r6, r0, #0 - str r1, [sp, #0x28] - str r3, [sp, #0x2c] - bl ov21_021DD8B4 - add r0, r4, #0 - add r0, #0x1c - str r0, [sp] - ldr r0, [r4, #4] - mov r1, #0x1e - str r0, [sp, #4] - ldr r0, [r4, #0xc] - ldr r3, _021DD8A4 ; =0x00000808 - str r0, [sp, #8] - add r0, r6, #0 - ldr r3, [r6, r3] - add r0, #0xec - add r2, r1, #0 - bl ov21_021D5948 - ldr r1, _021DD8A8 ; =0x00000838 - str r0, [r6, r1] - ldr r0, [r4, #0x20] - sub r1, r0, #1 - ldr r0, [r4, #0xc] - add r7, r1, r0 - ldr r0, [sp, #0x2c] - add r1, r7, #0 - bl sub_02018184 - add r5, r0, #0 - mov r1, #0 - cmp r7, #0 - ble _021DD776 -_021DD75A: - ldr r2, [r4, #0xc] - cmp r1, r2 - bhs _021DD766 - ldr r0, [r4, #4] - ldrb r0, [r0, r1] - b _021DD76E -_021DD766: - sub r2, r1, r2 - ldr r0, [r4, #0x1c] - lsl r2, r2, #2 - ldr r0, [r0, r2] -_021DD76E: - strb r0, [r5, r1] - add r1, r1, #1 - cmp r1, r7 - blt _021DD75A -_021DD776: - add r0, r4, #0 - add r0, #0x2c - str r0, [sp] - str r5, [sp, #4] - mov r0, #0x47 - lsl r0, r0, #4 - mov r1, #0x1e - ldr r3, _021DD8A4 ; =0x00000808 - str r7, [sp, #8] - ldr r3, [r6, r3] - add r0, r6, r0 - add r2, r1, #0 - bl ov21_021D5948 - mov r1, #0x21 - lsl r1, r1, #6 - str r0, [r6, r1] - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - mov r1, #0x1e - add r0, #0xec - add r2, r1, #0 - bl ov21_021D5214 - mov r0, #0x47 - lsl r0, r0, #4 - mov r1, #0x1e - add r0, r6, r0 - add r2, r1, #0 - bl ov21_021D5214 - ldr r0, [sp, #0x28] - ldr r0, [r0, #0] - bl ov21_021D37BC - ldr r1, _021DD8AC ; =0x0000015D - cmp r0, r1 - bne _021DD7D6 - mov r1, #5 - str r1, [sp, #0x38] - mov r1, #0x5c - str r1, [sp, #0x34] - mov r1, #0xe - mov r0, #4 - str r1, [sp, #0x30] - b _021DD7E4 -_021DD7D6: - mov r1, #1 - str r1, [sp, #0x38] - mov r1, #0x5c - str r1, [sp, #0x34] - mov r1, #0x20 - mov r0, #0 - str r1, [sp, #0x30] -_021DD7E4: - add r1, r6, #0 - mov r2, #0 - add r1, #0xc4 - str r2, [r1, #0] - ldr r1, [sp, #0x30] - ldr r3, [sp, #0x34] - str r1, [sp] - mov r1, #5 - str r1, [sp, #4] - str r1, [sp, #8] - ldr r1, _021DD8B0 ; =0x00000804 - ldr r2, [r6, r1] - add r1, #0x30 - str r2, [sp, #0xc] - add r2, r4, #0 - add r2, #0x14 - str r2, [sp, #0x10] - mov r2, #2 - str r2, [sp, #0x14] - str r0, [sp, #0x18] - ldr r0, [r4, #8] - mov r2, #0x2c - str r0, [sp, #0x1c] - ldr r0, [r4, #0x10] - str r0, [sp, #0x20] - add r0, r6, r1 - add r1, r6, #0 - str r0, [sp, #0x24] - add r1, #0xc4 - ldr r1, [r1, #0] - add r0, r6, #4 - bl ov21_021D5A20 - add r1, r6, #0 - add r1, #0xc4 - str r0, [r1, #0] - ldr r0, [r4, #0x18] - sub r1, r0, #1 - ldr r0, [r4, #0x10] - add r7, r1, r0 - ldr r0, [sp, #0x2c] - add r1, r7, #0 - bl sub_02018184 - add r5, r0, #0 - mov r1, #0 - cmp r7, #0 - ble _021DD860 -_021DD844: - ldr r2, [r4, #0x10] - cmp r1, r2 - bhs _021DD850 - ldr r0, [r4, #8] - ldrb r0, [r0, r1] - b _021DD858 -_021DD850: - sub r2, r1, r2 - ldr r0, [r4, #0x14] - lsl r2, r2, #2 - ldr r0, [r0, r2] -_021DD858: - strb r0, [r5, r1] - add r1, r1, #1 - cmp r1, r7 - blt _021DD844 -_021DD860: - ldr r0, [sp, #0x30] - ldr r1, _021DD8B0 ; =0x00000804 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r6, r1] - add r4, #0x24 - str r0, [sp, #0xc] - str r4, [sp, #0x10] - mov r0, #3 - str r0, [sp, #0x14] - ldr r0, [sp, #0x38] - add r1, #0x38 - str r0, [sp, #0x18] - str r5, [sp, #0x1c] - add r0, r6, r1 - str r7, [sp, #0x20] - add r1, r6, #0 - str r0, [sp, #0x24] - add r1, #0xc4 - ldr r1, [r1, #0] - ldr r3, [sp, #0x34] - add r0, r6, #4 - mov r2, #0x2c - bl ov21_021D5A20 - add r6, #0xc4 - str r0, [r6, #0] - add r0, r5, #0 - bl sub_020181C4 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD8A4: .word 0x00000808 -_021DD8A8: .word 0x00000838 -_021DD8AC: .word 0x0000015D -_021DD8B0: .word 0x00000804 - thumb_func_end ov21_021DD710 - - thumb_func_start ov21_021DD8B4 -ov21_021DD8B4: ; 0x021DD8B4 - push {r3, r4, r5, r6, r7, lr} - mov r2, #0xe1 - add r6, r0, #0 - add r0, #0xec - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - mov r2, #0x47 - lsl r2, r2, #4 - add r0, r6, r2 - mov r1, #0 - sub r2, #0xec - bl sub_020D5124 - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - ble _021DD8F8 - add r5, r6, #0 - add r7, r4, #0 -_021DD8E2: - ldr r0, [r5, #4] - add r1, r7, #0 - bl sub_02021CAC - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _021DD8E2 -_021DD8F8: - mov r0, #0 - add r6, #0xc4 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DD8B4 - - thumb_func_start ov21_021DD900 -ov21_021DD900: ; 0x021DD900 - mov r0, #0 - str r0, [r2, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DD900 - - thumb_func_start ov21_021DD908 -ov21_021DD908: ; 0x021DD908 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - ldr r2, [r5, #0] - ldr r1, _021DD958 ; =0x00001768 - mov r4, #0 - ldr r1, [r2, r1] - cmp r1, #0 - bne _021DD928 - ldr r3, _021DD95C ; =0x021E9D7A - ldr r1, _021DD960 ; =0x0000FFFF -_021DD91E: - add r3, r3, #2 - ldrh r2, [r3] - add r4, r4, #1 - cmp r2, r1 - bne _021DD91E -_021DD928: - cmp r4, #0 - beq _021DD934 - add r1, r4, #0 - bl sub_02018144 - b _021DD936 -_021DD934: - mov r0, #0 -_021DD936: - str r4, [r6, #0] - ldr r3, [r5, #0] - ldr r2, _021DD958 ; =0x00001768 - mov r1, #0 - ldr r2, [r3, r2] - cmp r2, #0 - bne _021DD956 - ldr r4, _021DD95C ; =0x021E9D7A - ldr r2, _021DD960 ; =0x0000FFFF -_021DD948: - ldrh r3, [r4] - add r4, r4, #2 - strb r3, [r0, r1] - ldrh r3, [r4] - add r1, r1, #1 - cmp r3, r2 - bne _021DD948 -_021DD956: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DD958: .word 0x00001768 -_021DD95C: .word 0x021E9D7A -_021DD960: .word 0x0000FFFF - thumb_func_end ov21_021DD908 - - thumb_func_start ov21_021DD964 -ov21_021DD964: ; 0x021DD964 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - mov r0, #2 - lsl r0, r0, #0xa - ldr r3, [r5, r0] - mov r0, #5 - str r0, [sp] - mov r0, #0x47 - lsl r0, r0, #4 - add r0, r5, r0 - str r0, [sp, #4] - mov r1, #0x1e - str r1, [sp, #8] - str r1, [sp, #0xc] - mov r0, #0x59 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - ldrh r2, [r3, #2] - ldr r1, [r3, #0x14] - ldrh r3, [r3] - ldr r0, [r4, #0] - lsl r2, r2, #0x13 - lsl r3, r3, #0x13 - add r0, r0, #4 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl ov21_021D517C - ldr r0, _021DD9E4 ; =0x000007F8 - mov r1, #0x1e - ldr r3, [r5, r0] - mov r0, #5 - str r0, [sp] - add r5, #0xec - str r5, [sp, #4] - str r1, [sp, #8] - str r1, [sp, #0xc] - mov r0, #0x59 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - ldrh r2, [r3, #2] - ldr r1, [r3, #0x14] - ldrh r3, [r3] - ldr r0, [r4, #0] - lsl r2, r2, #0x13 - lsl r3, r3, #0x13 - add r0, r0, #4 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl ov21_021D517C - ldr r0, [r4, #0] - add r0, r0, #4 - bl sub_0201A954 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DD9E4: .word 0x000007F8 - thumb_func_end ov21_021DD964 - - thumb_func_start ov21_021DD9E8 -ov21_021DD9E8: ; 0x021DD9E8 - push {r4, lr} - ldr r1, _021DDA44 ; =0x00000834 - add r4, r0, #0 - ldr r0, [r4, r1] - cmp r0, #0 - bne _021DDA28 - add r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021DDA28 - add r0, r1, #0 - add r0, #8 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021DDA28 - add r1, #0xc - ldr r0, [r4, r1] - cmp r0, #0 - bne _021DDA28 - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CAC - add r4, #0xcc - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_020129D0 - pop {r4, pc} -_021DDA28: - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021CAC - add r4, #0xcc - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 - pop {r4, pc} - nop -_021DDA44: .word 0x00000834 - thumb_func_end ov21_021DD9E8 - - thumb_func_start ov21_021DDA48 -ov21_021DDA48: ; 0x021DDA48 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - mov r7, #1 -_021DDA52: - cmp r4, r6 - bne _021DDA66 - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - add r1, r7, #0 - ldr r0, [r0, #0] - bl sub_020129D0 - b _021DDA74 -_021DDA66: - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 -_021DDA74: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DDA52 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DDA48 - - thumb_func_start ov21_021DDA80 -ov21_021DDA80: ; 0x021DDA80 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r2, #0 - add r4, r3, #0 - add r7, r1, #0 - ldr r2, [r5, #0] - ldr r1, [r4, #0] - cmp r2, r1 - beq _021DDAB8 - ldr r3, [sp, #0x18] - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DD710 - add r0, r5, #0 - add r1, r7, #0 - bl ov21_021DD964 - ldr r1, [r6, #4] - add r0, r5, #0 - bl ov21_021DDA48 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DD9E8 - ldr r0, [r4, #0] - str r0, [r5, #0] -_021DDAB8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DDA80 - - thumb_func_start ov21_021DDABC -ov21_021DDABC: ; 0x021DDABC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r6, r2, #0 - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021DDADE - cmp r0, #1 - beq _021DDAE8 - cmp r0, #2 - beq _021DDAF2 - b _021DDAFC -_021DDADE: - mov r0, #0 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp] - b _021DDB00 -_021DDAE8: - mov r0, #1 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp] - b _021DDB00 -_021DDAF2: - mov r0, #2 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp] - b _021DDB00 -_021DDAFC: - bl sub_02022974 -_021DDB00: - add r0, r5, #0 - ldr r2, [sp, #4] - add r0, #0x14 - add r1, r7, #0 - add r3, r6, #0 - bl ov21_021D57B4 - add r0, r5, #0 - ldr r2, [sp] - add r0, #0x1c - add r1, r7, #0 - add r3, r6, #0 - bl ov21_021D57B4 - ldr r0, [r4, #0] - bl ov21_021D3428 - cmp r0, #0 - bne _021DDB46 - add r0, r5, #0 - add r0, #0x24 - add r1, r7, #0 - mov r2, #3 - add r3, r6, #0 - bl ov21_021D57B4 - add r5, #0x2c - add r0, r5, #0 - add r1, r7, #0 - mov r2, #8 - add r3, r6, #0 - bl ov21_021D57B4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_021DDB46: - add r0, r5, #0 - add r0, #0x24 - add r1, r7, #0 - mov r2, #4 - add r3, r6, #0 - bl ov21_021D57B4 - add r5, #0x2c - add r0, r5, #0 - add r1, r7, #0 - mov r2, #9 - add r3, r6, #0 - bl ov21_021D57B4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DDABC - - thumb_func_start ov21_021DDB68 -ov21_021DDB68: ; 0x021DDB68 - push {r4, lr} - add r4, r0, #0 - add r0, #0x14 - bl ov21_021D5844 - add r0, r4, #0 - add r0, #0x1c - bl ov21_021D5844 - add r0, r4, #0 - add r0, #0x24 - bl ov21_021D5844 - add r4, #0x2c - add r0, r4, #0 - bl ov21_021D5844 - pop {r4, pc} - thumb_func_end ov21_021DDB68 - - thumb_func_start ov21_021DDB8C -ov21_021DDB8C: ; 0x021DDB8C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _021DDBC8 ; =0x0000080C - mov r1, #0 - str r1, [r6, r0] - add r0, r0, #4 - str r1, [r6, r0] - mov r0, #2 - bl sub_0201FF0C - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - ble _021DDBC6 - add r5, r6, #0 - add r7, r4, #0 -_021DDBB0: - ldr r0, [r5, #4] - add r1, r7, #0 - bl sub_02021CAC - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _021DDBB0 -_021DDBC6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DDBC8: .word 0x0000080C - thumb_func_end ov21_021DDB8C - - thumb_func_start ov21_021DDBCC -ov21_021DDBCC: ; 0x021DDBCC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021DDC10 ; =0x04000050 - mov r1, #0xa - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - ble _021DDC0E - add r5, r6, #0 - add r7, r4, #0 -_021DDBF8: - ldr r0, [r5, #4] - add r1, r7, #0 - bl sub_02021CAC - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _021DDBF8 -_021DDC0E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DDC10: .word 0x04000050 - thumb_func_end ov21_021DDBCC - - thumb_func_start ov21_021DDC14 -ov21_021DDC14: ; 0x021DDC14 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021DDCEC ; =0x0000080C - ldr r1, [r5, r0] - cmp r1, #0x20 - blt _021DDC6A - mov r4, #0 - str r4, [r5, r0] - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - bne _021DDC5A - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021DDC50 - add r6, r5, #0 - mov r7, #1 -_021DDC3A: - ldr r0, [r6, #4] - add r1, r7, #0 - bl sub_02021CAC - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, r0 - blt _021DDC3A -_021DDC50: - mov r0, #0x81 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r5, r0] - b _021DDC6A -_021DDC5A: - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x81 - add r1, r4, #0 - lsl r0, r0, #4 - str r1, [r5, r0] -_021DDC6A: - ldr r0, _021DDCEC ; =0x0000080C - ldr r1, [r5, r0] - cmp r1, #0x10 - blt _021DDC76 - mov r0, #0x20 - sub r1, r0, r1 -_021DDC76: - lsl r2, r1, #0xc - asr r1, r2, #0x1f - lsr r0, r2, #0x10 - lsl r3, r1, #0x10 - mov r1, #2 - orr r3, r0 - lsl r2, r2, #0x10 - mov r0, #0 - lsl r1, r1, #0xa - add r4, r2, r1 - adc r3, r0 - lsl r2, r3, #0x14 - lsr r0, r4, #0xc - orr r0, r2 - lsl r1, r1, #5 - bl sub_020BCFD0 - asr r1, r0, #0xc - mov r0, #1 - lsl r0, r0, #0xc - orr r1, r0 - ldr r0, _021DDCF0 ; =0x04000052 - strh r1, [r0] - ldr r0, _021DDCEC ; =0x0000080C - ldr r1, [r5, r0] - add r1, r1, #1 - str r1, [r5, r0] - ldr r1, [r5, r0] - cmp r1, #0x20 - blt _021DDCEA - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - bne _021DDCC4 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - pop {r3, r4, r5, r6, r7, pc} -_021DDCC4: - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - ble _021DDCEA - add r6, r5, #0 - add r7, r4, #0 -_021DDCD4: - ldr r0, [r6, #4] - add r1, r7, #0 - bl sub_02021CAC - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, r0 - blt _021DDCD4 -_021DDCEA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DDCEC: .word 0x0000080C -_021DDCF0: .word 0x04000052 - thumb_func_end ov21_021DDC14 - - thumb_func_start ov21_021DDCF4 -ov21_021DDCF4: ; 0x021DDCF4 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov21_021D2170 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov21_021D37BC - add r2, r0, #0 - mov r0, #0x28 - str r0, [sp] - mov r0, #0x78 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #0] - mov r3, #2 - bl ov21_021D1890 - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DDCF4 - - thumb_func_start ov21_021DDD2C -ov21_021DDD2C: ; 0x021DDD2C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021DDDA4 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021DDDF0 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021DDE18 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021DDE48 - str r0, [r5, #0x24] - ldr r0, _021DDD74 ; =ov21_021DDE4C - str r0, [r5, #8] - ldr r0, _021DDD78 ; =ov21_021DDE84 - str r0, [r5, #0xc] - ldr r0, _021DDD7C ; =ov21_021DDEB4 - str r0, [r5, #0x10] - ldr r0, _021DDD80 ; =ov21_021DDEC8 - str r0, [r5, #0x14] - ldr r0, _021DDD84 ; =ov21_021DDF80 - str r0, [r5, #0x18] - ldr r0, _021DDD88 ; =ov21_021DDFB4 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DDD74: .word ov21_021DDE4C -_021DDD78: .word ov21_021DDE84 -_021DDD7C: .word ov21_021DDEB4 -_021DDD80: .word ov21_021DDEC8 -_021DDD84: .word ov21_021DDF80 -_021DDD88: .word ov21_021DDFB4 - thumb_func_end ov21_021DDD2C - - thumb_func_start ov21_021DDD8C -ov21_021DDD8C: ; 0x021DDD8C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021DDE1C - ldr r0, [r4, #4] - bl ov21_021DDE30 - ldr r0, [r4, #0x20] - bl ov21_021DDE44 - pop {r4, pc} - thumb_func_end ov21_021DDD8C - - thumb_func_start ov21_021DDDA4 -ov21_021DDDA4: ; 0x021DDDA4 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021DDDB6 - bl sub_02022974 -_021DDDB6: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r5, #0 - mov r1, #6 - bl ov21_021D1410 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1430 - str r0, [r4, #8] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DDDA4 - - thumb_func_start ov21_021DDDF0 -ov21_021DDDF0: ; 0x021DDDF0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021DDE02 - bl sub_02022974 -_021DDE02: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DDDF0 - - thumb_func_start ov21_021DDE18 -ov21_021DDE18: ; 0x021DDE18 - mov r0, #0 - bx lr - thumb_func_end ov21_021DDE18 - - thumb_func_start ov21_021DDE1C -ov21_021DDE1C: ; 0x021DDE1C - push {r4, lr} - add r4, r0, #0 - bne _021DDE26 - bl sub_02022974 -_021DDE26: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DDE1C - - thumb_func_start ov21_021DDE30 -ov21_021DDE30: ; 0x021DDE30 - push {r4, lr} - add r4, r0, #0 - bne _021DDE3A - bl sub_02022974 -_021DDE3A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DDE30 - - thumb_func_start ov21_021DDE44 -ov21_021DDE44: ; 0x021DDE44 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DDE44 - - thumb_func_start ov21_021DDE48 -ov21_021DDE48: ; 0x021DDE48 - mov r0, #0 - bx lr - thumb_func_end ov21_021DDE48 - - thumb_func_start ov21_021DDE4C -ov21_021DDE4C: ; 0x021DDE4C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - mov r1, #0x28 - bl sub_02018144 - add r4, r0, #0 - bne _021DDE62 - bl sub_02022974 -_021DDE62: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x28 - bl sub_020D5124 - str r4, [r5, #8] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DE5A4 - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DE2EC - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DDE4C - - thumb_func_start ov21_021DDE84 -ov21_021DDE84: ; 0x021DDE84 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021DDE94 - mov r0, #1 - pop {r3, r4, r5, pc} -_021DDE94: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021DDE9E - mov r0, #0 - pop {r3, r4, r5, pc} -_021DDE9E: - ldr r0, [r5, #8] - bl ov21_021E33AC - cmp r0, #0 - beq _021DDEB0 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021DE334 -_021DDEB0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DDE84 - - thumb_func_start ov21_021DDEB4 -ov21_021DDEB4: ; 0x021DDEB4 - push {r4, lr} - ldr r4, [r0, #8] - add r0, r4, #0 - bl ov21_021DE484 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021DDEB4 - - thumb_func_start ov21_021DDEC8 -ov21_021DDEC8: ; 0x021DDEC8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r3, #8] - add r4, r1, #0 - str r0, [sp] - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021DDF7C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DDEE8: ; jump table - .short _021DDEF0 - _021DDEE8 - 2 ; case 0 - .short _021DDF0A - _021DDEE8 - 2 ; case 1 - .short _021DDF3E - _021DDEE8 - 2 ; case 2 - .short _021DDF60 - _021DDEE8 - 2 ; case 3 -_021DDEF0: - ldr r0, [r4, #4] - mov r1, #0x2c - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x2c - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDF7C -_021DDF0A: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021DE100 - ldr r2, [sp] - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021DE49C - ldr r3, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021DE4D4 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DE058 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDF7C -_021DDF3E: - ldr r3, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021DE4D4 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DE0C4 - cmp r0, #0 - beq _021DDF7C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDF7C -_021DDF60: - ldr r3, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021DE4D4 - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D25AC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DDF7C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DDEC8 - - thumb_func_start ov21_021DDF80 -ov21_021DDF80: ; 0x021DDF80 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r3, #8] - add r5, r1, #0 - add r4, r2, #0 - str r0, [sp] - ldr r7, [r5, #8] - ldr r2, [sp] - add r0, r7, #0 - add r1, r4, #0 - bl ov21_021DE49C - ldr r1, [sp] - add r0, r6, #0 - add r2, r4, #0 - bl ov21_021DE630 - ldr r3, [r5, #4] - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021DE4D4 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DDF80 - - thumb_func_start ov21_021DDFB4 -ov21_021DDFB4: ; 0x021DDFB4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r5, [r4, #8] - cmp r0, #4 - bhi _021DE03C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DDFD0: ; jump table - .short _021DDFDA - _021DDFD0 - 2 ; case 0 - .short _021DDFFC - _021DDFD0 - 2 ; case 1 - .short _021DE012 - _021DDFD0 - 2 ; case 2 - .short _021DE024 - _021DDFD0 - 2 ; case 3 - .short _021DE038 - _021DDFD0 - 2 ; case 4 -_021DDFDA: - mov r0, #0x79 - ldr r1, [r6, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - bl ov21_021D25AC - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021DE058 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE03C -_021DDFFC: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0 - bl ov21_021DE0C4 - cmp r0, #0 - beq _021DE03C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE03C -_021DE012: - ldr r2, [r4, #4] - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021DE128 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE03C -_021DE024: - ldr r0, [r5, #0x14] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE03C -_021DE038: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DE03C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DDFB4 - - thumb_func_start ov21_021DE040 -ov21_021DE040: ; 0x021DE040 - ldr r3, _021DE048 ; =sub_02021FE0 - ldr r0, [r0, #0] - mov r1, #1 - bx r3 - ; .align 2, 0 -_021DE048: .word sub_02021FE0 - thumb_func_end ov21_021DE040 - - thumb_func_start ov21_021DE04C -ov21_021DE04C: ; 0x021DE04C - ldr r3, _021DE054 ; =sub_02021FE0 - ldr r0, [r0, #0] - mov r1, #0 - bx r3 - ; .align 2, 0 -_021DE054: .word sub_02021FE0 - thumb_func_end ov21_021DE04C - - thumb_func_start ov21_021DE058 -ov21_021DE058: ; 0x021DE058 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021DE040 - ldr r0, [r4, #8] - bl ov21_021E33A4 - cmp r0, #0 - beq _021DE0C0 - cmp r6, #0 - beq _021DE09C - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r2, [r5, #0] - lsl r0, r0, #4 - add r0, r2, r0 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021DE09C: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r3, [r5, #0] - lsl r0, r0, #4 - add r0, r3, r0 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021DE0C0: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021DE058 - - thumb_func_start ov21_021DE0C4 -ov21_021DE0C4: ; 0x021DE0C4 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E33A4 - cmp r0, #0 - beq _021DE0E4 - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov21_021D2424 - b _021DE0EA -_021DE0E4: - mov r0, #2 - bl sub_0200AC1C -_021DE0EA: - cmp r0, #0 - beq _021DE0FC - cmp r4, #0 - beq _021DE0F8 - add r0, r6, #0 - bl ov21_021DE04C -_021DE0F8: - mov r0, #1 - pop {r4, r5, r6, pc} -_021DE0FC: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DE0C4 - - thumb_func_start ov21_021DE100 -ov21_021DE100: ; 0x021DE100 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021DE13C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DE1A4 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DE258 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE100 - - thumb_func_start ov21_021DE128 -ov21_021DE128: ; 0x021DE128 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021DE2E0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DE224 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DE128 - - thumb_func_start ov21_021DE13C -ov21_021DE13C: ; 0x021DE13C - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x22 - mov r3, #6 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x45 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE13C - - thumb_func_start ov21_021DE1A4 -ov21_021DE1A4: ; 0x021DE1A4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021DE218 ; =0x000017D9 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x69 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #4] - bl sub_0200A3DC - ldr r0, [r5, #4] - bl sub_02009D4C - ldr r0, _021DE21C ; =0x000017D7 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x67 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0xc] - ldr r0, _021DE220 ; =0x000017D8 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x68 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x10] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE218: .word 0x000017D9 -_021DE21C: .word 0x000017D7 -_021DE220: .word 0x000017D8 - thumb_func_end ov21_021DE1A4 - - thumb_func_start ov21_021DE224 -ov21_021DE224: ; 0x021DE224 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #4] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0xc] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x10] - bl sub_02009D68 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE224 - - thumb_func_start ov21_021DE258 -ov21_021DE258: ; 0x021DE258 - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021DE2D8 ; =0x000017D8 - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r2, _021DE2DC ; =0x0000083F - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - mov r0, #3 - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r6, [sp, #0x48] - str r1, [sp, #0x34] - bl sub_02021B90 - mov r1, #0 - str r0, [r5, #0] - bl sub_02021D6C - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DE2D8: .word 0x000017D8 -_021DE2DC: .word 0x0000083F - thumb_func_end ov21_021DE258 - - thumb_func_start ov21_021DE2E0 -ov21_021DE2E0: ; 0x021DE2E0 - ldr r3, _021DE2E8 ; =sub_02021BD4 - ldr r0, [r0, #0] - bx r3 - nop -_021DE2E8: .word sub_02021BD4 - thumb_func_end ov21_021DE2E0 - - thumb_func_start ov21_021DE2EC -ov21_021DE2EC: ; 0x021DE2EC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #4 - bl sub_02018144 - str r0, [r5, #0x14] - mov r1, #0xfe - strb r1, [r0] - ldr r1, [r5, #0] - ldr r0, [r5, #0x14] - add r3, r5, #0 - strb r1, [r0, #1] - ldr r1, [r5, #4] - ldr r0, [r5, #0x14] - ldr r2, _021DE330 ; =ov21_021DE44C - strb r1, [r0, #2] - ldr r0, [r5, #0x14] - mov r1, #0x20 - strb r1, [r0, #3] - str r4, [r5, #0x18] - str r5, [r5, #0x1c] - str r6, [sp] - ldr r0, [r5, #0x14] - mov r1, #1 - add r3, #0x18 - bl sub_02023FCC - str r0, [r5, #0x10] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021DE330: .word ov21_021DE44C - thumb_func_end ov21_021DE2EC - - thumb_func_start ov21_021DE334 -ov21_021DE334: ; 0x021DE334 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - add r5, r1, #0 - bl sub_0202404C - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021DE3D0 - ldr r1, [r4, #0] - ldr r0, [r4, #0x14] - strb r1, [r0, #1] - ldr r1, [r4, #4] - ldr r0, [r4, #0x14] - strb r1, [r0, #2] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE334 - - thumb_func_start ov21_021DE358 -ov21_021DE358: ; 0x021DE358 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021DE3C8 ; =0x021BF6BC - add r4, r1, #0 - ldrh r0, [r0, #0x22] - cmp r0, #0 - bne _021DE3C4 - ldr r0, [r4, #8] - bl ov21_021E33BC - cmp r0, #1 - bne _021DE3C4 - ldr r0, [r4, #4] - bl ov21_021D3998 - cmp r0, #2 - bne _021DE3C4 - ldr r0, [r4, #0] - bl ov21_021DCA28 - ldr r1, _021DE3CC ; =0x021BF67C - ldr r2, [r1, #0x48] - mov r1, #0x20 - tst r1, r2 - beq _021DE3A4 - sub r1, r0, #1 - bpl _021DE390 - mov r1, #0 -_021DE390: - ldr r0, [r4, #0] - bl ov21_021DCA30 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DE5A4 - mov r0, #1 - str r0, [r5, #0x24] - pop {r3, r4, r5, pc} -_021DE3A4: - mov r1, #0x10 - tst r1, r2 - beq _021DE3C4 - add r1, r0, #1 - cmp r1, #3 - blt _021DE3B2 - mov r1, #2 -_021DE3B2: - ldr r0, [r4, #0] - bl ov21_021DCA30 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DE5A4 - mov r0, #1 - str r0, [r5, #0x24] -_021DE3C4: - pop {r3, r4, r5, pc} - nop -_021DE3C8: .word 0x021BF6BC -_021DE3CC: .word 0x021BF67C - thumb_func_end ov21_021DE358 - - thumb_func_start ov21_021DE3D0 -ov21_021DE3D0: ; 0x021DE3D0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r2, #0 - str r2, [r5, #0x24] - ldr r3, [r5, #0x20] - add r4, r1, #0 - cmp r3, #0 - beq _021DE442 - ldr r0, _021DE448 ; =0x021BF6BC - ldrh r1, [r0, #0x22] - cmp r1, #0 - beq _021DE43E - ldrh r2, [r0, #0x1c] - ldr r1, [r5, #8] - sub r1, r2, r1 - str r1, [r5, #0] - ldrh r1, [r0, #0x1e] - ldr r0, [r5, #0xc] - sub r0, r1, r0 - str r0, [r5, #4] - ldr r0, [r5, #0] - cmp r0, #0x18 - bge _021DE402 - mov r0, #0x18 - str r0, [r5, #0] -_021DE402: - ldr r0, [r5, #0] - cmp r0, #0xf6 - ble _021DE40C - mov r0, #0xf6 - str r0, [r5, #0] -_021DE40C: - ldr r0, [r5, #4] - cmp r0, #0x40 - bge _021DE416 - mov r0, #0x40 - str r0, [r5, #4] -_021DE416: - ldr r0, [r5, #0] - bl ov21_021DE5DC - ldr r1, [r5, #4] - add r0, #0x84 - cmp r1, r0 - ble _021DE426 - str r0, [r5, #4] -_021DE426: - ldr r0, [r5, #0] - mov r1, #0x55 - bl sub_020E1F6C - add r1, r0, #0 - cmp r1, #2 - ble _021DE436 - mov r1, #2 -_021DE436: - ldr r0, [r4, #0] - bl ov21_021DCA30 - pop {r3, r4, r5, pc} -_021DE43E: - str r2, [r5, #0x20] - pop {r3, r4, r5, pc} -_021DE442: - bl ov21_021DE358 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DE448: .word 0x021BF6BC - thumb_func_end ov21_021DE3D0 - - thumb_func_start ov21_021DE44C -ov21_021DE44C: ; 0x021DE44C - push {r4, lr} - ldr r0, [r2, #0] - ldr r4, [r2, #4] - cmp r1, #0 - bne _021DE47A - ldr r0, [r0, #8] - mov r1, #1 - bl ov21_021E33B4 - ldr r0, _021DE47C ; =0x000005DD - bl sub_02005748 - mov r0, #1 - str r0, [r4, #0x20] - ldr r0, _021DE480 ; =0x021BF6BC - ldr r1, [r4, #0] - ldrh r2, [r0, #0x1c] - sub r1, r2, r1 - str r1, [r4, #8] - ldrh r1, [r0, #0x1e] - ldr r0, [r4, #4] - sub r0, r1, r0 - str r0, [r4, #0xc] -_021DE47A: - pop {r4, pc} - ; .align 2, 0 -_021DE47C: .word 0x000005DD -_021DE480: .word 0x021BF6BC - thumb_func_end ov21_021DE44C - - thumb_func_start ov21_021DE484 -ov21_021DE484: ; 0x021DE484 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl sub_02024034 - ldr r0, [r4, #0x14] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x14] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE484 - - thumb_func_start ov21_021DE49C -ov21_021DE49C: ; 0x021DE49C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r2, #0] - add r4, r1, #0 - lsl r0, r0, #0xc - str r0, [sp] - ldr r0, [r2, #4] - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - str r1, [sp, #4] - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0] - bl ov21_021DCA28 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_02021D6C - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE49C - - thumb_func_start ov21_021DE4D4 -ov21_021DE4D4: ; 0x021DE4D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r2, #0] - add r7, r1, #0 - str r3, [sp] - mov r4, #0 - bl ov21_021DCA28 - ldr r1, [r5, #0x18] - add r6, r0, #0 - cmp r1, r6 - bne _021DE4F8 - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021DE4F8 - ldr r0, [r5, #0x1c] - cmp r0, r1 - beq _021DE5A2 -_021DE4F8: - ldr r0, [r5, #0x1c] - cmp r0, r6 - beq _021DE504 - str r0, [r5, #0x18] - mov r0, #0 - str r0, [r5, #0x24] -_021DE504: - ldr r0, [r5, #0x24] - cmp r0, #0 - beq _021DE514 - cmp r0, #1 - beq _021DE54A - cmp r0, #2 - beq _021DE580 - b _021DE588 -_021DE514: - str r6, [r5, #0x1c] - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021DE520 - bl sub_020181C4 -_021DE520: - ldr r1, [r5, #0x18] - add r2, r5, #0 - ldr r0, [r7, #0] - ldr r3, [sp] - add r1, #0xf - add r2, #0x20 - bl ov21_021D27E0 - str r0, [r5, #0x14] - mov r0, #0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x18] - cmp r0, r6 - ble _021DE540 - mov r4, #1 - b _021DE542 -_021DE540: - mov r4, #2 -_021DE542: - ldr r0, [r5, #0x24] - add r0, r0, #1 - str r0, [r5, #0x24] - b _021DE588 -_021DE54A: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021DE554 - bl sub_020181C4 -_021DE554: - ldr r1, [r5, #0x1c] - add r2, r5, #0 - ldr r0, [r7, #0] - ldr r3, [sp] - add r1, #0xf - add r2, #0x20 - bl ov21_021D27E0 - str r0, [r5, #0x14] - mov r0, #0 - str r0, [r5, #0x28] - ldr r1, [r5, #0x18] - ldr r0, [r5, #0x1c] - cmp r1, r0 - bge _021DE576 - mov r4, #1 - b _021DE578 -_021DE576: - mov r4, #2 -_021DE578: - ldr r0, [r5, #0x24] - add r0, r0, #1 - str r0, [r5, #0x24] - b _021DE588 -_021DE580: - mov r4, #0 - str r4, [r5, #0x24] - ldr r0, [r5, #0x1c] - str r0, [r5, #0x18] -_021DE588: - ldr r2, [r5, #0x20] - mov r0, #0x1f - ldr r3, [r2, #0xc] - lsl r2, r4, #5 - add r2, r3, r2 - mov r1, #0x40 - mov r3, #0x20 - bl sub_0201DC68 - cmp r0, #0 - bne _021DE5A2 - bl sub_02022974 -_021DE5A2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DE4D4 - - thumb_func_start ov21_021DE5A4 -ov21_021DE5A4: ; 0x021DE5A4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0] - bl ov21_021DCA28 - cmp r0, #0 - beq _021DE5BC - cmp r0, #1 - beq _021DE5C6 - cmp r0, #2 - beq _021DE5D0 - pop {r4, pc} -_021DE5BC: - mov r0, #0x20 - str r0, [r4, #0] - mov r0, #0x80 - str r0, [r4, #4] - pop {r4, pc} -_021DE5C6: - mov r0, #0x80 - str r0, [r4, #0] - mov r0, #0x60 - str r0, [r4, #4] - pop {r4, pc} -_021DE5D0: - mov r0, #0xe0 - str r0, [r4, #0] - mov r0, #0x80 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE5A4 - - thumb_func_start ov21_021DE5DC -ov21_021DE5DC: ; 0x021DE5DC - push {r3, lr} - cmp r0, #0x28 - blt _021DE5E6 - cmp r0, #0xd8 - ble _021DE5EA -_021DE5E6: - mov r0, #0x30 - pop {r3, pc} -_021DE5EA: - ldr r1, _021DE628 ; =0x00007FFF - sub r0, #0x28 - mul r1, r0 - add r0, r1, #0 - mov r1, #0xb0 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _021DE62C ; =0x020F983C - mov r2, #3 - ldrsh r0, [r0, r1] - lsl r2, r2, #0x10 - mov r3, #0 - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - asr r1, r1, #0xc - mov r0, #0x30 - sub r0, r0, r1 - pop {r3, pc} - ; .align 2, 0 -_021DE628: .word 0x00007FFF -_021DE62C: .word 0x020F983C - thumb_func_end ov21_021DE5DC - - thumb_func_start ov21_021DE630 -ov21_021DE630: ; 0x021DE630 - push {r3, r4, r5, lr} - ldr r4, [r0, #0] - ldr r0, [r2, #8] - add r5, r1, #0 - bl ov21_021E33BC - cmp r0, #1 - bne _021DE664 - ldr r0, [r5, #0x24] - cmp r0, #0 - bne _021DE656 - mov r3, #0x20 - str r3, [sp] - ldr r1, [r5, #0] - ldr r2, [r5, #4] - add r0, r4, #0 - bl ov21_021D2574 - pop {r3, r4, r5, pc} -_021DE656: - mov r3, #0x20 - str r3, [sp] - ldr r1, [r5, #0] - ldr r2, [r5, #4] - add r0, r4, #0 - bl ov21_021D25E8 -_021DE664: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE630 - - thumb_func_start ov21_021DE668 -ov21_021DE668: ; 0x021DE668 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - bl ov21_021DE6E8 - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021DE724 - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0x20] - bl ov21_021DE774 - str r0, [r5, #0x24] - ldr r0, _021DE6A8 ; =ov21_021DE778 - str r0, [r5, #8] - ldr r0, _021DE6AC ; =ov21_021DE79C - str r0, [r5, #0xc] - ldr r0, _021DE6B0 ; =ov21_021DE7F8 - str r0, [r5, #0x10] - ldr r0, _021DE6B4 ; =ov21_021DE804 - str r0, [r5, #0x14] - ldr r0, _021DE6B8 ; =ov21_021DE8E4 - str r0, [r5, #0x18] - ldr r0, _021DE6BC ; =ov21_021DE8E8 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE6A8: .word ov21_021DE778 -_021DE6AC: .word ov21_021DE79C -_021DE6B0: .word ov21_021DE7F8 -_021DE6B4: .word ov21_021DE804 -_021DE6B8: .word ov21_021DE8E4 -_021DE6BC: .word ov21_021DE8E8 - thumb_func_end ov21_021DE668 - - thumb_func_start ov21_021DE6C0 -ov21_021DE6C0: ; 0x021DE6C0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021DE74C - ldr r0, [r4, #4] - bl ov21_021DE760 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE6C0 - - thumb_func_start ov21_021DE6D4 -ov21_021DE6D4: ; 0x021DE6D4 - mov r0, #0 - bx lr - thumb_func_end ov21_021DE6D4 - - thumb_func_start ov21_021DE6D8 -ov21_021DE6D8: ; 0x021DE6D8 - mov r2, #1 - cmp r1, #1 - bne _021DE6E2 - mov r1, #0 - add r2, r1, #0 -_021DE6E2: - str r1, [r0, #0x18] - add r0, r2, #0 - bx lr - thumb_func_end ov21_021DE6D8 - - thumb_func_start ov21_021DE6E8 -ov21_021DE6E8: ; 0x021DE6E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x20 - bl sub_02018144 - add r4, r0, #0 - bne _021DE6FA - bl sub_02022974 -_021DE6FA: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE6E8 - - thumb_func_start ov21_021DE724 -ov21_021DE724: ; 0x021DE724 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021DE736 - bl sub_02022974 -_021DE736: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DE724 - - thumb_func_start ov21_021DE74C -ov21_021DE74C: ; 0x021DE74C - push {r4, lr} - add r4, r0, #0 - bne _021DE756 - bl sub_02022974 -_021DE756: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE74C - - thumb_func_start ov21_021DE760 -ov21_021DE760: ; 0x021DE760 - push {r4, lr} - add r4, r0, #0 - bne _021DE76A - bl sub_02022974 -_021DE76A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE760 - - thumb_func_start ov21_021DE774 -ov21_021DE774: ; 0x021DE774 - mov r0, #0 - bx lr - thumb_func_end ov21_021DE774 - - thumb_func_start ov21_021DE778 -ov21_021DE778: ; 0x021DE778 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D3434 - ldr r0, [r4, #4] - bl ov21_021D36D8 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D344C - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021DE778 - - thumb_func_start ov21_021DE79C -ov21_021DE79C: ; 0x021DE79C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - cmp r0, #1 - bne _021DE7B0 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_021DE7B0: - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _021DE7BC - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_021DE7BC: - ldr r0, [r5, #0] - cmp r0, #0 - bne _021DE7EE - ldr r0, [r4, #0x1c] - cmp r0, #1 - bne _021DE7E8 - ldr r0, [r4, #4] - bl ov21_021D37BC - ldr r2, _021DE7F4 ; =0x000001FF - add r1, r0, #0 - lsl r1, r1, #0x10 - str r2, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #0xe - lsr r1, r1, #0x10 - add r3, r2, #0 - bl sub_020059D0 - mov r0, #0 - str r0, [r4, #0x1c] -_021DE7E8: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] -_021DE7EE: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DE7F4: .word 0x000001FF - thumb_func_end ov21_021DE79C - - thumb_func_start ov21_021DE7F8 -ov21_021DE7F8: ; 0x021DE7F8 - push {r3, lr} - mov r0, #0 - bl sub_0200592C - mov r0, #1 - pop {r3, pc} - thumb_func_end ov21_021DE7F8 - - thumb_func_start ov21_021DE804 -ov21_021DE804: ; 0x021DE804 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r5, [r4, #8] - cmp r0, #3 - bhi _021DE8DA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DE820: ; jump table - .short _021DE828 - _021DE820 - 2 ; case 0 - .short _021DE842 - _021DE820 - 2 ; case 1 - .short _021DE88C - _021DE820 - 2 ; case 2 - .short _021DE8D0 - _021DE820 - 2 ; case 3 -_021DE828: - ldr r0, [r4, #4] - mov r1, #0x74 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x74 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE8DA -_021DE842: - ldr r3, [r4, #4] - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021DE9A4 - ldr r0, [r7, #0x14] - cmp r0, #0 - beq _021DE85C - cmp r0, #1 - beq _021DE86A - cmp r0, #2 - beq _021DE878 - b _021DE884 -_021DE85C: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DF44C - b _021DE884 -_021DE86A: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DF374 - b _021DE884 -_021DE878: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DF548 -_021DE884: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE8DA -_021DE88C: - ldr r0, [r7, #0x14] - cmp r0, #0 - beq _021DE89C - cmp r0, #1 - beq _021DE8AA - cmp r0, #2 - beq _021DE8B8 - b _021DE8C4 -_021DE89C: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021DF4D0 - add r1, r0, #0 - b _021DE8C4 -_021DE8AA: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021DF3F0 - add r1, r0, #0 - b _021DE8C4 -_021DE8B8: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021DF5D0 - add r1, r0, #0 -_021DE8C4: - cmp r1, #0 - beq _021DE8DA - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE8DA -_021DE8D0: - ldr r0, _021DE8E0 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DE8DA: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DE8E0: .word 0x04000050 - thumb_func_end ov21_021DE804 - - thumb_func_start ov21_021DE8E4 -ov21_021DE8E4: ; 0x021DE8E4 - mov r0, #0 - bx lr - thumb_func_end ov21_021DE8E4 - - thumb_func_start ov21_021DE8E8 -ov21_021DE8E8: ; 0x021DE8E8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r5, [r4, #0] - add r3, r0, #0 - add r1, r2, #0 - ldr r0, [r4, #8] - cmp r5, #4 - bhi _021DE99E - add r5, r5, r5 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_021DE904: ; jump table - .short _021DE90E - _021DE904 - 2 ; case 0 - .short _021DE942 - _021DE904 - 2 ; case 1 - .short _021DE980 - _021DE904 - 2 ; case 2 - .short _021DE98E - _021DE904 - 2 ; case 3 - .short _021DE99A - _021DE904 - 2 ; case 4 -_021DE90E: - ldr r1, [r1, #0x14] - cmp r1, #0 - beq _021DE91E - cmp r1, #1 - beq _021DE928 - cmp r1, #2 - beq _021DE932 - b _021DE93A -_021DE91E: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DF44C - b _021DE93A -_021DE928: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DF374 - b _021DE93A -_021DE932: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DF548 -_021DE93A: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE99E -_021DE942: - ldr r1, [r1, #0x14] - cmp r1, #0 - beq _021DE952 - cmp r1, #1 - beq _021DE95E - cmp r1, #2 - beq _021DE96A - b _021DE974 -_021DE952: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DF4D0 - add r2, r0, #0 - b _021DE974 -_021DE95E: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DF3F0 - add r2, r0, #0 - b _021DE974 -_021DE96A: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DF5D0 - add r2, r0, #0 -_021DE974: - cmp r2, #0 - beq _021DE99E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE99E -_021DE980: - add r1, r3, #0 - bl ov21_021DEA0C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE99E -_021DE98E: - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DE99E -_021DE99A: - mov r0, #1 - pop {r3, r4, r5, pc} -_021DE99E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DE8E8 - - thumb_func_start ov21_021DE9A4 -ov21_021DE9A4: ; 0x021DE9A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DEF08 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DEF54 - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov21_021DEFA8 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021DF214 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021DEA44 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021DEB58 - ldr r0, [r4, #4] - bl ov21_021D37CC - cmp r0, #2 - bne _021DEA0A - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021DED24 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021DF098 -_021DEA0A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DE9A4 - - thumb_func_start ov21_021DEA0C -ov21_021DEA0C: ; 0x021DEA0C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl ov21_021DF35C - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DED68 - add r0, r5, #0 - bl ov21_021DF1F8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DF054 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DEA0C - - thumb_func_start ov21_021DEA44 -ov21_021DEA44: ; 0x021DEA44 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x32 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x33 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r1, #3 - str r1, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r3, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x34 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r6, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #8 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x36 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r4, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #0x10 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DEA44 - - thumb_func_start ov21_021DEB58 -ov21_021DEB58: ; 0x021DEB58 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - add r7, r2, #0 - bl ov21_021D37BC - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37CC - cmp r0, #2 - beq _021DEB74 - mov r6, #0 -_021DEB74: - ldr r0, _021DEB88 ; =0x00020100 - add r1, r6, #0 - str r0, [sp] - ldr r0, [r5, #0] - ldr r3, [r4, #0x18] - add r0, r0, #4 - add r2, r7, #0 - bl ov21_021DEB8C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DEB88: .word 0x00020100 - thumb_func_end ov21_021DEB58 - - thumb_func_start ov21_021DEB8C -ov21_021DEB8C: ; 0x021DEB8C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r2, #0 - add r5, r0, #0 - str r1, [sp, #0x10] - mov r0, #0x40 - add r1, r6, #0 - str r3, [sp, #0x14] - ldr r4, [sp, #0x30] - bl sub_02023790 - add r7, r0, #0 - ldr r2, _021DEC28 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - mov r1, #9 - add r2, r7, #0 - str r0, [sp, #0x18] - bl sub_0200B1B8 - mov r0, #0x58 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - str r4, [sp, #8] - add r0, r5, #0 - add r2, r7, #0 - mov r3, #0x98 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x18] - mov r1, #0xa - add r2, r7, #0 - bl sub_0200B1B8 - mov r0, #0x68 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - str r4, [sp, #8] - add r0, r5, #0 - add r2, r7, #0 - mov r3, #0x98 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_0200B190 - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - add r3, r4, #0 - bl ov21_021DEC2C - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - add r3, r4, #0 - bl ov21_021DEC80 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, r5, #0 - add r1, r6, #0 - str r4, [sp] - bl ov21_021DECD4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021DEC28: .word 0x000002B9 - thumb_func_end ov21_021DEB8C - - thumb_func_start ov21_021DEC2C -ov21_021DEC2C: ; 0x021DEC2C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r6, r1, #0 - mov r0, #0x40 - str r2, [sp, #0x10] - add r5, r3, #0 - bl sub_02023790 - add r4, r0, #0 - bl sub_020989D0 - add r2, r0, #0 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - ldr r1, [sp, #0x10] - add r2, r4, #0 - add r6, r0, #0 - bl sub_0200B1B8 - mov r0, #0x58 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - str r5, [sp, #8] - add r0, r7, #0 - add r2, r4, #0 - mov r3, #0xb8 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DEC2C - - thumb_func_start ov21_021DEC80 -ov21_021DEC80: ; 0x021DEC80 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r6, r1, #0 - mov r0, #0x40 - str r2, [sp, #0x10] - add r5, r3, #0 - bl sub_02023790 - add r4, r0, #0 - bl sub_020989C4 - add r2, r0, #0 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - ldr r1, [sp, #0x10] - add r2, r4, #0 - add r6, r0, #0 - bl sub_0200B1B8 - mov r0, #0x68 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - str r5, [sp, #8] - add r0, r7, #0 - add r2, r4, #0 - mov r3, #0xb8 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DEC80 - - thumb_func_start ov21_021DECD4 -ov21_021DECD4: ; 0x021DECD4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r2, #0 - add r2, r3, #0 - mov r1, #2 - add r3, r4, #0 - bl ov21_021D56BC - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002EB4 - cmp r0, #0xf0 - bhs _021DED00 - lsr r1, r0, #1 - mov r0, #0x80 - sub r3, r0, r1 - b _021DED02 -_021DED00: - mov r3, #8 -_021DED02: - mov r0, #0x88 - str r0, [sp] - mov r1, #0 - ldr r0, [sp, #0x20] - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r2, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl ov21_021D5600 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DECD4 - - thumb_func_start ov21_021DED24 -ov21_021DED24: ; 0x021DED24 - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - add r6, r0, #0 - ldr r0, [r5, #4] - add r7, r1, #0 - str r3, [sp] - bl ov21_021D37BC - add r4, r0, #0 - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov21_021D33D4 - ldr r1, _021DED64 ; =0x000001E7 - cmp r4, r1 - bne _021DED4A - cmp r0, #0 - ble _021DED4A - mov r4, #0xb -_021DED4A: - ldr r2, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r3, r4, #0 - bl ov21_021DED7C - ldr r2, [sp] - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021DEE80 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DED64: .word 0x000001E7 - thumb_func_end ov21_021DED24 - - thumb_func_start ov21_021DED68 -ov21_021DED68: ; 0x021DED68 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021DEEF8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DEE38 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DED68 - - thumb_func_start ov21_021DED7C -ov21_021DED7C: ; 0x021DED7C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r3, [sp, #0x10] - add r5, r0, #0 - add r6, r2, #0 - ldr r4, [r1, #0] - bl ov21_021D1F90 - add r7, r0, #0 - ldr r0, [sp, #0x10] - bl ov21_021D1F94 - str r0, [sp, #0x14] - bl ov21_021D1F98 - str r0, [sp, #0x18] - bl ov21_021D1F9C - str r0, [sp, #0x1c] - bl ov21_021D1FA0 - str r0, [sp, #0x20] - mov r0, #0xfa - lsl r0, r0, #4 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - mov r0, #5 - str r6, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r2, [sp, #0x14] - add r1, r7, #0 - bl sub_0200985C - str r0, [r5, #0x24] - bl sub_0200A3DC - ldr r0, [r5, #0x24] - bl sub_02009D4C - mov r0, #0xfa - lsl r0, r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x51 - str r6, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [sp, #0x18] - add r1, r7, #0 - mov r3, #0 - bl sub_020098B8 - str r0, [r5, #0x28] - bl sub_0200A640 - ldr r0, [r5, #0x28] - bl sub_02009D4C - mov r0, #0xfa - lsl r0, r0, #4 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r6, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [sp, #0x1c] - add r1, r7, #0 - mov r3, #1 - bl sub_02009918 - str r0, [r5, #0x2c] - mov r0, #0xfa - lsl r0, r0, #4 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r6, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [sp, #0x20] - add r1, r7, #0 - mov r3, #1 - bl sub_02009918 - str r0, [r5, #0x30] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DED7C - - thumb_func_start ov21_021DEE38 -ov21_021DEE38: ; 0x021DEE38 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x24] - ldr r4, [r1, #0] - cmp r0, #0 - beq _021DEE7E - bl sub_0200A4E4 - ldr r0, [r5, #0x28] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x24] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x28] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x2c] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x30] - bl sub_02009D68 -_021DEE7E: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DEE38 - - thumb_func_start ov21_021DEE80 -ov21_021DEE80: ; 0x021DEE80 - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - mov r1, #0xfa - add r5, r0, #0 - lsl r1, r1, #4 - mov r0, #0 - add r6, r2, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #5 - str r2, [sp, #0x10] - lsl r0, r0, #6 - ldr r3, [r4, r0] - str r3, [sp, #0x14] - add r3, r0, #4 - ldr r3, [r4, r3] - str r3, [sp, #0x18] - add r3, r0, #0 - add r3, #8 - ldr r3, [r4, r3] - add r0, #0xc - str r3, [sp, #0x1c] - ldr r0, [r4, r0] - add r3, r1, #0 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r0, sp, #0x4c - add r2, r1, #0 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x20 - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x44] - mov r0, #0x16 - lsl r0, r0, #0xe - str r0, [sp, #0x38] - mov r0, #0x1e - lsl r0, r0, #0xe - str r0, [sp, #0x34] - add r0, sp, #0x2c - str r6, [sp, #0x48] - bl sub_02021B90 - str r0, [r5, #0] - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DEE80 - - thumb_func_start ov21_021DEEF8 -ov21_021DEEF8: ; 0x021DEEF8 - push {r3, lr} - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DEF04 - bl sub_02021BD4 -_021DEF04: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021DEEF8 - - thumb_func_start ov21_021DEF08 -ov21_021DEF08: ; 0x021DEF08 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - add r6, r2, #0 - bl ov21_021D375C - add r3, r0, #0 - mov r0, #0x2b - lsl r0, r0, #0xe - str r0, [sp] - mov r0, #2 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #4] - add r2, r6, #0 - bl ov21_021D1778 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D238C - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DEF08 - - thumb_func_start ov21_021DEF3C -ov21_021DEF3C: ; 0x021DEF3C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov21_021D23C0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov21_021D2360 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DEF3C - - thumb_func_start ov21_021DEF54 -ov21_021DEF54: ; 0x021DEF54 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov21_021D2170 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r2, r0, #0 - mov r0, #0x30 - str r0, [sp] - mov r0, #0x48 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #4] - mov r3, #2 - bl ov21_021D1890 - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DEF54 - - thumb_func_start ov21_021DEF8C -ov21_021DEF8C: ; 0x021DEF8C - push {r4, lr} - ldr r0, [r0, #0] - bl ov21_021D2170 - add r4, r0, #0 - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - add r0, r4, #0 - bl sub_02008780 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DEF8C - - thumb_func_start ov21_021DEFA8 -ov21_021DEFA8: ; 0x021DEFA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021DF044 ; =0x00000FFA - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x5a - bl sub_02009A4C - str r0, [r5, #0x14] - bl sub_0200A3DC - ldr r0, [r5, #0x14] - bl sub_02009D4C - ldr r0, _021DF048 ; =0x00000FAD - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xd - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x18] - bl sub_0200A640 - ldr r0, [r5, #0x18] - bl sub_02009D4C - ldr r0, _021DF04C ; =0x00000FF8 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x58 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x1c] - ldr r0, _021DF050 ; =0x00000FF9 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x59 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x20] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF044: .word 0x00000FFA -_021DF048: .word 0x00000FAD -_021DF04C: .word 0x00000FF8 -_021DF050: .word 0x00000FF9 - thumb_func_end ov21_021DEFA8 - - thumb_func_start ov21_021DF054 -ov21_021DF054: ; 0x021DF054 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x14] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x18] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x14] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x18] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x1c] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x20] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DF054 - - thumb_func_start ov21_021DF098 -ov21_021DF098: ; 0x021DF098 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x78 - add r6, r2, #0 - add r5, r0, #0 - ldr r0, [r6, #4] - str r3, [sp, #0x2c] - ldr r4, [r1, #0] - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r6, #4] - add r1, r7, #0 - bl ov21_021D33D4 - str r0, [sp, #0x30] - ldr r1, [sp, #0x30] - add r0, r7, #0 - mov r2, #6 - bl sub_020759CC - add r6, r0, #0 - ldr r1, [sp, #0x30] - add r0, r7, #0 - mov r2, #7 - bl sub_020759CC - add r7, r0, #0 - add r0, r6, #0 - bl ov21_021DF180 - add r6, r0, #0 - add r0, r7, #0 - bl ov21_021DF180 - ldr r3, _021DF17C ; =0x00000FF9 - add r7, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #5 - str r2, [sp, #0x10] - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x54 - sub r2, #0x4c - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x34] - add r0, sp, #0x54 - str r0, [sp, #0x38] - mov r0, #0x20 - str r0, [sp, #0x48] - mov r0, #1 - str r0, [sp, #0x4c] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x50] - mov r0, #0xaa - lsl r0, r0, #0xc - str r0, [sp, #0x3c] - mov r0, #0x12 - lsl r0, r0, #0xe - str r0, [sp, #0x40] - add r0, sp, #0x34 - bl sub_02021B90 - add r1, r6, #0 - str r0, [r5, #4] - bl sub_02021D6C - cmp r6, r7 - beq _021DF172 - mov r0, #0x37 - lsl r0, r0, #0xe - str r0, [sp, #0x3c] - mov r0, #0x12 - lsl r0, r0, #0xe - str r0, [sp, #0x40] - add r0, sp, #0x34 - bl sub_02021B90 - add r1, r7, #0 - str r0, [r5, #8] - bl sub_02021D6C - add sp, #0x78 - pop {r3, r4, r5, r6, r7, pc} -_021DF172: - mov r0, #0 - str r0, [r5, #8] - add sp, #0x78 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DF17C: .word 0x00000FF9 - thumb_func_end ov21_021DF098 - - thumb_func_start ov21_021DF180 -ov21_021DF180: ; 0x021DF180 - cmp r0, #0x11 - bhi _021DF1F6 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DF190: ; jump table - .short _021DF1B4 - _021DF190 - 2 ; case 0 - .short _021DF1B8 - _021DF190 - 2 ; case 1 - .short _021DF1BC - _021DF190 - 2 ; case 2 - .short _021DF1C0 - _021DF190 - 2 ; case 3 - .short _021DF1C4 - _021DF190 - 2 ; case 4 - .short _021DF1C8 - _021DF190 - 2 ; case 5 - .short _021DF1CC - _021DF190 - 2 ; case 6 - .short _021DF1D0 - _021DF190 - 2 ; case 7 - .short _021DF1D4 - _021DF190 - 2 ; case 8 - .short _021DF1D0 - _021DF190 - 2 ; case 9 - .short _021DF1D8 - _021DF190 - 2 ; case 10 - .short _021DF1DC - _021DF190 - 2 ; case 11 - .short _021DF1E0 - _021DF190 - 2 ; case 12 - .short _021DF1E4 - _021DF190 - 2 ; case 13 - .short _021DF1E8 - _021DF190 - 2 ; case 14 - .short _021DF1EC - _021DF190 - 2 ; case 15 - .short _021DF1F0 - _021DF190 - 2 ; case 16 - .short _021DF1F4 - _021DF190 - 2 ; case 17 -_021DF1B4: - mov r0, #0 - bx lr -_021DF1B8: - mov r0, #6 - bx lr -_021DF1BC: - mov r0, #0xe - bx lr -_021DF1C0: - mov r0, #0xa - bx lr -_021DF1C4: - mov r0, #8 - bx lr -_021DF1C8: - mov r0, #5 - bx lr -_021DF1CC: - mov r0, #0xb - bx lr -_021DF1D0: - mov r0, #7 - bx lr -_021DF1D4: - mov r0, #9 - bx lr -_021DF1D8: - mov r0, #1 - bx lr -_021DF1DC: - mov r0, #3 - bx lr -_021DF1E0: - mov r0, #2 - bx lr -_021DF1E4: - mov r0, #4 - bx lr -_021DF1E8: - mov r0, #0xf - bx lr -_021DF1EC: - mov r0, #0xd - bx lr -_021DF1F0: - mov r0, #0x10 - bx lr -_021DF1F4: - mov r0, #0xc -_021DF1F6: - bx lr - thumb_func_end ov21_021DF180 - - thumb_func_start ov21_021DF1F8 -ov21_021DF1F8: ; 0x021DF1F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021DF206 - bl sub_02021BD4 -_021DF206: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021DF210 - bl sub_02021BD4 -_021DF210: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF1F8 - - thumb_func_start ov21_021DF214 -ov21_021DF214: ; 0x021DF214 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xa0 - add r6, r0, #0 - add r0, r2, #0 - add r5, r1, #0 - ldr r0, [r0, #4] - str r2, [sp, #0x2c] - add r7, r3, #0 - ldr r4, [r5, #0] - bl ov21_021D37BC - ldr r3, _021DF308 ; =0x00000FF9 - str r0, [sp, #0x30] - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #5 - str r2, [sp, #0x10] - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x7c - sub r2, #0x4c - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x5c] - add r0, sp, #0x7c - str r0, [sp, #0x60] - mov r0, #0x20 - str r0, [sp, #0x70] - mov r0, #1 - str r0, [sp, #0x74] - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [sp, #0x64] - mov r0, #0xd - lsl r0, r0, #0xe - str r0, [sp, #0x68] - add r0, sp, #0x5c - str r7, [sp, #0x78] - bl sub_02021B90 - mov r1, #0x11 - str r0, [r6, #0xc] - bl sub_02021D6C - ldr r0, [sp, #0x2c] - ldr r0, [r0, #4] - bl ov21_021D37CC - cmp r0, #2 - beq _021DF2AC - mov r0, #0 - str r0, [sp, #0x30] -_021DF2AC: - mov r0, #0x15 - ldr r1, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - ldr r1, [sp, #0x30] - add r2, r7, #0 - bl ov21_021DF30C - add r4, r0, #0 - ldr r0, [r5, #0] - mov r1, #1 - bl ov21_021D2344 - mov r1, #0x15 - ldr r2, [r5, #0] - lsl r1, r1, #4 - ldr r1, [r2, r1] - str r1, [sp, #0x34] - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #0x3c] - ldr r0, [r6, #0xc] - str r0, [sp, #0x40] - mov r0, #0x4d - mvn r0, r0 - str r0, [sp, #0x44] - add r0, #0x46 - str r0, [sp, #0x48] - mov r0, #0 - str r0, [sp, #0x4c] - mov r0, #0x1f - str r0, [sp, #0x50] - mov r0, #1 - str r0, [sp, #0x54] - str r7, [sp, #0x58] - str r4, [sp, #0x38] - add r0, sp, #0x34 - bl ov21_021D4CA0 - str r0, [r6, #0x10] - add r0, r4, #0 - bl ov21_021D4DA0 - add sp, #0xa0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF308: .word 0x00000FF9 - thumb_func_end ov21_021DF214 - - thumb_func_start ov21_021DF30C -ov21_021DF30C: ; 0x021DF30C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r2, #0 - mov r1, #0x12 - mov r2, #2 - add r7, r0, #0 - bl ov21_021D4D6C - add r4, r0, #0 - add r0, r5, #0 - mov r1, #2 - add r2, r6, #0 - bl ov21_021D566C - add r5, r0, #0 - mov r0, #2 - add r1, r5, #0 - mov r2, #0 - bl sub_02002D7C - cmp r0, #0x88 - bhs _021DF340 - mov r1, #0x88 - sub r0, r1, r0 - lsr r3, r0, #1 - b _021DF342 -_021DF340: - mov r3, #0 -_021DF342: - mov r0, #0 - str r0, [sp] - add r0, r7, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov21_021D4E80 - add r0, r5, #0 - bl ov21_021D5600 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF30C - - thumb_func_start ov21_021DF35C -ov21_021DF35C: ; 0x021DF35C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0xc] - ldr r0, [r4, #0x10] - bl ov21_021D4D1C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF35C - - thumb_func_start ov21_021DF374 -ov21_021DF374: ; 0x021DF374 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #1 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021D2360 - add r0, r7, #0 - bl ov21_021DF64C - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - beq _021DF3E6 - cmp r6, #0 - beq _021DF3C2 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - b _021DF3E6 -_021DF3C2: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021DF3E6: - add r0, r5, #0 - bl ov21_021DF6B4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DF374 - - thumb_func_start ov21_021DF3F0 -ov21_021DF3F0: ; 0x021DF3F0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r2, #0x10] - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021DF410 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021DF41A -_021DF410: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021DF41A: - add r4, r0, #0 - cmp r4, #1 - bne _021DF442 - cmp r6, #1 - bne _021DF434 - add r0, r7, #0 - bl ov21_021DF680 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D2360 - b _021DF448 -_021DF434: - add r0, r5, #0 - bl ov21_021DEF8C - add r0, r5, #0 - bl ov21_021DEF3C - b _021DF448 -_021DF442: - add r0, r5, #0 - bl ov21_021DF6B4 -_021DF448: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DF3F0 - - thumb_func_start ov21_021DF44C -ov21_021DF44C: ; 0x021DF44C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021DF64C - cmp r6, #0 - bne _021DF472 - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - add r0, r7, #0 - mov r3, #4 - bl ov21_021DF6C4 - add r0, r7, #0 - bl ov21_021DF6FC -_021DF472: - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - beq _021DF4CC - cmp r6, #0 - beq _021DF4A8 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r2, r1, #0 - sub r2, #0x14 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021DF4A8: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r3, r1, #0 - sub r3, #0x14 - bl ov21_021D23F8 -_021DF4CC: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DF44C - - thumb_func_start ov21_021DF4D0 -ov21_021DF4D0: ; 0x021DF4D0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bne _021DF4F0 - bl ov21_021DF6E0 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DF718 - str r0, [sp, #4] - b _021DF4F6 -_021DF4F0: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] -_021DF4F6: - ldr r0, [r6, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r4, #0] - beq _021DF510 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #8] - b _021DF51C -_021DF510: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC - str r0, [sp, #8] -_021DF51C: - mov r1, #0 - add r2, sp, #0 -_021DF520: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021DF52E - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #3 - blt _021DF520 -_021DF52E: - cmp r1, #3 - bne _021DF542 - cmp r7, #1 - bne _021DF53C - add r0, r5, #0 - bl ov21_021DF680 -_021DF53C: - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021DF542: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DF4D0 - - thumb_func_start ov21_021DF548 -ov21_021DF548: ; 0x021DF548 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021DF64C - ldr r0, [r5, #0] - mov r1, #1 - bl ov21_021D2360 - cmp r6, #0 - bne _021DF570 - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - add r0, r7, #0 - mov r3, #1 - bl ov21_021DF6C4 -_021DF570: - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - beq _021DF5CA - cmp r6, #0 - beq _021DF5A6 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021DF5A6: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021DF5CA: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF548 - - thumb_func_start ov21_021DF5D0 -ov21_021DF5D0: ; 0x021DF5D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bne _021DF5E6 - bl ov21_021DF6E0 - str r0, [sp] - b _021DF5EA -_021DF5E6: - mov r0, #1 - str r0, [sp] -_021DF5EA: - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021DF604 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #4] - b _021DF610 -_021DF604: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC - str r0, [sp, #4] -_021DF610: - mov r1, #0 - add r2, sp, #0 -_021DF614: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021DF622 - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #2 - blt _021DF614 -_021DF622: - cmp r1, #2 - bne _021DF646 - cmp r6, #1 - bne _021DF63A - add r0, r7, #0 - bl ov21_021DF680 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D2360 - b _021DF640 -_021DF63A: - add r0, r5, #0 - bl ov21_021DEF3C -_021DF640: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DF646: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DF5D0 - - thumb_func_start ov21_021DF64C -ov21_021DF64C: ; 0x021DF64C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r4, #0 - add r5, r7, #0 - mov r6, #1 -_021DF656: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DF662 - add r1, r6, #0 - bl sub_02021FE0 -_021DF662: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DF656 - ldr r0, [r7, #0xc] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r7, #0x10] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF64C - - thumb_func_start ov21_021DF680 -ov21_021DF680: ; 0x021DF680 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r4, #0 - add r5, r7, #0 - add r6, r4, #0 -_021DF68A: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021DF696 - add r1, r6, #0 - bl sub_02021FE0 -_021DF696: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021DF68A - ldr r0, [r7, #0xc] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r7, #0x10] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF680 - - thumb_func_start ov21_021DF6B4 -ov21_021DF6B4: ; 0x021DF6B4 - mov r1, #0x5b - ldr r0, [r0, #0] - lsl r1, r1, #2 - ldr r3, _021DF6C0 ; =ov21_021D24FC - add r1, r0, r1 - bx r3 - ; .align 2, 0 -_021DF6C0: .word ov21_021D24FC - thumb_func_end ov21_021DF6B4 - - thumb_func_start ov21_021DF6C4 -ov21_021DF6C4: ; 0x021DF6C4 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - str r2, [sp] - str r3, [sp, #4] - add r0, #0x34 - mov r1, #0x30 - add r2, r4, #0 - mov r3, #0x48 - bl ov21_021D2648 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF6C4 - - thumb_func_start ov21_021DF6E0 -ov21_021DF6E0: ; 0x021DF6E0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x34 - bl ov21_021D2664 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r5, #0x34] - ldr r2, [r5, #0x38] - bl ov21_021D2164 - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DF6E0 - - thumb_func_start ov21_021DF6FC -ov21_021DF6FC: ; 0x021DF6FC - push {r3, lr} - sub sp, #8 - mov r1, #0x52 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - add r0, #0x54 - mov r1, #0xac - mov r2, #0xaa - mov r3, #0x20 - bl ov21_021D2648 - add sp, #8 - pop {r3, pc} - thumb_func_end ov21_021DF6FC - - thumb_func_start ov21_021DF718 -ov21_021DF718: ; 0x021DF718 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x54 - bl ov21_021D2664 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r5, #0x54] - ldr r2, [r5, #0x58] - bl ov21_021D1848 - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DF718 - - thumb_func_start ov21_021DF734 -ov21_021DF734: ; 0x021DF734 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - bl ov21_021DF7CC - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021DF80C - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0x20] - bl ov21_021DF86C - str r0, [r5, #0x24] - ldr r0, _021DF774 ; =ov21_021DF888 - str r0, [r5, #8] - ldr r0, _021DF778 ; =ov21_021DF8B0 - str r0, [r5, #0xc] - ldr r0, _021DF77C ; =ov21_021DF8C0 - str r0, [r5, #0x10] - ldr r0, _021DF780 ; =ov21_021DF8C4 - str r0, [r5, #0x14] - ldr r0, _021DF784 ; =ov21_021DF958 - str r0, [r5, #0x18] - ldr r0, _021DF788 ; =ov21_021DFA18 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DF774: .word ov21_021DF888 -_021DF778: .word ov21_021DF8B0 -_021DF77C: .word ov21_021DF8C0 -_021DF780: .word ov21_021DF8C4 -_021DF784: .word ov21_021DF958 -_021DF788: .word ov21_021DFA18 - thumb_func_end ov21_021DF734 - - thumb_func_start ov21_021DF78C -ov21_021DF78C: ; 0x021DF78C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021DF844 - ldr r0, [r4, #4] - bl ov21_021DF858 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF78C - - thumb_func_start ov21_021DF7A0 -ov21_021DF7A0: ; 0x021DF7A0 - push {r3, r4, r5, lr} - ldr r4, [r0, #0] - ldr r0, [r0, #4] - add r2, r1, #0 - ldr r0, [r0, #4] - cmp r0, #1 - bne _021DF7B2 - mov r0, #0 - pop {r3, r4, r5, pc} -_021DF7B2: - ldr r5, [r4, #0x14] - ldr r0, [r4, #0xc] - ldr r3, [r4, #0x10] - add r1, r5, #0 - bl ov21_021DF870 - str r0, [r4, #0x14] - cmp r5, r0 - beq _021DF7C8 - mov r0, #1 - pop {r3, r4, r5, pc} -_021DF7C8: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DF7A0 - - thumb_func_start ov21_021DF7CC -ov21_021DF7CC: ; 0x021DF7CC - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bne _021DF7DE - bl sub_02022974 -_021DF7DE: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021DF7E4: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021DF7E4 - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF7CC - - thumb_func_start ov21_021DF80C -ov21_021DF80C: ; 0x021DF80C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021DF81E - bl sub_02022974 -_021DF81E: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DF80C - - thumb_func_start ov21_021DF844 -ov21_021DF844: ; 0x021DF844 - push {r4, lr} - add r4, r0, #0 - bne _021DF84E - bl sub_02022974 -_021DF84E: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF844 - - thumb_func_start ov21_021DF858 -ov21_021DF858: ; 0x021DF858 - push {r4, lr} - add r4, r0, #0 - bne _021DF862 - bl sub_02022974 -_021DF862: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF858 - - thumb_func_start ov21_021DF86C -ov21_021DF86C: ; 0x021DF86C - mov r0, #0 - bx lr - thumb_func_end ov21_021DF86C - - thumb_func_start ov21_021DF870 -ov21_021DF870: ; 0x021DF870 - cmp r2, #0 - ble _021DF87E - add r2, r1, r2 - cmp r2, r3 - blt _021DF884 - mov r2, #0 - b _021DF884 -_021DF87E: - add r0, r1, r2 - bpl _021DF884 - sub r2, r3, #1 -_021DF884: - add r0, r2, #0 - bx lr - thumb_func_end ov21_021DF870 - - thumb_func_start ov21_021DF888 -ov21_021DF888: ; 0x021DF888 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r5, r0, #0 - add r1, r4, #0 - bl ov21_021E01CC - str r0, [r4, #0xc] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E0268 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DF888 - - thumb_func_start ov21_021DF8B0 -ov21_021DF8B0: ; 0x021DF8B0 - ldr r0, [r0, #0xc] - cmp r0, #1 - bne _021DF8BA - mov r0, #1 - bx lr -_021DF8BA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021DF8B0 - - thumb_func_start ov21_021DF8C0 -ov21_021DF8C0: ; 0x021DF8C0 - mov r0, #1 - bx lr - thumb_func_end ov21_021DF8C0 - - thumb_func_start ov21_021DF8C4 -ov21_021DF8C4: ; 0x021DF8C4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021DF94E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DF8E0: ; jump table - .short _021DF8E8 - _021DF8E0 - 2 ; case 0 - .short _021DF910 - _021DF8E0 - 2 ; case 1 - .short _021DF92E - _021DF8E0 - 2 ; case 2 - .short _021DF944 - _021DF8E0 - 2 ; case 3 -_021DF8E8: - ldr r0, [r4, #4] - mov r1, #0xd0 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0xd0 - bl sub_020D5124 - ldr r0, [r4, #8] - ldr r1, [r7, #0xc] - add r0, #0xc8 - str r1, [r0, #0] - mov r0, #0 - str r0, [r5, #4] - str r0, [r5, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DF94E -_021DF910: - ldr r3, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021DFA84 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021DFF38 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DF94E -_021DF92E: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021DFFA8 - cmp r0, #0 - beq _021DF94E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DF94E -_021DF944: - ldr r0, _021DF954 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DF94E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DF954: .word 0x04000050 - thumb_func_end ov21_021DF8C4 - - thumb_func_start ov21_021DF958 -ov21_021DF958: ; 0x021DF958 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #0 - beq _021DF974 - cmp r0, #1 - beq _021DF9C0 - cmp r0, #2 - beq _021DF9D8 - b _021DFA04 -_021DF974: - add r0, r6, #0 - add r0, #0xcc - ldr r1, [r7, #0x14] - ldr r0, [r0, #0] - cmp r1, r0 - beq _021DFA08 - add r0, r6, #0 - add r0, #0xcc - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r6, #0 - add r1, r2, r1 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E0094 - add r0, r6, #0 - bl ov21_021E0C10 - mov r0, #1 - str r0, [r5, #4] - ldr r0, _021DFA14 ; =0x0000068B - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DFA08 -_021DF9C0: - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E00B8 - cmp r0, #1 - bne _021DFA08 - mov r0, #1 - str r0, [r5, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DFA08 -_021DF9D8: - ldr r0, [r5, #8] - cmp r0, #1 - bne _021DFA08 - ldr r0, [r7, #0xc] - add r1, r5, #0 - str r0, [sp] - ldr r0, [r7, #0x14] - str r0, [sp, #4] - ldr r3, [r4, #4] - add r0, r6, #0 - bl ov21_021E0944 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021DFBB4 - mov r0, #0 - str r0, [r5, #8] - str r0, [r5, #4] - str r0, [r4, #0] - b _021DFA08 -_021DFA04: - bl sub_02022974 -_021DFA08: - add r0, r6, #0 - bl ov21_021E0C30 - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DFA14: .word 0x0000068B - thumb_func_end ov21_021DF958 - - thumb_func_start ov21_021DFA18 -ov21_021DFA18: ; 0x021DFA18 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r3, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021DFA7E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DFA32: ; jump table - .short _021DFA3C - _021DFA32 - 2 ; case 0 - .short _021DFA4C - _021DFA32 - 2 ; case 1 - .short _021DFA60 - _021DFA32 - 2 ; case 2 - .short _021DFA6E - _021DFA32 - 2 ; case 3 - .short _021DFA7A - _021DFA32 - 2 ; case 4 -_021DFA3C: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DFF38 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DFA7E -_021DFA4C: - add r1, r3, #0 - mov r3, #0 - bl ov21_021DFFA8 - cmp r0, #0 - beq _021DFA7E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DFA7E -_021DFA60: - add r1, r3, #0 - bl ov21_021DFACC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DFA7E -_021DFA6E: - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DFA7E -_021DFA7A: - mov r0, #1 - pop {r4, pc} -_021DFA7E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFA18 - - thumb_func_start ov21_021DFA84 -ov21_021DFA84: ; 0x021DFA84 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - add r5, r1, #0 - add r6, r3, #0 - add r4, r2, #0 - bl ov21_021DFB50 - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov21_021DFD1C - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021DFAE8 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021DFE0C - ldr r0, [r4, #0xc] - add r1, r5, #0 - str r0, [sp] - ldr r0, [r4, #0x14] - add r2, r4, #0 - str r0, [sp, #4] - add r0, r7, #0 - add r3, r6, #0 - bl ov21_021E08D0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFA84 - - thumb_func_start ov21_021DFACC -ov21_021DFACC: ; 0x021DFACC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E0BF8 - add r0, r5, #0 - bl ov21_021DFF18 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021DFDC8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFACC - - thumb_func_start ov21_021DFAE8 -ov21_021DFAE8: ; 0x021DFAE8 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x32 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFAE8 - - thumb_func_start ov21_021DFB50 -ov21_021DFB50: ; 0x021DFB50 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - add r6, r0, #0 - ldr r0, [r4, #4] - add r5, r1, #0 - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r4, #0xc] - add r1, r5, #0 - str r0, [sp] - ldr r0, [r4, #0x14] - add r2, r4, #0 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r3, r7, #0 - bl ov21_021DFBEC - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x14] - ldr r3, [r4, #0x10] - mov r2, #1 - bl ov21_021DF870 - ldr r1, [r4, #0xc] - add r2, r4, #0 - str r1, [sp] - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - add r3, r7, #0 - bl ov21_021DFBEC - mov r4, #0 - mov r6, #1 -_021DFBA0: - ldr r0, [r5, #0] - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021D2280 - add r4, r4, #1 - cmp r4, #4 - blt _021DFBA0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DFB50 - - thumb_func_start ov21_021DFBB4 -ov21_021DFBB4: ; 0x021DFBB4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - add r6, r1, #0 - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x14] - ldr r3, [r4, #0x10] - mov r2, #1 - bl ov21_021DF870 - ldr r1, [r4, #0xc] - add r2, r4, #0 - str r1, [sp] - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov21_021DFBEC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021DFBB4 - - thumb_func_start ov21_021DFBEC -ov21_021DFBEC: ; 0x021DFBEC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r5, [sp, #0x30] - add r6, r0, #0 - add r7, r1, #0 - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r4, [sp, #0x2c] - cmp r5, #2 - ble _021DFC04 - bl sub_02022974 -_021DFC04: - ldr r0, [sp, #0x28] - cmp r0, #0xc - bhi _021DFCF8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DFC16: ; jump table - .short _021DFC30 - _021DFC16 - 2 ; case 0 - .short _021DFC30 - _021DFC16 - 2 ; case 1 - .short _021DFC30 - _021DFC16 - 2 ; case 2 - .short _021DFC30 - _021DFC16 - 2 ; case 3 - .short _021DFC6C - _021DFC16 - 2 ; case 4 - .short _021DFC80 - _021DFC16 - 2 ; case 5 - .short _021DFC44 - _021DFC16 - 2 ; case 6 - .short _021DFC58 - _021DFC16 - 2 ; case 7 - .short _021DFC94 - _021DFC16 - 2 ; case 8 - .short _021DFCA8 - _021DFC16 - 2 ; case 9 - .short _021DFCBC - _021DFC16 - 2 ; case 10 - .short _021DFCD0 - _021DFC16 - 2 ; case 11 - .short _021DFCE4 - _021DFC16 - 2 ; case 12 -_021DFC30: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E0354 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFC44: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E03EC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFC58: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E0478 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFC6C: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E0504 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFC80: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E0590 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFC94: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E061C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFCA8: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E06A8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFCBC: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E072C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFCD0: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E07B8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFCE4: - ldr r2, [sp, #8] - str r4, [sp] - ldr r3, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - str r5, [sp, #4] - bl ov21_021E0844 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DFCF8: - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021DFBEC - - thumb_func_start ov21_021DFD00 -ov21_021DFD00: ; 0x021DFD00 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021DFD08: - ldr r0, [r5, #0] - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021D2280 - add r4, r4, #1 - cmp r4, #4 - blt _021DFD08 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFD00 - - thumb_func_start ov21_021DFD1C -ov21_021DFD1C: ; 0x021DFD1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021DFDB8 ; =0x0000372A - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x7a - bl sub_02009A4C - str r0, [r5, #0x10] - bl sub_0200A3DC - ldr r0, [r5, #0x10] - bl sub_02009D4C - ldr r0, _021DFDBC ; =0x000036C6 - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x16 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x14] - bl sub_0200A640 - ldr r0, [r5, #0x14] - bl sub_02009D4C - ldr r0, _021DFDC0 ; =0x0000372B - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x7b - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x18] - ldr r0, _021DFDC4 ; =0x00003729 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x79 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x1c] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DFDB8: .word 0x0000372A -_021DFDBC: .word 0x000036C6 -_021DFDC0: .word 0x0000372B -_021DFDC4: .word 0x00003729 - thumb_func_end ov21_021DFD1C - - thumb_func_start ov21_021DFDC8 -ov21_021DFDC8: ; 0x021DFDC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x14] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x10] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x14] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x18] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x1c] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021DFDC8 - - thumb_func_start ov21_021DFE0C -ov21_021DFE0C: ; 0x021DFE0C - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - add r5, r3, #0 - ldr r4, [r1, #0] - ldr r3, _021DFF14 ; =0x00003729 - add r6, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #3 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - str r2, [sp, #0x2c] - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x58 - sub r2, #0x63 - add r3, r3, #2 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r4, #0 - str r0, [sp, #0x38] - add r0, sp, #0x58 - str r0, [sp, #0x3c] - mov r0, #0x20 - str r0, [sp, #0x4c] - mov r0, #1 - str r5, [sp, #0x54] - str r0, [sp, #0x50] - str r4, [sp, #0x40] - str r4, [sp, #0x44] - add r5, r6, #0 - mov r7, #0x1f -_021DFE7A: - add r0, r4, #0 - add r1, sp, #0x34 - add r2, sp, #0x30 - bl ov21_021E0B24 - ldr r0, [sp, #0x34] - lsl r0, r0, #0xc - str r0, [sp, #0x40] - ldr r0, [sp, #0x30] - add r0, #8 - lsl r0, r0, #0xc - str r0, [sp, #0x44] - add r0, sp, #0x38 - bl sub_02021B90 - str r0, [r5, #0] - lsr r1, r4, #0x1f - lsl r0, r4, #0x1f - sub r0, r0, r1 - ror r0, r7 - add r0, r1, r0 - ldr r0, [r5, #0] - bne _021DFEB0 - mov r1, #0 - bl sub_02021D6C - b _021DFEB6 -_021DFEB0: - mov r1, #2 - bl sub_02021D6C -_021DFEB6: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021DFE7A - mov r0, #0x3e - lsl r0, r0, #0xe - str r0, [sp, #0x40] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x44] - mov r0, #0 - str r0, [sp, #0x4c] - add r0, sp, #0x38 - bl sub_02021B90 - add r1, r6, #0 - add r1, #0xbc - str r0, [r1, #0] - add r0, r6, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021D6C - add r0, r6, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CC8 - add r0, r6, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021E80 - ldr r0, [sp, #0x2c] - ldr r0, [r0, #0x10] - cmp r0, #1 - bgt _021DFF10 - add r6, #0xbc - ldr r0, [r6, #0] - mov r1, #0 - bl sub_02021CAC -_021DFF10: - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DFF14: .word 0x00003729 - thumb_func_end ov21_021DFE0C - - thumb_func_start ov21_021DFF18 -ov21_021DFF18: ; 0x021DFF18 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021DFF20: - ldr r0, [r5, #0] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021DFF20 - add r6, #0xbc - ldr r0, [r6, #0] - bl sub_02021BD4 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021DFF18 - - thumb_func_start ov21_021DFF38 -ov21_021DFF38: ; 0x021DFF38 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021DFFF8 - ldr r0, [r4, #8] - bl ov21_021E2A54 - cmp r0, #0 - beq _021DFF9E - cmp r6, #0 - beq _021DFF7A - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - b _021DFF9E -_021DFF7A: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021DFF9E: - add r0, r5, #0 - bl ov21_021E0078 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021DFF38 - - thumb_func_start ov21_021DFFA8 -ov21_021DFFA8: ; 0x021DFFA8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021DFFC8 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021DFFD2 -_021DFFC8: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021DFFD2: - add r4, r0, #0 - cmp r4, #1 - bne _021DFFEC - cmp r6, #1 - bne _021DFFE4 - add r0, r7, #0 - bl ov21_021E0038 - b _021DFFF2 -_021DFFE4: - add r0, r5, #0 - bl ov21_021DFD00 - b _021DFFF2 -_021DFFEC: - add r0, r5, #0 - bl ov21_021E0078 -_021DFFF2: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFFA8 - - thumb_func_start ov21_021DFFF8 -ov21_021DFFF8: ; 0x021DFFF8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - mov r7, #1 -_021E0002: - ldr r0, [r4, #0] - add r1, r7, #0 - bl sub_02021FE0 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _021E0002 - add r0, r5, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021FE0 - mov r4, #0 - mov r6, #1 -_021E0022: - ldr r0, [r5, #0x20] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E0022 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021DFFF8 - - thumb_func_start ov21_021E0038 -ov21_021E0038: ; 0x021E0038 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_021E0042: - ldr r0, [r4, #0] - add r1, r7, #0 - bl sub_02021FE0 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _021E0042 - add r0, r5, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021FE0 - mov r4, #0 - add r6, r4, #0 -_021E0062: - ldr r0, [r5, #0x20] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E0062 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0038 - - thumb_func_start ov21_021E0078 -ov21_021E0078: ; 0x021E0078 - push {r4, r5, r6, lr} - mov r6, #0x5b - add r5, r0, #0 - mov r4, #0 - lsl r6, r6, #2 -_021E0082: - ldr r0, [r5, #0] - add r2, r4, #0 - add r1, r0, r6 - bl ov21_021D251C - add r4, r4, #1 - cmp r4, #4 - blt _021E0082 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E0078 - - thumb_func_start ov21_021E0094 -ov21_021E0094: ; 0x021E0094 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0xff - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - mvn r7, r7 -_021E00A0: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #0 - str r4, [sp] - bl ov21_021E00F4 - add r4, r4, #1 - cmp r4, #4 - blt _021E00A0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0094 - - thumb_func_start ov21_021E00B8 -ov21_021E00B8: ; 0x021E00B8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #4] - cmp r0, #0 - bne _021E00C8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E00C8: - mov r4, #0 -_021E00CA: - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021E015C - add r4, r4, #1 - add r7, r0, #0 - cmp r4, #4 - blt _021E00CA - mov r4, #0 -_021E00DE: - ldr r0, [r5, #0x20] - ldr r0, [r0, #0] - bl sub_02012938 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E00DE - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E00B8 - - thumb_func_start ov21_021E00F4 -ov21_021E00F4: ; 0x021E00F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r6, r0, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - add r7, r1, #0 - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r5, [sp, #0x38] - cmp r0, #0 - bne _021E010E - add r4, r5, #0 - b _021E0114 -_021E010E: - sub r4, r5, #2 - bpl _021E0114 - add r4, r4, #4 -_021E0114: - add r0, r5, #0 - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov21_021E0B24 - ldr r0, [r7, #0] - add r1, sp, #0x1c - add r2, sp, #0x18 - add r3, r4, #0 - bl ov21_021D2250 - add r1, r6, #0 - ldr r3, [sp, #0x10] - ldr r2, [sp, #0x14] - mov r0, #0x10 - str r3, [sp] - str r0, [sp, #4] - ldr r4, [sp, #0xc] - add r1, #0x28 - lsl r0, r5, #5 - add r0, r1, r0 - ldr r1, [sp, #8] - add r3, r3, r4 - add r1, r2, r1 - bl ov21_021D2648 - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x10] - sub r1, r1, r0 - lsl r0, r5, #2 - add r0, r6, r0 - add r0, #0xa8 - str r1, [r0, #0] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E00F4 - - thumb_func_start ov21_021E015C -ov21_021E015C: ; 0x021E015C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - add r4, r2, #0 - str r1, [sp] - str r2, [sp, #4] - cmp r0, #0 - beq _021E0176 - sub r4, r4, #2 - bpl _021E0176 - add r4, r4, #4 -_021E0176: - ldr r0, [sp, #4] - add r7, r5, #0 - lsl r6, r0, #5 - add r7, #0x28 - add r0, r7, r6 - bl ov21_021D2664 - str r0, [sp, #8] - add r0, r5, #0 - str r0, [sp, #0xc] - add r0, #0x2c - str r0, [sp, #0xc] - ldr r2, [sp, #0xc] - ldr r0, [sp] - ldr r3, [r2, r6] - ldr r2, [sp, #4] - ldr r0, [r0, #0] - lsl r2, r2, #2 - add r2, r5, r2 - add r2, #0xa8 - ldr r2, [r2, #0] - ldr r1, [r7, r6] - add r2, r3, r2 - add r3, r4, #0 - bl ov21_021D222C - ldr r0, [r7, r6] - add r1, sp, #0x10 - lsl r0, r0, #0xc - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - ldr r0, [r0, r6] - add r0, #8 - lsl r0, r0, #0xc - str r0, [sp, #0x14] - lsl r0, r4, #2 - ldr r0, [r5, r0] - bl sub_02021C50 - ldr r0, [sp, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E015C - - thumb_func_start ov21_021E01CC -ov21_021E01CC: ; 0x021E01CC - push {r3, lr} - ldr r2, _021E0264 ; =0x000001A6 - cmp r0, r2 - bgt _021E020A - bge _021E023E - add r3, r2, #0 - sub r3, #0x24 - cmp r0, r3 - bgt _021E01EA - sub r2, #0x24 - cmp r0, r2 - bge _021E024E - cmp r0, #0xc9 - beq _021E023A - b _021E025E -_021E01EA: - add r3, r2, #0 - sub r3, #9 - cmp r0, r3 - bgt _021E025E - add r3, r2, #0 - sub r3, #0xa - cmp r0, r3 - blt _021E025E - add r3, r2, #0 - sub r3, #0xa - cmp r0, r3 - beq _021E0246 - sub r2, #9 - cmp r0, r2 - beq _021E024A - b _021E025E -_021E020A: - add r3, r2, #0 - add r3, #0x39 - cmp r0, r3 - bgt _021E0222 - add r3, r2, #0 - add r3, #0x39 - cmp r0, r3 - bge _021E025A - add r2, r2, #1 - cmp r0, r2 - beq _021E0242 - b _021E025E -_021E0222: - add r3, r2, #0 - add r3, #0x41 - cmp r0, r3 - bgt _021E0232 - add r2, #0x41 - cmp r0, r2 - beq _021E0256 - b _021E025E -_021E0232: - add r2, #0x46 - cmp r0, r2 - beq _021E0252 - b _021E025E -_021E023A: - mov r0, #8 - pop {r3, pc} -_021E023E: - mov r0, #4 - pop {r3, pc} -_021E0242: - mov r0, #5 - pop {r3, pc} -_021E0246: - mov r0, #6 - pop {r3, pc} -_021E024A: - mov r0, #7 - pop {r3, pc} -_021E024E: - mov r0, #9 - pop {r3, pc} -_021E0252: - mov r0, #0xa - pop {r3, pc} -_021E0256: - mov r0, #0xb - pop {r3, pc} -_021E025A: - mov r0, #0xc - pop {r3, pc} -_021E025E: - bl ov21_021E02F0 - pop {r3, pc} - ; .align 2, 0 -_021E0264: .word 0x000001A6 - thumb_func_end ov21_021E01CC - - thumb_func_start ov21_021E0268 -ov21_021E0268: ; 0x021E0268 - push {r3, lr} - add r2, r0, #0 - ldr r0, _021E02EC ; =0x000001A6 - cmp r2, r0 - bgt _021E02A8 - bge _021E02D6 - add r3, r0, #0 - sub r3, #0x24 - cmp r2, r3 - bgt _021E0288 - sub r0, #0x24 - cmp r2, r0 - bge _021E02D6 - cmp r2, #0xc9 - beq _021E02D6 - b _021E02E0 -_021E0288: - add r3, r0, #0 - sub r3, #9 - cmp r2, r3 - bgt _021E02E0 - add r3, r0, #0 - sub r3, #0xa - cmp r2, r3 - blt _021E02E0 - add r3, r0, #0 - sub r3, #0xa - cmp r2, r3 - beq _021E02D6 - sub r0, #9 - cmp r2, r0 - beq _021E02D6 - b _021E02E0 -_021E02A8: - add r3, r0, #0 - add r3, #0x39 - cmp r2, r3 - bgt _021E02C0 - add r3, r0, #0 - add r3, #0x39 - cmp r2, r3 - bge _021E02D6 - add r0, r0, #1 - cmp r2, r0 - beq _021E02D6 - b _021E02E0 -_021E02C0: - add r3, r0, #0 - add r3, #0x41 - cmp r2, r3 - bgt _021E02D0 - add r0, #0x41 - cmp r2, r0 - beq _021E02D6 - b _021E02E0 -_021E02D0: - add r0, #0x46 - cmp r2, r0 - bne _021E02E0 -_021E02D6: - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D341C - pop {r3, pc} -_021E02E0: - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D33E0 - pop {r3, pc} - nop -_021E02EC: .word 0x000001A6 - thumb_func_end ov21_021E0268 - - thumb_func_start ov21_021E02F0 -ov21_021E02F0: ; 0x021E02F0 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x12 - add r5, r0, #0 - bl sub_020759F0 - cmp r0, #0 - bne _021E0304 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E0304: - cmp r0, #0xfe - bne _021E030C - mov r0, #2 - pop {r3, r4, r5, pc} -_021E030C: - cmp r0, #0xff - bne _021E0314 - mov r0, #3 - pop {r3, r4, r5, pc} -_021E0314: - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov21_021D33E0 - cmp r0, #1 - bne _021E0350 - ldr r0, [r4, #4] - add r1, r5, #0 - mov r2, #0 - bl ov21_021D334C - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _021E0338 - bl sub_02022974 -_021E0338: - cmp r4, #0 - bne _021E0340 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E0340: - cmp r4, #0xfe - bne _021E0348 - mov r0, #2 - pop {r3, r4, r5, pc} -_021E0348: - cmp r4, #0xff - bne _021E0350 - mov r0, #3 - pop {r3, r4, r5, pc} -_021E0350: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E02F0 - - thumb_func_start ov21_021E0354 -ov21_021E0354: ; 0x021E0354 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - ldr r4, [sp, #0x34] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x18 - add r2, sp, #0x14 - str r3, [sp, #0x10] - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E037A - add r0, r4, #0 - b _021E0380 -_021E037A: - sub r0, r4, #2 - bpl _021E0380 - add r0, r0, #4 -_021E0380: - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x10] - str r1, [sp] - ldr r1, [sp, #0x14] - mov r3, #2 - str r1, [sp, #4] - ldr r1, [sp, #0x30] - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - bl ov21_021D19D8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E03A6 - bl sub_02022974 -_021E03A6: - add r0, r4, #1 - add r1, sp, #0x18 - add r2, sp, #0x14 - bl ov21_021E0B24 - add r5, #0xb8 - ldr r1, [r5, #0] - add r0, r4, #1 - cmp r1, #0 - beq _021E03C0 - sub r0, r0, #2 - bpl _021E03C0 - add r0, r0, #4 -_021E03C0: - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x10] - str r1, [sp] - ldr r1, [sp, #0x14] - mov r3, #0 - str r1, [sp, #4] - ldr r1, [sp, #0x30] - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - bl ov21_021D19D8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E03E6 - bl sub_02022974 -_021E03E6: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0354 - - thumb_func_start ov21_021E03EC -ov21_021E03EC: ; 0x021E03EC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E0410 - add r1, r4, #0 - b _021E0416 -_021E0410: - sub r1, r4, #2 - bpl _021E0416 - add r1, r1, #4 -_021E0416: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1B08 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0438 - bl sub_02022974 -_021E0438: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E0452 - sub r1, r1, #2 - bpl _021E0452 - add r1, r1, #4 -_021E0452: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1B08 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0474 - bl sub_02022974 -_021E0474: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E03EC - - thumb_func_start ov21_021E0478 -ov21_021E0478: ; 0x021E0478 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E049C - add r1, r4, #0 - b _021E04A2 -_021E049C: - sub r1, r4, #2 - bpl _021E04A2 - add r1, r1, #4 -_021E04A2: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1B4C - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E04C4 - bl sub_02022974 -_021E04C4: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E04DE - sub r1, r1, #2 - bpl _021E04DE - add r1, r1, #4 -_021E04DE: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1B4C - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0500 - bl sub_02022974 -_021E0500: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E0478 - - thumb_func_start ov21_021E0504 -ov21_021E0504: ; 0x021E0504 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E0528 - add r1, r4, #0 - b _021E052E -_021E0528: - sub r1, r4, #2 - bpl _021E052E - add r1, r1, #4 -_021E052E: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1A78 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0550 - bl sub_02022974 -_021E0550: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E056A - sub r1, r1, #2 - bpl _021E056A - add r1, r1, #4 -_021E056A: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1A78 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E058C - bl sub_02022974 -_021E058C: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E0504 - - thumb_func_start ov21_021E0590 -ov21_021E0590: ; 0x021E0590 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E05B4 - add r1, r4, #0 - b _021E05BA -_021E05B4: - sub r1, r4, #2 - bpl _021E05BA - add r1, r1, #4 -_021E05BA: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1AC0 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E05DC - bl sub_02022974 -_021E05DC: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E05F6 - sub r1, r1, #2 - bpl _021E05F6 - add r1, r1, #4 -_021E05F6: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1AC0 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0618 - bl sub_02022974 -_021E0618: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E0590 - - thumb_func_start ov21_021E061C -ov21_021E061C: ; 0x021E061C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E0640 - add r1, r4, #0 - b _021E0646 -_021E0640: - sub r1, r4, #2 - bpl _021E0646 - add r1, r1, #4 -_021E0646: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1A34 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0668 - bl sub_02022974 -_021E0668: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E0682 - sub r1, r1, #2 - bpl _021E0682 - add r1, r1, #4 -_021E0682: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1A34 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E06A4 - bl sub_02022974 -_021E06A4: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E061C - - thumb_func_start ov21_021E06A8 -ov21_021E06A8: ; 0x021E06A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E06CC - add r1, r4, #0 - b _021E06D2 -_021E06CC: - sub r1, r4, #2 - bpl _021E06D2 - add r1, r1, #4 -_021E06D2: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1B94 - cmp r0, #0xf - bne _021E06F0 - bl sub_02022974 -_021E06F0: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E070A - sub r1, r1, #2 - bpl _021E070A - add r1, r1, #4 -_021E070A: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1B94 - cmp r0, #0xf - bne _021E0728 - bl sub_02022974 -_021E0728: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E06A8 - - thumb_func_start ov21_021E072C -ov21_021E072C: ; 0x021E072C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E0750 - add r1, r4, #0 - b _021E0756 -_021E0750: - sub r1, r4, #2 - bpl _021E0756 - add r1, r1, #4 -_021E0756: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1BD8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0778 - bl sub_02022974 -_021E0778: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E0792 - sub r1, r1, #2 - bpl _021E0792 - add r1, r1, #4 -_021E0792: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1BD8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E07B4 - bl sub_02022974 -_021E07B4: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E072C - - thumb_func_start ov21_021E07B8 -ov21_021E07B8: ; 0x021E07B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E07DC - add r1, r4, #0 - b _021E07E2 -_021E07DC: - sub r1, r4, #2 - bpl _021E07E2 - add r1, r1, #4 -_021E07E2: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1C30 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0804 - bl sub_02022974 -_021E0804: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E081E - sub r1, r1, #2 - bpl _021E081E - add r1, r1, #4 -_021E081E: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1C30 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0840 - bl sub_02022974 -_021E0840: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E07B8 - - thumb_func_start ov21_021E0844 -ov21_021E0844: ; 0x021E0844 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x2c] - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, r4, #0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021E0868 - add r1, r4, #0 - b _021E086E -_021E0868: - sub r1, r4, #2 - bpl _021E086E - add r1, r1, #4 -_021E086E: - ldr r0, [sp, #0xc] - mov r2, #2 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1C88 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E0890 - bl sub_02022974 -_021E0890: - add r0, r4, #1 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov21_021E0B24 - add r5, #0xb8 - ldr r0, [r5, #0] - add r1, r4, #1 - cmp r0, #0 - beq _021E08AA - sub r1, r1, #2 - bpl _021E08AA - add r1, r1, #4 -_021E08AA: - ldr r0, [sp, #0xc] - mov r2, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r6, #0] - ldr r1, [r7, #4] - ldr r3, [sp, #0x10] - bl ov21_021D1C88 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021E08CC - bl sub_02022974 -_021E08CC: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E0844 - - thumb_func_start ov21_021E08D0 -ov21_021E08D0: ; 0x021E08D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - add r1, r5, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - add r4, r2, #0 - add r7, r3, #0 - mov r0, #0 - cmp r1, #0 - beq _021E08EE - sub r0, r0, #2 - bpl _021E08EE - add r0, r0, #4 -_021E08EE: - ldr r1, [sp, #0x28] - add r2, r4, #0 - str r1, [sp] - ldr r1, [sp, #0x2c] - add r3, r7, #0 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E09A4 - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x2c] - ldr r3, [r4, #0x10] - mov r2, #1 - bl ov21_021DF870 - add r2, r5, #0 - add r2, #0xb8 - ldr r2, [r2, #0] - mov r1, #2 - cmp r2, #0 - beq _021E0926 - sub r1, r1, #2 - bpl _021E0926 - add r1, r1, #4 -_021E0926: - ldr r2, [sp, #0x28] - add r3, r7, #0 - str r2, [sp] - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov21_021E09A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E08D0 - - thumb_func_start ov21_021E0944 -ov21_021E0944: ; 0x021E0944 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r2, #0 - add r5, r0, #0 - str r1, [sp, #0x10] - str r3, [sp, #0x14] - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x34] - ldr r3, [r6, #0x10] - mov r2, #1 - bl ov21_021DF870 - str r0, [sp, #0x18] - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - mov r4, #2 - cmp r0, #0 - beq _021E0970 - sub r4, r4, #2 - bpl _021E0970 - add r4, r4, #4 -_021E0970: - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r7, r2, r1 - lsl r0, r7, #2 - add r0, r5, r0 - ldr r0, [r0, #0x20] - bl ov21_021D4D1C - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x10] - str r0, [sp] - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x14] - str r0, [sp, #4] - str r4, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - str r7, [sp, #0xc] - bl ov21_021E09A4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E0944 - - thumb_func_start ov21_021E09A4 -ov21_021E09A4: ; 0x021E09A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - ldr r0, [sp, #0x58] - add r6, r1, #0 - lsl r7, r0, #2 - ldr r0, [r5, r7] - str r2, [sp] - str r3, [sp, #4] - ldr r4, [r6, #0] - cmp r0, #0 - bne _021E09C0 - bl sub_02022974 -_021E09C0: - ldr r1, [sp] - ldr r2, [sp, #0x50] - ldr r3, [sp, #0x54] - add r0, r6, #0 - bl ov21_021E0B64 - str r0, [sp, #8] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0x14] - bl sub_0200A72C - mov r1, #0xb - mvn r1, r1 - str r1, [sp, #0x20] - mov r1, #0x28 - str r1, [sp, #0x24] - mov r1, #3 - str r1, [sp, #0x28] - mov r1, #0 - ldr r2, [sp, #4] - str r1, [sp, #0x2c] - mov r1, #1 - str r0, [sp, #0x18] - str r1, [sp, #0x30] - str r2, [sp, #0x34] - bl sub_0201FAB4 - str r0, [sp, #0xc] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x10 - mov r2, #2 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E0A48 ; =0x000002B9 - ldr r3, [sp, #8] - add r1, r6, #0 - bl ov21_021D4E10 - str r6, [sp, #0x14] - ldr r0, [r5, r7] - add r5, #0x20 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x5c] - lsl r4, r0, #2 - add r0, sp, #0x10 - bl ov21_021D4CA0 - str r0, [r5, r4] - ldr r0, [r5, r4] - ldr r1, [sp, #0xc] - ldr r0, [r0, #0] - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E0A48: .word 0x000002B9 - thumb_func_end ov21_021E09A4 - - thumb_func_start ov21_021E0A4C -ov21_021E0A4C: ; 0x021E0A4C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r0, [r5, #4] - add r6, r2, #0 - bl ov21_021D37BC - add r1, r0, #0 - ldr r0, [r5, #4] - add r2, r6, #0 - bl ov21_021D334C - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _021E0A70 - bl sub_02022974 -_021E0A70: - cmp r5, #0 - beq _021E0A7A - cmp r5, #1 - beq _021E0A7E - b _021E0A82 -_021E0A7A: - mov r4, #0xd - b _021E0A86 -_021E0A7E: - mov r4, #0xe - b _021E0A86 -_021E0A82: - bl sub_02022974 -_021E0A86: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0A4C - - thumb_func_start ov21_021E0A8C -ov21_021E0A8C: ; 0x021E0A8C - mov r0, #0xd - bx lr - thumb_func_end ov21_021E0A8C - - thumb_func_start ov21_021E0A90 -ov21_021E0A90: ; 0x021E0A90 - mov r0, #0xe - bx lr - thumb_func_end ov21_021E0A90 - - thumb_func_start ov21_021E0A94 -ov21_021E0A94: ; 0x021E0A94 - mov r0, #0x15 - bx lr - thumb_func_end ov21_021E0A94 - - thumb_func_start ov21_021E0A98 -ov21_021E0A98: ; 0x021E0A98 - push {r3, lr} - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D33A4 - add r0, #0x11 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0A98 - - thumb_func_start ov21_021E0AA8 -ov21_021E0AA8: ; 0x021E0AA8 - push {r3, lr} - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D33BC - add r0, #0x11 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0AA8 - - thumb_func_start ov21_021E0AB8 -ov21_021E0AB8: ; 0x021E0AB8 - push {r3, lr} - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D3374 - add r0, #0xf - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0AB8 - - thumb_func_start ov21_021E0AC8 -ov21_021E0AC8: ; 0x021E0AC8 - push {r3, lr} - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D338C - add r0, #0xf - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0AC8 - - thumb_func_start ov21_021E0AD8 -ov21_021E0AD8: ; 0x021E0AD8 - mov r0, #0x14 - bx lr - thumb_func_end ov21_021E0AD8 - - thumb_func_start ov21_021E0ADC -ov21_021E0ADC: ; 0x021E0ADC - push {r3, lr} - ldr r0, [r1, #4] - add r1, r2, #0 - bl ov21_021D3404 - add r0, #0x6f - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0ADC - - thumb_func_start ov21_021E0AEC -ov21_021E0AEC: ; 0x021E0AEC - push {r3, lr} - ldr r0, [r1, #4] - mov r1, #0x7b - lsl r1, r1, #2 - bl ov21_021D3410 - add r0, #0x73 - pop {r3, pc} - thumb_func_end ov21_021E0AEC - - thumb_func_start ov21_021E0AFC -ov21_021E0AFC: ; 0x021E0AFC - push {r3, lr} - ldr r0, [r1, #4] - ldr r1, _021E0B0C ; =0x000001E7 - bl ov21_021D3410 - add r0, #0x75 - pop {r3, pc} - nop -_021E0B0C: .word 0x000001E7 - thumb_func_end ov21_021E0AFC - - thumb_func_start ov21_021E0B10 -ov21_021E0B10: ; 0x021E0B10 - push {r3, lr} - ldr r0, [r1, #4] - ldr r1, _021E0B20 ; =0x000001DF - bl ov21_021D3410 - add r0, #0x77 - pop {r3, pc} - nop -_021E0B20: .word 0x000001DF - thumb_func_end ov21_021E0B10 - - thumb_func_start ov21_021E0B24 -ov21_021E0B24: ; 0x021E0B24 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r6, r1, #0 - add r7, r2, #0 - add r5, r4, #0 - cmp r0, #3 - bhi _021E0B5A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E0B3E: ; jump table - .short _021E0B48 - _021E0B3E - 2 ; case 0 - .short _021E0B46 - _021E0B3E - 2 ; case 1 - .short _021E0B50 - _021E0B3E - 2 ; case 2 - .short _021E0B4E - _021E0B3E - 2 ; case 3 -_021E0B46: - mov r4, #0x68 -_021E0B48: - add r4, #0x4c - mov r5, #0x58 - b _021E0B5E -_021E0B4E: - mov r4, #0x68 -_021E0B50: - mov r0, #0x53 - lsl r0, r0, #2 - add r4, r4, r0 - mov r5, #0x58 - b _021E0B5E -_021E0B5A: - bl sub_02022974 -_021E0B5E: - str r4, [r6, #0] - str r5, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E0B24 - - thumb_func_start ov21_021E0B64 -ov21_021E0B64: ; 0x021E0B64 - push {r3, lr} - cmp r2, #0xc - bhi _021E0BF6 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021E0B76: ; jump table - .short _021E0B90 - _021E0B76 - 2 ; case 0 - .short _021E0B98 - _021E0B76 - 2 ; case 1 - .short _021E0BA0 - _021E0B76 - 2 ; case 2 - .short _021E0BA8 - _021E0B76 - 2 ; case 3 - .short _021E0BC0 - _021E0B76 - 2 ; case 4 - .short _021E0BC8 - _021E0B76 - 2 ; case 5 - .short _021E0BB0 - _021E0B76 - 2 ; case 6 - .short _021E0BB8 - _021E0B76 - 2 ; case 7 - .short _021E0BD0 - _021E0B76 - 2 ; case 8 - .short _021E0BD8 - _021E0B76 - 2 ; case 9 - .short _021E0BE0 - _021E0B76 - 2 ; case 10 - .short _021E0BE8 - _021E0B76 - 2 ; case 11 - .short _021E0BF0 - _021E0B76 - 2 ; case 12 -_021E0B90: - add r2, r3, #0 - bl ov21_021E0A4C - pop {r3, pc} -_021E0B98: - add r2, r3, #0 - bl ov21_021E0A8C - pop {r3, pc} -_021E0BA0: - add r2, r3, #0 - bl ov21_021E0A90 - pop {r3, pc} -_021E0BA8: - add r2, r3, #0 - bl ov21_021E0A94 - pop {r3, pc} -_021E0BB0: - add r2, r3, #0 - bl ov21_021E0A98 - pop {r3, pc} -_021E0BB8: - add r2, r3, #0 - bl ov21_021E0AA8 - pop {r3, pc} -_021E0BC0: - add r2, r3, #0 - bl ov21_021E0AB8 - pop {r3, pc} -_021E0BC8: - add r2, r3, #0 - bl ov21_021E0AC8 - pop {r3, pc} -_021E0BD0: - add r2, r3, #0 - bl ov21_021E0AD8 - pop {r3, pc} -_021E0BD8: - add r2, r3, #0 - bl ov21_021E0ADC - pop {r3, pc} -_021E0BE0: - add r2, r3, #0 - bl ov21_021E0AEC - pop {r3, pc} -_021E0BE8: - add r2, r3, #0 - bl ov21_021E0AFC - pop {r3, pc} -_021E0BF0: - add r2, r3, #0 - bl ov21_021E0B10 -_021E0BF6: - pop {r3, pc} - thumb_func_end ov21_021E0B64 - - thumb_func_start ov21_021E0BF8 -ov21_021E0BF8: ; 0x021E0BF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E0BFE: - ldr r0, [r5, #0x20] - bl ov21_021D4D1C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E0BFE - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0BF8 - - thumb_func_start ov21_021E0C10 -ov21_021E0C10: ; 0x021E0C10 - push {r4, lr} - add r4, r0, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02021CAC - add r0, r4, #0 - mov r1, #0x18 - add r0, #0xc0 - str r1, [r0, #0] - mov r0, #1 - add r4, #0xc4 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0C10 - - thumb_func_start ov21_021E0C30 -ov21_021E0C30: ; 0x021E0C30 - push {r4, lr} - add r4, r0, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021E0C66 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - cmp r0, #0 - bgt _021E0C66 - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0 - add r4, #0xc4 - str r0, [r4, #0] -_021E0C66: - pop {r4, pc} - thumb_func_end ov21_021E0C30 - - thumb_func_start ov21_021E0C68 -ov21_021E0C68: ; 0x021E0C68 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - bl ov21_021E0D04 - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021E0D40 - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0x20] - bl ov21_021E0D90 - str r0, [r5, #0x24] - ldr r0, _021E0CA8 ; =ov21_021E0D94 - str r0, [r5, #8] - ldr r0, _021E0CAC ; =ov21_021E0D98 - str r0, [r5, #0xc] - ldr r0, _021E0CB0 ; =ov21_021E0DA8 - str r0, [r5, #0x10] - ldr r0, _021E0CB4 ; =ov21_021E0DAC - str r0, [r5, #0x14] - ldr r0, _021E0CB8 ; =ov21_021E0E8C - str r0, [r5, #0x18] - ldr r0, _021E0CBC ; =ov21_021E0E90 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E0CA8: .word ov21_021E0D94 -_021E0CAC: .word ov21_021E0D98 -_021E0CB0: .word ov21_021E0DA8 -_021E0CB4: .word ov21_021E0DAC -_021E0CB8: .word ov21_021E0E8C -_021E0CBC: .word ov21_021E0E90 - thumb_func_end ov21_021E0C68 - - thumb_func_start ov21_021E0CC0 -ov21_021E0CC0: ; 0x021E0CC0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E0D68 - ldr r0, [r4, #4] - bl ov21_021E0D7C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0CC0 - - thumb_func_start ov21_021E0CD4 -ov21_021E0CD4: ; 0x021E0CD4 - ldr r0, [r0, #0] - str r1, [r0, #8] - str r2, [r0, #0xc] - bx lr - thumb_func_end ov21_021E0CD4 - - thumb_func_start ov21_021E0CDC -ov21_021E0CDC: ; 0x021E0CDC - ldr r0, [r0, #0] - str r1, [r0, #0x14] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E0CDC - - thumb_func_start ov21_021E0CE4 -ov21_021E0CE4: ; 0x021E0CE4 - mov r0, #0 - bx lr - thumb_func_end ov21_021E0CE4 - - thumb_func_start ov21_021E0CE8 -ov21_021E0CE8: ; 0x021E0CE8 - ldr r2, [r0, #0] - mov r0, #1 - cmp r1, #1 - bne _021E0CF4 - mov r1, #0 - add r0, r1, #0 -_021E0CF4: - str r1, [r2, #0x1c] - bx lr - thumb_func_end ov21_021E0CE8 - - thumb_func_start ov21_021E0CF8 -ov21_021E0CF8: ; 0x021E0CF8 - ldr r2, [r0, #0] - mov r0, #0 - str r1, [r2, #0x18] - str r0, [r2, #0x1c] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E0CF8 - - thumb_func_start ov21_021E0D04 -ov21_021E0D04: ; 0x021E0D04 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x20 - bl sub_02018144 - add r4, r0, #0 - bne _021E0D16 - bl sub_02022974 -_021E0D16: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0D04 - - thumb_func_start ov21_021E0D40 -ov21_021E0D40: ; 0x021E0D40 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E0D52 - bl sub_02022974 -_021E0D52: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E0D40 - - thumb_func_start ov21_021E0D68 -ov21_021E0D68: ; 0x021E0D68 - push {r4, lr} - add r4, r0, #0 - bne _021E0D72 - bl sub_02022974 -_021E0D72: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0D68 - - thumb_func_start ov21_021E0D7C -ov21_021E0D7C: ; 0x021E0D7C - push {r4, lr} - add r4, r0, #0 - bne _021E0D86 - bl sub_02022974 -_021E0D86: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0D7C - - thumb_func_start ov21_021E0D90 -ov21_021E0D90: ; 0x021E0D90 - mov r0, #0 - bx lr - thumb_func_end ov21_021E0D90 - - thumb_func_start ov21_021E0D94 -ov21_021E0D94: ; 0x021E0D94 - mov r0, #1 - bx lr - thumb_func_end ov21_021E0D94 - - thumb_func_start ov21_021E0D98 -ov21_021E0D98: ; 0x021E0D98 - ldr r0, [r0, #0xc] - cmp r0, #1 - bne _021E0DA2 - mov r0, #1 - bx lr -_021E0DA2: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E0D98 - - thumb_func_start ov21_021E0DA8 -ov21_021E0DA8: ; 0x021E0DA8 - mov r0, #1 - bx lr - thumb_func_end ov21_021E0DA8 - - thumb_func_start ov21_021E0DAC -ov21_021E0DAC: ; 0x021E0DAC - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r5, [r4, #8] - cmp r0, #3 - bhi _021E0E82 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E0DC8: ; jump table - .short _021E0DD0 - _021E0DC8 - 2 ; case 0 - .short _021E0DEA - _021E0DC8 - 2 ; case 1 - .short _021E0E34 - _021E0DC8 - 2 ; case 2 - .short _021E0E78 - _021E0DC8 - 2 ; case 3 -_021E0DD0: - ldr r0, [r4, #4] - mov r1, #0x58 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x58 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0E82 -_021E0DEA: - ldr r3, [r4, #4] - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E0F4C - ldr r0, [r7, #0x14] - cmp r0, #0 - beq _021E0E04 - cmp r0, #1 - beq _021E0E12 - cmp r0, #2 - beq _021E0E20 - b _021E0E2C -_021E0E04: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E15AC - b _021E0E2C -_021E0E12: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E14D4 - b _021E0E2C -_021E0E20: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E16A8 -_021E0E2C: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0E82 -_021E0E34: - ldr r0, [r7, #0x14] - cmp r0, #0 - beq _021E0E44 - cmp r0, #1 - beq _021E0E52 - cmp r0, #2 - beq _021E0E60 - b _021E0E6C -_021E0E44: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021E1630 - add r1, r0, #0 - b _021E0E6C -_021E0E52: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021E1550 - add r1, r0, #0 - b _021E0E6C -_021E0E60: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021E1730 - add r1, r0, #0 -_021E0E6C: - cmp r1, #0 - beq _021E0E82 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0E82 -_021E0E78: - ldr r0, _021E0E88 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E0E82: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E0E88: .word 0x04000050 - thumb_func_end ov21_021E0DAC - - thumb_func_start ov21_021E0E8C -ov21_021E0E8C: ; 0x021E0E8C - mov r0, #0 - bx lr - thumb_func_end ov21_021E0E8C - - thumb_func_start ov21_021E0E90 -ov21_021E0E90: ; 0x021E0E90 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r5, [r4, #0] - add r3, r0, #0 - add r1, r2, #0 - ldr r0, [r4, #8] - cmp r5, #4 - bhi _021E0F46 - add r5, r5, r5 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_021E0EAC: ; jump table - .short _021E0EB6 - _021E0EAC - 2 ; case 0 - .short _021E0EEA - _021E0EAC - 2 ; case 1 - .short _021E0F28 - _021E0EAC - 2 ; case 2 - .short _021E0F36 - _021E0EAC - 2 ; case 3 - .short _021E0F42 - _021E0EAC - 2 ; case 4 -_021E0EB6: - ldr r1, [r1, #0x14] - cmp r1, #0 - beq _021E0EC6 - cmp r1, #1 - beq _021E0ED0 - cmp r1, #2 - beq _021E0EDA - b _021E0EE2 -_021E0EC6: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E15AC - b _021E0EE2 -_021E0ED0: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E14D4 - b _021E0EE2 -_021E0EDA: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E16A8 -_021E0EE2: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0F46 -_021E0EEA: - ldr r1, [r1, #0x14] - cmp r1, #0 - beq _021E0EFA - cmp r1, #1 - beq _021E0F06 - cmp r1, #2 - beq _021E0F12 - b _021E0F1C -_021E0EFA: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E1630 - add r2, r0, #0 - b _021E0F1C -_021E0F06: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E1550 - add r2, r0, #0 - b _021E0F1C -_021E0F12: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E1730 - add r2, r0, #0 -_021E0F1C: - cmp r2, #0 - beq _021E0F46 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0F46 -_021E0F28: - add r1, r3, #0 - bl ov21_021E0F94 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0F46 -_021E0F36: - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E0F46 -_021E0F42: - mov r0, #1 - pop {r3, r4, r5, pc} -_021E0F46: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0E90 - - thumb_func_start ov21_021E0F4C -ov21_021E0F4C: ; 0x021E0F4C - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E11DC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E1228 - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov21_021E127C - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov21_021E136C - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E0FBC - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E10D0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0F4C - - thumb_func_start ov21_021E0F94 -ov21_021E0F94: ; 0x021E0F94 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl ov21_021E14BC - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E1328 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E0F94 - - thumb_func_start ov21_021E0FBC -ov21_021E0FBC: ; 0x021E0FBC - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x32 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x33 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r1, #3 - str r1, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r3, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x37 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r6, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #0x10 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x38 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r4, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #8 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E0FBC - - thumb_func_start ov21_021E10D0 -ov21_021E10D0: ; 0x021E10D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r4, r1, #0 - str r2, [sp, #0x10] - mov r0, #0x40 - add r1, r2, #0 - bl sub_02023790 - str r0, [sp, #0x18] - ldr r2, _021E1180 ; =0x000002B9 - ldr r3, [sp, #0x10] - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - str r0, [sp, #0x14] - ldr r0, [r4, #4] - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37CC - cmp r0, #2 - beq _021E110A - mov r7, #0 - bl sub_02022974 -_021E110A: - ldr r0, [r4, #0x18] - bl ov21_021E185C - add r1, r0, #0 - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x18] - bl sub_0200B1B8 - mov r0, #0 - ldr r1, [sp, #0x18] - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #0x48 - str r0, [sp] - mov r1, #0 - lsr r6, r3, #0x1f - add r6, r3, r6 - ldr r0, _021E1184 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - ldr r2, [sp, #0x18] - asr r6, r6, #1 - mov r3, #0xb0 - add r0, r0, #4 - sub r3, r3, r6 - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_0200B190 - ldr r0, [r4, #0x1c] - ldr r1, [sp, #0x10] - str r0, [sp] - ldr r3, [r4, #0x18] - add r0, r5, #0 - add r2, r7, #0 - bl ov21_021E1188 - ldr r1, [sp, #0x10] - ldr r3, [r4, #0x18] - add r0, r5, #0 - add r2, r7, #0 - bl ov21_021E18A0 - ldr r1, [sp, #0x10] - ldr r3, [r4, #0x18] - add r0, r5, #0 - add r2, r7, #0 - bl ov21_021E18DC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E1180: .word 0x000002B9 -_021E1184: .word 0x00020100 - thumb_func_end ov21_021E10D0 - - thumb_func_start ov21_021E1188 -ov21_021E1188: ; 0x021E1188 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r1, #0 - add r0, r2, #0 - add r1, r3, #0 - ldr r2, [sp, #0x20] - add r3, r4, #0 - bl ov21_021D56BC - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002EB4 - cmp r0, #0xf0 - bhs _021E11B4 - lsr r1, r0, #1 - mov r0, #0x80 - sub r3, r0, r1 - b _021E11B6 -_021E11B4: - mov r3, #8 -_021E11B6: - mov r0, #0x88 - str r0, [sp] - mov r1, #0 - ldr r0, _021E11D8 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - add r0, r4, #0 - bl ov21_021D5600 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E11D8: .word 0x00020100 - thumb_func_end ov21_021E1188 - - thumb_func_start ov21_021E11DC -ov21_021E11DC: ; 0x021E11DC - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - add r6, r2, #0 - bl ov21_021D375C - add r3, r0, #0 - mov r0, #0x2b - lsl r0, r0, #0xe - str r0, [sp] - mov r0, #2 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #4] - add r2, r6, #0 - bl ov21_021D1778 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D238C - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E11DC - - thumb_func_start ov21_021E1210 -ov21_021E1210: ; 0x021E1210 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov21_021D23C0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov21_021D2360 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1210 - - thumb_func_start ov21_021E1228 -ov21_021E1228: ; 0x021E1228 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov21_021D2170 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r2, r0, #0 - mov r0, #0x30 - str r0, [sp] - mov r0, #0x48 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #4] - mov r3, #2 - bl ov21_021D1890 - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E1228 - - thumb_func_start ov21_021E1260 -ov21_021E1260: ; 0x021E1260 - push {r4, lr} - ldr r0, [r0, #0] - bl ov21_021D2170 - add r4, r0, #0 - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - add r0, r4, #0 - bl sub_02008780 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1260 - - thumb_func_start ov21_021E127C -ov21_021E127C: ; 0x021E127C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E1318 ; =0x00000FFA - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x5a - bl sub_02009A4C - str r0, [r5, #8] - bl sub_0200A3DC - ldr r0, [r5, #8] - bl sub_02009D4C - ldr r0, _021E131C ; =0x00000FAD - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xd - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0xc] - bl sub_0200A640 - ldr r0, [r5, #0xc] - bl sub_02009D4C - ldr r0, _021E1320 ; =0x00000FF8 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x58 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x10] - ldr r0, _021E1324 ; =0x00000FF9 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x59 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x14] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E1318: .word 0x00000FFA -_021E131C: .word 0x00000FAD -_021E1320: .word 0x00000FF8 -_021E1324: .word 0x00000FF9 - thumb_func_end ov21_021E127C - - thumb_func_start ov21_021E1328 -ov21_021E1328: ; 0x021E1328 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0xc] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #8] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0xc] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x10] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x14] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E1328 - - thumb_func_start ov21_021E136C -ov21_021E136C: ; 0x021E136C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xa0 - add r6, r0, #0 - add r0, r2, #0 - add r5, r1, #0 - ldr r0, [r0, #4] - str r2, [sp, #0x2c] - add r7, r3, #0 - ldr r4, [r5, #0] - bl ov21_021D37BC - ldr r3, _021E145C ; =0x00000FF9 - str r0, [sp, #0x30] - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #5 - str r2, [sp, #0x10] - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x7c - sub r2, #0x4c - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x5c] - add r0, sp, #0x7c - str r0, [sp, #0x60] - mov r0, #0x20 - str r0, [sp, #0x70] - mov r0, #1 - str r0, [sp, #0x74] - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [sp, #0x64] - mov r0, #0xd - lsl r0, r0, #0xe - str r0, [sp, #0x68] - add r0, sp, #0x5c - str r7, [sp, #0x78] - bl sub_02021B90 - mov r1, #0x11 - str r0, [r6, #0] - bl sub_02021D6C - ldr r0, [sp, #0x2c] - ldr r0, [r0, #4] - bl ov21_021D37CC - cmp r0, #2 - beq _021E1404 - mov r0, #0 - str r0, [sp, #0x30] -_021E1404: - ldr r1, [sp, #0x30] - add r0, r5, #0 - add r2, r7, #0 - bl ov21_021E1460 - add r4, r0, #0 - ldr r0, [r5, #0] - mov r1, #1 - bl ov21_021D2344 - mov r1, #0x15 - ldr r2, [r5, #0] - lsl r1, r1, #4 - ldr r1, [r2, r1] - str r1, [sp, #0x34] - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #0x3c] - ldr r0, [r6, #0] - str r0, [sp, #0x40] - mov r0, #0x4d - mvn r0, r0 - str r0, [sp, #0x44] - add r0, #0x46 - str r0, [sp, #0x48] - mov r0, #0 - str r0, [sp, #0x4c] - mov r0, #0x1f - str r0, [sp, #0x50] - mov r0, #1 - str r0, [sp, #0x54] - str r7, [sp, #0x58] - str r4, [sp, #0x38] - add r0, sp, #0x34 - bl ov21_021D4CA0 - str r0, [r6, #4] - add r0, r4, #0 - bl ov21_021D4DA0 - add sp, #0xa0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E145C: .word 0x00000FF9 - thumb_func_end ov21_021E136C - - thumb_func_start ov21_021E1460 -ov21_021E1460: ; 0x021E1460 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x15 - ldr r1, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r7, r2, #0 - mov r1, #0x12 - mov r2, #2 - bl ov21_021D4D6C - add r4, r0, #0 - add r0, r6, #0 - mov r1, #2 - add r2, r7, #0 - bl ov21_021D566C - add r6, r0, #0 - mov r0, #2 - add r1, r6, #0 - mov r2, #0 - bl sub_02002D7C - cmp r0, #0x88 - bhs _021E149C - mov r1, #0x88 - sub r0, r1, r0 - lsr r3, r0, #1 - b _021E149E -_021E149C: - mov r3, #0 -_021E149E: - mov r0, #0 - str r0, [sp] - mov r0, #0x15 - ldr r1, [r5, #0] - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021D4E80 - add r0, r6, #0 - bl ov21_021D5600 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E1460 - - thumb_func_start ov21_021E14BC -ov21_021E14BC: ; 0x021E14BC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #4] - bl ov21_021D4D1C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E14BC - - thumb_func_start ov21_021E14D4 -ov21_021E14D4: ; 0x021E14D4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #1 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021D2360 - add r0, r7, #0 - bl ov21_021E17AC - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E1546 - cmp r6, #0 - beq _021E1522 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - b _021E1546 -_021E1522: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E1546: - add r0, r5, #0 - bl ov21_021E17DC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E14D4 - - thumb_func_start ov21_021E1550 -ov21_021E1550: ; 0x021E1550 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r2, #0x10] - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021E1570 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021E157A -_021E1570: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021E157A: - add r4, r0, #0 - cmp r4, #1 - bne _021E15A2 - cmp r6, #1 - bne _021E1594 - add r0, r7, #0 - bl ov21_021E17C4 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D2360 - b _021E15A8 -_021E1594: - add r0, r5, #0 - bl ov21_021E1260 - add r0, r5, #0 - bl ov21_021E1210 - b _021E15A8 -_021E15A2: - add r0, r5, #0 - bl ov21_021E17DC -_021E15A8: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E1550 - - thumb_func_start ov21_021E15AC -ov21_021E15AC: ; 0x021E15AC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021E17AC - cmp r6, #0 - bne _021E15D2 - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - add r0, r7, #0 - mov r3, #4 - bl ov21_021E17EC - add r0, r7, #0 - bl ov21_021E1824 -_021E15D2: - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E162C - cmp r6, #0 - beq _021E1608 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E1608: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E162C: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E15AC - - thumb_func_start ov21_021E1630 -ov21_021E1630: ; 0x021E1630 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bne _021E1650 - bl ov21_021E1808 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E1840 - str r0, [sp, #4] - b _021E1656 -_021E1650: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] -_021E1656: - ldr r0, [r6, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r4, #0] - beq _021E1670 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #8] - b _021E167C -_021E1670: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC - str r0, [sp, #8] -_021E167C: - mov r1, #0 - add r2, sp, #0 -_021E1680: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021E168E - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #3 - blt _021E1680 -_021E168E: - cmp r1, #3 - bne _021E16A2 - cmp r7, #1 - bne _021E169C - add r0, r5, #0 - bl ov21_021E17C4 -_021E169C: - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021E16A2: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E1630 - - thumb_func_start ov21_021E16A8 -ov21_021E16A8: ; 0x021E16A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov21_021E17AC - ldr r0, [r5, #0] - mov r1, #1 - bl ov21_021D2360 - cmp r6, #0 - bne _021E16D0 - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - add r0, r7, #0 - mov r3, #1 - bl ov21_021E17EC -_021E16D0: - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E172A - cmp r6, #0 - beq _021E1706 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E1706: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E172A: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E16A8 - - thumb_func_start ov21_021E1730 -ov21_021E1730: ; 0x021E1730 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bne _021E1746 - bl ov21_021E1808 - str r0, [sp] - b _021E174A -_021E1746: - mov r0, #1 - str r0, [sp] -_021E174A: - ldr r0, [r4, #0x10] - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021E1764 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #4] - b _021E1770 -_021E1764: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC - str r0, [sp, #4] -_021E1770: - mov r1, #0 - add r2, sp, #0 -_021E1774: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021E1782 - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #2 - blt _021E1774 -_021E1782: - cmp r1, #2 - bne _021E17A6 - cmp r6, #1 - bne _021E179A - add r0, r7, #0 - bl ov21_021E17C4 - ldr r0, [r5, #0] - mov r1, #0 - bl ov21_021D2360 - b _021E17A0 -_021E179A: - add r0, r5, #0 - bl ov21_021E1210 -_021E17A0: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E17A6: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E1730 - - thumb_func_start ov21_021E17AC -ov21_021E17AC: ; 0x021E17AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #4] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r4, pc} - thumb_func_end ov21_021E17AC - - thumb_func_start ov21_021E17C4 -ov21_021E17C4: ; 0x021E17C4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r4, #4] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r4, pc} - thumb_func_end ov21_021E17C4 - - thumb_func_start ov21_021E17DC -ov21_021E17DC: ; 0x021E17DC - mov r1, #0x5b - ldr r0, [r0, #0] - lsl r1, r1, #2 - ldr r3, _021E17E8 ; =ov21_021D24FC - add r1, r0, r1 - bx r3 - ; .align 2, 0 -_021E17E8: .word ov21_021D24FC - thumb_func_end ov21_021E17DC - - thumb_func_start ov21_021E17EC -ov21_021E17EC: ; 0x021E17EC - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - str r2, [sp] - str r3, [sp, #4] - add r0, #0x18 - mov r1, #0x30 - add r2, r4, #0 - mov r3, #0x48 - bl ov21_021D2648 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E17EC - - thumb_func_start ov21_021E1808 -ov21_021E1808: ; 0x021E1808 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x18 - bl ov21_021D2664 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r5, #0x18] - ldr r2, [r5, #0x1c] - bl ov21_021D2164 - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E1808 - - thumb_func_start ov21_021E1824 -ov21_021E1824: ; 0x021E1824 - push {r3, lr} - sub sp, #8 - mov r1, #0x52 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - add r0, #0x38 - mov r1, #0xac - mov r2, #0xaa - mov r3, #0x20 - bl ov21_021D2648 - add sp, #8 - pop {r3, pc} - thumb_func_end ov21_021E1824 - - thumb_func_start ov21_021E1840 -ov21_021E1840: ; 0x021E1840 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x38 - bl ov21_021D2664 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r5, #0x38] - ldr r2, [r5, #0x3c] - bl ov21_021D1848 - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E1840 - - thumb_func_start ov21_021E185C -ov21_021E185C: ; 0x021E185C - push {r4, lr} - cmp r0, #7 - bhi _021E1896 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E186E: ; jump table - .short _021E1896 - _021E186E - 2 ; case 0 - .short _021E187E - _021E186E - 2 ; case 1 - .short _021E1882 - _021E186E - 2 ; case 2 - .short _021E1886 - _021E186E - 2 ; case 3 - .short _021E188A - _021E186E - 2 ; case 4 - .short _021E188E - _021E186E - 2 ; case 5 - .short _021E1896 - _021E186E - 2 ; case 6 - .short _021E1892 - _021E186E - 2 ; case 7 -_021E187E: - mov r4, #0x7d - b _021E189A -_021E1882: - mov r4, #0x16 - b _021E189A -_021E1886: - mov r4, #0x17 - b _021E189A -_021E188A: - mov r4, #0x19 - b _021E189A -_021E188E: - mov r4, #0x18 - b _021E189A -_021E1892: - mov r4, #0x1a - b _021E189A -_021E1896: - bl sub_02022974 -_021E189A: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E185C - - thumb_func_start ov21_021E18A0 -ov21_021E18A0: ; 0x021E18A0 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r2, #0 - add r1, r3, #0 - add r2, r4, #0 - bl ov21_021D561C - add r4, r0, #0 - mov r0, #0x60 - str r0, [sp] - mov r1, #0 - ldr r0, _021E18D8 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - mov r3, #0x78 - bl sub_0201D78C - add r0, r4, #0 - bl ov21_021D5600 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E18D8: .word 0x00020100 - thumb_func_end ov21_021E18A0 - - thumb_func_start ov21_021E18DC -ov21_021E18DC: ; 0x021E18DC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r2, #0 - add r1, r3, #0 - add r2, r4, #0 - bl ov21_021D566C - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xf0 - sub r3, r1, r0 - mov r0, #0x70 - str r0, [sp] - mov r1, #0 - ldr r0, _021E1920 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - add r0, r4, #0 - bl ov21_021D5600 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E1920: .word 0x00020100 - thumb_func_end ov21_021E18DC - - thumb_func_start ov21_021E1924 -ov21_021E1924: ; 0x021E1924 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E199C - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E19FC - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E1A24 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E1ACC - str r0, [r5, #0x24] - ldr r0, _021E196C ; =ov21_021E1AD0 - str r0, [r5, #8] - ldr r0, _021E1970 ; =ov21_021E1B14 - str r0, [r5, #0xc] - ldr r0, _021E1974 ; =ov21_021E1B54 - str r0, [r5, #0x10] - ldr r0, _021E1978 ; =ov21_021E1B68 - str r0, [r5, #0x14] - ldr r0, _021E197C ; =ov21_021E1BFC - str r0, [r5, #0x18] - ldr r0, _021E1980 ; =ov21_021E1CB8 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E196C: .word ov21_021E1AD0 -_021E1970: .word ov21_021E1B14 -_021E1974: .word ov21_021E1B54 -_021E1978: .word ov21_021E1B68 -_021E197C: .word ov21_021E1BFC -_021E1980: .word ov21_021E1CB8 - thumb_func_end ov21_021E1924 - - thumb_func_start ov21_021E1984 -ov21_021E1984: ; 0x021E1984 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E1A7C - ldr r0, [r4, #0] - bl ov21_021E1A90 - ldr r0, [r4, #0x20] - bl ov21_021E1AA4 - pop {r4, pc} - thumb_func_end ov21_021E1984 - - thumb_func_start ov21_021E199C -ov21_021E199C: ; 0x021E199C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bne _021E19AE - bl sub_02022974 -_021E19AE: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021E19B4: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E19B4 - add r0, r5, #0 - bl ov21_021D13A0 - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1430 - str r0, [r4, #0x14] - add r0, r5, #0 - mov r1, #2 - bl ov21_021D1410 - ldr r0, [r0, #0] - mov r1, #3 - str r0, [r4, #8] - add r0, r5, #0 - bl ov21_021D1410 - str r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #4 - bl ov21_021D1410 - str r0, [r4, #0x10] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E199C - - thumb_func_start ov21_021E19FC -ov21_021E19FC: ; 0x021E19FC - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E1A0E - bl sub_02022974 -_021E1A0E: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E19FC - - thumb_func_start ov21_021E1A24 -ov21_021E1A24: ; 0x021E1A24 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021E1ACC - add r7, r0, #0 - mov r1, #0x14 - mul r7, r1 - add r0, r5, #0 - add r1, r7, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021E1A44 - bl sub_02022974 -_021E1A44: - add r0, r4, #0 - mov r1, #0 - add r2, r7, #0 - bl sub_020D5124 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #1 - bl ov21_021D4A94 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x14 - add r2, r6, #0 - mov r3, #2 - bl ov21_021D4BB4 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x28 - add r2, r6, #0 - mov r3, #4 - bl ov21_021D4AF8 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1A24 - - thumb_func_start ov21_021E1A7C -ov21_021E1A7C: ; 0x021E1A7C - push {r4, lr} - add r4, r0, #0 - bne _021E1A86 - bl sub_02022974 -_021E1A86: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1A7C - - thumb_func_start ov21_021E1A90 -ov21_021E1A90: ; 0x021E1A90 - push {r4, lr} - add r4, r0, #0 - bne _021E1A9A - bl sub_02022974 -_021E1A9A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1A90 - - thumb_func_start ov21_021E1AA4 -ov21_021E1AA4: ; 0x021E1AA4 - push {r4, lr} - add r4, r0, #0 - bne _021E1AAE - bl sub_02022974 -_021E1AAE: - add r0, r4, #0 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x14 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x28 - bl ov21_021D4660 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov21_021E1AA4 - - thumb_func_start ov21_021E1ACC -ov21_021E1ACC: ; 0x021E1ACC - mov r0, #3 - bx lr - thumb_func_end ov21_021E1ACC - - thumb_func_start ov21_021E1AD0 -ov21_021E1AD0: ; 0x021E1AD0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - mov r1, #0x3c - bl sub_02018144 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020D5124 - mov r1, #0 - add r2, r4, #0 - mov r0, #4 -_021E1AEE: - add r1, r1, #1 - str r0, [r2, #0x14] - add r2, r2, #4 - cmp r1, #8 - blt _021E1AEE - mov r0, #0 - str r0, [r4, #0x10] - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E1D40 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E2968 - str r4, [r5, #8] - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E1AD0 - - thumb_func_start ov21_021E1B14 -ov21_021E1B14: ; 0x021E1B14 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021E1B24 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E1B24: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021E1B2E - mov r0, #0 - pop {r3, r4, r5, pc} -_021E1B2E: - ldr r0, [r5, #0x14] - bl ov21_021E33AC - cmp r0, #0 - beq _021E1B4E - add r0, r4, #0 - bl ov21_021E28A8 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E1E00 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E2864 -_021E1B4E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1B14 - - thumb_func_start ov21_021E1B54 -ov21_021E1B54: ; 0x021E1B54 - push {r4, lr} - ldr r4, [r0, #8] - add r0, r4, #0 - bl ov21_021E1E74 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021E1B54 - - thumb_func_start ov21_021E1B68 -ov21_021E1B68: ; 0x021E1B68 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - str r2, [sp] - ldr r7, [r3, #8] - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021E1BF6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E1B86: ; jump table - .short _021E1B8E - _021E1B86 - 2 ; case 0 - .short _021E1BA8 - _021E1B86 - 2 ; case 1 - .short _021E1BCE - _021E1B86 - 2 ; case 2 - .short _021E1BE4 - _021E1B86 - 2 ; case 3 -_021E1B8E: - ldr r0, [r4, #4] - mov r1, #0xc4 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0xc4 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1BF6 -_021E1BA8: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E2014 - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021E28D0 - ldr r2, [sp] - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E25F8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1BF6 -_021E1BCE: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E2664 - cmp r0, #0 - beq _021E1BF6 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1BF6 -_021E1BE4: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D25AC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E1BF6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1B68 - - thumb_func_start ov21_021E1BFC -ov21_021E1BFC: ; 0x021E1BFC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - str r0, [sp, #0x1c] - add r0, r1, #0 - ldr r0, [r0, #8] - ldr r6, [r3, #8] - str r0, [sp, #0x28] - add r0, #0xc0 - str r1, [sp, #0x20] - ldr r1, [r0, #0] - ldr r0, [r6, #0x38] - cmp r1, r0 - beq _021E1C26 - ldr r0, [sp, #0x28] - add r1, r6, #0 - bl ov21_021E28D0 - ldr r0, [sp, #0x28] - ldr r1, [r6, #0x38] - add r0, #0xc0 - str r1, [r0, #0] -_021E1C26: - mov r0, #0 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - ldr r7, [sp, #0x28] - str r0, [sp, #0x24] - add r0, #0xa0 - ldr r5, [sp, #0x28] - str r0, [sp, #0x24] - add r7, #0x80 - add r4, r6, #0 -_021E1C3A: - ldr r0, [sp, #0x2c] - cmp r0, #0 - bne _021E1C44 - mov r1, #4 - b _021E1C46 -_021E1C44: - mov r1, #5 -_021E1C46: - mov r0, #5 - mvn r0, r0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [sp, #0x20] - str r7, [sp, #8] - ldr r0, [r0, #4] - str r0, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - ldr r1, [r5, #0] - ldr r2, [r5, #0x20] - ldr r3, [r4, #0x14] - bl ov21_021E26A0 - ldr r0, [r5, #0x50] - ldr r1, [r4, #0x14] - bl ov21_021D144C - ldr r0, [sp, #0x24] - add r7, r7, #4 - add r0, r0, #4 - str r0, [sp, #0x24] - ldr r0, [sp, #0x2c] - add r4, r4, #4 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0x2c] - cmp r0, #1 - ble _021E1C3A - ldr r0, [sp, #0x28] - mov r4, #2 - add r0, #8 - add r6, #8 - str r0, [sp, #0x28] -_021E1C96: - ldr r0, [sp, #0x28] - ldr r1, [r6, #0x14] - ldr r0, [r0, #0] - add r2, r4, #0 - bl ov21_021E29A4 - ldr r0, [sp, #0x28] - add r4, r4, #1 - add r0, r0, #4 - add r6, r6, #4 - str r0, [sp, #0x28] - cmp r4, #8 - blt _021E1C96 - mov r0, #0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1BFC - - thumb_func_start ov21_021E1CB8 -ov21_021E1CB8: ; 0x021E1CB8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #4 - bhi _021E1D3A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E1CD4: ; jump table - .short _021E1CDE - _021E1CD4 - 2 ; case 0 - .short _021E1D00 - _021E1CD4 - 2 ; case 1 - .short _021E1D16 - _021E1CD4 - 2 ; case 2 - .short _021E1D28 - _021E1CD4 - 2 ; case 3 - .short _021E1D36 - _021E1CD4 - 2 ; case 4 -_021E1CDE: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - bl ov21_021D25AC - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021E25F8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1D3A -_021E1D00: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #0 - bl ov21_021E2664 - cmp r0, #0 - beq _021E1D3A - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1D3A -_021E1D16: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E2044 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1D3A -_021E1D28: - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E1D3A -_021E1D36: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E1D3A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1CB8 - - thumb_func_start ov21_021E1D40 -ov21_021E1D40: ; 0x021E1D40 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #0x20 - bl sub_02018144 - str r0, [r5, #4] - mov r0, #0xd0 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x70 - mov r2, #0x98 - mov r3, #0x30 - bl ov21_021D154C - mov r0, #0xd0 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x38 - add r0, r0, #4 - mov r2, #0x60 - mov r3, #0x30 - bl ov21_021D154C - mov r0, #0x30 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #8 - mov r2, #0xc0 - mov r3, #8 - bl ov21_021D154C - mov r0, #0x58 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #0xc - mov r2, #0xc0 - mov r3, #0x30 - bl ov21_021D154C - mov r0, #0x80 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #0x10 - mov r2, #0xc0 - mov r3, #0x58 - bl ov21_021D154C - mov r0, #0xa8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #0x14 - mov r2, #0xc0 - mov r3, #0x80 - bl ov21_021D154C - mov r0, #0xd0 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #0x18 - mov r2, #0xc0 - mov r3, #0xa8 - bl ov21_021D154C - mov r0, #0xf8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0xa0 - add r0, #0x1c - mov r2, #0xc0 - mov r3, #0xd0 - bl ov21_021D154C - str r4, [r5, #8] - str r5, [r5, #0xc] - str r6, [sp] - add r3, r5, #0 - ldr r0, [r5, #4] - ldr r2, _021E1DFC ; =ov21_021E1E8C - mov r1, #8 - add r3, #8 - bl sub_02023FCC - str r0, [r5, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E1DFC: .word ov21_021E1E8C - thumb_func_end ov21_021E1D40 - - thumb_func_start ov21_021E1E00 -ov21_021E1E00: ; 0x021E1E00 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - add r2, r4, #0 - mov r0, #3 -_021E1E0A: - add r1, r1, #1 - str r0, [r2, #0x14] - add r2, r2, #4 - cmp r1, #8 - blt _021E1E0A - ldr r0, [r4, #0] - bl sub_0202404C - ldr r0, [r4, #0x10] - cmp r0, #5 - bhi _021E1E5A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E1E2C: ; jump table - .short _021E1E38 - _021E1E2C - 2 ; case 0 - .short _021E1E3E - _021E1E2C - 2 ; case 1 - .short _021E1E44 - _021E1E2C - 2 ; case 2 - .short _021E1E4A - _021E1E2C - 2 ; case 3 - .short _021E1E50 - _021E1E2C - 2 ; case 4 - .short _021E1E56 - _021E1E2C - 2 ; case 5 -_021E1E38: - mov r0, #1 - str r0, [r4, #0x1c] - b _021E1E5A -_021E1E3E: - mov r0, #1 - str r0, [r4, #0x20] - b _021E1E5A -_021E1E44: - mov r0, #1 - str r0, [r4, #0x24] - b _021E1E5A -_021E1E4A: - mov r0, #1 - str r0, [r4, #0x28] - b _021E1E5A -_021E1E50: - mov r0, #1 - str r0, [r4, #0x2c] - b _021E1E5A -_021E1E56: - mov r0, #1 - str r0, [r4, #0x30] -_021E1E5A: - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _021E1E66 - cmp r0, #1 - beq _021E1E6C - pop {r4, pc} -_021E1E66: - mov r0, #2 - str r0, [r4, #0x14] - pop {r4, pc} -_021E1E6C: - mov r0, #2 - str r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1E00 - - thumb_func_start ov21_021E1E74 -ov21_021E1E74: ; 0x021E1E74 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E1E74 - - thumb_func_start ov21_021E1E8C -ov21_021E1E8C: ; 0x021E1E8C - push {r3, r4, r5, lr} - ldr r4, [r2, #4] - ldr r5, [r2, #0] - lsl r2, r0, #2 - add r2, r4, r2 - str r1, [r2, #0x14] - cmp r1, #2 - bne _021E1F06 - cmp r0, #7 - bhi _021E1F06 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E1EAC: ; jump table - .short _021E1EBC - _021E1EAC - 2 ; case 0 - .short _021E1EC2 - _021E1EAC - 2 ; case 1 - .short _021E1EC8 - _021E1EAC - 2 ; case 2 - .short _021E1EFE - _021E1EAC - 2 ; case 3 - .short _021E1F36 - _021E1EAC - 2 ; case 4 - .short _021E1F6C - _021E1EAC - 2 ; case 5 - .short _021E1FA2 - _021E1EAC - 2 ; case 6 - .short _021E1FD8 - _021E1EAC - 2 ; case 7 -_021E1EBC: - mov r0, #0 - str r0, [r4, #0x34] - pop {r3, r4, r5, pc} -_021E1EC2: - mov r0, #1 - str r0, [r4, #0x34] - pop {r3, r4, r5, pc} -_021E1EC8: - ldr r0, [r4, #0x38] - mov r1, #1 - tst r0, r1 - beq _021E1F06 - ldr r0, [r4, #0x10] - cmp r0, #0 - ldr r0, [r5, #8] - bne _021E1EDE - bl ov21_021DE6D4 - b _021E1EE6 -_021E1EDE: - mov r1, #0 - bl ov21_021DE6D8 - mov r0, #1 -_021E1EE6: - cmp r0, #0 - beq _021E1F06 - ldr r2, [r4, #0x10] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #0 - bl ov21_021E27C0 - ldr r0, _021E2010 ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021E1EFE: - ldr r1, [r4, #0x38] - mov r0, #2 - tst r0, r1 - bne _021E1F08 -_021E1F06: - b _021E200C -_021E1F08: - ldr r0, [r4, #0x10] - cmp r0, #1 - ldr r0, [r5, #0x10] - bne _021E1F16 - bl ov21_021E0CE4 - b _021E1F1E -_021E1F16: - mov r1, #0 - bl ov21_021E0CE8 - mov r0, #1 -_021E1F1E: - cmp r0, #0 - beq _021E200C - ldr r2, [r4, #0x10] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E27C0 - ldr r0, _021E2010 ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021E1F36: - ldr r1, [r4, #0x38] - mov r0, #4 - tst r0, r1 - beq _021E200C - ldr r0, [r4, #0x10] - cmp r0, #2 - ldr r0, [r5, #0x10] - bne _021E1F4C - bl ov21_021E0CE4 - b _021E1F54 -_021E1F4C: - mov r1, #0 - bl ov21_021E0CE8 - mov r0, #1 -_021E1F54: - cmp r0, #0 - beq _021E200C - ldr r2, [r4, #0x10] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #2 - bl ov21_021E27C0 - ldr r0, _021E2010 ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021E1F6C: - ldr r1, [r4, #0x38] - mov r0, #8 - tst r0, r1 - beq _021E200C - ldr r0, [r4, #0x10] - cmp r0, #3 - ldr r0, [r5, #0x10] - bne _021E1F82 - bl ov21_021E0CE4 - b _021E1F8A -_021E1F82: - mov r1, #0 - bl ov21_021E0CE8 - mov r0, #1 -_021E1F8A: - cmp r0, #0 - beq _021E200C - ldr r2, [r4, #0x10] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #3 - bl ov21_021E27C0 - ldr r0, _021E2010 ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021E1FA2: - ldr r1, [r4, #0x38] - mov r0, #0x10 - tst r0, r1 - beq _021E200C - ldr r0, [r4, #0x10] - cmp r0, #4 - ldr r0, [r5, #0x10] - bne _021E1FB8 - bl ov21_021E0CE4 - b _021E1FC0 -_021E1FB8: - mov r1, #0 - bl ov21_021E0CE8 - mov r0, #1 -_021E1FC0: - cmp r0, #0 - beq _021E200C - ldr r2, [r4, #0x10] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #4 - bl ov21_021E27C0 - ldr r0, _021E2010 ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, pc} -_021E1FD8: - ldr r1, [r4, #0x38] - mov r0, #0x20 - tst r0, r1 - beq _021E200C - ldr r0, [r4, #0x10] - cmp r0, #5 - ldr r0, [r5, #0x10] - bne _021E1FEE - bl ov21_021E0CE4 - b _021E1FF6 -_021E1FEE: - mov r1, #0 - bl ov21_021E0CE8 - mov r0, #1 -_021E1FF6: - cmp r0, #0 - beq _021E200C - ldr r2, [r4, #0x10] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #5 - bl ov21_021E27C0 - ldr r0, _021E2010 ; =0x0000068B - bl sub_02005748 -_021E200C: - pop {r3, r4, r5, pc} - nop -_021E2010: .word 0x0000068B - thumb_func_end ov21_021E1E8C - - thumb_func_start ov21_021E2014 -ov21_021E2014: ; 0x021E2014 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E20A4 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E2180 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E22C8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E2478 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E2014 - - thumb_func_start ov21_021E2044 -ov21_021E2044: ; 0x021E2044 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x20 - add r6, r2, #0 - str r0, [sp] - add r4, r1, #0 - str r6, [sp, #4] - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #4 - mov r3, #0x80 - bl ov21_021D276C - mov r0, #0x20 - str r0, [sp] - str r6, [sp, #4] - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #4 - mov r3, #0xa0 - bl ov21_021D276C - add r0, r5, #0 - bl ov21_021E2458 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E256C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E226C - mov r4, #0 -_021E208A: - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021E2098 - bl sub_020181C4 -_021E2098: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021E208A - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E2044 - - thumb_func_start ov21_021E20A4 -ov21_021E20A4: ; 0x021E20A4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x22 - mov r3, #6 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x3e - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x3c - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r6, r0, #0 - mov r1, #6 - ldr r2, [sp, #0x10] - mov r0, #0xe - str r0, [sp] - ldrh r0, [r2] - add r3, r1, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x3f - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - add r4, r0, #0 - mov r1, #6 - ldr r2, [sp, #0x10] - mov r0, #7 - str r0, [sp] - ldrh r0, [r2] - add r3, r1, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E20A4 - - thumb_func_start ov21_021E2180 -ov21_021E2180: ; 0x021E2180 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E2254 ; =0x000013EE - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x66 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #0x40] - bl sub_0200A3DC - ldr r0, [r5, #0x40] - bl sub_02009D4C - ldr r0, _021E2258 ; =0x000013EC - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x64 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x48] - ldr r0, _021E225C ; =0x000013ED - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x65 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x4c] - ldr r0, _021E2260 ; =0x000013EB - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x63 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #0x70] - bl sub_0200A3DC - ldr r0, [r5, #0x70] - bl sub_02009D4C - ldr r0, _021E2264 ; =0x000013E9 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x61 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x78] - ldr r0, _021E2268 ; =0x000013EA - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x62 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x7c] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021E2254: .word 0x000013EE -_021E2258: .word 0x000013EC -_021E225C: .word 0x000013ED -_021E2260: .word 0x000013EB -_021E2264: .word 0x000013E9 -_021E2268: .word 0x000013EA - thumb_func_end ov21_021E2180 - - thumb_func_start ov21_021E226C -ov21_021E226C: ; 0x021E226C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x40] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x40] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x48] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x4c] - bl sub_02009D68 - ldr r0, [r5, #0x70] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x70] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x78] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x7c] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E226C - - thumb_func_start ov21_021E22C8 -ov21_021E22C8: ; 0x021E22C8 - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - ldr r4, [r1, #0] - ldr r3, _021E2444 ; =0x000013ED - add r7, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - add r5, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r2, _021E2448 ; =0x0000083F - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x50 - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x21 - str r0, [sp, #0x30] - add r0, sp, #0x50 - str r0, [sp, #0x34] - mov r0, #0x1f - str r0, [sp, #0x44] - mov r0, #2 - str r0, [sp, #0x48] - lsl r0, r0, #0x12 - str r0, [sp, #0x38] - mov r0, #3 - lsl r1, r1, #0xe - lsl r0, r0, #0x12 - str r1, [sp, #0x3c] - add r0, r1, r0 - str r0, [sp, #0x3c] - add r0, sp, #0x30 - str r5, [sp, #0x4c] - bl sub_02021B90 - mov r1, #0 - str r0, [r7, #0] - bl sub_02021D6C - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x38] - mov r1, #0x13 - mov r0, #3 - lsl r1, r1, #0xe - lsl r0, r0, #0x12 - str r1, [sp, #0x3c] - add r0, r1, r0 - str r0, [sp, #0x3c] - add r0, sp, #0x30 - bl sub_02021B90 - mov r1, #0 - str r0, [r7, #4] - bl sub_02021D6C - ldr r3, _021E244C ; =0x000013EA - mov r0, #0 - mov r2, #5 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r1, #2 - lsl r2, r2, #6 - str r1, [sp, #0x10] - ldr r1, [r4, r2] - str r1, [sp, #0x14] - add r1, r2, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r1, [r4, r1] - add r2, #0xc - str r1, [sp, #0x1c] - ldr r1, [r4, r2] - ldr r2, _021E2448 ; =0x0000083F - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x50 - sub r3, r3, #1 - bl sub_020093B4 - add r0, sp, #0x50 - str r0, [sp, #0x34] - mov r1, #0xb - mov r0, #3 - lsl r1, r1, #0x10 - lsl r0, r0, #0x12 - str r1, [sp, #0x3c] - add r0, r1, r0 - str r0, [sp, #0x3c] - mov r0, #0 - ldr r4, _021E2450 ; =0x021E9D80 - ldr r5, _021E2454 ; =0x021E9D98 - str r0, [sp, #0x2c] - add r6, r7, #0 -_021E23C6: - ldr r0, [r4, #0] - str r0, [sp, #0x38] - add r0, sp, #0x30 - bl sub_02021B90 - str r0, [r6, #8] - ldr r1, [r5, #0] - bl sub_02021D6C - ldr r0, [sp, #0x2c] - add r4, r4, #4 - add r0, r0, #1 - add r6, r6, #4 - add r5, r5, #4 - str r0, [sp, #0x2c] - cmp r0, #6 - blt _021E23C6 - mov r0, #0x1e - str r0, [sp, #0x44] - mov r0, #0xa - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - mov r1, #0x86 - mov r0, #3 - lsl r1, r1, #0xc - lsl r0, r0, #0x12 - str r1, [sp, #0x3c] - add r0, r1, r0 - str r0, [sp, #0x3c] - add r0, sp, #0x30 - bl sub_02021B90 - mov r1, #0xd - str r0, [r7, #0x50] - bl sub_02021D6C - mov r0, #6 - lsl r0, r0, #0x10 - mov r1, #0x4e - str r0, [sp, #0x38] - lsl r1, r1, #0xc - lsl r0, r0, #1 - str r1, [sp, #0x3c] - add r0, r1, r0 - str r0, [sp, #0x3c] - add r0, sp, #0x30 - bl sub_02021B90 - mov r1, #0xc - str r0, [r7, #0x54] - bl sub_02021D6C - mov r1, #2 - add r7, #8 - mov r0, #0 -_021E2434: - add r1, r1, #1 - str r0, [r7, #0x50] - add r7, r7, #4 - cmp r1, #8 - blt _021E2434 - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - nop -_021E2444: .word 0x000013ED -_021E2448: .word 0x0000083F -_021E244C: .word 0x000013EA -_021E2450: .word 0x021E9D80 -_021E2454: .word 0x021E9D98 - thumb_func_end ov21_021E22C8 - - thumb_func_start ov21_021E2458 -ov21_021E2458: ; 0x021E2458 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E245E: - ldr r0, [r5, #0] - bl sub_02021BD4 - ldr r0, [r5, #0x50] - cmp r0, #0 - beq _021E246E - bl sub_02021BD4 -_021E246E: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021E245E - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E2458 - - thumb_func_start ov21_021E2478 -ov21_021E2478: ; 0x021E2478 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r2, #0 - ldr r4, [r1, #0] - cmp r0, #0 - bne _021E248C - bl sub_02022974 -_021E248C: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021E2564 ; =0x0000083F - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #8] - mov r1, #0 - bl sub_0200A72C - mov r1, #5 - mvn r1, r1 - str r1, [sp, #0x1c] - mov r1, #2 - mov r2, #0 - str r0, [sp, #0x10] - str r1, [sp, #0x20] - str r2, [sp, #0x24] - str r1, [sp, #0x28] - str r6, [sp, #0x2c] - bl sub_0201FAB4 - add r7, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #8 - mov r2, #4 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E2568 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x21 - bl ov21_021D4DAC - str r6, [sp, #0xc] - ldr r0, [r5, #0] - str r0, [sp, #0x14] - mov r0, #0x1f - mvn r0, r0 - str r0, [sp, #0x18] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #0x20] - ldr r0, [r0, #0] - add r1, r7, #4 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #8 - mov r2, #4 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E2568 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x22 - bl ov21_021D4DAC - mov r1, #0x20 - sub r0, r1, r0 - str r6, [sp, #0xc] - str r0, [sp, #0x18] - ldr r0, [r5, #4] - str r0, [sp, #0x14] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #0x24] - ldr r0, [r0, #0] - add r1, r7, #4 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - mov r1, #2 - add r5, #8 - mov r0, #0 -_021E2556: - add r1, r1, #1 - str r0, [r5, #0x20] - add r5, r5, #4 - cmp r1, #8 - blt _021E2556 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E2564: .word 0x0000083F -_021E2568: .word 0x000002B9 - thumb_func_end ov21_021E2478 - - thumb_func_start ov21_021E256C -ov21_021E256C: ; 0x021E256C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E2572: - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _021E257C - bl ov21_021D4D1C -_021E257C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021E2572 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E256C - - thumb_func_start ov21_021E2588 -ov21_021E2588: ; 0x021E2588 - push {r3, r4, r5, r6, r7, lr} - mov r7, #1 - add r5, r0, #0 - mov r4, #0 - add r6, r7, #0 -_021E2592: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021FE0 - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _021E25A8 - ldr r0, [r0, #0] - add r1, r7, #0 - bl sub_02012AF0 -_021E25A8: - ldr r0, [r5, #0x50] - cmp r0, #0 - beq _021E25B4 - mov r1, #1 - bl sub_02021FE0 -_021E25B4: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021E2592 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2588 - - thumb_func_start ov21_021E25C0 -ov21_021E25C0: ; 0x021E25C0 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r7, r4, #0 - add r6, r4, #0 -_021E25CA: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021FE0 - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _021E25E0 - ldr r0, [r0, #0] - add r1, r7, #0 - bl sub_02012AF0 -_021E25E0: - ldr r0, [r5, #0x50] - cmp r0, #0 - beq _021E25EC - mov r1, #0 - bl sub_02021FE0 -_021E25EC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021E25CA - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E25C0 - - thumb_func_start ov21_021E25F8 -ov21_021E25F8: ; 0x021E25F8 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E2588 - ldr r0, [r4, #0x14] - bl ov21_021E33A4 - cmp r0, #0 - beq _021E2660 - cmp r6, #0 - beq _021E263C - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r2, [r5, #0] - lsl r0, r0, #4 - add r0, r2, r0 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E263C: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r3, [r5, #0] - lsl r0, r0, #4 - add r0, r3, r0 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E2660: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E25F8 - - thumb_func_start ov21_021E2664 -ov21_021E2664: ; 0x021E2664 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #0x14] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E33A4 - cmp r0, #0 - beq _021E2684 - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov21_021D2424 - b _021E268A -_021E2684: - mov r0, #2 - bl sub_0200AC1C -_021E268A: - cmp r0, #0 - beq _021E269C - cmp r4, #0 - beq _021E2698 - add r0, r6, #0 - bl ov21_021E25C0 -_021E2698: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E269C: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E2664 - - thumb_func_start ov21_021E26A0 -ov21_021E26A0: ; 0x021E26A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r1, #0 - add r1, r3, #0 - str r2, [sp, #0xc] - ldr r4, [sp, #0x30] - ldr r6, [sp, #0x40] - mov r5, #0 - bl ov21_021D144C - ldr r0, [sp, #0x3c] - ldr r1, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #8] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x38] - bl ov21_021E274C - ldr r0, [sp, #8] - bl sub_02021E74 - cmp r0, #3 - bhi _021E2712 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E26DE: ; jump table - .short _021E26E6 - _021E26DE - 2 ; case 0 - .short _021E26E6 - _021E26DE - 2 ; case 1 - .short _021E26F6 - _021E26DE - 2 ; case 2 - .short _021E2704 - _021E26DE - 2 ; case 3 -_021E26E6: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021E2712 - mov r0, #0 - mov r5, #1 - mov r7, #9 - str r0, [r4, #0] - b _021E2712 -_021E26F6: - ldr r0, [r4, #0] - cmp r0, #1 - beq _021E2712 - mov r5, #1 - mov r7, #0xa - str r5, [r4, #0] - b _021E2712 -_021E2704: - ldr r0, [r4, #0] - cmp r0, #2 - beq _021E2712 - mov r0, #2 - mov r5, #1 - mov r7, #8 - str r0, [r4, #0] -_021E2712: - cmp r5, #0 - beq _021E2748 - ldr r0, [r6, #0] - cmp r0, #0 - beq _021E2720 - bl sub_020181C4 -_021E2720: - ldr r0, [sp, #4] - ldr r3, [sp, #0x34] - ldr r0, [r0, #0] - add r1, r7, #0 - add r2, sp, #0x10 - bl ov21_021D27E0 - str r0, [r6, #0] - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x2c] - ldr r2, [r2, #0xc] - mov r0, #0x1f - lsl r1, r1, #5 - mov r3, #0x20 - bl sub_0201DC68 - cmp r0, #0 - bne _021E2748 - bl sub_02022974 -_021E2748: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E26A0 - - thumb_func_start ov21_021E274C -ov21_021E274C: ; 0x021E274C - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - bl ov21_021D1524 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021E274C - - thumb_func_start ov21_021E275C -ov21_021E275C: ; 0x021E275C - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, [r4, #8] - mov r6, #1 - str r6, [r1, #0x1c] - ldr r3, [r4, #0] - add r5, r2, #0 - ldr r2, [r3, #0] - mov r1, #4 - orr r1, r2 - str r1, [r3, #0] - mov r1, #0 - str r1, [r0, #0x10] - mov r1, #2 - ldr r0, [r4, #8] - cmp r5, #5 - str r1, [r0, #0x14] - bhi _021E27BC - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E278C: ; jump table - .short _021E2798 - _021E278C - 2 ; case 0 - .short _021E27AA - _021E278C - 2 ; case 1 - .short _021E27AA - _021E278C - 2 ; case 2 - .short _021E27AA - _021E278C - 2 ; case 3 - .short _021E27AA - _021E278C - 2 ; case 4 - .short _021E27AA - _021E278C - 2 ; case 5 -_021E2798: - ldr r0, [r4, #8] - mov r1, #0x30 - str r1, [r0, #8] - ldr r0, [r4, #8] - mov r1, #0x48 - str r1, [r0, #0xc] - ldr r0, [r4, #8] - str r6, [r0, #0x14] - pop {r4, r5, r6, pc} -_021E27AA: - ldr r0, [r4, #0x10] - mov r1, #0x30 - mov r2, #0x48 - bl ov21_021E0CD4 - ldr r0, [r4, #0x10] - add r1, r6, #0 - bl ov21_021E0CDC -_021E27BC: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E275C - - thumb_func_start ov21_021E27C0 -ov21_021E27C0: ; 0x021E27C0 - push {r3, r4, r5, r6, r7, lr} - add r5, r3, #0 - add r4, r1, #0 - str r2, [sp] - cmp r5, #5 - bhi _021E2822 - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E27D8: ; jump table - .short _021E27E4 - _021E27D8 - 2 ; case 0 - .short _021E27FE - _021E27D8 - 2 ; case 1 - .short _021E27FE - _021E27D8 - 2 ; case 2 - .short _021E27FE - _021E27D8 - 2 ; case 3 - .short _021E27FE - _021E27D8 - 2 ; case 4 - .short _021E27FE - _021E27D8 - 2 ; case 5 -_021E27E4: - ldr r3, [r4, #0] - mov r1, #4 - ldr r2, [r3, #0] - mov r7, #0x30 - orr r1, r2 - str r1, [r3, #0] - mov r1, #0 - str r1, [r0, #0x10] - ldr r0, [r4, #8] - mov r1, #2 - mov r6, #0x48 - str r1, [r0, #0x14] - b _021E2822 -_021E27FE: - ldr r2, [r4, #0] - mov r1, #2 - ldr r3, [r2, #0] - mov r7, #0x30 - orr r3, r1 - str r3, [r2, #0] - str r5, [r0, #0x10] - ldr r0, [r4, #0x10] - mov r6, #0x48 - bl ov21_021E0CDC - sub r0, r5, #1 - bl ov21_021D5608 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl ov21_021E0CF8 -_021E2822: - ldr r0, [sp] - cmp r0, #5 - bhi _021E2862 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E2834: ; jump table - .short _021E2840 - _021E2834 - 2 ; case 0 - .short _021E2850 - _021E2834 - 2 ; case 1 - .short _021E2850 - _021E2834 - 2 ; case 2 - .short _021E2850 - _021E2834 - 2 ; case 3 - .short _021E2850 - _021E2834 - 2 ; case 4 - .short _021E2850 - _021E2834 - 2 ; case 5 -_021E2840: - ldr r0, [r4, #8] - mov r1, #2 - str r7, [r0, #8] - ldr r0, [r4, #8] - str r6, [r0, #0xc] - ldr r0, [r4, #8] - str r1, [r0, #0x14] - pop {r3, r4, r5, r6, r7, pc} -_021E2850: - ldr r0, [r4, #0x10] - add r1, r7, #0 - add r2, r6, #0 - bl ov21_021E0CD4 - ldr r0, [r4, #0x10] - mov r1, #2 - bl ov21_021E0CDC -_021E2862: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E27C0 - - thumb_func_start ov21_021E2864 -ov21_021E2864: ; 0x021E2864 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x34] - add r4, r1, #0 - cmp r0, #8 - beq _021E28A2 - cmp r0, #1 - ldr r0, [r4, #4] - bne _021E2880 - mov r1, #0 - mvn r1, r1 - bl ov21_021D371C - b _021E2886 -_021E2880: - mov r1, #1 - bl ov21_021D371C -_021E2886: - cmp r0, #1 - bne _021E28A2 - ldr r2, [r5, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E275C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E2968 - ldr r0, _021E28A4 ; =0x0000068B - bl sub_02005748 -_021E28A2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E28A4: .word 0x0000068B - thumb_func_end ov21_021E2864 - - thumb_func_start ov21_021E28A8 -ov21_021E28A8: ; 0x021E28A8 - ldr r1, _021E28CC ; =0x021BF67C - ldr r2, [r1, #0x48] - mov r1, #0x40 - tst r1, r2 - beq _021E28B8 - mov r1, #1 - str r1, [r0, #0x34] - bx lr -_021E28B8: - mov r1, #0x80 - tst r1, r2 - beq _021E28C4 - mov r1, #0 - str r1, [r0, #0x34] - bx lr -_021E28C4: - mov r1, #8 - str r1, [r0, #0x34] - bx lr - nop -_021E28CC: .word 0x021BF67C - thumb_func_end ov21_021E28A8 - - thumb_func_start ov21_021E28D0 -ov21_021E28D0: ; 0x021E28D0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x38] - mov r1, #1 - tst r0, r1 - ldr r0, [r5, #8] - bne _021E28E8 - mov r1, #0 - bl sub_02021CAC - b _021E28EC -_021E28E8: - bl sub_02021CAC -_021E28EC: - ldr r1, [r4, #0x38] - mov r0, #2 - tst r0, r1 - ldr r0, [r5, #0xc] - bne _021E28FE - mov r1, #0 - bl sub_02021CAC - b _021E2904 -_021E28FE: - mov r1, #1 - bl sub_02021CAC -_021E2904: - ldr r1, [r4, #0x38] - mov r0, #4 - tst r0, r1 - ldr r0, [r5, #0x10] - bne _021E2916 - mov r1, #0 - bl sub_02021CAC - b _021E291C -_021E2916: - mov r1, #1 - bl sub_02021CAC -_021E291C: - ldr r1, [r4, #0x38] - mov r0, #8 - tst r0, r1 - ldr r0, [r5, #0x14] - bne _021E292E - mov r1, #0 - bl sub_02021CAC - b _021E2934 -_021E292E: - mov r1, #1 - bl sub_02021CAC -_021E2934: - ldr r1, [r4, #0x38] - mov r0, #0x10 - tst r0, r1 - ldr r0, [r5, #0x18] - bne _021E2946 - mov r1, #0 - bl sub_02021CAC - b _021E294C -_021E2946: - mov r1, #1 - bl sub_02021CAC -_021E294C: - ldr r1, [r4, #0x38] - mov r0, #0x20 - tst r0, r1 - ldr r0, [r5, #0x1c] - bne _021E295E - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, pc} -_021E295E: - mov r1, #1 - bl sub_02021CAC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E28D0 - - thumb_func_start ov21_021E2968 -ov21_021E2968: ; 0x021E2968 - push {r3, r4, r5, r6, r7, lr} - mov r5, #0 - add r4, r0, #0 - add r6, r1, #0 - str r5, [r0, #0x38] - add r4, #0x38 - mov r7, #1 -_021E2976: - add r0, r5, #0 - bl ov21_021D5608 - add r1, r0, #0 - ldr r0, [r6, #4] - bl ov21_021D392C - cmp r0, #0 - beq _021E299C - ldr r1, [r4, #0] - mov r0, #1 - add r2, r1, #0 - orr r2, r0 - add r0, r5, #1 - add r1, r7, #0 - lsl r1, r0 - add r0, r2, #0 - orr r0, r1 - str r0, [r4, #0] -_021E299C: - add r5, r5, #1 - cmp r5, #5 - blt _021E2976 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E2968 - - thumb_func_start ov21_021E29A4 -ov21_021E29A4: ; 0x021E29A4 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - cmp r4, #2 - blt _021E29B4 - cmp r4, #8 - blt _021E29B8 -_021E29B4: - bl sub_02022974 -_021E29B8: - sub r0, r4, #2 - lsl r1, r0, #2 - ldr r0, _021E29D8 ; =0x021E9D98 - cmp r6, #1 - ldr r1, [r0, r1] - bne _021E29CE - add r0, r5, #0 - add r1, r1, #1 - bl sub_02021D6C - pop {r4, r5, r6, pc} -_021E29CE: - add r0, r5, #0 - bl sub_02021D6C - pop {r4, r5, r6, pc} - nop -_021E29D8: .word 0x021E9D98 - thumb_func_end ov21_021E29A4 - - thumb_func_start ov21_021E29DC -ov21_021E29DC: ; 0x021E29DC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E2A5C - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E2AE0 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E2B08 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E2C20 - str r0, [r5, #0x24] - ldr r0, _021E2A24 ; =ov21_021E2C24 - str r0, [r5, #8] - ldr r0, _021E2A28 ; =ov21_021E2C2C - str r0, [r5, #0xc] - ldr r0, _021E2A2C ; =ov21_021E2C5C - str r0, [r5, #0x10] - ldr r0, _021E2A30 ; =ov21_021E2C64 - str r0, [r5, #0x14] - ldr r0, _021E2A34 ; =ov21_021E2D10 - str r0, [r5, #0x18] - ldr r0, _021E2A38 ; =ov21_021E2D38 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E2A24: .word ov21_021E2C24 -_021E2A28: .word ov21_021E2C2C -_021E2A2C: .word ov21_021E2C5C -_021E2A30: .word ov21_021E2C64 -_021E2A34: .word ov21_021E2D10 -_021E2A38: .word ov21_021E2D38 - thumb_func_end ov21_021E29DC - - thumb_func_start ov21_021E2A3C -ov21_021E2A3C: ; 0x021E2A3C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E2BA8 - ldr r0, [r4, #4] - bl ov21_021E2BBC - ldr r0, [r4, #0x20] - bl ov21_021E2BD0 - pop {r4, pc} - thumb_func_end ov21_021E2A3C - - thumb_func_start ov21_021E2A54 -ov21_021E2A54: ; 0x021E2A54 - ldr r0, [r0, #0] - ldr r0, [r0, #0x28] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E2A54 - - thumb_func_start ov21_021E2A5C -ov21_021E2A5C: ; 0x021E2A5C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x34 - bl sub_02018144 - add r4, r0, #0 - bne _021E2A6E - bl sub_02022974 -_021E2A6E: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D13B4 - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #2 - bl ov21_021D1410 - ldr r0, [r0, #0] - mov r1, #3 - str r0, [r4, #0x10] - add r0, r5, #0 - bl ov21_021D1410 - str r0, [r4, #0x14] - add r0, r5, #0 - mov r1, #4 - bl ov21_021D1410 - str r0, [r4, #0x18] - add r0, r5, #0 - mov r1, #6 - bl ov21_021D1410 - str r0, [r4, #0x1c] - add r0, r5, #0 - mov r1, #7 - bl ov21_021D1410 - str r0, [r4, #0x20] - add r0, r5, #0 - mov r1, #6 - bl ov21_021D1430 - str r0, [r4, #0x24] - add r0, r5, #0 - mov r1, #0 - bl ov21_021D1410 - ldr r0, [r0, #0] - str r0, [r4, #0xc] - mov r0, #1 - str r0, [r4, #0x2c] - str r0, [r4, #0x30] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E2A5C - - thumb_func_start ov21_021E2AE0 -ov21_021E2AE0: ; 0x021E2AE0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E2AF2 - bl sub_02022974 -_021E2AF2: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E2AE0 - - thumb_func_start ov21_021E2B08 -ov21_021E2B08: ; 0x021E2B08 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021E2C20 - add r7, r0, #0 - mov r1, #0x14 - mul r7, r1 - add r0, r5, #0 - add r1, r7, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021E2B28 - bl sub_02022974 -_021E2B28: - add r0, r4, #0 - mov r1, #0 - add r2, r7, #0 - bl sub_020D5124 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #2 - bl ov21_021D47F0 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x14 - add r2, r6, #0 - mov r3, #4 - bl ov21_021D4A94 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x28 - add r2, r6, #0 - mov r3, #8 - bl ov21_021D48B8 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x3c - add r2, r6, #0 - mov r3, #0x10 - bl ov21_021D491C - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x50 - add r2, r6, #0 - mov r3, #0x20 - bl ov21_021D4980 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x64 - add r2, r6, #0 - mov r3, #0x40 - bl ov21_021D49E4 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x78 - add r2, r6, #0 - mov r3, #0x80 - bl ov21_021D4A3C - add r1, r4, #0 - mov r3, #1 - add r0, r5, #0 - add r1, #0x8c - add r2, r6, #0 - lsl r3, r3, #8 - bl ov21_021D4B50 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2B08 - - thumb_func_start ov21_021E2BA8 -ov21_021E2BA8: ; 0x021E2BA8 - push {r4, lr} - add r4, r0, #0 - bne _021E2BB2 - bl sub_02022974 -_021E2BB2: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2BA8 - - thumb_func_start ov21_021E2BBC -ov21_021E2BBC: ; 0x021E2BBC - push {r4, lr} - add r4, r0, #0 - bne _021E2BC6 - bl sub_02022974 -_021E2BC6: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2BBC - - thumb_func_start ov21_021E2BD0 -ov21_021E2BD0: ; 0x021E2BD0 - push {r4, lr} - add r4, r0, #0 - bne _021E2BDA - bl sub_02022974 -_021E2BDA: - add r0, r4, #0 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x14 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x28 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x3c - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x50 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x64 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x78 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x8c - bl ov21_021D4660 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov21_021E2BD0 - - thumb_func_start ov21_021E2C20 -ov21_021E2C20: ; 0x021E2C20 - mov r0, #8 - bx lr - thumb_func_end ov21_021E2C20 - - thumb_func_start ov21_021E2C24 -ov21_021E2C24: ; 0x021E2C24 - ldr r1, [r1, #0x10] - mov r0, #1 - str r0, [r1, #0x1c] - bx lr - thumb_func_end ov21_021E2C24 - - thumb_func_start ov21_021E2C2C -ov21_021E2C2C: ; 0x021E2C2C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #1 - bne _021E2C3A - mov r0, #1 - pop {r4, pc} -_021E2C3A: - ldr r0, [r4, #0x10] - cmp r0, #1 - bne _021E2C44 - mov r0, #0 - pop {r4, pc} -_021E2C44: - ldr r0, [r4, #0] - cmp r0, #0 - bne _021E2C56 - add r0, r1, #0 - bl ov21_021E3320 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E2C56: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2C2C - - thumb_func_start ov21_021E2C5C -ov21_021E2C5C: ; 0x021E2C5C - mov r0, #0 - str r0, [r1, #8] - mov r0, #1 - bx lr - thumb_func_end ov21_021E2C5C - - thumb_func_start ov21_021E2C64 -ov21_021E2C64: ; 0x021E2C64 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r1, #3 - bhi _021E2D06 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E2C82: ; jump table - .short _021E2C8A - _021E2C82 - 2 ; case 0 - .short _021E2CAA - _021E2C82 - 2 ; case 1 - .short _021E2CE2 - _021E2C82 - 2 ; case 2 - .short _021E2CFA - _021E2C82 - 2 ; case 3 -_021E2C8A: - ldr r0, [r4, #4] - mov r1, #0x28 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x28 - bl sub_020D5124 - ldr r1, [r7, #8] - ldr r0, [r4, #8] - str r1, [r0, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2D0A -_021E2CAA: - ldr r3, [r4, #4] - add r1, r6, #0 - bl ov21_021E3080 - add r0, r6, #0 - bl ov21_021E3BE0 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2f - str r0, [sp, #8] - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r2, r1, #0 - sub r2, #0x14 - bl ov21_021D23F8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2D0A -_021E2CE2: - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - cmp r0, #0 - beq _021E2D0A - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2D0A -_021E2CFA: - add r0, r6, #0 - bl ov21_021E3BFC - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021E2D06: - bl sub_02022974 -_021E2D0A: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E2C64 - - thumb_func_start ov21_021E2D10 -ov21_021E2D10: ; 0x021E2D10 - push {r3, r4, r5, lr} - ldr r4, [r1, #8] - add r5, r2, #0 - ldr r1, [r5, #8] - ldr r0, [r4, #0] - cmp r0, r1 - beq _021E2D32 - add r0, r4, #0 - bl ov21_021E331C - ldr r1, [r5, #8] - ldr r2, [r4, #0] - add r0, r4, #0 - bl ov21_021E3FC0 - ldr r0, [r5, #8] - str r0, [r4, #0] -_021E2D32: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2D10 - - thumb_func_start ov21_021E2D38 -ov21_021E2D38: ; 0x021E2D38 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - ldr r3, [r4, #0] - add r5, r0, #0 - ldr r1, [r4, #8] - cmp r3, #4 - bhi _021E2DF4 - add r3, r3, r3 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_021E2D54: ; jump table - .short _021E2D5E - _021E2D54 - 2 ; case 0 - .short _021E2DB8 - _021E2D54 - 2 ; case 1 - .short _021E2DD0 - _021E2D54 - 2 ; case 2 - .short _021E2DDC - _021E2D54 - 2 ; case 3 - .short _021E2DEE - _021E2D54 - 2 ; case 4 -_021E2D5E: - ldr r0, [r2, #0x2c] - cmp r0, #0 - beq _021E2D8E - add r0, r1, #0 - bl ov21_021E3BE0 - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2f - str r0, [sp, #8] - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r3, r1, #0 - sub r3, #0x14 - bl ov21_021D23F8 - b _021E2DB0 -_021E2D8E: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x3f - str r0, [sp, #8] - str r2, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #4 - add r3, r1, #0 - sub r3, #0x14 - bl ov21_021D23F8 -_021E2DB0: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2DF8 -_021E2DB8: - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - cmp r0, #0 - beq _021E2DF8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2DF8 -_021E2DD0: - bl ov21_021E30BC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2DF8 -_021E2DDC: - add r0, r1, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E2DF8 -_021E2DEE: - add sp, #0x14 - mov r0, #1 - pop {r4, r5, pc} -_021E2DF4: - bl sub_02022974 -_021E2DF8: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2D38 - - thumb_func_start ov21_021E2E00 -ov21_021E2E00: ; 0x021E2E00 - push {r4, lr} - add r4, r0, #0 - bl ov21_021E2E10 - mov r0, #1 - str r0, [r4, #0x30] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E2E00 - - thumb_func_start ov21_021E2E10 -ov21_021E2E10: ; 0x021E2E10 - push {r4, lr} - add r4, r0, #0 - ldr r2, [r4, #0] - mov r0, #2 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] - mov r1, #0 - str r1, [r4, #0x28] - ldr r0, [r4, #0x10] - str r1, [r0, #0x14] - ldr r0, [r4, #0x18] - bl ov21_021E0CDC - ldr r0, [r4, #8] - cmp r0, #4 - bhi _021E2EBE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E2E3E: ; jump table - .short _021E2E48 - _021E2E3E - 2 ; case 0 - .short _021E2E64 - _021E2E3E - 2 ; case 1 - .short _021E2E88 - _021E2E3E - 2 ; case 2 - .short _021E2EAC - _021E2E3E - 2 ; case 3 - .short _021E2EB6 - _021E2E3E - 2 ; case 4 -_021E2E48: - ldr r0, [r4, #0x10] - mov r1, #0x38 - str r1, [r0, #8] - ldr r0, [r4, #0x10] - mov r2, #0x50 - str r2, [r0, #0xc] - ldr r0, [r4, #0x18] - bl ov21_021E0CD4 - ldr r0, [r4, #0xc] - mov r1, #1 - str r1, [r0, #0x14] - str r1, [r4, #0x2c] - pop {r4, pc} -_021E2E64: - ldr r0, [r4, #0x1c] - mov r1, #1 - bl ov21_021DCA4C - ldr r0, [r4, #0x1c] - mov r1, #4 - bl ov21_021DCA54 - ldr r0, [r4, #0x1c] - mov r1, #0x38 - mov r2, #0x50 - bl ov21_021DCA44 - ldr r0, [r4, #0xc] - mov r1, #1 - str r1, [r0, #0x14] - str r1, [r4, #0x2c] - pop {r4, pc} -_021E2E88: - ldr r0, [r4, #0x20] - mov r1, #1 - bl ov21_021E4070 - ldr r0, [r4, #0x20] - mov r1, #4 - bl ov21_021E4078 - ldr r0, [r4, #0x20] - mov r1, #0x38 - mov r2, #0x50 - bl ov21_021E4068 - ldr r0, [r4, #0xc] - mov r1, #1 - str r1, [r0, #0x14] - str r1, [r4, #0x2c] - pop {r4, pc} -_021E2EAC: - ldr r0, [r4, #0xc] - mov r1, #0 - str r1, [r0, #0x14] - str r1, [r4, #0x2c] - pop {r4, pc} -_021E2EB6: - ldr r0, [r4, #0xc] - mov r1, #0 - str r1, [r0, #0x14] - str r1, [r4, #0x2c] -_021E2EBE: - pop {r4, pc} - thumb_func_end ov21_021E2E10 - - thumb_func_start ov21_021E2EC0 -ov21_021E2EC0: ; 0x021E2EC0 - mov r0, #0 - bx lr - thumb_func_end ov21_021E2EC0 - - thumb_func_start ov21_021E2EC4 -ov21_021E2EC4: ; 0x021E2EC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #1 - add r7, r1, #0 - str r2, [sp] - str r0, [sp, #4] - cmp r7, #4 - bhi _021E2FC2 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E2EE2: ; jump table - .short _021E2EEC - _021E2EE2 - 2 ; case 0 - .short _021E2F14 - _021E2EE2 - 2 ; case 1 - .short _021E2F4A - _021E2EE2 - 2 ; case 2 - .short _021E2F80 - _021E2EE2 - 2 ; case 3 - .short _021E2FA0 - _021E2EE2 - 2 ; case 4 -_021E2EEC: - add r0, r2, #0 - bl ov21_021E2EC0 - cmp r0, #0 - beq _021E2EFA - mov r1, #2 - b _021E2EFC -_021E2EFA: - mov r1, #1 -_021E2EFC: - ldr r0, [r4, #0x10] - mov r6, #0x30 - str r1, [r0, #0x14] - ldr r2, [r4, #0] - mov r0, #4 - ldr r1, [r2, #0] - mov r5, #0x48 - orr r0, r1 - str r0, [r2, #0] - mov r0, #0 - str r0, [r4, #8] - b _021E2FC6 -_021E2F14: - add r0, r2, #0 - bl ov21_021E2EC0 - cmp r0, #0 - ldr r0, [r4, #0x1c] - beq _021E2F30 - mov r1, #1 - bl ov21_021DCA4C - ldr r0, [r4, #0x1c] - mov r1, #1 - bl ov21_021DCA54 - b _021E2F36 -_021E2F30: - mov r1, #0 - bl ov21_021DCA4C -_021E2F36: - ldr r2, [r4, #0] - mov r0, #8 - ldr r1, [r2, #0] - mov r6, #0x28 - orr r0, r1 - str r0, [r2, #0] - mov r0, #1 - str r0, [r4, #8] - mov r5, #0x78 - b _021E2FC6 -_021E2F4A: - add r0, r2, #0 - bl ov21_021E2EC0 - cmp r0, #0 - ldr r0, [r4, #0x20] - beq _021E2F66 - mov r1, #1 - bl ov21_021E4070 - ldr r0, [r4, #0x20] - mov r1, #1 - bl ov21_021E4078 - b _021E2F6C -_021E2F66: - mov r1, #0 - bl ov21_021E4070 -_021E2F6C: - ldr r2, [r4, #0] - mov r0, #0x10 - ldr r1, [r2, #0] - mov r6, #0x30 - orr r0, r1 - str r0, [r2, #0] - mov r0, #2 - str r0, [r4, #8] - mov r5, #0x40 - b _021E2FC6 -_021E2F80: - ldr r0, [r4, #4] - bl ov21_021D37CC - cmp r0, #2 - bne _021E2F9A - ldr r2, [r4, #0] - mov r0, #0x20 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] - mov r0, #3 - str r0, [r4, #8] - b _021E2FC6 -_021E2F9A: - mov r0, #0 - str r0, [sp, #4] - b _021E2FC6 -_021E2FA0: - ldr r0, [r4, #4] - bl ov21_021D3954 - cmp r0, #1 - bne _021E2FBC - ldr r2, [r4, #0] - mov r0, #1 - ldr r1, [r2, #0] - lsl r0, r0, #8 - orr r0, r1 - str r0, [r2, #0] - mov r0, #4 - str r0, [r4, #8] - b _021E2FC6 -_021E2FBC: - mov r0, #0 - str r0, [sp, #4] - b _021E2FC6 -_021E2FC2: - bl sub_02022974 -_021E2FC6: - ldr r0, [sp] - cmp r0, #4 - bhi _021E3076 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E2FD8: ; jump table - .short _021E2FE2 - _021E2FD8 - 2 ; case 0 - .short _021E301A - _021E2FD8 - 2 ; case 1 - .short _021E3048 - _021E2FD8 - 2 ; case 2 - .short _021E307A - _021E2FD8 - 2 ; case 3 - .short _021E307A - _021E2FD8 - 2 ; case 4 -_021E2FE2: - add r0, r7, #0 - bl ov21_021E2EC0 - cmp r0, #0 - beq _021E2FFA - ldr r0, [r4, #0x10] - mov r1, #2 - str r1, [r0, #0x14] - ldr r0, [r4, #0x18] - bl ov21_021E0CDC - b _021E3006 -_021E2FFA: - ldr r0, [r4, #0x10] - mov r1, #1 - str r1, [r0, #0x14] - ldr r0, [r4, #0x18] - bl ov21_021E0CDC -_021E3006: - ldr r0, [r4, #0x10] - add r1, r6, #0 - str r6, [r0, #8] - ldr r0, [r4, #0x10] - add r2, r5, #0 - str r5, [r0, #0xc] - ldr r0, [r4, #0x18] - bl ov21_021E0CD4 - b _021E307A -_021E301A: - add r0, r7, #0 - bl ov21_021E2EC0 - cmp r0, #0 - ldr r0, [r4, #0x1c] - beq _021E3036 - mov r1, #1 - bl ov21_021DCA4C - ldr r0, [r4, #0x1c] - mov r1, #1 - bl ov21_021DCA54 - b _021E303C -_021E3036: - mov r1, #0 - bl ov21_021DCA4C -_021E303C: - ldr r0, [r4, #0x1c] - add r1, r6, #0 - add r2, r5, #0 - bl ov21_021DCA44 - b _021E307A -_021E3048: - add r0, r7, #0 - bl ov21_021E2EC0 - cmp r0, #0 - ldr r0, [r4, #0x20] - beq _021E3064 - mov r1, #1 - bl ov21_021E4070 - ldr r0, [r4, #0x20] - mov r1, #1 - bl ov21_021E4078 - b _021E306A -_021E3064: - mov r1, #0 - bl ov21_021E4070 -_021E306A: - ldr r0, [r4, #0x20] - add r1, r6, #0 - add r2, r5, #0 - bl ov21_021E4068 - b _021E307A -_021E3076: - bl sub_02022974 -_021E307A: - ldr r0, [sp, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E2EC4 - - thumb_func_start ov21_021E3080 -ov21_021E3080: ; 0x021E3080 - push {r4, r5, r6, lr} - add r4, r3, #0 - add r5, r1, #0 - add r1, r2, #0 - add r6, r0, #0 - add r2, r4, #0 - bl ov21_021E30E4 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov21_021E3178 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov21_021E3268 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov21_021E3270 - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - bl ov21_021E3FC0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E3080 - - thumb_func_start ov21_021E30BC -ov21_021E30BC: ; 0x021E30BC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov21_021E326C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E3224 - add r0, r4, #0 - bl ov21_021E3304 - ldr r0, [r5, #0] - mov r1, #2 - ldr r0, [r0, #0] - bl sub_02019EBC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E30BC - - thumb_func_start ov21_021E30E4 -ov21_021E30E4: ; 0x021E30E4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - mov r2, #0 - str r2, [sp] - add r5, r0, #0 - str r4, [sp, #4] - add r6, r1, #0 - ldr r0, [r5, #0] - mov r1, #6 - add r3, r2, #0 - bl ov21_021D276C - ldr r0, [r6, #4] - bl ov21_021D36D8 - cmp r0, #1 - bne _021E311A - mov r0, #0x20 - str r0, [sp] - str r4, [sp, #4] - mov r2, #0 - ldr r0, [r5, #0] - mov r1, #0x18 - add r3, r2, #0 - bl ov21_021D276C -_021E311A: - ldr r0, [r5, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #2 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x39 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r4, r0, #0 - ldrh r0, [r2] - mov r1, #2 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #2 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E30E4 - - thumb_func_start ov21_021E3178 -ov21_021E3178: ; 0x021E3178 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r0, #0] - add r5, r1, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E3214 ; =0x00000827 - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x57 - bl sub_02009A4C - str r0, [r5, #0x18] - bl sub_0200A3DC - ldr r0, [r5, #0x18] - bl sub_02009D4C - ldr r0, _021E3218 ; =0x000007DC - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xc - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x1c] - bl sub_0200A640 - ldr r0, [r5, #0x1c] - bl sub_02009D4C - ldr r0, _021E321C ; =0x00000825 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x55 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x20] - ldr r0, _021E3220 ; =0x00000826 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x56 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x24] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E3214: .word 0x00000827 -_021E3218: .word 0x000007DC -_021E321C: .word 0x00000825 -_021E3220: .word 0x00000826 - thumb_func_end ov21_021E3178 - - thumb_func_start ov21_021E3224 -ov21_021E3224: ; 0x021E3224 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r4, [r0, #0] - ldr r0, [r5, #0x18] - bl sub_0200A4E4 - ldr r0, [r5, #0x1c] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x18] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x1c] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x20] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x24] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3224 - - thumb_func_start ov21_021E3268 -ov21_021E3268: ; 0x021E3268 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E3268 - - thumb_func_start ov21_021E326C -ov21_021E326C: ; 0x021E326C - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E326C - - thumb_func_start ov21_021E3270 -ov21_021E3270: ; 0x021E3270 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - ldr r7, [r0, #0] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r7, r0] - add r5, r1, #0 - str r0, [sp, #0xc] - ldr r0, [r5, #0x1c] - mov r1, #0 - add r4, r2, #0 - bl sub_0200A72C - mov r1, #0x10 - str r1, [sp, #0x1c] - mov r1, #0 - str r1, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - str r1, [sp, #0x18] - mov r1, #1 - str r0, [sp, #0x14] - str r1, [sp, #0x2c] - str r4, [sp, #0x30] - bl sub_0201FAB4 - str r0, [sp, #8] - mov r6, #0 -_021E32A8: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r7, r0] - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - add r3, r6, #0 - ldr r0, [r7, r0] - ldr r2, _021E3300 ; =0x000002B9 - add r1, r4, #0 - add r3, #0x66 - bl ov21_021D4DAC - str r4, [sp, #0x10] - add r0, sp, #0xc - bl ov21_021D4CA0 - str r0, [r5, #4] - ldr r0, [r0, #0] - ldr r1, [sp, #8] - bl sub_02012A60 - ldr r0, [r5, #4] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 - add r0, r4, #0 - bl ov21_021D4DA0 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #5 - blt _021E32A8 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_021E3300: .word 0x000002B9 - thumb_func_end ov21_021E3270 - - thumb_func_start ov21_021E3304 -ov21_021E3304: ; 0x021E3304 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E330A: - ldr r0, [r5, #4] - bl ov21_021D4D1C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _021E330A - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E3304 - - thumb_func_start ov21_021E331C -ov21_021E331C: ; 0x021E331C - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E331C - - thumb_func_start ov21_021E3320 -ov21_021E3320: ; 0x021E3320 - mov r1, #1 - str r1, [r0, #0x28] - ldr r0, [r0, #0x10] - str r1, [r0, #0x14] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E3320 - - thumb_func_start ov21_021E332C -ov21_021E332C: ; 0x021E332C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E33C4 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E3400 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E3428 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E3458 - str r0, [r5, #0x24] - ldr r0, _021E3374 ; =ov21_021E345C - str r0, [r5, #8] - ldr r0, _021E3378 ; =ov21_021E34AC - str r0, [r5, #0xc] - ldr r0, _021E337C ; =ov21_021E3520 - str r0, [r5, #0x10] - ldr r0, _021E3380 ; =ov21_021E3540 - str r0, [r5, #0x14] - ldr r0, _021E3384 ; =ov21_021E35D0 - str r0, [r5, #0x18] - ldr r0, _021E3388 ; =ov21_021E3604 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E3374: .word ov21_021E345C -_021E3378: .word ov21_021E34AC -_021E337C: .word ov21_021E3520 -_021E3380: .word ov21_021E3540 -_021E3384: .word ov21_021E35D0 -_021E3388: .word ov21_021E3604 - thumb_func_end ov21_021E332C - - thumb_func_start ov21_021E338C -ov21_021E338C: ; 0x021E338C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E342C - ldr r0, [r4, #4] - bl ov21_021E3440 - ldr r0, [r4, #0x20] - bl ov21_021E3454 - pop {r4, pc} - thumb_func_end ov21_021E338C - - thumb_func_start ov21_021E33A4 -ov21_021E33A4: ; 0x021E33A4 - ldr r0, [r0, #0] - ldr r0, [r0, #0x24] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E33A4 - - thumb_func_start ov21_021E33AC -ov21_021E33AC: ; 0x021E33AC - ldr r0, [r0, #0] - ldr r0, [r0, #0x28] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E33AC - - thumb_func_start ov21_021E33B4 -ov21_021E33B4: ; 0x021E33B4 - ldr r0, [r0, #0] - str r1, [r0, #0x30] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E33B4 - - thumb_func_start ov21_021E33BC -ov21_021E33BC: ; 0x021E33BC - ldr r0, [r0, #0] - ldr r0, [r0, #0x30] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E33BC - - thumb_func_start ov21_021E33C4 -ov21_021E33C4: ; 0x021E33C4 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x34 - bl sub_02018144 - add r4, r0, #0 - bne _021E33D6 - bl sub_02022974 -_021E33D6: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - add r0, r5, #0 - bl ov21_021D13C8 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - ldr r0, [r0, #0] - str r0, [r4, #4] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E33C4 - - thumb_func_start ov21_021E3400 -ov21_021E3400: ; 0x021E3400 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E3412 - bl sub_02022974 -_021E3412: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3400 - - thumb_func_start ov21_021E3428 -ov21_021E3428: ; 0x021E3428 - mov r0, #0 - bx lr - thumb_func_end ov21_021E3428 - - thumb_func_start ov21_021E342C -ov21_021E342C: ; 0x021E342C - push {r4, lr} - add r4, r0, #0 - bne _021E3436 - bl sub_02022974 -_021E3436: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E342C - - thumb_func_start ov21_021E3440 -ov21_021E3440: ; 0x021E3440 - push {r4, lr} - add r4, r0, #0 - bne _021E344A - bl sub_02022974 -_021E344A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E3440 - - thumb_func_start ov21_021E3454 -ov21_021E3454: ; 0x021E3454 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E3454 - - thumb_func_start ov21_021E3458 -ov21_021E3458: ; 0x021E3458 - mov r0, #0 - bx lr - thumb_func_end ov21_021E3458 - - thumb_func_start ov21_021E345C -ov21_021E345C: ; 0x021E345C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - mov r1, #0x1c - bl sub_02018144 - add r6, r0, #0 - add r2, r6, #0 - mov r1, #0x1c - mov r0, #0 -_021E3472: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E3472 - ldr r2, [r5, #4] - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E3688 - ldr r2, [r5, #4] - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E3C6C - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E3E8C - mov r1, #0 - mov r0, #4 -_021E349A: - add r1, r1, #1 - str r0, [r4, #0xc] - add r4, r4, #4 - cmp r1, #6 - blt _021E349A - str r6, [r5, #8] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E345C - - thumb_func_start ov21_021E34AC -ov21_021E34AC: ; 0x021E34AC - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021E34C0 - mov r0, #0 - str r0, [r5, #0x24] - mov r0, #1 - pop {r3, r4, r5, pc} -_021E34C0: - ldr r1, [r0, #0x10] - cmp r1, #1 - bne _021E34CA - mov r0, #0 - pop {r3, r4, r5, pc} -_021E34CA: - ldr r1, [r0, #0] - cmp r1, #0 - bne _021E34E4 - mov r3, #1 - str r3, [r5, #0x24] - ldr r1, [r5, #4] - mov r2, #0 - str r2, [r1, #0x30] - str r3, [r5, #0x28] - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] - b _021E351C -_021E34E4: - mov r0, #1 - str r0, [r5, #0x28] - add r0, r5, #0 - bl ov21_021E3C2C - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E3EEC - add r0, r5, #0 - bl ov21_021E3724 - ldr r0, [r5, #8] - bl ov21_021D3998 - cmp r0, #2 - bne _021E3514 - ldr r0, [r5, #0x30] - cmp r0, #0 - bne _021E3514 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E3D48 -_021E3514: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E3734 -_021E351C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E34AC - - thumb_func_start ov21_021E3520 -ov21_021E3520: ; 0x021E3520 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r5, [r4, #8] - add r0, r5, #0 - bl ov21_021E37B4 - add r0, r5, #0 - bl ov21_021E3E74 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3520 - - thumb_func_start ov21_021E3540 -ov21_021E3540: ; 0x021E3540 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - add r7, r2, #0 - ldr r6, [r3, #8] - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021E35CC - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E355E: ; jump table - .short _021E3568 - _021E355E - 2 ; case 0 - .short _021E3582 - _021E355E - 2 ; case 1 - .short _021E3592 - _021E355E - 2 ; case 2 - .short _021E35B6 - _021E355E - 2 ; case 3 - .short _021E35C8 - _021E355E - 2 ; case 4 -_021E3568: - ldr r0, [r4, #4] - mov r1, #0x28 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x28 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E35CC -_021E3582: - ldr r3, [r4, #4] - add r1, r5, #0 - bl ov21_021E3900 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E35CC -_021E3592: - mov r1, #0 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #4 - sub r2, #0x10 - mov r3, #0x3f - bl sub_0200AAE0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021E3F2C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E35CC -_021E35B6: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021E35CC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E35CC -_021E35C8: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E35CC: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E3540 - - thumb_func_start ov21_021E35D0 -ov21_021E35D0: ; 0x021E35D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - ldr r0, [r3, #8] - add r7, r2, #0 - ldr r5, [r1, #8] - str r0, [sp, #4] - mov r6, #0 - add r4, r7, #0 -_021E35E2: - ldr r0, [r5, #0] - ldr r1, [r4, #0xc] - bl ov21_021D144C - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #6 - blt _021E35E2 - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r7, #0 - bl ov21_021E3F48 - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E35D0 - - thumb_func_start ov21_021E3604 -ov21_021E3604: ; 0x021E3604 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021E3684 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E361E: ; jump table - .short _021E3628 - _021E361E - 2 ; case 0 - .short _021E3642 - _021E361E - 2 ; case 1 - .short _021E3654 - _021E361E - 2 ; case 2 - .short _021E3670 - _021E361E - 2 ; case 3 - .short _021E3680 - _021E361E - 2 ; case 4 -_021E3628: - mov r0, #2 - str r0, [sp] - mov r0, #4 - add r1, r0, #0 - sub r1, #0x14 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E3684 -_021E3642: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021E3684 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E3684 -_021E3654: - add r1, r5, #0 - bl ov21_021E393C - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D2584 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E3684 -_021E3670: - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E3684 -_021E3680: - mov r0, #1 - pop {r3, r4, r5, pc} -_021E3684: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3604 - - thumb_func_start ov21_021E3688 -ov21_021E3688: ; 0x021E3688 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #0x18 - bl sub_02018144 - str r0, [r5, #4] - mov r0, #0x30 - str r0, [sp] - mov r1, #8 - ldr r0, [r5, #4] - mov r2, #0x28 - add r3, r1, #0 - bl ov21_021D154C - mov r0, #0xf8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #8 - add r0, #0x14 - mov r2, #0x28 - mov r3, #0xd0 - bl ov21_021D154C - mov r0, #0x58 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #8 - add r0, r0, #4 - mov r2, #0x28 - mov r3, #0x30 - bl ov21_021D154C - mov r0, #0x80 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #8 - add r0, #8 - mov r2, #0x28 - mov r3, #0x58 - bl ov21_021D154C - mov r0, #0xa8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #8 - add r0, #0xc - mov r2, #0x28 - mov r3, #0x80 - bl ov21_021D154C - mov r0, #0xd0 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #8 - add r0, #0x10 - mov r2, #0x28 - mov r3, #0xa8 - bl ov21_021D154C - str r4, [r5, #8] - str r5, [r5, #0xc] - str r6, [sp] - add r3, r5, #0 - ldr r0, [r5, #4] - ldr r2, _021E3720 ; =ov21_021E37CC - mov r1, #6 - add r3, #8 - bl sub_02023FCC - str r0, [r5, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E3720: .word ov21_021E37CC - thumb_func_end ov21_021E3688 - - thumb_func_start ov21_021E3724 -ov21_021E3724: ; 0x021E3724 - mov r2, #0 - mov r1, #3 -_021E3728: - add r2, r2, #1 - str r1, [r0, #0xc] - add r0, r0, #4 - cmp r2, #6 - blt _021E3728 - bx lr - thumb_func_end ov21_021E3724 - - thumb_func_start ov21_021E3734 -ov21_021E3734: ; 0x021E3734 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0x2c] - cmp r1, #0 - bne _021E3744 - ldr r0, [r0, #0] - bl sub_0202404C -_021E3744: - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021E3754 - ldr r0, [r4, #0x20] - cmp r0, #2 - beq _021E3754 - mov r0, #1 - str r0, [r4, #0x20] -_021E3754: - ldr r0, [r4, #4] - ldr r0, [r0, #8] - cmp r0, #4 - bhi _021E37AE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E3768: ; jump table - .short _021E3772 - _021E3768 - 2 ; case 0 - .short _021E377E - _021E3768 - 2 ; case 1 - .short _021E378A - _021E3768 - 2 ; case 2 - .short _021E3796 - _021E3768 - 2 ; case 3 - .short _021E37A2 - _021E3768 - 2 ; case 4 -_021E3772: - ldr r0, [r4, #0xc] - cmp r0, #2 - beq _021E37B2 - mov r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021E377E: - ldr r0, [r4, #0x10] - cmp r0, #2 - beq _021E37B2 - mov r0, #1 - str r0, [r4, #0x10] - pop {r4, pc} -_021E378A: - ldr r0, [r4, #0x14] - cmp r0, #2 - beq _021E37B2 - mov r0, #1 - str r0, [r4, #0x14] - pop {r4, pc} -_021E3796: - ldr r0, [r4, #0x18] - cmp r0, #2 - beq _021E37B2 - mov r0, #1 - str r0, [r4, #0x18] - pop {r4, pc} -_021E37A2: - ldr r0, [r4, #0x1c] - cmp r0, #2 - beq _021E37B2 - mov r0, #1 - str r0, [r4, #0x1c] - pop {r4, pc} -_021E37AE: - bl sub_02022974 -_021E37B2: - pop {r4, pc} - thumb_func_end ov21_021E3734 - - thumb_func_start ov21_021E37B4 -ov21_021E37B4: ; 0x021E37B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E37B4 - - thumb_func_start ov21_021E37CC -ov21_021E37CC: ; 0x021E37CC - push {r3, r4, r5, r6, r7, lr} - ldr r6, [r2, #0] - add r7, r0, #0 - lsl r0, r7, #2 - add r0, r6, r0 - ldr r5, [r2, #4] - ldr r4, [r6, #4] - cmp r1, #0 - str r1, [r0, #0xc] - beq _021E37E6 - cmp r1, #2 - beq _021E37EC - pop {r3, r4, r5, r6, r7, pc} -_021E37E6: - mov r0, #0 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_021E37EC: - ldr r0, [r5, #0x14] - mov r1, #2 - add r2, r7, #0 - bl ov21_021D4F20 - cmp r7, #5 - bhi _021E38F6 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E3806: ; jump table - .short _021E3820 - _021E3806 - 2 ; case 0 - .short _021E383E - _021E3806 - 2 ; case 1 - .short _021E385C - _021E3806 - 2 ; case 2 - .short _021E387A - _021E3806 - 2 ; case 3 - .short _021E38B4 - _021E3806 - 2 ; case 4 - .short _021E3812 - _021E3806 - 2 ; case 5 -_021E3812: - add r0, r4, #0 - bl ov21_021E2E00 - ldr r0, _021E38F8 ; =0x000005DD - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021E3820: - ldr r2, [r4, #8] - cmp r2, #0 - beq _021E38F6 - add r0, r6, #0 - mov r1, #0 - bl ov21_021E3C18 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E3E8C - ldr r0, _021E38FC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021E383E: - ldr r2, [r4, #8] - cmp r2, #1 - beq _021E38F6 - add r0, r6, #0 - mov r1, #1 - bl ov21_021E3C18 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E3E8C - ldr r0, _021E38FC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021E385C: - ldr r2, [r4, #8] - cmp r2, #2 - beq _021E38F6 - add r0, r6, #0 - mov r1, #2 - bl ov21_021E3C18 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E3E8C - ldr r0, _021E38FC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021E387A: - ldr r2, [r4, #8] - cmp r2, #3 - beq _021E38F6 - add r0, r6, #0 - mov r1, #3 - bl ov21_021E3C18 - cmp r0, #0 - beq _021E389C - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E3E8C - ldr r0, _021E38FC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021E389C: - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _021E38F6 - ldr r0, [r4, #8] - cmp r0, #2 - beq _021E38AE - ldr r0, _021E38F8 ; =0x000005DD - bl sub_02005748 -_021E38AE: - mov r0, #1 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} -_021E38B4: - ldr r2, [r4, #8] - cmp r2, #4 - beq _021E38F6 - add r0, r6, #0 - mov r1, #4 - bl ov21_021E3C18 - cmp r0, #0 - beq _021E38D6 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E3E8C - ldr r0, _021E38FC ; =0x0000068B - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_021E38D6: - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _021E38F6 - ldr r0, [r4, #4] - bl ov21_021D3954 - cmp r0, #1 - bne _021E38F2 - ldr r0, [r4, #8] - cmp r0, #2 - beq _021E38F2 - ldr r0, _021E38F8 ; =0x000005DD - bl sub_02005748 -_021E38F2: - mov r0, #0 - str r0, [r5, #0x10] -_021E38F6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E38F8: .word 0x000005DD -_021E38FC: .word 0x0000068B - thumb_func_end ov21_021E37CC - - thumb_func_start ov21_021E3900 -ov21_021E3900: ; 0x021E3900 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021E3960 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov21_021E39FC - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov21_021E3AF0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov21_021E3BD8 - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E3FE4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E3900 - - thumb_func_start ov21_021E393C -ov21_021E393C: ; 0x021E393C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E3BDC - add r0, r5, #0 - bl ov21_021E3BC0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E3AAC - ldr r0, [r4, #0] - mov r1, #5 - ldr r0, [r0, #0] - bl sub_02019EBC - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E393C - - thumb_func_start ov21_021E3960 -ov21_021E3960: ; 0x021E3960 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #4] - add r4, r2, #0 - ldr r0, [r0, #0x30] - cmp r0, #0 - beq _021E399E - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0] - mov r1, #6 - mov r2, #4 - bl ov21_021D276C - ldr r0, [r6, #8] - bl ov21_021D36D8 - cmp r0, #1 - bne _021E399E - mov r0, #0x20 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #0] - mov r1, #0x18 - mov r2, #4 - mov r3, #0 - bl ov21_021D276C -_021E399E: - ldr r0, [r5, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x22 - mov r3, #5 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x3b - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r4, r0, #0 - ldrh r0, [r2] - mov r1, #5 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #5 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E3960 - - thumb_func_start ov21_021E39FC -ov21_021E39FC: ; 0x021E39FC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E3A9C ; =0x00000894 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x60 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #0x18] - bl sub_0200A3DC - ldr r0, [r5, #0x18] - bl sub_02009D4C - ldr r0, _021E3AA0 ; =0x0000083F - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xb - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x1c] - bl sub_0200A640 - ldr r0, [r5, #0x1c] - bl sub_02009D4C - ldr r0, _021E3AA4 ; =0x00000892 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5e - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x20] - ldr r0, _021E3AA8 ; =0x00000893 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5f - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x24] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E3A9C: .word 0x00000894 -_021E3AA0: .word 0x0000083F -_021E3AA4: .word 0x00000892 -_021E3AA8: .word 0x00000893 - thumb_func_end ov21_021E39FC - - thumb_func_start ov21_021E3AAC -ov21_021E3AAC: ; 0x021E3AAC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x1c] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x18] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x1c] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x20] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x24] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3AAC - - thumb_func_start ov21_021E3AF0 -ov21_021E3AF0: ; 0x021E3AF0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021E3BBC ; =0x00000893 - add r5, r0, #0 - mov r0, #0 - add r6, r2, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #5 - str r2, [sp, #0x10] - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x4c - sub r2, #0x54 - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r7, #7 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x20 - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - mov r0, #0x36 - str r6, [sp, #0x48] - lsl r0, r0, #0xe - mov r6, #0x39 - str r0, [sp, #0x38] - mov r4, #0 - lsl r7, r7, #0xe - lsl r6, r6, #0xe -_021E3B60: - cmp r4, #5 - bhi _021E3BA2 - add r0, r4, r4 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E3B70: ; jump table - .short _021E3B80 - _021E3B70 - 2 ; case 0 - .short _021E3B84 - _021E3B70 - 2 ; case 1 - .short _021E3B8C - _021E3B70 - 2 ; case 2 - .short _021E3B94 - _021E3B70 - 2 ; case 3 - .short _021E3B9C - _021E3B70 - 2 ; case 4 - .short _021E3B7C - _021E3B70 - 2 ; case 5 -_021E3B7C: - str r6, [sp, #0x34] - b _021E3BA2 -_021E3B80: - str r7, [sp, #0x34] - b _021E3BA2 -_021E3B84: - mov r0, #0x11 - lsl r0, r0, #0xe - str r0, [sp, #0x34] - b _021E3BA2 -_021E3B8C: - mov r0, #0x1b - lsl r0, r0, #0xe - str r0, [sp, #0x34] - b _021E3BA2 -_021E3B94: - mov r0, #0x25 - lsl r0, r0, #0xe - str r0, [sp, #0x34] - b _021E3BA2 -_021E3B9C: - mov r0, #0x2f - lsl r0, r0, #0xe - str r0, [sp, #0x34] -_021E3BA2: - add r0, sp, #0x2c - bl sub_02021B90 - add r1, r4, #0 - stmia r5!, {r0} - bl sub_02021D6C - add r4, r4, #1 - cmp r4, #6 - blt _021E3B60 - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E3BBC: .word 0x00000893 - thumb_func_end ov21_021E3AF0 - - thumb_func_start ov21_021E3BC0 -ov21_021E3BC0: ; 0x021E3BC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E3BC6: - ldr r0, [r5, #0] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _021E3BC6 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E3BC0 - - thumb_func_start ov21_021E3BD8 -ov21_021E3BD8: ; 0x021E3BD8 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E3BD8 - - thumb_func_start ov21_021E3BDC -ov21_021E3BDC: ; 0x021E3BDC - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E3BDC - - thumb_func_start ov21_021E3BE0 -ov21_021E3BE0: ; 0x021E3BE0 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r4, #0 - mov r6, #1 -_021E3BE8: - ldr r0, [r5, #4] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _021E3BE8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E3BE0 - - thumb_func_start ov21_021E3BFC -ov21_021E3BFC: ; 0x021E3BFC - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021E3C04: - ldr r0, [r5, #4] - add r1, r6, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _021E3C04 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E3BFC - - thumb_func_start ov21_021E3C18 -ov21_021E3C18: ; 0x021E3C18 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov21_021E2EC4 - cmp r0, #1 - bne _021E3C2A - mov r1, #0 - str r1, [r4, #0x28] -_021E3C2A: - pop {r4, pc} - thumb_func_end ov21_021E3C18 - - thumb_func_start ov21_021E3C2C -ov21_021E3C2C: ; 0x021E3C2C - ldr r3, _021E3C30 ; =ov21_021E3C34 - bx r3 - ; .align 2, 0 -_021E3C30: .word ov21_021E3C34 - thumb_func_end ov21_021E3C2C - - thumb_func_start ov21_021E3C34 -ov21_021E3C34: ; 0x021E3C34 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r5, #4] - bl ov21_021E3C64 - ldr r0, _021E3C5C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _021E3C58 - add r0, r4, #0 - bl ov21_021E2E00 - mov r0, #1 - str r0, [r5, #0x2c] - ldr r0, _021E3C60 ; =0x000005DD - bl sub_02005748 -_021E3C58: - pop {r3, r4, r5, pc} - nop -_021E3C5C: .word 0x021BF67C -_021E3C60: .word 0x000005DD - thumb_func_end ov21_021E3C34 - - thumb_func_start ov21_021E3C64 -ov21_021E3C64: ; 0x021E3C64 - mov r1, #0 - str r1, [r0, #0x2c] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E3C64 - - thumb_func_start ov21_021E3C6C -ov21_021E3C6C: ; 0x021E3C6C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #0xa8 - bl sub_02018144 - str r0, [r5, #0x18] - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r2, #0x18 - ldr r0, [r5, #0x18] - mov r1, #0x1c - add r3, r2, #0 - bl ov21_021D4FE4 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - mov r2, #0x18 - add r0, #0x1c - mov r1, #0x44 - add r3, r2, #0 - bl ov21_021D4FE4 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - mov r2, #0x18 - add r0, #0x38 - mov r1, #0x6c - add r3, r2, #0 - bl ov21_021D4FE4 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - mov r2, #0x18 - add r0, #0x54 - mov r1, #0x94 - add r3, r2, #0 - bl ov21_021D4FE4 - ldr r0, [r4, #8] - bl ov21_021D3954 - cmp r0, #1 - bne _021E3CFA - mov r1, #0 - b _021E3CFC -_021E3CFA: - mov r1, #2 -_021E3CFC: - mov r0, #0x10 - str r0, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - mov r2, #0x18 - add r0, #0x70 - mov r1, #0xbc - add r3, r2, #0 - bl ov21_021D4FE4 - mov r0, #0x10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - ldr r0, [r5, #0x18] - mov r2, #0x18 - add r0, #0x8c - mov r1, #0xe4 - add r3, r2, #0 - bl ov21_021D4FE4 - add r0, r6, #0 - bl ov21_021D4EE4 - str r0, [r5, #0x14] - ldr r1, [r5, #0x18] - mov r2, #6 - mov r3, #1 - bl ov21_021D4F04 - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E3C6C - - thumb_func_start ov21_021E3D48 -ov21_021E3D48: ; 0x021E3D48 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0x2c] - ldr r5, [r4, #4] - cmp r0, #0 - beq _021E3D58 - b _021E3E66 -_021E3D58: - ldr r0, _021E3E68 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x10 - tst r0, r1 - beq _021E3D6C - ldr r0, [r6, #0x14] - mov r1, #0 - mov r2, #1 - bl ov21_021D4F20 -_021E3D6C: - ldr r0, _021E3E68 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x20 - tst r0, r1 - beq _021E3D80 - mov r1, #0 - ldr r0, [r6, #0x14] - sub r2, r1, #1 - bl ov21_021D4F20 -_021E3D80: - ldr r0, _021E3E68 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _021E3E66 - ldr r0, [r6, #0x14] - bl ov21_021D4F7C - cmp r0, #5 - bhi _021E3E66 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E3DA0: ; jump table - .short _021E3DAC - _021E3DA0 - 2 ; case 0 - .short _021E3DC6 - _021E3DA0 - 2 ; case 1 - .short _021E3DE0 - _021E3DA0 - 2 ; case 2 - .short _021E3DFA - _021E3DA0 - 2 ; case 3 - .short _021E3E26 - _021E3DA0 - 2 ; case 4 - .short _021E3E52 - _021E3DA0 - 2 ; case 5 -_021E3DAC: - ldr r2, [r5, #8] - cmp r2, #0 - beq _021E3E66 - add r0, r4, #0 - mov r1, #0 - bl ov21_021E3C18 - mov r0, #2 - str r0, [r4, #0xc] - ldr r0, _021E3E6C ; =0x0000068B - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3DC6: - ldr r2, [r5, #8] - cmp r2, #1 - beq _021E3E66 - add r0, r4, #0 - mov r1, #1 - bl ov21_021E3C18 - mov r0, #2 - str r0, [r4, #0x10] - ldr r0, _021E3E6C ; =0x0000068B - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3DE0: - ldr r2, [r5, #8] - cmp r2, #2 - beq _021E3E66 - add r0, r4, #0 - mov r1, #2 - bl ov21_021E3C18 - mov r0, #2 - str r0, [r4, #0x14] - ldr r0, _021E3E6C ; =0x0000068B - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3DFA: - ldr r2, [r5, #8] - cmp r2, #3 - beq _021E3E66 - add r0, r4, #0 - mov r1, #3 - bl ov21_021E3C18 - cmp r0, #0 - beq _021E3E18 - mov r0, #2 - str r0, [r4, #0x18] - ldr r0, _021E3E6C ; =0x0000068B - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3E18: - ldr r0, [r5, #8] - cmp r0, #2 - beq _021E3E66 - ldr r0, _021E3E70 ; =0x000005DD - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3E26: - ldr r2, [r5, #8] - cmp r2, #4 - beq _021E3E66 - add r0, r4, #0 - mov r1, #4 - bl ov21_021E3C18 - cmp r0, #0 - beq _021E3E44 - mov r0, #2 - str r0, [r4, #0x1c] - ldr r0, _021E3E6C ; =0x0000068B - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3E44: - ldr r0, [r5, #8] - cmp r0, #2 - beq _021E3E66 - ldr r0, _021E3E70 ; =0x000005DD - bl sub_02005748 - pop {r4, r5, r6, pc} -_021E3E52: - add r0, r5, #0 - bl ov21_021E2E00 - mov r0, #1 - str r0, [r4, #0x2c] - mov r0, #2 - str r0, [r4, #0x20] - ldr r0, _021E3E70 ; =0x000005DD - bl sub_02005748 -_021E3E66: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E3E68: .word 0x021BF67C -_021E3E6C: .word 0x0000068B -_021E3E70: .word 0x000005DD - thumb_func_end ov21_021E3D48 - - thumb_func_start ov21_021E3E74 -ov21_021E3E74: ; 0x021E3E74 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl sub_020181C4 - ldr r0, [r4, #0x14] - bl ov21_021D4EFC - mov r0, #0 - str r0, [r4, #0x14] - str r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov21_021E3E74 - - thumb_func_start ov21_021E3E8C -ov21_021E3E8C: ; 0x021E3E8C - push {r3, lr} - ldr r3, [r1, #4] - mov r2, #0 - str r2, [r1, #0x30] - ldr r1, [r3, #8] - cmp r1, #4 - bhi _021E3EE8 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E3EA6: ; jump table - .short _021E3EB0 - _021E3EA6 - 2 ; case 0 - .short _021E3EBA - _021E3EA6 - 2 ; case 1 - .short _021E3EC6 - _021E3EA6 - 2 ; case 2 - .short _021E3ED2 - _021E3EA6 - 2 ; case 3 - .short _021E3EDE - _021E3EA6 - 2 ; case 4 -_021E3EB0: - ldr r0, [r0, #0x14] - mov r1, #4 - bl ov21_021D4F20 - pop {r3, pc} -_021E3EBA: - ldr r0, [r0, #0x14] - mov r1, #4 - mov r2, #1 - bl ov21_021D4F20 - pop {r3, pc} -_021E3EC6: - ldr r0, [r0, #0x14] - mov r1, #4 - mov r2, #2 - bl ov21_021D4F20 - pop {r3, pc} -_021E3ED2: - ldr r0, [r0, #0x14] - mov r1, #4 - mov r2, #3 - bl ov21_021D4F20 - pop {r3, pc} -_021E3EDE: - mov r1, #4 - ldr r0, [r0, #0x14] - add r2, r1, #0 - bl ov21_021D4F20 -_021E3EE8: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E3E8C - - thumb_func_start ov21_021E3EEC -ov21_021E3EEC: ; 0x021E3EEC - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #8] - cmp r0, #0 - beq _021E3F26 - ldr r0, [r4, #8] - bl ov21_021D3998 - cmp r0, #2 - bne _021E3F26 - ldr r0, [r4, #0x30] - cmp r0, #0 - bne _021E3F18 - ldr r0, _021E3F28 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x80 - tst r0, r1 - beq _021E3F26 - mov r0, #1 - str r0, [r4, #0x30] - pop {r4, pc} -_021E3F18: - ldr r0, _021E3F28 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #0x40 - tst r0, r1 - beq _021E3F26 - mov r0, #0 - str r0, [r4, #0x30] -_021E3F26: - pop {r4, pc} - ; .align 2, 0 -_021E3F28: .word 0x021BF67C - thumb_func_end ov21_021E3EEC - - thumb_func_start ov21_021E3F2C -ov21_021E3F2C: ; 0x021E3F2C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, [r4, #0x14] - ldr r1, [r5, #0] - add r6, r2, #0 - bl ov21_021D25B8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E3F48 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E3F2C - - thumb_func_start ov21_021E3F48 -ov21_021E3F48: ; 0x021E3F48 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - ldr r0, [r6, #8] - add r4, r1, #0 - bl ov21_021D3998 - cmp r0, #0 - beq _021E3F7E - add r0, r5, #0 - mov r1, #1 - bl ov21_021E3F98 - ldr r1, [r6, #0x30] - cmp r1, #0 - bne _021E3F86 - cmp r0, #0 - beq _021E3F74 - ldr r0, [r4, #0x14] - ldr r1, [r5, #0] - bl ov21_021D25B8 -_021E3F74: - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E3F88 - pop {r4, r5, r6, pc} -_021E3F7E: - add r0, r5, #0 - mov r1, #0 - bl ov21_021E3F98 -_021E3F86: - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E3F48 - - thumb_func_start ov21_021E3F88 -ov21_021E3F88: ; 0x021E3F88 - ldr r3, _021E3F94 ; =ov21_021D2544 - add r2, r0, #0 - ldr r0, [r1, #0x14] - ldr r1, [r2, #0] - bx r3 - nop -_021E3F94: .word ov21_021D2544 - thumb_func_end ov21_021E3F88 - - thumb_func_start ov21_021E3F98 -ov21_021E3F98: ; 0x021E3F98 - push {r3, r4, r5, lr} - ldr r4, [r0, #0] - mov r0, #0x79 - lsl r0, r0, #2 - add r0, r4, r0 - add r5, r1, #0 - bl ov21_021D25A0 - cmp r5, r0 - beq _021E3FBC - mov r0, #0x79 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r5, #0 - bl ov21_021D2584 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E3FBC: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3F98 - - thumb_func_start ov21_021E3FC0 -ov21_021E3FC0: ; 0x021E3FC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r2, #2 - add r0, r5, r0 - ldr r0, [r0, #4] - add r4, r1, #0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_020129D0 - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #4] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_020129D0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E3FC0 - - thumb_func_start ov21_021E3FE4 -ov21_021E3FE4: ; 0x021E3FE4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #8] - bl ov21_021D3954 - cmp r0, #0 - bne _021E3FFA - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02021CAC -_021E3FFA: - pop {r4, pc} - thumb_func_end ov21_021E3FE4 - - thumb_func_start ov21_021E3FFC -ov21_021E3FFC: ; 0x021E3FFC - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - bl ov21_021E4080 - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021E40C8 - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0x20] - bl ov21_021E411C - str r0, [r5, #0x24] - ldr r0, _021E403C ; =ov21_021E4120 - str r0, [r5, #8] - ldr r0, _021E4040 ; =ov21_021E4168 - str r0, [r5, #0xc] - ldr r0, _021E4044 ; =ov21_021E4194 - str r0, [r5, #0x10] - ldr r0, _021E4048 ; =ov21_021E41A8 - str r0, [r5, #0x14] - ldr r0, _021E404C ; =ov21_021E4268 - str r0, [r5, #0x18] - ldr r0, _021E4050 ; =ov21_021E4288 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E403C: .word ov21_021E4120 -_021E4040: .word ov21_021E4168 -_021E4044: .word ov21_021E4194 -_021E4048: .word ov21_021E41A8 -_021E404C: .word ov21_021E4268 -_021E4050: .word ov21_021E4288 - thumb_func_end ov21_021E3FFC - - thumb_func_start ov21_021E4054 -ov21_021E4054: ; 0x021E4054 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E40F4 - ldr r0, [r4, #4] - bl ov21_021E4108 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4054 - - thumb_func_start ov21_021E4068 -ov21_021E4068: ; 0x021E4068 - ldr r0, [r0, #4] - str r1, [r0, #4] - str r2, [r0, #8] - bx lr - thumb_func_end ov21_021E4068 - - thumb_func_start ov21_021E4070 -ov21_021E4070: ; 0x021E4070 - ldr r0, [r0, #4] - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E4070 - - thumb_func_start ov21_021E4078 -ov21_021E4078: ; 0x021E4078 - ldr r0, [r0, #4] - str r1, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E4078 - - thumb_func_start ov21_021E4080 -ov21_021E4080: ; 0x021E4080 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - bne _021E4092 - bl sub_02022974 -_021E4092: - add r2, r4, #0 - mov r1, #0x10 - mov r0, #0 -_021E4098: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E4098 - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1430 - str r0, [r4, #0xc] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E4080 - - thumb_func_start ov21_021E40C8 -ov21_021E40C8: ; 0x021E40C8 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - bne _021E40DA - bl sub_02022974 -_021E40DA: - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_021E40E0: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E40E0 - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E40C8 - - thumb_func_start ov21_021E40F4 -ov21_021E40F4: ; 0x021E40F4 - push {r4, lr} - add r4, r0, #0 - bne _021E40FE - bl sub_02022974 -_021E40FE: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E40F4 - - thumb_func_start ov21_021E4108 -ov21_021E4108: ; 0x021E4108 - push {r4, lr} - add r4, r0, #0 - bne _021E4112 - bl sub_02022974 -_021E4112: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4108 - - thumb_func_start ov21_021E411C -ov21_021E411C: ; 0x021E411C - mov r0, #0 - bx lr - thumb_func_end ov21_021E411C - - thumb_func_start ov21_021E4120 -ov21_021E4120: ; 0x021E4120 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #4] - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r5, #4] - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bne _021E413E - bl sub_02022974 -_021E413E: - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021E4144: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E4144 - str r4, [r5, #8] - add r0, r7, #0 - bl sub_020050F8 - str r0, [r4, #0] - bl sub_020050EC - str r0, [r4, #8] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E4898 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4120 - - thumb_func_start ov21_021E4168 -ov21_021E4168: ; 0x021E4168 - push {r3, r4, r5, lr} - ldr r2, [r0, #0xc] - add r5, r1, #0 - ldr r4, [r0, #8] - cmp r2, #1 - bne _021E4178 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E4178: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021E4182 - mov r0, #0 - pop {r3, r4, r5, pc} -_021E4182: - add r0, r4, #0 - bl ov21_021E4898 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E4C68 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E4168 - - thumb_func_start ov21_021E4194 -ov21_021E4194: ; 0x021E4194 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4194 - - thumb_func_start ov21_021E41A8 -ov21_021E41A8: ; 0x021E41A8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r3, [r3, #8] - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021E4264 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E41C6: ; jump table - .short _021E41CE - _021E41C6 - 2 ; case 0 - .short _021E41EC - _021E41C6 - 2 ; case 1 - .short _021E4228 - _021E41C6 - 2 ; case 2 - .short _021E4260 - _021E41C6 - 2 ; case 3 -_021E41CE: - mov r1, #0x33 - ldr r0, [r4, #4] - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x33 - str r0, [r4, #8] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4264 -_021E41EC: - ldr r0, [r4, #4] - add r1, r5, #0 - str r0, [sp] - add r0, r6, #0 - bl ov21_021E4590 - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _021E420C - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E43C8 - b _021E4218 -_021E420C: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E448C -_021E4218: - mov r0, #0 - mov r1, #3 - bl sub_0200564C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4264 -_021E4228: - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _021E423A - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E4440 - b _021E4244 -_021E423A: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E4518 -_021E4244: - cmp r0, #1 - bne _021E4264 - bl sub_02005684 - cmp r0, #0 - bne _021E4264 - mov r0, #1 - add r1, r0, #0 - bl sub_020049F4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4264 -_021E4260: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E4264: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E41A8 - - thumb_func_start ov21_021E4268 -ov21_021E4268: ; 0x021E4268 - push {r3, r4, r5, lr} - ldr r4, [r3, #8] - ldr r5, [r1, #8] - add r2, r0, #0 - add r1, r2, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov21_021E4A28 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E4B10 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4268 - - thumb_func_start ov21_021E4288 -ov21_021E4288: ; 0x021E4288 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r3, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021E4324 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E42A2: ; jump table - .short _021E42AC - _021E42A2 - 2 ; case 0 - .short _021E42DE - _021E42A2 - 2 ; case 1 - .short _021E4302 - _021E42A2 - 2 ; case 2 - .short _021E4310 - _021E42A2 - 2 ; case 3 - .short _021E4320 - _021E42A2 - 2 ; case 4 -_021E42AC: - ldr r1, [r3, #0xc] - cmp r1, #0 - bne _021E42BC - add r1, r3, #0 - mov r3, #0 - bl ov21_021E43C8 - b _021E42C4 -_021E42BC: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E448C -_021E42C4: - mov r0, #1 - mov r1, #0 - bl sub_020049F4 - mov r0, #0x7f - mov r1, #3 - mov r2, #0 - bl sub_0200560C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4324 -_021E42DE: - ldr r1, [r3, #0xc] - cmp r1, #0 - bne _021E42EE - add r1, r3, #0 - mov r3, #0 - bl ov21_021E4440 - b _021E42F6 -_021E42EE: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E4518 -_021E42F6: - cmp r0, #0 - beq _021E4324 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4324 -_021E4302: - add r1, r3, #0 - bl ov21_021E45DC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4324 -_021E4310: - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4324 -_021E4320: - mov r0, #1 - pop {r4, pc} -_021E4324: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov21_021E4288 - - thumb_func_start ov21_021E4328 -ov21_021E4328: ; 0x021E4328 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov21_021D2170 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r2, r0, #0 - mov r0, #0x30 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #4] - mov r3, #2 - bl ov21_021D1890 - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E4328 - - thumb_func_start ov21_021E4360 -ov21_021E4360: ; 0x021E4360 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0 - str r0, [sp] - mov r6, #1 -_021E436A: - mov r4, #0 - add r5, r7, #0 -_021E436E: - ldr r0, [r5, #0x20] - add r1, r6, #0 - bl sub_02021FE0 - add r4, r4, #1 - add r5, #8 - cmp r4, #9 - blt _021E436E - ldr r0, [r7, #0x68] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [sp] - add r7, #0x54 - add r0, r0, #1 - str r0, [sp] - cmp r0, #9 - blt _021E436A - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4360 - - thumb_func_start ov21_021E4394 -ov21_021E4394: ; 0x021E4394 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0 - str r0, [sp] - add r6, r0, #0 -_021E439E: - mov r4, #0 - add r5, r7, #0 -_021E43A2: - ldr r0, [r5, #0x20] - add r1, r6, #0 - bl sub_02021FE0 - add r4, r4, #1 - add r5, #8 - cmp r4, #9 - blt _021E43A2 - ldr r0, [r7, #0x68] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [sp] - add r7, #0x54 - add r0, r0, #1 - str r0, [sp] - cmp r0, #9 - blt _021E439E - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4394 - - thumb_func_start ov21_021E43C8 -ov21_021E43C8: ; 0x021E43C8 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E4360 - ldr r0, [r4, #8] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E442E - cmp r6, #0 - beq _021E440A - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #3 - add r2, r1, #0 - sub r2, #0x13 - bl ov21_021D23F8 - b _021E442E -_021E440A: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #3 - add r3, r1, #0 - sub r3, #0x13 - bl ov21_021D23F8 -_021E442E: - mov r1, #0x5b - ldr r0, [r5, #0] - lsl r1, r1, #2 - add r1, r0, r1 - bl ov21_021D24FC - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E43C8 - - thumb_func_start ov21_021E4440 -ov21_021E4440: ; 0x021E4440 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021E4460 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021E446A -_021E4460: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021E446A: - cmp r0, #0 - beq _021E447C - cmp r4, #0 - beq _021E4478 - add r0, r6, #0 - bl ov21_021E4394 -_021E4478: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E447C: - mov r1, #0x5b - ldr r0, [r5, #0] - lsl r1, r1, #2 - add r1, r0, r1 - bl ov21_021D24FC - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E4440 - - thumb_func_start ov21_021E448C -ov21_021E448C: ; 0x021E448C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - add r4, r3, #0 - bl ov21_021E4360 - cmp r4, #0 - bne _021E44B4 - ldr r0, [r5, #8] - mov r1, #0x30 - str r0, [sp] - ldr r0, [r5, #0x10] - mov r3, #0x40 - str r0, [sp, #4] - ldr r2, [r5, #4] - add r0, r7, #0 - bl ov21_021D2648 -_021E44B4: - ldr r0, [r6, #8] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E4512 - cmp r4, #0 - beq _021E44EC - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r2, #0x2f - str r2, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r1, [r5, #0x10] - sub r2, #0x3f - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov21_021D23F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E44EC: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r3, #0x2f - str r3, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r1, [r5, #0x10] - sub r3, #0x3f - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov21_021D23F8 -_021E4512: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E448C - - thumb_func_start ov21_021E4518 -ov21_021E4518: ; 0x021E4518 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bne _021E4538 - bl ov21_021D2664 - str r0, [sp] - ldr r0, [r4, #0] - ldr r1, [r5, #0] - ldr r2, [r5, #4] - bl ov21_021D2164 - b _021E453C -_021E4538: - mov r0, #1 - str r0, [sp] -_021E453C: - ldr r0, [r6, #8] - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r4, #0] - beq _021E4556 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - str r0, [sp, #4] - b _021E4562 -_021E4556: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC - str r0, [sp, #4] -_021E4562: - mov r1, #0 - add r2, sp, #0 -_021E4566: - ldr r0, [r2, #0] - cmp r0, #0 - beq _021E4574 - add r1, r1, #1 - add r2, r2, #4 - cmp r1, #2 - blt _021E4566 -_021E4574: - cmp r1, #2 - bne _021E4588 - cmp r7, #1 - bne _021E4582 - add r0, r5, #0 - bl ov21_021E4394 -_021E4582: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E4588: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4518 - - thumb_func_start ov21_021E4590 -ov21_021E4590: ; 0x021E4590 - push {r3, r4, r5, r6, r7, lr} - ldr r6, [sp, #0x18] - add r7, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - add r2, r6, #0 - bl ov21_021E45FC - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E46A8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E47CC - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov21_021E4890 - add r0, r4, #0 - add r1, r7, #0 - bl ov21_021E4328 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E4ABC - add r0, r5, #0 - bl ov21_021E4AF4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4590 - - thumb_func_start ov21_021E45DC -ov21_021E45DC: ; 0x021E45DC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E4894 - add r0, r5, #0 - bl ov21_021E4868 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E4770 - add r0, r4, #0 - bl ov21_021E4664 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E45DC - - thumb_func_start ov21_021E45FC -ov21_021E45FC: ; 0x021E45FC - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r5, r2, #0 - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x46 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E45FC - - thumb_func_start ov21_021E4664 -ov21_021E4664: ; 0x021E4664 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0] - mov r2, #0 - ldr r0, [r0, #0] - mov r1, #1 - add r3, r2, #0 - bl sub_0201C63C - mov r1, #0 - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0xc0 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - add r0, r0, #4 - add r3, r1, #0 - bl sub_0201AE78 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201C2B4 - add sp, #8 - pop {r4, pc} - thumb_func_end ov21_021E4664 - - thumb_func_start ov21_021E46A8 -ov21_021E46A8: ; 0x021E46A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E4760 ; =0x00002B6C - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x74 - bl sub_02009A4C - mov r1, #0xc5 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - bl sub_0200A3DC - mov r0, #0xc5 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009D4C - ldr r0, _021E4764 ; =0x00002B0B - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x13 - mov r3, #0 - bl sub_02009B04 - mov r1, #0xc6 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - bl sub_0200A640 - mov r0, #0xc6 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009D4C - ldr r0, _021E4768 ; =0x00002B6D - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x75 - mov r3, #1 - bl sub_02009BC4 - mov r1, #0xc7 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, _021E476C ; =0x00002B6B - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x73 - mov r3, #1 - bl sub_02009BC4 - mov r1, #0x32 - lsl r1, r1, #4 - str r0, [r5, r1] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E4760: .word 0x00002B6C -_021E4764: .word 0x00002B0B -_021E4768: .word 0x00002B6D -_021E476C: .word 0x00002B6B - thumb_func_end ov21_021E46A8 - - thumb_func_start ov21_021E4770 -ov21_021E4770: ; 0x021E4770 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xc5 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #0xc6 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A6DC - mov r0, #5 - mov r1, #0xc5 - lsl r0, r0, #6 - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r5, r1] - bl sub_02009D68 - mov r0, #0x51 - mov r1, #0xc6 - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r5, r1] - bl sub_02009D68 - mov r0, #0x52 - mov r1, #0xc7 - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r5, r1] - bl sub_02009D68 - mov r0, #0x53 - mov r1, #0x32 - lsl r0, r0, #2 - lsl r1, r1, #4 - ldr r0, [r4, r0] - ldr r1, [r5, r1] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E4770 - - thumb_func_start ov21_021E47CC -ov21_021E47CC: ; 0x021E47CC - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - ldr r4, [r1, #0] - ldr r3, _021E4864 ; =0x00002B6B - add r7, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #5 - str r1, [sp, #0x10] - lsl r0, r0, #6 - add r5, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x50 - sub r2, #0x60 - add r3, r3, #2 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r6, sp, #0x30 - str r0, [sp, #0x30] - add r0, sp, #0x50 - str r0, [sp, #0x34] - mov r0, #0x11 - str r0, [sp, #0x44] - mov r0, #1 - str r0, [sp, #0x48] - mov r0, #0 - str r5, [sp, #0x4c] - str r0, [sp, #0x2c] - str r0, [sp, #0x38] - str r0, [sp, #0x3c] -_021E4836: - mov r4, #0 - add r5, r7, #0 -_021E483A: - add r0, r6, #0 - bl sub_02021B90 - str r0, [r5, #0x20] - add r4, r4, #1 - add r5, #8 - cmp r4, #9 - blt _021E483A - add r0, r6, #0 - bl sub_02021B90 - str r0, [r7, #0x68] - ldr r0, [sp, #0x2c] - add r7, #0x54 - add r0, r0, #1 - str r0, [sp, #0x2c] - cmp r0, #9 - blt _021E4836 - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - nop -_021E4864: .word 0x00002B6B - thumb_func_end ov21_021E47CC - - thumb_func_start ov21_021E4868 -ov21_021E4868: ; 0x021E4868 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r7, #0 -_021E486E: - mov r4, #0 - add r5, r6, #0 -_021E4872: - ldr r0, [r5, #0x20] - bl sub_02021BD4 - add r4, r4, #1 - add r5, #8 - cmp r4, #9 - blt _021E4872 - ldr r0, [r6, #0x68] - bl sub_02021BD4 - add r7, r7, #1 - add r6, #0x54 - cmp r7, #9 - blt _021E486E - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4868 - - thumb_func_start ov21_021E4890 -ov21_021E4890: ; 0x021E4890 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E4890 - - thumb_func_start ov21_021E4894 -ov21_021E4894: ; 0x021E4894 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E4894 - - thumb_func_start ov21_021E4898 -ov21_021E4898: ; 0x021E4898 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl ov21_021E4D1C - add r2, r0, #0 - ldr r1, [r4, #0] - mov r0, #1 - bl sub_02005188 - str r0, [r4, #4] - pop {r4, pc} - thumb_func_end ov21_021E4898 - - thumb_func_start ov21_021E48B0 -ov21_021E48B0: ; 0x021E48B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - ldr r0, [sp, #0x44] - ldr r7, [sp, #0x3c] - str r0, [sp, #0x44] - ldr r0, [sp, #0x48] - str r1, [sp, #8] - str r0, [sp, #0x48] - add r0, r2, #0 - str r3, [sp, #0xc] - ldr r5, [sp, #0x40] - bl sub_020050E0 - str r0, [sp, #0x1c] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r3, [sp, #0x44] - ldr r0, [r0, #0] - sub r3, #0x20 - lsl r2, r5, #0x10 - lsl r3, r3, #0x10 - add r0, r0, #4 - mov r1, #0 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 - ldr r1, [sp, #0x38] - ldr r0, [sp, #0xc] - mov r6, #0 - sub r0, r1, r0 - cmp r7, #0 - ble _021E4954 - lsl r0, r0, #0xc - str r0, [sp, #0x14] - asr r0, r0, #0x1f - str r0, [sp, #0x18] - lsl r0, r7, #0xc - add r4, r6, #0 - str r0, [sp, #0x10] -_021E4908: - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - asr r3, r4, #0x1f - add r2, r4, #0 - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _021E4958 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [sp, #0x10] - bl sub_020BCFD0 - asr r1, r0, #0xc - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x1c] - add r1, r1, r0 - ldr r0, [sp, #0x48] - ldr r3, [sp, #0x44] - str r0, [sp] - ldr r0, [sp, #8] - ldrb r1, [r2, r1] - ldr r0, [r0, #0] - add r2, r5, #0 - add r0, r0, #4 - bl ov21_021E495C - mov r0, #1 - lsl r0, r0, #0xc - add r6, r6, #1 - add r5, r5, #1 - add r4, r4, r0 - cmp r6, r7 - blt _021E4908 -_021E4954: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E4958: .word 0x00000000 - thumb_func_end ov21_021E48B0 - - thumb_func_start ov21_021E495C -ov21_021E495C: ; 0x021E495C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp, #8] - add r6, r2, #0 - add r7, r3, #0 - ldr r4, [sp, #0x20] - cmp r5, #0x7f - bls _021E4970 - sub r5, #0xff -_021E4970: - cmp r5, #0 - beq _021E499A - lsl r2, r5, #0xc - asr r0, r2, #0x1f - lsr r1, r2, #0xf - lsl r0, r0, #0x11 - orr r0, r1 - mov r1, #2 - lsl r3, r2, #0x11 - mov r2, #0 - lsl r1, r1, #0xa - add r3, r3, r1 - adc r0, r2 - lsl r1, r0, #0x14 - lsr r0, r3, #0xc - orr r0, r1 - mov r1, #0x7f - lsl r1, r1, #0xc - bl sub_020BCFD0 - asr r5, r0, #0xc -_021E499A: - ldr r1, [r4, #0] - add r0, r7, r5 - add r1, r7, r1 - cmp r0, r1 - ble _021E49AA - add r3, r1, #0 - sub r1, r0, r1 - b _021E49AE -_021E49AA: - add r3, r0, #0 - sub r1, r1, r0 -_021E49AE: - mov r0, #1 - str r0, [sp] - add r0, r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - lsl r2, r6, #0x10 - lsl r3, r3, #0x10 - ldr r0, [sp, #8] - mov r1, #6 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 - str r5, [r4, #0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E495C - - thumb_func_start ov21_021E49D0 -ov21_021E49D0: ; 0x021E49D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - ldr r0, [sp, #0x20] - add r5, r1, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r6, r2, #0 - add r4, r3, #0 - str r0, [sp, #0x24] - sub r0, r6, r5 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - ldr r3, [sp, #0x20] - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - ldr r0, [r7, #0] - sub r3, #0x20 - lsl r2, r4, #0x10 - lsl r3, r3, #0x10 - add r0, r0, #4 - mov r1, #0 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 - cmp r5, r6 - bge _021E4A24 -_021E4A0A: - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x20] - str r0, [sp] - ldr r0, [r7, #0] - mov r1, #0 - add r0, r0, #4 - add r2, r4, #0 - bl ov21_021E495C - add r5, r5, #1 - add r4, r4, #1 - cmp r5, r6 - blt _021E4A0A -_021E4A24: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E49D0 - - thumb_func_start ov21_021E4A28 -ov21_021E4A28: ; 0x021E4A28 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r3, #0xc9 - add r5, r0, #0 - lsl r3, r3, #2 - ldr r0, [r5, r3] - add r4, r1, #0 - add r0, r0, #4 - str r0, [r5, r3] - ldr r0, [r5, r3] - add r6, r2, #0 - lsr r2, r0, #0x1f - lsl r1, r0, #0x18 - sub r1, r1, r2 - mov r0, #0x18 - ror r1, r0 - add r1, r2, r1 - str r1, [r5, r3] - ldr r3, [r5, r3] - sub r3, #8 - bpl _021E4A56 - add r0, #0xe8 - add r3, r3, r0 -_021E4A56: - mov r0, #0xcb - lsl r0, r0, #2 - ldr r1, [r6, #4] - ldr r7, [r5, r0] - cmp r7, r1 - beq _021E4A82 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - str r3, [sp, #8] - mov r1, #0x97 - sub r0, r0, #4 - str r1, [sp, #0xc] - add r0, r5, r0 - str r0, [sp, #0x10] - ldr r2, [r6, #0] - add r0, r5, #0 - add r1, r4, #0 - add r3, r7, #0 - bl ov21_021E48B0 - b _021E4A96 -_021E4A82: - mov r1, #0x97 - sub r0, r0, #4 - str r1, [sp] - add r0, r5, r0 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - mov r2, #4 - bl ov21_021E49D0 -_021E4A96: - ldr r0, [r4, #0] - mov r3, #0xc9 - lsl r3, r3, #2 - ldr r0, [r0, #0] - ldr r3, [r5, r3] - mov r1, #1 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0] - add r0, r0, #4 - bl sub_0201A9A4 - mov r0, #0xcb - ldr r1, [r6, #4] - lsl r0, r0, #2 - str r1, [r5, r0] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4A28 - - thumb_func_start ov21_021E4ABC -ov21_021E4ABC: ; 0x021E4ABC - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #9 - add r0, r0, #4 - bl sub_0201C2B4 - mov r0, #0xca - mov r2, #0x97 - lsl r0, r0, #2 - str r2, [sp] - add r0, r5, r0 - mov r1, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, #0x69 - add r3, r1, #0 - bl ov21_021E49D0 - ldr r0, [r4, #0] - add r0, r0, #4 - bl sub_0201A954 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4ABC - - thumb_func_start ov21_021E4AF4 -ov21_021E4AF4: ; 0x021E4AF4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x20 -_021E4AFC: - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E4B30 - add r4, r4, #1 - add r5, #0x54 - cmp r4, #9 - blt _021E4AFC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4AF4 - - thumb_func_start ov21_021E4B10 -ov21_021E4B10: ; 0x021E4B10 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - add r5, #0x20 -_021E4B1A: - add r1, r6, r4 - ldrb r1, [r1, #0xc] - add r0, r5, #0 - bl ov21_021E4B94 - add r4, r4, #1 - add r5, #0x54 - cmp r4, #9 - blt _021E4B1A - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4B10 - - thumb_func_start ov21_021E4B30 -ov21_021E4B30: ; 0x021E4B30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - lsl r0, r1, #4 - add r0, #0x70 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #6 - lsl r0, r0, #0x10 - mov r6, #2 - ldr r5, [sp] - str r0, [sp, #8] - mov r4, #0 - add r7, sp, #4 - lsl r6, r6, #0xe -_021E4B4E: - ldr r0, [r5, #0] - add r1, r7, #0 - bl sub_02021C50 - ldr r0, [r5, #0] - mov r1, #0 - bl sub_02021CAC - ldr r0, [sp, #8] - mov r1, #1 - sub r0, r0, r6 - str r0, [sp, #8] - ldr r0, [r5, #0] - bl sub_02021D6C - add r4, r4, #1 - add r5, #8 - cmp r4, #9 - blt _021E4B4E - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp] - add r1, sp, #4 - ldr r0, [r0, #0x48] - bl sub_02021C50 - ldr r0, [sp] - mov r1, #0 - ldr r0, [r0, #0x48] - bl sub_02021CAC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4B30 - - thumb_func_start ov21_021E4B94 -ov21_021E4B94: ; 0x021E4B94 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r7, r1, #0 - add r6, r0, #0 - str r4, [sp] - cmp r7, #0 - ble _021E4BB8 - add r5, r6, #0 -_021E4BA4: - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02021CAC - add r4, r4, #1 - lsl r0, r4, #1 - str r0, [r5, #4] - add r5, #8 - cmp r4, r7 - blt _021E4BA4 -_021E4BB8: - mov r5, #0 - add r4, r6, #0 - add r7, r5, #0 -_021E4BBE: - ldr r0, [r4, #0] - bl sub_02021D34 - cmp r0, #0 - beq _021E4BE0 - ldr r0, [r4, #4] - sub r0, r0, #1 - cmp r0, #0 - ble _021E4BD8 - str r0, [r4, #4] - add r0, r5, #1 - str r0, [sp] - b _021E4BE0 -_021E4BD8: - ldr r0, [r4, #0] - add r1, r7, #0 - bl sub_02021CAC -_021E4BE0: - add r5, r5, #1 - add r4, #8 - cmp r5, #9 - blt _021E4BBE - ldr r1, [r6, #0x4c] - ldr r0, [sp] - cmp r1, r0 - bgt _021E4C10 - ldr r0, [r6, #0x48] - ldr r1, [sp] - bl ov21_021E4C38 - mov r0, #0x10 - str r0, [r6, #0x50] - ldr r1, [r6, #0x4c] - ldr r0, [sp] - cmp r1, r0 - bge _021E4C0C - ldr r0, [r6, #0x48] - mov r1, #1 - bl sub_02021CAC -_021E4C0C: - ldr r0, [sp] - str r0, [r6, #0x4c] -_021E4C10: - ldr r1, [r6, #0x4c] - cmp r1, #0 - ble _021E4C2E - ldr r0, [r6, #0x50] - cmp r0, #0 - bge _021E4C28 - sub r1, r1, #1 - str r1, [r6, #0x4c] - ldr r0, [r6, #0x48] - bl ov21_021E4C38 - pop {r3, r4, r5, r6, r7, pc} -_021E4C28: - sub r0, r0, #1 - str r0, [r6, #0x50] - pop {r3, r4, r5, r6, r7, pc} -_021E4C2E: - ldr r0, [r6, #0x48] - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4B94 - - thumb_func_start ov21_021E4C38 -ov21_021E4C38: ; 0x021E4C38 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - lsl r0, r4, #3 - neg r0, r0 - add r0, #0x60 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r5, #0 - bl sub_02021C50 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E4C38 - - thumb_func_start ov21_021E4C68 -ov21_021E4C68: ; 0x021E4C68 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r1, #0xc] - bl ov21_021E4D1C - add r4, r0, #0 - add r1, r5, #0 - mov r0, #0 - add r1, #0xc - strb r0, [r5, #0xc] - strb r0, [r1, #1] - strb r0, [r1, #2] - strb r0, [r1, #3] - strb r0, [r1, #4] - strb r0, [r1, #5] - strb r0, [r1, #6] - strb r0, [r1, #7] - strb r0, [r1, #8] - bl sub_0200598C - cmp r0, #0 - beq _021E4CA2 - ldr r0, [r5, #0] - add r5, #0xc - add r1, r5, #0 - mov r2, #9 - add r3, r4, #0 - bl sub_020051D0 -_021E4CA2: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E4C68 - - thumb_func_start ov21_021E4CA4 -ov21_021E4CA4: ; 0x021E4CA4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E4D24 - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E4D64 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E4D8C - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E4DBC - str r0, [r5, #0x24] - ldr r0, _021E4CEC ; =ov21_021E4DC0 - str r0, [r5, #8] - ldr r0, _021E4CF0 ; =ov21_021E4E00 - str r0, [r5, #0xc] - ldr r0, _021E4CF4 ; =ov21_021E4E84 - str r0, [r5, #0x10] - ldr r0, _021E4CF8 ; =ov21_021E4E98 - str r0, [r5, #0x14] - ldr r0, _021E4CFC ; =ov21_021E4F20 - str r0, [r5, #0x18] - ldr r0, _021E4D00 ; =ov21_021E4F78 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E4CEC: .word ov21_021E4DC0 -_021E4CF0: .word ov21_021E4E00 -_021E4CF4: .word ov21_021E4E84 -_021E4CF8: .word ov21_021E4E98 -_021E4CFC: .word ov21_021E4F20 -_021E4D00: .word ov21_021E4F78 - thumb_func_end ov21_021E4CA4 - - thumb_func_start ov21_021E4D04 -ov21_021E4D04: ; 0x021E4D04 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E4D90 - ldr r0, [r4, #4] - bl ov21_021E4DA4 - ldr r0, [r4, #0x20] - bl ov21_021E4DB8 - pop {r4, pc} - thumb_func_end ov21_021E4D04 - - thumb_func_start ov21_021E4D1C -ov21_021E4D1C: ; 0x021E4D1C - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E4D1C - - thumb_func_start ov21_021E4D24 -ov21_021E4D24: ; 0x021E4D24 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - bne _021E4D36 - bl sub_02022974 -_021E4D36: - add r2, r4, #0 - mov r1, #0x10 - mov r0, #0 -_021E4D3C: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E4D3C - add r0, r5, #0 - bl ov21_021D13A0 - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1430 - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4D24 - - thumb_func_start ov21_021E4D64 -ov21_021E4D64: ; 0x021E4D64 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E4D76 - bl sub_02022974 -_021E4D76: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E4D64 - - thumb_func_start ov21_021E4D8C -ov21_021E4D8C: ; 0x021E4D8C - mov r0, #0 - bx lr - thumb_func_end ov21_021E4D8C - - thumb_func_start ov21_021E4D90 -ov21_021E4D90: ; 0x021E4D90 - push {r4, lr} - add r4, r0, #0 - bne _021E4D9A - bl sub_02022974 -_021E4D9A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4D90 - - thumb_func_start ov21_021E4DA4 -ov21_021E4DA4: ; 0x021E4DA4 - push {r4, lr} - add r4, r0, #0 - bne _021E4DAE - bl sub_02022974 -_021E4DAE: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E4DA4 - - thumb_func_start ov21_021E4DB8 -ov21_021E4DB8: ; 0x021E4DB8 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E4DB8 - - thumb_func_start ov21_021E4DBC -ov21_021E4DBC: ; 0x021E4DBC - mov r0, #0 - bx lr - thumb_func_end ov21_021E4DBC - - thumb_func_start ov21_021E4DC0 -ov21_021E4DC0: ; 0x021E4DC0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r6, #4] - bl ov21_021D37BC - add r7, r0, #0 - ldr r0, [r5, #4] - mov r1, #0x70 - bl sub_02018144 - mov r1, #0 - mov r2, #0x70 - add r4, r0, #0 - bl sub_020D5124 - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E5128 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E51DC - add r0, r7, #0 - bl sub_020050F8 - str r0, [r4, #0x6c] - str r4, [r5, #8] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4DC0 - - thumb_func_start ov21_021E4E00 -ov21_021E4E00: ; 0x021E4E00 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021E4E1C - add r0, r4, #0 - bl ov21_021E5E18 - add r0, r4, #0 - bl ov21_021E5E28 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E4E1C: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021E4E26 - mov r0, #0 - pop {r3, r4, r5, pc} -_021E4E26: - ldr r0, [r4, #0x3c] - str r0, [r5, #0xc] - ldr r0, [r5, #8] - bl ov21_021E33AC - cmp r0, #0 - beq _021E4E80 - bl sub_0200598C - cmp r0, #0 - bne _021E4E48 - ldr r0, [r4, #0x64] - cmp r0, #0 - bne _021E4E48 - add r0, r4, #0 - bl ov21_021E5E18 -_021E4E48: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E51DC - ldr r0, [r5, #8] - bl ov21_021E33BC - cmp r0, #0 - beq _021E4E6C - ldr r0, [r5, #4] - bl ov21_021D3998 - cmp r0, #2 - bne _021E4E6C - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E5F5C -_021E4E6C: - ldr r0, [r4, #0x64] - cmp r0, #0 - beq _021E4E80 - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021E4E80 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E5E48 -_021E4E80: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E4E00 - - thumb_func_start ov21_021E4E84 -ov21_021E4E84: ; 0x021E4E84 - push {r4, lr} - ldr r4, [r0, #8] - add r0, r4, #0 - bl ov21_021E5200 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021E4E84 - - thumb_func_start ov21_021E4E98 -ov21_021E4E98: ; 0x021E4E98 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021E4F1C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E4EB4: ; jump table - .short _021E4EBC - _021E4EB4 - 2 ; case 0 - .short _021E4ED6 - _021E4EB4 - 2 ; case 1 - .short _021E4EF4 - _021E4EB4 - 2 ; case 2 - .short _021E4F0A - _021E4EB4 - 2 ; case 3 -_021E4EBC: - ldr r0, [r4, #4] - mov r1, #0x74 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x74 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4F1C -_021E4ED6: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E54D4 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E507C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4F1C -_021E4EF4: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E50EC - cmp r0, #0 - beq _021E4F1C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E4F1C -_021E4F0A: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D25AC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E4F1C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4E98 - - thumb_func_start ov21_021E4F20 -ov21_021E4F20: ; 0x021E4F20 - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r7, r0, #0 - ldr r0, [r6, #8] - ldr r4, [r3, #8] - ldr r5, [r1, #8] - bl ov21_021E33AC - cmp r0, #0 - beq _021E4F74 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E59B4 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E5A04 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E5A2C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E5B50 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov21_021E5B6C - add r0, r5, #0 - bl ov21_021E5C4C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E5F38 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021E5FD0 -_021E4F74: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4F20 - - thumb_func_start ov21_021E4F78 -ov21_021E4F78: ; 0x021E4F78 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r5, [r4, #8] - cmp r0, #4 - bhi _021E5000 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E4F94: ; jump table - .short _021E4F9E - _021E4F94 - 2 ; case 0 - .short _021E4FC6 - _021E4F94 - 2 ; case 1 - .short _021E4FDC - _021E4F94 - 2 ; case 2 - .short _021E4FEE - _021E4F94 - 2 ; case 3 - .short _021E4FFC - _021E4F94 - 2 ; case 4 -_021E4F9E: - mov r0, #0x79 - ldr r1, [r6, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - bl ov21_021D25AC - add r0, r5, #0 - bl ov21_021E5EC0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021E507C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E5000 -_021E4FC6: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0 - bl ov21_021E50EC - cmp r0, #0 - beq _021E5000 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E5000 -_021E4FDC: - ldr r2, [r4, #4] - add r0, r5, #0 - add r1, r6, #0 - bl ov21_021E5510 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E5000 -_021E4FEE: - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E5000 -_021E4FFC: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E5000: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E4F78 - - thumb_func_start ov21_021E5004 -ov21_021E5004: ; 0x021E5004 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #0x20] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #0x50] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02012AF0 - ldr r0, [r4, #0x54] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5004 - - thumb_func_start ov21_021E5040 -ov21_021E5040: ; 0x021E5040 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r4, #0x20] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r4, #0x50] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - ldr r0, [r4, #0x54] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5040 - - thumb_func_start ov21_021E507C -ov21_021E507C: ; 0x021E507C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E5004 - ldr r0, [r4, #8] - bl ov21_021E33A4 - cmp r0, #0 - beq _021E50E8 - cmp r6, #0 - beq _021E50C2 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #3 - add r2, r1, #0 - sub r2, #0x13 - bl ov21_021D23F8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E50C2: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #3 - add r3, r1, #0 - sub r3, #0x13 - bl ov21_021D23F8 -_021E50E8: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E507C - - thumb_func_start ov21_021E50EC -ov21_021E50EC: ; 0x021E50EC - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E33A4 - cmp r0, #0 - beq _021E510C - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov21_021D2424 - b _021E5112 -_021E510C: - mov r0, #2 - bl sub_0200AC1C -_021E5112: - cmp r0, #0 - beq _021E5124 - cmp r4, #0 - beq _021E5120 - add r0, r6, #0 - bl ov21_021E5040 -_021E5120: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E5124: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E50EC - - thumb_func_start ov21_021E5128 -ov21_021E5128: ; 0x021E5128 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r4, #0 - mov r1, #0xc - bl sub_02018144 - str r0, [r5, #4] - add r0, r4, #0 - mov r1, #8 - bl sub_02018144 - str r0, [r5, #0x10] - mov r0, #0x6a - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x35 - mov r2, #0x51 - mov r3, #0x16 - bl ov21_021D154C - ldr r1, [r5, #4] - mov r0, #0xfe - strb r0, [r1, #4] - ldr r1, [r5, #4] - mov r2, #0x33 - strb r2, [r1, #5] - ldr r1, [r5, #4] - mov r2, #0x9d - strb r2, [r1, #6] - ldr r1, [r5, #4] - mov r2, #0x20 - strb r2, [r1, #7] - ldr r1, [r5, #4] - mov r2, #0x9b - strb r0, [r1, #8] - ldr r0, [r5, #4] - mov r1, #0xb3 - strb r1, [r0, #9] - ldr r0, [r5, #4] - mov r1, #0x7b - strb r1, [r0, #0xa] - ldr r0, [r5, #4] - mov r1, #0x48 - strb r1, [r0, #0xb] - mov r0, #0xcc - str r0, [sp] - ldr r0, [r5, #0x10] - mov r1, #0x6b - mov r3, #0x9c - bl ov21_021D154C - mov r0, #0xf6 - str r0, [sp] - ldr r0, [r5, #0x10] - mov r1, #0x96 - add r0, r0, #4 - mov r2, #0xb6 - mov r3, #0xd6 - bl ov21_021D154C - str r6, [r5, #8] - str r5, [r5, #0xc] - str r4, [sp] - add r3, r5, #0 - ldr r0, [r5, #4] - ldr r2, _021E51D4 ; =ov21_021E5228 - mov r1, #3 - add r3, #8 - bl sub_02023FCC - str r0, [r5, #0] - str r4, [sp] - add r3, r5, #0 - ldr r0, [r5, #0x10] - ldr r2, _021E51D8 ; =ov21_021E5268 - mov r1, #2 - add r3, #8 - bl sub_02023FCC - str r0, [r5, #0x14] - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021E51D4: .word ov21_021E5228 -_021E51D8: .word ov21_021E5268 - thumb_func_end ov21_021E5128 - - thumb_func_start ov21_021E51DC -ov21_021E51DC: ; 0x021E51DC - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - add r2, r4, #0 - mov r0, #0x64 -_021E51E6: - add r1, r1, #1 - str r0, [r2, #0x18] - add r2, r2, #4 - cmp r1, #2 - blt _021E51E6 - ldr r0, [r4, #0] - bl sub_0202404C - ldr r0, [r4, #0x14] - bl sub_0202404C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E51DC - - thumb_func_start ov21_021E5200 -ov21_021E5200: ; 0x021E5200 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #0x14] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #0x10] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x10] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5200 - - thumb_func_start ov21_021E5228 -ov21_021E5228: ; 0x021E5228 - push {r3, lr} - ldr r3, [r2, #0] - ldr r2, [r2, #4] - cmp r1, #3 - bhi _021E5264 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E523E: ; jump table - .short _021E5246 - _021E523E - 2 ; case 0 - .short _021E5256 - _021E523E - 2 ; case 1 - .short _021E524E - _021E523E - 2 ; case 2 - .short _021E525E - _021E523E - 2 ; case 3 -_021E5246: - add r1, r3, #0 - bl ov21_021E530C - pop {r3, pc} -_021E524E: - add r1, r3, #0 - bl ov21_021E537C - pop {r3, pc} -_021E5256: - add r1, r3, #0 - bl ov21_021E545C - pop {r3, pc} -_021E525E: - add r1, r3, #0 - bl ov21_021E5498 -_021E5264: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5228 - - thumb_func_start ov21_021E5268 -ov21_021E5268: ; 0x021E5268 - push {r3, r4, r5, r6, r7, lr} - ldr r5, [r2, #0] - add r6, r0, #0 - ldr r0, [r5, #4] - ldr r4, [r2, #4] - add r7, r1, #0 - bl ov21_021D37BC - str r0, [sp] - lsl r0, r6, #2 - add r0, r4, r0 - str r7, [r0, #0x18] - cmp r7, #3 - bhi _021E5304 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E5290: ; jump table - .short _021E5298 - _021E5290 - 2 ; case 0 - .short _021E5304 - _021E5290 - 2 ; case 1 - .short _021E52A6 - _021E5290 - 2 ; case 2 - .short _021E5304 - _021E5290 - 2 ; case 3 -_021E5298: - ldr r0, [r5, #8] - mov r1, #1 - bl ov21_021E33B4 - mov r0, #0 - str r0, [r4, #0x24] - pop {r3, r4, r5, r6, r7, pc} -_021E52A6: - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _021E5304 - mov r2, #1 - str r2, [r4, #0x24] - cmp r6, #0 - beq _021E52BA - cmp r6, #1 - beq _021E52F0 - pop {r3, r4, r5, r6, r7, pc} -_021E52BA: - ldr r0, [r4, #0x64] - cmp r0, #1 - ldr r0, [r4, #0x2c] - bne _021E52DA - cmp r0, #0 - bne _021E52D2 - ldr r2, [sp] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E5DE8 - pop {r3, r4, r5, r6, r7, pc} -_021E52D2: - add r0, r4, #0 - bl ov21_021E5E18 - pop {r3, r4, r5, r6, r7, pc} -_021E52DA: - cmp r0, #1 - bne _021E52E4 - mov r0, #0 - bl sub_0200592C -_021E52E4: - ldr r2, [sp] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E5DE8 - pop {r3, r4, r5, r6, r7, pc} -_021E52F0: - mov r0, #2 - str r0, [r4, #0x28] - ldr r1, [r4, #0x64] - add r0, r4, #0 - eor r1, r2 - bl ov21_021E5E78 - ldr r0, _021E5308 ; =0x000005DD - bl sub_02005748 -_021E5304: - pop {r3, r4, r5, r6, r7, pc} - nop -_021E5308: .word 0x000005DD - thumb_func_end ov21_021E5268 - - thumb_func_start ov21_021E530C -ov21_021E530C: ; 0x021E530C - push {r4, lr} - add r4, r2, #0 - cmp r0, #0 - beq _021E531E - cmp r0, #1 - beq _021E5336 - cmp r0, #2 - beq _021E5352 - pop {r4, pc} -_021E531E: - ldr r0, [r4, #0x2c] - cmp r0, #1 - bne _021E532A - add r0, r4, #0 - bl ov21_021E5E18 -_021E532A: - ldr r0, _021E5378 ; =0x021BF6BC - ldrh r0, [r0, #0x1c] - str r0, [r4, #0x38] - mov r0, #1 - str r0, [r4, #0x30] - pop {r4, pc} -_021E5336: - ldr r0, [r4, #0x2c] - cmp r0, #1 - bne _021E5342 - add r0, r4, #0 - bl ov21_021E5E18 -_021E5342: - mov r0, #1 - str r0, [r4, #0x4c] - ldr r0, _021E5378 ; =0x021BF6BC - ldrh r1, [r0, #0x1c] - str r1, [r4, #0x54] - ldrh r0, [r0, #0x1e] - str r0, [r4, #0x58] - pop {r4, pc} -_021E5352: - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021E5370 - ldr r0, [r4, #0x10] - bl sub_02022734 - str r0, [r4, #0x20] - ldr r0, [r4, #0x10] - add r0, r0, #4 - bl sub_02022734 - ldr r1, [r4, #0x20] - orr r0, r1 - str r0, [r4, #0x20] - pop {r4, pc} -_021E5370: - mov r0, #1 - str r0, [r4, #0x20] - pop {r4, pc} - nop -_021E5378: .word 0x021BF6BC - thumb_func_end ov21_021E530C - - thumb_func_start ov21_021E537C -ov21_021E537C: ; 0x021E537C - push {r4, lr} - add r4, r2, #0 - cmp r0, #0 - beq _021E538E - cmp r0, #1 - beq _021E53CE - cmp r0, #2 - beq _021E53F2 - pop {r4, pc} -_021E538E: - ldr r0, [r4, #0x30] - cmp r0, #1 - bne _021E544C - ldr r1, _021E5450 ; =0x021BF6BC - ldr r0, [r4, #0x38] - ldrh r2, [r1, #0x1c] - sub r2, r2, r0 - ldr r0, [r4, #0x34] - cmp r0, #0 - bne _021E53B6 - cmp r2, #0xc - blt _021E544C - mov r0, #1 - str r0, [r4, #0x34] - ldrh r0, [r1, #0x1c] - str r0, [r4, #0x38] - ldr r0, _021E5454 ; =0x000005F7 - bl sub_02005748 - pop {r4, pc} -_021E53B6: - mov r0, #0xb - mvn r0, r0 - cmp r2, r0 - bgt _021E544C - mov r0, #0 - str r0, [r4, #0x34] - ldrh r0, [r1, #0x1c] - str r0, [r4, #0x38] - ldr r0, _021E5454 ; =0x000005F7 - bl sub_02005748 - pop {r4, pc} -_021E53CE: - ldr r0, [r4, #0x4c] - cmp r0, #1 - bne _021E544C - add r0, r4, #0 - bl ov21_021E5A44 - add r0, r4, #0 - bl ov21_021E5AAC - add r0, r4, #0 - bl ov21_021E5AD8 - ldr r0, _021E5450 ; =0x021BF6BC - ldrh r1, [r0, #0x1c] - str r1, [r4, #0x54] - ldrh r0, [r0, #0x1e] - str r0, [r4, #0x58] - pop {r4, pc} -_021E53F2: - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _021E544C - ldr r0, [r4, #0x2c] - cmp r0, #0 - bne _021E540C - mov r0, #1 - str r0, [r4, #0x20] - add r0, r4, #0 - mov r1, #0 - bl ov21_021E5ED8 - b _021E5446 -_021E540C: - ldr r1, _021E5450 ; =0x021BF6BC - ldrh r0, [r1, #0x1e] - cmp r0, #0x83 - bhs _021E543A - ldr r0, [r4, #0x34] - cmp r0, #0 - bne _021E5424 - ldrh r1, [r1, #0x1c] - add r0, r4, #0 - bl ov21_021E5BE4 - b _021E542C -_021E5424: - ldrh r1, [r1, #0x1c] - add r0, r4, #0 - bl ov21_021E5C18 -_021E542C: - mov r0, #0 - str r0, [r4, #0x3c] - add r0, r4, #0 - mov r1, #1 - bl ov21_021E5ED8 - b _021E5446 -_021E543A: - add r0, r4, #0 - mov r1, #0 - bl ov21_021E5EF0 - ldr r0, _021E5458 ; =0xFFFFFA00 - str r0, [r4, #0x3c] -_021E5446: - add r0, r4, #0 - bl ov21_021E5F00 -_021E544C: - pop {r4, pc} - nop -_021E5450: .word 0x021BF6BC -_021E5454: .word 0x000005F7 -_021E5458: .word 0xFFFFFA00 - thumb_func_end ov21_021E537C - - thumb_func_start ov21_021E545C -ov21_021E545C: ; 0x021E545C - push {r4, lr} - add r4, r2, #0 - cmp r0, #0 - beq _021E546E - cmp r0, #1 - beq _021E5474 - cmp r0, #2 - beq _021E5480 - pop {r4, pc} -_021E546E: - mov r0, #0 - str r0, [r4, #0x30] - pop {r4, pc} -_021E5474: - ldr r0, [r4, #0x60] - lsl r0, r0, #2 - str r0, [r4, #0x5c] - mov r0, #0 - str r0, [r4, #0x4c] - pop {r4, pc} -_021E5480: - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _021E5494 - add r0, r4, #0 - mov r1, #0 - bl ov21_021E5ED8 - add r0, r4, #0 - bl ov21_021E5F00 -_021E5494: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E545C - - thumb_func_start ov21_021E5498 -ov21_021E5498: ; 0x021E5498 - push {r4, lr} - add r4, r2, #0 - cmp r0, #0 - beq _021E54AA - cmp r0, #1 - beq _021E54B0 - cmp r0, #2 - beq _021E54BC - pop {r4, pc} -_021E54AA: - mov r0, #0 - str r0, [r4, #0x30] - pop {r4, pc} -_021E54B0: - ldr r0, [r4, #0x60] - lsl r0, r0, #2 - str r0, [r4, #0x5c] - mov r0, #0 - str r0, [r4, #0x4c] - pop {r4, pc} -_021E54BC: - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _021E54D0 - add r0, r4, #0 - mov r1, #0 - bl ov21_021E5ED8 - add r0, r4, #0 - bl ov21_021E5F00 -_021E54D0: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5498 - - thumb_func_start ov21_021E54D4 -ov21_021E54D4: ; 0x021E54D4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E5538 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E5644 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E5734 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E58B8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E5E80 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E54D4 - - thumb_func_start ov21_021E5510 -ov21_021E5510: ; 0x021E5510 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E5898 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E599C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E56F0 - add r0, r4, #0 - bl ov21_021E5620 - add r0, r5, #0 - bl ov21_021E5E98 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E5510 - - thumb_func_start ov21_021E5538 -ov21_021E5538: ; 0x021E5538 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x22 - mov r3, #6 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x47 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_0201C3C0 - ldr r0, [r5, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x23 - mov r3, #7 - bl ov21_021D2724 - str r4, [sp] - ldr r0, [r5, #0] - mov r1, #0x48 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r4, r0, #0 - ldrh r0, [r2] - mov r1, #7 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0] - mov r1, #7 - ldr r0, [r0, #0] - bl sub_0201C3C0 - ldr r0, [r5, #0] - mov r2, #0 - add r3, r2, #0 - ldr r0, [r0, #0] - mov r1, #7 - sub r3, #0x30 - bl sub_02019184 - ldr r0, [r5, #0] - mov r2, #3 - add r3, r2, #0 - ldr r0, [r0, #0] - mov r1, #7 - sub r3, #0x13 - bl sub_02019184 - mov r0, #7 - mov r1, #3 - bl sub_02019060 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E5538 - - thumb_func_start ov21_021E5620 -ov21_021E5620: ; 0x021E5620 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - bl sub_02019EBC - mov r0, #7 - mov r1, #1 - bl sub_02019060 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5620 - - thumb_func_start ov21_021E5644 -ov21_021E5644: ; 0x021E5644 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E56E4 ; =0x00002781 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x71 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #0x58] - bl sub_0200A3DC - ldr r0, [r5, #0x58] - bl sub_02009D4C - ldr r0, _021E56E8 ; =0x00002722 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x12 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x5c] - bl sub_0200A640 - ldr r0, [r5, #0x5c] - bl sub_02009D4C - ldr r0, _021E56EC ; =0x00002782 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x72 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x60] - mov r0, #0x9e - lsl r0, r0, #6 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x70 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x64] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E56E4: .word 0x00002781 -_021E56E8: .word 0x00002722 -_021E56EC: .word 0x00002782 - thumb_func_end ov21_021E5644 - - thumb_func_start ov21_021E56F0 -ov21_021E56F0: ; 0x021E56F0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x58] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x5c] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x58] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x5c] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x60] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x64] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E56F0 - - thumb_func_start ov21_021E5734 -ov21_021E5734: ; 0x021E5734 - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - mov r3, #0x9e - add r5, r0, #0 - lsl r3, r3, #6 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - add r2, r3, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r2, #0x5e - add r3, r3, #2 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x43 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - lsl r0, r0, #0x11 - str r0, [sp, #0x34] - mov r0, #3 - lsl r1, r1, #0xc - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - str r6, [sp, #0x48] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0x3c] - mov r1, #4 - bl sub_02021D6C - ldr r0, [r5, #0x3c] - mov r1, #1 - bl sub_02021CC8 - mov r1, #2 - ldr r0, [r5, #0x3c] - lsl r1, r1, #0xc - bl sub_02021CE4 - ldr r0, [r5, #0x3c] - mov r1, #8 - bl sub_02021E50 - mov r0, #0x33 - lsl r0, r0, #0xc - str r0, [sp, #0x34] - mov r1, #0x9d - mov r0, #3 - lsl r1, r1, #0xc - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02021CF8 - mov r0, #0x2d - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r1, #0x83 - mov r0, #3 - lsl r1, r1, #0xc - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #4] - mov r1, #3 - bl sub_02021D6C - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021CC8 - mov r1, #2 - ldr r0, [r5, #4] - lsl r1, r1, #0xc - bl sub_02021CE4 - ldr r0, [r5, #4] - mov r1, #5 - bl sub_02021E50 - mov r2, #3 - str r2, [r5, #8] - mov r1, #2 - str r1, [r5, #0xc] - str r2, [r5, #0x10] - mov r0, #5 - str r0, [r5, #0x18] - mov r0, #0xe6 - str r1, [r5, #0x1c] - lsl r0, r0, #0xc - mov r1, #0xa6 - str r0, [sp, #0x34] - lsl r1, r1, #0xc - lsl r0, r2, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0x20] - mov r1, #6 - bl sub_02021D6C - ldr r0, [r5, #0x20] - mov r1, #1 - bl sub_02021CC8 - mov r1, #2 - ldr r0, [r5, #0x20] - lsl r1, r1, #0xc - bl sub_02021CE4 - ldr r0, [r5, #0x20] - mov r1, #5 - bl sub_02021E50 - mov r1, #6 - str r1, [r5, #0x24] - mov r0, #5 - str r0, [r5, #0x28] - str r1, [r5, #0x2c] - str r0, [r5, #0x34] - mov r0, #2 - str r0, [r5, #0x38] - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5734 - - thumb_func_start ov21_021E5898 -ov21_021E5898: ; 0x021E5898 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02021BD4 - ldr r0, [r4, #0x3c] - bl sub_02021BD4 - ldr r0, [r4, #4] - bl sub_02021BD4 - ldr r0, [r4, #0x20] - bl sub_02021BD4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5898 - - thumb_func_start ov21_021E58B8 -ov21_021E58B8: ; 0x021E58B8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r4, [r1, #0] - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021E5994 ; =0x00002722 - add r6, r2, #0 - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #8] - mov r1, #0 - bl sub_0200A72C - mov r2, #0 - mov r1, #0x45 - lsl r1, r1, #2 - str r1, [sp, #0x1c] - mov r1, #2 - str r0, [sp, #0x10] - str r2, [sp, #0x14] - str r1, [sp, #0x20] - str r2, [sp, #0x24] - str r1, [sp, #0x28] - str r6, [sp, #0x2c] - bl sub_0201FAB4 - add r7, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E5998 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x29 - bl ov21_021D4DAC - lsr r1, r0, #1 - mov r0, #0x40 - sub r0, r0, r1 - str r0, [sp, #0x18] - str r6, [sp, #0xc] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #0x50] - ldr r0, [r0, #0] - add r1, r7, #0 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #8 - mov r2, #2 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E5998 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x2a - bl ov21_021D4DAC - lsr r1, r0, #1 - mov r0, #0x40 - sub r0, r0, r1 - str r0, [sp, #0x18] - str r6, [sp, #0xc] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #0x54] - ldr r0, [r0, #0] - add r1, r7, #0 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - ldr r0, [r5, #0x54] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E5994: .word 0x00002722 -_021E5998: .word 0x000002B9 - thumb_func_end ov21_021E58B8 - - thumb_func_start ov21_021E599C -ov21_021E599C: ; 0x021E599C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E59A2: - ldr r0, [r5, #0x50] - bl ov21_021D4D1C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E59A2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E599C - - thumb_func_start ov21_021E59B4 -ov21_021E59B4: ; 0x021E59B4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0x40] - ldr r0, [r4, #0x34] - cmp r1, r0 - beq _021E5A00 - ldr r0, [r5, #0x3c] - bl sub_02021E74 - add r6, r0, #0 - ldr r0, [r4, #0x34] - cmp r0, #0 - ldr r0, [r5, #0x3c] - bne _021E59E8 - mov r1, #4 - bl sub_02021D6C - mov r1, #8 - sub r1, r1, r6 - lsl r1, r1, #0x10 - ldr r0, [r5, #0x3c] - lsr r1, r1, #0x10 - bl sub_02021E50 - b _021E59FC -_021E59E8: - mov r1, #0 - bl sub_02021D6C - mov r1, #8 - sub r1, r1, r6 - lsl r1, r1, #0x10 - ldr r0, [r5, #0x3c] - lsr r1, r1, #0x10 - bl sub_02021E50 -_021E59FC: - ldr r0, [r4, #0x34] - str r0, [r5, #0x40] -_021E5A00: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E59B4 - - thumb_func_start ov21_021E5A04 -ov21_021E5A04: ; 0x021E5A04 - push {r4, lr} - add r2, r1, #0 - add r4, r0, #0 - ldr r0, [r2, #0x64] - ldr r3, [r2, #0x18] - cmp r0, #0 - ldr r0, [r4, #4] - bne _021E5A20 - add r4, #8 - add r1, r4, #0 - mov r2, #0 - bl ov21_021E5CF8 - pop {r4, pc} -_021E5A20: - add r4, #8 - ldr r2, [r2, #0x2c] - add r1, r4, #0 - bl ov21_021E5C80 - pop {r4, pc} - thumb_func_end ov21_021E5A04 - - thumb_func_start ov21_021E5A2C -ov21_021E5A2C: ; 0x021E5A2C - push {r3, lr} - add r2, r0, #0 - ldr r0, [r2, #0x20] - add r3, r1, #0 - add r2, #0x24 - add r1, r2, #0 - ldr r2, [r3, #0x64] - ldr r3, [r3, #0x1c] - bl ov21_021E5C80 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5A2C - - thumb_func_start ov21_021E5A44 -ov21_021E5A44: ; 0x021E5A44 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r3, _021E5AA8 ; =0x021BF6BC - ldr r0, [r5, #0x54] - ldrh r2, [r3, #0x1c] - ldrh r3, [r3, #0x1e] - ldr r1, [r5, #0x58] - sub r0, #0x33 - sub r1, #0x9d - sub r2, #0x33 - sub r3, #0x9d - bl sub_0201D4CC - add r6, r0, #0 - bpl _021E5A6A - neg r0, r6 -_021E5A6A: - cmp r0, #1 - blt _021E5AA4 - ldr r0, [r5, #0x5c] - add r4, r5, #0 - add r4, #0x5c - add r0, r0, r6 - str r0, [r5, #0x5c] - ldr r0, [r4, #0] - bpl _021E5A82 - add r0, #0x58 - str r0, [r4, #0] - b _021E5A8A -_021E5A82: - mov r1, #0x58 - bl sub_020E1F6C - str r1, [r4, #0] -_021E5A8A: - ldr r0, [r5, #0x5c] - cmp r0, #0x20 - blt _021E5AA4 - cmp r0, #0x38 - bgt _021E5AA4 - cmp r6, #0 - ble _021E5AA0 - mov r0, #0x20 - add sp, #4 - str r0, [r5, #0x5c] - pop {r3, r4, r5, r6, pc} -_021E5AA0: - mov r0, #0x38 - str r0, [r5, #0x5c] -_021E5AA4: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E5AA8: .word 0x021BF6BC - thumb_func_end ov21_021E5A44 - - thumb_func_start ov21_021E5AAC -ov21_021E5AAC: ; 0x021E5AAC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x5c] - asr r0, r1, #1 - lsr r0, r0, #0x1e - add r0, r1, r0 - asr r1, r0, #2 - ldr r0, [r4, #0x60] - cmp r1, r0 - beq _021E5AD2 - ldr r0, _021E5AD4 ; =0x000005F7 - bl sub_02005748 - ldr r1, [r4, #0x5c] - asr r0, r1, #1 - lsr r0, r0, #0x1e - add r0, r1, r0 - asr r0, r0, #2 - str r0, [r4, #0x60] -_021E5AD2: - pop {r4, pc} - ; .align 2, 0 -_021E5AD4: .word 0x000005F7 - thumb_func_end ov21_021E5AAC - - thumb_func_start ov21_021E5AD8 -ov21_021E5AD8: ; 0x021E5AD8 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x5c] - cmp r1, #0 - bne _021E5AE8 - bl ov21_021E5E28 - pop {r4, pc} -_021E5AE8: - ble _021E5B16 - cmp r1, #0x2c - bgt _021E5B16 - ldr r0, [r4, #0x50] - cmp r0, #1 - bne _021E5AFA - mov r0, #0 - bl sub_02004EEC -_021E5AFA: - ldr r0, [r4, #0x50] - cmp r0, #2 - beq _021E5B08 - bl sub_02004EFC - mov r0, #2 - str r0, [r4, #0x50] -_021E5B08: - ldr r0, [r4, #0x60] - cmp r0, #0 - bne _021E5B10 - mov r0, #1 -_021E5B10: - bl sub_02004F4C - pop {r4, pc} -_021E5B16: - ldr r0, [r4, #0x50] - cmp r0, #2 - bne _021E5B20 - bl sub_02004F44 -_021E5B20: - ldr r0, [r4, #0x50] - cmp r0, #1 - beq _021E5B30 - mov r0, #0 - bl sub_02004EC8 - mov r0, #1 - str r0, [r4, #0x50] -_021E5B30: - ldr r0, [r4, #0x5c] - cmp r0, #0 - bne _021E5B3A - mov r0, #0x58 - str r0, [r4, #0x5c] -_021E5B3A: - ldr r1, [r4, #0x60] - mov r0, #0x16 - sub r0, r0, r1 - lsl r0, r0, #3 - cmp r0, #0 - ble _021E5B48 - sub r0, r0, #1 -_021E5B48: - mov r1, #0 - bl sub_02004EF4 - pop {r4, pc} - thumb_func_end ov21_021E5AD8 - - thumb_func_start ov21_021E5B50 -ov21_021E5B50: ; 0x021E5B50 - push {r4, lr} - ldr r1, [r1, #0x5c] - add r4, r0, #0 - mov r0, #0xe - bl sub_0201D580 - add r1, r0, #0 - lsl r1, r1, #0x10 - ldr r0, [r4, #0] - lsr r1, r1, #0x10 - bl sub_02021C94 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5B50 - - thumb_func_start ov21_021E5B6C -ov21_021E5B6C: ; 0x021E5B6C - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, [r2, #0x6c] - add r5, r0, #0 - ldr r2, [r2, #0x3c] - mov r0, #1 - bl sub_02005188 - add r6, r0, #0 - bne _021E5B84 - mov r0, #0 - str r0, [r5, #0x48] -_021E5B84: - add r0, r5, #0 - ldr r1, [r5, #0x48] - add r0, #0x4c - sub r1, r6, r1 - lsl r1, r1, #4 - ldrh r0, [r0] - neg r1, r1 - add r1, r0, r1 - add r0, r5, #0 - add r0, #0x4c - strh r1, [r0] - add r0, r5, #0 - add r0, #0x4c - ldrh r1, [r0] - add r0, r5, #0 - add r0, #0x4c - strh r1, [r0] - add r0, r5, #0 - add r0, #0x4c - ldrh r0, [r0] - mov r1, #0xb6 - bl sub_020E1F6C - add r3, r0, #0 - ldr r0, [r4, #0] - lsl r3, r3, #0x10 - ldr r0, [r0, #0] - mov r1, #7 - mov r2, #0 - lsr r3, r3, #0x10 - bl sub_0201C660 - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - mov r2, #9 - mov r3, #0x83 - bl sub_0201C718 - ldr r0, [r4, #0] - mov r1, #7 - ldr r0, [r0, #0] - mov r2, #0xc - mov r3, #0x63 - bl sub_0201C718 - str r6, [r5, #0x48] - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E5B6C - - thumb_func_start ov21_021E5BE4 -ov21_021E5BE4: ; 0x021E5BE4 - push {r4, lr} - sub r1, #0x6b - add r4, r0, #0 - lsl r0, r1, #0xc - mov r2, #0x7f - asr r1, r0, #0x1f - lsl r2, r2, #0xc - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #9 - lsl r1, r1, #0x10 - bl sub_020BCFD0 - asr r0, r0, #0xc - str r0, [r4, #0x44] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5BE4 - - thumb_func_start ov21_021E5C18 -ov21_021E5C18: ; 0x021E5C18 - push {r4, lr} - sub r1, #0xb3 - add r4, r0, #0 - lsl r0, r1, #0xc - mov r2, #0x7f - asr r1, r0, #0x1f - lsl r2, r2, #0xc - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #0x12 - lsl r1, r1, #0xe - bl sub_020BCFD0 - asr r0, r0, #0xc - str r0, [r4, #0x40] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5C18 - - thumb_func_start ov21_021E5C4C -ov21_021E5C4C: ; 0x021E5C4C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - cmp r0, #0 - ldr r0, [r4, #0x50] - bne _021E5C6C - ldr r0, [r0, #0] - mov r1, #1 - bl sub_020129D0 - ldr r0, [r4, #0x54] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_020129D0 - pop {r4, pc} -_021E5C6C: - ldr r0, [r0, #0] - mov r1, #0 - bl sub_020129D0 - ldr r0, [r4, #0x54] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_020129D0 - pop {r4, pc} - thumb_func_end ov21_021E5C4C - - thumb_func_start ov21_021E5C80 -ov21_021E5C80: ; 0x021E5C80 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - cmp r4, #3 - bne _021E5C90 - mov r4, #1 -_021E5C90: - add r0, r6, #0 - bl sub_02021E74 - str r0, [sp] - ldr r0, [r5, #0xc] - cmp r0, r7 - beq _021E5CAA - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021E5D90 - str r7, [r5, #0xc] -_021E5CAA: - cmp r4, #2 - bgt _021E5CBE - cmp r4, #0 - blt _021E5CF4 - beq _021E5CF4 - cmp r4, #1 - beq _021E5CE0 - cmp r4, #2 - beq _021E5CC4 - pop {r3, r4, r5, r6, r7, pc} -_021E5CBE: - cmp r4, #0x64 - beq _021E5CE0 - pop {r3, r4, r5, r6, r7, pc} -_021E5CC4: - ldr r1, [r5, #0x14] - ldr r0, [sp] - cmp r0, r1 - ble _021E5CF4 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - bl sub_02021E50 - add r0, r6, #0 - mov r1, #0 - bl sub_02021CE4 - pop {r3, r4, r5, r6, r7, pc} -_021E5CE0: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021E5D90 - mov r1, #2 - add r0, r6, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 -_021E5CF4: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5C80 - - thumb_func_start ov21_021E5CF8 -ov21_021E5CF8: ; 0x021E5CF8 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - cmp r4, #1 - bne _021E5D08 - mov r4, #3 -_021E5D08: - add r0, r6, #0 - bl sub_02021E74 - ldr r0, [r5, #0xc] - cmp r0, r7 - beq _021E5D20 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021E5D90 - str r7, [r5, #0xc] -_021E5D20: - cmp r4, #3 - bgt _021E5D34 - cmp r4, #0 - blt _021E5D8E - beq _021E5D3A - cmp r4, #2 - beq _021E5D64 - cmp r4, #3 - beq _021E5D7A - pop {r3, r4, r5, r6, r7, pc} -_021E5D34: - cmp r4, #0x64 - beq _021E5D7A - pop {r3, r4, r5, r6, r7, pc} -_021E5D3A: - cmp r7, #1 - bne _021E5D4A - add r0, r6, #0 - add r1, r5, #0 - mov r2, #0 - bl ov21_021E5D90 - b _021E5D54 -_021E5D4A: - add r0, r6, #0 - add r1, r5, #0 - mov r2, #1 - bl ov21_021E5D90 -_021E5D54: - ldr r1, [r5, #0x14] - add r0, r6, #0 - sub r1, r1, #1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02021E50 - pop {r3, r4, r5, r6, r7, pc} -_021E5D64: - ldr r1, [r5, #0x14] - add r0, r6, #0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02021E50 - add r0, r6, #0 - mov r1, #0 - bl sub_02021CE4 - pop {r3, r4, r5, r6, r7, pc} -_021E5D7A: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov21_021E5D90 - mov r1, #2 - add r0, r6, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 -_021E5D8E: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E5CF8 - - thumb_func_start ov21_021E5D90 -ov21_021E5D90: ; 0x021E5D90 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - bl sub_02021E74 - add r6, r0, #0 - cmp r7, #1 - ldr r1, [r4, #8] - bne _021E5DC6 - ldr r0, [r4, #0] - cmp r1, r0 - bne _021E5DE6 - ldr r1, [r4, #4] - add r0, r5, #0 - bl sub_02021D6C - ldr r0, [r4, #4] - str r0, [r4, #8] - ldr r1, [r4, #0x10] - add r0, r5, #0 - sub r1, r1, r6 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02021E50 - pop {r3, r4, r5, r6, r7, pc} -_021E5DC6: - ldr r0, [r4, #4] - cmp r1, r0 - bne _021E5DE6 - ldr r1, [r4, #0] - add r0, r5, #0 - bl sub_02021D6C - ldr r0, [r4, #0] - str r0, [r4, #8] - ldr r1, [r4, #0x10] - add r0, r5, #0 - sub r1, r1, r6 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02021E50 -_021E5DE6: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E5D90 - - thumb_func_start ov21_021E5DE8 -ov21_021E5DE8: ; 0x021E5DE8 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #1 - str r0, [r4, #0x2c] - ldr r0, _021E5E14 ; =0x000001FF - lsl r1, r2, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r2, r3, #0 - mov r0, #0xd - lsr r1, r1, #0x10 - mov r3, #0x7f - bl sub_020059D0 - add r0, r4, #0 - bl ov21_021E5F00 - add sp, #8 - pop {r4, pc} - nop -_021E5E14: .word 0x000001FF - thumb_func_end ov21_021E5DE8 - - thumb_func_start ov21_021E5E18 -ov21_021E5E18: ; 0x021E5E18 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - bl sub_0200592C - mov r0, #0 - str r0, [r4, #0x2c] - pop {r4, pc} - thumb_func_end ov21_021E5E18 - - thumb_func_start ov21_021E5E28 -ov21_021E5E28: ; 0x021E5E28 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #1 - bne _021E5E38 - mov r0, #0 - bl sub_02004EEC -_021E5E38: - ldr r0, [r4, #0x50] - cmp r0, #2 - bne _021E5E42 - bl sub_02004F44 -_021E5E42: - mov r0, #0 - str r0, [r4, #0x50] - pop {r4, pc} - thumb_func_end ov21_021E5E28 - - thumb_func_start ov21_021E5E48 -ov21_021E5E48: ; 0x021E5E48 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r6, r0, #0 - bl sub_0200598C - cmp r0, #0 - bne _021E5E74 - ldr r0, [r5, #0x68] - sub r0, r0, #1 - str r0, [r5, #0x68] - bne _021E5E74 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E5DE8 - mov r0, #0xa - str r0, [r5, #0x68] -_021E5E74: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5E48 - - thumb_func_start ov21_021E5E78 -ov21_021E5E78: ; 0x021E5E78 - str r1, [r0, #0x64] - mov r1, #0xa - str r1, [r0, #0x68] - bx lr - thumb_func_end ov21_021E5E78 - - thumb_func_start ov21_021E5E80 -ov21_021E5E80: ; 0x021E5E80 - push {r4, lr} - add r4, r0, #0 - add r3, r2, #0 - ldr r0, [r1, #0] - add r2, r4, #0 - mov r1, #0x14 - add r2, #0x6c - bl ov21_021D27E0 - str r0, [r4, #0x68] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5E80 - - thumb_func_start ov21_021E5E98 -ov21_021E5E98: ; 0x021E5E98 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x68] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x68] - str r0, [r4, #0x6c] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5E98 - - thumb_func_start ov21_021E5EAC -ov21_021E5EAC: ; 0x021E5EAC - push {r3, lr} - add r2, r0, #0 - ldr r2, [r2, #0x6c] - mov r0, #0x1f - ldr r2, [r2, #0xc] - mov r1, #0xe0 - mov r3, #0x20 - bl sub_0201DC68 - pop {r3, pc} - thumb_func_end ov21_021E5EAC - - thumb_func_start ov21_021E5EC0 -ov21_021E5EC0: ; 0x021E5EC0 - push {r3, lr} - add r2, r0, #0 - ldr r2, [r2, #0x6c] - mov r0, #0x1f - ldr r2, [r2, #0xc] - mov r1, #0xe0 - add r2, #0x20 - mov r3, #0x20 - bl sub_0201DC68 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5EC0 - - thumb_func_start ov21_021E5ED8 -ov21_021E5ED8: ; 0x021E5ED8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E5EF0 - cmp r4, #0 - bne _021E5EEC - add r0, r5, #0 - bl ov21_021E5EF4 -_021E5EEC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5ED8 - - thumb_func_start ov21_021E5EF0 -ov21_021E5EF0: ; 0x021E5EF0 - str r1, [r0, #0x48] - bx lr - thumb_func_end ov21_021E5EF0 - - thumb_func_start ov21_021E5EF4 -ov21_021E5EF4: ; 0x021E5EF4 - mov r1, #0 - str r1, [r0, #0x3c] - str r1, [r0, #0x40] - str r1, [r0, #0x44] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E5EF4 - - thumb_func_start ov21_021E5F00 -ov21_021E5F00: ; 0x021E5F00 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _021E5F20 - ldr r0, [r4, #0x3c] - bl ov21_021E5FF4 - ldr r1, _021E5F24 ; =0x0000FFFF - ldr r2, [r4, #0x40] - mov r0, #1 - bl sub_02004F94 - ldr r0, [r4, #0x44] - bl ov21_021E5F28 -_021E5F20: - pop {r4, pc} - nop -_021E5F24: .word 0x0000FFFF - thumb_func_end ov21_021E5F00 - - thumb_func_start ov21_021E5F28 -ov21_021E5F28: ; 0x021E5F28 - ldr r3, _021E5F34 ; =sub_02004A54 - add r1, r0, #0 - mov r0, #8 - mov r2, #0 - bx r3 - nop -_021E5F34: .word sub_02004A54 - thumb_func_end ov21_021E5F28 - - thumb_func_start ov21_021E5F38 -ov21_021E5F38: ; 0x021E5F38 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, [r4, #0x48] - ldr r1, [r5, #0x70] - cmp r2, r1 - beq _021E5F58 - cmp r2, #1 - bne _021E5F50 - bl ov21_021E5EAC - b _021E5F54 -_021E5F50: - bl ov21_021E5EC0 -_021E5F54: - ldr r0, [r4, #0x48] - str r0, [r5, #0x70] -_021E5F58: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5F38 - - thumb_func_start ov21_021E5F5C -ov21_021E5F5C: ; 0x021E5F5C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r6, r0, #0 - ldr r0, _021E5FCC ; =0x021BF67C - mov r1, #1 - ldr r0, [r0, #0x48] - tst r0, r1 - beq _021E5FB0 - str r1, [r5, #0x28] - mov r0, #0 - str r0, [r5, #0x18] - ldr r1, [r5, #0x64] - cmp r1, #0 - bne _021E5F96 - ldr r1, [r5, #0x2c] - cmp r1, #1 - bne _021E5F8A - bl sub_0200592C -_021E5F8A: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E5DE8 - pop {r4, r5, r6, pc} -_021E5F96: - ldr r0, [r5, #0x2c] - cmp r0, #0 - bne _021E5FA8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E5DE8 - pop {r4, r5, r6, pc} -_021E5FA8: - add r0, r5, #0 - bl ov21_021E5E18 - pop {r4, r5, r6, pc} -_021E5FB0: - ldr r0, [r5, #0x28] - cmp r0, #1 - bne _021E5FBE - mov r0, #2 - str r0, [r5, #0x28] - str r0, [r5, #0x18] - pop {r4, r5, r6, pc} -_021E5FBE: - cmp r0, #2 - bne _021E5FC8 - mov r0, #0 - str r0, [r5, #0x28] - str r1, [r5, #0x18] -_021E5FC8: - pop {r4, r5, r6, pc} - nop -_021E5FCC: .word 0x021BF67C - thumb_func_end ov21_021E5F5C - - thumb_func_start ov21_021E5FD0 -ov21_021E5FD0: ; 0x021E5FD0 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [r0, #0] - ldr r0, [r1, #8] - bl ov21_021E33BC - cmp r0, #1 - bne _021E5FEE - mov r3, #0x18 - add r0, r4, #0 - mov r1, #0xb4 - mov r2, #0x83 - str r3, [sp] - bl ov21_021D2574 -_021E5FEE: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E5FD0 - - thumb_func_start ov21_021E5FF4 -ov21_021E5FF4: ; 0x021E5FF4 - push {r4, lr} - add r4, r0, #0 - ldr r1, _021E6010 ; =0x0000FFFF - mov r0, #1 - add r2, r4, #0 - bl sub_02004F68 - add r4, #0x14 - ldr r1, _021E6010 ; =0x0000FFFF - mov r0, #8 - add r2, r4, #0 - bl sub_02004F68 - pop {r4, pc} - ; .align 2, 0 -_021E6010: .word 0x0000FFFF - thumb_func_end ov21_021E5FF4 - - thumb_func_start ov21_021E6014 -ov21_021E6014: ; 0x021E6014 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E608C - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E60D8 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E6100 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E6130 - str r0, [r5, #0x24] - ldr r0, _021E605C ; =ov21_021E6134 - str r0, [r5, #8] - ldr r0, _021E6060 ; =ov21_021E6158 - str r0, [r5, #0xc] - ldr r0, _021E6064 ; =ov21_021E6168 - str r0, [r5, #0x10] - ldr r0, _021E6068 ; =ov21_021E617C - str r0, [r5, #0x14] - ldr r0, _021E606C ; =ov21_021E6200 - str r0, [r5, #0x18] - ldr r0, _021E6070 ; =ov21_021E6204 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E605C: .word ov21_021E6134 -_021E6060: .word ov21_021E6158 -_021E6064: .word ov21_021E6168 -_021E6068: .word ov21_021E617C -_021E606C: .word ov21_021E6200 -_021E6070: .word ov21_021E6204 - thumb_func_end ov21_021E6014 - - thumb_func_start ov21_021E6074 -ov21_021E6074: ; 0x021E6074 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E6104 - ldr r0, [r4, #4] - bl ov21_021E6118 - ldr r0, [r4, #0x20] - bl ov21_021E612C - pop {r4, pc} - thumb_func_end ov21_021E6074 - - thumb_func_start ov21_021E608C -ov21_021E608C: ; 0x021E608C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021E609E - bl sub_02022974 -_021E609E: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - add r0, r5, #0 - bl ov21_021D138C - str r0, [r4, #0] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E608C - - thumb_func_start ov21_021E60D8 -ov21_021E60D8: ; 0x021E60D8 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E60EA - bl sub_02022974 -_021E60EA: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E60D8 - - thumb_func_start ov21_021E6100 -ov21_021E6100: ; 0x021E6100 - mov r0, #0 - bx lr - thumb_func_end ov21_021E6100 - - thumb_func_start ov21_021E6104 -ov21_021E6104: ; 0x021E6104 - push {r4, lr} - add r4, r0, #0 - bne _021E610E - bl sub_02022974 -_021E610E: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6104 - - thumb_func_start ov21_021E6118 -ov21_021E6118: ; 0x021E6118 - push {r4, lr} - add r4, r0, #0 - bne _021E6122 - bl sub_02022974 -_021E6122: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6118 - - thumb_func_start ov21_021E612C -ov21_021E612C: ; 0x021E612C - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E612C - - thumb_func_start ov21_021E6130 -ov21_021E6130: ; 0x021E6130 - mov r0, #0 - bx lr - thumb_func_end ov21_021E6130 - - thumb_func_start ov21_021E6134 -ov21_021E6134: ; 0x021E6134 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E6148 - bl sub_02022974 -_021E6148: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - str r4, [r5, #8] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E6134 - - thumb_func_start ov21_021E6158 -ov21_021E6158: ; 0x021E6158 - ldr r0, [r0, #0xc] - cmp r0, #1 - bne _021E6162 - mov r0, #1 - bx lr -_021E6162: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E6158 - - thumb_func_start ov21_021E6168 -ov21_021E6168: ; 0x021E6168 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6168 - - thumb_func_start ov21_021E617C -ov21_021E617C: ; 0x021E617C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r3, [r3, #8] - ldr r5, [r4, #8] - cmp r0, #3 - bhi _021E61FA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E619A: ; jump table - .short _021E61A2 - _021E619A - 2 ; case 0 - .short _021E61C0 - _021E619A - 2 ; case 1 - .short _021E61E0 - _021E619A - 2 ; case 2 - .short _021E61F6 - _021E619A - 2 ; case 3 -_021E61A2: - ldr r0, [r4, #4] - mov r1, #0x14 - bl sub_02018144 - str r0, [r4, #8] - mov r2, #0x14 - mov r1, #0 -_021E61B0: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021E61B0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E61FA -_021E61C0: - ldr r0, [r4, #4] - add r1, r6, #0 - str r0, [sp] - add r0, r5, #0 - bl ov21_021E6338 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E628C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E61FA -_021E61E0: - add r0, r5, #0 - add r1, r6, #0 - mov r3, #1 - bl ov21_021E62F8 - cmp r0, #0 - beq _021E61FA - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E61FA -_021E61F6: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E61FA: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E617C - - thumb_func_start ov21_021E6200 -ov21_021E6200: ; 0x021E6200 - mov r0, #0 - bx lr - thumb_func_end ov21_021E6200 - - thumb_func_start ov21_021E6204 -ov21_021E6204: ; 0x021E6204 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r3, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021E626E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E621E: ; jump table - .short _021E6228 - _021E621E - 2 ; case 0 - .short _021E6238 - _021E621E - 2 ; case 1 - .short _021E624C - _021E621E - 2 ; case 2 - .short _021E625A - _021E621E - 2 ; case 3 - .short _021E626A - _021E621E - 2 ; case 4 -_021E6228: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E628C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E626E -_021E6238: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E62F8 - cmp r0, #0 - beq _021E626E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E626E -_021E624C: - add r1, r3, #0 - bl ov21_021E638C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E626E -_021E625A: - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E626E -_021E626A: - mov r0, #1 - pop {r4, pc} -_021E626E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6204 - - thumb_func_start ov21_021E6274 -ov21_021E6274: ; 0x021E6274 - ldr r3, _021E627C ; =sub_02021FE0 - ldr r0, [r0, #0x10] - mov r1, #1 - bx r3 - ; .align 2, 0 -_021E627C: .word sub_02021FE0 - thumb_func_end ov21_021E6274 - - thumb_func_start ov21_021E6280 -ov21_021E6280: ; 0x021E6280 - ldr r3, _021E6288 ; =sub_02021FE0 - ldr r0, [r0, #0x10] - mov r1, #0 - bx r3 - ; .align 2, 0 -_021E6288: .word sub_02021FE0 - thumb_func_end ov21_021E6280 - - thumb_func_start ov21_021E628C -ov21_021E628C: ; 0x021E628C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E6274 - ldr r0, [r4, #8] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E62F4 - cmp r6, #0 - beq _021E62D0 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E62D0: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E62F4: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E628C - - thumb_func_start ov21_021E62F8 -ov21_021E62F8: ; 0x021E62F8 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r5, #0] - beq _021E6318 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021E6322 -_021E6318: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021E6322: - cmp r0, #0 - beq _021E6334 - cmp r4, #0 - beq _021E6330 - add r0, r6, #0 - bl ov21_021E6280 -_021E6330: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E6334: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E62F8 - - thumb_func_start ov21_021E6338 -ov21_021E6338: ; 0x021E6338 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r7, r2, #0 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov21_021E63C0 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E6600 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov21_021E66B0 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov21_021E6428 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021E6518 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021E65F8 - add r0, r5, #0 - add r1, r7, #0 - bl ov21_021E67C8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6338 - - thumb_func_start ov21_021E638C -ov21_021E638C: ; 0x021E638C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E65FC - add r0, r5, #0 - bl ov21_021E65EC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E64D4 - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - add r0, r4, #0 - bl ov21_021E6844 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E638C - - thumb_func_start ov21_021E63C0 -ov21_021E63C0: ; 0x021E63C0 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r5, r2, #0 - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x4a - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E63C0 - - thumb_func_start ov21_021E6428 -ov21_021E6428: ; 0x021E6428 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E64C4 ; =0x00001BB5 - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r7, #0 - mov r2, #0x5d - bl sub_02009A4C - str r0, [r5, #0] - bl sub_0200A3DC - ldr r0, [r5, #0] - bl sub_02009D4C - ldr r0, _021E64C8 ; =0x00001B66 - add r1, r7, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xe - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #4] - bl sub_0200A640 - ldr r0, [r5, #4] - bl sub_02009D4C - ldr r0, _021E64CC ; =0x00001BB3 - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5b - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #8] - ldr r0, _021E64D0 ; =0x00001BB4 - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5c - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0xc] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E64C4: .word 0x00001BB5 -_021E64C8: .word 0x00001B66 -_021E64CC: .word 0x00001BB3 -_021E64D0: .word 0x00001BB4 - thumb_func_end ov21_021E6428 - - thumb_func_start ov21_021E64D4 -ov21_021E64D4: ; 0x021E64D4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #4] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #4] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #8] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0xc] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E64D4 - - thumb_func_start ov21_021E6518 -ov21_021E6518: ; 0x021E6518 - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - add r6, r2, #0 - add r5, r0, #0 - ldr r0, [r6, #4] - add r7, r3, #0 - ldr r4, [r1, #0] - bl ov21_021D37BC - ldr r3, _021E65E4 ; =0x00001BB4 - str r0, [sp, #0x2c] - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x50 - sub r2, #0x4e - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x30] - add r0, sp, #0x50 - str r0, [sp, #0x34] - mov r0, #0x1f - str r0, [sp, #0x44] - mov r0, #1 - str r0, [sp, #0x48] - str r7, [sp, #0x4c] - ldr r1, [r6, #4] - ldr r0, _021E65E8 ; =0x00001748 - ldr r0, [r1, r0] - ldr r1, [sp, #0x2c] - bl sub_02098848 - add r4, r0, #0 - ldr r1, [r6, #4] - ldr r0, _021E65E8 ; =0x00001748 - ldr r0, [r1, r0] - ldr r1, [sp, #0x2c] - bl sub_02098888 - add r7, r0, #0 - mov r0, #0x2a - lsl r0, r0, #0xe - str r0, [sp, #0x38] - add r0, r4, #0 - add r0, #0x58 - lsl r0, r0, #0xc - str r0, [sp, #0x3c] - add r0, sp, #0x30 - bl sub_02021B90 - str r0, [r5, #0x10] - ldr r0, [r6, #4] - bl ov21_021D3920 - cmp r0, #0 - ldr r0, [r5, #0x10] - bne _021E65CA - mov r1, #5 - bl sub_02021D6C - b _021E65D0 -_021E65CA: - mov r1, #6 - bl sub_02021D6C -_021E65D0: - ldr r0, [r5, #0x10] - add r1, r4, #0 - bl ov21_021E6860 - ldr r0, [r5, #0x10] - add r1, r7, #0 - bl ov21_021E688C - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E65E4: .word 0x00001BB4 -_021E65E8: .word 0x00001748 - thumb_func_end ov21_021E6518 - - thumb_func_start ov21_021E65EC -ov21_021E65EC: ; 0x021E65EC - ldr r3, _021E65F4 ; =sub_02021BD4 - ldr r0, [r0, #0x10] - bx r3 - nop -_021E65F4: .word sub_02021BD4 - thumb_func_end ov21_021E65EC - - thumb_func_start ov21_021E65F8 -ov21_021E65F8: ; 0x021E65F8 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E65F8 - - thumb_func_start ov21_021E65FC -ov21_021E65FC: ; 0x021E65FC - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E65FC - - thumb_func_start ov21_021E6600 -ov21_021E6600: ; 0x021E6600 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x20 - add r6, r1, #0 - bl sub_02023790 - add r4, r0, #0 - ldr r2, _021E66A8 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - mov r1, #0x2b - add r2, r4, #0 - add r6, r0, #0 - bl sub_0200B1B8 - mov r0, #0 - mov r3, #1 - add r1, r4, #0 - add r2, r0, #0 - lsl r3, r3, #8 - bl sub_02002EEC - add r3, r0, #0 - mov r0, #0x18 - str r0, [sp] - mov r1, #0 - ldr r0, _021E66AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - add r0, r6, #0 - mov r1, #9 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E66AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - mov r3, #0x20 - bl sub_0201D78C - add r0, r6, #0 - mov r1, #9 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E66AC ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - mov r3, #0x98 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021E66A8: .word 0x000002B9 -_021E66AC: .word 0x00020100 - thumb_func_end ov21_021E6600 - - thumb_func_start ov21_021E66B0 -ov21_021E66B0: ; 0x021E66B0 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x20 - add r1, r7, #0 - bl sub_02023790 - add r4, r0, #0 - ldr r0, [r6, #4] - bl ov21_021D37BC - add r1, r7, #0 - str r0, [sp, #0x10] - bl sub_0200B32C - str r0, [sp, #0x14] - bl sub_020989D0 - add r2, r0, #0 - mov r0, #0 - mov r1, #0x1a - add r3, r7, #0 - bl sub_0200B144 - str r0, [sp, #0x18] - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021E67C0 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - ldr r2, [sp, #0x14] - add r0, r0, #4 - mov r3, #0x1a - bl sub_0201D78C - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x6e - sub r3, r1, r0 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E67C0 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_0200B190 - ldr r2, _021E67C4 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r7, #0 - bl sub_0200B144 - add r7, r0, #0 - ldr r0, [r6, #4] - bl ov21_021D3914 - add r2, r0, #0 - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021E67C0 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - mov r3, #0x92 - add r0, r0, #4 - bl sub_0201D78C - ldr r0, [r6, #4] - bl ov21_021D3920 - cmp r0, #0 - bne _021E6780 - add r0, r7, #0 - mov r1, #0x5f - add r2, r4, #0 - bl sub_0200B1B8 - b _021E678A -_021E6780: - add r0, r7, #0 - mov r1, #0x60 - add r2, r4, #0 - bl sub_0200B1B8 -_021E678A: - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe6 - sub r3, r1, r0 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E67C0 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E67C0: .word 0x00020100 -_021E67C4: .word 0x000002B9 - thumb_func_end ov21_021E66B0 - - thumb_func_start ov21_021E67C8 -ov21_021E67C8: ; 0x021E67C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl ov21_021D2170 - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov21_021D37BC - add r7, r0, #0 - ldr r1, [r4, #4] - ldr r0, _021E6840 ; =0x00001748 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_02098868 - str r0, [sp, #8] - ldr r1, [r4, #4] - ldr r0, _021E6840 ; =0x00001748 - ldr r0, [r1, r0] - add r1, r7, #0 - bl sub_020988A8 - str r0, [sp, #0xc] - mov r0, #0x58 - str r0, [sp] - ldr r0, [sp, #8] - add r2, r7, #0 - add r0, #0x58 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r4, #4] - mov r3, #2 - bl ov21_021D1890 - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - mov r1, #0xf - mov r3, #0 - add r0, r6, #0 - add r2, r1, #0 - str r3, [sp] - bl sub_020086FC - ldr r1, [sp, #8] - add r0, r6, #0 - bl ov21_021E687C - ldr r1, [sp, #0xc] - add r0, r6, #0 - bl ov21_021E68B0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E6840: .word 0x00001748 - thumb_func_end ov21_021E67C8 - - thumb_func_start ov21_021E6844 -ov21_021E6844: ; 0x021E6844 - push {r4, lr} - ldr r0, [r0, #0] - bl ov21_021D2170 - add r4, r0, #0 - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - add r0, r4, #0 - bl sub_02008780 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6844 - - thumb_func_start ov21_021E6860 -ov21_021E6860: ; 0x021E6860 - push {lr} - sub sp, #0xc - add r1, #0x58 - mov r2, #0x2a - lsl r1, r1, #0xc - lsl r2, r2, #0xe - str r1, [sp, #4] - add r1, sp, #0 - str r2, [sp] - bl sub_02021C50 - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov21_021E6860 - - thumb_func_start ov21_021E687C -ov21_021E687C: ; 0x021E687C - ldr r3, _021E6888 ; =sub_02007DEC - add r2, r1, #0 - mov r1, #1 - add r2, #0x58 - bx r3 - nop -_021E6888: .word sub_02007DEC - thumb_func_end ov21_021E687C - - thumb_func_start ov21_021E688C -ov21_021E688C: ; 0x021E688C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #1 - lsl r0, r0, #0x14 - lsl r1, r1, #0xc - bl sub_020BCFD0 - str r0, [sp] - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - mov r2, #2 - bl sub_02021C80 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E688C - - thumb_func_start ov21_021E68B0 -ov21_021E68B0: ; 0x021E68B0 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #1 - lsl r0, r0, #0x14 - lsl r1, r1, #0xc - bl sub_020BCFD0 - asr r2, r0, #0x1f - lsl r3, r2, #0x14 - lsr r1, r0, #0xc - lsl r2, r0, #0x14 - mov r0, #2 - orr r3, r1 - mov r1, #0 - lsl r0, r0, #0xa - add r2, r2, r0 - adc r3, r1 - lsl r0, r3, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - lsl r0, r1, #4 - asr r5, r0, #0x10 - add r0, r4, #0 - mov r1, #0xc - add r2, r5, #0 - bl sub_02007DEC - add r0, r4, #0 - mov r1, #0xd - add r2, r5, #0 - bl sub_02007DEC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E68B0 - - thumb_func_start ov21_021E68F4 -ov21_021E68F4: ; 0x021E68F4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E696C - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E69B0 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E69D8 - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E6A68 - str r0, [r5, #0x24] - ldr r0, _021E693C ; =ov21_021E6A6C - str r0, [r5, #8] - ldr r0, _021E6940 ; =ov21_021E6AB8 - str r0, [r5, #0xc] - ldr r0, _021E6944 ; =ov21_021E6B0C - str r0, [r5, #0x10] - ldr r0, _021E6948 ; =ov21_021E6B20 - str r0, [r5, #0x14] - ldr r0, _021E694C ; =ov21_021E6BA8 - str r0, [r5, #0x18] - ldr r0, _021E6950 ; =ov21_021E6BD8 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E693C: .word ov21_021E6A6C -_021E6940: .word ov21_021E6AB8 -_021E6944: .word ov21_021E6B0C -_021E6948: .word ov21_021E6B20 -_021E694C: .word ov21_021E6BA8 -_021E6950: .word ov21_021E6BD8 - thumb_func_end ov21_021E68F4 - - thumb_func_start ov21_021E6954 -ov21_021E6954: ; 0x021E6954 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E6A20 - ldr r0, [r4, #4] - bl ov21_021E6A34 - ldr r0, [r4, #0x20] - bl ov21_021E6A48 - pop {r4, pc} - thumb_func_end ov21_021E6954 - - thumb_func_start ov21_021E696C -ov21_021E696C: ; 0x021E696C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - bne _021E697E - bl sub_02022974 -_021E697E: - add r2, r4, #0 - mov r1, #0x10 - mov r0, #0 -_021E6984: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E6984 - add r0, r5, #0 - bl ov21_021D13A0 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1430 - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E696C - - thumb_func_start ov21_021E69B0 -ov21_021E69B0: ; 0x021E69B0 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E69C2 - bl sub_02022974 -_021E69C2: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E69B0 - - thumb_func_start ov21_021E69D8 -ov21_021E69D8: ; 0x021E69D8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov21_021E6A68 - add r7, r0, #0 - mov r1, #0x14 - mul r7, r1 - add r0, r5, #0 - add r1, r7, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021E69F8 - bl sub_02022974 -_021E69F8: - add r0, r4, #0 - mov r1, #0 - add r2, r7, #0 - bl sub_020D5124 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #1 - bl ov21_021D49E4 - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x14 - add r2, r6, #0 - mov r3, #2 - bl ov21_021D4A3C - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E69D8 - - thumb_func_start ov21_021E6A20 -ov21_021E6A20: ; 0x021E6A20 - push {r4, lr} - add r4, r0, #0 - bne _021E6A2A - bl sub_02022974 -_021E6A2A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6A20 - - thumb_func_start ov21_021E6A34 -ov21_021E6A34: ; 0x021E6A34 - push {r4, lr} - add r4, r0, #0 - bne _021E6A3E - bl sub_02022974 -_021E6A3E: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6A34 - - thumb_func_start ov21_021E6A48 -ov21_021E6A48: ; 0x021E6A48 - push {r4, lr} - add r4, r0, #0 - bne _021E6A52 - bl sub_02022974 -_021E6A52: - add r0, r4, #0 - bl ov21_021D4660 - add r0, r4, #0 - add r0, #0x14 - bl ov21_021D4660 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov21_021E6A48 - - thumb_func_start ov21_021E6A68 -ov21_021E6A68: ; 0x021E6A68 - mov r0, #2 - bx lr - thumb_func_end ov21_021E6A68 - - thumb_func_start ov21_021E6A6C -ov21_021E6A6C: ; 0x021E6A6C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - mov r1, #0x18 - bl sub_02018144 - add r6, r0, #0 - add r2, r6, #0 - mov r1, #0x18 - mov r0, #0 -_021E6A82: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E6A82 - mov r1, #0 - add r2, r6, #0 - mov r0, #4 -_021E6A90: - add r1, r1, #1 - str r0, [r2, #0x10] - add r2, r2, #4 - cmp r1, #2 - blt _021E6A90 - mov r0, #0 - str r0, [r4, #4] - ldr r2, [r5, #4] - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E6D58 - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E6DBC - str r6, [r5, #8] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6A6C - - thumb_func_start ov21_021E6AB8 -ov21_021E6AB8: ; 0x021E6AB8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021E6AC8 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E6AC8: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021E6AD2 - mov r0, #0 - pop {r3, r4, r5, pc} -_021E6AD2: - ldr r0, [r5, #0xc] - bl ov21_021E33AC - cmp r0, #0 - beq _021E6B06 - add r0, r4, #0 - bl ov21_021E6DAC - ldr r0, [r5, #0xc] - bl ov21_021E33BC - cmp r0, #0 - beq _021E6AFE - ldr r0, [r5, #8] - bl ov21_021D3998 - cmp r0, #2 - bne _021E6AFE - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E72E8 -_021E6AFE: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E6DBC -_021E6B06: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6AB8 - - thumb_func_start ov21_021E6B0C -ov21_021E6B0C: ; 0x021E6B0C - push {r4, lr} - ldr r4, [r0, #8] - add r0, r4, #0 - bl ov21_021E6DEC - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021E6B0C - - thumb_func_start ov21_021E6B20 -ov21_021E6B20: ; 0x021E6B20 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021E6BA4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E6B3C: ; jump table - .short _021E6B44 - _021E6B3C - 2 ; case 0 - .short _021E6B5E - _021E6B3C - 2 ; case 1 - .short _021E6B7C - _021E6B3C - 2 ; case 2 - .short _021E6B92 - _021E6B3C - 2 ; case 3 -_021E6B44: - ldr r0, [r4, #4] - mov r1, #0x40 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x40 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6BA4 -_021E6B5E: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E6E64 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E6CB0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6BA4 -_021E6B7C: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E6D1C - cmp r0, #0 - beq _021E6BA4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6BA4 -_021E6B92: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D25AC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E6BA4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E6B20 - - thumb_func_start ov21_021E6BA8 -ov21_021E6BA8: ; 0x021E6BA8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r3, #8] - add r4, r2, #0 - str r0, [sp] - add r5, r1, #0 - ldr r0, [r4, #0xc] - ldr r7, [r5, #8] - bl ov21_021E33AC - cmp r0, #0 - beq _021E6BD4 - ldr r2, [sp] - ldr r3, [r5, #4] - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021E728C - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E732C -_021E6BD4: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E6BA8 - - thumb_func_start ov21_021E6BD8 -ov21_021E6BD8: ; 0x021E6BD8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #4 - bhi _021E6C5A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E6BF4: ; jump table - .short _021E6BFE - _021E6BF4 - 2 ; case 0 - .short _021E6C20 - _021E6BF4 - 2 ; case 1 - .short _021E6C36 - _021E6BF4 - 2 ; case 2 - .short _021E6C48 - _021E6BF4 - 2 ; case 3 - .short _021E6C56 - _021E6BF4 - 2 ; case 4 -_021E6BFE: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - bl ov21_021D25AC - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021E6CB0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6C5A -_021E6C20: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #0 - bl ov21_021E6D1C - cmp r0, #0 - beq _021E6C5A - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6C5A -_021E6C36: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E6E94 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6C5A -_021E6C48: - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E6C5A -_021E6C56: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E6C5A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6BD8 - - thumb_func_start ov21_021E6C60 -ov21_021E6C60: ; 0x021E6C60 - push {r3, r4, r5, r6, r7, lr} - mov r6, #1 - add r5, r0, #0 - mov r4, #0 - add r7, r6, #0 -_021E6C6A: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021FE0 - ldr r0, [r5, #8] - add r1, r7, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E6C6A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6C60 - - thumb_func_start ov21_021E6C88 -ov21_021E6C88: ; 0x021E6C88 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 - add r7, r4, #0 -_021E6C92: - ldr r0, [r5, #0] - add r1, r6, #0 - bl sub_02021FE0 - ldr r0, [r5, #8] - add r1, r7, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E6C92 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6C88 - - thumb_func_start ov21_021E6CB0 -ov21_021E6CB0: ; 0x021E6CB0 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E6C60 - ldr r0, [r4, #0xc] - bl ov21_021E33A4 - cmp r0, #0 - beq _021E6D18 - cmp r6, #0 - beq _021E6CF4 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r2, [r5, #0] - lsl r0, r0, #4 - add r0, r2, r0 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E6CF4: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r3, [r5, #0] - lsl r0, r0, #4 - add r0, r3, r0 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E6D18: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E6CB0 - - thumb_func_start ov21_021E6D1C -ov21_021E6D1C: ; 0x021E6D1C - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #0xc] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E33A4 - cmp r0, #0 - beq _021E6D3C - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov21_021D2424 - b _021E6D42 -_021E6D3C: - mov r0, #2 - bl sub_0200AC1C -_021E6D42: - cmp r0, #0 - beq _021E6D54 - cmp r4, #0 - beq _021E6D50 - add r0, r6, #0 - bl ov21_021E6C88 -_021E6D50: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E6D54: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E6D1C - - thumb_func_start ov21_021E6D58 -ov21_021E6D58: ; 0x021E6D58 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #8 - bl sub_02018144 - str r0, [r5, #4] - mov r0, #0x80 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x40 - mov r2, #0xb0 - mov r3, #8 - bl ov21_021D154C - mov r0, #0xf8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x40 - add r0, r0, #4 - mov r2, #0xb0 - mov r3, #0x80 - bl ov21_021D154C - str r4, [r5, #8] - str r5, [r5, #0xc] - str r6, [sp] - add r3, r5, #0 - ldr r0, [r5, #4] - ldr r2, _021E6DA8 ; =ov21_021E6E04 - mov r1, #2 - add r3, #8 - bl sub_02023FCC - str r0, [r5, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E6DA8: .word ov21_021E6E04 - thumb_func_end ov21_021E6D58 - - thumb_func_start ov21_021E6DAC -ov21_021E6DAC: ; 0x021E6DAC - mov r2, #0 - mov r1, #3 -_021E6DB0: - add r2, r2, #1 - str r1, [r0, #0x10] - add r0, r0, #4 - cmp r2, #2 - blt _021E6DB0 - bx lr - thumb_func_end ov21_021E6DAC - - thumb_func_start ov21_021E6DBC -ov21_021E6DBC: ; 0x021E6DBC - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - bl sub_0202404C - ldr r0, [r5, #4] - cmp r0, #0 - beq _021E6DD4 - cmp r0, #1 - beq _021E6DE0 - pop {r3, r4, r5, pc} -_021E6DD4: - ldr r0, [r4, #0x10] - cmp r0, #2 - beq _021E6DEA - mov r0, #1 - str r0, [r4, #0x10] - pop {r3, r4, r5, pc} -_021E6DE0: - ldr r0, [r4, #0x14] - cmp r0, #2 - beq _021E6DEA - mov r0, #1 - str r0, [r4, #0x14] -_021E6DEA: - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E6DBC - - thumb_func_start ov21_021E6DEC -ov21_021E6DEC: ; 0x021E6DEC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6DEC - - thumb_func_start ov21_021E6E04 -ov21_021E6E04: ; 0x021E6E04 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r2, #0] - ldr r2, [r2, #4] - lsl r0, r5, #2 - add r0, r2, r0 - str r1, [r0, #0x10] - cmp r1, #2 - bne _021E6E5E - ldr r0, [r4, #0xc] - mov r1, #1 - bl ov21_021E33B4 - cmp r5, #0 - beq _021E6E28 - cmp r5, #1 - beq _021E6E44 - pop {r3, r4, r5, pc} -_021E6E28: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021E6E5E - ldr r0, _021E6E60 ; =0x000005DD - bl sub_02005748 - mov r0, #0 - str r0, [r4, #4] - ldr r2, [r4, #0] - mov r0, #1 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] - pop {r3, r4, r5, pc} -_021E6E44: - ldr r0, [r4, #4] - cmp r0, #1 - beq _021E6E5E - ldr r0, _021E6E60 ; =0x000005DD - bl sub_02005748 - mov r0, #1 - str r0, [r4, #4] - ldr r2, [r4, #0] - mov r0, #2 - ldr r1, [r2, #0] - orr r0, r1 - str r0, [r2, #0] -_021E6E5E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E6E60: .word 0x000005DD - thumb_func_end ov21_021E6E04 - - thumb_func_start ov21_021E6E64 -ov21_021E6E64: ; 0x021E6E64 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E6EF0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E6F58 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E700C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E70D4 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E6E64 - - thumb_func_start ov21_021E6E94 -ov21_021E6E94: ; 0x021E6E94 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x20 - add r6, r2, #0 - str r0, [sp] - add r4, r1, #0 - str r6, [sp, #4] - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #4 - mov r3, #0x80 - bl ov21_021D276C - mov r0, #0x20 - str r0, [sp] - str r6, [sp, #4] - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #4 - mov r3, #0xa0 - bl ov21_021D276C - add r0, r5, #0 - bl ov21_021E70BC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E71B8 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E6FD8 - mov r4, #0 -_021E6EDA: - ldr r0, [r5, #0x38] - cmp r0, #0 - beq _021E6EE4 - bl sub_020181C4 -_021E6EE4: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E6EDA - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E6E94 - - thumb_func_start ov21_021E6EF0 -ov21_021E6EF0: ; 0x021E6EF0 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x22 - mov r3, #6 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x3d - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6EF0 - - thumb_func_start ov21_021E6F58 -ov21_021E6F58: ; 0x021E6F58 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E6FCC ; =0x0000238E - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x66 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #0x10] - bl sub_0200A3DC - ldr r0, [r5, #0x10] - bl sub_02009D4C - ldr r0, _021E6FD0 ; =0x0000238C - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x64 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x18] - ldr r0, _021E6FD4 ; =0x0000238D - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x65 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x1c] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E6FCC: .word 0x0000238E -_021E6FD0: .word 0x0000238C -_021E6FD4: .word 0x0000238D - thumb_func_end ov21_021E6F58 - - thumb_func_start ov21_021E6FD8 -ov21_021E6FD8: ; 0x021E6FD8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x10] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x18] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x1c] - bl sub_02009D68 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E6FD8 - - thumb_func_start ov21_021E700C -ov21_021E700C: ; 0x021E700C - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021E70B4 ; =0x0000238D - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r2, _021E70B8 ; =0x0000083F - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x1e - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - mov r0, #0x11 - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r0, #3 - lsl r1, r1, #0xe - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r6, [sp, #0x48] - bl sub_02021B90 - mov r1, #1 - str r0, [r5, #0] - bl sub_02021D6C - mov r0, #0x2f - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r1, #0x1e - mov r0, #3 - lsl r1, r1, #0xe - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - mov r1, #1 - str r0, [r5, #4] - bl sub_02021D6C - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E70B4: .word 0x0000238D -_021E70B8: .word 0x0000083F - thumb_func_end ov21_021E700C - - thumb_func_start ov21_021E70BC -ov21_021E70BC: ; 0x021E70BC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E70C2: - ldr r0, [r5, #0] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E70C2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E70BC - - thumb_func_start ov21_021E70D4 -ov21_021E70D4: ; 0x021E70D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r2, #0 - ldr r4, [r1, #0] - cmp r0, #0 - bne _021E70E8 - bl sub_02022974 -_021E70E8: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021E71B0 ; =0x0000083F - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #8] - mov r1, #0 - bl sub_0200A72C - mov r1, #7 - mvn r1, r1 - str r1, [sp, #0x1c] - mov r1, #2 - mov r2, #0 - str r0, [sp, #0x10] - str r1, [sp, #0x20] - str r2, [sp, #0x24] - str r1, [sp, #0x28] - str r6, [sp, #0x2c] - bl sub_0201FAB4 - add r7, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0xc - mov r2, #2 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E71B4 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x2d - bl ov21_021D4DAC - lsr r0, r0, #1 - neg r0, r0 - str r6, [sp, #0xc] - str r0, [sp, #0x18] - ldr r0, [r5, #0] - str r0, [sp, #0x14] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #8] - ldr r0, [r0, #0] - add r1, r7, #4 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0xc - mov r2, #2 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E71B4 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x2e - bl ov21_021D4DAC - lsr r0, r0, #1 - neg r0, r0 - str r6, [sp, #0xc] - str r0, [sp, #0x18] - ldr r0, [r5, #4] - str r0, [sp, #0x14] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #0xc] - ldr r0, [r0, #0] - add r1, r7, #4 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E71B0: .word 0x0000083F -_021E71B4: .word 0x000002B9 - thumb_func_end ov21_021E70D4 - - thumb_func_start ov21_021E71B8 -ov21_021E71B8: ; 0x021E71B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E71BE: - ldr r0, [r5, #8] - bl ov21_021D4D1C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E71BE - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E71B8 - - thumb_func_start ov21_021E71D0 -ov21_021E71D0: ; 0x021E71D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r1, #0 - add r1, r3, #0 - str r2, [sp, #0xc] - ldr r4, [sp, #0x30] - ldr r6, [sp, #0x40] - mov r5, #0 - bl ov21_021D144C - ldr r0, [sp, #0x3c] - ldr r1, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #8] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x38] - bl ov21_021E727C - ldr r0, [sp, #8] - bl sub_02021E74 - cmp r0, #3 - bhi _021E7242 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E720E: ; jump table - .short _021E7216 - _021E720E - 2 ; case 0 - .short _021E7216 - _021E720E - 2 ; case 1 - .short _021E7226 - _021E720E - 2 ; case 2 - .short _021E7234 - _021E720E - 2 ; case 3 -_021E7216: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021E7242 - mov r0, #0 - mov r5, #1 - mov r7, #9 - str r0, [r4, #0] - b _021E7242 -_021E7226: - ldr r0, [r4, #0] - cmp r0, #1 - beq _021E7242 - mov r5, #1 - mov r7, #0xa - str r5, [r4, #0] - b _021E7242 -_021E7234: - ldr r0, [r4, #0] - cmp r0, #2 - beq _021E7242 - mov r0, #2 - mov r5, #1 - mov r7, #8 - str r0, [r4, #0] -_021E7242: - cmp r5, #0 - beq _021E7278 - ldr r0, [r6, #0] - cmp r0, #0 - beq _021E7250 - bl sub_020181C4 -_021E7250: - ldr r0, [sp, #4] - ldr r3, [sp, #0x34] - ldr r0, [r0, #0] - add r1, r7, #0 - add r2, sp, #0x10 - bl ov21_021D27E0 - str r0, [r6, #0] - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x2c] - ldr r2, [r2, #0xc] - mov r0, #0x1f - lsl r1, r1, #5 - mov r3, #0x20 - bl sub_0201DC68 - cmp r0, #0 - bne _021E7278 - bl sub_02022974 -_021E7278: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E71D0 - - thumb_func_start ov21_021E727C -ov21_021E727C: ; 0x021E727C - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - bl ov21_021D1524 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021E727C - - thumb_func_start ov21_021E728C -ov21_021E728C: ; 0x021E728C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r0, #0 - add r4, r7, #0 - add r5, r7, #0 - str r1, [sp, #0x1c] - str r2, [sp, #0x20] - str r3, [sp, #0x24] - mov r6, #0 - add r4, #0x38 - add r5, #0x30 -_021E72A2: - cmp r6, #0 - bne _021E72AA - mov r1, #4 - b _021E72AC -_021E72AA: - mov r1, #5 -_021E72AC: - mov r0, #7 - mvn r0, r0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [sp, #0x24] - str r5, [sp, #8] - str r0, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x14] - str r4, [sp, #0x18] - ldr r3, [sp, #0x20] - ldr r0, [sp, #0x1c] - ldr r1, [r7, #0] - ldr r2, [r7, #8] - ldr r3, [r3, #0x10] - bl ov21_021E71D0 - ldr r0, [sp, #0x20] - add r6, r6, #1 - add r0, r0, #4 - add r4, r4, #4 - add r5, r5, #4 - add r7, r7, #4 - str r0, [sp, #0x20] - cmp r6, #2 - blt _021E72A2 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E728C - - thumb_func_start ov21_021E72E8 -ov21_021E72E8: ; 0x021E72E8 - push {r3, lr} - ldr r2, _021E7324 ; =0x021BF67C - ldr r3, [r2, #0x48] - mov r2, #1 - tst r3, r2 - beq _021E7320 - ldr r3, [r1, #4] - cmp r3, #1 - bne _021E730C - mov r3, #0 - str r3, [r1, #4] - ldr r3, [r1, #0] - ldr r1, [r3, #0] - orr r1, r2 - str r1, [r3, #0] - mov r1, #2 - str r1, [r0, #0x10] - b _021E731A -_021E730C: - str r2, [r1, #4] - ldr r3, [r1, #0] - mov r1, #2 - ldr r2, [r3, #0] - orr r2, r1 - str r2, [r3, #0] - str r1, [r0, #0x14] -_021E731A: - ldr r0, _021E7328 ; =0x000005DD - bl sub_02005748 -_021E7320: - pop {r3, pc} - nop -_021E7324: .word 0x021BF67C -_021E7328: .word 0x000005DD - thumb_func_end ov21_021E72E8 - - thumb_func_start ov21_021E732C -ov21_021E732C: ; 0x021E732C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl ov21_021E33BC - cmp r0, #1 - bne _021E7364 - ldr r0, [r5, #4] - cmp r0, #0 - bne _021E7354 - mov r0, #0x60 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xbc - mov r2, #0x78 - mov r3, #0x68 - bl ov21_021E7368 - pop {r3, r4, r5, pc} -_021E7354: - mov r0, #0x60 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x44 - mov r2, #0x78 - mov r3, #0x68 - bl ov21_021E7368 -_021E7364: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E732C - - thumb_func_start ov21_021E7368 -ov21_021E7368: ; 0x021E7368 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r0, [r0, #0] - bl ov21_021D2574 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7368 - - thumb_func_start ov21_021E737C -ov21_021E737C: ; 0x021E737C - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - bl ov21_021E73E8 - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov21_021E7424 - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0x20] - bl ov21_021E749C - str r0, [r5, #0x24] - ldr r0, _021E73BC ; =ov21_021E74A0 - str r0, [r5, #8] - ldr r0, _021E73C0 ; =ov21_021E750C - str r0, [r5, #0xc] - ldr r0, _021E73C4 ; =ov21_021E751C - str r0, [r5, #0x10] - ldr r0, _021E73C8 ; =ov21_021E7530 - str r0, [r5, #0x14] - ldr r0, _021E73CC ; =ov21_021E75D4 - str r0, [r5, #0x18] - ldr r0, _021E73D0 ; =ov21_021E7694 - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E73BC: .word ov21_021E74A0 -_021E73C0: .word ov21_021E750C -_021E73C4: .word ov21_021E751C -_021E73C8: .word ov21_021E7530 -_021E73CC: .word ov21_021E75D4 -_021E73D0: .word ov21_021E7694 - thumb_func_end ov21_021E737C - - thumb_func_start ov21_021E73D4 -ov21_021E73D4: ; 0x021E73D4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E7468 - ldr r0, [r4, #4] - bl ov21_021E747C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E73D4 - - thumb_func_start ov21_021E73E8 -ov21_021E73E8: ; 0x021E73E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - bne _021E73FA - bl sub_02022974 -_021E73FA: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #5 - bl ov21_021D1410 - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E73E8 - - thumb_func_start ov21_021E7424 -ov21_021E7424: ; 0x021E7424 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x20 - add r5, r0, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021E7438 - bl sub_02022974 -_021E7438: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - add r0, r6, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E7EC0 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E7F40 - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02015240 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7424 - - thumb_func_start ov21_021E7468 -ov21_021E7468: ; 0x021E7468 - push {r4, lr} - add r4, r0, #0 - bne _021E7472 - bl sub_02022974 -_021E7472: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7468 - - thumb_func_start ov21_021E747C -ov21_021E747C: ; 0x021E747C - push {r4, lr} - add r4, r0, #0 - bne _021E7486 - bl sub_02022974 -_021E7486: - add r0, r4, #0 - bl ov21_021E7F20 - add r0, r4, #0 - bl ov21_021E7F7C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E747C - - thumb_func_start ov21_021E749C -ov21_021E749C: ; 0x021E749C - mov r0, #0 - bx lr - thumb_func_end ov21_021E749C - - thumb_func_start ov21_021E74A0 -ov21_021E74A0: ; 0x021E74A0 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #4] - add r5, r1, #0 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - bne _021E74B6 - bl sub_02022974 -_021E74B6: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - str r4, [r6, #8] - ldr r0, [r5, #0] - bl ov21_021D37BC - add r1, r0, #0 - ldr r2, [r5, #0] - ldr r0, _021E7508 ; =0x00001748 - ldr r0, [r2, r0] - bl sub_02098828 - add r6, r0, #0 - ldr r0, [r5, #0] - bl ov21_021D3920 - cmp r0, #0 - bne _021E74EC - mov r0, #0x5f - b _021E74EE -_021E74EC: - mov r0, #0x55 -_021E74EE: - lsl r0, r0, #2 - cmp r6, r0 - blt _021E74FC - sub r0, r6, r0 - str r0, [r4, #0] - mov r0, #1 - b _021E7502 -_021E74FC: - sub r0, r0, r6 - str r0, [r4, #0] - mov r0, #0 -_021E7502: - str r0, [r4, #4] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E7508: .word 0x00001748 - thumb_func_end ov21_021E74A0 - - thumb_func_start ov21_021E750C -ov21_021E750C: ; 0x021E750C - ldr r0, [r0, #0xc] - cmp r0, #1 - bne _021E7516 - mov r0, #1 - bx lr -_021E7516: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E750C - - thumb_func_start ov21_021E751C -ov21_021E751C: ; 0x021E751C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E751C - - thumb_func_start ov21_021E7530 -ov21_021E7530: ; 0x021E7530 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0] - str r2, [sp, #4] - ldr r6, [r3, #8] - ldr r5, [r4, #8] - cmp r0, #3 - bhi _021E75C8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E7550: ; jump table - .short _021E7558 - _021E7550 - 2 ; case 0 - .short _021E757A - _021E7550 - 2 ; case 1 - .short _021E759C - _021E7550 - 2 ; case 2 - .short _021E75B2 - _021E7550 - 2 ; case 3 -_021E7558: - ldr r0, [r4, #4] - mov r1, #0xc4 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0xc4 - bl sub_020D5124 - ldr r0, [r4, #8] - mov r1, #1 - add r0, #0xb8 - str r1, [r0, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E75C8 -_021E757A: - ldr r0, [r4, #4] - add r1, r7, #0 - str r0, [sp] - add r0, r5, #0 - add r3, r6, #0 - bl ov21_021E7800 - ldr r2, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - mov r3, #1 - bl ov21_021E771C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E75C8 -_021E759C: - add r0, r5, #0 - add r1, r7, #0 - mov r3, #1 - bl ov21_021E77A4 - cmp r0, #0 - beq _021E75C8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E75C8 -_021E75B2: - ldr r0, _021E75D0 ; =0x021E9DB0 - ldr r2, [r6, #0] - mov r1, #0x11 - bl ov21_021E83D8 - str r0, [r5, #0x34] - ldr r0, [r6, #4] - add sp, #8 - str r0, [r5, #0x38] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E75C8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E75D0: .word 0x021E9DB0 - thumb_func_end ov21_021E7530 - - thumb_func_start ov21_021E75D4 -ov21_021E75D4: ; 0x021E75D4 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0] - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r1, #7 - bhi _021E768C - add r3, r1, r1 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_021E75F0: ; jump table - .short _021E7600 - _021E75F0 - 2 ; case 0 - .short _021E761A - _021E75F0 - 2 ; case 1 - .short _021E762A - _021E75F0 - 2 ; case 2 - .short _021E7638 - _021E75F0 - 2 ; case 3 - .short _021E7650 - _021E75F0 - 2 ; case 4 - .short _021E765E - _021E75F0 - 2 ; case 5 - .short _021E7680 - _021E75F0 - 2 ; case 6 - .short _021E768C - _021E75F0 - 2 ; case 7 -_021E7600: - add r1, r0, #0 - mov r2, #1 - add r1, #0xb8 - str r2, [r1, #0] - ldr r0, [r0, #0x34] - ldr r0, [r0, #4] - cmp r0, #0 - beq _021E7614 - str r2, [r4, #0] - b _021E768C -_021E7614: - mov r0, #3 - str r0, [r4, #0] - b _021E768C -_021E761A: - add r1, r2, #0 - ldr r2, [r0, #0x38] - bl ov21_021E7F88 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E768C -_021E762A: - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021E768C - add r0, r1, #1 - str r0, [r4, #0] - b _021E768C -_021E7638: - ldr r3, [r0, #0x34] - ldr r1, [r0, #0x38] - str r1, [sp] - add r1, r2, #0 - ldrh r2, [r3, #8] - ldrh r3, [r3, #0xa] - bl ov21_021E8188 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E768C -_021E7650: - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021E768C - add r0, r1, #1 - str r0, [r4, #0] - b _021E768C -_021E765E: - ldr r2, [r0, #0x34] - ldr r1, [r2, #0xc] - cmp r1, #0 - beq _021E767A - ldr r1, [r2, #0x10] - ldr r2, [r0, #0x38] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - bl ov21_021E8258 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E768C -_021E767A: - mov r0, #7 - str r0, [r4, #0] - b _021E768C -_021E7680: - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021E768C - add r0, r1, #1 - str r0, [r4, #0] -_021E768C: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E75D4 - - thumb_func_start ov21_021E7694 -ov21_021E7694: ; 0x021E7694 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r3, r0, #0 - ldr r0, [r4, #8] - cmp r1, #4 - bhi _021E7710 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E76AE: ; jump table - .short _021E76B8 - _021E76AE - 2 ; case 0 - .short _021E76C8 - _021E76AE - 2 ; case 1 - .short _021E76DC - _021E76AE - 2 ; case 2 - .short _021E76EA - _021E76AE - 2 ; case 3 - .short _021E770C - _021E76AE - 2 ; case 4 -_021E76B8: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E771C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E7710 -_021E76C8: - add r1, r3, #0 - mov r3, #0 - bl ov21_021E77A4 - cmp r0, #0 - beq _021E7710 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E7710 -_021E76DC: - add r1, r3, #0 - bl ov21_021E785C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E7710 -_021E76EA: - add r1, r0, #0 - add r1, #0xb8 - ldr r1, [r1, #0] - cmp r1, #0 - bne _021E76FA - ldr r0, [r0, #0x3c] - bl sub_0200DA58 -_021E76FA: - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E7710 -_021E770C: - mov r0, #1 - pop {r4, pc} -_021E7710: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov21_021E7694 - - thumb_func_start ov21_021E7714 -ov21_021E7714: ; 0x021E7714 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E7714 - - thumb_func_start ov21_021E7718 -ov21_021E7718: ; 0x021E7718 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E7718 - - thumb_func_start ov21_021E771C -ov21_021E771C: ; 0x021E771C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r2, #0 - add r7, r0, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E7714 - ldr r0, [r4, #4] - bl ov21_021E2A54 - cmp r0, #0 - beq _021E779E - cmp r6, #0 - beq _021E777C - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24B8 - add r1, r0, #0 - neg r1, r1 - lsl r1, r1, #0x18 - add r0, r7, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl ov21_021E8400 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E777C: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2b - str r0, [sp, #8] - str r2, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E779E: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E771C - - thumb_func_start ov21_021E77A4 -ov21_021E77A4: ; 0x021E77A4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r2, #4] - add r4, r1, #0 - add r6, r3, #0 - bl ov21_021E2A54 - cmp r0, #0 - ldr r1, [r4, #0] - beq _021E77C4 - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D2424 - b _021E77CE -_021E77C4: - mov r0, #0x5b - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24EC -_021E77CE: - cmp r0, #0 - beq _021E77E0 - cmp r6, #0 - beq _021E77DC - add r0, r5, #0 - bl ov21_021E7718 -_021E77DC: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E77E0: - mov r0, #0x5b - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov21_021D24B8 - add r1, r0, #0 - neg r1, r1 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl ov21_021E8400 - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E77A4 - - thumb_func_start ov21_021E7800 -ov21_021E7800: ; 0x021E7800 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r7, r2, #0 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov21_021E789C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E7CF8 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov21_021E7DA8 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021E7904 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021E7B34 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov21_021E7CF0 - ldr r0, [r5, #0xc] - mov r1, #0 - bl sub_020152BC - ldr r0, [r5, #0xc] - mov r1, #1 - bl sub_02015240 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E7800 - - thumb_func_start ov21_021E785C -ov21_021E785C: ; 0x021E785C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov21_021E7CF4 - add r0, r5, #0 - bl ov21_021E7CCC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E7AA0 - ldr r0, [r4, #0] - mov r1, #0 - add r0, r0, #4 - bl sub_0201ADA4 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02019EBC - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_02015240 - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_020152BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E785C - - thumb_func_start ov21_021E789C -ov21_021E789C: ; 0x021E789C - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r5, r2, #0 - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x21 - mov r3, #3 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x49 - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #3 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E789C - - thumb_func_start ov21_021E7904 -ov21_021E7904: ; 0x021E7904 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r0, r2, #0 - add r7, r1, #0 - ldr r0, [r0, #0] - str r2, [sp, #0x10] - add r4, r3, #0 - ldr r6, [r7, #0] - bl ov21_021D37BC - str r0, [sp, #0x20] - ldr r0, [r7, #0] - bl ov21_021D26E0 - str r0, [sp, #0x14] - mov r0, #0x13 - add r1, r4, #0 - bl sub_02006C24 - add r7, r0, #0 - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x20] - ldr r0, [r0, #0] - bl ov21_021D33D4 - add r2, r0, #0 - ldr r0, [sp, #0x20] - mov r1, #0 - bl sub_02079D8C - str r0, [sp, #0x24] - bl sub_02079FD0 - str r0, [sp, #0x28] - bl sub_02079FD4 - str r0, [sp, #0x1c] - bl sub_02079FE0 - str r0, [sp, #0x18] - mov r0, #0x7d - lsl r0, r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - ldr r2, [sp, #0x24] - add r1, r7, #0 - mov r3, #0 - bl sub_02009A4C - str r0, [r5, #0x14] - bl sub_0200A450 - ldr r0, [r5, #0x14] - bl sub_02009D4C - mov r0, #0x7d - lsl r0, r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [sp, #0x28] - add r1, r7, #0 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x18] - bl sub_0200A640 - cmp r0, #0 - bne _021E79AC - bl sub_02022974 -_021E79AC: - add r0, r4, #0 - mov r1, #0x60 - bl sub_02018144 - add r1, r5, #0 - add r1, #0xbc - str r0, [r1, #0] - mov r0, #0x7d - lsl r0, r0, #6 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [sp, #0x1c] - add r1, r7, #0 - mov r3, #0 - bl sub_02009BC4 - str r0, [r5, #0x1c] - mov r0, #0x7d - lsl r0, r0, #6 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r2, [sp, #0x18] - add r1, r7, #0 - mov r3, #0 - bl sub_02009BC4 - str r0, [r5, #0x20] - ldr r0, _021E7A90 ; =0x00001BB5 - mov r3, #1 - str r0, [sp] - str r3, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - ldr r1, [sp, #0x14] - mov r2, #0x5d - bl sub_02009A4C - str r0, [r5, #0x24] - bl sub_0200A3DC - ldr r0, [r5, #0x24] - bl sub_02009D4C - ldr r0, _021E7A94 ; =0x00001B66 - ldr r1, [sp, #0x14] - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #0x51 - str r4, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0xe - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x28] - bl sub_0200A640 - add r0, r4, #0 - mov r1, #0xa0 - bl sub_02018144 - add r1, r5, #0 - add r1, #0xc0 - str r0, [r1, #0] - ldr r0, _021E7A98 ; =0x00001BB3 - ldr r1, [sp, #0x14] - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5b - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x2c] - ldr r0, _021E7A9C ; =0x00001BB4 - ldr r1, [sp, #0x14] - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x5c - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x30] - add r0, r7, #0 - bl sub_02006CA8 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021E7A90: .word 0x00001BB5 -_021E7A94: .word 0x00001B66 -_021E7A98: .word 0x00001BB3 -_021E7A9C: .word 0x00001BB4 - thumb_func_end ov21_021E7904 - - thumb_func_start ov21_021E7AA0 -ov21_021E7AA0: ; 0x021E7AA0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x14] - ldr r4, [r1, #0] - bl sub_0200A4E4 - ldr r0, [r5, #0x18] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x14] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x18] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x1c] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x20] - bl sub_02009D68 - ldr r0, [r5, #0x24] - bl sub_0200A4E4 - ldr r0, [r5, #0x28] - bl sub_0200A6DC - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #0x24] - bl sub_02009D68 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x28] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x2c] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x30] - bl sub_02009D68 - add r0, r5, #0 - add r0, #0xbc - ldr r0, [r0, #0] - bl sub_020181C4 - add r5, #0xc0 - ldr r0, [r5, #0] - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7AA0 - - thumb_func_start ov21_021E7B34 -ov21_021E7B34: ; 0x021E7B34 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x80 - add r6, r2, #0 - add r5, r0, #0 - ldr r0, [r6, #0] - add r7, r3, #0 - ldr r4, [r1, #0] - bl ov21_021D37BC - str r0, [sp, #0x2c] - ldr r0, [r6, #0] - ldr r1, [sp, #0x2c] - bl ov21_021D33D4 - ldr r3, _021E7CC8 ; =0x00001BB4 - str r0, [sp, #0x30] - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #3 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - ldr r1, [r4, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r4, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r4, r1] - add r0, #0xc - str r1, [sp, #0x1c] - ldr r0, [r4, r0] - add r1, r3, #1 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r2, r3, #0 - add r0, sp, #0x5c - sub r2, #0x4e - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - str r0, [sp, #0x3c] - add r0, sp, #0x5c - str r0, [sp, #0x40] - mov r0, #0x1f - str r0, [sp, #0x50] - mov r0, #0x2e - lsl r0, r0, #0xe - str r0, [sp, #0x44] - lsl r0, r1, #0x12 - str r0, [sp, #0x48] - str r1, [sp, #0x54] - str r7, [sp, #0x58] - add r0, sp, #0x3c - bl sub_02021B90 - str r0, [r5, #0] - ldr r0, [r6, #0] - bl ov21_021D3920 - cmp r0, #0 - ldr r0, [r5, #0] - bne _021E7BD0 - mov r1, #3 - bl sub_02021D6C - b _021E7BD6 -_021E7BD0: - mov r1, #4 - bl sub_02021D6C -_021E7BD6: - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x44] - mov r0, #0x6a - lsl r0, r0, #0xc - str r0, [sp, #0x48] - add r0, sp, #0x3c - bl sub_02021B90 - str r0, [r5, #8] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r5, #8] - mov r1, #1 - bl sub_02021E80 - mov r0, #0x2e - lsl r0, r0, #0xe - str r0, [sp, #0x44] - mov r0, #0x16 - lsl r0, r0, #0xe - str r0, [sp, #0x48] - add r0, sp, #0x3c - bl sub_02021B90 - mov r1, #0 - str r0, [r5, #0xc] - bl sub_02021D6C - mov r0, #0x12 - lsl r0, r0, #0xe - str r0, [sp, #0x44] - mov r0, #0x16 - lsl r0, r0, #0xe - str r0, [sp, #0x48] - add r0, sp, #0x3c - bl sub_02021B90 - str r0, [r5, #0x10] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r5, #0x14] - bl sub_02009E08 - add r6, r0, #0 - ldr r0, [r5, #0x18] - bl sub_02009E08 - str r0, [sp, #0x34] - ldr r0, [r5, #0x1c] - bl sub_02009E08 - str r0, [sp, #0x38] - ldr r0, [r5, #0x20] - bl sub_02009E08 - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #3 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - ldr r2, [r4, r0] - ldr r3, [sp, #0x38] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r2, [sp, #0x34] - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r0, sp, #0x5c - add r1, r6, #0 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - str r0, [sp, #0x3c] - add r0, sp, #0x5c - str r0, [sp, #0x40] - mov r0, #0x1f - str r0, [sp, #0x50] - mov r0, #0x12 - mov r1, #1 - lsl r0, r0, #0xe - str r0, [sp, #0x44] - lsl r0, r1, #0x12 - str r0, [sp, #0x48] - str r1, [sp, #0x54] - str r7, [sp, #0x58] - add r0, sp, #0x3c - bl sub_02021B90 - str r0, [r5, #4] - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x30] - mov r2, #0 - bl sub_02079EDC - add r1, r0, #0 - ldr r0, [r5, #4] - bl sub_02021EC4 - add sp, #0x80 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E7CC8: .word 0x00001BB4 - thumb_func_end ov21_021E7B34 - - thumb_func_start ov21_021E7CCC -ov21_021E7CCC: ; 0x021E7CCC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02021BD4 - ldr r0, [r4, #4] - bl sub_02021BD4 - ldr r0, [r4, #8] - bl sub_02021BD4 - ldr r0, [r4, #0xc] - bl sub_02021BD4 - ldr r0, [r4, #0x10] - bl sub_02021BD4 - pop {r4, pc} - thumb_func_end ov21_021E7CCC - - thumb_func_start ov21_021E7CF0 -ov21_021E7CF0: ; 0x021E7CF0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E7CF0 - - thumb_func_start ov21_021E7CF4 -ov21_021E7CF4: ; 0x021E7CF4 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E7CF4 - - thumb_func_start ov21_021E7CF8 -ov21_021E7CF8: ; 0x021E7CF8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x20 - add r6, r1, #0 - bl sub_02023790 - add r4, r0, #0 - ldr r2, _021E7DA0 ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r6, #0 - bl sub_0200B144 - mov r1, #0x2c - add r2, r4, #0 - add r6, r0, #0 - bl sub_0200B1B8 - mov r0, #0 - mov r3, #1 - add r1, r4, #0 - add r2, r0, #0 - lsl r3, r3, #8 - bl sub_02002EEC - add r3, r0, #0 - mov r0, #0x18 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7DA4 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - add r0, r6, #0 - mov r1, #0xa - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7DA4 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - mov r3, #0x20 - bl sub_0201D78C - add r0, r6, #0 - mov r1, #0xa - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7DA4 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - mov r3, #0x98 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021E7DA0: .word 0x000002B9 -_021E7DA4: .word 0x00020100 - thumb_func_end ov21_021E7CF8 - - thumb_func_start ov21_021E7DA8 -ov21_021E7DA8: ; 0x021E7DA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x20 - add r1, r7, #0 - bl sub_02023790 - add r4, r0, #0 - ldr r0, [r6, #0] - bl ov21_021D37BC - add r1, r7, #0 - str r0, [sp, #0x10] - bl sub_0200B32C - str r0, [sp, #0x14] - bl sub_020989C4 - add r2, r0, #0 - mov r0, #0 - mov r1, #0x1a - add r3, r7, #0 - bl sub_0200B144 - str r0, [sp, #0x18] - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7EB8 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - ldr r2, [sp, #0x14] - add r0, r0, #4 - mov r3, #0x1a - bl sub_0201D78C - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x6e - sub r3, r1, r0 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7EB8 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_0200B190 - ldr r2, _021E7EBC ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r7, #0 - bl sub_0200B144 - add r7, r0, #0 - ldr r0, [r6, #0] - bl ov21_021D3914 - add r2, r0, #0 - mov r0, #0x98 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7EB8 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - mov r3, #0x92 - add r0, r0, #4 - bl sub_0201D78C - ldr r0, [r6, #0] - bl ov21_021D3920 - cmp r0, #0 - bne _021E7E78 - add r0, r7, #0 - mov r1, #0x61 - add r2, r4, #0 - bl sub_0200B1B8 - b _021E7E82 -_021E7E78: - add r0, r7, #0 - mov r1, #0x62 - add r2, r4, #0 - bl sub_0200B1B8 -_021E7E82: - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0xe6 - sub r3, r1, r0 - mov r0, #0xa8 - str r0, [sp] - mov r1, #0 - ldr r0, _021E7EB8 ; =0x00020100 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0] - add r2, r4, #0 - add r0, r0, #4 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7EB8: .word 0x00020100 -_021E7EBC: .word 0x000002B9 - thumb_func_end ov21_021E7DA8 - - thumb_func_start ov21_021E7EC0 -ov21_021E7EC0: ; 0x021E7EC0 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r1, #0 - add r4, r0, #0 - str r5, [sp] - add r3, r4, #0 - ldr r0, [r4, #0] - mov r1, #0x24 - mov r2, #1 - add r3, #0x18 - bl ov21_021D2808 - str r0, [r4, #0x10] - add r2, r4, #0 - ldr r0, [r4, #0] - mov r1, #6 - add r2, #0x1c - add r3, r5, #0 - bl ov21_021D27E0 - str r0, [r4, #0x14] - mov r0, #0x5a - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - str r0, [sp, #4] - ldr r0, [r4, #0x18] - str r0, [sp, #8] - add r0, sp, #4 - bl sub_02015128 - str r0, [r4, #4] - mov r0, #0x5a - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - str r0, [sp, #0xc] - ldr r0, [r4, #0x1c] - str r0, [sp, #0x10] - mov r0, #0x10 - str r0, [sp, #0x14] - add r0, sp, #0xc - bl sub_020151A4 - str r0, [r4, #8] - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7EC0 - - thumb_func_start ov21_021E7F20 -ov21_021E7F20: ; 0x021E7F20 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_02015164 - ldr r0, [r4, #8] - bl sub_020151D4 - ldr r0, [r4, #0x10] - bl sub_020181C4 - ldr r0, [r4, #0x14] - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7F20 - - thumb_func_start ov21_021E7F40 -ov21_021E7F40: ; 0x021E7F40 - push {r4, lr} - sub sp, #0x20 - add r4, r0, #0 - mov r0, #0x5a - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x40 - str r0, [sp] - ldr r0, [r4, #4] - mov r2, #0 - str r0, [sp, #4] - ldr r0, [r4, #8] - str r0, [sp, #8] - add r0, sp, #0 - strh r1, [r0, #0xc] - mov r1, #0x58 - strh r1, [r0, #0xe] - strh r2, [r0, #0x10] - mov r1, #0x1f - str r1, [sp, #0x14] - str r2, [sp, #0x18] - strh r2, [r0, #0x1c] - add r0, sp, #0 - bl sub_02015214 - str r0, [r4, #0xc] - add sp, #0x20 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E7F40 - - thumb_func_start ov21_021E7F7C -ov21_021E7F7C: ; 0x021E7F7C - ldr r3, _021E7F84 ; =sub_02015238 - ldr r0, [r0, #0xc] - bx r3 - nop -_021E7F84: .word sub_02015238 - thumb_func_end ov21_021E7F7C - - thumb_func_start ov21_021E7F88 -ov21_021E7F88: ; 0x021E7F88 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - mov r1, #0 - str r0, [r4, #0x40] - ldr r0, [r4, #0xc] - str r0, [r4, #0x44] - ldr r0, [r4, #0x10] - str r0, [r4, #0x48] - ldr r0, [r4, #0] - str r0, [r4, #0x4c] - ldr r0, [r4, #4] - str r0, [r4, #0x50] - add r0, r4, #0 - str r1, [r4, #0x6c] - add r0, #0xb8 - str r0, [r4, #0x70] - add r0, r4, #0 - add r0, #0xb8 - str r1, [r0, #0] - cmp r2, #0 - bne _021E7FB8 - sub r0, r1, #1 - b _021E7FBA -_021E7FB8: - mov r0, #1 -_021E7FBA: - str r0, [r4, #0x54] - add r1, r4, #0 - ldr r0, _021E7FCC ; =ov21_021E7FD0 - add r1, #0x40 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #0x3c] - pop {r4, pc} - ; .align 2, 0 -_021E7FCC: .word ov21_021E7FD0 - thumb_func_end ov21_021E7F88 - - thumb_func_start ov21_021E7FD0 -ov21_021E7FD0: ; 0x021E7FD0 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0x2c] - cmp r1, #5 - bhi _021E8078 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E7FE6: ; jump table - .short _021E7FF2 - _021E7FE6 - 2 ; case 0 - .short _021E7FFA - _021E7FE6 - 2 ; case 1 - .short _021E8002 - _021E7FE6 - 2 ; case 2 - .short _021E8024 - _021E7FE6 - 2 ; case 3 - .short _021E8044 - _021E7FE6 - 2 ; case 4 - .short _021E806E - _021E7FE6 - 2 ; case 5 -_021E7FF2: - mov r0, #2 - str r0, [r4, #0x18] - str r0, [r4, #0x2c] - pop {r4, pc} -_021E7FFA: - add r0, r4, #0 - bl ov21_021E8084 - pop {r4, pc} -_021E8002: - ldr r1, [r4, #0x14] - ldr r0, _021E807C ; =0xFFFFFDDE - mul r0, r1 - str r0, [r4, #0x24] - mov r0, #0xb5 - ldr r1, [r4, #0x14] - mvn r0, r0 - mul r0, r1 - str r0, [r4, #0x20] - mov r0, #3 - str r0, [r4, #0x28] - mov r0, #1 - str r0, [r4, #0x2c] - add r0, r4, #0 - bl ov21_021E8084 - pop {r4, pc} -_021E8024: - ldr r1, [r4, #0x14] - ldr r0, _021E8080 ; =0x00000222 - mul r0, r1 - str r0, [r4, #0x24] - ldr r1, [r4, #0x14] - mov r0, #0xb6 - mul r0, r1 - str r0, [r4, #0x20] - mov r0, #4 - str r0, [r4, #0x28] - mov r0, #1 - str r0, [r4, #0x2c] - add r0, r4, #0 - bl ov21_021E8084 - pop {r4, pc} -_021E8044: - mov r1, #0 - str r1, [r4, #0x24] - ldr r0, [r4, #0x14] - sub r1, #0xb6 - mul r1, r0 - str r1, [r4, #0x20] - mov r0, #1 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x18] - sub r0, r0, #1 - str r0, [r4, #0x18] - cmp r0, #0 - ble _021E8062 - mov r0, #2 - b _021E8064 -_021E8062: - mov r0, #5 -_021E8064: - str r0, [r4, #0x28] - add r0, r4, #0 - bl ov21_021E8084 - pop {r4, pc} -_021E806E: - bl sub_0200DA58 - ldr r0, [r4, #0x30] - mov r1, #1 - str r1, [r0, #0] -_021E8078: - pop {r4, pc} - nop -_021E807C: .word 0xFFFFFDDE -_021E8080: .word 0x00000222 - thumb_func_end ov21_021E7FD0 - - thumb_func_start ov21_021E8084 -ov21_021E8084: ; 0x021E8084 - push {r3, lr} - sub sp, #8 - add r3, r0, #0 - ldr r2, [r3, #0x20] - ldr r1, [r3, #0x24] - cmp r2, #0 - bge _021E80A6 - ldr r0, [r3, #0x1c] - add r0, r0, r2 - cmp r0, r1 - blt _021E809E - str r0, [r3, #0x1c] - b _021E80B8 -_021E809E: - str r1, [r3, #0x1c] - ldr r0, [r3, #0x28] - str r0, [r3, #0x2c] - b _021E80B8 -_021E80A6: - ldr r0, [r3, #0x1c] - add r0, r0, r2 - cmp r0, r1 - bgt _021E80B2 - str r0, [r3, #0x1c] - b _021E80B8 -_021E80B2: - str r1, [r3, #0x1c] - ldr r0, [r3, #0x28] - str r0, [r3, #0x2c] -_021E80B8: - ldr r0, [r3, #0x10] - str r0, [sp] - ldr r0, [r3, #0x1c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r3, #0] - ldr r1, [r3, #4] - ldr r2, [r3, #8] - ldr r3, [r3, #0xc] - bl ov21_021E80D4 - add sp, #8 - pop {r3, pc} - thumb_func_end ov21_021E8084 - - thumb_func_start ov21_021E80D4 -ov21_021E80D4: ; 0x021E80D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - add r1, sp, #0x18 - ldrh r1, [r1, #0x14] - add r7, r2, #0 - str r3, [sp] - bl sub_020152BC - add r0, sp, #0x18 - ldrh r0, [r0, #0x14] - mov r2, #0xe - lsl r2, r2, #0xe - asr r0, r0, #4 - lsl r4, r0, #1 - add r0, r4, #1 - lsl r1, r0, #1 - ldr r0, _021E8184 ; =0x020F983C - mov r3, #0 - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r5, r2, #0xc - orr r5, r0 - mov r2, #0xe - ldr r0, _021E8184 ; =0x020F983C - lsl r1, r4, #1 - ldrsh r0, [r0, r1] - lsl r2, r2, #0xe - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - mov r3, #0 - add r0, r0, r2 - adc r1, r3 - lsr r4, r0, #0xc - lsl r0, r2, #8 - lsl r1, r1, #0x14 - add r0, r5, r0 - orr r4, r1 - str r0, [sp, #4] - lsl r0, r2, #7 - add r0, r4, r0 - str r0, [sp, #8] - ldr r0, [sp] - add r1, sp, #4 - bl sub_02021C50 - mov r0, #6 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r6, #0 - add r1, sp, #4 - bl sub_02021C50 - mov r0, #2 - lsl r0, r0, #0x12 - sub r1, r0, r5 - lsr r0, r0, #1 - sub r0, r0, r4 - str r0, [sp, #8] - str r1, [sp, #4] - ldr r0, [sp, #0x28] - add r1, sp, #4 - bl sub_02021C50 - mov r0, #6 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r7, #0 - add r1, sp, #4 - bl sub_02021C50 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E8184: .word 0x020F983C - thumb_func_end ov21_021E80D4 - - thumb_func_start ov21_021E8188 -ov21_021E8188: ; 0x021E8188 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - add r5, r4, #0 - str r0, [r4, #0x74] - ldr r0, [r4, #0xc] - add r5, #0xb8 - str r0, [r4, #0x78] - ldr r0, [r4, #0x10] - str r0, [r4, #0x7c] - add r0, r4, #0 - ldr r1, [r4, #0] - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, [r4, #4] - add r0, #0x84 - str r1, [r0, #0] - add r1, r4, #0 - mov r0, #0 - add r1, #0x88 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0x94 - str r5, [r1, #0] - add r1, r4, #0 - add r1, #0xb8 - str r0, [r1, #0] - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _021E81D4 - add r0, r4, #0 - add r0, #0x8c - str r2, [r0, #0] - add r0, r4, #0 - add r0, #0x90 - str r3, [r0, #0] - b _021E81E4 -_021E81D4: - add r0, r4, #0 - neg r1, r2 - add r0, #0x8c - str r1, [r0, #0] - add r0, r4, #0 - neg r1, r3 - add r0, #0x90 - str r1, [r0, #0] -_021E81E4: - add r1, r4, #0 - ldr r0, _021E81F4 ; =ov21_021E81F8 - add r1, #0x74 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #0x3c] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E81F4: .word ov21_021E81F8 - thumb_func_end ov21_021E8188 - - thumb_func_start ov21_021E81F8 -ov21_021E81F8: ; 0x021E81F8 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x18] - mov r4, #0 - cmp r0, #0 - ldr r2, [r5, #0x1c] - bge _021E821C - ldr r1, [r5, #0x14] - add r0, r1, r0 - cmp r0, r2 - blt _021E8216 - str r0, [r5, #0x14] - b _021E822C -_021E8216: - str r2, [r5, #0x14] - mov r4, #1 - b _021E822C -_021E821C: - ldr r1, [r5, #0x14] - add r0, r1, r0 - cmp r0, r2 - bgt _021E8228 - str r0, [r5, #0x14] - b _021E822C -_021E8228: - str r2, [r5, #0x14] - mov r4, #1 -_021E822C: - ldr r0, [r5, #0x10] - str r0, [sp] - ldr r0, [r5, #0x14] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [r5, #4] - ldr r2, [r5, #8] - ldr r3, [r5, #0xc] - bl ov21_021E80D4 - cmp r4, #1 - bne _021E8254 - add r0, r6, #0 - bl sub_0200DA58 - ldr r0, [r5, #0x20] - mov r1, #1 - str r1, [r0, #0] -_021E8254: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E81F8 - - thumb_func_start ov21_021E8258 -ov21_021E8258: ; 0x021E8258 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r2, #0 - bne _021E8266 - ldr r1, [r5, #4] - b _021E8268 -_021E8266: - ldr r1, [r5, #0] -_021E8268: - add r0, #0x98 - str r1, [r0, #0] - neg r0, r4 - lsl r1, r0, #1 - add r0, r5, #0 - add r0, #0xa8 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - bl sub_02021D28 - add r1, r5, #0 - ldr r2, [r0, #0] - add r1, #0x9c - str r2, [r1, #0] - ldr r1, [r0, #4] - add r0, r5, #0 - add r0, #0xa0 - str r1, [r0, #0] - add r0, r5, #0 - add r1, r5, #0 - mov r2, #0 - add r0, #0xac - str r2, [r0, #0] - add r0, r5, #0 - add r0, #0xa4 - strh r4, [r0] - add r0, r5, #0 - add r0, #0xb0 - str r2, [r0, #0] - add r0, r5, #0 - add r1, #0xb8 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb8 - str r2, [r0, #0] - add r1, r5, #0 - ldr r0, _021E82C4 ; =ov21_021E82C8 - add r1, #0x98 - bl sub_0200D9E8 - str r0, [r5, #0x3c] - pop {r3, r4, r5, pc} - nop -_021E82C4: .word ov21_021E82C8 - thumb_func_end ov21_021E8258 - - thumb_func_start ov21_021E82C8 -ov21_021E82C8: ; 0x021E82C8 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #3 - bhi _021E83D2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E82E2: ; jump table - .short _021E82EA - _021E82E2 - 2 ; case 0 - .short _021E833C - _021E82E2 - 2 ; case 1 - .short _021E8370 - _021E82E2 - 2 ; case 2 - .short _021E83B6 - _021E82E2 - 2 ; case 3 -_021E82EA: - ldr r0, [r4, #0x14] - add r3, r0, #1 - str r3, [r4, #0x14] - mov r0, #0xc - ldrsh r0, [r4, r0] - add r1, r3, #0 - mul r1, r3 - add r2, r0, #0 - lsr r0, r1, #0x1f - add r0, r1, r0 - mul r2, r3 - asr r0, r0, #1 - add r2, r2, r0 - ldr r0, [r4, #4] - str r0, [sp] - ldr r1, [r4, #8] - lsl r0, r2, #0xc - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0 - bl sub_02021C50 - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x10] - cmp r1, r0 - blt _021E83D2 - mov r0, #0 - str r0, [r4, #0x14] - mov r0, #0xc - ldrsh r1, [r4, r0] - add sp, #0xc - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, r0, #1 - str r0, [r4, #0x10] - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - pop {r4, r5, pc} -_021E833C: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021E8358 - mov r0, #2 - ldr r1, [r4, #4] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #8] - add r1, sp, #0 - str r0, [sp, #4] - ldr r0, [r4, #0] - bl sub_02021C50 -_021E8358: - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - cmp r0, #1 - ble _021E83D2 - mov r0, #0 - str r0, [r4, #0x14] - ldr r0, [r4, #0x18] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0x18] - pop {r4, r5, pc} -_021E8370: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021E838C - mov r0, #2 - ldr r1, [r4, #4] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #8] - add r1, sp, #0 - str r0, [sp, #4] - ldr r0, [r4, #0] - bl sub_02021C50 -_021E838C: - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - cmp r0, #1 - ble _021E83D2 - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #0 - ble _021E83AC - mov r0, #0 - str r0, [r4, #0x14] - mov r0, #1 - add sp, #0xc - str r0, [r4, #0x18] - pop {r4, r5, pc} -_021E83AC: - ldr r0, [r4, #0x18] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0x18] - pop {r4, r5, pc} -_021E83B6: - ldr r0, [r4, #4] - add r1, sp, #0 - str r0, [sp] - ldr r0, [r4, #8] - str r0, [sp, #4] - ldr r0, [r4, #0] - bl sub_02021C50 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x1c] - mov r1, #1 - str r1, [r0, #0] -_021E83D2: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E82C8 - - thumb_func_start ov21_021E83D8 -ov21_021E83D8: ; 0x021E83D8 - push {r4, r5} - mov r4, #0 - cmp r1, #0 - ble _021E83FA - add r5, r0, #0 -_021E83E2: - ldr r3, [r5, #0] - cmp r3, r2 - blt _021E83F2 - mov r1, #0x14 - mul r1, r4 - add r0, r0, r1 - pop {r4, r5} - bx lr -_021E83F2: - add r4, r4, #1 - add r5, #0x14 - cmp r4, r1 - blt _021E83E2 -_021E83FA: - mov r0, #0 - pop {r4, r5} - bx lr - thumb_func_end ov21_021E83D8 - - thumb_func_start ov21_021E8400 -ov21_021E8400: ; 0x021E8400 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0x18] - add r7, r1, #0 - add r4, r2, #0 - bl sub_02009E34 - add r6, r0, #0 - ldr r0, [r5, #0x18] - mov r1, #0 - bl sub_0200A72C - add r1, r5, #0 - str r4, [sp] - add r1, #0xbc - str r0, [sp, #4] - ldr r0, [r6, #0xc] - ldr r1, [r1, #0] - mov r2, #0x30 - add r3, r7, #0 - bl sub_0200393C - ldr r0, [sp, #4] - mov r1, #1 - bl sub_020A81FC - add r2, r5, #0 - add r2, #0xbc - add r1, r0, #0 - ldr r2, [r2, #0] - mov r0, #0xe - mov r3, #0x60 - bl sub_0201DC68 - ldr r0, [r5, #0x28] - bl sub_02009E34 - add r6, r0, #0 - ldr r0, [r5, #0x28] - mov r1, #0 - bl sub_0200A72C - add r1, r5, #0 - str r4, [sp] - add r1, #0xc0 - str r0, [sp, #8] - ldr r0, [r6, #0xc] - ldr r1, [r1, #0] - mov r2, #0x50 - add r3, r7, #0 - bl sub_0200393C - ldr r0, [sp, #8] - mov r1, #1 - bl sub_020A81FC - add r5, #0xc0 - add r1, r0, #0 - ldr r2, [r5, #0] - mov r0, #0xe - mov r3, #0xa0 - bl sub_0201DC68 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E8400 - - thumb_func_start ov21_021E8484 -ov21_021E8484: ; 0x021E8484 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r2, [sp] - add r0, r2, #0 - add r4, r1, #0 - bl ov21_021E84FC - add r6, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E8544 - add r7, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - bl ov21_021E856C - str r6, [r5, #0] - str r7, [r5, #4] - str r0, [r5, #0x20] - bl ov21_021E859C - str r0, [r5, #0x24] - ldr r0, _021E84CC ; =ov21_021E85A0 - str r0, [r5, #8] - ldr r0, _021E84D0 ; =ov21_021E85DC - str r0, [r5, #0xc] - ldr r0, _021E84D4 ; =ov21_021E8640 - str r0, [r5, #0x10] - ldr r0, _021E84D8 ; =ov21_021E8654 - str r0, [r5, #0x14] - ldr r0, _021E84DC ; =ov21_021E86DC - str r0, [r5, #0x18] - ldr r0, _021E84E0 ; =ov21_021E870C - str r0, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E84CC: .word ov21_021E85A0 -_021E84D0: .word ov21_021E85DC -_021E84D4: .word ov21_021E8640 -_021E84D8: .word ov21_021E8654 -_021E84DC: .word ov21_021E86DC -_021E84E0: .word ov21_021E870C - thumb_func_end ov21_021E8484 - - thumb_func_start ov21_021E84E4 -ov21_021E84E4: ; 0x021E84E4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov21_021E8570 - ldr r0, [r4, #4] - bl ov21_021E8584 - ldr r0, [r4, #0x20] - bl ov21_021E8598 - pop {r4, pc} - thumb_func_end ov21_021E84E4 - - thumb_func_start ov21_021E84FC -ov21_021E84FC: ; 0x021E84FC - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - bne _021E850E - bl sub_02022974 -_021E850E: - add r2, r4, #0 - mov r1, #0x10 - mov r0, #0 -_021E8514: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E8514 - add r0, r5, #0 - bl ov21_021D13A0 - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1430 - str r0, [r4, #8] - add r0, r5, #0 - mov r1, #3 - bl ov21_021D1410 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov21_021D13EC - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E84FC - - thumb_func_start ov21_021E8544 -ov21_021E8544: ; 0x021E8544 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021E8556 - bl sub_02022974 -_021E8556: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - add r0, r5, #0 - bl ov21_021D13FC - str r0, [r4, #0] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E8544 - - thumb_func_start ov21_021E856C -ov21_021E856C: ; 0x021E856C - mov r0, #0 - bx lr - thumb_func_end ov21_021E856C - - thumb_func_start ov21_021E8570 -ov21_021E8570: ; 0x021E8570 - push {r4, lr} - add r4, r0, #0 - bne _021E857A - bl sub_02022974 -_021E857A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E8570 - - thumb_func_start ov21_021E8584 -ov21_021E8584: ; 0x021E8584 - push {r4, lr} - add r4, r0, #0 - bne _021E858E - bl sub_02022974 -_021E858E: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E8584 - - thumb_func_start ov21_021E8598 -ov21_021E8598: ; 0x021E8598 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E8598 - - thumb_func_start ov21_021E859C -ov21_021E859C: ; 0x021E859C - mov r0, #0 - bx lr - thumb_func_end ov21_021E859C - - thumb_func_start ov21_021E85A0 -ov21_021E85A0: ; 0x021E85A0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r6, r1, #0 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021E85B6: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021E85B6 - mov r0, #4 - str r0, [r4, #0x10] - ldr r2, [r5, #4] - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E886C - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E88B8 - str r4, [r5, #8] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E85A0 - - thumb_func_start ov21_021E85DC -ov21_021E85DC: ; 0x021E85DC - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r0, #0xc] - ldr r4, [r0, #8] - cmp r1, #1 - bne _021E85EC - mov r0, #1 - pop {r3, r4, r5, pc} -_021E85EC: - ldr r0, [r0, #0x10] - cmp r0, #1 - bne _021E85F6 - mov r0, #0 - pop {r3, r4, r5, pc} -_021E85F6: - ldr r0, [r5, #8] - bl ov21_021E33AC - cmp r0, #0 - beq _021E863A - add r0, r4, #0 - bl ov21_021E88B0 - ldr r0, [r5, #8] - bl ov21_021E33BC - cmp r0, #0 - beq _021E8622 - ldr r0, [r5, #4] - bl ov21_021D3998 - cmp r0, #2 - bne _021E8622 - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E8CF0 -_021E8622: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E88B8 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021E863A - add r0, r5, #0 - bl ov21_021E8D3C - mov r0, #0 - str r0, [r4, #0x14] -_021E863A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E85DC - - thumb_func_start ov21_021E8640 -ov21_021E8640: ; 0x021E8640 - push {r4, lr} - ldr r4, [r0, #8] - add r0, r4, #0 - bl ov21_021E88D0 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov21_021E8640 - - thumb_func_start ov21_021E8654 -ov21_021E8654: ; 0x021E8654 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #3 - bhi _021E86D8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8670: ; jump table - .short _021E8678 - _021E8670 - 2 ; case 0 - .short _021E8692 - _021E8670 - 2 ; case 1 - .short _021E86B0 - _021E8670 - 2 ; case 2 - .short _021E86C6 - _021E8670 - 2 ; case 3 -_021E8678: - ldr r0, [r4, #4] - mov r1, #0x30 - bl sub_02018144 - str r0, [r4, #8] - mov r1, #0 - mov r2, #0x30 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E86D8 -_021E8692: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E891C - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #1 - bl ov21_021E87C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E86D8 -_021E86B0: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #1 - bl ov21_021E8830 - cmp r0, #0 - beq _021E86D8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E86D8 -_021E86C6: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - bl ov21_021D25AC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E86D8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E8654 - - thumb_func_start ov21_021E86DC -ov21_021E86DC: ; 0x021E86DC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r3, #8] - add r4, r2, #0 - str r0, [sp] - add r5, r1, #0 - ldr r0, [r4, #8] - ldr r7, [r5, #8] - bl ov21_021E33AC - cmp r0, #0 - beq _021E8708 - ldr r2, [sp] - ldr r3, [r5, #4] - add r0, r6, #0 - add r1, r7, #0 - bl ov21_021E8CBC - add r0, r6, #0 - add r1, r4, #0 - bl ov21_021E8D04 -_021E8708: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E86DC - - thumb_func_start ov21_021E870C -ov21_021E870C: ; 0x021E870C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r7, r2, #0 - ldr r6, [r4, #8] - cmp r0, #4 - bhi _021E878E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8728: ; jump table - .short _021E8732 - _021E8728 - 2 ; case 0 - .short _021E8754 - _021E8728 - 2 ; case 1 - .short _021E876A - _021E8728 - 2 ; case 2 - .short _021E877C - _021E8728 - 2 ; case 3 - .short _021E878A - _021E8728 - 2 ; case 4 -_021E8732: - mov r0, #0x79 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #1 - bl ov21_021D25AC - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - mov r3, #0 - bl ov21_021E87C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E878E -_021E8754: - add r0, r6, #0 - add r1, r5, #0 - mov r3, #0 - bl ov21_021E8830 - cmp r0, #0 - beq _021E878E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E878E -_021E876A: - ldr r2, [r4, #4] - add r0, r6, #0 - add r1, r5, #0 - bl ov21_021E894C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E878E -_021E877C: - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E878E -_021E878A: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E878E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E870C - - thumb_func_start ov21_021E8794 -ov21_021E8794: ; 0x021E8794 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #4] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r4, pc} - thumb_func_end ov21_021E8794 - - thumb_func_start ov21_021E87AC -ov21_021E87AC: ; 0x021E87AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021FE0 - ldr r0, [r4, #4] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_02012AF0 - pop {r4, pc} - thumb_func_end ov21_021E87AC - - thumb_func_start ov21_021E87C4 -ov21_021E87C4: ; 0x021E87C4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r2, #0 - add r5, r1, #0 - add r6, r3, #0 - bl ov21_021E8794 - ldr r0, [r4, #8] - bl ov21_021E33A4 - cmp r0, #0 - beq _021E882C - cmp r6, #0 - beq _021E8808 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r2, [r5, #0] - lsl r0, r0, #4 - add r0, r2, r0 - add r2, r1, #0 - sub r2, #0x11 - bl ov21_021D23F8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E8808: - mov r0, #0x10 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #0x2c - str r0, [sp, #8] - mov r0, #0x2f - str r0, [sp, #0xc] - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #0x19 - ldr r3, [r5, #0] - lsl r0, r0, #4 - add r0, r3, r0 - add r3, r1, #0 - sub r3, #0x11 - bl ov21_021D23F8 -_021E882C: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E87C4 - - thumb_func_start ov21_021E8830 -ov21_021E8830: ; 0x021E8830 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r2, #8] - add r5, r1, #0 - add r4, r3, #0 - bl ov21_021E33A4 - cmp r0, #0 - beq _021E8850 - mov r0, #0x19 - ldr r1, [r5, #0] - lsl r0, r0, #4 - add r0, r1, r0 - bl ov21_021D2424 - b _021E8856 -_021E8850: - mov r0, #2 - bl sub_0200AC1C -_021E8856: - cmp r0, #0 - beq _021E8868 - cmp r4, #0 - beq _021E8864 - add r0, r6, #0 - bl ov21_021E87AC -_021E8864: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E8868: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E8830 - - thumb_func_start ov21_021E886C -ov21_021E886C: ; 0x021E886C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #4 - bl sub_02018144 - str r0, [r5, #4] - mov r0, #0xf8 - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x68 - mov r2, #0xb8 - mov r3, #8 - bl ov21_021D154C - str r4, [r5, #8] - str r5, [r5, #0xc] - str r6, [sp] - add r3, r5, #0 - ldr r0, [r5, #4] - ldr r2, _021E88AC ; =ov21_021E88E8 - mov r1, #1 - add r3, #8 - bl sub_02023FCC - str r0, [r5, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021E88AC: .word ov21_021E88E8 - thumb_func_end ov21_021E886C - - thumb_func_start ov21_021E88B0 -ov21_021E88B0: ; 0x021E88B0 - mov r1, #3 - str r1, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E88B0 - - thumb_func_start ov21_021E88B8 -ov21_021E88B8: ; 0x021E88B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0202404C - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021E88CC - mov r0, #2 - str r0, [r4, #0x10] -_021E88CC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E88B8 - - thumb_func_start ov21_021E88D0 -ov21_021E88D0: ; 0x021E88D0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E88D0 - - thumb_func_start ov21_021E88E8 -ov21_021E88E8: ; 0x021E88E8 - push {r4, lr} - ldr r4, [r2, #4] - ldr r3, [r2, #0] - lsl r2, r0, #2 - add r2, r4, r2 - str r1, [r2, #0x10] - cmp r1, #0 - beq _021E88FE - cmp r1, #2 - beq _021E8910 - pop {r4, pc} -_021E88FE: - cmp r0, #0 - bne _021E8918 - ldr r0, [r3, #8] - mov r1, #1 - bl ov21_021E33B4 - mov r0, #1 - str r0, [r4, #0x14] - pop {r4, pc} -_021E8910: - cmp r0, #0 - bne _021E8918 - mov r0, #1 - str r0, [r4, #0x14] -_021E8918: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E88E8 - - thumb_func_start ov21_021E891C -ov21_021E891C: ; 0x021E891C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov21_021E898C - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E89F4 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E8AA8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov21_021E8B40 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E891C - - thumb_func_start ov21_021E894C -ov21_021E894C: ; 0x021E894C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x20 - str r0, [sp] - add r4, r1, #0 - str r2, [sp, #4] - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #4 - mov r3, #0x80 - bl ov21_021D276C - add r0, r5, #0 - bl ov21_021E8B34 - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E8BDC - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E8A74 - ldr r0, [r5, #0x2c] - cmp r0, #0 - beq _021E8986 - bl sub_020181C4 -_021E8986: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E894C - - thumb_func_start ov21_021E898C -ov21_021E898C: ; 0x021E898C - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - str r5, [sp, #0xc] - ldr r2, [r0, #0] - mov r1, #0x22 - mov r3, #6 - bl ov21_021D2724 - str r5, [sp] - ldr r0, [r4, #0] - mov r1, #0x3a - mov r2, #1 - add r3, sp, #0x10 - bl ov21_021D27B8 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r2] - mov r1, #6 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020198C0 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0] - mov r1, #6 - ldr r0, [r0, #0] - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E898C - - thumb_func_start ov21_021E89F4 -ov21_021E89F4: ; 0x021E89F4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r6, [r1, #0] - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov21_021D26E0 - add r7, r0, #0 - ldr r0, _021E8A68 ; =0x0000332E - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #5 - str r4, [sp, #8] - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r2, #0x66 - mov r3, #1 - bl sub_02009A4C - str r0, [r5, #8] - bl sub_0200A3DC - ldr r0, [r5, #8] - bl sub_02009D4C - ldr r0, _021E8A6C ; =0x0000332C - add r1, r7, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x52 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x64 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x10] - ldr r0, _021E8A70 ; =0x0000332D - add r1, r7, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x53 - str r4, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r2, #0x65 - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0x14] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E8A68: .word 0x0000332E -_021E8A6C: .word 0x0000332C -_021E8A70: .word 0x0000332D - thumb_func_end ov21_021E89F4 - - thumb_func_start ov21_021E8A74 -ov21_021E8A74: ; 0x021E8A74 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - ldr r4, [r1, #0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r4, r0] - ldr r1, [r5, #8] - bl sub_02009D68 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x10] - bl sub_02009D68 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r5, #0x14] - bl sub_02009D68 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E8A74 - - thumb_func_start ov21_021E8AA8 -ov21_021E8AA8: ; 0x021E8AA8 - push {r4, r5, r6, lr} - sub sp, #0x70 - ldr r4, [r1, #0] - ldr r3, _021E8B2C ; =0x0000332D - add r5, r0, #0 - mov r0, #0 - str r3, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #5 - lsl r0, r0, #6 - add r6, r2, #0 - ldr r2, [r4, r0] - str r2, [sp, #0x14] - add r2, r0, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r0, #0 - add r2, #8 - ldr r2, [r4, r2] - add r0, #0xc - str r2, [sp, #0x1c] - ldr r0, [r4, r0] - ldr r2, _021E8B30 ; =0x0000083F - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r1, r3, #1 - add r0, sp, #0x4c - sub r3, r3, #1 - bl sub_020093B4 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #9 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #0x1f - str r0, [sp, #0x40] - mov r0, #2 - str r0, [sp, #0x44] - lsl r0, r0, #0x12 - str r0, [sp, #0x34] - mov r0, #3 - lsl r1, r1, #0x10 - lsl r0, r0, #0x12 - str r1, [sp, #0x38] - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r6, [sp, #0x48] - bl sub_02021B90 - mov r1, #2 - str r0, [r5, #0] - bl sub_02021D6C - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E8B2C: .word 0x0000332D -_021E8B30: .word 0x0000083F - thumb_func_end ov21_021E8AA8 - - thumb_func_start ov21_021E8B34 -ov21_021E8B34: ; 0x021E8B34 - ldr r3, _021E8B3C ; =sub_02021BD4 - ldr r0, [r0, #0] - bx r3 - nop -_021E8B3C: .word sub_02021BD4 - thumb_func_end ov21_021E8B34 - - thumb_func_start ov21_021E8B40 -ov21_021E8B40: ; 0x021E8B40 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r2, #0 - ldr r4, [r1, #0] - cmp r0, #0 - bne _021E8B54 - bl sub_02022974 -_021E8B54: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021E8BD4 ; =0x0000083F - bl sub_02009DC8 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r4, r1] - str r1, [sp, #8] - mov r1, #0 - bl sub_0200A72C - mov r1, #7 - mvn r1, r1 - str r1, [sp, #0x1c] - mov r1, #2 - mov r2, #0 - str r0, [sp, #0x10] - str r1, [sp, #0x20] - str r2, [sp, #0x24] - str r1, [sp, #0x28] - str r6, [sp, #0x2c] - bl sub_0201FAB4 - add r7, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x10 - mov r2, #2 - bl ov21_021D4D6C - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r2, _021E8BD8 ; =0x000002B9 - add r1, r6, #0 - mov r3, #0x65 - bl ov21_021D4DAC - lsr r0, r0, #1 - neg r0, r0 - str r6, [sp, #0xc] - str r0, [sp, #0x18] - ldr r0, [r5, #0] - str r0, [sp, #0x14] - add r0, sp, #8 - bl ov21_021D4CA0 - str r0, [r5, #4] - ldr r0, [r0, #0] - add r1, r7, #4 - bl sub_02012A60 - add r0, r6, #0 - bl ov21_021D4DA0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E8BD4: .word 0x0000083F -_021E8BD8: .word 0x000002B9 - thumb_func_end ov21_021E8B40 - - thumb_func_start ov21_021E8BDC -ov21_021E8BDC: ; 0x021E8BDC - ldr r3, _021E8BE4 ; =ov21_021D4D1C - ldr r0, [r0, #4] - bx r3 - nop -_021E8BE4: .word ov21_021D4D1C - thumb_func_end ov21_021E8BDC - - thumb_func_start ov21_021E8BE8 -ov21_021E8BE8: ; 0x021E8BE8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r1, #0 - add r1, r3, #0 - str r2, [sp, #0xc] - ldr r4, [sp, #0x30] - ldr r6, [sp, #0x40] - mov r5, #0 - bl ov21_021D144C - ldr r0, [sp, #0x3c] - ldr r1, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #8] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x38] - bl ov21_021E8C94 - ldr r0, [sp, #8] - bl sub_02021E74 - cmp r0, #3 - bhi _021E8C5A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8C26: ; jump table - .short _021E8C2E - _021E8C26 - 2 ; case 0 - .short _021E8C2E - _021E8C26 - 2 ; case 1 - .short _021E8C3E - _021E8C26 - 2 ; case 2 - .short _021E8C4C - _021E8C26 - 2 ; case 3 -_021E8C2E: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021E8C5A - mov r0, #0 - mov r5, #1 - mov r7, #9 - str r0, [r4, #0] - b _021E8C5A -_021E8C3E: - ldr r0, [r4, #0] - cmp r0, #1 - beq _021E8C5A - mov r5, #1 - mov r7, #0xa - str r5, [r4, #0] - b _021E8C5A -_021E8C4C: - ldr r0, [r4, #0] - cmp r0, #2 - beq _021E8C5A - mov r0, #2 - mov r5, #1 - mov r7, #8 - str r0, [r4, #0] -_021E8C5A: - cmp r5, #0 - beq _021E8C90 - ldr r0, [r6, #0] - cmp r0, #0 - beq _021E8C68 - bl sub_020181C4 -_021E8C68: - ldr r0, [sp, #4] - ldr r3, [sp, #0x34] - ldr r0, [r0, #0] - add r1, r7, #0 - add r2, sp, #0x10 - bl ov21_021D27E0 - str r0, [r6, #0] - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x2c] - ldr r2, [r2, #0xc] - mov r0, #0x1f - lsl r1, r1, #5 - mov r3, #0x20 - bl sub_0201DC68 - cmp r0, #0 - bne _021E8C90 - bl sub_02022974 -_021E8C90: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E8BE8 - - thumb_func_start ov21_021E8C94 -ov21_021E8C94: ; 0x021E8C94 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - bl ov21_021D1498 - add r0, r5, #0 - bl sub_02021E74 - cmp r0, #2 - ldr r0, [r4, #0] - bge _021E8CB4 - add r1, r6, #0 - bl sub_02012AC0 - pop {r4, r5, r6, pc} -_021E8CB4: - ldr r1, [sp, #0x10] - bl sub_02012AC0 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E8C94 - - thumb_func_start ov21_021E8CBC -ov21_021E8CBC: ; 0x021E8CBC - push {r4, r5, lr} - sub sp, #0x1c - add r5, r1, #0 - mov r1, #7 - mvn r1, r1 - add r4, r2, #0 - str r1, [sp] - mov r2, #4 - add r1, r5, #0 - str r2, [sp, #4] - add r1, #0x28 - str r1, [sp, #8] - str r3, [sp, #0xc] - str r2, [sp, #0x10] - mov r1, #1 - str r1, [sp, #0x14] - add r1, r5, #0 - add r1, #0x2c - str r1, [sp, #0x18] - ldr r1, [r5, #0] - ldr r2, [r5, #4] - ldr r3, [r4, #0x10] - bl ov21_021E8BE8 - add sp, #0x1c - pop {r4, r5, pc} - thumb_func_end ov21_021E8CBC - - thumb_func_start ov21_021E8CF0 -ov21_021E8CF0: ; 0x021E8CF0 - ldr r1, _021E8D00 ; =0x021BF67C - ldr r2, [r1, #0x44] - mov r1, #1 - tst r2, r1 - beq _021E8CFC - str r1, [r0, #0x14] -_021E8CFC: - bx lr - nop -_021E8D00: .word 0x021BF67C - thumb_func_end ov21_021E8CF0 - - thumb_func_start ov21_021E8D04 -ov21_021E8D04: ; 0x021E8D04 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r1, #8] - bl ov21_021E33BC - cmp r0, #1 - bne _021E8D24 - mov r0, #0x40 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x90 - mov r3, #0xe4 - bl ov21_021E8D28 -_021E8D24: - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov21_021E8D04 - - thumb_func_start ov21_021E8D28 -ov21_021E8D28: ; 0x021E8D28 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r0, [r0, #0] - bl ov21_021D2574 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E8D28 - - thumb_func_start ov21_021E8D3C -ov21_021E8D3C: ; 0x021E8D3C - ldr r3, _021E8D44 ; =ov21_021DF7A0 - ldr r0, [r0, #0xc] - mov r1, #1 - bx r3 - ; .align 2, 0 -_021E8D44: .word ov21_021DF7A0 - thumb_func_end ov21_021E8D3C - - thumb_func_start ov21_021E8D48 -ov21_021E8D48: ; 0x021E8D48 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - mov r1, #0x7a - ldr r0, [r5, #0xc] - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x7a - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, [r5, #0x10] - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - ldr r0, [r5, #0x10] - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - ldr r1, _021E8DC8 ; =0x000001E7 - cmp r6, r1 - bne _021E8D86 - bl sub_02098988 - b _021E8D8C -_021E8D86: - mov r0, #1 - bl sub_02098988 -_021E8D8C: - add r0, r4, #0 - add r1, r5, #0 - bl ov21_021E8E0C - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - bl ov21_021E98D8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - mov r2, #0xa - mov r3, #0xf - bl ov21_021E98F8 - ldr r0, _021E8DCC ; =ov21_021E9828 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - mov r1, #7 - lsl r1, r1, #6 - str r0, [r4, r1] - add r0, r4, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021E8DC8: .word 0x000001E7 -_021E8DCC: .word ov21_021E9828 - thumb_func_end ov21_021E8D48 - - thumb_func_start ov21_021E8DD0 -ov21_021E8DD0: ; 0x021E8DD0 - push {r4, lr} - add r4, r0, #0 - bl ov21_021E900C - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E8DD0 - - thumb_func_start ov21_021E8DEC -ov21_021E8DEC: ; 0x021E8DEC - mov r1, #0x6e - lsl r1, r1, #2 - ldr r0, [r0, r1] - cmp r0, #4 - bne _021E8DFA - mov r0, #1 - bx lr -_021E8DFA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov21_021E8DEC - - thumb_func_start ov21_021E8E00 -ov21_021E8E00: ; 0x021E8E00 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov21_021E8E00 - - thumb_func_start ov21_021E8E04 -ov21_021E8E04: ; 0x021E8E04 - mov r2, #0x79 - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov21_021E8E04 - - thumb_func_start ov21_021E8E0C -ov21_021E8E0C: ; 0x021E8E0C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - ldr r1, [r4, #0xc] - add r5, r0, #0 - mov r0, #0x45 - bl sub_02006C24 - add r6, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - mov r2, #0 - bl sub_02074470 - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #0x10] - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - str r0, [r5, #0] - ldr r2, [r4, #0xc] - mov r0, #0x20 - add r1, #0x10 - bl sub_020095C4 - mov r1, #0x4e - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #0xc] - bl sub_02022014 - ldr r0, [r4, #0xc] - bl ov21_021E9A0C - ldr r0, [r4, #0xc] - mov r2, #0x30 - str r0, [sp] - ldr r0, [r4, #8] - ldr r1, [r4, #0x10] - mov r3, #0x48 - bl ov21_021E99E0 - str r0, [r5, #0xc] - ldr r0, [r4, #4] - str r0, [r5, #8] - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r5, r0] - str r0, [sp, #4] - ldr r0, [r5, #0] - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, [r4, #0xc] - str r0, [sp, #0x10] - add r0, sp, #4 - bl ov21_021D4C0C - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, #0] - ldr r1, [r4, #0xc] - bl ov21_021E90B0 - mov r1, #0x3f - add r2, r1, #0 - ldr r0, _021E9008 ; =0x04000050 - sub r2, #0x4f - bl sub_020BF578 - ldr r0, [r5, #0] - ldr r1, [r4, #0xc] - bl ov21_021E91B0 - str r0, [r5, #4] - mov r0, #0x4f - lsl r0, r0, #2 - ldr r1, [r4, #0xc] - add r0, r5, r0 - bl ov21_021E9208 - mov r1, #0x15 - lsl r1, r1, #4 - add r0, r5, r1 - sub r1, #0x14 - ldr r2, [r4, #0xc] - add r1, r5, r1 - add r3, r6, #0 - bl ov21_021D2B88 - mov r2, #0x15 - lsl r2, r2, #4 - mov r0, #2 - str r0, [sp] - add r1, r2, #0 - sub r1, #0x18 - add r0, r5, r2 - sub r2, #0x14 - ldr r1, [r5, r1] - ldr r3, [r4, #0xc] - add r2, r5, r2 - bl ov21_021D2D88 - ldr r0, [r4, #0x14] - mov r3, #0x15 - lsl r3, r3, #4 - str r0, [sp] - sub r1, r3, #4 - add r0, r5, r3 - add r3, #0x6c - ldr r1, [r5, r1] - ldr r2, [r4, #0xc] - ldr r3, [r5, r3] - bl ov21_021E9240 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0xac - mov r2, #0x20 - bl ov21_021D1858 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl ov21_021D2E44 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r2, [r5, r0] - add r0, #0x2b - cmp r2, r0 - bne _021E8F2C - cmp r7, #0 - ble _021E8F2C - mov r2, #0xb -_021E8F2C: - mov r1, #6 - lsl r1, r1, #6 - add r0, r5, r1 - sub r1, #0x44 - ldr r3, [r4, #0xc] - add r1, r5, r1 - bl ov21_021E9458 - mov r2, #6 - lsl r2, r2, #6 - add r1, r2, #0 - sub r1, #0x48 - add r0, r5, r2 - sub r2, #0x44 - ldr r1, [r5, r1] - ldr r3, [r4, #0xc] - add r2, r5, r2 - bl ov21_021E94B0 - mov r2, #0x67 - lsl r2, r2, #2 - str r6, [sp] - add r1, r2, #0 - add r0, r5, r2 - add r2, #0x20 - sub r1, #0x60 - ldr r2, [r5, r2] - ldr r3, [r4, #0xc] - add r1, r5, r1 - bl ov21_021E95BC - mov r2, #0x6f - lsl r2, r2, #2 - ldr r0, [r5, r2] - add r1, r2, #0 - str r0, [sp] - add r0, r2, #0 - sub r1, #0x84 - sub r0, #0x20 - sub r2, #0x80 - ldr r1, [r5, r1] - ldr r3, [r4, #0xc] - add r0, r5, r0 - add r2, r5, r2 - bl ov21_021E95F8 - mov r2, #0x69 - lsl r2, r2, #2 - add r0, r5, r2 - str r0, [sp] - add r1, r2, #0 - add r0, r2, #0 - sub r1, #0x6c - sub r0, #0x10 - sub r2, #0x68 - ldr r1, [r5, r1] - ldr r3, [r4, #0xc] - add r0, r5, r0 - add r2, r5, r2 - bl ov21_021E9504 - mov r3, #0x16 - lsl r3, r3, #4 - ldr r0, [r5, r3] - add r1, r3, #0 - str r0, [sp] - add r0, r3, #0 - sub r1, #0x14 - add r3, #0x5c - add r0, #0x34 - ldr r1, [r5, r1] - ldr r2, [r4, #0xc] - ldr r3, [r5, r3] - add r0, r5, r0 - bl ov21_021E9560 - ldr r0, [r5, #0] - ldr r1, [r4, #0xc] - add r2, r6, #0 - bl ov21_021E96A8 - ldr r0, [r5, #0] - ldr r1, [r4, #0xc] - add r2, r6, #0 - bl ov21_021E97C4 - mov r2, #0x6f - lsl r2, r2, #2 - ldr r0, [r5, #4] - ldr r1, [r4, #0xc] - ldr r2, [r5, r2] - bl ov21_021E9968 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x14] - add r0, r5, r0 - add r3, r6, #0 - bl ov21_021E9A40 - mov r0, #0x79 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E9008: .word 0x04000050 - thumb_func_end ov21_021E8E0C - - thumb_func_start ov21_021E900C -ov21_021E900C: ; 0x021E900C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x71 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov21_021E9AC8 - mov r0, #0x67 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov21_021E968C - mov r1, #0x67 - lsl r1, r1, #2 - add r0, r4, r1 - sub r1, #0x60 - add r1, r4, r1 - bl ov21_021E95EC - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov21_021E95B0 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov21_021E9554 - mov r0, #6 - lsl r0, r0, #6 - add r0, r4, r0 - bl ov21_021E94F8 - mov r1, #6 - lsl r1, r1, #6 - add r0, r4, r1 - sub r1, #0x44 - add r1, r4, r1 - bl ov21_021E94A4 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov21_021E92B0 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov21_021D2E1C - mov r1, #0x15 - lsl r1, r1, #4 - add r0, r4, r1 - sub r1, #0x14 - add r1, r4, r1 - bl ov21_021D2C58 - mov r0, #0x4f - lsl r0, r0, #2 - add r0, r4, r0 - bl ov21_021E9228 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021964 - ldr r0, [r4, #4] - bl ov21_021E91F0 - ldr r0, [r4, #0] - bl ov21_021E9194 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov21_021D4C6C - bl ov21_021E9A38 - pop {r4, pc} - thumb_func_end ov21_021E900C - - thumb_func_start ov21_021E90B0 -ov21_021E90B0: ; 0x021E90B0 - push {r4, r5, lr} - sub sp, #0x54 - ldr r3, _021E9188 ; =0x021E9F30 - add r5, r0, #0 - add r4, r1, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x38 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #1 - str r0, [r2, #0] - add r0, r5, #0 - bl sub_02019044 - add r0, r5, #0 - mov r1, #1 - add r2, sp, #0x38 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #1 - bl sub_02019EBC - ldr r3, _021E918C ; =0x021E9F14 - add r2, sp, #0x1c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #2 - str r0, [r2, #0] - add r0, r5, #0 - bl sub_02019044 - add r0, r5, #0 - mov r1, #2 - add r2, sp, #0x1c - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #2 - bl sub_02019EBC - mov r0, #0 - add r1, r0, #0 - bl sub_02019060 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - add r0, r5, #0 - mov r1, #0 - bl sub_02019044 - ldr r3, _021E9190 ; =0x021E9F4C - add r2, sp, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #3 - str r0, [r2, #0] - add r0, r5, #0 - bl sub_02019044 - add r0, r5, #0 - mov r1, #3 - add r2, sp, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - add r0, r5, #0 - mov r1, #3 - bl sub_02019EBC - add sp, #0x54 - pop {r4, r5, pc} - ; .align 2, 0 -_021E9188: .word 0x021E9F30 -_021E918C: .word 0x021E9F14 -_021E9190: .word 0x021E9F4C - thumb_func_end ov21_021E90B0 - - thumb_func_start ov21_021E9194 -ov21_021E9194: ; 0x021E9194 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #3 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov21_021E9194 - - thumb_func_start ov21_021E91B0 -ov21_021E91B0: ; 0x021E91B0 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - add r0, r1, #0 - mov r1, #1 - bl sub_0201A778 - add r4, r0, #0 - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xc - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - str r3, [sp, #0x10] - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201A954 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E91B0 - - thumb_func_start ov21_021E91F0 -ov21_021E91F0: ; 0x021E91F0 - push {r4, lr} - add r4, r0, #0 - bl sub_0201ACF4 - add r0, r4, #0 - bl sub_0201A8FC - add r0, r4, #0 - mov r1, #1 - bl sub_0201A928 - pop {r4, pc} - thumb_func_end ov21_021E91F0 - - thumb_func_start ov21_021E9208 -ov21_021E9208: ; 0x021E9208 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - mov r7, #8 -_021E9212: - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02009714 - add r4, r4, #1 - stmia r5!, {r0} - cmp r4, #4 - blt _021E9212 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E9208 - - thumb_func_start ov21_021E9228 -ov21_021E9228: ; 0x021E9228 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021E9230: - ldr r0, [r5, #0] - bl sub_02009754 - add r4, r4, #1 - stmia r5!, {r6} - cmp r4, #4 - blt _021E9230 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E9228 - - thumb_func_start ov21_021E9240 -ov21_021E9240: ; 0x021E9240 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - str r4, [sp, #4] - mov r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_0200A72C - str r0, [sp, #0xc] - ldr r0, [r5, #0] - str r0, [sp, #0x10] - mov r0, #0x3f - mvn r0, r0 - str r0, [sp, #0x14] - add r0, #0x38 - str r0, [sp, #0x18] - mov r0, #2 - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - mov r0, #1 - str r0, [sp, #0x24] - ldr r0, [sp, #0x40] - str r6, [sp, #0x28] - cmp r0, #0 - bne _021E9286 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021D172C - b _021E9290 -_021E9286: - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov21_021D170C -_021E9290: - add r4, r0, #0 - ldr r0, [sp, #0x40] - str r4, [sp, #8] - str r0, [sp] - add r0, r5, #0 - add r1, sp, #4 - mov r2, #0 - add r3, r7, #0 - bl ov21_021D22F8 - add r0, r4, #0 - bl ov21_021D4DA0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E9240 - - thumb_func_start ov21_021E92B0 -ov21_021E92B0: ; 0x021E92B0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021E92C2 - bl ov21_021D4D1C - mov r0, #0 - str r0, [r4, #8] -_021E92C2: - pop {r4, pc} - thumb_func_end ov21_021E92B0 - - thumb_func_start ov21_021E92C4 -ov21_021E92C4: ; 0x021E92C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r7, [sp, #0x3c] - str r3, [sp, #0x10] - str r7, [sp] - mov r3, #1 - add r6, r2, #0 - str r3, [sp, #4] - add r4, r1, #0 - str r6, [sp, #8] - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x28] - bl sub_0200985C - str r0, [r5, #0] - bl sub_0200A3DC - ldr r0, [r5, #0] - bl sub_02009D4C - str r7, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x10] - str r0, [sp, #8] - str r6, [sp, #0xc] - ldr r0, [r4, #4] - ldr r2, [sp, #0x2c] - mov r3, #0 - bl sub_020098B8 - str r0, [r5, #4] - bl sub_0200A640 - ldr r0, [r5, #4] - bl sub_02009D4C - str r7, [sp] - mov r0, #2 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #8] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x30] - mov r3, #1 - bl sub_02009918 - str r0, [r5, #8] - str r7, [sp] - mov r0, #3 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #0xc] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x34] - mov r3, #1 - bl sub_02009918 - str r0, [r5, #0xc] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E92C4 - - thumb_func_start ov21_021E9344 -ov21_021E9344: ; 0x021E9344 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r7, [sp, #0x3c] - str r3, [sp, #0x10] - str r7, [sp] - mov r3, #1 - add r6, r2, #0 - str r3, [sp, #4] - add r4, r1, #0 - str r6, [sp, #8] - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x28] - bl sub_02009A4C - str r0, [r5, #0] - bl sub_0200A3DC - ldr r0, [r5, #0] - bl sub_02009D4C - str r7, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x10] - str r0, [sp, #8] - str r6, [sp, #0xc] - ldr r0, [r4, #4] - ldr r2, [sp, #0x2c] - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #4] - bl sub_0200A640 - ldr r0, [r5, #4] - bl sub_02009D4C - str r7, [sp] - mov r0, #2 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #8] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x30] - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #8] - str r7, [sp] - mov r0, #3 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #0xc] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x34] - mov r3, #1 - bl sub_02009BC4 - str r0, [r5, #0xc] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E9344 - - thumb_func_start ov21_021E93C4 -ov21_021E93C4: ; 0x021E93C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl sub_0200A4E4 - ldr r0, [r5, #4] - bl sub_0200A6DC - ldr r0, [r4, #0] - ldr r1, [r5, #0] - bl sub_02009D68 - ldr r0, [r4, #4] - ldr r1, [r5, #4] - bl sub_02009D68 - ldr r0, [r4, #8] - ldr r1, [r5, #8] - bl sub_02009D68 - ldr r0, [r4, #0xc] - ldr r1, [r5, #0xc] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E93C4 - - thumb_func_start ov21_021E93F8 -ov21_021E93F8: ; 0x021E93F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r7, r2, #0 - add r6, r3, #0 - bl sub_02009E08 - str r0, [sp, #0x2c] - ldr r0, [r5, #4] - bl sub_02009E08 - str r0, [sp, #0x30] - ldr r0, [r5, #8] - bl sub_02009E08 - str r0, [sp, #0x34] - ldr r0, [r5, #0xc] - bl sub_02009E08 - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r6, [sp, #0x10] - ldr r1, [r4, #0] - ldr r2, [sp, #0x30] - str r1, [sp, #0x14] - ldr r1, [r4, #4] - ldr r3, [sp, #0x34] - str r1, [sp, #0x18] - ldr r1, [r4, #8] - str r1, [sp, #0x1c] - ldr r1, [r4, #0xc] - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r1, [sp, #0x2c] - add r0, r7, #0 - bl sub_020093B4 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E93F8 - - thumb_func_start ov21_021E9458 -ov21_021E9458: ; 0x021E9458 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r2, #0 - add r5, r0, #0 - str r1, [sp, #0x18] - str r3, [sp, #0x1c] - bl ov21_021D1F90 - str r0, [sp, #0x20] - add r0, r4, #0 - bl ov21_021D1F94 - add r4, r0, #0 - bl ov21_021D1F98 - add r6, r0, #0 - bl ov21_021D1F9C - add r7, r0, #0 - bl ov21_021D1FA0 - str r4, [sp] - str r6, [sp, #4] - str r7, [sp, #8] - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #0xfa - lsl r0, r0, #4 - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r0, r5, #4 - bl ov21_021E92C4 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E9458 - - thumb_func_start ov21_021E94A4 -ov21_021E94A4: ; 0x021E94A4 - ldr r3, _021E94AC ; =ov21_021E93C4 - add r0, r0, #4 - bx r3 - nop -_021E94AC: .word ov21_021E93C4 - thumb_func_end ov21_021E94A4 - - thumb_func_start ov21_021E94B0 -ov21_021E94B0: ; 0x021E94B0 - push {r3, r4, r5, r6, lr} - sub sp, #0x44 - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - add r1, r2, #0 - add r0, r5, #4 - add r2, sp, #0 - mov r3, #2 - bl ov21_021E93F8 - add r0, sp, #0 - str r0, [sp, #0x28] - mov r0, #1 - str r0, [sp, #0x3c] - mov r0, #0x20 - str r0, [sp, #0x38] - mov r0, #0x1e - lsl r0, r0, #0xe - str r0, [sp, #0x2c] - mov r0, #0x16 - lsl r0, r0, #0xe - str r0, [sp, #0x30] - add r0, sp, #0x24 - str r4, [sp, #0x24] - str r6, [sp, #0x40] - bl sub_02021B90 - str r0, [r5, #0] - cmp r0, #0 - bne _021E94F2 - bl sub_02022974 -_021E94F2: - add sp, #0x44 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E94B0 - - thumb_func_start ov21_021E94F8 -ov21_021E94F8: ; 0x021E94F8 - ldr r3, _021E9500 ; =sub_02021BD4 - ldr r0, [r0, #0] - bx r3 - nop -_021E9500: .word sub_02021BD4 - thumb_func_end ov21_021E94F8 - - thumb_func_start ov21_021E9504 -ov21_021E9504: ; 0x021E9504 - push {r3, r4, r5, r6, lr} - sub sp, #0x44 - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - add r1, r2, #0 - ldr r0, [sp, #0x58] - add r2, sp, #0 - mov r3, #2 - bl ov21_021E93F8 - add r0, sp, #0 - str r0, [sp, #0x28] - mov r0, #1 - str r0, [sp, #0x3c] - mov r0, #0x20 - str r0, [sp, #0x38] - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [sp, #0x2c] - mov r0, #0xd - lsl r0, r0, #0xe - str r0, [sp, #0x30] - add r0, sp, #0x24 - str r4, [sp, #0x24] - str r6, [sp, #0x40] - bl sub_02021B90 - str r0, [r5, #0] - cmp r0, #0 - bne _021E9546 - bl sub_02022974 -_021E9546: - ldr r0, [r5, #0] - mov r1, #0x11 - bl sub_02021D6C - add sp, #0x44 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E9504 - - thumb_func_start ov21_021E9554 -ov21_021E9554: ; 0x021E9554 - ldr r3, _021E955C ; =sub_02021BD4 - ldr r0, [r0, #0] - bx r3 - nop -_021E955C: .word sub_02021BD4 - thumb_func_end ov21_021E9554 - - thumb_func_start ov21_021E9560 -ov21_021E9560: ; 0x021E9560 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r1, #0 - add r5, r0, #0 - add r0, r7, #0 - add r1, r3, #0 - add r6, r2, #0 - bl ov21_021DF30C - add r4, r0, #0 - ldr r0, [sp, #0x40] - str r7, [sp] - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #8] - ldr r0, [r5, #0] - str r0, [sp, #0xc] - mov r0, #0x4d - mvn r0, r0 - str r0, [sp, #0x10] - add r0, #0x46 - str r0, [sp, #0x14] - mov r0, #2 - str r0, [sp, #0x18] - mov r0, #0x1f - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x20] - str r6, [sp, #0x24] - str r4, [sp, #4] - add r0, sp, #0 - bl ov21_021D4CA0 - str r0, [r5, #4] - add r0, r4, #0 - bl ov21_021D4DA0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov21_021E9560 - - thumb_func_start ov21_021E95B0 -ov21_021E95B0: ; 0x021E95B0 - ldr r3, _021E95B8 ; =ov21_021D4D1C - ldr r0, [r0, #4] - bx r3 - nop -_021E95B8: .word ov21_021D4D1C - thumb_func_end ov21_021E95B0 - - thumb_func_start ov21_021E95BC -ov21_021E95BC: ; 0x021E95BC - push {r3, lr} - sub sp, #0x18 - mov r2, #0x5a - str r2, [sp] - mov r2, #0xd - str r2, [sp, #4] - mov r2, #0x58 - str r2, [sp, #8] - mov r2, #0x59 - str r2, [sp, #0xc] - mov r2, #5 - str r2, [sp, #0x10] - ldr r2, _021E95E8 ; =0x00004268 - add r0, #8 - str r2, [sp, #0x14] - add r2, r3, #0 - ldr r3, [sp, #0x20] - bl ov21_021E9344 - add sp, #0x18 - pop {r3, pc} - nop -_021E95E8: .word 0x00004268 - thumb_func_end ov21_021E95BC - - thumb_func_start ov21_021E95EC -ov21_021E95EC: ; 0x021E95EC - ldr r3, _021E95F4 ; =ov21_021E93C4 - add r0, #8 - bx r3 - nop -_021E95F4: .word ov21_021E93C4 - thumb_func_end ov21_021E95EC - - thumb_func_start ov21_021E95F8 -ov21_021E95F8: ; 0x021E95F8 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r0, #0 - add r7, r1, #0 - ldr r0, [sp, #0x60] - mov r1, #6 - str r2, [sp] - str r3, [sp, #4] - bl sub_020759F0 - add r4, r0, #0 - ldr r0, [sp, #0x60] - mov r1, #7 - bl sub_020759F0 - add r6, r0, #0 - add r0, r4, #0 - bl ov21_021DF180 - add r4, r0, #0 - add r0, r6, #0 - bl ov21_021DF180 - add r6, r0, #0 - add r0, r5, #0 - ldr r1, [sp] - add r0, #8 - add r2, sp, #8 - mov r3, #2 - bl ov21_021E93F8 - add r0, sp, #8 - str r0, [sp, #0x30] - mov r0, #1 - str r0, [sp, #0x44] - mov r0, #0x20 - str r0, [sp, #0x40] - ldr r0, [sp, #4] - str r7, [sp, #0x2c] - str r0, [sp, #0x48] - mov r0, #0xaa - lsl r0, r0, #0xc - str r0, [sp, #0x34] - mov r0, #0x12 - lsl r0, r0, #0xe - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - add r1, r4, #0 - str r0, [r5, #0] - bl sub_02021D6C - cmp r4, r6 - beq _021E9684 - mov r0, #0x37 - lsl r0, r0, #0xe - str r0, [sp, #0x34] - mov r0, #0x12 - lsl r0, r0, #0xe - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - add r1, r6, #0 - str r0, [r5, #4] - bl sub_02021D6C - add sp, #0x4c - pop {r4, r5, r6, r7, pc} -_021E9684: - mov r0, #0 - str r0, [r5, #4] - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov21_021E95F8 - - thumb_func_start ov21_021E968C -ov21_021E968C: ; 0x021E968C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021E969A - bl sub_02021BD4 -_021E969A: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021E96A4 - bl sub_02021BD4 -_021E96A4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov21_021E968C - - thumb_func_start ov21_021E96A8 -ov21_021E96A8: ; 0x021E96A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r2, #0 - mov r2, #0 - add r5, r0, #0 - add r4, r1, #0 - str r2, [sp] - add r0, r6, #0 - mov r1, #6 - add r3, r2, #0 - str r4, [sp, #4] - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - str r4, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x21 - add r2, r5, #0 - mov r3, #3 - bl sub_020070E8 - str r4, [sp] - add r0, r6, #0 - mov r1, #0x32 - mov r2, #1 - add r3, sp, #0x10 - bl sub_020071D0 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r7, r0, #0 - ldrh r0, [r2] - mov r1, #3 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 - str r4, [sp] - add r0, r6, #0 - mov r1, #0x33 - mov r2, #1 - add r3, sp, #0x10 - bl sub_020071D0 - ldr r2, [sp, #0x10] - mov r1, #3 - str r1, [sp] - add r7, r0, #0 - ldrh r0, [r2] - mov r3, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 - add r0, r6, #0 - mov r1, #0x34 - mov r2, #1 - add r3, sp, #0x10 - str r4, [sp] - bl sub_020071D0 - add r7, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #8 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_020198C0 - add r0, r7, #0 - bl sub_020181C4 - str r4, [sp] - add r0, r6, #0 - mov r1, #0x36 - mov r2, #1 - add r3, sp, #0x10 - bl sub_020071D0 - add r4, r0, #0 - ldr r2, [sp, #0x10] - mov r0, #0x10 - str r0, [sp] - ldrh r0, [r2] - mov r1, #3 - mov r3, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - mov r1, #3 - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov21_021E96A8 - - thumb_func_start ov21_021E97C4 -ov21_021E97C4: ; 0x021E97C4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - add r4, r1, #0 - add r6, r2, #0 - str r0, [sp, #8] - str r4, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x21 - add r2, r5, #0 - mov r3, #2 - bl sub_020070E8 - str r4, [sp] - add r0, r6, #0 - mov r1, #0x39 - mov r2, #1 - add r3, sp, #0x10 - bl sub_020071D0 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r4, r0, #0 - ldrh r0, [r2] - mov r1, #2 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_020198C0 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - mov r1, #2 - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov21_021E97C4 - - thumb_func_start ov21_021E9828 -ov21_021E9828: ; 0x021E9828 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - mov r1, #0x6e - lsl r1, r1, #2 - ldr r0, [r4, r1] - cmp r0, #4 - bhi _021E98B4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E9844: ; jump table - .short _021E984E - _021E9844 - 2 ; case 0 - .short _021E985C - _021E9844 - 2 ; case 1 - .short _021E9874 - _021E9844 - 2 ; case 2 - .short _021E98A2 - _021E9844 - 2 ; case 3 - .short _021E98B4 - _021E9844 - 2 ; case 4 -_021E984E: - ldr r0, _021E98D4 ; =0x04000050 - mov r2, #0 - strh r2, [r0] - ldr r0, [r4, r1] - add r0, r0, #1 - str r0, [r4, r1] - b _021E98B4 -_021E985C: - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - bl ov21_021E9948 - cmp r0, #0 - beq _021E98B4 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _021E98B4 -_021E9874: - add r2, r1, #0 - add r2, #0x47 - str r2, [sp] - mov r0, #0 - str r0, [sp, #4] - add r1, r1, #4 - ldr r1, [r4, r1] - mov r0, #0xe - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - add r3, r2, #0 - bl sub_020059D0 - cmp r0, #0 - bne _021E9896 - bl sub_02022974 -_021E9896: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _021E98B4 -_021E98A2: - bl sub_0200598C - cmp r0, #0 - bne _021E98B4 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_021E98B4: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _021E98C6 - sub r0, #0x20 - add r0, r4, r0 - bl ov21_021E9A9C -_021E98C6: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020219F8 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_021E98D4: .word 0x04000050 - thumb_func_end ov21_021E9828 - - thumb_func_start ov21_021E98D8 -ov21_021E98D8: ; 0x021E98D8 - push {r4, lr} - mov r1, #0 - mov r3, #2 - add r2, r1, #0 - lsl r3, r3, #8 - add r4, r0, #0 - bl sub_02003070 - mov r3, #7 - add r0, r4, #0 - mov r1, #2 - mov r2, #0 - lsl r3, r3, #6 - bl sub_02003070 - pop {r4, pc} - thumb_func_end ov21_021E98D8 - - thumb_func_start ov21_021E98F8 -ov21_021E98F8: ; 0x021E98F8 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [sp, #0x20] - add r4, r3, #0 - str r0, [sp] - add r0, r1, #0 - add r1, r2, #0 - ldr r2, [sp, #0x18] - ldr r3, [sp, #0x1c] - bl sub_020086FC - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x1c] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x20] - lsl r3, r3, #0x18 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - ldr r2, _021E9944 ; =0x0000FFFF - add r0, r5, #0 - mov r1, #5 - asr r3, r3, #0x18 - bl sub_02003178 - add r0, r5, #0 - mov r1, #0 - bl sub_02003858 - add sp, #0xc - pop {r4, r5, pc} - nop -_021E9944: .word 0x0000FFFF - thumb_func_end ov21_021E98F8 - - thumb_func_start ov21_021E9948 -ov21_021E9948: ; 0x021E9948 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_0200384C - add r4, r0, #0 - add r0, r5, #0 - bl sub_020087B4 - cmp r4, #0 - bne _021E9964 - cmp r0, #0 - bne _021E9964 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E9964: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E9948 - - thumb_func_start ov21_021E9968 -ov21_021E9968: ; 0x021E9968 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, _021E9988 ; =0x00020100 - add r5, r0, #0 - str r1, [sp] - add r1, r2, #0 - add r2, r4, #0 - mov r3, #0 - bl ov21_021DEB8C - add r0, r5, #0 - add r1, r4, #0 - bl ov21_021E998C - pop {r3, r4, r5, pc} - nop -_021E9988: .word 0x00020100 - thumb_func_end ov21_021E9968 - - thumb_func_start ov21_021E998C -ov21_021E998C: ; 0x021E998C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - mov r0, #0x40 - add r4, r1, #0 - bl sub_02023790 - add r5, r0, #0 - ldr r2, _021E99DC ; =0x000002B9 - mov r0, #0 - mov r1, #0x1a - add r3, r4, #0 - bl sub_0200B144 - mov r1, #0x6e - add r2, r5, #0 - add r4, r0, #0 - bl sub_0200B1B8 - mov r1, #0 - str r1, [sp] - mov r0, #0xc1 - str r1, [sp, #4] - lsl r0, r0, #0xa - str r0, [sp, #8] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0x20 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B190 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021E99DC: .word 0x000002B9 - thumb_func_end ov21_021E998C - - thumb_func_start ov21_021E99E0 -ov21_021E99E0: ; 0x021E99E0 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r5, r0, #0 - add r4, r2, #0 - add r0, sp, #0x10 - mov r2, #2 - add r6, r3, #0 - bl sub_02075EF4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, sp, #0x10 - add r2, r4, #0 - add r3, r6, #0 - bl sub_02007C34 - add sp, #0x20 - pop {r4, r5, r6, pc} - thumb_func_end ov21_021E99E0 - - thumb_func_start ov21_021E9A0C -ov21_021E9A0C: ; 0x021E9A0C - push {r3, r4, r5, lr} - sub sp, #0x10 - ldr r4, _021E9A30 ; =0x021E9F04 - add r3, sp, #0 - add r5, r0, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - ldr r1, _021E9A34 ; =0x00200010 - mov r2, #0x10 - str r5, [sp, #0xc] - bl sub_0201E88C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E9A30: .word 0x021E9F04 -_021E9A34: .word 0x00200010 - thumb_func_end ov21_021E9A0C - - thumb_func_start ov21_021E9A38 -ov21_021E9A38: ; 0x021E9A38 - ldr r3, _021E9A3C ; =sub_0201E958 - bx r3 - ; .align 2, 0 -_021E9A3C: .word sub_0201E958 - thumb_func_end ov21_021E9A38 - - thumb_func_start ov21_021E9A40 -ov21_021E9A40: ; 0x021E9A40 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - cmp r2, #0 - bne _021E9A5C - add r2, r5, #0 - add r0, r6, #0 - mov r1, #0x17 - add r2, #8 - add r3, r4, #0 - bl sub_020071EC - b _021E9A6A -_021E9A5C: - add r2, r5, #0 - add r0, r6, #0 - mov r1, #0x18 - add r2, #8 - add r3, r4, #0 - bl sub_020071EC -_021E9A6A: - add r2, r5, #0 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x1a - add r2, #0xc - add r3, r4, #0 - bl sub_020071EC - str r0, [r5, #4] - mov r1, #0 - str r1, [r5, #0x10] - str r1, [r5, #0x1c] - add r2, r5, #0 -_021E9A84: - add r1, r1, #1 - lsl r0, r1, #4 - str r0, [r2, #0x14] - add r2, r2, #4 - cmp r1, #2 - blt _021E9A84 - ldr r1, [r5, #0x1c] - add r0, r5, #0 - bl ov21_021E9AE8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov21_021E9A40 - - thumb_func_start ov21_021E9A9C -ov21_021E9A9C: ; 0x021E9A9C - push {r3, lr} - ldr r3, [r0, #0x1c] - lsl r1, r3, #2 - add r1, r0, r1 - ldr r2, [r1, #0x14] - ldr r1, [r0, #0x10] - cmp r2, r1 - bgt _021E9AC2 - add r1, r3, #1 - str r1, [r0, #0x1c] - cmp r1, #2 - blt _021E9ABA - mov r1, #0 - str r1, [r0, #0x1c] - str r1, [r0, #0x10] -_021E9ABA: - ldr r1, [r0, #0x1c] - bl ov21_021E9B08 - pop {r3, pc} -_021E9AC2: - add r1, r1, #1 - str r1, [r0, #0x10] - pop {r3, pc} - thumb_func_end ov21_021E9A9C - - thumb_func_start ov21_021E9AC8 -ov21_021E9AC8: ; 0x021E9AC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E9ACE: - ldr r0, [r5, #0] - bl sub_020181C4 - add r4, r4, #1 - cmp r4, #2 - blt _021E9ACE - add r0, r5, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov21_021E9AC8 - - thumb_func_start ov21_021E9AE8 -ov21_021E9AE8: ; 0x021E9AE8 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r4, r1, #2 - add r5, #8 - ldr r0, [r5, r4] - mov r1, #0x20 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [r5, r4] - mov r1, #0 - ldr r0, [r0, #0xc] - mov r2, #0x20 - bl sub_020C00B4 - pop {r3, r4, r5, pc} - thumb_func_end ov21_021E9AE8 - - thumb_func_start ov21_021E9B08 -ov21_021E9B08: ; 0x021E9B08 - push {r3, lr} - add r2, r1, #0 - add r3, r0, #0 - lsl r2, r2, #2 - add r2, r3, r2 - ldr r2, [r2, #8] - mov r0, #0xf - ldr r2, [r2, #0xc] - mov r1, #0 - mov r3, #0x20 - bl sub_0201DC68 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov21_021E9B08 - ; 0x021E9B24 - - - .rodata - .incbin "incbin/overlay21_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay22.s b/asm/overlay22.s deleted file mode 100644 index d6664c723..000000000 --- a/asm/overlay22.s +++ /dev/null @@ -1,14917 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov22_02254DE0 -ov22_02254DE0: ; 0x02254DE0 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r5, r0, #0 - add r0, r7, #0 - mov r1, #8 - bl sub_02018144 - lsl r6, r5, #3 - add r4, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl sub_02018144 - mov r1, #0 - add r2, r6, #0 - str r0, [r4, #0] - bl sub_020D5124 - str r5, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02254DE0 - - thumb_func_start ov22_02254E0C -ov22_02254E0C: ; 0x02254E0C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02254E0C - - thumb_func_start ov22_02254E20 -ov22_02254E20: ; 0x02254E20 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov22_02254FE0 - add r4, r0, #0 - bne _02254E32 - bl sub_02022974 -_02254E32: - ldr r0, [r5, #0x18] - str r0, [r4, #0] - add r0, r5, #0 - bl ov22_0225500C - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02254E20 - - thumb_func_start ov22_02254E44 -ov22_02254E44: ; 0x02254E44 - push {r3, lr} - add r1, sp, #0 - bl ov22_02255040 - add r0, sp, #0 - bl sub_02022734 - pop {r3, pc} - thumb_func_end ov22_02254E44 - - thumb_func_start ov22_02254E54 -ov22_02254E54: ; 0x02254E54 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - add r6, r1, #0 - str r2, [sp] - add r7, r3, #0 - bl ov22_02254E44 - cmp r0, #0 - bne _02254E6E - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02254E6E: - add r0, r4, #0 - add r1, sp, #8 - add r2, sp, #4 - bl ov22_02254F00 - ldr r0, _02254ED8 ; =0x021BF6BC - ldr r1, [sp, #8] - ldrh r2, [r0, #0x1c] - sub r1, r2, r1 - str r1, [r6, #0] - ldrh r1, [r0, #0x1e] - ldr r0, [sp, #4] - sub r1, r1, r0 - ldr r0, [sp] - sub r4, r1, #4 - str r1, [r0, #0] - add r0, r1, #4 - cmp r4, r0 - bge _02254ED2 -_02254E94: - cmp r4, #0 - blt _02254EC6 - ldr r0, [r6, #0] - sub r5, r0, #4 - add r0, r0, #4 - cmp r5, r0 - bge _02254EC6 -_02254EA2: - cmp r5, #0 - blt _02254EBC - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov22_02255420 - cmp r0, #0 - bne _02254EBC - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02254EBC: - ldr r0, [r6, #0] - add r5, r5, #1 - add r0, r0, #4 - cmp r5, r0 - blt _02254EA2 -_02254EC6: - ldr r0, [sp] - add r4, r4, #1 - ldr r0, [r0, #0] - add r0, r0, #4 - cmp r4, r0 - blt _02254E94 -_02254ED2: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02254ED8: .word 0x021BF6BC - thumb_func_end ov22_02254E54 - - thumb_func_start ov22_02254EDC -ov22_02254EDC: ; 0x02254EDC - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - add r1, sp, #0 - bl ov22_02255040 - add r0, sp, #0 - add r1, r5, #0 - add r2, r4, #0 - bl sub_02022830 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02254EDC - - thumb_func_start ov22_02254EF4 -ov22_02254EF4: ; 0x02254EF4 - ldr r3, _02254EFC ; =sub_02015254 - ldr r0, [r0, #4] - bx r3 - nop -_02254EFC: .word sub_02015254 - thumb_func_end ov22_02254EF4 - - thumb_func_start ov22_02254F00 -ov22_02254F00: ; 0x02254F00 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r0, [r0, #4] - add r5, r1, #0 - add r4, r2, #0 - bl sub_0201525C - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #4 - ldrsh r0, [r1, r0] - str r0, [r5, #0] - mov r0, #6 - ldrsh r0, [r1, r0] - str r0, [r4, #0] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02254F00 - - thumb_func_start ov22_02254F30 -ov22_02254F30: ; 0x02254F30 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r0, [r0, #4] - add r5, r1, #0 - add r4, r2, #0 - bl sub_02015280 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #4 - ldrsh r0, [r1, r0] - str r0, [r5, #0] - mov r0, #6 - ldrsh r0, [r1, r0] - str r0, [r4, #0] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02254F30 - - thumb_func_start ov22_02254F60 -ov22_02254F60: ; 0x02254F60 - ldr r3, _02254F68 ; =sub_02015240 - ldr r0, [r0, #4] - bx r3 - nop -_02254F68: .word sub_02015240 - thumb_func_end ov22_02254F60 - - thumb_func_start ov22_02254F6C -ov22_02254F6C: ; 0x02254F6C - ldr r3, _02254F74 ; =sub_0201528C - ldr r0, [r0, #4] - bx r3 - nop -_02254F74: .word sub_0201528C - thumb_func_end ov22_02254F6C - - thumb_func_start ov22_02254F78 -ov22_02254F78: ; 0x02254F78 - ldr r3, _02254F80 ; =sub_02015290 - ldr r0, [r0, #4] - bx r3 - nop -_02254F80: .word sub_02015290 - thumb_func_end ov22_02254F78 - - thumb_func_start ov22_02254F84 -ov22_02254F84: ; 0x02254F84 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r2, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02254F30 - ldr r0, [sp, #4] - cmp r0, #0x10 - beq _02254FA4 - cmp r0, #0x20 - beq _02254FAA - cmp r0, #0x40 - beq _02254FB0 - b _02254FB4 -_02254FA4: - mov r0, #0 - str r0, [r5, #0] - b _02254FB4 -_02254FAA: - mov r0, #0xa - str r0, [r5, #0] - b _02254FB4 -_02254FB0: - mov r0, #0x14 - str r0, [r5, #0] -_02254FB4: - ldr r0, [sp] - cmp r0, #0x10 - beq _02254FC6 - cmp r0, #0x20 - beq _02254FCE - cmp r0, #0x40 - beq _02254FD6 - add sp, #8 - pop {r3, r4, r5, pc} -_02254FC6: - mov r0, #0 - add sp, #8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02254FCE: - mov r0, #0xa - add sp, #8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02254FD6: - mov r0, #0x14 - str r0, [r4, #0] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02254F84 - - thumb_func_start ov22_02254FE0 -ov22_02254FE0: ; 0x02254FE0 - push {r3, r4} - ldr r4, [r0, #4] - mov r1, #0 - cmp r4, #0 - ble _02255004 - ldr r3, [r0, #0] - add r2, r3, #0 -_02254FEE: - ldr r0, [r2, #4] - cmp r0, #0 - bne _02254FFC - lsl r0, r1, #3 - add r0, r3, r0 - pop {r3, r4} - bx lr -_02254FFC: - add r1, r1, #1 - add r2, #8 - cmp r1, r4 - blt _02254FEE -_02255004: - mov r0, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov22_02254FE0 - - thumb_func_start ov22_0225500C -ov22_0225500C: ; 0x0225500C - push {r3, lr} - sub sp, #0x20 - ldr r1, [r0, #4] - mov r3, #0 - str r1, [sp] - ldr r1, [r0, #8] - str r1, [sp, #4] - ldr r1, [r0, #0xc] - str r1, [sp, #8] - ldr r2, [r0, #0x10] - add r1, sp, #0 - strh r2, [r1, #0xc] - ldr r2, [r0, #0x14] - strh r2, [r1, #0xe] - strh r3, [r1, #0x10] - mov r2, #0x1f - str r2, [sp, #0x14] - str r3, [sp, #0x18] - ldr r0, [r0, #0x1c] - strh r0, [r1, #0x1c] - add r0, sp, #0 - bl sub_02015214 - add sp, #0x20 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_0225500C - - thumb_func_start ov22_02255040 -ov22_02255040: ; 0x02255040 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - bl sub_0201525C - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldr r0, [r5, #4] - bl sub_02015280 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #8] - ldrh r0, [r1, #2] - strh r0, [r1, #0xa] - mov r0, #0xe - ldrsh r2, [r1, r0] - mov r0, #0xa - strb r2, [r4] - ldrsh r0, [r1, r0] - add r0, r2, r0 - strb r0, [r4, #1] - mov r0, #0xc - ldrsh r2, [r1, r0] - mov r0, #8 - strb r2, [r4, #2] - ldrsh r0, [r1, r0] - add r0, r2, r0 - strb r0, [r4, #3] - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02255040 - - thumb_func_start ov22_02255094 -ov22_02255094: ; 0x02255094 - push {r3, lr} - bl ov22_02255634 - bl ov22_02255654 - bl ov22_022556DC - ldr r0, _022550B0 ; =0x021BF6DC - mov r1, #1 - strb r1, [r0, #5] - bl sub_0201FFE8 - pop {r3, pc} - nop -_022550B0: .word 0x021BF6DC - thumb_func_end ov22_02255094 - - thumb_func_start ov22_022550B4 -ov22_022550B4: ; 0x022550B4 - push {r3, lr} - ldr r0, _022550D0 ; =0x021BF6DC - mov r1, #0 - strb r1, [r0, #5] - bl sub_0201FFE8 - bl ov22_02255738 - bl ov22_0225572C - bl sub_020BED0C - pop {r3, pc} - nop -_022550D0: .word 0x021BF6DC - thumb_func_end ov22_022550B4 - - thumb_func_start ov22_022550D4 -ov22_022550D4: ; 0x022550D4 - push {r4, lr} - sub sp, #0x10 - ldr r3, _02255130 ; =0x0225BD98 - add r2, sp, #0 - add r4, r0, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0x19 - mov r1, #0xe - bl sub_02006C24 - mov r1, #6 - lsl r1, r1, #6 - str r0, [r4, r1] - add r0, r4, #0 - add r1, sp, #0 - bl ov22_02255748 - mov r2, #0xa - add r0, r4, #0 - mov r1, #0xe - lsl r2, r2, #0xa - mov r3, #0x20 - bl ov22_02255C24 - add r0, r4, #0 - bl ov22_022559B4 - add r0, r4, #0 - mov r1, #0xd - bl ov22_02255BF4 - add r0, r4, #0 - bl ov22_022559F8 - mov r0, #0xe - bl sub_02018340 - str r0, [r4, #0x40] - add r0, r4, #0 - bl ov22_02255860 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_02255130: .word 0x0225BD98 - thumb_func_end ov22_022550D4 - - thumb_func_start ov22_02255134 -ov22_02255134: ; 0x02255134 - push {r4, lr} - add r4, r0, #0 - bl ov22_02255C14 - add r0, r4, #0 - bl ov22_02255784 - add r0, r4, #0 - bl ov22_02255984 - ldr r0, [r4, #0x40] - bl sub_020181C4 - add r0, r4, #0 - bl ov22_02255C90 - add r0, r4, #0 - bl ov22_02255A98 - add r0, r4, #0 - bl ov22_022559E0 - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02006CA8 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #0x10] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x10] - pop {r4, pc} - thumb_func_end ov22_02255134 - - thumb_func_start ov22_02255180 -ov22_02255180: ; 0x02255180 - push {r4, lr} - add r4, r0, #0 - bl sub_020241B4 - bl sub_020A73C0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _02255198 - add r0, r4, #0 - bl ov22_02255794 -_02255198: - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _022551A4 - ldr r0, [r4, #0x20] - bl sub_02007768 -_022551A4: - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - add r0, r4, #0 - bl ov22_02255AC0 - pop {r4, pc} - thumb_func_end ov22_02255180 - - thumb_func_start ov22_022551B4 -ov22_022551B4: ; 0x022551B4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - ldr r2, [r4, #4] - add r5, r0, #0 - bl ov22_022557A0 - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - add r0, r5, #0 - bl ov22_02255800 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_022551B4 - - thumb_func_start ov22_022551D0 -ov22_022551D0: ; 0x022551D0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_0201517C - ldr r0, [r4, #0] - bl sub_020151EC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022551D0 - - thumb_func_start ov22_022551E4 -ov22_022551E4: ; 0x022551E4 - push {r4, r5, r6, lr} - sub sp, #0x70 - add r5, r0, #0 - mov r0, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - add r4, r2, #0 - ldr r2, [r5, #0x48] - add r6, r3, #0 - str r2, [sp, #0x14] - ldr r2, [r5, #0x4c] - add r3, r1, #0 - str r2, [sp, #0x18] - ldr r2, [r5, #0x50] - str r2, [sp, #0x1c] - ldr r2, [r5, #0x54] - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x4c - add r2, r1, #0 - bl sub_020093B4 - ldr r0, [r5, #0x44] - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - lsl r0, r4, #0xc - str r0, [sp, #0x34] - lsl r0, r6, #0xc - str r0, [sp, #0x38] - mov r0, #0 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x80] - str r0, [sp, #0x40] - ldr r0, [sp, #0x84] - str r0, [sp, #0x44] - mov r0, #0xe - str r0, [sp, #0x48] - add r0, sp, #0x2c - bl sub_02021B90 - add sp, #0x70 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_022551E4 - - thumb_func_start ov22_02255248 -ov22_02255248: ; 0x02255248 - push {r3, r4, lr} - sub sp, #0xc - ldr r4, [sp, #0x1c] - str r4, [sp] - ldr r4, [sp, #0x18] - str r4, [sp, #4] - mov r4, #0xe - str r4, [sp, #8] - ldr r0, [r0, #0x48] - bl sub_02009A4C - bl sub_0200A3DC - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02255248 - - thumb_func_start ov22_02255268 -ov22_02255268: ; 0x02255268 - push {r4, lr} - sub sp, #0x10 - ldr r4, [sp, #0x20] - str r4, [sp] - ldr r4, [sp, #0x18] - str r4, [sp, #4] - ldr r4, [sp, #0x1c] - str r4, [sp, #8] - mov r4, #0xe - str r4, [sp, #0xc] - ldr r0, [r0, #0x4c] - bl sub_02009B04 - bl sub_0200A640 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02255268 - - thumb_func_start ov22_0225528C -ov22_0225528C: ; 0x0225528C - push {r3, r4, lr} - sub sp, #0xc - ldr r4, [sp, #0x18] - str r4, [sp] - mov r4, #2 - str r4, [sp, #4] - mov r4, #0xe - str r4, [sp, #8] - ldr r0, [r0, #0x50] - bl sub_02009BC4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225528C - - thumb_func_start ov22_022552A8 -ov22_022552A8: ; 0x022552A8 - push {r3, r4, lr} - sub sp, #0xc - ldr r4, [sp, #0x18] - str r4, [sp] - mov r4, #3 - str r4, [sp, #4] - mov r4, #0xe - str r4, [sp, #8] - ldr r0, [r0, #0x54] - bl sub_02009BC4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022552A8 - - thumb_func_start ov22_022552C4 -ov22_022552C4: ; 0x022552C4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x48] - bl sub_02009DC8 - add r1, r0, #0 - ldr r0, [r4, #0x48] - bl sub_02009D68 - pop {r4, pc} - thumb_func_end ov22_022552C4 - - thumb_func_start ov22_022552D8 -ov22_022552D8: ; 0x022552D8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x4c] - bl sub_02009DC8 - add r1, r0, #0 - ldr r0, [r4, #0x4c] - bl sub_02009D68 - pop {r4, pc} - thumb_func_end ov22_022552D8 - - thumb_func_start ov22_022552EC -ov22_022552EC: ; 0x022552EC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - bl sub_02009DC8 - add r1, r0, #0 - ldr r0, [r4, #0x50] - bl sub_02009D68 - pop {r4, pc} - thumb_func_end ov22_022552EC - - thumb_func_start ov22_02255300 -ov22_02255300: ; 0x02255300 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x54] - bl sub_02009DC8 - add r1, r0, #0 - ldr r0, [r4, #0x54] - bl sub_02009D68 - pop {r4, pc} - thumb_func_end ov22_02255300 - - thumb_func_start ov22_02255314 -ov22_02255314: ; 0x02255314 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0x76 - mov r2, #0x13 - mov r3, #0xe - bl ov22_02255CB8 - add r0, r5, #0 - add r1, r4, #0 - bl ov22_02255ACC - add r0, r5, #0 - add r1, r4, #0 - bl ov22_02255B50 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02255314 - - thumb_func_start ov22_02255338 -ov22_02255338: ; 0x02255338 - ldr r3, _0225533C ; =ov22_02255D0C - bx r3 - ; .align 2, 0 -_0225533C: .word ov22_02255D0C - thumb_func_end ov22_02255338 - - thumb_func_start ov22_02255340 -ov22_02255340: ; 0x02255340 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, [r4, #0x34] - add r6, r1, #0 - add r5, r2, #0 - bl sub_02022A1C - ldr r1, [r4, #0x38] - lsl r5, r5, #2 - add r0, r6, #0 - add r1, r1, r5 - bl sub_020A7118 - ldr r0, [r4, #0x38] - ldr r0, [r0, r5] - pop {r4, r5, r6, pc} - thumb_func_end ov22_02255340 - - thumb_func_start ov22_02255360 -ov22_02255360: ; 0x02255360 - push {r3, r4} - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _0225538C ; =0xFFFF1FFF - add r3, r0, #0 - and r1, r2 - str r1, [r0, #0] - add r3, #8 - ldrh r4, [r3] - mov r2, #3 - mov r1, #1 - bic r4, r2 - orr r1, r4 - add r0, #0xa - strh r1, [r3] - ldrh r1, [r0] - bic r1, r2 - strh r1, [r0] - pop {r3, r4} - bx lr - nop -_0225538C: .word 0xFFFF1FFF - thumb_func_end ov22_02255360 - - thumb_func_start ov22_02255390 -ov22_02255390: ; 0x02255390 - push {r3, r4} - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _022553EC ; =0xFFFF1FFF - add r3, r0, #0 - and r2, r1 - lsr r1, r0, #0xd - orr r1, r2 - str r1, [r0, #0] - add r3, #0x48 - ldrh r4, [r3] - mov r2, #0x3f - mov r1, #0x1f - bic r4, r2 - orr r1, r4 - strh r1, [r3] - add r3, r0, #0 - add r3, #0x4a - ldrh r4, [r3] - mov r1, #0x12 - bic r4, r2 - orr r1, r4 - strh r1, [r3] - add r1, r0, #0 - ldr r2, _022553F0 ; =0x00000AF6 - add r1, #0x40 - strh r2, [r1] - add r1, r0, #0 - ldr r2, _022553F4 ; =0x0000128F - add r1, #0x44 - strh r2, [r1] - add r2, r0, #0 - add r2, #8 - ldrh r3, [r2] - mov r1, #3 - add r0, #0xa - bic r3, r1 - strh r3, [r2] - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - pop {r3, r4} - bx lr - ; .align 2, 0 -_022553EC: .word 0xFFFF1FFF -_022553F0: .word 0x00000AF6 -_022553F4: .word 0x0000128F - thumb_func_end ov22_02255390 - - thumb_func_start ov22_022553F8 -ov22_022553F8: ; 0x022553F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - bl sub_0201C2B8 - ldr r0, [r4, #0x20] - bl sub_02008A94 - bl sub_0200A858 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022553F8 - - thumb_func_start ov22_02255410 -ov22_02255410: ; 0x02255410 - push {r3, lr} - add r3, r1, #0 - mov r1, #0x76 - mov r2, #0x13 - bl ov22_02255CB8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_02255410 - - thumb_func_start ov22_02255420 -ov22_02255420: ; 0x02255420 - push {r4, r5} - ldrh r5, [r0, #2] - ldrh r4, [r0] - lsl r5, r5, #3 - cmp r1, #0 - blt _0225543A - cmp r2, #0 - blt _0225543A - cmp r1, r5 - bge _0225543A - lsl r4, r4, #3 - cmp r2, r4 - blt _02255440 -_0225543A: - mov r0, #2 - pop {r4, r5} - bx lr -_02255440: - add r4, r2, #0 - mul r4, r5 - add r4, r1, r4 - lsr r5, r4, #0x1f - lsl r2, r4, #0x1d - sub r2, r2, r5 - mov r1, #0x1d - ror r2, r1 - add r1, r5, r2 - lsl r2, r1, #2 - add r1, r3, #0 - ldr r3, [r0, #0x14] - asr r0, r4, #2 - lsr r0, r0, #0x1d - add r0, r4, r0 - asr r0, r0, #3 - lsl r0, r0, #2 - ldr r3, [r3, r0] - mov r0, #0xf - lsl r0, r2 - lsl r1, r2 - and r0, r3 - cmp r1, r0 - bne _02255476 - mov r0, #1 - pop {r4, r5} - bx lr -_02255476: - mov r0, #0 - pop {r4, r5} - bx lr - thumb_func_end ov22_02255420 - - thumb_func_start ov22_0225547C -ov22_0225547C: ; 0x0225547C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - bl ov22_02255748 - mov r2, #0xa - add r0, r5, #0 - add r1, r4, #0 - lsl r2, r2, #0xa - mov r3, #0x20 - bl ov22_02255C24 - ldr r0, [r5, #0x20] - mov r1, #1 - bl sub_02008B2C - add r0, r5, #0 - add r1, r4, #0 - bl ov22_02255BF4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_0225547C - - thumb_func_start ov22_022554A8 -ov22_022554A8: ; 0x022554A8 - push {r4, r5, lr} - sub sp, #0x1c - ldr r3, _022554F4 ; =0x0225BDFC - add r5, r0, #0 - str r1, [r5, #0x40] - add r4, r2, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #2 - str r0, [r2, #0] - ldr r0, [r5, #0x40] - bl sub_02019044 - ldr r0, [r5, #0x40] - mov r1, #2 - add r2, sp, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - ldr r0, [r5, #0x40] - mov r1, #2 - bl sub_02019EBC - add sp, #0x1c - pop {r4, r5, pc} - nop -_022554F4: .word 0x0225BDFC - thumb_func_end ov22_022554A8 - - thumb_func_start ov22_022554F8 -ov22_022554F8: ; 0x022554F8 - push {r4, lr} - add r4, r0, #0 - bl ov22_02255C14 - add r0, r4, #0 - bl ov22_02255784 - add r0, r4, #0 - bl ov22_02255C90 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #0x10] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x10] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022554F8 - - thumb_func_start ov22_02255524 -ov22_02255524: ; 0x02255524 - ldr r3, _0225552C ; =sub_02019044 - ldr r0, [r0, #0x40] - mov r1, #2 - bx r3 - ; .align 2, 0 -_0225552C: .word sub_02019044 - thumb_func_end ov22_02255524 - - thumb_func_start ov22_02255530 -ov22_02255530: ; 0x02255530 - ldr r3, _02255538 ; =sub_02008A94 - ldr r0, [r0, #0x20] - bx r3 - nop -_02255538: .word sub_02008A94 - thumb_func_end ov22_02255530 - - thumb_func_start ov22_0225553C -ov22_0225553C: ; 0x0225553C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, _022555C0 ; =0x04000454 - str r3, [sp] - mov r1, #0 - str r1, [r0, #0] - sub r0, #0x10 - add r6, r2, #0 - ldr r7, [sp, #0x18] - str r1, [r0, #0] - bl sub_020A73C0 - ldr r1, _022555C4 ; =0x04000470 - lsl r0, r4, #0xc - str r0, [r1, #0] - lsl r0, r6, #0xc - str r0, [r1, #0] - mov r0, #0 - str r0, [r1, #0] - ldr r0, [sp] - ldr r1, _022555C8 ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r0, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r0, [r1, r0] - ldrsh r1, [r1, r2] - bl sub_020C0078 - ldr r2, [r7, #8] - ldr r1, [r7, #4] - ldr r3, [r7, #0] - ldr r0, _022555CC ; =0x0400046C - str r3, [r0, #0] - str r1, [r0, #0] - neg r1, r4 - str r2, [r0, #0] - lsl r1, r1, #0xc - str r1, [r0, #4] - neg r1, r6 - lsl r1, r1, #0xc - str r1, [r0, #4] - mov r1, #0 - str r1, [r0, #4] - sub r0, #0x28 - str r1, [r0, #0] - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _022555A8 - add r0, r5, #0 - bl ov22_02255794 -_022555A8: - ldr r0, [r5, #0x2c] - cmp r0, #0 - beq _022555B4 - ldr r0, [r5, #0x20] - bl sub_02007768 -_022555B4: - ldr r0, _022555D0 ; =0x04000448 - mov r1, #1 - str r1, [r0, #0] - str r1, [r0, #0] - pop {r3, r4, r5, r6, r7, pc} - nop -_022555C0: .word 0x04000454 -_022555C4: .word 0x04000470 -_022555C8: .word 0x020F983C -_022555CC: .word 0x0400046C -_022555D0: .word 0x04000448 - thumb_func_end ov22_0225553C - - thumb_func_start ov22_022555D4 -ov22_022555D4: ; 0x022555D4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x19 - mov r1, #0xe - bl sub_02006C24 - mov r1, #6 - lsl r1, r1, #6 - str r0, [r4, r1] - add r0, r4, #0 - bl ov22_022559F8 - mov r0, #0xe - bl sub_02018340 - str r0, [r4, #0x40] - add r0, r4, #0 - bl ov22_02255860 - pop {r4, pc} - thumb_func_end ov22_022555D4 - - thumb_func_start ov22_022555FC -ov22_022555FC: ; 0x022555FC - push {r4, lr} - add r4, r0, #0 - bl ov22_02255984 - ldr r0, [r4, #0x40] - bl sub_020181C4 - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02006CA8 - add r0, r4, #0 - bl ov22_02255A98 - pop {r4, pc} - thumb_func_end ov22_022555FC - - thumb_func_start ov22_0225561C -ov22_0225561C: ; 0x0225561C - push {r3, lr} - ldr r0, [r0, #0x40] - bl sub_0201C2B8 - bl sub_0200A858 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_0225561C - - thumb_func_start ov22_0225562C -ov22_0225562C: ; 0x0225562C - ldr r3, _02255630 ; =ov22_02255AC0 - bx r3 - ; .align 2, 0 -_02255630: .word ov22_02255AC0 - thumb_func_end ov22_0225562C - - thumb_func_start ov22_02255634 -ov22_02255634: ; 0x02255634 - push {r4, lr} - sub sp, #0x28 - ldr r4, _02255650 ; =0x0225BE50 - add r3, sp, #0 - mov r2, #5 -_0225563E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0225563E - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_02255650: .word 0x0225BE50 - thumb_func_end ov22_02255634 - - thumb_func_start ov22_02255654 -ov22_02255654: ; 0x02255654 - push {r3, lr} - bl sub_020B28CC - bl sub_020BFB4C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _022556C8 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r1, [r0] - ldr r2, _022556CC ; =0xFFFFCFFD - and r1, r2 - strh r1, [r0] - ldrh r3, [r0] - add r1, r2, #2 - and r3, r1 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0] - ldr r1, _022556D0 ; =0x0000CFFB - and r1, r3 - strh r1, [r0] - add r1, r2, #2 - ldrh r3, [r0] - lsr r2, r2, #0x11 - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r2, _022556D4 ; =0x04000540 - mov r0, #2 - ldr r1, _022556D8 ; =0xBFFF0000 - str r0, [r2, #0] - str r1, [r2, #0x40] - mov r1, #1 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - pop {r3, pc} - ; .align 2, 0 -_022556C8: .word 0x04000008 -_022556CC: .word 0xFFFFCFFD -_022556D0: .word 0x0000CFFB -_022556D4: .word 0x04000540 -_022556D8: .word 0xBFFF0000 - thumb_func_end ov22_02255654 - - thumb_func_start ov22_022556DC -ov22_022556DC: ; 0x022556DC - push {r4, lr} - sub sp, #0x10 - ldr r4, _02255724 ; =0x0225BD78 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02255728 ; =0xFFCFFFEF - and r1, r0 - mov r0, #0x10 - orr r0, r1 - str r0, [r2, #0] - bl sub_020A7944 - bl sub_0201FF00 - bl sub_0201FF68 - mov r0, #0x1f - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x13 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_02255724: .word 0x0225BD78 -_02255728: .word 0xFFCFFFEF - thumb_func_end ov22_022556DC - - thumb_func_start ov22_0225572C -ov22_0225572C: ; 0x0225572C - push {r3, lr} - bl sub_020A5B1C - bl sub_020A5F50 - pop {r3, pc} - thumb_func_end ov22_0225572C - - thumb_func_start ov22_02255738 -ov22_02255738: ; 0x02255738 - push {r3, lr} - bl sub_0201FF00 - bl sub_0201FF68 - bl sub_020A7944 - pop {r3, pc} - thumb_func_end ov22_02255738 - - thumb_func_start ov22_02255748 -ov22_02255748: ; 0x02255748 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02015064 - str r0, [r5, #0] - mov r1, #0x76 - ldr r0, [r4, #0xc] - lsl r1, r1, #2 - bl sub_02018144 - str r0, [r5, #4] - mov r0, #0x76 - str r0, [r5, #8] - mov r0, #0 - str r0, [r5, #0xc] - ldr r0, [r4, #0xc] - mov r1, #0x4c - bl sub_02018144 - str r0, [r5, #0x10] - mov r0, #0x13 - str r0, [r5, #0x14] - mov r0, #0 - str r0, [r5, #0x18] - mov r0, #1 - str r0, [r5, #0x1c] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02255748 - - thumb_func_start ov22_02255784 -ov22_02255784: ; 0x02255784 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020150A8 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov22_02255784 - - thumb_func_start ov22_02255794 -ov22_02255794: ; 0x02255794 - ldr r3, _0225579C ; =sub_020150EC - ldr r0, [r0, #0] - bx r3 - nop -_0225579C: .word sub_020150EC - thumb_func_end ov22_02255794 - - thumb_func_start ov22_022557A0 -ov22_022557A0: ; 0x022557A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #4] - add r0, r2, #0 - add r4, r1, #0 - str r2, [sp] - cmp r0, #0 - ble _022557FC - add r7, r5, #0 - add r6, r4, #0 - add r7, #0xc -_022557BA: - ldr r1, [r5, #0xc] - ldr r0, [r5, #8] - cmp r1, r0 - blt _022557C6 - bl sub_02022974 -_022557C6: - ldr r0, [r4, #4] - cmp r0, #0 - beq _022557DC - add r0, r6, #0 - bl sub_02015128 - ldr r2, [r5, #0xc] - ldr r1, [r5, #4] - lsl r2, r2, #2 - str r0, [r1, r2] - b _022557E6 -_022557DC: - ldr r1, [r5, #0xc] - ldr r0, [r5, #4] - lsl r2, r1, #2 - mov r1, #0 - str r1, [r0, r2] -_022557E6: - ldr r0, [r7, #0] - add r4, #8 - add r0, r0, #1 - str r0, [r7, #0] - ldr r0, [sp, #4] - add r6, #8 - add r1, r0, #1 - ldr r0, [sp] - str r1, [sp, #4] - cmp r1, r0 - blt _022557BA -_022557FC: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_022557A0 - - thumb_func_start ov22_02255800 -ov22_02255800: ; 0x02255800 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #4] - add r0, r2, #0 - add r4, r1, #0 - str r2, [sp] - cmp r0, #0 - ble _0225585C - add r7, r5, #0 - add r6, r4, #0 - add r7, #0x18 -_0225581A: - ldr r1, [r5, #0x18] - ldr r0, [r5, #0x14] - cmp r1, r0 - blt _02255826 - bl sub_02022974 -_02255826: - ldr r0, [r4, #4] - cmp r0, #0 - beq _0225583C - add r0, r6, #0 - bl sub_020151A4 - ldr r2, [r5, #0x18] - ldr r1, [r5, #0x10] - lsl r2, r2, #2 - str r0, [r1, r2] - b _02255846 -_0225583C: - ldr r1, [r5, #0x18] - ldr r0, [r5, #0x10] - lsl r2, r1, #2 - mov r1, #0 - str r1, [r0, r2] -_02255846: - ldr r0, [r7, #0] - add r4, #0xc - add r0, r0, #1 - str r0, [r7, #0] - ldr r0, [sp, #4] - add r6, #0xc - add r1, r0, #1 - ldr r0, [sp] - str r1, [sp, #4] - cmp r1, r0 - blt _0225581A -_0225585C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02255800 - - thumb_func_start ov22_02255860 -ov22_02255860: ; 0x02255860 - push {r4, r5, lr} - sub sp, #0x8c - ldr r5, _02255970 ; =0x0225BDC4 - add r4, r0, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x70 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r4, #0x40] - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - mov r3, #0xe - bl sub_02019690 - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02019EBC - ldr r5, _02255974 ; =0x0225BDE0 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #0x40] - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - mov r3, #0xe - bl sub_02019690 - ldr r0, [r4, #0x40] - mov r1, #2 - bl sub_02019EBC - ldr r5, _02255978 ; =0x0225BE18 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - ldr r0, [r4, #0x40] - mov r3, #0 - bl sub_020183C4 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #0xe - bl sub_02019690 - ldr r0, [r4, #0x40] - mov r1, #3 - bl sub_02019EBC - ldr r5, _0225597C ; =0x0225BDA8 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - ldr r0, [r4, #0x40] - mov r3, #0 - bl sub_020183C4 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0xe - bl sub_02019690 - ldr r0, [r4, #0x40] - mov r1, #4 - bl sub_02019EBC - ldr r5, _02255980 ; =0x0225BE34 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - ldr r0, [r4, #0x40] - mov r3, #0 - bl sub_020183C4 - mov r0, #5 - mov r1, #0x20 - mov r2, #0 - mov r3, #0xe - bl sub_02019690 - ldr r0, [r4, #0x40] - mov r1, #5 - bl sub_02019EBC - add sp, #0x8c - pop {r4, r5, pc} - nop -_02255970: .word 0x0225BDC4 -_02255974: .word 0x0225BDE0 -_02255978: .word 0x0225BE18 -_0225597C: .word 0x0225BDA8 -_02255980: .word 0x0225BE34 - thumb_func_end ov22_02255860 - - thumb_func_start ov22_02255984 -ov22_02255984: ; 0x02255984 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0x40] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0x40] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0x40] - mov r1, #4 - bl sub_02019044 - ldr r0, [r4, #0x40] - mov r1, #5 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02255984 - - thumb_func_start ov22_022559B4 -ov22_022559B4: ; 0x022559B4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x77 - mov r1, #0xe - bl sub_0202298C - mov r1, #0x77 - str r0, [r4, #0x34] - mov r0, #0xe - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x77 - mov r1, #0 - lsl r2, r2, #2 - str r0, [r4, #0x38] - bl sub_020D5124 - mov r0, #0x77 - str r0, [r4, #0x3c] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022559B4 - - thumb_func_start ov22_022559E0 -ov22_022559E0: ; 0x022559E0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x38] - bl sub_020181C4 - ldr r0, [r4, #0x34] - bl sub_020229D8 - mov r0, #0 - str r0, [r4, #0x3c] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022559E0 - - thumb_func_start ov22_022559F8 -ov22_022559F8: ; 0x022559F8 - push {r4, r5, lr} - sub sp, #0x24 - ldr r5, _02255A94 ; =0x0225BD88 - add r3, sp, #0x14 - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #0x10 - add r0, r2, #0 - add r2, r1, #0 - bl sub_0201E88C - mov r0, #5 - mov r1, #0xe - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7c - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x1f - str r3, [sp, #0xc] - mov r2, #0xe - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - add r1, r4, #0 - mov r0, #0x30 - add r1, #0x58 - mov r2, #0xe - bl sub_020095C4 - str r0, [r4, #0x44] - add r0, r4, #0 - mov r2, #2 - add r0, #0x58 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - mov r0, #8 - mov r1, #0 - mov r2, #0xe - bl sub_02009714 - str r0, [r4, #0x48] - mov r0, #5 - mov r1, #1 - mov r2, #0xe - bl sub_02009714 - str r0, [r4, #0x4c] - mov r0, #0x30 - mov r1, #2 - mov r2, #0xe - bl sub_02009714 - str r0, [r4, #0x50] - mov r0, #0x30 - mov r1, #3 - mov r2, #0xe - bl sub_02009714 - str r0, [r4, #0x54] - add sp, #0x24 - pop {r4, r5, pc} - nop -_02255A94: .word 0x0225BD88 - thumb_func_end ov22_022559F8 - - thumb_func_start ov22_02255A98 -ov22_02255A98: ; 0x02255A98 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x44] - bl sub_02021964 - mov r4, #0 -_02255AA4: - ldr r0, [r5, #0x48] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02255AA4 - bl sub_0201E958 - bl sub_0201F8B4 - bl sub_0200A878 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02255A98 - - thumb_func_start ov22_02255AC0 -ov22_02255AC0: ; 0x02255AC0 - ldr r3, _02255AC8 ; =sub_020219F8 - ldr r0, [r0, #0x44] - bx r3 - nop -_02255AC8: .word sub_020219F8 - thumb_func_end ov22_02255AC0 - - thumb_func_start ov22_02255ACC -ov22_02255ACC: ; 0x02255ACC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r4, #0 - add r6, r0, #0 - add r7, r1, #0 - add r5, r4, #0 -_02255AD8: - mov r0, #1 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r6, r0] - add r1, r4, #1 - mov r2, #0 - mov r3, #0xe - bl sub_0200723C - str r0, [sp, #4] - cmp r0, #0 - bne _02255AF6 - bl sub_02022974 -_02255AF6: - ldr r1, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - bl ov22_02255340 - ldr r1, [r7, #0] - add r4, r4, #1 - add r1, r1, r5 - str r0, [r1, #4] - ldr r1, [r6, #0] - ldr r0, [r7, #0] - str r1, [r0, r5] - add r5, #8 - cmp r4, #0x64 - blt _02255AD8 - mov r0, #1 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #6 - mov r1, #0 - ldr r0, [r6, r0] - add r2, r1, #0 - mov r3, #0xe - bl sub_0200723C - add r4, r0, #0 - ldr r0, [r7, #0x14] - add r1, r4, #0 - mov r2, #0 - bl sub_02022A1C - ldr r1, [r7, #8] - add r0, r4, #0 - add r1, r1, #4 - bl sub_020A71B0 - ldr r1, [r6, #0] - ldr r0, [r7, #8] - str r1, [r0, #0] - ldr r0, [r7, #8] - mov r1, #3 - str r1, [r0, #8] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02255ACC - - thumb_func_start ov22_02255B50 -ov22_02255B50: ; 0x02255B50 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x87 - add r4, r1, #0 - mov r6, #0 - str r0, [sp, #8] -_02255B5E: - mov r0, #1 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #6 - add r1, r6, #0 - ldr r0, [r5, r0] - add r1, #0xce - mov r2, #0 - mov r3, #0xe - bl sub_0200723C - add r2, r6, #0 - add r1, r0, #0 - add r2, #0x64 - add r0, r5, #0 - lsl r7, r2, #3 - bl ov22_02255340 - ldr r1, [r4, #0] - mov r2, #0 - add r1, r1, r7 - str r0, [r1, #4] - ldr r1, [r5, #0] - ldr r0, [r4, #0] - mov r3, #0xe - str r1, [r0, r7] - add r0, r6, #1 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r5, r0] - ldr r1, [sp, #8] - bl sub_0200723C - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r1, [sp, #0xc] - ldr r2, [sp, #4] - bl sub_02022A1C - ldr r1, [sp, #4] - mov r0, #0xc - add r7, r1, #0 - mul r7, r0 - ldr r1, [r4, #8] - ldr r0, [sp, #0xc] - add r1, r1, r7 - add r1, r1, #4 - bl sub_020A71B0 - ldr r0, [r4, #8] - add r0, r0, r7 - ldr r0, [r0, #4] - cmp r0, #0 - bne _02255BD4 - bl sub_02022974 -_02255BD4: - ldr r1, [r5, #0] - ldr r0, [r4, #8] - add r6, r6, #1 - str r1, [r0, r7] - ldr r0, [r4, #8] - add r1, r0, r7 - mov r0, #1 - str r0, [r1, #8] - ldr r0, [sp, #8] - add r0, r0, #4 - str r0, [sp, #8] - cmp r6, #0x12 - blt _02255B5E - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02255B50 - - thumb_func_start ov22_02255BF4 -ov22_02255BF4: ; 0x02255BF4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r2, #0 - mov r0, #6 - add r3, r1, #0 - str r2, [sp] - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0xeb - bl sub_0200723C - str r0, [r4, #0x30] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02255BF4 - - thumb_func_start ov22_02255C14 -ov22_02255C14: ; 0x02255C14 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x30] - pop {r4, pc} - thumb_func_end ov22_02255C14 - - thumb_func_start ov22_02255C24 -ov22_02255C24: ; 0x02255C24 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0200762C - str r0, [r5, #0x20] - ldr r3, _02255C80 ; =0x02100DEC - mov r1, #0 - ldr r3, [r3, #0] - add r0, r4, #0 - add r2, r1, #0 - blx r3 - str r0, [r5, #0x24] - ldr r3, _02255C84 ; =0x02100DF4 - add r0, r6, #0 - ldr r3, [r3, #0] - mov r1, #0 - mov r2, #1 - blx r3 - str r0, [r5, #0x28] - ldr r3, [r5, #0x24] - ldr r2, _02255C88 ; =0x7FFF0000 - lsl r1, r3, #0x10 - and r2, r3 - lsr r2, r2, #0x10 - ldr r0, [r5, #0x20] - lsr r1, r1, #0xd - lsl r2, r2, #4 - bl sub_02008A78 - ldr r3, [r5, #0x28] - ldr r2, _02255C8C ; =0xFFFF0000 - lsl r1, r3, #0x10 - and r2, r3 - lsr r2, r2, #0x10 - ldr r0, [r5, #0x20] - lsr r1, r1, #0xd - lsl r2, r2, #3 - bl sub_02008A84 - mov r0, #1 - str r0, [r5, #0x2c] - pop {r4, r5, r6, pc} - nop -_02255C80: .word 0x02100DEC -_02255C84: .word 0x02100DF4 -_02255C88: .word 0x7FFF0000 -_02255C8C: .word 0xFFFF0000 - thumb_func_end ov22_02255C24 - - thumb_func_start ov22_02255C90 -ov22_02255C90: ; 0x02255C90 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - bl sub_02007B6C - ldr r1, _02255CB0 ; =0x02100DF0 - ldr r0, [r4, #0x24] - ldr r1, [r1, #0] - blx r1 - ldr r1, _02255CB4 ; =0x02100DF8 - ldr r0, [r4, #0x28] - ldr r1, [r1, #0] - blx r1 - mov r0, #0 - str r0, [r4, #0x2c] - pop {r4, pc} - ; .align 2, 0 -_02255CB0: .word 0x02100DF0 -_02255CB4: .word 0x02100DF8 - thumb_func_end ov22_02255C90 - - thumb_func_start ov22_02255CB8 -ov22_02255CB8: ; 0x02255CB8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - lsl r0, r4, #3 - str r0, [sp] - add r7, r3, #0 - ldr r1, [sp] - add r0, r7, #0 - add r6, r2, #0 - bl sub_02018144 - ldr r2, [sp] - mov r1, #0 - str r0, [r5, #0] - bl sub_020D5124 - add r0, r4, #0 - add r1, r7, #0 - bl sub_0202298C - str r0, [r5, #0x10] - str r4, [r5, #4] - mov r0, #0xc - add r4, r6, #0 - mul r4, r0 - add r0, r7, #0 - add r1, r4, #0 - bl sub_02018144 - mov r1, #0 - add r2, r4, #0 - str r0, [r5, #8] - bl sub_020D5124 - add r0, r6, #0 - add r1, r7, #0 - bl sub_0202298C - str r0, [r5, #0x14] - str r6, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02255CB8 - - thumb_func_start ov22_02255D0C -ov22_02255D0C: ; 0x02255D0C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02255D1E - bl sub_020229D8 - mov r0, #0 - str r0, [r4, #0x10] -_02255D1E: - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _02255D2C - bl sub_020229D8 - mov r0, #0 - str r0, [r4, #0x14] -_02255D2C: - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02255D0C - - thumb_func_start ov22_02255D44 -ov22_02255D44: ; 0x02255D44 - push {r3, r4, r5, lr} - sub sp, #8 - mov r2, #2 - add r4, r0, #0 - mov r0, #3 - mov r1, #0xd - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r2, #1 - mov r0, #3 - mov r1, #0xe - lsl r2, r2, #0x12 - bl sub_02017FC8 - ldr r1, _02255E40 ; =0x000006E4 - add r0, r4, #0 - mov r2, #0xd - bl sub_0200681C - ldr r2, _02255E40 ; =0x000006E4 - mov r1, #0 - add r5, r0, #0 - bl sub_020D5124 - ldr r0, _02255E44 ; =ov22_02256940 - add r1, r5, #0 - bl sub_02017798 - bl sub_020177A4 - add r0, r4, #0 - bl sub_02006840 - add r4, r0, #0 - ldr r1, [r4, #0xc] - ldr r0, _02255E48 ; =0x000006D4 - str r1, [r5, r0] - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r0, [r4, #8] - add r1, r5, r1 - bl ov22_0225894C - add r0, r5, #0 - bl ov22_022566C0 - mov r1, #0xd7 - lsl r1, r1, #2 - add r0, r5, r1 - sub r1, #0x8d - mov r2, #0xd - bl ov22_02259484 - mov r0, #0xaf - lsl r0, r0, #2 - mov r1, #0xd - bl ov22_02254DE0 - mov r1, #0xd9 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r1, [r4, #0] - add r0, r5, #0 - mov r2, #0xa - mov r3, #0 - bl ov22_02256708 - add r0, r5, #0 - bl ov22_022567FC - add r0, r5, #0 - mov r1, #0 - bl ov22_02256948 - add r0, r5, #0 - bl ov22_0225699C - ldr r1, [r4, #0xc] - add r0, r5, #0 - bl ov22_02256BAC - mov r0, #0x56 - lsl r0, r0, #4 - add r1, r5, r0 - mov r2, #0xfd - str r1, [sp] - mov r1, #1 - sub r0, #0xc8 - lsl r2, r2, #2 - str r1, [sp, #4] - add r1, r5, r2 - sub r2, #0x8c - add r0, r5, r0 - add r2, r5, r2 - add r3, r5, #0 - bl ov22_022589E0 - mov r0, #0xd - bl sub_02015920 - mov r1, #0x6b - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #0xd - mov r1, #1 - bl sub_0201A778 - ldr r2, _02255E4C ; =0x000006B4 - mov r1, #0 - str r0, [r5, r2] - sub r2, #0xc - str r1, [r5, r2] - mov r0, #0x35 - add r2, r1, #0 - bl sub_02004550 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02255E40: .word 0x000006E4 -_02255E44: .word ov22_02256940 -_02255E48: .word 0x000006D4 -_02255E4C: .word 0x000006B4 - thumb_func_end ov22_02255D44 - - thumb_func_start ov22_02255E50 -ov22_02255E50: ; 0x02255E50 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r7, #0 - mov r6, #0 - bl sub_02006840 - ldr r1, [r5, #0] - cmp r1, #0xc - bhi _02255F1E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02255E78: ; jump table - .short _02255E92 - _02255E78 - 2 ; case 0 - .short _02255E92 - _02255E78 - 2 ; case 1 - .short _02255EAE - _02255E78 - 2 ; case 2 - .short _02255EBE - _02255E78 - 2 ; case 3 - .short _02255EEC - _02255E78 - 2 ; case 4 - .short _02255F0E - _02255E78 - 2 ; case 5 - .short _02255F3E - _02255E78 - 2 ; case 6 - .short _02255F74 - _02255E78 - 2 ; case 7 - .short _02255F9A - _02255E78 - 2 ; case 8 - .short _02255FDA - _02255E78 - 2 ; case 9 - .short _02256012 - _02255E78 - 2 ; case 10 - .short _02256030 - _02255E78 - 2 ; case 11 - .short _0225604E - _02255E78 - 2 ; case 12 -_02255E92: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0xd - str r1, [sp, #8] - mov r1, #5 - add r2, r1, #0 - add r3, r6, #0 - bl sub_0200F174 - mov r0, #2 - str r0, [r5, #0] - b _0225606A -_02255EAE: - bl sub_0200F2AC - cmp r0, #0 - beq _02255F1E - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225606A -_02255EBE: - ldr r0, [r0, #0x1c] - cmp r0, #1 - bne _02255EE6 - mov r0, #1 - bl sub_02002B20 - mov r0, #0x56 - lsl r0, r0, #4 - ldr r2, _02256078 ; =0x00000181 - add r0, r4, r0 - mov r1, #0x1a - mov r3, #0x2f - bl ov22_0225A660 - ldr r1, _0225607C ; =0x000006D8 - str r0, [r4, r1] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225606A -_02255EE6: - mov r0, #6 - str r0, [r5, #0] - b _0225606A -_02255EEC: - ldr r0, _0225607C ; =0x000006D8 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255F1E - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov22_0225A6A0 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225606A -_02255F0E: - ldr r0, _02256080 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - and r1, r0 - ldr r0, _02256084 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - orr r0, r1 - bne _02255F20 -_02255F1E: - b _0225606A -_02255F20: - mov r0, #0x56 - lsl r0, r0, #4 - ldr r2, _02256078 ; =0x00000181 - add r0, r4, r0 - mov r1, #0x1a - mov r3, #0x30 - bl ov22_0225A628 - add r0, r6, #0 - bl sub_02002B20 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225606A -_02255F3E: - ldr r1, _02256088 ; =0x000006A8 - ldr r0, [r4, r1] - cmp r0, #3 - bne _02255F54 - add r1, r1, #4 - add r0, r4, #0 - add r1, r4, r1 - bl ov22_02256C48 - mov r0, #7 - str r0, [r5, #0] -_02255F54: - ldr r0, _0225608C ; =0x00000498 - add r0, r4, r0 - bl ov22_0225890C - add r0, r4, #0 - bl ov22_02257564 - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov22_0225A610 - add r0, r4, #0 - bl ov22_02256AC4 - b _0225606A -_02255F74: - ldr r0, _02256090 ; =0x000006AC - ldr r1, [r4, r0] - cmp r1, #0 - beq _0225606A - add r1, r6, #0 - str r1, [r4, r0] - mov r1, #8 - str r1, [r5, #0] - mov r1, #4 - sub r0, r0, #4 - str r1, [r4, r0] - ldr r1, _02256094 ; =0x0000047C - mov r2, #0xe - add r0, r4, r1 - sub r1, #0x88 - add r1, r4, r1 - bl ov22_0225AF44 - b _0225606A -_02255F9A: - ldr r1, _02256088 ; =0x000006A8 - ldr r0, [r4, r1] - cmp r0, #9 - bne _02255FB2 - add r1, r1, #4 - add r0, r4, #0 - add r1, r4, r1 - bl ov22_02256DB8 - mov r0, #0xa - str r0, [r5, #0] - b _0225606A -_02255FB2: - cmp r0, #8 - bne _02255FC6 - mov r0, #9 - str r0, [r5, #0] - mov r0, #5 - str r0, [r4, r1] - add r0, r4, #0 - bl ov22_022575B4 - b _0225606A -_02255FC6: - add r0, r4, #0 - bl ov22_02257278 - ldr r1, _02256088 ; =0x000006A8 - str r0, [r4, r1] - ldr r0, _02256094 ; =0x0000047C - add r0, r4, r0 - bl ov22_0225AF68 - b _0225606A -_02255FDA: - ldr r0, _02256088 ; =0x000006A8 - ldr r1, [r4, r0] - cmp r1, #6 - bne _02255FEE - mov r1, #1 - add r0, #0x10 - str r1, [r4, r0] - mov r0, #0xb - str r0, [r5, #0] - b _0225606A -_02255FEE: - cmp r1, #7 - bne _02255FFE - add r1, r6, #0 - add r0, #0x10 - str r1, [r4, r0] - mov r0, #0xb - str r0, [r5, #0] - b _0225606A -_02255FFE: - add r0, r4, #0 - bl ov22_02257624 - ldr r1, _02256088 ; =0x000006A8 - str r0, [r4, r1] - ldr r0, _02256094 ; =0x0000047C - add r0, r4, r0 - bl ov22_0225AF68 - b _0225606A -_02256012: - ldr r0, _02256090 ; =0x000006AC - ldr r1, [r4, r0] - cmp r1, #0 - beq _0225606A - add r2, r6, #0 - str r2, [r4, r0] - mov r1, #6 - str r1, [r5, #0] - sub r0, r0, #4 - str r2, [r4, r0] - ldr r0, _02256094 ; =0x0000047C - add r0, r4, r0 - bl ov22_0225AF74 - b _0225606A -_02256030: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0xd - str r1, [sp, #8] - add r1, r6, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225606A -_0225604E: - bl sub_0200F2AC - cmp r0, #0 - beq _0225606A - add r0, r6, #0 - str r0, [r5, #0] - ldr r0, _02256088 ; =0x000006A8 - mov r1, #0xa - str r1, [r4, r0] - ldr r0, _02256094 ; =0x0000047C - mov r6, #1 - add r0, r4, r0 - bl ov22_0225AF74 -_0225606A: - add r0, r4, #0 - bl ov22_022566EC - add r0, r6, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02256078: .word 0x00000181 -_0225607C: .word 0x000006D8 -_02256080: .word 0x021BF67C -_02256084: .word 0x021BF6BC -_02256088: .word 0x000006A8 -_0225608C: .word 0x00000498 -_02256090: .word 0x000006AC -_02256094: .word 0x0000047C - thumb_func_end ov22_02255E50 - - thumb_func_start ov22_02256098 -ov22_02256098: ; 0x02256098 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r6, #0 - bl sub_02006840 - add r5, r0, #0 - ldr r0, _02256168 ; =0x000006B8 - ldr r0, [r4, r0] - cmp r0, #1 - bne _022560C8 - ldr r0, [r5, #0x10] - mov r1, #7 - bl sub_0202CFEC - mov r1, #0xfd - lsl r1, r1, #2 - ldr r0, [r5, #4] - ldr r2, [r5, #0x14] - add r1, r4, r1 - bl ov22_02256F38 -_022560C8: - ldr r1, [r5, #0x18] - cmp r1, #0 - beq _022560E0 - ldr r0, _02256168 ; =0x000006B8 - ldr r0, [r4, r0] - cmp r0, #1 - bne _022560DC - mov r0, #1 - str r0, [r1, #0] - b _022560E0 -_022560DC: - mov r0, #0 - str r0, [r1, #0] -_022560E0: - mov r0, #0x6b - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02015938 - ldr r0, _0225616C ; =0x000006B4 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0201A928 - add r0, r4, #0 - bl ov22_02256C38 - ldr r0, _02256170 ; =0x00000498 - add r0, r4, r0 - bl ov22_02258A34 - add r0, r4, #0 - bl ov22_02256AB4 - add r0, r4, #0 - bl ov22_0225698C - add r0, r4, #0 - bl ov22_022567D8 - add r0, r4, #0 - bl ov22_022568B8 - mov r0, #0xd9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_02254E0C - mov r0, #0xd9 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #8 - add r0, r4, r0 - bl ov22_022594AC - add r0, r4, #0 - bl ov22_022566F4 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201E530 - cmp r0, #1 - beq _02256152 - bl sub_02022974 -_02256152: - add r0, r6, #0 - bl sub_02006830 - mov r0, #0xd - bl sub_0201807C - mov r0, #0xe - bl sub_0201807C - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02256168: .word 0x000006B8 -_0225616C: .word 0x000006B4 -_02256170: .word 0x00000498 - thumb_func_end ov22_02256098 - - thumb_func_start ov22_02256174 -ov22_02256174: ; 0x02256174 - push {r3, r4, r5, lr} - sub sp, #8 - mov r2, #2 - add r5, r0, #0 - mov r0, #3 - mov r1, #0xd - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r2, #1 - mov r0, #3 - mov r1, #0xe - lsl r2, r2, #0x12 - bl sub_02017FC8 - ldr r1, _022562D8 ; =0x000006E4 - add r0, r5, #0 - mov r2, #0xd - bl sub_0200681C - ldr r2, _022562D8 ; =0x000006E4 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _022562DC ; =ov22_02256940 - add r1, r4, #0 - bl sub_02017798 - bl sub_020177A4 - add r0, r5, #0 - bl sub_02006840 - add r5, r0, #0 - mov r1, #0x1b - ldr r0, [r5, #0xc] - lsl r1, r1, #6 - str r0, [r4, r1] - ldr r2, [r5, #0x10] - add r0, r1, #4 - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, [r5, #0x14] - add r0, #8 - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, [r5, #8] - add r0, #0xc - str r2, [r4, r0] - ldr r0, [r5, #0x1c] - add r1, #0x10 - str r0, [r4, r1] - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r0, [r5, #0x18] - add r1, r4, r1 - bl ov22_0225894C - add r0, r4, #0 - bl ov22_022566C0 - ldr r0, [r4, #0x44] - mov r1, #0 - bl sub_020219A4 - bl sub_02039734 - mov r0, #1 - mov r1, #0x10 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - mov r1, #0xd7 - lsl r1, r1, #2 - add r0, r4, r1 - sub r1, #0x8d - mov r2, #0xd - bl ov22_02259484 - mov r0, #0xaf - lsl r0, r0, #2 - mov r1, #0xd - bl ov22_02254DE0 - mov r1, #0xd9 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [r5, #0x20] - ldr r0, _022562E0 ; =0x000006D4 - str r1, [r4, r0] - sub r1, r0, #4 - ldr r1, [r4, r1] - ldrb r1, [r1, #0x16] - cmp r1, #0 - bne _0225624E - ldr r0, [r5, #0xc] - bl ov22_02257580 - ldr r1, _022562E4 ; =0x000006BC - str r0, [r4, r1] - b _02256254 -_0225624E: - mov r1, #0x14 - sub r0, #0x18 - str r1, [r4, r0] -_02256254: - ldr r2, _022562E4 ; =0x000006BC - ldr r1, [r5, #0] - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov22_02256790 - add r0, r4, #0 - bl ov22_022567FC - add r0, r4, #0 - mov r1, #0 - bl ov22_02256948 - add r0, r4, #0 - bl ov22_02256A28 - ldr r0, [r5, #0x20] - ldr r1, _022562E4 ; =0x000006BC - str r0, [sp] - ldr r1, [r4, r1] - ldr r2, [r5, #8] - ldr r3, [r5, #0x1c] - add r0, r4, #0 - bl ov22_02256BF4 - mov r0, #0x56 - lsl r0, r0, #4 - add r1, r4, r0 - mov r2, #0xfd - str r1, [sp] - mov r1, #0 - sub r0, #0xc8 - lsl r2, r2, #2 - str r1, [sp, #4] - add r1, r4, r2 - sub r2, #0x8c - add r0, r4, r0 - add r2, r4, r2 - add r3, r4, #0 - bl ov22_022589E0 - mov r0, #0xd - bl sub_02015920 - mov r1, #0x6b - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #0xd - mov r1, #1 - bl sub_0201A778 - ldr r1, _022562E8 ; =0x000006B4 - mov r2, #0 - str r0, [r4, r1] - add r0, r1, #0 - sub r0, #0xc - add r1, #0x1c - str r2, [r4, r0] - ldr r0, [r4, r1] - ldrb r0, [r0, #0x16] - bl sub_020959F4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_022562D8: .word 0x000006E4 -_022562DC: .word ov22_02256940 -_022562E0: .word 0x000006D4 -_022562E4: .word 0x000006BC -_022562E8: .word 0x000006B4 - thumb_func_end ov22_02256174 - - thumb_func_start ov22_022562EC -ov22_022562EC: ; 0x022562EC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - bl sub_0200682C - ldr r1, [r4, #0] - add r5, r0, #0 - mov r6, #0 - cmp r1, #0x14 - bhi _0225634E - add r2, r1, r1 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0225630C: ; jump table - .short _02256336 - _0225630C - 2 ; case 0 - .short _02256346 - _0225630C - 2 ; case 1 - .short _02256358 - _0225630C - 2 ; case 2 - .short _0225638E - _0225630C - 2 ; case 3 - .short _022563AC - _0225630C - 2 ; case 4 - .short _022563C2 - _0225630C - 2 ; case 5 - .short _022563E0 - _0225630C - 2 ; case 6 - .short _02256402 - _0225630C - 2 ; case 7 - .short _02256420 - _0225630C - 2 ; case 8 - .short _0225643A - _0225630C - 2 ; case 9 - .short _0225645E - _0225630C - 2 ; case 10 - .short _02256470 - _0225630C - 2 ; case 11 - .short _0225648E - _0225630C - 2 ; case 12 - .short _022564AA - _0225630C - 2 ; case 13 - .short _02256518 - _0225630C - 2 ; case 14 - .short _0225654A - _0225630C - 2 ; case 15 - .short _022565C8 - _0225630C - 2 ; case 16 - .short _022565C8 - _0225630C - 2 ; case 17 - .short _022565C8 - _0225630C - 2 ; case 18 - .short _02256568 - _0225630C - 2 ; case 19 - .short _02256598 - _0225630C - 2 ; case 20 -_02256336: - mov r0, #0x2a - mov r1, #0x1e - bl sub_0200564C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256346: - bl sub_02005684 - cmp r0, #0 - beq _02256350 -_0225634E: - b _022565C8 -_02256350: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256358: - bl ov22_02257104 - ldr r2, _022565D4 ; =0x000006BC - add r0, r5, #0 - ldr r2, [r5, r2] - add r1, r6, #0 - bl ov22_02257524 - ldr r0, _022565D8 ; =0x000006C4 - ldr r0, [r5, r0] - cmp r0, #3 - beq _0225637A - add r0, r5, #0 - mov r1, #0x1a - bl ov22_0225751C - b _02256382 -_0225637A: - add r0, r5, #0 - mov r1, #0x1c - bl ov22_0225751C -_02256382: - ldr r1, _022565DC ; =0x000006D8 - str r0, [r5, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_0225638E: - ldr r0, _022565DC ; =0x000006D8 - ldr r0, [r5, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02256496 - add r0, r5, #0 - bl ov22_02257540 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_022563AC: - ldr r1, _022565E0 ; =0x000006CC - ldr r1, [r5, r1] - add r1, #0x1d - bl ov22_0225751C - ldr r1, _022565DC ; =0x000006D8 - str r0, [r5, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_022563C2: - ldr r0, _022565DC ; =0x000006D8 - ldr r0, [r5, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02256496 - add r0, r5, #0 - bl ov22_02257540 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_022563E0: - ldr r1, _022565D8 ; =0x000006C4 - ldr r1, [r5, r1] - cmp r1, #3 - beq _022563F0 - mov r1, #0x2a - bl ov22_0225751C - b _022563F6 -_022563F0: - mov r1, #0x29 - bl ov22_0225751C -_022563F6: - ldr r1, _022565DC ; =0x000006D8 - str r0, [r5, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256402: - ldr r0, _022565DC ; =0x000006D8 - ldr r0, [r5, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02256496 - add r0, r5, #0 - bl ov22_02257540 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256420: - mov r0, #0x6d - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldrb r0, [r0, #0x16] - cmp r0, #0 - beq _02256432 - mov r0, #2 - bl sub_020364F0 -_02256432: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_0225643A: - mov r0, #0x6d - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldrb r0, [r0, #0x16] - cmp r0, #0 - beq _02256458 - mov r0, #2 - bl sub_02036540 - cmp r0, #0 - beq _02256496 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256458: - add r0, r1, #1 - str r0, [r4, #0] - b _022565C8 -_0225645E: - bl ov22_0225718C - ldr r0, _022565E4 ; =0x00000643 - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256470: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0xd - str r1, [sp, #8] - mov r1, #0x11 - mov r2, #0x13 - add r3, r6, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_0225648E: - bl sub_0200F2AC - cmp r0, #0 - bne _02256498 -_02256496: - b _022565C8 -_02256498: - ldr r1, _022565E8 ; =0x00000491 - mov r0, #7 - add r2, r6, #0 - bl sub_02004550 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_022564AA: - ldr r0, _022565EC ; =0x000006A8 - ldr r1, [r5, r0] - cmp r1, #3 - bne _022564DE - add r0, #0x28 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02095CA8 - mov r0, #0x6d - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldrb r0, [r0, #0x16] - cmp r0, #0 - beq _022564D8 - mov r0, #0x56 - lsl r0, r0, #4 - ldr r2, _022565F0 ; =0x00000181 - add r0, r5, r0 - mov r1, #0x1a - mov r3, #0x2e - bl ov22_0225A628 -_022564D8: - mov r0, #0xe - str r0, [r4, #0] - b _022565C8 -_022564DE: - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov22_0225A6C4 - cmp r0, #0 - bne _022564F8 - mov r0, #0xf - str r0, [r4, #0] - mov r0, #0x1a - lsl r0, r0, #6 - bl sub_02005748 -_022564F8: - ldr r0, _022565F4 ; =0x00000498 - add r0, r5, r0 - bl ov22_0225890C - add r0, r5, #0 - bl ov22_02257564 - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov22_0225A610 - add r0, r5, #0 - bl ov22_02256AC4 - b _022565C8 -_02256518: - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov22_0225A6C4 - cmp r0, #0 - bne _02256532 - mov r0, #0xf - str r0, [r4, #0] - mov r0, #0x1a - lsl r0, r0, #6 - bl sub_02005748 -_02256532: - add r0, r5, #0 - bl ov22_02257564 - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov22_0225A610 - add r0, r5, #0 - bl ov22_022577A0 - b _022565C8 -_0225654A: - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov22_0225A610 - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov22_0225A6D4 - cmp r0, #0 - beq _022565C8 - mov r0, #0x13 - str r0, [r4, #0] - b _022565C8 -_02256568: - mov r0, #0x1a - lsl r0, r0, #6 - bl sub_020057D4 - cmp r0, #1 - beq _022565C8 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #0xd - str r1, [sp, #8] - mov r1, #0x1a - add r2, r1, #0 - add r3, r6, #0 - bl sub_0200F174 - ldr r0, _022565F8 ; =0x00000684 - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022565C8 -_02256598: - bl sub_0200F2AC - cmp r0, #0 - beq _022565C8 - add r0, r6, #0 - str r0, [r4, #0] - mov r2, #1 - ldr r0, _022565EC ; =0x000006A8 - mov r1, #0xa - str r1, [r5, r0] - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _022565FC ; =0xFFFF1FFF - mov r6, #1 - and r0, r1 - str r0, [r2, #0] - mov r0, #0xfd - lsl r0, r0, #2 - add r1, r6, #0 - add r0, r5, r0 - sub r1, #0x41 - mov r2, #0x28 - bl ov22_02257AB0 -_022565C8: - add r0, r5, #0 - bl ov22_022566EC - add r0, r6, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022565D4: .word 0x000006BC -_022565D8: .word 0x000006C4 -_022565DC: .word 0x000006D8 -_022565E0: .word 0x000006CC -_022565E4: .word 0x00000643 -_022565E8: .word 0x00000491 -_022565EC: .word 0x000006A8 -_022565F0: .word 0x00000181 -_022565F4: .word 0x00000498 -_022565F8: .word 0x00000684 -_022565FC: .word 0xFFFF1FFF - thumb_func_end ov22_022562EC - - thumb_func_start ov22_02256600 -ov22_02256600: ; 0x02256600 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - mov r2, #0x1b - add r3, r0, #0 - mov r1, #0xfd - lsl r2, r2, #6 - ldr r0, [r3, #4] - lsl r1, r1, #2 - ldr r2, [r4, r2] - ldr r3, [r3, #0x24] - add r1, r4, r1 - bl ov22_02256FD8 - mov r0, #0x6b - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02015938 - ldr r0, _022566B8 ; =0x000006B4 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0201A928 - add r0, r4, #0 - bl ov22_02256C38 - ldr r0, _022566BC ; =0x00000498 - add r0, r4, r0 - bl ov22_02258A34 - add r0, r4, #0 - bl ov22_02256AB4 - add r0, r4, #0 - bl ov22_0225698C - add r0, r4, #0 - bl ov22_022567D8 - add r0, r4, #0 - bl ov22_022568B8 - mov r0, #0xd9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_02254E0C - mov r0, #0xd9 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #8 - add r0, r4, r0 - bl ov22_022594AC - add r0, r4, #0 - bl ov22_022566F4 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201E530 - cmp r0, #1 - beq _02256698 - bl sub_02022974 -_02256698: - add r0, r5, #0 - bl sub_02006830 - mov r0, #0xd - bl sub_0201807C - mov r0, #0xe - bl sub_0201807C - bl sub_02095A24 - bl sub_02039794 - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_022566B8: .word 0x000006B4 -_022566BC: .word 0x00000498 - thumb_func_end ov22_02256600 - - thumb_func_start ov22_022566C0 -ov22_022566C0: ; 0x022566C0 - push {r4, lr} - sub sp, #0x18 - add r4, r0, #0 - bl ov22_02255094 - add r0, r4, #0 - bl ov22_022550D4 - add r0, r4, #0 - add r1, sp, #0 - bl ov22_02255314 - add r0, r4, #0 - add r1, sp, #0 - bl ov22_022551B4 - add r0, sp, #0 - bl ov22_02255338 - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022566C0 - - thumb_func_start ov22_022566EC -ov22_022566EC: ; 0x022566EC - ldr r3, _022566F0 ; =ov22_02255180 - bx r3 - ; .align 2, 0 -_022566F0: .word ov22_02255180 - thumb_func_end ov22_022566EC - - thumb_func_start ov22_022566F4 -ov22_022566F4: ; 0x022566F4 - push {r4, lr} - add r4, r0, #0 - bl ov22_022551D0 - add r0, r4, #0 - bl ov22_02255134 - bl ov22_022550B4 - pop {r4, pc} - thumb_func_end ov22_022566F4 - - thumb_func_start ov22_02256708 -ov22_02256708: ; 0x02256708 - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #4] - mov r1, #0xd9 - str r0, [sp, #0x14] - ldr r0, [r5, #0x10] - lsl r1, r1, #2 - str r0, [sp, #0x18] - ldr r0, [r5, #0x30] - add r6, r3, #0 - str r0, [sp, #0x1c] - ldr r0, [r5, #0x20] - str r0, [sp, #0x20] - ldr r0, [r5, #0x40] - str r2, [sp, #0x30] - str r0, [sp, #0x24] - ldr r0, [r5, r1] - str r0, [sp, #0x28] - add r0, r1, #0 - sub r0, #8 - add r0, r5, r0 - add r1, #0x90 - str r0, [sp, #0x2c] - add r0, r5, r1 - add r1, sp, #0x10 - bl ov22_022578F4 - cmp r6, #0 - add r2, sp, #0 - bne _0225675C - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0xe - bl ov22_02257998 - b _0225676A -_0225675C: - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - mov r3, #0xe - bl ov22_022579B4 -_0225676A: - add r0, r5, #0 - add r1, sp, #0 - bl ov22_02259098 - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r5, r0 - bl ov22_02257B10 - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - mov r2, #0xe - bl ov22_02257C88 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_02256708 - - thumb_func_start ov22_02256790 -ov22_02256790: ; 0x02256790 - push {r3, r4, lr} - sub sp, #0xc - mov r3, #1 - add r4, r0, #0 - bl ov22_02256708 - ldr r0, _022567D4 ; =0x0000046C - add r1, sp, #8 - add r0, r4, r0 - add r2, sp, #4 - bl ov22_02259270 - ldr r0, _022567D4 ; =0x0000046C - add r1, sp, #0 - add r0, r4, r0 - bl ov22_02259358 - ldr r3, [sp, #4] - ldr r0, _022567D4 ; =0x0000046C - lsr r2, r3, #0x1f - add r2, r3, r2 - asr r3, r2, #1 - add r2, sp, #0 - ldrb r2, [r2, #3] - add r0, r4, r0 - mov r1, #0xc0 - sub r3, r3, r2 - mov r2, #0x8d - sub r2, r2, r3 - bl ov22_022591EC - add sp, #0xc - pop {r3, r4, pc} - nop -_022567D4: .word 0x0000046C - thumb_func_end ov22_02256790 - - thumb_func_start ov22_022567D8 -ov22_022567D8: ; 0x022567D8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02257CD4 - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02257A98 - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02257948 - pop {r4, pc} - thumb_func_end ov22_022567D8 - - thumb_func_start ov22_022567FC -ov22_022567FC: ; 0x022567FC - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - ldr r0, [r5, #0] - str r0, [sp] - ldr r0, [r5, #4] - str r0, [sp, #4] - ldr r0, [r5, #0x10] - str r0, [sp, #8] - ldr r0, [r5, #0x30] - str r0, [sp, #0xc] - ldr r0, [r5, #0x40] - str r0, [sp, #0x10] - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - str r0, [sp, #0x28] - mov r0, #0xd9 - lsl r0, r0, #2 - ldr r1, [r5, r0] - str r1, [sp, #0x14] - add r1, r0, #0 - sub r1, #8 - add r1, r5, r1 - str r1, [sp, #0x18] - mov r1, #0xe - str r1, [sp, #0x1c] - mov r1, #2 - str r1, [sp, #0x20] - mov r1, #1 - add r0, r0, #4 - str r1, [sp, #0x24] - add r0, r5, r0 - add r1, sp, #0 - bl ov22_02257F50 - mov r0, #0xda - lsl r0, r0, #2 - mov r1, #0 - add r0, r5, r0 - add r2, r1, #0 - bl ov22_022582C0 - mov r6, #0 -_02256854: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r6, #0 - bl ov22_0225899C - add r7, r0, #0 - mov r4, #0 - cmp r7, #0 - ble _0225687C -_02256868: - mov r0, #0xda - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - add r2, r6, #0 - bl ov22_022580A4 - add r4, r4, #1 - cmp r4, r7 - blt _02256868 -_0225687C: - add r6, r6, #1 - cmp r6, #0x64 - blt _02256854 - mov r7, #0xda - mov r6, #0x61 - mov r4, #0 - lsl r7, r7, #2 - lsl r6, r6, #2 -_0225688C: - add r0, r5, r6 - add r1, r4, #0 - bl ov22_022589B0 - add r2, r0, #0 - cmp r2, #0x12 - bge _022568A2 - add r0, r5, r7 - mov r1, #1 - bl ov22_022580A4 -_022568A2: - add r4, r4, #1 - cmp r4, #0x12 - blt _0225688C - mov r0, #0xda - lsl r0, r0, #2 - add r0, r5, r0 - bl ov22_022581EC - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022567FC - - thumb_func_start ov22_022568B8 -ov22_022568B8: ; 0x022568B8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02258408 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_022581C0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02257F88 - pop {r4, pc} - thumb_func_end ov22_022568B8 - - thumb_func_start ov22_022568DC -ov22_022568DC: ; 0x022568DC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, _0225693C ; =0x04000008 - mov r2, #3 - ldrh r3, [r0] - mov r1, #1 - bic r3, r2 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0, #2] - bic r1, r2 - strh r1, [r0, #2] - ldrh r3, [r0, #4] - mov r1, #2 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #4] - ldrh r3, [r0, #6] - mov r1, #3 - bic r3, r2 - add r2, r3, #0 - orr r2, r1 - strh r2, [r0, #6] - add r3, r1, #0 - ldr r0, [r4, #0x40] - add r2, r1, #0 - sub r3, #0x13 - bl sub_02019184 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov22_02258354 - mov r1, #0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r2, #2 - add r3, r1, #0 - str r1, [sp] - bl ov22_022583A0 - add sp, #4 - pop {r3, r4, pc} - nop -_0225693C: .word 0x04000008 - thumb_func_end ov22_022568DC - - thumb_func_start ov22_02256940 -ov22_02256940: ; 0x02256940 - ldr r3, _02256944 ; =ov22_022553F8 - bx r3 - ; .align 2, 0 -_02256944: .word ov22_022553F8 - thumb_func_end ov22_02256940 - - thumb_func_start ov22_02256948 -ov22_02256948: ; 0x02256948 - push {r3, lr} - sub sp, #0x30 - ldr r2, [r0, #0x40] - str r2, [sp] - mov r2, #0x19 - str r2, [sp, #4] - lsl r2, r1, #1 - add r1, r2, #0 - add r1, #0x79 - str r1, [sp, #8] - mov r1, #0x85 - str r1, [sp, #0xc] - mov r1, #1 - add r2, #0x7a - str r2, [sp, #0x10] - mov r2, #0 - str r1, [sp, #0x1c] - str r1, [sp, #0x20] - mov r1, #2 - str r1, [sp, #0x24] - mov r1, #0xe - str r1, [sp, #0x2c] - ldr r1, _02256988 ; =0x000004B4 - str r2, [sp, #0x14] - add r0, r0, r1 - add r1, sp, #0 - str r2, [sp, #0x18] - str r2, [sp, #0x28] - bl ov22_022597BC - add sp, #0x30 - pop {r3, pc} - ; .align 2, 0 -_02256988: .word 0x000004B4 - thumb_func_end ov22_02256948 - - thumb_func_start ov22_0225698C -ov22_0225698C: ; 0x0225698C - ldr r1, _02256994 ; =0x000004B4 - ldr r3, _02256998 ; =ov22_02259804 - add r0, r0, r1 - bx r3 - ; .align 2, 0 -_02256994: .word 0x000004B4 -_02256998: .word ov22_02259804 - thumb_func_end ov22_0225698C - - thumb_func_start ov22_0225699C -ov22_0225699C: ; 0x0225699C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x4e - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r4, #0 - bl ov22_02259DBC - mov r0, #0x4e - lsl r0, r0, #4 - mov r1, #0 - ldr r2, _02256A14 ; =ov22_02256B04 - add r0, r4, r0 - add r3, r4, #0 - str r1, [sp] - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256A18 ; =ov22_02256B24 - add r0, r4, r0 - mov r1, #1 - add r3, r4, #0 - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256A1C ; =ov22_02256B44 - add r0, r4, r0 - mov r1, #2 - add r3, r4, #0 - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256A20 ; =ov22_02256B78 - add r0, r4, r0 - mov r1, #3 - add r3, r4, #0 - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256A24 ; =ov22_02256AE4 - add r0, r4, r0 - mov r1, #4 - add r3, r4, #0 - bl ov22_02259FF4 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02256A14: .word ov22_02256B04 -_02256A18: .word ov22_02256B24 -_02256A1C: .word ov22_02256B44 -_02256A20: .word ov22_02256B78 -_02256A24: .word ov22_02256AE4 - thumb_func_end ov22_0225699C - - thumb_func_start ov22_02256A28 -ov22_02256A28: ; 0x02256A28 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x4e - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r4, #0 - bl ov22_02259DBC - mov r0, #0x4e - lsl r0, r0, #4 - mov r1, #0 - ldr r2, _02256AA0 ; =ov22_02256B04 - add r0, r4, r0 - add r3, r4, #0 - str r1, [sp] - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256AA4 ; =ov22_02256B24 - add r0, r4, r0 - mov r1, #1 - add r3, r4, #0 - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256AA8 ; =ov22_02256B44 - add r0, r4, r0 - mov r1, #2 - add r3, r4, #0 - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256AAC ; =ov22_02256B78 - add r0, r4, r0 - mov r1, #3 - add r3, r4, #0 - bl ov22_02259FF4 - mov r0, #0 - str r0, [sp] - mov r0, #0x4e - lsl r0, r0, #4 - ldr r2, _02256AB0 ; =ov22_02256AE4 - add r0, r4, r0 - mov r1, #4 - add r3, r4, #0 - bl ov22_02259FF4 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02256AA0: .word ov22_02256B04 -_02256AA4: .word ov22_02256B24 -_02256AA8: .word ov22_02256B44 -_02256AAC: .word ov22_02256B78 -_02256AB0: .word ov22_02256AE4 - thumb_func_end ov22_02256A28 - - thumb_func_start ov22_02256AB4 -ov22_02256AB4: ; 0x02256AB4 - add r1, r0, #0 - mov r0, #0x4e - lsl r0, r0, #4 - ldr r3, _02256AC0 ; =ov22_02259F24 - add r0, r1, r0 - bx r3 - ; .align 2, 0 -_02256AC0: .word ov22_02259F24 - thumb_func_end ov22_02256AB4 - - thumb_func_start ov22_02256AC4 -ov22_02256AC4: ; 0x02256AC4 - mov r1, #0x4e - lsl r1, r1, #4 - ldr r3, _02256AD0 ; =ov22_02259F88 - add r0, r0, r1 - bx r3 - nop -_02256AD0: .word ov22_02259F88 - thumb_func_end ov22_02256AC4 - - thumb_func_start ov22_02256AD4 -ov22_02256AD4: ; 0x02256AD4 - mov r1, #0x4e - lsl r1, r1, #4 - ldr r3, _02256AE0 ; =ov22_02259FA0 - add r0, r0, r1 - bx r3 - nop -_02256AE0: .word ov22_02259FA0 - thumb_func_end ov22_02256AD4 - - thumb_func_start ov22_02256AE4 -ov22_02256AE4: ; 0x02256AE4 - push {r4, lr} - mov r0, #0xda - add r4, r1, #0 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02258460 - cmp r0, #0 - beq _02256AFC - ldr r0, _02256B00 ; =0x000006A8 - mov r1, #3 - str r1, [r4, r0] -_02256AFC: - pop {r4, pc} - nop -_02256B00: .word 0x000006A8 - thumb_func_end ov22_02256AE4 - - thumb_func_start ov22_02256B04 -ov22_02256B04: ; 0x02256B04 - push {r4, lr} - mov r0, #0xda - add r4, r1, #0 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02258414 - add r1, r0, #0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r2, #0 - bl ov22_02258258 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02256B04 - - thumb_func_start ov22_02256B24 -ov22_02256B24: ; 0x02256B24 - push {r4, lr} - mov r0, #0xda - add r4, r1, #0 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02258414 - add r1, r0, #0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r2, #1 - bl ov22_02258258 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02256B24 - - thumb_func_start ov22_02256B44 -ov22_02256B44: ; 0x02256B44 - push {r4, lr} - ldr r0, _02256B74 ; =0x000006A8 - add r4, r1, #0 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02256B70 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov22_02258424 - add r2, r0, #0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov22_022582C0 - ldr r0, _02256B74 ; =0x000006A8 - mov r1, #0 - str r1, [r4, r0] -_02256B70: - pop {r4, pc} - nop -_02256B74: .word 0x000006A8 - thumb_func_end ov22_02256B44 - - thumb_func_start ov22_02256B78 -ov22_02256B78: ; 0x02256B78 - push {r4, lr} - ldr r0, _02256BA8 ; =0x000006A8 - add r4, r1, #0 - ldr r0, [r4, r0] - cmp r0, #1 - beq _02256BA4 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov22_02258424 - add r2, r0, #0 - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov22_022582C0 - ldr r0, _02256BA8 ; =0x000006A8 - mov r1, #1 - str r1, [r4, r0] -_02256BA4: - pop {r4, pc} - nop -_02256BA8: .word 0x000006A8 - thumb_func_end ov22_02256B78 - - thumb_func_start ov22_02256BAC -ov22_02256BAC: ; 0x02256BAC - push {r3, r4, r5, lr} - sub sp, #0x28 - add r4, r0, #0 - add r2, sp, #0 - mov r0, #0 - add r3, r1, #0 - add r5, r2, #0 - add r1, r0, #0 - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r4, #0x40] - add r1, r2, #0 - str r0, [sp] - ldr r0, [r4, #0x44] - mov r2, #0xf - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x48 - str r0, [sp, #8] - mov r0, #0xa - str r0, [sp, #0x10] - mov r0, #6 - str r3, [sp, #0xc] - lsl r0, r0, #6 - ldr r0, [r4, r0] - str r0, [sp, #0x24] - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov22_0225A428 - add sp, #0x28 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02256BAC - - thumb_func_start ov22_02256BF4 -ov22_02256BF4: ; 0x02256BF4 - push {r4, lr} - sub sp, #0x28 - ldr r4, [r0, #0x40] - str r4, [sp] - ldr r4, [r0, #0x44] - str r4, [sp, #4] - add r4, r0, #0 - str r1, [sp, #0x10] - add r1, r2, #7 - add r4, #0x48 - str r1, [sp, #0x18] - mov r1, #0x3c - str r4, [sp, #8] - ldr r4, _02256C34 ; =0x00000181 - str r1, [sp, #0x1c] - ldr r1, [sp, #0x30] - str r4, [sp, #0x14] - str r1, [sp, #0xc] - str r3, [sp, #0x20] - sub r1, r4, #1 - ldr r1, [r0, r1] - mov r2, #0x3f - str r1, [sp, #0x24] - mov r1, #0x56 - lsl r1, r1, #4 - add r0, r0, r1 - add r1, sp, #0 - bl ov22_0225A428 - add sp, #0x28 - pop {r4, pc} - nop -_02256C34: .word 0x00000181 - thumb_func_end ov22_02256BF4 - - thumb_func_start ov22_02256C38 -ov22_02256C38: ; 0x02256C38 - mov r1, #0x56 - lsl r1, r1, #4 - ldr r3, _02256C44 ; =ov22_0225A560 - add r0, r0, r1 - bx r3 - nop -_02256C44: .word ov22_0225A560 - thumb_func_end ov22_02256C38 - - thumb_func_start ov22_02256C48 -ov22_02256C48: ; 0x02256C48 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, _02256C6C ; =ov22_02256C70 - mov r1, #0x10 - mov r2, #0xa - mov r3, #0xd - bl sub_0200679C - bl sub_0201CED0 - str r5, [r0, #0] - str r4, [r0, #4] - mov r1, #0 - str r1, [r0, #8] - str r1, [r0, #0xc] - pop {r3, r4, r5, pc} - nop -_02256C6C: .word ov22_02256C70 - thumb_func_end ov22_02256C48 - - thumb_func_start ov22_02256C70 -ov22_02256C70: ; 0x02256C70 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0xc] - cmp r1, #9 - bls _02256C7E - b _02256DB2 -_02256C7E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02256C8A: ; jump table - .short _02256C9E - _02256C8A - 2 ; case 0 - .short _02256CC0 - _02256C8A - 2 ; case 1 - .short _02256CDA - _02256C8A - 2 ; case 2 - .short _02256CF6 - _02256C8A - 2 ; case 3 - .short _02256D0A - _02256C8A - 2 ; case 4 - .short _02256D32 - _02256C8A - 2 ; case 5 - .short _02256D52 - _02256C8A - 2 ; case 6 - .short _02256D78 - _02256C8A - 2 ; case 7 - .short _02256D94 - _02256C8A - 2 ; case 8 - .short _02256DA8 - _02256C8A - 2 ; case 9 -_02256C9E: - mov r0, #0xda - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #3 - mov r2, #0 - bl ov22_02258218 - cmp r0, #0 - bne _02256CB6 - bl sub_02022974 -_02256CB6: - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256CC0: - mov r0, #0xda - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov22_02258460 - cmp r0, #0 - beq _02256DB2 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256CDA: - mov r0, #1 - str r0, [sp] - mov r0, #8 - add r1, r0, #0 - sub r1, #0x18 - mov r2, #0 - mov r3, #0xa - bl sub_0200AAE0 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256CF6: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _02256DB2 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256D0A: - mov r0, #0x4e - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - mov r2, #8 - bl ov22_02259FC4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #8 - blt _02256DB2 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256D32: - mov r1, #7 - add r0, r4, #0 - mvn r1, r1 - mov r2, #5 - mov r3, #8 - bl ov22_02257098 - cmp r0, #0 - beq _02256DB2 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256D52: - ldr r0, [r4, #0] - mov r1, #1 - bl ov22_02256948 - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x40] - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - ldr r0, [r4, #0] - bl ov22_022571D4 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256D78: - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - str r0, [sp] - mov r0, #8 - sub r2, #0x10 - mov r3, #0xa - bl sub_0200AAE0 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256D94: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _02256DB2 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256DA8: - ldr r1, [r4, #4] - mov r2, #1 - str r2, [r1, #0] - bl sub_020067D0 -_02256DB2: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02256C70 - - thumb_func_start ov22_02256DB8 -ov22_02256DB8: ; 0x02256DB8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, _02256DDC ; =ov22_02256DE0 - mov r1, #0x10 - mov r2, #0xa - mov r3, #0xd - bl sub_0200679C - bl sub_0201CED0 - str r5, [r0, #0] - str r4, [r0, #4] - mov r1, #0 - str r1, [r0, #8] - str r1, [r0, #0xc] - pop {r3, r4, r5, pc} - nop -_02256DDC: .word ov22_02256DE0 - thumb_func_end ov22_02256DB8 - - thumb_func_start ov22_02256DE0 -ov22_02256DE0: ; 0x02256DE0 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0xc] - cmp r1, #9 - bls _02256DEE - b _02256F32 -_02256DEE: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02256DFA: ; jump table - .short _02256E0E - _02256DFA - 2 ; case 0 - .short _02256E2A - _02256DFA - 2 ; case 1 - .short _02256E3E - _02256DFA - 2 ; case 2 - .short _02256E72 - _02256DFA - 2 ; case 3 - .short _02256E92 - _02256DFA - 2 ; case 4 - .short _02256EBC - _02256DFA - 2 ; case 5 - .short _02256ED8 - _02256DFA - 2 ; case 6 - .short _02256EEC - _02256DFA - 2 ; case 7 - .short _02256F0E - _02256DFA - 2 ; case 8 - .short _02256F28 - _02256DFA - 2 ; case 9 -_02256E0E: - mov r0, #1 - str r0, [sp] - mov r0, #8 - add r1, r0, #0 - sub r1, #0x18 - mov r2, #0 - mov r3, #0xa - bl sub_0200AAE0 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256E2A: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _02256F32 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256E3E: - ldr r0, [r4, #0] - bl ov22_02257258 - ldr r0, [r4, #0] - bl ov22_022568DC - ldr r0, [r4, #0] - bl ov22_02256AD4 - ldr r0, [r4, #0] - mov r1, #0 - bl ov22_02256948 - ldr r0, [r4, #0] - mov r2, #3 - add r3, r2, #0 - ldr r0, [r0, #0x40] - mov r1, #1 - sub r3, #0x2b - bl sub_0201C63C - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256E72: - mov r1, #8 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0xd - add r3, r1, #0 - bl ov22_02257098 - cmp r0, #0 - beq _02256F32 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256E92: - mov r0, #0x4e - ldr r1, [r4, #0] - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - add r2, r1, #0 - sub r2, #8 - bl ov22_02259FC4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #8 - blt _02256F32 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256EBC: - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - str r0, [sp] - mov r0, #8 - sub r2, #0x10 - mov r3, #0xa - bl sub_0200AAE0 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256ED8: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #0 - beq _02256F32 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256EEC: - mov r0, #0xda - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0 - add r2, r1, #0 - bl ov22_02258218 - cmp r0, #0 - bne _02256F04 - bl sub_02022974 -_02256F04: - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256F0E: - mov r0, #0xda - ldr r1, [r4, #0] - lsl r0, r0, #2 - add r0, r1, r0 - bl ov22_02258460 - cmp r0, #0 - beq _02256F32 - ldr r0, [r4, #0xc] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r3, r4, pc} -_02256F28: - ldr r1, [r4, #4] - mov r2, #1 - str r2, [r1, #0] - bl sub_020067D0 -_02256F32: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02256DE0 - - thumb_func_start ov22_02256F38 -ov22_02256F38: ; 0x02256F38 - push {r3, r4, r5, r6, r7, lr} - str r1, [sp] - add r6, r0, #0 - add r4, r2, #0 - bl sub_02029F84 - ldr r1, [sp] - ldr r2, [sp] - add r1, #0x84 - ldr r1, [r1, #0] - add r0, r6, #0 - add r2, #0x78 - bl sub_02029FAC - cmp r4, #0 - beq _02256F78 - add r0, r4, #0 - mov r1, #0xd - bl sub_02025F04 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02025F30 - add r2, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - bl sub_0202A0EC - add r0, r5, #0 - bl sub_020237BC -_02256F78: - ldr r0, [sp] - mov r5, #0 - add r7, r0, #0 - ldr r4, [r0, #0x1c] - add r7, #0x14 - cmp r4, r7 - beq _02256F9E -_02256F86: - ldr r0, [r4, #4] - cmp r0, #0 - bne _02256F98 - ldr r1, [r4, #0] - add r0, r6, #0 - add r2, r5, #0 - bl sub_02029FD0 - add r5, r5, #1 -_02256F98: - ldr r4, [r4, #8] - cmp r4, r7 - bne _02256F86 -_02256F9E: - ldr r0, [sp] - ldr r4, [r0, #0xc] - add r7, r0, #4 - cmp r4, r7 - beq _02256FC0 -_02256FA8: - ldr r0, [r4, #4] - cmp r0, #0 - bne _02256FBA - ldr r1, [r4, #0] - add r0, r6, #0 - add r2, r5, #0 - bl sub_02029FD0 - add r5, r5, #1 -_02256FBA: - ldr r4, [r4, #8] - cmp r4, r7 - bne _02256FA8 -_02256FC0: - ldr r1, [sp] - add r0, r6, #0 - ldr r1, [r1, #0x74] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0202A084 - add r0, r6, #0 - bl sub_02029F5C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02256F38 - - thumb_func_start ov22_02256FD8 -ov22_02256FD8: ; 0x02256FD8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - str r1, [sp] - mov r0, #0xd - mov r1, #0xac - str r2, [sp, #4] - add r4, r3, #0 - bl sub_02018144 - add r6, r0, #0 - bl ov22_0225764C - ldr r1, [sp] - ldr r2, [sp] - add r1, #0x84 - ldr r1, [r1, #0] - add r0, r7, #0 - add r2, #0x78 - bl sub_0202A284 - cmp r4, #0 - beq _02257026 - add r0, r4, #0 - mov r1, #0xd - bl sub_02025F04 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02025F30 - add r2, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - bl sub_0202A4B4 - add r0, r5, #0 - bl sub_020237BC -_02257026: - ldr r1, [sp] - add r0, r6, #0 - add r1, #0x14 - mov r2, #1 - bl ov22_02257778 - ldr r1, [sp] - add r0, r6, #0 - add r1, r1, #4 - mov r2, #0 - bl ov22_02257778 - add r0, r6, #0 - bl ov22_0225768C - mov r4, #0 - add r5, r4, #0 -_02257048: - add r0, r6, #0 - add r1, r5, #0 - bl ov22_022576FC - cmp r0, #1 - bne _0225706A - add r0, r6, #0 - add r1, r5, #0 - bl ov22_022576E8 - add r1, r0, #0 - ldr r1, [r1, #0] - add r0, r7, #0 - add r2, r4, #0 - bl sub_0202A2A8 - add r4, r4, #1 -_0225706A: - add r5, r5, #1 - cmp r5, #0x15 - blt _02257048 - ldr r1, [sp] - add r0, r7, #0 - ldr r1, [r1, #0x74] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0202A35C - ldr r1, [sp, #4] - add r0, r7, #0 - bl sub_0202A378 - add r0, r7, #0 - bl sub_0202A240 - add r0, r6, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02256FD8 - - thumb_func_start ov22_02257098 -ov22_02257098: ; 0x02257098 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #8 - bge _022570B4 - mov r0, #0xfd - ldr r3, [r5, #0] - lsl r0, r0, #2 - add r0, r3, r0 - bl ov22_02257AB0 -_022570B4: - ldr r0, [r5, #8] - cmp r0, #1 - blt _022570F2 - ldr r0, [r5, #0] - mov r1, #2 - ldr r0, [r0, #0x40] - add r2, r1, #0 - add r3, r4, #0 - bl sub_0201C63C - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0x40] - mov r2, #2 - add r3, r4, #0 - bl sub_0201C63C - ldr r0, [r5, #0] - mov r1, #2 - ldr r0, [r0, #0x40] - mov r2, #5 - add r3, r6, #0 - bl sub_0201C63C - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0x40] - mov r2, #5 - add r3, r6, #0 - bl sub_0201C63C -_022570F2: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - cmp r0, r7 - ble _02257100 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02257100: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02257098 - - thumb_func_start ov22_02257104 -ov22_02257104: ; 0x02257104 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - mov r1, #3 - bl sub_02019EBC - mov r2, #0 - ldr r0, [r4, #0x40] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - ldr r0, [r4, #0x40] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #0 - bl ov22_022574F4 - ldr r1, _02257188 ; =0x04000008 - mov r3, #3 - ldrh r2, [r1] - mov r0, #2 - bic r2, r3 - orr r0, r2 - strh r0, [r1] - ldrh r2, [r1, #2] - mov r0, #1 - bic r2, r3 - orr r2, r0 - strh r2, [r1, #2] - ldrh r4, [r1, #4] - mov r2, #3 - bic r4, r3 - orr r2, r4 - strh r2, [r1, #4] - ldrh r2, [r1, #6] - bic r2, r3 - strh r2, [r1, #6] - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0 - bl sub_0200F338 - pop {r4, pc} - nop -_02257188: .word 0x04000008 - thumb_func_end ov22_02257104 - - thumb_func_start ov22_0225718C -ov22_0225718C: ; 0x0225718C - push {r4, lr} - add r4, r0, #0 - bl ov22_02257548 - ldr r0, [r4, #0x40] - mov r1, #3 - bl sub_02019EBC - add r0, r4, #0 - bl ov22_022568DC - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - ldr r0, [r4, #0x44] - mov r1, #1 - bl sub_020219A4 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - pop {r4, pc} - thumb_func_end ov22_0225718C - - thumb_func_start ov22_022571D4 -ov22_022571D4: ; 0x022571D4 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0x40] - mov r1, #3 - bl sub_02019EBC - mov r2, #0 - ldr r0, [r4, #0x40] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - ldr r0, [r4, #0x40] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #0x40] - mov r1, #0x19 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - add r0, sp, #0 - strb r1, [r0, #0x10] - mov r1, #4 - strb r1, [r0, #0x11] - mov r0, #0x6b - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0 - bl sub_02015958 - add r0, r4, #0 - mov r1, #1 - bl ov22_022574CC - ldr r0, _02257254 ; =0x04000008 - mov r2, #3 - ldrh r3, [r0] - mov r1, #2 - bic r3, r2 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0, #2] - mov r1, #1 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #2] - ldrh r3, [r0, #4] - mov r1, #3 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #4] - ldrh r1, [r0, #6] - bic r1, r2 - strh r1, [r0, #6] - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_02257254: .word 0x04000008 - thumb_func_end ov22_022571D4 - - thumb_func_start ov22_02257258 -ov22_02257258: ; 0x02257258 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6b - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02015A54 - add r0, r4, #0 - bl ov22_022574EC - ldr r0, [r4, #0x40] - mov r1, #3 - bl sub_02019EBC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02257258 - - thumb_func_start ov22_02257278 -ov22_02257278: ; 0x02257278 - push {r3, lr} - mov r1, #0x6b - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl sub_020159FC - cmp r0, #0 - beq _02257292 - cmp r0, #1 - beq _02257296 - cmp r0, #2 - beq _0225729A - pop {r3, pc} -_02257292: - mov r0, #4 - pop {r3, pc} -_02257296: - mov r0, #8 - pop {r3, pc} -_0225729A: - mov r0, #9 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_02257278 - - thumb_func_start ov22_022572A0 -ov22_022572A0: ; 0x022572A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, _02257358 ; =0x000006D4 - str r1, [sp, #0x14] - ldr r0, [r5, r0] - add r7, r2, #0 - add r4, r3, #0 - bl sub_02027B50 - add r6, r0, #0 - mov r0, #0 - mov r1, #0xe0 - mov r2, #0xe - bl sub_02002E98 - str r4, [sp] - add r0, sp, #0x20 - ldrb r1, [r0, #0x10] - mov r2, #3 - add r3, r7, #0 - str r1, [sp, #4] - ldrb r0, [r0, #0x14] - ldr r1, _0225735C ; =0x000006B4 - str r0, [sp, #8] - mov r0, #7 - str r0, [sp, #0xc] - mov r0, #0x92 - str r0, [sp, #0x10] - ldr r0, [r5, #0x40] - ldr r1, [r5, r1] - bl sub_0201A7E8 - ldr r0, _0225735C ; =0x000006B4 - mov r1, #0xf - ldr r0, [r5, r0] - bl sub_0201ADA4 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - ldr r0, [r5, #0x40] - mov r1, #3 - mov r2, #0x74 - mov r3, #8 - bl sub_0200DD0C - ldr r0, _0225735C ; =0x000006B4 - mov r1, #0 - ldr r0, [r5, r0] - mov r2, #0x74 - mov r3, #8 - bl sub_0200E060 - ldr r2, _02257360 ; =0x00000181 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xd - bl sub_0200B144 - ldr r1, [sp, #0x14] - add r6, r0, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r3, #0 - str r3, [sp] - ldr r0, _02257364 ; =0x0001020F - str r3, [sp, #4] - str r0, [sp, #8] - ldr r0, _0225735C ; =0x000006B4 - str r3, [sp, #0xc] - ldr r0, [r5, r0] - mov r1, #1 - add r2, r4, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - ldr r0, _0225735C ; =0x000006B4 - ldr r0, [r5, r0] - bl sub_0201A954 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02257358: .word 0x000006D4 -_0225735C: .word 0x000006B4 -_02257360: .word 0x00000181 -_02257364: .word 0x0001020F - thumb_func_end ov22_022572A0 - - thumb_func_start ov22_02257368 -ov22_02257368: ; 0x02257368 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _022573E0 ; =0x000006B4 - add r4, r1, #0 - ldr r0, [r5, r0] - mov r1, #0xf - bl sub_0201ADA4 - ldr r2, _022573E4 ; =0x00000181 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xd - bl sub_0200B144 - add r1, r4, #0 - add r7, r0, #0 - bl sub_0200B1EC - add r6, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - mov r1, #0xd - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - ldr r0, _022573E8 ; =0x0001020F - str r3, [sp, #4] - str r0, [sp, #8] - ldr r0, _022573E0 ; =0x000006B4 - str r3, [sp, #0xc] - ldr r0, [r5, r0] - mov r1, #1 - add r2, r4, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - ldr r0, _022573E0 ; =0x000006B4 - ldr r0, [r5, r0] - bl sub_0201A954 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022573E0: .word 0x000006B4 -_022573E4: .word 0x00000181 -_022573E8: .word 0x0001020F - thumb_func_end ov22_02257368 - - thumb_func_start ov22_022573EC -ov22_022573EC: ; 0x022573EC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _02257488 ; =0x000006DC - add r4, r1, #0 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02257400 - bl sub_02022974 -_02257400: - ldr r0, _0225748C ; =0x000006B4 - mov r1, #0xf - ldr r0, [r5, r0] - bl sub_0201ADA4 - ldr r2, _02257490 ; =0x00000181 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xd - bl sub_0200B144 - add r1, r4, #0 - add r7, r0, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - mov r1, #0xd - bl sub_02023790 - ldr r1, _02257488 ; =0x000006DC - add r2, r4, #0 - str r0, [r5, r1] - add r0, r1, #4 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - bl sub_0200C388 - mov r0, #0x6d - lsl r0, r0, #4 - ldr r1, [r5, r0] - ldrb r1, [r1, #0x16] - cmp r1, #0 - bne _02257450 - add r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02027AC0 - b _02257452 -_02257450: - mov r0, #1 -_02257452: - mov r3, #0 - str r3, [sp] - str r0, [sp, #4] - ldr r0, _02257494 ; =0x0001020F - ldr r2, _0225748C ; =0x000006B4 - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r5, r2] - add r2, #0x28 - ldr r2, [r5, r2] - mov r1, #1 - bl sub_0201D78C - add r6, r0, #0 - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - ldr r0, _0225748C ; =0x000006B4 - ldr r0, [r5, r0] - bl sub_0201A954 - add r0, r6, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02257488: .word 0x000006DC -_0225748C: .word 0x000006B4 -_02257490: .word 0x00000181 -_02257494: .word 0x0001020F - thumb_func_end ov22_022573EC - - thumb_func_start ov22_02257498 -ov22_02257498: ; 0x02257498 - push {r4, lr} - add r4, r0, #0 - ldr r0, _022574AC ; =0x000006DC - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _022574AC ; =0x000006DC - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_022574AC: .word 0x000006DC - thumb_func_end ov22_02257498 - - thumb_func_start ov22_022574B0 -ov22_022574B0: ; 0x022574B0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _022574C8 ; =0x000006B4 - ldr r0, [r4, r0] - bl sub_0201ACF4 - ldr r0, _022574C8 ; =0x000006B4 - ldr r0, [r4, r0] - bl sub_0201A8FC - pop {r4, pc} - nop -_022574C8: .word 0x000006B4 - thumb_func_end ov22_022574B0 - - thumb_func_start ov22_022574CC -ov22_022574CC: ; 0x022574CC - push {r3, lr} - sub sp, #8 - mov r2, #0x1b - str r2, [sp] - mov r2, #2 - mov r3, #1 - str r2, [sp, #4] - bl ov22_022572A0 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_022574CC - - thumb_func_start ov22_022574E4 -ov22_022574E4: ; 0x022574E4 - ldr r3, _022574E8 ; =ov22_02257368 - bx r3 - ; .align 2, 0 -_022574E8: .word ov22_02257368 - thumb_func_end ov22_022574E4 - - thumb_func_start ov22_022574EC -ov22_022574EC: ; 0x022574EC - ldr r3, _022574F0 ; =ov22_022574B0 - bx r3 - ; .align 2, 0 -_022574F0: .word ov22_022574B0 - thumb_func_end ov22_022574EC - - thumb_func_start ov22_022574F4 -ov22_022574F4: ; 0x022574F4 - push {r4, lr} - sub sp, #8 - mov r2, #0x1b - str r2, [sp] - mov r2, #4 - str r2, [sp, #4] - mov r2, #2 - mov r3, #0x13 - add r4, r0, #0 - bl ov22_022572A0 - mov r0, #0xd - bl sub_0200B358 - mov r1, #0x6e - lsl r1, r1, #4 - str r0, [r4, r1] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022574F4 - - thumb_func_start ov22_0225751C -ov22_0225751C: ; 0x0225751C - ldr r3, _02257520 ; =ov22_022573EC - bx r3 - ; .align 2, 0 -_02257520: .word ov22_022573EC - thumb_func_end ov22_0225751C - - thumb_func_start ov22_02257524 -ov22_02257524: ; 0x02257524 - push {r3, lr} - sub sp, #8 - mov r3, #0 - str r3, [sp] - mov r3, #1 - str r3, [sp, #4] - mov r3, #0x6e - lsl r3, r3, #4 - ldr r0, [r0, r3] - mov r3, #2 - bl sub_0200B60C - add sp, #8 - pop {r3, pc} - thumb_func_end ov22_02257524 - - thumb_func_start ov22_02257540 -ov22_02257540: ; 0x02257540 - ldr r3, _02257544 ; =ov22_02257498 - bx r3 - ; .align 2, 0 -_02257544: .word ov22_02257498 - thumb_func_end ov22_02257540 - - thumb_func_start ov22_02257548 -ov22_02257548: ; 0x02257548 - push {r4, lr} - add r4, r0, #0 - bl ov22_022574B0 - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200B3F0 - mov r0, #0x6e - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - pop {r4, pc} - thumb_func_end ov22_02257548 - - thumb_func_start ov22_02257564 -ov22_02257564: ; 0x02257564 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xfd - lsl r0, r0, #2 - add r0, r4, r0 - bl ov22_02257D00 - add r1, r0, #0 - mov r0, #0x56 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov22_0225A6B8 - pop {r4, pc} - thumb_func_end ov22_02257564 - - thumb_func_start ov22_02257580 -ov22_02257580: ; 0x02257580 - push {r4, lr} - cmp r0, #3 - bhi _022575AA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02257592: ; jump table - .short _0225759A - _02257592 - 2 ; case 0 - .short _0225759E - _02257592 - 2 ; case 1 - .short _022575A2 - _02257592 - 2 ; case 2 - .short _022575A6 - _02257592 - 2 ; case 3 -_0225759A: - mov r4, #5 - b _022575AE -_0225759E: - mov r4, #0xa - b _022575AE -_022575A2: - mov r4, #0xf - b _022575AE -_022575A6: - mov r4, #0x14 - b _022575AE -_022575AA: - bl sub_02022974 -_022575AE: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02257580 - - thumb_func_start ov22_022575B4 -ov22_022575B4: ; 0x022575B4 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0x40] - mov r1, #0x19 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - add r0, sp, #0 - strb r1, [r0, #0x10] - mov r1, #4 - strb r1, [r0, #0x11] - mov r0, #0x6b - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02015A54 - mov r0, #0x6b - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0 - bl sub_02015958 - add r0, r4, #0 - mov r1, #2 - bl ov22_022574E4 - ldr r0, _02257620 ; =0x04000008 - mov r2, #3 - ldrh r3, [r0] - mov r1, #2 - bic r3, r2 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0, #2] - mov r1, #1 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #2] - ldrh r3, [r0, #4] - mov r1, #3 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #4] - ldrh r1, [r0, #6] - bic r1, r2 - strh r1, [r0, #6] - add sp, #0x14 - pop {r3, r4, pc} - nop -_02257620: .word 0x04000008 - thumb_func_end ov22_022575B4 - - thumb_func_start ov22_02257624 -ov22_02257624: ; 0x02257624 - push {r3, lr} - mov r1, #0x6b - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl sub_020159FC - cmp r0, #0 - beq _0225763E - cmp r0, #1 - beq _02257642 - cmp r0, #2 - beq _02257646 - pop {r3, pc} -_0225763E: - mov r0, #5 - pop {r3, pc} -_02257642: - mov r0, #6 - pop {r3, pc} -_02257646: - mov r0, #7 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_02257624 - - thumb_func_start ov22_0225764C -ov22_0225764C: ; 0x0225764C - ldr r3, _02257654 ; =sub_020D5124 - mov r1, #0 - mov r2, #0xac - bx r3 - ; .align 2, 0 -_02257654: .word sub_020D5124 - thumb_func_end ov22_0225764C - - thumb_func_start ov22_02257658 -ov22_02257658: ; 0x02257658 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0 - bne _02257668 - bl sub_02022974 -_02257668: - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - lsl r0, r0, #3 - str r4, [r5, r0] - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - lsl r0, r0, #3 - add r0, r5, r0 - str r6, [r0, #4] - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - add r5, #0xa8 - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} - thumb_func_end ov22_02257658 - - thumb_func_start ov22_0225768C -ov22_0225768C: ; 0x0225768C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r0, #0xa8 - ldr r2, [r0, #0] - mov r1, #0 - cmp r2, #0 - ble _022576E4 -_0225769A: - lsl r0, r1, #3 - add r7, r6, r0 - ldr r0, [r7, #4] - cmp r0, #1 - bne _022576D8 - mov r4, #0 - cmp r2, #0 - ble _022576D0 - add r5, r6, #0 -_022576AC: - ldr r0, [r5, #4] - cmp r0, #0 - bne _022576C2 - add r0, r7, #0 - add r1, r5, #0 - bl ov22_0225771C - cmp r0, #1 - bne _022576C2 - mov r0, #1 - str r0, [r5, #4] -_022576C2: - add r0, r6, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, #8 - cmp r4, r0 - blt _022576AC -_022576D0: - mov r0, #2 - str r0, [r7, #4] - mov r1, #0 - b _022576DA -_022576D8: - add r1, r1, #1 -_022576DA: - add r0, r6, #0 - add r0, #0xa8 - ldr r2, [r0, #0] - cmp r1, r2 - blt _0225769A -_022576E4: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225768C - - thumb_func_start ov22_022576E8 -ov22_022576E8: ; 0x022576E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #0x15 - blo _022576F6 - bl sub_02022974 -_022576F6: - lsl r0, r5, #3 - ldr r0, [r4, r0] - pop {r3, r4, r5, pc} - thumb_func_end ov22_022576E8 - - thumb_func_start ov22_022576FC -ov22_022576FC: ; 0x022576FC - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #0x15 - blo _0225770A - bl sub_02022974 -_0225770A: - lsl r0, r5, #3 - add r0, r4, r0 - ldr r0, [r0, #4] - cmp r0, #0 - beq _02257718 - mov r0, #1 - pop {r3, r4, r5, pc} -_02257718: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov22_022576FC - - thumb_func_start ov22_0225771C -ov22_0225771C: ; 0x0225771C - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r4, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - add r1, sp, #0x28 - add r2, sp, #0x24 - bl ov22_02259780 - add r0, sp, #0x20 - str r0, [sp] - ldr r0, [r4, #0] - add r1, sp, #0x14 - add r2, sp, #0x18 - add r3, sp, #0x1c - bl ov22_02259724 - mov r4, #0 - add r6, sp, #0x10 - add r7, sp, #0xc -_02257744: - str r4, [sp] - str r6, [sp, #4] - str r7, [sp, #8] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - bl ov22_022577EC - ldr r0, [r5, #0] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl ov22_02259578 - cmp r0, #1 - bne _0225776A - add sp, #0x2c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0225776A: - add r4, r4, #1 - cmp r4, #0x10 - blt _02257744 - mov r0, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225771C - - thumb_func_start ov22_02257778 -ov22_02257778: ; 0x02257778 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r4, [r5, #8] - add r6, r0, #0 - add r7, r2, #0 - cmp r4, r5 - beq _0225779C -_02257786: - ldr r0, [r4, #4] - cmp r0, #0 - bne _02257796 - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov22_02257658 -_02257796: - ldr r4, [r4, #8] - cmp r4, r5 - bne _02257786 -_0225779C: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02257778 - - thumb_func_start ov22_022577A0 -ov22_022577A0: ; 0x022577A0 - push {r3, r4, r5, lr} - mov r2, #0x6d - lsl r2, r2, #4 - ldr r2, [r0, r2] - mov r1, #0 - ldrb r3, [r2, #0x16] - cmp r3, #0 - bne _022577BC - mov r2, #0x56 - lsl r2, r2, #4 - add r0, r0, r2 - bl ov22_0225A6CC - pop {r3, r4, r5, pc} -_022577BC: - ldrb r4, [r2, #0x14] - ldrb r3, [r2, #0x15] - cmp r4, r3 - bne _022577EA - add r4, r1, #0 - add r5, r2, #0 -_022577C8: - ldrb r3, [r5, #0x10] - cmp r3, #1 - bne _022577D0 - add r1, r1, #1 -_022577D0: - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #4 - blt _022577C8 - ldrb r2, [r2, #0x17] - cmp r2, r1 - bgt _022577EA - mov r1, #0x56 - lsl r1, r1, #4 - add r0, r0, r1 - mov r1, #0 - bl ov22_0225A6CC -_022577EA: - pop {r3, r4, r5, pc} - thumb_func_end ov22_022577A0 - - thumb_func_start ov22_022577EC -ov22_022577EC: ; 0x022577EC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r0, #0 - str r1, [sp] - add r7, r2, #0 - add r0, r3, #0 - sub r0, r0, r7 - mov r1, #3 - str r3, [sp, #4] - ldr r4, [sp, #0x2c] - ldr r5, [sp, #0x30] - bl sub_020E2178 - add r1, r7, r0 - lsl r0, r0, #1 - add r0, r7, r0 - str r0, [sp, #8] - ldr r0, [sp] - str r1, [sp, #0xc] - sub r0, r0, r6 - mov r1, #3 - bl sub_020E2178 - add r2, r6, r0 - lsl r0, r0, #1 - ldr r1, [sp, #0x28] - add r0, r6, r0 - cmp r1, #0xf - bhi _022578EE - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02257832: ; jump table - .short _02257852 - _02257832 - 2 ; case 0 - .short _0225785A - _02257832 - 2 ; case 1 - .short _02257862 - _02257832 - 2 ; case 2 - .short _0225786A - _02257832 - 2 ; case 3 - .short _02257874 - _02257832 - 2 ; case 4 - .short _0225787E - _02257832 - 2 ; case 5 - .short _02257888 - _02257832 - 2 ; case 6 - .short _02257892 - _02257832 - 2 ; case 7 - .short _0225789E - _02257832 - 2 ; case 8 - .short _022578A8 - _02257832 - 2 ; case 9 - .short _022578B2 - _02257832 - 2 ; case 10 - .short _022578BC - _02257832 - 2 ; case 11 - .short _022578C8 - _02257832 - 2 ; case 12 - .short _022578D2 - _02257832 - 2 ; case 13 - .short _022578DC - _02257832 - 2 ; case 14 - .short _022578E6 - _02257832 - 2 ; case 15 -_02257852: - str r7, [r4, #0] - add sp, #0x10 - str r6, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_0225785A: - str r7, [r4, #0] - add sp, #0x10 - str r2, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_02257862: - str r7, [r4, #0] - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_0225786A: - ldr r0, [sp] - str r7, [r4, #0] - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_02257874: - ldr r0, [sp, #0xc] - add sp, #0x10 - str r0, [r4, #0] - str r6, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_0225787E: - ldr r0, [sp, #0xc] - add sp, #0x10 - str r0, [r4, #0] - str r2, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_02257888: - ldr r1, [sp, #0xc] - add sp, #0x10 - str r1, [r4, #0] - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_02257892: - ldr r0, [sp, #0xc] - str r0, [r4, #0] - ldr r0, [sp] - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_0225789E: - ldr r0, [sp, #8] - add sp, #0x10 - str r0, [r4, #0] - str r6, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578A8: - ldr r0, [sp, #8] - add sp, #0x10 - str r0, [r4, #0] - str r2, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578B2: - ldr r1, [sp, #8] - add sp, #0x10 - str r1, [r4, #0] - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578BC: - ldr r0, [sp, #8] - str r0, [r4, #0] - ldr r0, [sp] - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578C8: - ldr r0, [sp, #4] - add sp, #0x10 - str r0, [r4, #0] - str r6, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578D2: - ldr r0, [sp, #4] - add sp, #0x10 - str r0, [r4, #0] - str r2, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578DC: - ldr r1, [sp, #4] - add sp, #0x10 - str r1, [r4, #0] - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022578E6: - ldr r0, [sp, #4] - str r0, [r4, #0] - ldr r0, [sp] - str r0, [r5, #0] -_022578EE: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022577EC - - thumb_func_start ov22_022578F4 -ov22_022578F4: ; 0x022578F4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0] - mov r2, #0 - str r0, [r4, #0x2c] - ldr r0, [r1, #4] - str r0, [r4, #0x30] - ldr r0, [r1, #8] - str r0, [r4, #0x34] - ldr r0, [r1, #0xc] - str r0, [r4, #0x38] - ldr r0, [r1, #0x10] - str r0, [r4, #0x3c] - ldr r0, [r1, #0x14] - str r0, [r4, #0x40] - ldr r0, [r1, #0x18] - str r0, [r4, #0x44] - str r2, [r4, #0x74] - ldr r0, [r1, #0x1c] - str r0, [r4, #0] - add r0, r4, #4 - str r0, [r4, #0xc] - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x14 - str r0, [r4, #0x1c] - str r0, [r4, #0x20] - str r2, [r4, #0x24] - ldr r0, [r1, #0x20] - add r1, r4, #0 - str r0, [r4, #0x28] - ldr r0, [r4, #0] - add r1, #0x78 - mov r2, #3 - bl ov22_022594C0 - add r4, #0x14 - add r1, r4, #0 - bl ov22_02259520 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022578F4 - - thumb_func_start ov22_02257948 -ov22_02257948: ; 0x02257948 - push {r4, lr} - add r4, r0, #0 - bl ov22_022579F0 - add r0, r4, #0 - bl ov22_02257A98 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x88 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02257948 - - thumb_func_start ov22_02257964 -ov22_02257964: ; 0x02257964 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [sp, #0x20] - add r6, r1, #0 - str r0, [sp] - add r5, r2, #0 - add r0, r4, #0 - add r7, r3, #0 - ldr r1, [r4, #0x3c] - add r0, #0x78 - add r2, r6, #0 - add r3, r5, #0 - bl ov22_022590C0 - add r0, r4, #0 - ldr r1, [sp, #0x1c] - add r0, #0x78 - bl ov22_022591D0 - add r4, #0x78 - ldr r2, [sp, #0x18] - add r0, r4, #0 - add r1, r7, #0 - bl ov22_022591EC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02257964 - - thumb_func_start ov22_02257998 -ov22_02257998: ; 0x02257998 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - str r3, [sp] - add r5, r1, #0 - add r4, r2, #0 - ldr r1, [r6, #0x3c] - add r0, #0x78 - add r2, r5, #0 - add r3, r4, #0 - bl ov22_022590C0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov22_02257998 - - thumb_func_start ov22_022579B4 -ov22_022579B4: ; 0x022579B4 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - add r5, r1, #0 - add r4, r2, #0 - add r0, r6, #0 - ldr r1, [r6, #0x3c] - add r0, #0x78 - add r2, r5, #0 - add r3, r4, #0 - bl ov22_022590D4 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_022579B4 - - thumb_func_start ov22_022579D8 -ov22_022579D8: ; 0x022579D8 - ldr r3, _022579E4 ; =ov22_02259520 - add r2, r0, #0 - add r0, r1, #0 - ldr r1, [r2, #0x20] - bx r3 - nop -_022579E4: .word ov22_02259520 - thumb_func_end ov22_022579D8 - - thumb_func_start ov22_022579E8 -ov22_022579E8: ; 0x022579E8 - ldr r3, _022579EC ; =ov22_02259530 - bx r3 - ; .align 2, 0 -_022579EC: .word ov22_02259530 - thumb_func_end ov22_022579E8 - - thumb_func_start ov22_022579F0 -ov22_022579F0: ; 0x022579F0 - ldr r3, _022579F8 ; =ov22_022591B8 - add r0, #0x78 - bx r3 - nop -_022579F8: .word ov22_022591B8 - thumb_func_end ov22_022579F0 - - thumb_func_start ov22_022579FC -ov22_022579FC: ; 0x022579FC - push {r3, r4, r5, lr} - sub sp, #0x20 - add r4, r0, #0 - ldr r5, [r4, #0x24] - ldr r0, [r4, #0x28] - cmp r5, r0 - bge _02257A56 - ldr r0, [r4, #0x44] - str r0, [sp] - ldr r0, [r4, #0x2c] - str r0, [sp, #4] - ldr r5, [r4, #0x30] - lsl r0, r1, #2 - ldr r0, [r5, r0] - str r0, [sp, #8] - ldr r0, [r4, #0x34] - ldr r0, [r0, #0] - str r2, [sp, #0x10] - str r3, [sp, #0x14] - str r1, [sp, #0x18] - str r0, [sp, #0xc] - ldr r0, [r4, #0x38] - ldrb r0, [r0, r1] - str r0, [sp, #0x1c] - add r0, sp, #0 - bl ov22_02254E20 - ldr r1, [sp, #0x30] - add r5, r0, #0 - bl ov22_02254F6C - ldr r0, [r4, #0] - add r1, r5, #0 - mov r2, #0 - bl ov22_022594C0 - add r1, r4, #4 - bl ov22_02259520 - ldr r0, [r4, #0x24] - add sp, #0x20 - add r0, r0, #1 - str r0, [r4, #0x24] - mov r0, #1 - pop {r3, r4, r5, pc} -_02257A56: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov22_022579FC - - thumb_func_start ov22_02257A5C -ov22_02257A5C: ; 0x02257A5C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r3, r2, #0 - ldr r5, [r4, #0x24] - ldr r2, [r4, #0x28] - cmp r5, r2 - bge _02257A7A - mov r2, #1 - bl ov22_02257DEC - ldr r0, [r4, #0x24] - add r0, r0, #1 - str r0, [r4, #0x24] - mov r0, #1 - pop {r3, r4, r5, pc} -_02257A7A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02257A5C - - thumb_func_start ov22_02257A80 -ov22_02257A80: ; 0x02257A80 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl ov22_02259530 - ldr r0, [r4, #0x24] - sub r0, r0, #1 - str r0, [r4, #0x24] - bpl _02257A96 - bl sub_02022974 -_02257A96: - pop {r4, pc} - thumb_func_end ov22_02257A80 - - thumb_func_start ov22_02257A98 -ov22_02257A98: ; 0x02257A98 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl ov22_02259540 - add r0, r4, #0 - add r0, #0x14 - bl ov22_02259540 - mov r0, #0 - str r0, [r4, #0x24] - pop {r4, pc} - thumb_func_end ov22_02257A98 - - thumb_func_start ov22_02257AB0 -ov22_02257AB0: ; 0x02257AB0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r5, #4 - add r4, r1, #0 - add r6, r2, #0 - bl ov22_022596EC - add r5, #0x14 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov22_022596EC - pop {r4, r5, r6, pc} - thumb_func_end ov22_02257AB0 - - thumb_func_start ov22_02257ACC -ov22_02257ACC: ; 0x02257ACC - ldr r3, _02257AD4 ; =ov22_022596EC - add r0, #0x14 - bx r3 - nop -_02257AD4: .word ov22_022596EC - thumb_func_end ov22_02257ACC - - thumb_func_start ov22_02257AD8 -ov22_02257AD8: ; 0x02257AD8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - neg r4, r2 - neg r7, r1 - add r0, r5, #4 - add r1, r7, #0 - add r2, r4, #0 - add r6, r3, #0 - bl ov22_022596EC - ldr r2, [sp, #0x18] - add r0, r5, #4 - add r1, r6, #0 - bl ov22_022596EC - add r0, r5, #0 - add r0, #0x14 - add r1, r7, #0 - add r2, r4, #0 - bl ov22_022596EC - add r5, #0x14 - ldr r2, [sp, #0x18] - add r0, r5, #0 - add r1, r6, #0 - bl ov22_022596EC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02257AD8 - - thumb_func_start ov22_02257B10 -ov22_02257B10: ; 0x02257B10 - ldr r3, _02257B18 ; =ov22_02257B1C - mov r1, #0 - mvn r1, r1 - bx r3 - ; .align 2, 0 -_02257B18: .word ov22_02257B1C - thumb_func_end ov22_02257B10 - - thumb_func_start ov22_02257B1C -ov22_02257B1C: ; 0x02257B1C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r7, #0 - ldr r4, [r7, #0x1c] - add r6, #0x14 - add r5, r1, #0 - cmp r4, r6 - beq _02257B4A -_02257B2C: - ldr r0, [r4, #4] - cmp r0, #0 - ldr r0, [r4, #0] - bne _02257B3C - add r1, r5, #0 - bl ov22_02254F6C - b _02257B42 -_02257B3C: - add r1, r5, #0 - bl ov22_022591D0 -_02257B42: - ldr r4, [r4, #8] - sub r5, r5, #1 - cmp r4, r6 - bne _02257B2C -_02257B4A: - ldr r4, [r7, #0xc] - add r6, r7, #4 - sub r5, #8 - cmp r4, r6 - beq _02257B72 -_02257B54: - ldr r0, [r4, #4] - cmp r0, #0 - ldr r0, [r4, #0] - bne _02257B64 - add r1, r5, #0 - bl ov22_02254F6C - b _02257B6A -_02257B64: - add r1, r5, #0 - bl ov22_022591D0 -_02257B6A: - ldr r4, [r4, #8] - sub r5, r5, #1 - cmp r4, r6 - bne _02257B54 -_02257B72: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02257B1C - - thumb_func_start ov22_02257B74 -ov22_02257B74: ; 0x02257B74 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r7, #0 - ldr r4, [r7, #0x1c] - add r6, #0x14 - add r5, r1, #0 - cmp r4, r6 - beq _02257BB0 -_02257B84: - ldr r0, [r4, #4] - cmp r0, #0 - ldr r0, [r4, #0] - bne _02257B9C - bl ov22_02254F78 - add r1, r0, #0 - ldr r0, [r4, #0] - add r1, r1, r5 - bl ov22_02254F6C - b _02257BAA -_02257B9C: - bl ov22_022591E0 - add r1, r0, #0 - ldr r0, [r4, #0] - add r1, r1, r5 - bl ov22_022591D0 -_02257BAA: - ldr r4, [r4, #8] - cmp r4, r6 - bne _02257B84 -_02257BB0: - ldr r4, [r7, #0xc] - add r6, r7, #4 - cmp r4, r6 - beq _02257BE4 -_02257BB8: - ldr r0, [r4, #4] - cmp r0, #0 - ldr r0, [r4, #0] - bne _02257BD0 - bl ov22_02254F78 - add r1, r0, #0 - ldr r0, [r4, #0] - add r1, r1, r5 - bl ov22_02254F6C - b _02257BDE -_02257BD0: - bl ov22_022591E0 - add r1, r0, #0 - ldr r0, [r4, #0] - add r1, r1, r5 - bl ov22_022591D0 -_02257BDE: - ldr r4, [r4, #8] - cmp r4, r6 - bne _02257BB8 -_02257BE4: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02257B74 - - thumb_func_start ov22_02257BE8 -ov22_02257BE8: ; 0x02257BE8 - push {r3, lr} - mov r1, #0x12 - add r0, sp, #0 - strb r1, [r0] - mov r1, #0x8f - strb r1, [r0, #1] - mov r1, #0x8a - strb r1, [r0, #2] - mov r1, #0xf6 - strb r1, [r0, #3] - add r0, sp, #0 - bl sub_02022734 - pop {r3, pc} - thumb_func_end ov22_02257BE8 - - thumb_func_start ov22_02257C04 -ov22_02257C04: ; 0x02257C04 - push {r3, lr} - mov r3, #0x12 - add r0, sp, #0 - strb r3, [r0] - mov r3, #0x8f - strb r3, [r0, #1] - mov r3, #0x8a - strb r3, [r0, #2] - mov r3, #0xf6 - strb r3, [r0, #3] - add r0, sp, #0 - bl sub_02022830 - pop {r3, pc} - thumb_func_end ov22_02257C04 - - thumb_func_start ov22_02257C20 -ov22_02257C20: ; 0x02257C20 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, [r0, #0x1c] - str r0, [sp] - str r0, [sp, #4] - add r0, #0x14 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - str r0, [sp, #4] - cmp r5, r0 - beq _02257C56 -_02257C38: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov22_022595AC - cmp r0, #1 - bne _02257C4E - add sp, #0xc - add r0, r5, #0 - pop {r4, r5, r6, r7, pc} -_02257C4E: - ldr r5, [r5, #8] - ldr r0, [sp, #4] - cmp r5, r0 - bne _02257C38 -_02257C56: - ldr r0, [sp] - ldr r5, [r0, #0xc] - add r0, r0, #4 - str r0, [sp, #8] - cmp r5, r0 - beq _02257C80 -_02257C62: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov22_022595AC - cmp r0, #1 - bne _02257C78 - add sp, #0xc - add r0, r5, #0 - pop {r4, r5, r6, r7, pc} -_02257C78: - ldr r5, [r5, #8] - ldr r0, [sp, #8] - cmp r5, r0 - bne _02257C62 -_02257C80: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02257C20 - - thumb_func_start ov22_02257C88 -ov22_02257C88: ; 0x02257C88 - push {r3, r4, r5, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, [r5, #0x40] - add r4, r1, #0 - str r0, [sp] - mov r0, #0x19 - lsl r1, r4, #2 - str r0, [sp, #4] - add r0, r1, #0 - add r0, #0x86 - str r0, [sp, #8] - add r0, r1, #0 - add r0, #0x87 - str r0, [sp, #0xc] - mov r0, #0x88 - str r0, [sp, #0x14] - mov r0, #0x10 - str r0, [sp, #0x18] - mov r0, #2 - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x20] - mov r0, #0xd - str r0, [sp, #0x24] - mov r0, #0 - add r1, #0x88 - str r0, [sp, #0x28] - add r0, r5, #0 - str r1, [sp, #0x10] - add r0, #0x48 - add r1, sp, #0 - str r2, [sp, #0x2c] - bl ov22_022597BC - str r4, [r5, #0x74] - add sp, #0x30 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02257C88 - - thumb_func_start ov22_02257CD4 -ov22_02257CD4: ; 0x02257CD4 - ldr r3, _02257CDC ; =ov22_02259804 - add r0, #0x48 - bx r3 - nop -_02257CDC: .word ov22_02259804 - thumb_func_end ov22_02257CD4 - - thumb_func_start ov22_02257CE0 -ov22_02257CE0: ; 0x02257CE0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x78] - add r4, r1, #0 - mov r1, #0 - add r6, r2, #0 - bl sub_020080C0 - str r0, [r4, #0] - ldr r0, [r5, #0x78] - mov r1, #1 - bl sub_020080C0 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_02257CE0 - - thumb_func_start ov22_02257D00 -ov22_02257D00: ; 0x02257D00 - ldr r0, [r0, #0x24] - bx lr - thumb_func_end ov22_02257D00 - - thumb_func_start ov22_02257D04 -ov22_02257D04: ; 0x02257D04 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - ldr r6, [r7, #0x1c] - mov r4, #0 - add r7, #0x14 - str r1, [sp] - str r2, [sp, #4] - add r5, r4, #0 - cmp r6, r7 - beq _02257D62 -_02257D1A: - add r0, r6, #0 - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02257EC8 - cmp r4, #0 - bge _02257D2C - neg r1, r4 - b _02257D2E -_02257D2C: - add r1, r4, #0 -_02257D2E: - ldr r0, [sp, #0xc] - cmp r0, #0 - bge _02257D38 - neg r2, r0 - b _02257D3A -_02257D38: - add r2, r0, #0 -_02257D3A: - cmp r2, r1 - ble _02257D40 - add r4, r0, #0 -_02257D40: - cmp r5, #0 - bge _02257D48 - neg r1, r5 - b _02257D4A -_02257D48: - add r1, r5, #0 -_02257D4A: - ldr r0, [sp, #8] - cmp r0, #0 - bge _02257D54 - neg r2, r0 - b _02257D56 -_02257D54: - add r2, r0, #0 -_02257D56: - cmp r2, r1 - ble _02257D5C - add r5, r0, #0 -_02257D5C: - ldr r6, [r6, #8] - cmp r6, r7 - bne _02257D1A -_02257D62: - ldr r0, [sp] - str r4, [r0, #0] - ldr r0, [sp, #4] - str r5, [r0, #0] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02257D04 - - thumb_func_start ov22_02257D70 -ov22_02257D70: ; 0x02257D70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - ldr r4, [r0, #0x1c] - add r7, #0x14 - str r0, [sp] - add r6, r1, #0 - cmp r4, r7 - beq _02257DCE - asr r0, r6, #0xa - mov r1, #0x1f - and r0, r1 - str r0, [sp, #0xc] - asr r0, r6, #5 - and r0, r1 - str r0, [sp, #8] - add r0, r6, #0 - and r0, r1 - str r0, [sp, #4] -_02257D96: - ldr r0, [r4, #4] - cmp r0, #0 - bne _02257DA8 - ldr r0, [r4, #0] - add r1, r6, #0 - ldr r0, [r0, #4] - bl sub_0201529C - b _02257DC8 -_02257DA8: - ldr r5, [r4, #0] - ldr r2, [sp, #0xc] - ldr r0, [r5, #0] - mov r1, #0x18 - bl sub_02007DEC - ldr r0, [r5, #0] - ldr r2, [sp, #8] - mov r1, #0x19 - bl sub_02007DEC - ldr r0, [r5, #0] - ldr r2, [sp, #4] - mov r1, #0x1a - bl sub_02007DEC -_02257DC8: - ldr r4, [r4, #8] - cmp r4, r7 - bne _02257D96 -_02257DCE: - ldr r0, [sp] - ldr r4, [r0, #0xc] - add r5, r0, #4 - cmp r4, r5 - beq _02257DE8 -_02257DD8: - ldr r0, [r4, #0] - add r1, r6, #0 - ldr r0, [r0, #4] - bl sub_0201529C - ldr r4, [r4, #8] - cmp r4, r5 - bne _02257DD8 -_02257DE8: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02257D70 - - thumb_func_start ov22_02257DEC -ov22_02257DEC: ; 0x02257DEC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - str r0, [sp, #0xc] - str r2, [sp, #0x14] - str r1, [sp, #0x10] - add r0, r1, #0 - add r1, sp, #0x54 - add r2, sp, #0x50 - add r4, r3, #0 - bl ov22_02259648 - ldr r0, [sp, #0x10] - add r1, sp, #0x4c - add r2, sp, #0x48 - bl ov22_02259698 - add r0, sp, #0x30 - str r0, [sp] - ldr r0, [sp, #0x10] - add r1, sp, #0x44 - add r2, sp, #0x34 - add r3, sp, #0x40 - bl ov22_022596B0 - mov r0, #0x76 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r5, #0 - str r0, [sp, #0x20] - ldr r6, [sp, #0x54] - ldr r0, [sp, #0x4c] - ldr r7, [sp, #0x44] - add r1, r6, r0 - ldr r0, [sp, #0x34] - add r4, r5, #0 - sub r0, r1, r0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x50] - ldr r1, [sp, #0x48] - str r0, [sp, #0x24] - add r1, r0, r1 - ldr r0, [sp, #0x30] - sub r0, r1, r0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x40] - str r0, [sp, #0x28] - ldr r0, [sp, #0xc] - str r0, [sp, #0x2c] - add r0, #0x78 - str r0, [sp, #0x2c] -_02257E50: - str r4, [sp] - add r0, sp, #0x3c - str r0, [sp, #4] - add r0, sp, #0x38 - str r0, [sp, #8] - ldr r1, [sp, #0x24] - ldr r0, [sp, #0x28] - ldr r3, [sp, #0x1c] - add r0, r1, r0 - ldr r1, [sp, #0x18] - add r2, r6, r7 - bl ov22_022577EC - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x3c] - ldr r2, [sp, #0x38] - ldr r3, [sp, #0x20] - bl ov22_022592F0 - add r4, r4, #1 - orr r5, r0 - cmp r4, #0x10 - blt _02257E50 - cmp r5, #0 - beq _02257EA6 - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02257E98 - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x10] - add r1, #0x14 - str r1, [sp, #0xc] - bl ov22_02259520 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_02257E98: - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x10] - ldr r1, [r1, #0x20] - bl ov22_02259520 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_02257EA6: - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02257EBA - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x10] - add r1, r1, #4 - bl ov22_02259520 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_02257EBA: - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x10] - ldr r1, [r1, #0x10] - bl ov22_02259520 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02257DEC - - thumb_func_start ov22_02257EC8 -ov22_02257EC8: ; 0x02257EC8 - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - add r5, r1, #0 - add r4, r2, #0 - add r6, r0, #0 - add r1, sp, #0x20 - add r2, sp, #0x1c - bl ov22_02259698 - add r0, r6, #0 - add r1, sp, #0x18 - add r2, sp, #0x14 - bl ov22_02259648 - add r0, sp, #4 - str r0, [sp] - add r0, r6, #0 - add r1, sp, #0x10 - add r2, sp, #8 - add r3, sp, #0xc - bl ov22_022596B0 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - ldr r3, [sp, #0xc] - add r2, r0, r1 - mov r1, #0x8a - sub r2, r1, r2 - ldr r1, [sp, #0x20] - add r1, r0, r1 - ldr r0, [sp, #8] - sub r1, r1, r0 - ldr r0, [sp, #0x14] - sub r1, #0xf6 - add r6, r0, r3 - mov r3, #0x12 - sub r3, r3, r6 - ldr r6, [sp, #0x1c] - add r6, r0, r6 - ldr r0, [sp, #4] - sub r6, r6, r0 - sub r6, #0x8f - cmp r2, #0 - ble _02257F24 - str r2, [r5, #0] - b _02257F32 -_02257F24: - cmp r1, #0 - ble _02257F2E - neg r0, r1 - str r0, [r5, #0] - b _02257F32 -_02257F2E: - mov r0, #0 - str r0, [r5, #0] -_02257F32: - cmp r3, #0 - ble _02257F3C - add sp, #0x24 - str r3, [r4, #0] - pop {r3, r4, r5, r6, pc} -_02257F3C: - cmp r6, #0 - ble _02257F48 - neg r0, r6 - add sp, #0x24 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_02257F48: - mov r0, #0 - str r0, [r4, #0] - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov22_02257EC8 - - thumb_func_start ov22_02257F50 -ov22_02257F50: ; 0x02257F50 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - str r1, [r5, #0x44] - ldr r1, [r4, #4] - str r1, [r5, #0x48] - ldr r1, [r4, #8] - str r1, [r5, #0x4c] - ldr r1, [r4, #0xc] - str r1, [r5, #0x50] - ldr r1, [r4, #0x10] - str r1, [r5, #0x54] - ldr r1, [r4, #0x14] - str r1, [r5, #0x58] - ldr r1, [r4, #0x18] - str r1, [r5, #8] - ldr r1, [r4, #0x28] - str r1, [r5, #4] - mov r1, #0 - bl ov22_02258354 - add r0, r5, #0 - add r1, r4, #0 - bl ov22_02258470 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02257F50 - - thumb_func_start ov22_02257F88 -ov22_02257F88: ; 0x02257F88 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl ov22_022581C0 - add r5, r6, #0 - mov r4, #0 - add r5, #0xc -_02257F96: - add r0, r5, #0 - bl ov22_02258534 - add r4, r4, #1 - add r5, #0xc - cmp r4, #4 - blt _02257F96 - add r0, r6, #0 - mov r1, #0 - mov r2, #0x8c - bl sub_020D5124 - pop {r4, r5, r6, pc} - thumb_func_end ov22_02257F88 - - thumb_func_start ov22_02257FB0 -ov22_02257FB0: ; 0x02257FB0 - push {r3, lr} - cmp r0, #0 - beq _02257FC0 - cmp r0, #1 - beq _02258030 - cmp r0, #2 - beq _0225803E - pop {r3, pc} -_02257FC0: - cmp r1, #5 - bgt _02257FC8 - mov r0, #0 - pop {r3, pc} -_02257FC8: - cmp r1, #0xb - bgt _02257FD0 - mov r0, #1 - pop {r3, pc} -_02257FD0: - cmp r1, #0x11 - bgt _02257FD8 - mov r0, #2 - pop {r3, pc} -_02257FD8: - cmp r1, #0x15 - bgt _02257FE0 - mov r0, #3 - pop {r3, pc} -_02257FE0: - cmp r1, #0x1c - bgt _02257FE8 - mov r0, #4 - pop {r3, pc} -_02257FE8: - cmp r1, #0x21 - bgt _02257FF0 - mov r0, #5 - pop {r3, pc} -_02257FF0: - cmp r1, #0x26 - bgt _02257FF8 - mov r0, #6 - pop {r3, pc} -_02257FF8: - cmp r1, #0x2a - bgt _02258000 - mov r0, #7 - pop {r3, pc} -_02258000: - cmp r1, #0x31 - bgt _02258008 - mov r0, #8 - pop {r3, pc} -_02258008: - cmp r1, #0x37 - bgt _02258010 - mov r0, #9 - pop {r3, pc} -_02258010: - cmp r1, #0x3c - bgt _02258018 - mov r0, #0xa - pop {r3, pc} -_02258018: - cmp r1, #0x47 - bgt _02258020 - mov r0, #0xb - pop {r3, pc} -_02258020: - cmp r1, #0x5b - bgt _02258028 - mov r0, #0xc - pop {r3, pc} -_02258028: - cmp r1, #0x63 - bgt _0225804A - mov r0, #0xd - pop {r3, pc} -_02258030: - add r0, r2, #0 - bl ov22_022589BC - mov r1, #9 - bl sub_020E1F6C - pop {r3, pc} -_0225803E: - add r0, r2, #0 - bl ov22_022589BC - mov r1, #9 - bl sub_020E1F6C -_0225804A: - pop {r3, pc} - thumb_func_end ov22_02257FB0 - - thumb_func_start ov22_0225804C -ov22_0225804C: ; 0x0225804C - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - cmp r0, #0 - beq _02258060 - cmp r0, #1 - beq _02258092 - cmp r0, #2 - beq _02258092 - pop {r3, r4, r5, pc} -_02258060: - mov r0, #0xa - str r0, [r5, #0] - mov r0, #0x12 - str r0, [r4, #0] - bl sub_0201D35C - ldr r2, [sp, #0x10] - mov r1, #0x6c - sub r1, r1, r2 - bl sub_020E2178 - ldr r0, [r5, #0] - add r0, r0, r1 - str r0, [r5, #0] - bl sub_0201D35C - ldr r2, [sp, #0x14] - mov r1, #0x7d - sub r1, r1, r2 - bl sub_020E2178 - ldr r0, [r4, #0] - add r0, r0, r1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02258092: - ldr r0, [sp, #0x18] - bl ov22_022589BC - add r1, r5, #0 - add r2, r4, #0 - bl ov22_02258610 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_0225804C - - thumb_func_start ov22_022580A4 -ov22_022580A4: ; 0x022580A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - add r5, r0, #0 - ldr r0, [r5, #0x58] - add r4, r2, #0 - str r4, [sp, #0x40] - str r0, [sp, #0x28] - ldr r0, [r5, #0x44] - add r6, r1, #0 - mov r1, #0 - str r0, [sp, #0x2c] - str r1, [sp, #0x38] - str r1, [sp, #0x3c] - cmp r6, #0 - beq _022580CC - cmp r6, #1 - beq _022580D8 - cmp r6, #2 - beq _022580E6 - b _022580F4 -_022580CC: - ldr r0, [r5, #0x50] - str r4, [sp, #0xc] - ldrb r0, [r0, r4] - add r7, r1, #0 - str r0, [sp, #0x44] - b _022580F8 -_022580D8: - add r0, r4, #0 - str r0, [sp, #0xc] - add r0, #0x64 - str r0, [sp, #0xc] - add r7, r4, #1 - str r1, [sp, #0x44] - b _022580F8 -_022580E6: - add r0, r4, #0 - str r0, [sp, #0xc] - add r0, #0x64 - str r0, [sp, #0xc] - add r7, r4, #1 - str r1, [sp, #0x44] - b _022580F8 -_022580F4: - bl sub_02022974 -_022580F8: - ldr r0, [sp, #0xc] - ldr r1, [r5, #0x48] - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r1, r7, #2 - str r0, [sp, #0x30] - ldr r2, [r5, #0x4c] - cmp r0, #0 - ldr r1, [r2, r1] - str r1, [sp, #0x34] - bne _02258112 - bl sub_02022974 -_02258112: - ldr r0, [sp, #0x34] - cmp r0, #0 - bne _0225811C - bl sub_02022974 -_0225811C: - ldr r2, [r5, #4] - add r0, r6, #0 - add r1, r4, #0 - bl ov22_02257FB0 - add r7, r0, #0 - add r0, sp, #0x28 - bl ov22_02254E20 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - ldr r1, [sp, #0x10] - add r2, r6, #0 - bl ov22_022594C0 - mov r1, #0xc - mul r1, r6 - add r1, r5, r1 - ldr r2, [r1, #0xc] - lsl r1, r7, #4 - add r1, r2, r1 - ldr r1, [r1, #0xc] - str r0, [sp, #0x14] - bl ov22_02259520 - ldr r0, [sp, #0x14] - add r1, sp, #0x1c - add r2, sp, #0x18 - bl ov22_02259698 - ldr r0, [sp, #0x1c] - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0x18] - add r2, sp, #0x24 - str r0, [sp, #4] - ldr r0, [r5, #4] - add r3, sp, #0x20 - str r0, [sp, #8] - add r0, r6, #0 - bl ov22_0225804C - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - bl ov22_022595F8 - ldr r1, [sp, #0x10] - add r0, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov22_022585E8 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022580A4 - - thumb_func_start ov22_0225818C -ov22_0225818C: ; 0x0225818C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #0xc - add r5, r0, #0 - mul r1, r4 - add r7, r3, #0 - add r1, r5, r1 - add r6, r2, #0 - ldr r2, [r1, #0xc] - lsl r1, r6, #4 - add r0, r7, #0 - add r1, r2, r1 - bl ov22_02259520 - ldr r1, [r7, #0] - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov22_022585E8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225818C - - thumb_func_start ov22_022581B8 -ov22_022581B8: ; 0x022581B8 - ldr r3, _022581BC ; =ov22_02259530 - bx r3 - ; .align 2, 0 -_022581BC: .word ov22_02259530 - thumb_func_end ov22_022581B8 - - thumb_func_start ov22_022581C0 -ov22_022581C0: ; 0x022581C0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r7, #0 -_022581C6: - ldr r0, [r5, #0x10] - mov r6, #0 - cmp r0, #0 - ble _022581E2 - add r4, r6, #0 -_022581D0: - ldr r0, [r5, #0xc] - add r0, r0, r4 - bl ov22_02259540 - ldr r0, [r5, #0x10] - add r6, r6, #1 - add r4, #0x10 - cmp r6, r0 - blt _022581D0 -_022581E2: - add r7, r7, #1 - add r5, #0xc - cmp r7, #3 - blt _022581C6 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_022581C0 - - thumb_func_start ov22_022581EC -ov22_022581EC: ; 0x022581EC - push {r4, r5, r6, lr} - mov r5, #0 - mvn r5, r5 - bl ov22_0225855C - add r6, r0, #0 - ldr r4, [r6, #8] - cmp r4, r6 - beq _02258214 -_022581FE: - ldr r0, [r4, #4] - cmp r0, #2 - bhi _0225820C - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov22_02254F6C -_0225820C: - ldr r4, [r4, #8] - sub r5, r5, #1 - cmp r4, r6 - bne _022581FE -_02258214: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_022581EC - - thumb_func_start ov22_02258218 -ov22_02258218: ; 0x02258218 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0x3c] - add r4, r2, #0 - cmp r1, #0 - bne _02258250 - ldr r1, [r5, #0] - mov r2, #0xc - mul r2, r1 - str r4, [sp] - add r2, r5, r2 - ldr r2, [r2, #0x14] - add r3, r6, #0 - bl ov22_0225864C - mov r0, #0xc - mul r0, r6 - str r6, [r5, #0] - add r0, r5, r0 - str r4, [r0, #0x14] - add r0, r5, #0 - bl ov22_022581EC - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_02258250: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_02258218 - - thumb_func_start ov22_02258258 -ov22_02258258: ; 0x02258258 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r1, [sp, #4] - str r0, [sp] - str r2, [sp, #8] - bl ov22_02258424 - add r7, r0, #0 - ldr r0, [sp, #4] - mov r1, #0xc - mul r1, r0 - ldr r0, [sp] - mov r4, #1 - add r6, r0, r1 - ldr r0, [r6, #0x10] - cmp r0, #1 - ble _022582BA -_0225827A: - ldr r0, [sp, #8] - cmp r0, #0 - bne _0225828C - ldr r1, [r6, #0x10] - add r0, r4, r7 - bl sub_020E1F6C - add r5, r1, #0 - b _02258294 -_0225828C: - sub r5, r7, r4 - bpl _02258294 - ldr r0, [r6, #0x10] - add r5, r5, r0 -_02258294: - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r5, #0 - bl ov22_02258584 - ldr r1, [r0, #8] - cmp r1, r0 - beq _022582B2 - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r5, #0 - bl ov22_02258218 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_022582B2: - ldr r0, [r6, #0x10] - add r4, r4, #1 - cmp r4, r0 - blt _0225827A -_022582BA: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_02258258 - - thumb_func_start ov22_022582C0 -ov22_022582C0: ; 0x022582C0 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - add r6, r2, #0 - bl ov22_022584E0 - mov r0, #0xc - mul r0, r4 - str r4, [r5, #0] - add r0, r5, r0 - str r6, [r0, #0x14] - add r0, r5, #0 - mov r1, #1 - bl ov22_022584E0 - add r0, r5, #0 - bl ov22_022581EC - pop {r4, r5, r6, pc} - thumb_func_end ov22_022582C0 - - thumb_func_start ov22_022582E8 -ov22_022582E8: ; 0x022582E8 - push {r3, lr} - mov r1, #0x12 - add r0, sp, #0 - strb r1, [r0] - mov r1, #0x8f - strb r1, [r0, #1] - mov r1, #0xa - strb r1, [r0, #2] - mov r1, #0x76 - strb r1, [r0, #3] - add r0, sp, #0 - bl sub_02022734 - pop {r3, pc} - thumb_func_end ov22_022582E8 - - thumb_func_start ov22_02258304 -ov22_02258304: ; 0x02258304 - push {r3, lr} - mov r3, #0x12 - add r0, sp, #0 - strb r3, [r0] - mov r3, #0x8f - strb r3, [r0, #1] - mov r3, #0xa - strb r3, [r0, #2] - mov r3, #0x76 - strb r3, [r0, #3] - add r0, sp, #0 - bl sub_02022830 - pop {r3, pc} - thumb_func_end ov22_02258304 - - thumb_func_start ov22_02258320 -ov22_02258320: ; 0x02258320 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - bl ov22_0225855C - add r5, r0, #0 - ldr r4, [r5, #8] - cmp r4, r5 - beq _0225834E -_02258334: - ldr r3, [sp] - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov22_022595AC - cmp r0, #1 - bne _02258348 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_02258348: - ldr r4, [r4, #8] - cmp r4, r5 - bne _02258334 -_0225834E: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02258320 - - thumb_func_start ov22_02258354 -ov22_02258354: ; 0x02258354 - push {r3, r4, r5, lr} - sub sp, #0x30 - add r5, r0, #0 - ldr r0, [r5, #0x54] - add r4, r1, #0 - str r0, [sp] - mov r0, #0x19 - lsl r1, r4, #1 - str r0, [sp, #4] - add r0, r1, #0 - add r0, #0x81 - str r0, [sp, #8] - mov r0, #0x85 - str r0, [sp, #0xc] - mov r0, #8 - str r0, [sp, #0x14] - mov r0, #0x81 - str r0, [sp, #0x18] - mov r0, #3 - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp, #0x20] - mov r0, #2 - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp, #0x28] - mov r0, #0xe - add r1, #0x82 - str r0, [sp, #0x2c] - add r0, r5, #0 - str r1, [sp, #0x10] - add r0, #0x5c - add r1, sp, #0 - bl ov22_022597BC - str r4, [r5, #0x40] - add sp, #0x30 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02258354 - - thumb_func_start ov22_022583A0 -ov22_022583A0: ; 0x022583A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - ldr r0, [r5, #0x54] - add r4, r1, #0 - str r0, [sp, #8] - mov r0, #0x19 - lsl r1, r4, #1 - str r0, [sp, #0xc] - add r0, r1, #0 - add r0, #0x81 - str r0, [sp, #0x10] - mov r0, #0x85 - str r0, [sp, #0x14] - mov r0, #8 - add r1, #0x82 - str r0, [sp, #0x1c] - mov r0, #0x81 - str r1, [sp, #0x18] - str r0, [sp, #0x20] - mov r0, #3 - mov r1, #2 - str r0, [sp, #0x24] - mov r0, #1 - str r1, [sp, #0x2c] - mov r7, #0 - mov r1, #0xe - str r0, [sp, #0x28] - str r7, [sp, #0x30] - str r1, [sp, #0x34] - tst r0, r2 - beq _022583E2 - mov r7, #0x70 -_022583E2: - mov r0, #2 - tst r0, r2 - beq _022583EC - mov r6, #0x81 - b _022583EE -_022583EC: - mov r6, #0 -_022583EE: - ldr r0, [sp, #0x50] - str r3, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x5c - add r1, sp, #8 - add r2, r7, #0 - add r3, r6, #0 - bl ov22_022598F4 - str r4, [r5, #0x40] - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_022583A0 - - thumb_func_start ov22_02258408 -ov22_02258408: ; 0x02258408 - ldr r3, _02258410 ; =ov22_02259804 - add r0, #0x5c - bx r3 - nop -_02258410: .word ov22_02259804 - thumb_func_end ov22_02258408 - - thumb_func_start ov22_02258414 -ov22_02258414: ; 0x02258414 - push {r4, lr} - add r4, r0, #0 - bne _0225841E - bl sub_02022974 -_0225841E: - ldr r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02258414 - - thumb_func_start ov22_02258424 -ov22_02258424: ; 0x02258424 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _02258434 - bl sub_02022974 -_02258434: - mov r0, #0xc - mul r0, r4 - add r3, r5, r0 - add r3, #0xc - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #8] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov22_02258424 - - thumb_func_start ov22_0225844C -ov22_0225844C: ; 0x0225844C - push {r4, lr} - add r4, r3, #0 - bl ov22_02258584 - ldr r2, [sp, #8] - add r1, r4, #0 - bl ov22_022596EC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225844C - - thumb_func_start ov22_02258460 -ov22_02258460: ; 0x02258460 - ldr r0, [r0, #0x3c] - cmp r0, #0 - bne _0225846A - mov r0, #1 - bx lr -_0225846A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov22_02258460 - - thumb_func_start ov22_02258470 -ov22_02258470: ; 0x02258470 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0x1c] - add r5, r0, #0 - add r0, #0xc - bl ov22_022584F0 - mov r0, #0 - str r0, [r5, #0] - ldr r0, [r5, #0xc] - mov r1, #1 - bl ov22_022584AC - add r0, r5, #0 - ldr r1, [r4, #0x20] - add r0, #0x18 - bl ov22_022584F0 - add r0, r5, #0 - ldr r1, [r4, #0x24] - add r0, #0x24 - bl ov22_022584F0 - add r5, #0x30 - add r0, r5, #0 - mov r1, #1 - bl ov22_022584F0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02258470 - - thumb_func_start ov22_022584AC -ov22_022584AC: ; 0x022584AC - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r4, [r5, #8] - add r6, r1, #0 - cmp r4, r5 - beq _022584CC -_022584B8: - ldr r0, [r4, #4] - cmp r0, #2 - bhi _022584C6 - ldr r0, [r4, #0] - add r1, r6, #0 - bl ov22_02254F60 -_022584C6: - ldr r4, [r4, #8] - cmp r4, r5 - bne _022584B8 -_022584CC: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_022584AC - - thumb_func_start ov22_022584D0 -ov22_022584D0: ; 0x022584D0 - push {r4, lr} - add r4, r3, #0 - bl ov22_02258584 - add r1, r4, #0 - bl ov22_022584AC - pop {r4, pc} - thumb_func_end ov22_022584D0 - - thumb_func_start ov22_022584E0 -ov22_022584E0: ; 0x022584E0 - push {r4, lr} - add r4, r1, #0 - bl ov22_0225855C - add r1, r4, #0 - bl ov22_022584AC - pop {r4, pc} - thumb_func_end ov22_022584E0 - - thumb_func_start ov22_022584F0 -ov22_022584F0: ; 0x022584F0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r0, #0xe - lsl r1, r4, #4 - bl sub_02018144 - str r0, [r5, #0] - str r4, [r5, #4] - mov r6, #0 - str r6, [r5, #8] - ldr r0, [r5, #4] - cmp r0, #0 - ble _02258530 - add r4, r6, #0 - add r7, r6, #0 -_02258510: - ldr r0, [r5, #0] - add r1, r7, #0 - add r0, r0, r4 - str r0, [r0, #8] - ldr r0, [r5, #0] - add r0, r0, r4 - str r0, [r0, #0xc] - ldr r0, [r5, #0] - add r0, r0, r4 - bl ov22_022584AC - ldr r0, [r5, #4] - add r6, r6, #1 - add r4, #0x10 - cmp r6, r0 - blt _02258510 -_02258530: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022584F0 - - thumb_func_start ov22_02258534 -ov22_02258534: ; 0x02258534 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - pop {r4, pc} - thumb_func_end ov22_02258534 - - thumb_func_start ov22_0225855C -ov22_0225855C: ; 0x0225855C - push {r3} - sub sp, #0xc - ldr r2, [r0, #0] - mov r1, #0xc - mul r1, r2 - add r3, r0, r1 - add r3, #0xc - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #8] - ldr r1, [sp] - lsl r0, r0, #4 - add r0, r1, r0 - add sp, #0xc - pop {r3} - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225855C - - thumb_func_start ov22_02258584 -ov22_02258584: ; 0x02258584 - push {r4} - sub sp, #0xc - mov r3, #0xc - mul r3, r1 - add r4, r0, r3 - add r4, #0xc - ldmia r4!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - ldr r1, [sp] - lsl r0, r2, #4 - add r0, r1, r0 - add sp, #0xc - pop {r4} - bx lr - ; .align 2, 0 - thumb_func_end ov22_02258584 - - thumb_func_start ov22_022585A8 -ov22_022585A8: ; 0x022585A8 - push {r4, lr} - mov r4, #0 - bl ov22_02258584 - ldr r1, [r0, #8] - cmp r1, r0 - beq _022585BE -_022585B6: - ldr r1, [r1, #8] - add r4, r4, #1 - cmp r1, r0 - bne _022585B6 -_022585BE: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022585A8 - - thumb_func_start ov22_022585C4 -ov22_022585C4: ; 0x022585C4 - push {r3, r4, r5, lr} - add r5, r3, #0 - mov r4, #0 - bl ov22_02258584 - ldr r1, [r0, #8] - cmp r1, r0 - beq _022585E4 -_022585D4: - cmp r4, r5 - bne _022585DC - add r0, r1, #0 - pop {r3, r4, r5, pc} -_022585DC: - ldr r1, [r1, #8] - add r4, r4, #1 - cmp r1, r0 - bne _022585D4 -_022585E4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov22_022585C4 - - thumb_func_start ov22_022585E8 -ov22_022585E8: ; 0x022585E8 - push {r4, lr} - ldr r4, [r0, #0] - cmp r4, r2 - bne _022585FC - mov r4, #0xc - mul r4, r2 - add r0, r0, r4 - ldr r0, [r0, #0x14] - cmp r3, r0 - beq _02258606 -_022585FC: - add r0, r1, #0 - mov r1, #0 - bl ov22_02254F60 - pop {r4, pc} -_02258606: - add r0, r1, #0 - mov r1, #1 - bl ov22_02254F60 - pop {r4, pc} - thumb_func_end ov22_022585E8 - - thumb_func_start ov22_02258610 -ov22_02258610: ; 0x02258610 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #9 - add r4, r2, #0 - bl sub_020E1F6C - add r7, r1, #0 - add r0, r7, #0 - mov r1, #3 - bl sub_020E1F6C - add r6, r0, #0 - add r0, r7, #0 - mov r1, #3 - bl sub_020E1F6C - add r0, r6, #1 - lsl r2, r0, #3 - lsl r0, r6, #5 - add r0, r2, r0 - add r0, #0x10 - str r0, [r4, #0] - add r0, r1, #1 - lsl r2, r0, #3 - mov r0, #0x18 - mul r0, r1 - add r0, r2, r0 - add r0, #8 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_02258610 - - thumb_func_start ov22_0225864C -ov22_0225864C: ; 0x0225864C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - ldr r0, _022586C0 ; =ov22_022586C4 - mov r1, #0x30 - mov r2, #0 - mov r3, #0xd - bl sub_0200679C - bl sub_0201CED0 - add r4, r0, #0 - str r5, [r4, #0] - str r6, [r4, #4] - ldr r0, [sp] - str r7, [r4, #8] - str r0, [r4, #0xc] - ldr r0, [sp, #0x18] - add r1, r6, #0 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x1c] - add r0, r5, #0 - add r2, r7, #0 - bl ov22_022585A8 - str r0, [r4, #0x20] - ldr r1, [sp] - ldr r2, [sp, #0x18] - add r0, r5, #0 - bl ov22_022585A8 - str r0, [r4, #0x24] - ldr r1, [r4, #0x20] - add r2, r1, r0 - mov r1, #0xc - mov r0, #0xd - mul r1, r2 - str r2, [r4, #0x2c] - bl sub_02018144 - str r0, [r4, #0x28] - cmp r0, #0 - bne _022586AC - bl sub_02022974 -_022586AC: - ldr r3, [r4, #0x2c] - mov r2, #0xc - ldr r0, [r4, #0x28] - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - mov r0, #1 - str r0, [r5, #0x3c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022586C0: .word ov22_022586C4 - thumb_func_end ov22_0225864C - - thumb_func_start ov22_022586C4 -ov22_022586C4: ; 0x022586C4 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #4 - bls _022586D4 - b _0225881C -_022586D4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022586E0: ; jump table - .short _022586EA - _022586E0 - 2 ; case 0 - .short _0225873E - _022586E0 - 2 ; case 1 - .short _0225878A - _022586E0 - 2 ; case 2 - .short _022587D0 - _022586E0 - 2 ; case 3 - .short _022587E8 - _022586E0 - 2 ; case 4 -_022586EA: - mov r0, #0x83 - mvn r0, r0 - str r0, [sp] - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x10] - mov r3, #0 - bl ov22_0225844C - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x10] - mov r3, #1 - bl ov22_022584D0 - mov r0, #0 - str r0, [r4, #0x14] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - str r1, [sp] - ldr r1, [r0, #0x40] - add r1, r1, #1 - lsr r3, r1, #0x1f - lsl r2, r1, #0x1f - sub r2, r2, r3 - mov r1, #0x1f - ror r2, r1 - add r1, r3, r2 - mov r2, #2 - mov r3, #5 - bl ov22_022583A0 - ldr r0, [r4, #0x20] - mov r1, #1 - bl ov22_022588D8 - str r0, [r4, #0x18] - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - b _02258820 -_0225873E: - ldr r0, [r4, #0x18] - mov r6, #0 - cmp r0, #0 - ble _02258772 - add r5, r4, #0 - add r5, #0x20 -_0225874A: - ldr r0, [r4, #0x20] - sub r0, r0, #1 - bmi _0225876A - ldr r0, [r5, #0] - sub r0, r0, #1 - str r0, [r5, #0] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0x20] - bl ov22_022585C4 - ldr r1, [r4, #0x28] - ldr r2, [r4, #0x2c] - bl ov22_0225882C -_0225876A: - ldr r0, [r4, #0x18] - add r6, r6, #1 - cmp r6, r0 - blt _0225874A -_02258772: - ldr r0, [r4, #0x20] - cmp r0, #0 - bne _02258820 - ldr r0, [r4, #0x24] - mov r1, #2 - bl ov22_022588D8 - str r0, [r4, #0x18] - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - b _02258820 -_0225878A: - ldr r0, [r4, #0x18] - mov r6, #0 - cmp r0, #0 - ble _022587BE - add r5, r4, #0 - add r5, #0x24 -_02258796: - ldr r0, [r4, #0x24] - sub r0, r0, #1 - bmi _022587B6 - ldr r0, [r5, #0] - sub r0, r0, #1 - str r0, [r5, #0] - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - ldr r2, [r4, #0x10] - ldr r3, [r4, #0x24] - bl ov22_022585C4 - ldr r1, [r4, #0x28] - ldr r2, [r4, #0x2c] - bl ov22_0225882C -_022587B6: - ldr r0, [r4, #0x18] - add r6, r6, #1 - cmp r6, r0 - blt _02258796 -_022587BE: - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _02258820 - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - mov r0, #0 - str r0, [r4, #0x18] - b _02258820 -_022587D0: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - cmp r0, #3 - ble _02258820 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _02258820 - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - b _02258820 -_022587E8: - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - mov r3, #0 - bl ov22_022584D0 - mov r0, #0x83 - mvn r0, r0 - str r0, [sp] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - mov r3, #0 - bl ov22_0225844C - ldr r0, [r4, #0] - mov r1, #0 - str r1, [r0, #0x3c] - ldr r0, [r4, #0x28] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020067D0 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0225881C: - bl sub_02022974 -_02258820: - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x2c] - bl ov22_0225886C - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov22_022586C4 - - thumb_func_start ov22_0225882C -ov22_0225882C: ; 0x0225882C - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - bl ov22_02258844 - str r4, [r0, #0] - mov r1, #3 - str r1, [r0, #4] - mov r1, #0x2c - str r1, [r0, #8] - pop {r4, pc} - thumb_func_end ov22_0225882C - - thumb_func_start ov22_02258844 -ov22_02258844: ; 0x02258844 - push {r3, r4} - mov r3, #0 - cmp r1, #0 - ble _02258866 - add r4, r0, #0 -_0225884E: - ldr r2, [r4, #0] - cmp r2, #0 - bne _0225885E - mov r1, #0xc - mul r1, r3 - add r0, r0, r1 - pop {r3, r4} - bx lr -_0225885E: - add r3, r3, #1 - add r4, #0xc - cmp r3, r1 - blt _0225884E -_02258866: - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov22_02258844 - - thumb_func_start ov22_0225886C -ov22_0225886C: ; 0x0225886C - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - mov r4, #0 - cmp r6, #0 - ble _0225888C -_02258878: - ldr r0, [r5, #0] - cmp r0, #0 - beq _02258884 - add r0, r5, #0 - bl ov22_02258890 -_02258884: - add r4, r4, #1 - add r5, #0xc - cmp r4, r6 - blt _02258878 -_0225888C: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_0225886C - - thumb_func_start ov22_02258890 -ov22_02258890: ; 0x02258890 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259648 - ldr r1, [sp] - ldr r0, [r4, #8] - add r2, r1, r0 - str r2, [sp] - ldr r0, [r4, #0] - ldr r1, [sp, #4] - bl ov22_022595F8 - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0 - bgt _022588D4 - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] -_022588D4: - add sp, #8 - pop {r4, pc} - thumb_func_end ov22_02258890 - - thumb_func_start ov22_022588D8 -ov22_022588D8: ; 0x022588D8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl sub_020E1F6C - sub r0, r4, r1 - add r0, r5, r0 - add r1, r4, #0 - bl sub_020E1F6C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_022588D8 - - thumb_func_start ov22_022588F0 -ov22_022588F0: ; 0x022588F0 - add r3, r0, #0 - mov r2, #0x1c - mov r1, #0 -_022588F6: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _022588F6 - ldr r1, _02258908 ; =ov22_02258948 - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 -_02258908: .word ov22_02258948 - thumb_func_end ov22_022588F0 - - thumb_func_start ov22_0225890C -ov22_0225890C: ; 0x0225890C - push {r4, lr} - ldr r1, _02258944 ; =0x021BF6BC - add r4, r0, #0 - ldrh r2, [r1, #0x20] - cmp r2, #0 - beq _0225891E - ldr r1, [r4, #4] - blx r1 - b _02258934 -_0225891E: - ldrh r1, [r1, #0x22] - cmp r1, #0 - beq _0225892A - ldr r1, [r4, #0xc] - blx r1 - b _02258934 -_0225892A: - ldrb r1, [r4, #0x18] - cmp r1, #0 - beq _02258934 - ldr r1, [r4, #8] - blx r1 -_02258934: - ldr r0, _02258944 ; =0x021BF6BC - ldrh r1, [r0, #0x1c] - strh r1, [r4, #0x14] - ldrh r1, [r0, #0x1e] - strh r1, [r4, #0x16] - ldrh r0, [r0, #0x22] - strb r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 -_02258944: .word 0x021BF6BC - thumb_func_end ov22_0225890C - - thumb_func_start ov22_02258948 -ov22_02258948: ; 0x02258948 - bx lr - ; .align 2, 0 - thumb_func_end ov22_02258948 - - thumb_func_start ov22_0225894C -ov22_0225894C: ; 0x0225894C - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r6, r0, #0 - mov r4, #0 - add r5, r7, #0 -_02258956: - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029D94 - add r4, r4, #1 - stmia r5!, {r0} - cmp r4, #0x64 - blt _02258956 - mov r0, #0x19 - mov r3, #0 - add r2, r7, #0 - mov r1, #0x12 - lsl r0, r0, #4 -_02258970: - add r3, r3, #1 - str r1, [r2, r0] - add r2, r2, #4 - cmp r3, #0x12 - blt _02258970 - mov r5, #0x19 - mov r4, #0 - lsl r5, r5, #4 -_02258980: - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029DD4 - cmp r0, #0x12 - beq _02258992 - lsl r0, r0, #2 - add r0, r7, r0 - str r4, [r0, r5] -_02258992: - add r4, r4, #1 - cmp r4, #0x12 - blt _02258980 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225894C - - thumb_func_start ov22_0225899C -ov22_0225899C: ; 0x0225899C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #0x64 - blo _022589AA - bl sub_02022974 -_022589AA: - lsl r0, r5, #2 - ldr r0, [r4, r0] - pop {r3, r4, r5, pc} - thumb_func_end ov22_0225899C - - thumb_func_start ov22_022589B0 -ov22_022589B0: ; 0x022589B0 - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bx lr - thumb_func_end ov22_022589B0 - - thumb_func_start ov22_022589BC -ov22_022589BC: ; 0x022589BC - push {r3, r4} - mov r2, #0x19 - mov r4, #0 - lsl r2, r2, #4 -_022589C4: - ldr r3, [r0, r2] - cmp r1, r3 - bne _022589D0 - add r0, r4, #0 - pop {r3, r4} - bx lr -_022589D0: - add r4, r4, #1 - add r0, r0, #4 - cmp r4, #0x12 - blt _022589C4 - add r0, r4, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov22_022589BC - - thumb_func_start ov22_022589E0 -ov22_022589E0: ; 0x022589E0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov22_022588F0 - mov r0, #0xd - mov r1, #0x34 - bl sub_02018144 - str r0, [r5, #0] - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - ldr r1, [r5, #0] - ldr r0, [sp, #0x18] - str r4, [r1, #4] - str r6, [r1, #8] - str r7, [r1, #0] - str r0, [r1, #0xc] - ldr r0, [sp, #0x1c] - str r0, [r1, #0x2c] - ldr r0, _02258A24 ; =ov22_02258A48 - str r0, [r5, #4] - ldr r0, _02258A28 ; =ov22_02258BB8 - str r0, [r5, #8] - ldr r0, _02258A2C ; =ov22_02258D4C - str r0, [r5, #0xc] - ldr r0, _02258A30 ; =ov22_02258A34 - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} - nop -_02258A24: .word ov22_02258A48 -_02258A28: .word ov22_02258BB8 -_02258A2C: .word ov22_02258D4C -_02258A30: .word ov22_02258A34 - thumb_func_end ov22_022589E0 - - thumb_func_start ov22_02258A34 -ov22_02258A34: ; 0x02258A34 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r4, #0 - bl ov22_022588F0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02258A34 - - thumb_func_start ov22_02258A48 -ov22_02258A48: ; 0x02258A48 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r4, [r5, #0] - ldr r0, [r4, #4] - bl ov22_02257BE8 - cmp r0, #0 - beq _02258ACA - ldr r3, [r4, #0] - ldr r0, [r4, #4] - ldr r3, [r3, #0x38] - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02257C20 - add r6, r0, #0 - beq _02258A7A - ldr r0, [r6, #4] - cmp r0, #3 - bne _02258A7A - ldr r0, [r4, #0x2c] - cmp r0, #0 - bne _02258A7A - mov r6, #0 -_02258A7A: - cmp r6, #0 - beq _02258B06 - ldr r0, [r6, #4] - cmp r0, #0 - bne _02258A90 - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov22_02257A80 - mov r7, #0 - b _02258AAC -_02258A90: - add r0, r6, #0 - bl ov22_022579E8 - ldr r0, [r6, #0] - bl ov22_022591E0 - add r1, r4, #0 - add r2, r4, #0 - add r7, r0, #0 - add r0, r6, #0 - add r1, #0x24 - add r2, #0x28 - bl ov22_02259648 -_02258AAC: - ldr r0, [r4, #4] - bl ov22_02257B10 - ldr r0, [sp, #8] - add r1, r6, #0 - str r0, [sp] - str r7, [sp, #4] - ldr r3, [sp, #0xc] - add r0, r4, #0 - mov r2, #1 - bl ov22_02258E88 - bl ov22_02255390 - b _02258B06 -_02258ACA: - ldr r0, [r4, #8] - bl ov22_022582E8 - cmp r0, #0 - beq _02258B06 - ldr r3, [r4, #0] - ldr r0, [r4, #8] - ldr r3, [r3, #0x38] - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02258320 - add r6, r0, #0 - beq _02258B06 - bl ov22_022581B8 - ldr r0, [r4, #8] - bl ov22_022581EC - ldr r0, [sp, #8] - mov r2, #0 - str r0, [sp] - str r2, [sp, #4] - ldr r3, [sp, #0xc] - add r0, r4, #0 - add r1, r6, #0 - bl ov22_02258E88 - bl ov22_02255390 -_02258B06: - ldr r1, [r4, #0x10] - cmp r1, #0 - beq _02258B50 - ldr r1, [r1, #4] - ldr r0, _02258B54 ; =0x000005EB - cmp r1, #0 - beq _02258B1E - cmp r1, #1 - beq _02258B28 - cmp r1, #3 - beq _02258B3A - b _02258B42 -_02258B1E: - ldr r1, _02258B58 ; =ov22_02258BB8 - str r1, [r5, #8] - ldr r1, _02258B5C ; =ov22_02258D4C - str r1, [r5, #0xc] - b _02258B42 -_02258B28: - ldr r0, _02258B60 ; =ov22_02258B78 - str r0, [r5, #8] - ldr r0, _02258B64 ; =ov22_02258B74 - str r0, [r5, #0xc] - add r0, r5, #0 - bl ov22_02258E5C - ldr r0, _02258B68 ; =0x0000067E - b _02258B42 -_02258B3A: - ldr r1, _02258B6C ; =ov22_02258D7C - str r1, [r5, #8] - ldr r1, _02258B70 ; =ov22_02258DAC - str r1, [r5, #0xc] -_02258B42: - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 - add r0, r4, #0 - bl ov22_02259040 -_02258B50: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02258B54: .word 0x000005EB -_02258B58: .word ov22_02258BB8 -_02258B5C: .word ov22_02258D4C -_02258B60: .word ov22_02258B78 -_02258B64: .word ov22_02258B74 -_02258B68: .word 0x0000067E -_02258B6C: .word ov22_02258D7C -_02258B70: .word ov22_02258DAC - thumb_func_end ov22_02258A48 - - thumb_func_start ov22_02258B74 -ov22_02258B74: ; 0x02258B74 - bx lr - ; .align 2, 0 - thumb_func_end ov22_02258B74 - - thumb_func_start ov22_02258B78 -ov22_02258B78: ; 0x02258B78 - push {r4, lr} - sub sp, #8 - ldr r4, [r0, #0] - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02258BB2 - ldr r0, [r0, #4] - cmp r0, #1 - beq _02258B8E - bl sub_02022974 -_02258B8E: - ldr r0, [r4, #0x10] - mov r2, #0x1c - ldr r0, [r0, #4] - mov r3, #0x1e - str r0, [sp] - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - mov r1, #4 - str r0, [sp, #4] - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - add r0, r4, #0 - bl ov22_02258F4C - add r0, r4, #0 - bl ov22_02258EE4 -_02258BB2: - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02258B78 - - thumb_func_start ov22_02258BB8 -ov22_02258BB8: ; 0x02258BB8 - push {r4, r5, r6, lr} - sub sp, #0x28 - add r6, r0, #0 - ldr r4, [r6, #0] - ldr r1, [r4, #0x10] - cmp r1, #0 - bne _02258BC8 - b _02258D36 -_02258BC8: - add r1, sp, #0x18 - str r1, [sp] - add r1, sp, #0x24 - add r2, sp, #0x20 - add r3, sp, #0x1c - bl ov22_02258F38 - ldr r0, [r4, #4] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x24] - bl ov22_02257C04 - add r5, r0, #0 - ldr r0, [r4, #4] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x24] - bl ov22_02257C04 - add r5, r5, r0 - ldr r0, [r4, #4] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x20] - bl ov22_02257C04 - add r5, r5, r0 - ldr r0, [r4, #4] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x20] - bl ov22_02257C04 - add r0, r5, r0 - cmp r0, #4 - blt _02258C6A - ldr r2, [r4, #0] - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - ldr r2, [r2, #0x38] - bl ov22_02257A5C - cmp r0, #0 - bne _02258C54 - mov r0, #0x1c - ldrsh r0, [r4, r0] - str r0, [sp, #0xc] - mov r0, #0x1e - ldrsh r0, [r4, r0] - str r0, [sp, #8] - ldr r0, _02258D3C ; =0x00000683 - bl sub_02005748 - ldr r0, [r4, #0xc] - ldr r2, _02258D40 ; =0x00000181 - mov r1, #0x1a - mov r3, #3 - bl ov22_0225A628 - ldr r0, [r4, #0x10] - mov r1, #4 - ldr r0, [r0, #4] - str r0, [sp] - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - str r0, [sp, #4] - ldr r2, [sp, #0xc] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov22_02258F4C - b _02258D30 -_02258C54: - ldr r0, [r4, #4] - bl ov22_02257B10 - bl ov22_02255360 - mov r0, #0 - str r0, [r4, #0x30] - ldr r0, _02258D44 ; =0x000005EA - bl sub_02005748 - b _02258D30 -_02258C6A: - ldr r0, [r4, #0x10] - add r1, sp, #0x24 - ldr r5, [r0, #0] - add r0, sp, #0x18 - str r0, [sp] - add r0, r6, #0 - add r2, sp, #0x20 - add r3, sp, #0x1c - bl ov22_02258EF8 - ldr r0, [r4, #8] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x24] - bl ov22_02258304 - add r6, r0, #0 - ldr r0, [r4, #8] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x20] - bl ov22_02258304 - add r0, r6, r0 - cmp r0, #2 - bge _02258CE8 - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #1 - bne _02258CD4 - ldr r0, [r4, #0x10] - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov22_02259698 - bl sub_0201D35C - ldr r2, [sp, #0x14] - mov r1, #0x6c - sub r1, r1, r2 - bl sub_020E2178 - add r1, #0xa - str r1, [sp, #0xc] - bl sub_0201D35C - ldr r2, [sp, #0x10] - mov r1, #0x7d - sub r1, r1, r2 - bl sub_020E2178 - add r1, #0x12 - str r1, [sp, #8] - b _02258CE0 -_02258CD4: - mov r0, #0x1c - ldrsh r0, [r4, r0] - str r0, [sp, #0xc] - mov r0, #0x1e - ldrsh r0, [r4, r0] - str r0, [sp, #8] -_02258CE0: - ldr r0, _02258D3C ; =0x00000683 - bl sub_02005748 - b _02258CF8 -_02258CE8: - ldr r0, [r4, #0x10] - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02259648 - ldr r0, _02258D48 ; =0x000005EB - bl sub_02005748 -_02258CF8: - add r0, r4, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #1 - bne _02258D16 - ldr r0, [r4, #0x10] - ldr r2, [r4, #8] - ldr r0, [r0, #4] - ldr r1, [r5, #0] - ldr r2, [r2, #4] - bl ov22_02257FB0 - add r1, r4, #0 - add r1, #0x21 - strb r0, [r1] -_02258D16: - ldr r0, [r4, #0x10] - mov r1, #4 - ldr r0, [r0, #4] - str r0, [sp] - add r0, r4, #0 - add r0, #0x21 - ldrb r0, [r0] - str r0, [sp, #4] - ldr r2, [sp, #0xc] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov22_02258F4C -_02258D30: - add r0, r4, #0 - bl ov22_02258EE4 -_02258D36: - add sp, #0x28 - pop {r4, r5, r6, pc} - nop -_02258D3C: .word 0x00000683 -_02258D40: .word 0x00000181 -_02258D44: .word 0x000005EA -_02258D48: .word 0x000005EB - thumb_func_end ov22_02258BB8 - - thumb_func_start ov22_02258D4C -ov22_02258D4C: ; 0x02258D4C - push {r4, lr} - ldr r2, [r0, #0] - ldr r0, [r2, #0x10] - cmp r0, #0 - beq _02258D70 - ldr r3, _02258D74 ; =0x021BF6BC - ldr r1, _02258D78 ; =0x0000FFFF - ldrh r4, [r3, #0x1c] - cmp r4, r1 - beq _02258D70 - beq _02258D70 - ldrh r3, [r3, #0x1e] - ldr r1, [r2, #0x14] - ldr r2, [r2, #0x18] - sub r1, r4, r1 - sub r2, r3, r2 - bl ov22_022595F8 -_02258D70: - pop {r4, pc} - nop -_02258D74: .word 0x021BF6BC -_02258D78: .word 0x0000FFFF - thumb_func_end ov22_02258D4C - - thumb_func_start ov22_02258D7C -ov22_02258D7C: ; 0x02258D7C - push {r4, lr} - ldr r4, [r0, #0] - ldr r1, [r4, #0x10] - cmp r1, #0 - beq _02258DA6 - ldr r0, [r4, #4] - bl ov22_022579D8 - ldr r0, [r4, #4] - bl ov22_02257B10 - bl ov22_02255360 - mov r0, #0 - str r0, [r4, #0x30] - ldr r0, _02258DA8 ; =0x000005EB - bl sub_02005748 - add r0, r4, #0 - bl ov22_02258EE4 -_02258DA6: - pop {r4, pc} - ; .align 2, 0 -_02258DA8: .word 0x000005EB - thumb_func_end ov22_02258D7C - - thumb_func_start ov22_02258DAC -ov22_02258DAC: ; 0x02258DAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - ldr r4, [r0, #0] - str r0, [sp, #4] - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02258E50 - ldr r1, _02258E54 ; =0x021BF6BC - ldrh r2, [r1, #0x1c] - ldr r1, _02258E58 ; =0x0000FFFF - cmp r2, r1 - beq _02258E50 - beq _02258E50 - add r1, sp, #8 - str r1, [sp] - add r1, sp, #0x14 - add r2, sp, #0xc - add r3, sp, #0x10 - bl ov22_022596B0 - ldr r0, [r4, #0x10] - add r1, sp, #0x1c - add r2, sp, #0x18 - bl ov22_02259698 - ldr r0, _02258E54 ; =0x021BF6BC - ldr r1, [r4, #0x14] - ldrh r2, [r0, #0x1c] - ldr r3, [sp, #0x18] - sub r5, r2, r1 - ldrh r1, [r0, #0x1e] - ldr r0, [r4, #0x18] - ldr r2, [sp, #0x1c] - sub r6, r1, r0 - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x10] - sub r0, r2, r0 - ldr r2, [sp, #8] - add r7, r6, r1 - sub r2, r3, r2 - ldr r3, [sp, #0x14] - str r2, [sp, #0x18] - add r2, r5, r3 - str r0, [sp, #0x1c] - cmp r2, #0x8a - bgt _02258E0E - mov r0, #0x8a - sub r5, r0, r3 - b _02258E18 -_02258E0E: - add r2, r5, r0 - cmp r2, #0xf6 - blt _02258E18 - mov r2, #0xf6 - sub r5, r2, r0 -_02258E18: - cmp r7, #0x12 - bgt _02258E22 - mov r0, #0x12 - sub r6, r0, r1 - b _02258E2E -_02258E22: - ldr r1, [sp, #0x18] - add r0, r6, r1 - cmp r0, #0x8f - blt _02258E2E - mov r0, #0x8f - sub r6, r0, r1 -_02258E2E: - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - bl ov22_02259074 - ldr r0, [r4, #4] - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov22_02257D04 - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - ldr r0, [sp, #4] - add r1, r5, r1 - add r2, r6, r2 - bl ov22_02259074 -_02258E50: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02258E54: .word 0x021BF6BC -_02258E58: .word 0x0000FFFF - thumb_func_end ov22_02258DAC - - thumb_func_start ov22_02258E5C -ov22_02258E5C: ; 0x02258E5C - push {r3, r4, r5, lr} - ldr r4, [r0, #0] - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02258E84 - ldr r0, [r0, #4] - cmp r0, #1 - beq _02258E70 - bl sub_02022974 -_02258E70: - ldr r0, [r4, #0x10] - ldr r5, [r0, #0] - ldr r0, [r4, #4] - bl ov22_02257CD4 - ldr r0, [r4, #4] - ldr r1, [r5, #0] - mov r2, #0xe - bl ov22_02257C88 -_02258E84: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02258E5C - - thumb_func_start ov22_02258E88 -ov22_02258E88: ; 0x02258E88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - add r7, r3, #0 - bl ov22_02259648 - str r4, [r5, #0x10] - ldr r0, [sp, #4] - strh r0, [r5, #0x1c] - ldr r0, [sp] - strh r0, [r5, #0x1e] - add r0, r5, #0 - add r0, #0x20 - strb r6, [r0] - ldr r0, [sp, #0x20] - str r7, [r5, #0x14] - str r0, [r5, #0x18] - cmp r6, #0 - bne _02258ECA - ldr r1, [r5, #0x10] - ldr r0, [r5, #8] - ldr r1, [r1, #4] - bl ov22_02258424 - add r1, r5, #0 - add r1, #0x21 - strb r0, [r1] - b _02258ED2 -_02258ECA: - add r0, r5, #0 - mov r1, #0 - add r0, #0x21 - strb r1, [r0] -_02258ED2: - mov r0, #1 - str r0, [r5, #0x30] - ldr r1, [sp, #0x24] - add r0, r4, #0 - bl ov22_02259560 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02258E88 - - thumb_func_start ov22_02258EE4 -ov22_02258EE4: ; 0x02258EE4 - mov r2, #0 - str r2, [r0, #0x10] - strh r2, [r0, #0x1c] - add r1, r0, #0 - strh r2, [r0, #0x1e] - add r1, #0x20 - strb r2, [r1] - add r0, #0x21 - strb r2, [r0] - bx lr - thumb_func_end ov22_02258EE4 - - thumb_func_start ov22_02258EF8 -ov22_02258EF8: ; 0x02258EF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r4, [r0, #0] - add r5, r1, #0 - ldr r0, [r4, #0x10] - add r6, r2, #0 - add r1, sp, #0xc - add r2, sp, #8 - add r7, r3, #0 - bl ov22_02259698 - ldr r0, [r4, #0x10] - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259648 - ldr r0, [sp] - str r0, [r5, #0] - ldr r1, [sp] - ldr r0, [sp, #8] - add r0, r1, r0 - str r0, [r6, #0] - ldr r0, [sp, #4] - str r0, [r7, #0] - ldr r1, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r1, r0 - ldr r0, [sp, #0x28] - str r1, [r0, #0] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02258EF8 - - thumb_func_start ov22_02258F38 -ov22_02258F38: ; 0x02258F38 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #0x10] - bl ov22_02259724 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov22_02258F38 - - thumb_func_start ov22_02258F4C -ov22_02258F4C: ; 0x02258F4C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - ldr r0, _02258FBC ; =ov22_02258FC0 - mov r1, #0x2c - mov r2, #0 - mov r3, #0xd - bl sub_0200679C - bl sub_0201CED0 - add r4, r0, #0 - ldr r0, [r5, #8] - add r1, sp, #8 - str r0, [r4, #0] - ldr r0, [r5, #0x10] - add r2, sp, #4 - str r0, [r4, #4] - str r6, [r4, #0x20] - ldr r0, [sp] - str r7, [r4, #0x10] - str r0, [r4, #0x14] - ldr r0, [sp, #0x20] - str r0, [r4, #0x18] - ldr r0, [sp, #0x24] - str r0, [r4, #0x1c] - ldr r0, [r5, #8] - add r0, #0x3c - str r0, [r4, #0x24] - add r0, r5, #0 - add r0, #0x30 - str r0, [r4, #0x28] - ldr r0, [r5, #0x10] - bl ov22_02259648 - ldr r1, [r4, #0x10] - ldr r0, [sp, #8] - sub r0, r1, r0 - add r1, r6, #0 - bl sub_020E1F6C - str r0, [r4, #8] - ldr r1, [r4, #0x14] - ldr r0, [sp, #4] - sub r0, r1, r0 - add r1, r6, #0 - bl sub_020E1F6C - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r5, #0x30] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02258FBC: .word ov22_02258FC0 - thumb_func_end ov22_02258F4C - - thumb_func_start ov22_02258FC0 -ov22_02258FC0: ; 0x02258FC0 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x24] - ldr r0, [r0, #0] - cmp r0, #1 - beq _0225903A - ldr r0, [r4, #4] - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259648 - ldr r1, [sp, #4] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [sp, #4] - ldr r1, [sp] - ldr r0, [r4, #0xc] - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #0x20] - sub r0, r0, #1 - str r0, [r4, #0x20] - bmi _02258FFE - ldr r0, [r4, #8] - cmp r0, #0 - bne _02259030 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _02259030 -_02258FFE: - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - ldr r2, [r4, #0x14] - bl ov22_022595F8 - ldr r0, [r4, #0] - ldr r1, [r4, #0x18] - ldr r2, [r4, #0x1c] - ldr r3, [r4, #4] - bl ov22_0225818C - ldr r0, [r4, #0] - bl ov22_022581EC - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - cmp r0, #0 - bne _02259026 - bl ov22_02255360 -_02259026: - add r0, r5, #0 - bl sub_020067D0 - add sp, #8 - pop {r3, r4, r5, pc} -_02259030: - ldr r0, [r4, #4] - ldr r1, [sp, #4] - ldr r2, [sp] - bl ov22_022595F8 -_0225903A: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02258FC0 - - thumb_func_start ov22_02259040 -ov22_02259040: ; 0x02259040 - push {r3, lr} - ldr r3, [r0, #0x10] - ldr r1, [r3, #4] - cmp r1, #0 - bne _0225905A - ldr r3, [r3, #0] - ldr r0, [r0, #0xc] - ldr r2, _02259070 ; =0x00000182 - ldr r3, [r3, #0] - mov r1, #0x1a - bl ov22_0225A628 - pop {r3, pc} -_0225905A: - cmp r1, #1 - bne _0225906E - ldr r3, [r3, #0] - mov r2, #0x61 - ldr r0, [r0, #0xc] - ldr r3, [r3, #0] - mov r1, #0x1a - lsl r2, r2, #2 - bl ov22_0225A628 -_0225906E: - pop {r3, pc} - ; .align 2, 0 -_02259070: .word 0x00000182 - thumb_func_end ov22_02259040 - - thumb_func_start ov22_02259074 -ov22_02259074: ; 0x02259074 - push {r4, r5, r6, lr} - ldr r4, [r0, #0] - add r5, r1, #0 - ldr r0, [r4, #0x10] - add r6, r2, #0 - bl ov22_022595F8 - ldr r1, [r4, #0x24] - ldr r2, [r4, #0x28] - ldr r0, [r4, #4] - sub r1, r5, r1 - sub r2, r6, r2 - bl ov22_02257ACC - str r5, [r4, #0x24] - str r6, [r4, #0x28] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_02259074 - - thumb_func_start ov22_02259098 -ov22_02259098: ; 0x02259098 - push {r3, r4, r5, lr} - mov r2, #0 - add r4, r1, #0 - str r2, [sp] - add r5, r0, #0 - ldrh r0, [r4] - ldrh r1, [r4, #2] - mov r3, #0xe - bl sub_02006FE8 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0x76 - bl ov22_02255340 - ldrh r1, [r4] - ldr r0, [r0, #0x14] - bl sub_020093A0 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02259098 - - thumb_func_start ov22_022590C0 -ov22_022590C0: ; 0x022590C0 - push {r4, lr} - sub sp, #8 - ldr r4, [sp, #0x10] - str r4, [sp] - mov r4, #0 - str r4, [sp, #4] - bl ov22_022590D4 - add sp, #8 - pop {r4, pc} - thumb_func_end ov22_022590C0 - - thumb_func_start ov22_022590D4 -ov22_022590D4: ; 0x022590D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r6, r2, #0 - add r5, r0, #0 - add r7, r1, #0 - add r4, r3, #0 - add r0, r6, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r0, r4, #0 - add r1, r6, #0 - mov r2, #2 - bl sub_02075F00 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r7, #0 - add r1, r4, #0 - mov r2, #0xc0 - mov r3, #0x38 - bl sub_02007C34 - str r0, [r5, #0] - add r0, r5, #0 - add r1, sp, #0x1c - add r2, sp, #0x18 - bl ov22_02259270 - ldr r1, [sp, #0x1c] - mov r2, #0x38 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - ldr r1, [sp, #0x18] - str r0, [sp, #0x1c] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp, #0x18] - sub r0, r2, r0 - strb r0, [r5, #4] - ldr r0, [sp, #0x18] - mov r1, #0xc0 - add r0, #0x38 - strb r0, [r5, #5] - ldr r0, [sp, #0x1c] - sub r0, r1, r0 - strb r0, [r5, #6] - ldr r0, [sp, #0x1c] - add r0, #0xc0 - strb r0, [r5, #7] - ldr r0, [sp, #0x18] - str r0, [sp] - ldr r3, [sp, #0x1c] - add r0, r5, #4 - bl ov22_02259448 - add r0, r6, #0 - mov r1, #2 - bl sub_020765B8 - mov r2, #0 - str r2, [sp] - add r7, r0, #0 - ldrh r0, [r4] - ldrh r1, [r4, #2] - ldr r3, [sp, #0x38] - bl sub_02006FE8 - add r1, sp, #0x14 - str r0, [sp, #0x10] - bl sub_020A7118 - ldr r0, [sp, #0x14] - ldrh r1, [r4] - ldr r0, [r0, #0x14] - bl sub_020093A0 - ldr r0, [sp, #0x3c] - cmp r0, #0 - bne _02259196 - ldr r2, [sp, #0x14] - add r3, r5, #0 - ldrh r1, [r2, #2] - ldr r0, [r2, #0x14] - ldrh r2, [r2] - lsl r1, r1, #3 - add r3, #8 - lsl r2, r2, #3 - bl ov22_022593B8 - b _022591AC -_02259196: - ldr r1, [sp, #0x14] - ldr r0, [r1, #0x14] - ldrh r1, [r1, #2] - lsl r1, r1, #3 - bl ov22_0225936C - strb r0, [r5, #8] - ldrb r0, [r5, #8] - strb r0, [r5, #9] - strb r7, [r5, #0xb] - strb r7, [r5, #0xa] -_022591AC: - ldr r0, [sp, #0x10] - bl sub_020181C4 - str r6, [r5, #0xc] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_022590D4 - - thumb_func_start ov22_022591B8 -ov22_022591B8: ; 0x022591B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02007DC8 - mov r1, #0x10 - mov r0, #0 -_022591C6: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _022591C6 - pop {r4, pc} - thumb_func_end ov22_022591B8 - - thumb_func_start ov22_022591D0 -ov22_022591D0: ; 0x022591D0 - ldr r3, _022591DC ; =sub_02007DEC - add r2, r1, #0 - ldr r0, [r0, #0] - mov r1, #2 - bx r3 - nop -_022591DC: .word sub_02007DEC - thumb_func_end ov22_022591D0 - - thumb_func_start ov22_022591E0 -ov22_022591E0: ; 0x022591E0 - ldr r3, _022591E8 ; =sub_020080C0 - ldr r0, [r0, #0] - mov r1, #2 - bx r3 - ; .align 2, 0 -_022591E8: .word sub_020080C0 - thumb_func_end ov22_022591E0 - - thumb_func_start ov22_022591EC -ov22_022591EC: ; 0x022591EC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r1, sp, #8 - add r2, sp, #4 - bl ov22_02259270 - ldr r0, [r5, #0] - mov r1, #0 - add r2, r4, #0 - bl sub_02007DEC - ldr r0, [r5, #0] - mov r1, #1 - add r2, r6, #0 - bl sub_02007DEC - ldr r1, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r2, r0, #1 - ldr r1, [sp, #8] - str r2, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp, #8] - str r2, [sp] - ldr r3, [sp, #8] - add r0, r5, #4 - add r1, r4, #0 - add r2, r6, #0 - bl ov22_02259448 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov22_022591EC - - thumb_func_start ov22_02259238 -ov22_02259238: ; 0x02259238 - ldr r3, _02259240 ; =sub_02022734 - add r0, r0, #4 - bx r3 - nop -_02259240: .word sub_02022734 - thumb_func_end ov22_02259238 - - thumb_func_start ov22_02259244 -ov22_02259244: ; 0x02259244 - ldr r3, _0225924C ; =sub_02022830 - add r0, r0, #4 - bx r3 - nop -_0225924C: .word sub_02022830 - thumb_func_end ov22_02259244 - - thumb_func_start ov22_02259250 -ov22_02259250: ; 0x02259250 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - mov r1, #0 - add r6, r2, #0 - bl sub_020080C0 - str r0, [r4, #0] - ldr r0, [r5, #0] - mov r1, #1 - bl sub_020080C0 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_02259250 - - thumb_func_start ov22_02259270 -ov22_02259270: ; 0x02259270 - mov r0, #0x50 - str r0, [r1, #0] - str r0, [r2, #0] - bx lr - thumb_func_end ov22_02259270 - - thumb_func_start ov22_02259278 -ov22_02259278: ; 0x02259278 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov22_02259238 - cmp r0, #0 - bne _02259292 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02259292: - add r0, r5, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259250 - add r0, r5, #0 - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02259270 - ldr r1, [sp, #0xc] - ldr r2, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - sub r1, r2, r0 - ldr r3, [sp, #8] - ldr r0, [sp] - lsr r2, r3, #0x1f - add r2, r3, r2 - asr r2, r2, #1 - sub r0, r0, r2 - str r0, [sp] - ldr r0, _022592EC ; =0x021BF6BC - str r1, [sp, #4] - ldrh r2, [r0, #0x1c] - mov r3, #0 - sub r1, r2, r1 - str r1, [r4, #0] - ldrh r1, [r0, #0x1e] - ldr r0, [sp] - sub r2, r1, r0 - str r2, [r6, #0] - ldr r1, [r4, #0] - add r0, r7, #0 - bl ov22_02255420 - cmp r0, #0 - bne _022592E6 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022592E6: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022592EC: .word 0x021BF6BC - thumb_func_end ov22_02259278 - - thumb_func_start ov22_022592F0 -ov22_022592F0: ; 0x022592F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov22_02259244 - cmp r0, #0 - bne _0225930A - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0225930A: - add r0, r5, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259250 - add r0, r5, #0 - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02259270 - ldr r1, [sp, #0xc] - ldr r2, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - sub r1, r2, r0 - ldr r3, [sp, #8] - str r1, [sp, #4] - lsr r2, r3, #0x1f - add r2, r3, r2 - ldr r0, [sp] - asr r2, r2, #1 - sub r0, r0, r2 - str r0, [sp] - sub r2, r6, r0 - sub r1, r4, r1 - add r0, r7, #0 - mov r3, #0 - bl ov22_02255420 - cmp r0, #0 - bne _02259350 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02259350: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022592F0 - - thumb_func_start ov22_02259358 -ov22_02259358: ; 0x02259358 - ldrb r2, [r0, #8] - strb r2, [r1] - ldrb r2, [r0, #9] - strb r2, [r1, #1] - ldrb r2, [r0, #0xa] - strb r2, [r1, #2] - ldrb r0, [r0, #0xb] - strb r0, [r1, #3] - bx lr - ; .align 2, 0 - thumb_func_end ov22_02259358 - - thumb_func_start ov22_0225936C -ov22_0225936C: ; 0x0225936C - push {r4, r5, r6, r7} - mov ip, r0 - add r7, r1, #0 - mov r2, #0 -_02259374: - mov r3, #0 - add r4, r3, #0 -_02259378: - add r1, r2, r4 - lsr r0, r1, #0x1f - lsl r6, r1, #0x1f - sub r6, r6, r0 - mov r5, #0x1f - ror r6, r5 - add r5, r0, r6 - lsl r6, r5, #2 - mov r5, #0xf - add r0, r1, r0 - lsl r5, r6 - asr r1, r0, #1 - mov r0, ip - lsl r5, r5, #0x18 - ldrsb r0, [r0, r1] - lsr r5, r5, #0x18 - tst r0, r5 - beq _022593A2 - add r0, r2, #0 - pop {r4, r5, r6, r7} - bx lr -_022593A2: - add r3, r3, #1 - add r4, r4, r7 - cmp r3, #0x50 - blt _02259378 - add r2, r2, #1 - cmp r2, #0x50 - blt _02259374 - mov r0, #0x50 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225936C - - thumb_func_start ov22_022593B8 -ov22_022593B8: ; 0x022593B8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - str r1, [sp, #4] - add r1, r3, #0 - mov r0, #0x28 - strb r0, [r1] - strb r0, [r1, #1] - strb r0, [r1, #2] - strb r0, [r1, #3] - mov r6, #0 -_022593CE: - mov r2, #0x50 - sub r2, r2, r6 - str r2, [sp, #8] - lsl r2, r6, #0x18 - lsr r2, r2, #0x18 - mov lr, r2 - ldr r2, [sp, #8] - mov r0, #0 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - add r5, r0, #0 - mov ip, r2 -_022593E6: - add r7, r6, r5 - lsr r3, r7, #0x1f - lsl r4, r7, #0x1f - sub r4, r4, r3 - mov r2, #0x1f - ror r4, r2 - add r2, r3, r4 - lsl r4, r2, #2 - mov r2, #0xf - lsl r2, r4 - lsl r2, r2, #0x18 - lsr r4, r2, #0x18 - add r3, r7, r3 - ldr r2, [sp] - asr r3, r3, #1 - ldrsb r2, [r2, r3] - tst r2, r4 - beq _02259434 - ldrb r2, [r1] - cmp r2, r6 - ble _02259414 - mov r2, lr - strb r2, [r1] -_02259414: - ldrb r3, [r1, #1] - ldr r2, [sp, #8] - cmp r3, r2 - ble _02259420 - mov r2, ip - strb r2, [r1, #1] -_02259420: - ldrb r2, [r1, #2] - cmp r2, r0 - ble _02259428 - strb r0, [r1, #2] -_02259428: - mov r2, #0x50 - sub r3, r2, r0 - ldrb r2, [r1, #3] - cmp r2, r3 - ble _02259434 - strb r3, [r1, #3] -_02259434: - ldr r2, [sp, #4] - add r0, r0, #1 - add r5, r5, r2 - cmp r0, #0x50 - blt _022593E6 - add r6, r6, #1 - cmp r6, #0x50 - blt _022593CE - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_022593B8 - - thumb_func_start ov22_02259448 -ov22_02259448: ; 0x02259448 - push {r3, r4} - ldr r4, [sp, #8] - sub r4, r2, r4 - bmi _02259452 - b _02259454 -_02259452: - mov r4, #0 -_02259454: - strb r4, [r0] - ldr r4, [sp, #8] - add r2, r2, r4 - cmp r2, #0xbf - bgt _02259460 - b _02259462 -_02259460: - mov r2, #0xbf -_02259462: - strb r2, [r0, #1] - sub r2, r1, r3 - bmi _0225946A - b _0225946C -_0225946A: - mov r2, #0 -_0225946C: - add r1, r1, r3 - strb r2, [r0, #2] - cmp r1, #0xff - bgt _0225947A - strb r1, [r0, #3] - pop {r3, r4} - bx lr -_0225947A: - mov r1, #0xff - strb r1, [r0, #3] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov22_02259448 - - thumb_func_start ov22_02259484 -ov22_02259484: ; 0x02259484 - push {r4, r5, r6, lr} - add r6, r1, #0 - lsl r4, r6, #4 - add r5, r0, #0 - add r0, r2, #0 - add r1, r4, #0 - bl sub_02018144 - str r0, [r5, #0] - cmp r0, #0 - bne _0225949E - bl sub_02022974 -_0225949E: - ldr r0, [r5, #0] - mov r1, #0 - add r2, r4, #0 - bl sub_020D5124 - str r6, [r5, #4] - pop {r4, r5, r6, pc} - thumb_func_end ov22_02259484 - - thumb_func_start ov22_022594AC -ov22_022594AC: ; 0x022594AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022594AC - - thumb_func_start ov22_022594C0 -ov22_022594C0: ; 0x022594C0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r7, r2, #0 - cmp r0, #0 - bne _022594D2 - bl sub_02022974 -_022594D2: - ldr r0, [r5, #4] - cmp r0, #0 - bne _022594DC - bl sub_02022974 -_022594DC: - ldr r2, [r5, #4] - mov r4, #0 - cmp r2, #0 - ble _022594F4 - ldr r1, [r5, #0] -_022594E6: - ldr r0, [r1, #0] - cmp r0, #0 - beq _022594F4 - add r4, r4, #1 - add r1, #0x10 - cmp r4, r2 - blt _022594E6 -_022594F4: - cmp r2, r4 - bgt _022594FC - bl sub_02022974 -_022594FC: - ldr r0, [r5, #0] - lsl r1, r4, #4 - str r6, [r0, r1] - ldr r0, [r5, #0] - add r0, r0, r1 - str r7, [r0, #4] - ldr r0, [r5, #0] - add r0, r0, r1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022594C0 - - thumb_func_start ov22_02259510 -ov22_02259510: ; 0x02259510 - mov r2, #0x10 - mov r1, #0 -_02259514: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _02259514 - bx lr - ; .align 2, 0 - thumb_func_end ov22_02259510 - - thumb_func_start ov22_02259520 -ov22_02259520: ; 0x02259520 - ldr r2, [r1, #8] - str r2, [r0, #8] - ldr r2, [r1, #8] - str r0, [r2, #0xc] - str r1, [r0, #0xc] - str r0, [r1, #8] - bx lr - ; .align 2, 0 - thumb_func_end ov22_02259520 - - thumb_func_start ov22_02259530 -ov22_02259530: ; 0x02259530 - ldr r2, [r0, #8] - ldr r1, [r0, #0xc] - str r2, [r1, #8] - ldr r1, [r0, #0xc] - ldr r0, [r0, #8] - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov22_02259530 - - thumb_func_start ov22_02259540 -ov22_02259540: ; 0x02259540 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r4, [r6, #8] - cmp r4, r6 - beq _0225955E -_0225954A: - add r0, r4, #0 - ldr r5, [r4, #8] - bl ov22_02259530 - add r0, r4, #0 - bl ov22_02259510 - add r4, r5, #0 - cmp r5, r6 - bne _0225954A -_0225955E: - pop {r4, r5, r6, pc} - thumb_func_end ov22_02259540 - - thumb_func_start ov22_02259560 -ov22_02259560: ; 0x02259560 - push {r3, lr} - ldr r2, [r0, #4] - ldr r0, [r0, #0] - cmp r2, #3 - bge _02259570 - bl ov22_02254F6C - pop {r3, pc} -_02259570: - bl ov22_022591D0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_02259560 - - thumb_func_start ov22_02259578 -ov22_02259578: ; 0x02259578 - push {r3, lr} - ldr r3, [r0, #4] - ldr r0, [r0, #0] - cmp r3, #3 - bge _02259596 - mov r3, #0 - mvn r3, r3 - cmp r1, r3 - bne _02259590 - bl ov22_02254E44 - pop {r3, pc} -_02259590: - bl ov22_02254EDC - pop {r3, pc} -_02259596: - mov r3, #0 - mvn r3, r3 - cmp r1, r3 - bne _022595A4 - bl ov22_02259238 - pop {r3, pc} -_022595A4: - bl ov22_02259244 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_02259578 - - thumb_func_start ov22_022595AC -ov22_022595AC: ; 0x022595AC - push {r4, lr} - ldr r4, [r0, #4] - cmp r4, #0 - bne _022595C2 - ldr r0, [r0, #0] - ldr r4, [r0, #0] - lsl r4, r4, #2 - ldr r3, [r3, r4] - bl ov22_02254E54 - pop {r4, pc} -_022595C2: - cmp r4, #1 - bne _022595D6 - ldr r0, [r0, #0] - ldr r4, [r0, #0] - add r4, #0x64 - lsl r4, r4, #2 - ldr r3, [r3, r4] - bl ov22_02254E54 - pop {r4, pc} -_022595D6: - cmp r4, #2 - ldr r0, [r0, #0] - bne _022595EA - ldr r4, [r0, #0] - add r4, #0x64 - lsl r4, r4, #2 - ldr r3, [r3, r4] - bl ov22_02254E54 - pop {r4, pc} -_022595EA: - mov r4, #0x76 - lsl r4, r4, #2 - ldr r3, [r3, r4] - bl ov22_02259278 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_022595AC - - thumb_func_start ov22_022595F8 -ov22_022595F8: ; 0x022595F8 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, [r0, #4] - add r4, r2, #0 - cmp r1, #3 - bge _02259618 - lsl r1, r5, #0x10 - lsl r2, r4, #0x10 - ldr r0, [r0, #0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov22_02254EF4 - add sp, #8 - pop {r4, r5, r6, pc} -_02259618: - ldr r6, [r0, #0] - add r1, sp, #4 - add r0, r6, #0 - add r2, sp, #0 - bl ov22_02259270 - ldr r1, [sp, #4] - ldr r2, [sp] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - lsr r0, r2, #0x1f - add r0, r2, r0 - asr r2, r0, #1 - str r1, [sp, #4] - str r2, [sp] - add r0, r6, #0 - add r1, r5, r1 - add r2, r4, r2 - bl ov22_022591EC - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_022595F8 - - thumb_func_start ov22_02259648 -ov22_02259648: ; 0x02259648 - push {r4, r5, r6, lr} - sub sp, #8 - ldr r3, [r0, #4] - add r5, r1, #0 - add r4, r2, #0 - cmp r3, #3 - bge _02259660 - ldr r0, [r0, #0] - bl ov22_02254F00 - add sp, #8 - pop {r4, r5, r6, pc} -_02259660: - ldr r6, [r0, #0] - add r0, r6, #0 - bl ov22_02259250 - add r0, r6, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259270 - ldr r1, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r2, r0, #1 - ldr r1, [sp] - str r2, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp] - ldr r0, [r5, #0] - sub r0, r0, r2 - str r0, [r5, #0] - ldr r1, [r4, #0] - ldr r0, [sp] - sub r0, r1, r0 - str r0, [r4, #0] - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov22_02259648 - - thumb_func_start ov22_02259698 -ov22_02259698: ; 0x02259698 - push {r3, lr} - ldr r3, [r0, #4] - ldr r0, [r0, #0] - cmp r3, #3 - bge _022596A8 - bl ov22_02254F30 - pop {r3, pc} -_022596A8: - bl ov22_02259270 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_02259698 - - thumb_func_start ov22_022596B0 -ov22_022596B0: ; 0x022596B0 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - ldr r2, [r0, #4] - add r6, r1, #0 - add r5, r3, #0 - ldr r4, [sp, #0x18] - cmp r2, #3 - ldr r0, [r0, #0] - bge _022596D2 - add r2, r5, #0 - bl ov22_02254F84 - ldr r0, [r6, #0] - str r0, [r7, #0] - ldr r0, [r5, #0] - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_022596D2: - add r1, sp, #0 - bl ov22_02259358 - add r0, sp, #0 - ldrb r1, [r0] - str r1, [r6, #0] - ldrb r1, [r0, #1] - str r1, [r7, #0] - ldrb r1, [r0, #2] - str r1, [r5, #0] - ldrb r0, [r0, #3] - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_022596B0 - - thumb_func_start ov22_022596EC -ov22_022596EC: ; 0x022596EC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r4, [r5, #8] - add r6, r1, #0 - add r7, r2, #0 - cmp r4, r5 - beq _0225971E -_022596FC: - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259648 - ldr r0, [sp, #4] - add r1, r0, r6 - ldr r0, [sp] - str r1, [sp, #4] - add r2, r0, r7 - str r2, [sp] - add r0, r4, #0 - bl ov22_022595F8 - ldr r4, [r4, #8] - cmp r4, r5 - bne _022596FC -_0225971E: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022596EC - - thumb_func_start ov22_02259724 -ov22_02259724: ; 0x02259724 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r1, sp, #0x20 - add r2, sp, #0x1c - add r7, r3, #0 - bl ov22_02259698 - add r0, r5, #0 - add r1, sp, #0x18 - add r2, sp, #0x14 - bl ov22_02259648 - add r0, sp, #4 - str r0, [sp] - add r0, r5, #0 - add r1, sp, #0x10 - add r2, sp, #8 - add r3, sp, #0xc - bl ov22_022596B0 - ldr r1, [sp, #0x14] - ldr r0, [sp, #0xc] - add r0, r1, r0 - str r0, [r4, #0] - ldr r1, [sp, #0x14] - ldr r0, [sp, #0x1c] - add r1, r1, r0 - ldr r0, [sp, #4] - sub r0, r1, r0 - str r0, [r6, #0] - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x10] - add r0, r1, r0 - str r0, [r7, #0] - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x20] - add r1, r1, r0 - ldr r0, [sp, #8] - sub r1, r1, r0 - ldr r0, [sp, #0x38] - str r1, [r0, #0] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_02259724 - - thumb_func_start ov22_02259780 -ov22_02259780: ; 0x02259780 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r1, #0 - add r4, r2, #0 - add r6, r0, #0 - add r1, sp, #0xc - add r2, sp, #8 - bl ov22_02259698 - add r0, r6, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov22_02259648 - ldr r1, [sp, #0xc] - ldr r2, [sp, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, r2, r0 - str r0, [r5, #0] - ldr r1, [sp, #8] - ldr r2, [sp] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, r2, r0 - str r0, [r4, #0] - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov22_02259780 - - thumb_func_start ov22_022597BC -ov22_022597BC: ; 0x022597BC - add r2, r0, #0 - ldr r0, [r1, #0] - str r0, [r2, #0] - ldr r3, [r1, #0x14] - asr r0, r3, #2 - lsr r0, r0, #0x1d - add r0, r3, r0 - asr r0, r0, #3 - str r0, [r2, #0xc] - ldr r3, [r1, #0x18] - asr r0, r3, #2 - lsr r0, r0, #0x1d - add r0, r3, r0 - asr r0, r0, #3 - str r0, [r2, #0x10] - ldr r0, [r1, #0x1c] - ldr r3, _02259800 ; =ov22_022599A0 - str r0, [r2, #0x1c] - ldr r0, [r1, #0x24] - str r0, [r2, #0x20] - ldr r0, [r1, #0x20] - str r0, [r2, #0x24] - ldr r0, [r1, #0x28] - str r0, [r2, #0x28] - ldr r0, [r1, #4] - str r0, [r2, #4] - ldr r0, [r1, #0x10] - str r0, [r2, #8] - add r0, r1, #0 - add r1, r2, #0 - add r1, #0x14 - add r2, #0x18 - bx r3 - nop -_02259800: .word ov22_022599A0 - thumb_func_end ov22_022597BC - - thumb_func_start ov22_02259804 -ov22_02259804: ; 0x02259804 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x1c] - ldr r0, [r4, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #0 - mov r2, #0x2c - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov22_02259804 - - thumb_func_start ov22_02259820 -ov22_02259820: ; 0x02259820 - ldr r2, [r1, #0] - str r2, [r0, #0] - ldr r2, [r1, #4] - str r2, [r0, #4] - ldr r2, [r1, #8] - str r2, [r0, #8] - mov r2, #0 - str r2, [r0, #0xc] - str r2, [r0, #0x10] - ldr r1, [r1, #0xc] - str r1, [r0, #0x14] - bx lr - thumb_func_end ov22_02259820 - - thumb_func_start ov22_02259838 -ov22_02259838: ; 0x02259838 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r1, r0, r1 - str r1, [r5, #0xc] - ldr r0, [r5, #8] - cmp r1, r0 - ble _0225989C - mov r2, #0 - str r2, [r5, #0xc] - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _0225985C - ldr r1, [r5, #4] - mov r0, #1 - str r0, [r5, #0x10] - b _02259862 -_0225985C: - ldr r0, [r5, #0] - ldr r1, [r0, #8] - str r2, [r5, #0x10] -_02259862: - ldr r0, [r5, #0x14] - mov r2, #0 - str r0, [sp] - ldr r0, [r5, #0] - add r3, sp, #0x14 - ldr r0, [r0, #4] - bl sub_02006F6C - ldr r3, [r5, #0] - add r4, r0, #0 - ldr r0, [r3, #0x18] - str r0, [sp] - ldr r0, [r3, #0xc] - str r0, [sp, #4] - ldr r0, [r3, #0x10] - str r0, [sp, #8] - ldr r0, [r3, #0x28] - str r0, [sp, #0xc] - ldr r0, [r3, #0x20] - str r0, [sp, #0x10] - ldr r0, [r3, #0] - ldr r1, [r3, #0x1c] - ldr r2, [sp, #0x14] - ldr r3, [r3, #0x14] - bl ov22_02259ABC - add r0, r4, #0 - bl sub_020181C4 -_0225989C: - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02259838 - - thumb_func_start ov22_022598A0 -ov22_022598A0: ; 0x022598A0 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r1, [r5, #0] - ldr r0, [r5, #0x14] - mov r2, #0 - str r0, [sp] - ldr r0, [r1, #4] - ldr r1, [r1, #8] - add r3, sp, #0x14 - bl sub_02006F6C - ldr r3, [r5, #0] - add r4, r0, #0 - ldr r0, [r3, #0x18] - str r0, [sp] - ldr r0, [r3, #0xc] - str r0, [sp, #4] - ldr r0, [r3, #0x10] - str r0, [sp, #8] - ldr r0, [r3, #0x28] - str r0, [sp, #0xc] - ldr r0, [r3, #0x20] - str r0, [sp, #0x10] - ldr r0, [r3, #0] - ldr r1, [r3, #0x1c] - ldr r2, [sp, #0x14] - ldr r3, [r3, #0x14] - bl ov22_02259ABC - add r0, r4, #0 - bl sub_020181C4 - mov r1, #0x18 - mov r0, #0 -_022598E6: - strb r0, [r5] - add r5, r5, #1 - sub r1, r1, #1 - bne _022598E6 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_022598A0 - - thumb_func_start ov22_022598F4 -ov22_022598F4: ; 0x022598F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r5, r1, #0 - str r2, [sp] - str r3, [sp, #4] - ldr r0, _0225997C ; =ov22_02259A4C - mov r1, #0x4c - mov r2, #0 - mov r3, #0xd - bl sub_0200679C - bl sub_0201CED0 - add r4, r0, #0 - str r6, [r4, #0] - add r7, r5, #0 - add r3, r4, #4 - mov r2, #6 -_0225991A: - ldmia r7!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0225991A - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x20] - str r0, [r4, #0x34] - ldr r0, [sp] - str r1, [r4, #0x38] - bl sub_020E1F6C - str r0, [r4, #0x3c] - ldr r0, [sp, #4] - ldr r1, [sp, #0x20] - bl sub_020E1F6C - str r0, [r4, #0x40] - ldr r0, [r6, #0] - ldr r1, [r6, #0x1c] - bl sub_020192EC - str r0, [r4, #0x44] - ldr r0, [r6, #0] - ldr r1, [r6, #0x1c] - bl sub_020192F8 - str r0, [r4, #0x48] - mov r0, #0x80 - str r0, [r5, #0x28] - mov r0, #5 - str r0, [r5, #0x24] - ldr r1, [r5, #0x14] - ldr r0, [sp] - sub r0, r1, r0 - str r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r0, [sp, #4] - sub r0, r1, r0 - str r0, [r5, #0x18] - mov r0, #0xe - mov r1, #0 - str r0, [r5, #0x2c] - add r0, r5, #0 - add r2, r1, #0 - bl ov22_022599A0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225997C: .word ov22_02259A4C - thumb_func_end ov22_022598F4 - - thumb_func_start ov22_02259980 -ov22_02259980: ; 0x02259980 - push {r3, r4} - ldr r2, [r0, #8] - add r0, #0xc - lsr r4, r2, #1 - mov r3, #0 - cmp r4, #0 - ble _0225999C -_0225998E: - ldrh r2, [r0] - add r3, r3, #1 - add r2, r2, r1 - strh r2, [r0] - add r0, r0, #2 - cmp r3, r4 - blt _0225998E -_0225999C: - pop {r3, r4} - bx lr - thumb_func_end ov22_02259980 - - thumb_func_start ov22_022599A0 -ov22_022599A0: ; 0x022599A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0x14] - add r6, r2, #0 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r0, r0, #3 - ldr r1, [r5, #0x18] - str r0, [sp, #0x18] - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r0, r0, #3 - str r0, [sp, #0x14] - ldr r0, [r5, #0x28] - str r0, [sp] - ldr r0, [r5, #0x2c] - str r0, [sp, #4] - ldr r0, [r5, #4] - ldr r1, [r5, #8] - ldr r2, [r5, #0] - ldr r3, [r5, #0x1c] - bl ov22_02259B3C - ldr r0, [r5, #0x1c] - cmp r0, #4 - bge _022599E0 - mov r2, #0 - b _022599E2 -_022599E0: - mov r2, #4 -_022599E2: - ldr r0, [r5, #0x20] - lsl r0, r0, #5 - str r0, [sp] - ldr r0, [r5, #0x2c] - str r0, [sp, #4] - ldr r3, [r5, #0x24] - ldr r0, [r5, #4] - ldr r1, [r5, #0xc] - lsl r3, r3, #5 - bl ov22_02259B8C - ldr r0, [r5, #0x2c] - mov r2, #0 - str r0, [sp] - ldr r0, [r5, #4] - ldr r1, [r5, #0x10] - add r3, sp, #0x24 - bl sub_02006F6C - ldr r2, [sp, #0x24] - str r0, [sp, #0x20] - ldrh r0, [r2] - lsr r7, r0, #3 - ldrh r0, [r2, #2] - add r3, r7, #0 - lsr r0, r0, #3 - str r0, [sp, #0x1c] - str r0, [sp] - ldr r0, [sp, #0x18] - str r0, [sp, #4] - ldr r0, [sp, #0x14] - str r0, [sp, #8] - ldr r0, [r5, #0x28] - str r0, [sp, #0xc] - ldr r0, [r5, #0x24] - str r0, [sp, #0x10] - ldr r0, [r5, #0] - ldr r1, [r5, #0x1c] - bl ov22_02259ABC - ldr r0, [sp, #0x20] - bl sub_020181C4 - cmp r4, #0 - beq _02259A3E - str r7, [r4, #0] -_02259A3E: - cmp r6, #0 - beq _02259A46 - ldr r0, [sp, #0x1c] - str r0, [r6, #0] -_02259A46: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_022599A0 - - thumb_func_start ov22_02259A4C -ov22_02259A4C: ; 0x02259A4C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x38] - sub r0, r0, #1 - str r0, [r4, #0x38] - ldr r1, [r4, #0] - bmi _02259A80 - ldr r0, [r1, #0] - ldr r1, [r1, #0x1c] - ldr r3, [r4, #0x3c] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #2 - bl sub_0201C63C - ldr r1, [r4, #0] - ldr r3, [r4, #0x40] - ldr r0, [r1, #0] - ldr r1, [r1, #0x1c] - mov r2, #5 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201C63C - pop {r3, r4, r5, pc} -_02259A80: - ldr r0, [r1, #0] - ldr r1, [r1, #0x1c] - ldr r3, [r4, #0x44] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #0 - bl sub_0201C63C - ldr r1, [r4, #0] - ldr r3, [r4, #0x48] - ldr r0, [r1, #0] - ldr r1, [r1, #0x1c] - mov r2, #3 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201C63C - ldr r0, [r4, #0] - add r1, r4, #4 - bl ov22_022597BC - ldr r1, [r4, #0x34] - cmp r1, #0 - beq _02259AB4 - mov r0, #1 - str r0, [r1, #0] -_02259AB4: - add r0, r5, #0 - bl sub_020067D0 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02259A4C - - thumb_func_start ov22_02259ABC -ov22_02259ABC: ; 0x02259ABC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r1, #0 - add r4, r2, #0 - add r7, r0, #0 - ldr r1, [sp, #0x3c] - add r0, r4, #0 - add r6, r3, #0 - bl ov22_02259980 - ldr r1, [sp, #0x30] - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - lsl r1, r1, #0x18 - lsr r2, r1, #0x18 - str r0, [sp] - ldr r3, [sp, #0x38] - str r2, [sp, #4] - add r4, #0xc - lsl r3, r3, #0x18 - str r4, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - str r1, [sp, #0x10] - str r0, [sp, #0x14] - str r2, [sp, #0x18] - ldr r2, [sp, #0x34] - lsl r1, r5, #0x18 - lsl r2, r2, #0x18 - add r0, r7, #0 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x34] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x40] - ldr r3, [sp, #0x38] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - lsl r1, r5, #0x18 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - str r0, [sp, #8] - add r0, r7, #0 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_02019E2C - lsl r1, r5, #0x18 - add r0, r7, #0 - lsr r1, r1, #0x18 - bl sub_0201C3C0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_02259ABC - - thumb_func_start ov22_02259B3C -ov22_02259B3C: ; 0x02259B3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - str r1, [sp, #4] - ldr r0, [sp, #0x24] - mov r1, #0x14 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_02259B58: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _02259B58 - ldr r0, [sp, #0x24] - ldr r1, [sp, #4] - str r0, [sp] - add r0, r7, #0 - mov r2, #0 - add r3, r4, #4 - bl sub_02006F50 - str r0, [r4, #8] - str r5, [r4, #0] - ldr r0, [sp, #0x20] - str r6, [r4, #0xc] - str r0, [r4, #0x10] - ldr r0, _02259B88 ; =ov22_02259BD4 - add r1, r4, #0 - mov r2, #0x80 - bl sub_0200DA3C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02259B88: .word ov22_02259BD4 - thumb_func_end ov22_02259B3C - - thumb_func_start ov22_02259B8C -ov22_02259B8C: ; 0x02259B8C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - ldr r0, [sp, #0x1c] - mov r1, #0x14 - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_02259BA6: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _02259BA6 - ldr r1, [sp] - ldr r3, [sp, #0x1c] - add r0, r7, #0 - add r2, r4, #0 - bl sub_02006F88 - str r0, [r4, #4] - str r5, [r4, #8] - ldr r0, [sp, #0x18] - str r6, [r4, #0xc] - str r0, [r4, #0x10] - ldr r0, _02259BD0 ; =ov22_02259C10 - add r1, r4, #0 - mov r2, #0x80 - bl sub_0200DA3C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02259BD0: .word ov22_02259C10 - thumb_func_end ov22_02259B8C - - thumb_func_start ov22_02259BD4 -ov22_02259BD4: ; 0x02259BD4 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r0, [r1, #0x14] - ldr r1, [r1, #0x10] - bl sub_020C2C54 - ldr r3, [r4, #4] - ldr r0, [r4, #0x10] - str r0, [sp] - ldr r1, [r4, #0xc] - ldr r2, [r3, #0x14] - lsl r1, r1, #0x18 - ldr r0, [r4, #0] - ldr r3, [r3, #0x10] - lsr r1, r1, #0x18 - bl sub_0201958C - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #8] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_02259BD4 - - thumb_func_start ov22_02259C10 -ov22_02259C10: ; 0x02259C10 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [r4, #8] - cmp r0, #0 - bne _02259C34 - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - ldr r0, [r0, #0xc] - ldr r2, [r4, #0x10] - bl sub_020C00B4 - b _02259C44 -_02259C34: - cmp r0, #4 - bne _02259C44 - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - ldr r0, [r0, #0xc] - ldr r2, [r4, #0x10] - bl sub_020C0108 -_02259C44: - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02259C10 - - thumb_func_start ov22_02259C58 -ov22_02259C58: ; 0x02259C58 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _02259C66 - bl sub_02022974 -_02259C66: - cmp r4, #0 - bne _02259C6E - bl sub_02022974 -_02259C6E: - ldr r0, [r4, #0] - bl sub_02021AA0 - str r0, [r5, #0] - cmp r0, #0 - bne _02259C7E - bl sub_02022974 -_02259C7E: - ldr r0, [r4, #0xc] - str r0, [r5, #4] - ldr r0, [r4, #8] - str r0, [r5, #8] - ldr r0, [r4, #4] - cmp r0, #0 - beq _02259C90 - str r0, [r5, #0xc] - pop {r3, r4, r5, pc} -_02259C90: - ldr r0, _02259C98 ; =ov22_02259D94 - str r0, [r5, #0xc] - pop {r3, r4, r5, pc} - nop -_02259C98: .word ov22_02259D94 - thumb_func_end ov22_02259C58 - - thumb_func_start ov22_02259C9C -ov22_02259C9C: ; 0x02259C9C - push {r3, r4, r5, lr} - sub sp, #0x30 - add r4, r1, #0 - add r5, r0, #0 - bl ov22_02259C58 - ldr r0, [r4, #0x14] - str r0, [sp] - ldr r0, [r4, #0x10] - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - str r0, [sp, #8] - ldr r0, [r4, #0x18] - str r0, [sp, #0xc] - ldr r0, [r5, #0] - str r0, [sp, #0x10] - ldr r0, [r4, #0x24] - str r0, [sp, #0x14] - ldr r0, [r4, #0x1c] - str r0, [sp, #0x18] - ldr r0, [r4, #0x20] - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - str r0, [sp, #0x24] - ldr r0, [r4, #0] - ldr r0, [r0, #0x28] - str r0, [sp, #0x28] - ldr r0, [r4, #0] - ldr r0, [r0, #0x2c] - str r0, [sp, #0x2c] - add r0, sp, #0 - bl sub_020127E8 - str r0, [r5, #0x10] - add sp, #0x30 - pop {r3, r4, r5, pc} - thumb_func_end ov22_02259C9C - - thumb_func_start ov22_02259CE8 -ov22_02259CE8: ; 0x02259CE8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02021BD4 - mov r1, #0x10 - mov r0, #0 -_02259CF6: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _02259CF6 - pop {r4, pc} - thumb_func_end ov22_02259CE8 - - thumb_func_start ov22_02259D00 -ov22_02259D00: ; 0x02259D00 - push {r4, lr} - add r4, r0, #0 - bl ov22_02259CE8 - ldr r0, [r4, #0x10] - bl sub_02012870 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02259D00 - - thumb_func_start ov22_02259D1C -ov22_02259D1C: ; 0x02259D1C - push {r3, lr} - ldr r2, [r0, #4] - cmp r1, r2 - bne _02259D2A - ldr r1, [r0, #8] - ldr r2, [r0, #0xc] - blx r2 -_02259D2A: - pop {r3, pc} - thumb_func_end ov22_02259D1C - - thumb_func_start ov22_02259D2C -ov22_02259D2C: ; 0x02259D2C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - mov r4, #2 - add r5, #0x20 -_02259D38: - cmp r4, r7 - beq _02259D44 - add r0, r5, #0 - bl ov22_02259DA4 - b _02259D68 -_02259D44: - cmp r6, #0 - bne _02259D56 - add r0, r5, #0 - bl ov22_02259DB0 - ldr r0, _02259D74 ; =0x0000067D - bl sub_02005748 - b _02259D68 -_02259D56: - cmp r6, #2 - bne _02259D62 - add r0, r5, #0 - bl ov22_02259D98 - b _02259D68 -_02259D62: - add r0, r5, #0 - bl ov22_02259DB0 -_02259D68: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #3 - ble _02259D38 - pop {r3, r4, r5, r6, r7, pc} - nop -_02259D74: .word 0x0000067D - thumb_func_end ov22_02259D2C - - thumb_func_start ov22_02259D78 -ov22_02259D78: ; 0x02259D78 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _02259D8A - bl sub_02022974 -_02259D8A: - str r7, [r5, #4] - str r6, [r5, #8] - str r4, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02259D78 - - thumb_func_start ov22_02259D94 -ov22_02259D94: ; 0x02259D94 - bx lr - ; .align 2, 0 - thumb_func_end ov22_02259D94 - - thumb_func_start ov22_02259D98 -ov22_02259D98: ; 0x02259D98 - ldr r3, _02259DA0 ; =sub_02021E50 - ldr r0, [r0, #0] - mov r1, #2 - bx r3 - ; .align 2, 0 -_02259DA0: .word sub_02021E50 - thumb_func_end ov22_02259D98 - - thumb_func_start ov22_02259DA4 -ov22_02259DA4: ; 0x02259DA4 - ldr r3, _02259DAC ; =sub_02021E50 - ldr r0, [r0, #0] - mov r1, #0 - bx r3 - ; .align 2, 0 -_02259DAC: .word sub_02021E50 - thumb_func_end ov22_02259DA4 - - thumb_func_start ov22_02259DB0 -ov22_02259DB0: ; 0x02259DB0 - ldr r3, _02259DB8 ; =sub_02021E50 - ldr r0, [r0, #0] - mov r1, #1 - bx r3 - ; .align 2, 0 -_02259DB8: .word sub_02021E50 - thumb_func_end ov22_02259DB0 - - thumb_func_start ov22_02259DBC -ov22_02259DBC: ; 0x02259DBC - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r1, #0 - mov r0, #1 - mov r1, #0xd - bl sub_02012744 - str r0, [r5, #0x64] - add r0, r4, #0 - bl ov22_0225A218 - mov r0, #0x90 - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0x20 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0 - add r2, r4, #0 - mov r3, #0x30 - bl ov22_0225A0E4 - mov r0, #0x28 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x6c - mov r1, #0 - mov r2, #0x30 - mov r3, #0x98 - bl ov22_0225A200 - mov r0, #0x90 - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0x20 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x10 - mov r1, #1 - add r2, r4, #0 - mov r3, #8 - bl ov22_0225A0E4 - mov r0, #0x28 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x6c - mov r1, #1 - mov r2, #8 - mov r3, #0x98 - bl ov22_0225A200 - mov r0, #0x90 - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x20 - mov r1, #2 - add r2, r4, #0 - mov r3, #0x60 - bl ov22_0225A0E4 - mov r0, #0x28 - str r0, [sp] - mov r0, #0x22 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x6c - mov r1, #2 - mov r2, #0x60 - mov r3, #0x9c - bl ov22_0225A200 - mov r0, #0x90 - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0x2a - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x30 - mov r1, #3 - add r2, r4, #0 - mov r3, #0x88 - bl ov22_0225A0E4 - mov r0, #0x28 - str r0, [sp] - mov r0, #0x22 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x6c - mov r1, #3 - mov r2, #0x88 - mov r3, #0x9c - bl ov22_0225A200 - mov r0, #2 - mov r1, #0xe - bl sub_02002BB8 - mov r0, #9 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - ldr r2, _02259F1C ; =0x00000181 - add r0, r4, #0 - mov r1, #0x1a - mov r3, #0 - bl ov22_0225A348 - add r6, r0, #0 - str r6, [sp] - mov r0, #0xb8 - str r0, [sp, #4] - mov r0, #0x90 - str r0, [sp, #8] - mov r0, #0x48 - str r0, [sp, #0xc] - mov r0, #0x2a - str r0, [sp, #0x10] - add r0, r5, #0 - ldr r3, [r5, #0x64] - add r0, #0x40 - mov r1, #4 - add r2, r4, #0 - bl ov22_0225A154 - mov r0, #0x48 - str r0, [sp] - mov r0, #0x22 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x6c - mov r1, #4 - mov r2, #0xb8 - mov r3, #0x9c - bl ov22_0225A200 - add r0, r6, #0 - bl ov22_0225A3D0 - mov r0, #2 - bl sub_02002C60 - mov r0, #1 - str r0, [r5, #0x60] - add r0, r4, #0 - bl ov22_0225A2A8 - add r0, r5, #0 - add r0, #0x20 - bl ov22_02259D98 - mov r0, #0xd - str r0, [sp] - add r0, r5, #0 - ldr r2, _02259F20 ; =ov22_0225A02C - add r0, #0x6c - mov r1, #5 - add r3, r5, #0 - bl sub_02023FCC - str r0, [r5, #0x68] - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02259F1C: .word 0x00000181 -_02259F20: .word ov22_0225A02C - thumb_func_end ov22_02259DBC - - thumb_func_start ov22_02259F24 -ov22_02259F24: ; 0x02259F24 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r4, #0 -_02259F2C: - add r0, r5, #0 - add r1, r4, #0 - bl ov22_022552EC - add r0, r5, #0 - add r1, r4, #0 - bl ov22_02255300 - add r0, r4, #0 - bl sub_0201EB50 - add r4, r4, #1 - cmp r4, #5 - blt _02259F2C - mov r0, #0 - bl sub_0201F9F0 - mov r0, #1 - bl sub_0201F9F0 - mov r5, #0 - add r4, r6, #0 -_02259F58: - add r0, r4, #0 - bl ov22_02259CE8 - add r5, r5, #1 - add r4, #0x10 - cmp r5, #4 - blt _02259F58 - add r0, r6, #0 - add r0, #0x54 - bl sub_0201EE28 - add r0, r6, #0 - add r0, #0x40 - bl ov22_02259D00 - ldr r0, [r6, #0x64] - bl sub_020127BC - ldr r0, [r6, #0x68] - bl sub_02024034 - mov r0, #0 - str r0, [r6, #0x68] - pop {r4, r5, r6, pc} - thumb_func_end ov22_02259F24 - - thumb_func_start ov22_02259F88 -ov22_02259F88: ; 0x02259F88 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x68] - cmp r0, #0 - bne _02259F96 - bl sub_02022974 -_02259F96: - ldr r0, [r4, #0x68] - bl sub_0202404C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02259F88 - - thumb_func_start ov22_02259FA0 -ov22_02259FA0: ; 0x02259FA0 - push {r4, lr} - add r4, r0, #0 - add r0, #0x40 - mov r1, #3 - bl ov22_0225A2D0 - add r0, r4, #0 - add r0, #0x40 - mov r1, #3 - bl ov22_0225A2F4 - add r0, r4, #0 - mov r1, #2 - mov r2, #3 - bl ov22_02259D2C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_02259FA0 - - thumb_func_start ov22_02259FC4 -ov22_02259FC4: ; 0x02259FC4 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r6, r1, #0 - add r7, r2, #0 - mov r4, #0 - add r5, r0, #0 -_02259FD0: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov22_0225A3DC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _02259FD0 - ldr r0, [sp] - add r1, r6, #0 - add r0, #0x40 - add r2, r7, #0 - str r0, [sp] - bl ov22_0225A418 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02259FC4 - - thumb_func_start ov22_02259FF4 -ov22_02259FF4: ; 0x02259FF4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _0225A006 - bl sub_02022974 -_0225A006: - cmp r4, #4 - bge _0225A01A - lsl r0, r4, #4 - ldr r3, [sp, #0x18] - add r0, r5, r0 - add r1, r6, #0 - add r2, r7, #0 - bl ov22_02259D78 - pop {r3, r4, r5, r6, r7, pc} -_0225A01A: - add r5, #0x40 - ldr r3, [sp, #0x18] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov22_02259D78 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_02259FF4 - - thumb_func_start ov22_0225A02C -ov22_0225A02C: ; 0x0225A02C - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - cmp r6, #4 - bhi _0225A0D4 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225A044: ; jump table - .short _0225A04E - _0225A044 - 2 ; case 0 - .short _0225A06A - _0225A044 - 2 ; case 1 - .short _0225A08C - _0225A044 - 2 ; case 2 - .short _0225A08C - _0225A044 - 2 ; case 3 - .short _0225A0A2 - _0225A044 - 2 ; case 4 -_0225A04E: - add r0, r4, #0 - bl ov22_0225A2D0 - ldr r1, _0225A0DC ; =0x00000681 - add r0, r4, #0 - mov r2, #0 - add r3, r5, #0 - bl ov22_0225A338 - add r0, r4, #0 - add r1, r5, #0 - bl ov22_02259D1C - pop {r4, r5, r6, pc} -_0225A06A: - add r0, r4, #0 - add r0, #0x10 - bl ov22_0225A2D0 - add r0, r4, #0 - ldr r1, _0225A0DC ; =0x00000681 - add r0, #0x10 - mov r2, #0 - add r3, r5, #0 - bl ov22_0225A338 - add r4, #0x10 - add r0, r4, #0 - add r1, r5, #0 - bl ov22_02259D1C - pop {r4, r5, r6, pc} -_0225A08C: - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov22_02259D2C - lsl r0, r6, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov22_02259D1C - pop {r4, r5, r6, pc} -_0225A0A2: - ldr r0, [r4, #0x60] - cmp r0, #1 - bne _0225A0D8 - add r0, r4, #0 - add r0, #0x40 - bl ov22_0225A2D0 - add r0, r4, #0 - add r0, #0x40 - add r1, r5, #0 - bl ov22_0225A2F4 - add r0, r4, #0 - ldr r1, _0225A0E0 ; =0x000005E2 - add r0, #0x40 - mov r2, #0 - add r3, r5, #0 - bl ov22_0225A338 - add r4, #0x40 - add r0, r4, #0 - add r1, r5, #0 - bl ov22_02259D1C - pop {r4, r5, r6, pc} -_0225A0D4: - bl sub_02022974 -_0225A0D8: - pop {r4, r5, r6, pc} - nop -_0225A0DC: .word 0x00000681 -_0225A0E0: .word 0x000005E2 - thumb_func_end ov22_0225A02C - - thumb_func_start ov22_0225A0E4 -ov22_0225A0E4: ; 0x0225A0E4 - push {r4, r5, r6, lr} - sub sp, #0x90 - add r6, r0, #0 - mov r0, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - add r5, r2, #0 - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - str r2, [sp, #0x10] - ldr r0, [r5, #0x48] - add r4, r3, #0 - str r0, [sp, #0x14] - ldr r0, [r5, #0x4c] - add r3, r1, #0 - str r0, [sp, #0x18] - ldr r0, [r5, #0x50] - str r0, [sp, #0x1c] - ldr r0, [r5, #0x54] - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r0, sp, #0x5c - bl sub_020093B4 - ldr r0, [r5, #0x44] - mov r2, #0 - mov r1, #1 - str r0, [sp, #0x2c] - add r0, sp, #0x5c - str r0, [sp, #0x30] - lsl r0, r4, #0xc - str r0, [sp, #0x34] - ldr r0, [sp, #0xa0] - str r1, [sp, #0x54] - lsl r0, r0, #0xc - str r0, [sp, #0x38] - mov r0, #2 - str r0, [sp, #0x50] - mov r0, #0xe - str r0, [sp, #0x58] - add r0, sp, #0x2c - str r0, [sp, #0x80] - str r1, [sp, #0x8c] - add r0, r6, #0 - add r1, sp, #0x80 - str r2, [sp, #0x3c] - str r2, [sp, #0x84] - str r2, [sp, #0x88] - bl ov22_02259C58 - add sp, #0x90 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A0E4 - - thumb_func_start ov22_0225A154 -ov22_0225A154: ; 0x0225A154 - push {r4, r5, r6, lr} - sub sp, #0xa8 - add r5, r0, #0 - mov r0, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - add r4, r2, #0 - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - str r2, [sp, #0x10] - ldr r0, [r4, #0x48] - add r6, r3, #0 - str r0, [sp, #0x14] - ldr r0, [r4, #0x4c] - add r3, r1, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #0x50] - str r0, [sp, #0x1c] - ldr r0, [r4, #0x54] - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r0, sp, #0x5c - bl sub_020093B4 - ldr r0, [r4, #0x44] - mov r2, #0xe - str r0, [sp, #0x2c] - add r0, sp, #0x5c - str r0, [sp, #0x30] - ldr r0, [sp, #0xbc] - str r2, [sp, #0x58] - lsl r0, r0, #0xc - str r0, [sp, #0x34] - ldr r0, [sp, #0xc0] - add r2, sp, #0x2c - lsl r0, r0, #0xc - mov r1, #2 - str r2, [sp, #0x80] - ldr r2, [sp, #0xb8] - str r0, [sp, #0x38] - mov r0, #0 - str r1, [sp, #0x50] - mov r1, #1 - str r0, [sp, #0x3c] - str r1, [sp, #0x54] - str r0, [sp, #0x84] - str r0, [sp, #0x88] - str r0, [sp, #0x9c] - mov r0, #0x13 - str r1, [sp, #0x8c] - str r6, [sp, #0x94] - str r2, [sp, #0x90] - str r0, [sp, #0xa0] - ldr r0, [r4, #0x4c] - bl sub_02009DC8 - mov r1, #0 - bl sub_0200A72C - str r0, [sp, #0x98] - ldr r0, [sp, #0xb8] - mov r1, #1 - mov r2, #0xd - bl sub_02012898 - mov r1, #1 - add r3, r5, #0 - add r2, r1, #0 - add r3, #0x14 - bl sub_0201ED94 - cmp r0, #0 - bne _0225A1F0 - bl sub_02022974 -_0225A1F0: - ldr r0, [r5, #0x18] - add r1, sp, #0x80 - str r0, [sp, #0xa4] - add r0, r5, #0 - bl ov22_02259C9C - add sp, #0xa8 - pop {r4, r5, r6, pc} - thumb_func_end ov22_0225A154 - - thumb_func_start ov22_0225A200 -ov22_0225A200: ; 0x0225A200 - lsl r1, r1, #2 - strb r3, [r0, r1] - add r1, r0, r1 - ldr r0, [sp, #4] - strb r2, [r1, #2] - add r0, r3, r0 - strb r0, [r1, #1] - ldr r0, [sp] - add r0, r2, r0 - strb r0, [r1, #3] - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225A200 - - thumb_func_start ov22_0225A218 -ov22_0225A218: ; 0x0225A218 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x6b - mov r4, #0 - str r0, [sp, #0xc] - mov r7, #0x6a - mov r6, #0x69 -_0225A228: - mov r0, #1 - str r0, [sp] - mov r1, #6 - str r4, [sp, #4] - lsl r1, r1, #6 - ldr r1, [r5, r1] - ldr r2, [sp, #0xc] - add r0, r5, #0 - mov r3, #0 - bl ov22_02255248 - mov r1, #6 - str r4, [sp] - lsl r1, r1, #6 - ldr r1, [r5, r1] - add r0, r5, #0 - add r2, r7, #0 - mov r3, #0 - bl ov22_0225528C - mov r1, #6 - str r4, [sp] - lsl r1, r1, #6 - ldr r1, [r5, r1] - add r0, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov22_022552A8 - ldr r0, [sp, #0xc] - add r4, r4, #1 - add r0, r0, #3 - str r0, [sp, #0xc] - add r7, r7, #3 - add r6, r6, #3 - cmp r4, #5 - blt _0225A228 - mov r0, #1 - str r0, [sp] - mov r1, #3 - str r1, [sp, #4] - mov r3, #0 - str r3, [sp, #8] - lsl r1, r1, #7 - ldr r1, [r5, r1] - add r0, r5, #0 - mov r2, #0x68 - bl ov22_02255268 - mov r1, #1 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #6 - lsl r1, r1, #6 - ldr r1, [r5, r1] - add r0, r5, #0 - mov r2, #0x78 - mov r3, #0 - bl ov22_02255268 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_0225A218 - - thumb_func_start ov22_0225A2A8 -ov22_0225A2A8: ; 0x0225A2A8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0225A2AE: - add r0, r5, #0 - add r1, r4, #0 - bl ov22_022552C4 - add r4, r4, #1 - cmp r4, #5 - blt _0225A2AE - add r0, r5, #0 - mov r1, #0 - bl ov22_022552D8 - add r0, r5, #0 - mov r1, #1 - bl ov22_022552D8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A2A8 - - thumb_func_start ov22_0225A2D0 -ov22_0225A2D0: ; 0x0225A2D0 - push {r3, lr} - cmp r1, #0 - bne _0225A2DC - bl ov22_02259DB0 - pop {r3, pc} -_0225A2DC: - cmp r1, #2 - bne _0225A2E6 - bl ov22_02259D98 - pop {r3, pc} -_0225A2E6: - cmp r1, #1 - beq _0225A2EE - cmp r1, #3 - bne _0225A2F2 -_0225A2EE: - bl ov22_02259DA4 -_0225A2F2: - pop {r3, pc} - thumb_func_end ov22_0225A2D0 - - thumb_func_start ov22_0225A2F4 -ov22_0225A2F4: ; 0x0225A2F4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bne _0225A310 - ldr r0, [r5, #0x10] - mov r1, #0 - mov r2, #0xf - bl sub_020128C4 - ldr r0, [r5, #0x10] - mov r1, #4 - bl sub_02012A60 - pop {r3, r4, r5, pc} -_0225A310: - cmp r4, #1 - bne _0225A31E - ldr r0, [r5, #0x10] - mov r1, #0 - mov r2, #0x13 - bl sub_020128C4 -_0225A31E: - cmp r4, #3 - bne _0225A334 - ldr r0, [r5, #0x10] - mov r1, #0 - mov r2, #0x13 - bl sub_020128C4 - ldr r0, [r5, #0x10] - mov r1, #3 - bl sub_02012A60 -_0225A334: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A2F4 - - thumb_func_start ov22_0225A338 -ov22_0225A338: ; 0x0225A338 - push {r3, lr} - cmp r3, r2 - bne _0225A346 - lsl r0, r1, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_0225A346: - pop {r3, pc} - thumb_func_end ov22_0225A338 - - thumb_func_start ov22_0225A348 -ov22_0225A348: ; 0x0225A348 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r0, #0 - add r4, r3, #0 - mov r0, #0 - mov r3, #0xd - bl sub_0200B144 - add r7, r0, #0 - bne _0225A360 - bl sub_02022974 -_0225A360: - add r0, r7, #0 - add r1, r4, #0 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0xe - mov r1, #1 - bl sub_0201A778 - add r4, r0, #0 - bl sub_0201A7A0 - mov r0, #0 - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x2c] - str r0, [sp] - str r0, [sp, #4] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r6, #0x40] - add r1, r4, #0 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A870 - ldr r3, [sp, #0x28] - mov r0, #2 - add r1, r5, #0 - mov r2, #0 - lsl r3, r3, #3 - bl sub_02002EEC - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0225A3CC ; =0x00010203 - add r2, r5, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r4, #0 - mov r1, #2 - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225A3CC: .word 0x00010203 - thumb_func_end ov22_0225A348 - - thumb_func_start ov22_0225A3D0 -ov22_0225A3D0: ; 0x0225A3D0 - ldr r3, _0225A3D8 ; =sub_0201A928 - mov r1, #1 - bx r3 - nop -_0225A3D8: .word sub_0201A928 - thumb_func_end ov22_0225A3D0 - - thumb_func_start ov22_0225A3DC -ov22_0225A3DC: ; 0x0225A3DC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r6, r2, #0 - bl sub_02021D28 - add r3, r0, #0 - add r2, sp, #0 - ldmia r3!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [sp] - lsl r0, r4, #0xc - add r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - lsl r0, r6, #0xc - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r1, r7, #0 - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A3DC - - thumb_func_start ov22_0225A418 -ov22_0225A418: ; 0x0225A418 - push {r4, lr} - add r4, r0, #0 - bl ov22_0225A3DC - ldr r0, [r4, #0x10] - bl sub_02012938 - pop {r4, pc} - thumb_func_end ov22_0225A418 - - thumb_func_start ov22_0225A428 -ov22_0225A428: ; 0x0225A428 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r1, #0 - add r6, r2, #0 - mov r1, #1 - add r5, r0, #0 - tst r1, r6 - beq _0225A442 - mov r2, #0x52 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 -_0225A442: - mov r0, #2 - tst r0, r6 - beq _0225A450 - ldr r1, [r4, #0] - add r0, r5, #0 - bl ov22_0225A6E0 -_0225A450: - mov r0, #4 - add r1, r6, #0 - tst r1, r0 - beq _0225A474 - mov r1, #0x1b - str r1, [sp] - str r0, [sp, #4] - mov r0, #0x1f - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r5, #0 - ldr r1, [r4, #0] - add r0, #0x2c - mov r2, #2 - mov r3, #0x13 - bl ov22_0225A748 -_0225A474: - mov r0, #8 - tst r0, r6 - beq _0225A48C - ldr r0, [r4, #0x24] - str r0, [sp] - add r0, r5, #0 - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0x10] - add r0, #0x38 - bl ov22_0225A914 -_0225A48C: - mov r0, #0x10 - tst r0, r6 - beq _0225A4AC - ldr r0, [r4, #0] - str r0, [sp] - ldr r0, [r4, #0x20] - str r0, [sp, #4] - ldr r0, [r4, #0x24] - str r0, [sp, #8] - add r0, r5, #0 - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0x1c] - add r0, #0xa0 - bl ov22_0225AB54 -_0225A4AC: - mov r0, #0x20 - tst r0, r6 - beq _0225A522 - mov r0, #0x1b - str r0, [sp] - mov r2, #2 - str r2, [sp, #4] - mov r0, #0x8b - str r0, [sp, #8] - mov r3, #1 - str r3, [sp, #0xc] - add r0, #0xa9 - ldr r1, [r4, #0] - add r0, r5, r0 - bl ov22_0225A748 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0225A55C ; =0x0001020F - mov r1, #0x1a - str r0, [sp, #8] - mov r0, #0xff - str r0, [sp, #0xc] - add r0, #0x35 - ldr r0, [r5, r0] - ldr r2, [r4, #0x14] - mov r3, #6 - bl ov22_0225A860 - mov r0, #0x48 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0225A55C ; =0x0001020F - mov r1, #0x1a - str r0, [sp, #8] - mov r0, #0xff - str r0, [sp, #0xc] - add r0, #0x35 - ldr r0, [r5, r0] - ldr r2, [r4, #0x14] - ldr r3, [r4, #0x18] - bl ov22_0225A860 - mov r0, #0x4d - lsl r0, r0, #2 - mov r2, #1 - ldr r0, [r5, r0] - mov r1, #0 - add r3, r2, #0 - bl sub_0200E060 -_0225A522: - ldr r0, [r4, #4] - str r0, [r5, #0x30] - ldr r0, [r4, #8] - str r0, [r5, #0x34] - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - bl ov22_0225A718 - ldr r0, [r4, #0xc] - bl sub_02027B50 - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #0xc] - bl sub_02027AC0 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - add r0, r1, #0 - sub r0, #8 - ldr r0, [r5, r0] - sub r1, #8 - orr r0, r6 - str r0, [r5, r1] - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0225A55C: .word 0x0001020F - thumb_func_end ov22_0225A428 - - thumb_func_start ov22_0225A560 -ov22_0225A560: ; 0x0225A560 - push {r4, lr} - mov r1, #0x4e - add r4, r0, #0 - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r1, #2 - tst r1, r2 - beq _0225A580 - bl ov22_0225A7B8 - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #2 - bic r2, r0 - str r2, [r4, r1] -_0225A580: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r0, #4 - tst r0, r1 - beq _0225A59E - ldr r0, [r4, #0x2c] - bl ov22_0225A7C0 - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #4 - bic r2, r0 - str r2, [r4, r1] -_0225A59E: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r0, #8 - tst r0, r1 - beq _0225A5C0 - add r0, r4, #0 - ldr r1, [r4, #0x34] - add r0, #0x38 - bl ov22_0225AA10 - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #8 - bic r2, r0 - str r2, [r4, r1] -_0225A5C0: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r0, #0x10 - tst r0, r1 - beq _0225A5E2 - add r0, r4, #0 - ldr r1, [r4, #0x34] - add r0, #0xa0 - bl ov22_0225AC58 - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #0x10 - bic r2, r0 - str r2, [r4, r1] -_0225A5E2: - mov r0, #0x4e - lsl r0, r0, #2 - ldr r2, [r4, r0] - mov r1, #0x20 - tst r1, r2 - beq _0225A602 - sub r0, r0, #4 - ldr r0, [r4, r0] - bl ov22_0225A7C0 - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #0x20 - bic r2, r0 - str r2, [r4, r1] -_0225A602: - mov r2, #0x52 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov22_0225A560 - - thumb_func_start ov22_0225A610 -ov22_0225A610: ; 0x0225A610 - push {r3, lr} - mov r1, #0x4e - lsl r1, r1, #2 - ldr r2, [r0, r1] - mov r1, #0x10 - tst r1, r2 - beq _0225A624 - add r0, #0xa0 - bl ov22_0225AC8C -_0225A624: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A610 - - thumb_func_start ov22_0225A628 -ov22_0225A628: ; 0x0225A628 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x4e - lsl r0, r0, #2 - add r4, r1, #0 - ldr r1, [r5, r0] - mov r0, #4 - add r6, r2, #0 - add r7, r3, #0 - tst r0, r1 - bne _0225A644 - bl sub_02022974 -_0225A644: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0xff - str r0, [sp, #8] - ldr r0, [r5, #0x2c] - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov22_0225A7CC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A628 - - thumb_func_start ov22_0225A660 -ov22_0225A660: ; 0x0225A660 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x4e - lsl r0, r0, #2 - add r4, r1, #0 - ldr r1, [r5, r0] - mov r0, #4 - add r6, r2, #0 - add r7, r3, #0 - tst r0, r1 - bne _0225A67C - bl sub_02022974 -_0225A67C: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #5 - lsl r0, r0, #6 - ldr r1, [r5, r0] - add r0, r0, #4 - str r1, [sp, #8] - add r0, r5, r0 - str r0, [sp, #0xc] - ldr r0, [r5, #0x2c] - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov22_0225A814 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_0225A660 - - thumb_func_start ov22_0225A6A0 -ov22_0225A6A0: ; 0x0225A6A0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020237BC - mov r0, #0x51 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} - thumb_func_end ov22_0225A6A0 - - thumb_func_start ov22_0225A6B8 -ov22_0225A6B8: ; 0x0225A6B8 - ldr r3, _0225A6C0 ; =ov22_0225A9C8 - add r0, #0x38 - bx r3 - nop -_0225A6C0: .word ov22_0225A9C8 - thumb_func_end ov22_0225A6B8 - - thumb_func_start ov22_0225A6C4 -ov22_0225A6C4: ; 0x0225A6C4 - add r0, #0xbc - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225A6C4 - - thumb_func_start ov22_0225A6CC -ov22_0225A6CC: ; 0x0225A6CC - add r0, #0xc0 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225A6CC - - thumb_func_start ov22_0225A6D4 -ov22_0225A6D4: ; 0x0225A6D4 - ldr r3, _0225A6DC ; =ov22_0225AF34 - add r0, #0xd0 - bx r3 - nop -_0225A6DC: .word ov22_0225AF34 - thumb_func_end ov22_0225A6D4 - - thumb_func_start ov22_0225A6E0 -ov22_0225A6E0: ; 0x0225A6E0 - push {r3, lr} - sub sp, #0x30 - str r1, [sp] - mov r1, #0x19 - str r1, [sp, #4] - mov r1, #0xe0 - str r1, [sp, #8] - mov r1, #0xe1 - str r1, [sp, #0xc] - mov r2, #0 - mov r1, #0xe2 - str r1, [sp, #0x10] - mov r1, #4 - str r1, [sp, #0x1c] - mov r1, #1 - str r1, [sp, #0x20] - mov r1, #0xe - str r1, [sp, #0x2c] - add r1, sp, #0 - str r2, [sp, #0x14] - str r2, [sp, #0x18] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - bl ov22_022597BC - add sp, #0x30 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A6E0 - - thumb_func_start ov22_0225A718 -ov22_0225A718: ; 0x0225A718 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - add r0, r1, #0 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xe - mov r2, #1 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #5 - add r3, r2, #0 - bl sub_0200DD0C - mov r0, #4 - mov r1, #0x40 - mov r2, #0xe - bl sub_02002E98 - add sp, #8 - pop {r4, pc} - thumb_func_end ov22_0225A718 - - thumb_func_start ov22_0225A748 -ov22_0225A748: ; 0x0225A748 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r1, #0 - add r6, r3, #0 - mov r0, #0xe - mov r1, #1 - add r4, r2, #0 - bl sub_0201A778 - str r0, [r5, #0] - bl sub_0201A7A0 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x28] - lsl r3, r4, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - mov r2, #5 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - ldr r0, [sp, #0x30] - lsr r3, r3, #0x18 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r1, [r5, #0] - add r0, r7, #0 - bl sub_0201A7E8 - ldr r0, [r5, #0] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [sp, #0x34] - cmp r0, #0 - beq _0225A7AC - mov r2, #1 - ldr r0, [r5, #0] - mov r1, #0 - add r3, r2, #0 - bl sub_0200E060 -_0225A7AC: - ldr r0, [r5, #0] - bl sub_0201A954 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A748 - - thumb_func_start ov22_0225A7B8 -ov22_0225A7B8: ; 0x0225A7B8 - ldr r3, _0225A7BC ; =ov22_02259804 - bx r3 - ; .align 2, 0 -_0225A7BC: .word ov22_02259804 - thumb_func_end ov22_0225A7B8 - - thumb_func_start ov22_0225A7C0 -ov22_0225A7C0: ; 0x0225A7C0 - ldr r3, _0225A7C8 ; =sub_0201A928 - mov r1, #1 - bx r3 - nop -_0225A7C8: .word sub_0201A928 - thumb_func_end ov22_0225A7C0 - - thumb_func_start ov22_0225A7CC -ov22_0225A7CC: ; 0x0225A7CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - mov r1, #0xf - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x28] - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0x2c] - add r2, r6, #0 - str r0, [sp, #4] - ldr r0, _0225A810 ; =0x0001020F - add r3, r7, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - add r0, r5, #0 - bl ov22_0225A860 - mov r2, #1 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - add r3, r2, #0 - bl sub_0200E060 - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225A810: .word 0x0001020F - thumb_func_end ov22_0225A7CC - - thumb_func_start ov22_0225A814 -ov22_0225A814: ; 0x0225A814 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - mov r1, #0xf - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x28] - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0x2c] - add r2, r6, #0 - str r0, [sp, #4] - ldr r0, _0225A85C ; =0x0001020F - add r3, r7, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - ldr r0, [sp, #0x34] - str r0, [sp, #0x10] - add r0, r5, #0 - bl ov22_0225A8B4 - mov r2, #1 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0 - add r3, r2, #0 - bl sub_0200E060 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0225A85C: .word 0x0001020F - thumb_func_end ov22_0225A814 - - thumb_func_start ov22_0225A860 -ov22_0225A860: ; 0x0225A860 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - add r4, r3, #0 - mov r0, #0 - mov r3, #0xd - bl sub_0200B144 - add r5, r0, #0 - bne _0225A878 - bl sub_02022974 -_0225A878: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x20] - str r0, [sp] - ldr r0, [sp, #0x2c] - mov r1, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x28] - add r2, r4, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r6, #0 - bl sub_0201D78C - add r6, r0, #0 - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_0200B190 - add r0, r6, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_0225A860 - - thumb_func_start ov22_0225A8B4 -ov22_0225A8B4: ; 0x0225A8B4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r4, [sp, #0x38] - add r7, r0, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - add r6, r2, #0 - str r3, [sp, #0x10] - cmp r0, #0 - beq _0225A8CC - bl sub_02022974 -_0225A8CC: - mov r0, #0 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0xd - bl sub_0200B144 - add r5, r0, #0 - bne _0225A8E0 - bl sub_02022974 -_0225A8E0: - ldr r1, [sp, #0x10] - add r0, r5, #0 - bl sub_0200B1EC - str r0, [r4, #0] - ldr r0, [sp, #0x2c] - ldr r3, [sp, #0x28] - str r0, [sp] - ldr r0, [sp, #0x34] - mov r1, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r4, #0] - add r0, r7, #0 - bl sub_0201D78C - add r4, r0, #0 - add r0, r5, #0 - bl sub_0200B190 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_0225A8B4 - - thumb_func_start ov22_0225A914 -ov22_0225A914: ; 0x0225A914 - push {r4, r5, r6, r7, lr} - sub sp, #0x6c - add r5, r1, #0 - mov r1, #0x67 - str r1, [sp] - mov r1, #0xe1 - str r1, [sp, #4] - mov r1, #0x66 - str r1, [sp, #8] - mov r1, #0x65 - str r1, [sp, #0xc] - mov r1, #2 - str r1, [sp, #0x10] - mov r1, #0x7d - add r4, r2, #0 - str r3, [sp, #0x1c] - lsl r1, r1, #4 - str r1, [sp, #0x14] - ldr r3, [sp, #0x80] - str r0, [sp, #0x18] - add r1, r4, #0 - mov r2, #0xe - bl ov22_0225AA34 - ldr r0, [sp, #0x18] - add r1, r4, #0 - add r2, sp, #0x48 - mov r3, #0 - bl ov22_0225AAF4 - add r0, sp, #0x48 - str r0, [sp, #0x2c] - mov r0, #2 - str r0, [sp, #0x40] - mov r0, #0 - str r0, [sp, #0x24] - str r0, [sp, #0x3c] - mov r0, #0xe - str r0, [sp, #0x44] - mov r0, #0x68 - ldr r7, [sp, #0x24] - str r5, [sp, #0x28] - str r0, [sp, #0x20] -_0225A96A: - ldr r0, [sp, #0x20] - mov r6, #0 - str r0, [sp, #0x34] - lsl r1, r0, #0xc - mov r0, #2 - lsl r0, r0, #0x14 - str r1, [sp, #0x34] - add r0, r1, r0 - str r0, [sp, #0x34] - ldr r0, [sp, #0x18] - lsl r1, r7, #2 - mov r4, #0x26 - add r5, r0, r1 -_0225A984: - str r4, [sp, #0x30] - lsl r0, r4, #0xc - str r0, [sp, #0x30] - add r0, sp, #0x28 - bl sub_02021B90 - mov r1, #1 - str r0, [r5, #0x10] - bl sub_02021D6C - ldr r0, [sp, #0x1c] - add r1, r6, r7 - cmp r1, r0 - blt _0225A9A8 - ldr r0, [r5, #0x10] - mov r1, #0 - bl sub_02021CAC -_0225A9A8: - add r6, r6, #1 - add r4, #0x12 - add r5, r5, #4 - cmp r6, #0xa - blt _0225A984 - ldr r0, [sp, #0x20] - add r7, #0xa - add r0, #0x12 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, #2 - blt _0225A96A - add sp, #0x6c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_0225A914 - - thumb_func_start ov22_0225A9C8 -ov22_0225A9C8: ; 0x0225A9C8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r6, [r7, #0x60] - add r5, r1, #0 - cmp r6, r5 - bge _0225A9EE - cmp r6, r5 - bge _0225AA0C - lsl r0, r6, #2 - add r4, r7, r0 -_0225A9DC: - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_02021D6C - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r5 - blt _0225A9DC - b _0225AA0C -_0225A9EE: - cmp r6, r5 - ble _0225AA0C - sub r6, r6, #1 - cmp r6, r5 - blt _0225AA0C - lsl r0, r6, #2 - add r4, r7, r0 -_0225A9FC: - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02021D6C - sub r6, r6, #1 - sub r4, r4, #4 - cmp r6, r5 - bge _0225A9FC -_0225AA0C: - str r5, [r7, #0x60] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_0225A9C8 - - thumb_func_start ov22_0225AA10 -ov22_0225AA10: ; 0x0225AA10 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r4, #0 - add r5, r6, #0 -_0225AA1A: - ldr r0, [r5, #0x10] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x14 - blt _0225AA1A - add r0, r6, #0 - add r1, r7, #0 - bl ov22_0225AAC0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AA10 - - thumb_func_start ov22_0225AA34 -ov22_0225AA34: ; 0x0225AA34 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r2, #0 - ldr r7, [sp, #0x3c] - ldr r2, [sp, #0x28] - add r5, r0, #0 - add r0, r7, r2 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - add r4, r1, #0 - str r6, [sp, #8] - ldr r0, [r4, #0] - str r3, [sp, #0x10] - add r1, r3, #0 - mov r3, #0 - bl sub_02009A4C - str r0, [r5, #0] - bl sub_0200A3DC - ldr r0, [r5, #0] - bl sub_02009D4C - ldr r2, [sp, #0x2c] - ldr r1, [sp, #0x10] - add r0, r7, r2 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x38] - mov r3, #0 - str r0, [sp, #8] - str r6, [sp, #0xc] - ldr r0, [r4, #4] - bl sub_02009B04 - str r0, [r5, #4] - bl sub_0200A640 - ldr r0, [r5, #4] - bl sub_02009D4C - ldr r2, [sp, #0x30] - ldr r1, [sp, #0x10] - add r0, r7, r2 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #8] - mov r3, #0 - bl sub_02009BC4 - ldr r2, [sp, #0x34] - str r0, [r5, #8] - add r0, r7, r2 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r4, #0xc] - ldr r1, [sp, #0x10] - mov r3, #0 - bl sub_02009BC4 - str r0, [r5, #0xc] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AA34 - - thumb_func_start ov22_0225AAC0 -ov22_0225AAC0: ; 0x0225AAC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - bl sub_0200A4E4 - ldr r0, [r5, #4] - bl sub_0200A6DC - ldr r0, [r4, #0] - ldr r1, [r5, #0] - bl sub_02009D68 - ldr r0, [r4, #4] - ldr r1, [r5, #4] - bl sub_02009D68 - ldr r0, [r4, #8] - ldr r1, [r5, #8] - bl sub_02009D68 - ldr r0, [r4, #0xc] - ldr r1, [r5, #0xc] - bl sub_02009D68 - pop {r3, r4, r5, pc} - thumb_func_end ov22_0225AAC0 - - thumb_func_start ov22_0225AAF4 -ov22_0225AAF4: ; 0x0225AAF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r7, r2, #0 - add r6, r3, #0 - bl sub_02009E08 - str r0, [sp, #0x2c] - ldr r0, [r5, #4] - bl sub_02009E08 - str r0, [sp, #0x30] - ldr r0, [r5, #8] - bl sub_02009E08 - str r0, [sp, #0x34] - ldr r0, [r5, #0xc] - bl sub_02009E08 - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r6, [sp, #0x10] - ldr r1, [r4, #0] - ldr r2, [sp, #0x30] - str r1, [sp, #0x14] - ldr r1, [r4, #4] - ldr r3, [sp, #0x34] - str r1, [sp, #0x18] - ldr r1, [r4, #8] - str r1, [sp, #0x1c] - ldr r1, [r4, #0xc] - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r1, [sp, #0x2c] - add r0, r7, #0 - bl sub_020093B4 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AAF4 - - thumb_func_start ov22_0225AB54 -ov22_0225AB54: ; 0x0225AB54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r4, r1, #0 - mov r1, #0xe5 - str r1, [sp] - mov r1, #0xe6 - str r1, [sp, #4] - mov r1, #0xe4 - str r1, [sp, #8] - mov r1, #0xe3 - str r1, [sp, #0xc] - mov r1, #2 - str r1, [sp, #0x10] - ldr r1, _0225AC50 ; =0x00000BB8 - add r5, r2, #0 - str r3, [sp, #0x18] - str r1, [sp, #0x14] - ldr r3, [sp, #0x80] - add r7, r0, #0 - add r1, r5, #0 - mov r2, #0xe - bl ov22_0225AA34 - add r0, r7, #0 - add r1, r5, #0 - add r2, sp, #0x3c - mov r3, #0 - bl ov22_0225AAF4 - add r0, sp, #0x3c - str r0, [sp, #0x20] - mov r2, #2 - mov r0, #0xe - mov r1, #0x3a - str r0, [sp, #0x38] - lsl r1, r1, #0xc - lsl r0, r2, #0x14 - mov r6, #0 - str r4, [sp, #0x1c] - str r1, [sp, #0x28] - add r0, r1, r0 - str r2, [sp, #0x34] - str r6, [sp, #0x30] - str r0, [sp, #0x28] - mov r4, #0x67 - add r5, r7, #0 -_0225ABB0: - str r4, [sp, #0x24] - lsl r0, r4, #0xc - str r0, [sp, #0x24] - add r0, sp, #0x1c - bl sub_02021B90 - str r0, [r5, #0x10] - add r6, r6, #1 - add r4, #0x18 - add r5, r5, #4 - cmp r6, #2 - blt _0225ABB0 - ldr r0, [sp, #0x18] - mov r1, #0x1e - str r0, [r7, #0x1c] - mul r1, r0 - str r1, [r7, #0x20] - ldr r1, [sp, #0x7c] - str r1, [r7, #0x2c] - str r0, [r1, #0] - ldr r1, [r7, #0x2c] - str r0, [r1, #8] - add r0, r7, #0 - mov r1, #0 - add r0, #0x90 - str r1, [r0, #0] - add r0, r7, #0 - bl ov22_0225ACE4 - mov r0, #0xe - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0xc1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r7, #0 - ldr r1, [sp, #0x78] - add r0, #0x18 - mov r2, #0xa - mov r3, #8 - bl ov22_0225A748 - ldr r0, [r7, #0x18] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - mov r3, #4 - ldr r0, _0225AC54 ; =0x00010200 - str r3, [sp, #4] - str r0, [sp, #8] - mov r2, #0xff - str r2, [sp, #0xc] - ldr r0, [r7, #0x18] - mov r1, #0x1a - add r2, #0x82 - bl ov22_0225A860 - mov r0, #0x48 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _0225AC54 ; =0x00010200 - mov r2, #0xff - str r0, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r7, #0x18] - mov r1, #0x1a - add r2, #0x82 - mov r3, #5 - bl ov22_0225A860 - ldr r0, [r7, #0x18] - bl sub_0201A954 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225AC50: .word 0x00000BB8 -_0225AC54: .word 0x00010200 - thumb_func_end ov22_0225AB54 - - thumb_func_start ov22_0225AC58 -ov22_0225AC58: ; 0x0225AC58 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x24] - add r4, r1, #0 - cmp r0, #0 - beq _0225AC68 - bl sub_0200DA58 -_0225AC68: - ldr r0, [r5, #0x28] - cmp r0, #0 - beq _0225AC72 - bl sub_0200DA58 -_0225AC72: - add r0, r5, #0 - add r1, r4, #0 - bl ov22_0225AAC0 - ldr r0, [r5, #0x18] - bl ov22_0225A7C0 - add r0, r5, #0 - mov r1, #0 - mov r2, #0x94 - bl sub_020D5124 - pop {r3, r4, r5, pc} - thumb_func_end ov22_0225AC58 - - thumb_func_start ov22_0225AC8C -ov22_0225AC8C: ; 0x0225AC8C - push {r4, lr} - add r4, r0, #0 - bl ov22_0225AD5C - ldr r0, [r4, #0x20] - mov r1, #0x1e - bl sub_020E1F6C - add r1, r0, #0 - ldr r0, [r4, #0x2c] - bl sub_02095C60 - add r0, r4, #0 - bl ov22_0225ACBC - add r0, r4, #0 - bl ov22_0225ACE4 - add r4, #0x30 - add r0, r4, #0 - bl ov22_0225AE9C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AC8C - - thumb_func_start ov22_0225ACBC -ov22_0225ACBC: ; 0x0225ACBC - push {r3, lr} - ldr r1, [r0, #0x2c] - ldr r2, [r1, #0] - ldr r1, [r0, #0x1c] - cmp r1, r2 - beq _0225ACDC - str r2, [r0, #0x1c] - cmp r2, #0xa - bgt _0225ACDC - add r1, r0, #0 - add r1, #0x30 - bl ov22_0225ADC0 - ldr r0, _0225ACE0 ; =0x00000683 - bl sub_02005748 -_0225ACDC: - pop {r3, pc} - nop -_0225ACE0: .word 0x00000683 - thumb_func_end ov22_0225ACBC - - thumb_func_start ov22_0225ACE4 -ov22_0225ACE4: ; 0x0225ACE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - ldr r0, [r6, #0x1c] - mov r1, #1 - str r0, [sp] - mov r0, #0xa - add r4, r1, #0 - mul r4, r0 - mov r7, #0 - add r5, r6, #0 -_0225ACFA: - ldr r0, [sp] - add r1, r4, #0 - bl sub_020E1F6C - str r0, [sp, #4] - cmp r0, #0xa - ble _0225AD0C - bl sub_02022974 -_0225AD0C: - ldr r0, [r5, #0x10] - ldr r1, [sp, #4] - bl sub_02021D6C - ldr r0, [sp, #4] - add r1, r0, #0 - ldr r0, [sp] - mul r1, r4 - sub r0, r0, r1 - str r0, [sp] - add r0, r4, #0 - mov r1, #0xa - bl sub_020E1F6C - add r4, r0, #0 - add r0, r6, #0 - add r0, #0x90 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0225AD4E - ldr r0, [r6, #0x1c] - cmp r0, #0xa - bgt _0225AD4E - ldr r0, [r5, #0x10] - mov r1, #1 - bl sub_02021EC4 - cmp r7, #1 - bne _0225AD4E - add r1, r6, #0 - add r1, #0x90 - mov r0, #1 - str r0, [r1, #0] -_0225AD4E: - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #2 - blt _0225ACFA - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225ACE4 - - thumb_func_start ov22_0225AD5C -ov22_0225AD5C: ; 0x0225AD5C - ldr r1, [r0, #0x20] - sub r1, r1, #1 - bmi _0225AD64 - str r1, [r0, #0x20] -_0225AD64: - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225AD5C - - thumb_func_start ov22_0225AD68 -ov22_0225AD68: ; 0x0225AD68 - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0x10] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov22_0225AD68 - - thumb_func_start ov22_0225AD78 -ov22_0225AD78: ; 0x0225AD78 - push {r4, lr} - add r4, r0, #0 - ldr r2, [r4, #0xc] - ldr r0, [r4, #8] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r4, #0x10] - lsl r1, r1, #0xc - bl sub_020BCFD0 - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r0, #1 - cmp r0, r1 - bgt _0225ADB8 - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_0225ADB8: - str r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AD78 - - thumb_func_start ov22_0225ADC0 -ov22_0225ADC0: ; 0x0225ADC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - str r1, [sp, #4] - mov r1, #0x3a - mov r0, #2 - lsl r1, r1, #0xc - lsl r0, r0, #0x14 - ldr r4, [sp, #4] - str r1, [sp, #0x10] - add r0, r1, r0 - str r0, [sp, #0x10] - add r0, r4, #0 - ldr r6, [sp] - mov r7, #0 - mov r5, #0x67 - str r0, [sp, #8] -_0225ADE2: - ldr r0, [r6, #0x10] - mov r1, #2 - str r0, [r4, #4] - bl sub_02021CF8 - ldr r2, [sp, #8] - str r5, [sp, #0xc] - lsl r0, r5, #0xc - add r2, #0xc - add r3, sp, #0xc - str r0, [sp, #0xc] - ldmia r3!, {r0, r1} - str r2, [sp, #8] - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r7, r7, #1 - str r0, [r2, #0] - add r6, r6, #4 - add r4, r4, #4 - add r5, #0x18 - cmp r7, #2 - blt _0225ADE2 - ldr r0, [sp] - ldr r1, [r0, #0x1c] - mov r0, #0xa - sub r0, r0, r1 - cmp r0, #0 - ble _0225AE3C - lsl r0, r0, #0xc - ldr r2, _0225AE98 ; =0x00000266 - asr r1, r0, #0x1f - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r4, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r4, #0xc - orr r1, r0 - lsl r0, r2, #1 - add r4, r1, r0 - b _0225AE40 -_0225AE3C: - mov r4, #1 - lsl r4, r4, #0xc -_0225AE40: - ldr r0, [sp, #4] - mov r2, #1 - add r0, #0x24 - add r1, r4, #0 - lsl r2, r2, #0xc - mov r3, #0x10 - bl ov22_0225AD68 - mov r2, #6 - asr r1, r4, #0x1f - add r0, r4, #0 - lsl r2, r2, #0xe - mov r3, #0 - bl sub_020E1F1C - mov r3, #2 - mov r2, #0 - lsl r3, r3, #0xa - add r3, r0, r3 - adc r1, r2 - lsl r0, r1, #0x14 - lsr r1, r3, #0xc - orr r1, r0 - mov r0, #6 - lsl r0, r0, #0xe - sub r4, r1, r0 - ldr r0, [sp, #4] - add r1, r4, #0 - add r0, #0x38 - mov r3, #0x10 - bl ov22_0225AD68 - ldr r0, [sp, #4] - add r1, r4, #0 - add r0, #0x4c - mov r2, #0 - mov r3, #0x10 - bl ov22_0225AD68 - ldr r0, [sp, #4] - mov r1, #1 - str r1, [r0, #0] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225AE98: .word 0x00000266 - thumb_func_end ov22_0225ADC0 - - thumb_func_start ov22_0225AE9C -ov22_0225AE9C: ; 0x0225AE9C - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0225AF2E - add r0, r5, #0 - add r0, #0x24 - bl ov22_0225AD78 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x38 - bl ov22_0225AD78 - add r0, r5, #0 - add r0, #0x4c - bl ov22_0225AD78 - ldr r0, [r5, #0x24] - add r1, sp, #0xc - str r0, [sp, #0xc] - ldr r0, [r5, #0x24] - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - str r0, [sp, #0x14] - ldr r0, [r5, #4] - bl sub_02021C70 - ldr r0, [r5, #8] - add r1, sp, #0xc - bl sub_02021C70 - add r6, r5, #0 - add r6, #0xc - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r1, [sp] - ldr r0, [r5, #0x38] - sub r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r5, #0x4c] - sub r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r5, #4] - add r1, r2, #0 - bl sub_02021C50 - add r6, r5, #0 - add r6, #0x18 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r1, [sp, #4] - ldr r0, [r5, #0x4c] - sub r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r5, #8] - add r1, r2, #0 - bl sub_02021C50 - cmp r4, #0 - beq _0225AF2E - mov r0, #0 - str r0, [r5, #0] -_0225AF2E: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AE9C - - thumb_func_start ov22_0225AF34 -ov22_0225AF34: ; 0x0225AF34 - ldr r0, [r0, #0] - cmp r0, #1 - beq _0225AF3E - mov r0, #1 - bx lr -_0225AF3E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225AF34 - - thumb_func_start ov22_0225AF44 -ov22_0225AF44: ; 0x0225AF44 - push {r3, lr} - sub sp, #0x10 - add r3, r1, #0 - stmia r0!, {r1} - add r3, #0x48 - str r3, [sp] - ldr r1, [r1, #0x74] - lsl r1, r1, #2 - add r1, #0x89 - str r1, [sp, #4] - mov r1, #0x10 - str r1, [sp, #8] - add r1, sp, #0 - str r2, [sp, #0xc] - bl ov22_02259820 - add sp, #0x10 - pop {r3, pc} - thumb_func_end ov22_0225AF44 - - thumb_func_start ov22_0225AF68 -ov22_0225AF68: ; 0x0225AF68 - ldr r3, _0225AF70 ; =ov22_02259838 - add r0, r0, #4 - mov r1, #1 - bx r3 - ; .align 2, 0 -_0225AF70: .word ov22_02259838 - thumb_func_end ov22_0225AF68 - - thumb_func_start ov22_0225AF74 -ov22_0225AF74: ; 0x0225AF74 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl ov22_022598A0 - mov r1, #0x1c - mov r0, #0 -_0225AF82: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _0225AF82 - pop {r4, pc} - thumb_func_end ov22_0225AF74 - - thumb_func_start ov22_0225AF8C -ov22_0225AF8C: ; 0x0225AF8C - push {r3, r4, lr} - sub sp, #0x6c - add r2, r0, #0 - add r4, r1, #0 - add r0, sp, #0 - add r1, r2, #0 - bl ov22_0225B4E4 - add r0, sp, #0 - add r1, r4, #0 - bl ov22_0225B4F8 - add r0, sp, #0 - bl ov22_0225B1BC - add sp, #0x6c - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AF8C - - thumb_func_start ov22_0225AFB0 -ov22_0225AFB0: ; 0x0225AFB0 - push {r3, r4, lr} - sub sp, #0x6c - add r2, r0, #0 - add r4, r1, #0 - add r0, sp, #0 - add r1, r2, #0 - bl ov22_0225B4E4 - add r0, sp, #0 - add r1, r4, #0 - bl ov22_0225B540 - add r0, sp, #0 - bl ov22_0225B1BC - add sp, #0x6c - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AFB0 - - thumb_func_start ov22_0225AFD4 -ov22_0225AFD4: ; 0x0225AFD4 - push {r3, r4, lr} - sub sp, #0x6c - add r2, r0, #0 - add r4, r1, #0 - add r0, sp, #0 - add r1, r2, #0 - bl ov22_0225B4E4 - add r0, sp, #0 - add r1, r4, #0 - bl ov22_0225B540 - add r0, sp, #0 - bl ov22_0225B258 - add sp, #0x6c - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225AFD4 - - thumb_func_start ov22_0225AFF8 -ov22_0225AFF8: ; 0x0225AFF8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x26 - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #1 - bne _0225B00E - sub r0, #0x48 - add r0, r4, r0 - bl ov22_0225AF68 -_0225B00E: - mov r0, #0x99 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #1 - bne _0225B01E - add r0, r4, #0 - bl ov22_0225B328 -_0225B01E: - pop {r4, pc} - thumb_func_end ov22_0225AFF8 - - thumb_func_start ov22_0225B020 -ov22_0225B020: ; 0x0225B020 - push {r4, lr} - mov r1, #0x26 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r1, [r4, r1] - cmp r1, #0 - beq _0225B032 - bl ov22_0225B480 -_0225B032: - add r0, r4, #0 - bl ov22_0225B464 - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_02254E0C - mov r0, #0x63 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #8 - add r0, r4, r0 - bl ov22_022594AC - add r0, r4, #0 - bl ov22_0225B35C - mov r0, #0x8d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B020 - - thumb_func_start ov22_0225B06C -ov22_0225B06C: ; 0x0225B06C - ldr r3, _0225B070 ; =ov22_02255530 - bx r3 - ; .align 2, 0 -_0225B070: .word ov22_02255530 - thumb_func_end ov22_0225B06C - - thumb_func_start ov22_0225B074 -ov22_0225B074: ; 0x0225B074 - mov r2, #0x99 - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov22_0225B074 - - thumb_func_start ov22_0225B07C -ov22_0225B07C: ; 0x0225B07C - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov22_0225B07C - - thumb_func_start ov22_0225B080 -ov22_0225B080: ; 0x0225B080 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r2, #0 - mov r2, #0x19 - add r4, r1, #0 - lsl r2, r2, #4 - add r5, r0, #0 - add r1, r2, #0 - add r0, r5, r2 - str r6, [sp] - add r1, #0xac - add r2, #0xb0 - ldr r1, [r5, r1] - ldr r2, [r5, r2] - add r3, r4, #0 - bl ov22_02257AD8 - mov r0, #0x26 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0225B0C8 - mov r3, #0x88 - ldr r0, [r5, #0x40] - mov r1, #2 - mov r2, #0 - sub r3, r3, r4 - bl sub_02019184 - mov r3, #0x10 - ldr r0, [r5, #0x40] - mov r1, #2 - mov r2, #3 - sub r3, r3, r6 - bl sub_02019184 -_0225B0C8: - mov r0, #0x8f - lsl r0, r0, #2 - str r4, [r5, r0] - add r0, r0, #4 - str r6, [r5, r0] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B080 - - thumb_func_start ov22_0225B0D8 -ov22_0225B0D8: ; 0x0225B0D8 - mov r3, #0x91 - lsl r3, r3, #2 - str r1, [r0, r3] - add r1, r3, #4 - str r2, [r0, r1] - bx lr - thumb_func_end ov22_0225B0D8 - - thumb_func_start ov22_0225B0E4 -ov22_0225B0E4: ; 0x0225B0E4 - mov r2, #0x93 - lsl r2, r2, #2 - strh r1, [r0, r2] - bx lr - thumb_func_end ov22_0225B0E4 - - thumb_func_start ov22_0225B0EC -ov22_0225B0EC: ; 0x0225B0EC - push {r3, r4} - mov r4, #0x25 - lsl r4, r4, #4 - str r1, [r0, r4] - add r1, r4, #4 - str r2, [r0, r1] - add r4, #8 - str r3, [r0, r4] - pop {r3, r4} - bx lr - thumb_func_end ov22_0225B0EC - - thumb_func_start ov22_0225B100 -ov22_0225B100: ; 0x0225B100 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x82 - lsl r0, r0, #2 - add r4, r1, #0 - add r6, r2, #0 - add r0, r5, r0 - add r1, sp, #8 - add r2, sp, #4 - bl ov22_02259270 - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, sp, #0x10 - add r2, sp, #0xc - bl ov22_02257CE0 - mov r0, #0x8f - lsl r0, r0, #2 - ldr r1, [sp, #0x10] - ldr r2, [r5, r0] - sub r1, r4, r1 - add r0, r0, #4 - add r7, r2, r1 - ldr r1, [r5, r0] - ldr r0, [sp, #0xc] - sub r0, r6, r0 - add r0, r1, r0 - str r0, [sp] - ldr r2, [sp] - add r0, r5, #0 - add r1, r7, #0 - bl ov22_0225B080 - ldr r2, [sp] - add r0, r5, #0 - sub r1, r4, r7 - sub r2, r6, r2 - bl ov22_0225B0D8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_0225B100 - - thumb_func_start ov22_0225B158 -ov22_0225B158: ; 0x0225B158 - push {r4, r5, r6, lr} - add r4, r2, #0 - mov r2, #0x95 - add r5, r0, #0 - mov r0, #0x28 - lsl r2, r2, #2 - sub r0, r0, r3 - ldr r2, [r5, r2] - lsl r0, r0, #0xc - add r6, r1, #0 - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - add r0, r5, #0 - mov r5, #2 - add r3, r1, #0 - add r1, r6, #0 - mov r6, #0 - lsl r5, r5, #0xa - add r5, r2, r5 - adc r3, r6 - lsl r2, r3, #0x14 - lsr r3, r5, #0xc - orr r3, r2 - asr r2, r3, #0xc - sub r2, r4, r2 - bl ov22_0225B100 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B158 - - thumb_func_start ov22_0225B198 -ov22_0225B198: ; 0x0225B198 - mov r2, #0x97 - lsl r2, r2, #2 - strh r1, [r0, r2] - sub r2, #0xcc - ldr r3, _0225B1A8 ; =ov22_02257D70 - add r0, r0, r2 - bx r3 - nop -_0225B1A8: .word ov22_02257D70 - thumb_func_end ov22_0225B198 - - thumb_func_start ov22_0225B1AC -ov22_0225B1AC: ; 0x0225B1AC - mov r2, #0x19 - lsl r2, r2, #4 - ldr r3, _0225B1B8 ; =ov22_02257B74 - add r0, r0, r2 - bx r3 - nop -_0225B1B8: .word ov22_02257B74 - thumb_func_end ov22_0225B1AC - - thumb_func_start ov22_0225B1BC -ov22_0225B1BC: ; 0x0225B1BC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x9a - ldr r0, [r5, #0x68] - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x9a - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x8e - ldr r1, [r5, #0x68] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r5, #0x68] - bl sub_02073C74 - mov r1, #0x8d - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #0] - ldr r1, [r4, r1] - bl sub_0202A61C - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B2D4 - ldr r1, [r5, #0x58] - ldr r2, [r5, #0x68] - add r0, r4, #0 - bl ov22_022554A8 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r2, [r5, #0x68] - add r0, r4, r0 - mov r1, #0x15 - bl ov22_02259484 - ldr r1, [r5, #0x68] - mov r0, #0x14 - bl ov22_02254DE0 - mov r1, #0x63 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B388 - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B450 - mov r1, #0x86 - lsl r1, r1, #2 - add r0, r4, r1 - sub r1, #0x88 - ldr r2, [r5, #0x68] - add r1, r4, r1 - bl ov22_0225AF44 - mov r0, #0x26 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B490 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov22_0225B1BC - - thumb_func_start ov22_0225B258 -ov22_0225B258: ; 0x0225B258 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x9a - ldr r0, [r5, #0x68] - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x9a - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x8e - ldr r1, [r5, #0x68] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r5, #0x68] - bl sub_02073C74 - mov r1, #0x8d - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #0] - ldr r1, [r4, r1] - bl sub_0202A61C - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B2D4 - mov r0, #0x61 - lsl r0, r0, #2 - ldr r2, [r5, #0x68] - add r0, r4, r0 - mov r1, #0x15 - bl ov22_02259484 - ldr r1, [r5, #0x68] - mov r0, #0x14 - bl ov22_02254DE0 - mov r1, #0x63 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B388 - mov r0, #0x26 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r1, #1 - add r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov22_0225B490 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov22_0225B258 - - thumb_func_start ov22_0225B2D4 -ov22_0225B2D4: ; 0x0225B2D4 - push {r3, r4, r5, lr} - sub sp, #0x28 - add r4, r1, #0 - ldr r1, [r4, #0x68] - add r5, r0, #0 - mov r0, #0x19 - bl sub_02006C24 - mov r1, #6 - lsl r1, r1, #6 - str r0, [r5, r1] - ldr r0, _0225B324 ; =0x000002CE - add r1, sp, #0 - str r0, [sp] - mov r0, #0x76 - str r0, [sp, #4] - mov r0, #0x13 - str r0, [sp, #8] - ldr r0, [r4, #0x68] - str r0, [sp, #0xc] - ldr r2, [r4, #0x68] - add r0, r5, #0 - bl ov22_0225547C - ldr r3, [r4, #0x68] - add r0, r5, #0 - add r1, sp, #0x10 - add r2, r4, #0 - bl ov22_0225B588 - add r0, r5, #0 - add r1, sp, #0x10 - bl ov22_022551B4 - add r0, sp, #0x10 - bl ov22_02255338 - add sp, #0x28 - pop {r3, r4, r5, pc} - nop -_0225B324: .word 0x000002CE - thumb_func_end ov22_0225B2D4 - - thumb_func_start ov22_0225B328 -ov22_0225B328: ; 0x0225B328 - push {r3, r4, lr} - sub sp, #4 - mov r3, #0x25 - lsl r3, r3, #4 - add r1, r0, r3 - str r1, [sp] - add r1, r3, #0 - sub r1, #0x14 - ldr r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xc - ldr r1, [r0, r1] - add r1, r2, r1 - add r2, r3, #0 - sub r2, #0x10 - ldr r4, [r0, r2] - add r2, r3, #0 - sub r2, #8 - sub r3, r3, #4 - ldr r2, [r0, r2] - ldrh r3, [r0, r3] - add r2, r4, r2 - bl ov22_0225553C - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov22_0225B328 - - thumb_func_start ov22_0225B35C -ov22_0225B35C: ; 0x0225B35C - push {r4, lr} - add r4, r0, #0 - bl ov22_022551D0 - add r0, r4, #0 - bl ov22_022554F8 - mov r0, #0x26 - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0225B37A - add r0, r4, #0 - bl ov22_02255524 -_0225B37A: - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02006CA8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B35C - - thumb_func_start ov22_0225B388 -ov22_0225B388: ; 0x0225B388 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r0, #0 - add r2, sp, #0x28 - mov r0, #0 - add r7, r1, #0 - add r3, r2, #0 - add r1, r0, #0 - stmia r3!, {r0, r1} - stmia r3!, {r0, r1} - stmia r3!, {r0, r1} - stmia r3!, {r0, r1} - str r0, [r3, #0] - ldr r0, [r5, #0] - str r0, [sp, #0x28] - ldr r0, [r5, #4] - str r0, [sp, #0x2c] - ldr r0, [r5, #0x10] - str r0, [sp, #0x30] - ldr r0, [r5, #0x30] - str r0, [sp, #0x34] - ldr r0, [r5, #0x20] - str r0, [sp, #0x38] - ldr r0, [r5, #0x40] - str r0, [sp, #0x3c] - mov r0, #0x63 - lsl r0, r0, #2 - ldr r1, [r5, r0] - str r1, [sp, #0x40] - add r1, r0, #0 - sub r1, #8 - add r1, r5, r1 - str r1, [sp, #0x44] - mov r1, #0x15 - add r0, r0, #4 - str r1, [sp, #0x48] - add r0, r5, r0 - add r1, r2, #0 - bl ov22_022578F4 - ldr r0, [r7, #0] - bl sub_0202A60C - add r6, r0, #0 - ldr r0, [r7, #0] - bl sub_0202A614 - add r4, r0, #0 - ldr r0, [r7, #0] - bl sub_0202A604 - str r4, [sp] - str r0, [sp, #4] - ldr r0, [r7, #0x68] - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [sp, #8] - add r0, r5, r1 - add r1, #0xa4 - ldr r1, [r5, r1] - add r2, sp, #0x18 - add r3, r6, #0 - bl ov22_02257964 - ldr r0, [r7, #0x54] - mov r6, #0 - cmp r0, #0 - ble _0225B44C - add r4, r7, #0 -_0225B412: - ldr r0, [r4, #4] - bl sub_0202A624 - str r0, [sp, #0xc] - ldr r0, [r4, #4] - bl sub_0202A628 - str r0, [sp, #0x10] - ldr r0, [r4, #4] - bl sub_0202A62C - str r0, [sp, #0x14] - ldr r0, [r4, #4] - bl sub_0202A630 - str r0, [sp] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, r5, r0 - bl ov22_022579FC - ldr r0, [r7, #0x54] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _0225B412 -_0225B44C: - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov22_0225B388 - - thumb_func_start ov22_0225B450 -ov22_0225B450: ; 0x0225B450 - add r2, r1, #0 - mov r1, #0x19 - lsl r1, r1, #4 - add r0, r0, r1 - ldr r1, [r2, #0x5c] - ldr r3, _0225B460 ; =ov22_02257C88 - ldr r2, [r2, #0x68] - bx r3 - ; .align 2, 0 -_0225B460: .word ov22_02257C88 - thumb_func_end ov22_0225B450 - - thumb_func_start ov22_0225B464 -ov22_0225B464: ; 0x0225B464 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov22_02257A98 - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov22_02257948 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B464 - - thumb_func_start ov22_0225B480 -ov22_0225B480: ; 0x0225B480 - mov r1, #0x19 - lsl r1, r1, #4 - ldr r3, _0225B48C ; =ov22_02257CD4 - add r0, r0, r1 - bx r3 - nop -_0225B48C: .word ov22_02257CD4 - thumb_func_end ov22_0225B480 - - thumb_func_start ov22_0225B490 -ov22_0225B490: ; 0x0225B490 - push {r3, r4, r5, lr} - add r3, r1, #0 - mov r1, #0x8f - add r4, r0, #0 - mov r2, #0x48 - lsl r1, r1, #2 - str r2, [r4, r1] - mov r5, #0x38 - add r2, r1, #4 - str r5, [r4, r2] - add r2, r1, #0 - add r2, #8 - str r5, [r4, r2] - add r2, r1, #0 - mov r5, #0x40 - add r2, #0xc - str r5, [r4, r2] - lsl r2, r5, #6 - add r5, r1, #0 - add r5, #0x14 - str r2, [r4, r5] - add r5, r1, #0 - add r5, #0x18 - str r2, [r4, r5] - add r5, r1, #0 - add r5, #0x1c - str r2, [r4, r5] - mov r2, #0 - add r1, #0x10 - strh r2, [r4, r1] - ldr r1, [r3, #0x60] - ldr r2, [r3, #0x64] - bl ov22_0225B080 - mov r0, #0x97 - ldr r1, _0225B4E0 ; =0x00007FFF - lsl r0, r0, #2 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} - nop -_0225B4E0: .word 0x00007FFF - thumb_func_end ov22_0225B490 - - thumb_func_start ov22_0225B4E4 -ov22_0225B4E4: ; 0x0225B4E4 - ldr r2, [r1, #0] - str r2, [r0, #0x58] - ldr r2, [r1, #4] - str r2, [r0, #0x60] - ldr r2, [r1, #8] - str r2, [r0, #0x64] - ldr r1, [r1, #0xc] - str r1, [r0, #0x68] - bx lr - ; .align 2, 0 - thumb_func_end ov22_0225B4E4 - - thumb_func_start ov22_0225B4F8 -ov22_0225B4F8: ; 0x0225B4F8 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r5, r0, #0 - add r0, r7, #0 - bl sub_0202A138 - add r6, r5, #0 - str r0, [r5, #0] - mov r4, #0 - str r4, [r5, #0x54] - add r6, #0x54 -_0225B50E: - add r0, r7, #0 - add r1, r4, #0 - bl sub_0202A110 - cmp r0, #0 - beq _0225B530 - add r0, r7, #0 - add r1, r4, #0 - bl sub_0202A150 - ldr r1, [r5, #0x54] - lsl r1, r1, #2 - add r1, r5, r1 - str r0, [r1, #4] - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] -_0225B530: - add r4, r4, #1 - cmp r4, #0xa - blt _0225B50E - add r0, r7, #0 - bl sub_0202A1DC - str r0, [r5, #0x5c] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_0225B4F8 - - thumb_func_start ov22_0225B540 -ov22_0225B540: ; 0x0225B540 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r5, r0, #0 - add r0, r7, #0 - bl sub_0202A4D8 - add r6, r5, #0 - str r0, [r5, #0] - mov r4, #0 - str r4, [r5, #0x54] - add r6, #0x54 -_0225B556: - add r0, r7, #0 - add r1, r4, #0 - bl sub_0202A488 - cmp r0, #0 - beq _0225B578 - add r0, r7, #0 - add r1, r4, #0 - bl sub_0202A4F0 - ldr r1, [r5, #0x54] - lsl r1, r1, #2 - add r1, r5, r1 - str r0, [r1, #4] - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] -_0225B578: - add r4, r4, #1 - cmp r4, #0x14 - blt _0225B556 - add r0, r7, #0 - bl sub_0202A5B8 - str r0, [r5, #0x5c] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_0225B540 - - thumb_func_start ov22_0225B588 -ov22_0225B588: ; 0x0225B588 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r7, r3, #0 - add r5, r0, #0 - add r6, r2, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov22_02255410 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov22_0225B5A8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov22_0225B588 - - thumb_func_start ov22_0225B5A8 -ov22_0225B5A8: ; 0x0225B5A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #0x10] - add r0, r2, #0 - ldr r0, [r0, #0x54] - add r4, r1, #0 - str r2, [sp, #8] - str r3, [sp, #0xc] - cmp r0, #0 - ble _0225B620 - add r6, r2, #0 -_0225B5C2: - ldr r0, [r6, #4] - bl sub_0202A624 - add r5, r0, #0 - ldr r0, [r4, #0x10] - add r1, r5, #0 - bl sub_020229F8 - cmp r0, #1 - bne _0225B60E - mov r0, #1 - str r0, [sp] - mov r0, #6 - ldr r1, [sp, #4] - lsl r0, r0, #6 - ldr r0, [r1, r0] - ldr r3, [sp, #0xc] - add r1, r5, #1 - mov r2, #0 - bl sub_0200723C - add r7, r0, #0 - ldr r0, [r4, #0x10] - add r1, r7, #0 - add r2, r5, #0 - bl sub_02022A1C - ldr r1, [r4, #0] - lsl r5, r5, #3 - add r1, r1, r5 - add r0, r7, #0 - add r1, r1, #4 - bl sub_020A7118 - ldr r0, [sp, #4] - ldr r1, [r0, #0] - ldr r0, [r4, #0] - str r1, [r0, r5] -_0225B60E: - ldr r0, [sp, #0x10] - add r6, r6, #4 - add r0, r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - ldr r1, [r0, #0x54] - ldr r0, [sp, #0x10] - cmp r0, r1 - blt _0225B5C2 -_0225B620: - mov r0, #1 - str r0, [sp] - mov r1, #6 - ldr r0, [sp, #4] - lsl r1, r1, #6 - ldr r0, [r0, r1] - mov r1, #0 - ldr r3, [sp, #0xc] - add r2, r1, #0 - bl sub_0200723C - add r5, r0, #0 - ldr r0, [r4, #0x14] - add r1, r5, #0 - mov r2, #0 - bl sub_02022A1C - ldr r1, [r4, #8] - add r0, r5, #0 - add r1, r1, #4 - bl sub_020A71B0 - ldr r0, [sp, #4] - ldr r1, [r0, #0] - ldr r0, [r4, #8] - str r1, [r0, #0] - ldr r0, [r4, #8] - mov r1, #3 - str r1, [r0, #8] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B5A8 - - thumb_func_start ov22_0225B660 -ov22_0225B660: ; 0x0225B660 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r2, #2 - add r5, r0, #0 - mov r0, #3 - mov r1, #0xd - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r2, #1 - mov r0, #3 - mov r1, #0xe - lsl r2, r2, #0x12 - bl sub_02017FC8 - mov r1, #0x1a - add r0, r5, #0 - lsl r1, r1, #4 - mov r2, #0xd - bl sub_0200681C - mov r2, #0x1a - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _0225B730 ; =ov22_0225B848 - add r1, r4, #0 - bl sub_02017798 - bl sub_020177A4 - add r0, r5, #0 - bl sub_02006840 - add r5, r0, #0 - ldr r0, [r5, #8] - cmp r0, #0 - ldr r0, [r5, #0] - bne _0225B6BC - ldr r1, [r5, #4] - bl sub_02029CA8 - str r0, [r4, #0] - b _0225B6C4 -_0225B6BC: - ldr r1, [r5, #4] - bl sub_02029CD0 - str r0, [r4, #4] -_0225B6C4: - ldr r0, [r5, #4] - str r0, [r4, #8] - ldr r0, [r5, #8] - str r0, [r4, #0xc] - bl ov22_02255094 - ldr r0, _0225B734 ; =0x021BF6DC - mov r1, #0 - strb r1, [r0, #5] - bl sub_0201FFE8 - add r0, r4, #0 - add r0, #0x14 - mov r1, #0xe - bl ov22_022555D4 - ldr r0, [r4, #0x54] - str r0, [sp] - mov r0, #0x48 - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [r4, #0xc] - cmp r0, #0 - add r0, sp, #0 - bne _0225B704 - ldr r1, [r4, #0] - bl ov22_0225AF8C - b _0225B70A -_0225B704: - ldr r1, [r4, #4] - bl ov22_0225AFB0 -_0225B70A: - str r0, [r4, #0x10] - add r0, r4, #0 - bl ov22_0225B85C - add r0, r4, #0 - bl ov22_0225B910 - add r0, r4, #0 - bl ov22_0225B964 - add r0, r4, #0 - bl ov22_0225BA40 - add r0, r4, #0 - bl ov22_0225BAD0 - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225B730: .word ov22_0225B848 -_0225B734: .word 0x021BF6DC - thumb_func_end ov22_0225B660 - - thumb_func_start ov22_0225B738 -ov22_0225B738: ; 0x0225B738 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - bl sub_0200682C - add r5, r0, #0 - bl sub_020241B4 - bl sub_020A73C0 - ldr r0, [r5, #0x10] - bl ov22_0225AFF8 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - add r5, #0x14 - add r0, r5, #0 - bl ov22_0225562C - ldr r0, [r4, #0] - cmp r0, #5 - bhi _0225B7F2 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0225B774: ; jump table - .short _0225B780 - _0225B774 - 2 ; case 0 - .short _0225B786 - _0225B774 - 2 ; case 1 - .short _0225B7A4 - _0225B774 - 2 ; case 2 - .short _0225B7B4 - _0225B774 - 2 ; case 3 - .short _0225B7C4 - _0225B774 - 2 ; case 4 - .short _0225B7E4 - _0225B774 - 2 ; case 5 -_0225B780: - add r0, r0, #1 - str r0, [r4, #0] - b _0225B7F2 -_0225B786: - mov r0, #6 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - mov r0, #0 - mov r1, #5 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0225B7F2 -_0225B7A4: - bl sub_0200F2AC - cmp r0, #0 - beq _0225B7F2 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0225B7F2 -_0225B7B4: - ldr r1, _0225B7F8 ; =0x021BF67C - ldr r2, [r1, #0x48] - mov r1, #3 - tst r1, r2 - beq _0225B7F2 - add r0, r0, #1 - str r0, [r4, #0] - b _0225B7F2 -_0225B7C4: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - mov r0, #0 - mov r1, #2 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0225B7F2 -_0225B7E4: - bl sub_0200F2AC - cmp r0, #0 - beq _0225B7F2 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0225B7F2: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0225B7F8: .word 0x021BF67C - thumb_func_end ov22_0225B738 - - thumb_func_start ov22_0225B7FC -ov22_0225B7FC: ; 0x0225B7FC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl ov22_0225B020 - add r0, r4, #0 - bl ov22_0225BA00 - add r0, r4, #0 - bl ov22_0225BAA8 - add r4, #0x14 - add r0, r4, #0 - bl ov22_022555FC - bl ov22_022550B4 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0xd - bl sub_0201807C - mov r0, #0xe - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B7FC - - thumb_func_start ov22_0225B848 -ov22_0225B848: ; 0x0225B848 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl ov22_0225B06C - add r4, #0x14 - add r0, r4, #0 - bl ov22_0225561C - pop {r4, pc} - thumb_func_end ov22_0225B848 - - thumb_func_start ov22_0225B85C -ov22_0225B85C: ; 0x0225B85C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x40 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x7e - mov r2, #0 - mov r3, #0x60 - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [r5, #0x54] - mov r1, #0x7d - mov r3, #1 - bl sub_020070E8 - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _0225B8A2 - mov r1, #0x80 - mov r4, #4 - b _0225B8A6 -_0225B8A2: - mov r1, #0x7f - mov r4, #3 -_0225B8A6: - mov r0, #0xe - str r0, [sp] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0 - add r3, sp, #0x10 - bl sub_020071D0 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - mov r1, #1 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0x54] - bl sub_020198C0 - ldr r1, [sp, #0x10] - mov r2, #0 - ldrh r0, [r1] - add r3, r2, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r1, #2] - mov r1, #1 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0x54] - bl sub_02019E2C - add r0, r6, #0 - bl sub_020181C4 - ldr r0, [r5, #0x54] - mov r1, #1 - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov22_0225B85C - - thumb_func_start ov22_0225B910 -ov22_0225B910: ; 0x0225B910 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0x20 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #0xc - add r1, r0, #0 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r2, [r4, #0x54] - mov r0, #0xc - mov r1, #0xb - mov r3, #4 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r2, [r4, #0x54] - mov r0, #0xc - mov r1, #0xa - mov r3, #4 - bl sub_02006E3C - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225B910 - - thumb_func_start ov22_0225B964 -ov22_0225B964: ; 0x0225B964 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0xfa - lsl r0, r0, #2 - mov r1, #0x65 - str r0, [sp, #4] - lsl r1, r1, #2 - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0x14 - mov r2, #0xe9 - mov r3, #0 - bl ov22_02255248 - mov r0, #1 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0xfa - lsl r0, r0, #2 - mov r1, #0x65 - str r0, [sp, #8] - lsl r1, r1, #2 - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0x14 - mov r2, #0xea - mov r3, #0 - bl ov22_02255268 - mov r0, #0xfa - lsl r0, r0, #2 - mov r1, #0x65 - str r0, [sp] - lsl r1, r1, #2 - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0x14 - mov r2, #0xe8 - mov r3, #0 - bl ov22_0225528C - mov r0, #0xfa - lsl r0, r0, #2 - mov r1, #0x65 - str r0, [sp] - lsl r1, r1, #2 - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0x14 - mov r2, #0xe7 - mov r3, #0 - bl ov22_022552A8 - mov r0, #0x64 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0xfa - add r0, #0x14 - lsl r1, r1, #2 - mov r2, #0 - mov r3, #0x90 - bl ov22_022551E4 - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02021E80 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov22_0225B964 - - thumb_func_start ov22_0225BA00 -ov22_0225BA00: ; 0x0225BA00 - push {r4, lr} - mov r1, #0xfa - add r4, r0, #0 - add r0, #0x14 - lsl r1, r1, #2 - bl ov22_022552C4 - add r0, r4, #0 - mov r1, #0xfa - add r0, #0x14 - lsl r1, r1, #2 - bl ov22_022552D8 - add r0, r4, #0 - mov r1, #0xfa - add r0, #0x14 - lsl r1, r1, #2 - bl ov22_022552EC - add r0, r4, #0 - mov r1, #0xfa - add r0, #0x14 - lsl r1, r1, #2 - bl ov22_02255300 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021BD4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225BA00 - - thumb_func_start ov22_0225BA40 -ov22_0225BA40: ; 0x0225BA40 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0xe - mov r1, #1 - bl sub_0201A778 - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x12 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0x54] - ldr r1, [r4, r1] - mov r2, #3 - mov r3, #0 - bl sub_0201A7E8 - mov r0, #0 - mov r1, #0xa0 - mov r2, #0xe - bl sub_02002E7C - mov r0, #3 - mov r1, #0 - bl sub_02019060 - mov r0, #0 - mov r1, #2 - bl sub_02019060 - mov r0, #1 - add r1, r0, #0 - bl sub_02019060 - mov r1, #3 - ldr r0, [r4, #0x54] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225BA40 - - thumb_func_start ov22_0225BAA8 -ov22_0225BAA8: ; 0x0225BAA8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201ACF4 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201A8FC - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0201A928 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov22_0225BAA8 - - thumb_func_start ov22_0225BAD0 -ov22_0225BAD0: ; 0x0225BAD0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _0225BAEE - add r0, r4, #0 - bl ov22_0225BB00 - b _0225BAF4 -_0225BAEE: - add r0, r4, #0 - bl ov22_0225BC18 -_0225BAF4: - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201A954 - pop {r4, pc} - thumb_func_end ov22_0225BAD0 - - thumb_func_start ov22_0225BB00 -ov22_0225BB00: ; 0x0225BB00 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - ldr r2, _0225BC10 ; =0x00000181 - add r5, r0, #0 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xd - bl sub_0200B144 - str r0, [sp, #0x10] - cmp r0, #0 - bne _0225BB1C - bl sub_02022974 -_0225BB1C: - mov r0, #0xd - bl sub_0200B358 - add r6, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #5 - bl sub_02021D6C - mov r0, #3 - lsl r0, r0, #0x10 - str r0, [sp, #0x14] - mov r0, #9 - lsl r0, r0, #0x10 - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp, #0x1c] - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, sp, #0x14 - bl sub_02021C50 - mov r0, #0xc - mov r1, #0xd - bl sub_02023790 - add r7, r0, #0 - ldr r0, [r5, #0] - add r1, r7, #0 - bl sub_0202A1A0 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - add r4, r0, #0 - mov r0, #7 - str r0, [sp] - mov r1, #0 - lsr r3, r4, #0x1f - add r3, r4, r3 - asr r4, r3, #1 - mov r3, #0x80 - ldr r0, _0225BC14 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0x67 - str r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r7, #0 - sub r3, r3, r4 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, [r5, #0] - bl sub_0202A1F4 - add r2, r0, #0 - add r0, r6, #0 - mov r1, #0 - bl sub_0200BE48 - mov r0, #0xc8 - mov r1, #0xd - bl sub_02023790 - add r4, r0, #0 - ldr r0, [sp, #0x10] - mov r1, #0x2d - bl sub_0200B1EC - add r7, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #0x1b - str r0, [sp] - mov r1, #0 - ldr r0, _0225BC14 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0x67 - str r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - lsr r5, r3, #0x1f - add r5, r3, r5 - asr r5, r5, #1 - mov r3, #0x80 - add r2, r4, #0 - sub r3, r3, r5 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x10] - bl sub_0200B190 - add r0, r6, #0 - bl sub_0200B3F0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225BC10: .word 0x00000181 -_0225BC14: .word 0x00010200 - thumb_func_end ov22_0225BB00 - - thumb_func_start ov22_0225BC18 -ov22_0225BC18: ; 0x0225BC18 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r5, #8] - bl sub_02021D6C - ldr r0, [r5, #4] - bl sub_0202A5D0 - add r6, r0, #0 - mov r0, #0xd - bl sub_0200B358 - add r7, r0, #0 - mov r0, #0xc8 - mov r1, #0xd - bl sub_02023790 - add r4, r0, #0 - ldr r0, [r5, #8] - bl sub_020958B8 - add r2, r0, #0 - add r0, r7, #0 - mov r1, #0 - bl sub_0200BBDC - add r0, r6, #0 - bl sub_02095888 - add r2, r0, #0 - add r0, r7, #0 - mov r1, #1 - bl sub_0200BBA8 - ldr r0, [r5, #4] - bl sub_0202A544 - add r6, r0, #0 - ldr r0, [r5, #4] - add r1, r4, #0 - bl sub_0202A524 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, r7, #0 - mov r1, #3 - add r2, r4, #0 - add r3, r6, #0 - bl sub_0200B48C - mov r0, #0xd - bl sub_02073C74 - add r6, r0, #0 - ldr r0, [r5, #4] - add r1, r6, #0 - bl sub_0202A560 - add r0, r6, #0 - bl sub_02076B10 - add r2, r0, #0 - add r0, r7, #0 - mov r1, #4 - bl sub_0200B5CC - add r0, r6, #0 - bl sub_020181C4 - ldr r2, _0225BD70 ; =0x00000181 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xd - bl sub_0200B144 - str r0, [sp, #0x10] - cmp r0, #0 - bne _0225BCC4 - bl sub_02022974 -_0225BCC4: - ldr r0, [sp, #0x10] - mov r1, #0x2b - bl sub_0200B1EC - add r6, r0, #0 - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #7 - str r0, [sp] - mov r1, #0 - lsr r6, r3, #0x1f - add r6, r3, r6 - ldr r0, _0225BD74 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0x67 - str r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - asr r6, r6, #1 - mov r3, #0x80 - add r2, r4, #0 - sub r3, r3, r6 - bl sub_0201D78C - ldr r0, [sp, #0x10] - mov r1, #0x2c - bl sub_0200B1EC - add r6, r0, #0 - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - add r3, r0, #0 - mov r0, #0x1b - str r0, [sp] - mov r1, #0 - ldr r0, _0225BD74 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0x67 - str r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - lsr r5, r3, #0x1f - add r5, r3, r5 - asr r5, r5, #1 - mov r3, #0x80 - add r2, r4, #0 - sub r3, r3, r5 - bl sub_0201D78C - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x10] - bl sub_0200B190 - add r0, r7, #0 - bl sub_0200B3F0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0225BD70: .word 0x00000181 -_0225BD74: .word 0x00010200 - thumb_func_end ov22_0225BC18 - ; 0x0225BD78 - - - .rodata - .incbin "incbin/overlay22_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay23.s b/asm/overlay23.s deleted file mode 100644 index c5b2fbea4..000000000 --- a/asm/overlay23.s +++ /dev/null @@ -1,49397 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov23_0223E140 -ov23_0223E140: ; 0x0223E140 - push {r3, r4, r5, r6, r7, lr} - ldr r2, _0223E1D0 ; =0x000008CC - ldr r4, _0223E1D4 ; =0x02257740 - add r3, r2, #0 - mov r1, #0 - mov r0, #0xff - add r3, #8 -_0223E14E: - ldr r5, [r4, #0] - add r5, r5, r1 - strb r0, [r5, r2] - ldr r5, [r4, #0] - add r5, r5, r1 - add r1, r1, #1 - strb r0, [r5, r3] - cmp r1, #8 - blt _0223E14E - ldr r0, _0223E1D4 ; =0x02257740 - ldr r1, _0223E1D8 ; =0x000009E4 - ldr r2, [r0, #0] - mov r3, #1 - strb r3, [r2, r1] - ldr r4, [r0, #0] - mov r2, #0 - add r3, r1, #1 - strb r2, [r4, r3] - ldr r3, [r0, #0] - mov r4, #0xc4 - add r1, r1, #3 - strb r4, [r3, r1] - mov r3, #0x81 - lsl r3, r3, #4 - add r4, r3, #0 - add r1, r2, #0 - add r5, r2, #0 - add r4, #8 -_0223E186: - ldr r6, [r0, #0] - add r2, r2, #1 - add r6, r6, r1 - str r5, [r6, r3] - ldr r6, [r0, #0] - add r6, r6, r1 - add r1, #0xc - strb r5, [r6, r4] - cmp r2, #8 - blt _0223E186 - ldr r6, _0223E1D4 ; =0x02257740 - mov r7, #0 -_0223E19E: - add r0, r5, #0 - mov r1, #0xd - bl sub_020E1F6C - add r4, r0, #0 - mov r1, #0xd - add r0, r5, #0 - mul r4, r1 - bl sub_020E1F6C - ldr r0, [r6, #0] - add r5, r5, #1 - add r0, r0, r4 - add r2, r1, r0 - ldr r0, _0223E1DC ; =0x000008DC - strb r7, [r2, r0] - ldr r0, [r6, #0] - add r0, r0, r4 - add r2, r1, r0 - mov r1, #2 - ldr r0, _0223E1E0 ; =0x0000095E - cmp r5, #0x82 - strb r1, [r2, r0] - blt _0223E19E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E1D0: .word 0x000008CC -_0223E1D4: .word 0x02257740 -_0223E1D8: .word 0x000009E4 -_0223E1DC: .word 0x000008DC -_0223E1E0: .word 0x0000095E - thumb_func_end ov23_0223E140 - - thumb_func_start ov23_0223E1E4 -ov23_0223E1E4: ; 0x0223E1E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r1, _0223E2D4 ; =0x02257740 - ldr r2, [r1, #0] - cmp r2, #0 - bne _0223E2D0 - mov r2, #0x9f - str r0, [r1, #0] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020C4CF4 - ldr r0, _0223E2D4 ; =0x02257740 - ldr r0, [r0, #0] - add r0, #8 - bl sub_020361BC - ldr r5, _0223E2D4 ; =0x02257740 - mov r2, #0 - ldr r0, [r5, #0] - ldr r7, _0223E2D8 ; =0x0000020A - str r4, [r0, #0] - ldr r0, _0223E2DC ; =0x0000FFFF - add r3, r2, #0 - mov r1, #0xff -_0223E218: - ldr r4, [r5, #0] - add r2, r2, #1 - add r6, r4, r3 - mov r4, #0x83 - lsl r4, r4, #2 - strb r1, [r6, r4] - ldr r4, [r5, #0] - add r6, r4, r3 - mov r4, #0x82 - lsl r4, r4, #2 - strh r0, [r6, r4] - ldr r4, [r5, #0] - add r4, r4, r3 - add r3, r3, #6 - strh r0, [r4, r7] - cmp r2, #0xfa - blt _0223E218 - bl ov23_0223E140 - ldr r1, _0223E2D4 ; =0x02257740 - mov r3, #0 - mov r0, #0x9e - ldr r2, [r1, #0] - mvn r3, r3 - lsl r0, r0, #4 - str r3, [r2, r0] - ldr r0, [r1, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r4, r0, #0 - bl sub_02029234 - cmp r0, #0 - beq _0223E2C8 - add r0, r4, #0 - bl sub_02028930 - str r0, [sp, #4] - ldr r0, _0223E2E0 ; =0x5D588B65 - mov r5, #0 - str r0, [sp, #8] - ldr r0, _0223E2E4 ; =0x00269EC3 - str r0, [sp, #0xc] -_0223E272: - add r0, r4, #0 - add r1, r5, #0 - bl sub_020291A4 - add r5, r5, #1 - cmp r5, #0xff - blt _0223E272 - mov r5, #0 - add r6, r5, #0 -_0223E284: - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - add r3, r6, #0 - str r6, [sp] - bl sub_02028EF8 - add r5, r5, #1 - cmp r5, #0x40 - blt _0223E284 - add r0, sp, #4 - bl ov23_02241DF8 - mov r1, #0xa - bl sub_020E1F6C - mov r1, #0x18 - sub r6, r1, r0 - mov r5, #0 - cmp r6, #0 - ble _0223E2BE - add r7, sp, #4 -_0223E2B0: - add r0, r7, #0 - add r1, r5, #0 - bl ov23_0223E434 - add r5, r5, #1 - cmp r5, r6 - blt _0223E2B0 -_0223E2BE: - add r0, r4, #0 - bl sub_02029240 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_0223E2C8: - bl ov23_0223E834 - bl ov23_02243CE8 -_0223E2D0: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E2D4: .word 0x02257740 -_0223E2D8: .word 0x0000020A -_0223E2DC: .word 0x0000FFFF -_0223E2E0: .word 0x5D588B65 -_0223E2E4: .word 0x00269EC3 - thumb_func_end ov23_0223E1E4 - - thumb_func_start ov23_0223E2E8 -ov23_0223E2E8: ; 0x0223E2E8 - mov r0, #0x9f - lsl r0, r0, #4 - bx lr - ; .align 2, 0 - thumb_func_end ov23_0223E2E8 - - thumb_func_start ov23_0223E2F0 -ov23_0223E2F0: ; 0x0223E2F0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_0223E2F0 - - thumb_func_start ov23_0223E2F4 -ov23_0223E2F4: ; 0x0223E2F4 - bx lr - ; .align 2, 0 - thumb_func_end ov23_0223E2F4 - - thumb_func_start ov23_0223E2F8 -ov23_0223E2F8: ; 0x0223E2F8 - push {r3, lr} - ldr r0, _0223E348 ; =0x02257740 - ldr r1, [r0, #0] - cmp r1, #0 - beq _0223E344 - ldr r0, _0223E34C ; =0x0000087C - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223E336 - bl sub_0200DA58 - ldr r0, _0223E348 ; =0x02257740 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _0223E34C ; =0x0000087C - str r2, [r1, r0] - bl ov23_0224219C - bl ov23_02254044 - ldr r0, _0223E348 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _0223E350 ; =0x000007E4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223E332 - mov r1, #4 - bl sub_02002154 -_0223E332: - bl sub_02059514 -_0223E336: - ldr r0, _0223E348 ; =0x02257740 - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, _0223E348 ; =0x02257740 - mov r1, #0 - str r1, [r0, #0] -_0223E344: - pop {r3, pc} - nop -_0223E348: .word 0x02257740 -_0223E34C: .word 0x0000087C -_0223E350: .word 0x000007E4 - thumb_func_end ov23_0223E2F8 - - thumb_func_start ov23_0223E354 -ov23_0223E354: ; 0x0223E354 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrh r0, [r1] - ldrh r1, [r1, #2] - bl ov23_0223E88C - add r4, r0, #0 - add r0, sp, #0 - strb r5, [r0] - beq _0223E39E - ldrb r0, [r4, #4] - cmp r0, #0xff - bne _0223E39E - add r0, r5, #0 - bl ov23_0224A6B8 - cmp r0, #0 - beq _0223E37C - mov r0, #1 - pop {r3, r4, r5, pc} -_0223E37C: - mov r0, #0x40 - add r1, sp, #0 - mov r2, #1 - bl sub_02035AC4 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - ldr r0, _0223E3A4 ; =0x02257740 - ldr r1, [r0, #0] - lsl r0, r5, #2 - add r1, r1, r0 - ldr r0, _0223E3A8 ; =0x000007E8 - str r4, [r1, r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_0223E39E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223E3A4: .word 0x02257740 -_0223E3A8: .word 0x000007E8 - thumb_func_end ov23_0223E354 - - thumb_func_start ov23_0223E3AC -ov23_0223E3AC: ; 0x0223E3AC - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _0223E3C4 - mov r0, #0 - pop {r4, r5, r6, pc} -_0223E3C4: - ldr r0, _0223E430 ; =0x000001DE - cmp r4, r0 - ble _0223E3CE - mov r0, #0 - pop {r4, r5, r6, pc} -_0223E3CE: - cmp r5, r0 - ble _0223E3D6 - mov r0, #0 - pop {r4, r5, r6, pc} -_0223E3D6: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl sub_02054F68 - cmp r0, #0 - beq _0223E42C - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #1 - bl sub_02054F68 - cmp r0, #0 - bne _0223E3F6 - mov r0, #1 - pop {r4, r5, r6, pc} -_0223E3F6: - add r0, r6, #0 - add r1, r5, #0 - sub r2, r4, #1 - bl sub_02054F68 - cmp r0, #0 - bne _0223E408 - mov r0, #1 - pop {r4, r5, r6, pc} -_0223E408: - add r0, r6, #0 - add r1, r5, #1 - add r2, r4, #0 - bl sub_02054F68 - cmp r0, #0 - bne _0223E41A - mov r0, #1 - pop {r4, r5, r6, pc} -_0223E41A: - add r0, r6, #0 - sub r1, r5, #1 - add r2, r4, #0 - bl sub_02054F68 - cmp r0, #0 - bne _0223E42C - mov r0, #1 - pop {r4, r5, r6, pc} -_0223E42C: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223E430: .word 0x000001DE - thumb_func_end ov23_0223E3AC - - thumb_func_start ov23_0223E434 -ov23_0223E434: ; 0x0223E434 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - ldr r0, _0223E648 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - str r0, [sp, #0x10] - ldr r0, _0223E648 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0x2c] - bl sub_02039E10 - sub r0, r0, #2 - lsl r0, r0, #0x15 - lsr r6, r0, #0x10 - ldr r0, _0223E648 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0x2c] - bl sub_02039E20 - sub r0, r0, #2 - lsl r0, r0, #0x15 - lsr r4, r0, #0x10 -_0223E46C: - ldr r1, [r5, #4] - ldr r0, [r5, #0] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - cmp r6, #0 - ldr r0, [r5, #0] - bne _0223E482 - lsr r1, r0, #0x10 - b _0223E48A -_0223E482: - lsr r1, r0, #0x10 - add r2, r1, #0 - mul r2, r6 - lsr r1, r2, #0x10 -_0223E48A: - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - add r1, #0x20 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - str r1, [sp, #0xc] - ldr r1, [r5, #4] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - cmp r4, #0 - ldr r0, [r5, #0] - bne _0223E4AA - lsr r0, r0, #0x10 - b _0223E4B2 -_0223E4AA: - lsr r0, r0, #0x10 - add r1, r0, #0 - mul r1, r4 - lsr r0, r1, #0x10 -_0223E4B2: - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r0, #0x40 - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - ldr r0, _0223E648 ; =0x02257740 - ldr r1, [sp, #0xc] - ldr r0, [r0, #0] - add r2, r7, #0 - ldr r0, [r0, #0] - bl ov23_0223E3AC - cmp r0, #0 - beq _0223E46C - ldr r1, [r5, #4] - ldr r0, [r5, #0] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - lsr r1, r0, #0x10 - mov r0, #6 - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r0, r0, #6 - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x20] - cmp r0, #0 - ble _0223E58E -_0223E4F4: - mov r0, #0 - str r0, [sp, #0x14] - str r0, [sp, #0x18] -_0223E4FA: - ldr r1, [r5, #4] - ldr r0, [r5, #0] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - lsr r2, r0, #0x10 - mov r1, #0x14 - mul r1, r2 - lsr r1, r1, #0x10 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 - ldr r1, [sp, #0xc] - str r0, [r5, #0] - add r1, r1, r2 - sub r1, #0xa - lsl r1, r1, #0x10 - lsr r4, r1, #0x10 - ldr r1, [r5, #4] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - lsr r1, r0, #0x10 - mov r0, #0x14 - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r0, r7, r0 - sub r0, #0xa - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldr r0, _0223E648 ; =0x02257740 - add r1, r4, #0 - ldr r0, [r0, #0] - add r2, r6, #0 - ldr r0, [r0, #0] - bl ov23_0223E3AC - cmp r0, #0 - beq _0223E552 - mov r0, #1 - str r0, [sp, #0x14] - b _0223E55C -_0223E552: - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #0x64 - blt _0223E4FA -_0223E55C: - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _0223E582 - bl ov23_0223E6F8 - cmp r0, #0 - beq _0223E58E - add r0, r4, #0 - add r1, r6, #0 - bl ov23_0223E740 - str r0, [sp, #0x24] - ldr r0, [sp, #0x10] - add r1, r4, #0 - add r2, r6, #0 - bl sub_02029140 - ldr r1, [sp, #0x24] - strb r0, [r1, #5] -_0223E582: - ldr r0, [sp, #0x1c] - add r1, r0, #1 - ldr r0, [sp, #0x20] - str r1, [sp, #0x1c] - cmp r1, r0 - blt _0223E4F4 -_0223E58E: - ldr r1, [r5, #4] - ldr r0, [r5, #0] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - lsr r1, r0, #0x10 - mov r0, #6 - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [sp, #8] - cmp r0, #0 - ble _0223E642 -_0223E5B2: - mov r0, #0 - str r0, [sp] -_0223E5B6: - ldr r1, [r5, #4] - ldr r0, [r5, #0] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - lsr r2, r0, #0x10 - mov r1, #0x14 - mul r1, r2 - lsr r1, r1, #0x10 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 - ldr r1, [sp, #0xc] - str r0, [r5, #0] - add r1, r1, r2 - sub r1, #0xa - lsl r1, r1, #0x10 - lsr r6, r1, #0x10 - ldr r1, [r5, #4] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - lsr r1, r0, #0x10 - mov r0, #0x14 - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r0, r7, r0 - sub r0, #0xa - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, _0223E648 ; =0x02257740 - add r1, r6, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - ldr r0, [r0, #0] - bl sub_02054F68 - cmp r0, #0 - bne _0223E62C - ldr r3, _0223E648 ; =0x02257740 - add r1, r4, #0 - ldr r4, [r3, #0] - ldr r3, _0223E64C ; =0x000009EC - add r0, r6, #0 - ldrb r3, [r4, r3] - add r2, r5, #0 - bl ov23_02243C3C - cmp r0, #0 - beq _0223E62C - ldr r0, _0223E648 ; =0x02257740 - ldr r2, [r0, #0] - ldr r0, _0223E64C ; =0x000009EC - ldrb r1, [r2, r0] - add r1, r1, #1 - strb r1, [r2, r0] - b _0223E636 -_0223E62C: - ldr r0, [sp] - add r0, r0, #1 - str r0, [sp] - cmp r0, #0x64 - blt _0223E5B6 -_0223E636: - ldr r0, [sp, #4] - add r1, r0, #1 - ldr r0, [sp, #8] - str r1, [sp, #4] - cmp r1, r0 - blt _0223E5B2 -_0223E642: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223E648: .word 0x02257740 -_0223E64C: .word 0x000009EC - thumb_func_end ov23_0223E434 - - thumb_func_start ov23_0223E650 -ov23_0223E650: ; 0x0223E650 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - ldr r0, _0223E6F4 ; =0x02257740 - str r1, [sp, #4] - ldr r0, [r0, #0] - add r5, r2, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - mov r4, #0 - str r0, [sp, #8] - str r4, [sp, #0xc] -_0223E66C: - ldr r1, [r5, #4] - ldr r0, [r5, #0] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - lsr r2, r0, #0x10 - mov r1, #0x14 - mul r1, r2 - lsr r1, r1, #0x10 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 - ldr r1, [sp] - str r0, [r5, #0] - add r1, r1, r2 - sub r1, #0xa - lsl r1, r1, #0x10 - lsr r6, r1, #0x10 - ldr r1, [r5, #4] - ldr r2, [r5, #8] - mul r0, r1 - add r0, r2, r0 - str r0, [r5, #0] - lsr r1, r0, #0x10 - mov r0, #0x14 - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [sp, #4] - add r0, r0, r1 - sub r0, #0xa - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - ldr r0, _0223E6F4 ; =0x02257740 - add r1, r6, #0 - ldr r0, [r0, #0] - add r2, r7, #0 - ldr r0, [r0, #0] - bl ov23_0223E3AC - cmp r0, #0 - beq _0223E6C6 - mov r0, #1 - str r0, [sp, #0xc] - b _0223E6CC -_0223E6C6: - add r4, r4, #1 - cmp r4, #0x64 - blt _0223E66C -_0223E6CC: - ldr r0, [sp, #0xc] - cmp r0, #0 - beq _0223E6F0 - bl ov23_0223E6F8 - cmp r0, #0 - beq _0223E6F0 - add r0, r6, #0 - add r1, r7, #0 - bl ov23_0223E740 - add r4, r0, #0 - ldr r0, [sp, #8] - add r1, r6, #0 - add r2, r7, #0 - bl sub_02029140 - strb r0, [r4, #5] -_0223E6F0: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E6F4: .word 0x02257740 - thumb_func_end ov23_0223E650 - - thumb_func_start ov23_0223E6F8 -ov23_0223E6F8: ; 0x0223E6F8 - push {r4, r5, r6, r7} - ldr r1, _0223E734 ; =0x02257740 - ldr r3, _0223E738 ; =0x0000020A - ldr r2, [r1, #0] - ldr r4, _0223E73C ; =0x0000FFFF - mov r0, #0 - add r1, r2, #0 - sub r5, r3, #2 - add r6, r4, #0 -_0223E70A: - ldrh r7, [r1, r5] - cmp r7, r6 - bne _0223E726 - ldrh r7, [r1, r3] - cmp r7, r4 - bne _0223E726 - mov r1, #0x82 - lsl r1, r1, #2 - add r2, r2, r1 - mov r1, #6 - mul r1, r0 - add r0, r2, r1 - pop {r4, r5, r6, r7} - bx lr -_0223E726: - add r0, r0, #1 - add r1, r1, #6 - cmp r0, #0xfa - blt _0223E70A - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_0223E734: .word 0x02257740 -_0223E738: .word 0x0000020A -_0223E73C: .word 0x0000FFFF - thumb_func_end ov23_0223E6F8 - - thumb_func_start ov23_0223E740 -ov23_0223E740: ; 0x0223E740 - push {r3, r4, r5, r6, r7, lr} - mov lr, r1 - mov r1, #0xf - str r0, [sp] - lsl r1, r1, #6 - mov r0, lr - mul r1, r0 - ldr r0, [sp] - mov r6, #0 - add r5, r0, r1 - ldr r0, _0223E820 ; =0x02257740 - mvn r6, r6 - ldr r3, [r0, #0] - mov r2, #0 - mov ip, r3 - lsr r7, r6, #0x10 -_0223E760: - mov r0, #0x82 - lsl r0, r0, #2 - ldrh r1, [r3, r0] - cmp r1, r7 - beq _0223E784 - add r0, r0, #2 - ldrh r0, [r3, r0] - ldr r4, _0223E824 ; =0x0000FFFF - cmp r0, r4 - beq _0223E784 - mov r4, #0xf - lsl r4, r4, #6 - mul r4, r0 - add r0, r1, r4 - cmp r5, r0 - bge _0223E7A8 - add r6, r2, #0 - b _0223E7B0 -_0223E784: - mov r0, #6 - mul r0, r2 - mov r1, ip - add r2, r1, r0 - mov r3, #0x82 - ldr r1, [sp] - lsl r3, r3, #2 - strh r1, [r2, r3] - ldr r4, _0223E820 ; =0x02257740 - add r2, r3, #2 - ldr r1, [r4, #0] - add r5, r1, r0 - mov r1, lr - strh r1, [r5, r2] - ldr r1, [r4, #0] - add r1, r1, r3 - add r0, r1, r0 - pop {r3, r4, r5, r6, r7, pc} -_0223E7A8: - add r2, r2, #1 - add r3, r3, #6 - cmp r2, #0xfa - blt _0223E760 -_0223E7B0: - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _0223E80E - mov r1, #0xf8 - cmp r6, #0xf8 - bgt _0223E7F2 - mov r0, #0x5d - ldr r3, _0223E820 ; =0x02257740 - ldr r7, _0223E828 ; =0x00000213 - lsl r0, r0, #4 -_0223E7C6: - ldr r2, [r3, #0] - sub r1, r1, #1 - add r5, r2, r0 - mov r2, #0x82 - lsl r2, r2, #2 - ldrh r4, [r5, r2] - add r2, r2, #6 - strh r4, [r5, r2] - ldr r2, [r3, #0] - add r5, r2, r0 - ldr r2, _0223E82C ; =0x0000020A - ldrh r4, [r5, r2] - add r2, r2, #6 - strh r4, [r5, r2] - ldr r2, [r3, #0] - ldr r4, _0223E830 ; =0x0000020D - add r2, r2, r0 - ldrb r4, [r2, r4] - sub r0, r0, #6 - strb r4, [r2, r7] - cmp r1, r6 - bge _0223E7C6 -_0223E7F2: - ldr r3, _0223E820 ; =0x02257740 - mov r0, #6 - ldr r1, [r3, #0] - mul r0, r6 - add r4, r1, r0 - mov r2, #0x82 - ldr r1, [sp] - lsl r2, r2, #2 - strh r1, [r4, r2] - ldr r1, [r3, #0] - add r3, r1, r0 - add r1, r2, #2 - mov r0, lr - strh r0, [r3, r1] -_0223E80E: - ldr r0, _0223E820 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x82 - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #6 - mul r0, r6 - add r0, r1, r0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E820: .word 0x02257740 -_0223E824: .word 0x0000FFFF -_0223E828: .word 0x00000213 -_0223E82C: .word 0x0000020A -_0223E830: .word 0x0000020D - thumb_func_end ov23_0223E740 - - thumb_func_start ov23_0223E834 -ov23_0223E834: ; 0x0223E834 - push {r4, r5, r6, lr} - ldr r0, _0223E874 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r6, r0, #0 - mov r5, #0 -_0223E846: - add r0, r6, #0 - add r1, r5, #0 - bl sub_020291CC - add r4, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - bl sub_020291EC - add r1, r0, #0 - cmp r4, #0 - beq _0223E86A - cmp r1, #0 - beq _0223E86A - add r0, r4, #0 - bl ov23_0223E740 - strb r5, [r0, #5] -_0223E86A: - add r5, r5, #1 - cmp r5, #0xff - blt _0223E846 - pop {r4, r5, r6, pc} - nop -_0223E874: .word 0x02257740 - thumb_func_end ov23_0223E834 - - thumb_func_start ov23_0223E878 -ov23_0223E878: ; 0x0223E878 - push {r3, lr} - bl sub_0203608C - cmp r0, #0 - bne _0223E88A - bl ov23_022414D4 - bl ov23_022413B4 -_0223E88A: - pop {r3, pc} - thumb_func_end ov23_0223E878 - - thumb_func_start ov23_0223E88C -ov23_0223E88C: ; 0x0223E88C - push {r4, r5, r6, r7} - ldr r3, _0223E8C4 ; =0x02257740 - ldr r5, _0223E8C8 ; =0x0000020A - ldr r4, [r3, #0] - mov r2, #0 - add r3, r4, #0 - sub r6, r5, #2 -_0223E89A: - ldrh r7, [r3, r6] - cmp r0, r7 - bne _0223E8B6 - ldrh r7, [r3, r5] - cmp r1, r7 - bne _0223E8B6 - mov r0, #0x82 - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #6 - mul r0, r2 - add r0, r1, r0 - pop {r4, r5, r6, r7} - bx lr -_0223E8B6: - add r2, r2, #1 - add r3, r3, #6 - cmp r2, #0xfa - blt _0223E89A - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_0223E8C4: .word 0x02257740 -_0223E8C8: .word 0x0000020A - thumb_func_end ov23_0223E88C - - thumb_func_start ov23_0223E8CC -ov23_0223E8CC: ; 0x0223E8CC - push {r3, r4, r5, r6, r7, lr} - add r2, r1, #0 - add r6, r1, #0 - str r2, [sp] - add r2, #0x50 - add r4, r0, #0 - add r7, r0, #0 - sub r6, #0x50 - str r2, [sp] - sub r4, #0x50 - add r7, #0x50 - mov r5, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _0223E8F0 - sub r0, r5, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223E8F0: - cmp r4, #0x40 - bge _0223E8F6 - mov r4, #0x40 -_0223E8F6: - mov r0, #2 - lsl r0, r0, #8 - cmp r7, r0 - ble _0223E900 - add r7, r0, #0 -_0223E900: - cmp r6, #0x20 - bge _0223E906 - mov r6, #0x20 -_0223E906: - mov r1, #0x1e - ldr r0, [sp] - lsl r1, r1, #4 - cmp r0, r1 - ble _0223E912 - str r1, [sp] -_0223E912: - ldr r0, _0223E994 ; =0x02257740 - mov r2, #0 - ldr r3, [r0, #0] -_0223E918: - ldr r0, _0223E998 ; =0x0000020A - ldrh r1, [r3, r0] - cmp r1, r6 - blt _0223E936 - ldr r0, [sp] - cmp r1, r0 - bgt _0223E936 - mov r0, #0x82 - lsl r0, r0, #2 - ldrh r0, [r3, r0] - cmp r0, r4 - ble _0223E936 - cmp r0, r7 - bge _0223E936 - add r5, r5, #1 -_0223E936: - add r2, r2, #1 - add r3, r3, #6 - cmp r2, #0xfa - blt _0223E918 - cmp r5, #0 - bne _0223E948 - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0223E948: - bl sub_0201D2E8 - add r1, r5, #0 - bl sub_020E1F6C - ldr r0, _0223E994 ; =0x02257740 - mov r3, #0 - ldr r2, [r0, #0] - mov ip, r1 - add r5, r3, #0 -_0223E95C: - ldr r0, _0223E998 ; =0x0000020A - ldrh r1, [r2, r0] - cmp r1, r6 - blt _0223E984 - ldr r0, [sp] - cmp r1, r0 - bgt _0223E984 - mov r0, #0x82 - lsl r0, r0, #2 - ldrh r0, [r2, r0] - cmp r0, r4 - ble _0223E984 - cmp r0, r7 - bge _0223E984 - mov r0, ip - cmp r3, r0 - bne _0223E982 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_0223E982: - add r3, r3, #1 -_0223E984: - add r5, r5, #1 - add r2, r2, #6 - cmp r5, #0xfa - blt _0223E95C - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223E994: .word 0x02257740 -_0223E998: .word 0x0000020A - thumb_func_end ov23_0223E8CC - - thumb_func_start ov23_0223E99C -ov23_0223E99C: ; 0x0223E99C - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223E9CC ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _0223E9D0 ; =0x000007E4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223E9B2 - mov r1, #4 - bl sub_02002154 -_0223E9B2: - ldr r1, _0223E9CC ; =0x02257740 - ldr r0, _0223E9D0 ; =0x000007E4 - ldr r2, [r1, #0] - mov r3, #0 - str r3, [r2, r0] - ldr r1, [r1, #0] - add r0, #0x98 - str r3, [r1, r0] - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - nop -_0223E9CC: .word 0x02257740 -_0223E9D0: .word 0x000007E4 - thumb_func_end ov23_0223E99C - - thumb_func_start ov23_0223E9D4 -ov23_0223E9D4: ; 0x0223E9D4 - push {r4, lr} - add r4, r2, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0223EA24 - bl sub_02035EE0 - cmp r0, #0 - beq _0223EA24 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x13 - add r3, r2, #0 - bl ov23_02253F40 - ldr r2, _0223EA28 ; =0x02257740 - mov r1, #0x9e - ldr r3, [r2, #0] - lsl r1, r1, #4 - str r0, [r3, r1] - ldr r1, [r2, #0] - ldr r0, _0223EA2C ; =ov23_0223EA38 - mov r2, #0 - bl sub_0200D9E8 - ldr r2, _0223EA28 ; =0x02257740 - ldr r1, _0223EA30 ; =0x0000087C - ldr r3, [r2, #0] - str r0, [r3, r1] - ldr r2, [r2, #0] - mov r0, #0 - ldr r1, [r2, r1] - ldr r2, _0223EA34 ; =ov23_0223E99C - bl ov23_022431EC - bl sub_020594FC -_0223EA24: - pop {r4, pc} - nop -_0223EA28: .word 0x02257740 -_0223EA2C: .word ov23_0223EA38 -_0223EA30: .word 0x0000087C -_0223EA34: .word ov23_0223E99C - thumb_func_end ov23_0223E9D4 - - thumb_func_start ov23_0223EA38 -ov23_0223EA38: ; 0x0223EA38 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _0223EAE4 ; =0x02257740 - ldr r2, [r0, #0] - mov r0, #0x9e - lsl r0, r0, #4 - ldr r1, [r2, r0] - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - beq _0223EA8A - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223EADE - mov r0, #4 - str r0, [sp] - ldr r0, _0223EAE4 ; =0x02257740 - ldr r1, _0223EAE8 ; =0x0225630E - ldr r0, [r0, #0] - ldr r2, _0223EAEC ; =0x000003D9 - ldr r0, [r0, #0] - mov r3, #0xb - ldr r0, [r0, #8] - bl sub_02002100 - ldr r2, _0223EAE4 ; =0x02257740 - ldr r1, _0223EAF0 ; =0x000007E4 - ldr r3, [r2, #0] - add sp, #8 - str r0, [r3, r1] - mov r3, #0 - mov r0, #0x9e - ldr r1, [r2, #0] - mvn r3, r3 - lsl r0, r0, #4 - str r3, [r1, r0] - pop {r4, pc} -_0223EA8A: - ldr r0, _0223EAF0 ; =0x000007E4 - mov r1, #4 - ldr r0, [r2, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0223EADE - cmp r0, #0 - add r0, sp, #4 - bne _0223EAA8 - mov r1, #1 - strb r1, [r0] - b _0223EAB0 -_0223EAA8: - mov r1, #0 - strb r1, [r0] - bl sub_02059514 -_0223EAB0: - mov r0, #0x41 - add r1, sp, #4 - bl sub_020360D0 - ldr r0, _0223EAE4 ; =0x02257740 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _0223EAF0 ; =0x000007E4 - str r2, [r1, r0] - bl ov23_0224219C - bl ov23_02254044 - add r0, r4, #0 - bl sub_0200DA58 - bl ov23_02243204 - ldr r0, _0223EAE4 ; =0x02257740 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _0223EAF4 ; =0x0000087C - str r2, [r1, r0] -_0223EADE: - add sp, #8 - pop {r4, pc} - nop -_0223EAE4: .word 0x02257740 -_0223EAE8: .word 0x0225630E -_0223EAEC: .word 0x000003D9 -_0223EAF0: .word 0x000007E4 -_0223EAF4: .word 0x0000087C - thumb_func_end ov23_0223EA38 - - thumb_func_start ov23_0223EAF8 -ov23_0223EAF8: ; 0x0223EAF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _0223EB7C ; =0x02257740 - add r7, r2, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - str r0, [sp] - ldr r0, _0223EB7C ; =0x02257740 - lsl r6, r5, #2 - ldr r1, [r0, #0] - ldr r0, _0223EB80 ; =0x000007E8 - add r2, r1, r6 - ldr r4, [r2, r0] - add r0, sp, #4 - strb r5, [r0] - ldrb r0, [r7] - cmp r0, #0 - beq _0223EB64 - cmp r4, #0 - beq _0223EB64 - ldrb r0, [r4, #4] - cmp r0, #0xff - bne _0223EB76 - mov r0, #0x42 - add r1, sp, #4 - mov r2, #1 - bl sub_02035AC4 - mov r0, #0xff - strb r0, [r4, #4] - ldr r0, _0223EB84 ; =0x0000FFFF - strh r0, [r4] - strh r0, [r4, #2] - ldrb r1, [r4, #5] - ldr r0, [sp] - bl sub_020291A4 - ldr r1, _0223EB7C ; =0x02257740 - mov r3, #1 - ldr r0, [r1, #0] - add sp, #8 - add r2, r0, r5 - ldr r0, _0223EB88 ; =0x00000808 - strb r3, [r2, r0] - ldr r1, [r1, #0] - mov r2, #0 - add r1, r1, r6 - sub r0, #0x20 - str r2, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_0223EB64: - add r2, r1, r5 - ldr r1, _0223EB88 ; =0x00000808 - mov r0, #0 - strb r0, [r2, r1] - ldr r2, _0223EB7C ; =0x02257740 - sub r1, #0x20 - ldr r2, [r2, #0] - add r2, r2, r6 - str r0, [r2, r1] -_0223EB76: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223EB7C: .word 0x02257740 -_0223EB80: .word 0x000007E8 -_0223EB84: .word 0x0000FFFF -_0223EB88: .word 0x00000808 - thumb_func_end ov23_0223EAF8 - - thumb_func_start ov23_0223EB8C -ov23_0223EB8C: ; 0x0223EB8C - push {r4, lr} - add r4, r2, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0223EBA8 - bl sub_020594FC - ldr r0, _0223EBB8 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl ov23_0223F70C -_0223EBA8: - ldr r0, _0223EBB8 ; =0x02257740 - mov r2, #1 - ldr r1, [r0, #0] - ldrb r0, [r4] - add r1, r1, r0 - ldr r0, _0223EBBC ; =0x000008C4 - strb r2, [r1, r0] - pop {r4, pc} - ; .align 2, 0 -_0223EBB8: .word 0x02257740 -_0223EBBC: .word 0x000008C4 - thumb_func_end ov23_0223EB8C - - thumb_func_start ov23_0223EBC0 -ov23_0223EBC0: ; 0x0223EBC0 - push {r3, r4} - ldr r2, _0223EBDC ; =0x02257740 - mov r4, #0 - ldr r1, [r2, #0] - add r3, r1, r0 - ldr r1, _0223EBE0 ; =0x00000808 - strb r4, [r3, r1] - ldr r2, [r2, #0] - add r1, #0xb0 - add r0, r2, r0 - strb r4, [r0, r1] - pop {r3, r4} - bx lr - nop -_0223EBDC: .word 0x02257740 -_0223EBE0: .word 0x00000808 - thumb_func_end ov23_0223EBC0 - - thumb_func_start ov23_0223EBE4 -ov23_0223EBE4: ; 0x0223EBE4 - push {r3, lr} - add r1, sp, #0 - strb r0, [r1] - ldrb r0, [r2] - strb r0, [r1, #1] - ldrb r0, [r2, #1] - strb r0, [r1, #2] - mov r0, #0x45 - add r1, sp, #0 - bl sub_02035B48 - pop {r3, pc} - thumb_func_end ov23_0223EBE4 - - thumb_func_start ov23_0223EBFC -ov23_0223EBFC: ; 0x0223EBFC - mov r0, #2 - bx lr - thumb_func_end ov23_0223EBFC - - thumb_func_start ov23_0223EC00 -ov23_0223EC00: ; 0x0223EC00 - push {r3, r4, r5, lr} - add r5, r2, #0 - ldrb r4, [r5] - bl sub_0203608C - cmp r4, r0 - beq _0223EC26 - ldr r1, _0223EC28 ; =0x02257740 - ldrb r3, [r5, #1] - ldr r0, [r1, #0] - add r2, r0, r4 - ldr r0, _0223EC2C ; =0x000008CC - strb r3, [r2, r0] - ldr r2, [r1, #0] - ldrb r1, [r5] - ldrb r3, [r5, #2] - add r0, #8 - add r1, r2, r1 - strb r3, [r1, r0] -_0223EC26: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223EC28: .word 0x02257740 -_0223EC2C: .word 0x000008CC - thumb_func_end ov23_0223EC00 - - thumb_func_start ov23_0223EC30 -ov23_0223EC30: ; 0x0223EC30 - mov r0, #3 - bx lr - thumb_func_end ov23_0223EC30 - - thumb_func_start ov23_0223EC34 -ov23_0223EC34: ; 0x0223EC34 - push {r3, r4, r5, lr} - sub sp, #0xa8 - ldr r5, _0223ED50 ; =0x022563A8 - add r4, r0, #0 - add r3, sp, #0x80 - mov r2, #5 -_0223EC40: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223EC40 - add r0, sp, #0x80 - bl sub_0201FE94 - ldr r5, _0223ED54 ; =0x02256328 - add r3, sp, #0x70 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223ED58 ; =0x02256338 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x1d - bl sub_02019690 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _0223ED5C ; =0x02256354 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x1d - bl sub_02019690 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - ldr r5, _0223ED60 ; =0x02256370 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x1d - bl sub_02019690 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - ldr r5, _0223ED64 ; =0x0225638C - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x1d - bl sub_02019690 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x1d - bl sub_02019690 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x1d - bl sub_02019690 - add sp, #0xa8 - pop {r3, r4, r5, pc} - nop -_0223ED50: .word 0x022563A8 -_0223ED54: .word 0x02256328 -_0223ED58: .word 0x02256338 -_0223ED5C: .word 0x02256354 -_0223ED60: .word 0x02256370 -_0223ED64: .word 0x0225638C - thumb_func_end ov23_0223EC34 - - thumb_func_start ov23_0223ED68 -ov23_0223ED68: ; 0x0223ED68 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r7, r3, #0 - cmp r4, #0 - beq _0223ED8A - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021D6C - b _0223ED9A -_0223ED8A: - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021D6C -_0223ED9A: - cmp r7, #0 - beq _0223EDB6 - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_02021D6C - ldr r0, _0223EE74 ; =0x000006A4 - bl sub_02005748 - b _0223EDE8 -_0223EDB6: - cmp r4, #0 - beq _0223EDD2 - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #3 - bl sub_02021D6C - ldr r0, _0223EE78 ; =0x000006A2 - bl sub_02005748 - b _0223EDE8 -_0223EDD2: - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #4 - bl sub_02021D6C - ldr r0, _0223EE7C ; =0x000006A3 - bl sub_02005748 -_0223EDE8: - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - add r5, #8 - lsl r0, r5, #0xc - add r6, #8 - str r0, [sp] - lsl r0, r6, #0xc - str r0, [sp, #4] - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [sp, #0x20] - cmp r0, #0 - beq _0223EE6A - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #5 - bl sub_02021D6C - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, _0223EE70 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 -_0223EE6A: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0223EE70: .word 0x02257740 -_0223EE74: .word 0x000006A4 -_0223EE78: .word 0x000006A2 -_0223EE7C: .word 0x000006A3 - thumb_func_end ov23_0223ED68 - - thumb_func_start ov23_0223EE80 -ov23_0223EE80: ; 0x0223EE80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0 - add r6, r0, #0 - mov r0, #0x3a - add r2, r1, #0 - bl sub_02004550 - bl ov23_0223E140 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r2, #5 - mov r0, #3 - mov r1, #0x1d - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r0, #0x1d - bl sub_02018340 - add r5, r0, #0 - ldr r0, _0223EF8C ; =0x02257740 - add r1, r5, #0 - ldr r0, [r0, #0] - str r5, [r0, #4] - ldr r0, _0223EF90 ; =ov23_022411E8 - bl sub_02017798 - bl ov23_0224219C - ldr r2, _0223EF94 ; =0x000001E2 - add r1, r5, #0 - add r3, r2, #0 - sub r3, #0xb5 - bl ov23_02253E2C - add r0, r5, #0 - bl ov23_0223EC34 - add r0, r5, #0 - mov r1, #0 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #1 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #2 - bl sub_02019EBC - mov r0, #0 - str r0, [sp] - mov r0, #0x1d - str r0, [sp, #4] - ldr r2, _0223EF94 ; =0x000001E2 - add r0, r5, #0 - mov r1, #3 - mov r3, #0xa - bl sub_0200DD0C - mov r0, #0x34 - mov r1, #0x1d - bl sub_02006C24 - mov r1, #0x60 - str r1, [sp] - mov r1, #0x1d - mov r2, #0 - str r1, [sp, #4] - mov r1, #1 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r0, #0x1d - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r5, #0 - add r3, r1, #0 - bl sub_020070E8 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - add r7, r0, #0 - str r3, [sp, #8] - mov r0, #0x1d - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #2 - add r2, r5, #0 - bl sub_0200710C - add r0, r4, #0 - bl sub_02006CA8 - mov r3, #0x80 - str r3, [sp] - mov r0, #0x1d - str r0, [sp, #4] - mov r0, #0x32 - mov r1, #0x34 - mov r2, #0 - add r3, #0xc0 - bl sub_02006E84 - add r0, r5, #0 - add r1, r7, #0 - add r2, r6, #0 - bl ov23_0223FA3C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223EF8C: .word 0x02257740 -_0223EF90: .word ov23_022411E8 -_0223EF94: .word 0x000001E2 - thumb_func_end ov23_0223EE80 - - thumb_func_start ov23_0223EF98 -ov23_0223EF98: ; 0x0223EF98 - push {r3, lr} - sub sp, #0x10 - ldr r0, _0223F01C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_022404C8 - ldr r0, _0223F01C ; =0x02257740 - mov r1, #1 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl sub_02019448 - ldr r0, _0223F01C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_0223FF8C - mov r0, #1 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x1d - str r0, [sp, #0xc] - ldr r2, _0223F01C ; =0x02257740 - mov r0, #0x37 - ldr r2, [r2, #0] - mov r1, #9 - ldr r2, [r2, #4] - mov r3, #2 - bl sub_02006E3C - ldr r0, _0223F01C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_022401B0 - mov r0, #0 - mov r1, #3 - bl sub_02019060 - mov r0, #1 - mov r1, #2 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - mov r0, #3 - mov r1, #0 - bl sub_02019060 - bl ov23_02240E88 - bl ov23_0224108C - ldr r0, _0223F01C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_02240688 - add sp, #0x10 - pop {r3, pc} - nop -_0223F01C: .word 0x02257740 - thumb_func_end ov23_0223EF98 - - thumb_func_start ov23_0223F020 -ov23_0223F020: ; 0x0223F020 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _0223F110 ; =0x02257740 - mov r1, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl sub_02019044 - ldr r0, _0223F110 ; =0x02257740 - mov r1, #1 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl sub_02019044 - ldr r0, _0223F110 ; =0x02257740 - mov r1, #2 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl sub_02019044 - ldr r0, _0223F110 ; =0x02257740 - mov r1, #3 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl sub_02019044 - ldr r0, _0223F110 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A4E4 - ldr r0, _0223F110 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x5b - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A4E4 - ldr r0, _0223F110 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A6DC - ldr r0, _0223F110 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A6DC - mov r6, #0 - ldr r7, _0223F110 ; =0x02257740 - add r4, r6, #0 -_0223F092: - ldr r0, [r7, #0] - add r1, r0, r4 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02009754 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0223F092 - mov r4, #0 - add r6, r4, #0 -_0223F0AC: - ldr r0, [r5, #0x18] - cmp r0, #0 - beq _0223F0B8 - bl sub_020181C4 - str r6, [r5, #0x18] -_0223F0B8: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223F0AC - ldr r0, _0223F110 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_02021964 - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - ldr r0, _0223F110 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl sub_020181C4 - ldr r0, _0223F110 ; =0x02257740 - mov r1, #0 - ldr r0, [r0, #0] - str r1, [r0, #4] - mov r0, #0x1d - bl sub_0201807C - bl ov23_0224219C - ldr r1, _0223F110 ; =0x02257740 - ldr r2, _0223F114 ; =0x000003E2 - ldr r1, [r1, #0] - add r3, r2, #0 - ldr r1, [r1, #0] - sub r3, #0xb5 - ldr r1, [r1, #8] - bl ov23_02253E2C - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F110: .word 0x02257740 -_0223F114: .word 0x000003E2 - thumb_func_end ov23_0223F020 - - thumb_func_start ov23_0223F118 -ov23_0223F118: ; 0x0223F118 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0x10] - cmp r0, #0x1b - bls _0223F12A - b _0223F6F4 -_0223F12A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223F136: ; jump table - .short _0223F16E - _0223F136 - 2 ; case 0 - .short _0223F18A - _0223F136 - 2 ; case 1 - .short _0223F1B2 - _0223F136 - 2 ; case 2 - .short _0223F1D0 - _0223F136 - 2 ; case 3 - .short _0223F1E8 - _0223F136 - 2 ; case 4 - .short _0223F1F8 - _0223F136 - 2 ; case 5 - .short _0223F206 - _0223F136 - 2 ; case 6 - .short _0223F24C - _0223F136 - 2 ; case 7 - .short _0223F266 - _0223F136 - 2 ; case 8 - .short _0223F278 - _0223F136 - 2 ; case 9 - .short _0223F2AA - _0223F136 - 2 ; case 10 - .short _0223F2EA - _0223F136 - 2 ; case 11 - .short _0223F310 - _0223F136 - 2 ; case 12 - .short _0223F34A - _0223F136 - 2 ; case 13 - .short _0223F36E - _0223F136 - 2 ; case 14 - .short _0223F3B0 - _0223F136 - 2 ; case 15 - .short _0223F400 - _0223F136 - 2 ; case 16 - .short _0223F428 - _0223F136 - 2 ; case 17 - .short _0223F484 - _0223F136 - 2 ; case 18 - .short _0223F4B8 - _0223F136 - 2 ; case 19 - .short _0223F4E4 - _0223F136 - 2 ; case 20 - .short _0223F528 - _0223F136 - 2 ; case 21 - .short _0223F5CC - _0223F136 - 2 ; case 22 - .short _0223F600 - _0223F136 - 2 ; case 23 - .short _0223F630 - _0223F136 - 2 ; case 24 - .short _0223F66C - _0223F136 - 2 ; case 25 - .short _0223F684 - _0223F136 - 2 ; case 26 - .short _0223F6B4 - _0223F136 - 2 ; case 27 -_0223F16E: - mov r0, #0 - bl ov23_0224DBF4 - bl ov23_022417CC - bl sub_0205764C - bl ov23_0224B430 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F18A: - ldr r0, [r5, #0x6c] - bl ov23_0224942C - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #2 - mov r1, #0x10 - mov r2, #0x12 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F1B2: - bl sub_0200F2AC - cmp r0, #0 - beq _0223F2B4 - ldr r0, [r5, #0x6c] - cmp r0, #0 - bne _0223F2B4 - add r0, r5, #0 - bl sub_0203CD44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F1D0: - add r0, r5, #0 - bl sub_0203CD4C - cmp r0, #0 - bne _0223F2B4 - bl sub_02039794 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F1E8: - add r0, r4, #0 - bl ov23_0223EE80 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F1F8: - bl ov23_0223EF98 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F206: - bl sub_02039734 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x1d - mov r1, #0x11 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F24C: - bl sub_0200F2AC - cmp r0, #0 - beq _0223F2B4 - mov r0, #0 - str r0, [r4, #8] - ldr r0, _0223F594 ; =0x0000054A - bl sub_02005748 - mov r0, #8 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F266: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x14 - ble _0223F2B4 - mov r0, #9 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F278: - bl ov23_0224219C - ldr r2, [r4, #0xc] - mov r1, #0 - bl ov23_0225410C - bl ov23_0224219C - mov r2, #0 - mov r1, #0x3e - add r3, r2, #0 - bl ov23_02253F60 - ldr r1, _0223F598 ; =0x02257740 - add sp, #0xc - ldr r2, [r1, #0] - mov r1, #0x9e - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F2AA: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x50 - bgt _0223F2B6 -_0223F2B4: - b _0223F6F4 -_0223F2B6: - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298B0 - add r5, r0, #0 - bl ov23_0224219C - bl ov23_02254044 - add r0, r5, #0 - bl sub_0202920C - cmp r0, #0 - beq _0223F2E2 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F2E2: - mov r0, #0xd - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F2EA: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x55 - add r3, r2, #0 - bl ov23_02253F40 - ldr r1, _0223F598 ; =0x02257740 - add sp, #0xc - ldr r2, [r1, #0] - mov r1, #0x9e - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F310: - ldr r0, _0223F598 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x9e - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223F3EE - ldr r0, _0223F59C ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223F338 - ldr r0, _0223F5A0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0223F3EE -_0223F338: - bl ov23_0224219C - bl ov23_02254044 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F34A: - add r0, r4, #0 - bl ov23_02240CFC - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_02240B84 - add r0, r4, #0 - bl ov23_0223FDE0 - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0223F36E: - add r0, r4, #0 - bl ov23_0223FDE0 - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - bne _0223F3EE - bl ov23_0224219C - mov r2, #0 - mov r1, #0x40 - add r3, r2, #0 - bl ov23_02253F40 - ldr r1, _0223F598 ; =0x02257740 - ldr r2, [r1, #0] - mov r1, #0x9e - lsl r1, r1, #4 - str r0, [r2, r1] - ldr r0, _0223F5A4 ; =0x000005E3 - bl sub_02005748 - mov r0, #0x3c - str r0, [r4, #0x4c] - mov r0, #0xf - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F3B0: - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - ldr r0, _0223F598 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x9e - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223F3EE - ldr r0, [r4, #0x4c] - sub r0, r0, #1 - str r0, [r4, #0x4c] - ldr r0, _0223F59C ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223F3F0 - ldr r0, _0223F5A0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _0223F3F0 - ldr r0, [r4, #0x4c] - cmp r0, #0 - beq _0223F3F0 -_0223F3EE: - b _0223F6F4 -_0223F3F0: - bl ov23_0224219C - bl ov23_02254044 - mov r0, #0x10 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F400: - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - add r0, r4, #0 - bl ov23_022409F0 - cmp r0, #0 - beq _0223F420 - mov r0, #0x11 - str r0, [r4, #0] - mov r0, #0x3c - add sp, #0xc - str r0, [r4, #0x4c] - pop {r4, r5, r6, r7, pc} -_0223F420: - mov r0, #0x12 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F428: - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - ldr r0, _0223F598 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x9e - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223F536 - ldr r0, [r4, #0x4c] - sub r0, r0, #1 - str r0, [r4, #0x4c] - ldr r0, _0223F59C ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223F466 - ldr r0, _0223F5A0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _0223F466 - ldr r0, [r4, #0x4c] - cmp r0, #0 - bne _0223F536 -_0223F466: - add r0, r4, #0 - bl ov23_02240A90 - cmp r0, #0 - beq _0223F47C - mov r0, #0x3c - str r0, [r4, #0x4c] - mov r0, #0xf - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F47C: - mov r0, #0x10 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F484: - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - bl ov23_0224219C - bl ov23_02254044 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x1d - mov r1, #0x10 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F4B8: - ldr r0, _0223F598 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - bl sub_0200F2AC - cmp r0, #0 - beq _0223F536 - bl sub_02039794 - add r0, r4, #0 - bl ov23_0223F020 - add r0, r5, #0 - bl sub_020509D4 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F4E4: - add r0, r5, #0 - bl sub_020509DC - cmp r0, #0 - beq _0223F536 - add r0, r5, #0 - bl ov23_02249404 - str r0, [r5, #0x6c] - bl sub_02039734 - bl sub_020594FC - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x11 - mov r2, #0x13 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F528: - mov r0, #0 - bl sub_0200F338 - bl sub_0200F2AC - cmp r0, #0 - bne _0223F538 -_0223F536: - b _0223F6F4 -_0223F538: - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - mov r3, #0x80 - str r3, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0x32 - mov r1, #0x34 - mov r2, #0 - add r3, #0xc0 - bl sub_02006E84 - mov r0, #2 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0x10] - ldr r2, _0223F5A8 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - bl sub_020576A0 - bl ov23_0224B460 - bl ov23_022417E0 - add r1, r4, #0 - mov r0, #0x43 - add r1, #0x50 - bl sub_020360D0 - bl sub_02059514 - ldr r0, _0223F598 ; =0x02257740 - b _0223F5AC - ; .align 2, 0 -_0223F594: .word 0x0000054A -_0223F598: .word 0x02257740 -_0223F59C: .word 0x021BF6BC -_0223F5A0: .word 0x021BF67C -_0223F5A4: .word 0x000005E3 -_0223F5A8: .word 0x000003D9 -_0223F5AC: - mov r2, #0 - ldr r1, [r0, #0] - mov r0, #0x22 - lsl r0, r0, #6 - str r2, [r1, r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - mov r0, #1 - bl ov23_0224DBF4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0223F5CC: - ldr r1, _0223F6F8 ; =0x02257740 - ldr r0, _0223F6FC ; =0x000009E8 - ldr r2, [r1, #0] - mov r3, #1 - strb r3, [r2, r0] - ldr r2, [r4, #8] - sub r2, r2, #1 - str r2, [r4, #8] - bne _0223F5E8 - ldr r1, [r1, #0] - mov r2, #0x64 - strb r2, [r1, r0] - mov r0, #0x17 - str r0, [r4, #0] -_0223F5E8: - ldr r0, _0223F6F8 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_02240B84 - ldr r0, _0223F6F8 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0223F600: - ldr r0, _0223F6F8 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - mov r0, #0xf - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x1d - mov r1, #2 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, _0223F700 ; =0x000006A1 - bl sub_02005748 - mov r0, #0x18 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F630: - bl sub_0200F2AC - cmp r0, #0 - beq _0223F65E - mov r6, #0 - ldr r7, _0223F6F8 ; =0x02257740 - add r5, r6, #0 -_0223F63E: - ldr r0, [r7, #0] - add r1, r0, r5 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #8 - blt _0223F63E - mov r0, #0x19 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F65E: - ldr r0, _0223F6F8 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0x20] - bl sub_020219F8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0223F66C: - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - mov r3, #7 - str r0, [sp] - bl sub_0200AAE0 - mov r0, #0x1a - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F684: - mov r0, #0 - bl sub_0200F32C - mov r0, #0 - bl sub_0200F338 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x3f - add r3, r2, #0 - bl ov23_02253F40 - ldr r1, _0223F6F8 ; =0x02257740 - add sp, #0xc - ldr r2, [r1, #0] - mov r1, #0x9e - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #0x3c - str r0, [r4, #0x4c] - mov r0, #0xf - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_0223F6B4: - ldr r0, _0223F6F8 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x9e - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223F6F4 - ldr r0, [r4, #0x4c] - sub r0, r0, #1 - str r0, [r4, #0x4c] - ldr r0, _0223F704 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223F6E8 - ldr r0, _0223F708 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _0223F6E8 - ldr r0, [r4, #0x4c] - cmp r0, #0 - bne _0223F6F4 -_0223F6E8: - bl ov23_0224219C - bl ov23_02254044 - mov r0, #0x13 - str r0, [r4, #0] -_0223F6F4: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F6F8: .word 0x02257740 -_0223F6FC: .word 0x000009E8 -_0223F700: .word 0x000006A1 -_0223F704: .word 0x021BF6BC -_0223F708: .word 0x021BF67C - thumb_func_end ov23_0223F118 - - thumb_func_start ov23_0223F70C -ov23_0223F70C: ; 0x0223F70C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xb - bl sub_0202BE14 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x9c - ldr r0, [r0, #0] - mov r2, #1 - bl sub_0202B758 - mov r0, #0xb - mov r1, #0x54 - bl sub_02018184 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x54 - bl sub_020C4CF4 - str r5, [r4, #0x10] - ldr r0, [r5, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206AA04 - ldr r0, _0223F760 ; =ov23_0223F118 - add r1, r4, #0 - mov r2, #0x64 - bl sub_0200D9E8 - ldr r1, _0223F764 ; =0x02257740 - ldr r2, [r1, #0] - mov r1, #0x22 - lsl r1, r1, #6 - str r0, [r2, r1] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223F760: .word ov23_0223F118 -_0223F764: .word 0x02257740 - thumb_func_end ov23_0223F70C - - thumb_func_start ov23_0223F768 -ov23_0223F768: ; 0x0223F768 - ldr r0, _0223F788 ; =0x02257740 - mov r2, #0 - ldr r3, [r0, #0] - mov r0, #0x81 - lsl r0, r0, #4 -_0223F772: - ldr r1, [r3, r0] - cmp r1, #0 - bne _0223F77C - mov r0, #1 - bx lr -_0223F77C: - add r2, r2, #1 - add r3, #0xc - cmp r2, #8 - blt _0223F772 - mov r0, #0 - bx lr - ; .align 2, 0 -_0223F788: .word 0x02257740 - thumb_func_end ov23_0223F768 - - thumb_func_start ov23_0223F78C -ov23_0223F78C: ; 0x0223F78C - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - ldr r2, _0223F7F8 ; =0x02257740 - mov r3, #0x81 - ldr r2, [r2, #0] - mov ip, r1 - mov r1, #0 - add r5, r2, #0 - lsl r3, r3, #4 -_0223F79E: - ldr r4, [r5, r3] - cmp r4, #0 - bne _0223F7E8 - add r4, r0, #0 - mov r3, #0x14 - mul r4, r3 - ldr r3, _0223F7FC ; =0x02256EB0 - mov r0, #0xc - mul r0, r1 - add r5, r3, r4 - mov r3, #0x81 - add r2, r2, r0 - lsl r3, r3, #4 - str r5, [r2, r3] - ldr r2, _0223F800 ; =0x02256EBE - ldrb r6, [r2, r4] - ldr r4, _0223F7F8 ; =0x02257740 - ldr r2, [r4, #0] - add r5, r2, r0 - add r2, r3, #4 - strb r6, [r5, r2] - ldr r2, [r4, #0] - mov r6, ip - add r5, r2, r0 - add r2, r3, #5 - strb r6, [r5, r2] - ldr r2, [r4, #0] - add r5, r2, r0 - add r2, r3, #6 - strb r7, [r5, r2] - ldr r2, [r4, #0] - mov r5, #0 - add r0, r2, r0 - add r3, #8 - strb r5, [r0, r3] - add r0, r1, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223F7E8: - add r1, r1, #1 - add r5, #0xc - cmp r1, #8 - blt _0223F79E - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F7F8: .word 0x02257740 -_0223F7FC: .word 0x02256EB0 -_0223F800: .word 0x02256EBE - thumb_func_end ov23_0223F78C - - thumb_func_start ov23_0223F804 -ov23_0223F804: ; 0x0223F804 - push {r3, r4} - ldr r3, [r0, #0] - cmp r3, #0 - bne _0223F812 - mov r0, #1 - pop {r3, r4} - bx lr -_0223F812: - lsr r4, r1, #0x1f - add r4, r1, r4 - ldrb r0, [r0, #0xc] - asr r1, r4, #1 - lsr r4, r2, #0x1f - add r4, r2, r4 - asr r2, r4, #1 - lsr r0, r0, #1 - mul r0, r2 - add r0, r1, r0 - ldrb r0, [r3, r0] - cmp r0, #0x6f - beq _0223F832 - mov r0, #1 - pop {r3, r4} - bx lr -_0223F832: - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov23_0223F804 - - thumb_func_start ov23_0223F838 -ov23_0223F838: ; 0x0223F838 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - str r0, [sp] - str r1, [sp, #4] - add r6, r2, #0 - bl ov23_0223F768 - cmp r0, #0 - bne _0223F850 - add sp, #0x2c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223F850: - ldr r0, [sp] - mov r1, #0x14 - mul r1, r0 - str r1, [sp, #0xc] - ldr r1, _0223F95C ; =0x02256EBC - ldr r0, [sp, #0xc] - ldrb r0, [r1, r0] - lsr r1, r0, #1 - ldr r0, [sp, #4] - add r0, r0, r1 - str r0, [sp, #0x1c] - ldr r1, _0223F960 ; =0x02256EBD - ldr r0, [sp, #0xc] - ldrb r0, [r1, r0] - lsr r0, r0, #1 - add r7, r6, r0 - ldr r0, [sp, #0x1c] - cmp r0, #0xd - ble _0223F87C - add sp, #0x2c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223F87C: - cmp r7, #0xa - ble _0223F886 - add sp, #0x2c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223F886: - ldr r0, [sp, #4] - str r0, [sp, #0x10] - add r1, r0, #0 - ldr r0, [sp, #0x1c] - cmp r1, r0 - bge _0223F8EA - mov r0, #0xd - mul r0, r6 - str r0, [sp, #0x20] -_0223F898: - add r4, r6, #0 - cmp r6, r7 - bge _0223F8DE - ldr r1, [sp, #0x10] - ldr r0, [sp, #4] - ldr r5, [sp, #0x20] - sub r0, r1, r0 - lsl r0, r0, #1 - str r0, [sp, #0x14] -_0223F8AA: - ldr r1, _0223F964 ; =0x02256EB0 - ldr r0, [sp, #0xc] - sub r2, r4, r6 - add r0, r1, r0 - ldr r1, [sp, #0x14] - lsl r2, r2, #1 - bl ov23_0223F804 - cmp r0, #0 - beq _0223F8D6 - ldr r0, _0223F968 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, [sp, #0x10] - add r0, r0, r1 - add r1, r5, r0 - ldr r0, _0223F96C ; =0x000008DC - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0223F8D6 - add sp, #0x2c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223F8D6: - add r4, r4, #1 - add r5, #0xd - cmp r4, r7 - blt _0223F8AA -_0223F8DE: - ldr r0, [sp, #0x10] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [sp, #0x10] - cmp r1, r0 - blt _0223F898 -_0223F8EA: - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r6, #0 - bl ov23_0223F78C - ldr r1, [sp, #4] - str r1, [sp, #8] - add r2, r1, #0 - ldr r1, [sp, #0x1c] - cmp r2, r1 - bge _0223F956 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x28] - mov r0, #0xd - mul r0, r6 - str r0, [sp, #0x24] -_0223F90C: - add r5, r6, #0 - cmp r6, r7 - bge _0223F94A - ldr r1, [sp, #8] - ldr r0, [sp, #4] - ldr r4, [sp, #0x24] - sub r0, r1, r0 - lsl r0, r0, #1 - str r0, [sp, #0x18] -_0223F91E: - ldr r1, _0223F964 ; =0x02256EB0 - ldr r0, [sp, #0xc] - sub r2, r5, r6 - add r0, r1, r0 - ldr r1, [sp, #0x18] - lsl r2, r2, #1 - bl ov23_0223F804 - cmp r0, #0 - beq _0223F942 - ldr r0, _0223F968 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, [sp, #8] - add r0, r0, r1 - add r2, r4, r0 - ldr r1, [sp, #0x28] - ldr r0, _0223F96C ; =0x000008DC - strb r1, [r2, r0] -_0223F942: - add r5, r5, #1 - add r4, #0xd - cmp r5, r7 - blt _0223F91E -_0223F94A: - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [sp, #8] - cmp r1, r0 - blt _0223F90C -_0223F956: - mov r0, #1 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F95C: .word 0x02256EBC -_0223F960: .word 0x02256EBD -_0223F964: .word 0x02256EB0 -_0223F968: .word 0x02257740 -_0223F96C: .word 0x000008DC - thumb_func_end ov23_0223F838 - - thumb_func_start ov23_0223F970 -ov23_0223F970: ; 0x0223F970 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _0223F9C4 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - add r6, r0, #0 - bl sub_020298B0 - add r0, r6, #0 - bl sub_02025E38 - bl sub_02025F20 - add r4, r0, #0 - mov r1, #1 - add r0, r6, #0 - and r4, r1 - bl sub_02027560 - bl sub_02027474 - mov r1, #0 - cmp r0, #0 - beq _0223F9B4 - cmp r4, #0 - beq _0223F9AE - ldrh r0, [r5, #8] - add r0, r1, r0 - pop {r4, r5, r6, pc} -_0223F9AE: - ldrh r0, [r5, #0xa] - add r0, r1, r0 - pop {r4, r5, r6, pc} -_0223F9B4: - cmp r4, #0 - beq _0223F9BE - ldrh r0, [r5, #4] - add r0, r1, r0 - pop {r4, r5, r6, pc} -_0223F9BE: - ldrh r0, [r5, #6] - add r0, r1, r0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223F9C4: .word 0x02257740 - thumb_func_end ov23_0223F970 - - thumb_func_start ov23_0223F9C8 -ov23_0223F9C8: ; 0x0223F9C8 - push {r4, r5, r6, lr} - mov r4, #0 - ldr r5, _0223F9EC ; =0x02256EB0 - add r6, r4, #0 -_0223F9D0: - ldrb r0, [r5, #0xe] - cmp r0, #0x3c - beq _0223F9E6 - add r0, r5, #0 - bl ov23_0223F970 - add r6, r6, #1 - add r4, r4, r0 - add r5, #0x14 - cmp r6, #0x55 - blo _0223F9D0 -_0223F9E6: - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_0223F9EC: .word 0x02256EB0 - thumb_func_end ov23_0223F9C8 - - thumb_func_start ov23_0223F9F0 -ov23_0223F9F0: ; 0x0223F9F0 - push {r4, r5, r6, lr} - ldr r5, _0223FA1C ; =0x02256EB0 - add r6, r0, #0 - mov r4, #0 -_0223F9F8: - ldrb r0, [r5, #0xe] - cmp r0, #0x3c - beq _0223FA14 - add r0, r5, #0 - bl ov23_0223F970 - sub r6, r6, r0 - bpl _0223FA0C - add r0, r4, #0 - pop {r4, r5, r6, pc} -_0223FA0C: - add r4, r4, #1 - add r5, #0x14 - cmp r4, #0x55 - blo _0223F9F8 -_0223FA14: - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223FA1C: .word 0x02256EB0 - thumb_func_end ov23_0223F9F0 - - thumb_func_start ov23_0223FA20 -ov23_0223FA20: ; 0x0223FA20 - mov r0, #0 - ldr r3, _0223FA38 ; =0x02256EB0 - add r2, r0, #0 -_0223FA26: - ldrb r1, [r3, #0xe] - cmp r1, #0x3c - blo _0223FA2E - add r0, r0, #1 -_0223FA2E: - add r2, r2, #1 - add r3, #0x14 - cmp r2, #0x55 - blo _0223FA26 - bx lr - ; .align 2, 0 -_0223FA38: .word 0x02256EB0 - thumb_func_end ov23_0223FA20 - - thumb_func_start ov23_0223FA3C -ov23_0223FA3C: ; 0x0223FA3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - str r0, [sp] - ldr r0, _0223FC94 ; =0x02257740 - str r1, [sp, #4] - ldr r0, [r0, #0] - str r2, [sp, #8] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298B0 - str r0, [sp, #0x38] - bl ov23_0223F9C8 - str r0, [sp, #0x1c] - bl ov23_0223FA20 - str r0, [sp, #0x28] - ldr r0, _0223FC94 ; =0x02257740 - ldr r4, [r0, #0] - add r5, r4, #0 - add r5, #8 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r4, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - ldr r2, [r5, #0x10] - ldr r3, [r5, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r4, #8] - str r3, [r5, #4] - add r0, r3, #0 - mov r1, #0 - mov r2, #3 - mov r3, #0 - bl sub_020E1F1C - ldr r0, [sp, #8] - add r1, r1, #2 - str r1, [r0, #0xc] - ldr r0, [sp, #0x38] - bl sub_0202920C - cmp r0, #0 - beq _0223FAA4 - ldr r0, [sp, #8] - mov r1, #3 - str r1, [r0, #0xc] -_0223FAA4: - ldr r0, [sp, #8] - mov r4, #0 - ldr r0, [r0, #0xc] - cmp r0, #0 - ble _0223FBAE - add r7, sp, #0x48 - str r4, [sp, #0x20] -_0223FAB2: - ldr r0, _0223FC94 ; =0x02257740 - ldr r6, [r0, #0] - add r5, r6, #0 - add r5, #8 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r6, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [r5, #0x10] - ldr r1, [r5, #0x14] - add r0, r0, r2 - str r0, [r6, #8] - adc r1, r3 - ldr r0, [sp, #0x1c] - str r1, [r5, #4] - cmp r0, #0 - bne _0223FAE0 - ldr r1, [r5, #4] - b _0223FAEC -_0223FAE0: - ldr r0, [r5, #4] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - mov r1, #0 - bl sub_020E1F1C -_0223FAEC: - add r0, r1, #0 - bl ov23_0223F9F0 - mov r1, #0x14 - str r0, [sp, #0x30] - mul r1, r0 - ldr r0, _0223FC98 ; =0x02256EB0 - add r0, r0, r1 - ldrb r5, [r0, #0xe] - ldr r0, [sp, #0x38] - add r1, r5, #0 - bl sub_02029274 - cmp r0, #0 - beq _0223FBA6 - cmp r5, #0x2c - blt _0223FB36 - cmp r5, #0x3b - bgt _0223FB36 - mov r3, #0 - add r2, r3, #0 - str r5, [r7, #0] - cmp r4, #0 - ble _0223FB30 - add r6, sp, #0x48 - mov r0, #1 -_0223FB20: - ldr r1, [r6, #0] - cmp r5, r1 - bne _0223FB28 - add r3, r0, #0 -_0223FB28: - add r2, r2, #1 - add r6, r6, #4 - cmp r2, r4 - blt _0223FB20 -_0223FB30: - cmp r3, #0 - bne _0223FBA6 - b _0223FB3A -_0223FB36: - mov r0, #0x1c - str r0, [r7, #0] -_0223FB3A: - ldr r0, _0223FC94 ; =0x02257740 - ldr r5, [r0, #0] - add r6, r5, #0 - add r6, #8 - ldr r0, [r6, #8] - ldr r1, [r6, #0xc] - ldr r2, [r5, #8] - ldr r3, [r6, #4] - bl sub_020E1F1C - add r3, r0, #0 - ldr r0, [r6, #0x10] - ldr r2, [r6, #0x14] - add r0, r0, r3 - adc r2, r1 - str r0, [r5, #8] - str r2, [r6, #4] - add r0, r2, #0 - mov r1, #0 - mov r2, #0xd - mov r3, #0 - bl sub_020E1F1C - add r6, r5, #0 - add r6, #8 - str r1, [sp, #0x18] - ldr r0, [r6, #8] - ldr r1, [r6, #0xc] - ldr r2, [r5, #8] - ldr r3, [r6, #4] - bl sub_020E1F1C - add r3, r0, #0 - ldr r0, [r6, #0x10] - ldr r2, [r6, #0x14] - add r0, r0, r3 - adc r2, r1 - str r0, [r5, #8] - str r2, [r6, #4] - add r0, r2, #0 - mov r1, #0 - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - add r2, r1, #0 - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x18] - bl ov23_0223F838 - cmp r0, #0 - beq _0223FBA6 - add r7, r7, #4 - add r4, r4, #1 -_0223FBA6: - ldr r0, [sp, #8] - ldr r0, [r0, #0xc] - cmp r4, r0 - blt _0223FAB2 -_0223FBAE: - ldr r0, [sp, #0x38] - bl sub_0202920C - cmp r0, #0 - bne _0223FC82 - mov r0, #0 - str r0, [sp, #0x34] - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - mov r1, #0x55 - sub r0, r1, r0 - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] -_0223FBCE: - ldr r0, _0223FC94 ; =0x02257740 - ldr r6, [r0, #0] - add r5, r6, #0 - add r5, #8 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r6, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - ldr r2, [r5, #0x10] - ldr r3, [r5, #0x14] - add r0, r2, r0 - str r0, [r6, #8] - adc r3, r1 - ldr r0, [sp, #0x28] - str r3, [r5, #4] - cmp r0, #0 - ldr r0, [r5, #4] - bne _0223FBFA - str r0, [sp, #0x10] - b _0223FC06 -_0223FBFA: - ldr r1, [sp, #0x3c] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x2c] - bl sub_020E1F1C - str r1, [sp, #0x10] -_0223FC06: - ldr r0, _0223FC94 ; =0x02257740 - ldr r5, [r0, #0] - add r6, r5, #0 - add r6, #8 - ldr r0, [r6, #8] - ldr r1, [r6, #0xc] - ldr r2, [r5, #8] - ldr r3, [r6, #4] - bl sub_020E1F1C - ldr r2, [r6, #0x10] - ldr r3, [r6, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r5, #8] - ldr r1, [sp, #0x40] - str r3, [r6, #4] - add r0, r3, #0 - mov r2, #0xd - mov r3, #0 - bl sub_020E1F1C - add r6, r5, #0 - add r6, #8 - add r7, r1, #0 - ldr r0, [r6, #8] - ldr r1, [r6, #0xc] - ldr r2, [r5, #8] - ldr r3, [r6, #4] - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [r6, #0x10] - ldr r1, [r6, #0x14] - add r0, r0, r2 - adc r1, r3 - str r0, [r5, #8] - str r1, [r6, #4] - add r0, r1, #0 - ldr r1, [sp, #0x44] - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - add r2, r1, #0 - ldr r1, [sp, #0x10] - ldr r0, [sp, #0x24] - add r0, r1, r0 - add r1, r7, #0 - bl ov23_0223F838 - cmp r0, #0 - beq _0223FC74 - add r4, r4, #1 -_0223FC74: - cmp r4, #0xc - bgt _0223FC82 - ldr r0, [sp, #0x34] - add r0, r0, #1 - str r0, [sp, #0x34] - cmp r0, #0x64 - blt _0223FBCE -_0223FC82: - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov23_0223FF60 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FC94: .word 0x02257740 -_0223FC98: .word 0x02256EB0 - thumb_func_end ov23_0223FA3C - - thumb_func_start ov23_0223FC9C -ov23_0223FC9C: ; 0x0223FC9C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r4, r0, #0 - ldr r0, _0223FDDC ; =0x02257740 - str r1, [sp, #0x10] - ldr r1, [r0, #0] - mov r0, #0x81 - lsl r0, r0, #4 - add r5, r1, r0 - mov r0, #0xc - add r6, r4, #0 - mul r6, r0 - add r0, r5, r6 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x10] - mov r1, #1 - str r2, [sp, #0x14] - str r3, [sp, #0x18] - bl sub_02019FE4 - str r0, [sp, #0x38] - ldr r0, [sp, #0x3c] - ldr r1, [r5, r6] - ldrb r0, [r0, #5] - add r6, r4, #0 - lsl r7, r0, #1 - ldr r0, [sp, #0x3c] - ldrb r0, [r0, #6] - lsl r0, r0, #1 - str r0, [sp, #0x34] - ldrb r0, [r1, #0xc] - ldrb r1, [r1, #0xd] - add r0, r7, r0 - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - add r0, r0, r1 - str r0, [sp, #0x2c] - mov r0, #0x37 - mov r1, #0x1d - bl sub_02006C24 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - ldr r0, [r0, #0xc] - cmp r4, r0 - blt _0223FCFA - mov r6, #4 -_0223FCFA: - cmp r4, r0 - blt _0223FD1A - mov r0, #0x20 - str r0, [sp] - mov r0, #0x1d - str r0, [sp, #4] - ldr r1, [sp, #0x3c] - add r3, r6, #3 - ldr r1, [r1, #0] - ldr r0, [sp, #0x20] - ldrh r1, [r1, #0x12] - mov r2, #0 - lsl r3, r3, #5 - bl sub_02007130 - b _0223FD4E -_0223FD1A: - ldr r1, [sp, #0x3c] - ldr r5, [sp, #0x18] - ldr r1, [r1, #0] - lsl r4, r4, #2 - ldrh r1, [r1, #0x12] - add r5, #0x28 - ldr r0, [sp, #0x20] - add r2, r5, r4 - mov r3, #0x1d - bl sub_020071EC - ldr r1, [sp, #0x18] - add r1, r1, r4 - str r0, [r1, #0x18] - ldr r0, [r5, r4] - mov r1, #0x20 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [r5, r4] - add r1, r6, #3 - ldr r0, [r0, #0xc] - lsl r1, r1, #5 - mov r2, #0x20 - bl sub_020C00B4 -_0223FD4E: - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x3c] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x1d - str r0, [sp, #0xc] - ldr r1, [r1, #0] - ldr r0, [sp, #0x20] - ldrh r1, [r1, #0x10] - ldr r2, [sp, #0x10] - mov r3, #1 - bl sub_020070E8 - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - bl sub_02006CA8 - ldr r0, [sp, #0x34] - str r0, [sp, #0x28] - add r1, r0, #0 - ldr r0, [sp, #0x2c] - cmp r1, r0 - bge _0223FDD6 - add r0, r6, #3 - lsl r1, r0, #0xc - ldr r0, [sp, #0x14] - add r6, r0, r1 - lsl r0, r7, #1 - str r0, [sp, #0x40] -_0223FD8C: - ldr r0, [sp, #0x30] - add r4, r7, #0 - cmp r7, r0 - bge _0223FDCA - ldr r0, [sp, #0x28] - add r0, r0, #4 - lsl r1, r0, #6 - ldr r0, [sp, #0x38] - add r1, r0, r1 - ldr r0, [sp, #0x40] - add r5, r1, r0 - ldr r1, [sp, #0x28] - ldr r0, [sp, #0x34] - sub r0, r1, r0 - str r0, [sp, #0x1c] -_0223FDAA: - ldr r0, [sp, #0x3c] - ldr r2, [sp, #0x1c] - ldr r0, [r0, #0] - sub r1, r4, r7 - add r6, r6, #1 - bl ov23_0223F804 - cmp r0, #0 - beq _0223FDC0 - sub r0, r6, #1 - strh r0, [r5] -_0223FDC0: - ldr r0, [sp, #0x30] - add r4, r4, #1 - add r5, r5, #2 - cmp r4, r0 - blt _0223FDAA -_0223FDCA: - ldr r0, [sp, #0x28] - add r1, r0, #1 - ldr r0, [sp, #0x2c] - str r1, [sp, #0x28] - cmp r1, r0 - blt _0223FD8C -_0223FDD6: - ldr r0, [sp, #0x24] - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FDDC: .word 0x02257740 - thumb_func_end ov23_0223FC9C - - thumb_func_start ov23_0223FDE0 -ov23_0223FDE0: ; 0x0223FDE0 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [sp] - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - str r0, [sp, #0x10] -_0223FDF2: - ldr r0, [sp, #0x14] - ldr r0, [r0, #0x38] - cmp r0, #1 - bne _0223FEE6 - ldr r0, _0223FF4C ; =0x000006A7 - bl sub_02005748 - mov r0, #0 - mov r4, #0 - str r4, [sp, #0x18] - str r0, [sp, #0x20] - str r0, [sp, #0x24] -_0223FE0A: - ldr r0, _0223FF50 ; =0x02257740 - ldr r6, [r0, #0] - ldr r0, [sp, #0x10] - add r5, r6, #0 - add r1, r0, r6 - mov r0, #0x81 - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r5, #8 - ldrb r0, [r0, #0xc] - str r1, [sp, #0xc] - ldr r1, [r5, #0xc] - lsl r7, r0, #3 - ldr r0, [r5, #8] - ldr r2, [r6, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - add r3, r0, #0 - add r2, r1, #0 - ldr r0, [r5, #0x10] - ldr r1, [r5, #0x14] - add r0, r0, r3 - adc r1, r2 - str r0, [r6, #8] - str r1, [r5, #4] - cmp r7, #0 - ldr r0, [r5, #4] - bne _0223FE48 - str r0, [sp, #8] - b _0223FE54 -_0223FE48: - ldr r1, [sp, #0x20] - add r2, r7, #0 - mov r3, #0 - bl sub_020E1F1C - str r1, [sp, #8] -_0223FE54: - mov r0, #0x81 - ldr r1, [sp, #0xc] - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r5, r6, #0 - ldrb r0, [r0, #0xd] - add r5, #8 - ldr r1, [r5, #0xc] - lsl r7, r0, #3 - ldr r0, [r5, #8] - ldr r2, [r6, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - add r3, r0, #0 - add r2, r1, #0 - ldr r0, [r5, #0x10] - ldr r1, [r5, #0x14] - add r0, r0, r3 - adc r1, r2 - str r0, [r6, #8] - str r1, [r5, #4] - cmp r7, #0 - bne _0223FE88 - ldr r1, [r5, #4] - b _0223FE94 -_0223FE88: - ldr r0, [r5, #4] - ldr r1, [sp, #0x24] - add r2, r7, #0 - mov r3, #0 - bl sub_020E1F1C -_0223FE94: - ldr r0, _0223FF50 ; =0x02257740 - ldr r3, [sp, #0xc] - ldr r2, [r0, #0] - ldr r0, _0223FF54 ; =0x00000815 - ldr r5, [sp, #0xc] - ldrb r0, [r3, r0] - lsl r3, r0, #4 - ldr r0, [sp, #8] - add r0, r0, r3 - ldr r3, _0223FF58 ; =0x00000816 - lsl r0, r0, #0xc - ldrb r3, [r5, r3] - lsl r3, r3, #4 - str r0, [sp, #0x28] - add r0, r1, r3 - add r0, #0x20 - lsl r0, r0, #0xc - str r0, [sp, #0x2c] - mov r0, #0x7f - add r1, r2, r4 - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, [sp, #0x18] - add r1, #8 - bl sub_02021D6C - ldr r0, _0223FF50 ; =0x02257740 - ldr r0, [r0, #0] - add r1, r0, r4 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x28 - bl sub_02021C50 - ldr r0, [sp, #0x18] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #3 - blt _0223FE0A -_0223FEE6: - ldr r0, [sp, #0x14] - add r0, r0, #4 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - add r0, #0xc - str r0, [sp, #0x10] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #4 - bge _0223FEFE - b _0223FDF2 -_0223FEFE: - mov r5, #0 - ldr r4, _0223FF5C ; =0x02257570 - mov r7, #0x20 - add r6, r5, #0 -_0223FF06: - ldr r0, [sp] - ldr r0, [r0, #0x38] - cmp r0, #0 - beq _0223FF3C - ldr r1, [sp] - ldr r1, [r1, #0x28] - ldr r3, [r1, #0xc] - add r1, r4, r0 - sub r1, r1, #1 - ldrb r2, [r1] - cmp r2, #0xff - bne _0223FF24 - ldr r0, [sp] - str r6, [r0, #0x38] - b _0223FF3C -_0223FF24: - add r1, r0, #1 - ldr r0, [sp] - cmp r2, #0xfe - str r1, [r0, #0x38] - beq _0223FF3C - lsl r0, r2, #1 - add r1, r5, #3 - add r0, r3, r0 - lsl r1, r1, #5 - add r2, r7, #0 - bl sub_020C00B4 -_0223FF3C: - ldr r0, [sp] - add r5, r5, #1 - add r0, r0, #4 - str r0, [sp] - cmp r5, #4 - blt _0223FF06 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FF4C: .word 0x000006A7 -_0223FF50: .word 0x02257740 -_0223FF54: .word 0x00000815 -_0223FF58: .word 0x00000816 -_0223FF5C: .word 0x02257570 - thumb_func_end ov23_0223FDE0 - - thumb_func_start ov23_0223FF60 -ov23_0223FF60: ; 0x0223FF60 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r4, #0 - str r3, [sp] - ldr r5, _0223FF88 ; =0x00000269 - cmp r6, #0 - ble _0223FF86 -_0223FF70: - ldr r3, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov23_0223FC9C - lsr r0, r0, #5 - add r4, r4, #1 - add r5, r5, r0 - cmp r4, r6 - blt _0223FF70 -_0223FF86: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FF88: .word 0x00000269 - thumb_func_end ov23_0223FF60 - - thumb_func_start ov23_0223FF8C -ov23_0223FF8C: ; 0x0223FF8C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - mov r0, #0 - str r0, [sp, #0xc] -_0223FF94: - ldr r0, _022401A0 ; =0x02257740 - ldr r4, [r0, #0] - add r5, r4, #0 - add r5, #8 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r4, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - ldr r2, [r5, #0x10] - ldr r3, [r5, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r4, #8] - str r3, [r5, #4] - add r0, r3, #0 - mov r1, #0 - mov r2, #0x15 - mov r3, #0 - bl sub_020E1F1C - add r5, r4, #0 - add r5, #8 - str r1, [sp, #0x20] - sub r1, #8 - str r1, [sp, #0x20] - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r4, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - ldr r2, [r5, #0x10] - ldr r3, [r5, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r4, #8] - str r3, [r5, #4] - add r0, r3, #0 - mov r1, #0 - mov r2, #0x12 - mov r3, #0 - bl sub_020E1F1C - sub r5, r1, #5 - add r0, r5, #0 - str r0, [sp, #0x14] - add r0, #8 - add r1, r5, #0 - str r5, [sp, #0x10] - str r0, [sp, #0x14] - cmp r1, r0 - bge _02240054 - add r0, r5, #0 - ldr r3, [sp, #0x20] - mov r1, #0xd - add r6, r0, #0 - mul r6, r1 - add r3, #8 -_0224000C: - cmp r5, #0xa - bge _0224004A - cmp r5, #0 - blt _0224004A - ldr r4, [sp, #0x20] - add r0, r4, #0 - cmp r0, r3 - bge _0224004A - ldr r0, [sp, #0x10] - sub r0, r5, r0 - lsl r1, r0, #3 - ldr r0, _022401A4 ; =0x02256E70 - add r7, r0, r1 -_02240026: - cmp r4, #0xd - bge _02240044 - cmp r4, #0 - blt _02240044 - ldr r0, [sp, #0x20] - sub r0, r4, r0 - ldrb r2, [r7, r0] - cmp r2, #0 - beq _02240044 - ldr r0, _022401A0 ; =0x02257740 - ldr r0, [r0, #0] - add r0, r6, r0 - add r1, r4, r0 - ldr r0, _022401A8 ; =0x0000095E - strb r2, [r1, r0] -_02240044: - add r4, r4, #1 - cmp r4, r3 - blt _02240026 -_0224004A: - ldr r0, [sp, #0x14] - add r5, r5, #1 - add r6, #0xd - cmp r5, r0 - blt _0224000C -_02240054: - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #0xa - blt _0223FF94 - mov r0, #0 - str r0, [sp, #4] -_02240062: - ldr r0, _022401A0 ; =0x02257740 - ldr r5, [r0, #0] - add r4, r5, #0 - add r4, #8 - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - ldr r2, [r5, #8] - ldr r3, [r4, #4] - bl sub_020E1F1C - ldr r2, [r4, #0x10] - ldr r3, [r4, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r5, #8] - str r3, [r4, #4] - add r0, r3, #0 - mov r1, #0 - mov r2, #0x12 - mov r3, #0 - bl sub_020E1F1C - add r6, r5, #0 - add r6, #8 - sub r4, r1, #5 - ldr r0, [r6, #8] - ldr r1, [r6, #0xc] - ldr r2, [r5, #8] - ldr r3, [r6, #4] - bl sub_020E1F1C - ldr r2, [r6, #0x10] - ldr r3, [r6, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r5, #8] - str r3, [r6, #4] - add r0, r3, #0 - mov r1, #0 - mov r2, #0xf - mov r3, #0 - bl sub_020E1F1C - sub r0, r1, #5 - str r0, [sp] - ldr r3, [sp] - mov r0, #1 - str r0, [sp, #8] - add r0, r3, #0 - add r0, r0, #5 - add r1, r3, #0 - str r0, [sp, #0x18] - cmp r1, r0 - bge _02240126 - mov r1, #0xd - add r0, r3, #0 - mul r1, r0 - ldr r7, _022401A8 ; =0x0000095E - add r1, r5, r1 - add r0, r4, #5 -_022400DA: - cmp r3, #0xa - bge _0224011C - cmp r3, #0 - blt _0224011C - add r5, r4, #0 - cmp r4, r0 - bge _02240116 - ldr r2, [sp] - sub r2, r3, r2 - lsl r6, r2, #3 - ldr r2, _022401A4 ; =0x02256E70 - add r2, r2, r6 -_022400F2: - cmp r5, #0xd - bge _02240110 - cmp r5, #0 - blt _02240110 - sub r6, r5, r4 - ldrb r6, [r2, r6] - cmp r6, #0 - beq _02240110 - add r6, r1, r5 - ldrb r6, [r6, r7] - cmp r6, #4 - bhs _02240110 - mov r2, #0 - str r2, [sp, #8] - b _02240116 -_02240110: - add r5, r5, #1 - cmp r5, r0 - blt _022400F2 -_02240116: - ldr r2, [sp, #8] - cmp r2, #0 - beq _02240126 -_0224011C: - ldr r2, [sp, #0x18] - add r3, r3, #1 - add r1, #0xd - cmp r3, r2 - blt _022400DA -_02240126: - ldr r0, [sp, #8] - cmp r0, #0 - beq _02240190 - ldr r0, [sp] - ldr r1, [sp] - str r0, [sp, #0x1c] - add r0, r0, #5 - mov ip, r0 - cmp r1, r0 - bge _02240190 - ldr r0, [sp] - mov r1, #0xd - add r3, r0, #0 - mul r3, r1 - add r6, r4, #5 -_02240144: - ldr r0, [sp, #0x1c] - cmp r0, #0xa - bge _02240182 - cmp r0, #0 - blt _02240182 - add r5, r4, #0 - cmp r4, r6 - bge _02240182 - ldr r1, [sp] - sub r1, r0, r1 - lsl r0, r1, #2 - add r1, r1, r0 - ldr r0, _022401AC ; =0x02256E3A - add r7, r0, r1 -_02240160: - cmp r5, #0xd - bge _0224017C - cmp r5, #0 - blt _0224017C - sub r0, r5, r4 - ldrb r2, [r7, r0] - cmp r2, #0 - beq _0224017C - ldr r0, _022401A0 ; =0x02257740 - ldr r0, [r0, #0] - add r0, r3, r0 - add r1, r5, r0 - ldr r0, _022401A8 ; =0x0000095E - strb r2, [r1, r0] -_0224017C: - add r5, r5, #1 - cmp r5, r6 - blt _02240160 -_02240182: - ldr r0, [sp, #0x1c] - mov r1, ip - add r0, r0, #1 - add r3, #0xd - str r0, [sp, #0x1c] - cmp r0, r1 - blt _02240144 -_02240190: - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #0xf - bge _0224019C - b _02240062 -_0224019C: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022401A0: .word 0x02257740 -_022401A4: .word 0x02256E70 -_022401A8: .word 0x0000095E -_022401AC: .word 0x02256E3A - thumb_func_end ov23_0223FF8C - - thumb_func_start ov23_022401B0 -ov23_022401B0: ; 0x022401B0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r1, #2 - str r0, [sp] - bl sub_02019FE4 - str r0, [sp, #8] - mov r2, #0 - mov r0, #4 - mov ip, r2 - str r0, [sp, #4] -_022401C6: - ldr r0, [sp, #4] - mov r6, #0 - lsl r3, r0, #5 -_022401CC: - ldr r0, _02240234 ; =0x02257740 - lsl r7, r3, #1 - ldr r0, [r0, #0] - ldr r4, _02240238 ; =0x00002001 - add r0, r2, r0 - add r1, r6, r0 - ldr r0, _0224023C ; =0x0000095E - add r6, r6, #1 - ldrb r0, [r1, r0] - add r3, r3, #2 - lsl r1, r0, #2 - ldr r0, _02240240 ; =0x02256E54 - ldr r1, [r0, r1] - ldr r0, [sp, #8] - ldrb r5, [r1] - add r0, r0, r7 - add r5, r5, r4 - ldr r4, [sp, #8] - strh r5, [r4, r7] - ldrb r5, [r1, #1] - ldr r4, _02240238 ; =0x00002001 - add r4, r5, r4 - strh r4, [r0, #2] - ldrb r5, [r1, #2] - ldr r4, _02240238 ; =0x00002001 - add r5, r5, r4 - add r4, r0, #0 - add r4, #0x40 - strh r5, [r4] - ldrb r4, [r1, #3] - ldr r1, _02240238 ; =0x00002001 - add r0, #0x42 - add r1, r4, r1 - strh r1, [r0] - cmp r6, #0xd - blt _022401CC - ldr r0, [sp, #4] - add r2, #0xd - add r0, r0, #2 - str r0, [sp, #4] - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #0xa - blt _022401C6 - ldr r0, [sp] - mov r1, #2 - bl sub_02019448 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02240234: .word 0x02257740 -_02240238: .word 0x00002001 -_0224023C: .word 0x0000095E -_02240240: .word 0x02256E54 - thumb_func_end ov23_022401B0 - - thumb_func_start ov23_02240244 -ov23_02240244: ; 0x02240244 - ldr r2, _02240278 ; =0x02257740 - mov r3, #0xd - ldr r2, [r2, #0] - mul r3, r1 - add r1, r2, r3 - add r0, r1, r0 - ldr r1, _0224027C ; =0x000008DC - ldrb r0, [r0, r1] - cmp r0, #0 - bne _0224025C - mov r0, #0 - bx lr -_0224025C: - sub r3, r0, #1 - mov r0, #0xc - mul r0, r3 - add r0, r2, r0 - sub r1, #0xc8 - ldrb r0, [r0, r1] - cmp r0, #0 - beq _02240274 - cmp r0, #0x3c - bge _02240274 - mov r0, #1 - bx lr -_02240274: - mov r0, #0 - bx lr - ; .align 2, 0 -_02240278: .word 0x02257740 -_0224027C: .word 0x000008DC - thumb_func_end ov23_02240244 - - thumb_func_start ov23_02240280 -ov23_02240280: ; 0x02240280 - ldr r2, _022402B0 ; =0x02257740 - mov r3, #0xd - ldr r2, [r2, #0] - mul r3, r1 - add r1, r2, r3 - add r0, r1, r0 - ldr r1, _022402B4 ; =0x000008DC - ldrb r0, [r0, r1] - cmp r0, #0 - bne _02240298 - mov r0, #0 - bx lr -_02240298: - sub r3, r0, #1 - mov r0, #0xc - mul r0, r3 - add r0, r2, r0 - sub r1, #0xc8 - ldrb r0, [r0, r1] - cmp r0, #0x3c - blo _022402AC - mov r0, #1 - bx lr -_022402AC: - mov r0, #0 - bx lr - ; .align 2, 0 -_022402B0: .word 0x02257740 -_022402B4: .word 0x000008DC - thumb_func_end ov23_02240280 - - thumb_func_start ov23_022402B8 -ov23_022402B8: ; 0x022402B8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r2, [sp, #4] - asr r2, r0, #3 - lsr r2, r2, #0x1c - add r2, r0, r2 - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - mov r5, #0 - sub r0, r0, #2 - asr r7, r2, #4 - add r6, r5, #0 - str r3, [sp, #8] - str r0, [sp, #0xc] - cmp r7, #0 - blt _022402E8 - cmp r7, #0xd - bge _022402E8 - cmp r0, #0 - blt _022402E8 - cmp r0, #0xa - blt _022402EA -_022402E8: - b _02240436 -_022402EA: - add r4, r0, #0 - mov r1, #0xd - ldr r0, _0224043C ; =0x02257740 - mul r4, r1 - ldr r1, [r0, #0] - ldr r0, _02240440 ; =0x0000095E - add r0, r1, r0 - add r1, r0, r4 - ldrb r0, [r1, r7] - cmp r0, #0 - beq _02240304 - sub r0, r0, #1 - strb r0, [r1, r7] -_02240304: - ldr r0, _0224043C ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02240440 ; =0x0000095E - add r0, r1, r0 - add r1, r0, r4 - ldrb r0, [r1, r7] - cmp r0, #0 - beq _02240318 - sub r0, r0, #1 - strb r0, [r1, r7] -_02240318: - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov23_02240280 - cmp r0, #0 - beq _02240336 - ldr r0, _0224043C ; =0x02257740 - ldr r0, [r0, #0] - add r0, r0, r4 - add r1, r0, r7 - ldr r0, _02240440 ; =0x0000095E - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02240336 - mov r5, #1 -_02240336: - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov23_02240244 - cmp r0, #0 - beq _0224035A - ldr r0, _0224043C ; =0x02257740 - ldr r0, [r0, #0] - add r0, r0, r4 - add r1, r0, r7 - ldr r0, _02240440 ; =0x0000095E - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224035A - ldr r0, [sp, #8] - mov r1, #0xf - mov r6, #1 - str r1, [r0, #0x14] -_0224035A: - ldr r1, [sp, #0xc] - ldr r2, [sp, #4] - add r1, r1, #2 - lsl r0, r7, #4 - lsl r1, r1, #4 - add r3, r5, #0 - str r6, [sp] - bl ov23_0223ED68 - cmp r5, #0 - bne _02240436 - ldr r0, [sp, #4] - cmp r0, #0 - bne _022403C2 - ldr r4, _02240444 ; =0x02257554 - ldr r5, _02240448 ; =0x02256BE0 - mov r3, #0 -_0224037C: - mov r0, #0 - ldrsb r1, [r4, r0] - ldr r0, [sp, #0xc] - add r2, r0, r1 - mov r0, #0 - ldrsb r0, [r5, r0] - add r1, r7, r0 - cmp r2, #0 - blt _022403B8 - cmp r2, #0xa - bge _022403B8 - cmp r1, #0 - blt _022403B8 - cmp r1, #0xd - bge _022403B8 - ldr r0, _0224043C ; =0x02257740 - mov r6, #0xd - ldr r0, [r0, #0] - mul r6, r2 - add r0, r0, r6 - add r0, r0, r1 - ldr r1, _02240440 ; =0x0000095E - ldrb r1, [r0, r1] - cmp r1, #0 - beq _022403B8 - ldr r1, _02240440 ; =0x0000095E - ldrb r1, [r0, r1] - sub r2, r1, #1 - ldr r1, _02240440 ; =0x0000095E - strb r2, [r0, r1] -_022403B8: - add r3, r3, #1 - add r4, r4, #1 - add r5, r5, #1 - cmp r3, #4 - blt _0224037C -_022403C2: - mov r0, #0 - ldr r2, _0224044C ; =0x0225756C - ldr r3, _02240450 ; =0x02257558 - mov ip, r0 -_022403CA: - mov r0, #0 - ldrsb r1, [r2, r0] - ldr r0, [sp, #0xc] - add r0, r0, r1 - mov r1, #0 - ldrsb r1, [r3, r1] - add r5, r7, r1 - cmp r0, #0 - blt _02240428 - cmp r0, #0xa - bge _02240428 - cmp r5, #0 - blt _02240428 - cmp r5, #0xd - bge _02240428 - add r4, r0, #0 - ldr r0, _0224043C ; =0x02257740 - mov r1, #0xd - ldr r0, [r0, #0] - mul r4, r1 - add r0, r0, r4 - add r6, r0, r5 - ldr r0, _02240440 ; =0x0000095E - ldrb r0, [r6, r0] - cmp r0, #0 - beq _02240408 - ldr r0, _02240440 ; =0x0000095E - ldrb r0, [r6, r0] - sub r1, r0, #1 - ldr r0, _02240440 ; =0x0000095E - strb r1, [r6, r0] -_02240408: - ldr r0, [sp, #4] - cmp r0, #0 - bne _02240428 - ldr r0, _0224043C ; =0x02257740 - ldr r1, _02240440 ; =0x0000095E - ldr r0, [r0, #0] - add r0, r0, r4 - add r0, r0, r5 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _02240428 - ldr r1, _02240440 ; =0x0000095E - ldrb r1, [r0, r1] - sub r4, r1, #1 - ldr r1, _02240440 ; =0x0000095E - strb r4, [r0, r1] -_02240428: - mov r0, ip - add r0, r0, #1 - add r2, r2, #1 - add r3, r3, #1 - mov ip, r0 - cmp r0, #4 - blt _022403CA -_02240436: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224043C: .word 0x02257740 -_02240440: .word 0x0000095E -_02240444: .word 0x02257554 -_02240448: .word 0x02256BE0 -_0224044C: .word 0x0225756C -_02240450: .word 0x02257558 - thumb_func_end ov23_022402B8 - - thumb_func_start ov23_02240454 -ov23_02240454: ; 0x02240454 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - ldrb r1, [r6, #1] - str r2, [sp] - ldrb r2, [r6, #3] - mov ip, r1 - mov r1, #0 - mov lr, r1 - mov r1, ip - str r3, [sp, #4] - cmp r1, r2 - bge _022404C2 - mov r1, ip - cmp r1, r2 - bge _022404C2 - mov r1, lr - str r1, [sp, #8] - mov r1, ip - mov r7, #0x3f - lsl r5, r1, #5 - lsl r7, r7, #0xa -_02240480: - ldr r2, [sp] - ldr r1, [sp, #8] - add r3, r2, r1 - ldrb r2, [r6] - ldrb r1, [r6, #2] - cmp r2, r1 - bge _022404A4 -_0224048E: - add r1, r2, r5 - lsl r1, r1, #1 - ldrh r4, [r0, r1] - add r2, r2, #1 - and r4, r7 - add r4, r3, r4 - strh r4, [r0, r1] - ldrb r1, [r6, #2] - add r3, r3, #1 - cmp r2, r1 - blt _0224048E -_022404A4: - mov r1, ip - add r1, r1, #1 - mov ip, r1 - ldr r2, [sp, #8] - ldr r1, [sp, #4] - add r5, #0x20 - add r1, r2, r1 - str r1, [sp, #8] - mov r1, lr - add r1, r1, #1 - mov lr, r1 - ldrb r2, [r6, #3] - mov r1, ip - cmp r1, r2 - blt _02240480 -_022404C2: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02240454 - - thumb_func_start ov23_022404C8 -ov23_022404C8: ; 0x022404C8 - push {r4, lr} - ldr r3, _022404EC ; =0x02257740 - ldr r2, _022404F0 ; =0x000009E6 - ldr r4, [r3, #0] - mov r1, #1 - strb r1, [r4, r2] - ldr r3, [r3, #0] - sub r2, r2, #2 - strb r1, [r3, r2] - bl sub_02019FE4 - ldr r1, _022404F4 ; =0x02256BF4 - mov r2, #0x30 - mov r3, #0x36 - bl ov23_02240454 - pop {r4, pc} - nop -_022404EC: .word 0x02257740 -_022404F0: .word 0x000009E6 -_022404F4: .word 0x02256BF4 - thumb_func_end ov23_022404C8 - - thumb_func_start ov23_022404F8 -ov23_022404F8: ; 0x022404F8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r3, #0 - add r5, r0, #0 - cmp r4, #2 - blt _02240530 - bne _02240542 - cmp r1, #0xd6 - ble _02240530 - cmp r1, #0xfc - bge _02240530 - cmp r2, #0x2b - ble _02240528 - cmp r2, #0x6e - bge _02240528 - ldr r2, _0224064C ; =0x02257740 - ldr r1, _02240650 ; =0x000009E6 - ldr r3, [r2, #0] - mov r0, #0 - strb r0, [r3, r1] - ldr r2, [r2, #0] - sub r1, r1, #2 - strb r0, [r2, r1] - b _02240542 -_02240528: - cmp r2, #0x72 - ble _02240530 - cmp r2, #0xae - blt _02240532 -_02240530: - b _02240648 -_02240532: - ldr r2, _0224064C ; =0x02257740 - ldr r1, _02240650 ; =0x000009E6 - ldr r3, [r2, #0] - mov r0, #1 - strb r0, [r3, r1] - ldr r2, [r2, #0] - sub r1, r1, #2 - strb r0, [r2, r1] -_02240542: - add r0, r5, #0 - mov r1, #1 - bl sub_02019FE4 - ldr r1, _0224064C ; =0x02257740 - add r6, r0, #0 - ldr r2, [r1, #0] - ldr r1, _02240650 ; =0x000009E6 - ldrb r1, [r2, r1] - cmp r1, #0 - beq _0224055E - cmp r1, #1 - beq _022405D0 - b _02240640 -_0224055E: - cmp r4, #2 - bne _02240580 - ldr r1, _02240654 ; =0x02256BF8 - mov r2, #0x18 - mov r3, #0x36 - bl ov23_02240454 - ldr r1, _02240658 ; =0x02256BF4 - add r0, r6, #0 - mov r2, #0x24 - mov r3, #0x36 - bl ov23_02240454 - ldr r0, _0224065C ; =0x000005DC - bl sub_02005748 - b _0224058E -_02240580: - cmp r4, #3 - bne _0224058E - ldr r1, _02240654 ; =0x02256BF8 - mov r2, #0x1e - mov r3, #0x36 - bl ov23_02240454 -_0224058E: - cmp r4, #2 - bne _02240640 - ldr r0, _0224064C ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #6 - bl sub_02021D6C - ldr r0, _0224064C ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x3a - lsl r0, r0, #0xe - str r0, [sp] - mov r0, #5 - lsl r0, r0, #0x10 - str r0, [sp, #4] - ldr r0, _0224064C ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 - b _02240640 -_022405D0: - cmp r4, #2 - bne _022405F2 - ldr r1, _02240654 ; =0x02256BF8 - mov r2, #0x12 - mov r3, #0x36 - bl ov23_02240454 - ldr r1, _02240658 ; =0x02256BF4 - add r0, r6, #0 - mov r2, #0x2a - mov r3, #0x36 - bl ov23_02240454 - ldr r0, _0224065C ; =0x000005DC - bl sub_02005748 - b _02240600 -_022405F2: - cmp r4, #3 - bne _02240600 - ldr r1, _02240658 ; =0x02256BF4 - mov r2, #0x30 - mov r3, #0x36 - bl ov23_02240454 -_02240600: - cmp r4, #2 - bne _02240640 - ldr r0, _0224064C ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #7 - bl sub_02021D6C - ldr r0, _0224064C ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x3a - lsl r0, r0, #0xe - str r0, [sp] - mov r0, #0x26 - lsl r0, r0, #0xe - str r0, [sp, #4] - ldr r0, _0224064C ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 -_02240640: - add r0, r5, #0 - mov r1, #1 - bl sub_02019448 -_02240648: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224064C: .word 0x02257740 -_02240650: .word 0x000009E6 -_02240654: .word 0x02256BF8 -_02240658: .word 0x02256BF4 -_0224065C: .word 0x000005DC - thumb_func_end ov23_022404F8 - - thumb_func_start ov23_02240660 -ov23_02240660: ; 0x02240660 - ldr r1, _02240680 ; =0x02257740 - ldr r2, [r1, #0] - ldr r1, _02240684 ; =0x000009E7 - ldrb r2, [r2, r1] - asr r1, r2, #1 - lsr r1, r1, #0x1e - add r1, r2, r1 - asr r1, r1, #2 - lsl r1, r1, #2 - add r1, #0x10 - lsl r1, r1, #0xc - str r1, [r0, #0] - mov r1, #1 - lsl r1, r1, #0x10 - str r1, [r0, #4] - bx lr - ; .align 2, 0 -_02240680: .word 0x02257740 -_02240684: .word 0x000009E7 - thumb_func_end ov23_02240660 - - thumb_func_start ov23_02240688 -ov23_02240688: ; 0x02240688 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r1, _02240750 ; =0x02257740 - str r0, [sp] - ldr r2, [r1, #0] - ldr r1, _02240754 ; =0x000009E7 - ldrb r4, [r2, r1] - mov r1, #0 - bl sub_02019FE4 - add r5, r0, #0 - asr r0, r4, #1 - lsr r0, r0, #0x1e - add r0, r4, r0 - asr r0, r0, #2 - lsl r4, r0, #2 - add r0, sp, #4 - bl ov23_02240660 - add r0, r4, #0 - mov r1, #0x18 - bl sub_020E1F6C - ldr r0, _02240750 ; =0x02257740 - ldr r2, [r0, #0] - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r2, r0] - asr r2, r1, #1 - lsr r2, r2, #0x1e - add r2, r1, r2 - asr r2, r2, #2 - mov r1, #6 - sub r1, r1, r2 - bl sub_02021D6C - add r4, #8 - mov r0, #0xd0 - sub r1, r0, r4 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - asr r7, r0, #3 - mov r4, #0 - cmp r7, #0 - ble _02240744 -_022406E4: - mov r0, #0x19 - sub r0, r0, r4 - lsl r6, r0, #1 - add r0, r4, #0 - mov r1, #3 - bl sub_020E1F6C - add r0, r1, #0 - mov r1, #0x3f - ldrh r2, [r5, r6] - lsl r1, r1, #0xa - and r1, r2 - add r1, #0xb - sub r1, r1, r0 - strh r1, [r5, r6] - mov r1, #0x39 - sub r1, r1, r4 - lsl r1, r1, #1 - mov r2, #0x3f - ldrh r3, [r5, r1] - lsl r2, r2, #0xa - and r2, r3 - add r2, #0x41 - sub r2, r2, r0 - strh r2, [r5, r1] - mov r1, #0x59 - sub r1, r1, r4 - lsl r1, r1, #1 - mov r2, #0x3f - ldrh r3, [r5, r1] - lsl r2, r2, #0xa - and r2, r3 - add r2, #0x77 - sub r2, r2, r0 - strh r2, [r5, r1] - mov r1, #0x79 - sub r1, r1, r4 - lsl r1, r1, #1 - mov r2, #0x3f - ldrh r3, [r5, r1] - lsl r2, r2, #0xa - add r4, r4, #1 - and r2, r3 - add r2, #0xad - sub r0, r2, r0 - strh r0, [r5, r1] - cmp r4, r7 - blt _022406E4 -_02240744: - ldr r0, [sp] - mov r1, #0 - bl sub_02019448 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240750: .word 0x02257740 -_02240754: .word 0x000009E7 - thumb_func_end ov23_02240688 - - thumb_func_start ov23_02240758 -ov23_02240758: ; 0x02240758 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r5, #0 - str r0, [sp] - str r5, [sp, #4] -_02240762: - ldr r0, _02240800 ; =0x02257740 - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _02240804 ; =0x000008CC - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _022407E6 - ldr r0, _02240808 ; =0x000008D4 - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _022407E6 - bl sub_0203608C - bl sub_02058CA0 - add r4, r0, #0 - bl sub_0203608C - bl sub_02058CF4 - add r6, r0, #0 - add r0, r5, #0 - bl ov23_0224AD04 - add r7, r0, #0 - add r0, r5, #0 - bl ov23_0224AD40 - add r1, r4, #0 - sub r1, #0xa - cmp r7, r1 - ble _022407E6 - add r4, #0xa - cmp r7, r4 - bge _022407E6 - add r1, r6, #0 - sub r1, #0xa - cmp r0, r1 - ble _022407E6 - add r6, #0xa - cmp r0, r6 - bge _022407E6 - ldr r0, _02240800 ; =0x02257740 - ldr r1, _02240808 ; =0x000008D4 - ldr r0, [r0, #0] - ldr r3, [sp] - add r2, r0, r5 - ldr r0, _02240804 ; =0x000008CC - ldrb r1, [r2, r1] - ldrb r0, [r2, r0] - mov r2, #1 - bl ov23_022402B8 - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02240800 ; =0x02257740 - mov r1, #0xff - ldr r0, [r0, #0] - add r2, r0, r5 - ldr r0, _02240804 ; =0x000008CC - strb r1, [r2, r0] - ldr r0, _02240800 ; =0x02257740 - ldr r0, [r0, #0] - add r2, r0, r5 - ldr r0, _02240808 ; =0x000008D4 - strb r1, [r2, r0] -_022407E6: - add r5, r5, #1 - cmp r5, #8 - blt _02240762 - ldr r0, [sp, #4] - cmp r0, #0 - beq _022407FC - ldr r0, _02240800 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_022401B0 -_022407FC: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240800: .word 0x02257740 -_02240804: .word 0x000008CC -_02240808: .word 0x000008D4 - thumb_func_end ov23_02240758 - - thumb_func_start ov23_0224080C -ov23_0224080C: ; 0x0224080C - push {r4, r5, r6, lr} - add r4, r0, #0 - mov r5, #0 - bl ov23_02241CF4 - cmp r0, #0 - beq _02240894 - cmp r4, #6 - beq _02240828 - cmp r4, #7 - beq _02240828 - sub r0, r4, #1 - cmp r0, #1 - bhi _0224084E -_02240828: - ldr r0, _02240898 ; =0x02257740 - ldr r6, [r0, #0] - add r5, r6, #0 - add r5, #8 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r6, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - ldr r2, [r5, #0x10] - ldr r3, [r5, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r6, #8] - mov r0, #0 - str r3, [r5, #4] - add r5, r0, #1 - b _02240878 -_0224084E: - ldr r0, _02240898 ; =0x02257740 - ldr r6, [r0, #0] - add r5, r6, #0 - add r5, #8 - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r6, #8] - ldr r3, [r5, #4] - bl sub_020E1F1C - ldr r3, [r5, #0x10] - ldr r2, [r5, #0x14] - add r0, r3, r0 - adc r2, r1 - str r0, [r6, #8] - mov r1, #0 - lsr r0, r2, #0x1e - lsl r1, r1, #2 - orr r1, r0 - str r2, [r5, #4] - add r5, r1, #1 -_02240878: - sub r0, r4, #6 - cmp r0, #4 - bhi _02240880 - add r5, #0xa -_02240880: - ldr r0, _0224089C ; =0x000009E7 - mov r1, #0x27 - ldrb r4, [r6, r0] - add r0, r4, #0 - bl sub_020E1F6C - add r5, r5, r0 - cmp r4, #0 - beq _02240894 - add r5, r5, #5 -_02240894: - add r0, r5, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02240898: .word 0x02257740 -_0224089C: .word 0x000009E7 - thumb_func_end ov23_0224080C - - thumb_func_start ov23_022408A0 -ov23_022408A0: ; 0x022408A0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _022408E8 ; =0x02257740 - add r4, r1, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298A0 - ldr r0, _022408E8 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298B0 - add r6, r0, #0 - add r0, r5, #0 - bl ov23_02241CF4 - cmp r0, #0 - beq _022408D8 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224F6E0 - pop {r4, r5, r6, pc} -_022408D8: - add r0, r5, #0 - bl ov23_0224F710 - add r0, r6, #0 - add r1, r5, #0 - bl sub_02029250 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022408E8: .word 0x02257740 - thumb_func_end ov23_022408A0 - - thumb_func_start ov23_022408EC -ov23_022408EC: ; 0x022408EC - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, _02240930 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298B0 - add r5, r0, #0 - add r0, r4, #0 - bl ov23_02241CF4 - cmp r0, #0 - beq _0224091C - add r0, r5, #0 - bl sub_02028C3C - cmp r0, #0x28 - beq _02240918 - mov r0, #1 - pop {r3, r4, r5, pc} -_02240918: - mov r0, #0 - pop {r3, r4, r5, pc} -_0224091C: - add r0, r5, #0 - bl sub_02028D58 - cmp r0, #0x28 - beq _0224092A - mov r0, #1 - pop {r3, r4, r5, pc} -_0224092A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02240930: .word 0x02257740 - thumb_func_end ov23_022408EC - - thumb_func_start ov23_02240934 -ov23_02240934: ; 0x02240934 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #1 - mov lr, r0 - ldr r0, [r4, #0xc] - mov r2, #0 - cmp r0, #0 - ble _02240954 - add r3, sp, #0 - mov r1, #1 -_0224094A: - stmia r3!, {r1} - ldr r0, [r4, #0xc] - add r2, r2, #1 - cmp r2, r0 - blt _0224094A -_02240954: - mov r0, #0 - mov ip, r0 - ldr r0, _022409E0 ; =0x02257740 - mov r6, #0 - ldr r3, [r0, #0] - add r7, sp, #0 -_02240960: - mov r2, #0 -_02240962: - ldr r0, _022409E4 ; =0x000008DC - add r1, r3, r2 - ldrb r0, [r1, r0] - ldr r5, [r4, #0xc] - cmp r0, r5 - bgt _02240982 - cmp r0, #0 - beq _02240982 - ldr r5, _022409E8 ; =0x0000095E - ldrb r1, [r1, r5] - cmp r1, #0 - beq _02240982 - lsl r0, r0, #2 - add r0, r7, r0 - sub r0, r0, #4 - str r6, [r0, #0] -_02240982: - add r2, r2, #1 - cmp r2, #0xd - blt _02240962 - mov r0, ip - add r0, r0, #1 - add r3, #0xd - mov ip, r0 - cmp r0, #0xa - blt _02240960 - ldr r0, [r4, #0xc] - mov r3, #0 - cmp r0, #0 - ble _022409D8 - add r0, sp, #0 - add r1, r3, #0 - add r2, r4, #0 - mov r7, #1 -_022409A4: - ldr r5, [r0, #0] - cmp r5, #0 - bne _022409B0 - mov r5, #0 - mov lr, r5 - b _022409CA -_022409B0: - ldr r5, _022409E0 ; =0x02257740 - ldr r5, [r5, #0] - add r6, r5, r1 - ldr r5, _022409EC ; =0x00000818 - ldrb r5, [r6, r5] - cmp r5, #0 - bne _022409CA - ldr r5, _022409E0 ; =0x02257740 - str r7, [r2, #0x38] - ldr r5, [r5, #0] - add r6, r5, r1 - ldr r5, _022409EC ; =0x00000818 - strb r7, [r6, r5] -_022409CA: - ldr r5, [r4, #0xc] - add r3, r3, #1 - add r0, r0, #4 - add r1, #0xc - add r2, r2, #4 - cmp r3, r5 - blt _022409A4 -_022409D8: - mov r0, lr - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022409E0: .word 0x02257740 -_022409E4: .word 0x000008DC -_022409E8: .word 0x0000095E -_022409EC: .word 0x00000818 - thumb_func_end ov23_02240934 - - thumb_func_start ov23_022409F0 -ov23_022409F0: ; 0x022409F0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r1, [r5, #0xc] - mov r0, #0 - cmp r1, #0 - ble _02240A80 - ldr r2, _02240A84 ; =0x02257740 - ldr r3, _02240A88 ; =0x00000818 - ldr r2, [r2, #0] - add r6, r2, #0 -_02240A04: - ldrb r4, [r6, r3] - cmp r4, #1 - bne _02240A78 - add r4, r0, #0 - mov r1, #0xc - mul r4, r1 - ldr r0, _02240A8C ; =0x00000814 - add r1, r2, r4 - ldrb r0, [r1, r0] - bl ov23_0224080C - str r0, [r5, #0x48] - bl ov23_0224219C - ldr r1, _02240A84 ; =0x02257740 - ldr r1, [r1, #0] - add r2, r1, r4 - ldr r1, _02240A8C ; =0x00000814 - ldrb r1, [r2, r1] - bl ov23_02254080 - ldr r0, _02240A84 ; =0x02257740 - ldr r0, [r0, #0] - add r1, r0, r4 - ldr r0, _02240A8C ; =0x00000814 - ldrb r0, [r1, r0] - bl ov23_02241CF4 - cmp r0, #0 - beq _02240A50 - mov r4, #0x45 - bl ov23_0224219C - ldr r2, [r5, #0x48] - mov r1, #1 - bl ov23_02254154 - b _02240A5C -_02240A50: - mov r4, #0x11 - bl ov23_0224219C - mov r1, #2 - bl ov23_02254204 -_02240A5C: - bl ov23_0224219C - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F40 - ldr r1, _02240A84 ; =0x02257740 - ldr r2, [r1, #0] - mov r1, #0x9e - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #1 - pop {r4, r5, r6, pc} -_02240A78: - add r0, r0, #1 - add r6, #0xc - cmp r0, r1 - blt _02240A04 -_02240A80: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02240A84: .word 0x02257740 -_02240A88: .word 0x00000818 -_02240A8C: .word 0x00000814 - thumb_func_end ov23_022409F0 - - thumb_func_start ov23_02240A90 -ov23_02240A90: ; 0x02240A90 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, _02240B7C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298A0 - add r7, r0, #0 - ldr r0, _02240B7C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - ldr r5, [r4, #0xc] - mov r2, #0 - cmp r5, #0 - ble _02240B76 - ldr r0, _02240B7C ; =0x02257740 - ldr r6, [r0, #0] - ldr r0, _02240B80 ; =0x00000818 - add r3, r6, #0 -_02240ABE: - ldrb r1, [r3, r0] - cmp r1, #1 - bne _02240B6E - mov r0, #0xc - mul r0, r2 - ldr r1, _02240B80 ; =0x00000818 - mov r3, #0 - add r2, r6, r0 - strb r3, [r2, r1] - ldr r2, _02240B7C ; =0x02257740 - ldr r2, [r2, #0] - add r2, r2, r0 - sub r0, r1, #4 - ldrb r5, [r2, r0] - add r0, r5, #0 - bl ov23_02241CF4 - cmp r0, #0 - beq _02240AEE - add r0, r7, #0 - mov r1, #1 - bl sub_020295F8 - b _02240B3E -_02240AEE: - ldr r0, _02240B7C ; =0x02257740 - add r1, r5, #0 - ldr r0, [r0, #0] - mov r2, #1 - ldr r0, [r0, #0] - bl sub_0206D6C8 - cmp r5, #0x17 - blt _02240B04 - cmp r5, #0x1d - blt _02240B0C -_02240B04: - add r0, r5, #0 - sub r0, #0x24 - cmp r0, #1 - bhi _02240B36 -_02240B0C: - add r0, r7, #0 - mov r1, #1 - bl sub_02029644 - ldr r0, _02240B7C ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020507E4 - add r6, r0, #0 - bl sub_0206B40C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - bl sub_0206B41C - b _02240B3E -_02240B36: - add r0, r7, #0 - mov r1, #1 - bl sub_02029688 -_02240B3E: - add r0, r5, #0 - bl ov23_022408EC - cmp r0, #0 - beq _02240B52 - ldr r1, [r4, #0x48] - add r0, r5, #0 - bl ov23_022408A0 - b _02240B76 -_02240B52: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x41 - add r3, r2, #0 - bl ov23_02253F40 - ldr r1, _02240B7C ; =0x02257740 - ldr r2, [r1, #0] - mov r1, #0x9e - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02240B6E: - add r2, r2, #1 - add r3, #0xc - cmp r2, r5 - blt _02240ABE -_02240B76: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240B7C: .word 0x02257740 -_02240B80: .word 0x00000818 - thumb_func_end ov23_02240A90 - - thumb_func_start ov23_02240B84 -ov23_02240B84: ; 0x02240B84 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r0, _02240C84 ; =0x02257740 - ldr r4, [r0, #0] - ldr r0, _02240C88 ; =0x000009E8 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _02240C80 - sub r0, r0, #1 - ldrb r1, [r4, r0] - mov r0, #0xc4 - sub r6, r0, r1 - add r0, r6, #0 - mov r1, #0x32 - bl sub_020E1F6C - add r7, r0, #0 - ldr r0, _02240C88 ; =0x000009E8 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldr r0, _02240C84 ; =0x02257740 - mov r1, #0xf - ldr r5, [r0, #0] - add r0, r6, #0 - bl sub_020E1F6C - ldr r1, _02240C88 ; =0x000009E8 - ldrb r2, [r5, r1] - cmp r2, r0 - ble _02240BD6 - mov r2, #0 - add r0, r1, #2 - strb r2, [r5, r0] - ldr r0, _02240C84 ; =0x02257740 - ldr r3, [r0, #0] - add r0, r1, #2 - ldrsb r2, [r3, r0] - add r0, r1, #1 - strb r2, [r3, r0] - b _02240C52 -_02240BD6: - add r4, r5, #0 - add r4, #8 - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - ldr r2, [r5, #8] - ldr r3, [r4, #4] - bl sub_020E1F1C - ldr r2, [r4, #0x10] - ldr r3, [r4, #0x14] - add r0, r2, r0 - adc r3, r1 - str r0, [r5, #8] - str r3, [r4, #4] - add r6, r7, #3 - bne _02240BFA - ldr r1, [r4, #4] - b _02240C06 -_02240BFA: - ldr r0, [r4, #4] - mov r1, #0 - mov r3, #0 - add r2, r6, #0 - bl sub_020E1F1C -_02240C06: - add r2, r7, #3 - lsr r0, r2, #0x1f - add r0, r2, r0 - asr r7, r0, #1 - ldr r0, _02240C8C ; =0x000009E9 - sub r1, r1, r7 - strb r1, [r5, r0] - ldr r0, _02240C84 ; =0x02257740 - ldr r5, [r0, #0] - add r4, r5, #0 - add r4, #8 - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - ldr r2, [r5, #8] - ldr r3, [r4, #4] - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [r4, #0x10] - ldr r1, [r4, #0x14] - add r0, r0, r2 - adc r1, r3 - str r0, [r5, #8] - str r1, [r4, #4] - cmp r6, #0 - bne _02240C40 - ldr r1, [r4, #4] - b _02240C4C -_02240C40: - ldr r0, [r4, #4] - mov r1, #0 - mov r3, #0 - add r2, r6, #0 - bl sub_020E1F1C -_02240C4C: - ldr r0, _02240C90 ; =0x000009EA - sub r1, r1, r7 - strb r1, [r5, r0] -_02240C52: - add r0, sp, #0 - bl ov23_02240660 - ldr r0, _02240C84 ; =0x02257740 - ldr r1, _02240C8C ; =0x000009E9 - ldr r0, [r0, #0] - ldr r3, [sp] - ldrsb r2, [r0, r1] - add r1, r1, #1 - lsl r2, r2, #0xc - sub r2, r3, r2 - str r2, [sp] - ldrsb r1, [r0, r1] - ldr r2, [sp, #4] - lsl r1, r1, #0xc - sub r1, r2, r1 - str r1, [sp, #4] - mov r1, #0x7b - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, sp, #0 - bl sub_02021C50 -_02240C80: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240C84: .word 0x02257740 -_02240C88: .word 0x000009E8 -_02240C8C: .word 0x000009E9 -_02240C90: .word 0x000009EA - thumb_func_end ov23_02240B84 - - thumb_func_start ov23_02240C94 -ov23_02240C94: ; 0x02240C94 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02240CEC ; =0x02257740 - ldr r4, [r0, #0] - ldr r0, _02240CF0 ; =0x000009E8 - ldrb r6, [r4, r0] - cmp r6, #0 - beq _02240CEA - sub r0, r0, #1 - ldrb r1, [r4, r0] - mov r0, #0xc4 - sub r0, r0, r1 - mov r1, #0xa - bl sub_020E1F6C - cmp r6, r0 - ble _02240CBC - ldr r0, _02240CF0 ; =0x000009E8 - mov r1, #0 - strb r1, [r4, r0] -_02240CBC: - ldr r7, _02240CEC ; =0x02257740 - mov r4, #0 -_02240CC0: - ldr r6, [r7, #0] - ldr r3, _02240CF4 ; =0x000009E9 - lsl r1, r4, #0x18 - ldrsb r3, [r6, r3] - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl sub_02019184 - lsl r1, r4, #0x18 - ldr r6, [r7, #0] - ldr r3, _02240CF8 ; =0x000009EA - add r0, r5, #0 - ldrsb r3, [r6, r3] - lsr r1, r1, #0x18 - mov r2, #3 - bl sub_02019184 - add r4, r4, #1 - cmp r4, #3 - blt _02240CC0 -_02240CEA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240CEC: .word 0x02257740 -_02240CF0: .word 0x000009E8 -_02240CF4: .word 0x000009E9 -_02240CF8: .word 0x000009EA - thumb_func_end ov23_02240C94 - - thumb_func_start ov23_02240CFC -ov23_02240CFC: ; 0x02240CFC - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _02240E44 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298B0 - add r6, r0, #0 - ldr r0, _02240E44 ; =0x02257740 - ldr r2, [r0, #0] - ldr r0, _02240E48 ; =0x000009E5 - ldrb r1, [r2, r0] - cmp r1, #1 - bne _02240D22 - mov r1, #0 - strb r1, [r2, r0] -_02240D22: - ldr r1, _02240E4C ; =0x021BF6BC - ldrh r0, [r1, #0x20] - cmp r0, #0 - beq _02240DA6 - ldrh r0, [r1, #0x1c] - cmp r0, #0xd0 - bhs _02240D98 - ldrh r1, [r1, #0x1e] - cmp r1, #0x20 - blo _02240D98 - add r2, sp, #0 - strb r0, [r2] - strb r1, [r2, #1] - ldr r2, _02240E44 ; =0x02257740 - ldr r3, [r2, #0] - ldr r2, _02240E50 ; =0x000009E4 - ldrb r2, [r3, r2] - add r3, r5, #0 - bl ov23_022402B8 - ldr r0, _02240E44 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02240E50 ; =0x000009E4 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02240D5A - mov r4, #4 - b _02240D5C -_02240D5A: - mov r4, #8 -_02240D5C: - mov r0, #0x44 - add r1, sp, #0 - bl sub_020360D0 - ldr r0, _02240E44 ; =0x02257740 - ldr r1, _02240E54 ; =0x000009E7 - ldr r0, [r0, #0] - ldrb r2, [r0, r1] - cmp r2, r4 - ble _02240D74 - sub r2, r2, r4 - b _02240D76 -_02240D74: - mov r2, #0 -_02240D76: - strb r2, [r0, r1] - ldr r0, _02240E44 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_022401B0 - ldr r0, _02240E44 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov23_02240688 - ldr r0, _02240E44 ; =0x02257740 - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _02240E58 ; =0x000009E8 - strb r2, [r1, r0] - b _02240DA6 -_02240D98: - cmp r0, #0xd0 - blo _02240DA6 - ldr r0, _02240E44 ; =0x02257740 - mov r2, #2 - ldr r1, [r0, #0] - ldr r0, _02240E48 ; =0x000009E5 - strb r2, [r1, r0] -_02240DA6: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _02240DB8 - sub r0, r0, #1 - str r0, [r5, #0x14] - bne _02240DB8 - ldr r0, _02240E5C ; =0x000006A5 - bl sub_02005748 -_02240DB8: - ldr r0, _02240E44 ; =0x02257740 - ldr r2, _02240E4C ; =0x021BF6BC - ldr r3, [r0, #0] - ldr r4, _02240E48 ; =0x000009E5 - ldr r0, [r3, #4] - ldrh r1, [r2, #0x1c] - ldrh r2, [r2, #0x1e] - ldrb r3, [r3, r4] - bl ov23_022404F8 - ldr r0, _02240E44 ; =0x02257740 - ldr r2, [r0, #0] - add r0, r4, #0 - ldrb r1, [r2, r0] - cmp r1, #2 - blo _02240DDC - add r1, r1, #1 - strb r1, [r2, r0] -_02240DDC: - add r0, r5, #0 - bl ov23_02240758 - add r0, r5, #0 - bl ov23_02240934 - cmp r0, #0 - beq _02240E16 - add r0, r6, #0 - bl sub_02029220 - ldr r0, _02240E44 ; =0x02257740 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x1e - bl sub_0202CFEC - mov r0, #0xe - str r0, [r5, #0] - mov r0, #0x19 - str r0, [r5, #8] - mov r0, #1 - add r5, #0x50 - add sp, #4 - strb r0, [r5] - pop {r3, r4, r5, r6, pc} -_02240E16: - ldr r0, _02240E44 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02240E54 ; =0x000009E7 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02240E3E - add r0, r6, #0 - bl sub_02029220 - add r0, r5, #0 - mov r1, #0 - add r0, #0x50 - strb r1, [r0] - mov r0, #0x2d - str r0, [r5, #8] - mov r0, #0x16 - str r0, [r5, #0] - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_02240E3E: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02240E44: .word 0x02257740 -_02240E48: .word 0x000009E5 -_02240E4C: .word 0x021BF6BC -_02240E50: .word 0x000009E4 -_02240E54: .word 0x000009E7 -_02240E58: .word 0x000009E8 -_02240E5C: .word 0x000006A5 - thumb_func_end ov23_02240CFC - - thumb_func_start ov23_02240E60 -ov23_02240E60: ; 0x02240E60 - push {r3, r4} - ldr r3, _02240E80 ; =0x02257740 - ldr r2, _02240E84 ; =0x000009EB - ldr r4, [r3, #0] - ldrb r1, [r4, r2] - lsl r1, r1, #2 - add r4, r4, r1 - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [r3, #0] - ldrb r0, [r1, r2] - add r0, r0, #1 - strb r0, [r1, r2] - pop {r3, r4} - bx lr - ; .align 2, 0 -_02240E80: .word 0x02257740 -_02240E84: .word 0x000009EB - thumb_func_end ov23_02240E60 - - thumb_func_start ov23_02240E88 -ov23_02240E88: ; 0x02240E88 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r0, _02241084 ; =0x02257740 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _02241088 ; =0x000009EB - strb r2, [r1, r0] - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7c - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x1f - str r3, [sp, #0xc] - mov r2, #0x1d - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - bl ov23_0224119C - ldr r1, _02241084 ; =0x02257740 - mov r0, #0x1a - ldr r1, [r1, #0] - mov r2, #0x1d - add r1, #0x24 - bl sub_020095C4 - ldr r1, _02241084 ; =0x02257740 - ldr r2, [r1, #0] - str r0, [r2, #0x20] - ldr r0, [r1, #0] - mov r2, #6 - add r0, #0x24 - mov r1, #0 - lsl r2, r2, #0x12 - bl sub_0200964C - mov r4, #0 - mov r7, #0x53 - ldr r6, _02241084 ; =0x02257740 - add r5, r4, #0 - lsl r7, r7, #2 -_02240EE2: - mov r0, #2 - add r1, r4, #0 - mov r2, #0x1d - bl sub_02009714 - ldr r1, [r6, #0] - add r4, r4, #1 - add r1, r1, r5 - add r5, r5, #4 - str r0, [r1, r7] - cmp r4, #4 - blt _02240EE2 - mov r0, #0x40 - mov r1, #0x1d - bl sub_02006C24 - mov r3, #0 - add r4, r0, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x1d - str r0, [sp, #8] - ldr r0, _02241084 ; =0x02257740 - mov r2, #6 - ldr r1, [r0, #0] - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009A4C - bl ov23_02240E60 - ldr r0, _02241084 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241088 ; =0x000009EB - ldrb r0, [r1, r0] - sub r0, r0, #1 - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A328 - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x1d - str r0, [sp, #0xc] - ldr r0, _02241084 ; =0x02257740 - mov r2, #7 - ldr r1, [r0, #0] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009B04 - bl ov23_02240E60 - ldr r0, _02241084 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241088 ; =0x000009EB - ldrb r0, [r1, r0] - sub r0, r0, #1 - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x1d - str r0, [sp, #8] - ldr r0, _02241084 ; =0x02257740 - mov r2, #5 - ldr r1, [r0, #0] - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009BC4 - bl ov23_02240E60 - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x1d - str r0, [sp, #8] - ldr r0, _02241084 ; =0x02257740 - mov r2, #4 - ldr r1, [r0, #0] - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009BC4 - bl ov23_02240E60 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x1d - str r0, [sp, #8] - ldr r0, _02241084 ; =0x02257740 - mov r2, #3 - ldr r1, [r0, #0] - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - mov r3, #0 - bl sub_02009A4C - bl ov23_02240E60 - ldr r0, _02241084 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241088 ; =0x000009EB - ldrb r0, [r1, r0] - sub r0, r0, #1 - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A328 - mov r2, #1 - str r2, [sp] - str r2, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x1d - str r0, [sp, #0xc] - ldr r0, _02241084 ; =0x02257740 - mov r3, #0 - ldr r1, [r0, #0] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0x34 - bl sub_020098B8 - bl ov23_02240E60 - ldr r0, _02241084 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241088 ; =0x000009EB - ldrb r0, [r1, r0] - sub r0, r0, #1 - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - mov r0, #1 - str r0, [sp] - mov r2, #2 - str r2, [sp, #4] - mov r0, #0x1d - str r0, [sp, #8] - ldr r0, _02241084 ; =0x02257740 - mov r3, #0 - ldr r1, [r0, #0] - mov r0, #0x55 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009BC4 - bl ov23_02240E60 - mov r2, #1 - str r2, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x1d - str r0, [sp, #8] - ldr r0, _02241084 ; =0x02257740 - mov r3, #0 - ldr r1, [r0, #0] - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009BC4 - bl ov23_02240E60 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02241084: .word 0x02257740 -_02241088: .word 0x000009EB - thumb_func_end ov23_02240E88 - - thumb_func_start ov23_0224108C -ov23_0224108C: ; 0x0224108C - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - mov r7, #0 - str r7, [sp, #0x30] - str r7, [sp, #0x2c] -_02241096: - ldr r0, _02241198 ; =0x02257740 - mov r3, #0x53 - ldr r1, [r0, #0] - mov r0, #0 - str r7, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r3, r3, #2 - ldr r2, [r1, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r1, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r1, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r1, r2] - add r3, #0x54 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r1, r1, r3 - ldr r0, [sp, #0x30] - add r2, r7, #0 - add r0, r1, r0 - add r1, r7, #0 - add r3, r7, #0 - bl sub_020093B4 - ldr r6, _02241198 ; =0x02257740 - mov r2, #2 - ldr r1, [r6, #0] - lsl r2, r2, #0x10 - ldr r0, [r1, #0x20] - str r0, [sp, #0x34] - mov r0, #0x1a - lsl r0, r0, #4 - add r1, r1, r0 - ldr r0, [sp, #0x30] - str r2, [sp, #0x3c] - add r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x40] - lsr r0, r2, #5 - mov r1, #0 - str r1, [sp, #0x44] - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - str r0, [sp, #0x50] - add r0, sp, #0x34 - strh r1, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x5c] - mov r0, #0x1d - str r0, [sp, #0x60] - mov r0, #0xf - lsl r0, r0, #0x10 - str r1, [sp, #0x58] - str r1, [sp, #0x3c] - str r0, [sp, #0x40] - cmp r7, #0 - bne _02241150 - mov r4, #2 - mov r5, #8 -_02241128: - add r0, sp, #0x34 - bl sub_02021AA0 - ldr r1, [r6, #0] - add r2, r1, r5 - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r6, #0] - add r1, r0, r5 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - ble _02241128 -_02241150: - add r0, sp, #0x34 - bl sub_02021AA0 - ldr r2, _02241198 ; =0x02257740 - ldr r1, [sp, #0x2c] - ldr r3, [r2, #0] - add r3, r3, r1 - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r3, r1] - ldr r2, [r2, #0] - ldr r0, [sp, #0x2c] - add r0, r2, r0 - ldr r0, [r0, r1] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [sp, #0x30] - add r7, r7, #1 - add r0, #0x24 - str r0, [sp, #0x30] - ldr r0, [sp, #0x2c] - add r0, r0, #4 - str r0, [sp, #0x2c] - cmp r7, #2 - blt _02241096 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241198: .word 0x02257740 - thumb_func_end ov23_0224108C - - thumb_func_start ov23_0224119C -ov23_0224119C: ; 0x0224119C - push {r4, lr} - sub sp, #0x10 - ldr r4, _022411DC ; =0x02256318 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r1, _022411E0 ; =0x00200010 - add r0, r2, #0 - add r2, r1, #0 - bl sub_0201E88C - mov r0, #0x14 - mov r1, #0x1d - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - ldr r1, _022411E4 ; =0x00100010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - add sp, #0x10 - pop {r4, pc} - nop -_022411DC: .word 0x02256318 -_022411E0: .word 0x00200010 -_022411E4: .word 0x00100010 - thumb_func_end ov23_0224119C - - thumb_func_start ov23_022411E8 -ov23_022411E8: ; 0x022411E8 - push {r4, lr} - add r4, r0, #0 - bl ov23_02240C94 - add r0, r4, #0 - bl sub_0201C2B8 - bl sub_0201DCAC - bl sub_0200A858 - pop {r4, pc} - thumb_func_end ov23_022411E8 - - thumb_func_start ov23_02241200 -ov23_02241200: ; 0x02241200 - push {r3, lr} - lsl r0, r0, #0x10 - lsl r1, r1, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - bl ov23_0223E88C - cmp r0, #0 - beq _02241216 - mov r0, #1 - pop {r3, pc} -_02241216: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_02241200 - - thumb_func_start ov23_0224121C -ov23_0224121C: ; 0x0224121C - ldr r1, _02241234 ; =0x02257740 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02241230 - mov r1, #6 - mul r1, r0 - ldr r0, _02241238 ; =0x00000888 - add r1, r2, r1 - ldrh r0, [r1, r0] - bx lr -_02241230: - mov r0, #0 - bx lr - ; .align 2, 0 -_02241234: .word 0x02257740 -_02241238: .word 0x00000888 - thumb_func_end ov23_0224121C - - thumb_func_start ov23_0224123C -ov23_0224123C: ; 0x0224123C - ldr r1, _02241254 ; =0x02257740 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02241250 - mov r1, #6 - mul r1, r0 - ldr r0, _02241258 ; =0x0000088A - add r1, r2, r1 - ldrh r0, [r1, r0] - bx lr -_02241250: - mov r0, #0 - bx lr - ; .align 2, 0 -_02241254: .word 0x02257740 -_02241258: .word 0x0000088A - thumb_func_end ov23_0224123C - - thumb_func_start ov23_0224125C -ov23_0224125C: ; 0x0224125C - push {r4, lr} - ldr r1, _02241288 ; =0x02257740 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02241282 - ldr r1, _0224128C ; =0x00000884 - ldr r4, [r2, r1] - cmp r4, #0 - beq _02241282 - ldr r1, _02241290 ; =0x000005DE - ldrh r1, [r4, r1] - add r0, r1, r0 - mov r1, #0x53 - bl sub_020E1F6C - mov r0, #6 - mul r0, r1 - ldrh r0, [r4, r0] - pop {r4, pc} -_02241282: - mov r0, #0 - pop {r4, pc} - nop -_02241288: .word 0x02257740 -_0224128C: .word 0x00000884 -_02241290: .word 0x000005DE - thumb_func_end ov23_0224125C - - thumb_func_start ov23_02241294 -ov23_02241294: ; 0x02241294 - push {r4, lr} - ldr r1, _022412C0 ; =0x02257740 - ldr r2, [r1, #0] - cmp r2, #0 - beq _022412BC - ldr r1, _022412C4 ; =0x00000884 - ldr r4, [r2, r1] - cmp r4, #0 - beq _022412BC - ldr r1, _022412C8 ; =0x000005DE - ldrh r1, [r4, r1] - add r0, r1, r0 - mov r1, #0x53 - bl sub_020E1F6C - mov r0, #6 - mul r0, r1 - add r0, r4, r0 - ldrh r0, [r0, #2] - pop {r4, pc} -_022412BC: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_022412C0: .word 0x02257740 -_022412C4: .word 0x00000884 -_022412C8: .word 0x000005DE - thumb_func_end ov23_02241294 - - thumb_func_start ov23_022412CC -ov23_022412CC: ; 0x022412CC - push {r4, lr} - ldr r0, _022412EC ; =0x000005DE - add r4, r1, #0 - ldrh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - ldrh r1, [r4, r0] - cmp r1, #0x53 - bls _022412EA - sub r0, #0x94 - bl sub_02005748 - ldr r0, _022412EC ; =0x000005DE - mov r1, #0 - strh r1, [r4, r0] -_022412EA: - pop {r4, pc} - ; .align 2, 0 -_022412EC: .word 0x000005DE - thumb_func_end ov23_022412CC - - thumb_func_start ov23_022412F0 -ov23_022412F0: ; 0x022412F0 - push {r4, lr} - ldr r0, _02241350 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241354 ; =0x00000884 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241302 - bl sub_02022974 -_02241302: - ldr r0, _02241350 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241358 ; =0x00000878 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241312 - bl sub_02022974 -_02241312: - mov r1, #0x5e - mov r0, #0xb - lsl r1, r1, #4 - bl sub_02018184 - mov r2, #0x5e - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x47 - bl sub_020360DC - ldr r0, _0224135C ; =0x000005DE - mov r1, #0x49 - strh r1, [r4, r0] - ldr r0, _02241350 ; =0x02257740 - mov r2, #0x64 - ldr r1, [r0, #0] - ldr r0, _02241354 ; =0x00000884 - str r4, [r1, r0] - ldr r0, _02241360 ; =ov23_022412CC - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02241350 ; =0x02257740 - ldr r2, [r1, #0] - ldr r1, _02241358 ; =0x00000878 - str r0, [r2, r1] - pop {r4, pc} - ; .align 2, 0 -_02241350: .word 0x02257740 -_02241354: .word 0x00000884 -_02241358: .word 0x00000878 -_0224135C: .word 0x000005DE -_02241360: .word ov23_022412CC - thumb_func_end ov23_022412F0 - - thumb_func_start ov23_02241364 -ov23_02241364: ; 0x02241364 - push {r3, lr} - ldr r0, _02241394 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _02241398 ; =0x00000878 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241392 - bl sub_0200DA58 - ldr r0, _02241394 ; =0x02257740 - ldr r1, [r0, #0] - ldr r0, _0224139C ; =0x00000884 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, _02241394 ; =0x02257740 - ldr r0, _02241398 ; =0x00000878 - ldr r2, [r1, #0] - mov r3, #0 - str r3, [r2, r0] - ldr r1, [r1, #0] - add r0, #0xc - str r3, [r1, r0] -_02241392: - pop {r3, pc} - ; .align 2, 0 -_02241394: .word 0x02257740 -_02241398: .word 0x00000878 -_0224139C: .word 0x00000884 - thumb_func_end ov23_02241364 - - thumb_func_start ov23_022413A0 -ov23_022413A0: ; 0x022413A0 - ldr r1, _022413B0 ; =0x02257740 - mov r2, #1 - ldr r1, [r1, #0] - add r1, r1, r0 - mov r0, #0x87 - lsl r0, r0, #4 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_022413B0: .word 0x02257740 - thumb_func_end ov23_022413A0 - - thumb_func_start ov23_022413B4 -ov23_022413B4: ; 0x022413B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r5, #0 -_022413BA: - ldr r0, _02241424 ; =0x02257740 - ldr r1, [r0, #0] - mov r0, #0x87 - add r7, r1, r5 - lsl r0, r0, #4 - ldrb r0, [r7, r0] - sub r4, r0, #1 - cmp r0, #0 - beq _0224141A - mov r0, #0x82 - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #6 - mul r0, r4 - add r6, r1, r0 - ldr r0, _02241428 ; =0x0000FFFF - add r1, r0, #0 -_022413DC: - ldrh r3, [r6] - cmp r3, r1 - beq _0224140A - ldrh r2, [r6, #2] - cmp r2, r0 - beq _0224140A - add r0, sp, #0 - strh r3, [r0] - ldrh r1, [r6, #2] - strh r1, [r0, #2] - strb r5, [r0, #4] - mov r0, #0x48 - add r1, sp, #0 - bl sub_02035B48 - ldr r0, _02241424 ; =0x02257740 - add r2, r4, #3 - ldr r0, [r0, #0] - add r1, r0, r5 - mov r0, #0x87 - lsl r0, r0, #4 - strb r2, [r1, r0] - b _0224141A -_0224140A: - add r4, r4, #3 - add r6, #0x12 - cmp r4, #0xfa - blt _022413DC - mov r1, #0x87 - lsl r1, r1, #4 - mov r0, #0 - strb r0, [r7, r1] -_0224141A: - add r5, r5, #1 - cmp r5, #8 - blt _022413BA - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241424: .word 0x02257740 -_02241428: .word 0x0000FFFF - thumb_func_end ov23_022413B4 - - thumb_func_start ov23_0224142C -ov23_0224142C: ; 0x0224142C - push {r3, r4, r5, lr} - ldr r0, _022414C0 ; =0x02257740 - add r5, r2, #0 - ldr r2, [r0, #0] - cmp r2, #0 - beq _022414BC - ldrb r1, [r5, #4] - mov r0, #0xf - add r4, r1, #0 - and r4, r0 - ldr r0, _022414C4 ; =0x00000884 - ldr r0, [r2, r0] - cmp r0, #0 - bne _0224147C - bl sub_0203608C - cmp r4, r0 - bne _022414BC - ldrb r0, [r5, #4] - asr r1, r0, #4 - mov r0, #0xf - add r3, r1, #0 - and r3, r0 - cmp r3, #0 - ble _022414BC - cmp r3, #8 - bgt _022414BC - ldr r1, _022414C0 ; =0x02257740 - add r0, r5, #0 - ldr r2, [r1, #0] - ldr r1, _022414C8 ; =0x00000888 - add r4, r2, r1 - sub r1, r3, #1 - mov r2, #6 - add r3, r1, #0 - mul r3, r2 - add r1, r4, r3 - bl sub_020C4DB0 - pop {r3, r4, r5, pc} -_0224147C: - bl sub_0203608C - cmp r4, r0 - bne _022414BC - ldr r0, _022414C0 ; =0x02257740 - mov r2, #6 - ldr r1, [r0, #0] - ldr r0, _022414C4 ; =0x00000884 - ldr r4, [r1, r0] - ldr r1, _022414CC ; =0x000005DC - add r0, r5, #0 - ldrb r1, [r4, r1] - add r3, r1, #0 - mul r3, r2 - add r1, r4, r3 - bl sub_020C4DB0 - ldr r2, _022414C0 ; =0x02257740 - ldr r0, _022414C4 ; =0x00000884 - ldr r1, [r2, #0] - ldr r4, [r1, r0] - ldr r1, _022414CC ; =0x000005DC - ldrb r3, [r4, r1] - add r3, r3, #1 - strb r3, [r4, r1] - ldr r2, [r2, #0] - ldr r2, [r2, r0] - ldrb r0, [r2, r1] - cmp r0, #0xfa - blo _022414BC - mov r0, #0 - strb r0, [r2, r1] -_022414BC: - pop {r3, r4, r5, pc} - nop -_022414C0: .word 0x02257740 -_022414C4: .word 0x00000884 -_022414C8: .word 0x00000888 -_022414CC: .word 0x000005DC - thumb_func_end ov23_0224142C - - thumb_func_start ov23_022414D0 -ov23_022414D0: ; 0x022414D0 - mov r0, #6 - bx lr - thumb_func_end ov23_022414D0 - - thumb_func_start ov23_022414D4 -ov23_022414D4: ; 0x022414D4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r6, _022415AC ; =0x02257740 - mov r5, #0 - add r4, sp, #0 -_022414DE: - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _022415A0 - add r0, r5, #0 - bl sub_020593CC - cmp r0, #0 - ldr r0, [r6, #0] - beq _02241500 - add r2, r0, r5 - ldr r0, _022415B0 ; =0x000008B8 - mov r1, #0 - strb r1, [r2, r0] - b _022415A0 -_02241500: - ldr r1, _022415B0 ; =0x000008B8 - add r0, r0, r5 - ldrb r1, [r0, r1] - cmp r1, #0x1c - bhs _022415A0 - ldr r1, _022415B0 ; =0x000008B8 - ldrb r1, [r0, r1] - add r2, r1, #1 - ldr r1, _022415B0 ; =0x000008B8 - strb r2, [r0, r1] - ldr r0, [r6, #0] - add r1, r0, r5 - ldr r0, _022415B0 ; =0x000008B8 - ldrb r0, [r1, r0] - cmp r0, #0x14 - blo _022415A0 - add r0, r5, #0 - bl sub_02058DF8 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02058E4C - add r1, r0, #0 - lsl r0, r7, #0x10 - lsl r1, r1, #0x10 - lsr r0, r0, #0x10 - lsr r1, r1, #0x10 - bl ov23_0223E8CC - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02241582 - mov r2, #0x82 - ldr r1, [r6, #0] - lsl r2, r2, #2 - add r3, r1, r2 - mov r2, #6 - mul r2, r0 - add r0, r3, r2 - ldrh r3, [r3, r2] - ldr r2, _022415B4 ; =0x0000FFFF - cmp r3, r2 - beq _022415A0 - ldrh r3, [r0, #2] - cmp r3, r2 - beq _022415A0 - add r2, r1, r5 - ldr r1, _022415B0 ; =0x000008B8 - ldrb r1, [r2, r1] - sub r1, #0x13 - lsl r1, r1, #4 - add r1, r5, r1 - strb r1, [r4, #0xa] - ldrh r1, [r0] - strh r1, [r4, #6] - ldrh r0, [r0, #2] - add r1, sp, #4 - add r1, #2 - strh r0, [r4, #8] - mov r0, #0x48 - bl sub_02035B48 - b _022415A0 -_02241582: - ldr r0, [r6, #0] - add r1, r0, r5 - ldr r0, _022415B0 ; =0x000008B8 - ldrb r0, [r1, r0] - add r1, sp, #0 - sub r0, #0x13 - lsl r0, r0, #4 - add r0, r5, r0 - strb r0, [r4, #4] - mov r0, #0 - strh r0, [r4] - strh r0, [r4, #2] - mov r0, #0x48 - bl sub_02035B48 -_022415A0: - add r5, r5, #1 - cmp r5, #8 - blt _022414DE - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_022415AC: .word 0x02257740 -_022415B0: .word 0x000008B8 -_022415B4: .word 0x0000FFFF - thumb_func_end ov23_022414D4 - - thumb_func_start ov23_022415B8 -ov23_022415B8: ; 0x022415B8 - push {r3, r4, r5, r6, r7, lr} - ldr r6, _02241604 ; =0x02257740 - add r5, r0, #0 - ldr r0, [r6, #0] - cmp r0, #0 - bne _022415C8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022415C8: - mov r4, #0 - add r7, r4, #0 -_022415CC: - ldr r0, [r6, #0] - add r1, r0, r4 - ldr r0, _02241608 ; =0x000008C4 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _022415F8 - add r0, r4, #0 - bl sub_02032EE8 - ldr r1, [r6, #0] - add r3, r5, #0 - add r2, r1, r4 - ldr r1, _02241608 ; =0x000008C4 - strb r7, [r2, r1] - add r1, r7, #0 - mov r2, #0x69 - bl ov23_022422A8 - cmp r0, #0 - beq _022415F8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022415F8: - add r4, r4, #1 - cmp r4, #8 - blt _022415CC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241604: .word 0x02257740 -_02241608: .word 0x000008C4 - thumb_func_end ov23_022415B8 - - thumb_func_start ov23_0224160C -ov23_0224160C: ; 0x0224160C - push {r3, lr} - ldr r0, _02241624 ; =0x02257740 - ldr r1, [r0, #0] - cmp r1, #0 - beq _02241622 - ldr r0, _02241628 ; =0x000008C4 - mov r2, #8 - add r0, r1, r0 - mov r1, #0 - bl sub_020C4CF4 -_02241622: - pop {r3, pc} - ; .align 2, 0 -_02241624: .word 0x02257740 -_02241628: .word 0x000008C4 - thumb_func_end ov23_0224160C - - thumb_func_start ov23_0224162C -ov23_0224162C: ; 0x0224162C - ldr r1, _02241640 ; =0x02257740 - ldr r1, [r1, #0] - cmp r1, #0 - beq _0224163C - add r1, r1, r0 - ldr r0, _02241644 ; =0x00000808 - ldrb r0, [r1, r0] - bx lr -_0224163C: - mov r0, #0 - bx lr - ; .align 2, 0 -_02241640: .word 0x02257740 -_02241644: .word 0x00000808 - thumb_func_end ov23_0224162C - - thumb_func_start ov23_02241648 -ov23_02241648: ; 0x02241648 - push {r3, r4} - ldr r2, _02241668 ; =0x02257740 - ldr r1, [r2, #0] - cmp r1, #0 - beq _02241662 - add r3, r1, r0 - ldr r1, _0224166C ; =0x00000808 - mov r4, #0 - strb r4, [r3, r1] - ldr r2, [r2, #0] - add r1, #0xb0 - add r0, r2, r0 - strb r4, [r0, r1] -_02241662: - pop {r3, r4} - bx lr - nop -_02241668: .word 0x02257740 -_0224166C: .word 0x00000808 - thumb_func_end ov23_02241648 - - thumb_func_start ov23_02241670 -ov23_02241670: ; 0x02241670 - ldr r0, _0224168C ; =0x02257740 - ldr r1, [r0, #0] - cmp r1, #0 - beq _02241686 - mov r0, #0x22 - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241686 - mov r0, #1 - bx lr -_02241686: - mov r0, #0 - bx lr - nop -_0224168C: .word 0x02257740 - thumb_func_end ov23_02241670 - - thumb_func_start ov23_02241690 -ov23_02241690: ; 0x02241690 - ldr r2, _022416A0 ; =0x02257740 - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224169E - add r2, r2, r0 - ldr r0, _022416A4 ; =0x00000808 - strb r1, [r2, r0] -_0224169E: - bx lr - ; .align 2, 0 -_022416A0: .word 0x02257740 -_022416A4: .word 0x00000808 - thumb_func_end ov23_02241690 - - thumb_func_start ov23_022416A8 -ov23_022416A8: ; 0x022416A8 - ldr r3, _022416AC ; =sub_02059514 - bx r3 - ; .align 2, 0 -_022416AC: .word sub_02059514 - thumb_func_end ov23_022416A8 - - thumb_func_start ov23_022416B0 -ov23_022416B0: ; 0x022416B0 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0 - ble _022416D4 - bl ov23_0224219C - mov r1, #0 - add r2, r4, #0 - bl ov23_02254154 - bl ov23_0224219C - ldr r3, _022416DC ; =ov23_022416A8 - mov r1, #0x4b - mov r2, #1 - bl ov23_02253F40 - pop {r4, pc} -_022416D4: - bl ov23_022416A8 - pop {r4, pc} - nop -_022416DC: .word ov23_022416A8 - thumb_func_end ov23_022416B0 - - thumb_func_start ov23_022416E0 -ov23_022416E0: ; 0x022416E0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, _0224176C ; =0x02257744 - ldr r2, [r1, #0] - cmp r2, #0 - bne _0224176A - ldr r2, _02241770 ; =0x000004DC - str r0, [r1, #0] - mov r1, #0 - bl sub_020C4CF4 - ldr r0, _0224176C ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241774 ; =0x000004C8 - str r4, [r1, r0] - add r0, r4, #0 - bl sub_0203D174 - bl sub_020298B0 - mov r4, #0 - ldr r7, _0224176C ; =0x02257744 - add r6, r0, #0 - add r5, r4, #0 -_02241710: - add r0, r6, #0 - add r1, r4, #0 - bl sub_020290DC - ldr r1, [r7, #0] - add r1, r1, r5 - strb r0, [r1, #6] - add r0, r6, #0 - add r1, r4, #0 - bl sub_020290E8 - ldr r1, [r7, #0] - strh r0, [r1, r5] - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029108 - ldr r1, [r7, #0] - add r1, r1, r5 - strh r0, [r1, #2] - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029128 - ldr r1, [r7, #0] - add r1, r1, r5 - strb r0, [r1, #4] - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029134 - ldr r1, [r7, #0] - add r1, r1, r5 - strb r0, [r1, #5] - ldr r0, [r7, #0] - add r0, r0, r5 - ldrb r1, [r0, #6] - cmp r1, #0 - beq _02241762 - bl ov23_022418C0 -_02241762: - add r4, r4, #1 - add r5, #8 - cmp r4, #0x64 - blt _02241710 -_0224176A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224176C: .word 0x02257744 -_02241770: .word 0x000004DC -_02241774: .word 0x000004C8 - thumb_func_end ov23_022416E0 - - thumb_func_start ov23_02241778 -ov23_02241778: ; 0x02241778 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r0, _022417BC ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _022417C0 ; =0x000004C8 - ldr r0, [r1, r0] - bl sub_0203D174 - bl sub_020298B0 - mov r4, #0 - ldr r7, _022417BC ; =0x02257744 - add r6, r0, #0 - add r5, r4, #0 -_02241794: - ldr r3, [r7, #0] - add r2, r4, #0 - add r1, r3, r5 - ldrh r0, [r1, #2] - str r0, [sp] - ldrb r0, [r1, #4] - str r0, [sp, #4] - ldrb r0, [r1, #5] - str r0, [sp, #8] - ldrb r1, [r1, #6] - ldrh r3, [r3, r5] - add r0, r6, #0 - bl sub_02029088 - add r4, r4, #1 - add r5, #8 - cmp r4, #0x64 - blt _02241794 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022417BC: .word 0x02257744 -_022417C0: .word 0x000004C8 - thumb_func_end ov23_02241778 - - thumb_func_start ov23_022417C4 -ov23_022417C4: ; 0x022417C4 - ldr r0, _022417C8 ; =0x000004DC - bx lr - ; .align 2, 0 -_022417C8: .word 0x000004DC - thumb_func_end ov23_022417C4 - - thumb_func_start ov23_022417CC -ov23_022417CC: ; 0x022417CC - ldr r0, _022417D8 ; =0x02257744 - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _022417DC ; =0x000004DA - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_022417D8: .word 0x02257744 -_022417DC: .word 0x000004DA - thumb_func_end ov23_022417CC - - thumb_func_start ov23_022417E0 -ov23_022417E0: ; 0x022417E0 - ldr r0, _022417EC ; =0x02257744 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _022417F0 ; =0x000004DA - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_022417EC: .word 0x02257744 -_022417F0: .word 0x000004DA - thumb_func_end ov23_022417E0 - - thumb_func_start ov23_022417F4 -ov23_022417F4: ; 0x022417F4 - push {r3, lr} - ldr r0, _0224180C ; =0x02257744 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02241808 - bl sub_020181C4 - ldr r0, _0224180C ; =0x02257744 - mov r1, #0 - str r1, [r0, #0] -_02241808: - pop {r3, pc} - nop -_0224180C: .word 0x02257744 - thumb_func_end ov23_022417F4 - - thumb_func_start ov23_02241810 -ov23_02241810: ; 0x02241810 - push {r3, r4, r5, lr} - ldr r3, _02241880 ; =0x02257744 - ldr r2, _02241884 ; =0x000004DA - ldr r0, [r3, #0] - ldrb r1, [r0, r2] - cmp r1, #0 - bne _0224187E - sub r1, r2, #6 - ldr r1, [r0, r1] - add r4, r1, #1 - sub r1, r2, #6 - str r4, [r0, r1] - ldr r3, [r3, #0] - add r0, r1, #0 - ldr r1, [r3, r0] - mov r0, #0x7d - lsl r0, r0, #4 - cmp r1, r0 - blt _0224183C - mov r1, #0 - sub r0, r2, #6 - str r1, [r3, r0] -_0224183C: - ldr r0, _02241880 ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241888 ; =0x000004D4 - ldr r4, [r1, r0] - mov r1, #0x14 - add r0, r4, #0 - bl sub_020E1F6C - cmp r1, #0xa - bne _0224187E - add r0, r4, #0 - mov r1, #0x14 - bl sub_020E1F6C - add r5, r0, #0 - bl ov23_02241D18 - add r4, r0, #0 - add r0, r5, #0 - bl ov23_02241D38 - add r2, r0, #0 - cmp r4, #0 - beq _0224187E - cmp r2, #0 - beq _0224187E - ldr r0, _02241880 ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _0224188C ; =0x000004C8 - ldr r0, [r1, r0] - add r1, r4, #0 - bl ov5_021F57C8 -_0224187E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02241880: .word 0x02257744 -_02241884: .word 0x000004DA -_02241888: .word 0x000004D4 -_0224188C: .word 0x000004C8 - thumb_func_end ov23_02241810 - - thumb_func_start ov23_02241890 -ov23_02241890: ; 0x02241890 - push {r3, r4} - ldr r3, _022418BC ; =0x02257744 - lsl r1, r1, #2 - ldr r2, [r3, #0] - add r4, r2, r1 - mov r2, #0x32 - lsl r2, r2, #4 - ldr r4, [r4, r2] - cmp r4, #0 - bne _022418AA - mov r0, #0 - pop {r3, r4} - bx lr -_022418AA: - ldrh r4, [r4] - strh r4, [r0] - ldr r3, [r3, #0] - add r1, r3, r1 - ldr r1, [r1, r2] - ldrh r1, [r1, #2] - strh r1, [r0, #2] - pop {r3, r4} - bx lr - ; .align 2, 0 -_022418BC: .word 0x02257744 - thumb_func_end ov23_02241890 - - thumb_func_start ov23_022418C0 -ov23_022418C0: ; 0x022418C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - ldrh r0, [r0] - add r1, sp, #4 - strh r0, [r1] - ldr r0, [sp] - ldrh r0, [r0, #2] - strh r0, [r1, #2] - ldr r1, _02241920 ; =ov23_02241890 - mov r0, #0x64 - bl ov23_022427DC - add r0, sp, #4 - bl ov23_02242788 - add r4, r0, #0 - cmp r4, #0x64 - blt _022418EA - bl sub_02022974 -_022418EA: - mov r5, #0x63 - cmp r4, #0x63 - bge _0224190A - mov r7, #0xc7 - lsl r7, r7, #2 - ldr r1, _02241924 ; =0x02257744 - lsl r6, r5, #2 - add r0, r7, #4 -_022418FA: - ldr r2, [r1, #0] - sub r5, r5, #1 - add r3, r2, r6 - ldr r2, [r3, r7] - sub r6, r6, #4 - str r2, [r3, r0] - cmp r5, r4 - bgt _022418FA -_0224190A: - ldr r0, _02241924 ; =0x02257744 - ldr r1, [r0, #0] - lsl r0, r4, #2 - add r2, r1, r0 - mov r1, #0x32 - ldr r0, [sp] - lsl r1, r1, #4 - str r0, [r2, r1] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241920: .word ov23_02241890 -_02241924: .word 0x02257744 - thumb_func_end ov23_022418C0 - - thumb_func_start ov23_02241928 -ov23_02241928: ; 0x02241928 - push {r4, r5, r6, lr} - ldr r0, _0224195C ; =0x02257744 - mov r2, #0x32 - ldr r0, [r0, #0] - lsl r2, r2, #4 - add r0, r0, r2 - mov r1, #0 - lsr r2, r2, #1 - bl sub_020C4CF4 - mov r4, #0 - ldr r6, _0224195C ; =0x02257744 - add r5, r4, #0 -_02241942: - ldr r0, [r6, #0] - add r0, r0, r5 - ldrb r1, [r0, #6] - cmp r1, #0 - beq _02241950 - bl ov23_022418C0 -_02241950: - add r4, r4, #1 - add r5, #8 - cmp r4, #0x64 - blt _02241942 - pop {r4, r5, r6, pc} - nop -_0224195C: .word 0x02257744 - thumb_func_end ov23_02241928 - - thumb_func_start ov23_02241960 -ov23_02241960: ; 0x02241960 - mov r2, #0 -_02241962: - ldrb r1, [r0, #6] - cmp r1, #0 - beq _02241972 - add r2, r2, #1 - add r0, #8 - cmp r2, #0x64 - blt _02241962 - mov r0, #0 -_02241972: - bx lr - thumb_func_end ov23_02241960 - - thumb_func_start ov23_02241974 -ov23_02241974: ; 0x02241974 - bx lr - ; .align 2, 0 - thumb_func_end ov23_02241974 - - thumb_func_start ov23_02241978 -ov23_02241978: ; 0x02241978 - push {r3, lr} - add r2, sp, #0 - strh r0, [r2] - strh r1, [r2, #2] - ldr r1, _022419AC ; =ov23_02241890 - mov r0, #0x64 - bl ov23_022427DC - add r0, sp, #0 - bl ov23_0224271C - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0224199A - mov r0, #0 - pop {r3, pc} -_0224199A: - ldr r1, _022419B0 ; =0x02257744 - lsl r0, r0, #2 - ldr r1, [r1, #0] - add r1, r1, r0 - mov r0, #0x32 - lsl r0, r0, #4 - ldr r0, [r1, r0] - pop {r3, pc} - nop -_022419AC: .word ov23_02241890 -_022419B0: .word 0x02257744 - thumb_func_end ov23_02241978 - - thumb_func_start ov23_022419B4 -ov23_022419B4: ; 0x022419B4 - push {r3, r4, r5, lr} - add r4, r2, #0 - bl sub_0203608C - ldrb r1, [r4] - add r5, r0, #0 - cmp r1, r5 - bne _02241A68 - bl sub_02058D88 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02058DC0 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02241978 - add r4, r0, #0 - beq _02241A68 - bl sub_020594FC - ldrb r2, [r4, #4] - ldrb r1, [r4, #5] - ldrb r0, [r4, #6] - add r1, r2, r1 - bl ov23_0224F6E0 - cmp r0, #0 - beq _02241A5A - ldr r0, _02241A6C ; =0x02257744 - ldrb r2, [r4, #6] - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _02241A70 ; =0x000004CC - strb r2, [r1, r0] - ldr r0, _02241A74 ; =0x000005E3 - bl sub_02005748 - ldrb r1, [r4, #4] - ldrb r0, [r4, #5] - mov r5, #0x63 - add r0, r1, r0 - cmp r0, #0x63 - bge _02241A10 - add r5, r0, #0 -_02241A10: - bl ov23_0224219C - mov r1, #1 - add r2, r5, #0 - bl ov23_02254154 - bl ov23_0224219C - ldrb r2, [r4, #6] - mov r1, #2 - bl ov23_022541DC - ldrb r5, [r4, #5] - ldrb r1, [r4, #4] - add r0, r5, r1 - cmp r0, #0x63 - ble _02241A36 - mov r0, #0x63 - sub r5, r0, r1 -_02241A36: - bl ov23_0224219C - ldr r3, _02241A78 ; =ov23_022416B0 - mov r1, #0x45 - mov r2, #1 - str r5, [sp] - bl ov23_02253F78 - bl ov23_0224219C - bl ov23_02253F98 - add r0, r4, #0 - bl ov23_02241C48 - bl ov23_02241778 - pop {r3, r4, r5, pc} -_02241A5A: - bl ov23_0224219C - ldr r3, _02241A7C ; =ov23_022416A8 - mov r1, #0x53 - mov r2, #1 - bl ov23_02253F40 -_02241A68: - pop {r3, r4, r5, pc} - nop -_02241A6C: .word 0x02257744 -_02241A70: .word 0x000004CC -_02241A74: .word 0x000005E3 -_02241A78: .word ov23_022416B0 -_02241A7C: .word ov23_022416A8 - thumb_func_end ov23_022419B4 - - thumb_func_start ov23_02241A80 -ov23_02241A80: ; 0x02241A80 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0] - bx lr - thumb_func_end ov23_02241A80 - - thumb_func_start ov23_02241A88 -ov23_02241A88: ; 0x02241A88 - push {r3, r4, r5, r6} - ldrh r6, [r0, #2] - mov r2, #0 - ldrh r3, [r0] - cmp r6, #0 - blt _02241AE2 - add r5, r2, #0 -_02241A96: - sub r4, r3, r5 - cmp r4, #0 - ble _02241AA0 - add r3, r4, #0 - b _02241ADA -_02241AA0: - cmp r3, #0 - beq _02241AA6 - sub r3, r3, #1 -_02241AA6: - lsl r4, r2, #1 - cmp r3, r4 - bge _02241AB0 - sub r5, r2, r3 - b _02241AB4 -_02241AB0: - add r5, r2, r4 - sub r5, r3, r5 -_02241AB4: - cmp r3, r2 - blt _02241ACA - lsl r6, r2, #1 - add r6, r2, r6 - cmp r3, r6 - bge _02241AC4 - sub r3, r4, r3 - b _02241ACA -_02241AC4: - lsl r2, r2, #2 - neg r2, r2 - add r3, r2, r3 -_02241ACA: - strh r3, [r1] - strh r5, [r1, #2] - ldrh r1, [r0] - add r1, r1, #1 - strh r1, [r0] - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_02241ADA: - add r2, r2, #1 - add r5, r5, #4 - cmp r2, r6 - ble _02241A96 -_02241AE2: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov23_02241A88 - - thumb_func_start ov23_02241AE8 -ov23_02241AE8: ; 0x02241AE8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #8] - add r6, r2, #0 - add r1, sp, #0xc - add r7, r3, #0 - strh r6, [r1] - strh r7, [r1, #2] - ldr r0, [sp] - strb r5, [r1, #4] - strb r0, [r1, #6] - ldr r0, [sp, #8] - strb r0, [r1, #5] - add r0, r6, #0 - add r1, r7, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _02241B26 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x54 - add r3, r2, #0 - bl ov23_02253F40 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_02241B26: - add r0, r6, #0 - add r1, r7, #0 - bl sub_02058108 - cmp r0, #0 - beq _02241B44 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x37 - add r3, r2, #0 - bl ov23_02253F40 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_02241B44: - ldr r0, _02241C3C ; =0x02257744 - add r2, r7, #0 - ldr r1, [r0, #0] - ldr r0, _02241C40 ; =0x000004C8 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_02054F68 - cmp r0, #0 - beq _02241B6A - bl ov23_0224219C - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - bl ov23_02253F40 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_02241B6A: - add r0, r6, #0 - add r1, r7, #0 - bl ov23_02241978 - add r4, r0, #0 - add r0, sp, #0xc - beq _02241BC2 - ldrb r1, [r4, #6] - ldrb r0, [r0, #6] - cmp r1, r0 - bne _02241BB2 - ldrb r0, [r4, #4] - str r0, [sp, #4] - cmp r0, r5 - ble _02241B96 - add r0, r5, #0 - mov r1, #5 - bl sub_020E1F6C - ldr r1, [sp, #4] - add r0, r1, r0 - b _02241B9E -_02241B96: - mov r1, #5 - bl sub_020E1F6C - add r0, r5, r0 -_02241B9E: - add r0, r0, #1 - strb r0, [r4, #4] - ldrb r0, [r4, #4] - cmp r0, #0x63 - bls _02241BAC - mov r0, #0x63 - strb r0, [r4, #4] -_02241BAC: - mov r0, #1 - str r0, [sp, #8] - b _02241BCA -_02241BB2: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x3b - add r3, r2, #0 - bl ov23_02253F40 - b _02241BCA -_02241BC2: - bl ov23_02241CAC - mov r0, #1 - str r0, [sp, #8] -_02241BCA: - ldr r0, [sp, #8] - cmp r0, #0 - beq _02241C38 - bl ov23_0224219C - ldr r2, [sp] - mov r1, #0 - bl ov23_022541A0 - bl ov23_0224219C - mov r1, #1 - add r2, r5, #0 - bl ov23_02254154 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x3a - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, [sp] - bl ov23_02250128 - ldr r0, _02241C44 ; =0x00000631 - bl sub_02005748 - ldr r0, _02241C3C ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241C40 ; =0x000004C8 - ldr r0, [r1, r0] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206AA14 - ldr r0, _02241C3C ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241C40 ; =0x000004C8 - ldr r0, [r1, r0] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x2f - bl sub_0202CF28 - ldr r0, _02241C3C ; =0x02257744 - add r2, r7, #0 - ldr r1, [r0, #0] - ldr r0, _02241C40 ; =0x000004C8 - ldr r0, [r1, r0] - add r1, r6, #0 - bl ov5_021F57C8 -_02241C38: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241C3C: .word 0x02257744 -_02241C40: .word 0x000004C8 -_02241C44: .word 0x00000631 - thumb_func_end ov23_02241AE8 - - thumb_func_start ov23_02241C48 -ov23_02241C48: ; 0x02241C48 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _02241CA4 ; =0x02257744 - mov r1, #0 - ldr r0, [r0, #0] - mvn r1, r1 - mov r4, #0 -_02241C56: - cmp r0, r6 - bne _02241C5E - add r1, r4, #0 - b _02241C66 -_02241C5E: - add r4, r4, #1 - add r0, #8 - cmp r4, #0x64 - blt _02241C56 -_02241C66: - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - bne _02241C72 - bl sub_02022974 -_02241C72: - cmp r4, #0x63 - bge _02241C92 - ldr r7, _02241CA4 ; =0x02257744 - lsl r5, r4, #3 -_02241C7A: - add r0, r4, #1 - ldr r1, [r7, #0] - lsl r0, r0, #3 - add r0, r1, r0 - add r1, r1, r5 - mov r2, #8 - bl sub_020C4DB0 - add r4, r4, #1 - add r5, #8 - cmp r4, #0x63 - blt _02241C7A -_02241C92: - ldr r0, _02241CA4 ; =0x02257744 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _02241CA8 ; =0x0000031E - strb r2, [r1, r0] - add r0, r6, #0 - bl ov23_02241928 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241CA4: .word 0x02257744 -_02241CA8: .word 0x0000031E - thumb_func_end ov23_02241C48 - - thumb_func_start ov23_02241CAC -ov23_02241CAC: ; 0x02241CAC - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, _02241CF0 ; =0x02257744 - ldr r0, [r0, #0] - bl ov23_02241960 - add r5, r0, #0 - bne _02241CD8 - ldr r0, _02241CF0 ; =0x02257744 - ldr r0, [r0, #0] - bl ov23_02241974 - bl ov23_02241C48 - ldr r0, _02241CF0 ; =0x02257744 - ldr r0, [r0, #0] - bl ov23_02241960 - add r5, r0, #0 - bne _02241CD8 - bl sub_02022974 -_02241CD8: - add r0, r4, #0 - add r1, r5, #0 - mov r2, #8 - bl sub_020C4DB0 - add r0, r5, #0 - bl ov23_022418C0 - bl ov23_02241778 - pop {r3, r4, r5, pc} - nop -_02241CF0: .word 0x02257744 - thumb_func_end ov23_02241CAC - - thumb_func_start ov23_02241CF4 -ov23_02241CF4: ; 0x02241CF4 - cmp r0, #0 - beq _02241D00 - cmp r0, #0xb - bge _02241D00 - mov r0, #1 - bx lr -_02241D00: - mov r0, #0 - bx lr - thumb_func_end ov23_02241CF4 - - thumb_func_start ov23_02241D04 -ov23_02241D04: ; 0x02241D04 - push {r3, lr} - bl ov23_02241978 - cmp r0, #0 - beq _02241D12 - mov r0, #1 - pop {r3, pc} -_02241D12: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_02241D04 - - thumb_func_start ov23_02241D18 -ov23_02241D18: ; 0x02241D18 - ldr r1, _02241D34 ; =0x02257744 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02241D2E - lsl r1, r0, #3 - add r0, r2, r1 - ldrb r0, [r0, #6] - cmp r0, #0 - beq _02241D2E - ldrh r0, [r2, r1] - bx lr -_02241D2E: - mov r0, #0 - bx lr - nop -_02241D34: .word 0x02257744 - thumb_func_end ov23_02241D18 - - thumb_func_start ov23_02241D38 -ov23_02241D38: ; 0x02241D38 - ldr r1, _02241D54 ; =0x02257744 - ldr r1, [r1, #0] - cmp r1, #0 - beq _02241D4E - lsl r0, r0, #3 - add r1, r1, r0 - ldrb r0, [r1, #6] - cmp r0, #0 - beq _02241D4E - ldrh r0, [r1, #2] - bx lr -_02241D4E: - mov r0, #0 - bx lr - nop -_02241D54: .word 0x02257744 - thumb_func_end ov23_02241D38 - - thumb_func_start ov23_02241D58 -ov23_02241D58: ; 0x02241D58 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - ldr r0, _02241DF0 ; =0x02257744 - mov r5, #0 - ldr r2, [r0, #0] - add r6, r5, #0 - add r7, r5, #0 - cmp r2, #0 - bne _02241D6E - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_02241D6E: - ldr r0, _02241DF4 ; =0x000004CC - add r4, r5, #0 -_02241D72: - ldrb r1, [r2, r0] - cmp r1, #0 - beq _02241DCE - mov r0, #4 - bl sub_0200B358 - add r5, r0, #0 - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - ldr r2, _02241DF0 ; =0x02257744 - add r6, r0, #0 - ldr r2, [r2, #0] - add r0, r5, #0 - add r3, r2, r4 - ldr r2, _02241DF4 ; =0x000004CC - mov r1, #2 - ldrb r2, [r3, r2] - bl sub_0200BACC - add r0, r5, #0 - mov r1, #2 - bl sub_0200C324 - bl ov23_0224219C - bl ov23_02253E3C - mov r1, #0x5f - add r2, r6, #0 - bl sub_0200B1B8 - ldr r1, [sp] - add r0, r5, #0 - add r2, r6, #0 - bl sub_0200C388 - ldr r1, _02241DF0 ; =0x02257744 - mov r0, #0 - ldr r1, [r1, #0] - mov r7, #1 - add r2, r1, r4 - ldr r1, _02241DF4 ; =0x000004CC - strb r0, [r2, r1] - b _02241DD6 -_02241DCE: - add r4, r4, #1 - add r2, r2, #1 - cmp r4, #8 - blt _02241D72 -_02241DD6: - cmp r6, #0 - beq _02241DE0 - add r0, r6, #0 - bl sub_020237BC -_02241DE0: - cmp r5, #0 - beq _02241DEA - add r0, r5, #0 - bl sub_0200B3F0 -_02241DEA: - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241DF0: .word 0x02257744 -_02241DF4: .word 0x000004CC - thumb_func_end ov23_02241D58 - - thumb_func_start ov23_02241DF8 -ov23_02241DF8: ; 0x02241DF8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, _02241E44 ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241E48 ; =0x000004C8 - ldr r0, [r1, r0] - bl sub_0203D174 - bl sub_020298B0 - add r4, r0, #0 - mov r5, #0 -_02241E10: - add r0, r4, #0 - add r1, r5, #0 - bl sub_020290DC - cmp r0, #0 - beq _02241E38 - add r0, r4, #0 - add r1, r5, #0 - bl sub_020290E8 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_02029108 - add r1, r0, #0 - add r0, r6, #0 - add r2, r7, #0 - bl ov23_0223E650 -_02241E38: - add r5, r5, #1 - cmp r5, #0x64 - blt _02241E10 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02241E44: .word 0x02257744 -_02241E48: .word 0x000004C8 - thumb_func_end ov23_02241DF8 - - thumb_func_start ov23_02241E4C -ov23_02241E4C: ; 0x02241E4C - push {r4, lr} - add r4, r1, #0 - ldrh r0, [r4, #2] - add r0, r0, #1 - strh r0, [r4, #2] - ldrh r0, [r4, #2] - cmp r0, #0x64 - bls _02241E66 - ldr r0, _02241E68 ; =0x0000054A - bl sub_02005748 - mov r0, #0 - strh r0, [r4, #2] -_02241E66: - pop {r4, pc} - ; .align 2, 0 -_02241E68: .word 0x0000054A - thumb_func_end ov23_02241E4C - - thumb_func_start ov23_02241E6C -ov23_02241E6C: ; 0x02241E6C - push {r4, lr} - ldr r0, _02241EC4 ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241EC8 ; =0x000004C4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241E7E - bl sub_02022974 -_02241E7E: - ldr r0, _02241EC4 ; =0x02257744 - ldr r1, [r0, #0] - mov r0, #0x13 - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241E90 - bl sub_02022974 -_02241E90: - mov r0, #0xb - mov r1, #4 - bl sub_02018184 - mov r1, #0 - mov r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r2, #0x64 - ldr r0, _02241EC4 ; =0x02257744 - strh r2, [r4, #2] - ldr r1, [r0, #0] - ldr r0, _02241EC8 ; =0x000004C4 - str r4, [r1, r0] - ldr r0, _02241ECC ; =ov23_02241E4C - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02241EC4 ; =0x02257744 - ldr r2, [r1, #0] - mov r1, #0x13 - lsl r1, r1, #6 - str r0, [r2, r1] - pop {r4, pc} - nop -_02241EC4: .word 0x02257744 -_02241EC8: .word 0x000004C4 -_02241ECC: .word ov23_02241E4C - thumb_func_end ov23_02241E6C - - thumb_func_start ov23_02241ED0 -ov23_02241ED0: ; 0x02241ED0 - push {r3, lr} - ldr r0, _02241F04 ; =0x02257744 - ldr r1, [r0, #0] - mov r0, #0x13 - lsl r0, r0, #6 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02241F02 - bl sub_0200DA58 - ldr r0, _02241F04 ; =0x02257744 - ldr r1, [r0, #0] - ldr r0, _02241F08 ; =0x000004C4 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, _02241F04 ; =0x02257744 - mov r0, #0x13 - ldr r2, [r1, #0] - mov r3, #0 - lsl r0, r0, #6 - str r3, [r2, r0] - ldr r1, [r1, #0] - add r0, r0, #4 - str r3, [r1, r0] -_02241F02: - pop {r3, pc} - ; .align 2, 0 -_02241F04: .word 0x02257744 -_02241F08: .word 0x000004C4 - thumb_func_end ov23_02241ED0 - - thumb_func_start ov23_02241F0C -ov23_02241F0C: ; 0x02241F0C - push {r3, lr} - ldr r1, _02241F38 ; =0x02257744 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02241F32 - ldr r1, _02241F3C ; =0x000004C4 - ldr r1, [r2, r1] - cmp r1, #0 - beq _02241F32 - ldrh r1, [r1, #2] - lsr r1, r1, #1 - add r0, r1, r0 - mov r1, #0x64 - bl sub_020E1F6C - add r0, r1, #0 - bl ov23_02241D18 - pop {r3, pc} -_02241F32: - mov r0, #0 - pop {r3, pc} - nop -_02241F38: .word 0x02257744 -_02241F3C: .word 0x000004C4 - thumb_func_end ov23_02241F0C - - thumb_func_start ov23_02241F40 -ov23_02241F40: ; 0x02241F40 - push {r3, lr} - ldr r1, _02241F6C ; =0x02257744 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02241F66 - ldr r1, _02241F70 ; =0x000004C4 - ldr r1, [r2, r1] - cmp r1, #0 - beq _02241F66 - ldrh r1, [r1, #2] - lsr r1, r1, #1 - add r0, r1, r0 - mov r1, #0x64 - bl sub_020E1F6C - add r0, r1, #0 - bl ov23_02241D38 - pop {r3, pc} -_02241F66: - mov r0, #0 - pop {r3, pc} - nop -_02241F6C: .word 0x02257744 -_02241F70: .word 0x000004C4 - thumb_func_end ov23_02241F40 - - thumb_func_start ov23_02241F74 -ov23_02241F74: ; 0x02241F74 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl sub_02025E44 - bl sub_02027AC0 - add r4, r0, #0 - ldr r0, _022420E4 ; =0x02257748 - mov r2, #0x15 - str r6, [r0, #0] - add r0, r6, #0 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020C4CF4 - ldr r2, _022420E4 ; =0x02257748 - mov r3, #0x4d - ldr r0, [r2, #0] - lsl r3, r3, #2 - str r5, [r0, #0xc] - ldr r1, [r2, #0] - mov r0, #0 - strb r0, [r1, r3] - ldr r1, [r2, #0] - strh r0, [r1, #0x1c] - ldr r1, [r2, #0] - strh r0, [r1, #0x1e] - add r1, r3, #0 - ldr r6, [r2, #0] - add r1, #0x17 - strb r0, [r6, r1] - add r0, r3, #0 - ldr r1, [r2, #0] - mov r6, #1 - add r0, #0x13 - strb r6, [r1, r0] - add r3, #0xc0 - str r3, [sp] - ldr r0, _022420E8 ; =0x0000027A - ldr r2, [r5, #8] - mov r1, #0x21 - add r3, r4, #0 - bl ov23_02253D48 - ldr r1, _022420E4 ; =0x02257748 - add r3, r4, #0 - ldr r2, [r1, #0] - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r2, r1] - mov r0, #0 - str r0, [sp] - ldr r0, _022420EC ; =0x0000027E - ldr r2, [r5, #8] - mov r1, #0x21 - bl ov23_02253D48 - ldr r1, _022420E4 ; =0x02257748 - add r3, r4, #0 - ldr r2, [r1, #0] - mov r1, #0x47 - lsl r1, r1, #2 - str r0, [r2, r1] - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [sp] - mov r0, #0x9f - ldr r2, [r5, #8] - lsl r0, r0, #2 - mov r1, #0x21 - bl ov23_02253D48 - ldr r1, _022420E4 ; =0x02257748 - add r3, r4, #0 - ldr r2, [r1, #0] - mov r1, #0x12 - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #0 - str r0, [sp] - ldr r0, _022420F0 ; =0x0000027D - ldr r2, [r5, #8] - mov r1, #0x21 - bl ov23_02253D48 - ldr r1, _022420E4 ; =0x02257748 - add r3, r4, #0 - ldr r2, [r1, #0] - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r2, r1] - mov r0, #0 - str r0, [sp] - ldr r0, _022420F4 ; =0x00000276 - ldr r2, [r5, #8] - mov r1, #0x21 - bl ov23_02253D48 - ldr r2, _022420E4 ; =0x02257748 - mov r1, #0x4a - ldr r3, [r2, #0] - lsl r1, r1, #2 - str r0, [r3, r1] - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r2, #0] - ldr r2, _022420F8 ; =0x000003E2 - ldr r0, [r0, #0xc] - mov r1, #3 - ldr r0, [r0, #8] - mov r3, #0xa - bl sub_0200DD0C - mov r3, #0x80 - str r3, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0x32 - mov r1, #0x34 - mov r2, #0 - add r3, #0xc0 - bl sub_02006E84 - mov r0, #2 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, _022420E4 ; =0x02257748 - ldr r2, _022420FC ; =0x000003D9 - ldr r0, [r0, #0] - mov r1, #3 - ldr r0, [r0, #0xc] - mov r3, #0xb - ldr r0, [r0, #8] - bl sub_0200DAA4 - mov r3, #0 - ldr r0, _022420E4 ; =0x02257748 - add r4, r3, #0 - mov r2, #0xff - add r1, r3, #0 -_02242098: - ldr r5, [r0, #0] - add r5, r5, r3 - add r5, #0xc2 - strb r2, [r5] - ldr r5, [r0, #0] - add r5, r5, r3 - add r5, #0xd2 - strb r2, [r5] - ldr r5, [r0, #0] - add r3, r3, #1 - add r5, r5, r4 - add r5, #0xdc - add r4, r4, #4 - str r1, [r5, #0] - cmp r3, #8 - blt _02242098 - ldr r0, _022420E4 ; =0x02257748 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206A9F4 - mov r1, #0 - ldr r0, _02242100 ; =ov23_02243310 - add r2, r1, #0 - bl sub_0200D9E8 - ldr r1, _022420E4 ; =0x02257748 - ldr r1, [r1, #0] - str r0, [r1, #0x14] - ldr r0, _02242104 ; =ov23_022433F4 - bl sub_02032110 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_022420E4: .word 0x02257748 -_022420E8: .word 0x0000027A -_022420EC: .word 0x0000027E -_022420F0: .word 0x0000027D -_022420F4: .word 0x00000276 -_022420F8: .word 0x000003E2 -_022420FC: .word 0x000003D9 -_02242100: .word ov23_02243310 -_02242104: .word ov23_022433F4 - thumb_func_end ov23_02241F74 - - thumb_func_start ov23_02242108 -ov23_02242108: ; 0x02242108 - push {r4, r5, r6, lr} - mov r4, #0 - ldr r6, _02242198 ; =0x02257748 - add r5, r4, #0 -_02242110: - ldr r0, [r6, #0] - add r0, r0, r5 - add r0, #0xdc - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242120 - bl sub_020237BC -_02242120: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _02242110 - mov r0, #0 - bl sub_02032110 - ldr r0, _02242198 ; =0x02257748 - ldr r0, [r0, #0] - ldr r0, [r0, #0x14] - bl sub_0200DA58 - ldr r0, _02242198 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02253DD8 - ldr r0, _02242198 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02253DD8 - ldr r0, _02242198 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov23_02253DD8 - ldr r0, _02242198 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02253DD8 - ldr r0, _02242198 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02253DD8 - ldr r0, _02242198 ; =0x02257748 - mov r2, #0 - ldr r1, [r0, #0] - ldr r1, [r1, #0xc] - add r1, #0x90 - str r2, [r1, #0] - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, _02242198 ; =0x02257748 - mov r1, #0 - str r1, [r0, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02242198: .word 0x02257748 - thumb_func_end ov23_02242108 - - thumb_func_start ov23_0224219C -ov23_0224219C: ; 0x0224219C - ldr r0, _022421A8 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bx lr - ; .align 2, 0 -_022421A8: .word 0x02257748 - thumb_func_end ov23_0224219C - - thumb_func_start ov23_022421AC -ov23_022421AC: ; 0x022421AC - ldr r0, _022421B8 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bx lr - ; .align 2, 0 -_022421B8: .word 0x02257748 - thumb_func_end ov23_022421AC - - thumb_func_start ov23_022421BC -ov23_022421BC: ; 0x022421BC - ldr r0, _022421C8 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bx lr - ; .align 2, 0 -_022421C8: .word 0x02257748 - thumb_func_end ov23_022421BC - - thumb_func_start ov23_022421CC -ov23_022421CC: ; 0x022421CC - ldr r0, _022421D8 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bx lr - ; .align 2, 0 -_022421D8: .word 0x02257748 - thumb_func_end ov23_022421CC - - thumb_func_start ov23_022421DC -ov23_022421DC: ; 0x022421DC - ldr r0, _022421E8 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r1, r0] - bx lr - ; .align 2, 0 -_022421E8: .word 0x02257748 - thumb_func_end ov23_022421DC - - thumb_func_start ov23_022421EC -ov23_022421EC: ; 0x022421EC - push {r3, lr} - ldr r0, _02242238 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254210 - ldr r0, _02242238 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254210 - ldr r0, _02242238 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov23_02254210 - ldr r0, _02242238 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254210 - ldr r0, _02242238 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254210 - pop {r3, pc} - nop -_02242238: .word 0x02257748 - thumb_func_end ov23_022421EC - - thumb_func_start ov23_0224223C -ov23_0224223C: ; 0x0224223C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - str r2, [sp] - str r3, [sp, #4] - cmp r5, #0 - beq _022422A2 - cmp r6, #0 - beq _022422A2 - mov r0, #4 - bl sub_0200B358 - add r4, r0, #0 - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - add r7, r0, #0 - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_0200B498 - add r0, r4, #0 - mov r1, #1 - add r2, r6, #0 - bl sub_0200B498 - bl ov23_0224219C - bl ov23_02253E3C - ldr r1, [sp] - add r2, r7, #0 - bl sub_0200B1B8 - ldr r1, [sp, #4] - add r0, r4, #0 - add r2, r7, #0 - bl sub_0200C388 - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B3F0 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022422A2: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0224223C - - thumb_func_start ov23_022422A8 -ov23_022422A8: ; 0x022422A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp] - str r3, [sp, #4] - cmp r5, #0 - beq _02242300 - mov r0, #4 - bl sub_0200B358 - add r4, r0, #0 - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - add r6, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_0200B498 - bl ov23_0224219C - bl ov23_02253E3C - ldr r1, [sp] - add r2, r6, #0 - bl sub_0200B1B8 - ldr r1, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B3F0 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02242300: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_022422A8 - - thumb_func_start ov23_02242308 -ov23_02242308: ; 0x02242308 - push {r3, r4, r5, r6, r7, lr} - ldr r4, _02242404 ; =0x02257748 - add r6, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _02242318 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242318: - mov r5, #0 -_0224231A: - add r0, r5, #0 - bl sub_02032DE0 - cmp r0, #0 - beq _02242346 - add r0, r5, #0 - bl sub_02032EE8 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02032E30 - add r0, r7, #0 - mov r1, #1 - mov r2, #0x5b - add r3, r6, #0 - bl ov23_022422A8 - cmp r0, #0 - beq _02242346 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02242346: - ldr r0, [r4, #0] - add r0, r0, r5 - add r0, #0xc2 - ldrb r0, [r0] - cmp r0, #0xff - beq _02242384 - add r0, r5, #0 - bl sub_02032EE8 - add r7, r0, #0 - ldr r0, [r4, #0] - add r0, r0, r5 - add r0, #0xc2 - ldrb r0, [r0] - bl sub_02032EE8 - add r1, r0, #0 - ldr r0, [r4, #0] - add r3, r6, #0 - add r2, r0, r5 - add r2, #0xc2 - mov r0, #0xff - strb r0, [r2] - add r0, r7, #0 - mov r2, #0x6f - bl ov23_0224223C - cmp r0, #0 - beq _02242384 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02242384: - ldr r0, [r4, #0] - add r0, r0, r5 - add r0, #0xd2 - ldrb r0, [r0] - cmp r0, #0xff - beq _022423B2 - add r0, r5, #0 - bl sub_02032EE8 - ldr r1, [r4, #0] - add r3, r6, #0 - add r2, r1, r5 - add r2, #0xd2 - mov r1, #0xff - strb r1, [r2] - mov r1, #0 - mov r2, #0x70 - bl ov23_022422A8 - cmp r0, #0 - beq _022423B2 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022423B2: - ldr r0, [r4, #0] - ldr r1, _02242408 ; =0x0000013D - add r2, r0, r5 - ldrb r1, [r2, r1] - cmp r1, #1 - bne _022423FA - lsl r4, r5, #2 - add r0, r0, r4 - add r0, #0xdc - ldr r1, [r0, #0] - cmp r1, #0 - beq _022423EA - add r0, r6, #0 - bl sub_02023810 - ldr r0, _02242404 ; =0x02257748 - ldr r0, [r0, #0] - add r0, r0, r4 - add r0, #0xdc - ldr r0, [r0, #0] - bl sub_020237BC - ldr r0, _02242404 ; =0x02257748 - mov r1, #0 - ldr r0, [r0, #0] - add r0, r0, r4 - add r0, #0xdc - str r1, [r0, #0] -_022423EA: - ldr r0, _02242404 ; =0x02257748 - mov r2, #0 - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _02242408 ; =0x0000013D - strb r2, [r1, r0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022423FA: - add r5, r5, #1 - cmp r5, #8 - blt _0224231A - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242404: .word 0x02257748 -_02242408: .word 0x0000013D - thumb_func_end ov23_02242308 - - thumb_func_start ov23_0224240C -ov23_0224240C: ; 0x0224240C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - add r0, sp, #0 - strh r5, [r0] - strh r4, [r0, #2] - ldr r0, _02242454 ; =0x02257748 - add r1, r5, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - ldr r0, [r0, #0xc] - bl sub_02054F68 - cmp r0, #0 - beq _0224242E - mov r0, #1 - pop {r3, r4, r5, pc} -_0224242E: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_022442D8 - cmp r0, #0 - beq _0224243E - mov r0, #1 - pop {r3, r4, r5, pc} -_0224243E: - mov r1, #0 - add r0, sp, #0 - mvn r1, r1 - bl ov23_022512D4 - cmp r0, #0xff - beq _02242450 - mov r0, #1 - pop {r3, r4, r5, pc} -_02242450: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242454: .word 0x02257748 - thumb_func_end ov23_0224240C - - thumb_func_start ov23_02242458 -ov23_02242458: ; 0x02242458 - push {r4, lr} - sub sp, #0x18 - ldr r3, _02242534 ; =0x02257748 - ldr r2, _02242538 ; =0x00000146 - ldr r0, [r3, #0] - ldrb r1, [r0, r2] - cmp r1, #0 - bne _02242472 - add r1, r2, #0 - sub r1, #0x12 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _02242486 -_02242472: - mov r1, #0x4d - lsl r1, r1, #2 - ldrb r2, [r0, r1] - cmp r2, #0 - beq _02242480 - sub r2, r2, #1 - strb r2, [r0, r1] -_02242480: - add sp, #0x18 - mov r0, #0 - pop {r4, pc} -_02242486: - ldr r1, _0224253C ; =0x021BF6BC - ldrh r1, [r1, #0x20] - cmp r1, #0 - beq _0224252C - add r1, r2, #0 - mov r4, #0x1e - sub r1, #0x12 - strb r4, [r0, r1] - ldr r1, [r3, #0] - add r0, r2, #5 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224252C - bl sub_02057FAC - cmp r0, #0 - beq _0224252C - bl sub_0203608C - bl ov23_0224ACC0 - cmp r0, #0 - bne _0224252C - bl sub_020360F0 - cmp r0, #0 - beq _022424C2 - add sp, #0x18 - mov r0, #0 - pop {r4, pc} -_022424C2: - bl sub_0203608C - bl sub_020593CC - cmp r0, #0 - beq _022424D4 - add sp, #0x18 - mov r0, #0 - pop {r4, pc} -_022424D4: - ldr r3, _02242534 ; =0x02257748 - ldr r2, _0224253C ; =0x021BF6BC - ldr r3, [r3, #0] - ldrh r1, [r2, #0x1c] - ldr r3, [r3, #0xc] - ldrh r2, [r2, #0x1e] - add r3, #0x8c - ldr r3, [r3, #0] - add r0, sp, #0xc - bl ov5_021EAFA4 - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x14] - add r2, sp, #8 - add r3, sp, #4 - bl ov5_021E9230 - ldr r1, [sp, #8] - add r0, sp, #0 - strh r1, [r0] - ldr r1, [sp, #4] - strh r1, [r0, #2] - ldr r1, _0224253C ; =0x021BF6BC - ldr r0, _02242534 ; =0x02257748 - ldrh r3, [r1, #0x1c] - ldr r2, [r0, #0] - strh r3, [r2, #0x18] - ldrh r2, [r1, #0x1e] - ldr r1, [r0, #0] - strh r2, [r1, #0x1a] - ldr r2, [sp, #8] - ldr r1, [r0, #0] - strh r2, [r1, #0x1c] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - mov r2, #4 - strh r1, [r0, #0x1e] - mov r0, #0x30 - add r1, sp, #0 - bl sub_020359DC - add sp, #0x18 - mov r0, #1 - pop {r4, pc} -_0224252C: - mov r0, #0 - add sp, #0x18 - pop {r4, pc} - nop -_02242534: .word 0x02257748 -_02242538: .word 0x00000146 -_0224253C: .word 0x021BF6BC - thumb_func_end ov23_02242458 - - thumb_func_start ov23_02242540 -ov23_02242540: ; 0x02242540 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r2, #0 - str r0, [sp] - ldrh r0, [r6] - str r1, [sp, #4] - mov r1, #6 - sub r0, r0, #6 - str r0, [sp, #0xc] - ldrh r0, [r6, #2] - mov r4, #1 - sub r0, r0, #6 - str r0, [sp, #8] - add r0, sp, #0x14 - bl ov23_02241A80 - add r0, sp, #0x14 - add r1, sp, #0x10 - bl ov23_02241A88 - cmp r0, #0 - beq _022425B0 -_0224256C: - add r1, sp, #0x10 - mov r0, #0 - ldrh r2, [r6] - ldrsh r0, [r1, r0] - add r5, r2, r0 - mov r0, #2 - ldrh r2, [r6, #2] - ldrsh r0, [r1, r0] - add r7, r2, r0 - ldr r2, [sp, #4] - add r0, r5, #0 - add r1, r7, #0 - blx r2 - cmp r0, #0 - beq _022425A4 - ldr r0, [sp, #0xc] - sub r1, r5, r0 - ldr r0, [sp, #8] - sub r0, r7, r0 - lsl r0, r0, #4 - add r1, r1, r0 - ldr r0, [sp] - cmp r4, #8 - strb r1, [r0, r4] - bne _022425A2 - add r4, r4, #1 - b _022425B0 -_022425A2: - add r4, r4, #1 -_022425A4: - add r0, sp, #0x14 - add r1, sp, #0x10 - bl ov23_02241A88 - cmp r0, #0 - bne _0224256C -_022425B0: - add r0, r4, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02242540 - - thumb_func_start ov23_022425B8 -ov23_022425B8: ; 0x022425B8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - strb r0, [r1] - ldr r1, _022425F0 ; =ov23_022442D8 - add r0, sp, #0 - add r2, r4, #0 - bl ov23_02242540 - add r2, r0, #0 - mov r0, #0x31 - add r1, sp, #0 - bl sub_02035AC4 - ldr r1, _022425F4 ; =ov23_02241200 - add r0, sp, #0 - add r2, r4, #0 - bl ov23_02242540 - add r2, r0, #0 - mov r0, #0x32 - add r1, sp, #0 - bl sub_02035AC4 - add sp, #0xc - pop {r3, r4, pc} - nop -_022425F0: .word ov23_022442D8 -_022425F4: .word ov23_02241200 - thumb_func_end ov23_022425B8 - - thumb_func_start ov23_022425F8 -ov23_022425F8: ; 0x022425F8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - bl sub_02059094 - cmp r0, #0 - beq _02242620 - add r0, r5, #0 - bl ov23_0224ACC0 - cmp r0, #0 - bne _02242620 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_022425B8 -_02242620: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_022425F8 - - thumb_func_start ov23_02242624 -ov23_02242624: ; 0x02242624 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0224264E - ldr r1, _02242650 ; =0x02257748 - add r0, r4, #1 - ldr r1, [r1, #0] - sub r2, r5, #1 - add r1, #0xfc - bl sub_020C4DB0 - ldr r0, _02242650 ; =0x02257748 - sub r2, r5, #1 - ldr r1, [r0, #0] - mov r0, #0x52 - lsl r0, r0, #2 - strb r2, [r1, r0] -_0224264E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242650: .word 0x02257748 - thumb_func_end ov23_02242624 - - thumb_func_start ov23_02242654 -ov23_02242654: ; 0x02242654 - push {r3, r4, r5, lr} - sub sp, #0x28 - add r4, r2, #0 - add r5, r1, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _022426EE - ldr r1, _022426F4 ; =0x02257748 - add r0, r4, #1 - ldr r2, [r1, #0] - mov r1, #0x41 - lsl r1, r1, #2 - add r1, r2, r1 - sub r2, r5, #1 - bl sub_020C4DB0 - ldr r2, _022426F4 ; =0x02257748 - ldr r0, _022426F8 ; =0x00000149 - ldr r1, [r2, #0] - sub r3, r5, #1 - strb r3, [r1, r0] - ldr r2, [r2, #0] - ldr r1, _022426FC ; =ov23_02241D04 - add r0, sp, #0x1c - add r2, #0x1c - bl ov23_02242540 - ldr r1, _022426F4 ; =0x02257748 - ldr r2, _02242700 ; =0x0000014A - ldr r3, [r1, #0] - strb r0, [r3, r2] - ldr r3, [r1, #0] - ldrb r0, [r3, r2] - sub r0, r0, #1 - strb r0, [r3, r2] - ldr r3, [r1, #0] - add r1, r2, #0 - add r0, sp, #0x1c - sub r1, #0x3e - ldrb r2, [r3, r2] - add r0, #1 - add r1, r3, r1 - bl sub_020C4DB0 - ldr r0, _022426F4 ; =0x02257748 - ldr r3, [r0, #0] - ldrh r0, [r3, #0x1a] - str r0, [sp] - add r0, r3, #0 - add r0, #0xfc - str r0, [sp, #4] - mov r0, #0x52 - lsl r0, r0, #2 - ldrb r1, [r3, r0] - str r1, [sp, #8] - add r1, r0, #0 - sub r1, #0x44 - add r1, r3, r1 - str r1, [sp, #0xc] - add r1, r0, #1 - ldrb r1, [r3, r1] - str r1, [sp, #0x10] - add r1, r0, #0 - sub r1, #0x3c - add r1, r3, r1 - str r1, [sp, #0x14] - add r0, r0, #2 - ldrb r0, [r3, r0] - str r0, [sp, #0x18] - ldr r0, [r3, #0xc] - ldrh r1, [r3, #0x1c] - ldrh r2, [r3, #0x1e] - ldrh r3, [r3, #0x18] - bl ov23_022489F8 -_022426EE: - add sp, #0x28 - pop {r3, r4, r5, pc} - nop -_022426F4: .word 0x02257748 -_022426F8: .word 0x00000149 -_022426FC: .word ov23_02241D04 -_02242700: .word 0x0000014A - thumb_func_end ov23_02242654 - - thumb_func_start ov23_02242704 -ov23_02242704: ; 0x02242704 - cmp r0, #0 - bne _0224270E - mov r0, #0xe1 - lsl r0, r0, #0xc - bx lr -_0224270E: - ldrh r1, [r0, #2] - ldrh r2, [r0] - mov r0, #0xf - lsl r0, r0, #6 - mul r0, r1 - add r0, r2, r0 - bx lr - thumb_func_end ov23_02242704 - - thumb_func_start ov23_0224271C -ov23_0224271C: ; 0x0224271C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r1, _02242784 ; =0x02257748 - mov r4, #0 - ldr r2, [r1, #0] - mov r1, #0x4b - lsl r1, r1, #2 - ldr r1, [r2, r1] - sub r5, r1, #1 - bl ov23_02242704 - str r0, [sp] - ldr r0, _02242784 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x45 - lsl r0, r0, #2 - ldr r7, [r1, r0] - cmp r5, #0 - ble _02242764 -_02242742: - add r1, r4, r5 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r6, r0, #1 - add r0, sp, #4 - add r1, r6, #0 - blx r7 - bl ov23_02242704 - ldr r1, [sp] - cmp r0, r1 - bge _0224275E - add r4, r6, #1 - b _02242760 -_0224275E: - add r5, r6, #0 -_02242760: - cmp r4, r5 - blt _02242742 -_02242764: - add r0, sp, #4 - add r1, r4, #0 - blx r7 - bl ov23_02242704 - ldr r1, [sp] - cmp r1, r0 - bne _0224277A - add sp, #8 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224277A: - mov r0, #0 - mvn r0, r0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02242784: .word 0x02257748 - thumb_func_end ov23_0224271C - - thumb_func_start ov23_02242788 -ov23_02242788: ; 0x02242788 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r1, _022427D8 ; =0x02257748 - mov r4, #0 - ldr r2, [r1, #0] - mov r1, #0x4b - lsl r1, r1, #2 - ldr r1, [r2, r1] - sub r5, r1, #2 - bl ov23_02242704 - str r0, [sp] - ldr r0, _022427D8 ; =0x02257748 - add r5, r5, #1 - ldr r1, [r0, #0] - mov r0, #0x45 - lsl r0, r0, #2 - ldr r7, [r1, r0] - cmp r5, #0 - ble _022427D2 -_022427B0: - add r1, r4, r5 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r6, r0, #1 - add r0, sp, #4 - add r1, r6, #0 - blx r7 - bl ov23_02242704 - ldr r1, [sp] - cmp r0, r1 - bge _022427CC - add r4, r6, #1 - b _022427CE -_022427CC: - add r5, r6, #0 -_022427CE: - cmp r4, r5 - blt _022427B0 -_022427D2: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022427D8: .word 0x02257748 - thumb_func_end ov23_02242788 - - thumb_func_start ov23_022427DC -ov23_022427DC: ; 0x022427DC - push {r3, r4} - ldr r3, _022427F4 ; =0x02257748 - mov r2, #0x45 - ldr r4, [r3, #0] - lsl r2, r2, #2 - str r1, [r4, r2] - ldr r1, [r3, #0] - add r2, #0x18 - str r0, [r1, r2] - pop {r3, r4} - bx lr - nop -_022427F4: .word 0x02257748 - thumb_func_end ov23_022427DC - - thumb_func_start ov23_022427F8 -ov23_022427F8: ; 0x022427F8 - push {r3, lr} - bl sub_0203608C - bl sub_020593CC - cmp r0, #0 - bne _02242810 - mov r0, #0x1b - bl sub_020360DC - bl sub_0203572C -_02242810: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_022427F8 - - thumb_func_start ov23_02242814 -ov23_02242814: ; 0x02242814 - ldr r0, _02242828 ; =0x02257748 - ldr r2, [r0, #0] - ldr r0, _0224282C ; =0x00000146 - ldrb r1, [r2, r0] - cmp r1, #0 - beq _02242824 - sub r1, r1, #1 - strb r1, [r2, r0] -_02242824: - bx lr - nop -_02242828: .word 0x02257748 -_0224282C: .word 0x00000146 - thumb_func_end ov23_02242814 - - thumb_func_start ov23_02242830 -ov23_02242830: ; 0x02242830 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _022428CC ; =0x02257748 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r4, r0, #0 - ldr r0, _022428CC ; =0x02257748 - ldr r2, [r0, #0] - ldr r0, _022428D0 ; =0x00000146 - ldrb r1, [r2, r0] - cmp r1, #0 - beq _02242858 - sub r0, #0x12 - ldrb r0, [r2, r0] - cmp r0, #0 - bne _022428C6 -_02242858: - bl sub_0203608C - bl sub_020593CC - cmp r0, #0 - bne _022428C6 - add r0, r4, #0 - bl sub_02028E28 - cmp r0, #0x28 - bne _02242876 - mov r0, #0x10 - orr r0, r5 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 -_02242876: - bl sub_0203608C - bl sub_02058D88 - add r4, r0, #0 - bl sub_0203608C - bl sub_02058DC0 - add r6, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov23_02241D04 - cmp r0, #0 - beq _0224289E - mov r0, #0x20 - orr r0, r5 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 -_0224289E: - mov r0, #0xf - add r2, r6, #0 - and r2, r0 - lsl r0, r4, #0x1c - add r1, sp, #0 - lsr r0, r0, #0x18 - strb r5, [r1] - add r0, r2, r0 - strb r0, [r1, #1] - mov r0, #0x1c - add r1, sp, #0 - bl sub_020360D0 - bl sub_0203572C - ldr r0, _022428CC ; =0x02257748 - mov r2, #8 - ldr r1, [r0, #0] - ldr r0, _022428D0 ; =0x00000146 - strb r2, [r1, r0] -_022428C6: - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_022428CC: .word 0x02257748 -_022428D0: .word 0x00000146 - thumb_func_end ov23_02242830 - - thumb_func_start ov23_022428D4 -ov23_022428D4: ; 0x022428D4 - mov r0, #2 - bx lr - thumb_func_end ov23_022428D4 - - thumb_func_start ov23_022428D8 -ov23_022428D8: ; 0x022428D8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r1, sp, #0 - add r6, r2, #0 - strb r5, [r1] - bl sub_02058EE0 - add r1, sp, #0 - strh r0, [r1, #2] - add r0, r5, #0 - bl sub_02058F18 - add r1, sp, #0 - strh r0, [r1, #4] - add r0, r5, #0 - bl sub_02058DF8 - ldr r1, _02242B10 ; =0x0000FFFF - cmp r0, r1 - bne _0224290E - add r0, r5, #0 - bl sub_02058E4C - ldr r1, _02242B10 ; =0x0000FFFF - cmp r0, r1 - beq _022429C2 -_0224290E: - add r0, r5, #0 - bl sub_02059094 - cmp r0, #0 - beq _022429C2 - add r0, r5, #0 - bl ov23_0224ACC0 - cmp r0, #0 - bne _022429C2 - add r1, sp, #0 - ldrh r0, [r1, #2] - ldrh r1, [r1, #4] - bl sub_0205900C - add r4, r0, #0 - cmp r4, #0xff - bne _02242934 - b _02242A3A -_02242934: - bl ov23_0224C1C8 - cmp r0, #0 - bne _022429C2 - add r0, r4, #0 - bl ov23_0224162C - cmp r0, #0 - beq _02242968 - mov r1, #4 - add r0, sp, #0 - strb r1, [r0, #6] - strb r4, [r0, #8] - add r1, sp, #4 - strb r5, [r0, #7] - mov r0, #0x1e - add r1, #2 - mov r2, #3 - bl sub_02035AC4 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242968: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov23_0224A658 - cmp r0, #0 - bne _022429C2 - add r0, r4, #0 - bl ov23_0224ACC0 - cmp r0, #0 - beq _022429B8 - add r0, r4, #0 - bl ov23_02244470 - cmp r0, #0 - bne _02242996 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02245560 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242996: - mov r1, #2 - add r0, sp, #0 - strb r1, [r0, #6] - strb r4, [r0, #8] - add r1, sp, #4 - strb r5, [r0, #7] - mov r0, #0x1e - add r1, #2 - mov r2, #3 - bl sub_02035AC4 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_022429B8: - add r0, r5, #0 - bl sub_02059094 - cmp r0, #0 - bne _022429C4 -_022429C2: - b _02242B0C -_022429C4: - add r0, r4, #0 - bl sub_02059094 - cmp r0, #0 - beq _022429D8 - add r0, r4, #0 - bl sub_020593E0 - cmp r0, #0 - beq _022429FA -_022429D8: - mov r1, #2 - add r0, sp, #0 - strb r1, [r0, #6] - strb r4, [r0, #8] - add r1, sp, #4 - strb r5, [r0, #7] - mov r0, #0x1e - add r1, #2 - mov r2, #3 - bl sub_02035AC4 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_022429FA: - mov r1, #1 - add r0, sp, #0 - strb r1, [r0, #6] - strb r4, [r0, #8] - strb r5, [r0, #7] - add r0, r4, #0 - bl sub_02059094 - cmp r0, #0 - beq _02242B0C - add r1, sp, #4 - mov r0, #0x1e - add r1, #2 - mov r2, #3 - bl sub_02035AC4 - cmp r0, #0 - beq _02242B0C - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add r0, r4, #0 - mov r1, #0 - bl sub_02059058 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02058FB0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242A3A: - ldrb r2, [r6] - add r1, sp, #0 - add r0, r5, #0 - add r1, #2 - bl ov23_02244080 - cmp r0, #0 - beq _02242A56 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242A56: - add r1, sp, #0 - add r0, r5, #0 - add r1, #2 - bl ov23_0223E354 - cmp r0, #0 - beq _02242A70 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242A70: - add r1, sp, #0 - add r0, r5, #0 - add r1, #2 - bl ov23_02251324 - cmp r0, #0 - beq _02242A8A - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242A8A: - add r1, sp, #0 - add r0, r5, #0 - add r1, #2 - bl ov23_0224D454 - cmp r0, #0 - beq _02242AA4 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242AA4: - add r1, sp, #0 - ldrh r0, [r1, #2] - ldrh r1, [r1, #4] - bl sub_02058108 - cmp r0, #0 - beq _02242AD4 - add r0, r5, #0 - mov r1, #0xff - mov r2, #0 - bl ov23_0224A658 - cmp r0, #0 - bne _02242B0C - mov r0, #0x18 - add r1, sp, #0 - bl sub_02035B48 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02242AD4: - ldrb r1, [r6] - mov r0, #0x20 - tst r0, r1 - beq _02242B0C - add r0, r5, #0 - bl ov23_0224A6B8 - cmp r0, #0 - bne _02242B0C - add r2, sp, #0 - ldrh r3, [r2, #4] - mov r1, #0xf - ldrb r0, [r6, #1] - and r3, r1 - ldrh r1, [r2, #2] - lsl r1, r1, #0x1c - lsr r1, r1, #0x18 - add r1, r3, r1 - cmp r0, r1 - bne _02242B0C - mov r0, #0x3f - add r1, sp, #0 - bl sub_02035B48 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 -_02242B0C: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02242B10: .word 0x0000FFFF - thumb_func_end ov23_022428D8 - - thumb_func_start ov23_02242B14 -ov23_02242B14: ; 0x02242B14 - push {r3, r4, r5, r6, r7, lr} - bl sub_0203608C - cmp r0, #0 - bne _02242B6C - mov r5, #0 - ldr r4, _02242BB0 ; =0x02257748 - add r7, r5, #0 - mov r6, #1 -_02242B26: - add r0, r5, #0 - bl sub_02032EE8 - cmp r0, #0 - beq _02242B42 - ldr r0, [r4, #0] - add r1, r0, r5 - ldr r0, _02242BB4 ; =0x00000135 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02242B42 - add r0, r5, #0 - bl ov23_0224B5CC -_02242B42: - add r0, r5, #0 - bl sub_02032EE8 - cmp r0, #0 - ldr r0, [r4, #0] - beq _02242B56 - add r1, r0, r5 - ldr r0, _02242BB4 ; =0x00000135 - strb r6, [r1, r0] - b _02242B5C -_02242B56: - add r1, r0, r5 - ldr r0, _02242BB4 ; =0x00000135 - strb r7, [r1, r0] -_02242B5C: - add r5, r5, #1 - cmp r5, #8 - blt _02242B26 - bl ov23_022433D0 - add r0, r0, #2 - bl sub_02037B58 -_02242B6C: - ldr r0, _02242BB0 ; =0x02257748 - ldr r2, [r0, #0] - ldr r0, _02242BB8 ; =0x00000145 - ldrb r1, [r2, r0] - add r1, r1, #1 - strb r1, [r2, r0] - bl sub_0203608C - cmp r0, #0 - bne _02242B8E - bl sub_02032CE8 - cmp r0, #0 - beq _02242B8E - mov r0, #1 - bl sub_02057AE4 -_02242B8E: - bl ov23_02241810 - bl ov23_02243AE8 - bl ov23_0223E878 - ldr r0, _02242BB0 ; =0x02257748 - ldr r1, [r0, #0] - ldr r0, _02242BBC ; =0x0000014B - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02242BAE - ldr r0, [r1, #0xc] - ldr r0, [r0, #8] - bl ov23_022468A8 -_02242BAE: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242BB0: .word 0x02257748 -_02242BB4: .word 0x00000135 -_02242BB8: .word 0x00000145 -_02242BBC: .word 0x0000014B - thumb_func_end ov23_02242B14 - - thumb_func_start ov23_02242BC0 -ov23_02242BC0: ; 0x02242BC0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _02242C74 ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02242C70 - mov r1, #0x15 - mov r0, #0xf - lsl r1, r1, #4 - bl sub_02018144 - add r1, r5, #0 - bl ov23_02241F74 - bl sub_02057C84 - add r1, r0, #0 - mov r0, #0xf - bl sub_02018144 - add r1, r5, #0 - mov r2, #1 - bl sub_02057524 - bl ov23_02243858 - add r1, r0, #0 - mov r0, #0xf - bl sub_02018144 - add r1, r5, #0 - bl ov23_022434BC - bl ov23_0224B5C4 - add r1, r0, #0 - mov r0, #0xf - bl sub_02018144 - add r1, r5, #0 - bl ov23_0224B144 - bl ov23_022417C4 - add r1, r0, #0 - mov r0, #0xf - bl sub_02018144 - add r1, r5, #0 - bl ov23_022416E0 - bl ov23_0223E2E8 - add r1, r0, #0 - mov r0, #0xf - bl sub_02018144 - add r1, r5, #0 - bl ov23_0223E1E4 - bl ov23_02253608 - add r1, r0, #0 - mov r0, #0xf - bl sub_02018144 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0203D174 - bl sub_020298A0 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203D174 - add r2, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov23_02253598 - add r0, r5, #0 - bl sub_0203D174 - bl sub_020298B0 - bl ov23_0224F588 -_02242C70: - pop {r4, r5, r6, pc} - nop -_02242C74: .word 0x02257748 - thumb_func_end ov23_02242BC0 - - thumb_func_start ov23_02242C78 -ov23_02242C78: ; 0x02242C78 - push {r3, lr} - ldr r0, _02242CAC ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242CA8 - bl ov23_022535EC - bl ov23_022417CC - bl ov23_0224B430 - bl ov23_02243520 - bl sub_0205764C - bl ov23_0223E2F0 - bl ov23_022421EC - ldr r0, _02242CAC ; =0x02257748 - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _02242CB0 ; =0x0000014B - strb r2, [r1, r0] -_02242CA8: - pop {r3, pc} - nop -_02242CAC: .word 0x02257748 -_02242CB0: .word 0x0000014B - thumb_func_end ov23_02242C78 - - thumb_func_start ov23_02242CB4 -ov23_02242CB4: ; 0x02242CB4 - push {r3, lr} - sub sp, #8 - ldr r0, _02242CFC ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242CF8 - bl sub_020576A0 - bl ov23_02253604 - bl ov23_022417E0 - bl ov23_0224B460 - bl ov23_022435A8 - bl ov23_0223E2F4 - ldr r1, _02242CFC ; =0x02257748 - ldr r0, _02242D00 ; =0x0000014B - ldr r2, [r1, #0] - mov r3, #0 - strb r3, [r2, r0] - str r3, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r1, #0] - ldr r2, _02242D04 ; =0x000003E2 - ldr r0, [r0, #0xc] - mov r1, #3 - ldr r0, [r0, #8] - mov r3, #0xa - bl sub_0200DD0C -_02242CF8: - add sp, #8 - pop {r3, pc} - ; .align 2, 0 -_02242CFC: .word 0x02257748 -_02242D00: .word 0x0000014B -_02242D04: .word 0x000003E2 - thumb_func_end ov23_02242CB4 - - thumb_func_start ov23_02242D08 -ov23_02242D08: ; 0x02242D08 - push {r3, lr} - ldr r0, _02242D40 ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242D3C - ldr r0, [r0, #0xc] - ldr r0, [r0, #0xc] - bl sub_020287F8 - bl ov23_0224B4E4 - bl ov23_022435DC - mov r0, #1 - bl sub_020576CC - bl ov23_022417F4 - bl ov23_0223E2F8 - bl ov23_0224F5B8 - bl ov23_022535CC - bl ov23_02242108 -_02242D3C: - pop {r3, pc} - nop -_02242D40: .word 0x02257748 - thumb_func_end ov23_02242D08 - - thumb_func_start ov23_02242D44 -ov23_02242D44: ; 0x02242D44 - push {r3, lr} - ldr r1, _02242D5C ; =0x02257748 - ldr r1, [r1, #0] - cmp r1, #0 - beq _02242D5A - bl ov23_02243670 - bl sub_02057764 - bl ov23_0224B518 -_02242D5A: - pop {r3, pc} - ; .align 2, 0 -_02242D5C: .word 0x02257748 - thumb_func_end ov23_02242D44 - - thumb_func_start ov23_02242D60 -ov23_02242D60: ; 0x02242D60 - push {r4, lr} - ldr r1, _02242E0C ; =0x02257748 - add r4, r0, #0 - ldr r3, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - ldrb r2, [r3, r1] - cmp r2, #0 - beq _02242D78 - mov r0, #0 - strb r0, [r3, r1] - pop {r4, pc} -_02242D78: - bl ov23_02242308 - cmp r0, #0 - beq _02242D8E - ldr r1, _02242E0C ; =0x02257748 - mov r0, #1 - ldr r2, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - strb r0, [r2, r1] - pop {r4, pc} -_02242D8E: - add r0, r4, #0 - bl ov23_022446B0 - cmp r0, #0 - beq _02242DA6 - ldr r1, _02242E0C ; =0x02257748 - mov r0, #1 - ldr r2, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - strb r0, [r2, r1] - pop {r4, pc} -_02242DA6: - add r0, r4, #0 - bl ov23_02244784 - cmp r0, #0 - beq _02242DBE - ldr r1, _02242E0C ; =0x02257748 - mov r0, #1 - ldr r2, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - strb r0, [r2, r1] - pop {r4, pc} -_02242DBE: - add r0, r4, #0 - bl ov23_0224D020 - cmp r0, #0 - beq _02242DD6 - ldr r1, _02242E0C ; =0x02257748 - mov r0, #1 - ldr r2, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - strb r0, [r2, r1] - pop {r4, pc} -_02242DD6: - add r0, r4, #0 - bl ov23_022415B8 - cmp r0, #0 - beq _02242DEE - ldr r1, _02242E0C ; =0x02257748 - mov r0, #1 - ldr r2, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - strb r0, [r2, r1] - pop {r4, pc} -_02242DEE: - add r0, r4, #0 - bl ov23_02241D58 - cmp r0, #0 - beq _02242E06 - ldr r1, _02242E0C ; =0x02257748 - mov r0, #1 - ldr r2, [r1, #0] - mov r1, #0x53 - lsl r1, r1, #2 - strb r0, [r2, r1] - pop {r4, pc} -_02242E06: - mov r0, #0 - pop {r4, pc} - nop -_02242E0C: .word 0x02257748 - thumb_func_end ov23_02242D60 - - thumb_func_start ov23_02242E10 -ov23_02242E10: ; 0x02242E10 - push {r3, lr} - ldr r1, _02242E24 ; =0x02257748 - ldr r1, [r1, #0] - cmp r1, #0 - beq _02242E20 - bl ov23_0224D130 - pop {r3, pc} -_02242E20: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02242E24: .word 0x02257748 - thumb_func_end ov23_02242E10 - - thumb_func_start ov23_02242E28 -ov23_02242E28: ; 0x02242E28 - push {r3, lr} - ldr r0, _02242E3C ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242E38 - bl ov23_0224D150 - pop {r3, pc} -_02242E38: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02242E3C: .word 0x02257748 - thumb_func_end ov23_02242E28 - - thumb_func_start ov23_02242E40 -ov23_02242E40: ; 0x02242E40 - push {r3, lr} - ldr r0, _02242E54 ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02242E50 - bl ov23_0224D178 - pop {r3, pc} -_02242E50: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02242E54: .word 0x02257748 - thumb_func_end ov23_02242E40 - - thumb_func_start ov23_02242E58 -ov23_02242E58: ; 0x02242E58 - cmp r0, #0x20 - ble _02242E6E - cmp r1, #0x40 - ble _02242E6E - ldr r2, _02242E74 ; =0x000001DF - cmp r0, r2 - bge _02242E6E - cmp r1, r2 - bge _02242E6E - mov r0, #0 - bx lr -_02242E6E: - mov r0, #1 - bx lr - nop -_02242E74: .word 0x000001DF - thumb_func_end ov23_02242E58 - - thumb_func_start ov23_02242E78 -ov23_02242E78: ; 0x02242E78 - push {r3, lr} - ldr r1, _02242ED8 ; =0x02257748 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02242ED2 - cmp r0, #0x10 - bge _02242EC4 - ldr r1, _02242EDC ; =0x00000147 - ldrb r1, [r2, r1] - cmp r1, #4 - bhi _02242ED2 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242E9A: ; jump table - .short _02242EA4 - _02242E9A - 2 ; case 0 - .short _02242EA8 - _02242E9A - 2 ; case 1 - .short _02242EB2 - _02242E9A - 2 ; case 2 - .short _02242EBE - _02242E9A - 2 ; case 3 - .short _02242EB8 - _02242E9A - 2 ; case 4 -_02242EA4: - mov r0, #0 - pop {r3, pc} -_02242EA8: - cmp r0, #8 - bge _02242EB2 - bl ov23_0224121C - pop {r3, pc} -_02242EB2: - bl ov23_02241F0C - pop {r3, pc} -_02242EB8: - bl ov23_02245698 - pop {r3, pc} -_02242EBE: - bl ov23_0224125C - pop {r3, pc} -_02242EC4: - ldr r0, [r2, #0xc] - ldr r0, [r0, #0xc] - bl sub_02029894 - bl sub_02029874 - pop {r3, pc} -_02242ED2: - mov r0, #0 - pop {r3, pc} - nop -_02242ED8: .word 0x02257748 -_02242EDC: .word 0x00000147 - thumb_func_end ov23_02242E78 - - thumb_func_start ov23_02242EE0 -ov23_02242EE0: ; 0x02242EE0 - push {r3, lr} - ldr r1, _02242F40 ; =0x02257748 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02242F3A - cmp r0, #0x10 - bge _02242F2C - ldr r1, _02242F44 ; =0x00000147 - ldrb r1, [r2, r1] - cmp r1, #4 - bhi _02242F3A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242F02: ; jump table - .short _02242F0C - _02242F02 - 2 ; case 0 - .short _02242F10 - _02242F02 - 2 ; case 1 - .short _02242F1A - _02242F02 - 2 ; case 2 - .short _02242F26 - _02242F02 - 2 ; case 3 - .short _02242F20 - _02242F02 - 2 ; case 4 -_02242F0C: - mov r0, #0 - pop {r3, pc} -_02242F10: - cmp r0, #8 - bge _02242F1A - bl ov23_0224123C - pop {r3, pc} -_02242F1A: - bl ov23_02241F40 - pop {r3, pc} -_02242F20: - bl ov23_022456CC - pop {r3, pc} -_02242F26: - bl ov23_02241294 - pop {r3, pc} -_02242F2C: - ldr r0, [r2, #0xc] - ldr r0, [r0, #0xc] - bl sub_02029894 - bl sub_0202987C - pop {r3, pc} -_02242F3A: - mov r0, #0 - pop {r3, pc} - nop -_02242F40: .word 0x02257748 -_02242F44: .word 0x00000147 - thumb_func_end ov23_02242EE0 - - thumb_func_start ov23_02242F48 -ov23_02242F48: ; 0x02242F48 - push {r3, lr} - ldr r1, _02242FA0 ; =0x02257748 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02242F9C - cmp r0, #0x10 - bge _02242F88 - ldr r1, _02242FA4 ; =0x00000147 - ldrb r1, [r2, r1] - cmp r1, #4 - bhi _02242F9C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242F6A: ; jump table - .short _02242F9C - _02242F6A - 2 ; case 0 - .short _02242F74 - _02242F6A - 2 ; case 1 - .short _02242F7C - _02242F6A - 2 ; case 2 - .short _02242F84 - _02242F6A - 2 ; case 3 - .short _02242F80 - _02242F6A - 2 ; case 4 -_02242F74: - cmp r0, #8 - bge _02242F7C - mov r0, #0xc - pop {r3, pc} -_02242F7C: - mov r0, #9 - pop {r3, pc} -_02242F80: - mov r0, #0xb - pop {r3, pc} -_02242F84: - mov r0, #0xc - pop {r3, pc} -_02242F88: - ldr r0, [r2, #0xc] - ldr r0, [r0, #0xc] - bl sub_02029894 - bl sub_0202988C - cmp r0, #0 - beq _02242F9C - mov r0, #3 - pop {r3, pc} -_02242F9C: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02242FA0: .word 0x02257748 -_02242FA4: .word 0x00000147 - thumb_func_end ov23_02242F48 - - thumb_func_start ov23_02242FA8 -ov23_02242FA8: ; 0x02242FA8 - ldr r0, _02242FB4 ; =0x02257748 - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _02242FB8 ; =0x00000147 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_02242FB4: .word 0x02257748 -_02242FB8: .word 0x00000147 - thumb_func_end ov23_02242FA8 - - thumb_func_start ov23_02242FBC -ov23_02242FBC: ; 0x02242FBC - ldr r0, _02242FC8 ; =0x02257748 - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _02242FCC ; =0x00000147 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_02242FC8: .word 0x02257748 -_02242FCC: .word 0x00000147 - thumb_func_end ov23_02242FBC - - thumb_func_start ov23_02242FD0 -ov23_02242FD0: ; 0x02242FD0 - ldr r0, _02242FDC ; =0x02257748 - mov r2, #2 - ldr r1, [r0, #0] - ldr r0, _02242FE0 ; =0x00000147 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_02242FDC: .word 0x02257748 -_02242FE0: .word 0x00000147 - thumb_func_end ov23_02242FD0 - - thumb_func_start ov23_02242FE4 -ov23_02242FE4: ; 0x02242FE4 - ldr r0, _02242FF0 ; =0x02257748 - mov r2, #4 - ldr r1, [r0, #0] - ldr r0, _02242FF4 ; =0x00000147 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_02242FF0: .word 0x02257748 -_02242FF4: .word 0x00000147 - thumb_func_end ov23_02242FE4 - - thumb_func_start ov23_02242FF8 -ov23_02242FF8: ; 0x02242FF8 - ldr r0, _02243004 ; =0x02257748 - mov r2, #3 - ldr r1, [r0, #0] - ldr r0, _02243008 ; =0x00000147 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_02243004: .word 0x02257748 -_02243008: .word 0x00000147 - thumb_func_end ov23_02242FF8 - - thumb_func_start ov23_0224300C -ov23_0224300C: ; 0x0224300C - ldr r2, _0224301C ; =0x02257748 - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224301A - add r0, r2, r0 - add r0, #0xc2 - strb r1, [r0] -_0224301A: - bx lr - ; .align 2, 0 -_0224301C: .word 0x02257748 - thumb_func_end ov23_0224300C - - thumb_func_start ov23_02243020 -ov23_02243020: ; 0x02243020 - ldr r1, _02243034 ; =0x02257748 - ldr r2, [r1, #0] - cmp r2, #0 - beq _02243030 - add r0, r2, r0 - mov r1, #1 - add r0, #0xd2 - strb r1, [r0] -_02243030: - bx lr - nop -_02243034: .word 0x02257748 - thumb_func_end ov23_02243020 - - thumb_func_start ov23_02243038 -ov23_02243038: ; 0x02243038 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _022430B4 ; =0x02257748 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022430B2 - lsl r4, r5, #2 - add r0, r0, r4 - add r0, #0xdc - ldr r0, [r0, #0] - cmp r0, #0 - bne _022430B2 - mov r0, #0x64 - mov r1, #0xf - bl sub_02023790 - ldr r1, _022430B4 ; =0x02257748 - ldr r1, [r1, #0] - add r1, r1, r4 - add r1, #0xdc - str r0, [r1, #0] - mov r0, #0xb - bl sub_0200B358 - add r6, r0, #0 - mov r0, #0x64 - mov r1, #0xb - bl sub_02023790 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02032EE8 - add r2, r0, #0 - add r0, r6, #0 - mov r1, #0 - bl sub_0200B498 - bl ov23_0224219C - bl ov23_02253E3C - mov r1, #0x73 - add r2, r7, #0 - bl sub_0200B1B8 - ldr r1, _022430B4 ; =0x02257748 - add r0, r6, #0 - ldr r1, [r1, #0] - add r2, r7, #0 - add r1, r1, r4 - add r1, #0xdc - ldr r1, [r1, #0] - bl sub_0200C388 - add r0, r7, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 -_022430B2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022430B4: .word 0x02257748 - thumb_func_end ov23_02243038 - - thumb_func_start ov23_022430B8 -ov23_022430B8: ; 0x022430B8 - ldr r1, _022430C8 ; =0x02257748 - mov r2, #1 - ldr r1, [r1, #0] - add r1, r1, r0 - ldr r0, _022430CC ; =0x0000013D - strb r2, [r1, r0] - bx lr - nop -_022430C8: .word 0x02257748 -_022430CC: .word 0x0000013D - thumb_func_end ov23_022430B8 - - thumb_func_start ov23_022430D0 -ov23_022430D0: ; 0x022430D0 - ldr r1, _022430DC ; =0x02257748 - ldr r1, [r1, #0] - add r1, #0xc0 - strh r0, [r1] - bx lr - nop -_022430DC: .word 0x02257748 - thumb_func_end ov23_022430D0 - - thumb_func_start ov23_022430E0 -ov23_022430E0: ; 0x022430E0 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - ldr r1, _02243150 ; =0x02257748 - add r5, r2, #0 - ldr r3, [r1, #0] - add r1, r3, #0 - add r1, #0xc0 - ldrh r4, [r1] - cmp r4, #0 - beq _0224314E - mov r1, #0 - add r2, r3, #0 -_022430F8: - ldrh r6, [r2, #0x20] - cmp r4, r6 - bne _02243114 - ldrh r6, [r2, #0x22] - cmp r0, r6 - bne _02243114 - lsl r1, r1, #3 - add r0, r3, r1 - strh r7, [r0, #0x24] - ldr r0, _02243150 ; =0x02257748 - ldr r0, [r0, #0] - add r0, r0, r1 - strh r5, [r0, #0x26] - pop {r3, r4, r5, r6, r7, pc} -_02243114: - add r1, r1, #1 - add r2, #8 - cmp r1, #0x14 - blt _022430F8 - mov r6, #0 - add r2, r3, #0 -_02243120: - ldrh r1, [r2, #0x20] - cmp r1, #0 - bne _02243142 - lsl r1, r6, #3 - add r2, r3, r1 - strh r4, [r2, #0x20] - ldr r2, _02243150 ; =0x02257748 - ldr r3, [r2, #0] - add r3, r3, r1 - strh r0, [r3, #0x22] - ldr r0, [r2, #0] - add r0, r0, r1 - strh r7, [r0, #0x24] - ldr r0, [r2, #0] - add r0, r0, r1 - strh r5, [r0, #0x26] - pop {r3, r4, r5, r6, r7, pc} -_02243142: - add r6, r6, #1 - add r2, #8 - cmp r6, #0x14 - blt _02243120 - bl sub_02022974 -_0224314E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243150: .word 0x02257748 - thumb_func_end ov23_022430E0 - - thumb_func_start ov23_02243154 -ov23_02243154: ; 0x02243154 - push {r4, r5} - ldr r1, _02243188 ; =0x02257748 - mov r3, #0 - ldr r1, [r1, #0] - add r2, r1, #0 - add r2, #0xc0 - ldrh r5, [r2] - add r4, r1, #0 -_02243164: - ldrh r2, [r4, #0x20] - cmp r5, r2 - bne _0224317A - ldrh r2, [r4, #0x22] - cmp r0, r2 - bne _0224317A - lsl r0, r3, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x26] - pop {r4, r5} - bx lr -_0224317A: - add r3, r3, #1 - add r4, #8 - cmp r3, #0x14 - blt _02243164 - mov r0, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_02243188: .word 0x02257748 - thumb_func_end ov23_02243154 - - thumb_func_start ov23_0224318C -ov23_0224318C: ; 0x0224318C - push {r4, r5} - ldr r1, _022431C0 ; =0x02257748 - mov r3, #0 - ldr r1, [r1, #0] - add r2, r1, #0 - add r2, #0xc0 - ldrh r5, [r2] - add r4, r1, #0 -_0224319C: - ldrh r2, [r4, #0x20] - cmp r5, r2 - bne _022431B2 - ldrh r2, [r4, #0x22] - cmp r0, r2 - bne _022431B2 - lsl r0, r3, #3 - add r0, r1, r0 - ldrh r0, [r0, #0x24] - pop {r4, r5} - bx lr -_022431B2: - add r3, r3, #1 - add r4, #8 - cmp r3, #0x14 - blt _0224319C - mov r0, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_022431C0: .word 0x02257748 - thumb_func_end ov23_0224318C - - thumb_func_start ov23_022431C4 -ov23_022431C4: ; 0x022431C4 - push {r4, lr} - ldrb r4, [r2] - bl sub_0203608C - cmp r4, r0 - bne _022431E4 - ldr r0, _022431E8 ; =0x02257748 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl ov23_022534A0 - mov r0, #0x19 - bl sub_020360DC - bl sub_020594FC -_022431E4: - pop {r4, pc} - nop -_022431E8: .word 0x02257748 - thumb_func_end ov23_022431C4 - - thumb_func_start ov23_022431EC -ov23_022431EC: ; 0x022431EC - push {r3, r4} - ldr r3, _02243200 ; =0x02257748 - ldr r4, [r3, #0] - str r0, [r4, #0] - ldr r0, [r3, #0] - str r1, [r0, #4] - ldr r0, [r3, #0] - str r2, [r0, #8] - pop {r3, r4} - bx lr - ; .align 2, 0 -_02243200: .word 0x02257748 - thumb_func_end ov23_022431EC - - thumb_func_start ov23_02243204 -ov23_02243204: ; 0x02243204 - ldr r0, _02243218 ; =0x02257748 - mov r2, #0 - ldr r1, [r0, #0] - str r2, [r1, #0] - ldr r1, [r0, #0] - str r2, [r1, #4] - ldr r0, [r0, #0] - str r2, [r0, #8] - bx lr - nop -_02243218: .word 0x02257748 - thumb_func_end ov23_02243204 - - thumb_func_start ov23_0224321C -ov23_0224321C: ; 0x0224321C - push {r4, lr} - ldr r0, _02243294 ; =0x02257748 - mov r4, #0 - ldr r2, [r0, #0] - ldr r0, [r2, #4] - cmp r0, #0 - beq _02243236 - ldr r1, [r2, #0] - ldr r2, [r2, #8] - blx r2 - bl ov23_02243204 - mov r4, #1 -_02243236: - bl ov23_022421EC - ldr r0, _02243294 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254044 - ldr r0, _02243294 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254044 - ldr r0, _02243294 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov23_02254044 - ldr r0, _02243294 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254044 - ldr r0, _02243294 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254044 - ldr r0, _02243294 ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254044 - add r0, r4, #0 - pop {r4, pc} - nop -_02243294: .word 0x02257748 - thumb_func_end ov23_0224321C - - thumb_func_start ov23_02243298 -ov23_02243298: ; 0x02243298 - push {r3, r4, r5, lr} - ldr r2, _0224330C ; =0x02257748 - add r4, r0, #0 - ldr r1, [r2, #0] - ldr r3, [r1, #4] - cmp r3, #0 - beq _022432AA - mov r0, #0 - pop {r3, r4, r5, pc} -_022432AA: - ldr r3, [r1, #0xc] - ldr r3, [r3, #0x10] - cmp r3, #0 - beq _022432CC - mov r0, #0x13 - lsl r0, r0, #4 - ldr r3, [r1, r0] - add r3, r3, #1 - str r3, [r1, r0] - ldr r1, [r2, #0] - ldr r0, [r1, r0] - cmp r0, #0x64 - ble _022432C8 - bl sub_02022974 -_022432C8: - mov r0, #0 - pop {r3, r4, r5, pc} -_022432CC: - bl ov23_0224ACC0 - cmp r0, #0 - beq _022432D8 - mov r0, #0 - pop {r3, r4, r5, pc} -_022432D8: - add r0, r4, #0 - bl sub_02058D48 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02058D68 - add r1, r0, #0 - add r0, r5, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _022432FA - cmp r4, #0 - beq _022432FA - mov r0, #0 - pop {r3, r4, r5, pc} -_022432FA: - ldr r0, _0224330C ; =0x02257748 - mov r2, #0 - ldr r1, [r0, #0] - mov r0, #0x13 - lsl r0, r0, #4 - str r2, [r1, r0] - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_0224330C: .word 0x02257748 - thumb_func_end ov23_02243298 - - thumb_func_start ov23_02243310 -ov23_02243310: ; 0x02243310 - push {r3, lr} - ldr r0, _0224335C ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254250 - ldr r0, _0224335C ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254250 - ldr r0, _0224335C ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl ov23_02254250 - ldr r0, _0224335C ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254250 - ldr r0, _0224335C ; =0x02257748 - ldr r1, [r0, #0] - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov23_02254250 - pop {r3, pc} - nop -_0224335C: .word 0x02257748 - thumb_func_end ov23_02243310 - - thumb_func_start ov23_02243360 -ov23_02243360: ; 0x02243360 - push {r3, lr} - sub sp, #8 - bl ov23_0224DB48 - add r1, sp, #0 - strh r0, [r1] - bl ov23_0224DB64 - add r1, sp, #0 - strh r0, [r1, #2] - bl ov23_0224DB84 - add r1, sp, #0 - strb r0, [r1, #4] - bl ov23_02241670 - add r1, sp, #0 - strb r0, [r1, #5] - mov r0, #0x46 - add r1, sp, #0 - bl sub_020360D0 - add sp, #8 - pop {r3, pc} - thumb_func_end ov23_02243360 - - thumb_func_start ov23_02243390 -ov23_02243390: ; 0x02243390 - push {r3, r4, r5, lr} - add r4, r2, #0 - ldrh r1, [r4] - add r5, r0, #0 - bl ov23_0224DBA0 - ldrh r1, [r4, #2] - add r0, r5, #0 - bl ov23_0224DBBC - ldrb r1, [r4, #4] - add r0, r5, #0 - bl ov23_0224DBD8 - ldrb r1, [r4, #5] - add r0, r5, #0 - bl ov23_02241690 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_02243390 - - thumb_func_start ov23_022433B8 -ov23_022433B8: ; 0x022433B8 - mov r0, #6 - bx lr - thumb_func_end ov23_022433B8 - - thumb_func_start ov23_022433BC -ov23_022433BC: ; 0x022433BC - ldr r1, _022433CC ; =0x02257748 - mov r2, #1 - ldr r1, [r1, #0] - add r0, r1, r0 - add r0, #0xca - strb r2, [r0] - bx lr - nop -_022433CC: .word 0x02257748 - thumb_func_end ov23_022433BC - - thumb_func_start ov23_022433D0 -ov23_022433D0: ; 0x022433D0 - ldr r1, _022433F0 ; =0x02257748 - mov r0, #0 - ldr r3, [r1, #0] - add r2, r0, #0 -_022433D8: - add r1, r3, #0 - add r1, #0xca - ldrb r1, [r1] - cmp r1, #0 - beq _022433E4 - add r0, r0, #1 -_022433E4: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #8 - blt _022433D8 - bx lr - nop -_022433F0: .word 0x02257748 - thumb_func_end ov23_022433D0 - - thumb_func_start ov23_022433F4 -ov23_022433F4: ; 0x022433F4 - ldr r1, _02243404 ; =0x02257748 - ldr r3, _02243408 ; =ov23_0224B5CC - ldr r1, [r1, #0] - mov r2, #0 - add r1, r1, r0 - add r1, #0xca - strb r2, [r1] - bx r3 - ; .align 2, 0 -_02243404: .word 0x02257748 -_02243408: .word ov23_0224B5CC - thumb_func_end ov23_022433F4 - - thumb_func_start ov23_0224340C -ov23_0224340C: ; 0x0224340C - push {r3, r4, r5, r6, r7, lr} - ldr r0, _022434AC ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - bl sub_0203D174 - bl sub_020298B0 - mov r4, #0 - ldr r7, _022434AC ; =0x02257760 - add r6, r0, #0 - add r5, r4, #0 - str r4, [sp] -_02243426: - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029030 - ldr r1, [r7, #4] - add r2, r1, r5 - mov r1, #0xaa - lsl r1, r1, #2 - strb r0, [r2, r1] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202903C - ldr r1, [r7, #4] - add r2, r1, r5 - mov r1, #0xa9 - lsl r1, r1, #2 - strh r0, [r2, r1] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202905C - ldr r1, [r7, #4] - add r2, r1, r5 - ldr r1, _022434B0 ; =0x000002A6 - strh r0, [r2, r1] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202907C - ldr r1, [r7, #4] - add r2, r1, r5 - ldr r1, _022434B4 ; =0x000002A9 - strb r0, [r2, r1] - ldr r1, [r7, #4] - ldr r0, _022434B8 ; =0x00000B46 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224349A - mov r0, #0xaa - add r2, r1, r5 - lsl r0, r0, #2 - ldrb r3, [r2, r0] - cmp r3, #0 - beq _0224349A - ldr r1, _022434B0 ; =0x000002A6 - sub r0, r0, #4 - ldrh r0, [r2, r0] - ldrh r1, [r2, r1] - mov r2, #1 - bl ov23_02244E68 - ldr r2, [r7, #4] - ldr r1, [sp] - add r2, r2, r1 - mov r1, #0xc1 - lsl r1, r1, #2 - str r0, [r2, r1] -_0224349A: - ldr r0, [sp] - add r4, r4, #1 - add r0, r0, #4 - add r5, r5, #6 - str r0, [sp] - cmp r4, #0x10 - blt _02243426 - pop {r3, r4, r5, r6, r7, pc} - nop -_022434AC: .word 0x02257760 -_022434B0: .word 0x000002A6 -_022434B4: .word 0x000002A9 -_022434B8: .word 0x00000B46 - thumb_func_end ov23_0224340C - - thumb_func_start ov23_022434BC -ov23_022434BC: ; 0x022434BC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, _02243514 ; =0x02257760 - ldr r2, [r1, #4] - cmp r2, #0 - bne _02243510 - ldr r2, _02243518 ; =0x00000B48 - str r0, [r1, #4] - mov r1, #0 - bl sub_020C4CF4 - ldr r0, _02243514 ; =0x02257760 - ldr r0, [r0, #4] - str r4, [r0, #0x40] - add r0, r4, #0 - bl sub_0203D174 - bl sub_020298B0 - ldr r2, _02243514 ; =0x02257760 - mov r1, #0xa3 - ldr r3, [r2, #4] - mov r0, #0 - lsl r1, r1, #2 - str r0, [r3, r1] - ldr r1, _0224351C ; =0x00000B04 - mov r5, #0xff -_022434F2: - ldr r3, [r2, #4] - add r3, r3, r0 - add r0, r0, #1 - strb r5, [r3, r1] - cmp r0, #8 - blt _022434F2 - ldr r0, [r4, #0x24] - bl ov5_021EB0C8 - add r4, #0x8c - str r0, [r4, #0] - bl ov23_02243754 - bl ov23_0224340C -_02243510: - pop {r3, r4, r5, pc} - nop -_02243514: .word 0x02257760 -_02243518: .word 0x00000B48 -_0224351C: .word 0x00000B04 - thumb_func_end ov23_022434BC - - thumb_func_start ov23_02243520 -ov23_02243520: ; 0x02243520 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _022435A0 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - add r0, #0x8c - bl ov5_021EB184 - bl ov23_0224382C - bl ov23_02248BD0 - mov r5, #0 - mov r7, #0xc1 - lsl r7, r7, #2 - ldr r1, _022435A0 ; =0x02257760 - add r6, r5, #0 - add r2, r5, #0 - add r0, r7, #0 -_02243544: - ldr r3, [r1, #4] - add r4, r3, r6 - ldr r3, [r4, r0] - cmp r3, #0 - beq _02243550 - str r2, [r4, r7] -_02243550: - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #0x10 - blt _02243544 - ldr r0, _022435A0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243576 - bl sub_0200DA58 - ldr r0, _022435A0 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - str r2, [r1, r0] -_02243576: - ldr r0, _022435A0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243594 - bl sub_020181C4 - ldr r0, _022435A0 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r2, [r1, r0] -_02243594: - ldr r0, _022435A0 ; =0x02257760 - mov r2, #1 - ldr r1, [r0, #4] - ldr r0, _022435A4 ; =0x00000B46 - strb r2, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022435A0: .word 0x02257760 -_022435A4: .word 0x00000B46 - thumb_func_end ov23_02243520 - - thumb_func_start ov23_022435A8 -ov23_022435A8: ; 0x022435A8 - push {r3, lr} - ldr r0, _022435D4 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x24] - bl ov5_021EB0C8 - ldr r1, _022435D4 ; =0x02257760 - ldr r2, [r1, #4] - ldr r2, [r2, #0x40] - add r2, #0x8c - str r0, [r2, #0] - ldr r1, [r1, #4] - ldr r0, _022435D8 ; =0x00000B46 - mov r2, #0 - strb r2, [r1, r0] - bl ov23_0224340C - bl ov23_02243754 - pop {r3, pc} - nop -_022435D4: .word 0x02257760 -_022435D8: .word 0x00000B46 - thumb_func_end ov23_022435A8 - - thumb_func_start ov23_022435DC -ov23_022435DC: ; 0x022435DC - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r6, _02243668 ; =0x02257760 - add r5, r4, #0 - add r7, r4, #0 -_022435E6: - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0xc1 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243602 - bl sub_0207136C - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0xc1 - lsl r0, r0, #2 - str r7, [r1, r0] -_02243602: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x10 - blt _022435E6 - bl ov23_02248BD0 - bl ov23_0224382C - ldr r0, _02243668 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - add r0, #0x8c - bl ov5_021EB184 - ldr r0, _02243668 ; =0x02257760 - ldr r1, _0224366C ; =0x00000B34 - ldr r3, [r0, #4] - ldrh r2, [r3, r1] - cmp r2, #0xa - blo _02243634 - add r1, r1, #2 - ldrb r1, [r3, r1] - ldr r0, [r3, #0x40] - bl sub_0206DEEC -_02243634: - ldr r0, _02243668 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243646 - bl sub_0200DA58 -_02243646: - ldr r0, _02243668 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243658 - bl sub_020181C4 -_02243658: - ldr r0, _02243668 ; =0x02257760 - ldr r0, [r0, #4] - bl sub_020181C4 - ldr r0, _02243668 ; =0x02257760 - mov r1, #0 - str r1, [r0, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243668: .word 0x02257760 -_0224366C: .word 0x00000B34 - thumb_func_end ov23_022435DC - - thumb_func_start ov23_02243670 -ov23_02243670: ; 0x02243670 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r6, _022436E4 ; =0x02257760 - add r5, r4, #0 - add r7, r4, #0 -_0224367A: - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0xc1 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243696 - bl sub_0207136C - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0xc1 - lsl r0, r0, #2 - str r7, [r1, r0] -_02243696: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x10 - blt _0224367A - bl ov23_02248BD0 - bl ov23_0224340C - mov r4, #0 - ldr r2, _022436E4 ; =0x02257760 - ldr r0, _022436E8 ; =0x00000B3C - add r1, r4, #0 -_022436AE: - ldr r3, [r2, #4] - add r3, r3, r4 - add r4, r4, #1 - strb r1, [r3, r0] - cmp r4, #8 - blt _022436AE - ldr r0, _022436E4 ; =0x02257760 - ldr r2, [r0, #4] - mov r0, #0xd1 - lsl r0, r0, #2 - add r0, r2, r0 - mov r2, #0x12 - lsl r2, r2, #6 - bl sub_020C4CF4 - ldr r0, _022436E4 ; =0x02257760 - mov r2, #3 - ldr r1, [r0, #4] - ldr r0, _022436EC ; =0x000007C4 - lsl r2, r2, #8 - add r0, r1, r0 - mov r1, #0 - bl sub_020C4CF4 - bl ov23_02243CE8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022436E4: .word 0x02257760 -_022436E8: .word 0x00000B3C -_022436EC: .word 0x000007C4 - thumb_func_end ov23_02243670 - - thumb_func_start ov23_022436F0 -ov23_022436F0: ; 0x022436F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224374C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xd1 - lsl r0, r0, #2 - add r2, r1, r0 - lsl r1, r4, #4 - mov r0, #6 - mul r0, r1 - add r1, r2, r0 - mov r2, #0 - add r0, r2, #0 -_0224370A: - add r2, r2, #1 - strb r0, [r1, #4] - add r1, r1, #6 - cmp r2, #0x10 - blt _0224370A - add r0, r4, #0 - bl ov23_02243970 - ldr r0, _0224374C ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r4 - ldr r0, _02243750 ; =0x00000B3C - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0224374A - add r0, r4, #0 - bl ov23_0224AD98 - ldr r1, _0224374C ; =0x02257760 - add r0, r4, #0 - ldr r1, [r1, #4] - add r2, r1, r4 - ldr r1, _02243750 ; =0x00000B3C - ldrb r1, [r2, r1] - bl ov23_02244844 - ldr r0, _0224374C ; =0x02257760 - mov r2, #0 - ldr r0, [r0, #4] - add r1, r0, r4 - ldr r0, _02243750 ; =0x00000B3C - strb r2, [r1, r0] -_0224374A: - pop {r4, pc} - ; .align 2, 0 -_0224374C: .word 0x02257760 -_02243750: .word 0x00000B3C - thumb_func_end ov23_022436F0 - - thumb_func_start ov23_02243754 -ov23_02243754: ; 0x02243754 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r4, #0 - mov r7, #6 - ldr r6, _02243828 ; =0x02257760 - add r5, r4, #0 - lsl r7, r7, #6 -_02243762: - mov r0, #1 - add r1, r4, #0 - mov r2, #4 - bl sub_02009714 - ldr r1, [r6, #4] - add r4, r4, #1 - add r1, r1, r5 - add r5, r5, #4 - str r0, [r1, r7] - cmp r4, #4 - blt _02243762 - mov r0, #0x32 - mov r1, #4 - bl sub_02006C24 - mov r3, #0 - add r4, r0, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02243828 ; =0x02257760 - mov r2, #0x11 - ldr r1, [r0, #4] - mov r0, #6 - lsl r0, r0, #6 - ldr r0, [r1, r0] - add r1, r4, #0 - bl sub_02009A4C - ldr r2, _02243828 ; =0x02257760 - mov r1, #0x1a - ldr r3, [r2, #4] - lsl r1, r1, #4 - str r0, [r3, r1] - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, [r2, #4] - sub r1, #0x1c - ldr r0, [r0, r1] - add r1, r4, #0 - mov r2, #0x12 - bl sub_02009B04 - ldr r2, _02243828 ; =0x02257760 - mov r1, #0x69 - ldr r3, [r2, #4] - lsl r1, r1, #2 - str r0, [r3, r1] - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [r2, #4] - sub r1, #0x1c - ldr r0, [r0, r1] - add r1, r4, #0 - mov r2, #0x10 - bl sub_02009BC4 - ldr r2, _02243828 ; =0x02257760 - mov r1, #0x6a - ldr r3, [r2, #4] - lsl r1, r1, #2 - str r0, [r3, r1] - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [r2, #4] - sub r1, #0x1c - ldr r0, [r0, r1] - add r1, r4, #0 - mov r2, #0xf - bl sub_02009BC4 - ldr r1, _02243828 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0x6b - lsl r1, r1, #2 - str r0, [r2, r1] - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243828: .word 0x02257760 - thumb_func_end ov23_02243754 - - thumb_func_start ov23_0224382C -ov23_0224382C: ; 0x0224382C - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - mov r7, #6 - ldr r6, _0224384C ; =0x02257760 - add r5, r4, #0 - lsl r7, r7, #6 -_02243838: - ldr r0, [r6, #4] - add r0, r0, r5 - ldr r0, [r0, r7] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02243838 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224384C: .word 0x02257760 - thumb_func_end ov23_0224382C - - thumb_func_start ov23_02243850 -ov23_02243850: ; 0x02243850 - ldr r3, _02243854 ; =sub_02059514 - bx r3 - ; .align 2, 0 -_02243854: .word sub_02059514 - thumb_func_end ov23_02243850 - - thumb_func_start ov23_02243858 -ov23_02243858: ; 0x02243858 - ldr r0, _0224385C ; =0x00000B48 - bx lr - ; .align 2, 0 -_0224385C: .word 0x00000B48 - thumb_func_end ov23_02243858 - - thumb_func_start ov23_02243860 -ov23_02243860: ; 0x02243860 - mov r0, #0x60 - bx lr - thumb_func_end ov23_02243860 - - thumb_func_start ov23_02243864 -ov23_02243864: ; 0x02243864 - push {r3, r4} - ldr r3, _02243890 ; =0x02257760 - lsl r1, r1, #2 - ldr r2, [r3, #4] - add r4, r2, r1 - ldr r2, _02243894 ; =0x000007C4 - ldr r4, [r4, r2] - cmp r4, #0 - bne _0224387C - mov r0, #0 - pop {r3, r4} - bx lr -_0224387C: - ldrh r4, [r4] - strh r4, [r0] - ldr r3, [r3, #4] - add r1, r3, r1 - ldr r1, [r1, r2] - ldrh r1, [r1, #2] - strh r1, [r0, #2] - pop {r3, r4} - bx lr - nop -_02243890: .word 0x02257760 -_02243894: .word 0x000007C4 - thumb_func_end ov23_02243864 - - thumb_func_start ov23_02243898 -ov23_02243898: ; 0x02243898 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldrh r1, [r4] - add r0, sp, #0 - strh r1, [r0] - ldrh r1, [r4, #2] - strh r1, [r0, #2] - ldr r1, _02243900 ; =ov23_02243864 - mov r0, #0xc0 - bl ov23_022427DC - add r0, sp, #0 - bl ov23_02242788 - cmp r0, #0xc0 - bge _022438FE - ldr r1, _02243904 ; =0x02257760 - mov r3, #0 - ldr r5, [r1, #4] - ldr r1, _02243908 ; =0x000007C4 -_022438C0: - ldr r2, [r5, r1] - cmp r2, r4 - beq _022438FE - add r3, r3, #1 - add r5, r5, #4 - cmp r3, #0xc0 - blt _022438C0 - mov r2, #0xbe - cmp r0, #0xbe - bgt _022438EC - ldr r7, _02243904 ; =0x02257760 - ldr r6, _0224390C ; =0x000007C8 - lsl r3, r2, #2 -_022438DA: - ldr r1, [r7, #4] - ldr r5, _02243908 ; =0x000007C4 - add r1, r1, r3 - ldr r5, [r1, r5] - sub r2, r2, #1 - str r5, [r1, r6] - sub r3, r3, #4 - cmp r2, r0 - bge _022438DA -_022438EC: - ldr r1, _02243904 ; =0x02257760 - lsl r3, r0, #2 - ldr r0, [r1, #4] - add r2, r0, r3 - ldr r0, _02243908 ; =0x000007C4 - str r4, [r2, r0] - ldr r1, [r1, #4] - add r1, r1, r3 - str r4, [r1, r0] -_022438FE: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243900: .word ov23_02243864 -_02243904: .word 0x02257760 -_02243908: .word 0x000007C4 -_0224390C: .word 0x000007C8 - thumb_func_end ov23_02243898 - - thumb_func_start ov23_02243910 -ov23_02243910: ; 0x02243910 - push {r3, r4, r5, r6} - ldr r2, _02243964 ; =0x02257760 - mov r1, #0 - ldr r5, [r2, #4] - ldr r2, _02243968 ; =0x000007C4 - mvn r1, r1 - mov r4, #0 -_0224391E: - ldr r3, [r5, r2] - cmp r3, r0 - bne _02243928 - add r1, r4, #0 - b _02243930 -_02243928: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xc0 - blt _0224391E -_02243930: - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - beq _02243960 - cmp r1, #0xbf - bge _02243954 - ldr r0, _0224396C ; =0x000007C8 - ldr r3, _02243964 ; =0x02257760 - lsl r6, r1, #2 - sub r2, r0, #4 -_02243944: - ldr r4, [r3, #4] - add r1, r1, #1 - add r5, r4, r6 - ldr r4, [r5, r0] - add r6, r6, #4 - str r4, [r5, r2] - cmp r1, #0xbf - blt _02243944 -_02243954: - ldr r0, _02243964 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - mov r0, #0x2b - lsl r0, r0, #6 - str r2, [r1, r0] -_02243960: - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_02243964: .word 0x02257760 -_02243968: .word 0x000007C4 -_0224396C: .word 0x000007C8 - thumb_func_end ov23_02243910 - - thumb_func_start ov23_02243970 -ov23_02243970: ; 0x02243970 - push {r3, r4, r5, r6, r7, lr} - lsl r5, r0, #4 - ldr r7, _022439CC ; =0x02257760 - mov r6, #0 - add r4, r5, #0 -_0224397A: - mov r0, #0xd1 - ldr r1, [r7, #4] - lsl r0, r0, #2 - add r1, r1, r0 - mov r0, #6 - mul r0, r4 - add r0, r1, r0 - bl ov23_02243910 - add r6, r6, #1 - add r4, r4, #1 - cmp r6, #0x10 - blt _0224397A - mov r6, #0 - mov r0, #6 - add r7, r5, #0 - add r4, r6, #0 - mul r7, r0 -_0224399E: - ldr r0, _022439CC ; =0x02257760 - ldr r0, [r0, #4] - add r1, r7, r0 - add r2, r4, r1 - mov r1, #0xd2 - lsl r1, r1, #2 - ldrb r1, [r2, r1] - cmp r1, #0 - beq _022439C0 - mov r1, #0xd1 - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #6 - mul r0, r5 - add r0, r1, r0 - bl ov23_02243898 -_022439C0: - add r6, r6, #1 - add r4, r4, #6 - add r5, r5, #1 - cmp r6, #0x10 - blt _0224399E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022439CC: .word 0x02257760 - thumb_func_end ov23_02243970 - - thumb_func_start ov23_022439D0 -ov23_022439D0: ; 0x022439D0 - mov r2, #0 -_022439D2: - ldrb r1, [r0, #4] - cmp r1, #0 - beq _022439E2 - add r2, r2, #1 - add r0, r0, #6 - cmp r2, #0x10 - blt _022439D2 - mov r0, #0 -_022439E2: - bx lr - thumb_func_end ov23_022439D0 - - thumb_func_start ov23_022439E4 -ov23_022439E4: ; 0x022439E4 - mov r2, #0 -_022439E6: - ldrb r1, [r0, #4] - cmp r1, #0 - bne _022439F0 - add r0, r2, #0 - bx lr -_022439F0: - add r2, r2, #1 - add r0, r0, #6 - cmp r2, #0x10 - blt _022439E6 - mov r0, #0 - mvn r0, r0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_022439E4 - - thumb_func_start ov23_02243A00 -ov23_02243A00: ; 0x02243A00 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r1, _02243A78 ; =0x02257760 - ldr r6, [r1, #4] - mov r1, #0xd1 - lsl r1, r1, #2 - add r1, r6, r1 - sub r0, r0, r1 - mov r1, #6 - bl sub_020E2178 - add r4, r0, #0 - lsr r0, r4, #4 - str r0, [sp, #4] - add r0, r0, #1 - lsl r0, r0, #4 - str r0, [sp] - mov r0, #6 - add r5, r4, #0 - mul r5, r0 - mov r0, #0xd2 - mov r2, #0 - add r1, r6, r5 - lsl r0, r0, #2 - strb r2, [r1, r0] - ldr r0, [sp] - sub r6, r0, #1 - cmp r4, r6 - bhs _02243A5C - ldr r7, _02243A78 ; =0x02257760 -_02243A3C: - mov r0, #0xd1 - ldr r1, [r7, #4] - lsl r0, r0, #2 - add r1, r1, r0 - add r2, r4, #1 - mov r0, #6 - mul r0, r2 - add r0, r1, r0 - add r1, r1, r5 - mov r2, #6 - bl sub_020C4DB0 - add r4, r4, #1 - add r5, r5, #6 - cmp r4, r6 - blo _02243A3C -_02243A5C: - ldr r1, _02243A78 ; =0x02257760 - mov r2, #6 - ldr r3, [r1, #4] - ldr r1, [sp] - mov r0, #0 - mul r2, r1 - ldr r1, _02243A7C ; =0x00000342 - add r2, r3, r2 - strb r0, [r2, r1] - ldr r0, [sp, #4] - bl ov23_02243970 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243A78: .word 0x02257760 -_02243A7C: .word 0x00000342 - thumb_func_end ov23_02243A00 - - thumb_func_start ov23_02243A80 -ov23_02243A80: ; 0x02243A80 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02243AD0 ; =0x02257760 - add r6, r1, #0 - ldr r0, [r0, #4] - add r7, r2, #0 - ldr r0, [r0, #0x40] - add r1, r5, #0 - add r2, r6, #0 - str r3, [sp] - bl sub_02054F68 - cmp r0, #0 - beq _02243AA0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02243AA0: - add r0, r7, #0 - bl ov23_022439D0 - add r4, r0, #0 - bne _02243ABE - add r0, r7, #0 - bl ov23_02244EA0 - add r4, r0, #0 - bl ov23_02243A00 - add r0, r4, #0 - bl ov23_022439D0 - add r4, r0, #0 -_02243ABE: - strh r5, [r4] - ldr r0, [sp] - strh r6, [r4, #2] - strb r0, [r4, #4] - add r0, r4, #0 - bl ov23_02243898 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243AD0: .word 0x02257760 - thumb_func_end ov23_02243A80 - - thumb_func_start ov23_02243AD4 -ov23_02243AD4: ; 0x02243AD4 - push {r0, r1, r2, r3} - push {r3, lr} - mov r0, #0x20 - add r1, sp, #8 - bl sub_020360D0 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov23_02243AD4 - - thumb_func_start ov23_02243AE8 -ov23_02243AE8: ; 0x02243AE8 - ldr r3, _02243AEC ; =ov23_022457FC - bx r3 - ; .align 2, 0 -_02243AEC: .word ov23_022457FC - thumb_func_end ov23_02243AE8 - - thumb_func_start ov23_02243AF0 -ov23_02243AF0: ; 0x02243AF0 - ldr r1, _02243B04 ; =0x02257760 - ldr r3, _02243B08 ; =sub_02035F58 - ldr r2, [r1, #4] - mov r1, #0xa9 - lsl r1, r1, #2 - add r1, r2, r1 - mov r0, #0x23 - mov r2, #0x60 - bx r3 - nop -_02243B04: .word 0x02257760 -_02243B08: .word sub_02035F58 - thumb_func_end ov23_02243AF0 - - thumb_func_start ov23_02243B0C -ov23_02243B0C: ; 0x02243B0C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r1, _02243C30 ; =0x02257760 - add r5, r0, #0 - ldr r1, [r1, #4] - add r7, r2, #0 - cmp r1, #0 - bne _02243B1E - b _02243C2A -_02243B1E: - add r1, sp, #0 - strb r5, [r1, #6] - mov r2, #3 - strb r2, [r1, #7] - bl sub_02058EE0 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02058F18 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02058DF8 - ldr r1, _02243C34 ; =0x0000FFFF - cmp r0, r1 - bne _02243B60 - add r0, r5, #0 - bl sub_02058E4C - ldr r1, _02243C34 ; =0x0000FFFF - cmp r0, r1 - bne _02243B60 - mov r1, #7 - add r0, sp, #0 - strb r1, [r0, #7] - mov r0, #0x22 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02243B60: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0205900C - cmp r0, #0xff - beq _02243B80 - mov r1, #5 - add r0, sp, #0 - strb r1, [r0, #7] - mov r0, #0x22 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02243B80: - add r0, r6, #0 - add r1, r4, #0 - bl sub_02058108 - cmp r0, #0 - beq _02243BA0 - mov r1, #5 - add r0, sp, #0 - strb r1, [r0, #7] - mov r0, #0x22 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02243BA0: - add r0, r6, #0 - add r1, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _02243BC0 - mov r1, #4 - add r0, sp, #0 - strb r1, [r0, #7] - mov r0, #0x22 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02243BC0: - ldr r0, _02243C30 ; =0x02257760 - add r1, r6, #0 - ldr r0, [r0, #4] - add r2, r4, #0 - ldr r0, [r0, #0x40] - bl sub_02054F68 - cmp r0, #0 - beq _02243BE6 - mov r1, #6 - add r0, sp, #0 - strb r1, [r0, #7] - mov r0, #0x22 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_02243BE6: - add r0, r6, #0 - add r1, r4, #0 - bl ov23_0224240C - cmp r0, #0 - bne _02243C20 - ldr r2, _02243C30 ; =0x02257760 - add r1, r4, #0 - ldr r3, [r2, #4] - mov r2, #0xd1 - lsl r2, r2, #2 - add r2, r3, r2 - lsl r4, r5, #4 - mov r3, #6 - mul r3, r4 - add r2, r2, r3 - ldrb r3, [r7] - add r0, r6, #0 - bl ov23_02243A80 - cmp r0, #0 - beq _02243C20 - mov r2, #1 - add r1, sp, #0 - strb r2, [r1, #7] - add r1, sp, #0 - mov r2, #6 - bl sub_020C4DB0 -_02243C20: - mov r0, #0x22 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 -_02243C2A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243C30: .word 0x02257760 -_02243C34: .word 0x0000FFFF - thumb_func_end ov23_02243B0C - - thumb_func_start ov23_02243C38 -ov23_02243C38: ; 0x02243C38 - mov r0, #8 - bx lr - thumb_func_end ov23_02243C38 - - thumb_func_start ov23_02243C3C -ov23_02243C3C: ; 0x02243C3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp, #4] - ldr r0, _02243CE0 ; =0x02257760 - str r1, [sp, #8] - ldr r0, [r0, #4] - add r7, r2, #0 - ldr r0, [r0, #0x40] - add r5, r3, #0 - ldr r0, [r0, #0xc] - bl sub_020298B0 - str r0, [sp, #0xc] - cmp r5, #0x40 - blt _02243C60 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02243C60: - ldr r0, _02243CE0 ; =0x02257760 - ldr r2, [r7, #4] - ldr r1, [r0, #4] - mov r0, #0xd1 - lsl r0, r0, #2 - add r4, r1, r0 - asr r0, r5, #3 - lsr r0, r0, #0x1c - add r0, r5, r0 - asr r0, r0, #4 - add r0, #8 - lsl r1, r0, #4 - add r6, r1, #0 - mov r0, #6 - ldr r1, [r7, #0] - mul r6, r0 - ldr r0, [r7, #8] - mul r1, r2 - add r0, r0, r1 - str r0, [r7, #0] - lsr r1, r0, #0x10 - mov r0, #0x1a - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - ldr r0, _02243CE4 ; =0x02256788 - ldrb r7, [r0, r1] - ldr r0, [sp, #4] - ldr r1, [sp, #8] - bl ov23_0224240C - cmp r0, #0 - bne _02243CDA - add r0, r4, r6 - bl ov23_022439D0 - cmp r0, #0 - beq _02243CDA - ldr r0, [sp, #4] - ldr r1, [sp, #8] - add r2, r4, r6 - add r3, r7, #0 - bl ov23_02243A80 - cmp r0, #0 - beq _02243CDA - strb r5, [r0, #5] - ldr r0, [sp, #8] - ldr r3, [sp, #4] - str r0, [sp] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r2, r5, #0 - bl sub_02028EF8 - add sp, #0x10 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} -_02243CDA: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243CE0: .word 0x02257760 -_02243CE4: .word 0x02256788 - thumb_func_end ov23_02243C3C - - thumb_func_start ov23_02243CE8 -ov23_02243CE8: ; 0x02243CE8 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _02243D4C ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r5, r0, #0 - mov r4, #0 -_02243CFA: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02028F40 - add r7, r0, #0 - beq _02243D44 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02028F5C - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02028F88 - ldr r2, _02243D4C ; =0x02257760 - add r1, r0, #0 - ldr r3, [r2, #4] - mov r2, #0xd1 - lsl r2, r2, #2 - add r2, r3, r2 - asr r3, r4, #3 - lsr r3, r3, #0x1c - add r3, r4, r3 - asr r3, r3, #4 - add r3, #8 - add r0, r6, #0 - lsl r6, r3, #4 - mov r3, #6 - mul r3, r6 - add r2, r2, r3 - add r3, r7, #0 - bl ov23_02243A80 - cmp r0, #0 - beq _02243D44 - strb r4, [r0, #5] -_02243D44: - add r4, r4, #1 - cmp r4, #0x40 - blt _02243CFA - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243D4C: .word 0x02257760 - thumb_func_end ov23_02243CE8 - - thumb_func_start ov23_02243D50 -ov23_02243D50: ; 0x02243D50 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r0, _02243D9C ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - bl sub_0203D174 - bl sub_020298B0 - mov r4, #0 - add r7, r0, #0 - add r5, r4, #0 -_02243D68: - ldr r0, _02243D9C ; =0x02257760 - mov r1, #0xaa - ldr r0, [r0, #4] - mov r3, #0xa9 - add r6, r0, r5 - ldr r0, _02243DA0 ; =0x000002A6 - lsl r1, r1, #2 - ldrh r0, [r6, r0] - lsl r3, r3, #2 - add r2, r4, #0 - str r0, [sp] - ldr r0, _02243DA4 ; =0x000002A9 - ldrb r0, [r6, r0] - str r0, [sp, #4] - ldrb r1, [r6, r1] - ldrh r3, [r6, r3] - add r0, r7, #0 - bl sub_02028FE0 - add r4, r4, #1 - add r5, r5, #6 - cmp r4, #0x10 - blt _02243D68 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243D9C: .word 0x02257760 -_02243DA0: .word 0x000002A6 -_02243DA4: .word 0x000002A9 - thumb_func_end ov23_02243D50 - - thumb_func_start ov23_02243DA8 -ov23_02243DA8: ; 0x02243DA8 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _02243E1C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa9 - lsl r0, r0, #2 - add r0, r1, r0 - bl ov23_022439D0 - add r5, r0, #0 - bne _02243DE0 - ldr r0, _02243E1C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa9 - lsl r0, r0, #2 - add r0, r1, r0 - bl ov23_02244EA0 - bl ov23_02243E20 - ldr r0, _02243E1C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa9 - lsl r0, r0, #2 - add r0, r1, r0 - bl ov23_022439D0 - add r5, r0, #0 -_02243DE0: - ldr r0, _02243E1C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa9 - lsl r0, r0, #2 - add r0, r1, r0 - bl ov23_022439E4 - add r4, r0, #0 - add r0, r6, #0 - add r1, r5, #0 - mov r2, #6 - bl sub_020C4DB0 - bl ov23_02243D50 - ldrh r0, [r5] - ldrh r1, [r5, #2] - ldrb r3, [r5, #4] - mov r2, #1 - bl ov23_02244E68 - ldr r1, _02243E1C ; =0x02257760 - ldr r2, [r1, #4] - lsl r1, r4, #2 - add r2, r2, r1 - mov r1, #0xc1 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r4, r5, r6, pc} - nop -_02243E1C: .word 0x02257760 - thumb_func_end ov23_02243DA8 - - thumb_func_start ov23_02243E20 -ov23_02243E20: ; 0x02243E20 - push {r3, r4, r5, r6, r7, lr} - ldr r2, _02243ECC ; =0x02257760 - mov r6, #0 - ldr r3, [r2, #4] - mov r2, #0xa9 - lsl r2, r2, #2 - add r2, r3, r2 - ldrh r3, [r0] - mvn r6, r6 - mov r1, #0 -_02243E34: - ldrh r4, [r2] - cmp r3, r4 - bne _02243E46 - ldrh r5, [r0, #2] - ldrh r4, [r2, #2] - cmp r5, r4 - bne _02243E46 - add r6, r1, #0 - b _02243E4E -_02243E46: - add r1, r1, #1 - add r2, r2, #6 - cmp r1, #0x10 - blt _02243E34 -_02243E4E: - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _02243EC8 - add r5, r6, #0 - cmp r6, #0xf - bge _02243E84 - mov r0, #6 - add r4, r6, #0 - ldr r7, _02243ECC ; =0x02257760 - mul r4, r0 -_02243E64: - mov r0, #0xa9 - ldr r1, [r7, #4] - lsl r0, r0, #2 - add r1, r1, r0 - add r2, r5, #1 - mov r0, #6 - mul r0, r2 - add r0, r1, r0 - add r1, r1, r4 - mov r2, #6 - bl sub_020C4DB0 - add r5, r5, #1 - add r4, r4, #6 - cmp r5, #0xf - blt _02243E64 -_02243E84: - ldr r1, _02243ECC ; =0x02257760 - ldr r0, _02243ED0 ; =0x00000302 - ldr r2, [r1, #4] - mov r3, #0 - strb r3, [r2, r0] - ldr r1, [r1, #4] - lsl r4, r6, #2 - add r1, r1, r4 - add r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02243EA0 - bl sub_0207136C -_02243EA0: - cmp r6, #0xf - bge _02243EBC - mov r0, #0xc2 - lsl r0, r0, #2 - ldr r2, _02243ECC ; =0x02257760 - sub r1, r0, #4 -_02243EAC: - ldr r3, [r2, #4] - add r6, r6, #1 - add r5, r3, r4 - ldr r3, [r5, r0] - add r4, r4, #4 - str r3, [r5, r1] - cmp r6, #0xf - blt _02243EAC -_02243EBC: - ldr r0, _02243ECC ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - mov r0, #0xd - lsl r0, r0, #6 - str r2, [r1, r0] -_02243EC8: - pop {r3, r4, r5, r6, r7, pc} - nop -_02243ECC: .word 0x02257760 -_02243ED0: .word 0x00000302 - thumb_func_end ov23_02243E20 - - thumb_func_start ov23_02243ED4 -ov23_02243ED4: ; 0x02243ED4 - push {r4, lr} - add r4, r2, #0 - bl sub_0203608C - ldrb r1, [r4, #6] - cmp r1, r0 - bne _02243F6E - bl sub_020594FC - ldrb r0, [r4, #7] - cmp r0, #1 - bne _02243F18 - add r0, r4, #0 - bl ov23_02243DA8 - ldrb r0, [r4, #4] - bl ov23_0224FD68 - bl ov23_0224219C - ldrb r1, [r4, #4] - bl ov23_02254098 - bl ov23_0224219C - ldr r3, _02243F70 ; =ov23_02243850 - mov r1, #0x83 - mov r2, #1 - bl ov23_02253F40 - ldr r0, _02243F74 ; =0x00000623 - bl sub_02005748 - pop {r4, pc} -_02243F18: - cmp r0, #4 - bne _02243F2C - bl ov23_0224219C - ldr r3, _02243F70 ; =ov23_02243850 - mov r1, #0x49 - mov r2, #1 - bl ov23_02253F40 - pop {r4, pc} -_02243F2C: - cmp r0, #5 - bne _02243F40 - bl ov23_0224219C - ldr r3, _02243F70 ; =ov23_02243850 - mov r1, #0x37 - mov r2, #1 - bl ov23_02253F40 - pop {r4, pc} -_02243F40: - cmp r0, #6 - bne _02243F54 - bl ov23_0224219C - ldr r3, _02243F70 ; =ov23_02243850 - mov r1, #0x3c - mov r2, #1 - bl ov23_02253F40 - pop {r4, pc} -_02243F54: - cmp r0, #7 - bne _02243F60 - mov r0, #0 - bl ov23_02243850 - pop {r4, pc} -_02243F60: - bl ov23_0224219C - ldr r3, _02243F70 ; =ov23_02243850 - mov r1, #0x3b - mov r2, #1 - bl ov23_02253F40 -_02243F6E: - pop {r4, pc} - ; .align 2, 0 -_02243F70: .word ov23_02243850 -_02243F74: .word 0x00000623 - thumb_func_end ov23_02243ED4 - - thumb_func_start ov23_02243F78 -ov23_02243F78: ; 0x02243F78 - ldr r0, _02243F90 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xd1 - lsl r0, r0, #2 - add r3, r1, r0 - ldrh r1, [r2] - mov r0, #6 - mul r0, r1 - add r0, r3, r0 - ldr r3, _02243F94 ; =ov23_02243A00 - bx r3 - nop -_02243F90: .word 0x02257760 -_02243F94: .word ov23_02243A00 - thumb_func_end ov23_02243F78 - - thumb_func_start ov23_02243F98 -ov23_02243F98: ; 0x02243F98 - mov r0, #2 - bx lr - thumb_func_end ov23_02243F98 - - thumb_func_start ov23_02243F9C -ov23_02243F9C: ; 0x02243F9C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - lsl r1, r0, #4 - str r0, [sp] - mov r0, #6 - add r7, r1, #0 - mul r7, r0 - ldr r0, _02244018 ; =0x02257760 - add r5, r2, #0 - ldr r1, [r0, #4] - mov r0, #0xd1 - lsl r0, r0, #2 - add r0, r1, r0 - add r6, r0, r7 - bl sub_0203608C - cmp r0, #0 - bne _02244012 - cmp r4, #0x60 - beq _02243FCA - bl sub_02022974 -_02243FCA: - mov r0, #0 - add r4, r0, #0 -_02243FCE: - add r0, r0, #1 - strb r4, [r6, #4] - add r6, r6, #6 - cmp r0, #0x10 - blt _02243FCE -_02243FD8: - ldrb r3, [r5, #4] - cmp r3, #0 - beq _02243FF2 - ldr r2, _02244018 ; =0x02257760 - ldrh r0, [r5] - ldr r6, [r2, #4] - mov r2, #0xd1 - lsl r2, r2, #2 - add r2, r6, r2 - ldrh r1, [r5, #2] - add r2, r2, r7 - bl ov23_02243A80 -_02243FF2: - add r4, r4, #1 - add r5, r5, #6 - cmp r4, #0x10 - blt _02243FD8 - ldr r0, [sp] - add r1, sp, #4 - strb r0, [r1] - mov r0, #1 - strb r0, [r1, #1] - mov r0, #0x24 - add r1, sp, #4 - mov r2, #2 - bl sub_02035AC4 - bl ov23_02244638 -_02244012: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244018: .word 0x02257760 - thumb_func_end ov23_02243F9C - - thumb_func_start ov23_0224401C -ov23_0224401C: ; 0x0224401C - push {r4, lr} - ldr r0, _02244040 ; =0x02257760 - add r4, r2, #0 - ldr r0, [r0, #4] - cmp r0, #0 - beq _0224403C - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0224403C - ldr r0, _02244040 ; =0x02257760 - ldrb r2, [r4, #1] - ldr r1, [r0, #4] - ldr r0, _02244044 ; =0x00000B45 - strb r2, [r1, r0] -_0224403C: - pop {r4, pc} - nop -_02244040: .word 0x02257760 -_02244044: .word 0x00000B45 - thumb_func_end ov23_0224401C - - thumb_func_start ov23_02244048 -ov23_02244048: ; 0x02244048 - mov r0, #2 - bx lr - thumb_func_end ov23_02244048 - - thumb_func_start ov23_0224404C -ov23_0224404C: ; 0x0224404C - ldr r0, _02244060 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _02244064 ; =0x00000B45 - ldrb r0, [r1, r0] - cmp r0, #1 - bne _0224405C - mov r0, #1 - bx lr -_0224405C: - mov r0, #0 - bx lr - ; .align 2, 0 -_02244060: .word 0x02257760 -_02244064: .word 0x00000B45 - thumb_func_end ov23_0224404C - - thumb_func_start ov23_02244068 -ov23_02244068: ; 0x02244068 - ldr r0, _02244074 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - ldr r0, _02244078 ; =0x00000B45 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_02244074: .word 0x02257760 -_02244078: .word 0x00000B45 - thumb_func_end ov23_02244068 - - thumb_func_start ov23_0224407C -ov23_0224407C: ; 0x0224407C - mov r0, #4 - bx lr - thumb_func_end ov23_0224407C - - thumb_func_start ov23_02244080 -ov23_02244080: ; 0x02244080 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _02244138 ; =0x02257760 - add r6, r2, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - bl sub_0203D174 - bl sub_020298B0 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02058EE0 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02058F18 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_0224429C - add r4, r0, #0 - beq _02244132 - add r0, r5, #0 - bl ov23_0224A6B8 - cmp r0, #0 - beq _022440C2 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022440C2: - add r3, sp, #0 - ldrb r2, [r3, #7] - mov r0, #0xf - bic r2, r0 - lsl r0, r5, #0x18 - lsr r1, r0, #0x18 - mov r0, #0xf - and r0, r1 - orr r0, r2 - strb r0, [r3, #7] - add r0, r4, #0 - bl ov23_0224426C - add r1, sp, #0 - strb r0, [r1, #6] - add r0, r4, #0 - add r1, sp, #0 - mov r2, #6 - bl sub_020C4DB0 - mov r0, #0x10 - tst r0, r6 - add r1, sp, #0 - beq _022440FC - ldrb r2, [r1, #7] - mov r0, #0x40 - orr r0, r2 - strb r0, [r1, #7] - b _0224410A -_022440FC: - ldrb r2, [r1, #7] - mov r0, #0x40 - bic r2, r0 - add r0, r4, #0 - strb r2, [r1, #7] - bl ov23_02243A00 -_0224410A: - add r1, sp, #0 - ldrb r0, [r1, #6] - cmp r0, #8 - blo _0224411A - ldrb r1, [r1, #5] - add r0, r7, #0 - bl sub_02028FB4 -_0224411A: - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - mov r0, #0x33 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02244132: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244138: .word 0x02257760 - thumb_func_end ov23_02244080 - - thumb_func_start ov23_0224413C -ov23_0224413C: ; 0x0224413C - mov r0, #8 - bx lr - thumb_func_end ov23_0224413C - - thumb_func_start ov23_02244140 -ov23_02244140: ; 0x02244140 - push {r3, r4, r5, lr} - add r4, r2, #0 - ldrb r0, [r4, #7] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - cmp r0, #8 - blo _02244152 - bl sub_02022974 -_02244152: - ldrb r3, [r4, #7] - lsl r0, r3, #0x19 - lsr r0, r0, #0x1f - cmp r0, #1 - bne _0224417E - bl sub_0203608C - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - cmp r1, r0 - bne _02244250 - bl ov23_0224219C - ldr r3, _02244254 ; =ov23_02243850 - mov r1, #0x4e - mov r2, #1 - bl ov23_02253F40 - bl sub_020594FC - pop {r3, r4, r5, pc} -_0224417E: - ldr r1, _02244258 ; =0x02257760 - mov r0, #1 - ldr r2, [r1, #4] - lsl r1, r3, #0x1c - lsr r1, r1, #0x1c - add r2, r2, r1 - ldr r1, _0224425C ; =0x00000B2C - strb r0, [r2, r1] - bl sub_0203608C - ldrb r1, [r4, #6] - cmp r1, r0 - bne _022441A2 - add r0, r4, #0 - bl ov23_02243E20 - bl ov23_02243D50 -_022441A2: - bl sub_0203608C - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - cmp r1, r0 - bne _02244250 - ldrb r0, [r4, #4] - bl ov23_0224F730 - cmp r0, #0 - beq _0224423E - bl sub_0203608C - ldrb r1, [r4, #6] - cmp r1, r0 - beq _022441E8 - ldr r0, _02244258 ; =0x02257760 - ldr r2, [r0, #4] - ldr r0, _02244260 ; =0x00000B34 - ldrh r1, [r2, r0] - cmp r1, #0 - bne _022441D6 - ldrb r1, [r4, #4] - add r0, r0, #2 - strb r1, [r2, r0] -_022441D6: - ldr r0, _02244258 ; =0x02257760 - ldr r1, _02244264 ; =0x0000FFFF - ldr r3, [r0, #4] - ldr r0, _02244260 ; =0x00000B34 - ldrh r2, [r3, r0] - cmp r2, r1 - beq _022441E8 - add r1, r2, #1 - strh r1, [r3, r0] -_022441E8: - ldr r0, _02244268 ; =0x000005E3 - bl sub_02005748 - bl ov23_0224219C - add r5, r0, #0 - ldrb r0, [r4, #7] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - bl sub_02032EE8 - add r1, r0, #0 - add r0, r5, #0 - bl ov23_02254050 - bl ov23_0224219C - ldrb r2, [r4, #4] - mov r1, #2 - bl ov23_022541F0 - bl ov23_0224219C - mov r1, #2 - bl ov23_02254204 - bl ov23_0224219C - ldrb r1, [r4, #4] - bl ov23_02254098 - bl ov23_0224219C - ldr r3, _02244254 ; =ov23_02243850 - mov r1, #0x12 - mov r2, #1 - bl ov23_02253F40 - bl ov23_0224219C - bl ov23_02253F98 - b _0224424C -_0224423E: - bl ov23_0224219C - ldr r3, _02244254 ; =ov23_02243850 - mov r1, #0x4e - mov r2, #1 - bl ov23_02253F40 -_0224424C: - bl sub_020594FC -_02244250: - pop {r3, r4, r5, pc} - nop -_02244254: .word ov23_02243850 -_02244258: .word 0x02257760 -_0224425C: .word 0x00000B2C -_02244260: .word 0x00000B34 -_02244264: .word 0x0000FFFF -_02244268: .word 0x000005E3 - thumb_func_end ov23_02244140 - - thumb_func_start ov23_0224426C -ov23_0224426C: ; 0x0224426C - push {r3, lr} - ldr r1, _02244298 ; =0x02257760 - mov r3, #0 - ldr r2, [r1, #4] - mov r1, #0xd1 - lsl r1, r1, #2 - add r1, r2, r1 -_0224427A: - cmp r1, r0 - bne _02244288 - asr r0, r3, #3 - lsr r0, r0, #0x1c - add r0, r3, r0 - asr r0, r0, #4 - pop {r3, pc} -_02244288: - add r3, r3, #1 - add r1, r1, #6 - cmp r3, #0xc0 - blt _0224427A - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02244298: .word 0x02257760 - thumb_func_end ov23_0224426C - - thumb_func_start ov23_0224429C -ov23_0224429C: ; 0x0224429C - push {r3, lr} - add r2, sp, #0 - strh r0, [r2] - strh r1, [r2, #2] - ldr r1, _022442CC ; =ov23_02243864 - mov r0, #0xc0 - bl ov23_022427DC - add r0, sp, #0 - bl ov23_0224271C - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _022442BE - mov r0, #0 - pop {r3, pc} -_022442BE: - ldr r1, _022442D0 ; =0x02257760 - lsl r0, r0, #2 - ldr r1, [r1, #4] - add r1, r1, r0 - ldr r0, _022442D4 ; =0x000007C4 - ldr r0, [r1, r0] - pop {r3, pc} - ; .align 2, 0 -_022442CC: .word ov23_02243864 -_022442D0: .word 0x02257760 -_022442D4: .word 0x000007C4 - thumb_func_end ov23_0224429C - - thumb_func_start ov23_022442D8 -ov23_022442D8: ; 0x022442D8 - push {r3, lr} - bl ov23_0224429C - cmp r0, #0 - beq _022442E6 - mov r0, #1 - pop {r3, pc} -_022442E6: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_022442D8 - - thumb_func_start ov23_022442EC -ov23_022442EC: ; 0x022442EC - mov r0, #8 - bx lr - thumb_func_end ov23_022442EC - - thumb_func_start ov23_022442F0 -ov23_022442F0: ; 0x022442F0 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _022443C4 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r6, r0, #0 - add r0, r4, #0 - bl ov23_0224162C - cmp r0, #0 - beq _02244314 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_02244314: - add r0, r4, #0 - bl sub_02058DF8 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02058E4C - add r1, r0, #0 - add r0, r5, #0 - bl ov23_0224429C - add r5, r0, #0 - bne _02244334 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_02244334: - ldr r0, _022443C4 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r4 - ldr r0, _022443C8 ; =0x00000B3C - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02244358 - add r0, r4, #0 - bl ov23_0224AD98 - ldr r1, _022443C4 ; =0x02257760 - add r0, r4, #0 - ldr r1, [r1, #4] - add r2, r1, r4 - ldr r1, _022443C8 ; =0x00000B3C - ldrb r1, [r2, r1] - bl ov23_02244844 -_02244358: - ldrb r1, [r5, #4] - add r0, r4, #0 - bl ov23_02244830 - add r0, sp, #0 - ldrb r2, [r0, #7] - mov r1, #0x80 - bic r2, r1 - strb r2, [r0, #7] - ldrb r1, [r0, #7] - mov r2, #0xf - bic r1, r2 - lsl r2, r4, #0x18 - lsr r3, r2, #0x18 - mov r2, #0xf - and r2, r3 - orr r1, r2 - strb r1, [r0, #7] - add r0, r5, #0 - bl ov23_0224426C - add r1, sp, #0 - strb r0, [r1, #6] - add r0, r5, #0 - add r1, sp, #0 - mov r2, #6 - bl sub_020C4DB0 - add r1, sp, #0 - ldrb r0, [r1, #6] - cmp r0, #8 - blo _022443A0 - ldrb r1, [r1, #5] - add r0, r6, #0 - bl sub_02028FB4 -_022443A0: - mov r0, #0x25 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - ldr r0, _022443C4 ; =0x02257760 - ldrb r2, [r5, #4] - ldr r0, [r0, #4] - add r1, r0, r4 - ldr r0, _022443C8 ; =0x00000B3C - strb r2, [r1, r0] - add r0, r5, #0 - bl ov23_02243A00 - mov r0, #1 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_022443C4: .word 0x02257760 -_022443C8: .word 0x00000B3C - thumb_func_end ov23_022442F0 - - thumb_func_start ov23_022443CC -ov23_022443CC: ; 0x022443CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - ldr r1, _02244444 ; =0x02257760 - add r5, r0, #0 - ldr r1, [r1, #4] - add r4, r2, #0 - add r2, r1, r5 - ldr r1, _02244448 ; =0x00000B3C - add r7, r3, #0 - ldrb r1, [r2, r1] - cmp r1, #0 - beq _022443EA - bl ov23_02244844 -_022443EA: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02244830 - add r1, sp, #0 - ldrb r3, [r1, #7] - mov r0, #0xf - bic r3, r0 - lsl r0, r5, #0x18 - lsr r2, r0, #0x18 - mov r0, #0xf - and r0, r2 - orr r0, r3 - strb r0, [r1, #7] - strb r6, [r1, #6] - ldrb r2, [r1, #7] - mov r0, #0x80 - orr r0, r2 - strb r0, [r1, #7] - strb r4, [r1, #4] - ldr r0, [sp, #0x20] - strh r7, [r1] - strh r0, [r1, #2] - ldrb r0, [r1, #7] - mov r2, #0x30 - bic r0, r2 - ldr r2, [sp, #0x24] - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - lsl r2, r2, #0x1e - lsr r2, r2, #0x1a - orr r0, r2 - strb r0, [r1, #7] - mov r0, #0x25 - add r1, sp, #0 - mov r2, #8 - bl sub_02035AC4 - ldr r0, _02244444 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - ldr r0, _02244448 ; =0x00000B3C - strb r4, [r1, r0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244444: .word 0x02257760 -_02244448: .word 0x00000B3C - thumb_func_end ov23_022443CC - - thumb_func_start ov23_0224444C -ov23_0224444C: ; 0x0224444C - push {r4, lr} - ldr r1, _0224446C ; =0x02257760 - add r4, r0, #0 - ldr r1, [r1, #4] - cmp r1, #0 - beq _02244468 - bl sub_02059094 - cmp r0, #0 - beq _02244468 - add r0, r4, #0 - bl ov23_022442F0 - pop {r4, pc} -_02244468: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0224446C: .word 0x02257760 - thumb_func_end ov23_0224444C - - thumb_func_start ov23_02244470 -ov23_02244470: ; 0x02244470 - ldr r1, _02244484 ; =0x02257760 - lsl r0, r0, #3 - ldr r1, [r1, #4] - add r1, r1, r0 - ldr r0, _02244488 ; =0x00000ACB - ldrb r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bx lr - nop -_02244484: .word 0x02257760 -_02244488: .word 0x00000ACB - thumb_func_end ov23_02244470 - - thumb_func_start ov23_0224448C -ov23_0224448C: ; 0x0224448C - push {r4, r5, r6, lr} - ldr r0, _022445D4 ; =0x02257760 - add r4, r2, #0 - ldr r0, [r0, #4] - cmp r0, #0 - bne _0224449A - b _022445D2 -_0224449A: - ldr r0, [r0, #0x40] - bl sub_0203D174 - bl sub_020298A0 - add r6, r0, #0 - ldr r0, _022445D8 ; =0x00000622 - bl sub_02005748 - ldr r1, _022445D4 ; =0x02257760 - add r0, r4, #0 - ldr r2, [r1, #4] - ldr r1, _022445DC ; =0x00000AC4 - add r1, r2, r1 - ldrb r2, [r4, #7] - lsl r2, r2, #0x1c - lsr r2, r2, #0x19 - add r1, r1, r2 - mov r2, #8 - bl sub_020C4DB0 - ldrb r0, [r4, #4] - sub r0, #0x18 - cmp r0, #3 - bhi _02244530 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022444D8: ; jump table - .short _022444E0 - _022444D8 - 2 ; case 0 - .short _022444F4 - _022444D8 - 2 ; case 1 - .short _02244508 - _022444D8 - 2 ; case 2 - .short _0224451C - _022444D8 - 2 ; case 3 -_022444E0: - ldr r1, _022445D4 ; =0x02257760 - mov r0, #0x75 - ldr r2, [r1, #4] - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - add r2, r2, r1 - ldr r1, _022445E0 ; =0x00000B24 - strb r0, [r2, r1] - b _02244546 -_022444F4: - ldr r1, _022445D4 ; =0x02257760 - mov r0, #0x76 - ldr r2, [r1, #4] - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - add r2, r2, r1 - ldr r1, _022445E0 ; =0x00000B24 - strb r0, [r2, r1] - b _02244546 -_02244508: - ldr r1, _022445D4 ; =0x02257760 - mov r0, #0x77 - ldr r2, [r1, #4] - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - add r2, r2, r1 - ldr r1, _022445E0 ; =0x00000B24 - strb r0, [r2, r1] - b _02244546 -_0224451C: - ldr r1, _022445D4 ; =0x02257760 - mov r0, #0x78 - ldr r2, [r1, #4] - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - add r2, r2, r1 - ldr r1, _022445E0 ; =0x00000B24 - strb r0, [r2, r1] - b _02244546 -_02244530: - ldr r0, _022445D4 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022445E4 ; =0x00000ACB - add r0, r1, r0 - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r3, r1, #0x19 - ldrb r2, [r0, r3] - mov r1, #0x40 - orr r1, r2 - strb r1, [r0, r3] -_02244546: - ldrb r0, [r4, #7] - lsl r0, r0, #0x1c - lsr r5, r0, #0x1c - bl sub_0203608C - cmp r5, r0 - bne _02244568 - ldrb r3, [r4, #7] - ldrb r1, [r4, #4] - add r0, r5, #0 - lsl r2, r3, #0x18 - lsl r3, r3, #0x1a - lsr r2, r2, #0x1f - lsr r3, r3, #0x1e - bl ov23_022448C4 - b _02244570 -_02244568: - ldrb r1, [r4, #4] - add r0, r5, #0 - bl ov23_02248B3C -_02244570: - ldrb r0, [r4, #7] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - bl ov23_0224B00C - bl sub_0203608C - ldrb r1, [r4, #7] - lsl r1, r1, #0x1c - lsr r1, r1, #0x1c - cmp r1, r0 - bne _0224458E - add r0, r6, #0 - bl sub_0202970C -_0224458E: - ldrb r5, [r4, #6] - bl sub_0203608C - cmp r5, r0 - bne _022445D2 - ldrb r0, [r4, #7] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - cmp r5, r0 - beq _022445A8 - add r0, r6, #0 - bl sub_020296D4 -_022445A8: - ldr r0, _022445D4 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0xc] - bl sub_020507E4 - add r5, r0, #0 - bl sub_0206B42C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - bl sub_0206B43C - add r0, r4, #0 - bl ov23_02243E20 - bl ov23_02243D50 -_022445D2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022445D4: .word 0x02257760 -_022445D8: .word 0x00000622 -_022445DC: .word 0x00000AC4 -_022445E0: .word 0x00000B24 -_022445E4: .word 0x00000ACB - thumb_func_end ov23_0224448C - - thumb_func_start ov23_022445E8 -ov23_022445E8: ; 0x022445E8 - push {r4, lr} - ldrb r2, [r2] - ldr r1, _02244610 ; =0x02256558 - lsl r3, r2, #2 - ldr r1, [r1, r3] - ldr r3, _02244614 ; =0x02257760 - ldr r3, [r3, #4] - add r4, r3, r0 - ldr r3, _02244618 ; =0x00000B3C - ldrb r3, [r4, r3] - cmp r2, r3 - beq _02244608 - mov r0, #1 - bl sub_020389C4 - pop {r4, pc} -_02244608: - cmp r1, #0 - beq _0224460E - blx r1 -_0224460E: - pop {r4, pc} - ; .align 2, 0 -_02244610: .word 0x02256558 -_02244614: .word 0x02257760 -_02244618: .word 0x00000B3C - thumb_func_end ov23_022445E8 - - thumb_func_start ov23_0224461C -ov23_0224461C: ; 0x0224461C - push {r3, r4, r5, lr} - add r5, r2, #0 - ldrb r4, [r5] - bl sub_0203608C - cmp r4, r0 - beq _02244634 - ldrb r1, [r5, #1] - ldrb r2, [r5, #2] - add r0, r4, #0 - bl sub_02058BA8 -_02244634: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224461C - - thumb_func_start ov23_02244638 -ov23_02244638: ; 0x02244638 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r0, #0 - add r3, sp, #0 - ldr r1, _02244674 ; =0x02257760 - strb r0, [r3] - ldr r1, [r1, #4] - cmp r1, #0 - beq _0224466E - ldr r2, _02244678 ; =0x00000B3C - mov r4, #1 -_0224464E: - ldrb r5, [r1, r2] - cmp r5, #0 - beq _0224465E - add r5, r4, #0 - ldrb r6, [r3] - lsl r5, r0 - orr r5, r6 - strb r5, [r3] -_0224465E: - add r0, r0, #1 - add r1, r1, #1 - cmp r0, #8 - blt _0224464E - mov r0, #0x2d - add r1, sp, #0 - bl sub_02035B48 -_0224466E: - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02244674: .word 0x02257760 -_02244678: .word 0x00000B3C - thumb_func_end ov23_02244638 - - thumb_func_start ov23_0224467C -ov23_0224467C: ; 0x0224467C - push {r4, r5, r6, lr} - ldr r0, _022446A8 ; =0x02257760 - ldrb r5, [r2] - ldr r1, [r0, #4] - ldr r0, _022446AC ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0 - bne _022446A4 - mov r4, #0 - mov r6, #1 -_02244690: - add r0, r6, #0 - lsl r0, r4 - tst r0, r5 - beq _0224469E - add r0, r4, #0 - bl ov23_0224B00C -_0224469E: - add r4, r4, #1 - cmp r4, #8 - blt _02244690 -_022446A4: - pop {r4, r5, r6, pc} - nop -_022446A8: .word 0x02257760 -_022446AC: .word 0x00000B3B - thumb_func_end ov23_0224467C - - thumb_func_start ov23_022446B0 -ov23_022446B0: ; 0x022446B0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, _02244774 ; =0x02257760 - ldr r0, [r0, #4] - cmp r0, #0 - bne _022446C0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022446C0: - mov r5, #0 - mov r0, #0x40 - add r6, r5, #0 - str r0, [sp] -_022446C8: - ldr r0, _02244774 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _02244778 ; =0x00000ACB - add r0, r1, r0 - ldrb r2, [r0, r6] - lsl r1, r2, #0x19 - lsr r1, r1, #0x1f - cmp r1, #1 - bne _02244724 - ldr r1, [sp] - bic r2, r1 - strb r2, [r0, r6] - ldr r0, _02244774 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r6 - ldr r0, _0224477C ; =0x00000ACA - ldrb r0, [r1, r0] - cmp r0, #8 - blo _02244706 - add r0, r5, #0 - bl sub_02032EE8 - mov r1, #0 - mov r2, #0x63 - add r3, r7, #0 - bl ov23_022422A8 - cmp r0, #0 - beq _02244724 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02244706: - bl sub_02032EE8 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02032EE8 - add r1, r4, #0 - mov r2, #0x64 - add r3, r7, #0 - bl ov23_0224223C - cmp r0, #0 - beq _02244724 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02244724: - ldr r0, _02244774 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - ldr r0, _02244780 ; =0x00000B04 - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _02244768 - add r0, r5, #0 - bl sub_02032EE8 - add r4, r0, #0 - ldr r0, _02244774 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - ldr r0, _02244780 ; =0x00000B04 - ldrb r0, [r1, r0] - bl sub_02032EE8 - add r1, r0, #0 - ldr r0, _02244774 ; =0x02257760 - mov r2, #0xff - ldr r0, [r0, #4] - add r3, r0, r5 - ldr r0, _02244780 ; =0x00000B04 - strb r2, [r3, r0] - add r0, r4, #0 - mov r2, #0x74 - add r3, r7, #0 - bl ov23_0224223C - cmp r0, #0 - beq _02244768 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02244768: - add r5, r5, #1 - add r6, #8 - cmp r5, #8 - blt _022446C8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244774: .word 0x02257760 -_02244778: .word 0x00000ACB -_0224477C: .word 0x00000ACA -_02244780: .word 0x00000B04 - thumb_func_end ov23_022446B0 - - thumb_func_start ov23_02244784 -ov23_02244784: ; 0x02244784 - push {r3, r4, r5, r6, r7, lr} - ldr r6, _02244820 ; =0x02257760 - add r5, r0, #0 - ldr r0, [r6, #4] - cmp r0, #0 - bne _02244794 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02244794: - mov r4, #0 -_02244796: - ldr r0, [r6, #4] - ldr r1, _02244824 ; =0x00000B24 - add r0, r0, r4 - ldrb r7, [r0, r1] - cmp r7, #0 - beq _022447BE - mov r2, #0 - strb r2, [r0, r1] - add r0, r4, #0 - bl sub_02032EE8 - mov r1, #0 - add r2, r7, #0 - add r3, r5, #0 - bl ov23_022422A8 - cmp r0, #0 - beq _022447BE - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022447BE: - ldr r0, [r6, #4] - ldr r1, _02244828 ; =0x00000B2C - add r0, r0, r4 - ldrb r1, [r0, r1] - cmp r1, #1 - bne _022447E8 - ldr r1, _02244828 ; =0x00000B2C - mov r2, #0 - strb r2, [r0, r1] - add r0, r4, #0 - bl sub_02032EE8 - mov r1, #0 - mov r2, #0x5a - add r3, r5, #0 - bl ov23_022422A8 - cmp r0, #0 - beq _022447E8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022447E8: - ldr r0, [r6, #4] - add r1, r0, r4 - ldr r0, _0224482C ; =0x00000B1C - ldrb r0, [r1, r0] - cmp r0, #1 - bne _02244816 - add r0, r4, #0 - bl sub_02032EE8 - ldr r1, [r6, #4] - mov r2, #0 - add r3, r1, r4 - ldr r1, _0224482C ; =0x00000B1C - strb r2, [r3, r1] - add r1, r2, #0 - mov r2, #0x62 - add r3, r5, #0 - bl ov23_022422A8 - cmp r0, #0 - beq _02244816 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02244816: - add r4, r4, #1 - cmp r4, #8 - blt _02244796 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244820: .word 0x02257760 -_02244824: .word 0x00000B24 -_02244828: .word 0x00000B2C -_0224482C: .word 0x00000B1C - thumb_func_end ov23_02244784 - - thumb_func_start ov23_02244830 -ov23_02244830: ; 0x02244830 - push {r3, lr} - lsl r2, r1, #2 - ldr r1, _02244840 ; =0x022564CC - ldr r1, [r1, r2] - cmp r1, #0 - beq _0224483E - blx r1 -_0224483E: - pop {r3, pc} - ; .align 2, 0 -_02244840: .word 0x022564CC - thumb_func_end ov23_02244830 - - thumb_func_start ov23_02244844 -ov23_02244844: ; 0x02244844 - push {r3, lr} - lsl r2, r1, #2 - ldr r1, _02244854 ; =0x022565E4 - ldr r1, [r1, r2] - cmp r1, #0 - beq _02244852 - blx r1 -_02244852: - pop {r3, pc} - ; .align 2, 0 -_02244854: .word 0x022565E4 - thumb_func_end ov23_02244844 - - thumb_func_start ov23_02244858 -ov23_02244858: ; 0x02244858 - push {r4, lr} - ldr r2, _022448B4 ; =0x02257760 - add r4, r0, #0 - ldr r3, [r2, #4] - ldr r2, _022448B8 ; =0x00000B3B - ldrb r2, [r3, r2] - cmp r2, #0 - beq _022448B2 - lsl r3, r2, #2 - ldr r2, _022448BC ; =0x022566FC - ldr r2, [r2, r3] - cmp r2, #0 - beq _02244874 - blx r2 -_02244874: - bl sub_0203608C - cmp r0, #0 - beq _02244882 - add r0, r4, #0 - bl ov23_0224AD98 -_02244882: - mov r0, #0x10 - bl sub_0205948C - ldr r0, _022448C0 ; =0x00000609 - bl sub_02005748 - ldr r0, _022448B4 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - mov r0, #0x2a - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, #0 - bl ov23_0224B040 - bl ov23_0224219C - bl ov23_02254044 - ldr r0, _022448B4 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - ldr r0, _022448B8 ; =0x00000B3B - strb r2, [r1, r0] -_022448B2: - pop {r4, pc} - ; .align 2, 0 -_022448B4: .word 0x02257760 -_022448B8: .word 0x00000B3B -_022448BC: .word 0x022566FC -_022448C0: .word 0x00000609 - thumb_func_end ov23_02244858 - - thumb_func_start ov23_022448C4 -ov23_022448C4: ; 0x022448C4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #1 - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov23_02244858 - ldr r0, _022448F0 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022448F4 ; =0x00000B3B - strb r4, [r1, r0] - ldr r0, _022448F8 ; =0x02256440 - lsl r1, r4, #2 - ldr r3, [r0, r1] - cmp r3, #0 - beq _022448EE - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - blx r3 -_022448EE: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022448F0: .word 0x02257760 -_022448F4: .word 0x00000B3B -_022448F8: .word 0x02256440 - thumb_func_end ov23_022448C4 - - thumb_func_start ov23_022448FC -ov23_022448FC: ; 0x022448FC - push {r3, r4, r5, r6, r7, lr} - bl sub_02059328 - add r6, r0, #0 - ldr r0, _02244950 ; =0x02257760 - add r1, r6, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EA84 - bl sub_0203608C - ldr r1, _02244950 ; =0x02257760 - lsl r0, r0, #3 - ldr r1, [r1, #4] - add r1, r1, r0 - ldr r0, _02244954 ; =0x00000AC4 - ldrh r4, [r1, r0] - bl sub_0203608C - ldr r1, _02244950 ; =0x02257760 - lsl r0, r0, #3 - ldr r1, [r1, #4] - add r1, r1, r0 - ldr r0, _02244958 ; =0x00000AC6 - ldrh r5, [r1, r0] - add r0, r6, #0 - bl sub_0206419C - add r7, r0, #0 - add r0, r6, #0 - bl sub_020641A8 - add r2, r0, #0 - mov r0, #0 - add r1, r4, r7 - add r2, r5, r2 - bl sub_02057A94 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244950: .word 0x02257760 -_02244954: .word 0x00000AC4 -_02244958: .word 0x00000AC6 - thumb_func_end ov23_022448FC - - thumb_func_start ov23_0224495C -ov23_0224495C: ; 0x0224495C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _022449D4 ; =0x02257760 - add r6, r1, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - str r0, [sp] - ldr r0, _022449D4 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02059328 - str r0, [sp, #4] - bl sub_0203608C - ldr r1, _022449D4 ; =0x02257760 - lsl r0, r0, #3 - ldr r1, [r1, #4] - add r1, r1, r0 - ldr r0, _022449D8 ; =0x00000AC4 - ldrh r4, [r1, r0] - bl sub_0203608C - ldr r1, _022449D4 ; =0x02257760 - lsl r0, r0, #3 - ldr r1, [r1, #4] - add r1, r1, r0 - ldr r0, _022449DC ; =0x00000AC6 - cmp r6, #0 - ldrh r5, [r1, r0] - bne _022449BC - ldr r0, [sp, #4] - bl sub_0206419C - add r4, r4, r0 - ldr r0, [sp, #4] - bl sub_020641A8 - add r5, r5, r0 -_022449BC: - ldr r0, [sp] - cmp r0, r4 - bne _022449CC - cmp r7, r5 - bne _022449CC - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022449CC: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022449D4: .word 0x02257760 -_022449D8: .word 0x00000AC4 -_022449DC: .word 0x00000AC6 - thumb_func_end ov23_0224495C - - thumb_func_start ov23_022449E0 -ov23_022449E0: ; 0x022449E0 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl ov23_0224AD7C - add r0, r4, #0 - mov r1, #0x1e - bl sub_02059354 - pop {r4, pc} - thumb_func_end ov23_022449E0 - - thumb_func_start ov23_022449F4 -ov23_022449F4: ; 0x022449F4 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl ov23_0224AD7C - add r0, r4, #0 - mov r1, #0x1e - bl sub_02059354 - pop {r4, pc} - thumb_func_end ov23_022449F4 - - thumb_func_start ov23_02244A08 -ov23_02244A08: ; 0x02244A08 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl ov23_0224AD7C - add r0, r4, #0 - bl sub_02059378 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02244A08 - - thumb_func_start ov23_02244A1C -ov23_02244A1C: ; 0x02244A1C - ldr r3, _02244A24 ; =ov23_0224AD7C - mov r1, #2 - bx r3 - nop -_02244A24: .word ov23_0224AD7C - thumb_func_end ov23_02244A1C - - thumb_func_start ov23_02244A28 -ov23_02244A28: ; 0x02244A28 - ldr r3, _02244A30 ; =ov23_0224AD7C - mov r1, #2 - bx r3 - nop -_02244A30: .word ov23_0224AD7C - thumb_func_end ov23_02244A28 - - thumb_func_start ov23_02244A34 -ov23_02244A34: ; 0x02244A34 - push {r4, lr} - add r4, r0, #0 - mov r1, #3 - bl ov23_0224AD7C - add r0, r4, #0 - bl sub_02058B94 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02244A34 - - thumb_func_start ov23_02244A48 -ov23_02244A48: ; 0x02244A48 - ldr r3, _02244A50 ; =sub_02058B0C - mov r1, #0 - add r2, r1, #0 - bx r3 - ; .align 2, 0 -_02244A50: .word sub_02058B0C - thumb_func_end ov23_02244A48 - - thumb_func_start ov23_02244A54 -ov23_02244A54: ; 0x02244A54 - ldr r3, _02244A5C ; =sub_02058B0C - mov r1, #1 - mov r2, #0 - bx r3 - ; .align 2, 0 -_02244A5C: .word sub_02058B0C - thumb_func_end ov23_02244A54 - - thumb_func_start ov23_02244A60 -ov23_02244A60: ; 0x02244A60 - ldr r3, _02244A68 ; =sub_02058B0C - mov r1, #2 - mov r2, #0 - bx r3 - ; .align 2, 0 -_02244A68: .word sub_02058B0C - thumb_func_end ov23_02244A60 - - thumb_func_start ov23_02244A6C -ov23_02244A6C: ; 0x02244A6C - ldr r3, _02244A74 ; =sub_02058B0C - mov r1, #3 - mov r2, #0 - bx r3 - ; .align 2, 0 -_02244A74: .word sub_02058B0C - thumb_func_end ov23_02244A6C - - thumb_func_start ov23_02244A78 -ov23_02244A78: ; 0x02244A78 - ldr r3, _02244A80 ; =sub_02058B0C - mov r1, #0 - mov r2, #1 - bx r3 - ; .align 2, 0 -_02244A80: .word sub_02058B0C - thumb_func_end ov23_02244A78 - - thumb_func_start ov23_02244A84 -ov23_02244A84: ; 0x02244A84 - ldr r3, _02244A8C ; =sub_02058B0C - mov r1, #1 - add r2, r1, #0 - bx r3 - ; .align 2, 0 -_02244A8C: .word sub_02058B0C - thumb_func_end ov23_02244A84 - - thumb_func_start ov23_02244A90 -ov23_02244A90: ; 0x02244A90 - ldr r3, _02244A98 ; =sub_02058B0C - mov r1, #2 - mov r2, #1 - bx r3 - ; .align 2, 0 -_02244A98: .word sub_02058B0C - thumb_func_end ov23_02244A90 - - thumb_func_start ov23_02244A9C -ov23_02244A9C: ; 0x02244A9C - ldr r3, _02244AA4 ; =sub_02058B0C - mov r1, #3 - mov r2, #1 - bx r3 - ; .align 2, 0 -_02244AA4: .word sub_02058B0C - thumb_func_end ov23_02244A9C - - thumb_func_start ov23_02244AA8 -ov23_02244AA8: ; 0x02244AA8 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl ov23_0224AD7C - add r0, r4, #0 - bl sub_02058B7C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02244AA8 - - thumb_func_start ov23_02244ABC -ov23_02244ABC: ; 0x02244ABC - bx lr - ; .align 2, 0 - thumb_func_end ov23_02244ABC - - thumb_func_start ov23_02244AC0 -ov23_02244AC0: ; 0x02244AC0 - push {r4, lr} - mov r1, #1 - add r4, r0, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r4, r0 - bne _02244AD8 - mov r0, #1 - bl ov23_02245A58 -_02244AD8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02244AC0 - - thumb_func_start ov23_02244ADC -ov23_02244ADC: ; 0x02244ADC - push {r4, lr} - mov r1, #1 - add r4, r0, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r4, r0 - bne _02244AF4 - mov r0, #0 - bl ov23_02245A58 -_02244AF4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02244ADC - - thumb_func_start ov23_02244AF8 -ov23_02244AF8: ; 0x02244AF8 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02244B1C - ldr r0, _02244B20 ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - add r2, r6, #0 - ldr r0, [r0, #0x40] - bl ov23_02244EA4 -_02244B1C: - pop {r4, r5, r6, pc} - nop -_02244B20: .word 0x02257760 - thumb_func_end ov23_02244AF8 - - thumb_func_start ov23_02244B24 -ov23_02244B24: ; 0x02244B24 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02244B48 - ldr r0, _02244B4C ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - add r2, r6, #0 - ldr r0, [r0, #0x40] - bl ov23_022462A8 -_02244B48: - pop {r4, r5, r6, pc} - nop -_02244B4C: .word 0x02257760 - thumb_func_end ov23_02244B24 - - thumb_func_start ov23_02244B50 -ov23_02244B50: ; 0x02244B50 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244B64 ; =0x02257760 - mov r2, #0 - ldr r0, [r0, #4] - add r3, r2, #0 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244B64: .word 0x02257760 - thumb_func_end ov23_02244B50 - - thumb_func_start ov23_02244B68 -ov23_02244B68: ; 0x02244B68 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244B7C ; =0x02257760 - mov r2, #1 - ldr r0, [r0, #4] - mov r3, #0 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244B7C: .word 0x02257760 - thumb_func_end ov23_02244B68 - - thumb_func_start ov23_02244B80 -ov23_02244B80: ; 0x02244B80 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244B94 ; =0x02257760 - mov r2, #2 - ldr r0, [r0, #4] - mov r3, #0 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244B94: .word 0x02257760 - thumb_func_end ov23_02244B80 - - thumb_func_start ov23_02244B98 -ov23_02244B98: ; 0x02244B98 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244BAC ; =0x02257760 - mov r2, #3 - ldr r0, [r0, #4] - mov r3, #0 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244BAC: .word 0x02257760 - thumb_func_end ov23_02244B98 - - thumb_func_start ov23_02244BB0 -ov23_02244BB0: ; 0x02244BB0 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244BC4 ; =0x02257760 - mov r2, #0 - ldr r0, [r0, #4] - mov r3, #1 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244BC4: .word 0x02257760 - thumb_func_end ov23_02244BB0 - - thumb_func_start ov23_02244BC8 -ov23_02244BC8: ; 0x02244BC8 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244BDC ; =0x02257760 - mov r2, #1 - ldr r0, [r0, #4] - add r3, r2, #0 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244BDC: .word 0x02257760 - thumb_func_end ov23_02244BC8 - - thumb_func_start ov23_02244BE0 -ov23_02244BE0: ; 0x02244BE0 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244BF4 ; =0x02257760 - mov r2, #2 - ldr r0, [r0, #4] - mov r3, #1 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244BF4: .word 0x02257760 - thumb_func_end ov23_02244BE0 - - thumb_func_start ov23_02244BF8 -ov23_02244BF8: ; 0x02244BF8 - push {r3, lr} - add r1, r0, #0 - ldr r0, _02244C0C ; =0x02257760 - mov r2, #3 - ldr r0, [r0, #4] - mov r3, #1 - ldr r0, [r0, #0x40] - bl ov23_02244D80 - pop {r3, pc} - ; .align 2, 0 -_02244C0C: .word 0x02257760 - thumb_func_end ov23_02244BF8 - - thumb_func_start ov23_02244C10 -ov23_02244C10: ; 0x02244C10 - push {r4, lr} - ldr r0, _02244C68 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, _02244C68 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - add r3, r0, #0 - ldr r0, _02244C68 ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - mov r2, #0 - ldr r0, [r0, #0x40] - bl ov5_021F5634 - bl ov23_0224219C - ldr r2, _02244C68 ; =0x02257760 - mov r1, #0 - ldr r3, [r2, #4] - ldr r2, _02244C6C ; =0x00000B3B - ldrb r2, [r3, r2] - bl ov23_022541B4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x46 - add r3, r2, #0 - bl ov23_02253F60 - add r4, r0, #0 - mov r0, #0x10 - bl sub_02059464 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 -_02244C68: .word 0x02257760 -_02244C6C: .word 0x00000B3B - thumb_func_end ov23_02244C10 - - thumb_func_start ov23_02244C70 -ov23_02244C70: ; 0x02244C70 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #7 - bhi _02244D70 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02244C8A: ; jump table - .short _02244C9A - _02244C8A - 2 ; case 0 - .short _02244CAA - _02244C8A - 2 ; case 1 - .short _02244CC2 - _02244C8A - 2 ; case 2 - .short _02244CCA - _02244C8A - 2 ; case 3 - .short _02244CE2 - _02244C8A - 2 ; case 4 - .short _02244D3A - _02244C8A - 2 ; case 5 - .short _02244D70 - _02244C8A - 2 ; case 6 - .short _02244D42 - _02244C8A - 2 ; case 7 -_02244C9A: - bl ov23_02244C10 - str r0, [r4, #4] - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02244CAA: - mov r0, #1 - str r0, [sp] - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02244CC2: - add r0, r0, #1 - add sp, #8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02244CCA: - mov r0, #1 - str r0, [sp] - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #8 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02244CE2: - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - cmp r0, #0x1c - bne _02244D00 - ldr r0, _02244D74 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _02244D78 ; =0x00000B3B - ldrb r1, [r1, r0] - add r0, sp, #4 - strb r1, [r0] - mov r0, #0x26 - add r1, sp, #4 - bl sub_020360D0 -_02244D00: - ldr r0, [r4, #0x14] - cmp r0, #0x1e - ble _02244D70 - mov r0, #0x10 - bl sub_0205948C - mov r0, #1 - str r0, [sp] - sub r1, r0, #5 - mov r2, #0 - add r3, r0, #0 - bl sub_0200AAE0 - bl ov23_0224219C - bl ov23_02254044 - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - ldr r2, [r4, #0x18] - bl sub_02058BA8 - ldr r0, _02244D7C ; =0x0000065F - bl sub_02005748 - mov r0, #5 - add sp, #8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02244D3A: - mov r0, #6 - add sp, #8 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02244D42: - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - ldr r2, _02244D74 ; =0x02257760 - mov r0, #0xa3 - ldr r3, [r2, #4] - mov r1, #0 - lsl r0, r0, #2 - str r1, [r3, r0] - ldr r2, [r2, #4] - add r0, #0x10 - str r1, [r2, r0] - ldr r0, _02244D7C ; =0x0000065F - bl sub_020057A4 -_02244D70: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244D74: .word 0x02257760 -_02244D78: .word 0x00000B3B -_02244D7C: .word 0x0000065F - thumb_func_end ov23_02244C70 - - thumb_func_start ov23_02244D80 -ov23_02244D80: ; 0x02244D80 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #4 - mov r1, #0x1c - add r7, r2, #0 - str r3, [sp] - bl sub_02018184 - mov r1, #0 - mov r2, #0x1c - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _02244DD8 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02244DAE - bl sub_02022974 -_02244DAE: - ldr r0, _02244DD8 ; =0x02257760 - mov r2, #0x64 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - str r5, [r4, #8] - str r6, [r4, #0xc] - ldr r0, [sp] - str r7, [r4, #0x10] - str r0, [r4, #0x18] - ldr r0, _02244DDC ; =ov23_02244C70 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02244DD8 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244DD8: .word 0x02257760 -_02244DDC: .word ov23_02244C70 - thumb_func_end ov23_02244D80 - - thumb_func_start ov23_02244DE0 -ov23_02244DE0: ; 0x02244DE0 - push {r3, lr} - bl sub_02058BE8 - ldr r2, _02244E08 ; =0x02257760 - mov r0, #0xa7 - ldr r1, [r2, #4] - lsl r0, r0, #2 - ldr r3, [r1, r0] - cmp r3, #0 - beq _02244E04 - mov r1, #7 - str r1, [r3, #0] - ldr r2, [r2, #4] - mov r1, #0 - str r1, [r2, r0] - ldr r0, _02244E0C ; =0x0000065F - bl sub_020057A4 -_02244E04: - pop {r3, pc} - nop -_02244E08: .word 0x02257760 -_02244E0C: .word 0x0000065F - thumb_func_end ov23_02244DE0 - - thumb_func_start ov23_02244E10 -ov23_02244E10: ; 0x02244E10 - push {r4, lr} - bl sub_02058BE8 - ldr r0, _02244E5C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r1, r0] - cmp r4, #0 - beq _02244E5A - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - add r0, r4, #0 - bl sub_020181C4 - ldr r0, _02244E5C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - ldr r2, _02244E5C ; =0x02257760 - mov r0, #0xa3 - ldr r3, [r2, #4] - mov r1, #0 - lsl r0, r0, #2 - str r1, [r3, r0] - ldr r2, [r2, #4] - add r0, #0x10 - str r1, [r2, r0] - ldr r0, _02244E60 ; =0x0000065F - bl sub_020057A4 -_02244E5A: - pop {r4, pc} - ; .align 2, 0 -_02244E5C: .word 0x02257760 -_02244E60: .word 0x0000065F - thumb_func_end ov23_02244E10 - - thumb_func_start ov23_02244E64 -ov23_02244E64: ; 0x02244E64 - bx lr - ; .align 2, 0 - thumb_func_end ov23_02244E64 - - thumb_func_start ov23_02244E68 -ov23_02244E68: ; 0x02244E68 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - ldr r0, _02244E98 ; =0x02257760 - add r5, r1, #0 - ldr r0, [r0, #4] - ldr r1, _02244E9C ; =0x00000B46 - add r4, r2, #0 - ldrb r1, [r0, r1] - cmp r1, #0 - bne _02244E92 - sub r1, r3, #1 - str r1, [sp] - ldr r0, [r0, #0x40] - add r1, r6, #0 - add r2, r5, #0 - add r3, r4, #0 - bl ov5_021F4EAC - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02244E92: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02244E98: .word 0x02257760 -_02244E9C: .word 0x00000B46 - thumb_func_end ov23_02244E68 - - thumb_func_start ov23_02244EA0 -ov23_02244EA0: ; 0x02244EA0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_02244EA0 - - thumb_func_start ov23_02244EA4 -ov23_02244EA4: ; 0x02244EA4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #4 - mov r1, #0x20 - add r7, r2, #0 - bl sub_02018184 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _02244EF0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - add r0, r4, #0 - bl ov23_022451BC - ldr r0, [r5, #8] - add r1, r4, #0 - str r0, [r4, #0x10] - str r5, [r4, #0x14] - strb r6, [r4, #0x19] - ldr r0, _02244EF4 ; =ov23_022451C8 - mov r2, #0x64 - strb r7, [r4, #0x18] - bl sub_0200D9E8 - ldr r1, _02244EF0 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r3, r4, r5, r6, r7, pc} - nop -_02244EF0: .word 0x02257760 -_02244EF4: .word ov23_022451C8 - thumb_func_end ov23_02244EA4 - - thumb_func_start ov23_02244EF8 -ov23_02244EF8: ; 0x02244EF8 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, [sp, #0x38] - str r3, [sp, #4] - str r0, [sp, #0x38] - add r0, r2, #0 - sub r0, r5, r0 - add r4, r1, #0 - str r2, [sp] - bl sub_020D4070 - str r0, [sp, #0x20] - ldr r0, [sp, #4] - sub r0, r0, r4 - bl sub_020D4070 - ldr r1, [sp] - mov r7, #0 - cmp r5, r1 - bge _02244F28 - mov r1, #1 - str r1, [sp, #0x1c] - b _02244F2C -_02244F28: - sub r1, r7, #1 - str r1, [sp, #0x1c] -_02244F2C: - ldr r1, [sp, #4] - cmp r4, r1 - bge _02244F38 - mov r1, #1 - str r1, [sp, #0x18] - b _02244F3E -_02244F38: - mov r1, #0 - mvn r1, r1 - str r1, [sp, #0x18] -_02244F3E: - ldr r1, [sp, #0x20] - cmp r1, r0 - blt _02244F7C - neg r6, r1 - ldr r1, [sp] - cmp r5, r1 - beq _02244FB2 - lsl r0, r0, #1 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - lsl r0, r0, #1 - str r0, [sp, #8] -_02244F56: - ldr r2, [sp, #0x38] - add r0, r5, #0 - add r1, r4, #0 - bl ov23_022450D4 - add r7, r7, r0 - ldr r0, [sp, #0x1c] - add r5, r5, r0 - ldr r0, [sp, #0xc] - add r6, r6, r0 - bmi _02244F74 - ldr r0, [sp, #8] - sub r6, r6, r0 - ldr r0, [sp, #0x18] - add r4, r4, r0 -_02244F74: - ldr r0, [sp] - cmp r5, r0 - bne _02244F56 - b _02244FB2 -_02244F7C: - ldr r1, [sp, #4] - neg r6, r0 - cmp r4, r1 - beq _02244FB2 - ldr r1, [sp, #0x20] - lsl r0, r0, #1 - lsl r1, r1, #1 - str r1, [sp, #0x14] - str r0, [sp, #0x10] -_02244F8E: - ldr r2, [sp, #0x38] - add r0, r5, #0 - add r1, r4, #0 - bl ov23_022450D4 - add r7, r7, r0 - ldr r0, [sp, #0x18] - add r4, r4, r0 - ldr r0, [sp, #0x14] - add r6, r6, r0 - bmi _02244FAC - ldr r0, [sp, #0x10] - sub r6, r6, r0 - ldr r0, [sp, #0x1c] - add r5, r5, r0 -_02244FAC: - ldr r0, [sp, #4] - cmp r4, r0 - bne _02244F8E -_02244FB2: - cmp r7, #0 - beq _02244FC6 - ldr r0, _02244FCC ; =0x00000629 - bl sub_020057D4 - cmp r0, #0 - bne _02244FC6 - ldr r0, _02244FCC ; =0x00000629 - bl sub_02005748 -_02244FC6: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02244FCC: .word 0x00000629 - thumb_func_end ov23_02244EF8 - - thumb_func_start ov23_02244FD0 -ov23_02244FD0: ; 0x02244FD0 - push {r4, lr} - ldr r0, _0224505C ; =0x02257760 - ldr r2, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r2, r0] - cmp r4, #0 - beq _02245058 - ldrb r0, [r4, #0x19] - cmp r0, #0 - beq _02244FF0 - cmp r1, #0 - beq _02244FF0 - ldrb r0, [r4, #0x18] - bl ov23_022448FC -_02244FF0: - ldr r1, _02245060 ; =0x04000050 - mov r0, #0 - strh r0, [r1] - mov r1, #1 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _0224505C ; =0x02257760 - mov r1, #2 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl sub_02019FE4 - mov r3, #0 - mov r1, #2 - add r2, r3, #0 - lsl r1, r1, #0xa -_02245014: - strb r2, [r0, r3] - add r3, r3, #2 - cmp r3, r1 - blt _02245014 - mov r0, #2 - mov r1, #3 - bl sub_02019060 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x10 - bl sub_0205948C - ldr r0, _0224505C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - ldr r1, _0224505C ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_02245058: - pop {r4, pc} - nop -_0224505C: .word 0x02257760 -_02245060: .word 0x04000050 - thumb_func_end ov23_02244FD0 - - thumb_func_start ov23_02245064 -ov23_02245064: ; 0x02245064 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - str r1, [sp, #4] - add r0, r1, #0 - mov r1, #2 - add r6, r2, #0 - mov r4, #0 - bl sub_02019FE4 - add r5, r0, #0 - bne _02245082 - add sp, #8 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_02245082: - ldrh r2, [r6, #8] - ldr r0, _022450D0 ; =0x0000FFFF - cmp r2, r0 - beq _022450A2 - ldrh r3, [r6, #0xa] - cmp r3, r0 - beq _022450A2 - str r5, [sp] - ldrh r0, [r7] - ldrh r1, [r7, #2] - bl ov23_02244EF8 - ldr r0, [sp, #4] - mov r1, #2 - bl sub_02019448 -_022450A2: - ldrh r0, [r7] - mov r2, #0 - strh r0, [r6, #8] - ldrh r0, [r7, #2] - strh r0, [r6, #0xa] - mov r0, #2 - lsl r0, r0, #0xa -_022450B0: - ldrb r1, [r5, r2] - cmp r1, #0 - beq _022450B8 - add r4, r4, #1 -_022450B8: - add r2, r2, #2 - cmp r2, r0 - blt _022450B0 - cmp r4, #0xd - bge _022450C8 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022450C8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022450D0: .word 0x0000FFFF - thumb_func_end ov23_02245064 - - thumb_func_start ov23_022450D4 -ov23_022450D4: ; 0x022450D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r2, #0 - asr r2, r0, #2 - lsr r2, r2, #0x1d - add r2, r0, r2 - asr r0, r2, #3 - asr r2, r1, #2 - lsr r2, r2, #0x1d - add r2, r1, r2 - asr r1, r2, #3 - lsl r1, r1, #5 - add r0, r0, r1 - lsl r0, r0, #0x11 - lsr r0, r0, #0x10 - ldr r4, _022451B8 ; =0x0225641C - str r0, [sp, #4] - add r3, sp, #0xc - mov r2, #4 -_022450FA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _022450FA - ldr r0, [r4, #0] - mov r1, #2 - str r0, [r3, #0] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #4] - lsl r1, r1, #0xa - cmp r0, r1 - bls _0224511A - ldr r0, [sp, #8] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} -_0224511A: - ldr r1, [sp, #4] - lsr r0, r0, #0x1f - lsl r2, r1, #0x1a - sub r2, r2, r0 - mov r1, #0x1a - ror r2, r1 - add r0, r0, r2 - ldr r6, [sp, #8] - add r7, sp, #0xc - str r0, [sp] -_0224512E: - ldr r1, [r7, #0] - ldr r0, [sp, #4] - add r4, r0, r1 - ldr r0, [sp] - cmp r0, #0x3e - bne _02245146 - add r0, r6, #0 - mov r1, #3 - bl sub_020E1F6C - cmp r1, #2 - beq _022451A8 -_02245146: - ldr r0, [sp] - cmp r0, #0 - bne _02245158 - add r0, r6, #0 - mov r1, #3 - bl sub_020E1F6C - cmp r1, #0 - beq _022451A8 -_02245158: - mov r0, #2 - lsl r0, r0, #0xa - cmp r4, r0 - bge _022451A8 - cmp r4, #0 - blt _022451A8 - ldrb r0, [r5, r4] - cmp r0, #0 - beq _022451A8 - mov r1, #1 - str r1, [sp, #8] - cmp r6, #7 - bhi _0224519A - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224517E: ; jump table - .short _0224519A - _0224517E - 2 ; case 0 - .short _02245194 - _0224517E - 2 ; case 1 - .short _0224519A - _0224517E - 2 ; case 2 - .short _02245194 - _0224517E - 2 ; case 3 - .short _0224518E - _0224517E - 2 ; case 4 - .short _02245194 - _0224517E - 2 ; case 5 - .short _0224519A - _0224517E - 2 ; case 6 - .short _02245194 - _0224517E - 2 ; case 7 -_0224518E: - add r0, r0, #3 - strb r0, [r5, r4] - b _0224519E -_02245194: - add r0, r0, #2 - strb r0, [r5, r4] - b _0224519E -_0224519A: - add r0, r0, #1 - strb r0, [r5, r4] -_0224519E: - ldrb r0, [r5, r4] - cmp r0, #5 - bls _022451A8 - mov r0, #0 - strb r0, [r5, r4] -_022451A8: - add r6, r6, #1 - add r7, r7, #4 - cmp r6, #9 - blo _0224512E - ldr r0, [sp, #8] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_022451B8: .word 0x0225641C - thumb_func_end ov23_022450D4 - - thumb_func_start ov23_022451BC -ov23_022451BC: ; 0x022451BC - ldr r1, _022451C4 ; =0x0000FFFF - strh r1, [r0, #8] - strh r1, [r0, #0xa] - bx lr - ; .align 2, 0 -_022451C4: .word 0x0000FFFF - thumb_func_end ov23_022451BC - - thumb_func_start ov23_022451C8 -ov23_022451C8: ; 0x022451C8 - push {r3, r4, lr} - sub sp, #0x1c - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0xc - bls _022451D6 - b _022453F0 -_022451D6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022451E2: ; jump table - .short _022451FC - _022451E2 - 2 ; case 0 - .short _02245214 - _022451E2 - 2 ; case 1 - .short _02245248 - _022451E2 - 2 ; case 2 - .short _02245266 - _022451E2 - 2 ; case 3 - .short _0224530E - _022451E2 - 2 ; case 4 - .short _0224530E - _022451E2 - 2 ; case 5 - .short _0224530E - _022451E2 - 2 ; case 6 - .short _0224534E - _022451E2 - 2 ; case 7 - .short _022453A6 - _022451E2 - 2 ; case 8 - .short _022453B2 - _022451E2 - 2 ; case 9 - .short _022453F0 - _022451E2 - 2 ; case 10 - .short _022453C0 - _022451E2 - 2 ; case 11 - .short _022453DC - _022451E2 - 2 ; case 12 -_022451FC: - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - bl ov23_02244C10 - str r0, [r4, #4] - ldr r0, [r4, #0] - add sp, #0x1c - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_02245214: - mov r0, #1 - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - mov r1, #0 - mov r0, #0x12 - str r1, [sp] - lsl r0, r0, #4 - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r2, [r4, #0x10] - mov r0, #0x32 - mov r1, #9 - mov r3, #2 - bl sub_02006E3C - ldr r0, [r4, #0] - add sp, #0x1c - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_02245248: - mov r0, #0x20 - str r0, [sp] - mov r0, #4 - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x32 - mov r1, #0xa - add r3, r2, #0 - bl sub_02006E84 - ldr r0, [r4, #0] - add sp, #0x1c - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_02245266: - mov r0, #1 - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - ldr r0, _022453F4 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022453F8 ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0x13 - bne _0224529E - mov r1, #0 - mov r0, #6 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r2, [r4, #0x10] - mov r0, #0x32 - mov r1, #8 - mov r3, #2 - bl sub_02006E60 - b _022452E4 -_0224529E: - ldr r1, _022453FC ; =0x022563D0 - add r0, sp, #0x10 - ldrh r2, [r1, #0x10] - strh r2, [r0, #4] - ldrh r2, [r1, #0x12] - strh r2, [r0, #6] - ldrh r2, [r1, #0x14] - ldrh r1, [r1, #0x16] - strh r2, [r0, #8] - strh r1, [r0, #0xa] - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1e - sub r1, r1, r2 - mov r0, #0x1e - ror r1, r0 - add r0, r2, r1 - lsl r1, r0, #0x10 - mov r2, #0 - mov r0, #6 - str r2, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - str r2, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - lsr r2, r1, #0xf - add r1, sp, #0x14 - ldrh r1, [r1, r2] - ldr r2, [r4, #0x10] - mov r0, #0x32 - mov r3, #2 - bl sub_02006E60 -_022452E4: - mov r0, #0 - mov r1, #3 - bl sub_02019060 - mov r0, #1 - mov r1, #2 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - mov r0, #3 - mov r1, #0 - bl sub_02019060 - ldr r0, [r4, #0] - add sp, #0x1c - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_0224530E: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0x1e - ble _022453F0 - mov r0, #1 - sub r1, r0, #5 - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #7 - str r0, [r4, #0] - bl ov23_0224219C - mov r2, #0 - mov r1, #0x4d - add r3, r2, #0 - bl ov23_02253F60 - mov r0, #0 - str r0, [r4, #0x1c] - ldr r0, _02245400 ; =0x00000661 - bl sub_02005748 - add sp, #0x1c - pop {r3, r4, pc} -_0224534E: - ldr r1, _02245404 ; =0x021BF6BC - ldrh r0, [r1, #0x22] - cmp r0, #0 - beq _02245386 - ldrh r2, [r1, #0x1c] - add r0, sp, #0x10 - strh r2, [r0] - ldrh r1, [r1, #0x1e] - add r2, r4, #0 - strh r1, [r0, #2] - ldr r1, [r4, #0x10] - add r0, sp, #0x10 - bl ov23_02245064 - cmp r0, #0 - beq _0224538C - ldrb r0, [r4, #0x19] - cmp r0, #0 - beq _0224537A - mov r0, #0xb - str r0, [r4, #0] - b _0224538C -_0224537A: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] - b _0224538C -_02245386: - add r0, r4, #0 - bl ov23_022451BC -_0224538C: - ldr r0, [r4, #0x1c] - cmp r0, #0x3c - bge _022453F0 - add r0, r0, #1 - str r0, [r4, #0x1c] - cmp r0, #0x3c - bne _022453F0 - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x1c - pop {r3, r4, pc} -_022453A6: - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x1c - pop {r3, r4, pc} -_022453B2: - bl sub_0203608C - ldrb r1, [r4, #0x19] - bl ov23_02244FD0 - add sp, #0x1c - pop {r3, r4, pc} -_022453C0: - mov r0, #0 - strb r0, [r4, #0x19] - mov r0, #0x10 - bl sub_0205948C - ldrb r0, [r4, #0x18] - bl ov23_022448FC - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #0xc - add sp, #0x1c - str r0, [r4, #0] - pop {r3, r4, pc} -_022453DC: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #8 - ble _022453F0 - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_022453F0: - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_022453F4: .word 0x02257760 -_022453F8: .word 0x00000B3B -_022453FC: .word 0x022563D0 -_02245400: .word 0x00000661 -_02245404: .word 0x021BF6BC - thumb_func_end ov23_022451C8 - - thumb_func_start ov23_02245408 -ov23_02245408: ; 0x02245408 - mov r0, #4 - bx lr - thumb_func_end ov23_02245408 - - thumb_func_start ov23_0224540C -ov23_0224540C: ; 0x0224540C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl ov23_0224ACC0 - cmp r0, #0 - beq _02245454 - add r0, r4, #0 - bl ov23_0224AD98 - ldr r1, _02245464 ; =0x02257760 - add r0, r4, #0 - ldr r1, [r1, #4] - add r2, r1, r4 - ldr r1, _02245468 ; =0x00000B3C - ldrb r1, [r2, r1] - bl ov23_02244844 - add r0, r4, #0 - bl ov23_0224D87C - add r1, sp, #0 - strb r0, [r1, #3] - ldr r0, _02245464 ; =0x02257760 - ldr r0, [r0, #4] - add r2, r0, r4 - ldr r0, _02245468 ; =0x00000B3C - ldrb r0, [r2, r0] - strb r0, [r1] - strb r4, [r1, #1] - mov r0, #1 - strb r0, [r1, #2] - mov r0, #0x2a - add r1, sp, #0 - bl sub_02035B48 -_02245454: - ldr r0, _02245464 ; =0x02257760 - mov r2, #0 - ldr r0, [r0, #4] - add r1, r0, r4 - ldr r0, _02245468 ; =0x00000B3C - strb r2, [r1, r0] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02245464: .word 0x02257760 -_02245468: .word 0x00000B3C - thumb_func_end ov23_0224540C - - thumb_func_start ov23_0224546C -ov23_0224546C: ; 0x0224546C - push {r4, lr} - add r4, r0, #0 - bl ov23_0224AD98 - ldr r0, _022454AC ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r4 - ldr r0, _022454B0 ; =0x00000B3C - ldrb r1, [r1, r0] - cmp r1, #0 - beq _02245488 - add r0, r4, #0 - bl ov23_02244844 -_02245488: - ldr r1, _022454AC ; =0x02257760 - mov r3, #0 - ldr r0, [r1, #4] - add r2, r0, r4 - ldr r0, _022454B0 ; =0x00000B3C - strb r3, [r2, r0] - ldr r1, [r1, #4] - sub r0, #0x71 - add r3, r1, r0 - lsl r2, r4, #3 - ldrb r1, [r3, r2] - mov r0, #0x80 - bic r1, r0 - add r0, r4, #0 - strb r1, [r3, r2] - bl ov23_0224D87C - pop {r4, pc} - ; .align 2, 0 -_022454AC: .word 0x02257760 -_022454B0: .word 0x00000B3C - thumb_func_end ov23_0224546C - - thumb_func_start ov23_022454B4 -ov23_022454B4: ; 0x022454B4 - push {r4, r5, r6, lr} - add r4, r2, #0 - ldrb r0, [r4, #2] - ldrb r5, [r4] - cmp r0, #0 - ldrb r0, [r4, #1] - beq _022454C8 - bl ov23_0224B024 - b _022454CC -_022454C8: - bl ov23_0224B040 -_022454CC: - ldrb r0, [r4, #1] - bl ov23_02248B98 - ldrb r6, [r4, #1] - bl sub_0203608C - cmp r6, r0 - bne _022454F6 - ldr r0, _02245530 ; =0x02256670 - lsl r1, r5, #2 - ldr r2, [r0, r1] - cmp r2, #0 - beq _022454EC - ldrb r1, [r4, #3] - add r0, r6, #0 - blx r2 -_022454EC: - ldr r0, _02245534 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - ldr r0, _02245538 ; =0x00000B3B - strb r2, [r1, r0] -_022454F6: - sub r5, #0x18 - cmp r5, #3 - bhi _02245510 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02245508: ; jump table - .short _0224551E - _02245508 - 2 ; case 0 - .short _0224551E - _02245508 - 2 ; case 1 - .short _0224551E - _02245508 - 2 ; case 2 - .short _0224551E - _02245508 - 2 ; case 3 -_02245510: - ldr r0, _02245534 ; =0x02257760 - mov r2, #1 - ldr r1, [r0, #4] - ldrb r0, [r4, #1] - add r1, r1, r0 - ldr r0, _0224553C ; =0x00000B1C - strb r2, [r1, r0] -_0224551E: - bl sub_0203608C - cmp r0, #0 - beq _0224552C - ldrb r0, [r4, #1] - bl ov23_0224AD98 -_0224552C: - pop {r4, r5, r6, pc} - nop -_02245530: .word 0x02256670 -_02245534: .word 0x02257760 -_02245538: .word 0x00000B3B -_0224553C: .word 0x00000B1C - thumb_func_end ov23_022454B4 - - thumb_func_start ov23_02245540 -ov23_02245540: ; 0x02245540 - push {r3, lr} - ldr r0, _02245558 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _0224555C ; =0x00000B3B - ldrb r0, [r1, r0] - sub r0, #0xb - cmp r0, #1 - bhi _02245556 - ldrb r0, [r2] - bl ov23_02245B78 -_02245556: - pop {r3, pc} - ; .align 2, 0 -_02245558: .word 0x02257760 -_0224555C: .word 0x00000B3B - thumb_func_end ov23_02245540 - - thumb_func_start ov23_02245560 -ov23_02245560: ; 0x02245560 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov23_0224AD98 - ldr r1, _022455AC ; =0x02257760 - add r0, r4, #0 - ldr r1, [r1, #4] - add r2, r1, r4 - ldr r1, _022455B0 ; =0x00000B3C - ldrb r1, [r2, r1] - bl ov23_02244844 - add r1, sp, #0 - strb r4, [r1, #1] - ldr r0, _022455AC ; =0x02257760 - strb r5, [r1] - ldr r0, [r0, #4] - add r2, r0, r4 - ldr r0, _022455B0 ; =0x00000B3C - ldrb r0, [r2, r0] - strb r0, [r1, #2] - mov r0, #0x2c - add r1, sp, #0 - bl sub_02035B48 - ldr r0, _022455AC ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - add r2, r0, r4 - ldr r0, _022455B0 ; =0x00000B3C - strb r1, [r2, r0] - add r0, r5, #0 - bl sub_02059058 - pop {r3, r4, r5, pc} - nop -_022455AC: .word 0x02257760 -_022455B0: .word 0x00000B3C - thumb_func_end ov23_02245560 - - thumb_func_start ov23_022455B4 -ov23_022455B4: ; 0x022455B4 - push {r3, r4, r5, lr} - ldr r0, _02245680 ; =0x02257760 - add r4, r2, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - bl sub_0203D174 - bl sub_020298A0 - add r5, r0, #0 - ldrb r0, [r4, #1] - bl ov23_0224B024 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _02245616 - add r0, r5, #0 - bl sub_02029744 - ldr r0, _02245680 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x22 - bl sub_0202CFEC - bl sub_020594FC - bl ov23_0224219C - add r5, r0, #0 - ldrb r0, [r4, #1] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r5, #0 - bl ov23_02254068 - bl ov23_0224219C - ldr r3, _02245684 ; =ov23_02243850 - mov r1, #0x47 - mov r2, #1 - bl ov23_02253F40 -_02245616: - ldrb r0, [r4, #1] - bl ov23_02248B98 - ldrb r5, [r4, #1] - bl sub_0203608C - cmp r5, r0 - bne _02245662 - ldr r0, _02245680 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _02245688 ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0 - beq _02245662 - lsl r1, r0, #2 - ldr r0, _0224568C ; =0x022566FC - ldr r2, [r0, r1] - cmp r2, #0 - beq _02245642 - add r0, r5, #0 - mov r1, #0 - blx r2 -_02245642: - ldr r1, _02245680 ; =0x02257760 - mov r0, #0x2a - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #4 - str r3, [r2, r0] - ldr r1, [r1, #4] - ldr r0, _02245688 ; =0x00000B3B - strb r3, [r1, r0] - mov r0, #0x10 - bl sub_0205948C - bl ov23_0224219C - bl ov23_02254044 -_02245662: - bl sub_0203608C - cmp r0, #0 - beq _02245670 - ldrb r0, [r4, #1] - bl ov23_0224AD98 -_02245670: - ldr r0, _02245680 ; =0x02257760 - ldrb r2, [r4, #1] - ldr r1, [r0, #4] - ldrb r0, [r4] - add r1, r1, r0 - ldr r0, _02245690 ; =0x00000B04 - strb r2, [r1, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245680: .word 0x02257760 -_02245684: .word ov23_02243850 -_02245688: .word 0x00000B3B -_0224568C: .word 0x022566FC -_02245690: .word 0x00000B04 - thumb_func_end ov23_022455B4 - - thumb_func_start ov23_02245694 -ov23_02245694: ; 0x02245694 - mov r0, #3 - bx lr - thumb_func_end ov23_02245694 - - thumb_func_start ov23_02245698 -ov23_02245698: ; 0x02245698 - push {r4, lr} - ldr r1, _022456C8 ; =0x02257760 - ldr r2, [r1, #4] - cmp r2, #0 - beq _022456C2 - mov r1, #0xa6 - lsl r1, r1, #2 - ldr r4, [r2, r1] - cmp r4, #0 - beq _022456C2 - sub r1, #0xb6 - ldrh r1, [r4, r1] - lsr r1, r1, #1 - add r0, r1, r0 - mov r1, #0x50 - bl sub_020E1F6C - mov r0, #6 - mul r0, r1 - ldrh r0, [r4, r0] - pop {r4, pc} -_022456C2: - mov r0, #0 - pop {r4, pc} - nop -_022456C8: .word 0x02257760 - thumb_func_end ov23_02245698 - - thumb_func_start ov23_022456CC -ov23_022456CC: ; 0x022456CC - push {r4, lr} - ldr r1, _022456FC ; =0x02257760 - ldr r2, [r1, #4] - cmp r2, #0 - beq _022456F8 - mov r1, #0xa6 - lsl r1, r1, #2 - ldr r4, [r2, r1] - cmp r4, #0 - beq _022456F8 - sub r1, #0xb6 - ldrh r1, [r4, r1] - lsr r1, r1, #1 - add r0, r1, r0 - mov r1, #0x50 - bl sub_020E1F6C - mov r0, #6 - mul r0, r1 - add r0, r4, r0 - ldrh r0, [r0, #2] - pop {r4, pc} -_022456F8: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_022456FC: .word 0x02257760 - thumb_func_end ov23_022456CC - - thumb_func_start ov23_02245700 -ov23_02245700: ; 0x02245700 - push {r4, lr} - ldr r0, _02245720 ; =0x000001E2 - add r4, r1, #0 - ldrh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - ldrh r0, [r4, r0] - cmp r0, #0xa0 - bls _0224571E - ldr r0, _02245724 ; =0x0000054A - bl sub_02005748 - ldr r0, _02245720 ; =0x000001E2 - mov r1, #0 - strh r1, [r4, r0] -_0224571E: - pop {r4, pc} - ; .align 2, 0 -_02245720: .word 0x000001E2 -_02245724: .word 0x0000054A - thumb_func_end ov23_02245700 - - thumb_func_start ov23_02245728 -ov23_02245728: ; 0x02245728 - push {r4, lr} - ldr r0, _0224577C ; =0x02257760 - mov r1, #0xa6 - ldr r2, [r0, #4] - lsl r1, r1, #2 - ldr r0, [r2, r1] - cmp r0, #0 - bne _02245778 - sub r0, r1, #4 - ldr r0, [r2, r0] - cmp r0, #0 - bne _02245778 - mov r0, #4 - sub r1, #0xb4 - bl sub_02018184 - mov r2, #0x79 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x2e - bl sub_020360DC - ldr r0, _0224577C ; =0x02257760 - mov r2, #0x64 - ldr r1, [r0, #4] - mov r0, #0xa6 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02245780 ; =ov23_02245700 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _0224577C ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa5 - lsl r1, r1, #2 - str r0, [r2, r1] -_02245778: - pop {r4, pc} - nop -_0224577C: .word 0x02257760 -_02245780: .word ov23_02245700 - thumb_func_end ov23_02245728 - - thumb_func_start ov23_02245784 -ov23_02245784: ; 0x02245784 - push {r3, lr} - ldr r0, _022457DC ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa5 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022457D8 - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _022457E0 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, #0x1c - bl sub_020BDEC4 - ldr r0, _022457DC ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa5 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - ldr r0, _022457DC ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, _022457DC ; =0x02257760 - mov r0, #0xa5 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, r0, #4 - str r3, [r1, r0] -_022457D8: - pop {r3, pc} - nop -_022457DC: .word 0x02257760 -_022457E0: .word 0x04000050 - thumb_func_end ov23_02245784 - - thumb_func_start ov23_022457E4 -ov23_022457E4: ; 0x022457E4 - ldr r1, _022457F4 ; =0x02257760 - lsl r0, r0, #1 - ldr r1, [r1, #4] - mov r2, #1 - add r1, r1, r0 - ldr r0, _022457F8 ; =0x00000B0C - strh r2, [r1, r0] - bx lr - ; .align 2, 0 -_022457F4: .word 0x02257760 -_022457F8: .word 0x00000B0C - thumb_func_end ov23_022457E4 - - thumb_func_start ov23_022457FC -ov23_022457FC: ; 0x022457FC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r5, #0 - str r5, [sp] -_02245804: - ldr r0, _02245890 ; =0x02257760 - ldr r1, _02245894 ; =0x00000B0C - ldr r0, [r0, #4] - add r2, r0, r5 - ldrh r1, [r2, r1] - sub r4, r1, #1 - cmp r1, #0 - beq _02245880 - lsl r7, r4, #2 -_02245816: - add r1, r0, r7 - ldr r0, _02245898 ; =0x000007C4 - ldr r6, [r1, r0] - cmp r6, #0 - beq _0224585A - ldrb r0, [r6, #4] - cmp r0, #0 - beq _0224585A - add r0, r6, #0 - bl ov23_0224426C - ldr r1, [sp] - cmp r0, r1 - beq _02245836 - cmp r0, #8 - blt _0224585A -_02245836: - ldrh r0, [r6] - add r1, sp, #4 - strh r0, [r1] - ldrh r0, [r6, #2] - strh r0, [r1, #2] - ldr r0, [sp] - strb r0, [r1, #4] - mov r0, #0x2f - add r1, sp, #4 - bl sub_02035B48 - ldr r0, _02245890 ; =0x02257760 - add r2, r4, #2 - ldr r0, [r0, #4] - add r1, r0, r5 - ldr r0, _02245894 ; =0x00000B0C - strh r2, [r1, r0] - b _02245880 -_0224585A: - add r4, r4, #1 - add r7, r7, #4 - cmp r4, #0xc0 - blt _02245870 - ldr r0, _02245890 ; =0x02257760 - mov r2, #0 - ldr r0, [r0, #4] - add r1, r0, r5 - ldr r0, _02245894 ; =0x00000B0C - strh r2, [r1, r0] - b _02245880 -_02245870: - ldr r0, _02245890 ; =0x02257760 - ldr r1, _02245894 ; =0x00000B0C - ldr r0, [r0, #4] - add r2, r5, r0 - ldrh r1, [r2, r1] - sub r1, r1, #1 - cmp r4, r1 - bne _02245816 -_02245880: - ldr r0, [sp] - add r5, r5, #2 - add r0, r0, #1 - str r0, [sp] - cmp r0, #8 - blt _02245804 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245890: .word 0x02257760 -_02245894: .word 0x00000B0C -_02245898: .word 0x000007C4 - thumb_func_end ov23_022457FC - - thumb_func_start ov23_0224589C -ov23_0224589C: ; 0x0224589C - push {r3, r4, r5, lr} - ldr r0, _02245904 ; =0x02257760 - add r4, r2, #0 - ldr r1, [r0, #4] - mov r0, #0xa6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02245900 - bl sub_0203608C - ldrb r1, [r4, #4] - cmp r1, r0 - bne _02245900 - ldr r0, _02245904 ; =0x02257760 - mov r1, #0xa6 - ldr r0, [r0, #4] - lsl r1, r1, #2 - ldr r5, [r0, r1] - sub r1, #0xb8 - ldrb r1, [r5, r1] - mov r2, #6 - add r0, r4, #0 - add r3, r1, #0 - mul r3, r2 - add r1, r5, r3 - bl sub_020C4DB0 - ldr r2, _02245904 ; =0x02257760 - mov r1, #0xa6 - ldr r0, [r2, #4] - lsl r1, r1, #2 - ldr r4, [r0, r1] - add r0, r1, #0 - sub r0, #0xb8 - ldrb r0, [r4, r0] - add r3, r0, #1 - add r0, r1, #0 - sub r0, #0xb8 - strb r3, [r4, r0] - ldr r0, [r2, #4] - ldr r2, [r0, r1] - add r0, r1, #0 - sub r0, #0xb8 - ldrb r0, [r2, r0] - cmp r0, #0x50 - blo _02245900 - mov r0, #0 - sub r1, #0xb8 - strb r0, [r2, r1] -_02245900: - pop {r3, r4, r5, pc} - nop -_02245904: .word 0x02257760 - thumb_func_end ov23_0224589C - - thumb_func_start ov23_02245908 -ov23_02245908: ; 0x02245908 - mov r0, #6 - bx lr - thumb_func_end ov23_02245908 - - thumb_func_start ov23_0224590C -ov23_0224590C: ; 0x0224590C - push {r4, lr} - add r4, r0, #0 - bl sub_0203608C - cmp r4, r0 - bne _02245930 - ldr r1, _02245934 ; =0x02257760 - mov r0, #0xa7 - ldr r2, [r1, #4] - lsl r0, r0, #2 - ldr r3, [r2, r0] - cmp r3, #0 - beq _02245930 - mov r2, #2 - str r2, [r3, #0] - ldr r1, [r1, #4] - mov r2, #0 - str r2, [r1, r0] -_02245930: - pop {r4, pc} - nop -_02245934: .word 0x02257760 - thumb_func_end ov23_0224590C - - thumb_func_start ov23_02245938 -ov23_02245938: ; 0x02245938 - push {r3, lr} - ldr r0, _02245994 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02245990 - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _02245998 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, #0x1c - bl sub_020BDEC4 - bl sub_0203568C - ldr r0, _02245994 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - ldr r0, _02245994 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, _02245994 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_02245990: - pop {r3, pc} - nop -_02245994: .word 0x02257760 -_02245998: .word 0x04000050 - thumb_func_end ov23_02245938 - - thumb_func_start ov23_0224599C -ov23_0224599C: ; 0x0224599C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _022459B2 - cmp r0, #1 - beq _02245A4C - cmp r0, #2 - beq _02245A14 - pop {r3, r4, r5, pc} -_022459B2: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #1 - bne _022459C4 - bl ov23_02244C10 - str r0, [r4, #4] - b _022459EA -_022459C4: - cmp r0, #2 - bne _022459D8 - mov r0, #1 - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - b _022459EA -_022459D8: - cmp r0, #4 - bne _022459EA - mov r0, #1 - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 -_022459EA: - ldr r0, [r4, #0x10] - cmp r0, #0x1e - ble _02245A4C - bl ov23_0224219C - bl ov23_02254044 - mov r0, #1 - str r0, [r4, #0] - ldr r0, [r4, #8] - cmp r0, #0 - beq _02245A08 - bl sub_02035678 - b _02245A0C -_02245A08: - bl sub_02035664 -_02245A0C: - mov r0, #0x10 - bl sub_0205948C - pop {r3, r4, r5, pc} -_02245A14: - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _02245A50 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, #0x1c - bl sub_020BDEC4 - bl sub_0203568C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - ldr r1, _02245A54 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_02245A4C: - pop {r3, r4, r5, pc} - nop -_02245A50: .word 0x04000050 -_02245A54: .word 0x02257760 - thumb_func_end ov23_0224599C - - thumb_func_start ov23_02245A58 -ov23_02245A58: ; 0x02245A58 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - mov r1, #0x14 - bl sub_02018184 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0] - str r5, [r4, #8] - str r0, [r4, #0x10] - ldr r0, _02245A9C ; =0x02257760 - mov r2, #0x64 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02245AA0 ; =ov23_0224599C - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02245A9C ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - mov r0, #0x10 - bl sub_02059464 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245A9C: .word 0x02257760 -_02245AA0: .word ov23_0224599C - thumb_func_end ov23_02245A58 - - thumb_func_start ov23_02245AA4 -ov23_02245AA4: ; 0x02245AA4 - push {r4, lr} - add r4, r0, #0 - bl sub_0203608C - cmp r4, r0 - bne _02245AEE - ldr r0, _02245AF0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r1, r0] - cmp r4, #0 - beq _02245AEE - ldr r0, [r1, #0x40] - mov r1, #0 - ldr r0, [r0, #0x3c] - bl sub_0205ED0C - ldr r0, _02245AF0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - ldr r1, _02245AF0 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_02245AEE: - pop {r4, pc} - ; .align 2, 0 -_02245AF0: .word 0x02257760 - thumb_func_end ov23_02245AA4 - - thumb_func_start ov23_02245AF4 -ov23_02245AF4: ; 0x02245AF4 - push {r3, r4, r5, lr} - ldr r0, _02245B70 ; =0x02257760 - add r5, r1, #0 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r1, r0] - cmp r4, #0 - beq _02245B6E - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _02245B14 - bl sub_0207136C - mov r0, #0 - str r0, [r4, #0x14] -_02245B14: - ldrb r0, [r4, #0xd] - cmp r0, #0 - beq _02245B24 - cmp r5, #0 - beq _02245B24 - ldrb r0, [r4, #0xc] - bl ov23_022448FC -_02245B24: - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _02245B74 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, #0x1c - bl sub_020BDEC4 - ldr r0, _02245B70 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205ED0C - ldr r0, _02245B70 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - ldr r1, _02245B70 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_02245B6E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245B70: .word 0x02257760 -_02245B74: .word 0x04000050 - thumb_func_end ov23_02245AF4 - - thumb_func_start ov23_02245B78 -ov23_02245B78: ; 0x02245B78 - push {r4, lr} - add r4, r0, #0 - bl sub_0203608C - cmp r4, r0 - bne _02245B9C - ldr r0, _02245BA0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r1, [r1, r0] - cmp r1, #0 - beq _02245B9C - mov r0, #0xe - str r0, [r1, #0] - ldr r0, _02245BA4 ; =0x0000060B - bl sub_02005748 -_02245B9C: - pop {r4, pc} - nop -_02245BA0: .word 0x02257760 -_02245BA4: .word 0x0000060B - thumb_func_end ov23_02245B78 - - thumb_func_start ov23_02245BA8 -ov23_02245BA8: ; 0x02245BA8 - push {r4, r5, lr} - sub sp, #0x14 - ldr r3, _02245DE4 ; =0x022563F4 - add r4, r1, #0 - add r5, r0, #0 - add r2, sp, #4 - mov r1, #0xf -_02245BB6: - ldrb r0, [r3] - add r3, r3, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _02245BB6 - ldr r0, [r4, #0] - cmp r0, #0xe - bhi _02245C7A - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02245BD4: ; jump table - .short _02245BF2 - _02245BD4 - 2 ; case 0 - .short _02245C06 - _02245BD4 - 2 ; case 1 - .short _02245C1E - _02245BD4 - 2 ; case 2 - .short _02245C26 - _02245BD4 - 2 ; case 3 - .short _02245C3E - _02245BD4 - 2 ; case 4 - .short _02245C70 - _02245BD4 - 2 ; case 5 - .short _02245C70 - _02245BD4 - 2 ; case 6 - .short _02245CFC - _02245BD4 - 2 ; case 7 - .short _02245DDE - _02245BD4 - 2 ; case 8 - .short _02245D20 - _02245BD4 - 2 ; case 9 - .short _02245DDE - _02245BD4 - 2 ; case 10 - .short _02245D50 - _02245BD4 - 2 ; case 11 - .short _02245D6C - _02245BD4 - 2 ; case 12 - .short _02245DDE - _02245BD4 - 2 ; case 13 - .short _02245D92 - _02245BD4 - 2 ; case 14 -_02245BF2: - bl ov23_02244C10 - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0x1c] - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245C06: - mov r0, #1 - str r0, [sp] - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245C1E: - add r0, r0, #1 - add sp, #0x14 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245C26: - mov r0, #1 - str r0, [sp] - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245C3E: - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - cmp r0, #0x3c - ble _02245C56 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #0x1c] - pop {r4, r5, pc} -_02245C56: - ldrb r0, [r4, #0xc] - mov r1, #1 - bl ov23_0224495C - cmp r0, #0 - beq _02245C7A - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #0x1c] - pop {r4, r5, pc} -_02245C70: - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] - cmp r0, #0x1e - bgt _02245C7C -_02245C7A: - b _02245DDE -_02245C7C: - mov r0, #0x10 - bl sub_0205948C - bl ov23_0224219C - bl ov23_02254044 - mov r0, #7 - str r0, [r4, #0] - ldr r0, _02245DE8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - add r5, r0, #0 - ldr r0, _02245DE8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - add r2, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - bne _02245CD6 - mov r0, #0x20 - str r0, [sp] - ldr r0, _02245DE8 ; =0x02257760 - add r1, r5, #0 - ldr r0, [r0, #4] - mov r3, #2 - ldr r0, [r0, #0x40] - bl ov5_021F4EAC - str r0, [r4, #0x14] - ldr r0, _02245DE8 ; =0x02257760 - ldr r1, _02245DEC ; =0xFFFFE000 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205ED0C - add sp, #0x14 - pop {r4, r5, pc} -_02245CD6: - mov r0, #0x20 - str r0, [sp] - ldr r0, _02245DE8 ; =0x02257760 - add r1, r5, #0 - ldr r0, [r0, #4] - mov r3, #3 - ldr r0, [r0, #0x40] - bl ov5_021F4EAC - str r0, [r4, #0x14] - ldr r0, _02245DE8 ; =0x02257760 - ldr r1, _02245DF0 ; =0xFFFFD000 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205ED0C - add sp, #0x14 - pop {r4, r5, pc} -_02245CFC: - ldr r0, _02245DE8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EA78 - add r5, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, r5 - beq _02245D16 - ldr r0, _02245DF4 ; =0x000005EB - bl sub_02005748 -_02245D16: - str r5, [r4, #0x18] - mov r0, #0 - add sp, #0x14 - str r0, [r4, #0x10] - pop {r4, r5, pc} -_02245D20: - ldr r0, _02245DE8 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205ED0C - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - ldr r1, _02245DE8 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] - add sp, #0x14 - pop {r4, r5, pc} -_02245D50: - mov r0, #0 - strb r0, [r4, #0xd] - mov r0, #0x10 - bl sub_0205948C - ldrb r0, [r4, #0xc] - bl ov23_022448FC - mov r0, #0 - str r0, [r4, #0x1c] - mov r0, #0xc - add sp, #0x14 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245D6C: - ldr r0, [r4, #0x1c] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #0x1c] - ldrb r0, [r4, #0xc] - bl ov23_0224495C - cmp r0, #0 - bne _02245D84 - ldr r0, [r4, #0x1c] - cmp r0, #0x3c - ble _02245DDE -_02245D84: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - add sp, #0x14 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245D92: - ldr r1, [r4, #0x10] - add r0, sp, #4 - ldrsb r1, [r0, r1] - mov r0, #9 - mvn r0, r0 - cmp r1, r0 - beq _02245DDE - ldr r0, _02245DE8 ; =0x02257760 - lsl r1, r1, #0xc - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205ED0C - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #5 - bne _02245DDE - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _02245DC6 - bl sub_0207136C - mov r0, #0 - str r0, [r4, #0x14] -_02245DC6: - ldrb r0, [r4, #0xd] - cmp r0, #0 - beq _02245DD4 - mov r0, #0xb - add sp, #0x14 - str r0, [r4, #0] - pop {r4, r5, pc} -_02245DD4: - mov r0, #0x29 - bl sub_020360DC - mov r0, #9 - str r0, [r4, #0] -_02245DDE: - add sp, #0x14 - pop {r4, r5, pc} - nop -_02245DE4: .word 0x022563F4 -_02245DE8: .word 0x02257760 -_02245DEC: .word 0xFFFFE000 -_02245DF0: .word 0xFFFFD000 -_02245DF4: .word 0x000005EB - thumb_func_end ov23_02245BA8 - - thumb_func_start ov23_02245DF8 -ov23_02245DF8: ; 0x02245DF8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #4 - mov r1, #0x24 - add r7, r2, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x24 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0] - str r5, [r4, #8] - str r0, [r4, #0x10] - ldr r0, _02245E4C ; =0x02257760 - strb r6, [r4, #0xd] - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EA78 - str r0, [r4, #0x18] - ldr r0, _02245E4C ; =0x02257760 - strb r7, [r4, #0xc] - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02245E50 ; =ov23_02245BA8 - add r1, r4, #0 - mov r2, #0x64 - bl sub_0200D9E8 - ldr r1, _02245E4C ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245E4C: .word 0x02257760 -_02245E50: .word ov23_02245BA8 - thumb_func_end ov23_02245DF8 - - thumb_func_start ov23_02245E54 -ov23_02245E54: ; 0x02245E54 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #4 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02245E74 - mov r0, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov23_02245DF8 -_02245E74: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02245E54 - - thumb_func_start ov23_02245E78 -ov23_02245E78: ; 0x02245E78 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #4 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02245E98 - mov r0, #1 - add r1, r4, #0 - add r2, r6, #0 - bl ov23_02245DF8 -_02245E98: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02245E78 - - thumb_func_start ov23_02245E9C -ov23_02245E9C: ; 0x02245E9C - push {r4, lr} - add r4, r0, #0 - bl ov23_0224AD98 - add r0, r4, #0 - bl sub_020593B4 - pop {r4, pc} - thumb_func_end ov23_02245E9C - - thumb_func_start ov23_02245EAC -ov23_02245EAC: ; 0x02245EAC - push {r4, lr} - add r4, r0, #0 - mov r1, #4 - bl ov23_0224AD7C - add r0, r4, #0 - mov r1, #0xa - bl sub_02059390 - pop {r4, pc} - thumb_func_end ov23_02245EAC - - thumb_func_start ov23_02245EC0 -ov23_02245EC0: ; 0x02245EC0 - push {r4, lr} - add r4, r0, #0 - mov r1, #4 - bl ov23_0224AD7C - add r0, r4, #0 - mov r1, #0x14 - bl sub_02059390 - pop {r4, pc} - thumb_func_end ov23_02245EC0 - - thumb_func_start ov23_02245ED4 -ov23_02245ED4: ; 0x02245ED4 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r0, #0 - add r0, sp, #0xc - bl sub_020361BC - mov r0, #0x45 - lsl r0, r0, #2 - ldrb r0, [r7, r0] - mov r4, #0 - cmp r0, #0 - ble _02245F8A - mov r0, #0 - add r5, r7, #0 - add r6, r7, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] -_02245EF8: - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x20] - add r0, r0, r2 - str r0, [sp, #0xc] - adc r1, r3 - ldr r0, [sp] - str r1, [sp, #0x10] - lsl r2, r0, #8 - lsr r1, r1, #0x18 - add r0, r5, #0 - orr r2, r1 - add r0, #0x48 - strh r2, [r0] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x20] - add r0, r0, r2 - adc r1, r3 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - add r0, r1, #0 - ldr r1, [sp, #4] - mov r2, #0xc0 - mov r3, #0 - bl sub_020E1F1C - add r0, r5, #0 - add r0, #0x4a - strh r1, [r0] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x20] - add r0, r0, r2 - adc r1, r3 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - add r0, r1, #0 - ldr r1, [sp, #8] - ldr r2, _02245F90 ; =0x0000FFFF - mov r3, #0 - bl sub_020E1F1C - mov r0, #0x45 - strh r1, [r6, #8] - lsl r0, r0, #2 - ldrb r0, [r7, r0] - add r4, r4, #1 - add r5, r5, #4 - add r6, r6, #2 - cmp r4, r0 - blt _02245EF8 -_02245F8A: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02245F90: .word 0x0000FFFF - thumb_func_end ov23_02245ED4 - - thumb_func_start ov23_02245F94 -ov23_02245F94: ; 0x02245F94 - push {r4, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0xc - bls _02245FA2 - b _02246208 -_02245FA2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02245FAE: ; jump table - .short _02245FC8 - _02245FAE - 2 ; case 0 - .short _02245FE2 - _02245FAE - 2 ; case 1 - .short _0224602E - _02245FAE - 2 ; case 2 - .short _02246070 - _02245FAE - 2 ; case 3 - .short _022460BC - _02245FAE - 2 ; case 4 - .short _022460FA - _02245FAE - 2 ; case 5 - .short _02246130 - _02245FAE - 2 ; case 6 - .short _0224616A - _02245FAE - 2 ; case 7 - .short _022461B2 - _02245FAE - 2 ; case 8 - .short _022461BE - _02245FAE - 2 ; case 9 - .short _02246208 - _02245FAE - 2 ; case 10 - .short _022461CE - _02245FAE - 2 ; case 11 - .short _022461F0 - _02245FAE - 2 ; case 12 -_02245FC8: - bl ov23_02244C10 - str r0, [r4, #4] - ldr r0, _0224620C ; =0x00000111 - mov r1, #0 - strb r1, [r4, r0] - bl ov23_02246324 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02245FE2: - mov r0, #1 - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - ldr r0, _02246210 ; =0x02257760 - ldr r1, _02246214 ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1d - bne _02246000 - mov r2, #2 - b _02246002 -_02246000: - mov r2, #0x1c -_02246002: - mov r3, #0 - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x17 - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_0200985C - ldr r1, _02246210 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_0224602E: - ldr r0, _02246210 ; =0x02257760 - ldr r1, _02246214 ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1d - bne _0224603E - mov r2, #3 - b _02246040 -_0224603E: - mov r2, #0x1d -_02246040: - mov r3, #0 - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r1, #7 - str r1, [sp, #8] - mov r1, #4 - str r1, [sp, #0xc] - mov r1, #0x5d - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_020098B8 - ldr r1, _02246210 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246070: - mov r0, #1 - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - ldr r0, _02246210 ; =0x02257760 - ldr r1, _02246214 ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1d - bne _0224608E - mov r2, #1 - b _02246090 -_0224608E: - mov r2, #0x1b -_02246090: - mov r3, #0 - str r3, [sp] - mov r1, #2 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x5e - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02246210 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_022460BC: - ldr r0, _02246210 ; =0x02257760 - ldr r1, _02246214 ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1d - bne _022460CC - mov r2, #0 - b _022460CE -_022460CC: - mov r2, #0x1a -_022460CE: - mov r3, #0 - str r3, [sp] - mov r1, #3 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x5f - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02246210 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_022460FA: - ldr r0, _02246210 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A450 - ldr r0, _02246210 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - mov r0, #0x45 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - bl ov23_0224644C - add r0, r4, #0 - bl ov23_02245ED4 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246130: - ldr r0, _0224620C ; =0x00000111 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #0x1e - bls _02246208 - mov r0, #1 - sub r1, r0, #5 - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x4c - add r3, r2, #0 - bl ov23_02253F60 - mov r0, #7 - str r0, [r4, #0] - mov r0, #0x46 - mov r1, #0 - lsl r0, r0, #2 - add sp, #0x10 - str r1, [r4, r0] - pop {r4, pc} -_0224616A: - ldr r0, _02246210 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02246640 - cmp r0, #0 - beq _02246192 - ldr r0, _02246218 ; =0x00000113 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _02246188 - mov r0, #0xb - str r0, [r4, #0] - b _02246192 -_02246188: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02246192: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0x3c - bge _02246208 - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0x3c - bne _02246208 - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r4, pc} -_022461B2: - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r4, pc} -_022461BE: - bl sub_0203608C - ldr r1, _02246218 ; =0x00000113 - ldrb r1, [r4, r1] - bl ov23_02246220 - add sp, #0x10 - pop {r4, pc} -_022461CE: - ldr r0, _02246218 ; =0x00000113 - mov r1, #0 - strb r1, [r4, r0] - mov r0, #0x10 - bl sub_0205948C - ldr r0, _0224621C ; =0x00000112 - ldrb r0, [r4, r0] - bl ov23_022448FC - ldr r0, _0224620C ; =0x00000111 - mov r1, #0 - strb r1, [r4, r0] - mov r0, #0xc - add sp, #0x10 - str r0, [r4, #0] - pop {r4, pc} -_022461F0: - ldr r0, _0224620C ; =0x00000111 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #8 - bls _02246208 - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02246208: - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0224620C: .word 0x00000111 -_02246210: .word 0x02257760 -_02246214: .word 0x00000B3B -_02246218: .word 0x00000113 -_0224621C: .word 0x00000112 - thumb_func_end ov23_02245F94 - - thumb_func_start ov23_02246220 -ov23_02246220: ; 0x02246220 - push {r3, r4, lr} - sub sp, #4 - ldr r0, _022462A0 ; =0x02257760 - ldr r2, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r2, r0] - cmp r4, #0 - beq _0224629C - ldr r0, _022462A4 ; =0x00000113 - ldrb r2, [r4, r0] - cmp r2, #0 - beq _02246246 - cmp r1, #0 - beq _02246246 - sub r0, r0, #1 - ldrb r0, [r4, r0] - bl ov23_022448FC -_02246246: - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - mov r0, #1 - mov r1, #0 - sub r2, r1, #4 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - mov r0, #0x45 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - bl ov23_02246370 - mov r0, #0x10 - bl sub_0205948C - ldr r0, _022462A0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - ldr r0, _022462A0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, _022462A0 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_0224629C: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_022462A0: .word 0x02257760 -_022462A4: .word 0x00000113 - thumb_func_end ov23_02246220 - - thumb_func_start ov23_022462A8 -ov23_022462A8: ; 0x022462A8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x12 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #4 - add r7, r2, #0 - bl sub_02018144 - mov r2, #0x12 - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _02246310 ; =0x00000113 - add r1, r0, #0 - strb r6, [r4, r0] - add r1, #9 - str r5, [r4, r1] - ldr r1, _02246314 ; =0x02257760 - ldr r2, [r1, #4] - ldr r1, _02246318 ; =0x00000B3B - ldrb r1, [r2, r1] - cmp r1, #0x1d - bne _022462E4 - mov r1, #0x20 - add r0, r1, #0 - add r0, #0xf4 - b _022462E8 -_022462E4: - mov r1, #0x10 - add r0, r0, #1 -_022462E8: - strb r1, [r4, r0] - ldr r0, _0224631C ; =0x00000112 - mov r2, #0x64 - strb r7, [r4, r0] - ldr r0, _02246314 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02246320 ; =ov23_02245F94 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02246314 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r3, r4, r5, r6, r7, pc} - nop -_02246310: .word 0x00000113 -_02246314: .word 0x02257760 -_02246318: .word 0x00000B3B -_0224631C: .word 0x00000112 -_02246320: .word ov23_02245F94 - thumb_func_end ov23_022462A8 - - thumb_func_start ov23_02246324 -ov23_02246324: ; 0x02246324 - push {r3, r4, r5, r6, r7, lr} - ldr r1, _0224636C ; =0x02257760 - mov r0, #0x20 - ldr r1, [r1, #4] - mov r2, #4 - add r1, #0x48 - bl sub_020095C4 - ldr r1, _0224636C ; =0x02257760 - ldr r2, [r1, #4] - str r0, [r2, #0x44] - ldr r0, [r1, #4] - mov r2, #6 - add r0, #0x48 - mov r1, #0 - lsl r2, r2, #0x12 - bl sub_0200964C - mov r4, #0 - mov r7, #0x17 - ldr r6, _0224636C ; =0x02257760 - add r5, r4, #0 - lsl r7, r7, #4 -_02246352: - mov r0, #2 - add r1, r4, #0 - mov r2, #4 - bl sub_02009714 - ldr r1, [r6, #4] - add r4, r4, #1 - add r1, r1, r5 - add r5, r5, #4 - str r0, [r1, r7] - cmp r4, #4 - blt _02246352 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224636C: .word 0x02257760 - thumb_func_end ov23_02246324 - - thumb_func_start ov23_02246370 -ov23_02246370: ; 0x02246370 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r4, #0 - cmp r6, #0 - ble _022463A4 - ldr r7, _02246448 ; =0x02257760 - add r5, r4, #0 -_0224637E: - ldr r0, [r7, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224639C - bl sub_02021BD4 - ldr r0, [r7, #4] - mov r1, #0 - add r2, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - str r1, [r2, r0] -_0224639C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r6 - blt _0224637E -_022463A4: - ldr r0, _02246448 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022463CC - bl sub_02009E08 - bl sub_0201EAD8 - cmp r0, #0 - beq _022463CC - ldr r0, _02246448 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A4E4 -_022463CC: - ldr r1, _02246448 ; =0x02257760 - mov r0, #0x19 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #4 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022463FC - bl sub_02009E08 - bl sub_0201F9DC - cmp r0, #0 - beq _022463FC - ldr r0, _02246448 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A6DC -_022463FC: - ldr r6, _02246448 ; =0x02257760 - mov r5, #0 - mov r0, #0x65 - ldr r1, [r6, #4] - lsl r0, r0, #2 - str r5, [r1, r0] - add r4, r5, #0 - add r7, r5, #0 -_0224640C: - ldr r0, [r6, #4] - add r1, r0, r4 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224641E - bl sub_02009754 -_0224641E: - ldr r0, [r6, #4] - add r5, r5, #1 - add r1, r0, r4 - mov r0, #0x17 - lsl r0, r0, #4 - add r4, r4, #4 - str r7, [r1, r0] - cmp r5, #4 - blt _0224640C - ldr r0, _02246448 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - cmp r0, #0 - beq _0224643E - bl sub_02021964 -_0224643E: - ldr r0, _02246448 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - str r1, [r0, #0x44] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246448: .word 0x02257760 - thumb_func_end ov23_02246370 - - thumb_func_start ov23_0224644C -ov23_0224644C: ; 0x0224644C - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - add r7, r0, #0 - ldr r0, _02246544 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - sub r2, r1, #1 - str r1, [sp] - str r2, [sp, #4] - str r2, [sp, #8] - str r1, [sp, #0xc] - mov r3, #0x17 - str r1, [sp, #0x10] - lsl r3, r3, #4 - ldr r2, [r0, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r0, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r0, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - add r3, #0x64 - str r2, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r0, r3 - add r2, r1, #0 - add r3, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - ldr r4, _02246544 ; =0x02257760 - mov r6, #0 - ldr r1, [r4, #4] - ldr r0, [r1, #0x44] - str r0, [sp, #0x2c] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x30] - mov r1, #2 - mov r0, #6 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - lsr r0, r1, #5 - str r1, [sp, #0x34] - str r6, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - add r0, sp, #0x2c - strh r6, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x54] - mov r0, #4 - str r6, [sp, #0x50] - str r0, [sp, #0x58] - cmp r7, #0 - ble _0224652E - add r5, r6, #0 -_022464CE: - mov r0, #0x4b - lsl r0, r0, #0xe - str r0, [sp, #0x34] - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021AA0 - ldr r1, [r4, #4] - add r2, r1, r5 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CC8 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021E50 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021E80 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r7 - blt _022464CE -_0224652E: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_02246544: .word 0x02257760 - thumb_func_end ov23_0224644C - - thumb_func_start ov23_02246548 -ov23_02246548: ; 0x02246548 - push {r4, lr} - lsl r4, r0, #2 - ldr r0, _02246570 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r4 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224656E - bl sub_02021BD4 - ldr r0, _02246570 ; =0x02257760 - mov r2, #0 - ldr r0, [r0, #4] - add r1, r0, r4 - mov r0, #0x7e - lsl r0, r0, #2 - str r2, [r1, r0] -_0224656E: - pop {r4, pc} - ; .align 2, 0 -_02246570: .word 0x02257760 - thumb_func_end ov23_02246548 - - thumb_func_start ov23_02246574 -ov23_02246574: ; 0x02246574 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r3, r0, #0 - add r0, r1, #0 - lsl r5, r3, #2 - add r1, r0, r5 - add r1, #0x48 - ldrh r1, [r1] - str r1, [sp] - add r1, r0, r5 - add r1, #0x4a - ldrh r7, [r1] - cmp r2, #0 - bne _022465A0 - add r6, r0, #0 - add r6, #8 - lsl r4, r3, #1 - mov r1, #1 - ldrh r2, [r6, r4] - lsl r1, r1, #0xa - add r1, r2, r1 - strh r1, [r6, r4] -_022465A0: - lsl r1, r3, #1 - add r0, r0, r1 - ldrh r0, [r0, #8] - mov r2, #0x12 - lsl r2, r2, #0xa - asr r0, r0, #4 - lsl r6, r0, #1 - ldr r0, _0224661C ; =0x020F983C - lsl r1, r6, #1 - ldrsh r0, [r0, r1] - mov r3, #0 - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsr r4, r2, #0xc - lsl r0, r1, #0x14 - orr r4, r0 - add r0, r6, #1 - lsl r1, r0, #1 - ldr r0, _0224661C ; =0x020F983C - mov r2, #0xa - ldrsh r0, [r0, r1] - lsl r2, r2, #0xa - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - bpl _022465F2 - neg r1, r1 -_022465F2: - ldr r0, _02246620 ; =0x02257760 - ldr r2, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - add r0, r2, r0 - ldr r2, [r0, r5] - cmp r2, #0 - beq _02246618 - ldr r2, [sp] - lsl r2, r2, #0xc - add r2, r4, r2 - str r2, [sp, #4] - lsl r2, r7, #0xc - add r1, r1, r2 - str r1, [sp, #8] - ldr r0, [r0, r5] - add r1, sp, #4 - bl sub_02021C50 -_02246618: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224661C: .word 0x020F983C -_02246620: .word 0x02257760 - thumb_func_end ov23_02246574 - - thumb_func_start ov23_02246624 -ov23_02246624: ; 0x02246624 - cmp r0, #0 - bne _02246634 - ldr r1, _02246638 ; =0x02257760 - mov r0, #0 - ldrsb r2, [r1, r0] - ldr r1, [r1, #4] - ldr r0, _0224663C ; =0x00000B3A - strb r2, [r1, r0] -_02246634: - bx lr - nop -_02246638: .word 0x02257760 -_0224663C: .word 0x00000B3A - thumb_func_end ov23_02246624 - - thumb_func_start ov23_02246640 -ov23_02246640: ; 0x02246640 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - ldr r1, _02246890 ; =0x02257760 - ldr r2, _02246894 ; =ov23_02246624 - mov r3, #0 - mov r0, #2 - bl sub_02004B70 - ldr r0, _02246898 ; =0x02257760 - ldr r2, [r0, #4] - ldr r0, _0224689C ; =0x00000B3B - ldrb r1, [r2, r0] - cmp r1, #0x1d - bne _0224666E - sub r0, r0, #1 - ldrsb r0, [r2, r0] - bl sub_020D4070 - mov r1, #0x21 - bl sub_020E1F6C - b _0224667C -_0224666E: - sub r0, r0, #1 - ldrsb r0, [r2, r0] - bl sub_020D4070 - mov r1, #0x19 - bl sub_020E1F6C -_0224667C: - mov r1, #0x11 - lsl r1, r1, #4 - ldrb r1, [r5, r1] - mov r2, #0x7e - lsl r2, r2, #2 - add r1, r5, r1 - add r1, #0xc8 - strb r0, [r1] - ldr r0, _02246898 ; =0x02257760 - add r1, r2, #0 - mov r4, #0 - ldr r0, [r0, #4] - sub r1, #0xe4 - b _022466A4 -_02246698: - lsl r3, r4, #2 - add r3, r0, r3 - ldr r3, [r3, r2] - cmp r3, #0 - bne _022466AA - add r4, r4, #1 -_022466A4: - ldrb r3, [r5, r1] - cmp r4, r3 - blt _02246698 -_022466AA: - mov r0, #0x45 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - cmp r4, r0 - bne _022466BA - add sp, #0x18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022466BA: - add r0, r5, #0 - str r0, [sp, #0x10] - add r0, #0x4a - add r7, r5, #0 - mov r4, #0 - str r0, [sp, #0x10] - add r7, #0x48 - b _0224685E -_022466CA: - lsl r2, r4, #2 - add r0, r5, r2 - add r0, #0x48 - ldrh r1, [r0] - cmp r1, #0 - beq _022466EC - mov r0, #1 - lsl r0, r0, #8 - cmp r1, r0 - bhs _022466EC - add r0, r5, r2 - add r0, #0x4a - ldrh r0, [r0] - cmp r0, #0 - beq _022466EC - cmp r0, #0xc0 - blo _022466F4 -_022466EC: - add r0, r4, #0 - bl ov23_02246548 - b _0224685C -_022466F4: - mov r0, #0x11 - lsl r0, r0, #4 - ldrb r1, [r5, r0] - add r0, r5, r4 - add r0, #0xf0 - ldrb r0, [r0] - sub r0, r1, r0 - bpl _02246706 - add r0, #0x28 -_02246706: - add r0, r5, r0 - add r0, #0xc8 - lsl r1, r4, #2 - ldrb r6, [r0] - add r0, r5, r1 - add r0, #0x48 - add r1, r5, r1 - ldrh r0, [r0] - add r1, #0x4a - ldrh r1, [r1] - sub r0, #0x80 - lsl r0, r0, #0xc - sub r1, #0x60 - str r0, [sp, #4] - lsl r0, r1, #0xc - asr r1, r0, #0x1f - add r2, r0, #0 - add r3, r1, #0 - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _022468A0 ; =0x00000000 - adc r1, r2 - lsr r0, r0, #0xc - lsl r1, r1, #0x14 - str r0, [sp, #8] - orr r0, r1 - str r0, [sp, #8] - ldr r0, [sp, #4] - asr r1, r0, #0x1f - add r2, r0, #0 - add r3, r1, #0 - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _022468A0 ; =0x00000000 - adc r1, r2 - lsr r2, r0, #0xc - lsl r1, r1, #0x14 - ldr r0, [sp, #8] - orr r2, r1 - add r0, r2, r0 - bl sub_020BCFF0 - str r0, [sp, #0xc] - cmp r6, #0 - bne _0224679A - mov r1, #0xa - lsl r1, r1, #0x10 - bl sub_020BCFD0 - mov r2, #0x26 - asr r1, r0, #0x1f - lsl r2, r2, #0xc - mov r3, #0 - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _022468A0 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - asr r1, r0, #0xc - add r0, r5, r4 - add r0, #0xf0 - strb r1, [r0] - b _02246852 -_0224679A: - lsl r2, r4, #2 - add r0, r5, r2 - add r0, #0x48 - ldrh r1, [r0] - add r0, r5, r2 - add r0, #0x4a - ldrh r0, [r0] - sub r1, #0x80 - sub r0, #0x60 - bne _022467C0 - cmp r1, #0 - ldrh r0, [r7, r2] - bge _022467BA - sub r0, r0, r6 - strh r0, [r7, r2] - b _02246852 -_022467BA: - add r0, r0, r6 - strh r0, [r7, r2] - b _02246852 -_022467C0: - cmp r1, #0 - bne _022467E0 - cmp r0, #0 - bge _022467D4 - ldr r0, [sp, #0x10] - ldrh r0, [r0, r2] - sub r1, r0, r6 - ldr r0, [sp, #0x10] - strh r1, [r0, r2] - b _02246852 -_022467D4: - ldr r0, [sp, #0x10] - ldrh r0, [r0, r2] - add r1, r0, r6 - ldr r0, [sp, #0x10] - strh r1, [r0, r2] - b _02246852 -_022467E0: - bl sub_020BDA20 - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - lsl r1, r6, #0xc - add r0, r0, r1 - str r0, [sp] - ldr r0, [sp, #0x14] - ldr r2, [sp] - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _022468A4 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _022468A0 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - asr r1, r0, #0xc - lsl r0, r4, #2 - add r0, r5, r0 - ldr r2, [sp] - add r1, #0x60 - add r0, #0x4a - strh r1, [r0] - ldr r0, [sp, #0x14] - asr r3, r2, #0x1f - asr r0, r0, #4 - lsl r0, r0, #1 - add r0, r0, #1 - lsl r1, r0, #1 - ldr r0, _022468A4 ; =0x020F983C - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _022468A0 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - asr r1, r0, #0xc - lsl r0, r4, #2 - add r0, r5, r0 - add r1, #0x80 - add r0, #0x48 - strh r1, [r0] -_02246852: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov23_02246574 -_0224685C: - add r4, r4, #1 -_0224685E: - mov r0, #0x45 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - cmp r4, r0 - bge _0224686A - b _022466CA -_0224686A: - mov r0, #0x11 - lsl r0, r0, #4 - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - ldrb r1, [r5, r0] - cmp r1, #0x28 - blo _0224687E - mov r1, #0 - strb r1, [r5, r0] -_0224687E: - ldr r0, _02246898 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - bl sub_020219F8 - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02246890: .word 0x02257760 -_02246894: .word ov23_02246624 -_02246898: .word 0x02257760 -_0224689C: .word 0x00000B3B -_022468A0: .word 0x00000000 -_022468A4: .word 0x020F983C - thumb_func_end ov23_02246640 - - thumb_func_start ov23_022468A8 -ov23_022468A8: ; 0x022468A8 - push {r3, lr} - ldr r1, _022468BC ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0x2a - lsl r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, #0 - beq _022468BA - blx r1 -_022468BA: - pop {r3, pc} - ; .align 2, 0 -_022468BC: .word 0x02257760 - thumb_func_end ov23_022468A8 - - thumb_func_start ov23_022468C0 -ov23_022468C0: ; 0x022468C0 - ldr r0, _022468D4 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022468D8 ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0x17 - bne _022468D0 - mov r0, #0x14 - bx lr -_022468D0: - mov r0, #7 - bx lr - ; .align 2, 0 -_022468D4: .word 0x02257760 -_022468D8: .word 0x00000B3B - thumb_func_end ov23_022468C0 - - thumb_func_start ov23_022468DC -ov23_022468DC: ; 0x022468DC - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #0xc] - add r0, sp, #0x24 - bl sub_020361BC - bl ov23_022468C0 - str r0, [sp, #4] - ldr r0, _02246A70 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _02246A74 ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0x17 - bne _02246922 - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x30] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - bl sub_020E1F1C - ldr r2, [sp, #0x34] - ldr r3, [sp, #0x38] - add r0, r2, r0 - adc r3, r1 - mov r1, #0 - str r0, [sp, #0x24] - lsr r0, r3, #0x1f - lsl r1, r1, #1 - orr r1, r0 - add r0, r1, #1 - str r3, [sp, #0x28] - str r0, [sp, #0xc] -_02246922: - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x30] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - bl sub_020E1F1C - ldr r2, [sp, #0x34] - ldr r3, [sp, #0x38] - add r0, r2, r0 - adc r3, r1 - str r0, [sp, #0x24] - str r3, [sp, #0x28] - add r0, r3, #0 - mov r1, #0 - mov r2, #3 - mov r3, #0 - bl sub_020E1F1C - ldr r0, [sp, #0xc] - mov r6, #0 - add r0, r0, r1 - add r0, r0, #5 - str r0, [sp, #8] - ldr r0, [sp, #4] - cmp r0, #0 - bgt _02246958 - b _02246A6A -_02246958: - mov r0, #0 - str r0, [sp, #0x14] - str r0, [sp, #0x18] - str r0, [sp, #0x1c] - str r0, [sp, #0x20] -_02246962: - ldr r0, [sp, #4] - sub r0, r0, r6 - sub r4, r0, #1 - ldr r0, [sp, #0xc] - cmp r6, r0 - bge _02246976 - add r1, r5, r4 - mov r0, #0 - strb r0, [r1, #8] - b _0224698A -_02246976: - ldr r0, [sp, #8] - cmp r6, r0 - bge _02246984 - add r1, r5, r4 - mov r0, #1 - strb r0, [r1, #8] - b _0224698A -_02246984: - add r1, r5, r4 - mov r0, #2 - strb r0, [r1, #8] -_0224698A: - ldrb r0, [r1, #8] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - lsl r1, r0, #2 - ldr r0, _02246A78 ; =0x022563E8 - ldr r0, [r0, r1] - ldr r1, [sp, #0x30] - str r0, [sp] - lsl r7, r0, #1 - mov r0, #0xc0 - sub r0, r0, r7 - str r0, [sp, #0x10] - ldr r0, [sp, #0x2c] - bl sub_020E1F1C - add r3, r1, #0 - add r2, r0, #0 - ldr r1, [sp, #0x34] - ldr r0, [sp, #0x38] - add r1, r1, r2 - adc r0, r3 - str r1, [sp, #0x24] - mov r1, #1 - lsl r1, r1, #8 - str r0, [sp, #0x28] - sub r2, r1, r7 - beq _022469CA - ldr r1, [sp, #0x14] - mov r3, #0 - bl sub_020E1F1C - add r0, r1, #0 -_022469CA: - lsl r1, r4, #3 - add r7, r5, r1 - ldr r1, [sp] - add r0, r1, r0 - lsl r0, r0, #0xc - str r0, [r7, #0x44] - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x30] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - bl sub_020E1F1C - add r2, r0, #0 - ldr r0, [sp, #0x34] - ldr r3, [sp, #0x38] - add r0, r0, r2 - str r0, [sp, #0x24] - adc r3, r1 - ldr r0, [sp, #0x10] - str r3, [sp, #0x28] - cmp r0, #0 - beq _02246A04 - ldr r1, [sp, #0x18] - add r0, r3, #0 - ldr r2, [sp, #0x10] - mov r3, #0 - bl sub_020E1F1C - add r3, r1, #0 -_02246A04: - ldr r0, [sp] - add r0, r0, r3 - lsl r0, r0, #0xc - str r0, [r7, #0x48] - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x30] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - bl sub_020E1F1C - ldr r3, [sp, #0x34] - ldr r2, [sp, #0x38] - add r0, r3, r0 - adc r2, r1 - str r0, [sp, #0x24] - lsl r0, r4, #1 - add r4, r5, r0 - str r2, [sp, #0x28] - add r0, r2, #0 - ldr r1, [sp, #0x1c] - ldr r2, _02246A7C ; =0x0000FFFF - mov r3, #0 - bl sub_020E1F1C - strh r1, [r4, #0x1c] - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x30] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x28] - bl sub_020E1F1C - ldr r2, [sp, #0x34] - ldr r3, [sp, #0x38] - add r0, r2, r0 - adc r3, r1 - str r0, [sp, #0x24] - ldr r1, [sp, #0x20] - ldr r2, _02246A7C ; =0x0000FFFF - str r3, [sp, #0x28] - add r0, r3, #0 - mov r3, #0 - bl sub_020E1F1C - mov r0, #0x4d - lsl r0, r0, #2 - strh r1, [r4, r0] - ldr r0, [sp, #4] - add r6, r6, #1 - cmp r6, r0 - bge _02246A6A - b _02246962 -_02246A6A: - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_02246A70: .word 0x02257760 -_02246A74: .word 0x00000B3B -_02246A78: .word 0x022563E8 -_02246A7C: .word 0x0000FFFF - thumb_func_end ov23_022468DC - - thumb_func_start ov23_02246A80 -ov23_02246A80: ; 0x02246A80 - push {r4, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0xc - bls _02246A8E - b _02246CD6 -_02246A8E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02246A9A: ; jump table - .short _02246AB4 - _02246A9A - 2 ; case 0 - .short _02246AD0 - _02246A9A - 2 ; case 1 - .short _02246B10 - _02246A9A - 2 ; case 2 - .short _02246B44 - _02246A9A - 2 ; case 3 - .short _02246B84 - _02246A9A - 2 ; case 4 - .short _02246BB4 - _02246A9A - 2 ; case 5 - .short _02246BCA - _02246A9A - 2 ; case 6 - .short _02246C0A - _02246A9A - 2 ; case 7 - .short _02246C6E - _02246A9A - 2 ; case 8 - .short _02246C84 - _02246A9A - 2 ; case 9 - .short _02246CD6 - _02246A9A - 2 ; case 10 - .short _02246C98 - _02246A9A - 2 ; case 11 - .short _02246CBC - _02246A9A - 2 ; case 12 -_02246AB4: - bl ov23_02244C10 - str r0, [r4, #4] - mov r0, #0x57 - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r4, r0] - bl ov23_02246324 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246AD0: - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02246CDC ; =0x02257760 - mov r2, #6 - ldr r1, [r0, #4] - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_0200985C - ldr r1, _02246CDC ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #1 - str r0, [sp] - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246B10: - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r2, #7 - str r2, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, _02246CDC ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_020098B8 - ldr r1, _02246CDC ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246B44: - mov r0, #1 - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02246CDC ; =0x02257760 - mov r2, #5 - ldr r1, [r0, #4] - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02246CDC ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246B84: - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r2, #4 - ldr r0, _02246CDC ; =0x02257760 - str r2, [sp, #8] - ldr r1, [r0, #4] - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02246CDC ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246BB4: - add r0, r4, #0 - bl ov23_022468DC - add r0, r4, #0 - bl ov23_02246D44 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02246BCA: - mov r0, #0x57 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #0x1e - bls _02246CD6 - mov r1, #3 - ldr r0, _02246CE0 ; =0x0400006C - mvn r1, r1 - bl sub_020BDEC4 - mov r0, #7 - str r0, [r4, #0] - bl ov23_0224219C - mov r2, #0 - mov r1, #0x4d - add r3, r2, #0 - bl ov23_02253F60 - mov r0, #0x16 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0x66 - lsl r0, r0, #4 - bl sub_02005748 - add sp, #0x10 - pop {r4, pc} -_02246C0A: - mov r0, #7 - str r0, [sp] - ldr r0, _02246CE4 ; =0x04000050 - mov r1, #0x10 - mov r2, #1 - mov r3, #0xe - bl sub_020BF55C - ldr r0, _02246CDC ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02246F20 - cmp r0, #0 - beq _02246C4E - mov r0, #0x66 - lsl r0, r0, #4 - mov r1, #0 - bl sub_020057A4 - ldr r0, _02246CE8 ; =0x0000015E - ldrb r0, [r4, r0] - cmp r0, #0 - beq _02246C44 - mov r0, #0xb - str r0, [r4, #0] - b _02246C4E -_02246C44: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02246C4E: - mov r0, #0x16 - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0x3c - bge _02246CD6 - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0x3c - bne _02246CD6 - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r4, pc} -_02246C6E: - mov r0, #0x66 - lsl r0, r0, #4 - mov r1, #0 - bl sub_020057A4 - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r4, pc} -_02246C84: - mov r0, #0xa - str r0, [r4, #0] - bl sub_0203608C - ldr r1, _02246CE8 ; =0x0000015E - ldrb r1, [r4, r1] - bl ov23_02247144 - add sp, #0x10 - pop {r4, pc} -_02246C98: - ldr r0, _02246CE8 ; =0x0000015E - mov r1, #0 - strb r1, [r4, r0] - mov r0, #0x10 - bl sub_0205948C - ldr r0, _02246CEC ; =0x0000015D - ldrb r0, [r4, r0] - bl ov23_022448FC - mov r0, #0x57 - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r4, r0] - mov r0, #0xc - add sp, #0x10 - str r0, [r4, #0] - pop {r4, pc} -_02246CBC: - mov r0, #0x57 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #8 - bls _02246CD6 - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02246CD6: - add sp, #0x10 - pop {r4, pc} - nop -_02246CDC: .word 0x02257760 -_02246CE0: .word 0x0400006C -_02246CE4: .word 0x04000050 -_02246CE8: .word 0x0000015E -_02246CEC: .word 0x0000015D - thumb_func_end ov23_02246A80 - - thumb_func_start ov23_02246CF0 -ov23_02246CF0: ; 0x02246CF0 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x59 - mov r0, #4 - lsl r1, r1, #2 - add r6, r2, #0 - bl sub_02018184 - mov r2, #0x59 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _02246D34 ; =0x0000015E - mov r2, #0x64 - strb r5, [r4, r0] - ldr r0, _02246D38 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02246D3C ; =ov23_02246A80 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02246D38 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, _02246D40 ; =0x0000015D - strb r6, [r4, r0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02246D34: .word 0x0000015E -_02246D38: .word 0x02257760 -_02246D3C: .word ov23_02246A80 -_02246D40: .word 0x0000015D - thumb_func_end ov23_02246CF0 - - thumb_func_start ov23_02246D44 -ov23_02246D44: ; 0x02246D44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - str r0, [sp, #0x2c] - ldr r0, _02246E8C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A450 - ldr r0, _02246E8C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - ldr r0, _02246E8C ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - mov r3, #0x17 - str r1, [sp] - sub r2, r1, #1 - str r2, [sp, #4] - str r2, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - lsl r3, r3, #4 - ldr r2, [r0, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r0, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r0, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - add r3, #0x64 - str r2, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r0, r3 - add r2, r1, #0 - add r3, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - ldr r0, _02246E8C ; =0x02257760 - mov r6, #0 - ldr r1, [r0, #4] - ldr r0, [r1, #0x44] - str r0, [sp, #0x30] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x34] - mov r1, #2 - mov r0, #6 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - str r0, [sp, #0x3c] - lsr r0, r1, #5 - str r1, [sp, #0x38] - str r6, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - add r0, sp, #0x30 - strh r6, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x58] - mov r0, #4 - str r6, [sp, #0x54] - str r0, [sp, #0x5c] - bl ov23_022468C0 - cmp r0, #0 - ble _02246E78 - add r5, r6, #0 - ldr r4, _02246E8C ; =0x02257760 - add r7, r5, #0 -_02246DEA: - mov r0, #0x4b - lsl r0, r0, #0xe - str r0, [sp, #0x38] - str r0, [sp, #0x3c] - add r0, sp, #0x30 - bl sub_02021AA0 - ldr r1, [r4, #4] - add r2, r1, r5 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CF8 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, [sp, #0x2c] - add r1, r1, r6 - ldrb r1, [r1, #8] - lsl r1, r1, #1 - bl sub_02021D6C - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - lsl r1, r7, #0x10 - lsr r1, r1, #0x10 - bl sub_02021E50 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021FE0 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021E80 - add r5, r5, #4 - add r7, r7, #4 - add r6, r6, #1 - bl ov23_022468C0 - cmp r6, r0 - blt _02246DEA -_02246E78: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246E8C: .word 0x02257760 - thumb_func_end ov23_02246D44 - - thumb_func_start ov23_02246E90 -ov23_02246E90: ; 0x02246E90 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _02246F18 ; =0x02257760 - add r4, r1, #0 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - add r1, r1, r0 - lsl r0, r5, #2 - ldr r2, [r1, r0] - cmp r2, #0 - beq _02246F14 - lsl r2, r5, #3 - add r3, r4, r2 - ldr r2, [r3, #0x44] - str r2, [sp] - ldr r2, [r3, #0x48] - str r2, [sp, #4] - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 - mov r0, #0x4d - lsl r0, r0, #2 - add r2, r4, r0 - lsl r1, r5, #1 - mov r3, #0x64 - add r4, r5, #0 - mul r4, r3 - mov r3, #0x25 - lsl r3, r3, #4 - ldrh r0, [r2, r1] - add r3, r4, r3 - add r0, r0, r3 - strh r0, [r2, r1] - ldrh r0, [r2, r1] - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02246F1C ; =0x020F983C - ldrsh r1, [r0, r1] - mov r0, #1 - lsl r0, r0, #0xc - add r0, r1, r0 - lsl r0, r0, #0x10 - mov r1, #5 - asr r0, r0, #0x10 - lsl r1, r1, #0xe - bl sub_020BCFD0 - mov r1, #1 - lsl r1, r1, #0xc - sub r0, r1, r0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, _02246F18 ; =0x02257760 - ldr r1, [r0, #4] - lsl r0, r5, #2 - add r1, r1, r0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C70 -_02246F14: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02246F18: .word 0x02257760 -_02246F1C: .word 0x020F983C - thumb_func_end ov23_02246E90 - - thumb_func_start ov23_02246F20 -ov23_02246F20: ; 0x02246F20 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r6, #0 - str r1, [sp] - add r4, r6, #0 - bl ov23_022468C0 - cmp r0, #0 - ble _02246F56 - ldr r5, [sp] -_02246F34: - add r0, r5, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02246F48 - ldr r1, [sp] - add r0, r4, #0 - bl ov23_02246E90 - b _02246F4A -_02246F48: - add r6, r6, #1 -_02246F4A: - add r5, r5, #4 - add r4, r4, #1 - bl ov23_022468C0 - cmp r4, r0 - blt _02246F34 -_02246F56: - bl ov23_022468C0 - cmp r6, r0 - bne _02246F64 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02246F64: - ldr r0, _022470F0 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - beq _02247034 - mov r5, #0 - bl ov23_022468C0 - cmp r0, #0 - ble _02247034 - ldr r6, [sp] - add r4, r6, #0 -_02246F7A: - add r0, r6, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02247026 - ldr r0, _022470F0 ; =0x021BF6BC - ldrh r0, [r0, #0x1e] - lsl r1, r0, #0xc - ldr r0, [r4, #0x48] - sub r0, r1, r0 - str r0, [sp, #0xc] - asr r7, r0, #0x1f - ldr r0, _022470F0 ; =0x021BF6BC - ldrh r0, [r0, #0x1c] - lsl r1, r0, #0xc - ldr r0, [r4, #0x44] - sub r0, r1, r0 - asr r1, r0, #0x1f - add r2, r0, #0 - add r3, r1, #0 - bl sub_020E1F1C - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - str r1, [sp, #8] - add r1, r7, #0 - add r2, r0, #0 - add r3, r7, #0 - bl sub_020E1F1C - add r7, r0, #0 - add r3, r1, #0 - mov r0, #2 - ldr r1, [sp, #0x10] - lsl r0, r0, #0xa - add r2, r1, r0 - ldr r1, [sp, #8] - ldr r0, _022470F4 ; =0x00000000 - adc r1, r0 - str r1, [sp, #8] - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - mov r0, #2 - lsl r0, r0, #0xa - ldr r2, _022470F4 ; =0x00000000 - add r0, r7, r0 - adc r3, r2 - lsl r2, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - add r0, r1, r0 - bl sub_020BCFF0 - ldr r1, [sp] - add r1, r1, r5 - ldrb r1, [r1, #8] - lsl r2, r1, #2 - ldr r1, _022470F8 ; =0x022563E8 - ldr r1, [r1, r2] - lsl r1, r1, #0xc - cmp r1, r0 - ble _02247026 - ldr r0, _022470FC ; =0x00000626 - bl sub_02005748 - ldr r0, _02247100 ; =0x02257760 - lsl r4, r5, #2 - ldr r0, [r0, #4] - add r1, r0, r4 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, [sp] - add r1, r1, r5 - ldrb r1, [r1, #8] - lsl r1, r1, #1 - add r1, r1, #1 - bl sub_02021D6C - ldr r0, [sp] - mov r1, #1 - add r0, r0, r4 - add r0, #0xe4 - str r1, [r0, #0] - b _02247034 -_02247026: - add r6, r6, #4 - add r4, #8 - add r5, r5, #1 - bl ov23_022468C0 - cmp r5, r0 - blt _02246F7A -_02247034: - mov r6, #0 - bl ov23_022468C0 - cmp r0, #0 - ble _022470E0 - ldr r7, [sp] - add r4, r7, #0 - add r5, r7, #0 -_02247044: - add r0, r7, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _022470D0 - ldrh r0, [r4, #0x1c] - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02247104 ; =0x020F983C - ldrsh r1, [r0, r1] - ldr r0, [r5, #0x48] - sub r0, r0, r1 - str r0, [r5, #0x48] - ldrh r1, [r4, #0x1c] - ldr r0, [r5, #0x44] - asr r1, r1, #4 - lsl r2, r1, #2 - ldr r1, _02247104 ; =0x020F983C - add r2, r1, r2 - mov r1, #2 - ldrsh r1, [r2, r1] - add r0, r0, r1 - str r0, [r5, #0x44] - ldr r0, [sp] - add r0, r0, r6 - ldrb r0, [r0, #8] - lsl r1, r0, #2 - ldr r0, _022470F8 ; =0x022563E8 - ldr r1, [r0, r1] - ldr r0, [r5, #0x48] - lsl r3, r1, #0xc - cmp r0, r3 - bge _02247090 - ldrh r2, [r4, #0x1c] - ldr r0, _02247108 ; =0x0000FFFF - sub r0, r0, r2 - strh r0, [r4, #0x1c] - b _022470A2 -_02247090: - mov r2, #0xc0 - sub r2, r2, r1 - lsl r2, r2, #0xc - cmp r0, r2 - blt _022470A2 - ldrh r2, [r4, #0x1c] - ldr r0, _02247108 ; =0x0000FFFF - sub r0, r0, r2 - strh r0, [r4, #0x1c] -_022470A2: - ldr r0, [r5, #0x44] - cmp r0, r3 - bge _022470B8 - ldrh r1, [r4, #0x1c] - mov r0, #2 - lsl r0, r0, #0xe - sub r1, r1, r0 - ldr r0, _02247108 ; =0x0000FFFF - sub r0, r0, r1 - strh r0, [r4, #0x1c] - b _022470D0 -_022470B8: - mov r2, #1 - lsl r2, r2, #8 - sub r1, r2, r1 - lsl r1, r1, #0xc - cmp r0, r1 - blt _022470D0 - ldrh r1, [r4, #0x1c] - lsl r0, r2, #7 - sub r1, r1, r0 - ldr r0, _02247108 ; =0x0000FFFF - sub r0, r0, r1 - strh r0, [r4, #0x1c] -_022470D0: - add r7, r7, #4 - add r4, r4, #2 - add r5, #8 - add r6, r6, #1 - bl ov23_022468C0 - cmp r6, r0 - blt _02247044 -_022470E0: - ldr r0, _02247100 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - bl sub_020219F8 - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022470F0: .word 0x021BF6BC -_022470F4: .word 0x00000000 -_022470F8: .word 0x022563E8 -_022470FC: .word 0x00000626 -_02247100: .word 0x02257760 -_02247104: .word 0x020F983C -_02247108: .word 0x0000FFFF - thumb_func_end ov23_02246F20 - - thumb_func_start ov23_0224710C -ov23_0224710C: ; 0x0224710C - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02247132 - ldr r0, _02247134 ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - add r2, r6, #0 - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02246CF0 -_02247132: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02247134: .word 0x02257760 - thumb_func_end ov23_0224710C - - thumb_func_start ov23_02247138 -ov23_02247138: ; 0x02247138 - ldr r3, _02247140 ; =ov23_0224AD7C - mov r1, #2 - bx r3 - nop -_02247140: .word ov23_0224AD7C - thumb_func_end ov23_02247138 - - thumb_func_start ov23_02247144 -ov23_02247144: ; 0x02247144 - push {r3, r4, r5, lr} - ldr r0, _022471C8 ; =0x02257760 - add r5, r1, #0 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r1, r0] - cmp r4, #0 - beq _022471C6 - mov r0, #0x66 - lsl r0, r0, #4 - mov r1, #0 - bl sub_020057A4 - ldr r0, _022471CC ; =0x0000015E - ldrb r1, [r4, r0] - cmp r1, #0 - beq _02247174 - cmp r5, #0 - beq _02247174 - sub r0, r0, #1 - ldrb r0, [r4, r0] - bl ov23_022448FC -_02247174: - ldr r1, _022471D0 ; =0x04000050 - mov r0, #0 - strh r0, [r1] - mov r1, #1 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _022471D4 ; =0x0400006C - mov r1, #0 - bl sub_020BDEC4 - bl ov23_022468C0 - bl ov23_02246370 - mov r0, #0x10 - bl sub_0205948C - ldr r0, _022471C8 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - ldr r0, _022471C8 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, _022471C8 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_022471C6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022471C8: .word 0x02257760 -_022471CC: .word 0x0000015E -_022471D0: .word 0x04000050 -_022471D4: .word 0x0400006C - thumb_func_end ov23_02247144 - - thumb_func_start ov23_022471D8 -ov23_022471D8: ; 0x022471D8 - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - ldr r0, _02247308 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A450 - ldr r0, _02247308 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - ldr r0, _02247308 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - mov r3, #0x17 - str r1, [sp] - sub r2, r1, #1 - str r2, [sp, #4] - str r2, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - lsl r3, r3, #4 - ldr r2, [r0, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r0, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r0, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - add r3, #0x64 - str r2, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r0, r3 - add r2, r1, #0 - add r3, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - ldr r4, _02247308 ; =0x02257760 - mov r6, #0 - ldr r1, [r4, #4] - mov r7, #0x19 - ldr r0, [r1, #0x44] - add r5, r6, #0 - str r0, [sp, #0x2c] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x30] - mov r1, #2 - mov r0, #6 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - lsr r0, r1, #5 - str r1, [sp, #0x34] - str r6, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - add r0, sp, #0x2c - strh r6, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x54] - mov r0, #4 - str r6, [sp, #0x50] - str r0, [sp, #0x58] - lsl r7, r7, #0xe -_02247274: - add r0, sp, #0x2c - str r7, [sp, #0x34] - str r7, [sp, #0x38] - bl sub_02021AA0 - ldr r1, [r4, #4] - add r2, r1, r5 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_02021D6C - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021E50 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0xf - sub r1, r1, r6 - bl sub_02021F58 - ldr r0, [r4, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021E80 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #0xf - blt _02247274 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_02247308: .word 0x02257760 - thumb_func_end ov23_022471D8 - - thumb_func_start ov23_0224730C -ov23_0224730C: ; 0x0224730C - push {r4, lr} - lsl r1, r1, #2 - add r4, r0, r1 - str r2, [r4, #8] - add r0, r4, #0 - ldr r2, [sp, #8] - add r0, #0x80 - str r2, [r0, #0] - str r3, [r4, #0x44] - ldr r0, [sp, #0xc] - add r4, #0xbc - str r0, [r4, #0] - ldr r0, _02247338 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r1 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC - pop {r4, pc} - ; .align 2, 0 -_02247338: .word 0x02257760 - thumb_func_end ov23_0224730C - - thumb_func_start ov23_0224733C -ov23_0224733C: ; 0x0224733C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - cmp r1, #4 - bhi _0224735C - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02247352: ; jump table - .short _022474B6 - _02247352 - 2 ; case 0 - .short _0224747E - _02247352 - 2 ; case 1 - .short _0224742E - _02247352 - 2 ; case 2 - .short _022473C6 - _02247352 - 2 ; case 3 - .short _0224735C - _02247352 - 2 ; case 4 -_0224735C: - mov r0, #2 - mov r2, #0x69 - str r0, [sp] - sub r0, r0, #6 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xb7 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #0xb - sub r3, r3, #5 - bl ov23_0224730C - mov r0, #1 - mvn r0, r0 - mov r2, #0x8c - str r0, [sp] - sub r0, r0, #2 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0x94 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #0xc - sub r3, #0xf - bl ov23_0224730C - mov r0, #1 - mvn r0, r0 - mov r2, #0x87 - str r0, [sp] - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0x99 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #0xd - sub r3, #0x14 - bl ov23_0224730C - mov r0, #2 - mov r2, #0x78 - str r0, [sp] - mov r0, #0 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xa8 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #0xe - sub r3, #0xb - bl ov23_0224730C -_022473C6: - mov r0, #3 - mov r2, #0x80 - str r0, [sp] - sub r0, r0, #7 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xa0 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #7 - sub r3, r3, #5 - bl ov23_0224730C - mov r0, #2 - mvn r0, r0 - mov r2, #0x84 - str r0, [sp] - sub r0, r0, #1 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0x9c - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #8 - sub r3, #0xf - bl ov23_0224730C - mov r0, #1 - mov r2, #0x70 - str r0, [sp] - sub r0, r0, #3 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xb0 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #9 - bl ov23_0224730C - mov r0, #1 - mov r2, #0x73 - str r0, [sp] - sub r0, r0, #3 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xad - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #0xa - add r3, r3, #2 - bl ov23_0224730C -_0224742E: - mov r0, #2 - mov r2, #0x8c - str r0, [sp] - sub r0, r0, #5 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0x94 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #4 - sub r3, #0xa - bl ov23_0224730C - mov r0, #1 - mvn r0, r0 - mov r2, #0x8c - str r0, [sp] - sub r0, r0, #1 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0x94 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #5 - sub r3, #0x14 - bl ov23_0224730C - mov r0, #0 - mvn r0, r0 - mov r2, #0x6e - str r0, [sp] - sub r0, r0, #1 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xb2 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #6 - bl ov23_0224730C -_0224747E: - mov r0, #1 - mvn r0, r0 - mov r2, #0x78 - str r0, [sp] - sub r0, r0, #1 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xa8 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #2 - sub r3, #0x1e - bl ov23_0224730C - mov r0, #1 - mvn r0, r0 - mov r2, #0x64 - str r0, [sp] - sub r0, r0, #1 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xbc - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #3 - sub r3, #0xa - bl ov23_0224730C -_022474B6: - mov r0, #2 - mov r2, #0x80 - str r0, [sp] - sub r0, r0, #5 - add r3, r2, #0 - str r0, [sp, #4] - add r3, #0xa0 - ldr r3, [r4, r3] - add r0, r4, #0 - mov r1, #1 - sub r3, #0x1e - bl ov23_0224730C - add sp, #8 - pop {r4, pc} - thumb_func_end ov23_0224733C - - thumb_func_start ov23_022474D4 -ov23_022474D4: ; 0x022474D4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - mov r7, #0 - add r4, r6, #0 - add r5, r7, #0 -_022474E0: - add r0, r4, #0 - add r0, #0x80 - ldr r1, [r0, #0] - cmp r1, #0 - beq _02247556 - ldr r0, [r4, #8] - add r0, r0, r1 - str r0, [r4, #8] - add r0, r4, #0 - add r0, #0xbc - ldr r1, [r4, #0x44] - ldr r0, [r0, #0] - add r0, r1, r0 - str r0, [r4, #0x44] - add r0, r4, #0 - add r0, #0xbc - ldr r1, [r0, #0] - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r0, [r6, r0] - add r1, r1, r0 - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - ldr r0, [r4, #8] - lsl r0, r0, #0xc - str r0, [sp] - ldr r0, [r4, #0x44] - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r0, _02247564 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C50 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r6, r0] - ldr r1, [r4, #0x44] - add r0, #0x23 - cmp r1, r0 - ble _02247556 - ldr r0, _02247564 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CAC - add r1, r4, #0 - add r1, #0x80 - mov r0, #0 - str r0, [r1, #0] -_02247556: - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #0xf - blt _022474E0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247564: .word 0x02257760 - thumb_func_end ov23_022474D4 - - thumb_func_start ov23_02247568 -ov23_02247568: ; 0x02247568 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r0, _022478A4 ; =0x00000125 - add r4, r1, #0 - ldrb r1, [r4, r0] - cmp r1, #6 - bhi _0224766E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02247582: ; jump table - .short _02247590 - _02247582 - 2 ; case 0 - .short _022475D8 - _02247582 - 2 ; case 1 - .short _02247608 - _02247582 - 2 ; case 2 - .short _02247692 - _02247582 - 2 ; case 3 - .short _022477A0 - _02247582 - 2 ; case 4 - .short _0224781A - _02247582 - 2 ; case 5 - .short _022479B4 - _02247582 - 2 ; case 6 -_02247590: - mov r1, #0 - sub r0, r0, #1 - strb r1, [r4, r0] - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - add r5, r0, #0 - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - add r2, r0, #0 - mov r0, #0x20 - str r0, [sp] - ldr r0, _022478A8 ; =0x02257760 - add r1, r5, #0 - ldr r0, [r0, #4] - mov r3, #5 - ldr r0, [r0, #0x40] - bl ov5_021F4F18 - mov r1, #0x45 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #1 - add r1, #0x11 - strb r0, [r4, r1] - ldr r0, _022478AC ; =0x0000065E - bl sub_02005748 - b _022479DE -_022475D8: - sub r1, r0, #1 - ldrb r1, [r4, r1] - add r2, r1, #1 - sub r1, r0, #1 - strb r2, [r4, r1] - ldrb r1, [r4, r1] - cmp r1, #0x14 - bls _0224766E - mov r1, #2 - strb r1, [r4, r0] - mov r1, #0 - sub r2, r0, #5 - str r1, [r4, r2] - add r2, r0, #0 - mov r3, #5 - sub r2, #9 - str r3, [r4, r2] - ldr r2, _022478A8 ; =0x02257760 - add r0, #0xd3 - ldr r2, [r2, #4] - ldr r0, [r2, r0] - bl sub_02021D6C - b _022479DE -_02247608: - mov r1, #2 - lsl r1, r1, #0x12 - str r1, [sp, #8] - sub r1, r0, #5 - ldr r1, [r4, r1] - add r0, #0xd3 - lsl r1, r1, #0xc - str r1, [sp, #0xc] - ldr r1, _022478A8 ; =0x02257760 - ldr r1, [r1, #4] - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_02021C50 - ldr r0, _022478A8 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC - mov r1, #0x12 - lsl r1, r1, #4 - ldr r2, [r4, r1] - cmp r2, #0x41 - ble _0224767E - mov r2, #3 - add r0, r1, #5 - strb r2, [r4, r0] - ldr r0, _022478B0 ; =0x0000065D - bl sub_02005748 - ldr r0, _022478A8 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022478B4 ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0x15 - bne _0224765C - mov r1, #0 - mvn r1, r1 - b _0224765E -_0224765C: - mov r1, #5 -_0224765E: - mov r0, #0x46 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02247670 -_0224766E: - b _022479DE -_02247670: - bl sub_0207136C - mov r0, #0x45 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _022479DE -_0224767E: - sub r0, r1, #4 - ldr r0, [r4, r0] - add r0, r2, r0 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r2, r0, #3 - sub r0, r1, #4 - str r2, [r4, r0] - b _022479DE -_02247692: - ldr r1, _022478B8 ; =0x021BF6BC - ldrh r2, [r1, #0x20] - cmp r2, #0 - beq _02247742 - sub r0, r0, #5 - ldrh r2, [r1, #0x1e] - ldr r0, [r4, r0] - sub r0, r2, r0 - lsl r0, r0, #0xc - str r0, [sp, #4] - asr r7, r0, #0x1f - ldrh r0, [r1, #0x1c] - sub r0, #0x80 - lsl r0, r0, #0xc - asr r1, r0, #0x1f - add r2, r0, #0 - add r3, r1, #0 - bl sub_020E1F1C - add r6, r0, #0 - ldr r0, [sp, #4] - add r5, r1, #0 - add r1, r7, #0 - add r2, r0, #0 - add r3, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r6, r6, r2 - adc r5, r3 - lsl r5, r5, #0x14 - lsr r6, r6, #0xc - orr r6, r5 - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - add r0, r6, r1 - bl sub_020BCFF0 - mov r1, #3 - lsl r1, r1, #0x10 - cmp r0, r1 - bge _02247742 - mov r0, #0x4b - mov r1, #3 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _022478BC ; =0x00000627 - bl sub_02005748 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r5, [r4, r0] - mov r1, #3 - add r0, r5, #0 - bl sub_020E1F6C - cmp r1, #2 - bne _02247742 - add r0, r5, #0 - mov r1, #3 - bl sub_020E1F6C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #2 - add r0, r4, #0 - add r1, r4, r1 - add r0, #0xf8 - add r1, #0xf8 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200A490 - mov r0, #0x49 - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r4, r0] - mov r1, #4 - add r0, r0, #1 - strb r1, [r4, r0] -_02247742: - mov r1, #0x46 - lsl r1, r1, #2 - ldr r0, [r4, r1] - cmp r0, #0xf - ble _02247760 - add r0, r1, #0 - mov r3, #0 - add r0, #0xc - strb r3, [r4, r0] - add r0, r1, #0 - mov r2, #5 - add r0, #0xd - strb r2, [r4, r0] - add r1, #0x14 - str r3, [r4, r1] -_02247760: - mov r0, #0x4b - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _0224777A - bge _02247770 - add r1, r1, #1 - str r1, [r4, r0] -_02247770: - mov r0, #0x4b - lsl r0, r0, #2 - ldr r1, [r4, r0] - neg r1, r1 - str r1, [r4, r0] -_0224777A: - mov r1, #0x4b - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r0, #0x80 - lsl r0, r0, #0xc - str r0, [sp, #8] - add r0, r1, #0 - sub r0, #0xc - ldr r0, [r4, r0] - add r1, #0xcc - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, r1] - add r1, sp, #8 - bl sub_02021C50 - b _022479DE -_022477A0: - sub r1, r0, #1 - ldrb r1, [r4, r1] - cmp r1, #0 - bne _022477BA - sub r0, #0xd - ldr r0, [r4, r0] - mov r1, #3 - bl sub_020E1F6C - add r1, r0, #0 - add r0, r4, #0 - bl ov23_0224733C -_022477BA: - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - add r0, r4, #0 - bl ov23_022474D4 - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - cmp r1, #0x14 - bne _022477DA - mov r1, #3 - add r0, r0, #1 - strb r1, [r4, r0] -_022477DA: - mov r0, #0x4b - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _022477F4 - bge _022477EA - add r1, r1, #1 - str r1, [r4, r0] -_022477EA: - mov r0, #0x4b - lsl r0, r0, #2 - ldr r1, [r4, r0] - neg r1, r1 - str r1, [r4, r0] -_022477F4: - mov r1, #0x4b - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r0, #0x80 - lsl r0, r0, #0xc - str r0, [sp, #8] - add r0, r1, #0 - sub r0, #0xc - ldr r0, [r4, r0] - add r1, #0xcc - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, r1] - add r1, sp, #8 - bl sub_02021C50 - b _022479DE -_0224781A: - sub r0, r0, #1 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _02247824 - b _02247944 -_02247824: - ldr r0, _022478C0 ; =0x0000062A - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x11 - add r0, #0xf8 - lsl r1, r1, #4 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - bl sub_0200A490 - mov r7, #1 - mov r5, #4 - mov r6, #0x52 -_02247840: - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021D6C - lsl r0, r6, #0xc - str r0, [sp, #8] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r2, [r4, r0] - lsr r1, r7, #0x1f - lsl r3, r7, #0x1f - sub r3, r3, r1 - mov r0, #0x1f - ror r3, r0 - add r2, #0x27 - add r0, r1, r3 - add r0, r2, r0 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_02021C50 - ldr r0, _022478A8 ; =0x02257760 - ldr r0, [r0, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC - add r7, r7, #1 - add r5, r5, #4 - add r6, #0xc - cmp r7, #9 - blt _02247840 - ldr r0, _022478A8 ; =0x02257760 - b _022478C4 - nop -_022478A4: .word 0x00000125 -_022478A8: .word 0x02257760 -_022478AC: .word 0x0000065E -_022478B0: .word 0x0000065D -_022478B4: .word 0x00000B3B -_022478B8: .word 0x021BF6BC -_022478BC: .word 0x00000627 -_022478C0: .word 0x0000062A -_022478C4: - ldr r1, [r0, #4] - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021D6C - mov r0, #0x19 - lsl r0, r0, #0xe - str r0, [sp, #8] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r0, #0x15 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, _022479F0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_02021C50 - ldr r0, _022479F0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC - ldr r0, _022479F0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021D6C - mov r0, #0x7a - lsl r0, r0, #0xc - str r0, [sp, #8] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, _022479F0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_02021C50 - ldr r0, _022479F0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC -_02247944: - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - bl sub_0201D2E8 - mov r1, #0xa - bl sub_020E1F6C - add r1, #0x7b - lsl r0, r1, #0xc - str r0, [sp, #8] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, #0xd8 - lsl r1, r1, #0xc - str r1, [sp, #0xc] - ldr r1, _022479F0 ; =0x02257760 - ldr r1, [r1, #4] - ldr r0, [r1, r0] - add r1, sp, #8 - bl sub_02021C50 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - mov r2, #0x1d - add r1, r1, #1 - str r1, [r4, r0] - add r1, r0, #4 - ldrb r1, [r4, r1] - lsr r5, r1, #0x1f - lsl r3, r1, #0x1d - sub r3, r3, r5 - ror r3, r2 - add r2, r5, r3 - beq _022479A2 - ldr r2, _022479F0 ; =0x02257760 - lsr r1, r1, #3 - ldr r2, [r2, #4] - add r0, #0xd8 - ldr r0, [r2, r0] - add r1, r1, #3 - bl sub_02021D6C -_022479A2: - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - cmp r1, #0x4b - bne _022479DE - mov r1, #6 - add r0, r0, #1 - strb r1, [r4, r0] - b _022479DE -_022479B4: - sub r0, #0x11 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022479C8 - bl sub_0207136C - mov r0, #0x45 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_022479C8: - ldr r0, _022479F0 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CAC - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022479DE: - ldr r0, _022479F0 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - bl sub_020219F8 - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_022479F0: .word 0x02257760 - thumb_func_end ov23_02247568 - - thumb_func_start ov23_022479F4 -ov23_022479F4: ; 0x022479F4 - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - ldr r3, _02247A58 ; =0x02256404 - add r2, sp, #0xc - add r5, r0, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - mov r1, #4 - sub r4, r0, #1 - mov r0, #0x32 - bl sub_02006C24 - add r6, r0, #0 - cmp r4, #6 - bge _02247A4E - add r0, r4, #1 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02247A5C ; =0x02257760 - lsl r3, r4, #2 - ldr r1, [r0, #4] - mov r0, #0x17 - lsl r0, r0, #4 - add r2, sp, #0xc - ldr r0, [r1, r0] - ldr r2, [r2, r3] - add r1, r6, #0 - mov r3, #0 - bl sub_02009A4C - add r1, r4, #1 - lsl r1, r1, #2 - add r1, r5, r1 - add r1, #0xf8 - str r0, [r1, #0] -_02247A4E: - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02247A58: .word 0x02256404 -_02247A5C: .word 0x02257760 - thumb_func_end ov23_022479F4 - - thumb_func_start ov23_02247A60 -ov23_02247A60: ; 0x02247A60 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0x17 - ldr r6, _02247A88 ; =0x02257760 - mov r4, #1 - add r5, r0, #4 - lsl r7, r7, #4 -_02247A6C: - add r0, r5, #0 - add r0, #0xf8 - ldr r1, [r0, #0] - cmp r1, #0 - beq _02247A7E - ldr r0, [r6, #4] - ldr r0, [r0, r7] - bl sub_02009D68 -_02247A7E: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - blt _02247A6C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247A88: .word 0x02257760 - thumb_func_end ov23_02247A60 - - thumb_func_start ov23_02247A8C -ov23_02247A8C: ; 0x02247A8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0xc - bls _02247A9A - b _02247D12 -_02247A9A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02247AA6: ; jump table - .short _02247AC0 - _02247AA6 - 2 ; case 0 - .short _02247B1C - _02247AA6 - 2 ; case 1 - .short _02247B66 - _02247AA6 - 2 ; case 2 - .short _02247B9C - _02247AA6 - 2 ; case 3 - .short _02247BDC - _02247AA6 - 2 ; case 4 - .short _02247C0E - _02247AA6 - 2 ; case 5 - .short _02247C1E - _02247AA6 - 2 ; case 6 - .short _02247C70 - _02247AA6 - 2 ; case 7 - .short _02247CB8 - _02247AA6 - 2 ; case 8 - .short _02247CC4 - _02247AA6 - 2 ; case 9 - .short _02247D12 - _02247AA6 - 2 ; case 10 - .short _02247CD4 - _02247AA6 - 2 ; case 11 - .short _02247CF8 - _02247AA6 - 2 ; case 12 -_02247AC0: - bl ov23_02244C10 - str r0, [r4, #4] - mov r0, #0x49 - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r4, r0] - ldr r1, _02247D18 ; =0x02257760 - mov r0, #0x20 - ldr r1, [r1, #4] - mov r2, #4 - add r1, #0x48 - bl sub_020095C4 - ldr r1, _02247D18 ; =0x02257760 - ldr r2, [r1, #4] - str r0, [r2, #0x44] - ldr r0, [r1, #4] - mov r2, #6 - add r0, #0x48 - mov r1, #0 - lsl r2, r2, #0x12 - bl sub_0200964C - mov r6, #0 - ldr r7, _02247D18 ; =0x02257760 - add r5, r6, #0 -_02247AF6: - mov r0, #8 - add r1, r6, #0 - mov r2, #4 - bl sub_02009714 - ldr r1, [r7, #4] - add r6, r6, #1 - add r2, r1, r5 - mov r1, #0x17 - lsl r1, r1, #4 - add r5, r5, #4 - str r0, [r2, r1] - cmp r6, #4 - blt _02247AF6 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247B1C: - mov r0, #1 - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02247D18 ; =0x02257760 - mov r2, #0x20 - ldr r1, [r0, #4] - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_0200985C - ldr r2, _02247D18 ; =0x02257760 - mov r1, #0x19 - ldr r3, [r2, #4] - lsl r1, r1, #4 - str r0, [r3, r1] - ldr r0, [r2, #4] - add sp, #0x10 - ldr r1, [r0, r1] - add r0, r4, #0 - add r0, #0xf8 - str r1, [r0, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247B66: - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, _02247D18 ; =0x02257760 - mov r2, #0x33 - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_020098B8 - ldr r1, _02247D18 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247B9C: - mov r0, #1 - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02247D18 ; =0x02257760 - mov r2, #0x1f - ldr r1, [r0, #4] - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02247D18 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247BDC: - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, _02247D18 ; =0x02257760 - mov r2, #0x1e - ldr r1, [r0, #4] - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02247D18 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247C0E: - add r0, r4, #0 - bl ov23_022471D8 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247C1E: - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - add r0, r4, #0 - bl ov23_022479F4 - mov r1, #0x49 - lsl r1, r1, #2 - ldrb r0, [r4, r1] - cmp r0, #0x1e - bls _02247D12 - ldr r0, _02247D18 ; =0x02257760 - ldr r2, [r0, #4] - ldr r0, _02247D1C ; =0x00000B3B - ldrb r0, [r2, r0] - cmp r0, #0x14 - bne _02247C52 - add r0, r4, #0 - add r0, #0xf8 - sub r1, #0x24 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - bl sub_0200A490 -_02247C52: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x4d - add r3, r2, #0 - bl ov23_02253F60 - mov r0, #0x4a - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #7 - add sp, #0x10 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247C70: - ldr r0, _02247D18 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02247568 - cmp r0, #0 - beq _02247C98 - ldr r0, _02247D20 ; =0x00000127 - ldrb r0, [r4, r0] - cmp r0, #0 - beq _02247C8E - mov r0, #0xb - str r0, [r4, #0] - b _02247C98 -_02247C8E: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02247C98: - mov r0, #0x4a - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0x3c - bge _02247D12 - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0x3c - bne _02247D12 - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_02247CB8: - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_02247CC4: - bl sub_0203608C - ldr r1, _02247D20 ; =0x00000127 - ldrb r1, [r4, r1] - bl ov23_02247DB0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_02247CD4: - ldr r0, _02247D20 ; =0x00000127 - mov r1, #0 - strb r1, [r4, r0] - mov r0, #0x10 - bl sub_0205948C - ldr r0, _02247D24 ; =0x00000126 - ldrb r0, [r4, r0] - bl ov23_022448FC - mov r0, #0x49 - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r4, r0] - mov r0, #0xc - add sp, #0x10 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02247CF8: - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #8 - bls _02247D12 - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02247D12: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247D18: .word 0x02257760 -_02247D1C: .word 0x00000B3B -_02247D20: .word 0x00000127 -_02247D24: .word 0x00000126 - thumb_func_end ov23_02247A8C - - thumb_func_start ov23_02247D28 -ov23_02247D28: ; 0x02247D28 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x13 - mov r0, #4 - lsl r1, r1, #4 - add r6, r2, #0 - bl sub_02018184 - mov r2, #0x13 - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _02247D6C ; =0x00000127 - mov r2, #0x64 - strb r5, [r4, r0] - sub r0, r0, #1 - strb r6, [r4, r0] - ldr r0, _02247D70 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02247D74 ; =ov23_02247A8C - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _02247D70 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02247D6C: .word 0x00000127 -_02247D70: .word 0x02257760 -_02247D74: .word ov23_02247A8C - thumb_func_end ov23_02247D28 - - thumb_func_start ov23_02247D78 -ov23_02247D78: ; 0x02247D78 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02247D9E - ldr r0, _02247DA0 ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - add r2, r6, #0 - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02247D28 -_02247D9E: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02247DA0: .word 0x02257760 - thumb_func_end ov23_02247D78 - - thumb_func_start ov23_02247DA4 -ov23_02247DA4: ; 0x02247DA4 - ldr r3, _02247DAC ; =ov23_0224AD7C - mov r1, #2 - bx r3 - nop -_02247DAC: .word ov23_0224AD7C - thumb_func_end ov23_02247DA4 - - thumb_func_start ov23_02247DB0 -ov23_02247DB0: ; 0x02247DB0 - push {r3, r4, r5, lr} - ldr r0, _02247E30 ; =0x02257760 - add r5, r1, #0 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r1, r0] - cmp r4, #0 - beq _02247E2E - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02247DD8 - bl sub_0207136C - mov r0, #0x45 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_02247DD8: - ldr r0, _02247E34 ; =0x00000127 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _02247DEC - cmp r5, #0 - beq _02247DEC - sub r0, r0, #1 - ldrb r0, [r4, r0] - bl ov23_022448FC -_02247DEC: - add r0, r4, #0 - bl ov23_02247A60 - mov r0, #0xf - bl ov23_02246370 - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - mov r0, #0x10 - bl sub_0205948C - ldr r0, _02247E30 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - ldr r1, _02247E30 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_02247E2E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02247E30: .word 0x02257760 -_02247E34: .word 0x00000127 - thumb_func_end ov23_02247DB0 - - thumb_func_start ov23_02247E38 -ov23_02247E38: ; 0x02247E38 - push {lr} - sub sp, #0x5c - ldr r0, _02247F48 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A450 - ldr r0, _02247F48 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - ldr r0, _02247F48 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - mov r3, #0x17 - str r1, [sp] - sub r2, r1, #1 - str r2, [sp, #4] - str r2, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - lsl r3, r3, #4 - ldr r2, [r0, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r0, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r0, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - add r3, #0x64 - str r2, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r0, r3 - add r2, r1, #0 - add r3, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - ldr r0, _02247F48 ; =0x02257760 - mov r2, #2 - ldr r1, [r0, #4] - lsl r2, r2, #0x10 - ldr r0, [r1, #0x44] - str r0, [sp, #0x2c] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x30] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - lsr r0, r2, #5 - mov r1, #0 - str r2, [sp, #0x34] - str r1, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - add r0, sp, #0x2c - strh r1, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x54] - mov r0, #4 - str r0, [sp, #0x58] - lsl r0, r0, #0x11 - str r0, [sp, #0x34] - mov r0, #0x15 - lsl r0, r0, #0xe - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r1, [sp, #0x50] - bl sub_02021AA0 - ldr r2, _02247F48 ; =0x02257760 - mov r1, #0x7e - ldr r3, [r2, #4] - lsl r1, r1, #2 - str r0, [r3, r1] - ldr r0, [r2, #4] - ldr r0, [r0, r1] - mov r1, #2 - bl sub_02021CF8 - ldr r0, _02247F48 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021D6C - ldr r0, _02247F48 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, _02247F48 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021E50 - ldr r0, _02247F48 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021E80 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x5c - pop {pc} - nop -_02247F48: .word 0x02257760 - thumb_func_end ov23_02247E38 - - thumb_func_start ov23_02247F4C -ov23_02247F4C: ; 0x02247F4C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - add r0, r5, #0 - add r0, #0x28 - ldrb r0, [r0] - mov r4, #0 - cmp r0, #0 - beq _02247F66 - cmp r0, #1 - beq _02247F86 - cmp r0, #2 - b _02248096 -_02247F66: - ldr r0, _022480A8 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022480AC ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0x1f - bne _02247F76 - mov r0, #4 - b _02247F78 -_02247F76: - mov r0, #2 -_02247F78: - str r0, [r5, #0x20] - mov r0, #0 - str r0, [r5, #0x24] - add r0, r5, #0 - mov r1, #1 - add r0, #0x28 - strb r1, [r0] -_02247F86: - ldr r1, _022480B0 ; =0x02257760 - ldr r2, _022480B4 ; =ov23_02246624 - mov r0, #2 - mov r3, #0 - bl sub_02004B70 - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - ldr r0, _022480A8 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022480B8 ; =0x00000B3A - ldrsb r0, [r1, r0] - bl sub_020D4070 - add r6, r0, #0 - ldr r0, [r5, #0x14] - mov r1, #0xa - bl sub_020E1F6C - add r0, r5, r1 - strb r6, [r0, #8] - mov r1, #0 - b _02247FBE -_02247FB6: - add r0, r5, r1 - ldrb r0, [r0, #8] - add r1, r1, #1 - add r4, r4, r0 -_02247FBE: - cmp r1, #0xa - blt _02247FB6 - mov r0, #0x7d - lsl r0, r0, #2 - cmp r4, r0 - ble _02247FD8 - ldr r0, [r5, #0x24] - add r0, r0, #1 - str r0, [r5, #0x24] - ldr r0, _022480BC ; =0x00000628 - bl sub_02005748 - b _02247FE0 -_02247FD8: - add r0, r5, #0 - mov r1, #0 - add r0, #0x28 - strb r1, [r0] -_02247FE0: - ldr r0, [r5, #0x24] - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #9 - bne _02247FF2 - ldr r0, [r5, #0x20] - sub r0, r0, #1 - str r0, [r5, #0x20] -_02247FF2: - ldr r2, [r5, #0x20] - cmp r2, #0 - bne _02248004 - mov r0, #2 - add r5, #0x28 - strb r0, [r5] - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_02248004: - ldr r0, _022480A8 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, _022480AC ; =0x00000B3B - ldrb r0, [r1, r0] - cmp r0, #0x1f - bne _02248034 - cmp r2, #2 - beq _02248028 - cmp r2, #3 - beq _02248022 - cmp r2, #4 - bne _0224802E - mov r4, #1 - lsl r4, r4, #0x1e - b _02248042 -_02248022: - mov r4, #0xff - lsl r4, r4, #0x16 - b _02248042 -_02248028: - mov r4, #0xfe - lsl r4, r4, #0x16 - b _02248042 -_0224802E: - mov r4, #0x3f - lsl r4, r4, #0x18 - b _02248042 -_02248034: - cmp r2, #2 - bne _0224803E - mov r4, #1 - lsl r4, r4, #0x1e - b _02248042 -_0224803E: - mov r4, #0xff - lsl r4, r4, #0x16 -_02248042: - ldr r0, [r5, #0x24] - mov r6, #0 - cmp r0, #0 - beq _0224804C - add r6, r6, #1 -_0224804C: - ldr r0, _022480C0 ; =0x45800000 - add r1, r4, #0 - bl sub_020E18B0 - bl sub_020E1740 - str r0, [sp] - ldr r0, _022480C0 ; =0x45800000 - add r1, r4, #0 - bl sub_020E18B0 - bl sub_020E1740 - str r0, [sp, #4] - ldr r0, _022480C0 ; =0x45800000 - add r1, r4, #0 - bl sub_020E18B0 - bl sub_020E1740 - str r0, [sp, #8] - ldr r0, _022480A8 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl sub_02021C70 - ldr r0, _022480A8 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_02021DCC -_02248096: - ldr r0, _022480A8 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - bl sub_020219F8 - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_022480A8: .word 0x02257760 -_022480AC: .word 0x00000B3B -_022480B0: .word 0x02257760 -_022480B4: .word ov23_02246624 -_022480B8: .word 0x00000B3A -_022480BC: .word 0x00000628 -_022480C0: .word 0x45800000 - thumb_func_end ov23_02247F4C - - thumb_func_start ov23_022480C4 -ov23_022480C4: ; 0x022480C4 - push {r4, lr} - sub sp, #0x10 - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0xc - bls _022480D2 - b _02248304 -_022480D2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022480DE: ; jump table - .short _022480F8 - _022480DE - 2 ; case 0 - .short _02248110 - _022480DE - 2 ; case 1 - .short _0224815C - _022480DE - 2 ; case 2 - .short _02248192 - _022480DE - 2 ; case 3 - .short _022481DE - _022480DE - 2 ; case 4 - .short _0224821C - _022480DE - 2 ; case 5 - .short _0224822C - _022480DE - 2 ; case 6 - .short _0224825A - _022480DE - 2 ; case 7 - .short _022482B0 - _022480DE - 2 ; case 8 - .short _022482BC - _022480DE - 2 ; case 9 - .short _02248304 - _022480DE - 2 ; case 10 - .short _022482CC - _022480DE - 2 ; case 11 - .short _022482F0 - _022480DE - 2 ; case 12 -_022480F8: - bl ov23_02244C10 - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0x24] - bl ov23_02246324 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02248110: - mov r0, #1 - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - ldr r0, _02248308 ; =0x02257760 - ldr r1, _0224830C ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1f - bne _0224812E - mov r2, #0x16 - b _02248130 -_0224812E: - mov r2, #0x19 -_02248130: - mov r3, #0 - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x17 - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_0200985C - ldr r1, _02248308 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_0224815C: - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, _02248308 ; =0x02257760 - mov r2, #0x13 - ldr r1, [r0, #4] - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0x32 - bl sub_020098B8 - ldr r1, _02248308 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_02248192: - mov r0, #1 - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - ldr r0, _02248308 ; =0x02257760 - ldr r1, _0224830C ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1f - bne _022481B0 - mov r2, #0x15 - b _022481B2 -_022481B0: - mov r2, #0x18 -_022481B2: - mov r3, #0 - str r3, [sp] - mov r1, #2 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x5e - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02248308 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_022481DE: - ldr r0, _02248308 ; =0x02257760 - ldr r1, _0224830C ; =0x00000B3B - ldr r0, [r0, #4] - ldrb r1, [r0, r1] - cmp r1, #0x1f - bne _022481EE - mov r2, #0x14 - b _022481F0 -_022481EE: - mov r2, #0x17 -_022481F0: - mov r3, #0 - str r3, [sp] - mov r1, #3 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x5f - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0x32 - bl sub_02009918 - ldr r1, _02248308 ; =0x02257760 - add sp, #0x10 - ldr r2, [r1, #4] - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_0224821C: - add r0, r4, #0 - bl ov23_02247E38 - ldr r0, [r4, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, pc} -_0224822C: - ldr r0, [r4, #0x24] - add r0, r0, #1 - str r0, [r4, #0x24] - cmp r0, #0x1e - ble _02248304 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x4c - add r3, r2, #0 - bl ov23_02253F60 - mov r1, #3 - ldr r0, _02248310 ; =0x0400006C - mvn r1, r1 - bl sub_020BDEC4 - mov r0, #7 - str r0, [r4, #0] - mov r0, #0 - add sp, #0x10 - str r0, [r4, #0x2c] - pop {r4, pc} -_0224825A: - mov r0, #7 - str r0, [sp] - ldr r0, _02248314 ; =0x04000050 - mov r1, #0x10 - mov r2, #1 - mov r3, #0xe - bl sub_020BF55C - ldr r0, _02248308 ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02247F4C - cmp r0, #0 - beq _02248296 - add r0, r4, #0 - add r0, #0x2a - ldrb r0, [r0] - cmp r0, #0 - beq _0224828C - mov r0, #0xb - str r0, [r4, #0] - b _02248296 -_0224828C: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02248296: - ldr r0, [r4, #0x2c] - cmp r0, #0x3c - bge _02248304 - add r0, r0, #1 - str r0, [r4, #0x2c] - cmp r0, #0x3c - bne _02248304 - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r4, pc} -_022482B0: - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x10 - pop {r4, pc} -_022482BC: - bl sub_0203608C - add r4, #0x2a - ldrb r1, [r4] - bl ov23_0224839C - add sp, #0x10 - pop {r4, pc} -_022482CC: - mov r0, #0x10 - bl sub_0205948C - add r0, r4, #0 - mov r1, #0 - add r0, #0x2a - strb r1, [r0] - add r0, r4, #0 - add r0, #0x29 - ldrb r0, [r0] - bl ov23_022448FC - mov r0, #0 - str r0, [r4, #0x24] - mov r0, #0xc - add sp, #0x10 - str r0, [r4, #0] - pop {r4, pc} -_022482F0: - ldr r0, [r4, #0x24] - add r0, r0, #1 - str r0, [r4, #0x24] - cmp r0, #8 - ble _02248304 - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02248304: - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_02248308: .word 0x02257760 -_0224830C: .word 0x00000B3B -_02248310: .word 0x0400006C -_02248314: .word 0x04000050 - thumb_func_end ov23_022480C4 - - thumb_func_start ov23_02248318 -ov23_02248318: ; 0x02248318 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r0, #4 - mov r1, #0x30 - add r6, r2, #0 - bl sub_02018184 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x30 - bl sub_020C4CF4 - add r0, r4, #0 - add r0, #0x2a - strb r5, [r0] - add r0, r4, #0 - add r0, #0x29 - strb r6, [r0] - ldr r0, _0224835C ; =0x02257760 - mov r2, #0x64 - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _02248360 ; =ov23_022480C4 - add r1, r4, #0 - bl sub_0200D9E8 - ldr r1, _0224835C ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224835C: .word 0x02257760 -_02248360: .word ov23_022480C4 - thumb_func_end ov23_02248318 - - thumb_func_start ov23_02248364 -ov23_02248364: ; 0x02248364 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _0224838A - ldr r0, _0224838C ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - add r2, r6, #0 - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02248318 -_0224838A: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224838C: .word 0x02257760 - thumb_func_end ov23_02248364 - - thumb_func_start ov23_02248390 -ov23_02248390: ; 0x02248390 - ldr r3, _02248398 ; =ov23_0224AD7C - mov r1, #2 - bx r3 - nop -_02248398: .word ov23_0224AD7C - thumb_func_end ov23_02248390 - - thumb_func_start ov23_0224839C -ov23_0224839C: ; 0x0224839C - push {r4, lr} - ldr r0, _02248410 ; =0x02257760 - ldr r2, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r2, r0] - cmp r4, #0 - beq _0224840C - add r0, r4, #0 - add r0, #0x2a - ldrb r0, [r0] - cmp r0, #0 - beq _022483C4 - cmp r1, #0 - beq _022483C4 - add r0, r4, #0 - add r0, #0x29 - ldrb r0, [r0] - bl ov23_022448FC -_022483C4: - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _02248414 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, #0x1c - bl sub_020BDEC4 - mov r0, #1 - bl ov23_02246370 - mov r0, #0x10 - bl sub_0205948C - ldr r0, _02248410 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - ldr r1, _02248410 ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_0224840C: - pop {r4, pc} - nop -_02248410: .word 0x02257760 -_02248414: .word 0x04000050 - thumb_func_end ov23_0224839C - - thumb_func_start ov23_02248418 -ov23_02248418: ; 0x02248418 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0] - cmp r1, #0xc - bhi _02248524 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02248430: ; jump table - .short _0224844A - _02248430 - 2 ; case 0 - .short _0224845E - _02248430 - 2 ; case 1 - .short _02248476 - _02248430 - 2 ; case 2 - .short _0224847E - _02248430 - 2 ; case 3 - .short _02248496 - _02248430 - 2 ; case 4 - .short _0224849E - _02248430 - 2 ; case 5 - .short _022484A6 - _02248430 - 2 ; case 6 - .short _022484CA - _02248430 - 2 ; case 7 - .short _02248524 - _02248430 - 2 ; case 8 - .short _022484E6 - _02248430 - 2 ; case 9 - .short _02248524 - _02248430 - 2 ; case 10 - .short _022484F4 - _02248430 - 2 ; case 11 - .short _02248510 - _02248430 - 2 ; case 12 -_0224844A: - bl ov23_02244C10 - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_0224845E: - mov r0, #1 - str r0, [sp] - mov r1, #0xa - mov r2, #0 - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_02248476: - add r0, r1, #1 - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_0224847E: - mov r0, #1 - str r0, [sp] - mov r1, #0 - mov r2, #0xa - add r3, r0, #0 - bl sub_0200AAE0 - ldr r0, [r4, #0] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, pc} -_02248496: - add r0, r1, #1 - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_0224849E: - add r0, r1, #1 - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_022484A6: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0x1e - ble _02248524 - bl ov23_0224219C - bl ov23_02254044 - mov r1, #3 - ldr r0, _02248528 ; =0x0400006C - mvn r1, r1 - bl sub_020BDEC4 - mov r0, #7 - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_022484CA: - ldrb r0, [r4, #0x11] - cmp r0, #0 - beq _022484D8 - mov r0, #0xb - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_022484D8: - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_022484E6: - bl sub_0203608C - ldrb r1, [r4, #0x11] - bl ov23_022485A8 - add sp, #4 - pop {r3, r4, pc} -_022484F4: - mov r0, #0x10 - bl sub_0205948C - mov r0, #0 - strb r0, [r4, #0x11] - ldrb r0, [r4, #0x10] - bl ov23_022448FC - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #0xc - add sp, #4 - str r0, [r4, #0] - pop {r3, r4, pc} -_02248510: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #8 - ble _02248524 - mov r0, #0x29 - bl sub_020360DC - mov r0, #8 - str r0, [r4, #0] -_02248524: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02248528: .word 0x0400006C - thumb_func_end ov23_02248418 - - thumb_func_start ov23_0224852C -ov23_0224852C: ; 0x0224852C - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r0, #4 - mov r1, #0x14 - add r6, r2, #0 - bl sub_02018184 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - strb r5, [r4, #0x11] - ldr r0, _02248568 ; =0x02257760 - strb r6, [r4, #0x10] - ldr r1, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - str r4, [r1, r0] - ldr r0, _0224856C ; =ov23_02248418 - add r1, r4, #0 - mov r2, #0x64 - bl sub_0200D9E8 - ldr r1, _02248568 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0xa3 - lsl r1, r1, #2 - str r0, [r2, r1] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02248568: .word 0x02257760 -_0224856C: .word ov23_02248418 - thumb_func_end ov23_0224852C - - thumb_func_start ov23_02248570 -ov23_02248570: ; 0x02248570 - push {r4, r5, r6, lr} - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - add r6, r2, #0 - bl ov23_0224AD7C - bl sub_0203608C - cmp r5, r0 - bne _02248596 - ldr r0, _02248598 ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - add r2, r6, #0 - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_0224852C -_02248596: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02248598: .word 0x02257760 - thumb_func_end ov23_02248570 - - thumb_func_start ov23_0224859C -ov23_0224859C: ; 0x0224859C - ldr r3, _022485A4 ; =ov23_0224AD7C - mov r1, #2 - bx r3 - nop -_022485A4: .word ov23_0224AD7C - thumb_func_end ov23_0224859C - - thumb_func_start ov23_022485A8 -ov23_022485A8: ; 0x022485A8 - push {r4, lr} - ldr r0, _0224860C ; =0x02257760 - ldr r2, [r0, #4] - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r4, [r2, r0] - cmp r4, #0 - beq _0224860A - ldrb r0, [r4, #0x11] - cmp r0, #0 - beq _022485C8 - cmp r1, #0 - beq _022485C8 - ldrb r0, [r4, #0x10] - bl ov23_022448FC -_022485C8: - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - ldr r0, _02248610 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, #0x1c - bl sub_020BDEC4 - mov r0, #0x10 - bl sub_0205948C - ldr r0, _0224860C ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - ldr r1, _0224860C ; =0x02257760 - mov r0, #0xa3 - ldr r2, [r1, #4] - mov r3, #0 - lsl r0, r0, #2 - str r3, [r2, r0] - ldr r1, [r1, #4] - add r0, #0x10 - str r3, [r1, r0] -_0224860A: - pop {r4, pc} - ; .align 2, 0 -_0224860C: .word 0x02257760 -_02248610: .word 0x04000050 - thumb_func_end ov23_022485A8 - - thumb_func_start ov23_02248614 -ov23_02248614: ; 0x02248614 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - ldr r0, [r1, #0x28] - str r1, [sp, #0x10] - lsl r0, r0, #0xc - str r0, [sp, #0x1c] - add r0, r1, #0 - ldr r0, [r0, #0x2c] - lsl r0, r0, #0xc - str r0, [sp, #0x20] - ldr r0, _02248740 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x1c - bl sub_02021C50 - ldr r0, [sp, #0x10] - mov r1, #0xa - ldr r0, [r0, #0x30] - lsl r0, r0, #0xc - bl sub_020E1F6C - str r0, [sp, #0x1c] - str r0, [sp, #0x24] - str r0, [sp, #0x20] - ldr r0, _02248740 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x1c - bl sub_02021C70 - ldr r0, _02248740 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021FE0 - mov r1, #0x10 - ldr r3, [sp, #0x10] - str r1, [sp] - ldr r4, [r3, #0x30] - ldr r0, _02248744 ; =0x04000050 - lsr r3, r4, #0x1f - add r3, r4, r3 - asr r3, r3, #1 - mov r2, #1 - sub r3, r1, r3 - bl sub_020BF55C - mov r0, #0 - ldr r7, [sp, #0x10] - str r0, [sp, #0xc] - str r0, [sp, #8] -_0224868A: - ldr r0, [r7, #0x14] - mov r4, #0 - cmp r0, #0 - ble _0224870A - ldr r0, [sp, #8] - add r5, r4, #0 - lsl r0, r0, #2 - str r0, [sp, #4] -_0224869A: - ldr r0, [r7, #8] - ldrb r6, [r0, r4] - ldr r0, [sp, #0x10] - ldr r0, [r0, #0x20] - lsr r2, r6, #0x1f - lsl r1, r6, #0x1c - sub r3, r0, #6 - sub r1, r1, r2 - mov r0, #0x1c - ror r1, r0 - add r0, r2, r1 - add r0, r3, r0 - lsl r1, r0, #0x10 - mov r0, #2 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x10] - add r2, sp, #0x14 - ldr r0, [r0, #0x24] - sub r1, r0, #6 - lsr r0, r6, #4 - add r0, r1, r0 - lsl r1, r0, #0x10 - mov r0, #2 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x24] - add r0, sp, #0x1c - add r1, sp, #0x18 - bl sub_020B2B2C - ldr r0, [sp, #0x18] - lsl r0, r0, #0xc - str r0, [sp, #0x1c] - ldr r0, [sp, #0x14] - lsl r0, r0, #0xc - str r0, [sp, #0x20] - ldr r0, _02248740 ; =0x02257760 - ldr r1, [r0, #4] - ldr r0, [sp, #4] - add r0, r0, r1 - add r1, r5, r0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0x1c - bl sub_02021C50 - ldr r0, [r7, #0x14] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _0224869A -_0224870A: - ldr r0, [sp, #8] - add r7, r7, #4 - add r0, #8 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #3 - blt _0224868A - ldr r0, [sp, #0x10] - ldr r0, [r0, #0x30] - add r1, r0, #1 - ldr r0, [sp, #0x10] - cmp r1, #0x14 - str r1, [r0, #0x30] - ble _02248730 - add sp, #0x28 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02248730: - ldr r0, _02248740 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - bl sub_020219F8 - mov r0, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248740: .word 0x02257760 -_02248744: .word 0x04000050 - thumb_func_end ov23_02248614 - - thumb_func_start ov23_02248748 -ov23_02248748: ; 0x02248748 - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - ldr r0, _02248880 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A450 - ldr r0, _02248880 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A640 - ldr r0, _02248880 ; =0x02257760 - mov r1, #0 - ldr r0, [r0, #4] - mov r3, #6 - str r1, [sp] - sub r2, r1, #1 - str r2, [sp, #4] - str r2, [sp, #8] - str r1, [sp, #0xc] - str r1, [sp, #0x10] - lsl r3, r3, #6 - ldr r2, [r0, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r0, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r0, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - add r3, #0x54 - str r2, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r0, r3 - add r2, r1, #0 - add r3, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - ldr r6, _02248880 ; =0x02257760 - mov r4, #0 - ldr r1, [r6, #4] - mov r7, #0x4b - ldr r0, [r1, #0x44] - add r5, r4, #0 - str r0, [sp, #0x2c] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x30] - mov r1, #2 - mov r0, #6 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - lsr r0, r1, #5 - str r1, [sp, #0x34] - str r4, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - add r0, sp, #0x2c - strh r4, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x54] - mov r0, #4 - str r4, [sp, #0x50] - str r0, [sp, #0x58] - lsl r7, r7, #0xe -_022487E4: - add r0, sp, #0x2c - str r7, [sp, #0x34] - str r7, [sp, #0x38] - bl sub_02021AA0 - ldr r1, [r6, #4] - add r2, r1, r5 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r2, r1] - cmp r4, #0 - bne _0224881E - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_02021CF8 - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021D6C - b _02248842 -_0224881E: - cmp r4, #9 - ldr r0, [r6, #4] - bge _02248834 - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021D6C - b _02248842 -_02248834: - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - bl sub_02021D6C -_02248842: - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021E50 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x19 - blt _022487E4 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_02248880: .word 0x02257760 - thumb_func_end ov23_02248748 - - thumb_func_start ov23_02248884 -ov23_02248884: ; 0x02248884 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r1, #0 - str r0, [sp, #4] - ldr r0, [r7, #0] - cmp r0, #9 - bls _02248894 - b _022489E0 -_02248894: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022488A0: ; jump table - .short _022488B4 - _022488A0 - 2 ; case 0 - .short _022489E0 - _022488A0 - 2 ; case 1 - .short _022489E0 - _022488A0 - 2 ; case 2 - .short _022489E0 - _022488A0 - 2 ; case 3 - .short _022489E0 - _022488A0 - 2 ; case 4 - .short _02248930 - _022488A0 - 2 ; case 5 - .short _022489E0 - _022488A0 - 2 ; case 6 - .short _0224893E - _022488A0 - 2 ; case 7 - .short _022489E0 - _022488A0 - 2 ; case 8 - .short _02248956 - _022488A0 - 2 ; case 9 -_022488B4: - mov r0, #7 - str r0, [sp] - ldr r0, _022489E4 ; =0x04000050 - mov r1, #0x10 - mov r2, #1 - mov r3, #0xe - bl sub_020BF55C - mov r1, #0xef - ldr r0, _022489E8 ; =0x04000040 - lsl r1, r1, #8 - strh r1, [r0] - mov r1, #0x10 - add r3, r0, #0 - strh r1, [r0, #4] - add r3, #8 - ldrh r4, [r3] - mov r1, #0x3f - mov r2, #0x1f - bic r4, r1 - orr r4, r2 - add r0, #0xa - strh r4, [r3] - ldrh r3, [r0] - bic r3, r1 - orr r2, r3 - mov r1, #0x20 - orr r2, r1 - strh r2, [r0] - lsl r3, r1, #0x15 - ldr r2, [r3, #0] - ldr r0, _022489EC ; =0xFFFF1FFF - and r2, r0 - lsl r0, r1, #8 - orr r0, r2 - str r0, [r3, #0] - bl sub_020594FC - ldr r0, _022489F0 ; =0x0000054A - bl sub_02005748 - ldr r1, _022489F4 ; =0x02257760 - mov r0, #0x20 - ldr r1, [r1, #4] - mov r2, #4 - add r1, #0x48 - bl sub_020095C4 - ldr r1, _022489F4 ; =0x02257760 - ldr r2, [r1, #4] - str r0, [r2, #0x44] - ldr r0, [r1, #4] - mov r2, #6 - add r0, #0x48 - mov r1, #0 - lsl r2, r2, #0x12 - bl sub_0200964C - mov r0, #5 - add sp, #8 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} -_02248930: - add r0, r7, #0 - bl ov23_02248748 - mov r0, #7 - add sp, #8 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} -_0224893E: - ldr r0, _022489F4 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x40] - ldr r0, [r0, #8] - bl ov23_02248614 - cmp r0, #0 - beq _022489E0 - mov r0, #9 - add sp, #8 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} -_02248956: - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _022489EC ; =0xFFFF1FFF - and r1, r2 - add r2, r0, #0 - str r1, [r0, #0] - mov r1, #0 - add r2, #0x50 - add r0, #0x6c - strh r1, [r2] - bl sub_020BDEC4 - ldr r0, _022489F4 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0200A4E4 - ldr r0, _022489F4 ; =0x02257760 - ldr r1, [r0, #4] - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0200A6DC - mov r4, #0 - ldr r6, _022489F4 ; =0x02257760 - add r5, r4, #0 -_02248992: - ldr r0, [r6, #4] - add r1, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022489A4 - bl sub_02021BD4 -_022489A4: - ldr r0, [r6, #4] - mov r1, #0 - add r2, r0, r5 - mov r0, #0x7e - lsl r0, r0, #2 - add r4, r4, #1 - add r5, r5, #4 - str r1, [r2, r0] - cmp r4, #0x19 - blt _02248992 - ldr r0, _022489F4 ; =0x02257760 - ldr r0, [r0, #4] - ldr r0, [r0, #0x44] - bl sub_02021964 - ldr r0, [sp, #4] - bl sub_0200DA58 - add r0, r7, #0 - bl sub_020181C4 - ldr r0, _022489F4 ; =0x02257760 - mov r2, #0 - ldr r1, [r0, #4] - mov r0, #0x29 - lsl r0, r0, #4 - str r2, [r1, r0] - mov r0, #0x80 - bl sub_0205948C -_022489E0: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022489E4: .word 0x04000050 -_022489E8: .word 0x04000040 -_022489EC: .word 0xFFFF1FFF -_022489F0: .word 0x0000054A -_022489F4: .word 0x02257760 - thumb_func_end ov23_02248884 - - thumb_func_start ov23_022489F8 -ov23_022489F8: ; 0x022489F8 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _02248A64 ; =0x02257760 - add r5, r1, #0 - ldr r1, [r0, #4] - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - bne _02248A62 - mov r0, #4 - mov r1, #0x34 - bl sub_02018184 - mov r1, #0 - mov r2, #0x34 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #0x30] - str r5, [r4, #0x20] - str r6, [r4, #0x24] - ldr r0, [sp, #0x18] - str r7, [r4, #0x28] - str r0, [r4, #0x2c] - ldr r0, [sp, #0x1c] - add r1, r4, #0 - str r0, [r4, #8] - ldr r0, [sp, #0x24] - mov r2, #0x64 - str r0, [r4, #0xc] - ldr r0, [sp, #0x2c] - str r0, [r4, #0x10] - ldr r0, [sp, #0x20] - str r0, [r4, #0x14] - ldr r0, [sp, #0x28] - str r0, [r4, #0x18] - ldr r0, [sp, #0x30] - str r0, [r4, #0x1c] - ldr r0, _02248A68 ; =ov23_02248884 - bl sub_0200D9E8 - ldr r1, _02248A64 ; =0x02257760 - ldr r2, [r1, #4] - mov r1, #0x29 - lsl r1, r1, #4 - str r0, [r2, r1] - mov r0, #0x80 - bl sub_02059464 -_02248A62: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248A64: .word 0x02257760 -_02248A68: .word ov23_02248884 - thumb_func_end ov23_022489F8 - - thumb_func_start ov23_02248A6C -ov23_02248A6C: ; 0x02248A6C - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, _02248B38 ; =0x02257760 - add r6, r0, #0 - ldr r1, [r1, #4] - cmp r1, #0 - bne _02248A86 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_02248A86: - ldr r5, [r4, #8] - add r0, r5, #0 - bl sub_02059444 - add r1, r0, #0 - ldr r0, [r4, #0] - cmp r0, #1 - beq _02248A9E - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - bne _02248AC2 -_02248A9E: - ldr r2, _02248B38 ; =0x02257760 - lsl r1, r5, #2 - ldr r3, [r2, #4] - mov r0, #0 - str r0, [r3, r1] - ldr r2, [r2, #4] - add r1, r2, r1 - str r0, [r1, #0x20] - add r0, r6, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_02058BE8 - pop {r4, r5, r6, pc} -_02248AC2: - ldr r0, [r4, #0xc] - cmp r0, #0xe - bhi _02248AF4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02248AD4: ; jump table - .short _02248AF4 - _02248AD4 - 2 ; case 0 - .short _02248AF2 - _02248AD4 - 2 ; case 1 - .short _02248AF2 - _02248AD4 - 2 ; case 2 - .short _02248AF2 - _02248AD4 - 2 ; case 3 - .short _02248AF2 - _02248AD4 - 2 ; case 4 - .short _02248AF2 - _02248AD4 - 2 ; case 5 - .short _02248AF2 - _02248AD4 - 2 ; case 6 - .short _02248AF2 - _02248AD4 - 2 ; case 7 - .short _02248AF2 - _02248AD4 - 2 ; case 8 - .short _02248AF4 - _02248AD4 - 2 ; case 9 - .short _02248AF4 - _02248AD4 - 2 ; case 10 - .short _02248AF4 - _02248AD4 - 2 ; case 11 - .short _02248AF4 - _02248AD4 - 2 ; case 12 - .short _02248AF2 - _02248AD4 - 2 ; case 13 - .short _02248AF2 - _02248AD4 - 2 ; case 14 -_02248AF2: - pop {r4, r5, r6, pc} -_02248AF4: - ldr r0, [r4, #4] - add r0, r0, #1 - lsr r3, r0, #0x1f - lsl r2, r0, #0x1d - str r0, [r4, #4] - sub r2, r2, r3 - mov r0, #0x1d - ror r2, r0 - add r0, r3, r2 - bne _02248B34 - cmp r1, #3 - bhi _02248B2E - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02248B18: ; jump table - .short _02248B20 - _02248B18 - 2 ; case 0 - .short _02248B24 - _02248B18 - 2 ; case 1 - .short _02248B28 - _02248B18 - 2 ; case 2 - .short _02248B2C - _02248B18 - 2 ; case 3 -_02248B20: - mov r1, #3 - b _02248B2E -_02248B24: - mov r1, #2 - b _02248B2E -_02248B28: - mov r1, #0 - b _02248B2E -_02248B2C: - mov r1, #1 -_02248B2E: - add r0, r5, #0 - bl sub_02059424 -_02248B34: - pop {r4, r5, r6, pc} - nop -_02248B38: .word 0x02257760 - thumb_func_end ov23_02248A6C - - thumb_func_start ov23_02248B3C -ov23_02248B3C: ; 0x02248B3C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _02248B8C ; =0x02257760 - add r7, r1, #0 - ldr r1, [r0, #4] - cmp r1, #0 - beq _02248B88 - ldr r0, _02248B90 ; =0x00000B46 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _02248B88 - lsl r5, r6, #2 - ldr r4, [r1, r5] - cmp r4, #0 - bne _02248B84 - mov r0, #4 - mov r1, #0x10 - bl sub_02018184 - mov r1, #0 - mov r2, #0x10 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _02248B8C ; =0x02257760 - add r1, r4, #0 - ldr r0, [r0, #4] - mov r2, #0x64 - str r4, [r0, r5] - ldr r0, _02248B94 ; =ov23_02248A6C - bl sub_0200D9E8 - ldr r1, _02248B8C ; =0x02257760 - ldr r1, [r1, #4] - add r1, r1, r5 - str r0, [r1, #0x20] -_02248B84: - str r6, [r4, #8] - str r7, [r4, #0xc] -_02248B88: - pop {r3, r4, r5, r6, r7, pc} - nop -_02248B8C: .word 0x02257760 -_02248B90: .word 0x00000B46 -_02248B94: .word ov23_02248A6C - thumb_func_end ov23_02248B3C - - thumb_func_start ov23_02248B98 -ov23_02248B98: ; 0x02248B98 - push {r3, r4, r5, lr} - ldr r1, _02248BCC ; =0x02257760 - add r5, r0, #0 - ldr r1, [r1, #4] - lsl r4, r5, #2 - ldr r1, [r1, r4] - cmp r1, #0 - beq _02248BC8 - bl ov23_0224B040 - ldr r0, _02248BCC ; =0x02257760 - mov r2, #1 - ldr r1, [r0, #4] - ldr r1, [r1, r4] - str r2, [r1, #0] - ldr r1, [r0, #4] - mov r2, #0 - str r2, [r1, r4] - ldr r0, [r0, #4] - add r0, r0, r4 - str r2, [r0, #0x20] - add r0, r5, #0 - bl sub_02058BE8 -_02248BC8: - pop {r3, r4, r5, pc} - nop -_02248BCC: .word 0x02257760 - thumb_func_end ov23_02248B98 - - thumb_func_start ov23_02248BD0 -ov23_02248BD0: ; 0x02248BD0 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - ldr r4, _02248C04 ; =0x02257760 - add r5, r6, #0 - add r7, r6, #0 -_02248BDA: - ldr r0, [r4, #4] - add r0, r0, r5 - ldr r0, [r0, #0x20] - cmp r0, #0 - beq _02248BFA - bl sub_0200DA58 - ldr r0, [r4, #4] - ldr r0, [r0, r5] - bl sub_020181C4 - ldr r0, [r4, #4] - add r0, r0, r5 - str r7, [r0, #0x20] - ldr r0, [r4, #4] - str r7, [r0, r5] -_02248BFA: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #8 - blt _02248BDA - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248C04: .word 0x02257760 - thumb_func_end ov23_02248BD0 - - thumb_func_start ov23_02248C08 -ov23_02248C08: ; 0x02248C08 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp] - add r5, r0, #0 - str r2, [sp, #4] - add r0, r3, #0 - mov r1, #0x24 - str r3, [sp, #8] - bl sub_02018144 - str r0, [sp, #0xc] - mov r1, #0 - mov r2, #0x24 - bl sub_020C4CF4 - ldr r1, [sp, #0x28] - ldr r0, [sp, #0xc] - cmp r1, #0 - str r1, [r0, #0] - beq _02248C7E - ldr r1, [sp, #0x2c] - str r1, [r0, #4] - ldr r1, [sp, #0x30] - strb r1, [r0, #0x1e] - ldr r0, [sp, #8] - bl sub_020149F0 - ldr r1, [sp, #0xc] - str r0, [r1, #0x10] - ldr r1, _02248CA0 ; =0x0008090F - bl sub_02014A40 - ldr r1, [sp, #8] - ldr r0, [sp, #0xc] - strb r1, [r0, #0x1d] - ldr r1, [sp, #0xc] - ldrh r0, [r5, #0x10] - ldrb r1, [r1, #0x1d] - bl sub_02013A04 - add r7, r0, #0 - ldrh r0, [r5, #0x10] - mov r6, #0 - cmp r0, #0 - ble _02248C78 - add r4, r6, #0 -_02248C64: - ldr r1, [r5, #0] - add r0, r7, #0 - add r1, r1, r4 - bl sub_02013A90 - ldrh r0, [r5, #0x10] - add r6, r6, #1 - add r4, #8 - cmp r6, r0 - blt _02248C64 -_02248C78: - ldr r0, [sp, #0xc] - str r7, [r5, #0] - str r7, [r0, #8] -_02248C7E: - ldr r1, [sp] - ldr r0, [sp, #4] - add r1, r1, r0 - ldr r0, [sp, #0xc] - strh r1, [r0, #0x20] - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r5, #0 - bl sub_0200112C - ldr r1, [sp, #0xc] - str r0, [r1, #0xc] - add r0, r1, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248CA0: .word 0x0008090F - thumb_func_end ov23_02248C08 - - thumb_func_start ov23_02248CA4 -ov23_02248CA4: ; 0x02248CA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r7, r1, #0 - ldrh r1, [r4, #0x14] - ldrh r0, [r4, #0x16] - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldr r0, [r4, #0xc] - mov r1, #3 - bl sub_02001504 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldrh r0, [r4, #0x18] - cmp r0, r5 - bne _02248CD0 - ldrh r0, [r4, #0x1a] - cmp r0, r7 - beq _02248D1A -_02248CD0: - strh r5, [r4, #0x18] - add r0, r5, r1 - strh r7, [r4, #0x1a] - cmp r0, r6 - blt _02248D1A - cmp r5, r6 - bhi _02248D1A - ldr r0, [r4, #0xc] - mov r1, #7 - bl sub_02001504 - str r0, [sp] - ldr r0, [r4, #0xc] - mov r1, #9 - bl sub_02001504 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, [r4, #0xc] - mov r1, #8 - bl sub_02001504 - str r0, [sp, #4] - sub r0, r6, r5 - add r5, r7, #0 - mul r5, r0 - ldr r0, [r4, #0xc] - mov r1, #0x12 - bl sub_02001504 - ldr r3, [sp, #4] - add r1, r0, #0 - ldr r0, [r4, #0x10] - ldr r2, [sp] - add r3, r5, r3 - bl sub_02014A58 -_02248D1A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02248CA4 - - thumb_func_start ov23_02248D20 -ov23_02248D20: ; 0x02248D20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0xc] - str r0, [sp, #4] - ldr r0, [r5, #0] - cmp r0, #0 - beq _02248D6A - ldr r0, [sp, #4] - mov r1, #2 - bl sub_02001504 - add r7, r0, #0 - add r1, sp, #0xc - ldr r0, [sp, #4] - add r1, #2 - add r2, sp, #0xc - bl sub_020014DC - ldrb r0, [r5, #0x1c] - cmp r0, #0 - bne _02248D4E - b _02248E6C -_02248D4E: - add r1, sp, #0xc - ldrh r0, [r1, #2] - ldrh r1, [r1] - add r2, r5, #0 - bl ov23_02248CA4 - ldr r0, _02248EF0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _02248D6C - mov r0, #4 - tst r0, r1 - bne _02248D6C -_02248D6A: - b _02248EAA -_02248D6C: - ldr r0, _02248EF4 ; =0x000005DC - bl sub_02005748 - add r0, sp, #0xc - ldrh r1, [r0, #2] - ldrh r0, [r0] - add r2, r1, r0 - sub r0, r7, #1 - cmp r0, r2 - bne _02248D88 - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02248D88: - ldrh r1, [r5, #0x14] - ldrh r0, [r5, #0x16] - add r1, r1, r0 - cmp r2, r1 - bne _02248D9A - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02248D9A: - ldr r0, [r5, #4] - ldr r3, [r5, #0] - blx r3 - ldrb r1, [r5, #0x1d] - add r0, r7, #0 - bl sub_02013A04 - mov r4, #0 - add r6, r4, #0 - str r0, [sp] - cmp r7, #0 - ble _02248DF0 -_02248DB2: - ldrh r1, [r5, #0x14] - ldrh r0, [r5, #0x16] - add r0, r1, r0 - cmp r6, r0 - bne _02248DBE - b _02248DCA -_02248DBE: - ldr r2, [r5, #8] - lsl r1, r4, #3 - ldr r0, [sp] - add r1, r2, r1 - bl sub_02013A90 -_02248DCA: - add r0, sp, #0xc - ldrh r1, [r0, #2] - ldrh r0, [r0] - add r4, r4, #1 - add r0, r1, r0 - cmp r6, r0 - bne _02248DEA - ldrh r2, [r5, #0x14] - ldrh r1, [r5, #0x16] - ldr r3, [r5, #8] - ldr r0, [sp] - add r1, r2, r1 - lsl r1, r1, #3 - add r1, r3, r1 - bl sub_02013A90 -_02248DEA: - add r6, r6, #1 - cmp r6, r7 - blt _02248DB2 -_02248DF0: - ldrb r0, [r5, #0x1e] - cmp r0, #0 - beq _02248E34 - sub r0, r7, #1 - mov r4, #0 - str r0, [sp, #8] - cmp r0, #0 - ble _02248E26 - ldr r6, [sp] - add r7, r4, #0 -_02248E04: - ldr r0, [r5, #4] - add r1, r4, #0 - bl sub_02028AFC - cmp r0, #0 - bne _02248E14 - mov r0, #1 - b _02248E16 -_02248E14: - mov r0, #0 -_02248E16: - add r0, r7, r0 - str r0, [r6, #4] - ldr r0, [sp, #8] - add r4, r4, #1 - add r7, r7, #2 - add r6, #8 - cmp r4, r0 - blt _02248E04 -_02248E26: - lsl r0, r4, #1 - add r2, r0, #1 - ldr r0, [sp] - lsl r1, r4, #3 - add r0, r0, r1 - str r2, [r0, #4] - b _02248E48 -_02248E34: - sub r0, r7, #1 - mov r2, #0 - cmp r0, #0 - ble _02248E48 - ldr r1, [sp] -_02248E3E: - str r2, [r1, #4] - add r2, r2, #1 - add r1, #8 - cmp r2, r0 - blt _02248E3E -_02248E48: - ldr r0, [r5, #8] - bl sub_020181C4 - ldr r0, [sp] - ldr r1, [sp] - str r0, [r5, #8] - ldr r0, [sp, #4] - bl sub_020015CC - mov r0, #0 - strb r0, [r5, #0x1c] - ldr r0, [sp, #4] - bl sub_020013AC - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02248E6C: - ldr r0, _02248EF0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #4 - tst r0, r1 - beq _02248EAA - ldr r0, _02248EF4 ; =0x000005DC - bl sub_02005748 - add r0, sp, #0xc - ldrh r3, [r0, #2] - ldrh r1, [r0] - sub r2, r7, #1 - add r1, r3, r1 - cmp r2, r1 - bne _02248E92 - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02248E92: - strh r3, [r5, #0x14] - ldrh r1, [r0] - add sp, #0x10 - strh r1, [r5, #0x16] - ldrh r1, [r0, #2] - strh r1, [r5, #0x18] - ldrh r0, [r0] - strh r0, [r5, #0x1a] - mov r0, #1 - strb r0, [r5, #0x1c] - sub r0, r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_02248EAA: - ldr r0, [sp, #4] - bl sub_02001288 - add r4, r0, #0 - add r1, r5, #0 - ldr r0, [sp, #4] - add r1, #0x20 - ldrh r6, [r5, #0x20] - bl sub_020014D0 - ldrh r0, [r5, #0x20] - cmp r6, r0 - beq _02248ECA - ldr r0, _02248EF4 ; =0x000005DC - bl sub_02005748 -_02248ECA: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02248EDA - add r0, r0, #1 - cmp r4, r0 - beq _02248EE8 - b _02248EE2 -_02248EDA: - ldr r0, _02248EF4 ; =0x000005DC - bl sub_02005748 - b _02248EE8 -_02248EE2: - ldr r0, _02248EF4 ; =0x000005DC - bl sub_02005748 -_02248EE8: - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248EF0: .word 0x021BF67C -_02248EF4: .word 0x000005DC - thumb_func_end ov23_02248D20 - - thumb_func_start ov23_02248EF8 -ov23_02248EF8: ; 0x02248EF8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02001384 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02248F14 - ldr r0, [r4, #0x10] - bl sub_02014A20 - ldr r0, [r4, #8] - bl sub_020181C4 -_02248F14: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov23_02248EF8 - - thumb_func_start ov23_02248F1C -ov23_02248F1C: ; 0x02248F1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r4, r1, #0 - mov r1, #0x6e - lsl r1, r1, #2 - ldr r2, [r4, r1] - str r2, [sp, #0x2c] - ldr r2, _022491C8 ; =0x02257768 - str r4, [r2, #0] - ldr r2, [r4, #0] - cmp r2, #8 - bls _02248F36 - b _022491C4 -_02248F36: - add r3, r2, r2 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_02248F42: ; jump table - .short _02248F54 - _02248F42 - 2 ; case 0 - .short _02248F7E - _02248F42 - 2 ; case 1 - .short _02249084 - _02248F42 - 2 ; case 2 - .short _0224908C - _02248F42 - 2 ; case 3 - .short _022490BE - _02248F42 - 2 ; case 4 - .short _022490C6 - _02248F42 - 2 ; case 5 - .short _02249130 - _02248F42 - 2 ; case 6 - .short _0224914C - _02248F42 - 2 ; case 7 - .short _022491B8 - _02248F42 - 2 ; case 8 -_02248F54: - mov r1, #0x39 - lsl r1, r1, #4 - ldr r0, [sp, #0x2c] - add r1, r4, r1 - bl ov23_0224944C - add r1, r4, #0 - add r0, r4, #4 - add r1, #0x44 - bl ov23_022491CC - mov r0, #0xeb - lsl r0, r0, #2 - add r0, r4, r0 - bl ov23_02249724 - ldr r0, [r4, #0] - add sp, #0x60 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02248F7E: - add r0, r4, #0 - bl ov23_02249584 - mov r1, #0xfa - lsl r1, r1, #2 - mov r0, #0 - mov r3, #0xba - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r3, r3, #2 - ldr r2, [r4, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r4, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r4, r2] - add r3, #0x20 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r4, r3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_020093B4 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - str r0, [sp, #0x30] - mov r0, #0xc2 - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #0x34] - mov r0, #0x12 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - str r0, [sp, #0x3c] - lsr r0, r1, #5 - mov r6, #0 - mov r7, #0xcb - str r1, [sp, #0x38] - str r6, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - add r0, sp, #0x30 - strh r6, [r0, #0x20] - mov r0, #2 - str r0, [sp, #0x58] - mov r0, #4 - str r6, [sp, #0x54] - str r0, [sp, #0x5c] - add r5, r4, #0 - lsl r7, r7, #2 -_02249002: - add r0, sp, #0x30 - bl sub_02021AA0 - mov r1, #0xcb - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r5, r7] - mov r1, #0 - bl sub_02021CAC - cmp r6, #0 - bne _02249030 - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021D6C -_02249030: - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #8 - blt _02249002 - mov r7, #0xd3 - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_02249040: - add r0, sp, #0x30 - bl sub_02021AA0 - mov r1, #0xd3 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0xd3 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, r7] - mov r1, #2 - bl sub_02021D6C - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #0x11 - blt _02249040 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #0] - add sp, #0x60 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_02249084: - add r0, r2, #1 - add sp, #0x60 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_0224908C: - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201975C - ldr r0, [r4, #0] - add sp, #0x60 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_022490BE: - add r0, r2, #1 - add sp, #0x60 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_022490C6: - sub r0, r1, #4 - ldr r0, [r4, r0] - add r2, r4, #0 - ldr r0, [r0, #0x3c] - add r1, r4, #4 - add r2, #0x44 - bl ov23_02249214 - mov r1, #0xcb - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x44 - add r1, r4, r1 - bl ov23_022492C8 - add r0, r4, #0 - add r0, #0xa4 - bl ov23_02249334 - mov r1, #0xd3 - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0xa4 - add r1, r4, r1 - bl ov23_0224937C - mov r3, #0xea - lsl r3, r3, #2 - add r0, r4, r3 - str r0, [sp] - add r0, r3, #4 - add r0, r4, r0 - str r0, [sp, #4] - mov r0, #0x6e - lsl r0, r0, #2 - add r1, r3, #0 - add r2, r3, #0 - sub r1, #0x18 - sub r2, #8 - sub r3, r3, #4 - ldr r0, [r4, r0] - add r1, r4, r1 - add r2, r4, r2 - add r3, r4, r3 - bl ov23_0224966C - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020219F8 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} -_02249130: - mov r0, #0x3a - lsl r0, r0, #4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DA04 - cmp r0, #0 - beq _022491C4 - ldr r0, [r4, #0] - add sp, #0x60 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_0224914C: - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200A4E4 - mov r0, #0xbf - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200A6DC - mov r7, #0xba - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_02249168: - ldr r0, [r5, r7] - bl sub_02009754 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _02249168 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021964 - mov r0, #0x39 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #0 - bl sub_0200E084 - mov r0, #0x39 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, [sp, #0x2c] - mov r1, #7 - bl sub_02019044 - ldr r0, [sp, #0x2c] - bl ov23_02249438 - mov r0, #0xeb - lsl r0, r0, #2 - add r0, r4, r0 - bl ov23_02249778 - ldr r0, [r4, #0] - add sp, #0x60 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_022491B8: - sub r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0 - str r2, [r1, #0x6c] - bl sub_020067D0 -_022491C4: - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022491C8: .word 0x02257768 - thumb_func_end ov23_02248F1C - - thumb_func_start ov23_022491CC -ov23_022491CC: ; 0x022491CC - push {r3, r4, r5, r6, r7, lr} - ldr r4, _02249210 ; =0x0225776C - add r6, r0, #0 - add r5, r1, #0 - mov r7, #0 -_022491D6: - mov r0, #0 - str r0, [r6, #0] - str r0, [r6, #4] - str r0, [r5, #0] - str r0, [r5, #4] - str r0, [r5, #8] - bl sub_0201D2E8 - mov r1, #0x7d - lsl r1, r1, #2 - bl sub_020E1F6C - add r1, #0x32 - str r1, [r4, #0] - bl sub_0201D2E8 - mov r1, #0x7d - lsl r1, r1, #2 - bl sub_020E1F6C - add r1, #0x32 - str r1, [r4, #4] - add r7, r7, #1 - add r6, #8 - add r5, #0xc - add r4, #8 - cmp r7, #8 - blt _022491D6 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249210: .word 0x0225776C - thumb_func_end ov23_022491CC - - thumb_func_start ov23_02249214 -ov23_02249214: ; 0x02249214 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - str r0, [sp] - add r4, r2, #0 - mov r7, #0 - add r6, r5, #0 -_02249220: - add r0, r7, #0 - bl sub_02058CA0 - str r0, [r6, #0] - add r0, r7, #0 - bl sub_02058CF4 - str r0, [r6, #4] - add r7, r7, #1 - add r6, #8 - cmp r7, #8 - blt _02249220 - bl sub_02035E38 - cmp r0, #0 - beq _0224928A - bl sub_0203608C - bl sub_02035D78 - cmp r0, #0 - bne _0224925E - ldr r0, [sp] - bl sub_0205EABC - str r0, [r5, #0] - ldr r0, [sp] - bl sub_0205EAC8 - str r0, [r5, #4] - b _0224928A -_0224925E: - ldr r7, [r5, #0] - ldr r6, [r5, #4] - bl sub_0203608C - lsl r0, r0, #3 - ldr r0, [r5, r0] - str r0, [r5, #0] - bl sub_0203608C - lsl r0, r0, #3 - add r0, r5, r0 - ldr r0, [r0, #4] - str r0, [r5, #4] - bl sub_0203608C - lsl r0, r0, #3 - str r7, [r5, r0] - bl sub_0203608C - lsl r0, r0, #3 - add r0, r5, r0 - str r6, [r0, #4] -_0224928A: - mov r6, #0 - mov r7, #0x3c -_0224928E: - ldr r0, [r5, #0] - ldr r1, [r5, #4] - bl ov23_02242E58 - cmp r0, #0 - bne _022492AA - ldr r0, [r5, #0] - sub r0, #0x20 - str r0, [r4, #0] - ldr r0, [r5, #4] - sub r0, #0x40 - str r0, [r4, #4] - str r7, [r4, #8] - b _022492BA -_022492AA: - ldr r1, [r4, #8] - cmp r1, #0 - beq _022492BA - ldr r0, [r4, #0] - cmp r0, #0 - blt _022492BA - sub r0, r1, #1 - str r0, [r4, #8] -_022492BA: - add r6, r6, #1 - add r5, #8 - add r4, #0xc - cmp r6, #8 - blt _0224928E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02249214 - - thumb_func_start ov23_022492C8 -ov23_022492C8: ; 0x022492C8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r7, #1 - add r5, r0, #0 - add r4, r1, #0 - mov r6, #0 - lsl r7, r7, #0xc -_022492D6: - ldr r0, [r5, #8] - cmp r0, #0 - beq _0224931C - ldr r1, [r5, #0] - mov r0, #0x8a - mul r0, r1 - mov r1, #7 - lsl r1, r1, #6 - bl sub_020E1F6C - add r0, #0x3c - lsl r0, r0, #0xc - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x1a - lsl r0, r0, #7 - lsl r1, r1, #4 - bl sub_020E1F6C - add r0, #9 - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r7, [sp, #8] - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021CAC - b _02249324 -_0224931C: - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021CAC -_02249324: - add r6, r6, #1 - add r5, #0xc - add r4, r4, #4 - cmp r6, #8 - blt _022492D6 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_022492C8 - - thumb_func_start ov23_02249334 -ov23_02249334: ; 0x02249334 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r4, #0 -_0224933A: - add r0, r4, #0 - bl ov23_02242E78 - add r6, r0, #0 - add r0, r4, #0 - bl ov23_02242EE0 - add r7, r0, #0 - add r0, r4, #0 - bl ov23_02242F48 - str r0, [sp] - add r0, r6, #0 - add r1, r7, #0 - bl ov23_02242E58 - cmp r0, #0 - bne _0224936A - sub r6, #0x20 - str r6, [r5, #0] - sub r7, #0x40 - str r7, [r5, #4] - ldr r0, [sp] - b _02249370 -_0224936A: - mov r0, #0 - str r0, [r5, #0] - str r0, [r5, #4] -_02249370: - add r4, r4, #1 - str r0, [r5, #8] - add r5, #0x10 - cmp r4, #0x11 - blt _0224933A - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_02249334 - - thumb_func_start ov23_0224937C -ov23_0224937C: ; 0x0224937C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r7, #1 - add r5, r0, #0 - add r4, r1, #0 - mov r6, #0 - lsl r7, r7, #0xc -_0224938A: - ldr r1, [r5, #0] - cmp r1, #0 - beq _022493E8 - mov r0, #0x8a - mul r0, r1 - mov r1, #7 - lsl r1, r1, #6 - bl sub_020E1F6C - add r0, #0x3c - lsl r0, r0, #0xc - str r0, [sp] - ldr r0, [r5, #4] - mov r1, #0x1a - lsl r0, r0, #7 - lsl r1, r1, #4 - bl sub_020E1F6C - add r0, #9 - lsl r1, r0, #0xc - mov r0, #3 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r7, [sp, #8] - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0 - bl sub_02021C50 - ldr r1, [r5, #8] - ldr r0, [r5, #0xc] - cmp r1, r0 - beq _022493F0 - cmp r1, #0 - ldr r0, [r4, #0] - beq _022493E0 - bl sub_02021D6C - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021CAC - b _022493F0 -_022493E0: - mov r1, #0 - bl sub_02021CAC - b _022493F0 -_022493E8: - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021CAC -_022493F0: - ldr r0, [r5, #8] - add r6, r6, #1 - str r0, [r5, #0xc] - add r5, #0x10 - add r4, r4, #4 - cmp r6, #0x11 - blt _0224938A - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_0224937C - - thumb_func_start ov23_02249404 -ov23_02249404: ; 0x02249404 - push {r4, lr} - add r4, r0, #0 - mov r1, #0x4e - mov r2, #4 - ldr r0, _02249428 ; =ov23_02248F1C - lsl r1, r1, #4 - add r3, r2, #0 - bl sub_0200679C - bl sub_0201CED0 - mov r1, #0x6d - lsl r1, r1, #2 - str r4, [r0, r1] - ldr r2, [r4, #8] - add r1, r1, #4 - str r2, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_02249428: .word ov23_02248F1C - thumb_func_end ov23_02249404 - - thumb_func_start ov23_0224942C -ov23_0224942C: ; 0x0224942C - ldr r1, [r0, #0] - cmp r1, #5 - bne _02249436 - mov r1, #6 - str r1, [r0, #0] -_02249436: - bx lr - thumb_func_end ov23_0224942C - - thumb_func_start ov23_02249438 -ov23_02249438: ; 0x02249438 - push {r4, lr} - add r4, r0, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #5 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov23_02249438 - - thumb_func_start ov23_0224944C -ov23_0224944C: ; 0x0224944C - push {r3, r4, r5, r6, lr} - sub sp, #0x64 - add r5, r0, #0 - add r6, r1, #0 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - add r0, r5, #0 - bl ov23_02249438 - ldr r4, _02249578 ; =0x022567DC - add r3, sp, #0x48 - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - ldr r4, _0224957C ; =0x022567C0 - add r3, sp, #0x2c - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - ldr r4, _02249580 ; =0x022567A4 - add r3, sp, #0x10 - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - mov r1, #7 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - add r0, r5, #0 - mov r1, #7 - bl sub_02019EBC - mov r0, #0x1c - mov r1, #4 - bl sub_02006C24 - mov r1, #0x40 - str r1, [sp] - mov r1, #0 - mov r2, #4 - add r3, r1, #0 - add r4, r0, #0 - str r2, [sp, #4] - bl sub_02007130 - mov r1, #0 - mov r0, #5 - str r1, [sp] - lsl r0, r0, #0xa - str r0, [sp, #4] - str r1, [sp, #8] - mov r3, #4 - add r0, r4, #0 - mov r1, #1 - add r2, r5, #0 - str r3, [sp, #0xc] - bl sub_020070E8 - mov r1, #0 - mov r0, #6 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - str r1, [sp, #8] - mov r3, #4 - add r0, r4, #0 - mov r1, #2 - add r2, r5, #0 - str r3, [sp, #0xc] - bl sub_0200710C - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #4 - mov r1, #0 - bl sub_0205D8CC - mov r0, #7 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #7 - bl sub_0205D8F4 - add r0, r6, #0 - mov r1, #0 - bl sub_0201ADA4 - mov r3, #0x80 - str r3, [sp] - mov r2, #4 - mov r0, #0x32 - mov r1, #0x34 - add r3, #0xc0 - str r2, [sp, #4] - bl sub_02006E84 - mov r0, #1 - bl sub_0200F338 - add sp, #0x64 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02249578: .word 0x022567DC -_0224957C: .word 0x022567C0 -_02249580: .word 0x022567A4 - thumb_func_end ov23_0224944C - - thumb_func_start ov23_02249584 -ov23_02249584: ; 0x02249584 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #7 - add r6, r0, #0 - lsl r1, r1, #6 - mov r0, #0x19 - add r1, r6, r1 - mov r2, #4 - bl sub_020095C4 - mov r1, #0x6f - lsl r1, r1, #2 - mov r7, #0xba - str r0, [r6, r1] - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_022495A6: - mov r0, #1 - add r1, r4, #0 - mov r2, #4 - bl sub_02009714 - str r0, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022495A6 - mov r0, #0x1c - mov r1, #4 - bl sub_02006C24 - add r4, r0, #0 - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r2, #4 - mov r0, #0xba - str r2, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r1, r4, #0 - mov r3, #0 - bl sub_02009A4C - mov r1, #0xbe - lsl r1, r1, #2 - str r0, [r6, r1] - add r0, r1, #0 - add r0, #0xf0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #4 - sub r1, #0xc - str r0, [sp, #0xc] - ldr r0, [r6, r1] - add r1, r4, #0 - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - mov r1, #0xbf - lsl r1, r1, #2 - str r0, [r6, r1] - add r0, r1, #0 - add r0, #0xec - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r6, r1] - add r1, r4, #0 - mov r2, #5 - mov r3, #0 - bl sub_02009BC4 - mov r1, #3 - lsl r1, r1, #8 - str r0, [r6, r1] - add r0, r1, #0 - add r0, #0xe8 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r6, r1] - add r1, r4, #0 - mov r2, #6 - mov r3, #0 - bl sub_02009BC4 - mov r1, #0xc1 - lsl r1, r1, #2 - str r0, [r6, r1] - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0200A3DC - mov r0, #0xbf - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0200A640 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_02249584 - - thumb_func_start ov23_0224966C -ov23_0224966C: ; 0x0224966C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r4, [sp, #0x2c] - str r1, [sp, #0xc] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r7, r2, #0 - add r6, r3, #0 - ldr r5, [sp, #0x28] - bl ov23_02242D60 - cmp r0, #0 - beq _022496A2 -_02249688: - add r1, r4, #0 - add r1, #0x80 - ldr r1, [r1, #0] - add r0, r4, #0 - bl ov23_02249844 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl ov23_02242D60 - cmp r0, #0 - bne _02249688 -_022496A2: - ldr r0, [r6, #0] - cmp r0, #0 - beq _022496B4 - cmp r0, #1 - beq _022496DA - cmp r0, #2 - beq _022496F4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_022496B4: - add r0, r4, #0 - bl ov23_022498C4 - add r2, r0, #0 - beq _02249720 - mov r0, #0x10 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r3, #0 - ldr r0, [sp, #0xc] - str r3, [sp, #8] - bl sub_0201D738 - str r0, [r7, #0] - mov r0, #1 - add sp, #0x10 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} -_022496DA: - ldr r0, [r7, #0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DA04 - cmp r0, #0 - beq _02249720 - mov r0, #2 - str r0, [r6, #0] - mov r0, #0 - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022496F4: - add r0, r4, #0 - bl ov23_02249900 - cmp r0, #0 - bne _02249720 - mov r1, #0 - ldr r0, [sp, #0xc] - mov r2, #2 - add r3, r1, #0 - bl sub_0201C04C - ldr r0, [sp, #0xc] - bl sub_0201A954 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - cmp r0, #8 - blt _02249720 - mov r0, #0 - str r0, [r5, #0] - str r0, [r6, #0] -_02249720: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0224966C - - thumb_func_start ov23_02249724 -ov23_02249724: ; 0x02249724 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - mov r7, #0x64 -_0224972E: - add r0, r7, #0 - mov r1, #4 - bl sub_02023790 - add r6, r6, #1 - stmia r4!, {r0} - cmp r6, #0x20 - blt _0224972E - add r0, r5, #0 - mov r1, #0 - add r0, #0x8c - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x90 - str r1, [r0, #0] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - add r1, r5, #0 - add r1, #0x80 - str r0, [r1, #0] - mov r4, #0 - mov r6, #0x50 - mov r7, #4 -_02249760: - add r0, r6, #0 - add r1, r7, #0 - bl sub_02023790 - add r1, r5, #0 - add r1, #0x84 - add r4, r4, #1 - add r5, r5, #4 - str r0, [r1, #0] - cmp r4, #2 - blt _02249760 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_02249724 - - thumb_func_start ov23_02249778 -ov23_02249778: ; 0x02249778 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 -_02249780: - ldr r0, [r4, #0] - bl sub_020237BC - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #0x20 - blt _02249780 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_020237BC - mov r4, #0 -_0224979A: - add r0, r5, #0 - add r0, #0x84 - ldr r0, [r0, #0] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0224979A - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02249778 - - thumb_func_start ov23_022497B0 -ov23_022497B0: ; 0x022497B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - add r0, r1, #0 - add r1, r5, #0 - add r1, #0x94 - mov r2, #0x50 - bl sub_02023DF0 - add r0, r5, #0 - add r0, #0x94 - ldrh r2, [r0] - mov r4, #0 - ldr r0, _02249840 ; =0x0000FFFF - add r1, r4, #0 - cmp r2, r0 - beq _022497F6 - add r7, r0, #0 - mov r0, #0xe - add r2, r5, #0 - lsl r0, r0, #0xc -_022497DA: - add r3, r2, #0 - add r3, #0x94 - ldrh r3, [r3] - cmp r3, r0 - bne _022497E8 - add r4, r4, #1 - add r6, r1, #0 -_022497E8: - add r2, r2, #2 - add r3, r2, #0 - add r3, #0x94 - ldrh r3, [r3] - add r1, r1, #1 - cmp r3, r7 - bne _022497DA -_022497F6: - cmp r4, #2 - blt _022497FE - bl sub_02022974 -_022497FE: - cmp r4, #0 - bne _02249810 - add r5, #0x84 - ldr r0, [r5, #0] - ldr r1, [sp] - bl sub_02023810 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02249810: - lsl r0, r6, #1 - add r0, r5, r0 - ldr r1, _02249840 ; =0x0000FFFF - add r0, #0x94 - strh r1, [r0] - add r0, r5, #0 - add r0, #0x84 - add r1, r5, #0 - ldr r0, [r0, #0] - add r1, #0x94 - bl sub_02023D28 - add r0, r5, #0 - add r0, #0x88 - add r1, r6, #1 - ldr r0, [r0, #0] - add r5, #0x94 - lsl r1, r1, #1 - add r1, r5, r1 - bl sub_02023D28 - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} - nop -_02249840: .word 0x0000FFFF - thumb_func_end ov23_022497B0 - - thumb_func_start ov23_02249844 -ov23_02249844: ; 0x02249844 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov23_022497B0 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x8c - mov r2, #0 - ldr r1, [r0, #0] - cmp r6, #0 - ble _02249878 - add r0, r5, #0 - add r0, #0x90 - ldr r3, [r0, #0] - add r0, r2, #0 -_02249862: - add r1, r1, #1 - cmp r1, #0x20 - bne _0224986A - add r1, r0, #0 -_0224986A: - cmp r1, r3 - bne _02249872 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02249872: - add r2, r2, #1 - cmp r2, r6 - blt _02249862 -_02249878: - mov r0, #0 - str r0, [sp] - cmp r6, #0 - ble _022498BE - add r7, r5, #0 - add r4, r5, #0 - add r7, #0x8c -_02249886: - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r4, #0 - lsl r0, r0, #2 - add r1, #0x84 - ldr r0, [r5, r0] - ldr r1, [r1, #0] - bl sub_02023810 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - cmp r0, #0x20 - bne _022498B2 - add r1, r5, #0 - add r1, #0x8c - mov r0, #0 - str r0, [r1, #0] -_022498B2: - ldr r0, [sp] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp] - cmp r0, r6 - blt _02249886 -_022498BE: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02249844 - - thumb_func_start ov23_022498C4 -ov23_022498C4: ; 0x022498C4 - add r1, r0, #0 - add r2, r0, #0 - add r1, #0x90 - add r2, #0x8c - ldr r1, [r1, #0] - ldr r2, [r2, #0] - cmp r2, r1 - beq _022498FA - add r2, r0, #0 - add r2, #0x90 - ldr r2, [r2, #0] - add r3, r2, #1 - add r2, r0, #0 - add r2, #0x90 - str r3, [r2, #0] - add r2, r0, #0 - add r2, #0x90 - ldr r2, [r2, #0] - cmp r2, #0x20 - bne _022498F4 - add r2, r0, #0 - mov r3, #0 - add r2, #0x90 - str r3, [r2, #0] -_022498F4: - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr -_022498FA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_022498C4 - - thumb_func_start ov23_02249900 -ov23_02249900: ; 0x02249900 - add r1, r0, #0 - add r1, #0x8c - add r0, #0x90 - ldr r1, [r1, #0] - ldr r0, [r0, #0] - cmp r1, r0 - bne _02249912 - mov r0, #1 - bx lr -_02249912: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_02249900 - - thumb_func_start ov23_02249918 -ov23_02249918: ; 0x02249918 - mov r0, #0x78 - bx lr - thumb_func_end ov23_02249918 - - thumb_func_start ov23_0224991C -ov23_0224991C: ; 0x0224991C - push {r4, lr} - add r4, r0, #0 - bl sub_020361BC - mov r1, #0 - add r4, #0x18 - add r0, r1, #0 -_0224992A: - strb r0, [r4, #0xa] - str r0, [r4, #4] - add r1, r1, #1 - add r4, #0xc - cmp r1, #8 - blt _0224992A - pop {r4, pc} - thumb_func_end ov23_0224991C - - thumb_func_start ov23_02249938 -ov23_02249938: ; 0x02249938 - bx lr - ; .align 2, 0 - thumb_func_end ov23_02249938 - - thumb_func_start ov23_0224993C -ov23_0224993C: ; 0x0224993C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #8 - blt _0224994A - bl sub_02022974 -_0224994A: - mov r0, #0xc - add r5, #0x18 - mul r0, r4 - add r0, r5, r0 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224993C - - thumb_func_start ov23_02249954 -ov23_02249954: ; 0x02249954 - mov r3, #0 - add r0, #0x18 - add r1, r3, #0 -_0224995A: - ldr r2, [r0, #4] - cmp r2, #0 - ble _02249964 - sub r2, r2, #1 - str r2, [r0, #4] -_02249964: - ldr r2, [r0, #4] - cmp r2, #0 - bne _0224996C - strb r1, [r0, #0xa] -_0224996C: - add r3, r3, #1 - add r0, #0xc - cmp r3, #8 - blt _0224995A - bx lr - ; .align 2, 0 - thumb_func_end ov23_02249954 - - thumb_func_start ov23_02249978 -ov23_02249978: ; 0x02249978 - strb r1, [r0, #0xa] - lsl r2, r1, #2 - ldr r1, _0224998C ; =0x02257580 - ldr r1, [r1, r2] - str r1, [r0, #4] - ldr r1, _02249990 ; =0x0225759C - ldr r1, [r1, r2] - str r1, [r0, #0] - bx lr - nop -_0224998C: .word 0x02257580 -_02249990: .word 0x0225759C - thumb_func_end ov23_02249978 - - thumb_func_start ov23_02249994 -ov23_02249994: ; 0x02249994 - ldr r3, _02249998 ; =ov23_02249978 - bx r3 - ; .align 2, 0 -_02249998: .word ov23_02249978 - thumb_func_end ov23_02249994 - - thumb_func_start ov23_0224999C -ov23_0224999C: ; 0x0224999C - ldrb r0, [r0, #0xa] - cmp r0, #0 - bne _022499A6 - mov r0, #1 - bx lr -_022499A6: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_0224999C - - thumb_func_start ov23_022499AC -ov23_022499AC: ; 0x022499AC - ldrb r0, [r0, #0xa] - cmp r0, #2 - bne _022499B6 - mov r0, #0 - bx lr -_022499B6: - cmp r0, #5 - bne _022499BE - mov r0, #0 - bx lr -_022499BE: - cmp r0, #3 - bne _022499C6 - mov r0, #1 - bx lr -_022499C6: - cmp r0, #1 - bne _022499CE - mov r0, #1 - bx lr -_022499CE: - cmp r0, #4 - bne _022499D6 - mov r0, #1 - bx lr -_022499D6: - cmp r0, #0 - bne _022499DE - mov r0, #1 - bx lr -_022499DE: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_022499AC - - thumb_func_start ov23_022499E4 -ov23_022499E4: ; 0x022499E4 - bx lr - ; .align 2, 0 - thumb_func_end ov23_022499E4 - - thumb_func_start ov23_022499E8 -ov23_022499E8: ; 0x022499E8 - push {r4, lr} - add r4, r0, #0 - bl sub_0205964C - cmp r0, #0 - bne _02249A2A - add r0, r4, #0 - bl sub_0203D174 - bl sub_02036794 - add r0, r4, #0 - bl sub_0205965C - bl sub_0205964C - mov r2, #0x3a - add r4, r0, #0 - mov r0, #3 - mov r1, #0x21 - lsl r2, r2, #0xa - bl sub_02017FC8 - ldr r0, [r4, #0x18] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206ADDC - cmp r0, #0 - bne _02249A2A - bl sub_02036894 -_02249A2A: - pop {r4, pc} - thumb_func_end ov23_022499E8 - - thumb_func_start ov23_02249A2C -ov23_02249A2C: ; 0x02249A2C - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - mov r1, #1 - add r0, #0x41 - strb r1, [r0] - ldr r0, [r4, #0x18] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x24 - bl sub_0202CFEC - ldr r0, [r4, #0x18] - bl ov23_02242BC0 - ldr r0, _02249A58 ; =ov23_02249C34 - mov r1, #0 - bl ov23_02249C24 - pop {r4, pc} - ; .align 2, 0 -_02249A58: .word ov23_02249C34 - thumb_func_end ov23_02249A2C - - thumb_func_start ov23_02249A5C -ov23_02249A5C: ; 0x02249A5C - push {r3, lr} - bl sub_0205964C - cmp r0, #0 - beq _02249A6E - ldr r0, _02249A70 ; =ov23_0224A1A0 - mov r1, #3 - bl ov23_02249C24 -_02249A6E: - pop {r3, pc} - ; .align 2, 0 -_02249A70: .word ov23_0224A1A0 - thumb_func_end ov23_02249A5C - - thumb_func_start ov23_02249A74 -ov23_02249A74: ; 0x02249A74 - push {r3, lr} - bl sub_02036884 - ldr r0, _02249A84 ; =ov23_0224A02C - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_02249A84: .word ov23_0224A02C - thumb_func_end ov23_02249A74 - - thumb_func_start ov23_02249A88 -ov23_02249A88: ; 0x02249A88 - push {r3, lr} - bl sub_02033DFC - cmp r0, #0 - bne _02249A9E - bl ov23_0224C198 - ldr r0, _02249AA0 ; =ov23_02249C34 - mov r1, #0 - bl ov23_02249C24 -_02249A9E: - pop {r3, pc} - ; .align 2, 0 -_02249AA0: .word ov23_02249C34 - thumb_func_end ov23_02249A88 - - thumb_func_start ov23_02249AA4 -ov23_02249AA4: ; 0x02249AA4 - push {r3, lr} - bl sub_020368A4 - ldr r0, _02249AB4 ; =ov23_02249A88 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_02249AB4: .word ov23_02249A88 - thumb_func_end ov23_02249AA4 - - thumb_func_start ov23_02249AB8 -ov23_02249AB8: ; 0x02249AB8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - bl sub_0205964C - add r2, sp, #0 - ldr r5, [r0, #0x34] - ldr r3, _02249B3C ; =0x022567F8 - add r6, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, _02249B40 ; =ov23_02249E18 - ldr r4, _02249B44 ; =ov23_0224A09C - ldr r7, _02249B48 ; =ov23_02249CE4 - cmp r5, r0 - bne _02249AE8 - ldr r0, _02249B4C ; =ov23_02249E84 - mov r1, #0 - bl ov23_02249C24 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02249AE8: - cmp r4, r5 - bne _02249AFA - ldr r0, _02249B50 ; =ov23_0224A0CC - mov r1, #0 - bl ov23_02249C24 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02249AFA: - cmp r7, r5 - bne _02249B0C - ldr r0, _02249B54 ; =ov23_0224A138 - mov r1, #0 - bl ov23_02249C24 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02249B0C: - ldr r0, _02249B58 ; =ov23_0224A024 - cmp r0, r5 - bne _02249B20 - ldr r0, _02249B5C ; =ov23_0224A16C - mov r1, #0 - bl ov23_02249C24 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02249B20: - mov r1, #0 -_02249B22: - ldr r0, [r6, #0] - cmp r5, r0 - bne _02249B2E - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02249B2E: - add r1, r1, #1 - add r6, r6, #4 - cmp r1, #4 - blo _02249B22 - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249B3C: .word 0x022567F8 -_02249B40: .word ov23_02249E18 -_02249B44: .word ov23_0224A09C -_02249B48: .word ov23_02249CE4 -_02249B4C: .word ov23_02249E84 -_02249B50: .word ov23_0224A0CC -_02249B54: .word ov23_0224A138 -_02249B58: .word ov23_0224A024 -_02249B5C: .word ov23_0224A16C - thumb_func_end ov23_02249AB8 - - thumb_func_start ov23_02249B60 -ov23_02249B60: ; 0x02249B60 - push {r4, lr} - bl sub_0205964C - ldr r4, [r0, #0x34] - ldr r0, _02249BB4 ; =ov23_02249E98 - ldr r3, _02249BB8 ; =ov23_0224A0E0 - ldr r2, _02249BBC ; =ov23_0224A14C - ldr r1, _02249BC0 ; =ov23_0224A180 - cmp r4, r0 - bne _02249B80 - ldr r0, _02249BC4 ; =ov23_02249EA0 - mov r1, #0 - bl ov23_02249C24 - mov r0, #1 - pop {r4, pc} -_02249B80: - cmp r3, r4 - bne _02249B90 - ldr r0, _02249BC8 ; =ov23_0224A0E8 - mov r1, #0 - bl ov23_02249C24 - mov r0, #1 - pop {r4, pc} -_02249B90: - cmp r2, r4 - bne _02249BA0 - ldr r0, _02249BCC ; =ov23_0224A150 - mov r1, #0 - bl ov23_02249C24 - mov r0, #1 - pop {r4, pc} -_02249BA0: - cmp r1, r4 - bne _02249BB0 - ldr r0, _02249BD0 ; =ov23_0224A184 - mov r1, #0 - bl ov23_02249C24 - mov r0, #1 - pop {r4, pc} -_02249BB0: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02249BB4: .word ov23_02249E98 -_02249BB8: .word ov23_0224A0E0 -_02249BBC: .word ov23_0224A14C -_02249BC0: .word ov23_0224A180 -_02249BC4: .word ov23_02249EA0 -_02249BC8: .word ov23_0224A0E8 -_02249BCC: .word ov23_0224A150 -_02249BD0: .word ov23_0224A184 - thumb_func_end ov23_02249B60 - - thumb_func_start ov23_02249BD4 -ov23_02249BD4: ; 0x02249BD4 - push {r4, r5, lr} - sub sp, #0x34 - bl sub_0205964C - ldr r4, _02249C20 ; =0x02256808 - add r5, r0, #0 - add r3, sp, #0 - mov r2, #6 -_02249BE4: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02249BE4 - ldr r0, [r4, #0] - cmp r5, #0 - str r0, [r3, #0] - ldr r1, [r5, #0x34] - bne _02249BFC - add sp, #0x34 - mov r0, #0 - pop {r4, r5, pc} -_02249BFC: - ldr r0, [sp] - cmp r0, #0 - beq _02249C18 - add r2, sp, #0 -_02249C04: - ldr r0, [r2, #0] - cmp r1, r0 - bne _02249C10 - add sp, #0x34 - mov r0, #1 - pop {r4, r5, pc} -_02249C10: - add r2, r2, #4 - ldr r0, [r2, #0] - cmp r0, #0 - bne _02249C04 -_02249C18: - mov r0, #0 - add sp, #0x34 - pop {r4, r5, pc} - nop -_02249C20: .word 0x02256808 - thumb_func_end ov23_02249BD4 - - thumb_func_start ov23_02249C24 -ov23_02249C24: ; 0x02249C24 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_0205964C - str r5, [r0, #0x34] - strh r4, [r0, #0x3c] - pop {r3, r4, r5, pc} - thumb_func_end ov23_02249C24 - - thumb_func_start ov23_02249C34 -ov23_02249C34: ; 0x02249C34 - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _02249C48 - sub r0, r0, #1 - strh r0, [r4, #0x3c] - pop {r4, pc} -_02249C48: - bl sub_02035E38 - cmp r0, #0 - beq _02249C8E - ldr r0, [r4, #0x18] - bl ov23_02242D44 - bl sub_02032AC0 - mov r0, #0 - bl sub_02057AE4 - bl ov23_02243AF0 - bl ov23_0224C21C - ldr r0, [r4, #0x18] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206ADDC - cmp r0, #0 - bne _02249C82 - ldr r0, _02249C90 ; =ov23_02249C98 - mov r1, #0 - bl ov23_02249C24 - pop {r4, pc} -_02249C82: - bl sub_02059524 - ldr r0, _02249C94 ; =ov23_02249CC4 - mov r1, #0x18 - bl ov23_02249C24 -_02249C8E: - pop {r4, pc} - ; .align 2, 0 -_02249C90: .word ov23_02249C98 -_02249C94: .word ov23_02249CC4 - thumb_func_end ov23_02249C34 - - thumb_func_start ov23_02249C98 -ov23_02249C98: ; 0x02249C98 - push {r3, lr} - bl sub_0205964C - ldr r0, [r0, #0x18] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206ADDC - cmp r0, #0 - beq _02249CBE - bl sub_020367F0 - bl sub_02059524 - ldr r0, _02249CC0 ; =ov23_02249CE4 - mov r1, #0x18 - bl ov23_02249C24 -_02249CBE: - pop {r3, pc} - ; .align 2, 0 -_02249CC0: .word ov23_02249CE4 - thumb_func_end ov23_02249C98 - - thumb_func_start ov23_02249CC4 -ov23_02249CC4: ; 0x02249CC4 - push {r3, lr} - bl sub_0205964C - ldrh r1, [r0, #0x3c] - cmp r1, #0 - beq _02249CD6 - sub r1, r1, #1 - strh r1, [r0, #0x3c] - pop {r3, pc} -_02249CD6: - ldr r0, _02249CE0 ; =ov23_02249CE4 - mov r1, #0x18 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_02249CE0: .word ov23_02249CE4 - thumb_func_end ov23_02249CC4 - - thumb_func_start ov23_02249CE4 -ov23_02249CE4: ; 0x02249CE4 - push {r3, lr} - bl ov23_02242B14 - bl sub_02059524 - bl sub_02036834 - cmp r0, #0 - beq _02249D14 - bl sub_0203608C - cmp r0, #0 - bne _02249D0C - bl ov23_0224B598 - ldr r0, _02249D18 ; =ov23_02249DBC - mov r1, #0x3c - bl ov23_02249C24 - pop {r3, pc} -_02249D0C: - ldr r0, _02249D1C ; =ov23_02249D20 - mov r1, #0x78 - bl ov23_02249C24 -_02249D14: - pop {r3, pc} - nop -_02249D18: .word ov23_02249DBC -_02249D1C: .word ov23_02249D20 - thumb_func_end ov23_02249CE4 - - thumb_func_start ov23_02249D20 -ov23_02249D20: ; 0x02249D20 - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _02249D32 - sub r0, r0, #1 - strh r0, [r4, #0x3c] -_02249D32: - bl sub_02033E68 - cmp r0, #0 - bne _02249D48 - bl sub_020360F0 - cmp r0, #0 - bne _02249D48 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - bne _02249D56 -_02249D48: - bl sub_020367F0 - ldr r0, _02249DB4 ; =ov23_02249FFC - mov r1, #0 - bl ov23_02249C24 - pop {r4, pc} -_02249D56: - bl sub_0203608C - bl sub_02035D78 - cmp r0, #0 - beq _02249DB2 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _02249D78 - sub r0, r0, #1 - strh r0, [r4, #0x3c] - bl sub_02035B54 - mov r1, #0x42 - lsl r1, r1, #2 - cmp r0, r1 - bne _02249DB2 -_02249D78: - bl ov23_0224321C - mov r0, #0 - bl sub_020579BC - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl ov23_0224546C - mov r0, #0 - mov r1, #1 - bl ov23_02244858 - mov r0, #0 - bl sub_02032D98 - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - bl sub_02057DB8 - bl sub_02059570 - ldr r0, _02249DB8 ; =ov23_02249EBC - mov r1, #0xa - bl ov23_02249C24 -_02249DB2: - pop {r4, pc} - ; .align 2, 0 -_02249DB4: .word ov23_02249FFC -_02249DB8: .word ov23_02249EBC - thumb_func_end ov23_02249D20 - - thumb_func_start ov23_02249DBC -ov23_02249DBC: ; 0x02249DBC - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - bl ov23_02242B14 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _02249DD2 - sub r0, r0, #1 - strh r0, [r4, #0x3c] -_02249DD2: - bl sub_020360E8 - cmp r0, #0 - bne _02249DE0 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - bne _02249E0C -_02249DE0: - bl ov23_0224321C - cmp r0, #0 - beq _02249DEC - bl sub_02059514 -_02249DEC: - ldr r0, _02249E10 ; =0x022575B8 - bl ov23_022499E4 - mov r0, #0 - bl sub_02057AE4 - bl ov23_0224AAB0 - bl ov23_0224C21C - bl ov23_02243360 - ldr r0, _02249E14 ; =ov23_02249E18 - mov r1, #0 - bl ov23_02249C24 -_02249E0C: - pop {r4, pc} - nop -_02249E10: .word 0x022575B8 -_02249E14: .word ov23_02249E18 - thumb_func_end ov23_02249DBC - - thumb_func_start ov23_02249E18 -ov23_02249E18: ; 0x02249E18 - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - bl ov23_02242B14 - ldr r0, [r4, #0x18] - ldr r0, [r0, #0x10] - cmp r0, #0 - bne _02249E7E - bl sub_020360F0 - cmp r0, #0 - bne _02249E50 - bl sub_02033E48 - cmp r0, #0 - beq _02249E50 - bl sub_0203608C - bl sub_02035D78 - cmp r0, #0 - bne _02249E7E - bl sub_02036180 - cmp r0, #0 - bne _02249E7E -_02249E50: - mov r0, #0 - bl ov23_0224B5CC - bl ov23_0224AA84 - bl ov23_0224DA8C - mov r0, #0x2b - bl sub_020360DC - bl sub_0203608C - mov r1, #1 - bl ov23_02244858 - bl ov23_0224321C - bl sub_02036824 - ldr r0, _02249E80 ; =ov23_02249FB4 - mov r1, #0 - bl ov23_02249C24 -_02249E7E: - pop {r4, pc} - ; .align 2, 0 -_02249E80: .word ov23_02249FB4 - thumb_func_end ov23_02249E18 - - thumb_func_start ov23_02249E84 -ov23_02249E84: ; 0x02249E84 - push {r3, lr} - bl sub_0205764C - ldr r0, _02249E94 ; =ov23_02249E98 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_02249E94: .word ov23_02249E98 - thumb_func_end ov23_02249E84 - - thumb_func_start ov23_02249E98 -ov23_02249E98: ; 0x02249E98 - ldr r3, _02249E9C ; =ov23_02242B14 - bx r3 - ; .align 2, 0 -_02249E9C: .word ov23_02242B14 - thumb_func_end ov23_02249E98 - - thumb_func_start ov23_02249EA0 -ov23_02249EA0: ; 0x02249EA0 - push {r3, lr} - bl sub_0205964C - bl ov23_0224C198 - bl sub_020576A0 - ldr r0, _02249EB8 ; =ov23_02249E18 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_02249EB8: .word ov23_02249E18 - thumb_func_end ov23_02249EA0 - - thumb_func_start ov23_02249EBC -ov23_02249EBC: ; 0x02249EBC - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - ldrh r0, [r4, #0x3c] - cmp r0, #9 - bne _02249ED2 - bl sub_02032AC0 - bl ov23_02243360 -_02249ED2: - ldrh r0, [r4, #0x3c] - cmp r0, #1 - bne _02249EDE - mov r0, #0 - bl sub_02057B14 -_02249EDE: - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _02249EEA - sub r0, r0, #1 - strh r0, [r4, #0x3c] - pop {r4, pc} -_02249EEA: - bl sub_02032BDC - cmp r0, #0 - beq _02249F06 - ldr r0, _02249F0C ; =0x022575C4 - bl ov23_022499E4 - bl ov23_0224AAB0 - ldr r0, _02249F10 ; =ov23_02249F14 - mov r1, #0xc8 - bl ov23_02249C24 - pop {r4, pc} -_02249F06: - bl ov23_0224A09C - pop {r4, pc} - ; .align 2, 0 -_02249F0C: .word 0x022575C4 -_02249F10: .word ov23_02249F14 - thumb_func_end ov23_02249EBC - - thumb_func_start ov23_02249F14 -ov23_02249F14: ; 0x02249F14 - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - bl ov23_0224AC3C - cmp r0, #0 - beq _02249F32 - bl ov23_02243AF0 - ldr r0, _02249F48 ; =ov23_02249F4C - mov r1, #0 - bl ov23_02249C24 - pop {r4, pc} -_02249F32: - bl ov23_0224A09C - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _02249F42 - sub r0, r0, #1 - strh r0, [r4, #0x3c] - pop {r4, pc} -_02249F42: - bl ov23_0224A064 - pop {r4, pc} - ; .align 2, 0 -_02249F48: .word ov23_02249F4C - thumb_func_end ov23_02249F14 - - thumb_func_start ov23_02249F4C -ov23_02249F4C: ; 0x02249F4C - push {r3, lr} - bl ov23_0224404C - cmp r0, #0 - beq _02249F6E - ldr r0, _02249F74 ; =0x022575D8 - bl ov23_022499E4 - bl ov23_02244068 - bl ov23_0224C21C - ldr r0, _02249F78 ; =ov23_02249F7C - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} -_02249F6E: - bl ov23_0224A09C - pop {r3, pc} - ; .align 2, 0 -_02249F74: .word 0x022575D8 -_02249F78: .word ov23_02249F7C - thumb_func_end ov23_02249F4C - - thumb_func_start ov23_02249F7C -ov23_02249F7C: ; 0x02249F7C - push {r3, lr} - bl ov23_0224C420 - cmp r0, #0 - beq _02249FA6 - ldr r0, _02249FAC ; =0x022575F4 - bl ov23_022499E4 - bl ov23_0224C434 - mov r0, #1 - bl sub_02057AE4 - mov r0, #0x1f - bl sub_020360DC - ldr r0, _02249FB0 ; =ov23_0224A09C - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} -_02249FA6: - bl ov23_0224A09C - pop {r3, pc} - ; .align 2, 0 -_02249FAC: .word 0x022575F4 -_02249FB0: .word ov23_0224A09C - thumb_func_end ov23_02249F7C - - thumb_func_start ov23_02249FB4 -ov23_02249FB4: ; 0x02249FB4 - push {r3, lr} - bl sub_02036180 - cmp r0, #0 - beq _02249FCE - mov r0, #0 - add r1, r0, #0 - bl sub_02059058 - ldr r0, _02249FD0 ; =ov23_02249FD4 - mov r1, #0x1e - bl ov23_02249C24 -_02249FCE: - pop {r3, pc} - ; .align 2, 0 -_02249FD0: .word ov23_02249FD4 - thumb_func_end ov23_02249FB4 - - thumb_func_start ov23_02249FD4 -ov23_02249FD4: ; 0x02249FD4 - push {r3, lr} - bl sub_0205964C - ldrh r1, [r0, #0x3c] - cmp r1, #0 - beq _02249FE6 - sub r1, r1, #1 - strh r1, [r0, #0x3c] - pop {r3, pc} -_02249FE6: - bl sub_0203608C - cmp r0, #0 - bne _02249FF6 - ldr r0, _02249FF8 ; =ov23_02249C34 - mov r1, #0 - bl ov23_02249C24 -_02249FF6: - pop {r3, pc} - ; .align 2, 0 -_02249FF8: .word ov23_02249C34 - thumb_func_end ov23_02249FD4 - - thumb_func_start ov23_02249FFC -ov23_02249FFC: ; 0x02249FFC - push {r3, lr} - bl sub_0205964C - ldrh r1, [r0, #0x3c] - cmp r1, #0 - beq _0224A00E - sub r1, r1, #1 - strh r1, [r0, #0x3c] - pop {r3, pc} -_0224A00E: - bl sub_0203608C - cmp r0, #0 - bne _0224A01E - ldr r0, _0224A020 ; =ov23_02249C34 - mov r1, #0 - bl ov23_02249C24 -_0224A01E: - pop {r3, pc} - ; .align 2, 0 -_0224A020: .word ov23_02249C34 - thumb_func_end ov23_02249FFC - - thumb_func_start ov23_0224A024 -ov23_0224A024: ; 0x0224A024 - ldr r3, _0224A028 ; =ov23_02242B14 - bx r3 - ; .align 2, 0 -_0224A028: .word ov23_02242B14 - thumb_func_end ov23_0224A024 - - thumb_func_start ov23_0224A02C -ov23_0224A02C: ; 0x0224A02C - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - bl sub_0203608C - cmp r0, #0 - bne _0224A05C - ldr r0, [r4, #0x18] - bl ov23_02242D44 - bl sub_02032AC0 - mov r0, #0 - bl sub_02057AE4 - bl ov23_02243AF0 - bl ov23_0224C21C - ldr r0, _0224A060 ; =ov23_0224A024 - mov r1, #0 - bl ov23_02249C24 -_0224A05C: - pop {r4, pc} - nop -_0224A060: .word ov23_0224A024 - thumb_func_end ov23_0224A02C - - thumb_func_start ov23_0224A064 -ov23_0224A064: ; 0x0224A064 - push {r3, lr} - bl sub_0203608C - mov r1, #1 - bl ov23_02244858 - bl sub_0203608C - mov r1, #1 - bl ov23_0224D9AC - bl ov23_0224160C - bl sub_020578B0 - bl ov23_0224321C - bl sub_020367F0 - bl ov23_0224AC4C - ldr r0, _0224A098 ; =ov23_02249FFC - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_0224A098: .word ov23_02249FFC - thumb_func_end ov23_0224A064 - - thumb_func_start ov23_0224A09C -ov23_0224A09C: ; 0x0224A09C - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - bl ov23_02242B14 - bl sub_02059524 - ldr r0, [r4, #0x18] - ldr r0, [r0, #0x10] - cmp r0, #0 - bne _0224A0C8 - bl sub_02033E68 - cmp r0, #0 - bne _0224A0C4 - bl sub_020360F0 - cmp r0, #0 - beq _0224A0C8 -_0224A0C4: - bl ov23_0224A064 -_0224A0C8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224A09C - - thumb_func_start ov23_0224A0CC -ov23_0224A0CC: ; 0x0224A0CC - push {r3, lr} - bl sub_0205764C - ldr r0, _0224A0DC ; =ov23_0224A0E0 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_0224A0DC: .word ov23_0224A0E0 - thumb_func_end ov23_0224A0CC - - thumb_func_start ov23_0224A0E0 -ov23_0224A0E0: ; 0x0224A0E0 - ldr r3, _0224A0E4 ; =ov23_0224DAB4 - bx r3 - ; .align 2, 0 -_0224A0E4: .word ov23_0224DAB4 - thumb_func_end ov23_0224A0E0 - - thumb_func_start ov23_0224A0E8 -ov23_0224A0E8: ; 0x0224A0E8 - push {r3, lr} - bl sub_0205964C - bl ov23_0224C198 - bl sub_020576A0 - bl sub_02033E68 - cmp r0, #0 - bne _0224A106 - bl sub_020360F0 - cmp r0, #0 - beq _0224A124 -_0224A106: - bl ov23_0224B518 - bl sub_020578B0 - bl ov23_0224321C - bl sub_020367F0 - bl ov23_0224AC4C - ldr r0, _0224A130 ; =ov23_02249FFC - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} -_0224A124: - ldr r0, _0224A134 ; =ov23_0224A09C - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - nop -_0224A130: .word ov23_02249FFC -_0224A134: .word ov23_0224A09C - thumb_func_end ov23_0224A0E8 - - thumb_func_start ov23_0224A138 -ov23_0224A138: ; 0x0224A138 - push {r3, lr} - bl sub_0205764C - ldr r0, _0224A148 ; =ov23_0224A14C - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_0224A148: .word ov23_0224A14C - thumb_func_end ov23_0224A138 - - thumb_func_start ov23_0224A14C -ov23_0224A14C: ; 0x0224A14C - bx lr - ; .align 2, 0 - thumb_func_end ov23_0224A14C - - thumb_func_start ov23_0224A150 -ov23_0224A150: ; 0x0224A150 - push {r3, lr} - bl sub_0205964C - bl ov23_0224C198 - bl sub_020576A0 - ldr r0, _0224A168 ; =ov23_02249CE4 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_0224A168: .word ov23_02249CE4 - thumb_func_end ov23_0224A150 - - thumb_func_start ov23_0224A16C -ov23_0224A16C: ; 0x0224A16C - push {r3, lr} - bl ov23_0224A1D0 - ldr r0, _0224A17C ; =ov23_0224A180 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_0224A17C: .word ov23_0224A180 - thumb_func_end ov23_0224A16C - - thumb_func_start ov23_0224A180 -ov23_0224A180: ; 0x0224A180 - bx lr - ; .align 2, 0 - thumb_func_end ov23_0224A180 - - thumb_func_start ov23_0224A184 -ov23_0224A184: ; 0x0224A184 - push {r3, lr} - bl sub_0205964C - bl ov23_0224C198 - bl sub_020576A0 - ldr r0, _0224A19C ; =ov23_0224A024 - mov r1, #0 - bl ov23_02249C24 - pop {r3, pc} - ; .align 2, 0 -_0224A19C: .word ov23_0224A024 - thumb_func_end ov23_0224A184 - - thumb_func_start ov23_0224A1A0 -ov23_0224A1A0: ; 0x0224A1A0 - push {r4, lr} - bl sub_0205964C - add r4, r0, #0 - ldrh r0, [r4, #0x3c] - cmp r0, #0 - beq _0224A1B4 - sub r0, r0, #1 - strh r0, [r4, #0x3c] - pop {r4, pc} -_0224A1B4: - bl ov23_02242D08 - bl sub_020367D0 - mov r0, #0x21 - bl sub_0201807C - mov r0, #0 - add r4, #0x41 - strb r0, [r4] - bl sub_020596BC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224A1A0 - - thumb_func_start ov23_0224A1D0 -ov23_0224A1D0: ; 0x0224A1D0 - push {r4, r5, r6, lr} - bl sub_02057518 - add r6, r0, #0 - beq _0224A1FC - mov r5, #0 - add r4, r5, #0 -_0224A1DE: - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - add r1, r4, #0 - add r2, r4, #0 - bl sub_02057DB8 - add r0, r5, #0 - bl sub_020593B4 - add r5, r5, #1 - cmp r5, #8 - blt _0224A1DE - ldr r0, _0224A200 ; =0x000002BD - mov r1, #1 - strb r1, [r6, r0] -_0224A1FC: - pop {r4, r5, r6, pc} - nop -_0224A200: .word 0x000002BD - thumb_func_end ov23_0224A1D0 - - thumb_func_start ov23_0224A204 -ov23_0224A204: ; 0x0224A204 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02057518 - add r4, r0, #0 - bl sub_0203608C - cmp r5, r0 - bne _0224A28A - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224A290 - ldr r0, [r4, #0x54] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x1c - bl sub_0202CFEC - mov r0, #0xa3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224A240 - bl sub_020181C4 -_0224A240: - mov r0, #0x9e - add r6, r4, #0 - lsl r0, r0, #2 - mov r3, #4 - add r6, #0x10 - add r1, r0, #4 -_0224A24C: - ldr r2, [r6, r0] - sub r3, r3, #1 - str r2, [r6, r1] - sub r6, r6, #4 - cmp r3, #1 - bge _0224A24C - mov r0, #0x29 - lsl r0, r0, #4 - add r6, r4, r0 - lsl r7, r5, #2 - ldr r1, [r6, r7] - sub r0, #0x14 - str r1, [r4, r0] - ldr r0, [r4, #0x54] - bl sub_0203D174 - bl sub_020298B0 - ldr r1, [r6, r7] - bl sub_02028830 - mov r0, #0 - str r0, [r6, r7] - mov r0, #0x22 - mul r0, r5 - mov r2, #0xff - add r1, r4, r0 - add r0, r2, #0 - add r0, #0x6b - strh r2, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_0224A28A: - add r0, r5, #0 - bl ov23_0224AE60 -_0224A290: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_0224A204 - - thumb_func_start ov23_0224A294 -ov23_0224A294: ; 0x0224A294 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_02057518 - mov r7, #0x29 - add r2, r0, #0 - lsl r1, r5, #2 - add r0, r2, r1 - lsl r7, r7, #4 - ldr r0, [r0, r7] - cmp r0, #0 - bne _0224A2F6 - lsl r0, r4, #2 - add r0, r2, r0 - ldr r3, [r0, r7] - cmp r3, #0 - beq _0224A2F6 - add r6, r2, r7 - str r3, [r6, r1] - mov r3, #0 - str r3, [r0, r7] - add r0, r2, r5 - mov r3, #1 - add r0, #0xfa - strb r3, [r0] - add r3, r2, r4 - add r3, #0xfa - mov r0, #0 - strb r0, [r3] - mov r0, #0x22 - add r3, r5, #0 - mul r3, r0 - ldr r7, _0224A2FC ; =0x0000016A - add r0, r2, r3 - strh r5, [r0, r7] - mov r0, #0x22 - mul r0, r4 - mov r5, #0xff - add r0, r2, r0 - strh r5, [r0, r7] - add r5, #0x4b - ldr r0, [r6, r1] - add r1, r2, r5 - add r1, r1, r3 - bl sub_02025E80 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224A2F6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224A2FC: .word 0x0000016A - thumb_func_end ov23_0224A294 - - thumb_func_start ov23_0224A300 -ov23_0224A300: ; 0x0224A300 - ldr r3, _0224A304 ; =sub_02059514 - bx r3 - ; .align 2, 0 -_0224A304: .word sub_02059514 - thumb_func_end ov23_0224A300 - - thumb_func_start ov23_0224A308 -ov23_0224A308: ; 0x0224A308 - ldr r3, _0224A30C ; =sub_02059514 - bx r3 - ; .align 2, 0 -_0224A30C: .word sub_02059514 - thumb_func_end ov23_0224A308 - - thumb_func_start ov23_0224A310 -ov23_0224A310: ; 0x0224A310 - ldr r3, _0224A318 ; =sub_0205948C - mov r0, #2 - bx r3 - nop -_0224A318: .word sub_0205948C - thumb_func_end ov23_0224A310 - - thumb_func_start ov23_0224A31C -ov23_0224A31C: ; 0x0224A31C - ldr r3, _0224A324 ; =sub_0205948C - mov r0, #0x20 - bx r3 - nop -_0224A324: .word sub_0205948C - thumb_func_end ov23_0224A31C - - thumb_func_start ov23_0224A328 -ov23_0224A328: ; 0x0224A328 - ldr r3, _0224A330 ; =sub_0205948C - mov r0, #1 - bx r3 - nop -_0224A330: .word sub_0205948C - thumb_func_end ov23_0224A328 - - thumb_func_start ov23_0224A334 -ov23_0224A334: ; 0x0224A334 - push {r3, lr} - bl sub_02057518 - cmp r0, #0 - beq _0224A346 - mov r1, #0xae - mov r2, #0 - lsl r1, r1, #2 - strb r2, [r0, r1] -_0224A346: - pop {r3, pc} - thumb_func_end ov23_0224A334 - - thumb_func_start ov23_0224A348 -ov23_0224A348: ; 0x0224A348 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_02057518 - add r0, r0, r4 - mov r2, #2 - add r1, sp, #0 - strb r2, [r1] - strb r4, [r1, #1] - add r0, #0xe2 - ldrb r0, [r0] - cmp r0, #0 - beq _0224A384 - add r0, r4, #0 - bl ov23_0224ACC0 - cmp r0, #0 - bne _0224A384 - add r0, r4, #0 - bl ov23_0224AEA4 - cmp r0, #0 - add r0, sp, #0 - beq _0224A380 - mov r1, #3 - strb r1, [r0] - b _0224A384 -_0224A380: - mov r1, #1 - strb r1, [r0] -_0224A384: - mov r0, #0x1d - add r1, sp, #0 - mov r2, #2 - bl sub_02035AC4 - cmp r0, #0 - beq _0224A3A2 - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #2 - beq _0224A3A2 - add r0, r4, #0 - mov r1, #0 - bl sub_02059058 -_0224A3A2: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224A348 - - thumb_func_start ov23_0224A3A8 -ov23_0224A3A8: ; 0x0224A3A8 - push {r3, r4, r5, lr} - add r5, r2, #0 - bl sub_02057518 - add r4, r0, #0 - bl sub_02035EE0 - cmp r0, #0 - beq _0224A408 - ldrb r0, [r5] - cmp r0, #1 - bne _0224A3E2 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A3E2 - mov r0, #0xae - lsl r0, r0, #2 - ldrb r1, [r4, r0] - cmp r1, #0 - bne _0224A408 - mov r1, #1 - strb r1, [r4, r0] - ldr r0, _0224A40C ; =ov23_0224A334 - ldr r1, [r4, #0x54] - bl ov23_0224F758 - pop {r3, r4, r5, pc} -_0224A3E2: - ldrb r0, [r5] - cmp r0, #3 - bne _0224A408 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A408 - mov r0, #0xae - lsl r0, r0, #2 - ldrb r1, [r4, r0] - cmp r1, #0 - bne _0224A408 - mov r1, #1 - strb r1, [r4, r0] - ldr r0, _0224A40C ; =ov23_0224A334 - ldr r1, [r4, #0x54] - bl ov23_02250A50 -_0224A408: - pop {r3, r4, r5, pc} - nop -_0224A40C: .word ov23_0224A334 - thumb_func_end ov23_0224A3A8 - - thumb_func_start ov23_0224A410 -ov23_0224A410: ; 0x0224A410 - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - bl sub_02057518 - add r4, r0, #0 - ldr r0, [r4, #0x54] - ldr r0, [r0, #0xc] - bl sub_020507E4 - add r6, r0, #0 - ldrb r0, [r5, #1] - cmp r0, #8 - blo _0224A42E - bl sub_02022974 -_0224A42E: - ldrb r0, [r5] - cmp r0, #4 - bne _0224A450 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A450 - bl sub_020594FC - bl ov23_0224219C - ldr r3, _0224A564 ; =ov23_0224A300 - mov r1, #0x48 - mov r2, #1 - bl ov23_02253F40 -_0224A450: - ldrb r0, [r5] - cmp r0, #1 - bne _0224A45E - ldrb r0, [r5, #1] - ldrb r1, [r5, #2] - bl sub_02058FE4 -_0224A45E: - ldrb r0, [r5] - cmp r0, #1 - bne _0224A518 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A518 - ldrb r0, [r5, #2] - ldr r1, _0224A568 ; =ov23_0224A334 - ldr r2, [r4, #0x54] - bl ov23_0224DCB8 - add r0, r4, #0 - add r0, #0x58 - ldrb r0, [r0] - mov r1, #0xf - ldrb r2, [r5, #1] - bic r0, r1 - mov r1, #0xf - and r1, r2 - orr r1, r0 - add r0, r4, #0 - add r0, #0x58 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x58 - ldrb r0, [r0] - mov r1, #0xf0 - bic r0, r1 - ldrb r1, [r5, #2] - lsl r1, r1, #0x1c - lsr r1, r1, #0x18 - orr r1, r0 - add r0, r4, #0 - add r0, #0x58 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x59 - ldrb r1, [r0] - mov r0, #1 - bic r1, r0 - add r0, r4, #0 - add r0, #0x59 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x59 - ldrb r1, [r0] - mov r0, #2 - bic r1, r0 - add r0, r4, #0 - add r0, #0x59 - strb r1, [r0] - ldrb r7, [r5, #2] - add r0, r4, r7 - add r0, #0x5a - ldrb r0, [r0] - cmp r0, #0 - bne _0224A518 - ldr r0, [r4, #0x54] - bl sub_0203D174 - bl sub_020298A0 - add r1, r7, #0 - bl sub_020294F4 - add r0, r6, #0 - bl sub_0206B354 - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - bl sub_0206B364 - add r0, r6, #0 - bl sub_0206B374 - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - bl sub_0206B384 - add r2, r4, #0 - ldrb r1, [r5, #2] - add r2, #0x5a - ldrb r0, [r2, r1] - add r0, r0, #1 - strb r0, [r2, r1] -_0224A518: - ldrb r0, [r5] - cmp r0, #1 - bne _0224A532 - ldrb r6, [r5, #2] - bl sub_0203608C - cmp r6, r0 - bne _0224A532 - ldrb r1, [r5, #1] - ldr r2, [r4, #0x54] - add r0, r6, #0 - bl ov23_0224F07C -_0224A532: - ldrb r0, [r5] - cmp r0, #2 - bne _0224A554 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A554 - bl sub_020594FC - bl ov23_0224219C - ldr r3, _0224A564 ; =ov23_0224A300 - mov r1, #2 - mov r2, #1 - bl ov23_02253F40 -_0224A554: - ldrb r0, [r5] - cmp r0, #1 - bne _0224A562 - ldrb r0, [r5, #1] - ldrb r1, [r5, #2] - bl ov23_0224300C -_0224A562: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A564: .word ov23_0224A300 -_0224A568: .word ov23_0224A334 - thumb_func_end ov23_0224A410 - - thumb_func_start ov23_0224A56C -ov23_0224A56C: ; 0x0224A56C - mov r0, #3 - bx lr - thumb_func_end ov23_0224A56C - - thumb_func_start ov23_0224A570 -ov23_0224A570: ; 0x0224A570 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - add r0, sp, #0 - strb r4, [r0, #1] - ldrb r1, [r2] - cmp r1, #0 - beq _0224A588 - cmp r1, #3 - beq _0224A598 - add sp, #4 - pop {r3, r4, pc} -_0224A588: - mov r1, #0 - strb r1, [r0] - mov r0, #0x55 - add r1, sp, #0 - bl sub_02035B48 - add sp, #4 - pop {r3, r4, pc} -_0224A598: - mov r1, #3 - strb r1, [r0] - mov r0, #0x55 - add r1, sp, #0 - bl sub_02035B48 - add r0, r4, #0 - mov r1, #0 - bl sub_02059058 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov23_0224A570 - - thumb_func_start ov23_0224A5B0 -ov23_0224A5B0: ; 0x0224A5B0 - push {r3, lr} - bl sub_0203608C - bl ov23_0224B040 - bl ov23_022421AC - bl ov23_02254044 - mov r0, #4 - bl sub_0205948C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224A5B0 - - thumb_func_start ov23_0224A5CC -ov23_0224A5CC: ; 0x0224A5CC - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - bl sub_02057518 - str r0, [sp] - ldr r0, [r5, #4] - mov r4, #0 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r7, #0 - bl sub_02035D78 - cmp r0, #0 - bne _0224A5F8 - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} -_0224A5F8: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - cmp r0, #0x3c - ble _0224A604 - mov r4, #1 -_0224A604: - cmp r4, #0 - beq _0224A61E - ldr r0, [sp] - mov r1, #1 - add r0, r0, r7 - add r0, #0xea - strb r1, [r0] - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_0224A61E: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0224A5CC - - thumb_func_start ov23_0224A620 -ov23_0224A620: ; 0x0224A620 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02057518 - add r4, r0, #0 - mov r0, #0xb - mov r1, #8 - bl sub_02018144 - add r1, r0, #0 - mov r2, #0 - str r2, [r1, #0] - add r0, r4, r5 - str r5, [r1, #4] - add r0, #0xea - strb r2, [r0] - ldr r0, _0224A654 ; =ov23_0224A5CC - mov r2, #0x64 - bl sub_0200D9E8 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - pop {r3, r4, r5, pc} - nop -_0224A654: .word ov23_0224A5CC - thumb_func_end ov23_0224A620 - - thumb_func_start ov23_0224A658 -ov23_0224A658: ; 0x0224A658 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #1 - add r5, r0, #0 - tst r1, r2 - beq _0224A66C - mov r1, #0xb - add r0, sp, #0 - strb r1, [r0] - b _0224A69E -_0224A66C: - bl ov23_0224AEA4 - cmp r0, #0 - beq _0224A67C - mov r1, #0xb - add r0, sp, #0 - strb r1, [r0] - b _0224A69E -_0224A67C: - cmp r4, #0xff - bne _0224A684 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224A684: - add r0, r4, #0 - bl ov23_0224AEA4 - cmp r0, #0 - bne _0224A692 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224A692: - mov r1, #5 - add r0, sp, #0 - strb r1, [r0] - add r0, r4, #0 - bl ov23_0224A620 -_0224A69E: - add r0, sp, #0 - strb r5, [r0, #1] - strb r4, [r0, #2] - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - mov r0, #0x55 - add r1, sp, #0 - bl sub_02035B48 - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224A658 - - thumb_func_start ov23_0224A6B8 -ov23_0224A6B8: ; 0x0224A6B8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl ov23_0224AEA4 - cmp r0, #0 - beq _0224A6CE - mov r1, #0xc - add r0, sp, #0 - strb r1, [r0] - b _0224A6D4 -_0224A6CE: - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_0224A6D4: - strb r4, [r0, #1] - mov r0, #0x55 - add r1, sp, #0 - bl sub_02035B48 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov23_0224A6B8 - - thumb_func_start ov23_0224A6E4 -ov23_0224A6E4: ; 0x0224A6E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - bl sub_02057518 - add r6, r0, #0 - bl ov23_0224321C - mov r0, #0 - bl sub_02057FC4 - mov r0, #4 - bl sub_02059464 - bl ov23_022421AC - add r7, r0, #0 - ldrb r0, [r5, #1] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r7, #0 - bl ov23_02254068 - cmp r4, #0 - beq _0224A746 - bl sub_0203608C - add r0, r6, r0 - mov r1, #0 - add r0, #0xfa - strb r1, [r0] - bl sub_0203608C - bl ov23_0224B040 - bl sub_0203608C - bl ov23_0224B00C - bl ov23_022421AC - ldr r3, _0224A770 ; =ov23_0224A5B0 - mov r1, #0xa - mov r2, #1 - bl ov23_02253F40 - b _0224A754 -_0224A746: - bl ov23_022421AC - ldr r3, _0224A770 ; =ov23_0224A5B0 - mov r1, #0xb - mov r2, #1 - bl ov23_02253F40 -_0224A754: - mov r0, #0xff - str r0, [sp] - mov r3, #0 - ldr r1, _0224A774 ; =0x00000424 - mov r0, #4 - mov r2, #0x3c - str r3, [sp, #4] - bl sub_0200502C - ldr r0, _0224A778 ; =0x000005F6 - bl sub_02005748 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A770: .word ov23_0224A5B0 -_0224A774: .word 0x00000424 -_0224A778: .word 0x000005F6 - thumb_func_end ov23_0224A6E4 - - thumb_func_start ov23_0224A77C -ov23_0224A77C: ; 0x0224A77C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r2, #0 - bl sub_02057518 - add r4, r0, #0 - ldr r0, [r4, #0x54] - bl sub_0203D174 - bl sub_020298A0 - add r6, r0, #0 - ldrb r0, [r5] - cmp r0, #5 - bgt _0224A7AE - cmp r0, #0 - blt _0224A7E8 - beq _0224A7C4 - cmp r0, #3 - bne _0224A7A6 - b _0224A96A -_0224A7A6: - cmp r0, #5 - beq _0224A812 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A7AE: - cmp r0, #0xc - bgt _0224A7E8 - cmp r0, #0xb - blt _0224A7E8 - bne _0224A7BA - b _0224A924 -_0224A7BA: - cmp r0, #0xc - bne _0224A7C0 - b _0224A948 -_0224A7C0: - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A7C4: - ldrb r0, [r5, #1] - lsl r1, r0, #2 - add r2, r4, r1 - mov r1, #0x29 - lsl r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, #0 - beq _0224A7E8 - bl ov23_0224AE60 - ldrb r0, [r5, #1] - bl ov23_0224B040 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - beq _0224A7EA -_0224A7E8: - b _0224AA52 -_0224A7EA: - bl sub_020594FC - bl ov23_022421AC - ldr r3, _0224AA58 ; =ov23_0224A308 - mov r1, #2 - mov r2, #1 - bl ov23_02253F40 - mov r0, #0xff - str r0, [sp] - mov r3, #0 - ldr r1, _0224AA5C ; =0x00000424 - mov r0, #4 - mov r2, #0x3c - str r3, [sp, #4] - bl sub_0200502C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A812: - ldrb r0, [r5, #1] - bl sub_02032EE8 - cmp r0, #0 - ldrb r0, [r5, #2] - bne _0224A826 - bl ov23_0224AE60 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A826: - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - bne _0224A848 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - beq _0224A840 - b _0224AA52 -_0224A840: - bl sub_02059514 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A848: - ldrb r0, [r5, #1] - bl sub_02032EE8 - add r1, r0, #0 - ldrb r0, [r5, #2] - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r2, r0] - bl sub_0202600C - cmp r0, #1 - bne _0224A8B2 - ldrb r0, [r5, #2] - bl ov23_0224AE60 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A894 - add r0, r6, #0 - bl sub_020297EC - bl sub_020594FC - bl ov23_022421AC - ldr r3, _0224AA60 ; =ov23_0224A300 - mov r1, #0xd - mov r2, #1 - bl ov23_02253F40 - ldr r0, _0224AA64 ; =0x00000625 - bl sub_02005748 - b _0224A8A8 -_0224A894: - bl sub_0203608C - ldrb r1, [r5, #2] - cmp r1, r0 - bne _0224A8A8 - add r0, r5, #0 - mov r1, #0 - add r2, r6, #0 - bl ov23_0224A6E4 -_0224A8A8: - ldrb r0, [r5, #1] - bl ov23_0224D530 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A8B2: - ldrb r0, [r5, #1] - ldrb r1, [r5, #2] - bl ov23_0224A294 - cmp r0, #0 - beq _0224A92E - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224A904 - add r0, r6, #0 - bl sub_0202955C - mov r0, #1 - bl sub_02059464 - bl ov23_022421AC - add r4, r0, #0 - ldrb r0, [r5, #2] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02254068 - bl ov23_022421AC - ldr r3, _0224AA68 ; =ov23_0224A328 - mov r1, #0xc - mov r2, #1 - bl ov23_02253F40 - ldr r0, _0224AA6C ; =0x00000425 - bl sub_0200549C - ldr r0, _0224AA64 ; =0x00000625 - bl sub_02005748 - b _0224A918 -_0224A904: - bl sub_0203608C - ldrb r1, [r5, #2] - cmp r1, r0 - bne _0224A918 - add r0, r5, #0 - mov r1, #1 - add r2, r6, #0 - bl ov23_0224A6E4 -_0224A918: - ldrb r0, [r5, #1] - ldrb r1, [r5, #2] - bl ov23_0224D518 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A924: - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - beq _0224A930 -_0224A92E: - b _0224AA52 -_0224A930: - mov r0, #2 - bl sub_02059464 - bl ov23_022421AC - ldr r3, _0224AA70 ; =ov23_0224A310 - mov r1, #6 - mov r2, #1 - bl ov23_02253F40 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A948: - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224AA52 - mov r0, #0x20 - bl sub_02059464 - bl ov23_022421AC - ldr r3, _0224AA74 ; =ov23_0224A31C - mov r1, #5 - mov r2, #1 - bl ov23_02253F40 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0224A96A: - ldrb r0, [r5, #1] - mov r1, #0 - add r0, r4, r0 - add r0, #0xfa - strb r1, [r0] - ldrb r0, [r5, #1] - bl ov23_0224B040 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224AA10 - ldr r0, [r4, #0x54] - bl sub_0203D174 - bl sub_020298A0 - add r6, r0, #0 - bl sub_0202958C - add r1, sp, #8 - strb r0, [r1] - add r0, r6, #0 - bl sub_020295C0 - ldr r0, [r4, #0x54] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206AA40 - ldrb r0, [r5, #1] - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r1, [r1, r0] - cmp r1, #0 - beq _0224A9CE - ldr r0, [r4, #0x54] - bl sub_0206DAB8 - ldr r0, _0224AA78 ; =0x000002B2 - ldr r1, _0224AA7C ; =0x0000FFFF - ldrh r2, [r4, r0] - cmp r2, r1 - beq _0224A9CE - add r1, r2, #1 - strh r1, [r4, r0] -_0224A9CE: - bl sub_020594FC - ldr r0, _0224AA80 ; =0x0000062B - bl sub_02005748 - add r0, r6, #0 - bl sub_0202958C - add r1, sp, #8 - ldrb r1, [r1] - cmp r1, r0 - bne _0224A9F6 - bl ov23_022421AC - ldr r3, _0224AA60 ; =ov23_0224A300 - mov r1, #7 - mov r2, #1 - bl ov23_02253F40 - b _0224A9FE -_0224A9F6: - mov r0, #0x60 - add r1, sp, #8 - bl sub_020360D0 -_0224A9FE: - mov r0, #0xff - str r0, [sp] - mov r3, #0 - ldr r1, _0224AA5C ; =0x00000424 - mov r0, #4 - mov r2, #0x3c - str r3, [sp, #4] - bl sub_0200502C -_0224AA10: - ldrb r0, [r5, #1] - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224AA4C - bl sub_0203608C - bl sub_02032EE8 - add r1, r0, #0 - ldrb r0, [r5, #1] - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r2, r0] - bl sub_0202600C - cmp r0, #1 - bne _0224AA4C - ldrb r0, [r5, #1] - bl sub_02032EE8 - add r1, r0, #0 - ldr r0, [r4, #0x54] - bl sub_0206DAD4 -_0224AA4C: - ldrb r0, [r5, #1] - bl ov23_0224A204 -_0224AA52: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0224AA58: .word ov23_0224A308 -_0224AA5C: .word 0x00000424 -_0224AA60: .word ov23_0224A300 -_0224AA64: .word 0x00000625 -_0224AA68: .word ov23_0224A328 -_0224AA6C: .word 0x00000425 -_0224AA70: .word ov23_0224A310 -_0224AA74: .word ov23_0224A31C -_0224AA78: .word 0x000002B2 -_0224AA7C: .word 0x0000FFFF -_0224AA80: .word 0x0000062B - thumb_func_end ov23_0224A77C - - thumb_func_start ov23_0224AA84 -ov23_0224AA84: ; 0x0224AA84 - push {r3, lr} - bl sub_02057518 - mov r2, #0xff - add r1, r2, #0 - mov r3, #0 - add r1, #0x6b -_0224AA92: - add r3, r3, #1 - strh r2, [r0, r1] - add r0, #0x22 - cmp r3, #8 - blt _0224AA92 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224AA84 - - thumb_func_start ov23_0224AAA0 -ov23_0224AAA0: ; 0x0224AAA0 - push {r3, lr} - bl sub_02057518 - ldr r1, _0224AAAC ; =0x0000025A - add r0, r0, r1 - pop {r3, pc} - ; .align 2, 0 -_0224AAAC: .word 0x0000025A - thumb_func_end ov23_0224AAA0 - - thumb_func_start ov23_0224AAB0 -ov23_0224AAB0: ; 0x0224AAB0 - push {r3, r4, r5, lr} - bl sub_02057518 - add r4, r0, #0 - ldr r0, _0224AB28 ; =0x000002B9 - mov r1, #0 - strb r1, [r4, r0] - bl sub_0203608C - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224AAE8 - bl sub_0203608C - add r1, r0, #0 - lsl r1, r1, #2 - add r2, r4, r1 - mov r1, #0x29 - lsl r1, r1, #4 - ldr r1, [r2, r1] - mov r0, #0x5b - bl sub_020360D0 - pop {r3, r4, r5, pc} -_0224AAE8: - mov r0, #0xf - bl sub_02025E6C - add r4, r0, #0 - mov r0, #0x14 - mov r1, #0xf - bl sub_02023790 - add r5, r0, #0 - cmp r4, #0 - bne _0224AB02 - bl sub_02022974 -_0224AB02: - cmp r5, #0 - bne _0224AB0A - bl sub_02022974 -_0224AB0A: - add r0, r4, #0 - add r1, r5, #0 - bl sub_02025EE0 - mov r0, #0x5b - add r1, r4, #0 - bl sub_020360D0 - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224AB28: .word 0x000002B9 - thumb_func_end ov23_0224AAB0 - - thumb_func_start ov23_0224AB2C -ov23_0224AB2C: ; 0x0224AB2C - mov r0, #0x20 - bx lr - thumb_func_end ov23_0224AB2C - - thumb_func_start ov23_0224AB30 -ov23_0224AB30: ; 0x0224AB30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - add r6, r2, #0 - bl sub_02057518 - add r7, r0, #0 - add r0, sp, #4 - strb r4, [r0] - beq _0224ABB0 - ldr r1, _0224ABB8 ; =0x0000014A - mov r0, #0x22 - add r5, r4, #0 - mul r5, r0 - add r1, r7, r1 - add r0, r6, #0 - add r1, r1, r5 - bl sub_02025E80 - add r0, r6, #0 - mov r1, #0xf - bl sub_02025F04 - str r0, [sp] - bl sub_02023C3C - cmp r0, #0 - beq _0224AB6E - ldr r0, _0224ABBC ; =0x0000016A - add r1, r7, r5 - strh r4, [r1, r0] -_0224AB6E: - ldr r0, _0224ABB8 ; =0x0000014A - mov r4, #0 - add r5, r7, #0 - add r6, r7, r0 -_0224AB76: - ldr r0, _0224ABBC ; =0x0000016A - ldrh r0, [r5, r0] - cmp r0, #0xff - beq _0224AB8C - ldr r0, _0224ABBC ; =0x0000016A - add r1, r6, #0 - strh r4, [r5, r0] - mov r0, #0x5c - mov r2, #0x22 - bl sub_02035A3C -_0224AB8C: - add r4, r4, #1 - add r5, #0x22 - add r6, #0x22 - cmp r4, #8 - blt _0224AB76 - mov r0, #0x5d - add r1, sp, #4 - mov r2, #1 - bl sub_02035AC4 - ldr r0, [sp] - bl sub_020237BC - ldr r0, _0224ABC0 ; =0x000002C2 - mov r1, #1 - add sp, #8 - strb r1, [r7, r0] - pop {r3, r4, r5, r6, r7, pc} -_0224ABB0: - bl sub_02022974 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224ABB8: .word 0x0000014A -_0224ABBC: .word 0x0000016A -_0224ABC0: .word 0x000002C2 - thumb_func_end ov23_0224AB30 - - thumb_func_start ov23_0224ABC4 -ov23_0224ABC4: ; 0x0224ABC4 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - bl sub_02057518 - add r4, r0, #0 - beq _0224AC08 - ldrh r5, [r7, #0x20] - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224ABE4 - bl sub_020181C4 -_0224ABE4: - mov r0, #0x29 - lsl r0, r0, #4 - add r6, r4, r0 - lsl r0, r5, #2 - str r0, [sp] - mov r0, #0xf - bl sub_02025E6C - ldr r1, [sp] - str r0, [r6, r1] - ldr r1, [r6, r1] - add r0, r7, #0 - bl sub_02025E80 - add r0, r4, r5 - mov r1, #1 - add r0, #0xfa - strb r1, [r0] -_0224AC08: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_0224ABC4 - - thumb_func_start ov23_0224AC0C -ov23_0224AC0C: ; 0x0224AC0C - mov r0, #0x22 - bx lr - thumb_func_end ov23_0224AC0C - - thumb_func_start ov23_0224AC10 -ov23_0224AC10: ; 0x0224AC10 - push {r3, r4, r5, lr} - add r5, r2, #0 - bl sub_02057518 - add r4, r0, #0 - bl sub_0203608C - ldrb r1, [r5] - cmp r1, r0 - bne _0224AC2A - ldr r0, _0224AC34 ; =0x000002B9 - mov r1, #1 - strb r1, [r4, r0] -_0224AC2A: - ldr r0, _0224AC38 ; =0x000002C2 - mov r1, #0 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} - nop -_0224AC34: .word 0x000002B9 -_0224AC38: .word 0x000002C2 - thumb_func_end ov23_0224AC10 - - thumb_func_start ov23_0224AC3C -ov23_0224AC3C: ; 0x0224AC3C - push {r3, lr} - bl sub_02057518 - ldr r1, _0224AC48 ; =0x000002B9 - ldrb r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 -_0224AC48: .word 0x000002B9 - thumb_func_end ov23_0224AC3C - - thumb_func_start ov23_0224AC4C -ov23_0224AC4C: ; 0x0224AC4C - push {r4, r5, r6, lr} - mov r6, #0 - bl sub_0203608C - add r5, r0, #0 - bl sub_02057518 - add r4, r0, #0 - lsl r0, r5, #2 - add r2, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r1, [r2, r0] - cmp r1, #0 - beq _0224AC84 - add r6, r1, #0 - mov r1, #0 - str r1, [r2, r0] - add r0, r4, r5 - add r0, #0xfa - strb r1, [r0] - mov r1, #0x22 - mul r1, r5 - mov r0, #0xff - add r2, r4, r1 - add r1, r0, #0 - add r1, #0x6b - strh r0, [r2, r1] -_0224AC84: - mov r5, #0 -_0224AC86: - add r0, r5, #0 - bl ov23_0224AE60 - add r5, r5, #1 - cmp r5, #8 - blt _0224AC86 - cmp r6, #0 - beq _0224ACB4 - mov r0, #0x29 - lsl r0, r0, #4 - str r6, [r4, r0] - add r0, r4, #0 - mov r1, #1 - add r0, #0xfa - strb r1, [r0] - ldr r1, _0224ACB8 ; =0x0000014A - add r0, r6, #0 - add r1, r4, r1 - bl sub_02025E80 - ldr r0, _0224ACBC ; =0x0000016A - mov r1, #0 - strh r1, [r4, r0] -_0224ACB4: - pop {r4, r5, r6, pc} - nop -_0224ACB8: .word 0x0000014A -_0224ACBC: .word 0x0000016A - thumb_func_end ov23_0224AC4C - - thumb_func_start ov23_0224ACC0 -ov23_0224ACC0: ; 0x0224ACC0 - push {r4, lr} - add r4, r0, #0 - bl sub_02057518 - ldr r0, [r0, #4] - cmp r0, #0 - beq _0224ACE4 - add r1, r4, #0 - bl ov23_0224993C - bl ov23_0224999C - cmp r0, #0 - bne _0224ACE0 - mov r0, #1 - pop {r4, pc} -_0224ACE0: - mov r0, #0 - pop {r4, pc} -_0224ACE4: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov23_0224ACC0 - - thumb_func_start ov23_0224ACE8 -ov23_0224ACE8: ; 0x0224ACE8 - push {r3, lr} - add r1, sp, #0 - strb r0, [r1] - mov r0, #0x1a - add r1, sp, #0 - bl sub_02035B48 - pop {r3, pc} - thumb_func_end ov23_0224ACE8 - - thumb_func_start ov23_0224ACF8 -ov23_0224ACF8: ; 0x0224ACF8 - ldr r3, _0224AD00 ; =ov23_02243020 - ldrb r0, [r2] - bx r3 - nop -_0224AD00: .word ov23_02243020 - thumb_func_end ov23_0224ACF8 - - thumb_func_start ov23_0224AD04 -ov23_0224AD04: ; 0x0224AD04 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02057518 - add r4, r0, #0 - bne _0224AD14 - ldr r0, _0224AD3C ; =0x0000FFFF - pop {r3, r4, r5, pc} -_0224AD14: - bl sub_0203608C - cmp r5, r0 - bne _0224AD26 - lsl r0, r5, #3 - add r0, r4, r0 - add r0, #0xa2 - ldrh r0, [r0] - pop {r3, r4, r5, pc} -_0224AD26: - bl sub_02058C40 - cmp r0, #0 - beq _0224AD38 - lsl r0, r5, #3 - add r0, r4, r0 - add r0, #0xa2 - ldrh r0, [r0] - pop {r3, r4, r5, pc} -_0224AD38: - ldr r0, _0224AD3C ; =0x0000FFFF - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224AD3C: .word 0x0000FFFF - thumb_func_end ov23_0224AD04 - - thumb_func_start ov23_0224AD40 -ov23_0224AD40: ; 0x0224AD40 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02057518 - add r4, r0, #0 - bne _0224AD50 - ldr r0, _0224AD78 ; =0x0000FFFF - pop {r3, r4, r5, pc} -_0224AD50: - bl sub_0203608C - cmp r5, r0 - bne _0224AD62 - lsl r0, r5, #3 - add r0, r4, r0 - add r0, #0xa4 - ldrh r0, [r0] - pop {r3, r4, r5, pc} -_0224AD62: - bl sub_02058C40 - cmp r0, #0 - beq _0224AD74 - lsl r0, r5, #3 - add r0, r4, r0 - add r0, #0xa4 - ldrh r0, [r0] - pop {r3, r4, r5, pc} -_0224AD74: - ldr r0, _0224AD78 ; =0x0000FFFF - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224AD78: .word 0x0000FFFF - thumb_func_end ov23_0224AD40 - - thumb_func_start ov23_0224AD7C -ov23_0224AD7C: ; 0x0224AD7C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_02057518 - ldr r0, [r0, #4] - add r1, r5, #0 - bl ov23_0224993C - add r1, r4, #0 - bl ov23_02249994 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224AD7C - - thumb_func_start ov23_0224AD98 -ov23_0224AD98: ; 0x0224AD98 - push {r4, lr} - add r4, r0, #0 - bl sub_02057518 - ldr r0, [r0, #4] - add r1, r4, #0 - bl ov23_0224993C - mov r1, #0 - bl ov23_02249994 - pop {r4, pc} - thumb_func_end ov23_0224AD98 - - thumb_func_start ov23_0224ADB0 -ov23_0224ADB0: ; 0x0224ADB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - str r1, [sp] - str r2, [sp, #4] - add r6, r3, #0 - bl sub_02057518 - add r4, r0, #0 - add r4, #0x62 - lsl r7, r5, #3 - add r0, r6, #0 - add r5, r4, r7 - bl sub_0206419C - ldr r1, [sp] - add r0, r1, r0 - strh r0, [r4, r7] - add r0, r6, #0 - bl sub_020641A8 - ldr r1, [sp, #4] - add r0, r1, r0 - strh r0, [r5, #2] - strb r6, [r5, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_0224ADB0 - - thumb_func_start ov23_0224ADE8 -ov23_0224ADE8: ; 0x0224ADE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r7, r1, #0 - str r2, [sp] - str r3, [sp, #4] - bl sub_02057518 - add r4, r0, #0 - beq _0224AE58 - add r1, r4, #0 - add r1, #0xa2 - lsl r0, r6, #3 - add r5, r1, r0 - ldr r0, _0224AE5C ; =0x000002BD - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0224AE18 - ldrh r1, [r5] - ldrh r3, [r5, #2] - ldr r0, [r4, #0x54] - mov r2, #0 - bl ov5_021F5634 -_0224AE18: - ldr r0, [sp] - strh r7, [r5] - strh r0, [r5, #2] - ldr r0, [sp, #4] - strb r0, [r5, #4] - lsl r0, r6, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - cmp r0, #0 - beq _0224AE36 - ldr r2, [sp] - ldr r3, [sp, #4] - add r1, r7, #0 - bl sub_0205ECE0 -_0224AE36: - ldr r0, _0224AE5C ; =0x000002BD - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0224AE4A - ldrh r1, [r5] - ldrh r3, [r5, #2] - ldr r0, [r4, #0x54] - mov r2, #0 - bl ov5_021F5634 -_0224AE4A: - ldr r0, _0224AE5C ; =0x000002BD - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0224AE58 - add r0, r6, #0 - bl ov23_0224B040 -_0224AE58: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224AE5C: .word 0x000002BD - thumb_func_end ov23_0224ADE8 - - thumb_func_start ov23_0224AE60 -ov23_0224AE60: ; 0x0224AE60 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02057518 - add r4, r0, #0 - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224AEA0 - bl sub_020181C4 - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x29 - mov r2, #0 - lsl r0, r0, #4 - str r2, [r1, r0] - add r0, r4, r5 - add r0, #0xfa - strb r2, [r0] - mov r0, #0x22 - mul r0, r5 - mov r2, #0xff - add r1, r4, r0 - add r0, r2, #0 - add r0, #0x6b - strh r2, [r1, r0] - mov r0, #1 - pop {r3, r4, r5, pc} -_0224AEA0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224AE60 - - thumb_func_start ov23_0224AEA4 -ov23_0224AEA4: ; 0x0224AEA4 - push {r4, lr} - add r4, r0, #0 - bl sub_02057518 - lsl r1, r4, #2 - add r1, r0, r1 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224AEBE - mov r0, #1 - pop {r4, pc} -_0224AEBE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224AEA4 - - thumb_func_start ov23_0224AEC4 -ov23_0224AEC4: ; 0x0224AEC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r7, r1, #0 - bl sub_02057518 - add r4, r0, #0 - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x29 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, #0 - bne _0224AF42 - add r0, r7, #0 - bl sub_02032EE8 - str r0, [sp] - cmp r0, #0 - beq _0224AF42 - mov r0, #0x29 - lsl r0, r0, #4 - add r6, r4, r0 - lsl r0, r5, #2 - str r0, [sp, #4] - mov r0, #0xf - bl sub_02025E6C - ldr r1, [sp, #4] - str r0, [r6, r1] - ldr r0, [sp] - ldr r1, [r6, r1] - bl sub_02025E80 - add r0, r4, r5 - mov r1, #1 - add r0, #0xfa - strb r1, [r0] - mov r0, #0x22 - add r1, r5, #0 - mul r1, r0 - ldr r2, _0224AF48 ; =0x0000016A - add r0, r4, r1 - strh r5, [r0, r2] - sub r2, #0x20 - add r2, r4, r2 - ldr r0, [sp] - add r1, r2, r1 - bl sub_02025E80 - bl sub_0203608C - cmp r7, r0 - bne _0224AF3C - ldr r0, [r4, #0x54] - ldr r0, [r0, #0xc] - bl sub_020298A0 - bl sub_020297B4 -_0224AF3C: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224AF42: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224AF48: .word 0x0000016A - thumb_func_end ov23_0224AEC4 - - thumb_func_start ov23_0224AF4C -ov23_0224AF4C: ; 0x0224AF4C - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02057518 - add r5, r0, #0 - add r5, #0x28 - lsl r4, r4, #2 - ldr r0, [r5, r4] - cmp r0, #0 - beq _0224AF78 - bl sub_020714F0 - cmp r0, #0 - beq _0224AF70 - ldr r0, [r5, r4] - bl sub_0207136C - b _0224AF74 -_0224AF70: - bl sub_02022974 -_0224AF74: - mov r0, #0 - str r0, [r5, r4] -_0224AF78: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224AF4C - - thumb_func_start ov23_0224AF7C -ov23_0224AF7C: ; 0x0224AF7C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02057518 - ldr r1, _0224B008 ; =0x000002BD - ldrb r1, [r0, r1] - cmp r1, #0 - bne _0224B006 - lsl r4, r5, #2 - add r1, r0, r4 - ldr r1, [r1, #8] - cmp r1, #0 - beq _0224B006 - add r7, r0, #0 - add r7, #0xfa - ldrb r2, [r7, r5] - cmp r2, #3 - bhi _0224B006 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224AFAC: ; jump table - .short _0224B000 - _0224AFAC - 2 ; case 0 - .short _0224AFE8 - _0224AFAC - 2 ; case 1 - .short _0224AFD0 - _0224AFAC - 2 ; case 2 - .short _0224AFB4 - _0224AFAC - 2 ; case 3 -_0224AFB4: - add r6, r0, #0 - add r6, #0x28 - ldr r0, [r6, r4] - cmp r0, #0 - bne _0224AFCA - add r0, r1, #0 - bl sub_0205EB3C - bl ov5_021F5488 - str r0, [r6, r4] -_0224AFCA: - mov r0, #0 - strb r0, [r7, r5] - pop {r3, r4, r5, r6, r7, pc} -_0224AFD0: - add r5, r0, #0 - add r5, #0x28 - ldr r0, [r5, r4] - cmp r0, #0 - bne _0224B006 - add r0, r1, #0 - bl sub_0205EB3C - bl ov5_021F52E4 - str r0, [r5, r4] - pop {r3, r4, r5, r6, r7, pc} -_0224AFE8: - add r5, r0, #0 - add r5, #0x28 - ldr r0, [r5, r4] - cmp r0, #0 - bne _0224B006 - add r0, r1, #0 - bl sub_0205EB3C - bl ov5_021F511C - str r0, [r5, r4] - pop {r3, r4, r5, r6, r7, pc} -_0224B000: - add r0, r5, #0 - bl ov23_0224AF4C -_0224B006: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B008: .word 0x000002BD - thumb_func_end ov23_0224AF7C - - thumb_func_start ov23_0224B00C -ov23_0224B00C: ; 0x0224B00C - push {r4, lr} - add r4, r0, #0 - bl sub_02057518 - add r0, #0xfa - ldrb r1, [r0, r4] - cmp r1, #1 - beq _0224B020 - mov r1, #2 - strb r1, [r0, r4] -_0224B020: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224B00C - - thumb_func_start ov23_0224B024 -ov23_0224B024: ; 0x0224B024 - push {r4, lr} - add r4, r0, #0 - bl sub_02057518 - add r0, #0xfa - ldrb r1, [r0, r4] - cmp r1, #1 - beq _0224B038 - mov r1, #3 - strb r1, [r0, r4] -_0224B038: - add r0, r4, #0 - bl ov23_0224AF4C - pop {r4, pc} - thumb_func_end ov23_0224B024 - - thumb_func_start ov23_0224B040 -ov23_0224B040: ; 0x0224B040 - push {r4, lr} - add r4, r0, #0 - bl sub_02057518 - add r0, #0xfa - ldrb r1, [r0, r4] - cmp r1, #1 - beq _0224B054 - mov r1, #0 - strb r1, [r0, r4] -_0224B054: - add r0, r4, #0 - bl ov23_0224AF4C - pop {r4, pc} - thumb_func_end ov23_0224B040 - - thumb_func_start ov23_0224B05C -ov23_0224B05C: ; 0x0224B05C - push {r4, r5} - asr r2, r0, #4 - lsr r2, r2, #0x1b - add r2, r0, r2 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r3, r0, #5 - ldr r4, _0224B090 ; =0x0225760C - ldr r5, _0224B094 ; =0x02257620 - asr r2, r2, #5 - mov r0, #0 -_0224B074: - ldrb r1, [r4] - cmp r2, r1 - bne _0224B080 - ldrb r1, [r5] - cmp r3, r1 - beq _0224B08C -_0224B080: - add r0, r0, #1 - add r4, r4, #1 - add r5, r5, #1 - cmp r0, #0x11 - blt _0224B074 - mov r0, #0x10 -_0224B08C: - pop {r4, r5} - bx lr - ; .align 2, 0 -_0224B090: .word 0x0225760C -_0224B094: .word 0x02257620 - thumb_func_end ov23_0224B05C - - thumb_func_start ov23_0224B098 -ov23_0224B098: ; 0x0224B098 - push {r4, r5} - sub sp, #8 - ldr r3, _0224B0D8 ; =0x0225683C - add r2, sp, #0 - ldrh r4, [r3, #0x1c] - strh r4, [r2] - ldrh r4, [r3, #0x1e] - ldrh r3, [r3, #0x20] - strh r4, [r2, #2] - strh r3, [r2, #4] - ldrh r4, [r2] - ldrh r5, [r2, #2] - mov r3, #0 -_0224B0B2: - add r2, r4, #0 - add r2, #0x20 - cmp r0, r2 - bne _0224B0C6 - cmp r1, r5 - bne _0224B0C6 - add sp, #8 - mov r0, #1 - pop {r4, r5} - bx lr -_0224B0C6: - add r3, r3, #1 - add r4, #0x20 - cmp r3, #8 - blt _0224B0B2 - mov r0, #0 - add sp, #8 - pop {r4, r5} - bx lr - nop -_0224B0D8: .word 0x0225683C - thumb_func_end ov23_0224B098 - - thumb_func_start ov23_0224B0DC -ov23_0224B0DC: ; 0x0224B0DC - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldr r1, _0224B124 ; =0x0225683C - add r5, r0, #0 - ldrh r2, [r1, #0x22] - add r0, sp, #0 - strh r2, [r0] - ldrh r2, [r1, #0x24] - ldrh r1, [r1, #0x26] - strh r2, [r0, #2] - strh r1, [r0, #4] - bl sub_02033DFC - cmp r0, #0 - beq _0224B10A - add r0, sp, #0 - ldrh r1, [r0] - add sp, #8 - strh r1, [r4] - ldrh r0, [r0, #2] - strh r0, [r4, #2] - pop {r3, r4, r5, pc} -_0224B10A: - cmp r5, #0x10 - bne _0224B110 - mov r5, #0 -_0224B110: - add r0, sp, #0 - ldrh r2, [r0] - lsl r1, r5, #5 - add r1, r2, r1 - add r1, #0x20 - strh r1, [r4] - ldrh r0, [r0, #2] - strh r0, [r4, #2] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B124: .word 0x0225683C - thumb_func_end ov23_0224B0DC - - thumb_func_start ov23_0224B128 -ov23_0224B128: ; 0x0224B128 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_02036180 - cmp r0, #0 - beq _0224B138 - mov r5, #0x10 -_0224B138: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224B0DC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224B128 - - thumb_func_start ov23_0224B144 -ov23_0224B144: ; 0x0224B144 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, _0224B274 ; =0x022577AC - str r1, [sp] - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224B154 - b _0224B272 -_0224B154: - bl sub_02028554 - cmp r0, #0x94 - beq _0224B160 - bl sub_02022974 -_0224B160: - ldr r0, _0224B274 ; =0x022577AC - ldr r2, _0224B278 ; =0x000013E8 - str r4, [r0, #0] - add r0, r4, #0 - mov r1, #0 - bl sub_020C4CF4 - ldr r0, _0224B274 ; =0x022577AC - ldr r1, [sp] - ldr r2, [r0, #0] - mov r7, #0xff - str r1, [r2, #0] - mov r1, #0 - add r2, r1, #0 - add r3, r1, #0 -_0224B17E: - ldr r4, [r0, #0] - ldr r5, _0224B27C ; =0x00001284 - add r6, r4, r2 - ldr r4, _0224B280 ; =0x00000FFF - strh r4, [r6, r5] - ldr r4, [r0, #0] - add r5, r5, #2 - add r6, r4, r2 - ldr r4, _0224B280 ; =0x00000FFF - strh r4, [r6, r5] - ldr r4, [r0, #0] - ldr r5, _0224B284 ; =0x000012B4 - add r6, r4, r2 - ldr r4, _0224B280 ; =0x00000FFF - strh r4, [r6, r5] - ldr r4, [r0, #0] - add r5, r5, #2 - add r6, r4, r2 - ldr r4, _0224B280 ; =0x00000FFF - add r2, r2, #6 - strh r4, [r6, r5] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B288 ; =0x0000136B - strb r7, [r5, r4] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B28C ; =0x00001373 - strb r7, [r5, r4] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B290 ; =0x00001363 - strb r7, [r5, r4] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B294 ; =0x0000137B - strb r7, [r5, r4] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B298 ; =0x0000134B - strb r7, [r5, r4] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B29C ; =0x00001353 - strb r7, [r5, r4] - ldr r4, [r0, #0] - add r5, r4, r1 - ldr r4, _0224B2A0 ; =0x0000135B - add r1, r1, #1 - strb r7, [r5, r4] - ldr r4, [r0, #0] - ldr r5, _0224B2A4 ; =0x000013AC - add r6, r4, r3 - mov r4, #0x48 - strh r4, [r6, r5] - ldr r4, [r0, #0] - ldr r5, _0224B2A8 ; =0x000001B5 - add r6, r4, r3 - ldr r4, _0224B2AC ; =0x000013BC - strh r5, [r6, r4] - ldr r4, [r0, #0] - mov r5, #1 - add r6, r4, r3 - ldr r4, _0224B2B0 ; =0x000013CC - add r3, r3, #2 - strh r5, [r6, r4] - cmp r1, #8 - blt _0224B17E - mov r5, #0 - ldr r6, _0224B274 ; =0x022577AC - add r4, r5, #0 - mov r7, #0xff -_0224B20E: - ldr r0, [r6, #0] - add r0, #0xa - add r0, r0, r4 - bl sub_020292C0 - ldr r0, [r6, #0] - add r4, #0x96 - add r1, r0, r5 - ldr r0, _0224B2B4 ; =0x000012E5 - strb r7, [r1, r0] - ldr r0, [r6, #0] - add r1, r0, r5 - ldr r0, _0224B2B8 ; =0x0000133A - add r5, r5, #1 - strb r7, [r1, r0] - cmp r5, #0x11 - blt _0224B20E - ldr r0, _0224B274 ; =0x022577AC - mov r2, #0x22 - ldr r1, [r0, #0] - ldr r0, _0224B2BC ; =0x00000A04 - lsl r2, r2, #6 - add r0, r1, r0 - add r1, r7, #0 - bl sub_020C4CF4 - ldr r0, [sp] - bl ov23_0224B2C8 - ldr r2, _0224B274 ; =0x022577AC - ldr r0, _0224B2C0 ; =0x000013DC - ldr r1, [r2, #0] - mov r3, #0x48 - strh r3, [r1, r0] - add r1, r0, #2 - ldr r4, _0224B2A8 ; =0x000001B5 - ldr r3, [r2, #0] - add r0, r0, #4 - strh r4, [r3, r1] - ldr r1, [r2, #0] - mov r3, #1 - strb r3, [r1, r0] - ldr r0, _0224B2C4 ; =ov23_0224C5B4 - mov r1, #0 - mov r2, #0x64 - bl sub_0200D9E8 - ldr r1, _0224B274 ; =0x022577AC - ldr r1, [r1, #0] - str r0, [r1, #4] -_0224B272: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B274: .word 0x022577AC -_0224B278: .word 0x000013E8 -_0224B27C: .word 0x00001284 -_0224B280: .word 0x00000FFF -_0224B284: .word 0x000012B4 -_0224B288: .word 0x0000136B -_0224B28C: .word 0x00001373 -_0224B290: .word 0x00001363 -_0224B294: .word 0x0000137B -_0224B298: .word 0x0000134B -_0224B29C: .word 0x00001353 -_0224B2A0: .word 0x0000135B -_0224B2A4: .word 0x000013AC -_0224B2A8: .word 0x000001B5 -_0224B2AC: .word 0x000013BC -_0224B2B0: .word 0x000013CC -_0224B2B4: .word 0x000012E5 -_0224B2B8: .word 0x0000133A -_0224B2BC: .word 0x00000A04 -_0224B2C0: .word 0x000013DC -_0224B2C4: .word ov23_0224C5B4 - thumb_func_end ov23_0224B144 - - thumb_func_start ov23_0224B2C8 -ov23_0224B2C8: ; 0x0224B2C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_0203D174 - bl sub_02029894 - add r4, r0, #0 - bl sub_020298AC - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0202CD88 - bl sub_0202D034 - add r1, r0, #0 - add r0, r6, #0 - bl sub_020294D4 - ldr r1, _0224B32C ; =0x022577AC - add r0, r4, #0 - ldr r2, [r1, #0] - ldr r1, _0224B330 ; =0x0000096A - add r1, r2, r1 - mov r2, #0x94 - bl sub_020C4DB0 - ldr r1, _0224B32C ; =0x022577AC - add r0, r4, #0 - ldr r2, [r1, #0] - ldr r1, _0224B334 ; =0x00001204 - add r1, r2, r1 - bl ov23_0224B39C - ldr r1, _0224B32C ; =0x022577AC - add r0, r4, #0 - ldr r1, [r1, #0] - mov r2, #0x94 - add r1, #0xa - bl sub_020C4DB0 - ldr r1, _0224B32C ; =0x022577AC - add r0, r4, #0 - ldr r2, [r1, #0] - ldr r1, _0224B338 ; =0x00000A04 - add r1, r2, r1 - bl ov23_0224B39C - pop {r4, r5, r6, pc} - nop -_0224B32C: .word 0x022577AC -_0224B330: .word 0x0000096A -_0224B334: .word 0x00001204 -_0224B338: .word 0x00000A04 - thumb_func_end ov23_0224B2C8 - - thumb_func_start ov23_0224B33C -ov23_0224B33C: ; 0x0224B33C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - mov r0, #0 - mov ip, r0 - mov lr, r0 - add r0, r1, #0 - lsl r0, r0, #2 - str r1, [sp] - str r2, [sp, #4] - add r3, r3, r0 - mov r7, #1 -_0224B354: - ldr r1, [sp] - mov r0, ip - add r0, r1, r0 - cmp r0, #0x20 - bge _0224B386 - ldr r1, [sp, #4] - mov r0, lr - mov r2, #0 - add r4, r1, r0 -_0224B366: - ldrb r0, [r4] - cmp r0, #0 - beq _0224B37E - add r1, r6, r2 - cmp r1, #0x20 - bge _0224B37E - add r0, r7, #0 - lsl r0, r1 - ldr r5, [r3, #0] - mvn r0, r0 - and r0, r5 - str r0, [r3, #0] -_0224B37E: - add r2, r2, #1 - add r4, r4, #1 - cmp r2, #3 - blt _0224B366 -_0224B386: - mov r0, lr - add r0, r0, #3 - mov lr, r0 - mov r0, ip - add r0, r0, #1 - add r3, r3, #4 - mov ip, r0 - cmp r0, #3 - blt _0224B354 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0224B33C - - thumb_func_start ov23_0224B39C -ov23_0224B39C: ; 0x0224B39C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r2, sp, #0x10 - str r1, [sp] - ldr r3, _0224B428 ; =0x02256874 - add r5, r0, #0 - add r2, #1 - mov r1, #9 -_0224B3AC: - ldrb r0, [r3] - add r3, r3, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0224B3AC - ldr r3, _0224B42C ; =0x0225687D - add r2, sp, #8 - mov r1, #9 -_0224B3BE: - ldrb r0, [r3] - add r3, r3, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0224B3BE - ldr r0, [sp] - mov r1, #0xff - mov r2, #0x80 - bl sub_020C4CF4 - mov r4, #0 -_0224B3D6: - add r0, r5, #0 - add r1, r4, #0 - bl sub_020293B0 - str r0, [sp, #4] - cmp r0, #0 - beq _0224B41C - add r0, r5, #0 - add r1, r4, #0 - bl sub_020293FC - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202942C - add r6, r0, #0 - cmp r4, #0 - bne _0224B402 - add r2, sp, #0x10 - add r2, #1 - b _0224B412 -_0224B402: - cmp r4, #0x10 - bge _0224B410 - ldr r0, [sp, #4] - bl sub_0205741C - add r2, r0, #0 - b _0224B412 -_0224B410: - add r2, sp, #8 -_0224B412: - ldr r3, [sp] - add r0, r7, #0 - add r1, r6, #0 - bl ov23_0224B33C -_0224B41C: - add r4, r4, #1 - cmp r4, #0x20 - blt _0224B3D6 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0224B428: .word 0x02256874 -_0224B42C: .word 0x0225687D - thumb_func_end ov23_0224B39C - - thumb_func_start ov23_0224B430 -ov23_0224B430: ; 0x0224B430 - push {r3, lr} - bl ov23_0224C6E8 - ldr r0, _0224B458 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #4] - cmp r0, #0 - beq _0224B44C - bl sub_0200DA58 - ldr r0, _0224B458 ; =0x022577AC - mov r1, #0 - ldr r0, [r0, #0] - str r1, [r0, #4] -_0224B44C: - ldr r0, _0224B458 ; =0x022577AC - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _0224B45C ; =0x000013E4 - strb r2, [r1, r0] - pop {r3, pc} - ; .align 2, 0 -_0224B458: .word 0x022577AC -_0224B45C: .word 0x000013E4 - thumb_func_end ov23_0224B430 - - thumb_func_start ov23_0224B460 -ov23_0224B460: ; 0x0224B460 - push {r3, r4, r5, r6, r7, lr} - ldr r1, _0224B4D0 ; =0x022577AC - ldr r0, _0224B4D4 ; =0x000013E4 - ldr r2, [r1, #0] - mov r4, #0 - strb r4, [r2, r0] - ldr r1, [r1, #0] - add r0, r0, #2 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224B4B2 -_0224B476: - add r0, r4, #0 - bl ov23_0224C6AC - add r4, r4, #1 - cmp r4, #8 - blt _0224B476 - mov r5, #0 - ldr r6, _0224B4D0 ; =0x022577AC - ldr r7, _0224B4D8 ; =0x00000FFF - add r4, r5, #0 -_0224B48A: - ldr r1, [r6, #0] - ldr r0, _0224B4DC ; =0x00001284 - add r0, r1, r0 - ldrh r3, [r0, r4] - add r2, r0, r4 - cmp r3, r7 - beq _0224B4AA - ldrh r1, [r2, #2] - ldr r0, _0224B4D8 ; =0x00000FFF - cmp r1, r0 - beq _0224B4AA - ldrb r2, [r2, #4] - add r0, r3, #0 - add r3, r5, #0 - bl ov23_0224C588 -_0224B4AA: - add r5, r5, #1 - add r4, r4, #6 - cmp r5, #8 - blt _0224B48A -_0224B4B2: - ldr r0, _0224B4D0 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #4] - cmp r0, #0 - bne _0224B4CC - ldr r0, _0224B4E0 ; =ov23_0224C5B4 - mov r1, #0 - mov r2, #0x64 - bl sub_0200D9E8 - ldr r1, _0224B4D0 ; =0x022577AC - ldr r1, [r1, #0] - str r0, [r1, #4] -_0224B4CC: - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B4D0: .word 0x022577AC -_0224B4D4: .word 0x000013E4 -_0224B4D8: .word 0x00000FFF -_0224B4DC: .word 0x00001284 -_0224B4E0: .word ov23_0224C5B4 - thumb_func_end ov23_0224B460 - - thumb_func_start ov23_0224B4E4 -ov23_0224B4E4: ; 0x0224B4E4 - push {r3, lr} - ldr r0, _0224B514 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #4] - cmp r0, #0 - beq _0224B4FC - bl sub_0200DA58 - ldr r0, _0224B514 ; =0x022577AC - mov r1, #0 - ldr r0, [r0, #0] - str r1, [r0, #4] -_0224B4FC: - bl ov23_0224C6E8 - ldr r0, _0224B514 ; =0x022577AC - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224B50C - bl sub_020181C4 -_0224B50C: - ldr r0, _0224B514 ; =0x022577AC - mov r1, #0 - str r1, [r0, #0] - pop {r3, pc} - ; .align 2, 0 -_0224B514: .word 0x022577AC - thumb_func_end ov23_0224B4E4 - - thumb_func_start ov23_0224B518 -ov23_0224B518: ; 0x0224B518 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r7, _0224B57C ; =0x00000FFF - ldr r6, _0224B580 ; =0x022577AC - str r4, [sp] - add r5, r4, #0 -_0224B524: - ldr r0, [r6, #0] - add r0, #0xa - add r0, r0, r4 - bl sub_02029300 - ldr r0, [r6, #0] - add r4, #0x96 - add r1, r0, r5 - ldr r0, _0224B584 ; =0x00001284 - strh r7, [r1, r0] - ldr r0, [r6, #0] - add r1, r0, r5 - ldr r0, _0224B588 ; =0x00001286 - strh r7, [r1, r0] - ldr r0, [r6, #0] - add r1, r0, r5 - ldr r0, _0224B58C ; =0x000012B4 - strh r7, [r1, r0] - ldr r0, [r6, #0] - add r1, r0, r5 - ldr r0, _0224B590 ; =0x000012B6 - add r5, r5, #6 - strh r7, [r1, r0] - ldr r0, [sp] - add r0, r0, #1 - str r0, [sp] - cmp r0, #8 - blt _0224B524 - ldr r0, _0224B580 ; =0x022577AC - mov r2, #0x22 - ldr r1, [r0, #0] - ldr r0, _0224B594 ; =0x00000A04 - lsl r2, r2, #6 - add r0, r1, r0 - mov r1, #0xff - bl sub_020C4CF4 - ldr r0, _0224B580 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl ov23_0224B2C8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B57C: .word 0x00000FFF -_0224B580: .word 0x022577AC -_0224B584: .word 0x00001284 -_0224B588: .word 0x00001286 -_0224B58C: .word 0x000012B4 -_0224B590: .word 0x000012B6 -_0224B594: .word 0x00000A04 - thumb_func_end ov23_0224B518 - - thumb_func_start ov23_0224B598 -ov23_0224B598: ; 0x0224B598 - push {r4, r5, r6, lr} - mov r4, #0 - ldr r6, _0224B5C0 ; =0x022577AC - add r5, r4, #0 -_0224B5A0: - ldr r0, [r6, #0] - add r0, #0xa - add r0, r0, r5 - bl sub_020292C0 - add r4, r4, #1 - add r5, #0x96 - cmp r4, #0x11 - blt _0224B5A0 - ldr r0, _0224B5C0 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl ov23_0224B2C8 - pop {r4, r5, r6, pc} - nop -_0224B5C0: .word 0x022577AC - thumb_func_end ov23_0224B598 - - thumb_func_start ov23_0224B5C4 -ov23_0224B5C4: ; 0x0224B5C4 - ldr r0, _0224B5C8 ; =0x000013E8 - bx lr - ; .align 2, 0 -_0224B5C8: .word 0x000013E8 - thumb_func_end ov23_0224B5C4 - - thumb_func_start ov23_0224B5CC -ov23_0224B5CC: ; 0x0224B5CC - push {r4, r5} - ldr r2, _0224B610 ; =0x022577AC - ldr r1, [r2, #0] - cmp r1, #0 - beq _0224B60A - add r4, r1, r0 - ldr r1, _0224B614 ; =0x00001363 - mov r3, #0xff - strb r3, [r4, r1] - ldr r4, [r2, #0] - add r5, r4, r0 - add r4, r1, #0 - add r4, #8 - strb r3, [r5, r4] - ldr r4, [r2, #0] - add r5, r4, r0 - add r4, r1, #0 - add r4, #0x10 - strb r3, [r5, r4] - mov r3, #6 - mul r3, r0 - ldr r4, [r2, #0] - ldr r0, _0224B618 ; =0x00000FFF - add r5, r4, r3 - add r4, r1, #0 - sub r4, #0xaf - strh r0, [r5, r4] - ldr r2, [r2, #0] - sub r1, #0xad - add r2, r2, r3 - strh r0, [r2, r1] -_0224B60A: - pop {r4, r5} - bx lr - nop -_0224B610: .word 0x022577AC -_0224B614: .word 0x00001363 -_0224B618: .word 0x00000FFF - thumb_func_end ov23_0224B5CC - - thumb_func_start ov23_0224B61C -ov23_0224B61C: ; 0x0224B61C - push {r3, r4, r5, lr} - ldr r1, _0224B648 ; =0x022577AC - add r4, r0, #0 - ldr r1, [r1, #0] - cmp r1, #0 - beq _0224B646 - bl ov23_0224C6AC - ldr r1, _0224B648 ; =0x022577AC - mov r0, #6 - add r5, r4, #0 - mul r5, r0 - ldr r0, [r1, #0] - ldr r3, _0224B64C ; =0x00000FFF - add r2, r0, r5 - ldr r0, _0224B650 ; =0x00001284 - strh r3, [r2, r0] - ldr r1, [r1, #0] - add r0, r0, #2 - add r1, r1, r5 - strh r3, [r1, r0] -_0224B646: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B648: .word 0x022577AC -_0224B64C: .word 0x00000FFF -_0224B650: .word 0x00001284 - thumb_func_end ov23_0224B61C - - thumb_func_start ov23_0224B654 -ov23_0224B654: ; 0x0224B654 - ldr r3, _0224B658 ; =sub_02059514 - bx r3 - ; .align 2, 0 -_0224B658: .word sub_02059514 - thumb_func_end ov23_0224B654 - - thumb_func_start ov23_0224B65C -ov23_0224B65C: ; 0x0224B65C - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r7, r0, #0 - str r1, [sp] - add r5, r6, #0 -_0224B666: - ldr r0, _0224B6A8 ; =0x022577AC - ldr r4, [r0, #0] - add r4, #0xa - add r0, r4, r5 - bl sub_0202988C - cmp r0, #0 - beq _0224B69A - add r0, r6, #0 - bl sub_02058C90 - cmp r0, #0 - beq _0224B69A - add r0, r4, r5 - bl sub_02029874 - cmp r7, r0 - bne _0224B69A - add r0, r4, r5 - bl sub_0202987C - ldr r1, [sp] - cmp r1, r0 - bne _0224B69A - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224B69A: - add r6, r6, #1 - add r5, #0x96 - cmp r6, #8 - blt _0224B666 - mov r0, #0xff - pop {r3, r4, r5, r6, r7, pc} - nop -_0224B6A8: .word 0x022577AC - thumb_func_end ov23_0224B65C - - thumb_func_start ov23_0224B6AC -ov23_0224B6AC: ; 0x0224B6AC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r2, #0 - ldrb r4, [r5, #4] - bl sub_0203608C - cmp r4, r0 - bne _0224B6F4 - ldr r0, _0224B6F8 ; =0x022577AC - ldr r1, _0224B6FC ; =0x000013E4 - ldr r0, [r0, #0] - ldrb r1, [r0, r1] - cmp r1, #0 - bne _0224B6F4 - ldrb r1, [r5, #7] - cmp r1, #0 - str r4, [sp] - beq _0224B6E4 - ldrb r1, [r5, #5] - mov r3, #0 - str r1, [sp, #4] - ldrh r1, [r5] - ldrh r2, [r5, #2] - ldr r0, [r0, #0] - bl ov23_0224C090 - add sp, #8 - pop {r3, r4, r5, pc} -_0224B6E4: - ldrb r1, [r5, #5] - str r1, [sp, #4] - ldrh r1, [r5] - ldrh r2, [r5, #2] - ldrb r3, [r5, #6] - ldr r0, [r0, #0] - bl ov23_0224BC5C -_0224B6F4: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B6F8: .word 0x022577AC -_0224B6FC: .word 0x000013E4 - thumb_func_end ov23_0224B6AC - - thumb_func_start ov23_0224B700 -ov23_0224B700: ; 0x0224B700 - push {r4, lr} - add r4, r2, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0224B724 - bl sub_020594FC - bl ov23_0224219C - ldr r3, _0224B728 ; =ov23_0224B654 - mov r1, #0x58 - mov r2, #1 - bl ov23_02253F40 - bl ov23_0224DC24 -_0224B724: - pop {r4, pc} - nop -_0224B728: .word ov23_0224B654 - thumb_func_end ov23_0224B700 - - thumb_func_start ov23_0224B72C -ov23_0224B72C: ; 0x0224B72C - mov r0, #8 - bx lr - thumb_func_end ov23_0224B72C - - thumb_func_start ov23_0224B730 -ov23_0224B730: ; 0x0224B730 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, sp, #0 - add r4, r2, #0 - strb r5, [r0] - bl sub_0203608C - cmp r0, #0 - beq _0224B748 - bl sub_02022974 - pop {r3, r4, r5, pc} -_0224B748: - ldrb r0, [r4, #1] - cmp r0, #0 - beq _0224B780 - ldrb r0, [r4, #2] - cmp r0, #0 - ldrb r0, [r4] - beq _0224B776 - add r1, r5, #0 - bl ov23_0224B79C - cmp r0, #0 - bne _0224B78C - ldr r0, _0224B790 ; =0x022577AC - mov r2, #0xff - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _0224B794 ; =0x0000136B - strb r2, [r1, r0] - mov r0, #0x3d - add r1, sp, #0 - bl sub_02035B48 - pop {r3, r4, r5, pc} -_0224B776: - add r1, r5, #0 - mov r2, #0 - bl ov23_0224B844 - pop {r3, r4, r5, pc} -_0224B780: - ldr r0, _0224B790 ; =0x022577AC - mov r2, #0xff - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _0224B794 ; =0x0000136B - strb r2, [r1, r0] -_0224B78C: - pop {r3, r4, r5, pc} - nop -_0224B790: .word 0x022577AC -_0224B794: .word 0x0000136B - thumb_func_end ov23_0224B730 - - thumb_func_start ov23_0224B798 -ov23_0224B798: ; 0x0224B798 - mov r0, #3 - bx lr - thumb_func_end ov23_0224B798 - - thumb_func_start ov23_0224B79C -ov23_0224B79C: ; 0x0224B79C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0224B838 ; =0x022577AC - add r6, r1, #0 - ldr r1, [r0, #0] - mov r0, #0x96 - add r1, #8 - mul r0, r5 - add r0, r1, r0 - str r0, [sp] - add r0, r0, #2 - bl sub_0202988C - cmp r0, #0 - bne _0224B7C2 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224B7C2: - mov r0, #0x36 - bl sub_02036254 - cmp r0, #0 - beq _0224B7D2 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224B7D2: - ldr r7, _0224B838 ; =0x022577AC - mov r4, #0 -_0224B7D6: - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0224B7F4 - ldr r0, [r7, #0] - add r1, r0, r4 - ldr r0, _0224B83C ; =0x00001373 - ldrb r0, [r1, r0] - cmp r5, r0 - bne _0224B7F4 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224B7F4: - add r4, r4, #1 - cmp r4, #8 - blt _0224B7D6 - add r0, r5, #0 - add r1, sp, #4 - bl ov23_0224B128 - ldr r0, [sp] - strb r6, [r0, #1] - add r0, r5, #0 - bl ov23_0224C23C - ldr r2, _0224B838 ; =0x022577AC - lsl r0, r5, #0x18 - ldr r1, [r2, #0] - lsr r0, r0, #0x18 - add r3, r1, r6 - ldr r1, _0224B840 ; =0x0000136B - strb r0, [r3, r1] - ldr r2, [r2, #0] - add r1, #8 - add r2, r2, r6 - strb r0, [r2, r1] - add r2, sp, #4 - ldrh r1, [r2] - ldrh r2, [r2, #2] - add r0, r6, #0 - mov r3, #0 - bl ov23_0224ADB0 - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224B838: .word 0x022577AC -_0224B83C: .word 0x00001373 -_0224B840: .word 0x0000136B - thumb_func_end ov23_0224B79C - - thumb_func_start ov23_0224B844 -ov23_0224B844: ; 0x0224B844 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r1, sp, #4 - add r4, r0, #0 - str r2, [sp] - bl ov23_0224B0DC - ldr r0, _0224B8D0 ; =0x022577AC - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _0224B8D4 ; =0x0000136B - strb r4, [r1, r0] - bl sub_02036180 - cmp r0, #0 - beq _0224B878 - ldr r0, _0224B8D0 ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224B8D8 ; =0x000013DC - add r1, r0, #2 - ldrh r4, [r2, r0] - add r0, r0, #4 - ldrh r7, [r2, r1] - ldrb r6, [r2, r0] - b _0224B88E -_0224B878: - ldr r0, _0224B8D0 ; =0x022577AC - lsl r1, r5, #1 - ldr r0, [r0, #0] - add r2, r0, r1 - ldr r1, _0224B8DC ; =0x000013AC - add r0, r1, #0 - ldrh r4, [r2, r1] - add r0, #0x10 - add r1, #0x20 - ldrh r7, [r2, r0] - ldrh r6, [r2, r1] -_0224B88E: - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov23_0224ADB0 - add r0, r6, #0 - bl sub_0206419C - add r4, r4, r0 - add r0, r6, #0 - bl sub_020641A8 - add r1, sp, #4 - add r0, r7, r0 - strh r4, [r1, #6] - strh r0, [r1, #8] - strb r5, [r1, #0xa] - ldr r0, [sp] - strb r6, [r1, #0xb] - strb r0, [r1, #0xc] - add r1, sp, #8 - mov r0, #0x39 - add r1, #2 - bl sub_02035B48 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0224B8D0: .word 0x022577AC -_0224B8D4: .word 0x0000136B -_0224B8D8: .word 0x000013DC -_0224B8DC: .word 0x000013AC - thumb_func_end ov23_0224B844 - - thumb_func_start ov23_0224B8E0 -ov23_0224B8E0: ; 0x0224B8E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - ldr r0, _0224BA3C ; =0x022577AC - add r7, r1, #0 - ldr r0, [r0, #0] - str r2, [sp] - cmp r0, #0 - bne _0224B8F8 - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224B8F8: - cmp r6, #0 - beq _0224B90E - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - bne _0224B90E - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224B90E: - add r0, r6, #0 - bl ov23_0224ACC0 - cmp r0, #0 - beq _0224B91E - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224B91E: - ldr r0, _0224BA3C ; =0x022577AC - ldr r0, [r0, #0] - add r1, r0, r6 - ldr r0, _0224BA40 ; =0x0000136B - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _0224B932 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224B932: - ldr r1, [sp] - add r0, r7, #0 - bl ov23_0224B65C - cmp r0, #0xff - beq _0224B976 - ldr r1, _0224BA3C ; =0x022577AC - lsl r0, r0, #0x18 - ldr r1, [r1, #0] - lsr r0, r0, #0x18 - add r2, r1, r6 - ldr r1, _0224BA40 ; =0x0000136B - strb r0, [r2, r1] - mov r1, #1 - add r2, sp, #4 - strb r1, [r2, #7] - ldr r1, [sp] - strh r7, [r2] - strh r1, [r2, #2] - mov r1, #0 - strb r1, [r2, #6] - strb r6, [r2, #4] - strb r0, [r2, #5] - mov r0, #0x3a - add r1, sp, #4 - bl sub_02035B48 - add r0, r6, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224B976: - mov r5, #0 - add r4, r5, #0 -_0224B97A: - ldr r0, _0224BA3C ; =0x022577AC - ldr r0, [r0, #0] - add r0, #0xa - add r0, r0, r4 - bl sub_0202988C - cmp r0, #0 - beq _0224B9DA - add r0, r5, #0 - add r1, sp, #0xc - bl ov23_0224B0DC - add r0, sp, #4 - ldrh r0, [r0, #8] - cmp r7, r0 - bne _0224B9DA - add r0, sp, #4 - ldrh r1, [r0, #0xa] - ldr r0, [sp] - cmp r0, r1 - bne _0224B9DA - ldr r1, _0224BA3C ; =0x022577AC - lsl r0, r5, #0x18 - ldr r1, [r1, #0] - lsr r0, r0, #0x18 - add r2, r1, r6 - ldr r1, _0224BA40 ; =0x0000136B - mov r3, #0 - strb r0, [r2, r1] - add r2, sp, #4 - strb r3, [r2, #7] - ldr r1, [sp] - strh r7, [r2] - strh r1, [r2, #2] - strb r3, [r2, #6] - strb r6, [r2, #4] - strb r0, [r2, #5] - mov r0, #0x3a - add r1, sp, #4 - bl sub_02035B48 - add r0, r6, #0 - mov r1, #0 - bl sub_02059058 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224B9DA: - add r5, r5, #1 - add r4, #0x96 - cmp r5, #8 - ble _0224B97A - ldr r1, [sp] - add r0, r7, #0 - bl ov23_0224B098 - cmp r0, #0 - beq _0224BA36 - ldr r0, _0224BA3C ; =0x022577AC - lsl r2, r6, #1 - ldr r1, [r0, #0] - ldr r4, _0224BA44 ; =0x000013AC - add r0, r1, r2 - ldrh r2, [r0, r4] - add r3, sp, #4 - strh r2, [r3, #0xe] - add r2, r4, #0 - add r2, #0x10 - ldrh r2, [r0, r2] - strh r2, [r3, #0x10] - add r2, r4, #0 - strb r6, [r3, #0x12] - add r2, #0x20 - ldrh r0, [r0, r2] - mov r2, #0 - sub r4, #0x41 - strb r0, [r3, #0x13] - strb r2, [r3, #0x14] - add r0, r1, r6 - strb r2, [r0, r4] - ldrh r1, [r3, #0xe] - ldrh r2, [r3, #0x10] - ldrb r3, [r3, #0x13] - add r0, r6, #0 - bl ov23_0224ADB0 - add r1, sp, #0x10 - mov r0, #0x39 - add r1, #2 - bl sub_02035B48 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224BA36: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BA3C: .word 0x022577AC -_0224BA40: .word 0x0000136B -_0224BA44: .word 0x000013AC - thumb_func_end ov23_0224B8E0 - - thumb_func_start ov23_0224BA48 -ov23_0224BA48: ; 0x0224BA48 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _0224BA5A - mov r1, #4 - bl sub_02002154 -_0224BA5A: - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - bl ov23_02243204 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224BA48 - - thumb_func_start ov23_0224BA6C -ov23_0224BA6C: ; 0x0224BA6C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _0224BA7E - mov r1, #4 - bl sub_02002154 -_0224BA7E: - add r0, r4, #0 - mov r2, #0 - add r1, sp, #0 - strb r2, [r1, #1] - add r0, #0x2c - ldrb r0, [r0] - strb r0, [r1] - strb r2, [r1, #2] - mov r0, #0x3b - add r1, sp, #0 - bl sub_020360D0 - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - bl ov23_02243204 - bl ov23_0224DC24 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224BA6C - - thumb_func_start ov23_0224BAAC -ov23_0224BAAC: ; 0x0224BAAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0xc] - mov r5, #0 - ldr r6, [r4, #0] - cmp r0, #7 - bhi _0224BB0A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224BACA: ; jump table - .short _0224BADA - _0224BACA - 2 ; case 0 - .short _0224BAFE - _0224BACA - 2 ; case 1 - .short _0224BB24 - _0224BACA - 2 ; case 2 - .short _0224BB48 - _0224BACA - 2 ; case 3 - .short _0224BB6C - _0224BACA - 2 ; case 4 - .short _0224BB9E - _0224BACA - 2 ; case 5 - .short _0224BBC2 - _0224BACA - 2 ; case 6 - .short _0224BBE6 - _0224BACA - 2 ; case 7 -_0224BADA: - bl sub_02033DFC - cmp r0, #0 - beq _0224BAE8 - mov r6, #0x2f - mov r0, #3 - b _0224BAEC -_0224BAE8: - mov r6, #0x32 - mov r0, #1 -_0224BAEC: - str r0, [r4, #0xc] - bl ov23_0224219C - mov r2, #0 - add r1, r6, #0 - add r3, r2, #0 - bl ov23_02253F40 - b _0224BC14 -_0224BAFE: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - beq _0224BB0C -_0224BB0A: - b _0224BC14 -_0224BB0C: - mov r0, #4 - str r0, [sp] - ldr r0, [r6, #8] - ldr r1, _0224BC54 ; =0x02256864 - ldr r2, _0224BC58 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #4] - mov r0, #2 - str r0, [r4, #0xc] - b _0224BC14 -_0224BB24: - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224BB3A - add r0, r5, #0 - str r0, [r4, #4] - mov r0, #7 - str r0, [r4, #0xc] - b _0224BC14 -_0224BB3A: - sub r1, r5, #1 - cmp r0, r1 - beq _0224BC14 - add r0, r5, #0 - str r0, [r4, #4] - mov r5, #1 - b _0224BC14 -_0224BB48: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224BC14 - mov r0, #4 - str r0, [sp] - ldr r0, [r6, #8] - ldr r1, _0224BC54 ; =0x02256864 - ldr r2, _0224BC58 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #4] - mov r0, #4 - str r0, [r4, #0xc] - b _0224BC14 -_0224BB6C: - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224BB90 - add r0, r5, #0 - str r0, [r4, #4] - bl ov23_0224219C - add r2, r5, #0 - mov r1, #0x30 - add r3, r2, #0 - bl ov23_02253F40 - mov r0, #5 - str r0, [r4, #0xc] - b _0224BC14 -_0224BB90: - sub r1, r5, #1 - cmp r0, r1 - beq _0224BC14 - add r0, r5, #0 - str r0, [r4, #4] - mov r5, #1 - b _0224BC14 -_0224BB9E: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224BC14 - mov r0, #4 - str r0, [sp] - ldr r0, [r6, #8] - ldr r1, _0224BC54 ; =0x02256864 - ldr r2, _0224BC58 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #4] - mov r0, #6 - str r0, [r4, #0xc] - b _0224BC14 -_0224BBC2: - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224BBD8 - add r0, r5, #0 - str r0, [r4, #4] - mov r0, #7 - str r0, [r4, #0xc] - b _0224BC14 -_0224BBD8: - sub r1, r5, #1 - cmp r0, r1 - beq _0224BC14 - add r0, r5, #0 - str r0, [r4, #4] - mov r5, #1 - b _0224BC14 -_0224BBE6: - bl ov23_0224219C - bl ov23_02254044 - mov r0, #1 - add r1, sp, #4 - strb r0, [r1, #1] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - strb r0, [r1] - add r0, r5, #0 - strb r0, [r1, #2] - mov r0, #0x3b - add r1, sp, #4 - bl sub_020360D0 - add r0, r7, #0 - add r1, r4, #0 - bl ov23_0224BA48 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0224BC14: - bl sub_02033DFC - cmp r0, #0 - bne _0224BC38 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - cmp r0, #8 - bhs _0224BC38 - bl sub_02035D78 - cmp r0, #0 - bne _0224BC38 - bl sub_0203608C - cmp r0, #0 - beq _0224BC38 - mov r5, #1 -_0224BC38: - cmp r5, #0 - beq _0224BC50 - bl ov23_0224219C - bl ov23_02254044 - add r0, r7, #0 - add r1, r4, #0 - bl ov23_0224BA6C - bl sub_02059514 -_0224BC50: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BC54: .word 0x02256864 -_0224BC58: .word 0x000003D9 - thumb_func_end ov23_0224BAAC - - thumb_func_start ov23_0224BC5C -ov23_0224BC5C: ; 0x0224BC5C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - bl ov23_0224DC08 - mov r0, #4 - mov r1, #0x30 - bl sub_02018184 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x18] - str r6, [r4, #0x1c] - add r0, r4, #0 - ldr r1, [sp, #0x18] - str r7, [r4, #0x20] - add r0, #0x2b - strb r1, [r0] - add r0, r4, #0 - ldr r1, [sp, #0x1c] - add r0, #0x2c - strb r1, [r0] - mov r0, #2 - str r0, [r4, #0x14] - ldr r0, [sp] - add r1, r4, #0 - str r0, [r4, #0x24] - ldr r0, _0224BCBC ; =ov23_0224BAAC - str r5, [r4, #0] - mov r2, #0x64 - bl sub_0200D9E8 - str r0, [r4, #8] - ldr r1, [r4, #8] - ldr r2, _0224BCC0 ; =ov23_0224BA6C - add r0, r4, #0 - bl ov23_022431EC - bl sub_020594FC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BCBC: .word ov23_0224BAAC -_0224BCC0: .word ov23_0224BA6C - thumb_func_end ov23_0224BC5C - - thumb_func_start ov23_0224BCC4 -ov23_0224BCC4: ; 0x0224BCC4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r6, r1, #0 - add r7, r2, #0 - mov r4, #0 - str r3, [sp] - cmp r0, #0 - bne _0224BD16 - mov r0, #0xb - mov r1, #0x30 - bl sub_02018184 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x18] - str r6, [r4, #0x1c] - add r0, r4, #0 - ldr r1, [sp, #0x18] - str r7, [r4, #0x20] - add r0, #0x2b - strb r1, [r0] - add r0, r4, #0 - ldr r1, [sp, #0x1c] - add r0, #0x2c - strb r1, [r0] - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - cmp r0, #2 - beq _0224BD0E - bl sub_02022974 -_0224BD0E: - mov r0, #2 - str r0, [r4, #0x14] - ldr r0, [sp] - str r0, [r4, #0x24] -_0224BD16: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_0224BCC4 - - thumb_func_start ov23_0224BD1C -ov23_0224BD1C: ; 0x0224BD1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r7, #0 - str r0, [sp] - str r1, [sp, #4] - add r4, r7, #0 -_0224BD28: - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0224BD80 - ldr r0, [sp, #4] - cmp r0, #0 - beq _0224BD4A - add r0, r4, #0 - bl sub_02058DF8 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02058E4C - b _0224BD58 -_0224BD4A: - add r0, r4, #0 - bl sub_02058CA0 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02058CF4 -_0224BD58: - add r5, r0, #0 - ldr r0, _0224BD8C ; =0x0000FFFF - cmp r6, r0 - bne _0224BD64 - cmp r5, r0 - beq _0224BD80 -_0224BD64: - add r0, r6, #0 - add r1, r5, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _0224BD80 - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224B05C - ldr r1, [sp] - cmp r0, r1 - bne _0224BD80 - add r7, r7, #1 -_0224BD80: - add r4, r4, #1 - cmp r4, #8 - blt _0224BD28 - add r0, r7, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BD8C: .word 0x0000FFFF - thumb_func_end ov23_0224BD1C - - thumb_func_start ov23_0224BD90 -ov23_0224BD90: ; 0x0224BD90 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r2, [sp, #8] - add r6, r0, #0 - add r7, r1, #0 - str r3, [sp, #0xc] - bl ov23_0224219C - bl ov23_02253E3C - add r5, r0, #0 - ldr r1, [sp, #0x30] - mov r0, #2 - bl sub_02013A04 - add r4, r0, #0 - add r1, r5, #0 - mov r2, #0x26 - mov r3, #0 - bl sub_02013A4C - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0x27 - mov r3, #1 - bl sub_02013A4C - ldr r0, [sp, #0x30] - mov r1, #1 - str r4, [sp, #0x10] - bl sub_0201A778 - add r1, r0, #0 - str r1, [sp, #0x14] - mov r0, #0 - add r3, sp, #0x10 - strb r0, [r3, #8] - mov r0, #1 - strb r0, [r3, #9] - mov r0, #2 - strb r0, [r3, #0xa] - ldrb r0, [r3, #0xb] - mov r2, #0xf - bic r0, r2 - strb r0, [r3, #0xb] - ldrb r4, [r3, #0xb] - mov r0, #0x30 - bic r4, r0 - strb r4, [r3, #0xb] - ldrb r0, [r3, #0xb] - bic r0, r2 - strb r0, [r3, #0xb] - add r0, r6, #0 - add r2, r7, #0 - bl sub_0201A8D4 - ldr r0, [sp, #0x14] - ldr r2, [sp, #8] - ldr r3, [sp, #0xc] - mov r1, #1 - bl sub_0200DC48 - ldr r0, [sp, #0x30] - mov r2, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, sp, #0x10 - mov r1, #8 - add r3, r2, #0 - bl sub_02001B7C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov23_0224BD90 - - thumb_func_start ov23_0224BE28 -ov23_0224BE28: ; 0x0224BE28 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r0, #0 - ldr r0, [r4, #0xc] - mov r5, #0 - ldr r6, [r4, #0] - cmp r0, #0xa - bhi _0224BEEE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224BE46: ; jump table - .short _0224BE5C - _0224BE46 - 2 ; case 0 - .short _0224BE88 - _0224BE46 - 2 ; case 1 - .short _0224BEAC - _0224BE46 - 2 ; case 2 - .short _0224BED0 - _0224BE46 - 2 ; case 3 - .short _0224BEE2 - _0224BE46 - 2 ; case 4 - .short _0224BF08 - _0224BE46 - 2 ; case 5 - .short _0224BF6C - _0224BE46 - 2 ; case 6 - .short _0224BF90 - _0224BE46 - 2 ; case 7 - .short _0224BFC2 - _0224BE46 - 2 ; case 8 - .short _0224BFE0 - _0224BE46 - 2 ; case 9 - .short _0224C00A - _0224BE46 - 2 ; case 10 -_0224BE5C: - add r0, r4, #0 - add r0, #0x2c - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0x2b - ldrb r0, [r0] - cmp r1, r0 - beq _0224BE72 - mov r6, #0x2d - mov r0, #1 - b _0224BE76 -_0224BE72: - mov r6, #0x29 - mov r0, #4 -_0224BE76: - str r0, [r4, #0xc] - bl ov23_0224219C - mov r2, #0 - add r1, r6, #0 - add r3, r2, #0 - bl ov23_02253F40 - b _0224C042 -_0224BE88: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224BEEE - mov r0, #4 - str r0, [sp] - ldr r0, [r6, #8] - ldr r1, _0224C07C ; =0x02256864 - ldr r2, _0224C080 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #4] - mov r0, #2 - str r0, [r4, #0xc] - b _0224C042 -_0224BEAC: - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224BEC2 - add r0, r5, #0 - str r0, [r4, #4] - mov r0, #3 - str r0, [r4, #0xc] - b _0224C042 -_0224BEC2: - sub r1, r5, #1 - cmp r0, r1 - beq _0224BEEE - add r0, r5, #0 - str r0, [r4, #4] - mov r5, #1 - b _0224C042 -_0224BED0: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224BEEE - mov r0, #0xa - str r0, [r4, #0xc] - b _0224C042 -_0224BEE2: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - beq _0224BEF0 -_0224BEEE: - b _0224C042 -_0224BEF0: - mov r0, #4 - str r0, [sp] - ldr r0, [r6, #8] - ldr r1, _0224C07C ; =0x02256864 - ldr r2, _0224C080 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #4] - mov r0, #5 - str r0, [r4, #0xc] - b _0224C042 -_0224BF08: - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224BF5E - add r0, r5, #0 - str r0, [r4, #4] - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - bl ov23_0224AEA4 - cmp r0, #0 - bne _0224BF36 - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - add r1, r5, #0 - bl ov23_0224BD1C - cmp r0, #0 - ble _0224BF4A -_0224BF36: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x2c - add r3, r2, #0 - bl ov23_02253F40 - mov r0, #3 - str r0, [r4, #0xc] - b _0224C042 -_0224BF4A: - bl ov23_0224219C - add r2, r5, #0 - mov r1, #0x25 - add r3, r2, #0 - bl ov23_02253F40 - mov r0, #6 - str r0, [r4, #0xc] - b _0224C042 -_0224BF5E: - sub r1, r5, #1 - cmp r0, r1 - beq _0224C042 - add r0, r5, #0 - str r0, [r4, #4] - mov r5, #1 - b _0224C042 -_0224BF6C: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224C042 - mov r0, #4 - str r0, [sp] - ldr r0, [r6, #8] - ldr r1, _0224C084 ; =0x0225686C - ldr r2, _0224C080 ; =0x000003D9 - mov r3, #0xb - bl ov23_0224BD90 - str r0, [r4, #4] - mov r0, #7 - str r0, [r4, #0xc] - b _0224C042 -_0224BF90: - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224BFA6 - add r0, r5, #0 - str r0, [r4, #4] - mov r0, #3 - str r0, [r4, #0xc] - b _0224C042 -_0224BFA6: - cmp r0, #1 - bne _0224BFB4 - add r0, r5, #0 - str r0, [r4, #4] - mov r0, #8 - str r0, [r4, #0xc] - b _0224C042 -_0224BFB4: - sub r1, r5, #1 - cmp r0, r1 - beq _0224C042 - add r0, r5, #0 - str r0, [r4, #4] - mov r5, #1 - b _0224C042 -_0224BFC2: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224C042 - bl ov23_0224219C - bl ov23_02254044 - bl ov23_02249A74 - mov r0, #9 - str r0, [r4, #0xc] - b _0224C042 -_0224BFE0: - bl sub_02033DFC - cmp r0, #0 - beq _0224C042 - bl sub_0203608C - cmp r0, #0 - bne _0224C042 - mov r1, #1 - add r0, sp, #4 - strb r1, [r0] - mov r0, #0x56 - add r1, sp, #4 - bl sub_020360D0 - add r0, r7, #0 - add r1, r4, #0 - bl ov23_0224BA48 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0224C00A: - bl ov23_0224219C - bl ov23_02254044 - add r0, r4, #0 - mov r2, #1 - add r1, sp, #4 - strb r2, [r1, #2] - add r0, #0x2c - ldrb r0, [r0] - strb r0, [r1, #1] - strb r2, [r1, #3] - add r1, sp, #4 - mov r0, #0x3b - add r1, #1 - bl sub_020360D0 - add r0, r7, #0 - add r1, r4, #0 - bl ov23_0224BA48 - ldr r0, _0224C088 ; =0x022577AC - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _0224C08C ; =0x000012E4 - add sp, #8 - strb r2, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} -_0224C042: - add r0, r4, #0 - add r0, #0x2c - ldrb r0, [r0] - cmp r0, #0x10 - beq _0224C060 - bl sub_02058C90 - cmp r0, #0 - bne _0224C060 - ldr r0, [r4, #0xc] - cmp r0, #8 - beq _0224C060 - cmp r0, #9 - beq _0224C060 - mov r5, #1 -_0224C060: - cmp r5, #0 - beq _0224C078 - bl ov23_0224219C - bl ov23_02254044 - add r0, r7, #0 - add r1, r4, #0 - bl ov23_0224BA6C - bl sub_02059514 -_0224C078: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C07C: .word 0x02256864 -_0224C080: .word 0x000003D9 -_0224C084: .word 0x0225686C -_0224C088: .word 0x022577AC -_0224C08C: .word 0x000012E4 - thumb_func_end ov23_0224BE28 - - thumb_func_start ov23_0224C090 -ov23_0224C090: ; 0x0224C090 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #4 - mov r1, #0x30 - add r7, r2, #0 - str r3, [sp] - bl sub_02018184 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x18] - str r6, [r4, #0x1c] - add r0, r4, #0 - ldr r1, [sp, #0x18] - str r7, [r4, #0x20] - add r0, #0x2b - strb r1, [r0] - add r0, r4, #0 - ldr r1, [sp, #0x1c] - add r0, #0x2c - strb r1, [r0] - mov r0, #2 - str r0, [r4, #0x14] - ldr r0, [sp] - mov r1, #0 - str r0, [r4, #0x24] - add r0, r4, #0 - str r5, [r4, #0] - add r0, #0x29 - strb r1, [r0] - bl ov23_0224DC08 - ldr r0, _0224C0F8 ; =ov23_0224BE28 - add r1, r4, #0 - mov r2, #0x64 - bl sub_0200D9E8 - str r0, [r4, #8] - ldr r1, [r4, #8] - ldr r2, _0224C0FC ; =ov23_0224BA6C - add r0, r4, #0 - bl ov23_022431EC - bl sub_020594FC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C0F8: .word ov23_0224BE28 -_0224C0FC: .word ov23_0224BA6C - thumb_func_end ov23_0224C090 - - thumb_func_start ov23_0224C100 -ov23_0224C100: ; 0x0224C100 - mov r0, #8 - bx lr - thumb_func_end ov23_0224C100 - - thumb_func_start ov23_0224C104 -ov23_0224C104: ; 0x0224C104 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r0, _0224C18C ; =0x022577AC - add r4, r2, #0 - ldr r1, [r0, #0] - ldrb r0, [r4, #4] - mov r2, #0xff - add r1, r1, r0 - ldr r0, _0224C190 ; =0x00001363 - strb r2, [r1, r0] - ldrb r5, [r4, #4] - bl sub_0203608C - cmp r5, r0 - bne _0224C176 - bl ov23_022535EC - bl ov23_0224F24C - bl ov23_0224321C - bl sub_0203608C - mov r1, #0 - bl ov23_02244858 - mov r0, #0x2b - bl sub_020360DC - ldr r0, _0224C18C ; =0x022577AC - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _0224C194 ; =0x000013E6 - strb r2, [r1, r0] - mov r0, #1 - bl sub_02059638 - ldrb r0, [r4, #4] - str r0, [sp] - ldrb r0, [r4, #6] - str r0, [sp, #4] - ldr r0, _0224C18C ; =0x022577AC - ldrh r1, [r4] - ldr r0, [r0, #0] - ldrh r2, [r4, #2] - ldrb r3, [r4, #5] - ldr r0, [r0, #0] - bl ov23_0224CAF0 - ldr r0, _0224C18C ; =0x022577AC - mov r2, #0 - ldr r1, [r0, #0] - mov r0, #0xa - lsl r0, r0, #8 - str r2, [r1, r0] - add sp, #8 - pop {r3, r4, r5, pc} -_0224C176: - add r0, r5, #0 - bl ov23_02248B98 - ldrb r0, [r4, #4] - ldrh r1, [r4] - ldrh r2, [r4, #2] - ldrb r3, [r4, #5] - bl ov23_0224ADE8 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224C18C: .word 0x022577AC -_0224C190: .word 0x00001363 -_0224C194: .word 0x000013E6 - thumb_func_end ov23_0224C104 - - thumb_func_start ov23_0224C198 -ov23_0224C198: ; 0x0224C198 - ldr r3, _0224C1A0 ; =sub_020360DC - mov r0, #0x38 - bx r3 - nop -_0224C1A0: .word sub_020360DC - thumb_func_end ov23_0224C198 - - thumb_func_start ov23_0224C1A4 -ov23_0224C1A4: ; 0x0224C1A4 - push {r3, r4} - ldr r2, _0224C1C0 ; =0x022577AC - mov r4, #0xff - ldr r1, [r2, #0] - add r3, r1, r0 - ldr r1, _0224C1C4 ; =0x0000136B - strb r4, [r3, r1] - ldr r2, [r2, #0] - add r1, #8 - add r0, r2, r0 - strb r4, [r0, r1] - pop {r3, r4} - bx lr - nop -_0224C1C0: .word 0x022577AC -_0224C1C4: .word 0x0000136B - thumb_func_end ov23_0224C1A4 - - thumb_func_start ov23_0224C1C8 -ov23_0224C1C8: ; 0x0224C1C8 - ldr r1, _0224C1E4 ; =0x022577AC - ldr r1, [r1, #0] - cmp r1, #0 - beq _0224C1DE - add r1, r1, r0 - ldr r0, _0224C1E8 ; =0x0000136B - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _0224C1DE - mov r0, #1 - bx lr -_0224C1DE: - mov r0, #0 - bx lr - nop -_0224C1E4: .word 0x022577AC -_0224C1E8: .word 0x0000136B - thumb_func_end ov23_0224C1C8 - - thumb_func_start ov23_0224C1EC -ov23_0224C1EC: ; 0x0224C1EC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _0224C218 ; =0x022577AC - add r7, r1, #0 - ldr r1, [r0, #0] - add r5, r3, #0 - mov r0, #0x96 - add r1, #8 - mul r0, r5 - add r4, r1, r0 - beq _0224C216 - add r0, r2, #0 - bl sub_02059328 - add r3, r0, #0 - add r0, r4, #2 - add r1, r6, #0 - add r2, r7, #0 - bl sub_02029854 - strb r5, [r4] -_0224C216: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C218: .word 0x022577AC - thumb_func_end ov23_0224C1EC - - thumb_func_start ov23_0224C21C -ov23_0224C21C: ; 0x0224C21C - push {r3, lr} - bl sub_0203608C - ldr r1, _0224C234 ; =0x022577AC - mov r0, #0x35 - ldr r2, [r1, #0] - ldr r1, _0224C238 ; =0x00000968 - add r1, r2, r1 - mov r2, #0x96 - bl sub_02035F58 - pop {r3, pc} - ; .align 2, 0 -_0224C234: .word 0x022577AC -_0224C238: .word 0x00000968 - thumb_func_end ov23_0224C21C - - thumb_func_start ov23_0224C23C -ov23_0224C23C: ; 0x0224C23C - push {r4, lr} - ldr r1, _0224C258 ; =0x022577AC - add r4, r0, #0 - ldr r3, [r1, #0] - mov r2, #0x96 - add r1, r4, #0 - add r3, #8 - mul r1, r2 - mov r0, #0x36 - add r1, r3, r1 - bl sub_02035F00 - pop {r4, pc} - nop -_0224C258: .word 0x022577AC - thumb_func_end ov23_0224C23C - - thumb_func_start ov23_0224C25C -ov23_0224C25C: ; 0x0224C25C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r0, _0224C368 ; =0x022577AC - add r6, r2, #0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224C362 - bl sub_0203608C - ldrb r1, [r6, #1] - cmp r1, r0 - bne _0224C29C - ldr r0, _0224C368 ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224C36C ; =0x000012E4 - ldrb r1, [r2, r0] - cmp r1, #2 - bne _0224C29C - mov r1, #0 - strb r1, [r2, r0] - bl sub_02059514 - mov r0, #0x38 - bl sub_020360DC - mov r0, #0 - bl sub_02057AE4 - bl ov23_0224DC24 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_0224C29C: - ldr r0, _0224C368 ; =0x022577AC - mov r2, #5 - ldr r1, [r0, #0] - ldr r0, _0224C36C ; =0x000012E4 - strb r2, [r1, r0] - ldrb r5, [r6] - cmp r5, #0x11 - blt _0224C2B0 - bl sub_02022974 -_0224C2B0: - ldr r0, _0224C368 ; =0x022577AC - mov r2, #0x96 - ldr r4, [r0, #0] - add r7, r5, #0 - add r4, #8 - mul r7, r2 - add r5, r4, r7 - add r0, r6, #0 - add r1, r5, #0 - bl sub_020C4DB0 - ldr r2, _0224C368 ; =0x022577AC - ldrb r1, [r5, #1] - ldr r3, [r2, #0] - ldrb r0, [r4, r7] - add r3, r3, r1 - ldr r1, _0224C370 ; =0x00001363 - strb r0, [r3, r1] - ldrb r3, [r4, r7] - cmp r3, #0x10 - beq _0224C2E4 - ldrb r0, [r5, #1] - ldr r2, [r2, #0] - add r1, #0x18 - add r0, r2, r0 - strb r3, [r0, r1] -_0224C2E4: - ldrb r0, [r5] - add r1, sp, #8 - bl ov23_0224B128 - ldrb r4, [r5, #1] - bl sub_0203608C - cmp r4, r0 - bne _0224C354 - ldr r1, _0224C368 ; =0x022577AC - ldr r0, _0224C374 ; =0x000013E6 - ldr r2, [r1, #0] - mov r3, #1 - strb r3, [r2, r0] - ldrb r0, [r5, #1] - mov r3, #0 - add r2, sp, #8 - str r0, [sp] - str r3, [sp, #4] - ldr r0, [r1, #0] - ldrh r1, [r2] - ldrh r2, [r2, #2] - ldr r0, [r0, #0] - sub r2, r2, #1 - bl ov23_0224CAF0 - ldr r0, _0224C368 ; =0x022577AC - ldr r1, [r0, #0] - mov r0, #0xa - lsl r0, r0, #8 - str r5, [r1, r0] - add r0, r5, #2 - bl sub_02029874 - ldr r1, _0224C368 ; =0x022577AC - ldr r2, [r1, #0] - ldr r1, _0224C378 ; =0x000013DC - strh r0, [r2, r1] - add r0, r5, #2 - bl sub_0202987C - ldr r1, _0224C368 ; =0x022577AC - ldr r2, [r1, #0] - ldr r1, _0224C37C ; =0x000013DE - strh r0, [r2, r1] - add r0, r5, #2 - bl sub_02029884 - ldr r1, _0224C368 ; =0x022577AC - ldr r2, [r1, #0] - ldr r1, _0224C380 ; =0x000013E0 - strb r0, [r2, r1] - bl ov23_02243360 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_0224C354: - add r2, sp, #8 - ldrh r1, [r2] - ldrh r2, [r2, #2] - add r0, r4, #0 - mov r3, #0 - bl ov23_0224ADE8 -_0224C362: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C368: .word 0x022577AC -_0224C36C: .word 0x000012E4 -_0224C370: .word 0x00001363 -_0224C374: .word 0x000013E6 -_0224C378: .word 0x000013DC -_0224C37C: .word 0x000013DE -_0224C380: .word 0x000013E0 - thumb_func_end ov23_0224C25C - - thumb_func_start ov23_0224C384 -ov23_0224C384: ; 0x0224C384 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _0224C404 ; =0x022577AC - ldr r6, [r0, #0] - cmp r6, #0 - beq _0224C402 - mov r3, #0x96 - add r7, r5, #0 - add r6, #8 - mul r7, r3 - add r4, r6, r7 - add r0, r2, #0 - add r1, r4, #0 - add r2, r3, #0 - bl sub_020C4DB0 - strb r5, [r6, r7] - ldr r0, _0224C404 ; =0x022577AC - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _0224C408 ; =0x000013E2 - add r6, r5, #0 - strb r2, [r1, r0] - mov r0, #6 - mul r6, r0 - add r0, r4, #2 - bl sub_02029874 - ldr r1, _0224C404 ; =0x022577AC - ldr r1, [r1, #0] - add r2, r1, r6 - ldr r1, _0224C40C ; =0x000012B4 - strh r0, [r2, r1] - add r0, r4, #2 - bl sub_0202987C - ldr r1, _0224C404 ; =0x022577AC - ldr r1, [r1, #0] - add r2, r1, r6 - ldr r1, _0224C410 ; =0x000012B6 - strh r0, [r2, r1] - add r0, r4, #2 - bl sub_02029884 - ldr r1, _0224C404 ; =0x022577AC - ldr r1, [r1, #0] - add r2, r1, r6 - ldr r1, _0224C414 ; =0x000012B8 - strb r0, [r2, r1] - bl ov23_0224C448 - ldr r1, _0224C404 ; =0x022577AC - add r0, r4, #2 - ldr r2, [r1, #0] - ldr r1, _0224C418 ; =0x00000A04 - add r2, r2, r1 - lsl r1, r5, #7 - add r1, r2, r1 - bl ov23_0224B39C - add r0, r5, #0 - bl ov23_0224DAD0 -_0224C402: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C404: .word 0x022577AC -_0224C408: .word 0x000013E2 -_0224C40C: .word 0x000012B4 -_0224C410: .word 0x000012B6 -_0224C414: .word 0x000012B8 -_0224C418: .word 0x00000A04 - thumb_func_end ov23_0224C384 - - thumb_func_start ov23_0224C41C -ov23_0224C41C: ; 0x0224C41C - mov r0, #0x96 - bx lr - thumb_func_end ov23_0224C41C - - thumb_func_start ov23_0224C420 -ov23_0224C420: ; 0x0224C420 - ldr r0, _0224C42C ; =0x022577AC - ldr r1, [r0, #0] - ldr r0, _0224C430 ; =0x000013E3 - ldrb r0, [r1, r0] - bx lr - nop -_0224C42C: .word 0x022577AC -_0224C430: .word 0x000013E3 - thumb_func_end ov23_0224C420 - - thumb_func_start ov23_0224C434 -ov23_0224C434: ; 0x0224C434 - ldr r0, _0224C440 ; =0x022577AC - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _0224C444 ; =0x000013E3 - strb r2, [r1, r0] - bx lr - ; .align 2, 0 -_0224C440: .word 0x022577AC -_0224C444: .word 0x000013E3 - thumb_func_end ov23_0224C434 - - thumb_func_start ov23_0224C448 -ov23_0224C448: ; 0x0224C448 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - ldr r7, _0224C4B4 ; =0x022577AC - mov ip, r4 - add r5, r4, #0 -_0224C452: - ldr r0, [r7, #0] - ldr r1, _0224C4B8 ; =0x000012B4 - add r2, r0, r1 - add r1, r0, r4 - ldrh r6, [r2, r5] - ldr r0, _0224C4BC ; =0x0000138B - add r3, r2, r5 - strb r6, [r1, r0] - ldrh r0, [r2, r5] - add r5, r5, #6 - asr r1, r0, #8 - mov r0, #0xf - add r2, r1, #0 - and r2, r0 - ldrh r0, [r3, #2] - asr r1, r0, #4 - mov r0, #0xf0 - and r0, r1 - add r2, r2, r0 - ldr r0, [r7, #0] - add r1, r0, r4 - ldr r0, _0224C4C0 ; =0x0000138C - strb r2, [r1, r0] - ldr r0, [r7, #0] - ldrh r2, [r3, #2] - add r1, r0, r4 - ldr r0, _0224C4C4 ; =0x0000138D - strb r2, [r1, r0] - ldr r1, [r7, #0] - ldrb r0, [r3, #4] - add r2, r1, r4 - ldr r1, _0224C4C8 ; =0x0000138E - add r4, r4, #4 - strb r0, [r2, r1] - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #8 - blt _0224C452 - ldr r1, _0224C4B4 ; =0x022577AC - mov r0, #0x37 - ldr r2, [r1, #0] - ldr r1, _0224C4BC ; =0x0000138B - add r1, r2, r1 - mov r2, #0x20 - bl sub_02035F00 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C4B4: .word 0x022577AC -_0224C4B8: .word 0x000012B4 -_0224C4BC: .word 0x0000138B -_0224C4C0: .word 0x0000138C -_0224C4C4: .word 0x0000138D -_0224C4C8: .word 0x0000138E - thumb_func_end ov23_0224C448 - - thumb_func_start ov23_0224C4CC -ov23_0224C4CC: ; 0x0224C4CC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r0, _0224C574 ; =0x022577AC - str r2, [sp] - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224C56E - mov r4, #0 -_0224C4DC: - add r0, r4, #0 - bl ov23_0224C6AC - add r4, r4, #1 - cmp r4, #8 - blt _0224C4DC - mov r5, #0 - add r7, r5, #0 - add r6, r5, #0 - add r4, sp, #4 -_0224C4F0: - ldr r0, _0224C574 ; =0x022577AC - ldr r1, [r0, #0] - ldr r0, _0224C578 ; =0x00001284 - add r0, r1, r0 - mov ip, r0 - ldr r0, [sp] - add r2, r0, r5 - ldrb r0, [r0, r5] - add r5, r5, #4 - strh r0, [r4] - ldrb r0, [r2, #1] - ldrh r3, [r4] - lsl r1, r0, #8 - mov r0, #0xf - lsl r0, r0, #8 - and r0, r1 - add r0, r3, r0 - strh r0, [r4] - ldrb r0, [r2, #1] - lsl r1, r0, #4 - mov r0, #0xf - lsl r0, r0, #8 - and r0, r1 - strh r0, [r4, #2] - ldrh r1, [r4, #2] - ldrb r0, [r2, #2] - add r0, r1, r0 - strh r0, [r4, #2] - ldrb r0, [r2, #3] - strb r0, [r4, #4] - ldrh r1, [r4] - ldr r0, _0224C57C ; =0x00000FFF - cmp r1, r0 - beq _0224C55C - add r0, sp, #4 - ldrh r1, [r0, #2] - ldr r0, _0224C57C ; =0x00000FFF - cmp r1, r0 - beq _0224C55C - mov r1, ip - add r0, sp, #4 - add r1, r1, r6 - mov r2, #6 - bl sub_020C4DB0 - add r0, sp, #4 - add r1, sp, #4 - add r2, sp, #4 - ldrh r0, [r0] - ldrh r1, [r1, #2] - ldrb r2, [r2, #4] - add r3, r7, #0 - bl ov23_0224C588 -_0224C55C: - add r7, r7, #1 - add r6, r6, #6 - cmp r7, #8 - blt _0224C4F0 - ldr r0, _0224C574 ; =0x022577AC - mov r2, #1 - ldr r1, [r0, #0] - ldr r0, _0224C580 ; =0x000013E3 - strb r2, [r1, r0] -_0224C56E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224C574: .word 0x022577AC -_0224C578: .word 0x00001284 -_0224C57C: .word 0x00000FFF -_0224C580: .word 0x000013E3 - thumb_func_end ov23_0224C4CC - - thumb_func_start ov23_0224C584 -ov23_0224C584: ; 0x0224C584 - mov r0, #0x20 - bx lr - thumb_func_end ov23_0224C584 - - thumb_func_start ov23_0224C588 -ov23_0224C588: ; 0x0224C588 - push {r3, r4, r5, r6} - ldr r5, _0224C5AC ; =0x022577AC - ldr r4, [r5, #0] - add r6, r4, r3 - ldr r4, _0224C5B0 ; =0x0000133A - strb r2, [r6, r4] - lsl r2, r3, #1 - ldr r3, [r5, #0] - add r6, r3, r2 - add r3, r4, #0 - sub r3, #0x44 - strh r0, [r6, r3] - ldr r0, [r5, #0] - sub r4, #0x22 - add r0, r0, r2 - strh r1, [r0, r4] - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_0224C5AC: .word 0x022577AC -_0224C5B0: .word 0x0000133A - thumb_func_end ov23_0224C588 - - thumb_func_start ov23_0224C5B4 -ov23_0224C5B4: ; 0x0224C5B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - ldr r0, _0224C690 ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224C694 ; =0x000013E4 - ldrb r1, [r2, r0] - cmp r1, #0 - bne _0224C68A - add r0, r0, #1 - ldrb r0, [r2, r0] - cmp r0, #0 - beq _0224C68A - ldr r0, [r2, #0] - ldr r0, [r0, #0x3c] - cmp r0, #0 - beq _0224C68A - bl sub_0205EABC - add r4, r0, #0 - ldr r0, _0224C690 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - bne _0224C68A - mov r5, #0 - add r4, r5, #0 -_0224C5F6: - cmp r5, #8 - bge _0224C610 - add r0, r5, #0 - bl sub_02032EE8 - cmp r0, #0 - bne _0224C610 - add r0, r5, #0 - bl ov23_0224B61C - add r0, r5, #0 - bl ov23_0224D87C -_0224C610: - ldr r0, _0224C690 ; =0x022577AC - ldr r1, [r0, #0] - ldr r0, _0224C698 ; =0x0000133A - add r2, r1, r5 - ldrb r6, [r2, r0] - cmp r6, #0xff - beq _0224C682 - ldr r3, _0224C69C ; =0x000012F6 - add r0, r1, r4 - ldrh r3, [r0, r3] - str r3, [sp, #8] - ldr r3, _0224C6A0 ; =0x00001318 - ldrh r7, [r0, r3] - add r0, r3, #0 - sub r0, #0x33 - ldrb r0, [r2, r0] - cmp r0, #0xff - beq _0224C63E - ldr r1, [r1, #0] - add r1, #0xa4 - ldr r1, [r1, #0] - bl ov5_021E1674 -_0224C63E: - ldr r0, [sp, #8] - ldr r2, _0224C6A4 ; =0x000001AD - lsl r1, r0, #0x10 - mov r0, #2 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #2 - lsl r1, r7, #0x10 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x14] - ldr r0, _0224C690 ; =0x022577AC - add r2, r6, r2 - ldr r0, [r0, #0] - add r3, sp, #0xc - ldr r1, [r0, #0] - mov r0, #0 - str r0, [sp] - ldr r0, [r1, #0x50] - str r0, [sp, #4] - add r0, r1, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r1, #0x30] - bl ov5_021E19CC - ldr r1, _0224C690 ; =0x022577AC - ldr r1, [r1, #0] - add r2, r1, r5 - ldr r1, _0224C6A8 ; =0x000012E5 - strb r0, [r2, r1] -_0224C682: - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #0x11 - blt _0224C5F6 -_0224C68A: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C690: .word 0x022577AC -_0224C694: .word 0x000013E4 -_0224C698: .word 0x0000133A -_0224C69C: .word 0x000012F6 -_0224C6A0: .word 0x00001318 -_0224C6A4: .word 0x000001AD -_0224C6A8: .word 0x000012E5 - thumb_func_end ov23_0224C5B4 - - thumb_func_start ov23_0224C6AC -ov23_0224C6AC: ; 0x0224C6AC - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224C6E0 ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224C6E4 ; =0x000012E5 - add r1, r2, r4 - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _0224C6DC - ldr r1, [r2, #0] - add r1, #0xa4 - ldr r1, [r1, #0] - bl ov5_021E1674 - ldr r1, _0224C6E0 ; =0x022577AC - mov r3, #0xff - ldr r0, [r1, #0] - add r2, r0, r4 - ldr r0, _0224C6E4 ; =0x000012E5 - strb r3, [r2, r0] - ldr r1, [r1, #0] - add r0, #0x55 - add r1, r1, r4 - strb r3, [r1, r0] -_0224C6DC: - pop {r4, pc} - nop -_0224C6E0: .word 0x022577AC -_0224C6E4: .word 0x000012E5 - thumb_func_end ov23_0224C6AC - - thumb_func_start ov23_0224C6E8 -ov23_0224C6E8: ; 0x0224C6E8 - push {r4, lr} - ldr r0, _0224C704 ; =0x022577AC - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224C700 - mov r4, #0 -_0224C6F4: - add r0, r4, #0 - bl ov23_0224C6AC - add r4, r4, #1 - cmp r4, #0x11 - blt _0224C6F4 -_0224C700: - pop {r4, pc} - nop -_0224C704: .word 0x022577AC - thumb_func_end ov23_0224C6E8 - - thumb_func_start ov23_0224C708 -ov23_0224C708: ; 0x0224C708 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _0224C726 - cmp r0, #1 - beq _0224C734 - b _0224C746 -_0224C726: - add r0, r5, #0 - bl sub_0203CD44 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224C746 -_0224C734: - add r0, r5, #0 - bl sub_0203CD4C - cmp r0, #0 - bne _0224C746 - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} -_0224C746: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224C708 - - thumb_func_start ov23_0224C74C -ov23_0224C74C: ; 0x0224C74C - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _0224C76A - cmp r0, #1 - beq _0224C778 - b _0224C78A -_0224C76A: - add r0, r5, #0 - bl sub_0203CD00 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - b _0224C78A -_0224C778: - add r0, r5, #0 - bl sub_020509DC - cmp r0, #0 - beq _0224C78A - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} -_0224C78A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224C74C - - thumb_func_start ov23_0224C790 -ov23_0224C790: ; 0x0224C790 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r6, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0xd - bhi _0224C882 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224C7B6: ; jump table - .short _0224C7D2 - _0224C7B6 - 2 ; case 0 - .short _0224C7FC - _0224C7B6 - 2 ; case 1 - .short _0224C82C - _0224C7B6 - 2 ; case 2 - .short _0224C842 - _0224C7B6 - 2 ; case 3 - .short _0224C854 - _0224C7B6 - 2 ; case 4 - .short _0224C878 - _0224C7B6 - 2 ; case 5 - .short _0224C88C - _0224C7B6 - 2 ; case 6 - .short _0224C8B6 - _0224C7B6 - 2 ; case 7 - .short _0224CA86 - _0224C7B6 - 2 ; case 8 - .short _0224C956 - _0224C7B6 - 2 ; case 9 - .short _0224C972 - _0224C7B6 - 2 ; case 10 - .short _0224C9AA - _0224C7B6 - 2 ; case 11 - .short _0224C9E0 - _0224C7B6 - 2 ; case 12 - .short _0224CA0A - _0224C7B6 - 2 ; case 13 -_0224C7D2: - mov r0, #0 - bl ov23_0224DBF4 - bl ov23_0224DC08 - bl sub_02035E18 - add r1, r4, #0 - add r1, #0x28 - strb r0, [r1] - bl sub_02035EC8 - bl ov23_022417CC - bl ov23_02249AB8 - cmp r0, #0 - beq _0224C882 - mov r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C7FC: - bl sub_0200F2C0 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #2 - mov r1, #0x10 - mov r2, #0x12 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r5, #0x6c] - bl ov23_0224942C - ldr r0, _0224CAD4 ; =0x00000603 - bl sub_02005748 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C82C: - bl sub_0200F2AC - cmp r0, #0 - beq _0224C882 - ldr r0, [r5, #0x6c] - cmp r0, #0 - bne _0224C882 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C842: - add r0, r6, #0 - bl ov23_0224C708 - cmp r0, #0 - beq _0224C882 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C854: - ldr r0, [r4, #0x14] - add r1, sp, #0xc - str r0, [sp, #0xc] - ldr r0, [r4, #0x18] - str r0, [sp, #0x10] - ldr r0, [r4, #0x1c] - str r0, [sp, #0x14] - ldr r0, [r4, #0x20] - str r0, [sp, #0x18] - ldr r0, [r4, #0x24] - str r0, [sp, #0x1c] - add r0, r6, #0 - bl sub_020544F0 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C878: - add r0, r6, #0 - bl ov23_0224C74C - cmp r0, #0 - bne _0224C884 -_0224C882: - b _0224CACC -_0224C884: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C88C: - add r0, r5, #0 - bl ov23_02249404 - str r0, [r5, #0x6c] - bl sub_0200F2C0 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x11 - mov r2, #0x13 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0224CACC -_0224C8B6: - bl sub_0200F2AC - cmp r0, #0 - beq _0224C98A - bl sub_02033DFC - cmp r0, #0 - beq _0224C8DC - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - bl ov23_02242E58 - cmp r0, #0 - bne _0224C8DC - add r0, r4, #0 - mov r1, #0 - add r0, #0x2e - strb r1, [r0] - b _0224C8E4 -_0224C8DC: - add r0, r4, #0 - mov r1, #1 - add r0, #0x2e - strb r1, [r0] -_0224C8E4: - bl sub_02035EA8 - bl sub_020594FC - mov r3, #0x80 - str r3, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0x32 - mov r1, #0x34 - mov r2, #0 - add r3, #0xc0 - bl sub_02006E84 - mov r0, #2 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #8] - ldr r2, _0224CAD8 ; =0x000003D9 - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r4, #0 - add r0, #0x2d - ldrb r0, [r0] - cmp r0, #0 - beq _0224C936 - bl sub_020594EC - bl ov23_0224219C - mov r2, #0 - mov r1, #0x33 - add r3, r2, #0 - bl ov23_02253F40 - mov r0, #8 - str r0, [r4, #0xc] - b _0224CACC -_0224C936: - ldr r0, _0224CADC ; =0x022577AC - ldr r1, [r0, #0] - ldr r0, _0224CAE0 ; =0x000013E6 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224C948 - mov r0, #0xd - str r0, [r4, #0xc] - b _0224CACC -_0224C948: - add r0, r4, #0 - mov r1, #0 - add r0, #0x29 - strb r1, [r0] - mov r0, #9 - str r0, [r4, #0xc] - b _0224CACC -_0224C956: - add r0, r4, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x29 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0x29 - strb r1, [r0] - mov r0, #0xa - str r0, [r4, #0xc] - b _0224CACC -_0224C972: - add r0, r4, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x29 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x29 - ldrb r0, [r0] - cmp r0, #0xa - bhi _0224C98C -_0224C98A: - b _0224CACC -_0224C98C: - bl sub_02033DFC - cmp r0, #0 - beq _0224C99E - add r0, r4, #0 - add r0, #0x2e - ldrb r0, [r0] - cmp r0, #0 - bne _0224C9A4 -_0224C99E: - mov r0, #0xd - str r0, [r4, #0xc] - b _0224CACC -_0224C9A4: - mov r0, #0xb - str r0, [r4, #0xc] - b _0224CACC -_0224C9AA: - bl sub_02059624 - mov r0, #1 - mov r1, #0x24 - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r5, #0x3c] - mov r2, #1 - bl sub_02061550 - mov r0, #1 - bl sub_020593F4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x44 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _0224CAE4 ; =0x00000604 - bl sub_02005748 - mov r0, #0xc - str r0, [r4, #0xc] - b _0224CACC -_0224C9E0: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224CACC - ldr r0, _0224CAE8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224CACC - mov r0, #0xd - str r0, [r4, #0xc] - bl ov23_0224219C - bl ov23_02254044 - mov r0, #0 - bl sub_020593F4 - b _0224CACC -_0224CA0A: - bl sub_02033DFC - cmp r0, #0 - beq _0224CA24 - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - bl ov23_02242E58 - cmp r0, #0 - bne _0224CA24 - bl ov23_02249AA4 - b _0224CA28 -_0224CA24: - bl ov23_02249B60 -_0224CA28: - mov r0, #0 - bl sub_02059638 - bl sub_02059514 - add r0, r4, #0 - bl sub_020181C4 - bl sub_02033DFC - cmp r0, #0 - beq _0224CA52 - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - bl ov23_02242E58 - cmp r0, #0 - beq _0224CA52 - bl ov23_02242FA8 - b _0224CA56 -_0224CA52: - bl ov23_02242FBC -_0224CA56: - ldr r0, _0224CADC ; =0x022577AC - ldr r2, _0224CAEC ; =0x000012E4 - ldr r0, [r0, #0] - ldrb r1, [r0, r2] - cmp r1, #4 - bne _0224CA70 - ldr r1, _0224CAE0 ; =0x000013E6 - ldrb r1, [r0, r1] - cmp r1, #0 - beq _0224CA70 - mov r1, #6 - strb r1, [r0, r2] - b _0224CA76 -_0224CA70: - ldr r1, _0224CAEC ; =0x000012E4 - mov r2, #0 - strb r2, [r0, r1] -_0224CA76: - bl ov23_0224DC24 - mov r0, #1 - bl ov23_0224DBF4 - add sp, #0x20 - mov r0, #1 - pop {r4, r5, r6, pc} -_0224CA86: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224CAAE - ldr r0, _0224CAE8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224CAAE - mov r0, #0xd - str r0, [r4, #0xc] - bl ov23_0224219C - bl ov23_02254044 - add sp, #0x20 - mov r0, #0 - pop {r4, r5, r6, pc} -_0224CAAE: - bl sub_02035E18 - cmp r0, #1 - ble _0224CACC - add r0, r4, #0 - add r0, #0x28 - ldrb r0, [r0] - cmp r0, #0 - bne _0224CACC - mov r0, #0xd - str r0, [r4, #0xc] - bl ov23_0224219C - bl ov23_02254044 -_0224CACC: - mov r0, #0 - add sp, #0x20 - pop {r4, r5, r6, pc} - nop -_0224CAD4: .word 0x00000603 -_0224CAD8: .word 0x000003D9 -_0224CADC: .word 0x022577AC -_0224CAE0: .word 0x000013E6 -_0224CAE4: .word 0x00000604 -_0224CAE8: .word 0x021BF67C -_0224CAEC: .word 0x000012E4 - thumb_func_end ov23_0224C790 - - thumb_func_start ov23_0224CAF0 -ov23_0224CAF0: ; 0x0224CAF0 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r5, [sp, #0x18] - add r4, r0, #0 - str r5, [sp] - str r5, [sp, #4] - bl ov23_0224BCC4 - add r2, r0, #0 - beq _0224CB12 - ldr r1, [sp, #0x1c] - add r0, #0x2d - strb r1, [r0] - ldr r1, _0224CB18 ; =ov23_0224C790 - add r0, r4, #0 - bl sub_02050904 -_0224CB12: - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0224CB18: .word ov23_0224C790 - thumb_func_end ov23_0224CAF0 - - thumb_func_start ov23_0224CB1C -ov23_0224CB1C: ; 0x0224CB1C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - str r0, [sp, #4] - ldr r0, [r4, #0xc] - mov r7, #0 - ldr r5, [r4, #0] - cmp r0, #0xa - bhi _0224CBB0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224CB3A: ; jump table - .short _0224CB50 - _0224CB3A - 2 ; case 0 - .short _0224CB98 - _0224CB3A - 2 ; case 1 - .short _0224CBB8 - _0224CB3A - 2 ; case 2 - .short _0224CC04 - _0224CB3A - 2 ; case 3 - .short _0224CC4A - _0224CB3A - 2 ; case 4 - .short _0224CC64 - _0224CB3A - 2 ; case 5 - .short _0224CC88 - _0224CB3A - 2 ; case 6 - .short _0224CD04 - _0224CB3A - 2 ; case 7 - .short _0224CD04 - _0224CB3A - 2 ; case 8 - .short _0224CCAC - _0224CB3A - 2 ; case 9 - .short _0224CCC4 - _0224CB3A - 2 ; case 10 -_0224CB50: - ldr r0, [r5, #0xc] - bl sub_02029894 - bl sub_0202988C - strb r0, [r4, #0x12] - bl sub_020594FC - bl ov23_0224219C - mov r1, #0x21 - bl ov23_02254098 - ldr r0, _0224CD54 ; =0x0000061E - bl sub_02005748 - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r1, r7, #0 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021F58FC - bl ov23_0224219C - add r2, r7, #0 - mov r1, #0x21 - add r3, r2, #0 - bl ov23_02253F40 - mov r0, #1 - str r0, [r4, #0xc] - add r0, r7, #0 - strb r0, [r4, #0x11] - b _0224CD04 -_0224CB98: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224CBB0 - ldrb r0, [r4, #0x11] - add r0, r0, #1 - strb r0, [r4, #0x11] - ldrb r0, [r4, #0x11] - cmp r0, #0x1e - bhi _0224CBB2 -_0224CBB0: - b _0224CD04 -_0224CBB2: - mov r0, #2 - str r0, [r4, #0xc] - b _0224CD04 -_0224CBB8: - bl sub_0203608C - bl sub_02058D88 - add r6, r0, #0 - bl sub_0203608C - bl sub_02058DC0 - str r0, [sp, #8] - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - bl sub_02059328 - str r0, [sp, #0xc] - bl ov23_0224219C - add r2, r7, #0 - mov r1, #0x22 - add r3, r2, #0 - bl ov23_02253F40 - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - add r0, r6, #0 - mov r3, #0x10 - bl ov23_0224C588 - ldr r3, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov5_021F5634 - mov r0, #3 - str r0, [r4, #0xc] - b _0224CD04 -_0224CC04: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224CD04 - bl sub_0203608C - add r1, r7, #0 - bl ov23_0224BD1C - cmp r0, #0 - beq _0224CC26 - mov r0, #4 - mov r6, #0x39 - str r0, [r4, #0xc] - b _0224CC3A -_0224CC26: - ldrb r0, [r4, #0x12] - cmp r0, #0 - beq _0224CC34 - mov r0, #5 - mov r6, #0x24 - str r0, [r4, #0xc] - b _0224CC3A -_0224CC34: - mov r0, #5 - mov r6, #0x23 - str r0, [r4, #0xc] -_0224CC3A: - bl ov23_0224219C - mov r2, #0 - add r1, r6, #0 - add r3, r2, #0 - bl ov23_02253F40 - b _0224CD04 -_0224CC4A: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224CD04 - ldr r0, _0224CD58 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r1, r0 - beq _0224CD04 - add r7, r0, #0 - b _0224CD04 -_0224CC64: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224CD04 - mov r0, #4 - str r0, [sp] - ldr r0, [r5, #8] - ldr r1, _0224CD5C ; =0x02256864 - ldr r2, _0224CD60 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #8] - mov r0, #6 - str r0, [r4, #0xc] - b _0224CD04 -_0224CC88: - ldr r0, [r4, #8] - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224CC9E - mov r0, #9 - str r0, [r4, #0xc] - add r0, r7, #0 - str r0, [r4, #8] - b _0224CD04 -_0224CC9E: - sub r1, r7, #1 - cmp r0, r1 - beq _0224CD04 - mov r0, #0 - mov r7, #1 - str r0, [r4, #8] - b _0224CD04 -_0224CCAC: - mov r0, #0x21 - bl ov23_0224FD68 - bl ov23_0224219C - bl ov23_02254044 - bl ov23_02249A74 - mov r0, #0xa - str r0, [r4, #0xc] - b _0224CD04 -_0224CCC4: - bl sub_02033DFC - cmp r0, #0 - beq _0224CD04 - bl sub_0203608C - cmp r0, #0 - bne _0224CD04 - mov r1, #2 - add r0, sp, #0x10 - strb r1, [r0] - ldrb r1, [r4, #0x12] - cmp r1, #0 - beq _0224CCE4 - mov r1, #3 - strb r1, [r0] -_0224CCE4: - bl ov23_0224D238 - mov r0, #0x56 - add r1, sp, #0x10 - bl sub_020360D0 - ldr r0, [sp, #4] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - bl ov23_02243204 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_0224CD04: - cmp r7, #0 - beq _0224CD4E - bl ov23_0224219C - ldr r3, _0224CD64 ; =ov23_0224B654 - mov r1, #0x38 - mov r2, #1 - bl ov23_02253F40 - mov r0, #0x10 - bl ov23_0224C6AC - bl sub_0203608C - bl sub_02058D88 - add r6, r0, #0 - bl sub_0203608C - bl sub_02058DC0 - add r3, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov5_021F5634 - ldr r0, [sp, #4] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - bl ov23_02243204 - bl ov23_0224DC24 -_0224CD4E: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0224CD54: .word 0x0000061E -_0224CD58: .word 0x021BF67C -_0224CD5C: .word 0x02256864 -_0224CD60: .word 0x000003D9 -_0224CD64: .word ov23_0224B654 - thumb_func_end ov23_0224CB1C - - thumb_func_start ov23_0224CD68 -ov23_0224CD68: ; 0x0224CD68 - push {r3, lr} - mov r1, #0 - add r0, sp, #0 - strb r1, [r0] - mov r0, #0x56 - add r1, sp, #0 - bl sub_020360D0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224CD68 - - thumb_func_start ov23_0224CD7C -ov23_0224CD7C: ; 0x0224CD7C - mov r0, #2 - bx lr - thumb_func_end ov23_0224CD7C - - thumb_func_start ov23_0224CD80 -ov23_0224CD80: ; 0x0224CD80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - add r6, r2, #0 - bl sub_02058EE0 - add r4, r0, #0 - add r0, r7, #0 - bl sub_02058F18 - add r5, r0, #0 - add r0, r7, #0 - bl sub_02058F80 - str r0, [sp, #4] - add r0, r7, #0 - bl sub_02058DF8 - add r0, r7, #0 - bl sub_02058E4C - sub r0, r5, r0 - beq _0224CDBC - add r0, r4, #1 - str r0, [sp, #0x10] - sub r0, r4, #1 - str r0, [sp, #8] - str r5, [sp, #0xc] - str r5, [sp] - b _0224CDC8 -_0224CDBC: - add r0, r5, #1 - str r0, [sp, #0xc] - sub r0, r5, #1 - str r0, [sp] - str r4, [sp, #0x10] - str r4, [sp, #8] -_0224CDC8: - add r0, sp, #0x14 - strb r7, [r0] - ldrb r1, [r6] - cmp r1, #0 - bne _0224CDD6 - mov r1, #0 - b _0224CDD8 -_0224CDD6: - mov r1, #5 -_0224CDD8: - strb r1, [r0, #1] - add r0, r4, #0 - add r1, r5, #0 - bl ov23_0224B65C - ldrb r1, [r6] - cmp r1, #0 - bne _0224CDEC - cmp r0, #0xff - bne _0224CE82 -_0224CDEC: - add r0, r4, #0 - add r1, r5, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _0224CE00 - mov r1, #6 - add r0, sp, #0x14 - strb r1, [r0, #1] - b _0224CE82 -_0224CE00: - ldr r0, _0224CE90 ; =0x022577AC - add r1, r4, #0 - ldr r0, [r0, #0] - add r2, r5, #0 - ldr r0, [r0, #0] - bl sub_02054F68 - cmp r0, #0 - beq _0224CE82 - ldr r0, _0224CE90 ; =0x022577AC - ldr r1, [sp, #0x10] - ldr r0, [r0, #0] - ldr r2, [sp, #0xc] - ldr r0, [r0, #0] - bl sub_02054F68 - cmp r0, #0 - beq _0224CE82 - ldr r0, _0224CE90 ; =0x022577AC - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r2, [sp] - ldr r0, [r0, #0] - bl sub_02054F68 - cmp r0, #0 - beq _0224CE82 - ldrb r0, [r6] - cmp r0, #0 - bne _0224CE44 - mov r1, #1 - add r0, sp, #0x14 - strb r1, [r0, #1] - b _0224CE82 -_0224CE44: - ldr r2, [sp, #4] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #0x10 - bl ov23_0224C1EC - mov r0, #0x10 - add r1, r7, #0 - bl ov23_0224B79C - cmp r0, #0 - beq _0224CE82 - ldrb r0, [r6] - cmp r0, #1 - beq _0224CE6C - cmp r0, #2 - beq _0224CE7C - cmp r0, #3 - beq _0224CE74 - b _0224CE82 -_0224CE6C: - mov r1, #2 - add r0, sp, #0x14 - strb r1, [r0, #1] - b _0224CE82 -_0224CE74: - mov r1, #3 - add r0, sp, #0x14 - strb r1, [r0, #1] - b _0224CE82 -_0224CE7C: - mov r1, #4 - add r0, sp, #0x14 - strb r1, [r0, #1] -_0224CE82: - mov r0, #0x57 - add r1, sp, #0x14 - bl sub_02035B48 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224CE90: .word 0x022577AC - thumb_func_end ov23_0224CD80 - - thumb_func_start ov23_0224CE94 -ov23_0224CE94: ; 0x0224CE94 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x10 - bl ov23_0224C6AC - ldr r0, [r4, #8] - cmp r0, #0 - beq _0224CEAC - mov r1, #4 - bl sub_02002154 -_0224CEAC: - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - bl ov23_02243204 - bl sub_02059514 - bl ov23_0224DC24 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_0224CE94 - - thumb_func_start ov23_0224CEC8 -ov23_0224CEC8: ; 0x0224CEC8 - push {r4, lr} - bl ov23_0224DC08 - mov r0, #4 - mov r1, #0x14 - bl sub_02018184 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0xc] - bl sub_0203608C - strb r0, [r4, #0x10] - ldr r0, _0224CF0C ; =0x022577AC - add r1, r4, #0 - ldr r0, [r0, #0] - mov r2, #0x64 - ldr r0, [r0, #0] - str r0, [r4, #0] - ldr r0, _0224CF10 ; =ov23_0224CB1C - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r1, [r4, #4] - ldr r2, _0224CF14 ; =ov23_0224CE94 - add r0, r4, #0 - bl ov23_022431EC - pop {r4, pc} - nop -_0224CF0C: .word 0x022577AC -_0224CF10: .word ov23_0224CB1C -_0224CF14: .word ov23_0224CE94 - thumb_func_end ov23_0224CEC8 - - thumb_func_start ov23_0224CF18 -ov23_0224CF18: ; 0x0224CF18 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _0224D018 ; =0x022577AC - add r5, r2, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298A0 - ldrb r4, [r5] - add r7, r0, #0 - bl sub_0203608C - cmp r4, r0 - bne _0224D016 - ldrb r0, [r5, #1] - cmp r0, #0 - bne _0224CF54 - bl sub_020594FC - bl ov23_0224219C - ldr r3, _0224D01C ; =ov23_0224B654 - mov r1, #0x36 - mov r2, #1 - bl ov23_02253F40 - bl ov23_0224DC24 - pop {r3, r4, r5, r6, r7, pc} -_0224CF54: - cmp r0, #1 - bne _0224CF5E - bl ov23_0224CEC8 - pop {r3, r4, r5, r6, r7, pc} -_0224CF5E: - cmp r0, #6 - bne _0224CF7A - bl sub_020594FC - bl ov23_0224219C - ldr r3, _0224D01C ; =ov23_0224B654 - mov r1, #0x4a - mov r2, #1 - bl ov23_02253F40 - bl ov23_0224DC24 - pop {r3, r4, r5, r6, r7, pc} -_0224CF7A: - cmp r0, #5 - bne _0224CF9A - bl sub_020594FC - bl ov23_0224219C - ldr r3, _0224D01C ; =ov23_0224B654 - mov r1, #0x58 - mov r2, #1 - bl ov23_02253F40 - bl ov23_02249AA4 - bl ov23_0224DC24 - pop {r3, r4, r5, r6, r7, pc} -_0224CF9A: - add r0, #0xfe - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #2 - bhi _0224D016 - add r0, r4, #0 - bl sub_02058D88 - add r4, r0, #0 - ldrb r0, [r5] - bl sub_02058DC0 - add r6, r0, #0 - ldrb r0, [r5] - bl sub_02058F50 - str r0, [sp] - ldrb r3, [r5] - ldr r2, [sp] - add r0, r4, #0 - add r1, r6, #0 - bl ov23_0224C1EC - ldr r2, [sp] - add r0, r4, #0 - add r1, r6, #0 - mov r3, #0x10 - bl ov23_0224C1EC - ldrb r0, [r5, #1] - cmp r0, #3 - bne _0224CFE0 - add r0, r7, #0 - bl sub_02029824 -_0224CFE0: - ldrb r0, [r5, #1] - add r0, #0xfd - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bhi _0224D016 - mov r0, #0xb - bl sub_0202BE20 - add r1, r0, #0 - ldr r0, _0224D018 ; =0x022577AC - mov r2, #1 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - add r0, #0x9c - ldr r0, [r0, #0] - bl sub_0202B758 - ldr r0, _0224D018 ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x23 - bl sub_0202CFEC -_0224D016: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D018: .word 0x022577AC -_0224D01C: .word ov23_0224B654 - thumb_func_end ov23_0224CF18 - - thumb_func_start ov23_0224D020 -ov23_0224D020: ; 0x0224D020 - push {r3, r4, r5, r6, r7, lr} - ldr r4, _0224D11C ; =0x022577AC - add r6, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0224D030 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224D030: - mov r5, #0 -_0224D032: - ldr r0, [r4, #0] - ldr r1, _0224D120 ; =0x0000137B - add r0, r0, r5 - ldrb r7, [r0, r1] - cmp r7, #0xff - beq _0224D068 - mov r2, #0xff - strb r2, [r0, r1] - cmp r5, r7 - beq _0224D068 - add r0, r5, #0 - bl sub_02032EE8 - str r0, [sp] - add r0, r7, #0 - bl sub_02032EE8 - add r1, r0, #0 - ldr r0, [sp] - mov r2, #0x68 - add r3, r6, #0 - bl ov23_0224223C - cmp r0, #0 - beq _0224D068 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224D068: - ldr r0, [r4, #0] - add r1, r0, r5 - ldr r0, _0224D124 ; =0x0000134B - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _0224D0A6 - add r0, r5, #0 - bl sub_02032EE8 - add r7, r0, #0 - ldr r0, [r4, #0] - add r1, r0, r5 - ldr r0, _0224D124 ; =0x0000134B - ldrb r0, [r1, r0] - bl sub_02032EE8 - add r1, r0, #0 - ldr r0, [r4, #0] - mov r2, #0xff - add r3, r0, r5 - ldr r0, _0224D124 ; =0x0000134B - strb r2, [r3, r0] - add r0, r7, #0 - mov r2, #0x6c - add r3, r6, #0 - bl ov23_0224223C - cmp r0, #0 - beq _0224D0A6 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224D0A6: - ldr r0, [r4, #0] - add r1, r0, r5 - ldr r0, _0224D128 ; =0x0000135B - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _0224D0D6 - add r0, r5, #0 - bl sub_02032EE8 - ldr r2, _0224D11C ; =0x022577AC - mov r1, #0xff - ldr r2, [r2, #0] - add r3, r2, r5 - ldr r2, _0224D128 ; =0x0000135B - strb r1, [r3, r2] - mov r1, #0 - mov r2, #0x6d - add r3, r6, #0 - bl ov23_022422A8 - cmp r0, #0 - beq _0224D116 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224D0D6: - ldr r0, _0224D12C ; =0x00001353 - ldrb r0, [r1, r0] - cmp r0, #0xff - beq _0224D110 - add r0, r5, #0 - bl sub_02032EE8 - add r7, r0, #0 - ldr r0, [r4, #0] - add r1, r0, r5 - ldr r0, _0224D12C ; =0x00001353 - ldrb r0, [r1, r0] - bl sub_02032EE8 - add r1, r0, #0 - ldr r0, [r4, #0] - mov r2, #0xff - add r3, r0, r5 - ldr r0, _0224D12C ; =0x00001353 - strb r2, [r3, r0] - add r0, r7, #0 - mov r2, #0x6e - add r3, r6, #0 - bl ov23_0224223C - cmp r0, #0 - beq _0224D110 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224D110: - add r5, r5, #1 - cmp r5, #8 - blt _0224D032 -_0224D116: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D11C: .word 0x022577AC -_0224D120: .word 0x0000137B -_0224D124: .word 0x0000134B -_0224D128: .word 0x0000135B -_0224D12C: .word 0x00001353 - thumb_func_end ov23_0224D020 - - thumb_func_start ov23_0224D130 -ov23_0224D130: ; 0x0224D130 - ldr r0, _0224D14C ; =0x022577AC - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224D146 - mov r0, #0xa - lsl r0, r0, #8 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224D146 - add r0, r0, #2 - bx lr -_0224D146: - mov r0, #0 - bx lr - nop -_0224D14C: .word 0x022577AC - thumb_func_end ov23_0224D130 - - thumb_func_start ov23_0224D150 -ov23_0224D150: ; 0x0224D150 - ldr r0, _0224D170 ; =0x022577AC - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224D16A - mov r0, #0xa - lsl r0, r0, #8 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224D16A - ldrb r1, [r0] - ldr r0, _0224D174 ; =0x0225760C - ldrb r0, [r0, r1] - bx lr -_0224D16A: - mov r0, #0 - bx lr - nop -_0224D170: .word 0x022577AC -_0224D174: .word 0x0225760C - thumb_func_end ov23_0224D150 - - thumb_func_start ov23_0224D178 -ov23_0224D178: ; 0x0224D178 - ldr r0, _0224D198 ; =0x022577AC - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224D192 - mov r0, #0xa - lsl r0, r0, #8 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0224D192 - ldrb r1, [r0] - ldr r0, _0224D19C ; =0x02257620 - ldrb r0, [r0, r1] - bx lr -_0224D192: - mov r0, #0 - bx lr - nop -_0224D198: .word 0x022577AC -_0224D19C: .word 0x02257620 - thumb_func_end ov23_0224D178 - - thumb_func_start ov23_0224D1A0 -ov23_0224D1A0: ; 0x0224D1A0 - push {r4, r5, r6, r7} - add r7, r0, #0 - ldr r0, _0224D228 ; =0x022577AC - add r5, r1, #0 - ldr r0, [r0, #0] - mov ip, r0 - cmp r0, #0 - bne _0224D1B6 - mov r0, #1 - pop {r4, r5, r6, r7} - bx lr -_0224D1B6: - cmp r5, #0x40 - blt _0224D1C0 - mov r0, #1 - pop {r4, r5, r6, r7} - bx lr -_0224D1C0: - asr r0, r7, #4 - asr r1, r5, #4 - lsr r0, r0, #0x1b - lsr r1, r1, #0x1b - add r0, r7, r0 - add r1, r5, r1 - ldr r3, _0224D22C ; =0x0225760C - ldr r4, _0224D230 ; =0x02257620 - asr r0, r0, #5 - asr r1, r1, #5 - mov r2, #0 -_0224D1D6: - ldrb r6, [r3] - cmp r0, r6 - bne _0224D216 - ldrb r6, [r4] - cmp r1, r6 - bne _0224D216 - lsr r4, r7, #0x1f - lsl r3, r7, #0x1b - sub r3, r3, r4 - mov r1, #0x1b - ror r3, r1 - mov r0, #1 - add r4, r4, r3 - add r3, r0, #0 - lsl r3, r4 - lsl r4, r2, #7 - mov r2, ip - add r2, r2, r4 - lsr r6, r5, #0x1f - lsl r4, r5, #0x1b - sub r4, r4, r6 - ror r4, r1 - add r1, r6, r4 - lsl r1, r1, #2 - add r2, r2, r1 - ldr r1, _0224D234 ; =0x00000A04 - ldr r1, [r2, r1] - tst r1, r3 - bne _0224D222 - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr -_0224D216: - add r2, r2, #1 - add r3, r3, #1 - add r4, r4, #1 - cmp r2, #0x11 - blt _0224D1D6 - mov r0, #1 -_0224D222: - pop {r4, r5, r6, r7} - bx lr - nop -_0224D228: .word 0x022577AC -_0224D22C: .word 0x0225760C -_0224D230: .word 0x02257620 -_0224D234: .word 0x00000A04 - thumb_func_end ov23_0224D1A0 - - thumb_func_start ov23_0224D238 -ov23_0224D238: ; 0x0224D238 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xb0 - ldr r0, _0224D38C ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_02029894 - str r0, [sp, #0xc] - ldr r0, _0224D38C ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_0203D174 - bl sub_020298B0 - add r4, r0, #0 - mov r0, #0 - bl sub_02058EE0 - str r0, [sp, #8] - mov r0, #0 - bl sub_02058F18 - str r0, [sp, #4] - mov r0, #0 - bl sub_02058F80 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #0x28] - mov r0, #0xc - str r0, [sp, #0x2c] - ldr r0, _0224D38C ; =0x022577AC - ldr r0, [r0, #0] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206AA20 - ldr r0, [sp, #0xc] - bl sub_020292CC - add r0, r4, #0 - bl sub_02028B34 - add r0, sp, #0x10 - bl sub_020361BC - mov r4, #0 -_0224D2A0: - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - bl sub_020E1F1C - ldr r2, [sp, #0x20] - ldr r6, [sp, #0x24] - add r7, r2, r0 - adc r6, r1 - mov r1, #0 - add r0, r6, #0 - mov r2, #5 - mov r3, #0 - str r7, [sp, #0x10] - str r6, [sp, #0x14] - bl sub_020E1F1C - cmp r1, #2 - bge _0224D2CE - lsl r5, r1, #1 - add r5, #0xa - b _0224D2D4 -_0224D2CE: - sub r0, r1, #3 - lsl r5, r0, #1 - add r5, #0x12 -_0224D2D4: - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x1c] - add r2, r7, #0 - add r3, r6, #0 - bl sub_020E1F1C - ldr r2, [sp, #0x20] - ldr r3, [sp, #0x24] - add r0, r2, r0 - adc r3, r1 - str r0, [sp, #0x10] - str r3, [sp, #0x14] - add r0, r3, #0 - mov r1, #0 - mov r2, #6 - mov r3, #0 - bl sub_020E1F1C - lsl r6, r1, #1 - add r6, #0xc - mov r0, #1 - mov r1, #0 - cmp r4, #0 - blt _0224D31E - add r2, sp, #0x28 -_0224D306: - ldr r3, [r2, #0] - cmp r5, r3 - bne _0224D316 - ldr r3, [r2, #4] - cmp r6, r3 - bne _0224D316 - mov r0, #0 - b _0224D31E -_0224D316: - add r1, r1, #1 - add r2, #8 - cmp r1, r4 - ble _0224D306 -_0224D31E: - cmp r0, #0 - bne _0224D326 - sub r4, r4, #1 - b _0224D33E -_0224D326: - add r1, r4, #0 - ldr r0, [sp, #0xc] - add r1, #0x10 - add r2, r5, #0 - add r3, r6, #0 - bl sub_02029364 - add r1, sp, #0x28 - lsl r0, r4, #3 - add r0, r1, r0 - str r5, [r0, #8] - str r6, [r0, #0xc] -_0224D33E: - add r4, r4, #1 - cmp r4, #0x10 - blt _0224D2A0 - ldr r0, _0224D38C ; =0x022577AC - mov r2, #0x22 - ldr r1, [r0, #0] - ldr r0, _0224D390 ; =0x00000A04 - lsl r2, r2, #6 - add r0, r1, r0 - mov r1, #0xff - bl sub_020C4CF4 - ldr r0, [sp] - bl sub_02059328 - add r3, r0, #0 - ldr r0, [sp, #0xc] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - bl sub_02029854 - ldr r1, _0224D38C ; =0x022577AC - ldr r0, [sp, #0xc] - ldr r2, [r1, #0] - ldr r1, _0224D394 ; =0x0000096A - add r1, r2, r1 - mov r2, #0x94 - bl sub_020C4DB0 - ldr r1, _0224D38C ; =0x022577AC - ldr r0, [sp, #0xc] - ldr r2, [r1, #0] - ldr r1, _0224D398 ; =0x00001204 - add r1, r2, r1 - bl ov23_0224B39C - add sp, #0xb0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D38C: .word 0x022577AC -_0224D390: .word 0x00000A04 -_0224D394: .word 0x0000096A -_0224D398: .word 0x00001204 - thumb_func_end ov23_0224D238 - - thumb_func_start ov23_0224D39C -ov23_0224D39C: ; 0x0224D39C - push {r4, lr} - add r4, r0, #0 - bl ov23_022421CC - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F40 - pop {r4, pc} - thumb_func_end ov23_0224D39C - - thumb_func_start ov23_0224D3B0 -ov23_0224D3B0: ; 0x0224D3B0 - push {r3, lr} - bl ov23_022421CC - bl ov23_02254044 - pop {r3, pc} - thumb_func_end ov23_0224D3B0 - - thumb_func_start ov23_0224D3BC -ov23_0224D3BC: ; 0x0224D3BC - push {r4, lr} - add r4, r0, #0 - bl ov23_022421CC - mov r1, #0 - add r2, r4, #0 - bl ov23_022541C8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224D3BC - - thumb_func_start ov23_0224D3D0 -ov23_0224D3D0: ; 0x0224D3D0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov23_022421CC - add r1, r4, #0 - add r2, r5, #0 - bl ov23_02254154 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224D3D0 - - thumb_func_start ov23_0224D3E4 -ov23_0224D3E4: ; 0x0224D3E4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - str r1, [sp] - str r2, [sp, #4] - mov r4, #0 -_0224D3F0: - add r0, r5, #0 - add r1, r4, #0 - bl sub_020293B0 - str r0, [sp, #8] - cmp r0, #0 - beq _0224D448 - cmp r4, #0 - beq _0224D448 - cmp r4, #0x10 - bge _0224D448 - bl sub_0205741C - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_020293FC - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202942C - ldr r1, [sp] - ldr r2, [sp, #4] - sub r1, r1, r7 - sub r2, r2, r0 - cmp r1, #0 - blt _0224D448 - cmp r1, #2 - bgt _0224D448 - cmp r2, #0 - blt _0224D448 - cmp r2, #2 - bgt _0224D448 - lsl r0, r2, #1 - add r2, r2, r0 - add r0, r6, r1 - ldrb r0, [r2, r0] - cmp r0, #0 - beq _0224D448 - ldr r0, [sp, #8] - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0224D448: - add r4, r4, #1 - cmp r4, #0x20 - blt _0224D3F0 - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov23_0224D3E4 - - thumb_func_start ov23_0224D454 -ov23_0224D454: ; 0x0224D454 - push {r3, r4, r5, r6, lr} - sub sp, #4 - ldrh r4, [r1] - ldrh r6, [r1, #2] - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov23_0224D1A0 - cmp r0, #0 - bne _0224D4C0 - add r0, sp, #0 - strb r5, [r0] - add r0, r4, #0 - add r1, r6, #0 - bl ov23_0224B05C - ldr r1, _0224D4C8 ; =0x022577AC - mov r3, #0x1b - ldr r2, [r1, #0] - mov r1, #0x96 - add r2, #0xa - mul r1, r0 - add r0, r2, r1 - lsr r2, r4, #0x1f - lsl r1, r4, #0x1b - sub r1, r1, r2 - ror r1, r3 - add r1, r2, r1 - lsr r4, r6, #0x1f - lsl r2, r6, #0x1b - sub r2, r2, r4 - ror r2, r3 - add r2, r4, r2 - bl ov23_0224D3E4 - bl sub_0205746C - add r1, sp, #0 - strb r0, [r1, #1] - ldrb r0, [r1, #1] - cmp r0, #0 - beq _0224D4C0 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - mov r0, #0x3c - add r1, sp, #0 - bl sub_02035B48 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0224D4C0: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0224D4C8: .word 0x022577AC - thumb_func_end ov23_0224D454 - - thumb_func_start ov23_0224D4CC -ov23_0224D4CC: ; 0x0224D4CC - push {r3, r4, r5, lr} - ldr r0, _0224D4F8 ; =0x022577AC - add r5, r2, #0 - ldr r1, [r0, #0] - mov r0, #0xa - lsl r0, r0, #8 - ldr r0, [r1, r0] - add r0, r0, #2 - bl sub_020298AC - add r4, r0, #0 - bl sub_0203608C - ldrb r1, [r5] - cmp r1, r0 - bne _0224D4F4 - ldrb r1, [r5, #1] - add r0, r4, #0 - bl ov23_02253A00 -_0224D4F4: - pop {r3, r4, r5, pc} - nop -_0224D4F8: .word 0x022577AC - thumb_func_end ov23_0224D4CC - - thumb_func_start ov23_0224D4FC -ov23_0224D4FC: ; 0x0224D4FC - mov r0, #2 - bx lr - thumb_func_end ov23_0224D4FC - - thumb_func_start ov23_0224D500 -ov23_0224D500: ; 0x0224D500 - ldr r2, _0224D510 ; =0x022577AC - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224D50E - add r2, r2, r0 - ldr r0, _0224D514 ; =0x0000134B - strb r1, [r2, r0] -_0224D50E: - bx lr - ; .align 2, 0 -_0224D510: .word 0x022577AC -_0224D514: .word 0x0000134B - thumb_func_end ov23_0224D500 - - thumb_func_start ov23_0224D518 -ov23_0224D518: ; 0x0224D518 - ldr r2, _0224D528 ; =0x022577AC - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224D526 - add r2, r2, r0 - ldr r0, _0224D52C ; =0x00001353 - strb r1, [r2, r0] -_0224D526: - bx lr - ; .align 2, 0 -_0224D528: .word 0x022577AC -_0224D52C: .word 0x00001353 - thumb_func_end ov23_0224D518 - - thumb_func_start ov23_0224D530 -ov23_0224D530: ; 0x0224D530 - ldr r1, _0224D544 ; =0x022577AC - ldr r1, [r1, #0] - cmp r1, #0 - beq _0224D540 - add r1, r1, r0 - ldr r0, _0224D548 ; =0x0000135B - mov r2, #1 - strb r2, [r1, r0] -_0224D540: - bx lr - nop -_0224D544: .word 0x022577AC -_0224D548: .word 0x0000135B - thumb_func_end ov23_0224D530 - - thumb_func_start ov23_0224D54C -ov23_0224D54C: ; 0x0224D54C - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, _0224D5A0 ; =0x022577AC - mov r1, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - add r0, #0xa4 - ldr r0, [r0, #0] - bl ov5_021E18C4 - add r1, r0, #0 - add r0, sp, #8 - bl ov5_021E1894 - ldr r1, _0224D5A0 ; =0x022577AC - mov r0, #0 - ldr r1, [r1, #0] - ldr r1, [r1, #0] - add r1, #0xa4 - ldr r1, [r1, #0] - bl ov5_021E1674 - ldr r0, _0224D5A0 ; =0x022577AC - ldr r2, _0224D5A4 ; =0x0000013D - ldr r0, [r0, #0] - ldr r1, [r0, #0] - mov r0, #0 - str r0, [sp] - ldr r0, [r1, #0x50] - str r0, [sp, #4] - add r0, r1, #0 - ldrb r3, [r4, #5] - add r0, #0xa4 - ldr r0, [r0, #0] - add r2, r3, r2 - ldr r1, [r1, #0x30] - add r3, sp, #8 - bl ov5_021E19CC - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_0224D5A0: .word 0x022577AC -_0224D5A4: .word 0x0000013D - thumb_func_end ov23_0224D54C - - thumb_func_start ov23_0224D5A8 -ov23_0224D5A8: ; 0x0224D5A8 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224D5A8 - - thumb_func_start ov23_0224D5BC -ov23_0224D5BC: ; 0x0224D5BC - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #4 - bhi _0224D68A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224D5D6: ; jump table - .short _0224D5E0 - _0224D5D6 - 2 ; case 0 - .short _0224D600 - _0224D5D6 - 2 ; case 1 - .short _0224D62E - _0224D5D6 - 2 ; case 2 - .short _0224D65E - _0224D5D6 - 2 ; case 3 - .short _0224D67A - _0224D5D6 - 2 ; case 4 -_0224D5E0: - bl sub_020594FC - bl ov23_022421AC - mov r2, #0 - mov r1, #7 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _0224D690 ; =0x000005E3 - bl sub_02005748 - mov r0, #1 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, pc} -_0224D600: - bl ov23_022421AC - bl ov23_02254238 - cmp r0, #0 - bne _0224D68A - ldr r0, _0224D694 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224D68A - bl ov23_022421AC - ldrb r1, [r4, #5] - mov r2, #0 - add r3, r2, #0 - add r1, #0xe - bl ov23_02253F40 - mov r0, #2 - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, pc} -_0224D62E: - bl ov23_022421AC - bl ov23_02254238 - cmp r0, #0 - bne _0224D68A - ldr r0, _0224D694 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224D68A - add r0, r4, #0 - bl ov23_0224D54C - mov r0, #4 - str r0, [r4, #0] - bl ov23_022421AC - bl ov23_02254044 - bl sub_02059514 - add sp, #0xc - pop {r4, r5, pc} -_0224D65E: - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - add sp, #0xc - pop {r4, r5, pc} -_0224D67A: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - bl ov23_02243204 -_0224D68A: - add sp, #0xc - pop {r4, r5, pc} - nop -_0224D690: .word 0x000005E3 -_0224D694: .word 0x021BF67C - thumb_func_end ov23_0224D5BC - - thumb_func_start ov23_0224D698 -ov23_0224D698: ; 0x0224D698 - push {r3, lr} - add r1, sp, #0 - strb r0, [r1] - ldrb r0, [r2] - strb r0, [r1, #1] - mov r0, #0x61 - add r1, sp, #0 - bl sub_02035B48 - pop {r3, pc} - thumb_func_end ov23_0224D698 - - thumb_func_start ov23_0224D6AC -ov23_0224D6AC: ; 0x0224D6AC - push {r3, r4, r5, lr} - add r5, r2, #0 - bl sub_0203608C - ldrb r1, [r5] - cmp r1, r0 - bne _0224D6E8 - mov r0, #0xb - mov r1, #8 - bl sub_02018144 - mov r1, #0 - mov r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0] - ldrb r0, [r5, #1] - add r1, r4, #0 - mov r2, #0x64 - strb r0, [r4, #5] - ldr r0, _0224D6EC ; =ov23_0224D5BC - bl sub_0200D9E8 - add r1, r0, #0 - ldr r2, _0224D6F0 ; =ov23_0224D5A8 - add r0, r4, #0 - bl ov23_022431EC -_0224D6E8: - pop {r3, r4, r5, pc} - nop -_0224D6EC: .word ov23_0224D5BC -_0224D6F0: .word ov23_0224D5A8 - thumb_func_end ov23_0224D6AC - - thumb_func_start ov23_0224D6F4 -ov23_0224D6F4: ; 0x0224D6F4 - mov r0, #2 - bx lr - thumb_func_end ov23_0224D6F4 - - thumb_func_start ov23_0224D6F8 -ov23_0224D6F8: ; 0x0224D6F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp] - mov r4, #0 -_0224D704: - add r0, r5, #0 - add r1, r4, #0 - bl sub_020293B0 - str r0, [sp, #4] - cmp r0, #0 - beq _0224D744 - cmp r4, #0 - beq _0224D744 - cmp r4, #0x10 - bge _0224D744 - bl sub_0205741C - add r0, r5, #0 - add r1, r4, #0 - bl sub_020293FC - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202942C - ldr r1, [sp] - sub r2, r7, r6 - sub r0, r1, r0 - cmp r2, #0 - bne _0224D744 - cmp r0, #0 - bne _0224D744 - ldr r0, [sp, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0224D744: - add r4, r4, #1 - cmp r4, #0x20 - blt _0224D704 - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0224D6F8 - - thumb_func_start ov23_0224D750 -ov23_0224D750: ; 0x0224D750 - sub r0, #0x38 - cmp r0, #0xf - bhi _0224D7C2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224D762: ; jump table - .short _0224D782 - _0224D762 - 2 ; case 0 - .short _0224D786 - _0224D762 - 2 ; case 1 - .short _0224D78A - _0224D762 - 2 ; case 2 - .short _0224D78E - _0224D762 - 2 ; case 3 - .short _0224D792 - _0224D762 - 2 ; case 4 - .short _0224D796 - _0224D762 - 2 ; case 5 - .short _0224D79A - _0224D762 - 2 ; case 6 - .short _0224D79E - _0224D762 - 2 ; case 7 - .short _0224D7A2 - _0224D762 - 2 ; case 8 - .short _0224D7A6 - _0224D762 - 2 ; case 9 - .short _0224D7AA - _0224D762 - 2 ; case 10 - .short _0224D7AE - _0224D762 - 2 ; case 11 - .short _0224D7B2 - _0224D762 - 2 ; case 12 - .short _0224D7B6 - _0224D762 - 2 ; case 13 - .short _0224D7BA - _0224D762 - 2 ; case 14 - .short _0224D7BE - _0224D762 - 2 ; case 15 -_0224D782: - mov r0, #0xb - bx lr -_0224D786: - mov r0, #0xc - bx lr -_0224D78A: - mov r0, #0x12 - bx lr -_0224D78E: - mov r0, #0x13 - bx lr -_0224D792: - mov r0, #0x14 - bx lr -_0224D796: - mov r0, #0x15 - bx lr -_0224D79A: - mov r0, #0x16 - bx lr -_0224D79E: - mov r0, #0x17 - bx lr -_0224D7A2: - mov r0, #0x18 - bx lr -_0224D7A6: - mov r0, #0x19 - bx lr -_0224D7AA: - mov r0, #0x1a - bx lr -_0224D7AE: - mov r0, #0x1b - bx lr -_0224D7B2: - mov r0, #0x1c - bx lr -_0224D7B6: - mov r0, #0x1d - bx lr -_0224D7BA: - mov r0, #0x1e - bx lr -_0224D7BE: - mov r0, #0x1f - bx lr -_0224D7C2: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov23_0224D750 - - thumb_func_start ov23_0224D7C8 -ov23_0224D7C8: ; 0x0224D7C8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02058DF8 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02058E4C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02058F80 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - bne _0224D7F6 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0224D7F6: - add r0, r6, #0 - add r1, r4, #0 - bl ov23_0224D1A0 - cmp r0, #1 - bne _0224D86E - ldr r0, _0224D874 ; =0x022577AC - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _0224D878 ; =0x00001383 - ldrb r0, [r1, r0] - cmp r0, #0 - bne _0224D86E - add r0, r6, #0 - add r1, r4, #0 - bl ov23_0224B05C - ldr r1, _0224D874 ; =0x022577AC - lsr r3, r6, #0x1f - ldr r2, [r1, #0] - mov r1, #0x96 - add r2, #0xa - mul r1, r0 - add r0, r2, r1 - lsl r2, r6, #0x1b - sub r2, r2, r3 - mov r1, #0x1b - ror r2, r1 - add r1, r3, r2 - lsr r3, r4, #0x1f - lsl r7, r4, #0x1b - sub r7, r7, r3 - mov r2, #0x1b - ror r7, r2 - add r2, r3, r7 - bl ov23_0224D6F8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl ov23_0224D750 - add r2, r0, #0 - beq _0224D86E - ldr r1, _0224D874 ; =0x022577AC - mov r0, #1 - ldr r1, [r1, #0] - add r3, r1, r5 - ldr r1, _0224D878 ; =0x00001383 - strb r0, [r3, r1] - ldr r0, [sp, #8] - str r4, [sp] - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0xff - add r3, r6, #0 - bl ov23_022443CC - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0224D86E: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D874: .word 0x022577AC -_0224D878: .word 0x00001383 - thumb_func_end ov23_0224D7C8 - - thumb_func_start ov23_0224D87C -ov23_0224D87C: ; 0x0224D87C - ldr r1, _0224D890 ; =0x022577AC - ldr r1, [r1, #0] - cmp r1, #0 - beq _0224D88C - add r1, r1, r0 - ldr r0, _0224D894 ; =0x00001383 - mov r2, #0 - strb r2, [r1, r0] -_0224D88C: - mov r0, #0 - bx lr - ; .align 2, 0 -_0224D890: .word 0x022577AC -_0224D894: .word 0x00001383 - thumb_func_end ov23_0224D87C - - thumb_func_start ov23_0224D898 -ov23_0224D898: ; 0x0224D898 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r0, sp, #4 - mov r1, #0 - mov r2, #8 - bl sub_020C4CF4 - mov r4, #0 - add r5, sp, #4 -_0224D8AA: - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0224D926 - add r0, r4, #0 - bl sub_02058DF8 - str r0, [sp] - add r0, r4, #0 - bl sub_02058E4C - add r7, r0, #0 - ldr r1, [sp] - ldr r0, _0224D998 ; =0x0000FFFF - cmp r1, r0 - bne _0224D8D2 - cmp r7, r0 - beq _0224D926 -_0224D8D2: - ldr r0, [sp] - add r1, r7, #0 - bl ov23_0224B05C - add r6, r0, #0 - cmp r4, r6 - beq _0224D926 - cmp r6, #0x10 - beq _0224D926 - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - bne _0224D926 - ldr r0, _0224D99C ; =0x022577AC - ldr r1, _0224D9A0 ; =0x0000136B - ldr r0, [r0, #0] - add r0, r0, r4 - ldrb r1, [r0, r1] - cmp r1, #0xff - bne _0224D926 - ldr r1, _0224D9A4 ; =0x00001373 - ldrb r0, [r0, r1] - cmp r0, #0xff - bne _0224D926 - ldr r0, [sp] - add r1, r7, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _0224D926 - ldrb r0, [r5] - cmp r0, #0 - bne _0224D926 - add r0, r6, #0 - add r1, r4, #0 - mov r2, #1 - bl ov23_0224B844 - mov r0, #1 - strb r0, [r5] -_0224D926: - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #8 - blt _0224D8AA - bl sub_0203608C - ldr r1, _0224D99C ; =0x022577AC - add r4, r0, #0 - ldr r2, [r1, #0] - ldr r1, _0224D9A8 ; =0x000012E4 - ldrb r1, [r2, r1] - cmp r1, #6 - bne _0224D992 - bl sub_02058DF8 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02058E4C - add r5, r0, #0 - ldr r0, _0224D998 ; =0x0000FFFF - cmp r6, r0 - bne _0224D958 - cmp r5, r0 - beq _0224D980 -_0224D958: - add r0, r6, #0 - add r1, r5, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _0224D980 - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224B05C - add r5, sp, #4 - ldrb r1, [r5, r4] - cmp r1, #0 - bne _0224D980 - add r1, r4, #0 - mov r2, #1 - bl ov23_0224B844 - mov r0, #1 - strb r0, [r5, r4] -_0224D980: - add r0, sp, #4 - ldrb r0, [r0, r4] - cmp r0, #0 - beq _0224D992 - ldr r0, _0224D99C ; =0x022577AC - mov r2, #0 - ldr r1, [r0, #0] - ldr r0, _0224D9A8 ; =0x000012E4 - strb r2, [r1, r0] -_0224D992: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224D998: .word 0x0000FFFF -_0224D99C: .word 0x022577AC -_0224D9A0: .word 0x0000136B -_0224D9A4: .word 0x00001373 -_0224D9A8: .word 0x000012E4 - thumb_func_end ov23_0224D898 - - thumb_func_start ov23_0224D9AC -ov23_0224D9AC: ; 0x0224D9AC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _0224DA7C ; =0x022577AC - str r1, [sp, #8] - ldr r0, [r0, #0] - add r1, r0, r5 - ldr r0, _0224DA80 ; =0x00001363 - ldrb r0, [r1, r0] - cmp r0, #0xff - bne _0224D9C8 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224D9C8: - bl sub_0203608C - bl sub_02058CA0 - add r4, r0, #0 - bl sub_0203608C - bl sub_02058CF4 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - bne _0224D9F8 - ldr r0, _0224DA7C ; =0x022577AC - mov r2, #0xff - ldr r0, [r0, #0] - add sp, #0x10 - add r1, r0, r5 - ldr r0, _0224DA80 ; =0x00001363 - strb r2, [r1, r0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224D9F8: - bl ov23_022535EC - bl ov23_0224F24C - bl ov23_0224321C - bl sub_0203608C - mov r1, #0 - bl ov23_02244858 - ldr r0, _0224DA7C ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224DA84 ; =0x000013DC - add r1, r0, #2 - ldrh r6, [r2, r0] - add r0, r0, #4 - ldrh r4, [r2, r1] - ldrb r7, [r2, r0] - cmp r6, #0 - beq _0224DA26 - cmp r4, #0 - bne _0224DA2A -_0224DA26: - bl sub_02022974 -_0224DA2A: - add r0, r7, #0 - bl sub_0206419C - str r0, [sp, #0xc] - add r0, r7, #0 - bl sub_020641A8 - add r2, r0, #0 - ldr r0, _0224DA7C ; =0x022577AC - mov r3, #0 - ldr r1, [r0, #0] - ldr r0, _0224DA88 ; =0x000013E6 - add r2, r4, r2 - strb r3, [r1, r0] - ldr r1, [sp, #0xc] - ldr r0, [sp, #8] - str r5, [sp] - str r0, [sp, #4] - ldr r0, _0224DA7C ; =0x022577AC - add r1, r6, r1 - ldr r0, [r0, #0] - add r3, r7, #0 - ldr r0, [r0, #0] - bl ov23_0224CAF0 - bl ov23_02249AB8 - ldr r1, _0224DA7C ; =0x022577AC - mov r0, #0xa - ldr r2, [r1, #0] - mov r3, #0 - lsl r0, r0, #8 - str r3, [r2, r0] - ldr r0, [r1, #0] - mov r2, #0xff - add r1, r0, r5 - ldr r0, _0224DA80 ; =0x00001363 - strb r2, [r1, r0] - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DA7C: .word 0x022577AC -_0224DA80: .word 0x00001363 -_0224DA84: .word 0x000013DC -_0224DA88: .word 0x000013E6 - thumb_func_end ov23_0224D9AC - - thumb_func_start ov23_0224DA8C -ov23_0224DA8C: ; 0x0224DA8C - push {r3, lr} - ldr r0, _0224DAAC ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224DAB0 ; =0x000012E4 - ldrb r1, [r2, r0] - cmp r1, #1 - bne _0224DAA8 - mov r1, #2 - strb r1, [r2, r0] - bl sub_020578DC - mov r0, #0 - bl ov23_0224B5CC -_0224DAA8: - pop {r3, pc} - nop -_0224DAAC: .word 0x022577AC -_0224DAB0: .word 0x000012E4 - thumb_func_end ov23_0224DA8C - - thumb_func_start ov23_0224DAB4 -ov23_0224DAB4: ; 0x0224DAB4 - ldr r0, _0224DAC8 ; =0x022577AC - ldr r2, [r0, #0] - ldr r0, _0224DACC ; =0x000012E4 - ldrb r1, [r2, r0] - cmp r1, #5 - bne _0224DAC4 - mov r1, #4 - strb r1, [r2, r0] -_0224DAC4: - bx lr - nop -_0224DAC8: .word 0x022577AC -_0224DACC: .word 0x000012E4 - thumb_func_end ov23_0224DAB4 - - thumb_func_start ov23_0224DAD0 -ov23_0224DAD0: ; 0x0224DAD0 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl sub_02058EA0 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02058EC0 - add r4, r0, #0 - ldr r0, _0224DB40 ; =0x022577AC - add r1, r5, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - ldr r0, [r0, #0] - bl sub_02054F68 - cmp r0, #0 - bne _0224DB00 - cmp r6, #0 - beq _0224DB3E - bl sub_02033DFC - cmp r0, #0 - bne _0224DB3E -_0224DB00: - ldr r0, _0224DB44 ; =0x0000FFFF - cmp r5, r0 - bne _0224DB16 - cmp r4, r0 - bne _0224DB16 - add r0, r6, #0 - add r1, r6, #0 - mov r2, #1 - bl ov23_0224B844 - pop {r4, r5, r6, pc} -_0224DB16: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - bne _0224DB34 - ldr r0, _0224DB40 ; =0x022577AC - add r1, r5, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - ldr r0, [r0, #0] - bl sub_02054F68 - cmp r0, #0 - beq _0224DB3E -_0224DB34: - add r0, r6, #0 - add r1, r6, #0 - mov r2, #1 - bl ov23_0224B844 -_0224DB3E: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224DB40: .word 0x022577AC -_0224DB44: .word 0x0000FFFF - thumb_func_end ov23_0224DAD0 - - thumb_func_start ov23_0224DB48 -ov23_0224DB48: ; 0x0224DB48 - ldr r0, _0224DB5C ; =0x022577AC - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224DB56 - ldr r0, _0224DB60 ; =0x000013DC - ldrh r0, [r1, r0] - bx lr -_0224DB56: - mov r0, #0x48 - bx lr - nop -_0224DB5C: .word 0x022577AC -_0224DB60: .word 0x000013DC - thumb_func_end ov23_0224DB48 - - thumb_func_start ov23_0224DB64 -ov23_0224DB64: ; 0x0224DB64 - ldr r0, _0224DB78 ; =0x022577AC - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224DB72 - ldr r0, _0224DB7C ; =0x000013DE - ldrh r0, [r1, r0] - bx lr -_0224DB72: - ldr r0, _0224DB80 ; =0x000001B5 - bx lr - nop -_0224DB78: .word 0x022577AC -_0224DB7C: .word 0x000013DE -_0224DB80: .word 0x000001B5 - thumb_func_end ov23_0224DB64 - - thumb_func_start ov23_0224DB84 -ov23_0224DB84: ; 0x0224DB84 - ldr r0, _0224DB98 ; =0x022577AC - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224DB92 - ldr r0, _0224DB9C ; =0x000013E0 - ldrb r0, [r1, r0] - bx lr -_0224DB92: - mov r0, #1 - bx lr - nop -_0224DB98: .word 0x022577AC -_0224DB9C: .word 0x000013E0 - thumb_func_end ov23_0224DB84 - - thumb_func_start ov23_0224DBA0 -ov23_0224DBA0: ; 0x0224DBA0 - ldr r2, _0224DBB4 ; =0x022577AC - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224DBB0 - lsl r0, r0, #1 - add r2, r2, r0 - ldr r0, _0224DBB8 ; =0x000013AC - strh r1, [r2, r0] -_0224DBB0: - bx lr - nop -_0224DBB4: .word 0x022577AC -_0224DBB8: .word 0x000013AC - thumb_func_end ov23_0224DBA0 - - thumb_func_start ov23_0224DBBC -ov23_0224DBBC: ; 0x0224DBBC - ldr r2, _0224DBD0 ; =0x022577AC - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224DBCC - lsl r0, r0, #1 - add r2, r2, r0 - ldr r0, _0224DBD4 ; =0x000013BC - strh r1, [r2, r0] -_0224DBCC: - bx lr - nop -_0224DBD0: .word 0x022577AC -_0224DBD4: .word 0x000013BC - thumb_func_end ov23_0224DBBC - - thumb_func_start ov23_0224DBD8 -ov23_0224DBD8: ; 0x0224DBD8 - ldr r2, _0224DBEC ; =0x022577AC - ldr r2, [r2, #0] - cmp r2, #0 - beq _0224DBE8 - lsl r0, r0, #1 - add r2, r2, r0 - ldr r0, _0224DBF0 ; =0x000013CC - strh r1, [r2, r0] -_0224DBE8: - bx lr - nop -_0224DBEC: .word 0x022577AC -_0224DBF0: .word 0x000013CC - thumb_func_end ov23_0224DBD8 - - thumb_func_start ov23_0224DBF4 -ov23_0224DBF4: ; 0x0224DBF4 - ldr r1, _0224DC00 ; =0x022577AC - ldr r2, [r1, #0] - ldr r1, _0224DC04 ; =0x000013E5 - strb r0, [r2, r1] - bx lr - nop -_0224DC00: .word 0x022577AC -_0224DC04: .word 0x000013E5 - thumb_func_end ov23_0224DBF4 - - thumb_func_start ov23_0224DC08 -ov23_0224DC08: ; 0x0224DC08 - push {r3, lr} - mov r0, #1 - bl sub_02032174 - mov r0, #1 - bl sub_02032138 - mov r0, #1 - bl sub_02036814 - bl sub_020340FC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224DC08 - - thumb_func_start ov23_0224DC24 -ov23_0224DC24: ; 0x0224DC24 - push {r3, lr} - mov r0, #0 - bl sub_02032174 - mov r0, #0 - bl sub_02032138 - mov r0, #0 - bl sub_02036814 - bl sub_020340FC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224DC24 - - thumb_func_start ov23_0224DC40 -ov23_0224DC40: ; 0x0224DC40 - push {r3, lr} - ldrh r2, [r0, #0x2c] - add r0, sp, #0 - strb r2, [r0] - strb r1, [r0, #1] - mov r0, #0x4a - add r1, sp, #0 - bl sub_020360D0 - pop {r3, pc} - thumb_func_end ov23_0224DC40 - - thumb_func_start ov23_0224DC54 -ov23_0224DC54: ; 0x0224DC54 - push {r3, lr} - ldrh r2, [r0, #0x30] - add r0, sp, #0 - strb r2, [r0] - strb r1, [r0, #1] - mov r0, #0x49 - add r1, sp, #0 - bl sub_020360D0 - pop {r3, pc} - thumb_func_end ov23_0224DC54 - - thumb_func_start ov23_0224DC68 -ov23_0224DC68: ; 0x0224DC68 - push {r4, lr} - add r4, r1, #0 - cmp r4, #0x88 - blt _0224DC80 - ldrh r0, [r0, #0x30] - bl sub_02032EE8 - bl sub_02025F30 - cmp r0, #1 - bne _0224DC80 - add r4, #0x13 -_0224DC80: - bl ov23_0224219C - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F40 - pop {r4, pc} - thumb_func_end ov23_0224DC68 - - thumb_func_start ov23_0224DC90 -ov23_0224DC90: ; 0x0224DC90 - push {r4, lr} - add r4, r1, #0 - cmp r4, #0x88 - blt _0224DCA8 - ldrh r0, [r0, #0x2c] - bl sub_02032EE8 - bl sub_02025F30 - cmp r0, #1 - bne _0224DCA8 - add r4, #0x13 -_0224DCA8: - bl ov23_0224219C - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F40 - pop {r4, pc} - thumb_func_end ov23_0224DC90 - - thumb_func_start ov23_0224DCB8 -ov23_0224DCB8: ; 0x0224DCB8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x21 - mov r1, #0x3c - add r7, r2, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x3c - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _0224DD1C ; =0x022577B0 - mov r1, #1 - str r4, [r0, #4] - str r7, [r4, #8] - str r6, [r4, #0x2c] - add r0, r4, #0 - strh r5, [r4, #0x30] - add r0, #0x37 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0x38 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x29 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x2a - strb r1, [r0] - add r0, r4, #0 - ldrh r1, [r4, #0x30] - add r0, #0x28 - strb r1, [r0] - ldr r0, _0224DD20 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - bl ov23_0224DC68 - ldr r0, _0224DD24 ; =ov23_0224E2D8 - ldr r2, _0224DD28 ; =0x00002710 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DD1C: .word 0x022577B0 -_0224DD20: .word 0x000005DC -_0224DD24: .word ov23_0224E2D8 -_0224DD28: .word 0x00002710 - thumb_func_end ov23_0224DCB8 - - thumb_func_start ov23_0224DD2C -ov23_0224DD2C: ; 0x0224DD2C - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #4 - add r1, r0, #0 - bl sub_02013A04 - str r0, [r5, #0x1c] - mov r3, #1 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224DDD4 ; =0x000001E7 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, #0xc - ldr r0, [r0, #8] - mov r2, #3 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224DDD8 ; =0x000003D9 - add r0, #0xc - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r2, _0224DDDC ; =0x0000027A - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - ldr r4, _0224DDE0 ; =0x022568B4 - add r7, r0, #0 - mov r6, #0 -_0224DD7E: - ldr r0, [r5, #0x1c] - ldr r2, [r4, #0] - ldr r3, [r4, #4] - add r1, r7, #0 - bl sub_02013A4C - add r6, r6, #1 - add r4, #8 - cmp r6, #4 - blo _0224DD7E - add r0, r7, #0 - bl sub_0200B190 - bl ov23_02253D40 - add r1, sp, #0x14 - mov r2, #0x20 - bl sub_020C4DB0 - ldr r0, [r5, #0x1c] - mov r1, #0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xc - str r0, [sp, #0x20] - mov r3, #4 - add r0, sp, #0x14 - strh r3, [r0, #0x10] - strh r3, [r0, #0x12] - strh r1, [r5, #0x3a] - add r0, sp, #0x14 - add r2, r1, #0 - bl sub_0200112C - str r0, [r5, #0x20] - add r5, #0xc - add r0, r5, #0 - bl sub_0201A954 - bl sub_020594FC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DDD4: .word 0x000001E7 -_0224DDD8: .word 0x000003D9 -_0224DDDC: .word 0x0000027A -_0224DDE0: .word 0x022568B4 - thumb_func_end ov23_0224DD2C - - thumb_func_start ov23_0224DDE4 -ov23_0224DDE4: ; 0x0224DDE4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _0224DDFA - mov r1, #4 - bl sub_02002154 - mov r0, #0 - str r0, [r4, #0x24] -_0224DDFA: - ldr r0, [r4, #4] - cmp r0, #0 - beq _0224DE0C - mov r1, #1 - mvn r1, r1 - bl ov23_02251044 - bl ov23_02243204 -_0224DE0C: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E244 - ldr r1, [r4, #0x2c] - cmp r1, #0 - beq _0224DE1E - mov r0, #0 - blx r1 -_0224DE1E: - add r0, r4, #0 - bl sub_020181C4 - bl sub_02059514 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, _0224DE38 ; =0x022577B0 - mov r1, #0 - str r1, [r0, #4] - pop {r3, r4, r5, pc} - nop -_0224DE38: .word 0x022577B0 - thumb_func_end ov23_0224DDE4 - - thumb_func_start ov23_0224DE3C -ov23_0224DE3C: ; 0x0224DE3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - mov r0, #4 - add r1, r0, #0 - bl sub_02013A04 - str r0, [r5, #0x1c] - mov r3, #1 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224DF0C ; =0x000001B7 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, #0xc - ldr r0, [r0, #8] - mov r2, #3 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224DF10 ; =0x000003D9 - add r0, #0xc - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r2, _0224DF14 ; =0x00000279 - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r6, r0, #0 - mov r4, #0 - add r7, sp, #0x14 -_0224DE8E: - bl sub_0201D35C - mov r1, #0xc - bl sub_020E2178 - add r2, r1, #0 - mov r1, #0 - cmp r4, #0 - ble _0224DEB0 - add r3, r7, #0 -_0224DEA2: - ldrb r0, [r3] - cmp r0, r2 - beq _0224DEB0 - add r1, r1, #1 - add r3, r3, #1 - cmp r1, r4 - blt _0224DEA2 -_0224DEB0: - cmp r1, r4 - bne _0224DEC2 - strb r2, [r7, r4] - ldr r0, [r5, #0x1c] - add r1, r6, #0 - add r3, r2, #0 - bl sub_02013A4C - b _0224DEC4 -_0224DEC2: - sub r4, r4, #1 -_0224DEC4: - add r4, r4, #1 - cmp r4, #4 - blt _0224DE8E - add r0, r6, #0 - bl sub_0200B190 - ldr r4, _0224DF18 ; =0x02256894 - add r3, sp, #0x18 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0x1c] - mov r1, #0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r0, #0xc - str r0, [sp, #0x24] - add r0, r2, #0 - strh r1, [r5, #0x3a] - add r2, r1, #0 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x20] - add r5, #0xc - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DF0C: .word 0x000001B7 -_0224DF10: .word 0x000003D9 -_0224DF14: .word 0x00000279 -_0224DF18: .word 0x02256894 - thumb_func_end ov23_0224DE3C - - thumb_func_start ov23_0224DF1C -ov23_0224DF1C: ; 0x0224DF1C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x20] - bl sub_02001288 - add r4, r0, #0 - add r0, r5, #0 - bl ov23_0224F270 - bl sub_020360F0 - cmp r0, #0 - beq _0224DF50 - add r0, r5, #0 - mov r1, #3 - add r0, #0x37 - strb r1, [r0] - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224E244 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0224DF50: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224DF5E - add r0, r0, #1 - cmp r4, r0 - bne _0224DF64 -_0224DF5E: - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_0224DF64: - ldr r0, _0224DF9C ; =0x000005DC - bl sub_02005748 - add r0, sp, #0 - strb r4, [r0] - ldrh r1, [r5, #0x30] - strb r1, [r0, #1] - mov r1, #0 - strb r1, [r0, #2] - mov r0, #0x4f - add r1, sp, #0 - bl sub_020360D0 - add r0, r5, #0 - add r0, #0x32 - strb r4, [r0] - add r0, r5, #0 - mov r1, #0x1e - add r0, #0x37 - strb r1, [r0] - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224E244 - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0224DF9C: .word 0x000005DC - thumb_func_end ov23_0224DF1C - - thumb_func_start ov23_0224DFA0 -ov23_0224DFA0: ; 0x0224DFA0 - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #4 - add r1, r0, #0 - bl sub_02013A04 - str r0, [r5, #0x1c] - mov r3, #1 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224E050 ; =0x000001B7 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, #0xc - ldr r0, [r0, #8] - mov r2, #3 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224E054 ; =0x000003D9 - add r0, #0xc - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r2, #0x9e - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #4 - bl sub_0200B144 - add r6, r0, #0 - mov r4, #0 -_0224DFF2: - add r2, r5, #0 - add r2, #0x32 - ldrb r2, [r2] - ldr r0, [r5, #0x1c] - add r1, r6, #0 - lsl r2, r2, #2 - add r2, r4, r2 - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, #4 - blt _0224DFF2 - add r0, r6, #0 - bl sub_0200B190 - ldr r4, _0224E058 ; =0x02256894 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0x1c] - mov r1, #0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0xc - str r0, [sp, #0x20] - add r0, r2, #0 - strh r1, [r5, #0x3a] - add r2, r1, #0 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x20] - add r5, #0xc - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - nop -_0224E050: .word 0x000001B7 -_0224E054: .word 0x000003D9 -_0224E058: .word 0x02256894 - thumb_func_end ov23_0224DFA0 - - thumb_func_start ov23_0224E05C -ov23_0224E05C: ; 0x0224E05C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x20] - bl sub_02001288 - add r4, r0, #0 - add r0, r5, #0 - bl ov23_0224F270 - bl sub_020360F0 - cmp r0, #0 - beq _0224E08E - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224E244 - mov r0, #3 - add r5, #0x37 - strb r0, [r5] - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0224E08E: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224E09C - add r0, r0, #1 - cmp r4, r0 - bne _0224E0A2 -_0224E09C: - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_0224E0A2: - ldr r0, _0224E120 ; =0x000005DC - bl sub_02005748 - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224E244 - add r0, r5, #0 - add r0, #0x32 - ldrb r0, [r0] - lsl r0, r0, #2 - add r1, r4, r0 - add r0, sp, #0 - strb r1, [r0] - ldrh r1, [r5, #0x30] - strb r1, [r0, #1] - mov r1, #2 - strb r1, [r0, #2] - mov r0, #0x4f - add r1, sp, #0 - bl sub_020360D0 - bl ov23_0224219C - add r1, sp, #0 - ldrb r1, [r1] - bl ov23_022540C8 - bl ov23_0224219C - add r2, r5, #0 - add r2, #0x33 - ldrb r2, [r2] - mov r1, #6 - bl ov23_022540E0 - add r0, r5, #0 - add r0, #0x33 - ldrb r1, [r0] - add r0, sp, #0 - ldrb r0, [r0] - cmp r1, r0 - bne _0224E102 - add r0, r5, #0 - mov r1, #0x8d - bl ov23_0224DC68 - b _0224E10A -_0224E102: - add r0, r5, #0 - mov r1, #0x8c - bl ov23_0224DC68 -_0224E10A: - add r0, r5, #0 - mov r1, #0x24 - add r0, #0x37 - strb r1, [r0] - add r0, r5, #0 - mov r1, #0x1b - bl ov23_0224DC54 - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224E120: .word 0x000005DC - thumb_func_end ov23_0224E05C - - thumb_func_start ov23_0224E124 -ov23_0224E124: ; 0x0224E124 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov23_0224219C - add r5, r0, #0 - ldrh r0, [r4, #0x30] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r5, #0 - bl ov23_02254068 - bl ov23_0224219C - add r1, r4, #0 - add r1, #0x2a - ldrb r1, [r1] - bl ov23_022540F4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0xe - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, [r4, #8] - bl sub_0203D174 - bl sub_020298A0 - bl sub_0202952C - add r4, #0x2a - ldrb r0, [r4] - bl ov23_0224F634 - ldr r0, _0224E178 ; =0x000005E3 - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_0224E178: .word 0x000005E3 - thumb_func_end ov23_0224E124 - - thumb_func_start ov23_0224E17C -ov23_0224E17C: ; 0x0224E17C - push {r4, lr} - add r4, r1, #0 - bl ov23_0224219C - add r1, r4, #0 - bl ov23_022540F4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0xc - add r3, r2, #0 - bl ov23_02253F40 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224E17C - - thumb_func_start ov23_0224E19C -ov23_0224E19C: ; 0x0224E19C - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x24] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224E1DE - cmp r0, #0 - bne _0224E1CA - ldrh r1, [r4, #0x30] - add r0, r4, #0 - add r0, #0x28 - strb r1, [r0] - add r1, r4, #0 - mov r0, #0x4d - add r1, #0x28 - bl sub_020360D0 - mov r1, #0x15 - b _0224E1D4 -_0224E1CA: - add r0, r4, #0 - mov r1, #0xb - bl ov23_0224DC68 - mov r1, #0xf -_0224E1D4: - add r0, r4, #0 - add r0, #0x37 - strb r1, [r0] - mov r0, #0 - str r0, [r4, #0x24] -_0224E1DE: - pop {r4, pc} - thumb_func_end ov23_0224E19C - - thumb_func_start ov23_0224E1E0 -ov23_0224E1E0: ; 0x0224E1E0 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x20] - bl sub_02001288 - add r4, r0, #0 - add r0, r5, #0 - bl ov23_0224F270 - bl sub_020360F0 - cmp r0, #0 - beq _0224E200 - mov r4, #1 - mvn r4, r4 -_0224E200: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224E212 - add r0, r0, #1 - cmp r4, r0 - bne _0224E228 - mov r0, #0 - pop {r4, r5, r6, pc} -_0224E212: - ldr r0, _0224E240 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov23_0224E8E0 - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224E244 - b _0224E23A -_0224E228: - ldr r0, _0224E240 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - blx r4 - add r0, r6, #0 - add r1, r5, #0 - bl ov23_0224E244 -_0224E23A: - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_0224E240: .word 0x000005DC - thumb_func_end ov23_0224E1E0 - - thumb_func_start ov23_0224E244 -ov23_0224E244: ; 0x0224E244 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0224E27C - add r0, r4, #0 - add r0, #0xc - mov r1, #1 - bl sub_0200DC9C - mov r1, #0 - ldr r0, [r4, #0x20] - add r2, r1, #0 - bl sub_02001384 - add r0, r4, #0 - add r0, #0xc - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #0xc - bl sub_0201A8FC - ldr r0, [r4, #0x1c] - bl sub_02013A3C - mov r0, #0 - str r0, [r4, #0x1c] -_0224E27C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224E244 - - thumb_func_start ov23_0224E280 -ov23_0224E280: ; 0x0224E280 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl ov23_0224DC54 - add r0, r4, #0 - mov r1, #7 - bl ov23_0224DC68 - mov r0, #5 - add r4, #0x37 - strb r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224E280 - - thumb_func_start ov23_0224E29C -ov23_0224E29C: ; 0x0224E29C - push {r4, lr} - mov r1, #0x16 - add r4, r0, #0 - bl ov23_0224DC54 - mov r0, #0x1b - add r4, #0x37 - strb r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224E29C - - thumb_func_start ov23_0224E2B0 -ov23_0224E2B0: ; 0x0224E2B0 - mov r1, #0x10 - add r0, #0x37 - strb r1, [r0] - bx lr - thumb_func_end ov23_0224E2B0 - - thumb_func_start ov23_0224E2B8 -ov23_0224E2B8: ; 0x0224E2B8 - ldr r1, _0224E2CC ; =0x022577B0 - ldr r2, [r1, #4] - add r2, #0x2a - strb r0, [r2] - ldr r0, [r1, #4] - mov r2, #0x12 - add r0, #0x37 - strb r2, [r0] - bx lr - nop -_0224E2CC: .word 0x022577B0 - thumb_func_end ov23_0224E2B8 - - thumb_func_start ov23_0224E2D0 -ov23_0224E2D0: ; 0x0224E2D0 - mov r1, #0xb - add r0, #0x37 - strb r1, [r0] - bx lr - thumb_func_end ov23_0224E2D0 - - thumb_func_start ov23_0224E2D8 -ov23_0224E2D8: ; 0x0224E2D8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - cmp r0, #0x11 - beq _0224E304 - ldrh r0, [r4, #0x30] - bl sub_02035D78 - cmp r0, #0 - bne _0224E304 - mov r0, #0 - str r0, [r4, #4] - bl ov23_022535EC - add r0, r4, #0 - mov r1, #4 - add r0, #0x37 - strb r1, [r0] -_0224E304: - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - cmp r0, #0x29 - bhi _0224E3B8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224E31A: ; jump table - .short _0224E87A - _0224E31A - 2 ; case 0 - .short _0224E36E - _0224E31A - 2 ; case 1 - .short _0224E390 - _0224E31A - 2 ; case 2 - .short _0224E39A - _0224E31A - 2 ; case 3 - .short _0224E39A - _0224E31A - 2 ; case 4 - .short _0224E3AC - _0224E31A - 2 ; case 5 - .short _0224E3F8 - _0224E31A - 2 ; case 6 - .short _0224E40A - _0224E31A - 2 ; case 7 - .short _0224E3E6 - _0224E31A - 2 ; case 8 - .short _0224E42A - _0224E31A - 2 ; case 9 - .short _0224E87A - _0224E31A - 2 ; case 10 - .short _0224E45C - _0224E31A - 2 ; case 11 - .short _0224E480 - _0224E31A - 2 ; case 12 - .short _0224E49E - _0224E31A - 2 ; case 13 - .short _0224E4B2 - _0224E31A - 2 ; case 14 - .short _0224E4C4 - _0224E31A - 2 ; case 15 - .short _0224E4E6 - _0224E31A - 2 ; case 16 - .short _0224E87A - _0224E31A - 2 ; case 17 - .short _0224E4FA - _0224E31A - 2 ; case 18 - .short _0224E590 - _0224E31A - 2 ; case 19 - .short _0224E5CC - _0224E31A - 2 ; case 20 - .short _0224E5D6 - _0224E31A - 2 ; case 21 - .short _0224E640 - _0224E31A - 2 ; case 22 - .short _0224E61C - _0224E31A - 2 ; case 23 - .short _0224E62E - _0224E31A - 2 ; case 24 - .short _0224E67A - _0224E31A - 2 ; case 25 - .short _0224E684 - _0224E31A - 2 ; case 26 - .short _0224E6A4 - _0224E31A - 2 ; case 27 - .short _0224E6B6 - _0224E31A - 2 ; case 28 - .short _0224E6D2 - _0224E31A - 2 ; case 29 - .short _0224E6DC - _0224E31A - 2 ; case 30 - .short _0224E6FC - _0224E31A - 2 ; case 31 - .short _0224E738 - _0224E31A - 2 ; case 32 - .short _0224E778 - _0224E31A - 2 ; case 33 - .short _0224E7A0 - _0224E31A - 2 ; case 34 - .short _0224E7BC - _0224E31A - 2 ; case 35 - .short _0224E7C6 - _0224E31A - 2 ; case 36 - .short _0224E7F2 - _0224E31A - 2 ; case 37 - .short _0224E812 - _0224E31A - 2 ; case 38 - .short _0224E82E - _0224E31A - 2 ; case 39 - .short _0224E84A - _0224E31A - 2 ; case 40 - .short _0224E868 - _0224E31A - 2 ; case 41 -_0224E36E: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E3B8 - add r0, r4, #0 - bl ov23_0224DD2C - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E390: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E1E0 - b _0224E87A -_0224E39A: - bl ov23_0224219C - bl ov23_02254044 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224DDE4 - b _0224E87A -_0224E3AC: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - beq _0224E3BA -_0224E3B8: - b _0224E87A -_0224E3BA: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #9 - bne _0224E3D2 - add r0, r4, #0 - mov r1, #9 - add r0, #0x37 - strb r1, [r0] - ldrh r0, [r4, #0x30] - bl ov23_022538FC -_0224E3D2: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #6 - bne _0224E4DA - add r0, r4, #0 - mov r1, #6 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E3E6: - add r0, r4, #0 - mov r1, #0xf - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #7 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E3F8: - add r0, r4, #0 - mov r1, #8 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #7 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E40A: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E4DA - ldr r0, _0224E720 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224E4DA - add r0, r4, #0 - mov r1, #4 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E42A: - bl ov23_022539D8 - cmp r0, #0 - beq _0224E4DA - bl ov23_0224219C - bl ov23_02254044 - ldrh r0, [r4, #0x30] - bl sub_02032EE8 - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #8] - ldr r2, _0224E724 ; =ov23_0224E2D0 - ldr r0, [r0, #8] - add r3, r4, #0 - bl ov23_02253834 - add r0, r4, #0 - mov r1, #0xa - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E45C: - ldr r0, [r4, #8] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x20 - bl sub_0202CFEC - bl ov23_022539E8 - add r0, r4, #0 - mov r1, #9 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0xc - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E480: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E4DA - add r0, r4, #0 - mov r1, #0xe - bl ov23_0224DC54 - add r0, r4, #0 - mov r1, #0xd - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E49E: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0xd - bne _0224E4DA - add r0, r4, #0 - mov r1, #0xe - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E4B2: - add r0, r4, #0 - mov r1, #0xa - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #1 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E4C4: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E4DA - ldr r0, _0224E720 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _0224E4DC -_0224E4DA: - b _0224E87A -_0224E4DC: - add r0, r4, #0 - mov r1, #0xe - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E4E6: - ldr r0, _0224E728 ; =ov23_0224E2B8 - ldr r1, [r4, #8] - bl ov23_022511B0 - str r0, [r4, #4] - add r0, r4, #0 - mov r1, #0x11 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E4FA: - mov r0, #0 - str r0, [r4, #4] - ldr r0, _0224E72C ; =0x022577B0 - ldr r0, [r0, #4] - add r0, #0x2a - ldrb r0, [r0] - cmp r0, #0 - bne _0224E51C - add r0, r4, #0 - mov r1, #0xb - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E51C: - ldrh r0, [r4, #0x30] - bl sub_02032FC0 - cmp r0, #0 - beq _0224E538 - add r0, r4, #0 - mov r1, #0x57 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E538: - ldr r0, [r4, #8] - ldr r0, [r0, #0xc] - bl sub_02028810 - cmp r0, #0 - bne _0224E556 - add r0, r4, #0 - mov r1, #0x57 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E556: - ldr r0, _0224E72C ; =0x022577B0 - ldr r0, [r0, #4] - add r0, #0x2a - ldrb r0, [r0] - bl sub_0205748C - cmp r0, #0 - beq _0224E578 - add r0, r4, #0 - mov r1, #0x56 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E578: - ldr r1, _0224E72C ; =0x022577B0 - add r0, r4, #0 - ldr r1, [r1, #4] - add r1, #0x2a - ldrb r1, [r1] - bl ov23_0224E17C - add r0, r4, #0 - mov r1, #0x13 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E590: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E610 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #8] - ldr r1, _0224E730 ; =0x0225688C - ldr r0, [r0, #8] - ldr r2, _0224E734 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x24] - add r0, r4, #0 - mov r1, #0x14 - add r0, #0x37 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #8 - beq _0224E610 - add r0, r4, #0 - mov r1, #1 - add r0, #0x38 - strb r1, [r0] - b _0224E87A -_0224E5CC: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E19C - b _0224E87A -_0224E5D6: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E610 - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x16 - bne _0224E5F4 - add r0, r4, #0 - mov r1, #0x16 - add r0, #0x37 - strb r1, [r0] -_0224E5F4: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x18 - bne _0224E606 - add r0, r4, #0 - mov r1, #0x18 - add r0, #0x37 - strb r1, [r0] -_0224E606: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x17 - beq _0224E612 -_0224E610: - b _0224E87A -_0224E612: - add r0, r4, #0 - mov r1, #0x17 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E61C: - add r0, r4, #0 - mov r1, #0x1e - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x1a - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E62E: - add r0, r4, #0 - mov r1, #0xd - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x1a - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E640: - add r0, r4, #0 - bl ov23_0224E124 - ldr r0, [r4, #8] - ldr r0, [r0, #0xc] - bl sub_020507E4 - add r6, r0, #0 - bl sub_0206B3EC - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - bl sub_0206B3FC - ldr r0, [r4, #8] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x1f - bl sub_0202CFEC - add r0, r4, #0 - mov r1, #0x19 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E67A: - add r0, r4, #0 - mov r1, #0x1a - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E684: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E712 - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0xf - bne _0224E712 - add r0, r4, #0 - mov r1, #0xe - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E6A4: - add r0, r4, #0 - mov r1, #0x88 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x1c - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E6B6: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E712 - add r0, r4, #0 - bl ov23_0224DE3C - add r0, r4, #0 - mov r1, #0x1d - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E6D2: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224DF1C - b _0224E87A -_0224E6DC: - bl ov23_0224219C - add r1, r4, #0 - add r1, #0x32 - ldrb r1, [r1] - bl ov23_022540B0 - add r0, r4, #0 - mov r1, #0x89 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x1f - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E6FC: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E712 - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x20 - beq _0224E714 -_0224E712: - b _0224E87A -_0224E714: - add r0, r4, #0 - mov r1, #0x20 - add r0, #0x37 - strb r1, [r0] - b _0224E87A - nop -_0224E720: .word 0x021BF67C -_0224E724: .word ov23_0224E2D0 -_0224E728: .word ov23_0224E2B8 -_0224E72C: .word 0x022577B0 -_0224E730: .word 0x0225688C -_0224E734: .word 0x000003D9 -_0224E738: - add r0, r4, #0 - add r0, #0x33 - ldrb r6, [r0] - cmp r6, #0x33 - bne _0224E75C - add r0, r4, #0 - mov r1, #0x8b - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0 - add r0, #0x38 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0x21 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E75C: - bl ov23_0224219C - add r1, r6, #0 - bl ov23_022540C8 - add r0, r4, #0 - mov r1, #0x8a - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x22 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E778: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E87A - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x2a - bne _0224E87A - add r0, r4, #0 - mov r1, #0 - add r0, #0x38 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0xe - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E7A0: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E87A - add r0, r4, #0 - bl ov23_0224DFA0 - add r0, r4, #0 - mov r1, #0x23 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E7BC: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E05C - b _0224E87A -_0224E7C6: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E87A - ldr r0, [r4, #8] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x21 - bl sub_0202CFEC - add r0, r4, #0 - mov r1, #0x8e - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x25 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E7F2: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E87A - ldr r0, _0224E8DC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224E87A - add r0, r4, #0 - mov r1, #0x26 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E812: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x25 - bne _0224E87A - add r0, r4, #0 - mov r1, #0x64 - bl ov23_0224DC54 - add r0, r4, #0 - mov r1, #0x27 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E82E: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x64 - bne _0224E87A - add r0, r4, #0 - mov r1, #0x96 - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #0x28 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E84A: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224E87A - add r0, r4, #0 - mov r1, #0x65 - bl ov23_0224DC54 - add r0, r4, #0 - mov r1, #0x29 - add r0, #0x37 - strb r1, [r0] - b _0224E87A -_0224E868: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0x65 - bne _0224E87A - add r0, r4, #0 - mov r1, #0xe - add r0, #0x37 - strb r1, [r0] -_0224E87A: - add r0, r4, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #8 - bne _0224E8D6 - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - cmp r0, #4 - beq _0224E8D6 - cmp r0, #7 - beq _0224E8D6 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _0224E8A2 - mov r1, #4 - bl sub_02002154 - mov r0, #0 - str r0, [r4, #0x24] -_0224E8A2: - ldr r0, [r4, #4] - cmp r0, #0 - beq _0224E8C0 - mov r1, #1 - mvn r1, r1 - bl ov23_02251044 - bl ov23_02243204 - bl ov23_022421DC - bl ov23_02254044 - mov r0, #0 - str r0, [r4, #4] -_0224E8C0: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E244 - add r0, r4, #0 - mov r1, #8 - add r0, #0x37 - strb r1, [r0] - mov r0, #0 - add r4, #0x38 - strb r0, [r4] -_0224E8D6: - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0224E8DC: .word 0x021BF67C - thumb_func_end ov23_0224E2D8 - - thumb_func_start ov23_0224E8E0 -ov23_0224E8E0: ; 0x0224E8E0 - push {r4, lr} - add r4, r0, #0 - mov r1, #0xf - bl ov23_0224DC68 - add r0, r4, #0 - mov r1, #8 - bl ov23_0224DC54 - mov r0, #7 - add r4, #0x37 - strb r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224E8E0 - - thumb_func_start ov23_0224E8FC -ov23_0224E8FC: ; 0x0224E8FC - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x20] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224E93A - cmp r0, #0 - bne _0224E926 - add r0, r4, #0 - mov r1, #9 - bl ov23_0224DC40 - ldrh r0, [r4, #0x2c] - bl ov23_022538FC - mov r1, #0xa - b _0224E930 -_0224E926: - add r0, r4, #0 - mov r1, #6 - bl ov23_0224DC40 - mov r1, #8 -_0224E930: - add r0, r4, #0 - add r0, #0x34 - strb r1, [r0] - mov r0, #0 - str r0, [r4, #0x20] -_0224E93A: - pop {r4, pc} - thumb_func_end ov23_0224E8FC - - thumb_func_start ov23_0224E93C -ov23_0224E93C: ; 0x0224E93C - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x20] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224E9BE - cmp r0, #0 - bne _0224E9A2 - add r0, r4, #0 - add r0, #0x26 - ldrb r0, [r0] - bl ov23_0224F744 - cmp r0, #0 - beq _0224E988 - ldr r0, [r4, #4] - bl sub_0203D174 - bl sub_020298A0 - bl sub_0202977C - ldr r0, _0224E9C0 ; =0x000005E3 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x16 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0x13 - add r0, #0x34 - strb r1, [r0] - b _0224E9BA -_0224E988: - add r0, r4, #0 - mov r1, #0x17 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0x15 - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #0x15 - add r0, #0x34 - strb r1, [r0] - b _0224E9BA -_0224E9A2: - add r0, r4, #0 - mov r1, #0x18 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0x1d - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #0x15 - add r0, #0x34 - strb r1, [r0] -_0224E9BA: - mov r0, #0 - str r0, [r4, #0x20] -_0224E9BE: - pop {r4, pc} - ; .align 2, 0 -_0224E9C0: .word 0x000005E3 - thumb_func_end ov23_0224E93C - - thumb_func_start ov23_0224E9C4 -ov23_0224E9C4: ; 0x0224E9C4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224E9DA - mov r1, #4 - bl sub_02002154 - mov r0, #0 - str r0, [r4, #0x20] -_0224E9DA: - ldr r1, [r4, #0x28] - cmp r1, #0 - beq _0224E9E4 - mov r0, #0 - blx r1 -_0224E9E4: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224EA08 - add r0, r4, #0 - bl sub_020181C4 - bl sub_02059514 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, _0224EA04 ; =0x022577B0 - mov r1, #0 - str r1, [r0, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224EA04: .word 0x022577B0 - thumb_func_end ov23_0224E9C4 - - thumb_func_start ov23_0224EA08 -ov23_0224EA08: ; 0x0224EA08 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _0224EA40 - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl sub_0200DC9C - mov r1, #0 - ldr r0, [r4, #0x1c] - add r2, r1, #0 - bl sub_02001384 - add r0, r4, #0 - add r0, #8 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #8 - bl sub_0201A8FC - ldr r0, [r4, #0x18] - bl sub_02013A3C - mov r0, #0 - str r0, [r4, #0x18] -_0224EA40: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224EA08 - - thumb_func_start ov23_0224EA44 -ov23_0224EA44: ; 0x0224EA44 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - bl ov23_0224219C - add r6, r0, #0 - add r0, r5, #0 - bl sub_02032EE8 - add r1, r0, #0 - add r0, r6, #0 - bl ov23_02254068 - bl ov23_0224219C - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F40 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_0224EA44 - - thumb_func_start ov23_0224EA70 -ov23_0224EA70: ; 0x0224EA70 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov23_0224219C - add r4, r0, #0 - ldrh r0, [r5, #0x2c] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02254068 - bl ov23_0224219C - add r5, #0x26 - ldrb r1, [r5] - bl ov23_022540F4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x1f - add r3, r2, #0 - bl ov23_02253F40 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224EA70 - - thumb_func_start ov23_0224EAA4 -ov23_0224EAA4: ; 0x0224EAA4 - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #5 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x18] - mov r3, #1 - add r1, r5, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224EB68 ; =0x00000197 - add r1, #8 - str r0, [sp, #0x10] - ldr r0, [r5, #4] - mov r2, #3 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224EB6C ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r2, #0x9e - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #4 - bl sub_0200B144 - add r6, r0, #0 - mov r4, #0 -_0224EAF6: - add r2, r5, #0 - add r2, #0x2e - ldrb r2, [r2] - ldr r0, [r5, #0x18] - add r1, r6, #0 - lsl r2, r2, #2 - add r2, r4, r2 - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, #4 - blt _0224EAF6 - ldr r0, [r5, #0x18] - add r1, r6, #0 - mov r2, #0x30 - mov r3, #0x33 - bl sub_02013A4C - add r0, r6, #0 - bl sub_0200B190 - ldr r4, _0224EB70 ; =0x02256894 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0x18] - mov r1, #5 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #8 - str r0, [sp, #0x20] - add r0, sp, #0x14 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - mov r1, #0 - add r0, r2, #0 - strh r1, [r5, #0x36] - add r2, r1, #0 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x1c] - add r5, #8 - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - nop -_0224EB68: .word 0x00000197 -_0224EB6C: .word 0x000003D9 -_0224EB70: .word 0x02256894 - thumb_func_end ov23_0224EAA4 - - thumb_func_start ov23_0224EB74 -ov23_0224EB74: ; 0x0224EB74 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0x1c] - bl sub_02001288 - add r4, r0, #0 - add r1, r5, #0 - ldr r0, [r5, #0x1c] - add r1, #0x36 - ldrh r6, [r5, #0x36] - bl sub_020014D0 - ldrh r0, [r5, #0x36] - cmp r6, r0 - beq _0224EB9A - ldr r0, _0224EC44 ; =0x000005DC - bl sub_02005748 -_0224EB9A: - bl sub_020360F0 - cmp r0, #0 - beq _0224EBA6 - mov r4, #1 - mvn r4, r4 -_0224EBA6: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224EBB8 - add r0, r0, #1 - cmp r4, r0 - bne _0224EBBA - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224EBB8: - mov r4, #0x33 -_0224EBBA: - ldr r0, _0224EC44 ; =0x000005DC - bl sub_02005748 - add r0, r7, #0 - add r1, r5, #0 - bl ov23_0224EA08 - cmp r4, #0x33 - beq _0224EBFC - add r0, r5, #0 - add r0, #0x2e - ldrb r0, [r0] - lsl r0, r0, #2 - add r1, r4, r0 - add r0, r5, #0 - add r0, #0x2f - strb r1, [r0] - add r0, r5, #0 - mov r1, #0x1a - add r0, #0x34 - strb r1, [r0] - bl ov23_0224219C - add r1, r5, #0 - add r1, #0x2f - ldrb r1, [r1] - bl ov23_022540C8 - add r0, r5, #0 - mov r1, #0x92 - bl ov23_0224DC90 - b _0224EC1C -_0224EBFC: - add r0, r5, #0 - mov r1, #0x33 - add r0, #0x2f - strb r1, [r0] - add r0, r5, #0 - mov r1, #0x10 - add r0, #0x34 - strb r1, [r0] - add r0, r5, #0 - mov r1, #0 - add r0, #0x35 - strb r1, [r0] - add r0, r5, #0 - mov r1, #0x91 - bl ov23_0224DC90 -_0224EC1C: - add r0, r5, #0 - add r0, #0x2f - ldrb r1, [r0] - add r0, sp, #0 - strb r1, [r0] - ldrh r1, [r5, #0x2c] - strb r1, [r0, #1] - mov r1, #1 - strb r1, [r0, #2] - mov r0, #0x4f - add r1, sp, #0 - bl sub_020360D0 - add r0, r5, #0 - mov r1, #0x20 - bl ov23_0224DC40 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224EC44: .word 0x000005DC - thumb_func_end ov23_0224EB74 - - thumb_func_start ov23_0224EC48 -ov23_0224EC48: ; 0x0224EC48 - mov r1, #0xc - add r0, #0x34 - strb r1, [r0] - bx lr - thumb_func_end ov23_0224EC48 - - thumb_func_start ov23_0224EC50 -ov23_0224EC50: ; 0x0224EC50 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #0x2c] - bl sub_02035D78 - cmp r0, #0 - bne _0224EC6E - bl ov23_022535EC - add r0, r4, #0 - mov r1, #4 - add r0, #0x34 - strb r1, [r0] -_0224EC6E: - add r0, r4, #0 - add r0, #0x34 - ldrb r0, [r0] - cmp r0, #0x20 - bls _0224EC7A - b _0224F038 -_0224EC7A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224EC86: ; jump table - .short _0224F038 - _0224EC86 - 2 ; case 0 - .short _0224F038 - _0224EC86 - 2 ; case 1 - .short _0224ECDA - _0224EC86 - 2 ; case 2 - .short _0224F038 - _0224EC86 - 2 ; case 3 - .short _0224ECC8 - _0224EC86 - 2 ; case 4 - .short _0224ED20 - _0224EC86 - 2 ; case 5 - .short _0224ED32 - _0224EC86 - 2 ; case 6 - .short _0224ED5C - _0224EC86 - 2 ; case 7 - .short _0224ED66 - _0224EC86 - 2 ; case 8 - .short _0224ED78 - _0224EC86 - 2 ; case 9 - .short _0224ED98 - _0224EC86 - 2 ; case 10 - .short _0224F038 - _0224EC86 - 2 ; case 11 - .short _0224EDCA - _0224EC86 - 2 ; case 12 - .short _0224EDE2 - _0224EC86 - 2 ; case 13 - .short _0224EE00 - _0224EC86 - 2 ; case 14 - .short _0224EE16 - _0224EC86 - 2 ; case 15 - .short _0224EE28 - _0224EC86 - 2 ; case 16 - .short _0224EE46 - _0224EC86 - 2 ; case 17 - .short _0224EE70 - _0224EC86 - 2 ; case 18 - .short _0224EE7A - _0224EC86 - 2 ; case 19 - .short _0224EE8A - _0224EC86 - 2 ; case 20 - .short _0224EE94 - _0224EC86 - 2 ; case 21 - .short _0224EEBC - _0224EC86 - 2 ; case 22 - .short _0224EED4 - _0224EC86 - 2 ; case 23 - .short _0224EF06 - _0224EC86 - 2 ; case 24 - .short _0224EF24 - _0224EC86 - 2 ; case 25 - .short _0224EF2E - _0224EC86 - 2 ; case 26 - .short _0224EF56 - _0224EC86 - 2 ; case 27 - .short _0224EFA0 - _0224EC86 - 2 ; case 28 - .short _0224EFBE - _0224EC86 - 2 ; case 29 - .short _0224EFE4 - _0224EC86 - 2 ; case 30 - .short _0224F008 - _0224EC86 - 2 ; case 31 - .short _0224F01E - _0224EC86 - 2 ; case 32 -_0224ECC8: - bl ov23_0224219C - bl ov23_02254044 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E9C4 - b _0224F038 -_0224ECDA: - add r0, r4, #0 - mov r1, #0xc - add r0, #0x2e - strb r1, [r0] - ldr r0, _0224EFD4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _0224ECFE - add r0, r4, #0 - mov r1, #8 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #8 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224ECFE: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #5 - bne _0224ED12 - add r0, r4, #0 - mov r1, #5 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224ED12: - cmp r0, #0x16 - bne _0224EE0A - add r0, r4, #0 - mov r1, #0x16 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224ED20: - add r0, r4, #0 - mov r1, #0x18 - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #6 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224ED32: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EE0A - add r0, r4, #0 - mov r1, #7 - add r0, #0x34 - strb r1, [r0] - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #4] - ldr r1, _0224EFD8 ; =0x0225688C - ldr r0, [r0, #8] - ldr r2, _0224EFDC ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x20] - b _0224F038 -_0224ED5C: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E8FC - b _0224F038 -_0224ED66: - add r0, r4, #0 - mov r1, #0xf - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #9 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224ED78: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EE0A - ldr r0, _0224EFD4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224EE0A - add r0, r4, #0 - mov r1, #4 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224ED98: - bl ov23_022539D8 - cmp r0, #0 - beq _0224EE0A - bl ov23_0224219C - bl ov23_02254044 - ldrh r0, [r4, #0x2c] - bl sub_02032EE8 - add r1, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r2, _0224EFE0 ; =ov23_0224EC48 - ldr r0, [r0, #8] - add r3, r4, #0 - bl ov23_02253834 - add r0, r4, #0 - mov r1, #0xb - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EDCA: - bl ov23_022539E8 - ldrh r1, [r4, #0x2c] - add r0, r4, #0 - mov r2, #0x1a - bl ov23_0224EA44 - add r0, r4, #0 - mov r1, #0xd - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EDE2: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EE0A - add r0, r4, #0 - mov r1, #0xd - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0xe - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EE00: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #0xe - beq _0224EE0C -_0224EE0A: - b _0224F038 -_0224EE0C: - add r0, r4, #0 - mov r1, #0xf - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EE16: - add r0, r4, #0 - mov r1, #0x1b - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #2 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EE28: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EF12 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x34 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0x2a - bl ov23_0224DC40 - b _0224F038 -_0224EE46: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EF12 - add r0, r4, #0 - mov r1, #0x12 - add r0, #0x34 - strb r1, [r0] - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #4] - ldr r1, _0224EFD8 ; =0x0225688C - ldr r0, [r0, #8] - ldr r2, _0224EFDC ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x20] - b _0224F038 -_0224EE70: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224E93C - b _0224F038 -_0224EE7A: - add r0, r4, #0 - bl ov23_0224EA70 - add r0, r4, #0 - mov r1, #0x14 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EE8A: - add r0, r4, #0 - mov r1, #0x15 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EE94: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EF12 - ldr r0, _0224EFD4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224EF12 - add r0, r4, #0 - mov r1, #0xf - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EEBC: - add r0, r4, #0 - mov r1, #0x8f - bl ov23_0224DC90 - add r0, r4, #0 - add r0, #0x34 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EED4: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224EF12 - add r0, r4, #0 - add r0, #0x2e - ldrb r6, [r0] - cmp r6, #0xc - beq _0224EF12 - bl ov23_0224219C - add r1, r6, #0 - bl ov23_022540B0 - add r0, r4, #0 - mov r1, #0x90 - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #0x18 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EF06: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - beq _0224EF14 -_0224EF12: - b _0224F038 -_0224EF14: - add r0, r4, #0 - bl ov23_0224EAA4 - add r0, r4, #0 - mov r1, #0x19 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EF24: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224EB74 - b _0224F038 -_0224EF2E: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224F038 - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #0x1b - bne _0224F038 - add r0, r4, #0 - mov r1, #0x25 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0x1b - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EF56: - bl ov23_0224219C - add r1, r4, #0 - add r1, #0x30 - ldrb r1, [r1] - bl ov23_022540C8 - bl ov23_0224219C - add r2, r4, #0 - add r2, #0x2f - ldrb r2, [r2] - mov r1, #6 - bl ov23_022540E0 - add r0, r4, #0 - add r0, #0x2f - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0x30 - ldrb r0, [r0] - cmp r1, r0 - bne _0224EF8E - add r0, r4, #0 - mov r1, #0x94 - bl ov23_0224DC90 - b _0224EF96 -_0224EF8E: - add r0, r4, #0 - mov r1, #0x93 - bl ov23_0224DC90 -_0224EF96: - add r0, r4, #0 - mov r1, #0x1c - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EFA0: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224F038 - add r0, r4, #0 - mov r1, #0x95 - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #0x1d - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224EFBE: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224F038 - add r0, r4, #0 - mov r1, #0x1e - add r0, #0x34 - strb r1, [r0] - b _0224F038 - ; .align 2, 0 -_0224EFD4: .word 0x021BF67C -_0224EFD8: .word 0x0225688C -_0224EFDC: .word 0x000003D9 -_0224EFE0: .word ov23_0224EC48 -_0224EFE4: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #0x64 - bne _0224F038 - add r0, r4, #0 - mov r1, #0x64 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0x96 - bl ov23_0224DC90 - add r0, r4, #0 - mov r1, #0x1f - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224F008: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224F038 - add r0, r4, #0 - mov r1, #0x20 - add r0, #0x34 - strb r1, [r0] - b _0224F038 -_0224F01E: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #0x65 - bne _0224F038 - add r0, r4, #0 - mov r1, #0x65 - bl ov23_0224DC40 - add r0, r4, #0 - mov r1, #0xf - add r0, #0x34 - strb r1, [r0] -_0224F038: - add r0, r4, #0 - add r0, #0x35 - ldrb r0, [r0] - cmp r0, #8 - bne _0224F076 - add r0, r4, #0 - add r0, #0x34 - ldrb r0, [r0] - cmp r0, #4 - beq _0224F076 - cmp r0, #9 - beq _0224F076 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224F060 - mov r1, #4 - bl sub_02002154 - mov r0, #0 - str r0, [r4, #0x20] -_0224F060: - add r0, r5, #0 - add r1, r4, #0 - bl ov23_0224EA08 - add r0, r4, #0 - mov r1, #8 - add r0, #0x34 - strb r1, [r0] - mov r0, #0 - add r4, #0x35 - strb r0, [r4] -_0224F076: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_0224EC50 - - thumb_func_start ov23_0224F07C -ov23_0224F07C: ; 0x0224F07C - push {r4, r5, r6, lr} - ldr r0, _0224F0E4 ; =0x022577B0 - add r5, r1, #0 - ldr r0, [r0, #0] - add r6, r2, #0 - cmp r0, #0 - beq _0224F090 - bl sub_02022974 - pop {r4, r5, r6, pc} -_0224F090: - mov r0, #0x21 - mov r1, #0x38 - bl sub_02018144 - mov r1, #0 - mov r2, #0x38 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, _0224F0E4 ; =0x022577B0 - mov r1, #2 - str r4, [r0, #0] - str r6, [r4, #4] - add r0, r4, #0 - strh r5, [r4, #0x2c] - add r0, #0x34 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0x35 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0xc - add r0, #0x2e - strb r1, [r0] - bl ov23_0224219C - mov r2, #0 - mov r1, #0x16 - add r3, r2, #0 - bl ov23_02253F40 - bl sub_02059624 - ldr r0, _0224F0E8 ; =ov23_0224EC50 - ldr r2, _0224F0EC ; =0x00002710 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0] - pop {r4, r5, r6, pc} - nop -_0224F0E4: .word 0x022577B0 -_0224F0E8: .word ov23_0224EC50 -_0224F0EC: .word 0x00002710 - thumb_func_end ov23_0224F07C - - thumb_func_start ov23_0224F0F0 -ov23_0224F0F0: ; 0x0224F0F0 - ldr r3, _0224F0F8 ; =sub_02035B48 - mov r0, #0x4b - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_0224F0F8: .word sub_02035B48 - thumb_func_end ov23_0224F0F0 - - thumb_func_start ov23_0224F0FC -ov23_0224F0FC: ; 0x0224F0FC - ldr r3, _0224F104 ; =sub_02035B48 - mov r0, #0x4c - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_0224F104: .word sub_02035B48 - thumb_func_end ov23_0224F0FC - - thumb_func_start ov23_0224F108 -ov23_0224F108: ; 0x0224F108 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0224F132 - ldr r0, _0224F134 ; =0x022577B0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224F132 - cmp r5, #2 - beq _0224F128 - bl sub_02022974 -_0224F128: - ldr r0, _0224F134 ; =0x022577B0 - ldrb r1, [r4, #1] - ldr r0, [r0, #0] - add r0, #0x35 - strb r1, [r0] -_0224F132: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224F134: .word 0x022577B0 - thumb_func_end ov23_0224F108 - - thumb_func_start ov23_0224F138 -ov23_0224F138: ; 0x0224F138 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _0224F16E - ldr r0, _0224F170 ; =0x022577B0 - ldr r0, [r0, #4] - cmp r0, #0 - beq _0224F16E - cmp r5, #2 - beq _0224F158 - bl sub_02022974 -_0224F158: - ldr r0, _0224F170 ; =0x022577B0 - ldr r0, [r0, #4] - cmp r0, #0 - bne _0224F164 - bl sub_02022974 -_0224F164: - ldr r0, _0224F170 ; =0x022577B0 - ldrb r1, [r4, #1] - ldr r0, [r0, #4] - add r0, #0x38 - strb r1, [r0] -_0224F16E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224F170: .word 0x022577B0 - thumb_func_end ov23_0224F138 - - thumb_func_start ov23_0224F174 -ov23_0224F174: ; 0x0224F174 - mov r0, #2 - bx lr - thumb_func_end ov23_0224F174 - - thumb_func_start ov23_0224F178 -ov23_0224F178: ; 0x0224F178 - ldr r3, _0224F180 ; =sub_02035B48 - mov r0, #0x4e - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_0224F180: .word sub_02035B48 - thumb_func_end ov23_0224F178 - - thumb_func_start ov23_0224F184 -ov23_0224F184: ; 0x0224F184 - push {r3, r4, r5, lr} - ldr r0, _0224F1F4 ; =0x022577B0 - add r5, r2, #0 - ldr r4, [r0, #0] - bl sub_0203608C - ldrb r1, [r5] - cmp r1, r0 - bne _0224F1F2 - ldr r0, _0224F1F4 ; =0x022577B0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0224F1A2 - bl sub_02022974 -_0224F1A2: - add r0, r4, #0 - add r0, #0x34 - ldrb r0, [r0] - cmp r0, #2 - beq _0224F1BC - add r0, r4, #0 - mov r1, #8 - bl ov23_0224DC40 - mov r0, #8 - add r4, #0x34 - strb r0, [r4] - pop {r3, r4, r5, pc} -_0224F1BC: - ldrb r1, [r5] - add r0, r4, #0 - add r0, #0x24 - strb r1, [r0] - add r0, r4, #0 - ldrb r1, [r5, #1] - add r0, #0x25 - strb r1, [r0] - add r0, r4, #0 - ldrb r1, [r5, #2] - add r0, #0x26 - add r4, #0x34 - strb r1, [r0] - mov r0, #0x11 - strb r0, [r4] - bl ov23_0224219C - ldrb r1, [r5, #2] - bl ov23_022540F4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x1c - add r3, r2, #0 - bl ov23_02253F40 -_0224F1F2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224F1F4: .word 0x022577B0 - thumb_func_end ov23_0224F184 - - thumb_func_start ov23_0224F1F8 -ov23_0224F1F8: ; 0x0224F1F8 - mov r0, #3 - bx lr - thumb_func_end ov23_0224F1F8 - - thumb_func_start ov23_0224F1FC -ov23_0224F1FC: ; 0x0224F1FC - ldr r3, _0224F204 ; =sub_02035B48 - mov r0, #0x50 - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_0224F204: .word sub_02035B48 - thumb_func_end ov23_0224F1FC - - thumb_func_start ov23_0224F208 -ov23_0224F208: ; 0x0224F208 - push {r4, r5, r6, lr} - ldr r0, _0224F244 ; =0x022577B0 - add r5, r2, #0 - ldr r4, [r0, #0] - ldr r6, [r0, #4] - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _0224F242 - ldrb r0, [r5, #2] - cmp r0, #0 - beq _0224F22C - cmp r0, #1 - beq _0224F234 - cmp r0, #2 - beq _0224F23C - pop {r4, r5, r6, pc} -_0224F22C: - ldrb r0, [r5] - add r4, #0x2e - strb r0, [r4] - pop {r4, r5, r6, pc} -_0224F234: - ldrb r0, [r5] - add r6, #0x33 - strb r0, [r6] - pop {r4, r5, r6, pc} -_0224F23C: - ldrb r0, [r5] - add r4, #0x30 - strb r0, [r4] -_0224F242: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224F244: .word 0x022577B0 - thumb_func_end ov23_0224F208 - - thumb_func_start ov23_0224F248 -ov23_0224F248: ; 0x0224F248 - mov r0, #3 - bx lr - thumb_func_end ov23_0224F248 - - thumb_func_start ov23_0224F24C -ov23_0224F24C: ; 0x0224F24C - push {r3, lr} - ldr r0, _0224F26C ; =0x022577B0 - ldr r1, [r0, #4] - cmp r1, #0 - beq _0224F25C - ldr r0, [r1, #0] - bl ov23_0224DDE4 -_0224F25C: - ldr r0, _0224F26C ; =0x022577B0 - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224F26A - ldr r0, [r1, #0] - bl ov23_0224E9C4 -_0224F26A: - pop {r3, pc} - ; .align 2, 0 -_0224F26C: .word 0x022577B0 - thumb_func_end ov23_0224F24C - - thumb_func_start ov23_0224F270 -ov23_0224F270: ; 0x0224F270 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r1, r5, #0 - ldr r0, [r5, #0x20] - add r1, #0x3a - ldrh r4, [r5, #0x3a] - bl sub_020014D0 - ldrh r0, [r5, #0x3a] - cmp r4, r0 - beq _0224F28C - ldr r0, _0224F290 ; =0x000005DC - bl sub_02005748 -_0224F28C: - pop {r3, r4, r5, pc} - nop -_0224F290: .word 0x000005DC - thumb_func_end ov23_0224F270 - - thumb_func_start ov23_0224F294 -ov23_0224F294: ; 0x0224F294 - push {r4, r5, r6, r7, lr} - sub sp, #0xb4 - ldr r3, _0224F44C ; =0x022568EC - str r2, [sp, #0x14] - add r2, sp, #0x9c - str r0, [sp, #0xc] - str r1, [sp, #0x10] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0x42 - mov r1, #0xb - bl sub_02006C24 - add r4, r0, #0 - ldr r0, [sp, #0xc] - add r1, sp, #0x9c - add r0, #0x74 - mov r2, #8 - mov r3, #0xb - bl ov5_021D3190 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xe3 - lsl r0, r0, #6 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r0, #0x74 - mov r2, #9 - mov r3, #0 - bl ov5_021D32E8 - mov r0, #0xe3 - lsl r0, r0, #6 - str r0, [sp] - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r0, #0x74 - mov r2, #1 - mov r3, #0 - bl ov5_021D3374 - mov r0, #0xe3 - lsl r0, r0, #6 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r2, #0 - add r0, #0x74 - add r1, r4, #0 - add r3, r2, #0 - bl ov5_021D339C - mov r0, #1 - str r0, [sp] - mov r0, #0xe3 - lsl r0, r0, #6 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r0, #0x74 - mov r2, #2 - mov r3, #0 - bl ov5_021D3414 - ldr r0, [sp, #0xc] - ldr r1, _0224F450 ; =0x0225695C - add r0, #0x74 - bl ov5_021D3584 - mov r2, #0x76 - ldr r1, [sp, #0xc] - lsl r2, r2, #2 - str r0, [r1, r2] - add r0, r1, #0 - ldr r0, [r0, r2] - add r2, #0x60 - ldrh r1, [r1, r2] - ldr r0, [r0, #0] - bl ov23_0224F4D0 - ldr r0, _0224F454 ; =0x000038C1 - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r2, #8 - add r0, #0x74 - mov r3, #0 - bl ov5_021D3374 - ldr r0, _0224F454 ; =0x000038C1 - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0xc] - mov r2, #7 - add r0, #0x74 - mov r3, #0 - bl ov5_021D339C - mov r0, #1 - str r0, [sp] - ldr r0, _0224F454 ; =0x000038C1 - add r1, r4, #0 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - mov r2, #0xa - add r0, #0x74 - mov r3, #0 - bl ov5_021D3414 - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, [sp, #0x14] - mov r4, #0 - cmp r0, #0 - bls _0224F416 - ldr r5, [sp, #0xc] - ldr r3, _0224F458 ; =0x02256990 - add r7, r4, #0 - add r2, sp, #0x28 - mov r6, #6 -_0224F394: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _0224F394 - ldr r0, [r3, #0] - ldr r3, _0224F45C ; =0x022568E0 - str r0, [r2, #0] - ldmia r3!, {r0, r1} - add r2, sp, #0x1c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #0xc] - str r0, [sp, #0x18] - add r0, #0x74 - str r0, [sp, #0x18] -_0224F3B4: - add r6, sp, #0x28 - add r3, sp, #0x68 - mov r2, #6 -_0224F3BA: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224F3BA - ldr r0, [r6, #0] - add r1, sp, #0x68 - str r0, [r3, #0] - mov r0, #2 - ldrsh r0, [r1, r0] - add r1, r0, r7 - add r0, sp, #0x68 - strh r1, [r0, #2] - ldr r0, [sp, #0x10] - ldrb r1, [r0, r4] - lsl r0, r1, #1 - add r1, r1, r0 - add r0, sp, #0x68 - strh r1, [r0, #6] - ldr r0, [sp, #0x18] - add r1, sp, #0x68 - bl ov5_021D3584 - mov r1, #0x77 - lsl r1, r1, #2 - add r2, sp, #0x5c - add r3, sp, #0x1c - str r0, [r5, r1] - ldmia r3!, {r0, r1} - add r6, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r6, #0 - str r0, [r2, #0] - mov r0, #0x77 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #1 - ldr r0, [r0, #0] - bl sub_02021C80 - ldr r0, [sp, #0x14] - add r4, r4, #1 - add r7, #0x18 - add r5, r5, #4 - cmp r4, r0 - blo _0224F3B4 -_0224F416: - mov r1, #0x8e - ldr r0, [sp, #0xc] - lsl r1, r1, #2 - ldrh r0, [r0, r1] - sub r1, #0x60 - add r0, r0, #1 - lsl r2, r0, #2 - ldr r0, [sp, #0xc] - add r0, r0, r2 - ldr r0, [r0, r1] - mov r1, #2 - ldr r0, [r0, #0] - mov r2, #1 - bl ov23_0224F500 - ldr r0, [sp, #0x14] - mov r1, #0x7e - add r2, r0, #1 - ldr r0, [sp, #0xc] - lsl r1, r1, #2 - str r2, [r0, r1] - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - add sp, #0xb4 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224F44C: .word 0x022568EC -_0224F450: .word 0x0225695C -_0224F454: .word 0x000038C1 -_0224F458: .word 0x02256990 -_0224F45C: .word 0x022568E0 - thumb_func_end ov23_0224F294 - - thumb_func_start ov23_0224F460 -ov23_0224F460: ; 0x0224F460 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - bls _0224F48E - mov r7, #0x76 - lsl r7, r7, #2 - add r6, r7, #0 - add r6, #0x20 -_0224F478: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r7] - bl sub_0200D0F4 - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, r6] - cmp r4, r0 - blo _0224F478 -_0224F48E: - add r5, #0x74 - add r0, r5, #0 - bl ov5_021D375C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0224F460 - - thumb_func_start ov23_0224F498 -ov23_0224F498: ; 0x0224F498 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - bls _0224F4CC - mov r7, #0x76 - lsl r7, r7, #2 - add r6, r7, #0 - add r6, #0x20 -_0224F4B0: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r7] - mov r1, #1 - ldr r0, [r0, #0] - lsl r1, r1, #0xc - bl sub_02021E2C - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [r5, r6] - cmp r4, r0 - blo _0224F4B0 -_0224F4CC: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F498 - - thumb_func_start ov23_0224F4D0 -ov23_0224F4D0: ; 0x0224F4D0 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - mov r0, #0x18 - mul r0, r4 - add r0, #0x14 - lsl r0, r0, #0xc - str r0, [sp, #4] - add r0, r5, #0 - bl sub_02021C50 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov23_0224F4D0 - - thumb_func_start ov23_0224F500 -ov23_0224F500: ; 0x0224F500 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl sub_02021E24 - mov r1, #3 - bl sub_020E2178 - add r2, r0, #0 - lsl r1, r2, #1 - add r1, r2, r1 - add r0, r5, #0 - add r1, r4, r1 - bl sub_02021D6C - add r0, r5, #0 - add r1, r6, #0 - bl sub_02021EC4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F500 - - thumb_func_start ov23_0224F52C -ov23_0224F52C: ; 0x0224F52C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #1 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x76 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - add r4, r2, #0 - ldr r0, [r0, #0] - add r2, r1, #0 - bl ov23_0224F500 - add r0, r4, #1 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x76 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - ldr r0, [r0, #0] - add r2, r1, #0 - bl ov23_0224F500 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0224F52C - - thumb_func_start ov23_0224F560 -ov23_0224F560: ; 0x0224F560 - push {r4, lr} - add r4, r0, #0 - bl sub_02021E24 - mov r1, #3 - bl sub_020E2178 - cmp r1, #1 - bne _0224F586 - add r0, r4, #0 - bl sub_02021FD0 - cmp r0, #0 - bne _0224F586 - add r0, r4, #0 - mov r1, #2 - mov r2, #1 - bl ov23_0224F500 -_0224F586: - pop {r4, pc} - thumb_func_end ov23_0224F560 - - thumb_func_start ov23_0224F588 -ov23_0224F588: ; 0x0224F588 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xf - mov r1, #8 - bl sub_02018144 - ldr r1, _0224F5B4 ; =0x022577B8 - mov r2, #8 - str r0, [r1, #0] - mov r1, #0 - bl sub_020C4CF4 - ldr r0, _0224F5B4 ; =0x022577B8 - mov r2, #0 - ldr r1, [r0, #0] - strb r2, [r1, #4] - ldr r1, [r0, #0] - strb r2, [r1, #5] - ldr r0, [r0, #0] - str r4, [r0, #0] - pop {r4, pc} - nop -_0224F5B4: .word 0x022577B8 - thumb_func_end ov23_0224F588 - - thumb_func_start ov23_0224F5B8 -ov23_0224F5B8: ; 0x0224F5B8 - ldr r0, _0224F5C0 ; =0x022577B8 - ldr r3, _0224F5C4 ; =sub_020181C4 - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0224F5C0: .word 0x022577B8 -_0224F5C4: .word sub_020181C4 - thumb_func_end ov23_0224F5B8 - - thumb_func_start ov23_0224F5C8 -ov23_0224F5C8: ; 0x0224F5C8 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0203D174 - bl sub_020298B0 - bl sub_02028E28 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F5C8 - - thumb_func_start ov23_0224F5DC -ov23_0224F5DC: ; 0x0224F5DC - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0203D174 - bl sub_020298B0 - bl sub_020289A0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F5DC - - thumb_func_start ov23_0224F5F0 -ov23_0224F5F0: ; 0x0224F5F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_020289B8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F5F0 - - thumb_func_start ov23_0224F608 -ov23_0224F608: ; 0x0224F608 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0203D174 - bl sub_020298B0 - bl sub_02028B70 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F608 - - thumb_func_start ov23_0224F61C -ov23_0224F61C: ; 0x0224F61C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_02028B88 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F61C - - thumb_func_start ov23_0224F634 -ov23_0224F634: ; 0x0224F634 - push {r3, lr} - ldr r1, _0224F654 ; =0x022577B8 - ldr r1, [r1, #0] - ldrb r1, [r1, #5] - cmp r1, r0 - beq _0224F644 - bl sub_02022974 -_0224F644: - ldr r0, _0224F654 ; =0x022577B8 - ldr r1, [r0, #0] - ldr r0, [r1, #0] - ldrb r1, [r1, #4] - bl sub_02028B94 - pop {r3, pc} - nop -_0224F654: .word 0x022577B8 - thumb_func_end ov23_0224F634 - - thumb_func_start ov23_0224F658 -ov23_0224F658: ; 0x0224F658 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0203D174 - bl sub_020298B0 - bl sub_02028C3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F658 - - thumb_func_start ov23_0224F66C -ov23_0224F66C: ; 0x0224F66C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_02028E44 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F66C - - thumb_func_start ov23_0224F684 -ov23_0224F684: ; 0x0224F684 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_02028C54 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F684 - - thumb_func_start ov23_0224F69C -ov23_0224F69C: ; 0x0224F69C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_02028C60 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F69C - - thumb_func_start ov23_0224F6B4 -ov23_0224F6B4: ; 0x0224F6B4 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0203D174 - bl sub_020298B0 - bl sub_02028D58 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F6B4 - - thumb_func_start ov23_0224F6C8 -ov23_0224F6C8: ; 0x0224F6C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_02028D74 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224F6C8 - - thumb_func_start ov23_0224F6E0 -ov23_0224F6E0: ; 0x0224F6E0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0xb - blt _0224F6EE - bl sub_02022974 -_0224F6EE: - cmp r5, #6 - blt _0224F6F4 - sub r5, r5, #5 -_0224F6F4: - cmp r4, #0x63 - ble _0224F6FA - mov r4, #0x63 -_0224F6FA: - ldr r0, _0224F70C ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - ldr r0, [r0, #0] - bl sub_02028CB0 - pop {r3, r4, r5, pc} - nop -_0224F70C: .word 0x022577B8 - thumb_func_end ov23_0224F6E0 - - thumb_func_start ov23_0224F710 -ov23_0224F710: ; 0x0224F710 - push {r4, lr} - add r4, r0, #0 - cmp r4, #0x3c - blt _0224F71C - bl sub_02022974 -_0224F71C: - ldr r0, _0224F72C ; =0x022577B8 - add r1, r4, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bl sub_02028DB4 - pop {r4, pc} - nop -_0224F72C: .word 0x022577B8 - thumb_func_end ov23_0224F710 - - thumb_func_start ov23_0224F730 -ov23_0224F730: ; 0x0224F730 - add r1, r0, #0 - ldr r0, _0224F73C ; =0x022577B8 - ldr r3, _0224F740 ; =sub_02028E84 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0224F73C: .word 0x022577B8 -_0224F740: .word sub_02028E84 - thumb_func_end ov23_0224F730 - - thumb_func_start ov23_0224F744 -ov23_0224F744: ; 0x0224F744 - add r1, r0, #0 - ldr r0, _0224F750 ; =0x022577B8 - ldr r3, _0224F754 ; =sub_02028BC8 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0224F750: .word 0x022577B8 -_0224F754: .word sub_02028BC8 - thumb_func_end ov23_0224F744 - - thumb_func_start ov23_0224F758 -ov23_0224F758: ; 0x0224F758 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _0224F7C4 ; =0x000005FD - add r6, r1, #0 - bl sub_02005748 - mov r0, #2 - bl ov23_022430D0 - mov r1, #0x25 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x25 - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x7f - str r6, [r4, #0xc] - lsl r0, r0, #2 - str r5, [r4, r0] - mov r1, #0 - add r0, #0x4a - strb r1, [r4, r0] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x68] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x6c] - mov r0, #4 - bl sub_0200B358 - str r0, [r4, #0x70] - ldr r0, _0224F7C8 ; =ov23_0224F914 - ldr r2, _0224F7CC ; =0x00002710 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r1, [r4, #4] - ldr r2, _0224F7D0 ; =ov23_02251270 - add r0, r4, #0 - bl ov23_022431EC - pop {r4, r5, r6, pc} - nop -_0224F7C4: .word 0x000005FD -_0224F7C8: .word ov23_0224F914 -_0224F7CC: .word 0x00002710 -_0224F7D0: .word ov23_02251270 - thumb_func_end ov23_0224F758 - - thumb_func_start ov23_0224F7D4 -ov23_0224F7D4: ; 0x0224F7D4 - mov r1, #0 - strb r1, [r0] - mov r1, #1 - strb r1, [r0, #1] - mov r1, #2 - strb r1, [r0, #2] - mov r1, #3 - strb r1, [r0, #3] - mov r1, #4 - strb r1, [r0, #4] - mov r1, #5 - strb r1, [r0, #5] - mov r1, #6 - strb r1, [r0, #6] - mov r0, #7 - bx lr - thumb_func_end ov23_0224F7D4 - - thumb_func_start ov23_0224F7F4 -ov23_0224F7F4: ; 0x0224F7F4 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r0, sp, #0x18 - bl ov23_0224F7D4 - mov r0, #7 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r0, #1 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0x15 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224F904 ; =0x000002E7 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - add r1, #0x10 - ldr r0, [r0, #8] - mov r2, #3 - mov r3, #0x14 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224F908 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - bl ov23_0224219C - bl ov23_02253E3C - ldr r4, _0224F90C ; =0x02256924 - str r0, [sp, #0x14] - mov r6, #0 -_0224F84A: - cmp r6, #4 - bne _0224F872 - ldr r0, [r5, #0xc] - bl sub_0203D174 - bl sub_02025E38 - mov r1, #4 - bl sub_02025F04 - add r7, r0, #0 - ldr r0, [r5, #0x40] - ldr r2, [r4, #4] - add r1, r7, #0 - bl sub_02013A6C - add r0, r7, #0 - bl sub_020237BC - b _0224F87E -_0224F872: - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x14] - ldr r2, [r4, #0] - ldr r3, [r4, #4] - bl sub_02013A4C -_0224F87E: - add r6, r6, #1 - add r4, #8 - cmp r6, #7 - blo _0224F84A - ldr r0, [r5, #0xc] - mov r3, #0x8e - add r0, #0x90 - ldr r0, [r0, #0] - lsl r3, r3, #2 - strh r0, [r5, r3] - ldr r0, [r5, #0x40] - mov r1, #1 - str r0, [sp, #0x20] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x24] - add r0, sp, #0x18 - strb r1, [r0, #0x10] - strb r1, [r0, #0x11] - mov r1, #7 - strb r1, [r0, #0x12] - ldrb r2, [r0, #0x13] - mov r1, #0xf - bic r2, r1 - mov r1, #8 - orr r1, r2 - strb r1, [r0, #0x13] - ldrb r2, [r0, #0x13] - mov r1, #0x30 - bic r2, r1 - mov r1, #0x10 - orr r1, r2 - strb r1, [r0, #0x13] - ldrb r2, [r0, #0x13] - mov r1, #0xc0 - bic r2, r1 - mov r1, #0x40 - orr r1, r2 - strb r1, [r0, #0x13] - mov r0, #0xb - str r0, [sp] - ldr r0, _0224F910 ; =0x00000402 - mov r1, #0x1c - str r0, [sp, #4] - ldrh r3, [r5, r3] - add r0, sp, #0x20 - mov r2, #4 - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_02001AF4 - str r0, [r5, #0x54] - mov r0, #0 - str r0, [r5, #0x48] - add r0, r5, #0 - add r0, #0x10 - bl sub_0201A9A4 - add r0, r5, #0 - add r1, sp, #0x18 - mov r2, #7 - bl ov23_0224F294 - bl sub_020594FC - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224F904: .word 0x000002E7 -_0224F908: .word 0x000003D9 -_0224F90C: .word 0x02256924 -_0224F910: .word 0x00000402 - thumb_func_end ov23_0224F7F4 - - thumb_func_start ov23_0224F914 -ov23_0224F914: ; 0x0224F914 - push {r3, r4, r5, lr} - ldr r2, _0224FA4C ; =0x00000246 - add r4, r1, #0 - ldrb r2, [r4, r2] - add r5, r0, #0 - cmp r2, #0x13 - bls _0224F924 - b _0224FA4A -_0224F924: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224F930: ; jump table - .short _0224F958 - _0224F930 - 2 ; case 0 - .short _0224F968 - _0224F930 - 2 ; case 1 - .short _0224F96E - _0224F930 - 2 ; case 2 - .short _0224F984 - _0224F930 - 2 ; case 3 - .short _0224FA4A - _0224F930 - 2 ; case 4 - .short _0224F99A - _0224F930 - 2 ; case 5 - .short _0224F9A0 - _0224F930 - 2 ; case 6 - .short _0224F9A6 - _0224F930 - 2 ; case 7 - .short _0224F9AC - _0224F930 - 2 ; case 8 - .short _0224F9B2 - _0224F930 - 2 ; case 9 - .short _0224FA4A - _0224F930 - 2 ; case 10 - .short _0224F9B8 - _0224F930 - 2 ; case 11 - .short _0224F9BE - _0224F930 - 2 ; case 12 - .short _0224F9C4 - _0224F930 - 2 ; case 13 - .short _0224F9F2 - _0224F930 - 2 ; case 14 - .short _0224FA18 - _0224F930 - 2 ; case 15 - .short _0224FA3A - _0224F930 - 2 ; case 16 - .short _0224FA40 - _0224F930 - 2 ; case 17 - .short _0224FA34 - _0224F930 - 2 ; case 18 - .short _0224FA46 - _0224F930 - 2 ; case 19 -_0224F958: - add r0, r4, #0 - bl ov23_0224F7F4 - ldr r0, _0224FA4C ; =0x00000246 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} -_0224F968: - bl ov23_0224FA58 - pop {r3, r4, r5, pc} -_0224F96E: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_02243204 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov23_02250B34 - pop {r3, r4, r5, pc} -_0224F984: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_02243204 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov23_02250B34 - pop {r3, r4, r5, pc} -_0224F99A: - bl ov23_0224FF58 - pop {r3, r4, r5, pc} -_0224F9A0: - bl ov23_02250378 - pop {r3, r4, r5, pc} -_0224F9A6: - bl ov23_02250704 - pop {r3, r4, r5, pc} -_0224F9AC: - bl ov23_02250EAC - pop {r3, r4, r5, pc} -_0224F9B2: - bl ov23_022510F0 - pop {r3, r4, r5, pc} -_0224F9B8: - bl ov23_02250998 - pop {r3, r4, r5, pc} -_0224F9BE: - bl ov23_022509D4 - pop {r3, r4, r5, pc} -_0224F9C4: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224FA4A - ldr r0, _0224FA50 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224FA4A - bl ov23_0224219C - bl ov23_02254044 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov23_02250B34 - bl ov23_02243204 - pop {r3, r4, r5, pc} -_0224F9F2: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _0224FA4A - ldr r0, _0224FA50 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0224FA4A - ldr r1, [r4, #0] - add r0, r4, #0 - blx r1 - ldr r0, _0224FA54 ; =0x00000245 - ldrb r1, [r4, r0] - add r0, r0, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} -_0224FA18: - add r0, r4, #0 - bl ov23_0224FB7C - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov23_02250B34 - bl ov23_02243204 - ldr r0, [r4, #0xc] - bl sub_02054064 - pop {r3, r4, r5, pc} -_0224FA34: - bl ov23_02250048 - pop {r3, r4, r5, pc} -_0224FA3A: - bl ov23_0225044C - pop {r3, r4, r5, pc} -_0224FA40: - bl ov23_022507D8 - pop {r3, r4, r5, pc} -_0224FA46: - bl ov23_02250F8C -_0224FA4A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224FA4C: .word 0x00000246 -_0224FA50: .word 0x021BF67C -_0224FA54: .word 0x00000245 - thumb_func_end ov23_0224F914 - - thumb_func_start ov23_0224FA58 -ov23_0224FA58: ; 0x0224FA58 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #0x54] - bl sub_02001DC4 - add r5, r0, #0 - mov r1, #0x5e - ldr r0, [r4, #0x54] - lsl r1, r1, #4 - bl sub_02001C94 - mov r1, #0x8f - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, #0x54] - bl sub_02001DC4 - mov r2, #0x8e - lsl r2, r2, #2 - strh r0, [r4, r2] - ldrh r1, [r4, r2] - cmp r5, r1 - beq _0224FAAA - sub r2, #0x60 - ldr r0, [r4, r2] - ldr r0, [r0, #0] - bl ov23_0224F4D0 - mov r2, #0x8e - lsl r2, r2, #2 - ldrh r2, [r4, r2] - add r0, r4, #0 - add r1, r5, #0 - bl ov23_0224F52C - mov r0, #0x8e - lsl r0, r0, #2 - ldrh r1, [r4, r0] - ldr r0, [r4, #0xc] - add r0, #0x90 - str r1, [r0, #0] -_0224FAAA: - mov r0, #0x8e - lsl r0, r0, #2 - ldrh r1, [r4, r0] - sub r0, #0x60 - add r1, r1, #1 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r0, [r1, r0] - ldr r0, [r0, #0] - bl ov23_0224F560 - bl sub_020360F0 - cmp r0, #0 - beq _0224FAD2 - mov r1, #1 - mov r0, #0x8f - mvn r1, r1 - lsl r0, r0, #2 - str r1, [r4, r0] -_0224FAD2: - mov r1, #0x8f - lsl r1, r1, #2 - mov r2, #1 - ldr r0, [r4, r1] - mvn r2, r2 - cmp r0, r2 - beq _0224FAF6 - add r1, r2, #1 - cmp r0, r1 - bne _0224FAFE - add r0, r4, #0 - bl ov23_0224F498 - ldr r0, [r4, #0x74] - bl sub_020219F8 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224FAF6: - mov r0, #2 - add r1, #0xa - strb r0, [r4, r1] - b _0224FB66 -_0224FAFE: - ldr r1, _0224FB6C ; =ov23_0224FDE0 - cmp r0, r1 - beq _0224FB16 - ldr r1, _0224FB70 ; =ov23_022501BC - cmp r0, r1 - beq _0224FB16 - ldr r1, _0224FB74 ; =ov23_02250CD4 - cmp r0, r1 - beq _0224FB16 - ldr r1, _0224FB78 ; =ov23_02250598 - cmp r0, r1 - bne _0224FB3C -_0224FB16: - mov r0, #4 - bl sub_0206A780 - str r0, [r4, #8] - mov r1, #0xc8 - mov r2, #0x14 - mov r3, #0x7a - bl sub_0206A8A0 - mov r1, #0 - ldr r0, [r4, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r4, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_0224FB3C: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224FB5C - add r0, r4, #0 - bl ov23_0224F460 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_02001BC4 - mov r0, #0x7e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_0224FB5C: - mov r1, #0x8f - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r4, #0 - blx r1 -_0224FB66: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_0224FB6C: .word ov23_0224FDE0 -_0224FB70: .word ov23_022501BC -_0224FB74: .word ov23_02250CD4 -_0224FB78: .word ov23_02250598 - thumb_func_end ov23_0224FA58 - - thumb_func_start ov23_0224FB7C -ov23_0224FB7C: ; 0x0224FB7C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x4c] - cmp r0, #0 - beq _0224FB92 - mov r1, #0 - add r2, r1, #0 - bl ov23_02248EF8 - mov r0, #0 - str r0, [r4, #0x4c] -_0224FB92: - ldr r0, [r4, #0x48] - cmp r0, #0 - beq _0224FBA6 - mov r1, #0 - add r2, r1, #0 - bl sub_02001384 - mov r0, #0 - str r0, [r4, #0x48] - b _0224FBC6 -_0224FBA6: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224FBC6 - add r0, r4, #0 - bl ov23_0224F460 - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_02001BC4 - mov r0, #0x7e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_0224FBC6: - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A7CC - cmp r0, #0 - beq _0224FBF8 - add r0, r4, #0 - add r0, #0x10 - mov r1, #1 - bl sub_0200DC9C - ldrb r1, [r4, #0x14] - ldr r0, [r4, #0x10] - bl sub_0201C3C0 - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A8FC - ldr r0, [r4, #0x40] - bl sub_02013A3C - add r0, r4, #0 - bl ov23_02252DF4 -_0224FBF8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224FB7C - - thumb_func_start ov23_0224FBFC -ov23_0224FBFC: ; 0x0224FBFC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r5, r0, #0 - mov r0, #6 - str r0, [sp, #0x1c] - mov r0, #0x19 - mov r7, #0xb - str r0, [sp, #0x18] - cmp r1, #1 - beq _0224FC1A - cmp r1, #2 - beq _0224FC20 - cmp r1, #3 - beq _0224FC28 - b _0224FC32 -_0224FC1A: - mov r6, #3 - ldr r4, _0224FCDC ; =0x02257644 - b _0224FC32 -_0224FC20: - mov r6, #2 - mov r7, #0xd - ldr r4, _0224FCE0 ; =0x02257634 - b _0224FC32 -_0224FC28: - mov r0, #0x14 - ldr r4, _0224FCE4 ; =0x0225765C - mov r6, #3 - str r7, [sp, #0x1c] - str r0, [sp, #0x18] -_0224FC32: - add r0, r6, #0 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x44] - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x1c] - ldr r3, [sp, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - lsl r0, r6, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224FCE8 ; =0x000002E7 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - lsl r3, r3, #0x18 - ldr r0, [r0, #8] - add r1, #0x20 - mov r2, #3 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224FCEC ; =0x000003D9 - add r0, #0x20 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - bl ov23_0224219C - bl ov23_02253E3C - mov r7, #0 - str r0, [sp, #0x14] - cmp r6, #0 - ble _0224FC9E -_0224FC8A: - ldr r0, [r5, #0x44] - ldr r1, [sp, #0x14] - ldr r2, [r4, #0] - ldr r3, [r4, #4] - bl sub_02013A4C - add r7, r7, #1 - add r4, #8 - cmp r7, r6 - blt _0224FC8A -_0224FC9E: - ldr r4, _0224FCF0 ; =0x02256904 - add r3, sp, #0x20 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - lsl r0, r6, #0x10 - lsr r1, r0, #0x10 - add r0, sp, #0x20 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - ldr r0, [r5, #0x44] - mov r1, #0 - str r0, [sp, #0x20] - add r0, r5, #0 - add r0, #0x20 - str r0, [sp, #0x2c] - add r0, r2, #0 - add r2, r1, #0 - mov r3, #4 - str r5, [sp, #0x3c] - bl sub_0200112C - str r0, [r5, #0x50] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224FCDC: .word 0x02257644 -_0224FCE0: .word 0x02257634 -_0224FCE4: .word 0x0225765C -_0224FCE8: .word 0x000002E7 -_0224FCEC: .word 0x000003D9 -_0224FCF0: .word 0x02256904 - thumb_func_end ov23_0224FBFC - - thumb_func_start ov23_0224FCF4 -ov23_0224FCF4: ; 0x0224FCF4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x50] - cmp r0, #0 - beq _0224FD1C - mov r1, #0 - add r2, r1, #0 - bl sub_02001384 - add r1, r4, #0 - add r1, #0x24 - ldrb r1, [r1] - ldr r0, [r4, #0x20] - bl sub_0201C3C0 - ldr r0, [r4, #0x44] - bl sub_02013A3C - mov r0, #0 - str r0, [r4, #0x50] -_0224FD1C: - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A7CC - cmp r0, #0 - beq _0224FD3A - add r0, r4, #0 - add r0, #0x20 - mov r1, #1 - bl sub_0200DC9C - add r4, #0x20 - add r0, r4, #0 - bl sub_0201A8FC -_0224FD3A: - pop {r4, pc} - thumb_func_end ov23_0224FCF4 - - thumb_func_start ov23_0224FD3C -ov23_0224FD3C: ; 0x0224FD3C - push {r4, lr} - add r4, r0, #0 - bl ov23_0224FB7C - ldr r0, [r4, #8] - cmp r0, #0 - beq _0224FD52 - bl sub_0206A844 - mov r0, #0 - str r0, [r4, #8] -_0224FD52: - ldr r0, _0224FD64 ; =0x00000246 - mov r1, #0 - strb r1, [r4, r0] - bl ov23_022421DC - bl ov23_02254044 - pop {r4, pc} - nop -_0224FD64: .word 0x00000246 - thumb_func_end ov23_0224FD3C - - thumb_func_start ov23_0224FD68 -ov23_0224FD68: ; 0x0224FD68 - push {r3, lr} - ldr r1, _0224FD80 ; =0x022577B8 - ldr r2, [r1, #0] - ldrb r1, [r2, #5] - cmp r1, r0 - bne _0224FD7C - ldrb r1, [r2, #4] - ldr r0, [r2, #0] - bl sub_02028E50 -_0224FD7C: - pop {r3, pc} - nop -_0224FD80: .word 0x022577B8 - thumb_func_end ov23_0224FD68 - - thumb_func_start ov23_0224FD84 -ov23_0224FD84: ; 0x0224FD84 - push {r4, lr} - add r4, r1, #0 - mov r1, #0x13 - bl sub_02001504 - mov r2, #0x81 - add r1, r0, #0 - lsl r2, r2, #2 - ldr r2, [r1, r2] - add r0, r4, #0 - blx r2 - mov r1, #1 - mvn r1, r1 - cmp r4, r1 - bne _0224FDA6 - mov r4, #0x44 - b _0224FDAA -_0224FDA6: - add r4, r0, #0 - add r4, #0x22 -_0224FDAA: - bl ov23_022421DC - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0224FD84 - - thumb_func_start ov23_0224FDBC -ov23_0224FDBC: ; 0x0224FDBC - mov r1, #2 - ldr r2, _0224FDD4 ; =ov23_0224F5C8 - lsl r1, r1, #8 - str r2, [r0, r1] - ldr r2, _0224FDD8 ; =ov23_0224F66C - add r1, r1, #4 - str r2, [r0, r1] - mov r1, #0 - ldr r3, _0224FDDC ; =ov23_0224FE38 - str r1, [r0, #0x64] - bx r3 - nop -_0224FDD4: .word ov23_0224F5C8 -_0224FDD8: .word ov23_0224F66C -_0224FDDC: .word ov23_0224FE38 - thumb_func_end ov23_0224FDBC - - thumb_func_start ov23_0224FDE0 -ov23_0224FDE0: ; 0x0224FDE0 - push {r4, lr} - add r4, r0, #0 - mov r0, #8 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #8 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r2, _0224FE28 ; =ov23_0224F5C8 - sub r0, #0x30 - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, _0224FE2C ; =ov23_0224F66C - sub r0, #0x2c - str r2, [r4, r0] - ldr r0, _0224FE30 ; =ov23_0224FD84 - str r0, [r4, #0x60] - mov r0, #0 - str r0, [r4, #0x64] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r1, #0x1c - strh r0, [r4, r1] - ldr r1, _0224FE34 ; =0x02028EA9 - add r0, r4, #0 - bl ov23_0224FE38 - pop {r4, pc} - nop -_0224FE28: .word ov23_0224F5C8 -_0224FE2C: .word ov23_0224F66C -_0224FE30: .word ov23_0224FD84 -_0224FE34: .word 0x02028EA9 - thumb_func_end ov23_0224FDE0 - - thumb_func_start ov23_0224FE38 -ov23_0224FE38: ; 0x0224FE38 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r1, [sp, #0x14] - mov r1, #0x81 - add r5, r0, #0 - lsl r1, r1, #2 - ldr r7, [r5, r1] - sub r1, r1, #4 - ldr r1, [r5, r1] - blx r1 - add r6, r0, #0 - add r0, r5, #0 - bl ov23_0224FB7C - bl ov23_022421DC - ldr r1, _0224FF40 ; =0x00000276 - mov r2, #0 - bl ov23_02253DFC - add r0, r6, #1 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224FF44 ; =0x00000257 - add r1, #0x10 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224FF48 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - bl ov23_022421DC - bl ov23_02253E3C - mov r4, #0 - str r0, [sp, #0x18] - cmp r6, #0 - ble _0224FEC0 -_0224FEA8: - add r0, r4, #0 - add r1, r5, #0 - blx r7 - add r2, r0, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, r6 - blt _0224FEA8 -_0224FEC0: - mov r2, #0x22 - add r3, r2, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - sub r3, #0x24 - bl sub_02013A4C - ldr r3, _0224FF4C ; =0x02256904 - add r2, sp, #0x1c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r6, #1 - add r2, sp, #0x1c - strh r0, [r2, #0x10] - mov r1, #6 - strh r1, [r2, #0x12] - ldr r0, [r5, #0x40] - str r0, [sp, #0x1c] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x28] - ldr r0, [r5, #0x60] - str r0, [sp, #0x20] - ldr r0, [r5, #0x64] - str r0, [sp, #0x24] - str r5, [sp, #0x38] - ldrh r2, [r2, #0x10] - add r0, r5, #0 - bl ov23_02251238 - ldr r0, [sp, #0x14] - mov r2, #0x23 - str r0, [sp] - ldr r0, _0224FF50 ; =0x022577B8 - lsl r2, r2, #4 - ldr r0, [r0, #0] - mov r3, #4 - ldr r0, [r0, #0] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x1c - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov23_02248C08 - str r0, [r5, #0x4c] - ldr r0, _0224FF54 ; =0x00000246 - mov r1, #5 - strb r1, [r5, r0] - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_0224FF40: .word 0x00000276 -_0224FF44: .word 0x00000257 -_0224FF48: .word 0x000003D9 -_0224FF4C: .word 0x02256904 -_0224FF50: .word 0x022577B8 -_0224FF54: .word 0x00000246 - thumb_func_end ov23_0224FE38 - - thumb_func_start ov23_0224FF58 -ov23_0224FF58: ; 0x0224FF58 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - ldr r0, [r5, #0x4c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #8 - bl ov23_022430E0 - bl sub_020360F0 - cmp r0, #0 - beq _0224FF8A - mov r4, #1 - mvn r4, r4 -_0224FF8A: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _0224FF94 - add r4, r0, #0 -_0224FF94: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224FFBE - add r0, r0, #1 - cmp r4, r0 - bne _0224FFC6 - ldr r0, [r5, #0x4c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r1, sp, #0 - add r2, r0, #0 - ldrh r1, [r1, #2] - add r0, r5, #0 - mov r3, #6 - bl ov23_0225128C - mov r0, #0 - pop {r3, r4, r5, pc} -_0224FFBE: - add r0, r5, #0 - bl ov23_0224FD3C - b _0225003C -_0224FFC6: - bl ov23_022421DC - bl ov23_02254044 - ldr r0, _02250040 ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - strb r4, [r0, #4] - add r0, r4, #0 - bl ov23_0224F66C - ldr r1, _02250040 ; =0x022577B8 - ldr r2, [r1, #0] - strb r0, [r2, #5] - ldr r0, [r1, #0] - ldrb r0, [r0, #5] - cmp r0, #0x21 - bne _0224FFF6 - bl ov23_0224CD68 - ldr r0, _02250044 ; =0x00000246 - mov r1, #3 - strb r1, [r5, r0] - b _02250028 -_0224FFF6: - add r0, r5, #0 - bl ov23_0224FB7C - add r0, r5, #0 - mov r1, #1 - bl ov23_0224FBFC - ldr r0, _02250044 ; =0x00000246 - mov r1, #0x12 - strb r1, [r5, r0] - bl ov23_0224219C - ldr r2, _02250040 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541B4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x81 - add r3, r2, #0 - bl ov23_02253F60 -_02250028: - mov r1, #0 - ldr r0, [r5, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r5, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_0225003C: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250040: .word 0x022577B8 -_02250044: .word 0x00000246 - thumb_func_end ov23_0224FF58 - - thumb_func_start ov23_02250048 -ov23_02250048: ; 0x02250048 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r0, [r5, #0x50] - bl sub_02001288 - mov r1, #0x93 - add r4, r0, #0 - lsl r1, r1, #2 - ldrh r6, [r5, r1] - ldr r0, [r5, #0x50] - add r1, r5, r1 - bl sub_020014D0 - mov r0, #0x93 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - cmp r6, r0 - beq _02250072 - ldr r0, _02250110 ; =0x000005DC - bl sub_02005748 -_02250072: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02250084 - add r0, r0, #1 - cmp r4, r0 - bne _0225009E - mov r0, #0 - pop {r4, r5, r6, pc} -_02250084: - ldr r0, _02250110 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov23_0224FCF4 - add r0, r5, #0 - bl ov23_0224FDE0 - ldr r0, _02250114 ; =0x00000246 - mov r1, #5 - strb r1, [r5, r0] - b _0225010C -_0225009E: - add r0, r5, #0 - bl ov23_0224FCF4 - cmp r4, #1 - bne _022500CA - ldr r0, _02250118 ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - ldrb r0, [r0, #4] - bl ov23_0224F66C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl ov23_02243AD4 - ldr r0, _0225011C ; =0x00000631 - bl sub_02005748 - ldr r0, _02250114 ; =0x00000246 - mov r1, #3 - strb r1, [r5, r0] - b _0225010C -_022500CA: - cmp r4, #2 - bne _0225010C - ldr r0, _02250110 ; =0x000005DC - bl sub_02005748 - ldr r0, _02250118 ; =0x022577B8 - ldr r0, [r0, #0] - ldrb r0, [r0, #5] - bl ov23_0224FD68 - bl ov23_0224219C - ldr r2, _02250118 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541B4 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x82 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02250120 ; =ov23_0224FDE0 - mov r1, #5 - str r0, [r5, #0] - ldr r0, _02250124 ; =0x00000245 - strb r1, [r5, r0] - mov r1, #0xe - add r0, r0, #1 - strb r1, [r5, r0] -_0225010C: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02250110: .word 0x000005DC -_02250114: .word 0x00000246 -_02250118: .word 0x022577B8 -_0225011C: .word 0x00000631 -_02250120: .word ov23_0224FDE0 -_02250124: .word 0x00000245 - thumb_func_end ov23_02250048 - - thumb_func_start ov23_02250128 -ov23_02250128: ; 0x02250128 - push {r3, lr} - ldr r1, _02250148 ; =0x022577B8 - ldr r1, [r1, #0] - ldrb r1, [r1, #5] - cmp r1, r0 - beq _02250138 - bl sub_02022974 -_02250138: - ldr r0, _02250148 ; =0x022577B8 - ldr r1, [r0, #0] - ldr r0, [r1, #0] - ldrb r1, [r1, #4] - bl sub_02028C6C - pop {r3, pc} - nop -_02250148: .word 0x022577B8 - thumb_func_end ov23_02250128 - - thumb_func_start ov23_0225014C -ov23_0225014C: ; 0x0225014C - push {r4, lr} - add r4, r1, #0 - mov r1, #0x13 - bl sub_02001504 - mov r2, #0x81 - add r1, r0, #0 - lsl r2, r2, #2 - ldr r2, [r1, r2] - add r0, r4, #0 - blx r2 - mov r1, #1 - mvn r1, r1 - cmp r4, r1 - bne _0225016E - mov r4, #0x3d - b _02250172 -_0225016E: - add r4, r0, #0 - add r4, #0x3e -_02250172: - bl ov23_022421DC - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0225014C - - thumb_func_start ov23_02250184 -ov23_02250184: ; 0x02250184 - mov r2, #2 - ldr r1, _022501A4 ; =ov23_0224F658 - lsl r2, r2, #8 - str r1, [r0, r2] - add r1, r2, #4 - ldr r3, _022501A8 ; =ov23_0224F684 - add r2, #8 - str r3, [r0, r1] - ldr r1, _022501AC ; =ov23_0224F69C - ldr r3, _022501B0 ; =ov23_0225021C - str r1, [r0, r2] - ldr r1, _022501B4 ; =ov23_0225014C - str r1, [r0, #0x60] - ldr r1, _022501B8 ; =0x02028CD9 - bx r3 - nop -_022501A4: .word ov23_0224F658 -_022501A8: .word ov23_0224F684 -_022501AC: .word ov23_0224F69C -_022501B0: .word ov23_0225021C -_022501B4: .word ov23_0225014C -_022501B8: .word 0x02028CD9 - thumb_func_end ov23_02250184 - - thumb_func_start ov23_022501BC -ov23_022501BC: ; 0x022501BC - push {r4, lr} - add r4, r0, #0 - mov r0, #9 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #9 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r2, _02250208 ; =ov23_0224F658 - sub r0, #0x30 - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, _0225020C ; =ov23_0224F684 - sub r0, #0x2c - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, _02250210 ; =ov23_0224F69C - sub r0, #0x28 - str r2, [r4, r0] - ldr r0, _02250214 ; =ov23_0225014C - str r0, [r4, #0x60] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r1, #0x1c - strh r0, [r4, r1] - ldr r1, _02250218 ; =0x02028CD9 - add r0, r4, #0 - bl ov23_0225021C - pop {r4, pc} - nop -_02250208: .word ov23_0224F658 -_0225020C: .word ov23_0224F684 -_02250210: .word ov23_0224F69C -_02250214: .word ov23_0225014C -_02250218: .word 0x02028CD9 - thumb_func_end ov23_022501BC - - thumb_func_start ov23_0225021C -ov23_0225021C: ; 0x0225021C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - mov r2, #0x81 - add r5, r0, #0 - lsl r2, r2, #2 - str r1, [sp, #0x14] - ldr r1, [r5, r2] - str r1, [sp, #0x1c] - add r1, r2, #4 - ldr r7, [r5, r1] - sub r1, r2, #4 - ldr r1, [r5, r1] - blx r1 - add r6, r0, #0 - add r0, r5, #0 - bl ov23_0224FB7C - bl ov23_022421DC - mov r1, #0x9d - lsl r1, r1, #2 - mov r2, #0 - bl ov23_02253DFC - add r0, r6, #1 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02250364 ; =0x00000257 - add r1, #0x10 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02250368 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - bl ov23_022421DC - bl ov23_02253E3C - mov r4, #0 - str r0, [sp, #0x18] - cmp r6, #0 - ble _022502EA -_02250294: - ldr r2, [sp, #0x1c] - add r0, r4, #0 - add r1, r5, #0 - blx r2 - add r2, r0, #0 - ldr r0, [r5, #0x70] - mov r1, #2 - bl sub_0200BA94 - add r0, r4, #0 - add r1, r5, #0 - blx r7 - add r2, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x70] - mov r1, #6 - mov r3, #2 - bl sub_0200B60C - bl ov23_0224219C - bl ov23_02253E3C - ldr r2, [r5, #0x6c] - mov r1, #0x80 - bl sub_0200B1B8 - ldr r0, [r5, #0x70] - ldr r1, [r5, #0x68] - ldr r2, [r5, #0x6c] - bl sub_0200C388 - ldr r0, [r5, #0x40] - ldr r1, [r5, #0x68] - add r2, r4, #0 - bl sub_02013A6C - add r4, r4, #1 - cmp r4, r6 - blt _02250294 -_022502EA: - mov r2, #0x3c - add r3, r2, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - sub r3, #0x3e - bl sub_02013A4C - ldr r3, _0225036C ; =0x02256904 - add r2, sp, #0x20 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r6, #1 - add r2, sp, #0x20 - strh r0, [r2, #0x10] - mov r1, #6 - strh r1, [r2, #0x12] - ldr r0, [r5, #0x40] - str r0, [sp, #0x20] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x2c] - ldr r0, [r5, #0x60] - str r0, [sp, #0x24] - str r5, [sp, #0x3c] - ldrh r2, [r2, #0x10] - add r0, r5, #0 - bl ov23_02251238 - ldr r0, [sp, #0x14] - mov r2, #0x23 - str r0, [sp] - ldr r0, _02250370 ; =0x022577B8 - lsl r2, r2, #4 - ldr r0, [r0, #0] - mov r3, #4 - ldr r0, [r0, #0] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x20 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov23_02248C08 - str r0, [r5, #0x4c] - ldr r0, _02250374 ; =0x00000246 - mov r1, #6 - strb r1, [r5, r0] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02250364: .word 0x00000257 -_02250368: .word 0x000003D9 -_0225036C: .word 0x02256904 -_02250370: .word 0x022577B8 -_02250374: .word 0x00000246 - thumb_func_end ov23_0225021C - - thumb_func_start ov23_02250378 -ov23_02250378: ; 0x02250378 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - ldr r0, [r5, #0x4c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #9 - bl ov23_022430E0 - bl sub_020360F0 - cmp r0, #0 - beq _022503AA - mov r4, #1 - mvn r4, r4 -_022503AA: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022503B4 - add r4, r0, #0 -_022503B4: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _022503DE - add r0, r0, #1 - cmp r4, r0 - bne _022503E6 - ldr r0, [r5, #0x4c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r1, sp, #0 - add r2, r0, #0 - ldrh r1, [r1, #2] - add r0, r5, #0 - mov r3, #6 - bl ov23_0225128C - mov r0, #0 - pop {r3, r4, r5, pc} -_022503DE: - add r0, r5, #0 - bl ov23_0224FD3C - b _02250440 -_022503E6: - add r0, r5, #0 - bl ov23_0224FB7C - ldr r0, _02250444 ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - strb r4, [r0, #4] - add r0, r4, #0 - bl ov23_0224F684 - ldr r1, _02250444 ; =0x022577B8 - ldr r1, [r1, #0] - strb r0, [r1, #5] - add r0, r5, #0 - mov r1, #1 - bl ov23_0224FBFC - ldr r0, _02250448 ; =0x00000246 - mov r1, #0x10 - strb r1, [r5, r0] - bl ov23_0224219C - ldr r2, _02250444 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541A0 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x81 - add r3, r2, #0 - bl ov23_02253F60 - mov r1, #0 - ldr r0, [r5, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r5, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_02250440: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250444: .word 0x022577B8 -_02250448: .word 0x00000246 - thumb_func_end ov23_02250378 - - thumb_func_start ov23_0225044C -ov23_0225044C: ; 0x0225044C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r0, [r5, #0x50] - bl sub_02001288 - mov r1, #0x93 - add r4, r0, #0 - lsl r1, r1, #2 - ldrh r6, [r5, r1] - ldr r0, [r5, #0x50] - add r1, r5, r1 - bl sub_020014D0 - mov r0, #0x93 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - cmp r6, r0 - beq _02250476 - ldr r0, _0225052C ; =0x000005DC - bl sub_02005748 -_02250476: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02250488 - add r0, r0, #1 - cmp r4, r0 - bne _022504A2 - mov r0, #0 - pop {r4, r5, r6, pc} -_02250488: - ldr r0, _0225052C ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov23_0224FCF4 - add r0, r5, #0 - bl ov23_022501BC - ldr r0, _02250530 ; =0x00000246 - mov r1, #6 - strb r1, [r5, r0] - b _02250528 -_022504A2: - add r0, r5, #0 - bl ov23_0224FCF4 - cmp r4, #1 - bne _022504E6 - bl sub_0203608C - add r4, r0, #0 - bl sub_02058D88 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02058DC0 - add r4, r0, #0 - bl ov23_022421DC - bl ov23_02254044 - ldr r0, _02250534 ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - ldrb r0, [r0, #4] - bl ov23_0224F69C - add r1, r0, #0 - ldr r0, _02250534 ; =0x022577B8 - add r2, r6, #0 - ldr r0, [r0, #0] - add r3, r4, #0 - ldrb r0, [r0, #5] - bl ov23_02241AE8 - b _02250518 -_022504E6: - cmp r4, #2 - bne _02250518 - ldr r0, _0225052C ; =0x000005DC - bl sub_02005748 - ldr r0, _02250534 ; =0x022577B8 - ldr r0, [r0, #0] - ldrb r0, [r0, #5] - bl ov23_02250128 - bl ov23_0224219C - ldr r2, _02250534 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541A0 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x82 - add r3, r2, #0 - bl ov23_02253F40 -_02250518: - ldr r0, _02250538 ; =ov23_022501BC - mov r1, #6 - str r0, [r5, #0] - ldr r0, _0225053C ; =0x00000245 - strb r1, [r5, r0] - mov r1, #0xe - add r0, r0, #1 - strb r1, [r5, r0] -_02250528: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225052C: .word 0x000005DC -_02250530: .word 0x00000246 -_02250534: .word 0x022577B8 -_02250538: .word ov23_022501BC -_0225053C: .word 0x00000245 - thumb_func_end ov23_0225044C - - thumb_func_start ov23_02250540 -ov23_02250540: ; 0x02250540 - push {r4, lr} - add r4, r1, #0 - mov r1, #0x13 - bl sub_02001504 - mov r2, #0x81 - add r1, r0, #0 - lsl r2, r2, #2 - ldr r2, [r1, r2] - add r0, r4, #0 - blx r2 - mov r1, #1 - mvn r1, r1 - cmp r4, r1 - bne _02250562 - mov r4, #0x3d - b _02250566 -_02250562: - add r4, r0, #0 - add r4, #0x3e -_02250566: - bl ov23_022421DC - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02250540 - - thumb_func_start ov23_02250578 -ov23_02250578: ; 0x02250578 - mov r1, #2 - ldr r2, _0225058C ; =ov23_0224F6B4 - lsl r1, r1, #8 - str r2, [r0, r1] - ldr r2, _02250590 ; =ov23_0224F6C8 - add r1, r1, #4 - str r2, [r0, r1] - ldr r3, _02250594 ; =ov23_022505EC - mov r1, #0 - bx r3 - ; .align 2, 0 -_0225058C: .word ov23_0224F6B4 -_02250590: .word ov23_0224F6C8 -_02250594: .word ov23_022505EC - thumb_func_end ov23_02250578 - - thumb_func_start ov23_02250598 -ov23_02250598: ; 0x02250598 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xb - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r2, _022505DC ; =ov23_0224F6B4 - sub r0, #0x30 - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, _022505E0 ; =ov23_0224F6C8 - sub r0, #0x2c - str r2, [r4, r0] - ldr r0, _022505E4 ; =ov23_02250540 - str r0, [r4, #0x60] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r1, #0x1c - strh r0, [r4, r1] - ldr r1, _022505E8 ; =0x02028DD9 - add r0, r4, #0 - bl ov23_022505EC - pop {r4, pc} - nop -_022505DC: .word ov23_0224F6B4 -_022505E0: .word ov23_0224F6C8 -_022505E4: .word ov23_02250540 -_022505E8: .word 0x02028DD9 - thumb_func_end ov23_02250598 - - thumb_func_start ov23_022505EC -ov23_022505EC: ; 0x022505EC - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r1, [sp, #0x14] - mov r1, #0x81 - add r5, r0, #0 - lsl r1, r1, #2 - ldr r7, [r5, r1] - sub r1, r1, #4 - ldr r1, [r5, r1] - blx r1 - add r6, r0, #0 - add r0, r5, #0 - bl ov23_0224FB7C - bl ov23_022421DC - mov r1, #0x9d - lsl r1, r1, #2 - mov r2, #0 - bl ov23_02253DFC - add r0, r6, #1 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _022506F0 ; =0x00000257 - add r1, #0x10 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _022506F4 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - bl ov23_022421DC - bl ov23_02253E3C - mov r4, #0 - str r0, [sp, #0x18] - cmp r6, #0 - ble _02250676 -_0225065E: - add r0, r4, #0 - add r1, r5, #0 - blx r7 - add r2, r0, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, r6 - blt _0225065E -_02250676: - mov r2, #0x3c - add r3, r2, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - sub r3, #0x3e - bl sub_02013A4C - ldr r3, _022506F8 ; =0x02256904 - add r2, sp, #0x1c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r6, #1 - add r2, sp, #0x1c - strh r0, [r2, #0x10] - mov r1, #6 - strh r1, [r2, #0x12] - ldr r0, [r5, #0x40] - str r0, [sp, #0x1c] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x28] - ldr r0, [r5, #0x60] - str r0, [sp, #0x20] - str r5, [sp, #0x38] - ldrh r2, [r2, #0x10] - add r0, r5, #0 - bl ov23_02251238 - ldr r0, [sp, #0x14] - mov r2, #0x23 - str r0, [sp] - ldr r0, _022506FC ; =0x022577B8 - lsl r2, r2, #4 - ldr r0, [r0, #0] - mov r3, #4 - ldr r0, [r0, #0] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x1c - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov23_02248C08 - str r0, [r5, #0x4c] - ldr r0, _02250700 ; =0x00000246 - mov r1, #7 - strb r1, [r5, r0] - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022506F0: .word 0x00000257 -_022506F4: .word 0x000003D9 -_022506F8: .word 0x02256904 -_022506FC: .word 0x022577B8 -_02250700: .word 0x00000246 - thumb_func_end ov23_022505EC - - thumb_func_start ov23_02250704 -ov23_02250704: ; 0x02250704 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - ldr r0, [r5, #0x4c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #0xb - bl ov23_022430E0 - bl sub_020360F0 - cmp r0, #0 - beq _02250736 - mov r4, #1 - mvn r4, r4 -_02250736: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _02250740 - add r4, r0, #0 -_02250740: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0225076A - add r0, r0, #1 - cmp r4, r0 - bne _02250772 - ldr r0, [r5, #0x4c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r1, sp, #0 - add r2, r0, #0 - ldrh r1, [r1, #2] - add r0, r5, #0 - mov r3, #6 - bl ov23_0225128C - mov r0, #0 - pop {r3, r4, r5, pc} -_0225076A: - add r0, r5, #0 - bl ov23_0224FD3C - b _022507CC -_02250772: - add r0, r5, #0 - bl ov23_0224FB7C - ldr r0, _022507D0 ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - strb r4, [r0, #4] - add r0, r4, #0 - bl ov23_0224F6C8 - ldr r1, _022507D0 ; =0x022577B8 - ldr r1, [r1, #0] - strb r0, [r1, #5] - add r0, r5, #0 - mov r1, #3 - bl ov23_0224FBFC - bl ov23_0224219C - ldr r2, _022507D0 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541A0 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x81 - add r3, r2, #0 - bl ov23_02253F60 - ldr r0, _022507D4 ; =0x00000246 - mov r1, #0x11 - strb r1, [r5, r0] - mov r1, #0 - ldr r0, [r5, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r5, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_022507CC: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022507D0: .word 0x022577B8 -_022507D4: .word 0x00000246 - thumb_func_end ov23_02250704 - - thumb_func_start ov23_022507D8 -ov23_022507D8: ; 0x022507D8 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r0, [r5, #0x50] - bl sub_02001288 - mov r1, #0x93 - add r4, r0, #0 - lsl r1, r1, #2 - ldrh r6, [r5, r1] - ldr r0, [r5, #0x50] - add r1, r5, r1 - bl sub_020014D0 - mov r0, #0x93 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - cmp r6, r0 - beq _02250802 - ldr r0, _0225091C ; =0x000005DC - bl sub_02005748 -_02250802: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02250814 - add r0, r0, #1 - cmp r4, r0 - bne _0225082E - mov r0, #0 - pop {r4, r5, r6, pc} -_02250814: - ldr r0, _0225091C ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov23_0224FCF4 - add r0, r5, #0 - bl ov23_02250598 - ldr r0, _02250920 ; =0x00000246 - mov r1, #7 - strb r1, [r5, r0] - b _02250916 -_0225082E: - add r0, r5, #0 - bl ov23_0224FCF4 - cmp r4, #3 - bne _022508D2 - ldr r0, _02250924 ; =0x022577B8 - ldr r0, [r0, #0] - ldrb r0, [r0, #5] - bl sub_02028938 - add r4, r0, #0 - ldr r0, [r5, #0xc] - ldr r0, [r0, #0xc] - bl sub_0207D990 - add r6, r0, #0 - ldr r0, _0225091C ; =0x000005DC - bl sub_02005748 - lsl r1, r4, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - mov r2, #1 - mov r3, #4 - bl sub_0207D570 - cmp r0, #0 - beq _022508B2 - ldr r0, _02250924 ; =0x022577B8 - ldr r1, [r0, #0] - ldr r0, [r1, #0] - ldrb r1, [r1, #4] - bl sub_02028D80 - bl ov23_0224219C - ldr r2, _02250924 ; =0x022577B8 - mov r1, #0 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541A0 - ldr r0, _02250924 ; =0x022577B8 - ldr r0, [r0, #0] - ldrb r0, [r0, #5] - add r0, #0xe3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bhi _022508A2 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x51 - add r3, r2, #0 - bl ov23_02253F40 - b _02250906 -_022508A2: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x4f - add r3, r2, #0 - bl ov23_02253F40 - b _02250906 -_022508B2: - bl ov23_0224219C - ldr r2, _02250924 ; =0x022577B8 - mov r1, #0 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541A0 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x50 - add r3, r2, #0 - bl ov23_02253F40 - b _02250906 -_022508D2: - cmp r4, #2 - bne _02250906 - ldr r0, _0225091C ; =0x000005DC - bl sub_02005748 - ldr r0, _02250924 ; =0x022577B8 - ldr r1, [r0, #0] - ldr r0, [r1, #0] - ldrb r1, [r1, #4] - bl sub_02028D80 - bl ov23_0224219C - ldr r2, _02250924 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541A0 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x82 - add r3, r2, #0 - bl ov23_02253F40 -_02250906: - ldr r0, _02250928 ; =ov23_02250598 - mov r1, #7 - str r0, [r5, #0] - ldr r0, _0225092C ; =0x00000245 - strb r1, [r5, r0] - mov r1, #0xe - add r0, r0, #1 - strb r1, [r5, r0] -_02250916: - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_0225091C: .word 0x000005DC -_02250920: .word 0x00000246 -_02250924: .word 0x022577B8 -_02250928: .word ov23_02250598 -_0225092C: .word 0x00000245 - thumb_func_end ov23_022507D8 - - thumb_func_start ov23_02250930 -ov23_02250930: ; 0x02250930 - ldr r1, _02250938 ; =0x00000246 - mov r2, #2 - strb r2, [r0, r1] - bx lr - ; .align 2, 0 -_02250938: .word 0x00000246 - thumb_func_end ov23_02250930 - - thumb_func_start ov23_0225093C -ov23_0225093C: ; 0x0225093C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov23_0224FB7C - ldr r0, [r5, #0xc] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #0xc] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02242E58 - cmp r0, #0 - beq _02250978 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x42 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02250994 ; =0x00000246 - mov r1, #0xd - strb r1, [r5, r0] - pop {r3, r4, r5, pc} -_02250978: - bl ov23_0224219C - mov r2, #0 - mov r1, #0x34 - add r3, r2, #0 - bl ov23_02253F40 - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xb - add r1, #0x1e - strb r0, [r5, r1] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250994: .word 0x00000246 - thumb_func_end ov23_0225093C - - thumb_func_start ov23_02250998 -ov23_02250998: ; 0x02250998 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _022509C4 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0xc] - ldr r1, _022509C8 ; =0x022568D8 - ldr r0, [r0, #8] - ldr r2, _022509CC ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x5c] - ldr r0, _022509D0 ; =0x00000246 - mov r1, #0xc - strb r1, [r4, r0] -_022509C4: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_022509C8: .word 0x022568D8 -_022509CC: .word 0x000003D9 -_022509D0: .word 0x00000246 - thumb_func_end ov23_02250998 - - thumb_func_start ov23_022509D4 -ov23_022509D4: ; 0x022509D4 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x5c] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02250A06 - cmp r0, #0 - bne _022509F4 - ldr r0, _02250A08 ; =0x00000246 - mov r1, #0xf - strb r1, [r4, r0] - b _02250A02 -_022509F4: - bl ov23_0224219C - bl ov23_02254044 - add r0, r4, #0 - bl ov23_0224FD3C -_02250A02: - mov r0, #0 - str r0, [r4, #0x5c] -_02250A06: - pop {r4, pc} - ; .align 2, 0 -_02250A08: .word 0x00000246 - thumb_func_end ov23_022509D4 - - thumb_func_start ov23_02250A0C -ov23_02250A0C: ; 0x02250A0C - ldr r3, _02250A10 ; =ov23_0224FD3C - bx r3 - ; .align 2, 0 -_02250A10: .word ov23_0224FD3C - thumb_func_end ov23_02250A0C - - thumb_func_start ov23_02250A14 -ov23_02250A14: ; 0x02250A14 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl ov23_0224FB7C - bl ov23_02253968 - ldr r0, [r4, #0xc] - bl sub_0203D174 - bl sub_02025E38 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [r4, #0xc] - ldr r2, _02250A48 ; =ov23_02250A0C - ldr r0, [r0, #8] - add r3, r4, #0 - bl ov23_02253834 - ldr r0, _02250A4C ; =0x00000246 - mov r1, #0xa - strb r1, [r4, r0] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02250A48: .word ov23_02250A0C -_02250A4C: .word 0x00000246 - thumb_func_end ov23_02250A14 - - thumb_func_start ov23_02250A50 -ov23_02250A50: ; 0x02250A50 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x25 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x25 - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x7f - str r6, [r4, #0xc] - lsl r0, r0, #2 - str r5, [r4, r0] - mov r1, #0 - add r0, #0x4a - strb r1, [r4, r0] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x68] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x6c] - mov r0, #4 - bl sub_0200B358 - str r0, [r4, #0x70] - bl sub_020594FC - bl ov23_022421AC - mov r1, #0 - add r2, r1, #0 - add r3, r1, #0 - bl ov23_02253F40 - ldr r0, _02250AC0 ; =ov23_02250B9C - ldr r2, _02250AC4 ; =0x00002710 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r1, [r4, #4] - ldr r2, _02250AC8 ; =ov23_02251270 - add r0, r4, #0 - bl ov23_022431EC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02250AC0: .word ov23_02250B9C -_02250AC4: .word 0x00002710 -_02250AC8: .word ov23_02251270 - thumb_func_end ov23_02250A50 - - thumb_func_start ov23_02250ACC -ov23_02250ACC: ; 0x02250ACC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl ov23_022421AC - bl ov23_02254238 - cmp r0, #0 - bne _02250AF8 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0xc] - ldr r1, _02250AFC ; =0x022568D8 - ldr r0, [r0, #8] - ldr r2, _02250B00 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x5c] - ldr r0, _02250B04 ; =0x00000246 - mov r1, #1 - strb r1, [r4, r0] -_02250AF8: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02250AFC: .word 0x022568D8 -_02250B00: .word 0x000003D9 -_02250B04: .word 0x00000246 - thumb_func_end ov23_02250ACC - - thumb_func_start ov23_02250B08 -ov23_02250B08: ; 0x02250B08 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x5c] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02250B2E - cmp r0, #0 - bne _02250B24 - mov r1, #3 - b _02250B26 -_02250B24: - mov r1, #2 -_02250B26: - ldr r0, _02250B30 ; =0x00000246 - strb r1, [r4, r0] - mov r0, #0 - str r0, [r4, #0x5c] -_02250B2E: - pop {r4, pc} - ; .align 2, 0 -_02250B30: .word 0x00000246 - thumb_func_end ov23_02250B08 - - thumb_func_start ov23_02250B34 -ov23_02250B34: ; 0x02250B34 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x5c] - add r4, r2, #0 - cmp r0, #0 - beq _02250B48 - mov r1, #4 - bl sub_02002154 -_02250B48: - ldr r0, [r5, #0x68] - bl sub_020237BC - ldr r0, [r5, #0x6c] - bl sub_020237BC - ldr r0, [r5, #0x70] - bl sub_0200B3F0 - bl ov23_022421AC - bl ov23_02254044 - bl ov23_0224219C - bl ov23_02254044 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - beq _02250B78 - mov r0, #0 - blx r1 -_02250B78: - mov r0, #0 - str r0, [r5, #4] - ldr r0, [r5, #8] - cmp r0, #0 - beq _02250B86 - bl sub_0206A844 -_02250B86: - add r0, r5, #0 - bl sub_020181C4 - cmp r4, #0 - bne _02250B94 - bl sub_02059514 -_02250B94: - add r0, r6, #0 - bl sub_0200DA58 - pop {r4, r5, r6, pc} - thumb_func_end ov23_02250B34 - - thumb_func_start ov23_02250B9C -ov23_02250B9C: ; 0x02250B9C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_0203608C - bl ov23_0224AEA4 - cmp r0, #0 - bne _02250BBA - ldr r0, _02250C34 ; =0x00000246 - ldrb r1, [r4, r0] - cmp r1, #1 - bhi _02250BBA - mov r1, #2 - strb r1, [r4, r0] -_02250BBA: - ldr r0, _02250C34 ; =0x00000246 - ldrb r0, [r4, r0] - cmp r0, #4 - bhi _02250C32 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02250BCE: ; jump table - .short _02250BD8 - _02250BCE - 2 ; case 0 - .short _02250BE0 - _02250BCE - 2 ; case 1 - .short _02250BE8 - _02250BCE - 2 ; case 2 - .short _02250BF8 - _02250BCE - 2 ; case 3 - .short _02250C16 - _02250BCE - 2 ; case 4 -_02250BD8: - add r0, r4, #0 - bl ov23_02250ACC - pop {r3, r4, r5, pc} -_02250BE0: - add r0, r4, #0 - bl ov23_02250B08 - pop {r3, r4, r5, pc} -_02250BE8: - bl ov23_02243204 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov23_02250B34 - pop {r3, r4, r5, pc} -_02250BF8: - bl ov23_02243204 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov23_02250B34 - mov r1, #0 - add r0, sp, #0 - strb r1, [r0] - mov r0, #0x54 - add r1, sp, #0 - bl sub_020360D0 - pop {r3, r4, r5, pc} -_02250C16: - bl ov23_022421AC - bl ov23_02254238 - cmp r0, #0 - bne _02250C32 - ldr r0, _02250C38 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _02250C32 - ldr r0, _02250C34 ; =0x00000246 - mov r1, #2 - strb r1, [r4, r0] -_02250C32: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02250C34: .word 0x00000246 -_02250C38: .word 0x021BF67C - thumb_func_end ov23_02250B9C - - thumb_func_start ov23_02250C3C -ov23_02250C3C: ; 0x02250C3C - push {r4, lr} - add r4, r1, #0 - mov r1, #0x13 - bl sub_02001504 - mov r2, #0x81 - add r1, r0, #0 - lsl r2, r2, #2 - ldr r2, [r1, r2] - add r0, r4, #0 - blx r2 - mov r1, #1 - mvn r1, r1 - cmp r4, r1 - bne _02250C5E - mov r4, #0x8b - b _02250C62 -_02250C5E: - add r4, r0, #0 - add r4, #0x8a -_02250C62: - bl ov23_022421DC - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02250C3C - - thumb_func_start ov23_02250C74 -ov23_02250C74: ; 0x02250C74 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x13 - add r5, r0, #0 - bl sub_02001504 - ldr r0, [r0, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r4, #0 - bl sub_02028AFC - cmp r0, #0 - bne _02250CA2 - add r0, r5, #0 - mov r1, #1 - mov r2, #0xf - mov r3, #2 - bl sub_0200147C - pop {r3, r4, r5, pc} -_02250CA2: - mov r1, #2 - add r0, r5, #0 - mov r2, #0xf - add r3, r1, #0 - bl sub_0200147C - pop {r3, r4, r5, pc} - thumb_func_end ov23_02250C74 - - thumb_func_start ov23_02250CB0 -ov23_02250CB0: ; 0x02250CB0 - mov r1, #2 - ldr r2, _02250CC8 ; =ov23_0224F608 - lsl r1, r1, #8 - str r2, [r0, r1] - ldr r2, _02250CCC ; =ov23_0224F61C - add r1, r1, #4 - str r2, [r0, r1] - mov r1, #0 - ldr r3, _02250CD0 ; =ov23_02250D90 - str r1, [r0, #0x64] - bx r3 - nop -_02250CC8: .word ov23_0224F608 -_02250CCC: .word ov23_0224F61C -_02250CD0: .word ov23_02250D90 - thumb_func_end ov23_02250CB0 - - thumb_func_start ov23_02250CD4 -ov23_02250CD4: ; 0x02250CD4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xa - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xa - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r2, _02250D1C ; =ov23_0224F608 - sub r0, #0x30 - str r2, [r4, r0] - add r0, r1, #0 - ldr r2, _02250D20 ; =ov23_0224F61C - sub r0, #0x2c - str r2, [r4, r0] - ldr r0, _02250D24 ; =ov23_02250C3C - str r0, [r4, #0x60] - mov r0, #0 - str r0, [r4, #0x64] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r1, #0x1c - strh r0, [r4, r1] - ldr r1, _02250D28 ; =0x02028BE9 - add r0, r4, #0 - bl ov23_02250D90 - pop {r4, pc} - nop -_02250D1C: .word ov23_0224F608 -_02250D20: .word ov23_0224F61C -_02250D24: .word ov23_02250C3C -_02250D28: .word 0x02028BE9 - thumb_func_end ov23_02250CD4 - - thumb_func_start ov23_02250D2C -ov23_02250D2C: ; 0x02250D2C - mov r1, #2 - ldr r2, _02250D48 ; =ov23_0224F608 - lsl r1, r1, #8 - str r2, [r0, r1] - ldr r2, _02250D4C ; =ov23_0224F61C - add r1, r1, #4 - str r2, [r0, r1] - ldr r1, _02250D50 ; =ov23_02250C3C - ldr r3, _02250D54 ; =ov23_02250D90 - str r1, [r0, #0x60] - mov r1, #0 - str r1, [r0, #0x64] - ldr r1, _02250D58 ; =0x02028BE9 - bx r3 - ; .align 2, 0 -_02250D48: .word ov23_0224F608 -_02250D4C: .word ov23_0224F61C -_02250D50: .word ov23_02250C3C -_02250D54: .word ov23_02250D90 -_02250D58: .word 0x02028BE9 - thumb_func_end ov23_02250D2C - - thumb_func_start ov23_02250D5C -ov23_02250D5C: ; 0x02250D5C - mov r1, #2 - ldr r2, _02250D78 ; =ov23_0224F5DC - lsl r1, r1, #8 - str r2, [r0, r1] - ldr r2, _02250D7C ; =ov23_0224F5F0 - add r1, r1, #4 - str r2, [r0, r1] - ldr r1, _02250D80 ; =ov23_02250C3C - ldr r3, _02250D84 ; =ov23_02250D90 - str r1, [r0, #0x60] - ldr r1, _02250D88 ; =ov23_02250C74 - str r1, [r0, #0x64] - ldr r1, _02250D8C ; =0x02028A11 - bx r3 - ; .align 2, 0 -_02250D78: .word ov23_0224F5DC -_02250D7C: .word ov23_0224F5F0 -_02250D80: .word ov23_02250C3C -_02250D84: .word ov23_02250D90 -_02250D88: .word ov23_02250C74 -_02250D8C: .word 0x02028A11 - thumb_func_end ov23_02250D5C - - thumb_func_start ov23_02250D90 -ov23_02250D90: ; 0x02250D90 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r1, [sp, #0x14] - mov r1, #0x81 - add r5, r0, #0 - lsl r1, r1, #2 - ldr r7, [r5, r1] - sub r1, r1, #4 - ldr r1, [r5, r1] - blx r1 - add r6, r0, #0 - add r0, r5, #0 - bl ov23_0224FB7C - bl ov23_022421DC - ldr r1, _02250E94 ; =0x00000272 - mov r2, #0 - bl ov23_02253DFC - add r0, r6, #1 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02250E98 ; =0x00000257 - add r1, #0x10 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02250E9C ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - bl ov23_022421DC - bl ov23_02253E3C - mov r4, #0 - str r0, [sp, #0x18] - cmp r6, #0 - ble _02250E18 -_02250E00: - add r0, r4, #0 - add r1, r5, #0 - blx r7 - add r2, r0, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, r6 - blt _02250E00 -_02250E18: - mov r2, #0 - ldr r0, [r5, #0x40] - ldr r1, [sp, #0x18] - sub r3, r2, #2 - bl sub_02013A4C - ldr r3, _02250EA0 ; =0x02256904 - add r2, sp, #0x1c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r6, #1 - add r2, sp, #0x1c - strh r0, [r2, #0x10] - mov r1, #6 - strh r1, [r2, #0x12] - ldr r0, [r5, #0x64] - str r0, [sp, #0x24] - ldr r0, [r5, #0x40] - str r0, [sp, #0x1c] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x28] - ldr r0, [r5, #0x60] - str r0, [sp, #0x20] - str r5, [sp, #0x38] - ldrh r2, [r2, #0x10] - add r0, r5, #0 - bl ov23_02251238 - ldr r0, [sp, #0x14] - mov r2, #0x23 - str r0, [sp] - ldr r0, _02250EA4 ; =0x022577B8 - lsl r2, r2, #4 - ldr r0, [r0, #0] - mov r3, #4 - ldr r0, [r0, #0] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x1c - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov23_02248C08 - str r0, [r5, #0x4c] - ldr r0, _02250EA8 ; =0x00000246 - mov r1, #8 - strb r1, [r5, r0] - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02250E94: .word 0x00000272 -_02250E98: .word 0x00000257 -_02250E9C: .word 0x000003D9 -_02250EA0: .word 0x02256904 -_02250EA4: .word 0x022577B8 -_02250EA8: .word 0x00000246 - thumb_func_end ov23_02250D90 - - thumb_func_start ov23_02250EAC -ov23_02250EAC: ; 0x02250EAC - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - ldr r0, [r5, #0x4c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #0xa - bl ov23_022430E0 - bl sub_020360F0 - cmp r0, #0 - beq _02250EDE - mov r4, #1 - mvn r4, r4 -_02250EDE: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _02250EE8 - add r4, r0, #0 -_02250EE8: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02250F12 - add r0, r0, #1 - cmp r4, r0 - bne _02250F20 - ldr r0, [r5, #0x4c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r1, sp, #0 - add r2, r0, #0 - ldrh r1, [r1, #2] - add r0, r5, #0 - mov r3, #6 - bl ov23_0225128C - mov r0, #0 - pop {r3, r4, r5, pc} -_02250F12: - ldr r0, _02250F80 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov23_0224FD3C - b _02250F7A -_02250F20: - add r0, r5, #0 - bl ov23_0224FB7C - ldr r0, _02250F84 ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - strb r4, [r0, #4] - add r0, r4, #0 - bl ov23_0224F61C - ldr r1, _02250F84 ; =0x022577B8 - ldr r1, [r1, #0] - strb r0, [r1, #5] - add r0, r5, #0 - mov r1, #2 - bl ov23_0224FBFC - bl ov23_0224219C - ldr r2, _02250F84 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541C8 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x81 - add r3, r2, #0 - bl ov23_02253F60 - ldr r0, _02250F88 ; =0x00000246 - mov r1, #0x13 - strb r1, [r5, r0] - mov r1, #0 - ldr r0, [r5, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r5, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_02250F7A: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_02250F80: .word 0x000005DC -_02250F84: .word 0x022577B8 -_02250F88: .word 0x00000246 - thumb_func_end ov23_02250EAC - - thumb_func_start ov23_02250F8C -ov23_02250F8C: ; 0x02250F8C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r0, [r5, #0x50] - bl sub_02001288 - mov r1, #0x93 - add r4, r0, #0 - lsl r1, r1, #2 - ldrh r6, [r5, r1] - ldr r0, [r5, #0x50] - add r1, r5, r1 - bl sub_020014D0 - mov r0, #0x93 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - cmp r6, r0 - beq _02250FB6 - ldr r0, _02251030 ; =0x000005DC - bl sub_02005748 -_02250FB6: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02250FC8 - add r0, r0, #1 - cmp r4, r0 - bne _02250FE2 - mov r0, #0 - pop {r4, r5, r6, pc} -_02250FC8: - ldr r0, _02251030 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov23_0224FCF4 - add r0, r5, #0 - bl ov23_02250CD4 - ldr r0, _02251034 ; =0x00000246 - mov r1, #8 - strb r1, [r5, r0] - b _0225102C -_02250FE2: - add r0, r5, #0 - bl ov23_0224FCF4 - cmp r4, #2 - bne _0225101C - ldr r0, _02251030 ; =0x000005DC - bl sub_02005748 - ldr r0, _02251038 ; =0x022577B8 - ldr r1, [r0, #0] - ldr r0, [r1, #0] - ldrb r1, [r1, #4] - bl sub_02028B94 - bl ov23_0224219C - ldr r2, _02251038 ; =0x022577B8 - mov r1, #2 - ldr r2, [r2, #0] - ldrb r2, [r2, #5] - bl ov23_022541C8 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x82 - add r3, r2, #0 - bl ov23_02253F40 -_0225101C: - ldr r0, _0225103C ; =ov23_02250CD4 - mov r1, #8 - str r0, [r5, #0] - ldr r0, _02251040 ; =0x00000245 - strb r1, [r5, r0] - mov r1, #0xe - add r0, r0, #1 - strb r1, [r5, r0] -_0225102C: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02251030: .word 0x000005DC -_02251034: .word 0x00000246 -_02251038: .word 0x022577B8 -_0225103C: .word ov23_02250CD4 -_02251040: .word 0x00000245 - thumb_func_end ov23_02250F8C - - thumb_func_start ov23_02251044 -ov23_02251044: ; 0x02251044 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov23_0224FB7C - bl ov23_02242FBC - bl ov23_022535EC - bl ov23_02245784 - bl ov23_02241364 - bl ov23_02241ED0 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02251070 - bl ov23_02253D10 -_02251070: - ldr r0, [r5, #0x5c] - cmp r0, #0 - beq _0225107C - mov r1, #4 - bl sub_02002154 -_0225107C: - add r0, r5, #0 - bl ov23_0224FCF4 - ldr r0, [r5, #8] - cmp r0, #0 - beq _0225108C - bl sub_0206A844 -_0225108C: - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _022510BC - ldr r0, _022510EC ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - strb r4, [r0, #4] - add r0, r4, #0 - bl ov23_0224F61C - ldr r1, _022510EC ; =0x022577B8 - ldr r1, [r1, #0] - strb r0, [r1, #5] - mov r1, #0x7f - lsl r1, r1, #2 - ldr r1, [r5, r1] - mov r0, #0 - blx r1 - mov r0, #0x7f - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_022510BC: - ldr r0, [r5, #0x68] - cmp r0, #0 - beq _022510C6 - bl sub_020237BC -_022510C6: - ldr r0, [r5, #0x6c] - cmp r0, #0 - beq _022510D0 - bl sub_020237BC -_022510D0: - ldr r0, [r5, #0x70] - cmp r0, #0 - beq _022510DA - bl sub_0200B3F0 -_022510DA: - ldr r0, [r5, #4] - cmp r0, #0 - beq _022510E4 - bl sub_0200DA58 -_022510E4: - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022510EC: .word 0x022577B8 - thumb_func_end ov23_02251044 - - thumb_func_start ov23_022510F0 -ov23_022510F0: ; 0x022510F0 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - bl sub_020360F0 - cmp r0, #0 - beq _02251108 - mov r4, #1 - mvn r4, r4 -_02251108: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _02251112 - add r4, r0, #0 -_02251112: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02251124 - add r0, r0, #1 - cmp r4, r0 - bne _02251162 - mov r0, #0 - pop {r3, r4, r5, pc} -_02251124: - mov r1, #0x7f - lsl r1, r1, #2 - ldr r0, [r5, r1] - cmp r0, #0 - beq _0225114A - ldr r0, _022511AC ; =0x022577B8 - mov r3, #0 - ldr r2, [r0, #0] - strb r4, [r2, #4] - ldr r2, [r0, #0] - strb r3, [r2, #5] - ldr r0, [r0, #0] - ldr r1, [r5, r1] - ldrb r0, [r0, #5] - blx r1 - mov r0, #0x7f - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_0225114A: - bl ov23_022421DC - bl ov23_02254044 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02251044 - bl ov23_02243204 - mov r0, #1 - pop {r3, r4, r5, pc} -_02251162: - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02251194 - ldr r0, _022511AC ; =0x022577B8 - add r1, r5, #0 - ldr r0, [r0, #0] - strb r4, [r0, #4] - add r0, r4, #0 - bl ov23_0224F61C - ldr r1, _022511AC ; =0x022577B8 - ldr r2, [r1, #0] - strb r0, [r2, #5] - ldr r0, [r1, #0] - mov r1, #0x7f - lsl r1, r1, #2 - ldrb r0, [r0, #5] - ldr r1, [r5, r1] - blx r1 - mov r0, #0x7f - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_02251194: - bl ov23_022421DC - bl ov23_02254044 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02251044 - bl ov23_02243204 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022511AC: .word 0x022577B8 - thumb_func_end ov23_022510F0 - - thumb_func_start ov23_022511B0 -ov23_022511B0: ; 0x022511B0 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x25 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x25 - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x7f - lsl r0, r0, #2 - str r6, [r4, #0xc] - add r1, r0, #0 - str r5, [r4, r0] - mov r2, #0 - add r1, #0x4a - strb r2, [r4, r1] - sub r0, r0, #4 - str r2, [r4, r0] - str r2, [r4, #0x48] - str r2, [r4, #0x60] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x68] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x6c] - mov r0, #4 - bl sub_0200B358 - str r0, [r4, #0x70] - add r0, r4, #0 - bl ov23_02250CD4 - ldr r0, _02251228 ; =0x00000246 - mov r1, #9 - strb r1, [r4, r0] - ldr r0, _0225122C ; =ov23_0224F914 - ldr r2, _02251230 ; =0x00002710 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r1, [r4, #4] - ldr r2, _02251234 ; =ov23_02251270 - add r0, r4, #0 - bl ov23_022431EC - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_02251228: .word 0x00000246 -_0225122C: .word ov23_0224F914 -_02251230: .word 0x00002710 -_02251234: .word ov23_02251270 - thumb_func_end ov23_022511B0 - - thumb_func_start ov23_02251238 -ov23_02251238: ; 0x02251238 - push {r3, r4} - mov r3, #0x23 - lsl r3, r3, #4 - ldr r4, [r0, r3] - add r4, r4, r1 - cmp r4, r2 - blt _02251254 - sub r1, r2, r1 - str r1, [r0, r3] - ldr r1, [r0, r3] - cmp r1, #0 - bge _02251254 - mov r1, #0 - str r1, [r0, r3] -_02251254: - mov r1, #0x8b - lsl r1, r1, #2 - ldr r3, [r0, r1] - sub r2, r2, #1 - cmp r3, r2 - blt _0225126C - str r2, [r0, r1] - ldr r2, [r0, r1] - cmp r2, #0 - bge _0225126C - mov r2, #0 - str r2, [r0, r1] -_0225126C: - pop {r3, r4} - bx lr - thumb_func_end ov23_02251238 - - thumb_func_start ov23_02251270 -ov23_02251270: ; 0x02251270 - push {r4, lr} - add r4, r1, #0 - mov r1, #1 - mov r0, #0 - add r2, r1, #0 - bl sub_0200AB4C - mov r1, #1 - add r0, r4, #0 - mvn r1, r1 - bl ov23_02251044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02251270 - - thumb_func_start ov23_0225128C -ov23_0225128C: ; 0x0225128C - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r7, r3, #0 - add r5, r0, #0 - add r4, r1, #0 - cmp r6, r7 - ble _022512D2 - cmp r4, #0 - ldr r0, [r5, #8] - beq _022512AA - mov r1, #0 - mov r2, #1 - bl sub_0206A8C4 - b _022512B2 -_022512AA: - mov r1, #0 - add r2, r1, #0 - bl sub_0206A8C4 -_022512B2: - add r0, r4, r7 - cmp r6, r0 - ldr r0, [r5, #8] - beq _022512C4 - mov r1, #1 - add r2, r1, #0 - bl sub_0206A8C4 - b _022512CC -_022512C4: - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_022512CC: - ldr r0, [r5, #8] - bl sub_0206A870 -_022512D2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_0225128C - - thumb_func_start ov23_022512D4 -ov23_022512D4: ; 0x022512D4 - ldrh r2, [r0] - ldrh r3, [r0, #2] - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - beq _022512E8 - cmp r1, #0 - beq _022512E8 - mov r0, #0xff - bx lr -_022512E8: - cmp r3, #0xc - bne _022512F0 - mov r3, #0 - b _022512FC -_022512F0: - cmp r3, #0x2c - bne _022512F8 - mov r3, #8 - b _022512FC -_022512F8: - mov r0, #0xff - bx lr -_022512FC: - add r0, r2, #0 - sub r0, #0xf - cmp r0, #1 - bhi _02251308 - mov r0, #0 - bx lr -_02251308: - mov r1, #0 -_0225130A: - add r0, r2, #0 - sub r0, #0x2f - cmp r0, #1 - bhi _02251316 - add r0, r1, r3 - bx lr -_02251316: - add r1, r1, #1 - sub r2, #0x20 - cmp r1, #8 - blt _0225130A - mov r0, #0xff - bx lr - ; .align 2, 0 - thumb_func_end ov23_022512D4 - - thumb_func_start ov23_02251324 -ov23_02251324: ; 0x02251324 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl sub_02058F80 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_022512D4 - add r4, r0, #0 - bl sub_02058F50 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02251346 - mov r4, #0xff -_02251346: - cmp r4, #0xff - beq _022513A0 - add r0, r5, #0 - mov r1, #0 - bl sub_02059058 - add r0, sp, #0 - strb r4, [r0, #2] - strb r5, [r0, #1] - mov r1, #0 - strb r1, [r0, #3] - cmp r4, r5 - beq _02251372 - add r0, r5, #0 - bl ov23_0224AEA4 - cmp r0, #0 - bne _02251392 - mov r1, #1 - add r0, sp, #0 - strb r1, [r0, #3] - b _02251392 -_02251372: - add r0, r5, #0 - bl ov23_0224AEA4 - cmp r0, #0 - beq _02251392 - mov r1, #3 - add r0, sp, #0 - strb r1, [r0] - add r0, r5, #0 - mov r1, #1 - add r2, sp, #0 - mov r3, #0 - bl ov23_0224A570 - mov r0, #1 - pop {r3, r4, r5, pc} -_02251392: - add r1, sp, #0 - mov r0, #0x53 - add r1, #1 - bl sub_02035B48 - mov r0, #1 - pop {r3, r4, r5, pc} -_022513A0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov23_02251324 - - thumb_func_start ov23_022513A4 -ov23_022513A4: ; 0x022513A4 - ldr r3, _022513AC ; =sub_0205948C - mov r0, #0x40 - bx r3 - nop -_022513AC: .word sub_0205948C - thumb_func_end ov23_022513A4 - - thumb_func_start ov23_022513B0 -ov23_022513B0: ; 0x022513B0 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - bl sub_02035EE0 - cmp r0, #0 - beq _02251408 - bl sub_0203608C - ldrb r1, [r5] - cmp r1, r0 - bne _02251408 - bl sub_0203608C - ldrb r1, [r5, #1] - cmp r1, r0 - bne _022513E4 - ldr r0, _0225140C ; =0x0000060C - bl sub_02005748 - bl sub_020594FC - add r0, r4, #0 - bl ov23_02251F94 - pop {r3, r4, r5, pc} -_022513E4: - mov r0, #0x40 - bl sub_02059464 - ldrb r0, [r5, #2] - cmp r0, #0 - beq _022513FA - add r0, r4, #0 - add r1, r5, #0 - bl ov23_022520E8 - pop {r3, r4, r5, pc} -_022513FA: - bl ov23_022421AC - ldr r3, _02251410 ; =ov23_022513A4 - mov r1, #9 - mov r2, #1 - bl ov23_02253F40 -_02251408: - pop {r3, r4, r5, pc} - nop -_0225140C: .word 0x0000060C -_02251410: .word ov23_022513A4 - thumb_func_end ov23_022513B0 - - thumb_func_start ov23_02251414 -ov23_02251414: ; 0x02251414 - mov r0, #3 - bx lr - thumb_func_end ov23_02251414 - - thumb_func_start ov23_02251418 -ov23_02251418: ; 0x02251418 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r4, r0, #0 - add r1, r5, #0 - bl sub_02028B88 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0202895C - cmp r0, #0 - beq _02251446 - add r0, r4, #0 - add r1, r5, #0 - bl sub_02028B94 - mov r0, #1 - pop {r3, r4, r5, pc} -_02251446: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_02251418 - - thumb_func_start ov23_0225144C -ov23_0225144C: ; 0x0225144C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r1, #0xc] - bl sub_0203D174 - bl sub_020298B0 - add r1, r5, #0 - add r4, r0, #0 - bl sub_02028AFC - cmp r0, #0 - beq _0225146C - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, pc} -_0225146C: - add r0, r4, #0 - add r1, r5, #0 - bl sub_020289B8 - bl ov23_0224F744 - cmp r0, #0 - beq _02251488 - add r0, r4, #0 - add r1, r5, #0 - bl sub_020289C4 - mov r0, #1 - pop {r3, r4, r5, pc} -_02251488: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov23_0225144C - - thumb_func_start ov23_0225148C -ov23_0225148C: ; 0x0225148C - push {r4, lr} - add r4, r1, #0 - mov r1, #0x13 - bl sub_02001504 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022514A0 - mov r4, #5 -_022514A0: - bl ov23_022421BC - mov r2, #0 - add r1, r4, #6 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, pc} - thumb_func_end ov23_0225148C - - thumb_func_start ov23_022514B0 -ov23_022514B0: ; 0x022514B0 - push {r4, lr} - add r4, r1, #0 - mov r1, #0x13 - bl sub_02001504 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022514C4 - mov r4, #3 -_022514C4: - bl ov23_022421BC - add r4, #0x2c - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_022514B0 - - thumb_func_start ov23_022514D8 -ov23_022514D8: ; 0x022514D8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #0x48] - bl sub_02001288 - add r5, r0, #0 - add r1, sp, #0 - ldr r0, [r4, #0x48] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #0x17 - bl ov23_022430E0 - add r0, r4, #0 - bl ov23_022521C8 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bhi _02251526 - bhs _02251532 - cmp r5, #4 - bhi _022515C6 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225151C: ; jump table - .short _02251540 - _0225151C - 2 ; case 0 - .short _022515AC - _0225151C - 2 ; case 1 - .short _022515BA - _0225151C - 2 ; case 2 - .short _0225159E - _0225151C - 2 ; case 3 - .short _02251590 - _0225151C - 2 ; case 4 -_02251526: - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _022515C6 - mov r0, #0 - pop {r3, r4, r5, pc} -_02251532: - ldr r0, _022515CC ; =0x0000060E - bl sub_02005748 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #2 - strb r1, [r4, r0] - b _022515C6 -_02251540: - ldr r0, [r4, #0xc] - ldr r0, [r0, #0xc] - bl sub_020298B0 - bl sub_020289A0 - cmp r0, #0 - bne _02251566 - bl ov23_022421BC - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #0x17 - strb r1, [r4, r0] - b _022515C6 -_02251566: - bl sub_02033DFC - cmp r0, #0 - beq _0225157A - bl ov23_02243204 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #3 - strb r1, [r4, r0] - b _022515C6 -_0225157A: - bl ov23_022421BC - mov r2, #0 - mov r1, #0x38 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #0x17 - strb r1, [r4, r0] - b _022515C6 -_02251590: - ldr r0, _022515D4 ; =0x000005DC - bl sub_02005748 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #8 - strb r1, [r4, r0] - b _022515C6 -_0225159E: - ldr r0, _022515D4 ; =0x000005DC - bl sub_02005748 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #6 - strb r1, [r4, r0] - b _022515C6 -_022515AC: - ldr r0, _022515D4 ; =0x000005DC - bl sub_02005748 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #0x11 - strb r1, [r4, r0] - b _022515C6 -_022515BA: - ldr r0, _022515D4 ; =0x000005DC - bl sub_02005748 - ldr r0, _022515D0 ; =0x00000246 - mov r1, #0x14 - strb r1, [r4, r0] -_022515C6: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_022515CC: .word 0x0000060E -_022515D0: .word 0x00000246 -_022515D4: .word 0x000005DC - thumb_func_end ov23_022514D8 - - thumb_func_start ov23_022515D8 -ov23_022515D8: ; 0x022515D8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r5, r0, #0 - add r0, r2, #1 - str r0, [sp, #0x18] - ldr r0, [r5, #0xc] - add r6, r1, #0 - ldr r0, [r0, #0xc] - str r3, [sp, #0x14] - bl sub_020298A0 - bl sub_0202958C - cmp r0, #3 - bge _022515FC - ldr r0, [sp, #0x18] - sub r0, r0, #1 - str r0, [sp, #0x18] -_022515FC: - add r0, r5, #0 - bl ov23_0224FB7C - ldr r0, [sp, #0x18] - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xe - str r0, [sp, #4] - ldr r0, [sp, #0x18] - add r1, #0x10 - lsl r0, r0, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x11 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _022516E0 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r2, _022516E4 ; =0x0000027F - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r7, r0, #0 - ldr r0, [sp, #0x18] - mov r4, #0 - cmp r0, #0 - ble _02251682 - sub r0, r0, #1 - str r0, [sp, #0x1c] -_0225165A: - ldr r0, [sp, #0x1c] - cmp r4, r0 - ldr r0, [r5, #0x40] - bne _02251670 - mov r3, #1 - add r1, r7, #0 - add r2, r6, #5 - mvn r3, r3 - bl sub_02013A4C - b _0225167A -_02251670: - add r1, r7, #0 - add r2, r6, r4 - add r3, r4, #0 - bl sub_02013A4C -_0225167A: - ldr r0, [sp, #0x18] - add r4, r4, #1 - cmp r4, r0 - blt _0225165A -_02251682: - add r0, r7, #0 - bl sub_0200B190 - bl ov23_02253D40 - add r1, sp, #0x20 - mov r2, #0x20 - bl sub_020C4DB0 - ldr r0, [sp, #0x18] - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - add r0, sp, #0x20 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - ldr r0, [r5, #0x40] - str r0, [sp, #0x20] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _022516B2 - str r0, [sp, #0x24] -_022516B2: - str r5, [sp, #0x3c] - add r2, sp, #0x20 - ldrh r2, [r2, #0x10] - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov23_02251238 - mov r2, #0x23 - lsl r2, r2, #4 - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x20 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x48] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022516E0: .word 0x000003D9 -_022516E4: .word 0x0000027F - thumb_func_end ov23_022515D8 - - thumb_func_start ov23_022516E8 -ov23_022516E8: ; 0x022516E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r6, r1, #0 - add r1, r2, #0 - add r1, r1, #1 - str r1, [sp, #0x1c] - add r5, r0, #0 - str r2, [sp, #0x14] - str r3, [sp, #0x18] - bl ov23_0224FB7C - ldr r0, [sp, #0x1c] - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xe - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - add r1, #0x10 - lsl r0, r0, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xe2 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x11 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _022517D8 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r2, _022517DC ; =0x0000027F - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r7, r0, #0 - ldr r0, [sp, #0x1c] - mov r4, #0 - cmp r0, #0 - ble _0225177A -_02251752: - ldr r0, [sp, #0x14] - cmp r4, r0 - ldr r0, [r5, #0x40] - bne _02251768 - mov r3, #1 - add r1, r7, #0 - add r2, r6, r4 - mvn r3, r3 - bl sub_02013A4C - b _02251772 -_02251768: - add r1, r7, #0 - add r2, r6, r4 - add r3, r4, #0 - bl sub_02013A4C -_02251772: - ldr r0, [sp, #0x1c] - add r4, r4, #1 - cmp r4, r0 - blt _02251752 -_0225177A: - add r0, r7, #0 - bl sub_0200B190 - bl ov23_02253D40 - add r1, sp, #0x20 - mov r2, #0x20 - bl sub_020C4DB0 - ldr r0, [sp, #0x14] - add r1, sp, #0x20 - add r0, r0, #1 - strh r0, [r1, #0x10] - ldr r0, [sp, #0x1c] - strh r0, [r1, #0x12] - ldr r0, [r5, #0x40] - str r0, [sp, #0x20] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x18] - cmp r0, #0 - beq _022517AA - str r0, [sp, #0x24] -_022517AA: - str r5, [sp, #0x3c] - add r2, sp, #0x20 - ldrh r2, [r2, #0x10] - ldr r1, [sp, #0x1c] - add r0, r5, #0 - bl ov23_02251238 - mov r2, #0x23 - lsl r2, r2, #4 - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x20 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x48] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022517D8: .word 0x000003D9 -_022517DC: .word 0x0000027F - thumb_func_end ov23_022516E8 - - thumb_func_start ov23_022517E0 -ov23_022517E0: ; 0x022517E0 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x48] - bl sub_02001288 - add r4, r0, #0 - add r1, sp, #0 - ldr r0, [r5, #0x48] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #0x16 - bl ov23_022430E0 - add r0, r5, #0 - bl ov23_022521C8 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bhi _02251826 - bhs _02251830 - cmp r4, #2 - bhi _02251880 - cmp r4, #0 - beq _0225183E - cmp r4, #1 - beq _02251854 - cmp r4, #2 - beq _0225186A - b _02251880 -_02251826: - add r0, r0, #1 - cmp r4, r0 - bne _02251880 - mov r0, #0 - pop {r3, r4, r5, pc} -_02251830: - ldr r0, _0225188C ; =0x000005DC - bl sub_02005748 - ldr r0, _02251890 ; =0x00000246 - mov r1, #0 - strb r1, [r5, r0] - b _02251886 -_0225183E: - bl sub_02033DFC - cmp r0, #0 - ldr r0, _02251890 ; =0x00000246 - beq _0225184E - mov r1, #0xb - strb r1, [r5, r0] - b _02251886 -_0225184E: - mov r1, #0xa - strb r1, [r5, r0] - b _02251886 -_02251854: - bl sub_02033DFC - cmp r0, #0 - ldr r0, _02251890 ; =0x00000246 - beq _02251864 - mov r1, #0xd - strb r1, [r5, r0] - b _02251886 -_02251864: - mov r1, #0xc - strb r1, [r5, r0] - b _02251886 -_0225186A: - bl sub_02033DFC - cmp r0, #0 - ldr r0, _02251890 ; =0x00000246 - beq _0225187A - mov r1, #0xf - strb r1, [r5, r0] - b _02251886 -_0225187A: - mov r1, #0xe - strb r1, [r5, r0] - b _02251886 -_02251880: - ldr r0, _02251890 ; =0x00000246 - mov r1, #2 - strb r1, [r5, r0] -_02251886: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_0225188C: .word 0x000005DC -_02251890: .word 0x00000246 - thumb_func_end ov23_022517E0 - - thumb_func_start ov23_02251894 -ov23_02251894: ; 0x02251894 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - ldr r0, [r5, #0x4c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #2 - bl ov23_022430E0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _022518C6 - add r4, r0, #0 -_022518C6: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _022518F2 - add r0, r0, #1 - cmp r4, r0 - bne _02251902 - ldr r0, [r5, #0x4c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r1, sp, #0 - add r2, r0, #0 - ldrh r1, [r1, #2] - add r0, r5, #0 - mov r3, #6 - bl ov23_0225128C - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_022518F2: - bl ov23_022421DC - bl ov23_02254044 - ldr r0, _0225195C ; =0x00000246 - mov r1, #0 - strb r1, [r5, r0] - b _02251954 -_02251902: - bl ov23_022421DC - bl ov23_02254044 - add r0, r4, #0 - add r1, r5, #0 - bl ov23_0224F61C - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov23_02251418 - cmp r0, #0 - beq _0225193A - bl ov23_022421BC - add r1, r6, #0 - bl ov23_022540F4 - bl ov23_022421BC - mov r2, #0 - mov r1, #0x25 - add r3, r2, #0 - bl ov23_02253F40 - b _02251948 -_0225193A: - bl ov23_022421BC - mov r2, #0 - mov r1, #0x26 - add r3, r2, #0 - bl ov23_02253F40 -_02251948: - ldr r0, _0225195C ; =0x00000246 - mov r1, #0x13 - strb r1, [r5, r0] - add r0, r5, #0 - bl ov23_0224FB7C -_02251954: - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0225195C: .word 0x00000246 - thumb_func_end ov23_02251894 - - thumb_func_start ov23_02251960 -ov23_02251960: ; 0x02251960 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - ldr r0, [r5, #0x4c] - bl ov23_02248D20 - add r4, r0, #0 - ldr r0, [r5, #0x4c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r2, sp, #0 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #6 - bl ov23_022430E0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _02251992 - add r4, r0, #0 -_02251992: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _022519BE - add r0, r0, #1 - cmp r4, r0 - bne _022519CE - ldr r0, [r5, #0x4c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r1, sp, #0 - add r2, r0, #0 - ldrh r1, [r1, #2] - add r0, r5, #0 - mov r3, #6 - bl ov23_0225128C - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_022519BE: - bl ov23_022421DC - bl ov23_02254044 - ldr r0, _02251A54 ; =0x00000246 - mov r1, #0 - strb r1, [r5, r0] - b _02251A38 -_022519CE: - bl ov23_022421DC - bl ov23_02254044 - add r0, r4, #0 - add r1, r5, #0 - bl ov23_0224F5F0 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov23_0225144C - cmp r0, #1 - bne _02251A06 - bl ov23_022421BC - add r1, r6, #0 - bl ov23_022540F4 - bl ov23_022421BC - mov r2, #0 - mov r1, #0x24 - add r3, r2, #0 - bl ov23_02253F40 - b _02251A2C -_02251A06: - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _02251A1E - bl ov23_022421BC - mov r2, #0 - mov r1, #0x37 - add r3, r2, #0 - bl ov23_02253F40 - b _02251A2C -_02251A1E: - bl ov23_022421BC - mov r2, #0 - mov r1, #0x27 - add r3, r2, #0 - bl ov23_02253F40 -_02251A2C: - ldr r0, _02251A54 ; =0x00000246 - mov r1, #0x16 - strb r1, [r5, r0] - add r0, r5, #0 - bl ov23_0224FB7C -_02251A38: - mov r1, #0 - ldr r0, [r5, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r5, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_02251A54: .word 0x00000246 - thumb_func_end ov23_02251960 - - thumb_func_start ov23_02251A58 -ov23_02251A58: ; 0x02251A58 - push {r3, lr} - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02251A7C - ldr r0, _02251A80 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _02251A7C - bl ov23_022421BC - bl ov23_02254044 - mov r0, #1 - pop {r3, pc} -_02251A7C: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02251A80: .word 0x021BF67C - thumb_func_end ov23_02251A58 - - thumb_func_start ov23_02251A84 -ov23_02251A84: ; 0x02251A84 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0 - add r4, r1, #0 - str r0, [sp, #4] - ldr r0, [r4, #0x3c] - bl sub_0205EABC - lsl r1, r0, #0x10 - mov r0, #0xf - lsl r0, r0, #0x10 - sub r0, r0, r1 - str r0, [sp] - ldr r0, [r4, #0x3c] - bl sub_0205EAC8 - lsl r1, r0, #0x10 - mov r0, #0x11 - lsl r0, r0, #0x10 - sub r1, r0, r1 - str r1, [sp, #8] - cmp r5, #0 - bne _02251ABE - ldr r0, [sp] - neg r0, r0 - str r0, [sp] - neg r0, r1 - str r0, [sp, #8] -_02251ABE: - ldr r1, [r4, #0x24] - add r0, sp, #0 - bl sub_02020990 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_02251A84 - - thumb_func_start ov23_02251ACC -ov23_02251ACC: ; 0x02251ACC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r0, #0 - bl sub_02050A60 - add r4, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #5 - bhi _02251BAA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02251AF2: ; jump table - .short _02251AFE - _02251AF2 - 2 ; case 0 - .short _02251B22 - _02251AF2 - 2 ; case 1 - .short _02251B40 - _02251AF2 - 2 ; case 2 - .short _02251B4E - _02251AF2 - 2 ; case 3 - .short _02251B54 - _02251AF2 - 2 ; case 4 - .short _02251B80 - _02251AF2 - 2 ; case 5 -_02251AFE: - ldr r0, _02251BB0 ; =0x0000060D - bl sub_02005748 - mov r1, #0 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - mov r0, #1 - str r0, [r5, #0] - b _02251BAA -_02251B22: - bl sub_0200F2AC - cmp r0, #0 - beq _02251BAA - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_0205EB18 - mov r0, #1 - add r1, r4, #0 - bl ov23_02251A84 - mov r0, #2 - str r0, [r5, #0] - b _02251BAA -_02251B40: - add r0, r4, #0 - add r1, r6, #0 - bl ov23_02254D98 - mov r0, #3 - str r0, [r5, #0] - b _02251BAA -_02251B4E: - mov r0, #4 - str r0, [r5, #0] - b _02251BAA -_02251B54: - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_0205EB18 - mov r0, #0 - add r1, r4, #0 - bl ov23_02251A84 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - add r1, r0, #0 - add r2, r0, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #5 - str r0, [r5, #0] - b _02251BAA -_02251B80: - bl sub_0200F2AC - cmp r0, #0 - beq _02251BAA - add r0, r4, #0 - bl ov23_0224B2C8 - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206AA30 - add r0, r4, #0 - bl ov23_02251F94 - add r0, r5, #0 - bl sub_020181C4 - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_02251BAA: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02251BB0: .word 0x0000060D - thumb_func_end ov23_02251ACC - - thumb_func_start ov23_02251BB4 -ov23_02251BB4: ; 0x02251BB4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x68] - bl sub_020237BC - ldr r0, [r4, #0x6c] - bl sub_020237BC - ldr r0, [r4, #0x70] - bl sub_0200B3F0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _02251BDA - mov r0, #0 - blx r1 -_02251BDA: - ldr r0, [r4, #8] - cmp r0, #0 - beq _02251BE8 - bl sub_0206A844 - mov r0, #0 - str r0, [r4, #8] -_02251BE8: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_022421BC - bl ov23_02254044 - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - thumb_func_end ov23_02251BB4 - - thumb_func_start ov23_02251C04 -ov23_02251C04: ; 0x02251C04 - push {r3, r4, r5, r6, lr} - sub sp, #4 - ldr r2, _02251F80 ; =0x00000246 - add r4, r1, #0 - ldrb r3, [r4, r2] - add r6, r0, #0 - cmp r3, #0x17 - bhi _02251CF8 - add r3, r3, r3 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_02251C20: ; jump table - .short _02251C50 - _02251C20 - 2 ; case 0 - .short _02251C8E - _02251C20 - 2 ; case 1 - .short _02251C96 - _02251C20 - 2 ; case 2 - .short _02251E9E - _02251C20 - 2 ; case 3 - .short _02251F7C - _02251C20 - 2 ; case 4 - .short _02251F7C - _02251C20 - 2 ; case 5 - .short _02251CAA - _02251C20 - 2 ; case 6 - .short _02251CEE - _02251C20 - 2 ; case 7 - .short _02251D12 - _02251C20 - 2 ; case 8 - .short _02251D54 - _02251C20 - 2 ; case 9 - .short _02251D5C - _02251C20 - 2 ; case 10 - .short _02251D90 - _02251C20 - 2 ; case 11 - .short _02251DA8 - _02251C20 - 2 ; case 12 - .short _02251DDC - _02251C20 - 2 ; case 13 - .short _02251DF4 - _02251C20 - 2 ; case 14 - .short _02251E28 - _02251C20 - 2 ; case 15 - .short _02251E40 - _02251C20 - 2 ; case 16 - .short _02251ED4 - _02251C20 - 2 ; case 17 - .short _02251F04 - _02251C20 - 2 ; case 18 - .short _02251F0C - _02251C20 - 2 ; case 19 - .short _02251F20 - _02251C20 - 2 ; case 20 - .short _02251F50 - _02251C20 - 2 ; case 21 - .short _02251F58 - _02251C20 - 2 ; case 22 - .short _02251F6C - _02251C20 - 2 ; case 23 -_02251C50: - add r0, r4, #0 - bl ov23_02252E18 - mov r0, #0x17 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x17 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r1, #0x1a - strh r0, [r4, r1] - mov r1, #0 - ldr r3, _02251F84 ; =ov23_0225148C - add r0, r4, #0 - mov r2, #5 - str r1, [sp] - bl ov23_022515D8 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #1 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251C8E: - bl ov23_022514D8 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02251C96: - bl sub_02059514 - bl ov23_02243204 - add r0, r6, #0 - add r1, r4, #0 - bl ov23_02251BB4 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02251CAA: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_022421BC - bl ov23_02254044 - ldr r0, [r4, #0xc] - bl sub_0203D174 - bl sub_02025E38 - add r5, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0203D174 - bl sub_020298B0 - mov r3, #0 - str r3, [sp] - add r2, r0, #0 - ldr r0, [r4, #0xc] - add r1, r5, #0 - ldr r0, [r0, #8] - bl ov23_02253C64 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #7 - add r1, #0x3a - add sp, #4 - strb r0, [r4, r1] - pop {r3, r4, r5, r6, pc} -_02251CEE: - ldr r0, _02251F88 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _02251CFA -_02251CF8: - b _02251F7C -_02251CFA: - sub r2, #0x3a - ldr r0, [r4, r2] - bl ov23_02253D10 - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, #0x3a - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251D12: - bl ov23_022421BC - bl ov23_02254044 - mov r0, #0x16 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x16 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - add r1, #0x1a - strh r0, [r4, r1] - mov r0, #1 - str r0, [sp] - ldr r3, _02251F8C ; =ov23_022514B0 - add r0, r4, #0 - mov r1, #0x28 - mov r2, #3 - bl ov23_022516E8 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #9 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251D54: - bl ov23_022517E0 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02251D5C: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_02242FF8 - bl ov23_022412F0 - mov r0, #1 - sub r1, r0, #7 - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - bl ov23_022421BC - mov r2, #0 - mov r1, #0x30 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x10 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251D90: - bl ov23_022421BC - mov r2, #0 - mov r1, #0x39 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x10 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251DA8: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_02242FD0 - bl ov23_02241E6C - mov r0, #1 - sub r1, r0, #7 - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - bl ov23_022421BC - mov r2, #0 - mov r1, #0x31 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x10 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251DDC: - bl ov23_022421BC - mov r2, #0 - mov r1, #0x3a - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x10 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251DF4: - add r0, r4, #0 - bl ov23_0224FB7C - bl ov23_02242FE4 - bl ov23_02245728 - mov r0, #1 - sub r1, r0, #7 - mov r2, #0 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 - bl ov23_022421BC - mov r2, #0 - mov r1, #0x32 - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x10 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251E28: - bl ov23_022421BC - mov r2, #0 - mov r1, #0x3b - add r3, r2, #0 - bl ov23_02253F40 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x10 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251E40: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02251E56 - ldr r0, _02251F88 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _02251E58 -_02251E56: - b _02251F7C -_02251E58: - bl sub_02033DFC - cmp r0, #0 - bne _02251E6E - mov r0, #1 - mov r1, #0 - sub r2, r1, #6 - add r3, r0, #0 - str r0, [sp] - bl sub_0200AAE0 -_02251E6E: - bl ov23_022421BC - bl ov23_02254044 - bl sub_02033DFC - cmp r0, #0 - beq _02251E84 - bl ov23_02242FA8 - b _02251E88 -_02251E84: - bl ov23_02242FBC -_02251E88: - bl ov23_02245784 - bl ov23_02241364 - bl ov23_02241ED0 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #8 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251E9E: - ldr r0, [r4, #0xc] - ldr r0, [r0, #0x10] - cmp r0, #0 - bne _02251EC8 - mov r0, #0xb - mov r1, #0xc - bl sub_02018184 - mov r1, #0 - mov r2, #0xc - add r5, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r5, #0] - str r0, [r5, #4] - ldr r0, [r4, #0xc] - ldr r1, _02251F90 ; =ov23_02251ACC - add r2, r5, #0 - bl sub_02050904 -_02251EC8: - add r0, r6, #0 - add r1, r4, #0 - bl ov23_02251BB4 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02251ED4: - mov r0, #2 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #2 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - bl ov23_02250D2C - add r0, r4, #0 - mov r1, #0x1c - bl ov23_02252D74 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x12 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251F04: - bl ov23_02251894 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02251F0C: - add r0, r4, #0 - bl ov23_02251A58 - cmp r0, #0 - beq _02251F7C - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x11 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251F20: - mov r0, #6 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #6 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - bl ov23_02250D5C - add r0, r4, #0 - mov r1, #0x20 - bl ov23_02252D74 - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x15 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251F50: - bl ov23_02251960 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_02251F58: - add r0, r4, #0 - bl ov23_02251A58 - cmp r0, #0 - beq _02251F7C - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0x14 - add sp, #4 - strb r1, [r4, r0] - pop {r3, r4, r5, r6, pc} -_02251F6C: - add r0, r4, #0 - bl ov23_02251A58 - cmp r0, #0 - beq _02251F7C - ldr r0, _02251F80 ; =0x00000246 - mov r1, #0 - strb r1, [r4, r0] -_02251F7C: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02251F80: .word 0x00000246 -_02251F84: .word ov23_0225148C -_02251F88: .word 0x021BF67C -_02251F8C: .word ov23_022514B0 -_02251F90: .word ov23_02251ACC - thumb_func_end ov23_02251C04 - - thumb_func_start ov23_02251F94 -ov23_02251F94: ; 0x02251F94 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #1 - bl ov23_022430D0 - mov r1, #0x25 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x25 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020C4CF4 - str r5, [r4, #0xc] - bl ov23_022421BC - ldr r1, _02252024 ; =0x0000027F - mov r2, #1 - bl ov23_02253DFC - ldr r0, _02252028 ; =0x00000246 - mov r1, #0 - strb r1, [r4, r0] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x68] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x6c] - mov r0, #4 - bl sub_0200B358 - str r0, [r4, #0x70] - mov r0, #4 - bl sub_0206A780 - str r0, [r4, #8] - mov r1, #0xc8 - mov r2, #0x14 - mov r3, #0x7a - bl sub_0206A8A0 - mov r1, #0 - ldr r0, [r4, #8] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r4, #8] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 - ldr r0, _0225202C ; =ov23_02251C04 - ldr r2, _02252030 ; =0x00002710 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r1, [r4, #4] - ldr r2, _02252034 ; =ov23_02251270 - add r0, r4, #0 - bl ov23_022431EC - pop {r3, r4, r5, pc} - nop -_02252024: .word 0x0000027F -_02252028: .word 0x00000246 -_0225202C: .word ov23_02251C04 -_02252030: .word 0x00002710 -_02252034: .word ov23_02251270 - thumb_func_end ov23_02251F94 - - thumb_func_start ov23_02252038 -ov23_02252038: ; 0x02252038 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0225204E - cmp r0, #1 - beq _02252074 - cmp r0, #2 - beq _022520AC - pop {r3, r4, r5, pc} -_0225204E: - bl ov23_0224219C - bl ov23_02254238 - cmp r0, #0 - bne _022520BC - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #4] - ldr r1, _022520C0 ; =0x022569C8 - ldr r0, [r0, #8] - ldr r2, _022520C4 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #8] - mov r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_02252074: - ldr r0, [r4, #8] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _022520BC - cmp r0, #0 - bne _02252094 - add r1, r4, #0 - mov r0, #0x59 - add r1, #0xc - bl sub_020360D0 - b _022520A2 -_02252094: - mov r0, #0x40 - bl sub_0205948C - bl ov23_0224219C - bl ov23_02254044 -_022520A2: - mov r0, #2 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_022520AC: - add r0, r4, #0 - bl sub_020181C4 - bl ov23_02243204 - add r0, r5, #0 - bl sub_0200DA58 -_022520BC: - pop {r3, r4, r5, pc} - nop -_022520C0: .word 0x022569C8 -_022520C4: .word 0x000003D9 - thumb_func_end ov23_02252038 - - thumb_func_start ov23_022520C8 -ov23_022520C8: ; 0x022520C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _022520DA - mov r1, #4 - bl sub_02002154 -_022520DA: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov23_022520C8 - - thumb_func_start ov23_022520E8 -ov23_022520E8: ; 0x022520E8 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x25 - add r6, r0, #0 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r1, #0 - mov r2, #0x14 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0] - ldr r0, _02252150 ; =ov23_02252038 - ldr r2, _02252154 ; =0x00002710 - str r6, [r4, #4] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x10] - bl ov23_0224219C - add r6, r0, #0 - ldrb r0, [r5, #1] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r6, #0 - bl ov23_02254068 - bl ov23_0224219C - mov r2, #0 - mov r1, #0x43 - add r3, r2, #0 - bl ov23_02253F40 - ldrb r0, [r5] - ldr r2, _02252158 ; =ov23_022520C8 - strb r0, [r4, #0xc] - ldrb r0, [r5, #1] - strb r0, [r4, #0xd] - ldrb r0, [r5, #2] - strb r0, [r4, #0xe] - ldr r1, [r4, #0x10] - add r0, r4, #0 - bl ov23_022431EC - pop {r4, r5, r6, pc} - nop -_02252150: .word ov23_02252038 -_02252154: .word 0x00002710 -_02252158: .word ov23_022520C8 - thumb_func_end ov23_022520E8 - - thumb_func_start ov23_0225215C -ov23_0225215C: ; 0x0225215C - push {r4, lr} - add r4, r2, #0 - ldrb r0, [r4] - ldrb r1, [r4, #1] - bl ov23_0224AEC4 - cmp r0, #0 - beq _02252174 - mov r0, #0x5a - add r1, r4, #0 - bl sub_02035B48 -_02252174: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0225215C - - thumb_func_start ov23_02252178 -ov23_02252178: ; 0x02252178 - push {r3, r4, r5, lr} - add r4, r2, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _022521AE - bl ov23_022421AC - add r5, r0, #0 - ldrb r0, [r4, #1] - bl sub_02032EE8 - add r1, r0, #0 - add r0, r5, #0 - bl ov23_02254068 - bl ov23_022421AC - ldr r3, _022521C0 ; =ov23_022513A4 - mov r1, #8 - mov r2, #1 - bl ov23_02253F40 - ldr r0, _022521C4 ; =0x00000425 - bl sub_0200549C -_022521AE: - ldrb r0, [r4] - ldrb r1, [r4, #1] - bl ov23_0224AEC4 - ldrb r0, [r4] - ldrb r1, [r4, #1] - bl ov23_0224D500 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022521C0: .word ov23_022513A4 -_022521C4: .word 0x00000425 - thumb_func_end ov23_02252178 - - thumb_func_start ov23_022521C8 -ov23_022521C8: ; 0x022521C8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, _022521E8 ; =0x0000024A - ldr r0, [r5, #0x48] - ldrh r4, [r5, r1] - add r1, r5, r1 - bl sub_020014D0 - ldr r0, _022521E8 ; =0x0000024A - ldrh r0, [r5, r0] - cmp r4, r0 - beq _022521E6 - ldr r0, _022521EC ; =0x000005DC - bl sub_02005748 -_022521E6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022521E8: .word 0x0000024A -_022521EC: .word 0x000005DC - thumb_func_end ov23_022521C8 - - thumb_func_start ov23_022521F0 -ov23_022521F0: ; 0x022521F0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - ldr r0, [r6, #0xc] - add r4, r1, #0 - bl sub_0203D174 - bl sub_020298B0 - bl sub_02028930 - add r7, r4, r0 - mov r4, #0 -_0225220A: - cmp r4, #0 - bne _02252212 - mov r5, #0x21 - b _0225222A -_02252212: - ldr r0, _022522E0 ; =0x5D588B65 - add r1, r7, #0 - mul r1, r0 - ldr r0, _022522E4 ; =0x00269EC3 - add r7, r1, r0 - lsr r1, r7, #0x10 - lsl r0, r1, #5 - add r0, r1, r0 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r5, r0, #1 -_0225222A: - mov r0, #0 - cmp r4, #0 - ble _02252246 - mov r1, #0x21 - add r3, r0, #0 - lsl r1, r1, #4 -_02252236: - add r2, r6, r0 - ldrb r2, [r2, r1] - cmp r5, r2 - bne _02252240 - add r5, r3, #0 -_02252240: - add r0, r0, #1 - cmp r0, r4 - blt _02252236 -_02252246: - cmp r5, #0 - bne _0225224E - sub r4, r4, #1 - b _022522D6 -_0225224E: - add r0, r5, #0 - bl ov23_022542AC - str r0, [sp, #4] - add r0, r5, #0 - bl ov23_022542BC - str r0, [sp, #8] - ldr r0, [sp, #4] - cmp r0, #0 - bne _0225226E - ldr r0, [sp, #8] - cmp r0, #0 - bne _0225226E - sub r4, r4, #1 - b _022522D6 -_0225226E: - mov r1, #0x21 - add r0, r6, r4 - lsl r1, r1, #4 - str r0, [sp] - strb r5, [r0, r1] - add r0, r5, #0 - bl ov23_0225429C - ldr r1, _022522E8 ; =0x00000215 - ldr r2, [sp] - strb r0, [r2, r1] - add r0, r2, #0 - ldrb r0, [r0, r1] - cmp r0, #6 - bne _022522A8 - ldr r0, _022522E0 ; =0x5D588B65 - add r2, r7, #0 - mul r2, r0 - ldr r0, _022522E4 ; =0x00269EC3 - add r7, r2, r0 - lsr r2, r7, #0x10 - lsl r0, r2, #2 - add r0, r2, r0 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r2, r0, #1 - ldr r0, [sp] - strb r2, [r0, r1] -_022522A8: - ldr r0, _022522E0 ; =0x5D588B65 - add r1, r7, #0 - mul r1, r0 - ldr r0, _022522E4 ; =0x00269EC3 - add r7, r1, r0 - ldr r1, [sp, #8] - ldr r0, [sp, #4] - sub r0, r1, r0 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - bne _022522C2 - lsr r0, r7, #0x10 - b _022522C8 -_022522C2: - lsr r0, r7, #0x10 - mul r1, r0 - lsr r0, r1, #0x10 -_022522C8: - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [sp, #4] - add r2, r0, r1 - ldr r1, _022522EC ; =0x0000021A - ldr r0, [sp] - strb r2, [r0, r1] -_022522D6: - add r4, r4, #1 - cmp r4, #5 - blt _0225220A - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022522E0: .word 0x5D588B65 -_022522E4: .word 0x00269EC3 -_022522E8: .word 0x00000215 -_022522EC: .word 0x0000021A - thumb_func_end ov23_022521F0 - - thumb_func_start ov23_022522F0 -ov23_022522F0: ; 0x022522F0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - ldr r0, [r6, #0xc] - add r4, r1, #0 - bl sub_0203D174 - add r5, r0, #0 - bl sub_020298B0 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02027560 - bl sub_02027474 - str r0, [sp, #4] - add r0, r7, #0 - bl sub_02028930 - add r7, r4, r0 - mov r4, #0 -_0225231C: - ldr r0, _022523F4 ; =0x5D588B65 - add r1, r7, #0 - mul r1, r0 - ldr r0, _022523F8 ; =0x00269EC3 - add r7, r1, r0 - lsr r1, r7, #0x10 - mov r0, #0x8a - mul r0, r1 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r5, r0, #1 - mov r0, #0 - cmp r4, #0 - ble _02252350 - mov r1, #0x21 - add r3, r0, #0 - lsl r1, r1, #4 -_02252340: - add r2, r6, r0 - ldrb r2, [r2, r1] - cmp r5, r2 - bne _0225234A - add r5, r3, #0 -_0225234A: - add r0, r0, #1 - cmp r0, r4 - blt _02252340 -_02252350: - cmp r5, #0 - bne _02252358 - sub r4, r4, #1 - b _022523EA -_02252358: - mov r1, #0x21 - add r0, r6, r4 - lsl r1, r1, #4 - str r0, [sp] - strb r5, [r0, r1] - add r0, r5, #0 - bl sub_0205742C - ldr r2, _022523FC ; =0x00000215 - ldr r1, [sp] - strb r0, [r1, r2] - ldr r0, [sp, #4] - cmp r0, #0 - bne _02252382 - add r0, r5, #0 - bl sub_0205747C - cmp r0, #1 - bne _02252382 - sub r4, r4, #1 - b _022523EA -_02252382: - ldr r0, _022523FC ; =0x00000215 - ldr r1, [sp] - ldrb r1, [r1, r0] - cmp r1, #0 - bne _02252390 - sub r4, r4, #1 - b _022523EA -_02252390: - cmp r1, #6 - bne _022523B0 - ldr r1, _022523F4 ; =0x5D588B65 - add r2, r7, #0 - mul r2, r1 - ldr r1, _022523F8 ; =0x00269EC3 - add r7, r2, r1 - lsr r2, r7, #0x10 - lsl r1, r2, #2 - add r1, r2, r1 - lsr r1, r1, #0x10 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - add r2, r1, #1 - ldr r1, [sp] - strb r2, [r1, r0] -_022523B0: - add r0, r5, #0 - bl sub_0205743C - str r0, [sp, #8] - add r0, r5, #0 - bl sub_0205744C - ldr r1, _022523F4 ; =0x5D588B65 - add r2, r7, #0 - mul r2, r1 - ldr r1, _022523F8 ; =0x00269EC3 - add r7, r2, r1 - ldr r1, [sp, #8] - sub r0, r0, r1 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - bne _022523D6 - lsr r0, r7, #0x10 - b _022523DC -_022523D6: - lsr r0, r7, #0x10 - mul r1, r0 - lsr r0, r1, #0x10 -_022523DC: - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [sp, #8] - add r2, r0, r1 - ldr r1, _02252400 ; =0x0000021A - ldr r0, [sp] - strb r2, [r0, r1] -_022523EA: - add r4, r4, #1 - cmp r4, #5 - blt _0225231C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022523F4: .word 0x5D588B65 -_022523F8: .word 0x00269EC3 -_022523FC: .word 0x00000215 -_02252400: .word 0x0000021A - thumb_func_end ov23_022522F0 - - thumb_func_start ov23_02252404 -ov23_02252404: ; 0x02252404 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r5, #0xc] - add r7, r2, #0 - add r4, r1, #0 - bl sub_0203D174 - bl sub_020298B0 - add r6, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - bl ov23_0224F684 - ldr r1, _022524A4 ; =0x00000215 - add r2, r5, r4 - ldrb r1, [r2, r1] - cmp r1, r0 - beq _02252432 - ldr r0, _022524A8 ; =0x0000FFFD - pop {r3, r4, r5, r6, r7, pc} -_02252432: - add r0, r7, #0 - add r1, r5, #0 - bl ov23_0224F69C - ldr r1, _022524AC ; =0x0000021A - add r2, r5, r4 - add r3, r0, #0 - ldrb r0, [r2, r1] - cmp r0, r3 - ble _0225244A - ldr r0, _022524B0 ; =0x0000FFFB - pop {r3, r4, r5, r6, r7, pc} -_0225244A: - add r0, r1, #0 - add r0, #0x2e - ldrb r0, [r5, r0] - cmp r0, #1 - bne _02252462 - sub r1, #0xa - ldrb r1, [r2, r1] - add r0, r6, #0 - bl sub_02028E84 - str r0, [sp] - b _02252484 -_02252462: - cmp r0, #0 - bne _02252474 - sub r1, #0xa - ldrb r1, [r2, r1] - add r0, r6, #0 - bl sub_02028BC8 - str r0, [sp] - b _02252484 -_02252474: - cmp r0, #2 - bne _02252484 - sub r1, #0xa - ldrb r1, [r2, r1] - add r0, r6, #0 - bl sub_02028DB4 - str r0, [sp] -_02252484: - ldr r0, [sp] - cmp r0, #0 - beq _02252494 - add r0, r6, #0 - add r1, r7, #0 - bl sub_02028C6C - b _02252498 -_02252494: - ldr r0, _022524B4 ; =0x0000FFFC - pop {r3, r4, r5, r6, r7, pc} -_02252498: - mov r0, #0x21 - add r1, r5, r4 - lsl r0, r0, #4 - ldrb r0, [r1, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_022524A4: .word 0x00000215 -_022524A8: .word 0x0000FFFD -_022524AC: .word 0x0000021A -_022524B0: .word 0x0000FFFB -_022524B4: .word 0x0000FFFC - thumb_func_end ov23_02252404 - - thumb_func_start ov23_022524B8 -ov23_022524B8: ; 0x022524B8 - push {r4, r5, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - mov r4, #3 - cmp r0, #2 - bne _022524CC - mov r4, #2 -_022524CC: - add r0, r5, #0 - bl ov23_0224FB7C - add r0, r4, #0 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - lsl r0, r4, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02252654 ; =0x000001EF - add r1, #0x10 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02252658 ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r1, #0x92 - lsl r1, r1, #2 - ldrb r0, [r5, r1] - cmp r0, #1 - bne _02252562 - sub r1, #0x24 - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov23_022521F0 - bl ov23_022421BC - bl ov23_02253E3C - add r1, r0, #0 - ldr r0, [r5, #0x40] - mov r2, #0xd - mov r3, #0 - bl sub_02013A4C - bl ov23_022421BC - bl ov23_02253E3C - add r1, r0, #0 - ldr r0, [r5, #0x40] - mov r2, #0xe - mov r3, #1 - bl sub_02013A4C - bl ov23_022421BC - bl ov23_02253E3C - mov r2, #0xf - add r1, r0, #0 - add r3, r2, #0 - ldr r0, [r5, #0x40] - sub r3, #0x11 - bl sub_02013A4C - b _022525DA -_02252562: - cmp r0, #0 - bne _022525B0 - sub r1, #0x24 - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov23_022522F0 - bl ov23_022421BC - bl ov23_02253E3C - add r1, r0, #0 - ldr r0, [r5, #0x40] - mov r2, #0x10 - mov r3, #0 - bl sub_02013A4C - bl ov23_022421BC - bl ov23_02253E3C - add r1, r0, #0 - ldr r0, [r5, #0x40] - mov r2, #0x11 - mov r3, #1 - bl sub_02013A4C - bl ov23_022421BC - bl ov23_02253E3C - mov r2, #0x12 - add r1, r0, #0 - add r3, r2, #0 - ldr r0, [r5, #0x40] - sub r3, #0x14 - bl sub_02013A4C - b _022525DA -_022525B0: - bl ov23_022421BC - bl ov23_02253E3C - add r1, r0, #0 - ldr r0, [r5, #0x40] - mov r2, #0x1c - mov r3, #0 - bl sub_02013A4C - bl ov23_022421BC - bl ov23_02253E3C - mov r2, #0x16 - add r1, r0, #0 - add r3, r2, #0 - ldr r0, [r5, #0x40] - sub r3, #0x18 - bl sub_02013A4C -_022525DA: - bl ov23_02253D40 - add r1, sp, #0x14 - mov r2, #0x20 - bl sub_020C4DB0 - ldr r0, [r5, #0x40] - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x20] - lsl r0, r4, #0x10 - lsr r1, r0, #0x10 - add r0, sp, #0x14 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - mov r0, #0x13 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #0x13 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r5, r1] - add r2, sp, #0x14 - ldrh r1, [r2, #0x12] - ldrh r2, [r2, #0x10] - add r0, r5, #0 - bl ov23_02251238 - mov r2, #0x23 - lsl r2, r2, #4 - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x14 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x48] - mov r0, #0x8b - lsl r0, r0, #2 - ldr r1, [r5, r0] - add r0, #0x1e - strh r1, [r5, r0] - add r0, r5, #0 - add r0, #0x10 - bl sub_0201A954 - add r0, r5, #0 - add sp, #0x34 - pop {r4, r5, pc} - nop -_02252654: .word 0x000001EF -_02252658: .word 0x000003D9 - thumb_func_end ov23_022524B8 - - thumb_func_start ov23_0225265C -ov23_0225265C: ; 0x0225265C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - mov r1, #0x13 - add r6, r0, #0 - add r7, r2, #0 - bl sub_02001504 - add r4, r0, #0 - add r0, #0x20 - mov r1, #0xf - bl sub_0201ADA4 - bl ov23_022421BC - bl ov23_02253E3C - ldr r1, _02252748 ; =0x00000247 - ldr r2, [r4, #0x68] - ldrb r1, [r4, r1] - add r1, #0x17 - bl sub_0200B1B8 - mov r3, #1 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x68] - add r0, #0x20 - bl sub_0201D738 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _022526FE - ldr r2, _0225274C ; =0x00000215 - add r3, r4, r5 - ldrb r2, [r3, r2] - ldr r0, [r4, #0x70] - mov r1, #2 - bl sub_0200BA94 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r2, _02252750 ; =0x0000021A - add r3, r4, r5 - ldrb r2, [r3, r2] - ldr r0, [r4, #0x70] - mov r1, #6 - mov r3, #2 - bl sub_0200B60C - bl ov23_022421BC - bl ov23_02253E3C - ldr r2, [r4, #0x68] - mov r1, #0x19 - bl sub_0200B1B8 - ldr r0, [r4, #0x70] - ldr r1, [r4, #0x6c] - ldr r2, [r4, #0x68] - bl sub_0200C388 - mov r0, #0x11 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x6c] - add r0, #0x20 - mov r3, #1 - bl sub_0201D738 -_022526FE: - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A9A4 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _02252710 - add r5, r0, #0 -_02252710: - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _02252728 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov23_0224FD84 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_02252728: - cmp r0, #0 - bne _0225273A - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov23_02250C3C - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0225273A: - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov23_02250540 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02252748: .word 0x00000247 -_0225274C: .word 0x00000215 -_02252750: .word 0x0000021A - thumb_func_end ov23_0225265C - - thumb_func_start ov23_02252754 -ov23_02252754: ; 0x02252754 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r6, r1, #0 - mov r1, #0x13 - str r0, [sp, #0xc] - str r2, [sp, #0x10] - bl sub_02001504 - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0203D174 - bl sub_020298B0 - str r0, [sp, #0x2c] - add r0, r4, #0 - mov r5, #0 - add r0, #0x20 - mov r1, #0xf - bl sub_0201ADA4 - sub r0, r5, #2 - cmp r6, r0 - bne _02252786 - b _022528FA -_02252786: - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0225280A - add r0, r6, #0 - add r1, r4, #0 - bl ov23_0224F66C - str r0, [sp, #0x24] - ldr r0, [sp, #0x2c] - bl sub_02028930 - mov r1, #0x89 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r1, r1, r0 - ldr r0, [sp, #0x24] - add r7, r0, r1 - bl ov23_0225429C - add r5, r0, #0 - cmp r5, #6 - bne _022527CE - ldr r0, _022529F4 ; =0x5D588B65 - add r1, r7, #0 - mul r1, r0 - ldr r0, _022529F8 ; =0x00269EC3 - add r7, r1, r0 - lsr r1, r7, #0x10 - lsl r0, r1, #2 - add r0, r1, r0 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r5, r0, #1 -_022527CE: - ldr r0, [sp, #0x24] - bl ov23_022542AC - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - bl ov23_022542BC - ldr r1, _022529F4 ; =0x5D588B65 - add r2, r7, #0 - mul r2, r1 - ldr r1, _022529F8 ; =0x00269EC3 - add r1, r2, r1 - ldr r2, [sp, #0x28] - sub r0, r0, r2 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - bne _022527F2 - b _022527F8 -_022527F2: - lsr r0, r1, #0x10 - add r1, r0, #0 - mul r1, r2 -_022527F8: - lsr r0, r1, #0x10 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [sp, #0x28] - add r1, r0, r1 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r7, r0, #1 - b _022528FA -_0225280A: - cmp r0, #0 - bne _02252888 - add r0, r6, #0 - add r1, r4, #0 - bl ov23_0224F61C - str r0, [sp, #0x20] - ldr r0, [sp, #0x2c] - bl sub_02028930 - mov r1, #0x89 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r1, r1, r0 - ldr r0, [sp, #0x20] - add r7, r0, r1 - bl sub_0205742C - add r5, r0, #0 - cmp r5, #6 - bne _0225284C - ldr r0, _022529F4 ; =0x5D588B65 - add r1, r7, #0 - mul r1, r0 - ldr r0, _022529F8 ; =0x00269EC3 - add r7, r1, r0 - lsr r1, r7, #0x10 - lsl r0, r1, #2 - add r0, r1, r0 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r5, r0, #1 -_0225284C: - ldr r0, [sp, #0x20] - bl sub_0205743C - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - bl sub_0205744C - ldr r1, _022529F4 ; =0x5D588B65 - add r2, r7, #0 - mul r2, r1 - ldr r1, _022529F8 ; =0x00269EC3 - add r1, r2, r1 - ldr r2, [sp, #0x14] - sub r0, r0, r2 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - bne _02252870 - b _02252876 -_02252870: - lsr r0, r1, #0x10 - add r1, r0, #0 - mul r1, r2 -_02252876: - lsr r0, r1, #0x10 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [sp, #0x14] - add r1, r0, r1 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r7, r0, #1 - b _022528FA -_02252888: - add r0, r6, #0 - add r1, r4, #0 - bl ov23_0224F6C8 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x2c] - bl sub_02028930 - mov r1, #0x89 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r1, r1, r0 - ldr r0, [sp, #0x1c] - add r7, r0, r1 - bl ov23_0225426C - add r5, r0, #0 - cmp r5, #6 - bne _022528C6 - ldr r0, _022529F4 ; =0x5D588B65 - add r1, r7, #0 - mul r1, r0 - ldr r0, _022529F8 ; =0x00269EC3 - add r7, r1, r0 - lsr r1, r7, #0x10 - lsl r0, r1, #2 - add r0, r1, r0 - lsr r0, r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r5, r0, #1 -_022528C6: - ldr r0, [sp, #0x1c] - bl ov23_0225427C - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - bl ov23_0225428C - ldr r1, _022529F4 ; =0x5D588B65 - add r2, r7, #0 - mul r2, r1 - ldr r1, _022529F8 ; =0x00269EC3 - add r1, r2, r1 - ldr r2, [sp, #0x18] - sub r0, r0, r2 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - bne _022528EA - b _022528F0 -_022528EA: - lsr r0, r1, #0x10 - add r1, r0, #0 - mul r1, r2 -_022528F0: - lsr r0, r1, #0x10 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [sp, #0x18] - add r7, r0, r1 -_022528FA: - bl ov23_022421BC - bl ov23_02253E3C - ldr r1, _022529FC ; =0x00000247 - ldr r2, [r4, #0x68] - ldrb r1, [r4, r1] - add r1, #0x17 - bl sub_0200B1B8 - mov r3, #1 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x68] - add r0, #0x20 - bl sub_0201D738 - mov r0, #1 - mvn r0, r0 - cmp r6, r0 - beq _022529B4 - cmp r5, #0 - beq _02252988 - ldr r0, [r4, #0x70] - mov r1, #2 - add r2, r5, #0 - bl sub_0200BA94 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0x70] - mov r1, #6 - add r2, r7, #0 - mov r3, #2 - bl sub_0200B60C - bl ov23_022421BC - bl ov23_02253E3C - ldr r2, [r4, #0x68] - mov r1, #0x19 - bl sub_0200B1B8 - ldr r0, [r4, #0x70] - ldr r1, [r4, #0x6c] - ldr r2, [r4, #0x68] - bl sub_0200C388 - mov r0, #0x11 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x6c] - add r0, #0x20 - mov r3, #1 - bl sub_0201D738 - ldr r0, _02252A00 ; =0x00000215 - strb r5, [r4, r0] - add r0, r0, #5 - strb r7, [r4, r0] - b _022529B4 -_02252988: - ldr r0, _02252A00 ; =0x00000215 - strb r5, [r4, r0] - bl ov23_022421BC - bl ov23_02253E3C - ldr r2, [r4, #0x68] - mov r1, #0x1a - bl sub_0200B1B8 - mov r0, #0x11 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x68] - add r0, #0x20 - mov r3, #1 - bl sub_0201D738 -_022529B4: - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A9A4 - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _022529D4 - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x10] - add r1, r6, #0 - bl ov23_0224FD84 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} -_022529D4: - cmp r0, #0 - bne _022529E6 - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x10] - add r1, r6, #0 - bl ov23_02250C3C - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} -_022529E6: - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x10] - add r1, r6, #0 - bl ov23_02250540 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022529F4: .word 0x5D588B65 -_022529F8: .word 0x00269EC3 -_022529FC: .word 0x00000247 -_02252A00: .word 0x00000215 - thumb_func_end ov23_02252754 - - thumb_func_start ov23_02252A04 -ov23_02252A04: ; 0x02252A04 - cmp r0, #5 - blt _02252A0C - mov r0, #0 - bx lr -_02252A0C: - add r1, r1, r0 - mov r0, #0x21 - lsl r0, r0, #4 - ldrb r0, [r1, r0] - bx lr - ; .align 2, 0 - thumb_func_end ov23_02252A04 - - thumb_func_start ov23_02252A18 -ov23_02252A18: ; 0x02252A18 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - bl ov23_0224FB7C - mov r0, #6 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0x40] - mov r2, #3 - add r1, r5, #0 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02252B78 ; =0x0000015F - add r1, #0x10 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02252B7C ; =0x000003D9 - add r0, #0x10 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r2, #0x92 - lsl r2, r2, #2 - ldrb r0, [r5, r2] - cmp r0, #1 - bne _02252A80 - mov r0, #0 - mov r1, #0x1a - add r2, #0x2e - mov r3, #4 - bl sub_0200B144 - add r6, r0, #0 - bl ov23_022421DC - ldr r1, _02252B80 ; =0x00000276 - mov r2, #0 - bl ov23_02253DFC - b _02252ABC -_02252A80: - cmp r0, #0 - bne _02252AA0 - mov r0, #0 - mov r1, #0x1a - add r2, #0x2a - mov r3, #4 - bl sub_0200B144 - add r6, r0, #0 - bl ov23_022421DC - ldr r1, _02252B84 ; =0x00000272 - mov r2, #0 - bl ov23_02253DFC - b _02252ABC -_02252AA0: - mov r0, #0 - mov r1, #0x1a - add r2, #0x2c - mov r3, #4 - bl sub_0200B144 - add r6, r0, #0 - bl ov23_022421DC - mov r1, #0x9d - lsl r1, r1, #2 - mov r2, #0 - bl ov23_02253DFC -_02252ABC: - mov r7, #0x21 - mov r4, #0 - lsl r7, r7, #4 -_02252AC2: - add r2, r5, r4 - ldrb r2, [r2, r7] - ldr r0, [r5, #0x40] - add r1, r6, #0 - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, #5 - blt _02252AC2 - mov r2, #0 - ldr r0, [r5, #0x40] - add r1, r6, #0 - sub r3, r2, #2 - bl sub_02013A4C - add r0, r6, #0 - bl sub_0200B190 - bl ov23_02253D40 - add r1, sp, #0x14 - mov r2, #0x20 - bl sub_020C4DB0 - ldr r0, [r5, #0x40] - mov r1, #6 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0x10 - str r0, [sp, #0x20] - add r0, sp, #0x14 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - ldr r0, _02252B88 ; =ov23_0225265C - ldr r1, _02252B8C ; =ov23_02252A04 - str r0, [sp, #0x18] - mov r0, #0x81 - str r5, [sp, #0x30] - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, #0x44 - ldrb r0, [r5, r0] - add r0, #0xd - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r5, r1] - add r1, #0x18 - ldrb r0, [r5, r1] - add r0, #0xd - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - add r1, #0x1e - strh r0, [r5, r1] - add r2, sp, #0x14 - ldrh r1, [r2, #0x12] - ldrh r2, [r2, #0x10] - add r0, r5, #0 - bl ov23_02251238 - mov r2, #0x23 - lsl r2, r2, #4 - ldr r1, [r5, r2] - sub r2, r2, #4 - ldr r2, [r5, r2] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0x14 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0x48] - add r5, #0x10 - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_02252B78: .word 0x0000015F -_02252B7C: .word 0x000003D9 -_02252B80: .word 0x00000276 -_02252B84: .word 0x00000272 -_02252B88: .word ov23_0225265C -_02252B8C: .word ov23_02252A04 - thumb_func_end ov23_02252A18 - - thumb_func_start ov23_02252B90 -ov23_02252B90: ; 0x02252B90 - push {r4, lr} - add r4, r0, #0 - add r0, #0x20 - bl sub_0201A7CC - cmp r0, #0 - beq _02252BB0 - add r0, r4, #0 - add r0, #0x20 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A8FC -_02252BB0: - add r0, r4, #0 - bl ov23_0224FB7C - pop {r4, pc} - thumb_func_end ov23_02252B90 - - thumb_func_start ov23_02252BB8 -ov23_02252BB8: ; 0x02252BB8 - push {r4, lr} - mov r2, #0x92 - add r4, r1, #0 - lsl r2, r2, #2 - ldrb r2, [r4, r2] - cmp r2, #1 - bne _02252BD4 - bl ov23_0224F66C - add r1, r0, #0 - mov r0, #2 - bl ov23_02252CF4 - b _02252BF2 -_02252BD4: - cmp r2, #0 - bne _02252BE6 - bl ov23_0224F61C - add r1, r0, #0 - mov r0, #2 - bl ov23_02252D08 - b _02252BF2 -_02252BE6: - bl ov23_0224F6C8 - add r1, r0, #0 - mov r0, #2 - bl ov23_02252CE0 -_02252BF2: - ldr r1, _02252C04 ; =0x00000215 - mov r0, #4 - ldrb r1, [r4, r1] - bl ov23_02252CE0 - mov r0, #0xa - bl ov23_02252C9C - pop {r4, pc} - ; .align 2, 0 -_02252C04: .word 0x00000215 - thumb_func_end ov23_02252BB8 - - thumb_func_start ov23_02252C08 -ov23_02252C08: ; 0x02252C08 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0203D174 - bl sub_020298B0 - ldr r1, _02252C68 ; =0x00000215 - add r4, r0, #0 - ldrb r0, [r5, r1] - add r1, r1, #5 - ldrb r1, [r5, r1] - bl ov23_0224F6E0 - cmp r0, #0 - beq _02252C62 - mov r1, #0x92 - lsl r1, r1, #2 - ldrb r0, [r5, r1] - cmp r0, #1 - bne _02252C3E - sub r1, r1, #4 - ldrb r1, [r5, r1] - add r0, r4, #0 - bl sub_02028E50 - b _02252C5C -_02252C3E: - cmp r0, #0 - bne _02252C4E - sub r1, r1, #4 - ldrb r1, [r5, r1] - add r0, r4, #0 - bl sub_02028B94 - b _02252C5C -_02252C4E: - cmp r0, #2 - bne _02252C5C - sub r1, r1, #4 - ldrb r1, [r5, r1] - add r0, r4, #0 - bl sub_02028D80 -_02252C5C: - ldr r0, _02252C68 ; =0x00000215 - ldrb r0, [r5, r0] - pop {r3, r4, r5, pc} -_02252C62: - ldr r0, _02252C6C ; =0x0000FFFC - pop {r3, r4, r5, pc} - nop -_02252C68: .word 0x00000215 -_02252C6C: .word 0x0000FFFC - thumb_func_end ov23_02252C08 - - thumb_func_start ov23_02252C70 -ov23_02252C70: ; 0x02252C70 - ldr r0, _02252C74 ; =0x0000FFFE - bx lr - ; .align 2, 0 -_02252C74: .word 0x0000FFFE - thumb_func_end ov23_02252C70 - - thumb_func_start ov23_02252C78 -ov23_02252C78: ; 0x02252C78 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x68] - bl sub_020237BC - ldr r0, [r4, #0x6c] - bl sub_020237BC - ldr r0, [r4, #0x70] - bl sub_0200B3F0 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02252C78 - - thumb_func_start ov23_02252C98 -ov23_02252C98: ; 0x02252C98 - mov r0, #0 - bx lr - thumb_func_end ov23_02252C98 - - thumb_func_start ov23_02252C9C -ov23_02252C9C: ; 0x02252C9C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov23_022421BC - mov r1, #0x9f - lsl r1, r1, #2 - mov r2, #1 - bl ov23_02253DFC - bl ov23_022421BC - add r4, r0, #0 - bl sub_0203608C - bl sub_02032EE8 - add r1, r0, #0 - add r0, r4, #0 - bl ov23_02254068 - bl ov23_022421BC - mov r2, #0 - add r1, r5, #0 - add r3, r2, #0 - bl ov23_02253F40 - pop {r3, r4, r5, pc} - thumb_func_end ov23_02252C9C - - thumb_func_start ov23_02252CD4 -ov23_02252CD4: ; 0x02252CD4 - push {r3, lr} - bl ov23_022421BC - bl ov23_02254044 - pop {r3, pc} - thumb_func_end ov23_02252CD4 - - thumb_func_start ov23_02252CE0 -ov23_02252CE0: ; 0x02252CE0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov23_022421BC - add r1, r5, #0 - add r2, r4, #0 - bl ov23_022541A0 - pop {r3, r4, r5, pc} - thumb_func_end ov23_02252CE0 - - thumb_func_start ov23_02252CF4 -ov23_02252CF4: ; 0x02252CF4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov23_022421BC - add r1, r5, #0 - add r2, r4, #0 - bl ov23_022541B4 - pop {r3, r4, r5, pc} - thumb_func_end ov23_02252CF4 - - thumb_func_start ov23_02252D08 -ov23_02252D08: ; 0x02252D08 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov23_022421BC - add r1, r5, #0 - add r2, r4, #0 - bl ov23_022541C8 - pop {r3, r4, r5, pc} - thumb_func_end ov23_02252D08 - - thumb_func_start ov23_02252D1C -ov23_02252D1C: ; 0x02252D1C - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - add r0, #0x20 - bl sub_0201A7CC - cmp r0, #0 - bne _02252D5A - mov r0, #0xc - str r0, [sp] - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r3, #1 - str r3, [sp, #0x10] - ldr r0, [r4, #0xc] - add r1, r4, #0 - ldr r0, [r0, #8] - add r1, #0x20 - mov r2, #3 - bl sub_0201A7E8 - add r0, r4, #0 - ldr r2, _02252D70 ; =0x000003D9 - add r0, #0x20 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 -_02252D5A: - add r0, r4, #0 - add r0, #0x20 - mov r1, #0xf - bl sub_0201ADA4 - add r4, #0x20 - add r0, r4, #0 - bl sub_0201A954 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_02252D70: .word 0x000003D9 - thumb_func_end ov23_02252D1C - - thumb_func_start ov23_02252D74 -ov23_02252D74: ; 0x02252D74 - push {r4, r5, lr} - sub sp, #0x14 - mov r3, #1 - add r5, r0, #0 - str r3, [sp] - mov r0, #7 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x33 - str r0, [sp, #0x10] - ldr r0, [r5, #0xc] - add r4, r1, #0 - add r1, r5, #0 - ldr r0, [r0, #8] - add r1, #0x30 - mov r2, #3 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02252DF0 ; =0x000003D9 - add r0, #0x30 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - add r0, #0x30 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x30 - bl sub_0201A954 - bl ov23_022421BC - bl ov23_02253E3C - ldr r2, [r5, #0x68] - add r1, r4, #0 - bl sub_0200B1B8 - mov r3, #1 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r0, r5, #0 - ldr r2, [r5, #0x68] - add r0, #0x30 - bl sub_0201D738 - add r5, #0x30 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_02252DF0: .word 0x000003D9 - thumb_func_end ov23_02252D74 - - thumb_func_start ov23_02252DF4 -ov23_02252DF4: ; 0x02252DF4 - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl sub_0201A7CC - cmp r0, #0 - beq _02252E14 - add r0, r4, #0 - add r0, #0x30 - mov r1, #1 - bl sub_0200DC9C - add r4, #0x30 - add r0, r4, #0 - bl sub_0201A8FC -_02252E14: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02252DF4 - - thumb_func_start ov23_02252E18 -ov23_02252E18: ; 0x02252E18 - push {r4, lr} - add r4, r0, #0 - add r0, #0x30 - bl sub_0201A7CC - cmp r0, #0 - beq _02252E38 - add r0, r4, #0 - add r0, #0x30 - mov r1, #0 - bl sub_0200DC9C - add r4, #0x30 - add r0, r4, #0 - bl sub_0201A8FC -_02252E38: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02252E18 - - thumb_func_start ov23_02252E3C -ov23_02252E3C: ; 0x02252E3C - push {r3, r4, r5, lr} - ldr r5, _02252E6C ; =0x02257674 - mov r3, #0 -_02252E42: - ldrh r4, [r5, #2] - cmp r0, r4 - bne _02252E5C - ldrh r4, [r5, #4] - cmp r1, r4 - bne _02252E5C - mov r0, #6 - add r1, r3, #0 - mul r1, r0 - ldr r0, _02252E6C ; =0x02257674 - str r3, [r2, #0] - ldrh r0, [r0, r1] - pop {r3, r4, r5, pc} -_02252E5C: - add r3, r3, #1 - add r5, r5, #6 - cmp r3, #0x14 - blt _02252E42 - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02252E6C: .word 0x02257674 - thumb_func_end ov23_02252E3C - - thumb_func_start ov23_02252E70 -ov23_02252E70: ; 0x02252E70 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _022531A8 ; =0x00000246 - add r4, r1, #0 - ldrb r1, [r4, r0] - cmp r1, #0x12 - bhi _02252F40 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02252E8C: ; jump table - .short _02252EB2 - _02252E8C - 2 ; case 0 - .short _02252ED2 - _02252E8C - 2 ; case 1 - .short _02252EE8 - _02252E8C - 2 ; case 2 - .short _02252EF8 - _02252E8C - 2 ; case 3 - .short _02252F9C - _02252E8C - 2 ; case 4 - .short _02252FB2 - _02252E8C - 2 ; case 5 - .short _0225307E - _02252E8C - 2 ; case 6 - .short _0225309E - _02252E8C - 2 ; case 7 - .short _02253104 - _02252E8C - 2 ; case 8 - .short _02253200 - _02252E8C - 2 ; case 9 - .short _02253252 - _02252E8C - 2 ; case 10 - .short _022531F0 - _02252E8C - 2 ; case 11 - .short _02253278 - _02252E8C - 2 ; case 12 - .short _022532F0 - _02252E8C - 2 ; case 13 - .short _02253384 - _02252E8C - 2 ; case 14 - .short _022533AE - _02252E8C - 2 ; case 15 - .short _022533F8 - _02252E8C - 2 ; case 16 - .short _0225343A - _02252E8C - 2 ; case 17 - .short _0225344A - _02252E8C - 2 ; case 18 -_02252EB2: - add r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #2 - bne _02252EC2 - mov r0, #0x1b - bl ov23_02252C9C - b _02252EC8 -_02252EC2: - mov r0, #0 - bl ov23_02252C9C -_02252EC8: - ldr r0, _022531A8 ; =0x00000246 - mov r1, #1 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252ED2: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02252F40 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #2 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252EE8: - add r0, r4, #0 - bl ov23_022524B8 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #3 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252EF8: - ldr r0, [r4, #0x48] - bl sub_02001288 - add r5, r0, #0 - add r1, sp, #4 - ldr r0, [r4, #0x48] - add r1, #2 - add r2, sp, #4 - bl sub_020014DC - add r2, sp, #4 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #0x13 - bl ov23_022430E0 - ldr r1, _022531AC ; =0x0000024A - ldr r0, [r4, #0x48] - ldrh r6, [r4, r1] - add r1, r4, r1 - bl sub_020014D0 - ldr r0, _022531AC ; =0x0000024A - ldrh r0, [r4, r0] - cmp r6, r0 - beq _02252F32 - ldr r0, _022531B0 ; =0x000005DC - bl sub_02005748 -_02252F32: - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _02252F44 - add r0, r0, #1 - cmp r5, r0 - bne _02252F42 -_02252F40: - b _02253478 -_02252F42: - b _02252F5C -_02252F44: - ldr r0, _022531B0 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #0 - bl ov23_02252B90 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #0x11 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252F5C: - mov r1, #0x92 - lsl r1, r1, #2 - ldrb r0, [r4, r1] - cmp r0, #2 - bne _02252F76 - mov r2, #1 - sub r0, r1, #1 - strb r2, [r4, r0] - mov r2, #0xc - sub r0, r1, #2 - add sp, #8 - strb r2, [r4, r0] - pop {r4, r5, r6, pc} -_02252F76: - sub r0, r1, #1 - strb r5, [r4, r0] - cmp r5, #0 - ldr r0, _022531B0 ; =0x000005DC - bne _02252F8E - bl sub_02005748 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #4 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252F8E: - bl sub_02005748 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #0xc - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252F9C: - add r0, r4, #0 - bl ov23_02252D1C - add r0, r4, #0 - bl ov23_02252A18 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #5 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02252FB2: - ldr r0, [r4, #0x48] - bl sub_02001288 - add r5, r0, #0 - add r1, sp, #4 - ldr r0, [r4, #0x48] - add r1, #2 - add r2, sp, #4 - bl sub_020014DC - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - add r2, sp, #4 - ldrh r1, [r2] - add r0, #0xd - lsl r0, r0, #0x10 - ldrh r2, [r2, #2] - lsr r0, r0, #0x10 - bl ov23_022430E0 - ldr r1, _022531AC ; =0x0000024A - ldr r0, [r4, #0x48] - ldrh r6, [r4, r1] - add r1, r4, r1 - bl sub_020014D0 - ldr r0, _022531AC ; =0x0000024A - ldrh r0, [r4, r0] - cmp r6, r0 - beq _02252FF6 - ldr r0, _022531B0 ; =0x000005DC - bl sub_02005748 -_02252FF6: - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _02253000 - add r5, r0, #0 -_02253000: - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - beq _02253010 - bl ov23_022421DC - bl ov23_02254044 -_02253010: - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _02253020 - add r0, r0, #1 - cmp r5, r0 - beq _02253110 - b _02253038 -_02253020: - ldr r0, _022531B0 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - mov r1, #1 - bl ov23_02252B90 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #2 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253038: - ldr r0, _022531B0 ; =0x000005DC - bl sub_02005748 - mov r1, #0x91 - lsl r1, r1, #2 - strb r5, [r4, r1] - add r0, r1, #4 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0225305C - ldrb r2, [r4, r1] - sub r1, #0x34 - mov r0, #2 - add r2, r4, r2 - ldrb r1, [r2, r1] - bl ov23_02252CF4 - b _0225306E -_0225305C: - cmp r0, #0 - bne _0225306E - ldrb r2, [r4, r1] - sub r1, #0x34 - mov r0, #2 - add r2, r4, r2 - ldrb r1, [r2, r1] - bl ov23_02252D08 -_0225306E: - mov r0, #1 - bl ov23_02252C9C - ldr r0, _022531A8 ; =0x00000246 - mov r1, #6 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_0225307E: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02253110 - ldr r0, _022531B4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _02253110 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #7 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_0225309E: - add r0, r4, #0 - bl ov23_0224FB7C - mov r0, #0xc - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xc - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - bl ov23_02250184 - add r0, r4, #0 - mov r1, #0x13 - bl ov23_02252D74 - mov r2, #0x92 - lsl r2, r2, #2 - ldrb r0, [r4, r2] - cmp r0, #1 - bne _022530E6 - sub r1, r2, #4 - ldrb r1, [r4, r1] - sub r2, #0x38 - mov r0, #2 - add r1, r4, r1 - ldrb r1, [r1, r2] - bl ov23_02252CF4 - b _022530FA -_022530E6: - cmp r0, #0 - bne _022530FA - sub r1, r2, #4 - ldrb r1, [r4, r1] - sub r2, #0x38 - mov r0, #2 - add r1, r4, r1 - ldrb r1, [r1, r2] - bl ov23_02252D08 -_022530FA: - ldr r0, _022531A8 ; =0x00000246 - mov r1, #8 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253104: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - beq _02253112 -_02253110: - b _02253478 -_02253112: - ldr r0, [r4, #0x4c] - bl ov23_02248D20 - add r5, r0, #0 - ldr r0, [r4, #0x4c] - add r1, sp, #4 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #4 - bl sub_020014DC - add r2, sp, #4 - ldrh r1, [r2] - ldrh r2, [r2, #2] - mov r0, #0xc - bl ov23_022430E0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - beq _02253144 - bl ov23_022421DC - bl ov23_02254044 -_02253144: - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _02253154 - add r0, r0, #1 - cmp r5, r0 - beq _02253216 - b _02253164 -_02253154: - add r0, r4, #0 - bl ov23_02252DF4 - ldr r0, _022531A8 ; =0x00000246 - mov r1, #4 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253164: - mov r1, #0x91 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - add r0, r4, #0 - add r2, r5, #0 - bl ov23_02252404 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov23_02252B90 - add r0, r4, #0 - bl ov23_02252DF4 - ldr r1, _022531B8 ; =0x0000FFFC - cmp r5, r1 - bne _02253198 - mov r0, #3 - bl ov23_02252C9C - ldr r0, _022531A8 ; =0x00000246 - mov r1, #0xa - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253198: - add r0, r1, #1 - cmp r5, r0 - bne _022531C4 - mov r0, #4 - bl ov23_02252C9C - ldr r0, _022531A8 ; =0x00000246 - b _022531BC - ; .align 2, 0 -_022531A8: .word 0x00000246 -_022531AC: .word 0x0000024A -_022531B0: .word 0x000005DC -_022531B4: .word 0x021BF67C -_022531B8: .word 0x0000FFFC -_022531BC: - mov r1, #0xa - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_022531C4: - sub r0, r1, #1 - cmp r5, r0 - bne _022531DA - mov r0, #5 - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xa - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_022531DA: - mov r0, #0x91 - lsl r0, r0, #2 - strb r5, [r4, r0] - mov r0, #2 - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #9 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_022531F0: - mov r0, #3 - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xa - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253200: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02253216 - ldr r0, _02253480 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _02253218 -_02253216: - b _02253478 -_02253218: - mov r1, #0x92 - lsl r1, r1, #2 - ldrb r0, [r4, r1] - cmp r0, #1 - bne _0225322E - sub r1, r1, #4 - ldrb r1, [r4, r1] - mov r0, #2 - bl ov23_02252CF4 - b _0225323C -_0225322E: - cmp r0, #0 - bne _0225323C - sub r1, r1, #4 - ldrb r1, [r4, r1] - mov r0, #2 - bl ov23_02252D08 -_0225323C: - mov r0, #6 - bl ov23_02252C9C - ldr r0, _02253484 ; =0x000005E3 - bl sub_02005748 - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xa - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253252: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02253354 - ldr r0, _02253480 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _02253354 - mov r0, #8 - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #2 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253278: - add r0, r4, #0 - bl ov23_02252D1C - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - add r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov23_0224318C - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - add r1, #0x1c - ldrb r0, [r4, r1] - add r0, #0x10 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov23_02243154 - mov r1, #0x23 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, _02253488 ; =ov23_02252754 - add r1, #0x18 - str r0, [r4, #0x60] - ldrb r0, [r4, r1] - cmp r0, #1 - bne _022532C4 - add r0, r4, #0 - bl ov23_0224FDBC - add r0, r4, #0 - mov r1, #0x14 - bl ov23_02252D74 - b _022532E6 -_022532C4: - cmp r0, #0 - bne _022532D8 - add r0, r4, #0 - bl ov23_02250CB0 - add r0, r4, #0 - mov r1, #0x15 - bl ov23_02252D74 - b _022532E6 -_022532D8: - add r0, r4, #0 - bl ov23_02250578 - add r0, r4, #0 - mov r1, #0x1d - bl ov23_02252D74 -_022532E6: - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xd - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_022532F0: - ldr r0, [r4, #0x4c] - bl ov23_02248D20 - add r5, r0, #0 - ldr r0, [r4, #0x4c] - add r1, sp, #4 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #4 - bl sub_020014DC - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - add r2, sp, #4 - ldrh r1, [r2] - add r0, #0x10 - lsl r0, r0, #0x10 - ldrh r2, [r2, #2] - lsr r0, r0, #0x10 - bl ov23_022430E0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _0225332C - add r0, r0, #1 - cmp r5, r0 - beq _02253354 - b _0225334C -_0225332C: - bl ov23_022421DC - bl ov23_02254044 - add r0, r4, #0 - mov r1, #1 - bl ov23_02252B90 - add r0, r4, #0 - bl ov23_02252DF4 - ldr r0, _0225347C ; =0x00000246 - mov r1, #2 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_0225334C: - ldr r0, _0225348C ; =0x00000215 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _02253356 -_02253354: - b _02253478 -_02253356: - bl ov23_022421DC - bl ov23_02254044 - mov r0, #0x91 - lsl r0, r0, #2 - strb r5, [r4, r0] - add r0, r4, #0 - mov r1, #1 - bl ov23_02252B90 - add r0, r4, #0 - bl ov23_02252DF4 - add r0, r5, #0 - add r1, r4, #0 - bl ov23_02252BB8 - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xe - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_02253384: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02253478 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0xc] - ldr r1, _02253490 ; =0x022569D8 - ldr r0, [r0, #8] - ldr r2, _02253494 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x5c] - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xf - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_022533AE: - ldr r0, [r4, #0x5c] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02253478 - cmp r0, #0 - bne _022533EA - add r0, r4, #0 - bl ov23_02252C08 - ldr r1, _02253498 ; =0x0000FFFC - cmp r0, r1 - bne _022533DC - mov r0, #3 - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xa - strb r1, [r4, r0] - b _022533F0 -_022533DC: - mov r0, #0xb - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #0x10 - strb r1, [r4, r0] - b _022533F0 -_022533EA: - ldr r0, _0225347C ; =0x00000246 - mov r1, #0x11 - strb r1, [r4, r0] -_022533F0: - mov r0, #0 - add sp, #8 - str r0, [r4, #0x5c] - pop {r4, r5, r6, pc} -_022533F8: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02253478 - ldr r0, _02253480 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _02253478 - bl ov23_022421BC - ldr r1, _0225349C ; =0x0000021A - ldrb r1, [r4, r1] - bl ov23_0225412C - ldr r1, _0225348C ; =0x00000215 - mov r0, #2 - ldrb r1, [r4, r1] - bl ov23_02252CE0 - mov r0, #7 - bl ov23_02252C9C - ldr r0, _02253484 ; =0x000005E3 - bl sub_02005748 - ldr r0, _0225347C ; =0x00000246 - mov r1, #0xa - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_0225343A: - mov r0, #9 - bl ov23_02252C9C - ldr r0, _0225347C ; =0x00000246 - mov r1, #0x12 - add sp, #8 - strb r1, [r4, r0] - pop {r4, r5, r6, pc} -_0225344A: - bl ov23_022421BC - bl ov23_02254238 - cmp r0, #0 - bne _02253478 - ldr r0, _02253480 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _02253478 - bl ov23_02252CD4 - add r0, r4, #0 - bl ov23_02252C78 - bl ov23_02243204 - add r0, r5, #0 - bl sub_0200DA58 - bl sub_02059514 -_02253478: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225347C: .word 0x00000246 -_02253480: .word 0x021BF67C -_02253484: .word 0x000005E3 -_02253488: .word ov23_02252754 -_0225348C: .word 0x00000215 -_02253490: .word 0x022569D8 -_02253494: .word 0x000003D9 -_02253498: .word 0x0000FFFC -_0225349C: .word 0x0000021A - thumb_func_end ov23_02252E70 - - thumb_func_start ov23_022534A0 -ov23_022534A0: ; 0x022534A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r0, #0 - bl sub_0203608C - bl sub_02058D88 - str r0, [sp, #8] - bl sub_0203608C - bl sub_02058DC0 - str r0, [sp, #4] - bl sub_0203608C - bl sub_02058F50 - bl sub_02059328 - str r0, [sp] - ldr r0, [sp, #8] - ldr r1, [sp, #4] - add r2, sp, #0xc - bl ov23_02252E3C - add r5, r0, #0 - add r0, r5, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov23_022430D0 - mov r1, #0x25 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x25 - mov r1, #0 - lsl r2, r2, #4 - add r6, r0, #0 - bl sub_020C4CF4 - mov r0, #0x92 - str r4, [r6, #0xc] - lsl r0, r0, #2 - strb r5, [r6, r0] - ldr r1, [sp, #0xc] - sub r0, #0x24 - str r1, [r6, r0] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r6, #0x68] - mov r0, #0x64 - mov r1, #4 - bl sub_02023790 - str r0, [r6, #0x6c] - mov r0, #4 - bl sub_0200B358 - str r0, [r6, #0x70] - ldr r0, _02253584 ; =0x00000246 - mov r1, #0 - strb r1, [r6, r0] - ldr r0, _02253588 ; =0x000005DC - bl sub_02005748 - ldr r0, _0225358C ; =ov23_02252E70 - ldr r2, _02253590 ; =0x00002710 - add r1, r6, #0 - bl sub_0200D9E8 - str r0, [r6, #4] - ldr r1, [r6, #4] - ldr r2, _02253594 ; =ov23_02251270 - add r0, r6, #0 - bl ov23_022431EC - ldr r0, [r6, #0xc] - bl sub_0203A4B4 - add r7, r0, #0 - ldr r0, [r6, #0xc] - bl sub_0203A4BC - add r5, r0, #0 - mov r4, #0 - cmp r7, #0 - ble _0225357E -_02253556: - ldrh r1, [r5, #0x18] - ldr r0, [sp, #8] - cmp r0, r1 - bne _02253576 - ldrh r1, [r5, #0x1a] - ldr r0, [sp, #4] - cmp r0, r1 - bne _02253576 - ldr r0, [r6, #0xc] - add r1, r4, #0 - ldr r0, [r0, #0x38] - bl sub_0206251C - ldr r1, [sp] - bl sub_02062974 -_02253576: - add r4, r4, #1 - add r5, #0x20 - cmp r4, r7 - blt _02253556 -_0225357E: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02253584: .word 0x00000246 -_02253588: .word 0x000005DC -_0225358C: .word ov23_02252E70 -_02253590: .word 0x00002710 -_02253594: .word ov23_02251270 - thumb_func_end ov23_022534A0 - - thumb_func_start ov23_02253598 -ov23_02253598: ; 0x02253598 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - mov r1, #0 - mov r2, #0x30 - add r5, r0, #0 - bl sub_020C4CF4 - ldr r0, _022535C8 ; =0x022577BC - str r5, [r0, #0] - str r6, [r5, #8] - ldr r0, [r0, #0] - str r4, [r0, #0xc] - mov r0, #0xf - bl sub_0202855C - ldr r1, _022535C8 ; =0x022577BC - ldr r2, [r1, #0] - str r0, [r2, #0x10] - ldr r0, [r1, #0] - add r0, #0x14 - bl sub_020361BC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022535C8: .word 0x022577BC - thumb_func_end ov23_02253598 - - thumb_func_start ov23_022535CC -ov23_022535CC: ; 0x022535CC - push {r3, lr} - ldr r0, _022535E8 ; =0x022577BC - ldr r0, [r0, #0] - ldr r0, [r0, #0x10] - bl sub_020181C4 - ldr r0, _022535E8 ; =0x022577BC - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, _022535E8 ; =0x022577BC - mov r1, #0 - str r1, [r0, #0] - pop {r3, pc} - ; .align 2, 0 -_022535E8: .word 0x022577BC - thumb_func_end ov23_022535CC - - thumb_func_start ov23_022535EC -ov23_022535EC: ; 0x022535EC - push {r3, lr} - ldr r0, _02253600 ; =0x022577BC - ldr r1, [r0, #0] - ldr r0, [r1, #4] - cmp r0, #0 - beq _022535FE - ldr r1, [r1, #0] - bl ov23_022537D4 -_022535FE: - pop {r3, pc} - ; .align 2, 0 -_02253600: .word 0x022577BC - thumb_func_end ov23_022535EC - - thumb_func_start ov23_02253604 -ov23_02253604: ; 0x02253604 - bx lr - ; .align 2, 0 - thumb_func_end ov23_02253604 - - thumb_func_start ov23_02253608 -ov23_02253608: ; 0x02253608 - mov r0, #0x30 - bx lr - thumb_func_end ov23_02253608 - - thumb_func_start ov23_0225360C -ov23_0225360C: ; 0x0225360C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r7, r0, #0 - mov r0, #4 - str r1, [sp, #0xc] - add r5, r2, #0 - str r3, [sp, #0x10] - bl sub_0200B358 - str r0, [sp, #0x1c] - mov r0, #0x1e - mov r1, #4 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x1e - mov r1, #4 - bl sub_02023790 - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - mov r1, #0 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #1 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r7, #0 - add r2, r4, #0 - mov r3, #2 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0xc] - mov r1, #1 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0x11 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r7, #0 - add r2, r4, #0 - mov r3, #2 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0xc] - mov r1, #2 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #1 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r7, #0 - add r2, r4, #0 - mov r3, #0x84 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r5, #0 - bl sub_02025F24 - add r2, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - mov r1, #6 - mov r3, #5 - bl sub_0200B60C - ldr r0, [sp, #0xc] - mov r1, #5 - add r2, r4, #0 - bl sub_0200B1B8 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - add r2, r4, #0 - bl sub_0200C388 - mov r0, #1 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r2, [sp, #0x18] - add r0, r7, #0 - mov r3, #0x94 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x1c] - mov r1, #0 - add r2, r5, #0 - bl sub_0200B498 - ldr r0, [sp, #0xc] - mov r1, #4 - add r2, r4, #0 - bl sub_0200B1B8 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - add r2, r4, #0 - bl sub_0200C388 - mov r0, #1 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r2, [sp, #0x18] - add r0, r7, #0 - mov r3, #0x39 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x10] - bl sub_0202958C - add r1, r0, #0 - ldr r0, [sp, #0xc] - add r1, #0x14 - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0x11 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r7, #0 - add r2, r4, #0 - mov r3, #0x39 - str r1, [sp, #8] - bl sub_0201D738 - mov r5, #0 - mov r6, #0x27 -_02253738: - ldr r0, [sp, #0xc] - add r1, r5, #6 - add r2, r4, #0 - bl sub_0200B1B8 - str r6, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r7, #0 - mov r1, #0 - add r2, r4, #0 - mov r3, #2 - bl sub_0201D738 - add r5, r5, #1 - add r6, #0x10 - cmp r5, #7 - blt _02253738 - mov r0, #0 - ldr r6, _022537D0 ; =0x022576EC - str r0, [sp, #0x14] - mov r5, #0x27 -_02253768: - ldr r0, [sp, #0x10] - ldr r1, [r6, #0] - blx r1 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r1, #6 - ldr r0, [sp, #0x1c] - add r3, r1, #0 - bl sub_0200B60C - ldr r0, [sp, #0xc] - mov r1, #0xd - add r2, r4, #0 - bl sub_0200B1B8 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - add r2, r4, #0 - bl sub_0200C388 - str r5, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r2, [sp, #0x18] - add r0, r7, #0 - mov r1, #0 - mov r3, #0x94 - bl sub_0201D738 - ldr r0, [sp, #0x14] - add r6, r6, #4 - add r0, r0, #1 - add r5, #0x10 - str r0, [sp, #0x14] - cmp r0, #7 - blt _02253768 - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_0200B3F0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_022537D0: .word 0x022576EC - thumb_func_end ov23_0225360C - - thumb_func_start ov23_022537D4 -ov23_022537D4: ; 0x022537D4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #8 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #8 - bl sub_0201A8FC - ldr r1, [r4, #0] - cmp r1, #0 - beq _022537FE - ldr r0, [r4, #4] - blx r1 -_022537FE: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, _02253818 ; =0x022577BC - mov r2, #0 - ldr r1, [r0, #0] - str r2, [r1, #4] - ldr r0, [r0, #0] - str r2, [r0, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02253818: .word 0x022577BC - thumb_func_end ov23_022537D4 - - thumb_func_start ov23_0225381C -ov23_0225381C: ; 0x0225381C - push {r3, lr} - ldr r2, _02253830 ; =0x021BF67C - ldr r3, [r2, #0x48] - mov r2, #3 - tst r2, r3 - beq _0225382C - bl ov23_022537D4 -_0225382C: - pop {r3, pc} - nop -_02253830: .word 0x021BF67C - thumb_func_end ov23_0225381C - - thumb_func_start ov23_02253834 -ov23_02253834: ; 0x02253834 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - str r1, [sp, #0x14] - mov r0, #4 - mov r1, #0x2c - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x2c - bl sub_020C4CF4 - str r5, [r4, #0] - add r1, r4, #0 - str r6, [r4, #4] - mov r0, #2 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x13 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - add r0, r7, #0 - add r1, #8 - mov r2, #3 - mov r3, #4 - bl sub_0201A7E8 - add r0, r4, #0 - ldr r2, _022538EC ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r2, #0xa - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #6 - mov r3, #4 - bl sub_0200B144 - add r5, r0, #0 - add r0, r4, #0 - add r0, #8 - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [sp, #0x30] - cmp r0, #0 - beq _022538AE - ldr r0, _022538F0 ; =0x022577BC - ldr r0, [r0, #0] - ldr r3, [r0, #0xc] - b _022538B4 -_022538AE: - ldr r0, _022538F0 ; =0x022577BC - ldr r0, [r0, #0] - ldr r3, [r0, #0x10] -_022538B4: - add r0, r4, #0 - ldr r2, [sp, #0x14] - add r0, #8 - add r1, r5, #0 - bl ov23_0225360C - add r0, r4, #0 - add r0, #8 - bl sub_0201A9A4 - ldr r0, _022538F4 ; =0x000005FD - bl sub_02005748 - ldr r0, _022538F8 ; =ov23_0225381C - add r1, r4, #0 - mov r2, #0xa - bl sub_0200D9E8 - ldr r1, _022538F0 ; =0x022577BC - ldr r2, [r1, #0] - str r0, [r2, #4] - ldr r0, [r1, #0] - str r4, [r0, #0] - add r0, r5, #0 - bl sub_0200B190 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022538EC: .word 0x000003D9 -_022538F0: .word 0x022577BC -_022538F4: .word 0x000005FD -_022538F8: .word ov23_0225381C - thumb_func_end ov23_02253834 - - thumb_func_start ov23_022538FC -ov23_022538FC: ; 0x022538FC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_02028558 - add r4, r0, #0 - ldr r0, _02253960 ; =0x022577BC - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_0202CD88 - bl sub_0202D034 - add r6, r0, #0 - mov r0, #4 - add r1, r4, #1 - bl sub_02018144 - mov r1, #0 - add r2, r4, #1 - add r5, r0, #0 - bl sub_020C4CF4 - ldr r0, _02253964 ; =0x000F423F - strb r7, [r5] - cmp r6, r0 - blt _02253932 - add r6, r0, #0 -_02253932: - ldr r0, _02253960 ; =0x022577BC - add r1, r6, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020294D4 - ldr r0, _02253960 ; =0x022577BC - add r1, r5, #1 - ldr r0, [r0, #0] - add r2, r4, #0 - ldr r0, [r0, #0xc] - bl sub_020C4DB0 - mov r0, #0x51 - add r1, r5, #0 - add r2, r4, #1 - bl sub_020359DC - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_02253960: .word 0x022577BC -_02253964: .word 0x000F423F - thumb_func_end ov23_022538FC - - thumb_func_start ov23_02253968 -ov23_02253968: ; 0x02253968 - push {r3, lr} - ldr r0, _02253990 ; =0x022577BC - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_0202CD88 - bl sub_0202D034 - add r1, r0, #0 - ldr r0, _02253994 ; =0x000F423F - cmp r1, r0 - blt _02253982 - add r1, r0, #0 -_02253982: - ldr r0, _02253990 ; =0x022577BC - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020294D4 - pop {r3, pc} - nop -_02253990: .word 0x022577BC -_02253994: .word 0x000F423F - thumb_func_end ov23_02253968 - - thumb_func_start ov23_02253998 -ov23_02253998: ; 0x02253998 - add r3, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, _022539A4 ; =sub_02035AC4 - mov r0, #0x52 - bx r3 - ; .align 2, 0 -_022539A4: .word sub_02035AC4 - thumb_func_end ov23_02253998 - - thumb_func_start ov23_022539A8 -ov23_022539A8: ; 0x022539A8 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - bl sub_0203608C - ldrb r1, [r4] - cmp r1, r0 - bne _022539D0 - ldr r1, _022539D4 ; =0x022577BC - add r0, r4, #1 - ldr r1, [r1, #0] - sub r2, r5, #1 - ldr r1, [r1, #0x10] - bl sub_020C4DB0 - ldr r0, _022539D4 ; =0x022577BC - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x2c - strb r1, [r0] -_022539D0: - pop {r3, r4, r5, pc} - nop -_022539D4: .word 0x022577BC - thumb_func_end ov23_022539A8 - - thumb_func_start ov23_022539D8 -ov23_022539D8: ; 0x022539D8 - ldr r0, _022539E4 ; =0x022577BC - ldr r0, [r0, #0] - add r0, #0x2c - ldrb r0, [r0] - bx lr - nop -_022539E4: .word 0x022577BC - thumb_func_end ov23_022539D8 - - thumb_func_start ov23_022539E8 -ov23_022539E8: ; 0x022539E8 - ldr r0, _022539F4 ; =0x022577BC - mov r1, #0 - ldr r0, [r0, #0] - add r0, #0x2c - strb r1, [r0] - bx lr - ; .align 2, 0 -_022539F4: .word 0x022577BC - thumb_func_end ov23_022539E8 - - thumb_func_start ov23_022539F8 -ov23_022539F8: ; 0x022539F8 - ldr r3, _022539FC ; =sub_02059514 - bx r3 - ; .align 2, 0 -_022539FC: .word sub_02059514 - thumb_func_end ov23_022539F8 - - thumb_func_start ov23_02253A00 -ov23_02253A00: ; 0x02253A00 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - sub r0, #0x20 - lsl r1, r0, #2 - ldr r0, _02253A70 ; =0x022576EC - cmp r5, #0x20 - ldr r4, [r0, r1] - bge _02253A18 - bl sub_02022974 -_02253A18: - cmp r5, #0x2d - ble _02253A20 - bl sub_02022974 -_02253A20: - bl sub_020594FC - bl ov23_022421BC - mov r1, #0xa - lsl r1, r1, #6 - mov r2, #1 - bl ov23_02253DFC - mov r0, #4 - bl sub_0202855C - add r6, r0, #0 - bl sub_02028558 - add r2, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl sub_020C4DB0 - add r0, r6, #0 - blx r4 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020181C4 - bl ov23_022421BC - add r1, r4, #0 - bl ov23_02254178 - bl ov23_022421BC - ldr r3, _02253A74 ; =ov23_022539F8 - add r1, r5, #0 - mov r2, #1 - bl ov23_02253F40 - pop {r3, r4, r5, r6, r7, pc} - nop -_02253A70: .word 0x022576EC -_02253A74: .word ov23_022539F8 - thumb_func_end ov23_02253A00 - - thumb_func_start ov23_02253A78 -ov23_02253A78: ; 0x02253A78 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #0xc] - ldr r0, [sp, #0x40] - str r1, [sp, #0x10] - str r0, [sp, #0x40] - mov r0, #4 - add r5, r2, #0 - str r3, [sp, #0x14] - bl sub_0200B358 - add r7, r0, #0 - mov r0, #0x28 - mov r1, #4 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x28 - mov r1, #4 - bl sub_02023790 - add r6, r0, #0 - add r0, r7, #0 - mov r1, #1 - add r2, r5, #0 - bl sub_0200B498 - ldr r0, [sp, #0x10] - mov r1, #0xc - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - mov r0, #1 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0xc] - add r2, r6, #0 - mov r3, #2 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x10] - mov r1, #0xd - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0x12 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0xc] - add r2, r4, #0 - mov r3, #2 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x14] - bl sub_020295B8 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r1, #6 - str r0, [sp, #4] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B60C - ldr r0, [sp, #0x10] - mov r1, #0xe - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - mov r0, #0x12 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0xc] - add r2, r6, #0 - mov r3, #0x66 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x10] - mov r1, #0xf - add r2, r4, #0 - bl sub_0200B1B8 - mov r0, #0x34 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0xc] - add r2, r4, #0 - mov r3, #2 - str r1, [sp, #8] - bl sub_0201D738 - mov r5, #0 - str r5, [sp, #0x20] -_02253B5E: - ldr r0, [sp, #0x40] - ldr r2, [sp, #0x20] - mov r1, #4 - bl sub_020288C8 - str r0, [sp, #0x24] - cmp r0, #0 - beq _02253BF8 - ldr r2, [sp, #0x24] - add r0, r7, #0 - mov r1, #0 - bl sub_0200B498 - ldr r0, [sp, #0x10] - mov r1, #0x10 - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - add r0, r5, #0 - str r0, [sp, #0x1c] - add r0, #0x45 - str r0, [sp, #0x1c] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - mov r1, #0 - add r2, r6, #0 - mov r3, #2 - bl sub_0201D738 - ldr r0, [sp, #0x24] - bl sub_02025F24 - add r2, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #1 - mov r1, #5 - str r0, [sp, #4] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B60C - ldr r0, [sp, #0x10] - mov r1, #0x11 - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x1c] - mov r1, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r2, r6, #0 - mov r3, #0x66 - bl sub_0201D738 - ldr r0, [sp, #0x24] - bl sub_020181C4 - b _02253C42 -_02253BF8: - ldr r0, [sp, #0x10] - mov r1, #0x33 - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r5, #0 - str r0, [sp, #0x18] - add r0, #0x45 - str r0, [sp, #0x18] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - mov r1, #0 - add r2, r4, #0 - mov r3, #2 - bl sub_0201D738 - ldr r0, [sp, #0x10] - mov r1, #0x34 - add r2, r4, #0 - bl sub_0200B1B8 - ldr r0, [sp, #0x18] - mov r1, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r2, r4, #0 - mov r3, #0x66 - bl sub_0201D738 -_02253C42: - ldr r0, [sp, #0x20] - add r5, #0x11 - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #5 - blt _02253B5E - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_02253A78 - - thumb_func_start ov23_02253C64 -ov23_02253C64: ; 0x02253C64 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - str r1, [sp, #0x14] - mov r0, #4 - mov r1, #0x2c - add r6, r2, #0 - add r4, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x2c - add r5, r0, #0 - bl sub_020C4CF4 - add r1, r5, #0 - ldr r0, [sp, #0x30] - str r4, [r5, #0] - str r0, [r5, #4] - mov r0, #2 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x13 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - add r0, r7, #0 - add r1, #8 - mov r2, #3 - mov r3, #4 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02253D00 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r2, _02253D04 ; =0x0000027F - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r4, r0, #0 - add r0, r5, #0 - add r0, #8 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - ldr r3, _02253D08 ; =0x022577BC - str r6, [sp] - ldr r3, [r3, #0] - ldr r2, [sp, #0x14] - ldr r3, [r3, #0xc] - add r0, #8 - add r1, r4, #0 - bl ov23_02253A78 - ldr r0, _02253D0C ; =0x000005FD - bl sub_02005748 - add r0, r5, #0 - add r0, #8 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_0200B190 - add r0, r5, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02253D00: .word 0x000003D9 -_02253D04: .word 0x0000027F -_02253D08: .word 0x022577BC -_02253D0C: .word 0x000005FD - thumb_func_end ov23_02253C64 - - thumb_func_start ov23_02253D10 -ov23_02253D10: ; 0x02253D10 - push {r4, lr} - add r4, r0, #0 - add r0, #8 - mov r1, #0 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #8 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #8 - bl sub_0201A8FC - ldr r1, [r4, #0] - cmp r1, #0 - beq _02253D36 - ldr r0, [r4, #4] - blx r1 -_02253D36: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02253D10 - - thumb_func_start ov23_02253D40 -ov23_02253D40: ; 0x02253D40 - ldr r0, _02253D44 ; =0x022569E0 - bx lr - ; .align 2, 0 -_02253D44: .word 0x022569E0 - thumb_func_end ov23_02253D40 - - thumb_func_start ov23_02253D48 -ov23_02253D48: ; 0x02253D48 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x48 - add r7, r2, #0 - str r3, [sp, #4] - ldr r6, [sp, #0x20] - bl sub_02018144 - mov r1, #0 - mov r2, #0x48 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r0, [sp, #0x20] - cmp r0, #0 - bne _02253D70 - mov r6, #0xe6 -_02253D70: - add r0, r6, #0 - add r1, r5, #0 - bl sub_02023790 - str r0, [r4, #0] - add r0, r6, #0 - add r1, r5, #0 - bl sub_02023790 - str r0, [r4, #4] - add r0, r5, #0 - bl sub_0200B358 - str r0, [r4, #0x28] - ldr r0, [sp] - ldr r2, [sp] - str r0, [r4, #0x2c] - mov r0, #1 - mov r1, #0x1a - add r3, r5, #0 - bl sub_0200B144 - str r0, [r4, #0x24] - str r5, [r4, #0x34] - add r0, r4, #0 - str r7, [r4, #0x18] - add r0, #8 - bl sub_0201A7A0 - ldr r1, [r4, #0x44] - mov r0, #1 - bic r1, r0 - mov r0, #2 - bic r1, r0 - str r1, [r4, #0x44] - mov r0, #0 - str r0, [r4, #0x20] - ldr r0, [sp, #4] - ldr r1, _02253DD4 ; =0x0000032D - str r0, [r4, #0x38] - add r0, r4, #0 - add r0, #0x40 - strh r1, [r0] - add r0, r4, #0 - add r1, #0xb5 - add r0, #0x42 - strh r1, [r0] - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02253DD4: .word 0x0000032D - thumb_func_end ov23_02253D48 - - thumb_func_start ov23_02253DD8 -ov23_02253DD8: ; 0x02253DD8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020237BC - ldr r0, [r4, #4] - bl sub_020237BC - ldr r0, [r4, #0x28] - bl sub_0200B3F0 - ldr r0, [r4, #0x24] - bl sub_0200B190 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov23_02253DD8 - - thumb_func_start ov23_02253DFC -ov23_02253DFC: ; 0x02253DFC - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x2c] - add r4, r1, #0 - add r6, r2, #0 - cmp r0, r4 - beq _02253E28 - str r4, [r5, #0x2c] - ldr r0, [r5, #0x24] - bl sub_0200B190 - ldr r3, [r5, #0x34] - add r0, r6, #0 - mov r1, #0x1a - add r2, r4, #0 - bl sub_0200B144 - str r0, [r5, #0x24] - cmp r0, #0 - bne _02253E28 - bl sub_02022974 -_02253E28: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02253DFC - - thumb_func_start ov23_02253E2C -ov23_02253E2C: ; 0x02253E2C - str r1, [r0, #0x18] - add r1, r0, #0 - add r1, #0x42 - strh r2, [r1] - add r0, #0x40 - strh r3, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov23_02253E2C - - thumb_func_start ov23_02253E3C -ov23_02253E3C: ; 0x02253E3C - ldr r0, [r0, #0x24] - bx lr - thumb_func_end ov23_02253E3C - - thumb_func_start ov23_02253E40 -ov23_02253E40: ; 0x02253E40 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x30] - cmp r0, #8 - bge _02253E56 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02253E66 -_02253E56: - ldr r0, _02253E68 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _02253E66 - add r0, r4, #0 - bl ov23_02254044 -_02253E66: - pop {r4, pc} - ; .align 2, 0 -_02253E68: .word 0x021BF67C - thumb_func_end ov23_02253E40 - - thumb_func_start ov23_02253E6C -ov23_02253E6C: ; 0x02253E6C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x44] - ldr r2, [r4, #0] - lsl r0, r0, #0x1e - asr r0, r0, #0x1f - beq _02253E8C - ldr r0, [r4, #0x28] - ldr r1, [r4, #4] - bl sub_0200C388 - ldr r1, [r4, #0x44] - mov r0, #2 - ldr r2, [r4, #4] - bic r1, r0 - str r1, [r4, #0x44] -_02253E8C: - add r0, r2, #0 - pop {r4, pc} - thumb_func_end ov23_02253E6C - - thumb_func_start ov23_02253E90 -ov23_02253E90: ; 0x02253E90 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov23_02253FA4 - bl ov23_022421EC - add r0, r5, #0 - add r0, #8 - bl sub_0201A7CC - cmp r0, #0 - bne _02253ED8 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xc - str r0, [sp, #0xc] - add r0, r5, #0 - add r0, #0x40 - ldrh r0, [r0] - add r1, r5, #0 - add r1, #8 - str r0, [sp, #0x10] - ldr r0, [r5, #0x18] - mov r2, #3 - mov r3, #2 - bl sub_0201A7E8 -_02253ED8: - add r0, r5, #0 - add r0, #8 - mov r1, #0xf - bl sub_0201ADA4 - add r2, r5, #0 - add r2, #0x42 - add r0, r5, #0 - ldrh r2, [r2] - add r0, #8 - mov r1, #1 - mov r3, #0xa - bl sub_0200E060 - cmp r4, #0 - beq _02253F04 - ldr r0, _02253F3C ; =ov23_02253E40 - add r1, r5, #0 - mov r2, #0x64 - bl sub_0200D9E8 - str r0, [r5, #0x20] -_02253F04: - ldr r1, [r5, #0x44] - mov r0, #1 - bic r1, r0 - mov r0, #1 - orr r1, r0 - mov r0, #4 - bic r1, r0 - add r0, r5, #0 - str r1, [r5, #0x44] - bl ov23_02253E6C - mov r3, #0 - str r3, [sp] - add r2, r0, #0 - ldr r0, [r5, #0x38] - mov r1, #1 - str r0, [sp, #4] - add r0, r5, #0 - str r3, [sp, #8] - add r0, #8 - bl sub_0201D738 - str r0, [r5, #0x30] - str r6, [r5, #0x1c] - str r7, [r5, #0x3c] - ldr r0, [r5, #0x30] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02253F3C: .word ov23_02253E40 - thumb_func_end ov23_02253E90 - - thumb_func_start ov23_02253F40 -ov23_02253F40: ; 0x02253F40 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - ldr r0, [r5, #0x24] - ldr r2, [r5, #0] - add r6, r3, #0 - bl sub_0200B1B8 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #0 - bl ov23_02253E90 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02253F40 - - thumb_func_start ov23_02253F60 -ov23_02253F60: ; 0x02253F60 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r4, [r5, #0x38] - mov r6, #0 - str r6, [r5, #0x38] - bl ov23_02253F40 - mov r1, #8 - str r1, [r5, #0x30] - str r4, [r5, #0x38] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02253F60 - - thumb_func_start ov23_02253F78 -ov23_02253F78: ; 0x02253F78 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - ldr r0, [r5, #0x24] - ldr r2, [r5, #0] - add r6, r3, #0 - bl sub_0200B1B8 - ldr r3, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov23_02253E90 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02253F78 - - thumb_func_start ov23_02253F98 -ov23_02253F98: ; 0x02253F98 - ldr r2, [r0, #0x44] - mov r1, #4 - orr r1, r2 - str r1, [r0, #0x44] - bx lr - ; .align 2, 0 - thumb_func_end ov23_02253F98 - - thumb_func_start ov23_02253FA4 -ov23_02253FA4: ; 0x02253FA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0x44] - lsl r0, r1, #0x1f - asr r0, r0, #0x1f - beq _02254040 - mov r0, #1 - bic r1, r0 - str r1, [r5, #0x44] - ldr r0, [r5, #0x30] - cmp r0, #8 - bge _02253FD4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _02253FD4 - ldr r0, [r5, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 -_02253FD4: - cmp r4, #0 - beq _02253FE2 - cmp r4, #1 - beq _02253FEE - cmp r4, #2 - beq _0225400A - b _02254024 -_02253FE2: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl sub_0200E084 - b _02254024 -_02253FEE: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl sub_0200E084 - add r0, r5, #0 - add r0, #8 - bl sub_0201ACF4 - add r0, r5, #0 - add r0, #8 - bl sub_0201A8FC - b _02254024 -_0225400A: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl sub_0200E084 - add r0, r5, #0 - add r0, #8 - bl sub_0201AD10 - add r0, r5, #0 - add r0, #8 - bl sub_0201A8FC -_02254024: - mov r0, #8 - str r0, [r5, #0x30] - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _02254036 - bl sub_0200DA58 - mov r0, #0 - str r0, [r5, #0x20] -_02254036: - ldr r1, [r5, #0x1c] - cmp r1, #0 - beq _02254040 - ldr r0, [r5, #0x3c] - blx r1 -_02254040: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_02253FA4 - - thumb_func_start ov23_02254044 -ov23_02254044: ; 0x02254044 - ldr r3, _0225404C ; =ov23_02253FA4 - mov r1, #2 - bx r3 - nop -_0225404C: .word ov23_02253FA4 - thumb_func_end ov23_02254044 - - thumb_func_start ov23_02254050 -ov23_02254050: ; 0x02254050 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #1 - bl sub_0200B498 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_02254050 - - thumb_func_start ov23_02254068 -ov23_02254068: ; 0x02254068 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #0 - bl sub_0200B498 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_02254068 - - thumb_func_start ov23_02254080 -ov23_02254080: ; 0x02254080 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #2 - bl sub_0200BACC - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_02254080 - - thumb_func_start ov23_02254098 -ov23_02254098: ; 0x02254098 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #3 - bl sub_0200BB04 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_02254098 - - thumb_func_start ov23_022540B0 -ov23_022540B0: ; 0x022540B0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #5 - bl sub_0200BC10 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022540B0 - - thumb_func_start ov23_022540C8 -ov23_022540C8: ; 0x022540C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #5 - bl sub_0200BC48 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022540C8 - - thumb_func_start ov23_022540E0 -ov23_022540E0: ; 0x022540E0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200BC48 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022540E0 - - thumb_func_start ov23_022540F4 -ov23_022540F4: ; 0x022540F4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - add r2, r1, #0 - mov r1, #2 - bl sub_0200BC80 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022540F4 - - thumb_func_start ov23_0225410C -ov23_0225410C: ; 0x0225410C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - ldr r0, [r4, #0x28] - bl sub_0200B60C - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - add sp, #8 - pop {r4, pc} - thumb_func_end ov23_0225410C - - thumb_func_start ov23_0225412C -ov23_0225412C: ; 0x0225412C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r2, r1, #0 - ldr r0, [r4, #0x28] - mov r1, #6 - mov r3, #2 - bl sub_0200B60C - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0225412C - - thumb_func_start ov23_02254154 -ov23_02254154: ; 0x02254154 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0x28] - mov r3, #2 - bl sub_0200B60C - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02254154 - - thumb_func_start ov23_02254178 -ov23_02254178: ; 0x02254178 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - add r2, r1, #0 - str r0, [sp, #4] - mov r1, #6 - ldr r0, [r4, #0x28] - add r3, r1, #0 - bl sub_0200B60C - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02254178 - - thumb_func_start ov23_022541A0 -ov23_022541A0: ; 0x022541A0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200BA94 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022541A0 - - thumb_func_start ov23_022541B4 -ov23_022541B4: ; 0x022541B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200BB04 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022541B4 - - thumb_func_start ov23_022541C8 -ov23_022541C8: ; 0x022541C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200BC80 - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022541C8 - - thumb_func_start ov23_022541DC -ov23_022541DC: ; 0x022541DC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200BACC - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022541DC - - thumb_func_start ov23_022541F0 -ov23_022541F0: ; 0x022541F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - bl sub_0200BB3C - ldr r1, [r4, #0x44] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0x44] - pop {r4, pc} - thumb_func_end ov23_022541F0 - - thumb_func_start ov23_02254204 -ov23_02254204: ; 0x02254204 - ldr r3, _0225420C ; =sub_0200C324 - ldr r0, [r0, #0x28] - bx r3 - nop -_0225420C: .word sub_0200C324 - thumb_func_end ov23_02254204 - - thumb_func_start ov23_02254210 -ov23_02254210: ; 0x02254210 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #8 - bge _02254234 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _02254234 - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 - mov r0, #8 - str r0, [r4, #0x30] -_02254234: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_02254210 - - thumb_func_start ov23_02254238 -ov23_02254238: ; 0x02254238 - push {r3, lr} - ldr r0, [r0, #0x30] - cmp r0, #8 - bne _02254244 - mov r0, #0 - pop {r3, pc} -_02254244: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_02254238 - - thumb_func_start ov23_02254250 -ov23_02254250: ; 0x02254250 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #8 - bge _0225426A - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0225426A - mov r0, #8 - str r0, [r4, #0x30] -_0225426A: - pop {r4, pc} - thumb_func_end ov23_02254250 - - thumb_func_start ov23_0225426C -ov23_0225426C: ; 0x0225426C - lsl r1, r0, #1 - add r1, r0, r1 - ldr r0, _02254278 ; =0x02256A00 - ldrb r0, [r0, r1] - bx lr - nop -_02254278: .word 0x02256A00 - thumb_func_end ov23_0225426C - - thumb_func_start ov23_0225427C -ov23_0225427C: ; 0x0225427C - lsl r1, r0, #1 - add r1, r0, r1 - ldr r0, _02254288 ; =0x02256A01 - ldrb r0, [r0, r1] - bx lr - nop -_02254288: .word 0x02256A01 - thumb_func_end ov23_0225427C - - thumb_func_start ov23_0225428C -ov23_0225428C: ; 0x0225428C - lsl r1, r0, #1 - add r1, r0, r1 - ldr r0, _02254298 ; =0x02256A02 - ldrb r0, [r0, r1] - bx lr - nop -_02254298: .word 0x02256A02 - thumb_func_end ov23_0225428C - - thumb_func_start ov23_0225429C -ov23_0225429C: ; 0x0225429C - lsl r1, r0, #1 - add r1, r0, r1 - ldr r0, _022542A8 ; =0x02256AB4 - ldrb r0, [r0, r1] - bx lr - nop -_022542A8: .word 0x02256AB4 - thumb_func_end ov23_0225429C - - thumb_func_start ov23_022542AC -ov23_022542AC: ; 0x022542AC - lsl r1, r0, #1 - add r1, r0, r1 - ldr r0, _022542B8 ; =0x02256AB5 - ldrb r0, [r0, r1] - bx lr - nop -_022542B8: .word 0x02256AB5 - thumb_func_end ov23_022542AC - - thumb_func_start ov23_022542BC -ov23_022542BC: ; 0x022542BC - lsl r1, r0, #1 - add r1, r0, r1 - ldr r0, _022542C8 ; =0x02256AB6 - ldrb r0, [r0, r1] - bx lr - nop -_022542C8: .word 0x02256AB6 - thumb_func_end ov23_022542BC - - thumb_func_start ov23_022542CC -ov23_022542CC: ; 0x022542CC - ldr r3, _022542D4 ; =sub_02018144 - mov r0, #4 - mov r1, #0x44 - bx r3 - ; .align 2, 0 -_022542D4: .word sub_02018144 - thumb_func_end ov23_022542CC - - thumb_func_start ov23_022542D8 -ov23_022542D8: ; 0x022542D8 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - str r1, [r0, #0] - mov r5, #0 - add r4, #0x38 - strb r5, [r4] - str r2, [r0, #0x30] - str r3, [r0, #0x34] - add r0, #0x40 - strh r5, [r0] - mov r0, #2 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r1, #8] - ldr r2, _02254308 ; =0x000003D9 - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02254308: .word 0x000003D9 - thumb_func_end ov23_022542D8 - - thumb_func_start ov23_0225430C -ov23_0225430C: ; 0x0225430C - ldr r3, _02254310 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_02254310: .word sub_020181C4 - thumb_func_end ov23_0225430C - - thumb_func_start ov23_02254314 -ov23_02254314: ; 0x02254314 - ldr r0, [r0, #0x3c] - bx lr - thumb_func_end ov23_02254314 - - thumb_func_start ov23_02254318 -ov23_02254318: ; 0x02254318 - push {r3, lr} - add r1, r0, #0 - add r1, #0x38 - ldrb r1, [r1] - cmp r1, #0 - beq _0225432E - cmp r1, #1 - beq _02254334 - cmp r1, #2 - beq _0225433A - b _0225434A -_0225432E: - bl ov23_0225437C - b _0225434A -_02254334: - bl ov23_022544C0 - b _0225434A -_0225433A: - add r1, r0, #0 - mov r2, #0 - add r1, #0x38 - strb r2, [r1] - bl ov23_0225451C - mov r0, #1 - pop {r3, pc} -_0225434A: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_02254318 - - thumb_func_start ov23_02254350 -ov23_02254350: ; 0x02254350 - push {r4, lr} - sub sp, #0x10 - ldr r3, _02254378 ; =0x02256B1C - add r2, sp, #0 - add r4, r1, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - bl ov23_022421CC - lsl r2, r4, #2 - add r1, sp, #0 - ldr r1, [r1, r2] - mov r2, #0 - add r3, r2, #0 - bl ov23_02253F60 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_02254378: .word 0x02256B1C - thumb_func_end ov23_02254350 - - thumb_func_start ov23_0225437C -ov23_0225437C: ; 0x0225437C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r0, #0 - mov r0, #4 - add r1, r0, #0 - bl sub_02013A04 - str r0, [r5, #0x24] - mov r2, #3 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _022544A4 ; =0x000001D7 - add r1, r5, #4 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - mov r3, #1 - add r1, r5, #0 - str r3, [sp] - mov r0, #7 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _022544A8 ; =0x000001C9 - add r1, #0x14 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - mov r2, #3 - ldr r0, [r0, #8] - bl sub_0201A7E8 - ldr r2, _022544AC ; =0x000003D9 - add r0, r5, #4 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - ldr r2, _022544AC ; =0x000003D9 - add r0, #0x14 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r3, _022544B0 ; =0x02256B2C - add r2, sp, #0x14 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r2, _022544B4 ; =0x0000027D - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0x14 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r7, #0 - mov r1, #0 - bl sub_0200B1EC - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x14 - add r2, r4, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r4, #0 - bl sub_020237BC - mov r6, #0 - add r4, sp, #0x14 -_02254436: - ldr r0, [r5, #0x24] - ldr r2, [r4, #0] - add r1, r7, #0 - add r3, r6, #0 - bl sub_02013A4C - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _02254436 - add r0, r7, #0 - bl sub_0200B190 - ldr r4, _022544B8 ; =0x02256B3C - add r3, sp, #0x24 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - mov r3, #4 - add r0, sp, #0x14 - strh r3, [r0, #0x20] - strh r3, [r0, #0x22] - ldr r0, [r5, #0x24] - str r0, [sp, #0x24] - add r0, r5, #4 - str r0, [sp, #0x30] - ldr r0, _022544BC ; =ov23_02254350 - str r0, [sp, #0x28] - add r0, r2, #0 - ldr r1, [r5, #0x30] - ldr r2, [r5, #0x34] - ldrh r1, [r1] - ldrh r2, [r2] - bl sub_0200112C - str r0, [r5, #0x28] - add r0, r5, #4 - bl sub_0201A954 - add r0, r5, #0 - add r0, #0x14 - bl sub_0201A954 - mov r0, #1 - add r5, #0x38 - strb r0, [r5] - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_022544A4: .word 0x000001D7 -_022544A8: .word 0x000001C9 -_022544AC: .word 0x000003D9 -_022544B0: .word 0x02256B2C -_022544B4: .word 0x0000027D -_022544B8: .word 0x02256B3C -_022544BC: .word ov23_02254350 - thumb_func_end ov23_0225437C - - thumb_func_start ov23_022544C0 -ov23_022544C0: ; 0x022544C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x28] - bl sub_02001288 - add r4, r0, #0 - add r0, r5, #0 - bl ov23_022549EC - cmp r4, #3 - bne _022544DA - mov r4, #1 - mvn r4, r4 -_022544DA: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _022544EA - add r0, r0, #1 - cmp r4, r0 - bne _02254500 - pop {r3, r4, r5, pc} -_022544EA: - ldr r0, _02254518 ; =0x000005DC - bl sub_02005748 - str r4, [r5, #0x3c] - mov r0, #2 - add r5, #0x38 - strb r0, [r5] - ldr r0, _02254518 ; =0x000005DC - bl sub_02005748 - pop {r3, r4, r5, pc} -_02254500: - ldr r0, _02254518 ; =0x000005DC - bl sub_02005748 - str r4, [r5, #0x3c] - mov r0, #2 - add r5, #0x38 - strb r0, [r5] - ldr r0, _02254518 ; =0x000005DC - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_02254518: .word 0x000005DC - thumb_func_end ov23_022544C0 - - thumb_func_start ov23_0225451C -ov23_0225451C: ; 0x0225451C - push {r4, lr} - add r4, r0, #0 - bl ov23_022421CC - bl ov23_02254044 - add r0, r4, #0 - add r0, #0x14 - mov r1, #1 - bl sub_0200DC9C - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x30] - ldr r2, [r4, #0x34] - bl sub_02001384 - add r0, r4, #4 - mov r1, #1 - bl sub_0200DC9C - ldrb r1, [r4, #8] - ldr r0, [r4, #4] - bl sub_0201C3C0 - add r0, r4, #4 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x14 - bl sub_0201A8FC - ldr r0, [r4, #0x24] - bl sub_02013A3C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0225451C - - thumb_func_start ov23_02254564 -ov23_02254564: ; 0x02254564 - push {r3, lr} - mov r2, #1 - and r1, r2 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - beq _0225457C - add r1, r2, #0 - mov r2, #0xf - mov r3, #2 - bl sub_0200147C - pop {r3, pc} -_0225457C: - mov r1, #2 - mov r2, #0xf - add r3, r1, #0 - bl sub_0200147C - pop {r3, pc} - thumb_func_end ov23_02254564 - - thumb_func_start ov23_02254588 -ov23_02254588: ; 0x02254588 - ldr r3, _02254590 ; =sub_02018144 - mov r0, #4 - mov r1, #0x4c - bx r3 - ; .align 2, 0 -_02254590: .word sub_02018144 - thumb_func_end ov23_02254588 - - thumb_func_start ov23_02254594 -ov23_02254594: ; 0x02254594 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - str r1, [r0, #0] - mov r5, #0 - add r4, #0x42 - strb r5, [r4] - str r5, [r0, #4] - str r2, [r0, #0x38] - str r3, [r0, #0x3c] - mov r0, #2 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r1, #8] - ldr r2, _022545C0 ; =0x000003D9 - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022545C0: .word 0x000003D9 - thumb_func_end ov23_02254594 - - thumb_func_start ov23_022545C4 -ov23_022545C4: ; 0x022545C4 - add r3, r0, #0 - add r3, #0x40 - strb r1, [r3] - add r0, #0x41 - strb r2, [r0] - bx lr - thumb_func_end ov23_022545C4 - - thumb_func_start ov23_022545D0 -ov23_022545D0: ; 0x022545D0 - ldr r3, _022545D4 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_022545D4: .word sub_020181C4 - thumb_func_end ov23_022545D0 - - thumb_func_start ov23_022545D8 -ov23_022545D8: ; 0x022545D8 - ldr r0, [r0, #0x44] - bx lr - thumb_func_end ov23_022545D8 - - thumb_func_start ov23_022545DC -ov23_022545DC: ; 0x022545DC - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x42 - ldrb r1, [r1] - cmp r1, #0 - beq _022545F4 - cmp r1, #1 - beq _022545FA - cmp r1, #2 - beq _02254600 - b _0225460E -_022545F4: - bl ov23_022546E0 - b _0225460E -_022545FA: - bl ov23_0225461C - b _0225460E -_02254600: - mov r1, #0 - add r4, #0x42 - strb r1, [r4] - bl ov23_02254958 - mov r0, #1 - pop {r4, pc} -_0225460E: - ldr r0, [r4, #4] - cmp r0, #0 - beq _02254618 - bl sub_0206A870 -_02254618: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov23_022545DC - - thumb_func_start ov23_0225461C -ov23_0225461C: ; 0x0225461C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x2c] - bl ov23_02248D20 - add r6, r0, #0 - ldr r0, [r5, #0x48] - lsr r4, r6, #1 - cmp r0, r4 - bne _02254634 - mov r4, #1 - mvn r4, r4 -_02254634: - ldr r0, [r5, #0x2c] - add r1, sp, #0 - ldr r0, [r0, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - ldr r0, [r5, #0x2c] - mov r1, #2 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r7, r0, #0 - ldr r0, [r5, #0x2c] - mov r1, #3 - ldr r0, [r0, #0xc] - bl sub_02001504 - add r3, r0, #0 - add r1, sp, #0 - lsl r2, r7, #0x10 - lsl r3, r3, #0x10 - ldrh r1, [r1, #2] - ldr r0, [r5, #4] - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl ov23_022549A8 - mov r0, #1 - mvn r0, r0 - cmp r6, r0 - beq _0225467C - add r0, r0, #1 - cmp r6, r0 - bne _0225468C - pop {r3, r4, r5, r6, r7, pc} -_0225467C: - str r0, [r5, #0x44] - mov r0, #2 - add r5, #0x42 - strb r0, [r5] - ldr r0, _0225469C ; =0x000005DC - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_0225468C: - str r4, [r5, #0x44] - mov r0, #2 - add r5, #0x42 - strb r0, [r5] - ldr r0, _0225469C ; =0x000005DC - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225469C: .word 0x000005DC - thumb_func_end ov23_0225461C - - thumb_func_start ov23_022546A0 -ov23_022546A0: ; 0x022546A0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0x13 - bl sub_02001504 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl sub_02001504 - lsr r1, r4, #1 - sub r0, r0, #1 - cmp r1, r0 - bne _022546C2 - ldr r4, _022546DC ; =0x00000116 - b _022546CC -_022546C2: - add r0, r6, #0 - bl sub_020289B8 - add r4, r0, #0 - add r4, #0x8a -_022546CC: - bl ov23_022421DC - mov r2, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov23_02253F60 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022546DC: .word 0x00000116 - thumb_func_end ov23_022546A0 - - thumb_func_start ov23_022546E0 -ov23_022546E0: ; 0x022546E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r7, r0, #0 - bl sub_020289A0 - str r0, [sp, #0x20] - str r0, [r5, #0x48] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #7 - ble _02254704 - mov r0, #7 - str r0, [sp, #0x1c] -_02254704: - ldr r0, [sp, #0x20] - mov r1, #4 - add r0, r0, #1 - bl sub_02013A04 - str r0, [r5, #0x28] - mov r2, #3 - str r2, [sp] - mov r0, #0xc - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - add r1, r5, #0 - lsl r0, r0, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02254930 ; =0x0000018F - add r1, #8 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - mov r3, #0x13 - ldr r0, [r0, #8] - bl sub_0201A7E8 - mov r3, #1 - add r1, r5, #0 - str r3, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02254934 ; =0x0000016F - add r1, #0x18 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - mov r2, #3 - ldr r0, [r0, #8] - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _02254938 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - ldr r2, _02254938 ; =0x000003D9 - add r0, #0x18 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r2, _0225493C ; =0x00000272 - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - str r0, [sp, #0x18] - ldr r2, _02254940 ; =0x0000027D - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - str r0, [sp, #0x24] - add r0, r5, #0 - add r0, #0x18 - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [sp, #0x24] - mov r1, #9 - bl sub_0200B1EC - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - mov r1, #0xa - bl sub_0200B1EC - str r0, [sp, #0x2c] - mov r0, #6 - mov r1, #4 - bl sub_02023790 - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - ldr r2, [sp, #0x28] - add r0, #0x18 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - mov r0, #4 - bl sub_0200B358 - mov r1, #1 - str r1, [sp] - add r2, r5, #0 - str r1, [sp, #4] - add r2, #0x40 - ldrb r2, [r2] - mov r1, #0 - mov r3, #2 - add r6, r0, #0 - bl sub_0200B60C - mov r1, #1 - str r1, [sp] - add r2, r5, #0 - str r1, [sp, #4] - add r2, #0x41 - ldrb r2, [r2] - add r0, r6, #0 - mov r3, #2 - bl sub_0200B60C - ldr r2, [sp, #0x2c] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0200C388 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r5, #0 - add r0, #0x18 - add r2, r4, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r6, #0 - bl sub_0200B3F0 - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x2c] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x24] - bl sub_0200B190 - ldr r0, [sp, #0x20] - mov r4, #0 - cmp r0, #0 - ble _0225487E - add r6, r4, #0 -_02254848: - add r0, r7, #0 - add r1, r4, #0 - bl sub_020289B8 - str r0, [sp, #0x14] - add r0, r7, #0 - add r1, r4, #0 - bl sub_02028AFC - cmp r0, #0 - bne _02254862 - mov r3, #1 - b _02254864 -_02254862: - mov r3, #0 -_02254864: - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - ldr r0, [r5, #0x28] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x14] - add r3, r6, r3 - bl sub_02013A4C - ldr r0, [sp, #0x20] - add r4, r4, #1 - add r6, r6, #2 - cmp r4, r0 - blt _02254848 -_0225487E: - lsl r3, r4, #1 - ldr r0, [r5, #0x28] - ldr r1, [sp, #0x18] - ldr r2, _02254944 ; =0x00000115 - add r3, r3, #1 - bl sub_02013A4C - ldr r0, [sp, #0x18] - bl sub_0200B190 - bl ov23_022421DC - ldr r1, _0225493C ; =0x00000272 - mov r2, #0 - bl ov23_02253DFC - ldr r4, _02254948 ; =0x02256B3C - add r3, sp, #0x30 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, _0225494C ; =ov23_02254564 - add r1, sp, #0x30 - str r0, [sp, #0x38] - ldr r0, [sp, #0x20] - mov r3, #4 - add r0, r0, #1 - strh r0, [r1, #0x10] - ldr r0, [sp, #0x1c] - strh r0, [r1, #0x12] - ldr r0, [r5, #0x28] - str r0, [sp, #0x30] - add r0, r5, #0 - add r0, #8 - str r0, [sp, #0x3c] - ldr r0, _02254950 ; =ov23_022546A0 - str r7, [sp, #0x4c] - str r0, [sp, #0x34] - ldr r0, _02254954 ; =0x02028A11 - str r0, [sp] - str r7, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - add r0, r2, #0 - ldr r1, [r5, #0x38] - ldr r2, [r5, #0x3c] - ldrh r1, [r1] - ldrh r2, [r2] - bl ov23_02248C08 - str r0, [r5, #0x2c] - add r0, r5, #0 - add r0, #8 - bl sub_0201A954 - add r0, r5, #0 - add r0, #0x18 - bl sub_0201A954 - mov r0, #4 - bl sub_0206A780 - str r0, [r5, #4] - mov r1, #0xc8 - mov r2, #0x1a - mov r3, #0x86 - bl sub_0206A8A0 - mov r1, #0 - ldr r0, [r5, #4] - add r2, r1, #0 - bl sub_0206A8C4 - ldr r0, [r5, #4] - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 - mov r0, #1 - add r5, #0x42 - strb r0, [r5] - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02254930: .word 0x0000018F -_02254934: .word 0x0000016F -_02254938: .word 0x000003D9 -_0225493C: .word 0x00000272 -_02254940: .word 0x0000027D -_02254944: .word 0x00000115 -_02254948: .word 0x02256B3C -_0225494C: .word ov23_02254564 -_02254950: .word ov23_022546A0 -_02254954: .word 0x02028A11 - thumb_func_end ov23_022546E0 - - thumb_func_start ov23_02254958 -ov23_02254958: ; 0x02254958 - push {r4, lr} - add r4, r0, #0 - bl ov23_022421DC - bl ov23_02254044 - add r0, r4, #0 - add r0, #0x18 - mov r1, #1 - bl sub_0200DC9C - ldr r0, [r4, #0x2c] - ldr r1, [r4, #0x38] - ldr r2, [r4, #0x3c] - bl ov23_02248EF8 - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl sub_0200DC9C - ldrb r1, [r4, #0xc] - ldr r0, [r4, #8] - bl sub_0201C3C0 - add r0, r4, #0 - add r0, #8 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x18 - bl sub_0201A8FC - ldr r0, [r4, #0x28] - bl sub_02013A3C - ldr r0, [r4, #4] - bl sub_0206A844 - pop {r4, pc} - thumb_func_end ov23_02254958 - - thumb_func_start ov23_022549A8 -ov23_022549A8: ; 0x022549A8 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r7, r3, #0 - add r6, r0, #0 - add r5, r1, #0 - cmp r4, r7 - bls _022549E8 - cmp r5, #0 - beq _022549C4 - mov r1, #0 - mov r2, #1 - bl sub_0206A8C4 - b _022549CC -_022549C4: - mov r1, #0 - add r2, r1, #0 - bl sub_0206A8C4 -_022549CC: - add r0, r5, r7 - cmp r4, r0 - beq _022549DE - mov r1, #1 - add r0, r6, #0 - add r2, r1, #0 - bl sub_0206A8C4 - pop {r3, r4, r5, r6, r7, pc} -_022549DE: - add r0, r6, #0 - mov r1, #1 - mov r2, #0 - bl sub_0206A8C4 -_022549E8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_022549A8 - - thumb_func_start ov23_022549EC -ov23_022549EC: ; 0x022549EC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x40 - ldrh r4, [r0] - add r1, r5, #0 - ldr r0, [r5, #0x28] - add r1, #0x40 - bl sub_020014D0 - add r5, #0x40 - ldrh r0, [r5] - cmp r4, r0 - beq _02254A0C - ldr r0, _02254A10 ; =0x000005DC - bl sub_02005748 -_02254A0C: - pop {r3, r4, r5, pc} - nop -_02254A10: .word 0x000005DC - thumb_func_end ov23_022549EC - - thumb_func_start ov23_02254A14 -ov23_02254A14: ; 0x02254A14 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r6, r0, #0 - add r7, r2, #0 - cmp r5, #0 - bne _02254A26 - bl sub_02022974 -_02254A26: - add r4, r7, #0 - add r4, #0x3c - add r0, r5, #0 - bl sub_020573FC - str r0, [r4, #0x18] - add r0, r5, #0 - bl sub_0205740C - str r0, [r4, #0x1c] - ldr r0, [r4, #0x18] - lsl r1, r0, #0xf - mov r0, #1 - lsl r0, r0, #0x14 - add r1, r1, r0 - lsr r0, r0, #8 - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r4, #0x1c] - lsl r1, r0, #0xf - mov r0, #0xd - lsl r0, r0, #0x10 - add r0, r1, r0 - str r0, [sp, #0x10] - add r0, r6, #0 - add r1, r5, #0 - bl ov23_02255E14 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r6, #0x50] - add r3, sp, #8 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r6, #0x30] - bl ov5_021E19CC - str r0, [r4, #0x10] - mov r0, #0x10 - str r0, [r7, #0x3c] - mov r0, #0xd - str r0, [r4, #4] - ldr r0, [r4, #0x18] - add r0, #0xf - str r0, [r4, #8] - ldr r0, [r4, #0x1c] - add r0, #0xc - str r0, [r4, #0xc] - str r5, [r4, #0x14] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02254A14 - - thumb_func_start ov23_02254A94 -ov23_02254A94: ; 0x02254A94 - add r2, r0, #0 - ldr r3, _02254AA0 ; =ov5_021E1674 - add r2, #0xa4 - add r0, r1, #0 - ldr r1, [r2, #0] - bx r3 - ; .align 2, 0 -_02254AA0: .word ov5_021E1674 - thumb_func_end ov23_02254A94 - - thumb_func_start ov23_02254AA4 -ov23_02254AA4: ; 0x02254AA4 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x24 - add r4, r0, #0 - mul r4, r1 - add r0, r5, r4 - ldr r0, [r0, #0x5c] - cmp r0, #0 - bne _02254ABA - bl sub_02022974 -_02254ABA: - add r2, r5, r4 - add r2, #0x60 - add r5, #0x3c - ldmia r2!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r5!, {r0, r1} - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_02254AA4 - - thumb_func_start ov23_02254AD4 -ov23_02254AD4: ; 0x02254AD4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02050A60 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0xa - bls _02254AF0 - b _02254C5A -_02254AF0: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02254AFC: ; jump table - .short _02254B12 - _02254AFC - 2 ; case 0 - .short _02254B6E - _02254AFC - 2 ; case 1 - .short _02254B8E - _02254AFC - 2 ; case 2 - .short _02254BA0 - _02254AFC - 2 ; case 3 - .short _02254BAC - _02254AFC - 2 ; case 4 - .short _02254BB8 - _02254AFC - 2 ; case 5 - .short _02254BC4 - _02254AFC - 2 ; case 6 - .short _02254BD0 - _02254AFC - 2 ; case 7 - .short _02254BDC - _02254AFC - 2 ; case 8 - .short _02254C06 - _02254AFC - 2 ; case 9 - .short _02254C2E - _02254AFC - 2 ; case 10 -_02254B12: - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - bl ov23_022542CC - ldr r3, _02254C60 ; =0x00000504 - add r1, r6, #0 - add r2, r3, #0 - str r0, [r4, r3] - ldr r0, [r4, r3] - add r2, #0x14 - add r3, #0x18 - add r2, r4, r2 - add r3, r4, r3 - bl ov23_022542D8 - bl ov23_02254588 - ldr r3, _02254C64 ; =0x00000508 - add r1, r6, #0 - add r2, r3, #0 - str r0, [r4, r3] - ldr r0, [r4, r3] - add r2, #0x12 - add r3, #0x16 - add r2, r4, r2 - add r3, r4, r3 - bl ov23_02254594 - add r2, r4, #0 - add r0, r6, #0 - add r1, r4, #0 - add r2, #0x5c - bl ov23_02255C78 - add r1, r4, #0 - add r0, r6, #0 - add r1, #0x5c - bl ov23_02255D78 - mov r0, #1 - add r1, r4, #0 - bl ov23_02255EBC - b _02254C5A -_02254B6E: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r1, #0x29 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #2 - add r1, r4, #0 - bl ov23_02255EBC - b _02254C5A -_02254B8E: - bl sub_0200F2AC - cmp r0, #0 - beq _02254C5A - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - b _02254C5A -_02254BA0: - ldr r1, _02254C68 ; =ov23_02254C84 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - b _02254C5A -_02254BAC: - ldr r1, _02254C6C ; =ov23_02254DF8 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - b _02254C5A -_02254BB8: - ldr r1, _02254C70 ; =ov23_02255100 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - b _02254C5A -_02254BC4: - ldr r1, _02254C74 ; =ov23_02255580 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - b _02254C5A -_02254BD0: - ldr r1, _02254C78 ; =ov23_02255850 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - b _02254C5A -_02254BDC: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02254C5A - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02254C5A - bl ov23_0224D3B0 - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - b _02254C5A -_02254C06: - ldr r0, _02254C7C ; =0x0000060E - bl sub_02005748 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0x28 - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #0xa - add r1, r4, #0 - bl ov23_02255EBC - b _02254C5A -_02254C2E: - bl sub_0200F2AC - cmp r0, #0 - beq _02254C5A - ldr r0, _02254C64 ; =0x00000508 - ldr r0, [r4, r0] - bl ov23_022545D0 - ldr r0, _02254C60 ; =0x00000504 - ldr r0, [r4, r0] - bl ov23_0225430C - ldr r0, _02254C80 ; =0x0000050C - ldr r0, [r4, r0] - bl ov5_021D1BEC - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_02254C5A: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02254C60: .word 0x00000504 -_02254C64: .word 0x00000508 -_02254C68: .word ov23_02254C84 -_02254C6C: .word ov23_02254DF8 -_02254C70: .word ov23_02255100 -_02254C74: .word ov23_02255580 -_02254C78: .word ov23_02255850 -_02254C7C: .word 0x0000060E -_02254C80: .word 0x0000050C - thumb_func_end ov23_02254AD4 - - thumb_func_start ov23_02254C84 -ov23_02254C84: ; 0x02254C84 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, _02254D8C ; =0x00000504 - ldr r0, [r4, r0] - bl ov23_02254318 - cmp r0, #0 - beq _02254D86 - ldr r0, _02254D8C ; =0x00000504 - ldr r0, [r4, r0] - bl ov23_02254314 - cmp r0, #0 - beq _02254CB8 - cmp r0, #1 - beq _02254D40 - cmp r0, #2 - beq _02254D58 - b _02254D70 -_02254CB8: - ldr r0, [r5, #0xc] - bl sub_020298B0 - bl sub_020289A0 - cmp r0, #0 - bne _02254CE2 - mov r0, #0x13 - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #8 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254CE2: - ldr r3, _02254D90 ; =0x00000521 - ldrb r1, [r4, r3] - cmp r1, #0xf - bls _02254D06 - mov r0, #0x14 - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #8 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254D06: - add r0, r3, #3 - ldrb r2, [r4, r0] - add r0, r1, #1 - cmp r0, r2 - ble _02254D2C - mov r0, #0x14 - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #8 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254D2C: - sub r3, #0x19 - ldr r0, [r4, r3] - bl ov23_022545C4 - mov r0, #4 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254D40: - ldr r2, _02254D94 ; =0x000004FC - mov r0, #0x10 - ldr r2, [r4, r2] - mov r1, #0xd - bl ov23_02255F04 - mov r0, #5 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254D58: - ldr r2, _02254D94 ; =0x000004FC - mov r0, #0x10 - ldr r2, [r4, r2] - mov r1, #0xd - bl ov23_02255F04 - mov r0, #6 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254D70: - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x5c - bl ov23_02255DDC - mov r0, #9 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #1 - pop {r3, r4, r5, pc} -_02254D86: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02254D8C: .word 0x00000504 -_02254D90: .word 0x00000521 -_02254D94: .word 0x000004FC - thumb_func_end ov23_02254C84 - - thumb_func_start ov23_02254D98 -ov23_02254D98: ; 0x02254D98 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r1, _02254DE4 ; =0x00000528 - mov r0, #0xb - bl sub_02018184 - ldr r2, _02254DE4 ; =0x00000528 - add r4, r0, #0 - mov r1, #0 - bl sub_020C4CF4 - mov r0, #0 - add r1, r4, #0 - bl ov23_02255EBC - mov r0, #5 - lsl r0, r0, #8 - str r5, [r4, r0] - ldr r0, [r5, #4] - ldr r1, _02254DE8 ; =0x02256B88 - ldr r0, [r0, #4] - bl ov5_021D1B6C - ldr r1, _02254DEC ; =0x0000050C - str r0, [r4, r1] - ldr r0, [r4, r1] - bl ov5_021D1C2C - ldr r1, _02254DF0 ; =0x000004FC - add r2, r4, #0 - str r0, [r4, r1] - ldr r1, _02254DF4 ; =ov23_02254AD4 - add r0, r6, #0 - bl sub_02050944 - pop {r4, r5, r6, pc} - nop -_02254DE4: .word 0x00000528 -_02254DE8: .word 0x02256B88 -_02254DEC: .word 0x0000050C -_02254DF0: .word 0x000004FC -_02254DF4: .word ov23_02254AD4 - thumb_func_end ov23_02254D98 - - thumb_func_start ov23_02254DF8 -ov23_02254DF8: ; 0x02254DF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #5 - bhi _02254E36 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02254E1E: ; jump table - .short _02254E2A - _02254E1E - 2 ; case 0 - .short _02254EAC - _02254E1E - 2 ; case 1 - .short _02254EC6 - _02254E1E - 2 ; case 2 - .short _02255066 - _02254E1E - 2 ; case 3 - .short _0225508C - _02254E1E - 2 ; case 4 - .short _022550BA - _02254E1E - 2 ; case 5 -_02254E2A: - ldr r0, _022550E4 ; =0x00000508 - ldr r0, [r4, r0] - bl ov23_022545DC - cmp r0, #0 - bne _02254E38 -_02254E36: - b _022550DE -_02254E38: - mov r0, #5 - lsl r0, r0, #8 - ldr r0, [r4, r0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r6, r0, #0 - ldr r0, _022550E4 ; =0x00000508 - ldr r0, [r4, r0] - bl ov23_022545D8 - add r7, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r7, r0 - bne _02254E66 - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x28 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02254E66: - add r0, r6, #0 - add r1, r7, #0 - bl sub_020289B8 - str r0, [sp, #4] - cmp r0, #0 - beq _02254EA6 - add r0, r6, #0 - add r1, r7, #0 - bl sub_02028AFC - cmp r0, #0 - bne _02254E90 - ldr r1, [sp, #4] - add r0, r5, #0 - add r2, r4, #0 - bl ov23_02254A14 - mov r0, #1 - str r0, [r4, #4] - b _022550DE -_02254E90: - mov r0, #0x15 - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #5 - str r0, [r4, #4] - b _022550DE -_02254EA6: - bl sub_02022974 - b _022550DE -_02254EAC: - ldr r0, _022550E8 ; =0x000004DC - add r0, r4, r0 - bl ov23_02256228 - ldr r2, _022550E8 ; =0x000004DC - ldr r0, [r4, #0x4c] - mov r1, #4 - add r2, r4, r2 - bl ov23_0225623C - mov r0, #2 - str r0, [r4, #4] - b _022550DE -_02254EC6: - ldr r1, _022550E8 ; =0x000004DC - add r0, r5, #0 - add r1, r4, r1 - bl ov23_0225624C - add r0, r4, #0 - add r1, r5, #0 - add r2, sp, #8 - bl ov23_02256098 - cmp r0, #0 - bne _02254FD2 - add r3, r4, #0 - add r3, #0x3c - add r2, sp, #0x18 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, _022550EC ; =0x021BF67C - mov r1, #0x20 - ldr r0, [r0, #0x4c] - mov r6, #1 - tst r1, r0 - beq _02254F0C - ldr r0, _022550F0 ; =0xFFFF0000 - mov r7, #0 - str r0, [sp] - ldr r0, [sp, #0x18] - sub r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - sub r0, r0, #1 - str r0, [sp, #0x20] - b _02254F5E -_02254F0C: - mov r1, #0x10 - add r2, r0, #0 - tst r2, r1 - beq _02254F28 - lsl r0, r1, #0xc - str r0, [sp] - ldr r0, [sp, #0x18] - mov r7, #0 - add r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - b _02254F5E -_02254F28: - mov r1, #0x40 - tst r1, r0 - beq _02254F42 - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #0x1c] - ldr r7, _022550F0 ; =0xFFFF0000 - sub r0, r0, #1 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x24] - sub r0, r0, #1 - str r0, [sp, #0x24] - b _02254F5E -_02254F42: - mov r1, #0x80 - tst r0, r1 - beq _02254F5C - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #0x1c] - lsl r7, r1, #9 - add r0, r0, #1 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x24] - add r0, r0, #1 - str r0, [sp, #0x24] - b _02254F5E -_02254F5C: - mov r6, #0 -_02254F5E: - cmp r6, #0 - beq _02254FAC - add r0, sp, #0x18 - bl ov23_02255B58 - cmp r0, #0 - bne _02254FAC - add r2, r4, #0 - add r3, sp, #0x18 - add r2, #0x3c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r4, #0x4c] - bl ov5_021E18E0 - add r6, r0, #0 - add r0, sp, #0xc - add r1, r6, #0 - bl ov5_021E1894 - ldr r1, [sp, #0xc] - ldr r0, [sp] - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - add r1, sp, #0xc - add r0, r0, r7 - str r0, [sp, #0x14] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #0x10] - add r0, r6, #0 - bl ov5_021E18A4 -_02254FAC: - ldr r0, _022550EC ; =0x021BF67C - ldr r2, [r0, #0x48] - mov r0, #1 - add r1, r2, #0 - tst r1, r0 - beq _02254FBC - str r0, [sp, #8] - b _02254FD2 -_02254FBC: - mov r0, #2 - tst r0, r2 - beq _02254FD2 - ldr r1, [r4, #0x4c] - add r0, r5, #0 - bl ov23_02254A94 - mov r0, #0 - add sp, #0x28 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_02254FD2: - ldr r0, [sp, #8] - cmp r0, #0 - bne _02254FDA - b _022550DE -_02254FDA: - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x3c - add r1, #0x5c - bl ov23_02255A98 - cmp r0, #0 - beq _0225504A - mov r0, #5 - lsl r0, r0, #8 - ldr r0, [r4, r0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r6, r0, #0 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x3c - add r1, #0x5c - bl ov23_02255B78 - add r7, r0, #0 - ldr r0, _022550E4 ; =0x00000508 - ldr r0, [r4, r0] - bl ov23_022545D8 - add r1, r0, #0 - add r0, r6, #0 - add r2, r7, #0 - bl sub_02028ACC - ldr r0, _022550F4 ; =0x000005FE - bl sub_02005748 - ldr r0, [r4, #0x50] - bl ov23_0224D3BC - mov r0, #0xb - bl ov23_0224D39C - ldr r1, _022550E8 ; =0x000004DC - str r0, [r4, #8] - add r0, r5, #0 - add r1, r4, r1 - bl ov23_0225628C - ldr r0, _022550F8 ; =0x00000521 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - mov r1, #0 - sub r0, r0, #1 - strb r1, [r4, r0] - mov r0, #4 - str r0, [r4, #4] - b _022550DE -_0225504A: - ldr r0, _022550FC ; =0x00000602 - bl sub_02005748 - mov r0, #0xc - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #3 - str r0, [r4, #4] - b _022550DE -_02255066: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _022550DE - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _022550DE - bl ov23_0224D3B0 - mov r0, #2 - str r0, [r4, #4] - b _022550DE -_0225508C: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _022550DE - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _022550DE - bl ov23_0224D3B0 - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x28 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022550BA: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _022550DE - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _022550DE - bl ov23_0224D3B0 - mov r0, #0 - str r0, [r4, #4] -_022550DE: - mov r0, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022550E4: .word 0x00000508 -_022550E8: .word 0x000004DC -_022550EC: .word 0x021BF67C -_022550F0: .word 0xFFFF0000 -_022550F4: .word 0x000005FE -_022550F8: .word 0x00000521 -_022550FC: .word 0x00000602 - thumb_func_end ov23_02254DF8 - - thumb_func_start ov23_02255100 -ov23_02255100: ; 0x02255100 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_02050A60 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #6 - bls _0225511C - b _02255576 -_0225511C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02255128: ; jump table - .short _02255136 - _02255128 - 2 ; case 0 - .short _02255176 - _02255128 - 2 ; case 1 - .short _02255464 - _02255128 - 2 ; case 2 - .short _022554B6 - _02255128 - 2 ; case 3 - .short _022554E0 - _02255128 - 2 ; case 4 - .short _02255506 - _02255128 - 2 ; case 5 - .short _02255548 - _02255128 - 2 ; case 6 -_02255136: - ldr r0, _02255448 ; =0x000004DC - add r0, r4, r0 - bl ov23_02256228 - ldr r0, _0225544C ; =0x000004FC - ldr r0, [r4, r0] - bl ov23_02255EFC - ldr r0, _0225544C ; =0x000004FC - add r2, r4, #0 - ldr r1, [r4, r0] - add r2, #0x5c - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x68] - add r3, sp, #0xc - bl ov23_02255B14 - cmp r0, #0 - beq _02255170 - ldr r1, [sp, #0xc] - mov r0, #0x24 - mul r0, r1 - add r0, r4, r0 - ldr r2, _02255448 ; =0x000004DC - ldr r0, [r0, #0x70] - mov r1, #8 - add r2, r4, r2 - bl ov23_0225623C -_02255170: - mov r0, #1 - str r0, [r4, #4] - b _02255576 -_02255176: - ldr r1, _02255448 ; =0x000004DC - mov r0, #1 - str r0, [sp] - add r0, r7, #0 - add r1, r4, r1 - bl ov23_0225624C - add r0, r4, #0 - add r1, r7, #0 - add r2, sp, #0x10 - bl ov23_02256104 - ldr r1, _0225544C ; =0x000004FC - cmp r0, #0 - ldr r2, [r4, r1] - ldr r2, [r2, #0x64] - str r2, [sp, #0x14] - ldr r2, [r4, r1] - ldr r2, [r2, #0x64] - str r2, [sp, #0x1c] - ldr r2, [r4, r1] - ldr r2, [r2, #0x68] - str r2, [sp, #0x18] - ldr r2, [r4, r1] - ldr r2, [r2, #0x68] - str r2, [sp, #0x20] - ldr r2, [r4, r1] - ldr r6, [r2, #0x58] - ldr r5, [r2, #0x60] - bne _02255278 - ldr r0, _02255450 ; =0x021BF67C - mov r2, #0x20 - ldr r0, [r0, #0x4c] - tst r2, r0 - beq _022551D8 - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - sub r6, r6, r0 - ldr r0, [sp, #0x14] - sub r0, r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - sub r0, r0, #1 - str r0, [sp, #0x1c] - b _02255242 -_022551D8: - mov r2, #0x10 - tst r2, r0 - beq _022551FA - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - add r6, r6, r0 - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - b _02255242 -_022551FA: - mov r2, #0x40 - tst r2, r0 - beq _0225521C - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - sub r5, r5, r0 - ldr r0, [sp, #0x18] - sub r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - sub r0, r0, #1 - str r0, [sp, #0x20] - b _02255242 -_0225521C: - mov r2, #0x80 - tst r0, r2 - beq _0225523E - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - add r5, r5, r0 - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - b _02255242 -_0225523E: - mov r0, #0 - str r0, [sp] -_02255242: - ldr r0, _02255450 ; =0x021BF67C - mov r1, #1 - ldr r0, [r0, #0x48] - add r2, r0, #0 - tst r2, r1 - beq _02255252 - str r1, [sp, #0x10] - b _02255278 -_02255252: - mov r1, #2 - tst r0, r1 - beq _02255278 - ldr r0, _0225544C ; =0x000004FC - ldr r0, [r4, r0] - bl ov23_02255F20 - ldr r1, _02255448 ; =0x000004DC - add r0, r7, #0 - add r1, r4, r1 - bl ov23_0225628C - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255278: - ldr r0, [sp] - cmp r0, #0 - beq _022552FA - add r0, sp, #0x14 - bl ov23_02255B58 - cmp r0, #0 - bne _022552FA - ldr r0, _0225544C ; =0x000004FC - add r3, sp, #8 - ldr r1, [r4, r0] - str r6, [r1, #0x58] - ldr r1, [r4, r0] - str r5, [r1, #0x60] - ldr r2, [sp, #0x14] - ldr r1, [r4, r0] - str r2, [r1, #0x64] - ldr r2, [sp, #0x18] - ldr r1, [r4, r0] - str r2, [r1, #0x68] - ldr r1, [r4, r0] - add r2, r4, #0 - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x68] - add r2, #0x5c - bl ov23_02255B14 - cmp r0, #0 - beq _022552E8 - ldr r0, _02255448 ; =0x000004DC - add r0, r4, r0 - bl ov23_022562A8 - ldr r2, [sp, #8] - mov r1, #0x24 - mul r1, r2 - add r1, r4, r1 - ldr r1, [r1, #0x70] - cmp r0, r1 - beq _022552FA - ldr r1, _02255448 ; =0x000004DC - add r0, r7, #0 - add r1, r4, r1 - bl ov23_0225628C - ldr r2, _02255448 ; =0x000004DC - ldr r1, [sp, #8] - mov r0, #0x24 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x70] - mov r1, #8 - add r2, r4, r2 - bl ov23_0225623C - b _022552FA -_022552E8: - ldr r1, _02255448 ; =0x000004DC - add r0, r7, #0 - add r1, r4, r1 - bl ov23_0225628C - ldr r0, _02255448 ; =0x000004DC - add r0, r4, r0 - bl ov23_02256228 -_022552FA: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02255332 - ldr r0, _0225544C ; =0x000004FC - ldr r0, [r4, r0] - ldr r0, [r0, #0x64] - cmp r0, #0x20 - blt _0225530E - bl sub_02022974 -_0225530E: - ldr r0, _0225544C ; =0x000004FC - ldr r0, [r4, r0] - ldr r0, [r0, #0x68] - cmp r0, #0x20 - blt _0225531C - bl sub_02022974 -_0225531C: - ldr r0, _0225544C ; =0x000004FC - add r2, r4, #0 - ldr r1, [r4, r0] - add r2, #0x5c - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x68] - add r3, sp, #4 - bl ov23_02255B14 - cmp r0, #0 - bne _02255334 -_02255332: - b _02255576 -_02255334: - ldr r1, [sp, #4] - cmp r1, #0 - beq _02255430 - mov r0, #0x24 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x74] - bl ov23_0224D3BC - ldr r1, [sp, #4] - mov r0, #0x24 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x74] - cmp r0, #6 - bne _022553C2 - ldr r0, _02255454 ; =0x00000523 - ldrb r1, [r4, r0] - cmp r1, #0x10 - bne _02255372 - mov r0, #0xf - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #4 - str r0, [r4, #4] - b _02255576 -_02255372: - sub r0, r0, #1 - ldrb r0, [r4, r0] - sub r0, r0, #1 - cmp r0, r1 - bge _02255392 - mov r0, #0x12 - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #4 - str r0, [r4, #4] - b _02255576 -_02255392: - mov r0, #0x19 - lsl r0, r0, #6 - bl sub_02005748 - mov r0, #0xe - bl ov23_0224D39C - str r0, [r4, #8] - ldr r0, _02255458 ; =0x00000522 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _022553AE - bl sub_02022974 -_022553AE: - ldr r0, _02255458 ; =0x00000522 - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - mov r1, #0 - sub r0, r0, #2 - strb r1, [r4, r0] - mov r0, #2 - str r0, [r4, #4] - b _02255404 -_022553C2: - mov r0, #5 - lsl r0, r0, #8 - ldr r0, [r4, r0] - ldr r0, [r0, #0xc] - bl sub_020298B0 - add r5, r0, #0 - ldr r0, _0225545C ; =0x000005EB - bl sub_02005748 - ldr r1, [sp, #4] - add r0, r5, #0 - bl sub_02028B20 - mov r0, #0xd - bl ov23_0224D39C - str r0, [r4, #8] - ldr r0, _02255460 ; =0x00000521 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _022553F2 - bl sub_02022974 -_022553F2: - ldr r0, _02255460 ; =0x00000521 - ldrb r1, [r4, r0] - sub r1, r1, #1 - strb r1, [r4, r0] - mov r1, #0 - sub r0, r0, #1 - strb r1, [r4, r0] - mov r0, #3 - str r0, [r4, #4] -_02255404: - ldr r2, [sp, #4] - mov r1, #0x24 - mul r1, r2 - add r1, r4, r1 - ldr r1, [r1, #0x70] - add r0, r7, #0 - bl ov23_02254A94 - add r1, r4, #0 - ldr r0, [sp, #4] - add r1, #0x5c - bl ov23_02255BF4 - ldr r0, _0225544C ; =0x000004FC - ldr r0, [r4, r0] - bl ov23_02255F20 - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - b _02255576 -_02255430: - mov r0, #0x16 - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #4 - str r0, [r4, #4] - b _02255576 - nop -_02255448: .word 0x000004DC -_0225544C: .word 0x000004FC -_02255450: .word 0x021BF67C -_02255454: .word 0x00000523 -_02255458: .word 0x00000522 -_0225545C: .word 0x000005EB -_02255460: .word 0x00000521 -_02255464: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _02255474 - b _02255576 -_02255474: - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02255576 - bl ov23_0224D3B0 - ldr r0, _0225557C ; =0x00000522 - ldrb r1, [r4, r0] - add r0, r0, #1 - ldrb r0, [r4, r0] - sub r5, r1, r0 - bpl _02255496 - bl sub_02022974 -_02255496: - cmp r5, #0 - bne _022554A8 - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022554A8: - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #5 - str r0, [r4, #4] - b _02255576 -_022554B6: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255576 - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02255576 - bl ov23_0224D3B0 - mov r0, #0 - str r0, [r4, #4] - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022554E0: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255576 - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02255576 - bl ov23_0224D3B0 - mov r0, #1 - str r0, [r4, #4] - b _02255576 -_02255506: - mov r1, #0x52 - lsl r1, r1, #4 - ldrb r2, [r4, r1] - add r0, r2, #1 - strb r0, [r4, r1] - cmp r2, #0xa - blo _02255576 - add r0, r1, #2 - ldrb r2, [r4, r0] - add r0, r1, #3 - ldrb r0, [r4, r0] - mov r1, #0 - sub r5, r2, r0 - add r0, r5, #0 - bl ov23_0224D3D0 - cmp r5, #1 - bne _02255532 - mov r0, #0x11 - bl ov23_0224D39C - b _02255538 -_02255532: - mov r0, #0x19 - bl ov23_0224D39C -_02255538: - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #6 - str r0, [r4, #4] - b _02255576 -_02255548: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255576 - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02255576 - bl ov23_0224D3B0 - mov r0, #3 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255576: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225557C: .word 0x00000522 - thumb_func_end ov23_02255100 - - thumb_func_start ov23_02255580 -ov23_02255580: ; 0x02255580 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_02050A60 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r5, r0, #0 - ldr r0, [r5, #4] - cmp r0, #0 - beq _022555A6 - cmp r0, #1 - beq _022555E6 - cmp r0, #2 - bne _022555A4 - b _02255814 -_022555A4: - b _02255838 -_022555A6: - ldr r0, _02255840 ; =0x000004DC - add r0, r5, r0 - bl ov23_02256228 - ldr r0, _02255844 ; =0x000004FC - ldr r0, [r5, r0] - bl ov23_02255EFC - ldr r0, _02255844 ; =0x000004FC - add r2, r5, #0 - ldr r1, [r5, r0] - add r2, #0x5c - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x68] - add r3, sp, #0xc - bl ov23_02255B14 - cmp r0, #0 - beq _022555E0 - ldr r1, [sp, #0xc] - mov r0, #0x24 - mul r0, r1 - add r0, r5, r0 - ldr r2, _02255840 ; =0x000004DC - ldr r0, [r0, #0x70] - mov r1, #8 - add r2, r5, r2 - bl ov23_0225623C -_022555E0: - mov r0, #1 - str r0, [r5, #4] - b _02255838 -_022555E6: - ldr r1, _02255840 ; =0x000004DC - mov r0, #1 - str r0, [sp] - add r0, r7, #0 - add r1, r5, r1 - bl ov23_0225624C - add r0, r5, #0 - add r1, r7, #0 - add r2, sp, #0x10 - bl ov23_02256174 - ldr r1, _02255844 ; =0x000004FC - cmp r0, #0 - ldr r2, [r5, r1] - ldr r2, [r2, #0x64] - str r2, [sp, #0x14] - ldr r2, [r5, r1] - ldr r2, [r2, #0x64] - str r2, [sp, #0x1c] - ldr r2, [r5, r1] - ldr r2, [r2, #0x68] - str r2, [sp, #0x18] - ldr r2, [r5, r1] - ldr r2, [r2, #0x68] - str r2, [sp, #0x20] - ldr r2, [r5, r1] - ldr r6, [r2, #0x58] - ldr r4, [r2, #0x60] - bne _022556E8 - ldr r0, _02255848 ; =0x021BF67C - mov r2, #0x20 - ldr r0, [r0, #0x4c] - tst r2, r0 - beq _02255648 - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - sub r6, r6, r0 - ldr r0, [sp, #0x14] - sub r0, r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - sub r0, r0, #1 - str r0, [sp, #0x1c] - b _022556B2 -_02255648: - mov r2, #0x10 - tst r2, r0 - beq _0225566A - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - add r6, r6, r0 - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - b _022556B2 -_0225566A: - mov r2, #0x40 - tst r2, r0 - beq _0225568C - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - sub r4, r4, r0 - ldr r0, [sp, #0x18] - sub r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - sub r0, r0, #1 - str r0, [sp, #0x20] - b _022556B2 -_0225568C: - mov r2, #0x80 - tst r0, r2 - beq _022556AE - add r1, #0xe9 - add r0, r1, #0 - bl sub_02005748 - mov r0, #1 - lsl r0, r0, #0x10 - add r4, r4, r0 - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - b _022556B2 -_022556AE: - mov r0, #0 - str r0, [sp] -_022556B2: - ldr r0, _02255848 ; =0x021BF67C - mov r1, #1 - ldr r0, [r0, #0x48] - add r2, r0, #0 - tst r2, r1 - beq _022556C2 - str r1, [sp, #0x10] - b _022556E8 -_022556C2: - mov r1, #2 - tst r0, r1 - beq _022556E8 - ldr r0, _02255844 ; =0x000004FC - ldr r0, [r5, r0] - bl ov23_02255F20 - ldr r1, _02255840 ; =0x000004DC - add r0, r7, #0 - add r1, r5, r1 - bl ov23_0225628C - mov r0, #3 - add r1, r5, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022556E8: - ldr r0, [sp] - cmp r0, #0 - beq _0225576A - add r0, sp, #0x14 - bl ov23_02255B58 - cmp r0, #0 - bne _0225576A - ldr r0, _02255844 ; =0x000004FC - add r3, sp, #8 - ldr r1, [r5, r0] - str r6, [r1, #0x58] - ldr r1, [r5, r0] - str r4, [r1, #0x60] - ldr r2, [sp, #0x14] - ldr r1, [r5, r0] - str r2, [r1, #0x64] - ldr r2, [sp, #0x18] - ldr r1, [r5, r0] - str r2, [r1, #0x68] - ldr r1, [r5, r0] - add r2, r5, #0 - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x68] - add r2, #0x5c - bl ov23_02255B14 - cmp r0, #0 - beq _02255758 - ldr r0, _02255840 ; =0x000004DC - add r0, r5, r0 - bl ov23_022562A8 - ldr r2, [sp, #8] - mov r1, #0x24 - mul r1, r2 - add r1, r5, r1 - ldr r1, [r1, #0x70] - cmp r0, r1 - beq _0225576A - ldr r1, _02255840 ; =0x000004DC - add r0, r7, #0 - add r1, r5, r1 - bl ov23_0225628C - ldr r2, _02255840 ; =0x000004DC - ldr r1, [sp, #8] - mov r0, #0x24 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x70] - mov r1, #8 - add r2, r5, r2 - bl ov23_0225623C - b _0225576A -_02255758: - ldr r1, _02255840 ; =0x000004DC - add r0, r7, #0 - add r1, r5, r1 - bl ov23_0225628C - ldr r0, _02255840 ; =0x000004DC - add r0, r5, r0 - bl ov23_02256228 -_0225576A: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02255838 - ldr r0, _02255844 ; =0x000004FC - ldr r0, [r5, r0] - ldr r0, [r0, #0x64] - cmp r0, #0x20 - blt _0225577E - bl sub_02022974 -_0225577E: - ldr r0, _02255844 ; =0x000004FC - ldr r0, [r5, r0] - ldr r0, [r0, #0x68] - cmp r0, #0x20 - blt _0225578C - bl sub_02022974 -_0225578C: - ldr r0, _02255844 ; =0x000004FC - add r2, r5, #0 - ldr r1, [r5, r0] - add r2, #0x5c - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x68] - add r3, sp, #4 - bl ov23_02255B14 - cmp r0, #0 - beq _02255838 - ldr r0, [sp, #4] - cmp r0, #0 - beq _022557FE - mov r1, #0x24 - mul r1, r0 - add r1, r5, r1 - ldr r1, [r1, #0x74] - cmp r1, #6 - bne _022557CA - mov r0, #0x10 - bl ov23_0224D39C - str r0, [r5, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r5, r0] - mov r0, #2 - str r0, [r5, #4] - b _02255838 -_022557CA: - add r1, r5, #0 - bl ov23_02254AA4 - ldr r0, [sp, #4] - add r1, r5, #0 - bl ov23_02255E2C - add r1, r5, #0 - ldr r0, [sp, #4] - add r1, #0x5c - bl ov23_02255BF4 - ldr r0, _0225584C ; =0x000005EB - bl sub_02005748 - ldr r0, _02255844 ; =0x000004FC - ldr r0, [r5, r0] - bl ov23_02255F20 - mov r0, #7 - add r1, r5, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022557FE: - mov r0, #0x17 - bl ov23_0224D39C - str r0, [r5, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r5, r0] - mov r0, #2 - str r0, [r5, #4] - b _02255838 -_02255814: - ldr r0, [r5, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255838 - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r5, r0] - add r1, r2, #1 - strb r1, [r5, r0] - cmp r2, #0x1e - blo _02255838 - bl ov23_0224D3B0 - mov r0, #1 - str r0, [r5, #4] -_02255838: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02255840: .word 0x000004DC -_02255844: .word 0x000004FC -_02255848: .word 0x021BF67C -_0225584C: .word 0x000005EB - thumb_func_end ov23_02255580 - - thumb_func_start ov23_02255850 -ov23_02255850: ; 0x02255850 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_02050A60 - str r0, [sp] - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #3 - bls _0225586C - b _02255A78 -_0225586C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02255878: ; jump table - .short _02255880 - _02255878 - 2 ; case 0 - .short _0225589A - _02255878 - 2 ; case 1 - .short _02255A24 - _02255878 - 2 ; case 2 - .short _02255A4A - _02255878 - 2 ; case 3 -_02255880: - ldr r0, _02255A80 ; =0x000004DC - add r0, r4, r0 - bl ov23_02256228 - ldr r2, _02255A80 ; =0x000004DC - ldr r0, [r4, #0x4c] - mov r1, #4 - add r2, r4, r2 - bl ov23_0225623C - mov r0, #1 - str r0, [r4, #4] - b _02255A78 -_0225589A: - ldr r1, _02255A80 ; =0x000004DC - ldr r0, [sp] - add r1, r4, r1 - bl ov23_0225624C - ldr r1, [sp] - add r0, r4, #0 - add r2, sp, #4 - bl ov23_022561BC - cmp r0, #0 - beq _022558B4 - b _022559BA -_022558B4: - add r3, r4, #0 - add r3, #0x3c - add r2, sp, #0x14 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, _02255A84 ; =0x021BF67C - mov r1, #0x20 - ldr r0, [r0, #0x4c] - mov r6, #1 - tst r1, r0 - beq _022558E0 - ldr r0, [sp, #0x14] - ldr r7, _02255A88 ; =0xFFFF0000 - sub r0, r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - mov r5, #0 - sub r0, r0, #1 - str r0, [sp, #0x1c] - b _0225592C -_022558E0: - mov r1, #0x10 - add r2, r0, #0 - tst r2, r1 - beq _022558FA - ldr r0, [sp, #0x14] - lsl r7, r1, #0xc - add r0, r0, #1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - mov r5, #0 - add r0, r0, #1 - str r0, [sp, #0x1c] - b _0225592C -_022558FA: - mov r1, #0x40 - tst r1, r0 - beq _02255912 - ldr r0, [sp, #0x18] - mov r7, #0 - sub r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - ldr r5, _02255A88 ; =0xFFFF0000 - sub r0, r0, #1 - str r0, [sp, #0x20] - b _0225592C -_02255912: - mov r1, #0x80 - tst r0, r1 - beq _0225592A - ldr r0, [sp, #0x18] - mov r7, #0 - add r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - lsl r5, r1, #9 - add r0, r0, #1 - str r0, [sp, #0x20] - b _0225592C -_0225592A: - mov r6, #0 -_0225592C: - cmp r6, #0 - beq _02255978 - add r0, sp, #0x14 - bl ov23_02255B58 - cmp r0, #0 - bne _02255978 - add r2, r4, #0 - add r3, sp, #0x14 - add r2, #0x3c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp] - ldr r1, [r4, #0x4c] - add r0, #0xa4 - ldr r0, [r0, #0] - bl ov5_021E18E0 - add r6, r0, #0 - add r0, sp, #8 - add r1, r6, #0 - bl ov5_021E1894 - ldr r0, [sp, #8] - add r1, sp, #8 - add r0, r0, r7 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r0, r0, r5 - str r0, [sp, #0x10] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, r6, #0 - bl ov5_021E18A4 -_02255978: - ldr r0, _02255A84 ; =0x021BF67C - ldr r2, [r0, #0x48] - mov r0, #1 - add r1, r2, #0 - tst r1, r0 - beq _02255988 - str r0, [sp, #4] - b _022559BA -_02255988: - mov r0, #2 - tst r0, r2 - beq _022559BA - add r0, r4, #0 - add r2, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x1c - add r2, #0x5c - bl ov23_02255BB8 - add r0, r4, #0 - bl ov23_02255E8C - ldr r1, _02255A80 ; =0x000004DC - ldr r0, [sp] - add r1, r4, r1 - bl ov23_0225628C - mov r0, #6 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022559BA: - ldr r0, [sp, #4] - cmp r0, #0 - beq _02255A78 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x3c - add r1, #0x5c - bl ov23_02255A98 - cmp r0, #0 - beq _02255A08 - add r0, r4, #0 - add r2, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x3c - add r2, #0x5c - bl ov23_02255BB8 - ldr r0, _02255A8C ; =0x000005FE - bl sub_02005748 - ldr r2, _02255A90 ; =0x000004FC - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x40] - ldr r2, [r4, r2] - bl ov23_02255F04 - ldr r1, _02255A80 ; =0x000004DC - ldr r0, [sp] - add r1, r4, r1 - bl ov23_0225628C - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #3 - str r0, [r4, #4] - b _02255A78 -_02255A08: - ldr r0, _02255A94 ; =0x00000602 - bl sub_02005748 - mov r0, #0xc - bl ov23_0224D39C - str r0, [r4, #8] - mov r0, #0x52 - mov r1, #0 - lsl r0, r0, #4 - strb r1, [r4, r0] - mov r0, #2 - str r0, [r4, #4] - b _02255A78 -_02255A24: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255A78 - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02255A78 - bl ov23_0224D3B0 - mov r0, #1 - str r0, [r4, #4] - b _02255A78 -_02255A4A: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02255A78 - mov r0, #0x52 - lsl r0, r0, #4 - ldrb r2, [r4, r0] - add r1, r2, #1 - strb r1, [r4, r0] - cmp r2, #0x1e - blo _02255A78 - bl ov23_0224D3B0 - mov r0, #6 - add r1, r4, #0 - bl ov23_02255EBC - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02255A78: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02255A80: .word 0x000004DC -_02255A84: .word 0x021BF67C -_02255A88: .word 0xFFFF0000 -_02255A8C: .word 0x000005FE -_02255A90: .word 0x000004FC -_02255A94: .word 0x00000602 - thumb_func_end ov23_02255850 - - thumb_func_start ov23_02255A98 -ov23_02255A98: ; 0x02255A98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r1, #0 - add r7, r0, #0 - mov r6, #0 - add r4, r5, #0 -_02255AA4: - ldr r0, [r5, #0] - cmp r0, #1 - bne _02255ABC - add r0, r4, #4 - add r1, r7, #0 - bl ov23_02255C30 - cmp r0, #0 - beq _02255ABC - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02255ABC: - add r6, r6, #1 - add r5, #0x24 - add r4, #0x24 - cmp r6, #0x20 - blt _02255AA4 - ldr r4, _02255B0C ; =0x02256B78 - add r3, sp, #0x10 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r7, #0 - add r1, r2, #0 - bl ov23_02255C30 - cmp r0, #0 - beq _02255AE6 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02255AE6: - ldr r4, _02255B10 ; =0x02256B68 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r7, #0 - add r1, r2, #0 - bl ov23_02255C30 - cmp r0, #0 - bne _02255B06 - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02255B06: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255B0C: .word 0x02256B78 -_02255B10: .word 0x02256B68 - thumb_func_end ov23_02255A98 - - thumb_func_start ov23_02255B14 -ov23_02255B14: ; 0x02255B14 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r2, #0 - add r7, r0, #0 - str r1, [sp] - str r3, [sp, #4] - mov r6, #0 - add r4, r5, #0 -_02255B24: - ldr r0, [r5, #0] - cmp r0, #1 - bne _02255B42 - ldr r2, [sp] - add r0, r4, #4 - add r1, r7, #0 - bl ov23_02255C58 - cmp r0, #0 - beq _02255B42 - ldr r0, [sp, #4] - add sp, #8 - str r6, [r0, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02255B42: - add r6, r6, #1 - add r5, #0x24 - add r4, #0x24 - cmp r6, #0x20 - blt _02255B24 - ldr r0, [sp, #4] - mov r1, #0x20 - str r1, [r0, #0] - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_02255B14 - - thumb_func_start ov23_02255B58 -ov23_02255B58: ; 0x02255B58 - ldr r1, [r0, #0] - cmp r1, #0xa - blt _02255B74 - ldr r1, [r0, #8] - cmp r1, #0x15 - bgt _02255B74 - ldr r1, [r0, #4] - cmp r1, #0xc - blt _02255B74 - ldr r0, [r0, #0xc] - cmp r0, #0x17 - bgt _02255B74 - mov r0, #0 - bx lr -_02255B74: - mov r0, #1 - bx lr - thumb_func_end ov23_02255B58 - - thumb_func_start ov23_02255B78 -ov23_02255B78: ; 0x02255B78 - push {r4, lr} - add r3, r0, #0 - mov r2, #0 - add r4, r1, #0 -_02255B80: - ldr r0, [r4, #0] - cmp r0, #0 - bne _02255BA8 - mov r0, #0x24 - add r4, r2, #0 - mul r4, r0 - mov r0, #1 - str r0, [r1, r4] - add r0, r1, r4 - add r4, r0, #4 - ldmia r3!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r4!, {r0, r1} - add r0, r2, #0 - pop {r4, pc} -_02255BA8: - add r2, r2, #1 - add r4, #0x24 - cmp r2, #0x20 - blt _02255B80 - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov23_02255B78 - - thumb_func_start ov23_02255BB8 -ov23_02255BB8: ; 0x02255BB8 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r5, r0, #0 - add r4, r2, #0 - cmp r7, #0x20 - blt _02255BC8 - bl sub_02022974 -_02255BC8: - mov r0, #0x24 - add r6, r7, #0 - mul r6, r0 - ldr r0, [r4, r6] - cmp r0, #0 - beq _02255BD8 - bl sub_02022974 -_02255BD8: - mov r0, #1 - str r0, [r4, r6] - add r0, r4, r6 - add r2, r0, #4 - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02255BB8 - - thumb_func_start ov23_02255BF4 -ov23_02255BF4: ; 0x02255BF4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0x20 - blt _02255C02 - bl sub_02022974 -_02255C02: - cmp r5, #0 - bne _02255C0A - bl sub_02022974 -_02255C0A: - mov r0, #0x24 - add r6, r5, #0 - mul r6, r0 - ldr r0, [r4, r6] - cmp r0, #0 - bne _02255C1A - bl sub_02022974 -_02255C1A: - mov r1, #0 - add r0, r4, r6 - str r1, [r0, #0x14] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - str r1, [r0, #0x10] - str r1, [r0, #0x18] - str r1, [r4, r6] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02255BF4 - - thumb_func_start ov23_02255C30 -ov23_02255C30: ; 0x02255C30 - ldr r3, [r0, #0] - ldr r2, [r1, #8] - cmp r3, r2 - bgt _02255C54 - ldr r3, [r1, #0] - ldr r2, [r0, #8] - cmp r3, r2 - bgt _02255C54 - ldr r3, [r0, #4] - ldr r2, [r1, #0xc] - cmp r3, r2 - bgt _02255C54 - ldr r1, [r1, #4] - ldr r0, [r0, #0xc] - cmp r1, r0 - bgt _02255C54 - mov r0, #1 - bx lr -_02255C54: - mov r0, #0 - bx lr - thumb_func_end ov23_02255C30 - - thumb_func_start ov23_02255C58 -ov23_02255C58: ; 0x02255C58 - ldr r3, [r0, #0] - cmp r3, r1 - bgt _02255C74 - ldr r3, [r0, #8] - cmp r1, r3 - bgt _02255C74 - ldr r1, [r0, #4] - cmp r1, r2 - bgt _02255C74 - ldr r0, [r0, #0xc] - cmp r2, r0 - bgt _02255C74 - mov r0, #1 - bx lr -_02255C74: - mov r0, #0 - bx lr - thumb_func_end ov23_02255C58 - - thumb_func_start ov23_02255C78 -ov23_02255C78: ; 0x02255C78 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r0, [r0, #0xc] - add r6, r1, #0 - str r2, [sp, #4] - bl sub_02029894 - ldr r1, _02255D0C ; =0x00000521 - mov r2, #0 - strb r2, [r6, r1] - add r1, r1, #1 - add r7, r0, #0 - strb r2, [r6, r1] - bl sub_02029460 - ldr r1, _02255D10 ; =0x00000523 - strb r0, [r6, r1] - add r0, r7, #0 - bl sub_0202948C - ldr r1, _02255D14 ; =0x00000524 - mov r4, #0 - strb r0, [r6, r1] -_02255CA6: - add r0, r7, #0 - add r1, r4, #0 - bl sub_020293B0 - add r5, r0, #0 - beq _02255D02 - cmp r5, #6 - bne _02255CC2 - ldr r0, _02255D18 ; =0x00000522 - ldrb r0, [r6, r0] - add r1, r0, #1 - ldr r0, _02255D18 ; =0x00000522 - strb r1, [r6, r0] - b _02255CE0 -_02255CC2: - cmp r5, #1 - beq _02255CE0 - cmp r5, #2 - beq _02255CE0 - cmp r5, #3 - beq _02255CE0 - cmp r5, #4 - beq _02255CE0 - cmp r5, #5 - beq _02255CE0 - ldr r0, _02255D0C ; =0x00000521 - ldrb r0, [r6, r0] - add r1, r0, #1 - ldr r0, _02255D0C ; =0x00000521 - strb r1, [r6, r0] -_02255CE0: - add r0, r7, #0 - add r1, r4, #0 - bl sub_020293FC - str r0, [sp, #8] - add r0, r7, #0 - add r1, r4, #0 - bl sub_0202942C - add r3, r0, #0 - ldr r0, [sp, #4] - ldr r2, [sp, #8] - str r0, [sp] - add r0, r4, #0 - add r1, r5, #0 - bl ov23_02255D1C -_02255D02: - add r4, r4, #1 - cmp r4, #0x20 - blt _02255CA6 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255D0C: .word 0x00000521 -_02255D10: .word 0x00000523 -_02255D14: .word 0x00000524 -_02255D18: .word 0x00000522 - thumb_func_end ov23_02255C78 - - thumb_func_start ov23_02255D1C -ov23_02255D1C: ; 0x02255D1C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r0, #0 - mov r0, #0 - add r5, r2, #0 - add r6, r3, #0 - str r0, [sp, #0x14] - add r0, r1, #0 - str r1, [sp] - ldr r4, [sp, #0x38] - str r0, [sp, #0x18] - str r5, [sp, #4] - str r6, [sp, #8] - bl sub_020573FC - str r0, [sp, #0x1c] - ldr r0, [sp] - bl sub_0205740C - str r0, [sp, #0x20] - sub r0, r0, #1 - add r0, r6, r0 - ldr r1, [sp, #0x1c] - str r0, [sp, #0x10] - sub r1, r1, #1 - add r1, r5, r1 - mov r0, #0x24 - add r2, r7, #0 - mul r2, r0 - add r0, r4, r2 - add r5, sp, #4 - add r3, r0, #4 - str r1, [sp, #0xc] - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - mov r0, #1 - str r0, [r4, r2] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov23_02255D1C - - thumb_func_start ov23_02255D78 -ov23_02255D78: ; 0x02255D78 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - add r4, r1, #0 - bl ov5_021E1610 - mov r7, #1 - mov r6, #0 - lsl r7, r7, #0xc -_02255D8E: - ldr r0, [r4, #0] - cmp r0, #0 - beq _02255DD0 - ldr r1, [r4, #0x18] - add r0, r5, #0 - bl ov23_02255E14 - add r2, r0, #0 - ldr r0, [r4, #4] - ldr r3, [r4, #0x1c] - ldr r1, [r4, #0x20] - lsl r0, r0, #0x10 - lsl r3, r3, #0xf - add r0, r0, r3 - str r0, [sp, #8] - ldr r0, [r4, #8] - lsl r1, r1, #0xf - lsl r0, r0, #0x10 - add r0, r0, r1 - str r0, [sp, #0x10] - str r7, [sp, #0xc] - mov r0, #0 - str r0, [sp] - ldr r0, [r5, #0x50] - add r3, sp, #8 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r5, #0x30] - bl ov5_021E19CC - str r0, [r4, #0x14] -_02255DD0: - add r6, r6, #1 - add r4, #0x24 - cmp r6, #0x20 - blt _02255D8E - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov23_02255D78 - - thumb_func_start ov23_02255DDC -ov23_02255DDC: ; 0x02255DDC - push {r3, r4, r5, r6, r7, lr} - ldr r0, [r0, #0xc] - add r5, r1, #0 - bl sub_02029894 - mov r4, #0 - add r6, r0, #0 - add r7, r4, #0 -_02255DEC: - ldr r0, [r5, #0] - cmp r0, #1 - bne _02255DFA - ldr r2, [r5, #0x18] - ldr r3, [r5, #4] - ldr r0, [r5, #8] - b _02255E00 -_02255DFA: - add r2, r7, #0 - add r3, r7, #0 - add r0, r7, #0 -_02255E00: - str r0, [sp] - add r0, r6, #0 - add r1, r4, #0 - bl sub_02029308 - add r4, r4, #1 - add r5, #0x24 - cmp r4, #0x20 - blt _02255DEC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov23_02255DDC - - thumb_func_start ov23_02255E14 -ov23_02255E14: ; 0x02255E14 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bne _02255E20 - bl sub_02022974 -_02255E20: - ldr r0, [r5, #0x30] - add r1, r4, #0 - bl ov5_021EFAE8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov23_02255E14 - - thumb_func_start ov23_02255E2C -ov23_02255E2C: ; 0x02255E2C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r0, #0 - mov r0, #0x24 - add r4, r6, #0 - add r5, r1, #0 - mul r4, r0 - add r0, r5, r4 - ldr r0, [r0, #0x5c] - cmp r0, #0 - bne _02255E46 - bl sub_02022974 -_02255E46: - add r0, r5, #0 - add r0, #0x60 - add r4, r0, r4 - mov r0, #5 - lsl r0, r0, #8 - ldr r0, [r5, r0] - ldr r1, [r4, #0x10] - add r0, #0xa4 - ldr r0, [r0, #0] - bl ov5_021E18E0 - add r1, r0, #0 - add r0, sp, #0 - bl ov5_021E1894 - add r3, sp, #0 - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - str r6, [r5, #0xc] - add r5, #0x1c - ldmia r4!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r5!, {r0, r1} - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov23_02255E2C - - thumb_func_start ov23_02255E8C -ov23_02255E8C: ; 0x02255E8C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0xc] - mov r0, #0x24 - mul r0, r1 - add r0, r4, r0 - ldr r0, [r0, #0x5c] - cmp r0, #0 - bne _02255EA2 - bl sub_02022974 -_02255EA2: - mov r0, #5 - lsl r0, r0, #8 - ldr r0, [r4, r0] - ldr r1, [r4, #0x2c] - add r0, #0xa4 - ldr r0, [r0, #0] - bl ov5_021E18E0 - add r4, #0x10 - add r1, r4, #0 - bl ov5_021E18A4 - pop {r4, pc} - thumb_func_end ov23_02255E8C - - thumb_func_start ov23_02255EBC -ov23_02255EBC: ; 0x02255EBC - str r0, [r1, #0] - mov r0, #0 - str r0, [r1, #4] - bx lr - thumb_func_end ov23_02255EBC - - thumb_func_start ov23_02255EC4 -ov23_02255EC4: ; 0x02255EC4 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - add r0, #0x54 - str r0, [sp] - ldr r1, _02255EEC ; =0x02257724 - mov r0, #4 - add r2, r4, #0 - add r3, sp, #4 - bl sub_0201CA24 - mov r0, #0 - str r0, [r4, #0x58] - str r0, [r4, #0x5c] - str r0, [r4, #0x60] - str r0, [r4, #0x64] - str r0, [r4, #0x68] - str r0, [r4, #0x6c] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_02255EEC: .word 0x02257724 - thumb_func_end ov23_02255EC4 - - thumb_func_start ov23_02255EF0 -ov23_02255EF0: ; 0x02255EF0 - ldr r3, _02255EF8 ; =sub_020181C4 - ldr r0, [r0, #0x54] - bx r3 - nop -_02255EF8: .word sub_020181C4 - thumb_func_end ov23_02255EF0 - - thumb_func_start ov23_02255EFC -ov23_02255EFC: ; 0x02255EFC - mov r1, #1 - str r1, [r0, #0x6c] - bx lr - ; .align 2, 0 - thumb_func_end ov23_02255EFC - - thumb_func_start ov23_02255F04 -ov23_02255F04: ; 0x02255F04 - str r0, [r2, #0x64] - lsl r3, r0, #0x10 - mov r0, #2 - lsl r0, r0, #0xe - str r1, [r2, #0x68] - add r3, r3, r0 - str r3, [r2, #0x58] - lsr r3, r0, #3 - lsl r1, r1, #0x10 - str r3, [r2, #0x5c] - add r0, r1, r0 - str r0, [r2, #0x60] - bx lr - ; .align 2, 0 - thumb_func_end ov23_02255F04 - - thumb_func_start ov23_02255F20 -ov23_02255F20: ; 0x02255F20 - mov r1, #0 - str r1, [r0, #0x6c] - bx lr - ; .align 2, 0 - thumb_func_end ov23_02255F20 - - thumb_func_start ov23_02255F28 -ov23_02255F28: ; 0x02255F28 - ldr r3, _02255F3C ; =0x0000FFFF - cmp r0, r3 - beq _02255F30 - str r0, [r2, #0] -_02255F30: - ldr r0, _02255F3C ; =0x0000FFFF - cmp r1, r0 - beq _02255F38 - str r1, [r2, #4] -_02255F38: - bx lr - nop -_02255F3C: .word 0x0000FFFF - thumb_func_end ov23_02255F28 - - thumb_func_start ov23_02255F40 -ov23_02255F40: ; 0x02255F40 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r1, #0 - str r0, [sp] - add r0, #0x8c - ldr r1, _02255FFC ; =0x021BF6BC - ldr r6, [r0, #0] - ldrh r0, [r1, #0x1c] - ldrh r1, [r1, #0x1e] - add r4, r2, #0 - bl ov23_02255F28 - ldr r1, [r4, #0] - ldr r2, [r4, #4] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #8 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - add r3, r6, #0 - bl ov5_021EAFA4 - ldr r1, [sp, #8] - mov r3, #0x1b - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - asr r0, r0, #0x10 - ldr r1, [sp, #0x10] - str r0, [sp, #4] - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - asr r7, r0, #0x10 - ldr r0, [sp, #4] - ldr r1, [sp, #4] - lsr r0, r0, #0x1f - lsl r1, r1, #0x1b - sub r1, r1, r0 - ror r1, r3 - add r2, r0, r1 - lsr r1, r7, #0x1f - lsl r0, r7, #0x1b - sub r0, r0, r1 - ror r0, r3 - ldr r6, [r5, #0x18] - ldr r4, [r5, #0x1c] - add r0, r1, r0 - sub r1, r6, #1 - add r1, r2, r1 - str r1, [sp, #0x1c] - sub r1, r4, #1 - str r0, [sp, #0x18] - add r0, r0, r1 - str r0, [sp, #0x20] - add r0, sp, #0x14 - str r2, [sp, #0x14] - bl ov23_02255B58 - cmp r0, #0 - bne _02255FF6 - add r3, sp, #0x14 - add r2, r5, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp, #4] - lsl r1, r7, #0x10 - lsl r2, r0, #0x10 - lsl r0, r6, #0xf - str r2, [sp, #8] - add r0, r2, r0 - str r0, [sp, #8] - lsl r0, r4, #0xf - str r1, [sp, #0x10] - add r0, r1, r0 - str r0, [sp, #0x10] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, [sp] - ldr r1, [r5, #0x10] - add r0, #0xa4 - str r0, [sp] - ldr r0, [r0, #0] - bl ov5_021E18E0 - add r1, sp, #8 - bl ov5_021E18A4 -_02255FF6: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02255FFC: .word 0x021BF6BC - thumb_func_end ov23_02255F40 - - thumb_func_start ov23_02256000 -ov23_02256000: ; 0x02256000 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r4, r1, #0 - add r0, #0x8c - ldr r1, _02256094 ; =0x021BF6BC - ldr r5, [r0, #0] - ldrh r0, [r1, #0x1c] - add r6, r2, #0 - ldrh r1, [r1, #0x1e] - add r2, r4, #0 - bl ov23_02255F28 - ldr r1, [r4, #0] - ldr r2, [r4, #4] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - add r0, sp, #0 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - add r3, r5, #0 - bl ov5_021EAFA4 - ldr r1, [sp] - mov r2, #0x1b - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - ldr r1, [sp, #8] - asr r4, r0, #0x10 - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - asr r5, r0, #0x10 - lsr r1, r4, #0x1f - lsl r0, r4, #0x1b - sub r0, r0, r1 - ror r0, r2 - add r0, r1, r0 - lsr r3, r5, #0x1f - lsl r1, r5, #0x1b - sub r1, r1, r3 - ror r1, r2 - add r1, r3, r1 - str r0, [sp, #0xc] - str r0, [sp, #0x14] - add r0, sp, #0xc - str r1, [sp, #0x10] - str r1, [sp, #0x18] - bl ov23_02255B58 - cmp r0, #0 - bne _0225608E - mov r0, #2 - lsl r1, r4, #0x10 - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp] - lsl r1, r5, #0x10 - add r1, r1, r0 - lsr r0, r0, #3 - add r2, r6, #0 - add r3, sp, #0 - str r1, [sp, #8] - str r0, [sp, #4] - ldmia r3!, {r0, r1} - add r2, #0x58 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - str r4, [r6, #0x64] - str r5, [r6, #0x68] -_0225608E: - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - nop -_02256094: .word 0x021BF6BC - thumb_func_end ov23_02256000 - - thumb_func_start ov23_02256098 -ov23_02256098: ; 0x02256098 - push {r3, r4, r5, lr} - add r3, r0, #0 - mov r0, #0 - ldr r4, _022560F8 ; =0x021BF6BC - str r0, [r2, #0] - ldrh r5, [r4, #0x20] - cmp r5, #0 - beq _022560C8 - ldr r0, _022560FC ; =0x021BF67C - ldr r0, [r0, #0x44] - cmp r0, #0 - bne _022560C4 - ldr r2, _02256100 ; =0x000004F8 - mov r0, #1 - str r0, [r3, r2] - add r0, r1, #0 - add r1, r3, #0 - sub r2, #8 - add r1, #0x3c - add r2, r3, r2 - bl ov23_02255F40 -_022560C4: - mov r0, #1 - pop {r3, r4, r5, pc} -_022560C8: - ldrh r4, [r4, #0x22] - cmp r4, #0 - beq _022560E8 - ldr r2, _02256100 ; =0x000004F8 - ldr r0, [r3, r2] - cmp r0, #0 - beq _022560E4 - add r0, r1, #0 - add r1, r3, #0 - sub r2, #8 - add r1, #0x3c - add r2, r3, r2 - bl ov23_02255F40 -_022560E4: - mov r0, #1 - pop {r3, r4, r5, pc} -_022560E8: - ldr r1, _02256100 ; =0x000004F8 - ldr r4, [r3, r1] - cmp r4, #0 - beq _022560F6 - str r0, [r3, r1] - mov r1, #1 - str r1, [r2, #0] -_022560F6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022560F8: .word 0x021BF6BC -_022560FC: .word 0x021BF67C -_02256100: .word 0x000004F8 - thumb_func_end ov23_02256098 - - thumb_func_start ov23_02256104 -ov23_02256104: ; 0x02256104 - push {r3, r4, r5, lr} - add r3, r0, #0 - mov r0, #0 - ldr r4, _02256168 ; =0x021BF6BC - str r0, [r2, #0] - ldrh r5, [r4, #0x20] - cmp r5, #0 - beq _02256136 - ldr r0, _0225616C ; =0x021BF67C - ldr r0, [r0, #0x44] - cmp r0, #0 - bne _02256132 - ldr r2, _02256170 ; =0x000004F8 - mov r0, #1 - str r0, [r3, r2] - add r0, r1, #0 - add r1, r2, #0 - add r2, r2, #4 - sub r1, #8 - ldr r2, [r3, r2] - add r1, r3, r1 - bl ov23_02256000 -_02256132: - mov r0, #1 - pop {r3, r4, r5, pc} -_02256136: - ldrh r4, [r4, #0x22] - cmp r4, #0 - beq _02256158 - ldr r2, _02256170 ; =0x000004F8 - ldr r0, [r3, r2] - cmp r0, #0 - beq _02256154 - add r0, r1, #0 - add r1, r2, #0 - add r2, r2, #4 - sub r1, #8 - ldr r2, [r3, r2] - add r1, r3, r1 - bl ov23_02256000 -_02256154: - mov r0, #1 - pop {r3, r4, r5, pc} -_02256158: - ldr r1, _02256170 ; =0x000004F8 - ldr r4, [r3, r1] - cmp r4, #0 - beq _02256166 - str r0, [r3, r1] - mov r1, #1 - str r1, [r2, #0] -_02256166: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256168: .word 0x021BF6BC -_0225616C: .word 0x021BF67C -_02256170: .word 0x000004F8 - thumb_func_end ov23_02256104 - - thumb_func_start ov23_02256174 -ov23_02256174: ; 0x02256174 - push {r4, lr} - add r3, r0, #0 - mov r0, #0 - ldr r4, _022561B0 ; =0x021BF6BC - str r0, [r2, #0] - ldrh r4, [r4, #0x20] - cmp r4, #0 - beq _022561A8 - ldr r0, _022561B4 ; =0x021BF67C - ldr r0, [r0, #0x44] - cmp r0, #0 - bne _022561A4 - ldr r4, _022561B8 ; =0x000004F8 - mov r0, #1 - str r0, [r3, r4] - str r0, [r2, #0] - add r0, r1, #0 - add r1, r4, #0 - add r2, r4, #4 - sub r1, #8 - ldr r2, [r3, r2] - add r1, r3, r1 - bl ov23_02256000 -_022561A4: - mov r0, #1 - pop {r4, pc} -_022561A8: - ldr r1, _022561B8 ; =0x000004F8 - str r0, [r3, r1] - pop {r4, pc} - nop -_022561B0: .word 0x021BF6BC -_022561B4: .word 0x021BF67C -_022561B8: .word 0x000004F8 - thumb_func_end ov23_02256174 - - thumb_func_start ov23_022561BC -ov23_022561BC: ; 0x022561BC - push {r3, r4, r5, lr} - add r3, r0, #0 - mov r0, #0 - ldr r4, _0225621C ; =0x021BF6BC - str r0, [r2, #0] - ldrh r5, [r4, #0x20] - cmp r5, #0 - beq _022561EC - ldr r0, _02256220 ; =0x021BF67C - ldr r0, [r0, #0x44] - cmp r0, #0 - bne _022561E8 - ldr r2, _02256224 ; =0x000004F8 - mov r0, #1 - str r0, [r3, r2] - add r0, r1, #0 - add r1, r3, #0 - sub r2, #8 - add r1, #0x3c - add r2, r3, r2 - bl ov23_02255F40 -_022561E8: - mov r0, #1 - pop {r3, r4, r5, pc} -_022561EC: - ldrh r4, [r4, #0x22] - cmp r4, #0 - beq _0225620C - ldr r2, _02256224 ; =0x000004F8 - ldr r0, [r3, r2] - cmp r0, #0 - beq _02256208 - add r0, r1, #0 - add r1, r3, #0 - sub r2, #8 - add r1, #0x3c - add r2, r3, r2 - bl ov23_02255F40 -_02256208: - mov r0, #1 - pop {r3, r4, r5, pc} -_0225620C: - ldr r1, _02256224 ; =0x000004F8 - ldr r4, [r3, r1] - cmp r4, #0 - beq _0225621A - str r0, [r3, r1] - mov r1, #1 - str r1, [r2, #0] -_0225621A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225621C: .word 0x021BF6BC -_02256220: .word 0x021BF67C -_02256224: .word 0x000004F8 - thumb_func_end ov23_022561BC - - thumb_func_start ov23_02256228 -ov23_02256228: ; 0x02256228 - mov r2, #0 - str r2, [r0, #4] - ldr r1, _02256238 ; =0x0000FFFF - str r2, [r0, #8] - str r1, [r0, #0] - str r2, [r0, #0xc] - str r2, [r0, #0x10] - bx lr - ; .align 2, 0 -_02256238: .word 0x0000FFFF - thumb_func_end ov23_02256228 - - thumb_func_start ov23_0225623C -ov23_0225623C: ; 0x0225623C - mov r3, #0 - str r3, [r2, #4] - str r1, [r2, #8] - str r0, [r2, #0] - str r3, [r2, #0xc] - mov r0, #1 - str r0, [r2, #0x10] - bx lr - thumb_func_end ov23_0225623C - - thumb_func_start ov23_0225624C -ov23_0225624C: ; 0x0225624C - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0x10] - cmp r1, #0 - beq _02256288 - ldr r1, [r4, #4] - add r2, r1, #1 - str r2, [r4, #4] - ldr r1, [r4, #8] - cmp r2, r1 - blt _02256288 - mov r1, #0 - str r1, [r4, #4] - ldr r1, [r4, #0xc] - add r0, #0xa4 - add r1, r1, #1 - lsr r3, r1, #0x1f - lsl r2, r1, #0x1f - sub r2, r2, r3 - mov r1, #0x1f - ror r2, r1 - add r1, r3, r2 - str r1, [r4, #0xc] - ldr r0, [r0, #0] - ldr r1, [r4, #0] - bl ov5_021E18E0 - ldr r1, [r4, #0xc] - bl ov5_021E18B4 -_02256288: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov23_0225624C - - thumb_func_start ov23_0225628C -ov23_0225628C: ; 0x0225628C - push {r3, lr} - ldr r2, [r1, #0x10] - cmp r2, #0 - beq _022562A4 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov5_021E18E0 - mov r1, #0 - bl ov5_021E18B4 -_022562A4: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov23_0225628C - - thumb_func_start ov23_022562A8 -ov23_022562A8: ; 0x022562A8 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov23_022562A8 - - thumb_func_start ov23_022562AC -ov23_022562AC: ; 0x022562AC - ldr r3, _022562B4 ; =ov23_02255EC4 - add r0, r2, #0 - bx r3 - nop -_022562B4: .word ov23_02255EC4 - thumb_func_end ov23_022562AC - - thumb_func_start ov23_022562B8 -ov23_022562B8: ; 0x022562B8 - bx lr - ; .align 2, 0 - thumb_func_end ov23_022562B8 - - thumb_func_start ov23_022562BC -ov23_022562BC: ; 0x022562BC - ldr r3, _022562C4 ; =ov23_02255EF0 - add r0, r2, #0 - bx r3 - nop -_022562C4: .word ov23_02255EF0 - thumb_func_end ov23_022562BC - - thumb_func_start ov23_022562C8 -ov23_022562C8: ; 0x022562C8 - push {r3, r4, r5, lr} - sub sp, #0x30 - ldr r0, [r2, #0x6c] - cmp r0, #0 - beq _022562FE - ldr r5, _02256304 ; =0x02256BA0 - add r4, sp, #0xc - mov r3, #4 -_022562D8: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _022562D8 - ldr r0, [r5, #0] - ldr r5, _02256308 ; =0x02256B5C - str r0, [r4, #0] - add r4, sp, #0 - ldmia r5!, {r0, r1} - add r3, r4, #0 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r4, #0] - add r0, r2, #0 - add r2, #0x58 - add r1, r2, #0 - add r2, sp, #0xc - bl sub_0201CA74 -_022562FE: - add sp, #0x30 - pop {r3, r4, r5, pc} - nop -_02256304: .word 0x02256BA0 -_02256308: .word 0x02256B5C - thumb_func_end ov23_022562C8 - ; 0x0225630C - - - .rodata - .incbin "incbin/overlay23_rodata.bin" - - .data - .incbin "incbin/overlay23_data.bin" - - .bss - .space 0x80 diff --git a/asm/overlay25.s b/asm/overlay25.s deleted file mode 100644 index fc218669a..000000000 --- a/asm/overlay25.s +++ /dev/null @@ -1,4721 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov25_02253CE0 -ov25_02253CE0: ; 0x02253CE0 - ldr r3, _02253CE4 ; =sub_0203D158 - bx r3 - ; .align 2, 0 -_02253CE4: .word sub_0203D158 - thumb_func_end ov25_02253CE0 - - thumb_func_start ov25_02253CE8 -ov25_02253CE8: ; 0x02253CE8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #3 - str r2, [sp] - mov r1, #7 - lsl r2, r0, #0xe - add r7, r3, #0 - bl sub_02017FC8 - mov r0, #3 - mov r1, #8 - lsl r2, r0, #0xe - bl sub_02017FC8 - mov r0, #7 - mov r1, #0x64 - bl sub_02018144 - add r4, r0, #0 - beq _02253D52 - str r4, [r5, #0] - ldr r0, [sp] - str r6, [r4, #0x5c] - str r0, [r4, #0x54] - bl sub_02056B24 - str r0, [r4, #0x58] - ldr r0, [sp, #0x18] - str r7, [r4, #0x4c] - str r0, [r4, #0x50] - add r0, r4, #0 - bl ov25_02253DDC - cmp r0, #0 - beq _02253D52 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - ldr r0, _02253D54 ; =ov25_02253E94 - str r5, [r4, #0x34] - add r1, r4, #0 - mov r2, #4 - bl sub_0200D9E8 - str r0, [r4, #0x38] - ldr r0, _02253D58 ; =ov25_02253E40 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 -_02253D52: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02253D54: .word ov25_02253E94 -_02253D58: .word ov25_02253E40 - thumb_func_end ov25_02253CE8 - - thumb_func_start ov25_02253D5C -ov25_02253D5C: ; 0x02253D5C - push {r3, lr} - ldrb r1, [r0] - cmp r1, #3 - beq _02253D6E - cmp r1, #4 - beq _02253D6E - mov r1, #3 - bl ov25_02253E9C -_02253D6E: - pop {r3, pc} - thumb_func_end ov25_02253D5C - - thumb_func_start ov25_02253D70 -ov25_02253D70: ; 0x02253D70 - cmp r0, #0 - bne _02253D78 - mov r0, #1 - bx lr -_02253D78: - mov r0, #0 - bx lr - thumb_func_end ov25_02253D70 - - thumb_func_start ov25_02253D7C -ov25_02253D7C: ; 0x02253D7C - push {r4, lr} - add r4, r0, #0 - cmp r1, #5 - bhi _02253DCE - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02253D90: ; jump table - .short _02253DCE - _02253D90 - 2 ; case 0 - .short _02253D9C - _02253D90 - 2 ; case 1 - .short _02253DCE - _02253D90 - 2 ; case 2 - .short _02253DCE - _02253D90 - 2 ; case 3 - .short _02253DBE - _02253D90 - 2 ; case 4 - .short _02253DA2 - _02253D90 - 2 ; case 5 -_02253D9C: - mov r0, #1 - strb r0, [r4, #4] - pop {r4, pc} -_02253DA2: - ldr r0, [r4, #0x58] - bl sub_020568C8 - add r1, r0, #1 - ldr r0, _02253DD0 ; =0x0001869F - cmp r1, r0 - bls _02253DB2 - mov r1, #0 -_02253DB2: - ldr r0, [r4, #0x58] - bl sub_020568CC - mov r0, #1 - strb r0, [r4, #7] - pop {r4, pc} -_02253DBE: - ldrb r0, [r4, #2] - cmp r0, #2 - bne _02253DCE - ldr r1, [r4, #0x44] - cmp r1, #0 - beq _02253DCE - ldr r0, [r4, #0x48] - blx r1 -_02253DCE: - pop {r4, pc} - ; .align 2, 0 -_02253DD0: .word 0x0001869F - thumb_func_end ov25_02253D7C - - thumb_func_start ov25_02253DD4 -ov25_02253DD4: ; 0x02253DD4 - ldrb r0, [r0, #3] - bx lr - thumb_func_end ov25_02253DD4 - - thumb_func_start ov25_02253DD8 -ov25_02253DD8: ; 0x02253DD8 - ldr r0, [r0, #0x14] - bx lr - thumb_func_end ov25_02253DD8 - - thumb_func_start ov25_02253DDC -ov25_02253DDC: ; 0x02253DDC - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r2, [r4, #0x50] - add r0, #0x1c - add r1, #0x20 - add r3, r4, #0 - bl ov25_02254560 - cmp r0, #0 - beq _02253E1A - mov r1, #0 - strb r1, [r4] - strb r1, [r4, #1] - strb r1, [r4, #3] - strb r1, [r4, #4] - strb r1, [r4, #7] - strb r1, [r4, #5] - strb r1, [r4, #6] - sub r0, r1, #1 - str r0, [r4, #0x14] - strb r1, [r4, #2] - str r1, [r4, #8] - add r0, r4, #0 - str r1, [r4, #0x60] - bl ov25_02254284 - cmp r0, #0 - beq _02253E1A - mov r0, #1 - pop {r4, pc} -_02253E1A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_02253DDC - - thumb_func_start ov25_02253E20 -ov25_02253E20: ; 0x02253E20 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x38] - bl sub_0200DA58 - add r0, r4, #0 - bl ov25_022542C8 - add r0, r4, #0 - bl ov25_022541BC - ldr r0, [r4, #0x1c] - bl ov25_02254754 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_02253E20 - - thumb_func_start ov25_02253E40 -ov25_02253E40: ; 0x02253E40 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4] - cmp r0, #4 - bhs _02253E64 - cmp r0, #0 - beq _02253E56 - add r0, r4, #0 - bl ov25_022542D4 -_02253E56: - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02253E90 ; =0x02255E6C - ldr r1, [r1, r2] - blx r1 - pop {r3, r4, r5, pc} -_02253E64: - beq _02253E6A - bl sub_02022974 -_02253E6A: - ldr r0, [r4, #0x34] - mov r1, #0 - str r1, [r0, #0] - add r0, r4, #0 - bl ov25_02253E20 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #7 - bl sub_0201807C - mov r0, #8 - bl sub_0201807C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02253E90: .word 0x02255E6C - thumb_func_end ov25_02253E40 - - thumb_func_start ov25_02253E94 -ov25_02253E94: ; 0x02253E94 - mov r0, #0 - strb r0, [r1, #4] - strb r0, [r1, #7] - bx lr - thumb_func_end ov25_02253E94 - - thumb_func_start ov25_02253E9C -ov25_02253E9C: ; 0x02253E9C - strb r1, [r0] - mov r1, #0 - strb r1, [r0, #1] - bx lr - thumb_func_end ov25_02253E9C - - thumb_func_start ov25_02253EA4 -ov25_02253EA4: ; 0x02253EA4 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #3 - bhi _02253F28 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02253EBA: ; jump table - .short _02253EC2 - _02253EBA - 2 ; case 0 - .short _02253ED2 - _02253EBA - 2 ; case 1 - .short _02253EFE - _02253EBA - 2 ; case 2 - .short _02253F14 - _02253EBA - 2 ; case 3 -_02253EC2: - ldr r0, [r4, #0x1c] - mov r1, #0 - bl ov25_022547D0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - pop {r3, r4, r5, pc} -_02253ED2: - ldr r0, [r4, #0x1c] - mov r1, #0 - bl ov25_022547F4 - cmp r0, #0 - beq _02253F28 - ldr r0, [r4, #0x58] - bl sub_02056830 - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov25_02254170 - add r0, r4, #0 - add r1, r5, #0 - bl ov25_022541D8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - pop {r3, r4, r5, pc} -_02253EFE: - bl ov25_022541FC - cmp r0, #0 - beq _02253F28 - ldr r0, [r4, #0x1c] - mov r1, #1 - bl ov25_022547D0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] -_02253F14: - ldr r0, [r4, #0x1c] - mov r1, #1 - bl ov25_022547F4 - cmp r0, #0 - beq _02253F28 - add r0, r4, #0 - mov r1, #1 - bl ov25_02253E9C -_02253F28: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov25_02253EA4 - - thumb_func_start ov25_02253F2C -ov25_02253F2C: ; 0x02253F2C - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #4 - bhi _02253F60 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02253F42: ; jump table - .short _02253F4C - _02253F42 - 2 ; case 0 - .short _02253F7A - _02253F42 - 2 ; case 1 - .short _02253FCC - _02253F42 - 2 ; case 2 - .short _02254002 - _02253F42 - 2 ; case 3 - .short _0225401E - _02253F42 - 2 ; case 4 -_02253F4C: - bl ov25_0225450C - cmp r0, #0 - beq _02253F56 - b _02254068 -_02253F56: - ldr r0, [r4, #8] - cmp r0, #3 - beq _02253F62 - cmp r0, #5 - beq _02253F62 -_02253F60: - b _02254068 -_02253F62: - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #1 - strb r0, [r4, #5] - ldr r0, [r4, #0x1c] - mov r1, #4 - bl ov25_022547D0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - pop {r4, pc} -_02253F7A: - ldr r0, [r4, #8] - cmp r0, #3 - beq _02253F84 - cmp r0, #5 - bne _02253F88 -_02253F84: - mov r0, #1 - str r0, [r4, #0xc] -_02253F88: - ldr r0, [r4, #0x1c] - bl ov25_02254800 - cmp r0, #0 - beq _02254068 - ldr r0, [r4, #0x60] - cmp r0, #0 - ldr r0, [r4, #0x58] - bne _02253FA0 - bl sub_02056860 - b _02253FA4 -_02253FA0: - bl sub_02056838 -_02253FA4: - str r0, [r4, #0x20] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02253FC2 - ldr r0, [r4, #0x1c] - mov r1, #0xc - bl ov25_022547D0 - mov r0, #0x1e - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #4 - strb r0, [r4, #1] - pop {r4, pc} -_02253FC2: - mov r0, #3 - str r0, [r4, #0x10] - mov r0, #2 - strb r0, [r4, #1] - pop {r4, pc} -_02253FCC: - ldr r1, [r4, #8] - cmp r1, #3 - beq _02253FD6 - cmp r1, #5 - bne _02253FEC -_02253FD6: - ldr r0, [r4, #0x1c] - mov r1, #0xc - bl ov25_022547D0 - mov r0, #0x1e - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #4 - strb r0, [r4, #1] - pop {r4, pc} -_02253FEC: - ldr r1, [r4, #0x10] - cmp r1, #0 - beq _02253FF8 - sub r0, r1, #1 - str r0, [r4, #0x10] - pop {r4, pc} -_02253FF8: - bl ov25_0225420C - mov r0, #3 - strb r0, [r4, #1] - pop {r4, pc} -_02254002: - bl ov25_02254228 - cmp r0, #0 - beq _02254068 - add r0, r4, #0 - bl ov25_022541BC - bl sub_02099D44 - add r0, r4, #0 - mov r1, #2 - bl ov25_02253E9C - pop {r4, pc} -_0225401E: - ldr r0, [r4, #8] - cmp r0, #3 - beq _02254028 - cmp r0, #5 - bne _0225404A -_02254028: - ldr r0, [r4, #0x60] - cmp r0, #0 - ldr r0, [r4, #0x58] - bne _02254036 - bl sub_02056860 - b _0225403A -_02254036: - bl sub_02056838 -_0225403A: - str r0, [r4, #0x20] - mov r0, #0x1e - str r0, [r4, #0x10] - ldr r0, [r4, #0x1c] - mov r1, #0xd - bl ov25_022547D0 - pop {r4, pc} -_0225404A: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02254056 - sub r0, r0, #1 - str r0, [r4, #0x10] - pop {r4, pc} -_02254056: - ldr r0, [r4, #0x1c] - mov r1, #0xe - bl ov25_022547D0 - add r0, r4, #0 - bl ov25_0225420C - mov r0, #3 - strb r0, [r4, #1] -_02254068: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_02253F2C - - thumb_func_start ov25_0225406C -ov25_0225406C: ; 0x0225406C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _02254080 - cmp r1, #1 - beq _022540A4 - cmp r1, #2 - beq _022540BC - pop {r3, r4, r5, pc} -_02254080: - mov r0, #1 - strb r0, [r4, #6] - ldr r0, [r4, #0x58] - bl sub_02056830 - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov25_02254170 - add r0, r4, #0 - add r1, r5, #0 - bl ov25_022541D8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - pop {r3, r4, r5, pc} -_022540A4: - bl ov25_022541FC - cmp r0, #0 - beq _022540D6 - ldr r0, [r4, #0x1c] - mov r1, #2 - bl ov25_022547D0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - pop {r3, r4, r5, pc} -_022540BC: - ldr r0, [r4, #0x1c] - mov r1, #2 - bl ov25_022547F4 - cmp r0, #0 - beq _022540D6 - mov r0, #0 - strb r0, [r4, #5] - strb r0, [r4, #6] - add r0, r4, #0 - mov r1, #1 - bl ov25_02253E9C -_022540D6: - pop {r3, r4, r5, pc} - thumb_func_end ov25_0225406C - - thumb_func_start ov25_022540D8 -ov25_022540D8: ; 0x022540D8 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #3 - bhi _0225416C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022540EE: ; jump table - .short _022540F6 - _022540EE - 2 ; case 0 - .short _02254126 - _022540EE - 2 ; case 1 - .short _0225413A - _022540EE - 2 ; case 2 - .short _02254150 - _022540EE - 2 ; case 3 -_022540F6: - ldrb r1, [r4, #2] - cmp r1, #3 - bhi _0225416C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02254108: ; jump table - .short _02254120 - _02254108 - 2 ; case 0 - .short _02254110 - _02254108 - 2 ; case 1 - .short _02254116 - _02254108 - 2 ; case 2 - .short _02254120 - _02254108 - 2 ; case 3 -_02254110: - mov r0, #1 - strb r0, [r4, #1] - pop {r4, pc} -_02254116: - bl ov25_0225420C - mov r0, #2 - strb r0, [r4, #1] - pop {r4, pc} -_02254120: - mov r0, #2 - strb r0, [r4, #1] - pop {r4, pc} -_02254126: - bl ov25_022541FC - cmp r0, #0 - beq _0225416C - add r0, r4, #0 - bl ov25_0225420C - mov r0, #2 - strb r0, [r4, #1] - pop {r4, pc} -_0225413A: - bl ov25_02254228 - cmp r0, #0 - beq _0225416C - ldr r0, [r4, #0x1c] - mov r1, #0x11 - bl ov25_022547D0 - mov r0, #3 - strb r0, [r4, #1] - pop {r4, pc} -_02254150: - ldr r0, [r4, #0x1c] - bl ov25_02254800 - cmp r0, #0 - beq _0225416C - add r0, r4, #0 - bl ov25_022541BC - bl sub_0201E530 - add r0, r4, #0 - mov r1, #4 - bl ov25_02253E9C -_0225416C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_022540D8 - - thumb_func_start ov25_02254170 -ov25_02254170: ; 0x02254170 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bmi _0225417C - cmp r4, #0x19 - blo _02254180 -_0225417C: - bl sub_02022974 -_02254180: - mov r0, #0 - ldr r1, [r5, #0x14] - mvn r0, r0 - cmp r1, r0 - bne _022541B0 - ldr r2, _022541B4 ; =0x02255E7C - mov r1, #0 -_0225418E: - ldr r0, [r2, #0] - cmp r4, r0 - bne _022541A8 - ldr r0, _022541B8 ; =0x02255E80 - lsl r1, r1, #3 - ldr r6, [r0, r1] - mov r1, #2 - add r0, r6, #0 - bl sub_02006590 - str r4, [r5, #0x14] - str r6, [r5, #0x18] - pop {r4, r5, r6, pc} -_022541A8: - add r1, r1, #1 - add r2, #8 - cmp r1, #0x19 - blo _0225418E -_022541B0: - pop {r4, r5, r6, pc} - nop -_022541B4: .word 0x02255E7C -_022541B8: .word 0x02255E80 - thumb_func_end ov25_02254170 - - thumb_func_start ov25_022541BC -ov25_022541BC: ; 0x022541BC - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - ldr r1, [r4, #0x14] - mvn r0, r0 - cmp r1, r0 - beq _022541D6 - ldr r0, [r4, #0x18] - bl sub_02006514 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x14] -_022541D6: - pop {r4, pc} - thumb_func_end ov25_022541BC - - thumb_func_start ov25_022541D8 -ov25_022541D8: ; 0x022541D8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r0, [r4, #2] - cmp r0, #0 - beq _022541E6 - bl sub_02022974 -_022541E6: - add r0, r4, #0 - ldr r2, [r4, #0x4c] - ldr r3, [r4, #0x14] - ldr r5, [r4, #0x3c] - add r0, #0x24 - add r1, r4, #0 - blx r5 - mov r0, #1 - strb r0, [r4, #2] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov25_022541D8 - - thumb_func_start ov25_022541FC -ov25_022541FC: ; 0x022541FC - ldrb r0, [r0, #2] - cmp r0, #2 - bne _02254206 - mov r0, #1 - bx lr -_02254206: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov25_022541FC - - thumb_func_start ov25_0225420C -ov25_0225420C: ; 0x0225420C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #2] - cmp r0, #2 - beq _0225421A - bl sub_02022974 -_0225421A: - ldr r0, [r4, #0x24] - ldr r1, [r4, #0x40] - blx r1 - mov r0, #3 - strb r0, [r4, #2] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_0225420C - - thumb_func_start ov25_02254228 -ov25_02254228: ; 0x02254228 - ldrb r0, [r0, #2] - cmp r0, #0 - bne _02254232 - mov r0, #1 - bx lr -_02254232: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov25_02254228 - - thumb_func_start ov25_02254238 -ov25_02254238: ; 0x02254238 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02253CE0 - str r5, [r0, #0x3c] - str r4, [r0, #0x40] - mov r1, #0 - str r1, [r0, #0x44] - pop {r3, r4, r5, pc} - thumb_func_end ov25_02254238 - - thumb_func_start ov25_0225424C -ov25_0225424C: ; 0x0225424C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #2] - cmp r0, #1 - beq _0225425A - bl sub_02022974 -_0225425A: - mov r0, #2 - strb r0, [r4, #2] - pop {r4, pc} - thumb_func_end ov25_0225424C - - thumb_func_start ov25_02254260 -ov25_02254260: ; 0x02254260 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #2] - cmp r0, #3 - beq _0225426E - bl sub_02022974 -_0225426E: - mov r0, #0 - strb r0, [r4, #2] - pop {r4, pc} - thumb_func_end ov25_02254260 - - thumb_func_start ov25_02254274 -ov25_02254274: ; 0x02254274 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02253CE0 - str r5, [r0, #0x44] - str r4, [r0, #0x48] - pop {r3, r4, r5, pc} - thumb_func_end ov25_02254274 - - thumb_func_start ov25_02254284 -ov25_02254284: ; 0x02254284 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #7 - str r0, [sp] - ldr r0, _022542C0 ; =0x02255E60 - ldr r2, _022542C4 ; =ov25_022542E4 - mov r1, #3 - add r3, r4, #0 - bl ov25_02255ACC - str r0, [r4, #0x28] - cmp r0, #0 - beq _022542B8 - mov r1, #0 - add r2, r1, #0 - mov r3, #7 - bl ov25_02255C48 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x2c] - str r0, [r4, #0x30] - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_022542B8: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_022542C0: .word 0x02255E60 -_022542C4: .word ov25_022542E4 - thumb_func_end ov25_02254284 - - thumb_func_start ov25_022542C8 -ov25_022542C8: ; 0x022542C8 - ldr r3, _022542D0 ; =ov25_02255B34 - ldr r0, [r0, #0x28] - bx r3 - nop -_022542D0: .word ov25_02255B34 - thumb_func_end ov25_022542C8 - - thumb_func_start ov25_022542D4 -ov25_022542D4: ; 0x022542D4 - ldr r3, _022542E0 ; =ov25_02255B50 - mov r1, #0 - str r1, [r0, #8] - ldr r0, [r0, #0x28] - bx r3 - nop -_022542E0: .word ov25_02255B50 - thumb_func_end ov25_022542D4 - - thumb_func_start ov25_022542E4 -ov25_022542E4: ; 0x022542E4 - push {r3, r4, r5, r6, r7, lr} - add r5, r3, #0 - add r7, r0, #0 - add r0, r5, #0 - add r6, r1, #0 - str r2, [sp] - bl ov25_0225450C - cmp r0, #0 - bne _0225430E - ldr r0, [sp] - cmp r0, #0 - beq _02254308 - cmp r0, #1 - bne _02254312 - mov r0, #1 - strb r0, [r5, #3] - b _02254312 -_02254308: - mov r0, #0 - strb r0, [r5, #3] - b _02254312 -_0225430E: - mov r0, #0 - strb r0, [r5, #3] -_02254312: - cmp r7, #2 - bne _0225432E - add r0, r5, #0 - bl ov25_0225450C - cmp r0, #0 - beq _022543E6 - ldr r0, [sp] - cmp r0, #1 - bne _022543E6 - ldr r0, _022543E8 ; =0x0000066E - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_0225432E: - ldr r0, [sp] - mov r4, #0 - mvn r4, r4 - cmp r0, #0 - beq _0225433E - cmp r0, #1 - beq _0225434A - b _02254372 -_0225433E: - cmp r7, #0 - bne _02254346 - mov r4, #8 - b _02254372 -_02254346: - mov r4, #0xb - b _02254372 -_0225434A: - add r0, r5, #0 - bl ov25_0225450C - cmp r0, #0 - bne _0225435A - ldrb r0, [r5, #6] - cmp r0, #0 - beq _02254368 -_0225435A: - cmp r7, #0 - bne _02254362 - mov r4, #6 - b _02254364 -_02254362: - mov r4, #9 -_02254364: - mov r6, #0 - b _02254372 -_02254368: - cmp r7, #0 - bne _02254370 - mov r4, #7 - b _02254372 -_02254370: - mov r4, #0xa -_02254372: - mov r0, #0 - ldr r1, [r5, #0x2c] - mvn r0, r0 - cmp r1, r0 - beq _02254382 - add r0, r4, #0 - add r4, r1, #0 - str r0, [r5, #0x2c] -_02254382: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _022543A8 - ldr r0, [r5, #0x1c] - add r1, r4, #0 - bl ov25_022543EC - cmp r0, #0 - beq _022543A8 - cmp r4, #6 - beq _022543A6 - cmp r4, #7 - beq _022543A6 - add r0, r4, #0 - sub r0, #9 - cmp r0, #1 - bhi _022543A8 -_022543A6: - str r4, [r5, #0x30] -_022543A8: - cmp r6, #2 - beq _022543CC - cmp r6, #3 - beq _022543BE - cmp r6, #5 - bne _022543D8 - ldr r0, [r5, #0x28] - mov r1, #0 - bl ov25_02255C68 - b _022543D8 -_022543BE: - ldr r0, [r5, #0x30] - cmp r0, #6 - beq _022543C8 - cmp r0, #9 - bne _022543D8 -_022543C8: - mov r6, #0 - b _022543D8 -_022543CC: - ldr r0, [r5, #0x30] - cmp r0, #7 - beq _022543D6 - cmp r0, #0xa - bne _022543D8 -_022543D6: - mov r6, #3 -_022543D8: - str r6, [r5, #8] - cmp r7, #0 - bne _022543E2 - mov r0, #0 - b _022543E4 -_022543E2: - mov r0, #1 -_022543E4: - str r0, [r5, #0x60] -_022543E6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022543E8: .word 0x0000066E - thumb_func_end ov25_022542E4 - - thumb_func_start ov25_022543EC -ov25_022543EC: ; 0x022543EC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_022543F4: - add r0, r5, #0 - add r1, r6, #0 - bl ov25_022547F4 - cmp r0, #0 - bne _02254404 - mov r0, #0 - pop {r4, r5, r6, pc} -_02254404: - add r4, r4, #1 - cmp r4, #6 - blo _022543F4 - add r0, r5, #0 - add r1, r6, #0 - bl ov25_022547D0 - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov25_022543EC - - thumb_func_start ov25_02254418 -ov25_02254418: ; 0x02254418 - push {r3, lr} - bl ov25_02253CE0 - ldr r0, [r0, #0x1c] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov25_02254418 - - thumb_func_start ov25_02254424 -ov25_02254424: ; 0x02254424 - push {r4, lr} - add r4, r0, #0 - bl ov25_02253CE0 - ldrb r1, [r0, #5] - cmp r1, #0 - bne _02254442 - bl ov25_0225450C - cmp r0, #0 - bne _02254442 - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_02254442: - pop {r4, pc} - thumb_func_end ov25_02254424 - - thumb_func_start ov25_02254444 -ov25_02254444: ; 0x02254444 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02253CE0 - ldrb r1, [r0, #5] - cmp r1, #0 - bne _02254468 - bl ov25_0225450C - cmp r0, #0 - bne _02254468 - lsl r0, r5, #0x10 - lsl r1, r4, #0x18 - lsr r0, r0, #0x10 - lsr r1, r1, #0x18 - bl sub_02005844 -_02254468: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov25_02254444 - - thumb_func_start ov25_0225446C -ov25_0225446C: ; 0x0225446C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02253CE0 - ldrb r1, [r0, #5] - cmp r1, #0 - bne _022544B8 - bl ov25_0225450C - cmp r0, #0 - bne _022544B8 - add r0, r5, #0 - add r1, r4, #0 - bl sub_020227A4 - cmp r0, #0 - beq _022544B8 - ldr r0, [r5, #0] - sub r0, #0x10 - cmp r0, #0xbf - bhs _0225449C - mov r1, #1 - b _0225449E -_0225449C: - mov r1, #0 -_0225449E: - ldr r0, [r4, #0] - sub r0, #0x10 - cmp r0, #0x9f - bhs _022544AA - mov r0, #1 - b _022544AC -_022544AA: - mov r0, #0 -_022544AC: - tst r0, r1 - beq _022544B4 - mov r0, #1 - pop {r3, r4, r5, pc} -_022544B4: - mov r0, #0 - pop {r3, r4, r5, pc} -_022544B8: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov25_0225446C - - thumb_func_start ov25_022544BC -ov25_022544BC: ; 0x022544BC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02253CE0 - ldrb r1, [r0, #5] - cmp r1, #0 - bne _02254508 - bl ov25_0225450C - cmp r0, #0 - bne _02254508 - add r0, r5, #0 - add r1, r4, #0 - bl sub_020227C0 - cmp r0, #0 - beq _02254508 - ldr r0, [r5, #0] - sub r0, #0x10 - cmp r0, #0xbf - bhs _022544EC - mov r1, #1 - b _022544EE -_022544EC: - mov r1, #0 -_022544EE: - ldr r0, [r4, #0] - sub r0, #0x10 - cmp r0, #0x9f - bhs _022544FA - mov r0, #1 - b _022544FC -_022544FA: - mov r0, #0 -_022544FC: - tst r0, r1 - beq _02254504 - mov r0, #1 - pop {r3, r4, r5, pc} -_02254504: - mov r0, #0 - pop {r3, r4, r5, pc} -_02254508: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov25_022544BC - - thumb_func_start ov25_0225450C -ov25_0225450C: ; 0x0225450C - ldr r3, _02254514 ; =sub_020509A4 - ldr r0, [r0, #0x5c] - bx r3 - nop -_02254514: .word sub_020509A4 - thumb_func_end ov25_0225450C - - thumb_func_start ov25_02254518 -ov25_02254518: ; 0x02254518 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_0225450C - cmp r0, #0 - bne _02254532 - ldrb r0, [r5, #5] - cmp r0, #0 - bne _02254532 - add r0, r4, #0 - bl ov25_02255B50 -_02254532: - pop {r3, r4, r5, pc} - thumb_func_end ov25_02254518 - - thumb_func_start ov25_02254534 -ov25_02254534: ; 0x02254534 - ldrb r0, [r0, #4] - bx lr - thumb_func_end ov25_02254534 - - thumb_func_start ov25_02254538 -ov25_02254538: ; 0x02254538 - ldrb r0, [r0, #7] - bx lr - thumb_func_end ov25_02254538 - - thumb_func_start ov25_0225453C -ov25_0225453C: ; 0x0225453C - ldr r0, [r0, #0x5c] - bx lr - thumb_func_end ov25_0225453C - - thumb_func_start ov25_02254540 -ov25_02254540: ; 0x02254540 - ldr r0, [r0, #0x58] - bx lr - thumb_func_end ov25_02254540 - - thumb_func_start ov25_02254544 -ov25_02254544: ; 0x02254544 - ldr r0, [r0, #0x54] - bx lr - thumb_func_end ov25_02254544 - - thumb_func_start ov25_02254548 -ov25_02254548: ; 0x02254548 - push {r3, lr} - ldr r0, [r0, #0x54] - bl sub_02025E38 - bl sub_02025F30 - cmp r0, #1 - beq _0225455C - mov r0, #1 - pop {r3, pc} -_0225455C: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov25_02254548 - - thumb_func_start ov25_02254560 -ov25_02254560: ; 0x02254560 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x42 - add r5, r0, #0 - mov r0, #7 - lsl r1, r1, #4 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - str r0, [r5, #0] - add r4, r0, #0 - beq _0225464C - mov r0, #0x72 - lsl r0, r0, #2 - str r7, [r4, r0] - ldr r0, [r4, r0] - bl sub_020A7FFC - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #7 - bl ov25_02255540 - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - cmp r0, #0 - bne _022545AA - ldr r0, [r5, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_022545AA: - mov r0, #7 - str r6, [r4, #0] - bl sub_02018340 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp] - add r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - bl ov25_02254684 - mov r1, #0x75 - lsl r1, r1, #2 - add r0, r4, r1 - sub r1, #8 - ldr r1, [r4, r1] - bl ov25_02254DD8 - ldr r0, [r5, #0] - mov r1, #8 - add r0, r0, #4 - bl ov25_02255090 - ldr r0, [r5, #0] - mov r1, #0x48 - add r0, #0x2c - mov r2, #4 - mov r3, #6 - bl ov25_02254798 - ldr r0, [r5, #0] - mov r1, #0x4c - add r0, #0x6c - mov r2, #4 - mov r3, #6 - bl ov25_02254798 - ldr r0, [r5, #0] - mov r1, #0x50 - add r0, #0xac - mov r2, #4 - mov r3, #6 - bl ov25_02254798 - ldr r0, [r5, #0] - mov r1, #0x54 - add r0, #0xec - mov r2, #2 - mov r3, #4 - bl ov25_02254798 - mov r0, #0x4b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0x58 - mov r2, #2 - mov r3, #4 - bl ov25_02254798 - mov r0, #0x5b - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - mov r1, #0x5c - mov r2, #2 - mov r3, #4 - bl ov25_02254798 - ldr r0, _02254650 ; =ov25_02254654 - add r1, r4, #0 - mov r2, #0 - bl sub_0200DA3C - mov r1, #0x1d - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0225464C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02254650: .word ov25_02254654 - thumb_func_end ov25_02254560 - - thumb_func_start ov25_02254654 -ov25_02254654: ; 0x02254654 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r3, _02254660 ; =ov25_02255614 - ldr r0, [r1, r0] - bx r3 - nop -_02254660: .word ov25_02255614 - thumb_func_end ov25_02254654 - - thumb_func_start ov25_02254664 -ov25_02254664: ; 0x02254664 - push {r3, lr} - bl ov25_02254418 - mov r1, #0x73 - lsl r1, r1, #2 - ldr r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov25_02254664 - - thumb_func_start ov25_02254674 -ov25_02254674: ; 0x02254674 - push {r3, lr} - bl ov25_02254418 - mov r1, #0x7e - lsl r1, r1, #2 - ldr r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov25_02254674 - - thumb_func_start ov25_02254684 -ov25_02254684: ; 0x02254684 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xc - mov r1, #0 - add r2, sp, #0 - mov r3, #7 - bl sub_02006F88 - add r4, r0, #0 - beq _022546B6 - ldr r0, [sp] - mov r2, #2 - lsl r2, r2, #8 - ldr r0, [r0, #0xc] - add r1, r5, r2 - bl sub_020C4B68 - mov r1, #2 - lsl r1, r1, #8 - add r0, r5, r1 - bl sub_020C2C54 - add r0, r4, #0 - bl sub_020181C4 -_022546B6: - pop {r3, r4, r5, pc} - thumb_func_end ov25_02254684 - - thumb_func_start ov25_022546B8 -ov25_022546B8: ; 0x022546B8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - bl ov25_02254418 - add r4, r0, #0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov25_02254540 - bl sub_02056888 - mov r1, #2 - lsl r1, r1, #8 - add r5, r4, r1 - lsl r4, r0, #6 - add r0, r5, r4 - lsl r1, r6, #5 - mov r2, #0x20 - bl sub_020C0108 - add r0, r5, r4 - add r1, r7, #0 - mov r2, #0x20 - bl sub_020C01B8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov25_022546B8 - - thumb_func_start ov25_022546F0 -ov25_022546F0: ; 0x022546F0 - push {r3, r4, r5, lr} - bl ov25_02254418 - add r4, r0, #0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov25_02254540 - bl sub_02056888 - mov r1, #2 - lsl r0, r0, #5 - lsl r1, r1, #8 - add r0, #0x10 - add r4, r4, r1 - lsl r5, r0, #1 - add r0, r4, r5 - mov r1, #0 - mov r2, #0x20 - bl sub_020C0108 - add r0, r4, r5 - mov r1, #0 - mov r2, #0x20 - bl sub_020C01B8 - pop {r3, r4, r5, pc} - thumb_func_end ov25_022546F0 - - thumb_func_start ov25_02254728 -ov25_02254728: ; 0x02254728 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov25_02254418 - add r4, r0, #0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov25_02254540 - bl sub_02056888 - mov r1, #2 - lsl r1, r1, #8 - add r1, r4, r1 - lsl r0, r0, #6 - add r0, r1, r0 - add r1, r5, #0 - mov r2, #0x20 - bl sub_020C4B18 - pop {r3, r4, r5, pc} - thumb_func_end ov25_02254728 - - thumb_func_start ov25_02254754 -ov25_02254754: ; 0x02254754 - push {r4, lr} - add r4, r0, #0 - beq _02254794 - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov25_02254F40 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02254772 - bl ov25_022555E8 -_02254772: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02254780 - bl sub_020181C4 -_02254780: - mov r0, #0x1d - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0225478E - bl sub_0200DA58 -_0225478E: - add r0, r4, #0 - bl sub_020181C4 -_02254794: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_02254754 - - thumb_func_start ov25_02254798 -ov25_02254798: ; 0x02254798 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0xf - mov r6, #0 - mov ip, r2 - mov lr, r1 - add r7, r3, #0 - add r2, r6, #0 - lsl r4, r4, #0xc -_022547A8: - mov r3, lr - mov r1, #0 - add r3, r3, r6 -_022547AE: - add r5, r1, r3 - orr r5, r4 - strh r5, [r0] - add r1, r1, #1 - add r0, r0, #2 - cmp r1, #4 - blt _022547AE - mov r1, ip - cmp r2, r1 - blt _022547C6 - cmp r2, r7 - blt _022547C8 -_022547C6: - add r6, #0x20 -_022547C8: - add r2, r2, #1 - cmp r2, #8 - blt _022547A8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov25_02254798 - - thumb_func_start ov25_022547D0 -ov25_022547D0: ; 0x022547D0 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, r2, #4 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - ldr r0, _022547F0 ; =0x02255F8C - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022547F0: .word 0x02255F8C - thumb_func_end ov25_022547D0 - - thumb_func_start ov25_022547F4 -ov25_022547F4: ; 0x022547F4 - ldr r3, _022547FC ; =ov25_02255130 - add r0, r0, #4 - bx r3 - nop -_022547FC: .word ov25_02255130 - thumb_func_end ov25_022547F4 - - thumb_func_start ov25_02254800 -ov25_02254800: ; 0x02254800 - ldr r3, _02254808 ; =ov25_02255154 - add r0, r0, #4 - bx r3 - nop -_02254808: .word ov25_02255154 - thumb_func_end ov25_02254800 - - thumb_func_start ov25_0225480C -ov25_0225480C: ; 0x0225480C - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, r0, #4 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_0225480C - - thumb_func_start ov25_02254820 -ov25_02254820: ; 0x02254820 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - mov r0, #0 - bl sub_020BDEA8 - mov r0, #0x80 - bl sub_020BEA50 - mov r0, #1 - lsl r0, r0, #8 - bl sub_020BEAF8 - ldr r2, _0225492C ; =0x04001000 - ldr r0, _02254930 ; =0xFFCFFFEF - ldr r1, [r2, #0] - and r1, r0 - mov r0, #0x10 - orr r0, r1 - str r0, [r2, #0] - bl sub_0201FF68 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, _02254934 ; =0x02255F54 - mov r1, #4 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, _02254938 ; =0x02255F70 - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - mov r0, #0x40 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #7 - mov r2, #0x7e - str r0, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r4, r2] - mov r0, #0xc - mov r1, #0xe - mov r3, #4 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #7 - mov r2, #0x7e - str r0, [sp, #0xc] - lsl r2, r2, #2 - ldr r2, [r4, r2] - mov r0, #0xc - mov r1, #0xf - mov r3, #4 - bl sub_02006E60 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov25_02254548 - add r3, r0, #0 - mov r0, #0x1e - lsl r0, r0, #4 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #0xd - mov r2, #4 - lsl r3, r3, #5 - bl sub_02006E9C - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x18 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - mov r2, #0xe4 - bl sub_02019CB8 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019448 - ldr r0, _0225492C ; =0x04001000 - ldr r1, _0225493C ; =0xFFFFE0FF - ldr r2, [r0, #0] - and r2, r1 - mov r1, #0x13 - lsl r1, r1, #8 - orr r1, r2 - str r1, [r0, #0] - ldr r2, [r0, #0] - ldr r1, _02254940 ; =0xFFFF1FFF - and r1, r2 - str r1, [r0, #0] - add r0, r5, #0 - bl ov25_0225480C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225492C: .word 0x04001000 -_02254930: .word 0xFFCFFFEF -_02254934: .word 0x02255F54 -_02254938: .word 0x02255F70 -_0225493C: .word 0xFFFFE0FF -_02254940: .word 0xFFFF1FFF - thumb_func_end ov25_02254820 - - thumb_func_start ov25_02254944 -ov25_02254944: ; 0x02254944 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0x10] - add r0, r1, #0 - bl ov25_02255244 - add r4, r0, #0 - ldr r0, [sp, #0x10] - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [sp, #0x10] - bl ov25_02255248 - cmp r0, #0 - beq _02254970 - cmp r0, #1 - beq _0225497C - cmp r0, #2 - beq _02254A50 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02254970: - mov r0, #0 - strh r0, [r4] - strh r0, [r4, #2] - ldr r0, [sp, #0x10] - bl ov25_0225524C -_0225497C: - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - ldrh r0, [r4] - cmp r0, #0 - beq _02254A56 - mov r0, #0 - strh r0, [r4] - ldrh r0, [r4, #2] - add r0, #0xc - strh r0, [r4, #2] - ldrh r0, [r4, #2] - cmp r0, #0x28 - bls _0225499C - mov r0, #0x28 - strh r0, [r4, #2] -_0225499C: - ldrh r1, [r4, #2] - lsr r3, r1, #0x1f - lsl r2, r1, #0x1e - lsr r0, r1, #2 - sub r2, r2, r3 - mov r1, #0x1e - ror r2, r1 - mov r1, #0xc - sub r6, r1, r0 - lsl r0, r0, #1 - str r0, [sp, #0x14] - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - add r7, r3, r2 - ldr r0, [sp, #0x14] - mov r1, #5 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0x40 - mov r3, #2 - bl sub_02019CB8 - cmp r7, #0 - beq _02254A34 - sub r0, r6, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - add r2, r7, #0 - lsl r0, r0, #2 - add r2, #0xe4 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #5 - lsr r2, r2, #0x10 - mov r3, #2 - bl sub_02019CB8 - ldr r0, [sp, #0x14] - mov r2, #0xe4 - add r0, r6, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - sub r2, r2, r7 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #5 - lsr r2, r2, #0x10 - mov r3, #2 - bl sub_02019CB8 -_02254A34: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #5 - bl sub_02019448 - ldrh r0, [r4, #2] - cmp r0, #0x28 - bne _02254A56 - ldr r0, [sp, #0x10] - bl ov25_0225524C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02254A50: - ldr r0, [sp, #0x10] - bl ov25_0225480C -_02254A56: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov25_02254944 - - thumb_func_start ov25_02254A5C -ov25_02254A5C: ; 0x02254A5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0x10] - add r0, r1, #0 - bl ov25_02255244 - add r4, r0, #0 - ldr r0, [sp, #0x10] - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [sp, #0x10] - bl ov25_02255248 - cmp r0, #0 - beq _02254A88 - cmp r0, #1 - beq _02254A94 - cmp r0, #2 - beq _02254B82 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02254A88: - mov r0, #0 - strh r0, [r4] - strh r0, [r4, #2] - ldr r0, [sp, #0x10] - bl ov25_0225524C -_02254A94: - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - ldrh r0, [r4] - cmp r0, #0 - beq _02254B88 - mov r0, #0 - strh r0, [r4] - ldrh r0, [r4, #2] - add r0, #8 - strh r0, [r4, #2] - ldrh r0, [r4, #2] - cmp r0, #0x28 - bls _02254AB4 - mov r0, #0x28 - strh r0, [r4, #2] -_02254AB4: - ldrh r0, [r4, #2] - mov r3, #2 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1e - lsr r7, r0, #2 - sub r1, r1, r2 - mov r0, #0x1e - ror r1, r0 - mov r0, #0x16 - sub r0, r0, r7 - str r0, [sp, #0x14] - str r3, [sp] - mov r0, #0x18 - add r6, r2, r1 - str r0, [sp, #4] - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #5 - mov r2, #0xe4 - bl sub_02019CB8 - ldr r0, [sp, #0x14] - mov r1, #5 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0xe4 - mov r3, #2 - bl sub_02019CB8 - cmp r6, #0 - beq _02254B66 - mov r0, #0 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - sub r3, r6, #1 - mov r2, #0xe7 - sub r2, r2, r3 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #5 - lsr r2, r2, #0x10 - mov r3, #2 - bl sub_02019CB8 - ldr r0, [sp, #0x14] - add r6, #0xe0 - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - lsl r2, r6, #0x10 - ldr r0, [r5, r0] - mov r1, #5 - lsr r2, r2, #0x10 - mov r3, #2 - bl sub_02019CB8 -_02254B66: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #5 - bl sub_02019448 - ldrh r0, [r4, #2] - cmp r0, #0x28 - bne _02254B88 - ldr r0, [sp, #0x10] - bl ov25_0225524C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02254B82: - ldr r0, [sp, #0x10] - bl ov25_0225480C -_02254B88: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov25_02254A5C - - thumb_func_start ov25_02254B8C -ov25_02254B8C: ; 0x02254B8C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r1, #0 - add r0, r5, #0 - bl ov25_02255244 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255248 - add r2, r0, #0 - cmp r2, #4 - bhs _02254BE6 - mov r3, #2 - str r3, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x14 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - mov r6, #0xe3 - lsl r0, r0, #2 - sub r2, r6, r2 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - mov r1, #5 - lsr r2, r2, #0x10 - bl sub_02019CB8 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019448 - add r0, r5, #0 - bl ov25_0225524C - add sp, #0x10 - pop {r4, r5, r6, pc} -_02254BE6: - add r0, r5, #0 - bl ov25_0225480C - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov25_02254B8C - - thumb_func_start ov25_02254BF0 -ov25_02254BF0: ; 0x02254BF0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r1, #0 - add r0, r5, #0 - bl ov25_02255244 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255248 - add r2, r0, #0 - cmp r2, #4 - bhs _02254C4A - mov r3, #2 - str r3, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x14 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - mov r6, #0xe7 - lsl r0, r0, #2 - sub r2, r6, r2 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - mov r1, #5 - lsr r2, r2, #0x10 - bl sub_02019CB8 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019448 - add r0, r5, #0 - bl ov25_0225524C - add sp, #0x10 - pop {r4, r5, r6, pc} -_02254C4A: - add r0, r5, #0 - bl ov25_0225480C - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov25_02254BF0 - - thumb_func_start ov25_02254C54 -ov25_02254C54: ; 0x02254C54 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - bl ov25_0225523C - add r4, r0, #0 - cmp r5, #0 - bne _02254C6E - mov r3, #0x1c - mov r0, #4 - b _02254C72 -_02254C6E: - mov r3, #0x1c - mov r0, #0xc -_02254C72: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r1, #4 - str r1, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0x7e - lsl r0, r0, #2 - lsl r3, r3, #0x18 - ldr r0, [r4, r0] - add r2, r7, #0 - lsr r3, r3, #0x18 - bl sub_020198C0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_02019448 - add r0, r6, #0 - bl ov25_0225480C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov25_02254C54 - - thumb_func_start ov25_02254CA8 -ov25_02254CA8: ; 0x02254CA8 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r1, r0, #0 - add r0, r4, #0 - add r1, #0x6c - mov r2, #0 - bl ov25_02254C54 - ldr r0, _02254CC8 ; =0x00000671 - bl sub_02005748 - pop {r4, pc} - nop -_02254CC8: .word 0x00000671 - thumb_func_end ov25_02254CA8 - - thumb_func_start ov25_02254CCC -ov25_02254CCC: ; 0x02254CCC - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - mov r1, #0x4b - add r2, r0, #0 - lsl r1, r1, #2 - add r1, r2, r1 - add r0, r4, #0 - mov r2, #1 - bl ov25_02254C54 - ldr r0, _02254CF0 ; =0x00000671 - bl sub_02005748 - pop {r4, pc} - nop -_02254CF0: .word 0x00000671 - thumb_func_end ov25_02254CCC - - thumb_func_start ov25_02254CF4 -ov25_02254CF4: ; 0x02254CF4 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r1, r0, #0 - add r0, r4, #0 - add r1, #0x2c - mov r2, #0 - bl ov25_02254C54 - pop {r4, pc} - thumb_func_end ov25_02254CF4 - - thumb_func_start ov25_02254D0C -ov25_02254D0C: ; 0x02254D0C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r1, r0, #0 - add r0, r4, #0 - add r1, #0xec - mov r2, #1 - bl ov25_02254C54 - pop {r4, pc} - thumb_func_end ov25_02254D0C - - thumb_func_start ov25_02254D24 -ov25_02254D24: ; 0x02254D24 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r1, r0, #0 - add r0, r4, #0 - add r1, #0xac - mov r2, #0 - bl ov25_02254C54 - ldr r0, _02254D44 ; =0x0000066F - bl sub_02005748 - pop {r4, pc} - nop -_02254D44: .word 0x0000066F - thumb_func_end ov25_02254D24 - - thumb_func_start ov25_02254D48 -ov25_02254D48: ; 0x02254D48 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - mov r1, #0x5b - add r2, r0, #0 - lsl r1, r1, #2 - add r1, r2, r1 - add r0, r4, #0 - mov r2, #1 - bl ov25_02254C54 - ldr r0, _02254D6C ; =0x0000066F - bl sub_02005748 - pop {r4, pc} - nop -_02254D6C: .word 0x0000066F - thumb_func_end ov25_02254D48 - - thumb_func_start ov25_02254D70 -ov25_02254D70: ; 0x02254D70 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - mov r1, #0x75 - add r4, r0, #0 - lsl r1, r1, #2 - add r1, r4, r1 - bl ov25_02254DE0 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r1, [r4, #0] - add r0, r4, r0 - bl ov25_02254EE8 - add r0, r5, #0 - bl ov25_0225480C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov25_02254D70 - - thumb_func_start ov25_02254D9C -ov25_02254D9C: ; 0x02254D9C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - add r1, r0, #0 - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r1, [r1, #0] - bl ov25_02254EE8 - add r0, r4, #0 - bl ov25_0225480C - pop {r4, pc} - thumb_func_end ov25_02254D9C - - thumb_func_start ov25_02254DBC -ov25_02254DBC: ; 0x02254DBC - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - mov r1, #0x75 - lsl r1, r1, #2 - add r0, r0, r1 - bl ov25_02254F40 - add r0, r4, #0 - bl ov25_0225480C - pop {r4, pc} - thumb_func_end ov25_02254DBC - - thumb_func_start ov25_02254DD8 -ov25_02254DD8: ; 0x02254DD8 - mov r2, #0 - str r2, [r0, #0] - str r1, [r0, #4] - bx lr - thumb_func_end ov25_02254DD8 - - thumb_func_start ov25_02254DE0 -ov25_02254DE0: ; 0x02254DE0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - mov r0, #7 - str r0, [sp] - add r0, r4, #0 - add r0, #8 - mov r1, #0xc - mov r2, #3 - mov r3, #4 - bl ov25_02255958 - cmp r0, #0 - beq _02254E7C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #0xc - mov r1, #2 - bl sub_02006EC0 - mov r0, #0x60 - str r0, [sp] - mov r0, #7 - mov r1, #0 - str r0, [sp, #4] - mov r0, #0xc - mov r2, #5 - add r3, r1, #0 - bl sub_02006E84 - add r0, r5, #0 - mov r1, #0xf - bl ov25_02254E84 - add r2, r4, #0 - ldr r0, [r4, #4] - ldr r1, _02254E80 ; =0x02255F44 - add r2, #8 - bl ov25_02255810 - str r0, [r4, #0x1c] - cmp r0, #0 - beq _02254E7C - add r2, r4, #0 - ldr r0, [r4, #4] - ldr r1, _02254E80 ; =0x02255F44 - add r2, #8 - bl ov25_02255810 - str r0, [r4, #0x20] - cmp r0, #0 - bne _02254E5E - ldr r0, [r4, #4] - ldr r1, [r4, #0x1c] - bl ov25_022558B0 - add sp, #0xc - pop {r4, r5, pc} -_02254E5E: - mov r1, #1 - lsl r1, r1, #0x10 - mov r2, #0 - bl ov25_022558F0 - ldr r0, [r4, #0x1c] - mov r1, #0xf - bl ov25_02255938 - ldr r0, [r4, #0x20] - mov r1, #0xf - bl ov25_02255938 - mov r0, #1 - str r0, [r4, #0] -_02254E7C: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02254E80: .word 0x02255F44 - thumb_func_end ov25_02254DE0 - - thumb_func_start ov25_02254E84 -ov25_02254E84: ; 0x02254E84 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r4, r1, #0 - bl ov25_02254540 - bl sub_02056888 - mov r0, #1 - lsl r0, r0, #0xa - add r0, r5, r0 - bl ov25_02254728 - ldr r1, _02254EE4 ; =0x00000402 - add r0, r1, #6 - ldrh r2, [r5, r1] - ldrh r0, [r5, r0] - strh r0, [r5, r1] - add r0, r1, #6 - strh r2, [r5, r0] - add r0, r1, #0 - add r2, r1, #0 - add r0, #0xe - add r2, #0x1c - ldrh r3, [r5, r2] - add r2, r1, #0 - ldrh r0, [r5, r0] - add r2, #0xe - strh r3, [r5, r2] - add r2, r1, #0 - add r2, #0x1c - strh r0, [r5, r2] - sub r0, r1, #2 - add r0, r5, r0 - mov r1, #0x20 - bl sub_020C2C54 - mov r0, #1 - lsl r0, r0, #0xa - add r0, r5, r0 - lsl r1, r4, #5 - mov r2, #0x20 - bl sub_020C01B8 - pop {r3, r4, r5, pc} - nop -_02254EE4: .word 0x00000402 - thumb_func_end ov25_02254E84 - - thumb_func_start ov25_02254EE8 -ov25_02254EE8: ; 0x02254EE8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02254F32 - ldr r0, [r1, #0] - ldr r2, _02254F34 ; =0x04000280 - mov r3, #0 - add r0, r0, #1 - strh r3, [r2] - str r0, [r2, #0x10] - add r0, r2, #0 - mov r1, #0xa - add r0, #0x18 - str r1, [r0, #0] - str r3, [r0, #4] - lsr r0, r2, #0xb -_02254F0A: - ldrh r1, [r2] - tst r1, r0 - bne _02254F0A - ldr r0, _02254F38 ; =0x040002A0 - add r3, r0, #0 - ldr r1, [r0, #0] - sub r3, #0x20 - lsr r0, r0, #0xb -_02254F1A: - ldrh r2, [r3] - tst r2, r0 - bne _02254F1A - ldr r0, _02254F3C ; =0x040002A8 - ldr r5, [r0, #0] - ldr r0, [r4, #0x1c] - bl ov25_022558C4 - ldr r0, [r4, #0x20] - add r1, r5, #0 - bl ov25_022558C4 -_02254F32: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02254F34: .word 0x04000280 -_02254F38: .word 0x040002A0 -_02254F3C: .word 0x040002A8 - thumb_func_end ov25_02254EE8 - - thumb_func_start ov25_02254F40 -ov25_02254F40: ; 0x02254F40 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02254F66 - ldr r0, [r4, #4] - ldr r1, [r4, #0x1c] - bl ov25_022558B0 - ldr r0, [r4, #4] - ldr r1, [r4, #0x20] - bl ov25_022558B0 - add r0, r4, #0 - add r0, #8 - bl ov25_022559B0 - mov r0, #0 - str r0, [r4, #0] -_02254F66: - pop {r4, pc} - thumb_func_end ov25_02254F40 - - thumb_func_start ov25_02254F68 -ov25_02254F68: ; 0x02254F68 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r1, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r6, #0 - bl ov25_02255244 - add r0, r6, #0 - bl ov25_02255248 - add r5, r0, #0 - cmp r5, #3 - bhi _02254FFC - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02254F94: ; jump table - .short _02254F9C - _02254F94 - 2 ; case 0 - .short _02254FB8 - _02254F94 - 2 ; case 1 - .short _02254FB8 - _02254F94 - 2 ; case 2 - .short _02254FB8 - _02254F94 - 2 ; case 3 -_02254F9C: - mov r0, #6 - str r0, [sp] - ldr r0, _02255000 ; =0x04001050 - mov r1, #2 - mov r2, #0x1c - mov r3, #0x1a - bl sub_020BF55C - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_02019448 -_02254FB8: - mov r3, #2 - str r3, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x14 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - mov r2, #0xe7 - lsl r0, r0, #2 - sub r2, r2, r5 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - mov r1, #5 - lsr r2, r2, #0x10 - bl sub_02019CB8 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019448 - cmp r5, #3 - bne _02254FF6 - add r0, r6, #0 - bl ov25_0225480C - add sp, #0x10 - pop {r4, r5, r6, pc} -_02254FF6: - add r0, r6, #0 - bl ov25_0225524C -_02254FFC: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02255000: .word 0x04001050 - thumb_func_end ov25_02254F68 - - thumb_func_start ov25_02255004 -ov25_02255004: ; 0x02255004 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - mov r3, #2 - add r4, r0, #0 - str r3, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x14 - str r0, [sp, #8] - mov r0, #0xf - str r0, [sp, #0xc] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - mov r2, #0x40 - bl sub_02019CB8 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_02019448 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019448 - mov r1, #0 - ldr r0, _02255060 ; =0x04001050 - add r2, r1, #0 - mov r3, #0x1f - str r1, [sp] - bl sub_020BF55C - add r0, r5, #0 - bl ov25_0225480C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02255060: .word 0x04001050 - thumb_func_end ov25_02255004 - - thumb_func_start ov25_02255064 -ov25_02255064: ; 0x02255064 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_02019044 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_02019044 - add r0, r5, #0 - bl ov25_0225480C - pop {r3, r4, r5, pc} - thumb_func_end ov25_02255064 - - thumb_func_start ov25_02255090 -ov25_02255090: ; 0x02255090 - ldr r2, _022550AC ; =0x12345678 - str r1, [r0, #0] - mov r3, #0 - str r2, [r0, #4] - cmp r1, #0 - bls _022550A8 - sub r2, r3, #1 -_0225509E: - add r3, r3, #1 - str r2, [r0, #8] - add r0, r0, #4 - cmp r3, r1 - blo _0225509E -_022550A8: - bx lr - nop -_022550AC: .word 0x12345678 - thumb_func_end ov25_02255090 - - thumb_func_start ov25_022550B0 -ov25_022550B0: ; 0x022550B0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #4] - ldr r0, _022550EC ; =0x12345678 - cmp r1, r0 - beq _022550C2 - bl sub_02022974 -_022550C2: - ldr r6, [r5, #0] - mov r2, #0 - cmp r6, #0 - bls _022550E6 - add r3, r5, #0 - sub r0, r2, #1 -_022550CE: - ldr r1, [r3, #8] - cmp r1, r0 - bne _022550DE - lsl r0, r2, #2 - add r0, r5, r0 - str r4, [r0, #8] - mov r0, #1 - pop {r4, r5, r6, pc} -_022550DE: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, r6 - blo _022550CE -_022550E6: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_022550EC: .word 0x12345678 - thumb_func_end ov25_022550B0 - - thumb_func_start ov25_022550F0 -ov25_022550F0: ; 0x022550F0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #4] - ldr r0, _0225512C ; =0x12345678 - cmp r1, r0 - beq _02255102 - bl sub_02022974 -_02255102: - ldr r3, [r5, #0] - mov r2, #0 - cmp r3, #0 - bls _02255126 - add r1, r5, #0 -_0225510C: - ldr r0, [r1, #8] - cmp r4, r0 - bne _0225511E - mov r1, #0 - lsl r0, r2, #2 - mvn r1, r1 - add r0, r5, r0 - str r1, [r0, #8] - pop {r3, r4, r5, pc} -_0225511E: - add r2, r2, #1 - add r1, r1, #4 - cmp r2, r3 - blo _0225510C -_02255126: - bl sub_02022974 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0225512C: .word 0x12345678 - thumb_func_end ov25_022550F0 - - thumb_func_start ov25_02255130 -ov25_02255130: ; 0x02255130 - push {r3, r4} - ldr r4, [r0, #0] - mov r3, #0 - cmp r4, #0 - bls _0225514E -_0225513A: - ldr r2, [r0, #8] - cmp r1, r2 - bne _02255146 - mov r0, #0 - pop {r3, r4} - bx lr -_02255146: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, r4 - blo _0225513A -_0225514E: - mov r0, #1 - pop {r3, r4} - bx lr - thumb_func_end ov25_02255130 - - thumb_func_start ov25_02255154 -ov25_02255154: ; 0x02255154 - push {r3, r4} - ldr r4, [r0, #0] - mov r3, #0 - cmp r4, #0 - bls _02255174 - sub r1, r3, #1 -_02255160: - ldr r2, [r0, #8] - cmp r2, r1 - beq _0225516C - mov r0, #0 - pop {r3, r4} - bx lr -_0225516C: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, r4 - blo _02255160 -_02255174: - mov r0, #1 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255154 - - thumb_func_start ov25_0225517C -ov25_0225517C: ; 0x0225517C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - str r2, [sp] - mov r0, #0 - add r5, r1, #0 - ldr r2, [r7, #0] - sub r1, r0, #1 - str r3, [sp, #4] - cmp r2, r1 - beq _0225521C - add r3, r7, #0 - sub r1, r0, #1 -_02255196: - ldr r2, [r3, #0] - cmp r5, r2 - bne _02255212 - add r6, r0, #0 - add r0, r7, #0 - str r0, [sp, #8] - add r0, #8 - mov r1, #0xc - str r0, [sp, #8] - mul r6, r1 - ldr r1, [sp, #8] - ldr r0, [sp, #0x28] - ldr r1, [r1, r6] - add r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - beq _0225520C - ldr r0, [sp, #8] - ldr r0, [r0, r6] - cmp r0, #0 - beq _022551C8 - add r0, r4, #0 - add r0, #0x18 - b _022551CA -_022551C8: - mov r0, #0 -_022551CA: - str r0, [r4, #0xc] - ldr r0, [sp, #0x20] - add r1, r5, #0 - bl ov25_022550B0 - cmp r0, #0 - beq _02255202 - ldr r0, [sp] - ldr r2, [sp, #0x24] - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #4] - str r5, [r4, #0] - ldr r0, [sp, #4] - add r5, r7, #4 - str r0, [r4, #0x10] - ldr r0, [r5, r6] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x14] - cmp r0, #0 - beq _02255220 - ldr r2, [r5, r6] - add r1, r4, #0 - blx r2 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_02255202: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_0225520C: - bl sub_02022974 - b _0225521C -_02255212: - add r3, #0xc - ldr r2, [r3, #0] - add r0, r0, #1 - cmp r2, r1 - bne _02255196 -_0225521C: - bl sub_02022974 -_02255220: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov25_0225517C - - thumb_func_start ov25_02255224 -ov25_02255224: ; 0x02255224 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - bl ov25_022550F0 - ldr r0, [r4, #0x14] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov25_02255224 - - thumb_func_start ov25_0225523C -ov25_0225523C: ; 0x0225523C - ldr r0, [r0, #8] - bx lr - thumb_func_end ov25_0225523C - - thumb_func_start ov25_02255240 -ov25_02255240: ; 0x02255240 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov25_02255240 - - thumb_func_start ov25_02255244 -ov25_02255244: ; 0x02255244 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov25_02255244 - - thumb_func_start ov25_02255248 -ov25_02255248: ; 0x02255248 - ldr r0, [r0, #4] - bx lr - thumb_func_end ov25_02255248 - - thumb_func_start ov25_0225524C -ov25_0225524C: ; 0x0225524C - ldr r1, [r0, #4] - add r1, r1, #1 - str r1, [r0, #4] - bx lr - thumb_func_end ov25_0225524C - - thumb_func_start ov25_02255254 -ov25_02255254: ; 0x02255254 - str r1, [r0, #4] - bx lr - thumb_func_end ov25_02255254 - - thumb_func_start ov25_02255258 -ov25_02255258: ; 0x02255258 - push {r3, r4, r5, r6} - mul r2, r3 - ldr r4, [sp, #0x18] - add r1, r1, r2 - lsl r6, r1, #1 - lsl r4, r4, #0xc - ldr r1, [sp, #0x10] - add r5, r4, #0 - orr r5, r1 - add r2, r0, r6 - strh r5, [r0, r6] - add r0, r1, #1 - orr r0, r4 - strh r0, [r2, #2] - ldr r0, [sp, #0x14] - lsl r3, r3, #1 - add r1, r1, r0 - add r0, r4, #0 - orr r0, r1 - strh r0, [r2, r3] - add r0, r1, #1 - add r1, r4, #0 - orr r1, r0 - add r0, r2, r3 - strh r1, [r0, #2] - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255258 - - thumb_func_start ov25_02255290 -ov25_02255290: ; 0x02255290 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x20 - bl sub_02018144 - add r7, r0, #0 - beq _022552FC - bl ov25_02254728 - mov r4, #0 - cmp r6, #0 - bls _022552F6 -_022552AC: - ldrh r3, [r5] - mov r0, #0x1f - lsl r0, r0, #0xa - and r0, r3 - asr r0, r0, #0xa - add r2, r0, #0 - mov r1, #0x72 - mov r0, #0x1f - mul r2, r1 - and r0, r3 - add r1, #0xb9 - mul r1, r0 - mov r0, #0x3e - lsl r0, r0, #4 - and r0, r3 - asr r3, r0, #5 - ldr r0, _02255300 ; =0x0000024B - mul r0, r3 - add r0, r1, r0 - mov r1, #0xfa - add r0, r2, r0 - lsl r1, r1, #2 - bl sub_020E2178 - lsr r1, r0, #3 - cmp r1, #3 - bls _022552E4 - mov r1, #3 -_022552E4: - ldr r0, _02255304 ; =0x02256078 - add r4, r4, #1 - ldrb r0, [r0, r1] - lsl r0, r0, #1 - ldrh r0, [r7, r0] - strh r0, [r5] - add r5, r5, #2 - cmp r4, r6 - blo _022552AC -_022552F6: - add r0, r7, #0 - bl sub_020181C4 -_022552FC: - pop {r3, r4, r5, r6, r7, pc} - nop -_02255300: .word 0x0000024B -_02255304: .word 0x02256078 - thumb_func_end ov25_02255290 - - thumb_func_start ov25_02255308 -ov25_02255308: ; 0x02255308 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #8 - mov r1, #0x20 - bl sub_02018144 - add r4, r0, #0 - beq _0225535E - mov r0, #8 - mov r1, #0x20 - bl sub_02018144 - add r5, r0, #0 - add r0, r4, #0 - bl ov25_02254728 - cmp r5, #0 - beq _02255358 - mov r0, #0 - add r1, r5, #0 - lsl r3, r6, #1 -_02255334: - ldrh r2, [r4, r3] - add r0, r0, #1 - strh r2, [r1] - add r1, r1, #2 - cmp r0, #0x10 - blt _02255334 - add r0, r5, #0 - mov r1, #0x20 - bl sub_020C2C54 - add r0, r5, #0 - lsl r1, r7, #5 - mov r2, #0x20 - bl sub_020C01B8 - add r0, r5, #0 - bl sub_020181C4 -_02255358: - add r0, r4, #0 - bl sub_020181C4 -_0225535E: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov25_02255308 - - thumb_func_start ov25_02255360 -ov25_02255360: ; 0x02255360 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02079FD0 - add r1, r0, #0 - mov r0, #0x13 - add r2, sp, #0 - mov r3, #8 - bl sub_02006F88 - add r4, r0, #0 - beq _0225539E - ldr r0, [sp] - mov r1, #0x40 - ldr r0, [r0, #0xc] - bl ov25_02255290 - ldr r0, [sp] - mov r1, #0x80 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [sp] - lsl r1, r5, #5 - ldr r0, [r0, #0xc] - mov r2, #0x80 - bl sub_020C01B8 - add r0, r4, #0 - bl sub_020181C4 -_0225539E: - pop {r3, r4, r5, pc} - thumb_func_end ov25_02255360 - - thumb_func_start ov25_022553A0 -ov25_022553A0: ; 0x022553A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #4] - lsl r0, r3, #1 - str r0, [sp, #0xc] - add r6, r1, #0 - str r2, [sp, #8] - ldr r2, _02255438 ; =0x02256074 - ldr r1, [sp, #0xc] - mov r0, #8 - ldrh r1, [r2, r1] - bl sub_02018144 - add r7, r0, #0 - beq _02255434 - mov r0, #0x13 - mov r1, #8 - bl sub_02006C24 - str r0, [sp, #0x1c] - cmp r0, #0 - beq _0225542E - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [sp, #8] - cmp r0, #0 - bls _02255428 - ldr r1, _0225543C ; =0x02256070 - ldr r0, [sp, #0xc] - ldr r4, [sp, #0x18] - ldrh r5, [r1, r0] - ldr r1, _02255438 ; =0x02256074 - ldrh r0, [r1, r0] - str r0, [sp, #0x14] - ldr r0, [sp, #4] - lsl r0, r0, #5 - str r0, [sp, #0x10] -_022553EA: - str r7, [sp] - ldr r0, [sp, #0x1c] - ldr r1, [r6, #0] - ldr r3, [sp, #0x14] - mov r2, #0 - bl sub_02006DC8 - add r0, r7, #0 - add r1, sp, #0x20 - bl sub_020A7118 - ldr r0, [sp, #0x20] - add r1, r5, #0 - ldr r0, [r0, #0x14] - bl sub_020C2C54 - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x10] - ldr r0, [r0, #0x14] - add r1, r1, r4 - add r2, r5, #0 - bl sub_020C0314 - ldr r0, [sp, #0x18] - add r6, r6, #4 - add r1, r0, #1 - ldr r0, [sp, #8] - add r4, r4, r5 - str r1, [sp, #0x18] - cmp r1, r0 - blo _022553EA -_02255428: - ldr r0, [sp, #0x1c] - bl sub_02006CA8 -_0225542E: - add r0, r7, #0 - bl sub_020181C4 -_02255434: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255438: .word 0x02256074 -_0225543C: .word 0x02256070 - thumb_func_end ov25_022553A0 - - thumb_func_start ov25_02255440 -ov25_02255440: ; 0x02255440 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r1, #0 - add r4, r2, #0 - mov r1, #2 - add r2, sp, #0xc - strh r1, [r2] - mov r3, #3 - strh r3, [r2, #2] - mov r3, #0xa - strh r3, [r2, #4] - mov r3, #0xb - strh r3, [r2, #6] - str r3, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - lsl r1, r4, #0x18 - lsr r1, r1, #0x18 - add r2, sp, #0xc - mov r3, #9 - add r6, r0, #0 - bl sub_020198C0 - mov r1, #4 - add r0, sp, #0xc - strh r1, [r0] - mov r1, #5 - strh r1, [r0, #2] - mov r1, #0xc - strh r1, [r0, #4] - mov r1, #0xd - strh r1, [r0, #6] - mov r3, #0xb - lsl r1, r4, #0x18 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r6, #0 - lsr r1, r1, #0x18 - add r2, sp, #0xc - bl sub_020198C0 - mov r1, #6 - add r0, sp, #0xc - strh r1, [r0] - mov r1, #7 - strh r1, [r0, #2] - mov r1, #0xe - strh r1, [r0, #4] - mov r1, #0xf - strh r1, [r0, #6] - mov r0, #0xb - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - lsl r1, r4, #0x18 - str r0, [sp, #8] - add r0, r6, #0 - lsr r1, r1, #0x18 - add r2, sp, #0xc - mov r3, #0xd - bl sub_020198C0 - add r0, r5, #0 - mov r1, #0xa - bl sub_020E2178 - mov r1, #0xa - mul r1, r0 - add r0, r0, #4 - sub r5, r5, r1 - lsr r1, r0, #2 - lsl r0, r0, #0x1e - lsl r1, r1, #4 - lsr r0, r0, #0x1d - add r2, r1, r0 - add r0, sp, #0xc - strh r2, [r0] - add r1, r2, #1 - strh r1, [r0, #2] - add r1, r2, #0 - add r1, #8 - strh r1, [r0, #4] - add r2, #9 - strh r2, [r0, #6] - mov r0, #0xb - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - lsl r1, r4, #0x18 - str r0, [sp, #8] - add r0, r6, #0 - lsr r1, r1, #0x18 - add r2, sp, #0xc - mov r3, #0xf - bl sub_020198C0 - add r0, r5, #4 - lsr r1, r0, #2 - lsl r0, r0, #0x1e - lsl r1, r1, #4 - lsr r0, r0, #0x1d - add r2, r1, r0 - add r0, sp, #0xc - strh r2, [r0] - add r1, r2, #1 - strh r1, [r0, #2] - add r1, r2, #0 - add r1, #8 - strh r1, [r0, #4] - add r2, #9 - strh r2, [r0, #6] - mov r0, #0xb - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - lsl r1, r4, #0x18 - str r0, [sp, #8] - add r0, r6, #0 - lsr r1, r1, #0x18 - add r2, sp, #0xc - mov r3, #0x11 - bl sub_020198C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov25_02255440 - - thumb_func_start ov25_02255540 -ov25_02255540: ; 0x02255540 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #0x1c - mov r6, #0 - bl sub_02018144 - add r4, r0, #0 - beq _022555AA - add r0, r6, #0 - str r0, [r4, #0x14] - str r0, [r4, #0xc] - str r0, [r4, #4] - str r7, [r4, #0] - str r5, [r4, #0x18] - add r0, r7, #0 - bl sub_020A813C - strh r0, [r4, #0x10] - ldrh r1, [r4, #0x10] - add r0, r5, #0 - lsl r1, r1, #3 - bl sub_02018144 - str r0, [r4, #0x14] - cmp r0, #0 - beq _022555AA - ldrh r2, [r4, #0x10] - mov r1, #0x94 - add r0, r5, #0 - mul r1, r2 - bl sub_02018144 - str r0, [r4, #0xc] - cmp r0, #0 - beq _022555AA - ldrh r1, [r4, #0x10] - add r0, r5, #0 - lsl r1, r1, #2 - bl sub_02018144 - str r0, [r4, #4] - cmp r0, #0 - beq _022555AA - ldrh r2, [r4, #0x10] - ldr r1, [r4, #0xc] - bl ov25_022559D8 - add r0, r6, #0 - strh r0, [r4, #0x12] - str r0, [r4, #8] - mov r6, #1 -_022555AA: - cmp r6, #0 - bne _022555E2 - cmp r4, #0 - beq _022555DE - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _022555BE - add r0, r5, #0 - bl sub_02018238 -_022555BE: - ldr r1, [r4, #0xc] - cmp r1, #0 - beq _022555CA - add r0, r5, #0 - bl sub_02018238 -_022555CA: - ldr r1, [r4, #4] - cmp r1, #0 - beq _022555D6 - add r0, r5, #0 - bl sub_02018238 -_022555D6: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02018238 -_022555DE: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022555E2: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov25_02255540 - - thumb_func_start ov25_022555E8 -ov25_022555E8: ; 0x022555E8 - push {r4, lr} - add r4, r0, #0 - beq _02255612 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _022555F8 - bl sub_020181C4 -_022555F8: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02255602 - bl sub_020181C4 -_02255602: - ldr r0, [r4, #4] - cmp r0, #0 - beq _0225560C - bl sub_020181C4 -_0225560C: - add r0, r4, #0 - bl sub_020181C4 -_02255612: - pop {r4, pc} - thumb_func_end ov25_022555E8 - - thumb_func_start ov25_02255614 -ov25_02255614: ; 0x02255614 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #0xc] - ldrh r0, [r0, #0x12] - cmp r0, #0 - bne _02255622 - b _022557EE -_02255622: - ldr r0, [sp, #0xc] - ldr r4, [r0, #8] - ldr r5, [r0, #0x14] - ldrh r0, [r0, #0x10] - cmp r4, #0 - str r0, [sp, #0x10] - bne _02255632 - b _022557D4 -_02255632: - add r0, r4, #0 - mov r1, #2 - add r0, #8 - lsl r1, r1, #0xc - bl sub_020A8D60 - add r0, r4, #0 - add r0, #0x8a - ldrb r0, [r0] - cmp r0, #0 - beq _0225564A - b _022557CC -_0225564A: - add r6, r4, #0 - add r6, #0x44 - mov r0, #0xc - ldrsh r0, [r6, r0] - ldr r1, [r4, #0x68] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x18] - mov r0, #0xe - ldrsh r0, [r6, r0] - ldr r1, [r4, #0x6c] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x1c] - add r0, r4, #0 - add r0, #0x8b - ldrb r0, [r0] - cmp r0, #0 - bne _0225568A - add r0, sp, #0x18 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - ldr r1, [sp, #0x10] - str r3, [sp, #8] - lsl r1, r1, #0x10 - ldr r2, [r4, #0x38] - add r0, r5, #0 - lsr r1, r1, #0x10 - bl sub_020A8DA0 - b _02255722 -_0225568A: - ldr r0, [r4, #0x70] - bl sub_020BB44C - ldrh r1, [r6, #0x12] - mov r0, #4 - tst r0, r1 - beq _022556BC - add r0, r4, #0 - add r0, #0x90 - ldrh r2, [r6, #0x10] - ldrh r0, [r0] - ldr r1, _022557F4 ; =0x020F983C - add r0, r2, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r3, r0, #2 - add r2, r1, r3 - ldrsh r1, [r1, r3] - mov r3, #2 - ldrsh r2, [r2, r3] - ldr r0, [r4, #0x70] - bl sub_020BB464 - b _022556DA -_022556BC: - add r0, r4, #0 - add r0, #0x90 - ldrh r0, [r0] - cmp r0, #0 - beq _022556DA - asr r0, r0, #4 - lsl r3, r0, #2 - ldr r1, _022557F4 ; =0x020F983C - ldr r0, [r4, #0x70] - add r2, r1, r3 - ldrsh r1, [r1, r3] - mov r3, #2 - ldrsh r2, [r2, r3] - bl sub_020BB464 -_022556DA: - ldrh r1, [r6, #0x12] - mov r0, #2 - tst r0, r1 - beq _022556FE - ldr r0, [r6, #4] - ldr r7, [r4, #0x70] - bl sub_020BCFE0 - str r0, [sp, #0x14] - ldr r0, [r6, #8] - bl sub_020BCFE0 - add r3, r0, #0 - ldr r2, [sp, #0x14] - add r0, r7, #0 - add r1, r7, #0 - bl sub_020BB470 -_022556FE: - ldr r0, [sp, #0xc] - ldr r1, [r4, #0x70] - ldr r0, [r0, #0] - bl sub_020A7D34 - add r1, sp, #0x18 - str r1, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r1, [sp, #0x10] - ldr r2, [r4, #0x38] - lsl r1, r1, #0x10 - ldr r3, [r4, #0x70] - add r0, r5, #0 - lsr r1, r1, #0x10 - bl sub_020A8DA0 -_02255722: - ldr r1, [sp, #0x10] - sub r1, r1, r0 - str r1, [sp, #0x10] - add r1, r0, #0 - sub r0, r0, #1 - cmp r1, #0 - beq _022557CC - ldr r7, _022557F8 ; =0xDFFFFFFF - asr r1, r7, #0x11 -_02255734: - ldr r3, [r5, #4] - ldr r2, _022557FC ; =0xFFFFF3FF - add r6, r4, #0 - and r2, r3 - add r3, r4, #0 - add r3, #0x86 - ldrh r3, [r3] - add r6, #0x88 - lsl r3, r3, #0x1e - lsr r3, r3, #0x14 - orr r2, r3 - str r2, [r5, #4] - ldr r3, _02255800 ; =0xFFFF0FFF - ldrh r6, [r6] - and r3, r2 - lsl r2, r2, #0x10 - lsr r2, r2, #0x1c - add r2, r2, r6 - lsl r2, r2, #0x1c - lsr r2, r2, #0x10 - orr r2, r3 - add r6, r4, #0 - ldr r3, _02255804 ; =0xFFFFFC00 - str r2, [r5, #4] - add r6, #0x8c - and r3, r2 - lsl r2, r2, #0x16 - ldrh r6, [r6] - lsr r2, r2, #0x16 - add r6, r2, r6 - ldr r2, _02255808 ; =0x000003FF - and r2, r6 - orr r2, r3 - add r6, r4, #0 - str r2, [r5, #4] - add r6, #0x8e - ldr r2, [r5, #0] - ldr r3, _0225580C ; =0xEFFFFFFF - ldrb r6, [r6] - and r3, r2 - lsl r2, r2, #3 - lsr r2, r2, #0x1f - eor r2, r6 - lsl r2, r2, #0x1f - lsr r2, r2, #3 - orr r2, r3 - add r6, r4, #0 - add r3, r2, #0 - str r2, [r5, #0] - add r6, #0x8f - lsl r2, r2, #2 - ldrb r6, [r6] - lsr r2, r2, #0x1f - and r3, r7 - eor r2, r6 - lsl r2, r2, #0x1f - lsr r2, r2, #2 - orr r2, r3 - add r6, r4, #0 - add r3, r2, #0 - str r2, [r5, #0] - add r6, #0x92 - lsl r2, r2, #0x13 - ldrb r6, [r6] - lsr r2, r2, #0x1f - and r3, r1 - eor r2, r6 - lsl r2, r2, #0x1f - lsr r2, r2, #0x13 - orr r2, r3 - str r2, [r5, #0] - add r2, r0, #0 - add r5, #8 - sub r0, r0, #1 - cmp r2, #0 - bne _02255734 -_022557CC: - ldr r4, [r4, #0x60] - cmp r4, #0 - beq _022557D4 - b _02255632 -_022557D4: - ldr r0, [sp, #0xc] - ldr r1, [r0, #0x14] - cmp r5, r1 - bls _022557EE - sub r3, r5, r1 - asr r2, r3, #2 - lsr r2, r2, #0x1d - add r2, r3, r2 - lsl r2, r2, #0xd - ldr r0, [r0, #0] - lsr r2, r2, #0x10 - bl sub_020A7B80 -_022557EE: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_022557F4: .word 0x020F983C -_022557F8: .word 0xDFFFFFFF -_022557FC: .word 0xFFFFF3FF -_02255800: .word 0xFFFF0FFF -_02255804: .word 0xFFFFFC00 -_02255808: .word 0x000003FF -_0225580C: .word 0xEFFFFFFF - thumb_func_end ov25_02255614 - - thumb_func_start ov25_02255810 -ov25_02255810: ; 0x02255810 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov25_02255A04 - add r4, r0, #0 - beq _022558AC - ldrb r1, [r5, #0xb] - add r0, #0x86 - strh r1, [r0] - add r0, r4, #0 - ldrb r1, [r5, #0xc] - add r0, #0x84 - strh r1, [r0] - add r0, r7, #0 - add r1, r4, #0 - bl ov25_02255A40 - ldr r0, [r6, #8] - str r0, [r4, #0] - ldr r0, [r6, #0xc] - str r0, [r4, #4] - ldrh r1, [r5, #8] - bl sub_020A6EF0 - add r1, r0, #0 - add r0, r4, #0 - ldr r2, [r4, #0] - add r0, #8 - bl sub_020A8C88 - ldr r1, [r5, #0] - ldr r0, [r5, #4] - str r1, [r4, #0x68] - add r1, r4, #0 - str r0, [r4, #0x6c] - mov r0, #0 - add r1, #0x88 - strh r0, [r1] - add r1, r4, #0 - add r1, #0x8c - strh r0, [r1] - ldrb r2, [r5, #0xa] - mov r1, #1 - tst r2, r1 - beq _02255870 - add r0, r1, #0 -_02255870: - add r1, r4, #0 - add r1, #0x8e - strb r0, [r1] - ldrb r1, [r5, #0xa] - mov r0, #2 - tst r0, r1 - beq _02255882 - mov r1, #1 - b _02255884 -_02255882: - mov r1, #0 -_02255884: - add r0, r4, #0 - add r0, #0x8f - strb r1, [r0] - add r1, r4, #0 - mov r0, #0 - add r1, #0x92 - strb r0, [r1] - add r1, r4, #0 - add r1, #0x90 - strh r0, [r1] - add r1, r4, #0 - add r1, #0x74 - str r1, [r4, #0x70] - add r1, r4, #0 - ldrb r2, [r5, #0xd] - add r1, #0x8b - strb r2, [r1] - add r1, r4, #0 - add r1, #0x8a - strb r0, [r1] -_022558AC: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov25_02255810 - - thumb_func_start ov25_022558B0 -ov25_022558B0: ; 0x022558B0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02255A98 - add r0, r5, #0 - add r1, r4, #0 - bl ov25_02255A1C - pop {r3, r4, r5, pc} - thumb_func_end ov25_022558B0 - - thumb_func_start ov25_022558C4 -ov25_022558C4: ; 0x022558C4 - push {r4, lr} - add r4, r0, #0 - lsl r1, r1, #0x10 - ldr r0, [r4, #4] - lsr r1, r1, #0x10 - bl sub_020A6EF0 - add r1, r0, #0 - add r0, r4, #0 - ldr r2, [r4, #0] - add r0, #8 - bl sub_020A8C88 - pop {r4, pc} - thumb_func_end ov25_022558C4 - - thumb_func_start ov25_022558E0 -ov25_022558E0: ; 0x022558E0 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _022558EA - mov r0, #1 - bx lr -_022558EA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov25_022558E0 - - thumb_func_start ov25_022558F0 -ov25_022558F0: ; 0x022558F0 - ldr r3, [r0, #0x68] - add r1, r3, r1 - str r1, [r0, #0x68] - ldr r1, [r0, #0x6c] - add r1, r1, r2 - str r1, [r0, #0x6c] - bx lr - ; .align 2, 0 - thumb_func_end ov25_022558F0 - - thumb_func_start ov25_02255900 -ov25_02255900: ; 0x02255900 - str r1, [r0, #0x68] - str r2, [r0, #0x6c] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255900 - - thumb_func_start ov25_02255908 -ov25_02255908: ; 0x02255908 - ldr r3, [r0, #0x68] - str r3, [r1, #0] - ldr r0, [r0, #0x6c] - str r0, [r2, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255908 - - thumb_func_start ov25_02255914 -ov25_02255914: ; 0x02255914 - add r0, #0x8a - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255914 - - thumb_func_start ov25_0225591C -ov25_0225591C: ; 0x0225591C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - bl ov25_02255A98 - add r0, r5, #0 - add r0, #0x84 - strh r4, [r0] - add r0, r6, #0 - add r1, r5, #0 - bl ov25_02255A40 - pop {r4, r5, r6, pc} - thumb_func_end ov25_0225591C - - thumb_func_start ov25_02255938 -ov25_02255938: ; 0x02255938 - add r0, #0x88 - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255938 - - thumb_func_start ov25_02255940 -ov25_02255940: ; 0x02255940 - add r0, #0x8c - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255940 - - thumb_func_start ov25_02255948 -ov25_02255948: ; 0x02255948 - add r0, #0x92 - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255948 - - thumb_func_start ov25_02255950 -ov25_02255950: ; 0x02255950 - add r0, #0x90 - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255950 - - thumb_func_start ov25_02255958 -ov25_02255958: ; 0x02255958 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r5, r0, #0 - add r6, r1, #0 - add r1, r2, #0 - add r7, r3, #0 - str r4, [r5, #0x10] - add r0, r6, #0 - add r2, r4, #0 - bl sub_02006FD8 - str r0, [r5, #0] - add r0, r6, #0 - add r1, r7, #0 - add r2, r4, #0 - bl sub_02006FD8 - str r0, [r5, #4] - ldr r0, [r5, #0] - cmp r0, #0 - beq _022559AA - ldr r1, [r5, #4] - cmp r1, #0 - beq _022559AA - add r1, r5, #0 - add r1, #8 - bl sub_020A6F38 - cmp r0, #0 - bne _02255998 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02255998: - ldr r0, [r5, #4] - add r5, #0xc - add r1, r5, #0 - bl sub_020A6D94 - cmp r0, #0 - bne _022559AA - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022559AA: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov25_02255958 - - thumb_func_start ov25_022559B0 -ov25_022559B0: ; 0x022559B0 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _022559C4 - ldr r0, [r4, #0x10] - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0] -_022559C4: - ldr r1, [r4, #4] - cmp r1, #0 - beq _022559D4 - ldr r0, [r4, #0x10] - bl sub_02018238 - mov r0, #0 - str r0, [r4, #4] -_022559D4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov25_022559B0 - - thumb_func_start ov25_022559D8 -ov25_022559D8: ; 0x022559D8 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r1, #0 - sub r6, r6, #1 - cmp r0, #0 - beq _022559FA -_022559E8: - add r0, r4, #0 - stmia r5!, {r4} - bl ov25_022559FC - add r0, r6, #0 - add r4, #0x94 - sub r6, r6, #1 - cmp r0, #0 - bne _022559E8 -_022559FA: - pop {r4, r5, r6, pc} - thumb_func_end ov25_022559D8 - - thumb_func_start ov25_022559FC -ov25_022559FC: ; 0x022559FC - mov r1, #0 - str r1, [r0, #0x60] - str r1, [r0, #0x64] - bx lr - thumb_func_end ov25_022559FC - - thumb_func_start ov25_02255A04 -ov25_02255A04: ; 0x02255A04 - ldrh r2, [r0, #0x12] - ldrh r1, [r0, #0x10] - cmp r2, r1 - bhs _02255A18 - add r1, r2, #1 - strh r1, [r0, #0x12] - ldr r1, [r0, #4] - lsl r0, r2, #2 - ldr r0, [r1, r0] - bx lr -_02255A18: - mov r0, #0 - bx lr - thumb_func_end ov25_02255A04 - - thumb_func_start ov25_02255A1C -ov25_02255A1C: ; 0x02255A1C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrh r0, [r5, #0x12] - add r4, r1, #0 - cmp r0, #0 - beq _02255A3C - add r0, r4, #0 - bl ov25_022559FC - ldrh r0, [r5, #0x12] - sub r0, r0, #1 - strh r0, [r5, #0x12] - ldrh r0, [r5, #0x12] - ldr r1, [r5, #4] - lsl r0, r0, #2 - str r4, [r1, r0] -_02255A3C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov25_02255A1C - - thumb_func_start ov25_02255A40 -ov25_02255A40: ; 0x02255A40 - push {r4, r5} - ldr r3, [r0, #8] - cmp r3, #0 - bne _02255A54 - str r1, [r0, #8] - mov r0, #0 - str r0, [r1, #0x60] - str r0, [r1, #0x64] - pop {r4, r5} - bx lr -_02255A54: - add r4, r1, #0 - add r4, #0x84 - ldr r5, [r4, #0] - add r2, r3, #0 -_02255A5C: - add r4, r2, #0 - add r4, #0x84 - ldr r4, [r4, #0] - cmp r5, r4 - bhs _02255A7E - cmp r2, r3 - bne _02255A6C - str r1, [r0, #8] -_02255A6C: - ldr r0, [r2, #0x64] - str r0, [r1, #0x64] - cmp r0, #0 - beq _02255A76 - str r1, [r0, #0x60] -_02255A76: - str r2, [r1, #0x60] - str r1, [r2, #0x64] - pop {r4, r5} - bx lr -_02255A7E: - ldr r4, [r2, #0x60] - cmp r4, #0 - bne _02255A90 - str r1, [r2, #0x60] - str r2, [r1, #0x64] - mov r0, #0 - str r0, [r1, #0x60] - pop {r4, r5} - bx lr -_02255A90: - add r2, r4, #0 - b _02255A5C - thumb_func_end ov25_02255A40 -_02255A94: - .byte 0x30, 0xBC, 0x70, 0x47 - - thumb_func_start ov25_02255A98 -ov25_02255A98: ; 0x02255A98 - ldr r2, [r1, #0x64] - cmp r2, #0 - beq _02255AB4 - ldr r0, [r1, #0x60] - cmp r0, #0 - beq _02255AAE - str r0, [r2, #0x60] - ldr r2, [r1, #0x64] - ldr r0, [r1, #0x60] - str r2, [r0, #0x64] - bx lr -_02255AAE: - mov r0, #0 - str r0, [r2, #0x60] - bx lr -_02255AB4: - ldr r3, [r1, #0x60] - cmp r3, #0 - beq _02255AC4 - mov r2, #0 - str r2, [r3, #0x64] - ldr r1, [r1, #0x60] - str r1, [r0, #8] - bx lr -_02255AC4: - mov r1, #0 - str r1, [r0, #8] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255A98 - - thumb_func_start ov25_02255ACC -ov25_02255ACC: ; 0x02255ACC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r7, r1, #0 - str r2, [sp] - str r3, [sp, #4] - ldr r5, [sp, #0x20] - bne _02255AE0 - bl sub_02022974 -_02255AE0: - add r0, r5, #0 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - beq _02255B2E - ldr r0, [sp] - str r5, [r4, #8] - str r0, [r4, #4] - str r6, [r4, #0] - mov r1, #0xe - ldr r0, [sp, #4] - str r7, [r4, #0xc] - str r0, [r4, #0x10] - add r0, r5, #0 - mul r1, r7 - bl sub_02018144 - str r0, [r4, #0x14] - cmp r0, #0 - beq _02255B24 - mov r6, #0 - cmp r7, #0 - bls _02255B2E - add r5, r6, #0 -_02255B12: - ldr r0, [r4, #0x14] - add r0, r0, r5 - bl ov25_02255C80 - add r6, r6, #1 - add r5, #0xe - cmp r6, r7 - blo _02255B12 - b _02255B2E -_02255B24: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02018238 - mov r4, #0 -_02255B2E: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov25_02255ACC - - thumb_func_start ov25_02255B34 -ov25_02255B34: ; 0x02255B34 - push {r4, lr} - add r4, r0, #0 - bne _02255B3E - bl sub_02022974 -_02255B3E: - ldr r0, [r4, #8] - ldr r1, [r4, #0x14] - bl sub_02018238 - ldr r0, [r4, #8] - add r1, r4, #0 - bl sub_02018238 - pop {r4, pc} - thumb_func_end ov25_02255B34 - - thumb_func_start ov25_02255B50 -ov25_02255B50: ; 0x02255B50 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - bl sub_0202278C - str r0, [sp, #4] - cmp r0, #0 - beq _02255BA8 - bl sub_02022798 - ldr r1, [r5, #0xc] - mov r7, #0 - str r0, [sp] - cmp r1, #0 - bls _02255BCE - add r4, r7, #0 - add r6, r7, #0 -_02255B72: - ldr r0, [r5, #0x14] - add r1, r0, r4 - ldrb r0, [r1, #1] - strb r0, [r1, #2] - ldr r0, [r5, #0x14] - add r0, r0, r4 - ldrb r0, [r0, #1] - cmp r0, #0 - ldr r0, [r5, #0] - beq _02255B8E - add r0, r0, r6 - bl sub_02022734 - b _02255B94 -_02255B8E: - add r0, r0, r6 - bl sub_02022760 -_02255B94: - ldr r1, [r5, #0x14] - add r7, r7, #1 - add r1, r1, r4 - strb r0, [r1, #1] - ldr r1, [r5, #0xc] - add r4, #0xe - add r6, r6, #4 - cmp r7, r1 - blo _02255B72 - b _02255BCE -_02255BA8: - ldr r1, [r5, #0xc] - mov r2, #0 - str r2, [sp] - cmp r1, #0 - bls _02255BCE - add r0, r2, #0 - add r3, r2, #0 -_02255BB6: - ldr r1, [r5, #0x14] - add r2, r2, #1 - add r4, r1, r0 - ldrb r1, [r4, #1] - strb r1, [r4, #2] - ldr r1, [r5, #0x14] - add r1, r1, r0 - strb r3, [r1, #1] - ldr r1, [r5, #0xc] - add r0, #0xe - cmp r2, r1 - blo _02255BB6 -_02255BCE: - mov r6, #0 - cmp r1, #0 - bls _02255C14 - ldr r7, _02255C44 ; =0x0225607C - add r4, r6, #0 -_02255BD8: - ldr r3, [r5, #0x14] - ldr r1, [sp, #4] - add r0, r3, r4 - ldrb r3, [r3, r4] - ldr r2, [sp] - lsl r3, r3, #2 - ldr r3, [r7, r3] - blx r3 - add r1, r0, #0 - ldr r0, [r5, #0x14] - add r0, r0, r4 - ldrb r2, [r0, #1] - ldrb r0, [r0, #2] - cmp r2, r0 - bne _02255BF8 - mov r2, #2 -_02255BF8: - cmp r1, #0 - bne _02255C00 - cmp r2, #2 - beq _02255C0A -_02255C00: - ldr r3, [r5, #0x10] - ldr r4, [r5, #4] - add r0, r6, #0 - blx r4 - b _02255C14 -_02255C0A: - ldr r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0xe - cmp r6, r0 - blo _02255BD8 -_02255C14: - ldr r0, [r5, #0xc] - add r6, r6, #1 - cmp r6, r0 - bhs _02255C3E - mov r0, #0xe - add r4, r6, #0 - ldr r7, _02255C44 ; =0x0225607C - mul r4, r0 -_02255C24: - ldr r3, [r5, #0x14] - ldr r1, [sp, #4] - add r0, r3, r4 - ldrb r3, [r3, r4] - ldr r2, [sp] - lsl r3, r3, #2 - ldr r3, [r7, r3] - blx r3 - ldr r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0xe - cmp r6, r0 - blo _02255C24 -_02255C3E: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02255C44: .word 0x0225607C - thumb_func_end ov25_02255B50 - - thumb_func_start ov25_02255C48 -ov25_02255C48: ; 0x02255C48 - push {r3, r4} - ldr r4, [r0, #0x14] - mov r0, #0xe - mul r0, r1 - add r1, r4, r0 - lsl r0, r2, #1 - add r0, r1, r0 - strh r3, [r0, #8] - pop {r3, r4} - bx lr - thumb_func_end ov25_02255C48 - - thumb_func_start ov25_02255C5C -ov25_02255C5C: ; 0x02255C5C - ldr r3, [r0, #0x14] - mov r0, #0xe - mul r0, r1 - add r0, r3, r0 - strh r2, [r0, #0xc] - bx lr - thumb_func_end ov25_02255C5C - - thumb_func_start ov25_02255C68 -ov25_02255C68: ; 0x02255C68 - add r3, r1, #0 - mov r2, #0xe - mul r3, r2 - ldr r1, [r0, #0x14] - mov r2, #0 - add r1, r1, r3 - strh r2, [r1, #4] - ldr r0, [r0, #0x14] - mov r1, #4 - strb r1, [r0, r3] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255C68 - - thumb_func_start ov25_02255C80 -ov25_02255C80: ; 0x02255C80 - mov r2, #0 - strb r2, [r0] - strb r2, [r0, #1] - strb r2, [r0, #2] - strh r2, [r0, #4] - strh r2, [r0, #6] - add r3, r0, #0 - add r1, r2, #0 -_02255C90: - add r2, r2, #1 - strh r1, [r3, #8] - add r3, r3, #2 - cmp r2, #2 - blo _02255C90 - strh r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255C80 - - thumb_func_start ov25_02255CA0 -ov25_02255CA0: ; 0x02255CA0 - strb r1, [r0] - mov r1, #0 - strh r1, [r0, #4] - bx lr - thumb_func_end ov25_02255CA0 - - thumb_func_start ov25_02255CA8 -ov25_02255CA8: ; 0x02255CA8 - strb r1, [r0] - bx lr - thumb_func_end ov25_02255CA8 - - thumb_func_start ov25_02255CAC -ov25_02255CAC: ; 0x02255CAC - ldrh r2, [r0, #4] - ldr r1, _02255CBC ; =0x0000FFFF - cmp r2, r1 - bhs _02255CB8 - add r1, r2, #1 - strh r1, [r0, #4] -_02255CB8: - bx lr - nop -_02255CBC: .word 0x0000FFFF - thumb_func_end ov25_02255CAC - - thumb_func_start ov25_02255CC0 -ov25_02255CC0: ; 0x02255CC0 - ldrh r3, [r0, #4] - mov r2, #0 -_02255CC4: - ldrh r1, [r0, #8] - cmp r3, r1 - bne _02255CCE - add r0, r2, #5 - bx lr -_02255CCE: - add r2, r2, #1 - add r0, r0, #2 - cmp r2, #2 - blo _02255CC4 - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov25_02255CC0 - - thumb_func_start ov25_02255CDC -ov25_02255CDC: ; 0x02255CDC - push {r3, lr} - ldrb r1, [r0, #1] - cmp r1, #0 - beq _02255CF2 - cmp r2, #0 - beq _02255CF2 - mov r1, #1 - bl ov25_02255CA0 - mov r0, #1 - pop {r3, pc} -_02255CF2: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov25_02255CDC - - thumb_func_start ov25_02255CF8 -ov25_02255CF8: ; 0x02255CF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov25_02255CAC - ldrb r0, [r5, #1] - cmp r0, #0 - beq _02255D26 - add r0, r5, #0 - bl ov25_02255CC0 - cmp r0, #0 - bne _02255D54 - ldrh r1, [r5, #0xc] - cmp r1, #0 - beq _02255D52 - ldrh r0, [r5, #4] - cmp r0, r1 - blo _02255D52 - mov r0, #0 - strh r0, [r5, #4] - mov r0, #7 - pop {r3, r4, r5, pc} -_02255D26: - cmp r4, #0 - beq _02255D36 - add r0, r5, #0 - mov r1, #0 - bl ov25_02255CA0 - mov r0, #2 - pop {r3, r4, r5, pc} -_02255D36: - ldrh r0, [r5, #6] - cmp r0, #0 - beq _02255D46 - add r0, r5, #0 - mov r1, #2 - bl ov25_02255CA8 - b _02255D52 -_02255D46: - add r0, r5, #0 - mov r1, #0 - bl ov25_02255CA0 - mov r0, #3 - pop {r3, r4, r5, pc} -_02255D52: - mov r0, #0 -_02255D54: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov25_02255CF8 - - thumb_func_start ov25_02255D58 -ov25_02255D58: ; 0x02255D58 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - bl ov25_02255CAC - ldrh r1, [r5, #4] - ldrh r0, [r5, #6] - cmp r1, r0 - bls _02255D76 - add r0, r5, #0 - mov r1, #0 - bl ov25_02255CA0 - mov r0, #3 - pop {r3, r4, r5, pc} -_02255D76: - ldrb r0, [r5, #1] - cmp r0, #0 - beq _02255D8C - cmp r4, #0 - beq _02255D8C - add r0, r5, #0 - mov r1, #3 - bl ov25_02255CA0 - mov r0, #4 - pop {r3, r4, r5, pc} -_02255D8C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov25_02255D58 - - thumb_func_start ov25_02255D90 -ov25_02255D90: ; 0x02255D90 - push {r3, lr} - ldrb r1, [r0, #1] - cmp r1, #0 - beq _02255D9E - bl ov25_02255CAC - b _02255DA4 -_02255D9E: - mov r1, #0 - bl ov25_02255CA0 -_02255DA4: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov25_02255D90 - - thumb_func_start ov25_02255DA8 -ov25_02255DA8: ; 0x02255DA8 - push {r3, lr} - ldrb r1, [r0, #1] - cmp r1, #0 - bne _02255DB6 - mov r1, #0 - bl ov25_02255CA0 -_02255DB6: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov25_02255DA8 - - thumb_func_start ov25_02255DBC -ov25_02255DBC: ; 0x02255DBC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0x1e - blo _02255DCE - bl sub_02022974 -_02255DCE: - cmp r4, #0x21 - blo _02255DD6 - bl sub_02022974 -_02255DD6: - cmp r5, #0x1e - blo _02255DDC - mov r5, #0 -_02255DDC: - cmp r4, #0x21 - blo _02255DE2 - mov r4, #0 -_02255DE2: - ldr r0, _02255DF4 ; =0x022560B0 - lsl r1, r5, #1 - ldrh r0, [r0, r1] - lsl r1, r4, #1 - str r0, [r6, #0] - ldr r0, _02255DF8 ; =0x022560EC - ldrh r0, [r0, r1] - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02255DF4: .word 0x022560B0 -_02255DF8: .word 0x022560EC - thumb_func_end ov25_02255DBC - - thumb_func_start ov25_02255DFC -ov25_02255DFC: ; 0x02255DFC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #4 - blo _02255E0C - bl sub_02022974 -_02255E0C: - ldr r0, _02255E1C ; =0x02256090 - lsl r1, r5, #3 - ldr r0, [r0, r1] - str r0, [r4, #0] - ldr r0, _02255E20 ; =0x02256094 - ldr r0, [r0, r1] - str r0, [r6, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02255E1C: .word 0x02256090 -_02255E20: .word 0x02256094 - thumb_func_end ov25_02255DFC - - thumb_func_start ov25_02255E24 -ov25_02255E24: ; 0x02255E24 - push {r4, r5} - ldr r5, _02255E54 ; =0x0225612E - mov r4, #0 -_02255E2A: - ldrh r3, [r5] - cmp r0, r3 - bne _02255E44 - ldr r0, _02255E58 ; =0x02256130 - lsl r3, r4, #2 - ldrb r0, [r0, r3] - str r0, [r1, #0] - ldr r0, _02255E5C ; =0x02256131 - ldrb r0, [r0, r3] - str r0, [r2, #0] - mov r0, #1 - pop {r4, r5} - bx lr -_02255E44: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x1d - blo _02255E2A - mov r0, #0 - pop {r4, r5} - bx lr - nop -_02255E54: .word 0x0225612E -_02255E58: .word 0x02256130 -_02255E5C: .word 0x02256131 - thumb_func_end ov25_02255E24 - ; 0x02255E60 - - - .rodata - .incbin "incbin/overlay25_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay28.s b/asm/overlay28.s deleted file mode 100644 index 915a10b02..000000000 --- a/asm/overlay28.s +++ /dev/null @@ -1,2802 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov28_022561C0 -ov28_022561C0: ; 0x022561C0 - ldr r3, _022561C8 ; =ov25_02254238 - ldr r0, _022561CC ; =ov28_022561D4 - ldr r1, _022561D0 ; =ov28_02256324 - bx r3 - ; .align 2, 0 -_022561C8: .word ov25_02254238 -_022561CC: .word ov28_022561D4 -_022561D0: .word ov28_02256324 - thumb_func_end ov28_022561C0 - - thumb_func_start ov28_022561D4 -ov28_022561D4: ; 0x022561D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #8 - mov r1, #0x28 - add r7, r2, #0 - str r3, [sp] - bl sub_02018144 - add r4, r0, #0 - beq _02256208 - ldr r1, [sp] - add r2, r7, #0 - bl ov28_02256210 - cmp r0, #0 - beq _02256208 - ldr r0, _0225620C ; =ov28_022562CC - str r6, [r4, #0x10] - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02256208: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225620C: .word ov28_022562CC - thumb_func_end ov28_022561D4 - - thumb_func_start ov28_02256210 -ov28_02256210: ; 0x02256210 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - add r1, r4, #0 - add r0, #0x14 - add r1, #0x18 - bl ov28_0225697C - cmp r0, #0 - beq _0225628A - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #3] - strb r0, [r4, #2] - strb r0, [r4, #4] - mov r0, #0x11 - strh r0, [r4, #6] - sub r0, #0x12 - str r0, [r4, #8] - add r0, r4, #0 - add r0, #0x1c - mov r1, #0xa - bl ov28_02256E9C - add r0, r4, #0 - add r0, #0x20 - mov r1, #0xa - bl ov28_02256E9C - add r0, r4, #0 - add r0, #0x24 - mov r1, #0xa - bl ov28_02256E9C - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _02256268 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _02256268 - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _0225626E -_02256268: - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_0225626E: - mov r0, #8 - str r0, [sp] - ldr r0, _02256290 ; =0x02257658 - ldr r2, _02256294 ; =ov28_02256344 - mov r1, #0x11 - add r3, r4, #0 - bl ov25_02255ACC - str r0, [r4, #0xc] - cmp r0, #0 - bne _0225628A - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_0225628A: - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02256290: .word 0x02257658 -_02256294: .word ov28_02256344 - thumb_func_end ov28_02256210 - - thumb_func_start ov28_02256298 -ov28_02256298: ; 0x02256298 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _022562A6 - bl ov28_02256EC0 -_022562A6: - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _022562B0 - bl ov28_02256EC0 -_022562B0: - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _022562BA - bl ov28_02256EC0 -_022562BA: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _022562C4 - bl ov25_02255B34 -_022562C4: - ldr r0, [r4, #0x14] - bl ov28_022569AC - pop {r4, pc} - thumb_func_end ov28_02256298 - - thumb_func_start ov28_022562CC -ov28_022562CC: ; 0x022562CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #3] - cmp r0, #0 - beq _022562E4 - add r0, r4, #0 - mov r1, #6 - bl ov28_0225632C - mov r0, #0 - strb r0, [r4, #3] -_022562E4: - ldrb r0, [r4] - cmp r0, #7 - bhs _0225631E - mov r0, #0x11 - strh r0, [r4, #6] - ldr r0, [r4, #0x10] - ldr r1, [r4, #0xc] - bl ov25_02254518 - ldrb r1, [r4] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02256320 ; =0x0225763C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - beq _0225631E - add r0, r4, #0 - bl ov28_02256298 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - ldr r0, [r4, #0x10] - bl ov25_02254260 -_0225631E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256320: .word 0x0225763C - thumb_func_end ov28_022562CC - - thumb_func_start ov28_02256324 -ov28_02256324: ; 0x02256324 - mov r1, #1 - strb r1, [r0, #3] - bx lr - ; .align 2, 0 - thumb_func_end ov28_02256324 - - thumb_func_start ov28_0225632C -ov28_0225632C: ; 0x0225632C - ldrb r2, [r0, #3] - cmp r2, #0 - bne _02256334 - b _02256336 -_02256334: - mov r1, #6 -_02256336: - strb r1, [r0] - ldrb r1, [r0] - strb r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #1] - bx lr - ; .align 2, 0 - thumb_func_end ov28_0225632C - - thumb_func_start ov28_02256344 -ov28_02256344: ; 0x02256344 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r3, #0 - cmp r2, #0 - beq _02256356 - cmp r2, #1 - beq _02256362 - b _0225636C -_02256356: - strh r5, [r4, #0x18] - ldr r0, [r4, #0x14] - mov r1, #2 - bl ov28_022569B8 - b _0225636C -_02256362: - strh r5, [r4, #0x18] - ldr r0, [r4, #0x14] - mov r1, #1 - bl ov28_022569B8 -_0225636C: - cmp r6, #3 - bne _02256372 - strh r5, [r4, #6] -_02256372: - pop {r4, r5, r6, pc} - thumb_func_end ov28_02256344 - - thumb_func_start ov28_02256374 -ov28_02256374: ; 0x02256374 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _02256384 - cmp r0, #1 - beq _02256394 - b _022563AE -_02256384: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022563AE -_02256394: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov28_022569DC - cmp r0, #0 - beq _022563AE - ldr r0, [r4, #0x10] - bl ov25_0225424C - add r0, r4, #0 - mov r1, #1 - bl ov28_0225632C -_022563AE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_02256374 - - thumb_func_start ov28_022563B4 -ov28_022563B4: ; 0x022563B4 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _022563C4 - cmp r1, #1 - beq _02256468 - b _02256488 -_022563C4: - mov r1, #0 - mvn r1, r1 - str r1, [r4, #8] - ldrh r1, [r4, #6] - add r2, r1, #0 - sub r2, #0xa - cmp r2, #7 - bhi _0225641E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022563E0: ; jump table - .short _022563FA - _022563E0 - 2 ; case 0 - .short _02256400 - _022563E0 - 2 ; case 1 - .short _02256400 - _022563E0 - 2 ; case 2 - .short _02256400 - _022563E0 - 2 ; case 3 - .short _02256400 - _022563E0 - 2 ; case 4 - .short _02256410 - _022563E0 - 2 ; case 5 - .short _022563F0 - _022563E0 - 2 ; case 6 - .short _02256440 - _022563E0 - 2 ; case 7 -_022563F0: - bl ov28_02256868 - mov r0, #4 - str r0, [r4, #8] - b _02256440 -_022563FA: - mov r0, #1 - strb r0, [r4, #4] - b _02256440 -_02256400: - strh r1, [r4, #0x1a] - mov r0, #0 - strb r0, [r4, #4] - mov r0, #8 - str r0, [r4, #8] - mov r0, #2 - strb r0, [r4, #2] - b _02256440 -_02256410: - ldr r1, [r4, #0x1c] - bl ov28_02256914 - ldr r0, [r4, #0x1c] - bl ov28_02256EC8 - b _02256440 -_0225641E: - ldrb r0, [r4, #4] - cmp r0, #0 - ldr r0, [r4, #0x1c] - beq _02256434 - bl ov28_022571B8 - cmp r0, #0 - beq _02256440 - mov r0, #3 - str r0, [r4, #8] - b _02256440 -_02256434: - bl ov28_0225717C - cmp r0, #0 - beq _02256440 - mov r0, #3 - str r0, [r4, #8] -_02256440: - mov r0, #0 - ldr r1, [r4, #8] - mvn r0, r0 - cmp r1, r0 - beq _02256458 - ldr r0, [r4, #0x14] - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256488 -_02256458: - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _02256488 - add r0, r4, #0 - bl ov28_0225632C - b _02256488 -_02256468: - ldr r0, [r4, #0x14] - ldr r1, [r4, #8] - bl ov28_022569DC - cmp r0, #0 - beq _02256488 - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _02256484 - add r0, r4, #0 - bl ov28_0225632C - b _02256488 -_02256484: - mov r0, #0 - strb r0, [r4, #1] -_02256488: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov28_022563B4 - - thumb_func_start ov28_0225648C -ov28_0225648C: ; 0x0225648C - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _0225649C - cmp r1, #1 - beq _02256564 - b _02256584 -_0225649C: - mov r1, #0 - mvn r1, r1 - str r1, [r4, #8] - ldrh r1, [r4, #6] - add r2, r1, #0 - sub r2, #0xa - cmp r2, #7 - bhi _02256522 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022564B8: ; jump table - .short _022564D6 - _022564B8 - 2 ; case 0 - .short _022564EA - _022564B8 - 2 ; case 1 - .short _022564EA - _022564B8 - 2 ; case 2 - .short _022564EA - _022564B8 - 2 ; case 3 - .short _022564EA - _022564B8 - 2 ; case 4 - .short _022564F2 - _022564B8 - 2 ; case 5 - .short _022564C8 - _022564B8 - 2 ; case 6 - .short _0225653C - _022564B8 - 2 ; case 7 -_022564C8: - bl ov28_02256868 - mov r0, #4 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #2] - b _0225653C -_022564D6: - ldr r0, [r4, #0x20] - bl ov28_02256EC8 - mov r0, #5 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #4] - mov r0, #3 - strb r0, [r4, #2] - b _0225653C -_022564EA: - strh r1, [r4, #0x1a] - mov r0, #8 - str r0, [r4, #8] - b _0225653C -_022564F2: - ldr r0, [r4, #0x20] - ldr r1, [r4, #0x1c] - bl ov28_02256ED8 - ldrh r1, [r4, #0x1a] - add r0, r4, #0 - bl ov28_02256888 - cmp r0, #0 - beq _02256518 - ldr r1, [r4, #0x24] - add r0, r4, #0 - bl ov28_02256914 - mov r0, #6 - str r0, [r4, #8] - mov r0, #4 - strb r0, [r4, #2] - b _0225653C -_02256518: - mov r0, #9 - str r0, [r4, #8] - mov r0, #5 - strb r0, [r4, #2] - b _0225653C -_02256522: - ldr r0, [r4, #0x20] - bl ov28_02256EC8 - ldrh r1, [r4, #6] - ldr r0, [r4, #0x20] - bl ov28_0225717C - cmp r0, #0 - beq _0225653C - mov r0, #5 - str r0, [r4, #8] - mov r0, #3 - strb r0, [r4, #2] -_0225653C: - mov r0, #0 - ldr r1, [r4, #8] - mvn r0, r0 - cmp r1, r0 - beq _02256554 - ldr r0, [r4, #0x14] - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256584 -_02256554: - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _02256584 - add r0, r4, #0 - bl ov28_0225632C - b _02256584 -_02256564: - ldr r0, [r4, #0x14] - ldr r1, [r4, #8] - bl ov28_022569DC - cmp r0, #0 - beq _02256584 - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _02256580 - add r0, r4, #0 - bl ov28_0225632C - b _02256584 -_02256580: - mov r0, #0 - strb r0, [r4, #1] -_02256584: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov28_0225648C - - thumb_func_start ov28_02256588 -ov28_02256588: ; 0x02256588 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _02256598 - cmp r1, #1 - beq _0225667A - b _0225669A -_02256598: - mov r1, #0 - mvn r1, r1 - str r1, [r4, #8] - ldrh r1, [r4, #6] - add r2, r1, #0 - sub r2, #0xa - cmp r2, #7 - bhi _02256630 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022565B4: ; jump table - .short _022565D2 - _022565B4 - 2 ; case 0 - .short _022565D8 - _022565B4 - 2 ; case 1 - .short _022565D8 - _022565B4 - 2 ; case 2 - .short _022565D8 - _022565B4 - 2 ; case 3 - .short _022565D8 - _022565B4 - 2 ; case 4 - .short _02256606 - _022565B4 - 2 ; case 5 - .short _022565C4 - _022565B4 - 2 ; case 6 - .short _02256652 - _022565B4 - 2 ; case 7 -_022565C4: - bl ov28_02256868 - mov r0, #4 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #2] - b _02256652 -_022565D2: - mov r0, #1 - strb r0, [r4, #4] - b _02256652 -_022565D8: - ldrh r1, [r4, #0x1a] - bl ov28_02256888 - cmp r0, #0 - beq _022565FC - ldrh r0, [r4, #6] - strh r0, [r4, #0x1a] - mov r0, #0 - strb r0, [r4, #4] - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x24] - bl ov28_02256ED8 - mov r0, #7 - str r0, [r4, #8] - mov r0, #2 - strb r0, [r4, #2] - b _02256652 -_022565FC: - mov r0, #9 - str r0, [r4, #8] - mov r0, #5 - strb r0, [r4, #2] - b _02256652 -_02256606: - ldrh r1, [r4, #0x1a] - bl ov28_02256888 - cmp r0, #0 - beq _02256626 - ldr r1, [r4, #0x24] - add r0, r4, #0 - bl ov28_02256914 - mov r0, #6 - str r0, [r4, #8] - mov r0, #0 - strb r0, [r4, #4] - mov r0, #4 - strb r0, [r4, #2] - b _02256652 -_02256626: - mov r0, #9 - str r0, [r4, #8] - mov r0, #5 - strb r0, [r4, #2] - b _02256652 -_02256630: - ldrb r0, [r4, #4] - cmp r0, #0 - ldr r0, [r4, #0x20] - beq _02256646 - bl ov28_022571B8 - cmp r0, #0 - beq _02256652 - mov r0, #5 - str r0, [r4, #8] - b _02256652 -_02256646: - bl ov28_0225717C - cmp r0, #0 - beq _02256652 - mov r0, #5 - str r0, [r4, #8] -_02256652: - mov r0, #0 - ldr r1, [r4, #8] - mvn r0, r0 - cmp r1, r0 - beq _0225666A - ldr r0, [r4, #0x14] - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225669A -_0225666A: - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _0225669A - add r0, r4, #0 - bl ov28_0225632C - b _0225669A -_0225667A: - ldr r0, [r4, #0x14] - ldr r1, [r4, #8] - bl ov28_022569DC - cmp r0, #0 - beq _0225669A - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _02256696 - add r0, r4, #0 - bl ov28_0225632C - b _0225669A -_02256696: - mov r0, #0 - strb r0, [r4, #1] -_0225669A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_02256588 - - thumb_func_start ov28_022566A0 -ov28_022566A0: ; 0x022566A0 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _022566B0 - cmp r1, #1 - beq _02256784 - b _022567A4 -_022566B0: - mov r1, #0 - mvn r1, r1 - str r1, [r4, #8] - ldrh r1, [r4, #6] - add r2, r1, #0 - sub r2, #0xa - cmp r2, #7 - bhi _02256742 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022566CC: ; jump table - .short _022566EA - _022566CC - 2 ; case 0 - .short _022566FA - _022566CC - 2 ; case 1 - .short _022566FA - _022566CC - 2 ; case 2 - .short _022566FA - _022566CC - 2 ; case 3 - .short _022566FA - _022566CC - 2 ; case 4 - .short _02256712 - _022566CC - 2 ; case 5 - .short _022566DC - _022566CC - 2 ; case 6 - .short _0225675C - _022566CC - 2 ; case 7 -_022566DC: - bl ov28_02256868 - mov r0, #4 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #2] - b _0225675C -_022566EA: - bl ov28_02256868 - mov r0, #3 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #4] - strb r0, [r4, #2] - b _0225675C -_022566FA: - strh r1, [r4, #0x1a] - mov r0, #8 - str r0, [r4, #8] - mov r0, #0 - strb r0, [r4, #4] - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x24] - bl ov28_02256ED8 - mov r0, #2 - strb r0, [r4, #2] - b _0225675C -_02256712: - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x24] - bl ov28_02256ED8 - ldrh r1, [r4, #0x1a] - add r0, r4, #0 - bl ov28_02256888 - cmp r0, #0 - beq _02256738 - ldr r1, [r4, #0x24] - add r0, r4, #0 - bl ov28_02256914 - mov r0, #6 - str r0, [r4, #8] - mov r0, #0 - strb r0, [r4, #4] - b _0225675C -_02256738: - mov r0, #9 - str r0, [r4, #8] - mov r0, #5 - strb r0, [r4, #2] - b _0225675C -_02256742: - ldr r0, [r4, #0x1c] - bl ov28_02256EC8 - ldrh r1, [r4, #6] - ldr r0, [r4, #0x1c] - bl ov28_0225717C - cmp r0, #0 - beq _02256758 - mov r0, #3 - str r0, [r4, #8] -_02256758: - mov r0, #1 - strb r0, [r4, #2] -_0225675C: - mov r0, #0 - ldr r1, [r4, #8] - mvn r0, r0 - cmp r1, r0 - beq _02256774 - ldr r0, [r4, #0x14] - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _022567A4 -_02256774: - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _022567A4 - add r0, r4, #0 - bl ov28_0225632C - b _022567A4 -_02256784: - ldr r0, [r4, #0x14] - ldr r1, [r4, #8] - bl ov28_022569DC - cmp r0, #0 - beq _022567A4 - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _022567A0 - add r0, r4, #0 - bl ov28_0225632C - b _022567A4 -_022567A0: - mov r0, #0 - strb r0, [r4, #1] -_022567A4: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov28_022566A0 - - thumb_func_start ov28_022567A8 -ov28_022567A8: ; 0x022567A8 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #1] - cmp r1, #0 - beq _022567B8 - cmp r1, #1 - beq _02256842 - b _02256862 -_022567B8: - mov r1, #0 - mvn r1, r1 - str r1, [r4, #8] - ldrh r1, [r4, #6] - sub r1, #0xa - cmp r1, #7 - bhi _02256800 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022567D2: ; jump table - .short _022567F0 - _022567D2 - 2 ; case 0 - .short _0225681A - _022567D2 - 2 ; case 1 - .short _0225681A - _022567D2 - 2 ; case 2 - .short _0225681A - _022567D2 - 2 ; case 3 - .short _0225681A - _022567D2 - 2 ; case 4 - .short _0225681A - _022567D2 - 2 ; case 5 - .short _022567E2 - _022567D2 - 2 ; case 6 - .short _0225681A - _022567D2 - 2 ; case 7 -_022567E2: - bl ov28_02256868 - mov r0, #3 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #2] - b _0225681A -_022567F0: - bl ov28_02256868 - mov r0, #3 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #4] - strb r0, [r4, #2] - b _0225681A -_02256800: - add r0, r4, #0 - bl ov28_02256868 - ldrh r1, [r4, #6] - ldr r0, [r4, #0x1c] - bl ov28_0225717C - cmp r0, #0 - beq _02256816 - mov r0, #3 - str r0, [r4, #8] -_02256816: - mov r0, #1 - strb r0, [r4, #2] -_0225681A: - mov r0, #0 - ldr r1, [r4, #8] - mvn r0, r0 - cmp r1, r0 - beq _02256832 - ldr r0, [r4, #0x14] - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _02256862 -_02256832: - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _02256862 - add r0, r4, #0 - bl ov28_0225632C - b _02256862 -_02256842: - ldr r0, [r4, #0x14] - ldr r1, [r4, #8] - bl ov28_022569DC - cmp r0, #0 - beq _02256862 - ldrb r1, [r4, #2] - ldrb r0, [r4] - cmp r1, r0 - beq _0225685E - add r0, r4, #0 - bl ov28_0225632C - b _02256862 -_0225685E: - mov r0, #0 - strb r0, [r4, #1] -_02256862: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_022567A8 - - thumb_func_start ov28_02256868 -ov28_02256868: ; 0x02256868 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - bl ov28_02256EC8 - ldr r0, [r4, #0x20] - bl ov28_02256EC8 - ldr r0, [r4, #0x24] - bl ov28_02256EC8 - mov r0, #0x11 - strh r0, [r4, #0x1a] - mov r0, #0 - strb r0, [r4, #4] - pop {r4, pc} - thumb_func_end ov28_02256868 - - thumb_func_start ov28_02256888 -ov28_02256888: ; 0x02256888 - push {r4, lr} - sub r1, #0xb - add r4, r0, #0 - cmp r1, #3 - bhi _022568D4 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225689E: ; jump table - .short _022568B2 - _0225689E - 2 ; case 0 - .short _022568A6 - _0225689E - 2 ; case 1 - .short _022568BE - _0225689E - 2 ; case 2 - .short _022568CA - _0225689E - 2 ; case 3 -_022568A6: - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - bl ov28_02256EE8 - b _022568D4 -_022568B2: - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - bl ov28_02256F74 - b _022568D4 -_022568BE: - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - bl ov28_02257028 - b _022568D4 -_022568CA: - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - ldr r2, [r4, #0x24] - bl ov28_02257058 -_022568D4: - ldr r0, [r4, #0x24] - mov r1, #0xa - bl ov28_02257240 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_02256888 - - thumb_func_start ov28_022568E0 -ov28_022568E0: ; 0x022568E0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #0 - beq _022568F0 - cmp r0, #1 - beq _02256900 - b _0225690E -_022568F0: - ldr r0, [r4, #0x14] - mov r1, #0xa - bl ov28_022569B8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _0225690E -_02256900: - ldr r0, [r4, #0x14] - bl ov28_022569E8 - cmp r0, #0 - beq _0225690E - mov r0, #1 - pop {r4, pc} -_0225690E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_022568E0 - - thumb_func_start ov28_02256914 -ov28_02256914: ; 0x02256914 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - bl ov28_02257468 - add r4, r0, #0 - mov r2, #0 - mov r0, #0 - sub r0, r0, r4 - sbc r2, r1 - bge _02256976 - mov r2, #0 - ldr r0, _02256978 ; =0x000001ED - sub r0, r0, r4 - sbc r2, r1 - blt _02256976 - ldr r0, [r5, #0x10] - bl ov25_02254544 - bl sub_02027560 - add r5, r0, #0 - bl sub_02027474 - cmp r0, #0 - beq _0225694E - lsl r0, r4, #0x10 - lsr r4, r0, #0x10 - b _02256958 -_0225694E: - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_020775C4 - add r4, r0, #0 -_02256958: - cmp r4, #0 - beq _02256976 - ldr r0, _02256978 ; =0x000001ED - cmp r4, r0 - bhi _02256976 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02026FE8 - cmp r0, #0 - beq _02256976 - add r0, r4, #0 - mov r1, #0 - bl ov25_02254444 -_02256976: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02256978: .word 0x000001ED - thumb_func_end ov28_02256914 - - thumb_func_start ov28_0225697C -ov28_0225697C: ; 0x0225697C - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r1, _022569A8 ; =0x0000048C - mov r0, #8 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - beq _022569A2 - str r6, [r4, #0] - str r7, [r4, #4] - add r0, #8 - mov r1, #8 - bl ov25_02255090 - str r4, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022569A2: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022569A8: .word 0x0000048C - thumb_func_end ov28_0225697C - - thumb_func_start ov28_022569AC -ov28_022569AC: ; 0x022569AC - push {r3, lr} - cmp r0, #0 - beq _022569B6 - bl sub_020181C4 -_022569B6: - pop {r3, pc} - thumb_func_end ov28_022569AC - - thumb_func_start ov28_022569B8 -ov28_022569B8: ; 0x022569B8 - push {lr} - sub sp, #0xc - add r2, r0, #0 - add r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r0, _022569D8 ; =0x022579C0 - ldr r3, [r2, #0] - bl ov25_0225517C - add sp, #0xc - pop {pc} - nop -_022569D8: .word 0x022579C0 - thumb_func_end ov28_022569B8 - - thumb_func_start ov28_022569DC -ov28_022569DC: ; 0x022569DC - ldr r3, _022569E4 ; =ov25_02255130 - add r0, #8 - bx r3 - nop -_022569E4: .word ov25_02255130 - thumb_func_end ov28_022569DC - - thumb_func_start ov28_022569E8 -ov28_022569E8: ; 0x022569E8 - ldr r3, _022569F0 ; =ov25_02255154 - add r0, #8 - bx r3 - nop -_022569F0: .word ov25_02255154 - thumb_func_end ov28_022569E8 - - thumb_func_start ov28_022569F4 -ov28_022569F4: ; 0x022569F4 - push {r4, lr} - add r4, r0, #0 - bl ov25_0225523C - add r0, #8 - add r1, r4, #0 - bl ov25_02255224 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_022569F4 - - thumb_func_start ov28_02256A08 -ov28_02256A08: ; 0x02256A08 - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r0, r4, #0 - bl ov25_02255240 - add r0, r4, #0 - bl ov25_0225523C - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r2, _02256A98 ; =0x0225769C - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x10 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - ldr r2, [r5, #4] - mov r0, #0xc - mov r1, #0x11 - mov r3, #6 - bl sub_02006E60 - add r0, r5, #0 - bl ov28_02256AA4 - mov r0, #0 - add r1, r0, #0 - bl ov25_022546B8 - ldr r0, [r5, #4] - mov r1, #6 - bl sub_02019448 - ldr r1, _02256A9C ; =0x04001000 - ldr r0, _02256AA0 ; =0xFFFFE0FF - ldr r3, [r1, #0] - ldr r2, [r1, #0] - str r3, [sp, #0x10] - and r0, r2 - lsl r2, r3, #0x13 - lsr r3, r2, #0x1b - mov r2, #4 - orr r2, r3 - lsl r2, r2, #8 - orr r0, r2 - str r0, [r1, #0] - add r0, r4, #0 - bl ov28_022569F4 - add sp, #0x14 - pop {r4, r5, pc} - nop -_02256A98: .word 0x0225769C -_02256A9C: .word 0x04001000 -_02256AA0: .word 0xFFFFE0FF - thumb_func_end ov28_02256A08 - - thumb_func_start ov28_02256AA4 -ov28_02256AA4: ; 0x02256AA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - ldr r0, [r6, #4] - mov r1, #6 - bl sub_02019FE4 - mov ip, r0 - mov r0, #0 - ldr r3, _02256B20 ; =0x02257938 - str r0, [sp, #4] -_02256ABA: - ldrb r7, [r3, #1] - ldrb r0, [r3, #3] - mov r2, #0 - add r0, r7, r0 - cmp r7, r0 - bhs _02256B0C - lsl r0, r7, #5 - str r0, [sp] -_02256ACA: - ldrb r1, [r3] - ldrb r0, [r3, #2] - add r0, r1, r0 - cmp r1, r0 - bhs _02256AFA - ldr r0, [sp] - lsl r4, r0, #1 - mov r0, ip - add r4, r0, r4 - lsl r0, r1, #1 - add r4, r4, r0 -_02256AE0: - lsl r5, r2, #1 - ldrh r0, [r4] - add r5, r6, r5 - add r5, #0x4c - strh r0, [r5] - ldrb r5, [r3] - ldrb r0, [r3, #2] - add r1, r1, #1 - add r2, r2, #1 - add r0, r5, r0 - add r4, r4, #2 - cmp r1, r0 - blo _02256AE0 -_02256AFA: - ldr r0, [sp] - ldrb r1, [r3, #1] - add r0, #0x20 - str r0, [sp] - ldrb r0, [r3, #3] - add r7, r7, #1 - add r0, r1, r0 - cmp r7, r0 - blo _02256ACA -_02256B0C: - ldr r0, [sp, #4] - add r3, r3, #4 - add r0, r0, #1 - add r6, #0x40 - str r0, [sp, #4] - cmp r0, #0x11 - blo _02256ABA - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02256B20: .word 0x02257938 - thumb_func_end ov28_02256AA4 - - thumb_func_start ov28_02256B24 -ov28_02256B24: ; 0x02256B24 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - ldrh r5, [r5] - ldr r0, _02256B78 ; =0x00000663 - bl ov25_02254424 - lsl r3, r5, #2 - ldr r0, _02256B7C ; =0x02257939 - ldr r2, _02256B80 ; =0x0225797C - ldrb r0, [r0, r3] - ldr r5, _02256B84 ; =0x02257938 - ldr r2, [r2, r3] - str r0, [sp] - ldr r0, _02256B88 ; =0x0225793A - mov r1, #6 - ldrb r0, [r0, r3] - str r0, [sp, #4] - ldr r0, _02256B8C ; =0x0225793B - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_020198C0 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02256B78: .word 0x00000663 -_02256B7C: .word 0x02257939 -_02256B80: .word 0x0225797C -_02256B84: .word 0x02257938 -_02256B88: .word 0x0225793A -_02256B8C: .word 0x0225793B - thumb_func_end ov28_02256B24 - - thumb_func_start ov28_02256B90 -ov28_02256B90: ; 0x02256B90 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - ldrh r5, [r0] - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - lsl r3, r5, #2 - ldr r0, _02256BE0 ; =0x02257939 - add r2, r4, #0 - ldrb r0, [r0, r3] - add r2, #0x4c - lsl r5, r5, #6 - str r0, [sp] - ldr r0, _02256BE4 ; =0x0225793A - add r2, r2, r5 - ldrb r0, [r0, r3] - ldr r5, _02256BE8 ; =0x02257938 - mov r1, #6 - str r0, [sp, #4] - ldr r0, _02256BEC ; =0x0225793B - ldrb r0, [r0, r3] - ldrb r3, [r5, r3] - str r0, [sp, #8] - ldr r0, [r4, #4] - bl sub_020198C0 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02256BE0: .word 0x02257939 -_02256BE4: .word 0x0225793A -_02256BE8: .word 0x02257938 -_02256BEC: .word 0x0225793B - thumb_func_end ov28_02256B90 - - thumb_func_start ov28_02256BF0 -ov28_02256BF0: ; 0x02256BF0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r5, #4] - add r1, #0x30 - bl ov28_0225726C - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x30 - bl ov28_02256E0C - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - pop {r4, r5, r6, pc} - thumb_func_end ov28_02256BF0 - - thumb_func_start ov28_02256C28 -ov28_02256C28: ; 0x02256C28 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r5, #4] - add r1, #0x30 - bl ov28_0225726C - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x30 - bl ov28_02256E0C - ldr r0, [r4, #4] - bl ov28_02256DCC - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov28_02256C28 - - thumb_func_start ov28_02256C68 -ov28_02256C68: ; 0x02256C68 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r5, #8] - add r1, #0x30 - bl ov28_0225726C - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x30 - bl ov28_02256E0C - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - pop {r4, r5, r6, pc} - thumb_func_end ov28_02256C68 - - thumb_func_start ov28_02256CA0 -ov28_02256CA0: ; 0x02256CA0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r5, #0xc] - add r1, #0x30 - bl ov28_0225726C - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x30 - bl ov28_02256E0C - ldr r0, [r4, #4] - bl ov28_02256DCC - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov28_02256CA0 - - thumb_func_start ov28_02256CE0 -ov28_02256CE0: ; 0x02256CE0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - bl ov25_02255240 - add r5, r0, #0 - add r0, r6, #0 - bl ov25_0225523C - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r5, #0xc] - add r1, #0x30 - bl ov28_0225726C - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x30 - bl ov28_02256E0C - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov28_02256D90 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r6, #0 - bl ov28_022569F4 - pop {r4, r5, r6, pc} - thumb_func_end ov28_02256CE0 - - thumb_func_start ov28_02256D20 -ov28_02256D20: ; 0x02256D20 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - mov r2, #0 - add r1, r4, #0 - mov r0, #0xc -_02256D32: - add r2, r2, #1 - strh r0, [r1, #0x30] - add r1, r1, #2 - cmp r2, #0xa - blo _02256D32 - lsl r0, r2, #1 - mov r1, #0xd - add r0, r4, r0 - strh r1, [r0, #0x30] - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x30 - bl ov28_02256E0C - ldr r0, [r4, #4] - bl ov28_02256DCC - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r5, #0 - bl ov28_022569F4 - pop {r3, r4, r5, pc} - thumb_func_end ov28_02256D20 - - thumb_func_start ov28_02256D64 -ov28_02256D64: ; 0x02256D64 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r0, r5, #0 - bl ov25_0225523C - add r4, r0, #0 - add r0, r5, #0 - bl ov25_02255240 - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov28_02256D90 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019448 - add r0, r5, #0 - bl ov28_022569F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov28_02256D64 - - thumb_func_start ov28_02256D90 -ov28_02256D90: ; 0x02256D90 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - mov r1, #6 - add r4, r0, #0 - bl sub_02019FE4 - ldrh r1, [r5, #2] - cmp r1, #0x11 - bne _02256DAE - add r0, r4, #0 - bl ov28_02256DCC - add sp, #0xc - pop {r4, r5, pc} -_02256DAE: - sub r1, #0xb - lsl r1, r1, #1 - add r1, #0xf0 - str r1, [sp] - mov r1, #0x28 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #3 - add r2, r1, #0 - mov r3, #0x20 - bl ov25_02255258 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov28_02256D90 - - thumb_func_start ov28_02256DCC -ov28_02256DCC: ; 0x02256DCC - push {lr} - sub sp, #0xc - mov r1, #6 - bl sub_02019FE4 - mov r1, #0x29 - str r1, [sp] - mov r1, #0x28 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #3 - add r2, r1, #0 - mov r3, #0x20 - bl ov25_02255258 - add sp, #0xc - pop {pc} - thumb_func_end ov28_02256DCC - - thumb_func_start ov28_02256DF0 -ov28_02256DF0: ; 0x02256DF0 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov25_0225523C - ldr r0, [r0, #4] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - bl ov28_022569F4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov28_02256DF0 - - thumb_func_start ov28_02256E0C -ov28_02256E0C: ; 0x02256E0C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r1, #0 - mov r1, #6 - bl sub_02019FE4 - add r7, r0, #0 - ldrh r0, [r6] - mov r1, #0 - cmp r0, #0xd - beq _02256E2E - add r2, r6, #0 -_02256E24: - add r2, r2, #2 - ldrh r0, [r2] - add r1, r1, #1 - cmp r0, #0xd - bne _02256E24 -_02256E2E: - mov r0, #0xa - mov r4, #0 - sub r0, r0, r1 - str r0, [sp, #0xc] - beq _02256E5C - mov r5, #5 -_02256E3A: - mov r0, #0x2b - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r7, #0 - add r1, r5, #0 - mov r2, #3 - mov r3, #0x20 - bl ov25_02255258 - ldr r0, [sp, #0xc] - add r4, r4, #1 - add r5, r5, #2 - cmp r4, r0 - blo _02256E3A -_02256E5C: - mov r0, #0 - str r0, [sp, #0x10] - cmp r4, #0xa - bhs _02256E96 - bhs _02256E96 - lsl r0, r4, #1 - add r5, r0, #5 -_02256E6A: - ldrh r0, [r6] - add r1, r5, #0 - mov r2, #3 - lsl r0, r0, #1 - add r0, #0xa5 - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r7, #0 - mov r3, #0x20 - bl ov25_02255258 - ldr r0, [sp, #0x10] - add r4, r4, #1 - add r0, r0, #1 - add r5, r5, #2 - add r6, r6, #2 - str r0, [sp, #0x10] - cmp r4, #0xa - blo _02256E6A -_02256E96: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov28_02256E0C - - thumb_func_start ov28_02256E9C -ov28_02256E9C: ; 0x02256E9C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #8 - mov r1, #0xc - bl sub_02018144 - str r0, [r5, #0] - cmp r0, #0 - beq _02256EBC - strb r4, [r0, #0xa] - ldr r0, [r5, #0] - bl ov28_02256EC8 - mov r0, #1 - pop {r3, r4, r5, pc} -_02256EBC: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov28_02256E9C - - thumb_func_start ov28_02256EC0 -ov28_02256EC0: ; 0x02256EC0 - ldr r3, _02256EC4 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_02256EC4: .word sub_020181C4 - thumb_func_end ov28_02256EC0 - - thumb_func_start ov28_02256EC8 -ov28_02256EC8: ; 0x02256EC8 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #4] - strb r1, [r0, #9] - strb r1, [r0, #8] - strb r1, [r0, #0xb] - bx lr - ; .align 2, 0 - thumb_func_end ov28_02256EC8 - - thumb_func_start ov28_02256ED8 -ov28_02256ED8: ; 0x02256ED8 - add r2, r1, #0 - add r3, r0, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov28_02256ED8 - - thumb_func_start ov28_02256EE8 -ov28_02256EE8: ; 0x02256EE8 - push {r4, r5, r6, lr} - sub sp, #0x30 - add r5, r0, #0 - add r3, r1, #0 - ldrb r1, [r5, #9] - add r4, r2, #0 - cmp r1, #0 - bne _02256F1A - ldrb r0, [r3, #9] - cmp r0, #1 - bne _02256F1A - ldmia r3!, {r0, r1} - add r6, sp, #0x24 - add r4, r6, #0 - stmia r6!, {r0, r1} - ldr r0, [r3, #0] - add r1, r4, #0 - str r0, [r6, #0] - mov r0, #0 - strb r0, [r4, #9] - add r0, r5, #0 - bl ov28_02256F74 - add sp, #0x30 - pop {r4, r5, r6, pc} -_02256F1A: - cmp r1, #1 - bne _02256F42 - ldrb r0, [r3, #9] - cmp r0, #0 - bne _02256F42 - ldmia r5!, {r0, r1} - add r6, sp, #0x18 - add r2, r6, #0 - stmia r6!, {r0, r1} - ldr r0, [r5, #0] - add r1, r2, #0 - str r0, [r6, #0] - mov r0, #0 - strb r0, [r2, #9] - add r0, r3, #0 - add r2, r4, #0 - bl ov28_02256F74 - add sp, #0x30 - pop {r4, r5, r6, pc} -_02256F42: - add r1, r3, #0 - add r0, r5, #0 - add r2, sp, #0xc - add r3, sp, #0 - bl ov28_022575EC - ldr r2, [sp, #0xc] - ldr r1, [sp] - ldr r3, [sp, #0x10] - ldr r0, [sp, #4] - add r1, r2, r1 - adc r3, r0 - str r1, [r4, #0] - str r3, [r4, #4] - add r0, sp, #0 - ldrb r1, [r0, #0x14] - strb r1, [r4, #8] - ldrb r0, [r0, #0x15] - strb r0, [r4, #9] - add r0, r4, #0 - bl ov28_022574FC - add sp, #0x30 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov28_02256EE8 - - thumb_func_start ov28_02256F74 -ov28_02256F74: ; 0x02256F74 - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - ldrb r1, [r5, #9] - add r6, r2, #0 - cmp r1, #0 - bne _02256F8A - ldrb r0, [r4, #9] - cmp r0, #1 - beq _02256F94 -_02256F8A: - cmp r1, #1 - bne _02256FB6 - ldrb r0, [r4, #9] - cmp r0, #0 - bne _02256FB6 -_02256F94: - ldmia r4!, {r0, r1} - add r3, sp, #0x18 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - ldrb r1, [r2, #9] - mov r0, #1 - eor r0, r1 - strb r0, [r2, #9] - add r1, r2, #0 - add r0, r5, #0 - add r2, r6, #0 - bl ov28_02256EE8 - add sp, #0x24 - pop {r3, r4, r5, r6, pc} -_02256FB6: - add r0, r5, #0 - add r1, r4, #0 - bl ov28_022571F4 - cmp r0, #0 - beq _02256FCC - add r0, r6, #0 - bl ov28_02256EC8 - add sp, #0x24 - pop {r3, r4, r5, r6, pc} -_02256FCC: - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0xc - add r3, sp, #0 - bl ov28_022575EC - ldr r3, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r0, [sp] - ldr r1, [sp, #4] - add r5, sp, #0xc - add r4, sp, #0 - sub r0, r3, r0 - sbc r2, r1 - bhs _02256FEE - mov r1, #1 - b _02256FF0 -_02256FEE: - mov r1, #0 -_02256FF0: - add r0, sp, #0 - ldrb r0, [r0, #0x15] - eor r0, r1 - beq _02257006 - add r0, r5, #0 - add r5, r4, #0 - ldrb r1, [r5, #9] - add r4, r0, #0 - mov r0, #1 - eor r0, r1 - b _02257008 -_02257006: - ldrb r0, [r5, #9] -_02257008: - strb r0, [r6, #9] - ldr r2, [r5, #0] - ldr r1, [r4, #0] - ldr r3, [r5, #4] - ldr r0, [r4, #4] - sub r1, r2, r1 - sbc r3, r0 - str r1, [r6, #0] - str r3, [r6, #4] - ldrb r0, [r5, #8] - strb r0, [r6, #8] - add r0, r6, #0 - bl ov28_022574FC - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov28_02256F74 - - thumb_func_start ov28_02257028 -ov28_02257028: ; 0x02257028 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #4] - ldr r2, [r6, #0] - ldr r3, [r6, #4] - bl sub_020E1F1C - str r0, [r4, #0] - str r1, [r4, #4] - ldrb r1, [r5, #8] - ldrb r0, [r6, #8] - add r0, r1, r0 - strb r0, [r4, #8] - ldrb r1, [r5, #9] - ldrb r0, [r6, #9] - eor r0, r1 - strb r0, [r4, #9] - add r0, r4, #0 - bl ov28_022574FC - pop {r4, r5, r6, pc} - thumb_func_end ov28_02257028 - - thumb_func_start ov28_02257058 -ov28_02257058: ; 0x02257058 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r2, #0 - add r2, r1, #0 - add r3, r1, #0 - ldr r6, [r3, #4] - mov r3, #0 - ldr r2, [r2, #0] - mov r4, #0 - eor r3, r6 - eor r2, r4 - str r1, [sp] - orr r2, r3 - bne _0225707C - mov r0, #1 - add sp, #0x1c - strb r0, [r5, #0xb] - pop {r4, r5, r6, r7, pc} -_0225707C: - add r2, sp, #0x10 - add r3, sp, #4 - bl ov28_022575EC - add r0, sp, #4 - str r0, [sp] - ldr r4, [sp, #4] - ldr r3, [sp, #8] - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, _0225716C ; =0x04000280 - mov r6, #2 - strh r6, [r0] - add r6, r0, #0 - add r6, #0x10 - str r2, [r6, #0] - str r1, [r6, #4] - add r1, r0, #0 - add r1, #0x18 - str r4, [r1, #0] - str r3, [r1, #4] - lsr r1, r0, #0xb -_022570A8: - ldrh r2, [r0] - tst r2, r1 - bne _022570A8 - ldr r0, _02257170 ; =0x040002A0 - ldr r1, [r0, #0] - ldr r0, [r0, #4] - str r1, [r5, #0] - str r0, [r5, #4] - mov r0, #0 - strb r0, [r5, #8] - add r0, r5, #0 - bl ov28_02257498 - ldr r2, _0225716C ; =0x04000280 - add r7, r0, #0 - lsr r0, r2, #0xb -_022570C8: - ldrh r1, [r2] - tst r1, r0 - bne _022570C8 - ldr r0, _02257174 ; =0x040002A8 - mov r1, #0 - ldr r2, [r0, #4] - ldr r3, [r0, #0] - mov r0, #0 - eor r1, r2 - eor r0, r3 - orr r0, r1 - beq _0225715C -_022570E0: - ldrb r0, [r5, #8] - add r1, r7, #1 - add r1, r1, r0 - ldrb r0, [r5, #0xa] - cmp r1, r0 - bhs _0225715C - ldr r4, [sp, #4] - ldr r6, [sp, #8] - ldr r0, _0225716C ; =0x04000280 - mov r1, #2 - strh r1, [r0] - add r0, r3, #0 - add r1, r2, #0 - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - ldr r2, _02257178 ; =0x04000290 - mov r3, #0 - str r0, [r2, #0] - str r1, [r2, #4] - add r2, #8 - str r4, [r2, #0] - str r6, [r2, #4] - ldr r0, [r5, #0] - ldr r1, [r5, #4] - mov r2, #0xa - bl sub_020E1F1C - str r0, [r5, #0] - ldr r2, _0225716C ; =0x04000280 - str r1, [r5, #4] - lsr r0, r2, #0xb -_02257122: - ldrh r1, [r2] - tst r1, r0 - bne _02257122 - ldr r0, _02257170 ; =0x040002A0 - ldr r2, [r5, #0] - ldr r1, [r0, #0] - ldr r3, [r5, #4] - add r1, r2, r1 - ldr r0, [r0, #4] - ldr r2, _0225716C ; =0x04000280 - adc r3, r0 - str r1, [r5, #0] - str r3, [r5, #4] - ldrb r0, [r5, #8] - add r0, r0, #1 - strb r0, [r5, #8] - lsr r0, r2, #0xb -_02257144: - ldrh r1, [r2] - tst r1, r0 - bne _02257144 - ldr r0, _02257174 ; =0x040002A8 - mov r1, #0 - ldr r2, [r0, #4] - ldr r3, [r0, #0] - mov r0, #0 - eor r1, r2 - eor r0, r3 - orr r0, r1 - bne _022570E0 -_0225715C: - add r0, sp, #0x10 - ldrb r1, [r0, #9] - ldr r0, [sp] - ldrb r0, [r0, #9] - eor r0, r1 - strb r0, [r5, #9] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225716C: .word 0x04000280 -_02257170: .word 0x040002A0 -_02257174: .word 0x040002A8 -_02257178: .word 0x04000290 - thumb_func_end ov28_02257058 - - thumb_func_start ov28_0225717C -ov28_0225717C: ; 0x0225717C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov28_022574E8 - ldrb r1, [r5, #0xa] - cmp r0, r1 - blo _02257190 - mov r0, #0 - pop {r3, r4, r5, pc} -_02257190: - ldrb r0, [r5, #8] - cmp r0, #0 - bne _022571B2 - ldr r0, [r5, #0] - ldr r1, [r5, #4] - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - str r0, [r5, #0] - str r1, [r5, #4] - ldr r2, [r5, #0] - mov r0, #0 - add r2, r2, r4 - adc r1, r0 - str r2, [r5, #0] - str r1, [r5, #4] -_022571B2: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov28_0225717C - - thumb_func_start ov28_022571B8 -ov28_022571B8: ; 0x022571B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov28_022574E8 - ldrb r1, [r5, #0xa] - cmp r0, r1 - blo _022571CC - mov r0, #0 - pop {r3, r4, r5, pc} -_022571CC: - ldr r0, [r5, #0] - ldr r1, [r5, #4] - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - str r0, [r5, #0] - str r1, [r5, #4] - ldr r2, [r5, #0] - mov r0, #0 - add r2, r2, r4 - adc r1, r0 - str r2, [r5, #0] - str r1, [r5, #4] - ldrb r0, [r5, #8] - add r0, r0, #1 - strb r0, [r5, #8] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov28_022571B8 - - thumb_func_start ov28_022571F4 -ov28_022571F4: ; 0x022571F4 - push {r3, r4, r5, r6} - ldr r2, [r0, #4] - ldr r3, [r0, #0] - ldr r4, [r1, #4] - add r5, r2, #0 - eor r5, r4 - ldr r6, [r1, #0] - add r4, r3, #0 - eor r4, r6 - orr r4, r5 - beq _02257210 - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_02257210: - ldrb r5, [r0, #8] - ldrb r4, [r1, #8] - cmp r5, r4 - beq _0225721E - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_0225721E: - ldrb r4, [r0, #9] - ldrb r0, [r1, #9] - cmp r4, r0 - beq _02257238 - mov r1, #0 - mov r0, #0 - eor r1, r2 - eor r0, r3 - orr r0, r1 - beq _02257238 - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_02257238: - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov28_022571F4 - - thumb_func_start ov28_02257240 -ov28_02257240: ; 0x02257240 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldrb r1, [r5, #0xb] - cmp r1, #0 - beq _02257250 - mov r0, #0 - pop {r3, r4, r5, pc} -_02257250: - bl ov28_02257498 - ldrb r1, [r5, #8] - cmp r1, #0 - beq _0225725E - add r1, r1, #1 - add r0, r0, r1 -_0225725E: - cmp r0, r4 - bls _02257266 - mov r0, #0 - pop {r3, r4, r5, pc} -_02257266: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov28_02257240 - - thumb_func_start ov28_0225726C -ov28_0225726C: ; 0x0225726C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp] - ldrb r0, [r0, #0xb] - str r1, [sp, #0x10] - cmp r0, #0 - beq _02257280 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02257280: - ldr r0, [sp] - mov r1, #0 - ldr r7, [r0, #4] - ldr r6, [r0, #0] - mov r0, #0 - eor r1, r7 - eor r0, r6 - orr r0, r1 - bne _022572D6 - ldr r1, [sp, #0x10] - add r0, r1, #0 - add r2, r0, #2 - mov r0, #0 - strh r0, [r1] - ldr r1, [sp] - str r2, [sp, #0x10] - ldrb r1, [r1, #8] - cmp r1, #0 - beq _022572CA - add r1, r2, #2 - str r1, [sp, #0x10] - mov r1, #0xa - strh r1, [r2] - ldr r1, [sp] - ldrb r1, [r1, #8] - cmp r1, #0 - ble _022572CA - add r2, r0, #0 -_022572B8: - ldr r1, [sp, #0x10] - add r0, r0, #1 - strh r2, [r1] - add r1, r1, #2 - str r1, [sp, #0x10] - ldr r1, [sp] - ldrb r1, [r1, #8] - cmp r0, r1 - blt _022572B8 -_022572CA: - ldr r0, [sp, #0x10] - mov r1, #0xd - strh r1, [r0] - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022572D6: - mov r2, #0xa - mov r0, #1 - mov r1, #0 - sub r2, r6, r2 - mov ip, r7 - mov r2, ip - sbc r2, r1 - blo _022572FA - ldr r2, _0225744C ; =0x02257A58 -_022572E8: - add r2, #8 - ldr r3, [r2, #0] - add r0, r0, #1 - ldr r1, [r2, #4] - sub r3, r6, r3 - mov ip, r7 - mov r3, ip - sbc r3, r1 - bhs _022572E8 -_022572FA: - ldr r1, [sp] - str r0, [sp, #8] - ldrb r1, [r1, #8] - sub r3, r1, r0 - bmi _0225730C - add r1, r3, #2 - add r1, r0, r1 - str r1, [sp, #8] - b _02257314 -_0225730C: - cmp r1, #0 - beq _02257314 - add r1, r0, #1 - str r1, [sp, #8] -_02257314: - ldr r1, [sp] - ldr r4, [sp] - ldrb r2, [r1, #9] - ldr r1, [sp, #8] - ldrb r4, [r4, #0xa] - add r1, r1, r2 - cmp r1, r4 - bls _0225732A - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0225732A: - cmp r2, #1 - bne _02257338 - ldr r1, [sp, #0x10] - mov r2, #0xb - strh r2, [r1] - add r1, r1, #2 - str r1, [sp, #0x10] -_02257338: - ldr r5, [sp, #0x10] - cmp r3, #0 - blt _02257362 - add r0, r5, #0 - mov r1, #0 - strh r1, [r0] - mov r1, #0xa - add r5, r0, #4 - strh r1, [r0, #2] - add r0, r3, #0 - sub r3, r3, #1 - cmp r0, #0 - beq _022573CE - mov r0, #0 -_02257354: - add r1, r3, #0 - strh r0, [r5] - add r5, r5, #2 - sub r3, r3, #1 - cmp r1, #0 - bne _02257354 - b _022573CE -_02257362: - neg r1, r3 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #0x14] - ldr r1, [sp, #4] - cmp r1, #0 - ble _022573C0 - ldr r4, _02257450 ; =0x04000280 - sub r0, r0, #1 - mov lr, r0 - lsr r3, r4, #0xb - lsr r2, r4, #0xb -_0225737A: - mov r0, #2 - strh r0, [r4] - ldr r0, _02257454 ; =0x04000290 - mov r1, lr - str r6, [r0, #0] - str r7, [r0, #4] - ldr r0, [sp, #0x14] - sub r0, r1, r0 - lsl r1, r0, #3 - ldr r0, _02257458 ; =0x02257A50 - add r6, r0, r1 - ldr r1, [r0, r1] - ldr r6, [r6, #4] - ldr r0, _0225745C ; =0x04000298 - str r1, [r0, #0] - str r6, [r0, #4] -_0225739A: - ldrh r0, [r4] - tst r0, r3 - bne _0225739A - ldr r0, _02257460 ; =0x040002A0 - ldr r0, [r0, #0] - strh r0, [r5] - add r5, r5, #2 -_022573A8: - ldrh r0, [r4] - tst r0, r2 - bne _022573A8 - ldr r0, _02257464 ; =0x040002A8 - ldr r1, [sp, #4] - ldr r6, [r0, #0] - ldr r7, [r0, #4] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, r1 - blt _0225737A -_022573C0: - ldr r0, [sp] - ldrb r0, [r0, #8] - cmp r0, #0 - beq _022573CE - mov r0, #0xa - strh r0, [r5] - add r5, r5, #2 -_022573CE: - ldr r0, [sp, #0x10] - sub r1, r5, r0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - ldr r0, [sp, #8] - cmp r1, r0 - bhs _02257440 - sub r0, r0, r1 - str r0, [sp, #0x18] - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - cmp r0, #0 - ble _02257440 - ldr r4, _02257450 ; =0x04000280 - sub r0, r0, #1 - str r0, [sp, #0xc] - lsr r3, r4, #0xb - lsr r2, r4, #0xb -_022573F6: - mov r0, #2 - strh r0, [r4] - ldr r0, _02257454 ; =0x04000290 - ldr r1, [sp, #0xc] - str r6, [r0, #0] - str r7, [r0, #4] - ldr r0, [sp, #0x1c] - ldr r6, _02257458 ; =0x02257A50 - sub r0, r1, r0 - lsl r1, r0, #3 - ldr r0, _02257458 ; =0x02257A50 - add r0, r0, r1 - ldr r1, [r6, r1] - ldr r0, [r0, #4] - ldr r6, _0225745C ; =0x04000298 - str r1, [r6, #0] - add r1, r6, #0 - str r0, [r1, #4] -_0225741A: - ldrh r0, [r4] - tst r0, r3 - bne _0225741A - ldr r0, _02257460 ; =0x040002A0 - ldr r0, [r0, #0] - strh r0, [r5] - add r5, r5, #2 -_02257428: - ldrh r0, [r4] - tst r0, r2 - bne _02257428 - ldr r0, _02257464 ; =0x040002A8 - ldr r1, [sp, #0x18] - ldr r6, [r0, #0] - ldr r7, [r0, #4] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, r1 - blt _022573F6 -_02257440: - mov r0, #0xd - strh r0, [r5] - mov r0, #1 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225744C: .word 0x02257A58 -_02257450: .word 0x04000280 -_02257454: .word 0x04000290 -_02257458: .word 0x02257A50 -_0225745C: .word 0x04000298 -_02257460: .word 0x040002A0 -_02257464: .word 0x040002A8 - thumb_func_end ov28_0225726C - - thumb_func_start ov28_02257468 -ov28_02257468: ; 0x02257468 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - lsl r5, r2, #3 - ldr r2, _02257494 ; =0x02257A50 - add r3, r2, r5 - ldr r2, [r2, r5] - ldr r3, [r3, #4] - bl sub_020E1ED4 - ldrb r2, [r4, #9] - cmp r2, #1 - bne _02257490 - mov r2, #0 - mvn r2, r2 - add r3, r2, #0 - bl sub_020E1F1C -_02257490: - pop {r3, r4, r5, pc} - nop -_02257494: .word 0x02257A50 - thumb_func_end ov28_02257468 - - thumb_func_start ov28_02257498 -ov28_02257498: ; 0x02257498 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - ldr r2, [sp] - mov r0, #0xa - ldr r5, [r2, #0] - ldr r6, [r2, #4] - mov r2, #0xa - mov r1, #0 - mov r4, #1 - mov r3, #0 - sub r2, r5, r2 - mov ip, r6 - mov r2, ip - sbc r2, r3 - blo _022574D2 - ldr r2, [sp] - ldrb r7, [r2, #0xa] -_022574BA: - add r4, r4, #1 - cmp r4, r7 - bhi _022574D2 - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - sub r2, r5, r0 - mov ip, r6 - mov r2, ip - sbc r2, r1 - bhs _022574BA -_022574D2: - ldr r0, [sp] - ldrb r0, [r0, #8] - cmp r4, r0 - bls _022574DE - sub r4, r4, r0 - b _022574E0 -_022574DE: - mov r4, #1 -_022574E0: - ldr r0, [sp] - ldrb r0, [r0, #9] - add r0, r4, r0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov28_02257498 - - thumb_func_start ov28_022574E8 -ov28_022574E8: ; 0x022574E8 - push {r4, lr} - add r4, r0, #0 - bl ov28_02257498 - ldrb r1, [r4, #8] - cmp r1, #0 - beq _022574FA - add r1, r1, #1 - add r0, r0, r1 -_022574FA: - pop {r4, pc} - thumb_func_end ov28_022574E8 - - thumb_func_start ov28_022574FC -ov28_022574FC: ; 0x022574FC - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldrb r0, [r4, #8] - cmp r0, #0 - beq _02257582 - ldr r5, _022575DC ; =0x04000280 - ldr r2, [r4, #0] - add r3, r5, #0 - ldr r1, [r4, #4] - mov r0, #1 - strh r0, [r5] - add r3, #0x10 - str r2, [r3, #0] - add r0, r5, #0 - str r1, [r3, #4] - add r0, #0x18 - mov r2, #0xa - mov r1, #0 - str r2, [r0, #0] - str r1, [r0, #4] - add r1, r4, #0 - mov ip, r0 - add r1, #8 - b _02257564 -_0225752C: - mov r0, #2 - lsl r0, r0, #0xe -_02257530: - ldrh r2, [r5] - tst r2, r0 - bne _02257530 - ldr r0, _022575E0 ; =0x040002A0 - ldr r2, _022575E0 ; =0x040002A0 - ldr r0, [r0, #0] - ldr r2, [r2, #4] - str r0, [r4, #0] - str r2, [r4, #4] - ldr r6, [r4, #0] - mov r0, #1 - strh r0, [r5] - str r6, [r3, #0] - str r2, [r3, #4] - mov r2, #0xa - mov r0, ip - str r2, [r0, #0] - mov r2, #0 - mov r0, ip - str r2, [r0, #4] - ldrb r0, [r1] - sub r0, r0, #1 - strb r0, [r1] - ldrb r0, [r4, #8] - cmp r0, #0 - beq _02257582 -_02257564: - ldrh r2, [r5] - mov r0, #2 - lsl r0, r0, #0xe - tst r0, r2 - bne _02257564 - ldr r0, _022575E4 ; =0x040002A8 - mov r7, #0 - ldr r6, [r0, #0] - ldr r2, [r0, #4] - mov r0, #0 - eor r0, r2 - add r2, r6, #0 - eor r2, r7 - orr r0, r2 - beq _0225752C -_02257582: - add r0, r4, #0 - bl ov28_02257498 - ldrb r2, [r4, #8] - cmp r2, #0 - beq _022575D8 - add r1, r2, #1 - add r1, r0, r1 - ldrb r0, [r4, #0xa] - cmp r1, r0 - bls _022575D8 - sub r1, r1, r0 - cmp r1, r2 - bhi _022575D8 - ldr r5, [r4, #0] - ldr r3, [r4, #4] - ldr r0, _022575DC ; =0x04000280 - mov r2, #1 - strh r2, [r0] - add r2, r0, #0 - add r2, #0x10 - str r5, [r2, #0] - str r3, [r2, #4] - ldr r2, _022575E8 ; =0x02257A50 - lsl r3, r1, #3 - ldr r5, [r2, r3] - add r2, r0, #0 - add r2, #0x18 - mov r3, #0 - str r5, [r2, #0] - str r3, [r2, #4] - lsr r2, r0, #0xb -_022575C2: - ldrh r3, [r0] - tst r3, r2 - bne _022575C2 - ldr r0, _022575E0 ; =0x040002A0 - ldr r2, [r0, #0] - ldr r0, [r0, #4] - str r2, [r4, #0] - str r0, [r4, #4] - ldrb r0, [r4, #8] - sub r0, r0, r1 - strb r0, [r4, #8] -_022575D8: - pop {r3, r4, r5, r6, r7, pc} - nop -_022575DC: .word 0x04000280 -_022575E0: .word 0x040002A0 -_022575E4: .word 0x040002A8 -_022575E8: .word 0x02257A50 - thumb_func_end ov28_022574FC - - thumb_func_start ov28_022575EC -ov28_022575EC: ; 0x022575EC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - ldmia r6!, {r0, r1} - add r5, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r6, #0] - add r4, r3, #0 - str r0, [r2, #0] - ldmia r7!, {r0, r1} - add r2, r4, #0 - stmia r2!, {r0, r1} - ldr r0, [r7, #0] - str r0, [r2, #0] - ldrb r1, [r5, #8] - ldrb r0, [r4, #8] - cmp r1, r0 - bhs _02257616 - add r0, r5, #0 - add r5, r4, #0 - add r4, r0, #0 -_02257616: - ldrb r3, [r5, #8] - ldrb r2, [r4, #8] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - sub r2, r3, r2 - lsl r6, r2, #3 - ldr r2, _02257638 ; =0x02257A50 - add r3, r2, r6 - ldr r2, [r2, r6] - ldr r3, [r3, #4] - bl sub_020E1F1C - str r0, [r4, #0] - str r1, [r4, #4] - ldrb r0, [r5, #8] - strb r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02257638: .word 0x02257A50 - thumb_func_end ov28_022575EC - ; 0x0225763C - - - .rodata - .incbin "incbin/overlay28_rodata.bin" - - .section .sinit, 4 - .word ov28_022561C0 - - .bss - .space 0x0 diff --git a/asm/overlay5.s b/asm/overlay5.s deleted file mode 100644 index 3f9176ee7..000000000 --- a/asm/overlay5.s +++ /dev/null @@ -1,83920 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov5_021D0D80 -ov5_021D0D80: ; 0x021D0D80 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0201C2B8 - bl sub_0201DCAC - bl sub_0200A858 - ldr r0, [r4, #0x38] - bl sub_0206285C - bl ov5_021EDC8C - bl sub_02020D68 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D0D80 - - thumb_func_start ov5_021D0DA4 -ov5_021D0DA4: ; 0x021D0DA4 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r6, #0 - bl sub_02006840 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #3 - bls _021D0DB8 - b _021D0F44 -_021D0DB8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D0DC4: ; jump table - .short _021D0DCC - _021D0DC4 - 2 ; case 0 - .short _021D0EB4 - _021D0DC4 - 2 ; case 1 - .short _021D0F32 - _021D0DC4 - 2 ; case 2 - .short _021D0F38 - _021D0DC4 - 2 ; case 3 -_021D0DCC: - add r0, r6, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - ldr r1, _021D0F50 ; =0x04000050 - add r0, r6, #0 - strh r0, [r1] - ldr r1, _021D0F54 ; =0x04001050 - strh r0, [r1] - bl sub_0200F32C - mov r0, #1 - bl sub_0200F32C - add r0, r4, #0 - bl ov5_021D173C - add r0, r4, #0 - bl sub_020531A0 - ldr r0, [r4, #0x74] - ldr r0, [r0, #0] - lsl r0, r0, #8 - lsr r0, r0, #0x1c - beq _021D0E3A - ldr r0, _021D0F58 ; =0x00000006 - mov r1, #2 - bl sub_02006590 - add r0, r4, #0 - bl ov5_021D1178 - cmp r0, #0 - beq _021D0E1E - cmp r0, #1 - beq _021D0E28 - cmp r0, #2 - beq _021D0E32 - b _021D0E3A -_021D0E1E: - ldr r0, _021D0F5C ; =0x00000008 - mov r1, #2 - bl sub_02006590 - b _021D0E3A -_021D0E28: - ldr r0, _021D0F60 ; =0x00000007 - mov r1, #2 - bl sub_02006590 - b _021D0E3A -_021D0E32: - ldr r0, _021D0F64 ; =0x00000009 - mov r1, #2 - bl sub_02006590 -_021D0E3A: - ldr r2, [r4, #0x74] - mov r0, #3 - ldr r2, [r2, #4] - mov r1, #4 - bl sub_02017FC8 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021D0E50 - bl sub_02022974 -_021D0E50: - mov r0, #4 - mov r1, #0x28 - bl sub_02018144 - mov r1, #0 - mov r2, #0x28 - str r0, [r4, #4] - bl sub_020C4CF4 - add r0, r4, #0 - mov r1, #4 - mov r2, #8 - bl ov5_021D1A94 - ldr r1, [r4, #4] - str r0, [r1, #4] - bl ov5_021D1414 - mov r0, #0x80 - mov r1, #4 - bl sub_0201DBEC - mov r0, #4 - add r1, r0, #0 - bl sub_02020B90 - mov r0, #4 - bl sub_0201CAF4 - bl ov5_021D15B4 - bl ov5_021D154C - bl sub_0201FFE8 - mov r0, #4 - bl sub_02018340 - str r0, [r4, #8] - bl ov5_021D1444 - mov r0, #0 - mov r1, #1 - bl sub_0205D8CC - add r0, r4, #0 - mov r1, #4 - bl sub_0203F5C0 - b _021D0F44 -_021D0EB4: - bl ov5_021D1790 - ldr r0, [r4, #0x30] - bl ov5_021EF7A0 - mov r0, #4 - bl ov5_021E15F4 - add r1, r4, #0 - add r1, #0xa4 - str r0, [r1, #0] - add r0, r4, #0 - bl ov5_021F0824 - add r0, r4, #0 - bl ov5_021D17EC - add r0, r4, #0 - bl ov5_021D1878 - add r0, r4, #0 - bl ov5_021D1968 - ldr r0, [r4, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - beq _021D0EFE - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A74C - add r1, r0, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #0xc] - bl ov5_021D5F24 -_021D0EFE: - ldr r1, [r4, #0x1c] - add r0, r4, #0 - ldr r1, [r1, #0] - bl sub_020556A0 - add r0, r4, #0 - mov r1, #3 - bl sub_0203F5C0 - mov r0, #4 - bl ov5_021EF3A8 - ldr r1, [r4, #4] - str r0, [r1, #0x1c] - ldr r0, [r4, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r4, #4] - mov r0, #4 - ldr r1, [r1, #0x1c] - bl ov5_021EF4BC - ldr r1, [r4, #4] - str r0, [r1, #0x20] - b _021D0F44 -_021D0F32: - bl ov5_021D5BD8 - b _021D0F44 -_021D0F38: - bl ov5_021D5BF4 - cmp r0, #0 - beq _021D0F44 - mov r6, #1 - str r6, [r4, #0x68] -_021D0F44: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - add r0, r6, #0 - pop {r4, r5, r6, pc} - nop -_021D0F50: .word 0x04000050 -_021D0F54: .word 0x04001050 -_021D0F58: .word 0x00000006 -_021D0F5C: .word 0x00000008 -_021D0F60: .word 0x00000007 -_021D0F64: .word 0x00000009 - thumb_func_end ov5_021D0DA4 - - thumb_func_start ov5_021D0F68 -ov5_021D0F68: ; 0x021D0F68 - push {r4, lr} - bl sub_02006840 - add r4, r0, #0 - bl ov5_021D119C - cmp r0, #0 - beq _021D0F94 - add r0, r4, #0 - bl sub_02055D94 - add r0, r4, #0 - bl ov5_021D13B4 - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov5_021EA714 - add r0, r4, #0 - bl ov5_021D11CC -_021D0F94: - add r1, r4, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r0, r4, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov5_021D134C - ldr r0, [r4, #0x68] - cmp r0, #0 - beq _021D0FAE - mov r0, #0 - pop {r4, pc} -_021D0FAE: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D0F68 - - thumb_func_start ov5_021D0FB4 -ov5_021D0FB4: ; 0x021D0FB4 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_02006840 - add r4, r0, #0 - ldr r1, [r4, #0x28] - bl ov5_021E8188 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D0FD6 - cmp r0, #1 - beq _021D1076 - cmp r0, #2 - bne _021D0FD4 - b _021D10FE -_021D0FD4: - b _021D1164 -_021D0FD6: - add r0, r4, #0 - bl sub_02068368 - ldr r0, [r4, #0x28] - bl ov5_021E9338 - ldr r0, [r4, #0x3c] - bl sub_0205EABC - ldr r1, [r4, #0x1c] - str r0, [r1, #8] - ldr r0, [r4, #0x3c] - bl sub_0205EAC8 - ldr r1, [r4, #0x1c] - str r0, [r1, #0xc] - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - ldr r1, [r4, #0x1c] - str r0, [r1, #0x10] - add r0, r4, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - bl ov5_021EF300 - ldr r0, [r4, #0x50] - cmp r0, #0 - bne _021D1014 - bl sub_02022974 -_021D1014: - ldr r0, [r4, #0x28] - bl ov5_021E924C - ldr r0, [r4, #0x50] - bl ov5_021D3CAC - ldr r0, [r4, #0x50] - bl ov5_021D3D7C - add r0, r4, #0 - add r0, #0x54 - bl ov5_021D41B4 - ldr r0, [r4, #4] - ldr r0, [r0, #0x10] - bl ov5_021D5E8C - ldr r0, [r4, #4] - ldr r0, [r0, #0x10] - bl ov5_021D5EAC - ldr r0, [r4, #4] - mov r1, #0 - str r1, [r0, #0x10] - ldr r0, [r4, #0x38] - bl sub_02061BF0 - ldr r0, [r4, #0x38] - bl ov5_021ECC78 - ldr r0, [r4, #0x38] - bl sub_02062C30 - ldr r0, [r4, #0x40] - bl ov5_021DF500 - ldr r0, [r4, #0x34] - bl ov5_021D1A70 - mov r0, #0 - str r0, [r4, #0x34] - add r4, #0xa4 - ldr r0, [r4, #0] - bl ov5_021E1608 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D1164 -_021D1076: - ldr r0, [r4, #0x28] - bl ov5_021E9300 - cmp r0, #1 - bne _021D1164 - add r0, r4, #0 - add r0, #0x30 - bl ov5_021EFA10 - ldr r0, [r4, #0x28] - bl ov5_021E92E4 - add r0, r4, #0 - add r0, #0xa8 - bl ov5_021EFB30 - add r0, r4, #0 - bl ov5_021D5BA8 - add r0, r4, #0 - add r0, #0x4c - bl ov5_021D5278 - ldr r0, [r4, #0x64] - bl ov5_021E1B20 - ldr r0, [r4, #4] - ldr r0, [r0, #8] - bl ov5_021DD9C8 - ldr r0, [r4, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - beq _021D10BE - bl ov5_021D5EF8 -_021D10BE: - ldr r0, [r4, #4] - ldr r0, [r0, #0x20] - bl ov5_021EF4F8 - ldr r0, [r4, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3BC - ldr r0, [r4, #4] - ldr r0, [r0, #0x18] - bl sub_02055CBC - add r0, r4, #0 - add r0, #0x48 - bl ov5_021D57D8 - add r0, r4, #0 - add r0, #0x44 - bl ov5_021D5894 - bl ov5_021D1570 - ldr r0, [r4, #8] - bl ov5_021D1524 - add r0, r4, #0 - bl ov5_021D5C14 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D1164 -_021D10FE: - add r0, r4, #0 - bl ov5_021D5C30 - cmp r0, #0 - beq _021D1164 - bl ov5_021D15E8 - bl sub_02020BD0 - bl sub_0201DC3C - bl sub_0201CBA0 - ldr r0, [r4, #4] - ldr r0, [r0, #4] - bl ov5_021D1AE4 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - ldr r0, [r4, #8] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] - mov r0, #4 - bl sub_0201807C - ldr r0, [r4, #0x74] - ldr r0, [r0, #0] - lsl r0, r0, #8 - lsr r0, r0, #0x1c - beq _021D1160 - ldr r0, _021D1168 ; =0x00000006 - bl sub_02006514 - ldr r0, _021D116C ; =0x00000008 - bl sub_02006514 - ldr r0, _021D1170 ; =0x00000007 - bl sub_02006514 - ldr r0, _021D1174 ; =0x00000009 - bl sub_02006514 -_021D1160: - mov r0, #1 - pop {r3, r4, r5, pc} -_021D1164: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1168: .word 0x00000006 -_021D116C: .word 0x00000008 -_021D1170: .word 0x00000007 -_021D1174: .word 0x00000009 - thumb_func_end ov5_021D0FB4 - - thumb_func_start ov5_021D1178 -ov5_021D1178: ; 0x021D1178 - push {r3, lr} - bl sub_0203D174 - bl sub_02027860 - bl sub_02027F80 - cmp r0, #0 - bne _021D118E - mov r0, #1 - pop {r3, pc} -_021D118E: - cmp r0, #9 - bne _021D1196 - mov r0, #2 - pop {r3, pc} -_021D1196: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D1178 - - thumb_func_start ov5_021D119C -ov5_021D119C: ; 0x021D119C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - ldr r2, [r5, #0x1c] - ldr r1, [r2, #8] - cmp r4, r1 - bne _021D11BC - ldr r1, [r2, #0xc] - cmp r0, r1 - beq _021D11C6 -_021D11BC: - str r4, [r2, #8] - ldr r1, [r5, #0x1c] - str r0, [r1, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D11C6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D119C - - thumb_func_start ov5_021D11CC -ov5_021D11CC: ; 0x021D11CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D11E0 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D11E0: - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #0x28] - bl ov5_021EA6AC - sub r1, r4, r0 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r6, r0, #5 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r4, r0, #0 - ldr r0, [r5, #0x28] - bl ov5_021EA6B4 - sub r1, r4, r0 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r2, r0, #5 - ldr r0, [r5, #0x2c] - add r1, r6, #0 - bl sub_02039E30 - add r4, r0, #0 - ldr r0, [r5, #0x1c] - ldr r6, [r0, #0] - cmp r4, r6 - bne _021D1228 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D1228: - ldr r0, [r5, #0xc] - bl sub_0203A790 - add r7, r0, #0 - ldr r0, [r5, #0x1c] - add r1, r4, #0 - str r4, [r0, #0] - add r0, r5, #0 - bl sub_0203A3B0 - add r0, r5, #0 - mov r1, #1 - bl sub_020531C0 - add r0, r5, #0 - bl sub_0203A4B4 - str r0, [sp, #4] - add r0, r5, #0 - bl sub_0203A4BC - str r0, [sp] - ldr r0, [r5, #0x38] - ldr r3, [sp, #4] - add r1, r6, #0 - add r2, r4, #0 - bl sub_0206184C - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - bl sub_02069434 - ldr r1, [r5, #0x1c] - add r0, r5, #0 - ldr r1, [r1, #0] - bl sub_02055428 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #1 - bl sub_02055554 - add r0, r5, #0 - bl sub_0203A418 - ldr r0, [r5, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - beq _021D129C - add r0, r7, #0 - bl sub_0203A74C - add r1, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0xc] - bl ov5_021D5F7C -_021D129C: - add r0, r6, #0 - bl sub_0203A138 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0203A138 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0203A154 - add r2, r0, #0 - cmp r7, r6 - beq _021D12C8 - cmp r2, #0 - beq _021D12BE - sub r2, r2, #1 -_021D12BE: - ldr r0, [r5, #4] - add r1, r6, #0 - ldr r0, [r0, #8] - bl ov5_021DD9E8 -_021D12C8: - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D11CC - - thumb_func_start ov5_021D12D0 -ov5_021D12D0: ; 0x021D12D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x1c] - add r4, r1, #0 - ldr r6, [r0, #0] - ldr r0, [r5, #0xc] - bl sub_0203A790 - add r7, r0, #0 - ldr r0, [r5, #0x1c] - add r1, r4, #0 - str r4, [r0, #0] - add r0, r5, #0 - bl sub_0203A3B0 - add r0, r5, #0 - mov r1, #1 - bl sub_020532A8 - add r0, r5, #0 - bl sub_0203A4B4 - str r0, [sp, #4] - add r0, r5, #0 - bl sub_0203A4BC - str r0, [sp] - ldr r0, [r5, #0x38] - ldr r3, [sp, #4] - add r1, r6, #0 - add r2, r4, #0 - bl sub_0206184C - ldr r1, [r5, #0x1c] - add r0, r5, #0 - ldr r1, [r1, #0] - bl sub_02055428 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #1 - bl sub_02055554 - add r0, r5, #0 - bl sub_0203A418 - ldr r0, [r5, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - beq _021D1346 - add r0, r7, #0 - bl sub_0203A74C - add r1, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0xc] - bl ov5_021D5F7C -_021D1346: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D12D0 - - thumb_func_start ov5_021D134C -ov5_021D134C: ; 0x021D134C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020509A4 - cmp r0, #0 - bne _021D1360 - add r0, r5, #0 - bl sub_020559DC -_021D1360: - ldr r0, [r5, #0x4c] - bl ov5_021D5298 - add r0, r5, #0 - bl ov5_021E1B68 - mov r0, #1 - tst r0, r4 - beq _021D137A - ldr r0, [r5, #4] - ldr r0, [r0, #0x10] - bl ov5_021D5DEC -_021D137A: - mov r0, #8 - tst r0, r4 - beq _021D1386 - ldr r0, [r5, #0x50] - bl ov5_021D3F10 -_021D1386: - mov r0, #2 - tst r0, r4 - beq _021D13A4 - ldr r1, [r5, #0x28] - add r0, r5, #0 - bl ov5_021E8188 - add r0, r5, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D13A4 - add r0, r5, #0 - bl ov9_0224CA5C -_021D13A4: - mov r0, #4 - tst r0, r4 - beq _021D13B0 - add r0, r5, #0 - bl ov5_021D15F4 -_021D13B0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D134C - - thumb_func_start ov5_021D13B4 -ov5_021D13B4: ; 0x021D13B4 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A24C - cmp r0, #0 - beq _021D1412 - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A76C - add r7, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0205EABC - add r5, r0, #0 - ldr r0, [r4, #0x28] - bl ov5_021EA6AC - sub r1, r5, r0 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r6, r0, #5 - ldr r0, [r4, #0x3c] - bl sub_0205EAC8 - add r5, r0, #0 - ldr r0, [r4, #0x28] - bl ov5_021EA6B4 - sub r1, r5, r0 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r5, r0, #5 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r3, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - bl sub_02055740 -_021D1412: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D13B4 - - thumb_func_start ov5_021D1414 -ov5_021D1414: ; 0x021D1414 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D1430 ; =0x021F8988 - add r3, sp, #0 - mov r2, #5 -_021D141E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D141E - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D1430: .word 0x021F8988 - thumb_func_end ov5_021D1414 - - thumb_func_start ov5_021D1434 -ov5_021D1434: ; 0x021D1434 - ldr r3, _021D1438 ; =ov5_021D1444 - bx r3 - ; .align 2, 0 -_021D1438: .word ov5_021D1444 - thumb_func_end ov5_021D1434 - - thumb_func_start ov5_021D143C -ov5_021D143C: ; 0x021D143C - ldr r3, _021D1440 ; =ov5_021D1524 - bx r3 - ; .align 2, 0 -_021D1440: .word ov5_021D1524 - thumb_func_end ov5_021D143C - - thumb_func_start ov5_021D1444 -ov5_021D1444: ; 0x021D1444 - push {r3, r4, r5, lr} - sub sp, #0x68 - ldr r5, _021D1514 ; =0x021F8924 - add r3, sp, #0x58 - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D1518 ; =0x021F8950 - add r3, sp, #0x3c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - ldr r5, _021D151C ; =0x021F8934 - add r3, sp, #0x20 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - ldr r5, _021D1520 ; =0x021F896C - add r3, sp, #4 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r0, #0 - add r1, sp, #0 - strh r0, [r1] - mov r1, #2 - bl sub_020C2C54 - add r0, sp, #0 - mov r1, #0 - mov r2, #2 - bl sub_020C00B4 - add sp, #0x68 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1514: .word 0x021F8924 -_021D1518: .word 0x021F8950 -_021D151C: .word 0x021F8934 -_021D1520: .word 0x021F896C - thumb_func_end ov5_021D1444 - - thumb_func_start ov5_021D1524 -ov5_021D1524: ; 0x021D1524 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xf - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #3 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D1524 - - thumb_func_start ov5_021D154C -ov5_021D154C: ; 0x021D154C - push {lr} - sub sp, #0x14 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7c - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x1f - str r3, [sp, #0xc] - mov r2, #4 - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - add sp, #0x14 - pop {pc} - thumb_func_end ov5_021D154C - - thumb_func_start ov5_021D1570 -ov5_021D1570: ; 0x021D1570 - ldr r3, _021D1574 ; =sub_0200A878 - bx r3 - ; .align 2, 0 -_021D1574: .word sub_0200A878 - thumb_func_end ov5_021D1570 - - thumb_func_start ov5_021D1578 -ov5_021D1578: ; 0x021D1578 - push {r4, lr} - mov r1, #0 - add r4, r0, #0 - add r2, r1, #0 - bl ov5_021D5ADC - add r0, r4, #0 - mov r1, #2 - mov r2, #0 - bl ov5_021D5AF0 - add r0, r4, #0 - mov r1, #0x1f - mov r2, #0 - bl ov5_021D5B04 - mov r1, #2 - add r0, r4, #0 - lsl r1, r1, #0xe - mov r2, #1 - mov r3, #0 - bl ov5_021D5B18 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0x16 - bl ov5_021D58A8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D1578 - - thumb_func_start ov5_021D15B4 -ov5_021D15B4: ; 0x021D15B4 - push {r4, lr} - sub sp, #0x10 - ldr r4, _021D15E4 ; =0x021F8914 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #0x10 - add r0, r2, #0 - add r2, r1, #0 - bl sub_0201E88C - mov r0, #0x14 - mov r1, #4 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_021D15E4: .word 0x021F8914 - thumb_func_end ov5_021D15B4 - - thumb_func_start ov5_021D15E8 -ov5_021D15E8: ; 0x021D15E8 - push {r3, lr} - bl sub_0201E958 - bl sub_0201F8B4 - pop {r3, pc} - thumb_func_end ov5_021D15E8 - - thumb_func_start ov5_021D15F4 -ov5_021D15F4: ; 0x021D15F4 - push {r3, r4, r5, lr} - sub sp, #0x80 - add r4, r0, #0 - bl sub_020241B4 - ldr r0, [r4, #0x20] - cmp r0, #1 - bne _021D161A - add r0, r4, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D1614 - add r0, r4, #0 - bl ov9_02249F9C -_021D1614: - bl sub_0202049C - b _021D161E -_021D161A: - bl sub_020203EC -_021D161E: - add r0, r4, #0 - bl sub_0206979C - ldr r0, [r4, #0x28] - ldr r1, [r4, #0x44] - bl ov5_021E91FC - add r0, r4, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D163C - add r0, r4, #0 - bl ov9_0224CA50 -_021D163C: - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r4, #0x30] - bl ov5_021E1A6C - ldr r5, _021D16E8 ; =0x021C5A94 - add r3, sp, #0x40 - mov r2, #8 -_021D164E: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D164E - add r5, sp, #0x40 - add r3, sp, #0 - mov r2, #8 -_021D165C: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D165C - ldr r3, [sp, #0x28] - ldr r1, [sp, #0x38] - asr r0, r3, #0x1f - lsr r2, r3, #0x12 - lsl r0, r0, #0xe - orr r0, r2 - mov r2, #2 - lsl r5, r3, #0xe - mov r3, #0 - lsl r2, r2, #0xa - add r2, r5, r2 - adc r0, r3 - lsl r0, r0, #0x14 - lsr r2, r2, #0xc - orr r2, r0 - add r0, r1, r2 - str r0, [sp, #0x38] - ldr r1, _021D16E8 ; =0x021C5A94 - add r0, sp, #0 - mov r2, #0x40 - bl sub_020C4C14 - ldr r1, _021D16EC ; =0x021C5B0C - mov r0, #0x50 - ldr r2, [r1, #0x7c] - bic r2, r0 - str r2, [r1, #0x7c] - bl sub_020AF480 - ldr r0, [r4, #0x40] - bl ov5_021DF4F8 - bl sub_02020C08 - add r0, r4, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D16B8 - add r0, r4, #0 - bl ov9_02250780 -_021D16B8: - ldr r1, _021D16E8 ; =0x021C5A94 - add r0, sp, #0x40 - mov r2, #0x40 - bl sub_020C4C14 - ldr r1, _021D16EC ; =0x021C5B0C - mov r0, #0x50 - ldr r2, [r1, #0x7c] - bic r2, r0 - str r2, [r1, #0x7c] - bl sub_020AF480 - ldr r0, [r4, #4] - ldr r0, [r0, #4] - bl ov5_021D1B18 - ldr r1, _021D16F0 ; =0x02100844 - mov r0, #0 - ldr r1, [r1, #0] - bl sub_020241BC - add sp, #0x80 - pop {r3, r4, r5, pc} - nop -_021D16E8: .word 0x021C5A94 -_021D16EC: .word 0x021C5B0C -_021D16F0: .word 0x02100844 - thumb_func_end ov5_021D15F4 - - thumb_func_start ov5_021D16F4 -ov5_021D16F4: ; 0x021D16F4 - cmp r1, #1 - bne _021D1708 - add r1, r0, #0 - add r1, #0xc0 - ldr r2, [r1, #0] - mov r1, #4 - orr r1, r2 - add r0, #0xc0 - str r1, [r0, #0] - bx lr -_021D1708: - add r1, r0, #0 - add r1, #0xc0 - ldr r2, [r1, #0] - mov r1, #4 - bic r2, r1 - add r0, #0xc0 - str r2, [r0, #0] - bx lr - thumb_func_end ov5_021D16F4 - - thumb_func_start ov5_021D1718 -ov5_021D1718: ; 0x021D1718 - cmp r1, #1 - bne _021D172C - add r1, r0, #0 - add r1, #0xc0 - ldr r2, [r1, #0] - mov r1, #1 - orr r1, r2 - add r0, #0xc0 - str r1, [r0, #0] - bx lr -_021D172C: - add r1, r0, #0 - add r1, #0xc0 - ldr r2, [r1, #0] - mov r1, #1 - bic r2, r1 - add r0, #0xc0 - str r2, [r0, #0] - bx lr - thumb_func_end ov5_021D1718 - - thumb_func_start ov5_021D173C -ov5_021D173C: ; 0x021D173C - mov r1, #0xf - add r0, #0xc0 - str r1, [r0, #0] - bx lr - thumb_func_end ov5_021D173C - - thumb_func_start ov5_021D1744 -ov5_021D1744: ; 0x021D1744 - push {lr} - sub sp, #0xc - cmp r0, #1 - bne _021D1766 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} -_021D1766: - cmp r0, #0 - bne _021D1786 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} -_021D1786: - bl sub_02022974 - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov5_021D1744 - - thumb_func_start ov5_021D1790 -ov5_021D1790: ; 0x021D1790 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _021D17E4 ; =0x02100844 - ldr r0, [r0, #0] - lsl r1, r0, #1 - ldr r0, _021D17E8 ; =0x04000540 - str r1, [r0, #0] - bl ov5_021D38B8 - str r0, [r5, #0x50] - bl ov5_021D4194 - str r0, [r5, #0x54] - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A038 - ldr r1, [r5, #0x50] - bl ov5_021EF76C - str r0, [r5, #0x30] - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A04C - add r4, r0, #0 - ldr r0, [r5, #0x34] - cmp r0, #0 - beq _021D17D6 - bl sub_02022974 -_021D17D6: - mov r0, #4 - add r1, r4, #0 - bl ov5_021D1A14 - str r0, [r5, #0x34] - pop {r3, r4, r5, pc} - nop -_021D17E4: .word 0x02100844 -_021D17E8: .word 0x04000540 - thumb_func_end ov5_021D1790 - - thumb_func_start ov5_021D17EC -ov5_021D17EC: ; 0x021D17EC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x2c] - ldr r1, [r4, #0x30] - ldr r2, [r4, #0x50] - ldr r3, [r4, #0x60] - bl ov5_021E9084 - str r0, [r4, #0x28] - add r0, r4, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D183C - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #4] - str r0, [sp] - ldr r0, [r4, #0x1c] - add r1, sp, #8 - ldr r0, [r0, #0] - add r2, sp, #4 - add r3, sp, #0 - bl ov9_02251094 - ldr r0, [r4, #0x28] - ldr r1, [sp, #8] - ldr r2, [sp, #4] - ldr r3, [sp] - bl ov5_021EA678 - ldr r0, [r4, #0x28] - mov r1, #1 - bl ov5_021EA6A4 - ldr r0, [r4, #0x28] - mov r1, #1 - bl ov5_021EA6D0 -_021D183C: - mov r0, #8 - mov r1, #4 - bl ov5_021EF28C - add r1, r4, #0 - add r1, #0xa0 - str r0, [r1, #0] - bl ov5_021EFB0C - add r1, r4, #0 - add r1, #0xa8 - str r0, [r1, #0] - ldr r0, [r4, #0x70] - cmp r0, #0 - bne _021D1864 - ldr r0, [r4, #0x28] - ldr r1, _021D1874 ; =ov5_021F0030 - add r2, r4, #0 - bl ov5_021E9630 -_021D1864: - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0x28] - ldr r1, [r2, #8] - ldr r2, [r2, #0xc] - bl ov5_021E9150 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021D1874: .word ov5_021F0030 - thumb_func_end ov5_021D17EC - - thumb_func_start ov5_021D1878 -ov5_021D1878: ; 0x021D1878 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r1, #0x22 - mov r2, #4 - bl ov5_021DF440 - str r0, [r5, #0x40] - add r0, r5, #0 - mov r4, #0x50 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D1896 - mov r4, #0x70 -_021D1896: - ldr r0, [r5, #0x40] - add r1, r4, #0 - bl ov5_021DF47C - mov r2, #0x20 - str r2, [sp] - mov r0, #5 - str r2, [sp, #4] - lsl r0, r0, #0xc - str r0, [sp, #8] - lsl r0, r2, #6 - str r0, [sp, #0xc] - lsl r0, r2, #0xb - str r0, [sp, #0x10] - ldr r0, [r5, #0x40] - mov r1, #4 - add r3, r2, #0 - bl ov5_021DF488 - ldr r0, [r5, #0x70] - sub r0, r0, #1 - cmp r0, #1 - bhi _021D18CC - ldr r0, [r5, #0x38] - mov r1, #0 - bl sub_02062CCC -_021D18CC: - ldr r0, [r5, #0x70] - cmp r0, #1 - bne _021D18D6 - ldr r1, _021D195C ; =0x021FF7D0 - b _021D18E6 -_021D18D6: - add r0, r5, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D18E4 - ldr r1, _021D1960 ; =0x021FF6B8 - b _021D18E6 -_021D18E4: - ldr r1, _021D1964 ; =0x021FF744 -_021D18E6: - ldr r0, [r5, #0x40] - bl ov5_021DF4C8 - ldr r0, [r5, #0x70] - mov r4, #0xa - cmp r0, #2 - bne _021D18F6 - mov r4, #5 -_021D18F6: - ldr r0, [r5, #0x34] - bl ov5_021D1A6C - add r6, r0, #0 - ldr r0, [r5, #0x34] - bl ov5_021D1A68 - str r4, [sp] - add r3, r0, #0 - ldr r0, [r5, #0x38] - mov r1, #0x20 - add r2, r6, #3 - bl ov5_021ECC20 - ldr r0, [r5, #0x40] - bl ov5_021F1328 - add r0, r5, #0 - bl sub_0203D174 - bl sub_02027860 - bl sub_02027F80 - add r1, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205E884 - ldr r0, [r5, #0x38] - bl sub_02061C48 - bl sub_020595A4 - ldr r0, [r5, #0x38] - bl sub_02062C3C - ldr r0, [r5, #0x3c] - bl sub_0205EAFC - ldr r1, [r5, #0x28] - bl ov5_021E931C - add r0, r5, #0 - mov r1, #4 - bl sub_02055C8C - ldr r1, [r5, #4] - str r0, [r1, #0x18] - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_021D195C: .word 0x021FF7D0 -_021D1960: .word 0x021FF6B8 -_021D1964: .word 0x021FF744 - thumb_func_end ov5_021D1878 - - thumb_func_start ov5_021D1968 -ov5_021D1968: ; 0x021D1968 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - bl sub_0201FFD0 - bl ov5_021D5878 - str r0, [r4, #0x44] - bl ov5_021D1578 - bl ov5_021D57BC - str r0, [r4, #0x48] - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A770 - add r5, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0205EAFC - add r1, r4, #0 - add r2, r5, #0 - mov r3, #1 - bl ov5_021D5B40 - ldr r0, [r4, #0x30] - bl ov5_021EFAD8 - add r1, r0, #0 - ldr r0, [r4, #0x44] - bl ov5_021D521C - str r0, [r4, #0x4c] - add r0, r4, #0 - bl ov5_021D1A78 - cmp r0, #1 - bne _021D19C6 - ldr r0, [r4, #4] - mov r1, #0 - str r1, [r0, #0xc] - b _021D19D0 -_021D19C6: - add r0, r4, #0 - bl ov5_021D5EB8 - ldr r1, [r4, #4] - str r0, [r1, #0xc] -_021D19D0: - ldr r0, [r4, #8] - bl ov5_021DD98C - ldr r1, [r4, #4] - str r0, [r1, #8] - mov r0, #4 - bl ov5_021E1B08 - str r0, [r4, #0x64] - bl ov5_021D5CB0 - ldr r1, [r4, #4] - str r0, [r1, #0x10] - ldr r0, [r4, #0x30] - bl ov5_021EFA8C - add r1, r0, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #0x10] - bl ov5_021D5CE4 - add r0, r4, #0 - bl sub_02068344 - add r0, r4, #0 - bl ov5_021EE7C0 - ldr r0, _021D1A10 ; =ov5_021D0D80 - add r1, r4, #0 - bl sub_02017798 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D1A10: .word ov5_021D0D80 - thumb_func_end ov5_021D1968 - - thumb_func_start ov5_021D1A14 -ov5_021D1A14: ; 0x021D1A14 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - mov r1, #0x64 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0x60 - add r1, r6, #0 - add r2, r5, #0 - bl sub_02006ADC - ldr r1, _021D1A64 ; =0x0000FFFF - mov r2, #0 - add r3, r4, #0 -_021D1A32: - add r2, r2, #1 - str r1, [r3, #4] - add r3, r3, #4 - cmp r2, #0x18 - blt _021D1A32 - ldr r5, _021D1A64 ; =0x0000FFFF - mov r3, #0 - add r1, r0, #0 - add r2, r4, #0 -_021D1A44: - ldrh r6, [r1] - str r6, [r2, #4] - ldrh r6, [r1] - cmp r6, r5 - beq _021D1A58 - add r3, r3, #1 - add r1, r1, #2 - add r2, r2, #4 - cmp r3, #0x18 - blt _021D1A44 -_021D1A58: - strh r3, [r4] - bl sub_020181C4 - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_021D1A64: .word 0x0000FFFF - thumb_func_end ov5_021D1A14 - - thumb_func_start ov5_021D1A68 -ov5_021D1A68: ; 0x021D1A68 - add r0, r0, #4 - bx lr - thumb_func_end ov5_021D1A68 - - thumb_func_start ov5_021D1A6C -ov5_021D1A6C: ; 0x021D1A6C - ldrh r0, [r0] - bx lr - thumb_func_end ov5_021D1A6C - - thumb_func_start ov5_021D1A70 -ov5_021D1A70: ; 0x021D1A70 - ldr r3, _021D1A74 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021D1A74: .word sub_020181C4 - thumb_func_end ov5_021D1A70 - - thumb_func_start ov5_021D1A78 -ov5_021D1A78: ; 0x021D1A78 - push {r3, lr} - bl sub_0203D174 - bl sub_02027860 - bl sub_02027F80 - cmp r0, #9 - bne _021D1A8E - mov r0, #1 - pop {r3, pc} -_021D1A8E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D1A78 - - thumb_func_start ov5_021D1A94 -ov5_021D1A94: ; 0x021D1A94 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #0x14 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r7, [r4, #0] - str r5, [r4, #4] - mov r0, #0x14 - add r7, r6, #0 - mul r7, r0 - str r6, [r4, #8] - add r0, r5, #0 - add r1, r7, #0 - bl sub_02018144 - str r0, [r4, #0xc] - ldr r1, [r4, #0xc] - mov r0, #0 - add r2, r7, #0 - bl sub_020C4B4C - add r0, r6, #0 - bl sub_0201CD80 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02018144 - str r0, [r4, #0x10] - ldr r1, [r4, #0x10] - add r0, r6, #0 - bl sub_0201CD88 - str r0, [r4, #0x10] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D1A94 - - thumb_func_start ov5_021D1AE4 -ov5_021D1AE4: ; 0x021D1AE4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - mov r6, #0 - cmp r0, #0 - ble _021D1B04 - add r4, r6, #0 -_021D1AF2: - ldr r0, [r5, #0xc] - add r0, r0, r4 - bl ov5_021D1BEC - ldr r0, [r5, #8] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _021D1AF2 -_021D1B04: - ldr r0, [r5, #0xc] - bl sub_020181C4 - ldr r0, [r5, #0x10] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D1AE4 - - thumb_func_start ov5_021D1B18 -ov5_021D1B18: ; 0x021D1B18 - ldr r3, _021D1B20 ; =sub_0201CDD4 - ldr r0, [r0, #0x10] - bx r3 - nop -_021D1B20: .word sub_0201CDD4 - thumb_func_end ov5_021D1B18 - - thumb_func_start ov5_021D1B24 -ov5_021D1B24: ; 0x021D1B24 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0203CD5C - cmp r0, #0 - beq _021D1B46 - ldr r0, [r4, #0xc] - ldr r3, [r0, #0x10] - cmp r3, #0 - beq _021D1B46 - ldr r1, [r4, #0] - ldr r2, [r4, #0x10] - ldr r1, [r1, #0] - add r0, r4, #0 - blx r3 -_021D1B46: - pop {r4, pc} - thumb_func_end ov5_021D1B24 - - thumb_func_start ov5_021D1B48 -ov5_021D1B48: ; 0x021D1B48 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0203CD5C - cmp r0, #0 - beq _021D1B6A - ldr r0, [r4, #0xc] - ldr r3, [r0, #0x14] - cmp r3, #0 - beq _021D1B6A - ldr r1, [r4, #0] - ldr r2, [r4, #0x10] - ldr r1, [r1, #0] - add r0, r4, #0 - blx r3 -_021D1B6A: - pop {r4, pc} - thumb_func_end ov5_021D1B48 - - thumb_func_start ov5_021D1B6C -ov5_021D1B6C: ; 0x021D1B6C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r2, [r5, #8] - add r6, r1, #0 - mov r1, #0 - ldr r4, [r5, #0xc] - cmp r2, #0 - ble _021D1BDC -_021D1B7C: - ldr r0, [r4, #4] - cmp r0, #0 - bne _021D1BD4 - ldr r0, _021D1BE4 ; =ov5_021D1B24 - ldr r2, [r6, #0] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - ldr r0, [r5, #0x10] - ldr r1, _021D1BE8 ; =ov5_021D1B48 - ldr r3, [r6, #0] - add r2, r4, #0 - bl sub_0201CE14 - str r0, [r4, #8] - str r5, [r4, #0] - str r6, [r4, #0xc] - ldr r0, [r4, #4] - cmp r0, #0 - bne _021D1BAA - bl sub_02022974 -_021D1BAA: - ldr r0, [r4, #8] - cmp r0, #0 - bne _021D1BB4 - bl sub_02022974 -_021D1BB4: - ldrh r1, [r6, #4] - cmp r1, #0 - beq _021D1BC2 - ldr r0, [r5, #4] - bl sub_02018144 - str r0, [r4, #0x10] -_021D1BC2: - ldr r3, [r6, #8] - cmp r3, #0 - beq _021D1BD0 - ldr r1, [r5, #0] - ldr r2, [r4, #0x10] - add r0, r4, #0 - blx r3 -_021D1BD0: - add r0, r4, #0 - pop {r4, r5, r6, pc} -_021D1BD4: - add r1, r1, #1 - add r4, #0x14 - cmp r1, r2 - blt _021D1B7C -_021D1BDC: - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D1BE4: .word ov5_021D1B24 -_021D1BE8: .word ov5_021D1B48 - thumb_func_end ov5_021D1B6C - - thumb_func_start ov5_021D1BEC -ov5_021D1BEC: ; 0x021D1BEC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - beq _021D1C2A - ldr r1, [r4, #0xc] - ldr r3, [r1, #0xc] - cmp r3, #0 - beq _021D1C06 - ldr r1, [r4, #0] - ldr r2, [r4, #0x10] - ldr r1, [r1, #0] - blx r3 -_021D1C06: - ldr r0, [r4, #0xc] - ldrh r0, [r0, #4] - cmp r0, #0 - beq _021D1C14 - ldr r0, [r4, #0x10] - bl sub_020181C4 -_021D1C14: - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, [r4, #8] - bl sub_0200DA58 - mov r0, #0 - add r1, r4, #0 - mov r2, #0x14 - bl sub_020C4B4C -_021D1C2A: - pop {r4, pc} - thumb_func_end ov5_021D1BEC - - thumb_func_start ov5_021D1C2C -ov5_021D1C2C: ; 0x021D1C2C - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov5_021D1C2C - - thumb_func_start ov5_021D1C30 -ov5_021D1C30: ; 0x021D1C30 - ldrh r2, [r0] - mov r1, #1 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #2 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #4 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #8 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #0x10 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #0x20 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #0x40 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - mov r1, #0x80 - bic r2, r1 - strh r2, [r0] - ldrh r2, [r0] - ldr r1, _021D1C9C ; =0xFFFFFEFF - and r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _021D1CA0 ; =0xFFFFFDFF - and r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _021D1CA4 ; =0xFFFFFBFF - and r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _021D1CA8 ; =0xFFFFF7FF - and r2, r1 - strh r2, [r0] - mov r2, #0xff - strb r2, [r0, #2] - asr r1, r1, #0xc - strb r1, [r0, #3] - bx lr - nop -_021D1C9C: .word 0xFFFFFEFF -_021D1CA0: .word 0xFFFFFDFF -_021D1CA4: .word 0xFFFFFBFF -_021D1CA8: .word 0xFFFFF7FF - thumb_func_end ov5_021D1C30 - - thumb_func_start ov5_021D1CAC -ov5_021D1CAC: ; 0x021D1CAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - add r4, r3, #0 - bl ov5_021D1C30 - ldr r0, [r7, #0x3c] - bl sub_0205EB14 - str r0, [sp, #4] - ldr r0, [r7, #0x3c] - bl sub_0205EB0C - str r0, [sp] - ldr r0, [r7, #0x3c] - bl sub_0205EA78 - add r2, r0, #0 - ldr r0, [sp, #4] - strh r6, [r5, #4] - strh r4, [r5, #6] - cmp r0, #3 - beq _021D1CE2 - cmp r0, #0 - bne _021D1D40 -_021D1CE2: - mov r0, #1 - lsl r0, r0, #0xa - tst r0, r6 - beq _021D1CF2 - ldrh r1, [r5] - mov r0, #4 - orr r0, r1 - strh r0, [r5] -_021D1CF2: - mov r0, #2 - lsl r0, r0, #0xa - tst r0, r6 - beq _021D1D02 - ldrh r1, [r5] - mov r0, #8 - orr r0, r1 - strh r0, [r5] -_021D1D02: - mov r3, #1 - add r0, r6, #0 - tst r0, r3 - beq _021D1D16 - ldrh r1, [r5] - mov r0, #1 - bic r1, r0 - add r0, r1, #0 - orr r0, r3 - strh r0, [r5] -_021D1D16: - mov r0, #2 - tst r0, r6 - beq _021D1D24 - ldrh r1, [r5] - mov r0, #0x80 - orr r0, r1 - strh r0, [r5] -_021D1D24: - mov r0, #0xf0 - add r3, r4, #0 - and r3, r0 - beq _021D1D34 - ldrh r1, [r5] - mov r0, #0x10 - orr r0, r1 - strh r0, [r5] -_021D1D34: - cmp r3, #0 - beq _021D1D40 - ldrh r1, [r5] - mov r0, #0x20 - orr r0, r1 - strh r0, [r5] -_021D1D40: - ldr r0, [sp, #4] - cmp r0, #3 - bne _021D1D54 - ldr r0, [sp] - cmp r0, #1 - bne _021D1D54 - ldrh r1, [r5] - mov r0, #0x40 - orr r0, r1 - strh r0, [r5] -_021D1D54: - ldr r0, [sp, #4] - cmp r0, #3 - bne _021D1D62 - ldrh r1, [r5] - mov r0, #2 - orr r0, r1 - strh r0, [r5] -_021D1D62: - cmp r2, #0 - bne _021D1D6C - mov r0, #0x40 - tst r0, r4 - bne _021D1D8A -_021D1D6C: - cmp r2, #1 - bne _021D1D76 - mov r0, #0x80 - tst r0, r4 - bne _021D1D8A -_021D1D76: - cmp r2, #2 - bne _021D1D80 - mov r0, #0x20 - tst r0, r4 - bne _021D1D8A -_021D1D80: - cmp r2, #3 - bne _021D1D8E - mov r0, #0x10 - tst r0, r4 - beq _021D1D8E -_021D1D8A: - strb r2, [r5, #3] - b _021D1D94 -_021D1D8E: - mov r0, #0 - mvn r0, r0 - strb r0, [r5, #3] -_021D1D94: - ldr r0, [r7, #0x3c] - add r1, r6, #0 - add r2, r4, #0 - bl sub_02061308 - strb r0, [r5, #2] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D1CAC - - thumb_func_start ov5_021D1DA4 -ov5_021D1DA4: ; 0x021D1DA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldrh r0, [r5] - add r4, r1, #0 - lsl r0, r0, #0x14 - lsr r0, r0, #0x1f - bne _021D1DC6 - add r0, r4, #0 - mov r1, #1 - bl sub_0203F5C0 - cmp r0, #1 - bne _021D1DC6 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1DC6: - ldrh r0, [r5] - lsl r0, r0, #0x14 - lsr r0, r0, #0x1f - bne _021D1E1E - ldr r0, [r4, #0xc] - bl sub_0207A268 - bl sub_02054AB0 - add r6, r0, #0 - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206A984 - cmp r0, #1 - bne _021D1DEA - mov r6, #1 -_021D1DEA: - add r0, r4, #0 - add r1, r6, #0 - bl sub_02067A84 - cmp r0, #1 - beq _021D1E0C - add r0, r4, #0 - mov r1, #2 - bl sub_02071CB4 - cmp r0, #1 - bne _021D1E1E - add r0, r4, #0 - bl ov8_0224C51C - cmp r0, #1 - bne _021D1E1E -_021D1E0C: - ldr r0, [r4, #0x3c] - bl sub_0205F56C - ldr r0, [r4, #0x38] - bl sub_02062C48 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1E1E: - ldrh r0, [r5] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - beq _021D1E40 - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206A9A4 - add r0, r4, #0 - bl ov5_021D2884 - cmp r0, #1 - bne _021D1E40 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1E40: - ldrh r0, [r5] - lsl r0, r0, #0x14 - lsr r0, r0, #0x1f - bne _021D1EAE - ldrh r1, [r5, #4] - ldrh r2, [r5, #6] - ldr r0, [r4, #0x3c] - mov r6, #0 - bl sub_02061308 - add r7, r0, #0 - ldr r0, [r4, #0xc] - bl sub_020507E4 - mov r1, #2 - bl sub_0206AEAC - cmp r0, #0 - beq _021D1E6A - mov r0, #1 - orr r6, r0 -_021D1E6A: - ldr r0, [r4, #0xc] - bl sub_0207A268 - mov r1, #0x7f - bl sub_020549A0 - cmp r0, #0xff - beq _021D1E7E - mov r0, #2 - orr r6, r0 -_021D1E7E: - add r0, r4, #0 - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - bne _021D1E98 - add r0, r4, #0 - bl ov9_02250F74 - cmp r0, #1 - bne _021D1E98 - mov r0, #4 - orr r6, r0 -_021D1E98: - ldr r1, [r4, #0x3c] - add r0, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov5_021DFDE0 - cmp r0, #1 - bne _021D1EAE - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1EAE: - ldrh r0, [r5] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - beq _021D1F04 - add r0, r4, #0 - bl ov5_021D249C - cmp r0, #0 - beq _021D1EC6 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1EC6: - add r0, r4, #0 - bl ov5_021D20DC - cmp r0, #1 - bne _021D1ED6 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1ED6: - add r0, r4, #0 - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - bne _021D1F04 - mov r0, #2 - ldrsb r1, [r5, r0] - sub r0, r0, #3 - cmp r1, r0 - bne _021D1EF4 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r1, r0, #0 -_021D1EF4: - add r0, r4, #0 - bl ov9_0224A67C - cmp r0, #1 - bne _021D1F04 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1F04: - ldrh r0, [r5] - lsl r0, r0, #0x1b - lsr r0, r0, #0x1f - beq _021D1F28 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - ldrb r1, [r5, #2] - cmp r1, r0 - bne _021D1F28 - add r0, r4, #0 - bl ov5_021D20DC - cmp r0, #1 - bne _021D1F28 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1F28: - ldrh r0, [r5] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _021D1F32 - b _021D2058 -_021D1F32: - add r0, r4, #0 - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - add r1, sp, #0xc - bne _021D1F48 - add r0, r4, #0 - bl ov5_021D2EA4 - b _021D1F4E -_021D1F48: - add r0, r4, #0 - bl sub_0203CA40 -_021D1F4E: - cmp r0, #1 - ldr r0, [r4, #0x3c] - bne _021D1F9C - bl sub_0205F588 - cmp r0, #1 - bne _021D1F6A - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0205F5E4 -_021D1F6A: - ldr r0, [sp, #0xc] - bl sub_02062950 - cmp r0, #9 - beq _021D1F8C - ldr r5, [sp, #0xc] - add r0, r5, #0 - bl sub_02062960 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - add r2, r5, #0 - bl sub_0203E880 - b _021D1F96 -_021D1F8C: - ldr r2, [sp, #0xc] - add r0, r4, #0 - mov r1, #0 - bl sub_0203E880 -_021D1F96: - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1F9C: - bl sub_0205F108 - add r6, r0, #0 - cmp r6, #1 - bhi _021D1FD8 - add r0, r4, #0 - bl sub_0203A440 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0203A448 - add r2, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl sub_0203CA6C - add r1, r0, #0 - ldr r0, _021D20D4 ; =0x0000FFFF - cmp r1, r0 - beq _021D1FD8 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1FD8: - cmp r6, #0 - bne _021D1FFC - add r0, r4, #0 - add r1, sp, #8 - bl ov5_021EFB40 - cmp r0, #0 - beq _021D1FFC - ldr r1, [sp, #8] - add r0, r4, #0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D1FFC: - ldr r0, [r4, #0x3c] - bl sub_0205EAA0 - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_020616F0 - add r1, r0, #0 - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl ov5_021D271C - add r1, r0, #0 - ldr r0, _021D20D4 ; =0x0000FFFF - cmp r1, r0 - beq _021D2030 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2030: - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r6, r0, #0 - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov5_021D2C98 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - add r3, r6, #0 - bl ov5_021F8410 - cmp r0, #1 - bne _021D2058 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2058: - ldrh r0, [r5] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - beq _021D2090 - add r0, r4, #0 - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - bne _021D2078 - mov r1, #3 - ldrsb r1, [r5, r1] - add r0, r4, #0 - bl ov9_0224A800 - b _021D2090 -_021D2078: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D2504 - cmp r0, #1 - bne _021D2090 - add r0, r4, #0 - bl ov5_021D2E14 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2090: - ldrh r0, [r5] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _021D20A8 - add r0, r4, #0 - bl sub_02069238 - cmp r0, #1 - bne _021D20A8 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D20A8: - ldrh r0, [r5] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _021D20CC - add r0, r4, #0 - bl sub_0203A9C8 - cmp r0, #1 - bne _021D20CC - ldr r0, _021D20D8 ; =0x000005FD - bl sub_02005748 - add r0, r4, #0 - bl sub_0203A9E0 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D20CC: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D20D4: .word 0x0000FFFF -_021D20D8: .word 0x000005FD - thumb_func_end ov5_021D1DA4 - - thumb_func_start ov5_021D20DC -ov5_021D20DC: ; 0x021D20DC - push {r3, r4, r5, lr} - add r1, sp, #0 - add r5, r0, #0 - bl sub_0203CBE0 - cmp r0, #1 - bne _021D2104 - ldr r4, [sp] - add r0, r4, #0 - bl sub_02062960 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - add r2, r4, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2104: - add r0, r5, #0 - bl sub_0203A440 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0203A448 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0203CB80 - add r1, r0, #0 - ldr r0, _021D2138 ; =0x0000FFFF - cmp r1, r0 - beq _021D2134 - lsl r1, r1, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2134: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D2138: .word 0x0000FFFF - thumb_func_end ov5_021D20DC - - thumb_func_start ov5_021D213C -ov5_021D213C: ; 0x021D213C - push {r4, lr} - add r4, r0, #0 - ldrh r0, [r4] - lsl r0, r0, #0x14 - lsr r0, r0, #0x1f - bne _021D2158 - add r0, r1, #0 - mov r1, #1 - bl sub_0203F5C0 - cmp r0, #1 - bne _021D2158 - mov r0, #1 - pop {r4, pc} -_021D2158: - bl sub_020363A0 - cmp r0, #0 - bne _021D216C - bl sub_0203608C - bl sub_020593CC - cmp r0, #0 - beq _021D2170 -_021D216C: - mov r0, #0 - pop {r4, pc} -_021D2170: - bl ov23_02242814 - ldrh r0, [r4] - lsl r1, r0, #0x1f - lsr r1, r1, #0x1f - beq _021D2186 - mov r0, #0 - bl ov23_02242830 - mov r0, #0 - pop {r4, pc} -_021D2186: - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _021D2194 - bl ov23_022427F8 - mov r0, #0 - pop {r4, pc} -_021D2194: - bl ov23_02242458 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021D213C - - thumb_func_start ov5_021D219C -ov5_021D219C: ; 0x021D219C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrh r0, [r4] - add r5, r1, #0 - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - beq _021D21CE - mov r0, #3 - ldrsb r0, [r4, r0] - cmp r0, #1 - bne _021D21CE - add r0, r5, #0 - bl ov5_021D2CFC - bl sub_0205DB1C - cmp r0, #0 - beq _021D21CE - ldr r1, _021D226C ; =0x0000238D - add r0, r5, #0 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D21CE: - bl sub_020363A0 - cmp r0, #0 - bne _021D21EA - bl sub_0203608C - bl sub_020593CC - cmp r0, #0 - bne _021D21EA - bl sub_02059D2C - cmp r0, #0 - bne _021D21EE -_021D21EA: - mov r0, #0 - pop {r3, r4, r5, pc} -_021D21EE: - ldrh r0, [r4] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _021D223E - add r0, r5, #0 - add r1, sp, #0 - bl sub_0203CA40 - cmp r0, #1 - bne _021D223E - ldr r0, [sp] - bl sub_02062948 - cmp r0, #1 - beq _021D223E - ldr r0, [r5, #0x3c] - bl sub_0205F588 - cmp r0, #1 - bne _021D2224 - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - add r1, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205F5E4 -_021D2224: - ldr r4, [sp] - add r0, r4, #0 - bl sub_02062960 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - add r2, r4, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D223E: - ldrh r0, [r4] - lsl r1, r0, #0x1f - lsr r1, r1, #0x1f - beq _021D2250 - add r0, r5, #0 - bl sub_0205B2D4 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2250: - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _021D2266 - ldr r0, _021D2270 ; =0x000005FD - bl sub_02005748 - add r0, r5, #0 - bl sub_0203AABC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2266: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D226C: .word 0x0000238D -_021D2270: .word 0x000005FD - thumb_func_end ov5_021D219C - - thumb_func_start ov5_021D2274 -ov5_021D2274: ; 0x021D2274 - push {r3, r4, r5, lr} - mov r5, #0 - mov r4, #1 -_021D227A: - add r0, r4, #0 - bl sub_02032EE8 - cmp r0, #0 - beq _021D2286 - add r5, r5, #1 -_021D2286: - add r4, r4, #1 - cmp r4, #5 - blt _021D227A - cmp r5, #1 - blt _021D2294 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2294: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D2274 - - thumb_func_start ov5_021D2298 -ov5_021D2298: ; 0x021D2298 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - bl sub_020318EC - mov r1, #0xfe - tst r0, r1 - beq _021D22CA - bl ov5_021D2274 - cmp r0, #0 - beq _021D22C6 - bl sub_02035E18 - cmp r0, #1 - ble _021D22C6 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D22C6: - mov r0, #0 - pop {r3, r4, r5, pc} -_021D22CA: - ldrh r0, [r4] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _021D2314 - add r0, r5, #0 - add r1, sp, #0 - bl sub_0203CA40 - cmp r0, #1 - bne _021D2314 - ldr r0, [r5, #0x3c] - bl sub_0205F588 - cmp r0, #1 - bne _021D22F6 - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - add r1, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205F5E4 -_021D22F6: - bl sub_02036B84 - ldr r4, [sp] - add r0, r4, #0 - bl sub_02062960 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - add r2, r4, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2314: - ldrh r0, [r4] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - beq _021D2334 - add r0, r5, #0 - bl ov5_021D2CFC - bl sub_0205DEE4 - cmp r0, #0 - beq _021D2334 - add r0, r5, #0 - bl sub_020545EC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2334: - ldrh r0, [r4] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _021D235E - bl sub_02035E18 - cmp r0, #1 - bgt _021D235E - ldr r0, _021D2364 ; =0x000005FD - bl sub_02005748 - add r0, r5, #0 - bl sub_0203AA78 - mov r0, #4 - bl sub_0205BEA8 - bl sub_02036BA0 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D235E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D2364: .word 0x000005FD - thumb_func_end ov5_021D2298 - - thumb_func_start ov5_021D2368 -ov5_021D2368: ; 0x021D2368 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldrh r0, [r5] - add r4, r1, #0 - lsl r0, r0, #0x14 - lsr r0, r0, #0x1f - bne _021D238A - add r0, r4, #0 - mov r1, #1 - bl sub_0203F5C0 - cmp r0, #1 - bne _021D238A - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D238A: - ldrh r0, [r5] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - beq _021D2442 - add r0, r4, #0 - add r1, sp, #0 - bl sub_0203CA40 - cmp r0, #1 - bne _021D23E8 - ldr r0, [r4, #0x3c] - bl sub_0205F588 - cmp r0, #1 - bne _021D23B6 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0205F5E4 -_021D23B6: - ldr r0, [sp] - bl sub_02062950 - cmp r0, #9 - beq _021D23D8 - ldr r5, [sp] - add r0, r5, #0 - bl sub_02062960 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - add r2, r5, #0 - bl sub_0203E880 - b _021D23E2 -_021D23D8: - ldr r2, [sp] - add r0, r4, #0 - mov r1, #0 - bl sub_0203E880 -_021D23E2: - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D23E8: - add r0, r4, #0 - bl sub_0203A440 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0203A448 - add r2, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl sub_0203CA6C - add r1, r0, #0 - ldr r0, _021D2494 ; =0x0000FFFF - cmp r1, r0 - beq _021D241A - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D241A: - add r0, r4, #0 - bl ov5_021D2D18 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021D271C - add r1, r0, #0 - ldr r0, _021D2494 ; =0x0000FFFF - cmp r1, r0 - beq _021D2442 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D2442: - ldrh r0, [r5] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1f - beq _021D245C - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D2504 - cmp r0, #1 - bne _021D245C - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D245C: - ldrh r0, [r5] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1f - beq _021D2474 - add r0, r4, #0 - bl sub_02069238 - cmp r0, #1 - bne _021D2474 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D2474: - ldrh r0, [r5] - lsl r0, r0, #0x1d - lsr r0, r0, #0x1f - beq _021D248E - ldr r0, _021D2498 ; =0x000005FD - bl sub_02005748 - add r0, r4, #0 - bl sub_0203A9E0 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D248E: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D2494: .word 0x0000FFFF -_021D2498: .word 0x000005FD - thumb_func_end ov5_021D2368 - - thumb_func_start ov5_021D249C -ov5_021D249C: ; 0x021D249C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov5_021D2C7C - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206AE8C - cmp r0, #1 - bne _021D24E0 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl sub_02056374 - cmp r0, #1 - bne _021D24DA - add r0, r4, #0 - bl sub_0205639C - add r1, r0, #0 - add r0, r4, #0 - bl sub_02051450 - add sp, #8 - mov r0, #1 - pop {r4, pc} -_021D24DA: - add sp, #8 - mov r0, #0 - pop {r4, pc} -_021D24E0: - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A0EC - cmp r0, #0 - beq _021D24FC - add r0, r4, #0 - bl ov6_02240D5C - cmp r0, #1 - bne _021D24FC - add sp, #8 - mov r0, #1 - pop {r4, pc} -_021D24FC: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D249C - - thumb_func_start ov5_021D2504 -ov5_021D2504: ; 0x021D2504 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r5, r1, #0 - mov r1, #3 - ldrsb r2, [r5, r1] - sub r1, r1, #4 - add r6, r0, #0 - cmp r2, r1 - bne _021D251C - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D251C: - mov r1, #4 - bl sub_02071CB4 - cmp r0, #1 - bne _021D2536 - add r0, r6, #0 - bl ov8_0224BF4C - cmp r0, #1 - bne _021D2536 - add sp, #0x2c - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D2536: - add r0, r6, #0 - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov5_021D2C98 - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - add r0, r6, #0 - bl sub_02054F68 - cmp r0, #0 - bne _021D2554 - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D2554: - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - add r0, r6, #0 - add r3, sp, #0x18 - bl ov5_021D2D34 - cmp r0, #0 - beq _021D25BA - mov r0, #3 - ldrsb r1, [r5, r0] - sub r0, r0, #4 - cmp r1, r0 - beq _021D25BA - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - add r0, r6, #0 - bl sub_02054F94 - bl sub_0205DAEC - cmp r0, #0 - beq _021D25BA - mov r0, #3 - ldrsb r0, [r5, r0] - mov r1, #2 - str r0, [sp, #0xc] - add r0, r6, #0 - bl sub_02071CB4 - cmp r0, #1 - bne _021D259E - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - add r0, r6, #0 - add r3, sp, #0xc - bl ov8_0224C62C -_021D259E: - mov r3, #0 - str r3, [sp] - ldr r0, [sp, #0xc] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r0, r6, #0 - bl sub_02056BDC - add sp, #0x2c - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D25BA: - add r0, r6, #0 - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov5_021D2C7C - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - add r0, r6, #0 - bl sub_02054F94 - add r4, r0, #0 - bl sub_0205DAF8 - cmp r0, #0 - bne _021D25E2 - add r0, r4, #0 - bl sub_0205DB28 - cmp r0, #0 - beq _021D25F0 -_021D25E2: - mov r0, #3 - ldrsb r0, [r5, r0] - cmp r0, #3 - beq _021D2664 - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D25F0: - add r0, r4, #0 - bl sub_0205DB04 - cmp r0, #0 - bne _021D2604 - add r0, r4, #0 - bl sub_0205DB34 - cmp r0, #0 - beq _021D2612 -_021D2604: - mov r0, #3 - ldrsb r0, [r5, r0] - cmp r0, #2 - beq _021D2664 - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D2612: - add r0, r4, #0 - bl sub_0205DB1C - cmp r0, #0 - bne _021D2626 - add r0, r4, #0 - bl sub_0205DB4C - cmp r0, #0 - beq _021D2634 -_021D2626: - mov r0, #3 - ldrsb r0, [r5, r0] - cmp r0, #1 - beq _021D2664 - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D2634: - add r0, r4, #0 - bl sub_0205DC44 - cmp r0, #0 - beq _021D264C - mov r0, #3 - ldrsb r0, [r5, r0] - cmp r0, #3 - beq _021D2664 - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D264C: - add r0, r4, #0 - bl sub_0205DC50 - cmp r0, #0 - beq _021D2664 - mov r0, #3 - ldrsb r0, [r5, r0] - cmp r0, #2 - beq _021D2664 - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D2664: - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - add r0, r6, #0 - add r3, sp, #0x18 - bl ov5_021D2D34 - cmp r0, #0 - bne _021D267A - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D267A: - add r0, r4, #0 - bl sub_0205DAEC - cmp r0, #0 - beq _021D2688 - mov r1, #1 - b _021D2700 -_021D2688: - add r0, r4, #0 - bl sub_0205DC44 - cmp r0, #0 - beq _021D2696 - mov r1, #3 - b _021D2700 -_021D2696: - add r0, r4, #0 - bl sub_0205DC50 - cmp r0, #0 - beq _021D26A4 - mov r1, #3 - b _021D2700 -_021D26A4: - add r0, r4, #0 - bl sub_0205DAF8 - cmp r0, #0 - bne _021D26E0 - add r0, r4, #0 - bl sub_0205DB28 - cmp r0, #0 - bne _021D26E0 - add r0, r4, #0 - bl sub_0205DB04 - cmp r0, #0 - bne _021D26E0 - add r0, r4, #0 - bl sub_0205DB34 - cmp r0, #0 - bne _021D26E0 - add r0, r4, #0 - bl sub_0205DB1C - cmp r0, #0 - bne _021D26E0 - add r0, r4, #0 - bl sub_0205DB4C - cmp r0, #0 - beq _021D26FA -_021D26E0: - mov r3, #0 - str r3, [sp] - mov r0, #3 - ldrsb r0, [r5, r0] - str r0, [sp, #4] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r0, r6, #0 - bl sub_02056C18 - add sp, #0x2c - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D26FA: - add sp, #0x2c - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021D2700: - mov r3, #0 - str r3, [sp] - mov r0, #3 - ldrsb r0, [r5, r0] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r0, r6, #0 - bl sub_02056BDC - mov r0, #1 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021D2504 - - thumb_func_start ov5_021D271C -ov5_021D271C: ; 0x021D271C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x3c] - add r4, r1, #0 - bl sub_0205EA78 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0205DBE4 - cmp r0, #0 - beq _021D273C - cmp r6, #0 - bne _021D273C - ldr r0, _021D2844 ; =0x000007E2 - pop {r4, r5, r6, pc} -_021D273C: - add r0, r4, #0 - bl sub_0205DC80 - cmp r0, #0 - beq _021D274A - ldr r0, _021D2848 ; =0x000009C4 - pop {r4, r5, r6, pc} -_021D274A: - add r0, r4, #0 - bl sub_0205DC8C - cmp r0, #0 - beq _021D2758 - ldr r0, _021D284C ; =0x000009C5 - pop {r4, r5, r6, pc} -_021D2758: - add r0, r4, #0 - bl sub_0205DC98 - cmp r0, #0 - beq _021D2766 - ldr r0, _021D2850 ; =0x000009C6 - pop {r4, r5, r6, pc} -_021D2766: - add r0, r4, #0 - bl sub_0205DCA4 - cmp r0, #0 - beq _021D2774 - ldr r0, _021D2854 ; =0x000009C7 - pop {r4, r5, r6, pc} -_021D2774: - add r0, r4, #0 - bl sub_0205DCB0 - cmp r0, #0 - beq _021D2782 - ldr r0, _021D2858 ; =0x000009C8 - pop {r4, r5, r6, pc} -_021D2782: - add r0, r4, #0 - bl sub_0205DCBC - cmp r0, #0 - beq _021D2790 - ldr r0, _021D285C ; =0x000009C9 - pop {r4, r5, r6, pc} -_021D2790: - add r0, r4, #0 - bl sub_0205DCC8 - cmp r0, #0 - beq _021D279E - ldr r0, _021D2860 ; =0x000009CA - pop {r4, r5, r6, pc} -_021D279E: - add r0, r4, #0 - bl sub_0205DCD4 - cmp r0, #0 - beq _021D27AC - ldr r0, _021D2864 ; =0x000009CB - pop {r4, r5, r6, pc} -_021D27AC: - add r0, r4, #0 - bl sub_0205DDB4 - cmp r0, #0 - beq _021D27BA - ldr r0, _021D2868 ; =0x00002716 - pop {r4, r5, r6, pc} -_021D27BA: - add r0, r4, #0 - bl sub_0205DBF0 - cmp r0, #0 - beq _021D27C8 - ldr r0, _021D286C ; =0x000009CC - pop {r4, r5, r6, pc} -_021D27C8: - add r0, r4, #0 - bl sub_0205DDC0 - cmp r0, #0 - beq _021D27D6 - ldr r0, _021D2870 ; =0x000007EE - pop {r4, r5, r6, pc} -_021D27D6: - add r0, r4, #0 - bl sub_0205DE84 - cmp r0, #0 - beq _021D27E8 - cmp r6, #0 - bne _021D27E8 - ldr r0, _021D2874 ; =0x00002774 - pop {r4, r5, r6, pc} -_021D27E8: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021E0760 - cmp r0, #0 - beq _021D27F8 - ldr r0, _021D2878 ; =0x00002713 - pop {r4, r5, r6, pc} -_021D27F8: - ldr r0, [r5, #0x3c] - bl sub_0205EB74 - cmp r0, #2 - beq _021D283E - ldr r0, [r5, #0xc] - bl sub_02025E38 - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_02061760 - add r1, r0, #0 - ldr r0, [r5, #0x3c] - add r2, r4, #0 - bl ov5_021E0118 - cmp r0, #0 - beq _021D283E - add r0, r6, #0 - mov r1, #3 - bl sub_02025F34 - cmp r0, #0 - beq _021D283E - ldr r0, [r5, #0xc] - bl sub_0207A268 - mov r1, #0x39 - bl sub_020549A0 - cmp r0, #0xff - beq _021D283E - ldr r0, _021D287C ; =0x00002714 - pop {r4, r5, r6, pc} -_021D283E: - ldr r0, _021D2880 ; =0x0000FFFF - pop {r4, r5, r6, pc} - nop -_021D2844: .word 0x000007E2 -_021D2848: .word 0x000009C4 -_021D284C: .word 0x000009C5 -_021D2850: .word 0x000009C6 -_021D2854: .word 0x000009C7 -_021D2858: .word 0x000009C8 -_021D285C: .word 0x000009C9 -_021D2860: .word 0x000009CA -_021D2864: .word 0x000009CB -_021D2868: .word 0x00002716 -_021D286C: .word 0x000009CC -_021D2870: .word 0x000007EE -_021D2874: .word 0x00002774 -_021D2878: .word 0x00002713 -_021D287C: .word 0x00002714 -_021D2880: .word 0x0000FFFF - thumb_func_end ov5_021D271C - - thumb_func_start ov5_021D2884 -ov5_021D2884: ; 0x021D2884 - push {r3, r4, r5, r6, r7, lr} - mov r1, #3 - add r5, r0, #0 - bl sub_02071CB4 - cmp r0, #1 - bne _021D28A0 - add r0, r5, #0 - bl ov8_0224AAA8 - cmp r0, #0 - beq _021D28A0 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D28A0: - add r0, r5, #0 - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - bne _021D28BA - add r0, r5, #0 - bl ov9_0224A71C - cmp r0, #1 - bne _021D28BA - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D28BA: - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - add r2, r0, #0 - ldr r1, [r5, #0x3c] - add r0, r5, #0 - bl ov5_021E1154 - cmp r0, #1 - bne _021D28D2 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D28D2: - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl sub_02054F94 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021D29A0 - cmp r0, #1 - bne _021D28FC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D28FC: - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - add r3, r6, #0 - bl ov5_021D29D8 - cmp r0, #1 - bne _021D2916 - add r0, r5, #0 - bl ov5_021D2E14 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2916: - ldr r0, [r5, #0x3c] - bl sub_0205EF58 - cmp r0, #0 - beq _021D2924 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D2924: - add r0, r5, #0 - mov r1, #5 - mov r2, #1 - bl ov5_021EA714 - add r0, r5, #0 - bl ov5_021D2B94 - cmp r0, #1 - bne _021D293C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D293C: - add r0, r5, #0 - bl ov5_021D2C14 - cmp r0, #1 - bne _021D294A - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D294A: - add r0, r5, #0 - bl ov5_021D2ABC - cmp r0, #1 - bne _021D2958 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2958: - add r0, r5, #0 - bl ov5_021D2B08 - cmp r0, #1 - bne _021D2966 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2966: - add r0, r5, #0 - bl ov5_021D2B14 - cmp r0, #1 - bne _021D2974 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2974: - add r0, r5, #0 - bl ov5_021D2B20 - cmp r0, #1 - bne _021D2982 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2982: - add r0, r5, #0 - bl ov5_021D2B2C - cmp r0, #0 - beq _021D2992 - add r0, r5, #0 - bl ov5_021D2B54 -_021D2992: - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206B238 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D2884 - - thumb_func_start ov5_021D29A0 -ov5_021D29A0: ; 0x021D29A0 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_0203A4AC - add r5, r0, #0 - add r0, r4, #0 - bl sub_0203A4A4 - add r2, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_0203CC14 - add r1, r0, #0 - ldr r0, _021D29D4 ; =0x0000FFFF - cmp r1, r0 - beq _021D29CE - add r0, r4, #0 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D29CE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D29D4: .word 0x0000FFFF - thumb_func_end ov5_021D29A0 - - thumb_func_start ov5_021D29D8 -ov5_021D29D8: ; 0x021D29D8 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r3, #0 - add r3, sp, #0xc - add r4, r0, #0 - bl ov5_021D2D34 - cmp r0, #0 - bne _021D29F0 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D29F0: - add r0, r5, #0 - bl sub_0205DC2C - cmp r0, #1 - bne _021D2A34 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - cmp r0, #2 - bne _021D2A08 - mov r0, #3 - b _021D2A1A -_021D2A08: - cmp r0, #3 - bne _021D2A10 - mov r0, #2 - b _021D2A1A -_021D2A10: - bl sub_02022974 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2A1A: - mov r3, #0 - str r3, [sp] - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, r4, #0 - bl sub_02056BDC - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2A34: - add r0, r5, #0 - bl sub_0205DC38 - cmp r0, #1 - bne _021D2A70 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - cmp r0, #2 - beq _021D2A56 - cmp r0, #3 - beq _021D2A56 - bl sub_02022974 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2A56: - mov r3, #0 - str r3, [sp] - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, r4, #0 - bl sub_02056BDC - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2A70: - add r0, r5, #0 - bl sub_0205DB10 - cmp r0, #0 - bne _021D2A84 - add r0, r5, #0 - bl sub_0205DB40 - cmp r0, #0 - beq _021D2A9A -_021D2A84: - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, r4, #0 - bl sub_02056C18 - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2A9A: - add r0, r5, #0 - bl sub_0205DEE4 - cmp r0, #0 - beq _021D2AB4 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, r4, #0 - bl sub_02053F58 - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2AB4: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D29D8 - - thumb_func_start ov5_021D2ABC -ov5_021D2ABC: ; 0x021D2ABC - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0207A268 - add r5, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02026310 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021E7154 - cmp r0, #1 - bne _021D2AFE - ldr r0, [r4, #0xc] - bl sub_0202CD88 - add r5, r0, #0 - mov r1, #0xb - bl sub_0202CF28 - add r0, r5, #0 - mov r1, #0xf - bl sub_0202CFEC - ldr r1, _021D2B04 ; =0x000007EF - add r0, r4, #0 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2AFE: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D2B04: .word 0x000007EF - thumb_func_end ov5_021D2ABC - - thumb_func_start ov5_021D2B08 -ov5_021D2B08: ; 0x021D2B08 - push {r3, lr} - bl ov5_021DBB94 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D2B08 - - thumb_func_start ov5_021D2B14 -ov5_021D2B14: ; 0x021D2B14 - push {r3, lr} - bl sub_02069B98 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D2B14 - - thumb_func_start ov5_021D2B20 -ov5_021D2B20: ; 0x021D2B20 - ldr r3, _021D2B28 ; =ov6_02246BF4 - add r1, r0, #0 - ldr r0, [r1, #0xc] - bx r3 - ; .align 2, 0 -_021D2B28: .word ov6_02246BF4 - thumb_func_end ov5_021D2B20 - - thumb_func_start ov5_021D2B2C -ov5_021D2B2C: ; 0x021D2B2C - push {r3, r4, r5, lr} - ldr r0, [r0, #0xc] - mov r5, #0 - bl sub_020507E4 - add r4, r0, #0 - bl sub_0206B44C - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - cmp r1, #0x80 - blo _021D2B4A - add r1, r5, #0 - mov r5, #1 -_021D2B4A: - add r0, r4, #0 - bl sub_0206B45C - add r0, r5, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D2B2C - - thumb_func_start ov5_021D2B54 -ov5_021D2B54: ; 0x021D2B54 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0207A268 - add r6, r0, #0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A138 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r6, #0 - bl sub_0207A0F8 - add r7, r0, #0 - mov r4, #0 - cmp r7, #0 - ble _021D2B90 -_021D2B7A: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #5 - add r2, r5, #0 - bl sub_02075C74 - add r4, r4, #1 - cmp r4, r7 - blt _021D2B7A -_021D2B90: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D2B54 - - thumb_func_start ov5_021D2B94 -ov5_021D2B94: ; 0x021D2B94 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0207A268 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0203A790 - bl sub_0203A78C - ldrh r1, [r0] - add r1, r1, #1 - strh r1, [r0] - ldrh r2, [r0] - mov r1, #3 - and r1, r2 - strh r1, [r0] - ldrh r0, [r0] - cmp r0, #0 - beq _021D2BC2 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2BC2: - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A138 - add r1, r0, #0 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - bl sub_02054B04 - cmp r0, #0 - beq _021D2BE4 - cmp r0, #1 - beq _021D2BE8 - cmp r0, #2 - beq _021D2BF4 - b _021D2C0A -_021D2BE4: - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2BE8: - ldr r0, [r5, #4] - ldr r0, [r0, #0x20] - bl ov5_021EF518 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D2BF4: - ldr r0, [r5, #4] - ldr r0, [r0, #0x20] - bl ov5_021EF518 - ldr r1, _021D2C10 ; =0x000007D3 - add r0, r5, #0 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2C0A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D2C10: .word 0x000007D3 - thumb_func_end ov5_021D2B94 - - thumb_func_start ov5_021D2C14 -ov5_021D2C14: ; 0x021D2C14 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206AE5C - cmp r0, #0 - bne _021D2C2A - mov r0, #0 - pop {r4, pc} -_021D2C2A: - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A784 - ldrh r0, [r0] - cmp r0, #0 - bne _021D2C48 - ldr r1, _021D2C74 ; =0x00002262 - add r0, r4, #0 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r4, pc} -_021D2C48: - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A788 - ldrh r1, [r0] - add r1, r1, #1 - strh r1, [r0] - ldrh r1, [r0] - mov r0, #0x7d - lsl r0, r0, #2 - cmp r1, r0 - blo _021D2C70 - ldr r1, _021D2C78 ; =0x00002261 - add r0, r4, #0 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r4, pc} -_021D2C70: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021D2C74: .word 0x00002262 -_021D2C78: .word 0x00002261 - thumb_func_end ov5_021D2C14 - - thumb_func_start ov5_021D2C7C -ov5_021D2C7C: ; 0x021D2C7C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x3c] - add r4, r1, #0 - add r6, r2, #0 - bl sub_0205EABC - str r0, [r4, #0] - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D2C7C - - thumb_func_start ov5_021D2C98 -ov5_021D2C98: ; 0x021D2C98 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x3c] - add r4, r1, #0 - add r6, r2, #0 - bl sub_0205EA78 - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov5_021D2CB4 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D2C98 - - thumb_func_start ov5_021D2CB4 -ov5_021D2CB4: ; 0x021D2CB4 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r5, r3, #0 - add r6, r1, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov5_021D2C7C - cmp r6, #3 - bhi _021D2CFA - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2CD4: ; jump table - .short _021D2CDC - _021D2CD4 - 2 ; case 0 - .short _021D2CE4 - _021D2CD4 - 2 ; case 1 - .short _021D2CEC - _021D2CD4 - 2 ; case 2 - .short _021D2CF4 - _021D2CD4 - 2 ; case 3 -_021D2CDC: - ldr r0, [r5, #0] - sub r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D2CE4: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021D2CEC: - ldr r0, [r4, #0] - sub r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_021D2CF4: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021D2CFA: - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D2CB4 - - thumb_func_start ov5_021D2CFC -ov5_021D2CFC: ; 0x021D2CFC - push {r4, lr} - sub sp, #8 - add r1, sp, #4 - add r2, sp, #0 - add r4, r0, #0 - bl ov5_021D2C7C - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl sub_02054F94 - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D2CFC - - thumb_func_start ov5_021D2D18 -ov5_021D2D18: ; 0x021D2D18 - push {r4, lr} - sub sp, #8 - add r1, sp, #4 - add r2, sp, #0 - add r4, r0, #0 - bl ov5_021D2C98 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl sub_02054F94 - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D2D18 - - thumb_func_start ov5_021D2D34 -ov5_021D2D34: ; 0x021D2D34 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r7, r1, #0 - str r2, [sp] - add r5, r3, #0 - bl sub_0203A468 - add r6, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - bne _021D2D50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D2D50: - add r0, r4, #0 - add r1, r6, #0 - bl sub_0203A450 - cmp r0, #0 - bne _021D2D60 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D2D60: - ldrh r3, [r0, #6] - mov r1, #1 - lsl r1, r1, #8 - cmp r3, r1 - bne _021D2D90 - ldrh r1, [r0, #4] - ldr r0, _021D2DC8 ; =0x00000FFF - cmp r1, r0 - beq _021D2D76 - bl sub_02022974 -_021D2D76: - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A730 - add r2, r0, #0 - ldmia r2!, {r0, r1} - stmia r5!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r5, #0] - b _021D2DA2 -_021D2D90: - ldrh r2, [r0, #2] - ldrh r1, [r0] - ldrh r0, [r0, #4] - str r0, [r5, #0] - str r3, [r5, #4] - str r1, [r5, #8] - str r2, [r5, #0xc] - mov r0, #1 - str r0, [r5, #0x10] -_021D2DA2: - ldr r0, [r4, #0xc] - bl sub_0203A790 - bl sub_0203A724 - add r5, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - ldr r1, [r4, #0x1c] - ldr r1, [r1, #0] - str r1, [r5, #0] - str r6, [r5, #4] - ldr r1, [sp] - str r7, [r5, #8] - str r1, [r5, #0xc] - str r0, [r5, #0x10] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2DC8: .word 0x00000FFF - thumb_func_end ov5_021D2D34 - - thumb_func_start ov5_021D2DCC -ov5_021D2DCC: ; 0x021D2DCC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r7, r1, #0 - str r2, [sp] - add r4, r3, #0 - bl sub_0203A790 - bl sub_0203A72C - add r6, r0, #0 - ldr r3, [r5, #0x1c] - add r2, r6, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - cmp r4, #0 - str r0, [r2, #0] - str r4, [r6, #0x10] - ldr r0, [sp] - str r7, [r6, #8] - str r0, [r6, #0xc] - bne _021D2E04 - ldr r0, [r6, #0xc] - add r0, r0, #1 - str r0, [r6, #0xc] -_021D2E04: - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - str r0, [r6, #0] - mov r0, #0 - mvn r0, r0 - str r0, [r6, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D2DCC - - thumb_func_start ov5_021D2E14 -ov5_021D2E14: ; 0x021D2E14 - push {r3, r4, lr} - sub sp, #0x1c - add r1, sp, #4 - add r2, sp, #0 - add r4, r0, #0 - bl ov5_021D2C7C - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - add r3, sp, #8 - bl ov5_021D2D34 - cmp r0, #0 - beq _021D2E5E - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A24C - cmp r0, #1 - bne _021D2EA0 - ldr r0, [sp, #8] - bl sub_0203A24C - cmp r0, #0 - bne _021D2EA0 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r3, r0, #0 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl ov5_021D2DCC - add sp, #0x1c - pop {r3, r4, pc} -_021D2E5E: - add r0, r4, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov5_021D2C98 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - add r3, sp, #8 - bl ov5_021D2D34 - cmp r0, #0 - beq _021D2EA0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A24C - cmp r0, #1 - bne _021D2EA0 - ldr r0, [sp, #8] - bl sub_0203A24C - cmp r0, #0 - bne _021D2EA0 - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - add r3, r0, #0 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - bl ov5_021D2DCC -_021D2EA0: - add sp, #0x1c - pop {r3, r4, pc} - thumb_func_end ov5_021D2E14 - - thumb_func_start ov5_021D2EA4 -ov5_021D2EA4: ; 0x021D2EA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - mov r0, #0 - str r0, [sp, #0xc] - add r5, r1, #0 - ldr r0, [r7, #0x3c] - add r1, sp, #8 - add r2, sp, #4 - add r3, sp, #0 - bl sub_020617BC - ldr r0, [r7, #0x38] - add r1, r5, #0 - add r2, sp, #0xc - mov r3, #1 - bl sub_020625B0 - cmp r0, #0 - beq _021D2F0E -_021D2ECC: - ldr r0, [r5, #0] - bl sub_02063020 - add r6, r0, #0 - ldr r0, [r5, #0] - bl sub_02063030 - lsr r1, r0, #0x1f - add r1, r0, r1 - ldr r0, [r5, #0] - asr r4, r1, #1 - bl sub_02063040 - ldr r1, [sp, #4] - cmp r1, r4 - bne _021D2EFE - ldr r1, [sp, #8] - cmp r1, r6 - bne _021D2EFE - ldr r1, [sp] - cmp r1, r0 - bne _021D2EFE - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D2EFE: - ldr r0, [r7, #0x38] - add r1, r5, #0 - add r2, sp, #0xc - mov r3, #1 - bl sub_020625B0 - cmp r0, #0 - bne _021D2ECC -_021D2F0E: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D2EA4 - - thumb_func_start ov5_021D2F14 -ov5_021D2F14: ; 0x021D2F14 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - str r1, [sp, #0x10] - add r4, r3, #0 - add r0, r2, #0 - add r1, r5, #4 - add r2, r4, #0 - bl sub_020095C4 - str r0, [r5, #0] - ldr r1, _021D30A4 ; =0x00000162 - ldr r0, [sp, #0x10] - strh r4, [r5, r1] - ldr r0, [r0, #0x10] - cmp r0, #0 - bne _021D2F3A - mov r2, #4 - b _021D2F3C -_021D2F3A: - mov r2, #6 -_021D2F3C: - sub r0, r1, #2 - strh r2, [r5, r0] - bl sub_02009F34 - mov r1, #0x16 - lsl r1, r1, #4 - ldrh r2, [r5, r1] - add r3, r0, #0 - add r0, r4, #0 - add r1, r2, #0 - mul r1, r3 - bl sub_02018144 - add r7, r0, #0 - mov r0, #0 - str r0, [sp, #0x1c] - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r0, [r5, r0] - cmp r0, #0 - bls _021D2F9E - ldr r6, [sp, #0x10] -_021D2F68: - ldr r1, [sp, #0x1c] - add r0, r7, #0 - bl sub_02009F38 - str r0, [sp, #0x20] - ldr r1, [r6, #0] - add r0, r4, #0 - bl sub_02017A40 - ldr r1, [sp, #0x20] - str r0, [sp, #0x24] - add r2, r4, #0 - bl sub_02009F40 - ldr r0, [sp, #0x24] - bl sub_020181C4 - ldr r0, [sp, #0x1c] - add r6, r6, #4 - add r0, r0, #1 - str r0, [sp, #0x1c] - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r0, [r5, r0] - ldr r1, [sp, #0x1c] - cmp r1, r0 - blo _021D2F68 -_021D2F9E: - mov r6, #0 - cmp r0, #0 - bls _021D2FD4 - str r5, [sp, #0x18] -_021D2FA6: - add r0, r7, #0 - add r1, r6, #0 - bl sub_02009F38 - bl sub_02009FA4 - add r1, r6, #0 - add r2, r4, #0 - bl sub_02009714 - mov r1, #0x13 - ldr r2, [sp, #0x18] - lsl r1, r1, #4 - str r0, [r2, r1] - add r0, r2, #0 - add r0, r0, #4 - str r0, [sp, #0x18] - add r0, r1, #0 - add r0, #0x30 - ldrh r0, [r5, r0] - add r6, r6, #1 - cmp r6, r0 - blo _021D2FA6 -_021D2FD4: - mov r1, #0 - str r1, [sp, #0x14] - cmp r0, #0 - bls _021D3020 - add r6, r5, #0 -_021D2FDE: - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl sub_02009F38 - str r0, [sp, #0x28] - bl sub_02009FA4 - add r1, r4, #0 - bl sub_02009CFC - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r6, r1] - add r0, r1, #0 - mov r2, #0x52 - sub r0, #0x18 - lsl r2, r2, #2 - ldr r0, [r6, r0] - ldr r1, [sp, #0x28] - ldr r2, [r6, r2] - add r3, r4, #0 - bl sub_02009C80 - ldr r0, [sp, #0x14] - add r6, r6, #4 - add r0, r0, #1 - str r0, [sp, #0x14] - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r0, [r5, r0] - ldr r1, [sp, #0x14] - cmp r1, r0 - blo _021D2FDE -_021D3020: - mov r6, #0 - cmp r0, #0 - bls _021D303E -_021D3026: - add r0, r7, #0 - add r1, r6, #0 - bl sub_02009F38 - bl sub_02009F8C - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r0, [r5, r0] - add r6, r6, #1 - cmp r6, r0 - blo _021D3026 -_021D303E: - add r0, r7, #0 - bl sub_020181C4 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A41C - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A684 - ldr r1, [sp, #0x10] - add r0, r4, #0 - ldr r1, [r1, #0x18] - bl sub_02017A40 - mov r3, #0x4e - lsl r3, r3, #2 - ldr r1, [r5, r3] - add r2, r3, #0 - str r1, [sp] - add r1, r3, #4 - ldr r1, [r5, r1] - sub r2, #8 - str r1, [sp, #4] - add r1, r3, #0 - add r1, #8 - ldr r1, [r5, r1] - add r6, r0, #0 - str r1, [sp, #8] - add r1, r3, #0 - add r1, #0xc - ldr r1, [r5, r1] - sub r3, r3, #4 - str r1, [sp, #0xc] - ldr r2, [r5, r2] - ldr r3, [r5, r3] - add r1, r4, #0 - bl sub_02009508 - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r6, #0 - bl sub_020181C4 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021D30A4: .word 0x00000162 - thumb_func_end ov5_021D2F14 - - thumb_func_start ov5_021D30A8 -ov5_021D30A8: ; 0x021D30A8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl sub_02021964 - mov r0, #0x4b - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020095A8 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A508 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A700 - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r0, [r5, r0] - mov r6, #0 - cmp r0, #0 - bls _021D3100 - mov r7, #0x16 - add r4, r5, #0 - lsl r7, r7, #4 -_021D30E2: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02009D20 - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02009754 - ldrh r0, [r5, r7] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blo _021D30E2 -_021D3100: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D30A8 - - thumb_func_start ov5_021D3104 -ov5_021D3104: ; 0x021D3104 - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - add r2, r0, #0 - add r4, r1, #0 - mov r0, #4 - ldrsh r0, [r4, r0] - mov r3, #0x4b - lsl r3, r3, #2 - lsl r0, r0, #0xc - str r0, [sp] - mov r0, #6 - ldrsh r0, [r4, r0] - add r6, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #8 - ldrsh r0, [r4, r0] - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [r2, #0] - str r0, [sp, #0xc] - ldr r0, [r2, r3] - ldr r1, [r4, #0] - ldr r5, [r0, #0] - mov r0, #0x24 - mul r0, r1 - add r0, r5, r0 - str r0, [sp, #0x10] - ldmia r6!, {r0, r1} - add r5, sp, #0x14 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - ldr r6, _021D318C ; =0x021F89C0 - str r0, [r5, #0] - ldmia r6!, {r0, r1} - add r5, sp, #0x20 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #0 - str r0, [r5, #0] - add r0, sp, #0 - strh r1, [r0, #0x2c] - ldr r0, [r4, #0xc] - add r3, #0x36 - str r0, [sp, #0x30] - ldr r0, [r4, #0x14] - str r0, [sp, #0x34] - ldrh r0, [r2, r3] - str r0, [sp, #0x38] - add r0, sp, #0xc - bl sub_02021AA0 - add r5, r0, #0 - bne _021D3174 - bl sub_02022974 -_021D3174: - ldrh r1, [r4, #0xa] - add r0, r5, #0 - bl sub_02021D6C - ldr r1, [r4, #0x10] - add r0, r5, #0 - bl sub_02021EC4 - add r0, r5, #0 - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - nop -_021D318C: .word 0x021F89C0 - thumb_func_end ov5_021D3104 - - thumb_func_start ov5_021D3190 -ov5_021D3190: ; 0x021D3190 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - str r1, [sp] - add r0, r2, #0 - str r3, [sp, #4] - add r1, r7, #4 - add r2, r3, #0 - bl sub_020095C4 - str r0, [r7, #0] - ldr r1, _021D326C ; =0x00000162 - ldr r0, [sp, #4] - strh r0, [r7, r1] - ldr r0, [sp] - ldr r0, [r0, #0x10] - cmp r0, #0 - beq _021D31BC - ldr r0, [sp] - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _021D31D2 -_021D31BC: - mov r1, #0x16 - mov r0, #4 - lsl r1, r1, #4 - strh r0, [r7, r1] - add r0, r1, #0 - mov r2, #0 - sub r0, #0x20 - str r2, [r7, r0] - sub r1, #0x1c - str r2, [r7, r1] - b _021D31D8 -_021D31D2: - mov r2, #6 - sub r0, r1, #2 - strh r2, [r7, r0] -_021D31D8: - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r1, [r7, r0] - mov r4, #0 - cmp r1, #0 - bls _021D3208 - ldr r5, [sp] - add r6, r7, #0 -_021D31E8: - ldr r0, [r5, #0] - ldr r2, [sp, #4] - add r1, r4, #0 - bl sub_02009714 - mov r1, #0x13 - lsl r1, r1, #4 - str r0, [r6, r1] - add r0, r1, #0 - add r0, #0x30 - ldrh r1, [r7, r0] - add r4, r4, #1 - add r5, r5, #4 - add r6, r6, #4 - cmp r4, r1 - blo _021D31E8 -_021D3208: - mov r0, #0 - str r0, [sp, #8] - cmp r1, #0 - bls _021D3266 - mov r6, #0x52 - add r5, r7, #0 - add r4, r0, #0 - lsl r6, r6, #2 -_021D3218: - ldr r0, [sp] - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D324C - ldr r1, [sp, #4] - bl sub_02009CFC - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x52 - lsl r0, r0, #2 - ldr r3, [r5, r0] - mov r1, #0 - ldr r0, [r3, #4] - cmp r0, #0 - bls _021D324C - add r2, r1, #0 -_021D323C: - ldr r0, [r3, #0] - add r1, r1, #1 - str r4, [r0, r2] - ldr r3, [r5, r6] - add r2, r2, #4 - ldr r0, [r3, #4] - cmp r1, r0 - blo _021D323C -_021D324C: - ldr r0, [sp] - add r5, r5, #4 - add r0, r0, #4 - str r0, [sp] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r1, [r7, r0] - ldr r0, [sp, #8] - cmp r0, r1 - blo _021D3218 -_021D3266: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021D326C: .word 0x00000162 - thumb_func_end ov5_021D3190 - - thumb_func_start ov5_021D3270 -ov5_021D3270: ; 0x021D3270 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x4d - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - ldr r1, [sp, #0x30] - add r6, r2, #0 - add r7, r3, #0 - bl sub_02009D34 - cmp r0, #0 - bne _021D3294 - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D3294: - ldr r0, [sp, #0x30] - add r2, r6, #0 - str r0, [sp] - ldr r0, [sp, #0x2c] - add r3, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x28] - str r0, [sp, #8] - ldr r0, _021D32E4 ; =0x00000162 - ldrh r1, [r5, r0] - sub r0, #0x2e - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_020098B8 - add r4, r0, #0 - beq _021D32DC - bl sub_0200A640 - cmp r0, #1 - beq _021D32C4 - bl sub_02022974 -_021D32C4: - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov5_021D3478 - ldr r1, [sp, #0x2c] - add r0, r4, #0 - bl sub_0200A760 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D32DC: - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D32E4: .word 0x00000162 - thumb_func_end ov5_021D3270 - - thumb_func_start ov5_021D32E8 -ov5_021D32E8: ; 0x021D32E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x4d - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - ldr r1, [sp, #0x30] - add r6, r2, #0 - add r7, r3, #0 - bl sub_02009D34 - cmp r0, #0 - bne _021D330C - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D330C: - ldr r0, [sp, #0x30] - add r2, r6, #0 - str r0, [sp] - ldr r0, [sp, #0x2c] - add r3, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x28] - str r0, [sp, #8] - ldr r0, _021D335C ; =0x00000162 - ldrh r1, [r5, r0] - sub r0, #0x2e - str r1, [sp, #0xc] - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02009B04 - add r4, r0, #0 - beq _021D3354 - bl sub_0200A640 - cmp r0, #1 - beq _021D333C - bl sub_02022974 -_021D333C: - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov5_021D3478 - ldr r1, [sp, #0x2c] - add r0, r4, #0 - bl sub_0200A760 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D3354: - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D335C: .word 0x00000162 - thumb_func_end ov5_021D32E8 - - thumb_func_start ov5_021D3360 -ov5_021D3360: ; 0x021D3360 - push {r4, lr} - sub sp, #8 - mov r4, #2 - str r4, [sp] - ldr r4, [sp, #0x10] - str r4, [sp, #4] - bl ov5_021D34AC - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D3360 - - thumb_func_start ov5_021D3374 -ov5_021D3374: ; 0x021D3374 - push {r4, lr} - sub sp, #8 - mov r4, #2 - str r4, [sp] - ldr r4, [sp, #0x10] - str r4, [sp, #4] - bl ov5_021D3518 - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D3374 - - thumb_func_start ov5_021D3388 -ov5_021D3388: ; 0x021D3388 - push {r4, lr} - sub sp, #8 - mov r4, #3 - str r4, [sp] - ldr r4, [sp, #0x10] - str r4, [sp, #4] - bl ov5_021D34AC - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D3388 - - thumb_func_start ov5_021D339C -ov5_021D339C: ; 0x021D339C - push {r4, lr} - sub sp, #8 - mov r4, #3 - str r4, [sp] - ldr r4, [sp, #0x10] - str r4, [sp, #4] - bl ov5_021D3518 - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D339C - - thumb_func_start ov5_021D33B0 -ov5_021D33B0: ; 0x021D33B0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r4, r1, #0 - ldr r0, [r5, r0] - ldr r1, [sp, #0x24] - add r6, r2, #0 - add r7, r3, #0 - bl sub_02009D34 - cmp r0, #0 - bne _021D33D4 - bl sub_02022974 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021D33D4: - ldr r0, [sp, #0x24] - add r2, r6, #0 - str r0, [sp] - ldr r0, [sp, #0x20] - add r3, r7, #0 - str r0, [sp, #4] - ldr r0, _021D3410 ; =0x00000162 - ldrh r1, [r5, r0] - sub r0, #0x32 - str r1, [sp, #8] - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200985C - add r4, r0, #0 - beq _021D3408 - bl sub_0200A3DC - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov5_021D3478 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021D3408: - bl sub_02022974 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3410: .word 0x00000162 - thumb_func_end ov5_021D33B0 - - thumb_func_start ov5_021D3414 -ov5_021D3414: ; 0x021D3414 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r4, r1, #0 - ldr r0, [r5, r0] - ldr r1, [sp, #0x24] - add r6, r2, #0 - add r7, r3, #0 - bl sub_02009D34 - cmp r0, #0 - bne _021D3438 - bl sub_02022974 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021D3438: - ldr r0, [sp, #0x24] - add r2, r6, #0 - str r0, [sp] - ldr r0, [sp, #0x20] - add r3, r7, #0 - str r0, [sp, #4] - ldr r0, _021D3474 ; =0x00000162 - ldrh r1, [r5, r0] - sub r0, #0x32 - str r1, [sp, #8] - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02009A4C - add r4, r0, #0 - beq _021D346C - bl sub_0200A3DC - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov5_021D3478 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021D346C: - bl sub_02022974 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3474: .word 0x00000162 - thumb_func_end ov5_021D3414 - - thumb_func_start ov5_021D3478 -ov5_021D3478: ; 0x021D3478 - push {r3, r4, r5, r6} - ldr r6, [r0, #4] - mov r3, #0 - cmp r6, #0 - ble _021D34A4 - ldr r5, [r0, #0] - add r4, r5, #0 -_021D3486: - ldr r2, [r4, #0] - cmp r2, #0 - bne _021D349C - lsl r2, r3, #2 - str r1, [r5, r2] - ldr r1, [r0, #8] - add r1, r1, #1 - str r1, [r0, #8] - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_021D349C: - add r3, r3, #1 - add r4, r4, #4 - cmp r3, r6 - blt _021D3486 -_021D34A4: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D3478 - - thumb_func_start ov5_021D34AC -ov5_021D34AC: ; 0x021D34AC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [sp, #0x28] - add r7, r1, #0 - lsl r4, r0, #2 - mov r0, #0x13 - lsl r0, r0, #4 - add r6, r5, r0 - ldr r0, [r6, r4] - ldr r1, [sp, #0x2c] - str r2, [sp, #0xc] - str r3, [sp, #0x10] - bl sub_02009D34 - cmp r0, #0 - bne _021D34D6 - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021D34D6: - ldr r0, [sp, #0x2c] - ldr r2, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #0x28] - ldr r3, [sp, #0x10] - str r0, [sp, #4] - ldr r0, _021D3514 ; =0x00000162 - add r1, r7, #0 - ldrh r0, [r5, r0] - str r0, [sp, #8] - ldr r0, [r6, r4] - bl sub_02009918 - add r1, r0, #0 - beq _021D350C - mov r0, #0x52 - add r2, r5, r4 - lsl r0, r0, #2 - ldr r0, [r2, r0] - bl ov5_021D3478 - cmp r0, #1 - beq _021D3510 - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021D350C: - bl sub_02022974 -_021D3510: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3514: .word 0x00000162 - thumb_func_end ov5_021D34AC - - thumb_func_start ov5_021D3518 -ov5_021D3518: ; 0x021D3518 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [sp, #0x28] - add r7, r1, #0 - lsl r4, r0, #2 - mov r0, #0x13 - lsl r0, r0, #4 - add r6, r5, r0 - ldr r0, [r6, r4] - ldr r1, [sp, #0x2c] - str r2, [sp, #0xc] - str r3, [sp, #0x10] - bl sub_02009D34 - cmp r0, #0 - bne _021D3542 - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021D3542: - ldr r0, [sp, #0x2c] - ldr r2, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #0x28] - ldr r3, [sp, #0x10] - str r0, [sp, #4] - ldr r0, _021D3580 ; =0x00000162 - add r1, r7, #0 - ldrh r0, [r5, r0] - str r0, [sp, #8] - ldr r0, [r6, r4] - bl sub_02009BC4 - add r1, r0, #0 - beq _021D3578 - mov r0, #0x52 - add r2, r5, r4 - lsl r0, r0, #2 - ldr r0, [r2, r0] - bl ov5_021D3478 - cmp r0, #1 - beq _021D357C - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021D3578: - bl sub_02022974 -_021D357C: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3580: .word 0x00000162 - thumb_func_end ov5_021D3518 - - thumb_func_start ov5_021D3584 -ov5_021D3584: ; 0x021D3584 - push {r3, r4, r5, r6, lr} - sub sp, #0x74 - add r5, r0, #0 - ldr r0, _021D3758 ; =0x00000162 - add r4, r1, #0 - ldrh r0, [r5, r0] - mov r1, #0x10 - bl sub_02018144 - add r6, r0, #0 - ldr r0, _021D3758 ; =0x00000162 - mov r1, #8 - ldrh r0, [r5, r0] - bl sub_02018144 - str r0, [r6, #8] - ldr r0, _021D3758 ; =0x00000162 - mov r1, #0x24 - ldrh r0, [r5, r0] - bl sub_02018144 - ldr r1, [r6, #8] - add r2, r4, #0 - str r0, [r1, #0] - ldr r0, [r6, #8] - mov r1, #0 - ldr r0, [r0, #0] - add r3, sp, #0x2c - str r0, [r6, #4] -_021D35BE: - ldr r0, [r2, #0x14] - add r1, r1, #1 - add r2, r2, #4 - stmia r3!, {r0} - cmp r1, #6 - blt _021D35BE - mov r1, #5 - lsl r1, r1, #6 - ldr r0, [r5, r1] - cmp r0, #0 - beq _021D35DC - add r1, r1, #4 - ldr r1, [r5, r1] - cmp r1, #0 - bne _021D35E6 -_021D35DC: - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x3c] - str r0, [sp, #0x40] - b _021D361C -_021D35E6: - mov r2, #0 - ldr r1, [sp, #0x3c] - mvn r2, r2 - cmp r1, r2 - beq _021D35FE - bl sub_02009D34 - cmp r0, #0 - bne _021D35FE - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x3c] -_021D35FE: - mov r0, #0 - ldr r1, [sp, #0x40] - mvn r0, r0 - cmp r1, r0 - beq _021D361C - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009D34 - cmp r0, #0 - bne _021D361C - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x40] -_021D361C: - ldr r0, [sp, #0x38] - str r0, [sp] - ldr r0, [sp, #0x3c] - str r0, [sp, #4] - ldr r0, [sp, #0x40] - str r0, [sp, #8] - ldr r0, [r4, #0x30] - str r0, [sp, #0xc] - ldr r0, [r4, #0x2c] - str r0, [sp, #0x10] - mov r0, #0x13 - lsl r0, r0, #4 - ldr r1, [r5, r0] - str r1, [sp, #0x14] - add r1, r0, #4 - ldr r1, [r5, r1] - str r1, [sp, #0x18] - add r1, r0, #0 - add r1, #8 - ldr r1, [r5, r1] - str r1, [sp, #0x1c] - add r1, r0, #0 - add r1, #0xc - ldr r1, [r5, r1] - str r1, [sp, #0x20] - add r1, r0, #0 - add r1, #0x10 - ldr r1, [r5, r1] - add r0, #0x14 - str r1, [sp, #0x24] - ldr r0, [r5, r0] - str r0, [sp, #0x28] - ldr r0, [r6, #4] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x30] - ldr r3, [sp, #0x34] - bl sub_020093B4 - ldr r0, [r5, #0] - str r0, [sp, #0x44] - ldr r0, [r6, #4] - str r0, [sp, #0x48] - mov r0, #0 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _021D368A - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D3698 -_021D368A: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D3698: - bl sub_020E1740 - str r0, [sp, #0x4c] - mov r0, #2 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _021D36B8 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D36C6 -_021D36B8: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D36C6: - bl sub_020E1740 - str r0, [sp, #0x50] - mov r0, #4 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _021D36E6 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D36F4 -_021D36E6: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D36F4: - bl sub_020E1740 - str r0, [sp, #0x54] - ldr r0, [r4, #0x10] - cmp r0, #2 - bne _021D370A - mov r0, #3 - ldr r1, [sp, #0x50] - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x50] -_021D370A: - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #0x58] - str r0, [sp, #0x5c] - str r0, [sp, #0x60] - mov r1, #0 - add r0, sp, #0x2c - strh r1, [r0, #0x38] - ldr r0, [r4, #8] - str r0, [sp, #0x68] - ldr r0, [r4, #0x10] - str r0, [sp, #0x6c] - ldr r0, _021D3758 ; =0x00000162 - ldrh r0, [r5, r0] - str r0, [sp, #0x70] - add r0, sp, #0x44 - bl sub_02021AA0 - str r0, [r6, #0] - cmp r0, #0 - beq _021D374E - bl sub_02021EE8 - add r5, r0, #0 - ldrh r1, [r4, #6] - ldr r0, [r6, #0] - bl sub_02021D6C - ldr r1, [r4, #0xc] - ldr r0, [r6, #0] - add r1, r5, r1 - bl sub_02021E90 - b _021D3752 -_021D374E: - bl sub_02022974 -_021D3752: - add r0, r6, #0 - add sp, #0x74 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D3758: .word 0x00000162 - thumb_func_end ov5_021D3584 - - thumb_func_start ov5_021D375C -ov5_021D375C: ; 0x021D375C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - bl sub_02021964 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0200A508 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0200A700 - mov r0, #0x16 - lsl r0, r0, #4 - ldrh r0, [r6, r0] - mov r4, #0 - cmp r0, #0 - bls _021D37AA - mov r7, #0x16 - add r5, r6, #0 - lsl r7, r7, #4 -_021D378C: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009D20 - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02009754 - ldrh r0, [r6, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blo _021D378C -_021D37AA: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D375C - - thumb_func_start ov5_021D37AC -ov5_021D37AC: ; 0x021D37AC - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - mov r0, #0 - ldr r1, [r7, #0x18] - mvn r0, r0 - add r4, r3, #0 - cmp r1, r0 - bne _021D37C4 - bl sub_02022974 -_021D37C4: - mov r0, #0 - add r1, r6, #0 -_021D37C8: - ldr r2, [r1, #0] - cmp r2, #0 - beq _021D37DE - ldr r2, [r1, #0xc] - cmp r4, r2 - bne _021D37DE - ldr r2, [r1, #4] - cmp r2, r5 - bne _021D37DE - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D37DE: - add r0, r0, #1 - add r1, #0x10 - cmp r0, #2 - blt _021D37C8 - mov r2, #0 - add r1, r6, #0 -_021D37EA: - ldr r0, [r1, #0] - cmp r0, #0 - bne _021D3800 - lsl r1, r2, #4 - mov r0, #1 - str r0, [r6, r1] - add r0, r6, r1 - str r4, [r0, #0xc] - str r7, [r0, #8] - str r5, [r0, #4] - b _021D3808 -_021D3800: - add r2, r2, #1 - add r1, #0x10 - cmp r2, #2 - blt _021D37EA -_021D3808: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D37AC - - thumb_func_start ov5_021D380C -ov5_021D380C: ; 0x021D380C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0 - add r4, r1, #0 - mvn r0, r0 - add r7, r2, #0 - add r5, r3, #0 - cmp r4, r0 - bne _021D3822 - bl sub_02022974 -_021D3822: - add r0, r6, #0 - add r1, r4, #0 - mov r2, #4 - bl sub_02006CB8 - add r4, r0, #0 - bne _021D3834 - bl sub_02022974 -_021D3834: - add r0, r4, #0 - mov r1, #0 - bl sub_020B3C5C - add r6, r0, #0 - bne _021D3844 - bl sub_02022974 -_021D3844: - ldr r0, [sp, #0x1c] - add r1, r6, #0 - add r2, r7, #0 - bl sub_020B2CB4 - str r0, [r5, #0] - cmp r5, #0 - bne _021D3858 - bl sub_02022974 -_021D3858: - ldr r0, [r5, #0] - ldr r3, [sp, #0x18] - add r1, r6, #0 - add r2, r7, #0 - bl sub_020AE4F0 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D380C - - thumb_func_start ov5_021D3868 -ov5_021D3868: ; 0x021D3868 - push {r3, lr} - cmp r1, #0 - bne _021D3872 - mov r0, #0 - pop {r3, pc} -_021D3872: - cmp r0, #0 - bne _021D387A - mov r0, #0 - pop {r3, pc} -_021D387A: - bl sub_020AE870 - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3868 - - thumb_func_start ov5_021D3884 -ov5_021D3884: ; 0x021D3884 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021D388C: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D38AE - ldr r0, [r5, #8] - bl ov5_021D3F70 - cmp r0, #0 - beq _021D38AE - ldr r1, [r5, #8] - ldr r0, [r5, #4] - ldr r1, [r1, #0] - bl ov5_021D3868 - str r6, [r5, #0] - str r6, [r5, #0xc] - str r6, [r5, #8] - str r6, [r5, #4] -_021D38AE: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #2 - blt _021D388C - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D3884 - - thumb_func_start ov5_021D38B8 -ov5_021D38B8: ; 0x021D38B8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0xae - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - add r7, r0, #0 - mov r1, #0 - add r2, r7, #0 - add r6, r1, #0 - sub r0, r1, #1 -_021D38CE: - str r6, [r2, #0x14] - str r6, [r2, #0x20] - str r6, [r2, #0x10] - str r6, [r2, #0x18] - str r6, [r2, #0x1c] - str r6, [r2, #0x24] - str r0, [r2, #0x28] - str r6, [r2, #0x2c] - str r6, [r2, #0x30] - str r6, [r2, #0x34] - add r1, r1, #1 - add r2, #0x28 - cmp r1, #0x10 - blt _021D38CE - mov r0, #0x29 - lsl r0, r0, #4 - add r2, r0, #0 - add r3, r0, #0 - add r5, r7, #0 - mov r4, #0 - add r1, r0, #4 - add r2, #8 - add r3, #0xc -_021D38FC: - str r4, [r5, r0] - str r4, [r5, r1] - str r4, [r5, r2] - str r4, [r5, r3] - add r6, r6, #1 - add r5, #0x10 - cmp r6, #2 - blt _021D38FC - mov r1, #4 - add r0, r7, #0 - add r2, r1, #0 - bl sub_020182CC - mov r0, #0x6e - mov r1, #4 - bl sub_02006C24 - mov r1, #0x2b - lsl r1, r1, #4 - str r0, [r7, r1] - mov r0, #0x6f - mov r1, #4 - bl sub_02006C24 - mov r1, #0xad - lsl r1, r1, #2 - str r0, [r7, r1] - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D38B8 - - thumb_func_start ov5_021D3938 -ov5_021D3938: ; 0x021D3938 - cmp r0, #0 - bne _021D3940 - mov r0, #0 - bx lr -_021D3940: - ldr r0, [r0, #0] - bx lr - thumb_func_end ov5_021D3938 - - thumb_func_start ov5_021D3944 -ov5_021D3944: ; 0x021D3944 - mov r1, #1 - and r0, r1 - cmp r0, #1 - beq _021D394E - mov r1, #0 -_021D394E: - add r0, r1, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D3944 - - thumb_func_start ov5_021D3954 -ov5_021D3954: ; 0x021D3954 - asr r1, r0, #1 - mov r0, #1 - and r1, r0 - cmp r1, #1 - beq _021D3960 - mov r0, #0 -_021D3960: - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D3954 - - thumb_func_start ov5_021D3964 -ov5_021D3964: ; 0x021D3964 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #1 - beq _021D3972 - bl sub_02022974 -_021D3972: - ldr r0, [r4, #0x1c] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3964 - - thumb_func_start ov5_021D3978 -ov5_021D3978: ; 0x021D3978 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r6, r0, #0 - mov r0, #0xad - ldr r7, [sp, #0x4c] - lsl r0, r0, #2 - add r4, r1, #0 - str r2, [sp, #8] - ldr r0, [r7, r0] - add r1, r6, #0 - add r2, sp, #0x10 - add r5, r3, #0 - bl sub_02006D28 - cmp r4, #4 - blt _021D399C - bl sub_02022974 -_021D399C: - lsl r1, r4, #2 - add r0, sp, #0x14 - ldr r0, [r0, r1] - mov r1, #0 - mvn r1, r1 - str r0, [sp, #0xc] - cmp r0, r1 - bne _021D39B2 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D39B2: - add r0, sp, #0x10 - ldrb r0, [r0, #1] - bl ov5_021D3944 - ldr r1, [sp, #0x40] - cmp r1, r0 - beq _021D39C6 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D39C6: - mov r6, #0 - add r4, r7, #0 -_021D39CA: - cmp r5, #0 - beq _021D39D8 - ldr r0, [r4, #0x34] - cmp r5, r0 - bne _021D39D8 - bl sub_02022974 -_021D39D8: - add r6, r6, #1 - add r4, #0x28 - cmp r6, #0x10 - blt _021D39CA - mov r2, #0 - add r1, r7, #0 -_021D39E4: - ldr r0, [r1, #0x14] - cmp r0, #0 - bne _021D3A3C - add r4, r2, #0 - mov r0, #0x28 - mul r4, r0 - mov r1, #1 - add r0, r7, r4 - str r1, [r0, #0x14] - ldr r1, [sp, #0x3c] - add r6, r7, #0 - str r1, [r0, #0x20] - add r6, #0x10 - mov r1, #0 - str r1, [r6, r4] - str r1, [r0, #0x18] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x44] - str r1, [r0, #0x1c] - ldr r1, [sp, #0x38] - add r3, r6, r4 - str r1, [r0, #0x30] - str r5, [r0, #0x34] - ldr r0, [sp, #0x48] - ldr r1, [sp, #0xc] - str r0, [sp] - mov r0, #0x2b - str r7, [sp, #4] - lsl r0, r0, #4 - ldr r0, [r7, r0] - bl ov5_021D380C - add r1, r7, r4 - str r0, [r1, #0x24] - ldr r0, [sp, #8] - str r0, [r1, #0x28] - mov r0, #1 - str r0, [r1, #0x2c] - add r0, r6, r4 - bl ov5_021D3E7C - add sp, #0x24 - add r0, r6, r4 - pop {r4, r5, r6, r7, pc} -_021D3A3C: - add r2, r2, #1 - add r1, #0x28 - cmp r2, #0x10 - blt _021D39E4 - bl sub_02022974 - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3978 - - thumb_func_start ov5_021D3A50 -ov5_021D3A50: ; 0x021D3A50 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r4, r0, #0 - mov r0, #0xad - add r6, r3, #0 - lsl r0, r0, #2 - str r1, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r6, r0] - add r1, r4, #0 - add r2, sp, #0x20 - bl sub_02006D28 - add r0, sp, #0x20 - ldrb r0, [r0] - cmp r0, #0 - beq _021D3B20 - mov r0, #0 - str r0, [sp, #0x14] - add r0, sp, #0x20 - str r0, [sp, #0x10] -_021D3A7A: - ldr r0, [sp, #0x10] - mov r1, #0 - ldr r0, [r0, #4] - mvn r1, r1 - str r0, [sp, #0x18] - cmp r0, r1 - beq _021D3B20 - add r0, sp, #0x20 - ldrb r0, [r0, #1] - bl ov5_021D3944 - cmp r0, #0 - bne _021D3B20 - mov r4, #0 - add r1, r6, #0 -_021D3A98: - ldr r0, [r1, #0x14] - cmp r0, #0 - bne _021D3B00 - mov r0, #0x28 - add r7, r4, #0 - mul r7, r0 - add r5, r6, r7 - mov r0, #1 - str r0, [r5, #0x14] - mov r1, #0 - str r1, [r5, #0x20] - str r1, [r5, #0x10] - ldr r0, [sp, #0x18] - str r1, [r5, #0x18] - str r0, [r5, #0x1c] - add r0, r6, #0 - str r0, [sp, #0x1c] - add r0, #0x10 - str r0, [sp, #0x1c] - str r1, [r5, #0x30] - str r1, [r5, #0x34] - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x1c] - str r0, [sp] - mov r0, #0x2b - str r6, [sp, #4] - lsl r0, r0, #4 - ldr r0, [r6, r0] - ldr r1, [sp, #0x18] - ldr r2, [sp, #8] - add r3, r3, r7 - bl ov5_021D380C - str r0, [r5, #0x24] - mov r0, #0 - mvn r0, r0 - str r0, [r5, #0x28] - mov r0, #1 - str r0, [r5, #0x2c] - ldr r0, [sp, #0x1c] - add r0, r0, r7 - bl ov5_021D3E7C - add r0, sp, #0x20 - ldrb r0, [r0, #2] - cmp r0, #0 - beq _021D3B08 - add r1, r5, #0 - mov r0, #1 - str r0, [r1, #0x20] - str r0, [r1, #0x28] - b _021D3B08 -_021D3B00: - add r4, r4, #1 - add r1, #0x28 - cmp r4, #0x10 - blt _021D3A98 -_021D3B08: - cmp r4, #0x10 - bne _021D3B10 - bl sub_02022974 -_021D3B10: - ldr r0, [sp, #0x10] - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #4 - blt _021D3A7A -_021D3B20: - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021D3A50 - - thumb_func_start ov5_021D3B24 -ov5_021D3B24: ; 0x021D3B24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - ldr r6, [sp, #0x30] - add r5, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - str r3, [sp] - cmp r6, #0 - bne _021D3B40 - bl sub_02022974 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D3B40: - add r0, r6, #0 - bl ov5_021D3F84 - cmp r5, r0 - blt _021D3B50 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D3B50: - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r1, r5, #0 - add r2, sp, #4 - bl sub_02006D28 - cmp r4, #4 - blt _021D3B66 - bl sub_02022974 -_021D3B66: - lsl r1, r4, #2 - add r0, sp, #8 - ldr r5, [r0, r1] - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _021D3B7A - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D3B7A: - add r0, sp, #4 - ldrb r0, [r0, #1] - bl ov5_021D3954 - cmp r7, r0 - beq _021D3B8C - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D3B8C: - mov r4, #0 - add r1, r6, #0 -_021D3B90: - ldr r0, [r1, #0x1c] - cmp r5, r0 - bne _021D3BD4 - add r0, sp, #4 - ldrb r0, [r0, #2] - cmp r0, #0 - beq _021D3BBA - add r2, r6, #0 - mov r3, #0x28 - mov r0, #0x29 - lsl r0, r0, #4 - add r2, #0x10 - mul r3, r4 - add r2, r2, r3 - lsl r3, r5, #0x18 - ldr r1, [sp] - add r0, r6, r0 - lsr r3, r3, #0x18 - bl ov5_021D37AC - b _021D3BBC -_021D3BBA: - mov r0, #1 -_021D3BBC: - cmp r0, #0 - beq _021D3BCE - mov r1, #0x28 - mul r1, r4 - add r1, r6, r1 - ldr r0, [sp] - ldr r1, [r1, #0x10] - bl sub_020AE77C -_021D3BCE: - add sp, #0x18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D3BD4: - add r4, r4, #1 - add r1, #0x28 - cmp r4, #0x10 - blt _021D3B90 - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3B24 - - thumb_func_start ov5_021D3BE4 -ov5_021D3BE4: ; 0x021D3BE4 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, _021D3CA8 ; =0x00000000 - str r1, [sp, #0xc] - add r4, r2, #0 - str r0, [sp] - bne _021D3BF8 - bl sub_02022974 -_021D3BF8: - add r0, r4, #0 - bl ov5_021D3F84 - cmp r5, r0 - blt _021D3C08 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D3C08: - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - add r2, sp, #0x10 - bl sub_02006D28 - add r0, sp, #0x10 - ldrb r0, [r0, #1] - bl ov5_021D3954 - cmp r0, #0 - beq _021D3C28 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D3C28: - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - str r0, [sp, #8] - add r0, #0x10 - add r7, sp, #0x10 - str r0, [sp, #8] -_021D3C36: - mov r0, #0 - ldr r3, [r7, #4] - mvn r0, r0 - cmp r3, r0 - bne _021D3C46 - ldr r0, [sp] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} -_021D3C46: - mov r5, #0 - add r1, r4, #0 -_021D3C4A: - ldr r0, [r1, #0x1c] - cmp r3, r0 - bne _021D3C8E - add r0, sp, #0x10 - ldrb r0, [r0, #2] - cmp r0, #0 - beq _021D3C74 - mov r2, #0x28 - add r6, r5, #0 - mov r0, #0x29 - mul r6, r2 - ldr r2, [sp, #8] - lsl r0, r0, #4 - lsl r3, r3, #0x18 - ldr r1, [sp, #0xc] - add r0, r4, r0 - add r2, r2, r6 - lsr r3, r3, #0x18 - bl ov5_021D37AC - b _021D3C76 -_021D3C74: - mov r0, #1 -_021D3C76: - cmp r0, #0 - beq _021D3C96 - mov r1, #0x28 - mul r1, r5 - add r1, r4, r1 - ldr r0, [sp, #0xc] - ldr r1, [r1, #0x10] - bl sub_020AE77C - mov r0, #1 - str r0, [sp] - b _021D3C96 -_021D3C8E: - add r5, r5, #1 - add r1, #0x28 - cmp r5, #0x10 - blt _021D3C4A -_021D3C96: - ldr r0, [sp, #4] - add r7, r7, #4 - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #4 - blt _021D3C36 - ldr r0, [sp] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3CA8: .word 0x00000000 - thumb_func_end ov5_021D3BE4 - - thumb_func_start ov5_021D3CAC -ov5_021D3CAC: ; 0x021D3CAC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - beq _021D3CE0 - mov r4, #0 - add r5, r6, #0 - add r7, r4, #0 -_021D3CB8: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021D3CD8 - cmp r0, #1 - bne _021D3CD2 - ldr r1, [r5, #0x10] - add r0, r6, #0 - bl sub_020B2CD8 - str r7, [r5, #0x10] - ldr r0, [r5, #0x24] - bl sub_020181C4 -_021D3CD2: - mov r0, #0 - str r0, [r5, #0x14] - str r0, [r5, #0x34] -_021D3CD8: - add r4, r4, #1 - add r5, #0x28 - cmp r4, #0x10 - blt _021D3CB8 -_021D3CE0: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3CAC - - thumb_func_start ov5_021D3CE4 -ov5_021D3CE4: ; 0x021D3CE4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - beq _021D3D16 - cmp r5, #0 - bne _021D3CF4 - bl sub_02022974 -_021D3CF4: - ldr r0, [r5, #4] - cmp r0, #0 - beq _021D3D16 - cmp r0, #1 - bne _021D3D10 - ldr r1, [r5, #0] - add r0, r4, #0 - bl sub_020B2CD8 - mov r0, #0 - str r0, [r5, #0] - ldr r0, [r5, #0x14] - bl sub_020181C4 -_021D3D10: - mov r0, #0 - str r0, [r5, #4] - str r0, [r5, #0x24] -_021D3D16: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D3CE4 - - thumb_func_start ov5_021D3D18 -ov5_021D3D18: ; 0x021D3D18 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0xad - lsl r0, r0, #2 - add r6, r1, #0 - add r1, r2, #0 - ldr r0, [r4, r0] - add r2, sp, #0 - add r5, r3, #0 - bl sub_02006D28 - cmp r5, #4 - blt _021D3D38 - bl sub_02022974 -_021D3D38: - lsl r1, r5, #2 - add r0, sp, #4 - ldr r5, [r0, r1] - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _021D3D4A - bl sub_02022974 -_021D3D4A: - mov r0, #0 - mov r2, #0x28 -_021D3D4E: - add r1, r0, #0 - mul r1, r2 - add r1, r4, r1 - ldr r3, [r1, #0x14] - cmp r3, #1 - bne _021D3D6C - ldr r3, [r1, #0x1c] - cmp r5, r3 - bne _021D3D6C - ldr r1, [r1, #0x10] - add r0, r6, #0 - bl ov5_021D3868 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021D3D6C: - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x10 - blo _021D3D4E - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3D18 - - thumb_func_start ov5_021D3D7C -ov5_021D3D7C: ; 0x021D3D7C - push {r4, lr} - add r4, r0, #0 - beq _021D3D9C - mov r0, #0x2b - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02006CA8 - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02006CA8 - add r0, r4, #0 - bl sub_020181C4 -_021D3D9C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3D7C - - thumb_func_start ov5_021D3DA0 -ov5_021D3DA0: ; 0x021D3DA0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _021D3DAE - bl sub_02022974 -_021D3DAE: - mov r6, #0 - add r1, r6, #0 - add r2, r4, #0 -_021D3DB4: - ldr r0, [r2, #0x34] - cmp r5, r0 - bne _021D3DCE - mov r0, #0x28 - add r4, #0x10 - mul r0, r1 - add r6, r4, r0 - ldr r0, [r6, #4] - cmp r0, #0 - bne _021D3DD6 - bl sub_02022974 - b _021D3DD6 -_021D3DCE: - add r1, r1, #1 - add r2, #0x28 - cmp r1, #0x10 - blt _021D3DB4 -_021D3DD6: - cmp r6, #0 - bne _021D3DDE - bl sub_02022974 -_021D3DDE: - add r0, r6, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3DA0 - - thumb_func_start ov5_021D3DE4 -ov5_021D3DE4: ; 0x021D3DE4 - push {r4, r5, lr} - sub sp, #0x14 - add r3, r0, #0 - mov r0, #0xad - add r5, r2, #0 - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - add r1, r3, #0 - add r2, sp, #0 - bl sub_02006D28 - cmp r4, #4 - blt _021D3E04 - bl sub_02022974 -_021D3E04: - lsl r1, r4, #2 - add r0, sp, #4 - mov r4, #0 - ldr r1, [r0, r1] - add r2, r4, #0 - add r3, r5, #0 -_021D3E10: - ldr r0, [r3, #0x1c] - cmp r1, r0 - bne _021D3E2A - mov r0, #0x28 - add r5, #0x10 - mul r0, r2 - add r4, r5, r0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021D3E32 - bl sub_02022974 - b _021D3E32 -_021D3E2A: - add r2, r2, #1 - add r3, #0x28 - cmp r2, #0x10 - blt _021D3E10 -_021D3E32: - cmp r4, #0 - bne _021D3E3A - bl sub_02022974 -_021D3E3A: - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov5_021D3DE4 - - thumb_func_start ov5_021D3E40 -ov5_021D3E40: ; 0x021D3E40 - str r1, [r0, #0x10] - bx lr - thumb_func_end ov5_021D3E40 - - thumb_func_start ov5_021D3E44 -ov5_021D3E44: ; 0x021D3E44 - mov r1, #1 - str r1, [r0, #0x1c] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D3E44 - - thumb_func_start ov5_021D3E4C -ov5_021D3E4C: ; 0x021D3E4C - ldr r1, [r0, #0x20] - ldr r0, [r0, #0] - cmp r1, #0 - bne _021D3E6E - ldr r2, [r0, #0] - ldr r0, [r0, #8] - ldrh r0, [r0, #4] - lsl r1, r0, #0xc - mov r0, #1 - lsl r0, r0, #0xc - sub r0, r1, r0 - cmp r2, r0 - blt _021D3E6A - mov r0, #1 - bx lr -_021D3E6A: - mov r0, #0 - bx lr -_021D3E6E: - ldr r0, [r0, #0] - cmp r0, #0 - bne _021D3E78 - mov r0, #1 - bx lr -_021D3E78: - mov r0, #0 - bx lr - thumb_func_end ov5_021D3E4C - - thumb_func_start ov5_021D3E7C -ov5_021D3E7C: ; 0x021D3E7C - ldr r1, [r0, #0x20] - cmp r1, #0 - bne _021D3E8A - ldr r0, [r0, #0] - mov r1, #0 - str r1, [r0, #0] - bx lr -_021D3E8A: - ldr r2, [r0, #0] - ldr r0, [r2, #8] - ldrh r0, [r0, #4] - lsl r1, r0, #0xc - mov r0, #1 - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [r2, #0] - bx lr - thumb_func_end ov5_021D3E7C - - thumb_func_start ov5_021D3E9C -ov5_021D3E9C: ; 0x021D3E9C - ldr r1, [r0, #0x20] - cmp r1, #0 - bne _021D3EB4 - ldr r2, [r0, #0] - ldr r0, [r2, #8] - ldrh r0, [r0, #4] - lsl r1, r0, #0xc - mov r0, #1 - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [r2, #0] - bx lr -_021D3EB4: - ldr r0, [r0, #0] - mov r1, #0 - str r1, [r0, #0] - bx lr - thumb_func_end ov5_021D3E9C - - thumb_func_start ov5_021D3EBC -ov5_021D3EBC: ; 0x021D3EBC - ldr r1, [r0, #0x20] - cmp r1, #0 - bne _021D3EE2 - ldr r3, [r0, #0] - mov r1, #1 - ldr r2, [r3, #0] - lsl r1, r1, #0xc - add r1, r2, r1 - str r1, [r3, #0] - ldr r2, [r0, #0] - ldr r0, [r2, #8] - ldr r1, [r2, #0] - ldrh r0, [r0, #4] - lsl r0, r0, #0xc - cmp r1, r0 - bne _021D3F02 - mov r0, #0 - str r0, [r2, #0] - bx lr -_021D3EE2: - ldr r0, [r0, #0] - ldr r2, [r0, #0] - cmp r2, #0 - bgt _021D3EFA - ldr r1, [r0, #8] - ldrh r1, [r1, #4] - lsl r2, r1, #0xc - mov r1, #1 - lsl r1, r1, #0xc - sub r1, r2, r1 - str r1, [r0, #0] - bx lr -_021D3EFA: - mov r1, #1 - lsl r1, r1, #0xc - sub r1, r2, r1 - str r1, [r0, #0] -_021D3F02: - bx lr - thumb_func_end ov5_021D3EBC - - thumb_func_start ov5_021D3F04 -ov5_021D3F04: ; 0x021D3F04 - str r1, [r0, #0x20] - bx lr - thumb_func_end ov5_021D3F04 - - thumb_func_start ov5_021D3F08 -ov5_021D3F08: ; 0x021D3F08 - str r1, [r0, #0x18] - bx lr - thumb_func_end ov5_021D3F08 - - thumb_func_start ov5_021D3F0C -ov5_021D3F0C: ; 0x021D3F0C - str r1, [r0, #0x24] - bx lr - thumb_func_end ov5_021D3F0C - - thumb_func_start ov5_021D3F10 -ov5_021D3F10: ; 0x021D3F10 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - cmp r0, #0 - beq _021D3F6E - mov r4, #0 - add r5, r0, #0 - add r5, #0x10 - add r6, r4, #0 - sub r7, r4, #1 -_021D3F22: - ldr r0, [r5, #4] - cmp r0, #1 - bne _021D3F5A - ldr r0, [r5, #0x10] - cmp r0, #1 - beq _021D3F5A - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _021D3F5A - add r0, r5, #0 - bl ov5_021D3EBC - ldr r0, [r5, #0x18] - cmp r0, r7 - beq _021D3F5A - add r0, r5, #0 - bl ov5_021D3E4C - cmp r0, #0 - beq _021D3F5A - ldr r0, [r5, #8] - add r1, r0, #1 - ldr r0, [r5, #0x18] - cmp r1, r0 - blt _021D3F58 - str r6, [r5, #0x1c] - b _021D3F5A -_021D3F58: - str r1, [r5, #8] -_021D3F5A: - add r4, r4, #1 - add r5, #0x28 - cmp r4, #0x10 - blt _021D3F22 - mov r1, #0x29 - ldr r0, [sp] - lsl r1, r1, #4 - add r0, r0, r1 - bl ov5_021D3884 -_021D3F6E: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D3F10 - - thumb_func_start ov5_021D3F70 -ov5_021D3F70: ; 0x021D3F70 - push {r3, lr} - bl ov5_021D3964 - cmp r0, #0 - bne _021D3F7E - mov r0, #1 - pop {r3, pc} -_021D3F7E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3F70 - - thumb_func_start ov5_021D3F84 -ov5_021D3F84: ; 0x021D3F84 - mov r1, #0xad - lsl r1, r1, #2 - ldr r3, _021D3F90 ; =sub_02006E34 - ldr r0, [r0, r1] - bx r3 - nop -_021D3F90: .word sub_02006E34 - thumb_func_end ov5_021D3F84 - - thumb_func_start ov5_021D3F94 -ov5_021D3F94: ; 0x021D3F94 - push {lr} - sub sp, #0x14 - mov r2, #0xad - lsl r2, r2, #2 - ldr r0, [r0, r2] - add r2, sp, #0 - bl sub_02006D28 - add r0, sp, #0 - ldrb r0, [r0] - cmp r0, #0 - bne _021D3FB2 - add sp, #0x14 - mov r0, #0 - pop {pc} -_021D3FB2: - mov r0, #0 - add r3, sp, #0 - sub r1, r0, #1 -_021D3FB8: - lsl r2, r0, #2 - add r2, r3, r2 - ldr r2, [r2, #4] - cmp r2, r1 - beq _021D3FCC - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #4 - blo _021D3FB8 -_021D3FCC: - add sp, #0x14 - pop {pc} - thumb_func_end ov5_021D3F94 - - thumb_func_start ov5_021D3FD0 -ov5_021D3FD0: ; 0x021D3FD0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bne _021D3FDC - bl sub_02022974 -_021D3FDC: - mov r1, #0x10 - mov r0, #0 - mov r2, #0x38 -_021D3FE2: - cmp r1, #0x10 - bne _021D3FF6 - add r3, r0, #0 - mul r3, r2 - add r3, r5, r3 - add r3, #0x34 - ldrb r3, [r3] - cmp r3, #0 - bne _021D3FF6 - add r1, r0, #0 -_021D3FF6: - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x10 - blo _021D3FE2 - cmp r1, #0x10 - beq _021D4012 - mov r0, #0x38 - add r2, r1, #0 - mul r2, r0 - add r0, r5, r2 - add r0, #0x34 - strb r4, [r0] - b _021D401A -_021D4012: - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D401A: - add r0, r5, r2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D3FD0 - - thumb_func_start ov5_021D4020 -ov5_021D4020: ; 0x021D4020 - add r1, r0, #0 - mov r3, #0 - add r1, #0x34 - strb r3, [r1] - str r3, [r0, #0x30] - str r3, [r0, #0x2c] - add r2, r3, #0 -_021D402E: - lsl r1, r3, #2 - add r1, r0, r1 - str r2, [r1, #0x14] - add r1, r3, #1 - lsl r1, r1, #0x18 - lsr r3, r1, #0x18 - cmp r3, #6 - blo _021D402E - bx lr - thumb_func_end ov5_021D4020 - - thumb_func_start ov5_021D4040 -ov5_021D4040: ; 0x021D4040 - push {r4, r5} - mov r4, #0 - add r3, r4, #0 - add r5, r0, #0 -_021D4048: - add r2, r5, #0 - add r2, #0x34 - ldrb r2, [r2] - cmp r1, r2 - bne _021D405A - mov r1, #0x38 - mul r1, r3 - add r4, r0, r1 - b _021D4062 -_021D405A: - add r3, r3, #1 - add r5, #0x38 - cmp r3, #0x10 - blt _021D4048 -_021D4062: - add r0, r4, #0 - pop {r4, r5} - bx lr - thumb_func_end ov5_021D4040 - - thumb_func_start ov5_021D4068 -ov5_021D4068: ; 0x021D4068 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #4 - ble _021D4078 - bl sub_02022974 -_021D4078: - cmp r5, #0 - beq _021D407E - str r5, [r6, #0x14] -_021D407E: - str r4, [r6, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D4068 - - thumb_func_start ov5_021D4084 -ov5_021D4084: ; 0x021D4084 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - add r6, r2, #0 - cmp r4, r0 - blt _021D4096 - bl sub_02022974 -_021D4096: - lsl r0, r4, #2 - str r6, [r5, r0] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D4084 - - thumb_func_start ov5_021D409C -ov5_021D409C: ; 0x021D409C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - cmp r4, r0 - blt _021D40AE - bl sub_02022974 -_021D40AE: - lsl r0, r4, #2 - ldr r0, [r5, r0] - str r0, [sp, #4] - bl ov5_021D3938 - str r0, [sp] - ldr r0, [r5, #0x2c] - bl ov5_021D3938 - add r7, r0, #0 - mov r4, #0 -_021D40C4: - lsl r0, r4, #2 - add r6, r5, r0 - ldr r0, [r6, #0x14] - cmp r0, #0 - beq _021D40DC - add r1, r7, #0 - bl ov5_021D3868 - ldr r0, [r6, #0x14] - ldr r1, [sp] - bl sub_020AE77C -_021D40DC: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #6 - blo _021D40C4 - ldr r0, [sp, #4] - str r0, [r5, #0x2c] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D409C - - thumb_func_start ov5_021D40F0 -ov5_021D40F0: ; 0x021D40F0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #0x18] - ldr r0, [sp, #0x40] - str r1, [sp, #0x1c] - str r0, [sp, #0x40] - ldr r0, [sp, #0x4c] - str r2, [sp, #0x20] - str r0, [sp, #0x4c] - add r0, r3, #0 - mov r5, #0 - str r3, [sp, #0x24] - ldr r6, [sp, #0x44] - ldr r7, [sp, #0x48] - cmp r0, #0 - ble _021D4148 -_021D4110: - str r6, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x40] - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - mov r3, #0 - str r7, [sp, #0x14] - bl ov5_021D3978 - add r4, r0, #0 - bne _021D4136 - bl sub_02022974 -_021D4136: - ldr r0, [sp, #0x4c] - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021D4084 - ldr r0, [sp, #0x24] - add r5, r5, #1 - cmp r5, r0 - blt _021D4110 -_021D4148: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D40F0 - - thumb_func_start ov5_021D414C -ov5_021D414C: ; 0x021D414C - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - str r0, [sp] - ldr r0, [r6, #0x2c] - bl ov5_021D3938 - add r7, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021D415E: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021D416A - add r1, r7, #0 - bl ov5_021D3868 -_021D416A: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _021D415E - ldr r0, [r6, #0x10] - mov r5, #0 - cmp r0, #0 - ble _021D4190 - add r4, r6, #0 - add r7, r5, #0 -_021D417E: - ldr r0, [r4, #0] - ldr r1, [sp] - bl ov5_021D3CE4 - stmia r4!, {r7} - ldr r0, [r6, #0x10] - add r5, r5, #1 - cmp r5, r0 - blt _021D417E -_021D4190: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D414C - - thumb_func_start ov5_021D4194 -ov5_021D4194: ; 0x021D4194 - push {r4, lr} - mov r1, #0xe - mov r0, #4 - lsl r1, r1, #6 - bl sub_02018144 - add r4, r0, #0 - mov r2, #0xe - mov r0, #0 - add r1, r4, #0 - lsl r2, r2, #6 - bl sub_020C4BB8 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D4194 - - thumb_func_start ov5_021D41B4 -ov5_021D41B4: ; 0x021D41B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D41C6 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] -_021D41C6: - pop {r4, pc} - thumb_func_end ov5_021D41B4 - - thumb_func_start ov5_021D41C8 -ov5_021D41C8: ; 0x021D41C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - add r0, r1, #0 - lsl r1, r2, #0x18 - lsr r1, r1, #0x18 - add r6, r3, #0 - bl ov5_021D3FD0 - add r5, r0, #0 - bne _021D41E6 - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021D41E6: - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x34] - add r2, r5, #0 - bl ov5_021D4068 - add r0, sp, #0x38 - ldrb r4, [r0] - cmp r4, #0 - bne _021D41FC - bl sub_02022974 -_021D41FC: - cmp r4, #0 - bne _021D4202 - mov r4, #1 -_021D4202: - ldr r0, [sp, #0x3c] - str r4, [sp] - str r0, [sp, #4] - str r7, [sp, #8] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x30] - ldr r3, [sp, #0x34] - add r0, r6, #0 - str r5, [sp, #0xc] - bl ov5_021D40F0 - str r6, [r5, #0x30] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D41C8 - - thumb_func_start ov5_021D4220 -ov5_021D4220: ; 0x021D4220 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r5, r0, #0 - add r7, r1, #0 - add r6, r3, #0 - cmp r4, #6 - blo _021D4232 - bl sub_02022974 -_021D4232: - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021D4040 - add r5, r0, #0 - add r5, #0x14 - lsl r4, r4, #2 - ldr r0, [r5, r4] - cmp r0, #0 - beq _021D424A - bl sub_02022974 -_021D424A: - str r6, [r5, r4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D4220 - - thumb_func_start ov5_021D4250 -ov5_021D4250: ; 0x021D4250 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0 - bne _021D4260 - bl sub_02022974 -_021D4260: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D4040 - add r1, r6, #0 - bl ov5_021D409C - mov r1, #0 - bl ov5_021D3E40 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D4250 - - thumb_func_start ov5_021D4278 -ov5_021D4278: ; 0x021D4278 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r7, r2, #0 - add r4, r3, #0 - cmp r5, #0 - bne _021D428A - bl sub_02022974 -_021D428A: - add r0, r6, #0 - add r1, r5, #0 - bl ov5_021D4040 - add r1, r7, #0 - bl ov5_021D409C - add r5, r0, #0 - cmp r4, #0 - beq _021D42A6 - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_021D42A6: - add r0, r5, #0 - mov r1, #0 - bl ov5_021D3E40 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D4278 - - thumb_func_start ov5_021D42B0 -ov5_021D42B0: ; 0x021D42B0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bne _021D42BE - bl sub_02022974 -_021D42BE: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021D4040 - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D414C - add r0, r4, #0 - bl ov5_021D4020 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D42B0 - - thumb_func_start ov5_021D42D8 -ov5_021D42D8: ; 0x021D42D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bne _021D42E4 - bl sub_02022974 -_021D42E4: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D4040 - ldr r0, [r0, #0x2c] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D42D8 - - thumb_func_start ov5_021D42F0 -ov5_021D42F0: ; 0x021D42F0 - push {r4, lr} - bl ov5_021D42D8 - add r4, r0, #0 - bne _021D42FE - bl sub_02022974 -_021D42FE: - add r0, r4, #0 - bl ov5_021D3F70 - cmp r0, #0 - beq _021D430C - mov r0, #1 - pop {r4, pc} -_021D430C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021D42F0 - - thumb_func_start ov5_021D4310 -ov5_021D4310: ; 0x021D4310 - push {r3, lr} - bl ov5_021D4040 - ldr r0, [r0, #0x30] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D4310 - - thumb_func_start ov5_021D431C -ov5_021D431C: ; 0x021D431C - push {r3, lr} - mov r0, #4 - mov r1, #0x28 - bl sub_02018184 - mov r1, #0 - str r1, [r0, #0] - pop {r3, pc} - thumb_func_end ov5_021D431C - - thumb_func_start ov5_021D432C -ov5_021D432C: ; 0x021D432C - ldr r3, _021D4330 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021D4330: .word sub_020181C4 - thumb_func_end ov5_021D432C - - thumb_func_start ov5_021D4334 -ov5_021D4334: ; 0x021D4334 - str r0, [r2, #0x14] - str r1, [r2, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D4334 - - thumb_func_start ov5_021D433C -ov5_021D433C: ; 0x021D433C - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - cmp r0, #5 - bls _021D434C - b _021D4510 -_021D434C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4358: ; jump table - .short _021D4364 - _021D4358 - 2 ; case 0 - .short _021D43FE - _021D4358 - 2 ; case 1 - .short _021D445E - _021D4358 - 2 ; case 2 - .short _021D4472 - _021D4358 - 2 ; case 3 - .short _021D4486 - _021D4358 - 2 ; case 4 - .short _021D44F4 - _021D4358 - 2 ; case 5 -_021D4364: - ldr r5, _021D4528 ; =0x021F89F4 - add r3, sp, #0x34 - mov r2, #0xa -_021D436A: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D436A - mov r0, #0 - str r0, [r4, #0x20] - strb r0, [r4, #0x1d] - mov r0, #3 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - add r0, sp, #0x24 - str r0, [sp, #8] - sub r2, r2, #2 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - add r3, r2, #0 - bl sub_020550F4 - mov r0, #1 - strb r0, [r4, #0x1c] - add r0, sp, #0x20 - str r0, [sp] - add r0, sp, #0x1c - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0x34 - mov r2, #0x14 - add r3, sp, #0x24 - bl sub_02055208 - cmp r0, #0 - beq _021D43EC - ldr r0, [r6, #0x50] - ldr r1, [sp, #0x1c] - bl ov5_021D3F94 - add r7, r0, #0 - strb r7, [r4, #0x1e] - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - bl ov5_021E18BC - add r5, r0, #0 - ldr r0, [sp, #0x20] - bl ov5_021E18C0 - str r5, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x18] - mov r2, #1 - str r0, [sp, #8] - str r7, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - ldr r3, [sp, #0x1c] - bl ov5_021D41C8 - b _021D43F6 -_021D43EC: - bl sub_02022974 - add sp, #0x84 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021D43F6: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4510 -_021D43FE: - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D4310 - add r5, r0, #0 - cmp r5, #0x4b - beq _021D4416 - ldr r0, [r6, #0x24] - bl sub_020206B0 - mov r0, #1 - str r0, [r4, #0x20] -_021D4416: - add r0, r5, #0 - bl ov5_021D481C - cmp r0, #1 - bne _021D4424 - ldr r5, _021D452C ; =0x00000608 - b _021D4434 -_021D4424: - add r0, r5, #0 - bl ov5_021D481C - cmp r0, #2 - bne _021D4432 - ldr r5, _021D4530 ; =0x000005D4 - b _021D4434 -_021D4432: - ldr r5, _021D4534 ; =0x00000605 -_021D4434: - ldrb r0, [r4, #0x1e] - cmp r0, #2 - bne _021D443E - mov r2, #0 - b _021D444C -_021D443E: - cmp r0, #4 - bne _021D4446 - mov r2, #0 - b _021D444C -_021D4446: - bl sub_02022974 - mov r2, #0 -_021D444C: - ldr r0, [r6, #0x54] - mov r1, #1 - add r3, r5, #0 - bl ov5_021D4278 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4510 -_021D445E: - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4510 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4510 -_021D4472: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - mov r1, #0xc - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4510 -_021D4486: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D4510 - add r0, r5, #0 - bl sub_020656AC - add r0, r5, #0 - mov r1, #1 - bl sub_02062D64 - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D4310 - add r5, r0, #0 - bl ov5_021D481C - cmp r0, #1 - bne _021D44BA - mov r5, #0 - b _021D44CA -_021D44BA: - add r0, r5, #0 - bl ov5_021D481C - cmp r0, #2 - bne _021D44C8 - mov r5, #0 - b _021D44CA -_021D44C8: - ldr r5, _021D4538 ; =0x00000607 -_021D44CA: - ldrb r0, [r4, #0x1e] - cmp r0, #2 - bne _021D44D4 - mov r2, #1 - b _021D44E2 -_021D44D4: - cmp r0, #4 - bne _021D44DC - mov r2, #1 - b _021D44E2 -_021D44DC: - bl sub_02022974 - mov r2, #1 -_021D44E2: - ldr r0, [r6, #0x54] - mov r1, #1 - add r3, r5, #0 - bl ov5_021D4278 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4510 -_021D44F4: - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4510 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #1 - bl ov5_021D42B0 - add sp, #0x84 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021D4510: - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _021D4520 - add r4, #0x1d - ldr r0, [r6, #0x24] - add r1, r4, #0 - bl ov5_021D4798 -_021D4520: - mov r0, #0 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - nop -_021D4528: .word 0x021F89F4 -_021D452C: .word 0x00000608 -_021D4530: .word 0x000005D4 -_021D4534: .word 0x00000605 -_021D4538: .word 0x00000607 - thumb_func_end ov5_021D433C - - thumb_func_start ov5_021D453C -ov5_021D453C: ; 0x021D453C - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - cmp r0, #6 - bls _021D454C - b _021D4768 -_021D454C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4558: ; jump table - .short _021D4566 - _021D4558 - 2 ; case 0 - .short _021D461E - _021D4558 - 2 ; case 1 - .short _021D4690 - _021D4558 - 2 ; case 2 - .short _021D46B0 - _021D4558 - 2 ; case 3 - .short _021D46C4 - _021D4558 - 2 ; case 4 - .short _021D472A - _021D4558 - 2 ; case 5 - .short _021D475A - _021D4558 - 2 ; case 6 -_021D4566: - ldr r5, _021D4780 ; =0x021F8A44 - add r3, sp, #0x34 - mov r2, #0xa -_021D456C: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D456C - mov r3, #0 - str r3, [r4, #0x20] - strb r3, [r4, #0x1d] - mov r0, #3 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - add r0, sp, #0x24 - str r0, [sp, #8] - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - sub r2, r2, #2 - bl sub_020550F4 - mov r0, #1 - strb r0, [r4, #0x1c] - add r0, sp, #0x20 - str r0, [sp] - add r0, sp, #0x1c - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0x34 - mov r2, #0x14 - add r3, sp, #0x24 - bl sub_02055208 - cmp r0, #0 - beq _021D45EC - ldr r0, [r6, #0x50] - ldr r1, [sp, #0x1c] - bl ov5_021D3F94 - add r7, r0, #0 - strb r7, [r4, #0x1e] - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - bl ov5_021E18BC - add r5, r0, #0 - ldr r0, [sp, #0x20] - bl ov5_021E18C0 - str r5, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x18] - mov r2, #1 - str r0, [sp, #8] - str r7, [sp, #0xc] - str r2, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - ldr r3, [sp, #0x1c] - bl ov5_021D41C8 - b _021D4600 -_021D45EC: - bl sub_02022974 - mov r0, #1 - bl ov5_021D1744 - mov r0, #6 - str r0, [r4, #0] - add sp, #0x84 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021D4600: - ldr r0, [r6, #0x24] - bl sub_02020A88 - strh r0, [r4, #0x24] - ldr r0, [sp, #0x1c] - cmp r0, #0x4b - beq _021D4616 - ldr r0, _021D4784 ; =0x0000FFA0 - ldr r1, [r6, #0x24] - bl sub_0202094C -_021D4616: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4768 -_021D461E: - mov r1, #0 - str r1, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r0, [r6, #0x10] - mov r2, #9 - bl sub_02056B30 - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D4310 - add r5, r0, #0 - cmp r5, #0x4b - beq _021D4648 - mov r0, #1 - str r0, [r4, #0x20] -_021D4648: - add r0, r5, #0 - bl ov5_021D481C - cmp r0, #1 - bne _021D4656 - ldr r5, _021D4788 ; =0x00000608 - b _021D4666 -_021D4656: - add r0, r5, #0 - bl ov5_021D481C - cmp r0, #2 - bne _021D4664 - ldr r5, _021D478C ; =0x000005D4 - b _021D4666 -_021D4664: - ldr r5, _021D4790 ; =0x00000605 -_021D4666: - ldrb r0, [r4, #0x1e] - cmp r0, #2 - bne _021D4670 - mov r2, #0 - b _021D467E -_021D4670: - cmp r0, #4 - bne _021D4678 - mov r2, #2 - b _021D467E -_021D4678: - bl sub_02022974 - mov r2, #0 -_021D467E: - ldr r0, [r6, #0x54] - mov r1, #1 - add r3, r5, #0 - bl ov5_021D4278 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4768 -_021D4690: - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4768 - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - mov r1, #0 - bl sub_02062D64 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4768 -_021D46B0: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - mov r1, #0xd - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4768 -_021D46C4: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D4768 - add r0, r5, #0 - bl sub_020656AC - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D4310 - add r5, r0, #0 - bl ov5_021D481C - cmp r0, #1 - bne _021D46F0 - mov r5, #0 - b _021D4700 -_021D46F0: - add r0, r5, #0 - bl ov5_021D481C - cmp r0, #2 - bne _021D46FE - mov r5, #0 - b _021D4700 -_021D46FE: - ldr r5, _021D4794 ; =0x00000607 -_021D4700: - ldrb r0, [r4, #0x1e] - cmp r0, #2 - bne _021D470A - mov r2, #1 - b _021D4718 -_021D470A: - cmp r0, #4 - bne _021D4712 - mov r2, #3 - b _021D4718 -_021D4712: - bl sub_02022974 - mov r2, #1 -_021D4718: - ldr r0, [r6, #0x54] - mov r1, #1 - add r3, r5, #0 - bl ov5_021D4278 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4768 -_021D472A: - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4768 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4768 - ldr r0, [r6, #0x24] - bl sub_02020A88 - ldrh r1, [r4, #0x24] - cmp r1, r0 - bne _021D4768 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #1 - bl ov5_021D42B0 - add sp, #0x84 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021D475A: - bl sub_0200F2AC - cmp r0, #0 - beq _021D4768 - add sp, #0x84 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021D4768: - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _021D4778 - add r4, #0x1d - ldr r0, [r6, #0x24] - add r1, r4, #0 - bl ov5_021D47DC -_021D4778: - mov r0, #0 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - nop -_021D4780: .word 0x021F8A44 -_021D4784: .word 0x0000FFA0 -_021D4788: .word 0x00000608 -_021D478C: .word 0x000005D4 -_021D4790: .word 0x00000605 -_021D4794: .word 0x00000607 - thumb_func_end ov5_021D453C - - thumb_func_start ov5_021D4798 -ov5_021D4798: ; 0x021D4798 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldrb r0, [r5] - mov r4, #0xc - add r1, r0, #0 - mul r1, r4 - cmp r1, #0x60 - bgt _021D47D8 - lsl r0, r1, #0x10 - lsr r0, r0, #0x10 - cmp r0, #0x60 - bls _021D47B8 - sub r0, #0x60 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_021D47B8: - add r0, r6, #0 - bl sub_02020A88 - sub r0, r0, r4 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - beq _021D47D2 - neg r0, r4 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r1, r6, #0 - bl sub_0202094C -_021D47D2: - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] -_021D47D8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D4798 - - thumb_func_start ov5_021D47DC -ov5_021D47DC: ; 0x021D47DC - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldrb r0, [r5] - lsl r0, r0, #4 - cmp r0, #0x60 - bge _021D4818 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #0x60 - bls _021D47FA - sub r0, #0x60 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - b _021D47FC -_021D47FA: - mov r4, #0x10 -_021D47FC: - add r0, r6, #0 - bl sub_02020A88 - add r0, r0, r4 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - beq _021D4812 - add r0, r4, #0 - add r1, r6, #0 - bl sub_0202094C -_021D4812: - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] -_021D4818: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D47DC - - thumb_func_start ov5_021D481C -ov5_021D481C: ; 0x021D481C - ldr r2, _021D4854 ; =0x000001BA - cmp r0, r2 - bne _021D4826 - mov r0, #2 - bx lr -_021D4826: - cmp r0, #0x46 - beq _021D484C - add r1, r2, #0 - sub r1, #0x90 - cmp r0, r1 - beq _021D484C - add r1, r2, #0 - add r1, #0xe - cmp r0, r1 - beq _021D484C - add r1, r2, #0 - sub r1, #0xf - cmp r0, r1 - beq _021D484C - add r2, #0x2a - cmp r0, r2 - beq _021D484C - cmp r0, #0x4b - bne _021D4850 -_021D484C: - mov r0, #1 - bx lr -_021D4850: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D4854: .word 0x000001BA - thumb_func_end ov5_021D481C - - thumb_func_start ov5_021D4858 -ov5_021D4858: ; 0x021D4858 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r5, r2, #0 - cmp r0, #5 - bls _021D486A - b _021D4A14 -_021D486A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4876: ; jump table - .short _021D4882 - _021D4876 - 2 ; case 0 - .short _021D4942 - _021D4876 - 2 ; case 1 - .short _021D4982 - _021D4876 - 2 ; case 2 - .short _021D49A2 - _021D4876 - 2 ; case 3 - .short _021D49CA - _021D4876 - 2 ; case 4 - .short _021D49E8 - _021D4876 - 2 ; case 5 -_021D4882: - ldr r3, _021D4A1C ; =0x021F89E4 - add r2, sp, #0x20 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - cmp r5, #2 - bne _021D48AC - mov r0, #2 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - add r0, sp, #0x30 - str r0, [sp, #8] - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - sub r2, r2, #2 - mov r3, #0 - bl sub_020550F4 - b _021D48C4 -_021D48AC: - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, sp, #0x30 - str r0, [sp, #8] - mov r2, #0 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - add r3, r2, #0 - bl sub_020550F4 -_021D48C4: - mov r0, #2 - strb r0, [r4, #0x1c] - add r0, sp, #0x1c - str r0, [sp] - add r0, sp, #0x18 - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0x20 - mov r2, #4 - add r3, sp, #0x30 - bl sub_02055208 - cmp r0, #0 - beq _021D4912 - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - add r7, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021E18BC - add r5, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021E18C0 - str r5, [sp] - str r0, [sp, #4] - str r7, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - ldr r3, [sp, #0x18] - mov r2, #2 - bl ov5_021D41C8 - b _021D491C -_021D4912: - bl sub_02022974 - add sp, #0x40 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D491C: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4936 - add r0, r5, #0 - mov r1, #0x49 - bl sub_02065638 - b _021D493A -_021D4936: - bl sub_02022974 -_021D493A: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4A14 -_021D4942: - mov r0, #1 - bl ov5_021D1744 - ldr r0, [r6, #0x54] - ldr r3, _021D4A20 ; =0x00000615 - mov r1, #2 - mov r2, #0 - bl ov5_021D4278 - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4976 - cmp r5, #3 - bne _021D496C - mov r1, #0xb - b _021D496E -_021D496C: - mov r1, #0xa -_021D496E: - add r0, r6, #0 - bl sub_02065638 - b _021D497A -_021D4976: - bl sub_02022974 -_021D497A: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4A14 -_021D4982: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4A14 - add r0, r5, #0 - mov r1, #0x4a - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4A14 -_021D49A2: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4A14 - cmp r5, #3 - bne _021D49BA - mov r1, #0xb - b _021D49BC -_021D49BA: - mov r1, #0xa -_021D49BC: - add r0, r6, #0 - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4A14 -_021D49CA: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D4A14 - add r0, r5, #0 - bl sub_020656AC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4A14 -_021D49E8: - ldr r0, [r6, #0x54] - mov r1, #2 - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4A14 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4A14 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #2 - bl ov5_021D42B0 - ldr r0, _021D4A20 ; =0x00000615 - mov r1, #0 - bl sub_020057A4 - add sp, #0x40 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D4A14: - mov r0, #0 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D4A1C: .word 0x021F89E4 -_021D4A20: .word 0x00000615 - thumb_func_end ov5_021D4858 - - thumb_func_start ov5_021D4A24 -ov5_021D4A24: ; 0x021D4A24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - add r5, r2, #0 - cmp r0, #4 - bls _021D4A36 - b _021D4BB8 -_021D4A36: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4A42: ; jump table - .short _021D4A4C - _021D4A42 - 2 ; case 0 - .short _021D4B0E - _021D4A42 - 2 ; case 1 - .short _021D4B48 - _021D4A42 - 2 ; case 2 - .short _021D4B6E - _021D4A42 - 2 ; case 3 - .short _021D4B8C - _021D4A42 - 2 ; case 4 -_021D4A4C: - ldr r3, _021D4BC0 ; =0x021F89D4 - add r2, sp, #0x20 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - cmp r5, #2 - bne _021D4A76 - mov r0, #2 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - add r0, sp, #0x30 - str r0, [sp, #8] - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - sub r2, r2, #2 - mov r3, #0 - bl sub_020550F4 - b _021D4A8E -_021D4A76: - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, sp, #0x30 - str r0, [sp, #8] - mov r2, #0 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - add r3, r2, #0 - bl sub_020550F4 -_021D4A8E: - mov r0, #2 - strb r0, [r4, #0x1c] - add r0, sp, #0x1c - str r0, [sp] - add r0, sp, #0x18 - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0x20 - mov r2, #4 - add r3, sp, #0x30 - bl sub_02055208 - cmp r0, #0 - beq _021D4ADE - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - add r7, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021E18BC - add r5, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021E18C0 - str r5, [sp] - str r0, [sp, #4] - str r7, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - ldr r3, [sp, #0x18] - mov r2, #2 - bl ov5_021D41C8 - b _021D4AE8 -_021D4ADE: - bl sub_02022974 - add sp, #0x40 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D4AE8: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4B02 - add r0, r5, #0 - mov r1, #0x49 - bl sub_02065638 - b _021D4B06 -_021D4B02: - bl sub_02022974 -_021D4B06: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4BB8 -_021D4B0E: - ldr r0, [r6, #0x54] - ldr r3, _021D4BC4 ; =0x00000615 - mov r1, #2 - mov r2, #0 - bl ov5_021D4278 - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4B3C - cmp r5, #2 - bne _021D4B32 - mov r1, #0xa - b _021D4B34 -_021D4B32: - mov r1, #0xb -_021D4B34: - add r0, r6, #0 - bl sub_02065638 - b _021D4B40 -_021D4B3C: - bl sub_02022974 -_021D4B40: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4BB8 -_021D4B48: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021D4BB8 - add r0, r5, #0 - mov r1, #0x4a - bl sub_02065638 - mov r0, #0 - bl ov5_021D1744 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4BB8 -_021D4B6E: - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D4BB8 - add r0, r5, #0 - bl sub_020656AC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4BB8 -_021D4B8C: - ldr r0, [r6, #0x54] - mov r1, #2 - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4BB8 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4BB8 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #2 - bl ov5_021D42B0 - ldr r0, _021D4BC4 ; =0x00000615 - mov r1, #0 - bl sub_020057A4 - add sp, #0x40 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D4BB8: - mov r0, #0 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D4BC0: .word 0x021F89D4 -_021D4BC4: .word 0x00000615 - thumb_func_end ov5_021D4A24 - - thumb_func_start ov5_021D4BC8 -ov5_021D4BC8: ; 0x021D4BC8 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldrb r1, [r4] - ldr r0, [r5, #0x54] - bl ov5_021D42F0 - cmp r0, #0 - beq _021D4BF0 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D4BF0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D4BC8 - - thumb_func_start ov5_021D4BF4 -ov5_021D4BF4: ; 0x021D4BF4 - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - ldr r6, _021D4C84 ; =0x021F8A94 - str r3, [sp, #0x18] - add r5, r0, #0 - add r7, r1, #0 - add r4, sp, #0x34 - mov r3, #0xa -_021D4C04: - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _021D4C04 - mov r0, #3 - str r0, [sp] - mov r3, #1 - add r1, r2, #0 - str r3, [sp, #4] - add r0, sp, #0x24 - str r0, [sp, #8] - sub r2, r3, #2 - add r0, r7, #0 - mov r3, #0 - bl sub_020550F4 - add r0, sp, #0x20 - str r0, [sp] - add r0, sp, #0x1c - str r0, [sp, #4] - add r0, r5, #0 - add r1, sp, #0x34 - mov r2, #0x14 - add r3, sp, #0x24 - bl sub_02055208 - cmp r0, #0 - beq _021D4C7C - ldr r0, [r5, #0x50] - ldr r1, [sp, #0x1c] - bl ov5_021D3F94 - add r6, r0, #0 - ldr r0, [r5, #0x30] - bl ov5_021EFAA0 - add r7, r0, #0 - ldr r0, [sp, #0x20] - bl ov5_021E18BC - add r4, r0, #0 - ldr r0, [sp, #0x20] - bl ov5_021E18C0 - str r4, [sp] - str r0, [sp, #4] - str r7, [sp, #8] - str r6, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r5, #0x50] - ldr r1, [r5, #0x54] - ldr r2, [sp, #0x18] - ldr r3, [sp, #0x1c] - bl ov5_021D41C8 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} -_021D4C7C: - bl sub_02022974 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4C84: .word 0x021F8A94 - thumb_func_end ov5_021D4BF4 - - thumb_func_start ov5_021D4C88 -ov5_021D4C88: ; 0x021D4C88 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x54] - add r7, r1, #0 - bl ov5_021D4310 - add r6, r0, #0 - ldr r0, [r5, #0x50] - add r1, r6, #0 - bl ov5_021D3F94 - add r4, r0, #0 - add r0, r6, #0 - bl ov5_021D481C - cmp r0, #1 - bne _021D4CAE - ldr r6, _021D4CE0 ; =0x00000608 - b _021D4CBE -_021D4CAE: - add r0, r6, #0 - bl ov5_021D481C - cmp r0, #2 - bne _021D4CBC - ldr r6, _021D4CE4 ; =0x000005D4 - b _021D4CBE -_021D4CBC: - ldr r6, _021D4CE8 ; =0x00000605 -_021D4CBE: - cmp r4, #2 - bne _021D4CC6 - mov r2, #0 - b _021D4CD4 -_021D4CC6: - cmp r4, #4 - bne _021D4CCE - mov r2, #0 - b _021D4CD4 -_021D4CCE: - bl sub_02022974 - mov r2, #0 -_021D4CD4: - ldr r0, [r5, #0x54] - add r1, r7, #0 - add r3, r6, #0 - bl ov5_021D4278 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4CE0: .word 0x00000608 -_021D4CE4: .word 0x000005D4 -_021D4CE8: .word 0x00000605 - thumb_func_end ov5_021D4C88 - - thumb_func_start ov5_021D4CEC -ov5_021D4CEC: ; 0x021D4CEC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x54] - add r7, r1, #0 - bl ov5_021D4310 - add r6, r0, #0 - ldr r0, [r5, #0x50] - add r1, r6, #0 - bl ov5_021D3F94 - add r4, r0, #0 - add r0, r6, #0 - bl ov5_021D481C - cmp r0, #1 - bne _021D4D12 - mov r6, #0 - b _021D4D22 -_021D4D12: - add r0, r6, #0 - bl ov5_021D481C - cmp r0, #2 - bne _021D4D20 - mov r6, #0 - b _021D4D22 -_021D4D20: - ldr r6, _021D4D44 ; =0x00000607 -_021D4D22: - cmp r4, #2 - bne _021D4D2A - mov r2, #1 - b _021D4D38 -_021D4D2A: - cmp r4, #4 - bne _021D4D32 - mov r2, #1 - b _021D4D38 -_021D4D32: - bl sub_02022974 - mov r2, #1 -_021D4D38: - ldr r0, [r5, #0x54] - add r1, r7, #0 - add r3, r6, #0 - bl ov5_021D4278 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4D44: .word 0x00000607 - thumb_func_end ov5_021D4CEC - - thumb_func_start ov5_021D4D48 -ov5_021D4D48: ; 0x021D4D48 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #4 - mov r1, #1 - bl sub_02018184 - add r2, r0, #0 - strb r4, [r2] - ldr r0, [r5, #0x10] - ldr r1, _021D4D64 ; =ov5_021D4BC8 - bl sub_02050944 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D4D64: .word ov5_021D4BC8 - thumb_func_end ov5_021D4D48 - - thumb_func_start ov5_021D4D68 -ov5_021D4D68: ; 0x021D4D68 - add r3, r0, #0 - add r2, r1, #0 - ldr r0, [r3, #0x50] - ldr r1, [r3, #0x54] - ldr r3, _021D4D74 ; =ov5_021D42B0 - bx r3 - ; .align 2, 0 -_021D4D74: .word ov5_021D42B0 - thumb_func_end ov5_021D4D68 - - thumb_func_start ov5_021D4D78 -ov5_021D4D78: ; 0x021D4D78 - push {r4, r5, lr} - sub sp, #0x2c - add r5, r2, #0 - ldr r2, _021D4DFC ; =0x021F89CC - add r4, r3, #0 - ldr r3, [r2, #0] - ldr r2, [r2, #4] - str r3, [sp, #0xc] - str r2, [sp, #0x10] - mov r2, #1 - str r2, [sp] - mov r2, #3 - str r2, [sp, #4] - add r2, sp, #0x1c - str r2, [sp, #8] - mov r2, #0 - sub r3, r2, #1 - bl sub_020550F4 - add r0, sp, #0x18 - str r0, [sp] - add r0, sp, #0x14 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0xc - mov r2, #2 - add r3, sp, #0x1c - bl sub_02055208 - cmp r0, #0 - bne _021D4DBA - bl sub_02022974 -_021D4DBA: - ldr r0, [sp, #0x18] - bl ov5_021E18BC - add r3, r0, #0 - ldr r0, [r4, #0x50] - add r1, r5, #0 - str r0, [sp] - ldr r0, [sp, #0x14] - mov r2, #1 - bl ov5_021D3B24 - cmp r0, #0 - bne _021D4DD8 - bl sub_02022974 -_021D4DD8: - ldr r0, [sp, #0x14] - ldr r2, [r4, #0x50] - add r1, r5, #0 - bl ov5_021D3DE4 - add r4, r0, #0 - bl ov5_021D3E7C - add r0, r4, #0 - mov r1, #0 - bl ov5_021D3E40 - add r0, r4, #0 - bl ov5_021D3E44 - add sp, #0x2c - pop {r4, r5, pc} - nop -_021D4DFC: .word 0x021F89CC - thumb_func_end ov5_021D4D78 - - thumb_func_start ov5_021D4E00 -ov5_021D4E00: ; 0x021D4E00 - push {r3, lr} - mov r0, #4 - mov r1, #0x10 - bl sub_02018184 - mov r1, #0 - str r1, [r0, #0] - pop {r3, pc} - thumb_func_end ov5_021D4E00 - - thumb_func_start ov5_021D4E10 -ov5_021D4E10: ; 0x021D4E10 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #3 - bhi _021D4EF6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D4E36: ; jump table - .short _021D4E3E - _021D4E36 - 2 ; case 0 - .short _021D4E9A - _021D4E36 - 2 ; case 1 - .short _021D4EB8 - _021D4E36 - 2 ; case 2 - .short _021D4ED6 - _021D4E36 - 2 ; case 3 -_021D4E3E: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - cmp r0, #1 - bne _021D4E5C - add r0, r6, #0 - mov r1, #1 - bl sub_02062D64 - mov r0, #1 - b _021D4E66 -_021D4E5C: - add r0, r6, #0 - mov r1, #0 - bl sub_02062D64 - mov r0, #3 -_021D4E66: - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - strb r0, [r4, #4] - ldr r0, [r5, #0x24] - bl sub_02020A88 - strh r0, [r4, #0xc] - ldr r0, _021D4F0C ; =0x0000FFA0 - ldr r1, [r5, #0x24] - bl sub_0202094C - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0xb - str r0, [sp, #8] - ldr r3, _021D4F10 ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #1 - str r0, [r4, #8] - b _021D4EF6 -_021D4E9A: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - mov r1, #0 - bl sub_02062D64 - add r0, r6, #0 - mov r1, #0xd - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4EF6 -_021D4EB8: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D4EF6 - add r0, r6, #0 - bl sub_020656AC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D4EF6 -_021D4ED6: - bl sub_0200F2AC - cmp r0, #0 - beq _021D4EF6 - ldr r0, [r5, #0x24] - bl sub_02020A88 - ldrh r1, [r4, #0xc] - cmp r1, r0 - bne _021D4EF6 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D4EF6: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D4F04 - ldr r0, [r5, #0x24] - add r1, r4, #4 - bl ov5_021D47DC -_021D4F04: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021D4F0C: .word 0x0000FFA0 -_021D4F10: .word 0x00007FFF - thumb_func_end ov5_021D4E10 - - thumb_func_start ov5_021D4F14 -ov5_021D4F14: ; 0x021D4F14 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02050A60 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02050A64 - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021D4F34 - cmp r0, #1 - beq _021D4F70 - b _021D4F84 -_021D4F34: - ldr r0, [r4, #0x3c] - bl sub_0205EB3C - mov r1, #1 - bl sub_02062D64 - mov r0, #0 - str r0, [r5, #8] - strb r0, [r5, #4] - ldr r0, _021D4F98 ; =0x00000603 - bl sub_02005748 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xb - str r0, [sp, #8] - mov r0, #0 - ldr r3, _021D4F9C ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - mov r0, #1 - str r0, [r5, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021D4F84 -_021D4F70: - bl sub_0200F2AC - cmp r0, #0 - beq _021D4F84 - add r0, r5, #0 - bl sub_020181C4 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D4F84: - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D4F92 - ldr r0, [r4, #0x24] - add r1, r5, #4 - bl ov5_021D4798 -_021D4F92: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D4F98: .word 0x00000603 -_021D4F9C: .word 0x00007FFF - thumb_func_end ov5_021D4F14 - - thumb_func_start ov5_021D4FA0 -ov5_021D4FA0: ; 0x021D4FA0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - bl sub_02050A60 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D4FC0 - cmp r0, #1 - beq _021D4FF2 - b _021D5006 -_021D4FC0: - mov r0, #0 - str r0, [r4, #8] - strb r0, [r4, #4] - ldr r0, _021D501C ; =0x00000603 - bl sub_02005748 - mov r1, #0 - str r1, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - add r0, r5, #0 - mov r2, #0x10 - add r3, r1, #0 - bl sub_02056B30 - mov r0, #1 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5006 -_021D4FF2: - bl sub_0200F2AC - cmp r0, #0 - beq _021D5006 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x10 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D5006: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D5014 - ldr r0, [r6, #0x24] - add r1, r4, #4 - bl ov5_021D4798 -_021D5014: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D501C: .word 0x00000603 - thumb_func_end ov5_021D4FA0 - - thumb_func_start ov5_021D5020 -ov5_021D5020: ; 0x021D5020 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #0x10] - bl sub_02050A60 - add r5, r0, #0 - ldr r0, [sp, #0x10] - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #3 - bhi _021D5138 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5046: ; jump table - .short _021D504E - _021D5046 - 2 ; case 0 - .short _021D50DC - _021D5046 - 2 ; case 1 - .short _021D50FA - _021D5046 - 2 ; case 2 - .short _021D5118 - _021D5046 - 2 ; case 3 -_021D504E: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - str r0, [sp, #0x14] - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - cmp r7, #1 - bne _021D5070 - ldr r0, [sp, #0x14] - mov r1, #1 - bl sub_02062D64 - mov r0, #1 - b _021D507A -_021D5070: - ldr r0, [sp, #0x14] - mov r1, #0 - bl sub_02062D64 - mov r0, #3 -_021D507A: - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - strb r0, [r4, #4] - ldr r0, [r5, #0x24] - bl sub_02020A88 - strh r0, [r4, #0xc] - ldr r0, _021D514C ; =0x0000FFA0 - ldr r1, [r5, #0x24] - bl sub_0202094C - cmp r7, #3 - bhi _021D50BA - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D50A2: ; jump table - .short _021D50AA - _021D50A2 - 2 ; case 0 - .short _021D50AE - _021D50A2 - 2 ; case 1 - .short _021D50B2 - _021D50A2 - 2 ; case 2 - .short _021D50B6 - _021D50A2 - 2 ; case 3 -_021D50AA: - mov r6, #3 - b _021D50BE -_021D50AE: - mov r6, #5 - b _021D50BE -_021D50B2: - mov r6, #7 - b _021D50BE -_021D50B6: - mov r6, #0x27 - b _021D50BE -_021D50BA: - bl sub_02022974 -_021D50BE: - mov r1, #0 - str r1, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r2, r6, #0 - bl sub_02056B30 - mov r0, #1 - str r0, [r4, #8] - b _021D5138 -_021D50DC: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - mov r1, #0 - bl sub_02062D64 - add r0, r6, #0 - mov r1, #0xd - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5138 -_021D50FA: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D5138 - add r0, r6, #0 - bl sub_020656AC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5138 -_021D5118: - bl sub_0200F2AC - cmp r0, #0 - beq _021D5138 - ldr r0, [r5, #0x24] - bl sub_02020A88 - ldrh r1, [r4, #0xc] - cmp r1, r0 - bne _021D5138 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D5138: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D5146 - ldr r0, [r5, #0x24] - add r1, r4, #4 - bl ov5_021D47DC -_021D5146: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D514C: .word 0x0000FFA0 - thumb_func_end ov5_021D5020 - - thumb_func_start ov5_021D5150 -ov5_021D5150: ; 0x021D5150 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r7, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #3 - bhi _021D5216 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5176: ; jump table - .short _021D517E - _021D5176 - 2 ; case 0 - .short _021D51C6 - _021D5176 - 2 ; case 1 - .short _021D51E4 - _021D5176 - 2 ; case 2 - .short _021D5202 - _021D5176 - 2 ; case 3 -_021D517E: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bne _021D51A0 - add r0, r6, #0 - mov r1, #1 - bl sub_02062D64 - mov r0, #1 - b _021D51AA -_021D51A0: - add r0, r6, #0 - mov r1, #0 - bl sub_02062D64 - mov r0, #3 -_021D51AA: - str r0, [r4, #0] - mov r1, #0 - mov r2, #1 - str r1, [sp] - mov r0, #6 - str r0, [sp, #4] - str r2, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - add r0, r7, #0 - add r3, r2, #0 - bl sub_02056B30 - b _021D5216 -_021D51C6: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - mov r1, #0 - bl sub_02062D64 - add r0, r5, #0 - mov r1, #0xd - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5216 -_021D51E4: - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02065684 - cmp r0, #1 - bne _021D5216 - add r0, r5, #0 - bl sub_020656AC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D5216 -_021D5202: - bl sub_0200F2AC - cmp r0, #0 - beq _021D5216 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D5216: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D5150 - - thumb_func_start ov5_021D521C -ov5_021D521C: ; 0x021D521C - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - cmp r6, #4 - blo _021D522A - bl sub_02022974 -_021D522A: - mov r0, #4 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - str r5, [r4, #0xc] - add r0, r6, #0 - add r1, r4, #4 - bl ov5_021D53D4 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - bl sub_020138C8 - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r3, r1, #1 - ldr r5, [r4, #0] - mov r1, #0 - cmp r5, #0 - bls _021D526A - ldr r2, [r4, #4] -_021D5258: - ldr r0, [r2, #0] - cmp r0, r3 - bls _021D5262 - str r1, [r4, #8] - b _021D526A -_021D5262: - add r1, r1, #1 - add r2, #0x30 - cmp r1, r5 - blo _021D5258 -_021D526A: - mov r0, #1 - str r0, [r4, #0x10] - add r0, r4, #0 - bl ov5_021D538C - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D521C - - thumb_func_start ov5_021D5278 -ov5_021D5278: ; 0x021D5278 - push {r4, lr} - add r4, r0, #0 - bne _021D5282 - bl sub_02022974 -_021D5282: - ldr r0, [r4, #0] - add r0, r0, #4 - bl ov5_021D555C - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov5_021D5278 - - thumb_func_start ov5_021D5298 -ov5_021D5298: ; 0x021D5298 - push {r3, r4, r5, lr} - add r4, r0, #0 - bne _021D52A2 - bl sub_02022974 -_021D52A2: - bl sub_020138C8 - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - ldr r1, [r4, #0] - cmp r1, #1 - bls _021D52F0 - ldr r1, [r4, #8] - sub r5, r1, #1 - bmi _021D52C2 - mov r2, #0x30 - ldr r3, [r4, #4] - mul r2, r5 - ldr r2, [r3, r2] - b _021D52C4 -_021D52C2: - mov r2, #0 -_021D52C4: - mov r3, #0x30 - ldr r5, [r4, #4] - mul r3, r1 - ldr r1, [r5, r3] - cmp r0, r1 - bge _021D52D4 - cmp r0, r2 - bge _021D52F0 -_021D52D4: - ldr r0, [r4, #8] - add r1, r0, #1 - str r1, [r4, #8] - ldr r0, [r4, #0] - cmp r1, r0 - blo _021D52E4 - mov r0, #0 - str r0, [r4, #8] -_021D52E4: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _021D52F0 - add r0, r4, #0 - bl ov5_021D538C -_021D52F0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5298 - - thumb_func_start ov5_021D52F4 -ov5_021D52F4: ; 0x021D52F4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp, #4] - add r6, r1, #0 - mov r4, #0 - add r5, r0, #0 - add r7, r0, #0 -_021D5302: - ldr r0, [sp, #4] - ldrb r1, [r0, #4] - mov r0, #1 - lsl r0, r4 - tst r0, r1 - beq _021D5330 - mov r0, #0x12 - ldrsh r0, [r5, r0] - mov r2, #0xe - mov r3, #0x10 - str r0, [sp] - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021D5A50 - ldrh r2, [r7, #6] - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021D5A78 - b _021D534A -_021D5330: - mov r0, #0 - mov r2, #0 - str r0, [sp] - add r0, r6, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov5_021D5A50 - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - bl ov5_021D5A78 -_021D534A: - add r4, r4, #1 - add r5, r5, #6 - add r7, r7, #2 - cmp r4, #4 - blt _021D5302 - ldr r1, [sp, #4] - mov r2, #0 - ldrh r1, [r1, #0x26] - add r0, r6, #0 - add r3, r2, #0 - bl ov5_021D5A8C - ldr r1, [sp, #4] - add r0, r6, #0 - ldrh r1, [r1, #0x28] - mov r2, #1 - bl ov5_021D5AA0 - ldr r1, [sp, #4] - mov r2, #0 - ldrh r1, [r1, #0x2a] - add r0, r6, #0 - add r3, r2, #0 - bl ov5_021D5AB4 - ldr r1, [sp, #4] - add r0, r6, #0 - ldrh r1, [r1, #0x2c] - mov r2, #1 - bl ov5_021D5AC8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D52F4 - - thumb_func_start ov5_021D538C -ov5_021D538C: ; 0x021D538C - add r3, r0, #0 - ldr r1, [r3, #8] - mov r0, #0x30 - mul r0, r1 - ldr r2, [r3, #4] - ldr r1, [r3, #0xc] - ldr r3, _021D53A0 ; =ov5_021D52F4 - add r0, r2, r0 - bx r3 - nop -_021D53A0: .word ov5_021D52F4 - thumb_func_end ov5_021D538C - - thumb_func_start ov5_021D53A4 -ov5_021D53A4: ; 0x021D53A4 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - mov r2, #0x40 - bl sub_020B2CE4 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x80 - bl sub_020B2CE4 - mov r2, #2 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #8 - bl sub_020B2CE4 - mov r2, #1 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #0xa - bl sub_020B2CE4 - pop {r4, pc} - thumb_func_end ov5_021D53A4 - - thumb_func_start ov5_021D53D4 -ov5_021D53D4: ; 0x021D53D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x24 - add r3, r0, #0 - str r1, [sp, #4] - mov r2, #0 - add r1, r3, #0 - mov r0, #0xb0 - mov r3, #4 - str r2, [sp] - bl sub_02006FE8 - mov r1, #0 - str r0, [sp, #0x18] - str r1, [sp, #0xc] - add r5, sp, #0x120 - mov r6, #1 - mov r7, #2 - add r4, r1, #0 -_021D53FA: - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - ldrsb r1, [r5, r4] - cmp r1, #0x45 - bne _021D5414 - ldrsb r1, [r5, r6] - cmp r1, #0x4f - bne _021D5414 - ldrsb r1, [r5, r7] - cmp r1, #0x46 - beq _021D5462 -_021D5414: - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - add r1, r5, #0 - mov r2, #0xd - bl sub_0201E0B8 - ldr r1, [sp, #0xc] - add r1, r1, #1 - str r1, [sp, #0xc] -_021D5462: - mov r1, #0 - ldrsb r1, [r5, r1] - cmp r1, #0x45 - bne _021D53FA - mov r1, #1 - ldrsb r1, [r5, r1] - cmp r1, #0x4f - bne _021D53FA - mov r1, #2 - ldrsb r1, [r5, r1] - cmp r1, #0x46 - bne _021D53FA - ldr r0, [sp, #0xc] - mov r1, #0x30 - add r4, r0, #0 - mul r4, r1 - mov r0, #4 - add r1, r4, #0 - bl sub_02018144 - ldr r1, [sp, #4] - add r2, r4, #0 - str r0, [r1, #0] - mov r1, #0 - bl sub_020C4CF4 - mov r1, #0 - str r1, [sp, #0x1c] - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x18] - cmp r1, #0 - ble _021D5548 - ldr r1, [sp, #0x1c] - str r1, [sp, #0x14] -_021D54A6: - ldr r1, [sp, #4] - mov r2, #0xd - ldr r5, [r1, #0] - ldr r1, [sp, #0x14] - add r4, r5, r1 - add r1, sp, #0x120 - bl sub_0201E0B8 - str r0, [sp, #8] - add r0, sp, #0x120 - add r1, sp, #0x20 - mov r2, #0x2c - bl sub_0201E0B8 - add r0, sp, #0x20 - bl sub_0201E0FC - ldr r1, [sp, #0x14] - add r6, r4, #0 - str r0, [r5, r1] - add r0, r4, #6 - mov r7, #0 - add r6, #0xe - str r0, [sp, #0x10] - add r5, r4, #0 -_021D54D8: - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - add r2, r6, #0 - bl ov5_021D5570 - str r0, [sp, #8] - ldrh r1, [r5, #6] - ldr r0, _021D5558 ; =0x0000FFFF - cmp r1, r0 - beq _021D54F8 - mov r0, #1 - ldrb r1, [r4, #4] - lsl r0, r7 - orr r0, r1 - strb r0, [r4, #4] - b _021D54FC -_021D54F8: - mov r0, #0 - strh r0, [r5, #6] -_021D54FC: - ldr r0, [sp, #0x10] - add r7, r7, #1 - add r0, r0, #2 - add r6, r6, #6 - add r5, r5, #2 - str r0, [sp, #0x10] - cmp r7, #4 - blt _021D54D8 - add r1, r4, #0 - ldr r0, [sp, #8] - add r1, #0x26 - bl ov5_021D5660 - add r1, r4, #0 - add r1, #0x28 - bl ov5_021D5660 - add r1, r4, #0 - add r1, #0x2a - bl ov5_021D5660 - add r4, #0x2c - add r1, r4, #0 - bl ov5_021D5660 - add r1, sp, #0x120 - mov r2, #0xd - bl sub_0201E0B8 - ldr r1, [sp, #0x14] - add r1, #0x30 - str r1, [sp, #0x14] - ldr r1, [sp, #0x1c] - add r2, r1, #1 - ldr r1, [sp, #0xc] - str r2, [sp, #0x1c] - cmp r2, r1 - blt _021D54A6 -_021D5548: - ldr r1, [sp, #0x18] - mov r0, #4 - bl sub_02018238 - ldr r0, [sp, #0xc] - add sp, #0x1fc - add sp, #0x24 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D5558: .word 0x0000FFFF - thumb_func_end ov5_021D53D4 - - thumb_func_start ov5_021D555C -ov5_021D555C: ; 0x021D555C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D555C - - thumb_func_start ov5_021D5570 -ov5_021D5570: ; 0x021D5570 - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x20 - str r1, [sp, #4] - add r7, r2, #0 - add r1, sp, #0x11c - mov r2, #0xd - bl sub_0201E0B8 - str r0, [sp] - add r0, sp, #0x11c - add r1, sp, #0x1c - mov r2, #0x2c - bl sub_0201E0B8 - add r4, r0, #0 - add r0, sp, #0x1c - bl sub_0201E0FC - cmp r0, #1 - bne _021D5648 - mov r6, #0 - add r5, sp, #8 -_021D559E: - add r0, r4, #0 - add r1, sp, #0x1c - mov r2, #0x2c - bl sub_0201E0B8 - add r4, r0, #0 - add r0, sp, #0x1c - bl sub_0201E0FC - strh r0, [r5] - add r6, r6, #1 - add r5, r5, #2 - cmp r6, #3 - blt _021D559E - add r1, sp, #8 - ldrh r0, [r1, #4] - ldrh r2, [r1] - ldrh r1, [r1, #2] - lsl r0, r0, #0xa - mov r6, #0 - lsl r1, r1, #5 - orr r1, r2 - orr r1, r0 - ldr r0, [sp, #4] - add r5, sp, #0x10 - strh r1, [r0] -_021D55D2: - add r0, r4, #0 - add r1, sp, #0x1c - mov r2, #0x2c - bl sub_0201E0B8 - add r4, r0, #0 - add r0, sp, #0x1c - bl sub_0201E0FC - add r6, r6, #1 - stmia r5!, {r0} - cmp r6, #3 - blt _021D55D2 - ldr r0, [sp, #0x10] - strh r0, [r7] - ldr r0, [sp, #0x14] - strh r0, [r7, #2] - ldr r0, [sp, #0x18] - strh r0, [r7, #4] - mov r0, #0 - ldrsh r1, [r7, r0] - mov r0, #1 - lsl r0, r0, #0xc - cmp r1, r0 - ble _021D5606 - strh r0, [r7] -_021D5606: - mov r0, #0 - ldrsh r1, [r7, r0] - ldr r0, _021D5658 ; =0xFFFFF000 - cmp r1, r0 - bge _021D5612 - strh r0, [r7] -_021D5612: - mov r0, #2 - ldrsh r2, [r7, r0] - lsl r1, r0, #0xb - cmp r2, r1 - ble _021D5620 - lsl r0, r0, #0xb - strh r0, [r7, #2] -_021D5620: - mov r0, #2 - ldrsh r1, [r7, r0] - ldr r0, _021D5658 ; =0xFFFFF000 - cmp r1, r0 - bge _021D562C - strh r0, [r7, #2] -_021D562C: - mov r0, #4 - ldrsh r2, [r7, r0] - lsl r1, r0, #0xa - cmp r2, r1 - ble _021D563A - lsl r0, r0, #0xa - strh r0, [r7, #4] -_021D563A: - mov r0, #4 - ldrsh r1, [r7, r0] - ldr r0, _021D5658 ; =0xFFFFF000 - cmp r1, r0 - bge _021D564E - strh r0, [r7, #4] - b _021D564E -_021D5648: - ldr r1, _021D565C ; =0x0000FFFF - ldr r0, [sp, #4] - strh r1, [r0] -_021D564E: - ldr r0, [sp] - add sp, #0x1fc - add sp, #0x20 - pop {r4, r5, r6, r7, pc} - nop -_021D5658: .word 0xFFFFF000 -_021D565C: .word 0x0000FFFF - thumb_func_end ov5_021D5570 - - thumb_func_start ov5_021D5660 -ov5_021D5660: ; 0x021D5660 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x14 - str r1, [sp, #4] - add r1, sp, #0x10c - add r1, #2 - mov r2, #0xd - bl sub_0201E0B8 - add r6, sp, #0x10c - add r7, sp, #0xc - str r0, [sp] - add r6, #2 - mov r4, #0 - add r5, sp, #8 - add r7, #2 -_021D5680: - add r0, r6, #0 - add r1, r7, #0 - mov r2, #0x2c - bl sub_0201E0B8 - add r6, r0, #0 - add r0, r7, #0 - bl sub_0201E0FC - strh r0, [r5] - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #3 - blt _021D5680 - add r0, sp, #8 - ldrh r1, [r0, #4] - lsl r2, r1, #0xa - ldrh r1, [r0] - ldrh r0, [r0, #2] - lsl r0, r0, #5 - orr r0, r1 - add r1, r2, #0 - orr r1, r0 - ldr r0, [sp, #4] - strh r1, [r0] - ldr r0, [sp] - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5660 - - thumb_func_start ov5_021D56BC -ov5_021D56BC: ; 0x021D56BC - push {r4, lr} - mov r0, #4 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - bne _021D56CE - bl sub_02022974 -_021D56CE: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D56BC - - thumb_func_start ov5_021D56D4 -ov5_021D56D4: ; 0x021D56D4 - push {r3, r4, r5, r6, lr} - sub sp, #0x4c - add r4, r0, #0 - add r0, sp, #4 - add r5, r1, #0 - bl sub_020C7DA0 - add r0, sp, #4 - add r1, r4, #0 - bl sub_020C8080 - cmp r0, #0 - beq _021D5770 - add r1, sp, #0 - add r0, sp, #4 - add r1, #2 - mov r2, #2 - bl sub_020C81D4 - cmp r0, #0 - bge _021D5702 - bl sub_02022974 -_021D5702: - add r0, sp, #4 - add r1, sp, #0 - mov r2, #2 - bl sub_020C81D4 - cmp r0, #0 - bge _021D5714 - bl sub_02022974 -_021D5714: - add r0, sp, #0 - ldrh r1, [r0, #2] - ldrh r0, [r0] - lsl r6, r1, #2 - lsl r4, r0, #2 - mov r0, #4 - add r1, r6, #0 - bl sub_02018144 - str r0, [r5, #0] - cmp r0, #0 - bne _021D5730 - bl sub_02022974 -_021D5730: - mov r0, #4 - add r1, r4, #0 - bl sub_02018144 - str r0, [r5, #4] - cmp r0, #0 - bne _021D5742 - bl sub_02022974 -_021D5742: - ldr r1, [r5, #0] - add r0, sp, #4 - add r2, r6, #0 - bl sub_020C81D4 - cmp r0, #0 - bge _021D5754 - bl sub_02022974 -_021D5754: - ldr r1, [r5, #4] - add r0, sp, #4 - add r2, r4, #0 - bl sub_020C81D4 - cmp r0, #0 - bge _021D5766 - bl sub_02022974 -_021D5766: - add r0, sp, #4 - bl sub_020C80C8 - add sp, #0x4c - pop {r3, r4, r5, r6, pc} -_021D5770: - bl sub_02022974 - add sp, #0x4c - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021D56D4 - - thumb_func_start ov5_021D5778 -ov5_021D5778: ; 0x021D5778 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_020181C4 - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021D5778 - - thumb_func_start ov5_021D5790 -ov5_021D5790: ; 0x021D5790 - ldr r1, [r1, #0] - lsl r0, r0, #2 - ldrh r0, [r1, r0] - strh r0, [r2] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D5790 - - thumb_func_start ov5_021D579C -ov5_021D579C: ; 0x021D579C - push {r3, r4} - lsl r4, r0, #2 - ldr r0, [r1, #0] - ldrh r0, [r0, r4] - strh r0, [r2] - ldr r0, [r1, #0] - add r0, r0, r4 - ldrh r0, [r0, #2] - strh r0, [r3] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D579C - - thumb_func_start ov5_021D57B4 -ov5_021D57B4: ; 0x021D57B4 - ldr r1, [r1, #4] - lsl r0, r0, #2 - add r0, r1, r0 - bx lr - thumb_func_end ov5_021D57B4 - - thumb_func_start ov5_021D57BC -ov5_021D57BC: ; 0x021D57BC - push {r4, lr} - mov r0, #4 - mov r1, #0x38 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #0x38 - bl sub_020C4B4C - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D57BC - - thumb_func_start ov5_021D57D8 -ov5_021D57D8: ; 0x021D57D8 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D57D8 - - thumb_func_start ov5_021D57EC -ov5_021D57EC: ; 0x021D57EC - ldr r0, [r0, #0] - bx lr - thumb_func_end ov5_021D57EC - - thumb_func_start ov5_021D57F0 -ov5_021D57F0: ; 0x021D57F0 - ldr r0, [r0, #8] - bx lr - thumb_func_end ov5_021D57F0 - - thumb_func_start ov5_021D57F4 -ov5_021D57F4: ; 0x021D57F4 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov5_021D57F4 - - thumb_func_start ov5_021D57F8 -ov5_021D57F8: ; 0x021D57F8 - ldrh r0, [r0, #0x10] - bx lr - thumb_func_end ov5_021D57F8 - - thumb_func_start ov5_021D57FC -ov5_021D57FC: ; 0x021D57FC - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - tst r0, r1 - beq _021D5808 - str r2, [r4, #0] -_021D5808: - mov r0, #2 - tst r0, r1 - beq _021D5810 - str r3, [r4, #4] -_021D5810: - mov r0, #4 - tst r0, r1 - beq _021D581A - ldr r0, [sp, #8] - str r0, [r4, #8] -_021D581A: - mov r0, #8 - tst r0, r1 - beq _021D5824 - ldr r0, [sp, #0xc] - str r0, [r4, #0xc] -_021D5824: - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - bl sub_020BFC74 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D57FC - - thumb_func_start ov5_021D5834 -ov5_021D5834: ; 0x021D5834 - push {r3, r4} - mov r4, #0x10 - tst r4, r1 - beq _021D583E - strh r2, [r0, #0x10] -_021D583E: - mov r2, #0x20 - tst r1, r2 - beq _021D5846 - str r3, [r0, #0x14] -_021D5846: - ldrh r1, [r0, #0x10] - ldr r0, [r0, #0x14] - lsl r0, r0, #0x10 - orr r1, r0 - ldr r0, _021D5858 ; =0x04000358 - str r1, [r0, #0] - pop {r3, r4} - bx lr - nop -_021D5858: .word 0x04000358 - thumb_func_end ov5_021D5834 - - thumb_func_start ov5_021D585C -ov5_021D585C: ; 0x021D585C - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - add r1, r4, #0 - add r1, #0x18 - mov r2, #0x20 - bl sub_020C4B68 - add r4, #0x18 - add r0, r4, #0 - bl sub_020BFD44 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D585C - - thumb_func_start ov5_021D5878 -ov5_021D5878: ; 0x021D5878 - push {r4, lr} - mov r0, #4 - mov r1, #0x48 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #0x48 - bl sub_020C4B4C - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5878 - - thumb_func_start ov5_021D5894 -ov5_021D5894: ; 0x021D5894 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5894 - - thumb_func_start ov5_021D58A8 -ov5_021D58A8: ; 0x021D58A8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 - add r5, r0, #0 - add r6, r0, #0 -_021D58B6: - mov r0, #1 - lsl r0, r4 - tst r0, r7 - beq _021D58D0 - mov r1, #0 - mov r2, #2 - mov r3, #4 - ldrsh r1, [r5, r1] - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - add r0, r4, #0 - bl sub_020AF51C -_021D58D0: - add r1, r4, #4 - mov r0, #1 - lsl r0, r1 - tst r0, r7 - beq _021D58E2 - ldrh r1, [r6, #0x18] - add r0, r4, #0 - bl sub_020AF558 -_021D58E2: - add r4, r4, #1 - add r5, r5, #6 - add r6, r6, #2 - cmp r4, #4 - blt _021D58B6 - mov r0, #3 - lsl r0, r0, #8 - tst r0, r7 - beq _021D5904 - ldr r0, [sp, #8] - ldr r1, [sp, #8] - ldr r2, [sp, #8] - ldrh r0, [r0, #0x20] - ldrh r1, [r1, #0x22] - ldr r2, [r2, #0x28] - bl sub_020AF56C -_021D5904: - mov r0, #3 - lsl r0, r0, #0xa - tst r0, r7 - beq _021D591C - ldr r0, [sp, #8] - ldr r1, [sp, #8] - ldr r2, [sp, #8] - ldrh r0, [r0, #0x24] - ldrh r1, [r1, #0x26] - ldr r2, [r2, #0x2c] - bl sub_020AF590 -_021D591C: - mov r0, #1 - lsl r0, r0, #0xc - cmp r7, r0 - blt _021D5944 - ldr r0, [sp, #8] - ldr r1, [sp, #8] - ldr r0, [r0, #0x40] - ldr r2, [sp, #8] - str r0, [sp] - ldr r0, [sp, #8] - ldr r3, [sp, #8] - ldr r0, [r0, #0x44] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [r1, #0x34] - ldr r0, [r0, #0x30] - ldr r2, [r2, #0x38] - ldr r3, [r3, #0x3c] - bl sub_020AF5B4 -_021D5944: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021D58A8 - - thumb_func_start ov5_021D5948 -ov5_021D5948: ; 0x021D5948 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #1 - add r4, r2, #0 - lsl r0, r0, #8 - add r6, r1, #0 - tst r0, r4 - beq _021D5960 - ldrh r1, [r5, #0x20] - add r0, r6, #0 - bl sub_020B3564 -_021D5960: - mov r0, #2 - lsl r0, r0, #8 - tst r0, r4 - beq _021D5970 - ldrh r1, [r5, #0x22] - add r0, r6, #0 - bl sub_020B35A4 -_021D5970: - mov r0, #1 - lsl r0, r0, #0xa - tst r0, r4 - beq _021D5980 - ldrh r1, [r5, #0x24] - add r0, r6, #0 - bl sub_020B35E4 -_021D5980: - mov r0, #2 - lsl r0, r0, #0xa - tst r0, r4 - beq _021D5990 - ldrh r1, [r5, #0x26] - add r0, r6, #0 - bl sub_020B3624 -_021D5990: - mov r0, #1 - lsl r0, r0, #0xc - tst r0, r4 - beq _021D59A0 - ldr r1, [r5, #0x30] - add r0, r6, #0 - bl sub_020B3664 -_021D59A0: - mov r0, #2 - lsl r0, r0, #0xc - tst r0, r4 - beq _021D59B0 - ldr r1, [r5, #0x34] - add r0, r6, #0 - bl sub_020B36A4 -_021D59B0: - mov r0, #1 - lsl r0, r0, #0xe - tst r0, r4 - beq _021D59C0 - ldr r1, [r5, #0x38] - add r0, r6, #0 - bl sub_020B36E4 -_021D59C0: - mov r0, #2 - lsl r0, r0, #0xe - tst r0, r4 - beq _021D59D0 - ldr r1, [r5, #0x3c] - add r0, r6, #0 - bl sub_020B3724 -_021D59D0: - mov r0, #1 - lsl r0, r0, #0x10 - tst r0, r4 - beq _021D59E0 - ldr r1, [r5, #0x40] - add r0, r6, #0 - bl sub_020B3764 -_021D59E0: - mov r1, #2 - lsl r1, r1, #0x10 - add r0, r4, #0 - tst r0, r1 - beq _021D59F6 - ldr r2, [r5, #0x44] - lsr r1, r1, #2 - add r0, r6, #0 - and r1, r2 - bl sub_020B37A4 -_021D59F6: - mov r1, #1 - lsl r1, r1, #0x12 - add r0, r4, #0 - tst r0, r1 - beq _021D5A0C - ldr r2, [r5, #0x44] - lsr r1, r1, #4 - add r0, r6, #0 - and r1, r2 - bl sub_020B37E4 -_021D5A0C: - mov r1, #2 - lsl r1, r1, #0x12 - add r0, r4, #0 - tst r0, r1 - beq _021D5A22 - ldr r2, [r5, #0x44] - lsr r1, r1, #6 - add r0, r6, #0 - and r1, r2 - bl sub_020B3824 -_021D5A22: - mov r1, #1 - lsl r1, r1, #0x14 - add r0, r4, #0 - tst r0, r1 - beq _021D5A38 - ldr r2, [r5, #0x44] - lsr r1, r1, #8 - add r0, r6, #0 - and r1, r2 - bl sub_020B3864 -_021D5A38: - mov r1, #2 - lsl r1, r1, #0x14 - add r0, r4, #0 - tst r0, r1 - beq _021D5A4E - ldr r2, [r5, #0x44] - lsr r1, r1, #0xa - add r0, r6, #0 - and r1, r2 - bl sub_020B38A4 -_021D5A4E: - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D5948 - - thumb_func_start ov5_021D5A50 -ov5_021D5A50: ; 0x021D5A50 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #6 - add r4, r1, #0 - mul r4, r0 - strh r2, [r5, r4] - add r2, r5, #2 - strh r3, [r2, r4] - add r6, sp, #0 - mov r0, #0x10 - ldrsh r0, [r6, r0] - add r3, r5, #4 - strh r0, [r3, r4] - add r0, r1, #0 - ldrsh r1, [r5, r4] - ldrsh r2, [r2, r4] - ldrsh r3, [r3, r4] - bl sub_020AF51C - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D5A50 - - thumb_func_start ov5_021D5A78 -ov5_021D5A78: ; 0x021D5A78 - push {r4, lr} - add r4, r0, #0 - add r4, #0x18 - lsl r3, r1, #1 - strh r2, [r4, r3] - add r0, r1, #0 - ldrh r1, [r4, r3] - bl sub_020AF558 - pop {r4, pc} - thumb_func_end ov5_021D5A78 - - thumb_func_start ov5_021D5A8C -ov5_021D5A8C: ; 0x021D5A8C - push {r3, lr} - strh r1, [r0, #0x20] - str r2, [r0, #0x28] - cmp r3, #1 - bne _021D5A9E - mov r1, #1 - lsl r1, r1, #8 - bl ov5_021D58A8 -_021D5A9E: - pop {r3, pc} - thumb_func_end ov5_021D5A8C - - thumb_func_start ov5_021D5AA0 -ov5_021D5AA0: ; 0x021D5AA0 - push {r3, lr} - strh r1, [r0, #0x22] - cmp r2, #1 - bne _021D5AB0 - mov r1, #2 - lsl r1, r1, #8 - bl ov5_021D58A8 -_021D5AB0: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5AA0 - - thumb_func_start ov5_021D5AB4 -ov5_021D5AB4: ; 0x021D5AB4 - push {r3, lr} - strh r1, [r0, #0x24] - str r2, [r0, #0x2c] - cmp r3, #1 - bne _021D5AC6 - mov r1, #1 - lsl r1, r1, #0xa - bl ov5_021D58A8 -_021D5AC6: - pop {r3, pc} - thumb_func_end ov5_021D5AB4 - - thumb_func_start ov5_021D5AC8 -ov5_021D5AC8: ; 0x021D5AC8 - push {r3, lr} - strh r1, [r0, #0x26] - cmp r2, #1 - bne _021D5AD8 - mov r1, #2 - lsl r1, r1, #0xa - bl ov5_021D58A8 -_021D5AD8: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5AC8 - - thumb_func_start ov5_021D5ADC -ov5_021D5ADC: ; 0x021D5ADC - push {r3, lr} - str r1, [r0, #0x34] - cmp r2, #1 - bne _021D5AEC - mov r1, #2 - lsl r1, r1, #0xc - bl ov5_021D58A8 -_021D5AEC: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5ADC - - thumb_func_start ov5_021D5AF0 -ov5_021D5AF0: ; 0x021D5AF0 - push {r3, lr} - str r1, [r0, #0x38] - cmp r2, #1 - bne _021D5B00 - mov r1, #1 - lsl r1, r1, #0xe - bl ov5_021D58A8 -_021D5B00: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5AF0 - - thumb_func_start ov5_021D5B04 -ov5_021D5B04: ; 0x021D5B04 - push {r3, lr} - str r1, [r0, #0x40] - cmp r2, #1 - bne _021D5B14 - mov r1, #1 - lsl r1, r1, #0x10 - bl ov5_021D58A8 -_021D5B14: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5B04 - - thumb_func_start ov5_021D5B18 -ov5_021D5B18: ; 0x021D5B18 - push {r3, lr} - cmp r2, #1 - ldr r2, [r0, #0x44] - bne _021D5B26 - tst r2, r1 - beq _021D5B2A - pop {r3, pc} -_021D5B26: - tst r2, r1 - beq _021D5B3C -_021D5B2A: - ldr r2, [r0, #0x44] - eor r1, r2 - str r1, [r0, #0x44] - cmp r3, #1 - bne _021D5B3C - mov r1, #1 - lsl r1, r1, #0xc - bl ov5_021D58A8 -_021D5B3C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5B18 - - thumb_func_start ov5_021D5B40 -ov5_021D5B40: ; 0x021D5B40 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0x18 - ldr r1, _021D5BA4 ; =0x021F8AE4 - mul r0, r2 - add r6, r3, #0 - add r4, r1, r0 - cmp r2, #0x11 - blo _021D5B5A - bl sub_02022974 -_021D5B5A: - mov r0, #4 - bl sub_020203AC - str r0, [r5, #0x24] - ldrb r0, [r4, #0xc] - add r2, r4, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x24] - str r0, [sp, #8] - ldrh r3, [r4, #0xe] - ldr r1, [r4, #0] - add r0, r7, #0 - bl sub_020206D0 - ldr r0, [r5, #0x24] - bl sub_020203D4 - ldr r0, [r4, #0x10] - ldr r1, [r4, #0x14] - ldr r2, [r5, #0x24] - bl sub_020206BC - cmp r6, #0 - beq _021D5B9E - ldr r0, [r5, #0x24] - mov r1, #6 - str r0, [sp] - mov r0, #7 - mov r2, #2 - mov r3, #4 - bl sub_02020304 -_021D5B9E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021D5BA4: .word 0x021F8AE4 - thumb_func_end ov5_021D5B40 - - thumb_func_start ov5_021D5BA8 -ov5_021D5BA8: ; 0x021D5BA8 - push {r4, lr} - add r4, r0, #0 - bl sub_020203E0 - ldr r0, [r4, #0x24] - bl sub_02020390 - ldr r0, [r4, #0x24] - bl sub_020203B8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5BA8 - - thumb_func_start ov5_021D5BC0 -ov5_021D5BC0: ; 0x021D5BC0 - push {r4, lr} - ldr r4, [r0, #0x18] - cmp r4, #0 - bne _021D5BCC - bl sub_02022974 -_021D5BCC: - cmp r4, #5 - blt _021D5BD4 - bl sub_02022974 -_021D5BD4: - sub r0, r4, #1 - pop {r4, pc} - thumb_func_end ov5_021D5BC0 - - thumb_func_start ov5_021D5BD8 -ov5_021D5BD8: ; 0x021D5BD8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021D5BC0 - add r1, r0, #0 - lsl r2, r1, #4 - ldr r1, _021D5BF0 ; =0x021F8C7C - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_021D5BF0: .word 0x021F8C7C - thumb_func_end ov5_021D5BD8 - - thumb_func_start ov5_021D5BF4 -ov5_021D5BF4: ; 0x021D5BF4 - push {r4, lr} - add r4, r0, #0 - bl ov5_021D5BC0 - lsl r1, r0, #4 - ldr r0, _021D5C10 ; =0x021F8C80 - ldr r1, [r0, r1] - cmp r1, #0 - bne _021D5C0A - mov r0, #1 - pop {r4, pc} -_021D5C0A: - add r0, r4, #0 - blx r1 - pop {r4, pc} - ; .align 2, 0 -_021D5C10: .word 0x021F8C80 - thumb_func_end ov5_021D5BF4 - - thumb_func_start ov5_021D5C14 -ov5_021D5C14: ; 0x021D5C14 - push {r4, lr} - add r4, r0, #0 - bl ov5_021D5BC0 - add r1, r0, #0 - lsl r2, r1, #4 - ldr r1, _021D5C2C ; =0x021F8C84 - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_021D5C2C: .word 0x021F8C84 - thumb_func_end ov5_021D5C14 - - thumb_func_start ov5_021D5C30 -ov5_021D5C30: ; 0x021D5C30 - push {r4, lr} - add r4, r0, #0 - bl ov5_021D5BC0 - add r1, r0, #0 - lsl r2, r1, #4 - ldr r1, _021D5C48 ; =0x021F8C88 - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_021D5C48: .word 0x021F8C88 - thumb_func_end ov5_021D5C30 - - thumb_func_start ov5_021D5C4C -ov5_021D5C4C: ; 0x021D5C4C - ldr r3, _021D5C50 ; =ov5_021EA728 - bx r3 - ; .align 2, 0 -_021D5C50: .word ov5_021EA728 - thumb_func_end ov5_021D5C4C - - thumb_func_start ov5_021D5C54 -ov5_021D5C54: ; 0x021D5C54 - ldr r3, _021D5C58 ; =sub_0205A0BC - bx r3 - ; .align 2, 0 -_021D5C58: .word sub_0205A0BC - thumb_func_end ov5_021D5C54 - - thumb_func_start ov5_021D5C5C -ov5_021D5C5C: ; 0x021D5C5C - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D5C74 ; =0x00000038 - mov r1, #2 - bl sub_02006590 - add r0, r4, #0 - bl ov56_02256410 - add r4, #0x84 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 -_021D5C74: .word 0x00000038 - thumb_func_end ov5_021D5C5C - - thumb_func_start ov5_021D5C78 -ov5_021D5C78: ; 0x021D5C78 - ldr r3, _021D5C7C ; =ov5_021EA790 - bx r3 - ; .align 2, 0 -_021D5C7C: .word ov5_021EA790 - thumb_func_end ov5_021D5C78 - - thumb_func_start ov5_021D5C80 -ov5_021D5C80: ; 0x021D5C80 - ldr r3, _021D5C84 ; =sub_0205A0A0 - bx r3 - ; .align 2, 0 -_021D5C84: .word sub_0205A0A0 - thumb_func_end ov5_021D5C80 - - thumb_func_start ov5_021D5C88 -ov5_021D5C88: ; 0x021D5C88 - push {r3, lr} - add r0, #0x84 - ldr r0, [r0, #0] - bl ov56_02256468 - ldr r0, _021D5C9C ; =0x00000038 - bl sub_02006514 - pop {r3, pc} - nop -_021D5C9C: .word 0x00000038 - thumb_func_end ov5_021D5C88 - - thumb_func_start ov5_021D5CA0 -ov5_021D5CA0: ; 0x021D5CA0 - ldr r3, _021D5CA4 ; =ov5_021EA7CC - bx r3 - ; .align 2, 0 -_021D5CA4: .word ov5_021EA7CC - thumb_func_end ov5_021D5CA0 - - thumb_func_start ov5_021D5CA8 -ov5_021D5CA8: ; 0x021D5CA8 - mov r0, #1 - bx lr - thumb_func_end ov5_021D5CA8 - - thumb_func_start ov5_021D5CAC -ov5_021D5CAC: ; 0x021D5CAC - mov r0, #1 - bx lr - thumb_func_end ov5_021D5CAC - - thumb_func_start ov5_021D5CB0 -ov5_021D5CB0: ; 0x021D5CB0 - push {r4, lr} - mov r1, #0x62 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - add r4, r0, #0 - bne _021D5CC4 - bl sub_02022974 -_021D5CC4: - mov r1, #0 - add r2, r4, #0 - add r0, r1, #0 -_021D5CCA: - strh r0, [r2, #0x1c] - strh r0, [r2, #0x1e] - str r0, [r2, #8] - str r0, [r2, #0x10] - str r0, [r2, #0x18] - str r0, [r2, #0x14] - add r1, r1, #1 - add r2, #0x18 - cmp r1, #0x10 - blt _021D5CCA - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5CB0 - - thumb_func_start ov5_021D5CE4 -ov5_021D5CE4: ; 0x021D5CE4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r6, #0 - mov r0, #0x9b - mov r1, #4 - bl sub_02006C24 - add r1, r6, #0 - mov r2, #4 - add r7, r0, #0 - bl sub_02006CB8 - str r0, [r5, #0] - str r0, [r5, #4] - ldr r0, [r0, #0] - add r4, r6, #0 - cmp r0, #0 - bls _021D5D26 -_021D5D0A: - ldr r1, [sp] - add r0, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov5_021D5D30 - cmp r0, #0 - blt _021D5D1C - add r6, r6, #1 -_021D5D1C: - ldr r0, [r5, #4] - add r4, r4, #1 - ldr r0, [r0, #0] - cmp r4, r0 - blo _021D5D0A -_021D5D26: - add r0, r7, #0 - bl sub_02006CA8 - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D5CE4 - - thumb_func_start ov5_021D5D30 -ov5_021D5D30: ; 0x021D5D30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r0, #0 - str r1, [sp] - str r2, [sp, #4] - str r3, [sp, #8] - bne _021D5D46 - mov r0, #0 - add sp, #0x38 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_021D5D46: - mov r4, #0 - add r1, r5, #0 -_021D5D4A: - ldr r0, [r1, #0x14] - cmp r0, #0 - beq _021D5D58 - add r4, r4, #1 - add r1, #0x18 - cmp r4, #0x10 - blt _021D5D4A -_021D5D58: - cmp r4, #0x10 - beq _021D5D62 - ldr r0, [sp] - cmp r0, #0 - bne _021D5D6A -_021D5D62: - mov r0, #0 - add sp, #0x38 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_021D5D6A: - mov r0, #0x18 - add r6, r4, #0 - mul r6, r0 - add r0, r5, #0 - str r0, [sp, #0xc] - add r0, #8 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - mov r1, #0x34 - add r7, r0, #0 - mul r7, r1 - ldr r1, [r5, #4] - ldr r0, [sp] - add r1, r1, #4 - add r1, r1, r7 - bl sub_0201DF50 - ldr r1, [sp, #0xc] - str r0, [r1, r6] - add r0, r1, #0 - ldr r0, [r0, r6] - cmp r0, #0 - bne _021D5DA0 - mov r0, #0 - add sp, #0x38 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_021D5DA0: - ldr r1, [r5, #4] - ldr r0, [sp] - add r1, r1, #4 - add r1, r1, r7 - bl sub_0201DFE4 - add r1, r5, r6 - str r0, [r1, #0xc] - ldr r1, _021D5DE8 ; =0x02201D20 - ldr r2, [sp, #4] - add r0, sp, #0x10 - bl sub_020D7510 - ldr r0, [r5, #4] - mov r2, #4 - add r0, r0, #4 - add r1, r0, r7 - add r0, r5, r6 - str r1, [r0, #0x18] - ldr r1, [sp, #4] - add r7, r5, #0 - ldr r0, [sp, #8] - add r7, #0x14 - add r1, r1, #1 - bl sub_02006CB8 - str r0, [r7, r6] - ldr r0, [r7, r6] - bl sub_020B3C1C - add r1, r5, r6 - str r0, [r1, #0x10] - add r0, r4, #0 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D5DE8: .word 0x02201D20 - thumb_func_end ov5_021D5D30 - - thumb_func_start ov5_021D5DEC -ov5_021D5DEC: ; 0x021D5DEC - push {r3, r4, r5, r6, r7, lr} - cmp r0, #0 - beq _021D5E58 - mov r4, #0 - add r5, r0, #0 - add r5, #8 - add r6, r4, #0 - add r7, r4, #0 -_021D5DFC: - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _021D5E50 - ldr r1, [r5, #0x10] - cmp r1, #0 - beq _021D5E50 - ldrh r0, [r5, #0x14] - lsl r0, r0, #1 - add r0, r1, r0 - ldrb r1, [r0, #0x11] - ldrh r0, [r5, #0x16] - cmp r1, r0 - bgt _021D5E4C - strh r6, [r5, #0x16] - ldrh r0, [r5, #0x14] - add r0, r0, #1 - strh r0, [r5, #0x14] - ldrh r0, [r5, #0x14] - ldr r1, [r5, #0x10] - lsl r0, r0, #1 - add r0, r1, r0 - ldrb r0, [r0, #0x10] - cmp r0, #0xff - bne _021D5E2E - strh r6, [r5, #0x14] -_021D5E2E: - ldrh r2, [r5, #0x14] - ldr r1, [r5, #0x10] - ldr r0, [r5, #8] - lsl r2, r2, #1 - add r1, r1, r2 - ldrb r1, [r1, #0x10] - bl sub_0201DEAC - add r2, r0, #0 - ldr r1, [r5, #0] - ldr r3, [r5, #4] - add r0, r7, #0 - bl sub_0201DC68 - b _021D5E50 -_021D5E4C: - add r0, r0, #1 - strh r0, [r5, #0x16] -_021D5E50: - add r4, r4, #1 - add r5, #0x18 - cmp r4, #0x10 - blt _021D5DFC -_021D5E58: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5DEC - - thumb_func_start ov5_021D5E5C -ov5_021D5E5C: ; 0x021D5E5C - push {r3, r4, r5, lr} - add r5, r0, #0 - beq _021D5E8A - mov r0, #0x18 - add r4, r1, #0 - mul r4, r0 - add r0, r5, r4 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _021D5E74 - bl sub_020181C4 -_021D5E74: - add r1, r5, #0 - add r1, #0x18 - ldr r0, [r1, r4] - cmp r0, #0 - beq _021D5E82 - mov r0, #0 - str r0, [r1, r4] -_021D5E82: - mov r1, #0 - add r0, r5, r4 - strh r1, [r0, #0x1c] - strh r1, [r0, #0x1e] -_021D5E8A: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D5E5C - - thumb_func_start ov5_021D5E8C -ov5_021D5E8C: ; 0x021D5E8C - push {r3, r4, r5, lr} - add r5, r0, #0 - beq _021D5EA8 - mov r4, #0 -_021D5E94: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D5E5C - add r4, r4, #1 - cmp r4, #0x10 - blt _021D5E94 - ldr r0, [r5, #0] - bl sub_020181C4 -_021D5EA8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5E8C - - thumb_func_start ov5_021D5EAC -ov5_021D5EAC: ; 0x021D5EAC - push {r3, lr} - cmp r0, #0 - beq _021D5EB6 - bl sub_020181C4 -_021D5EB6: - pop {r3, pc} - thumb_func_end ov5_021D5EAC - - thumb_func_start ov5_021D5EB8 -ov5_021D5EB8: ; 0x021D5EB8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D5ECC: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D5ECC - add r0, r5, #0 - bl ov5_021D6364 - str r0, [r4, #0] - mov r1, #0 - str r1, [r4, #4] - str r1, [r4, #8] - mov r0, #6 - str r0, [r4, #0xc] - str r1, [r4, #0x14] - mov r0, #0x1f - str r0, [r4, #0x10] - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D5EB8 - - thumb_func_start ov5_021D5EF8 -ov5_021D5EF8: ; 0x021D5EF8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D5F06 - bl sub_0200DA58 -_021D5F06: - add r0, r4, #0 - bl ov5_021D63A4 - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021D5F12: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021D5F12 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5EF8 - - thumb_func_start ov5_021D5F24 -ov5_021D5F24: ; 0x021D5F24 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - cmp r0, #6 - beq _021D5F34 - bl sub_02022974 -_021D5F34: - cmp r4, #0x1f - blt _021D5F3C - bl sub_02022974 -_021D5F3C: - ldr r2, [r5, #4] - cmp r2, r4 - beq _021D5F78 - ldr r0, [r5, #0] - mov r1, #8 - bl ov5_021D6418 - cmp r0, #0 - bne _021D5F52 - bl sub_02022974 -_021D5F52: - ldr r0, [r5, #0] - mov r1, #0 - add r2, r4, #0 - bl ov5_021D6418 - cmp r0, #0 - bne _021D5F64 - bl sub_02022974 -_021D5F64: - ldr r0, [r5, #0] - mov r1, #3 - add r2, r4, #0 - bl ov5_021D6418 - cmp r0, #0 - bne _021D5F76 - bl sub_02022974 -_021D5F76: - str r4, [r5, #4] -_021D5F78: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D5F24 - - thumb_func_start ov5_021D5F7C -ov5_021D5F7C: ; 0x021D5F7C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0x1f - blt _021D5F8A - bl sub_02022974 -_021D5F8A: - ldr r0, [r5, #0xc] - cmp r0, #6 - beq _021D5F96 - str r4, [r5, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D5F96: - ldr r0, [r5, #4] - cmp r0, r4 - bne _021D5FA0 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D5FA0: - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _021D5FAA - bl sub_02022974 -_021D5FAA: - str r4, [r5, #8] - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov5_021D6178 - cmp r0, #0 - bne _021D5FC6 - ldr r0, _021D5FD8 ; =ov5_021D5FE4 - mov r2, #0 - add r1, r5, #0 - str r2, [r5, #0xc] - bl sub_0200D9E8 - b _021D5FD2 -_021D5FC6: - ldr r0, _021D5FDC ; =ov5_021D60B4 - mov r2, #0 - add r1, r5, #0 - str r2, [r5, #0xc] - bl sub_0200D9E8 -_021D5FD2: - str r0, [r5, #0x14] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D5FD8: .word ov5_021D5FE4 -_021D5FDC: .word ov5_021D60B4 - thumb_func_end ov5_021D5F7C - - thumb_func_start ov5_021D5FE0 -ov5_021D5FE0: ; 0x021D5FE0 - ldr r0, [r0, #4] - bx lr - thumb_func_end ov5_021D5FE0 - - thumb_func_start ov5_021D5FE4 -ov5_021D5FE4: ; 0x021D5FE4 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - cmp r1, #5 - bhi _021D60B2 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D5FFA: ; jump table - .short _021D6006 - _021D5FFA - 2 ; case 0 - .short _021D6020 - _021D5FFA - 2 ; case 1 - .short _021D6046 - _021D5FFA - 2 ; case 2 - .short _021D6060 - _021D5FFA - 2 ; case 3 - .short _021D6074 - _021D5FFA - 2 ; case 4 - .short _021D6096 - _021D5FFA - 2 ; case 5 -_021D6006: - ldr r0, [r4, #0] - ldr r2, [r4, #4] - mov r1, #5 - bl ov5_021D6418 - cmp r0, #0 - bne _021D6018 - bl sub_02022974 -_021D6018: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D6020: - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov5_021D64D0 - cmp r0, #3 - beq _021D60B2 - ldr r0, [r4, #0] - ldr r2, [r4, #4] - mov r1, #8 - bl ov5_021D6418 - cmp r0, #0 - bne _021D603E - bl sub_02022974 -_021D603E: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D6046: - ldr r0, [r4, #0] - ldr r2, [r4, #8] - mov r1, #1 - bl ov5_021D6418 - cmp r0, #0 - bne _021D6058 - bl sub_02022974 -_021D6058: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D6060: - ldr r0, [r4, #0] - ldr r1, [r4, #8] - bl ov5_021D64D0 - cmp r0, #1 - beq _021D60B2 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D6074: - ldr r0, [r4, #0] - ldr r2, [r4, #8] - mov r1, #2 - bl ov5_021D6418 - cmp r0, #0 - bne _021D6086 - bl sub_02022974 -_021D6086: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} -_021D6096: - mov r1, #6 - str r1, [r4, #0xc] - mov r1, #0 - str r1, [r4, #0x14] - bl sub_0200DA58 - ldr r1, [r4, #0x10] - cmp r1, #0x1f - beq _021D60B2 - add r0, r4, #0 - bl ov5_021D5F7C - mov r0, #0x1f - str r0, [r4, #0x10] -_021D60B2: - pop {r4, pc} - thumb_func_end ov5_021D5FE4 - - thumb_func_start ov5_021D60B4 -ov5_021D60B4: ; 0x021D60B4 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0xc] - cmp r1, #4 - bhi _021D6176 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D60CA: ; jump table - .short _021D60D4 - _021D60CA - 2 ; case 0 - .short _021D60EE - _021D60CA - 2 ; case 1 - .short _021D6102 - _021D60CA - 2 ; case 2 - .short _021D612E - _021D60CA - 2 ; case 3 - .short _021D6154 - _021D60CA - 2 ; case 4 -_021D60D4: - ldr r0, [r4, #0] - ldr r2, [r4, #8] - mov r1, #1 - bl ov5_021D6418 - cmp r0, #0 - bne _021D60E6 - bl sub_02022974 -_021D60E6: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D60EE: - ldr r0, [r4, #0] - ldr r1, [r4, #8] - bl ov5_021D64D0 - cmp r0, #1 - beq _021D6176 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D6102: - ldr r0, [r4, #0] - ldr r2, [r4, #4] - mov r1, #7 - bl ov5_021D6418 - cmp r0, #0 - bne _021D6114 - bl sub_02022974 -_021D6114: - ldr r0, [r4, #0] - ldr r2, [r4, #8] - mov r1, #4 - bl ov5_021D6418 - cmp r0, #0 - bne _021D6126 - bl sub_02022974 -_021D6126: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D612E: - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov5_021D64D0 - cmp r0, #3 - beq _021D6176 - ldr r0, [r4, #0] - ldr r2, [r4, #4] - mov r1, #8 - bl ov5_021D6418 - cmp r0, #0 - bne _021D614C - bl sub_02022974 -_021D614C: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - pop {r4, pc} -_021D6154: - ldr r1, [r4, #8] - mov r2, #0 - str r1, [r4, #4] - str r2, [r4, #8] - mov r1, #6 - str r1, [r4, #0xc] - str r2, [r4, #0x14] - bl sub_0200DA58 - ldr r1, [r4, #0x10] - cmp r1, #0x1f - beq _021D6176 - add r0, r4, #0 - bl ov5_021D5F7C - mov r0, #0x1f - str r0, [r4, #0x10] -_021D6176: - pop {r4, pc} - thumb_func_end ov5_021D60B4 - - thumb_func_start ov5_021D6178 -ov5_021D6178: ; 0x021D6178 - mov r2, #0 - cmp r0, #7 - bgt _021D618E - cmp r0, #5 - blt _021D61CC - beq _021D6194 - cmp r0, #6 - beq _021D61A4 - cmp r0, #7 - beq _021D61BE - b _021D61CC -_021D618E: - cmp r0, #0x15 - beq _021D61B4 - b _021D61CC -_021D6194: - cmp r1, #6 - beq _021D61A0 - cmp r1, #0x15 - beq _021D61A0 - cmp r1, #7 - bne _021D61CC -_021D61A0: - mov r2, #1 - b _021D61CC -_021D61A4: - cmp r1, #5 - beq _021D61B0 - cmp r1, #0x15 - beq _021D61B0 - cmp r1, #7 - bne _021D61CC -_021D61B0: - mov r2, #1 - b _021D61CC -_021D61B4: - sub r0, r1, #5 - cmp r0, #2 - bhi _021D61CC - mov r2, #1 - b _021D61CC -_021D61BE: - cmp r1, #5 - beq _021D61CA - cmp r1, #0x15 - beq _021D61CA - cmp r1, #6 - bne _021D61CC -_021D61CA: - mov r2, #1 -_021D61CC: - add r0, r2, #0 - bx lr - thumb_func_end ov5_021D6178 - - thumb_func_start ov5_021D61D0 -ov5_021D61D0: ; 0x021D61D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - ldr r1, _021D627C ; =0xFFFFF000 - add r6, r0, #0 - add r0, #0x14 - bl sub_0202309C - mov r0, #0 - add r3, r6, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0xff - lsl r0, r0, #0xc - str r0, [sp, #0x14] - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [sp, #0x18] - add r0, r6, #0 - add r0, #0xac - add r1, sp, #0xc - mov r2, #1 - add r3, #0x14 - bl sub_0200A8B0 - mov r4, #0 - add r5, r6, #0 - mov r7, #0x1f -_021D6206: - add r0, r7, #0 - add r1, r4, #0 - mov r2, #4 - bl sub_02009714 - add r4, r4, #1 - stmia r5!, {r0} - cmp r4, #4 - blt _021D6206 - bl sub_02009F34 - add r1, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - str r0, [r6, #0x10] - mov r1, #0 - mov r2, #0x3f - bl ov5_021D6290 - ldr r0, [r6, #0x10] - mov r1, #1 - mov r2, #0x40 - bl ov5_021D6290 - ldr r0, [r6, #0x10] - mov r1, #2 - mov r2, #0x3d - bl ov5_021D6290 - ldr r0, [r6, #0x10] - mov r1, #3 - mov r2, #0x3e - bl ov5_021D6290 - mov r0, #0x60 - str r0, [sp] - add r0, r6, #0 - add r0, #0x14 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - add r0, sp, #0 - bl sub_020218BC - add r1, r6, #0 - add r1, #0xf4 - str r0, [r1, #0] - ldr r0, _021D6280 ; =ov5_021D6284 - add r1, r6, #0 - mov r2, #0xa - bl sub_0200D9E8 - add r6, #0xf8 - str r0, [r6, #0] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D627C: .word 0xFFFFF000 -_021D6280: .word ov5_021D6284 - thumb_func_end ov5_021D61D0 - - thumb_func_start ov5_021D6284 -ov5_021D6284: ; 0x021D6284 - ldr r3, _021D628C ; =sub_020219F8 - add r1, #0xf4 - ldr r0, [r1, #0] - bx r3 - ; .align 2, 0 -_021D628C: .word sub_020219F8 - thumb_func_end ov5_021D6284 - - thumb_func_start ov5_021D6290 -ov5_021D6290: ; 0x021D6290 - push {r3, r4, r5, lr} - add r5, r2, #0 - bl sub_02009F38 - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x41 - add r1, r5, #0 - mov r2, #0 - mov r3, #4 - bl sub_02006FE8 - add r5, r0, #0 - add r1, r4, #0 - mov r2, #4 - bl sub_02009F40 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D6290 - - thumb_func_start ov5_021D62BC -ov5_021D62BC: ; 0x021D62BC - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021D62C4: - ldr r0, [r6, #0x10] - add r1, r4, #0 - bl sub_02009F38 - bl sub_02009F8C - ldr r0, [r5, #0] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021D62C4 - ldr r0, [r6, #0x10] - bl sub_020181C4 - mov r0, #0 - str r0, [r6, #0x10] - add r0, r6, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - bl sub_02021964 - add r0, r6, #0 - mov r1, #0 - add r0, #0xf4 - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl sub_0200DA58 - mov r0, #0 - add r6, #0xf8 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D62BC - - thumb_func_start ov5_021D630C -ov5_021D630C: ; 0x021D630C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r1, _021D635C ; =0x0013F000 - cmp r0, r1 - ble _021D6322 - bl sub_020E1F6C - str r1, [r4, #0] - b _021D632C -_021D6322: - ldr r2, _021D6360 ; =0xFFFC0000 - cmp r0, r2 - bge _021D632C - add r0, r0, r1 - str r0, [r4, #0] -_021D632C: - mov r1, #1 - ldr r3, [r4, #4] - lsl r1, r1, #0x14 - cmp r3, r1 - ble _021D6346 - lsr r2, r3, #0x1f - lsl r1, r3, #0xc - sub r1, r1, r2 - mov r0, #0xc - ror r1, r0 - add r0, r2, r1 - str r0, [r4, #4] - b _021D6350 -_021D6346: - ldr r0, _021D6360 ; =0xFFFC0000 - cmp r3, r0 - bge _021D6350 - add r0, r3, r1 - str r0, [r4, #4] -_021D6350: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021C50 - pop {r3, r4, r5, pc} - nop -_021D635C: .word 0x0013F000 -_021D6360: .word 0xFFFC0000 - thumb_func_end ov5_021D630C - - thumb_func_start ov5_021D6364 -ov5_021D6364: ; 0x021D6364 - push {r3, r4, r5, lr} - mov r1, #0x43 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0x41 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - add r0, #8 - bl ov5_021D61D0 - ldr r0, _021D639C ; =0x02201D78 - mov r1, #4 - str r0, [r4, #0] - ldr r0, _021D63A0 ; =0x021F8D90 - str r0, [r4, #4] - mov r0, #0x41 - bl sub_02006C24 - mov r1, #0x42 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D639C: .word 0x02201D78 -_021D63A0: .word 0x021F8D90 - thumb_func_end ov5_021D6364 - - thumb_func_start ov5_021D63A4 -ov5_021D63A4: ; 0x021D63A4 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D640E - mov r5, #0 -_021D63B2: - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov5_021D68B8 - add r5, r5, #1 - cmp r5, #0x1f - blt _021D63B2 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - ldr r0, [r0, #0x48] - add r3, r2, #0 - bl ov5_021D57FC - ldr r1, _021D6414 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - strh r0, [r1] - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0] - add r0, #8 - bl ov5_021D62BC - mov r0, #0x42 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_02006CA8 - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0] -_021D640E: - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021D6414: .word 0x04000008 - thumb_func_end ov5_021D63A4 - - thumb_func_start ov5_021D6418 -ov5_021D6418: ; 0x021D6418 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r6, r0, #0 - mov r5, #1 - cmp r4, #0x1f - ble _021D6428 - mov r0, #0 - pop {r4, r5, r6, pc} -_021D6428: - cmp r1, #8 - bhi _021D64CC - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D6438: ; jump table - .short _021D644A - _021D6438 - 2 ; case 0 - .short _021D6454 - _021D6438 - 2 ; case 1 - .short _021D645E - _021D6438 - 2 ; case 2 - .short _021D646C - _021D6438 - 2 ; case 3 - .short _021D647A - _021D6438 - 2 ; case 4 - .short _021D64AA - _021D6438 - 2 ; case 5 - .short _021D64B4 - _021D6438 - 2 ; case 6 - .short _021D64BC - _021D6438 - 2 ; case 7 - .short _021D64C6 - _021D6438 - 2 ; case 8 -_021D644A: - add r1, r4, #0 - bl ov5_021D66D0 - add r5, r0, #0 - b _021D64CC -_021D6454: - add r1, r4, #0 - bl ov5_021D6730 - add r5, r0, #0 - b _021D64CC -_021D645E: - add r1, r4, #0 - mov r2, #0 - add r3, r5, #0 - bl ov5_021D676C - add r5, r0, #0 - b _021D64CC -_021D646C: - add r1, r4, #0 - mov r2, #2 - add r3, r5, #0 - bl ov5_021D676C - add r5, r0, #0 - b _021D64CC -_021D647A: - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r0, [r0, #0x48] - bl ov5_021D57EC - cmp r0, #1 - bne _021D649A - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - mov r3, #2 - bl ov5_021D676C - add r5, r0, #0 - b _021D64CC -_021D649A: - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - add r3, r5, #0 - bl ov5_021D676C - add r5, r0, #0 - b _021D64CC -_021D64AA: - add r1, r4, #0 - add r2, r5, #0 - bl ov5_021D6868 - b _021D64CC -_021D64B4: - add r1, r4, #0 - bl ov5_021D6890 - b _021D64CC -_021D64BC: - add r1, r4, #0 - mov r2, #0 - bl ov5_021D6868 - b _021D64CC -_021D64C6: - add r1, r4, #0 - bl ov5_021D68B8 -_021D64CC: - add r0, r5, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D6418 - - thumb_func_start ov5_021D64D0 -ov5_021D64D0: ; 0x021D64D0 - cmp r1, #0x1f - blt _021D64D8 - mov r0, #0 - bx lr -_021D64D8: - ldr r2, [r0, #0] - mov r0, #0x1c - mul r0, r1 - add r0, r2, r0 - ldrh r0, [r0, #0x10] - bx lr - thumb_func_end ov5_021D64D0 - - thumb_func_start ov5_021D64E4 -ov5_021D64E4: ; 0x021D64E4 - push {r3, lr} - add r3, r0, #0 - str r1, [sp] - ldr r0, _021D64F8 ; =0x04000050 - mov r1, #4 - mov r2, #0x21 - bl sub_020BF55C - pop {r3, pc} - nop -_021D64F8: .word 0x04000050 - thumb_func_end ov5_021D64E4 - - thumb_func_start ov5_021D64FC -ov5_021D64FC: ; 0x021D64FC - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0x10] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov5_021D64FC - - thumb_func_start ov5_021D650C -ov5_021D650C: ; 0x021D650C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - ldr r0, [r4, #0xc] - mul r0, r1 - ldr r1, [r4, #0x10] - bl sub_020E1F6C - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r0, #1 - cmp r0, r1 - bgt _021D6532 - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_021D6532: - str r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021D650C - - thumb_func_start ov5_021D6538 -ov5_021D6538: ; 0x021D6538 - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - strh r3, [r0, #0xe] - mov r1, #0 - strh r1, [r0, #0xc] - bx lr - thumb_func_end ov5_021D6538 - - thumb_func_start ov5_021D6548 -ov5_021D6548: ; 0x021D6548 - push {r4, lr} - add r4, r0, #0 - mov r2, #0xc - ldrsh r2, [r4, r2] - ldr r0, [r4, #8] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #0xe - ldrsh r1, [r4, r1] - bl sub_020BCFD0 - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - mov r0, #0xe - ldrsh r1, [r4, r0] - mov r0, #0xc - ldrsh r0, [r4, r0] - add r0, r0, #1 - cmp r0, r1 - bgt _021D658C - strh r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_021D658C: - strh r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D6548 - - thumb_func_start ov5_021D6594 -ov5_021D6594: ; 0x021D6594 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov5_021D6BFC - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021D6C30 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021D6C64 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021D6CA0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D6594 - - thumb_func_start ov5_021D65C0 -ov5_021D65C0: ; 0x021D65C0 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r4, r2, #0 - add r6, r1, #0 - add r7, r3, #0 - ldr r5, [sp, #0x40] - bl sub_02009F38 - str r0, [sp, #0x18] - add r1, r4, #0 - bl sub_02009FE8 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r1, r4, #0 - bl sub_0200A014 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - add r1, r4, #0 - bl sub_0200A040 - str r0, [sp, #0x24] - ldr r0, [sp, #0x18] - add r1, r4, #0 - bl sub_0200A074 - str r0, [sp, #0x28] - ldr r0, [sp, #0x18] - add r1, r4, #0 - bl sub_02009FB4 - cmp r6, #3 - bhi _021D668A - add r1, r6, r6 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D6610: ; jump table - .short _021D6618 - _021D6610 - 2 ; case 0 - .short _021D6636 - _021D6610 - 2 ; case 1 - .short _021D6658 - _021D6610 - 2 ; case 2 - .short _021D6672 - _021D6610 - 2 ; case 3 -_021D6618: - str r0, [sp] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x1c] - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #0x44] - ldr r3, [sp, #0x20] - str r0, [sp, #0xc] - add r0, r7, #0 - add r1, r5, #0 - bl sub_02009AA8 - str r0, [sp, #0x14] - b _021D668A -_021D6636: - str r0, [sp] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x1c] - str r0, [sp, #4] - ldr r0, [sp, #0x28] - ldr r3, [sp, #0x20] - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #0x44] - add r1, r5, #0 - str r0, [sp, #0x10] - add r0, r7, #0 - bl sub_02009B64 - str r0, [sp, #0x14] - b _021D668A -_021D6658: - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r0, r7, #0 - add r1, r5, #0 - bl sub_02009BC4 - str r0, [sp, #0x14] - b _021D668A -_021D6672: - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r0, r7, #0 - add r1, r5, #0 - bl sub_02009BC4 - str r0, [sp, #0x14] -_021D668A: - ldr r0, [sp, #0x14] - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021D65C0 - - thumb_func_start ov5_021D6690 -ov5_021D6690: ; 0x021D6690 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _021D66CC ; =0x0000FFFF - add r4, r2, #0 - cmp r1, r0 - beq _021D66C8 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D66A6 - bl sub_0200A4E4 -_021D66A6: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021D66B0 - bl sub_0200A6DC -_021D66B0: - mov r6, #0 -_021D66B2: - ldr r1, [r4, #0] - cmp r1, #0 - beq _021D66BE - ldr r0, [r5, #8] - bl sub_02009D68 -_021D66BE: - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #4 - blt _021D66B2 -_021D66C8: - pop {r4, r5, r6, pc} - nop -_021D66CC: .word 0x0000FFFF - thumb_func_end ov5_021D6690 - - thumb_func_start ov5_021D66D0 -ov5_021D66D0: ; 0x021D66D0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r2, #0x1c - ldr r3, [r5, #0] - mul r2, r1 - add r4, r3, r2 - ldr r1, [r4, #8] - cmp r1, #0 - bne _021D6728 - add r1, r4, #0 - bl ov5_021D6B60 - cmp r0, #0 - bne _021D66F0 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D66F0: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D6A48 - cmp r0, #0 - bne _021D6708 - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_021D6708: - ldr r1, [r4, #0xc] - ldr r0, [r4, #8] - str r1, [r0, #8] - ldrh r1, [r4] - ldr r0, _021D672C ; =0x0000FFFF - cmp r1, r0 - beq _021D671C - ldr r0, [r4, #8] - bl ov5_021D6D34 -_021D671C: - ldrh r1, [r4, #2] - add r0, r5, #0 - bl ov5_021D6A2C - mov r0, #2 - strh r0, [r4, #0x10] -_021D6728: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D672C: .word 0x0000FFFF - thumb_func_end ov5_021D66D0 - - thumb_func_start ov5_021D6730 -ov5_021D6730: ; 0x021D6730 - push {r4, lr} - mov r2, #0x1c - ldr r3, [r0, #0] - mul r2, r1 - add r4, r3, r2 - ldr r1, [r4, #8] - cmp r1, #0 - beq _021D6744 - mov r0, #1 - pop {r4, pc} -_021D6744: - add r1, r4, #0 - bl ov5_021D6B60 - cmp r0, #0 - bne _021D6752 - mov r0, #0 - pop {r4, pc} -_021D6752: - ldr r0, _021D6768 ; =ov5_021D6A84 - add r1, r4, #0 - mov r2, #1 - bl sub_0200D9E8 - str r0, [r4, #0x14] - mov r0, #1 - strh r0, [r4, #0x10] - mov r1, #0 - strh r1, [r4, #0x12] - pop {r4, pc} - ; .align 2, 0 -_021D6768: .word ov5_021D6A84 - thumb_func_end ov5_021D6730 - - thumb_func_start ov5_021D676C -ov5_021D676C: ; 0x021D676C - push {r4, r5, r6, lr} - add r5, r2, #0 - ldr r2, [r0, #0] - mov r0, #0x1c - mul r0, r1 - ldrh r1, [r2, r0] - add r4, r2, r0 - ldr r0, _021D6854 ; =0x0000FFFF - add r6, r3, #0 - cmp r1, r0 - beq _021D678C - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _021D678C - mov r0, #0 - pop {r4, r5, r6, pc} -_021D678C: - ldr r1, [r4, #8] - cmp r1, #0 - bne _021D6796 - mov r0, #0 - pop {r4, r5, r6, pc} -_021D6796: - ldrh r0, [r4, #0x10] - cmp r0, #2 - beq _021D67A0 - mov r0, #0 - pop {r4, r5, r6, pc} -_021D67A0: - ldr r0, [r4, #0x18] - mov r2, #4 - bl sub_0200D9E8 - ldr r1, [r4, #8] - ldr r3, _021D6858 ; =0x00000B88 - str r0, [r1, r3] - ldr r0, [r4, #8] - ldr r0, [r0, r3] - cmp r0, #0 - bne _021D67BA - mov r0, #0 - pop {r4, r5, r6, pc} -_021D67BA: - mov r0, #3 - strh r0, [r4, #0x10] - add r0, r3, #0 - ldr r1, [r4, #8] - add r0, #0x1a - strh r5, [r1, r0] - add r0, r3, #0 - ldr r1, [r4, #8] - mov r2, #0 - add r0, #0x1e - strh r2, [r1, r0] - ldr r1, [r4, #8] - add r0, r1, #0 - add r0, #0xc - str r0, [r1, #0x40] - ldr r1, [r4, #8] - add r0, r1, #0 - add r0, #0xc - str r0, [r1, #0x44] - add r0, r3, #0 - ldr r1, [r4, #8] - add r0, #0x1c - strh r6, [r1, r0] - add r0, r3, #0 - ldr r1, [r4, #8] - add r0, #0x14 - str r2, [r1, r0] - ldr r1, [r4, #8] - add r0, r3, #4 - ldr r6, _021D685C ; =0x021C5CE4 - add r5, r1, r0 - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r5, #0] - ldr r1, [r4, #4] - cmp r1, #0 - ble _021D6820 - mov r0, #4 - bl sub_02018144 - ldr r2, [r4, #8] - ldr r1, _021D6860 ; =0x00000B98 - str r0, [r2, r1] - ldr r0, [r4, #8] - ldr r2, [r4, #4] - ldr r0, [r0, r1] - mov r1, #0 - bl sub_020D5124 - b _021D6826 -_021D6820: - ldr r0, [r4, #8] - add r3, #0x10 - str r2, [r0, r3] -_021D6826: - ldrh r1, [r4, #2] - ldr r0, _021D6854 ; =0x0000FFFF - cmp r1, r0 - beq _021D6850 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r2, _021D6864 ; =0x0400000C - mov r1, #3 - ldrh r3, [r2] - mov r0, #1 - bic r3, r1 - orr r0, r3 - strh r0, [r2] - sub r2, r2, #4 - ldrh r3, [r2] - mov r0, #2 - bic r3, r1 - orr r0, r3 - strh r0, [r2] -_021D6850: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D6854: .word 0x0000FFFF -_021D6858: .word 0x00000B88 -_021D685C: .word 0x021C5CE4 -_021D6860: .word 0x00000B98 -_021D6864: .word 0x0400000C - thumb_func_end ov5_021D676C - - thumb_func_start ov5_021D6868 -ov5_021D6868: ; 0x021D6868 - push {r3, r4} - ldr r3, [r0, #0] - mov r0, #0x1c - mul r0, r1 - add r4, r3, r0 - ldrh r0, [r4, #0x10] - cmp r0, #3 - bne _021D6886 - ldr r1, [r4, #8] - ldr r0, _021D688C ; =0x00000BA6 - mov r3, #5 - strh r3, [r1, r0] - ldr r1, [r4, #8] - sub r0, r0, #2 - strh r2, [r1, r0] -_021D6886: - pop {r3, r4} - bx lr - nop -_021D688C: .word 0x00000BA6 - thumb_func_end ov5_021D6868 - - thumb_func_start ov5_021D6890 -ov5_021D6890: ; 0x021D6890 - push {r4, lr} - mov r2, #0x1c - ldr r3, [r0, #0] - mul r2, r1 - add r4, r3, r2 - bl ov5_021D64D0 - cmp r0, #3 - bne _021D68B2 - ldr r1, [r4, #8] - ldr r0, _021D68B4 ; =0x00000BA2 - mov r2, #5 - strh r2, [r1, r0] - ldr r1, [r4, #8] - ldr r2, [r4, #0x18] - mov r0, #0 - blx r2 -_021D68B2: - pop {r4, pc} - ; .align 2, 0 -_021D68B4: .word 0x00000BA2 - thumb_func_end ov5_021D6890 - - thumb_func_start ov5_021D68B8 -ov5_021D68B8: ; 0x021D68B8 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x1c - ldr r2, [r5, #0] - mul r0, r1 - add r4, r2, r0 - ldrh r1, [r4, #2] - ldr r0, _021D69A4 ; =0x0000FFFF - cmp r1, r0 - beq _021D68F6 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _021D69A8 ; =0x0400000C - mov r2, #3 - ldrh r3, [r0] - mov r1, #3 - bic r3, r2 - orr r1, r3 - strh r1, [r0] - sub r3, r0, #4 - ldrh r6, [r3] - mov r1, #1 - add r0, #0x44 - bic r6, r2 - orr r1, r6 - strh r1, [r3] - mov r1, #0 - strh r1, [r0] -_021D68F6: - ldr r2, [r4, #0xc] - cmp r2, #0 - beq _021D691E - ldrh r1, [r4] - add r0, r5, #0 - bl ov5_021D6690 - ldr r1, [r4, #0xc] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #0xc] - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D691E - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x14] -_021D691E: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D698A - add r0, #0xc - bl ov5_021D6FD8 - ldrh r1, [r4] - ldr r0, _021D69A4 ; =0x0000FFFF - cmp r1, r0 - beq _021D6938 - ldr r0, [r4, #8] - bl ov5_021D6D64 -_021D6938: - ldr r0, [r4, #8] - ldr r1, _021D69AC ; =0x00000B9C - ldr r1, [r0, r1] - cmp r1, #1 - bne _021D6946 - bl ov5_021DB4E4 -_021D6946: - ldr r1, [r4, #8] - ldr r0, _021D69B0 ; =0x00000B98 - ldr r1, [r1, r0] - cmp r1, #0 - beq _021D695E - mov r0, #4 - bl sub_02018238 - ldr r1, [r4, #8] - ldr r0, _021D69B0 ; =0x00000B98 - mov r2, #0 - str r2, [r1, r0] -_021D695E: - ldrh r0, [r4, #0x10] - cmp r0, #1 - bne _021D6970 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021D697E - bl sub_0200DA58 - b _021D697E -_021D6970: - cmp r0, #3 - bne _021D697E - ldr r1, [r4, #8] - ldr r0, _021D69B4 ; =0x00000B88 - ldr r0, [r1, r0] - bl sub_0200DA58 -_021D697E: - ldr r1, [r4, #8] - mov r0, #4 - bl sub_02018238 - mov r0, #0 - str r0, [r4, #8] -_021D698A: - mov r2, #0 - str r2, [sp] - mov r0, #0x41 - str r2, [sp, #4] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - ldr r0, [r0, #0x48] - add r3, r2, #0 - bl ov5_021D57FC - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D69A4: .word 0x0000FFFF -_021D69A8: .word 0x0400000C -_021D69AC: .word 0x00000B9C -_021D69B0: .word 0x00000B98 -_021D69B4: .word 0x00000B88 - thumb_func_end ov5_021D68B8 - - thumb_func_start ov5_021D69B8 -ov5_021D69B8: ; 0x021D69B8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrh r1, [r4, #2] - ldr r0, _021D6A1C ; =0x0000FFFF - cmp r1, r0 - beq _021D69EC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _021D6A20 ; =0x0400000C - mov r2, #3 - ldrh r3, [r0] - mov r1, #3 - bic r3, r2 - orr r1, r3 - strh r1, [r0] - sub r3, r0, #4 - ldrh r5, [r3] - mov r1, #1 - add r0, #0x44 - bic r5, r2 - orr r1, r5 - strh r1, [r3] - mov r1, #0 - strh r1, [r0] -_021D69EC: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D6A1A - add r0, #0xc - bl ov5_021D6FD8 - ldr r0, [r4, #8] - ldr r1, _021D6A24 ; =0x00000B9C - ldr r1, [r0, r1] - cmp r1, #1 - bne _021D6A06 - bl ov5_021DB4E4 -_021D6A06: - ldrh r0, [r4, #0x10] - cmp r0, #3 - bne _021D6A1A - ldr r1, [r4, #8] - ldr r0, _021D6A28 ; =0x00000B88 - ldr r0, [r1, r0] - bl sub_0200DA58 - mov r0, #2 - strh r0, [r4, #0x10] -_021D6A1A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6A1C: .word 0x0000FFFF -_021D6A20: .word 0x0400000C -_021D6A24: .word 0x00000B9C -_021D6A28: .word 0x00000B88 - thumb_func_end ov5_021D69B8 - - thumb_func_start ov5_021D6A2C -ov5_021D6A2C: ; 0x021D6A2C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021D6D84 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D6DCC - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D6E20 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D6A2C - - thumb_func_start ov5_021D6A48 -ov5_021D6A48: ; 0x021D6A48 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r1, [r4] - add r5, r0, #0 - ldr r0, _021D6A80 ; =0x0000FFFF - cmp r1, r0 - beq _021D6A7C - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _021D6A7C - add r0, r4, #0 - bl ov5_021D6BC4 - cmp r0, #0 - bne _021D6A6A - mov r0, #0 - pop {r3, r4, r5, pc} -_021D6A6A: - ldrh r1, [r4] - ldr r2, [r4, #0xc] - add r0, r5, #0 - bl ov5_021D6594 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021D6CDC -_021D6A7C: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6A80: .word 0x0000FFFF - thumb_func_end ov5_021D6A48 - - thumb_func_start ov5_021D6A84 -ov5_021D6A84: ; 0x021D6A84 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r2, [r4, #0x12] - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r2, #8 - ldr r0, [r0, #0] - bhi _021D6B5A - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D6AA0: ; jump table - .short _021D6AB2 - _021D6AA0 - 2 ; case 0 - .short _021D6AC8 - _021D6AA0 - 2 ; case 1 - .short _021D6AD8 - _021D6AA0 - 2 ; case 2 - .short _021D6AE6 - _021D6AA0 - 2 ; case 3 - .short _021D6AF6 - _021D6AA0 - 2 ; case 4 - .short _021D6B04 - _021D6AA0 - 2 ; case 5 - .short _021D6B14 - _021D6AA0 - 2 ; case 6 - .short _021D6B22 - _021D6AA0 - 2 ; case 7 - .short _021D6B32 - _021D6AA0 - 2 ; case 8 -_021D6AB2: - add r0, r4, #0 - bl ov5_021D6BC4 - cmp r0, #0 - bne _021D6AC0 - bl sub_02022974 -_021D6AC0: - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6AC8: - ldrh r1, [r4] - ldr r2, [r4, #0xc] - bl ov5_021D6BFC - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6AD8: - ldrh r1, [r4, #2] - bl ov5_021D6D84 - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6AE6: - ldrh r1, [r4] - ldr r2, [r4, #0xc] - bl ov5_021D6C30 - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6AF6: - ldrh r1, [r4, #2] - bl ov5_021D6DCC - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6B04: - ldrh r1, [r4] - ldr r2, [r4, #0xc] - bl ov5_021D6C64 - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6B14: - ldrh r1, [r4, #2] - bl ov5_021D6E20 - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6B22: - ldrh r1, [r4] - ldr r2, [r4, #0xc] - bl ov5_021D6CA0 - ldrh r0, [r4, #0x12] - add r0, r0, #1 - strh r0, [r4, #0x12] - pop {r3, r4, r5, pc} -_021D6B32: - bl ov5_021D6CDC - ldr r1, [r4, #0xc] - ldr r0, [r4, #8] - str r1, [r0, #8] - ldrh r1, [r4] - ldr r0, _021D6B5C ; =0x0000FFFF - cmp r1, r0 - beq _021D6B4A - ldr r0, [r4, #8] - bl ov5_021D6D34 -_021D6B4A: - mov r0, #2 - strh r0, [r4, #0x10] - mov r0, #0 - strh r0, [r4, #0x12] - str r0, [r4, #0x14] - add r0, r5, #0 - bl sub_0200DA58 -_021D6B5A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6B5C: .word 0x0000FFFF - thumb_func_end ov5_021D6A84 - - thumb_func_start ov5_021D6B60 -ov5_021D6B60: ; 0x021D6B60 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021D6B70 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D6B70: - ldr r1, _021D6BBC ; =0x00000BA8 - mov r0, #4 - bl sub_02018144 - str r0, [r4, #8] - cmp r0, #0 - bne _021D6B82 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D6B82: - ldr r2, _021D6BBC ; =0x00000BA8 - mov r1, #0 - bl sub_020D5124 - ldr r0, [r4, #8] - ldr r2, _021D6BC0 ; =0x00000BA2 - str r5, [r0, #0] - ldr r1, [r4, #8] - mov r0, #0 - strh r0, [r1, r2] - add r1, r2, #4 - ldr r3, [r4, #8] - sub r2, #0xa - strh r0, [r3, r1] - ldr r3, [r4, #8] - add r1, r3, #0 - add r1, #0xc - str r1, [r3, #0x40] - ldr r3, [r4, #8] - add r1, r3, #0 - add r1, #0xc - str r1, [r3, #0x44] - ldr r1, [r4, #8] - str r0, [r1, r2] - ldr r0, [r4, #8] - str r4, [r0, #4] - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_021D6BBC: .word 0x00000BA8 -_021D6BC0: .word 0x00000BA2 - thumb_func_end ov5_021D6B60 - - thumb_func_start ov5_021D6BC4 -ov5_021D6BC4: ; 0x021D6BC4 - push {r4, lr} - add r4, r0, #0 - ldrh r1, [r4] - ldr r0, _021D6BF8 ; =0x0000FFFF - cmp r1, r0 - beq _021D6BF4 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D6BDA - mov r0, #1 - pop {r4, pc} -_021D6BDA: - mov r0, #4 - mov r1, #0x64 - bl sub_02018144 - str r0, [r4, #0xc] - cmp r0, #0 - bne _021D6BEC - mov r0, #0 - pop {r4, pc} -_021D6BEC: - mov r1, #0 - mov r2, #0x64 - bl sub_020D5124 -_021D6BF4: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_021D6BF8: .word 0x0000FFFF - thumb_func_end ov5_021D6BC4 - - thumb_func_start ov5_021D6BFC -ov5_021D6BFC: ; 0x021D6BFC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _021D6C2C ; =0x0000FFFF - add r3, r1, #0 - add r4, r2, #0 - cmp r3, r0 - beq _021D6C26 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r3, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - ldr r3, [r5, #0x10] - mov r1, #2 - bl ov5_021D65C0 - str r0, [r4, #8] -_021D6C26: - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021D6C2C: .word 0x0000FFFF - thumb_func_end ov5_021D6BFC - - thumb_func_start ov5_021D6C30 -ov5_021D6C30: ; 0x021D6C30 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _021D6C60 ; =0x0000FFFF - add r3, r1, #0 - add r4, r2, #0 - cmp r3, r0 - beq _021D6C5A - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r3, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - ldr r3, [r5, #0x14] - mov r1, #3 - bl ov5_021D65C0 - str r0, [r4, #0xc] -_021D6C5A: - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021D6C60: .word 0x0000FFFF - thumb_func_end ov5_021D6C30 - - thumb_func_start ov5_021D6C64 -ov5_021D6C64: ; 0x021D6C64 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _021D6C9C ; =0x0000FFFF - add r3, r1, #0 - add r4, r2, #0 - cmp r3, r0 - beq _021D6C98 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r3, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - ldr r3, [r5, #8] - mov r1, #0 - bl ov5_021D65C0 - str r0, [r4, #0] - bl sub_0200A3DC - ldr r0, [r4, #0] - bl sub_02009D4C -_021D6C98: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6C9C: .word 0x0000FFFF - thumb_func_end ov5_021D6C64 - - thumb_func_start ov5_021D6CA0 -ov5_021D6CA0: ; 0x021D6CA0 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _021D6CD8 ; =0x0000FFFF - add r3, r1, #0 - add r4, r2, #0 - cmp r3, r0 - beq _021D6CD2 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - add r2, r3, #0 - ldr r0, [r5, #0x18] - ldr r3, [r5, #0xc] - bl ov5_021D65C0 - str r0, [r4, #4] - bl sub_0200A640 - ldr r0, [r4, #4] - bl sub_02009D4C -_021D6CD2: - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021D6CD8: .word 0x0000FFFF - thumb_func_end ov5_021D6CA0 - - thumb_func_start ov5_021D6CDC -ov5_021D6CDC: ; 0x021D6CDC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r1, [r4] - add r5, r0, #0 - ldr r0, _021D6D30 ; =0x0000FFFF - cmp r1, r0 - beq _021D6D2E - ldr r2, [r4, #0xc] - mov r0, #1 - str r0, [sp] - add r0, r2, #0 - add r0, #0x40 - add r1, r5, #0 - mov r3, #0 - bl ov5_021D6F4C - ldr r0, [r4, #0xc] - mov r1, #0 - add r0, #0x10 - mov r2, #0x30 - bl sub_020D5124 - add r5, #0xfc - ldr r1, [r5, #0] - ldr r0, [r4, #0xc] - str r1, [r0, #0x10] - ldr r1, [r4, #0xc] - add r0, r1, #0 - add r0, #0x40 - str r0, [r1, #0x14] - mov r1, #1 - ldr r0, [r4, #0xc] - lsl r1, r1, #0xc - str r1, [r0, #0x24] - ldr r0, [r4, #0xc] - str r1, [r0, #0x28] - ldr r0, [r4, #0xc] - str r1, [r0, #0x2c] - ldr r0, [r4, #0xc] - mov r1, #1 - str r1, [r0, #0x38] -_021D6D2E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D6D30: .word 0x0000FFFF - thumb_func_end ov5_021D6CDC - - thumb_func_start ov5_021D6D34 -ov5_021D6D34: ; 0x021D6D34 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 - add r7, r4, #0 -_021D6D3E: - ldr r0, [r6, #8] - add r0, #0x10 - bl sub_02021AA0 - str r0, [r5, #0x4c] - add r1, r7, #0 - bl sub_02021CAC - ldr r0, [r5, #0x4c] - cmp r0, #0 - bne _021D6D58 - bl sub_02022974 -_021D6D58: - add r4, r4, #1 - add r5, #0x3c - cmp r4, #0x30 - blt _021D6D3E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D6D34 - - thumb_func_start ov5_021D6D64 -ov5_021D6D64: ; 0x021D6D64 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 -_021D6D6C: - ldr r0, [r5, #0x4c] - cmp r0, #0 - beq _021D6D78 - bl sub_02021BD4 - str r6, [r5, #0x4c] -_021D6D78: - add r4, r4, #1 - add r5, #0x3c - cmp r4, #0x30 - blt _021D6D6C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D6D64 - - thumb_func_start ov5_021D6D84 -ov5_021D6D84: ; 0x021D6D84 - push {r3, lr} - sub sp, #0x18 - add r2, r0, #0 - ldr r0, _021D6DC8 ; =0x0000FFFF - cmp r1, r0 - beq _021D6DC4 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldr r3, [r2, #4] - mov r2, #0xc - mul r2, r1 - ldr r1, [r3, r2] - mov r2, #4 - bl sub_02006CB8 - add r1, sp, #0x14 - str r0, [sp] - bl sub_020A71B0 - ldr r1, [sp, #0x14] - mov r0, #2 - ldr r1, [r1, #0xc] - mov r2, #0x20 - mov r3, #0xc0 - bl sub_0201972C - ldr r0, [sp] - bl sub_020181C4 - mov r0, #0 - str r0, [sp] -_021D6DC4: - add sp, #0x18 - pop {r3, pc} - ; .align 2, 0 -_021D6DC8: .word 0x0000FFFF - thumb_func_end ov5_021D6D84 - - thumb_func_start ov5_021D6DCC -ov5_021D6DCC: ; 0x021D6DCC - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, _021D6E1C ; =0x0000FFFF - cmp r1, r0 - beq _021D6E18 - mov r2, #0xc - mov r0, #0x42 - lsl r0, r0, #2 - ldr r3, [r4, #4] - mul r2, r1 - add r1, r3, r2 - ldr r0, [r4, r0] - ldr r1, [r1, #4] - mov r2, #4 - bl sub_02006CB8 - add r1, sp, #0x14 - str r0, [sp, #8] - bl sub_020A7118 - ldr r3, [sp, #0x14] - mov r0, #0 - str r0, [sp] - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [r3, #0x14] - ldr r0, [r0, #8] - ldr r3, [r3, #0x10] - mov r1, #2 - bl sub_0201958C - ldr r0, [sp, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [sp, #8] -_021D6E18: - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_021D6E1C: .word 0x0000FFFF - thumb_func_end ov5_021D6DCC - - thumb_func_start ov5_021D6E20 -ov5_021D6E20: ; 0x021D6E20 - push {r4, r5, lr} - sub sp, #0x24 - add r4, r0, #0 - ldr r0, _021D6EC4 ; =0x0000FFFF - add r5, r1, #0 - cmp r5, r0 - beq _021D6EC0 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r1, #0xc - mov r0, #0x42 - lsl r0, r0, #2 - ldr r2, [r4, #4] - mul r1, r5 - add r1, r2, r1 - ldr r0, [r4, r0] - ldr r1, [r1, #8] - mov r2, #4 - bl sub_02006CB8 - str r0, [sp, #0x14] - cmp r0, #0 - bne _021D6E56 - bl sub_02022974 -_021D6E56: - ldr r0, [sp, #0x14] - add r1, sp, #0x18 - bl sub_020A7248 - ldr r3, [sp, #0x18] - mov r0, #0 - str r0, [sp] - add r2, r3, #0 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r3, [r3, #8] - ldr r0, [r0, #8] - mov r1, #2 - add r2, #0xc - bl sub_02019460 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r3, [sp, #0x18] - ldr r0, [r4, r0] - add r2, r3, #0 - ldr r0, [r0, #8] - ldr r3, [r3, #8] - mov r1, #2 - add r2, #0xc - bl sub_02019574 - mov r0, #0x20 - str r0, [sp] - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - add r0, #0xfe - ldr r0, [r4, r0] - mov r2, #0 - ldr r0, [r0, #8] - mov r1, #2 - add r3, r2, #0 - bl sub_02019E2C - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - ldr r0, [r0, #8] - bl sub_02019448 - ldr r0, [sp, #0x14] - bl sub_020181C4 - mov r0, #0 - str r0, [sp, #0x14] -_021D6EC0: - add sp, #0x24 - pop {r4, r5, pc} - ; .align 2, 0 -_021D6EC4: .word 0x0000FFFF - thumb_func_end ov5_021D6E20 - - thumb_func_start ov5_021D6EC8 -ov5_021D6EC8: ; 0x021D6EC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - add r4, r1, #0 - cmp r0, #0 - beq _021D6ED8 - bl sub_02022974 -_021D6ED8: - cmp r4, #0 - bgt _021D6EE0 - bl sub_02022974 -_021D6EE0: - cmp r4, #0x28 - bls _021D6EE8 - bl sub_02022974 -_021D6EE8: - add r0, r5, #0 - add r0, #0xc - str r0, [r5, #8] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D6EC8 - - thumb_func_start ov5_021D6EF0 -ov5_021D6EF0: ; 0x021D6EF0 - ldr r3, _021D6EFC ; =sub_020D5124 - mov r1, #0 - str r1, [r0, #8] - add r0, #0xc - mov r2, #0x28 - bx r3 - ; .align 2, 0 -_021D6EFC: .word sub_020D5124 - thumb_func_end ov5_021D6EF0 - - thumb_func_start ov5_021D6F00 -ov5_021D6F00: ; 0x021D6F00 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - ldr r6, [r5, #0] - bl ov5_021D75E4 - add r4, r0, #0 - bne _021D6F14 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D6F14: - add r1, r5, #0 - str r6, [r4, #0] - add r1, #0xc - str r1, [r4, #0x34] - ldr r1, [r5, #0x44] - str r1, [r4, #0x38] - ldr r1, [r5, #0x44] - str r4, [r1, #0x34] - str r4, [r5, #0x44] - add r1, r7, #0 - bl ov5_021D6EC8 - ldr r0, [r4, #8] - cmp r0, #0 - bne _021D6F36 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021D6F36: - ldr r0, [r4, #4] - cmp r0, #0 - bne _021D6F40 - bl sub_02022974 -_021D6F40: - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021CAC - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D6F00 - - thumb_func_start ov5_021D6F4C -ov5_021D6F4C: ; 0x021D6F4C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp, #0x2c] - add r7, r1, #0 - add r5, r2, #0 - str r3, [sp, #0x30] - mov r6, #0 - add r4, sp, #0x34 -_021D6F5C: - ldr r0, [r5, #0] - bl sub_02009E08 - add r6, r6, #1 - add r5, r5, #4 - stmia r4!, {r0} - cmp r6, #4 - blt _021D6F5C - ldr r0, [sp, #0x40] - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - ldr r0, [sp, #0x58] - str r0, [sp, #0x10] - ldr r0, [r7, #8] - str r0, [sp, #0x14] - ldr r0, [r7, #0xc] - str r0, [sp, #0x18] - ldr r0, [r7, #0x10] - str r0, [sp, #0x1c] - ldr r0, [r7, #0x14] - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r0, [sp, #0x2c] - ldr r1, [sp, #0x34] - ldr r2, [sp, #0x38] - ldr r3, [sp, #0x3c] - bl sub_020093B4 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D6F4C - - thumb_func_start ov5_021D6FA8 -ov5_021D6FA8: ; 0x021D6FA8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r1, [r4, #0x34] - ldr r0, [r4, #0x38] - str r1, [r0, #0x34] - ldr r1, [r4, #0x38] - ldr r0, [r4, #0x34] - str r1, [r0, #0x38] - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021CAC - add r0, r4, #0 - bl ov5_021D6EF0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x3c - ldr r5, [r4, #4] - bl sub_020D5124 - str r5, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D6FA8 - - thumb_func_start ov5_021D6FD8 -ov5_021D6FD8: ; 0x021D6FD8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x34] - cmp r0, r5 - beq _021D6FEE -_021D6FE2: - ldr r4, [r0, #0x34] - bl ov5_021D6FA8 - add r0, r4, #0 - cmp r4, r5 - bne _021D6FE2 -_021D6FEE: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D6FD8 - - thumb_func_start ov5_021D6FF0 -ov5_021D6FF0: ; 0x021D6FF0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x34] - add r6, r1, #0 - ldr r4, [r0, #0x34] - cmp r0, r5 - beq _021D7008 -_021D6FFE: - blx r6 - add r0, r4, #0 - ldr r4, [r4, #0x34] - cmp r0, r5 - bne _021D6FFE -_021D7008: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021D6FF0 - - thumb_func_start ov5_021D700C -ov5_021D700C: ; 0x021D700C - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D700C - - thumb_func_start ov5_021D7010 -ov5_021D7010: ; 0x021D7010 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #4] - bl sub_02021D28 - add r2, r0, #0 - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D7010 - - thumb_func_start ov5_021D7028 -ov5_021D7028: ; 0x021D7028 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - ldr r3, _021D7168 ; =0x021C5CE4 - add r5, r2, #0 - str r0, [sp, #4] - str r1, [sp, #8] - ldmia r3!, {r0, r1} - add r2, sp, #0x18 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, _021D716C ; =0x00000B8C - ldr r2, [sp, #0x18] - ldr r1, [r5, r0] - add r0, #8 - sub r6, r2, r1 - ldr r1, [sp, #0x20] - ldr r0, [r5, r0] - sub r4, r1, r0 - mov r0, #1 - mov r1, #3 - lsl r0, r0, #0xe - lsl r1, r1, #0xc - bl sub_020BCFD0 - add r7, r0, #0 - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r0, [r0, #0x24] - bl sub_02020A88 - str r0, [sp, #0xc] - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r0, [r0, #0x24] - bl sub_02020A90 - add r1, r0, #0 - add r0, sp, #0x10 - str r0, [sp] - ldr r0, [sp, #0xc] - add r2, r7, #0 - add r3, sp, #0x14 - bl sub_0201E34C - mov r1, #1 - ldr r0, [sp, #0x14] - lsl r1, r1, #0x14 - bl sub_020BCFD0 - str r0, [sp, #0x14] - cmp r4, #0 - bgt _021D70A4 - ldr r0, [sp, #0x10] - ldr r1, _021D7170 ; =0x000BE8D0 - bl sub_020BCFD0 - b _021D70AC -_021D70A4: - ldr r0, [sp, #0x10] - ldr r1, _021D7174 ; =0x000BE811 - bl sub_020BCFD0 -_021D70AC: - mov r7, #1 - lsl r7, r7, #0xc - str r0, [sp, #0x10] - cmp r6, #0 - bge _021D70D4 - ldr r7, _021D7178 ; =0xFFFFF000 - asr r1, r6, #0x1f - add r0, r6, #0 - asr r3, r7, #0xc - add r2, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r6, r2, #0xc - orr r6, r0 -_021D70D4: - ldr r1, [sp, #0x14] - add r0, r6, #0 - bl sub_020BCFD0 - add r6, r0, #0 - cmp r7, #0 - bge _021D70FC - asr r1, r6, #0x1f - asr r3, r7, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r6, r2, #0xc - orr r6, r0 -_021D70FC: - mov r7, #1 - lsl r7, r7, #0xc - cmp r4, #0 - bge _021D7122 - ldr r7, _021D7178 ; =0xFFFFF000 - asr r1, r4, #0x1f - add r0, r4, #0 - asr r3, r7, #0xc - add r2, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r4, r2, #0xc - orr r4, r0 -_021D7122: - ldr r1, [sp, #0x10] - add r0, r4, #0 - bl sub_020BCFD0 - add r3, r0, #0 - cmp r7, #0 - bge _021D714A - asr r1, r3, #0x1f - asr r3, r7, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r3, r2, #0xc - orr r3, r0 -_021D714A: - add r0, r6, r3 - beq _021D715C - ldr r0, _021D716C ; =0x00000B8C - add r2, sp, #0x18 - add r4, r5, r0 - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] -_021D715C: - ldr r0, [sp, #4] - str r6, [r0, #0] - ldr r0, [sp, #8] - str r3, [r0, #0] - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D7168: .word 0x021C5CE4 -_021D716C: .word 0x00000B8C -_021D7170: .word 0x000BE8D0 -_021D7174: .word 0x000BE811 -_021D7178: .word 0xFFFFF000 - thumb_func_end ov5_021D7028 - - thumb_func_start ov5_021D717C -ov5_021D717C: ; 0x021D717C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - add r4, r2, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov5_021D71B4 - cmp r5, #0 - beq _021D71A0 - ldr r0, [sp, #4] - asr r1, r0, #0xc - str r1, [r5, #0] - bpl _021D71A0 - mov r0, #1 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r5, #0] -_021D71A0: - cmp r4, #0 - beq _021D71B0 - ldr r0, [sp] - asr r0, r0, #0xc - str r0, [r4, #0] - bpl _021D71B0 - add r0, r0, #1 - str r0, [r4, #0] -_021D71B0: - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D717C - - thumb_func_start ov5_021D71B4 -ov5_021D71B4: ; 0x021D71B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp] - add r0, sp, #8 - add r1, sp, #4 - add r2, r5, #0 - bl ov5_021D7028 - ldr r4, [r5, #0x40] - add r5, #0xc - cmp r4, r5 - beq _021D71F8 - add r6, sp, #0xc -_021D71D2: - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021D7010 - ldr r1, [sp, #0xc] - ldr r0, [sp, #8] - sub r0, r1, r0 - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r0, [sp, #4] - sub r0, r1, r0 - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r6, #0 - bl ov5_021D630C - ldr r4, [r4, #0x34] - cmp r4, r5 - bne _021D71D2 -_021D71F8: - cmp r7, #0 - beq _021D7200 - ldr r0, [sp, #8] - str r0, [r7, #0] -_021D7200: - ldr r0, [sp] - cmp r0, #0 - beq _021D720A - ldr r1, [sp, #4] - str r1, [r0, #0] -_021D720A: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D71B4 - - thumb_func_start ov5_021D7210 -ov5_021D7210: ; 0x021D7210 - str r1, [r0, #0] - strh r2, [r0, #4] - mov r1, #0 - strh r1, [r0, #6] - strh r3, [r0, #8] - strh r1, [r0, #0xa] - ldr r1, [sp] - strh r1, [r0, #0xc] - ldr r1, [sp, #4] - strh r1, [r0, #0xe] - ldr r1, [sp, #8] - strh r1, [r0, #0x10] - ldr r1, [sp, #0xc] - strh r1, [r0, #0x12] - ldr r1, [sp, #0x10] - str r1, [r0, #0x14] - ldr r1, [sp, #0x14] - str r1, [r0, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D7210 - - thumb_func_start ov5_021D7238 -ov5_021D7238: ; 0x021D7238 - strh r1, [r0, #0xc] - strh r2, [r0, #0xe] - ldr r1, [sp] - strh r3, [r0, #0x10] - str r1, [r0, #0x14] - bx lr - thumb_func_end ov5_021D7238 - - thumb_func_start ov5_021D7244 -ov5_021D7244: ; 0x021D7244 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x10 - ldrsh r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - bne _021D7258 - mov r0, #1 - orr r4, r0 - b _021D727E -_021D7258: - bgt _021D725E - mov r2, #1 - b _021D7260 -_021D725E: - add r2, r4, #0 -_021D7260: - mov r0, #0xe - ldrsh r1, [r5, r0] - mov r0, #8 - ldrsh r0, [r5, r0] - cmp r0, r1 - blt _021D7270 - cmp r2, #0 - beq _021D7278 -_021D7270: - cmp r0, r1 - bgt _021D727E - cmp r2, #1 - bne _021D727E -_021D7278: - mov r0, #1 - orr r4, r0 - strh r1, [r5, #8] -_021D727E: - ldr r0, [r5, #0x14] - cmp r0, #0 - bne _021D728A - mov r0, #2 - orr r4, r0 - b _021D72B0 -_021D728A: - bgt _021D7290 - mov r2, #1 - b _021D7292 -_021D7290: - mov r2, #0 -_021D7292: - mov r0, #0xc - ldrsh r1, [r5, r0] - mov r0, #4 - ldrsh r0, [r5, r0] - cmp r0, r1 - blt _021D72A2 - cmp r2, #0 - beq _021D72AA -_021D72A2: - cmp r0, r1 - bgt _021D72B0 - cmp r2, #1 - bne _021D72B0 -_021D72AA: - mov r0, #2 - orr r4, r0 - strh r1, [r5, #4] -_021D72B0: - mov r0, #6 - ldrsh r1, [r5, r0] - sub r1, r1, #1 - strh r1, [r5, #6] - ldrsh r0, [r5, r0] - cmp r0, #0 - bgt _021D7304 - mov r1, #4 - ldrsh r1, [r5, r1] - ldr r0, [r5, #0] - ldr r2, [r5, #0x18] - blx r2 - mov r0, #8 - ldrsh r1, [r5, r0] - strh r1, [r5, #6] - mov r1, #1 - tst r1, r4 - bne _021D72DE - ldrsh r1, [r5, r0] - mov r0, #0x10 - ldrsh r0, [r5, r0] - add r0, r1, r0 - strh r0, [r5, #8] -_021D72DE: - mov r0, #2 - tst r0, r4 - bne _021D7304 - mov r0, #0xa - ldrsh r1, [r5, r0] - add r1, r1, #1 - strh r1, [r5, #0xa] - ldrsh r1, [r5, r0] - mov r0, #0x12 - ldrsh r0, [r5, r0] - cmp r1, r0 - blt _021D7304 - mov r0, #0 - strh r0, [r5, #0xa] - mov r0, #4 - ldrsh r1, [r5, r0] - ldr r0, [r5, #0x14] - add r0, r1, r0 - strh r0, [r5, #4] -_021D7304: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D7244 - - thumb_func_start ov5_021D7308 -ov5_021D7308: ; 0x021D7308 - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - ldr r1, [sp, #0x1c] - str r2, [r4, #0] - cmp r1, #0 - beq _021D7358 - cmp r1, #1 - bne _021D733C - add r1, r3, #0 - add r3, sp, #0 - add r0, r2, #0 - ldrh r3, [r3, #0x14] - ldr r2, [sp, #0x10] - bl ov5_021D7384 - add r0, r4, #0 - bl ov5_021D7480 - ldr r1, [sp, #0x18] - add r0, r4, #0 - mov r2, #1 - bl ov5_021D749C - add sp, #8 - pop {r4, pc} -_021D733C: - cmp r1, #2 - bne _021D7358 - add r1, sp, #0 - ldrh r1, [r1, #0x14] - ldr r4, [sp, #0x18] - str r1, [sp] - mov r1, #0x7f - mul r1, r4 - str r1, [sp, #4] - add r1, r2, #0 - add r2, r3, #0 - ldr r3, [sp, #0x10] - bl ov5_021D73B0 -_021D7358: - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021D7308 - - thumb_func_start ov5_021D735C -ov5_021D735C: ; 0x021D735C - push {r4, lr} - mov r4, #1 - cmp r2, #0 - beq _021D7380 - cmp r2, #1 - bne _021D7372 - add r0, r1, #0 - bl ov5_021D74B8 - add r4, r0, #0 - b _021D7380 -_021D7372: - cmp r2, #2 - bne _021D7380 - bl ov5_021D7434 - cmp r0, #0 - bne _021D7380 - mov r4, #0 -_021D7380: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov5_021D735C - - thumb_func_start ov5_021D7384 -ov5_021D7384: ; 0x021D7384 - push {r3, r4, r5, lr} - sub sp, #8 - str r1, [sp] - mov r1, #0 - add r4, r3, #0 - str r2, [sp, #4] - mvn r1, r1 - mov r2, #1 - mov r3, #0 - add r5, r0, #0 - bl ov5_021D57FC - mov r1, #0 - add r0, r5, #0 - mvn r1, r1 - add r2, r4, #0 - mov r3, #0x1f - bl ov5_021D5834 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D7384 - - thumb_func_start ov5_021D73B0 -ov5_021D73B0: ; 0x021D73B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - add r5, r0, #0 - add r0, r7, #0 - str r2, [sp] - str r3, [sp, #4] - ldr r4, [sp, #0x2c] - bl ov5_021D57F0 - str r0, [sp, #8] - add r0, r7, #0 - bl ov5_021D57F4 - str r0, [sp, #0xc] - add r0, r7, #0 - bl ov5_021D57F8 - add r6, r0, #0 - ldr r1, [sp, #0xc] - ldr r2, [sp, #4] - add r0, r5, #4 - add r3, r4, #0 - str r7, [r5, #0] - bl ov5_021D64FC - add r0, sp, #0x18 - ldrh r7, [r0, #0x10] - add r0, r5, #0 - mov r2, #0x1f - add r1, r6, #0 - and r1, r2 - add r0, #0x18 - and r2, r7 - add r3, r4, #0 - bl ov5_021D64FC - add r0, r5, #0 - asr r1, r6, #5 - mov r3, #0x1f - asr r2, r7, #5 - add r0, #0x2c - and r1, r3 - and r2, r3 - add r3, r4, #0 - bl ov5_021D64FC - add r0, r5, #0 - asr r1, r6, #0xa - mov r2, #0x1f - asr r3, r7, #0xa - and r1, r2 - and r2, r3 - add r0, #0x40 - add r3, r4, #0 - bl ov5_021D64FC - add r5, #0x54 - ldr r1, [sp, #8] - ldr r2, [sp] - add r0, r5, #0 - add r3, r4, #0 - bl ov5_021D64FC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021D73B0 - - thumb_func_start ov5_021D7434 -ov5_021D7434: ; 0x021D7434 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r5, #4 - bl ov5_021D650C - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x18 - bl ov5_021D650C - add r0, r5, #0 - add r0, #0x2c - bl ov5_021D650C - add r0, r5, #0 - add r0, #0x40 - bl ov5_021D650C - add r0, r5, #0 - add r0, #0x54 - bl ov5_021D650C - ldr r3, [r5, #0x40] - ldr r0, [r5, #0] - lsl r6, r3, #0xa - ldr r1, [r5, #0x54] - ldr r2, [r5, #4] - ldr r3, [r5, #0x18] - ldr r5, [r5, #0x2c] - lsl r5, r5, #5 - orr r3, r5 - orr r3, r6 - lsl r3, r3, #0x10 - lsr r3, r3, #0x10 - bl ov5_021D7384 - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021D7434 - - thumb_func_start ov5_021D7480 -ov5_021D7480: ; 0x021D7480 - mov r2, #0 - add r3, r0, #0 - add r1, r2, #0 -_021D7486: - add r0, r3, r2 - add r2, r2, #1 - strb r1, [r0, #4] - cmp r2, #0x20 - blt _021D7486 - ldr r0, [r3, #0] - add r1, r3, #4 - ldr r3, _021D7498 ; =ov5_021D585C - bx r3 - ; .align 2, 0 -_021D7498: .word ov5_021D585C - thumb_func_end ov5_021D7480 - - thumb_func_start ov5_021D749C -ov5_021D749C: ; 0x021D749C - mov r3, #0x7f - str r3, [r0, #0x24] - mov r3, #0 - str r3, [r0, #0x28] - strh r1, [r0, #0x2c] - cmp r2, #1 - bne _021D74B0 - mov r1, #1 - strh r1, [r0, #0x2e] - bx lr -_021D74B0: - sub r1, r3, #1 - strh r1, [r0, #0x2e] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D749C - - thumb_func_start ov5_021D74B8 -ov5_021D74B8: ; 0x021D74B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov5_021D74F4 - add r4, r0, #0 - ldr r0, [r5, #0x28] - cmp r0, #0 - bne _021D74D0 - ldr r0, [r5, #0] - add r1, r5, #4 - bl ov5_021D585C -_021D74D0: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D74B8 - - thumb_func_start ov5_021D74D4 -ov5_021D74D4: ; 0x021D74D4 - push {r4, lr} - add r4, r0, #0 - mov r2, #1 - str r2, [r4, #0x24] - mov r1, #0 - str r1, [r4, #0x28] - strh r1, [r4, #0x2c] - strh r2, [r4, #0x2e] - bl ov5_021D7534 - ldr r0, [r4, #0] - add r1, r4, #4 - bl ov5_021D585C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021D74D4 - - thumb_func_start ov5_021D74F4 -ov5_021D74F4: ; 0x021D74F4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x2e - ldrsh r1, [r5, r1] - mov r4, #0 - cmp r1, #0 - bne _021D7506 - mov r4, #1 - b _021D7530 -_021D7506: - ldr r1, [r5, #0x24] - cmp r1, #0 - bgt _021D7510 - mov r4, #1 - b _021D7530 -_021D7510: - ldr r1, [r5, #0x28] - add r2, r1, #1 - str r2, [r5, #0x28] - mov r1, #0x2c - ldrsh r1, [r5, r1] - cmp r2, r1 - blt _021D7530 - str r4, [r5, #0x28] - bl ov5_021D7534 - ldr r0, [r5, #0x24] - sub r0, r0, #1 - str r0, [r5, #0x24] - cmp r0, #0 - bgt _021D7530 - mov r4, #1 -_021D7530: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D74F4 - - thumb_func_start ov5_021D7534 -ov5_021D7534: ; 0x021D7534 - push {r3, r4} - mov r1, #0x2e - ldrsh r1, [r0, r1] - ldr r2, [r0, #0x24] - cmp r1, #0 - bge _021D7546 - mov r1, #0x7f - sub r2, r1, r2 - b _021D7546 -_021D7546: - asr r1, r2, #1 - lsr r1, r1, #0x1e - add r1, r2, r1 - asr r4, r1, #2 - mov r3, #0x1f - cmp r4, #0x1f - bge _021D7562 -_021D7554: - sub r1, r3, r4 - lsl r2, r1, #2 - add r1, r0, r3 - sub r3, r3, #1 - strb r2, [r1, #4] - cmp r3, r4 - bgt _021D7554 -_021D7562: - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021D7534 - - thumb_func_start ov5_021D7568 -ov5_021D7568: ; 0x021D7568 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - ldr r1, [sp, #0x28] - str r0, [sp] - str r1, [sp, #0x28] - add r1, r2, #0 - str r2, [sp, #4] - str r3, [sp, #8] - ldr r7, [sp, #0x2c] - blx r4 - ldr r0, [sp] - mov r6, #0 - ldr r5, [r0, #0x40] - str r6, [sp, #0x10] - ldr r0, [r5, #0x34] - str r0, [sp, #0xc] - ldr r0, [sp, #4] - cmp r0, #0 - ble _021D75DE - ldr r0, [sp] - add r0, #0xc - str r0, [sp] -_021D7596: - ldr r0, [sp] - cmp r5, r0 - beq _021D75DE - mov r4, #0 - cmp r6, #0 - ble _021D75B2 -_021D75A2: - add r0, r5, #0 - blx r7 - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D75B2 - add r4, r4, #1 - cmp r4, r6 - blt _021D75A2 -_021D75B2: - ldr r5, [sp, #0xc] - ldr r1, [sp, #0x10] - add r0, r5, #0 - ldr r0, [r0, #0x34] - str r0, [sp, #0xc] - ldr r0, [sp, #8] - cmp r1, r0 - blt _021D75D2 - add r0, r1, #0 - ldr r1, [sp, #8] - bl sub_020E1F6C - cmp r1, #0 - bne _021D75D2 - ldr r0, [sp, #0x28] - add r6, r6, r0 -_021D75D2: - ldr r0, [sp, #0x10] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #0x10] - cmp r1, r0 - blt _021D7596 -_021D75DE: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021D7568 - - thumb_func_start ov5_021D75E4 -ov5_021D75E4: ; 0x021D75E4 - mov r2, #0 - add r3, r0, #0 -_021D75E8: - ldr r1, [r3, #0x48] - cmp r1, #0 - bne _021D75F8 - mov r1, #0x3c - add r0, #0x48 - mul r1, r2 - add r0, r0, r1 - bx lr -_021D75F8: - add r2, r2, #1 - add r3, #0x3c - cmp r2, #0x30 - blt _021D75E8 - mov r0, #0 - bx lr - thumb_func_end ov5_021D75E4 - - thumb_func_start ov5_021D7604 -ov5_021D7604: ; 0x021D7604 - push {r3, lr} - ldr r0, _021D7654 ; =0x00000BA2 - ldrh r2, [r1, r0] - cmp r2, #5 - bhi _021D7652 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D761A: ; jump table - .short _021D7626 - _021D761A - 2 ; case 0 - .short _021D762C - _021D761A - 2 ; case 1 - .short _021D7632 - _021D761A - 2 ; case 2 - .short _021D7638 - _021D761A - 2 ; case 3 - .short _021D7646 - _021D761A - 2 ; case 4 - .short _021D764C - _021D761A - 2 ; case 5 -_021D7626: - mov r2, #1 - strh r2, [r1, r0] - pop {r3, pc} -_021D762C: - mov r2, #3 - strh r2, [r1, r0] - pop {r3, pc} -_021D7632: - mov r2, #3 - strh r2, [r1, r0] - pop {r3, pc} -_021D7638: - add r2, r0, #4 - ldrh r2, [r1, r2] - cmp r2, #5 - bne _021D7652 - mov r2, #4 - strh r2, [r1, r0] - pop {r3, pc} -_021D7646: - mov r2, #5 - strh r2, [r1, r0] - pop {r3, pc} -_021D764C: - ldr r0, [r1, #4] - bl ov5_021D69B8 -_021D7652: - pop {r3, pc} - ; .align 2, 0 -_021D7654: .word 0x00000BA2 - thumb_func_end ov5_021D7604 - - thumb_func_start ov5_021D7658 -ov5_021D7658: ; 0x021D7658 - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D7880 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D771A - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D7678: ; jump table - .short _021D7684 - _021D7678 - 2 ; case 0 - .short _021D76E2 - _021D7678 - 2 ; case 1 - .short _021D7724 - _021D7678 - 2 ; case 2 - .short _021D778A - _021D7678 - 2 ; case 3 - .short _021D77E8 - _021D7678 - 2 ; case 4 - .short _021D7836 - _021D7678 - 2 ; case 5 -_021D7684: - mov r0, #4 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - sub r0, r0, #1 - str r0, [sp, #8] - mov r2, #1 - str r2, [sp, #0xc] - ldr r0, _021D7884 ; =ov5_021D78A4 - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r4, #0 - mov r3, #8 - bl ov5_021D7210 - ldr r0, _021D7888 ; =0x0000726F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D788C ; =0x00006B5A - lsl r2, r2, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D7890 ; =0x00000BA4 - add r1, r4, #0 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - mov r0, #0 - add r4, #0xb4 - str r0, [r4, #0] - ldr r1, _021D7894 ; =0x00000639 - add r0, r5, #0 - bl ov5_021DB4B8 - ldr r0, _021D7898 ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D7854 -_021D76E2: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D7702 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D7854 -_021D7702: - ldr r2, _021D7890 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D771A - cmp r6, #3 - beq _021D771C -_021D771A: - b _021D7854 -_021D771C: - ldr r0, _021D7898 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D7854 -_021D7724: - mov r2, #4 - mov r3, #0 - str r2, [sp] - str r3, [sp, #4] - sub r0, r3, #1 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _021D7884 ; =ov5_021D78A4 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D7890 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7766 - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D7888 ; =0x0000726F - ldr r0, [r0, #0x48] - ldr r3, _021D788C ; =0x00006B5A - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74D4 -_021D7766: - mov r0, #1 - str r0, [sp] - ldr r0, _021D789C ; =ov5_021D7960 - ldr r1, _021D7884 ; =ov5_021D78A4 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #0xa - bl ov5_021D7568 - ldr r1, _021D7894 ; =0x00000639 - add r0, r5, #0 - bl ov5_021DB4B8 - ldr r0, _021D7898 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D7854 -_021D778A: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D77A6 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D78A4 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D77A6: - ldr r0, _021D78A0 ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D7854 - mov r0, #0 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #8 - mov r3, #1 - bl ov5_021D7238 - ldr r0, _021D7890 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D77D4 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D77D4: - mov r0, #0 - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D7898 ; =0x00000BA2 - mov r1, #4 - strh r1, [r5, r0] - add r0, r5, #0 - bl ov5_021DB4E4 - b _021D7854 -_021D77E8: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D7808 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D7854 -_021D7808: - ldr r0, _021D7890 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D781A - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74B8 - b _021D781C -_021D781A: - mov r0, #1 -_021D781C: - cmp r0, #1 - bne _021D7854 - cmp r6, #3 - bne _021D7854 - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D7854 - ldr r0, _021D7898 ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D7854 -_021D7836: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D784E - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D784E: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D7854: - ldr r0, _021D7898 ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D787A - cmp r0, #0 - beq _021D787A - add r0, r5, #0 - ldr r1, _021D789C ; =ov5_021D7960 - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C -_021D787A: - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_021D7880: .word 0x00000B98 -_021D7884: .word ov5_021D78A4 -_021D7888: .word 0x0000726F -_021D788C: .word 0x00006B5A -_021D7890: .word 0x00000BA4 -_021D7894: .word 0x00000639 -_021D7898: .word 0x00000BA2 -_021D789C: .word ov5_021D7960 -_021D78A0: .word 0x00000BA6 - thumb_func_end ov5_021D7658 - - thumb_func_start ov5_021D78A4 -ov5_021D78A4: ; 0x021D78A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp] - mov r0, #0 - str r0, [sp, #8] - add r0, r1, #0 - str r1, [sp, #4] - cmp r0, #0 - ble _021D7952 -_021D78B6: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r6, r0, #0 - beq _021D7952 - ldr r4, [r6, #8] - bl sub_0201D35C - mov r1, #0 - str r1, [r4, #0] - mov r1, #3 - add r7, r0, #0 - bl sub_020E2178 - add r5, r1, #0 - lsl r1, r5, #0x10 - ldr r0, [r6, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - add r0, r7, #0 - mov r1, #0x14 - bl sub_020E2178 - add r2, r5, #1 - mov r0, #0xa - mul r0, r2 - add r0, r1, r0 - str r0, [r4, #8] - cmp r5, #2 - bne _021D78FC - ldr r0, [r4, #8] - add r0, #0xa - str r0, [r4, #8] -_021D78FC: - add r0, r1, #0 - mov r1, #4 - mvn r1, r1 - bl sub_020E1F6C - mov r1, #4 - add r2, r5, #1 - mvn r1, r1 - mul r1, r2 - add r0, r0, r1 - str r0, [r4, #0x10] - cmp r5, #2 - bne _021D791C - ldr r0, [r4, #0x10] - sub r0, r0, #5 - str r0, [r4, #0x10] -_021D791C: - mov r0, #0 - str r0, [r4, #0xc] - add r0, r5, #1 - str r0, [r4, #4] - ldr r1, _021D7958 ; =0x0000010E - add r0, r7, #0 - bl sub_020E2178 - mov r0, #0xf - mul r0, r5 - add r0, r1, r0 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, _021D795C ; =0xFFFA0000 - add r1, sp, #0xc - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #4] - bl ov5_021D630C - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #8] - cmp r1, r0 - blt _021D78B6 -_021D7952: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D7958: .word 0x0000010E -_021D795C: .word 0xFFFA0000 - thumb_func_end ov5_021D78A4 - - thumb_func_start ov5_021D7960 -ov5_021D7960: ; 0x021D7960 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r4, [r5, #8] - add r0, sp, #0 - add r1, r5, #0 - bl ov5_021D7010 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D7982 - cmp r0, #1 - beq _021D79D2 - cmp r0, #2 - beq _021D79E4 - add sp, #0xc - pop {r4, r5, pc} -_021D7982: - ldr r0, [r4, #0x10] - ldr r1, [sp] - lsl r0, r0, #0xd - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #8] - ldr r1, [sp, #4] - lsl r0, r0, #0xd - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, r0, #2 - str r1, [r4, #0] - ldr r0, [r4, #4] - cmp r1, r0 - ble _021D79C6 - bl sub_0201D35C - mov r1, #0xa - bl sub_020E2178 - cmp r1, #7 - bhs _021D79B6 - mov r0, #2 - str r0, [r4, #0xc] - b _021D79C6 -_021D79B6: - mov r0, #1 - str r0, [r4, #0xc] - mov r0, #4 - str r0, [r4, #0] - ldr r0, [r5, #4] - mov r1, #3 - bl sub_02021E50 -_021D79C6: - ldr r0, [r5, #4] - add r1, sp, #0 - bl ov5_021D630C - add sp, #0xc - pop {r4, r5, pc} -_021D79D2: - ldr r1, [r4, #0] - sub r0, r1, #1 - str r0, [r4, #0] - cmp r1, #0 - bgt _021D79EA - mov r0, #2 - add sp, #0xc - str r0, [r4, #0xc] - pop {r4, r5, pc} -_021D79E4: - add r0, r5, #0 - bl ov5_021D6FA8 -_021D79EA: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D7960 - - thumb_func_start ov5_021D79F0 -ov5_021D79F0: ; 0x021D79F0 - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D7C20 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D7AB2 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D7A10: ; jump table - .short _021D7A1C - _021D7A10 - 2 ; case 0 - .short _021D7A7A - _021D7A10 - 2 ; case 1 - .short _021D7ABC - _021D7A10 - 2 ; case 2 - .short _021D7B2A - _021D7A10 - 2 ; case 3 - .short _021D7B82 - _021D7A10 - 2 ; case 4 - .short _021D7BD6 - _021D7A10 - 2 ; case 5 -_021D7A1C: - mov r2, #1 - str r2, [sp] - mov r0, #0xe - str r0, [sp, #4] - sub r0, #0x13 - str r0, [sp, #8] - str r2, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _021D7C24 ; =ov5_021D7C40 - mov r3, #0x18 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - ldr r0, _021D7C28 ; =0x0000726F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D7C2C ; =0x00006B5A - add r1, r4, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D7C30 ; =0x00000BA4 - lsl r2, r2, #2 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - mov r0, #0x10 - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D7C34 ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D7BF4 -_021D7A7A: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D7A9A - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D7BF4 -_021D7A9A: - ldr r2, _021D7C30 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D7AB2 - cmp r6, #3 - beq _021D7AB4 -_021D7AB2: - b _021D7BF4 -_021D7AB4: - ldr r0, _021D7C34 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D7BF4 -_021D7ABC: - mov r2, #1 - mov r3, #0xe - str r2, [sp] - add r0, r3, #0 - str r3, [sp, #4] - sub r0, #0x13 - str r0, [sp, #8] - str r2, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _021D7C24 ; =ov5_021D7C40 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - ldr r0, _021D7C30 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7B0E - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D7C28 ; =0x0000726F - ldr r0, [r0, #0x48] - ldr r3, _021D7C2C ; =0x00006B5A - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74D4 -_021D7B0E: - mov r0, #0x18 - str r0, [sp] - ldr r0, _021D7C38 ; =ov5_021D7E20 - ldr r1, _021D7C24 ; =ov5_021D7C40 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #2 - bl ov5_021D7568 - ldr r0, _021D7C34 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D7BF4 -_021D7B2A: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D7B46 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D7C40 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D7B46: - ldr r0, _021D7C3C ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D7BF4 - mov r0, #0 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0x18 - mov r3, #5 - bl ov5_021D7238 - ldr r0, _021D7C30 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7B74 - add r0, r4, #0 - add r0, #0x1c - mov r1, #2 - mov r2, #0 - bl ov5_021D749C -_021D7B74: - mov r0, #0x20 - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D7C34 ; =0x00000BA2 - mov r1, #4 - strh r1, [r5, r0] - b _021D7BF4 -_021D7B82: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D7BA2 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D7BF4 -_021D7BA2: - ldr r0, _021D7C30 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7BB4 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74B8 - b _021D7BB6 -_021D7BB4: - mov r0, #1 -_021D7BB6: - cmp r0, #1 - bne _021D7BF4 - cmp r6, #3 - bne _021D7BF4 - mov r0, #1 - add r4, #0xbc - str r0, [r4, #0] - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D7BF4 - ldr r0, _021D7C34 ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D7BF4 -_021D7BD6: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7BEE - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D7BEE: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D7BF4: - ldr r0, _021D7C34 ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D7C1A - cmp r0, #0 - beq _021D7C1A - add r0, r5, #0 - ldr r1, _021D7C38 ; =ov5_021D7E20 - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C -_021D7C1A: - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_021D7C20: .word 0x00000B98 -_021D7C24: .word ov5_021D7C40 -_021D7C28: .word 0x0000726F -_021D7C2C: .word 0x00006B5A -_021D7C30: .word 0x00000BA4 -_021D7C34: .word 0x00000BA2 -_021D7C38: .word ov5_021D7E20 -_021D7C3C: .word 0x00000BA6 - thumb_func_end ov5_021D79F0 - - thumb_func_start ov5_021D7C40 -ov5_021D7C40: ; 0x021D7C40 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r1, #0 - ldr r1, _021D7D4C ; =0x00000B98 - str r0, [sp] - ldr r0, [r0, r1] - str r0, [sp, #0x10] - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021D7C58 - lsl r7, r7, #1 -_021D7C58: - mov r6, #0 - cmp r7, #0 - ble _021D7D46 - ldr r0, [sp, #0x10] - str r0, [sp, #0xc] - add r0, #0xb8 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - str r0, [sp, #8] - add r0, #0xbc - str r0, [sp, #8] - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r0, r0, #1 - str r0, [sp, #4] -_021D7C76: - ldr r0, [sp] - mov r1, #0x28 - bl ov5_021D6F00 - add r4, r0, #0 - beq _021D7D46 - ldr r5, [r4, #8] - bl sub_0201D35C - mov r1, #3 - and r1, r0 - lsl r1, r1, #0x10 - ldr r0, [r4, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - mov r0, #0xa - str r0, [r5, #0x10] - mov r0, #0 - str r0, [r5, #0x14] - str r0, [r5, #0x18] - str r0, [r5, #0x20] - bl sub_0201D35C - mov r1, #0x3c - str r0, [sp, #0x14] - bl sub_020E1F6C - add r0, r1, #4 - str r0, [r5, #0x24] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x14] - lsr r0, r0, #0x1f - lsl r2, r1, #0x1f - sub r2, r2, r0 - mov r1, #0x1f - ror r2, r1 - add r0, r0, r2 - bne _021D7CC8 - mov r0, #1 - b _021D7CCC -_021D7CC8: - add r0, r1, #0 - sub r0, #0x20 -_021D7CCC: - str r0, [r5, #4] - bl sub_0201D35C - mov r1, #1 - and r0, r1 - add r0, r0, #4 - str r0, [r5, #8] - bl sub_0201D35C - mov r1, #1 - and r0, r1 - add r0, r0, #1 - str r0, [r5, #0xc] - ldr r0, [sp, #0xc] - str r0, [r5, #0] - ldr r0, [sp, #8] - str r0, [r5, #0x1c] - bl sub_0201D35C - ldr r1, _021D7D50 ; =0x0000019E - bl sub_020E2178 - sub r1, #0x20 - lsl r0, r1, #0xc - str r0, [sp, #0x18] - ldr r0, [sp, #0x10] - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021D7D24 - ldr r0, [sp, #4] - cmp r6, r0 - blt _021D7D24 - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - mov r0, #0x27 - mvn r0, r0 - sub r0, r0, r1 - lsl r0, r0, #0xc - str r0, [sp, #0x1c] - b _021D7D38 -_021D7D24: - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - mov r0, #7 - mvn r0, r0 - sub r0, r0, r1 - lsl r0, r0, #0xc - str r0, [sp, #0x1c] -_021D7D38: - ldr r0, [r4, #4] - add r1, sp, #0x18 - bl ov5_021D630C - add r6, r6, #1 - cmp r6, r7 - blt _021D7C76 -_021D7D46: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021D7D4C: .word 0x00000B98 -_021D7D50: .word 0x0000019E - thumb_func_end ov5_021D7C40 - - thumb_func_start ov5_021D7D54 -ov5_021D7D54: ; 0x021D7D54 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r0, sp, #0 - add r1, r5, #0 - bl ov5_021D7010 - ldr r0, [r4, #0x14] - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [r4, #8] - cmp r1, r0 - blt _021D7DAA - ldr r0, [r4, #4] - ldr r1, [sp] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - ldr r1, [r4, #0x14] - ldr r0, _021D7E18 ; =0xFFFF0000 - and r0, r1 - str r0, [r4, #0x14] - ldr r0, [r4, #0x10] - cmp r0, #0xa - ldr r0, [r4, #8] - bge _021D7D94 - sub r0, r0, #1 - b _021D7D96 -_021D7D94: - add r0, r0, #1 -_021D7D96: - str r0, [r4, #8] - ldr r0, [r4, #0x10] - cmp r0, #0x14 - blt _021D7DAA - mov r0, #0 - str r0, [r4, #0x10] - ldr r1, [r4, #4] - sub r0, r0, #1 - mul r0, r1 - str r0, [r4, #4] -_021D7DAA: - ldr r0, [r4, #0x14] - asr r1, r0, #0x10 - ldr r0, [r4, #0xc] - cmp r1, r0 - blt _021D7DC6 - mov r0, #1 - ldr r1, [sp, #4] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #0x14] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [r4, #0x14] -_021D7DC6: - ldr r0, [r5, #4] - add r1, sp, #0 - bl ov5_021D630C - ldr r0, [sp] - mov r1, #0x64 - asr r0, r0, #0xc - str r0, [sp] - ldr r0, [sp, #4] - asr r0, r0, #0xc - str r0, [sp, #4] - ldr r0, [r4, #0x18] - add r0, r0, #1 - bl sub_020E1F6C - str r1, [r4, #0x18] - ldr r0, [r4, #0x14] - add r1, r0, #1 - mov r0, #1 - lsl r0, r0, #0x10 - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [sp, #4] - ldr r0, _021D7E1C ; =0xFFFFFEE4 - cmp r1, r0 - bge _021D7E00 - sub r0, #0xc - cmp r1, r0 - bgt _021D7E08 -_021D7E00: - cmp r1, #0xd4 - ble _021D7E14 - cmp r1, #0xe8 - bge _021D7E14 -_021D7E08: - ldr r0, [r4, #0] - mov r1, #1 - str r1, [r0, #0] - add r0, r5, #0 - bl ov5_021D6FA8 -_021D7E14: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D7E18: .word 0xFFFF0000 -_021D7E1C: .word 0xFFFFFEE4 - thumb_func_end ov5_021D7D54 - - thumb_func_start ov5_021D7E20 -ov5_021D7E20: ; 0x021D7E20 - push {r3, lr} - ldr r1, [r0, #8] - ldr r3, [r1, #0x20] - ldr r2, [r1, #0x1c] - cmp r3, #0 - beq _021D7E32 - cmp r3, #1 - beq _021D7E3E - b _021D7E4C -_021D7E32: - ldr r2, [r2, #0] - cmp r2, #1 - bne _021D7E4C - add r2, r3, #1 - str r2, [r1, #0x20] - b _021D7E4C -_021D7E3E: - ldr r2, [r1, #0x24] - sub r2, r2, #1 - str r2, [r1, #0x24] - bpl _021D7E4C - bl ov5_021D6FA8 - pop {r3, pc} -_021D7E4C: - bl ov5_021D7D54 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021D7E20 - - thumb_func_start ov5_021D7E54 -ov5_021D7E54: ; 0x021D7E54 - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D8078 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D7F18 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D7E74: ; jump table - .short _021D7E80 - _021D7E74 - 2 ; case 0 - .short _021D7EE0 - _021D7E74 - 2 ; case 1 - .short _021D7F22 - _021D7E74 - 2 ; case 2 - .short _021D7F8A - _021D7E74 - 2 ; case 3 - .short _021D7FE2 - _021D7E74 - 2 ; case 4 - .short _021D8030 - _021D7E74 - 2 ; case 5 -_021D7E80: - mov r0, #6 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - sub r0, #8 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r2, #1 - ldr r0, _021D807C ; =ov5_021D8098 - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r4, #0 - mov r3, #0x1e - bl ov5_021D7210 - ldr r0, _021D8080 ; =0x00006D6F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D8084 ; =0x00006318 - add r1, r4, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldr r0, _021D8088 ; =0x00000BA4 - lsl r2, r2, #2 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #8 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0 - add r4, #0xb8 - str r0, [r4, #0] - ldr r0, _021D808C ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D804E -_021D7EE0: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D7F00 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D804E -_021D7F00: - ldr r2, _021D8088 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D7F18 - cmp r6, #3 - beq _021D7F1A -_021D7F18: - b _021D804E -_021D7F1A: - ldr r0, _021D808C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D804E -_021D7F22: - mov r2, #6 - mov r3, #3 - str r2, [sp] - add r0, r3, #0 - str r3, [sp, #4] - sub r0, #8 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _021D807C ; =ov5_021D8098 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D8088 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7F68 - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D8080 ; =0x00006D6F - ldr r0, [r0, #0x48] - ldr r3, _021D8084 ; =0x00006318 - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021D7F68: - mov r0, #0 - add r4, #0xb8 - str r0, [r4, #0] - mov r0, #3 - str r0, [sp] - ldr r0, _021D8090 ; =ov5_021D81BC - ldr r1, _021D807C ; =ov5_021D8098 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #2 - bl ov5_021D7568 - ldr r0, _021D808C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D804E -_021D7F8A: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D7FA6 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D8098 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D7FA6: - ldr r0, _021D8094 ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D804E - mov r0, #2 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0x1e - mov r3, #5 - bl ov5_021D7238 - ldr r0, _021D8088 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D7FD4 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D7FD4: - mov r0, #0 - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D808C ; =0x00000BA2 - mov r1, #4 - strh r1, [r5, r0] - b _021D804E -_021D7FE2: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8002 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D804E -_021D8002: - ldr r0, _021D8088 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8014 - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74B8 - b _021D8016 -_021D8014: - mov r0, #1 -_021D8016: - cmp r0, #1 - bne _021D804E - cmp r6, #3 - bne _021D804E - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D804E - ldr r0, _021D808C ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D804E -_021D8030: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8048 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D8048: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D804E: - ldr r0, _021D808C ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D8074 - cmp r0, #0 - beq _021D8074 - add r0, r5, #0 - ldr r1, _021D8090 ; =ov5_021D81BC - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C -_021D8074: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D8078: .word 0x00000B98 -_021D807C: .word ov5_021D8098 -_021D8080: .word 0x00006D6F -_021D8084: .word 0x00006318 -_021D8088: .word 0x00000BA4 -_021D808C: .word 0x00000BA2 -_021D8090: .word ov5_021D81BC -_021D8094: .word 0x00000BA6 - thumb_func_end ov5_021D7E54 - - thumb_func_start ov5_021D8098 -ov5_021D8098: ; 0x021D8098 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - ldr r3, _021D81B0 ; =0x021F8CCC - add r2, sp, #0x48 - str r0, [sp] - str r1, [sp, #4] - ldmia r3!, {r0, r1} - str r2, [sp, #0x10] - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r3, _021D81B4 ; =0x021F8CBC - add r2, sp, #0x38 - str r2, [sp, #0x14] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r1, _021D81B8 ; =0x00000B98 - ldr r0, [sp] - ldr r6, [r0, r1] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - cmp r0, #0 - ble _021D81AC - add r0, r6, #0 - str r0, [sp, #0x18] - add r0, #0xb8 - str r0, [sp, #0x18] - mov r0, #7 - mvn r0, r0 - lsl r0, r0, #0xc - str r0, [sp, #0x1c] -_021D80DC: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r4, r0, #0 - beq _021D81AC - ldr r0, [sp, #0x18] - ldr r5, [r4, #8] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xb8 - ldr r1, [r0, #0] - mov r0, #0x32 - lsl r0, r0, #4 - cmp r1, r0 - blt _021D810A - add r1, r6, #0 - add r1, #0xb8 - mov r0, #0 - str r0, [r1, #0] -_021D810A: - add r0, r6, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - mov r1, #0xc8 - bl sub_020E1F6C - lsl r0, r0, #2 - ldr r1, [sp, #0x10] - str r0, [sp, #8] - ldr r0, [r1, r0] - str r0, [r5, #0x14] - mov r0, #0 - str r0, [r5, #0] - bl sub_0201D35C - mov r1, #0x2a - bl sub_020E2178 - add r0, r1, #4 - str r0, [r5, #4] - sub r0, r0, #4 - mov r1, #0xf - bl sub_020E1F6C - add r7, r0, #0 - lsl r1, r7, #0x10 - ldr r0, [r4, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - add r0, r7, #1 - neg r1, r0 - str r1, [r5, #0x10] - ldr r2, [sp, #0x14] - ldr r1, [sp, #8] - ldr r1, [r2, r1] - mul r1, r0 - str r1, [r5, #8] - mov r0, #0 - str r0, [r5, #0xc] - add r0, sp, #0x20 - add r1, r4, #0 - bl ov5_021D7010 - add r3, sp, #0x20 - ldmia r3!, {r0, r1} - add r2, sp, #0x2c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bl sub_0201D35C - mov r1, #0x69 - lsl r1, r1, #2 - bl sub_020E2178 - mov r0, #1 - sub r2, r0, r7 - sub r0, #0x15 - mul r0, r2 - add r1, r0, r1 - mov r0, #7 - mvn r0, r0 - str r0, [sp, #0x30] - mov r0, #0 - str r0, [sp, #0x34] - str r1, [sp, #0x2c] - lsl r0, r1, #0xc - str r0, [sp, #0x2c] - ldr r0, [sp, #0x1c] - add r1, sp, #0x2c - str r0, [sp, #0x30] - ldr r0, [r4, #4] - bl ov5_021D630C - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #0xc] - cmp r1, r0 - blt _021D80DC -_021D81AC: - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D81B0: .word 0x021F8CCC -_021D81B4: .word 0x021F8CBC -_021D81B8: .word 0x00000B98 - thumb_func_end ov5_021D8098 - - thumb_func_start ov5_021D81BC -ov5_021D81BC: ; 0x021D81BC - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - ldr r4, [r5, #8] - bl ov5_021D7010 - add r3, sp, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D81E6 - cmp r0, #1 - beq _021D8232 - add sp, #0x18 - pop {r3, r4, r5, pc} -_021D81E6: - ldr r0, [r4, #0x10] - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, [r4, #8] - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [r4, #0] - add r0, r1, #1 - str r0, [r4, #0] - ldr r0, [r4, #4] - cmp r1, r0 - ble _021D820A - mov r0, #1 - str r0, [r4, #0xc] -_021D820A: - ldr r0, [r4, #0] - ldr r1, [r4, #0x14] - bl sub_020E1F6C - cmp r1, #0 - bne _021D8226 - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - ldr r0, [r4, #8] - cmp r0, #1 - ble _021D8226 - sub r0, r0, #1 - str r0, [r4, #8] -_021D8226: - ldr r0, [r5, #4] - add r1, sp, #0xc - bl ov5_021D630C - add sp, #0x18 - pop {r3, r4, r5, pc} -_021D8232: - add r0, r5, #0 - bl ov5_021D6FA8 - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D81BC - - thumb_func_start ov5_021D823C -ov5_021D823C: ; 0x021D823C - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D84AC ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D830A - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D825C: ; jump table - .short _021D8268 - _021D825C - 2 ; case 0 - .short _021D82D0 - _021D825C - 2 ; case 1 - .short _021D8314 - _021D825C - 2 ; case 2 - .short _021D8384 - _021D825C - 2 ; case 3 - .short _021D83DE - _021D825C - 2 ; case 4 - .short _021D842E - _021D825C - 2 ; case 5 -_021D8268: - mov r0, #6 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - sub r0, #8 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r2, #1 - ldr r0, _021D84B0 ; =ov5_021D8098 - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r4, #0 - mov r3, #0x1e - bl ov5_021D7210 - ldr r0, _021D84B4 ; =0x00006F6F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D84B8 ; =0x00006318 - add r1, r4, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldr r0, _021D84BC ; =0x00000BA4 - lsl r2, r2, #2 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #8 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - ldr r0, _021D84C0 ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D844C -_021D82D0: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D82F2 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021D844C -_021D82F2: - ldr r2, _021D84BC ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r1, r4, #0 - add r0, #0x4c - add r1, #0x1c - bl ov5_021D735C - cmp r0, #1 - bne _021D830A - cmp r6, #3 - beq _021D830C -_021D830A: - b _021D844C -_021D830C: - ldr r0, _021D84C0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D844C -_021D8314: - mov r2, #6 - mov r3, #3 - str r2, [sp] - add r0, r3, #0 - str r3, [sp, #4] - sub r0, #8 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _021D84B0 ; =ov5_021D8098 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D84BC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D835A - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D84B4 ; =0x00006F6F - ldr r0, [r0, #0x48] - ldr r3, _021D84B8 ; =0x00006318 - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021D835A: - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - mov r0, #3 - str r0, [sp] - ldr r0, _021D84C4 ; =ov5_021D81BC - ldr r1, _021D84B0 ; =ov5_021D8098 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #2 - bl ov5_021D7568 - ldr r0, _021D84C0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D844C -_021D8384: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D83A0 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D8098 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D83A0: - ldr r0, _021D84C8 ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D844C - mov r0, #2 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0x1e - mov r3, #5 - bl ov5_021D7238 - ldr r0, _021D84BC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D83CE - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D83CE: - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - ldr r0, _021D84C0 ; =0x00000BA2 - mov r1, #4 - strh r1, [r5, r0] - b _021D844C -_021D83DE: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8400 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021D844C -_021D8400: - ldr r0, _021D84BC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8412 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74B8 - b _021D8414 -_021D8412: - mov r0, #1 -_021D8414: - cmp r0, #1 - bne _021D844C - cmp r6, #3 - bne _021D844C - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D844C - ldr r0, _021D84C0 ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D844C -_021D842E: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8446 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D8446: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D844C: - ldr r0, _021D84C0 ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D84A6 - cmp r0, #0 - beq _021D84A6 - add r0, r5, #0 - ldr r1, _021D84C4 ; =ov5_021D81BC - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - add r0, r0, #6 - lsr r2, r0, #0x1f - lsl r1, r0, #0x18 - sub r1, r1, r2 - mov r0, #0x18 - ror r1, r0 - add r0, r4, #0 - add r1, r2, r1 - add r0, #0xbc - str r1, [r0, #0] - add r4, #0xbc - ldr r1, [r4, #0] - ldr r0, _021D84CC ; =0x000001FF - add r2, r1, #0 - neg r1, r1 - and r2, r0 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - and r0, r1 - add r1, r2, #0 - orr r1, r0 - ldr r0, _021D84D0 ; =0x04000018 - str r1, [r0, #0] -_021D84A6: - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_021D84AC: .word 0x00000B98 -_021D84B0: .word ov5_021D8098 -_021D84B4: .word 0x00006F6F -_021D84B8: .word 0x00006318 -_021D84BC: .word 0x00000BA4 -_021D84C0: .word 0x00000BA2 -_021D84C4: .word ov5_021D81BC -_021D84C8: .word 0x00000BA6 -_021D84CC: .word 0x000001FF -_021D84D0: .word 0x04000018 - thumb_func_end ov5_021D823C - - thumb_func_start ov5_021D84D4 -ov5_021D84D4: ; 0x021D84D4 - push {r3, r4, r5, lr} - sub sp, #0x10 - ldr r2, _021D8628 ; =0x00000B98 - add r4, r1, #0 - add r0, r2, #0 - add r0, #0xa - ldrh r0, [r4, r0] - ldr r5, [r4, r2] - cmp r0, #5 - bls _021D84EA - b _021D8622 -_021D84EA: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D84F6: ; jump table - .short _021D8502 - _021D84F6 - 2 ; case 0 - .short _021D853A - _021D84F6 - 2 ; case 1 - .short _021D8570 - _021D84F6 - 2 ; case 2 - .short _021D859E - _021D84F6 - 2 ; case 3 - .short _021D85CA - _021D84F6 - 2 ; case 4 - .short _021D8604 - _021D84F6 - 2 ; case 5 -_021D8502: - ldr r0, _021D862C ; =0x0000716F - add r2, #0xc - str r0, [sp] - ldr r0, _021D8630 ; =0x00006B5A - add r1, r5, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldrh r0, [r4, r2] - mov r2, #0x41 - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r0, #0x30 - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - mov r0, #0x10 - add r5, #0x98 - str r0, [r5, #0] - ldr r0, _021D8634 ; =0x00000BA2 - mov r1, #1 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D853A: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8554 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r5, #0x98 - sub r0, r0, #1 - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D8554: - add r2, #0xc - ldrh r2, [r4, r2] - add r0, r5, #0 - add r0, #0x30 - add r1, r5, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D8622 - ldr r0, _021D8634 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D8570: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D8594 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D862C ; =0x0000716F - ldr r0, [r0, #0x48] - ldr r3, _021D8630 ; =0x00006B5A - mov r1, #3 - str r0, [r5, #0] - bl ov5_021D7384 - add r0, r5, #0 - bl ov5_021D74D4 -_021D8594: - ldr r0, _021D8634 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D859E: - add r0, r2, #0 - add r0, #0xe - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021D8622 - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D85BA - add r0, r5, #0 - mov r1, #2 - mov r2, #0 - bl ov5_021D749C -_021D85BA: - mov r0, #0x10 - add r5, #0x98 - str r0, [r5, #0] - ldr r0, _021D8634 ; =0x00000BA2 - mov r1, #4 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D85CA: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D85E4 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r5, #0x98 - sub r0, r0, #1 - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D85E4: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D85F4 - add r0, r5, #0 - bl ov5_021D74B8 - b _021D85F6 -_021D85F4: - mov r0, #1 -_021D85F6: - cmp r0, #1 - bne _021D8622 - ldr r0, _021D8634 ; =0x00000BA2 - mov r1, #5 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D8604: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D861C - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D861C: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021D8622: - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_021D8628: .word 0x00000B98 -_021D862C: .word 0x0000716F -_021D8630: .word 0x00006B5A -_021D8634: .word 0x00000BA2 - thumb_func_end ov5_021D84D4 - - thumb_func_start ov5_021D8638 -ov5_021D8638: ; 0x021D8638 - push {r3, r4, r5, lr} - sub sp, #0x10 - ldr r2, _021D878C ; =0x00000B98 - add r4, r1, #0 - add r0, r2, #0 - add r0, #0xa - ldrh r0, [r4, r0] - ldr r5, [r4, r2] - cmp r0, #5 - bls _021D864E - b _021D8786 -_021D864E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D865A: ; jump table - .short _021D8666 - _021D865A - 2 ; case 0 - .short _021D869E - _021D865A - 2 ; case 1 - .short _021D86D4 - _021D865A - 2 ; case 2 - .short _021D8702 - _021D865A - 2 ; case 3 - .short _021D872E - _021D865A - 2 ; case 4 - .short _021D8768 - _021D865A - 2 ; case 5 -_021D8666: - ldr r0, _021D8790 ; =0x0000658F - add r2, #0xc - str r0, [sp] - ldr r0, _021D8794 ; =0x00006B5A - add r1, r5, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldrh r0, [r4, r2] - mov r2, #0x41 - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r0, #0x30 - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - mov r0, #0x10 - add r5, #0x98 - str r0, [r5, #0] - ldr r0, _021D8798 ; =0x00000BA2 - mov r1, #1 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D869E: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D86B8 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r5, #0x98 - sub r0, r0, #1 - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D86B8: - add r2, #0xc - ldrh r2, [r4, r2] - add r0, r5, #0 - add r0, #0x30 - add r1, r5, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D8786 - ldr r0, _021D8798 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D86D4: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D86F8 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D8790 ; =0x0000658F - ldr r0, [r0, #0x48] - ldr r3, _021D8794 ; =0x00006B5A - mov r1, #3 - str r0, [r5, #0] - bl ov5_021D7384 - add r0, r5, #0 - bl ov5_021D74D4 -_021D86F8: - ldr r0, _021D8798 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D8702: - add r0, r2, #0 - add r0, #0xe - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021D8786 - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D871E - add r0, r5, #0 - mov r1, #2 - mov r2, #0 - bl ov5_021D749C -_021D871E: - mov r0, #0x10 - add r5, #0x98 - str r0, [r5, #0] - ldr r0, _021D8798 ; =0x00000BA2 - mov r1, #4 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D872E: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8748 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r5, #0x98 - sub r0, r0, #1 - add sp, #0x10 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_021D8748: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D8758 - add r0, r5, #0 - bl ov5_021D74B8 - b _021D875A -_021D8758: - mov r0, #1 -_021D875A: - cmp r0, #1 - bne _021D8786 - ldr r0, _021D8798 ; =0x00000BA2 - mov r1, #5 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021D8768: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021D8780 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D8780: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021D8786: - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_021D878C: .word 0x00000B98 -_021D8790: .word 0x0000658F -_021D8794: .word 0x00006B5A -_021D8798: .word 0x00000BA2 - thumb_func_end ov5_021D8638 - - thumb_func_start ov5_021D879C -ov5_021D879C: ; 0x021D879C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r0, _021D8934 ; =0x00000B98 - add r4, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r4, r1] - ldr r5, [r4, r0] - cmp r1, #5 - bls _021D87B2 - b _021D8930 -_021D87B2: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D87BE: ; jump table - .short _021D87CA - _021D87BE - 2 ; case 0 - .short _021D8828 - _021D87BE - 2 ; case 1 - .short _021D8856 - _021D87BE - 2 ; case 2 - .short _021D88A4 - _021D87BE - 2 ; case 3 - .short _021D88D8 - _021D87BE - 2 ; case 4 - .short _021D8912 - _021D87BE - 2 ; case 5 -_021D87CA: - ldr r1, _021D8938 ; =0x00007A0F - mov r2, #0x41 - str r1, [sp] - ldr r1, _021D893C ; =0x00007FFF - add r0, #0xc - str r1, [sp, #4] - mov r1, #2 - str r1, [sp, #8] - ldrh r0, [r4, r0] - add r1, r5, #0 - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r0, #0x44 - ldr r2, [r2, #0x48] - add r1, #0x14 - mov r3, #5 - bl ov5_021D7308 - add r0, r5, #0 - mov r1, #0 - mov r2, #0x10 - mov r3, #0x1e - bl ov5_021D64FC - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - ldr r1, _021D8940 ; =0x0400000C - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #3 - orr r0, r2 - strh r0, [r1] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021D8944 ; =0x00000BA2 - mov r1, #1 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D8828: - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021D650C - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021D8930 - cmp r7, #1 - bne _021D8930 - ldr r0, _021D8944 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D8856: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D887C - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D8938 ; =0x00007A0F - ldr r0, [r0, #0x48] - ldr r3, _021D893C ; =0x00007FFF - mov r1, #5 - str r0, [r5, #0x14] - bl ov5_021D7384 - add r5, #0x14 - add r0, r5, #0 - bl ov5_021D74D4 -_021D887C: - mov r0, #0x10 - mov r1, #0 - bl ov5_021D64E4 - ldr r1, _021D8940 ; =0x0400000C - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #3 - orr r0, r2 - strh r0, [r1] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021D8944 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D88A4: - add r1, r0, #0 - add r1, #0xe - ldrh r1, [r4, r1] - cmp r1, #5 - bne _021D8930 - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D88C2 - add r0, r5, #0 - add r0, #0x14 - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D88C2: - add r0, r5, #0 - mov r1, #0x10 - mov r2, #0 - mov r3, #0x1e - bl ov5_021D64FC - ldr r0, _021D8944 ; =0x00000BA2 - mov r1, #4 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D88D8: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D88EC - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r6, r0, #0 - b _021D88EE -_021D88EC: - mov r6, #1 -_021D88EE: - add r0, r5, #0 - bl ov5_021D650C - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021D8930 - cmp r7, #1 - bne _021D8930 - ldr r0, _021D8944 ; =0x00000BA2 - mov r1, #5 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021D8912: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D892A - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0x14] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D892A: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021D8930: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D8934: .word 0x00000B98 -_021D8938: .word 0x00007A0F -_021D893C: .word 0x00007FFF -_021D8940: .word 0x0400000C -_021D8944: .word 0x00000BA2 - thumb_func_end ov5_021D879C - - thumb_func_start ov5_021D8948 -ov5_021D8948: ; 0x021D8948 - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D8B68 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D8A0A - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D8968: ; jump table - .short _021D8974 - _021D8968 - 2 ; case 0 - .short _021D89D2 - _021D8968 - 2 ; case 1 - .short _021D8A14 - _021D8968 - 2 ; case 2 - .short _021D8A78 - _021D8968 - 2 ; case 3 - .short _021D8AD0 - _021D8968 - 2 ; case 4 - .short _021D8B1E - _021D8968 - 2 ; case 5 -_021D8974: - mov r0, #8 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - sub r0, r2, #3 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _021D8B6C ; =ov5_021D8B88 - mov r3, #0xf - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D8B70 ; =0x00006EEF - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D8B74 ; =0x0000169A - lsl r2, r2, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D8B78 ; =0x00000BA4 - add r1, r4, #0 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - add r4, #0xb8 - str r1, [r4, #0] - ldr r0, _021D8B7C ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D8B3C -_021D89D2: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D89F2 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D8B3C -_021D89F2: - ldr r2, _021D8B78 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D8A0A - cmp r6, #3 - beq _021D8A0C -_021D8A0A: - b _021D8B3C -_021D8A0C: - ldr r0, _021D8B7C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D8B3C -_021D8A14: - mov r2, #8 - mov r3, #1 - str r2, [sp] - str r3, [sp, #4] - sub r0, r3, #3 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _021D8B6C ; =ov5_021D8B88 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D8B78 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8A58 - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D8B70 ; =0x00006EEF - ldr r0, [r0, #0x48] - ldr r3, _021D8B74 ; =0x0000169A - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021D8A58: - mov r0, #0 - add r4, #0xb8 - str r0, [r4, #0] - mov r3, #2 - ldr r0, _021D8B80 ; =ov5_021D8C90 - str r3, [sp] - str r0, [sp, #4] - ldr r1, _021D8B6C ; =ov5_021D8B88 - add r0, r5, #0 - mov r2, #0x18 - bl ov5_021D7568 - ldr r0, _021D8B7C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D8B3C -_021D8A78: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D8A94 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D8B88 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D8A94: - ldr r0, _021D8B84 ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D8B3C - mov r0, #2 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf - mov r3, #2 - bl ov5_021D7238 - ldr r0, _021D8B78 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8AC2 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D8AC2: - mov r0, #0x1f - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D8B7C ; =0x00000BA2 - mov r1, #4 - strh r1, [r5, r0] - b _021D8B3C -_021D8AD0: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8AF0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D8B3C -_021D8AF0: - ldr r0, _021D8B78 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8B02 - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74B8 - b _021D8B04 -_021D8B02: - mov r0, #1 -_021D8B04: - cmp r0, #1 - bne _021D8B3C - cmp r6, #3 - bne _021D8B3C - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D8B3C - ldr r0, _021D8B7C ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D8B3C -_021D8B1E: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8B36 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D8B36: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D8B3C: - ldr r0, _021D8B7C ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D8B62 - cmp r0, #0 - beq _021D8B62 - add r0, r5, #0 - ldr r1, _021D8B80 ; =ov5_021D8C90 - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C -_021D8B62: - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_021D8B68: .word 0x00000B98 -_021D8B6C: .word ov5_021D8B88 -_021D8B70: .word 0x00006EEF -_021D8B74: .word 0x0000169A -_021D8B78: .word 0x00000BA4 -_021D8B7C: .word 0x00000BA2 -_021D8B80: .word ov5_021D8C90 -_021D8B84: .word 0x00000BA6 - thumb_func_end ov5_021D8948 - - thumb_func_start ov5_021D8B88 -ov5_021D8B88: ; 0x021D8B88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #4] - ldr r1, _021D8C7C ; =0x00000B98 - str r0, [sp] - ldr r4, [r0, r1] - mov r1, #5 - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - lsl r1, r1, #6 - add r0, r0, #1 - bl sub_020E1F6C - add r0, r4, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r4, #0xb8 - ldr r0, [r4, #0] - mov r1, #0x28 - bl sub_020E1F6C - mov r1, #0 - str r1, [sp, #8] - ldr r1, [sp, #4] - cmp r1, #0 - ble _021D8C76 - lsl r6, r0, #2 -_021D8BC0: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r4, r0, #0 - beq _021D8C76 - ldr r5, [r4, #8] - mov r0, #0 - str r0, [r5, #0] - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - add r1, #0xf - str r1, [r5, #4] - sub r1, #0xf - add r0, r1, #0 - mov r1, #6 - bl sub_020E1F6C - mov r1, #3 - sub r7, r1, r0 - ldr r1, _021D8C80 ; =0x021F8D70 - add r0, r7, #1 - ldr r1, [r1, r6] - mul r1, r0 - str r1, [r5, #8] - ldr r1, _021D8C84 ; =0x021F8D30 - ldr r1, [r1, r6] - mul r1, r0 - str r1, [r5, #0x10] - mov r0, #0 - str r0, [r5, #0xc] - ldr r0, _021D8C84 ; =0x021F8D30 - ldr r0, [r0, r6] - str r0, [r5, #0x14] - bl sub_0201D35C - mov r1, #0xfa - lsl r1, r1, #2 - bl sub_020E2178 - ldr r0, _021D8C88 ; =0x00000309 - cmp r1, r0 - bne _021D8C2A - ldr r1, [r5, #8] - mov r7, #4 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - add r0, r1, r0 - str r0, [r5, #8] -_021D8C2A: - lsl r1, r7, #0x10 - ldr r0, [r4, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - add r0, sp, #0xc - add r1, r4, #0 - bl ov5_021D7010 - bl sub_0201D35C - mov r1, #0x18 - bl sub_020E2178 - ldr r0, _021D8C8C ; =0x00000106 - add r0, r1, r0 - str r0, [sp, #0xc] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - bl sub_0201D35C - mov r1, #0xc0 - bl sub_020E2178 - sub r1, #0x40 - str r1, [sp, #0x10] - lsl r0, r1, #0xc - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, sp, #0xc - bl ov5_021D630C - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #8] - cmp r1, r0 - blt _021D8BC0 -_021D8C76: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D8C7C: .word 0x00000B98 -_021D8C80: .word 0x021F8D70 -_021D8C84: .word 0x021F8D30 -_021D8C88: .word 0x00000309 -_021D8C8C: .word 0x00000106 - thumb_func_end ov5_021D8B88 - - thumb_func_start ov5_021D8C90 -ov5_021D8C90: ; 0x021D8C90 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - ldr r4, [r5, #8] - bl ov5_021D7010 - add r3, sp, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D8CBA - cmp r0, #1 - beq _021D8CFE - add sp, #0x18 - pop {r3, r4, r5, pc} -_021D8CBA: - ldr r0, [r4, #0x10] - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, [r4, #8] - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - mov r1, #5 - bl sub_020E1F6C - cmp r1, #0 - bne _021D8CE2 - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0x10] -_021D8CE2: - ldr r1, [r4, #0] - add r0, r1, #1 - str r0, [r4, #0] - ldr r0, [r4, #4] - cmp r1, r0 - ble _021D8CF2 - mov r0, #1 - str r0, [r4, #0xc] -_021D8CF2: - ldr r0, [r5, #4] - add r1, sp, #0xc - bl ov5_021D630C - add sp, #0x18 - pop {r3, r4, r5, pc} -_021D8CFE: - add r0, r5, #0 - bl ov5_021D6FA8 - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021D8C90 - - thumb_func_start ov5_021D8D08 -ov5_021D8D08: ; 0x021D8D08 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - ldr r0, _021D8FCC ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D8DDA - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D8D28: ; jump table - .short _021D8D34 - _021D8D28 - 2 ; case 0 - .short _021D8DA0 - _021D8D28 - 2 ; case 1 - .short _021D8DEC - _021D8D28 - 2 ; case 2 - .short _021D8E66 - _021D8D28 - 2 ; case 3 - .short _021D8EFA - _021D8D28 - 2 ; case 4 - .short _021D8F48 - _021D8D28 - 2 ; case 5 -_021D8D34: - mov r0, #8 - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - sub r0, r2, #3 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _021D8FD0 ; =ov5_021D8B88 - mov r3, #0xf - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D8FD4 ; =0x00006EEF - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D8FD8 ; =0x0000169A - lsl r2, r2, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D8FDC ; =0x00000BA4 - add r1, r4, #0 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - ldr r0, _021D8FE0 ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D8F66 -_021D8DA0: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8DC2 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021D8F66 -_021D8DC2: - ldr r2, _021D8FDC ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r1, r4, #0 - add r0, #0x4c - add r1, #0x1c - bl ov5_021D735C - cmp r0, #1 - bne _021D8DDA - cmp r6, #3 - beq _021D8DDC -_021D8DDA: - b _021D8F66 -_021D8DDC: - ldr r0, _021D8FE0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021D8F66 -_021D8DEC: - mov r2, #8 - mov r3, #1 - str r2, [sp] - str r3, [sp, #4] - sub r0, r3, #3 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _021D8FD0 ; =ov5_021D8B88 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D8FDC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8E30 - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D8FD4 ; =0x00006EEF - ldr r0, [r0, #0x48] - ldr r3, _021D8FD8 ; =0x0000169A - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021D8E30: - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - mov r3, #2 - ldr r0, _021D8FE4 ; =ov5_021D8C90 - str r3, [sp] - str r0, [sp, #4] - ldr r1, _021D8FD0 ; =ov5_021D8B88 - add r0, r5, #0 - mov r2, #0x18 - bl ov5_021D7568 - ldr r0, _021D8FE0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021D8F66 -_021D8E66: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D8EB6 - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - mov r1, #0x28 - bl sub_020E1F6C - lsl r1, r0, #2 - ldr r0, _021D8FE8 ; =0x021F8D10 - ldr r1, [r0, r1] - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - mov r0, #5 - mvn r0, r0 - cmp r1, r0 - bgt _021D8EA6 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #1 - bl ov5_021D8B88 - b _021D8EB0 -_021D8EA6: - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D8B88 -_021D8EB0: - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D8EB6: - ldr r0, _021D8FEC ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D8F66 - mov r0, #2 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf - mov r3, #2 - bl ov5_021D7238 - ldr r0, _021D8FDC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8EE4 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D8EE4: - add r0, r4, #0 - mov r1, #0x1f - add r0, #0xb4 - str r1, [r0, #0] - ldr r1, _021D8FE0 ; =0x00000BA2 - mov r0, #4 - strh r0, [r5, r1] - mov r1, #0 - bl sub_0201FF0C - b _021D8F66 -_021D8EFA: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D8F1C - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021D8F66 -_021D8F1C: - ldr r0, _021D8FDC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8F2E - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74B8 - add r7, r0, #0 -_021D8F2E: - cmp r7, #1 - bne _021D8F66 - cmp r6, #3 - bne _021D8F66 - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D8F66 - ldr r0, _021D8FE0 ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D8F66 -_021D8F48: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D8F60 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D8F60: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D8F66: - ldr r0, _021D8FE0 ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D8FC8 - cmp r0, #0 - beq _021D8FC8 - add r0, r5, #0 - ldr r1, _021D8FE4 ; =ov5_021D8C90 - add r0, #0xc - bl ov5_021D6FF0 - add r0, r5, #0 - add r1, sp, #0x1c - add r2, sp, #0x18 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - add r0, r0, #6 - lsr r2, r0, #0x1f - lsl r1, r0, #0x18 - sub r1, r1, r2 - mov r0, #0x18 - ror r1, r0 - add r0, r4, #0 - add r1, r2, r1 - add r0, #0xbc - str r1, [r0, #0] - add r4, #0xbc - ldr r3, [r4, #0] - ldr r0, [sp, #0x1c] - lsl r1, r3, #1 - sub r1, r1, r0 - add r2, r1, #0 - ldr r1, [sp, #0x18] - ldr r0, _021D8FF0 ; =0x000001FF - sub r1, r1, r3 - and r2, r0 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - and r0, r1 - add r1, r2, #0 - orr r1, r0 - ldr r0, _021D8FF4 ; =0x04000018 - str r1, [r0, #0] -_021D8FC8: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D8FCC: .word 0x00000B98 -_021D8FD0: .word ov5_021D8B88 -_021D8FD4: .word 0x00006EEF -_021D8FD8: .word 0x0000169A -_021D8FDC: .word 0x00000BA4 -_021D8FE0: .word 0x00000BA2 -_021D8FE4: .word ov5_021D8C90 -_021D8FE8: .word 0x021F8D10 -_021D8FEC: .word 0x00000BA6 -_021D8FF0: .word 0x000001FF -_021D8FF4: .word 0x04000018 - thumb_func_end ov5_021D8D08 - - thumb_func_start ov5_021D8FF8 -ov5_021D8FF8: ; 0x021D8FF8 - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D9298 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D90C6 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D9018: ; jump table - .short _021D9024 - _021D9018 - 2 ; case 0 - .short _021D908C - _021D9018 - 2 ; case 1 - .short _021D90D8 - _021D9018 - 2 ; case 2 - .short _021D914C - _021D9018 - 2 ; case 3 - .short _021D91D4 - _021D9018 - 2 ; case 4 - .short _021D9224 - _021D9018 - 2 ; case 5 -_021D9024: - mov r0, #0xa - str r0, [sp] - mov r2, #1 - str r2, [sp, #4] - sub r0, r2, #5 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #3 - str r0, [sp, #0x10] - ldr r0, _021D929C ; =ov5_021D92C4 - mov r3, #0x1e - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D92A0 ; =0x00006B6F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D92A4 ; =0x00006318 - lsl r2, r2, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D92A8 ; =0x00000BA4 - add r1, r4, #0 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #0x10 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - ldr r0, _021D92AC ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D9242 -_021D908C: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D90AE - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021D9242 -_021D90AE: - ldr r2, _021D92A8 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r1, r4, #0 - add r0, #0x4c - add r1, #0x1c - bl ov5_021D735C - cmp r0, #1 - bne _021D90C6 - cmp r6, #3 - beq _021D90C8 -_021D90C6: - b _021D9242 -_021D90C8: - ldr r0, _021D92AC ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021D9242 -_021D90D8: - mov r2, #0xa - mov r3, #1 - str r2, [sp] - str r3, [sp, #4] - sub r0, r3, #5 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #3 - str r0, [sp, #0x10] - ldr r0, _021D929C ; =ov5_021D92C4 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D92A8 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D911C - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D92A0 ; =0x00006B6F - ldr r0, [r0, #0x48] - ldr r3, _021D92A4 ; =0x00006318 - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021D911C: - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - mov r3, #2 - ldr r0, _021D92B0 ; =ov5_021D93DC - str r3, [sp] - str r0, [sp, #4] - ldr r1, _021D929C ; =ov5_021D92C4 - add r0, r5, #0 - mov r2, #0x14 - bl ov5_021D7568 - ldr r0, _021D92AC ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021D9242 -_021D914C: - mov r1, #6 - ldrsh r2, [r4, r1] - sub r0, r2, #1 - strh r0, [r4, #6] - cmp r2, #0 - bgt _021D9190 - add r0, r4, #0 - add r0, #0xb8 - ldr r2, [r0, #0] - sub r1, #0xe - asr r0, r2, #8 - lsr r0, r0, #0x17 - add r0, r2, r0 - asr r0, r0, #9 - lsl r2, r0, #2 - ldr r0, _021D92B4 ; =0x021F8CDC - ldr r0, [r0, r2] - cmp r0, r1 - bgt _021D9180 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #1 - bl ov5_021D92C4 - b _021D918A -_021D9180: - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D92C4 -_021D918A: - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D9190: - ldr r0, _021D92B8 ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D9242 - mov r0, #3 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0xc - mov r3, #4 - bl ov5_021D7238 - ldr r0, _021D92A8 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D91BE - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D91BE: - add r0, r4, #0 - mov r1, #0x14 - add r0, #0xb4 - str r1, [r0, #0] - ldr r1, _021D92AC ; =0x00000BA2 - mov r0, #4 - strh r0, [r5, r1] - mov r1, #0 - bl sub_0201FF0C - b _021D9242 -_021D91D4: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D91F6 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021D9242 -_021D91F6: - ldr r0, _021D92A8 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D9208 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74B8 - b _021D920A -_021D9208: - mov r0, #1 -_021D920A: - cmp r0, #1 - bne _021D9242 - cmp r6, #3 - bne _021D9242 - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D9242 - ldr r0, _021D92AC ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D9242 -_021D9224: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D923C - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D923C: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D9242: - ldr r0, _021D92AC ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D9294 - cmp r0, #0 - beq _021D9294 - add r0, r5, #0 - ldr r1, _021D92B0 ; =ov5_021D93DC - add r0, #0xc - bl ov5_021D6FF0 - add r0, r5, #0 - bl ov5_021D700C - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - add r0, #0xc - lsr r2, r0, #0x1f - lsl r1, r0, #0x18 - sub r1, r1, r2 - mov r0, #0x18 - ror r1, r0 - add r0, r4, #0 - add r1, r2, r1 - add r0, #0xbc - str r1, [r0, #0] - add r4, #0xbc - ldr r3, [r4, #0] - ldr r0, _021D92BC ; =0x000001FF - lsl r1, r3, #1 - add r2, r1, #0 - neg r1, r3 - and r2, r0 - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - and r0, r1 - add r1, r2, #0 - orr r1, r0 - ldr r0, _021D92C0 ; =0x04000018 - str r1, [r0, #0] -_021D9294: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D9298: .word 0x00000B98 -_021D929C: .word ov5_021D92C4 -_021D92A0: .word 0x00006B6F -_021D92A4: .word 0x00006318 -_021D92A8: .word 0x00000BA4 -_021D92AC: .word 0x00000BA2 -_021D92B0: .word ov5_021D93DC -_021D92B4: .word 0x021F8CDC -_021D92B8: .word 0x00000BA6 -_021D92BC: .word 0x000001FF -_021D92C0: .word 0x04000018 - thumb_func_end ov5_021D8FF8 - - thumb_func_start ov5_021D92C4 -ov5_021D92C4: ; 0x021D92C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - ldr r2, _021D93D0 ; =0x00000B98 - str r0, [sp] - ldr r0, [r0, r2] - add r2, r0, #0 - add r2, #0xb8 - ldr r2, [r2, #0] - add r3, r2, #1 - add r2, r0, #0 - add r2, #0xb8 - str r3, [r2, #0] - add r2, r0, #0 - add r2, #0xb8 - ldr r3, [r2, #0] - mov r2, #2 - lsl r2, r2, #0xa - cmp r3, r2 - blt _021D92F2 - add r2, r0, #0 - mov r3, #0 - add r2, #0xb8 - str r3, [r2, #0] -_021D92F2: - add r0, #0xb8 - ldr r2, [r0, #0] - asr r0, r2, #8 - lsr r0, r0, #0x17 - add r0, r2, r0 - asr r2, r0, #9 - mov r0, #0 - str r0, [sp, #8] - lsl r0, r1, #2 - str r0, [sp, #4] - cmp r0, #0 - ble _021D93CA - lsl r4, r2, #2 -_021D930C: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r6, r0, #0 - beq _021D93CA - ldr r5, [r6, #8] - mov r0, #0 - str r0, [r5, #0] - bl sub_0201D35C - mov r1, #6 - bl sub_020E2178 - add r1, #0x12 - str r1, [r5, #4] - bl sub_0201D35C - add r7, r0, #0 - mov r1, #3 - and r7, r1 - lsl r1, r7, #0x10 - ldr r0, [r6, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - ldr r1, _021D93D4 ; =0x021F8CDC - add r0, r7, #1 - ldr r1, [r1, r4] - mul r1, r0 - str r1, [r5, #0x10] - ldr r1, _021D93D8 ; =0x021F8CEC - ldr r1, [r1, r4] - mul r1, r0 - mov r0, #0 - str r1, [r5, #8] - str r0, [r5, #0xc] - cmp r7, #3 - bne _021D936E - ldr r0, _021D93D4 ; =0x021F8CDC - ldr r1, [r5, #0x10] - ldr r0, [r0, r4] - add r0, r1, r0 - str r0, [r5, #0x10] - ldr r0, _021D93D8 ; =0x021F8CEC - ldr r1, [r5, #8] - ldr r0, [r0, r4] - add r0, r1, r0 - str r0, [r5, #8] -_021D936E: - ldr r0, _021D93D4 ; =0x021F8CDC - add r1, r6, #0 - ldr r0, [r0, r4] - str r0, [r5, #0x14] - add r0, sp, #0xc - bl ov5_021D7010 - add r3, sp, #0xc - ldmia r3!, {r0, r1} - add r2, sp, #0x18 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bl sub_0201D35C - mov r1, #0x18 - bl sub_020E2178 - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - str r0, [sp, #0x18] - bl sub_0201D35C - mov r1, #0xa8 - bl sub_020E2178 - ldr r0, [sp, #0x18] - sub r1, #0x20 - lsl r0, r0, #0xc - str r0, [sp, #0x18] - str r1, [sp, #0x1c] - lsl r0, r1, #0xc - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [r6, #4] - add r1, sp, #0x18 - bl ov5_021D630C - ldr r0, [sp, #8] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #8] - cmp r1, r0 - blt _021D930C -_021D93CA: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021D93D0: .word 0x00000B98 -_021D93D4: .word 0x021F8CDC -_021D93D8: .word 0x021F8CEC - thumb_func_end ov5_021D92C4 - - thumb_func_start ov5_021D93DC -ov5_021D93DC: ; 0x021D93DC - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - ldr r4, [r5, #8] - bl ov5_021D7010 - add r3, sp, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021D9406 - cmp r0, #1 - beq _021D9458 - add sp, #0x18 - pop {r3, r4, r5, pc} -_021D9406: - ldr r0, [r4, #0x10] - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, [r4, #8] - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [r4, #0] - add r0, r1, #1 - str r0, [r4, #0] - ldr r0, [r4, #4] - cmp r1, r0 - ble _021D942A - mov r0, #1 - str r0, [r4, #0xc] -_021D942A: - ldr r0, [r4, #0] - lsr r2, r0, #0x1f - lsl r1, r0, #0x1e - sub r1, r1, r2 - mov r0, #0x1e - ror r1, r0 - add r0, r2, r1 - bne _021D944C - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r0, [r4, #8] - cmp r0, #1 - ble _021D944C - sub r0, r0, #1 - str r0, [r4, #8] -_021D944C: - ldr r0, [r5, #4] - add r1, sp, #0xc - bl ov5_021D630C - add sp, #0x18 - pop {r3, r4, r5, pc} -_021D9458: - add r0, r5, #0 - bl ov5_021D6FA8 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D93DC - - thumb_func_start ov5_021D9464 -ov5_021D9464: ; 0x021D9464 - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r0, _021D9670 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021D951E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D9484: ; jump table - .short _021D9490 - _021D9484 - 2 ; case 0 - .short _021D94E6 - _021D9484 - 2 ; case 1 - .short _021D9528 - _021D9484 - 2 ; case 2 - .short _021D9586 - _021D9484 - 2 ; case 3 - .short _021D95DE - _021D9484 - 2 ; case 4 - .short _021D9628 - _021D9484 - 2 ; case 5 -_021D9490: - mov r0, #0x14 - str r0, [sp] - mov r2, #2 - str r2, [sp, #4] - sub r0, r2, #4 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, _021D9674 ; =ov5_021D9690 - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r4, #0 - mov r3, #0x10 - bl ov5_021D7210 - ldr r0, _021D9678 ; =0x0000716F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D967C ; =0x00006B5A - lsl r2, r2, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D9680 ; =0x00000BA4 - add r1, r4, #0 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - mov r0, #0 - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D9684 ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021D9646 -_021D94E6: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D9506 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D9646 -_021D9506: - ldr r2, _021D9680 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D951E - cmp r6, #3 - beq _021D9520 -_021D951E: - b _021D9646 -_021D9520: - ldr r0, _021D9684 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D9646 -_021D9528: - mov r2, #0x14 - mov r3, #2 - str r2, [sp] - str r3, [sp, #4] - sub r0, r3, #4 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, _021D9674 ; =ov5_021D9690 - str r3, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - ldr r0, _021D9680 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D956A - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D9678 ; =0x0000716F - ldr r0, [r0, #0x48] - ldr r3, _021D967C ; =0x00006B5A - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74D4 -_021D956A: - mov r0, #1 - str r0, [sp] - ldr r0, _021D9688 ; =ov5_021D97C0 - ldr r1, _021D9674 ; =ov5_021D9690 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #0xa - bl ov5_021D7568 - ldr r0, _021D9684 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - b _021D9646 -_021D9586: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D95A2 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021D9690 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D95A2: - ldr r0, _021D968C ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021D9646 - mov r0, #9 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0x10 - mov r3, #6 - bl ov5_021D7238 - ldr r0, _021D9680 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D95D0 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D95D0: - mov r0, #0x14 - add r4, #0xb4 - str r0, [r4, #0] - ldr r0, _021D9684 ; =0x00000BA2 - mov r1, #4 - strh r1, [r5, r0] - b _021D9646 -_021D95DE: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D95FE - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D9646 -_021D95FE: - ldr r2, _021D9680 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D9646 - cmp r6, #3 - bne _021D9646 - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021D9646 - ldr r0, _021D9684 ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021D9646 -_021D9628: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D9640 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D9640: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D9646: - ldr r0, _021D9684 ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021D966C - cmp r0, #0 - beq _021D966C - add r0, r5, #0 - ldr r1, _021D9688 ; =ov5_021D97C0 - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C -_021D966C: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D9670: .word 0x00000B98 -_021D9674: .word ov5_021D9690 -_021D9678: .word 0x0000716F -_021D967C: .word 0x00006B5A -_021D9680: .word 0x00000BA4 -_021D9684: .word 0x00000BA2 -_021D9688: .word ov5_021D97C0 -_021D968C: .word 0x00000BA6 - thumb_func_end ov5_021D9464 - - thumb_func_start ov5_021D9690 -ov5_021D9690: ; 0x021D9690 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r1, #0 - str r1, [sp, #4] - cmp r0, #0 - bgt _021D96A4 - b _021D97BC -_021D96A4: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r4, r0, #0 - bne _021D96B2 - b _021D97BC -_021D96B2: - ldr r5, [r4, #8] - mov r0, #0 - str r0, [r5, #0] - bl sub_0201D35C - mov r1, #5 - bl sub_020E2178 - add r0, r1, #7 - str r0, [r5, #4] - bl sub_0201D35C - mov r1, #0xfa - lsl r1, r1, #2 - bl sub_020E2178 - lsr r2, r1, #0x1f - lsl r1, r1, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - bne _021D96E4 - mov r0, #1 - b _021D96E8 -_021D96E4: - mov r0, #0 - mvn r0, r0 -_021D96E8: - str r0, [r5, #8] - mov r0, #1 - str r0, [r5, #0xc] - bl sub_0201D35C - mov r1, #6 - bl sub_020E2178 - add r0, r1, #3 - str r0, [r5, #0x10] - bl sub_0201D35C - mov r1, #5 - bl sub_020E2178 - add r0, r1, #4 - str r0, [r5, #0x14] - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - str r1, [sp, #8] - add r0, sp, #0x10 - add r1, r4, #0 - bl ov5_021D7010 - bl sub_0201D35C - mov r1, #6 - lsl r1, r1, #6 - bl sub_020E2178 - sub r1, #0x40 - str r1, [sp, #0x10] - bl sub_0201D35C - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - ldr r0, [sp, #0x10] - sub r1, #8 - lsl r0, r0, #0xc - str r0, [sp, #0x10] - str r1, [sp, #0x14] - lsl r0, r1, #0xc - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #4] - add r1, sp, #0x10 - bl ov5_021D630C - ldr r1, [sp, #0x14] - ldr r0, [sp, #0x10] - asr r1, r1, #0xc - asr r0, r0, #0xc - str r1, [sp, #0x14] - mov r1, #3 - str r0, [sp, #0x10] - bl sub_020E1F6C - mov r1, #0x32 - sub r6, r1, r0 - mov r1, #0xce - sub r7, r1, r0 - bpl _021D977A - bl sub_0201D35C - neg r1, r7 - bl sub_020E2178 - sub r1, r6, r1 - b _021D9786 -_021D977A: - bl sub_0201D35C - add r1, r7, #0 - bl sub_020E2178 - add r1, r6, r1 -_021D9786: - ldr r0, [sp, #0x14] - cmp r6, r0 - bgt _021D9798 - cmp r1, r0 - blt _021D9798 - ldr r0, [r5, #4] - lsl r0, r0, #1 - str r0, [r5, #4] - b _021D97A2 -_021D9798: - bl sub_0201D35C - mov r1, #3 - and r0, r1 - str r0, [sp, #8] -_021D97A2: - ldr r1, [sp, #8] - ldr r0, [r4, #4] - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02021E50 - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #0xc] - cmp r1, r0 - bge _021D97BC - b _021D96A4 -_021D97BC: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021D9690 - - thumb_func_start ov5_021D97C0 -ov5_021D97C0: ; 0x021D97C0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r4, [r5, #8] - add r0, sp, #0 - add r1, r5, #0 - bl ov5_021D7010 - ldr r0, [r4, #0] - add r1, r0, #1 - str r1, [r4, #0] - ldr r0, [r4, #4] - cmp r1, r0 - blt _021D97E2 - add r0, r5, #0 - bl ov5_021D6FA8 -_021D97E2: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D97C0 - - thumb_func_start ov5_021D97E8 -ov5_021D97E8: ; 0x021D97E8 - push {r3, r4, r5, lr} - ldr r0, _021D9974 ; =0x00000B98 - add r5, r1, #0 - ldr r4, [r5, r0] - add r0, #0xa - ldrh r0, [r5, r0] - cmp r0, #5 - bhi _021D9854 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9804: ; jump table - .short _021D9810 - _021D9804 - 2 ; case 0 - .short _021D9834 - _021D9804 - 2 ; case 1 - .short _021D987E - _021D9804 - 2 ; case 2 - .short _021D98BE - _021D9804 - 2 ; case 3 - .short _021D9944 - _021D9804 - 2 ; case 4 - .short _021D996C - _021D9804 - 2 ; case 5 -_021D9810: - mov r0, #0 - str r0, [r4, #0] - mov r1, #0x10 - str r0, [r4, #4] - bl ov5_021D64E4 - mov r1, #2 - ldr r0, _021D9978 ; =0x04000018 - lsl r1, r1, #0x14 - str r1, [r0, #0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021D997C ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - pop {r3, r4, r5, pc} -_021D9834: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - cmp r0, #0xa - blt _021D9854 - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #4] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r4, #4] - bl ov5_021D64E4 - ldr r0, [r4, #4] - cmp r0, #0xa - bge _021D9856 -_021D9854: - b _021D9972 -_021D9856: - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - add r1, #0xa - str r1, [r4, #8] - bl sub_0201D35C - mov r1, #3 - bl sub_020E2178 - add r0, r1, #5 - str r0, [r4, #0xc] - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, _021D997C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - pop {r3, r4, r5, pc} -_021D987E: - mov r0, #0 - str r0, [r4, #0] - mov r0, #0xa - str r0, [r4, #4] - mov r1, #2 - ldr r0, _021D9978 ; =0x04000018 - lsl r1, r1, #0x14 - str r1, [r0, #0] - ldr r0, [r4, #4] - mov r1, #0x10 - bl ov5_021D64E4 - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - add r1, #0xa - str r1, [r4, #8] - bl sub_0201D35C - mov r1, #3 - bl sub_020E2178 - add r0, r1, #5 - str r0, [r4, #0xc] - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, _021D997C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - pop {r3, r4, r5, pc} -_021D98BE: - ldr r0, [r4, #0] - add r1, r0, #1 - str r1, [r4, #0] - ldr r0, [r4, #8] - cmp r1, r0 - blt _021D992C - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #0x10] - cmp r0, #1 - ldr r0, [r4, #4] - bne _021D9902 - sub r1, r0, #1 - str r1, [r4, #4] - ldr r0, [r4, #0xc] - cmp r1, r0 - bgt _021D992C - bl sub_0201D35C - mov r1, #0xf - bl sub_020E2178 - add r1, #0xa - str r1, [r4, #8] - bl sub_0201D35C - mov r1, #3 - bl sub_020E2178 - add r0, r1, #7 - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x10] - b _021D992C -_021D9902: - add r1, r0, #1 - str r1, [r4, #4] - ldr r0, [r4, #0xc] - cmp r1, r0 - blt _021D992C - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - add r1, #0xa - str r1, [r4, #8] - bl sub_0201D35C - mov r1, #3 - bl sub_020E2178 - add r0, r1, #5 - str r0, [r4, #0xc] - mov r0, #1 - str r0, [r4, #0x10] -_021D992C: - ldr r0, [r4, #4] - mov r1, #0x10 - bl ov5_021D64E4 - ldr r0, _021D9980 ; =0x00000BA6 - ldrh r1, [r5, r0] - cmp r1, #5 - bne _021D9972 - mov r1, #4 - sub r0, r0, #4 - strh r1, [r5, r0] - pop {r3, r4, r5, pc} -_021D9944: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - cmp r0, #0xa - blt _021D9972 - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r4, #4] - mov r1, #0x10 - sub r0, r0, #1 - str r0, [r4, #4] - bl ov5_021D64E4 - ldr r0, [r4, #4] - cmp r0, #0 - bgt _021D9972 - ldr r0, _021D997C ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - pop {r3, r4, r5, pc} -_021D996C: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021D9972: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D9974: .word 0x00000B98 -_021D9978: .word 0x04000018 -_021D997C: .word 0x00000BA2 -_021D9980: .word 0x00000BA6 - thumb_func_end ov5_021D97E8 - - thumb_func_start ov5_021D9984 -ov5_021D9984: ; 0x021D9984 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0xa - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - sub r0, r0, #3 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r2, #1 - add r4, r1, #0 - ldr r0, _021D99F8 ; =ov5_021DA0A8 - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r4, #0 - add r1, r5, #0 - mov r3, #0xf - bl ov5_021D7210 - ldr r0, _021D99FC ; =0x00006F6F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021D9A00 ; =0x00006B5A - add r1, r4, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021D9A04 ; =0x00000BA4 - lsl r2, r2, #2 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r4, #0xbc - str r1, [r4, #0] - ldr r1, _021D9A08 ; =0x0000063B - add r0, r5, #0 - bl ov5_021DB4B8 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_021D99F8: .word ov5_021DA0A8 -_021D99FC: .word 0x00006F6F -_021D9A00: .word 0x00006B5A -_021D9A04: .word 0x00000BA4 -_021D9A08: .word 0x0000063B - thumb_func_end ov5_021D9984 - - thumb_func_start ov5_021D9A0C -ov5_021D9A0C: ; 0x021D9A0C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D9A32 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D9A4E -_021D9A32: - ldr r2, _021D9A54 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r4, #0x1c - add r0, #0x4c - add r1, r4, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D9A4E - cmp r6, #3 - bne _021D9A4E - mov r0, #1 - pop {r4, r5, r6, pc} -_021D9A4E: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_021D9A54: .word 0x00000BA4 - thumb_func_end ov5_021D9A0C - - thumb_func_start ov5_021D9A58 -ov5_021D9A58: ; 0x021D9A58 - push {r3, r4, r5, lr} - sub sp, #0x18 - mov r2, #0xa - str r2, [sp] - mov r3, #0 - add r5, r0, #0 - str r3, [sp, #4] - sub r0, r3, #3 - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _021D9AD4 ; =ov5_021DA0A8 - add r4, r1, #0 - str r0, [sp, #0x14] - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D7210 - ldr r0, _021D9AD8 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D9AA6 - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D9ADC ; =0x00006F6F - ldr r0, [r0, #0x48] - ldr r3, _021D9AE0 ; =0x00006B5A - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021D9AA6: - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r4, #0xbc - str r1, [r4, #0] - mov r0, #1 - str r0, [sp] - ldr r0, _021D9AE4 ; =ov5_021DA1A8 - ldr r1, _021D9AD4 ; =ov5_021DA0A8 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #5 - bl ov5_021D7568 - ldr r1, _021D9AE8 ; =0x0000063B - add r0, r5, #0 - bl ov5_021DB4B8 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_021D9AD4: .word ov5_021DA0A8 -_021D9AD8: .word 0x00000BA4 -_021D9ADC: .word 0x00006F6F -_021D9AE0: .word 0x00006B5A -_021D9AE4: .word ov5_021DA1A8 -_021D9AE8: .word 0x0000063B - thumb_func_end ov5_021D9A58 - - thumb_func_start ov5_021D9AEC -ov5_021D9AEC: ; 0x021D9AEC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x4b - add r0, r0, #1 - lsl r1, r1, #2 - bl sub_020E1F6C - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021D9B24 - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021DA0A8 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021D9B24: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021D9AEC - - thumb_func_start ov5_021D9B28 -ov5_021D9B28: ; 0x021D9B28 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - add r4, r1, #0 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf - mov r3, #3 - bl ov5_021D7238 - ldr r0, _021D9B64 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D9B54 - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021D9B54: - mov r0, #0 - add r4, #0xb4 - str r0, [r4, #0] - add r0, r5, #0 - bl ov5_021DB4E4 - pop {r3, r4, r5, pc} - nop -_021D9B64: .word 0x00000BA4 - thumb_func_end ov5_021D9B28 - - thumb_func_start ov5_021D9B68 -ov5_021D9B68: ; 0x021D9B68 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021D9B8E - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - add r4, #0xb4 - sub r0, r0, #1 - str r0, [r4, #0] - b _021D9BB6 -_021D9B8E: - ldr r0, _021D9BBC ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021D9BA0 - add r4, #0x1c - add r0, r4, #0 - bl ov5_021D74B8 - b _021D9BA2 -_021D9BA0: - mov r0, #1 -_021D9BA2: - cmp r0, #1 - bne _021D9BB6 - cmp r6, #3 - bne _021D9BB6 - ldr r0, [r5, #0x40] - add r5, #0xc - cmp r0, r5 - bne _021D9BB6 - mov r0, #1 - pop {r4, r5, r6, pc} -_021D9BB6: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_021D9BBC: .word 0x00000BA4 - thumb_func_end ov5_021D9B68 - - thumb_func_start ov5_021D9BC0 -ov5_021D9BC0: ; 0x021D9BC0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _021D9BE8 ; =0x00000BA4 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9BDE - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r1, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D9BDE: - ldr r0, [r4, #4] - bl ov5_021D69B8 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_021D9BE8: .word 0x00000BA4 - thumb_func_end ov5_021D9BC0 - - thumb_func_start ov5_021D9BEC -ov5_021D9BEC: ; 0x021D9BEC - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D9C18 ; =0x00000BA2 - ldrh r0, [r4, r0] - cmp r0, #5 - beq _021D9C16 - cmp r0, #0 - beq _021D9C16 - add r0, r4, #0 - ldr r1, _021D9C1C ; =ov5_021DA1A8 - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r4, #0 - bl ov5_021D700C -_021D9C16: - pop {r4, pc} - ; .align 2, 0 -_021D9C18: .word 0x00000BA2 -_021D9C1C: .word ov5_021DA1A8 - thumb_func_end ov5_021D9BEC - - thumb_func_start ov5_021D9C20 -ov5_021D9C20: ; 0x021D9C20 - push {r4, r5, r6, lr} - sub sp, #8 - ldr r0, _021D9DE8 ; =0x00000B98 - add r4, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r4, r1] - add r6, r2, #0 - ldr r5, [r4, r0] - cmp r1, #5 - bls _021D9C38 - b _021D9DE2 -_021D9C38: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D9C44: ; jump table - .short _021D9C50 - _021D9C44 - 2 ; case 0 - .short _021D9CA6 - _021D9C44 - 2 ; case 1 - .short _021D9CB0 - _021D9C44 - 2 ; case 2 - .short _021D9D06 - _021D9C44 - 2 ; case 3 - .short _021D9DA2 - _021D9C44 - 2 ; case 4 - .short _021D9DBC - _021D9C44 - 2 ; case 5 -_021D9C50: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9C9C - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D9DEC ; =0x00006FAF - ldr r0, [r0, #0x48] - mov r1, #5 - mov r3, #0 - bl ov5_021D7384 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, _021D9DF0 ; =0x021F8E14 - ldr r0, [r0, #0x48] - bl ov5_021D585C - mov r1, #0x10 - add r0, r6, #0 - sub r1, r1, r6 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - ldr r1, [sp, #0x18] - add r0, #0x98 - str r1, [r0, #0] - mov r0, #0 - add r5, #0x9c - str r0, [r5, #0] -_021D9C9C: - ldr r0, _021D9DF4 ; =0x00000BA2 - mov r1, #1 - add sp, #8 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9CA6: - mov r1, #3 - add r0, #0xa - add sp, #8 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9CB0: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9CFC - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021D9DEC ; =0x00006FAF - ldr r0, [r0, #0x48] - mov r1, #5 - mov r3, #0 - bl ov5_021D7384 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, _021D9DF0 ; =0x021F8E14 - ldr r0, [r0, #0x48] - bl ov5_021D585C - mov r1, #0x10 - add r0, r6, #0 - sub r1, r1, r6 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - ldr r1, [sp, #0x18] - add r0, #0x98 - str r1, [r0, #0] - mov r0, #0 - add r5, #0x9c - str r0, [r5, #0] -_021D9CFC: - ldr r0, _021D9DF4 ; =0x00000BA2 - mov r1, #3 - add sp, #8 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9D06: - add r0, r5, #0 - add r0, #0x9c - ldr r0, [r0, #0] - cmp r0, #0 - bne _021D9D32 - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - sub r1, r0, r3 - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - bgt _021D9D7A - add r0, r5, #0 - mov r1, #1 - add r0, #0x9c - str r1, [r0, #0] - b _021D9D7A -_021D9D32: - cmp r0, #1 - bne _021D9D5A - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x98 - ldr r1, [r0, #0] - ldr r0, [sp, #0x1c] - cmp r1, r0 - blo _021D9D7A - add r0, r5, #0 - mov r1, #2 - add r0, #0x9c - str r1, [r0, #0] - b _021D9D7A -_021D9D5A: - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0x98 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x98 - ldr r0, [r0, #0] - cmp r0, #0 - bgt _021D9D7A - add r0, r5, #0 - mov r1, #1 - add r0, #0x9c - str r1, [r0, #0] -_021D9D7A: - add r5, #0x98 - ldr r1, [r5, #0] - asr r0, r1, #6 - lsr r0, r0, #0x19 - add r0, r1, r0 - asr r0, r0, #7 - add r0, r6, r0 - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - ldr r0, _021D9DF8 ; =0x00000BA6 - ldrh r1, [r4, r0] - cmp r1, #5 - bne _021D9DE2 - mov r1, #4 - sub r0, r0, #4 - add sp, #8 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9DA2: - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _021D9DF4 ; =0x00000BA2 - mov r1, #5 - add sp, #8 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9DBC: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9DDC - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - ldr r0, [r0, #0x48] - add r3, r2, #0 - bl ov5_021D57FC -_021D9DDC: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021D9DE2: - add sp, #8 - pop {r4, r5, r6, pc} - nop -_021D9DE8: .word 0x00000B98 -_021D9DEC: .word 0x00006FAF -_021D9DF0: .word 0x021F8E14 -_021D9DF4: .word 0x00000BA2 -_021D9DF8: .word 0x00000BA6 - thumb_func_end ov5_021D9C20 - - thumb_func_start ov5_021D9DFC -ov5_021D9DFC: ; 0x021D9DFC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r2, #0 - ldr r2, _021D9F08 ; =0x00000BA2 - add r4, r0, #0 - ldrh r0, [r4, r2] - add r5, r1, #0 - cmp r0, #5 - bhi _021D9F02 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9E1A: ; jump table - .short _021D9E26 - _021D9E1A - 2 ; case 0 - .short _021D9E56 - _021D9E1A - 2 ; case 1 - .short _021D9E70 - _021D9E1A - 2 ; case 2 - .short _021D9EA0 - _021D9E1A - 2 ; case 3 - .short _021D9EC4 - _021D9E1A - 2 ; case 4 - .short _021D9EE4 - _021D9E1A - 2 ; case 5 -_021D9E26: - str r3, [sp] - add r0, sp, #0x10 - ldrh r0, [r0, #0x10] - add r5, #0x30 - str r0, [sp, #4] - ldr r0, [sp, #0x24] - str r0, [sp, #8] - add r0, r2, #2 - ldrh r0, [r4, r0] - mov r2, #0x41 - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r3, r6, #0 - ldr r2, [r2, #0x48] - bl ov5_021D7308 - ldr r0, _021D9F08 ; =0x00000BA2 - mov r1, #1 - add sp, #0x10 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9E56: - add r2, r2, #2 - ldrh r2, [r4, r2] - add r5, #0x30 - add r0, r5, #0 - bl ov5_021D735C - cmp r0, #1 - bne _021D9F02 - ldr r0, _021D9F08 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9E70: - add r0, r2, #2 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9E96 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r2, r3, #0 - ldr r0, [r0, #0x48] - add r3, sp, #0x10 - str r0, [r5, #0] - ldrh r3, [r3, #0x10] - add r1, r6, #0 - bl ov5_021D7384 - add r0, r5, #0 - bl ov5_021D74D4 -_021D9E96: - ldr r0, _021D9F08 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9EA0: - add r0, r2, #4 - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021D9F02 - add r0, r2, #2 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9EBA - ldr r1, [sp, #0x28] - add r0, r5, #0 - mov r2, #0 - bl ov5_021D749C -_021D9EBA: - ldr r0, _021D9F08 ; =0x00000BA2 - mov r1, #4 - add sp, #0x10 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9EC4: - add r0, r2, #2 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9ED4 - add r0, r5, #0 - bl ov5_021D74B8 - b _021D9ED6 -_021D9ED4: - mov r0, #1 -_021D9ED6: - cmp r0, #1 - bne _021D9F02 - ldr r0, _021D9F08 ; =0x00000BA2 - mov r1, #5 - add sp, #0x10 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021D9EE4: - add r0, r2, #2 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021D9EFC - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021D9EFC: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021D9F02: - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D9F08: .word 0x00000BA2 - thumb_func_end ov5_021D9DFC - - thumb_func_start ov5_021D9F0C -ov5_021D9F0C: ; 0x021D9F0C - push {r3, r4, r5, lr} - ldr r0, _021D9FEC ; =0x00000B98 - add r4, r1, #0 - ldr r5, [r4, r0] - add r0, #0xa - ldrh r0, [r4, r0] - cmp r0, #5 - bhi _021D9FE0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D9F28: ; jump table - .short _021D9F34 - _021D9F28 - 2 ; case 0 - .short _021D9F58 - _021D9F28 - 2 ; case 1 - .short _021D9F6C - _021D9F28 - 2 ; case 2 - .short _021D9F90 - _021D9F28 - 2 ; case 3 - .short _021D9FBA - _021D9F28 - 2 ; case 4 - .short _021D9FCE - _021D9F28 - 2 ; case 5 -_021D9F34: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9984 - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x11 - bl ov5_021D6418 - ldr r0, [r4, #0] - mov r1, #3 - mov r2, #0x11 - bl ov5_021D6418 - ldr r0, _021D9FF0 ; =0x00000BA2 - mov r1, #1 - strh r1, [r4, r0] - b _021D9FE0 -_021D9F58: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9A0C - cmp r0, #0 - beq _021D9FE0 - ldr r0, _021D9FF0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021D9FE0 -_021D9F6C: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9A58 - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x11 - bl ov5_021D6418 - ldr r0, [r4, #0] - mov r1, #3 - mov r2, #0x11 - bl ov5_021D6418 - ldr r0, _021D9FF0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021D9FE0 -_021D9F90: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9AEC - ldr r0, _021D9FF4 ; =0x00000BA6 - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021D9FE0 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9B28 - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0x11 - bl ov5_021D6418 - ldr r0, _021D9FF0 ; =0x00000BA2 - mov r1, #4 - strh r1, [r4, r0] - b _021D9FE0 -_021D9FBA: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9B68 - cmp r0, #0 - beq _021D9FE0 - ldr r0, _021D9FF0 ; =0x00000BA2 - mov r1, #5 - strh r1, [r4, r0] - b _021D9FE0 -_021D9FCE: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9BC0 - ldr r0, [r4, #0] - mov r1, #8 - mov r2, #0x11 - bl ov5_021D6418 -_021D9FE0: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9BEC - pop {r3, r4, r5, pc} - nop -_021D9FEC: .word 0x00000B98 -_021D9FF0: .word 0x00000BA2 -_021D9FF4: .word 0x00000BA6 - thumb_func_end ov5_021D9F0C - - thumb_func_start ov5_021D9FF8 -ov5_021D9FF8: ; 0x021D9FF8 - push {r3, r4, r5, lr} - ldr r0, _021DA09C ; =0x00000B98 - add r4, r1, #0 - ldr r5, [r4, r0] - add r0, #0xa - ldrh r0, [r4, r0] - cmp r0, #5 - bhi _021DA090 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA014: ; jump table - .short _021DA020 - _021DA014 - 2 ; case 0 - .short _021DA030 - _021DA014 - 2 ; case 1 - .short _021DA044 - _021DA014 - 2 ; case 2 - .short _021DA054 - _021DA014 - 2 ; case 3 - .short _021DA074 - _021DA014 - 2 ; case 4 - .short _021DA088 - _021DA014 - 2 ; case 5 -_021DA020: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9984 - ldr r0, _021DA0A0 ; =0x00000BA2 - mov r1, #1 - strh r1, [r4, r0] - b _021DA090 -_021DA030: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9A0C - cmp r0, #0 - beq _021DA090 - ldr r0, _021DA0A0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021DA090 -_021DA044: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9A58 - ldr r0, _021DA0A0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021DA090 -_021DA054: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9AEC - ldr r0, _021DA0A4 ; =0x00000BA6 - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021DA090 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9B28 - ldr r0, _021DA0A0 ; =0x00000BA2 - mov r1, #4 - strh r1, [r4, r0] - b _021DA090 -_021DA074: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9B68 - cmp r0, #0 - beq _021DA090 - ldr r0, _021DA0A0 ; =0x00000BA2 - mov r1, #5 - strh r1, [r4, r0] - b _021DA090 -_021DA088: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9BC0 -_021DA090: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021D9BEC - pop {r3, r4, r5, pc} - nop -_021DA09C: .word 0x00000B98 -_021DA0A0: .word 0x00000BA2 -_021DA0A4: .word 0x00000BA6 - thumb_func_end ov5_021D9FF8 - - thumb_func_start ov5_021DA0A8 -ov5_021DA0A8: ; 0x021DA0A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r1, [sp, #4] - ldr r1, _021DA19C ; =0x00000B98 - str r0, [sp] - ldr r7, [r0, r1] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - cmp r0, #0 - ble _021DA198 -_021DA0BE: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r4, r0, #0 - beq _021DA198 - ldr r5, [r4, #8] - bl sub_0201D35C - mov r1, #0 - str r1, [r5, #0] - mov r1, #3 - add r6, r0, #0 - bl sub_020E2178 - str r1, [sp, #8] - lsl r1, r1, #0x10 - ldr r0, [r4, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - ldr r0, [sp, #8] - mov r1, #0x17 - add r0, r0, #1 - mvn r1, r1 - mul r1, r0 - str r1, [r5, #0x10] - mov r1, #0x18 - mul r1, r0 - add r0, r7, #0 - str r1, [r5, #8] - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x3c - bl sub_020E1F6C - lsl r2, r0, #2 - ldr r0, _021DA1A0 ; =0x021F8CFC - ldr r1, [r5, #0x10] - ldr r0, [r0, r2] - mul r0, r1 - str r0, [r5, #0x10] - add r0, r7, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x3c - bl sub_020E1F6C - lsl r2, r0, #2 - ldr r0, _021DA1A0 ; =0x021F8CFC - ldr r1, [r5, #8] - ldr r0, [r0, r2] - mul r0, r1 - str r0, [r5, #8] - mov r0, #0 - str r0, [r5, #0xc] - mov r0, #3 - and r0, r6 - str r0, [r5, #4] - add r0, r7, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x3c - bl sub_020E1F6C - add r1, r0, #0 - lsl r2, r1, #2 - ldr r1, _021DA1A0 ; =0x021F8CFC - ldr r0, [r5, #4] - ldr r1, [r1, r2] - bl sub_020E1F6C - str r0, [r5, #4] - add r0, sp, #0x10 - add r1, r4, #0 - bl ov5_021D7010 - add r3, sp, #0x10 - ldmia r3!, {r0, r1} - add r2, sp, #0x1c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #0x30 - str r0, [r2, #0] - ldr r0, _021DA1A4 ; =0x000001FF - and r0, r6 - str r0, [sp, #0x1c] - add r0, r6, #0 - bl sub_020E2178 - mov r0, #0 - str r0, [sp, #0x24] - ldr r0, [sp, #0x1c] - sub r1, #0x50 - lsl r0, r0, #0xc - str r0, [sp, #0x1c] - str r1, [sp, #0x20] - lsl r0, r1, #0xc - str r0, [sp, #0x20] - ldr r0, [r4, #4] - add r1, sp, #0x1c - bl ov5_021D630C - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp, #4] - str r1, [sp, #0xc] - cmp r1, r0 - blt _021DA0BE -_021DA198: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DA19C: .word 0x00000B98 -_021DA1A0: .word 0x021F8CFC -_021DA1A4: .word 0x000001FF - thumb_func_end ov5_021DA0A8 - - thumb_func_start ov5_021DA1A8 -ov5_021DA1A8: ; 0x021DA1A8 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - ldr r4, [r5, #8] - bl ov5_021D7010 - add r3, sp, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021DA1D6 - cmp r0, #1 - beq _021DA226 - cmp r0, #2 - beq _021DA238 - add sp, #0x18 - pop {r3, r4, r5, pc} -_021DA1D6: - ldr r0, [r4, #0x10] - ldr r1, [sp, #0xc] - lsl r0, r0, #0xd - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, [r4, #8] - ldr r1, [sp, #0x10] - lsl r0, r0, #0xd - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r0, #2 - str r1, [r4, #0] - ldr r0, [r4, #4] - cmp r1, r0 - ble _021DA21A - bl sub_0201D35C - mov r1, #0xa - bl sub_020E2178 - cmp r1, #5 - bhs _021DA20A - mov r0, #2 - str r0, [r4, #0xc] - b _021DA21A -_021DA20A: - mov r0, #1 - str r0, [r4, #0xc] - mov r0, #4 - str r0, [r4, #0] - ldr r0, [r5, #4] - mov r1, #3 - bl sub_02021E50 -_021DA21A: - ldr r0, [r5, #4] - add r1, sp, #0xc - bl ov5_021D630C - add sp, #0x18 - pop {r3, r4, r5, pc} -_021DA226: - ldr r1, [r4, #0] - sub r0, r1, #1 - str r0, [r4, #0] - cmp r1, #0 - bgt _021DA23E - mov r0, #2 - add sp, #0x18 - str r0, [r4, #0xc] - pop {r3, r4, r5, pc} -_021DA238: - add r0, r5, #0 - bl ov5_021D6FA8 -_021DA23E: - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DA1A8 - - thumb_func_start ov5_021DA244 -ov5_021DA244: ; 0x021DA244 - push {r4, r5, r6, lr} - sub sp, #0x20 - ldr r0, _021DA578 ; =0x00000B98 - add r5, r1, #0 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r5, r2] - ldr r4, [r5, r0] - cmp r2, #5 - bhi _021DA31E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DA264: ; jump table - .short _021DA270 - _021DA264 - 2 ; case 0 - .short _021DA2E4 - _021DA264 - 2 ; case 1 - .short _021DA330 - _021DA264 - 2 ; case 2 - .short _021DA3B2 - _021DA264 - 2 ; case 3 - .short _021DA41A - _021DA264 - 2 ; case 4 - .short _021DA46A - _021DA264 - 2 ; case 5 -_021DA270: - mov r2, #1 - str r2, [sp] - mov r0, #6 - str r0, [sp, #4] - sub r0, r0, #7 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _021DA57C ; =ov5_021DA5A0 - mov r3, #0xc - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] - ldr r0, _021DA580 ; =0x00006F2F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021DA584 ; =0x00003A94 - add r1, r4, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021DA588 ; =0x00000BA4 - lsl r2, r2, #2 - ldrh r0, [r5, r0] - add r1, #0x1c - str r0, [sp, #0xc] - ldr r3, [r5, #0] - add r0, r4, #0 - ldr r2, [r3, r2] - add r0, #0x4c - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] - ldr r0, _021DA58C ; =0x00000BA2 - mov r1, #1 - strh r1, [r5, r0] - b _021DA488 -_021DA2E4: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021DA306 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021DA488 -_021DA306: - ldr r2, _021DA588 ; =0x00000BA4 - add r0, r4, #0 - ldrh r2, [r5, r2] - add r1, r4, #0 - add r0, #0x4c - add r1, #0x1c - bl ov5_021D735C - cmp r0, #1 - bne _021DA31E - cmp r6, #3 - beq _021DA320 -_021DA31E: - b _021DA488 -_021DA320: - ldr r0, _021DA58C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021DA488 -_021DA330: - mov r2, #1 - mov r3, #6 - str r2, [sp] - str r3, [sp, #4] - sub r0, r3, #7 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, _021DA57C ; =ov5_021DA5A0 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov5_021D7210 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] - ldr r0, _021DA588 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021DA38E - mov r0, #0x41 - ldr r1, [r5, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021DA580 ; =0x00006F2F - ldr r0, [r0, #0x48] - ldr r3, _021DA584 ; =0x00003A94 - mov r1, #3 - str r0, [r4, #0x1c] - bl ov5_021D7384 - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74D4 -_021DA38E: - mov r0, #0x10 - str r0, [sp] - ldr r0, _021DA590 ; =ov5_021DA6BC - ldr r1, _021DA57C ; =ov5_021DA5A0 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x14 - mov r3, #2 - bl ov5_021D7568 - ldr r0, _021DA58C ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021DA488 -_021DA3B2: - mov r0, #6 - ldrsh r1, [r4, r0] - sub r0, r1, #1 - strh r0, [r4, #6] - cmp r1, #0 - bgt _021DA3CE - mov r1, #4 - ldrsh r1, [r4, r1] - add r0, r5, #0 - bl ov5_021DA5A0 - mov r0, #8 - ldrsh r0, [r4, r0] - strh r0, [r4, #6] -_021DA3CE: - ldr r0, _021DA594 ; =0x00000BA6 - ldrh r0, [r5, r0] - cmp r0, #5 - bne _021DA488 - mov r0, #0 - mvn r0, r0 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0xc - mov r3, #1 - bl ov5_021D7238 - ldr r0, _021DA588 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021DA3FC - add r0, r4, #0 - add r0, #0x1c - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021DA3FC: - add r0, r4, #0 - mov r1, #9 - add r0, #0xb4 - str r1, [r0, #0] - ldr r1, _021DA58C ; =0x00000BA2 - mov r0, #4 - strh r0, [r5, r1] - add r1, r4, #0 - mov r2, #1 - add r1, #0xc8 - str r2, [r1, #0] - mov r1, #0 - bl sub_0201FF0C - b _021DA488 -_021DA41A: - add r0, r4, #0 - bl ov5_021D7244 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #0 - ble _021DA43C - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021DA488 -_021DA43C: - ldr r0, _021DA588 ; =0x00000BA4 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021DA44E - add r0, r4, #0 - add r0, #0x1c - bl ov5_021D74B8 - b _021DA450 -_021DA44E: - mov r0, #1 -_021DA450: - cmp r0, #1 - bne _021DA488 - cmp r6, #3 - bne _021DA488 - add r0, r5, #0 - ldr r1, [r5, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021DA488 - ldr r0, _021DA58C ; =0x00000BA2 - mov r1, #5 - strh r1, [r5, r0] - b _021DA488 -_021DA46A: - add r0, #0xc - ldrh r0, [r5, r0] - cmp r0, #0 - beq _021DA482 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x1c] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021DA482: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021DA488: - ldr r0, _021DA58C ; =0x00000BA2 - ldrh r0, [r5, r0] - cmp r0, #5 - beq _021DA574 - cmp r0, #0 - beq _021DA574 - add r0, r5, #0 - ldr r1, _021DA590 ; =ov5_021DA6BC - add r0, #0xc - bl ov5_021D6FF0 - add r0, r5, #0 - add r1, sp, #0x1c - add r2, sp, #0x18 - bl ov5_021D717C - add r0, r5, #0 - bl ov5_021D700C - add r0, r4, #0 - add r0, #0xbc - ldr r1, [r0, #0] - asr r0, r1, #0x10 - lsl r0, r0, #0x10 - asr r2, r0, #0x10 - lsl r0, r1, #0x10 - ldr r1, [sp, #0x1c] - asr r0, r0, #0x10 - add r1, r2, r1 - lsl r1, r1, #0x10 - ldr r2, [sp, #0x18] - asr r5, r1, #0x10 - lsl r1, r2, #2 - add r1, r2, r1 - sub r0, r0, r1 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - cmp r5, #0 - bge _021DA4E2 - mov r1, #1 - lsl r1, r1, #8 - add r1, r5, r1 - lsl r1, r1, #0x10 - asr r5, r1, #0x10 - b _021DA4F0 -_021DA4E2: - mov r1, #1 - lsl r1, r1, #8 - cmp r5, r1 - blt _021DA4F0 - sub r1, r5, r1 - lsl r1, r1, #0x10 - asr r5, r1, #0x10 -_021DA4F0: - cmp r0, #0 - bge _021DA4FE - mov r1, #2 - lsl r1, r1, #0xa - add r0, r0, r1 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 -_021DA4FE: - add r1, r4, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r2, r1, #2 - add r1, r4, #0 - add r1, #0xc4 - str r2, [r1, #0] - add r1, r4, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - cmp r1, #0x3c - ble _021DA530 - add r1, r4, #0 - add r5, #0x20 - mov r2, #0 - add r1, #0xc4 - str r2, [r1, #0] - lsr r3, r5, #0x1f - lsl r2, r5, #0x18 - sub r2, r2, r3 - mov r1, #0x18 - ror r2, r1 - add r1, r3, r2 - lsl r1, r1, #0x10 - asr r5, r1, #0x10 -_021DA530: - add r0, r0, #2 - lsr r2, r0, #0x1f - lsl r1, r0, #0x15 - sub r1, r1, r2 - mov r0, #0x15 - ror r1, r0 - add r0, r2, r1 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - neg r0, r6 - mov r1, #5 - bl sub_020E1F6C - ldr r2, _021DA598 ; =0x000001FF - add r1, r5, #0 - lsl r3, r0, #0x10 - lsl r0, r2, #0x10 - and r1, r2 - and r0, r3 - orr r1, r0 - ldr r0, _021DA59C ; =0x04000018 - str r1, [r0, #0] - add r0, r4, #0 - lsl r1, r5, #0x10 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - ldr r1, [r0, #0] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - orr r0, r1 - add r4, #0xbc - str r0, [r4, #0] -_021DA574: - add sp, #0x20 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DA578: .word 0x00000B98 -_021DA57C: .word ov5_021DA5A0 -_021DA580: .word 0x00006F2F -_021DA584: .word 0x00003A94 -_021DA588: .word 0x00000BA4 -_021DA58C: .word 0x00000BA2 -_021DA590: .word ov5_021DA6BC -_021DA594: .word 0x00000BA6 -_021DA598: .word 0x000001FF -_021DA59C: .word 0x04000018 - thumb_func_end ov5_021DA244 - - thumb_func_start ov5_021DA5A0 -ov5_021DA5A0: ; 0x021DA5A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r7, r1, #0 - ldr r1, _021DA6B4 ; =0x00000B98 - str r0, [sp] - ldr r0, [r0, r1] - str r0, [sp, #0x10] - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021DA5B8 - lsl r7, r7, #1 -_021DA5B8: - mov r6, #0 - cmp r7, #0 - ble _021DA6AE - ldr r0, [sp, #0x10] - str r0, [sp, #0xc] - add r0, #0xb8 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - str r0, [sp, #8] - add r0, #0xc8 - str r0, [sp, #8] - lsr r0, r7, #0x1f - add r0, r7, r0 - asr r0, r0, #1 - str r0, [sp, #4] -_021DA5D6: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r4, r0, #0 - beq _021DA6AE - ldr r5, [r4, #8] - bl sub_0201D35C - mov r1, #3 - and r1, r0 - lsl r1, r1, #0x10 - ldr r0, [r4, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - mov r0, #0xa - str r0, [r5, #0x10] - mov r0, #0 - str r0, [r5, #0x14] - bl sub_0201D35C - lsr r1, r0, #0x1f - lsl r2, r0, #0x1f - sub r2, r2, r1 - mov r0, #0x1f - ror r2, r0 - add r0, r1, r2 - bne _021DA614 - mov r0, #1 - b _021DA618 -_021DA614: - mov r0, #0 - mvn r0, r0 -_021DA618: - str r0, [r5, #4] - bl sub_0201D35C - mov r0, #1 - str r0, [r5, #0xc] - ldr r0, [sp, #0xc] - str r0, [r5, #0] - ldr r0, [sp, #8] - str r0, [r5, #0x18] - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - add r1, #0xa - str r1, [r5, #0x1c] - add r0, sp, #0x14 - add r1, r4, #0 - bl ov5_021D7010 - add r3, sp, #0x14 - ldmia r3!, {r0, r1} - add r2, sp, #0x20 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bl sub_0201D35C - ldr r1, _021DA6B8 ; =0x0000019E - bl sub_020E2178 - ldr r0, [sp, #0x10] - sub r1, #0x20 - str r1, [sp, #0x20] - add r0, #0xb8 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021DA67E - ldr r0, [sp, #4] - cmp r6, r0 - blt _021DA67E - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - mov r0, #0x27 - mvn r0, r0 - sub r0, r0, r1 - str r0, [sp, #0x24] - b _021DA690 -_021DA67E: - bl sub_0201D35C - mov r1, #0x14 - bl sub_020E2178 - mov r0, #7 - mvn r0, r0 - sub r0, r0, r1 - str r0, [sp, #0x24] -_021DA690: - ldr r0, [sp, #0x20] - add r1, sp, #0x20 - lsl r0, r0, #0xc - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - lsl r0, r0, #0xc - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp, #0x28] - ldr r0, [r4, #4] - bl ov5_021D630C - add r6, r6, #1 - cmp r6, r7 - blt _021DA5D6 -_021DA6AE: - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021DA6B4: .word 0x00000B98 -_021DA6B8: .word 0x0000019E - thumb_func_end ov5_021DA5A0 - - thumb_func_start ov5_021DA6BC -ov5_021DA6BC: ; 0x021DA6BC - push {r4, r5, r6, lr} - sub sp, #0x18 - add r6, r0, #0 - add r0, sp, #0 - add r1, r6, #0 - ldr r4, [r6, #8] - bl ov5_021D7010 - add r5, sp, #0 - add r3, sp, #0xc - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r5, #0 - str r0, [r3, #0] - ldr r1, [r4, #0x14] - ldr r0, [r4, #0xc] - cmp r1, r0 - blt _021DA6F8 - mov r0, #1 - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x10] - str r5, [r4, #0x14] - ldr r0, [r6, #4] - add r1, r2, #0 - bl ov5_021D630C -_021DA6F8: - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - ldr r0, [sp, #0x10] - asr r0, r0, #0xc - str r0, [sp, #0x10] - ldr r0, [r4, #0x18] - ldr r0, [r0, #0] - cmp r0, #1 - bne _021DA718 - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - cmp r0, #0 - bgt _021DA718 - mov r5, #1 -_021DA718: - ldr r1, [sp, #0x10] - ldr r0, _021DA744 ; =0xFFFFFEE4 - cmp r1, r0 - bge _021DA726 - sub r0, #0xc - cmp r1, r0 - bgt _021DA72E -_021DA726: - cmp r1, #0xd4 - ble _021DA730 - cmp r1, #0xe8 - bge _021DA730 -_021DA72E: - mov r5, #1 -_021DA730: - cmp r5, #1 - bne _021DA740 - ldr r0, [r4, #0] - mov r1, #1 - str r1, [r0, #0] - add r0, r6, #0 - bl ov5_021D6FA8 -_021DA740: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DA744: .word 0xFFFFFEE4 - thumb_func_end ov5_021DA6BC - - thumb_func_start ov5_021DA748 -ov5_021DA748: ; 0x021DA748 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _021DA88C ; =0x00000B98 - add r5, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r5, r1] - ldr r4, [r5, r0] - cmp r1, #5 - bls _021DA75C - b _021DA88A -_021DA75C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DA768: ; jump table - .short _021DA774 - _021DA768 - 2 ; case 0 - .short _021DA774 - _021DA768 - 2 ; case 1 - .short _021DA774 - _021DA768 - 2 ; case 2 - .short _021DA792 - _021DA768 - 2 ; case 3 - .short _021DA87C - _021DA768 - 2 ; case 4 - .short _021DA884 - _021DA768 - 2 ; case 5 -_021DA774: - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #0x10] - mov r1, #0x1f - str r0, [r4, #4] - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DA890 ; =0x00000BA2 - mov r1, #3 - strh r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DA792: - ldr r0, [r4, #0x10] - cmp r0, #0 - blt _021DA79E - sub r0, r0, #1 - str r0, [r4, #0x10] - b _021DA86C -_021DA79E: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021DA7AE - cmp r0, #1 - beq _021DA7F0 - cmp r0, #2 - beq _021DA818 - b _021DA86C -_021DA7AE: - mov r0, #1 - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0x14] - bl sub_0201D35C - mov r1, #0x1e - lsl r1, r1, #4 - bl sub_020E2178 - add r1, #0xc8 - str r1, [r4, #0x18] - mov r0, #0 - str r0, [r4, #0x1c] - bl sub_0201D35C - mov r1, #3 - bl sub_020E2178 - cmp r1, #0 - beq _021DA7E4 - mov r0, #0x24 - str r0, [r4, #8] - ldr r0, _021DA894 ; =0x0000063D - bl sub_02005748 - b _021DA86C -_021DA7E4: - mov r0, #0xc8 - str r0, [r4, #8] - ldr r0, _021DA898 ; =0x0000063C - bl sub_02005748 - b _021DA86C -_021DA7F0: - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - ldr r1, [r4, #0x1c] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [r4, #0x1c] - ldr r0, [r4, #0x14] - cmp r0, #2 - blt _021DA808 - mov r0, #2 - str r0, [r4, #4] -_021DA808: - ldr r0, [r4, #0x1c] - mov r1, #0x64 - bl sub_020E1F6C - mov r1, #0x1f - bl ov5_021D64E4 - b _021DA86C -_021DA818: - ldr r1, [r4, #0x1c] - ldr r0, [r4, #8] - sub r0, r1, r0 - str r0, [r4, #0x1c] - cmp r0, #0 - bgt _021DA85E - mov r0, #0 - str r0, [r4, #4] - str r0, [r4, #0x1c] - ldr r0, [r4, #8] - cmp r0, #0xc8 - bne _021DA83E - bl sub_0201D35C - mov r1, #0xf - bl sub_020E2178 - str r1, [r4, #0x10] - b _021DA85E -_021DA83E: - bl sub_0201D35C - add r7, r0, #0 - ldr r1, [r4, #0x18] - mov r0, #0x32 - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - add r6, r0, #0 - add r0, r7, #0 - mov r1, #0x78 - bl sub_020E2178 - add r0, r6, r1 - str r0, [r4, #0x10] -_021DA85E: - ldr r0, [r4, #0x1c] - mov r1, #0x64 - bl sub_020E1F6C - mov r1, #0x1f - bl ov5_021D64E4 -_021DA86C: - ldr r0, _021DA89C ; =0x00000BA6 - ldrh r1, [r5, r0] - cmp r1, #5 - bne _021DA88A - mov r1, #4 - sub r0, r0, #4 - strh r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DA87C: - mov r1, #5 - add r0, #0xa - strh r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DA884: - ldr r0, [r5, #4] - bl ov5_021D69B8 -_021DA88A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DA88C: .word 0x00000B98 -_021DA890: .word 0x00000BA2 -_021DA894: .word 0x0000063D -_021DA898: .word 0x0000063C -_021DA89C: .word 0x00000BA6 - thumb_func_end ov5_021DA748 - - thumb_func_start ov5_021DA8A0 -ov5_021DA8A0: ; 0x021DA8A0 - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r0, _021DA9C8 ; =0x00000B98 - add r4, r1, #0 - ldr r5, [r4, r0] - add r0, #0xa - ldrh r0, [r4, r0] - cmp r0, #5 - bhi _021DA99E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DA8BE: ; jump table - .short _021DA8CA - _021DA8BE - 2 ; case 0 - .short _021DA8F2 - _021DA8BE - 2 ; case 1 - .short _021DA904 - _021DA8BE - 2 ; case 2 - .short _021DA93E - _021DA8BE - 2 ; case 3 - .short _021DA97C - _021DA8BE - 2 ; case 4 - .short _021DA998 - _021DA8BE - 2 ; case 5 -_021DA8CA: - mov r0, #4 - str r0, [sp] - mov r0, #0xf - str r0, [sp, #4] - sub r0, #0x11 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r2, #1 - ldr r0, _021DA9CC ; =ov5_021DA9DC - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r5, #0 - mov r3, #0x23 - bl ov5_021D7210 - ldr r0, _021DA9D0 ; =0x00000BA2 - mov r1, #1 - strh r1, [r4, r0] - b _021DA99E -_021DA8F2: - add r0, r5, #0 - bl ov5_021D7244 - cmp r0, #3 - bne _021DA99E - ldr r0, _021DA9D0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021DA99E -_021DA904: - mov r0, #0xf - str r0, [sp] - str r0, [sp, #4] - sub r0, #0x11 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r2, #1 - ldr r0, _021DA9CC ; =ov5_021DA9DC - str r2, [sp, #0x10] - str r0, [sp, #0x14] - add r0, r5, #0 - mov r3, #4 - bl ov5_021D7210 - mov r0, #1 - str r0, [sp] - ldr r0, _021DA9D4 ; =ov5_021DAADC - ldr r1, _021DA9CC ; =ov5_021DA9DC - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x10 - mov r3, #2 - bl ov5_021D7568 - ldr r0, _021DA9D0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021DA99E -_021DA93E: - mov r0, #6 - ldrsh r1, [r5, r0] - sub r0, r1, #1 - strh r0, [r5, #6] - cmp r1, #0 - bgt _021DA95A - mov r1, #4 - ldrsh r1, [r5, r1] - add r0, r4, #0 - bl ov5_021DA9DC - mov r0, #8 - ldrsh r0, [r5, r0] - strh r0, [r5, #6] -_021DA95A: - ldr r0, _021DA9D8 ; =0x00000BA6 - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021DA99E - mov r0, #2 - mvn r0, r0 - str r0, [sp] - add r0, r5, #0 - mov r1, #0 - mov r2, #0x23 - mov r3, #2 - bl ov5_021D7238 - ldr r0, _021DA9D0 ; =0x00000BA2 - mov r1, #4 - strh r1, [r4, r0] - b _021DA99E -_021DA97C: - add r0, r5, #0 - bl ov5_021D7244 - cmp r0, #3 - bne _021DA99E - add r0, r4, #0 - ldr r1, [r4, #0x40] - add r0, #0xc - cmp r1, r0 - bne _021DA99E - ldr r0, _021DA9D0 ; =0x00000BA2 - mov r1, #5 - strh r1, [r4, r0] - b _021DA99E -_021DA998: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DA99E: - ldr r0, _021DA9D0 ; =0x00000BA2 - ldrh r0, [r4, r0] - cmp r0, #5 - beq _021DA9C4 - cmp r0, #0 - beq _021DA9C4 - add r0, r4, #0 - ldr r1, _021DA9D4 ; =ov5_021DAADC - add r0, #0xc - bl ov5_021D6FF0 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov5_021D717C - add r0, r4, #0 - bl ov5_021D700C -_021DA9C4: - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DA9C8: .word 0x00000B98 -_021DA9CC: .word ov5_021DA9DC -_021DA9D0: .word 0x00000BA2 -_021DA9D4: .word ov5_021DAADC -_021DA9D8: .word 0x00000BA6 - thumb_func_end ov5_021DA8A0 - - thumb_func_start ov5_021DA9DC -ov5_021DA9DC: ; 0x021DA9DC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - add r0, r1, #0 - mov r7, #0 - str r1, [sp, #4] - cmp r0, #0 - ble _021DAAD2 -_021DA9EC: - ldr r0, [sp] - mov r1, #0x20 - bl ov5_021D6F00 - add r5, r0, #0 - beq _021DAAD2 - ldr r4, [r5, #8] - bl sub_0201D35C - mov r1, #0xe - bl sub_020E2178 - add r6, r1, #0 - lsl r1, r6, #0x10 - ldr r0, [r5, #4] - lsr r1, r1, #0x10 - bl sub_02021E50 - asr r0, r6, #1 - lsr r0, r0, #0x1e - add r0, r6, r0 - asr r6, r0, #2 - bl sub_0201D35C - mov r1, #0x19 - bl sub_020E2178 - add r2, r1, #0 - add r2, #8 - add r1, r6, #1 - add r0, r2, #0 - mul r0, r1 - str r0, [r4, #0] - mov r0, #0x10 - bl sub_020E1F6C - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #8] - bl sub_0201D35C - mov r1, #1 - and r0, r1 - str r0, [r4, #0xc] - add r0, r1, #0 - str r0, [r4, #0x10] - add r0, r6, #1 - cmp r0, #4 - bhi _021DAAB2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DAA5A: ; jump table - .short _021DAAB2 - _021DAA5A - 2 ; case 0 - .short _021DAA64 - _021DAA5A - 2 ; case 1 - .short _021DAA64 - _021DAA5A - 2 ; case 2 - .short _021DAA80 - _021DAA5A - 2 ; case 3 - .short _021DAA9A - _021DAA5A - 2 ; case 4 -_021DAA64: - bl sub_0201D35C - ldr r1, _021DAAD8 ; =0x000001FF - and r0, r1 - sub r0, #0x80 - str r0, [sp, #8] - bl sub_0201D35C - mov r1, #0xc0 - bl sub_020E2178 - add r1, #8 - str r1, [sp, #0xc] - b _021DAAB2 -_021DAA80: - bl sub_0201D35C - ldr r1, _021DAAD8 ; =0x000001FF - and r0, r1 - sub r0, #0x80 - str r0, [sp, #8] - bl sub_0201D35C - mov r1, #0x7f - and r0, r1 - add r0, #0x40 - str r0, [sp, #0xc] - b _021DAAB2 -_021DAA9A: - bl sub_0201D35C - ldr r1, _021DAAD8 ; =0x000001FF - and r0, r1 - sub r0, #0x80 - str r0, [sp, #8] - bl sub_0201D35C - mov r1, #0x1f - and r0, r1 - add r0, #0xa0 - str r0, [sp, #0xc] -_021DAAB2: - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #8] - add r1, sp, #8 - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [sp, #0xc] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - ldr r0, [r5, #4] - bl ov5_021D630C - ldr r0, [sp, #4] - add r7, r7, #1 - cmp r7, r0 - blt _021DA9EC -_021DAAD2: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DAAD8: .word 0x000001FF - thumb_func_end ov5_021DA9DC - - thumb_func_start ov5_021DAADC -ov5_021DAADC: ; 0x021DAADC - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - ldr r4, [r5, #8] - bl ov5_021D7010 - add r3, sp, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [r4, #8] - ldr r0, [r4, #4] - add r0, r1, r0 - str r0, [r4, #8] - ldr r0, [r4, #0] - cmp r0, #0 - ble _021DAB1C - sub r0, r0, #1 - str r0, [r4, #0] - ldr r0, [r4, #8] - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x10] - b _021DAB2C -_021DAB1C: - ldr r0, [r4, #8] - mov r1, #0x32 - bl sub_020E1F6C - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x10] -_021DAB2C: - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #0 - bgt _021DAB58 - mov r0, #1 - str r0, [r4, #0x10] - ldr r1, [r4, #0xc] - cmp r1, #0 - bne _021DAB4C - ldr r2, [sp, #0xc] - lsl r1, r0, #0xd - add r1, r2, r1 - str r1, [sp, #0xc] - str r0, [r4, #0xc] - b _021DAB58 -_021DAB4C: - ldr r1, [sp, #0xc] - lsl r0, r0, #0xd - sub r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [r4, #0xc] -_021DAB58: - ldr r0, [r5, #4] - add r1, sp, #0xc - bl ov5_021D630C - ldr r0, [sp, #0x10] - asr r1, r0, #0xc - mov r0, #0xf - mvn r0, r0 - cmp r1, r0 - bgt _021DAB72 - add r0, r5, #0 - bl ov5_021D6FA8 -_021DAB72: - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DAADC - - thumb_func_start ov5_021DAB78 -ov5_021DAB78: ; 0x021DAB78 - push {r4, r5, r6, lr} - ldr r0, _021DAC5C ; =0x00000B98 - add r4, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r4, r1] - ldr r5, [r4, r0] - cmp r1, #5 - bhi _021DAC58 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DAB96: ; jump table - .short _021DABA2 - _021DAB96 - 2 ; case 0 - .short _021DABD4 - _021DAB96 - 2 ; case 1 - .short _021DABF2 - _021DAB96 - 2 ; case 2 - .short _021DAC18 - _021DAB96 - 2 ; case 3 - .short _021DAC34 - _021DAB96 - 2 ; case 4 - .short _021DAC52 - _021DAB96 - 2 ; case 5 -_021DABA2: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x10 - mov r3, #8 - bl ov5_021D64FC - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - ldr r1, _021DAC60 ; =0x0400000C - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #3 - orr r0, r2 - strh r0, [r1] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DAC64 ; =0x00000BA2 - mov r1, #1 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DABD4: - add r0, r5, #0 - bl ov5_021D650C - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021DAC58 - ldr r0, _021DAC64 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DABF2: - mov r0, #0x10 - mov r1, #0 - bl ov5_021D64E4 - ldr r1, _021DAC60 ; =0x0400000C - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #3 - orr r0, r2 - strh r0, [r1] - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DAC64 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DAC18: - add r0, #0xe - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021DAC58 - add r0, r5, #0 - mov r1, #0x10 - mov r2, #0 - mov r3, #8 - bl ov5_021D64FC - ldr r0, _021DAC64 ; =0x00000BA2 - mov r1, #4 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DAC34: - add r0, r5, #0 - bl ov5_021D650C - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021DAC58 - ldr r0, _021DAC64 ; =0x00000BA2 - mov r1, #5 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DAC52: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DAC58: - pop {r4, r5, r6, pc} - nop -_021DAC5C: .word 0x00000B98 -_021DAC60: .word 0x0400000C -_021DAC64: .word 0x00000BA2 - thumb_func_end ov5_021DAB78 - - thumb_func_start ov5_021DAC68 -ov5_021DAC68: ; 0x021DAC68 - push {r4, r5, r6, lr} - ldr r0, _021DAD30 ; =0x00000B98 - add r4, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r4, r1] - ldr r5, [r4, r0] - cmp r1, #5 - bhi _021DAD2C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DAC86: ; jump table - .short _021DAC92 - _021DAC86 - 2 ; case 0 - .short _021DACB6 - _021DAC86 - 2 ; case 1 - .short _021DACD4 - _021DAC86 - 2 ; case 2 - .short _021DACEC - _021DAC86 - 2 ; case 3 - .short _021DAD08 - _021DAC86 - 2 ; case 4 - .short _021DAD26 - _021DAC86 - 2 ; case 5 -_021DAC92: - add r0, r5, #0 - mov r1, #0 - mov r2, #4 - mov r3, #8 - bl ov5_021D64FC - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DAD34 ; =0x00000BA2 - mov r1, #1 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DACB6: - add r0, r5, #0 - bl ov5_021D650C - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #0 - beq _021DAD2C - ldr r0, _021DAD34 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DACD4: - mov r0, #4 - mov r1, #0xc - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DAD34 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DACEC: - add r0, #0xe - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021DAD2C - add r0, r5, #0 - mov r1, #4 - mov r2, #0 - mov r3, #8 - bl ov5_021D64FC - ldr r0, _021DAD34 ; =0x00000BA2 - mov r1, #4 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DAD08: - add r0, r5, #0 - bl ov5_021D650C - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #0 - beq _021DAD2C - ldr r0, _021DAD34 ; =0x00000BA2 - mov r1, #5 - strh r1, [r4, r0] - pop {r4, r5, r6, pc} -_021DAD26: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DAD2C: - pop {r4, r5, r6, pc} - nop -_021DAD30: .word 0x00000B98 -_021DAD34: .word 0x00000BA2 - thumb_func_end ov5_021DAC68 - - thumb_func_start ov5_021DAD38 -ov5_021DAD38: ; 0x021DAD38 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r0, _021DAEB4 ; =0x00000B98 - add r4, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r4, r1] - ldr r5, [r4, r0] - cmp r1, #5 - bls _021DAD4E - b _021DAEB0 -_021DAD4E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DAD5A: ; jump table - .short _021DAD66 - _021DAD5A - 2 ; case 0 - .short _021DADB6 - _021DAD5A - 2 ; case 1 - .short _021DADE4 - _021DAD5A - 2 ; case 2 - .short _021DAE24 - _021DAD5A - 2 ; case 3 - .short _021DAE58 - _021DAD5A - 2 ; case 4 - .short _021DAE92 - _021DAD5A - 2 ; case 5 -_021DAD66: - ldr r1, _021DAEB8 ; =0x0000764F - mov r2, #0x41 - str r1, [sp] - mov r1, #0 - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - add r0, #0xc - ldrh r0, [r4, r0] - add r1, r5, #0 - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r0, #0x44 - ldr r2, [r2, #0x48] - add r1, #0x14 - mov r3, #7 - bl ov5_021D7308 - add r0, r5, #0 - mov r1, #0 - mov r2, #9 - mov r3, #0x1e - bl ov5_021D64FC - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DAEBC ; =0x00000BA2 - mov r1, #1 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DADB6: - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021D650C - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021DAEB0 - cmp r7, #1 - bne _021DAEB0 - ldr r0, _021DAEBC ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DADE4: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAE0A - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021DAEB8 ; =0x0000764F - ldr r0, [r0, #0x48] - mov r1, #7 - mov r3, #0 - str r0, [r5, #0x14] - bl ov5_021D7384 - add r5, #0x14 - add r0, r5, #0 - bl ov5_021D74D4 -_021DAE0A: - mov r0, #9 - mov r1, #7 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DAEBC ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAE24: - add r1, r0, #0 - add r1, #0xe - ldrh r1, [r4, r1] - cmp r1, #5 - bne _021DAEB0 - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAE42 - add r0, r5, #0 - add r0, #0x14 - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021DAE42: - add r0, r5, #0 - mov r1, #9 - mov r2, #0 - mov r3, #0x1e - bl ov5_021D64FC - ldr r0, _021DAEBC ; =0x00000BA2 - mov r1, #4 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAE58: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAE6C - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r6, r0, #0 - b _021DAE6E -_021DAE6C: - mov r6, #1 -_021DAE6E: - add r0, r5, #0 - bl ov5_021D650C - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021DAEB0 - cmp r7, #1 - bne _021DAEB0 - ldr r0, _021DAEBC ; =0x00000BA2 - mov r1, #5 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAE92: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAEAA - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0x14] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021DAEAA: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DAEB0: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DAEB4: .word 0x00000B98 -_021DAEB8: .word 0x0000764F -_021DAEBC: .word 0x00000BA2 - thumb_func_end ov5_021DAD38 - - thumb_func_start ov5_021DAEC0 -ov5_021DAEC0: ; 0x021DAEC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r0, _021DB03C ; =0x00000B98 - add r4, r1, #0 - add r1, r0, #0 - add r1, #0xa - ldrh r1, [r4, r1] - ldr r5, [r4, r0] - cmp r1, #5 - bls _021DAED6 - b _021DB038 -_021DAED6: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DAEE2: ; jump table - .short _021DAEEE - _021DAEE2 - 2 ; case 0 - .short _021DAF3E - _021DAEE2 - 2 ; case 1 - .short _021DAF6C - _021DAEE2 - 2 ; case 2 - .short _021DAFAC - _021DAEE2 - 2 ; case 3 - .short _021DAFE0 - _021DAEE2 - 2 ; case 4 - .short _021DB01A - _021DAEE2 - 2 ; case 5 -_021DAEEE: - ldr r1, _021DB040 ; =0x00007555 - mov r2, #0x41 - str r1, [sp] - ldr r1, _021DB044 ; =0x00007FFF - add r0, #0xc - str r1, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - ldrh r0, [r4, r0] - add r1, r5, #0 - lsl r2, r2, #2 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r0, #0x44 - ldr r2, [r2, #0x48] - add r1, #0x14 - mov r3, #6 - bl ov5_021D7308 - add r0, r5, #0 - mov r1, #0 - mov r2, #9 - mov r3, #0x1e - bl ov5_021D64FC - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DB048 ; =0x00000BA2 - mov r1, #1 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAF3E: - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021D650C - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021DB038 - cmp r7, #1 - bne _021DB038 - ldr r0, _021DB048 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAF6C: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAF92 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021DB040 ; =0x00007555 - ldr r0, [r0, #0x48] - ldr r3, _021DB044 ; =0x00007FFF - mov r1, #6 - str r0, [r5, #0x14] - bl ov5_021D7384 - add r5, #0x14 - add r0, r5, #0 - bl ov5_021D74D4 -_021DAF92: - mov r0, #9 - mov r1, #7 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DB048 ; =0x00000BA2 - mov r1, #3 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAFAC: - add r1, r0, #0 - add r1, #0xe - ldrh r1, [r4, r1] - cmp r1, #5 - bne _021DB038 - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAFCA - add r0, r5, #0 - add r0, #0x14 - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021DAFCA: - add r0, r5, #0 - mov r1, #9 - mov r2, #0 - mov r3, #0x1e - bl ov5_021D64FC - ldr r0, _021DB048 ; =0x00000BA2 - mov r1, #4 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DAFE0: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DAFF4 - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r6, r0, #0 - b _021DAFF6 -_021DAFF4: - mov r6, #1 -_021DAFF6: - add r0, r5, #0 - bl ov5_021D650C - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, #1 - bne _021DB038 - cmp r7, #1 - bne _021DB038 - ldr r0, _021DB048 ; =0x00000BA2 - mov r1, #5 - add sp, #0x10 - strh r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_021DB01A: - add r0, #0xc - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DB032 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0x14] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021DB032: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DB038: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB03C: .word 0x00000B98 -_021DB040: .word 0x00007555 -_021DB044: .word 0x00007FFF -_021DB048: .word 0x00000BA2 - thumb_func_end ov5_021DAEC0 - - thumb_func_start ov5_021DB04C -ov5_021DB04C: ; 0x021DB04C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r1, [r1, r0] - ldr r0, _021DB13C ; =0x00000B98 - add r2, r0, #0 - add r2, #0xa - ldrh r2, [r4, r2] - ldr r5, [r4, r0] - cmp r2, #5 - bhi _021DB138 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021DB074: ; jump table - .short _021DB080 - _021DB074 - 2 ; case 0 - .short _021DB0AA - _021DB074 - 2 ; case 1 - .short _021DB0CC - _021DB074 - 2 ; case 2 - .short _021DB0DE - _021DB074 - 2 ; case 3 - .short _021DB110 - _021DB074 - 2 ; case 4 - .short _021DB12C - _021DB074 - 2 ; case 5 -_021DB080: - ldr r1, [r1, #4] - add r0, r5, #0 - ldr r1, [r1, #0x1c] - bl ov5_021DB614 - mov r0, #0x54 - mov r1, #1 - str r0, [sp] - mov r0, #0x1e - lsl r1, r1, #0x14 - str r0, [sp, #4] - add r0, r5, #0 - lsr r2, r1, #3 - mov r3, #0x80 - bl ov5_021DB6E0 - ldr r0, _021DB140 ; =0x00000BA2 - mov r1, #1 - add sp, #8 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021DB0AA: - add r0, r5, #0 - bl ov5_021DB700 - cmp r0, #1 - bne _021DB138 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - bl ov5_021DB7A4 - ldr r0, _021DB140 ; =0x00000BA2 - mov r1, #3 - add sp, #8 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021DB0CC: - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DB140 ; =0x00000BA2 - mov r1, #3 - add sp, #8 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021DB0DE: - add r0, #0xe - ldrh r0, [r4, r0] - cmp r0, #5 - bne _021DB138 - ldr r1, [r1, #4] - add r0, r5, #0 - ldr r1, [r1, #0x1c] - bl ov5_021DB614 - mov r0, #0x54 - mov r1, #2 - str r0, [sp] - mov r0, #0x1e - lsl r1, r1, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - lsl r2, r1, #3 - mov r3, #0x80 - bl ov5_021DB6E0 - ldr r0, _021DB140 ; =0x00000BA2 - mov r1, #4 - add sp, #8 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021DB110: - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl ov5_021DB700 - cmp r0, #1 - bne _021DB138 - ldr r0, _021DB140 ; =0x00000BA2 - mov r1, #5 - add sp, #8 - strh r1, [r4, r0] - pop {r3, r4, r5, pc} -_021DB12C: - add r0, r5, #0 - bl ov5_021DB690 - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DB138: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DB13C: .word 0x00000B98 -_021DB140: .word 0x00000BA2 - thumb_func_end ov5_021DB04C - - thumb_func_start ov5_021DB144 -ov5_021DB144: ; 0x021DB144 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - ldr r2, _021DB390 ; =0x00000B98 - add r4, r1, #0 - add r0, r2, #0 - add r0, #0xa - ldrh r0, [r4, r0] - ldr r5, [r4, r2] - cmp r0, #5 - bls _021DB15A - b _021DB2D4 -_021DB15A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DB166: ; jump table - .short _021DB172 - _021DB166 - 2 ; case 0 - .short _021DB1D4 - _021DB166 - 2 ; case 1 - .short _021DB208 - _021DB166 - 2 ; case 2 - .short _021DB25A - _021DB166 - 2 ; case 3 - .short _021DB28A - _021DB166 - 2 ; case 4 - .short _021DB2B6 - _021DB166 - 2 ; case 5 -_021DB172: - add r0, r5, #0 - mov r1, #0 - mov r2, #7 - mov r3, #8 - bl ov5_021D64FC - mov r0, #0 - mov r1, #0x10 - bl ov5_021D64E4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021DB394 ; =0x0000692F - mov r2, #0x41 - str r0, [sp] - ldr r0, _021DB398 ; =0x00007FFF - add r1, r5, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, _021DB39C ; =0x00000BA4 - lsl r2, r2, #2 - ldrh r0, [r4, r0] - add r1, #0x14 - str r0, [sp, #0xc] - ldr r3, [r4, #0] - add r0, r5, #0 - ldr r2, [r3, r2] - add r0, #0x44 - ldr r2, [r2, #0x48] - mov r3, #3 - bl ov5_021D7308 - add r0, r5, #0 - mov r1, #0 - add r0, #0xac - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb4 - strh r1, [r0] - ldr r0, _021DB3A0 ; =0x00000BA2 - mov r1, #1 - strh r1, [r4, r0] - b _021DB2D4 -_021DB1D4: - add r2, #0xc - ldrh r2, [r4, r2] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x44 - add r1, #0x14 - bl ov5_021D735C - add r7, r0, #0 - add r0, r5, #0 - bl ov5_021D650C - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, r7 - bne _021DB2D4 - cmp r6, #1 - bne _021DB2D4 - ldr r0, _021DB3A0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021DB2D4 -_021DB208: - mov r0, #7 - mov r1, #9 - bl ov5_021D64E4 - ldr r0, _021DB39C ; =0x00000BA4 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DB236 - mov r0, #0x41 - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, _021DB394 ; =0x0000692F - ldr r0, [r0, #0x48] - ldr r3, _021DB398 ; =0x00007FFF - mov r1, #3 - str r0, [r5, #0x14] - bl ov5_021D7384 - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74D4 -_021DB236: - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - mov r1, #0 - add r0, #0xac - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb4 - strh r1, [r0] - ldr r0, _021DB3A0 ; =0x00000BA2 - mov r1, #3 - strh r1, [r4, r0] - b _021DB2D4 -_021DB25A: - add r2, #0xe - ldrh r0, [r4, r2] - cmp r0, #5 - bne _021DB2D4 - add r0, r5, #0 - mov r1, #7 - mov r2, #0 - mov r3, #8 - bl ov5_021D64FC - ldr r0, _021DB39C ; =0x00000BA4 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _021DB282 - add r0, r5, #0 - add r0, #0x14 - mov r1, #1 - mov r2, #0 - bl ov5_021D749C -_021DB282: - ldr r0, _021DB3A0 ; =0x00000BA2 - mov r1, #4 - strh r1, [r4, r0] - b _021DB2D4 -_021DB28A: - add r0, r5, #0 - bl ov5_021D650C - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x14 - bl ov5_021D74B8 - add r7, r0, #0 - ldr r0, [r5, #0] - mov r1, #0x10 - sub r1, r1, r0 - bl ov5_021D64E4 - cmp r6, r7 - bne _021DB2D4 - cmp r6, #1 - bne _021DB2D4 - ldr r0, _021DB3A0 ; =0x00000BA2 - mov r1, #5 - strh r1, [r4, r0] - b _021DB2D4 -_021DB2B6: - add r2, #0xc - ldrh r0, [r4, r2] - cmp r0, #0 - beq _021DB2CE - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r5, #0x14] - mov r1, #1 - add r3, r2, #0 - bl ov5_021D57FC -_021DB2CE: - ldr r0, [r4, #4] - bl ov5_021D69B8 -_021DB2D4: - ldr r0, _021DB3A0 ; =0x00000BA2 - ldrh r0, [r4, r0] - cmp r0, #5 - beq _021DB38A - cmp r0, #0 - beq _021DB38A - add r0, r4, #0 - add r1, sp, #0x14 - add r2, sp, #0x10 - bl ov5_021D71B4 - ldr r0, [sp, #0x10] - mov r2, #3 - asr r1, r0, #0x1f - lsl r2, r2, #0xa - mov r3, #0 - bl sub_020E1F1C - mov r3, #2 - mov r2, #0 - lsl r3, r3, #0xa - add r6, r0, r3 - adc r1, r2 - lsl r0, r1, #0x14 - lsr r1, r6, #0xc - orr r1, r0 - add r0, r5, #0 - add r0, #0xac - str r1, [sp, #0x10] - ldr r1, [r0, #0] - ldr r0, [sp, #0x14] - add r1, r1, r0 - add r0, r5, #0 - add r0, #0xac - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb0 - ldr r1, [r0, #0] - ldr r0, [sp, #0x10] - add r1, r1, r0 - add r0, r5, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xb4 - ldrh r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xb4 - strh r1, [r0] - add r0, r5, #0 - add r0, #0xb4 - ldrh r1, [r0] - lsr r0, r3, #2 - cmp r1, r0 - blo _021DB34A - add r0, r5, #0 - add r0, #0xb4 - strh r2, [r0] -_021DB34A: - add r3, r5, #0 - add r3, #0xac - ldr r3, [r3, #0] - mov r0, #0x41 - asr r7, r3, #0xc - add r3, r5, #0 - add r3, #0xb4 - ldrh r3, [r3] - ldr r1, [r4, #0] - lsl r0, r0, #2 - lsr r6, r3, #3 - ldr r0, [r1, r0] - ldr r3, _021DB3A4 ; =0x02201D38 - ldr r0, [r0, #8] - ldrb r3, [r3, r6] - mov r1, #2 - mov r2, #0 - add r3, r7, r3 - bl sub_0201C63C - mov r0, #0x41 - add r5, #0xb0 - ldr r3, [r5, #0] - ldr r1, [r4, #0] - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #2 - ldr r0, [r0, #8] - mov r2, #3 - asr r3, r3, #0xc - bl sub_0201C63C -_021DB38A: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DB390: .word 0x00000B98 -_021DB394: .word 0x0000692F -_021DB398: .word 0x00007FFF -_021DB39C: .word 0x00000BA4 -_021DB3A0: .word 0x00000BA2 -_021DB3A4: .word 0x02201D38 - thumb_func_end ov5_021DB144 - - thumb_func_start ov5_021DB3A8 -ov5_021DB3A8: ; 0x021DB3A8 - push {r3, lr} - sub sp, #8 - mov r2, #5 - lsl r2, r2, #8 - str r2, [sp] - mov r2, #1 - lsl r2, r2, #8 - str r2, [sp, #4] - mov r2, #4 - add r3, r2, #0 - bl ov5_021D9C20 - add sp, #8 - pop {r3, pc} - thumb_func_end ov5_021DB3A8 - - thumb_func_start ov5_021DB3C4 -ov5_021DB3C4: ; 0x021DB3C4 - push {r3, lr} - sub sp, #8 - mov r2, #1 - lsl r2, r2, #0xa - str r2, [sp] - lsr r2, r2, #2 - str r2, [sp, #4] - mov r2, #6 - mov r3, #1 - bl ov5_021D9C20 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DB3C4 - - thumb_func_start ov5_021DB3E0 -ov5_021DB3E0: ; 0x021DB3E0 - push {lr} - sub sp, #0xc - ldr r0, _021DB400 ; =0x00001842 - ldr r2, _021DB404 ; =0x00000B98 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r1, #0 - ldr r1, [r1, r2] - ldr r3, _021DB408 ; =0x000065EF - mov r2, #3 - bl ov5_021D9DFC - add sp, #0xc - pop {pc} - ; .align 2, 0 -_021DB400: .word 0x00001842 -_021DB404: .word 0x00000B98 -_021DB408: .word 0x000065EF - thumb_func_end ov5_021DB3E0 - - thumb_func_start ov5_021DB40C -ov5_021DB40C: ; 0x021DB40C - push {lr} - sub sp, #0xc - ldr r0, _021DB42C ; =0x00007B2D - ldr r2, _021DB430 ; =0x00000B98 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r1, #0 - ldr r1, [r1, r2] - ldr r3, _021DB434 ; =0x0000672F - mov r2, #2 - bl ov5_021D9DFC - add sp, #0xc - pop {pc} - ; .align 2, 0 -_021DB42C: .word 0x00007B2D -_021DB430: .word 0x00000B98 -_021DB434: .word 0x0000672F - thumb_func_end ov5_021DB40C - - thumb_func_start ov5_021DB438 -ov5_021DB438: ; 0x021DB438 - push {lr} - sub sp, #0xc - mov r0, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r2, _021DB458 ; =0x00000B98 - add r0, r1, #0 - ldr r1, [r1, r2] - ldr r3, _021DB45C ; =0x0000672F - mov r2, #2 - bl ov5_021D9DFC - add sp, #0xc - pop {pc} - ; .align 2, 0 -_021DB458: .word 0x00000B98 -_021DB45C: .word 0x0000672F - thumb_func_end ov5_021DB438 - - thumb_func_start ov5_021DB460 -ov5_021DB460: ; 0x021DB460 - push {lr} - sub sp, #0xc - mov r0, #5 - lsl r0, r0, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r2, _021DB484 ; =0x00000B98 - add r0, r1, #0 - ldr r1, [r1, r2] - ldr r3, _021DB488 ; =0x0000672F - mov r2, #2 - bl ov5_021D9DFC - add sp, #0xc - pop {pc} - nop -_021DB484: .word 0x00000B98 -_021DB488: .word 0x0000672F - thumb_func_end ov5_021DB460 - - thumb_func_start ov5_021DB48C -ov5_021DB48C: ; 0x021DB48C - push {lr} - sub sp, #0xc - ldr r0, _021DB4AC ; =0x00000421 - ldr r2, _021DB4B0 ; =0x00000B98 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r1, #0 - ldr r1, [r1, r2] - ldr r3, _021DB4B4 ; =0x00004B6F - mov r2, #1 - bl ov5_021D9DFC - add sp, #0xc - pop {pc} - ; .align 2, 0 -_021DB4AC: .word 0x00000421 -_021DB4B0: .word 0x00000B98 -_021DB4B4: .word 0x00004B6F - thumb_func_end ov5_021DB48C - - thumb_func_start ov5_021DB4B8 -ov5_021DB4B8: ; 0x021DB4B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021DB4E0 ; =0x00000B9C - add r4, r1, #0 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021DB4CA - bl sub_02022974 -_021DB4CA: - ldr r1, _021DB4E0 ; =0x00000B9C - mov r0, #1 - str r0, [r5, r1] - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - add r1, r1, #4 - strh r0, [r5, r1] - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_021DB4E0: .word 0x00000B9C - thumb_func_end ov5_021DB4B8 - - thumb_func_start ov5_021DB4E4 -ov5_021DB4E4: ; 0x021DB4E4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xba - lsl r0, r0, #4 - ldrh r0, [r4, r0] - mov r1, #0 - bl sub_020057A4 - ldr r0, _021DB4FC ; =0x00000B9C - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021DB4FC: .word 0x00000B9C - thumb_func_end ov5_021DB4E4 - - thumb_func_start ov5_021DB500 -ov5_021DB500: ; 0x021DB500 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0x1c] - bl sub_02013B54 - str r0, [sp, #0xc] - ldr r0, [r5, #0x20] - bl sub_02013B54 - ldr r7, [sp, #0xc] - str r0, [sp, #8] - mov r4, #0 - add r6, r0, #0 -_021DB51C: - mov r0, #2 - ldrsh r2, [r5, r0] - cmp r4, r2 - bgt _021DB53A - add r0, sp, #0x14 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - mov r1, #0 - ldrsh r1, [r5, r1] - ldr r0, [r5, #4] - add r3, r4, #0 - bl ov5_021DB588 - b _021DB570 -_021DB53A: - lsl r0, r2, #1 - cmp r4, r0 - bgt _021DB55C - sub r0, r0, r4 - lsl r1, r0, #1 - ldr r0, [sp, #0xc] - ldrh r0, [r0, r1] - str r0, [sp, #0x14] - mov r0, #2 - ldrsh r0, [r5, r0] - lsl r0, r0, #1 - sub r0, r0, r4 - lsl r1, r0, #1 - ldr r0, [sp, #8] - ldrh r0, [r0, r1] - str r0, [sp, #0x10] - b _021DB570 -_021DB55C: - add r0, sp, #0x14 - str r0, [sp] - add r0, sp, #0x10 - str r0, [sp, #4] - mov r1, #0 - ldrsh r1, [r5, r1] - ldr r0, [r5, #4] - add r3, r4, #0 - bl ov5_021DB588 -_021DB570: - ldr r0, [sp, #0x14] - add r4, r4, #1 - strh r0, [r7] - ldr r0, [sp, #0x10] - add r7, r7, #2 - strh r0, [r6] - add r6, r6, #2 - cmp r4, #0xc0 - blt _021DB51C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DB500 - - thumb_func_start ov5_021DB588 -ov5_021DB588: ; 0x021DB588 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r1, [sp] - ldr r5, [sp, #0x20] - ldr r4, [sp, #0x24] - sub r1, r3, r2 - bpl _021DB598 - neg r1, r1 -_021DB598: - cmp r1, r0 - blt _021DB5A6 - mov r0, #0 - str r0, [r5, #0] - add sp, #0xc - str r0, [r4, #0] - pop {r4, r5, r6, r7, pc} -_021DB5A6: - lsl r1, r1, #0xc - str r1, [sp, #4] - asr r7, r1, #0x1f - asr r1, r0, #0x1f - add r2, r0, #0 - add r3, r1, #0 - bl sub_020E1F1C - str r0, [sp, #8] - ldr r0, [sp, #4] - add r6, r1, #0 - add r1, r7, #0 - add r2, r0, #0 - add r3, r7, #0 - bl sub_020E1F1C - add r2, r0, #0 - add r3, r1, #0 - mov r0, #2 - ldr r1, [sp, #8] - mov r7, #0 - lsl r0, r0, #0xa - add r0, r1, r0 - adc r6, r7 - lsl r1, r6, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #2 - lsl r1, r1, #0xa - add r2, r2, r1 - adc r3, r7 - lsl r1, r3, #0x14 - lsr r2, r2, #0xc - orr r2, r1 - sub r0, r0, r2 - bl sub_020BCFF0 - asr r2, r0, #0xc - ldr r0, [sp] - sub r0, r0, r2 - str r0, [r5, #0] - bpl _021DB5FE - add r0, r7, #0 - str r0, [r5, #0] -_021DB5FE: - ldr r1, [r5, #0] - lsl r0, r2, #1 - add r0, r1, r0 - str r0, [r4, #0] - cmp r0, #0xff - ble _021DB60E - mov r0, #0xff - str r0, [r4, #0] -_021DB60E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DB588 - - thumb_func_start ov5_021DB614 -ov5_021DB614: ; 0x021DB614 - push {r4, r5, r6, lr} - ldr r2, _021DB680 ; =0x0000062C - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - bl sub_020D5124 - mov r2, #0x6b - add r1, r5, #0 - lsl r2, r2, #2 - mov r0, #4 - add r1, #0x2c - add r2, r5, r2 - bl sub_02013B10 - mov r1, #0xcb - ldr r2, _021DB684 ; =0x000004AC - lsl r1, r1, #2 - str r0, [r5, #0x1c] - mov r0, #4 - add r1, r5, r1 - add r2, r5, r2 - bl sub_02013B10 - str r0, [r5, #0x20] - mov r0, #0xcb - ldr r1, _021DB684 ; =0x000004AC - mov r3, #0 - add r6, r5, #0 - mov r2, #0xff - lsl r0, r0, #2 -_021DB652: - strh r2, [r6, r0] - strh r2, [r6, r1] - add r3, r3, #1 - add r6, r6, #2 - cmp r3, #0xc0 - blt _021DB652 - ldr r0, _021DB688 ; =ov5_021DB7F8 - add r1, r5, #0 - mov r2, #0x78 - str r4, [r5, #0x14] - bl sub_0200DA3C - mov r2, #1 - ldr r0, _021DB68C ; =ov5_021DB78C - add r1, r5, #0 - lsl r2, r2, #0xa - bl sub_0200DA3C - str r0, [r5, #0x24] - mov r0, #0 - str r0, [r5, #0x28] - pop {r4, r5, r6, pc} - nop -_021DB680: .word 0x0000062C -_021DB684: .word 0x000004AC -_021DB688: .word ov5_021DB7F8 -_021DB68C: .word ov5_021DB78C - thumb_func_end ov5_021DB614 - - thumb_func_start ov5_021DB690 -ov5_021DB690: ; 0x021DB690 - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - lsl r0, r0, #0x1a - mov r1, #0xe - ldr r2, [r0, #0] - lsl r1, r1, #0xc - and r1, r2 - lsr r3, r1, #0xd - ldr r2, [r0, #0] - ldr r1, _021DB6D8 ; =0xFFFF1FFF - and r2, r1 - mov r1, #2 - bic r3, r1 - lsl r1, r3, #0xd - orr r1, r2 - str r1, [r0, #0] - ldr r0, [r4, #0x18] - bl ov5_021EF43C - ldr r0, [r4, #0x24] - bl sub_0200DA58 - ldr r0, [r4, #0x1c] - bl sub_02013B40 - ldr r0, [r4, #0x20] - bl sub_02013B40 - ldr r2, _021DB6DC ; =0x0000062C - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - pop {r4, pc} - nop -_021DB6D8: .word 0xFFFF1FFF -_021DB6DC: .word 0x0000062C - thumb_func_end ov5_021DB690 - - thumb_func_start ov5_021DB6E0 -ov5_021DB6E0: ; 0x021DB6E0 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r3, #0 - ldr r3, [sp, #0x14] - add r0, r4, #4 - bl ov5_021D6538 - ldr r0, [sp, #0x10] - strh r5, [r4] - strh r0, [r4, #2] - mov r0, #1 - str r0, [r4, #0x28] - add r0, r4, #0 - bl ov5_021DB500 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DB6E0 - - thumb_func_start ov5_021DB700 -ov5_021DB700: ; 0x021DB700 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0x28] - cmp r1, #0 - bne _021DB712 - bl ov5_021DB7CC - mov r0, #1 - pop {r3, r4, r5, pc} -_021DB712: - add r0, r5, #4 - bl ov5_021D6548 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021DB500 - cmp r4, #1 - bne _021DB728 - mov r0, #0 - str r0, [r5, #0x28] -_021DB728: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DB700 - - thumb_func_start ov5_021DB72C -ov5_021DB72C: ; 0x021DB72C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r0, _021DB784 ; =0x04000006 - add r5, r1, #0 - ldrh r7, [r0] - mov r6, #0 - add r4, sp, #0 -_021DB73A: - ldr r0, [r5, #0x1c] - bl sub_02013B68 - add r6, r6, #1 - add r5, r5, #4 - stmia r4!, {r0} - cmp r6, #2 - blt _021DB73A - cmp r7, #0xc0 - bge _021DB780 - add r7, r7, #1 - cmp r7, #0xc0 - blt _021DB756 - sub r7, #0xc0 -_021DB756: - ldr r1, _021DB788 ; =0x04000004 - mov r0, #2 - ldrh r2, [r1] - tst r0, r2 - beq _021DB780 - ldr r2, [sp] - lsl r0, r7, #1 - ldrh r2, [r2, r0] - lsl r3, r2, #8 - mov r2, #0xff - lsl r2, r2, #8 - and r3, r2 - ldr r2, [sp, #4] - ldrh r0, [r2, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - orr r0, r3 - strh r0, [r1, #0x3e] - mov r0, #0xc0 - add r1, #0x42 - strh r0, [r1] -_021DB780: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB784: .word 0x04000006 -_021DB788: .word 0x04000004 - thumb_func_end ov5_021DB72C - - thumb_func_start ov5_021DB78C -ov5_021DB78C: ; 0x021DB78C - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r4, #0 -_021DB792: - ldr r0, [r5, #0x1c] - bl sub_02013B94 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021DB792 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DB78C - - thumb_func_start ov5_021DB7A4 -ov5_021DB7A4: ; 0x021DB7A4 - ldr r3, _021DB7B0 ; =sub_0200DA3C - add r1, r0, #0 - ldr r0, _021DB7B4 ; =ov5_021DB7B8 - mov r2, #0x80 - bx r3 - nop -_021DB7B0: .word sub_0200DA3C -_021DB7B4: .word ov5_021DB7B8 - thumb_func_end ov5_021DB7A4 - - thumb_func_start ov5_021DB7B8 -ov5_021DB7B8: ; 0x021DB7B8 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl ov5_021DB690 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DB7B8 - - thumb_func_start ov5_021DB7CC -ov5_021DB7CC: ; 0x021DB7CC - push {r3, r4, r5, r6, r7, lr} - mov r7, #6 - add r5, r0, #0 - mov r6, #0 - lsl r7, r7, #6 -_021DB7D6: - ldr r0, [r5, #0x1c] - bl sub_02013B68 - add r4, r0, #0 - ldr r0, [r5, #0x1c] - bl sub_02013B54 - add r1, r4, #0 - add r2, r7, #0 - bl sub_020D50B8 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021DB7D6 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DB7CC - - thumb_func_start ov5_021DB7F8 -ov5_021DB7F8: ; 0x021DB7F8 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r1, _021DB878 ; =0x0400004A - add r5, r0, #0 - ldrb r0, [r1] - add r7, sp, #0 - ldr r3, _021DB87C ; =0xFFFFC0FF - strb r0, [r7] - add r0, r1, #0 - sub r0, #0x4a - ldr r2, [r0, #0] - mov r0, #0xe - lsl r0, r0, #0xc - and r0, r2 - lsr r2, r0, #0xd - sub r0, r1, #2 - ldrh r6, [r0] - and r6, r3 - mov r3, #0x3f - lsl r3, r3, #8 - orr r6, r3 - lsr r3, r1, #0xd - orr r3, r6 - strh r3, [r0] - ldrh r1, [r1] - mov r0, #0x3f - bic r1, r0 - mov r0, #0x3e - orr r0, r1 - ldrb r1, [r7] - lsl r1, r1, #0x1a - lsr r1, r1, #0x1f - beq _021DB83E - mov r1, #0x20 - orr r0, r1 -_021DB83E: - ldr r1, _021DB878 ; =0x0400004A - mov r3, #0xff - strh r0, [r1] - add r0, r1, #0 - sub r0, #8 - strh r3, [r0] - sub r0, r1, #4 - mov r3, #0xc0 - strh r3, [r0] - sub r1, #0x4a - ldr r3, [r1, #0] - ldr r0, _021DB880 ; =0xFFFF1FFF - and r0, r3 - mov r3, #2 - orr r2, r3 - lsl r2, r2, #0xd - orr r0, r2 - str r0, [r1, #0] - ldr r0, [r4, #0x14] - ldr r1, _021DB884 ; =ov5_021DB72C - add r2, r4, #0 - bl ov5_021EF418 - str r0, [r4, #0x18] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DB878: .word 0x0400004A -_021DB87C: .word 0xFFFFC0FF -_021DB880: .word 0xFFFF1FFF -_021DB884: .word ov5_021DB72C - thumb_func_end ov5_021DB7F8 - - thumb_func_start ov5_021DB888 -ov5_021DB888: ; 0x021DB888 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r5, r1, #0 - add r6, r2, #0 - bl sub_02050A60 - mov r1, #0x12 - add r7, r0, #0 - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - add r4, r0, #0 - bne _021DB8AA - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} -_021DB8AA: - mov r2, #0x12 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - str r7, [r4, #4] - ldr r0, [r7, #0xc] - bl sub_020507E4 - str r0, [r4, #8] - mov r0, #0x45 - lsl r0, r0, #2 - str r6, [r4, r0] - add r0, r0, #4 - str r5, [r4, r0] - ldr r0, [sp] - ldr r1, _021DB8D4 ; =ov5_021DB8D8 - add r2, r4, #0 - bl sub_02050944 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DB8D4: .word ov5_021DB8D8 - thumb_func_end ov5_021DB888 - - thumb_func_start ov5_021DB8D8 -ov5_021DB8D8: ; 0x021DB8D8 - push {r3, r4, r5, lr} - sub sp, #8 - bl sub_02050A64 - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #9 - bhi _021DB912 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DB8F4: ; jump table - .short _021DB908 - _021DB8F4 - 2 ; case 0 - .short _021DB91E - _021DB8F4 - 2 ; case 1 - .short _021DB96C - _021DB8F4 - 2 ; case 2 - .short _021DB992 - _021DB8F4 - 2 ; case 3 - .short _021DB9A4 - _021DB8F4 - 2 ; case 4 - .short _021DB9C0 - _021DB8F4 - 2 ; case 5 - .short _021DB9D2 - _021DB8F4 - 2 ; case 6 - .short _021DB9F2 - _021DB8F4 - 2 ; case 7 - .short _021DBA3C - _021DB8F4 - 2 ; case 8 - .short _021DBA44 - _021DB8F4 - 2 ; case 9 -_021DB908: - ldr r0, [r4, #4] - bl ov5_021DBF20 - cmp r0, #1 - beq _021DB914 -_021DB912: - b _021DBA4E -_021DB914: - add r0, r4, #0 - mov r1, #1 - bl ov5_021DBA54 - b _021DBA4E -_021DB91E: - bl ov5_021DBA7C - add r0, r4, #0 - bl ov5_021DBA58 - cmp r0, #2 - bne _021DB940 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - strh r1, [r0] - add r0, r4, #0 - mov r1, #2 - bl ov5_021DBA54 - b _021DBA4E -_021DB940: - cmp r0, #0 - bne _021DB958 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - strh r1, [r0] - add r0, r4, #0 - mov r1, #7 - bl ov5_021DBA54 - b _021DBA4E -_021DB958: - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - strh r1, [r0] - add r0, r4, #0 - mov r1, #8 - bl ov5_021DBA54 - b _021DBA4E -_021DB96C: - ldr r0, [r4, #4] - bl ov5_021E1014 - mov r1, #0x47 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x62 - lsl r0, r0, #4 - bl sub_02005748 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_0206B0F8 - add r0, r4, #0 - mov r1, #3 - bl ov5_021DBA54 - b _021DBA4E -_021DB992: - bl ov5_021DBCD4 - cmp r0, #0 - bne _021DBA4E - add r0, r4, #0 - mov r1, #4 - bl ov5_021DBA54 - b _021DBA4E -_021DB9A4: - bl ov5_021DBCE0 - cmp r0, #0 - bne _021DB9B6 - mov r0, #0x45 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - strh r1, [r0] -_021DB9B6: - add r0, r4, #0 - mov r1, #5 - bl ov5_021DBA54 - b _021DBA4E -_021DB9C0: - bl ov5_021DBCD4 - cmp r0, #0 - bne _021DBA4E - add r0, r4, #0 - mov r1, #6 - bl ov5_021DBA54 - b _021DBA4E -_021DB9D2: - mov r0, #0x62 - lsl r0, r0, #4 - bl sub_020057D4 - cmp r0, #0 - bne _021DBA4E - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov5_021E1020 - add r0, r4, #0 - mov r1, #9 - bl ov5_021DBA54 - b _021DBA4E -_021DB9F2: - ldr r0, [r4, #8] - bl sub_0206B0E8 - mov r1, #0x64 - sub r5, r1, r0 - add r0, r5, #0 - mov r1, #0xa - bl sub_020E1F6C - cmp r0, #0 - bne _021DBA0C - mov r3, #1 - b _021DBA1E -_021DBA0C: - add r0, r5, #0 - mov r1, #0x64 - bl sub_020E1F6C - cmp r0, #0 - bne _021DBA1C - mov r3, #2 - b _021DBA1E -_021DBA1C: - mov r3, #3 -_021DBA1E: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - add r2, r5, #0 - bl sub_0200B60C - add r0, r4, #0 - mov r1, #9 - bl ov5_021DBA54 - b _021DBA4E -_021DBA3C: - mov r1, #9 - bl ov5_021DBA54 - b _021DBA4E -_021DBA44: - bl sub_020181C4 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_021DBA4E: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DB8D8 - - thumb_func_start ov5_021DBA54 -ov5_021DBA54: ; 0x021DBA54 - str r1, [r0, #0] - bx lr - thumb_func_end ov5_021DBA54 - - thumb_func_start ov5_021DBA58 -ov5_021DBA58: ; 0x021DBA58 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0206B0E8 - cmp r0, #0x64 - bne _021DBA78 - mov r0, #0x11 - lsl r0, r0, #4 - ldrh r0, [r4, r0] - cmp r0, #0 - bne _021DBA74 - mov r0, #1 - pop {r4, pc} -_021DBA74: - mov r0, #2 - pop {r4, pc} -_021DBA78: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021DBA58 - - thumb_func_start ov5_021DBA7C -ov5_021DBA7C: ; 0x021DBA7C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp] - ldr r0, [r0, #4] - bl sub_0203A4B4 - mov r2, #0 - str r0, [sp, #4] - str r2, [sp, #0x18] - cmp r0, #0 - bls _021DBAA2 - ldr r3, [sp] - add r1, r2, #0 -_021DBA96: - ldr r0, [sp, #4] - add r2, r2, #1 - str r1, [r3, #0x10] - add r3, r3, #4 - cmp r2, r0 - blo _021DBA96 -_021DBAA2: - ldr r0, [sp] - ldr r0, [r0, #4] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [sp] - ldr r0, [r0, #4] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - sub r1, r4, #7 - str r1, [sp, #0x14] - add r1, r4, #7 - str r1, [sp, #0x10] - sub r1, r0, #7 - add r0, r0, #6 - str r0, [sp, #8] - ldr r0, [sp, #0x14] - str r1, [sp, #0xc] - cmp r0, #0 - bge _021DBAD2 - mov r0, #0 - str r0, [sp, #0x14] -_021DBAD2: - ldr r0, [sp, #0xc] - cmp r0, #0 - bge _021DBADC - mov r0, #0 - str r0, [sp, #0xc] -_021DBADC: - ldr r0, [sp, #4] - mov r6, #0 - cmp r0, #0 - bls _021DBB62 - ldr r5, [sp] -_021DBAE6: - ldr r0, [sp] - add r1, r6, #0 - ldr r0, [r0, #4] - ldr r0, [r0, #0x38] - bl sub_0206251C - add r4, r0, #0 - beq _021DBB5A - bl sub_02062950 - cmp r0, #8 - bhi _021DBB5A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DBB0A: ; jump table - .short _021DBB5A - _021DBB0A - 2 ; case 0 - .short _021DBB1C - _021DBB0A - 2 ; case 1 - .short _021DBB1C - _021DBB0A - 2 ; case 2 - .short _021DBB5A - _021DBB0A - 2 ; case 3 - .short _021DBB1C - _021DBB0A - 2 ; case 4 - .short _021DBB1C - _021DBB0A - 2 ; case 5 - .short _021DBB1C - _021DBB0A - 2 ; case 6 - .short _021DBB1C - _021DBB0A - 2 ; case 7 - .short _021DBB1C - _021DBB0A - 2 ; case 8 -_021DBB1C: - add r0, r4, #0 - bl sub_02063020 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02063040 - ldr r1, [sp, #0x14] - cmp r7, r1 - blt _021DBB5A - ldr r1, [sp, #0x10] - cmp r7, r1 - bgt _021DBB5A - ldr r1, [sp, #0xc] - cmp r0, r1 - blt _021DBB5A - ldr r1, [sp, #8] - cmp r0, r1 - bgt _021DBB5A - add r0, r4, #0 - bl sub_02062948 - bl ov5_021DBB70 - cmp r0, #0 - bne _021DBB5A - ldr r0, [sp, #0x18] - str r4, [r5, #0x10] - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0x18] -_021DBB5A: - ldr r0, [sp, #4] - add r6, r6, #1 - cmp r6, r0 - blo _021DBAE6 -_021DBB62: - mov r2, #0x11 - ldr r1, [sp, #0x18] - ldr r0, [sp] - lsl r2, r2, #4 - strh r1, [r0, r2] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021DBA7C - - thumb_func_start ov5_021DBB70 -ov5_021DBB70: ; 0x021DBB70 - sub r0, #0x33 - cmp r0, #3 - bhi _021DBB8E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DBB82: ; jump table - .short _021DBB8A - _021DBB82 - 2 ; case 0 - .short _021DBB8A - _021DBB82 - 2 ; case 1 - .short _021DBB8A - _021DBB82 - 2 ; case 2 - .short _021DBB8A - _021DBB82 - 2 ; case 3 -_021DBB8A: - mov r0, #1 - bx lr -_021DBB8E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DBB70 - - thumb_func_start ov5_021DBB94 -ov5_021DBB94: ; 0x021DBB94 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0xc] - bl sub_020507E4 - add r4, r0, #0 - bl sub_0206B0E8 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0206B108 - add r5, r0, #0 - ldr r0, [r7, #0xc] - bl sub_0207D990 - ldr r1, _021DBC04 ; =0x000001BB - mov r2, #1 - mov r3, #4 - bl sub_0207D688 - cmp r0, #1 - bne _021DBBD2 - cmp r6, #0x64 - bhs _021DBBD2 - add r1, r6, #1 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - bl sub_0206B0F8 -_021DBBD2: - add r0, r4, #0 - bl sub_0206A9E4 - cmp r0, #1 - bne _021DBBFE - cmp r5, #0x64 - bhs _021DBBEE - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r4, #0 - add r1, r5, #0 - bl sub_0206B118 -_021DBBEE: - cmp r5, #0x64 - bne _021DBBFE - add r0, r4, #0 - bl sub_0206B0D4 - add r0, r7, #0 - bl ov5_021DBC08 -_021DBBFE: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DBC04: .word 0x000001BB - thumb_func_end ov5_021DBB94 - - thumb_func_start ov5_021DBC08 -ov5_021DBC08: ; 0x021DBC08 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_0203A4B4 - add r7, r0, #0 - ldr r5, _021DBC3C ; =0x00000000 - beq _021DBC38 -_021DBC16: - ldr r0, [r6, #0x38] - add r1, r5, #0 - bl sub_0206251C - add r4, r0, #0 - beq _021DBC32 - bl sub_02062948 - cmp r0, #0x31 - bne _021DBC32 - add r0, r4, #0 - mov r1, #2 - bl ov5_021DBECC -_021DBC32: - add r5, r5, #1 - cmp r5, r7 - blo _021DBC16 -_021DBC38: - pop {r3, r4, r5, r6, r7, pc} - nop -_021DBC3C: .word 0x00000000 - thumb_func_end ov5_021DBC08 - - thumb_func_start ov5_021DBC40 -ov5_021DBC40: ; 0x021DBC40 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - bl sub_02065700 - add r1, r0, #0 - ldr r0, _021DBC60 ; =0x00000112 - ldrh r2, [r4, r0] - add r2, r2, #1 - strh r2, [r4, r0] - add r0, r4, #0 - bl ov5_021DBC64 - pop {r4, pc} - nop -_021DBC60: .word 0x00000112 - thumb_func_end ov5_021DBC40 - - thumb_func_start ov5_021DBC64 -ov5_021DBC64: ; 0x021DBC64 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #4 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _021DBC7C - bl sub_02022974 - pop {r4, r5, r6, pc} -_021DBC7C: - ldr r0, _021DBC90 ; =ov5_021DBC94 - str r5, [r4, #8] - add r1, r4, #0 - mov r2, #0 - str r6, [r4, #4] - bl sub_0200D9E8 - str r0, [r4, #0] - pop {r4, r5, r6, pc} - nop -_021DBC90: .word ov5_021DBC94 - thumb_func_end ov5_021DBC64 - - thumb_func_start ov5_021DBC94 -ov5_021DBC94: ; 0x021DBC94 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - bl sub_0206574C - cmp r0, #1 - bne _021DBCCE - ldr r1, [r4, #8] - ldr r0, _021DBCD0 ; =0x00000112 - ldrh r0, [r1, r0] - cmp r0, #0 - bne _021DBCB0 - bl sub_02022974 -_021DBCB0: - ldr r2, [r4, #8] - ldr r0, _021DBCD0 ; =0x00000112 - ldrh r1, [r2, r0] - sub r1, r1, #1 - strh r1, [r2, r0] - ldr r0, [r4, #4] - bl sub_02065758 - ldr r0, [r4, #0] - bl sub_0200DA58 - mov r0, #4 - add r1, r4, #0 - bl sub_02018238 -_021DBCCE: - pop {r4, pc} - ; .align 2, 0 -_021DBCD0: .word 0x00000112 - thumb_func_end ov5_021DBC94 - - thumb_func_start ov5_021DBCD4 -ov5_021DBCD4: ; 0x021DBCD4 - ldr r1, _021DBCDC ; =0x00000112 - ldrh r0, [r0, r1] - bx lr - nop -_021DBCDC: .word 0x00000112 - thumb_func_end ov5_021DBCD4 - - thumb_func_start ov5_021DBCE0 -ov5_021DBCE0: ; 0x021DBCE0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - ldr r0, [r0, #0xc] - bl sub_020507E4 - str r0, [sp] - mov r0, #0x11 - lsl r0, r0, #4 - mov r7, #0 - ldrh r0, [r5, r0] - add r6, r7, #0 - cmp r0, #0 - ble _021DBD7C - add r4, r5, #0 -_021DBCFE: - ldr r0, [r4, #0x10] - bl ov5_021DBD88 - add r1, r0, #0 - ldr r0, [r5, #4] - bl sub_0203F2A0 - cmp r0, #0 - bne _021DBD1E - ldr r1, [r4, #0x10] - ldr r2, _021DBD80 ; =0x021F8E34 - add r0, r5, #0 - bl ov5_021DBC40 - mov r7, #1 - b _021DBD6E -_021DBD1E: - bl sub_0201D2E8 - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, #0x32 - bge _021DBD6E - ldr r0, [r4, #0x10] - bl ov5_021DBEB8 - cmp r0, #0 - bne _021DBD6E - ldr r0, [r4, #0x10] - mov r1, #0x31 - bl ov5_021DBECC - ldr r1, [r4, #0x10] - ldr r2, _021DBD84 ; =0x021F8E3C - add r0, r5, #0 - bl ov5_021DBC40 - ldr r0, [r5, #4] - ldr r1, [r4, #0x10] - mov r2, #0 - bl ov5_021DBF70 - add r7, r0, #0 - beq _021DBD66 - mov r1, #0x31 - bl ov5_021DBECC - ldr r2, _021DBD84 ; =0x021F8E3C - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021DBC40 -_021DBD66: - ldr r0, [sp] - mov r7, #1 - bl sub_0206A9C4 -_021DBD6E: - mov r0, #0x11 - lsl r0, r0, #4 - ldrh r0, [r5, r0] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _021DBCFE -_021DBD7C: - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DBD80: .word 0x021F8E34 -_021DBD84: .word 0x021F8E3C - thumb_func_end ov5_021DBCE0 - - thumb_func_start ov5_021DBD88 -ov5_021DBD88: ; 0x021DBD88 - push {r3, lr} - bl sub_02062960 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0203F254 - pop {r3, pc} - thumb_func_end ov5_021DBD88 - - thumb_func_start ov5_021DBD98 -ov5_021DBD98: ; 0x021DBD98 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, r1, #0 - add r5, r2, #0 - bl ov5_021DBEB8 - cmp r0, #0 - bne _021DBDAC - mov r0, #0 - pop {r3, r4, r5, pc} -_021DBDAC: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DBDDC - add r5, r0, #0 - cmp r5, #0xff - bne _021DBDBE - mov r0, #0 - pop {r3, r4, r5, pc} -_021DBDBE: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DBDFC - add r2, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DBE48 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021DBEA4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DBD98 - - thumb_func_start ov5_021DBDDC -ov5_021DBDDC: ; 0x021DBDDC - ldr r3, _021DBDF8 ; =0x021F8E48 - mov r2, #0 -_021DBDE0: - ldrh r0, [r3] - cmp r1, r0 - bne _021DBDEC - lsl r0, r2, #0x10 - lsr r0, r0, #0x10 - bx lr -_021DBDEC: - add r2, r2, #1 - add r3, #0xc - cmp r2, #0xf0 - blo _021DBDE0 - mov r0, #0xff - bx lr - ; .align 2, 0 -_021DBDF8: .word 0x021F8E48 - thumb_func_end ov5_021DBDDC - - thumb_func_start ov5_021DBDFC -ov5_021DBDFC: ; 0x021DBDFC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0xc - ldr r2, _021DBE40 ; =0x021F8E48 - mul r0, r1 - add r0, r2, r0 - ldr r7, _021DBE44 ; =0x0000FFFF - mov r4, #1 - add r5, r0, #2 -_021DBE0E: - ldrh r1, [r5] - cmp r1, #0 - bne _021DBE1C - sub r0, r4, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DBE1C: - cmp r1, r7 - beq _021DBE30 - add r0, r6, #0 - bl sub_0203F2A0 - cmp r0, #0 - bne _021DBE30 - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021DBE30: - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #6 - blt _021DBE0E - sub r0, r4, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DBE40: .word 0x021F8E48 -_021DBE44: .word 0x0000FFFF - thumb_func_end ov5_021DBDFC - - thumb_func_start ov5_021DBE48 -ov5_021DBE48: ; 0x021DBE48 - push {r3, r4, r5, lr} - ldr r0, [r0, #0xc] - add r5, r1, #0 - add r4, r2, #0 - bl sub_020507E4 - cmp r4, #0 - beq _021DBE6C - add r1, r4, #0 - bl sub_0206AB00 - cmp r0, #0 - bne _021DBE6C - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021DBE70 - add r4, r0, #0 -_021DBE6C: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DBE48 - - thumb_func_start ov5_021DBE70 -ov5_021DBE70: ; 0x021DBE70 - sub r1, r1, #1 - lsl r1, r1, #0x10 - ldr r2, _021DBE9C ; =0x021F8E48 - lsr r3, r1, #0x10 - beq _021DBE96 - mov r1, #0xc - mul r1, r0 - add r2, r2, r1 - ldr r1, _021DBEA0 ; =0x0000FFFF -_021DBE82: - lsl r0, r3, #1 - ldrh r0, [r2, r0] - cmp r0, r1 - beq _021DBE8E - add r0, r3, #0 - bx lr -_021DBE8E: - sub r0, r3, #1 - lsl r0, r0, #0x10 - lsr r3, r0, #0x10 - bne _021DBE82 -_021DBE96: - mov r0, #0 - bx lr - nop -_021DBE9C: .word 0x021F8E48 -_021DBEA0: .word 0x0000FFFF - thumb_func_end ov5_021DBE70 - - thumb_func_start ov5_021DBEA4 -ov5_021DBEA4: ; 0x021DBEA4 - mov r2, #0xc - mul r2, r0 - ldr r0, _021DBEB4 ; =0x021F8E48 - lsl r1, r1, #1 - add r0, r0, r2 - ldrh r0, [r1, r0] - bx lr - nop -_021DBEB4: .word 0x021F8E48 - thumb_func_end ov5_021DBEA4 - - thumb_func_start ov5_021DBEB8 -ov5_021DBEB8: ; 0x021DBEB8 - push {r3, lr} - bl sub_02062948 - cmp r0, #0x31 - bne _021DBEC6 - mov r0, #1 - pop {r3, pc} -_021DBEC6: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DBEB8 - - thumb_func_start ov5_021DBECC -ov5_021DBECC: ; 0x021DBECC - ldr r3, _021DBED0 ; =sub_020633A8 - bx r3 - ; .align 2, 0 -_021DBED0: .word sub_020633A8 - thumb_func_end ov5_021DBECC - - thumb_func_start ov5_021DBED4 -ov5_021DBED4: ; 0x021DBED4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - beq _021DBF1C - add r0, r5, #0 - bl sub_0206298C - cmp r0, #0 - bne _021DBEEA - mov r4, #0xe - b _021DBEFC -_021DBEEA: - cmp r0, #1 - bne _021DBEF2 - mov r4, #0xf - b _021DBEFC -_021DBEF2: - cmp r0, #2 - bne _021DBEFA - mov r4, #0x10 - b _021DBEFC -_021DBEFA: - mov r4, #0x11 -_021DBEFC: - add r0, r6, #0 - add r1, r5, #0 - mov r2, #1 - bl ov5_021DBF70 - cmp r0, #0 - beq _021DBF12 - lsl r1, r4, #0x10 - lsr r1, r1, #0x10 - bl ov5_021DBECC -_021DBF12: - lsl r1, r4, #0x10 - add r0, r5, #0 - lsr r1, r1, #0x10 - bl ov5_021DBECC -_021DBF1C: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DBED4 - - thumb_func_start ov5_021DBF20 -ov5_021DBF20: ; 0x021DBF20 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_0203A4B4 - ldr r5, _021DBF6C ; =0x00000000 - add r7, r0, #0 - str r5, [sp] - beq _021DBF5C -_021DBF30: - ldr r0, [r6, #0x38] - add r1, r5, #0 - bl sub_0206251C - add r4, r0, #0 - beq _021DBF56 - bl sub_02062D1C - cmp r0, #1 - bne _021DBF50 - add r0, r4, #0 - bl sub_02062DDC - mov r0, #1 - str r0, [sp] - b _021DBF56 -_021DBF50: - add r0, r4, #0 - bl sub_02062DD0 -_021DBF56: - add r5, r5, #1 - cmp r5, r7 - blo _021DBF30 -_021DBF5C: - ldr r0, [sp] - cmp r0, #0 - bne _021DBF66 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DBF66: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DBF6C: .word 0x00000000 - thumb_func_end ov5_021DBF20 - - thumb_func_start ov5_021DBF70 -ov5_021DBF70: ; 0x021DBF70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - str r0, [sp] - str r2, [sp, #4] - bl sub_0203A4B4 - add r7, r0, #0 - add r0, r4, #0 - bl sub_02062960 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0xc] - bl sub_0203F254 - str r0, [sp, #8] - bl sub_0203F28C - cmp r0, #0 - bne _021DBFA0 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DBFA0: - mov r4, #0 - cmp r7, #0 - bls _021DC012 -_021DBFA6: - ldr r0, [sp] - add r1, r4, #0 - ldr r0, [r0, #0x38] - bl sub_0206251C - add r5, r0, #0 - beq _021DC00C - ldr r1, [sp, #4] - cmp r1, #0 - bne _021DBFC2 - bl sub_02062948 - cmp r0, #0x31 - beq _021DC00C -_021DBFC2: - add r0, r5, #0 - bl sub_02062950 - cmp r0, #8 - bhi _021DC00C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DBFD8: ; jump table - .short _021DC00C - _021DBFD8 - 2 ; case 0 - .short _021DBFEA - _021DBFD8 - 2 ; case 1 - .short _021DBFEA - _021DBFD8 - 2 ; case 2 - .short _021DC00C - _021DBFD8 - 2 ; case 3 - .short _021DBFEA - _021DBFD8 - 2 ; case 4 - .short _021DBFEA - _021DBFD8 - 2 ; case 5 - .short _021DBFEA - _021DBFD8 - 2 ; case 6 - .short _021DBFEA - _021DBFD8 - 2 ; case 7 - .short _021DBFEA - _021DBFD8 - 2 ; case 8 -_021DBFEA: - add r0, r5, #0 - bl sub_02062960 - add r6, r0, #0 - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl sub_0203F254 - ldr r1, [sp, #0xc] - cmp r1, r6 - beq _021DC00C - ldr r1, [sp, #8] - cmp r1, r0 - bne _021DC00C - add sp, #0x10 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DC00C: - add r4, r4, #1 - cmp r4, r7 - blo _021DBFA6 -_021DC012: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DBF70 - - thumb_func_start ov5_021DC018 -ov5_021DC018: ; 0x021DC018 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - ldr r1, [sp, #0x2c] - add r4, r0, #0 - add r5, r2, #0 - add r7, r3, #0 - cmp r1, #0 - bne _021DC046 - ldr r2, _021DC148 ; =0x00000169 - mov r0, #1 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r1, r6, #0 - add r1, #0x8c - str r0, [r1, #0] - add r0, r6, #0 - add r0, #0x97 - ldrb r1, [r0] - mov r0, #2 - orr r1, r0 - b _021DC056 -_021DC046: - add r0, r6, #0 - add r0, #0x8c - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0x97 - ldrb r1, [r0] - mov r0, #2 - bic r1, r0 -_021DC056: - add r0, r6, #0 - add r0, #0x97 - strb r1, [r0] - add r0, r6, #0 - ldr r1, [sp, #0x24] - add r0, #0x90 - str r1, [r0, #0] - add r0, r6, #0 - str r4, [r6, #0] - ldr r1, [sp, #0x20] - add r0, #0xa0 - str r1, [r0, #0] - add r1, r6, #0 - add r1, #0xa0 - ldr r1, [r1, #0] - mov r0, #0 - strh r0, [r1] - add r1, r6, #0 - add r1, #0xa4 - str r0, [r1, #0] - add r1, r6, #0 - add r1, #0xa8 - str r0, [r1, #0] - add r1, r6, #0 - add r1, #0x97 - ldrb r3, [r1] - add r4, sp, #8 - mov r1, #1 - bic r3, r1 - ldrb r2, [r4, #0x14] - mov r1, #1 - and r1, r2 - add r2, r3, #0 - orr r2, r1 - add r1, r6, #0 - add r1, #0x97 - strb r2, [r1] - add r1, r6, #0 - ldrb r2, [r4, #0x10] - add r1, #0x96 - mov r3, #0x40 - strb r2, [r1] - add r1, r6, #0 - add r1, #0x97 - ldrb r1, [r1] - bic r1, r3 - add r3, r6, #0 - add r3, #0x97 - strb r1, [r3] - add r1, r6, #0 - add r1, #0x97 - ldrb r1, [r1] - mov r3, #0x80 - bic r1, r3 - add r3, r6, #0 - add r3, #0x97 - strb r1, [r3] - add r1, r6, #0 - add r1, #0x98 - strb r5, [r1] - add r1, r6, #0 - add r1, #0x99 - strb r7, [r1] - add r1, r6, #0 - add r1, #0x9b - strb r0, [r1] - ldr r1, [sp, #0x28] - mov r3, #3 - str r1, [r6, #0x18] - add r1, r6, #0 - add r1, #0x94 - strb r3, [r1] - mov r1, #0xb7 - lsl r1, r1, #2 - strh r2, [r6, r1] - add r2, r6, #0 - add r3, r0, #0 -_021DC0F0: - add r1, r2, #0 - add r1, #0xbc - str r3, [r1, #0] - add r1, r2, #0 - add r1, #0xc0 - add r0, r0, #1 - add r2, #8 - str r3, [r1, #0] - cmp r0, #0x1c - blt _021DC0F0 - mov r7, #0xa9 - add r1, r6, #0 - add r2, r6, #0 - mov r5, #0 - mov r0, #0xff - lsl r7, r7, #2 -_021DC110: - mov r4, #0x71 - lsl r4, r4, #2 - str r5, [r1, r4] - add r4, r4, #4 - str r5, [r1, r4] - strh r0, [r2, r7] - add r3, r3, #1 - add r1, #8 - add r2, r2, #2 - cmp r3, #0x1c - blt _021DC110 - add r4, r6, #0 - mov r7, #0x50 -_021DC12A: - add r0, r7, #0 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x1c] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #0x1c - blt _021DC12A - add r6, #0xa0 - ldr r1, _021DC14C ; =0x0000EEEE - ldr r0, [r6, #0] - strh r1, [r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_021DC148: .word 0x00000169 -_021DC14C: .word 0x0000EEEE - thumb_func_end ov5_021DC018 - - thumb_func_start ov5_021DC150 -ov5_021DC150: ; 0x021DC150 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r1, #0 - mov r1, #0x2e - add r6, r0, #0 - mov r0, #4 - lsl r1, r1, #4 - str r2, [sp, #0x18] - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021DC170 - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021DC170: - mov r2, #0x2e - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - str r5, [sp] - add r0, sp, #0x20 - ldrb r0, [r0, #0x10] - add r1, r4, #0 - add r2, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x34] - str r0, [sp, #8] - ldr r0, [sp, #0x38] - str r0, [sp, #0xc] - ldr r0, [sp, #0x3c] - str r0, [sp, #0x10] - ldr r0, [sp, #0x40] - str r0, [sp, #0x14] - ldr r3, [sp, #0x18] - add r0, r6, #0 - bl ov5_021DC018 - add r0, r4, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021DC150 - - thumb_func_start ov5_021DC1A4 -ov5_021DC1A4: ; 0x021DC1A4 - ldr r3, _021DC1A8 ; =ov5_021DC290 - bx r3 - ; .align 2, 0 -_021DC1A8: .word ov5_021DC290 - thumb_func_end ov5_021DC1A4 - - thumb_func_start ov5_021DC1AC -ov5_021DC1AC: ; 0x021DC1AC - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - bl ov5_021DC300 - mov r1, #7 - tst r1, r0 - bne _021DC1C0 - lsr r0, r0, #3 - b _021DC1C4 -_021DC1C0: - lsr r0, r0, #3 - add r0, r0, #1 -_021DC1C4: - add r1, r4, #0 - add r1, #0x97 - ldrb r1, [r1] - lsl r1, r1, #0x19 - lsr r1, r1, #0x1f - beq _021DC1DE - add r1, r4, #0 - add r1, #0x98 - ldrb r1, [r1] - sub r2, r1, r0 - add r1, r4, #0 - add r1, #0x98 - strb r2, [r1] -_021DC1DE: - add r1, r4, #0 - add r1, #0x97 - ldrb r1, [r1] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1f - beq _021DC200 - add r1, r4, #0 - add r1, #0x99 - ldrb r2, [r1] - add r1, r4, #0 - add r1, #0x9b - ldrb r1, [r1] - lsl r1, r1, #1 - sub r2, r2, r1 - add r1, r4, #0 - add r1, #0x99 - strb r2, [r1] -_021DC200: - add r1, r4, #0 - add r1, #0x99 - ldrb r1, [r1] - lsl r0, r0, #0x18 - add r3, r4, #0 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x9b - ldrb r0, [r0] - add r1, r4, #0 - add r3, #0x98 - lsl r0, r0, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - str r0, [sp, #0x10] - ldr r0, [r4, #0] - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r2, _021DC288 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r4, #0 - ldr r2, _021DC288 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - bl ov5_021DC33C - add r1, r4, #0 - add r1, #0x96 - add r0, r4, #0 - ldrb r1, [r1] - add r0, #0xac - mov r2, #4 - bl sub_02001B9C - add r1, r4, #0 - add r1, #0xb8 - str r0, [r1, #0] - ldr r0, _021DC28C ; =ov5_021DC3B0 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add sp, #0x14 - pop {r3, r4, pc} - nop -_021DC288: .word 0x000003D9 -_021DC28C: .word ov5_021DC3B0 - thumb_func_end ov5_021DC1AC - - thumb_func_start ov5_021DC290 -ov5_021DC290: ; 0x021DC290 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - mov r0, #0x50 - mov r1, #4 - add r6, r2, #0 - bl sub_02023790 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r7, #0 - add r2, r4, #0 - bl sub_0200B1B8 - add r1, r5, #0 - add r1, #0x9b - ldrb r1, [r1] - add r0, r5, #0 - add r0, #0x90 - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r0, #0] - ldr r1, [r1, #0x1c] - add r2, r4, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x9b - ldrb r2, [r0] - lsl r0, r2, #2 - add r0, r5, r0 - ldr r1, [r0, #0x1c] - lsl r0, r2, #3 - add r0, r5, r0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - lsl r0, r0, #3 - add r0, r5, r0 - add r0, #0xc0 - str r6, [r0, #0] - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - add r5, #0x9b - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DC290 - - thumb_func_start ov5_021DC300 -ov5_021DC300: ; 0x021DC300 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, #0x9b - ldrb r0, [r0] - mov r6, #0 - add r4, r6, #0 - cmp r0, #0 - ble _021DC336 - add r5, r7, #0 -_021DC312: - add r0, r5, #0 - add r0, #0xbc - ldr r1, [r0, #0] - cmp r1, #0 - beq _021DC336 - mov r0, #0 - bl sub_02002F04 - cmp r6, r0 - bhs _021DC328 - add r6, r0, #0 -_021DC328: - add r0, r7, #0 - add r0, #0x9b - ldrb r0, [r0] - add r4, r4, #1 - add r5, #8 - cmp r4, r0 - blt _021DC312 -_021DC336: - add r6, #0xc - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DC300 - - thumb_func_start ov5_021DC33C -ov5_021DC33C: ; 0x021DC33C - add r2, r0, #0 - add r1, r0, #0 - add r2, #0xbc - add r1, #0xac - str r2, [r1, #0] - add r2, r0, #0 - add r1, r0, #0 - add r2, #8 - add r1, #0xb0 - str r2, [r1, #0] - add r1, r0, #0 - mov r2, #0 - add r1, #0xb4 - strb r2, [r1] - add r1, r0, #0 - mov r2, #1 - add r1, #0xb5 - strb r2, [r1] - add r1, r0, #0 - add r1, #0x9b - ldrb r2, [r1] - add r1, r0, #0 - add r1, #0xb6 - strb r2, [r1] - add r2, r0, #0 - add r2, #0xb7 - ldrb r3, [r2] - mov r2, #0xf - add r1, r0, #0 - bic r3, r2 - add r2, r0, #0 - add r2, #0xb7 - strb r3, [r2] - add r2, r0, #0 - add r2, #0xb7 - ldrb r3, [r2] - mov r2, #0x30 - add r1, #0xb7 - bic r3, r2 - add r2, r0, #0 - add r2, #0xb7 - strb r3, [r2] - add r0, #0x9b - ldrb r0, [r0] - ldrb r2, [r1] - cmp r0, #4 - blo _021DC3A6 - mov r0, #0xc0 - bic r2, r0 - mov r0, #0x40 - orr r0, r2 - strb r0, [r1] - bx lr -_021DC3A6: - mov r0, #0xc0 - bic r2, r0 - strb r2, [r1] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DC33C - - thumb_func_start ov5_021DC3B0 -ov5_021DC3B0: ; 0x021DC3B0 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - add r0, #0x94 - ldrb r0, [r0] - cmp r0, #0 - beq _021DC3CC - add r0, r4, #0 - add r0, #0x94 - ldrb r0, [r0] - add r4, #0x94 - sub r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_021DC3CC: - bl sub_0200F2AC - cmp r0, #0 - beq _021DC41C - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl sub_02001BE0 - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _021DC3EE - add r1, r1, #1 - cmp r0, r1 - beq _021DC41C - b _021DC40E -_021DC3EE: - add r0, r4, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021DC41C - add r0, r4, #0 - add r0, #0xa0 - ldr r1, _021DC420 ; =0x0000FFFE - ldr r0, [r0, #0] - strh r1, [r0] - add r0, r4, #0 - bl ov5_021DC424 - pop {r4, pc} -_021DC40E: - add r1, r4, #0 - add r1, #0xa0 - ldr r1, [r1, #0] - strh r0, [r1] - add r0, r4, #0 - bl ov5_021DC424 -_021DC41C: - pop {r4, pc} - nop -_021DC420: .word 0x0000FFFE - thumb_func_end ov5_021DC3B0 - - thumb_func_start ov5_021DC424 -ov5_021DC424: ; 0x021DC424 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _021DC488 ; =0x000005DC - bl sub_02005748 - add r0, r6, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02001BC4 - add r0, r6, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_021DC454: - ldr r0, [r5, #0x1c] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x1c - blt _021DC454 - add r0, r6, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021DC47A - add r0, r6, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_0200B190 -_021DC47A: - ldr r0, [r6, #4] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DC488: .word 0x000005DC - thumb_func_end ov5_021DC424 - - thumb_func_start ov5_021DC48C -ov5_021DC48C: ; 0x021DC48C - push {r3, r4, lr} - sub sp, #0x14 - add r4, sp, #0x10 - ldrb r4, [r4, #0x10] - str r4, [sp] - ldr r4, [sp, #0x24] - str r4, [sp, #4] - ldr r4, [sp, #0x28] - str r4, [sp, #8] - ldr r4, [sp, #0x2c] - str r4, [sp, #0xc] - ldr r4, [sp, #0x30] - str r4, [sp, #0x10] - bl ov5_021DC150 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DC48C - - thumb_func_start ov5_021DC4B0 -ov5_021DC4B0: ; 0x021DC4B0 - push {r3, lr} - bl ov5_021DC708 - pop {r3, pc} - thumb_func_end ov5_021DC4B0 - - thumb_func_start ov5_021DC4B8 -ov5_021DC4B8: ; 0x021DC4B8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021DC7A8 - mov r1, #7 - tst r1, r0 - bne _021DC4CA - lsr r1, r0, #3 - b _021DC4CE -_021DC4CA: - lsr r0, r0, #3 - add r1, r0, #1 -_021DC4CE: - add r0, r4, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - beq _021DC4E8 - add r0, r4, #0 - add r0, #0x98 - ldrb r0, [r0] - sub r2, r0, r1 - add r0, r4, #0 - add r0, #0x98 - strb r2, [r0] -_021DC4E8: - add r0, r4, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - beq _021DC51E - add r0, r4, #0 - add r0, #0x9b - ldrb r3, [r0] - cmp r3, #8 - bls _021DC50E - add r0, r4, #0 - add r0, #0x99 - ldrb r2, [r0] - add r0, r4, #0 - add r0, #0x99 - sub r2, #0x10 - strb r2, [r0] - b _021DC51E -_021DC50E: - add r0, r4, #0 - add r0, #0x99 - ldrb r2, [r0] - lsl r0, r3, #1 - sub r2, r2, r0 - add r0, r4, #0 - add r0, #0x99 - strb r2, [r0] -_021DC51E: - add r0, r4, #0 - bl ov5_021DC530 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DC4B8 - - thumb_func_start ov5_021DC528 -ov5_021DC528: ; 0x021DC528 - ldr r3, _021DC52C ; =ov5_021DC530 - bx r3 - ; .align 2, 0 -_021DC52C: .word ov5_021DC530 - thumb_func_end ov5_021DC528 - - thumb_func_start ov5_021DC530 -ov5_021DC530: ; 0x021DC530 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - add r0, #0x9b - ldrb r2, [r0] - cmp r2, #8 - bls _021DC56E - add r0, r4, #0 - add r0, #0x99 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x98 - str r0, [sp] - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r4, #0 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - b _021DC59E -_021DC56E: - add r0, r4, #0 - add r0, #0x99 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x98 - str r0, [sp] - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - lsl r0, r2, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r4, #0 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 -_021DC59E: - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r2, _021DC5F8 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r4, #0 - ldr r2, _021DC5F8 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - bl ov5_021DC7E4 - add r2, r4, #0 - add r2, #0x96 - mov r0, #0x67 - lsl r0, r0, #2 - ldrb r2, [r2] - add r0, r4, r0 - mov r1, #0 - mov r3, #4 - bl sub_0200112C - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - bl ov5_021DCAF4 - ldr r0, _021DC5FC ; =ov5_021DC95C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_021DC5F8: .word 0x000003D9 -_021DC5FC: .word ov5_021DC95C - thumb_func_end ov5_021DC530 - - thumb_func_start ov5_021DC600 -ov5_021DC600: ; 0x021DC600 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov5_021DC7A8 - mov r1, #7 - tst r1, r0 - bne _021DC618 - lsr r1, r0, #3 - b _021DC61C -_021DC618: - lsr r0, r0, #3 - add r1, r0, #1 -_021DC61C: - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - cmp r0, #8 - bls _021DC656 - add r0, r5, #0 - add r0, #0x99 - ldrb r0, [r0] - add r3, r5, #0 - add r3, #0x98 - str r0, [sp] - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, r5, #0 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - b _021DC686 -_021DC656: - add r2, r5, #0 - add r2, #0x99 - ldrb r2, [r2] - lsl r1, r1, #0x18 - lsl r0, r0, #0x19 - str r2, [sp] - lsr r1, r1, #0x18 - str r1, [sp, #4] - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - add r3, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r3, #0x98 - add r1, r5, #0 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 -_021DC686: - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r2, _021DC700 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r5, #0 - ldr r2, _021DC700 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - bl ov5_021DC7E4 - add r0, r5, #0 - add r0, #0xa4 - str r4, [r0, #0] - add r0, r5, #0 - add r0, #0xa8 - str r6, [r0, #0] - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - mov r3, #4 - ldrh r1, [r0] - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - ldrh r0, [r0] - add r1, r1, r0 - mov r0, #0xb7 - lsl r0, r0, #2 - strh r1, [r5, r0] - mov r0, #0x67 - lsl r0, r0, #2 - ldrh r1, [r4] - ldrh r2, [r6] - add r0, r5, r0 - bl sub_0200112C - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r5, #0 - bl ov5_021DCAF4 - ldr r0, _021DC704 ; =ov5_021DC95C - add r1, r5, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021DC700: .word 0x000003D9 -_021DC704: .word ov5_021DC95C - thumb_func_end ov5_021DC600 - - thumb_func_start ov5_021DC708 -ov5_021DC708: ; 0x021DC708 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r0, #0x50 - mov r1, #4 - add r7, r2, #0 - add r4, r3, #0 - bl sub_02023790 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [sp] - add r2, r6, #0 - bl sub_0200B1B8 - add r1, r5, #0 - add r1, #0x9b - ldrb r1, [r1] - add r0, r5, #0 - add r0, #0x90 - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r0, #0] - ldr r1, [r1, #0x1c] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0x9b - ldrb r1, [r0] - lsl r0, r1, #2 - add r0, r5, r0 - lsl r1, r1, #3 - add r2, r5, r1 - mov r1, #0x71 - ldr r0, [r0, #0x1c] - lsl r1, r1, #2 - str r0, [r2, r1] - add r0, r6, #0 - bl sub_020237BC - cmp r4, #0xfa - bne _021DC778 - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - mov r2, #2 - mvn r2, r2 - lsl r0, r0, #3 - add r1, r5, r0 - mov r0, #0x72 - lsl r0, r0, #2 - str r2, [r1, r0] - b _021DC788 -_021DC778: - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - lsl r0, r0, #3 - add r1, r5, r0 - mov r0, #0x72 - lsl r0, r0, #2 - str r4, [r1, r0] -_021DC788: - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - lsl r0, r0, #1 - add r1, r5, r0 - mov r0, #0xa9 - lsl r0, r0, #2 - strh r7, [r1, r0] - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - add r5, #0x9b - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DC708 - - thumb_func_start ov5_021DC7A8 -ov5_021DC7A8: ; 0x021DC7A8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, #0x9b - ldrb r0, [r0] - mov r6, #0 - add r4, r6, #0 - cmp r0, #0 - ble _021DC7DE - add r5, r7, #0 -_021DC7BA: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - beq _021DC7DE - mov r0, #0 - bl sub_02002F04 - cmp r6, r0 - bhs _021DC7D0 - add r6, r0, #0 -_021DC7D0: - add r0, r7, #0 - add r0, #0x9b - ldrb r0, [r0] - add r4, r4, #1 - add r5, #8 - cmp r4, r0 - blt _021DC7BA -_021DC7DE: - add r6, #0xc - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DC7A8 - - thumb_func_start ov5_021DC7E4 -ov5_021DC7E4: ; 0x021DC7E4 - push {r4, r5} - mov r3, #0x71 - lsl r3, r3, #2 - add r1, r3, #0 - add r2, r0, r3 - sub r1, #0x28 - str r2, [r0, r1] - add r1, r3, #0 - ldr r2, _021DC8E0 ; =ov5_021DC918 - sub r1, #0x24 - str r2, [r0, r1] - add r1, r3, #0 - ldr r2, _021DC8E4 ; =ov5_021DC8F4 - sub r1, #0x20 - str r2, [r0, r1] - add r2, r0, #0 - add r1, r3, #0 - add r2, #8 - sub r1, #0x1c - str r2, [r0, r1] - add r1, r0, #0 - add r1, #0x9b - ldrb r2, [r1] - add r1, r3, #0 - sub r1, #0x18 - strh r2, [r0, r1] - add r1, r3, #0 - mov r2, #8 - sub r1, #0x16 - strh r2, [r0, r1] - add r1, r3, #0 - mov r2, #1 - sub r1, #0x14 - strb r2, [r0, r1] - add r1, r3, #0 - mov r4, #0xc - sub r1, #0x13 - strb r4, [r0, r1] - add r1, r3, #0 - mov r4, #2 - sub r1, #0x12 - strb r4, [r0, r1] - add r1, r3, #0 - sub r1, #0x11 - ldrb r4, [r0, r1] - mov r1, #0xf - bic r4, r1 - orr r4, r2 - add r2, r3, #0 - sub r2, #0x11 - strb r4, [r0, r2] - add r2, r3, #0 - sub r2, #0x11 - ldrb r5, [r0, r2] - mov r2, #0xf0 - mov r4, #0x10 - bic r5, r2 - orr r5, r4 - add r4, r3, #0 - sub r4, #0x11 - strb r5, [r0, r4] - add r4, r3, #0 - sub r4, #0x10 - ldrb r4, [r0, r4] - bic r4, r1 - mov r1, #0xf - orr r4, r1 - add r1, r3, #0 - sub r1, #0x10 - strb r4, [r0, r1] - add r1, r3, #0 - sub r1, #0x10 - ldrb r4, [r0, r1] - mov r1, #0x20 - bic r4, r2 - add r2, r4, #0 - orr r2, r1 - add r1, r3, #0 - sub r1, #0x10 - strb r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - mov r1, #7 - bic r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - mov r1, #0x78 - bic r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - ldr r1, _021DC8E8 ; =0xFFFFFE7F - and r2, r1 - mov r1, #0x80 - orr r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - ldr r1, _021DC8EC ; =0xFFFF81FF - and r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - ldr r1, _021DC8F0 ; =0xFFFF7FFF - and r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - sub r3, #0xc - str r0, [r0, r3] - pop {r4, r5} - bx lr - ; .align 2, 0 -_021DC8E0: .word ov5_021DC918 -_021DC8E4: .word ov5_021DC8F4 -_021DC8E8: .word 0xFFFFFE7F -_021DC8EC: .word 0xFFFF81FF -_021DC8F0: .word 0xFFFF7FFF - thumb_func_end ov5_021DC7E4 - - thumb_func_start ov5_021DC8F4 -ov5_021DC8F4: ; 0x021DC8F4 - push {r3, lr} - mov r2, #2 - mvn r2, r2 - cmp r1, r2 - bne _021DC90A - mov r1, #3 - mov r2, #0xf - mov r3, #4 - bl sub_0200147C - pop {r3, pc} -_021DC90A: - mov r1, #1 - mov r2, #0xf - mov r3, #2 - bl sub_0200147C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DC8F4 - - thumb_func_start ov5_021DC918 -ov5_021DC918: ; 0x021DC918 - push {r3, r4, r5, lr} - mov r2, #0 - add r1, sp, #0 - strh r2, [r1, #2] - strh r2, [r1] - mov r1, #0x13 - add r5, r0, #0 - bl sub_02001504 - add r1, sp, #0 - add r4, r0, #0 - add r0, r5, #0 - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - add r0, r4, #0 - add r0, #0xa4 - ldr r2, [r0, #0] - cmp r2, #0 - beq _021DC95A - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DC95A - add r0, sp, #0 - ldrh r1, [r0, #2] - add r4, #0xa8 - strh r1, [r2] - ldrh r1, [r0] - ldr r0, [r4, #0] - strh r1, [r0] -_021DC95A: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DC918 - - thumb_func_start ov5_021DC95C -ov5_021DC95C: ; 0x021DC95C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r0, r5, #0 - add r0, #0x94 - ldrb r0, [r0] - cmp r0, #0 - beq _021DC978 - add r0, r5, #0 - add r0, #0x94 - ldrb r0, [r0] - add r5, #0x94 - sub r0, r0, #1 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021DC978: - bl sub_0200F2AC - cmp r0, #0 - beq _021DCA1A - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02001288 - add r4, r0, #0 - mov r0, #0x6f - mov r1, #0xb7 - lsl r0, r0, #2 - lsl r1, r1, #2 - ldrh r6, [r5, r1] - ldr r0, [r5, r0] - add r1, r5, r1 - bl sub_020014D0 - mov r0, #0xb7 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - cmp r6, r0 - beq _021DC9AE - ldr r0, _021DCA1C ; =0x000005DC - bl sub_02005748 -_021DC9AE: - ldr r0, _021DCA20 ; =0x021BF67C - mov r1, #0x40 - ldr r0, [r0, #0x4c] - tst r1, r0 - bne _021DC9CA - mov r1, #0x80 - tst r1, r0 - bne _021DC9CA - mov r1, #0x20 - tst r1, r0 - bne _021DC9CA - mov r1, #0x10 - tst r0, r1 - beq _021DC9D0 -_021DC9CA: - add r0, r5, #0 - bl ov5_021DCAF4 -_021DC9D0: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _021DC9E0 - add r0, r0, #1 - cmp r4, r0 - beq _021DCA1A - b _021DCA06 -_021DC9E0: - add r0, r5, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021DCA1A - ldr r0, _021DCA1C ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0xa0 - ldr r1, _021DCA24 ; =0x0000FFFE - ldr r0, [r0, #0] - strh r1, [r0] - add r0, r5, #0 - bl ov5_021DCA28 - pop {r4, r5, r6, pc} -_021DCA06: - ldr r0, _021DCA1C ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - strh r4, [r0] - add r0, r5, #0 - bl ov5_021DCA28 -_021DCA1A: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DCA1C: .word 0x000005DC -_021DCA20: .word 0x021BF67C -_021DCA24: .word 0x0000FFFE - thumb_func_end ov5_021DC95C - - thumb_func_start ov5_021DCA28 -ov5_021DCA28: ; 0x021DCA28 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _021DCA8C ; =0x000005DC - bl sub_02005748 - mov r0, #0x6f - lsl r0, r0, #2 - mov r1, #0 - ldr r0, [r6, r0] - add r2, r1, #0 - bl sub_02001384 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - add r0, #8 - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_021DCA58: - ldr r0, [r5, #0x1c] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x1c - blt _021DCA58 - add r0, r6, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021DCA7E - add r0, r6, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_0200B190 -_021DCA7E: - ldr r0, [r6, #4] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DCA8C: .word 0x000005DC - thumb_func_end ov5_021DCA28 - - thumb_func_start ov5_021DCA90 -ov5_021DCA90: ; 0x021DCA90 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - str r1, [sp, #0xc] - mov r0, #0x50 - mov r1, #4 - add r7, r2, #0 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x50 - mov r1, #4 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [r5, #0x18] - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [sp, #0xc] - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - str r7, [sp, #4] - str r3, [sp, #8] - ldr r0, [r5, #0x18] - mov r1, #1 - add r2, r6, #0 - bl sub_0201D738 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DCA90 - - thumb_func_start ov5_021DCAF4 -ov5_021DCAF4: ; 0x021DCAF4 - push {r4, lr} - mov r1, #0x6f - add r4, r0, #0 - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, r1, #6 - add r1, r4, r1 - bl sub_020014D0 - ldr r0, _021DCB20 ; =0x000001C2 - ldrh r1, [r4, r0] - add r0, #0xe2 - lsl r1, r1, #1 - add r1, r4, r1 - ldrh r1, [r1, r0] - cmp r1, #0xff - beq _021DCB1E - add r0, r4, #0 - mov r2, #0 - bl ov5_021DCA90 -_021DCB1E: - pop {r4, pc} - ; .align 2, 0 -_021DCB20: .word 0x000001C2 - thumb_func_end ov5_021DCAF4 - - thumb_func_start ov5_021DCB24 -ov5_021DCB24: ; 0x021DCB24 - push {r4, r5, lr} - sub sp, #0x14 - mov r4, #0 - str r4, [sp] - str r3, [sp, #4] - ldr r3, [sp, #0x20] - str r3, [sp, #8] - str r4, [sp, #0xc] - add r3, r4, #0 - str r4, [sp, #0x10] - bl ov5_021DC150 - add r5, r0, #0 - add r0, r4, #0 - add r1, r0, #0 - bl sub_02002DF8 - lsl r1, r0, #3 - mov r0, #7 - tst r0, r1 - bne _021DCB52 - lsr r4, r1, #3 - b _021DCB56 -_021DCB52: - lsr r0, r1, #3 - add r4, r0, #1 -_021DCB56: - add r0, r5, #0 - add r0, #0x99 - ldrb r0, [r0] - add r3, r5, #0 - add r1, r5, #0 - str r0, [sp] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xdd - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r3, #0x98 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r2, _021DCBF8 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r5, #0 - ldr r2, _021DCBF8 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - lsl r0, r4, #0x13 - lsr r0, r0, #0x10 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0 - add r0, #8 - mov r1, #0xf - add r3, r2, #0 - bl sub_0201AE78 - mov r2, #0 - add r0, r5, #0 - mov r1, #0xf - add r3, r2, #0 - bl ov5_021DCC00 - mov r1, #0x10 - add r0, r5, #0 - mov r2, #0x20 - add r3, r1, #0 - bl ov5_021DCC00 - add r0, r5, #0 - add r1, r5, #0 - add r0, #8 - add r1, #0xb0 - str r0, [r1, #0] - bl sub_0201A954 - ldr r0, _021DCBFC ; =ov5_021DCC64 - add r1, r5, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - add sp, #0x14 - pop {r4, r5, pc} - nop -_021DCBF8: .word 0x000003D9 -_021DCBFC: .word ov5_021DCC64 - thumb_func_end ov5_021DCB24 - - thumb_func_start ov5_021DCC00 -ov5_021DCC00: ; 0x021DCC00 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #0xc] - add r5, r0, #0 - mov r0, #0x50 - mov r1, #4 - str r2, [sp, #0x10] - add r7, r3, #0 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x50 - mov r1, #4 - bl sub_02023790 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [sp, #0xc] - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - str r7, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - add r5, #8 - ldr r3, [sp, #0x10] - add r0, r5, #0 - add r2, r6, #0 - bl sub_0201D738 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DCC00 - - thumb_func_start ov5_021DCC64 -ov5_021DCC64: ; 0x021DCC64 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r0, r6, #0 - add r0, #0xa0 - ldr r0, [r0, #0] - ldrh r1, [r0] - ldr r0, _021DCCC4 ; =0x0000FFFF - cmp r1, r0 - bne _021DCCC2 - add r0, r6, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_021DCC90: - ldr r0, [r5, #0x1c] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x1c - blt _021DCC90 - add r0, r6, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021DCCB6 - add r0, r6, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_0200B190 -_021DCCB6: - ldr r0, [r6, #4] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 -_021DCCC2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021DCCC4: .word 0x0000FFFF - thumb_func_end ov5_021DCC64 - - thumb_func_start ov5_021DCCC8 -ov5_021DCCC8: ; 0x021DCCC8 - cmp r0, #0x8a - bgt _021DCD0A - bge _021DCD68 - cmp r0, #0x68 - bgt _021DCCF8 - bge _021DCD48 - cmp r0, #0xe - bgt _021DCCF2 - add r1, r0, #0 - sub r1, #0xb - bmi _021DCD8C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DCCEA: ; jump table - .short _021DCD7C - _021DCCEA - 2 ; case 0 - .short _021DCD80 - _021DCCEA - 2 ; case 1 - .short _021DCD84 - _021DCCEA - 2 ; case 2 - .short _021DCD88 - _021DCCEA - 2 ; case 3 -_021DCCF2: - cmp r0, #0x67 - beq _021DCD44 - b _021DCD8C -_021DCCF8: - cmp r0, #0x71 - bgt _021DCD04 - bge _021DCD58 - cmp r0, #0x70 - beq _021DCD54 - b _021DCD8C -_021DCD04: - cmp r0, #0x89 - beq _021DCD64 - b _021DCD8C -_021DCD0A: - cmp r0, #0xa4 - bgt _021DCD2C - bge _021DCD4C - cmp r0, #0x8b - bgt _021DCD18 - beq _021DCD6C - b _021DCD8C -_021DCD18: - cmp r0, #0x96 - bgt _021DCD8C - cmp r0, #0x8c - blt _021DCD8C - beq _021DCD70 - cmp r0, #0x8d - beq _021DCD74 - cmp r0, #0x96 - beq _021DCD50 - b _021DCD8C -_021DCD2C: - ldr r1, _021DCD90 ; =0x000001CE - cmp r0, r1 - bgt _021DCD3C - bge _021DCD60 - sub r1, r1, #1 - cmp r0, r1 - beq _021DCD5C - b _021DCD8C -_021DCD3C: - add r1, #0x68 - cmp r0, r1 - beq _021DCD78 - b _021DCD8C -_021DCD44: - mov r0, #1 - bx lr -_021DCD48: - mov r0, #0 - bx lr -_021DCD4C: - mov r0, #0 - bx lr -_021DCD50: - mov r0, #1 - bx lr -_021DCD54: - mov r0, #1 - bx lr -_021DCD58: - mov r0, #0 - bx lr -_021DCD5C: - mov r0, #1 - bx lr -_021DCD60: - mov r0, #0 - bx lr -_021DCD64: - mov r0, #4 - bx lr -_021DCD68: - mov r0, #3 - bx lr -_021DCD6C: - mov r0, #2 - bx lr -_021DCD70: - mov r0, #1 - bx lr -_021DCD74: - mov r0, #0 - bx lr -_021DCD78: - mov r0, #5 - bx lr -_021DCD7C: - mov r0, #3 - bx lr -_021DCD80: - mov r0, #2 - bx lr -_021DCD84: - mov r0, #1 - bx lr -_021DCD88: - mov r0, #0 - bx lr -_021DCD8C: - mov r0, #1 - bx lr - ; .align 2, 0 -_021DCD90: .word 0x000001CE - thumb_func_end ov5_021DCCC8 - - thumb_func_start ov5_021DCD94 -ov5_021DCD94: ; 0x021DCD94 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021DC300 - mov r1, #7 - tst r1, r0 - bne _021DCDAA - lsr r7, r0, #3 - b _021DCDAE -_021DCDAA: - lsr r0, r0, #3 - add r7, r0, #1 -_021DCDAE: - add r0, r5, #0 - add r0, #0x9b - ldrb r0, [r0] - add r1, r6, #0 - str r0, [sp, #0x14] - bl sub_020E1F6C - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - ldr r0, [sp, #0x14] - add r1, r6, #0 - bl sub_020E1F6C - cmp r1, #0 - beq _021DCDD2 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_021DCDD2: - add r0, r5, #0 - add r0, #0x99 - ldrb r0, [r0] - add r3, r5, #0 - add r1, r5, #0 - str r0, [sp] - add r0, r7, #0 - mul r0, r6 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - lsl r0, r4, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r3, #0x98 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r2, _021DCE5C ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r5, #0 - ldr r2, _021DCE5C ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov5_021DCE64 - add r1, r5, #0 - add r1, #0x96 - add r0, r5, #0 - ldrb r1, [r1] - add r0, #0xac - mov r2, #4 - bl sub_02001B9C - add r1, r5, #0 - add r1, #0xb8 - str r0, [r1, #0] - ldr r0, _021DCE60 ; =ov5_021DC3B0 - add r1, r5, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r5, #4] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DCE5C: .word 0x000003D9 -_021DCE60: .word ov5_021DC3B0 - thumb_func_end ov5_021DCD94 - - thumb_func_start ov5_021DCE64 -ov5_021DCE64: ; 0x021DCE64 - push {r3, r4} - add r4, r0, #0 - add r3, r0, #0 - add r4, #0xbc - add r3, #0xac - str r4, [r3, #0] - add r4, r0, #0 - add r3, r0, #0 - add r4, #8 - add r3, #0xb0 - str r4, [r3, #0] - add r3, r0, #0 - mov r4, #0 - add r3, #0xb4 - strb r4, [r3] - add r3, r0, #0 - add r3, #0xb5 - strb r1, [r3] - add r1, r0, #0 - add r1, #0xb6 - strb r2, [r1] - add r1, r0, #0 - add r1, #0xb7 - ldrb r2, [r1] - mov r1, #0xf - bic r2, r1 - add r1, r0, #0 - add r1, #0xb7 - strb r2, [r1] - add r1, r0, #0 - add r1, #0xb7 - ldrb r2, [r1] - mov r1, #0x30 - add r0, #0xb7 - bic r2, r1 - strb r2, [r0] - pop {r3, r4} - bx lr - thumb_func_end ov5_021DCE64 - - thumb_func_start ov5_021DCEB0 -ov5_021DCEB0: ; 0x021DCEB0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - mov r0, #4 - mov r1, #1 - bl sub_0201A778 - add r4, r0, #0 - str r6, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, r4, #0 - mov r2, #3 - add r3, r7, #0 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #8] - ldr r2, _021DCF50 ; =0x000003D9 - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - ldr r2, _021DCF50 ; =0x000003D9 - add r0, r4, #0 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r2, _021DCF54 ; =0x0000021F - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - mov r1, #0x12 - add r7, r0, #0 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r7, #0 - bl sub_0200B190 - add r0, r6, #0 - bl sub_020237BC - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021DCF6C - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DCF50: .word 0x000003D9 -_021DCF54: .word 0x0000021F - thumb_func_end ov5_021DCEB0 - - thumb_func_start ov5_021DCF58 -ov5_021DCF58: ; 0x021DCF58 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl sub_0200DC9C - add r0, r4, #0 - mov r1, #1 - bl sub_0201A928 - pop {r4, pc} - thumb_func_end ov5_021DCF58 - - thumb_func_start ov5_021DCF6C -ov5_021DCF6C: ; 0x021DCF6C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0x50 - str r0, [sp] - mov r3, #0x10 - add r0, r5, #0 - mov r1, #0xf - mov r2, #0 - str r3, [sp, #4] - bl sub_0201AE78 - ldr r2, _021DD01C ; =0x0000021F - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - str r0, [sp, #0xc] - mov r0, #4 - bl sub_0200B358 - add r6, r0, #0 - mov r0, #0x10 - mov r1, #4 - bl sub_02023790 - add r4, r0, #0 - ldr r0, [sp, #0xc] - mov r1, #0x13 - bl sub_0200B1EC - str r0, [sp, #0x10] - ldr r0, [r7, #0xc] - bl sub_02025E38 - bl sub_02025F74 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - ldr r2, [sp, #0x10] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x50 - sub r3, r1, r0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r5, #0 - add r2, r4, #0 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 - ldr r0, [sp, #0xc] - bl sub_0200B190 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DD01C: .word 0x0000021F - thumb_func_end ov5_021DCF6C - - thumb_func_start ov5_021DD020 -ov5_021DD020: ; 0x021DD020 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - mov r0, #4 - mov r1, #1 - bl sub_0201A778 - add r4, r0, #0 - str r6, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x29 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, r4, #0 - mov r2, #3 - add r3, r7, #0 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #8] - ldr r2, _021DD080 ; =0x000003D9 - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - ldr r2, _021DD080 ; =0x000003D9 - add r0, r4, #0 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021DD098 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD080: .word 0x000003D9 - thumb_func_end ov5_021DD020 - - thumb_func_start ov5_021DD084 -ov5_021DD084: ; 0x021DD084 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl sub_0200DC9C - add r0, r4, #0 - mov r1, #1 - bl sub_0201A928 - pop {r4, pc} - thumb_func_end ov5_021DD084 - - thumb_func_start ov5_021DD098 -ov5_021DD098: ; 0x021DD098 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - str r1, [sp, #0xc] - add r0, r1, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r2, _021DD13C ; =0x00000169 - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r7, r0, #0 - mov r0, #4 - bl sub_0200B358 - add r5, r0, #0 - mov r0, #0x10 - mov r1, #4 - bl sub_02023790 - add r4, r0, #0 - add r0, r7, #0 - mov r1, #0xc5 - bl sub_0200B1EC - str r0, [sp, #0x10] - ldr r0, [r6, #0xc] - bl sub_02025E50 - bl sub_0202B5B4 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #5 - bl sub_0200B60C - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x50 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r2, r4, #0 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_0200B3F0 - add r0, r7, #0 - bl sub_0200B190 - ldr r0, [sp, #0xc] - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DD13C: .word 0x00000169 - thumb_func_end ov5_021DD098 - - thumb_func_start ov5_021DD140 -ov5_021DD140: ; 0x021DD140 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - mov r0, #4 - mov r1, #1 - bl sub_0201A778 - add r4, r0, #0 - str r6, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x29 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, r4, #0 - mov r2, #3 - add r3, r7, #0 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r5, #8] - ldr r2, _021DD1A0 ; =0x000003D9 - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - ldr r2, _021DD1A0 ; =0x000003D9 - add r0, r4, #0 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021DD1A4 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD1A0: .word 0x000003D9 - thumb_func_end ov5_021DD140 - - thumb_func_start ov5_021DD1A4 -ov5_021DD1A4: ; 0x021DD1A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - str r1, [sp, #0xc] - add r0, r1, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r2, _021DD24C ; =0x00000169 - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - add r7, r0, #0 - mov r0, #4 - bl sub_0200B358 - add r5, r0, #0 - mov r0, #0x10 - mov r1, #4 - bl sub_02023790 - add r4, r0, #0 - add r0, r7, #0 - mov r1, #0xe6 - bl sub_0200B1EC - str r0, [sp, #0x10] - ldr r0, [r6, #0xc] - bl sub_0202D750 - mov r1, #0 - add r2, r1, #0 - bl sub_0202D230 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #5 - bl sub_0200B60C - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x50 - sub r3, r1, r0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r2, r4, #0 - str r1, [sp, #8] - bl sub_0201D738 - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_0200B3F0 - add r0, r7, #0 - bl sub_0200B190 - ldr r0, [sp, #0xc] - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021DD24C: .word 0x00000169 - thumb_func_end ov5_021DD1A4 - - thumb_func_start ov5_021DD250 -ov5_021DD250: ; 0x021DD250 - push {r4, r5, lr} - sub sp, #0x14 - mov r4, #0 - str r4, [sp] - str r3, [sp, #4] - ldr r5, [sp, #0x20] - add r3, r4, #0 - str r5, [sp, #8] - str r4, [sp, #0xc] - str r4, [sp, #0x10] - bl ov5_021DC150 - add r4, r0, #0 - add r0, #0x99 - ldrb r0, [r0] - add r3, r4, #0 - add r1, r4, #0 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x3d - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r3, #0x98 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r2, _021DD394 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r4, #0 - ldr r2, _021DD394 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r0, #0x50 - str r0, [sp] - mov r0, #0x80 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0 - add r0, #8 - mov r1, #0xf - add r3, r2, #0 - bl sub_0201AE78 - mov r2, #0 - ldr r1, _021DD398 ; =0x00000111 - add r0, r4, #0 - add r3, r2, #0 - bl ov5_021DCC00 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r2, sp, #0x10 - ldrb r2, [r2, #0x14] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - ldr r1, _021DD39C ; =0x00000115 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x10 - bl ov5_021DCC00 - ldr r1, _021DD3A0 ; =0x00000112 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x20 - bl ov5_021DCC00 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r2, sp, #0x10 - ldrb r2, [r2, #0x18] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - ldr r1, _021DD39C ; =0x00000115 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x30 - bl ov5_021DCC00 - ldr r1, _021DD3A4 ; =0x00000113 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x40 - bl ov5_021DCC00 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r2, sp, #0x10 - ldrb r2, [r2, #0x1c] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - ldr r1, _021DD39C ; =0x00000115 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x50 - bl ov5_021DCC00 - mov r1, #0x45 - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #0 - mov r3, #0x60 - bl ov5_021DCC00 - add r2, sp, #0x30 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldrb r2, [r2] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - ldr r1, _021DD39C ; =0x00000115 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x70 - bl ov5_021DCC00 - add r0, r4, #0 - add r1, r4, #0 - add r0, #8 - add r1, #0xb0 - str r0, [r1, #0] - bl sub_0201A954 - add r0, r4, #0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_021DD394: .word 0x000003D9 -_021DD398: .word 0x00000111 -_021DD39C: .word 0x00000115 -_021DD3A0: .word 0x00000112 -_021DD3A4: .word 0x00000113 - thumb_func_end ov5_021DD250 - - thumb_func_start ov5_021DD3A8 -ov5_021DD3A8: ; 0x021DD3A8 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_021DD3C4: - ldr r0, [r5, #0x1c] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x1c - blt _021DD3C4 - add r0, r6, #0 - add r0, #0x97 - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021DD3EA - add r0, r6, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_0200B190 -_021DD3EA: - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD3A8 - - thumb_func_start ov5_021DD3F4 -ov5_021DD3F4: ; 0x021DD3F4 - add r2, r0, #0 - add r2, #0x97 - ldrb r3, [r2] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #0x40 - lsl r1, r1, #0x1f - bic r3, r2 - lsr r1, r1, #0x19 - orr r1, r3 - add r0, #0x97 - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DD3F4 - - thumb_func_start ov5_021DD410 -ov5_021DD410: ; 0x021DD410 - add r2, r0, #0 - add r2, #0x97 - ldrb r3, [r2] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #0x80 - lsl r1, r1, #0x1f - bic r3, r2 - lsr r1, r1, #0x18 - orr r1, r3 - add r0, #0x97 - strb r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DD410 - - thumb_func_start ov5_021DD42C -ov5_021DD42C: ; 0x021DD42C - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl ov5_021DD574 - strb r0, [r4] - mov r0, #0 - strb r0, [r4, #1] - mov r0, #1 - strb r0, [r4, #2] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD42C - - thumb_func_start ov5_021DD444 -ov5_021DD444: ; 0x021DD444 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - str r3, [sp, #4] - add r0, #0x80 - add r6, r1, #0 - ldr r0, [r0, #0] - add r1, sp, #8 - add r7, r2, #0 - ldr r4, [sp, #0x38] - bl ov5_021DD588 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r1, sp, #8 - bl ov5_021DD610 - add r0, sp, #8 - add r1, r6, #0 - add r2, r7, #0 - bl ov5_021DD648 - cmp r4, #0 - bne _021DD484 - add r0, r5, #0 - bl ov5_021DD574 - add r2, r0, #0 - mov r0, #0 - mov r1, #1 - b _021DD48A -_021DD484: - ldrb r2, [r4] - ldrb r0, [r4, #1] - ldrb r1, [r4, #2] -_021DD48A: - str r0, [sp] - ldr r3, [sp, #4] - add r0, sp, #8 - bl ov5_021DD6B4 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DD444 - - thumb_func_start ov5_021DD498 -ov5_021DD498: ; 0x021DD498 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - add r0, #0x80 - add r4, r1, #0 - ldr r0, [r0, #0] - add r1, sp, #0 - add r6, r2, #0 - bl ov5_021DD588 - add r5, #0x80 - ldr r0, [r5, #0] - add r1, sp, #0 - bl ov5_021DD610 - add r0, sp, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021DD648 - add r0, sp, #0 - mov r1, #1 - bl ov5_021DD6DC - add sp, #0x18 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DD498 - - thumb_func_start ov5_021DD4CC -ov5_021DD4CC: ; 0x021DD4CC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r0, #0x80 - add r4, r1, #0 - ldr r0, [r0, #0] - add r1, sp, #4 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021DD588 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r1, sp, #4 - bl ov5_021DD610 - add r0, sp, #0x20 - ldrh r0, [r0, #0x10] - add r1, r4, #0 - add r2, r6, #0 - str r0, [sp] - add r0, sp, #4 - add r3, r7, #0 - bl ov5_021DD664 - add r0, sp, #0x20 - ldrb r0, [r0, #0x14] - cmp r0, #0xff - beq _021DD524 - add r0, r5, #0 - bl ov5_021DD574 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - add r3, sp, #0x20 - ldrb r3, [r3, #0x14] - add r0, sp, #4 - mov r1, #1 - bl ov5_021DD6B4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} -_021DD524: - add r0, sp, #4 - mov r1, #1 - bl ov5_021DD6DC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021DD4CC - - thumb_func_start ov5_021DD530 -ov5_021DD530: ; 0x021DD530 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r5, r0, #0 - add r0, #0x80 - add r4, r2, #0 - ldr r0, [r0, #0] - add r2, sp, #4 - add r6, r3, #0 - bl ov5_021DD5D0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r1, sp, #4 - bl ov5_021DD610 - ldr r1, [r5, #0x78] - add r0, sp, #4 - add r2, r4, #0 - bl ov5_021DD648 - add r0, r5, #0 - bl ov5_021DD574 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - add r0, sp, #4 - mov r1, #1 - add r3, r6, #0 - bl ov5_021DD6B4 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021DD530 - - thumb_func_start ov5_021DD574 -ov5_021DD574: ; 0x021DD574 - push {r3, lr} - add r0, #0x80 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_02025E44 - bl sub_02027AC0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD574 - - thumb_func_start ov5_021DD588 -ov5_021DD588: ; 0x021DD588 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x10 - add r5, r0, #0 - bl sub_0203F098 - ldr r0, [r0, #0] - mov r1, #0x11 - str r0, [r4, #0] - add r0, r5, #0 - bl sub_0203F098 - ldr r0, [r0, #0] - mov r1, #0xf - str r0, [r4, #4] - add r0, r5, #0 - bl sub_0203F098 - ldr r0, [r0, #0] - mov r1, #1 - str r0, [r4, #8] - add r0, r5, #0 - bl sub_0203F098 - str r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #6 - bl sub_0203F098 - str r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl sub_0203F098 - str r0, [r4, #0x14] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DD588 - - thumb_func_start ov5_021DD5D0 -ov5_021DD5D0: ; 0x021DD5D0 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x10 - add r5, r0, #0 - add r4, r2, #0 - bl sub_0203F098 - ldr r0, [r0, #0] - mov r1, #0x11 - str r0, [r4, #0] - add r0, r5, #0 - bl sub_0203F098 - ldr r0, [r0, #0] - mov r1, #1 - str r0, [r4, #4] - str r6, [r4, #8] - add r0, r5, #0 - bl sub_0203F098 - str r0, [r4, #0xc] - add r0, r5, #0 - mov r1, #6 - bl sub_0203F098 - str r0, [r4, #0x10] - add r0, r5, #0 - mov r1, #3 - bl sub_0203F098 - str r0, [r4, #0x14] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DD5D0 - - thumb_func_start ov5_021DD610 -ov5_021DD610: ; 0x021DD610 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x10] - ldrb r0, [r0] - cmp r0, #0 - bne _021DD63C - ldr r0, [r5, #8] - ldr r1, [r4, #0xc] - mov r2, #3 - bl sub_0205D8F4 - ldr r0, [r5, #0xc] - bl sub_02025E44 - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0205D944 - ldr r0, [r4, #0x10] - mov r1, #1 - strb r1, [r0] -_021DD63C: - ldr r0, [r4, #0xc] - mov r1, #0xf - bl sub_0201ADA4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD610 - - thumb_func_start ov5_021DD648 -ov5_021DD648: ; 0x021DD648 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - ldr r2, [r4, #4] - bl sub_0200B1B8 - ldr r0, [r4, #8] - ldr r1, [r4, #0] - ldr r2, [r4, #4] - bl sub_0200C388 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD648 - - thumb_func_start ov5_021DD664 -ov5_021DD664: ; 0x021DD664 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r0, sp, #0 - add r7, r3, #0 - bl sub_02014A84 - add r0, sp, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02014CE0 - add r0, sp, #0 - mov r1, #0 - add r2, r7, #0 - bl sub_02014CF8 - add r2, sp, #0x10 - ldrh r2, [r2, #0x10] - add r0, sp, #0 - mov r1, #1 - bl sub_02014CF8 - add r0, sp, #0 - mov r1, #0x20 - bl sub_02014B34 - add r4, r0, #0 - ldr r0, [r5, #0] - add r1, r4, #0 - bl sub_02023810 - add r0, r4, #0 - bl sub_020237BC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD664 - - thumb_func_start ov5_021DD6B4 -ov5_021DD6B4: ; 0x021DD6B4 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r0, #0 - lsl r0, r3, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x18] - add r5, r2, #0 - str r0, [sp, #4] - add r6, r1, #0 - ldr r0, [r4, #0xc] - ldr r1, [r4, #0] - add r2, r6, #0 - add r3, r5, #0 - bl sub_0205D9CC - ldr r1, [r4, #0x14] - strb r0, [r1] - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DD6B4 - - thumb_func_start ov5_021DD6DC -ov5_021DD6DC: ; 0x021DD6DC - push {r3, r4, lr} - sub sp, #0xc - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - add r4, r0, #0 - str r3, [sp, #8] - ldr r0, [r4, #0xc] - ldr r2, [r4, #0] - bl sub_0201D738 - ldr r1, [r4, #0x14] - strb r0, [r1] - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD6DC - - thumb_func_start ov5_021DD6FC -ov5_021DD6FC: ; 0x021DD6FC - push {r4, r5, r6, lr} - lsl r6, r1, #5 - add r5, r0, #0 - add r4, r2, #0 - add r1, r6, #0 - bl sub_020C2C54 - add r0, r5, #0 - lsl r1, r4, #5 - add r2, r6, #0 - bl sub_020C00B4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD6FC - - thumb_func_start ov5_021DD718 -ov5_021DD718: ; 0x021DD718 - push {lr} - sub sp, #0x14 - mov r3, #0 - add r1, r0, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #7 - str r0, [sp, #0xc] - ldr r0, _021DD740 ; =0x00000197 - mov r2, #3 - str r0, [sp, #0x10] - ldr r0, [r1, #0x1c] - add r1, #0x20 - bl sub_0201A7E8 - add sp, #0x14 - pop {pc} - ; .align 2, 0 -_021DD740: .word 0x00000197 - thumb_func_end ov5_021DD718 - - thumb_func_start ov5_021DD744 -ov5_021DD744: ; 0x021DD744 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - str r3, [sp, #4] - add r0, #0x31 - ldrb r0, [r0] - add r3, r5, #0 - add r6, r2, #0 - lsl r0, r0, #0x19 - lsr r4, r0, #0x18 - mov r0, #4 - add r7, r1, #0 - str r0, [sp] - mov r0, #0xa0 - add r1, r4, #0 - mov r2, #0 - add r3, #0x34 - bl sub_02006F50 - str r0, [r5, #0x38] - ldr r3, [r5, #0x34] - add r1, r7, #0 - str r6, [sp] - ldr r2, [r3, #0x14] - ldr r0, [r5, #0x1c] - ldr r3, [r3, #0x10] - bl sub_0201958C - mov r0, #0xa0 - add r1, r4, #1 - add r2, sp, #8 - mov r3, #4 - bl sub_02006F88 - add r4, r0, #0 - ldr r0, [sp, #8] - ldr r2, [sp, #4] - ldr r0, [r0, #0xc] - mov r1, #1 - bl ov5_021DD6FC - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021DD744 - - thumb_func_start ov5_021DD7A0 -ov5_021DD7A0: ; 0x021DD7A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r2, r1, #0 - add r2, #8 - add r6, r0, #0 - asr r0, r2, #2 - lsr r0, r0, #0x1d - add r0, r2, r0 - asr r0, r0, #3 - lsl r0, r0, #3 - sub r2, r0, r1 - lsr r0, r2, #0x1f - add r0, r2, r0 - asr r0, r0, #1 - add r2, r0, #4 - cmp r2, #8 - blt _021DD7C6 - mov r3, #0 - b _021DD7D8 -_021DD7C6: - mov r0, #8 - sub r0, r0, r2 - lsl r0, r0, #1 - add r2, r0, #7 - asr r0, r2, #2 - lsr r0, r0, #0x1d - add r0, r2, r0 - lsl r0, r0, #0x15 - lsr r3, r0, #0x18 -_021DD7D8: - cmp r1, #0 - bgt _021DD7E0 - mov r0, #0 - b _021DD7FA -_021DD7E0: - add r2, r1, #0 - add r2, #8 - asr r0, r2, #2 - lsr r0, r0, #0x1d - add r0, r2, r0 - asr r0, r0, #3 - add r0, r0, r3 - lsl r0, r0, #3 - add r0, #8 - sub r1, r0, r1 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 -_021DD7FA: - add r1, r0, #4 - add r0, r6, #0 - add r0, #0x30 - strb r1, [r0] - mov r0, #0 - str r0, [sp] - ldr r2, _021DD87C ; =0x000002D9 - add r0, r6, #0 - mov r1, #3 - mov r3, #7 - bl ov5_021DD744 - add r0, r6, #0 - add r0, #0x20 - mov r1, #0 - bl sub_0201ADA4 - add r0, r6, #0 - mov r4, #0 - str r0, [sp, #0x18] - add r0, #0x20 - add r5, r4, #0 - str r0, [sp, #0x18] -_021DD828: - add r0, r4, #0 - mov r1, #0x11 - bl sub_020E1F6C - add r7, r1, #0 - add r0, r4, #0 - mov r1, #0x11 - bl sub_020E1F6C - mov r1, #8 - str r1, [sp] - str r1, [sp, #4] - lsl r1, r7, #0x13 - lsr r1, r1, #0x10 - lsl r0, r0, #0x13 - lsl r2, r5, #0x10 - str r1, [sp, #8] - lsr r0, r0, #0x10 - str r0, [sp, #0xc] - mov r0, #8 - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [r6, #0x34] - ldr r0, [sp, #0x18] - ldr r1, [r1, #0x14] - lsr r2, r2, #0x10 - mov r3, #0 - bl sub_0201ADDC - add r4, r4, #1 - add r5, #8 - cmp r4, #0x55 - blt _021DD828 - add r0, r6, #0 - add r0, #0x20 - bl sub_0201A954 - ldr r0, [r6, #0x38] - bl sub_020181C4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DD87C: .word 0x000002D9 - thumb_func_end ov5_021DD7A0 - - thumb_func_start ov5_021DD880 -ov5_021DD880: ; 0x021DD880 - mov r1, #0 - str r1, [r0, #0] - strb r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - strh r1, [r0, #0x10] - str r1, [r0, #0x14] - str r1, [r0, #0x18] - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov5_021DD880 - - thumb_func_start ov5_021DD894 -ov5_021DD894: ; 0x021DD894 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021DD880 - str r4, [r5, #0x1c] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD894 - - thumb_func_start ov5_021DD8A4 -ov5_021DD8A4: ; 0x021DD8A4 - push {r4, lr} - add r4, r1, #0 - ldrb r0, [r4, #4] - cmp r0, #3 - bhi _021DD950 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DD8BA: ; jump table - .short _021DD950 - _021DD8BA - 2 ; case 0 - .short _021DD8C2 - _021DD8BA - 2 ; case 1 - .short _021DD900 - _021DD8BA - 2 ; case 2 - .short _021DD8EA - _021DD8BA - 2 ; case 3 -_021DD8C2: - ldr r0, [r4, #0xc] - sub r0, r0, #4 - str r0, [r4, #0xc] - bpl _021DD8CE - mov r0, #0 - str r0, [r4, #0xc] -_021DD8CE: - mov r1, #3 - ldr r0, [r4, #0x1c] - ldr r3, [r4, #0xc] - add r2, r1, #0 - bl sub_02019184 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _021DD950 - mov r0, #0 - strh r0, [r4, #0x10] - mov r0, #3 - strb r0, [r4, #4] - pop {r4, pc} -_021DD8EA: - ldrh r0, [r4, #0x10] - add r0, r0, #1 - strh r0, [r4, #0x10] - ldrh r0, [r4, #0x10] - cmp r0, #0x3c - blo _021DD950 - mov r0, #0 - strh r0, [r4, #0x10] - mov r0, #2 - strb r0, [r4, #4] - pop {r4, pc} -_021DD900: - ldr r0, [r4, #0xc] - add r0, r0, #4 - str r0, [r4, #0xc] - cmp r0, #0x26 - ble _021DD90E - mov r0, #0x26 - str r0, [r4, #0xc] -_021DD90E: - mov r1, #3 - ldr r0, [r4, #0x1c] - ldr r3, [r4, #0xc] - add r2, r1, #0 - bl sub_02019184 - ldr r0, [r4, #0xc] - cmp r0, #0x26 - bne _021DD950 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021DD94A - mov r0, #0 - str r0, [r4, #0x14] - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x18] - ldr r2, [r4, #0x40] - bl sub_02071CFC - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021DD7A0 - ldr r1, [r4, #0x40] - add r0, r4, #0 - bl ov5_021DD954 - mov r0, #1 - strb r0, [r4, #4] - pop {r4, pc} -_021DD94A: - add r0, r4, #0 - bl ov5_021DDA78 -_021DD950: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DD8A4 - - thumb_func_start ov5_021DD954 -ov5_021DD954: ; 0x021DD954 - push {r3, lr} - sub sp, #0x10 - add r3, r0, #0 - mov r0, #0x10 - add r2, r1, #0 - str r0, [sp] - mov r1, #0 - ldr r0, _021DD97C ; =0x00030200 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r3, #0 - str r1, [sp, #0xc] - add r3, #0x30 - ldrb r3, [r3] - add r0, #0x20 - bl sub_0201D78C - add sp, #0x10 - pop {r3, pc} - nop -_021DD97C: .word 0x00030200 - thumb_func_end ov5_021DD954 - - thumb_func_start ov5_021DD980 -ov5_021DD980: ; 0x021DD980 - mov r1, #2 - strb r1, [r0, #4] - mov r1, #0 - strh r1, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DD980 - - thumb_func_start ov5_021DD98C -ov5_021DD98C: ; 0x021DD98C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - mov r1, #0x44 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0x16 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x40] - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DD894 - add r0, r4, #0 - bl ov5_021DD718 - ldr r2, _021DD9C4 ; =0x000001B1 - mov r0, #1 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - str r0, [r4, #0x3c] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DD9C4: .word 0x000001B1 - thumb_func_end ov5_021DD98C - - thumb_func_start ov5_021DD9C8 -ov5_021DD9C8: ; 0x021DD9C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0200B190 - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A8FC - ldr r0, [r4, #0x40] - bl sub_020237BC - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021DD9C8 - - thumb_func_start ov5_021DD9E8 -ov5_021DD9E8: ; 0x021DD9E8 - push {r3, r4, r5, lr} - add r4, r0, #0 - str r1, [r4, #0x18] - ldr r1, [r4, #0] - add r5, r2, #0 - cmp r1, #0 - bne _021DDA3C - mov r0, #1 - str r0, [r4, #0] - mov r1, #3 - ldr r0, [r4, #0x1c] - add r2, r1, #0 - mov r3, #0x26 - bl sub_02019184 - mov r0, #0x26 - str r0, [r4, #0xc] - ldr r0, _021DDA74 ; =ov5_021DD8A4 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #8] - mov r0, #1 - strb r0, [r4, #4] - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x18] - ldr r2, [r4, #0x40] - bl sub_02071CFC - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x31 - strb r5, [r0] - add r0, r4, #0 - bl ov5_021DD7A0 - ldr r1, [r4, #0x40] - add r0, r4, #0 - bl ov5_021DD954 - pop {r3, r4, r5, pc} -_021DDA3C: - ldrb r1, [r4, #4] - cmp r1, #3 - bhi _021DDA6E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DDA4E: ; jump table - .short _021DDA6E - _021DDA4E - 2 ; case 0 - .short _021DDA56 - _021DDA4E - 2 ; case 1 - .short _021DDA64 - _021DDA4E - 2 ; case 2 - .short _021DDA56 - _021DDA4E - 2 ; case 3 -_021DDA56: - bl ov5_021DD980 - mov r0, #1 - str r0, [r4, #0x14] - add r4, #0x31 - strb r5, [r4] - pop {r3, r4, r5, pc} -_021DDA64: - mov r0, #1 - str r0, [r4, #0x14] - add r4, #0x31 - strb r5, [r4] - pop {r3, r4, r5, pc} -_021DDA6E: - bl sub_02022974 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DDA74: .word ov5_021DD8A4 - thumb_func_end ov5_021DD9E8 - - thumb_func_start ov5_021DDA78 -ov5_021DDA78: ; 0x021DDA78 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021DDA86 - bl sub_0200DA58 -_021DDA86: - add r0, r4, #0 - add r0, #0x20 - bl sub_0201ACF4 - mov r1, #3 - ldr r0, [r4, #0x1c] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r1, [r4, #0x1c] - add r0, r4, #0 - bl ov5_021DD894 - pop {r4, pc} - thumb_func_end ov5_021DDA78 - - thumb_func_start ov5_021DDAA4 -ov5_021DDAA4: ; 0x021DDAA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A154 - cmp r0, #0 - beq _021DDAE2 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A288 - cmp r0, #0 - bne _021DDAE2 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A138 - add r4, r0, #0 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A154 - add r2, r0, #0 - beq _021DDAD8 - sub r2, r2, #1 -_021DDAD8: - ldr r0, [r5, #4] - add r1, r4, #0 - ldr r0, [r0, #8] - bl ov5_021DD9E8 -_021DDAE2: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DDAA4 - - thumb_func_start ov5_021DDAE4 -ov5_021DDAE4: ; 0x021DDAE4 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #4 - bhi _021DDBB8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DDB0A: ; jump table - .short _021DDB14 - _021DDB0A - 2 ; case 0 - .short _021DDB2C - _021DDB0A - 2 ; case 1 - .short _021DDB44 - _021DDB0A - 2 ; case 2 - .short _021DDB88 - _021DDB0A - 2 ; case 3 - .short _021DDBA2 - _021DDB0A - 2 ; case 4 -_021DDB14: - mov r0, #2 - add r1, r0, #0 - str r0, [sp] - sub r1, #0x12 - mov r2, #0 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDBB8 -_021DDB2C: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021DDBB8 - ldr r0, [r5, #8] - bl ov24_02253DA4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDBB8 -_021DDB44: - ldr r0, [r5, #8] - bl ov24_02253DB4 - cmp r0, #0 - beq _021DDBB8 - ldr r0, [r5, #0xc] - bl sub_02056B24 - add r6, r0, #0 - ldr r0, _021DDBC0 ; =0x00000018 - bl sub_02006514 - ldr r0, _021DDBC4 ; =0x00000019 - mov r1, #2 - bl sub_02006590 - add r0, r6, #0 - bl sub_020567D0 - mov r0, #1 - bl sub_0200A914 - str r0, [sp] - ldr r1, [r5, #4] - ldr r2, [r5, #0xc] - ldr r3, [r5, #8] - add r0, r5, #0 - add r1, #0x14 - bl ov25_02253CE8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDBB8 -_021DDB88: - mov r1, #0 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #4 - sub r2, #0x10 - mov r3, #0x3f - bl sub_0200AAE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDBB8 -_021DDBA2: - mov r0, #2 - bl sub_0200AC1C - cmp r0, #0 - beq _021DDBB8 - add r0, r4, #0 - bl sub_020181C4 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021DDBB8: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021DDBC0: .word 0x00000018 -_021DDBC4: .word 0x00000019 - thumb_func_end ov5_021DDAE4 - - thumb_func_start ov5_021DDBC8 -ov5_021DDBC8: ; 0x021DDBC8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb - mov r1, #4 - bl sub_02018184 - add r2, r0, #0 - mov r0, #0 - str r0, [r2, #0] - ldr r1, _021DDBE4 ; =ov5_021DDAE4 - add r0, r4, #0 - bl sub_02050944 - pop {r4, pc} - ; .align 2, 0 -_021DDBE4: .word ov5_021DDAE4 - thumb_func_end ov5_021DDBC8 - - thumb_func_start ov5_021DDBE8 -ov5_021DDBE8: ; 0x021DDBE8 - push {r4, r5, r6, lr} - add r5, r1, #0 - lsl r1, r0, #2 - ldr r0, _021DDC24 ; =0x021F9A74 - add r6, r2, #0 - ldr r0, [r0, r1] - mov r1, #0x24 - mov r2, #5 - mov r3, #4 - bl sub_0200679C - bl sub_0201CED0 - add r4, r0, #0 - str r5, [r4, #0x10] - str r6, [r4, #0x14] - mov r0, #0x70 - mov r1, #4 - bl sub_02006C24 - str r0, [r4, #0x20] - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021DDC1C - mov r0, #0 - str r0, [r1, #0] -_021DDC1C: - mov r0, #0 - str r0, [r4, #0x18] - pop {r4, r5, r6, pc} - nop -_021DDC24: .word 0x021F9A74 - thumb_func_end ov5_021DDBE8 - - thumb_func_start ov5_021DDC28 -ov5_021DDC28: ; 0x021DDC28 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x20] - add r4, r1, #0 - bl sub_02006CA8 - ldr r1, [r5, #0xc] - mov r0, #4 - bl sub_02018238 - add r0, r4, #0 - bl sub_020067D0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DDC28 - - thumb_func_start ov5_021DDC44 -ov5_021DDC44: ; 0x021DDC44 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r0, #4 - mov r1, #0x4c - str r2, [sp] - add r5, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x4c - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _021DDC84 ; =ov5_021DDC88 - add r1, r4, #0 - mov r2, #5 - bl sub_0200D9E8 - str r5, [r4, #0x48] - cmp r5, #0 - beq _021DDC74 - mov r0, #0 - str r0, [r5, #0] -_021DDC74: - str r6, [r4, #0xc] - ldr r0, [sp] - str r7, [r4, #0x10] - str r0, [r4, #0x14] - ldr r0, [sp, #0x18] - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} - nop -_021DDC84: .word ov5_021DDC88 - thumb_func_end ov5_021DDC44 - - thumb_func_start ov5_021DDC88 -ov5_021DDC88: ; 0x021DDC88 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0] - cmp r1, #5 - bhi _021DDD6E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DDCA0: ; jump table - .short _021DDCAC - _021DDCA0 - 2 ; case 0 - .short _021DDCE4 - _021DDCA0 - 2 ; case 1 - .short _021DDCFE - _021DDCA0 - 2 ; case 2 - .short _021DDD12 - _021DDCA0 - 2 ; case 3 - .short _021DDD2C - _021DDCA0 - 2 ; case 4 - .short _021DDD50 - _021DDCA0 - 2 ; case 5 -_021DDCAC: - ldr r0, [r4, #0xc] - cmp r0, #1 - bne _021DDCC6 - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - ldr r2, [r4, #0x14] - add r0, #0x30 - mov r1, #0 - mov r3, #2 - bl ov5_021DDEFC - b _021DDCDC -_021DDCC6: - cmp r0, #2 - bne _021DDCDC - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - ldr r2, [r4, #0x14] - add r0, #0x30 - mov r1, #0 - mov r3, #1 - bl ov5_021DDEFC -_021DDCDC: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDD6E -_021DDCE4: - mov r0, #3 - str r0, [sp] - add r0, r4, #0 - ldr r2, [r4, #0x10] - ldr r3, [r4, #0xc] - add r0, #0x18 - mov r1, #0 - bl ov5_021DDEFC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDD6E -_021DDCFE: - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDF08 - cmp r0, #0 - beq _021DDD6E - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDD6E -_021DDD12: - mov r0, #3 - str r0, [sp] - add r0, r4, #0 - ldr r1, [r4, #0x10] - ldr r3, [r4, #0xc] - add r0, #0x18 - mov r2, #0 - bl ov5_021DDEFC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021DDD6E -_021DDD2C: - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDF08 - cmp r0, #0 - beq _021DDD6E - ldr r0, [r4, #8] - add r1, r0, #1 - str r1, [r4, #8] - ldr r0, [r4, #4] - cmp r1, r0 - bne _021DDD4A - mov r0, #5 - str r0, [r4, #0] - b _021DDD6E -_021DDD4A: - mov r0, #1 - str r0, [r4, #0] - b _021DDD6E -_021DDD50: - mov r1, #0 - str r1, [r4, #0] - str r1, [r4, #8] - ldr r2, [r4, #0x48] - cmp r2, #0 - beq _021DDD60 - mov r1, #1 - str r1, [r2, #0] -_021DDD60: - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - add sp, #4 - pop {r3, r4, pc} -_021DDD6E: - add r4, #0x30 - add r0, r4, #0 - bl ov5_021DDF08 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DDC88 - - thumb_func_start ov5_021DDD7C -ov5_021DDD7C: ; 0x021DDD7C - ldr r0, [r0, #0x18] - bx lr - thumb_func_end ov5_021DDD7C - - thumb_func_start ov5_021DDD80 -ov5_021DDD80: ; 0x021DDD80 - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0x10] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov5_021DDD80 - - thumb_func_start ov5_021DDD90 -ov5_021DDD90: ; 0x021DDD90 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - ldr r0, [r4, #0xc] - mul r0, r1 - ldr r1, [r4, #0x10] - bl sub_020E1F6C - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r0, #1 - cmp r0, r1 - bgt _021DDDB6 - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_021DDDB6: - str r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021DDD90 - - thumb_func_start ov5_021DDDBC -ov5_021DDDBC: ; 0x021DDDBC - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0x10] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov5_021DDDBC - - thumb_func_start ov5_021DDDCC -ov5_021DDDCC: ; 0x021DDDCC - push {r4, lr} - add r4, r0, #0 - ldr r2, [r4, #0xc] - ldr r0, [r4, #8] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r4, #0x10] - lsl r1, r1, #0xc - bl sub_020BCFD0 - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r0, #1 - cmp r0, r1 - bgt _021DDE0C - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_021DDE0C: - str r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DDDCC - - thumb_func_start ov5_021DDE14 -ov5_021DDE14: ; 0x021DDE14 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r5, r0, #0 - add r7, r2, #0 - add r0, r3, #0 - add r6, r1, #0 - lsl r2, r4, #0xc - str r3, [sp] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - sub r0, r7, r6 - mov r7, #2 - mov r3, #0 - lsl r7, r7, #0xa - add r2, r2, r7 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r2, r2, #0xc - orr r2, r1 - sub r2, r0, r2 - asr r1, r2, #0x1f - lsr r0, r2, #0x13 - lsl r1, r1, #0xd - orr r1, r0 - lsl r0, r2, #0xd - add r0, r0, r7 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - add r1, r4, #0 - mul r1, r4 - lsl r1, r1, #0xc - bl sub_020BCFD0 - str r6, [r5, #0] - ldr r1, [sp] - str r6, [r5, #4] - str r1, [r5, #8] - str r0, [r5, #0xc] - mov r0, #0 - str r0, [r5, #0x10] - str r4, [r5, #0x14] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DDE14 - - thumb_func_start ov5_021DDE74 -ov5_021DDE74: ; 0x021DDE74 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r6, [r5, #0x10] - ldr r0, [r5, #8] - lsl r2, r6, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsr r4, r2, #0xc - lsl r0, r1, #0x14 - add r2, r6, #0 - orr r4, r0 - ldr r0, [r5, #0xc] - mul r2, r6 - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - lsl r1, r2, #2 - bl sub_020BCFD0 - ldr r1, [r5, #4] - add r0, r4, r0 - add r0, r1, r0 - str r0, [r5, #0] - ldr r0, [r5, #0x10] - ldr r1, [r5, #0x14] - add r0, r0, #1 - cmp r0, r1 - bgt _021DDED4 - str r0, [r5, #0x10] - mov r0, #0 - pop {r4, r5, r6, pc} -_021DDED4: - str r1, [r5, #0x10] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DDE74 - - thumb_func_start ov5_021DDEDC -ov5_021DDEDC: ; 0x021DDEDC - push {r3, lr} - cmp r0, #1 - bne _021DDEEA - ldr r0, _021DDEF4 ; =0x0400006C - bl sub_020BDEC4 - pop {r3, pc} -_021DDEEA: - ldr r0, _021DDEF8 ; =0x0400106C - bl sub_020BDEC4 - pop {r3, pc} - nop -_021DDEF4: .word 0x0400006C -_021DDEF8: .word 0x0400106C - thumb_func_end ov5_021DDEDC - - thumb_func_start ov5_021DDEFC -ov5_021DDEFC: ; 0x021DDEFC - push {r3, lr} - str r3, [r0, #0x14] - ldr r3, [sp, #8] - bl ov5_021DDD80 - pop {r3, pc} - thumb_func_end ov5_021DDEFC - - thumb_func_start ov5_021DDF08 -ov5_021DDF08: ; 0x021DDF08 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov5_021DDD90 - add r4, r0, #0 - ldr r0, _021DDF20 ; =ov5_021DDF24 - add r1, r5, #0 - mov r2, #0xa - bl sub_0200DA3C - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021DDF20: .word ov5_021DDF24 - thumb_func_end ov5_021DDF08 - - thumb_func_start ov5_021DDF24 -ov5_021DDF24: ; 0x021DDF24 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0x14] - ldr r1, [r1, #0] - bl ov5_021DDEDC - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov5_021DDF24 - - thumb_func_start ov5_021DDF38 -ov5_021DDF38: ; 0x021DDF38 - push {r4, lr} - mov r0, #4 - mov r1, #0x30 - bl sub_02018144 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _021DDF6C ; =0x04000048 - mov r1, #0x3f - ldrh r2, [r0] - bic r2, r1 - mov r1, #0x1f - orr r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldrh r2, [r0] - ldr r1, _021DDF70 ; =0xFFFFC0FF - and r1, r2 - strh r1, [r0] - add r0, r4, #0 - pop {r4, pc} - nop -_021DDF6C: .word 0x04000048 -_021DDF70: .word 0xFFFFC0FF - thumb_func_end ov5_021DDF38 - - thumb_func_start ov5_021DDF74 -ov5_021DDF74: ; 0x021DDF74 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x24] - cmp r1, #0 - beq _021DDF82 - bl ov5_021DE0F0 -_021DDF82: - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021DDF98 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - nop -_021DDF98: .word 0xFFFF1FFF - thumb_func_end ov5_021DDF74 - - thumb_func_start ov5_021DDF9C -ov5_021DDF9C: ; 0x021DDF9C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0x24] - add r7, r2, #0 - str r3, [sp, #4] - ldr r4, [sp, #0x20] - cmp r0, #0 - beq _021DDFB4 - bl sub_02022974 -_021DDFB4: - mov r0, #0 - str r0, [r6, #0x18] - ldr r1, [r6, #0x10] - add r6, #0x18 - ldr r1, [r1, #4] - ldr r2, [sp, #0x24] - ldr r1, [r1, #0x1c] - ldr r3, [sp, #0x28] - str r1, [r5, #0x20] - str r7, [r5, #0x18] - str r0, [r5, #0x1c] - ldr r0, [sp, #4] - str r6, [r5, #0x2c] - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021DDE14 - cmp r4, #0 - blt _021DDFF4 - mov r0, #0xff - ldr r2, _021DE020 ; =0x04000040 - sub r0, r0, r4 - strh r0, [r2] - add r0, r4, #1 - mov r1, #0xc0 - lsl r0, r0, #0x18 - strh r1, [r2, #4] - lsr r0, r0, #0x18 - strh r0, [r2, #2] - strh r1, [r2, #6] - b _021DE010 -_021DDFF4: - add r0, r4, #0 - add r0, #0xff - lsl r0, r0, #0x18 - mov r2, #1 - sub r2, r2, r4 - lsl r2, r2, #0x18 - ldr r1, _021DE020 ; =0x04000040 - lsr r0, r0, #0x18 - strh r0, [r1] - mov r0, #0xc0 - strh r0, [r1, #4] - lsr r2, r2, #0x18 - strh r2, [r1, #2] - strh r0, [r1, #6] -_021DE010: - mov r2, #1 - ldr r0, _021DE024 ; =ov5_021DE028 - add r1, r5, #0 - lsl r2, r2, #0xa - bl sub_0200DA3C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE020: .word 0x04000040 -_021DE024: .word ov5_021DE028 - thumb_func_end ov5_021DDF9C - - thumb_func_start ov5_021DE028 -ov5_021DE028: ; 0x021DE028 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r2, #1 - ldr r0, _021DE050 ; =ov5_021DE088 - add r4, r1, #0 - lsl r2, r2, #0xa - bl sub_0200DA3C - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r1, _021DE054 ; =ov5_021DE14C - add r2, r4, #0 - bl ov5_021EF418 - str r0, [r4, #0x24] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_021DE050: .word ov5_021DE088 -_021DE054: .word ov5_021DE14C - thumb_func_end ov5_021DE028 - - thumb_func_start ov5_021DE058 -ov5_021DE058: ; 0x021DE058 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov5_021DDD7C - cmp r0, #0 - beq _021DE06E - bl sub_02022974 -_021DE06E: - str r4, [r5, #0x18] - mov r0, #0 - str r0, [r5, #0x1c] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r0, r5, #0 - str r6, [sp] - bl ov5_021DDE14 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE058 - - thumb_func_start ov5_021DE088 -ov5_021DE088: ; 0x021DE088 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _021DE098 - cmp r0, #1 - beq _021DE0E4 - pop {r4, pc} -_021DE098: - add r0, r4, #0 - bl ov5_021DDE74 - cmp r0, #0 - beq _021DE0A8 - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] -_021DE0A8: - ldr r0, [r4, #0] - asr r0, r0, #0xc - bmi _021DE0C6 - mov r1, #0xff - sub r1, r1, r0 - ldr r2, _021DE0EC ; =0x04000040 - add r0, r0, #1 - strh r1, [r2] - mov r1, #0xc0 - lsl r0, r0, #0x18 - strh r1, [r2, #4] - lsr r0, r0, #0x18 - strh r0, [r2, #2] - strh r1, [r2, #6] - pop {r4, pc} -_021DE0C6: - add r1, r0, #0 - add r1, #0xff - lsl r1, r1, #0x18 - ldr r3, _021DE0EC ; =0x04000040 - lsr r1, r1, #0x18 - strh r1, [r3] - mov r1, #1 - sub r0, r1, r0 - mov r2, #0xc0 - lsl r0, r0, #0x18 - strh r2, [r3, #4] - lsr r0, r0, #0x18 - strh r0, [r3, #2] - strh r2, [r3, #6] - pop {r4, pc} -_021DE0E4: - add r0, r4, #0 - bl ov5_021DE0F0 - pop {r4, pc} - ; .align 2, 0 -_021DE0EC: .word 0x04000040 - thumb_func_end ov5_021DE088 - - thumb_func_start ov5_021DE0F0 -ov5_021DE0F0: ; 0x021DE0F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DE144 ; =0x04000048 - mov r2, #0x3f - ldrh r3, [r0] - mov r1, #0x1f - bic r3, r2 - orr r3, r1 - mov r1, #0x20 - orr r3, r1 - strh r3, [r0] - ldrh r3, [r0, #2] - bic r3, r2 - add r2, r0, #0 - strh r3, [r0, #2] - mov r3, #0 - sub r2, #8 - strh r3, [r2] - sub r0, r0, #4 - strh r3, [r0] - lsl r3, r1, #0x15 - ldr r2, [r3, #0] - ldr r0, _021DE148 ; =0xFFFF1FFF - and r2, r0 - lsl r0, r1, #8 - orr r0, r2 - str r0, [r3, #0] - ldr r0, [r4, #0x2c] - mov r1, #1 - str r1, [r0, #0] - ldr r0, [r4, #0x24] - bl ov5_021EF43C - mov r0, #0 - str r0, [r4, #0x24] - ldr r0, [r4, #0x28] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x28] - pop {r4, pc} - nop -_021DE144: .word 0x04000048 -_021DE148: .word 0xFFFF1FFF - thumb_func_end ov5_021DE0F0 - - thumb_func_start ov5_021DE14C -ov5_021DE14C: ; 0x021DE14C - push {r4, lr} - ldr r0, _021DE1BC ; =0x04000006 - add r4, r1, #0 - ldrh r0, [r0] - ldr r1, [r4, #0x18] - bl sub_020E2178 - mov r1, #1 - tst r0, r1 - ldr r0, [r4, #0] - bne _021DE164 - b _021DE166 -_021DE164: - neg r0, r0 -_021DE166: - asr r2, r0, #0xc - ldr r0, _021DE1C0 ; =0x000001FF - add r1, r2, #0 - and r1, r0 - ldr r0, _021DE1C4 ; =0x04000010 - cmp r2, #0 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - ldr r1, _021DE1C8 ; =0xFFFF1FFF - blt _021DE198 - add r3, r0, #0 - sub r3, #0x10 - ldr r2, [r3, #0] - and r2, r1 - lsl r1, r0, #9 - orr r1, r2 - str r1, [r3, #0] - add r0, #0x3a - ldrh r2, [r0] - mov r1, #0x3f - bic r2, r1 - strh r2, [r0] - pop {r4, pc} -_021DE198: - add r3, r0, #0 - sub r3, #0x10 - ldr r2, [r3, #0] - and r2, r1 - lsl r1, r0, #0xa - orr r1, r2 - str r1, [r3, #0] - add r0, #0x3a - ldrh r2, [r0] - mov r1, #0x3f - bic r2, r1 - mov r1, #0x1f - orr r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - pop {r4, pc} - nop -_021DE1BC: .word 0x04000006 -_021DE1C0: .word 0x000001FF -_021DE1C4: .word 0x04000010 -_021DE1C8: .word 0xFFFF1FFF - thumb_func_end ov5_021DE14C - - thumb_func_start ov5_021DE1CC -ov5_021DE1CC: ; 0x021DE1CC - push {r4, r5, r6, lr} - mov r0, #4 - mov r1, #0x48 - bl sub_02018144 - mov r1, #0 - mov r2, #0x48 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _021DE210 ; =0x04000048 - mov r5, #0x3f - ldrh r2, [r0] - mov r1, #0x1f - bic r2, r5 - add r3, r2, #0 - orr r3, r1 - mov r2, #0x20 - orr r3, r2 - strh r3, [r0] - ldrh r6, [r0] - ldr r3, _021DE214 ; =0xFFFFC0FF - lsl r1, r1, #8 - and r3, r6 - orr r3, r1 - lsl r1, r2, #8 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0, #2] - bic r1, r5 - strh r1, [r0, #2] - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_021DE210: .word 0x04000048 -_021DE214: .word 0xFFFFC0FF - thumb_func_end ov5_021DE1CC - - thumb_func_start ov5_021DE218 -ov5_021DE218: ; 0x021DE218 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x3c] - cmp r1, #0 - beq _021DE226 - bl ov5_021DE374 -_021DE226: - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021DE23C ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - nop -_021DE23C: .word 0xFFFF1FFF - thumb_func_end ov5_021DE218 - - thumb_func_start ov5_021DE240 -ov5_021DE240: ; 0x021DE240 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x3c] - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _021DE254 - bl sub_02022974 -_021DE254: - mov r1, #0 - str r1, [r5, #0x18] - ldr r0, [r5, #0x10] - mov r2, #0xff - ldr r0, [r0, #4] - add r5, #0x18 - ldr r0, [r0, #0x1c] - lsl r2, r2, #0xc - str r0, [r4, #0x38] - mov r0, #0x60 - str r0, [r4, #0x30] - str r1, [r4, #0x34] - str r5, [r4, #0x44] - add r0, r4, #0 - add r3, r7, #0 - str r6, [sp] - bl ov5_021DDE14 - add r0, r4, #0 - mov r2, #6 - ldr r3, [sp, #0x18] - add r0, #0x18 - mov r1, #0 - lsl r2, r2, #0x10 - str r6, [sp] - bl ov5_021DDE14 - ldr r2, _021DE2A4 ; =0x04000040 - mov r1, #0xff - strh r1, [r2] - mov r0, #0xc0 - strh r0, [r2, #4] - strh r1, [r2, #2] - strh r0, [r2, #6] - ldr r0, _021DE2A8 ; =ov5_021DE2AC - add r1, r4, #0 - lsr r2, r2, #0x10 - bl sub_0200DA3C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DE2A4: .word 0x04000040 -_021DE2A8: .word ov5_021DE2AC - thumb_func_end ov5_021DE240 - - thumb_func_start ov5_021DE2AC -ov5_021DE2AC: ; 0x021DE2AC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r2, #1 - ldr r0, _021DE2D4 ; =ov5_021DE2DC - add r4, r1, #0 - lsl r2, r2, #0xa - bl sub_0200DA3C - str r0, [r4, #0x40] - ldr r0, [r4, #0x38] - ldr r1, _021DE2D8 ; =ov5_021DE344 - add r2, r4, #0 - bl ov5_021EF418 - str r0, [r4, #0x3c] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_021DE2D4: .word ov5_021DE2DC -_021DE2D8: .word ov5_021DE344 - thumb_func_end ov5_021DE2AC - - thumb_func_start ov5_021DE2DC -ov5_021DE2DC: ; 0x021DE2DC - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _021DE2EC - cmp r0, #1 - beq _021DE338 - pop {r4, pc} -_021DE2EC: - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDE74 - add r0, r4, #0 - bl ov5_021DDE74 - cmp r0, #0 - beq _021DE304 - ldr r0, [r4, #0x34] - add r0, r0, #1 - str r0, [r4, #0x34] -_021DE304: - ldr r0, [r4, #0] - asr r2, r0, #0xc - ldr r0, [r4, #0x18] - mov r4, #0xff - asr r1, r0, #0xc - ldr r0, _021DE340 ; =0x04000040 - sub r3, r4, r2 - strh r3, [r0] - mov r3, #0x60 - sub r3, r3, r1 - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - strh r3, [r0, #4] - lsl r3, r2, #8 - lsl r2, r4, #8 - and r2, r3 - orr r2, r4 - add r1, #0x60 - strh r2, [r0, #2] - lsl r2, r1, #8 - lsl r1, r4, #8 - and r2, r1 - mov r1, #0xc0 - orr r1, r2 - strh r1, [r0, #6] - pop {r4, pc} -_021DE338: - add r0, r4, #0 - bl ov5_021DE374 - pop {r4, pc} - ; .align 2, 0 -_021DE340: .word 0x04000040 - thumb_func_end ov5_021DE2DC - - thumb_func_start ov5_021DE344 -ov5_021DE344: ; 0x021DE344 - ldr r0, _021DE36C ; =0x04000006 - ldr r1, [r1, #0x30] - ldrh r2, [r0] - cmp r2, r1 - ldr r1, _021DE370 ; =0xFFFF1FFF - bhi _021DE35E - sub r3, r0, #6 - ldr r2, [r3, #0] - lsr r0, r0, #0xd - and r1, r2 - orr r0, r1 - str r0, [r3, #0] - bx lr -_021DE35E: - sub r3, r0, #6 - ldr r2, [r3, #0] - lsr r0, r0, #0xc - and r1, r2 - orr r0, r1 - str r0, [r3, #0] - bx lr - ; .align 2, 0 -_021DE36C: .word 0x04000006 -_021DE370: .word 0xFFFF1FFF - thumb_func_end ov5_021DE344 - - thumb_func_start ov5_021DE374 -ov5_021DE374: ; 0x021DE374 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DE3C8 ; =0x04000048 - mov r2, #0x3f - ldrh r3, [r0] - mov r1, #0x1f - bic r3, r2 - orr r3, r1 - mov r1, #0x20 - orr r3, r1 - strh r3, [r0] - ldrh r3, [r0, #2] - bic r3, r2 - add r2, r0, #0 - strh r3, [r0, #2] - mov r3, #0 - sub r2, #8 - strh r3, [r2] - sub r0, r0, #4 - strh r3, [r0] - lsl r3, r1, #0x15 - ldr r2, [r3, #0] - ldr r0, _021DE3CC ; =0xFFFF1FFF - and r2, r0 - lsl r0, r1, #8 - orr r0, r2 - str r0, [r3, #0] - ldr r0, [r4, #0x44] - mov r1, #1 - str r1, [r0, #0] - ldr r0, [r4, #0x3c] - bl ov5_021EF43C - mov r0, #0 - str r0, [r4, #0x3c] - ldr r0, [r4, #0x40] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x40] - pop {r4, pc} - nop -_021DE3C8: .word 0x04000048 -_021DE3CC: .word 0xFFFF1FFF - thumb_func_end ov5_021DE374 - - thumb_func_start ov5_021DE3D0 -ov5_021DE3D0: ; 0x021DE3D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r1, #0 - ldr r1, [sp, #0x34] - str r2, [sp, #0x10] - lsl r1, r1, #5 - str r1, [sp] - mov r1, #4 - str r1, [sp, #4] - add r1, r3, #0 - ldr r3, [sp, #0x30] - mov r2, #0 - lsl r3, r3, #5 - add r6, r0, #0 - ldr r5, [sp, #0x38] - ldr r4, [sp, #0x3c] - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - add r0, r6, #0 - add r2, r5, #0 - add r3, r4, #0 - bl sub_020070E8 - mov r0, #4 - str r0, [sp] - add r0, r6, #0 - add r1, r7, #0 - mov r2, #0 - add r3, sp, #0x14 - bl sub_020071D0 - lsl r1, r4, #0x18 - ldr r2, [sp, #0x14] - mov r3, #0 - str r3, [sp] - add r6, r0, #0 - ldrh r0, [r2] - lsr r1, r1, #0x18 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_020198C0 - ldr r1, [sp, #0x14] - mov r2, #0 - ldrh r0, [r1] - add r3, r2, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r1, #2] - lsl r1, r4, #0x18 - lsr r1, r1, #0x18 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_02019E2C - add r0, r6, #0 - bl sub_020181C4 - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_0201C3C0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DE3D0 - - thumb_func_start ov5_021DE47C -ov5_021DE47C: ; 0x021DE47C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r2, #0 - add r0, r1, #0 - add r1, r5, #4 - mov r2, #4 - bl sub_020095C4 - mov r7, #0x4b - str r0, [r5, #0] - mov r4, #0 - lsl r7, r7, #2 -_021DE494: - add r0, r6, #0 - add r1, r4, #0 - mov r2, #4 - bl sub_02009714 - str r0, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021DE494 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE47C - - thumb_func_start ov5_021DE4AC -ov5_021DE4AC: ; 0x021DE4AC - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl sub_02021964 - mov r6, #0x4b - mov r4, #0 - lsl r6, r6, #2 -_021DE4BC: - ldr r0, [r5, r6] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021DE4BC - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DE4AC - - thumb_func_start ov5_021DE4CC -ov5_021DE4CC: ; 0x021DE4CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r6, [sp, #0x58] - add r5, r1, #0 - str r6, [sp] - mov r1, #1 - add r7, r0, #0 - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0x4b - str r1, [sp, #0xc] - lsl r0, r0, #2 - add r4, r2, #0 - str r3, [sp, #0x2c] - ldr r0, [r5, r0] - ldr r2, [sp, #0x4c] - add r1, r7, #0 - mov r3, #0 - bl sub_02009AA8 - str r0, [r4, #0] - str r6, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x48] - ldr r2, [sp, #0x2c] - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r7, #0 - mov r3, #0 - bl sub_02009B04 - str r0, [r4, #4] - str r6, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [sp, #0x50] - add r1, r7, #0 - mov r3, #0 - bl sub_02009BC4 - str r0, [r4, #8] - str r6, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [sp, #0x54] - add r1, r7, #0 - mov r3, #0 - bl sub_02009BC4 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl sub_0200A3DC - ldr r0, [r4, #0] - bl sub_02009D4C - ldr r0, [r4, #4] - bl sub_0200A640 - mov r0, #0 - mov r2, #0x4b - str r6, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r4, #0x10 - str r1, [sp, #0x14] - add r1, r2, #4 - ldr r1, [r5, r1] - add r3, r6, #0 - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r1, [r5, r1] - add r2, #0xc - str r1, [sp, #0x1c] - ldr r1, [r5, r2] - add r2, r6, #0 - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r4, #0 - add r1, r6, #0 - bl sub_020093B4 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DE4CC - - thumb_func_start ov5_021DE5A4 -ov5_021DE5A4: ; 0x021DE5A4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl sub_0200A4E4 - ldr r0, [r4, #4] - bl sub_0200A6DC - mov r7, #0x4b - mov r6, #0 - lsl r7, r7, #2 -_021DE5BC: - ldr r0, [r5, r7] - ldr r1, [r4, #0] - bl sub_02009D68 - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #4 - blt _021DE5BC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DE5A4 - - thumb_func_start ov5_021DE5D0 -ov5_021DE5D0: ; 0x021DE5D0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r6, r0, #0 - add r4, r1, #0 - add r0, r2, #0 - mov r1, #2 - add r2, sp, #8 - add r7, r3, #0 - bl sub_02076AAC - add r0, r4, #0 - mov r1, #0x20 - bl sub_02018144 - add r5, r0, #0 - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - add r2, sp, #4 - add r3, r4, #0 - bl sub_02006F88 - add r4, r0, #0 - add r0, sp, #0x28 - ldrh r0, [r0, #0x10] - add r1, r5, #0 - mov r2, #0x10 - str r0, [sp] - ldr r0, [sp, #4] - add r3, r7, #0 - ldr r0, [r0, #0xc] - bl sub_0200393C - add r0, r6, #0 - add r1, r5, #0 - mov r2, #0x20 - bl ov5_021DE67C - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE5D0 - - thumb_func_start ov5_021DE62C -ov5_021DE62C: ; 0x021DE62C - push {r4, lr} - sub sp, #0x20 - ldr r0, [r0, #0] - add r1, #0x10 - str r0, [sp] - ldr r0, [sp, #0x28] - str r1, [sp, #4] - str r0, [sp, #0x10] - ldr r0, [sp, #0x2c] - str r2, [sp, #8] - str r0, [sp, #0x14] - mov r0, #1 - str r0, [sp, #0x18] - mov r0, #4 - str r0, [sp, #0x1c] - add r0, sp, #0 - str r3, [sp, #0xc] - bl sub_02021B90 - add r4, r0, #0 - bne _021DE65A - bl sub_02022974 -_021DE65A: - add r0, r4, #0 - add sp, #0x20 - pop {r4, pc} - thumb_func_end ov5_021DE62C - - thumb_func_start ov5_021DE660 -ov5_021DE660: ; 0x021DE660 - push {r4} - sub sp, #0xc - str r2, [sp, #4] - str r3, [sp, #8] - add r2, sp, #0 - add r4, r0, #0 - str r1, [sp] - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - add sp, #0xc - pop {r4} - bx lr - thumb_func_end ov5_021DE660 - - thumb_func_start ov5_021DE67C -ov5_021DE67C: ; 0x021DE67C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_02021F9C - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_020C2C54 - add r0, r6, #0 - mov r1, #1 - bl sub_020A81FC - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl sub_020C0160 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DE67C - - thumb_func_start ov5_021DE6A4 -ov5_021DE6A4: ; 0x021DE6A4 - push {r4, lr} - mov r1, #0x30 - bl sub_02018144 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE6A4 - - thumb_func_start ov5_021DE6BC -ov5_021DE6BC: ; 0x021DE6BC - ldr r3, _021DE6C0 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021DE6C0: .word sub_020181C4 - thumb_func_end ov5_021DE6BC - - thumb_func_start ov5_021DE6C4 -ov5_021DE6C4: ; 0x021DE6C4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0x2e - ldrb r0, [r0] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _021DE6DA - bl sub_02022974 -_021DE6DA: - ldr r3, [sp, #0x1c] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021DDD80 - add r0, r5, #0 - ldr r2, [sp, #0x18] - ldr r3, [sp, #0x1c] - add r0, #0x14 - add r1, r7, #0 - bl ov5_021DDD80 - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x24] - str r0, [r5, #0x28] - add r0, r5, #0 - add r0, #0x2c - strb r1, [r0] - add r0, r5, #0 - ldr r1, [sp, #0x28] - add r0, #0x2d - strb r1, [r0] - add r0, sp, #0x2c - ldrb r1, [r0] - add r0, r5, #0 - add r0, #0x2f - strb r1, [r0] - mov r0, #1 - add r5, #0x2e - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE6C4 - - thumb_func_start ov5_021DE71C -ov5_021DE71C: ; 0x021DE71C - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r1, r5, #0 - add r1, #0x2e - ldrb r1, [r1] - cmp r1, #0 - bne _021DE732 - add sp, #8 - mov r0, #1 - pop {r4, r5, r6, pc} -_021DE732: - bl ov5_021DDD90 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x14 - bl ov5_021DDD90 - add r0, r5, #0 - add r0, #0x2c - ldrb r0, [r0] - ldr r2, [r5, #0] - ldr r6, [r5, #0x14] - lsr r1, r0, #1 - sub r1, r2, r1 - lsl r1, r1, #0x10 - asr r3, r1, #0x10 - add r1, r5, #0 - add r1, #0x2d - ldrb r2, [r1] - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - lsr r1, r2, #1 - str r0, [sp] - add r0, r5, #0 - sub r1, r6, r1 - add r0, #0x2f - lsl r1, r1, #0x10 - ldrb r0, [r0] - asr r1, r1, #0x10 - add r2, r1, r2 - str r0, [sp, #4] - lsl r2, r2, #0x10 - ldr r0, [r5, #0x28] - asr r2, r2, #0x10 - bl ov5_021DE89C - add r0, r4, #0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE71C - - thumb_func_start ov5_021DE784 -ov5_021DE784: ; 0x021DE784 - push {r4, lr} - mov r1, #0x30 - bl sub_02018144 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE784 - - thumb_func_start ov5_021DE79C -ov5_021DE79C: ; 0x021DE79C - ldr r3, _021DE7A0 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021DE7A0: .word sub_020181C4 - thumb_func_end ov5_021DE79C - - thumb_func_start ov5_021DE7A4 -ov5_021DE7A4: ; 0x021DE7A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0x2e - ldrb r0, [r0] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _021DE7BA - bl sub_02022974 -_021DE7BA: - ldr r3, [sp, #0x1c] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021DDD80 - add r0, r5, #0 - ldr r2, [sp, #0x18] - ldr r3, [sp, #0x1c] - add r0, #0x14 - add r1, r7, #0 - bl ov5_021DDD80 - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x24] - str r0, [r5, #0x28] - add r0, r5, #0 - add r0, #0x2c - strb r1, [r0] - add r0, r5, #0 - ldr r1, [sp, #0x28] - add r0, #0x2d - strb r1, [r0] - add r0, sp, #0x2c - ldrb r1, [r0] - add r0, r5, #0 - add r0, #0x2f - strb r1, [r0] - mov r0, #1 - add r5, #0x2e - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE7A4 - - thumb_func_start ov5_021DE7FC -ov5_021DE7FC: ; 0x021DE7FC - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r0, #0x2e - ldrb r0, [r0] - cmp r0, #0 - bne _021DE810 - add sp, #8 - mov r0, #1 - pop {r4, r5, r6, pc} -_021DE810: - add r0, r5, #0 - add r0, #0x2c - ldrb r0, [r0] - ldr r2, [r5, #0] - ldr r4, [r5, #0x14] - lsr r1, r0, #1 - sub r1, r2, r1 - lsl r1, r1, #0x10 - asr r3, r1, #0x10 - add r1, r5, #0 - add r1, #0x2d - ldrb r2, [r1] - add r0, r3, r0 - lsl r0, r0, #0x10 - lsr r1, r2, #1 - sub r1, r4, r1 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - mov r0, #0 - add r2, r1, r2 - str r0, [sp, #4] - lsl r2, r2, #0x10 - ldr r0, [r5, #0x28] - asr r2, r2, #0x10 - bl ov5_021DE89C - add r0, r5, #0 - bl ov5_021DDD90 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x14 - bl ov5_021DDD90 - add r0, r5, #0 - add r0, #0x2c - ldrb r0, [r0] - ldr r2, [r5, #0] - ldr r6, [r5, #0x14] - lsr r1, r0, #1 - sub r1, r2, r1 - lsl r1, r1, #0x10 - asr r3, r1, #0x10 - add r1, r5, #0 - add r1, #0x2d - ldrb r2, [r1] - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - lsr r1, r2, #1 - str r0, [sp] - add r0, r5, #0 - sub r1, r6, r1 - add r0, #0x2f - lsl r1, r1, #0x10 - ldrb r0, [r0] - asr r1, r1, #0x10 - add r2, r1, r2 - str r0, [sp, #4] - lsl r2, r2, #0x10 - ldr r0, [r5, #0x28] - asr r2, r2, #0x10 - bl ov5_021DE89C - add r0, r4, #0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE7FC - - thumb_func_start ov5_021DE89C -ov5_021DE89C: ; 0x021DE89C - push {r3, r4, r5, lr} - sub sp, #8 - ldr r5, [sp, #0x18] - add r4, r1, #0 - cmp r5, #0 - ble _021DE8F4 - cmp r2, #0 - ble _021DE8F4 - cmp r3, r5 - beq _021DE8F4 - cmp r4, r2 - beq _021DE8F4 - cmp r3, #0 - bge _021DE8BA - mov r3, #0 -_021DE8BA: - mov r1, #1 - lsl r1, r1, #8 - cmp r5, r1 - ble _021DE8C4 - add r5, r1, #0 -_021DE8C4: - cmp r4, #0 - bge _021DE8CA - mov r4, #0 -_021DE8CA: - mov r1, #1 - lsl r1, r1, #8 - cmp r2, r1 - ble _021DE8D4 - add r2, r1, #0 -_021DE8D4: - sub r1, r5, r3 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - str r1, [sp] - sub r1, r2, r4 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - str r1, [sp, #4] - lsl r2, r3, #0x10 - add r1, sp, #8 - lsl r3, r4, #0x10 - ldrb r1, [r1, #0x14] - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0201AE78 -_021DE8F4: - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DE89C - - thumb_func_start ov5_021DE8F8 -ov5_021DE8F8: ; 0x021DE8F8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #4 - mov r1, #0xcc - bl sub_02018144 - mov r1, #0 - mov r2, #0xcc - add r7, r0, #0 - bl sub_020D5124 - mov r4, #0 - add r5, r7, #0 -_021DE912: - add r0, r6, #0 - bl ov5_021DE784 - str r0, [r5, #4] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x30 - blt _021DE912 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE8F8 - - thumb_func_start ov5_021DE928 -ov5_021DE928: ; 0x021DE928 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021DE930: - ldr r0, [r5, #4] - bl ov5_021DE79C - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x30 - blt _021DE930 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DE928 - - thumb_func_start ov5_021DE948 -ov5_021DE948: ; 0x021DE948 - push {r3, r4} - str r3, [r0, #0] - ldr r3, _021DE984 ; =0xFFFFFFF8 - add r3, sp - ldrb r4, [r3, #0x10] - add r3, r0, #0 - add r3, #0xc9 - strb r4, [r3] - add r3, r0, #0 - add r3, #0xc6 - strb r1, [r3] - add r1, r0, #0 - add r1, #0xc7 - strb r2, [r1] - add r1, r0, #0 - mov r2, #0 - add r1, #0xc4 - strb r2, [r1] - add r1, r0, #0 - add r1, #0xc5 - strb r2, [r1] - add r1, r0, #0 - add r1, #0xc8 - strb r2, [r1] - mov r1, #1 - add r0, #0xca - strb r1, [r0] - pop {r3, r4} - bx lr - nop -_021DE984: .word 0xFFFFFFF8 - thumb_func_end ov5_021DE948 - - thumb_func_start ov5_021DE988 -ov5_021DE988: ; 0x021DE988 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - add r0, #0xca - ldrb r0, [r0] - cmp r0, #0 - bne _021DE99C - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021DE99C: - add r0, r6, #0 - add r0, #0xc4 - ldrb r0, [r0] - cmp r0, #0x30 - bhs _021DEA20 - mov r1, #0xc8 - ldrsb r0, [r6, r1] - sub r2, r0, #1 - add r0, r6, #0 - add r0, #0xc8 - strb r2, [r0] - ldrsb r0, [r6, r1] - cmp r0, #0 - bgt _021DEA20 - add r0, r6, #0 - add r0, #0xc7 - ldrb r1, [r0] - add r0, r6, #0 - add r0, #0xc8 - strb r1, [r0] - add r0, r6, #0 - add r0, #0xc4 - ldrb r0, [r0] - mov r1, #0x1d - lsr r3, r0, #0x1f - lsl r2, r0, #0x1d - sub r2, r2, r3 - ror r2, r1 - add r2, r3, r2 - ldr r1, _021DEA7C ; =0x021F9988 - mov r3, #0x20 - ldrb r1, [r1, r2] - lsr r2, r0, #3 - lsl r4, r2, #5 - mov r2, #0xb0 - sub r2, r2, r4 - str r2, [sp] - add r2, r6, #0 - add r2, #0xc6 - ldrb r2, [r2] - lsl r0, r0, #2 - lsl r1, r1, #5 - str r2, [sp, #4] - ldr r2, [r6, #0] - add r0, r6, r0 - str r2, [sp, #8] - str r3, [sp, #0xc] - add r2, r6, #0 - str r3, [sp, #0x10] - add r2, #0xc9 - ldrb r2, [r2] - sub r3, #0x30 - add r1, #0x10 - str r2, [sp, #0x14] - ldr r0, [r0, #4] - add r2, r1, #0 - sub r3, r3, r4 - bl ov5_021DE7A4 - add r0, r6, #0 - add r0, #0xc4 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r6, #0 - add r0, #0xc4 - strb r1, [r0] -_021DEA20: - add r0, r6, #0 - add r0, #0xc5 - ldrb r4, [r0] - add r0, r6, #0 - add r0, #0xc4 - ldrb r0, [r0] - cmp r4, r0 - bge _021DEA58 - lsl r0, r4, #2 - add r7, r6, #0 - add r5, r6, r0 - add r7, #0xc5 -_021DEA38: - ldr r0, [r5, #4] - bl ov5_021DE7FC - str r0, [sp, #0x18] - cmp r0, #1 - bne _021DEA4A - ldrb r0, [r7] - add r0, r0, #1 - strb r0, [r7] -_021DEA4A: - add r0, r6, #0 - add r0, #0xc4 - ldrb r0, [r0] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _021DEA38 -_021DEA58: - add r0, r6, #0 - add r0, #0xc5 - ldrb r0, [r0] - cmp r0, #0x30 - blo _021DEA74 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _021DEA74 - mov r0, #0 - add r6, #0xca - strb r0, [r6] - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021DEA74: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021DEA7C: .word 0x021F9988 - thumb_func_end ov5_021DE988 - - thumb_func_start ov5_021DEA80 -ov5_021DEA80: ; 0x021DEA80 - push {r3, lr} - mov r1, #0x1c - bl sub_02018144 - add r3, r0, #0 - mov r2, #0x1c - mov r1, #0 -_021DEA8E: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _021DEA8E - pop {r3, pc} - thumb_func_end ov5_021DEA80 - - thumb_func_start ov5_021DEA98 -ov5_021DEA98: ; 0x021DEA98 - ldr r3, _021DEA9C ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021DEA9C: .word sub_020181C4 - thumb_func_end ov5_021DEA98 - - thumb_func_start ov5_021DEAA0 -ov5_021DEAA0: ; 0x021DEAA0 - push {r4, lr} - add r4, r1, #0 - ldr r1, [sp, #8] - str r1, [r0, #0] - ldr r1, _021DEAC4 ; =0xFFFFFFF8 - add r1, sp - ldrb r1, [r1, #0x14] - strb r1, [r0, #0x19] - mov r1, #1 - strb r1, [r0, #0x18] - add r1, r2, #0 - add r2, r3, #0 - add r0, r0, #4 - add r3, r4, #0 - bl ov5_021DDD80 - pop {r4, pc} - nop -_021DEAC4: .word 0xFFFFFFF8 - thumb_func_end ov5_021DEAA0 - - thumb_func_start ov5_021DEAC8 -ov5_021DEAC8: ; 0x021DEAC8 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrb r0, [r5, #0x18] - cmp r0, #0 - bne _021DEAD6 - mov r0, #1 - pop {r4, r5, r6, pc} -_021DEAD6: - ldr r0, [r5, #4] - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r5, #4 - bl ov5_021DDD90 - ldr r2, [r5, #4] - add r6, r0, #0 - lsl r2, r2, #0x10 - ldrb r3, [r5, #0x19] - ldr r0, [r5, #0] - add r1, r4, #0 - lsr r2, r2, #0x10 - bl ov5_021DEB04 - cmp r6, #1 - bne _021DEB00 - mov r0, #0 - strb r0, [r5, #0x18] - mov r0, #1 - pop {r4, r5, r6, pc} -_021DEB00: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DEAC8 - - thumb_func_start ov5_021DEB04 -ov5_021DEB04: ; 0x021DEB04 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #8] - asr r0, r2, #4 - add r4, r1, #0 - lsl r1, r0, #1 - lsl r0, r1, #1 - ldr r2, _021DEBE4 ; =0x020F983C - add r1, r1, #1 - lsl r1, r1, #1 - ldrsh r0, [r2, r0] - ldrsh r1, [r2, r1] - add r7, r3, #0 - bl sub_020BCFD0 - str r0, [sp, #0x14] - asr r0, r4, #4 - lsl r1, r0, #1 - lsl r0, r1, #1 - ldr r2, _021DEBE4 ; =0x020F983C - add r1, r1, #1 - lsl r1, r1, #1 - ldrsh r0, [r2, r0] - ldrsh r1, [r2, r1] - bl sub_020BCFD0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - mov r5, #0 - asr r0, r0, #0x1f - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - asr r0, r0, #0x1f - str r0, [sp, #0x10] -_021DEB48: - mov r0, #0x5f - sub r0, r0, r5 - lsl r6, r0, #0xc - asr r4, r6, #0x1f - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - add r2, r6, #0 - add r3, r4, #0 - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r0, r0, r2 - ldr r2, _021DEBE8 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - asr r0, r0, #0xc - str r0, [sp, #0x1c] - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x10] - add r2, r6, #0 - add r3, r4, #0 - bl sub_020E1F1C - mov r2, #2 - lsl r2, r2, #0xa - add r2, r0, r2 - ldr r0, _021DEBE8 ; =0x00000000 - ldr r4, [sp, #0x1c] - adc r1, r0 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - asr r0, r1, #0xc - add r6, r0, #0 - mov r2, #0x80 - ldr r1, [sp, #0x1c] - sub r0, r2, r0 - sub r1, r2, r1 - add r4, #0x80 - add r6, #0x80 - add r3, r0, #0 - cmp r0, r1 - ble _021DEBA8 - add r3, r1, #0 - add r1, r0, #0 -_021DEBA8: - cmp r6, r4 - ble _021DEBB2 - add r0, r6, #0 - add r6, r4, #0 - add r4, r0, #0 -_021DEBB2: - add r0, r1, #1 - str r0, [sp] - ldr r0, [sp, #8] - add r1, r5, #0 - add r2, r5, #1 - str r7, [sp, #4] - bl ov5_021DE89C - add r0, r4, #1 - str r0, [sp] - mov r1, #0xbf - mov r2, #0xc0 - ldr r0, [sp, #8] - sub r1, r1, r5 - sub r2, r2, r5 - add r3, r6, #0 - str r7, [sp, #4] - bl ov5_021DE89C - add r5, r5, #1 - cmp r5, #0x60 - blt _021DEB48 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DEBE4: .word 0x020F983C -_021DEBE8: .word 0x00000000 - thumb_func_end ov5_021DEB04 - - thumb_func_start ov5_021DEBEC -ov5_021DEBEC: ; 0x021DEBEC - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x24 - add r6, r0, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x24 - add r7, r0, #0 - bl sub_020D5124 - mov r4, #0 - add r5, r7, #0 -_021DEC04: - add r0, r6, #0 - bl ov5_021DEA80 - add r4, r4, #1 - stmia r5!, {r0} - cmp r4, #8 - blt _021DEC04 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DEBEC - - thumb_func_start ov5_021DEC18 -ov5_021DEC18: ; 0x021DEC18 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021DEC20: - ldr r0, [r5, #0] - bl ov5_021DEA98 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021DEC20 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DEC18 - - thumb_func_start ov5_021DEC38 -ov5_021DEC38: ; 0x021DEC38 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0xc] - ldr r4, _021DECB0 ; =0x021F9A2C - str r0, [sp, #8] - str r2, [sp, #0x10] - str r3, [sp, #0x14] - mov r6, #0 - add r5, r0, #0 -_021DEC4A: - ldrh r1, [r4] - ldr r0, _021DECB4 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - add r7, r0, #0 - ldrh r1, [r4, #2] - ldr r0, _021DECB4 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - add r3, r0, #0 - ldr r0, [sp, #0x10] - lsl r2, r7, #0x10 - str r0, [sp] - ldr r0, [sp, #0x14] - lsl r3, r3, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r1, [sp, #0xc] - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl ov5_021DEAA0 - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #8 - blt _021DEC4A - ldr r0, [sp, #8] - mov r1, #1 - add r0, #0x20 - strb r1, [r0] - add r1, #0xff - str r1, [sp] - str r0, [sp, #8] - ldr r0, [sp, #0x14] - mov r1, #0x5d - str r0, [sp, #4] - ldr r0, [sp, #0x10] - mov r2, #0x63 - mov r3, #0 - bl ov5_021DE89C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021DECB0: .word 0x021F9A2C -_021DECB4: .word 0x0000FFFF - thumb_func_end ov5_021DEC38 - - thumb_func_start ov5_021DECB8 -ov5_021DECB8: ; 0x021DECB8 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r0, #0x20 - ldrb r0, [r0] - cmp r0, #0 - bne _021DECC8 - mov r0, #1 - pop {r4, r5, r6, pc} -_021DECC8: - mov r4, #0 - add r5, r6, #0 -_021DECCC: - ldr r0, [r5, #0] - bl ov5_021DEAC8 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _021DECCC - cmp r0, #1 - bne _021DECE8 - mov r0, #0 - add r6, #0x20 - strb r0, [r6] - mov r0, #1 - pop {r4, r5, r6, pc} -_021DECE8: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DECB8 - - thumb_func_start ov5_021DECEC -ov5_021DECEC: ; 0x021DECEC - push {r4, lr} - mov r0, #4 - mov r1, #0xe8 - bl sub_02018144 - mov r1, #0 - mov r2, #0xe8 - add r4, r0, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov5_021DECEC - - thumb_func_start ov5_021DED04 -ov5_021DED04: ; 0x021DED04 - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0xe0 - ldr r1, [r1, #0] - cmp r1, #0 - beq _021DED16 - bl ov5_021DEE84 -_021DED16: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DED04 - - thumb_func_start ov5_021DED20 -ov5_021DED20: ; 0x021DED20 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, [sp, #0x18] - add r7, r1, #0 - str r0, [sp, #0x18] - add r0, r7, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - add r6, r2, #0 - add r5, r3, #0 - cmp r0, #0 - beq _021DED3C - bl sub_02022974 -_021DED3C: - mov r2, #0 - str r2, [r4, #0x18] - ldr r0, [r4, #0x10] - add r4, #0x18 - ldr r0, [r0, #4] - add r3, r6, #0 - ldr r1, [r0, #0x1c] - add r0, r7, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r7, #0 - str r2, [r7, #0x14] - add r0, #0xe4 - str r4, [r0, #0] - add r0, r7, #0 - mov r1, #0xff - bl ov5_021DDD80 - mov r4, #0 -_021DED62: - add r0, r4, #0 - add r1, r5, #0 - bl sub_020E2178 - ldr r0, [sp, #0x18] - mul r0, r1 - add r1, r5, #0 - bl sub_020E2178 - add r6, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl sub_020E2178 - mov r1, #1 - tst r0, r1 - bne _021DED8A - add r0, r7, r4 - strb r6, [r0, #0x18] - b _021DED92 -_021DED8A: - ldr r0, [sp, #0x18] - sub r1, r0, r6 - add r0, r7, r4 - strb r1, [r0, #0x18] -_021DED92: - add r4, r4, #1 - cmp r4, #0xc0 - blt _021DED62 - ldr r0, _021DEDDC ; =0x04000048 - mov r1, #0x3f - ldrh r3, [r0] - ldr r2, [sp, #0x1c] - bic r3, r1 - orr r3, r2 - mov r2, #0x20 - orr r3, r2 - strh r3, [r0] - ldrh r3, [r0, #2] - bic r3, r1 - ldr r1, [sp, #0x20] - orr r1, r3 - strh r1, [r0, #2] - add r1, r0, #0 - mov r3, #0 - sub r1, #8 - strh r3, [r1] - mov r1, #0xc0 - sub r0, r0, #4 - strh r1, [r0] - lsl r3, r2, #0x15 - ldr r1, [r3, #0] - ldr r0, _021DEDE0 ; =0xFFFF1FFF - and r1, r0 - lsl r0, r2, #8 - orr r0, r1 - str r0, [r3, #0] - ldr r0, _021DEDE4 ; =ov5_021DEDE8 - add r1, r7, #0 - lsl r2, r2, #5 - bl sub_0200DA3C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DEDDC: .word 0x04000048 -_021DEDE0: .word 0xFFFF1FFF -_021DEDE4: .word ov5_021DEDE8 - thumb_func_end ov5_021DED20 - - thumb_func_start ov5_021DEDE8 -ov5_021DEDE8: ; 0x021DEDE8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r1, _021DEE1C ; =ov5_021DEE50 - add r2, r4, #0 - bl ov5_021EF418 - add r1, r4, #0 - add r1, #0xdc - str r0, [r1, #0] - mov r2, #1 - ldr r0, _021DEE20 ; =ov5_021DEE24 - add r1, r4, #0 - lsl r2, r2, #0xa - bl sub_0200DA3C - add r4, #0xe0 - str r0, [r4, #0] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - nop -_021DEE1C: .word ov5_021DEE50 -_021DEE20: .word ov5_021DEE24 - thumb_func_end ov5_021DEDE8 - - thumb_func_start ov5_021DEE24 -ov5_021DEE24: ; 0x021DEE24 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021DEE34 - cmp r0, #1 - beq _021DEE46 - pop {r4, pc} -_021DEE34: - add r0, r4, #0 - bl ov5_021DDD90 - cmp r0, #1 - bne _021DEE4C - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - pop {r4, pc} -_021DEE46: - add r0, r4, #0 - bl ov5_021DEE84 -_021DEE4C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DEE24 - - thumb_func_start ov5_021DEE50 -ov5_021DEE50: ; 0x021DEE50 - ldr r0, _021DEE7C ; =0x04000006 - ldrh r0, [r0] - cmp r0, #0xc0 - bge _021DEE78 - add r0, r1, r0 - ldrb r0, [r0, #0x18] - ldr r2, [r1, #0] - sub r0, r2, r0 - bpl _021DEE64 - mov r0, #0 -_021DEE64: - lsl r1, r0, #8 - mov r0, #0xff - lsl r0, r0, #8 - and r1, r0 - mov r0, #0xff - orr r0, r1 - ldr r1, _021DEE80 ; =0x04000040 - strh r0, [r1] - mov r0, #0xc0 - strh r0, [r1, #4] -_021DEE78: - bx lr - nop -_021DEE7C: .word 0x04000006 -_021DEE80: .word 0x04000040 - thumb_func_end ov5_021DEE50 - - thumb_func_start ov5_021DEE84 -ov5_021DEE84: ; 0x021DEE84 - push {r4, lr} - mov r2, #1 - lsl r2, r2, #0x1a - add r4, r0, #0 - ldr r1, [r2, #0] - ldr r0, _021DEEC4 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r1, #1 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xdc - ldr r0, [r0, #0] - bl ov5_021EF43C - add r0, r4, #0 - mov r1, #0 - add r0, #0xdc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - bl sub_0200DA58 - mov r0, #0 - add r4, #0xe0 - str r0, [r4, #0] - pop {r4, pc} - nop -_021DEEC4: .word 0xFFFF1FFF - thumb_func_end ov5_021DEE84 - - thumb_func_start ov5_021DEEC8 -ov5_021DEEC8: ; 0x021DEEC8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - mov r6, #1 - add r1, r0, #0 - tst r1, r6 - bne _021DEEEC - mov r1, #0x72 - lsl r1, r1, #4 - tst r1, r0 - bne _021DEEE2 - cmp r0, #0 - bne _021DEEE6 -_021DEEE2: - mov r6, #0 - b _021DEEEC -_021DEEE6: - bl sub_02022974 - mov r6, #0 -_021DEEEC: - ldr r0, [r5, #4] - bl sub_02054A40 - add r7, r0, #0 - ldr r0, [r5, #8] - bl sub_02054A40 - str r0, [sp] - add r0, r7, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - ldr r0, [sp] - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - mov r1, #0x55 - lsl r1, r1, #2 - ldr r1, [r5, r1] - sub r0, r0, r7 - cmp r1, #0x18 - bhi _021DEF66 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021DEF2A: ; jump table - .short _021DEF5C - _021DEF2A - 2 ; case 0 - .short _021DEF5C - _021DEF2A - 2 ; case 1 - .short _021DEF5C - _021DEF2A - 2 ; case 2 - .short _021DEF5C - _021DEF2A - 2 ; case 3 - .short _021DEF5C - _021DEF2A - 2 ; case 4 - .short _021DEF64 - _021DEF2A - 2 ; case 5 - .short _021DEF5C - _021DEF2A - 2 ; case 6 - .short _021DEF60 - _021DEF2A - 2 ; case 7 - .short _021DEF5C - _021DEF2A - 2 ; case 8 - .short _021DEF5C - _021DEF2A - 2 ; case 9 - .short _021DEF5C - _021DEF2A - 2 ; case 10 - .short _021DEF5C - _021DEF2A - 2 ; case 11 - .short _021DEF66 - _021DEF2A - 2 ; case 12 - .short _021DEF66 - _021DEF2A - 2 ; case 13 - .short _021DEF66 - _021DEF2A - 2 ; case 14 - .short _021DEF66 - _021DEF2A - 2 ; case 15 - .short _021DEF66 - _021DEF2A - 2 ; case 16 - .short _021DEF66 - _021DEF2A - 2 ; case 17 - .short _021DEF66 - _021DEF2A - 2 ; case 18 - .short _021DEF66 - _021DEF2A - 2 ; case 19 - .short _021DEF66 - _021DEF2A - 2 ; case 20 - .short _021DEF66 - _021DEF2A - 2 ; case 21 - .short _021DEF66 - _021DEF2A - 2 ; case 22 - .short _021DEF66 - _021DEF2A - 2 ; case 23 - .short _021DEF5C - _021DEF2A - 2 ; case 24 -_021DEF5C: - mov r4, #0 - b _021DEF66 -_021DEF60: - mov r4, #2 - b _021DEF66 -_021DEF64: - mov r4, #4 -_021DEF66: - cmp r0, #0 - ble _021DEF6C - add r4, r4, #1 -_021DEF6C: - mov r0, #6 - mul r0, r6 - add r0, r4, r0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DEEC8 - - thumb_func_start ov5_021DEF74 -ov5_021DEF74: ; 0x021DEF74 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DEF88 ; =0x0400006C - ldr r1, [r1, #0] - bl sub_020BDEC4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - ; .align 2, 0 -_021DEF88: .word 0x0400006C - thumb_func_end ov5_021DEF74 - - thumb_func_start ov5_021DEF8C -ov5_021DEF8C: ; 0x021DEF8C - ldr r3, _021DEF98 ; =sub_0200DA3C - mov r2, #1 - add r1, r0, #0 - ldr r0, _021DEF9C ; =ov5_021DEF74 - lsl r2, r2, #0xa - bx r3 - ; .align 2, 0 -_021DEF98: .word sub_0200DA3C -_021DEF9C: .word ov5_021DEF74 - thumb_func_end ov5_021DEF8C - - thumb_func_start ov5_021DEFA0 -ov5_021DEFA0: ; 0x021DEFA0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021DF020 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DEFB0 - bl sub_02022974 -_021DEFB0: - mov r0, #4 - mov r1, #0x18 - bl sub_02018144 - ldr r1, _021DF020 ; =0x02202120 - mov r2, #0x18 - str r0, [r1, #0] - mov r1, #0 -_021DEFC0: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021DEFC0 - ldr r0, _021DF020 ; =0x02202120 - mov r1, #0 - ldr r2, [r0, #0] - strh r1, [r2] - ldr r2, [r0, #0] - strb r1, [r2, #2] - ldr r0, [r0, #0] - str r4, [r0, #4] - mov r0, #2 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - bl sub_020BEC9C - mov r2, #2 - ldr r1, _021DF024 ; =0x06840000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - ldr r0, _021DF028 ; =0xC0320C04 - ldr r2, _021DF02C ; =0x04000064 - ldr r1, _021DF020 ; =0x02202120 - str r0, [r2, #0] - ldr r0, _021DF030 ; =ov5_021DF258 - ldr r1, [r1, #0] - lsr r2, r2, #0x10 - bl sub_0200DA3C - ldr r1, _021DF020 ; =0x02202120 - mov r2, #1 - ldr r0, _021DF034 ; =ov5_021DF28C - ldr r1, [r1, #0] - lsl r2, r2, #0xa - bl sub_0200D9E8 - pop {r4, pc} - ; .align 2, 0 -_021DF020: .word 0x02202120 -_021DF024: .word 0x06840000 -_021DF028: .word 0xC0320C04 -_021DF02C: .word 0x04000064 -_021DF030: .word ov5_021DF258 -_021DF034: .word ov5_021DF28C - thumb_func_end ov5_021DEFA0 - - thumb_func_start ov5_021DF038 -ov5_021DF038: ; 0x021DF038 - push {r3, lr} - ldr r0, _021DF050 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF046 - bl sub_02022974 -_021DF046: - ldr r0, _021DF050 ; =0x02202120 - mov r1, #1 - ldr r0, [r0, #0] - strb r1, [r0, #3] - pop {r3, pc} - ; .align 2, 0 -_021DF050: .word 0x02202120 - thumb_func_end ov5_021DF038 - - thumb_func_start ov5_021DF054 -ov5_021DF054: ; 0x021DF054 - push {r3, lr} - ldr r0, _021DF06C ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF062 - bl sub_02022974 -_021DF062: - ldr r0, _021DF06C ; =0x02202120 - ldr r0, [r0, #0] - ldrb r0, [r0, #2] - pop {r3, pc} - nop -_021DF06C: .word 0x02202120 - thumb_func_end ov5_021DF054 - - thumb_func_start ov5_021DF070 -ov5_021DF070: ; 0x021DF070 - push {r3, lr} - ldr r0, _021DF080 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021DF07E - bl sub_0201469C -_021DF07E: - pop {r3, pc} - ; .align 2, 0 -_021DF080: .word 0x02202120 - thumb_func_end ov5_021DF070 - - thumb_func_start ov5_021DF084 -ov5_021DF084: ; 0x021DF084 - push {r3, lr} - ldr r0, _021DF0C8 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF092 - bl sub_02022974 -_021DF092: - bl sub_020141E4 - ldr r0, _021DF0C8 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov5_021DF3D4 - ldr r0, _021DF0C8 ; =0x02202120 - mov r1, #1 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov5_021D16F4 - ldr r0, _021DF0C8 ; =0x02202120 - mov r1, #1 - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bl ov5_021D1718 - ldr r0, _021DF0C8 ; =0x02202120 - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, _021DF0C8 ; =0x02202120 - mov r1, #0 - str r1, [r0, #0] - pop {r3, pc} - ; .align 2, 0 -_021DF0C8: .word 0x02202120 - thumb_func_end ov5_021DF084 - - thumb_func_start ov5_021DF0CC -ov5_021DF0CC: ; 0x021DF0CC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _021DF170 ; =0x02202120 - add r4, r1, #0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF0E0 - bl sub_02022974 -_021DF0E0: - ldr r0, _021DF170 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - cmp r0, #0 - beq _021DF0EE - bl sub_02022974 -_021DF0EE: - mov r1, #0x12 - mov r0, #4 - lsl r1, r1, #0xa - bl sub_02018144 - ldr r2, _021DF170 ; =0x02202120 - mov r3, #0x12 - ldr r1, [r2, #0] - lsl r3, r3, #0xa - str r0, [r1, #0xc] - mov r0, #1 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r2, [r2, #0] - ldr r0, _021DF174 ; =ov5_021DF3E8 - ldr r1, _021DF178 ; =ov5_021DF414 - ldr r2, [r2, #0xc] - bl sub_02014014 - ldr r1, _021DF170 ; =0x02202120 - ldr r2, [r1, #0] - str r0, [r2, #8] - ldr r0, [r1, #0] - ldr r0, [r0, #8] - cmp r0, #0 - bne _021DF128 - bl sub_02022974 -_021DF128: - ldr r0, _021DF170 ; =0x02202120 - mov r1, #1 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_02014788 - ldr r0, _021DF170 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_02014784 - add r2, r0, #0 - mov r0, #1 - mov r1, #0xe1 - lsl r0, r0, #0xc - lsl r1, r1, #0xe - bl sub_020206BC - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r3, #4 - str r2, [sp] - bl sub_0200723C - add r1, r0, #0 - ldr r0, _021DF170 ; =0x02202120 - mov r2, #0 - ldr r0, [r0, #0] - add r3, r2, #0 - ldr r0, [r0, #8] - bl sub_020144CC - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021DF170: .word 0x02202120 -_021DF174: .word ov5_021DF3E8 -_021DF178: .word ov5_021DF414 - thumb_func_end ov5_021DF0CC - - thumb_func_start ov5_021DF17C -ov5_021DF17C: ; 0x021DF17C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r1, sp, #0 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - ldr r0, _021DF1C8 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF198 - bl sub_02022974 -_021DF198: - ldr r0, _021DF1C8 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - cmp r0, #0 - bne _021DF1A6 - bl sub_02022974 -_021DF1A6: - mov r4, #0 - cmp r5, #0 - bls _021DF1C2 - ldr r6, _021DF1C8 ; =0x02202120 - add r7, sp, #0 -_021DF1B0: - ldr r0, [r6, #0] - add r1, r4, #0 - ldr r0, [r0, #8] - add r2, r7, #0 - bl sub_020146E4 - add r4, r4, #1 - cmp r4, r5 - blo _021DF1B0 -_021DF1C2: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021DF1C8: .word 0x02202120 - thumb_func_end ov5_021DF17C - - thumb_func_start ov5_021DF1CC -ov5_021DF1CC: ; 0x021DF1CC - push {r3, lr} - ldr r0, _021DF204 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF1DA - bl sub_02022974 -_021DF1DA: - ldr r0, _021DF204 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - cmp r0, #0 - bne _021DF1E8 - mov r0, #1 - pop {r3, pc} -_021DF1E8: - bl sub_020146C0 - ldr r0, _021DF204 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_02014710 - cmp r0, #0 - bne _021DF1FE - mov r0, #1 - pop {r3, pc} -_021DF1FE: - mov r0, #0 - pop {r3, pc} - nop -_021DF204: .word 0x02202120 - thumb_func_end ov5_021DF1CC - - thumb_func_start ov5_021DF208 -ov5_021DF208: ; 0x021DF208 - push {r3, lr} - ldr r0, _021DF220 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_02014710 - cmp r0, #0 - bne _021DF21C - mov r0, #1 - pop {r3, pc} -_021DF21C: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021DF220: .word 0x02202120 - thumb_func_end ov5_021DF208 - - thumb_func_start ov5_021DF224 -ov5_021DF224: ; 0x021DF224 - push {r3, lr} - ldr r0, _021DF254 ; =0x02202120 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF232 - bl sub_02022974 -_021DF232: - ldr r0, _021DF254 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #8] - bl sub_0201411C - ldr r0, _021DF254 ; =0x02202120 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_020181C4 - ldr r0, _021DF254 ; =0x02202120 - mov r2, #0 - ldr r1, [r0, #0] - str r2, [r1, #8] - ldr r0, [r0, #0] - str r2, [r0, #0xc] - pop {r3, pc} - ; .align 2, 0 -_021DF254: .word 0x02202120 - thumb_func_end ov5_021DF224 - - thumb_func_start ov5_021DF258 -ov5_021DF258: ; 0x021DF258 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _021DF26A - cmp r0, #1 - beq _021DF270 - pop {r3, r4, r5, pc} -_021DF26A: - add r0, r0, #1 - strh r0, [r4] - pop {r3, r4, r5, pc} -_021DF270: - ldrb r0, [r4, #3] - cmp r0, #1 - bne _021DF288 - ldr r0, [r4, #4] - bl ov5_021DF30C - add r0, r5, #0 - bl sub_0200DA58 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] -_021DF288: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF258 - - thumb_func_start ov5_021DF28C -ov5_021DF28C: ; 0x021DF28C - push {r4, r5, lr} - sub sp, #0x3c - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #2 - bne _021DF2FA - bl sub_02014000 - add r1, sp, #0x30 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - ldr r3, _021DF300 ; =0x021F9990 - str r0, [r1, #8] - ldmia r3!, {r0, r1} - add r2, sp, #0x24 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, sp, #0 - bl sub_020BB4C8 - add r0, sp, #0x30 - bl sub_020AF4BC - add r0, sp, #0x24 - bl sub_020AF4EC - ldr r1, _021DF304 ; =0x021C5B48 - add r0, sp, #0 - bl sub_020C4C88 - ldr r1, _021DF308 ; =0x021C5B0C - mov r0, #0xa4 - ldr r2, [r1, #0x7c] - bic r2, r0 - str r2, [r1, #0x7c] - ldr r0, [r4, #4] - mov r1, #0 - bl ov5_021D16F4 - ldr r0, [r4, #4] - mov r1, #0 - bl ov5_021D1718 - mov r0, #0 - add r1, r0, #0 - bl sub_02019060 - mov r0, #1 - strb r0, [r4, #2] - add r0, r5, #0 - bl sub_0200DA58 -_021DF2FA: - add sp, #0x3c - pop {r4, r5, pc} - nop -_021DF300: .word 0x021F9990 -_021DF304: .word 0x021C5B48 -_021DF308: .word 0x021C5B0C - thumb_func_end ov5_021DF28C - - thumb_func_start ov5_021DF30C -ov5_021DF30C: ; 0x021DF30C - push {r4, r5, lr} - sub sp, #0x6c - ldr r5, _021DF3BC ; =0x021F9A4C - add r4, r0, #0 - add r3, sp, #0x44 - mov r2, #5 -_021DF318: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021DF318 - add r0, sp, #0x44 - bl sub_0201FE94 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - ldr r5, _021DF3C0 ; =0x021F999C - add r3, sp, #0x34 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r0, [r4, #8] - bl ov5_021D143C - ldr r2, _021DF3C4 ; =0x0400000E - mov r0, #0x43 - ldrh r1, [r2] - and r1, r0 - ldr r0, _021DF3C8 ; =0x00004884 - orr r0, r1 - strh r0, [r2] - mov r0, #3 - add r1, r0, #0 - bl sub_02019060 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - add r0, sp, #0x24 - bl sub_020BB44C - mov r2, #0 - str r2, [sp] - ldr r0, _021DF3CC ; =0x04000030 - add r1, sp, #0x24 - add r3, r2, #0 - str r2, [sp, #4] - bl sub_020BF4AC - ldr r5, _021DF3D0 ; =0x021F99D8 - add r3, sp, #8 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #8] - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - ldr r0, [r4, #8] - mov r1, #2 - bl sub_02019EBC - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x6c - pop {r4, r5, pc} - ; .align 2, 0 -_021DF3BC: .word 0x021F9A4C -_021DF3C0: .word 0x021F999C -_021DF3C4: .word 0x0400000E -_021DF3C8: .word 0x00004884 -_021DF3CC: .word 0x04000030 -_021DF3D0: .word 0x021F99D8 - thumb_func_end ov5_021DF30C - - thumb_func_start ov5_021DF3D4 -ov5_021DF3D4: ; 0x021DF3D4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #8] - bl ov5_021D1434 - pop {r4, pc} - thumb_func_end ov5_021DF3D4 - - thumb_func_start ov5_021DF3E8 -ov5_021DF3E8: ; 0x021DF3E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021DF410 ; =0x02202120 - add r4, r1, #0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF3FA - bl sub_02022974 -_021DF3FA: - cmp r4, #0 - beq _021DF402 - bl sub_02022974 -_021DF402: - ldr r0, _021DF410 ; =0x02202120 - ldr r2, [r0, #0] - ldr r0, [r2, #0x10] - add r1, r0, r5 - str r1, [r2, #0x10] - pop {r3, r4, r5, pc} - nop -_021DF410: .word 0x02202120 - thumb_func_end ov5_021DF3E8 - - thumb_func_start ov5_021DF414 -ov5_021DF414: ; 0x021DF414 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021DF43C ; =0x02202120 - add r4, r1, #0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _021DF426 - bl sub_02022974 -_021DF426: - cmp r4, #0 - beq _021DF42E - bl sub_02022974 -_021DF42E: - ldr r0, _021DF43C ; =0x02202120 - ldr r2, [r0, #0] - ldr r0, [r2, #0x14] - add r1, r0, r5 - str r1, [r2, #0x14] - pop {r3, r4, r5, pc} - nop -_021DF43C: .word 0x02202120 - thumb_func_end ov5_021DF414 - - thumb_func_start ov5_021DF440 -ov5_021DF440: ; 0x021DF440 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - add r0, r7, #0 - mov r1, #0x24 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x24 - bl sub_020D5124 - str r7, [r4, #0] - str r5, [r4, #4] - str r6, [r4, #0x10] - add r0, r7, #0 - lsl r1, r5, #3 - bl sub_02018144 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov5_021DF5E8 - add r0, r4, #0 - bl ov5_021DF588 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF440 - - thumb_func_start ov5_021DF47C -ov5_021DF47C: ; 0x021DF47C - ldr r3, _021DF484 ; =ov5_021DF6F8 - str r1, [r0, #8] - bx r3 - nop -_021DF484: .word ov5_021DF6F8 - thumb_func_end ov5_021DF47C - - thumb_func_start ov5_021DF488 -ov5_021DF488: ; 0x021DF488 - push {r3, r4, lr} - sub sp, #0x14 - ldr r4, [sp, #0x20] - str r4, [sp] - ldr r4, [sp, #0x24] - str r4, [sp, #4] - ldr r4, [sp, #0x28] - str r4, [sp, #8] - ldr r4, [sp, #0x2c] - str r4, [sp, #0xc] - ldr r4, [sp, #0x30] - str r4, [sp, #0x10] - bl ov5_021DF754 - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov5_021DF488 - - thumb_func_start ov5_021DF4A8 -ov5_021DF4A8: ; 0x021DF4A8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021DF694 - cmp r0, #0 - beq _021DF4BC - bl sub_02022974 - pop {r3, r4, r5, pc} -_021DF4BC: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021DF600 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF4A8 - - thumb_func_start ov5_021DF4C8 -ov5_021DF4C8: ; 0x021DF4C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #0x22 - beq _021DF4E2 -_021DF4D4: - add r0, r5, #0 - bl ov5_021DF4A8 - add r4, r4, #4 - ldr r1, [r4, #0] - cmp r1, #0x22 - bne _021DF4D4 -_021DF4E2: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DF4C8 - - thumb_func_start ov5_021DF4E4 -ov5_021DF4E4: ; 0x021DF4E4 - push {r3, lr} - bl ov5_021DF694 - cmp r0, #0 - beq _021DF4F2 - mov r0, #1 - pop {r3, pc} -_021DF4F2: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF4E4 - - thumb_func_start ov5_021DF4F8 -ov5_021DF4F8: ; 0x021DF4F8 - ldr r3, _021DF4FC ; =ov5_021DF71C - bx r3 - ; .align 2, 0 -_021DF4FC: .word ov5_021DF71C - thumb_func_end ov5_021DF4F8 - - thumb_func_start ov5_021DF500 -ov5_021DF500: ; 0x021DF500 - push {r4, lr} - add r4, r0, #0 - bl ov5_021DF708 - add r0, r4, #0 - bl ov5_021DF644 - add r0, r4, #0 - bl ov5_021DF7C4 - add r0, r4, #0 - bl ov5_021DF59C - ldr r0, [r4, #0x14] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021DF500 - - thumb_func_start ov5_021DF528 -ov5_021DF528: ; 0x021DF528 - push {r3, lr} - cmp r2, #0 - ldr r0, [r0, #0] - bne _021DF536 - bl sub_02018144 - pop {r3, pc} -_021DF536: - bl sub_02018184 - pop {r3, pc} - thumb_func_end ov5_021DF528 - - thumb_func_start ov5_021DF53C -ov5_021DF53C: ; 0x021DF53C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r3, #0 - bl ov5_021DF528 - add r1, r4, #0 - add r2, r5, #0 - add r6, r0, #0 - bl sub_020D5124 - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DF53C - - thumb_func_start ov5_021DF554 -ov5_021DF554: ; 0x021DF554 - ldr r3, _021DF558 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021DF558: .word sub_020181C4 - thumb_func_end ov5_021DF554 - - thumb_func_start ov5_021DF55C -ov5_021DF55C: ; 0x021DF55C - push {r3, lr} - bl ov5_021DF694 - cmp r0, #0 - bne _021DF56E - bl sub_02022974 - mov r0, #0 - pop {r3, pc} -_021DF56E: - ldr r0, [r0, #4] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF55C - - thumb_func_start ov5_021DF574 -ov5_021DF574: ; 0x021DF574 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov5_021DF574 - - thumb_func_start ov5_021DF578 -ov5_021DF578: ; 0x021DF578 - push {r3, lr} - bl sub_02062C00 - ldr r0, [r0, #0x40] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF578 - - thumb_func_start ov5_021DF584 -ov5_021DF584: ; 0x021DF584 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov5_021DF584 - - thumb_func_start ov5_021DF588 -ov5_021DF588: ; 0x021DF588 - push {r4, lr} - add r4, r0, #0 - bl ov5_021DF584 - add r1, r0, #0 - mov r0, #0x6b - bl sub_02006C24 - str r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov5_021DF588 - - thumb_func_start ov5_021DF59C -ov5_021DF59C: ; 0x021DF59C - ldr r3, _021DF5A4 ; =sub_02006CA8 - ldr r0, [r0, #0x18] - bx r3 - nop -_021DF5A4: .word sub_02006CA8 - thumb_func_end ov5_021DF59C - - thumb_func_start ov5_021DF5A8 -ov5_021DF5A8: ; 0x021DF5A8 - ldr r3, _021DF5B0 ; =sub_02006D84 - ldr r0, [r0, #0x18] - bx r3 - nop -_021DF5B0: .word sub_02006D84 - thumb_func_end ov5_021DF5A8 - - thumb_func_start ov5_021DF5B4 -ov5_021DF5B4: ; 0x021DF5B4 - ldr r3, _021DF5BC ; =sub_02006D28 - ldr r0, [r0, #0x18] - bx r3 - nop -_021DF5BC: .word sub_02006D28 - thumb_func_end ov5_021DF5B4 - - thumb_func_start ov5_021DF5C0 -ov5_021DF5C0: ; 0x021DF5C0 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r5, r2, #0 - add r6, r1, #0 - bl sub_02006D84 - add r1, r0, #0 - add r0, r4, #0 - add r2, r5, #0 - bl ov5_021DF528 - add r5, r0, #0 - ldr r0, [r4, #0x18] - add r1, r6, #0 - add r2, r5, #0 - bl sub_02006D28 - add r0, r5, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DF5C0 - - thumb_func_start ov5_021DF5E8 -ov5_021DF5E8: ; 0x021DF5E8 - push {r3, r4, r5, lr} - ldr r4, [r0, #4] - ldr r5, [r0, #0x14] - cmp r4, #0 - beq _021DF5FE -_021DF5F2: - add r0, r5, #0 - bl ov5_021DF6AC - add r5, #8 - sub r4, r4, #1 - bne _021DF5F2 -_021DF5FE: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DF5E8 - - thumb_func_start ov5_021DF600 -ov5_021DF600: ; 0x021DF600 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - bl ov5_021DF6D0 - add r1, r0, #0 - ldr r1, [r1, #4] - add r0, r5, #0 - blx r1 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021DF66C - add r1, r6, #0 - add r2, r4, #0 - bl ov5_021DF6B8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF600 - - thumb_func_start ov5_021DF628 -ov5_021DF628: ; 0x021DF628 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - bl ov5_021DF6D0 - add r1, r0, #0 - ldr r0, [r4, #4] - ldr r1, [r1, #8] - blx r1 - add r0, r4, #0 - bl ov5_021DF6AC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF628 - - thumb_func_start ov5_021DF644 -ov5_021DF644: ; 0x021DF644 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r4, [r6, #4] - ldr r5, [r6, #0x14] - cmp r4, #0 - beq _021DF668 -_021DF650: - add r0, r5, #0 - bl ov5_021DF6C0 - cmp r0, #0 - bne _021DF662 - add r0, r6, #0 - add r1, r5, #0 - bl ov5_021DF628 -_021DF662: - add r5, #8 - sub r4, r4, #1 - bne _021DF650 -_021DF668: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF644 - - thumb_func_start ov5_021DF66C -ov5_021DF66C: ; 0x021DF66C - push {r3, r4, r5, lr} - ldr r4, [r0, #4] - ldr r5, [r0, #0x14] - cmp r4, #0 - beq _021DF68A -_021DF676: - add r0, r5, #0 - bl ov5_021DF6C0 - cmp r0, #1 - bne _021DF684 - add r0, r5, #0 - pop {r3, r4, r5, pc} -_021DF684: - add r5, #8 - sub r4, r4, #1 - bne _021DF676 -_021DF68A: - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF66C - - thumb_func_start ov5_021DF694 -ov5_021DF694: ; 0x021DF694 - ldr r3, [r0, #4] - ldr r0, [r0, #0x14] - cmp r3, #0 - beq _021DF6A8 -_021DF69C: - ldr r2, [r0, #0] - cmp r2, r1 - beq _021DF6AA - add r0, #8 - sub r3, r3, #1 - bne _021DF69C -_021DF6A8: - mov r0, #0 -_021DF6AA: - bx lr - thumb_func_end ov5_021DF694 - - thumb_func_start ov5_021DF6AC -ov5_021DF6AC: ; 0x021DF6AC - mov r1, #0x22 - str r1, [r0, #0] - mov r1, #0 - str r1, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DF6AC - - thumb_func_start ov5_021DF6B8 -ov5_021DF6B8: ; 0x021DF6B8 - str r1, [r0, #0] - str r2, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DF6B8 - - thumb_func_start ov5_021DF6C0 -ov5_021DF6C0: ; 0x021DF6C0 - ldr r0, [r0, #0] - cmp r0, #0x22 - bne _021DF6CA - mov r0, #1 - bx lr -_021DF6CA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021DF6C0 - - thumb_func_start ov5_021DF6D0 -ov5_021DF6D0: ; 0x021DF6D0 - push {r3, lr} - ldr r1, _021DF6F4 ; =0x021FF85C - ldr r2, [r1, #0] - cmp r2, #0x22 - beq _021DF6EA -_021DF6DA: - cmp r2, r0 - bne _021DF6E2 - add r0, r1, #0 - pop {r3, pc} -_021DF6E2: - add r1, #0xc - ldr r2, [r1, #0] - cmp r2, #0x22 - bne _021DF6DA -_021DF6EA: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - nop -_021DF6F4: .word 0x021FF85C - thumb_func_end ov5_021DF6D0 - - thumb_func_start ov5_021DF6F8 -ov5_021DF6F8: ; 0x021DF6F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r4, #8] - bl sub_020711EC - str r0, [r4, #0x1c] - pop {r4, pc} - thumb_func_end ov5_021DF6F8 - - thumb_func_start ov5_021DF708 -ov5_021DF708: ; 0x021DF708 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _021DF71A - bl sub_0207121C - mov r0, #0 - str r0, [r4, #0x1c] -_021DF71A: - pop {r4, pc} - thumb_func_end ov5_021DF708 - - thumb_func_start ov5_021DF71C -ov5_021DF71C: ; 0x021DF71C - push {r3, lr} - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _021DF728 - bl sub_020713D0 -_021DF728: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF71C - - thumb_func_start ov5_021DF72C -ov5_021DF72C: ; 0x021DF72C - push {r4, lr} - sub sp, #8 - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r4, [sp, #0x14] - str r4, [sp, #4] - ldr r0, [r0, #0x1c] - bl sub_02071330 - add r4, r0, #0 - bne _021DF746 - bl sub_02022974 -_021DF746: - add r0, r4, #0 - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021DF72C - - thumb_func_start ov5_021DF74C -ov5_021DF74C: ; 0x021DF74C - ldr r3, _021DF750 ; =sub_0207136C - bx r3 - ; .align 2, 0 -_021DF750: .word sub_0207136C - thumb_func_end ov5_021DF74C - - thumb_func_start ov5_021DF754 -ov5_021DF754: ; 0x021DF754 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r2, #0 - add r5, r1, #0 - mov r2, #0 - str r3, [sp] - mov r1, #0x24 - add r3, r2, #0 - add r7, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r4, [r7, #0x20] - str r5, [r4, #0] - ldr r0, [sp] - strh r6, [r4, #4] - strh r0, [r4, #6] - ldr r0, [sp, #0x20] - ldr r2, [sp, #0x28] - strh r0, [r4, #8] - ldr r0, [sp, #0x24] - ldr r3, [sp] - strh r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #0x45 - bl ov5_021F067C - str r0, [r4, #0x10] - ldr r2, [sp, #0x2c] - ldr r3, [sp, #0x20] - add r0, r5, #0 - mov r1, #0x46 - bl ov5_021F067C - str r0, [r4, #0x14] - ldr r0, [sp, #0x24] - add r1, r5, #0 - bl sub_02022BD8 - str r0, [r4, #0x18] - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021DF8C8 - add r0, r7, #0 - str r6, [sp, #4] - bl ov5_021DF584 - str r0, [sp, #8] - add r0, sp, #4 - bl sub_02020C44 - str r0, [r4, #0xc] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021DF754 - - thumb_func_start ov5_021DF7C4 -ov5_021DF7C4: ; 0x021DF7C4 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r5, [r4, #0x20] - cmp r5, #0 - beq _021DF7F6 - ldr r0, [r5, #0xc] - bl sub_02020CCC - add r0, r5, #0 - bl ov5_021DF8FC - ldr r0, [r5, #0x10] - bl ov5_021F06D8 - ldr r0, [r5, #0x14] - bl ov5_021F06D8 - ldr r0, [r5, #0x18] - bl sub_02022C1C - add r0, r5, #0 - bl ov5_021DF554 - mov r0, #0 - str r0, [r4, #0x20] -_021DF7F6: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DF7C4 - - thumb_func_start ov5_021DF7F8 -ov5_021DF7F8: ; 0x021DF7F8 - push {r4, lr} - sub sp, #0x20 - ldr r0, [r0, #0x20] - add r3, sp, #8 - ldr r0, [r0, #0xc] - str r0, [sp] - str r1, [sp, #4] - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - add r2, sp, #0x14 - str r0, [r3, #0] - ldr r3, _021DF848 ; =0x021F9AF0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, sp, #0 - bl sub_0202119C - add r4, r0, #0 - bne _021DF828 - bl sub_02022974 -_021DF828: - cmp r4, #0 - beq _021DF842 - add r0, r4, #0 - bl sub_020213F4 - mov r1, #1 - bl sub_020B37A4 - add r0, r4, #0 - bl sub_020213F4 - bl ov5_021D53A4 -_021DF842: - add r0, r4, #0 - add sp, #0x20 - pop {r4, pc} - ; .align 2, 0 -_021DF848: .word 0x021F9AF0 - thumb_func_end ov5_021DF7F8 - - thumb_func_start ov5_021DF84C -ov5_021DF84C: ; 0x021DF84C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x20] - add r4, r2, #0 - bl ov5_021DF9B4 - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov5_021DF7F8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DF84C - - thumb_func_start ov5_021DF864 -ov5_021DF864: ; 0x021DF864 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - ldr r5, [r0, #0x20] - add r6, r1, #0 - ldr r0, [r5, #0x10] - add r1, r2, #0 - add r4, r3, #0 - bl ov5_021F075C - add r7, r0, #0 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl ov5_021F075C - add r1, sp, #0xc - bl sub_02024184 - ldr r0, [r5, #0x18] - ldr r1, [sp, #0x30] - bl sub_02022D98 - add r4, r0, #0 - bne _021DF896 - bl sub_02022974 -_021DF896: - add r0, r4, #0 - bl sub_02022DF4 - ldr r1, [sp, #0x34] - cmp r1, #1 - bne _021DF8A4 - mov r4, #0 -_021DF8A4: - str r0, [sp] - ldr r0, [sp, #0x38] - str r4, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - add r3, sp, #0xc - bl ov5_021DF930 - add r4, r0, #0 - bne _021DF8C0 - bl sub_02022974 -_021DF8C0: - add r0, r4, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF864 - - thumb_func_start ov5_021DF8C8 -ov5_021DF8C8: ; 0x021DF8C8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r2, #0 - mov r1, #0x28 - add r7, r0, #0 - mul r1, r5 - mov r2, #0 - bl ov5_021DF528 - add r4, r0, #0 - add r0, r7, #0 - lsl r1, r5, #3 - mov r2, #0 - str r4, [r6, #0x20] - bl ov5_021DF528 - str r0, [r6, #0x1c] - mov r1, #0x11 -_021DF8EC: - str r1, [r0, #0] - str r4, [r0, #4] - add r0, #8 - add r4, #0x28 - sub r5, r5, #1 - bne _021DF8EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF8C8 - - thumb_func_start ov5_021DF8FC -ov5_021DF8FC: ; 0x021DF8FC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - bl ov5_021DF554 - ldr r0, [r4, #0x20] - bl ov5_021DF554 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF8FC - - thumb_func_start ov5_021DF910 -ov5_021DF910: ; 0x021DF910 - push {r3, lr} - ldrh r2, [r0, #4] - ldr r3, [r0, #0x1c] -_021DF916: - ldr r0, [r3, #0] - cmp r0, r1 - bne _021DF922 - mov r0, #0x11 - str r0, [r3, #0] - pop {r3, pc} -_021DF922: - add r3, #8 - sub r2, r2, #1 - bne _021DF916 - bl sub_02022974 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF910 - - thumb_func_start ov5_021DF930 -ov5_021DF930: ; 0x021DF930 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldrh r5, [r6, #4] - add r0, r1, #0 - ldr r1, [sp, #0x1c] - str r2, [sp] - ldr r6, [r6, #0x1c] - add r7, r3, #0 - str r1, [sp, #0x1c] - mov r4, #0 - add r2, r5, #0 - add r3, r6, #0 -_021DF948: - ldr r1, [r3, #0] - cmp r1, r0 - bne _021DF952 - ldr r0, [r3, #4] - pop {r3, r4, r5, r6, r7, pc} -_021DF952: - add r3, #8 - sub r2, r2, #1 - bne _021DF948 -_021DF958: - ldr r1, [r6, #0] - cmp r1, #0x11 - bne _021DF964 - str r0, [r6, #0] - ldr r4, [r6, #4] - b _021DF96A -_021DF964: - add r6, #8 - sub r5, r5, #1 - bne _021DF958 -_021DF96A: - cmp r4, #0 - bne _021DF972 - bl sub_02022974 -_021DF972: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x28 - bl sub_020D5124 - ldr r0, [sp] - add r2, r4, #0 - str r0, [r4, #0] - add r2, #0xc - ldmia r7!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r7!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp, #0x18] - str r0, [r4, #4] - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _021DF9AC - bl sub_02022EF4 - str r0, [r4, #0x1c] - ldr r0, [sp, #0x1c] - bl sub_02022F04 - str r0, [r4, #0x20] - ldr r0, [sp, #0x1c] - bl sub_02022F14 - str r0, [r4, #0x24] -_021DF9AC: - ldr r0, [sp, #0x20] - str r0, [r4, #8] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DF930 - - thumb_func_start ov5_021DF9B4 -ov5_021DF9B4: ; 0x021DF9B4 - push {r3, lr} - ldrh r2, [r0, #4] - ldr r3, [r0, #0x1c] -_021DF9BA: - ldr r0, [r3, #0] - cmp r0, r1 - bne _021DF9C4 - ldr r0, [r3, #4] - pop {r3, pc} -_021DF9C4: - add r3, #8 - sub r2, r2, #1 - bne _021DF9BA - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF9B4 - - thumb_func_start ov5_021DF9D4 -ov5_021DF9D4: ; 0x021DF9D4 - ldr r3, _021DF9DC ; =ov5_021DF910 - ldr r0, [r0, #0x20] - bx r3 - nop -_021DF9DC: .word ov5_021DF910 - thumb_func_end ov5_021DF9D4 - - thumb_func_start ov5_021DF9E0 -ov5_021DF9E0: ; 0x021DF9E0 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0x20] - add r3, r2, #0 - ldr r0, [r0, #0x10] - ldr r2, [r4, #0x18] - bl ov5_021F0784 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DF9E0 - - thumb_func_start ov5_021DF9FC -ov5_021DF9FC: ; 0x021DF9FC - ldr r0, [r0, #0x20] - ldr r3, _021DFA04 ; =ov5_021F075C - ldr r0, [r0, #0x10] - bx r3 - ; .align 2, 0 -_021DFA04: .word ov5_021F075C - thumb_func_end ov5_021DF9FC - - thumb_func_start ov5_021DFA08 -ov5_021DFA08: ; 0x021DFA08 - ldr r0, [r0, #0x20] - ldr r3, _021DFA10 ; =ov5_021F0740 - ldr r0, [r0, #0x10] - bx r3 - ; .align 2, 0 -_021DFA10: .word ov5_021F0740 - thumb_func_end ov5_021DFA08 - - thumb_func_start ov5_021DFA14 -ov5_021DFA14: ; 0x021DFA14 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0x20] - add r3, r2, #0 - ldr r0, [r0, #0x14] - ldr r2, [r4, #0x18] - bl ov5_021F0784 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFA14 - - thumb_func_start ov5_021DFA30 -ov5_021DFA30: ; 0x021DFA30 - ldr r0, [r0, #0x20] - ldr r3, _021DFA38 ; =ov5_021F0740 - ldr r0, [r0, #0x14] - bx r3 - ; .align 2, 0 -_021DFA38: .word ov5_021F0740 - thumb_func_end ov5_021DFA30 - - thumb_func_start ov5_021DFA3C -ov5_021DFA3C: ; 0x021DFA3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - add r1, r2, #0 - ldr r4, [r5, #0x20] - mov r2, #1 - add r7, r3, #0 - bl ov5_021DF5C0 - str r0, [sp, #4] - add r0, r5, #0 - bl ov5_021DF584 - str r0, [sp] - ldr r0, [r4, #0x18] - ldr r1, [sp, #4] - add r2, r6, #0 - add r3, r7, #0 - bl sub_02022C9C - cmp r0, #0 - bne _021DFA6E - bl sub_02022974 -_021DFA6E: - ldr r2, [r4, #0x18] - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021DFA88 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DFA3C - - thumb_func_start ov5_021DFA7C -ov5_021DFA7C: ; 0x021DFA7C - ldr r0, [r0, #0x20] - ldr r3, _021DFA84 ; =sub_02022D38 - ldr r0, [r0, #0x18] - bx r3 - ; .align 2, 0 -_021DFA84: .word sub_02022D38 - thumb_func_end ov5_021DFA7C - - thumb_func_start ov5_021DFA88 -ov5_021DFA88: ; 0x021DFA88 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - mov r1, #0xc - mov r2, #1 - bl ov5_021DF528 - add r4, r0, #0 - mov r0, #1 - str r0, [r4, #0] - str r5, [r4, #4] - ldr r0, _021DFAB8 ; =ov5_021DFAC0 - add r1, r4, #0 - mov r2, #0xff - str r6, [r4, #8] - bl sub_0200DA04 - ldr r0, _021DFABC ; =ov5_021DFADC - add r1, r4, #0 - mov r2, #0xff - bl sub_0200DA3C - pop {r4, r5, r6, pc} - nop -_021DFAB8: .word ov5_021DFAC0 -_021DFABC: .word ov5_021DFADC - thumb_func_end ov5_021DFA88 - - thumb_func_start ov5_021DFAC0 -ov5_021DFAC0: ; 0x021DFAC0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - ldr r1, [r4, #4] - bl sub_02022E38 - mov r0, #1 - str r0, [r4, #0] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFAC0 - - thumb_func_start ov5_021DFADC -ov5_021DFADC: ; 0x021DFADC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #1 - bne _021DFAFC - ldr r0, [r4, #8] - ldr r1, [r4, #4] - bl sub_02022EA0 - add r0, r4, #0 - bl ov5_021DF554 - add r0, r5, #0 - bl sub_0200DA58 -_021DFAFC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFADC - - thumb_func_start ov5_021DFB00 -ov5_021DFB00: ; 0x021DFB00 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - str r0, [sp] - ldr r0, [sp, #0x18] - add r1, r2, #0 - str r0, [sp, #4] - ldr r2, [r5, #0x18] - add r0, r4, #0 - bl sub_0207389C - add r0, r4, #0 - bl sub_020738EC - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DFB00 - - thumb_func_start ov5_021DFB24 -ov5_021DFB24: ; 0x021DFB24 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0] - str r0, [sp] - ldr r0, [sp, #0x10] - str r0, [sp, #4] - add r0, r1, #0 - add r1, r2, #0 - ldr r2, [r4, #0x18] - bl sub_020739B4 - add sp, #8 - pop {r4, pc} - thumb_func_end ov5_021DFB24 - - thumb_func_start ov5_021DFB40 -ov5_021DFB40: ; 0x021DFB40 - push {r3, lr} - ldr r0, [r0, #0] - str r0, [sp] - add r0, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, [sp, #8] - bl sub_02073A6C - pop {r3, pc} - thumb_func_end ov5_021DFB40 - - thumb_func_start ov5_021DFB54 -ov5_021DFB54: ; 0x021DFB54 - ldr r3, _021DFB58 ; =sub_0205EB84 - bx r3 - ; .align 2, 0 -_021DFB58: .word sub_0205EB84 - thumb_func_end ov5_021DFB54 - - thumb_func_start ov5_021DFB5C -ov5_021DFB5C: ; 0x021DFB5C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r6, #0 - bl sub_0205EB90 - ldr r5, _021DFB8C ; =0x021F9B74 - add r4, r0, #0 -_021DFB6A: - mov r0, #1 - tst r0, r4 - beq _021DFB76 - ldr r1, [r5, #0] - add r0, r7, #0 - blx r1 -_021DFB76: - add r6, r6, #1 - lsr r4, r4, #1 - add r5, r5, #4 - cmp r6, #0xa - blo _021DFB6A - add r0, r7, #0 - mov r1, #0 - bl sub_0205EB8C - pop {r3, r4, r5, r6, r7, pc} - nop -_021DFB8C: .word 0x021F9B74 - thumb_func_end ov5_021DFB5C - - thumb_func_start ov5_021DFB90 -ov5_021DFB90: ; 0x021DFB90 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - bl sub_0205F108 - cmp r0, #0 - beq _021DFBA2 - mov r4, #0x18 - b _021DFBB8 -_021DFBA2: - add r0, r5, #0 - bl sub_0205EB3C - bl sub_02062C00 - mov r1, #2 - bl sub_02071CB4 - cmp r0, #1 - bne _021DFBB8 - mov r4, #0x1c -_021DFBB8: - add r0, r5, #0 - bl sub_0205EB98 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021E106C - add r0, r5, #0 - mov r1, #0 - bl sub_0205EB58 - add r0, r5, #0 - bl sub_0205EBC0 - add r0, r5, #0 - bl sub_0205EC04 - cmp r0, #0 - beq _021DFBEA - bl ov5_021DF74C -_021DFBEA: - add r0, r5, #0 - mov r1, #0 - bl sub_0205EC00 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DFB90 - - thumb_func_start ov5_021DFBF4 -ov5_021DFBF4: ; 0x021DFBF4 - push {r4, lr} - add r4, r0, #0 - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #1 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E106C - add r0, r4, #0 - mov r1, #1 - bl sub_0205EB58 - add r0, r4, #0 - bl sub_0205EBC0 - add r0, r4, #0 - bl sub_0205EC04 - cmp r0, #0 - beq _021DFC28 - bl ov5_021DF74C -_021DFC28: - add r0, r4, #0 - mov r1, #0 - bl sub_0205EC00 - ldr r0, _021DFC38 ; =0x00000618 - bl sub_02005748 - pop {r4, pc} - ; .align 2, 0 -_021DFC38: .word 0x00000618 - thumb_func_end ov5_021DFBF4 - - thumb_func_start ov5_021DFC3C -ov5_021DFC3C: ; 0x021DFC3C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_0205EB3C - add r6, r0, #0 - bl sub_02062C00 - add r0, r5, #0 - bl sub_0205F108 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0205EC04 - cmp r0, #0 - beq _021DFC62 - bl ov5_021DF74C -_021DFC62: - add r0, r5, #0 - mov r1, #0 - bl sub_0205EC00 - add r0, r5, #0 - bl sub_0205F16C - cmp r0, #1 - bne _021DFC7C - add r0, r5, #0 - bl sub_0205EA78 - b _021DFC82 -_021DFC7C: - add r0, r5, #0 - bl sub_0205EA94 -_021DFC82: - add r3, r0, #0 - cmp r4, #0 - bne _021DFC9C - mov r0, #1 - mov r1, #0 - str r0, [sp] - add r0, r6, #0 - add r2, r1, #0 - bl ov5_021F261C - add r1, r0, #0 - mov r4, #2 - b _021DFCB4 -_021DFC9C: - mov r1, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r1, #0 - add r3, r1, #0 - str r4, [sp, #8] - bl ov5_021F85BC - add r1, r0, #0 - mov r4, #0x19 -_021DFCB4: - add r0, r5, #0 - bl sub_0205EC00 - add r0, r5, #0 - bl sub_0205EB98 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021E106C - add r0, r5, #0 - mov r1, #2 - bl sub_0205EB58 - add r0, r5, #0 - bl sub_0205EBC0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFC3C - - thumb_func_start ov5_021DFCE4 -ov5_021DFCE4: ; 0x021DFCE4 - ldr r3, _021DFCEC ; =sub_0205EF6C - mov r1, #1 - bx r3 - nop -_021DFCEC: .word sub_0205EF6C - thumb_func_end ov5_021DFCE4 - - thumb_func_start ov5_021DFCF0 -ov5_021DFCF0: ; 0x021DFCF0 - push {r4, lr} - add r4, r0, #0 - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0x11 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E106C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFCF0 - - thumb_func_start ov5_021DFD0C -ov5_021DFD0C: ; 0x021DFD0C - push {r4, lr} - add r4, r0, #0 - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0x13 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E106C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFD0C - - thumb_func_start ov5_021DFD28 -ov5_021DFD28: ; 0x021DFD28 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0x14 - bl sub_0205F108 - cmp r0, #0 - beq _021DFD3A - mov r4, #0x1b - b _021DFD50 -_021DFD3A: - add r0, r5, #0 - bl sub_0205EB3C - bl sub_02062C00 - mov r1, #2 - bl sub_02071CB4 - cmp r0, #1 - bne _021DFD50 - mov r4, #0x1e -_021DFD50: - add r0, r5, #0 - bl sub_0205EB98 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021E106C - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DFD28 - - thumb_func_start ov5_021DFD68 -ov5_021DFD68: ; 0x021DFD68 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0x15 - bl sub_0205F108 - cmp r0, #0 - beq _021DFD7A - mov r4, #0x1a - b _021DFD90 -_021DFD7A: - add r0, r5, #0 - bl sub_0205EB3C - bl sub_02062C00 - mov r1, #2 - bl sub_02071CB4 - cmp r0, #1 - bne _021DFD90 - mov r4, #0x1d -_021DFD90: - add r0, r5, #0 - bl sub_0205EB98 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021E106C - pop {r3, r4, r5, pc} - thumb_func_end ov5_021DFD68 - - thumb_func_start ov5_021DFDA8 -ov5_021DFDA8: ; 0x021DFDA8 - push {r4, lr} - add r4, r0, #0 - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0x16 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E106C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFDA8 - - thumb_func_start ov5_021DFDC4 -ov5_021DFDC4: ; 0x021DFDC4 - push {r4, lr} - add r4, r0, #0 - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0x17 - bl sub_0205ED6C - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E106C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFDC4 - - thumb_func_start ov5_021DFDE0 -ov5_021DFDE0: ; 0x021DFDE0 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _021DFDF2 - bl sub_02022974 -_021DFDF2: - add r0, r5, #0 - bl sub_0205EB3C - cmp r0, #0 - bne _021DFE00 - bl sub_02022974 -_021DFE00: - add r0, r5, #0 - bl sub_0205EF58 - cmp r0, #1 - bne _021DFE20 - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov5_021E067C - cmp r0, #1 - bne _021DFE1C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFE1C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFE20: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0205F224 - cmp r0, #0 - bne _021DFE30 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFE30: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _021DFE50 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov5_021DFEF4 - cmp r0, #1 - bne _021DFE4C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFE4C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFE50: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov5_021DFE68 - cmp r0, #1 - bne _021DFE64 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFE64: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021DFDE0 - - thumb_func_start ov5_021DFE68 -ov5_021DFE68: ; 0x021DFE68 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r5, r2, #0 - add r6, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - add r4, r3, #0 - bl sub_02061434 - str r0, [sp] - mov r0, #4 - tst r0, r4 - beq _021DFE92 - add r0, r6, #0 - add r1, r5, #0 - bl ov9_0224A59C - cmp r0, #1 - bne _021DFE92 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFE92: - mov r0, #1 - tst r0, r4 - beq _021DFEAC - ldr r3, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov5_021DFF1C - cmp r0, #1 - bne _021DFEAC - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFEAC: - mov r0, #2 - tst r0, r4 - beq _021DFEC6 - ldr r3, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov5_021E04A8 - cmp r0, #1 - bne _021DFEC6 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFEC6: - ldr r3, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov5_021E032C - cmp r0, #1 - bne _021DFEDA - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFEDA: - ldr r3, [sp] - add r0, r6, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov5_021E04EC - cmp r0, #1 - bne _021DFEEE - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021DFEEE: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFE68 - - thumb_func_start ov5_021DFEF4 -ov5_021DFEF4: ; 0x021DFEF4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl sub_02061434 - add r3, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021E04EC - cmp r0, #1 - bne _021DFF18 - mov r0, #1 - pop {r4, r5, r6, pc} -_021DFF18: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021DFEF4 - - thumb_func_start ov5_021DFF1C -ov5_021DFF1C: ; 0x021DFF1C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - cmp r3, #1 - beq _021DFF2C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFF2C: - add r0, r7, #0 - add r1, r5, #0 - bl ov5_021E10D4 - add r4, r0, #0 - bne _021DFF3C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFF3C: - bl sub_02062920 - cmp r0, #0x54 - beq _021DFF48 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFF48: - add r0, r4, #0 - add r1, r5, #0 - bl sub_02063EBC - mov r1, #1 - bic r0, r1 - beq _021DFF76 - add r0, r6, #0 - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - bne _021DFF72 - add r0, r4, #0 - add r1, r5, #0 - bl ov9_0224F240 - cmp r0, #0 - bne _021DFF76 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFF72: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021DFF76: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - add r3, r4, #0 - bl ov5_021DFF88 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021DFF1C - - thumb_func_start ov5_021DFF88 -ov5_021DFF88: ; 0x021DFF88 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x18 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021E1110 - add r2, r0, #0 - str r5, [r2, #4] - str r4, [r2, #8] - str r7, [r2, #0x10] - ldr r1, _021DFFB8 ; =ov5_021DFFBC - str r6, [r2, #0xc] - add r0, r4, #0 - bl sub_02050904 - ldr r0, [r4, #0xc] - bl sub_0202CD88 - mov r1, #0x37 - bl sub_0202CF28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021DFFB8: .word ov5_021DFFBC - thumb_func_end ov5_021DFF88 - - thumb_func_start ov5_021DFFBC -ov5_021DFFBC: ; 0x021DFFBC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0205EB3C - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0x10] - cmp r0, #3 - bhi _021E00A8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021DFFE2: ; jump table - .short _021DFFEA - _021DFFE2 - 2 ; case 0 - .short _021E0036 - _021DFFE2 - 2 ; case 1 - .short _021E0084 - _021DFFE2 - 2 ; case 2 - .short _021E008E - _021DFFE2 - 2 ; case 3 -_021DFFEA: - add r0, r5, #0 - bl sub_020655F4 - cmp r0, #0 - beq _021E00A8 - add r0, r6, #0 - bl sub_020655F4 - cmp r0, #0 - bne _021E0008 - ldr r0, [r4, #0xc] - bl sub_020613AC - cmp r0, #0 - beq _021E00A8 -_021E0008: - ldr r0, [r4, #4] - mov r1, #8 - bl sub_02065838 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02065638 - ldr r0, [r4, #4] - mov r1, #0x20 - bl sub_02065838 - add r1, r0, #0 - add r0, r6, #0 - bl sub_02065638 - ldr r0, _021E00AC ; =0x00000627 - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E00A8 -_021E0036: - add r0, r5, #0 - bl sub_02065684 - cmp r0, #0 - beq _021E00A8 - add r0, r6, #0 - bl sub_02065684 - cmp r0, #0 - beq _021E00A8 - ldr r0, [r4, #8] - mov r1, #9 - bl sub_02071CB4 - cmp r0, #1 - bne _021E0072 - add r0, r5, #0 - bl ov9_0224F2B0 - cmp r0, #1 - bne _021E0072 - ldr r0, [r4, #8] - add r1, r7, #0 - add r2, r5, #0 - bl ov9_0224F2BC - str r0, [r4, #0x14] - mov r0, #3 - str r0, [r4, #0] - b _021E00A8 -_021E0072: - add r0, r5, #0 - bl sub_020656AC - add r0, r6, #0 - bl sub_020656AC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0084: - add r0, r4, #0 - bl ov5_021E1134 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E008E: - ldr r0, [r4, #0x14] - bl ov9_0224F6EC - cmp r0, #1 - bne _021E00A8 - add r0, r5, #0 - bl sub_020656AC - add r0, r6, #0 - bl sub_020656AC - mov r0, #2 - str r0, [r4, #0] -_021E00A8: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E00AC: .word 0x00000627 - thumb_func_end ov5_021DFFBC - - thumb_func_start ov5_021E00B0 -ov5_021E00B0: ; 0x021E00B0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x2c - add r7, r1, #0 - add r5, r2, #0 - bl ov5_021E1110 - add r4, r0, #0 - str r7, [r4, #4] - str r6, [r4, #0x1c] - ldr r0, [r6, #0x3c] - str r0, [r4, #0x20] - bl sub_0205EB3C - add r2, r4, #0 - str r0, [r4, #0x24] - add r2, #0xc - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r6, #0x10] - ldr r1, _021E00E8 ; =ov5_021E0160 - add r2, r4, #0 - bl sub_02050944 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E00E8: .word ov5_021E0160 - thumb_func_end ov5_021E00B0 - - thumb_func_start ov5_021E00EC -ov5_021E00EC: ; 0x021E00EC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r2, #0 - add r6, r1, #0 - bl sub_02050A60 - add r4, r0, #0 - add r1, r5, #0 - bl ov5_021E1140 - add r1, r0, #0 - add r0, r4, #0 - add r2, sp, #0 - bl ov5_021E1028 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0 - bl ov5_021E00B0 - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E00EC - - thumb_func_start ov5_021E0118 -ov5_021E0118: ; 0x021E0118 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r5, r1, #0 - bl sub_0205EB3C - add r6, r0, #0 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DB58 - cmp r0, #1 - bne _021E015A - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DEFC - cmp r0, #1 - beq _021E0148 - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DEF0 - cmp r0, #1 - bne _021E0156 -_021E0148: - add r0, r6, #0 - bl sub_02062F30 - cmp r0, #1 - bne _021E0156 - mov r0, #0 - pop {r4, r5, r6, pc} -_021E0156: - mov r0, #1 - pop {r4, r5, r6, pc} -_021E015A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0118 - - thumb_func_start ov5_021E0160 -ov5_021E0160: ; 0x021E0160 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - bl sub_02050A64 - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #5 - bhi _021E01CE - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E017C: ; jump table - .short _021E0188 - _021E017C - 2 ; case 0 - .short _021E01C2 - _021E017C - 2 ; case 1 - .short _021E01D8 - _021E017C - 2 ; case 2 - .short _021E027A - _021E017C - 2 ; case 3 - .short _021E027E - _021E017C - 2 ; case 4 - .short _021E02BC - _021E017C - 2 ; case 5 -_021E0188: - ldr r0, [r4, #0x20] - bl sub_0205F108 - cmp r0, #0 - bne _021E01A4 - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_020553F0 - ldr r0, [r4, #0x1c] - ldr r1, _021E0324 ; =0x0000047F - mov r2, #1 - bl sub_02055554 -_021E01A4: - ldr r0, [r4, #0xc] - cmp r0, #1 - bne _021E01BC - add r1, r4, #0 - ldr r0, [r4, #0x1c] - add r1, #0xc - bl ov5_021E103C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E031E -_021E01BC: - mov r0, #2 - str r0, [r4, #0] - b _021E031E -_021E01C2: - add r0, r4, #0 - add r0, #0xc - bl ov5_021E1050 - cmp r0, #1 - beq _021E01D0 -_021E01CE: - b _021E031E -_021E01D0: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E031E -_021E01D8: - ldr r0, [r4, #0x20] - bl sub_0205F108 - cmp r0, #0 - bne _021E0214 - ldr r0, [r4, #0x20] - bl sub_0205EABC - add r5, r0, #0 - ldr r0, [r4, #4] - bl sub_0206419C - add r6, r0, #0 - ldr r0, [r4, #0x20] - bl sub_0205EAC8 - add r7, r0, #0 - ldr r0, [r4, #4] - bl sub_020641A8 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0x24] - ldr r3, [r4, #4] - add r1, r5, r6 - add r2, r7, r2 - bl ov5_021F261C - b _021E0260 -_021E0214: - ldr r0, [r4, #0x24] - bl sub_02063020 - str r0, [sp, #0x14] - ldr r0, [r4, #0x24] - bl sub_02063030 - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0x24] - bl sub_02063040 - str r0, [sp, #0xc] - ldr r0, [r4, #0x20] - bl sub_0205F108 - add r5, r0, #0 - add r0, sp, #0xc - str r0, [sp] - ldr r0, [r4, #0x20] - ldr r1, [r4, #4] - add r2, sp, #0x14 - add r3, sp, #0x10 - bl sub_02061674 - ldr r0, [r4, #4] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r5, [sp, #8] - ldr r0, [r4, #0x20] - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0xc] - bl ov5_021F85BC -_021E0260: - str r0, [r4, #0x28] - ldr r0, [r4, #0x20] - ldr r1, [r4, #0x28] - bl sub_0205EC00 - ldr r0, [r4, #0x20] - mov r1, #2 - bl sub_0205EB58 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E031E -_021E027A: - add r0, r1, #1 - str r0, [r4, #0] -_021E027E: - ldr r0, [r4, #0x24] - bl sub_020655F4 - cmp r0, #1 - bne _021E031E - ldr r3, _021E0328 ; =0x021F9B3C - add r2, sp, #0x18 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x20] - bl sub_0205F108 - add r1, r0, #0 - lsl r2, r1, #2 - add r1, sp, #0x18 - ldr r0, [r4, #4] - ldr r1, [r1, r2] - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r4, #0x24] - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E031E -_021E02BC: - ldr r0, [r4, #0x24] - bl sub_02065684 - cmp r0, #0 - beq _021E031E - ldr r0, [r4, #0x24] - bl sub_020656AC - ldr r0, [r4, #0x20] - bl sub_0205F108 - cmp r0, #0 - ldr r0, [r4, #0x28] - bne _021E02F6 - mov r1, #1 - bl ov5_021F2838 - ldr r0, [r4, #0x20] - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #2 - bl sub_0205ED6C - add r1, r0, #0 - ldr r0, [r4, #0x20] - bl ov5_021E106C - b _021E0312 -_021E02F6: - mov r1, #2 - bl ov5_021F88CC - ldr r0, [r4, #0x20] - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0x19 - bl sub_0205ED6C - add r1, r0, #0 - ldr r0, [r4, #0x20] - bl ov5_021E106C -_021E0312: - add r0, r4, #0 - bl ov5_021E1134 - add sp, #0x30 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E031E: - mov r0, #0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E0324: .word 0x0000047F -_021E0328: .word 0x021F9B3C - thumb_func_end ov5_021E0160 - - thumb_func_start ov5_021E032C -ov5_021E032C: ; 0x021E032C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - cmp r3, #1 - bne _021E0342 - add r0, r5, #0 - bl sub_0205EB74 - cmp r0, #2 - beq _021E0346 -_021E0342: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E0346: - add r0, r5, #0 - bl sub_0205EB3C - add r6, r0, #0 - add r0, r5, #0 - bl sub_0205F158 - cmp r0, #0 - bne _021E0364 - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_02060B7C - b _021E036E -_021E0364: - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_020611FC -_021E036E: - cmp r0, #0x20 - bne _021E0376 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E0376: - mov r1, #0x20 - bic r0, r1 - beq _021E0380 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E0380: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov5_021E0390 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E032C - - thumb_func_start ov5_021E0390 -ov5_021E0390: ; 0x021E0390 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x18 - add r5, r1, #0 - add r7, r2, #0 - bl ov5_021E1110 - add r4, r0, #0 - str r6, [r4, #4] - str r5, [r4, #8] - str r7, [r4, #0xc] - add r0, r7, #0 - bl sub_0205EB3C - str r0, [r4, #0x10] - add r0, r7, #0 - bl sub_0205EC04 - str r0, [r4, #0x14] - ldr r1, _021E03C4 ; =ov5_021E03C8 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050904 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E03C4: .word ov5_021E03C8 - thumb_func_end ov5_021E0390 - - thumb_func_start ov5_021E03C8 -ov5_021E03C8: ; 0x021E03C8 - push {r3, r4, r5, lr} - sub sp, #0x18 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021E03DE - cmp r0, #1 - beq _021E0452 - b _021E049C -_021E03DE: - ldr r0, [r4, #0x10] - bl sub_020655F4 - cmp r0, #1 - bne _021E049C - ldr r3, _021E04A4 ; =0x021F9B24 - add r2, sp, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0xc] - bl sub_0205F108 - add r5, r0, #0 - ldr r0, [r4, #0x14] - bne _021E041A - mov r1, #0 - bl ov5_021F2838 - ldr r0, [r4, #0xc] - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0 - bl sub_0205ED6C - b _021E042E -_021E041A: - mov r1, #2 - bl ov5_021F88DC - ldr r0, [r4, #0xc] - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0x18 - bl sub_0205ED6C -_021E042E: - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl ov5_021E106C - lsl r2, r5, #2 - add r1, sp, #0 - ldr r0, [r4, #4] - ldr r1, [r1, r2] - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E049C -_021E0452: - ldr r0, [r4, #0x10] - bl sub_02065684 - cmp r0, #0 - beq _021E049C - ldr r0, [r4, #0x10] - bl sub_020656AC - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021E046C - bl ov5_021DF74C -_021E046C: - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_0205EC00 - ldr r0, [r4, #0xc] - mov r1, #0 - bl sub_0205EB58 - ldr r0, [r4, #8] - ldr r1, [r0, #0x1c] - ldr r1, [r1, #0] - bl sub_020554A4 - add r1, r0, #0 - ldr r0, [r4, #8] - mov r2, #1 - bl sub_02055554 - add r0, r4, #0 - bl ov5_021E1134 - add sp, #0x18 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E049C: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_021E04A4: .word 0x021F9B24 - thumb_func_end ov5_021E03C8 - - thumb_func_start ov5_021E04A8 -ov5_021E04A8: ; 0x021E04A8 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - cmp r4, #1 - bne _021E04C2 - cmp r3, #1 - bne _021E04C2 - add r0, r5, #0 - bl sub_0205EB74 - cmp r0, #2 - beq _021E04C6 -_021E04C2: - mov r0, #0 - pop {r4, r5, r6, pc} -_021E04C6: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0206156C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DDB4 - cmp r0, #0 - bne _021E04DE - mov r0, #0 - pop {r4, r5, r6, pc} -_021E04DE: - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021E097C - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E04A8 - - thumb_func_start ov5_021E04EC -ov5_021E04EC: ; 0x021E04EC - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_0205F008 - cmp r0, #1 - bne _021E0500 - mov r0, #0 - pop {r4, r5, r6, pc} -_021E0500: - add r0, r4, #0 - bl sub_0205EB3C - bl sub_02062BE8 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - add r0, r6, #0 - bl sub_0205DCF0 - cmp r0, #1 - beq _021E0526 - add r0, r6, #0 - bl sub_0205DD0C - cmp r0, #1 - beq _021E0526 - mov r0, #0 - pop {r4, r5, r6, pc} -_021E0526: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E0534 - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E04EC - - thumb_func_start ov5_021E0534 -ov5_021E0534: ; 0x021E0534 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x10 - add r4, r1, #0 - bl ov5_021E1110 - add r2, r0, #0 - str r5, [r2, #8] - ldr r1, _021E055C ; =ov5_021E0560 - str r4, [r2, #0xc] - add r0, r5, #0 - bl sub_02050904 - ldr r0, [r5, #0xc] - bl sub_0202CD88 - mov r1, #0x38 - bl sub_0202CF28 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E055C: .word ov5_021E0560 - thumb_func_end ov5_021E0534 - - thumb_func_start ov5_021E0560 -ov5_021E0560: ; 0x021E0560 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0205EB3C - add r7, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021E0584 - cmp r0, #1 - beq _021E0590 - cmp r0, #2 - beq _021E05CA - b _021E0668 -_021E0584: - ldr r0, _021E0670 ; =0x00000651 - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0590: - add r0, r7, #0 - bl sub_020655F4 - cmp r0, #0 - bne _021E05A4 - ldr r0, [r4, #0xc] - bl sub_020613AC - cmp r0, #0 - beq _021E0668 -_021E05A4: - ldr r0, [r4, #4] - cmp r0, #5 - blt _021E05C4 - ldr r0, _021E0674 ; =0x00000652 - bl sub_02005748 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0205EFF0 - add r0, r4, #0 - bl ov5_021E1134 - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021E05C4: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E05CA: - ldr r0, [r4, #0xc] - bl sub_0205EA78 - ldr r2, _021E0678 ; =0x021BF67C - str r0, [sp] - ldr r1, [r2, #0x48] - ldr r2, [r2, #0x44] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, #0xc] - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl sub_02061308 - add r5, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - beq _021E0668 - ldr r0, [sp] - cmp r5, r0 - beq _021E0668 - mov r0, #1 - str r0, [r4, #0] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - add r0, r7, #0 - bl sub_02062BE8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DD0C - cmp r0, #1 - bne _021E0642 - add r0, r6, #0 - bl sub_02050A60 - add r1, sp, #8 - str r0, [sp, #4] - bl ov6_022413E4 - cmp r0, #1 - bne _021E0642 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0205EFF0 - add r0, r4, #0 - bl ov5_021E1134 - ldr r0, [sp, #4] - ldr r2, [sp, #8] - add r1, r6, #0 - bl sub_02050E78 - add sp, #0xc - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021E0642: - ldr r0, [r4, #4] - cmp r0, #5 - bge _021E064C - mov r6, #0x28 - b _021E0656 -_021E064C: - add r0, r7, #0 - mov r1, #1 - mov r6, #0x30 - bl sub_02062EE0 -_021E0656: - add r0, r5, #0 - add r1, r6, #0 - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r4, #0xc] - mov r2, #1 - bl sub_02061550 -_021E0668: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021E0670: .word 0x00000651 -_021E0674: .word 0x00000652 -_021E0678: .word 0x021BF67C - thumb_func_end ov5_021E0560 - - thumb_func_start ov5_021E067C -ov5_021E067C: ; 0x021E067C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_0205EB3C - bl sub_020655F4 - cmp r0, #0 - bne _021E0694 - mov r0, #0 - pop {r3, r4, r5, pc} -_021E0694: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E06A8 - cmp r0, #1 - bne _021E06A4 - mov r0, #1 - pop {r3, r4, r5, pc} -_021E06A4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E067C - - thumb_func_start ov5_021E06A8 -ov5_021E06A8: ; 0x021E06A8 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl sub_0205EBB8 - cmp r0, #1 - bge _021E06BA - mov r0, #0 - pop {r4, pc} -_021E06BA: - add r0, r4, #0 - bl sub_0205EA94 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E10D4 - add r4, r0, #0 - bne _021E06D0 - mov r0, #0 - pop {r4, pc} -_021E06D0: - bl sub_02062920 - cmp r0, #0x76 - beq _021E06DC - mov r0, #0 - pop {r4, pc} -_021E06DC: - add r0, r4, #0 - bl ov5_021EC7F0 - add r0, r4, #0 - bl sub_02061AF4 - ldr r0, _021E06F4 ; =0x0000065B - bl sub_02005748 - mov r0, #0 - pop {r4, pc} - nop -_021E06F4: .word 0x0000065B - thumb_func_end ov5_021E06A8 - - thumb_func_start ov5_021E06F8 -ov5_021E06F8: ; 0x021E06F8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x30 - add r7, r1, #0 - add r5, r2, #0 - bl ov5_021E1110 - add r4, r0, #0 - str r7, [r4, #4] - str r6, [r4, #0xc] - ldr r0, [r6, #0x3c] - str r0, [r4, #0x10] - bl sub_0205EB3C - add r2, r4, #0 - str r0, [r4, #0x14] - add r2, #0x1c - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r6, #0x10] - ldr r1, _021E0730 ; =ov5_021E07A0 - add r2, r4, #0 - bl sub_02050944 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E0730: .word ov5_021E07A0 - thumb_func_end ov5_021E06F8 - - thumb_func_start ov5_021E0734 -ov5_021E0734: ; 0x021E0734 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r2, #0 - add r6, r1, #0 - bl sub_02050A60 - add r4, r0, #0 - add r1, r5, #0 - bl ov5_021E1140 - add r1, r0, #0 - add r0, r4, #0 - add r2, sp, #0 - bl ov5_021E1028 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0 - bl ov5_021E06F8 - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E0734 - - thumb_func_start ov5_021E0760 -ov5_021E0760: ; 0x021E0760 - push {r3, lr} - cmp r1, #3 - bhi _021E079A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E0772: ; jump table - .short _021E077A - _021E0772 - 2 ; case 0 - .short _021E077A - _021E0772 - 2 ; case 1 - .short _021E078A - _021E0772 - 2 ; case 2 - .short _021E078A - _021E0772 - 2 ; case 3 -_021E077A: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DC68 - cmp r0, #1 - bne _021E079A - mov r0, #1 - pop {r3, pc} -_021E078A: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DC74 - cmp r0, #1 - bne _021E079A - mov r0, #1 - pop {r3, pc} -_021E079A: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0760 - - thumb_func_start ov5_021E07A0 -ov5_021E07A0: ; 0x021E07A0 - push {r4, r5, r6, lr} - bl sub_02050A64 - ldr r6, _021E07C8 ; =0x021F9B54 - add r5, r0, #0 -_021E07AA: - ldr r1, [r5, #0] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r6, r1] - blx r1 - add r4, r0, #0 - cmp r4, #2 - beq _021E07AA - cmp r4, #1 - bne _021E07C4 - add r0, r5, #0 - bl ov5_021E1134 -_021E07C4: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E07C8: .word 0x021F9B54 - thumb_func_end ov5_021E07A0 - - thumb_func_start ov5_021E07CC -ov5_021E07CC: ; 0x021E07CC - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x1c - bl ov5_021E103C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021E07CC - - thumb_func_start ov5_021E07E4 -ov5_021E07E4: ; 0x021E07E4 - push {r4, lr} - add r4, r0, #0 - add r0, #0x1c - bl ov5_021E1050 - cmp r0, #1 - bne _021E07F8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E07F8: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021E07E4 - - thumb_func_start ov5_021E07FC -ov5_021E07FC: ; 0x021E07FC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #4] - bl sub_0206419C - add r6, r0, #0 - ldr r0, [r5, #0x10] - bl sub_0205EAC8 - add r7, r0, #0 - ldr r0, [r5, #4] - bl sub_020641A8 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r5, #0x14] - ldr r3, [r5, #4] - add r1, r4, r6 - add r2, r7, r2 - bl ov5_021F28F4 - str r0, [r5, #0x18] - ldr r0, [r5, #0xc] - bl ov6_0224892C - str r0, [r5, #0x2c] - ldr r0, _021E084C ; =0x00000627 - bl sub_02005748 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E084C: .word 0x00000627 - thumb_func_end ov5_021E07FC - - thumb_func_start ov5_021E0850 -ov5_021E0850: ; 0x021E0850 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_020655F4 - cmp r0, #1 - bne _021E0874 - ldr r0, [r4, #4] - mov r1, #0x34 - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r4, #0x14] - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0874: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021E0850 - - thumb_func_start ov5_021E0878 -ov5_021E0878: ; 0x021E0878 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_02065684 - cmp r0, #1 - bne _021E0894 - ldr r0, [r4, #0] - mov r1, #1 - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, [r4, #0x18] - bl ov5_021F2974 -_021E0894: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021E0878 - - thumb_func_start ov5_021E0898 -ov5_021E0898: ; 0x021E0898 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_020655F4 - cmp r0, #1 - bne _021E08BC - ldr r0, [r4, #4] - mov r1, #0x10 - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r4, #0x14] - bl sub_02065638 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E08BC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021E0898 - - thumb_func_start ov5_021E08C0 -ov5_021E08C0: ; 0x021E08C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x14] - bl sub_02065684 - cmp r0, #0 - bne _021E08D2 - mov r0, #0 - pop {r3, r4, r5, pc} -_021E08D2: - ldr r0, [r5, #0x14] - bl sub_0206299C - add r4, r0, #0 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl sub_02064238 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, r4, #0 - bl ov5_021E0760 - cmp r0, #1 - bne _021E08F8 - mov r0, #5 - str r0, [r5, #0] - mov r0, #2 - pop {r3, r4, r5, pc} -_021E08F8: - ldr r0, [r5, #4] - mov r1, #0x34 - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r5, #0x14] - bl sub_02065638 - mov r1, #0 - str r1, [r5, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - ldr r0, [r5, #0x18] - bl ov5_021F2974 - ldr r0, [r5, #0x2c] - bl ov6_02248940 - mov r0, #0 - str r0, [r5, #0x2c] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E08C0 - - thumb_func_start ov5_021E0924 -ov5_021E0924: ; 0x021E0924 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - bl sub_02065684 - cmp r0, #0 - bne _021E0936 - mov r0, #0 - pop {r4, pc} -_021E0936: - ldr r0, [r4, #0x14] - bl sub_020656AC - ldr r0, [r4, #0x18] - bl ov5_021DF74C - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0924 - - thumb_func_start ov5_021E0948 -ov5_021E0948: ; 0x021E0948 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x54 - add r7, r1, #0 - add r5, r2, #0 - bl ov5_021E1110 - add r4, r0, #0 - str r7, [r4, #4] - str r6, [r4, #0x34] - ldr r0, [r6, #0x3c] - str r0, [r4, #0x38] - ldr r0, [r6, #0x3c] - bl sub_0205EB3C - str r0, [r4, #0x3c] - cmp r5, #0 - beq _021E0978 - add r2, r4, #0 - add r2, #0x40 - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} -_021E0978: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E0948 - - thumb_func_start ov5_021E097C -ov5_021E097C: ; 0x021E097C - push {r4, lr} - mov r2, #0 - add r4, r0, #0 - bl ov5_021E0948 - add r2, r0, #0 - ldr r1, _021E0994 ; =ov5_021E09D4 - add r0, r4, #0 - bl sub_02050904 - pop {r4, pc} - nop -_021E0994: .word ov5_021E09D4 - thumb_func_end ov5_021E097C - - thumb_func_start ov5_021E0998 -ov5_021E0998: ; 0x021E0998 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r2, #0 - add r6, r0, #0 - add r7, r1, #0 - bl sub_02050A60 - add r4, r0, #0 - add r1, r5, #0 - bl ov5_021E1140 - add r1, r0, #0 - add r0, r4, #0 - add r2, sp, #0 - bl ov5_021E1028 - add r0, r4, #0 - add r1, r7, #0 - add r2, sp, #0 - bl ov5_021E0948 - add r2, r0, #0 - ldr r1, _021E09D0 ; =ov5_021E09D4 - add r0, r6, #0 - bl sub_02050944 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E09D0: .word ov5_021E09D4 - thumb_func_end ov5_021E0998 - - thumb_func_start ov5_021E09D4 -ov5_021E09D4: ; 0x021E09D4 - push {r4, r5, r6, lr} - bl sub_02050A64 - ldr r6, _021E0A14 ; =0x021F9AFC - ldr r4, _021E0A18 ; =0x021F9B10 - add r5, r0, #0 -_021E09E0: - ldr r0, [r5, #4] - cmp r0, #0 - bne _021E09F2 - ldr r1, [r5, #0] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - blx r1 - b _021E09FC -_021E09F2: - ldr r1, [r5, #0] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r6, r1] - blx r1 -_021E09FC: - cmp r0, #2 - beq _021E09E0 - cmp r0, #1 - bne _021E0A0E - add r0, r5, #0 - bl ov5_021E1134 - mov r0, #1 - pop {r4, r5, r6, pc} -_021E0A0E: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_021E0A14: .word 0x021F9AFC -_021E0A18: .word 0x021F9B10 - thumb_func_end ov5_021E09D4 - - thumb_func_start ov5_021E0A1C -ov5_021E0A1C: ; 0x021E0A1C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - cmp r0, #1 - bne _021E0A3A - add r1, r4, #0 - ldr r0, [r4, #0x34] - add r1, #0x40 - bl ov5_021E103C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} -_021E0A3A: - mov r0, #2 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0A1C - - thumb_func_start ov5_021E0A44 -ov5_021E0A44: ; 0x021E0A44 - push {r4, lr} - add r4, r0, #0 - add r0, #0x40 - bl ov5_021E1050 - cmp r0, #1 - bne _021E0A5E - ldr r0, _021E0A64 ; =0x0000064D - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0A5E: - mov r0, #0 - pop {r4, pc} - nop -_021E0A64: .word 0x0000064D - thumb_func_end ov5_021E0A44 - - thumb_func_start ov5_021E0A68 -ov5_021E0A68: ; 0x021E0A68 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_02063020 - add r4, r0, #0 - mov r0, #0 - bl sub_0206419C - lsl r0, r0, #1 - add r4, r4, r0 - ldr r0, [r5, #0x3c] - bl sub_02063040 - add r6, r0, #0 - mov r0, #0 - bl sub_020641A8 - lsl r0, r0, #1 - add r6, r6, r0 - add r2, r5, #0 - add r0, r4, #0 - add r1, r6, #0 - add r2, #0x28 - bl sub_02064450 - add r1, r5, #0 - ldr r0, [r5, #0x34] - add r1, #0x28 - bl sub_020644A4 - str r4, [r5, #0xc] - ldr r0, [r5, #0x2c] - asr r1, r0, #3 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - str r0, [r5, #0x10] - str r6, [r5, #0x14] - ldr r0, [r5, #0x3c] - add r1, sp, #0xc - bl sub_02063050 - ldr r1, [sp, #0x14] - ldr r0, [r5, #0x30] - cmp r1, r0 - bgt _021E0ACE - bl sub_02022974 -_021E0ACE: - ldr r1, [sp, #0x10] - ldr r0, [r5, #0x2c] - cmp r1, r0 - blt _021E0ADA - bl sub_02022974 -_021E0ADA: - mov r0, #0 - str r0, [sp] - ldr r1, [r5, #0x2c] - ldr r0, [sp, #0x10] - add r3, sp, #0 - sub r2, r1, r0 - ldr r1, [r5, #0x30] - ldr r0, [sp, #0x14] - str r2, [sp, #4] - sub r1, r1, r0 - asr r0, r2, #5 - lsr r0, r0, #0x1a - add r0, r2, r0 - asr r0, r0, #6 - str r0, [sp, #4] - asr r0, r1, #5 - lsr r0, r0, #0x1a - add r0, r1, r0 - add r2, r5, #0 - str r1, [sp, #8] - asr r0, r0, #6 - str r0, [sp, #8] - ldmia r3!, {r0, r1} - add r2, #0x1c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r5, #0x34] - bl ov6_022485F4 - str r0, [r5, #0x50] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0 - add sp, #0x18 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E0A68 - - thumb_func_start ov5_021E0B24 -ov5_021E0B24: ; 0x021E0B24 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063050 - ldr r1, [sp, #4] - ldr r0, [r4, #0x20] - add r1, r1, r0 - str r1, [sp, #4] - ldr r0, [r4, #0x2c] - cmp r1, r0 - ble _021E0B42 - str r0, [sp, #4] -_021E0B42: - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063060 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x20 - blt _021E0B5E - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0B5E: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021E0B24 - - thumb_func_start ov5_021E0B64 -ov5_021E0B64: ; 0x021E0B64 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063050 - ldr r1, [sp, #4] - ldr r0, [r4, #0x20] - add r1, r1, r0 - str r1, [sp, #4] - ldr r0, [r4, #0x2c] - cmp r1, r0 - ble _021E0B82 - str r0, [sp, #4] -_021E0B82: - ldr r1, [sp, #8] - ldr r0, [r4, #0x24] - add r1, r1, r0 - str r1, [sp, #8] - ldr r0, [r4, #0x30] - cmp r1, r0 - bge _021E0B92 - str r0, [sp, #8] -_021E0B92: - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063060 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x40 - bge _021E0BAA - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021E0BAA: - ldr r1, [sp, #8] - ldr r0, [r4, #0x30] - cmp r1, r0 - beq _021E0BB6 - bl sub_02022974 -_021E0BB6: - ldr r1, [sp, #4] - ldr r0, [r4, #0x2c] - cmp r1, r0 - beq _021E0BC2 - bl sub_02022974 -_021E0BC2: - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0xc] - bl sub_02063024 - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x10] - bl sub_02063034 - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x14] - bl sub_02063044 - ldr r0, [r4, #0x3c] - bl sub_02064208 - ldr r0, [r4, #0x50] - bl ov6_02248608 - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021E0B64 - - thumb_func_start ov5_021E0BEC -ov5_021E0BEC: ; 0x021E0BEC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x40] - cmp r0, #1 - bne _021E0C0A - add r1, r4, #0 - ldr r0, [r4, #0x34] - add r1, #0x40 - bl ov5_021E103C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} -_021E0C0A: - mov r0, #2 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov5_021E0BEC - - thumb_func_start ov5_021E0C10 -ov5_021E0C10: ; 0x021E0C10 - push {r4, lr} - add r4, r0, #0 - add r0, #0x40 - bl ov5_021E1050 - cmp r0, #1 - bne _021E0C2A - ldr r0, _021E0C30 ; =0x0000064D - bl sub_02005748 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0C2A: - mov r0, #0 - pop {r4, pc} - nop -_021E0C30: .word 0x0000064D - thumb_func_end ov5_021E0C10 - - thumb_func_start ov5_021E0C34 -ov5_021E0C34: ; 0x021E0C34 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_02063020 - add r4, r0, #0 - mov r0, #1 - bl sub_0206419C - lsl r0, r0, #1 - add r4, r4, r0 - ldr r0, [r5, #0x3c] - bl sub_02063040 - add r6, r0, #0 - mov r0, #1 - bl sub_020641A8 - lsl r0, r0, #1 - add r6, r6, r0 - add r2, r5, #0 - add r0, r4, #0 - add r1, r6, #0 - add r2, #0x28 - bl sub_02064450 - add r1, r5, #0 - ldr r0, [r5, #0x34] - add r1, #0x28 - bl sub_020644A4 - mov r0, #0 - str r0, [r5, #0x18] - str r4, [r5, #0xc] - ldr r0, [r5, #0x2c] - asr r1, r0, #3 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - str r0, [r5, #0x10] - str r6, [r5, #0x14] - ldr r0, [r5, #0x3c] - add r1, sp, #0xc - bl sub_02063050 - ldr r1, [sp, #0x14] - ldr r0, [r5, #0x30] - cmp r1, r0 - blt _021E0C9E - bl sub_02022974 -_021E0C9E: - ldr r1, [sp, #0x10] - ldr r0, [r5, #0x2c] - cmp r1, r0 - bgt _021E0CAA - bl sub_02022974 -_021E0CAA: - mov r0, #0 - str r0, [sp] - ldr r1, [r5, #0x2c] - ldr r0, [sp, #0x10] - add r3, sp, #0 - sub r2, r1, r0 - ldr r1, [r5, #0x30] - ldr r0, [sp, #0x14] - str r2, [sp, #4] - sub r1, r1, r0 - asr r0, r2, #5 - lsr r0, r0, #0x1a - add r0, r2, r0 - asr r0, r0, #6 - str r0, [sp, #4] - asr r0, r1, #5 - lsr r0, r0, #0x1a - add r0, r1, r0 - add r2, r5, #0 - str r1, [sp, #8] - asr r0, r0, #6 - str r0, [sp, #8] - ldmia r3!, {r0, r1} - add r2, #0x1c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r5, #0x34] - bl ov6_022485F4 - str r0, [r5, #0x50] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0 - add sp, #0x18 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E0C34 - - thumb_func_start ov5_021E0CF4 -ov5_021E0CF4: ; 0x021E0CF4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063050 - ldr r1, [sp, #8] - ldr r0, [r4, #0x24] - add r1, r1, r0 - str r1, [sp, #8] - ldr r0, [r4, #0x30] - cmp r1, r0 - ble _021E0D14 - str r0, [sp, #8] - b _021E0D1C -_021E0D14: - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x24] - add r0, r1, r0 - str r0, [r4, #0x18] -_021E0D1C: - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063060 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x20 - blt _021E0D38 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021E0D38: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0CF4 - - thumb_func_start ov5_021E0D40 -ov5_021E0D40: ; 0x021E0D40 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063050 - ldr r1, [sp, #4] - ldr r0, [r4, #0x20] - add r1, r1, r0 - str r1, [sp, #4] - ldr r0, [r4, #0x2c] - cmp r1, r0 - bge _021E0D5E - str r0, [sp, #4] -_021E0D5E: - ldr r1, [sp, #8] - ldr r0, [r4, #0x24] - add r1, r1, r0 - str r1, [sp, #8] - ldr r0, [r4, #0x30] - cmp r1, r0 - ble _021E0D70 - str r0, [sp, #8] - b _021E0D78 -_021E0D70: - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x24] - add r0, r1, r0 - str r0, [r4, #0x18] -_021E0D78: - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063060 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x40 - bge _021E0D90 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021E0D90: - ldr r1, [sp, #8] - ldr r0, [r4, #0x30] - cmp r1, r0 - beq _021E0D9C - bl sub_02022974 -_021E0D9C: - ldr r1, [sp, #4] - ldr r0, [r4, #0x2c] - cmp r1, r0 - beq _021E0DA8 - bl sub_02022974 -_021E0DA8: - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0xc] - bl sub_02063024 - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x10] - bl sub_02063034 - ldr r0, [r4, #0x3c] - ldr r1, [r4, #0x14] - bl sub_02063044 - ldr r0, [r4, #0x3c] - bl sub_02064208 - ldr r0, [r4, #0x50] - bl ov6_02248608 - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0D40 - - thumb_func_start ov5_021E0DD4 -ov5_021E0DD4: ; 0x021E0DD4 - push {r3, lr} - bl sub_02050A60 - bl ov5_021E0DE0 - pop {r3, pc} - thumb_func_end ov5_021E0DD4 - - thumb_func_start ov5_021E0DE0 -ov5_021E0DE0: ; 0x021E0DE0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x18 - bl ov5_021E1110 - add r4, r0, #0 - str r5, [r4, #0] - ldr r0, [r5, #0x3c] - str r0, [r4, #4] - bl sub_0205EB3C - str r0, [r4, #8] - ldr r0, [r4, #4] - bl sub_0205EB98 - str r0, [r4, #0x10] - ldr r0, [r5, #0x10] - ldr r1, _021E0E0C ; =ov5_021E0E10 - add r2, r4, #0 - bl sub_02050944 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021E0E0C: .word ov5_021E0E10 - thumb_func_end ov5_021E0DE0 - - thumb_func_start ov5_021E0E10 -ov5_021E0E10: ; 0x021E0E10 - push {r4, lr} - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021E0E28 - cmp r0, #1 - beq _021E0E3A - cmp r0, #2 - beq _021E0E6C - b _021E0E86 -_021E0E28: - ldr r0, [r4, #8] - ldr r1, _021E0E8C ; =0x021F9B9C - bl sub_02065700 - str r0, [r4, #0x14] - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _021E0E86 -_021E0E3A: - ldr r0, [r4, #0x14] - bl sub_0206574C - cmp r0, #1 - bne _021E0E86 - ldr r1, [r4, #0x10] - mov r0, #0x12 - bl sub_0205ED6C - add r1, r0, #0 - ldr r0, [r4, #4] - bl ov5_021E106C - ldr r0, [r4, #0x14] - bl sub_02065758 - ldr r0, [r4, #8] - ldr r1, _021E0E90 ; =0x021F9C00 - bl sub_02065700 - str r0, [r4, #0x14] - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _021E0E86 -_021E0E6C: - ldr r0, [r4, #0x14] - bl sub_0206574C - cmp r0, #1 - bne _021E0E86 - ldr r0, [r4, #0x14] - bl sub_02065758 - add r0, r4, #0 - bl ov5_021E1134 - mov r0, #1 - pop {r4, pc} -_021E0E86: - mov r0, #0 - pop {r4, pc} - nop -_021E0E8C: .word 0x021F9B9C -_021E0E90: .word 0x021F9C00 - thumb_func_end ov5_021E0E10 - - thumb_func_start ov5_021E0E94 -ov5_021E0E94: ; 0x021E0E94 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02062DFC - cmp r0, #0 - beq _021E0EE4 - add r0, r4, #0 - bl sub_0205EB74 - cmp r0, #0 - bne _021E0EE4 - add r0, r5, #0 - bl sub_02062920 - cmp r0, #0xc4 - beq _021E0EE4 - cmp r0, #0xc5 - beq _021E0EE4 - ldr r1, _021E0EE8 ; =0x0000010E - sub r0, r0, r1 - cmp r0, #1 - bls _021E0EE4 - add r0, r4, #0 - bl sub_0205EB90 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0x40 - bl ov5_021DFB54 - add r0, r4, #0 - bl ov5_021DFB5C - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DFB54 -_021E0EE4: - pop {r3, r4, r5, pc} - nop -_021E0EE8: .word 0x0000010E - thumb_func_end ov5_021E0E94 - - thumb_func_start ov5_021E0EEC -ov5_021E0EEC: ; 0x021E0EEC - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02062DFC - cmp r0, #0 - beq _021E0F4C - add r0, r4, #0 - bl sub_0205EB74 - cmp r0, #0 - bne _021E0F4C - add r0, r5, #0 - bl sub_02062920 - cmp r0, #0xc4 - beq _021E0F2E - cmp r0, #0xc5 - beq _021E0F2E - ldr r2, _021E0F50 ; =0x0000010E - cmp r0, r2 - beq _021E0F2E - add r1, r2, #1 - cmp r0, r1 - beq _021E0F2E - add r1, r2, #4 - cmp r0, r1 - beq _021E0F2E - add r1, r2, #5 - cmp r0, r1 - bne _021E0F4C -_021E0F2E: - add r0, r4, #0 - bl sub_0205EB90 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl ov5_021DFB54 - add r0, r4, #0 - bl ov5_021DFB5C - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DFB54 -_021E0F4C: - pop {r3, r4, r5, pc} - nop -_021E0F50: .word 0x0000010E - thumb_func_end ov5_021E0EEC - - thumb_func_start ov5_021E0F54 -ov5_021E0F54: ; 0x021E0F54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - ldr r5, [r6, #0x3c] - str r1, [sp] - add r0, r5, #0 - bl sub_0205EB74 - add r7, r0, #0 - beq _021E0F6E - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E0F6E: - add r0, r5, #0 - bl sub_0205EB3C - str r0, [sp, #4] - mov r0, #4 - mov r1, #0x10 - bl sub_02018184 - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0] - str r6, [r4, #8] - str r5, [r4, #0xc] - ldr r0, [sp, #4] - str r7, [r4, #4] - bl sub_02062DDC - ldr r1, [sp] - add r0, r5, #0 - bl ov5_021DFB54 - add r0, r5, #0 - bl ov5_021DFB5C - ldr r0, _021E0FB8 ; =ov5_021E0FF0 - ldr r2, _021E0FBC ; =0x0000FFFF - add r1, r4, #0 - bl sub_0200D9E8 - add r4, r0, #0 - bne _021E0FB0 - bl sub_02022974 -_021E0FB0: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E0FB8: .word ov5_021E0FF0 -_021E0FBC: .word 0x0000FFFF - thumb_func_end ov5_021E0F54 - - thumb_func_start ov5_021E0FC0 -ov5_021E0FC0: ; 0x021E0FC0 - push {r4, r5, r6, lr} - add r5, r0, #0 - beq _021E0FEE - bl sub_0201CED0 - add r6, r0, #0 - ldr r4, [r6, #0xc] - add r0, r4, #0 - bl sub_0205EB98 - add r1, r0, #0 - mov r0, #0 - bl sub_0205ED6C - add r0, r4, #0 - bl ov5_021DFB90 - add r0, r6, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_021E0FEE: - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E0FC0 - - thumb_func_start ov5_021E0FF0 -ov5_021E0FF0: ; 0x021E0FF0 - push {r3, lr} - ldr r0, [r1, #0xc] - bl sub_0205EB3C - bl sub_02062B68 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021E0FF0 - - thumb_func_start ov5_021E1000 -ov5_021E1000: ; 0x021E1000 - ldr r3, _021E1008 ; =ov5_021E0F54 - mov r1, #0x80 - bx r3 - nop -_021E1008: .word ov5_021E0F54 - thumb_func_end ov5_021E1000 - - thumb_func_start ov5_021E100C -ov5_021E100C: ; 0x021E100C - ldr r3, _021E1010 ; =ov5_021E0FC0 - bx r3 - ; .align 2, 0 -_021E1010: .word ov5_021E0FC0 - thumb_func_end ov5_021E100C - - thumb_func_start ov5_021E1014 -ov5_021E1014: ; 0x021E1014 - ldr r3, _021E101C ; =ov5_021E0F54 - mov r1, #2 - lsl r1, r1, #8 - bx r3 - ; .align 2, 0 -_021E101C: .word ov5_021E0F54 - thumb_func_end ov5_021E1014 - - thumb_func_start ov5_021E1020 -ov5_021E1020: ; 0x021E1020 - ldr r3, _021E1024 ; =ov5_021E0FC0 - bx r3 - ; .align 2, 0 -_021E1024: .word ov5_021E0FC0 - thumb_func_end ov5_021E1020 - - thumb_func_start ov5_021E1028 -ov5_021E1028: ; 0x021E1028 - push {r4, lr} - add r4, r2, #0 - mov r2, #1 - str r2, [r4, #0] - str r1, [r4, #8] - ldr r0, [r0, #0x3c] - bl sub_0205EB98 - str r0, [r4, #4] - pop {r4, pc} - thumb_func_end ov5_021E1028 - - thumb_func_start ov5_021E103C -ov5_021E103C: ; 0x021E103C - push {r4, lr} - add r4, r1, #0 - ldr r2, [r4, #8] - ldr r3, [r4, #4] - mov r1, #0 - bl ov6_02243F88 - str r0, [r4, #0xc] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E103C - - thumb_func_start ov5_021E1050 -ov5_021E1050: ; 0x021E1050 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl ov6_02243FBC - cmp r0, #1 - bne _021E1068 - ldr r0, [r4, #0xc] - bl ov6_02243FC8 - mov r0, #1 - pop {r4, pc} -_021E1068: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021E1050 - - thumb_func_start ov5_021E106C -ov5_021E106C: ; 0x021E106C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_0205EB3C - add r6, r0, #0 - add r0, r5, #0 - bl sub_0205F108 - cmp r0, #0 - bne _021E1090 - mov r2, #0 - add r0, r6, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov5_021EE3FC - pop {r3, r4, r5, r6, r7, pc} -_021E1090: - add r0, r6, #0 - bl sub_02062C00 - add r1, r6, #0 - add r7, r0, #0 - bl ov9_0224A520 - str r0, [sp] - ldr r2, _021E10BC ; =ov5_021E10C0 - add r0, r6, #0 - add r1, r4, #0 - add r3, r5, #0 - bl ov5_021EE3FC - add r1, r0, #0 - beq _021E10B8 - ldr r2, [sp] - add r0, r7, #0 - bl ov9_0224A558 -_021E10B8: - pop {r3, r4, r5, r6, r7, pc} - nop -_021E10BC: .word ov5_021E10C0 - thumb_func_end ov5_021E106C - - thumb_func_start ov5_021E10C0 -ov5_021E10C0: ; 0x021E10C0 - push {r4, lr} - add r4, r1, #0 - bl sub_0205EB3C - bl sub_02062C00 - add r1, r4, #0 - bl ov9_0224A564 - pop {r4, pc} - thumb_func_end ov5_021E10C0 - - thumb_func_start ov5_021E10D4 -ov5_021E10D4: ; 0x021E10D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - bl sub_0205EABC - add r6, r0, #0 - add r0, r5, #0 - bl sub_0206419C - add r7, r0, #0 - add r0, r4, #0 - bl sub_0205EAC8 - str r0, [sp] - add r0, r5, #0 - bl sub_020641A8 - add r5, r0, #0 - add r0, r4, #0 - bl sub_0205EB3C - bl sub_02062A40 - ldr r2, [sp] - add r1, r6, r7 - add r2, r2, r5 - mov r3, #0 - bl sub_0206326C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E10D4 - - thumb_func_start ov5_021E1110 -ov5_021E1110: ; 0x021E1110 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - add r1, r5, #0 - bl sub_02018184 - add r4, r0, #0 - bne _021E1124 - bl sub_02022974 -_021E1124: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1110 - - thumb_func_start ov5_021E1134 -ov5_021E1134: ; 0x021E1134 - ldr r3, _021E113C ; =sub_02018238 - add r1, r0, #0 - mov r0, #4 - bx r3 - ; .align 2, 0 -_021E113C: .word sub_02018238 - thumb_func_end ov5_021E1134 - - thumb_func_start ov5_021E1140 -ov5_021E1140: ; 0x021E1140 - push {r4, lr} - ldr r0, [r0, #0xc] - add r4, r1, #0 - bl sub_0207A268 - add r1, r4, #0 - bl sub_0207A0FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1140 - - thumb_func_start ov5_021E1154 -ov5_021E1154: ; 0x021E1154 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - bl sub_0205EB3C - bl sub_02062BE8 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, r4, #0 - bl sub_0205DEB4 - cmp r0, #1 - bne _021E1176 - mov r2, #3 - b _021E11A4 -_021E1176: - add r0, r4, #0 - bl sub_0205DEC0 - cmp r0, #1 - bne _021E1184 - mov r2, #2 - b _021E11A4 -_021E1184: - add r0, r4, #0 - bl sub_0205DECC - cmp r0, #1 - bne _021E1192 - mov r2, #0 - b _021E11A4 -_021E1192: - add r0, r4, #0 - bl sub_0205DED8 - cmp r0, #1 - bne _021E11A0 - mov r2, #1 - b _021E11A4 -_021E11A0: - mov r0, #0 - pop {r4, r5, r6, pc} -_021E11A4: - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021E11B0 - mov r0, #1 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E1154 - - thumb_func_start ov5_021E11B0 -ov5_021E11B0: ; 0x021E11B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x18 - add r6, r1, #0 - add r7, r2, #0 - bl ov5_021E132C - add r4, r0, #0 - str r5, [r4, #0xc] - str r6, [r4, #0x10] - ldr r0, _021E11D8 ; =0x00000658 - str r7, [r4, #0] - bl sub_02005748 - ldr r1, _021E11DC ; =ov5_021E120C - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050904 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E11D8: .word 0x00000658 -_021E11DC: .word ov5_021E120C - thumb_func_end ov5_021E11B0 - - thumb_func_start ov5_021E11E0 -ov5_021E11E0: ; 0x021E11E0 - cmp r0, #3 - bhi _021E1208 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E11F0: ; jump table - .short _021E11F8 - _021E11F0 - 2 ; case 0 - .short _021E1200 - _021E11F0 - 2 ; case 1 - .short _021E11FC - _021E11F0 - 2 ; case 2 - .short _021E1204 - _021E11F0 - 2 ; case 3 -_021E11F8: - mov r0, #2 - bx lr -_021E11FC: - mov r0, #1 - bx lr -_021E1200: - mov r0, #3 - bx lr -_021E1204: - mov r0, #0 - bx lr -_021E1208: - mov r0, #0 - bx lr - thumb_func_end ov5_021E11E0 - - thumb_func_start ov5_021E120C -ov5_021E120C: ; 0x021E120C - push {r4, r5, r6, lr} - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0x10] - bl sub_0205EB3C - add r6, r0, #0 - bl sub_02062BE8 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021E1234 - cmp r0, #1 - beq _021E1246 - cmp r0, #2 - beq _021E1276 - b _021E1324 -_021E1234: - mov r1, #1 - add r0, r6, #0 - lsl r1, r1, #8 - bl sub_020628BC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _021E1324 -_021E1246: - ldr r0, [r4, #0x10] - bl sub_02061544 - cmp r0, #0 - beq _021E1324 - ldr r0, [r4, #0] - mov r1, #0xc - bl sub_02065838 - add r1, r0, #0 - ldr r0, [r4, #0x10] - mov r2, #1 - bl sub_02061550 - ldr r0, [r4, #0x10] - ldr r1, [r4, #0] - bl sub_0205EA84 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #7 - str r0, [r4, #4] - b _021E1324 -_021E1276: - ldr r0, [r4, #4] - cmp r0, #2 - beq _021E1284 - cmp r0, #4 - beq _021E1284 - cmp r0, #6 - bne _021E1294 -_021E1284: - ldr r0, [r4, #0] - bl ov5_021E11E0 - str r0, [r4, #0] - ldr r0, [r4, #0x10] - ldr r1, [r4, #0] - bl sub_0205EA84 -_021E1294: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - bne _021E1324 - add r0, r5, #0 - bl sub_0205DEB4 - cmp r0, #1 - bne _021E12AC - mov r0, #3 - str r0, [r4, #0] - b _021E12E4 -_021E12AC: - add r0, r5, #0 - bl sub_0205DEC0 - cmp r0, #1 - bne _021E12BC - mov r0, #2 - str r0, [r4, #0] - b _021E12E4 -_021E12BC: - add r0, r5, #0 - bl sub_0205DECC - cmp r0, #1 - bne _021E12CC - mov r0, #0 - str r0, [r4, #0] - b _021E12E4 -_021E12CC: - add r0, r5, #0 - bl sub_0205DED8 - cmp r0, #1 - bne _021E12DC - mov r0, #1 - str r0, [r4, #0] - b _021E12E4 -_021E12DC: - ldr r0, [r4, #0] - bl ov5_021E11E0 - str r0, [r4, #0] -_021E12E4: - ldr r0, [r4, #0x10] - ldr r2, [r4, #0] - add r1, r6, #0 - bl sub_02060B7C - cmp r0, #0 - bne _021E12F8 - mov r0, #1 - str r0, [r4, #8] - b _021E1324 -_021E12F8: - add r0, r6, #0 - mov r1, #0x80 - bl sub_020628C4 - mov r1, #1 - add r0, r6, #0 - lsl r1, r1, #8 - bl sub_020628C4 - ldr r0, [r4, #0x10] - ldr r1, [r4, #0] - bl sub_0205EA84 - add r0, r4, #0 - bl ov5_021E1350 - ldr r0, _021E1328 ; =0x00000658 - mov r1, #0 - bl sub_020057A4 - mov r0, #1 - pop {r4, r5, r6, pc} -_021E1324: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E1328: .word 0x00000658 - thumb_func_end ov5_021E120C - - thumb_func_start ov5_021E132C -ov5_021E132C: ; 0x021E132C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - add r1, r5, #0 - bl sub_02018184 - add r4, r0, #0 - bne _021E1340 - bl sub_02022974 -_021E1340: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E132C - - thumb_func_start ov5_021E1350 -ov5_021E1350: ; 0x021E1350 - ldr r3, _021E1358 ; =sub_02018238 - add r1, r0, #0 - mov r0, #4 - bx r3 - ; .align 2, 0 -_021E1358: .word sub_02018238 - thumb_func_end ov5_021E1350 - - thumb_func_start ov5_021E135C -ov5_021E135C: ; 0x021E135C - add r1, r0, #0 - ldr r0, [r1, #0x10] - cmp r0, #3 - bhi _021E138E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E1370: ; jump table - .short _021E1378 - _021E1370 - 2 ; case 0 - .short _021E1384 - _021E1370 - 2 ; case 1 - .short _021E137E - _021E1370 - 2 ; case 2 - .short _021E138A - _021E1370 - 2 ; case 3 -_021E1378: - mov r0, #2 - str r0, [r1, #0x10] - b _021E138E -_021E137E: - mov r0, #1 - str r0, [r1, #0x10] - b _021E138E -_021E1384: - mov r0, #3 - str r0, [r1, #0x10] - b _021E138E -_021E138A: - mov r0, #0 - str r0, [r1, #0x10] -_021E138E: - ldr r0, [r1, #0] - ldr r3, _021E1398 ; =sub_0205EA84 - ldr r0, [r0, #0x3c] - ldr r1, [r1, #0x10] - bx r3 - ; .align 2, 0 -_021E1398: .word sub_0205EA84 - thumb_func_end ov5_021E135C - - thumb_func_start ov5_021E139C -ov5_021E139C: ; 0x021E139C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r1, #0 - add r7, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0x3c] - bl sub_0205EB3C - add r6, r0, #0 - ldr r0, [r5, #8] - cmp r0, #0 - beq _021E13BC - cmp r0, #1 - beq _021E13C6 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} -_021E13BC: - mov r0, #1 - str r0, [r5, #8] - ldr r0, _021E1464 ; =0x0000064F - bl sub_02005748 -_021E13C6: - ldr r0, [r5, #0xc] - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _021E13DC - add r0, r5, #0 - bl ov5_021E135C -_021E13DC: - add r0, r6, #0 - add r1, sp, #0x18 - bl sub_0206309C - ldr r4, [r5, #0xc] - add r0, r4, #0 - bl sub_020E01B8 - str r0, [sp, #0x14] - lsl r0, r4, #0xb - str r1, [sp, #0x10] - bl sub_020E01B8 - add r2, r0, #0 - add r3, r1, #0 - ldr r0, _021E1468 ; =0x9999999A - ldr r1, _021E146C ; =0x40C19999 - bl sub_020DFC6C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x10] - bl sub_020E0234 - bl sub_020E0088 - str r0, [sp, #0x1c] - add r0, r6, #0 - add r1, sp, #0x18 - bl sub_020630AC - ldr r0, [r5, #0xc] - add r0, r0, #1 - str r0, [r5, #0xc] - cmp r0, #0x14 - bne _021E1442 - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} -_021E1442: - ble _021E145E - bl sub_0200F2AC - cmp r0, #0 - beq _021E145E - ldr r0, [r5, #4] - mov r1, #1 - str r1, [r0, #0] - add r0, r5, #0 - bl sub_020181C4 - add r0, r7, #0 - bl sub_0200DA58 -_021E145E: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021E1464: .word 0x0000064F -_021E1468: .word 0x9999999A -_021E146C: .word 0x40C19999 - thumb_func_end ov5_021E139C - - thumb_func_start ov5_021E1470 -ov5_021E1470: ; 0x021E1470 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0x3c] - bl sub_0205EB3C - ldr r1, [r5, #8] - add r4, r0, #0 - cmp r1, #0 - beq _021E1494 - cmp r1, #1 - beq _021E14EC - cmp r1, #2 - beq _021E1574 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_021E1494: - bl sub_02062DDC - add r0, r4, #0 - add r1, sp, #0x14 - bl sub_0206309C - ldr r1, [r5, #0xc] - mov r0, #0x14 - sub r6, r0, r1 - add r0, r6, #0 - bl sub_020E01B8 - str r0, [sp, #0xc] - lsl r0, r6, #0xb - add r7, r1, #0 - bl sub_020E01B8 - add r2, r0, #0 - add r3, r1, #0 - ldr r0, _021E159C ; =0x9999999A - ldr r1, _021E15A0 ; =0x40C19999 - bl sub_020DFC6C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [sp, #0xc] - add r1, r7, #0 - bl sub_020E0234 - bl sub_020E0088 - str r0, [sp, #0x18] - add r0, r4, #0 - add r1, sp, #0x14 - bl sub_020630AC - add r0, r4, #0 - bl ov5_021ECCC8 - ldr r0, _021E15A4 ; =0x0000064F - bl sub_02005748 - mov r0, #1 - str r0, [r5, #8] -_021E14EC: - ldr r0, [r5, #0xc] - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _021E1502 - add r0, r5, #0 - bl ov5_021E135C -_021E1502: - add r0, r4, #0 - add r1, sp, #0x14 - bl sub_0206309C - ldr r1, [r5, #0xc] - mov r0, #0x14 - sub r6, r0, r1 - add r0, r6, #0 - bl sub_020E01B8 - str r0, [sp, #0x10] - lsl r0, r6, #0xb - add r7, r1, #0 - bl sub_020E01B8 - add r2, r0, #0 - add r3, r1, #0 - ldr r0, _021E159C ; =0x9999999A - ldr r1, _021E15A0 ; =0x40C19999 - bl sub_020DFC6C - add r2, r0, #0 - add r3, r1, #0 - ldr r0, [sp, #0x10] - add r1, r7, #0 - bl sub_020E0234 - bl sub_020E0088 - str r0, [sp, #0x18] - add r0, r4, #0 - add r1, sp, #0x14 - bl sub_020630AC - ldr r0, [r5, #0xc] - add r0, r0, #1 - str r0, [r5, #0xc] - cmp r0, #2 - bne _021E1566 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - add r1, r0, #0 - add r2, r0, #0 - mov r3, #0 - bl sub_0200F174 -_021E1566: - ldr r0, [r5, #0xc] - cmp r0, #0x14 - ble _021E1598 - mov r0, #2 - add sp, #0x20 - str r0, [r5, #8] - pop {r3, r4, r5, r6, r7, pc} -_021E1574: - bl sub_0200F2AC - cmp r0, #0 - beq _021E1598 - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0x3c] - bl sub_0205EA84 - ldr r0, [r5, #4] - mov r1, #1 - str r1, [r0, #0] - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_021E1598: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E159C: .word 0x9999999A -_021E15A0: .word 0x40C19999 -_021E15A4: .word 0x0000064F - thumb_func_end ov5_021E1470 - - thumb_func_start ov5_021E15A8 -ov5_021E15A8: ; 0x021E15A8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #4 - mov r1, #0x14 - add r7, r2, #0 - bl sub_02018184 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x14 - bl sub_020C4CF4 - str r5, [r4, #0] - str r7, [r4, #4] - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - str r0, [r4, #0x10] - cmp r6, #0 - beq _021E15DE - ldr r0, _021E15EC ; =ov5_021E139C - add r1, r4, #0 - mov r2, #0x64 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} -_021E15DE: - ldr r0, _021E15F0 ; =ov5_021E1470 - add r1, r4, #0 - mov r2, #0x64 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E15EC: .word ov5_021E139C -_021E15F0: .word ov5_021E1470 - thumb_func_end ov5_021E15A8 - - thumb_func_start ov5_021E15F4 -ov5_021E15F4: ; 0x021E15F4 - push {r4, lr} - mov r1, #0x46 - lsl r1, r1, #6 - bl sub_02018144 - add r4, r0, #0 - bl ov5_021E1610 - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov5_021E15F4 - - thumb_func_start ov5_021E1608 -ov5_021E1608: ; 0x021E1608 - ldr r3, _021E160C ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021E160C: .word sub_020181C4 - thumb_func_end ov5_021E1608 - - thumb_func_start ov5_021E1610 -ov5_021E1610: ; 0x021E1610 - push {r3, r4, r5, r6, r7} - sub sp, #0xc - mov r4, #0 - mov ip, r0 - add r7, sp, #0 - add r3, r4, #0 -_021E161C: - str r3, [r7, #0] - str r3, [r7, #4] - mov r0, #0x8c - add r1, r4, #0 - mul r1, r0 - mov r0, ip - add r2, r0, r1 - add r5, r2, #0 - str r3, [r7, #8] - mov r0, ip - str r3, [r0, r1] - str r3, [r2, #4] - str r3, [r2, #8] - str r3, [r2, #0xc] - add r6, r7, #0 - ldmia r6!, {r0, r1} - add r5, #0x68 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r6, r7, #0 - str r0, [r5, #0] - add r5, r2, #0 - ldmia r6!, {r0, r1} - add r5, #0x74 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r6, r7, #0 - str r0, [r5, #0] - add r5, r2, #0 - ldmia r6!, {r0, r1} - add r5, #0x80 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r5, #0] - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - str r3, [r2, #0x64] - cmp r4, #0x20 - blo _021E161C - add sp, #0xc - pop {r3, r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E1610 - - thumb_func_start ov5_021E1674 -ov5_021E1674: ; 0x021E1674 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0x20 - blt _021E1684 - bl sub_02022974 -_021E1684: - add r6, sp, #0 - mov r3, #0 - str r3, [r6, #0] - str r3, [r6, #4] - mov r0, #0x8c - mul r0, r5 - str r3, [r6, #8] - str r3, [r4, r0] - add r2, r4, r0 - str r3, [r2, #4] - str r3, [r2, #8] - add r4, r2, #0 - str r3, [r2, #0xc] - add r5, r6, #0 - ldmia r5!, {r0, r1} - add r4, #0x68 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - add r5, r6, #0 - str r0, [r4, #0] - add r4, r2, #0 - ldmia r5!, {r0, r1} - add r4, #0x74 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r4, #0] - add r4, r2, #0 - ldmia r6!, {r0, r1} - add r4, #0x80 - stmia r4!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r4, #0] - str r3, [r2, #0x64] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1674 - - thumb_func_start ov5_021E16CC -ov5_021E16CC: ; 0x021E16CC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldr r0, [sp, #0x28] - add r4, r1, #0 - str r0, [sp, #0x28] - mov r0, #0 - add r7, r2, #0 - add r5, r3, #0 - str r0, [sp, #4] - cmp r4, #0 - beq _021E1702 - mov r0, #4 - bl sub_02018184 - str r0, [sp, #4] - ldr r2, [sp, #4] - add r0, r6, #0 - add r1, r4, #0 - bl sub_02006E18 - add r0, r4, #0 - mov r1, #0x30 - bl sub_020E2178 - str r0, [sp] - b _021E1704 -_021E1702: - str r0, [sp] -_021E1704: - ldr r4, [sp, #4] - mov r6, #0 -_021E1708: - ldr r0, [sp] - cmp r6, r0 - bhs _021E1776 - ldr r0, [r4, #0] - add r2, r5, #0 - str r0, [r5, #0] - mov r0, #1 - str r0, [r5, #4] - mov r0, #0 - add r3, r4, #4 - str r0, [r5, #0xc] - ldmia r3!, {r0, r1} - add r2, #0x68 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, r4, #0 - str r0, [r2, #0] - add r3, #0x10 - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x74 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, r4, #0 - str r0, [r2, #0] - add r3, #0x1c - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x80 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, r5, #0 - str r0, [r2, #0] - add r2, r5, #0 - ldr r0, [r5, #0] - add r1, r7, #0 - add r2, #0x10 - add r3, #0x64 - bl ov5_021E1904 - ldr r1, [r5, #0] - add r0, r7, #0 - bl ov5_021EFAF8 - cmp r0, #0 - bne _021E1768 - mov r0, #0 - str r0, [r5, #0] -_021E1768: - add r1, r5, #0 - ldr r0, [r5, #0] - ldr r2, [sp, #0x28] - add r1, #0x10 - bl ov5_021D3BE4 - b _021E17B2 -_021E1776: - mov r1, #0 - add r0, sp, #8 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - add r0, r1, #0 - str r0, [r5, #0] - str r0, [r5, #4] - add r2, r5, #0 - add r3, sp, #8 - str r0, [r5, #0xc] - ldmia r3!, {r0, r1} - add r2, #0x68 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, sp, #8 - str r0, [r2, #0] - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x74 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, sp, #8 - str r0, [r2, #0] - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x80 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] -_021E17B2: - add r6, r6, #1 - add r5, #0x8c - add r4, #0x30 - cmp r6, #0x20 - blt _021E1708 - ldr r0, [sp, #4] - cmp r0, #0 - beq _021E17C6 - bl sub_020181C4 -_021E17C6: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E16CC - - thumb_func_start ov5_021E17CC -ov5_021E17CC: ; 0x021E17CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - ldr r4, _021E1888 ; =0x021F9C74 - str r2, [sp, #0xc] - str r3, [sp, #0x10] - add r6, r0, #0 - str r1, [sp, #8] - add r3, sp, #0x18 - mov r2, #4 -_021E17DE: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021E17DE - ldr r0, [r4, #0] - ldr r5, [sp, #0x60] - str r0, [r3, #0] - mov r7, #0 -_021E17EE: - ldr r0, [r5, #4] - cmp r0, #0 - beq _021E187A - ldr r0, [r5, #8] - cmp r0, #0 - bne _021E187A - add r4, r5, #0 - add r4, #0x68 - ldmia r4!, {r0, r1} - add r3, sp, #0x3c - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - ldr r1, [sp, #0x3c] - ldr r0, [r6, #0] - add r3, r5, #0 - add r0, r1, r0 - str r0, [sp, #0x3c] - ldr r1, [sp, #0x44] - ldr r0, [r6, #8] - add r3, #0x80 - add r0, r1, r0 - str r0, [sp, #0x44] - add r1, r2, #0 - ldr r0, [r5, #0x64] - add r2, sp, #0x18 - bl sub_0201CED8 - cmp r0, #0 - beq _021E187A - ldr r0, [sp, #8] - bl ov5_021EFAB4 - add r4, r0, #0 - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _021E1844 - ldr r0, [sp, #0x10] - ldr r1, [r5, #0x64] - ldr r2, _021E188C ; =0x00000F33 - bl ov5_021D5948 -_021E1844: - ldr r0, [r5, #0] - add r1, r4, #0 - add r2, sp, #0x14 - bl ov5_021D5790 - add r0, sp, #0x14 - ldrh r0, [r0] - add r1, sp, #0x3c - cmp r0, #0 - bne _021E1868 - add r0, r5, #0 - add r3, r5, #0 - add r0, #0x10 - add r2, sp, #0x18 - add r3, #0x80 - bl sub_0201CA74 - b _021E187A -_021E1868: - str r4, [sp] - ldr r0, [r5, #0] - add r3, r5, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x64] - add r2, sp, #0x18 - add r3, #0x80 - bl ov5_021E1944 -_021E187A: - add r7, r7, #1 - add r5, #0x8c - cmp r7, #0x20 - blt _021E17EE - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E1888: .word 0x021F9C74 -_021E188C: .word 0x00000F33 - thumb_func_end ov5_021E17CC - - thumb_func_start ov5_021E1890 -ov5_021E1890: ; 0x021E1890 - add r0, #0x74 - bx lr - thumb_func_end ov5_021E1890 - - thumb_func_start ov5_021E1894 -ov5_021E1894: ; 0x021E1894 - add r2, r1, #0 - add r2, #0x68 - add r3, r0, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - bx lr - thumb_func_end ov5_021E1894 - - thumb_func_start ov5_021E18A4 -ov5_021E18A4: ; 0x021E18A4 - add r3, r1, #0 - add r2, r0, #0 - ldmia r3!, {r0, r1} - add r2, #0x68 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bx lr - thumb_func_end ov5_021E18A4 - - thumb_func_start ov5_021E18B4 -ov5_021E18B4: ; 0x021E18B4 - str r1, [r0, #8] - bx lr - thumb_func_end ov5_021E18B4 - - thumb_func_start ov5_021E18B8 -ov5_021E18B8: ; 0x021E18B8 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov5_021E18B8 - - thumb_func_start ov5_021E18BC -ov5_021E18BC: ; 0x021E18BC - add r0, #0x10 - bx lr - thumb_func_end ov5_021E18BC - - thumb_func_start ov5_021E18C0 -ov5_021E18C0: ; 0x021E18C0 - ldr r0, [r0, #0x64] - bx lr - thumb_func_end ov5_021E18C0 - - thumb_func_start ov5_021E18C4 -ov5_021E18C4: ; 0x021E18C4 - mov r2, #0x8c - mul r2, r1 - add r0, r0, r2 - bx lr - thumb_func_end ov5_021E18C4 - - thumb_func_start ov5_021E18CC -ov5_021E18CC: ; 0x021E18CC - mov r3, #0 -_021E18CE: - ldr r2, [r0, #0] - cmp r2, r1 - beq _021E18DE - add r3, r3, #1 - add r0, #0x8c - cmp r3, #0x20 - blt _021E18CE - mov r0, #0 -_021E18DE: - bx lr - thumb_func_end ov5_021E18CC - - thumb_func_start ov5_021E18E0 -ov5_021E18E0: ; 0x021E18E0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0x20 - blt _021E18EE - bl sub_02022974 -_021E18EE: - mov r0, #0x8c - mul r0, r4 - add r4, r5, r0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021E18FE - bl sub_02022974 -_021E18FE: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E18E0 - - thumb_func_start ov5_021E1904 -ov5_021E1904: ; 0x021E1904 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - bl ov5_021EF9E8 - ldr r0, [r0, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _021E1938 - add r2, r0, #0 - add r2, #8 - beq _021E192C - ldrb r1, [r0, #9] - cmp r1, #0 - bls _021E192C - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _021E192E -_021E192C: - mov r1, #0 -_021E192E: - cmp r1, #0 - beq _021E1938 - ldr r1, [r1, #0] - add r1, r0, r1 - b _021E193A -_021E1938: - mov r1, #0 -_021E193A: - add r0, r5, #0 - str r1, [r4, #0] - bl sub_020AE608 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E1904 - - thumb_func_start ov5_021E1944 -ov5_021E1944: ; 0x021E1944 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - add r5, r3, #0 - bl sub_020AF4BC - ldr r1, _021E19C4 ; =0x021C5B48 - add r0, r4, #0 - bl sub_020C4C88 - ldr r1, _021E19C8 ; =0x021C5B0C - mov r0, #0xa4 - ldr r2, [r1, #0x7c] - bic r2, r0 - add r0, r5, #0 - str r2, [r1, #0x7c] - bl sub_020AF4EC - bl sub_020AF480 - add r2, sp, #0 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - add r2, #2 - add r3, sp, #0 - bl ov5_021D579C - add r0, sp, #0 - ldrh r0, [r0] - ldr r1, [sp, #0x18] - bl ov5_021D57B4 - add r6, r0, #0 - add r0, sp, #0 - ldrh r0, [r0, #2] - mov r5, #0xff - mov r4, #0 - cmp r0, #0 - ble _021E19C0 -_021E1994: - lsl r0, r4, #2 - add r2, r6, r0 - ldrh r0, [r6, r0] - cmp r5, r0 - beq _021E19A6 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - mov r3, #1 - b _021E19A8 -_021E19A6: - mov r3, #0 -_021E19A8: - ldrh r2, [r2, #2] - add r0, r7, #0 - add r1, r5, #0 - bl sub_020B2384 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, sp, #0 - ldrh r0, [r0, #2] - cmp r4, r0 - blt _021E1994 -_021E19C0: - pop {r3, r4, r5, r6, r7, pc} - nop -_021E19C4: .word 0x021C5B48 -_021E19C8: .word 0x021C5B0C - thumb_func_end ov5_021E1944 - - thumb_func_start ov5_021E19CC -ov5_021E19CC: ; 0x021E19CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r5, _021E1A68 ; =0x021F9C68 - add r6, r0, #0 - add r7, r1, #0 - ldmia r5!, {r0, r1} - add r4, sp, #4 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r4, #0] - mov r4, #0 - mov r0, #0x8c -_021E19E4: - add r1, r4, #0 - mul r1, r0 - add r5, r6, r1 - ldr r1, [r5, #4] - cmp r1, #0 - bne _021E1A54 - mov r0, #1 - str r0, [r5, #4] - add r6, r5, #0 - ldmia r3!, {r0, r1} - add r6, #0x68 - stmia r6!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r6, #0] - ldr r6, [sp, #0x28] - cmp r6, #0 - beq _021E1A18 - mov r0, #1 - str r0, [r5, #0xc] - add r3, r5, #0 - ldmia r6!, {r0, r1} - add r3, #0x74 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - b _021E1A1C -_021E1A18: - mov r0, #0 - str r0, [r5, #0xc] -_021E1A1C: - add r6, sp, #4 - add r3, r5, #0 - ldmia r6!, {r0, r1} - add r3, #0x80 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r7, #0 - str r0, [r3, #0] - add r3, r5, #0 - str r2, [r5, #0] - add r0, r2, #0 - add r2, r5, #0 - add r2, #0x10 - add r3, #0x64 - bl ov5_021E1904 - ldr r0, [sp, #0x2c] - mov r1, #0 - str r0, [sp] - ldr r0, [r5, #0] - add r5, #0x10 - add r2, r1, #0 - add r3, r5, #0 - bl ov5_021D3B24 - add sp, #0x10 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E1A54: - add r1, r4, #1 - lsl r1, r1, #0x18 - lsr r4, r1, #0x18 - cmp r4, #0x20 - blo _021E19E4 - bl sub_02022974 - mov r0, #0x20 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E1A68: .word 0x021F9C68 - thumb_func_end ov5_021E19CC - - thumb_func_start ov5_021E1A6C -ov5_021E1A6C: ; 0x021E1A6C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - ldr r4, _021E1B04 ; =0x021F9C98 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r3, sp, #0x14 - mov r2, #4 -_021E1A7A: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021E1A7A - ldr r0, [r4, #0] - mov r4, #0 - str r0, [r3, #0] - add r7, sp, #0x14 -_021E1A8A: - mov r0, #0x8c - add r1, r4, #0 - mul r1, r0 - ldr r0, [sp, #8] - add r5, r0, r1 - ldr r0, [r5, #4] - cmp r0, #0 - beq _021E1AF4 - ldr r0, [r5, #8] - cmp r0, #0 - bne _021E1AF4 - ldr r0, [sp, #0xc] - bl ov5_021EFAB4 - add r6, r0, #0 - ldr r0, [r5, #0] - add r1, r6, #0 - add r2, sp, #0x10 - bl ov5_021D5790 - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _021E1AC2 - add r1, r5, #0 - add r0, r7, #0 - add r1, #0x74 - bl sub_0201E268 -_021E1AC2: - add r0, sp, #0x10 - ldrh r0, [r0] - cmp r0, #0 - bne _021E1ADE - add r0, r5, #0 - add r1, r5, #0 - add r5, #0x80 - add r0, #0x10 - add r1, #0x68 - add r2, r7, #0 - add r3, r5, #0 - bl sub_0201CA74 - b _021E1AF4 -_021E1ADE: - str r6, [sp] - ldr r0, [r5, #0] - add r1, r5, #0 - str r0, [sp, #4] - ldr r0, [r5, #0x64] - add r5, #0x80 - add r1, #0x68 - add r2, r7, #0 - add r3, r5, #0 - bl ov5_021E1944 -_021E1AF4: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0x20 - blo _021E1A8A - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E1B04: .word 0x021F9C98 - thumb_func_end ov5_021E1A6C - - thumb_func_start ov5_021E1B08 -ov5_021E1B08: ; 0x021E1B08 - push {r3, lr} - mov r1, #0x14 - bl sub_02018144 - add r3, r0, #0 - mov r2, #0x14 - mov r1, #0 -_021E1B16: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _021E1B16 - pop {r3, pc} - thumb_func_end ov5_021E1B08 - - thumb_func_start ov5_021E1B20 -ov5_021E1B20: ; 0x021E1B20 - push {r4, lr} - add r4, r0, #0 - ldrb r1, [r4, #0x13] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1f - beq _021E1B30 - bl sub_0201A8FC -_021E1B30: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021E1B20 - - thumb_func_start ov5_021E1B38 -ov5_021E1B38: ; 0x021E1B38 - strb r1, [r0, #0x12] - strh r2, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E1B38 - - thumb_func_start ov5_021E1B40 -ov5_021E1B40: ; 0x021E1B40 - ldrb r3, [r0, #0x13] - mov r2, #0x7f - bic r3, r2 - mov r2, #0x7f - and r1, r2 - orr r1, r3 - strb r1, [r0, #0x13] - bx lr - thumb_func_end ov5_021E1B40 - - thumb_func_start ov5_021E1B50 -ov5_021E1B50: ; 0x021E1B50 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E1B50 - - thumb_func_start ov5_021E1B54 -ov5_021E1B54: ; 0x021E1B54 - ldrb r0, [r0, #0x12] - bx lr - thumb_func_end ov5_021E1B54 - - thumb_func_start ov5_021E1B58 -ov5_021E1B58: ; 0x021E1B58 - ldrb r0, [r0, #0x13] - lsl r0, r0, #0x19 - lsr r0, r0, #0x19 - bne _021E1B64 - mov r0, #1 - bx lr -_021E1B64: - mov r0, #0 - bx lr - thumb_func_end ov5_021E1B58 - - thumb_func_start ov5_021E1B68 -ov5_021E1B68: ; 0x021E1B68 - push {r4, lr} - ldr r4, [r0, #0x64] - ldrb r1, [r4, #0x13] - lsl r1, r1, #0x19 - lsr r1, r1, #0x19 - cmp r1, #4 - bhi _021E1BCA - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E1B82: ; jump table - .short _021E1BCA - _021E1B82 - 2 ; case 0 - .short _021E1B8C - _021E1B82 - 2 ; case 1 - .short _021E1B9A - _021E1B82 - 2 ; case 2 - .short _021E1BAC - _021E1B82 - 2 ; case 3 - .short _021E1BBE - _021E1B82 - 2 ; case 4 -_021E1B8C: - bl ov5_021E1BE0 - ldrb r1, [r4, #0x13] - mov r0, #0x7f - bic r1, r0 - strb r1, [r4, #0x13] - pop {r4, pc} -_021E1B9A: - bl ov5_021E1CB0 - cmp r0, #1 - bne _021E1BCA - ldrb r1, [r4, #0x13] - mov r0, #0x7f - bic r1, r0 - strb r1, [r4, #0x13] - pop {r4, pc} -_021E1BAC: - bl ov5_021E1C70 - cmp r0, #1 - bne _021E1BCA - ldrb r1, [r4, #0x13] - mov r0, #0x7f - bic r1, r0 - strb r1, [r4, #0x13] - pop {r4, pc} -_021E1BBE: - bl ov5_021E1C1C - ldrb r1, [r4, #0x13] - mov r0, #0x7f - bic r1, r0 - strb r1, [r4, #0x13] -_021E1BCA: - pop {r4, pc} - thumb_func_end ov5_021E1B68 - - thumb_func_start ov5_021E1BCC -ov5_021E1BCC: ; 0x021E1BCC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x64] - bl ov5_021E1B40 - add r0, r4, #0 - bl ov5_021E1B68 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1BCC - - thumb_func_start ov5_021E1BE0 -ov5_021E1BE0: ; 0x021E1BE0 - push {r4, lr} - mov r1, #3 - add r4, r0, #0 - add r3, r1, #0 - ldr r0, [r4, #8] - add r2, r1, #0 - sub r3, #0x33 - bl sub_02019184 - ldr r1, [r4, #0x64] - ldrb r0, [r1, #0x13] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - bne _021E1C10 - ldrb r2, [r1, #0x12] - ldr r0, [r4, #8] - mov r3, #3 - bl sub_0205DA1C - ldr r2, [r4, #0x64] - mov r0, #0x80 - ldrb r1, [r2, #0x13] - orr r0, r1 - strb r0, [r2, #0x13] -_021E1C10: - ldr r0, [r4, #0x64] - ldrb r1, [r0, #0x12] - ldrh r2, [r0, #0x10] - bl sub_0205DA80 - pop {r4, pc} - thumb_func_end ov5_021E1BE0 - - thumb_func_start ov5_021E1C1C -ov5_021E1C1C: ; 0x021E1C1C - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #0x64] - ldrb r1, [r0, #0x13] - lsl r1, r1, #0x18 - lsr r1, r1, #0x1f - beq _021E1C6A - bl sub_0201A8FC - mov r0, #0x12 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - mov r2, #0 - ldr r0, [r4, #8] - mov r1, #3 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r4, #8] - mov r1, #3 - bl sub_02019448 - mov r1, #3 - ldr r0, [r4, #8] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - ldr r2, [r4, #0x64] - mov r0, #0x80 - ldrb r1, [r2, #0x13] - bic r1, r0 - strb r1, [r2, #0x13] -_021E1C6A: - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1C1C - - thumb_func_start ov5_021E1C70 -ov5_021E1C70: ; 0x021E1C70 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - mov r1, #3 - bl sub_020192F8 - cmp r0, #0 - bne _021E1C84 - mov r0, #1 - pop {r4, pc} -_021E1C84: - mov r1, #0x2f - mvn r1, r1 - cmp r0, r1 - ble _021E1C90 - cmp r0, #0 - blt _021E1C9E -_021E1C90: - mov r1, #3 - add r3, r1, #0 - ldr r0, [r4, #8] - add r2, r1, #0 - sub r3, #0x33 - bl sub_02019184 -_021E1C9E: - ldr r0, [r4, #8] - mov r1, #3 - mov r2, #4 - mov r3, #0x10 - bl sub_02019184 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1C70 - - thumb_func_start ov5_021E1CB0 -ov5_021E1CB0: ; 0x021E1CB0 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #8] - mov r1, #3 - bl sub_020192F8 - mov r1, #0x2f - mvn r1, r1 - cmp r0, r1 - bne _021E1CFC - mov r0, #0x12 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0x10 - str r0, [sp, #0xc] - mov r2, #0 - ldr r0, [r4, #8] - mov r1, #3 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r4, #8] - mov r1, #3 - bl sub_02019448 - mov r1, #3 - ldr r0, [r4, #8] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - add sp, #0x10 - mov r0, #1 - pop {r4, pc} -_021E1CFC: - ble _021E1D02 - cmp r0, #0 - blt _021E1D0E -_021E1D02: - mov r1, #3 - ldr r0, [r4, #8] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 -_021E1D0E: - ldr r0, [r4, #8] - mov r1, #3 - mov r2, #5 - mov r3, #0x10 - bl sub_02019184 - mov r0, #0 - add sp, #0x10 - pop {r4, pc} - thumb_func_end ov5_021E1CB0 - - thumb_func_start ov5_021E1D20 -ov5_021E1D20: ; 0x021E1D20 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [r1, #0xc] - add r5, r0, #0 - add r0, r4, #0 - bl sub_0203A790 - bl sub_0203A720 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02027560 - add r7, r0, #0 - ldr r0, [r6, #0] - bl sub_0203A138 - str r0, [r5, #4] - add r0, r7, #0 - bl sub_02027520 - cmp r0, #0 - beq _021E1D54 - add r0, r7, #0 - bl sub_02026E48 - b _021E1D56 -_021E1D54: - mov r0, #0 -_021E1D56: - str r0, [r5, #0] - add r0, r4, #0 - bl sub_02025E38 - str r0, [r5, #8] - add r0, r4, #0 - bl sub_02025E5C - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1D20 - - thumb_func_start ov5_021E1D6C -ov5_021E1D6C: ; 0x021E1D6C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - ldr r2, [r4, #4] - mov r1, #0 - add r5, r0, #0 - bl sub_0200B8C8 - ldr r2, [r4, #8] - add r0, r5, #0 - mov r1, #1 - bl sub_0200B498 - ldr r0, [r4, #8] - bl sub_02025F58 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - add r0, r5, #0 - mov r1, #2 - bl sub_0200B60C - ldr r2, [r4, #0] - cmp r2, #0x64 - blt _021E1DAA - mov r3, #3 - mov r0, #0 - b _021E1DB8 -_021E1DAA: - cmp r2, #0xa - blt _021E1DB4 - mov r3, #3 - mov r0, #1 - b _021E1DB8 -_021E1DB4: - mov r3, #2 - mov r0, #1 -_021E1DB8: - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #3 - bl sub_0200B60C - ldr r0, [r4, #0xc] - bl sub_0202CC58 - add r2, r0, #0 - cmp r2, #0x64 - blt _021E1DD8 - mov r3, #3 - mov r0, #0 - b _021E1DE6 -_021E1DD8: - cmp r2, #0xa - blt _021E1DE2 - mov r3, #3 - mov r0, #1 - b _021E1DE6 -_021E1DE2: - mov r3, #2 - mov r0, #1 -_021E1DE6: - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #4 - bl sub_0200B60C - ldr r0, [r4, #0xc] - bl sub_0202CC5C - mov r3, #2 - add r2, r0, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #5 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E1D6C - - thumb_func_start ov5_021E1E10 -ov5_021E1E10: ; 0x021E1E10 - ldr r0, [r0, #0] - cmp r0, #0 - beq _021E1E1A - mov r0, #0xa - bx lr -_021E1E1A: - mov r0, #8 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E1E10 - - thumb_func_start ov5_021E1E20 -ov5_021E1E20: ; 0x021E1E20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0 - mov r1, #1 - bl sub_02002DF8 - add r4, r0, #0 - mov r0, #0 - mov r1, #3 - bl sub_02002DF8 - add r0, r4, r0 - str r0, [sp, #0x14] - mov r4, #0 - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r3, [r5, #4] - add r2, r4, #0 - bl sub_0200B29C - add r1, r4, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [r5, #0x10] - add r2, r6, #0 - add r3, r1, #0 - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _021E1EFC ; =0x021F9CD0 - ldr r7, _021E1F00 ; =0x021F9CC0 - str r0, [sp, #0xc] -_021E1E70: - ldr r0, [sp, #0xc] - ldr r1, [r0, #0] - cmp r1, #3 - bne _021E1E7E - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _021E1EE6 -_021E1E7E: - ldr r0, [sp, #0x14] - add r4, r4, r0 - ldr r0, [r5, #0x18] - bl sub_0200B1EC - add r6, r0, #0 - mov r1, #0 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r5, #0x10] - add r2, r6, #0 - add r3, r1, #0 - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - sub r2, r7, #4 - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - ldr r2, [r2, #0] - ldr r3, [r5, #4] - bl sub_0200B29C - add r6, r0, #0 - mov r0, #0 - mov r1, #2 - bl sub_02002DF8 - add r2, r0, #0 - mov r0, #0 - add r1, r6, #0 - bl sub_02002D7C - mov r1, #0x68 - sub r3, r1, r0 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r5, #0x10] - mov r1, #0 - add r2, r6, #0 - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC -_021E1EE6: - ldr r0, [sp, #0xc] - add r7, r7, #4 - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #5 - blo _021E1E70 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E1EFC: .word 0x021F9CD0 -_021E1F00: .word 0x021F9CC0 - thumb_func_end ov5_021E1E20 - - thumb_func_start ov5_021E1F04 -ov5_021E1F04: ; 0x021E1F04 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #0x10 - bl sub_02018144 - str r0, [r4, #0x10] - mov r3, #1 - str r3, [sp] - ldr r0, [r4, #0x2c] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r4, #0x30] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _021E1F74 ; =0x00000189 - str r0, [sp, #0x10] - ldrb r2, [r4, #8] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r2, _021E1F78 ; =0x000003D9 - str r0, [sp, #4] - ldrb r1, [r4, #8] - ldr r0, [r4, #0xc] - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - mov r1, #6 - bl sub_02002DF8 - add r1, r0, #0 - ldr r0, [r4, #0x10] - bl sub_0201ADA4 - add r0, r4, #0 - bl ov5_021E1E20 - ldr r0, [r4, #0x10] - ldr r2, _021E1F78 ; =0x000003D9 - mov r1, #0 - mov r3, #0xb - bl sub_0200DC48 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_021E1F74: .word 0x00000189 -_021E1F78: .word 0x000003D9 - thumb_func_end ov5_021E1F04 - - thumb_func_start ov5_021E1F7C -ov5_021E1F7C: ; 0x021E1F7C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_0200DC9C - ldr r0, [r4, #0x10] - bl sub_0201A8FC - ldr r0, [r4, #0x10] - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E1F7C - - thumb_func_start ov5_021E1F98 -ov5_021E1F98: ; 0x021E1F98 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0x34 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - str r6, [r4, #0] - str r5, [r4, #4] - strb r7, [r4, #8] - ldr r0, [r6, #8] - str r0, [r4, #0xc] - add r0, r5, #0 - bl sub_0200B358 - str r0, [r4, #0x14] - ldr r2, _021E1FF0 ; =0x00000216 - mov r0, #1 - mov r1, #0x1a - add r3, r5, #0 - bl sub_0200B144 - str r0, [r4, #0x18] - add r0, r4, #0 - ldr r1, [r4, #0] - add r0, #0x1c - bl ov5_021E1D20 - add r1, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x1c - bl ov5_021E1D6C - mov r0, #0xd - str r0, [r4, #0x2c] - add r0, r4, #0 - add r0, #0x1c - bl ov5_021E1E10 - str r0, [r4, #0x30] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E1FF0: .word 0x00000216 - thumb_func_end ov5_021E1F98 - - thumb_func_start ov5_021E1FF4 -ov5_021E1FF4: ; 0x021E1FF4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl sub_0200B190 - ldr r0, [r4, #0x14] - bl sub_0200B3F0 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021E1FF4 - - thumb_func_start ov5_021E200C -ov5_021E200C: ; 0x021E200C - push {r4, lr} - add r4, r0, #0 - bl ov5_021E2028 - ldr r0, [r4, #0xc] - bl sub_020246E0 - cmp r0, #2 - bne _021E2022 - mov r0, #1 - pop {r4, pc} -_021E2022: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E200C - - thumb_func_start ov5_021E2028 -ov5_021E2028: ; 0x021E2028 - push {r4, lr} - add r4, r0, #0 - bl sub_0203A7A8 - add r0, r4, #0 - mov r1, #4 - mov r2, #0 - bl ov5_021EA714 - ldr r0, [r4, #0x3c] - bl sub_0205EABC - ldr r1, [r4, #0x1c] - str r0, [r1, #8] - ldr r0, [r4, #0x3c] - bl sub_0205EAC8 - ldr r1, [r4, #0x1c] - str r0, [r1, #0xc] - mov r1, #0 - ldr r0, [r4, #0x1c] - mvn r1, r1 - str r1, [r0, #4] - ldr r0, [r4, #0x3c] - bl sub_0205EA78 - ldr r1, [r4, #0x1c] - str r0, [r1, #0x10] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E2028 - - thumb_func_start ov5_021E2064 -ov5_021E2064: ; 0x021E2064 - push {r4, lr} - add r4, r0, #0 - bne _021E2070 - bl sub_02022974 - pop {r4, pc} -_021E2070: - ldr r0, [r4, #0x1c] - mov r1, #0x53 - ldr r2, [r0, #0] - lsl r1, r1, #2 - cmp r2, r1 - beq _021E2096 - add r0, r1, #1 - cmp r2, r0 - beq _021E2096 - add r1, #0x86 - cmp r2, r1 - beq _021E2096 - bl sub_02038EB4 - cmp r0, #1 - beq _021E2096 - add r0, r4, #0 - bl ov5_021E2028 -_021E2096: - pop {r4, pc} - thumb_func_end ov5_021E2064 - - thumb_func_start ov5_021E2098 -ov5_021E2098: ; 0x021E2098 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _021E20E0 ; =ov5_021E2178 - ldr r3, [r5, #0x28] - mov r1, #0x38 - mov r2, #5 - bl sub_0200679C - add r6, r0, #0 - bl sub_0201CED0 - add r4, r0, #0 - add r2, r4, #4 - mov r3, #5 -_021E20B4: - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - sub r3, r3, #1 - bne _021E20B4 - ldr r0, [r5, #0] - str r0, [r2, #0] - str r6, [r4, #0x34] - mov r0, #0 - str r0, [r4, #0x30] - bl sub_020BF00C - str r0, [r4, #0] - add r0, r4, #4 - bl ov5_021E2218 - ldr r0, _021E20E4 ; =ov5_021E21B8 - add r1, r4, #0 - mov r2, #0 - bl sub_0200DA3C - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E20E0: .word ov5_021E2178 -_021E20E4: .word ov5_021E21B8 - thumb_func_end ov5_021E2098 - - thumb_func_start ov5_021E20E8 -ov5_021E20E8: ; 0x021E20E8 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - bl sub_020BDE40 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_020BEA30 - ldr r0, [r4, #0] - ldr r0, [r0, #4] - cmp r0, #0xa - bgt _021E2118 - bge _021E213C - cmp r0, #6 - bgt _021E2158 - cmp r0, #2 - blt _021E2158 - beq _021E211E - cmp r0, #6 - beq _021E212E - b _021E2158 -_021E2118: - cmp r0, #0xe - beq _021E214A - b _021E2158 -_021E211E: - mov r1, #0x1a - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E215E -_021E212E: - mov r2, #2 - ldr r1, _021E216C ; =0x06820000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E215E -_021E213C: - mov r2, #2 - ldr r1, _021E2170 ; =0x06840000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E215E -_021E214A: - mov r2, #2 - ldr r1, _021E2174 ; =0x06860000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E215E -_021E2158: - mov r0, #0 - bl sub_020BEA30 -_021E215E: - ldr r0, [r4, #0] - ldr r0, [r0, #0x34] - bl sub_020067D0 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 -_021E216C: .word 0x06820000 -_021E2170: .word 0x06840000 -_021E2174: .word 0x06860000 - thumb_func_end ov5_021E20E8 - - thumb_func_start ov5_021E2178 -ov5_021E2178: ; 0x021E2178 - push {r4, r5, r6, r7} - ldr r0, [r1, #0x30] - cmp r0, #0 - beq _021E21B0 - ldr r6, [r1, #0x20] - ldr r5, [r1, #0x10] - ldr r4, [r1, #0x1c] - ldr r3, [r1, #0x18] - ldr r2, [r1, #0x14] - ldr r0, [r1, #0x24] - ldr r1, [r1, #0x28] - lsl r5, r5, #0x14 - lsl r7, r1, #8 - lsl r1, r3, #0x18 - lsl r3, r2, #0x1d - mov r2, #2 - lsl r2, r2, #0x1e - orr r3, r2 - lsl r2, r4, #0x19 - orr r2, r3 - orr r1, r2 - lsl r6, r6, #0x10 - orr r1, r5 - orr r1, r6 - orr r1, r7 - orr r1, r0 - ldr r0, _021E21B4 ; =0x04000064 - str r1, [r0, #0] -_021E21B0: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_021E21B4: .word 0x04000064 - thumb_func_end ov5_021E2178 - - thumb_func_start ov5_021E21B8 -ov5_021E21B8: ; 0x021E21B8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0xa - bgt _021E21D6 - bge _021E21EC - cmp r0, #6 - bgt _021E21FC - cmp r0, #2 - blt _021E21FC - beq _021E21DC - cmp r0, #6 - beq _021E21E4 - b _021E21FC -_021E21D6: - cmp r0, #0xe - beq _021E21F4 - b _021E21FC -_021E21DC: - mov r0, #1 - bl sub_020BEA30 - b _021E2202 -_021E21E4: - mov r0, #2 - bl sub_020BEA30 - b _021E2202 -_021E21EC: - mov r0, #4 - bl sub_020BEA30 - b _021E2202 -_021E21F4: - mov r0, #8 - bl sub_020BEA30 - b _021E2202 -_021E21FC: - mov r0, #0 - bl sub_020BEA30 -_021E2202: - ldr r0, [r4, #4] - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - bl sub_020BDE40 - mov r0, #1 - str r0, [r4, #0x30] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E21B8 - - thumb_func_start ov5_021E2218 -ov5_021E2218: ; 0x021E2218 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0xa - bgt _021E2234 - bge _021E2258 - cmp r0, #6 - bgt _021E2272 - cmp r0, #2 - blt _021E2272 - beq _021E223A - cmp r0, #6 - beq _021E224A - b _021E2272 -_021E2234: - cmp r0, #0xe - beq _021E2266 - b _021E2272 -_021E223A: - mov r1, #0x1a - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E2272 -_021E224A: - mov r2, #2 - ldr r1, _021E22A0 ; =0x06820000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E2272 -_021E2258: - mov r2, #2 - ldr r1, _021E22A4 ; =0x06840000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 - b _021E2272 -_021E2266: - mov r2, #2 - ldr r1, _021E22A8 ; =0x06860000 - mov r0, #0 - lsl r2, r2, #0x10 - bl sub_020C4BB8 -_021E2272: - ldr r5, [r4, #0x10] - ldr r1, [r4, #0x1c] - ldr r3, [r4, #0x18] - ldr r6, [r4, #0x14] - ldr r0, [r4, #0xc] - mov r4, #2 - lsl r2, r1, #0x10 - lsl r1, r0, #0x14 - lsl r5, r5, #0x1d - lsl r4, r4, #0x1e - orr r4, r5 - lsl r3, r3, #0x19 - lsl r0, r6, #0x18 - orr r3, r4 - orr r0, r3 - orr r0, r1 - add r1, r2, #0 - orr r1, r0 - mov r0, #0x10 - orr r1, r0 - ldr r0, _021E22AC ; =0x04000064 - str r1, [r0, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E22A0: .word 0x06820000 -_021E22A4: .word 0x06840000 -_021E22A8: .word 0x06860000 -_021E22AC: .word 0x04000064 - thumb_func_end ov5_021E2218 - - thumb_func_start ov5_021E22B0 -ov5_021E22B0: ; 0x021E22B0 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r4, r1, #0 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - bl sub_020BEC9C - mov r0, #4 - add r1, r0, #0 - bl sub_02018144 - add r7, r0, #0 - mov r0, #0 - add r1, r7, #0 - mov r2, #4 - bl sub_020C4B4C - ldr r6, _021E230C ; =0x021F9CE0 - add r3, sp, #0 - mov r2, #5 -_021E22EE: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021E22EE - ldr r0, [r6, #0] - str r0, [r3, #0] - add r0, sp, #0 - str r5, [sp, #0x20] - str r4, [sp, #0x24] - bl ov5_021E2098 - str r0, [r7, #0] - add r0, r7, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E230C: .word 0x021F9CE0 - thumb_func_end ov5_021E22B0 - - thumb_func_start ov5_021E2310 -ov5_021E2310: ; 0x021E2310 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - ldr r0, [r4, #0] - mov r2, #0 - add r3, r1, #0 - bl ov5_021E20E8 - mov r0, #4 - bl sub_020BE004 - mov r0, #0xe - mov r1, #1 - bl sub_0201FF0C - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - pop {r4, pc} - thumb_func_end ov5_021E2310 - - thumb_func_start ov5_021E2338 -ov5_021E2338: ; 0x021E2338 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #5 - bls _021E234A - b _021E2496 -_021E234A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E2356: ; jump table - .short _021E2362 - _021E2356 - 2 ; case 0 - .short _021E2386 - _021E2356 - 2 ; case 1 - .short _021E23A2 - _021E2356 - 2 ; case 2 - .short _021E23EC - _021E2356 - 2 ; case 3 - .short _021E2444 - _021E2356 - 2 ; case 4 - .short _021E246C - _021E2356 - 2 ; case 5 -_021E2362: - mov r0, #4 - mov r1, #0x20 - bl sub_02018144 - str r0, [r4, #0xc] - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - ldr r5, [r4, #0xc] - bl ov5_021DDF38 - str r0, [r5, #0x1c] - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2386: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E23A2: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021E2496 - mov r1, #0 - str r1, [r4, #4] - ldr r0, [r4, #0] - mov r2, #2 - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, _021E249C ; =0xFFFFD000 - str r1, [sp] - str r0, [sp, #4] - lsl r0, r0, #2 - str r0, [sp, #8] - ldr r1, [r5, #0x1c] - add r0, r4, #0 - mov r3, #7 - bl ov5_021DDF9C - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - str r0, [r5, #0] - bl sub_02020A90 - mov r2, #0x32 - add r1, r0, #0 - mov r0, #6 - lsl r2, r2, #0xc - mov r3, #0x1e - str r0, [sp] - add r0, r5, #4 - add r2, r1, r2 - lsl r3, r3, #0xc - bl ov5_021DDE14 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021E23EC: - add r0, r5, #4 - bl ov5_021DDE74 - add r6, r0, #0 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl sub_02020A50 - cmp r6, #1 - bne _021E2496 - ldr r0, [r4, #0] - mov r2, #2 - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, _021E249C ; =0xFFFFD000 - mov r3, #6 - str r0, [sp] - mov r0, #0xff - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0x1e - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r1, [r5, #0x1c] - add r0, r4, #0 - bl ov5_021DE058 - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - str r0, [r5, #0] - bl sub_02020A90 - mov r2, #0x32 - add r1, r0, #0 - mov r0, #6 - lsl r2, r2, #0xc - str r0, [sp] - ldr r3, _021E24A0 ; =0xFFF01000 - add r0, r5, #4 - sub r2, r1, r2 - bl ov5_021DDE14 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021E2444: - add r0, r5, #4 - bl ov5_021DDE74 - add r6, r0, #0 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl sub_02020A50 - cmp r6, #1 - bne _021E2496 - add r0, r4, #0 - bl ov5_021DDD7C - cmp r0, #1 - bne _021E2496 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E246C: - mov r0, #0 - bl sub_0200F370 - ldr r0, _021E24A4 ; =0x04000010 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E2488 - mov r0, #1 - str r0, [r1, #0] -_021E2488: - ldr r0, [r5, #0x1c] - bl ov5_021DDF74 - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 -_021E2496: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021E249C: .word 0xFFFFD000 -_021E24A0: .word 0xFFF01000 -_021E24A4: .word 0x04000010 - thumb_func_end ov5_021E2338 - - thumb_func_start ov5_021E24A8 -ov5_021E24A8: ; 0x021E24A8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #5 - bls _021E24BA - b _021E2606 -_021E24BA: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E24C6: ; jump table - .short _021E24D2 - _021E24C6 - 2 ; case 0 - .short _021E24F6 - _021E24C6 - 2 ; case 1 - .short _021E2512 - _021E24C6 - 2 ; case 2 - .short _021E255C - _021E24C6 - 2 ; case 3 - .short _021E25B4 - _021E24C6 - 2 ; case 4 - .short _021E25DC - _021E24C6 - 2 ; case 5 -_021E24D2: - mov r0, #4 - mov r1, #0x20 - bl sub_02018144 - str r0, [r4, #0xc] - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - ldr r5, [r4, #0xc] - bl ov5_021DDF38 - str r0, [r5, #0x1c] - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E24F6: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2512: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021E2606 - mov r1, #0 - str r1, [r4, #4] - ldr r0, [r4, #0] - mov r2, #5 - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, _021E260C ; =0xFFFFE000 - str r1, [sp] - str r0, [sp, #4] - ldr r0, _021E2610 ; =0xFFFF4000 - mov r3, #7 - str r0, [sp, #8] - ldr r1, [r5, #0x1c] - add r0, r4, #0 - bl ov5_021DDF9C - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - str r0, [r5, #0] - bl sub_02020A90 - mov r2, #0x32 - add r1, r0, #0 - mov r0, #6 - lsl r2, r2, #0xc - mov r3, #0x1e - str r0, [sp] - add r0, r5, #4 - add r2, r1, r2 - lsl r3, r3, #0xc - bl ov5_021DDE14 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021E255C: - add r0, r5, #4 - bl ov5_021DDE74 - add r6, r0, #0 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl sub_02020A50 - cmp r6, #1 - bne _021E2606 - ldr r0, [r4, #0] - mov r2, #5 - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, _021E260C ; =0xFFFFE000 - mov r3, #6 - str r0, [sp] - mov r0, #0xff - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0x1e - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r1, [r5, #0x1c] - add r0, r4, #0 - bl ov5_021DE058 - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - str r0, [r5, #0] - bl sub_02020A90 - mov r2, #0x1e - add r1, r0, #0 - mov r0, #6 - lsl r2, r2, #0xc - str r0, [sp] - ldr r3, _021E2614 ; =0xFFF9C000 - add r0, r5, #4 - sub r2, r1, r2 - bl ov5_021DDE14 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021E25B4: - add r0, r5, #4 - bl ov5_021DDE74 - add r6, r0, #0 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl sub_02020A50 - cmp r6, #1 - bne _021E2606 - add r0, r4, #0 - bl ov5_021DDD7C - cmp r0, #1 - bne _021E2606 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E25DC: - mov r0, #0 - bl sub_0200F370 - ldr r0, _021E2618 ; =0x04000010 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E25F8 - mov r0, #1 - str r0, [r1, #0] -_021E25F8: - ldr r0, [r5, #0x1c] - bl ov5_021DDF74 - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 -_021E2606: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021E260C: .word 0xFFFFE000 -_021E2610: .word 0xFFFF4000 -_021E2614: .word 0xFFF9C000 -_021E2618: .word 0x04000010 - thumb_func_end ov5_021E24A8 - - thumb_func_start ov5_021E261C -ov5_021E261C: ; 0x021E261C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #6 - bls _021E262E - b _021E2740 -_021E262E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E263A: ; jump table - .short _021E2648 - _021E263A - 2 ; case 0 - .short _021E267A - _021E263A - 2 ; case 1 - .short _021E269A - _021E263A - 2 ; case 2 - .short _021E26D0 - _021E263A - 2 ; case 3 - .short _021E26E2 - _021E263A - 2 ; case 4 - .short _021E2704 - _021E263A - 2 ; case 5 - .short _021E2716 - _021E263A - 2 ; case 6 -_021E2648: - mov r0, #4 - mov r1, #0x10 - bl sub_02018144 - str r0, [r4, #0xc] - mov r2, #0x10 - mov r1, #0 -_021E2656: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021E2656 - ldr r0, [r4, #0xc] - mov r1, #4 - bl ov5_021E28B0 - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E267A: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - add r3, r4, #4 - bl ov5_021DDC44 - mov r0, #0xa - str r0, [r5, #0xc] - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E269A: - ldr r0, [r5, #0xc] - sub r0, r0, #1 - str r0, [r5, #0xc] - bpl _021E2740 - ldr r0, [r4, #0] - mov r3, #0x32 - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0xc - str r0, [r5, #0xc] - lsl r0, r0, #0xc - str r0, [sp] - lsl r3, r3, #4 - str r3, [sp, #4] - ldr r0, _021E2744 ; =0x04000010 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r2, #0xbf - sub r3, #0x76 - bl ov5_021E28E4 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E26D0: - ldr r0, [r5, #0xc] - sub r0, r0, #1 - str r0, [r5, #0xc] - bpl _021E2740 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E26E2: - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x1e - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2704: - bl sub_0200F2AC - cmp r0, #0 - beq _021E2740 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2716: - add r0, r5, #0 - bl ov5_021E28CC - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E2730 - mov r0, #1 - str r0, [r1, #0] -_021E2730: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 -_021E2740: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E2744: .word 0x04000010 - thumb_func_end ov5_021E261C - - thumb_func_start ov5_021E2748 -ov5_021E2748: ; 0x021E2748 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #6 - bls _021E275A - b _021E286E -_021E275A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E2766: ; jump table - .short _021E2774 - _021E2766 - 2 ; case 0 - .short _021E27A6 - _021E2766 - 2 ; case 1 - .short _021E27C6 - _021E2766 - 2 ; case 2 - .short _021E27FE - _021E2766 - 2 ; case 3 - .short _021E2810 - _021E2766 - 2 ; case 4 - .short _021E2832 - _021E2766 - 2 ; case 5 - .short _021E2844 - _021E2766 - 2 ; case 6 -_021E2774: - mov r0, #4 - mov r1, #0x10 - bl sub_02018144 - str r0, [r4, #0xc] - mov r2, #0x10 - mov r1, #0 -_021E2782: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021E2782 - ldr r0, [r4, #0xc] - mov r1, #4 - bl ov5_021E28B0 - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E27A6: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r4, #4 - bl ov5_021DDC44 - mov r0, #0xa - str r0, [r5, #0xc] - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E27C6: - ldr r0, [r5, #0xc] - sub r0, r0, #1 - str r0, [r5, #0xc] - bpl _021E286E - ldr r0, [r4, #0] - mov r3, #0x32 - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0xc - str r0, [r5, #0xc] - mov r0, #0xf - lsl r0, r0, #0xc - str r0, [sp] - lsl r3, r3, #4 - str r3, [sp, #4] - ldr r0, _021E2874 ; =0x04000010 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r2, #0xbf - add r3, #0xdf - bl ov5_021E28E4 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} -_021E27FE: - ldr r0, [r5, #0xc] - sub r0, r0, #1 - str r0, [r5, #0xc] - bpl _021E286E - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2810: - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x1e - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2832: - bl sub_0200F2AC - cmp r0, #0 - beq _021E286E - ldr r0, [r4, #0] - add sp, #0x14 - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2844: - add r0, r5, #0 - bl ov5_021E28CC - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E285E - mov r0, #1 - str r0, [r1, #0] -_021E285E: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 -_021E286E: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_021E2874: .word 0x04000010 - thumb_func_end ov5_021E2748 - - thumb_func_start ov5_021E2878 -ov5_021E2878: ; 0x021E2878 - ldr r3, _021E2884 ; =sub_0200DA04 - mov r2, #1 - add r1, r0, #0 - ldr r0, _021E2888 ; =ov5_021E288C - lsl r2, r2, #0xa - bx r3 - ; .align 2, 0 -_021E2884: .word sub_0200DA04 -_021E2888: .word ov5_021E288C - thumb_func_end ov5_021E2878 - - thumb_func_start ov5_021E288C -ov5_021E288C: ; 0x021E288C - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #8] - cmp r0, #2 - blo _021E28A0 - ldr r0, [r4, #0] - bl sub_02013DA4 - mov r0, #0 - str r0, [r4, #8] -_021E28A0: - ldr r0, [r4, #0] - bl sub_02013DDC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E288C - - thumb_func_start ov5_021E28B0 -ov5_021E28B0: ; 0x021E28B0 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl sub_02013BE0 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - add r0, r4, #0 - bl ov5_021E2878 - str r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E28B0 - - thumb_func_start ov5_021E28CC -ov5_021E28CC: ; 0x021E28CC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_0200DA58 - ldr r0, [r4, #0] - bl sub_02013D38 - ldr r0, [r4, #0] - bl sub_02013D74 - pop {r4, pc} - thumb_func_end ov5_021E28CC - - thumb_func_start ov5_021E28E4 -ov5_021E28E4: ; 0x021E28E4 - push {r4, r5, lr} - sub sp, #0x14 - ldr r4, [sp, #0x20] - add r5, sp, #0x10 - str r4, [sp] - mov r4, #0x14 - ldrsh r4, [r5, r4] - str r4, [sp, #4] - ldr r4, [sp, #0x28] - str r4, [sp, #8] - ldr r4, [sp, #0x2c] - str r4, [sp, #0xc] - ldr r4, [sp, #0x30] - str r4, [sp, #0x10] - ldr r0, [r0, #0] - bl sub_02013C10 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E28E4 - - thumb_func_start ov5_021E290C -ov5_021E290C: ; 0x021E290C - push {r3, r4, r5, r6, r7, lr} - ldr r0, [r0, #0] - add r7, r1, #0 - bl sub_02013D94 - add r5, r0, #0 - mov r6, #0 -_021E291A: - ldr r0, [r5, #0] - add r1, r7, #0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - add r0, r6, #0 - bl sub_020E2178 - mov r1, #1 - tst r0, r1 - bne _021E2932 - lsl r0, r4, #0x10 - b _021E2936 -_021E2932: - neg r0, r4 - lsl r0, r0, #0x10 -_021E2936: - lsr r0, r0, #0x10 - str r0, [r5, #0] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #0xc0 - blt _021E291A - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E290C - - thumb_func_start ov5_021E2944 -ov5_021E2944: ; 0x021E2944 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #5 - bhi _021E2A44 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E2960: ; jump table - .short _021E296C - _021E2960 - 2 ; case 0 - .short _021E298C - _021E2960 - 2 ; case 1 - .short _021E29A8 - _021E2960 - 2 ; case 2 - .short _021E29B6 - _021E2960 - 2 ; case 3 - .short _021E2A00 - _021E2960 - 2 ; case 4 - .short _021E2A20 - _021E2960 - 2 ; case 5 -_021E296C: - mov r0, #4 - mov r1, #0x1c - bl sub_02018144 - str r0, [r4, #0xc] - mov r2, #0x1c - mov r1, #0 -_021E297A: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021E297A - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E298C: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E29A8: - ldr r1, [r4, #4] - cmp r1, #0 - beq _021E2A44 - add r0, r0, #1 - add sp, #0xc - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E29B6: - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #0xc - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0x10 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - str r0, [r5, #0] - bl sub_02020A90 - mov r2, #0x19 - add r1, r0, #0 - mov r0, #0xc - lsl r2, r2, #0x10 - str r0, [sp] - ldr r3, _021E2A48 ; =0xFFFFE000 - add r0, r5, #4 - sub r2, r1, r2 - bl ov5_021DDE14 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2A00: - add r0, r5, #4 - bl ov5_021DDE74 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl sub_02020A50 - bl sub_0200F2AC - cmp r0, #0 - beq _021E2A44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2A20: - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E2A34 - mov r0, #1 - str r0, [r1, #0] -_021E2A34: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 -_021E2A44: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E2A48: .word 0xFFFFE000 - thumb_func_end ov5_021E2944 - - thumb_func_start ov5_021E2A4C -ov5_021E2A4C: ; 0x021E2A4C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #5 - bhi _021E2B4C - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E2A68: ; jump table - .short _021E2A74 - _021E2A68 - 2 ; case 0 - .short _021E2A94 - _021E2A68 - 2 ; case 1 - .short _021E2AB0 - _021E2A68 - 2 ; case 2 - .short _021E2ABE - _021E2A68 - 2 ; case 3 - .short _021E2B08 - _021E2A68 - 2 ; case 4 - .short _021E2B28 - _021E2A68 - 2 ; case 5 -_021E2A74: - mov r0, #4 - mov r1, #0x1c - bl sub_02018144 - str r0, [r4, #0xc] - mov r2, #0x1c - mov r1, #0 -_021E2A82: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021E2A82 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2A94: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2AB0: - ldr r1, [r4, #4] - cmp r1, #0 - beq _021E2B4C - add r0, r0, #1 - add sp, #0xc - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2ABE: - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #0xc - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0x10 - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - str r0, [r5, #0] - bl sub_02020A90 - mov r2, #0x32 - add r1, r0, #0 - mov r0, #0xc - lsl r2, r2, #0x10 - str r0, [sp] - ldr r3, _021E2B50 ; =0xFFFFB000 - add r0, r5, #4 - sub r2, r1, r2 - bl ov5_021DDE14 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2B08: - add r0, r5, #4 - bl ov5_021DDE74 - ldr r0, [r5, #4] - ldr r1, [r5, #0] - bl sub_02020A50 - bl sub_0200F2AC - cmp r0, #0 - beq _021E2B4C - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E2B28: - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E2B3C - mov r0, #1 - str r0, [r1, #0] -_021E2B3C: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 -_021E2B4C: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E2B50: .word 0xFFFFB000 - thumb_func_end ov5_021E2A4C - - thumb_func_start ov5_021E2B54 -ov5_021E2B54: ; 0x021E2B54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r7, r1, #0 - str r0, [sp, #0x14] - ldr r0, [r7, #0] - ldr r4, [r7, #0xc] - cmp r0, #7 - bls _021E2B66 - b _021E2E92 -_021E2B66: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E2B72: ; jump table - .short _021E2B82 - _021E2B72 - 2 ; case 0 - .short _021E2C40 - _021E2B72 - 2 ; case 1 - .short _021E2C5A - _021E2B72 - 2 ; case 2 - .short _021E2C66 - _021E2B72 - 2 ; case 3 - .short _021E2CCA - _021E2B72 - 2 ; case 4 - .short _021E2D32 - _021E2B72 - 2 ; case 5 - .short _021E2DBE - _021E2B72 - 2 ; case 6 - .short _021E2E48 - _021E2B72 - 2 ; case 7 -_021E2B82: - mov r1, #0x1e - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x1e - str r0, [r7, #0xc] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r0, [r7, #0x10] - ldr r4, [r7, #0xc] - ldr r1, [r0, #0x24] - mov r0, #7 - lsl r0, r0, #6 - str r1, [r4, r0] - bl ov5_021DDF38 - str r0, [r4, #0x44] - add r0, r4, #0 - add r0, #0x48 - mov r1, #2 - mov r2, #1 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #6 - str r0, [sp, #0xc] - ldr r0, _021E2EA4 ; =0x000927C0 - mov r2, #0x61 - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r7, #0x20] - add r1, #0x48 - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r0, #0 - str r0, [sp, #0x18] - add r6, r0, #0 - add r0, r4, #0 - str r0, [sp, #0x20] - add r0, #0x48 - add r5, r4, #0 - str r0, [sp, #0x20] -_021E2BEC: - mov r0, #0 - str r0, [sp] - mov r1, #0x61 - str r0, [sp, #4] - lsl r1, r1, #2 - mov r2, #2 - mov r3, #6 - ldr r0, [sp, #0x20] - add r1, r4, r1 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov5_021DE62C - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_02021F58 - ldr r0, [sp, #0x18] - add r5, r5, #4 - add r0, r0, #1 - add r6, r6, #2 - str r0, [sp, #0x18] - cmp r0, #2 - blt _021E2BEC - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2C40: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - add r3, r7, #4 - bl ov5_021DDC44 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2C5A: - ldr r1, [r7, #4] - cmp r1, #0 - beq _021E2D28 - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2C66: - mov r0, #0xa - mov r2, #1 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x29 - lsl r2, r2, #0xc - mov r3, #2 - bl ov5_021DDE14 - ldr r1, [r4, #0] - add r0, sp, #0x54 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - mov r6, #0 - add r5, r4, #0 -_021E2C88: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02021CF8 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, sp, #0x54 - bl sub_02021C70 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E2C88 - add r0, r4, #0 - ldr r2, _021E2EA8 ; =0x0000FFFF - add r0, #0x18 - mov r1, #0 - mov r3, #0xa - bl ov5_021DDD80 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2CCA: - add r0, r4, #0 - bl ov5_021DDE74 - ldr r1, [r4, #0] - str r0, [sp, #0x1c] - add r0, sp, #0x54 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDD90 - mov r6, #0 - add r5, r4, #0 -_021E2CEA: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, sp, #0x54 - bl sub_02021C70 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E2CEA - mov r0, #0x6e - ldr r1, [r4, #0x18] - lsl r0, r0, #2 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - mov r1, #0x6f - lsl r1, r1, #2 - ldr r0, [r4, r1] - ldr r2, [r4, #0x18] - sub r1, #0xbc - sub r1, r2, r1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02021C94 - ldr r0, [sp, #0x1c] - cmp r0, #1 - beq _021E2D2A -_021E2D28: - b _021E2E92 -_021E2D2A: - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2D32: - mov r0, #0 - str r0, [sp] - mov r0, #0xff - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0xa - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r1, [r4, #0x44] - add r0, r7, #0 - mov r2, #0x60 - mov r3, #6 - bl ov5_021DDF9C - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021D6C - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021D6C - mov r0, #6 - str r0, [sp] - add r0, r4, #0 - mov r2, #0xff - mov r3, #0xa - add r0, #0x2c - mov r1, #0 - lsl r2, r2, #0xc - lsl r3, r3, #0xc - bl ov5_021DDE14 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02020A90 - add r1, r0, #0 - mov r0, #6 - str r0, [sp] - mov r0, #0x71 - mov r2, #0x7d - lsl r0, r0, #2 - lsl r2, r2, #0xe - ldr r3, _021E2EAC ; =0xFFFF6000 - add r0, r4, r0 - sub r2, r1, r2 - bl ov5_021DDE14 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021C94 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021C94 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2DBE: - add r0, r4, #0 - add r0, #0x2c - bl ov5_021DDE74 - mov r1, #2 - ldr r2, [r4, #0x2c] - lsl r1, r1, #0x12 - sub r1, r1, r2 - mov r2, #6 - add r0, sp, #0x30 - lsl r2, r2, #0x10 - mov r3, #0 - bl ov5_021DE660 - add r3, sp, #0x30 - ldmia r3!, {r0, r1} - add r2, sp, #0x48 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #2 - str r0, [r2, #0] - ldr r2, [r4, #0x2c] - lsl r1, r1, #0x12 - add r1, r2, r1 - mov r2, #6 - add r0, sp, #0x24 - lsl r2, r2, #0x10 - mov r3, #0 - bl ov5_021DE660 - add r3, sp, #0x24 - ldmia r3!, {r0, r1} - add r2, sp, #0x3c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, sp, #0x48 - str r0, [r2, #0] - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021C50 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x3c - bl sub_02021C50 - mov r0, #0x71 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDE74 - mov r1, #0x71 - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02020A50 - add r0, r7, #0 - bl ov5_021DDD7C - cmp r0, #0 - beq _021E2E92 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E2E92 -_021E2E48: - mov r0, #0 - bl sub_0200F370 - ldr r1, [r7, #0x14] - cmp r1, #0 - beq _021E2E58 - mov r0, #1 - str r0, [r1, #0] -_021E2E58: - mov r6, #0 - add r5, r4, #0 -_021E2E5C: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021BD4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E2E5C - mov r1, #0x61 - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x48 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - add r0, #0x48 - bl ov5_021DE4AC - ldr r0, [r4, #0x44] - bl ov5_021DDF74 - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl ov5_021DDC28 -_021E2E92: - ldr r0, [r7, #0] - cmp r0, #7 - beq _021E2E9E - ldr r0, [r4, #0x48] - bl sub_020219F8 -_021E2E9E: - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E2EA4: .word 0x000927C0 -_021E2EA8: .word 0x0000FFFF -_021E2EAC: .word 0xFFFF6000 - thumb_func_end ov5_021E2B54 - - thumb_func_start ov5_021E2EB0 -ov5_021E2EB0: ; 0x021E2EB0 - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - add r6, r1, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0] - ldr r4, [r6, #0xc] - cmp r0, #7 - bhi _021E2FAE - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E2ECC: ; jump table - .short _021E2EDC - _021E2ECC - 2 ; case 0 - .short _021E2F8E - _021E2ECC - 2 ; case 1 - .short _021E2FA8 - _021E2ECC - 2 ; case 2 - .short _021E2FB6 - _021E2ECC - 2 ; case 3 - .short _021E3044 - _021E2ECC - 2 ; case 4 - .short _021E30D4 - _021E2ECC - 2 ; case 5 - .short _021E310E - _021E2ECC - 2 ; case 6 - .short _021E3138 - _021E2ECC - 2 ; case 7 -_021E2EDC: - mov r1, #0x71 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x71 - str r0, [r6, #0xc] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r0, [r6, #0x10] - ldr r4, [r6, #0xc] - ldr r1, [r0, #0x24] - mov r0, #0x69 - lsl r0, r0, #2 - str r1, [r4, r0] - bl ov5_021DE1CC - str r0, [r4, #0x28] - add r0, r4, #0 - add r0, #0x2c - mov r1, #2 - mov r2, #1 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _021E3194 ; =0x000927C0 - mov r2, #0x5a - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r6, #0x20] - add r1, #0x2c - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - add r0, r4, #0 - str r0, [sp, #0x18] - add r0, #0x2c - mov r7, #0 - add r5, r4, #0 - str r0, [sp, #0x18] -_021E2F42: - mov r0, #0 - str r0, [sp] - mov r1, #0x5a - str r0, [sp, #4] - lsl r1, r1, #2 - mov r2, #2 - ldr r0, [sp, #0x18] - add r1, r4, r1 - lsl r2, r2, #0x12 - mov r3, #0 - bl ov5_021DE62C - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02021CF8 - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #2 - blt _021E2F42 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E2F8E: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r6, #4 - bl ov5_021DDC44 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E2FA8: - ldr r1, [r6, #4] - cmp r1, #0 - bne _021E2FB0 -_021E2FAE: - b _021E3182 -_021E2FB0: - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E2FB6: - mov r2, #3 - ldr r1, _021E3198 ; =0xFFF40000 - add r0, r4, #0 - lsl r2, r2, #0x12 - mov r3, #8 - bl ov5_021DDDBC - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r2, #2 - ldr r1, [r4, #0] - lsl r2, r2, #0x12 - sub r1, r2, r1 - add r0, sp, #0x40 - lsr r2, r2, #1 - mov r3, #0 - bl ov5_021DE660 - add r3, sp, #0x40 - ldmia r3!, {r0, r1} - add r2, sp, #0x70 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r3, #0 - str r0, [r2, #0] - mov r2, #2 - ldr r1, [r4, #0] - lsl r2, r2, #0x12 - add r0, sp, #0x34 - add r1, r1, r2 - bl ov5_021DE660 - add r3, sp, #0x34 - ldmia r3!, {r0, r1} - add r2, sp, #0x64 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, sp, #0x70 - str r0, [r2, #0] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021C50 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x64 - bl sub_02021C50 - add r0, r4, #0 - ldr r2, _021E319C ; =0x0001FFFE - add r0, #0x14 - mov r1, #0 - mov r3, #8 - bl ov5_021DDD80 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E3044: - add r0, r4, #0 - bl ov5_021DDDCC - mov r2, #2 - add r5, r0, #0 - ldr r1, [r4, #0] - lsl r2, r2, #0x12 - sub r1, r2, r1 - add r0, sp, #0x28 - lsr r2, r2, #1 - mov r3, #0 - bl ov5_021DE660 - add r3, sp, #0x28 - ldmia r3!, {r0, r1} - add r2, sp, #0x58 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r3, #0 - str r0, [r2, #0] - mov r2, #2 - ldr r1, [r4, #0] - lsl r2, r2, #0x12 - add r0, sp, #0x1c - add r1, r1, r2 - bl ov5_021DE660 - add r3, sp, #0x1c - ldmia r3!, {r0, r1} - add r2, sp, #0x4c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, sp, #0x58 - str r0, [r2, #0] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021C50 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x4c - bl sub_02021C50 - add r0, r4, #0 - add r0, #0x14 - bl ov5_021DDD90 - mov r0, #0x67 - ldr r1, [r4, #0x14] - lsl r0, r0, #2 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - ldr r1, [r4, #0x14] - mov r0, #0x1a - lsl r0, r0, #4 - neg r1, r1 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - cmp r5, #1 - bne _021E3182 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E30D4: - mov r3, #1 - lsl r3, r3, #0xc - str r3, [sp] - ldr r1, [r4, #0x28] - add r0, r6, #0 - mov r2, #8 - bl ov5_021DE240 - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02020A90 - add r1, r0, #0 - mov r0, #8 - str r0, [sp] - mov r0, #0x6a - mov r2, #0x7d - lsl r0, r0, #2 - lsl r2, r2, #0xe - ldr r3, _021E31A0 ; =0xFFFF6000 - add r0, r4, r0 - sub r2, r1, r2 - bl ov5_021DDE14 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E310E: - mov r0, #0x6a - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDE74 - mov r1, #0x6a - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02020A50 - add r0, r6, #0 - bl ov5_021DDD7C - cmp r0, #1 - bne _021E3182 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E3182 -_021E3138: - mov r0, #0 - bl sub_0200F370 - ldr r1, [r6, #0x14] - cmp r1, #0 - beq _021E3148 - mov r0, #1 - str r0, [r1, #0] -_021E3148: - mov r7, #0 - add r5, r4, #0 -_021E314C: - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021BD4 - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #2 - blt _021E314C - mov r1, #0x5a - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x2c - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - add r0, #0x2c - bl ov5_021DE4AC - ldr r0, [r4, #0x28] - bl ov5_021DE218 - ldr r1, [sp, #0x14] - add r0, r6, #0 - bl ov5_021DDC28 -_021E3182: - ldr r0, [r6, #0] - cmp r0, #7 - beq _021E318E - ldr r0, [r4, #0x2c] - bl sub_020219F8 -_021E318E: - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - nop -_021E3194: .word 0x000927C0 -_021E3198: .word 0xFFF40000 -_021E319C: .word 0x0001FFFE -_021E31A0: .word 0xFFFF6000 - thumb_func_end ov5_021E2EB0 - - thumb_func_start ov5_021E31A4 -ov5_021E31A4: ; 0x021E31A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - add r7, r1, #0 - str r0, [sp, #0x14] - ldr r0, [r7, #0] - ldr r4, [r7, #0xc] - cmp r0, #7 - bls _021E31B6 - b _021E3524 -_021E31B6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E31C2: ; jump table - .short _021E31D2 - _021E31C2 - 2 ; case 0 - .short _021E3292 - _021E31C2 - 2 ; case 1 - .short _021E32AC - _021E31C2 - 2 ; case 2 - .short _021E32F2 - _021E31C2 - 2 ; case 3 - .short _021E3358 - _021E31C2 - 2 ; case 4 - .short _021E33E4 - _021E31C2 - 2 ; case 5 - .short _021E3468 - _021E31C2 - 2 ; case 6 - .short _021E34D0 - _021E31C2 - 2 ; case 7 -_021E31D2: - mov r1, #0x7a - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x7a - str r0, [r7, #0xc] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r0, [r7, #0x10] - ldr r4, [r7, #0xc] - ldr r1, [r0, #0x24] - mov r0, #0x72 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - add r0, #0x40 - mov r1, #4 - bl ov5_021E28B0 - mov r0, #0x79 - mov r1, #0xc - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - add r0, #0x50 - mov r1, #2 - mov r2, #1 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #6 - str r0, [sp, #0xc] - ldr r0, _021E3544 ; =0x000927C0 - mov r2, #0x63 - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r7, #0x20] - add r1, #0x50 - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - add r0, r4, #0 - str r0, [sp, #0x1c] - add r0, #0x50 - mov r6, #0 - add r5, r4, #0 - str r0, [sp, #0x1c] -_021E3244: - mov r0, #0 - str r0, [sp] - mov r1, #0x63 - str r0, [sp, #4] - lsl r1, r1, #2 - mov r2, #2 - mov r3, #6 - ldr r0, [sp, #0x1c] - add r1, r4, r1 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov5_021DE62C - mov r1, #7 - lsl r1, r1, #6 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_02021F58 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E3244 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E3292: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - add r3, r7, #4 - bl ov5_021DDC44 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E32AC: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0 - bne _021E32E4 - mov r0, #3 - lsl r0, r0, #0xe - mov r3, #0x32 - str r0, [sp] - lsl r3, r3, #4 - str r3, [sp, #4] - ldr r0, _021E3548 ; =0x04000010 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0x40 - mov r2, #0xbf - sub r3, #0x76 - bl ov5_021E28E4 - mov r0, #1 - str r0, [r4, #0x4c] -_021E32E4: - ldr r0, [r7, #4] - cmp r0, #0 - beq _021E33BE - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E32F2: - add r0, r4, #0 - add r0, #0x18 - mov r1, #0 - mov r2, #0x10 - mov r3, #8 - bl ov5_021DDD80 - ldr r3, [r4, #0x18] - mov r0, #0x10 - sub r0, r0, r3 - str r0, [sp] - ldr r0, _021E354C ; =0x04000050 - mov r1, #0 - mov r2, #0xf - bl sub_020BF55C - mov r6, #0 - add r5, r4, #0 -_021E3316: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02021CF8 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021FE0 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E3316 - add r0, r4, #0 - ldr r2, _021E3550 ; =0x0000FFFF - add r0, #0x2c - mov r1, #0 - mov r3, #8 - bl ov5_021DDD80 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E3358: - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDD90 - add r6, r0, #0 - ldr r1, [r4, #0x18] - mov r0, #0x10 - sub r0, r0, r1 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _021E3554 ; =0x04000052 - strh r1, [r0] - ldr r0, [r4, #0x2c] - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - add r0, r4, #0 - add r0, #0x2c - bl ov5_021DDD90 - cmp r0, #0 - bne _021E33A2 - mov r0, #7 - ldr r1, [r4, #0x2c] - lsl r0, r0, #6 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - mov r0, #0x71 - lsl r0, r0, #2 - lsl r1, r5, #0x10 - ldr r0, [r4, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - b _021E33BA -_021E33A2: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021C94 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021C94 -_021E33BA: - cmp r6, #1 - beq _021E33C0 -_021E33BE: - b _021E3524 -_021E33C0: - ldr r0, _021E354C ; =0x04000050 - mov r6, #0 - strh r6, [r0] - add r5, r4, #0 -_021E33C8: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021FE0 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E33C8 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E33E4: - mov r1, #8 - str r1, [sp] - ldr r3, _021E3558 ; =0x0000019A - add r0, r4, #0 - lsl r1, r1, #9 - mov r2, #0x29 - bl ov5_021DDE14 - ldr r1, [r4, #0] - add r0, sp, #0x34 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - add r3, sp, #0x34 - add r2, sp, #0x4c - ldmia r3!, {r0, r1} - str r2, [sp, #0x20] - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r6, #0 - str r0, [r2, #0] - add r5, r4, #0 -_021E3412: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - ldr r1, [sp, #0x20] - bl sub_02021C70 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E3412 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02020A90 - add r1, r0, #0 - mov r0, #8 - str r0, [sp] - mov r0, #0x73 - mov r2, #0x7d - lsl r0, r0, #2 - lsl r2, r2, #0xe - ldr r3, _021E355C ; =0xFFFF6000 - add r0, r4, r0 - sub r2, r1, r2 - bl ov5_021DDE14 - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x18 - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E3468: - add r0, r4, #0 - bl ov5_021DDE74 - ldr r1, [r4, #0] - str r0, [sp, #0x18] - add r0, sp, #0x28 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - add r3, sp, #0x28 - add r2, sp, #0x40 - ldmia r3!, {r0, r1} - str r2, [sp, #0x24] - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r6, #0 - str r0, [r2, #0] - add r5, r4, #0 -_021E348E: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - ldr r1, [sp, #0x24] - bl sub_02021C70 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E348E - mov r0, #0x73 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDE74 - mov r1, #0x73 - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02020A50 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _021E3524 - bl sub_0200F2AC - cmp r0, #1 - bne _021E3524 - ldr r0, [r7, #0] - add r0, r0, #1 - str r0, [r7, #0] - b _021E3524 -_021E34D0: - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r1, [r7, #0x14] - cmp r1, #0 - beq _021E34E2 - mov r0, #1 - str r0, [r1, #0] -_021E34E2: - add r0, r4, #0 - add r0, #0x40 - bl ov5_021E28CC - mov r6, #0 - str r6, [r4, #0x4c] - add r5, r4, #0 -_021E34F0: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_02021BD4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #2 - blt _021E34F0 - mov r1, #0x63 - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x50 - add r1, r4, r1 - bl ov5_021DE5A4 - add r4, #0x50 - add r0, r4, #0 - bl ov5_021DE4AC - ldr r1, [sp, #0x14] - add r0, r7, #0 - bl ov5_021DDC28 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} -_021E3524: - ldr r0, [r4, #0x4c] - cmp r0, #1 - bne _021E3534 - add r0, r4, #0 - add r0, #0x40 - mov r1, #2 - bl ov5_021E290C -_021E3534: - ldr r0, [r7, #0] - cmp r0, #7 - beq _021E3540 - ldr r0, [r4, #0x50] - bl sub_020219F8 -_021E3540: - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E3544: .word 0x000927C0 -_021E3548: .word 0x04000010 -_021E354C: .word 0x04000050 -_021E3550: .word 0x0000FFFF -_021E3554: .word 0x04000052 -_021E3558: .word 0x0000019A -_021E355C: .word 0xFFFF6000 - thumb_func_end ov5_021E31A4 - - thumb_func_start ov5_021E3560 -ov5_021E3560: ; 0x021E3560 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp, #0x18] - add r0, r1, #0 - ldr r0, [r0, #0] - str r1, [sp, #0x1c] - ldr r4, [r1, #0xc] - cmp r0, #7 - bls _021E3574 - b _021E3A06 -_021E3574: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E3580: ; jump table - .short _021E3590 - _021E3580 - 2 ; case 0 - .short _021E36A8 - _021E3580 - 2 ; case 1 - .short _021E36C8 - _021E3580 - 2 ; case 2 - .short _021E3722 - _021E3580 - 2 ; case 3 - .short _021E37E2 - _021E3580 - 2 ; case 4 - .short _021E3880 - _021E3580 - 2 ; case 5 - .short _021E3930 - _021E3580 - 2 ; case 6 - .short _021E396E - _021E3580 - 2 ; case 7 -_021E3590: - mov r1, #9 - mov r0, #4 - lsl r1, r1, #6 - bl sub_02018144 - ldr r1, [sp, #0x1c] - mov r2, #9 - str r0, [r1, #0xc] - mov r1, #0 - lsl r2, r2, #6 - bl sub_020D5124 - ldr r0, [sp, #0x1c] - ldr r4, [r0, #0xc] - ldr r0, [r0, #0x10] - ldr r1, [r0, #0x24] - mov r0, #0x22 - lsl r0, r0, #4 - str r1, [r4, r0] - sub r0, #0x10 - add r0, r4, r0 - mov r1, #4 - bl ov5_021E28B0 - mov r0, #0x8f - mov r1, #0xe - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #3 - mov r2, #1 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _021E391C ; =0x000927C0 - mov r2, #0x4f - str r0, [sp, #0x10] - ldr r0, [sp, #0x1c] - lsl r2, r2, #2 - ldr r0, [r0, #0x20] - add r1, r4, #0 - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r7, #0x4f - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_021E3600: - mov r0, #0 - str r0, [sp] - mov r2, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r4, r7 - add r3, r2, #0 - bl ov5_021DE62C - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02021CF8 - mov r0, #4 - bl ov5_021DE6A4 - mov r1, #0x7d - lsl r1, r1, #2 - str r0, [r5, r1] - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _021E3600 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201A778 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r0, [sp, #0x1c] - ldr r1, [r4, r1] - ldr r0, [r0, #0x10] - mov r2, #3 - ldr r0, [r0, #8] - bl sub_0201A7E8 - mov r1, #0 - add r0, sp, #0x28 - strh r1, [r0] - mov r0, #3 - add r1, sp, #0x28 - mov r2, #2 - mov r3, #0x1e - bl sub_0201972C - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201A9A4 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [r0, #0] - b _021E3A06 -_021E36A8: - mov r1, #0x10 - ldr r3, [sp, #0x1c] - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r3, #4 - bl ov5_021DDC44 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [r0, #0] - b _021E3A06 -_021E36C8: - mov r3, #0x8f - lsl r3, r3, #2 - ldr r0, [r4, r3] - sub r0, r0, #1 - str r0, [r4, r3] - ldr r0, [r4, r3] - cmp r0, #0 - bne _021E3706 - mov r0, #3 - lsl r0, r0, #0xe - str r0, [sp] - add r0, r3, #0 - add r0, #0xe4 - str r0, [sp, #4] - ldr r0, _021E3920 ; =0x04000010 - mov r1, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #4 - str r0, [sp, #0x10] - add r0, r3, #0 - sub r0, #0x2c - add r0, r4, r0 - mov r2, #0xbf - add r3, #0x6e - bl ov5_021E28E4 - mov r0, #0x87 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] -_021E3706: - ldr r0, [sp, #0x1c] - ldr r0, [r0, #4] - cmp r0, #0 - beq _021E3732 - mov r0, #0x8f - mov r1, #6 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [r0, #0] - b _021E3A06 -_021E3722: - mov r0, #0x8f - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0 - blt _021E3734 -_021E3732: - b _021E3A06 -_021E3734: - sub r0, #0x1c - ldr r0, [r4, r0] - bl sub_02020A90 - add r1, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0x89 - mov r2, #0x7d - lsl r0, r0, #2 - lsl r2, r2, #0xe - ldr r3, _021E3924 ; =0xFFFF6000 - add r0, r4, r0 - sub r2, r1, r2 - bl ov5_021DDE14 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r2, _021E3928 ; =0x0000FFFF - add r0, r4, r0 - mov r1, #0 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #0x5f - lsl r0, r0, #2 - mov r2, #0x1f - add r0, r4, r0 - mov r1, #0xe7 - mvn r2, r2 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #0 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x83 - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r3, #0x40 - str r1, [sp, #8] - mov r1, #0x56 - str r1, [sp, #0xc] - str r3, [sp, #0x10] - mov r1, #0xf - str r1, [sp, #0x14] - sub r0, #0x18 - mov r1, #0x2b - ldr r0, [r4, r0] - add r2, r1, #0 - add r3, #0xf8 - bl ov5_021DE6C4 - mov r1, #0x2b - mov r2, #0xe7 - add r0, sp, #0x38 - lsl r1, r1, #0xc - lsl r2, r2, #0xc - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r1, #1 - lsl r0, r1, #9 - str r1, [r4, r0] - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [r0, #0] - mov r0, #0x8f - mov r1, #4 - lsl r0, r0, #2 - str r1, [r4, r0] - b _021E3A06 -_021E37E2: - mov r0, #0x8f - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0 - bge _021E3890 - sub r0, #0xac - mov r2, #0x1f - add r0, r4, r0 - mov r1, #0xe7 - mvn r2, r2 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r2, _021E392C ; =0xFFFF0001 - add r0, r4, r0 - mov r1, #0 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #0 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x83 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r0, #0x14 - str r1, [sp, #8] - mov r1, #0x56 - str r1, [sp, #0xc] - mov r1, #0x40 - str r1, [sp, #0x10] - mov r1, #0xf - str r1, [sp, #0x14] - mov r1, #0xd7 - add r3, r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - add r3, #0x61 - bl ov5_021DE6C4 - mov r1, #0xd7 - mov r2, #0xe7 - add r0, sp, #0x38 - lsl r1, r1, #0xc - lsl r2, r2, #0xc - mov r3, #1 - bl ov5_021DE660 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r1, #0x81 - mov r0, #1 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp, #0x1c] - add r1, #0x38 - ldr r0, [r0, #0] - add r2, r0, #1 - ldr r0, [sp, #0x1c] - str r2, [r0, #0] - mov r0, #2 - str r0, [r4, r1] - b _021E3A06 -_021E3880: - mov r0, #0x8f - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0 - blt _021E3892 -_021E3890: - b _021E3A06 -_021E3892: - sub r0, #0x98 - mov r2, #0x1f - add r0, r4, r0 - mov r1, #0xe7 - mvn r2, r2 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r2, _021E3928 ; =0x0000FFFF - add r0, r4, r0 - mov r1, #0 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #0 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #0x83 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r0, #0x10 - str r1, [sp, #8] - mov r1, #0x56 - str r1, [sp, #0xc] - mov r1, #0x40 - str r1, [sp, #0x10] - mov r1, #0xf - str r1, [sp, #0x14] - mov r1, #0x81 - add r3, r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - add r3, #0xb7 - bl ov5_021DE6C4 - mov r1, #0x81 - mov r2, #0xe7 - add r0, sp, #0x38 - lsl r1, r1, #0xc - lsl r2, r2, #0xc - mov r3, #2 - bl ov5_021DE660 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x82 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [r0, #0] - b _021E3A06 - nop -_021E391C: .word 0x000927C0 -_021E3920: .word 0x04000010 -_021E3924: .word 0xFFFF6000 -_021E3928: .word 0x0000FFFF -_021E392C: .word 0xFFFF0001 -_021E3930: - mov r0, #0x89 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDE74 - mov r1, #0x89 - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02020A50 - mov r1, #2 - lsl r1, r1, #8 - ldr r0, [r4, r1] - cmp r0, #0 - bne _021E3A06 - add r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021E3A06 - add r1, #8 - ldr r0, [r4, r1] - cmp r0, #0 - bne _021E3A06 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x1c] - str r1, [r0, #0] - b _021E3A06 -_021E396E: - mov r0, #0 - bl sub_0200F370 - ldr r0, [sp, #0x1c] - ldr r1, [r0, #0x14] - cmp r1, #0 - beq _021E3980 - mov r0, #1 - str r0, [r1, #0] -_021E3980: - mov r0, #0x21 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov5_021E28CC - mov r0, #0x87 - lsl r0, r0, #2 - mov r6, #0 - add r7, r0, #0 - str r6, [r4, r0] - add r5, r4, #0 - sub r7, #0x28 -_021E3998: - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021BD4 - ldr r0, [r5, r7] - bl ov5_021DE6BC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _021E3998 - mov r1, #0x4f - lsl r1, r1, #2 - add r0, r4, #0 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - bl ov5_021DE4AC - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201ACF4 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201A8FC - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0201A928 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - ldr r0, [sp, #0x1c] - mov r1, #3 - ldr r0, [r0, #0x10] - ldr r0, [r0, #8] - bl sub_02019EBC - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x18] - bl ov5_021DDC28 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} -_021E3A06: - mov r0, #0x87 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #1 - bne _021E3A1A - sub r0, #0xc - add r0, r4, r0 - mov r1, #2 - bl ov5_021E290C -_021E3A1A: - mov r1, #0x5f - mov r0, #0 - lsl r1, r1, #2 - str r0, [sp, #0x20] - add r0, r4, r1 - add r1, #0x3c - add r5, r4, #0 - str r0, [sp, #0x24] - add r7, r4, r1 - add r6, r4, #0 -_021E3A2E: - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r5, r0] - cmp r0, #1 - bne _021E3A9C - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov5_021DE71C - cmp r0, #0 - beq _021E3A4E - mov r0, #2 - mov r1, #0 - lsl r0, r0, #8 - str r1, [r5, r0] -_021E3A4E: - ldr r0, [sp, #0x24] - bl ov5_021DDD90 - add r0, r7, #0 - bl ov5_021DDD90 - mov r1, #0x6e - lsl r1, r1, #2 - mov r0, #0x17 - ldr r1, [r6, r1] - lsl r0, r0, #4 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021D28 - add r3, r0, #0 - add r2, sp, #0x2c - ldmia r3!, {r0, r1} - mov ip, r2 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, ip - str r0, [r2, #0] - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r6, r0] - lsl r0, r0, #0xc - str r0, [sp, #0x30] - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021C50 -_021E3A9C: - ldr r0, [sp, #0x24] - add r5, r5, #4 - add r0, #0x14 - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - add r7, #0x14 - add r0, r0, #1 - add r6, #0x14 - str r0, [sp, #0x20] - cmp r0, #3 - blt _021E3A2E - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201A9A4 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0] - cmp r0, #7 - beq _021E3ACA - ldr r0, [r4, #0] - bl sub_020219F8 -_021E3ACA: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E3560 - - thumb_func_start ov5_021E3AD0 -ov5_021E3AD0: ; 0x021E3AD0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - ldr r4, [r5, #0xc] - cmp r0, #7 - bhi _021E3BA8 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E3AEC: ; jump table - .short _021E3AFC - _021E3AEC - 2 ; case 0 - .short _021E3B88 - _021E3AEC - 2 ; case 1 - .short _021E3BA2 - _021E3AEC - 2 ; case 2 - .short _021E3BB0 - _021E3AEC - 2 ; case 3 - .short _021E3C26 - _021E3AEC - 2 ; case 4 - .short _021E3CB2 - _021E3AEC - 2 ; case 5 - .short _021E3D00 - _021E3AEC - 2 ; case 6 - .short _021E3D28 - _021E3AEC - 2 ; case 7 -_021E3AFC: - mov r1, #0x1f - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x1f - str r0, [r5, #0xc] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r0, [r5, #0x10] - ldr r4, [r5, #0xc] - ldr r1, [r0, #0x24] - mov r0, #0x1d - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #1 - add r0, #0x5c - add r2, r1, #0 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _021E3D7C ; =0x000927C0 - mov r2, #0x66 - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r5, #0x20] - add r1, #0x5c - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r0, #0 - str r0, [sp] - mov r1, #0x66 - str r0, [sp, #4] - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #2 - ldr r3, _021E3D80 ; =0xFFFE0000 - add r0, #0x5c - add r1, r4, r1 - lsl r2, r2, #0x12 - bl ov5_021DE62C - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3B88: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - sub r1, #0x11 - add r2, r1, #0 - add r3, r5, #4 - bl ov5_021DDC44 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3BA2: - ldr r1, [r5, #4] - cmp r1, #0 - bne _021E3BAA -_021E3BA8: - b _021E3D6C -_021E3BAA: - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3BB0: - mov r2, #1 - mov r0, #0xc - lsl r2, r2, #0x14 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - lsr r3, r2, #7 - bl ov5_021DDE14 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0xc - str r0, [sp] - add r0, r4, #0 - mov r2, #2 - ldr r1, _021E3D84 ; =0x0000019A - add r0, #0x18 - lsl r2, r2, #0xc - mov r3, #0 - bl ov5_021DDE14 - mov r0, #0xc - str r0, [sp] - add r0, r4, #0 - mov r2, #2 - ldr r1, _021E3D84 ; =0x0000019A - add r0, #0x30 - lsl r2, r2, #0xc - mov r3, #0 - bl ov5_021DDE14 - ldr r1, [r4, #0x18] - ldr r2, [r4, #0x30] - add r0, sp, #0x2c - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x2c - mov r2, #2 - bl sub_02021C80 - add r0, r4, #0 - ldr r2, _021E3D88 ; =0x0000FFFF - add r0, #0x48 - mov r1, #0 - mov r3, #0xc - bl ov5_021DDD80 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3C26: - add r0, r4, #0 - bl ov5_021DDE74 - mov r1, #2 - lsl r1, r1, #0x12 - add r6, r0, #0 - ldr r3, [r4, #0] - lsr r2, r1, #2 - sub r2, r3, r2 - add r0, sp, #0x14 - mov r3, #0 - bl ov5_021DE660 - add r3, sp, #0x14 - add r2, sp, #0x20 - ldmia r3!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r7, #0 - str r0, [r2, #0] - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021C50 - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDE74 - add r0, r4, #0 - add r0, #0x30 - bl ov5_021DDE74 - ldr r1, [r4, #0x18] - ldr r2, [r4, #0x30] - add r0, sp, #0x2c - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x2c - bl sub_02021C70 - add r0, r4, #0 - add r0, #0x48 - bl ov5_021DDD90 - mov r0, #0x73 - ldr r1, [r4, #0x48] - lsl r0, r0, #2 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - cmp r6, #1 - bne _021E3D6C - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3CB2: - ldr r0, [r5, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #0x1d - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02020A90 - add r1, r0, #0 - mov r0, #8 - str r0, [sp] - mov r0, #0x75 - mov r2, #0xfa - lsl r0, r0, #2 - lsl r2, r2, #0xe - mov r3, #0xa - add r0, r4, r0 - sub r2, r1, r2 - lsl r3, r3, #0xc - bl ov5_021DDE14 - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x12 - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3D00: - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDE74 - mov r1, #0x75 - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02020A50 - bl sub_0200F2AC - cmp r0, #0 - beq _021E3D6C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E3D6C -_021E3D28: - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r0, [r5, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r5, #0x14] - cmp r1, #0 - beq _021E3D44 - mov r0, #1 - str r0, [r1, #0] -_021E3D44: - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021BD4 - mov r1, #0x66 - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x5c - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - add r0, #0x5c - bl ov5_021DE4AC - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021DDC28 -_021E3D6C: - ldr r0, [r5, #0] - cmp r0, #7 - beq _021E3D78 - ldr r0, [r4, #0x5c] - bl sub_020219F8 -_021E3D78: - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E3D7C: .word 0x000927C0 -_021E3D80: .word 0xFFFE0000 -_021E3D84: .word 0x0000019A -_021E3D88: .word 0x0000FFFF - thumb_func_end ov5_021E3AD0 - - thumb_func_start ov5_021E3D8C -ov5_021E3D8C: ; 0x021E3D8C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp, #0x14] - add r0, r1, #0 - ldr r0, [r0, #0] - str r1, [sp, #0x18] - ldr r4, [r1, #0xc] - cmp r0, #9 - bls _021E3DA0 - b _021E41BC -_021E3DA0: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E3DAC: ; jump table - .short _021E3DC0 - _021E3DAC - 2 ; case 0 - .short _021E3EBC - _021E3DAC - 2 ; case 1 - .short _021E3EDC - _021E3DAC - 2 ; case 2 - .short _021E3EF4 - _021E3DAC - 2 ; case 3 - .short _021E3F70 - _021E3DAC - 2 ; case 4 - .short _021E3FEC - _021E3DAC - 2 ; case 5 - .short _021E4062 - _021E3DAC - 2 ; case 6 - .short _021E40A2 - _021E3DAC - 2 ; case 7 - .short _021E40E8 - _021E3DAC - 2 ; case 8 - .short _021E4138 - _021E3DAC - 2 ; case 9 -_021E3DC0: - mov r1, #0x8a - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - ldr r1, [sp, #0x18] - mov r2, #0x8a - str r0, [r1, #0xc] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r0, [sp, #0x18] - mov r2, #1 - ldr r4, [r0, #0xc] - ldr r0, [r0, #0x10] - ldr r1, [r0, #0x24] - mov r0, #0x82 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #3 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _021E4128 ; =0x000927C0 - mov r2, #0x4f - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - lsl r2, r2, #2 - ldr r0, [r0, #0x20] - add r1, r4, #0 - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r7, #0x4f - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_021E3E1E: - mov r0, #0 - mov r2, #0 - str r0, [sp] - add r3, r2, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r4, r7 - sub r3, #0x20 - bl ov5_021DE62C - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _021E3E1E - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201A778 - mov r1, #2 - lsl r1, r1, #8 - str r0, [r4, r1] - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r0, [sp, #0x18] - ldr r1, [r4, r1] - ldr r0, [r0, #0x10] - mov r2, #3 - ldr r0, [r0, #8] - bl sub_0201A7E8 - mov r1, #0 - add r0, sp, #0x28 - strh r1, [r0] - mov r0, #3 - add r1, sp, #0x28 - mov r2, #2 - mov r3, #0x1e - bl sub_0201972C - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - bl sub_0201A9A4 - mov r0, #4 - bl ov5_021DE8F8 - mov r1, #0x81 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E41BC -_021E3EBC: - mov r1, #0x10 - ldr r3, [sp, #0x18] - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r3, #4 - bl ov5_021DDC44 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E41BC -_021E3EDC: - ldr r1, [sp, #0x18] - ldr r1, [r1, #4] - cmp r1, #0 - beq _021E3F04 - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - mov r0, #0x89 - mov r1, #0 - lsl r0, r0, #2 - strh r1, [r4, r0] - b _021E41BC -_021E3EF4: - mov r0, #0x89 - lsl r0, r0, #2 - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, r0] - ldrsh r1, [r4, r0] - cmp r1, #0 - ble _021E3F06 -_021E3F04: - b _021E41BC -_021E3F06: - sub r0, #0xa8 - mov r1, #0x1f - add r0, r4, r0 - mvn r1, r1 - mov r2, #0xe0 - mov r3, #5 - bl ov5_021DDD80 - mov r1, #2 - ldr r2, _021E412C ; =0xFFFE0000 - add r0, sp, #0x38 - lsl r1, r1, #0x12 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x6e - lsl r0, r0, #2 - ldr r2, _021E4130 ; =0x0000FFFF - add r0, r4, r0 - mov r1, #0 - mov r3, #5 - bl ov5_021DDD80 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021CF8 - mov r1, #0x7d - mov r3, #1 - lsl r1, r1, #2 - str r3, [r4, r1] - ldr r0, [sp, #0x18] - add r1, #0x30 - ldr r0, [r0, #0] - add r2, r0, #1 - ldr r0, [sp, #0x18] - str r2, [r0, #0] - strh r3, [r4, r1] - b _021E41BC -_021E3F70: - mov r0, #0x89 - lsl r0, r0, #2 - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, r0] - ldrsh r1, [r4, r0] - cmp r1, #0 - bgt _021E407C - sub r0, #0x94 - mov r1, #0x1f - add r0, r4, r0 - mvn r1, r1 - mov r2, #0xe0 - mov r3, #5 - bl ov5_021DDD80 - mov r1, #0xd - ldr r2, _021E412C ; =0xFFFE0000 - add r0, sp, #0x38 - lsl r1, r1, #0x10 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x73 - lsl r0, r0, #2 - ldr r2, _021E4134 ; =0xFFFF0001 - add r0, r4, r0 - mov r1, #0 - mov r3, #5 - bl ov5_021DDD80 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021CF8 - mov r1, #0x7e - mov r0, #1 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp, #0x18] - add r1, #0x2c - ldr r0, [r0, #0] - add r2, r0, #1 - ldr r0, [sp, #0x18] - str r2, [r0, #0] - mov r0, #3 - strh r0, [r4, r1] - b _021E41BC -_021E3FEC: - mov r0, #0x89 - lsl r0, r0, #2 - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, r0] - ldrsh r1, [r4, r0] - cmp r1, #0 - bgt _021E407C - sub r0, #0x80 - mov r1, #0x1f - add r0, r4, r0 - mvn r1, r1 - mov r2, #0xe0 - mov r3, #5 - bl ov5_021DDD80 - mov r1, #3 - ldr r2, _021E412C ; =0xFFFE0000 - add r0, sp, #0x38 - lsl r1, r1, #0x10 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x1e - lsl r0, r0, #4 - ldr r2, _021E4130 ; =0x0000FFFF - add r0, r4, r0 - mov r1, #0 - mov r3, #5 - bl ov5_021DDD80 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021CF8 - mov r0, #0x7f - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E41BC -_021E4062: - mov r1, #0x7d - lsl r1, r1, #2 - ldr r0, [r4, r1] - cmp r0, #0 - bne _021E407C - add r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _021E407C - add r1, #8 - ldr r0, [r4, r1] - cmp r0, #0 - beq _021E407E -_021E407C: - b _021E41BC -_021E407E: - mov r7, #0x17 - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #4 -_021E4086: - ldr r0, [r5, r7] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _021E4086 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E41BC -_021E40A2: - mov r0, #0xf - mov r1, #1 - str r0, [sp] - mov r0, #0x81 - lsl r0, r0, #2 - lsl r3, r1, #9 - ldr r0, [r4, r0] - ldr r3, [r4, r3] - add r2, r1, #0 - bl ov5_021DE948 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02020A90 - add r1, r0, #0 - mov r0, #0x40 - str r0, [sp] - mov r0, #0x83 - mov r2, #0xfa - lsl r0, r0, #2 - lsl r2, r2, #0xe - mov r3, #0xa - add r0, r4, r0 - sub r2, r1, r2 - lsl r3, r3, #0xc - bl ov5_021DDE14 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E41BC -_021E40E8: - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov5_021DE988 - add r5, r0, #0 - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - bl sub_0201A9A4 - mov r0, #0x83 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDE74 - mov r1, #0x83 - lsl r1, r1, #2 - ldr r0, [r4, r1] - sub r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02020A50 - cmp r5, #1 - bne _021E41BC - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E41BC - nop -_021E4128: .word 0x000927C0 -_021E412C: .word 0xFFFE0000 -_021E4130: .word 0x0000FFFF -_021E4134: .word 0xFFFF0001 -_021E4138: - mov r0, #0 - bl sub_0200F370 - ldr r0, [sp, #0x18] - ldr r1, [r0, #0x14] - cmp r1, #0 - beq _021E414A - mov r0, #1 - str r0, [r1, #0] -_021E414A: - mov r7, #0x17 - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #4 -_021E4152: - ldr r0, [r5, r7] - bl sub_02021BD4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #3 - blt _021E4152 - mov r1, #0x4f - lsl r1, r1, #2 - add r0, r4, #0 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - bl ov5_021DE4AC - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov5_021DE928 - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - bl sub_0201ACF4 - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - bl sub_0201A8FC - mov r0, #2 - lsl r0, r0, #8 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0201A928 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - ldr r0, [sp, #0x18] - mov r1, #3 - ldr r0, [r0, #0x10] - ldr r0, [r0, #8] - bl sub_02019EBC - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - bl ov5_021DDC28 -_021E41BC: - mov r1, #0x5f - mov r0, #0 - lsl r1, r1, #2 - str r0, [sp, #0x1c] - add r0, r4, r1 - add r1, #0x3c - add r5, r4, #0 - str r0, [sp, #0x20] - add r7, r4, r1 - add r6, r4, #0 -_021E41D0: - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _021E4238 - ldr r0, [sp, #0x20] - bl ov5_021DDD90 - str r0, [sp, #0x24] - add r0, r7, #0 - bl ov5_021DDD90 - ldr r0, [sp, #0x24] - cmp r0, #0 - beq _021E41F6 - mov r0, #0x7d - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_021E41F6: - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021D28 - add r3, r0, #0 - add r2, sp, #0x2c - ldmia r3!, {r0, r1} - mov ip, r2 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, ip - str r0, [r2, #0] - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r6, r0] - lsl r0, r0, #0xc - str r0, [sp, #0x30] - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021C50 - mov r1, #0x6e - lsl r1, r1, #2 - mov r0, #0x17 - ldr r1, [r6, r1] - lsl r0, r0, #4 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 -_021E4238: - ldr r0, [sp, #0x20] - add r5, r5, #4 - add r0, #0x14 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r7, #0x14 - add r0, r0, #1 - add r6, #0x14 - str r0, [sp, #0x1c] - cmp r0, #3 - blt _021E41D0 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - cmp r0, #9 - beq _021E425C - ldr r0, [r4, #0] - bl sub_020219F8 -_021E425C: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021E3D8C - - thumb_func_start ov5_021E4260 -ov5_021E4260: ; 0x021E4260 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #7 - bls _021E4272 - b _021E44A0 -_021E4272: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E427E: ; jump table - .short _021E428E - _021E427E - 2 ; case 0 - .short _021E431E - _021E427E - 2 ; case 1 - .short _021E4338 - _021E427E - 2 ; case 2 - .short _021E4344 - _021E427E - 2 ; case 3 - .short _021E4376 - _021E427E - 2 ; case 4 - .short _021E43A8 - _021E427E - 2 ; case 5 - .short _021E4418 - _021E427E - 2 ; case 6 - .short _021E445C - _021E427E - 2 ; case 7 -_021E428E: - mov r1, #0x69 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x69 - str r0, [r4, #0xc] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r5, [r4, #0xc] - mov r1, #1 - add r0, r5, #0 - add r0, #0x2c - add r2, r1, #0 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #7 - str r0, [sp, #8] - mov r0, #6 - str r0, [sp, #0xc] - ldr r0, _021E44B0 ; =0x000927C0 - mov r2, #0x5a - str r0, [sp, #0x10] - add r1, r5, #0 - lsl r2, r2, #2 - ldr r0, [r4, #0x20] - add r1, #0x2c - add r2, r5, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r0, #0 - str r0, [sp] - mov r1, #0x5a - str r0, [sp, #4] - add r0, r5, #0 - lsl r1, r1, #2 - mov r2, #2 - mov r3, #6 - add r0, #0x2c - add r1, r5, r1 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov5_021DE62C - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021FE0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E431E: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E4338: - ldr r1, [r4, #4] - cmp r1, #0 - beq _021E438E - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E4344: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x10 - mov r3, #0xc - bl ov5_021DDD80 - ldr r3, [r5, #0] - mov r0, #0x10 - sub r0, r0, r3 - str r0, [sp] - ldr r0, _021E44B4 ; =0x04000050 - mov r1, #0 - mov r2, #0xf - bl sub_020BF55C - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E4376: - add r0, r5, #0 - bl ov5_021DDD90 - ldr r2, [r5, #0] - mov r1, #0x10 - sub r1, r1, r2 - lsl r1, r1, #8 - orr r1, r2 - ldr r2, _021E44B8 ; =0x04000052 - cmp r0, #1 - strh r1, [r2] - beq _021E4390 -_021E438E: - b _021E44A0 -_021E4390: - mov r1, #0 - sub r0, r2, #2 - strh r1, [r0] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021FE0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E43A8: - mov r0, #6 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - ldr r2, _021E44BC ; =0x0000019A - add r0, #0x14 - lsl r1, r1, #0xc - mov r3, #1 - bl ov5_021DDE14 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02021CF8 - ldr r1, [r5, #0x14] - add r0, sp, #0x20 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - add r6, sp, #0x20 - add r3, sp, #0x38 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021C70 - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x10 - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E4418: - add r0, r5, #0 - add r0, #0x14 - bl ov5_021DDE74 - ldr r1, [r5, #0x14] - add r6, r0, #0 - add r0, sp, #0x14 - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - add r3, sp, #0x14 - add r2, sp, #0x2c - ldmia r3!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r7, #0 - str r0, [r2, #0] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021C70 - cmp r6, #1 - bne _021E44A0 - bl sub_0200F2AC - cmp r0, #1 - bne _021E44A0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021E44A0 -_021E445C: - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r0, [r4, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E4478 - mov r0, #1 - str r0, [r1, #0] -_021E4478: - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021BD4 - mov r1, #0x5a - add r0, r5, #0 - lsl r1, r1, #2 - add r0, #0x2c - add r1, r5, r1 - bl ov5_021DE5A4 - add r0, r5, #0 - add r0, #0x2c - bl ov5_021DE4AC - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 -_021E44A0: - ldr r0, [r4, #0] - cmp r0, #7 - beq _021E44AC - ldr r0, [r5, #0x2c] - bl sub_020219F8 -_021E44AC: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E44B0: .word 0x000927C0 -_021E44B4: .word 0x04000050 -_021E44B8: .word 0x04000052 -_021E44BC: .word 0x0000019A - thumb_func_end ov5_021E4260 - - thumb_func_start ov5_021E44C0 -ov5_021E44C0: ; 0x021E44C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r6, r1, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0] - ldr r4, [r6, #0xc] - cmp r0, #7 - bhi _021E4598 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E44DC: ; jump table - .short _021E44EC - _021E44DC - 2 ; case 0 - .short _021E4578 - _021E44DC - 2 ; case 1 - .short _021E4592 - _021E44DC - 2 ; case 2 - .short _021E45A0 - _021E44DC - 2 ; case 3 - .short _021E45EA - _021E44DC - 2 ; case 4 - .short _021E469C - _021E44DC - 2 ; case 5 - .short _021E46C6 - _021E44DC - 2 ; case 6 - .short _021E46D6 - _021E44DC - 2 ; case 7 -_021E44EC: - mov r1, #0x1b - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x1b - str r0, [r6, #0xc] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r4, [r6, #0xc] - mov r1, #4 - add r0, r4, #0 - mov r2, #1 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _021E4734 ; =0x000927C0 - mov r2, #0x4f - str r0, [sp, #0x10] - lsl r2, r2, #2 - ldr r0, [r6, #0x20] - add r1, r4, #0 - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r7, #0 - add r5, r4, #0 -_021E4536: - mov r0, #0 - mov r1, #0x4f - str r0, [sp] - lsl r1, r1, #2 - mov r2, #2 - mov r3, #6 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r4, r1 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov5_021DE62C - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #4 - blt _021E4536 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E4578: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r6, #4 - bl ov5_021DDC44 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E4592: - ldr r1, [r6, #4] - cmp r1, #0 - bne _021E459A -_021E4598: - b _021E4722 -_021E459A: - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E45A0: - mov r3, #6 - mov r2, #4 - lsl r3, r3, #6 - str r2, [sp] - add r0, r4, r3 - mov r1, #0 - lsl r2, r2, #0x11 - add r3, #0x1a - bl ov5_021DDE14 - mov r3, #0x66 - mov r0, #4 - mov r2, #0xa - lsl r3, r3, #2 - str r0, [sp] - add r0, r4, r3 - mov r1, #0 - lsl r2, r2, #0x10 - add r3, r3, #2 - bl ov5_021DDE14 - mov r7, #0 - add r5, r4, #0 -_021E45CE: - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CAC - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #4 - blt _021E45CE - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E45EA: - mov r0, #6 - lsl r0, r0, #6 - mov r7, #0 - add r5, r4, r0 -_021E45F2: - add r0, r5, #0 - bl ov5_021DDE74 - add r7, r7, #1 - add r5, #0x18 - str r0, [sp, #0x18] - cmp r7, #2 - blt _021E45F2 - mov r2, #6 - lsl r2, r2, #6 - ldr r3, [r4, r2] - mov r1, #2 - lsl r2, r2, #0xa - sub r2, r2, r3 - add r0, sp, #0x1c - lsl r1, r1, #0x12 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x1c - bl sub_02021C50 - mov r2, #6 - lsl r2, r2, #6 - ldr r3, [r4, r2] - mov r1, #2 - lsl r2, r2, #0xa - add r2, r3, r2 - add r0, sp, #0x1c - lsl r1, r1, #0x12 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x1c - bl sub_02021C50 - mov r1, #0x66 - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r1, #2 - lsl r1, r1, #0x12 - sub r1, r1, r2 - mov r2, #6 - add r0, sp, #0x1c - lsl r2, r2, #0x10 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x1c - bl sub_02021C50 - mov r1, #0x66 - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r1, #2 - lsl r1, r1, #0x12 - add r1, r2, r1 - mov r2, #6 - add r0, sp, #0x1c - lsl r2, r2, #0x10 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x1c - bl sub_02021C50 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _021E4722 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E469C: - ldr r0, [r6, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x22 - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E46C6: - bl sub_0200F2AC - cmp r0, #1 - bne _021E4722 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E4722 -_021E46D6: - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r0, [r6, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r1, [r6, #0x14] - cmp r1, #0 - beq _021E46F2 - mov r0, #1 - str r0, [r1, #0] -_021E46F2: - mov r7, #0 - add r5, r4, #0 -_021E46F6: - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021BD4 - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #4 - blt _021E46F6 - mov r1, #0x4f - lsl r1, r1, #2 - add r0, r4, #0 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - bl ov5_021DE4AC - ldr r1, [sp, #0x14] - add r0, r6, #0 - bl ov5_021DDC28 -_021E4722: - ldr r0, [r6, #0] - cmp r0, #7 - beq _021E472E - ldr r0, [r4, #0] - bl sub_020219F8 -_021E472E: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E4734: .word 0x000927C0 - thumb_func_end ov5_021E44C0 - - thumb_func_start ov5_021E4738 -ov5_021E4738: ; 0x021E4738 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - str r0, [sp, #0x14] - add r0, r1, #0 - ldr r0, [r0, #0] - str r1, [sp, #0x18] - ldr r4, [r1, #0xc] - cmp r0, #7 - bls _021E474C - b _021E4A4C -_021E474C: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E4758: ; jump table - .short _021E4768 - _021E4758 - 2 ; case 0 - .short _021E47FA - _021E4758 - 2 ; case 1 - .short _021E481A - _021E4758 - 2 ; case 2 - .short _021E483E - _021E4758 - 2 ; case 3 - .short _021E497C - _021E4758 - 2 ; case 4 - .short _021E498E - _021E4758 - 2 ; case 5 - .short _021E49BE - _021E4758 - 2 ; case 6 - .short _021E49FC - _021E4758 - 2 ; case 7 -_021E4768: - mov r1, #0x3d - mov r0, #4 - lsl r1, r1, #4 - bl sub_02018144 - ldr r1, [sp, #0x18] - mov r2, #0x3d - str r0, [r1, #0xc] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r0, [sp, #0x18] - mov r1, #6 - ldr r4, [r0, #0xc] - mov r2, #1 - add r0, r4, #0 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldr r0, _021E49D4 ; =0x000927C0 - mov r2, #0x4f - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - lsl r2, r2, #2 - ldr r0, [r0, #0x20] - add r1, r4, #0 - add r2, r4, r2 - mov r3, #0 - bl ov5_021DE4CC - mov r7, #0x4f - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_021E47BC: - mov r0, #0 - str r0, [sp] - mov r2, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r4, r7 - add r3, r2, #0 - bl ov5_021DE62C - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #6 - blt _021E47BC - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E4A4C -_021E47FA: - mov r0, #2 - str r0, [sp] - mov r0, #1 - add r1, r0, #0 - ldr r3, [sp, #0x18] - sub r1, #0x11 - add r2, r1, #0 - add r3, r3, #4 - bl ov5_021DDC44 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E4A4C -_021E481A: - ldr r1, [sp, #0x18] - ldr r1, [r1, #4] - cmp r1, #0 - beq _021E484E - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - mov r0, #0xf2 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r1, [r4, r0] - add r0, r0, #4 - lsl r2, r1, #5 - ldr r1, _021E49D8 ; =0x021F9EAC - ldr r1, [r1, r2] - str r1, [r4, r0] - b _021E4A4C -_021E483E: - mov r0, #0xf3 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0 - blt _021E4850 -_021E484E: - b _021E4A4C -_021E4850: - sub r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #8 - str r1, [sp] - mov r1, #0x86 - lsl r1, r1, #2 - add r2, r4, r1 - mov r1, #0x18 - mul r1, r0 - lsl r3, r0, #5 - add r0, r2, r1 - ldr r1, _021E49DC ; =0x021F9E94 - ldr r2, _021E49E0 ; =0x021F9E98 - ldr r5, _021E49E4 ; =0x021F9E9C - ldr r1, [r1, r3] - ldr r2, [r2, r3] - ldr r3, [r5, r3] - bl ov5_021DDE14 - mov r0, #0xf2 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #8 - str r1, [sp] - mov r1, #0xaa - lsl r1, r1, #2 - add r2, r4, r1 - mov r1, #0x18 - mul r1, r0 - lsl r3, r0, #5 - add r0, r2, r1 - ldr r1, _021E49E8 ; =0x021F9EA0 - ldr r2, _021E49EC ; =0x021F9EA4 - ldr r5, _021E49F0 ; =0x021F9EA8 - ldr r1, [r1, r3] - ldr r2, [r2, r3] - ldr r3, [r5, r3] - bl ov5_021DDE14 - mov r0, #0x62 - lsl r0, r0, #2 - mov r1, #8 - add r3, r4, r0 - mov r0, #0xf2 - str r1, [sp] - lsl r0, r0, #2 - ldr r2, [r4, r0] - mov r0, #0x18 - mul r0, r2 - add r0, r3, r0 - ldr r3, _021E49F4 ; =0xFFFFF99A - lsl r1, r1, #0xa - mov r2, #0x29 - bl ov5_021DDE14 - mov r0, #0xf2 - lsl r0, r0, #2 - ldr r2, [r4, r0] - sub r0, #0x90 - add r1, r4, r0 - mov r0, #0x14 - mul r0, r2 - lsl r3, r2, #5 - ldr r2, _021E49F8 ; =0x021F9EB0 - add r0, r1, r0 - ldr r2, [r2, r3] - mov r1, #0 - mov r3, #8 - bl ov5_021DDD80 - mov r0, #0xf2 - lsl r0, r0, #2 - ldr r0, [r4, r0] - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0xf2 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, _021E49DC ; =0x021F9E94 - lsl r3, r0, #5 - ldr r2, _021E49E8 ; =0x021F9EA0 - ldr r1, [r1, r3] - ldr r2, [r2, r3] - add r0, sp, #0x40 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0xf2 - lsl r0, r0, #2 - ldr r0, [r4, r0] - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #0x40 - bl sub_02021C50 - mov r1, #2 - lsl r1, r1, #0xc - add r0, sp, #0x34 - add r2, r1, #0 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0xf2 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #2 - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, sp, #0x34 - bl sub_02021C80 - mov r1, #0xf2 - lsl r1, r1, #2 - ldr r0, [r4, r1] - mov r3, #1 - lsl r0, r0, #2 - add r2, r4, r0 - add r0, r1, #0 - sub r0, #0x18 - str r3, [r2, r0] - ldr r0, [r4, r1] - add r0, r0, #1 - str r0, [r4, r1] - ldr r0, [r4, r1] - cmp r0, #6 - blt _021E4970 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E4A4C -_021E4970: - lsl r2, r0, #5 - ldr r0, _021E49D8 ; =0x021F9EAC - ldr r2, [r0, r2] - add r0, r1, #4 - str r2, [r4, r0] - b _021E4A4C -_021E497C: - mov r1, #0xf1 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - bne _021E4A4C - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E4A4C -_021E498E: - ldr r0, [sp, #0x18] - ldr r0, [r0, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3FC - mov r0, #0xc - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r2, #0 - str r0, [sp, #8] - mov r0, #3 - mov r1, #0x22 - add r3, r2, #0 - bl sub_0200F174 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E4A4C -_021E49BE: - bl sub_0200F2AC - cmp r0, #0 - beq _021E4A4C - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [r0, #0] - b _021E4A4C - nop -_021E49D4: .word 0x000927C0 -_021E49D8: .word 0x021F9EAC -_021E49DC: .word 0x021F9E94 -_021E49E0: .word 0x021F9E98 -_021E49E4: .word 0x021F9E9C -_021E49E8: .word 0x021F9EA0 -_021E49EC: .word 0x021F9EA4 -_021E49F0: .word 0x021F9EA8 -_021E49F4: .word 0xFFFFF99A -_021E49F8: .word 0x021F9EB0 -_021E49FC: - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0x10] - ldr r0, [r0, #4] - ldr r0, [r0, #0x1c] - bl ov5_021EF3DC - ldr r0, [sp, #0x18] - ldr r1, [r0, #0x14] - cmp r1, #0 - beq _021E4A1C - mov r0, #1 - str r0, [r1, #0] -_021E4A1C: - mov r7, #0x17 - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #4 -_021E4A24: - ldr r0, [r5, r7] - bl sub_02021BD4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #6 - blt _021E4A24 - mov r1, #0x4f - lsl r1, r1, #2 - add r0, r4, #0 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - bl ov5_021DE4AC - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - bl ov5_021DDC28 -_021E4A4C: - mov r1, #0x86 - mov r0, #0 - lsl r1, r1, #2 - str r0, [sp, #0x1c] - add r0, r4, r1 - str r0, [sp, #0x2c] - add r0, r1, #0 - add r0, #0x90 - add r0, r4, r0 - sub r1, #0x90 - str r0, [sp, #0x28] - add r0, r4, r1 - str r0, [sp, #0x24] - mov r0, #0xce - lsl r0, r0, #2 - add r0, r4, r0 - add r5, r4, #0 - str r0, [sp, #0x20] - add r6, r4, #0 - add r7, r4, #0 -_021E4A74: - mov r0, #0x3b - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #1 - bne _021E4B00 - ldr r0, [sp, #0x2c] - bl ov5_021DDE74 - str r0, [sp, #0x30] - ldr r0, [sp, #0x28] - bl ov5_021DDE74 - ldr r0, [sp, #0x24] - bl ov5_021DDE74 - ldr r0, [sp, #0x20] - bl ov5_021DDD90 - ldr r0, [sp, #0x30] - cmp r0, #0 - beq _021E4AB0 - mov r0, #0x3b - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02021CAC -_021E4AB0: - mov r1, #0x86 - mov r2, #0xaa - lsl r1, r1, #2 - lsl r2, r2, #2 - ldr r1, [r6, r1] - ldr r2, [r6, r2] - add r0, sp, #0x40 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, sp, #0x40 - bl sub_02021C50 - mov r0, #0x62 - lsl r0, r0, #2 - ldr r1, [r6, r0] - add r0, sp, #0x34 - add r2, r1, #0 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, sp, #0x34 - bl sub_02021C70 - mov r1, #0xce - lsl r1, r1, #2 - mov r0, #0x17 - ldr r1, [r7, r1] - lsl r0, r0, #4 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 -_021E4B00: - ldr r0, [sp, #0x2c] - add r5, r5, #4 - add r0, #0x18 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - add r6, #0x18 - add r0, #0x18 - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - add r7, #0x14 - add r0, #0x18 - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - add r0, #0x14 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #6 - blt _021E4A74 - ldr r0, [sp, #0x18] - ldr r0, [r0, #0] - cmp r0, #7 - beq _021E4B36 - ldr r0, [r4, #0] - bl sub_020219F8 -_021E4B36: - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E4738 - - thumb_func_start ov5_021E4B3C -ov5_021E4B3C: ; 0x021E4B3C - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - ldr r4, [r5, #0xc] - cmp r0, #7 - bls _021E4B4E - b _021E4DC0 -_021E4B4E: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E4B5A: ; jump table - .short _021E4B6A - _021E4B5A - 2 ; case 0 - .short _021E4C50 - _021E4B5A - 2 ; case 1 - .short _021E4C6A - _021E4B5A - 2 ; case 2 - .short _021E4C78 - _021E4B5A - 2 ; case 3 - .short _021E4CB2 - _021E4B5A - 2 ; case 4 - .short _021E4CF0 - _021E4B5A - 2 ; case 5 - .short _021E4D22 - _021E4B5A - 2 ; case 6 - .short _021E4D52 - _021E4B5A - 2 ; case 7 -_021E4B6A: - mov r1, #0x6f - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x6f - str r0, [r5, #0xc] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r4, [r5, #0xc] - mov r1, #1 - add r0, r4, #0 - add r0, #8 - add r2, r1, #0 - bl ov5_021DE47C - mov r3, #1 - mov r2, #0x51 - add r1, r4, #0 - lsl r2, r2, #2 - str r3, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #9 - str r0, [sp, #0xc] - ldr r0, _021E4DD0 ; =0x000927C0 - add r1, #8 - str r0, [sp, #0x10] - ldr r0, [r5, #0x20] - add r2, r4, r2 - bl ov5_021DE4CC - mov r0, #0 - str r0, [sp] - mov r1, #0x51 - str r0, [sp, #4] - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #2 - mov r3, #6 - add r0, #8 - add r1, r4, r1 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov5_021DE62C - mov r1, #0x5e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021FE0 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021E80 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - bl ov5_021DEBEC - str r0, [r4, #4] - mov r0, #4 - mov r1, #1 - bl sub_0201A778 - str r0, [r4, #0] - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - str r3, [sp, #0xc] - str r3, [sp, #0x10] - ldr r0, [r5, #0x10] - ldr r1, [r4, #0] - ldr r0, [r0, #8] - mov r2, #3 - bl sub_0201A7E8 - mov r1, #0 - add r0, sp, #0x14 - strh r1, [r0] - mov r0, #3 - add r1, sp, #0x14 - mov r2, #2 - mov r3, #0x1e - bl sub_0201972C - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r4, #0] - bl sub_0201A9A4 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E4DC0 -_021E4C50: - mov r1, #0x10 - mov r0, #2 - add r2, r1, #0 - str r0, [sp] - mov r0, #1 - sub r2, #0x20 - add r3, r5, #4 - bl ov5_021DDC44 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E4DC0 -_021E4C6A: - ldr r1, [r5, #4] - cmp r1, #0 - bne _021E4C72 - b _021E4DC0 -_021E4C72: - add r0, r0, #1 - str r0, [r5, #0] - b _021E4DC0 -_021E4C78: - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #0 - mov r2, #0x10 - mov r3, #0xf - bl ov5_021DDD80 - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x19 - lsl r0, r0, #4 - ldr r3, [r4, r0] - mov r0, #0x10 - sub r0, r0, r3 - str r0, [sp] - ldr r0, _021E4DD4 ; =0x04000050 - mov r1, #0 - mov r2, #0xf - bl sub_020BF55C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E4DC0 -_021E4CB2: - mov r0, #0x19 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov5_021DDD90 - mov r2, #0x19 - lsl r2, r2, #4 - ldr r1, [r4, r2] - mov r3, #0x10 - sub r3, r3, r1 - lsl r3, r3, #8 - orr r1, r3 - ldr r3, _021E4DD8 ; =0x04000052 - cmp r0, #1 - strh r1, [r3] - bne _021E4DC0 - mov r1, #0 - sub r0, r3, #2 - sub r2, #0x18 - strh r1, [r0] - ldr r0, [r4, r2] - bl sub_02021FE0 - ldr r0, [r5, #0] - mov r1, #0x10 - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0x6e - lsl r0, r0, #2 - str r1, [r4, r0] - b _021E4DC0 -_021E4CF0: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0 - bgt _021E4DC0 - sub r0, #0x3c - add r0, r4, r0 - mov r1, #0 - mov r2, #0xe - mov r3, #0x10 - bl ov5_021DDD80 - ldr r0, [r4, #4] - ldr r2, [r4, #0] - mov r1, #0x10 - mov r3, #0xf - bl ov5_021DEC38 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E4DC0 -_021E4D22: - mov r0, #0x5f - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021DDD90 - mov r0, #0x5f - lsl r0, r0, #2 - ldr r1, [r4, r0] - lsl r0, r1, #4 - orr r1, r0 - ldr r0, _021E4DDC ; =0x0400004D - strb r1, [r0] - ldr r0, [r4, #4] - bl ov5_021DECB8 - cmp r0, #0 - beq _021E4D4A - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] -_021E4D4A: - ldr r0, [r4, #0] - bl sub_0201A9A4 - b _021E4DC0 -_021E4D52: - mov r0, #0 - bl sub_0200F370 - ldr r0, [r4, #4] - bl ov5_021DEC18 - ldr r1, [r5, #0x14] - cmp r1, #0 - beq _021E4D68 - mov r0, #1 - str r0, [r1, #0] -_021E4D68: - mov r0, #0x5e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021BD4 - mov r1, #0x51 - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #8 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - add r0, #8 - bl ov5_021DE4AC - ldr r0, [r4, #0] - bl sub_0201ACF4 - ldr r0, [r4, #0] - bl sub_0201A8FC - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0201A928 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - ldr r0, [r5, #0x10] - mov r1, #3 - ldr r0, [r0, #8] - bl sub_02019EBC - ldr r0, _021E4DDC ; =0x0400004D - mov r1, #0 - strb r1, [r0] - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021DDC28 -_021E4DC0: - ldr r0, [r5, #0] - cmp r0, #7 - beq _021E4DCC - ldr r0, [r4, #8] - bl sub_020219F8 -_021E4DCC: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E4DD0: .word 0x000927C0 -_021E4DD4: .word 0x04000050 -_021E4DD8: .word 0x04000052 -_021E4DDC: .word 0x0400004D - thumb_func_end ov5_021E4B3C - - thumb_func_start ov5_021E4DE0 -ov5_021E4DE0: ; 0x021E4DE0 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #8] - ldr r1, [r5, #0x24] - bl sub_02020910 - ldr r0, [r4, #0] - ldr r1, [r5, #0x24] - bl sub_02020A50 - ldrh r1, [r4, #4] - add r0, sp, #0 - strh r1, [r0] - ldrh r1, [r4, #6] - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - ldr r1, [r5, #0x24] - add r0, sp, #0 - bl sub_020209D4 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E4DE0 - - thumb_func_start ov5_021E4E14 -ov5_021E4E14: ; 0x021E4E14 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #7 - bls _021E4E26 - b _021E4F66 -_021E4E26: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E4E32: ; jump table - .short _021E4E42 - _021E4E32 - 2 ; case 0 - .short _021E4E7A - _021E4E32 - 2 ; case 1 - .short _021E4E92 - _021E4E32 - 2 ; case 2 - .short _021E4EA0 - _021E4E32 - 2 ; case 3 - .short _021E4EC4 - _021E4E32 - 2 ; case 4 - .short _021E4F00 - _021E4E32 - 2 ; case 5 - .short _021E4F22 - _021E4E32 - 2 ; case 6 - .short _021E4F38 - _021E4E32 - 2 ; case 7 -_021E4E42: - mov r0, #4 - mov r1, #0x10 - bl sub_02018144 - str r0, [r4, #0xc] - mov r2, #0x10 - mov r1, #0 -_021E4E50: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _021E4E50 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4E7A: - mov r0, #1 - mov r1, #0x10 - str r0, [sp] - add r2, r1, #0 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4E92: - ldr r1, [r4, #4] - cmp r1, #0 - beq _021E4F66 - add r0, r0, #1 - add sp, #0xc - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4EA0: - mov r0, #3 - mov r1, #0xf - bl ov5_021E22B0 - mov r2, #0 - str r0, [r5, #0] - mov r0, #0xc - add r1, r2, #0 - mul r1, r0 - ldr r0, _021E4F6C ; =0x021F9DDE - str r2, [r5, #8] - ldrh r0, [r0, r1] - add sp, #0xc - str r0, [r5, #0xc] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4EC4: - ldr r0, [r5, #0xc] - sub r0, r0, #1 - str r0, [r5, #0xc] - bpl _021E4F66 - ldr r2, [r5, #8] - mov r1, #0xc - ldr r3, _021E4F70 ; =0x021F9DD4 - mul r1, r2 - ldr r0, [r4, #0x10] - add r1, r3, r1 - bl ov5_021E4DE0 - ldr r0, [r5, #8] - add r2, r0, #1 - str r2, [r5, #8] - cmp r2, #0x10 - blo _021E4EF0 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4EF0: - mov r0, #0xc - add r1, r2, #0 - mul r1, r0 - ldr r0, _021E4F6C ; =0x021F9DDE - add sp, #0xc - ldrh r0, [r0, r1] - str r0, [r5, #0xc] - pop {r3, r4, r5, r6, pc} -_021E4F00: - mov r0, #0xa - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0 - str r0, [sp, #8] - ldr r3, _021E4F74 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4F22: - bl sub_0200F2AC - cmp r0, #0 - beq _021E4F66 - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4F38: - ldr r1, _021E4F74 ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 - add r0, r5, #0 - bl ov5_021E2310 - ldr r0, _021E4F78 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E4F56 - mov r0, #1 - str r0, [r1, #0] -_021E4F56: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 - ldr r1, _021E4F74 ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 -_021E4F66: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021E4F6C: .word 0x021F9DDE -_021E4F70: .word 0x021F9DD4 -_021E4F74: .word 0x00007FFF -_021E4F78: .word 0x04000050 - thumb_func_end ov5_021E4E14 - - thumb_func_start ov5_021E4F7C -ov5_021E4F7C: ; 0x021E4F7C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #9 - bhi _021E4FFE - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E4F98: ; jump table - .short _021E4FAC - _021E4F98 - 2 ; case 0 - .short _021E4FE0 - _021E4F98 - 2 ; case 1 - .short _021E4FF8 - _021E4F98 - 2 ; case 2 - .short _021E5008 - _021E4F98 - 2 ; case 3 - .short _021E5036 - _021E4F98 - 2 ; case 4 - .short _021E5060 - _021E4F98 - 2 ; case 5 - .short _021E508E - _021E4F98 - 2 ; case 6 - .short _021E50B0 - _021E4F98 - 2 ; case 7 - .short _021E50D2 - _021E4F98 - 2 ; case 8 - .short _021E50E8 - _021E4F98 - 2 ; case 9 -_021E4FAC: - mov r0, #4 - mov r1, #0x38 - bl sub_02018144 - mov r1, #0 - mov r2, #0x38 - str r0, [r4, #0xc] - bl sub_020D5124 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4FE0: - mov r0, #1 - mov r1, #0x10 - str r0, [sp] - add r2, r1, #0 - add r3, r4, #4 - bl ov5_021DDC44 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E4FF8: - ldr r1, [r4, #4] - cmp r1, #0 - bne _021E5000 -_021E4FFE: - b _021E5116 -_021E5000: - add r0, r0, #1 - add sp, #0xc - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E5008: - mov r0, #5 - mov r1, #0xd - bl ov5_021E22B0 - str r0, [r5, #0] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - bl sub_02020A88 - mov r2, #1 - add r1, r0, #0 - add r5, #8 - lsl r2, r2, #8 - add r0, r5, #0 - add r2, r1, r2 - mov r3, #0x28 - bl ov5_021DDD80 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E5036: - add r0, r5, #0 - add r0, #8 - bl ov5_021DDD90 - add r6, r0, #0 - ldr r0, [r5, #8] - ldr r1, [r4, #0x10] - lsl r0, r0, #0x10 - ldr r1, [r1, #0x24] - lsr r0, r0, #0x10 - bl sub_02020910 - cmp r6, #1 - bne _021E5116 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #5 - str r0, [r5, #0x34] - pop {r3, r4, r5, r6, pc} -_021E5060: - ldr r0, [r5, #0x34] - sub r0, r0, #1 - str r0, [r5, #0x34] - bpl _021E5116 - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x24] - bl sub_02020A90 - mov r3, #8 - str r3, [sp] - ldr r2, _021E511C ; =0x0092E000 - add r1, r0, #0 - add r5, #0x1c - add r0, r5, #0 - sub r2, r1, r2 - lsl r3, r3, #8 - bl ov5_021DDE14 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E508E: - add r0, r5, #0 - add r0, #0x1c - bl ov5_021DDE74 - ldr r1, [r4, #0x10] - add r6, r0, #0 - ldr r0, [r5, #0x1c] - ldr r1, [r1, #0x24] - bl sub_02020A50 - cmp r6, #1 - bne _021E5116 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E50B0: - mov r0, #0x3c - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0 - str r0, [sp, #8] - ldr r3, _021E5120 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E50D2: - bl sub_0200F2AC - cmp r0, #0 - beq _021E5116 - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #0] - add sp, #0xc - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021E50E8: - ldr r1, _021E5120 ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 - add r0, r5, #0 - bl ov5_021E2310 - ldr r0, _021E5124 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r1, [r4, #0x14] - cmp r1, #0 - beq _021E5106 - mov r0, #1 - str r0, [r1, #0] -_021E5106: - add r0, r4, #0 - add r1, r6, #0 - bl ov5_021DDC28 - ldr r1, _021E5120 ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 -_021E5116: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021E511C: .word 0x0092E000 -_021E5120: .word 0x00007FFF -_021E5124: .word 0x04000050 - thumb_func_end ov5_021E4F7C - - thumb_func_start ov5_021E5128 -ov5_021E5128: ; 0x021E5128 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r6, #0 - strh r6, [r5] - add r4, r5, #0 - ldr r7, [sp, #0x28] - str r1, [sp, #8] - str r2, [sp, #0xc] - str r3, [sp, #0x10] - strh r6, [r5, #2] - add r4, #0x14 -_021E5140: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r3, r7, #0 - bl ov5_021DE62C - mov r1, #0 - str r0, [r5, #4] - bl sub_02021CAC - cmp r6, #3 - beq _021E517E - ldr r0, [r5, #4] - mov r1, #2 - bl sub_02021CF8 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021D6C - mov r1, #2 - lsl r1, r1, #0xc - add r0, r4, #0 - lsr r2, r1, #1 - mov r3, #6 - bl ov5_021DDDBC - b _021E518C -_021E517E: - mov r1, #1 - lsl r1, r1, #0xc - add r0, r4, #0 - add r2, r1, #0 - mov r3, #6 - bl ov5_021DDDBC -_021E518C: - add r6, r6, #1 - add r5, r5, #4 - add r4, #0x14 - cmp r6, #4 - blt _021E5140 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E5128 - - thumb_func_start ov5_021E519C -ov5_021E519C: ; 0x021E519C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021E51A2: - ldr r0, [r5, #4] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021E51A2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E519C - - thumb_func_start ov5_021E51B4 -ov5_021E51B4: ; 0x021E51B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - mov r0, #1 - mov r1, #2 - str r0, [sp] - ldrsh r0, [r7, r1] - cmp r0, #4 - bge _021E51E2 - mov r0, #0 - str r0, [sp] - ldrsh r0, [r7, r0] - sub r0, r0, #1 - strh r0, [r7] - ldr r0, [sp] - ldrsh r0, [r7, r0] - cmp r0, #0 - bgt _021E51E2 - mov r0, #3 - strh r0, [r7] - ldrsh r0, [r7, r1] - add r0, r0, #1 - strh r0, [r7, #2] -_021E51E2: - mov r0, #0 - str r0, [sp, #4] - mov r0, #2 - ldrsh r0, [r7, r0] - cmp r0, #0 - ble _021E523A - add r6, r7, #0 - add r6, #0x14 - add r4, r7, #0 - add r5, r7, #0 -_021E51F6: - add r0, r6, #0 - bl ov5_021DDDCC - ldr r1, [r4, #0x14] - str r0, [sp, #8] - add r0, sp, #0xc - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DE660 - ldr r0, [r5, #4] - add r1, sp, #0xc - bl sub_02021C70 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021CAC - ldr r0, [sp, #8] - cmp r0, #0 - bne _021E5224 - mov r0, #0 - str r0, [sp] -_021E5224: - ldr r0, [sp, #4] - add r6, #0x14 - add r0, r0, #1 - str r0, [sp, #4] - mov r0, #2 - ldrsh r1, [r7, r0] - ldr r0, [sp, #4] - add r4, #0x14 - add r5, r5, #4 - cmp r0, r1 - blt _021E51F6 -_021E523A: - ldr r0, [sp] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E51B4 - - thumb_func_start ov5_021E5240 -ov5_021E5240: ; 0x021E5240 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - str r0, [sp] - ldr r2, _021E52A4 ; =0x00000167 - mov r0, #1 - mov r1, #0x1a - add r3, r5, #0 - bl sub_0200B144 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0200B358 - add r4, r0, #0 - mov r0, #0x80 - add r1, r5, #0 - bl sub_02023790 - add r7, r0, #0 - mov r0, #0x80 - add r1, r5, #0 - bl sub_02023790 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_0200B1B8 - ldr r2, [sp] - add r0, r4, #0 - mov r1, #0 - bl sub_0200BA08 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_0200B190 - add r0, r4, #0 - bl sub_0200B3F0 - add r0, r5, #0 - bl sub_020237BC - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E52A4: .word 0x00000167 - thumb_func_end ov5_021E5240 - - thumb_func_start ov5_021E52A8 -ov5_021E52A8: ; 0x021E52A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r7, r1, #0 - ldr r1, [r5, #0] - add r6, r2, #0 - ldr r4, [r5, #0xc] - cmp r1, #0xf - bls _021E52BC - b _021E5718 -_021E52BC: - add r2, r1, r1 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021E52C8: ; jump table - .short _021E52E8 - _021E52C8 - 2 ; case 0 - .short _021E5434 - _021E52C8 - 2 ; case 1 - .short _021E544A - _021E52C8 - 2 ; case 2 - .short _021E5456 - _021E52C8 - 2 ; case 3 - .short _021E54A4 - _021E52C8 - 2 ; case 4 - .short _021E54C4 - _021E52C8 - 2 ; case 5 - .short _021E54F2 - _021E52C8 - 2 ; case 6 - .short _021E553E - _021E52C8 - 2 ; case 7 - .short _021E556C - _021E52C8 - 2 ; case 8 - .short _021E558A - _021E52C8 - 2 ; case 9 - .short _021E55FE - _021E52C8 - 2 ; case 10 - .short _021E5614 - _021E52C8 - 2 ; case 11 - .short _021E563A - _021E52C8 - 2 ; case 12 - .short _021E5652 - _021E52C8 - 2 ; case 13 - .short _021E5672 - _021E52C8 - 2 ; case 14 - .short _021E5682 - _021E52C8 - 2 ; case 15 -_021E52E8: - mov r1, #0xa6 - add r0, r7, #0 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0xa6 - str r0, [r5, #0xc] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - ldr r4, [r5, #0xc] - mov r0, #0x20 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [r5, #0x20] - mov r1, #0xb - mov r2, #0 - mov r3, #0x40 - bl sub_02007130 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0xa - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r1, #0x9f - lsl r1, r1, #2 - str r2, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x10] - add r1, r4, r1 - ldr r0, [r0, #8] - mov r3, #0 - bl sub_0201A7E8 - mov r0, #0x9f - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r6, #4] - add r1, r7, #0 - bl ov5_021E5240 - mov r1, #0 - str r0, [sp, #0x14] - str r1, [sp] - ldr r0, _021E5688 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0x9f - lsl r0, r0, #2 - ldr r2, [sp, #0x14] - add r0, r4, r0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r4, #0 - add r0, #0x44 - mov r1, #8 - mov r2, #3 - bl ov5_021DE47C - mov r0, #1 - str r0, [sp] - ldrb r0, [r6, #0xd] - mov r2, #6 - add r1, r4, #0 - str r0, [sp, #4] - ldrb r0, [r6, #0xe] - lsl r2, r2, #6 - add r1, #0x44 - str r0, [sp, #8] - ldrb r0, [r6, #0xf] - add r2, r4, r2 - str r0, [sp, #0xc] - ldr r0, _021E568C ; =0x000927C0 - str r0, [sp, #0x10] - ldrb r3, [r6, #0xc] - ldr r0, [r5, #0x20] - bl ov5_021DE4CC - mov r0, #1 - str r0, [sp] - mov r0, #0x34 - str r0, [sp, #4] - mov r0, #0x35 - str r0, [sp, #8] - mov r0, #0x36 - str r0, [sp, #0xc] - ldr r0, _021E5690 ; =0x000927C1 - mov r2, #0x6d - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r5, #0x20] - add r1, #0x44 - add r2, r4, r2 - mov r3, #0x33 - bl ov5_021DE4CC - mov r0, #0 - str r0, [sp] - mov r1, #6 - str r0, [sp, #4] - add r0, r4, #0 - lsl r1, r1, #6 - mov r2, #0x11 - mov r3, #0x42 - add r0, #0x44 - add r1, r4, r1 - lsl r2, r2, #0x10 - lsl r3, r3, #0xc - bl ov5_021DE62C - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x4a - mov r2, #0x7b - lsl r0, r0, #0xc - str r0, [sp] - lsl r2, r2, #2 - add r0, r4, r2 - add r1, r4, #0 - sub r2, #0x38 - mov r3, #0x12 - add r1, #0x44 - add r2, r4, r2 - lsl r3, r3, #0xe - str r7, [sp, #4] - bl ov5_021E5128 - mov r0, #0 - str r0, [sp] - mov r0, #0x7a - lsl r0, r0, #2 - ldrh r2, [r6, #8] - ldr r0, [r4, r0] - add r1, r7, #0 - mov r3, #0xe - bl ov5_021DE5D0 - bl ov5_021DECEC - str r0, [r4, #0x40] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E5434: - mov r0, #1 - mov r1, #0x10 - str r0, [sp] - add r2, r1, #0 - add r3, r5, #4 - bl ov5_021DDC44 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E544A: - ldr r0, [r5, #4] - cmp r0, #0 - beq _021E54AC - add r0, r1, #1 - str r0, [r5, #0] - b _021E5718 -_021E5456: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x10] - ldr r0, [r0, #8] - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - ldrb r1, [r6, #0x12] - ldrb r2, [r6, #0x11] - ldrb r3, [r6, #0x10] - ldr r0, [r5, #0x20] - bl ov5_021DE3D0 - mov r0, #0xa3 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #0x10 - str r0, [sp] - mov r0, #0x1f - str r0, [sp, #4] - mov r0, #0x17 - str r0, [sp, #8] - ldr r1, [r4, #0x40] - add r0, r5, #0 - mov r2, #6 - mov r3, #8 - bl ov5_021DED20 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E54A4: - bl ov5_021DDD7C - cmp r0, #0 - bne _021E54AE -_021E54AC: - b _021E5718 -_021E54AE: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - ldr r0, [r4, #0x40] - bl ov5_021DED04 - mov r0, #0xa5 - mov r1, #0xa - lsl r0, r0, #2 - str r1, [r4, r0] - b _021E5718 -_021E54C4: - mov r0, #0xa5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0 - bge _021E55B2 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x7b - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021E51B4 - cmp r0, #1 - bne _021E55B2 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E54F2: - mov r0, #4 - str r0, [sp] - mov r1, #0x11 - ldr r2, [r6, #0] - ldr r3, _021E5694 ; =0xFFFC0000 - add r0, r4, #0 - lsl r1, r1, #0x10 - bl ov5_021DDE14 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021E80 - mov r2, #0x42 - ldr r1, [r4, #0] - add r0, sp, #0x1c - lsl r2, r2, #0xc - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x1c - bl sub_02021C50 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E553E: - add r0, r4, #0 - bl ov5_021DDE74 - mov r2, #0x42 - add r6, r0, #0 - ldr r1, [r4, #0] - add r0, sp, #0x1c - lsl r2, r2, #0xc - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x1c - bl sub_02021C50 - cmp r6, #1 - bne _021E55B2 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E556C: - add r0, r4, #0 - add r0, #0x18 - mov r1, #0 - mov r2, #0x10 - mov r3, #3 - bl ov5_021DDD80 - mov r0, #0xa5 - mov r1, #0xa - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E558A: - mov r0, #0xa5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0 - bge _021E55B2 - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDD90 - str r0, [sp, #0x18] - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DEF8C - ldr r0, [sp, #0x18] - cmp r0, #1 - beq _021E55B4 -_021E55B2: - b _021E5718 -_021E55B4: - mov r3, #0 - str r3, [sp] - mov r0, #0x7a - lsl r0, r0, #2 - ldrh r2, [r6, #8] - ldr r0, [r4, r0] - add r1, r7, #0 - bl ov5_021DE5D0 - mov r0, #0xd - mvn r0, r0 - mov r1, #0x21 - mov r2, #1 - bl sub_0200AB4C - ldr r3, [r4, #0] - ldr r0, [r5, #0x10] - asr r3, r3, #0xc - sub r3, #0x5c - ldr r0, [r0, #8] - mov r1, #2 - mov r2, #0 - neg r3, r3 - bl sub_0201C63C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_02019060 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E55FE: - add r0, r4, #0 - add r0, #0x18 - mov r1, #0x10 - mov r2, #0 - mov r3, #3 - bl ov5_021DDD80 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E5614: - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDD90 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DEF8C - cmp r6, #1 - bne _021E5718 - ldr r0, [r5, #0] - mov r1, #0x1a - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0xa5 - lsl r0, r0, #2 - str r1, [r4, r0] - b _021E5718 -_021E563A: - mov r0, #0xa5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0 - bge _021E5718 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E5652: - mov r0, #0xf - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0 - str r0, [sp, #8] - ldr r3, _021E5698 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E5672: - bl sub_0200F2AC - cmp r0, #0 - beq _021E5718 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021E5718 -_021E5682: - ldr r1, _021E5698 ; =0x00007FFF - b _021E569C - nop -_021E5688: .word 0x00010200 -_021E568C: .word 0x000927C0 -_021E5690: .word 0x000927C1 -_021E5694: .word 0xFFFC0000 -_021E5698: .word 0x00007FFF -_021E569C: - mov r0, #1 - bl sub_0200F344 - ldr r1, [r5, #0x14] - cmp r1, #0 - beq _021E56AC - mov r0, #1 - str r0, [r1, #0] -_021E56AC: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021BD4 - mov r0, #0x7b - lsl r0, r0, #2 - add r0, r4, r0 - bl ov5_021E519C - mov r1, #6 - add r0, r4, #0 - lsl r1, r1, #6 - add r0, #0x44 - add r1, r4, r1 - bl ov5_021DE5A4 - mov r1, #0x6d - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #0x44 - add r1, r4, r1 - bl ov5_021DE5A4 - add r0, r4, #0 - add r0, #0x44 - bl ov5_021DE4AC - mov r0, #0x9f - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021E575C ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - mov r0, #0 - add r1, r0, #0 - mov r2, #1 - bl sub_0200AB4C - ldr r0, [r5, #0x10] - mov r2, #0 - ldr r0, [r0, #8] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - add sp, #0x28 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E5718: - mov r3, #0xa3 - lsl r3, r3, #2 - ldr r0, [r4, r3] - cmp r0, #1 - bne _021E5748 - ldr r0, [r5, #0x10] - add r3, r3, #4 - ldr r0, [r0, #8] - ldr r3, [r4, r3] - mov r1, #3 - mov r2, #0 - bl sub_0201C63C - mov r3, #0x29 - lsl r3, r3, #4 - ldr r0, [r4, r3] - add r0, #0x1e - lsr r2, r0, #0x1f - lsl r1, r0, #0x17 - sub r1, r1, r2 - mov r0, #0x17 - ror r1, r0 - add r0, r2, r1 - str r0, [r4, r3] -_021E5748: - ldr r0, [r5, #0] - cmp r0, #0xf - beq _021E5754 - ldr r0, [r4, #0x44] - bl sub_020219F8 -_021E5754: - mov r0, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E575C: .word 0xFFFF1FFF - thumb_func_end ov5_021E52A8 - - thumb_func_start ov5_021E5760 -ov5_021E5760: ; 0x021E5760 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E5780 ; =0x021F9D34 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E577C - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E577C: - pop {r3, r4, r5, pc} - nop -_021E5780: .word 0x021F9D34 - thumb_func_end ov5_021E5760 - - thumb_func_start ov5_021E5784 -ov5_021E5784: ; 0x021E5784 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E57A4 ; =0x021F9D48 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E57A0 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E57A0: - pop {r3, r4, r5, pc} - nop -_021E57A4: .word 0x021F9D48 - thumb_func_end ov5_021E5784 - - thumb_func_start ov5_021E57A8 -ov5_021E57A8: ; 0x021E57A8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E57C8 ; =0x021F9D5C - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E57C4 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E57C4: - pop {r3, r4, r5, pc} - nop -_021E57C8: .word 0x021F9D5C - thumb_func_end ov5_021E57A8 - - thumb_func_start ov5_021E57CC -ov5_021E57CC: ; 0x021E57CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E57EC ; =0x021F9D70 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E57E8 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E57E8: - pop {r3, r4, r5, pc} - nop -_021E57EC: .word 0x021F9D70 - thumb_func_end ov5_021E57CC - - thumb_func_start ov5_021E57F0 -ov5_021E57F0: ; 0x021E57F0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E5810 ; =0x021F9D84 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E580C - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E580C: - pop {r3, r4, r5, pc} - nop -_021E5810: .word 0x021F9D84 - thumb_func_end ov5_021E57F0 - - thumb_func_start ov5_021E5814 -ov5_021E5814: ; 0x021E5814 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E5834 ; =0x021F9D98 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E5830 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E5830: - pop {r3, r4, r5, pc} - nop -_021E5834: .word 0x021F9D98 - thumb_func_end ov5_021E5814 - - thumb_func_start ov5_021E5838 -ov5_021E5838: ; 0x021E5838 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E5858 ; =0x021F9DAC - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E5854 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E5854: - pop {r3, r4, r5, pc} - nop -_021E5858: .word 0x021F9DAC - thumb_func_end ov5_021E5838 - - thumb_func_start ov5_021E585C -ov5_021E585C: ; 0x021E585C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E587C ; =0x021F9DC0 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E52A8 - cmp r0, #1 - bne _021E5878 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E5878: - pop {r3, r4, r5, pc} - nop -_021E587C: .word 0x021F9DC0 - thumb_func_end ov5_021E585C - - thumb_func_start ov5_021E5880 -ov5_021E5880: ; 0x021E5880 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_02025E38 - bl sub_02025F30 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021E5880 - - thumb_func_start ov5_021E5890 -ov5_021E5890: ; 0x021E5890 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r6, r0, #0 - ldr r0, [r6, #0] - str r1, [sp, #0x14] - str r2, [sp, #0x18] - ldr r4, [r6, #0xc] - cmp r0, #0xe - bls _021E58A6 - bl _021E6140 -_021E58A6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E58B2: ; jump table - .short _021E58D0 - _021E58B2 - 2 ; case 0 - .short _021E59D2 - _021E58B2 - 2 ; case 1 - .short _021E5AD2 - _021E58B2 - 2 ; case 2 - .short _021E5AEC - _021E58B2 - 2 ; case 3 - .short _021E5B08 - _021E58B2 - 2 ; case 4 - .short _021E5B32 - _021E58B2 - 2 ; case 5 - .short _021E5C9C - _021E58B2 - 2 ; case 6 - .short _021E5D72 - _021E58B2 - 2 ; case 7 - .short _021E5DA4 - _021E58B2 - 2 ; case 8 - .short _021E5E26 - _021E58B2 - 2 ; case 9 - .short _021E5E4A - _021E58B2 - 2 ; case 10 - .short _021E5E6E - _021E58B2 - 2 ; case 11 - .short _021E5EAC - _021E58B2 - 2 ; case 12 - .short _021E6026 - _021E58B2 - 2 ; case 13 - .short _021E60CC - _021E58B2 - 2 ; case 14 -_021E58D0: - add r0, r1, #0 - mov r1, #0x31 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x31 - str r0, [r6, #0xc] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r4, [r6, #0xc] - mov r1, #0xa - add r0, r4, #0 - add r0, #0x5c - mov r2, #4 - bl ov5_021DE47C - ldr r0, [r6, #0x10] - bl ov5_021E5880 - cmp r0, #0 - bne _021E5928 - mov r0, #1 - str r0, [sp] - mov r0, #0x94 - str r0, [sp, #4] - mov r0, #0x95 - str r0, [sp, #8] - mov r0, #0x96 - str r0, [sp, #0xc] - ldr r0, _021E5C7C ; =0x000927C0 - mov r2, #0x66 - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r6, #0x20] - add r1, #0x5c - add r2, r4, r2 - mov r3, #0x93 - bl ov5_021DE4CC - mov r1, #0 - b _021E594E -_021E5928: - mov r0, #1 - str r0, [sp] - mov r0, #0x98 - str r0, [sp, #4] - mov r0, #0x99 - str r0, [sp, #8] - mov r2, #0x9a - str r2, [sp, #0xc] - ldr r0, _021E5C7C ; =0x000927C0 - add r1, r4, #0 - str r0, [sp, #0x10] - add r2, #0xfe - ldr r0, [r6, #0x20] - add r1, #0x5c - add r2, r4, r2 - mov r3, #0x97 - bl ov5_021DE4CC - mov r1, #1 -_021E594E: - mov r0, #0xc1 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [sp, #0x18] - mov r2, #0x73 - ldrh r3, [r0] - mov r0, #1 - add r1, r4, #0 - str r0, [sp] - add r0, r3, #1 - str r0, [sp, #4] - add r0, r3, #2 - str r0, [sp, #8] - add r0, r3, #3 - str r0, [sp, #0xc] - ldr r0, _021E5C80 ; =0x000927C1 - lsl r2, r2, #2 - str r0, [sp, #0x10] - ldr r0, [r6, #0x20] - add r1, #0x5c - add r2, r4, r2 - bl ov5_021DE4CC - mov r0, #0xc - str r0, [sp] - mov r0, #0x28 - str r0, [sp, #4] - mov r0, #0x29 - str r0, [sp, #8] - mov r0, #0x2a - str r0, [sp, #0xc] - ldr r0, _021E5C84 ; =0x000927C2 - mov r2, #2 - str r0, [sp, #0x10] - ldr r3, [sp, #0x18] - add r1, r4, #0 - lsl r2, r2, #8 - ldrb r3, [r3, #2] - ldr r0, [r6, #0x20] - add r1, #0x5c - add r2, r4, r2 - bl ov5_021DE4CC - mov r0, #1 - str r0, [sp] - mov r0, #0x34 - str r0, [sp, #4] - mov r0, #0x35 - str r0, [sp, #8] - mov r0, #0x36 - str r0, [sp, #0xc] - ldr r0, _021E5C88 ; =0x000927C3 - mov r2, #0x8d - str r0, [sp, #0x10] - add r1, r4, #0 - lsl r2, r2, #2 - ldr r0, [r6, #0x20] - add r1, #0x5c - add r2, r4, r2 - mov r3, #0x33 - bl ov5_021DE4CC - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E59D2: - mov r1, #2 - lsl r1, r1, #0xc - add r0, sp, #0x2c - add r2, r1, #0 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x66 - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #0x1c] - str r0, [sp, #0x24] - add r0, r4, #0 - str r0, [sp, #0x28] - add r0, #0x5c - mov r7, #0 - add r5, r4, #0 - str r0, [sp, #0x28] -_021E59F6: - cmp r7, #3 - bge _021E5A02 - mov r0, #0 - ldr r1, [sp, #0x1c] - str r0, [sp, #0x20] - b _021E5A12 -_021E5A02: - sub r1, r7, #1 - mov r0, #0x34 - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x24] - add r1, r0, r2 - mov r0, #1 - str r0, [sp, #0x20] -_021E5A12: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r2, #0 - ldr r0, [sp, #0x28] - add r3, r2, #0 - bl ov5_021DE62C - mov r1, #0x9a - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp, #0x20] - bl sub_02021D6C - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021E80 - ldr r0, [sp, #0x1c] - add r7, r7, #1 - add r0, #0x34 - add r5, r5, #4 - str r0, [sp, #0x1c] - cmp r7, #4 - blt _021E59F6 - mov r0, #0xc1 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _021E5A74 - mov r2, #0 - str r2, [sp] - sub r0, #0x9c - ldr r0, [r4, r0] - ldr r1, [sp, #0x14] - mov r3, #0xe - bl ov5_021DE5D0 - b _021E5A86 -_021E5A74: - mov r1, #0 - str r1, [sp] - sub r0, #0x9c - ldr r0, [r4, r0] - ldr r1, [sp, #0x14] - mov r2, #1 - mov r3, #0xe - bl ov5_021DE5D0 -_021E5A86: - mov r0, #0 - str r0, [sp] - ldr r2, [sp, #0x18] - mov r0, #0x9b - lsl r0, r0, #2 - ldrh r2, [r2, #4] - ldr r0, [r4, r0] - ldr r1, [sp, #0x14] - mov r3, #0xe - bl ov5_021DE5D0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [sp, #0x14] - mov r2, #0x29 - add r1, r4, #0 - mov r3, #2 - lsl r2, r2, #4 - str r0, [sp, #4] - add r0, r4, r2 - sub r2, #0x5c - add r1, #0x5c - add r2, r4, r2 - lsl r3, r3, #0x12 - bl ov5_021E5128 - ldr r0, [r6, #0x10] - bl ov5_021DEFA0 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5AD2: - mov r1, #0x10 - mov r0, #1 - add r2, r1, #0 - add r3, r6, #4 - str r0, [sp] - bl ov5_021DDC44 - mov r0, #0 - str r0, [r6, #8] - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5AEC: - ldr r0, [r6, #8] - add r0, r0, #1 - str r0, [r6, #8] - cmp r0, #8 - bne _021E5AFA - bl ov5_021DF038 -_021E5AFA: - ldr r0, [r6, #4] - cmp r0, #0 - beq _021E5B10 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5B08: - bl ov5_021DF054 - cmp r0, #1 - beq _021E5B12 -_021E5B10: - b _021E6140 -_021E5B12: - ldr r0, [r6, #0x20] - mov r1, #0x6b - bl ov5_021DF0CC - mov r0, #8 - str r0, [sp] - ldr r0, _021E5C8C ; =0x04000050 - mov r1, #1 - mov r2, #0x1e - mov r3, #0 - bl sub_020BF55C - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5B32: - mov r0, #6 - mov r2, #0xe - mov r3, #5 - str r0, [sp] - ldr r1, _021E5C90 ; =0xFFF80000 - add r0, r4, #0 - lsl r2, r2, #0xe - lsl r3, r3, #0x10 - bl ov5_021DDE14 - mov r2, #0x17 - ldr r1, [r4, #0] - add r0, sp, #0x38 - lsl r2, r2, #0xe - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r1, #6 - add r0, r4, #0 - mov r2, #0x32 - str r1, [sp] - ldr r3, _021E5C94 ; =0xFFFB0000 - add r0, #0x30 - lsl r1, r1, #0x12 - lsl r2, r2, #0xe - bl ov5_021DDE14 - mov r2, #0x17 - ldr r1, [r4, #0x30] - add r0, sp, #0x38 - lsl r2, r2, #0xe - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x9b - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - sub r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #0x9b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x20 - str r0, [sp] - ldr r0, [sp, #0x14] - mov r1, #0xb - str r0, [sp, #4] - ldr r0, [r6, #0x20] - mov r2, #0 - mov r3, #0x40 - bl sub_02007130 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0xd - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r1, #0xbd - lsl r1, r1, #2 - str r2, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r6, #0x10] - add r1, r4, r1 - ldr r0, [r0, #8] - mov r3, #0x15 - bl sub_0201A7E8 - mov r0, #0xbd - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - ldrh r0, [r0, #6] - bl ov5_021E5240 - mov r1, #0 - add r5, r0, #0 - str r1, [sp] - ldr r0, _021E5C98 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #0xbd - lsl r0, r0, #2 - add r0, r4, r0 - add r2, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - mov r0, #3 - str r0, [r6, #4] - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 - ; .align 2, 0 -_021E5C7C: .word 0x000927C0 -_021E5C80: .word 0x000927C1 -_021E5C84: .word 0x000927C2 -_021E5C88: .word 0x000927C3 -_021E5C8C: .word 0x04000050 -_021E5C90: .word 0xFFF80000 -_021E5C94: .word 0xFFFB0000 -_021E5C98: .word 0x00010200 -_021E5C9C: - ldr r0, [r6, #4] - cmp r0, #0 - ble _021E5CC0 - sub r0, r0, #1 - str r0, [r6, #4] - bne _021E5CCA - mov r0, #3 - bl ov5_021DF17C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021E5CCA -_021E5CC0: - mov r0, #0x29 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov5_021E51B4 -_021E5CCA: - add r0, r4, #0 - bl ov5_021DDE74 - mov r2, #0x17 - ldr r1, [r4, #0] - add r0, sp, #0x38 - lsl r2, r2, #0xe - mov r3, #0 - bl ov5_021DE660 - add r5, sp, #0x38 - mov r2, #0x9e - lsl r2, r2, #2 - add r3, r4, r2 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - sub r2, #0x10 - str r0, [r3, #0] - ldr r0, [r4, r2] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - add r0, r4, #0 - add r0, #0x30 - bl ov5_021DDE74 - mov r2, #0x17 - add r7, r0, #0 - ldr r1, [r4, #0x30] - add r0, sp, #0x38 - lsl r2, r2, #0xe - mov r3, #0 - bl ov5_021DE660 - add r5, sp, #0x38 - mov r2, #0xa1 - lsl r2, r2, #2 - add r3, r4, r2 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - sub r2, #0x18 - str r0, [r3, #0] - ldr r0, [r4, r2] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - sub r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - cmp r7, #1 - bne _021E5E60 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5D72: - mov r0, #0x29 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov5_021E51B4 - add r5, r0, #0 - bl ov5_021DF208 - cmp r5, #0 - beq _021E5E60 - cmp r0, #0 - beq _021E5E60 - add r0, r4, #0 - add r0, #0x48 - mov r1, #0 - mov r2, #0x10 - mov r3, #3 - bl ov5_021DDD80 - bl ov5_021DF224 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5DA4: - add r0, r4, #0 - add r0, #0x48 - bl ov5_021DDD90 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x48 - bl ov5_021DEF8C - cmp r5, #1 - bne _021E5E60 - mov r3, #0 - mov r2, #0x9a - str r3, [sp] - lsl r2, r2, #2 - ldr r0, [r4, r2] - add r2, #0x9c - ldr r1, [sp, #0x14] - ldr r2, [r4, r2] - bl ov5_021DE5D0 - mov r3, #0 - mov r0, #0x9b - ldr r2, [sp, #0x18] - str r3, [sp] - lsl r0, r0, #2 - ldrh r2, [r2, #4] - ldr r0, [r4, r0] - ldr r1, [sp, #0x14] - bl ov5_021DE5D0 - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x27 - lsl r0, r0, #4 - mov r1, #2 - ldr r0, [r4, r0] - lsl r1, r1, #0xc - bl sub_02021CE4 - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x9d - lsl r0, r0, #2 - mov r1, #2 - ldr r0, [r4, r0] - lsl r1, r1, #0xc - bl sub_02021CE4 - ldr r0, [r6, #0x20] - mov r1, #0x6c - bl ov5_021DF0CC - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5E26: - add r0, r4, #0 - add r0, #0x48 - mov r1, #0x10 - mov r2, #0 - mov r3, #6 - bl ov5_021DDD80 - mov r0, #4 - bl ov5_021DF17C - mov r0, #0 - mov r1, #1 - bl sub_02019060 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5E4A: - add r0, r4, #0 - add r0, #0x48 - bl ov5_021DDD90 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x48 - bl ov5_021DEF8C - cmp r5, #1 - beq _021E5E62 -_021E5E60: - b _021E6140 -_021E5E62: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - mov r0, #8 - str r0, [r6, #4] - b _021E6140 -_021E5E6E: - ldr r0, [r6, #4] - cmp r0, #0 - ble _021E5E7A - sub r0, r0, #1 - str r0, [r6, #4] - b _021E6140 -_021E5E7A: - add r0, r2, #0 - ldrb r0, [r0, #3] - mov r1, #0 - ldr r2, _021E616C ; =0xFFFFE000 - str r0, [sp] - add r0, r4, #0 - add r3, r1, #0 - bl ov5_021DDE14 - ldr r0, [sp, #0x18] - mov r1, #0 - ldrb r0, [r0, #3] - ldr r2, _021E616C ; =0xFFFFE000 - add r3, r1, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDE14 - mov r0, #0 - str r0, [r6, #4] - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E5EAC: - ldr r0, [r6, #4] - add r0, r0, #1 - str r0, [r6, #4] - add r0, r4, #0 - bl ov5_021DDE74 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDE74 - ldr r1, [r6, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - add r0, sp, #0x38 - bne _021E5EF4 - mov r2, #0x9e - lsl r2, r2, #2 - ldr r3, [r4, r2] - ldr r1, [r4, #0] - add r2, r2, #4 - add r1, r3, r1 - ldr r3, [r4, r2] - ldr r2, [r4, #0x18] - add r2, r3, r2 - mov r3, #0 - bl ov5_021DE660 - b _021E5F0C -_021E5EF4: - mov r2, #0x9e - lsl r2, r2, #2 - ldr r3, [r4, r2] - ldr r1, [r4, #0] - add r2, r2, #4 - sub r1, r3, r1 - ldr r3, [r4, r2] - ldr r2, [r4, #0x18] - sub r2, r3, r2 - mov r3, #0 - bl ov5_021DE660 -_021E5F0C: - cmp r5, #0 - beq _021E5F20 - mov r0, #0x9e - lsl r0, r0, #2 - add r3, sp, #0x38 - add r2, r4, r0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] -_021E5F20: - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - ldr r1, [r6, #4] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - add r0, sp, #0x38 - bne _021E5F7C - mov r2, #0xa1 - lsl r2, r2, #2 - ldr r3, [r4, r2] - ldr r1, [r4, #0] - add r2, r2, #4 - sub r1, r3, r1 - ldr r3, [r4, r2] - ldr r2, [r4, #0x18] - sub r2, r3, r2 - mov r3, #0 - bl ov5_021DE660 - b _021E5F94 -_021E5F7C: - mov r2, #0xa1 - lsl r2, r2, #2 - ldr r3, [r4, r2] - ldr r1, [r4, #0] - add r2, r2, #4 - add r1, r3, r1 - ldr r3, [r4, r2] - ldr r2, [r4, #0x18] - add r2, r3, r2 - mov r3, #0 - bl ov5_021DE660 -_021E5F94: - cmp r5, #0 - beq _021E5FA8 - mov r0, #0xa1 - lsl r0, r0, #2 - add r3, sp, #0x38 - add r2, r4, r0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] -_021E5FA8: - mov r0, #0x9b - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - sub r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - cmp r5, #0 - bne _021E5FD8 - b _021E6140 -_021E5FD8: - ldr r0, [r6, #0] - mov r1, #0 - add r0, r0, #1 - str r0, [r6, #0] - mov r0, #4 - bl sub_0201FF0C - mov r2, #3 - mov r0, #0x10 - lsl r2, r2, #0x12 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - lsr r3, r2, #3 - bl ov5_021DDE14 - mov r0, #0x10 - mov r2, #3 - str r0, [sp] - add r0, r4, #0 - lsl r2, r2, #0x12 - add r0, #0x18 - mov r1, #0 - lsr r3, r2, #3 - bl ov5_021DDE14 - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - mov r1, #0 - str r0, [sp, #8] - ldr r3, _021E6170 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 - b _021E6140 -_021E6026: - add r0, r4, #0 - bl ov5_021DDE74 - add r0, r4, #0 - add r0, #0x18 - bl ov5_021DDE74 - mov r2, #0x9e - lsl r2, r2, #2 - ldr r3, [r4, r2] - ldr r1, [r4, #0] - add r2, r2, #4 - sub r1, r3, r1 - ldr r3, [r4, r2] - ldr r2, [r4, #0x18] - add r0, sp, #0x38 - sub r2, r3, r2 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r2, #0xa1 - lsl r2, r2, #2 - ldr r3, [r4, r2] - ldr r1, [r4, #0] - add r2, r2, #4 - add r1, r3, r1 - ldr r3, [r4, r2] - ldr r2, [r4, #0x18] - add r0, sp, #0x38 - add r2, r3, r2 - mov r3, #0 - bl ov5_021DE660 - mov r0, #0x9b - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0x3c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x3c] - ldr r1, [sp, #0x38] - lsl r0, r0, #2 - sub r0, r1, r0 - str r0, [sp, #0x38] - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0x38 - bl sub_02021C50 - bl sub_0200F2AC - cmp r0, #0 - beq _021E6140 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _021E6140 -_021E60CC: - ldr r1, _021E6170 ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 - ldr r1, [r6, #0x14] - cmp r1, #0 - beq _021E60DE - mov r0, #1 - str r0, [r1, #0] -_021E60DE: - mov r0, #0x29 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov5_021E519C - mov r0, #0xbd - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - mov r7, #0x9a - mov r6, #0 - add r5, r4, #0 - lsl r7, r7, #2 -_021E60FA: - ldr r0, [r5, r7] - bl sub_02021BD4 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #4 - blt _021E60FA - mov r0, #0x66 - lsl r0, r0, #2 - add r7, r4, #0 - mov r6, #0 - add r5, r4, r0 - add r7, #0x5c -_021E6114: - add r0, r7, #0 - add r1, r5, #0 - bl ov5_021DE5A4 - add r6, r6, #1 - add r5, #0x34 - cmp r6, #4 - blt _021E6114 - add r4, #0x5c - add r0, r4, #0 - bl ov5_021DE4AC - bl ov5_021DF224 - bl ov5_021DF084 - ldr r0, _021E6174 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add sp, #0x44 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021E6140: - ldr r0, [r6, #0] - cmp r0, #0xe - beq _021E6166 - ldr r0, [r4, #0x5c] - bl sub_020219F8 - ldr r0, [r6, #0] - cmp r0, #4 - ble _021E6166 - bl sub_020241B4 - bl ov5_021DF1CC - bl ov5_021DF070 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_021E6166: - mov r0, #0 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E616C: .word 0xFFFFE000 -_021E6170: .word 0x00007FFF -_021E6174: .word 0x04000050 - thumb_func_end ov5_021E5890 - - thumb_func_start ov5_021E6178 -ov5_021E6178: ; 0x021E6178 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E6198 ; =0x021F9D0C - add r0, r4, #0 - mov r1, #4 - bl ov5_021E5890 - cmp r0, #1 - bne _021E6194 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E6194: - pop {r3, r4, r5, pc} - nop -_021E6198: .word 0x021F9D0C - thumb_func_end ov5_021E6178 - - thumb_func_start ov5_021E619C -ov5_021E619C: ; 0x021E619C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E61BC ; =0x021F9D14 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E5890 - cmp r0, #1 - bne _021E61B8 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E61B8: - pop {r3, r4, r5, pc} - nop -_021E61BC: .word 0x021F9D14 - thumb_func_end ov5_021E619C - - thumb_func_start ov5_021E61C0 -ov5_021E61C0: ; 0x021E61C0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E61E0 ; =0x021F9D1C - add r0, r4, #0 - mov r1, #4 - bl ov5_021E5890 - cmp r0, #1 - bne _021E61DC - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E61DC: - pop {r3, r4, r5, pc} - nop -_021E61E0: .word 0x021F9D1C - thumb_func_end ov5_021E61C0 - - thumb_func_start ov5_021E61E4 -ov5_021E61E4: ; 0x021E61E4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E6204 ; =0x021F9D24 - add r0, r4, #0 - mov r1, #4 - bl ov5_021E5890 - cmp r0, #1 - bne _021E6200 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E6200: - pop {r3, r4, r5, pc} - nop -_021E6204: .word 0x021F9D24 - thumb_func_end ov5_021E61E4 - - thumb_func_start ov5_021E6208 -ov5_021E6208: ; 0x021E6208 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r2, _021E6228 ; =0x021F9D2C - add r0, r4, #0 - mov r1, #4 - bl ov5_021E5890 - cmp r0, #1 - bne _021E6224 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021DDC28 -_021E6224: - pop {r3, r4, r5, pc} - nop -_021E6228: .word 0x021F9D2C - thumb_func_end ov5_021E6208 - - thumb_func_start ov5_021E622C -ov5_021E622C: ; 0x021E622C - push {r3, lr} - bl sub_02026218 - bl sub_02026220 - pop {r3, pc} - thumb_func_end ov5_021E622C - - thumb_func_start ov5_021E6238 -ov5_021E6238: ; 0x021E6238 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r6, r0, #0 - add r5, r4, #0 - mov r7, #5 -_021E6242: - add r0, r6, #0 - add r1, r5, #0 - bl sub_02026218 - bl sub_02026220 - add r1, r7, #0 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021E6260 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 -_021E6260: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #2 - blo _021E6242 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E6238 - - thumb_func_start ov5_021E6270 -ov5_021E6270: ; 0x021E6270 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _021E62AC ; =0x02202124 - mov r4, #0 - str r5, [r0, #0] - mov r6, #5 - add r7, r4, #0 -_021E627E: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02026218 - bl sub_02026220 - add r1, r6, #0 - add r2, r7, #0 - bl sub_02074570 - cmp r0, #0 - bne _021E629A - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E629A: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #2 - blo _021E627E - mov r0, #0 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E62AC: .word 0x02202124 - thumb_func_end ov5_021E6270 - - thumb_func_start ov5_021E62B0 -ov5_021E62B0: ; 0x021E62B0 - push {r3, lr} - mov r1, #6 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - pop {r3, pc} - thumb_func_end ov5_021E62B0 - - thumb_func_start ov5_021E62C4 -ov5_021E62C4: ; 0x021E62C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r2, #0 - add r6, r0, #0 - str r1, [sp] - add r7, r3, #0 - bl sub_0207A0FC - add r4, r0, #0 - add r0, r5, #0 - bl sub_02026224 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_02026220 - str r0, [sp, #4] - add r0, r7, #0 - bl sub_02025E38 - bl sub_02025EF0 - add r0, r4, #0 - mov r1, #0x75 - add r2, sp, #0xc - bl sub_02074470 - add r0, r4, #0 - bl sub_02076B10 - bl ov5_021E62B0 - cmp r0, #0 - beq _021E6318 - ldr r0, [sp, #8] - bl sub_02026230 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0xaa - bl sub_02074470 -_021E6318: - ldr r1, [sp, #4] - add r0, r4, #0 - bl sub_02077618 - ldr r0, [sp, #4] - mov r1, #0 - bl sub_02077ADC - add r0, r5, #0 - mov r1, #0 - bl sub_02026258 - ldr r1, [sp] - add r0, r6, #0 - bl sub_0207A080 - ldr r1, _021E6354 ; =0x000001B9 - add r0, r6, #0 - bl sub_0207A230 - cmp r0, #0 - bne _021E634E - add r0, r7, #0 - bl sub_0202CC98 - bl sub_0202CCA8 -_021E634E: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021E6354: .word 0x000001B9 - thumb_func_end ov5_021E62C4 - - thumb_func_start ov5_021E6358 -ov5_021E6358: ; 0x021E6358 - push {r3, r4, r5, r6, r7, lr} - add r7, r3, #0 - add r5, r0, #0 - add r0, r7, #0 - add r6, r1, #0 - add r4, r2, #0 - bl sub_0202CD88 - mov r1, #0x28 - bl sub_0202CF28 - add r0, r4, #0 - bl ov5_021E6270 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02026218 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - bl ov5_021E62C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E6358 - - thumb_func_start ov5_021E638C -ov5_021E638C: ; 0x021E638C - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - mov r1, #0 - bl sub_02026218 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl sub_02026218 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02026220 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02026220 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _021E63DC - add r0, r7, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021E63DC - add r0, r5, #0 - add r1, r4, #0 - bl sub_020262A8 - add r0, r4, #0 - bl sub_020262F4 -_021E63DC: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E638C - - thumb_func_start ov5_021E63E0 -ov5_021E63E0: ; 0x021E63E0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #8] - add r4, sp, #8 - add r6, sp, #4 - add r7, sp, #4 -_021E63F2: - add r0, r5, #0 - bl sub_02076B14 - cmp r0, #0 - beq _021E6434 - mov r0, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0207727C - cmp r0, #0 - beq _021E642A -_021E640E: - ldr r1, _021E6440 ; =0x0000FFFF - cmp r0, r1 - bne _021E641C - ldrh r1, [r7] - add r0, r5, #0 - bl sub_02077134 -_021E641C: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0207727C - cmp r0, #0 - bne _021E640E -_021E642A: - ldr r0, [sp] - add r0, r0, #1 - str r0, [sp] - cmp r0, #0x64 - blt _021E63F2 -_021E6434: - add r0, r5, #0 - bl sub_0207418C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021E6440: .word 0x0000FFFF - thumb_func_end ov5_021E63E0 - - thumb_func_start ov5_021E6444 -ov5_021E6444: ; 0x021E6444 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - add r6, r1, #0 - mov r0, #4 - add r7, r2, #0 - bl sub_02073C74 - add r4, r0, #0 - add r0, r6, #0 - bl sub_02026220 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02026224 - str r0, [sp, #4] - add r0, r7, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_0200B5CC - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - add r0, r5, #0 - add r1, r4, #0 - bl sub_020774C8 - add r0, r4, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - cmp r0, #0x64 - beq _021E64BC - add r0, r4, #0 - mov r1, #8 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - add r0, r6, #0 - bl sub_02026228 - ldr r1, [sp, #8] - add r2, sp, #8 - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #8 - bl sub_02074B30 - add r0, r4, #0 - bl ov5_021E63E0 -_021E64BC: - add r0, r5, #0 - bl ov5_021E62B0 - cmp r0, #0 - beq _021E64D6 - ldr r0, [sp, #4] - bl sub_02026230 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0xaa - bl sub_02074B30 -_021E64D6: - ldr r0, [sp] - add r1, r4, #0 - bl sub_0207A048 - add r0, r5, #0 - bl sub_02073C54 - add r0, r6, #0 - mov r1, #0 - bl sub_02026258 - add r0, r4, #0 - bl sub_020181C4 - add r0, r7, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021E6444 - - thumb_func_start ov5_021E64F8 -ov5_021E64F8: ; 0x021E64F8 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - add r1, r3, #0 - bl sub_02026218 - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov5_021E6444 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r6, #0 - bl ov5_021E638C - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E64F8 - - thumb_func_start ov5_021E6520 -ov5_021E6520: ; 0x021E6520 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #4 - add r5, r1, #0 - bl sub_02073C74 - add r7, r0, #0 - bl sub_02076B10 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl sub_02077604 - add r0, r4, #0 - mov r1, #8 - mov r2, #0 - bl sub_02074570 - str r0, [sp] - add r0, r0, r5 - str r0, [sp] - add r0, r4, #0 - mov r1, #8 - add r2, sp, #0 - bl sub_02074C60 - add r0, r4, #0 - bl sub_02075B40 - add r4, r0, #0 - add r0, r7, #0 - bl sub_020181C4 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E6520 - - thumb_func_start ov5_021E6568 -ov5_021E6568: ; 0x021E6568 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_02026220 - add r6, r0, #0 - bl sub_02075B40 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, r5, #0 - bl sub_02026228 - add r1, r0, #0 - add r0, r6, #0 - bl ov5_021E6520 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - sub r0, r0, r4 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E6568 - - thumb_func_start ov5_021E6590 -ov5_021E6590: ; 0x021E6590 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02026220 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02026228 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021E6520 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E6590 - - thumb_func_start ov5_021E65B0 -ov5_021E65B0: ; 0x021E65B0 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r0, #0 - add r5, r1, #0 - bl sub_02026220 - add r6, r0, #0 - add r0, r4, #0 - bl ov5_021E6568 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - mov r1, #1 - add r0, r5, #0 - add r2, r4, #0 - mov r3, #3 - str r1, [sp, #4] - bl sub_0200B60C - add r0, r5, #0 - mov r1, #0 - add r2, r6, #0 - bl sub_0200B5CC - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E65B0 - - thumb_func_start ov5_021E65EC -ov5_021E65EC: ; 0x021E65EC - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r0, #0 - add r5, r1, #0 - bl sub_02026220 - add r6, r0, #0 - add r0, r4, #0 - bl ov5_021E6568 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r5, #0 - mov r1, #0 - add r2, r6, #0 - bl sub_0200B5CC - add r1, r4, #1 - mov r0, #0x64 - mul r0, r1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - mov r0, #0 - str r0, [sp] - mov r1, #1 - add r0, r5, #0 - add r2, r4, #0 - mov r3, #5 - str r1, [sp, #4] - bl sub_0200B60C - add r0, r4, #0 - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E65EC - - thumb_func_start ov5_021E6630 -ov5_021E6630: ; 0x021E6630 - push {r4, lr} - add r4, r2, #0 - bl sub_02026218 - add r1, r4, #0 - bl ov5_021E65EC - pop {r4, pc} - thumb_func_end ov5_021E6630 - - thumb_func_start ov5_021E6640 -ov5_021E6640: ; 0x021E6640 - push {r3, r4, r5, lr} - add r5, r2, #0 - bl sub_02026218 - add r4, r0, #0 - bl sub_02026220 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021E6664 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021E65B0 - pop {r3, r4, r5, pc} -_021E6664: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E6640 - - thumb_func_start ov5_021E6668 -ov5_021E6668: ; 0x021E6668 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - bl ov5_021E622C - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #1 - bl ov5_021E622C - str r0, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E6668 - - thumb_func_start ov5_021E6684 -ov5_021E6684: ; 0x021E6684 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r1, #0 - mvn r1, r1 - str r1, [sp] - add r1, sp, #4 - bl ov5_021E6668 - mov r4, #0 - add r5, sp, #4 -_021E6698: - ldr r0, [r5, #0] - bl sub_02075D74 - cmp r0, #1 - bne _021E66A4 - str r4, [sp] -_021E66A4: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _021E6698 - mov r7, #0 - add r6, r7, #0 - add r4, sp, #4 - add r5, sp, #0xc -_021E66B4: - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - str r0, [r5, #0] - cmp r0, #0x84 - bne _021E66C8 - add r7, r7, #1 - str r6, [sp] -_021E66C8: - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #2 - blt _021E66B4 - cmp r7, #2 - bne _021E66EA - bl sub_0201D2E8 - ldr r1, _021E671C ; =0x00007FFF - cmp r0, r1 - blo _021E66E6 - mov r0, #0 - str r0, [sp] - b _021E66EA -_021E66E6: - mov r0, #1 - str r0, [sp] -_021E66EA: - ldr r0, [sp] - mov r2, #0 - lsl r1, r0, #2 - add r0, sp, #4 - ldr r0, [r0, r1] - mov r1, #6 - bl sub_02074570 - cmp r0, #0xe5 - bne _021E6714 - bl sub_0201D2E8 - ldr r1, _021E671C ; =0x00007FFF - cmp r0, r1 - blo _021E670E - mov r0, #0 - mvn r0, r0 - str r0, [sp] -_021E670E: - ldr r0, [sp] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E6714: - mov r0, #0 - mvn r0, r0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E671C: .word 0x00007FFF - thumb_func_end ov5_021E6684 - - thumb_func_start ov5_021E6720 -ov5_021E6720: ; 0x021E6720 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - mov r5, #0 - bl ov5_021E6684 - add r1, r0, #0 - bpl _021E673C - bl sub_0201D35C - add r1, r0, #0 - ldr r0, [sp] - bl sub_02026270 - pop {r3, r4, r5, r6, r7, pc} -_021E673C: - ldr r0, [sp] - bl ov5_021E622C - add r1, r5, #0 - add r2, r1, #0 - bl sub_02074570 - bl sub_02075BFC - mov r7, #0x96 - add r6, r0, #0 - lsl r7, r7, #4 -_021E6754: - bl sub_0201D35C - add r4, r0, #0 - bl sub_02075BFC - cmp r6, r0 - bne _021E6766 - cmp r4, #0 - bne _021E676C -_021E6766: - add r5, r5, #1 - cmp r5, r7 - ble _021E6754 -_021E676C: - ldr r0, [sp] - add r1, r4, #0 - bl sub_02026270 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E6720 - - thumb_func_start ov5_021E6778 -ov5_021E6778: ; 0x021E6778 - push {r3, r4} - sub sp, #8 - mov r2, #0xff - strb r2, [r0, r1] - mov r2, #0 - add r3, sp, #0 -_021E6784: - ldrb r1, [r0, r2] - add r2, r2, #1 - strb r1, [r3] - add r3, r3, #1 - cmp r2, #6 - blt _021E6784 - mov r2, #0 - add r4, r2, #0 - add r3, sp, #0 -_021E6796: - ldrb r1, [r3] - cmp r1, #0xff - beq _021E67A0 - strb r1, [r0, r2] - add r2, r2, #1 -_021E67A0: - add r4, r4, #1 - add r3, r3, #1 - cmp r4, #6 - blt _021E6796 - add sp, #8 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E6778 - - thumb_func_start ov5_021E67B0 -ov5_021E67B0: ; 0x021E67B0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - str r1, [sp] - mov r0, #0 - add r1, sp, #8 -_021E67BC: - strb r0, [r1, r0] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #6 - blo _021E67BC - add r7, sp, #0xc - mov r5, #0 - add r6, sp, #8 - add r7, #2 -_021E67D0: - bl sub_0201D2E8 - mov r1, #6 - sub r1, r1, r5 - bl sub_020E1F6C - ldrb r0, [r6, r1] - add r1, r5, #0 - strb r0, [r7, r5] - add r0, r6, #0 - bl ov5_021E6778 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #3 - blo _021E67D0 - add r6, sp, #4 - mov r5, #0 - add r6, #1 - mov r7, #0x1f -_021E67FA: - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r0, r0, #0x1f - sub r0, r0, r1 - ror r0, r7 - add r0, r1, r0 - strb r0, [r6, r5] - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #3 - blo _021E67FA - mov r5, #0 - add r7, sp, #4 - add r6, sp, #4 -_021E681A: - add r1, sp, #4 - add r1, #1 - ldrb r1, [r1, r5] - ldr r0, [sp] - bl ov5_021E622C - add r1, sp, #0xc - add r1, #2 - ldrb r1, [r1, r5] - cmp r1, #5 - bhi _021E68CA - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021E683C: ; jump table - .short _021E6848 - _021E683C - 2 ; case 0 - .short _021E685E - _021E683C - 2 ; case 1 - .short _021E6874 - _021E683C - 2 ; case 2 - .short _021E688A - _021E683C - 2 ; case 3 - .short _021E68A0 - _021E683C - 2 ; case 4 - .short _021E68B6 - _021E683C - 2 ; case 5 -_021E6848: - mov r1, #0x46 - mov r2, #0 - bl sub_02074570 - strb r0, [r6] - add r0, r4, #0 - mov r1, #0x46 - add r2, r7, #0 - bl sub_02074B30 - b _021E68CA -_021E685E: - mov r1, #0x47 - mov r2, #0 - bl sub_02074570 - strb r0, [r6] - add r0, r4, #0 - mov r1, #0x47 - add r2, r7, #0 - bl sub_02074B30 - b _021E68CA -_021E6874: - mov r1, #0x48 - mov r2, #0 - bl sub_02074570 - strb r0, [r6] - add r0, r4, #0 - mov r1, #0x48 - add r2, r7, #0 - bl sub_02074B30 - b _021E68CA -_021E688A: - mov r1, #0x49 - mov r2, #0 - bl sub_02074570 - strb r0, [r6] - add r0, r4, #0 - mov r1, #0x49 - add r2, r7, #0 - bl sub_02074B30 - b _021E68CA -_021E68A0: - mov r1, #0x4a - mov r2, #0 - bl sub_02074570 - strb r0, [r6] - add r0, r4, #0 - mov r1, #0x4a - add r2, r7, #0 - bl sub_02074B30 - b _021E68CA -_021E68B6: - mov r1, #0x4b - mov r2, #0 - bl sub_02074570 - strb r0, [r6] - add r0, r4, #0 - mov r1, #0x4b - add r2, r7, #0 - bl sub_02074B30 -_021E68CA: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #3 - blo _021E681A - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021E67B0 - - thumb_func_start ov5_021E68D8 -ov5_021E68D8: ; 0x021E68D8 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r1, #0 - mov r1, #5 - add r2, r4, #0 - add r6, r4, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - ldr r0, _021E693C ; =0x00004E20 - ldr r3, _021E6940 ; =0x00000775 - add r2, r2, r0 - ldr r0, _021E6944 ; =0x021F9FA2 - add r1, r4, #0 -_021E68F6: - lsl r7, r1, #1 - ldrh r7, [r0, r7] - cmp r2, r7 - bne _021E6906 - add r0, r1, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - b _021E6910 -_021E6906: - add r1, r1, #1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - cmp r1, r3 - blo _021E68F6 -_021E6910: - ldr r2, _021E6944 ; =0x021F9FA2 - lsl r0, r6, #1 - ldr r3, _021E693C ; =0x00004E20 - mov r1, #0 - add r0, r2, r0 -_021E691A: - lsl r6, r1, #1 - ldrh r2, [r0, r6] - cmp r2, r3 - bhi _021E6934 - add r1, r1, #1 - strh r2, [r5, r6] - add r2, r4, #1 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsr r1, r1, #0x10 - lsr r4, r2, #0x10 - cmp r1, #0x10 - blo _021E691A -_021E6934: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E693C: .word 0x00004E20 -_021E6940: .word 0x00000775 -_021E6944: .word 0x021F9FA2 - thumb_func_end ov5_021E68D8 - - thumb_func_start ov5_021E6948 -ov5_021E6948: ; 0x021E6948 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r0, #0 - str r1, [sp] - mov r0, #4 - mov r1, #0xb4 - str r2, [sp, #4] - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - add r1, r4, #0 - mov r2, #0xb4 - str r0, [sp, #0x1c] - bl sub_020C4BB8 - add r0, r7, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x18] - add r0, r7, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0xc] - add r2, r4, #0 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0xc] - add r2, #0x30 - bl sub_02077660 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x14] - mov r6, #0 -_021E699C: - lsl r0, r6, #2 - add r5, r6, #0 - str r0, [sp, #0x20] - add r0, r4, r0 - add r5, #0x36 - str r0, [sp, #0x10] - ldr r0, [sp] - add r1, r5, #0 - mov r2, #0 - bl sub_02074570 - ldr r1, [sp, #0x20] - mov r2, #0 - str r0, [r4, r1] - ldr r0, [sp, #4] - add r1, r5, #0 - bl sub_02074570 - ldr r1, [sp, #0x10] - str r0, [r1, #0x20] - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #4 - blo _021E699C - add r1, r4, #0 - add r0, r7, #0 - add r1, #0x94 - bl ov5_021E68D8 - add r5, r0, #0 - mov r6, #0 -_021E69DC: - lsl r0, r6, #2 - ldr r1, [r4, r0] - str r0, [sp, #0x24] - cmp r1, #0 - beq _021E6A2C - mov r0, #0 - cmp r5, #0 - bls _021E6A22 -_021E69EC: - lsl r2, r0, #1 - add r2, r4, r2 - add r2, #0x94 - ldrh r2, [r2] - cmp r1, r2 - bne _021E6A18 - lsl r1, r1, #0x10 - add r0, r7, #0 - lsr r1, r1, #0x10 - bl sub_020770C4 - ldr r1, _021E6B3C ; =0x0000FFFF - cmp r0, r1 - bne _021E6A22 - ldr r1, [sp, #0x24] - add r0, r7, #0 - ldr r1, [r4, r1] - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02077134 - b _021E6A22 -_021E6A18: - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, r5 - blo _021E69EC -_021E6A22: - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #4 - blo _021E69DC -_021E6A2C: - mov r0, #0 - str r0, [sp, #8] -_021E6A30: - ldr r0, [sp, #8] - lsl r6, r0, #2 - ldr r0, [r4, r6] - cmp r0, #0 - beq _021E6A88 - mov r5, #0 -_021E6A3C: - mov r0, #0x52 - lsl r0, r0, #2 - add r0, r5, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D268 - ldr r1, [r4, r6] - cmp r1, r0 - bne _021E6A7E - lsl r2, r5, #0x18 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0xc] - lsr r2, r2, #0x18 - bl sub_02077FE4 - cmp r0, #0 - beq _021E6A7E - ldr r1, [r4, r6] - add r0, r7, #0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_020770C4 - ldr r1, _021E6B3C ; =0x0000FFFF - cmp r0, r1 - bne _021E6A7E - ldr r1, [r4, r6] - add r0, r7, #0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02077134 -_021E6A7E: - add r0, r5, #1 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #0x64 - blo _021E6A3C -_021E6A88: - ldr r0, [sp, #8] - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - cmp r0, #4 - blo _021E6A30 - mov r6, #0 -_021E6A98: - lsl r1, r6, #2 - ldr r0, [r4, r1] - cmp r0, #0 - beq _021E6AD8 - mov r3, #0 -_021E6AA2: - lsl r2, r3, #2 - add r2, r4, r2 - ldr r0, [r4, r1] - ldr r2, [r2, #0x20] - cmp r0, r2 - bne _021E6AC4 - cmp r0, #0 - beq _021E6AC4 - ldr r2, [sp, #0x1c] - add r5, r2, #0 - add r5, r5, #1 - lsl r5, r5, #0x10 - lsr r5, r5, #0x10 - lsl r2, r2, #2 - str r5, [sp, #0x1c] - add r2, r4, r2 - str r0, [r2, #0x10] -_021E6AC4: - add r0, r3, #1 - lsl r0, r0, #0x10 - lsr r3, r0, #0x10 - cmp r3, #4 - blo _021E6AA2 - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #4 - blo _021E6A98 -_021E6AD8: - mov r6, #0 -_021E6ADA: - lsl r0, r6, #2 - add r5, r4, r0 - ldr r3, [r5, #0x10] - cmp r3, #0 - beq _021E6B30 - ldr r0, [sp, #0x14] - mov r2, #0 - cmp r0, #0 - bls _021E6B26 -_021E6AEC: - lsl r0, r2, #1 - add r0, r4, r0 - ldrh r1, [r0, #0x30] - cmp r1, #0 - beq _021E6B1A - ldr r0, [r5, #0x10] - cmp r0, r1 - bne _021E6B1A - lsl r1, r3, #0x10 - add r0, r7, #0 - lsr r1, r1, #0x10 - bl sub_020770C4 - ldr r1, _021E6B3C ; =0x0000FFFF - cmp r0, r1 - bne _021E6B26 - ldr r1, [r5, #0x10] - add r0, r7, #0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_02077134 - b _021E6B26 -_021E6B1A: - add r0, r2, #1 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - ldr r0, [sp, #0x14] - cmp r2, r0 - blo _021E6AEC -_021E6B26: - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #4 - blo _021E6ADA -_021E6B30: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E6B3C: .word 0x0000FFFF - thumb_func_end ov5_021E6948 - - thumb_func_start ov5_021E6B40 -ov5_021E6B40: ; 0x021E6B40 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl sub_02026270 - add r0, r4, #0 - mov r1, #0 - bl sub_02026278 - pop {r4, pc} - thumb_func_end ov5_021E6B40 - - thumb_func_start ov5_021E6B54 -ov5_021E6B54: ; 0x021E6B54 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r0, r1, #0 - add r1, sp, #0 - bl ov5_021E6668 - ldr r2, _021E6BC4 ; =0x021F9F6C - mov r3, #0 - mov r1, #6 -_021E6B68: - add r0, r3, #0 - mul r0, r1 - ldrh r0, [r2, r0] - cmp r5, r0 - bne _021E6B76 - add r6, r3, #0 - b _021E6B80 -_021E6B76: - add r0, r3, #1 - lsl r0, r0, #0x10 - lsr r3, r0, #0x10 - cmp r3, #9 - blo _021E6B68 -_021E6B80: - cmp r3, #9 - bne _021E6B8A - add sp, #8 - add r0, r5, #0 - pop {r4, r5, r6, pc} -_021E6B8A: - ldr r0, [sp] - mov r1, #6 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [sp, #4] - mov r1, #6 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r2, r0, #0x10 - mov r0, #6 - add r1, r6, #0 - mul r1, r0 - ldr r0, _021E6BC8 ; =0x021F9F6E - ldrh r0, [r0, r1] - cmp r4, r0 - beq _021E6BBC - cmp r2, r0 - beq _021E6BBC - ldr r0, _021E6BCC ; =0x021F9F70 - ldrh r5, [r0, r1] -_021E6BBC: - add r0, r5, #0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_021E6BC4: .word 0x021F9F6C -_021E6BC8: .word 0x021F9F6E -_021E6BCC: .word 0x021F9F70 - thumb_func_end ov5_021E6B54 - - thumb_func_start ov5_021E6BD0 -ov5_021E6BD0: ; 0x021E6BD0 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - add r0, r1, #0 - add r1, sp, #0 - bl ov5_021E6668 - ldr r0, [sp] - mov r1, #6 - mov r2, #0 - bl sub_02074570 - add r5, r0, #0 - ldr r0, [sp, #4] - mov r1, #6 - mov r2, #0 - bl sub_02074570 - cmp r5, #0xec - beq _021E6BFC - cmp r0, #0xec - bne _021E6C16 -_021E6BFC: - mov r1, #0x56 - add r0, r4, #0 - lsl r1, r1, #2 - bl sub_020770C4 - ldr r1, _021E6C1C ; =0x0000FFFF - cmp r0, r1 - bne _021E6C16 - mov r1, #0x56 - add r0, r4, #0 - lsl r1, r1, #2 - bl sub_02077134 -_021E6C16: - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021E6C1C: .word 0x0000FFFF - thumb_func_end ov5_021E6BD0 - - thumb_func_start ov5_021E6C20 -ov5_021E6C20: ; 0x021E6C20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r1, sp, #4 - str r0, [sp] - bl ov5_021E6668 - mov r4, #0 - add r7, sp, #4 -_021E6C32: - lsl r6, r4, #2 - ldr r0, [r7, r6] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - lsl r1, r4, #1 - add r2, sp, #0xc - strh r0, [r2, r1] - add r0, r2, #0 - ldrh r0, [r0, r1] - cmp r0, #0x84 - bne _021E6C56 - mov r0, #1 - eor r0, r4 - strb r0, [r5] - strb r4, [r5, #1] - b _021E6C68 -_021E6C56: - ldr r0, [r7, r6] - bl sub_02075D74 - cmp r0, #1 - bne _021E6C68 - mov r0, #1 - strb r4, [r5] - eor r0, r4 - strb r0, [r5, #1] -_021E6C68: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #2 - blo _021E6C32 - ldrb r0, [r5] - lsl r1, r0, #1 - add r0, sp, #0xc - ldrh r0, [r0, r1] - bl sub_02076F84 - add r4, r0, #0 - cmp r4, #0x1d - bne _021E6C98 - ldr r0, [sp] - bl sub_02026248 - mov r1, #2 - lsl r1, r1, #0xe - tst r0, r1 - beq _021E6C96 - mov r4, #0x20 - b _021E6C98 -_021E6C96: - mov r4, #0x1d -_021E6C98: - ldr r0, _021E6CE4 ; =0x0000013A - cmp r4, r0 - bne _021E6CB2 - ldr r0, [sp] - bl sub_02026248 - mov r1, #2 - lsl r1, r1, #0xe - tst r0, r1 - beq _021E6CB0 - ldr r4, _021E6CE8 ; =0x00000139 - b _021E6CB2 -_021E6CB0: - ldr r4, _021E6CE4 ; =0x0000013A -_021E6CB2: - ldr r0, _021E6CEC ; =0x000001EA - cmp r4, r0 - bne _021E6CBA - sub r4, r0, #1 -_021E6CBA: - ldrb r0, [r5, #1] - lsl r1, r0, #1 - add r0, sp, #0xc - ldrh r0, [r0, r1] - cmp r0, #0x84 - bne _021E6CDE - ldrb r0, [r5] - lsl r1, r0, #2 - add r0, sp, #4 - ldr r0, [r0, r1] - bl sub_02075D74 - cmp r0, #1 - beq _021E6CDE - ldrb r1, [r5, #1] - ldrb r0, [r5] - strb r0, [r5, #1] - strb r1, [r5] -_021E6CDE: - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E6CE4: .word 0x0000013A -_021E6CE8: .word 0x00000139 -_021E6CEC: .word 0x000001EA - thumb_func_end ov5_021E6C20 - - thumb_func_start ov5_021E6CF0 -ov5_021E6CF0: ; 0x021E6CF0 - push {r0, r1, r2, r3} - push {r4, r5, r6, lr} - sub sp, #0x20 - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0x13 - add r4, r3, #0 - bl sub_020759F0 - add r1, sp, #0x10 - strb r0, [r1] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - mov r3, #0x20 - bl sub_02073D80 - mov r1, #0 - add r0, sp, #0x10 - strb r1, [r0, #2] - mov r1, #4 - strh r1, [r0, #4] - add r0, r5, #0 - mov r1, #0x9b - add r2, sp, #0x14 - bl sub_02074B30 - add r0, r5, #0 - mov r1, #9 - add r2, sp, #0x10 - bl sub_02074B30 - add r2, sp, #0x10 - add r0, r5, #0 - mov r1, #0x9c - add r2, #2 - bl sub_02074B30 - add r0, sp, #0x30 - ldrb r0, [r0, #8] - cmp r0, #0 - beq _021E6D5A - add r0, r5, #0 - mov r1, #0x98 - add r2, sp, #0x38 - bl sub_02074B30 -_021E6D5A: - add r2, sp, #0x10 - mov r1, #1 - add r0, sp, #0x10 - strb r1, [r0, #1] - add r0, r5, #0 - mov r1, #0x4c - add r2, #1 - bl sub_02074B30 - ldr r0, _021E6DE4 ; =0x000001EE - mov r1, #4 - bl sub_0200B32C - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0x77 - add r2, r6, #0 - bl sub_02074B30 - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x40] - cmp r0, #4 - bne _021E6DCA - add r0, r4, #0 - bl sub_02025F20 - str r0, [sp, #0x1c] - add r0, r4, #0 - bl sub_02025F30 - str r0, [sp, #0x18] - add r0, r4, #0 - mov r1, #0x20 - bl sub_02025F04 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0x91 - add r2, r6, #0 - bl sub_02074B30 - add r0, r5, #0 - mov r1, #7 - add r2, sp, #0x1c - bl sub_02074B30 - add r0, r5, #0 - mov r1, #0x9d - add r2, sp, #0x18 - bl sub_02074B30 - add r0, r6, #0 - bl sub_020237BC -_021E6DCA: - mov r0, #0 - str r0, [sp] - ldr r2, [sp, #0x40] - ldr r3, [sp, #0x44] - add r0, r5, #0 - add r1, r4, #0 - bl sub_0209304C - add sp, #0x20 - pop {r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 -_021E6DE4: .word 0x000001EE - thumb_func_end ov5_021E6CF0 - - thumb_func_start ov5_021E6DE8 -ov5_021E6DE8: ; 0x021E6DE8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0x10] - add r7, r0, #0 - ldr r0, [sp, #0x10] - mov r1, #0x13 - add r5, r2, #0 - add r6, r3, #0 - bl sub_020759F0 - add r1, sp, #0x14 - strb r0, [r1] - add r0, r5, #0 - bl sub_02026248 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02026280 - cmp r0, #0 - beq _021E6E3A - add r0, r6, #0 - add r1, r4, #0 - bl sub_02075E38 - cmp r0, #0 - bne _021E6E3A - mov r5, #0 -_021E6E20: - add r0, r4, #0 - bl sub_0201D30C - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl sub_02075E38 - cmp r0, #0 - bne _021E6E3A - add r5, r5, #1 - cmp r5, #4 - blt _021E6E20 -_021E6E3A: - mov r2, #1 - str r2, [sp] - str r4, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - add r0, r7, #0 - mov r3, #0x20 - bl sub_02073D80 - add r2, sp, #0x14 - mov r1, #0 - add r0, sp, #0x14 - strb r1, [r0, #1] - mov r1, #4 - strh r1, [r0, #2] - add r0, r7, #0 - mov r1, #0x9b - add r2, #2 - bl sub_02074B30 - add r0, r7, #0 - mov r1, #9 - add r2, sp, #0x14 - bl sub_02074B30 - add r2, sp, #0x14 - add r0, r7, #0 - mov r1, #0x9c - add r2, #1 - bl sub_02074B30 - add r0, r7, #0 - mov r1, #0x70 - add r2, sp, #0x30 - bl sub_02074B30 - ldr r0, _021E6EA4 ; =0x000001EE - mov r1, #4 - bl sub_0200B32C - add r4, r0, #0 - add r0, r7, #0 - mov r1, #0x77 - add r2, r4, #0 - bl sub_02074B30 - add r0, r4, #0 - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E6EA4: .word 0x000001EE - thumb_func_end ov5_021E6DE8 - - thumb_func_start ov5_021E6EA8 -ov5_021E6EA8: ; 0x021E6EA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #4 - str r1, [sp, #4] - add r7, r2, #0 - bl sub_02073C74 - add r1, sp, #0x10 - add r4, r0, #0 - add r0, r5, #0 - add r1, #1 - bl ov5_021E6C20 - add r1, r5, #0 - bl ov5_021E6B54 - add r6, r0, #0 - add r0, r7, #0 - bl sub_02025F20 - add r1, sp, #0x10 - str r0, [sp, #8] - ldrb r1, [r1, #1] - add r0, r5, #0 - bl ov5_021E622C - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r3, [sp, #8] - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov5_021E6DE8 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021E67B0 - add r1, sp, #0x10 - ldrb r1, [r1, #2] - add r0, r5, #0 - bl ov5_021E622C - add r1, sp, #0x10 - str r0, [sp, #0xc] - ldrb r1, [r1, #1] - add r0, r5, #0 - bl ov5_021E622C - add r2, r0, #0 - ldr r1, [sp, #0xc] - add r0, r4, #0 - bl ov5_021E6948 - mov r0, #1 - mov r1, #0 - bl sub_02017070 - add r3, r0, #0 - mov r0, #4 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - mov r2, #3 - bl sub_0209304C - cmp r6, #0xac - bne _021E6F44 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021E6BD0 -_021E6F44: - mov r1, #1 - add r0, sp, #0x10 - strb r1, [r0] - add r0, r4, #0 - mov r1, #0x4c - add r2, sp, #0x10 - bl sub_02074B30 - ldr r0, [sp, #4] - add r1, r4, #0 - bl sub_0207A048 - add r0, r5, #0 - bl ov5_021E6B40 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021E6EA8 - - thumb_func_start ov5_021E6F6C -ov5_021E6F6C: ; 0x021E6F6C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_0207A0F8 - add r6, r0, #0 - mov r4, #0 - cmp r6, #0 - ble _021E6FBC - mov r7, #0xad -_021E6F7E: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0207A0FC - add r1, r7, #0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _021E6FB2 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #0xa - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x28 - beq _021E6FAE - cmp r0, #0x31 - bne _021E6FB2 -_021E6FAE: - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_021E6FB2: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, r6 - blt _021E6F7E -_021E6FBC: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E6F6C - - thumb_func_start ov5_021E6FC0 -ov5_021E6FC0: ; 0x021E6FC0 - push {r4, r5, r6, r7} - mov r4, #0 - add r3, r4, #0 -_021E6FC6: - ldrh r7, [r0] - add r5, r3, #0 - add r6, r1, #0 -_021E6FCC: - ldrh r2, [r6] - cmp r7, r2 - bne _021E6FD8 - mov r0, #1 - pop {r4, r5, r6, r7} - bx lr -_021E6FD8: - add r5, r5, #1 - add r6, r6, #2 - cmp r5, #2 - blt _021E6FCC - add r4, r4, #1 - add r0, r0, #2 - cmp r4, #2 - blt _021E6FC6 - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E6FC0 - - thumb_func_start ov5_021E6FF0 -ov5_021E6FF0: ; 0x021E6FF0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #4] - add r0, sp, #0x10 - add r4, sp, #0x18 - str r0, [sp] - add r7, sp, #8 - add r6, sp, #0x1c -_021E7004: - ldr r0, [r5, #0] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - strh r0, [r4] - ldr r0, [r5, #0] - mov r1, #7 - mov r2, #0 - bl sub_02074570 - ldr r1, [sp] - str r0, [r1, #0] - mov r1, #0 - ldr r0, [r5, #0] - add r2, r1, #0 - bl sub_02074570 - add r1, r0, #0 - ldrh r0, [r4] - bl sub_02075DAC - stmia r7!, {r0} - ldrh r0, [r4] - mov r1, #0x16 - bl sub_020759F0 - strh r0, [r6] - ldrh r0, [r4] - mov r1, #0x17 - bl sub_020759F0 - strh r0, [r6, #2] - ldr r0, [sp] - add r5, r5, #4 - add r0, r0, #4 - str r0, [sp] - ldr r0, [sp, #4] - add r4, r4, #2 - add r0, r0, #1 - add r6, r6, #4 - str r0, [sp, #4] - cmp r0, #2 - blo _021E7004 - add r0, sp, #8 - ldrh r1, [r0, #0x14] - cmp r1, #0xf - beq _021E706A - ldrh r0, [r0, #0x18] - cmp r0, #0xf - bne _021E7070 -_021E706A: - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021E7070: - cmp r1, #0xd - bne _021E707E - cmp r0, #0xd - bne _021E707E - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021E707E: - cmp r1, #0xd - beq _021E7086 - cmp r0, #0xd - bne _021E709A -_021E7086: - ldr r1, [sp, #0x10] - ldr r0, [sp, #0x14] - cmp r1, r0 - bne _021E7094 - add sp, #0x24 - mov r0, #0x14 - pop {r4, r5, r6, r7, pc} -_021E7094: - add sp, #0x24 - mov r0, #0x32 - pop {r4, r5, r6, r7, pc} -_021E709A: - ldr r1, [sp, #0xc] - ldr r0, [sp, #8] - cmp r0, r1 - bne _021E70A8 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021E70A8: - cmp r0, #2 - beq _021E70B0 - cmp r1, #2 - bne _021E70B6 -_021E70B0: - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021E70B6: - add r0, sp, #0x1c - add r1, sp, #0x20 - bl ov5_021E6FC0 - cmp r0, #0 - bne _021E70C8 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021E70C8: - add r0, sp, #8 - ldrh r1, [r0, #0x10] - ldrh r0, [r0, #0x12] - cmp r1, r0 - bne _021E70E6 - ldr r1, [sp, #0x10] - ldr r0, [sp, #0x14] - cmp r1, r0 - beq _021E70E0 - add sp, #0x24 - mov r0, #0x46 - pop {r4, r5, r6, r7, pc} -_021E70E0: - add sp, #0x24 - mov r0, #0x32 - pop {r4, r5, r6, r7, pc} -_021E70E6: - ldr r1, [sp, #0x10] - ldr r0, [sp, #0x14] - cmp r1, r0 - beq _021E70F4 - add sp, #0x24 - mov r0, #0x32 - pop {r4, r5, r6, r7, pc} -_021E70F4: - mov r0, #0x14 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E6FF0 - - thumb_func_start ov5_021E70FC -ov5_021E70FC: ; 0x021E70FC - push {r3, lr} - sub sp, #8 - add r1, sp, #0 - bl ov5_021E6668 - add r0, sp, #0 - bl ov5_021E6FF0 - add sp, #8 - pop {r3, pc} - thumb_func_end ov5_021E70FC - - thumb_func_start ov5_021E7110 -ov5_021E7110: ; 0x021E7110 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02055BC4 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02055BB8 - mov r1, #0x64 - mul r1, r0 - add r0, r4, #0 - add r5, r5, r1 - bl sub_02055C40 - cmp r0, #0 - beq _021E7134 - mov r0, #0xff - pop {r3, r4, r5, pc} -_021E7134: - ldr r2, _021E7150 ; =0x021F9F54 - mov r1, #0 -_021E7138: - ldrh r0, [r2] - cmp r5, r0 - bne _021E7142 - mov r0, #0xe6 - pop {r3, r4, r5, pc} -_021E7142: - add r1, r1, #1 - add r2, r2, #2 - cmp r1, #0xc - blo _021E7138 - mov r0, #0xff - pop {r3, r4, r5, pc} - nop -_021E7150: .word 0x021F9F54 - thumb_func_end ov5_021E7110 - - thumb_func_start ov5_021E7154 -ov5_021E7154: ; 0x021E7154 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - add r1, sp, #8 - str r0, [sp] - str r2, [sp, #4] - bl ov5_021E6668 - mov r6, #0 - add r4, r6, #0 - add r5, sp, #8 -_021E716A: - ldr r0, [r5, #0] - mov r1, #0xac - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021E7188 - ldr r0, [sp] - add r1, r4, #0 - bl sub_02026218 - mov r1, #1 - bl sub_02026260 - add r6, r6, #1 -_021E7188: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blo _021E716A - ldr r0, [sp] - bl sub_02026234 - cmp r0, #0 - bne _021E71D4 - cmp r6, #2 - bne _021E71D4 - ldr r0, [sp] - mov r1, #1 - bl sub_02026218 - bl sub_02026228 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0xff - bne _021E71D4 - ldr r0, [sp] - bl ov5_021E70FC - add r4, r0, #0 - bl sub_0201D2E8 - mov r1, #0x64 - mul r1, r0 - add r0, r1, #0 - ldr r1, _021E7274 ; =0x0000FFFF - bl sub_020E2178 - cmp r4, r0 - bls _021E71D4 - ldr r0, [sp] - bl ov5_021E6720 -_021E71D4: - ldr r0, [sp] - bl sub_02026250 - add r4, r0, #0 - ldr r0, [sp] - add r1, r4, #1 - bl sub_02026278 - ldr r0, [sp, #4] - bl ov5_021E7110 - add r1, r4, #1 - cmp r1, r0 - bne _021E726C - ldr r0, [sp] - mov r1, #0 - bl sub_02026278 - add r0, r7, #0 - bl ov5_021E6F6C - add r6, r0, #0 - add r0, r7, #0 - mov r5, #0 - bl sub_0207A0F8 - cmp r0, #0 - bls _021E726C -_021E720C: - add r0, r7, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0x4c - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _021E7260 - add r0, r4, #0 - mov r1, #3 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _021E7260 - add r0, r4, #0 - mov r1, #9 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x10] - cmp r0, #0 - beq _021E725A - cmp r0, r6 - blo _021E724A - sub r0, r0, r6 - str r0, [sp, #0x10] - b _021E724E -_021E724A: - sub r0, r0, #1 - str r0, [sp, #0x10] -_021E724E: - add r0, r4, #0 - mov r1, #9 - add r2, sp, #0x10 - bl sub_02074B30 - b _021E7260 -_021E725A: - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021E7260: - add r0, r7, #0 - add r5, r5, #1 - bl sub_0207A0F8 - cmp r5, r0 - blo _021E720C -_021E726C: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021E7274: .word 0x0000FFFF - thumb_func_end ov5_021E7154 - - thumb_func_start ov5_021E7278 -ov5_021E7278: ; 0x021E7278 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_0207A0F8 - add r6, r0, #0 - mov r5, #0 - cmp r6, #0 - ble _021E72B6 -_021E7288: - add r0, r7, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0x4c - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _021E72B0 - add r0, r4, #0 - mov r1, #9 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _021E72B0 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E72B0: - add r5, r5, #1 - cmp r5, r6 - blt _021E7288 -_021E72B6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E7278 - - thumb_func_start ov5_021E72BC -ov5_021E72BC: ; 0x021E72BC - push {r4, lr} - sub sp, #8 - add r4, r1, #0 - add r1, sp, #0 - bl ov5_021E6668 - ldr r0, [sp] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021E72EA - ldr r2, [sp] - add r0, r4, #0 - mov r1, #0 - bl sub_0200B5CC - ldr r2, [sp] - add r0, r4, #0 - mov r1, #2 - bl sub_0200B5EC -_021E72EA: - ldr r0, [sp, #4] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _021E7302 - ldr r2, [sp, #4] - add r0, r4, #0 - mov r1, #1 - bl sub_0200B5CC -_021E7302: - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E72BC - - thumb_func_start ov5_021E7308 -ov5_021E7308: ; 0x021E7308 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r1, sp, #0x18 - ldrb r6, [r1, #0x10] - add r5, r0, #0 - add r7, r2, #0 - add r1, r6, #0 - str r3, [sp, #8] - bl sub_02026218 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021E622C - add r5, r0, #0 - ldr r0, [sp, #0x2c] - add r1, r4, #0 - add r2, r5, #0 - bl sub_0200B5CC - ldr r0, [sp, #0xc] - bl sub_02026228 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021E6520 - lsl r0, r0, #0x18 - lsr r2, r0, #0x18 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - add r1, r7, #0 - mov r3, #3 - bl sub_0200B60C - add r0, r5, #0 - mov r1, #0x6f - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #2 - beq _021E7390 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #0x1d - beq _021E7380 - cmp r0, #0x20 - bne _021E7390 -_021E7380: - add r0, r5, #0 - mov r1, #0x4d - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _021E7390 - mov r4, #2 -_021E7390: - ldr r0, [sp, #0x2c] - ldr r1, [sp, #8] - add r2, r4, #0 - bl sub_0200BCF0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E7308 - - thumb_func_start ov5_021E73A0 -ov5_021E73A0: ; 0x021E73A0 - push {r3, r4, r5, lr} - add r5, r2, #0 - bl sub_0207A0FC - add r4, r0, #0 - bl sub_02076B10 - add r2, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl sub_0200B5CC - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E73A0 - - thumb_func_start ov5_021E73C8 -ov5_021E73C8: ; 0x021E73C8 - push {r4, lr} - add r4, r0, #0 - bl sub_02026234 - cmp r0, #0 - beq _021E73D8 - mov r0, #1 - pop {r4, pc} -_021E73D8: - add r0, r4, #0 - bl ov5_021E6238 - cmp r0, #0 - beq _021E73EA - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r4, pc} -_021E73EA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E73C8 - - thumb_func_start ov5_021E73F0 -ov5_021E73F0: ; 0x021E73F0 - cmp r0, #0x14 - bhi _021E73FC - bhs _021E740E - cmp r0, #0 - beq _021E740A - b _021E741A -_021E73FC: - cmp r0, #0x32 - bhi _021E7404 - beq _021E7412 - b _021E741A -_021E7404: - cmp r0, #0x46 - beq _021E7416 - b _021E741A -_021E740A: - mov r0, #3 - bx lr -_021E740E: - mov r0, #2 - bx lr -_021E7412: - mov r0, #1 - bx lr -_021E7416: - mov r0, #0 - bx lr -_021E741A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E73F0 - - thumb_func_start ov5_021E7420 -ov5_021E7420: ; 0x021E7420 - push {r3, lr} - bl ov5_021E70FC - bl ov5_021E73F0 - pop {r3, pc} - thumb_func_end ov5_021E7420 - - thumb_func_start ov5_021E742C -ov5_021E742C: ; 0x021E742C - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r4, r0, #0 - add r5, r1, #0 - mov r0, #8 - bl sub_02023790 - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_02073C74 - add r6, r0, #0 - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x14] - mov r5, #0 - add r7, sp, #0x34 -_021E7458: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x36 - mov r2, #0 - bl sub_02074470 - lsl r1, r5, #1 - strh r0, [r7, r1] - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x3a - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x30 - strb r0, [r1, r5] - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #4 - blo _021E7458 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_02074470 - add r7, r0, #0 - mov r5, #0 -_021E7490: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x46 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x24 - add r1, #2 - strb r0, [r1, r5] - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #6 - blo _021E7490 - add r0, r4, #0 - mov r1, #0xc - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #9] - add r0, r4, #0 - mov r1, #0x7a - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #8] - add r0, r4, #0 - mov r1, #0xb - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #7] - add r0, r4, #0 - mov r1, #0x9a - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #0xa] - add r0, r4, #0 - mov r1, #0x6e - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #5] - ldr r2, [sp, #0x10] - add r0, r4, #0 - mov r1, #0x91 - bl sub_02074470 - add r0, r4, #0 - mov r1, #0x9d - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #3] - add r0, r4, #0 - mov r1, #7 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x2c] - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #4] - ldr r1, _021E7718 ; =0x000001EA - ldr r0, [sp, #0x14] - cmp r0, r1 - bne _021E7564 - add r0, r4, #0 - mov r1, #0x98 - mov r2, #0 - bl sub_02074470 - add r5, r0, #0 - mov r0, #2 - mov r1, #1 - bl sub_02017070 - cmp r5, r0 - bne _021E7564 - ldr r0, [sp, #0x2c] - add r1, r7, #0 - bl sub_02075E38 - cmp r0, #0 - beq _021E7564 -_021E7550: - add r0, r7, #0 - bl sub_0201D30C - add r7, r0, #0 - ldr r0, [sp, #0x2c] - add r1, r7, #0 - bl sub_02075E38 - cmp r0, #0 - bne _021E7550 -_021E7564: - mov r2, #1 - str r2, [sp] - str r7, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r1, [sp, #0x14] - add r0, r6, #0 - mov r3, #0x20 - bl sub_02073D80 - mov r5, #0 - add r7, sp, #0x34 -_021E757E: - add r1, r5, #0 - lsl r2, r5, #1 - add r0, r6, #0 - add r1, #0x36 - add r2, r7, r2 - bl sub_02074B30 - add r1, r5, #0 - add r2, sp, #0x30 - add r0, r6, #0 - add r1, #0x3a - add r2, r2, r5 - bl sub_02074B30 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #4 - blo _021E757E - add r7, sp, #0x24 - mov r5, #0 - add r7, #2 -_021E75AA: - add r1, r5, #0 - add r0, r6, #0 - add r1, #0x46 - add r2, r7, r5 - bl sub_02074B30 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #6 - blo _021E75AA - add r2, sp, #0x20 - add r0, r6, #0 - mov r1, #0xc - add r2, #1 - bl sub_02074B30 - add r0, r6, #0 - mov r1, #0x7a - add r2, sp, #0x20 - bl sub_02074B30 - add r2, sp, #0x1c - add r0, r6, #0 - mov r1, #0xb - add r2, #3 - bl sub_02074B30 - add r2, sp, #0x1c - mov r1, #0x78 - add r0, sp, #0x18 - strb r1, [r0, #6] - add r0, r6, #0 - mov r1, #9 - add r2, #2 - bl sub_02074B30 - add r2, sp, #0x20 - add r0, r6, #0 - mov r1, #0x9a - add r2, #2 - bl sub_02074B30 - add r2, sp, #0x1c - add r0, r6, #0 - mov r1, #0x6e - add r2, #1 - bl sub_02074B30 - ldr r2, [sp, #0x10] - add r0, r6, #0 - mov r1, #0x91 - bl sub_02074B30 - add r2, sp, #0x18 - add r0, r6, #0 - mov r1, #0x9d - add r2, #3 - bl sub_02074B30 - add r0, r6, #0 - mov r1, #7 - add r2, sp, #0x2c - bl sub_02074B30 - add r0, r6, #0 - mov r1, #0x70 - add r2, sp, #0x1c - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0x98 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strh r0, [r1, #0xc] - add r0, r4, #0 - mov r1, #0x92 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #2] - add r0, r4, #0 - mov r1, #0x93 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #1] - add r0, r4, #0 - mov r1, #0x94 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1] - add r0, r6, #0 - mov r1, #0x98 - add r2, sp, #0x24 - bl sub_02074B30 - add r2, sp, #0x18 - add r0, r6, #0 - mov r1, #0x92 - add r2, #2 - bl sub_02074B30 - add r2, sp, #0x18 - add r0, r6, #0 - mov r1, #0x93 - add r2, #1 - bl sub_02074B30 - add r0, r6, #0 - mov r1, #0x94 - add r2, sp, #0x18 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0x99 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strh r0, [r1, #0xc] - add r0, r4, #0 - mov r1, #0x95 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #2] - add r0, r4, #0 - mov r1, #0x96 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1, #1] - add r0, r4, #0 - mov r1, #0x97 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x18 - strb r0, [r1] - add r0, r6, #0 - mov r1, #0x99 - add r2, sp, #0x24 - bl sub_02074B30 - add r2, sp, #0x18 - add r0, r6, #0 - mov r1, #0x95 - add r2, #2 - bl sub_02074B30 - add r2, sp, #0x18 - add r0, r6, #0 - mov r1, #0x96 - add r2, #1 - bl sub_02074B30 - add r0, r6, #0 - mov r1, #0x97 - add r2, sp, #0x18 - bl sub_02074B30 - add r0, r6, #0 - add r1, r4, #0 - bl sub_020775EC - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020181C4 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_021E7718: .word 0x000001EA - thumb_func_end ov5_021E742C - - thumb_func_start ov5_021E771C -ov5_021E771C: ; 0x021E771C - push {r4, r5, lr} - sub sp, #0x1c - mov r3, #0x46 - add r2, sp, #0 - strb r3, [r2, #3] - mov r5, #0 - strb r5, [r2, #2] - mov r3, #4 - strb r3, [r2, #1] - add r4, r0, #0 - strb r5, [r2] - bl ov5_021E742C - add r2, sp, #0 - add r0, r4, #0 - mov r1, #0x4c - add r2, #3 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #5 - add r2, r5, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r1, r5, #0 - add r2, sp, #4 - bl sub_0200B274 - add r0, r4, #0 - mov r1, #0x75 - add r2, sp, #4 - bl sub_02074B30 - add r2, sp, #0 - add r0, r4, #0 - mov r1, #0x4d - add r2, #2 - bl sub_02074B30 - add r2, sp, #0 - add r0, r4, #0 - mov r1, #0x9b - add r2, #1 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0x9c - add r2, sp, #0 - bl sub_02074B30 - add r0, r4, #0 - bl sub_0207418C - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E771C - - thumb_func_start ov5_021E7790 -ov5_021E7790: ; 0x021E7790 - push {r3, lr} - bl ov5_021E6FF0 - bl ov5_021E73F0 - pop {r3, pc} - thumb_func_end ov5_021E7790 - - thumb_func_start ov5_021E779C -ov5_021E779C: ; 0x021E779C - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r1, #0 - add r1, r6, #0 - bl sub_020E1F6C - add r4, r1, #0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_020E1F6C - cmp r4, r1 - bne _021E77BA - mov r0, #1 - pop {r4, r5, r6, pc} -_021E77BA: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E779C - - thumb_func_start ov5_021E77C0 -ov5_021E77C0: ; 0x021E77C0 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r1, #0 - add r1, r6, #0 - bl sub_020E1F6C - add r4, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_020E1F6C - cmp r4, r0 - bne _021E77DE - mov r0, #1 - pop {r4, r5, r6, pc} -_021E77DE: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E77C0 - - thumb_func_start ov5_021E77E4 -ov5_021E77E4: ; 0x021E77E4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x30 - add r4, r1, #0 - mul r4, r0 - add r1, r5, r4 - ldr r0, [r1, #0x14] - cmp r0, #0 - beq _021E77FC - ldr r0, [r1, #0xc] - bl ov5_021E9640 -_021E77FC: - add r1, r5, r4 - ldr r0, [r1, #0x18] - cmp r0, #0 - beq _021E780A - ldr r0, [r1, #0x10] - bl ov5_021EF23C -_021E780A: - mov r1, #1 - add r0, r5, r4 - str r1, [r0, #0x28] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E77E4 - - thumb_func_start ov5_021E7814 -ov5_021E7814: ; 0x021E7814 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _021E7824 - ldr r0, [r4, #8] - bl ov5_021E9640 -_021E7824: - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021E7830 - ldr r0, [r4, #0xc] - bl ov5_021EF23C -_021E7830: - mov r0, #0 - str r0, [r4, #0x10] - str r0, [r4, #0x14] - pop {r4, pc} - thumb_func_end ov5_021E7814 - - thumb_func_start ov5_021E7838 -ov5_021E7838: ; 0x021E7838 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp, #4] - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r5, [sp, #0x2c] - ldr r4, [sp, #0x38] - cmp r0, #1 - bne _021E7890 - mov r1, #0 - add r2, r4, #0 - sub r0, r1, #1 -_021E7850: - add r1, r1, #1 - stmia r2!, {r0} - cmp r1, #4 - blt _021E7850 - cmp r5, #1 - bne _021E7876 - ldr r0, [sp, #0x30] - cmp r0, #1 - bne _021E786A - mov r0, #0 - add sp, #0x10 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021E786A: - mov r0, #0 - str r0, [r4, #0] - mov r0, #1 - add sp, #0x10 - str r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_021E7876: - mov r0, #0 - str r0, [r4, #0] - mov r0, #1 - str r0, [r4, #4] - cmp r5, #2 - bge _021E7884 - b _021E79A4 -_021E7884: - mov r0, #2 - str r0, [r4, #8] - mov r0, #3 - add sp, #0x10 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_021E7890: - add r0, r3, #0 - cmp r1, r0 - bge _021E789A - bl sub_02022974 -_021E789A: - ldr r1, [sp, #0x28] - ldr r0, [sp, #8] - cmp r0, r1 - bge _021E78A6 - bl sub_02022974 -_021E78A6: - ldr r1, [sp, #4] - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x28] - sub r1, r1, r0 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r7, r0, #5 - ldr r0, [sp, #8] - ldr r2, [sp, #0xc] - sub r0, r0, r3 - asr r1, r0, #4 - lsr r1, r1, #0x1b - add r1, r0, r1 - ldr r0, [sp, #0x34] - asr r6, r1, #5 - str r0, [sp] - ldr r0, [sp, #4] - ldr r1, [sp, #8] - bl ov5_021E8ABC - ldr r1, [sp, #0x34] - bl ov5_021E935C - add r1, r6, #0 - mul r1, r5 - add r1, r7, r1 - cmp r0, #3 - bhi _021E79A0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E78EC: ; jump table - .short _021E78F4 - _021E78EC - 2 ; case 0 - .short _021E791C - _021E78EC - 2 ; case 1 - .short _021E7946 - _021E78EC - 2 ; case 2 - .short _021E7972 - _021E78EC - 2 ; case 3 -_021E78F4: - sub r2, r1, r5 - str r1, [r4, #0xc] - sub r0, r2, #1 - str r0, [r4, #0] - str r2, [r4, #4] - sub r0, r1, #1 - str r0, [r4, #8] - sub r0, r7, #1 - bpl _021E790E - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0] - str r0, [r4, #8] -_021E790E: - sub r0, r6, #1 - bpl _021E79A4 - mov r0, #0 - mvn r0, r0 - add sp, #0x10 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_021E791C: - str r1, [r4, #8] - sub r0, r1, r5 - str r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #4] - add r0, r1, #1 - str r0, [r4, #0xc] - add r0, r7, #1 - cmp r0, r5 - blt _021E7938 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #4] - str r0, [r4, #0xc] -_021E7938: - sub r0, r6, #1 - bpl _021E79A4 - mov r0, #0 - mvn r0, r0 - add sp, #0x10 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021E7946: - str r1, [r4, #4] - sub r0, r1, #1 - add r1, r1, r5 - str r0, [r4, #0] - sub r0, r1, #1 - str r0, [r4, #8] - str r1, [r4, #0xc] - sub r0, r7, #1 - bpl _021E7960 - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0] - str r0, [r4, #8] -_021E7960: - ldr r0, [sp, #0x30] - add r1, r6, #1 - cmp r1, r0 - ble _021E79A4 - mov r0, #0 - mvn r0, r0 - add sp, #0x10 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_021E7972: - str r1, [r4, #0] - add r0, r1, #1 - str r0, [r4, #4] - add r0, r1, r5 - str r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #0xc] - add r0, r7, #1 - cmp r0, r5 - blt _021E798E - mov r0, #0 - mvn r0, r0 - str r0, [r4, #4] - str r0, [r4, #0xc] -_021E798E: - ldr r0, [sp, #0x30] - add r1, r6, #1 - cmp r1, r0 - ble _021E79A4 - mov r0, #0 - mvn r0, r0 - add sp, #0x10 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021E79A0: - bl sub_02022974 -_021E79A4: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E7838 - - thumb_func_start ov5_021E79A8 -ov5_021E79A8: ; 0x021E79A8 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r5, r0, #0 - sub r7, r6, #1 -_021E79B0: - ldr r1, _021E7A40 ; =0x0000086C - mov r0, #4 - bl sub_02018144 - lsl r4, r6, #2 - add r1, r5, r4 - add r1, #0x90 - str r0, [r1, #0] - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - ldr r0, _021E7A44 ; =0x00000864 - mov r1, #0 - str r1, [r2, r0] - add r2, r5, r4 - add r2, #0x90 - ldr r3, [r2, #0] - ldr r2, _021E7A48 ; =0x00000854 - ldr r1, [r5, #0] - add r0, r6, #0 - add r2, r3, r2 - bl ov5_021EEB84 - add r2, r5, r4 - add r2, #0x90 - ldr r3, [r2, #0] - ldr r2, _021E7A4C ; =0x00000858 - ldr r1, [r5, #0] - add r0, r6, #0 - add r2, r3, r2 - bl ov5_021EEB90 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _021E7A0C - mov r0, #4 - bl ov5_021E15F4 - add r1, r5, r4 - add r1, #0x90 - ldr r2, [r1, #0] - ldr r1, _021E7A50 ; =0x00000868 - str r0, [r2, r1] - b _021E7A18 -_021E7A0C: - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - ldr r0, _021E7A50 ; =0x00000868 - mov r1, #0 - str r1, [r2, r0] -_021E7A18: - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - mov r0, #0x86 - lsl r0, r0, #4 - str r7, [r1, r0] - add r1, r5, r4 - add r1, #0x90 - mov r2, #2 - ldr r1, [r1, #0] - add r0, r7, #0 - lsl r2, r2, #0xa - bl sub_020C4BB8 - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #4 - blo _021E79B0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7A40: .word 0x0000086C -_021E7A44: .word 0x00000864 -_021E7A48: .word 0x00000854 -_021E7A4C: .word 0x00000858 -_021E7A50: .word 0x00000868 - thumb_func_end ov5_021E79A8 - - thumb_func_start ov5_021E7A54 -ov5_021E7A54: ; 0x021E7A54 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r5, r0, #0 - add r7, r6, #0 -_021E7A5C: - ldr r1, _021E7AB8 ; =0x0000086C - mov r0, #4 - bl sub_02018144 - lsl r4, r6, #2 - add r1, r5, r4 - add r1, #0x90 - str r0, [r1, #0] - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E7ABC ; =0x00000864 - str r7, [r1, r0] - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _021E7A92 - mov r0, #4 - bl ov5_021E15F4 - add r1, r5, r4 - add r1, #0x90 - ldr r2, [r1, #0] - ldr r1, _021E7AC0 ; =0x00000868 - str r0, [r2, r1] - b _021E7A9C -_021E7A92: - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E7AC0 ; =0x00000868 - str r7, [r1, r0] -_021E7A9C: - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - mov r1, #0 - mov r0, #0x86 - mvn r1, r1 - lsl r0, r0, #4 - str r1, [r2, r0] - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #4 - blo _021E7A5C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7AB8: .word 0x0000086C -_021E7ABC: .word 0x00000864 -_021E7AC0: .word 0x00000868 - thumb_func_end ov5_021E7A54 - - thumb_func_start ov5_021E7AC4 -ov5_021E7AC4: ; 0x021E7AC4 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r5, r0, #0 - add r7, r6, #0 -_021E7ACC: - ldr r1, _021E7B3C ; =0x0000086C - mov r0, #4 - bl sub_02018144 - lsl r4, r6, #2 - add r1, r5, r4 - add r1, #0x90 - str r0, [r1, #0] - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E7B40 ; =0x00000864 - add r2, r5, r4 - str r7, [r1, r0] - add r2, #0x90 - ldr r3, [r2, #0] - ldr r2, _021E7B44 ; =0x00000854 - ldr r1, [r5, #0] - add r0, r6, #0 - add r2, r3, r2 - bl ov5_021EEB84 - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _021E7B14 - mov r0, #4 - bl ov5_021E15F4 - add r1, r5, r4 - add r1, #0x90 - ldr r2, [r1, #0] - ldr r1, _021E7B48 ; =0x00000868 - str r0, [r2, r1] - b _021E7B20 -_021E7B14: - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - ldr r0, _021E7B48 ; =0x00000868 - mov r1, #0 - str r1, [r2, r0] -_021E7B20: - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - mov r1, #0 - mov r0, #0x86 - mvn r1, r1 - lsl r0, r0, #4 - str r1, [r2, r0] - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #4 - blo _021E7ACC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7B3C: .word 0x0000086C -_021E7B40: .word 0x00000864 -_021E7B44: .word 0x00000854 -_021E7B48: .word 0x00000868 - thumb_func_end ov5_021E7AC4 - - thumb_func_start ov5_021E7B4C -ov5_021E7B4C: ; 0x021E7B4C - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r7, r4, #0 -_021E7B54: - lsl r6, r4, #2 - add r0, r5, r6 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E7BA0 ; =0x00000864 - add r2, r5, r6 - str r7, [r1, r0] - add r2, #0x90 - ldr r3, [r2, #0] - ldr r2, _021E7BA4 ; =0x00000854 - ldr r1, [r5, #0] - add r0, r4, #0 - add r2, r3, r2 - bl ov5_021EEB84 - add r0, r5, r6 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E7BA8 ; =0x00000868 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021E7B84 - bl ov5_021E1610 -_021E7B84: - add r0, r5, r6 - add r0, #0x90 - ldr r2, [r0, #0] - mov r1, #0 - mov r0, #0x86 - mvn r1, r1 - lsl r0, r0, #4 - str r1, [r2, r0] - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021E7B54 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7BA0: .word 0x00000864 -_021E7BA4: .word 0x00000854 -_021E7BA8: .word 0x00000868 - thumb_func_end ov5_021E7B4C - - thumb_func_start ov5_021E7BAC -ov5_021E7BAC: ; 0x021E7BAC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - cmp r6, #0 - beq _021E7BD2 - mov r0, #4 - mov r1, #0x10 - bl sub_02018184 - add r4, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - mov r2, #0 - mov r3, #0x10 - str r4, [sp] - bl sub_02006DC8 - b _021E7BE8 -_021E7BD2: - bl sub_02022974 - mov r0, #0x10 - str r0, [sp] - mov r0, #0x43 - add r1, r7, #0 - mov r2, #4 - mov r3, #0 - bl sub_02006B38 - add r4, r0, #0 -_021E7BE8: - ldr r0, [r4, #0] - str r0, [r5, #0] - ldr r0, [r4, #4] - str r0, [r5, #0xc] - ldr r0, [r4, #8] - str r0, [r5, #4] - ldr r0, [r4, #0xc] - str r0, [r5, #8] - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E7BAC - - thumb_func_start ov5_021E7C00 -ov5_021E7C00: ; 0x021E7C00 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - ldr r4, [sp, #0x40] - lsl r6, r0, #2 - add r0, r4, r6 - ldr r0, [r0, #0x18] - str r1, [sp, #0xc] - ldr r5, [sp, #0x3c] - cmp r0, #0 - blt _021E7CC0 - ldr r1, [sp, #0x38] - mul r1, r3 - cmp r0, r1 - bge _021E7CC0 - add r1, r2, #0 - bl sub_02039F74 - add r1, r0, #0 - ldr r0, _021E7CC4 ; =0x0000FFFF - cmp r1, r0 - beq _021E7CC0 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0x10 - bl ov5_021E7BAC - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - ldr r2, [r4, r6] - bl sub_02006E18 - ldr r1, [r4, r6] - ldr r0, _021E7CC8 ; =0x00000868 - ldr r3, [r1, r0] - cmp r3, #0 - beq _021E7C64 - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - ldr r2, [sp, #0xc] - str r0, [sp] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x1c] - bl ov5_021E16CC -_021E7C64: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - ldr r0, [sp, #0xc] - ldr r7, [r4, r6] - bl ov5_021EFA8C - ldr r3, _021E7CCC ; =0x00000864 - str r0, [sp] - add r0, r7, r3 - add r2, r3, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x10 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xf8 - sub r2, #0x64 - sub r3, #0x10 - ldr r0, [r0, #0] - ldr r1, [sp, #0x14] - add r2, r7, r2 - add r3, r7, r3 - bl ov5_021E976C - str r0, [r4, #8] - ldr r0, [r4, #0x14] - add r3, r4, #0 - add r0, r0, #1 - str r0, [r4, #0x14] - ldr r2, [r4, r6] - ldr r6, _021E7CD0 ; =0x00000858 - add r5, #0xf8 - add r0, r2, r6 - str r0, [sp] - add r0, r4, #0 - add r0, #0x10 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r5, r6, #4 - ldr r1, [sp, #0x18] - ldr r2, [r2, r5] - add r3, #0x14 - bl ov5_021EF1F0 - str r0, [r4, #0xc] -_021E7CC0: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7CC4: .word 0x0000FFFF -_021E7CC8: .word 0x00000868 -_021E7CCC: .word 0x00000864 -_021E7CD0: .word 0x00000858 - thumb_func_end ov5_021E7C00 - - thumb_func_start ov5_021E7CD4 -ov5_021E7CD4: ; 0x021E7CD4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x2c - mov ip, r2 - ldr r2, _021E7D88 ; =0x00000820 - add r7, r1, #0 - add r2, sp - ldr r4, [r2, #0x18] - lsl r6, r0, #2 - add r0, r4, r6 - ldr r0, [r0, #0x18] - add r1, r3, #0 - ldr r5, [r2, #0x14] - cmp r0, #0 - blt _021E7D7C - ldr r2, [r2, #0x10] - mul r2, r1 - cmp r0, r2 - bge _021E7D7C - mov r1, ip - bl sub_02039F74 - add r1, r0, #0 - ldr r0, _021E7D8C ; =0x0000FFFF - cmp r1, r0 - beq _021E7D7C - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0xc - bl ov5_021E7BAC - add r0, r5, #0 - add r0, #0xf8 - mov r1, #2 - ldr r0, [r0, #0] - lsl r1, r1, #0xa - add r2, sp, #0x1c - bl sub_02006E18 - ldr r1, [r4, r6] - ldr r0, _021E7D90 ; =0x00000868 - ldr r3, [r1, r0] - cmp r3, #0 - beq _021E7D4A - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - add r2, r7, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - bl ov5_021E16CC -_021E7D4A: - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - add r0, r7, #0 - ldr r6, [r4, r6] - bl ov5_021EFA8C - ldr r3, _021E7D94 ; =0x00000864 - str r0, [sp] - add r0, r6, r3 - add r2, r3, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x10 - str r0, [sp, #8] - add r5, #0xf8 - sub r2, #0x64 - sub r3, #0x10 - ldr r0, [r5, #0] - ldr r1, [sp, #0x10] - add r2, r6, r2 - add r3, r6, r3 - bl ov5_021E976C - str r0, [r4, #8] -_021E7D7C: - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7D88: .word 0x00000820 -_021E7D8C: .word 0x0000FFFF -_021E7D90: .word 0x00000868 -_021E7D94: .word 0x00000864 - thumb_func_end ov5_021E7CD4 - - thumb_func_start ov5_021E7D98 -ov5_021E7D98: ; 0x021E7D98 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - ldr r4, [sp, #0x38] - lsl r6, r0, #2 - add r0, r4, r6 - ldr r0, [r0, #0x18] - add r7, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r5, [sp, #0x34] - cmp r0, #0 - blt _021E7E1C - ldr r3, [sp, #0x30] - mul r3, r2 - cmp r0, r3 - bge _021E7E1C - bl sub_02039F74 - add r1, r0, #0 - ldr r0, _021E7E20 ; =0x0000FFFF - cmp r1, r0 - beq _021E7E1C - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0xc - bl ov5_021E7BAC - add r0, r5, #0 - add r0, #0xf8 - mov r1, #2 - ldr r0, [r0, #0] - lsl r1, r1, #0xa - bl sub_02006E28 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - bl sub_02006E28 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - add r0, r7, #0 - ldr r6, [r4, r6] - bl ov5_021EFA8C - ldr r3, _021E7E24 ; =0x00000864 - str r0, [sp] - add r0, r6, r3 - add r2, r3, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x10 - str r0, [sp, #8] - add r5, #0xf8 - sub r2, #0x64 - sub r3, #0x10 - ldr r0, [r5, #0] - ldr r1, [sp, #0x10] - add r2, r6, r2 - add r3, r6, r3 - bl ov5_021E976C - str r0, [r4, #8] -_021E7E1C: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7E20: .word 0x0000FFFF -_021E7E24: .word 0x00000864 - thumb_func_end ov5_021E7D98 - - thumb_func_start ov5_021E7E28 -ov5_021E7E28: ; 0x021E7E28 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r4, r1, #0 - str r0, [sp, #0xc] - str r2, [sp, #4] - ldr r6, [sp, #0x44] - add r1, r0, #0 - bmi _021E7F0C - ldr r2, [sp, #0x38] - ldr r1, [sp, #0x3c] - add r5, r2, #0 - mul r5, r1 - add r1, r0, #0 - cmp r1, r5 - bge _021E7F0C - add r1, r3, #0 - bl sub_02039F74 - add r1, r0, #0 - ldr r0, _021E7F10 ; =0x0000FFFF - cmp r1, r0 - beq _021E7F0C - add r0, r6, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0x10 - bl ov5_021E7BAC - add r5, r6, #0 - add r0, r6, #0 - add r0, #0xf8 - lsl r4, r4, #2 - add r5, #0x90 - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - ldr r2, [r5, r4] - bl sub_02006E18 - ldr r1, [r5, r4] - ldr r0, _021E7F14 ; =0x00000868 - ldr r3, [r1, r0] - cmp r3, #0 - beq _021E7E94 - add r0, r6, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - ldr r2, [sp, #4] - str r0, [sp] - add r0, r6, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x1c] - bl ov5_021E16CC -_021E7E94: - ldr r0, [r5, r4] - str r0, [sp, #8] - ldr r0, [sp, #4] - bl ov5_021EFA8C - str r0, [sp] - add r0, r6, #0 - mov r7, #2 - add r0, #0xf8 - ldr r2, [sp, #8] - lsl r7, r7, #0xa - add r2, r2, r7 - ldr r3, [sp, #8] - add r7, #0x54 - ldr r0, [r0, #0] - ldr r1, [sp, #0x14] - add r3, r3, r7 - bl ov5_021E97AC - ldr r1, [sp, #0x40] - cmp r1, #1 - bne _021E7EC4 - bl ov5_021D53A4 -_021E7EC4: - ldr r0, _021E7F18 ; =0x00000864 - ldr r1, [r5, r4] - mov r2, #1 - str r2, [r1, r0] - mov ip, r0 - add r0, r6, #0 - mov r2, ip - mov r3, ip - add r0, #0xf8 - ldr r7, [r5, r4] - sub r2, #8 - sub r3, #0xc - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - ldr r2, [r7, r2] - ldr r3, [r7, r3] - bl ov5_021EF158 - mov r2, #0x86 - ldr r1, [r5, r4] - ldr r0, [sp, #0xc] - lsl r2, r2, #4 - str r0, [r1, r2] - add r0, r6, #0 - add r0, #0xfc - ldr r3, [r0, #0] - cmp r3, #0 - beq _021E7F0C - mov r0, #1 - lsl r0, r0, #8 - ldr r4, [r5, r4] - add r2, #8 - ldr r0, [r6, r0] - ldr r1, [sp, #0xc] - ldr r2, [r4, r2] - blx r3 -_021E7F0C: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E7F10: .word 0x0000FFFF -_021E7F14: .word 0x00000868 -_021E7F18: .word 0x00000864 - thumb_func_end ov5_021E7E28 - - thumb_func_start ov5_021E7F1C -ov5_021E7F1C: ; 0x021E7F1C - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x1fc - sub sp, #0x2c - str r2, [sp, #4] - ldr r2, _021E7FE0 ; =0x00000820 - add r7, r0, #0 - add r2, sp - add r4, r1, #0 - ldr r5, [r2, #0x1c] - cmp r7, #0 - blt _021E7FD2 - ldr r1, [r2, #0x10] - ldr r2, [r2, #0x14] - mul r2, r1 - cmp r7, r2 - bge _021E7FD2 - add r1, r3, #0 - bl sub_02039F74 - add r1, r0, #0 - ldr r0, _021E7FE4 ; =0x0000FFFF - cmp r1, r0 - beq _021E7FD2 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0xc - bl ov5_021E7BAC - add r0, r5, #0 - add r0, #0xf8 - mov r1, #2 - ldr r0, [r0, #0] - lsl r1, r1, #0xa - add r2, sp, #0x1c - bl sub_02006E18 - add r6, r5, #0 - lsl r4, r4, #2 - add r6, #0x90 - ldr r1, [r6, r4] - ldr r0, _021E7FE8 ; =0x00000868 - ldr r3, [r1, r0] - cmp r3, #0 - beq _021E7F92 - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - ldr r2, [sp, #4] - str r0, [sp] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - bl ov5_021E16CC -_021E7F92: - ldr r0, [r6, r4] - str r0, [sp, #8] - ldr r0, [sp, #4] - bl ov5_021EFA8C - str r0, [sp] - add r5, #0xf8 - ldr r0, [r5, #0] - mov r5, #2 - ldr r2, [sp, #8] - lsl r5, r5, #0xa - add r2, r2, r5 - ldr r3, [sp, #8] - add r5, #0x54 - ldr r1, [sp, #0x10] - add r3, r3, r5 - bl ov5_021E97AC - ldr r1, _021E7FE0 ; =0x00000820 - add r1, sp - ldr r1, [r1, #0x18] - cmp r1, #1 - bne _021E7FC4 - bl ov5_021D53A4 -_021E7FC4: - ldr r1, [r6, r4] - ldr r0, _021E7FEC ; =0x00000864 - mov r2, #1 - str r2, [r1, r0] - ldr r1, [r6, r4] - sub r0, r0, #4 - str r7, [r1, r0] -_021E7FD2: - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x1fc - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021E7FE0: .word 0x00000820 -_021E7FE4: .word 0x0000FFFF -_021E7FE8: .word 0x00000868 -_021E7FEC: .word 0x00000864 - thumb_func_end ov5_021E7F1C - - thumb_func_start ov5_021E7FF0 -ov5_021E7FF0: ; 0x021E7FF0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r4, r1, #0 - str r0, [sp, #0xc] - str r2, [sp, #4] - ldr r7, [sp, #0x44] - add r1, r0, #0 - bmi _021E80AA - ldr r2, [sp, #0x38] - ldr r1, [sp, #0x3c] - add r5, r2, #0 - mul r5, r1 - add r1, r0, #0 - cmp r1, r5 - bge _021E80AA - add r1, r3, #0 - bl sub_02039F74 - add r1, r0, #0 - ldr r0, _021E80B0 ; =0x0000FFFF - cmp r1, r0 - beq _021E80AA - add r0, r7, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0x10 - bl ov5_021E7BAC - add r5, r7, #0 - add r0, r7, #0 - add r0, #0xf8 - lsl r4, r4, #2 - add r5, #0x90 - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - ldr r2, [r5, r4] - bl sub_02006E18 - ldr r1, [r5, r4] - ldr r0, _021E80B4 ; =0x00000868 - ldr r3, [r1, r0] - cmp r3, #0 - beq _021E805C - add r0, r7, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - ldr r2, [sp, #4] - str r0, [sp] - add r0, r7, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x1c] - bl ov5_021E16CC -_021E805C: - add r0, r7, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x14] - bl sub_02006E28 - ldr r0, [r5, r4] - ldr r3, _021E80B8 ; =0x0000085C - mov ip, r0 - add r0, r7, #0 - mov r2, ip - add r0, #0xf8 - ldr r2, [r2, r3] - sub r3, r3, #4 - mov r6, ip - str r3, [sp, #8] - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - ldr r3, [r6, r3] - bl ov5_021EF158 - mov r2, #0x86 - ldr r1, [r5, r4] - ldr r0, [sp, #0xc] - lsl r2, r2, #4 - str r0, [r1, r2] - add r0, r7, #0 - add r0, #0xfc - ldr r3, [r0, #0] - cmp r3, #0 - beq _021E80AA - mov r0, #1 - lsl r0, r0, #8 - ldr r4, [r5, r4] - add r2, #8 - ldr r0, [r7, r0] - ldr r1, [sp, #0xc] - ldr r2, [r4, r2] - blx r3 -_021E80AA: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E80B0: .word 0x0000FFFF -_021E80B4: .word 0x00000868 -_021E80B8: .word 0x0000085C - thumb_func_end ov5_021E7FF0 - - thumb_func_start ov5_021E80BC -ov5_021E80BC: ; 0x021E80BC - ldr r1, [r0, #0] - cmp r1, #0 - bne _021E80CC - ldr r0, [r0, #4] - cmp r0, #0 - bne _021E80CC - mov r0, #1 - bx lr -_021E80CC: - mov r0, #0 - bx lr - thumb_func_end ov5_021E80BC - - thumb_func_start ov5_021E80D0 -ov5_021E80D0: ; 0x021E80D0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - str r3, [sp] - add r0, sp, #0x10 - add r7, r1, #0 - ldrb r1, [r0, #0x14] - mov r0, #0x30 - str r2, [sp, #8] - add r5, r1, #0 - mul r5, r0 - add r0, r4, #0 - str r0, [sp, #4] - add r0, #0x2c - str r0, [sp, #4] - ldr r0, [r0, r5] - cmp r0, #0 - beq _021E80F8 - bl sub_02022974 -_021E80F8: - ldr r0, [sp, #4] - mov r1, #1 - str r1, [r0, r5] - add r6, r4, r5 - add r0, sp, #0x10 - add r1, r6, #0 - ldrb r2, [r0, #0x18] - add r1, #0x30 - add r5, r4, #0 - strb r2, [r1] - add r2, r6, #0 - ldr r1, [sp, #8] - str r7, [r6, #0x1c] - str r1, [r6, #0x20] - ldr r1, [sp] - add r2, #0x24 - strb r1, [r2] - ldrb r0, [r0, #0x10] - add r1, r6, #0 - add r1, #0x25 - strb r0, [r1] - ldr r1, [sp] - add r5, #0x90 - lsl r3, r1, #2 - ldr r1, [r5, r3] - lsl r2, r0, #2 - str r1, [r6, #4] - ldr r0, [r5, r2] - add r1, r6, #0 - str r0, [r6, #8] - add r1, #0x26 - mov r0, #0 - strb r0, [r1] - str r0, [r6, #0x28] - add r0, r4, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - bne _021E814E - add r1, r4, #0 - add r1, #0xb4 - mov r0, #0 - str r0, [r1, #0] -_021E814E: - mov r1, #0x86 - ldr r0, [r5, r3] - lsl r1, r1, #4 - str r7, [r0, r1] - ldr r2, [r5, r2] - ldr r0, [sp, #8] - str r0, [r2, r1] - add r0, r4, #0 - add r0, #0xa0 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xa0 - strb r1, [r0] - add r0, r4, #0 - add r0, #0xa1 - ldrb r0, [r0] - add r4, #0xa1 - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - strb r0, [r4] - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021E80D0 - - thumb_func_start ov5_021E8188 -ov5_021E8188: ; 0x021E8188 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r0, r5, #0 - add r0, #0xa2 - ldrb r1, [r0] - add r4, r5, #0 - mov r0, #0x30 - add r2, r1, #0 - mul r2, r0 - add r0, #0xd4 - add r3, r5, #4 - ldr r0, [r5, r0] - add r6, r3, r2 - add r4, #0xcc - cmp r0, #0 - bne _021E81D8 - ldr r0, [r4, #0x20] - cmp r0, #1 - bne _021E81D8 - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _021E8240 - ldr r0, [r4, #0x14] - ldr r1, [r0, #0] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0] - cmp r1, r0 - ble _021E81C6 - bl sub_02022974 -_021E81C6: - ldr r0, [r4, #0x10] - ldr r1, [r0, #0] - ldr r0, [r4, #0x14] - ldr r0, [r0, #0] - sub r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0x10 - cmp r1, r0 - bge _021E81DA -_021E81D8: - b _021E8320 -_021E81DA: - ldr r1, [r4, #0xc] - add r2, sp, #0x10 - ldr r0, [r1, #0] - ldr r1, [r1, #8] - add r3, sp, #0xc - bl ov5_021E9230 - str r5, [sp] - mov r3, #0x43 - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, #8 - ldr r0, [sp, #0x10] - ldr r1, [sp, #0xc] - ldr r3, [r5, r3] - bl ov5_021E8F90 - ldr r2, [r4, #0xc] - add r3, r4, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021E8222 - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - bne _021E8302 -_021E8222: - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021E8236 - bl sub_02022974 -_021E8236: - mov r0, #0 - str r0, [r4, #0x18] - str r0, [r4, #0x10] - str r0, [r4, #0x14] - b _021E8320 -_021E8240: - ldr r2, [r4, #0xc] - ldr r3, [r4, #0] - ldr r7, [r2, #0] - cmp r3, r7 - beq _021E8258 - ldr r1, [r4, #8] - ldr r0, [r2, #8] - cmp r1, r0 - beq _021E8258 - bl sub_02022974 - b _021E8320 -_021E8258: - cmp r3, r7 - bne _021E8264 - ldr r1, [r4, #8] - ldr r0, [r2, #8] - cmp r1, r0 - beq _021E8320 -_021E8264: - mov r3, #1 - str r3, [r4, #0x18] - ldr r2, [r4, #0xc] - ldr r0, [r4, #0] - ldr r1, [r2, #0] - cmp r0, r1 - beq _021E82B8 - cmp r0, r1 - ble _021E8282 - str r4, [r4, #0x10] - ldr r0, [r4, #0xc] - str r0, [r4, #0x14] - mov r0, #3 - strb r0, [r4, #0x1c] - b _021E8288 -_021E8282: - str r2, [r4, #0x10] - str r4, [r4, #0x14] - strb r3, [r4, #0x1c] -_021E8288: - ldr r0, [r4, #0] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021E82A2 - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - bne _021E8302 -_021E82A2: - ldr r0, [r4, #0] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021E8318 - bl sub_02022974 - b _021E8318 -_021E82B8: - add r1, r5, #0 - add r1, #0xd8 - add r0, r5, #0 - ldr r1, [r1, #0] - add r0, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #8] - cmp r0, r1 - ble _021E82DA - add r0, r4, #0 - add r0, #8 - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - add r0, #8 - str r0, [r4, #0x14] - mov r0, #4 - b _021E82E6 -_021E82DA: - add r2, #8 - add r0, r4, #0 - str r2, [r4, #0x10] - add r0, #8 - str r0, [r4, #0x14] - mov r0, #2 -_021E82E6: - strb r0, [r4, #0x1c] - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021E8304 - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - beq _021E8304 -_021E8302: - b _021E8550 -_021E8304: - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021E8318 - bl sub_02022974 -_021E8318: - ldrb r0, [r4, #0x1c] - add r1, r5, #0 - bl ov5_021E9190 -_021E8320: - add r0, r5, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #3 - bls _021E832C - b _021E84A6 -_021E832C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8338: ; jump table - .short _021E8340 - _021E8338 - 2 ; case 0 - .short _021E8396 - _021E8338 - 2 ; case 1 - .short _021E84A6 - _021E8338 - 2 ; case 2 - .short _021E8492 - _021E8338 - 2 ; case 3 -_021E8340: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - add r1, r6, r0 - add r1, #0x20 - ldrb r1, [r1] - lsl r1, r1, #2 - add r1, r5, r1 - add r1, #0x80 - ldr r1, [r1, #0] - cmp r1, #1 - beq _021E8380 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r4, r5, #0 - str r1, [sp] - str r5, [sp, #4] - str r6, [sp, #8] - add r4, #0xf4 - add r1, r5, #0 - add r2, r5, #0 - add r3, r5, #0 - ldr r4, [r4, #0] - add r1, #0xb8 - add r2, #0xbc - add r3, #0xc0 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - ldr r4, [r4, #4] - blx r4 -_021E8380: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - add r6, #0x22 - mov r1, #1 - add r0, r0, #1 - strb r0, [r6] - add r0, r5, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021E84A6 -_021E8396: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - sub r0, r0, #1 - add r0, r6, r0 - add r0, #0x20 - ldrb r0, [r0] - lsl r0, r0, #2 - add r0, r5, r0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021E83CE - add r0, r6, #0 - bl ov5_021E7814 - add r1, r6, #0 - add r1, #0x22 - ldrb r1, [r1] - mov r0, #0 - sub r1, r1, #1 - add r1, r6, r1 - add r1, #0x20 - ldrb r1, [r1] - lsl r1, r1, #2 - add r1, r5, r1 - add r1, #0x80 - str r0, [r1, #0] -_021E83CE: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - cmp r0, #2 - bhi _021E84A6 - add r0, r6, #0 - add r0, #0x10 - bl ov5_021E80BC - cmp r0, #1 - bne _021E84A6 - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - cmp r0, #2 - blo _021E83F4 - mov r0, #1 - str r0, [r6, #0x24] - b _021E83FC -_021E83F4: - add r0, r5, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] -_021E83FC: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - sub r0, r0, #1 - lsl r0, r0, #2 - ldr r2, [r6, r0] - ldr r0, _021E8554 ; =0x00000864 - ldr r1, [r2, r0] - cmp r1, #1 - bne _021E8452 - sub r0, #0x10 - ldr r0, [r2, r0] - bl sub_020B3C0C - cmp r0, #0 - beq _021E843C - add r2, r0, #0 - add r2, #8 - beq _021E8430 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _021E8430 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _021E8432 -_021E8430: - mov r1, #0 -_021E8432: - cmp r1, #0 - beq _021E843C - ldr r1, [r1, #0] - add r4, r0, r1 - b _021E843E -_021E843C: - mov r4, #0 -_021E843E: - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - cmp r0, #1 - bne _021E8452 - add r0, r4, #0 - bl ov5_021D53A4 -_021E8452: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - mov r2, #0x86 - lsl r2, r2, #4 - sub r0, r0, #1 - lsl r0, r0, #2 - ldr r4, [r6, r0] - ldr r1, [r4, r2] - cmp r1, #0 - blt _021E84A6 - add r0, r5, #0 - add r0, #0xc0 - ldr r3, [r0, #0] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r3 - cmp r1, r0 - bge _021E84A6 - add r0, r5, #0 - add r0, #0xfc - ldr r3, [r0, #0] - cmp r3, #0 - beq _021E84A6 - mov r0, #1 - lsl r0, r0, #8 - add r2, #8 - ldr r0, [r5, r0] - ldr r2, [r4, r2] - blx r3 - b _021E84A6 -_021E8492: - add r6, #0x10 - add r0, r6, #0 - bl ov5_021E80BC - cmp r0, #1 - bne _021E84A6 - add r0, r5, #0 - mov r1, #0 - add r0, #0xa0 - strb r1, [r0] -_021E84A6: - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - bne _021E84C8 - add r0, r5, #0 - mov r1, #0 - add r0, #0xa2 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa1 - strb r1, [r0] - mov r0, #2 - add r5, #0xb4 - add sp, #0x14 - str r0, [r5, #0] - pop {r4, r5, r6, r7, pc} -_021E84C8: - add r0, r5, #0 - bl ov5_021E8DAC - cmp r0, #1 - bne _021E8550 - add r0, r5, #0 - add r0, #0xa2 - ldrb r1, [r0] - mov r0, #0x30 - mov r2, #0 - mul r0, r1 - add r0, r5, r0 - str r2, [r0, #0x2c] - add r0, r5, #0 - bl ov5_021E8DBC - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0xa0 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa2 - ldrb r0, [r0] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r5, #0 - add r1, r2, r1 - add r0, #0xa2 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - beq _021E851E - mov r1, #0 - b _021E852E -_021E851E: - add r0, r5, #0 - mov r1, #0 - add r0, #0xa2 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa1 - strb r1, [r0] - mov r1, #2 -_021E852E: - add r0, r5, #0 - add r0, #0xb4 - str r1, [r0, #0] - ldr r0, [r5, #0x6c] - cmp r0, #1 - bne _021E8550 - mov r0, #0 - str r0, [r5, #0x6c] - add r0, r5, #0 - add r0, #0x70 - ldrb r0, [r0] - add r1, r5, #0 - bl ov5_021E8DD4 - add r0, r5, #0 - bl ov5_021E8D50 -_021E8550: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E8554: .word 0x00000864 - thumb_func_end ov5_021E8188 - - thumb_func_start ov5_021E8558 -ov5_021E8558: ; 0x021E8558 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - ldr r4, [sp, #0x34] - str r2, [sp, #0x10] - add r7, r0, #0 - ldr r0, [r4, #0x6c] - add r5, r3, #0 - str r1, [sp, #0xc] - ldr r6, [sp, #0x30] - cmp r0, #1 - bne _021E8572 - bl sub_02022974 -_021E8572: - add r0, r6, #0 - add r1, r4, #0 - add r2, sp, #0x14 - bl ov5_021E8C58 - cmp r0, #1 - bne _021E85F0 - add r1, sp, #0x14 - ldrb r1, [r1] - add r0, r4, #0 - bl ov5_021E77E4 - add r0, r4, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #2 - blo _021E85D4 - mov r0, #1 - str r0, [r4, #0x6c] - ldr r0, [sp, #0xc] - str r7, [r4, #0x74] - str r0, [r4, #0x78] - add r1, r4, #0 - ldr r0, [sp, #0x10] - add r1, #0x7c - strb r0, [r1] - add r0, r4, #0 - add r0, #0x7d - strb r5, [r0] - ldr r0, [sp, #0x10] - add r2, r4, #0 - add r2, #0x90 - lsl r1, r0, #2 - ldr r0, [r2, r1] - str r0, [r4, #0x64] - lsl r0, r5, #2 - ldr r3, [r2, r0] - str r3, [r4, #0x68] - add r4, #0x70 - strb r6, [r4] - ldr r3, [r2, r1] - mov r1, #0x86 - lsl r1, r1, #4 - str r7, [r3, r1] - ldr r2, [r2, r0] - ldr r0, [sp, #0xc] - add sp, #0x18 - str r0, [r2, r1] - pop {r3, r4, r5, r6, r7, pc} -_021E85D4: - add r0, r4, #0 - str r5, [sp] - add r0, #0xa1 - ldrb r0, [r0] - ldr r2, [sp, #0xc] - add r1, r7, #0 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r3, [sp, #0x10] - add r0, r4, #0 - bl ov5_021E80D0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021E85F0: - add r0, r4, #0 - str r5, [sp] - add r0, #0xa1 - ldrb r0, [r0] - ldr r2, [sp, #0xc] - add r1, r7, #0 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r3, [sp, #0x10] - add r0, r4, #0 - bl ov5_021E80D0 - cmp r0, #1 - beq _021E8610 - bl sub_02022974 -_021E8610: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E8558 - - thumb_func_start ov5_021E8614 -ov5_021E8614: ; 0x021E8614 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r4, r6, #0 - lsl r5, r0, #2 - add r4, #0x90 - ldr r1, [r4, r5] - ldr r0, _021E8660 ; =0x00000864 - mov r2, #0 - str r2, [r1, r0] - ldr r1, [r4, r5] - sub r0, #8 - ldr r0, [r1, r0] - bl ov5_021EF1DC - ldr r1, [r4, r5] - ldr r0, _021E8664 ; =0x00000868 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021E863E - bl ov5_021E1610 -_021E863E: - add r3, r6, #0 - add r3, #0x90 - mov r0, #0 - mov r2, #0x86 - ldr r1, [r3, r5] - mvn r0, r0 - lsl r2, r2, #4 - str r0, [r1, r2] - ldr r1, [r3, r5] - sub r2, #0x60 - bl sub_020C4BB8 - add r0, r6, r5 - mov r1, #1 - add r0, #0x80 - str r1, [r0, #0] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021E8660: .word 0x00000864 -_021E8664: .word 0x00000868 - thumb_func_end ov5_021E8614 - - thumb_func_start ov5_021E8668 -ov5_021E8668: ; 0x021E8668 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r5, r1, #0 - add r1, r4, #0 - add r6, r0, #0 - add r7, r2, #0 - str r3, [sp] - bl ov5_021E8614 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E8614 - add r4, #0x90 - lsl r1, r6, #2 - lsl r5, r5, #2 - lsl r2, r7, #2 - ldr r0, [r4, r1] - ldr r3, [r4, r5] - ldr r6, [r4, r2] - str r6, [r4, r1] - ldr r1, [sp] - lsl r6, r1, #2 - ldr r1, [r4, r6] - str r1, [r4, r5] - str r0, [r4, r2] - str r3, [r4, r6] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E8668 - - thumb_func_start ov5_021E86A0 -ov5_021E86A0: ; 0x021E86A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #8] - add r7, r0, #0 - ldr r0, [sp, #8] - add r6, r2, #0 - cmp r0, #4 - bls _021E86B2 - b _021E89C6 -_021E86B2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E86BE: ; jump table - .short _021E89C6 - _021E86BE - 2 ; case 0 - .short _021E8838 - _021E86BE - 2 ; case 1 - .short _021E8914 - _021E86BE - 2 ; case 2 - .short _021E8766 - _021E86BE - 2 ; case 3 - .short _021E86C8 - _021E86BE - 2 ; case 4 -_021E86C8: - mov r0, #2 - mov r1, #3 - mov r2, #0 - mov r3, #1 - str r6, [sp] - bl ov5_021E8668 - add r0, r6, #0 - add r0, #0xad - ldrb r0, [r0] - cmp r0, #2 - bne _021E8712 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - mov r0, #1 - sub r5, r7, r2 - str r0, [sp, #0x10] - mov r0, #0 - sub r4, r5, #1 - str r0, [sp, #0xc] - cmp r5, #0 - bge _021E86FC - sub r5, r0, #1 - add r4, r5, #0 - b _021E8748 -_021E86FC: - cmp r4, #0 - blt _021E870C - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E8748 -_021E870C: - mov r4, #0 - mvn r4, r4 - b _021E8748 -_021E8712: - cmp r0, #3 - bne _021E8744 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - mov r0, #0 - sub r5, r7, r2 - str r0, [sp, #0x10] - mov r0, #1 - add r4, r5, #1 - str r0, [sp, #0xc] - cmp r5, #0 - bge _021E8732 - sub r5, r0, #2 - add r4, r5, #0 - b _021E8748 -_021E8732: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E8748 - mov r4, #0 - mvn r4, r4 - b _021E8748 -_021E8744: - bl sub_02022974 -_021E8748: - ldr r2, [sp, #0x10] - ldr r3, [sp, #0xc] - ldr r0, [sp, #8] - lsl r2, r2, #0x18 - str r0, [sp] - lsl r3, r3, #0x18 - add r0, r5, #0 - add r1, r4, #0 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - str r6, [sp, #4] - bl ov5_021E8558 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E8766: - mov r0, #1 - mov r1, #3 - mov r2, #0 - mov r3, #2 - str r6, [sp] - bl ov5_021E8668 - add r0, r6, #0 - add r0, #0xad - ldrb r0, [r0] - cmp r0, #1 - bne _021E87C4 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - sub r5, r7, #1 - sub r0, r7, r2 - sub r4, r0, #1 - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0xc] - cmp r5, #0 - blt _021E87A2 - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E87A8 -_021E87A2: - mov r5, #0 - mvn r5, r5 - add r4, r5, #0 -_021E87A8: - cmp r4, #0 - blt _021E87BE - add r2, r6, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E779C - cmp r0, #0 - bne _021E881A -_021E87BE: - mov r4, #0 - mvn r4, r4 - b _021E881A -_021E87C4: - cmp r0, #3 - bne _021E8816 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - sub r5, r7, #1 - add r0, r7, r2 - sub r4, r0, #1 - mov r0, #0 - str r0, [sp, #0x10] - mov r0, #2 - str r0, [sp, #0xc] - cmp r5, #0 - blt _021E87EC - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E87F2 -_021E87EC: - mov r5, #0 - mvn r5, r5 - add r4, r5, #0 -_021E87F2: - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r2 - cmp r0, r4 - ble _021E8810 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E779C - cmp r0, #0 - bne _021E881A -_021E8810: - mov r4, #0 - mvn r4, r4 - b _021E881A -_021E8816: - bl sub_02022974 -_021E881A: - ldr r2, [sp, #0x10] - ldr r3, [sp, #0xc] - ldr r0, [sp, #8] - lsl r2, r2, #0x18 - str r0, [sp] - lsl r3, r3, #0x18 - add r0, r5, #0 - add r1, r4, #0 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - str r6, [sp, #4] - bl ov5_021E8558 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E8838: - mov r0, #0 - mov r1, #2 - mov r2, #1 - mov r3, #3 - str r6, [sp] - bl ov5_021E8668 - add r0, r6, #0 - add r0, #0xad - ldrb r0, [r0] - cmp r0, #0 - bne _021E88A6 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - add r5, r7, #1 - sub r0, r7, r2 - add r4, r0, #1 - mov r0, #3 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r2 - cmp r0, r5 - ble _021E887C - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E8882 -_021E887C: - mov r5, #0 - mvn r5, r5 - add r4, r5, #0 -_021E8882: - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r2 - cmp r0, r4 - ble _021E88A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E779C - cmp r0, #0 - bne _021E88F6 -_021E88A0: - mov r4, #0 - mvn r4, r4 - b _021E88F6 -_021E88A6: - cmp r0, #2 - bne _021E88F6 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - add r5, r7, #1 - add r0, r7, r2 - add r4, r0, #1 - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #3 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r2 - cmp r0, r5 - ble _021E88D6 - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E88DC -_021E88D6: - mov r5, #0 - mvn r5, r5 - add r4, r5, #0 -_021E88DC: - cmp r4, #0 - blt _021E88F2 - add r2, r6, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E779C - cmp r0, #0 - bne _021E88F6 -_021E88F2: - mov r4, #0 - mvn r4, r4 -_021E88F6: - ldr r2, [sp, #0x10] - ldr r3, [sp, #0xc] - ldr r0, [sp, #8] - lsl r2, r2, #0x18 - str r0, [sp] - lsl r3, r3, #0x18 - add r0, r5, #0 - add r1, r4, #0 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - str r6, [sp, #4] - bl ov5_021E8558 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E8914: - mov r0, #0 - mov r1, #1 - mov r2, #2 - mov r3, #3 - str r6, [sp] - bl ov5_021E8668 - add r0, r6, #0 - add r0, #0xad - ldrb r0, [r0] - cmp r0, #0 - bne _021E8964 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - mov r0, #3 - str r0, [sp, #0x10] - mov r0, #2 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r5, r7, r2 - mul r0, r2 - sub r4, r5, #1 - cmp r0, r5 - bgt _021E8952 - ldr r0, [sp, #0xc] - sub r5, r0, #3 - add r4, r5, #0 - b _021E89A8 -_021E8952: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E89A8 - mov r4, #0 - mvn r4, r4 - b _021E89A8 -_021E8964: - cmp r0, #1 - bne _021E89A4 - add r0, r6, #0 - add r0, #0xc0 - ldr r2, [r0, #0] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #3 - str r0, [sp, #0xc] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r5, r7, r2 - mul r0, r2 - add r4, r5, #1 - cmp r0, r5 - bgt _021E898E - ldr r0, [sp, #0xc] - sub r5, r0, #4 - add r4, r5, #0 - b _021E89A8 -_021E898E: - cmp r0, r4 - ble _021E899E - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E89A8 -_021E899E: - mov r4, #0 - mvn r4, r4 - b _021E89A8 -_021E89A4: - bl sub_02022974 -_021E89A8: - ldr r2, [sp, #0x10] - ldr r3, [sp, #0xc] - ldr r0, [sp, #8] - lsl r2, r2, #0x18 - str r0, [sp] - lsl r3, r3, #0x18 - add r0, r5, #0 - add r1, r4, #0 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - str r6, [sp, #4] - bl ov5_021E8558 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021E89C6: - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E86A0 - - thumb_func_start ov5_021E89D0 -ov5_021E89D0: ; 0x021E89D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r1, #0 - add r4, r5, #0 - lsl r6, r0, #2 - mov r0, #0x86 - add r3, sp, #0x38 - mov r1, #0 - str r1, [r3, #0] - str r1, [r3, #4] - str r2, [sp, #4] - add r2, r5, #0 - add r4, #0x90 - str r1, [r3, #8] - add r2, #0xbc - ldr r1, [r4, r6] - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov5_021E901C - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [sp, #0x38] - ldr r0, [r5, r1] - add r0, r2, r0 - str r0, [sp, #0x38] - add r0, r1, #4 - ldr r2, [sp, #0x3c] - ldr r0, [r5, r0] - add r1, #8 - add r0, r2, r0 - str r0, [sp, #0x3c] - ldr r2, [sp, #0x40] - ldr r0, [r5, r1] - add r0, r2, r0 - str r0, [sp, #0x40] - ldr r1, [r4, r6] - ldr r0, _021E8A8C ; =0x00000864 - ldr r0, [r1, r0] - cmp r0, #1 - bne _021E8A5A - ldr r3, _021E8A90 ; =0x021FAEA0 - add r2, sp, #0x2c - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r3, _021E8A94 ; =0x021FAEB8 - str r0, [r2, #0] - add r2, sp, #8 - mov r7, #4 -_021E8A3C: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r7, r7, #1 - bne _021E8A3C - ldr r0, [r3, #0] - add r3, sp, #0x2c - str r0, [r2, #0] - mov r0, #2 - ldr r1, [r4, r6] - lsl r0, r0, #0xa - add r0, r1, r0 - add r1, sp, #0x38 - add r2, sp, #8 - bl sub_0201CA74 -_021E8A5A: - ldr r2, [r4, r6] - ldr r0, _021E8A8C ; =0x00000864 - ldr r1, [r2, r0] - cmp r1, #1 - bne _021E8A86 - add r0, r0, #4 - ldr r4, [r2, r0] - cmp r4, #0 - beq _021E8A86 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r2, r0, #0 - str r4, [sp] - add r5, #0xb8 - ldr r1, [r5, #0] - ldr r3, [sp, #4] - add r0, sp, #0x38 - bl ov5_021E17CC -_021E8A86: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_021E8A8C: .word 0x00000864 -_021E8A90: .word 0x021FAEA0 -_021E8A94: .word 0x021FAEB8 - thumb_func_end ov5_021E89D0 - - thumb_func_start ov5_021E8A98 -ov5_021E8A98: ; 0x021E8A98 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r1, #0 - add r6, r0, #0 - add r1, r7, #0 - bl sub_020E2178 - add r4, r1, #0 - add r0, r6, #0 - add r1, r7, #0 - bl sub_020E2178 - lsr r0, r0, #5 - add r1, r0, #0 - lsr r2, r4, #5 - mul r1, r5 - add r0, r2, r1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E8A98 - - thumb_func_start ov5_021E8ABC -ov5_021E8ABC: ; 0x021E8ABC - push {r3, r4} - sub r4, r0, r2 - ldr r2, [sp, #8] - sub r0, r1, r3 - mul r0, r2 - add r0, r4, r0 - pop {r3, r4} - bx lr - thumb_func_end ov5_021E8ABC - - thumb_func_start ov5_021E8ACC -ov5_021E8ACC: ; 0x021E8ACC - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r1, #0 - add r6, r0, #0 - add r1, r7, #0 - bl sub_020E2178 - add r4, r1, #0 - add r0, r6, #0 - add r1, r7, #0 - bl sub_020E2178 - lsr r0, r0, #5 - add r1, r0, #0 - lsr r2, r4, #5 - mul r1, r5 - add r0, r2, r1 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E8ACC - - thumb_func_start ov5_021E8AF0 -ov5_021E8AF0: ; 0x021E8AF0 - push {r3, lr} - cmp r0, #0 - bne _021E8AFA - mov r0, #3 - pop {r3, pc} -_021E8AFA: - cmp r0, #1 - bne _021E8B02 - mov r0, #2 - pop {r3, pc} -_021E8B02: - cmp r0, #2 - bne _021E8B0A - mov r0, #1 - pop {r3, pc} -_021E8B0A: - cmp r0, #3 - bne _021E8B12 - mov r0, #0 - pop {r3, pc} -_021E8B12: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021E8AF0 - - thumb_func_start ov5_021E8B1C -ov5_021E8B1C: ; 0x021E8B1C - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - cmp r0, #4 - bhi _021E8B7C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8B32: ; jump table - .short _021E8B7C - _021E8B32 - 2 ; case 0 - .short _021E8B3C - _021E8B32 - 2 ; case 1 - .short _021E8B52 - _021E8B32 - 2 ; case 2 - .short _021E8B60 - _021E8B32 - 2 ; case 3 - .short _021E8B74 - _021E8B32 - 2 ; case 4 -_021E8B3C: - add r0, r4, #0 - add r1, r5, #0 - bl sub_020E1F6C - add r0, r1, #1 - cmp r0, r5 - blt _021E8B4E - add r0, r4, #0 - pop {r3, r4, r5, pc} -_021E8B4E: - add r0, r4, #1 - pop {r3, r4, r5, pc} -_021E8B52: - lsl r1, r1, #5 - add r0, r4, r5 - mul r1, r5 - cmp r0, r1 - blt _021E8B82 - add r0, r4, #0 - pop {r3, r4, r5, pc} -_021E8B60: - add r0, r4, #0 - add r1, r5, #0 - bl sub_020E1F6C - sub r0, r1, #1 - bpl _021E8B70 - add r0, r4, #0 - pop {r3, r4, r5, pc} -_021E8B70: - sub r0, r4, #1 - pop {r3, r4, r5, pc} -_021E8B74: - sub r0, r4, r5 - bpl _021E8B82 - add r0, r4, #0 - pop {r3, r4, r5, pc} -_021E8B7C: - bl sub_02022974 - mov r0, #0 -_021E8B82: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E8B1C - - thumb_func_start ov5_021E8B84 -ov5_021E8B84: ; 0x021E8B84 - cmp r0, #4 - bhi _021E8BBC - add r2, r0, r0 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021E8B94: ; jump table - .short _021E8BBC - _021E8B94 - 2 ; case 0 - .short _021E8BB6 - _021E8B94 - 2 ; case 1 - .short _021E8BA6 - _021E8B94 - 2 ; case 2 - .short _021E8BAE - _021E8B94 - 2 ; case 3 - .short _021E8B9E - _021E8B94 - 2 ; case 4 -_021E8B9E: - sub r0, r1, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr -_021E8BA6: - add r0, r1, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr -_021E8BAE: - sub r0, r1, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr -_021E8BB6: - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 -_021E8BBC: - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E8B84 - - thumb_func_start ov5_021E8BC0 -ov5_021E8BC0: ; 0x021E8BC0 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - bl ov5_021E8B84 - cmp r5, r0 - bge _021E8BF2 - sub r0, r0, r5 - cmp r0, #1 - bne _021E8BDE - ldrb r0, [r4] - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - b _021E8C1E -_021E8BDE: - cmp r0, #2 - bne _021E8BEC - ldrb r0, [r4] - sub r0, r0, #2 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - b _021E8C1E -_021E8BEC: - bl sub_02022974 - b _021E8C1E -_021E8BF2: - cmp r5, r0 - ble _021E8C1A - sub r0, r5, r0 - cmp r0, #1 - bne _021E8C06 - ldrb r0, [r4] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - b _021E8C1E -_021E8C06: - cmp r0, #2 - bne _021E8C14 - ldrb r0, [r4] - add r0, r0, #2 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - b _021E8C1E -_021E8C14: - bl sub_02022974 - b _021E8C1E -_021E8C1A: - bl sub_02022974 -_021E8C1E: - strb r6, [r4] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E8BC0 - - thumb_func_start ov5_021E8C24 -ov5_021E8C24: ; 0x021E8C24 - push {r3, lr} - cmp r0, #4 - bhi _021E8C50 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8C36: ; jump table - .short _021E8C50 - _021E8C36 - 2 ; case 0 - .short _021E8C48 - _021E8C36 - 2 ; case 1 - .short _021E8C44 - _021E8C36 - 2 ; case 2 - .short _021E8C4C - _021E8C36 - 2 ; case 3 - .short _021E8C40 - _021E8C36 - 2 ; case 4 -_021E8C40: - mov r0, #2 - pop {r3, pc} -_021E8C44: - mov r0, #4 - pop {r3, pc} -_021E8C48: - mov r0, #3 - pop {r3, pc} -_021E8C4C: - mov r0, #1 - pop {r3, pc} -_021E8C50: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov5_021E8C24 - - thumb_func_start ov5_021E8C58 -ov5_021E8C58: ; 0x021E8C58 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - add r7, r2, #0 - mov r4, #0 -_021E8C62: - ldr r0, [r5, #0x2c] - cmp r0, #1 - bne _021E8C7E - add r0, r6, #0 - bl ov5_021E8C24 - add r1, r5, #0 - add r1, #0x30 - ldrb r1, [r1] - cmp r1, r0 - bne _021E8C7E - strb r4, [r7] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021E8C7E: - add r4, r4, #1 - add r5, #0x30 - cmp r4, #2 - blt _021E8C62 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E8C58 - - thumb_func_start ov5_021E8C8C -ov5_021E8C8C: ; 0x021E8C8C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xa1 - ldrb r1, [r0] - mov r0, #0x30 - add r4, r5, #0 - mul r0, r1 - add r0, r5, r0 - ldr r0, [r0, #0x2c] - add r4, #0x64 - cmp r0, #0 - beq _021E8CA8 - bl sub_02022974 -_021E8CA8: - add r1, r5, #0 - add r1, #0xa1 - ldrb r2, [r1] - mov r1, #0x30 - mov r0, #1 - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - add r3, r5, #0 - str r0, [r2, #0x2c] - add r3, #0xa1 - ldrb r3, [r3] - ldrb r2, [r4, #0xc] - add r6, r3, #0 - mul r6, r1 - add r3, r5, r6 - add r3, #0x30 - strb r2, [r3] - add r3, r5, #0 - add r3, #0xa1 - ldrb r3, [r3] - ldr r2, [r4, #0x10] - add r6, r3, #0 - mul r6, r1 - add r3, r5, r6 - str r2, [r3, #0x1c] - add r3, r5, #0 - add r3, #0xa1 - ldrb r3, [r3] - ldr r2, [r4, #0x14] - add r6, r3, #0 - mul r6, r1 - add r3, r5, r6 - str r2, [r3, #0x20] - add r3, r5, #0 - add r3, #0xa1 - ldrb r3, [r3] - ldrb r2, [r4, #0x18] - add r6, r3, #0 - mul r6, r1 - add r3, r5, r6 - add r3, #0x24 - strb r2, [r3] - add r3, r5, #0 - add r3, #0xa1 - ldrb r3, [r3] - ldrb r2, [r4, #0x19] - add r6, r3, #0 - mul r6, r1 - add r3, r5, r6 - add r3, #0x25 - strb r2, [r3] - add r3, r5, #0 - add r3, #0xa1 - ldrb r3, [r3] - ldr r2, [r4, #0] - add r6, r3, #0 - mul r6, r1 - add r3, r5, r6 - str r2, [r3, #4] - add r2, r5, #0 - add r2, #0xa1 - ldrb r2, [r2] - ldr r4, [r4, #4] - add r3, r2, #0 - mul r3, r1 - add r2, r5, r3 - add r3, r5, #0 - str r4, [r2, #8] - add r3, #0xa1 - ldrb r3, [r3] - mov r2, #0 - add r4, r3, #0 - mul r4, r1 - add r3, r5, r4 - add r3, #0x26 - strb r2, [r3] - add r3, r5, #0 - add r3, #0xa1 - ldrb r3, [r3] - mul r1, r3 - add r1, r5, r1 - str r2, [r1, #0x28] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021E8C8C - - thumb_func_start ov5_021E8D50 -ov5_021E8D50: ; 0x021E8D50 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xa0 - ldrb r0, [r0] - add r4, r5, #0 - add r4, #0x64 - cmp r0, #2 - blo _021E8D64 - bl sub_02022974 -_021E8D64: - add r0, r5, #0 - bl ov5_021E8C8C - cmp r0, #1 - beq _021E8D72 - bl sub_02022974 -_021E8D72: - mov r0, #0x86 - ldr r2, [r4, #0x10] - ldr r1, [r4, #0] - lsl r0, r0, #4 - str r2, [r1, r0] - ldr r2, [r4, #0x14] - ldr r1, [r4, #4] - str r2, [r1, r0] - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xa0 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa1 - ldrb r0, [r0] - add r5, #0xa1 - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - strb r0, [r5] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E8D50 - - thumb_func_start ov5_021E8DAC -ov5_021E8DAC: ; 0x021E8DAC - add r1, r0, #0 - add r1, #0xa2 - ldrb r2, [r1] - mov r1, #0x30 - mul r1, r2 - add r0, r0, r1 - ldr r0, [r0, #0x28] - bx lr - thumb_func_end ov5_021E8DAC - - thumb_func_start ov5_021E8DBC -ov5_021E8DBC: ; 0x021E8DBC - mov r3, #0 - add r2, r3, #0 -_021E8DC0: - lsl r1, r3, #2 - add r1, r0, r1 - add r1, #0x80 - str r2, [r1, #0] - add r1, r3, #1 - lsl r1, r1, #0x18 - lsr r3, r1, #0x18 - cmp r3, #4 - blo _021E8DC0 - bx lr - thumb_func_end ov5_021E8DBC - - thumb_func_start ov5_021E8DD4 -ov5_021E8DD4: ; 0x021E8DD4 - cmp r0, #4 - bhi _021E8E24 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E8DE4: ; jump table - .short _021E8E24 - _021E8DE4 - 2 ; case 0 - .short _021E8DFC - _021E8DE4 - 2 ; case 1 - .short _021E8E0A - _021E8DE4 - 2 ; case 2 - .short _021E8E18 - _021E8DE4 - 2 ; case 3 - .short _021E8DEE - _021E8DE4 - 2 ; case 4 -_021E8DEE: - add r0, r1, #0 - mov r2, #1 - add r0, #0x88 - str r2, [r0, #0] - add r1, #0x8c - str r2, [r1, #0] - bx lr -_021E8DFC: - add r0, r1, #0 - mov r2, #1 - add r0, #0x80 - str r2, [r0, #0] - add r1, #0x88 - str r2, [r1, #0] - bx lr -_021E8E0A: - add r0, r1, #0 - mov r2, #1 - add r0, #0x80 - str r2, [r0, #0] - add r1, #0x84 - str r2, [r1, #0] - bx lr -_021E8E18: - add r0, r1, #0 - mov r2, #1 - add r0, #0x84 - str r2, [r0, #0] - add r1, #0x8c - str r2, [r1, #0] -_021E8E24: - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E8DD4 - - thumb_func_start ov5_021E8E28 -ov5_021E8E28: ; 0x021E8E28 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021E79A8 - ldr r0, [sp, #0x38] - add r1, r4, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r2, r6, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r3, r7, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x3c] - str r0, [sp, #0xc] - add r0, sp, #0x14 - str r0, [sp, #0x10] - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov5_021E7838 - mov r4, #0 - add r7, sp, #0x14 -_021E8E68: - lsl r6, r4, #2 - bl ov5_021EF13C - add r1, r5, r6 - add r1, #0x90 - ldr r2, [r1, #0] - ldr r1, _021E8EC8 ; =0x0000085C - str r0, [r2, r1] - add r0, r5, r6 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E8EC8 ; =0x0000085C - ldr r0, [r1, r0] - bl ov5_021EF248 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r2, r5, #0 - str r1, [sp] - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r3, r5, #0 - str r1, [sp, #4] - str r0, [sp, #8] - str r5, [sp, #0xc] - add r2, #0xb8 - add r3, #0xbc - ldr r0, [r7, r6] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - add r1, r4, #0 - bl ov5_021E7E28 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021E8E68 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021E8EC8: .word 0x0000085C - thumb_func_end ov5_021E8E28 - - thumb_func_start ov5_021E8ECC -ov5_021E8ECC: ; 0x021E8ECC - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021E7AC4 - ldr r0, [sp, #0x38] - add r1, r4, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r2, r6, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r3, r7, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x3c] - str r0, [sp, #0xc] - add r0, sp, #0x14 - str r0, [sp, #0x10] - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl ov5_021E7838 - mov r4, #0 - add r7, r4, #0 -_021E8F0C: - lsl r6, r4, #2 - add r0, r5, r6 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E8F5C ; =0x0000085C - str r7, [r1, r0] - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r2, r5, #0 - str r1, [sp] - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r3, r5, #0 - str r1, [sp, #4] - str r0, [sp, #8] - str r5, [sp, #0xc] - add r0, sp, #0x14 - add r2, #0xb8 - add r3, #0xbc - ldr r0, [r0, r6] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - add r1, r4, #0 - bl ov5_021E7F1C - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021E8F0C - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021E8F5C: .word 0x0000085C - thumb_func_end ov5_021E8ECC - - thumb_func_start ov5_021E8F60 -ov5_021E8F60: ; 0x021E8F60 - push {r4, lr} - add r1, r0, #0 - mov r3, #0 - add r1, #0xa2 - strb r3, [r1] - add r1, r0, #0 - add r1, #0xa1 - strb r3, [r1] - add r1, r0, #0 - add r1, #0xa0 - strb r3, [r1] - add r4, r0, #0 - add r2, r3, #0 - mov r1, #1 -_021E8F7C: - str r2, [r4, #0x2c] - str r1, [r4, #0x28] - add r3, r3, #1 - add r4, #0x30 - cmp r3, #2 - blt _021E8F7C - bl ov5_021E8DBC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E8F60 - - thumb_func_start ov5_021E8F90 -ov5_021E8F90: ; 0x021E8F90 - push {r3, r4, r5, lr} - mov r5, #0x41 - ldr r4, [sp, #0x10] - lsl r5, r5, #2 - ldr r5, [r4, r5] - cmp r5, #1 - bne _021E8FC6 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - cmp r0, #1 - ble _021E8FAE - add r0, r2, #0 - add r0, #0x1f - b _021E8FB2 -_021E8FAE: - add r0, r2, #0 - add r0, #0x10 -_021E8FB2: - add r1, r4, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - cmp r1, #1 - ble _021E8FC2 - add r1, r3, #0 - add r1, #0x1f - b _021E8FC6 -_021E8FC2: - add r1, r3, #0 - add r1, #0x10 -_021E8FC6: - add r5, r4, #0 - add r5, #0xc8 - ldr r5, [r5, #0] - str r5, [sp] - bl ov5_021E8ABC - add r1, r4, #0 - add r1, #0xa8 - str r0, [r1, #0] - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xa8 - add r1, #0xc8 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl ov5_021E935C - add r1, r4, #0 - add r1, #0xad - strb r0, [r1] - add r0, r4, #0 - add r0, #0xad - ldrb r0, [r0] - bl ov5_021E8AF0 - add r1, r4, #0 - add r1, #0xac - strb r0, [r1] - add r0, r4, #0 - add r1, r4, #0 - add r2, r4, #0 - add r0, #0xa8 - add r1, #0xc0 - add r2, #0xc8 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov5_021E8ACC - add r4, #0xa4 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E8F90 - - thumb_func_start ov5_021E901C -ov5_021E901C: ; 0x021E901C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r2, #0 - mov r2, #1 - add r5, r3, #0 - lsl r2, r2, #0x14 - str r2, [r5, #0] - str r2, [r5, #8] - mov r2, #0 - add r4, r0, #0 - mvn r2, r2 - str r1, [sp, #4] - cmp r4, r2 - beq _021E907E - bl sub_020E1F6C - lsl r0, r1, #0x10 - lsr r6, r0, #0x10 - ldr r1, [sp, #4] - add r0, r4, #0 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r7, #0 - bl sub_02039E10 - str r0, [sp, #8] - add r0, r7, #0 - bl sub_02039E88 - add r1, r0, #0 - ldr r0, [sp, #8] - add r2, r6, #0 - str r0, [sp] - add r0, r7, #0 - add r3, r4, #0 - bl sub_02039E8C - lsl r0, r0, #0xf - str r0, [r5, #4] - ldr r1, [r5, #0] - lsl r0, r6, #0x15 - add r0, r1, r0 - str r0, [r5, #0] - ldr r1, [r5, #8] - lsl r0, r4, #0x15 - add r0, r1, r0 - str r0, [r5, #8] -_021E907E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E901C - - thumb_func_start ov5_021E9084 -ov5_021E9084: ; 0x021E9084 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r1, [sp] - mov r1, #0x49 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - str r2, [sp, #4] - add r6, r3, #0 - bl sub_02018144 - mov r2, #0x49 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020C4CF4 - cmp r6, #0 - bne _021E90B6 - add r0, r4, #0 - ldr r1, _021E9148 ; =0x021FAE98 - add r0, #0xf4 - str r1, [r0, #0] - mov r7, #1 - b _021E90CA -_021E90B6: - cmp r6, #1 - bne _021E90C6 - add r0, r4, #0 - ldr r1, _021E914C ; =0x021FAE90 - add r0, #0xf4 - str r1, [r0, #0] - mov r7, #0 - b _021E90CA -_021E90C6: - bl sub_02022974 -_021E90CA: - add r0, r7, #0 - bl ov5_021EEAC8 - str r0, [r4, #0] - add r1, r4, #0 - ldr r0, [sp] - add r1, #0xb8 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xbc - str r5, [r0, #0] - add r0, r5, #0 - bl sub_02039E10 - add r1, r4, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r5, #0 - bl sub_02039E20 - add r1, r4, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r0, #5 - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] - add r1, r4, #0 - ldr r0, [sp, #4] - add r1, #0xf0 - str r0, [r1, #0] - add r0, r4, #0 - mov r1, #1 - add r0, #0xec - str r1, [r0, #0] - add r0, r4, #0 - bl ov5_021E8F60 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #2 - add r0, #0xb4 - str r1, [r0, #0] - mov r0, #0x43 - mov r1, #4 - bl sub_02006C24 - add r1, r4, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xfc - str r1, [r0, #0] - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E9148: .word 0x021FAE98 -_021E914C: .word 0x021FAE90 - thumb_func_end ov5_021E9084 - - thumb_func_start ov5_021E9150 -ov5_021E9150: ; 0x021E9150 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r6, #0x45 - add r5, r0, #0 - lsl r6, r6, #2 - ldr r3, [r5, r6] - sub r6, #8 - str r3, [sp] - add r3, r5, #0 - add r3, #0xc8 - ldr r3, [r3, #0] - add r4, r1, #0 - str r3, [sp, #4] - ldr r3, [r5, r6] - add r6, r5, #0 - add r6, #0xf4 - ldr r6, [r6, #0] - add r7, r2, #0 - ldr r6, [r6, #0] - blx r6 - mov r3, #0x43 - str r5, [sp] - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, #8 - ldr r3, [r5, r3] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021E8F90 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E9150 - - thumb_func_start ov5_021E9190 -ov5_021E9190: ; 0x021E9190 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r2, r5, #0 - add r3, r5, #0 - add r1, #0xc4 - add r2, #0xc8 - add r3, #0xa8 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - add r6, r0, #0 - bl ov5_021E8B1C - add r1, r5, #0 - add r2, r5, #0 - add r1, #0xc0 - add r2, #0xc8 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - add r7, r0, #0 - bl ov5_021E8A98 - add r1, r5, #0 - add r1, #0xc8 - add r4, r0, #0 - ldr r1, [r1, #0] - add r0, r7, #0 - bl ov5_021E935C - add r1, r5, #0 - add r1, #0xa4 - ldr r1, [r1, #0] - cmp r1, r4 - bne _021E91F8 - add r1, r5, #0 - add r1, #0xad - ldrb r1, [r1] - cmp r1, r0 - beq _021E91F8 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov5_021E86A0 - add r1, r5, #0 - add r1, #0xad - add r5, #0xac - ldrb r1, [r1] - add r0, r6, #0 - add r2, r5, #0 - bl ov5_021E8BC0 -_021E91F8: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E9190 - - thumb_func_start ov5_021E91FC -ov5_021E91FC: ; 0x021E91FC - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r1, #0 - sub r7, r4, #1 -_021E9206: - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0x90 - ldr r1, [r0, #0] - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r0, r7 - beq _021E9222 - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov5_021E89D0 -_021E9222: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021E9206 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E91FC - - thumb_func_start ov5_021E9230 -ov5_021E9230: ; 0x021E9230 - push {r3, r4} - asr r4, r0, #0xf - lsr r4, r4, #0x10 - add r4, r0, r4 - asr r0, r4, #0x10 - str r0, [r2, #0] - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - asr r0, r0, #0x10 - str r0, [r3, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E9230 - - thumb_func_start ov5_021E924C -ov5_021E924C: ; 0x021E924C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02017ACC - bl sub_020A6988 - bl sub_020A6CF0 - mov r4, #0 - add r6, r5, #4 - mov r7, #0x30 -_021E9262: - add r0, r4, #0 - mul r0, r7 - add r0, r6, r0 - bl ov5_021E7814 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #2 - blo _021E9262 - mov r6, #0 - add r7, r6, #0 -_021E927A: - lsl r4, r6, #2 - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - ldr r0, _021E92D8 ; =0x00000864 - mov r1, #0 - str r1, [r2, r0] - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E92DC ; =0x0000085C - ldr r0, [r1, r0] - bl ov5_021EF1D0 - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E92E0 ; =0x00000868 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021E92A8 - bl ov5_021E1608 -_021E92A8: - add r0, r5, r4 - add r0, #0x90 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r5, r4 - add r0, #0x90 - str r7, [r0, #0] - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #4 - blo _021E927A - add r0, r5, #0 - mov r1, #3 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #1 - add r0, #0xb0 - str r1, [r0, #0] - add r5, #0xec - str r7, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E92D8: .word 0x00000864 -_021E92DC: .word 0x0000085C -_021E92E0: .word 0x00000868 - thumb_func_end ov5_021E924C - - thumb_func_start ov5_021E92E4 -ov5_021E92E4: ; 0x021E92E4 - push {r4, lr} - add r4, r0, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl sub_02006CA8 - ldr r0, [r4, #0] - bl ov5_021EEB48 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E92E4 - - thumb_func_start ov5_021E9300 -ov5_021E9300: ; 0x021E9300 - add r1, r0, #0 - add r1, #0xb0 - ldr r1, [r1, #0] - cmp r1, #1 - bne _021E9316 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - bne _021E9316 - mov r0, #1 - bx lr -_021E9316: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E9300 - - thumb_func_start ov5_021E931C -ov5_021E931C: ; 0x021E931C - push {r4, r5} - add r5, r0, #0 - add r4, r1, #0 - add r2, r4, #0 - add r3, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0xcc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r4, #0xd8 - str r0, [r2, #0] - str r5, [r4, #0] - pop {r4, r5} - bx lr - thumb_func_end ov5_021E931C - - thumb_func_start ov5_021E9338 -ov5_021E9338: ; 0x021E9338 - mov r1, #0 - add r0, #0xd8 - str r1, [r0, #0] - bx lr - thumb_func_end ov5_021E9338 - - thumb_func_start ov5_021E9340 -ov5_021E9340: ; 0x021E9340 - lsl r0, r0, #2 - add r0, r1, r0 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E9350 ; =0x00000868 - ldr r0, [r1, r0] - str r0, [r2, #0] - bx lr - ; .align 2, 0 -_021E9350: .word 0x00000868 - thumb_func_end ov5_021E9340 - - thumb_func_start ov5_021E9354 -ov5_021E9354: ; 0x021E9354 - add r0, #0xac - ldrb r0, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E9354 - - thumb_func_start ov5_021E935C -ov5_021E935C: ; 0x021E935C - push {r4, lr} - add r4, r0, #0 - bl sub_020E2178 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1b - sub r1, r1, r2 - mov r0, #0x1b - ror r1, r0 - mov r0, #0x1f - and r0, r4 - add r1, r2, r1 - cmp r0, #0x10 - bge _021E9384 - cmp r1, #0x10 - bge _021E9380 - mov r0, #0 - pop {r4, pc} -_021E9380: - mov r0, #2 - pop {r4, pc} -_021E9384: - cmp r1, #0x10 - bge _021E938C - mov r0, #1 - pop {r4, pc} -_021E938C: - mov r0, #3 - pop {r4, pc} - thumb_func_end ov5_021E935C - - thumb_func_start ov5_021E9390 -ov5_021E9390: ; 0x021E9390 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - cmp r0, r5 - bne _021E93A6 - add r4, #0xac - ldrb r0, [r4] - pop {r3, r4, r5, pc} -_021E93A6: - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _021E93B2 - bl sub_02022974 -_021E93B2: - add r0, r4, #0 - add r0, #0xac - ldrb r1, [r0] - cmp r1, #3 - bls _021E93BE - b _021E955C -_021E93BE: - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E93CA: ; jump table - .short _021E93D2 - _021E93CA - 2 ; case 0 - .short _021E9434 - _021E93CA - 2 ; case 1 - .short _021E9498 - _021E93CA - 2 ; case 2 - .short _021E94FA - _021E93CA - 2 ; case 3 -_021E93D2: - add r0, r4, #0 - add r0, #0xa4 - add r2, r4, #0 - ldr r0, [r0, #0] - add r2, #0xc0 - ldr r2, [r2, #0] - sub r3, r5, r0 - cmp r2, r3 - bne _021E93EC - add r0, r1, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E93EC: - cmp r3, #1 - bne _021E9406 - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - beq _021E9406 - add r4, #0xac - ldrb r0, [r4] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E9406: - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xa4 - add r1, #0xc0 - ldr r2, [r1, #0] - ldr r0, [r0, #0] - add r3, r2, #1 - sub r1, r5, r0 - cmp r3, r1 - bne _021E9430 - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E9430 - add r4, #0xac - ldrb r0, [r4] - add r0, r0, #3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E9430: - mov r0, #4 - pop {r3, r4, r5, pc} -_021E9434: - add r0, r4, #0 - add r0, #0xa4 - add r2, r4, #0 - ldr r0, [r0, #0] - add r2, #0xc0 - ldr r2, [r2, #0] - sub r3, r5, r0 - cmp r2, r3 - bne _021E944E - add r0, r1, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E944E: - sub r1, r0, r5 - cmp r1, #1 - bne _021E946A - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - beq _021E946A - add r4, #0xac - ldrb r0, [r4] - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E946A: - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xa4 - add r1, #0xc0 - ldr r2, [r1, #0] - ldr r0, [r0, #0] - sub r3, r2, #1 - sub r1, r5, r0 - cmp r3, r1 - bne _021E9494 - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E9494 - add r4, #0xac - ldrb r0, [r4] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E9494: - mov r0, #4 - pop {r3, r4, r5, pc} -_021E9498: - add r0, r4, #0 - add r0, #0xa4 - add r2, r4, #0 - ldr r0, [r0, #0] - add r2, #0xc0 - ldr r2, [r2, #0] - sub r3, r0, r5 - cmp r2, r3 - bne _021E94B2 - sub r0, r1, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E94B2: - sub r1, r2, #1 - cmp r1, r3 - bne _021E94CE - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E94CE - add r4, #0xac - ldrb r0, [r4] - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E94CE: - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - sub r1, r5, r0 - cmp r1, #1 - bne _021E94F6 - add r2, r4, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - beq _021E94F6 - add r4, #0xac - ldrb r0, [r4] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E94F6: - mov r0, #4 - pop {r3, r4, r5, pc} -_021E94FA: - add r0, r4, #0 - add r0, #0xa4 - add r2, r4, #0 - ldr r0, [r0, #0] - add r2, #0xc0 - ldr r2, [r2, #0] - sub r3, r0, r5 - cmp r2, r3 - bne _021E9514 - sub r0, r1, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E9514: - add r1, r2, #1 - cmp r1, r3 - bne _021E9530 - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - bne _021E9530 - add r4, #0xac - ldrb r0, [r4] - sub r0, r0, #3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E9530: - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - sub r1, r0, r5 - cmp r1, #1 - bne _021E9558 - add r2, r4, #0 - add r2, #0xc0 - ldr r2, [r2, #0] - add r1, r5, #0 - bl ov5_021E77C0 - cmp r0, #0 - beq _021E9558 - add r4, #0xac - ldrb r0, [r4] - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_021E9558: - mov r0, #4 - pop {r3, r4, r5, pc} -_021E955C: - mov r0, #4 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021E9390 - - thumb_func_start ov5_021E9560 -ov5_021E9560: ; 0x021E9560 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #4 - blo _021E956E - bl sub_02022974 -_021E956E: - lsl r0, r5, #2 - add r0, r4, r0 - add r0, #0x90 - ldr r1, [r0, #0] - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r1, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E9560 - - thumb_func_start ov5_021E9580 -ov5_021E9580: ; 0x021E9580 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x43 - lsl r0, r0, #2 - str r3, [sp] - ldr r3, [r5, r0] - add r0, #8 - ldr r0, [r5, r0] - sub r6, r1, r3 - sub r4, r2, r0 - add r0, r5, #0 - asr r2, r4, #4 - add r0, #0xc0 - lsr r2, r2, #0x1b - ldr r1, [r0, #0] - asr r0, r6, #4 - add r2, r4, r2 - lsr r0, r0, #0x1b - asr r2, r2, #5 - add r0, r6, r0 - add r3, r2, #0 - asr r0, r0, #5 - mul r3, r1 - add r7, r0, r3 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r1 - cmp r7, r0 - blo _021E95CA - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - beq _021E95CA - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E95CA: - add r0, r5, #0 - add r0, #0xc0 - ldr r1, [r0, #0] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mul r0, r1 - cmp r7, r0 - blo _021E95E0 - bl sub_02022974 -_021E95E0: - add r0, r5, #0 - add r0, #0xc8 - ldr r1, [r0, #0] - add r0, r4, #0 - mul r0, r1 - add r0, r6, r0 - bl ov5_021E935C - add r1, r0, #0 - add r0, r7, #0 - add r2, r5, #0 - bl ov5_021E9390 - ldr r1, [sp] - cmp r1, #0 - beq _021E9602 - strb r0, [r1] -_021E9602: - cmp r0, #3 - bls _021E960A - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021E960A: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E9580 - - thumb_func_start ov5_021E9610 -ov5_021E9610: ; 0x021E9610 - lsl r1, r1, #2 - add r0, r0, r1 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E9620 ; =0x0000085C - ldr r0, [r1, r0] - bx lr - nop -_021E9620: .word 0x0000085C - thumb_func_end ov5_021E9610 - - thumb_func_start ov5_021E9624 -ov5_021E9624: ; 0x021E9624 - lsl r1, r1, #2 - add r0, r0, r1 - add r0, #0x90 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E9624 - - thumb_func_start ov5_021E9630 -ov5_021E9630: ; 0x021E9630 - add r3, r0, #0 - add r3, #0xfc - str r1, [r3, #0] - mov r1, #1 - lsl r1, r1, #8 - str r2, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E9630 - - thumb_func_start ov5_021E9640 -ov5_021E9640: ; 0x021E9640 - push {r3, lr} - bl sub_0201CED0 - mov r1, #1 - str r1, [r0, #0x1c] - pop {r3, pc} - thumb_func_end ov5_021E9640 - - thumb_func_start ov5_021E964C -ov5_021E964C: ; 0x021E964C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #1 - bne _021E965C - mov r0, #5 - strb r0, [r4, #0x14] -_021E965C: - ldrb r0, [r4, #0x14] - cmp r0, #5 - bls _021E9664 - b _021E9768 -_021E9664: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021E9670: ; jump table - .short _021E967C - _021E9670 - 2 ; case 0 - .short _021E96AC - _021E9670 - 2 ; case 1 - .short _021E96E2 - _021E9670 - 2 ; case 2 - .short _021E9700 - _021E9670 - 2 ; case 3 - .short _021E9768 - _021E9670 - 2 ; case 4 - .short _021E9756 - _021E9670 - 2 ; case 5 -_021E967C: - mov r0, #0 - str r0, [r4, #0x24] - mov r0, #0xe - ldr r5, [r4, #4] - lsl r0, r0, #0xc - cmp r5, r0 - bgt _021E968E - mov r0, #2 - b _021E9692 -_021E968E: - add r5, r0, #0 - mov r0, #1 -_021E9692: - strb r0, [r4, #0x14] - ldr r2, [r4, #0xc] - ldr r0, [r4, #0] - ldr r3, [r2, #0] - ldr r2, [r4, #0x24] - add r1, r5, #0 - add r2, r3, r2 - bl sub_02006E18 - ldr r0, [r4, #0x24] - add r0, r0, r5 - str r0, [r4, #0x24] - pop {r4, r5, r6, pc} -_021E96AC: - ldr r2, [r4, #0x24] - ldr r0, [r4, #4] - sub r5, r0, r2 - mov r0, #0xe - lsl r0, r0, #0xc - cmp r5, r0 - ble _021E96C0 - add r5, r0, #0 - mov r6, #0 - b _021E96C2 -_021E96C0: - mov r6, #1 -_021E96C2: - ldr r3, [r4, #0xc] - ldr r0, [r4, #0] - ldr r3, [r3, #0] - add r1, r5, #0 - add r2, r3, r2 - bl sub_02006E18 - cmp r6, #0 - beq _021E96DA - mov r0, #2 - strb r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_021E96DA: - ldr r0, [r4, #0x24] - add r0, r0, r5 - str r0, [r4, #0x24] - pop {r4, r5, r6, pc} -_021E96E2: - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _021E96FA - bl sub_0201CA5C - cmp r0, #1 - bne _021E96FA - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - ldr r0, [r0, #0] - bl sub_0201CBB0 -_021E96FA: - mov r0, #3 - strb r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_021E9700: - ldr r0, [r4, #0xc] - ldr r0, [r0, #0] - bl sub_020B3C0C - add r5, r0, #0 - ldrb r0, [r5, #9] - cmp r0, #1 - beq _021E9714 - bl sub_02022974 -_021E9714: - cmp r5, #0 - beq _021E9738 - add r1, r5, #0 - add r1, #8 - beq _021E972C - ldrb r0, [r5, #9] - cmp r0, #0 - bls _021E972C - ldrh r0, [r5, #0xe] - add r0, r1, r0 - add r0, r0, #4 - b _021E972E -_021E972C: - mov r0, #0 -_021E972E: - cmp r0, #0 - beq _021E9738 - ldr r0, [r0, #0] - add r5, r5, r0 - b _021E973A -_021E9738: - mov r5, #0 -_021E973A: - cmp r5, #0 - bne _021E9742 - bl sub_02022974 -_021E9742: - ldr r0, [r4, #8] - add r1, r5, #0 - bl sub_020AE608 - ldr r0, [r4, #0x18] - mov r1, #1 - str r1, [r0, #0] - mov r0, #5 - strb r0, [r4, #0x14] - pop {r4, r5, r6, pc} -_021E9756: - ldr r0, [r4, #0x20] - mov r1, #0 - str r1, [r0, #0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_021E9768: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E964C - - thumb_func_start ov5_021E976C -ov5_021E976C: ; 0x021E976C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #4 - mov r1, #0x28 - add r6, r2, #0 - add r7, r3, #0 - bl sub_02018184 - add r1, r0, #0 - str r5, [r1, #0] - str r4, [r1, #4] - str r6, [r1, #8] - ldr r0, [sp, #0x18] - str r7, [r1, #0xc] - str r0, [r1, #0x10] - mov r2, #0 - ldr r0, [sp, #0x1c] - strb r2, [r1, #0x14] - str r0, [r1, #0x18] - str r2, [r0, #0] - ldr r0, [sp, #0x20] - str r0, [r1, #0x20] - str r2, [r1, #0x1c] - ldr r0, _021E97A8 ; =ov5_021E964C - mov r2, #1 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021E97A8: .word ov5_021E964C - thumb_func_end ov5_021E976C - - thumb_func_start ov5_021E97AC -ov5_021E97AC: ; 0x021E97AC - push {r3, r4, r5, lr} - add r4, r3, #0 - add r5, r2, #0 - ldr r2, [r4, #0] - bl sub_02006E18 - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _021E97D6 - bl sub_0201CA5C - cmp r0, #1 - bne _021E97D6 - ldr r0, [r4, #0] - ldr r1, [sp, #0x10] - bl sub_0201CBB0 - cmp r0, #0 - bne _021E97D6 - bl sub_02022974 -_021E97D6: - ldr r0, [r4, #0] - bl sub_020B3C0C - ldrb r0, [r0, #9] - cmp r0, #1 - beq _021E97E6 - bl sub_02022974 -_021E97E6: - ldr r0, [r4, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _021E9810 - add r2, r0, #0 - add r2, #8 - beq _021E9804 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _021E9804 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _021E9806 -_021E9804: - mov r1, #0 -_021E9806: - cmp r1, #0 - beq _021E9810 - ldr r1, [r1, #0] - add r4, r0, r1 - b _021E9812 -_021E9810: - mov r4, #0 -_021E9812: - cmp r4, #0 - bne _021E981A - bl sub_02022974 -_021E981A: - add r0, r5, #0 - add r1, r4, #0 - bl sub_020AE608 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021E97AC - - thumb_func_start ov5_021E9828 -ov5_021E9828: ; 0x021E9828 - add r0, #0xf8 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021E9828 - - thumb_func_start ov5_021E9830 -ov5_021E9830: ; 0x021E9830 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x49 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - add r6, r2, #0 - bl sub_02018144 - mov r2, #0x49 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - bl ov5_021EEBC0 - str r0, [r4, #0] - add r0, r4, #0 - add r0, #0xb8 - str r7, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - str r5, [r0, #0] - cmp r5, #0 - beq _021E988C - add r0, r5, #0 - bl sub_02039E10 - add r1, r4, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r5, #0 - bl sub_02039E20 - add r1, r4, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r0, #5 - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] -_021E988C: - add r0, r4, #0 - mov r1, #0 - add r0, #0xec - str r1, [r0, #0] - add r0, r4, #0 - bl ov5_021E8F60 - add r0, r4, #0 - mov r1, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #2 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xf8 - str r6, [r0, #0] - cmp r6, #0 - bne _021E98C2 - mov r0, #0x43 - mov r1, #4 - bl sub_02006C24 - add r1, r4, #0 - add r1, #0xf8 - str r0, [r1, #0] -_021E98C2: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E9830 - - thumb_func_start ov5_021E98C8 -ov5_021E98C8: ; 0x021E98C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xb8 - str r2, [r0, #0] - add r0, r5, #0 - add r4, r1, #0 - add r0, #0xbc - str r4, [r0, #0] - add r0, r4, #0 - add r6, r3, #0 - bl sub_02039E10 - add r1, r5, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r4, #0 - bl sub_02039E20 - add r1, r5, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r0, #5 - add r0, r5, #0 - add r0, #0xc8 - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #0 - add r0, #0xec - str r1, [r0, #0] - add r0, r5, #0 - bl ov5_021E8F60 - add r0, r5, #0 - mov r1, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #2 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xf8 - str r6, [r0, #0] - cmp r6, #0 - bne _021E9934 - mov r0, #0x43 - mov r1, #4 - bl sub_02006C24 - add r5, #0xf8 - str r0, [r5, #0] -_021E9934: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021E98C8 - - thumb_func_start ov5_021E9938 -ov5_021E9938: ; 0x021E9938 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - add r5, r0, #0 - add r7, r6, #0 -_021E9940: - lsl r4, r6, #2 - add r0, r5, r4 - add r0, #0x90 - ldr r2, [r0, #0] - ldr r0, _021E9990 ; =0x00000864 - mov r1, #0 - str r1, [r2, r0] - add r0, r5, r4 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E9994 ; =0x00000868 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021E9960 - bl ov5_021E1608 -_021E9960: - add r0, r5, r4 - add r0, #0x90 - ldr r0, [r0, #0] - bl sub_020181C4 - add r0, r5, r4 - add r0, #0x90 - str r7, [r0, #0] - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #4 - blo _021E9940 - add r0, r5, #0 - mov r1, #3 - add r0, #0xb4 - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #1 - add r0, #0xb0 - str r1, [r0, #0] - add r5, #0xec - str r7, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E9990: .word 0x00000864 -_021E9994: .word 0x00000868 - thumb_func_end ov5_021E9938 - - thumb_func_start ov5_021E9998 -ov5_021E9998: ; 0x021E9998 - push {r4, r5, r6, lr} - ldr r6, _021E99C0 ; =0x00000868 - add r5, r0, #0 - mov r4, #0 -_021E99A0: - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0x90 - ldr r0, [r0, #0] - ldr r0, [r0, r6] - cmp r0, #0 - beq _021E99B2 - bl ov5_021E1610 -_021E99B2: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021E99A0 - pop {r4, r5, r6, pc} - nop -_021E99C0: .word 0x00000868 - thumb_func_end ov5_021E9998 - - thumb_func_start ov5_021E99C4 -ov5_021E99C4: ; 0x021E99C4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov5_021EEB48 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021E99C4 - - thumb_func_start ov5_021E99D8 -ov5_021E99D8: ; 0x021E99D8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r6, #0x45 - add r5, r0, #0 - lsl r6, r6, #2 - ldr r3, [r5, r6] - sub r6, #8 - str r3, [sp] - add r3, r5, #0 - add r3, #0xc8 - ldr r3, [r3, #0] - add r4, r1, #0 - str r3, [sp, #4] - ldr r3, [r5, r6] - add r7, r2, #0 - bl ov5_021E9A14 - mov r3, #0x43 - str r5, [sp] - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, #8 - ldr r3, [r5, r3] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021E8F90 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021E99D8 - - thumb_func_start ov5_021E9A14 -ov5_021E9A14: ; 0x021E9A14 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov5_021E7AC4 - mov r3, #0x45 - lsl r3, r3, #2 - ldr r0, [r5, r3] - add r1, r4, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r2, r6, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - str r0, [sp, #8] - ldr r0, [sp, #0x3c] - str r0, [sp, #0xc] - add r0, sp, #0x14 - str r0, [sp, #0x10] - add r0, r3, #0 - sub r0, #0x10 - sub r3, #8 - ldr r0, [r5, r0] - ldr r3, [r5, r3] - bl ov5_021E7838 - mov r4, #0 - add r7, r4, #0 -_021E9A58: - lsl r6, r4, #2 - add r0, r5, r6 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E9AA8 ; =0x0000085C - str r7, [r1, r0] - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r2, r5, #0 - str r1, [sp] - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r3, r5, #0 - str r1, [sp, #4] - str r0, [sp, #8] - str r5, [sp, #0xc] - add r0, sp, #0x14 - add r2, #0xb8 - add r3, #0xbc - ldr r0, [r0, r6] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - add r1, r4, #0 - bl ov5_021E9B70 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021E9A58 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_021E9AA8: .word 0x0000085C - thumb_func_end ov5_021E9A14 - - thumb_func_start ov5_021E9AAC -ov5_021E9AAC: ; 0x021E9AAC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - bl ov5_021E7B4C - mov r3, #0x45 - lsl r3, r3, #2 - ldr r0, [r5, r3] - add r1, r6, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - add r2, r7, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - str r0, [sp, #0xc] - add r0, r3, #0 - str r4, [sp, #0x10] - sub r0, #0x10 - sub r3, #8 - ldr r0, [r5, r0] - ldr r3, [r5, r3] - bl ov5_021E7838 - mov r3, #0 - ldr r1, _021E9B0C ; =0x00000864 - add r2, r3, #0 -_021E9AF6: - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r3, r3, #1 - add r5, r5, #4 - str r2, [r0, r1] - cmp r3, #4 - blt _021E9AF6 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021E9B0C: .word 0x00000864 - thumb_func_end ov5_021E9AAC - - thumb_func_start ov5_021E9B10 -ov5_021E9B10: ; 0x021E9B10 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r1, #0 - add r6, r5, #0 - add r6, #0x90 - lsl r7, r4, #2 - str r2, [sp, #0x10] - ldr r1, [r6, r7] - ldr r0, _021E9B68 ; =0x0000085C - mov r2, #0 - str r2, [r1, r0] - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r2, r5, #0 - str r1, [sp] - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r2, #0xb8 - str r1, [sp, #4] - str r0, [sp, #8] - str r5, [sp, #0xc] - add r5, #0xbc - lsl r1, r4, #0x18 - ldr r0, [sp, #0x10] - ldr r2, [r2, #0] - ldr r3, [r5, #0] - lsr r1, r1, #0x18 - bl ov5_021E9B70 - ldr r1, [r6, r7] - ldr r0, _021E9B6C ; =0x00000864 - mov r2, #0 - str r2, [r1, r0] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021E9B68: .word 0x0000085C -_021E9B6C: .word 0x00000864 - thumb_func_end ov5_021E9B10 - - thumb_func_start ov5_021E9B70 -ov5_021E9B70: ; 0x021E9B70 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - add r4, r1, #0 - str r2, [sp, #4] - ldr r5, [sp, #0x3c] - cmp r7, #0 - blt _021E9BFE - ldr r2, [sp, #0x30] - ldr r1, [sp, #0x34] - mul r1, r2 - cmp r7, r1 - bge _021E9BFE - add r1, r3, #0 - bl sub_02039F74 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r2, sp, #0xc - bl ov5_021E7BAC - add r0, r5, #0 - add r0, #0xf8 - mov r1, #2 - ldr r2, [sp, #0x18] - lsl r1, r1, #0xa - ldr r0, [r0, #0] - add r1, r2, r1 - bl sub_02006E28 - add r6, r5, #0 - lsl r4, r4, #2 - add r6, #0x90 - ldr r1, [r6, r4] - ldr r0, _021E9C04 ; =0x00000854 - ldr r0, [r1, r0] - ldr r1, [sp, #0x10] - bl sub_020C2C54 - ldr r0, [r6, r4] - str r0, [sp, #8] - ldr r0, [sp, #4] - bl ov5_021EFA8C - str r0, [sp] - add r5, #0xf8 - ldr r0, [r5, #0] - mov r5, #2 - ldr r2, [sp, #8] - lsl r5, r5, #0xa - add r2, r2, r5 - ldr r3, [sp, #8] - add r5, #0x54 - ldr r1, [sp, #0x10] - add r3, r3, r5 - bl ov5_021E97AC - ldr r1, [sp, #0x38] - cmp r1, #1 - bne _021E9BF0 - bl ov5_021D53A4 -_021E9BF0: - ldr r1, [r6, r4] - ldr r0, _021E9C08 ; =0x00000864 - mov r2, #1 - str r2, [r1, r0] - ldr r1, [r6, r4] - sub r0, r0, #4 - str r7, [r1, r0] -_021E9BFE: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021E9C04: .word 0x00000854 -_021E9C08: .word 0x00000864 - thumb_func_end ov5_021E9B70 - - thumb_func_start ov5_021E9C0C -ov5_021E9C0C: ; 0x021E9C0C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - mov r4, #0 - add r5, r6, #0 -_021E9C16: - add r0, r5, #0 - add r0, #0x90 - ldr r1, [r0, #0] - mov r0, #0x86 - lsl r0, r0, #4 - ldr r1, [r1, r0] - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - beq _021E9C36 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - add r1, r6, #0 - add r2, r7, #0 - bl ov5_021E9C40 -_021E9C36: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021E9C16 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021E9C0C - - thumb_func_start ov5_021E9C40 -ov5_021E9C40: ; 0x021E9C40 - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - add r2, r0, #0 - add r5, r1, #0 - add r1, sp, #0x30 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - ldr r4, _021E9CCC ; =0x021FAEAC - str r0, [r1, #8] - ldmia r4!, {r0, r1} - add r3, sp, #0x24 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r6, _021E9CD0 ; =0x021FAEDC - str r0, [r3, #0] - add r4, sp, #0 - mov r3, #4 -_021E9C64: - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _021E9C64 - ldr r0, [r6, #0] - lsl r6, r2, #2 - str r0, [r4, #0] - add r4, r5, #0 - add r4, #0x90 - mov r0, #0x86 - add r2, r5, #0 - add r2, #0xbc - ldr r1, [r4, r6] - lsl r0, r0, #4 - ldr r0, [r1, r0] - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - add r3, sp, #0x30 - bl ov5_021E901C - mov r1, #0x46 - lsl r1, r1, #2 - ldr r2, [sp, #0x30] - ldr r0, [r5, r1] - add r0, r2, r0 - str r0, [sp, #0x30] - add r0, r1, #4 - ldr r2, [sp, #0x34] - ldr r0, [r5, r0] - add r1, #8 - add r0, r2, r0 - str r0, [sp, #0x34] - ldr r2, [sp, #0x38] - ldr r0, [r5, r1] - add r0, r2, r0 - str r0, [sp, #0x38] - ldr r2, [r4, r6] - ldr r0, _021E9CD4 ; =0x00000864 - ldr r1, [r2, r0] - cmp r1, #1 - bne _021E9CC8 - sub r0, #0x64 - add r0, r2, r0 - add r1, sp, #0x30 - add r2, sp, #0 - add r3, sp, #0x24 - bl sub_0201CA74 -_021E9CC8: - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021E9CCC: .word 0x021FAEAC -_021E9CD0: .word 0x021FAEDC -_021E9CD4: .word 0x00000864 - thumb_func_end ov5_021E9C40 - - thumb_func_start ov5_021E9CD8 -ov5_021E9CD8: ; 0x021E9CD8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #4 -_021E9CE0: - add r0, r4, #0 - bl ov5_021E7814 - add r6, r6, #1 - add r4, #0x30 - cmp r6, #2 - blt _021E9CE0 - mov r3, #0 - ldr r1, _021E9D38 ; =0x00000864 - add r2, r5, #0 - add r4, r3, #0 -_021E9CF6: - add r0, r2, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r3, r3, #1 - add r2, r2, #4 - str r4, [r0, r1] - cmp r3, #4 - blt _021E9CF6 - add r0, r5, #0 - mov r1, #3 - add r0, #0xb4 - str r1, [r0, #0] - mov r1, #1 - add r0, r5, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xec - str r4, [r0, #0] - sub r6, r1, #2 - lsl r7, r1, #0xb -_021E9D20: - add r1, r5, #0 - add r1, #0x90 - ldr r1, [r1, #0] - add r0, r6, #0 - add r2, r7, #0 - bl sub_020C4BB8 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _021E9D20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021E9D38: .word 0x00000864 - thumb_func_end ov5_021E9CD8 - - thumb_func_start ov5_021E9D3C -ov5_021E9D3C: ; 0x021E9D3C - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r0, r2, #0 - add r4, r3, #0 - str r1, [sp, #0x10] - ldr r0, [r0, #0] - ldr r1, [r4, #0] - str r2, [sp, #0x14] - bl ov5_021EEC24 - add r1, r4, #0 - add r1, #0xbc - ldr r1, [r1, #0] - add r0, r5, #0 - bl sub_02039D90 - mov r0, #0 - ldr r3, [sp, #0x14] - mov ip, r0 - add r5, r4, #0 -_021E9D66: - add r2, r3, #4 - add r6, r5, #4 - mov r7, #6 -_021E9D6C: - ldmia r2!, {r0, r1} - stmia r6!, {r0, r1} - sub r7, r7, #1 - bne _021E9D6C - mov r0, ip - add r0, r0, #1 - add r3, #0x30 - add r5, #0x30 - mov ip, r0 - cmp r0, #2 - blt _021E9D66 - ldr r2, [sp, #0x14] - mov r5, #0 - add r3, r4, #0 -_021E9D88: - add r0, r2, #0 - add r0, #0x80 - ldr r1, [r0, #0] - add r0, r3, #0 - add r0, #0x80 - add r5, r5, #1 - str r1, [r0, #0] - add r2, r2, #4 - add r3, r3, #4 - cmp r5, #4 - blt _021E9D88 - ldr r0, [sp, #0x14] - ldr r5, [sp, #0x14] - add r0, #0xa0 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0xa0 - strb r1, [r0] - ldr r0, [sp, #0x14] - add r6, r4, #0 - add r0, #0xa1 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0xa1 - strb r1, [r0] - ldr r0, [sp, #0x14] - add r0, #0xa2 - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0xa2 - strb r1, [r0] - ldr r0, [sp, #0x14] - add r0, #0xa4 - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa4 - str r1, [r0, #0] - ldr r0, [sp, #0x14] - add r0, #0xa8 - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xa8 - str r1, [r0, #0] - ldr r0, [sp, #0x14] - add r0, #0xac - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0xac - strb r1, [r0] - ldr r0, [sp, #0x14] - add r0, #0xad - ldrb r1, [r0] - add r0, r4, #0 - add r0, #0xad - strb r1, [r0] - mov r0, #0 - str r0, [sp, #0x18] -_021E9DFA: - add r0, r6, #0 - add r1, r5, #0 - add r0, #0x90 - add r1, #0x90 - ldr r2, [r1, #0] - mov r1, #2 - lsl r1, r1, #0xa - ldr r0, [r0, #0] - add r3, r2, r1 - add r2, r0, r1 - mov r7, #0xa -_021E9E10: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r7, r7, #1 - bne _021E9E10 - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r5, #0 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E9F90 ; =0x00000854 - ldr r2, [r1, r0] - add r1, r6, #0 - add r1, #0x90 - ldr r1, [r1, #0] - str r2, [r1, r0] - add r1, r5, #0 - add r1, #0x90 - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0x10 - ldr r1, [r2, r1] - add r2, r6, #0 - add r2, #0x90 - ldr r3, [r2, #0] - add r2, r0, #0 - add r2, #0x10 - str r1, [r3, r2] - add r1, r5, #0 - add r1, #0x90 - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0xc - ldr r2, [r2, r1] - add r1, r6, #0 - add r1, #0x90 - ldr r1, [r1, #0] - add r0, #0xc - str r2, [r1, r0] - ldr r0, [sp, #0x18] - add r5, r5, #4 - add r0, r0, #1 - add r6, r6, #4 - str r0, [sp, #0x18] - cmp r0, #4 - blt _021E9DFA - add r1, r4, #0 - ldr r0, [sp, #0x10] - add r1, #0xb8 - str r0, [r1, #0] - ldr r0, [sp, #0x14] - ldr r5, [sp, #0x14] - add r0, #0xc0 - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - ldr r0, [sp, #0x14] - add r3, r4, #0 - add r0, #0xc4 - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [sp, #0x14] - add r5, #0xcc - add r0, #0xc0 - ldr r0, [r0, #0] - add r3, #0xcc - lsl r1, r0, #5 - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] - mov r2, #4 -_021E9EA2: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021E9EA2 - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r3, #0x41 - lsl r3, r3, #2 - ldr r0, [sp, #0x14] - add r1, r3, #0 - ldr r0, [r0, r3] - add r1, #8 - str r0, [r4, r3] - ldr r0, [sp, #0x14] - ldr r1, [r0, r1] - add r0, r3, #0 - add r0, #8 - str r1, [r4, r0] - add r1, r3, #0 - ldr r0, [sp, #0x14] - add r1, #0xc - ldr r1, [r0, r1] - add r0, r3, #0 - add r0, #0xc - str r1, [r4, r0] - add r1, r3, #0 - ldr r0, [sp, #0x14] - add r1, #0x10 - ldr r1, [r0, r1] - add r0, r3, #0 - add r0, #0x10 - str r1, [r4, r0] - add r1, r3, #0 - ldr r0, [sp, #0x14] - add r1, #0x14 - add r5, r0, r1 - add r0, r3, #0 - add r0, #0x14 - add r2, r4, r0 - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - ldr r1, [sp, #0x44] - str r0, [r2, #0] - add r2, r3, #0 - str r4, [sp] - add r2, #8 - add r3, #0x10 - ldr r0, [sp, #0x40] - ldr r2, [r4, r2] - ldr r3, [r4, r3] - bl ov5_021E8F90 - add r0, r4, #0 - mov r7, #0 - add r0, #0xb0 - str r7, [r0, #0] - ldr r0, [sp, #0x14] - add r5, r4, #0 - add r0, #0xb4 - str r0, [sp, #0x14] - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xb4 - str r1, [r0, #0] - add r6, sp, #0x1c -_021E9F26: - add r0, r5, #0 - add r0, #0x90 - ldr r1, [r0, #0] - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r1, r0] - stmia r6!, {r0} - add r0, r5, #0 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021E9F94 ; =0x0000085C - ldr r0, [r1, r0] - bl ov5_021EF248 - add r7, r7, #1 - add r5, r5, #4 - cmp r7, #4 - blt _021E9F26 - mov r5, #0 - add r6, sp, #0x1c -_021E9F4E: - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r1, r4, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r2, r4, #0 - str r1, [sp] - add r1, r4, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r3, r4, #0 - str r1, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - add r2, #0xb8 - add r3, #0xbc - lsl r1, r5, #0x18 - ldr r0, [r6, #0] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - lsr r1, r1, #0x18 - bl ov5_021E7FF0 - add r5, r5, #1 - add r6, r6, #4 - cmp r5, #4 - blt _021E9F4E - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021E9F90: .word 0x00000854 -_021E9F94: .word 0x0000085C - thumb_func_end ov5_021E9D3C - - thumb_func_start ov5_021E9F98 -ov5_021E9F98: ; 0x021E9F98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r1, #0] - ldr r1, [sp] - ldr r1, [r1, #0] - bl ov5_021EEC24 - ldr r0, [sp, #4] - ldr r1, [sp] - add r0, #0xbc - add r1, #0xbc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_02039D90 - ldr r5, [sp, #4] - ldr r6, [sp] - mov r7, #0 -_021E9FC0: - add r4, r5, #4 - add r3, r6, #4 - mov r2, #6 -_021E9FC6: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021E9FC6 - add r7, r7, #1 - add r5, #0x30 - add r6, #0x30 - cmp r7, #2 - blt _021E9FC0 - ldr r2, [sp, #4] - ldr r3, [sp] - mov r4, #0 -_021E9FDE: - add r0, r2, #0 - add r0, #0x80 - ldr r1, [r0, #0] - add r0, r3, #0 - add r0, #0x80 - add r4, r4, #1 - str r1, [r0, #0] - add r2, r2, #4 - add r3, r3, #4 - cmp r4, #4 - blt _021E9FDE - ldr r0, [sp, #4] - ldr r5, [sp, #4] - add r0, #0xa0 - ldrb r1, [r0] - ldr r0, [sp] - ldr r6, [sp] - add r0, #0xa0 - strb r1, [r0] - ldr r0, [sp, #4] - mov r7, #0 - add r0, #0xa1 - ldrb r1, [r0] - ldr r0, [sp] - add r0, #0xa1 - strb r1, [r0] - ldr r0, [sp, #4] - add r0, #0xa2 - ldrb r1, [r0] - ldr r0, [sp] - add r0, #0xa2 - strb r1, [r0] - ldr r0, [sp, #4] - add r0, #0xa4 - ldr r1, [r0, #0] - ldr r0, [sp] - add r0, #0xa4 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r0, #0xa8 - ldr r1, [r0, #0] - ldr r0, [sp] - add r0, #0xa8 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r0, #0xac - ldrb r1, [r0] - ldr r0, [sp] - add r0, #0xac - strb r1, [r0] - ldr r0, [sp, #4] - add r0, #0xad - ldrb r1, [r0] - ldr r0, [sp] - add r0, #0xad - strb r1, [r0] -_021EA04E: - add r0, r6, #0 - add r1, r5, #0 - add r0, #0x90 - add r1, #0x90 - ldr r2, [r1, #0] - mov r1, #2 - lsl r1, r1, #0xa - ldr r0, [r0, #0] - add r4, r2, r1 - add r3, r0, r1 - mov r2, #0xa -_021EA064: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021EA064 - ldr r0, [r4, #0] - add r7, r7, #1 - str r0, [r3, #0] - add r0, r5, #0 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021EA170 ; =0x00000854 - ldr r2, [r1, r0] - add r1, r6, #0 - add r1, #0x90 - ldr r1, [r1, #0] - str r2, [r1, r0] - add r1, r5, #0 - add r1, #0x90 - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0x10 - ldr r1, [r2, r1] - add r2, r6, #0 - add r2, #0x90 - ldr r3, [r2, #0] - add r2, r0, #0 - add r2, #0x10 - str r1, [r3, r2] - add r1, r5, #0 - add r1, #0x90 - ldr r2, [r1, #0] - add r1, r0, #0 - add r1, #0xc - ldr r2, [r2, r1] - add r1, r6, #0 - add r1, #0x90 - ldr r1, [r1, #0] - add r0, #0xc - str r2, [r1, r0] - add r5, r5, #4 - add r6, r6, #4 - cmp r7, #4 - blt _021EA04E - ldr r0, [sp, #4] - ldr r4, [sp, #4] - add r0, #0xb8 - ldr r1, [r0, #0] - ldr r0, [sp] - ldr r3, [sp] - add r0, #0xb8 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r4, #0xcc - add r0, #0xc0 - ldr r1, [r0, #0] - ldr r0, [sp] - add r3, #0xcc - add r0, #0xc0 - str r1, [r0, #0] - ldr r0, [sp, #4] - mov r2, #4 - add r0, #0xc4 - ldr r1, [r0, #0] - ldr r0, [sp] - add r0, #0xc4 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r0, #5 - ldr r0, [sp] - add r0, #0xc8 - str r1, [r0, #0] -_021EA0F6: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021EA0F6 - ldr r0, [r4, #0] - ldr r1, [sp, #4] - str r0, [r3, #0] - mov r0, #0x41 - lsl r0, r0, #2 - ldr r2, [r1, r0] - ldr r1, [sp] - str r2, [r1, r0] - add r2, r0, #0 - ldr r1, [sp, #4] - add r2, #8 - ldr r3, [r1, r2] - add r2, r0, #0 - ldr r1, [sp] - add r2, #8 - str r3, [r1, r2] - add r2, r0, #0 - ldr r1, [sp, #4] - add r2, #0xc - ldr r3, [r1, r2] - add r2, r0, #0 - ldr r1, [sp] - add r2, #0xc - str r3, [r1, r2] - add r2, r0, #0 - ldr r1, [sp, #4] - add r2, #0x10 - ldr r3, [r1, r2] - add r2, r0, #0 - ldr r1, [sp] - add r2, #0x10 - str r3, [r1, r2] - add r2, r0, #0 - ldr r1, [sp, #4] - add r2, #0x14 - add r3, r1, r2 - ldr r1, [sp] - add r0, #0x14 - add r2, r1, r0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #0 - str r0, [r2, #0] - ldr r0, [sp] - add r0, #0xb0 - str r1, [r0, #0] - ldr r0, [sp, #4] - add r0, #0xb4 - str r0, [sp, #4] - ldr r1, [r0, #0] - ldr r0, [sp] - add r0, #0xb4 - str r0, [sp] - str r1, [r0, #0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021EA170: .word 0x00000854 - thumb_func_end ov5_021E9F98 - - thumb_func_start ov5_021EA174 -ov5_021EA174: ; 0x021EA174 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r0, r5, #0 - add r0, #0xa2 - ldrb r1, [r0] - add r4, r5, #0 - mov r0, #0x30 - add r2, r1, #0 - mul r2, r0 - add r0, #0xd4 - add r3, r5, #4 - ldr r0, [r5, r0] - add r6, r3, r2 - add r4, #0xcc - cmp r0, #0 - bne _021EA1C4 - ldr r0, [r4, #0x20] - cmp r0, #1 - bne _021EA1C4 - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _021EA22C - ldr r0, [r4, #0x14] - ldr r1, [r0, #0] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0] - cmp r1, r0 - ble _021EA1B2 - bl sub_02022974 -_021EA1B2: - ldr r0, [r4, #0x10] - ldr r1, [r0, #0] - ldr r0, [r4, #0x14] - ldr r0, [r0, #0] - sub r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0x10 - cmp r1, r0 - bge _021EA1C6 -_021EA1C4: - b _021EA30C -_021EA1C6: - ldr r1, [r4, #0xc] - add r2, sp, #0x10 - ldr r0, [r1, #0] - ldr r1, [r1, #8] - add r3, sp, #0xc - bl ov5_021E9230 - str r5, [sp] - mov r3, #0x43 - lsl r3, r3, #2 - ldr r2, [r5, r3] - add r3, #8 - ldr r0, [sp, #0x10] - ldr r1, [sp, #0xc] - ldr r3, [r5, r3] - bl ov5_021E8F90 - ldr r2, [r4, #0xc] - add r3, r4, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021EA20E - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - bne _021EA2EE -_021EA20E: - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021EA222 - bl sub_02022974 -_021EA222: - mov r0, #0 - str r0, [r4, #0x18] - str r0, [r4, #0x10] - str r0, [r4, #0x14] - b _021EA30C -_021EA22C: - ldr r2, [r4, #0xc] - ldr r3, [r4, #0] - ldr r7, [r2, #0] - cmp r3, r7 - beq _021EA244 - ldr r1, [r4, #8] - ldr r0, [r2, #8] - cmp r1, r0 - beq _021EA244 - bl sub_02022974 - b _021EA30C -_021EA244: - cmp r3, r7 - bne _021EA250 - ldr r1, [r4, #8] - ldr r0, [r2, #8] - cmp r1, r0 - beq _021EA30C -_021EA250: - mov r3, #1 - str r3, [r4, #0x18] - ldr r2, [r4, #0xc] - ldr r0, [r4, #0] - ldr r1, [r2, #0] - cmp r0, r1 - beq _021EA2A4 - cmp r0, r1 - ble _021EA26E - str r4, [r4, #0x10] - ldr r0, [r4, #0xc] - str r0, [r4, #0x14] - mov r0, #3 - strb r0, [r4, #0x1c] - b _021EA274 -_021EA26E: - str r2, [r4, #0x10] - str r4, [r4, #0x14] - strb r3, [r4, #0x1c] -_021EA274: - ldr r0, [r4, #0] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021EA28E - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - bne _021EA2EE -_021EA28E: - ldr r0, [r4, #0] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021EA304 - bl sub_02022974 - b _021EA304 -_021EA2A4: - add r1, r5, #0 - add r1, #0xd8 - add r0, r5, #0 - ldr r1, [r1, #0] - add r0, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r1, #8] - cmp r0, r1 - ble _021EA2C6 - add r0, r4, #0 - add r0, #8 - str r0, [r4, #0x10] - ldr r0, [r4, #0xc] - add r0, #8 - str r0, [r4, #0x14] - mov r0, #4 - b _021EA2D2 -_021EA2C6: - add r2, #8 - add r0, r4, #0 - str r2, [r4, #0x10] - add r0, #8 - str r0, [r4, #0x14] - mov r0, #2 -_021EA2D2: - strb r0, [r4, #0x1c] - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021EA2F0 - mov r0, #1 - bl sub_02038AE0 - cmp r0, #0 - beq _021EA2F0 -_021EA2EE: - b _021EA536 -_021EA2F0: - ldr r0, [r4, #8] - lsr r2, r0, #0x1f - lsl r1, r0, #0x11 - sub r1, r1, r2 - mov r0, #0x11 - ror r1, r0 - add r0, r2, r1 - beq _021EA304 - bl sub_02022974 -_021EA304: - ldrb r0, [r4, #0x1c] - add r1, r5, #0 - bl ov5_021E9190 -_021EA30C: - add r0, r5, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - cmp r0, #3 - bls _021EA318 - b _021EA48C -_021EA318: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021EA324: ; jump table - .short _021EA32C - _021EA324 - 2 ; case 0 - .short _021EA37C - _021EA324 - 2 ; case 1 - .short _021EA48C - _021EA324 - 2 ; case 2 - .short _021EA478 - _021EA324 - 2 ; case 3 -_021EA32C: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - add r1, r6, r0 - add r1, #0x20 - ldrb r1, [r1] - lsl r1, r1, #2 - add r1, r5, r1 - add r1, #0x80 - ldr r1, [r1, #0] - cmp r1, #1 - beq _021EA366 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r2, r5, #0 - str r1, [sp] - str r5, [sp, #4] - add r1, r5, #0 - add r3, r5, #0 - str r6, [sp, #8] - add r1, #0xb8 - add r2, #0xbc - add r3, #0xc0 - ldr r1, [r1, #0] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - bl ov5_021E7D98 -_021EA366: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - add r6, #0x22 - mov r1, #1 - add r0, r0, #1 - strb r0, [r6] - add r0, r5, #0 - add r0, #0xb4 - str r1, [r0, #0] - b _021EA48C -_021EA37C: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - sub r0, r0, #1 - add r0, r6, r0 - add r0, #0x20 - ldrb r0, [r0] - lsl r0, r0, #2 - add r0, r5, r0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #1 - bne _021EA3B4 - add r0, r6, #0 - bl ov5_021E7814 - add r1, r6, #0 - add r1, #0x22 - ldrb r1, [r1] - mov r0, #0 - sub r1, r1, #1 - add r1, r6, r1 - add r1, #0x20 - ldrb r1, [r1] - lsl r1, r1, #2 - add r1, r5, r1 - add r1, #0x80 - str r0, [r1, #0] -_021EA3B4: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - cmp r0, #2 - bhi _021EA48C - add r0, r6, #0 - add r0, #0x10 - bl ov5_021E80BC - cmp r0, #1 - bne _021EA48C - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - cmp r0, #2 - blo _021EA3DA - mov r0, #1 - str r0, [r6, #0x24] - b _021EA3E2 -_021EA3DA: - add r0, r5, #0 - mov r1, #0 - add r0, #0xb4 - str r1, [r0, #0] -_021EA3E2: - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - sub r0, r0, #1 - lsl r0, r0, #2 - ldr r2, [r6, r0] - ldr r0, _021EA53C ; =0x00000864 - ldr r1, [r2, r0] - cmp r1, #1 - bne _021EA438 - sub r0, #0x10 - ldr r0, [r2, r0] - bl sub_020B3C0C - cmp r0, #0 - beq _021EA422 - add r2, r0, #0 - add r2, #8 - beq _021EA416 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _021EA416 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _021EA418 -_021EA416: - mov r1, #0 -_021EA418: - cmp r1, #0 - beq _021EA422 - ldr r1, [r1, #0] - add r4, r0, r1 - b _021EA424 -_021EA422: - mov r4, #0 -_021EA424: - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - cmp r0, #1 - bne _021EA438 - add r0, r4, #0 - bl ov5_021D53A4 -_021EA438: - add r0, r5, #0 - add r0, #0xfc - ldr r3, [r0, #0] - cmp r3, #0 - beq _021EA48C - add r0, r6, #0 - add r0, #0x22 - ldrb r0, [r0] - mov r2, #0x86 - lsl r2, r2, #4 - sub r0, r0, #1 - lsl r0, r0, #2 - ldr r4, [r6, r0] - ldr r1, [r4, r2] - cmp r1, #0 - blt _021EA48C - add r0, r5, #0 - add r6, r5, #0 - add r0, #0xc0 - add r6, #0xc4 - ldr r0, [r0, #0] - ldr r6, [r6, #0] - mul r6, r0 - cmp r1, r6 - bge _021EA48C - mov r0, #1 - lsl r0, r0, #8 - add r2, #8 - ldr r0, [r5, r0] - ldr r2, [r4, r2] - blx r3 - b _021EA48C -_021EA478: - add r6, #0x10 - add r0, r6, #0 - bl ov5_021E80BC - cmp r0, #1 - bne _021EA48C - add r0, r5, #0 - mov r1, #0 - add r0, #0xa0 - strb r1, [r0] -_021EA48C: - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - bne _021EA4AE - add r0, r5, #0 - mov r1, #0 - add r0, #0xa2 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa1 - strb r1, [r0] - mov r0, #2 - add r5, #0xb4 - add sp, #0x14 - str r0, [r5, #0] - pop {r4, r5, r6, r7, pc} -_021EA4AE: - add r0, r5, #0 - bl ov5_021E8DAC - cmp r0, #1 - bne _021EA536 - add r0, r5, #0 - add r0, #0xa2 - ldrb r1, [r0] - mov r0, #0x30 - mov r2, #0 - mul r0, r1 - add r0, r5, r0 - str r2, [r0, #0x2c] - add r0, r5, #0 - bl ov5_021E8DBC - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0xa0 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa2 - ldrb r0, [r0] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r5, #0 - add r1, r2, r1 - add r0, #0xa2 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa0 - ldrb r0, [r0] - cmp r0, #0 - beq _021EA504 - mov r1, #0 - b _021EA514 -_021EA504: - add r0, r5, #0 - mov r1, #0 - add r0, #0xa2 - strb r1, [r0] - add r0, r5, #0 - add r0, #0xa1 - strb r1, [r0] - mov r1, #2 -_021EA514: - add r0, r5, #0 - add r0, #0xb4 - str r1, [r0, #0] - ldr r0, [r5, #0x6c] - cmp r0, #1 - bne _021EA536 - mov r0, #0 - str r0, [r5, #0x6c] - add r0, r5, #0 - add r0, #0x70 - ldrb r0, [r0] - add r1, r5, #0 - bl ov5_021E8DD4 - add r0, r5, #0 - bl ov5_021E8D50 -_021EA536: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021EA53C: .word 0x00000864 - thumb_func_end ov5_021EA174 - - thumb_func_start ov5_021EA540 -ov5_021EA540: ; 0x021EA540 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xb8 - str r2, [r0, #0] - add r0, r5, #0 - add r4, r1, #0 - add r0, #0xbc - str r4, [r0, #0] - add r0, r4, #0 - bl sub_02039E10 - add r1, r5, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r4, #0 - bl sub_02039E20 - add r1, r5, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - lsl r1, r0, #5 - add r0, r5, #0 - add r0, #0xc8 - str r1, [r0, #0] - add r0, r5, #0 - bl ov5_021E8F60 - add r0, r5, #0 - mov r1, #0 - add r0, #0xb0 - str r1, [r0, #0] - mov r0, #2 - add r5, #0xb4 - str r0, [r5, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EA540 - - thumb_func_start ov5_021EA58C -ov5_021EA58C: ; 0x021EA58C - push {r4, r5, lr} - sub sp, #0x14 - mov r4, #0x45 - add r5, r0, #0 - lsl r4, r4, #2 - ldr r0, [r5, r4] - str r0, [sp] - add r0, r5, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - str r0, [sp, #0xc] - add r0, r4, #0 - str r3, [sp, #0x10] - sub r0, #0x10 - sub r4, #8 - ldr r0, [r5, r0] - ldr r3, [r5, r4] - bl ov5_021E7838 - mov r3, #0 - ldr r1, _021EA5DC ; =0x00000864 - add r2, r3, #0 -_021EA5C8: - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - add r3, r3, #1 - add r5, r5, #4 - str r2, [r0, r1] - cmp r3, #4 - blt _021EA5C8 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_021EA5DC: .word 0x00000864 - thumb_func_end ov5_021EA58C - - thumb_func_start ov5_021EA5E0 -ov5_021EA5E0: ; 0x021EA5E0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r7, r1, #0 - add r4, r5, #0 - add r4, #0x90 - lsl r6, r7, #2 - ldr r0, [r4, r6] - ldr r3, _021EA66C ; =0x00000864 - mov r1, #0 - str r1, [r0, r3] - str r2, [sp, #0x10] - lsl r0, r7, #0x18 - ldr r2, [r4, r6] - sub r3, #0x10 - ldr r1, [r5, #0] - lsr r0, r0, #0x18 - add r2, r2, r3 - bl ov5_021EEB84 - lsl r0, r7, #0x18 - ldr r3, [r4, r6] - ldr r2, _021EA670 ; =0x00000858 - ldr r1, [r5, #0] - lsr r0, r0, #0x18 - add r2, r3, r2 - bl ov5_021EEB90 - mov r0, #0 - mov r2, #0x86 - ldr r1, [r4, r6] - mvn r0, r0 - lsl r2, r2, #4 - str r0, [r1, r2] - ldr r1, [r4, r6] - sub r2, #0x60 - bl sub_020C4BB8 - ldr r1, [r4, r6] - ldr r0, _021EA674 ; =0x0000085C - ldr r0, [r1, r0] - bl ov5_021EF248 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl ov5_021EFAC0 - add r1, r5, #0 - add r1, #0xc0 - ldr r1, [r1, #0] - add r2, r5, #0 - str r1, [sp] - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r2, #0xb8 - str r1, [sp, #4] - str r0, [sp, #8] - str r5, [sp, #0xc] - add r5, #0xbc - lsl r1, r7, #0x18 - ldr r0, [sp, #0x10] - ldr r2, [r2, #0] - ldr r3, [r5, #0] - lsr r1, r1, #0x18 - bl ov5_021E7E28 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021EA66C: .word 0x00000864 -_021EA670: .word 0x00000858 -_021EA674: .word 0x0000085C - thumb_func_end ov5_021EA5E0 - - thumb_func_start ov5_021EA678 -ov5_021EA678: ; 0x021EA678 - push {r4, r5} - mov r4, #0x43 - lsl r4, r4, #2 - str r1, [r0, r4] - add r5, r4, #4 - str r2, [r0, r5] - add r5, r4, #0 - add r5, #8 - str r3, [r0, r5] - lsl r5, r1, #0x10 - add r1, r4, #0 - add r1, #0xc - str r5, [r0, r1] - add r1, r4, #0 - lsl r2, r2, #0x10 - add r1, #0x10 - str r2, [r0, r1] - lsl r1, r3, #0x10 - add r4, #0x14 - str r1, [r0, r4] - pop {r4, r5} - bx lr - thumb_func_end ov5_021EA678 - - thumb_func_start ov5_021EA6A4 -ov5_021EA6A4: ; 0x021EA6A4 - mov r2, #0x41 - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov5_021EA6A4 - - thumb_func_start ov5_021EA6AC -ov5_021EA6AC: ; 0x021EA6AC - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov5_021EA6AC - - thumb_func_start ov5_021EA6B4 -ov5_021EA6B4: ; 0x021EA6B4 - mov r1, #0x45 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov5_021EA6B4 - - thumb_func_start ov5_021EA6BC -ov5_021EA6BC: ; 0x021EA6BC - add r3, r1, #0 - mov r1, #0x46 - lsl r1, r1, #2 - add r2, r0, r1 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EA6BC - - thumb_func_start ov5_021EA6D0 -ov5_021EA6D0: ; 0x021EA6D0 - mov r2, #0x42 - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov5_021EA6D0 - - thumb_func_start ov5_021EA6D8 -ov5_021EA6D8: ; 0x021EA6D8 - add r0, #0xbc - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EA6D8 - - thumb_func_start ov5_021EA6E0 -ov5_021EA6E0: ; 0x021EA6E0 - lsl r1, r1, #2 - add r0, r0, r1 - add r0, #0x90 - ldr r1, [r0, #0] - ldr r0, _021EA6F0 ; =0x00000864 - str r2, [r1, r0] - bx lr - nop -_021EA6F0: .word 0x00000864 - thumb_func_end ov5_021EA6E0 - - thumb_func_start ov5_021EA6F4 -ov5_021EA6F4: ; 0x021EA6F4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r3, #0x43 - add r0, r1, #0 - str r4, [sp] - lsl r3, r3, #2 - add r1, r2, #0 - ldr r2, [r4, r3] - add r3, #8 - ldr r3, [r4, r3] - bl ov5_021E8F90 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EA6F4 - - thumb_func_start ov5_021EA714 -ov5_021EA714: ; 0x021EA714 - push {r3, lr} - ldr r0, [r0, #4] - cmp r0, #0 - beq _021EA726 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _021EA726 - bl ov25_02253D7C -_021EA726: - pop {r3, pc} - thumb_func_end ov5_021EA714 - - thumb_func_start ov5_021EA728 -ov5_021EA728: ; 0x021EA728 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl sub_02056B24 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_020507E4 - add r6, r0, #0 - add r0, r4, #0 - bl sub_020567E0 - cmp r0, #0 - beq _021EA774 - add r0, r6, #0 - bl sub_0206AE2C - cmp r0, #0 - bne _021EA774 - ldr r0, _021EA788 ; =0x00000019 - mov r1, #2 - bl sub_02006590 - mov r0, #1 - bl sub_0200A914 - str r0, [sp] - ldr r1, [r5, #4] - ldr r2, [r5, #0xc] - ldr r3, [r5, #8] - add r0, r5, #0 - add r1, #0x14 - bl ov25_02253CE8 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_021EA774: - ldr r0, _021EA78C ; =0x00000018 - mov r1, #2 - bl sub_02006590 - ldr r0, [r5, #8] - bl ov25_02253CE0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021EA788: .word 0x00000019 -_021EA78C: .word 0x00000018 - thumb_func_end ov5_021EA728 - - thumb_func_start ov5_021EA790 -ov5_021EA790: ; 0x021EA790 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl sub_02056B24 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_020507E4 - add r6, r0, #0 - add r0, r4, #0 - bl sub_020567E0 - cmp r0, #0 - beq _021EA7C2 - add r0, r6, #0 - bl sub_0206AE2C - cmp r0, #0 - bne _021EA7C2 - ldr r0, [r5, #4] - ldr r0, [r0, #0x14] - bl ov25_02253D5C - pop {r4, r5, r6, pc} -_021EA7C2: - ldr r0, [r5, #8] - bl ov24_02253DA4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EA790 - - thumb_func_start ov5_021EA7CC -ov5_021EA7CC: ; 0x021EA7CC - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - bl sub_02056B24 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_020507E4 - add r6, r0, #0 - add r0, r4, #0 - bl sub_020567E0 - cmp r0, #0 - beq _021EA810 - add r0, r6, #0 - bl sub_0206AE2C - cmp r0, #0 - bne _021EA810 - ldr r0, [r5, #4] - ldr r0, [r0, #0x14] - bl ov25_02253D70 - cmp r0, #0 - beq _021EA824 - ldr r0, [r5, #4] - mov r1, #0 - str r1, [r0, #0x14] - ldr r0, _021EA828 ; =0x00000019 - bl sub_02006514 - mov r0, #1 - pop {r4, r5, r6, pc} -_021EA810: - ldr r0, [r5, #8] - bl ov24_02253DB4 - cmp r0, #0 - beq _021EA824 - ldr r0, _021EA82C ; =0x00000018 - bl sub_02006514 - mov r0, #1 - pop {r4, r5, r6, pc} -_021EA824: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021EA828: .word 0x00000019 -_021EA82C: .word 0x00000018 - thumb_func_end ov5_021EA7CC - - thumb_func_start ov5_021EA830 -ov5_021EA830: ; 0x021EA830 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021EA844 ; =0x00000018 - mov r1, #2 - bl sub_02006590 - ldr r0, [r4, #8] - bl ov24_02253CE0 - pop {r4, pc} - ; .align 2, 0 -_021EA844: .word 0x00000018 - thumb_func_end ov5_021EA830 - - thumb_func_start ov5_021EA848 -ov5_021EA848: ; 0x021EA848 - ldr r3, _021EA850 ; =ov24_02253DA4 - ldr r0, [r0, #8] - bx r3 - nop -_021EA850: .word ov24_02253DA4 - thumb_func_end ov5_021EA848 - - thumb_func_start ov5_021EA854 -ov5_021EA854: ; 0x021EA854 - push {r3, lr} - ldr r0, [r0, #8] - bl ov24_02253DB4 - cmp r0, #0 - beq _021EA86A - ldr r0, _021EA870 ; =0x00000018 - bl sub_02006514 - mov r0, #1 - pop {r3, pc} -_021EA86A: - mov r0, #0 - pop {r3, pc} - nop -_021EA870: .word 0x00000018 - thumb_func_end ov5_021EA854 - - thumb_func_start ov5_021EA874 -ov5_021EA874: ; 0x021EA874 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x34] - bl sub_0202B370 - mov r1, #0 - bl sub_0202AED8 - add r1, r4, #0 - ldr r0, [r4, #0x34] - add r1, #0x4c - mov r2, #4 - bl sub_020391DC - cmp r0, #0 - bne _021EA89C - add sp, #8 - mov r0, #1 - pop {r4, pc} -_021EA89C: - add r0, r4, #0 - mov r1, #0 - add r0, #0x8c - str r1, [r0, #0] - ldr r0, [r4, #0x34] - bl sub_02025E44 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0x30] - ldr r2, _021EA8E8 ; =0x000001E2 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xa - bl sub_0200DD0C - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0x30] - ldr r2, _021EA8EC ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #1 - str r0, [r4, #0x48] - mov r0, #0 - add sp, #8 - pop {r4, pc} - nop -_021EA8E8: .word 0x000001E2 -_021EA8EC: .word 0x000003D9 - thumb_func_end ov5_021EA874 - - thumb_func_start ov5_021EA8F0 -ov5_021EA8F0: ; 0x021EA8F0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0 - add r6, r0, #0 - mvn r1, r1 - add r0, #0x8c - str r1, [r0, #0] - mov r4, #0 - bl sub_02035E18 - cmp r0, #0 - ble _021EA92C - add r5, r6, #0 -_021EA90A: - ldr r0, [r5, #0x4c] - cmp r0, #2 - bne _021EA920 - add r0, r6, #0 - add r0, #0x8c - str r4, [r0, #0] - lsl r0, r4, #2 - mov r1, #0 - add r0, r6, r0 - str r1, [r0, #0x4c] - b _021EA92C -_021EA920: - add r5, r5, #4 - add r4, r4, #1 - bl sub_02035E18 - cmp r4, r0 - blt _021EA90A -_021EA92C: - add r0, r6, #0 - add r0, #0x8c - ldr r1, [r0, #0] - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - bne _021EA940 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021EA940: - ldr r0, [r6, #0x34] - bl sub_0207D990 - ldr r1, _021EA9B8 ; =0x000001B5 - mov r2, #1 - mov r3, #4 - bl sub_0207D688 - cmp r0, #1 - bne _021EA97A - add r0, r6, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, [r6, #0x38] - mov r1, #0 - bl sub_0200B498 - add r0, r6, #0 - mov r1, #0x39 - bl ov5_021EAE78 - mov r0, #2 - str r0, [r6, #0x48] - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021EA97A: - ldr r0, [r6, #0x34] - bl sub_0202B370 - add r4, r0, #0 - mov r5, #0 -_021EA984: - add r0, r4, #0 - add r1, r5, #0 - bl sub_0202AF78 - cmp r0, #0 - bne _021EA9A6 - mov r0, #0 - add r1, r6, #0 - str r0, [sp] - add r1, #0x8c - ldr r0, [r6, #0x34] - ldr r1, [r1, #0] - add r2, r5, #0 - mov r3, #4 - bl sub_02039298 - b _021EA9AC -_021EA9A6: - add r5, r5, #1 - cmp r5, #0x20 - blt _021EA984 -_021EA9AC: - mov r0, #1 - str r0, [r6, #0x48] - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_021EA9B8: .word 0x000001B5 - thumb_func_end ov5_021EA8F0 - - thumb_func_start ov5_021EA9BC -ov5_021EA9BC: ; 0x021EA9BC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x40] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _021EA9E8 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0x30] - ldr r1, _021EA9F0 ; =0x021FAF00 - ldr r0, [r0, #8] - ldr r2, _021EA9F4 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x44] - mov r0, #3 - str r0, [r4, #0x48] -_021EA9E8: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_021EA9F0: .word 0x021FAF00 -_021EA9F4: .word 0x000003D9 - thumb_func_end ov5_021EA9BC - - thumb_func_start ov5_021EA9F8 -ov5_021EA9F8: ; 0x021EA9F8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r6, r0, #0 - ldr r0, [r6, #0x44] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021EAA14 - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021EAA14: - cmp r0, #0 - bne _021EAA60 - ldr r0, [r6, #0x34] - bl sub_0202B370 - add r5, r0, #0 - mov r4, #0 -_021EAA22: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202AF78 - cmp r0, #0 - bne _021EAA44 - mov r0, #0 - add r1, r6, #0 - str r0, [sp] - add r1, #0x8c - ldr r0, [r6, #0x34] - ldr r1, [r1, #0] - add r2, r4, #0 - mov r3, #4 - bl sub_02039298 - b _021EAA4A -_021EAA44: - add r4, r4, #1 - cmp r4, #0x20 - blt _021EAA22 -_021EAA4A: - cmp r4, #0x20 - bne _021EAA60 - add r0, r6, #0 - mov r1, #0x3a - bl ov5_021EAE78 - mov r0, #4 - str r0, [r6, #0x48] - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_021EAA60: - mov r0, #1 - str r0, [r6, #0x48] - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EA9F8 - - thumb_func_start ov5_021EAA6C -ov5_021EAA6C: ; 0x021EAA6C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x40] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _021EAA98 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0x30] - ldr r1, _021EAAA0 ; =0x021FAF00 - ldr r0, [r0, #8] - ldr r2, _021EAAA4 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x44] - mov r0, #5 - str r0, [r4, #0x48] -_021EAA98: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_021EAAA0: .word 0x021FAF00 -_021EAAA4: .word 0x000003D9 - thumb_func_end ov5_021EAA6C - - thumb_func_start ov5_021EAAA8 -ov5_021EAAA8: ; 0x021EAAA8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x44] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021EAAC0 - mov r0, #0 - pop {r4, pc} -_021EAAC0: - cmp r0, #0 - bne _021EAAC8 - mov r0, #8 - b _021EAAE6 -_021EAAC8: - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, [r4, #0x38] - mov r1, #0 - bl sub_0200B498 - add r0, r4, #0 - mov r1, #0x3b - bl ov5_021EAE78 - mov r0, #6 -_021EAAE6: - str r0, [r4, #0x48] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021EAAA8 - - thumb_func_start ov5_021EAAEC -ov5_021EAAEC: ; 0x021EAAEC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x40] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _021EAB18 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0x30] - ldr r1, _021EAB20 ; =0x021FAF00 - ldr r0, [r0, #8] - ldr r2, _021EAB24 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x44] - mov r0, #7 - str r0, [r4, #0x48] -_021EAB18: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_021EAB20: .word 0x021FAF00 -_021EAB24: .word 0x000003D9 - thumb_func_end ov5_021EAAEC - - thumb_func_start ov5_021EAB28 -ov5_021EAB28: ; 0x021EAB28 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x44] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021EAB40 - mov r0, #0 - pop {r4, pc} -_021EAB40: - cmp r0, #0 - bne _021EAB48 - mov r0, #0xc - b _021EAB52 -_021EAB48: - add r0, r4, #0 - mov r1, #0x3a - bl ov5_021EAE78 - mov r0, #4 -_021EAB52: - str r0, [r4, #0x48] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021EAB28 - - thumb_func_start ov5_021EAB58 -ov5_021EAB58: ; 0x021EAB58 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r0, [r5, #0x34] - bl sub_0202B370 - add r6, r0, #0 - bl sub_0202AF94 - add r7, r0, #0 - add r0, r7, #1 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #0] - mov r0, #1 - str r0, [sp] - mov r0, #0xc - str r0, [sp, #4] - mov r0, #0xa - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _021EAC34 ; =0x000001AB - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0x30] - add r1, #0x20 - ldr r0, [r0, #8] - mov r2, #3 - mov r3, #0x13 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _021EAC38 ; =0x000003D9 - add r0, #0x20 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r4, #0 -_021EABAA: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202AF78 - cmp r0, #0 - beq _021EABD0 - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202AEF0 - add r1, r0, #0 - ldr r0, [r5, #8] - bl sub_02023D28 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - add r2, r4, #0 - bl sub_02013A6C -_021EABD0: - add r4, r4, #1 - cmp r4, #0x20 - blt _021EABAA - mov r2, #0xb - add r3, r2, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #0x3c] - sub r3, #0xd - bl sub_02013A4C - ldr r4, _021EAC3C ; =0x021FAF08 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r1, r7, #1 - add r0, sp, #0x14 - strh r1, [r0, #0x10] - mov r1, #5 - strh r1, [r0, #0x12] - ldr r0, [r5, #0] - mov r1, #0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0x20 - str r0, [sp, #0x20] - ldr r0, _021EAC40 ; =ov5_021EAF90 - str r5, [sp, #0x30] - str r0, [sp, #0x18] - add r0, r2, #0 - add r2, r1, #0 - mov r3, #4 - bl sub_0200112C - str r0, [r5, #4] - add r0, r5, #0 - add r0, #0x20 - bl sub_0201A954 - mov r0, #9 - str r0, [r5, #0x48] - mov r0, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021EAC34: .word 0x000001AB -_021EAC38: .word 0x000003D9 -_021EAC3C: .word 0x021FAF08 -_021EAC40: .word ov5_021EAF90 - thumb_func_end ov5_021EAB58 - - thumb_func_start ov5_021EAC44 -ov5_021EAC44: ; 0x021EAC44 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - bl sub_02001288 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _021EAC62 - add r0, r0, #1 - cmp r4, r0 - bne _021EAC8A - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EAC62: - ldr r0, _021EACF8 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, [r5, #0x38] - mov r1, #0 - bl sub_0200B498 - add r0, r5, #0 - mov r1, #0x3b - bl ov5_021EAE78 - mov r0, #6 - str r0, [r5, #0x48] - b _021EACD2 -_021EAC8A: - ldr r0, _021EACF8 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0x90 - str r4, [r0, #0] - ldr r0, [r5, #0x34] - bl sub_0202B370 - add r7, r0, #0 - mov r0, #4 - bl sub_02025E6C - add r6, r0, #0 - add r0, r7, #0 - add r1, r4, #0 - bl sub_0202AEF0 - add r1, r0, #0 - add r0, r6, #0 - bl sub_02025EC0 - ldr r0, [r5, #0x38] - mov r1, #0 - add r2, r6, #0 - bl sub_0200B498 - add r0, r6, #0 - bl sub_020181C4 - add r0, r5, #0 - mov r1, #0x3c - bl ov5_021EAE78 - mov r0, #0xa - str r0, [r5, #0x48] -_021EACD2: - add r0, r5, #0 - add r0, #0x20 - mov r1, #0 - bl sub_0200DC9C - add r0, r5, #0 - add r0, #0x20 - bl sub_0201A8FC - mov r1, #0 - ldr r0, [r5, #4] - add r2, r1, #0 - bl sub_02001384 - ldr r0, [r5, #0] - bl sub_02013A3C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021EACF8: .word 0x000005DC - thumb_func_end ov5_021EAC44 - - thumb_func_start ov5_021EACFC -ov5_021EACFC: ; 0x021EACFC - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x40] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _021EAD28 - mov r0, #4 - str r0, [sp] - ldr r0, [r4, #0x30] - ldr r1, _021EAD30 ; =0x021FAF00 - ldr r0, [r0, #8] - ldr r2, _021EAD34 ; =0x000003D9 - mov r3, #0xb - bl sub_02002100 - str r0, [r4, #0x44] - mov r0, #0xb - str r0, [r4, #0x48] -_021EAD28: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_021EAD30: .word 0x021FAF00 -_021EAD34: .word 0x000003D9 - thumb_func_end ov5_021EACFC - - thumb_func_start ov5_021EAD38 -ov5_021EAD38: ; 0x021EAD38 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x34] - bl sub_0202B370 - add r4, r0, #0 - ldr r0, [r5, #0x44] - mov r1, #4 - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021EAD58 - mov r0, #0 - pop {r3, r4, r5, pc} -_021EAD58: - cmp r0, #0 - bne _021EAD90 - ldr r0, [r5, #0x34] - bl sub_0203068C - add r1, r5, #0 - add r1, #0x90 - ldr r1, [r1, #0] - bl sub_02030788 - add r1, r5, #0 - add r1, #0x90 - ldr r1, [r1, #0] - add r0, r4, #0 - bl sub_0202AFD4 - mov r0, #0 - add r1, r5, #0 - str r0, [sp] - add r1, #0x8c - ldr r0, [r5, #0x34] - ldr r1, [r1, #0] - mov r2, #0x1f - mov r3, #4 - bl sub_02039298 - mov r0, #1 - b _021EADAE -_021EAD90: - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, [r5, #0x38] - mov r1, #0 - bl sub_0200B498 - add r0, r5, #0 - mov r1, #0x3b - bl ov5_021EAE78 - mov r0, #6 -_021EADAE: - str r0, [r5, #0x48] - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EAD38 - - thumb_func_start ov5_021EADB4 -ov5_021EADB4: ; 0x021EADB4 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02050A64 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02050A60 - ldr r0, [r4, #0x48] - cmp r0, #0xc - bhi _021EAE74 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021EADD6: ; jump table - .short _021EADF0 - _021EADD6 - 2 ; case 0 - .short _021EAE00 - _021EADD6 - 2 ; case 1 - .short _021EAE10 - _021EADD6 - 2 ; case 2 - .short _021EAE18 - _021EADD6 - 2 ; case 3 - .short _021EAE20 - _021EADD6 - 2 ; case 4 - .short _021EAE28 - _021EADD6 - 2 ; case 5 - .short _021EAE30 - _021EADD6 - 2 ; case 6 - .short _021EAE38 - _021EADD6 - 2 ; case 7 - .short _021EAE40 - _021EADD6 - 2 ; case 8 - .short _021EAE48 - _021EADD6 - 2 ; case 9 - .short _021EAE50 - _021EADD6 - 2 ; case 10 - .short _021EAE58 - _021EADD6 - 2 ; case 11 - .short _021EAE60 - _021EADD6 - 2 ; case 12 -_021EADF0: - add r0, r4, #0 - bl ov5_021EA874 - cmp r0, #0 - beq _021EAE74 - mov r0, #0xc - str r0, [r4, #0x48] - b _021EAE74 -_021EAE00: - add r0, r4, #0 - bl ov5_021EA8F0 - cmp r0, #0 - beq _021EAE74 - mov r0, #0xc - str r0, [r4, #0x48] - b _021EAE74 -_021EAE10: - add r0, r4, #0 - bl ov5_021EA9BC - b _021EAE74 -_021EAE18: - add r0, r4, #0 - bl ov5_021EA9F8 - b _021EAE74 -_021EAE20: - add r0, r4, #0 - bl ov5_021EAA6C - b _021EAE74 -_021EAE28: - add r0, r4, #0 - bl ov5_021EAAA8 - b _021EAE74 -_021EAE30: - add r0, r4, #0 - bl ov5_021EAAEC - b _021EAE74 -_021EAE38: - add r0, r4, #0 - bl ov5_021EAB28 - b _021EAE74 -_021EAE40: - add r0, r4, #0 - bl ov5_021EAB58 - b _021EAE74 -_021EAE48: - add r0, r4, #0 - bl ov5_021EAC44 - b _021EAE74 -_021EAE50: - add r0, r4, #0 - bl ov5_021EACFC - b _021EAE74 -_021EAE58: - add r0, r4, #0 - bl ov5_021EAD38 - b _021EAE74 -_021EAE60: - add r0, r4, #0 - bl ov5_021EAF1C - add r0, r4, #0 - bl sub_020181C4 - bl sub_0203D140 - mov r0, #1 - pop {r3, r4, r5, pc} -_021EAE74: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EADB4 - - thumb_func_start ov5_021EAE78 -ov5_021EAE78: ; 0x021EAE78 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0x10 - add r5, r1, #0 - bl sub_0201A7CC - cmp r0, #0 - beq _021EAE90 - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A8FC -_021EAE90: - ldr r0, [r4, #0x3c] - ldr r2, [r4, #8] - add r1, r5, #0 - bl sub_0200B1B8 - ldr r0, [r4, #0x38] - ldr r1, [r4, #0xc] - ldr r2, [r4, #8] - bl sub_0200C388 - ldr r0, [r4, #0x30] - add r1, r4, #0 - ldr r0, [r0, #8] - add r1, #0x10 - mov r2, #3 - bl sub_0205D8F4 - ldr r0, [r4, #0x30] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x10 - bl sub_0205D944 - ldr r0, [r4, #0x30] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r2, r0, #0 - add r0, r4, #0 - ldr r1, [r4, #0xc] - add r0, #0x10 - mov r3, #1 - bl sub_0205D994 - str r0, [r4, #0x40] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EAE78 - - thumb_func_start ov5_021EAEE0 -ov5_021EAEE0: ; 0x021EAEE0 - push {r4, lr} - mov r1, #0 - mov r2, #0x94 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #4 - bl sub_0200B358 - str r0, [r4, #0x38] - ldr r2, _021EAF18 ; =0x000002A3 - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - str r0, [r4, #0x3c] - mov r0, #0x6e - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0xc] - mov r0, #0x6e - mov r1, #4 - bl sub_02023790 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_021EAF18: .word 0x000002A3 - thumb_func_end ov5_021EAEE0 - - thumb_func_start ov5_021EAF1C -ov5_021EAF1C: ; 0x021EAF1C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_0200B190 - ldr r0, [r4, #0x38] - bl sub_0200B3F0 - ldr r0, [r4, #0xc] - bl sub_020237BC - ldr r0, [r4, #8] - bl sub_020237BC - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A7CC - cmp r0, #0 - beq _021EAF4C - add r4, #0x10 - add r0, r4, #0 - bl sub_0201A8FC -_021EAF4C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EAF1C - - thumb_func_start ov5_021EAF50 -ov5_021EAF50: ; 0x021EAF50 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r5, [r6, #0x10] - mov r0, #0xb - mov r1, #0x94 - bl sub_02018184 - add r4, r0, #0 - bl ov5_021EAEE0 - str r6, [r4, #0x30] - ldr r0, [r6, #0xc] - str r0, [r4, #0x34] - mov r0, #0 - str r0, [r4, #0x48] - cmp r5, #0 - bne _021EAF7E - ldr r1, _021EAF8C ; =ov5_021EADB4 - add r0, r6, #0 - add r2, r4, #0 - bl sub_02050904 - pop {r4, r5, r6, pc} -_021EAF7E: - ldr r1, _021EAF8C ; =ov5_021EADB4 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - pop {r4, r5, r6, pc} - nop -_021EAF8C: .word ov5_021EADB4 - thumb_func_end ov5_021EAF50 - - thumb_func_start ov5_021EAF90 -ov5_021EAF90: ; 0x021EAF90 - push {r3, lr} - cmp r2, #0 - bne _021EAF9C - ldr r0, _021EAFA0 ; =0x000005DC - bl sub_02005748 -_021EAF9C: - pop {r3, pc} - nop -_021EAFA0: .word 0x000005DC - thumb_func_end ov5_021EAF90 - - thumb_func_start ov5_021EAFA4 -ov5_021EAFA4: ; 0x021EAFA4 - push {r4, r5, r6, r7, lr} - sub sp, #0x6c - add r4, r3, #0 - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0 - str r0, [sp, #0x58] - ldr r1, [r4, #0x50] - add r0, sp, #0x60 - add r6, r2, #0 - bl sub_02020AAC - ldr r3, _021EB0C0 ; =0x021FAF28 - add r2, sp, #0xc - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - cmp r6, #0x60 - str r0, [r2, #0] - bhs _021EAFDE - mov r1, #0x60 - sub r0, r1, r6 - lsl r0, r0, #0x18 - ldrh r2, [r4] - lsr r0, r0, #0x18 - mul r0, r2 - bl sub_020E1F6C - b _021EAFF8 -_021EAFDE: - sub r6, #0x60 - lsl r0, r6, #0x18 - ldrh r1, [r4] - lsr r0, r0, #0x18 - mul r0, r1 - mov r1, #0x60 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - mov r0, #0 - mvn r0, r0 - mul r0, r1 -_021EAFF8: - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - cmp r5, #0x80 - bhs _021EB016 - mov r2, #0x80 - sub r2, r2, r5 - lsl r2, r2, #0x18 - ldrh r0, [r4, #2] - lsr r2, r2, #0x18 - mul r2, r0 - asr r0, r2, #6 - lsr r0, r0, #0x19 - add r0, r2, r0 - lsl r0, r0, #9 - b _021EB034 -_021EB016: - ldrh r2, [r4, #2] - sub r5, #0x80 - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - add r3, r2, #0 - mul r3, r0 - asr r0, r3, #6 - lsr r0, r0, #0x19 - add r0, r3, r0 - lsl r0, r0, #9 - lsr r2, r0, #0x10 - mov r0, #0 - mvn r0, r0 - mul r0, r2 - lsl r0, r0, #0x10 -_021EB034: - lsr r5, r0, #0x10 - asr r0, r1, #4 - lsl r3, r0, #1 - lsl r1, r3, #1 - ldr r2, _021EB0C4 ; =0x020F983C - add r3, r3, #1 - lsl r3, r3, #1 - ldrsh r1, [r2, r1] - ldrsh r2, [r2, r3] - add r0, sp, #0x24 - bl sub_020BBC30 - add r0, sp, #0xc - add r1, sp, #0x24 - add r2, sp, #0x18 - bl sub_020BC2CC - asr r0, r5, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - ldr r3, _021EB0C4 ; =0x020F983C - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #0x24 - bl sub_020BBC50 - add r0, sp, #0x18 - add r1, sp, #0x24 - add r2, r0, #0 - bl sub_020BC2CC - add r0, sp, #0x18 - add r1, r4, #0 - add r1, #0x20 - add r2, r0, #0 - bl sub_020BC2CC - add r0, r4, #0 - add r0, #0x10 - add r1, sp, #0x18 - bl sub_020BD218 - add r1, r0, #0 - ldr r0, [r4, #0x1c] - bl sub_020BCFD0 - neg r0, r0 - add r1, sp, #0x18 - add r2, r4, #4 - add r3, sp, #0 - bl sub_020BD628 - ldr r1, [sp, #0x60] - ldr r0, [sp] - add r2, sp, #0x54 - add r0, r1, r0 - str r0, [sp, #0x54] - ldr r1, [sp, #0x68] - ldr r0, [sp, #8] - add r0, r1, r0 - str r0, [sp, #0x5c] - ldmia r2!, {r0, r1} - stmia r7!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r7, #0] - add sp, #0x6c - pop {r4, r5, r6, r7, pc} - nop -_021EB0C0: .word 0x021FAF28 -_021EB0C4: .word 0x020F983C - thumb_func_end ov5_021EAFA4 - - thumb_func_start ov5_021EB0C8 -ov5_021EB0C8: ; 0x021EB0C8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - mov r1, #0x60 - bl sub_02018144 - add r1, r5, #0 - add r4, r0, #0 - bl ov5_021EB0E0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB0C8 - - thumb_func_start ov5_021EB0E0 -ov5_021EB0E0: ; 0x021EB0E0 - push {r4, r5, lr} - sub sp, #0x2c - add r5, r0, #0 - add r4, r1, #0 - add r0, sp, #0 - bl sub_02020A94 - add r0, r4, #0 - bl sub_02020A88 - strh r0, [r5] - ldrh r0, [r5] - ldr r2, _021EB17C ; =0x020F983C - asr r0, r0, #4 - lsl r1, r0, #1 - lsl r0, r1, #1 - add r1, r1, #1 - lsl r1, r1, #1 - ldrsh r0, [r2, r0] - ldrsh r1, [r2, r1] - bl sub_020BCFD0 - lsl r0, r0, #2 - mov r1, #3 - bl sub_020E1F6C - bl sub_020BD964 - ldr r3, _021EB180 ; =0x021FAF34 - strh r0, [r5, #2] - ldmia r3!, {r0, r1} - add r2, sp, #0x20 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r4, #0 - str r0, [r2, #0] - add r0, sp, #0x14 - bl sub_02020ABC - add r0, sp, #8 - add r1, r4, #0 - bl sub_02020AAC - add r0, sp, #0x14 - add r1, sp, #8 - add r2, r5, #4 - bl sub_020BD1B0 - add r3, sp, #0x20 - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r5, #4 - str r0, [r2, #0] - add r0, sp, #0x20 - bl sub_020BD218 - str r0, [r5, #0x1c] - add r0, sp, #0 - ldrh r0, [r0] - ldr r3, _021EB17C ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - add r0, r5, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, #0x20 - bl sub_020BBC30 - str r4, [r5, #0x50] - add sp, #0x2c - pop {r4, r5, pc} - nop -_021EB17C: .word 0x020F983C -_021EB180: .word 0x021FAF34 - thumb_func_end ov5_021EB0E0 - - thumb_func_start ov5_021EB184 -ov5_021EB184: ; 0x021EB184 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021EB19E - bne _021EB194 - bl sub_02022974 -_021EB194: - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] -_021EB19E: - pop {r4, pc} - thumb_func_end ov5_021EB184 - - thumb_func_start ov5_021EB1A0 -ov5_021EB1A0: ; 0x021EB1A0 - push {r4, lr} - add r4, r0, #0 - bl sub_02062920 - ldr r1, _021EB2E4 ; =0x00000107 - cmp r0, r1 - bgt _021EB24A - bge _021EB29C - cmp r0, #0x98 - bgt _021EB1DC - bge _021EB2B0 - cmp r0, #0x15 - bgt _021EB1C2 - bge _021EB29C - cmp r0, #0 - beq _021EB29C - b _021EB2C6 -_021EB1C2: - cmp r0, #0x64 - bgt _021EB1D6 - cmp r0, #0x61 - blt _021EB2C6 - beq _021EB29C - cmp r0, #0x62 - beq _021EB29C - cmp r0, #0x64 - beq _021EB2C2 - b _021EB2C6 -_021EB1D6: - cmp r0, #0x97 - beq _021EB2B0 - b _021EB2C6 -_021EB1DC: - cmp r0, #0xb0 - bgt _021EB1E8 - bge _021EB29C - cmp r0, #0x99 - beq _021EB2B0 - b _021EB2C6 -_021EB1E8: - cmp r0, #0xb1 - bgt _021EB1F0 - beq _021EB29C - b _021EB2C6 -_021EB1F0: - add r1, r0, #0 - sub r1, #0xb2 - cmp r1, #0x22 - bhi _021EB2C6 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021EB204: ; jump table - .short _021EB29C - _021EB204 - 2 ; case 0 - .short _021EB29C - _021EB204 - 2 ; case 1 - .short _021EB29C - _021EB204 - 2 ; case 2 - .short _021EB29C - _021EB204 - 2 ; case 3 - .short _021EB2C6 - _021EB204 - 2 ; case 4 - .short _021EB2C6 - _021EB204 - 2 ; case 5 - .short _021EB2C6 - _021EB204 - 2 ; case 6 - .short _021EB2C6 - _021EB204 - 2 ; case 7 - .short _021EB29C - _021EB204 - 2 ; case 8 - .short _021EB29C - _021EB204 - 2 ; case 9 - .short _021EB29C - _021EB204 - 2 ; case 10 - .short _021EB29C - _021EB204 - 2 ; case 11 - .short _021EB2C6 - _021EB204 - 2 ; case 12 - .short _021EB2C6 - _021EB204 - 2 ; case 13 - .short _021EB2C6 - _021EB204 - 2 ; case 14 - .short _021EB2C6 - _021EB204 - 2 ; case 15 - .short _021EB2C6 - _021EB204 - 2 ; case 16 - .short _021EB2A6 - _021EB204 - 2 ; case 17 - .short _021EB29C - _021EB204 - 2 ; case 18 - .short _021EB29C - _021EB204 - 2 ; case 19 - .short _021EB29C - _021EB204 - 2 ; case 20 - .short _021EB29C - _021EB204 - 2 ; case 21 - .short _021EB29C - _021EB204 - 2 ; case 22 - .short _021EB29C - _021EB204 - 2 ; case 23 - .short _021EB2C6 - _021EB204 - 2 ; case 24 - .short _021EB2C6 - _021EB204 - 2 ; case 25 - .short _021EB2C6 - _021EB204 - 2 ; case 26 - .short _021EB2C6 - _021EB204 - 2 ; case 27 - .short _021EB2C6 - _021EB204 - 2 ; case 28 - .short _021EB2C6 - _021EB204 - 2 ; case 29 - .short _021EB2C6 - _021EB204 - 2 ; case 30 - .short _021EB2C6 - _021EB204 - 2 ; case 31 - .short _021EB29C - _021EB204 - 2 ; case 32 - .short _021EB29C - _021EB204 - 2 ; case 33 - .short _021EB29C - _021EB204 - 2 ; case 34 -_021EB24A: - ldr r1, _021EB2E8 ; =0x0000010F - cmp r0, r1 - bgt _021EB278 - bge _021EB29C - sub r2, r1, #3 - cmp r0, r2 - bgt _021EB262 - bge _021EB29C - sub r1, r1, #7 - cmp r0, r1 - beq _021EB2B8 - b _021EB2C6 -_021EB262: - sub r2, r1, #2 - cmp r0, r2 - bgt _021EB270 - sub r1, r1, #2 - cmp r0, r1 - beq _021EB29C - b _021EB2C6 -_021EB270: - sub r1, r1, #1 - cmp r0, r1 - beq _021EB29C - b _021EB2C6 -_021EB278: - add r2, r1, #2 - cmp r0, r2 - bgt _021EB288 - bge _021EB29C - add r1, r1, #1 - cmp r0, r1 - beq _021EB29C - b _021EB2C6 -_021EB288: - add r2, r1, #3 - cmp r0, r2 - bgt _021EB296 - add r1, r1, #3 - cmp r0, r1 - beq _021EB29C - b _021EB2C6 -_021EB296: - add r1, r1, #4 - cmp r0, r1 - bne _021EB2C6 -_021EB29C: - add r0, r4, #0 - bl sub_02062AF0 - ldr r0, [r0, #4] - pop {r4, pc} -_021EB2A6: - add r0, r4, #0 - bl sub_02062AF0 - ldr r0, [r0, #4] - pop {r4, pc} -_021EB2B0: - add r0, r4, #0 - bl ov5_021ECB80 - pop {r4, pc} -_021EB2B8: - add r0, r4, #0 - bl sub_02062AF0 - ldr r0, [r0, #4] - pop {r4, pc} -_021EB2C2: - mov r0, #0 - pop {r4, pc} -_021EB2C6: - add r0, r4, #0 - bl ov5_021ECD04 - ldr r0, [r0, #4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - cmp r0, #1 - bne _021EB2E0 - add r0, r4, #0 - bl sub_02062AF0 - ldr r0, [r0, #4] - pop {r4, pc} -_021EB2E0: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_021EB2E4: .word 0x00000107 -_021EB2E8: .word 0x0000010F - thumb_func_end ov5_021EB1A0 - - thumb_func_start ov5_021EB2EC -ov5_021EB2EC: ; 0x021EB2EC - push {r3, r4, r5, lr} - mov r1, #0x10 - add r5, r0, #0 - bl sub_02062ACC - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - strb r0, [r4, #2] - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EB312 - add r0, r5, #0 - bl sub_02062B68 -_021EB312: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB2EC - - thumb_func_start ov5_021EB314 -ov5_021EB314: ; 0x021EB314 - push {r4, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r1, r0, #0 - add r0, r4, #0 - add r1, r1, #4 - bl ov5_021ECFA4 - pop {r4, pc} - thumb_func_end ov5_021EB314 - - thumb_func_start ov5_021EB328 -ov5_021EB328: ; 0x021EB328 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EB340 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED01C -_021EB340: - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECFA4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB328 - - thumb_func_start ov5_021EB354 -ov5_021EB354: ; 0x021EB354 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB396 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021EB376 - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 -_021EB376: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EB396 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED03C - ldr r1, [r4, #4] - add r0, r5, #0 - bl ov5_021EDEB4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628C4 -_021EB396: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB354 - - thumb_func_start ov5_021EB398 -ov5_021EB398: ; 0x021EB398 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - bl sub_02062AF0 - ldr r7, [r0, #4] - add r0, r4, #0 - bl sub_02062AF0 - str r0, [sp] - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB402 - cmp r7, #0 - beq _021EB402 - add r0, r4, #0 - bl sub_0206298C - str r0, [sp, #4] - add r0, r4, #0 - bl sub_02062A14 - add r5, r0, #0 - cmp r5, #9 - blt _021EB3D2 - bl sub_02022974 -_021EB3D2: - lsl r6, r5, #2 - ldr r5, _021EB408 ; =0x021FF3D4 - ldr r2, [sp] - ldr r3, [sp, #4] - ldr r5, [r5, r6] - add r0, r4, #0 - add r1, r7, #0 - blx r5 - ldr r1, [sp, #4] - ldr r0, [sp] - strb r1, [r0, #2] - add r0, r4, #0 - bl sub_02062A14 - ldr r1, [sp] - strb r0, [r1, #3] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EC6C0 -_021EB402: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EB408: .word 0x021FF3D4 - thumb_func_end ov5_021EB398 - - thumb_func_start ov5_021EB40C -ov5_021EB40C: ; 0x021EB40C - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r5, r0, #0 - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB436 - ldr r5, [r5, #4] - cmp r5, #0 - beq _021EB436 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EC6C0 -_021EB436: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB40C - - thumb_func_start ov5_021EB438 -ov5_021EB438: ; 0x021EB438 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r5, r0, #0 - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB476 - ldr r5, [r5, #4] - cmp r5, #0 - beq _021EB476 - add r0, r4, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB466 - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EB466: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EC6C0 -_021EB476: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB438 - - thumb_func_start ov5_021EB478 -ov5_021EB478: ; 0x021EB478 - push {r4, lr} - mov r0, #2 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EB49C - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - b _021EB4A2 -_021EB49C: - add r0, r4, #0 - bl ov5_021EC668 -_021EB4A2: - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 - pop {r4, pc} - thumb_func_end ov5_021EB478 - - thumb_func_start ov5_021EB4AC -ov5_021EB4AC: ; 0x021EB4AC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EB4D0 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EB4D0: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB4E4 - mov r1, #2 - add r0, r4, #0 - lsl r1, r1, #0xa - bl sub_02021368 -_021EB4E4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EB4AC - - thumb_func_start ov5_021EB4E8 -ov5_021EB4E8: ; 0x021EB4E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EB50C - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EB50C: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB520 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EB520: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EB4E8 - - thumb_func_start ov5_021EB524 -ov5_021EB524: ; 0x021EB524 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EB548 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EB548: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB55C - mov r1, #2 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EB55C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EB524 - - thumb_func_start ov5_021EB560 -ov5_021EB560: ; 0x021EB560 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #2 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EB584 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EB584: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB598 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xe - bl sub_02021368 -_021EB598: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EB560 - - thumb_func_start ov5_021EB59C -ov5_021EB59C: ; 0x021EB59C - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r6, r0, #0 - add r4, r2, #0 - mov r0, #2 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EB5C8 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - mov r0, #0 - strh r0, [r4] -_021EB5C8: - mov r0, #3 - ldrsb r0, [r4, r0] - cmp r0, #6 - beq _021EB5D4 - mov r0, #0 - strh r0, [r4] -_021EB5D4: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB618 - ldr r6, _021EB61C ; =0x021FF35C - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #0 - str r0, [r3, #0] - ldrsh r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02021368 - mov r0, #0 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4] - ldrsh r1, [r4, r0] - lsl r2, r1, #2 - add r1, sp, #0 - ldr r1, [r1, r2] - cmp r1, #0 - bne _021EB618 - strh r0, [r4] -_021EB618: - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021EB61C: .word 0x021FF35C - thumb_func_end ov5_021EB59C - - thumb_func_start ov5_021EB620 -ov5_021EB620: ; 0x021EB620 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - add r4, r2, #0 - mov r0, #2 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EB64C - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - mov r0, #0 - strh r0, [r4] -_021EB64C: - mov r0, #3 - ldrsb r0, [r4, r0] - cmp r0, #7 - beq _021EB658 - mov r0, #0 - strh r0, [r4] -_021EB658: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB694 - ldr r6, _021EB698 ; =0x021FF32C - add r3, sp, #0 - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #0 - ldrsh r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02021368 - mov r0, #0 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4] - ldrsh r1, [r4, r0] - lsl r2, r1, #2 - add r1, sp, #0 - ldr r1, [r1, r2] - cmp r1, #0 - bne _021EB694 - strh r0, [r4] -_021EB694: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021EB698: .word 0x021FF32C - thumb_func_end ov5_021EB620 - - thumb_func_start ov5_021EB69C -ov5_021EB69C: ; 0x021EB69C - push {r4, r5, r6, lr} - sub sp, #0x20 - add r6, r0, #0 - add r4, r2, #0 - mov r0, #2 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EB6C8 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - mov r0, #0 - strh r0, [r4] -_021EB6C8: - mov r0, #3 - ldrsb r0, [r4, r0] - cmp r0, #8 - beq _021EB6D4 - mov r0, #0 - strh r0, [r4] -_021EB6D4: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EB718 - ldr r6, _021EB71C ; =0x021FF3B4 - add r3, sp, #0 - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #0 - ldrsh r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02021368 - mov r0, #0 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4] - ldrsh r1, [r4, r0] - lsl r2, r1, #2 - add r1, sp, #0 - ldr r1, [r1, r2] - cmp r1, #0 - bne _021EB718 - strh r0, [r4] -_021EB718: - add sp, #0x20 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021EB71C: .word 0x021FF3B4 - thumb_func_end ov5_021EB69C - - thumb_func_start ov5_021EB720 -ov5_021EB720: ; 0x021EB720 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - bl sub_02062AF0 - ldr r7, [r0, #4] - add r0, r4, #0 - bl sub_02062AF0 - str r0, [sp] - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB78A - cmp r7, #0 - beq _021EB78A - add r0, r4, #0 - bl sub_0206298C - str r0, [sp, #4] - add r0, r4, #0 - bl sub_02062A14 - add r5, r0, #0 - cmp r5, #0xa - blt _021EB75A - bl sub_02022974 -_021EB75A: - lsl r6, r5, #2 - ldr r5, _021EB790 ; =0x021FF420 - ldr r2, [sp] - ldr r3, [sp, #4] - ldr r5, [r5, r6] - add r0, r4, #0 - add r1, r7, #0 - blx r5 - ldr r1, [sp, #4] - ldr r0, [sp] - strb r1, [r0, #2] - add r0, r4, #0 - bl sub_02062A14 - ldr r1, [sp] - strb r0, [r1, #3] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EC6C0 -_021EB78A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EB790: .word 0x021FF420 - thumb_func_end ov5_021EB720 - - thumb_func_start ov5_021EB794 -ov5_021EB794: ; 0x021EB794 - push {r4, lr} - mov r0, #2 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - bne _021EB7A8 - mov r0, #3 - ldrsb r0, [r2, r0] - cmp r0, #9 - bne _021EB7C0 -_021EB7A8: - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - b _021EB7C6 -_021EB7C0: - add r0, r4, #0 - bl ov5_021EC668 -_021EB7C6: - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 - pop {r4, pc} - thumb_func_end ov5_021EB794 - - thumb_func_start ov5_021EB7D0 -ov5_021EB7D0: ; 0x021EB7D0 - push {r4, lr} - mov r0, #3 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r0, #9 - beq _021EB7EC - add r0, r4, #0 - mov r1, #4 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EB7EC: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - pop {r4, pc} - thumb_func_end ov5_021EB7D0 - - thumb_func_start ov5_021EB7F8 -ov5_021EB7F8: ; 0x021EB7F8 - push {r3, r4, r5, lr} - mov r1, #0x10 - add r5, r0, #0 - bl sub_02062ACC - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - strb r0, [r4] - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1c - sub r1, r1, r2 - mov r0, #0x1c - ror r1, r0 - add r0, r2, r1 - strb r0, [r4, #2] - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EB830 - add r0, r5, #0 - bl sub_02062B68 -_021EB830: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EB7F8 - - thumb_func_start ov5_021EB834 -ov5_021EB834: ; 0x021EB834 - push {r4, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r1, r0, #0 - add r0, r4, #0 - add r1, r1, #4 - bl ov5_021ECFA4 - pop {r4, pc} - thumb_func_end ov5_021EB834 - - thumb_func_start ov5_021EB848 -ov5_021EB848: ; 0x021EB848 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EB860 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED01C -_021EB860: - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECFA4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB848 - - thumb_func_start ov5_021EB874 -ov5_021EB874: ; 0x021EB874 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB8B6 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021EB896 - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 -_021EB896: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EB8B6 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED03C - ldr r1, [r4, #4] - add r0, r5, #0 - bl ov5_021EDEB4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628C4 -_021EB8B6: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EB874 - - thumb_func_start ov5_021EB8B8 -ov5_021EB8B8: ; 0x021EB8B8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r6, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EB942 - cmp r6, #0 - beq _021EB942 - add r0, r5, #0 - bl sub_0206298C - add r7, r0, #0 - add r0, r5, #0 - bl sub_02062A14 - mov r1, #2 - ldrsb r0, [r4, r1] - cmp r0, #0 - beq _021EB8FC - sub r0, r0, #1 - strb r0, [r4, #2] - add r0, r6, #0 - mov r1, #0 - bl sub_02021368 - b _021EB928 -_021EB8FC: - add r0, r6, #0 - lsl r1, r1, #0xb - bl sub_02021368 - mov r0, #1 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #1] - ldrsb r0, [r4, r0] - cmp r0, #0x20 - blt _021EB928 - mov r0, #0 - strb r0, [r4, #1] - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r2, r0, #0x1c - sub r2, r2, r1 - mov r0, #0x1c - ror r2, r0 - add r0, r1, r2 - strb r0, [r4, #2] -_021EB928: - strb r7, [r4] - add r0, r5, #0 - bl sub_02062A14 - strb r0, [r4, #3] - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021EC6C0 -_021EB942: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EB8B8 - - thumb_func_start ov5_021EB944 -ov5_021EB944: ; 0x021EB944 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EBA08 - cmp r4, #0 - beq _021EBA08 - add r0, r5, #0 - bl sub_0206298C - add r7, r0, #0 - add r0, r5, #0 - bl sub_02062A14 - cmp r0, #0 - bne _021EB9BC - cmp r7, #1 - bls _021EB982 - mov r0, #1 - str r0, [sp, #4] - b _021EB986 -_021EB982: - mov r0, #0 - str r0, [sp, #4] -_021EB986: - add r0, r4, #0 - bl sub_02021358 - ldr r1, [sp, #4] - cmp r1, r0 - bne _021EB99A - mov r0, #3 - ldrsb r0, [r6, r0] - cmp r0, #0 - bne _021EB9B2 -_021EB99A: - ldr r1, [sp, #4] - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 -_021EB9B2: - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 - b _021EB9EE -_021EB9BC: - cmp r7, #1 - bls _021EB9C6 - mov r0, #1 - str r0, [sp] - b _021EB9CA -_021EB9C6: - mov r0, #0 - str r0, [sp] -_021EB9CA: - add r0, r4, #0 - bl sub_02021358 - ldr r1, [sp] - cmp r1, r0 - beq _021EB9E4 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EB9E4: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EB9EE: - strb r7, [r6, #2] - add r0, r5, #0 - bl sub_02062A14 - strb r0, [r6, #3] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EC6C0 -_021EBA08: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EB944 - - thumb_func_start ov5_021EBA0C -ov5_021EBA0C: ; 0x021EBA0C - push {r3, r4, r5, lr} - mov r1, #0x10 - add r5, r0, #0 - bl sub_02062ACC - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - strb r0, [r4] - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EBA32 - add r0, r5, #0 - bl sub_02062B68 -_021EBA32: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EBA0C - - thumb_func_start ov5_021EBA34 -ov5_021EBA34: ; 0x021EBA34 - push {r3, r4, lr} - sub sp, #0xc - add r2, sp, #0 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r4, r0, #0 - str r1, [r2, #8] - bl sub_02062AF0 - add r1, r0, #0 - add r0, r4, #0 - add r1, r1, #4 - bl ov5_021ECFA4 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02063088 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EBA34 - - thumb_func_start ov5_021EBA60 -ov5_021EBA60: ; 0x021EBA60 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EBA78 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED01C -_021EBA78: - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECFA4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EBA60 - - thumb_func_start ov5_021EBA8C -ov5_021EBA8C: ; 0x021EBA8C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EBACE - ldr r0, [r4, #4] - cmp r0, #0 - bne _021EBAAE - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 -_021EBAAE: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EBACE - add r1, r4, #0 - add r1, #8 - bl ov5_021ED03C - ldr r1, [r4, #4] - add r0, r5, #0 - bl ov5_021EDEB4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628C4 -_021EBACE: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EBA8C - - thumb_func_start ov5_021EBAD0 -ov5_021EBAD0: ; 0x021EBAD0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - bl sub_02062AF0 - ldr r7, [r0, #4] - add r0, r4, #0 - bl sub_02062AF0 - str r0, [sp] - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EBB3A - cmp r7, #0 - beq _021EBB3A - add r0, r4, #0 - bl sub_0206298C - str r0, [sp, #4] - add r0, r4, #0 - bl sub_02062A14 - add r5, r0, #0 - cmp r5, #0xa - blt _021EBB0A - bl sub_02022974 -_021EBB0A: - lsl r6, r5, #2 - ldr r5, _021EBB40 ; =0x021FF3F8 - ldr r2, [sp] - ldr r3, [sp, #4] - ldr r5, [r5, r6] - add r0, r4, #0 - add r1, r7, #0 - blx r5 - ldr r1, [sp, #4] - ldr r0, [sp] - strb r1, [r0] - add r0, r4, #0 - bl sub_02062A14 - ldr r1, [sp] - strb r0, [r1, #2] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EC6C0 -_021EBB3A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EBB40: .word 0x021FF3F8 - thumb_func_end ov5_021EBAD0 - - thumb_func_start ov5_021EBB44 -ov5_021EBB44: ; 0x021EBB44 - push {r3, r4, r5, lr} - add r4, r2, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EBB72 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - ldrb r1, [r4, #3] - mov r0, #1 - bic r1, r0 - strb r1, [r4, #3] - pop {r3, r4, r5, pc} -_021EBB72: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #9 - bne _021EBB88 - ldrb r1, [r4, #3] - mov r0, #1 - bic r1, r0 - mov r0, #1 - orr r0, r1 - strb r0, [r4, #3] - pop {r3, r4, r5, pc} -_021EBB88: - ldrb r0, [r4, #3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021EBBAA - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EC69C - ldrb r1, [r4, #3] - mov r0, #1 - bic r1, r0 - strb r1, [r4, #3] - pop {r3, r4, r5, pc} -_021EBBAA: - add r0, r5, #0 - bl ov5_021EC668 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EBB44 - - thumb_func_start ov5_021EBBB4 -ov5_021EBBB4: ; 0x021EBBB4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r4, r2, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EBBDC - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - b _021EBC12 -_021EBBDC: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #9 - bne _021EBBF2 - ldrb r1, [r4, #3] - mov r0, #1 - bic r1, r0 - mov r0, #1 - orr r0, r1 - strb r0, [r4, #3] - pop {r4, r5, r6, pc} -_021EBBF2: - ldrb r0, [r4, #3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021EBC12 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EC69C - ldrb r1, [r4, #3] - mov r0, #1 - bic r1, r0 - strb r1, [r4, #3] -_021EBC12: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBC26 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0xa - bl sub_02021368 -_021EBC26: - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EBBB4 - - thumb_func_start ov5_021EBC28 -ov5_021EBC28: ; 0x021EBC28 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EBC4E - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - b _021EBC64 -_021EBC4E: - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #9 - bne _021EBC64 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021EC69C -_021EBC64: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBC78 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EBC78: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EBC28 - - thumb_func_start ov5_021EBC7C -ov5_021EBC7C: ; 0x021EBC7C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EBCA2 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - b _021EBCB8 -_021EBCA2: - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #9 - bne _021EBCB8 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021EC69C -_021EBCB8: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBCCC - mov r1, #2 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EBCCC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EBC7C - - thumb_func_start ov5_021EBCD0 -ov5_021EBCD0: ; 0x021EBCD0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EBCF6 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - b _021EBD0C -_021EBCF6: - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #9 - bne _021EBD0C - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021EC69C -_021EBD0C: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBD20 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xe - bl sub_02021368 -_021EBD20: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EBCD0 - - thumb_func_start ov5_021EBD24 -ov5_021EBD24: ; 0x021EBD24 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r6, r0, #0 - add r4, r2, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EBD52 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - mov r0, #0 - strb r0, [r4, #1] - b _021EBD68 -_021EBD52: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #9 - bne _021EBD68 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EC69C -_021EBD68: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #6 - beq _021EBD74 - mov r0, #0 - strb r0, [r4, #1] -_021EBD74: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBDBA - ldr r6, _021EBDC0 ; =0x021FF378 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #1 - str r0, [r3, #0] - ldrsb r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02021368 - mov r0, #1 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #1] - ldrsb r0, [r4, r0] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - cmp r0, #0 - bne _021EBDBA - mov r0, #0 - strb r0, [r4, #1] -_021EBDBA: - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - nop -_021EBDC0: .word 0x021FF378 - thumb_func_end ov5_021EBD24 - - thumb_func_start ov5_021EBDC4 -ov5_021EBDC4: ; 0x021EBDC4 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - add r4, r2, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EBDF2 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - mov r0, #0 - strb r0, [r4, #1] - b _021EBE08 -_021EBDF2: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #9 - bne _021EBE08 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EC69C -_021EBE08: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #7 - beq _021EBE14 - mov r0, #0 - strb r0, [r4, #1] -_021EBE14: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBE52 - ldr r6, _021EBE58 ; =0x021FF33C - add r3, sp, #0 - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #1 - ldrsb r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02021368 - mov r0, #1 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #1] - ldrsb r0, [r4, r0] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - cmp r0, #0 - bne _021EBE52 - mov r0, #0 - strb r0, [r4, #1] -_021EBE52: - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021EBE58: .word 0x021FF33C - thumb_func_end ov5_021EBDC4 - - thumb_func_start ov5_021EBE5C -ov5_021EBE5C: ; 0x021EBE5C - push {r4, r5, r6, lr} - sub sp, #0x20 - add r6, r0, #0 - add r4, r2, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - beq _021EBE8A - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - mov r0, #0 - strb r0, [r4, #1] - b _021EBEA0 -_021EBE8A: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #9 - bne _021EBEA0 - add r0, r3, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EC69C -_021EBEA0: - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #8 - beq _021EBEAC - mov r0, #0 - strb r0, [r4, #1] -_021EBEAC: - add r0, r6, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBEF2 - ldr r6, _021EBEF8 ; =0x021FF394 - add r3, sp, #0 - add r2, r3, #0 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #1 - ldrsb r1, [r4, r1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02021368 - mov r0, #1 - ldrsb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, #1] - ldrsb r0, [r4, r0] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - cmp r0, #0 - bne _021EBEF2 - mov r0, #0 - strb r0, [r4, #1] -_021EBEF2: - add sp, #0x20 - pop {r4, r5, r6, pc} - nop -_021EBEF8: .word 0x021FF394 - thumb_func_end ov5_021EBE5C - - thumb_func_start ov5_021EBEFC -ov5_021EBEFC: ; 0x021EBEFC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - beq _021EBF22 - add r0, r3, #0 - bl ov5_021EDF24 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - b _021EBF3A -_021EBF22: - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #9 - beq _021EBF3A - add r0, r3, #0 - bl ov5_021EDF24 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #4 - bl ov5_021EC674 -_021EBF3A: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EBF4E - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EBF4E: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EBEFC - - thumb_func_start ov5_021EBF50 -ov5_021EBF50: ; 0x021EBF50 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - bl sub_02062AF0 - ldr r0, [r0, #4] - str r0, [sp] - add r0, r7, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r7, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EBFD2 - ldr r0, [sp] - cmp r0, #0 - beq _021EBFD2 - add r0, r7, #0 - bl sub_0206298C - str r0, [sp, #8] - add r0, r7, #0 - bl sub_02062A14 - str r0, [sp, #4] - cmp r0, #0xb - blt _021EBF8E - bl sub_02022974 -_021EBF8E: - mov r1, #2 - ldrsb r2, [r4, r1] - cmp r2, #0 - bne _021EBFA8 - ldr r0, [sp, #4] - cmp r0, r2 - beq _021EBFA8 - ldrb r0, [r4, #3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - bne _021EBFA8 - sub r0, r1, #3 - strb r0, [r4] -_021EBFA8: - ldr r5, [sp, #4] - ldr r1, [sp] - lsl r6, r5, #2 - ldr r5, _021EBFD8 ; =0x021FF448 - ldr r3, [sp, #8] - ldr r5, [r5, r6] - add r0, r7, #0 - add r2, r4, #0 - blx r5 - ldr r0, [sp, #8] - ldr r1, [sp] - strb r0, [r4] - ldr r0, [sp, #4] - strb r0, [r4, #2] - add r0, r7, #0 - bl ov5_021EDEB4 - ldr r1, [sp] - add r0, r7, #0 - bl ov5_021EC6C0 -_021EBFD2: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021EBFD8: .word 0x021FF448 - thumb_func_end ov5_021EBF50 - - thumb_func_start ov5_021EBFDC -ov5_021EBFDC: ; 0x021EBFDC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r3, #0 - add r4, r2, #0 - add r2, sp, #0 - ldr r3, _021EC064 ; =0x021FF30C - add r5, r1, #0 - add r7, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - lsl r0, r6, #2 - ldr r1, [r7, r0] - mov r0, #0 - ldrsb r0, [r4, r0] - cmp r6, r0 - beq _021EC01A - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - ldrb r1, [r4, #3] - mov r0, #1 - add sp, #0x10 - bic r1, r0 - strb r1, [r4, #3] - pop {r3, r4, r5, r6, r7, pc} -_021EC01A: - mov r2, #2 - ldrsb r0, [r4, r2] - cmp r0, #0 - beq _021EC032 - ldrb r1, [r4, #3] - mov r0, #1 - add sp, #0x10 - bic r1, r0 - mov r0, #1 - orr r0, r1 - strb r0, [r4, #3] - pop {r3, r4, r5, r6, r7, pc} -_021EC032: - ldrb r0, [r4, #3] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021EC056 - add r0, r5, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - ldrb r1, [r4, #3] - mov r0, #1 - add sp, #0x10 - bic r1, r0 - strb r1, [r4, #3] - pop {r3, r4, r5, r6, r7, pc} -_021EC056: - add r0, r5, #0 - lsl r1, r2, #0xb - bl sub_02021368 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EC064: .word 0x021FF30C - thumb_func_end ov5_021EBFDC - - thumb_func_start ov5_021EC068 -ov5_021EC068: ; 0x021EC068 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, r3, #0 - add r5, r1, #0 - add r6, r2, #0 - str r3, [sp] - bl ov5_021EDF30 - add r4, r0, #0 - mov r0, #0 - ldrsb r1, [r6, r0] - ldr r0, [sp] - cmp r0, r1 - bne _021EC08C - mov r0, #2 - ldrsb r0, [r6, r0] - cmp r0, #0 - beq _021EC09E -_021EC08C: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - b _021EC0CE -_021EC09E: - cmp r0, #9 - beq _021EC0B4 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - b _021EC0CE -_021EC0B4: - add r0, r5, #0 - bl sub_02021358 - cmp r4, r0 - beq _021EC0CE - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 -_021EC0CE: - add r0, r7, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EC0E2 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0xa - bl sub_02021368 -_021EC0E2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EC068 - - thumb_func_start ov5_021EC0E4 -ov5_021EC0E4: ; 0x021EC0E4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, r3, #0 - add r5, r1, #0 - add r6, r2, #0 - str r3, [sp] - bl ov5_021EDF30 - add r4, r0, #0 - mov r0, #0 - ldrsb r1, [r6, r0] - ldr r0, [sp] - cmp r0, r1 - beq _021EC112 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - b _021EC146 -_021EC112: - mov r0, #2 - ldrsb r0, [r6, r0] - cmp r0, #0xa - beq _021EC12C - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - b _021EC146 -_021EC12C: - add r0, r5, #0 - bl sub_02021358 - cmp r4, r0 - beq _021EC146 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 -_021EC146: - add r0, r7, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EC15A - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EC15A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EC0E4 - - thumb_func_start ov5_021EC15C -ov5_021EC15C: ; 0x021EC15C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - bl sub_02062AF0 - ldr r7, [r0, #4] - add r0, r4, #0 - bl sub_02062AF0 - str r0, [sp] - cmp r7, #0 - beq _021EC1D0 - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC1D0 - add r0, r4, #0 - bl sub_0206298C - str r0, [sp, #4] - add r0, r4, #0 - bl sub_02062A14 - add r5, r0, #0 - cmp r5, #4 - blt _021EC196 - bl sub_02022974 -_021EC196: - lsl r6, r5, #2 - ldr r5, _021EC1D4 ; =0x021FF31C - ldr r2, [sp] - ldr r3, [sp, #4] - ldr r5, [r5, r6] - add r0, r4, #0 - add r1, r7, #0 - blx r5 - ldr r2, [sp, #4] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EC374 - ldr r1, [sp, #4] - ldr r0, [sp] - strb r1, [r0] - add r0, r4, #0 - bl sub_02062A14 - ldr r1, [sp] - strb r0, [r1, #2] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021EC6C0 -_021EC1D0: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021EC1D4: .word 0x021FF31C - thumb_func_end ov5_021EC15C - - thumb_func_start ov5_021EC1D8 -ov5_021EC1D8: ; 0x021EC1D8 - push {r4, lr} - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - bne _021EC1EC - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #0 - beq _021EC202 -_021EC1EC: - ldr r1, _021EC224 ; =0x021FF34C - lsl r2, r3, #2 - ldr r1, [r1, r2] - add r0, r4, #0 - bl sub_02021344 - mov r1, #0xf - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_020213A4 -_021EC202: - add r0, r4, #0 - bl sub_020213D4 - mov r1, #1 - lsl r1, r1, #0xc - sub r1, r0, r1 - bpl _021EC212 - mov r1, #0 -_021EC212: - add r0, r4, #0 - bl sub_020213A4 - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 - pop {r4, pc} - nop -_021EC224: .word 0x021FF34C - thumb_func_end ov5_021EC1D8 - - thumb_func_start ov5_021EC228 -ov5_021EC228: ; 0x021EC228 - push {r4, lr} - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - bne _021EC23C - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #1 - beq _021EC250 -_021EC23C: - ldr r1, _021EC25C ; =0x021FF34C - lsl r2, r3, #2 - ldr r1, [r1, r2] - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EC250: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - pop {r4, pc} - ; .align 2, 0 -_021EC25C: .word 0x021FF34C - thumb_func_end ov5_021EC228 - - thumb_func_start ov5_021EC260 -ov5_021EC260: ; 0x021EC260 - push {r3, r4, r5, lr} - add r4, r2, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - add r5, r1, #0 - cmp r3, r0 - bne _021EC276 - mov r0, #2 - ldrsb r0, [r4, r0] - cmp r0, #2 - beq _021EC294 -_021EC276: - ldr r1, _021EC320 ; =0x021FF34C - lsl r2, r3, #2 - ldr r1, [r1, r2] - add r0, r5, #0 - bl sub_02021344 - mov r1, #0xf - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020213A4 - ldrb r1, [r4, #3] - mov r0, #0xfe - bic r1, r0 - strb r1, [r4, #3] -_021EC294: - add r0, r5, #0 - bl sub_020213D4 - add r1, r0, #0 - ldrb r0, [r4, #3] - lsl r2, r0, #0x18 - lsr r2, r2, #0x19 - beq _021EC2AE - cmp r2, #1 - beq _021EC2D0 - cmp r2, #2 - beq _021EC2F6 - b _021EC310 -_021EC2AE: - mov r3, #1 - lsl r3, r3, #0xc - sub r1, r1, r3 - mov r3, #0xa - lsl r3, r3, #0xc - cmp r1, r3 - bgt _021EC310 - add r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - mov r3, #0xfe - lsl r2, r2, #0x19 - bic r0, r3 - lsr r2, r2, #0x18 - orr r0, r2 - strb r0, [r4, #3] - b _021EC310 -_021EC2D0: - mov r3, #1 - lsl r3, r3, #0xc - add r1, r1, r3 - mov r3, #0xf - lsl r3, r3, #0xc - cmp r1, r3 - blt _021EC310 - add r2, r2, #1 - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - mov r3, #0xfe - lsl r2, r2, #0x19 - bic r0, r3 - lsr r2, r2, #0x18 - orr r0, r2 - strb r0, [r4, #3] - mov r0, #0 - strb r0, [r4, #1] - b _021EC310 -_021EC2F6: - mov r0, #1 - ldrsb r2, [r4, r0] - add r2, r2, #1 - strb r2, [r4, #1] - ldrsb r0, [r4, r0] - cmp r0, #0x1e - blt _021EC310 - mov r0, #0 - strb r0, [r4, #1] - ldrb r2, [r4, #3] - mov r0, #0xfe - bic r2, r0 - strb r2, [r4, #3] -_021EC310: - add r0, r5, #0 - bl sub_020213A4 - add r0, r5, #0 - mov r1, #0 - bl sub_02021368 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021EC320: .word 0x021FF34C - thumb_func_end ov5_021EC260 - - thumb_func_start ov5_021EC324 -ov5_021EC324: ; 0x021EC324 - push {r4, lr} - mov r0, #0 - ldrsb r0, [r2, r0] - add r4, r1, #0 - cmp r3, r0 - bne _021EC338 - mov r0, #2 - ldrsb r0, [r2, r0] - cmp r0, #3 - beq _021EC34E -_021EC338: - ldr r1, _021EC370 ; =0x021FF34C - lsl r2, r3, #2 - ldr r1, [r1, r2] - add r0, r4, #0 - bl sub_02021344 - mov r1, #0xf - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_020213A4 -_021EC34E: - add r0, r4, #0 - bl sub_020213D4 - mov r1, #1 - lsl r1, r1, #0xc - sub r1, r0, r1 - bpl _021EC35E - mov r1, #0 -_021EC35E: - add r0, r4, #0 - bl sub_020213A4 - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 - pop {r4, pc} - nop -_021EC370: .word 0x021FF34C - thumb_func_end ov5_021EC324 - - thumb_func_start ov5_021EC374 -ov5_021EC374: ; 0x021EC374 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r2, #0 - add r2, sp, #0 - mov r0, #0 - str r0, [r2, #0] - str r0, [r2, #4] - str r0, [r2, #8] - add r0, r1, #0 - bl sub_02021394 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r4, #3 - bhi _021EC3DA - add r1, r4, r4 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021EC3A4: ; jump table - .short _021EC3DA - _021EC3A4 - 2 ; case 0 - .short _021EC3AC - _021EC3A4 - 2 ; case 1 - .short _021EC3B8 - _021EC3A4 - 2 ; case 2 - .short _021EC3CA - _021EC3A4 - 2 ; case 3 -_021EC3AC: - cmp r0, #0x18 - blt _021EC3DA - mov r0, #6 - lsl r0, r0, #0xc - str r0, [sp, #8] - b _021EC3DA -_021EC3B8: - cmp r0, #0x28 - bge _021EC3C4 - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp] - b _021EC3DA -_021EC3C4: - ldr r0, _021EC3E8 ; =0xFFFFB000 - str r0, [sp] - b _021EC3DA -_021EC3CA: - cmp r0, #0x38 - bge _021EC3D4 - ldr r0, _021EC3EC ; =0xFFFFF000 - str r0, [sp] - b _021EC3DA -_021EC3D4: - mov r0, #5 - lsl r0, r0, #0xc - str r0, [sp] -_021EC3DA: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02063088 - add sp, #0xc - pop {r4, r5, pc} - nop -_021EC3E8: .word 0xFFFFB000 -_021EC3EC: .word 0xFFFFF000 - thumb_func_end ov5_021EC374 - - thumb_func_start ov5_021EC3F0 -ov5_021EC3F0: ; 0x021EC3F0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC450 - cmp r4, #0 - beq _021EC450 - add r0, r5, #0 - bl sub_0206298C - add r7, r0, #0 - strb r7, [r6] - add r0, r5, #0 - bl sub_02062A14 - strb r0, [r6, #2] - add r0, r7, #0 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 - add r0, r4, #0 - mov r1, #0 - bl sub_02021368 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EC6C0 -_021EC450: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC3F0 - - thumb_func_start ov5_021EC454 -ov5_021EC454: ; 0x021EC454 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC4B8 - cmp r4, #0 - beq _021EC4B8 - add r0, r5, #0 - bl sub_0206298C - strb r0, [r6] - add r0, r5, #0 - bl sub_02062A14 - strb r0, [r6, #2] - add r0, r4, #0 - bl sub_02021358 - cmp r0, #0 - beq _021EC49E - add r0, r4, #0 - mov r1, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EC49E: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EC6C0 -_021EC4B8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC454 - - thumb_func_start ov5_021EC4BC -ov5_021EC4BC: ; 0x021EC4BC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC552 - cmp r4, #0 - beq _021EC552 - add r0, r5, #0 - bl sub_0206298C - add r7, r0, #0 - add r0, r5, #0 - bl sub_02062A14 - cmp r0, #0 - bne _021EC514 - add r0, r4, #0 - bl sub_02021358 - cmp r0, #1 - beq _021EC508 - add r0, r4, #0 - mov r1, #1 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EC508: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - b _021EC538 -_021EC514: - add r0, r4, #0 - bl sub_02021358 - cmp r0, #0 - beq _021EC52E - add r0, r4, #0 - mov r1, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EC52E: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EC538: - strb r7, [r6] - add r0, r5, #0 - bl sub_02062A14 - strb r0, [r6, #2] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EC6C0 -_021EC552: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EC4BC - - thumb_func_start ov5_021EC554 -ov5_021EC554: ; 0x021EC554 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC5BC - cmp r4, #0 - beq _021EC5BC - add r0, r5, #0 - bl sub_0206298C - mov r1, #0 - ldrsb r1, [r6, r1] - add r7, r0, #0 - cmp r7, r1 - beq _021EC598 - bl ov5_021EDF18 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021344 - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EC598: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EC6C0 - add r0, r5, #0 - strb r7, [r6] - bl sub_02062A14 - strb r0, [r6, #2] -_021EC5BC: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC554 - - thumb_func_start ov5_021EC5C0 -ov5_021EC5C0: ; 0x021EC5C0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #4] - add r0, r5, #0 - bl sub_02062AF0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC636 - cmp r4, #0 - beq _021EC636 - add r0, r5, #0 - bl sub_0206298C - str r0, [sp] - add r0, r5, #0 - bl sub_02062A14 - add r7, r0, #0 - mov r0, #2 - ldrsb r0, [r6, r0] - cmp r7, r0 - beq _021EC616 - cmp r7, #0 - bne _021EC606 - add r0, r4, #0 - mov r1, #0 - bl sub_02021344 - b _021EC60E -_021EC606: - add r0, r4, #0 - mov r1, #1 - bl sub_02021344 -_021EC60E: - add r0, r4, #0 - mov r1, #0 - bl sub_020213A4 -_021EC616: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [sp] - add r1, r4, #0 - strb r0, [r6] - add r0, r5, #0 - strb r7, [r6, #2] - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EC6C0 -_021EC636: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EC5C0 - - thumb_func_start ov5_021EC638 -ov5_021EC638: ; 0x021EC638 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r4, r1, #0xc - add r0, r4, #0 - add r1, r6, #0 - bl sub_020E1F6C - sub r1, r4, r1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020213A4 - add r0, r5, #0 - mov r1, #0 - bl sub_02021368 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC638 - - thumb_func_start ov5_021EC668 -ov5_021EC668: ; 0x021EC668 - ldr r3, _021EC670 ; =ov5_021EC638 - mov r1, #8 - bx r3 - nop -_021EC670: .word ov5_021EC638 - thumb_func_end ov5_021EC668 - - thumb_func_start ov5_021EC674 -ov5_021EC674: ; 0x021EC674 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r1, r2, #0 - bl ov5_021EC638 - add r0, r5, #0 - bl sub_020213D4 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - add r1, r6, #0 - bl sub_020213A4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC674 - - thumb_func_start ov5_021EC69C -ov5_021EC69C: ; 0x021EC69C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EC668 - add r0, r5, #0 - bl sub_020213D4 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02021344 - add r0, r5, #0 - add r1, r6, #0 - bl sub_020213A4 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EC69C - - thumb_func_start ov5_021EC6C0 -ov5_021EC6C0: ; 0x021EC6C0 - push {r4, r5, r6, lr} - mov r4, #1 - add r6, r1, #0 - lsl r1, r4, #9 - add r5, r0, #0 - bl sub_020628D8 - cmp r0, #1 - bne _021EC6D4 - mov r4, #0 -_021EC6D4: - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #1 - bne _021EC6F2 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #0 - bne _021EC6F2 - mov r4, #0 -_021EC6F2: - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - bl sub_02021320 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC6C0 - - thumb_func_start ov5_021EC700 -ov5_021EC700: ; 0x021EC700 - push {r4, lr} - ldr r3, _021EC72C ; =0x021FB51C - add r2, r1, #0 - ldr r4, [r3, #0] - ldr r1, _021EC730 ; =0x0000FFFF - cmp r4, r1 - beq _021EC726 -_021EC70E: - cmp r4, r0 - bne _021EC71E - add r3, r3, #4 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - pop {r4, pc} -_021EC71E: - add r3, #0x10 - ldr r4, [r3, #0] - cmp r4, r1 - bne _021EC70E -_021EC726: - bl sub_02022974 - pop {r4, pc} - ; .align 2, 0 -_021EC72C: .word 0x021FB51C -_021EC730: .word 0x0000FFFF - thumb_func_end ov5_021EC700 - - thumb_func_start ov5_021EC734 -ov5_021EC734: ; 0x021EC734 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - mov r1, #4 - bl sub_02062ACC - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062924 - add r1, sp, #0 - bl ov5_021EC700 - add r0, r5, #0 - add r1, sp, #0 - bl ov5_021F121C - str r0, [r4, #0] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021EC734 - - thumb_func_start ov5_021EC75C -ov5_021EC75C: ; 0x021EC75C - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EC75C - - thumb_func_start ov5_021EC760 -ov5_021EC760: ; 0x021EC760 - push {r4, lr} - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021EC776 - bl ov5_021DF74C - mov r0, #0 - str r0, [r4, #0] -_021EC776: - pop {r4, pc} - thumb_func_end ov5_021EC760 - - thumb_func_start ov5_021EC778 -ov5_021EC778: ; 0x021EC778 - push {r4, lr} - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021EC78E - bl ov5_021DF74C - mov r0, #0 - str r0, [r4, #0] -_021EC78E: - pop {r4, pc} - thumb_func_end ov5_021EC778 - - thumb_func_start ov5_021EC790 -ov5_021EC790: ; 0x021EC790 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062924 - add r1, sp, #0 - bl ov5_021EC700 - add r0, r5, #0 - add r1, sp, #0 - bl ov5_021F121C - str r0, [r4, #0] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC790 - - thumb_func_start ov5_021EC7B8 -ov5_021EC7B8: ; 0x021EC7B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #4 - bl sub_02062ACC - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021F2438 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC7B8 - - thumb_func_start ov5_021EC7D0 -ov5_021EC7D0: ; 0x021EC7D0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021EC7E4 - bl sub_02022974 -_021EC7E4: - add r0, r5, #0 - bl ov5_021F2438 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC7D0 - - thumb_func_start ov5_021EC7F0 -ov5_021EC7F0: ; 0x021EC7F0 - push {r4, lr} - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov5_021F247C - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov5_021EC7F0 - - thumb_func_start ov5_021EC804 -ov5_021EC804: ; 0x021EC804 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_020213F4 - mov r2, #0x1f - mov r1, #1 - lsl r2, r2, #0x10 - add r4, r0, #0 - bl sub_020B2D8C - ldr r1, [r5, #0x10] - add r0, r4, #0 - bl sub_020B3764 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC804 - - thumb_func_start ov5_021EC824 -ov5_021EC824: ; 0x021EC824 - push {r3, r4, r5, lr} - mov r1, #0x14 - add r5, r0, #0 - bl sub_02062ACC - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - strb r0, [r4, #2] - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EC852 - ldr r1, _021EC854 ; =ov5_021EC804 - add r2, r4, #0 - bl sub_02021444 - add r0, r5, #0 - bl sub_02062B68 -_021EC852: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021EC854: .word ov5_021EC804 - thumb_func_end ov5_021EC824 - - thumb_func_start ov5_021EC858 -ov5_021EC858: ; 0x021EC858 - push {r4, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r1, r0, #0 - add r0, r4, #0 - add r1, r1, #4 - bl ov5_021ECFA4 - pop {r4, pc} - thumb_func_end ov5_021EC858 - - thumb_func_start ov5_021EC86C -ov5_021EC86C: ; 0x021EC86C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EC884 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED01C -_021EC884: - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECFA4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EC86C - - thumb_func_start ov5_021EC898 -ov5_021EC898: ; 0x021EC898 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC8E4 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021EC8BA - add r0, r5, #0 - add r1, r4, #4 - bl ov5_021ECF04 -_021EC8BA: - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EC8E4 - add r1, r4, #0 - add r1, #8 - bl ov5_021ED03C - ldr r1, [r4, #4] - add r0, r5, #0 - bl ov5_021EDEB4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628C4 - ldr r0, [r4, #4] - ldr r1, _021EC8E8 ; =ov5_021EC804 - add r2, r4, #0 - bl sub_02021444 -_021EC8E4: - pop {r3, r4, r5, pc} - nop -_021EC8E8: .word ov5_021EC804 - thumb_func_end ov5_021EC898 - - thumb_func_start ov5_021EC8EC -ov5_021EC8EC: ; 0x021EC8EC - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC934 - ldr r6, [r4, #4] - cmp r6, #0 - beq _021EC934 - ldr r0, [r4, #0x10] - cmp r0, #0x1f - bhs _021EC910 - add r0, r0, #1 - str r0, [r4, #0x10] -_021EC910: - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021EC924 - mov r1, #1 - add r0, r6, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021EC924: - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021EC6C0 -_021EC934: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC8EC - - thumb_func_start ov5_021EC938 -ov5_021EC938: ; 0x021EC938 - push {r3, r4, r5, lr} - mov r1, #0x14 - add r4, r0, #0 - bl sub_02062ACC - add r5, r0, #0 - add r1, r5, #0 - add r0, r4, #0 - add r1, #8 - bl ov5_021ECF04 - ldr r0, [r5, #8] - cmp r0, #0 - beq _021EC95A - add r0, r4, #0 - bl sub_02062B68 -_021EC95A: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EC938 - - thumb_func_start ov5_021EC95C -ov5_021EC95C: ; 0x021EC95C - push {r4, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r1, r0, #0 - add r0, r4, #0 - add r1, #8 - bl ov5_021ECFA4 - pop {r4, pc} - thumb_func_end ov5_021EC95C - - thumb_func_start ov5_021EC970 -ov5_021EC970: ; 0x021EC970 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _021EC988 - add r1, r4, #0 - add r1, #0xc - bl ov5_021ED01C -_021EC988: - add r4, #8 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ECFA4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC970 - - thumb_func_start ov5_021EC9A0 -ov5_021EC9A0: ; 0x021EC9A0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EC9E4 - ldr r0, [r4, #8] - cmp r0, #0 - bne _021EC9C4 - add r1, r4, #0 - add r0, r5, #0 - add r1, #8 - bl ov5_021ECF04 -_021EC9C4: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021EC9E4 - add r1, r4, #0 - add r1, #0xc - bl ov5_021ED03C - ldr r1, [r4, #8] - add r0, r5, #0 - bl ov5_021EDEB4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628C4 -_021EC9E4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EC9A0 - - thumb_func_start ov5_021EC9E8 -ov5_021EC9E8: ; 0x021EC9E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021ECA68 - ldr r7, [r4, #8] - cmp r7, #0 - beq _021ECA68 - add r0, r5, #0 - bl ov5_021ECD38 - cmp r0, #0 - bne _021ECA18 - mov r1, #1 - add r0, r7, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021ECA18: - ldr r6, _021ECA6C ; =0x021FF474 - add r3, sp, #0 - mov r2, #8 -_021ECA1E: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021ECA1E - add r0, r5, #0 - add r1, sp, #0x40 - bl sub_02063078 - ldr r1, [sp, #0x44] - ldr r0, [r4, #4] - cmp r1, r0 - bne _021ECA58 - ldr r0, [r4, #0] - asr r0, r0, #1 - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - str r0, [sp, #0x44] - ldr r0, [r4, #0] - add r1, r0, #1 - mov r0, #0x1f - and r0, r1 - str r0, [r4, #0] - ldr r0, [sp, #0x44] - add r1, sp, #0x40 - str r0, [r4, #4] - add r0, r5, #0 - bl sub_02063088 -_021ECA58: - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - add r1, r7, #0 - bl ov5_021EC6C0 -_021ECA68: - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ECA6C: .word 0x021FF474 - thumb_func_end ov5_021EC9E8 - - thumb_func_start ov5_021ECA70 -ov5_021ECA70: ; 0x021ECA70 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov5_021ECB90 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_020630AC - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECA70 - - thumb_func_start ov5_021ECA90 -ov5_021ECA90: ; 0x021ECA90 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #0] - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021ECAB8 - cmp r4, #0 - beq _021ECAB8 - add r0, r5, #0 - bl ov5_021ECBA4 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 -_021ECAB8: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECA90 - - thumb_func_start ov5_021ECABC -ov5_021ECABC: ; 0x021ECABC - ldr r3, _021ECAC0 ; =ov5_021ECC0C - bx r3 - ; .align 2, 0 -_021ECAC0: .word ov5_021ECC0C - thumb_func_end ov5_021ECABC - - thumb_func_start ov5_021ECAC4 -ov5_021ECAC4: ; 0x021ECAC4 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021ECADA - add r1, r4, #4 - bl ov5_021ED01C -_021ECADA: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ECFA4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECAC4 - - thumb_func_start ov5_021ECAF0 -ov5_021ECAF0: ; 0x021ECAF0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021ECB30 - ldr r0, [r4, #0] - cmp r0, #0 - bne _021ECB12 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ECF04 -_021ECB12: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021ECB30 - add r1, r4, #4 - bl ov5_021ED03C - ldr r1, [r4, #0] - add r0, r5, #0 - bl ov5_021EDEB4 - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0x14 - bl sub_020628C4 -_021ECB30: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECAF0 - - thumb_func_start ov5_021ECB34 -ov5_021ECB34: ; 0x021ECB34 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov5_021ECB90 - mov r1, #0 - mov r0, #6 - lsl r0, r0, #0xe - str r0, [sp, #4] - str r1, [sp] - str r1, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_020630AC - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECB34 - - thumb_func_start ov5_021ECB58 -ov5_021ECB58: ; 0x021ECB58 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #0] - add r0, r5, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021ECB76 - cmp r4, #0 - beq _021ECB76 - add r0, r5, #0 - bl ov5_021ECBA4 -_021ECB76: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021ECB58 - - thumb_func_start ov5_021ECB78 -ov5_021ECB78: ; 0x021ECB78 - ldr r3, _021ECB7C ; =ov5_021ECC0C - bx r3 - ; .align 2, 0 -_021ECB7C: .word ov5_021ECC0C - thumb_func_end ov5_021ECB78 - - thumb_func_start ov5_021ECB80 -ov5_021ECB80: ; 0x021ECB80 - push {r3, lr} - bl sub_02062AF0 - bl ov5_021ECB8C - pop {r3, pc} - thumb_func_end ov5_021ECB80 - - thumb_func_start ov5_021ECB8C -ov5_021ECB8C: ; 0x021ECB8C - ldr r0, [r0, #0] - bx lr - thumb_func_end ov5_021ECB8C - - thumb_func_start ov5_021ECB90 -ov5_021ECB90: ; 0x021ECB90 - push {r4, lr} - add r4, r0, #0 - mov r1, #0xc - bl sub_02062ACC - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021ECF04 - pop {r4, pc} - thumb_func_end ov5_021ECB90 - - thumb_func_start ov5_021ECBA4 -ov5_021ECBA4: ; 0x021ECBA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02062AF0 - ldr r4, [r0, #0] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021368 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ECBCC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECBA4 - - thumb_func_start ov5_021ECBCC -ov5_021ECBCC: ; 0x021ECBCC - push {r4, r5, r6, lr} - mov r4, #1 - add r6, r1, #0 - lsl r1, r4, #9 - add r5, r0, #0 - bl sub_020628D8 - cmp r0, #1 - bne _021ECBE0 - mov r4, #0 -_021ECBE0: - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #1 - bne _021ECBFE - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #0 - bne _021ECBFE - mov r4, #0 -_021ECBFE: - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - bl sub_02021320 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECBCC - - thumb_func_start ov5_021ECC0C -ov5_021ECC0C: ; 0x021ECC0C - push {r4, lr} - add r4, r0, #0 - bl sub_02062AF0 - add r1, r0, #0 - add r0, r4, #0 - bl ov5_021ECFA4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECC0C - - thumb_func_start ov5_021ECC20 -ov5_021ECC20: ; 0x021ECC20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - mov r1, #1 - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_0206284C - cmp r0, #0 - beq _021ECC3A - bl sub_02022974 -_021ECC3A: - add r0, r5, #0 - bl ov5_021ECCA4 - add r0, r5, #0 - bl sub_02062824 - str r0, [sp, #0x14] - add r0, r5, #0 - bl sub_02062858 - sub r0, r0, #1 - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_0206285C - str r4, [sp] - str r6, [sp, #4] - ldr r1, [sp, #0x30] - str r7, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [sp, #0x14] - ldr r3, [sp, #0x10] - add r1, r5, #0 - bl ov5_021ECE40 - add r0, r5, #0 - mov r1, #1 - bl sub_02062838 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021ECC20 - - thumb_func_start ov5_021ECC78 -ov5_021ECC78: ; 0x021ECC78 - push {r4, lr} - add r4, r0, #0 - bl sub_02062CA8 - cmp r0, #1 - beq _021ECC88 - bl sub_02022974 -_021ECC88: - add r0, r4, #0 - bl sub_0206285C - bl ov5_021ECE94 - add r0, r4, #0 - mov r1, #1 - bl sub_02062840 - add r0, r4, #0 - bl ov5_021ECCBC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECC78 - - thumb_func_start ov5_021ECCA4 -ov5_021ECCA4: ; 0x021ECCA4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x51 - mov r1, #4 - bl sub_02006C24 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0206289C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECCA4 - - thumb_func_start ov5_021ECCBC -ov5_021ECCBC: ; 0x021ECCBC - push {r3, lr} - bl sub_020628A0 - bl sub_02006CA8 - pop {r3, pc} - thumb_func_end ov5_021ECCBC - - thumb_func_start ov5_021ECCC8 -ov5_021ECCC8: ; 0x021ECCC8 - push {r4, lr} - add r4, r0, #0 - bl sub_02062A40 - mov r1, #4 - bl sub_0206284C - cmp r0, #0 - bne _021ECD02 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xe - bl sub_020628D0 - cmp r0, #0 - beq _021ECD02 - add r0, r4, #0 - bl sub_02062DE8 - cmp r0, #0 - beq _021ECCFC - add r0, r4, #0 - bl sub_02062F7C - cmp r0, #0 - beq _021ECD02 -_021ECCFC: - add r0, r4, #0 - bl sub_02062B68 -_021ECD02: - pop {r4, pc} - thumb_func_end ov5_021ECCC8 - - thumb_func_start ov5_021ECD04 -ov5_021ECD04: ; 0x021ECD04 - push {r3, lr} - bl sub_02062920 - bl ov5_021ECD10 - pop {r3, pc} - thumb_func_end ov5_021ECD04 - - thumb_func_start ov5_021ECD10 -ov5_021ECD10: ; 0x021ECD10 - push {r3, lr} - ldr r3, _021ECD30 ; =0x021FC194 - ldr r1, _021ECD34 ; =0x0000FFFF -_021ECD16: - ldr r2, [r3, #0] - cmp r2, r0 - bne _021ECD20 - add r0, r3, #0 - pop {r3, pc} -_021ECD20: - add r3, #8 - ldr r2, [r3, #0] - cmp r2, r1 - bne _021ECD16 - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021ECD30: .word 0x021FC194 -_021ECD34: .word 0x0000FFFF - thumb_func_end ov5_021ECD10 - - thumb_func_start ov5_021ECD38 -ov5_021ECD38: ; 0x021ECD38 - push {r4, lr} - add r4, r0, #0 - bl sub_02062DE8 - cmp r0, #1 - bne _021ECD52 - add r0, r4, #0 - bl sub_02062F7C - cmp r0, #0 - bne _021ECD52 - mov r0, #1 - pop {r4, pc} -_021ECD52: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #8 - bl sub_020628D0 - cmp r0, #0 - beq _021ECD64 - mov r0, #1 - pop {r4, pc} -_021ECD64: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021ECD38 - - thumb_func_start ov5_021ECD68 -ov5_021ECD68: ; 0x021ECD68 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r2, #0 - bl sub_020628A0 - add r1, r4, #0 - add r6, r0, #0 - bl sub_02006D84 - add r1, r0, #0 - cmp r5, #1 - bne _021ECD88 - mov r0, #4 - bl sub_02018144 - b _021ECD8E -_021ECD88: - mov r0, #4 - bl sub_02018184 -_021ECD8E: - add r5, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl sub_02006D28 - add r0, r5, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECD68 - - thumb_func_start ov5_021ECDA0 -ov5_021ECDA0: ; 0x021ECDA0 - push {r3, r4, r5, lr} - sub sp, #0x30 - add r4, r1, #0 - add r5, r0, #0 - add r1, sp, #0x24 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0x18 - bl sub_02063078 - add r0, r5, #0 - add r1, sp, #0xc - bl sub_0206309C - add r0, r5, #0 - add r1, sp, #0 - bl sub_020630BC - ldr r1, [sp, #0x24] - ldr r0, [sp, #0x18] - ldr r2, [sp, #0xc] - add r0, r1, r0 - ldr r3, [sp] - add r0, r2, r0 - add r0, r3, r0 - str r0, [r4, #0] - ldr r1, [sp, #0x28] - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x10] - add r0, r1, r0 - ldr r3, [sp, #4] - add r0, r2, r0 - add r0, r3, r0 - str r0, [r4, #4] - ldr r1, [sp, #0x2c] - ldr r0, [sp, #0x20] - ldr r2, [sp, #0x14] - add r0, r1, r0 - ldr r3, [sp, #8] - add r0, r2, r0 - add r0, r3, r0 - str r0, [r4, #8] - add sp, #0x30 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECDA0 - - thumb_func_start ov5_021ECDFC -ov5_021ECDFC: ; 0x021ECDFC - push {r4, lr} - add r4, r0, #0 - bl sub_02062974 - add r0, r4, #0 - bl sub_02062D4C - cmp r0, #1 - bne _021ECE14 - add r0, r4, #0 - bl sub_02062B68 -_021ECE14: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECDFC - - thumb_func_start ov5_021ECE18 -ov5_021ECE18: ; 0x021ECE18 - push {r4, lr} - mov r1, #1 - add r4, r0, #0 - bl sub_02062D64 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECE18 - - thumb_func_start ov5_021ECE30 -ov5_021ECE30: ; 0x021ECE30 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021ECE30 - - thumb_func_start ov5_021ECE34 -ov5_021ECE34: ; 0x021ECE34 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021ECE34 - - thumb_func_start ov5_021ECE38 -ov5_021ECE38: ; 0x021ECE38 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021ECE38 - - thumb_func_start ov5_021ECE3C -ov5_021ECE3C: ; 0x021ECE3C - bx lr - ; .align 2, 0 - thumb_func_end ov5_021ECE3C - - thumb_func_start ov5_021ECE40 -ov5_021ECE40: ; 0x021ECE40 - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - mov r2, #0x41 - add r5, r0, #0 - lsl r2, r2, #2 - str r1, [r5, r2] - add r1, r4, #0 - bl ov5_021EDDAC - ldr r2, [sp, #0x24] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EE320 - mov r2, #4 - mov r1, #8 - ldr r0, [sp, #0x18] - str r2, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - add r3, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - bl ov5_021ED224 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED0A4 - ldr r1, [sp, #0x20] - ldr r2, _021ECE8C ; =0x021FAF50 - ldr r3, _021ECE90 ; =0x021FAF48 - add r0, r5, #0 - bl ov5_021ED4E4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021ECE8C: .word 0x021FAF50 -_021ECE90: .word 0x021FAF48 - thumb_func_end ov5_021ECE40 - - thumb_func_start ov5_021ECE94 -ov5_021ECE94: ; 0x021ECE94 - push {r4, lr} - add r4, r0, #0 - bl ov5_021EE3C4 - add r0, r4, #0 - bl ov5_021ED0F0 - add r0, r4, #0 - bl ov5_021EDC8C - bl ov5_021EDDD4 - add r0, r4, #0 - bl ov5_021ED2AC - pop {r4, pc} - thumb_func_end ov5_021ECE94 - - thumb_func_start ov5_021ECEB4 -ov5_021ECEB4: ; 0x021ECEB4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #0 - add r6, r2, #0 - add r7, r0, #0 - str r1, [r5, #0] - bl ov5_021EDEA8 - add r1, r6, #0 - str r0, [sp] - bl ov5_021ED82C - add r4, r0, #0 - bne _021ECEDE - add r0, r7, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov5_021ED060 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_021ECEDE: - sub r0, r4, #3 - cmp r0, #1 - bhi _021ECEF4 - ldr r0, [sp] - add r1, r7, #0 - add r2, r5, #0 - add r3, r6, #0 - bl ov5_021EE228 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_021ECEF4: - add r0, r7, #0 - add r1, r6, #0 - bl ov5_021ECF1C - str r0, [r5, #0] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECEB4 - - thumb_func_start ov5_021ECF04 -ov5_021ECF04: ; 0x021ECF04 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_02062920 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ECEB4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECF04 - - thumb_func_start ov5_021ECF1C -ov5_021ECF1C: ; 0x021ECF1C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - add r4, r1, #0 - bl ov5_021EDEA8 - add r5, r0, #0 - bl ov5_021EDC8C - add r7, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDA0C - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED110 - add r5, r0, #0 - bne _021ECF48 - bl sub_02022974 -_021ECF48: - add r0, r6, #0 - add r1, sp, #0 - bl ov5_021ECDA0 - add r0, r4, #0 - bl ov5_021EDD50 - add r3, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - add r2, sp, #0 - bl ov5_021EDDDC - add r4, r0, #0 - bne _021ECF6A - bl sub_02022974 -_021ECF6A: - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021ECF1C - - thumb_func_start ov5_021ECF70 -ov5_021ECF70: ; 0x021ECF70 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - add r4, r2, #0 - bl sub_020211FC - mov r0, #0 - str r0, [r5, #0] - add r0, r6, #0 - bl sub_02062A40 - add r1, r6, #0 - add r2, r4, #0 - bl ov5_021ED1C8 - cmp r0, #0 - bne _021ECFA0 - add r0, r6, #0 - bl ov5_021EDEA8 - add r1, r4, #0 - bl ov5_021ED184 -_021ECFA0: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021ECF70 - - thumb_func_start ov5_021ECFA4 -ov5_021ECFA4: ; 0x021ECFA4 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - bl ov5_021ED094 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021ECFD6 - add r0, r5, #0 - bl sub_02062920 - add r6, r0, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021ECFCC - add r0, r5, #0 - bl sub_02067800 - add r6, r0, #0 -_021ECFCC: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov5_021ECF70 -_021ECFD6: - pop {r4, r5, r6, pc} - thumb_func_end ov5_021ECFA4 - - thumb_func_start ov5_021ECFD8 -ov5_021ECFD8: ; 0x021ECFD8 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - bl ov5_021ED094 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021ECFF2 - bl sub_020211FC - mov r0, #0 - str r0, [r5, #0] -_021ECFF2: - ldr r0, _021ED018 ; =0x0000FFFF - cmp r4, r0 - beq _021ED016 - add r0, r6, #0 - bl sub_02062A40 - add r1, r6, #0 - add r2, r4, #0 - bl ov5_021ED1C8 - cmp r0, #0 - bne _021ED016 - add r0, r6, #0 - bl ov5_021EDEA8 - add r1, r4, #0 - bl ov5_021ED184 -_021ED016: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021ED018: .word 0x0000FFFF - thumb_func_end ov5_021ECFD8 - - thumb_func_start ov5_021ED01C -ov5_021ED01C: ; 0x021ED01C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_02021334 - strh r0, [r4] - add r0, r5, #0 - bl sub_02021358 - strh r0, [r4, #2] - add r0, r5, #0 - bl sub_02021394 - str r0, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED01C - - thumb_func_start ov5_021ED03C -ov5_021ED03C: ; 0x021ED03C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrh r1, [r4] - add r5, r0, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_02021320 - ldrh r1, [r4, #2] - add r0, r5, #0 - bl sub_02021344 - ldr r1, [r4, #4] - add r0, r5, #0 - bl sub_02021380 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED03C - - thumb_func_start ov5_021ED060 -ov5_021ED060: ; 0x021ED060 - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDEA8 - add r1, r6, #0 - add r7, r0, #0 - bl ov5_021ED3A4 - cmp r0, #0 - bne _021ED084 - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021ECF1C - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021ED084: - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov5_021EE228 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED060 - - thumb_func_start ov5_021ED094 -ov5_021ED094: ; 0x021ED094 - push {r4, lr} - add r4, r0, #0 - bl ov5_021EDEA8 - add r1, r4, #0 - bl ov5_021EE264 - pop {r4, pc} - thumb_func_end ov5_021ED094 - - thumb_func_start ov5_021ED0A4 -ov5_021ED0A4: ; 0x021ED0A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #0x28 - add r7, r0, #0 - mov r0, #4 - mul r1, r5 - bl sub_02018144 - add r6, r0, #0 - add r0, r7, #0 - add r0, #0xe4 - str r6, [r0, #0] - cmp r6, #0 - bne _021ED0C4 - bl sub_02022974 -_021ED0C4: - mov r0, #4 - lsl r1, r5, #3 - bl sub_02018144 - add r4, r0, #0 - add r7, #0xf4 - str r4, [r7, #0] - cmp r4, #0 - bne _021ED0DA - bl sub_02022974 -_021ED0DA: - ldr r0, _021ED0EC ; =0x0000FFFF -_021ED0DC: - str r0, [r4, #0] - str r6, [r4, #4] - add r4, #8 - add r6, #0x28 - sub r5, r5, #1 - bne _021ED0DC - pop {r3, r4, r5, r6, r7, pc} - nop -_021ED0EC: .word 0x0000FFFF - thumb_func_end ov5_021ED0A4 - - thumb_func_start ov5_021ED0F0 -ov5_021ED0F0: ; 0x021ED0F0 - push {r4, lr} - add r4, r0, #0 - bl ov5_021ED1A4 - add r1, r4, #0 - add r1, #0xe4 - ldr r1, [r1, #0] - mov r0, #4 - bl sub_02018238 - add r4, #0xf4 - ldr r1, [r4, #0] - mov r0, #4 - bl sub_02018238 - pop {r4, pc} - thumb_func_end ov5_021ED0F0 - - thumb_func_start ov5_021ED110 -ov5_021ED110: ; 0x021ED110 - push {r4, r5, r6, lr} - add r2, r0, #0 - add r2, #0xf4 - ldr r4, [r2, #0] - ldr r2, [r0, #4] - add r6, r4, #0 - add r5, r2, #0 -_021ED11E: - ldr r3, [r6, #0] - cmp r3, r1 - bne _021ED128 - ldr r0, [r6, #4] - pop {r4, r5, r6, pc} -_021ED128: - add r6, #8 - sub r5, r5, #1 - bne _021ED11E - ldr r3, _021ED14C ; =0x0000FFFF -_021ED130: - ldr r5, [r4, #0] - cmp r5, r3 - bne _021ED142 - str r1, [r4, #0] - ldr r2, [r4, #4] - bl ov5_021EDE3C - ldr r0, [r4, #4] - pop {r4, r5, r6, pc} -_021ED142: - add r4, #8 - sub r2, r2, #1 - bne _021ED130 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021ED14C: .word 0x0000FFFF - thumb_func_end ov5_021ED110 - - thumb_func_start ov5_021ED150 -ov5_021ED150: ; 0x021ED150 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_0206285C - add r1, r0, #0 - add r1, #0xf4 - ldr r2, [r1, #0] - ldr r1, [r0, #4] -_021ED162: - ldr r0, [r2, #0] - cmp r0, r5 - bne _021ED178 - ldr r3, [r2, #4] - mov r2, #5 -_021ED16C: - ldmia r3!, {r0, r1} - stmia r4!, {r0, r1} - sub r2, r2, #1 - bne _021ED16C - mov r0, #1 - pop {r3, r4, r5, pc} -_021ED178: - add r2, #8 - sub r1, r1, #1 - bne _021ED162 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED150 - - thumb_func_start ov5_021ED184 -ov5_021ED184: ; 0x021ED184 - add r2, r0, #0 - add r2, #0xf4 - ldr r3, [r2, #0] - ldr r2, [r0, #4] -_021ED18C: - ldr r0, [r3, #0] - cmp r0, r1 - bne _021ED198 - ldr r0, _021ED1A0 ; =0x0000FFFF - str r0, [r3, #0] - bx lr -_021ED198: - add r3, #8 - sub r2, r2, #1 - bne _021ED18C - bx lr - ; .align 2, 0 -_021ED1A0: .word 0x0000FFFF - thumb_func_end ov5_021ED184 - - thumb_func_start ov5_021ED1A4 -ov5_021ED1A4: ; 0x021ED1A4 - push {r3, r4} - add r1, r0, #0 - add r1, #0xf4 - ldr r4, [r1, #0] - ldr r1, _021ED1C4 ; =0x0000FFFF - ldr r3, [r0, #4] - add r0, r1, #0 -_021ED1B2: - ldr r2, [r4, #0] - cmp r2, r0 - beq _021ED1BA - str r1, [r4, #0] -_021ED1BA: - add r4, #8 - sub r3, r3, #1 - bne _021ED1B2 - pop {r3, r4} - bx lr - ; .align 2, 0 -_021ED1C4: .word 0x0000FFFF - thumb_func_end ov5_021ED1A4 - - thumb_func_start ov5_021ED1C8 -ov5_021ED1C8: ; 0x021ED1C8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - bl sub_02062824 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062868 - str r0, [sp] -_021ED1DE: - ldr r0, [sp] - cmp r0, r6 - beq _021ED212 - bl sub_02062CF8 - cmp r0, #1 - bne _021ED212 - ldr r0, [sp] - bl sub_02062920 - add r5, r0, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021ED204 - ldr r0, [sp] - bl sub_02067800 - add r5, r0, #0 -_021ED204: - ldr r0, _021ED220 ; =0x0000FFFF - cmp r5, r0 - beq _021ED212 - cmp r5, r7 - bne _021ED212 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021ED212: - add r0, sp, #0 - bl sub_02062880 - sub r4, r4, #1 - bne _021ED1DE - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED220: .word 0x0000FFFF - thumb_func_end ov5_021ED1C8 - - thumb_func_start ov5_021ED224 -ov5_021ED224: ; 0x021ED224 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - mov r0, #4 - mov r1, #0x40 - lsl r2, r4, #0xc - add r3, r4, #0 - bl ov5_021F067C - add r1, r5, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r0, r5, #0 - bl ov5_021ED558 - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021EDCC4 - add r0, r5, #0 - sub r1, r4, r6 - bl ov5_021EDCCC - mov r0, #4 - mov r1, #0x41 - lsl r2, r7, #7 - add r3, r7, #0 - bl ov5_021F067C - add r1, r5, #0 - add r1, #0xfc - str r0, [r1, #0] - add r0, r5, #0 - bl ov5_021ED694 - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov5_021EDCD4 - ldr r1, [sp, #0x18] - add r0, r5, #0 - sub r1, r7, r1 - bl ov5_021EDCDC - ldr r0, [sp, #0x1c] - mov r1, #4 - bl sub_02022BD8 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EDCA8 - add r0, r5, #0 - bl ov5_021ED7D0 - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov5_021EDCE4 - ldr r2, [sp, #0x1c] - ldr r1, [sp, #0x20] - add r0, r5, #0 - sub r1, r2, r1 - bl ov5_021EDCEC - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021ED224 - - thumb_func_start ov5_021ED2AC -ov5_021ED2AC: ; 0x021ED2AC - push {r4, lr} - add r4, r0, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl ov5_021F06D8 - add r0, r4, #0 - add r0, #0xfc - ldr r0, [r0, #0] - bl ov5_021F06D8 - add r0, r4, #0 - bl ov5_021EDCB0 - bl sub_02022C1C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED2AC - - thumb_func_start ov5_021ED2D0 -ov5_021ED2D0: - ldr r3, [r2, #0] - cmp r3, r0 - bne _021ED2DA - add r0, r2, #0 - bx lr -_021ED2DA: - add r2, #8 - ldr r3, [r2, #0] - cmp r3, r1 - bne ov5_021ED2D0 - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021ED2D0 - - thumb_func_start ov5_021ED2E8 -ov5_021ED2E8: ; 0x021ED2E8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r4, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - add r7, r3, #0 - bl ov5_021F0770 - cmp r0, #1 - bne _021ED302 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021ED302: - ldr r2, [sp, #0x18] - add r0, r4, #0 - add r1, r7, #0 - bl ov5_021ED2D0 - add r7, r0, #0 - bne _021ED314 - bl sub_02022974 -_021ED314: - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020628A0 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r3, [r7, #4] - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021F0784 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED2E8 - - thumb_func_start ov5_021ED334 -ov5_021ED334: ; 0x021ED334 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0xf0 - add r4, r2, #0 - add r6, r1, #0 - ldr r0, [r0, #0] - add r1, r4, #0 - add r7, r3, #0 - bl sub_02022C40 - cmp r0, #0 - bne _021ED350 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021ED350: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDFF0 - cmp r0, #0 - beq _021ED360 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021ED360: - ldr r1, _021ED38C ; =0x0000FFFF - add r0, r4, #0 - add r2, r7, #0 - bl ov5_021ED2D0 - add r2, r0, #0 - bne _021ED372 - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_021ED372: - ldr r2, [r2, #4] - add r0, r5, #0 - add r1, r4, #0 - add r3, r6, #0 - bl ov5_021EDF3C - cmp r0, #1 - bne _021ED386 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021ED386: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_021ED38C: .word 0x0000FFFF - thumb_func_end ov5_021ED334 - - thumb_func_start ov5_021ED390 -ov5_021ED390: ; 0x021ED390 - push {r3, lr} - ldr r3, _021ED3A0 ; =0x021FC9B4 - add r2, r1, #0 - mov r1, #0 - bl ov5_021ED334 - pop {r3, pc} - nop -_021ED3A0: .word 0x021FC9B4 - thumb_func_end ov5_021ED390 - - thumb_func_start ov5_021ED3A4 -ov5_021ED3A4: ; 0x021ED3A4 - push {r3, lr} - ldr r3, _021ED3B4 ; =0x021FC9B4 - add r2, r1, #0 - mov r1, #1 - bl ov5_021ED334 - pop {r3, pc} - nop -_021ED3B4: .word 0x021FC9B4 - thumb_func_end ov5_021ED3A4 - - thumb_func_start ov5_021ED3B8 -ov5_021ED3B8: ; 0x021ED3B8 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, [r4, #0] - ldr r0, _021ED3D8 ; =0x0000FFFF - cmp r1, r0 - beq _021ED3D6 - add r6, r0, #0 -_021ED3C8: - add r0, r5, #0 - bl ov5_021ED390 - add r4, r4, #4 - ldr r1, [r4, #0] - cmp r1, r6 - bne _021ED3C8 -_021ED3D6: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021ED3D8: .word 0x0000FFFF - thumb_func_end ov5_021ED3B8 - - thumb_func_start ov5_021ED3DC -ov5_021ED3DC: ; 0x021ED3DC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDC98 - ldr r0, _021ED404 ; =0x021FB484 - add r1, r5, #0 - str r0, [sp] - add r1, #0xf8 - ldr r1, [r1, #0] - ldr r3, _021ED408 ; =0x0000FFFF - add r0, r5, #0 - add r2, r4, #0 - bl ov5_021ED2E8 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED56C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021ED404: .word 0x021FB484 -_021ED408: .word 0x0000FFFF - thumb_func_end ov5_021ED3DC - - thumb_func_start ov5_021ED40C -ov5_021ED40C: ; 0x021ED40C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDC98 - ldr r0, _021ED434 ; =0x021FB484 - add r1, r5, #0 - str r0, [sp] - add r1, #0xf8 - ldr r1, [r1, #0] - ldr r3, _021ED438 ; =0x0000FFFF - add r0, r5, #0 - add r2, r4, #0 - bl ov5_021ED2E8 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED5B4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021ED434: .word 0x021FB484 -_021ED438: .word 0x0000FFFF - thumb_func_end ov5_021ED40C - - thumb_func_start ov5_021ED43C -ov5_021ED43C: ; 0x021ED43C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, [r4, #0] - ldr r0, _021ED45C ; =0x0000FFFF - cmp r1, r0 - beq _021ED45A - add r6, r0, #0 -_021ED44C: - add r0, r5, #0 - bl ov5_021ED3DC - add r4, r4, #4 - ldr r1, [r4, #0] - cmp r1, r6 - bne _021ED44C -_021ED45A: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021ED45C: .word 0x0000FFFF - thumb_func_end ov5_021ED43C - - thumb_func_start ov5_021ED460 -ov5_021ED460: ; 0x021ED460 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCA0 - ldr r0, _021ED488 ; =0x021FB5BC - add r1, r5, #0 - str r0, [sp] - add r1, #0xfc - ldr r1, [r1, #0] - ldr r3, _021ED48C ; =0x0000FFFF - add r0, r5, #0 - add r2, r4, #0 - bl ov5_021ED2E8 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED6A8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021ED488: .word 0x021FB5BC -_021ED48C: .word 0x0000FFFF - thumb_func_end ov5_021ED460 - - thumb_func_start ov5_021ED490 -ov5_021ED490: ; 0x021ED490 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCA0 - ldr r0, _021ED4B8 ; =0x021FB5BC - add r1, r5, #0 - str r0, [sp] - add r1, #0xfc - ldr r1, [r1, #0] - ldr r3, _021ED4BC ; =0x0000FFFF - add r0, r5, #0 - add r2, r4, #0 - bl ov5_021ED2E8 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED6F0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021ED4B8: .word 0x021FB5BC -_021ED4BC: .word 0x0000FFFF - thumb_func_end ov5_021ED490 - - thumb_func_start ov5_021ED4C0 -ov5_021ED4C0: ; 0x021ED4C0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r1, [r4, #0] - ldr r0, _021ED4E0 ; =0x0000FFFF - cmp r1, r0 - beq _021ED4DE - add r6, r0, #0 -_021ED4D0: - add r0, r5, #0 - bl ov5_021ED460 - add r4, r4, #4 - ldr r1, [r4, #0] - cmp r1, r6 - bne _021ED4D0 -_021ED4DE: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021ED4E0: .word 0x0000FFFF - thumb_func_end ov5_021ED4C0 - - thumb_func_start ov5_021ED4E4 -ov5_021ED4E4: ; 0x021ED4E4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov5_021ED3B8 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED43C - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021ED4C0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED4E4 -_021ED502: .space 0x2 -_021ED504: - stmia r0!, {r1} - sub r2, r2, #1 - bne _021ED504 - bx lr - - thumb_func_start ov5_021ED50C -ov5_021ED50C: ; 0x021ED50C - push {r3, r4} -_021ED50E: - ldr r4, [r0, #0] - cmp r4, r2 - bne _021ED51C - str r1, [r0, #0] - mov r0, #1 - pop {r3, r4} - bx lr -_021ED51C: - add r0, r0, #4 - sub r3, r3, #1 - bne _021ED50E - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov5_021ED50C -_021ED528: - ldr r3, [r0, #0] - cmp r3, r1 - bne _021ED532 - mov r0, #1 - bx lr -_021ED532: - add r0, r0, #4 - sub r2, r2, #1 - bne _021ED528 - mov r0, #0 - bx lr - - thumb_func_start ov5_021ED53C -ov5_021ED53C: ; 0x021ED53C - push {r3, r4} -_021ED53E: - ldr r4, [r0, #0] - cmp r4, r1 - bne _021ED54C - str r2, [r0, #0] - mov r0, #1 - pop {r3, r4} - bx lr -_021ED54C: - add r0, r0, #4 - sub r3, r3, #1 - bne _021ED53E - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov5_021ED53C - - thumb_func_start ov5_021ED558 -ov5_021ED558: ; 0x021ED558 - push {r3, lr} - bl ov5_021EDCBC - ldr r1, _021ED568 ; =0x0000FFFF - mov r2, #8 - bl _021ED504 - pop {r3, pc} - ; .align 2, 0 -_021ED568: .word 0x0000FFFF - thumb_func_end ov5_021ED558 - - thumb_func_start ov5_021ED56C -ov5_021ED56C: ; 0x021ED56C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCC8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCBC - ldr r2, _021ED594 ; =0x0000FFFF - add r1, r4, #0 - add r3, r6, #0 - bl ov5_021ED50C - cmp r0, #0 - bne _021ED590 - bl sub_02022974 -_021ED590: - pop {r4, r5, r6, pc} - nop -_021ED594: .word 0x0000FFFF - thumb_func_end ov5_021ED56C - - thumb_func_start ov5_021ED598 -ov5_021ED598: ; 0x021ED598 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCC8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCBC - add r1, r4, #0 - add r2, r6, #0 - bl _021ED528 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021ED598 - - thumb_func_start ov5_021ED5B4 -ov5_021ED5B4: ; 0x021ED5B4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCBC - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCC8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCD0 - add r3, r0, #0 - ldr r2, _021ED5E4 ; =0x0000FFFF - add r0, r6, r4 - add r1, r7, #0 - bl ov5_021ED50C - cmp r0, #0 - bne _021ED5E2 - bl sub_02022974 -_021ED5E2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED5E4: .word 0x0000FFFF - thumb_func_end ov5_021ED5B4 - - thumb_func_start ov5_021ED5E8 -ov5_021ED5E8: ; 0x021ED5E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCBC - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCC8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCD0 - add r2, r0, #0 - add r0, r6, r4 - add r1, r7, #0 - bl _021ED528 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED5E8 - - thumb_func_start ov5_021ED610 -ov5_021ED610: ; 0x021ED610 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCBC - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCC8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCD0 - add r3, r0, #0 - ldr r2, _021ED638 ; =0x0000FFFF - add r0, r6, r4 - add r1, r7, #0 - bl ov5_021ED53C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED638: .word 0x0000FFFF - thumb_func_end ov5_021ED610 - - thumb_func_start ov5_021ED63C -ov5_021ED63C: ; 0x021ED63C - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - add r0, r6, #0 - bl ov5_021EDC98 - add r0, r6, #0 - bl ov5_021EDCBC - add r4, r0, #0 - add r0, r6, #0 - bl ov5_021EDCC8 - lsl r0, r0, #2 - add r5, r4, r0 - add r0, r6, #0 - bl ov5_021EDCD0 - add r4, r0, #0 -_021ED662: - ldr r1, [r5, #0] - ldr r0, _021ED690 ; =0x0000FFFF - cmp r1, r0 - beq _021ED686 - add r0, r7, #0 - mov r2, #0 - bl ov5_021EDAB4 - cmp r0, #0 - bne _021ED686 - add r0, r6, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [r5, #0] - bl ov5_021F0740 - ldr r0, _021ED690 ; =0x0000FFFF - str r0, [r5, #0] -_021ED686: - add r5, r5, #4 - sub r4, r4, #1 - bne _021ED662 - pop {r3, r4, r5, r6, r7, pc} - nop -_021ED690: .word 0x0000FFFF - thumb_func_end ov5_021ED63C - - thumb_func_start ov5_021ED694 -ov5_021ED694: ; 0x021ED694 - push {r3, lr} - bl ov5_021EDCC0 - ldr r1, _021ED6A4 ; =0x0000FFFF - mov r2, #8 - bl _021ED504 - pop {r3, pc} - ; .align 2, 0 -_021ED6A4: .word 0x0000FFFF - thumb_func_end ov5_021ED694 - - thumb_func_start ov5_021ED6A8 -ov5_021ED6A8: ; 0x021ED6A8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCD8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCC0 - ldr r2, _021ED6D0 ; =0x0000FFFF - add r1, r4, #0 - add r3, r6, #0 - bl ov5_021ED50C - cmp r0, #0 - bne _021ED6CC - bl sub_02022974 -_021ED6CC: - pop {r4, r5, r6, pc} - nop -_021ED6D0: .word 0x0000FFFF - thumb_func_end ov5_021ED6A8 - - thumb_func_start ov5_021ED6D4 -ov5_021ED6D4: ; 0x021ED6D4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCD8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCC0 - add r1, r4, #0 - add r2, r6, #0 - bl _021ED528 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021ED6D4 - - thumb_func_start ov5_021ED6F0 -ov5_021ED6F0: ; 0x021ED6F0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCC0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCD8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCE0 - add r3, r0, #0 - ldr r2, _021ED720 ; =0x0000FFFF - add r0, r6, r4 - add r1, r7, #0 - bl ov5_021ED50C - cmp r0, #0 - bne _021ED71E - bl sub_02022974 -_021ED71E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED720: .word 0x0000FFFF - thumb_func_end ov5_021ED6F0 - - thumb_func_start ov5_021ED724 -ov5_021ED724: ; 0x021ED724 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCC0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCD8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCE0 - add r2, r0, #0 - add r0, r6, r4 - add r1, r7, #0 - bl _021ED528 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED724 - - thumb_func_start ov5_021ED74C -ov5_021ED74C: ; 0x021ED74C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCC0 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCD8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCE0 - add r3, r0, #0 - ldr r2, _021ED774 ; =0x0000FFFF - add r0, r6, r4 - add r1, r7, #0 - bl ov5_021ED53C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED774: .word 0x0000FFFF - thumb_func_end ov5_021ED74C - - thumb_func_start ov5_021ED778 -ov5_021ED778: ; 0x021ED778 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - add r0, r6, #0 - bl ov5_021EDCA0 - add r0, r6, #0 - bl ov5_021EDCC0 - add r4, r0, #0 - add r0, r6, #0 - bl ov5_021EDCD8 - lsl r0, r0, #2 - add r5, r4, r0 - add r0, r6, #0 - bl ov5_021EDCE0 - add r4, r0, #0 -_021ED79E: - ldr r1, [r5, #0] - ldr r0, _021ED7CC ; =0x0000FFFF - cmp r1, r0 - beq _021ED7C2 - add r0, r7, #0 - mov r2, #0 - bl ov5_021EDB3C - cmp r0, #0 - bne _021ED7C2 - add r0, r6, #0 - add r0, #0xfc - ldr r0, [r0, #0] - ldr r1, [r5, #0] - bl ov5_021F0740 - ldr r0, _021ED7CC ; =0x0000FFFF - str r0, [r5, #0] -_021ED7C2: - add r5, r5, #4 - sub r4, r4, #1 - bne _021ED79E - pop {r3, r4, r5, r6, r7, pc} - nop -_021ED7CC: .word 0x0000FFFF - thumb_func_end ov5_021ED778 - - thumb_func_start ov5_021ED7D0 -ov5_021ED7D0: ; 0x021ED7D0 - push {r3, lr} - bl ov5_021EDCB8 - ldr r1, _021ED7E0 ; =0x0000FFFF - mov r2, #0x20 - bl _021ED504 - pop {r3, pc} - ; .align 2, 0 -_021ED7E0: .word 0x0000FFFF - thumb_func_end ov5_021ED7D0 - - thumb_func_start ov5_021ED7E4 -ov5_021ED7E4: ; 0x021ED7E4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCE8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCB8 - ldr r2, _021ED80C ; =0x0000FFFF - add r1, r4, #0 - add r3, r6, #0 - bl ov5_021ED50C - cmp r0, #0 - bne _021ED808 - bl sub_02022974 -_021ED808: - pop {r4, r5, r6, pc} - nop -_021ED80C: .word 0x0000FFFF - thumb_func_end ov5_021ED7E4 - - thumb_func_start ov5_021ED810 -ov5_021ED810: ; 0x021ED810 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EDCE8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCB8 - add r1, r4, #0 - add r2, r6, #0 - bl _021ED528 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021ED810 - - thumb_func_start ov5_021ED82C -ov5_021ED82C: ; 0x021ED82C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED810 - cmp r0, #1 - bne _021ED83E - mov r0, #1 - pop {r3, r4, r5, pc} -_021ED83E: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED924 - cmp r0, #1 - bne _021ED84E - mov r0, #2 - pop {r3, r4, r5, pc} -_021ED84E: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDFF0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021ED82C - - thumb_func_start ov5_021ED858 -ov5_021ED858: ; 0x021ED858 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCB8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCE8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCF0 - add r3, r0, #0 - ldr r2, _021ED888 ; =0x0000FFFF - add r0, r6, r4 - add r1, r7, #0 - bl ov5_021ED50C - cmp r0, #0 - bne _021ED886 - bl sub_02022974 -_021ED886: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED888: .word 0x0000FFFF - thumb_func_end ov5_021ED858 - - thumb_func_start ov5_021ED88C -ov5_021ED88C: ; 0x021ED88C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCB8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCE8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCF0 - add r3, r0, #0 - ldr r2, _021ED8B4 ; =0x0000FFFF - add r0, r6, r4 - add r1, r7, #0 - bl ov5_021ED53C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021ED8B4: .word 0x0000FFFF - thumb_func_end ov5_021ED88C - - thumb_func_start ov5_021ED8B8 -ov5_021ED8B8: ; 0x021ED8B8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - str r0, [sp] - add r0, r6, #0 - bl ov5_021EDCB0 - str r0, [sp, #4] - add r0, r6, #0 - bl ov5_021EDCB8 - add r4, r0, #0 - add r0, r6, #0 - bl ov5_021EDCE8 - lsl r0, r0, #2 - add r5, r4, r0 - add r0, r6, #0 - bl ov5_021EDCF0 - add r7, r0, #0 -_021ED8E2: - ldr r4, [r5, #0] - ldr r0, _021ED920 ; =0x0000FFFF - cmp r4, r0 - beq _021ED914 - ldr r0, [sp] - add r1, r4, #0 - mov r2, #0 - bl ov5_021EDA54 - cmp r0, #0 - bne _021ED914 - ldr r0, [sp, #4] - add r1, r4, #0 - bl sub_02022D38 - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021EDFBC - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021EE170 - ldr r0, _021ED920 ; =0x0000FFFF - str r0, [r5, #0] -_021ED914: - add r5, r5, #4 - sub r7, r7, #1 - bne _021ED8E2 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021ED920: .word 0x0000FFFF - thumb_func_end ov5_021ED8B8 - - thumb_func_start ov5_021ED924 -ov5_021ED924: ; 0x021ED924 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - bl ov5_021EDCB8 - add r6, r0, #0 - add r0, r5, #0 - bl ov5_021EDCE8 - lsl r4, r0, #2 - add r0, r5, #0 - bl ov5_021EDCF0 - add r2, r0, #0 - add r0, r6, r4 - add r1, r7, #0 - bl _021ED528 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED924 - - thumb_func_start ov5_021ED94C -ov5_021ED94C: ; 0x021ED94C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED810 - cmp r0, #1 - bne _021ED95E - mov r0, #0 - pop {r3, r4, r5, pc} -_021ED95E: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED924 - cmp r0, #1 - bne _021ED96E - mov r0, #1 - pop {r3, r4, r5, pc} -_021ED96E: - mov r0, #2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED94C - - thumb_func_start ov5_021ED974 -ov5_021ED974: ; 0x021ED974 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED598 - cmp r0, #1 - bne _021ED986 - mov r0, #0 - pop {r3, r4, r5, pc} -_021ED986: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED5E8 - cmp r0, #1 - bne _021ED996 - mov r0, #1 - pop {r3, r4, r5, pc} -_021ED996: - mov r0, #2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED974 - - thumb_func_start ov5_021ED99C -ov5_021ED99C: ; 0x021ED99C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED6D4 - cmp r0, #1 - bne _021ED9AE - mov r0, #0 - pop {r3, r4, r5, pc} -_021ED9AE: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED724 - cmp r0, #1 - bne _021ED9BE - mov r0, #1 - pop {r3, r4, r5, pc} -_021ED9BE: - mov r0, #2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021ED99C - - thumb_func_start ov5_021ED9C4 -ov5_021ED9C4: ; 0x021ED9C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED82C - cmp r0, #0 - bne _021ED9DA - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED3A4 -_021ED9DA: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021ED9C4 - - thumb_func_start ov5_021ED9DC -ov5_021ED9DC: ; 0x021ED9DC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED974 - cmp r0, #2 - bne _021ED9F2 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED40C -_021ED9F2: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021ED9DC - - thumb_func_start ov5_021ED9F4 -ov5_021ED9F4: ; 0x021ED9F4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED99C - cmp r0, #2 - bne _021EDA0A - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED490 -_021EDA0A: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021ED9F4 - - thumb_func_start ov5_021EDA0C -ov5_021EDA0C: ; 0x021EDA0C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov5_021EDD2C - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021ED9DC - add r0, r4, #0 - bl ov5_021EDD38 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021ED9F4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED9C4 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EDA0C - - thumb_func_start ov5_021EDA38 -ov5_021EDA38: ; 0x021EDA38 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021ED63C - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED778 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED8B8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EDA38 - - thumb_func_start ov5_021EDA54 -ov5_021EDA54: ; 0x021EDA54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0 - add r5, r2, #0 - str r1, [sp, #4] - str r1, [sp] - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - add r7, r0, #0 - bl sub_020625B0 - cmp r0, #1 - bne _021EDAAE -_021EDA72: - cmp r5, #0 - beq _021EDA7C - ldr r0, [sp] - cmp r5, r0 - beq _021EDA9E -_021EDA7C: - ldr r0, [sp] - bl sub_02062920 - add r4, r0, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021EDA94 - ldr r0, [sp] - bl sub_02067800 - add r4, r0, #0 -_021EDA94: - cmp r4, r6 - bne _021EDA9E - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EDA9E: - add r0, r7, #0 - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - bl sub_020625B0 - cmp r0, #1 - beq _021EDA72 -_021EDAAE: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EDA54 - - thumb_func_start ov5_021EDAB4 -ov5_021EDAB4: ; 0x021EDAB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0 - add r5, r2, #0 - str r1, [sp, #4] - str r1, [sp] - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - add r7, r0, #0 - bl sub_020625B0 - cmp r0, #1 - bne _021EDB32 -_021EDAD2: - cmp r5, #0 - beq _021EDADC - ldr r0, [sp] - cmp r5, r0 - beq _021EDB22 -_021EDADC: - ldr r0, [sp] - bl sub_02062920 - add r4, r0, #0 - ldr r0, _021EDB38 ; =0x0000FFFF - cmp r4, r0 - beq _021EDB22 - ldr r0, [sp] - bl ov5_021ECD04 - ldr r0, [r0, #4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - cmp r0, #1 - bne _021EDB22 - add r0, r4, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021EDB0C - ldr r0, [sp] - bl sub_02067800 - add r4, r0, #0 -_021EDB0C: - ldr r0, _021EDB38 ; =0x0000FFFF - cmp r4, r0 - beq _021EDB22 - add r0, r4, #0 - bl ov5_021EDD2C - cmp r6, r0 - bne _021EDB22 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EDB22: - add r0, r7, #0 - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - bl sub_020625B0 - cmp r0, #1 - beq _021EDAD2 -_021EDB32: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021EDB38: .word 0x0000FFFF - thumb_func_end ov5_021EDAB4 - - thumb_func_start ov5_021EDB3C -ov5_021EDB3C: ; 0x021EDB3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0 - add r5, r2, #0 - str r1, [sp, #4] - str r1, [sp] - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - add r7, r0, #0 - bl sub_020625B0 - cmp r0, #1 - bne _021EDBB8 -_021EDB5A: - cmp r5, #0 - beq _021EDB64 - ldr r0, [sp] - cmp r0, r5 - beq _021EDBA8 -_021EDB64: - ldr r0, _021EDBC0 ; =0x0000FFFF - cmp r4, r0 - beq _021EDBA8 - ldr r0, [sp] - bl ov5_021ECD04 - ldr r0, [r0, #4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - cmp r0, #1 - bne _021EDBA8 - ldr r0, [sp] - bl sub_02062920 - add r4, r0, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021EDB92 - ldr r0, [sp] - bl sub_02067800 - add r4, r0, #0 -_021EDB92: - ldr r0, _021EDBC0 ; =0x0000FFFF - cmp r4, r0 - beq _021EDBA8 - add r0, r4, #0 - bl ov5_021EDD38 - cmp r6, r0 - bne _021EDBA8 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EDBA8: - add r0, r7, #0 - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - bl sub_020625B0 - cmp r0, #1 - beq _021EDB5A -_021EDBB8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EDBC0: .word 0x0000FFFF - thumb_func_end ov5_021EDB3C - - thumb_func_start ov5_021EDBC4 -ov5_021EDBC4: ; 0x021EDBC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - add r7, r2, #0 - bl sub_0206285C - add r4, r0, #0 - add r0, r5, #0 - bl ov5_021EDD2C - str r0, [sp] - ldr r1, [sp] - add r0, r4, #0 - bl ov5_021ED974 - cmp r0, #1 - bne _021EDC0A - ldr r1, [sp] - add r0, r6, #0 - add r2, r7, #0 - bl ov5_021EDAB4 - cmp r0, #0 - bne _021EDC0A - add r0, r4, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - ldr r1, [sp] - bl ov5_021F0740 - ldr r1, [sp] - add r0, r4, #0 - bl ov5_021ED610 -_021EDC0A: - add r0, r5, #0 - bl ov5_021EDD38 - str r0, [sp, #4] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov5_021ED99C - cmp r0, #1 - bne _021EDC40 - ldr r1, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - bl ov5_021EDB3C - cmp r0, #0 - bne _021EDC40 - add r0, r4, #0 - add r0, #0xfc - ldr r0, [r0, #0] - ldr r1, [sp, #4] - bl ov5_021F0740 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov5_021ED74C -_021EDC40: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021ED94C - cmp r0, #1 - bne _021EDC7E - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov5_021EDA54 - cmp r0, #0 - bne _021EDC7E - add r0, r4, #0 - bl ov5_021EDCB0 - add r1, r5, #0 - bl sub_02022D38 - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021ED88C - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EDFBC - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EE170 -_021EDC7E: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDBC4 - - thumb_func_start ov5_021EDC84 -ov5_021EDC84: ; 0x021EDC84 - add r0, #0xe0 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDC84 - - thumb_func_start ov5_021EDC8C -ov5_021EDC8C: ; 0x021EDC8C - add r0, #0xe0 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDC8C - - thumb_func_start ov5_021EDC94 -ov5_021EDC94: ; 0x021EDC94 - str r1, [r0, #4] - bx lr - thumb_func_end ov5_021EDC94 - - thumb_func_start ov5_021EDC98 -ov5_021EDC98: ; 0x021EDC98 - add r0, #0xe8 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDC98 - - thumb_func_start ov5_021EDCA0 -ov5_021EDCA0: ; 0x021EDCA0 - add r0, #0xec - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDCA0 - - thumb_func_start ov5_021EDCA8 -ov5_021EDCA8: ; 0x021EDCA8 - add r0, #0xf0 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDCA8 - - thumb_func_start ov5_021EDCB0 -ov5_021EDCB0: ; 0x021EDCB0 - add r0, #0xf0 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDCB0 - - thumb_func_start ov5_021EDCB8 -ov5_021EDCB8: ; 0x021EDCB8 - add r0, #0x60 - bx lr - thumb_func_end ov5_021EDCB8 - - thumb_func_start ov5_021EDCBC -ov5_021EDCBC: ; 0x021EDCBC - add r0, #0x20 - bx lr - thumb_func_end ov5_021EDCBC - - thumb_func_start ov5_021EDCC0 -ov5_021EDCC0: ; 0x021EDCC0 - add r0, #0x40 - bx lr - thumb_func_end ov5_021EDCC0 - - thumb_func_start ov5_021EDCC4 -ov5_021EDCC4: ; 0x021EDCC4 - str r1, [r0, #8] - bx lr - thumb_func_end ov5_021EDCC4 - - thumb_func_start ov5_021EDCC8 -ov5_021EDCC8: ; 0x021EDCC8 - ldr r0, [r0, #8] - bx lr - thumb_func_end ov5_021EDCC8 - - thumb_func_start ov5_021EDCCC -ov5_021EDCCC: ; 0x021EDCCC - str r1, [r0, #0xc] - bx lr - thumb_func_end ov5_021EDCCC - - thumb_func_start ov5_021EDCD0 -ov5_021EDCD0: ; 0x021EDCD0 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov5_021EDCD0 - - thumb_func_start ov5_021EDCD4 -ov5_021EDCD4: ; 0x021EDCD4 - str r1, [r0, #0x10] - bx lr - thumb_func_end ov5_021EDCD4 - - thumb_func_start ov5_021EDCD8 -ov5_021EDCD8: ; 0x021EDCD8 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov5_021EDCD8 - - thumb_func_start ov5_021EDCDC -ov5_021EDCDC: ; 0x021EDCDC - str r1, [r0, #0x14] - bx lr - thumb_func_end ov5_021EDCDC - - thumb_func_start ov5_021EDCE0 -ov5_021EDCE0: ; 0x021EDCE0 - ldr r0, [r0, #0x14] - bx lr - thumb_func_end ov5_021EDCE0 - - thumb_func_start ov5_021EDCE4 -ov5_021EDCE4: ; 0x021EDCE4 - str r1, [r0, #0x18] - bx lr - thumb_func_end ov5_021EDCE4 - - thumb_func_start ov5_021EDCE8 -ov5_021EDCE8: ; 0x021EDCE8 - ldr r0, [r0, #0x18] - bx lr - thumb_func_end ov5_021EDCE8 - - thumb_func_start ov5_021EDCEC -ov5_021EDCEC: ; 0x021EDCEC - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov5_021EDCEC - - thumb_func_start ov5_021EDCF0 -ov5_021EDCF0: ; 0x021EDCF0 - ldr r0, [r0, #0x1c] - bx lr - thumb_func_end ov5_021EDCF0 - - thumb_func_start ov5_021EDCF4 -ov5_021EDCF4: ; 0x021EDCF4 - mov r3, #0x41 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _021EDD00 ; =ov5_021ECD68 - bx r3 - nop -_021EDD00: .word ov5_021ECD68 - thumb_func_end ov5_021EDCF4 - - thumb_func_start ov5_021EDD04 -ov5_021EDD04: ; 0x021EDD04 - push {r3, lr} - ldr r3, _021EDD24 ; =0x021FD77C - ldr r1, _021EDD28 ; =0x0000FFFF -_021EDD0A: - ldr r2, [r3, #0] - cmp r2, r0 - bne _021EDD14 - add r0, r3, #0 - pop {r3, pc} -_021EDD14: - add r3, #0x10 - ldr r2, [r3, #0] - cmp r2, r1 - bne _021EDD0A - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021EDD24: .word 0x021FD77C -_021EDD28: .word 0x0000FFFF - thumb_func_end ov5_021EDD04 - - thumb_func_start ov5_021EDD2C -ov5_021EDD2C: ; 0x021EDD2C - push {r3, lr} - bl ov5_021EDD04 - ldr r0, [r0, #4] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDD2C - - thumb_func_start ov5_021EDD38 -ov5_021EDD38: ; 0x021EDD38 - push {r3, lr} - bl ov5_021EDD04 - ldr r0, [r0, #8] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDD38 - - thumb_func_start ov5_021EDD44 -ov5_021EDD44: ; 0x021EDD44 - push {r3, lr} - bl ov5_021EDD04 - ldr r0, [r0, #0xc] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDD44 - - thumb_func_start ov5_021EDD50 -ov5_021EDD50: ; 0x021EDD50 - push {r3, lr} - bl ov5_021EDD2C - ldr r3, _021EDD70 ; =0x021FAF40 - ldr r1, _021EDD74 ; =0x0000FFFF -_021EDD5A: - ldr r2, [r3, #0] - cmp r2, r0 - bne _021EDD64 - mov r0, #0 - pop {r3, pc} -_021EDD64: - add r3, r3, #4 - ldr r2, [r3, #0] - cmp r2, r1 - bne _021EDD5A - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 -_021EDD70: .word 0x021FAF40 -_021EDD74: .word 0x0000FFFF - thumb_func_end ov5_021EDD50 - - thumb_func_start ov5_021EDD78 -ov5_021EDD78: ; 0x021EDD78 - push {r3, lr} - cmp r1, #1 - bne _021EDD88 - mov r1, #1 - lsl r1, r1, #0x16 - bl sub_020628BC - pop {r3, pc} -_021EDD88: - mov r1, #1 - lsl r1, r1, #0x16 - bl sub_020628C4 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDD78 - - thumb_func_start ov5_021EDD94 -ov5_021EDD94: ; 0x021EDD94 - push {r3, lr} - mov r1, #1 - lsl r1, r1, #0x16 - bl sub_020628D0 - cmp r0, #0 - beq _021EDDA6 - mov r0, #1 - pop {r3, pc} -_021EDDA6: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDD94 - - thumb_func_start ov5_021EDDAC -ov5_021EDDAC: ; 0x021EDDAC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #4 - add r4, r1, #0 - str r0, [sp, #4] - add r0, sp, #0 - str r4, [sp] - bl sub_02020C44 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021EDC84 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDC94 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EDDAC - - thumb_func_start ov5_021EDDD4 -ov5_021EDDD4: ; 0x021EDDD4 - ldr r3, _021EDDD8 ; =sub_02020CCC - bx r3 - ; .align 2, 0 -_021EDDD8: .word sub_02020CCC - thumb_func_end ov5_021EDDD4 - - thumb_func_start ov5_021EDDDC -ov5_021EDDDC: ; 0x021EDDDC - push {r3, r4, r5, lr} - sub sp, #0x20 - str r0, [sp] - str r1, [sp, #4] - add r4, r3, #0 - ldmia r2!, {r0, r1} - add r3, sp, #8 - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - add r2, sp, #0x14 - str r0, [r3, #0] - ldr r3, _021EDE38 ; =0x021FF4B4 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, sp, #0 - bl sub_0202119C - add r5, r0, #0 - beq _021EDE32 - mov r1, #0 - bl sub_02021320 - add r0, r5, #0 - mov r1, #0 - bl sub_02021344 - add r0, r5, #0 - mov r1, #0 - bl sub_020213A4 - add r0, r5, #0 - bl sub_020213F4 - add r1, r4, #0 - bl sub_020B37A4 - add r0, r5, #0 - bl sub_020213F4 - bl ov5_021D53A4 -_021EDE32: - add r0, r5, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021EDE38: .word 0x021FF4B4 - thumb_func_end ov5_021EDDDC - - thumb_func_start ov5_021EDE3C -ov5_021EDE3C: ; 0x021EDE3C - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - add r4, r2, #0 - bl ov5_021EDD2C - add r1, r0, #0 - add r0, r6, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - bl ov5_021F075C - str r0, [r4, #0] - add r0, r5, #0 - bl ov5_021EDD38 - add r1, r0, #0 - add r0, r6, #0 - add r0, #0xfc - ldr r0, [r0, #0] - bl ov5_021F075C - add r1, r4, #0 - add r1, #0xc - bl sub_02024184 - add r0, r6, #0 - bl ov5_021EDCB0 - add r1, r5, #0 - bl sub_02022D98 - add r6, r0, #0 - bl sub_02022DF4 - str r0, [r4, #4] - add r0, r6, #0 - bl sub_02022EF4 - str r0, [r4, #0x1c] - add r0, r6, #0 - bl sub_02022F04 - str r0, [r4, #0x20] - add r0, r6, #0 - bl sub_02022F14 - str r0, [r4, #0x24] - add r0, r5, #0 - bl ov5_021EDD44 - str r0, [r4, #8] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EDE3C - - thumb_func_start ov5_021EDEA8 -ov5_021EDEA8: ; 0x021EDEA8 - push {r3, lr} - bl sub_02062A40 - bl sub_0206285C - pop {r3, pc} - thumb_func_end ov5_021EDEA8 - - thumb_func_start ov5_021EDEB4 -ov5_021EDEB4: ; 0x021EDEB4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl ov5_021ECDA0 - mov r0, #6 - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_020212A8 - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021EDEB4 - - thumb_func_start ov5_021EDED8 -ov5_021EDED8: ; 0x021EDED8 - push {r4, r5, r6, lr} - mov r4, #1 - add r6, r1, #0 - lsl r1, r4, #9 - add r5, r0, #0 - bl sub_020628D8 - cmp r0, #1 - bne _021EDEEC - mov r4, #0 -_021EDEEC: - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #1 - bne _021EDF0A - mov r1, #2 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #0 - bne _021EDF0A - mov r4, #0 -_021EDF0A: - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - bl sub_02021320 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDED8 - - thumb_func_start ov5_021EDF18 -ov5_021EDF18: ; 0x021EDF18 - lsl r1, r0, #2 - ldr r0, _021EDF20 ; =0x021FF4C0 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_021EDF20: .word 0x021FF4C0 - thumb_func_end ov5_021EDF18 - - thumb_func_start ov5_021EDF24 -ov5_021EDF24: ; 0x021EDF24 - lsl r1, r0, #2 - ldr r0, _021EDF2C ; =0x021FF4D0 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_021EDF2C: .word 0x021FF4D0 - thumb_func_end ov5_021EDF24 - - thumb_func_start ov5_021EDF30 -ov5_021EDF30: ; 0x021EDF30 - lsl r1, r0, #2 - ldr r0, _021EDF38 ; =0x021FF4E0 - ldr r0, [r0, r1] - bx lr - ; .align 2, 0 -_021EDF38: .word 0x021FF4E0 - thumb_func_end ov5_021EDF30 - - thumb_func_start ov5_021EDF3C -ov5_021EDF3C: ; 0x021EDF3C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - ldr r4, [r5, r0] - mov r0, #4 - add r6, r1, #0 - ldrsh r1, [r4, r0] - mov r0, #2 - ldrsh r0, [r4, r0] - add r7, r2, #0 - str r3, [sp] - cmp r1, r0 - bge _021EDF66 - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - bl sub_02020D50 - cmp r0, #1 - bne _021EDF98 -_021EDF66: - mov r2, #0 - ldrsh r3, [r4, r2] - ldr r0, [r4, #0xc] - cmp r3, #0 - ble _021EDF90 -_021EDF70: - ldr r1, [r0, #0xc] - cmp r1, #0 - bne _021EDF88 - add r5, #0xf0 - ldr r1, [r5, #0] - str r1, [r0, #0xc] - ldr r1, [sp] - str r1, [r0, #8] - str r6, [r0, #4] - str r7, [r0, #0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EDF88: - add r2, r2, #1 - add r0, #0x10 - cmp r2, r3 - blt _021EDF70 -_021EDF90: - bl sub_02022974 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EDF98: - add r0, r5, #0 - add r1, r7, #0 - mov r2, #0 - bl ov5_021EDCF4 - add r2, r0, #0 - ldr r3, [sp] - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021EE0E8 - mov r0, #4 - ldrsh r0, [r4, r0] - add r0, r0, #1 - strh r0, [r4, #4] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EDF3C - - thumb_func_start ov5_021EDFBC -ov5_021EDFBC: ; 0x021EDFBC - push {r3, r4} - mov r2, #1 - lsl r2, r2, #8 - ldr r0, [r0, r2] - mov r3, #0 - ldrsh r4, [r0, r3] - ldr r2, [r0, #0xc] - cmp r4, #0 - ble _021EDFEA -_021EDFCE: - ldr r0, [r2, #4] - cmp r0, r1 - bne _021EDFE2 - ldr r0, [r2, #0xc] - cmp r0, #0 - beq _021EDFE2 - mov r0, #0 - str r0, [r2, #0xc] - pop {r3, r4} - bx lr -_021EDFE2: - add r3, r3, #1 - add r2, #0x10 - cmp r3, r4 - blt _021EDFCE -_021EDFEA: - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDFBC - - thumb_func_start ov5_021EDFF0 -ov5_021EDFF0: ; 0x021EDFF0 - push {r3, r4} - mov r2, #1 - lsl r2, r2, #8 - ldr r0, [r0, r2] - mov r3, #0 - ldrsh r4, [r0, r3] - ldr r2, [r0, #0xc] - cmp r4, #0 - ble _021EE028 -_021EE002: - ldr r0, [r2, #4] - cmp r0, r1 - bne _021EE020 - ldr r0, [r2, #0xc] - cmp r0, #0 - beq _021EE020 - ldr r0, [r2, #8] - cmp r0, #0 - bne _021EE01A - mov r0, #3 - pop {r3, r4} - bx lr -_021EE01A: - mov r0, #4 - pop {r3, r4} - bx lr -_021EE020: - add r3, r3, #1 - add r2, #0x10 - cmp r3, r4 - blt _021EE002 -_021EE028: - mov r0, #0 - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EDFF0 - - thumb_func_start ov5_021EE030 -ov5_021EE030: ; 0x021EE030 - push {r3, r4, r5, r6, r7, lr} - str r1, [sp] - mov r1, #1 - ldr r0, [sp] - lsl r1, r1, #8 - ldr r4, [r0, r1] - add r0, #0xe0 - ldr r0, [r0, #0] - mov r6, #0 - ldr r5, [r4, #0xc] - bl sub_02020D50 - cmp r0, #1 - beq _021EE0E4 - add r7, r4, #4 - b _021EE07A -_021EE050: - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _021EE076 - ldr r0, [sp] - ldr r1, [r5, #0] - mov r2, #0 - bl ov5_021EDCF4 - add r2, r0, #0 - ldr r0, [sp] - ldr r1, [r5, #4] - ldr r3, [r5, #8] - bl ov5_021EE0E8 - mov r0, #0 - str r0, [r5, #0xc] - ldrsh r0, [r7, r0] - add r0, r0, #1 - strh r0, [r7] -_021EE076: - add r5, #0x10 - add r6, r6, #1 -_021EE07A: - mov r0, #4 - ldrsh r1, [r4, r0] - mov r0, #2 - ldrsh r0, [r4, r0] - cmp r1, r0 - bge _021EE08E - mov r0, #0 - ldrsh r0, [r4, r0] - cmp r6, r0 - blt _021EE050 -_021EE08E: - mov r6, #0 - ldrsh r0, [r4, r6] - ldr r7, [r4, #0xc] - sub r1, r0, #1 - cmp r1, #0 - ble _021EE0E0 - add r5, r7, #0 -_021EE09C: - ldr r1, [r5, #0xc] - cmp r1, #0 - bne _021EE0D2 - add r2, r6, #1 - cmp r2, r0 - bge _021EE0D2 - lsl r1, r2, #4 - add r3, r7, r1 -_021EE0AC: - ldr r1, [r3, #0xc] - cmp r1, #0 - beq _021EE0CA - lsl r0, r2, #4 - add r3, r7, r0 - mov ip, r3 - add r2, r5, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r1, #0 - mov r0, ip - str r1, [r0, #0xc] - b _021EE0D2 -_021EE0CA: - add r2, r2, #1 - add r3, #0x10 - cmp r2, r0 - blt _021EE0AC -_021EE0D2: - mov r0, #0 - ldrsh r0, [r4, r0] - add r6, r6, #1 - add r5, #0x10 - sub r1, r0, #1 - cmp r6, r1 - blt _021EE09C -_021EE0E0: - mov r0, #0 - strh r0, [r4, #4] -_021EE0E4: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE030 - - thumb_func_start ov5_021EE0E8 -ov5_021EE0E8: ; 0x021EE0E8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - mov r0, #4 - str r0, [sp] - add r0, r5, #0 - add r0, #0xf0 - add r4, r1, #0 - add r6, r3, #0 - add r1, r2, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - mov r3, #1 - bl sub_02022C9C - cmp r0, #0 - bne _021EE10E - bl sub_02022974 -_021EE10E: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EE134 - cmp r6, #0 - bne _021EE126 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED7E4 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_021EE126: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021ED858 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE0E8 - - thumb_func_start ov5_021EE134 -ov5_021EE134: ; 0x021EE134 - push {r4, r5, r6, lr} - mov r3, #1 - lsl r3, r3, #8 - ldr r3, [r0, r3] - mov r5, #1 - ldr r4, [r3, #0x10] - mov r2, #0 - strh r5, [r3, #6] - ldrsh r6, [r3, r2] - cmp r6, #0 - ble _021EE168 -_021EE14A: - ldr r5, [r4, #8] - cmp r5, #0 - bne _021EE160 - add r0, #0xf0 - ldr r0, [r0, #0] - str r0, [r4, #8] - str r1, [r4, #4] - mov r0, #0 - str r0, [r4, #0] - strh r0, [r3, #6] - pop {r4, r5, r6, pc} -_021EE160: - add r2, r2, #1 - add r4, #0xc - cmp r2, r6 - blt _021EE14A -_021EE168: - bl sub_02022974 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE134 - - thumb_func_start ov5_021EE170 -ov5_021EE170: ; 0x021EE170 - push {r4, r5} - mov r2, #1 - lsl r2, r2, #8 - ldr r2, [r0, r2] - mov r0, #1 - ldr r4, [r2, #0x10] - mov r3, #0 - strh r0, [r2, #6] - ldrsh r5, [r2, r3] - cmp r5, #0 - ble _021EE1A2 -_021EE186: - ldr r0, [r4, #8] - cmp r0, #0 - beq _021EE19A - ldr r0, [r4, #4] - cmp r0, r1 - bne _021EE19A - mov r0, #0 - str r0, [r4, #8] - str r0, [r4, #0] - b _021EE1A2 -_021EE19A: - add r3, r3, #1 - add r4, #0xc - cmp r3, r5 - blt _021EE186 -_021EE1A2: - mov r0, #0 - strh r0, [r2, #6] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EE170 - - thumb_func_start ov5_021EE1AC -ov5_021EE1AC: ; 0x021EE1AC - push {r3, r4, r5, r6, r7, lr} - mov r0, #1 - lsl r0, r0, #8 - ldr r6, [r1, r0] - ldrh r0, [r6, #6] - cmp r0, #1 - beq _021EE1E6 - mov r4, #0 - ldrsh r0, [r6, r4] - ldr r5, [r6, #0x10] - cmp r0, #0 - ble _021EE1E6 - mov r7, #1 -_021EE1C6: - ldr r0, [r5, #0] - cmp r0, #0 - bne _021EE1DA - ldr r0, [r5, #8] - cmp r0, #0 - beq _021EE1DA - ldr r1, [r5, #4] - bl sub_02022E38 - str r7, [r5, #0] -_021EE1DA: - mov r0, #0 - ldrsh r0, [r6, r0] - add r4, r4, #1 - add r5, #0xc - cmp r4, r0 - blt _021EE1C6 -_021EE1E6: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EE1AC - - thumb_func_start ov5_021EE1E8 -ov5_021EE1E8: ; 0x021EE1E8 - push {r3, r4, r5, r6, r7, lr} - mov r0, #1 - lsl r0, r0, #8 - ldr r6, [r1, r0] - mov r4, #0 - ldr r5, [r6, #0x10] - mov r0, #1 - strh r0, [r6, #6] - ldrsh r0, [r6, r4] - cmp r0, #0 - ble _021EE222 - add r7, r4, #0 -_021EE200: - ldr r0, [r5, #0] - cmp r0, #1 - bne _021EE216 - ldr r0, [r5, #8] - cmp r0, #0 - beq _021EE216 - ldr r1, [r5, #4] - bl sub_02022EA0 - str r7, [r5, #0] - str r7, [r5, #8] -_021EE216: - mov r0, #0 - ldrsh r0, [r6, r0] - add r4, r4, #1 - add r5, #0xc - cmp r4, r0 - blt _021EE200 -_021EE222: - mov r0, #0 - strh r0, [r6, #6] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EE1E8 - - thumb_func_start ov5_021EE228 -ov5_021EE228: ; 0x021EE228 - push {r4, r5, r6, lr} - mov r5, #1 - lsl r5, r5, #8 - ldr r5, [r0, r5] - mov r4, #0 - ldrsh r6, [r5, r4] - ldr r0, [r5, #8] - cmp r6, #0 - ble _021EE25E -_021EE23A: - ldr r5, [r0, #4] - cmp r5, #0 - bne _021EE256 - str r1, [r0, #4] - str r2, [r0, #8] - str r3, [r0, #0] - ldr r0, [r0, #8] - mov r2, #0 - str r2, [r0, #0] - add r0, r1, #0 - mov r1, #1 - bl ov5_021EDD78 - pop {r4, r5, r6, pc} -_021EE256: - add r4, r4, #1 - add r0, #0xc - cmp r4, r6 - blt _021EE23A -_021EE25E: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EE228 - - thumb_func_start ov5_021EE264 -ov5_021EE264: ; 0x021EE264 - push {r3, r4} - mov r2, #1 - lsl r2, r2, #8 - ldr r0, [r0, r2] - mov r3, #0 - ldrsh r4, [r0, r3] - ldr r2, [r0, #8] - cmp r4, #0 - ble _021EE28E -_021EE276: - ldr r0, [r2, #4] - cmp r0, r1 - bne _021EE286 - mov r0, #0 - str r0, [r2, #4] - str r0, [r2, #8] - pop {r3, r4} - bx lr -_021EE286: - add r3, r3, #1 - add r2, #0xc - cmp r3, r4 - blt _021EE276 -_021EE28E: - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EE264 - - thumb_func_start ov5_021EE294 -ov5_021EE294: ; 0x021EE294 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - ldr r6, [r7, r0] - mov r4, #0 - ldrsh r0, [r6, r4] - ldr r5, [r6, #8] - cmp r0, #0 - ble _021EE2C2 -_021EE2A8: - ldr r0, [r5, #4] - cmp r0, #0 - beq _021EE2B6 - add r0, r7, #0 - add r1, r5, #0 - bl ov5_021EE2D0 -_021EE2B6: - mov r0, #0 - ldrsh r0, [r6, r0] - add r4, r4, #1 - add r5, #0xc - cmp r4, r0 - blt _021EE2A8 -_021EE2C2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EE294 - - thumb_func_start ov5_021EE2C4 -ov5_021EE2C4: ; 0x021EE2C4 - ldr r3, _021EE2CC ; =ov5_021EE294 - add r0, r1, #0 - bx r3 - nop -_021EE2CC: .word ov5_021EE294 - thumb_func_end ov5_021EE2C4 - - thumb_func_start ov5_021EE2D0 -ov5_021EE2D0: ; 0x021EE2D0 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - bl ov5_021ED94C - cmp r0, #2 - beq _021EE31E - ldr r0, [r4, #4] - ldr r1, [r4, #0] - bl ov5_021ECF1C - ldr r1, [r4, #8] - str r0, [r1, #0] - ldr r0, [r4, #8] - ldr r0, [r0, #0] - cmp r0, #0 - bne _021EE2F6 - bl sub_02022974 -_021EE2F6: - ldr r0, [r4, #4] - mov r1, #0 - bl ov5_021EDD78 - mov r1, #2 - ldr r0, [r4, #4] - lsl r1, r1, #0x14 - bl sub_020628D8 - cmp r0, #1 - ldr r0, [r4, #4] - bne _021EE314 - bl sub_02062BA4 - b _021EE318 -_021EE314: - bl sub_02062B68 -_021EE318: - mov r0, #0 - str r0, [r4, #4] - str r0, [r4, #8] -_021EE31E: - pop {r4, pc} - thumb_func_end ov5_021EE2D0 - - thumb_func_start ov5_021EE320 -ov5_021EE320: ; 0x021EE320 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r1, #0 - add r5, r0, #0 - mov r0, #0xc - add r7, r6, #0 - mul r7, r0 - lsl r0, r6, #4 - lsl r1, r7, #1 - str r0, [sp, #4] - add r0, r1, r0 - str r0, [sp, #8] - add r0, #0x28 - str r0, [sp, #8] - ldr r1, [sp, #8] - mov r0, #4 - str r2, [sp] - bl sub_02018144 - add r4, r0, #0 - bne _021EE34E - bl sub_02022974 -_021EE34E: - ldr r2, [sp, #8] - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - ldr r0, [sp] - strh r6, [r4] - strh r0, [r4, #2] - add r0, r4, #0 - add r0, #0x28 - str r0, [r4, #8] - add r1, r0, r7 - ldr r0, [sp, #4] - str r1, [r4, #0xc] - add r0, r1, r0 - str r0, [r4, #0x10] - mov r0, #1 - lsl r0, r0, #8 - str r4, [r5, r0] - add r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02062858 - add r6, r0, #0 - ldr r0, _021EE3B4 ; =ov5_021EE030 - add r1, r5, #0 - add r2, r6, #1 - bl sub_0200D9E8 - str r0, [r4, #0x18] - ldr r0, _021EE3B8 ; =ov5_021EE2C4 - add r1, r5, #0 - add r2, r6, #2 - bl sub_0200D9E8 - str r0, [r4, #0x1c] - ldr r0, _021EE3BC ; =ov5_021EE1AC - add r1, r5, #0 - mov r2, #0xff - bl sub_0200DA04 - str r0, [r4, #0x20] - ldr r0, _021EE3C0 ; =ov5_021EE1E8 - add r1, r5, #0 - mov r2, #0xff - bl sub_0200DA3C - str r0, [r4, #0x24] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021EE3B4: .word ov5_021EE030 -_021EE3B8: .word ov5_021EE2C4 -_021EE3BC: .word ov5_021EE1AC -_021EE3C0: .word ov5_021EE1E8 - thumb_func_end ov5_021EE320 - - thumb_func_start ov5_021EE3C4 -ov5_021EE3C4: ; 0x021EE3C4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #1 - lsl r0, r0, #8 - ldr r4, [r5, r0] - mov r0, #1 - strh r0, [r4, #6] - ldr r0, [r4, #0x18] - bl sub_0200DA58 - ldr r0, [r4, #0x1c] - bl sub_0200DA58 - ldr r0, [r4, #0x20] - bl sub_0200DA58 - ldr r0, [r4, #0x24] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - mov r1, #0 - lsl r0, r0, #8 - str r1, [r5, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE3C4 - - thumb_func_start ov5_021EE3FC -ov5_021EE3FC: ; 0x021EE3FC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021EDD94 - cmp r0, #1 - beq _021EE418 - add r0, r5, #0 - bl ov5_021EB1A0 - cmp r0, #0 - bne _021EE444 -_021EE418: - add r0, r5, #0 - bl sub_02062920 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02062A40 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02061B48 - add r0, r7, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov5_021EDBC4 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02061AB4 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EE444: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov5_021EE454 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE3FC - - thumb_func_start ov5_021EE454 -ov5_021EE454: ; 0x021EE454 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r7, r0, #0 - str r1, [sp, #8] - str r2, [sp, #0xc] - str r3, [sp, #0x10] - bl ov5_021EDEA8 - str r0, [sp, #0x20] - bl ov5_021EDC8C - str r0, [sp, #0x1c] - add r0, r7, #0 - bl ov5_021EB1A0 - str r0, [sp, #0x18] - mov r0, #4 - mov r1, #0x60 - bl sub_02018184 - mov r1, #0 - mov r2, #0x60 - add r5, r0, #0 - bl sub_020D5124 - ldr r0, [sp, #8] - str r0, [r5, #0] - add r0, r7, #0 - str r7, [r5, #0x50] - bl sub_02062920 - add r6, r0, #0 - bl ov5_021EDD2C - ldr r4, _021EE684 ; =0x021FB484 - ldr r2, _021EE688 ; =0x0000FFFF -_021EE49C: - ldr r1, [r4, #0] - cmp r1, r0 - beq _021EE4AA - add r4, #8 - ldr r1, [r4, #0] - cmp r1, r2 - bne _021EE49C -_021EE4AA: - ldr r0, _021EE688 ; =0x0000FFFF - cmp r1, r0 - bne _021EE4B4 - bl sub_02022974 -_021EE4B4: - ldr r0, [sp, #0x20] - ldr r1, [r4, #4] - mov r2, #0 - bl ov5_021EDCF4 - str r0, [r5, #8] - add r0, r6, #0 - bl ov5_021EDD38 - ldr r4, _021EE68C ; =0x021FB5BC - ldr r2, _021EE688 ; =0x0000FFFF -_021EE4CA: - ldr r1, [r4, #0] - cmp r1, r0 - beq _021EE4D8 - add r4, #8 - ldr r1, [r4, #0] - cmp r1, r2 - bne _021EE4CA -_021EE4D8: - ldr r0, _021EE688 ; =0x0000FFFF - cmp r1, r0 - bne _021EE4E2 - bl sub_02022974 -_021EE4E2: - ldr r0, [sp, #0x20] - ldr r1, [r4, #4] - mov r2, #0 - bl ov5_021EDCF4 - add r1, r5, #0 - add r1, #0x14 - str r0, [r5, #0xc] - bl sub_02024184 - ldr r4, _021EE690 ; =0x021FC9B4 - ldr r0, _021EE688 ; =0x0000FFFF -_021EE4FA: - ldr r1, [r4, #0] - cmp r1, r6 - beq _021EE508 - add r4, #8 - ldr r1, [r4, #0] - cmp r1, r0 - bne _021EE4FA -_021EE508: - ldr r0, _021EE688 ; =0x0000FFFF - cmp r1, r0 - bne _021EE512 - bl sub_02022974 -_021EE512: - ldr r0, [sp, #0x20] - ldr r1, [r4, #4] - mov r2, #0 - bl ov5_021EDCF4 - str r0, [r5, #0x10] - bl sub_020B3C1C - add r4, r0, #0 - add r0, r6, #0 - bl ov5_021EDD44 - add r3, r0, #0 - add r0, r5, #0 - add r0, #0x14 - str r0, [sp] - add r0, r5, #0 - ldr r1, [r5, #8] - add r0, #0x28 - add r2, r4, #0 - bl sub_02021284 - ldr r0, [sp, #0x18] - bl sub_020212C0 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x34 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r6, #0 - bl ov5_021EDD50 - add r3, r0, #0 - add r1, r5, #0 - ldr r0, [sp, #0x1c] - add r1, #0x28 - add r2, sp, #0x34 - bl ov5_021EDDDC - str r0, [r5, #0x24] - cmp r0, #0 - bne _021EE56E - bl sub_02022974 -_021EE56E: - ldr r0, [r5, #0x24] - str r0, [sp, #0x24] - ldr r0, [sp, #0x18] - bl sub_02021310 - add r1, r0, #0 - ldr r0, [r5, #0x24] - bl sub_020212FC - ldr r0, [sp, #0x18] - bl sub_02021358 - add r1, r0, #0 - ldr r0, [r5, #0x24] - bl sub_02021344 - ldr r0, [sp, #0x18] - bl sub_020213D4 - add r1, r0, #0 - ldr r0, [r5, #0x24] - bl sub_020213A4 - ldr r0, [sp, #0x18] - bl sub_02021394 - add r1, r0, #0 - ldr r0, [r5, #0x24] - bl sub_02021380 - ldr r0, [r5, #0x24] - mov r1, #0 - bl sub_02021368 - ldr r0, [r5, #0x24] - mov r1, #1 - bl sub_02021320 - ldr r0, [r5, #0x24] - bl sub_02021414 - add r0, r7, #0 - bl sub_02062F64 - cmp r0, #1 - bne _021EE620 - add r0, r7, #0 - mov r1, #2 - bl sub_02062758 - str r0, [sp, #0x14] - add r0, r7, #0 - mov r1, #1 - bl sub_02064238 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - add r0, r4, #0 - bl sub_0205DF9C - cmp r0, #1 - bne _021EE5EE - mov r4, #2 - b _021EE5FE -_021EE5EE: - add r0, r4, #0 - bl sub_0205DE5C - cmp r0, #1 - bne _021EE5FC - mov r4, #0 - b _021EE5FE -_021EE5FC: - mov r4, #1 -_021EE5FE: - add r0, r7, #0 - add r1, sp, #0x28 - bl sub_02063050 - add r0, r7, #0 - bl ov5_021DF578 - ldr r1, [sp, #0x14] - str r4, [sp] - str r1, [sp, #4] - add r1, r5, #0 - ldr r2, [r5, #0x24] - add r1, #0x28 - add r3, sp, #0x28 - bl ov5_021F1BA4 - str r0, [r5, #0x54] -_021EE620: - add r0, r7, #0 - bl sub_02061B48 - mov r1, #0x41 - ldr r0, [sp, #0x20] - lsl r1, r1, #2 - ldr r0, [r0, r1] - add r1, r6, #0 - add r2, r7, #0 - bl ov5_021EDBC4 - ldr r1, [sp, #8] - add r0, r7, #0 - bl sub_02061AB4 - mov r1, #0x41 - ldr r0, [sp, #0x20] - lsl r1, r1, #2 - ldr r0, [r0, r1] - bl sub_02062858 - ldr r0, _021EE694 ; =ov5_021EE698 - add r1, r5, #0 - mov r2, #0xff - bl sub_0200DA3C - add r4, r0, #0 - bne _021EE65C - bl sub_02022974 -_021EE65C: - add r0, r4, #0 - add r1, r5, #0 - bl ov5_021EE698 - ldr r0, [r5, #0x24] - bl sub_02021404 - cmp r0, #0 - bne _021EE674 - mov r0, #0 - str r0, [sp, #0x24] - b _021EE67C -_021EE674: - ldr r0, [sp, #0x10] - str r0, [r5, #0x58] - ldr r0, [sp, #0xc] - str r0, [r5, #0x5c] -_021EE67C: - ldr r0, [sp, #0x24] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EE684: .word 0x021FB484 -_021EE688: .word 0x0000FFFF -_021EE68C: .word 0x021FB5BC -_021EE690: .word 0x021FC9B4 -_021EE694: .word ov5_021EE698 - thumb_func_end ov5_021EE454 - - thumb_func_start ov5_021EE698 -ov5_021EE698: ; 0x021EE698 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #4 - ldrsh r0, [r5, r0] - ldr r4, [r5, #0x50] - cmp r0, #0 - beq _021EE6AE - cmp r0, #1 - beq _021EE714 - pop {r4, r5, r6, pc} -_021EE6AE: - add r0, r4, #0 - bl sub_02062CF8 - cmp r0, #0 - beq _021EE6C2 - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #0 - bne _021EE6FE -_021EE6C2: - ldr r2, [r5, #0x5c] - cmp r2, #0 - beq _021EE6CE - ldr r0, [r5, #0x58] - ldr r1, [r5, #0x24] - blx r2 -_021EE6CE: - ldr r0, [r5, #0x54] - cmp r0, #0 - beq _021EE6D8 - bl sub_0207136C -_021EE6D8: - ldr r0, [r5, #0x24] - bl sub_020211FC - ldr r0, [r5, #8] - bl sub_020181C4 - ldr r0, [r5, #0xc] - bl sub_020181C4 - ldr r0, [r5, #0x10] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 - pop {r4, r5, r6, pc} -_021EE6FE: - add r0, r4, #0 - bl sub_02062920 - ldr r1, [r5, #0] - cmp r1, r0 - beq _021EE758 - mov r0, #4 - ldrsh r0, [r5, r0] - add r0, r0, #1 - strh r0, [r5, #4] - pop {r4, r5, r6, pc} -_021EE714: - add r0, r4, #0 - bl ov5_021EDD94 - cmp r0, #0 - bne _021EE758 - ldr r2, [r5, #0x5c] - cmp r2, #0 - beq _021EE72A - ldr r0, [r5, #0x58] - ldr r1, [r5, #0x24] - blx r2 -_021EE72A: - ldr r0, [r5, #0x54] - cmp r0, #0 - beq _021EE734 - bl sub_0207136C -_021EE734: - ldr r0, [r5, #0x24] - bl sub_020211FC - ldr r0, [r5, #8] - bl sub_020181C4 - ldr r0, [r5, #0xc] - bl sub_020181C4 - ldr r0, [r5, #0x10] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_0200DA58 -_021EE758: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE698 - - thumb_func_start ov5_021EE75C -ov5_021EE75C: ; 0x021EE75C - mov r0, #0 - str r0, [r2, #0] - str r0, [r2, #4] - bx lr - thumb_func_end ov5_021EE75C - - thumb_func_start ov5_021EE764 -ov5_021EE764: ; 0x021EE764 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EE764 - - thumb_func_start ov5_021EE768 -ov5_021EE768: ; 0x021EE768 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r0, [r5, #0x3c] - add r4, r2, #0 - bl sub_0205EABC - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r7, r0, #0 - ldr r0, [r4, #0] - cmp r0, r6 - bne _021EE78A - ldr r0, [r4, #4] - cmp r0, r7 - beq _021EE7BC -_021EE78A: - str r6, [r4, #0] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - str r7, [r4, #4] - bl sub_02054F94 - add r4, r0, #0 - bl sub_0205DD84 - cmp r0, #0 - beq _021EE7A6 - mov r2, #0 - b _021EE7B2 -_021EE7A6: - add r0, r4, #0 - bl sub_0205DD78 - cmp r0, #0 - beq _021EE7BC - mov r2, #1 -_021EE7B2: - add r0, r6, #0 - add r1, r7, #0 - add r3, r5, #0 - bl ov5_021D4D78 -_021EE7BC: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE768 - - thumb_func_start ov5_021EE7C0 -ov5_021EE7C0: ; 0x021EE7C0 - ldr r0, [r0, #4] - ldr r3, _021EE7CC ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _021EE7D0 ; =0x021FF4F0 - bx r3 - nop -_021EE7CC: .word ov5_021D1B6C -_021EE7D0: .word 0x021FF4F0 - thumb_func_end ov5_021EE7C0 - - thumb_func_start ov5_021EE7D4 -ov5_021EE7D4: ; 0x021EE7D4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r1, #0 - add r2, r1, #0 - add r5, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r5, #0 - mov r1, #0x46 - mov r2, #0 - bl sub_02074470 - mov r1, #0xf - and r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0x47 - mov r2, #0 - bl sub_02074470 - mov r1, #0xf - and r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0x48 - mov r2, #0 - bl sub_02074470 - mov r1, #0xf - and r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x49 - mov r2, #0 - bl sub_02074470 - mov r1, #0xf - and r0, r1 - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - add r0, r5, #0 - mov r1, #0x4a - mov r2, #0 - bl sub_02074470 - mov r1, #0xf - and r0, r1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r5, #0 - mov r1, #0x4b - mov r2, #0 - bl sub_02074470 - mov r1, #0xf - and r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - eor r0, r6 - asr r1, r4, #8 - mul r0, r7 - eor r0, r1 - lsl r1, r4, #0x18 - lsr r3, r1, #0x18 - lsl r0, r0, #0x10 - ldr r2, [sp, #4] - ldr r1, [sp] - lsr r0, r0, #0x10 - eor r2, r1 - ldr r1, [sp, #8] - mul r2, r1 - add r1, r3, #0 - eor r1, r2 - lsl r1, r1, #0x10 - lsr r1, r1, #8 - add r0, r0, r1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021EE7D4 - - thumb_func_start ov5_021EE880 -ov5_021EE880: ; 0x021EE880 - ldr r2, _021EE8A4 ; =0x021FF508 - mov r3, #1 -_021EE884: - lsl r1, r3, #3 - add r1, r2, r1 - ldrh r1, [r1, #4] - cmp r0, r1 - bhs _021EE896 - sub r0, r3, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr -_021EE896: - add r1, r3, #1 - lsl r1, r1, #0x18 - lsr r3, r1, #0x18 - cmp r3, #0xf - blo _021EE884 - add r0, r3, #0 - bx lr - ; .align 2, 0 -_021EE8A4: .word 0x021FF508 - thumb_func_end ov5_021EE880 - - thumb_func_start ov5_021EE8A8 -ov5_021EE8A8: ; 0x021EE8A8 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r0, #4 - add r5, r1, #0 - bl sub_02098700 - add r4, r0, #0 - mov r1, #0 - mov r2, #4 - bl sub_0209872C - add r0, r4, #0 - add r1, r6, #0 - bl sub_02098808 - add r6, r0, #0 - add r0, r4, #0 - bl sub_020987BC - add r0, r4, #0 - bl sub_02098718 - add r0, r5, #0 - bl ov5_021EE880 - lsl r4, r0, #3 - ldr r0, _021EE914 ; =0x021FF50C - ldr r2, _021EE918 ; =0x021FF50A - ldrh r0, [r0, r4] - ldrh r2, [r2, r4] - asr r1, r5, #0x1f - mov r3, #0 - sub r0, r5, r0 - sbc r1, r3 - bl sub_020E1ED4 - add r2, r0, #0 - add r0, r6, #0 - ldr r6, _021EE91C ; =0x021FF508 - add r3, r1, #0 - mov r5, #0 - ldrh r4, [r6, r4] - add r1, r5, #0 - add r2, r4, r2 - adc r5, r3 - add r3, r5, #0 - bl sub_020E1F1C - mov r2, #0xa - mov r3, #0 - bl sub_020E1ED4 - pop {r4, r5, r6, pc} - nop -_021EE914: .word 0x021FF50C -_021EE918: .word 0x021FF50A -_021EE91C: .word 0x021FF508 - thumb_func_end ov5_021EE8A8 - - thumb_func_start ov5_021EE920 -ov5_021EE920: ; 0x021EE920 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0xc] - add r5, r1, #0 - bl sub_0207A268 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - str r0, [sp] - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - ldr r0, [sp] - bl ov5_021EE7D4 - add r1, sp, #4 - strh r0, [r1, #2] - ldrh r1, [r1, #2] - add r0, r5, #0 - bl ov5_021EE8A8 - add r6, r0, #0 - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206B0B4 - add r1, sp, #4 - strh r0, [r1] - ldrh r1, [r1] - add r0, r5, #0 - bl ov5_021EE8A8 - add r7, r0, #0 - mov r0, #0xfa - lsl r0, r0, #2 - mul r0, r6 - mov r1, #0xfe - bl sub_020E2178 - add r0, r0, #5 - mov r1, #0xa - bl sub_020E2178 - add r5, r0, #0 - mov r0, #0xfa - lsl r0, r0, #2 - mul r0, r7 - mov r1, #0xfe - bl sub_020E2178 - add r0, r0, #5 - mov r1, #0xa - bl sub_020E2178 - cmp r5, r0 - bne _021EE9A2 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EE9A2: - cmp r5, r0 - bls _021EE9B6 - ldr r2, [sp] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0206DC6C - add sp, #8 - mov r0, #2 - pop {r3, r4, r5, r6, r7, pc} -_021EE9B6: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EE920 - - thumb_func_start ov5_021EE9BC -ov5_021EE9BC: ; 0x021EE9BC - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - add r5, r1, #0 - bl sub_0207A268 - add r1, r5, #0 - bl sub_0207A0FC - bl ov5_021EE7D4 - add r1, sp, #0 - strh r0, [r1] - ldr r0, [r4, #0xc] - bl sub_020507E4 - add r1, sp, #0 - ldrh r1, [r1] - bl sub_0206B0C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EE9BC - - thumb_func_start ov5_021EE9E8 -ov5_021EE9E8: ; 0x021EE9E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0xf - add r7, r2, #0 - add r4, r3, #0 - bl sub_0203F098 - add r1, sp, #0x10 - add r5, r0, #0 - ldrh r1, [r1, #0x10] - add r0, r4, #0 - bl ov5_021EE8A8 - mov r1, #0xfa - lsl r1, r1, #2 - mul r1, r0 - add r0, r1, #0 - mov r1, #0xfe - bl sub_020E2178 - add r0, r0, #5 - mov r1, #0xa - bl sub_020E2178 - mov r1, #0xa - add r4, r0, #0 - bl sub_020E2178 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r1, r6, #0 - mov r3, #3 - bl sub_0200B60C - add r0, r4, #0 - mov r1, #0xa - bl sub_020E2178 - mov r0, #0 - add r2, r1, #0 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - ldr r0, [r5, #0] - add r1, r7, #0 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EE9E8 - - thumb_func_start ov5_021EEA54 -ov5_021EEA54: ; 0x021EEA54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_020507E4 - bl sub_0206B0B4 - add r1, sp, #4 - strh r0, [r1] - ldrh r0, [r1] - add r1, r4, #0 - add r2, r6, #0 - str r0, [sp] - add r0, r5, #0 - add r3, r7, #0 - bl ov5_021EE9E8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EEA54 - - thumb_func_start ov5_021EEA84 -ov5_021EEA84: ; 0x021EEA84 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - str r2, [sp, #4] - ldr r0, [r5, #0xc] - add r4, r3, #0 - add r7, r1, #0 - bl sub_0207A268 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r6, #0 - bl ov5_021EE7D4 - add r1, sp, #8 - strh r0, [r1] - ldrh r0, [r1] - add r1, r7, #0 - add r3, r4, #0 - str r0, [sp] - ldr r2, [sp, #4] - add r0, r5, #0 - bl ov5_021EE9E8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021EEA84 - - thumb_func_start ov5_021EEAC8 -ov5_021EEAC8: ; 0x021EEAC8 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #4 - mov r1, #0x24 - bl sub_02018144 - mov r1, #0 - mov r2, #0x24 - add r6, r0, #0 - bl sub_020D5124 - mov r0, #1 - strh r0, [r6] - cmp r7, #0 - beq _021EEAEA - mov r0, #2 - strh r0, [r6, #2] -_021EEAEA: - mov r4, #0 -_021EEAEC: - lsl r0, r4, #2 - add r5, r6, r0 - mov r0, #0xf - lsl r0, r0, #0xc - add r1, r4, #0 - mul r1, r0 - ldr r0, _021EEB44 ; =0x02202128 - add r0, r0, r1 - str r0, [r5, #4] - bne _021EEB04 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EEB04: - cmp r7, #0 - beq _021EEB22 - mov r1, #9 - mov r0, #4 - lsl r1, r1, #0xc - bl sub_02018144 - str r0, [r5, #0x14] - cmp r0, #0 - bne _021EEB1C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EEB1C: - mov r2, #9 - lsl r2, r2, #0xc - b _021EEB28 -_021EEB22: - mov r0, #0 - str r0, [r5, #0x14] - add r2, r0, #0 -_021EEB28: - mov r1, #0xf - add r0, r4, #0 - lsl r1, r1, #0xc - add r3, r6, #0 - bl ov5_021EEB9C - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021EEAEC - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EEB44: .word 0x02202128 - thumb_func_end ov5_021EEAC8 - - thumb_func_start ov5_021EEB48 -ov5_021EEB48: ; 0x021EEB48 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_021EEB52: - ldrh r0, [r5] - cmp r0, #2 - bne _021EEB5E - ldr r0, [r4, #4] - bl sub_020181C4 -_021EEB5E: - str r7, [r4, #4] - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _021EEB74 - ldrh r1, [r5, #2] - cmp r1, #2 - bne _021EEB70 - bl sub_020181C4 -_021EEB70: - mov r0, #0 - str r0, [r4, #0x14] -_021EEB74: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _021EEB52 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EEB48 - - thumb_func_start ov5_021EEB84 -ov5_021EEB84: ; 0x021EEB84 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #4] - str r0, [r2, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EEB84 - - thumb_func_start ov5_021EEB90 -ov5_021EEB90: ; 0x021EEB90 - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x14] - str r0, [r2, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EEB90 - - thumb_func_start ov5_021EEB9C -ov5_021EEB9C: ; 0x021EEB9C - push {r3, r4, r5, r6, r7, lr} - add r5, r3, #0 - lsl r4, r0, #2 - add r0, r5, r4 - add r6, r1, #0 - add r7, r2, #0 - ldr r0, [r0, #4] - mov r1, #0 - add r2, r6, #0 - bl sub_020C4CF4 - add r0, r5, r4 - ldr r0, [r0, #0x14] - mov r1, #0 - add r2, r7, #0 - bl sub_020C4CF4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EEB9C - - thumb_func_start ov5_021EEBC0 -ov5_021EEBC0: ; 0x021EEBC0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #4 - mov r1, #0x24 - bl sub_02018144 - str r0, [sp] - mov r1, #0 - mov r2, #0x24 - bl sub_020D5124 - mov r1, #2 - ldr r0, [sp] - cmp r6, #0 - strh r1, [r0] - beq _021EEBE2 - strh r1, [r0, #2] -_021EEBE2: - mov r7, #0xf - ldr r5, [sp] - mov r4, #0 - lsl r7, r7, #0xc -_021EEBEA: - mov r0, #4 - add r1, r7, #0 - bl sub_02018144 - mov r1, #0 - add r2, r7, #0 - str r0, [r5, #4] - bl sub_020C4CF4 - cmp r6, #1 - bne _021EEC16 - mov r1, #9 - mov r0, #4 - lsl r1, r1, #0xc - bl sub_02018144 - mov r2, #9 - mov r1, #0 - lsl r2, r2, #0xc - str r0, [r5, #0x14] - bl sub_020C4CF4 -_021EEC16: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blo _021EEBEA - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EEBC0 - - thumb_func_start ov5_021EEC24 -ov5_021EEC24: ; 0x021EEC24 - push {r4, r5, r6} - sub sp, #0x24 - add r3, r0, #0 - add r2, r1, #0 - add r6, r3, #0 - add r5, sp, #0 - mov r4, #4 -_021EEC32: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r4, r4, #1 - bne _021EEC32 - ldr r0, [r6, #0] - mov r1, #0 - str r0, [r5, #0] - ldrh r0, [r2] - add r4, sp, #0 - strh r0, [r3] - add r0, sp, #0 - ldrh r0, [r0] - strh r0, [r2] -_021EEC4C: - ldr r0, [r2, #4] - add r1, r1, #1 - str r0, [r3, #4] - ldr r0, [r4, #4] - add r3, r3, #4 - str r0, [r2, #4] - add r2, r2, #4 - add r4, r4, #4 - cmp r1, #4 - blt _021EEC4C - add sp, #0x24 - pop {r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EEC24 - - thumb_func_start ov5_021EEC68 -ov5_021EEC68: ; 0x021EEC68 - push {r3, r4, r5, r6} - ldr r4, [r0, #0] - ldr r3, [r1, #0] - cmp r4, r3 - bgt _021EEC78 - add r3, r0, #0 - add r4, r1, #0 - b _021EEC7C -_021EEC78: - add r3, r1, #0 - add r4, r0, #0 -_021EEC7C: - ldr r6, [r0, #4] - ldr r5, [r1, #4] - cmp r6, r5 - bgt _021EEC8A - add r5, r0, #4 - add r0, r1, #4 - b _021EEC8E -_021EEC8A: - add r5, r1, #4 - add r0, r0, #4 -_021EEC8E: - ldr r6, [r2, #0] - ldr r1, [r3, #0] - cmp r1, r6 - bgt _021EECB0 - ldr r1, [r4, #0] - cmp r6, r1 - bgt _021EECB0 - ldr r2, [r2, #4] - ldr r1, [r5, #0] - cmp r1, r2 - bgt _021EECB0 - ldr r0, [r0, #0] - cmp r2, r0 - bgt _021EECB0 - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_021EECB0: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EEC68 - - thumb_func_start ov5_021EECB8 -ov5_021EECB8: ; 0x021EECB8 - push {r4, r5} - lsl r3, r1, #3 - ldr r1, [r0, #0] - ldr r5, [r0, #0x10] - ldrh r1, [r1, r3] - lsl r4, r1, #3 - add r1, r5, r4 - ldr r4, [r5, r4] - ldr r1, [r1, #4] - str r4, [r2, #0] - str r1, [r2, #4] - ldr r1, [r0, #0x10] - ldr r0, [r0, #0] - add r0, r0, r3 - ldrh r0, [r0, #2] - lsl r3, r0, #3 - add r0, r1, r3 - ldr r1, [r1, r3] - ldr r0, [r0, #4] - str r1, [r2, #8] - str r0, [r2, #0xc] - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EECB8 - - thumb_func_start ov5_021EECE8 -ov5_021EECE8: ; 0x021EECE8 - push {r3, r4} - ldr r4, [r0, #0] - ldr r3, [r0, #0x14] - lsl r0, r1, #3 - add r0, r4, r0 - ldrh r1, [r0, #4] - mov r0, #0xc - mul r0, r1 - add r3, r3, r0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EECE8 - - thumb_func_start ov5_021EED08 -ov5_021EED08: ; 0x021EED08 - push {r3, r4} - ldr r4, [r0, #0] - ldr r3, [r0, #4] - lsl r0, r1, #3 - add r0, r4, r0 - ldrh r0, [r0, #6] - lsl r0, r0, #2 - ldr r0, [r3, r0] - str r0, [r2, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EED08 - - thumb_func_start ov5_021EED20 -ov5_021EED20: ; 0x021EED20 - mov r3, #0 - add r2, r3, #0 - sub r1, r3, #1 -_021EED26: - str r2, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - add r3, r3, #1 - add r0, #0xc - cmp r3, #0xa - blt _021EED26 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EED20 - - thumb_func_start ov5_021EED38 -ov5_021EED38: ; 0x021EED38 - push {r3, r4, r5, r6} - cmp r1, #0 - bne _021EED44 - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr -_021EED44: - cmp r1, #1 - bne _021EED52 - mov r0, #0 - strh r0, [r3] - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_021EED52: - sub r1, r1, #1 - lsr r5, r1, #0x1f - add r5, r1, r5 - mov r4, #0 - asr r5, r5, #1 -_021EED5C: - lsl r6, r5, #3 - ldr r6, [r0, r6] - cmp r6, r2 - ble _021EED7E - sub r1, r1, #1 - cmp r1, r4 - ble _021EED76 - add r6, r4, r5 - add r1, r5, #0 - lsr r5, r6, #0x1f - add r5, r6, r5 - asr r5, r5, #1 - b _021EED5C -_021EED76: - strh r5, [r3] - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr -_021EED7E: - add r4, r4, #1 - cmp r4, r1 - bge _021EED90 - add r6, r5, r1 - add r4, r5, #0 - lsr r5, r6, #0x1f - add r5, r6, r5 - asr r5, r5, #1 - b _021EED5C -_021EED90: - add r0, r5, #1 - strh r0, [r3] - mov r0, #1 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EED38 - - thumb_func_start ov5_021EED9C -ov5_021EED9C: ; 0x021EED9C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xc8 - str r0, [sp] - ldr r0, [sp, #0xe0] - add r4, r3, #0 - str r0, [sp, #0xe0] - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _021EEDB4 - add sp, #0xc8 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EEDB4: - str r1, [sp, #0x2c] - str r2, [sp, #0x30] - add r0, sp, #0x50 - mov r5, #0 - bl ov5_021EED20 - ldr r1, [r4, #0x1c] - ldr r6, [r4, #8] - lsl r1, r1, #0x10 - ldr r2, [sp, #0x30] - add r0, r6, #0 - lsr r1, r1, #0x10 - add r3, sp, #0x24 - bl ov5_021EED38 - cmp r0, #0 - bne _021EEDDC - add sp, #0xc8 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} -_021EEDDC: - add r0, sp, #0x24 - ldrh r0, [r0] - lsl r0, r0, #3 - add r1, r6, r0 - ldrh r0, [r1, #4] - str r0, [sp, #0x14] - ldrh r1, [r1, #6] - add r0, r5, #0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - cmp r0, #0 - bls _021EEEA2 - lsl r0, r1, #1 - add r7, sp, #0x50 - str r0, [sp, #0x10] -_021EEDFA: - ldr r0, [sp, #0x18] - ldr r2, [r4, #0xc] - lsl r1, r0, #1 - ldr r0, [sp, #0x10] - add r0, r0, r2 - ldrh r6, [r1, r0] - add r0, r4, #0 - add r2, sp, #0x40 - add r1, r6, #0 - bl ov5_021EECB8 - add r0, sp, #0x40 - add r1, sp, #0x48 - add r2, sp, #0x2c - bl ov5_021EEC68 - cmp r0, #1 - bne _021EEE92 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0x34 - bl ov5_021EECE8 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0x28 - bl ov5_021EED08 - ldr r0, [sp, #0x34] - ldr r2, [sp, #0x2c] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - str r0, [sp, #0x1c] - ldr r2, [sp, #0x30] - ldr r0, [sp, #0x3c] - str r1, [sp, #8] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r6, r0, #0 - ldr r0, [sp, #0x28] - ldr r2, [sp, #0x1c] - mov ip, r0 - mov r0, #2 - lsl r0, r0, #0xa - add r0, r2, r0 - ldr r3, [sp, #8] - ldr r2, _021EEF30 ; =0x00000000 - adc r3, r2 - lsl r2, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - mov r2, #2 - lsl r2, r2, #0xa - str r3, [sp, #8] - add r3, r6, r2 - ldr r2, _021EEF30 ; =0x00000000 - adc r1, r2 - lsl r1, r1, #0x14 - lsr r2, r3, #0xc - orr r2, r1 - add r1, r0, r2 - mov r0, ip - add r0, r0, r1 - ldr r1, [sp, #0x38] - neg r0, r0 - bl sub_020BCFD0 - str r0, [r7, #0] - add r5, r5, #1 - add r7, #0xc - cmp r5, #0xa - bge _021EEEA2 -_021EEE92: - ldr r0, [sp, #0x18] - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - str r1, [sp, #0x18] - ldr r0, [sp, #0x14] - cmp r1, r0 - blo _021EEDFA -_021EEEA2: - cmp r5, #1 - ble _021EEF0A - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - ldr r1, [sp, #0x50] - bl sub_0201E198 - add r4, r0, #0 - ldr r0, [sp] - ldr r1, [sp, #0x50] - bl sub_0201E190 - sub r6, r4, r0 - mov r4, #1 - cmp r5, #1 - ble _021EEEF6 -_021EEEC4: - mov r0, #0xc - add r7, r4, #0 - mul r7, r0 - add r1, sp, #0x50 - ldr r0, [sp] - ldr r1, [r1, r7] - bl sub_0201E198 - add r1, sp, #0x50 - str r0, [sp, #0x20] - ldr r0, [sp] - ldr r1, [r1, r7] - bl sub_0201E190 - ldr r1, [sp, #0x20] - sub r0, r1, r0 - cmp r6, r0 - ble _021EEEEC - add r6, r0, #0 - str r4, [sp, #0xc] -_021EEEEC: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, r5 - blt _021EEEC4 -_021EEEF6: - ldr r0, [sp, #0xc] - mov r1, #0xc - mul r1, r0 - add r0, sp, #0x50 - ldr r1, [r0, r1] - ldr r0, [sp, #0xe0] - add sp, #0xc8 - str r1, [r0, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EEF0A: - bne _021EEF18 - ldr r1, [sp, #0x50] - ldr r0, [sp, #0xe0] - add sp, #0xc8 - str r1, [r0, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EEF18: - cmp r5, #0 - beq _021EEF28 - ldr r1, [sp, #0x50] - ldr r0, [sp, #0xe0] - add sp, #0xc8 - str r1, [r0, #0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EEF28: - mov r0, #0 - add sp, #0xc8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EEF30: .word 0x00000000 - thumb_func_end ov5_021EED9C - - thumb_func_start ov5_021EEF34 -ov5_021EEF34: ; 0x021EEF34 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - mov r2, #0x18 - add r4, r1, #0 - bl sub_020C4B4C - add r0, r5, #0 - mov r1, #4 - add r2, sp, #0 - bl sub_02006E18 - add r0, r5, #0 - mov r1, #2 - add r2, r4, #0 - bl sub_02006E18 - add r0, r5, #0 - mov r1, #2 - add r2, r4, #4 - bl sub_02006E18 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #2 - add r2, #8 - bl sub_02006E18 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #2 - add r2, #0xc - bl sub_02006E18 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #2 - add r2, #0x10 - bl sub_02006E18 - add r4, #0x14 - add r0, r5, #0 - mov r1, #2 - add r2, r4, #0 - bl sub_02006E18 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EEF34 - - thumb_func_start ov5_021EEF98 -ov5_021EEF98: ; 0x021EEF98 - push {r3, r4, r5, lr} - add r3, r0, #0 - add r0, r2, #0 - ldr r2, [r0, #0] - mov r4, #0 - str r2, [r1, #0x10] - ldr r2, [r3, #0] - lsl r2, r2, #3 - add r2, r4, r2 - ldr r4, [r0, #0] - add r4, r4, r2 - str r4, [r1, #0x14] - ldr r5, [r3, #4] - mov r4, #0xc - mul r4, r5 - add r2, r2, r4 - ldr r4, [r0, #0] - add r4, r4, r2 - str r4, [r1, #4] - ldr r4, [r3, #8] - lsl r4, r4, #2 - add r2, r2, r4 - ldr r4, [r0, #0] - add r4, r4, r2 - str r4, [r1, #0] - ldr r4, [r3, #0xc] - lsl r4, r4, #3 - add r2, r2, r4 - ldr r4, [r0, #0] - add r4, r4, r2 - str r4, [r1, #8] - ldr r4, [r3, #0x10] - ldr r0, [r0, #0] - lsl r4, r4, #3 - add r2, r2, r4 - add r0, r0, r2 - str r0, [r1, #0xc] - ldr r0, [r3, #0x14] - lsl r0, r0, #1 - add r1, r2, r0 - mov r0, #9 - lsl r0, r0, #0xc - cmp r1, r0 - ble _021EEFF4 - bl sub_02022974 -_021EEFF4: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EEF98 - - thumb_func_start ov5_021EEFF8 -ov5_021EEFF8: ; 0x021EEFF8 - add r3, r1, #0 - ldr r1, [r2, #0] - ldr r2, [r3, #0x10] - ldr r3, _021EF004 ; =sub_02006E18 - lsl r1, r1, #3 - bx r3 - ; .align 2, 0 -_021EF004: .word sub_02006E18 - thumb_func_end ov5_021EEFF8 - - thumb_func_start ov5_021EF008 -ov5_021EF008: ; 0x021EF008 - ldr r2, [r2, #4] - add r3, r1, #0 - mov r1, #0xc - mul r1, r2 - ldr r2, [r3, #0x14] - ldr r3, _021EF018 ; =sub_02006E18 - bx r3 - nop -_021EF018: .word sub_02006E18 - thumb_func_end ov5_021EF008 - - thumb_func_start ov5_021EF01C -ov5_021EF01C: ; 0x021EF01C - add r3, r1, #0 - ldr r1, [r2, #8] - ldr r2, [r3, #4] - ldr r3, _021EF028 ; =sub_02006E18 - lsl r1, r1, #2 - bx r3 - ; .align 2, 0 -_021EF028: .word sub_02006E18 - thumb_func_end ov5_021EF01C - - thumb_func_start ov5_021EF02C -ov5_021EF02C: ; 0x021EF02C - add r3, r1, #0 - ldr r1, [r2, #0xc] - ldr r2, [r3, #0] - ldr r3, _021EF038 ; =sub_02006E18 - lsl r1, r1, #3 - bx r3 - ; .align 2, 0 -_021EF038: .word sub_02006E18 - thumb_func_end ov5_021EF02C - - thumb_func_start ov5_021EF03C -ov5_021EF03C: ; 0x021EF03C - add r3, r1, #0 - ldr r1, [r2, #0x10] - ldr r2, [r3, #8] - ldr r3, _021EF048 ; =sub_02006E18 - lsl r1, r1, #3 - bx r3 - ; .align 2, 0 -_021EF048: .word sub_02006E18 - thumb_func_end ov5_021EF03C - - thumb_func_start ov5_021EF04C -ov5_021EF04C: ; 0x021EF04C - add r3, r1, #0 - ldr r1, [r2, #0x14] - ldr r2, [r3, #0xc] - ldr r3, _021EF058 ; =sub_02006E18 - lsl r1, r1, #1 - bx r3 - ; .align 2, 0 -_021EF058: .word sub_02006E18 - thumb_func_end ov5_021EF04C - - thumb_func_start ov5_021EF05C -ov5_021EF05C: ; 0x021EF05C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x74] - cmp r0, #1 - bne _021EF070 - add r0, r4, #0 - mov r1, #2 - add r0, #0x68 - strb r1, [r0] -_021EF070: - add r0, r4, #0 - add r0, #0x68 - ldrb r0, [r0] - cmp r0, #0 - beq _021EF084 - cmp r0, #1 - beq _021EF0B6 - cmp r0, #2 - beq _021EF102 - b _021EF116 -_021EF084: - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - cmp r0, #0 - beq _021EF094 - mov r2, #0 - b _021EF116 -_021EF094: - add r1, r4, #0 - ldr r0, [r4, #0x7c] - add r1, #0x4c - bl ov5_021EEF34 - add r2, r4, #0 - ldr r1, [r4, #0x5c] - ldr r0, [r4, #0x70] - add r2, #0x6c - str r1, [r0, #0x1c] - add r0, r4, #0 - ldr r1, [r4, #0x70] - add r0, #0x4c - bl ov5_021EEF98 - mov r2, #1 - b _021EF116 -_021EF0B6: - add r2, r4, #0 - ldr r0, [r4, #0x7c] - ldr r1, [r4, #0x70] - add r2, #0x4c - bl ov5_021EEFF8 - add r2, r4, #0 - ldr r0, [r4, #0x7c] - ldr r1, [r4, #0x70] - add r2, #0x4c - bl ov5_021EF008 - add r2, r4, #0 - ldr r0, [r4, #0x7c] - ldr r1, [r4, #0x70] - add r2, #0x4c - bl ov5_021EF01C - add r2, r4, #0 - ldr r0, [r4, #0x7c] - ldr r1, [r4, #0x70] - add r2, #0x4c - bl ov5_021EF02C - add r2, r4, #0 - ldr r0, [r4, #0x7c] - ldr r1, [r4, #0x70] - add r2, #0x4c - bl ov5_021EF03C - add r2, r4, #0 - ldr r0, [r4, #0x7c] - ldr r1, [r4, #0x70] - add r2, #0x4c - bl ov5_021EF04C - mov r2, #1 - b _021EF116 -_021EF102: - ldr r0, [r4, #0x78] - mov r1, #0 - str r1, [r0, #0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} -_021EF116: - cmp r2, #1 - bne _021EF138 - add r0, r4, #0 - add r0, #0x68 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x68 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x68 - ldrb r0, [r0] - cmp r0, #2 - bne _021EF138 - ldr r0, [r4, #0x70] - mov r1, #1 - str r1, [r0, #0x18] -_021EF138: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF05C - - thumb_func_start ov5_021EF13C -ov5_021EF13C: ; 0x021EF13C - push {r3, lr} - mov r0, #4 - mov r1, #0x20 - bl sub_02018144 - mov r1, #0 - str r1, [r0, #0x10] - str r1, [r0, #0x14] - str r1, [r0, #0] - str r1, [r0, #8] - str r1, [r0, #0xc] - str r1, [r0, #0x18] - str r1, [r0, #0x1c] - pop {r3, pc} - thumb_func_end ov5_021EF13C - - thumb_func_start ov5_021EF158 -ov5_021EF158: ; 0x021EF158 - push {r0, r1, r2, r3} - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r0, #4 - mov r1, #0x18 - add r5, r2, #0 - bl sub_02018184 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021EEF34 - ldr r0, [r4, #0x10] - add r1, r5, #0 - str r0, [r5, #0x1c] - add r0, r4, #0 - add r2, sp, #0x1c - bl ov5_021EEF98 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021EEFF8 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021EF008 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021EF01C - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021EF02C - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021EF03C - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov5_021EF04C - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - str r0, [r5, #0x18] - pop {r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov5_021EF158 - - thumb_func_start ov5_021EF1D0 -ov5_021EF1D0: ; 0x021EF1D0 - push {r3, lr} - cmp r0, #0 - beq _021EF1DA - bl sub_020181C4 -_021EF1DA: - pop {r3, pc} - thumb_func_end ov5_021EF1D0 - - thumb_func_start ov5_021EF1DC -ov5_021EF1DC: ; 0x021EF1DC - cmp r0, #0 - beq _021EF1EE - mov r1, #0 - str r1, [r0, #0x18] - str r1, [r0, #0x10] - str r1, [r0, #0x14] - str r1, [r0, #0] - str r1, [r0, #8] - str r1, [r0, #0xc] -_021EF1EE: - bx lr - thumb_func_end ov5_021EF1DC - - thumb_func_start ov5_021EF1F0 -ov5_021EF1F0: ; 0x021EF1F0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #4 - mov r1, #0x88 - add r6, r2, #0 - add r7, r3, #0 - bl sub_02018184 - add r1, r0, #0 - add r2, r1, #0 - mov r0, #0 - add r2, #0x68 - strb r0, [r2] - add r2, r1, #0 - str r5, [r1, #0x7c] - add r2, #0x80 - str r4, [r2, #0] - str r6, [r1, #0x70] - str r7, [r1, #0x78] - str r0, [r1, #0x74] - str r0, [r1, #0x64] - str r0, [r1, #0x48] - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r0, [r0, #0] - str r0, [r1, #0x6c] - add r0, r1, #0 - add r0, #0x84 - str r2, [r0, #0] - ldr r0, _021EF238 ; =ov5_021EF05C - mov r2, #1 - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EF238: .word ov5_021EF05C - thumb_func_end ov5_021EF1F0 - - thumb_func_start ov5_021EF23C -ov5_021EF23C: ; 0x021EF23C - push {r3, lr} - bl sub_0201CED0 - mov r1, #1 - str r1, [r0, #0x74] - pop {r3, pc} - thumb_func_end ov5_021EF23C - - thumb_func_start ov5_021EF248 -ov5_021EF248: ; 0x021EF248 - mov r1, #0 - str r1, [r0, #0x18] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EF248 - - thumb_func_start ov5_021EF250 -ov5_021EF250: ; 0x021EF250 - push {r4, r5} - ldr r3, [r2, #0x14] - cmp r3, #0 - bne _021EF25E - mov r0, #0 - pop {r4, r5} - bx lr -_021EF25E: - ldr r5, [r2, #0] - ldr r3, [r2, #8] - ldr r4, [r2, #4] - ldr r2, [r2, #0xc] - add r3, r5, r3 - add r2, r4, r2 - sub r3, r3, #1 - sub r2, r2, #1 - cmp r5, r0 - bgt _021EF284 - cmp r0, r3 - bgt _021EF284 - cmp r4, r1 - bgt _021EF284 - cmp r1, r2 - bgt _021EF284 - mov r0, #1 - pop {r4, r5} - bx lr -_021EF284: - mov r0, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EF250 - - thumb_func_start ov5_021EF28C -ov5_021EF28C: ; 0x021EF28C - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #8 - bl sub_02018144 - mov r1, #0x18 - add r4, r0, #0 - add r0, r6, #0 - mul r1, r5 - bl sub_02018144 - str r0, [r4, #4] - mov r6, #0 - str r5, [r4, #0] - cmp r5, #0 - bls _021EF2C8 - add r0, r6, #0 - mov r1, #0x18 -_021EF2B4: - add r2, r6, #0 - ldr r3, [r4, #4] - mul r2, r1 - add r2, r3, r2 - str r0, [r2, #0x14] - add r2, r6, #1 - lsl r2, r2, #0x18 - lsr r6, r2, #0x18 - cmp r6, r5 - blo _021EF2B4 -_021EF2C8: - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EF28C - - thumb_func_start ov5_021EF2CC -ov5_021EF2CC: ; 0x021EF2CC - push {r4, r5} - ldr r5, [sp, #0x10] - mov r4, #0x18 - mul r4, r0 - ldr r0, [r5, #4] - str r1, [r0, r4] - ldr r0, [r5, #4] - ldr r1, [sp, #8] - add r0, r0, r4 - str r2, [r0, #4] - ldr r0, [r5, #4] - add r0, r0, r4 - str r3, [r0, #8] - ldr r0, [r5, #4] - add r0, r0, r4 - str r1, [r0, #0xc] - ldr r0, [r5, #4] - ldr r1, [sp, #0xc] - add r0, r0, r4 - str r1, [r0, #0x10] - ldr r0, [r5, #4] - mov r1, #1 - add r0, r0, r4 - str r1, [r0, #0x14] - pop {r4, r5} - bx lr - thumb_func_end ov5_021EF2CC - - thumb_func_start ov5_021EF300 -ov5_021EF300: ; 0x021EF300 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF300 - - thumb_func_start ov5_021EF314 -ov5_021EF314: ; 0x021EF314 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - str r3, [sp] - cmp r3, #0 - bne _021EF326 - bl sub_02022974 -_021EF326: - ldr r0, [r5, #0] - mov r4, #0 - cmp r0, #0 - ble _021EF356 -_021EF32E: - mov r3, #0x18 - ldr r2, [r5, #4] - mul r3, r4 - add r0, r6, #0 - add r1, r7, #0 - add r2, r2, r3 - bl ov5_021EF250 - cmp r0, #0 - beq _021EF34A - ldr r0, [sp] - strb r4, [r0] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EF34A: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - ldr r0, [r5, #0] - cmp r4, r0 - blt _021EF32E -_021EF356: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF314 - - thumb_func_start ov5_021EF35C -ov5_021EF35C: ; 0x021EF35C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r5, r0 - blt _021EF36C - bl sub_02022974 -_021EF36C: - mov r0, #0x18 - add r6, r5, #0 - mul r6, r0 - ldr r0, [r4, #4] - add r0, r0, r6 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _021EF380 - bl sub_02022974 -_021EF380: - ldr r0, [r4, #4] - add r0, r0, r6 - ldr r0, [r0, #0x10] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EF35C - - thumb_func_start ov5_021EF388 -ov5_021EF388: ; 0x021EF388 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - ldr r0, [r6, #0] - add r4, r1, #0 - cmp r5, r0 - blt _021EF39A - bl sub_02022974 -_021EF39A: - mov r0, #0x18 - ldr r1, [r6, #4] - mul r0, r5 - add r0, r1, r0 - str r4, [r0, #0x10] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF388 - - thumb_func_start ov5_021EF3A8 -ov5_021EF3A8: ; 0x021EF3A8 - push {r4, lr} - mov r1, #0x1c - bl sub_02018144 - add r4, r0, #0 - bl ov5_021EF444 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF3A8 - - thumb_func_start ov5_021EF3BC -ov5_021EF3BC: ; 0x021EF3BC - push {r4, lr} - add r4, r0, #0 - beq _021EF3D8 - ldr r1, [r4, #0] - cmp r1, #1 - bne _021EF3CC - bl ov5_021EF3FC -_021EF3CC: - add r0, r4, #0 - bl ov5_021EF444 - add r0, r4, #0 - bl sub_020181C4 -_021EF3D8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF3BC - - thumb_func_start ov5_021EF3DC -ov5_021EF3DC: ; 0x021EF3DC - push {r4, lr} - add r4, r0, #0 - ldr r0, _021EF3F8 ; =ov5_021EF47C - add r1, r4, #0 - bl sub_020177BC - cmp r0, #1 - beq _021EF3F0 - bl sub_02022974 -_021EF3F0: - mov r0, #1 - str r0, [r4, #0] - pop {r4, pc} - nop -_021EF3F8: .word ov5_021EF47C - thumb_func_end ov5_021EF3DC - - thumb_func_start ov5_021EF3FC -ov5_021EF3FC: ; 0x021EF3FC - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_020177BC - cmp r0, #1 - beq _021EF410 - bl sub_02022974 -_021EF410: - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF3FC - - thumb_func_start ov5_021EF418 -ov5_021EF418: ; 0x021EF418 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r2, #0 - bl ov5_021EF49C - add r4, r0, #0 - bne _021EF42A - bl sub_02022974 -_021EF42A: - cmp r4, #0 - beq _021EF436 - str r6, [r4, #4] - str r5, [r4, #8] - mov r0, #1 - str r0, [r4, #0] -_021EF436: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF418 - - thumb_func_start ov5_021EF43C -ov5_021EF43C: ; 0x021EF43C - ldr r3, _021EF440 ; =ov5_021EF46C - bx r3 - ; .align 2, 0 -_021EF440: .word ov5_021EF46C - thumb_func_end ov5_021EF43C - - thumb_func_start ov5_021EF444 -ov5_021EF444: ; 0x021EF444 - push {r3, r4, r5, lr} - add r3, r0, #0 - mov r2, #0x1c - mov r1, #0 -_021EF44C: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _021EF44C - mov r4, #0 - str r4, [r0, #0] - add r5, r0, #4 -_021EF45A: - add r0, r5, #0 - bl ov5_021EF46C - add r4, r4, #1 - add r5, #0xc - cmp r4, #2 - blt _021EF45A - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF444 - - thumb_func_start ov5_021EF46C -ov5_021EF46C: ; 0x021EF46C - mov r2, #0 - ldr r1, _021EF478 ; =ov5_021EF498 - str r2, [r0, #0] - str r1, [r0, #8] - str r2, [r0, #4] - bx lr - ; .align 2, 0 -_021EF478: .word ov5_021EF498 - thumb_func_end ov5_021EF46C - - thumb_func_start ov5_021EF47C -ov5_021EF47C: ; 0x021EF47C - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r5, #4 -_021EF484: - ldr r1, [r5, #8] - ldr r2, [r5, #0xc] - add r0, r4, #0 - blx r2 - add r6, r6, #1 - add r5, #0xc - add r4, #0xc - cmp r6, #2 - blt _021EF484 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EF47C - - thumb_func_start ov5_021EF498 -ov5_021EF498: ; 0x021EF498 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EF498 - - thumb_func_start ov5_021EF49C -ov5_021EF49C: ; 0x021EF49C - mov r2, #0 - add r3, r0, #0 -_021EF4A0: - ldr r1, [r3, #4] - cmp r1, #0 - bne _021EF4B0 - add r1, r0, #4 - mov r0, #0xc - mul r0, r2 - add r0, r1, r0 - bx lr -_021EF4B0: - add r2, r2, #1 - add r3, #0xc - cmp r2, #2 - blt _021EF4A0 - mov r0, #0 - bx lr - thumb_func_end ov5_021EF49C - - thumb_func_start ov5_021EF4BC -ov5_021EF4BC: ; 0x021EF4BC - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0xca - lsl r1, r1, #2 - add r6, r0, #0 - bl sub_02018144 - mov r2, #0xca - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - mov r2, #0x63 - mov r0, #0 - add r1, r4, #0 - lsl r2, r2, #2 - str r0, [r4, #0] - add r0, r6, #0 - add r1, #0xc - add r2, r4, r2 - bl sub_02013B10 - mov r1, #0xc3 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #4 - str r5, [r4, r0] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EF4BC - - thumb_func_start ov5_021EF4F8 -ov5_021EF4F8: ; 0x021EF4F8 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0] - cmp r1, #1 - bne _021EF506 - bl ov5_021EF710 -_021EF506: - mov r0, #0xc3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02013B40 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021EF4F8 - - thumb_func_start ov5_021EF518 -ov5_021EF518: ; 0x021EF518 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021EF526 - bl sub_02022974 -_021EF526: - mov r0, #0x31 - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, _021EF598 ; =ov5_021EF6C0 - add r2, r4, #0 - bl ov5_021EF418 - mov r2, #0xc5 - lsl r2, r2, #2 - str r0, [r4, r2] - ldr r0, _021EF59C ; =ov5_021EF5A8 - add r1, r4, #0 - add r2, #0xec - bl sub_0200D9E8 - mov r2, #0xc7 - lsl r2, r2, #2 - str r0, [r4, r2] - ldr r0, _021EF5A0 ; =ov5_021EF6B0 - add r1, r4, #0 - add r2, #0xe4 - bl sub_0200DA04 - mov r2, #0x32 - lsl r2, r2, #4 - str r0, [r4, r2] - ldr r0, _021EF5A4 ; =ov5_021EF6E4 - add r1, r4, #0 - add r2, #0xe0 - bl sub_0200DA04 - mov r1, #0xc9 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - mov r2, #6 - add r0, #0xc - mov r1, #0 - lsl r2, r2, #6 - bl sub_020D5124 - mov r2, #0x63 - lsl r2, r2, #2 - add r0, r4, r2 - mov r1, #0 - sub r2, #0xc - bl sub_020D5124 - mov r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #8] - mov r0, #0x61 - lsl r0, r0, #4 - bl sub_02005748 - pop {r4, pc} - ; .align 2, 0 -_021EF598: .word ov5_021EF6C0 -_021EF59C: .word ov5_021EF5A8 -_021EF5A0: .word ov5_021EF6B0 -_021EF5A4: .word ov5_021EF6E4 - thumb_func_end ov5_021EF518 - - thumb_func_start ov5_021EF5A8 -ov5_021EF5A8: ; 0x021EF5A8 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #8] - cmp r0, #3 - bhi _021EF630 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021EF5BE: ; jump table - .short _021EF5C6 - _021EF5BE - 2 ; case 0 - .short _021EF5D2 - _021EF5BE - 2 ; case 1 - .short _021EF5FE - _021EF5BE - 2 ; case 2 - .short _021EF624 - _021EF5BE - 2 ; case 3 -_021EF5C6: - mov r0, #3 - str r0, [r4, #4] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r4, pc} -_021EF5D2: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - mov r0, #0xc3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02013B54 - ldr r1, [r4, #4] - mov r2, #3 - sub r1, r2, r1 - bl ov5_021EF66C - ldr r0, [r4, #4] - cmp r0, #0 - bgt _021EF630 - mov r0, #3 - str r0, [r4, #4] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r4, pc} -_021EF5FE: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - mov r0, #0xc3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02013B54 - ldr r1, [r4, #4] - mov r2, #3 - bl ov5_021EF66C - ldr r0, [r4, #4] - cmp r0, #0 - bgt _021EF630 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r4, pc} -_021EF624: - add r0, r4, #0 - bl ov5_021EF710 - mov r0, #0 - bl sub_020BFEAC -_021EF630: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF5A8 - - thumb_func_start ov5_021EF634 -ov5_021EF634: ; 0x021EF634 - push {r4, lr} - ldr r1, _021EF664 ; =0x04000006 - ldrh r4, [r1] - mov r1, #0xc3 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bl sub_02013B68 - cmp r4, #0xc0 - bge _021EF662 - add r3, r4, #1 - cmp r3, #0xc0 - blt _021EF650 - sub r3, #0xc0 -_021EF650: - ldr r1, _021EF668 ; =0x04000004 - ldrh r2, [r1] - mov r1, #2 - tst r1, r2 - beq _021EF662 - lsl r1, r3, #1 - ldrh r0, [r0, r1] - bl sub_020BFEAC -_021EF662: - pop {r4, pc} - ; .align 2, 0 -_021EF664: .word 0x04000006 -_021EF668: .word 0x04000004 - thumb_func_end ov5_021EF634 - - thumb_func_start ov5_021EF66C -ov5_021EF66C: ; 0x021EF66C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - lsl r0, r1, #1 - add r0, r1, r0 - add r1, r2, #0 - mov r4, #1 - bl sub_020E1F6C - neg r1, r0 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - lsl r0, r0, #0x10 - mov r6, #0 - str r1, [sp] - lsr r7, r0, #0x10 -_021EF68A: - add r0, r6, #0 - mov r1, #0xa - bl sub_020E1F6C - cmp r1, #0 - bne _021EF69A - mov r0, #1 - eor r4, r0 -_021EF69A: - cmp r4, #0 - beq _021EF6A2 - strh r7, [r5] - b _021EF6A6 -_021EF6A2: - ldr r0, [sp] - strh r0, [r5] -_021EF6A6: - add r6, r6, #1 - add r5, r5, #2 - cmp r6, #0xc0 - blt _021EF68A - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EF66C - - thumb_func_start ov5_021EF6B0 -ov5_021EF6B0: ; 0x021EF6B0 - mov r2, #0xc6 - ldr r3, _021EF6BC ; =sub_020BFEAC - mov r0, #0 - lsl r2, r2, #2 - str r0, [r1, r2] - bx r3 - ; .align 2, 0 -_021EF6BC: .word sub_020BFEAC - thumb_func_end ov5_021EF6B0 - - thumb_func_start ov5_021EF6C0 -ov5_021EF6C0: ; 0x021EF6C0 - ldr r3, _021EF6C8 ; =ov5_021EF6CC - add r0, r1, #0 - bx r3 - nop -_021EF6C8: .word ov5_021EF6CC - thumb_func_end ov5_021EF6C0 - - thumb_func_start ov5_021EF6CC -ov5_021EF6CC: ; 0x021EF6CC - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #1 - bne _021EF6E2 - mov r1, #0xc6 - lsl r1, r1, #2 - ldr r1, [r0, r1] - cmp r1, #1 - bne _021EF6E2 - bl ov5_021EF634 -_021EF6E2: - pop {r3, pc} - thumb_func_end ov5_021EF6CC - - thumb_func_start ov5_021EF6E4 -ov5_021EF6E4: ; 0x021EF6E4 - ldr r3, _021EF6EC ; =ov5_021EF6F0 - add r0, r1, #0 - bx r3 - nop -_021EF6EC: .word ov5_021EF6F0 - thumb_func_end ov5_021EF6E4 - - thumb_func_start ov5_021EF6F0 -ov5_021EF6F0: ; 0x021EF6F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #1 - bne _021EF70C - mov r0, #0xc3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02013B94 - mov r0, #0xc6 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] -_021EF70C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF6F0 - - thumb_func_start ov5_021EF710 -ov5_021EF710: ; 0x021EF710 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xc5 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov5_021EF43C - mov r0, #0xc5 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, #8 - ldr r0, [r4, r0] - bl sub_0200DA58 - mov r0, #0xc7 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200DA58 - mov r0, #0x32 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200DA58 - mov r0, #0xc9 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - str r1, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EF710 - - thumb_func_start ov5_021EF75C -ov5_021EF75C: ; 0x021EF75C - ldr r2, [r1, #0x14] - ldr r3, _021EF768 ; =sub_020182F0 - add r1, r1, r2 - sub r1, r1, r0 - bx r3 - nop -_021EF768: .word sub_020182F0 - thumb_func_end ov5_021EF75C - - thumb_func_start ov5_021EF76C -ov5_021EF76C: ; 0x021EF76C - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - ldr r1, _021EF79C ; =0x00000C28 - mov r0, #4 - bl sub_02018144 - add r4, r0, #0 - mov r0, #4 - mov r1, #0x10 - bl sub_02018184 - mov r1, #0xc2 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r2, #0 - str r5, [r0, #0] - ldr r0, [r4, r1] - str r6, [r0, #4] - ldr r0, [r4, r1] - str r2, [r0, #0xc] - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021EF79C: .word 0x00000C28 - thumb_func_end ov5_021EF76C - - thumb_func_start ov5_021EF7A0 -ov5_021EF7A0: ; 0x021EF7A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x110 - add r5, r0, #0 - mov r0, #0xc2 - lsl r0, r0, #4 - ldr r7, [r5, r0] - sub r0, #8 - ldr r2, [r7, #0] - add r0, r5, r0 - mov r1, #0x2a - bl sub_02006AA4 - ldr r1, _021EF9BC ; =0x00000C18 - mov r0, #0x2b - ldrh r1, [r5, r1] - mov r2, #4 - bl sub_02006AC0 - ldr r1, _021EF9C0 ; =0x00000C24 - str r0, [r5, r1] - ldr r0, [r5, r1] - ldrh r1, [r0] - mov r0, #3 - lsl r0, r0, #8 - strh r1, [r7, #8] - cmp r1, r0 - blo _021EF7DA - bl sub_02022974 -_021EF7DA: - ldr r1, _021EF9C4 ; =0x00000C0C - mov r0, #0 - str r0, [r5, r1] - add r1, #0xe - ldrh r1, [r5, r1] - mov r0, #0x2c - mov r2, #4 - bl sub_02006AC0 - ldr r1, _021EF9C8 ; =0x00000C04 - mov r2, #4 - str r0, [r5, r1] - add r1, #0x14 - ldrh r1, [r5, r1] - mov r0, #0x47 - bl sub_02006AC0 - ldr r1, _021EF9CC ; =0x00000C08 - str r0, [r5, r1] - sub r0, r1, #4 - ldr r0, [r5, r0] - bl sub_020B3C1C - ldr r1, _021EF9C4 ; =0x00000C0C - str r0, [r5, r1] - ldrh r0, [r7, #8] - cmp r0, #0 - beq _021EF822 - sub r0, r1, #4 - ldr r0, [r5, r0] - bl sub_020B3C1C - mov r1, #0xc1 - lsl r1, r1, #4 - str r0, [r5, r1] - b _021EF828 -_021EF822: - mov r2, #0 - add r0, r1, #4 - str r2, [r5, r0] -_021EF828: - ldr r0, _021EF9C4 ; =0x00000C0C - ldr r0, [r5, r0] - bl sub_0201CBCC - cmp r0, #0 - bne _021EF838 - bl sub_02022974 -_021EF838: - ldr r1, _021EF9C8 ; =0x00000C04 - ldr r0, [r5, r1] - add r1, #8 - ldr r1, [r5, r1] - bl ov5_021EF75C - mov r0, #0xc1 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021EF866 - bl sub_0201CBCC - cmp r0, #0 - bne _021EF85A - bl sub_02022974 -_021EF85A: - ldr r1, _021EF9CC ; =0x00000C08 - ldr r0, [r5, r1] - add r1, #8 - ldr r1, [r5, r1] - bl ov5_021EF75C -_021EF866: - mov r2, #0 - mov r0, #3 - add r3, r5, #0 - add r1, r2, #0 - lsl r0, r0, #8 -_021EF870: - add r2, r2, #1 - str r1, [r3, #4] - add r3, r3, #4 - cmp r2, r0 - blt _021EF870 - ldr r0, _021EF9D0 ; =0x00000C14 - str r1, [r5, r0] - mov r0, #0x28 - mov r1, #4 - bl sub_02006C24 - str r0, [sp, #0xc] - ldr r0, [r7, #4] - bl ov5_021D3F84 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldrh r0, [r7, #8] - cmp r0, #0 - ble _021EF928 - ldr r0, [sp, #8] - str r0, [sp] -_021EF89E: - ldr r0, _021EF9C0 ; =0x00000C24 - ldr r1, [r5, r0] - ldr r0, [sp] - add r0, r1, r0 - ldrh r6, [r0, #2] - lsl r0, r6, #2 - add r4, r5, r0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021EF8B6 - bl sub_02022974 -_021EF8B6: - ldr r0, [sp, #0xc] - add r1, r6, #0 - mov r2, #4 - bl sub_02006CB8 - str r0, [r4, #4] - ldr r0, [sp, #4] - cmp r6, r0 - bge _021EF902 - ldr r0, [r4, #4] - bl sub_020B3C0C - cmp r0, #0 - beq _021EF8F2 - add r1, r0, #0 - add r1, #8 - beq _021EF8E6 - ldrb r2, [r0, #9] - cmp r2, #0 - bls _021EF8E6 - ldrh r2, [r0, #0xe] - add r1, r1, r2 - add r1, r1, #4 - b _021EF8E8 -_021EF8E6: - mov r1, #0 -_021EF8E8: - cmp r1, #0 - beq _021EF8F2 - ldr r1, [r1, #0] - add r1, r0, r1 - b _021EF8F4 -_021EF8F2: - mov r1, #0 -_021EF8F4: - mov r2, #0xc1 - lsl r2, r2, #4 - ldr r2, [r5, r2] - ldr r3, [r7, #4] - add r0, r6, #0 - bl ov5_021D3A50 -_021EF902: - mov r1, #0xc1 - lsl r1, r1, #4 - ldr r0, [r4, #4] - ldr r1, [r5, r1] - bl sub_0201CBB0 - cmp r0, #0 - bne _021EF916 - bl sub_02022974 -_021EF916: - ldr r0, [sp] - ldrh r1, [r7, #8] - add r0, r0, #2 - str r0, [sp] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, r1 - blt _021EF89E -_021EF928: - ldr r0, [r5, #4] - cmp r0, #0 - bne _021EF95E - ldr r0, [sp, #0xc] - mov r1, #0 - mov r2, #4 - bl sub_02006CB8 - str r0, [r5, #4] - bl sub_020B3C1C - add r4, r0, #0 - beq _021EF95E - bl sub_0201CBCC - cmp r0, #0 - bne _021EF94E - bl sub_02022974 -_021EF94E: - ldr r0, [r5, #4] - add r1, r4, #0 - bl sub_0201CBB0 - cmp r0, #0 - bne _021EF95E - bl sub_02022974 -_021EF95E: - ldr r0, [sp, #0xc] - bl sub_02006CA8 - ldr r2, _021EF9D4 ; =0x04000060 - ldr r0, _021EF9D8 ; =0xFFFFCFFF - ldrh r1, [r2] - and r1, r0 - mov r0, #0x20 - orr r0, r1 - strh r0, [r2] - add r0, r5, #0 - bl ov5_021EFAC0 - cmp r0, #0 - bne _021EF984 - ldr r0, _021EF9DC ; =0x021FF588 - bl sub_020BFD2C - b _021EF98A -_021EF984: - ldr r0, _021EF9E0 ; =0x021FF598 - bl sub_020BFD2C -_021EF98A: - bl ov5_021D56BC - ldr r1, _021EF9D0 ; =0x00000C14 - str r0, [r5, r1] - ldr r1, _021EF9E4 ; =0x022020DC - add r0, sp, #0x10 - bl sub_020D7510 - ldr r1, _021EF9D0 ; =0x00000C14 - add r0, sp, #0x10 - ldr r1, [r5, r1] - bl ov5_021D56D4 - mov r0, #0xc2 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_020181C4 - mov r0, #0xc2 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - add sp, #0x110 - pop {r3, r4, r5, r6, r7, pc} - nop -_021EF9BC: .word 0x00000C18 -_021EF9C0: .word 0x00000C24 -_021EF9C4: .word 0x00000C0C -_021EF9C8: .word 0x00000C04 -_021EF9CC: .word 0x00000C08 -_021EF9D0: .word 0x00000C14 -_021EF9D4: .word 0x04000060 -_021EF9D8: .word 0xFFFFCFFF -_021EF9DC: .word 0x021FF588 -_021EF9E0: .word 0x021FF598 -_021EF9E4: .word 0x022020DC - thumb_func_end ov5_021EF7A0 - - thumb_func_start ov5_021EF9E8 -ov5_021EF9E8: ; 0x021EF9E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bne _021EF9F4 - bl sub_02022974 -_021EF9F4: - add r2, r4, #4 - lsl r1, r5, #2 - ldr r0, [r2, r1] - cmp r0, #0 - bne _021EFA0C - ldr r0, [r4, #4] - cmp r0, #0 - bne _021EFA08 - bl sub_02022974 -_021EFA08: - add r0, r4, #4 - pop {r3, r4, r5, pc} -_021EFA0C: - add r0, r2, r1 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EF9E8 - - thumb_func_start ov5_021EFA10 -ov5_021EFA10: ; 0x021EFA10 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - ldr r0, _021EFA7C ; =0x00000C14 - ldr r0, [r1, r0] - cmp r0, #0 - beq _021EFA22 - bl ov5_021D5778 -_021EFA22: - mov r6, #0 - mov r7, #3 - add r4, r6, #0 - lsl r7, r7, #8 -_021EFA2A: - ldr r0, [r5, #0] - add r0, r0, r4 - ldr r0, [r0, #4] - cmp r0, #0 - beq _021EFA38 - bl sub_020181C4 -_021EFA38: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r7 - blt _021EFA2A - ldr r1, [r5, #0] - ldr r0, _021EFA80 ; =0x00000C24 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, [r5, #0] - ldr r0, _021EFA84 ; =0x00000C04 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, [r5, #0] - ldr r0, _021EFA84 ; =0x00000C04 - mov r2, #0 - str r2, [r1, r0] - ldr r1, [r5, #0] - add r0, r0, #4 - ldr r0, [r1, r0] - bl sub_020181C4 - ldr r1, [r5, #0] - ldr r0, _021EFA88 ; =0x00000C08 - mov r2, #0 - str r2, [r1, r0] - ldr r0, [r5, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - nop -_021EFA7C: .word 0x00000C14 -_021EFA80: .word 0x00000C24 -_021EFA84: .word 0x00000C04 -_021EFA88: .word 0x00000C08 - thumb_func_end ov5_021EFA10 - - thumb_func_start ov5_021EFA8C -ov5_021EFA8C: ; 0x021EFA8C - push {r4, lr} - add r4, r0, #0 - bne _021EFA96 - bl sub_02022974 -_021EFA96: - ldr r0, _021EFA9C ; =0x00000C0C - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021EFA9C: .word 0x00000C0C - thumb_func_end ov5_021EFA8C - - thumb_func_start ov5_021EFAA0 -ov5_021EFAA0: ; 0x021EFAA0 - push {r4, lr} - add r4, r0, #0 - bne _021EFAAA - bl sub_02022974 -_021EFAAA: - mov r0, #0xc1 - lsl r0, r0, #4 - ldr r0, [r4, r0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EFAA0 - - thumb_func_start ov5_021EFAB4 -ov5_021EFAB4: ; 0x021EFAB4 - ldr r1, _021EFABC ; =0x00000C14 - ldr r0, [r0, r1] - bx lr - nop -_021EFABC: .word 0x00000C14 - thumb_func_end ov5_021EFAB4 - - thumb_func_start ov5_021EFAC0 -ov5_021EFAC0: ; 0x021EFAC0 - ldr r1, _021EFAD4 ; =0x00000C1E - ldrh r0, [r0, r1] - cmp r0, #0 - beq _021EFACC - cmp r0, #3 - bne _021EFAD0 -_021EFACC: - mov r0, #1 - bx lr -_021EFAD0: - mov r0, #0 - bx lr - ; .align 2, 0 -_021EFAD4: .word 0x00000C1E - thumb_func_end ov5_021EFAC0 - - thumb_func_start ov5_021EFAD8 -ov5_021EFAD8: ; 0x021EFAD8 - ldr r1, _021EFAE4 ; =0x00000C1E - ldrh r0, [r0, r1] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bx lr - nop -_021EFAE4: .word 0x00000C1E - thumb_func_end ov5_021EFAD8 - - thumb_func_start ov5_021EFAE8 -ov5_021EFAE8: ; 0x021EFAE8 - ldr r2, _021EFAF4 ; =0x00000C24 - ldr r2, [r0, r2] - lsl r0, r1, #1 - ldrh r0, [r2, r0] - bx lr - nop -_021EFAF4: .word 0x00000C24 - thumb_func_end ov5_021EFAE8 - - thumb_func_start ov5_021EFAF8 -ov5_021EFAF8: ; 0x021EFAF8 - lsl r1, r1, #2 - add r0, r0, r1 - ldr r0, [r0, #4] - cmp r0, #0 - beq _021EFB06 - mov r0, #1 - bx lr -_021EFB06: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021EFAF8 - - thumb_func_start ov5_021EFB0C -ov5_021EFB0C: ; 0x021EFB0C - push {r4, lr} - mov r0, #4 - mov r1, #0xfc - bl sub_02018144 - mov r4, #0 - add r2, r4, #0 -_021EFB1A: - lsl r1, r4, #3 - add r3, r0, r1 - strb r2, [r0, r1] - add r1, r4, #1 - lsl r1, r1, #0x18 - lsr r4, r1, #0x18 - str r2, [r3, #4] - cmp r4, #0x15 - blo _021EFB1A - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021EFB0C - - thumb_func_start ov5_021EFB30 -ov5_021EFB30: ; 0x021EFB30 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov5_021EFB30 - - thumb_func_start ov5_021EFB40 -ov5_021EFB40: ; 0x021EFB40 - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r0, _021EFB90 ; =0x000007D8 - str r0, [r1, #0] - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EA78 - cmp r0, #0 - bne _021EFB8A - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, sp, #0xc - mov r2, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, r6, #0 - sub r3, r2, #1 - bl sub_020550F4 - add r0, r5, #0 - mov r1, #0x1a - add r2, sp, #0xc - mov r3, #0 - bl sub_02055178 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} -_021EFB8A: - mov r0, #0 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021EFB90: .word 0x000007D8 - thumb_func_end ov5_021EFB40 - - thumb_func_start ov5_021EFB94 -ov5_021EFB94: ; 0x021EFB94 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl ov5_021EFF10 - add r5, r0, #0 - cmp r5, #0x15 - bne _021EFBAA - bl sub_02022974 -_021EFBAA: - ldr r0, [r4, #0xc] - bl sub_0202D834 - bl sub_0202D840 - add r1, r0, #0 - add r0, r5, #0 - bl sub_0202D84C - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov5_021EFF34 - cmp r0, #0 - beq _021EFBCC - mov r0, #3 - pop {r3, r4, r5, pc} -_021EFBCC: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021EFBD6 - mov r0, #2 - pop {r3, r4, r5, pc} -_021EFBD6: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021EFB94 - - thumb_func_start ov5_021EFBDC -ov5_021EFBDC: ; 0x021EFBDC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0x1c] - ldr r0, [r0, #0] - bl ov5_021EFF10 - add r5, r0, #0 - cmp r5, #0x15 - bne _021EFBF2 - bl sub_02022974 -_021EFBF2: - ldr r0, [r6, #0xc] - bl sub_0202D834 - bl sub_0202D840 - str r0, [sp] - ldr r1, [sp] - add r0, r5, #0 - bl sub_0202D84C - add r4, r0, #0 - mov r0, #0x5a - lsl r0, r0, #4 - str r0, [r4, #0] - ldr r0, [r6, #0xc] - bl sub_02025E38 - bl sub_02025F20 - add r1, r5, #0 - bl ov5_021EFF4C - add r7, r0, #0 - ldr r0, [sp] - bl sub_0202D844 - cmp r5, r0 - bne _021EFC56 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #0x64 - blo _021EFC42 - bl sub_02022974 -_021EFC42: - cmp r6, #0x5a - bhs _021EFC56 - add r0, r4, #4 - bl ov5_021EFD58 - ldrb r0, [r4, #6] - bl ov5_021EFDC0 - strb r0, [r4, #7] - pop {r3, r4, r5, r6, r7, pc} -_021EFC56: - add r0, r7, #0 - add r1, r4, #6 - bl ov5_021EFCF8 - ldrb r0, [r4, #6] - cmp r0, #0 - beq _021EFC74 - add r0, r4, #4 - bl ov5_021EFD58 - ldrb r0, [r4, #6] - bl ov5_021EFDAC - strb r0, [r4, #5] - b _021EFC7C -_021EFC74: - mov r0, #0 - strb r0, [r4, #5] - strb r0, [r4, #4] - str r0, [r4, #0] -_021EFC7C: - ldrb r0, [r4, #6] - bl ov5_021EFDC0 - strb r0, [r4, #7] - ldr r1, [sp] - add r0, r5, #0 - bl sub_0202D848 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EFBDC - - thumb_func_start ov5_021EFC90 -ov5_021EFC90: ; 0x021EFC90 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl ov5_021EFF10 - add r4, r0, #0 - cmp r4, #0x15 - bne _021EFCA8 - bl sub_02022974 -_021EFCA8: - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - lsl r4, r4, #3 - add r0, r0, r4 - ldr r0, [r0, #4] - cmp r0, #0 - beq _021EFCF4 - ldr r0, [r5, #0x28] - bl ov5_021E9354 - ldr r1, [r5, #0x28] - add r2, sp, #0 - bl ov5_021E9340 - ldr r0, [sp] - mov r1, #0x1a - bl ov5_021E18CC - add r6, r0, #0 - bl ov5_021E18BC - add r1, r0, #0 - cmp r6, #0 - beq _021EFCEA - add r3, r5, #0 - add r3, #0xa8 - ldr r3, [r3, #0] - ldr r0, [r5, #0x50] - ldrb r3, [r3, r4] - mov r2, #0x1a - bl ov5_021D3D18 -_021EFCEA: - add r5, #0xa8 - ldr r0, [r5, #0] - mov r1, #0 - add r0, r0, r4 - str r1, [r0, #4] -_021EFCF4: - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021EFC90 - - thumb_func_start ov5_021EFCF8 -ov5_021EFCF8: ; 0x021EFCF8 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x64 - blo _021EFD16 - bl sub_02022974 -_021EFD16: - cmp r6, #0 - beq _021EFD3E - cmp r4, #1 - bge _021EFD24 - mov r0, #3 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021EFD24: - cmp r4, #0xa - bge _021EFD2E - mov r0, #0 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021EFD2E: - cmp r4, #0x1e - bge _021EFD38 - mov r0, #1 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021EFD38: - mov r0, #2 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021EFD3E: - cmp r4, #0xa - bge _021EFD48 - mov r0, #0 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021EFD48: - cmp r4, #0x1e - bge _021EFD52 - mov r0, #2 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021EFD52: - mov r0, #1 - strb r0, [r5] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021EFCF8 - - thumb_func_start ov5_021EFD58 -ov5_021EFD58: ; 0x021EFD58 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #0x64 - blo _021EFD74 - bl sub_02022974 -_021EFD74: - cmp r5, #5 - bge _021EFD7E - mov r0, #5 - strb r0, [r4] - pop {r3, r4, r5, pc} -_021EFD7E: - cmp r5, #0xa - bge _021EFD88 - mov r0, #4 - strb r0, [r4] - pop {r3, r4, r5, pc} -_021EFD88: - cmp r5, #0x14 - bge _021EFD92 - mov r0, #3 - strb r0, [r4] - pop {r3, r4, r5, pc} -_021EFD92: - cmp r5, #0x28 - bge _021EFD9C - mov r0, #2 - strb r0, [r4] - pop {r3, r4, r5, pc} -_021EFD9C: - cmp r5, #0x3c - bge _021EFDA6 - mov r0, #1 - strb r0, [r4] - pop {r3, r4, r5, pc} -_021EFDA6: - mov r0, #0 - strb r0, [r4] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EFD58 - - thumb_func_start ov5_021EFDAC -ov5_021EFDAC: ; 0x021EFDAC - cmp r0, #3 - bne _021EFDB4 - mov r0, #2 - bx lr -_021EFDB4: - cmp r0, #2 - bne _021EFDBC - mov r0, #1 - bx lr -_021EFDBC: - mov r0, #0 - bx lr - thumb_func_end ov5_021EFDAC - - thumb_func_start ov5_021EFDC0 -ov5_021EFDC0: ; 0x021EFDC0 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #0x64 - blo _021EFDDC - bl sub_02022974 -_021EFDDC: - cmp r4, #3 - bne _021EFDFC - cmp r5, #5 - bge _021EFDE8 - mov r0, #2 - pop {r3, r4, r5, pc} -_021EFDE8: - cmp r5, #6 - bge _021EFDF0 - mov r0, #1 - pop {r3, r4, r5, pc} -_021EFDF0: - cmp r5, #7 - bge _021EFDF8 - mov r0, #0 - pop {r3, r4, r5, pc} -_021EFDF8: - mov r0, #3 - pop {r3, r4, r5, pc} -_021EFDFC: - cmp r4, #2 - bne _021EFE1C - cmp r5, #0x4b - bge _021EFE08 - mov r0, #2 - pop {r3, r4, r5, pc} -_021EFE08: - cmp r5, #0x5f - bge _021EFE10 - mov r0, #1 - pop {r3, r4, r5, pc} -_021EFE10: - cmp r5, #0x60 - bge _021EFE18 - mov r0, #0 - pop {r3, r4, r5, pc} -_021EFE18: - mov r0, #3 - pop {r3, r4, r5, pc} -_021EFE1C: - cmp r4, #1 - bne _021EFE3C - cmp r5, #0x13 - bge _021EFE28 - mov r0, #2 - pop {r3, r4, r5, pc} -_021EFE28: - cmp r5, #0x4f - bge _021EFE30 - mov r0, #1 - pop {r3, r4, r5, pc} -_021EFE30: - cmp r5, #0x63 - bge _021EFE38 - mov r0, #0 - pop {r3, r4, r5, pc} -_021EFE38: - mov r0, #3 - pop {r3, r4, r5, pc} -_021EFE3C: - cmp r5, #1 - bge _021EFE44 - mov r0, #2 - pop {r3, r4, r5, pc} -_021EFE44: - cmp r5, #0x13 - bge _021EFE4C - mov r0, #1 - pop {r3, r4, r5, pc} -_021EFE4C: - cmp r5, #0x63 - bge _021EFE54 - mov r0, #0 - pop {r3, r4, r5, pc} -_021EFE54: - mov r0, #3 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021EFDC0 - - thumb_func_start ov5_021EFE58 -ov5_021EFE58: ; 0x021EFE58 - mov r2, #1 - cmp r0, #3 - bne _021EFE64 - mov r0, #2 - strb r0, [r1] - b _021EFE78 -_021EFE64: - cmp r0, #2 - bne _021EFE6C - strb r2, [r1] - b _021EFE78 -_021EFE6C: - cmp r0, #1 - bne _021EFE76 - mov r0, #0 - strb r0, [r1] - b _021EFE78 -_021EFE76: - mov r2, #0 -_021EFE78: - add r0, r2, #0 - bx lr - thumb_func_end ov5_021EFE58 - - thumb_func_start ov5_021EFE7C -ov5_021EFE7C: ; 0x021EFE7C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x2c] - add r7, r1, #0 - add r1, r2, #0 - bl sub_02039E68 - bl ov5_021EFF10 - add r4, r0, #0 - cmp r4, #0x15 - beq _021EFF0C - ldr r0, [r5, #0xc] - bl sub_0202D834 - bl sub_0202D840 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0202D84C - add r6, r0, #0 - ldr r0, [r6, #0] - bl ov5_021EFF34 - cmp r0, #0 - beq _021EFF0C - ldrb r0, [r6, #7] - add r1, sp, #4 - bl ov5_021EFE58 - add r6, r0, #0 - beq _021EFF0C - add r0, r7, #0 - mov r1, #0x1a - bl ov5_021E18CC - cmp r0, #0 - beq _021EFF0C - bl ov5_021E18BC - add r3, r5, #0 - add r7, r0, #0 - add r3, #0xa8 - ldr r3, [r3, #0] - lsl r4, r4, #3 - ldrb r3, [r3, r4] - ldr r0, [r5, #0x50] - add r1, r7, #0 - mov r2, #0x1a - bl ov5_021D3D18 - add r1, sp, #4 - add r2, r5, #0 - add r2, #0xa8 - ldrb r0, [r1] - ldr r2, [r2, #0] - add r3, r7, #0 - strb r0, [r2, r4] - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r2, #1 - add r0, r0, r4 - str r6, [r0, #4] - ldr r0, [r5, #0x50] - str r0, [sp] - ldrb r1, [r1] - mov r0, #0x1a - bl ov5_021D3B24 -_021EFF0C: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021EFE7C - - thumb_func_start ov5_021EFF10 -ov5_021EFF10: ; 0x021EFF10 - ldr r2, _021EFF30 ; =0x021FF5B4 - mov r3, #0 -_021EFF14: - lsl r1, r3, #2 - ldr r1, [r2, r1] - cmp r0, r1 - bne _021EFF20 - add r0, r3, #0 - bx lr -_021EFF20: - add r1, r3, #1 - lsl r1, r1, #0x18 - lsr r3, r1, #0x18 - cmp r3, #0x15 - blo _021EFF14 - add r0, r3, #0 - bx lr - nop -_021EFF30: .word 0x021FF5B4 - thumb_func_end ov5_021EFF10 - - thumb_func_start ov5_021EFF34 -ov5_021EFF34: ; 0x021EFF34 - cmp r0, #0 - ble _021EFF42 - ldr r1, _021EFF48 ; =0x00000438 - cmp r0, r1 - bgt _021EFF42 - mov r0, #1 - bx lr -_021EFF42: - mov r0, #0 - bx lr - nop -_021EFF48: .word 0x00000438 - thumb_func_end ov5_021EFF34 - - thumb_func_start ov5_021EFF4C -ov5_021EFF4C: ; 0x021EFF4C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - lsr r2, r0, #0x18 - add r1, sp, #0 - strb r2, [r1] - lsr r2, r0, #0x10 - strb r2, [r1, #1] - lsr r2, r0, #8 - strb r2, [r1, #2] - strb r0, [r1, #3] - ldrb r0, [r1] - mov r1, #0x15 - bl sub_020E1F6C - add r0, sp, #0 - strb r1, [r0] - ldrb r0, [r0, #1] - mov r1, #0x15 - bl sub_020E1F6C - add r0, sp, #0 - strb r1, [r0, #1] - ldrb r0, [r0, #2] - mov r1, #0x15 - bl sub_020E1F6C - add r0, sp, #0 - strb r1, [r0, #2] - ldrb r0, [r0, #3] - mov r1, #0x15 - bl sub_020E1F6C - add r0, sp, #0 - strb r1, [r0, #3] - mov r0, #0 - mov r3, #1 - add r1, sp, #0 - add r2, r0, #0 -_021EFF98: - add r5, r2, #0 - cmp r3, #0 - bls _021EFFBC -_021EFF9E: - ldrb r7, [r1, r5] - ldrb r6, [r1, r3] - cmp r7, r6 - bne _021EFFB2 - add r6, r6, #1 - strb r6, [r1, r3] - ldrb r6, [r1, r3] - cmp r6, #0x15 - blo _021EFFB2 - strb r0, [r1, r3] -_021EFFB2: - add r5, r5, #1 - lsl r5, r5, #0x18 - lsr r5, r5, #0x18 - cmp r5, r3 - blo _021EFF9E -_021EFFBC: - add r3, r3, #1 - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - cmp r3, #4 - blo _021EFF98 - mov r2, #0 - add r1, sp, #0 -_021EFFCA: - ldrb r0, [r1, r2] - cmp r4, r0 - bne _021EFFD4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021EFFD4: - add r0, r2, #1 - lsl r0, r0, #0x18 - lsr r2, r0, #0x18 - cmp r2, #4 - blo _021EFFCA - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021EFF4C - - thumb_func_start ov5_021EFFE4 -ov5_021EFFE4: ; 0x021EFFE4 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r0, [r0, #0] - bl ov5_021EFF10 - add r5, r0, #0 - cmp r5, #0x15 - bne _021EFFFA - bl sub_02022974 -_021EFFFA: - ldr r0, [r4, #0xc] - bl sub_0202D834 - bl sub_0202D840 - add r1, r0, #0 - add r0, r5, #0 - bl sub_0202D84C - add r4, r0, #0 - ldrb r1, [r4, #5] - mov r0, #0x6a - lsl r2, r1, #2 - ldr r1, _021F002C ; =0x021FF5A8 - ldr r1, [r1, r2] - mov r2, #4 - bl sub_02006ADC - ldrb r1, [r4, #4] - lsl r1, r1, #2 - ldr r4, [r0, r1] - bl sub_020181C4 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021F002C: .word 0x021FF5A8 - thumb_func_end ov5_021EFFE4 - - thumb_func_start ov5_021F0030 -ov5_021F0030: ; 0x021F0030 - push {r3, lr} - add r3, r1, #0 - bmi _021F003E - add r1, r2, #0 - add r2, r3, #0 - bl ov5_021EFE7C -_021F003E: - pop {r3, pc} - thumb_func_end ov5_021F0030 - - thumb_func_start ov5_021F0040 -ov5_021F0040: ; 0x021F0040 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl ov5_021EFF10 - add r4, r0, #0 - cmp r4, #0x15 - bne _021F0056 - bl sub_02022974 -_021F0056: - add r0, r5, #0 - add r0, #0xa8 - ldr r1, [r0, #0] - lsl r0, r4, #3 - mov r2, #0 - add r0, r1, r0 - str r2, [r0, #4] - ldr r0, [r5, #0xc] - bl sub_0202D834 - bl sub_0202D840 - add r1, r0, #0 - add r0, r4, #0 - bl sub_0202D84C - mov r1, #0 - str r1, [r0, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F0040 - - thumb_func_start ov5_021F007C -ov5_021F007C: ; 0x021F007C - push {r4, lr} - add r4, r2, #0 - mov r0, #0x41 - mov r1, #0x37 - add r2, r4, #4 - mov r3, #4 - bl sub_02006F88 - str r0, [r4, #0] - mov r1, #0 - str r1, [r4, #0x3c] - add r4, #0x28 - add r0, r4, #0 - mov r2, #8 - mov r3, #0x13 - bl ov5_021F02B8 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021F00B8 ; =0x00000648 - bl sub_02005748 - pop {r4, pc} - nop -_021F00B8: .word 0x00000648 - thumb_func_end ov5_021F007C - - thumb_func_start ov5_021F00BC -ov5_021F00BC: ; 0x021F00BC - push {r4, lr} - add r4, r2, #0 - mov r0, #0x41 - mov r1, #0x37 - add r2, r4, #4 - mov r3, #4 - bl sub_02006F88 - str r0, [r4, #0] - add r0, r4, #0 - mov r2, #0 - add r0, #0x28 - mov r1, #8 - mov r3, #0x13 - str r2, [r4, #0x3c] - bl ov5_021F02B8 - mov r0, #0 - str r0, [r4, #0x3c] - pop {r4, pc} - thumb_func_end ov5_021F00BC - - thumb_func_start ov5_021F00E4 -ov5_021F00E4: ; 0x021F00E4 - ldr r3, _021F00EC ; =sub_020181C4 - ldr r0, [r2, #0] - bx r3 - nop -_021F00EC: .word sub_020181C4 - thumb_func_end ov5_021F00E4 - - thumb_func_start ov5_021F00F0 -ov5_021F00F0: ; 0x021F00F0 - push {r3, r4, lr} - sub sp, #4 - add r4, r2, #0 - ldr r0, [r4, #0x3c] - cmp r0, #1 - beq _021F0132 - add r0, r4, #0 - add r0, #0x28 - bl ov5_021F02C8 - cmp r0, #0 - beq _021F010C - mov r0, #1 - str r0, [r4, #0x3c] -_021F010C: - ldr r0, _021F0138 ; =0x00005D5F - add r1, r4, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r3, [r4, #0x28] - ldr r0, [r0, #0xc] - lsl r3, r3, #0x18 - add r1, #8 - mov r2, #1 - lsr r3, r3, #0x18 - bl sub_020039F8 - add r4, #8 - mov r0, #2 - add r1, r4, #0 - mov r2, #0x20 - mov r3, #0xc0 - bl sub_0201972C -_021F0132: - add sp, #4 - pop {r3, r4, pc} - nop -_021F0138: .word 0x00005D5F - thumb_func_end ov5_021F00F0 - - thumb_func_start ov5_021F013C -ov5_021F013C: ; 0x021F013C - push {r3, r4, lr} - sub sp, #4 - ldr r0, [r1, #8] - add r4, r2, #0 - bl ov5_021F0260 - add r0, r4, #0 - mov r1, #0 - mov r2, #0xa - mov r3, #0x13 - bl ov5_021F02B8 - mov r3, #0 - str r3, [r4, #0x14] - mov r0, #0x10 - str r0, [sp] - ldr r0, _021F0180 ; =0x04000050 - mov r1, #4 - mov r2, #0x29 - bl sub_020BF55C - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _021F0184 ; =0x00000648 - bl sub_02005748 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_021F0180: .word 0x04000050 -_021F0184: .word 0x00000648 - thumb_func_end ov5_021F013C - - thumb_func_start ov5_021F0188 -ov5_021F0188: ; 0x021F0188 - push {r3, r4, lr} - sub sp, #4 - ldr r0, [r1, #8] - add r4, r2, #0 - bl ov5_021F0260 - add r0, r4, #0 - mov r1, #0xa - mov r2, #0 - mov r3, #0xf - bl ov5_021F02B8 - mov r0, #0 - str r0, [r4, #0x14] - mov r0, #6 - str r0, [sp] - ldr r0, _021F01B8 ; =0x04000050 - mov r1, #4 - mov r2, #0x21 - mov r3, #0xa - bl sub_020BF55C - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_021F01B8: .word 0x04000050 - thumb_func_end ov5_021F0188 - - thumb_func_start ov5_021F01BC -ov5_021F01BC: ; 0x021F01BC - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F01BC - - thumb_func_start ov5_021F01C0 -ov5_021F01C0: ; 0x021F01C0 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0x14] - cmp r0, #1 - beq _021F01E6 - add r0, r4, #0 - bl ov5_021F02C8 - cmp r0, #0 - beq _021F01D8 - mov r0, #1 - str r0, [r4, #0x14] -_021F01D8: - ldr r1, [r4, #0] - mov r0, #0x10 - sub r0, r0, r1 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _021F01E8 ; =0x04000052 - strh r1, [r0] -_021F01E6: - pop {r4, pc} - ; .align 2, 0 -_021F01E8: .word 0x04000052 - thumb_func_end ov5_021F01C0 - - thumb_func_start ov5_021F01EC -ov5_021F01EC: ; 0x021F01EC - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F01EC - - thumb_func_start ov5_021F01F0 -ov5_021F01F0: ; 0x021F01F0 - ldr r0, [r0, #4] - ldr r3, _021F01FC ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _021F0200 ; =0x021FF658 - bx r3 - nop -_021F01FC: .word ov5_021D1B6C -_021F0200: .word 0x021FF658 - thumb_func_end ov5_021F01F0 - - thumb_func_start ov5_021F0204 -ov5_021F0204: ; 0x021F0204 - ldr r0, [r0, #4] - ldr r3, _021F0210 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _021F0214 ; =0x021FF610 - bx r3 - nop -_021F0210: .word ov5_021D1B6C -_021F0214: .word 0x021FF610 - thumb_func_end ov5_021F0204 - - thumb_func_start ov5_021F0218 -ov5_021F0218: ; 0x021F0218 - ldr r3, _021F021C ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_021F021C: .word ov5_021D1BEC - thumb_func_end ov5_021F0218 - - thumb_func_start ov5_021F0220 -ov5_021F0220: ; 0x021F0220 - push {r3, lr} - bl ov5_021D1C2C - ldr r0, [r0, #0x14] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0220 - - thumb_func_start ov5_021F022C -ov5_021F022C: ; 0x021F022C - ldr r0, [r0, #4] - ldr r3, _021F0238 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _021F023C ; =0x021FF628 - bx r3 - nop -_021F0238: .word ov5_021D1B6C -_021F023C: .word 0x021FF628 - thumb_func_end ov5_021F022C - - thumb_func_start ov5_021F0240 -ov5_021F0240: ; 0x021F0240 - ldr r0, [r0, #4] - ldr r3, _021F024C ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _021F0250 ; =0x021FF640 - bx r3 - nop -_021F024C: .word ov5_021D1B6C -_021F0250: .word 0x021FF640 - thumb_func_end ov5_021F0240 - - thumb_func_start ov5_021F0254 -ov5_021F0254: ; 0x021F0254 - push {r3, lr} - bl ov5_021D1C2C - ldr r0, [r0, #0x3c] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0254 - - thumb_func_start ov5_021F0260 -ov5_021F0260: ; 0x021F0260 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r1, _021F02B0 ; =0x00005D5F - add r5, r0, #0 - add r0, sp, #4 - strh r1, [r0] - mov r0, #2 - add r1, sp, #4 - add r2, r0, #0 - mov r3, #0xc2 - bl sub_0201972C - mov r0, #4 - mov r1, #0x20 - bl sub_02018144 - mov r1, #0x11 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #2 - add r2, r4, #0 - mov r3, #0x20 - bl sub_0201958C - add r0, r4, #0 - bl sub_020181C4 - ldr r2, _021F02B4 ; =0x00006001 - add r0, r5, #0 - mov r1, #2 - bl sub_02019EE0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_021F02B0: .word 0x00005D5F -_021F02B4: .word 0x00006001 - thumb_func_end ov5_021F0260 - - thumb_func_start ov5_021F02B8 -ov5_021F02B8: ; 0x021F02B8 - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0x10] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov5_021F02B8 - - thumb_func_start ov5_021F02C8 -ov5_021F02C8: ; 0x021F02C8 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - ldr r0, [r4, #0xc] - mul r0, r1 - ldr r1, [r4, #0x10] - bl sub_020E1F6C - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r0, #1 - cmp r0, r1 - bgt _021F02EE - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_021F02EE: - str r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021F02C8 - - thumb_func_start ov5_021F02F4 -ov5_021F02F4: ; 0x021F02F4 - ldr r3, _021F02FC ; =sub_0201975C - mov r0, #2 - mov r1, #0 - bx r3 - ; .align 2, 0 -_021F02FC: .word sub_0201975C - thumb_func_end ov5_021F02F4 - - thumb_func_start ov5_021F0300 -ov5_021F0300: ; 0x021F0300 - ldr r3, _021F0308 ; =sub_0201975C - mov r0, #2 - ldr r1, _021F030C ; =0x00007FFF - bx r3 - ; .align 2, 0 -_021F0308: .word sub_0201975C -_021F030C: .word 0x00007FFF - thumb_func_end ov5_021F0300 - - thumb_func_start ov5_021F0310 -ov5_021F0310: ; 0x021F0310 - push {r4, lr} - sub sp, #8 - ldr r1, _021F0368 ; =0x00007FFF - add r4, r0, #0 - add r0, sp, #4 - strh r1, [r0] - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r1, _021F036C ; =0x0400000C - mov r0, #3 - ldrh r2, [r1] - mov r3, #0xc4 - bic r2, r0 - mov r0, #3 - orr r0, r2 - strh r0, [r1] - mov r0, #2 - add r1, sp, #4 - add r2, r0, #0 - bl sub_0201972C - mov r1, #2 - str r1, [sp] - ldr r0, [r4, #8] - add r2, r1, #0 - mov r3, #1 - bl sub_020196C0 - ldr r0, [r4, #8] - ldr r2, _021F0370 ; =0x00006002 - mov r1, #2 - bl sub_02019EE0 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r4, #0 - bl ov5_021F02F4 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_021F0368: .word 0x00007FFF -_021F036C: .word 0x0400000C -_021F0370: .word 0x00006002 - thumb_func_end ov5_021F0310 - - thumb_func_start ov5_021F0374 -ov5_021F0374: ; 0x021F0374 - push {r4, lr} - sub sp, #8 - ldr r1, _021F03CC ; =0x00007FFF - add r4, r0, #0 - add r0, sp, #4 - strh r1, [r0] - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - ldr r1, _021F03D0 ; =0x0400000E - mov r0, #3 - ldrh r2, [r1] - mov r3, #0xc4 - bic r2, r0 - mov r0, #3 - orr r2, r0 - strh r2, [r1] - add r1, sp, #4 - mov r2, #2 - bl sub_0201972C - mov r2, #2 - str r2, [sp] - ldr r0, [r4, #8] - mov r1, #3 - mov r3, #1 - bl sub_020196C0 - ldr r0, [r4, #8] - ldr r2, _021F03D4 ; =0x00006002 - mov r1, #3 - bl sub_02019EE0 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - add r0, r4, #0 - bl ov5_021F02F4 - add sp, #8 - pop {r4, pc} - nop -_021F03CC: .word 0x00007FFF -_021F03D0: .word 0x0400000E -_021F03D4: .word 0x00006002 - thumb_func_end ov5_021F0374 - - thumb_func_start ov5_021F03D8 -ov5_021F03D8: ; 0x021F03D8 - push {r3, lr} - ldr r0, [r0, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - bne _021F03E6 - mov r0, #0 - pop {r3, pc} -_021F03E6: - bl ov5_021D5FE0 - ldr r3, _021F0404 ; =0x021FF608 - mov r2, #0 -_021F03EE: - ldr r1, [r3, #0] - cmp r0, r1 - bne _021F03F8 - mov r0, #1 - pop {r3, pc} -_021F03F8: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, #1 - blo _021F03EE - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021F0404: .word 0x021FF608 - thumb_func_end ov5_021F03D8 - - thumb_func_start ov5_021F0408 -ov5_021F0408: ; 0x021F0408 - push {r3, lr} - ldr r0, [r0, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - bne _021F0416 - mov r0, #0 - pop {r3, pc} -_021F0416: - bl ov5_021D5FE0 - ldr r3, _021F0434 ; =0x021FF60C - mov r2, #0 -_021F041E: - ldr r1, [r3, #0] - cmp r0, r1 - bne _021F0428 - mov r0, #1 - pop {r3, pc} -_021F0428: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, #1 - blt _021F041E - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_021F0434: .word 0x021FF60C - thumb_func_end ov5_021F0408 - - thumb_func_start ov5_021F0438 -ov5_021F0438: ; 0x021F0438 - push {r3, lr} - ldr r0, [r0, #4] - ldr r0, [r0, #0xc] - cmp r0, #0 - bne _021F0446 - mov r0, #0 - pop {r3, pc} -_021F0446: - bl ov5_021D5FE0 - ldr r3, _021F0464 ; =0x021FF670 - mov r2, #0 -_021F044E: - ldr r1, [r3, #0] - cmp r0, r1 - bne _021F0458 - mov r0, #0 - pop {r3, pc} -_021F0458: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, #0x12 - blt _021F044E - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 -_021F0464: .word 0x021FF670 - thumb_func_end ov5_021F0438 - - thumb_func_start ov5_021F0468 -ov5_021F0468: ; 0x021F0468 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F047A - bl ov5_021F0218 - mov r0, #0 - str r0, [r4, #0] -_021F047A: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0468 - - thumb_func_start ov5_021F0484 -ov5_021F0484: ; 0x021F0484 - mov r0, #0x10 - bx lr - thumb_func_end ov5_021F0484 - - thumb_func_start ov5_021F0488 -ov5_021F0488: ; 0x021F0488 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r4, r0, #0 - ldrh r1, [r4, #0xc] - cmp r1, #9 - bls _021F04A2 - b _021F0668 -_021F04A2: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021F04AE: ; jump table - .short _021F04C2 - _021F04AE - 2 ; case 0 - .short _021F04F6 - _021F04AE - 2 ; case 1 - .short _021F0520 - _021F04AE - 2 ; case 2 - .short _021F0540 - _021F04AE - 2 ; case 3 - .short _021F0594 - _021F04AE - 2 ; case 4 - .short _021F05B6 - _021F04AE - 2 ; case 5 - .short _021F0600 - _021F04AE - 2 ; case 6 - .short _021F0622 - _021F04AE - 2 ; case 7 - .short _021F0642 - _021F04AE - 2 ; case 8 - .short _021F0654 - _021F04AE - 2 ; case 9 -_021F04C2: - add r0, r5, #0 - bl ov5_021F0438 - cmp r0, #1 - bne _021F04EC - mov r0, #1 - strh r0, [r4, #0xc] - add r0, r5, #0 - bl ov5_021F03D8 - str r0, [r4, #8] - add r0, r5, #0 - bl ov5_021F0408 - str r0, [r4, #4] - cmp r0, #0 - beq _021F055C - add r0, r5, #0 - bl ov5_021F0300 - b _021F066C -_021F04EC: - mov r0, #7 - strh r0, [r4, #0xc] - mov r0, #0x14 - strh r0, [r4, #0xe] - b _021F066C -_021F04F6: - ldr r0, [r4, #8] - cmp r0, #0 - bne _021F0504 - add r0, r5, #0 - bl ov5_021F01F0 - b _021F050A -_021F0504: - add r0, r5, #0 - bl ov5_021F022C -_021F050A: - str r0, [r4, #0] - mov r0, #2 - mov r1, #0 - strh r0, [r4, #0xc] - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _021F066C -_021F0520: - ldr r0, [r4, #8] - cmp r0, #0 - ldr r0, [r4, #0] - bne _021F052E - bl ov5_021F0220 - b _021F0532 -_021F052E: - bl ov5_021F0254 -_021F0532: - cmp r0, #1 - bne _021F055C - mov r0, #0x16 - strh r0, [r4, #0xe] - mov r0, #3 - strh r0, [r4, #0xc] - b _021F066C -_021F0540: - mov r0, #0xe - ldrsh r0, [r4, r0] - sub r0, r0, #1 - strh r0, [r4, #0xe] - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A0EC - cmp r0, #0 - beq _021F058E - mov r0, #0xe - ldrsh r0, [r4, r0] - cmp r0, #0 - blt _021F055E -_021F055C: - b _021F066C -_021F055E: - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_02054F94 - add r1, r0, #0 - add r0, r5, #0 - bl ov6_02242110 - cmp r0, #0 - beq _021F0588 - mov r0, #6 - strh r0, [r4, #0xc] - b _021F066C -_021F0588: - mov r0, #4 - strh r0, [r4, #0xc] - b _021F066C -_021F058E: - mov r0, #4 - strh r0, [r4, #0xc] - b _021F066C -_021F0594: - ldr r0, [r4, #0] - bl ov5_021F0218 - ldr r0, [r4, #8] - cmp r0, #0 - bne _021F05A8 - add r0, r5, #0 - bl ov5_021F0204 - b _021F05AE -_021F05A8: - add r0, r5, #0 - bl ov5_021F0240 -_021F05AE: - str r0, [r4, #0] - mov r0, #5 - strh r0, [r4, #0xc] - b _021F066C -_021F05B6: - ldr r0, [r4, #8] - cmp r0, #0 - ldr r0, [r4, #0] - bne _021F05C4 - bl ov5_021F0220 - b _021F05C8 -_021F05C4: - bl ov5_021F0254 -_021F05C8: - cmp r0, #1 - bne _021F066C - ldr r0, [r4, #8] - cmp r0, #0 - bne _021F05F2 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _021F0670 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - mov r0, #2 - mov r1, #3 - bl sub_02019060 - ldr r0, [r5, #8] - mov r1, #2 - bl sub_02019EBC - b _021F05FA -_021F05F2: - mov r0, #2 - mov r1, #1 - bl sub_02019060 -_021F05FA: - mov r0, #8 - strh r0, [r4, #0xc] - b _021F066C -_021F0600: - bl ov5_021F0468 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021F0610 - add r0, r5, #0 - bl ov5_021F0374 -_021F0610: - add r0, r5, #0 - add r1, r6, #0 - bl ov6_022411C8 - cmp r0, #0 - bne _021F066C - bl sub_02022974 - b _021F066C -_021F0622: - mov r0, #0xe - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, #0xe] - ldrsh r0, [r4, r0] - cmp r0, #0 - bge _021F066C - mov r2, #0 - ldr r1, _021F0674 ; =0x000007ED - add r0, r6, #0 - add r3, r2, #0 - bl sub_0203E8E0 - mov r0, #9 - strh r0, [r4, #0xc] - b _021F066C -_021F0642: - mov r2, #0 - ldr r1, _021F0678 ; =0x000007EC - add r0, r6, #0 - add r3, r2, #0 - bl sub_0203E8E0 - mov r0, #9 - strh r0, [r4, #0xc] - b _021F066C -_021F0654: - bl ov5_021F0468 - ldr r0, [r4, #4] - cmp r0, #0 - beq _021F0664 - add r0, r5, #0 - bl ov5_021F0310 -_021F0664: - mov r0, #1 - pop {r4, r5, r6, pc} -_021F0668: - bl sub_02022974 -_021F066C: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F0670: .word 0x04000050 -_021F0674: .word 0x000007ED -_021F0678: .word 0x000007EC - thumb_func_end ov5_021F0488 - - thumb_func_start ov5_021F067C -ov5_021F067C: ; 0x021F067C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r2, #0 - lsl r2, r3, #3 - add r6, r5, r2 - add r6, #0x18 - str r2, [sp, #8] - add r2, r6, #0 - str r0, [sp] - add r7, r1, #0 - str r3, [sp, #4] - bl sub_02017FC8 - cmp r0, #1 - beq _021F069E - bl sub_02022974 -_021F069E: - sub r5, r6, r5 - add r0, r7, #0 - add r1, r5, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021F06B0 - bl sub_02022974 -_021F06B0: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - ldr r0, [sp] - str r0, [r4, #0] - ldr r0, [sp, #4] - str r7, [r4, #4] - str r0, [r4, #8] - ldr r0, [sp, #8] - str r6, [r4, #0xc] - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0x18 - str r0, [r4, #0x14] - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F067C - - thumb_func_start ov5_021F06D8 -ov5_021F06D8: ; 0x021F06D8 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r4, [r6, #8] - ldr r5, [r6, #0x14] - cmp r4, #0 - beq _021F06FA -_021F06E4: - ldr r0, [r5, #0] - cmp r0, #0 - beq _021F06F2 - ldr r1, [r5, #4] - add r0, r6, #0 - bl ov5_021F0740 -_021F06F2: - sub r4, r4, #1 - add r5, #8 - cmp r4, #0 - bne _021F06E4 -_021F06FA: - ldr r4, [r6, #4] - add r0, r6, #0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0201807C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F06D8 - - thumb_func_start ov5_021F070C -ov5_021F070C: ; 0x021F070C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021F07FC - str r0, [sp] - cmp r0, #0 - bne _021F0724 - bl sub_02022974 -_021F0724: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov5_021F07B4 - add r5, r0, #0 - ldr r0, [sp] - add r1, r4, #0 - add r2, r5, #0 - bl ov5_021F0814 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F070C - - thumb_func_start ov5_021F0740 -ov5_021F0740: ; 0x021F0740 - push {r4, lr} - bl ov5_021F07DC - add r4, r0, #0 - bne _021F074E - bl sub_02022974 -_021F074E: - ldr r0, [r4, #0] - bl ov5_021F07D4 - add r0, r4, #0 - bl ov5_021F081C - pop {r4, pc} - thumb_func_end ov5_021F0740 - - thumb_func_start ov5_021F075C -ov5_021F075C: ; 0x021F075C - push {r4, lr} - bl ov5_021F07DC - add r4, r0, #0 - bne _021F076A - bl sub_02022974 -_021F076A: - ldr r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F075C - - thumb_func_start ov5_021F0770 -ov5_021F0770: ; 0x021F0770 - push {r3, lr} - bl ov5_021F07DC - cmp r0, #0 - beq _021F077E - mov r0, #1 - pop {r3, pc} -_021F077E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0770 - - thumb_func_start ov5_021F0784 -ov5_021F0784: ; 0x021F0784 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r5, r0, #0 - add r7, r3, #0 - add r6, r1, #0 - add r0, r4, #0 - add r1, r7, #0 - bl sub_02006D84 - add r2, r0, #0 - ldr r3, [sp, #0x18] - add r0, r5, #0 - add r1, r6, #0 - bl ov5_021F070C - add r5, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_02006D28 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0784 - - thumb_func_start ov5_021F07B4 -ov5_021F07B4: ; 0x021F07B4 - push {r4, lr} - cmp r2, #0 - ldr r0, [r0, #4] - bne _021F07C2 - bl sub_02018144 - b _021F07C6 -_021F07C2: - bl sub_02018184 -_021F07C6: - add r4, r0, #0 - cmp r4, #0 - bne _021F07D0 - bl sub_02022974 -_021F07D0: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov5_021F07B4 - - thumb_func_start ov5_021F07D4 -ov5_021F07D4: ; 0x021F07D4 - ldr r3, _021F07D8 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_021F07D8: .word sub_020181C4 - thumb_func_end ov5_021F07D4 - - thumb_func_start ov5_021F07DC -ov5_021F07DC: ; 0x021F07DC - ldr r3, [r0, #8] - ldr r0, [r0, #0x14] - cmp r3, #0 - beq _021F07F6 -_021F07E4: - ldr r2, [r0, #0] - cmp r2, #0 - beq _021F07F0 - ldr r2, [r0, #4] - cmp r2, r1 - beq _021F07F8 -_021F07F0: - add r0, #8 - sub r3, r3, #1 - bne _021F07E4 -_021F07F6: - mov r0, #0 -_021F07F8: - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F07DC - - thumb_func_start ov5_021F07FC -ov5_021F07FC: ; 0x021F07FC - ldr r2, [r0, #8] - ldr r0, [r0, #0x14] - cmp r2, #0 - beq _021F0810 -_021F0804: - ldr r1, [r0, #0] - cmp r1, #0 - beq _021F0812 - add r0, #8 - sub r2, r2, #1 - bne _021F0804 -_021F0810: - mov r0, #0 -_021F0812: - bx lr - thumb_func_end ov5_021F07FC - - thumb_func_start ov5_021F0814 -ov5_021F0814: ; 0x021F0814 - str r2, [r0, #0] - str r1, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F0814 - - thumb_func_start ov5_021F081C -ov5_021F081C: ; 0x021F081C - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #4] - bx lr - thumb_func_end ov5_021F081C - - thumb_func_start ov5_021F0824 -ov5_021F0824: ; 0x021F0824 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r6, r0, #0 - ldr r0, [r6, #0xc] - bl sub_0205A080 - add r7, r0, #0 - beq _021F08C8 - bl ov23_02242E28 - add r4, r0, #0 - bl ov23_02242E40 - lsl r1, r4, #0x15 - lsl r0, r0, #0x15 - mov r5, #0 - str r1, [sp, #0xc] - str r0, [sp, #8] -_021F0848: - add r0, r7, #0 - add r1, r5, #0 - bl sub_020293B0 - add r4, r0, #0 - bl sub_020573FC - str r0, [sp, #0x10] - add r0, r4, #0 - bl sub_0205740C - str r0, [sp, #0x14] - cmp r4, #0 - beq _021F08C2 - add r0, r7, #0 - add r1, r5, #0 - bl sub_020293FC - str r0, [sp, #0x18] - add r0, r7, #0 - add r1, r5, #0 - bl sub_0202942C - mov r2, #1 - ldr r1, [sp, #0x18] - lsl r2, r2, #0xc - str r2, [sp, #0x20] - lsl r1, r1, #0x10 - lsl r0, r0, #0x10 - ldr r2, [sp, #0xc] - str r1, [sp, #0x1c] - add r1, r1, r2 - ldr r2, [sp, #8] - str r0, [sp, #0x24] - add r0, r0, r2 - ldr r2, [sp, #0x10] - str r1, [sp, #0x1c] - lsl r2, r2, #0xf - add r1, r1, r2 - str r1, [sp, #0x1c] - ldr r1, [sp, #0x14] - str r0, [sp, #0x24] - lsl r1, r1, #0xf - add r0, r0, r1 - str r0, [sp, #0x24] - ldr r0, [r6, #0x30] - add r1, r4, #0 - bl ov5_021EFAE8 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r6, #0x50] - add r3, sp, #0x1c - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r6, #0x30] - bl ov5_021E19CC -_021F08C2: - add r5, r5, #1 - cmp r5, #0x20 - blt _021F0848 -_021F08C8: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F0824 - - thumb_func_start ov5_021F08CC -ov5_021F08CC: ; 0x021F08CC - push {r3, r4, r5, lr} - add r0, r1, #0 - mov r1, #0x18 - add r5, r2, #0 - bl sub_02018184 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x18 - mov r0, #0 -_021F08E0: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _021F08E0 - add r0, r5, #0 - str r5, [r4, #0xc] - bl ov5_021F0E58 - str r0, [r4, #4] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F08CC - - thumb_func_start ov5_021F08F8 -ov5_021F08F8: ; 0x021F08F8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_02050A60 - add r4, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r5, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _021F0916 - cmp r0, #1 - beq _021F0942 - b _021F09B0 -_021F0916: - ldr r0, [r4, #0x38] - bl sub_02062C48 - mov r0, #0 - str r0, [r5, #0x10] - add r2, r5, #0 - ldr r1, [r5, #0xc] - add r0, r4, #0 - add r2, #0x10 - bl ov6_0224106C - str r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r5, #8] - add r0, r4, #0 - bl ov5_021F09B4 - str r0, [r5, #0x14] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _021F09B0 -_021F0942: - ldr r0, [r5, #0x14] - bl ov5_021F09D8 - cmp r0, #1 - bne _021F09B0 - ldr r0, [r5, #0x14] - bl ov5_021F09E4 - add r7, r0, #0 - ldr r0, [r5, #0x14] - bl ov5_021F09F0 - cmp r7, #1 - ldr r0, [r5, #0x10] - bne _021F0998 - ldr r0, [r0, #8] - mov r1, #0 - bl sub_0207A0FC - ldr r2, [r5, #4] - add r3, r0, #0 - lsl r2, r2, #0x10 - add r0, r4, #0 - mov r1, #1 - lsr r2, r2, #0x10 - bl sub_0206D340 - ldr r0, [r4, #0xc] - bl sub_0202CD88 - mov r1, #0xa - bl sub_0202CF28 - ldr r2, [r5, #0x10] - add r0, r4, #0 - add r1, r6, #0 - bl sub_02050E78 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021F0998: - cmp r0, #0 - beq _021F09A0 - bl sub_020520A4 -_021F09A0: - ldr r0, [r4, #0x38] - bl sub_02062C78 - add r0, r5, #0 - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021F09B0: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F08F8 - - thumb_func_start ov5_021F09B4 -ov5_021F09B4: ; 0x021F09B4 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x4c - add r4, r1, #0 - add r6, r2, #0 - bl ov5_021F0D1C - add r1, r0, #0 - str r5, [r1, #0x20] - str r4, [r1, #0x1c] - ldr r0, _021F09D4 ; =ov5_021F0A04 - mov r2, #0x80 - str r6, [r1, #0] - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F09D4: .word ov5_021F0A04 - thumb_func_end ov5_021F09B4 - - thumb_func_start ov5_021F09D8 -ov5_021F09D8: ; 0x021F09D8 - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #4] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F09D8 - - thumb_func_start ov5_021F09E4 -ov5_021F09E4: ; 0x021F09E4 - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #8] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F09E4 - - thumb_func_start ov5_021F09F0 -ov5_021F09F0: ; 0x021F09F0 - push {r4, lr} - add r4, r0, #0 - bl sub_0201CED0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov5_021F09F0 - - thumb_func_start ov5_021F0A04 -ov5_021F0A04: ; 0x021F0A04 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r0, [r5, #0x20] - ldr r6, [r0, #0x3c] - add r0, r6, #0 - bl sub_0205EB3C - ldr r7, _021F0A2C ; =0x021FFA0C - add r4, r0, #0 -_021F0A16: - ldr r3, [r5, #0xc] - add r0, r5, #0 - lsl r3, r3, #2 - ldr r3, [r7, r3] - add r1, r6, #0 - add r2, r4, #0 - blx r3 - cmp r0, #0 - bne _021F0A16 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F0A2C: .word 0x021FFA0C - thumb_func_end ov5_021F0A04 - - thumb_func_start ov5_021F0A30 -ov5_021F0A30: ; 0x021F0A30 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r0, #0 - bl ov5_021F0D6C - add r0, r4, #0 - bl sub_02062DDC - mov r0, #1 - str r0, [r5, #0xc] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0A30 - - thumb_func_start ov5_021F0A48 -ov5_021F0A48: ; 0x021F0A48 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r1, #0 - bl sub_020655F4 - cmp r0, #1 - bne _021F0A7A - add r0, r6, #0 - bl sub_020656AC - add r0, r4, #0 - mov r1, #0x20 - bl ov5_021DFB54 - add r0, r4, #0 - bl ov5_021DFB5C - add r0, r6, #0 - mov r1, #1 - bl sub_02062A0C - mov r0, #2 - str r0, [r5, #0xc] -_021F0A7A: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0A48 - - thumb_func_start ov5_021F0A80 -ov5_021F0A80: ; 0x021F0A80 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #0xa - bne _021F0A96 - mov r0, #0x65 - lsl r0, r0, #4 - bl sub_02005748 -_021F0A96: - ldr r0, [r4, #0x10] - cmp r0, #0x22 - bge _021F0AA0 - mov r0, #0 - pop {r4, pc} -_021F0AA0: - ldr r0, [r4, #0] - cmp r0, #1 - bne _021F0AAA - mov r0, #3 - b _021F0AAC -_021F0AAA: - mov r0, #0xc -_021F0AAC: - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0A80 - - thumb_func_start ov5_021F0AB8 -ov5_021F0AB8: ; 0x021F0AB8 - push {r4, lr} - add r4, r0, #0 - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r0, r0, #0x1e - sub r0, r0, r1 - mov r2, #0x1e - ror r0, r2 - add r0, r1, r0 - add r0, r0, #1 - add r1, r0, #0 - mul r1, r2 - str r1, [r4, #0x14] - ldr r0, [r4, #0x1c] - lsl r1, r0, #2 - ldr r0, _021F0AE8 ; =0x021FFA00 - ldr r0, [r0, r1] - str r0, [r4, #0x18] - mov r0, #4 - str r0, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - nop -_021F0AE8: .word 0x021FFA00 - thumb_func_end ov5_021F0AB8 - - thumb_func_start ov5_021F0AEC -ov5_021F0AEC: ; 0x021F0AEC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x14] - add r4, r2, #0 - sub r0, r0, #1 - str r0, [r5, #0x14] - bl ov5_021F0D40 - cmp r0, #1 - bne _021F0B08 - mov r0, #0xa - str r0, [r5, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} -_021F0B08: - ldr r0, [r5, #0x14] - cmp r0, #0 - ble _021F0B12 - mov r0, #0 - pop {r3, r4, r5, pc} -_021F0B12: - add r0, r4, #0 - mov r1, #2 - bl sub_02062A0C - mov r1, #0 - add r0, r4, #0 - mov r2, #1 - add r3, r1, #0 - bl ov5_021F5D8C - str r0, [r5, #0x24] - mov r0, #5 - str r0, [r5, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F0AEC - - thumb_func_start ov5_021F0B30 -ov5_021F0B30: ; 0x021F0B30 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - sub r0, r0, #1 - str r0, [r4, #0x18] - bl ov5_021F0D40 - cmp r0, #1 - bne _021F0B4A - mov r0, #6 - str r0, [r4, #0xc] - mov r0, #1 - pop {r4, pc} -_021F0B4A: - ldr r0, [r4, #0x18] - cmp r0, #0 - ble _021F0B54 - mov r0, #0 - pop {r4, pc} -_021F0B54: - mov r0, #0xb - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021F0B30 - - thumb_func_start ov5_021F0B5C -ov5_021F0B5C: ; 0x021F0B5C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - add r5, r2, #0 - bl ov5_021F5C58 - add r0, r5, #0 - mov r1, #3 - bl sub_02062A0C - mov r0, #0 - str r0, [r4, #0x10] - mov r1, #7 - str r1, [r4, #0xc] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0B5C - - thumb_func_start ov5_021F0B7C -ov5_021F0B7C: ; 0x021F0B7C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - add r0, r0, #1 - str r0, [r4, #0x10] - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021F0B94 - bl sub_0207136C - mov r0, #0 - str r0, [r4, #0x24] -_021F0B94: - ldr r0, [r4, #0x10] - cmp r0, #0xf - ble _021F0BAA - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #8 - str r0, [r4, #0xc] - add r0, r4, #0 - mov r1, #0x39 - bl ov5_021F0DE8 -_021F0BAA: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0B7C - - thumb_func_start ov5_021F0BB0 -ov5_021F0BB0: ; 0x021F0BB0 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F0E24 - cmp r0, #0 - bne _021F0BC0 - mov r0, #0 - pop {r4, pc} -_021F0BC0: - mov r0, #9 - str r0, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021F0BB0 - - thumb_func_start ov5_021F0BC8 -ov5_021F0BC8: ; 0x021F0BC8 - mov r2, #1 - str r2, [r0, #8] - mov r1, #0xf - str r1, [r0, #0xc] - add r0, r2, #0 - bx lr - thumb_func_end ov5_021F0BC8 - - thumb_func_start ov5_021F0BD4 -ov5_021F0BD4: ; 0x021F0BD4 - push {r4, lr} - add r4, r0, #0 - add r0, r2, #0 - mov r1, #0 - bl sub_02062A0C - add r0, r4, #0 - mov r1, #0x38 - bl ov5_021F0DE8 - mov r0, #0x10 - str r0, [r4, #0x10] - mov r0, #0xe - str r0, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021F0BD4 - - thumb_func_start ov5_021F0BF4 -ov5_021F0BF4: ; 0x021F0BF4 - push {r4, lr} - add r4, r0, #0 - add r0, r2, #0 - mov r1, #0 - bl sub_02062A0C - add r0, r4, #0 - mov r1, #0x37 - bl ov5_021F0DE8 - mov r0, #0x10 - str r0, [r4, #0x10] - mov r0, #0xe - str r0, [r4, #0xc] - ldr r0, [r4, #0x20] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - mov r1, #0x64 - bl sub_0202CF28 - ldr r0, [r4, #0x1c] - bl ov5_021F0E58 - add r2, r0, #0 - mov r1, #0 - ldr r0, [r4, #0x20] - add r3, r1, #0 - bl sub_0206D340 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021F0BF4 - - thumb_func_start ov5_021F0C34 -ov5_021F0C34: ; 0x021F0C34 - mov r1, #0x78 - str r1, [r0, #0x10] - mov r1, #0xd - str r1, [r0, #0xc] - mov r0, #1 - bx lr - thumb_func_end ov5_021F0C34 - - thumb_func_start ov5_021F0C40 -ov5_021F0C40: ; 0x021F0C40 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r2, #0 - sub r0, r0, #1 - str r0, [r5, #0x10] - bl ov5_021F0D40 - cmp r0, #1 - bne _021F0C5C - mov r0, #0xa - str r0, [r5, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} -_021F0C5C: - ldr r0, [r5, #0x10] - cmp r0, #0 - beq _021F0C66 - mov r0, #0 - pop {r3, r4, r5, pc} -_021F0C66: - add r0, r4, #0 - mov r1, #0 - bl sub_02062A0C - add r0, r5, #0 - mov r1, #0x36 - bl ov5_021F0DE8 - mov r0, #0x10 - str r0, [r5, #0x10] - mov r0, #0xe - str r0, [r5, #0xc] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0C40 - - thumb_func_start ov5_021F0C84 -ov5_021F0C84: ; 0x021F0C84 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x10] - add r1, r1, #1 - str r1, [r4, #0x10] - cmp r1, #0x10 - bge _021F0C96 - mov r0, #0 - pop {r4, pc} -_021F0C96: - mov r1, #0x10 - str r1, [r4, #0x10] - bl ov5_021F0E24 - cmp r0, #0 - bne _021F0CA6 - mov r0, #0 - pop {r4, pc} -_021F0CA6: - mov r0, #0xf - str r0, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0C84 - - thumb_func_start ov5_021F0CB0 -ov5_021F0CB0: ; 0x021F0CB0 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - add r5, r1, #0 - cmp r0, #0 - beq _021F0CC0 - bl ov5_021F5C58 -_021F0CC0: - add r0, r4, #0 - bl ov5_021F0DA4 - add r0, r5, #0 - bl sub_0205EB74 - bl sub_0205EED8 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021DFB54 - add r0, r5, #0 - bl ov5_021DFB5C - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #0x10 - str r0, [r4, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0CB0 - - thumb_func_start ov5_021F0CEC -ov5_021F0CEC: ; 0x021F0CEC - ldr r1, [r0, #0x10] - add r1, r1, #1 - str r1, [r0, #0x10] - cmp r1, #2 - ble _021F0CFA - mov r1, #0x11 - str r1, [r0, #0xc] -_021F0CFA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F0CEC - - thumb_func_start ov5_021F0D00 -ov5_021F0D00: ; 0x021F0D00 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _021F0D12 - bl sub_0207136C - mov r0, #0 - str r0, [r4, #0x24] -_021F0D12: - mov r0, #1 - str r0, [r4, #4] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0D00 - - thumb_func_start ov5_021F0D1C -ov5_021F0D1C: ; 0x021F0D1C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #4 - add r1, r5, #0 - bl sub_02018184 - add r4, r0, #0 - bne _021F0D30 - bl sub_02022974 -_021F0D30: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0D1C - - thumb_func_start ov5_021F0D40 -ov5_021F0D40: ; 0x021F0D40 - ldr r0, _021F0D50 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r1, r0 - bne _021F0D4C - mov r0, #0 -_021F0D4C: - bx lr - nop -_021F0D50: .word 0x021BF67C - thumb_func_end ov5_021F0D40 - - thumb_func_start ov5_021F0D54 -ov5_021F0D54: ; 0x021F0D54 - ldr r0, _021F0D68 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _021F0D62 - mov r0, #1 - bx lr -_021F0D62: - mov r0, #0 - bx lr - nop -_021F0D68: .word 0x021BF67C - thumb_func_end ov5_021F0D54 - - thumb_func_start ov5_021F0D6C -ov5_021F0D6C: ; 0x021F0D6C - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - mov r1, #0x1a - mov r2, #0xd5 - mov r3, #4 - bl sub_0200B144 - str r0, [r4, #0x48] - mov r0, #1 - lsl r0, r0, #0xa - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x2c] - mov r0, #1 - lsl r0, r0, #0xa - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x30] - mov r0, #8 - mov r1, #0x40 - mov r2, #4 - bl sub_0200B368 - str r0, [r4, #0x34] - pop {r4, pc} - thumb_func_end ov5_021F0D6C - - thumb_func_start ov5_021F0DA4 -ov5_021F0DA4: ; 0x021F0DA4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x34] - bl sub_0200B3F0 - ldr r0, [r4, #0x2c] - bl sub_020237BC - ldr r0, [r4, #0x30] - bl sub_020237BC - ldr r0, [r4, #0x48] - bl sub_0200B190 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0DA4 - - thumb_func_start ov5_021F0DC4 -ov5_021F0DC4: ; 0x021F0DC4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r4, [r5, #0x20] - add r1, r5, #0 - ldr r0, [r4, #8] - add r1, #0x38 - mov r2, #3 - bl sub_0205D8F4 - ldr r0, [r4, #0xc] - bl sub_02025E44 - add r5, #0x38 - add r1, r0, #0 - add r0, r5, #0 - bl sub_0205D944 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F0DC4 - - thumb_func_start ov5_021F0DE8 -ov5_021F0DE8: ; 0x021F0DE8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021F0DC4 - ldr r0, [r5, #0x48] - ldr r2, [r5, #0x30] - add r1, r6, #0 - ldr r4, [r5, #0x20] - bl sub_0200B1B8 - ldr r0, [r5, #0x34] - ldr r1, [r5, #0x2c] - ldr r2, [r5, #0x30] - bl sub_0200C388 - ldr r0, [r4, #0xc] - bl sub_02025E44 - add r2, r0, #0 - add r0, r5, #0 - ldr r1, [r5, #0x2c] - add r0, #0x38 - mov r3, #1 - bl sub_0205D994 - add r5, #0x28 - strb r0, [r5] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0DE8 - - thumb_func_start ov5_021F0E24 -ov5_021F0E24: ; 0x021F0E24 - push {r4, lr} - add r4, r0, #0 - add r0, #0x28 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #1 - bne _021F0E52 - bl ov5_021F0D54 - cmp r0, #1 - bne _021F0E52 - add r0, r4, #0 - add r0, #0x38 - mov r1, #0 - bl sub_0200E084 - add r4, #0x38 - add r0, r4, #0 - bl sub_0201A8FC - mov r0, #1 - pop {r4, pc} -_021F0E52: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0E24 - - thumb_func_start ov5_021F0E58 -ov5_021F0E58: ; 0x021F0E58 - push {r3, lr} - cmp r0, #0 - beq _021F0E6A - cmp r0, #1 - beq _021F0E6E - cmp r0, #2 - beq _021F0E72 - bl sub_02022974 -_021F0E6A: - ldr r0, _021F0E78 ; =0x000001BD - pop {r3, pc} -_021F0E6E: - ldr r0, _021F0E7C ; =0x000001BE - pop {r3, pc} -_021F0E72: - ldr r0, _021F0E80 ; =0x000001BF - pop {r3, pc} - nop -_021F0E78: .word 0x000001BD -_021F0E7C: .word 0x000001BE -_021F0E80: .word 0x000001BF - thumb_func_end ov5_021F0E58 - - thumb_func_start ov5_021F0E84 -ov5_021F0E84: ; 0x021F0E84 - lsl r1, r0, #2 - ldr r0, _021F0E8C ; =0x021FFA54 - ldrh r0, [r0, r1] - bx lr - ; .align 2, 0 -_021F0E8C: .word 0x021FFA54 - thumb_func_end ov5_021F0E84 - - thumb_func_start ov5_021F0E90 -ov5_021F0E90: ; 0x021F0E90 - ldr r2, _021F0EA8 ; =0x000001E7 - cmp r0, r2 - bne _021F0E9E - cmp r1, #1 - bne _021F0E9E - mov r0, #0 - bx lr -_021F0E9E: - lsl r1, r0, #2 - ldr r0, _021F0EAC ; =0x021FFA56 - ldrh r0, [r0, r1] - bx lr - nop -_021F0EA8: .word 0x000001E7 -_021F0EAC: .word 0x021FFA56 - thumb_func_end ov5_021F0E90 - - thumb_func_start ov5_021F0EB0 -ov5_021F0EB0: ; 0x021F0EB0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0x34 - bl sub_02018184 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - str r6, [r4, #0] - mov r0, #0 - str r0, [r4, #0xc] - str r5, [r4, #0x2c] - ldr r0, [r5, #0x24] - str r0, [r4, #0x30] - bl sub_02020A90 - str r0, [r4, #0x10] - str r0, [r4, #0x20] - ldr r0, _021F0EE8 ; =ov5_021F0F2C - ldr r2, _021F0EEC ; =0x0000FFFF - add r1, r4, #0 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F0EE8: .word ov5_021F0F2C -_021F0EEC: .word 0x0000FFFF - thumb_func_end ov5_021F0EB0 - - thumb_func_start ov5_021F0EF0 -ov5_021F0EF0: ; 0x021F0EF0 - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #8] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0EF0 - - thumb_func_start ov5_021F0EFC -ov5_021F0EFC: ; 0x021F0EFC - push {r4, lr} - add r4, r0, #0 - bl sub_0201CED0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov5_021F0EFC - - thumb_func_start ov5_021F0F10 -ov5_021F0F10: ; 0x021F0F10 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0201CED0 - mov r1, #0 - str r1, [r0, #4] - str r1, [r0, #8] - str r5, [r0, #0xc] - str r4, [r0, #0x14] - str r6, [r0, #0x1c] - str r1, [r0, #0x24] - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F0F10 - - thumb_func_start ov5_021F0F2C -ov5_021F0F2C: ; 0x021F0F2C - push {r3, lr} - add r0, r1, #0 - ldr r1, [r1, #0xc] - lsl r2, r1, #2 - ldr r1, _021F0F3C ; =0x0220020C - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - ; .align 2, 0 -_021F0F3C: .word 0x0220020C - thumb_func_end ov5_021F0F2C - - thumb_func_start ov5_021F0F40 -ov5_021F0F40: ; 0x021F0F40 - mov r1, #1 - str r1, [r0, #8] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F0F40 - - thumb_func_start ov5_021F0F48 -ov5_021F0F48: ; 0x021F0F48 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - beq _021F0F58 - cmp r1, #1 - beq _021F0F62 - pop {r4, pc} -_021F0F58: - bl ov5_021F0FC8 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] -_021F0F62: - add r0, r4, #0 - bl ov5_021F0FF8 - cmp r0, #1 - bne _021F0F76 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #8] -_021F0F76: - add r0, r4, #0 - bl ov5_021F0FB8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0F48 - - thumb_func_start ov5_021F0F80 -ov5_021F0F80: ; 0x021F0F80 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - beq _021F0F90 - cmp r1, #1 - beq _021F0F9A - pop {r4, pc} -_021F0F90: - bl ov5_021F0FE0 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] -_021F0F9A: - add r0, r4, #0 - bl ov5_021F0FF8 - cmp r0, #1 - bne _021F0FAE - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #8] -_021F0FAE: - add r0, r4, #0 - bl ov5_021F0FB8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F0F80 - - thumb_func_start ov5_021F0FB8 -ov5_021F0FB8: ; 0x021F0FB8 - ldr r3, _021F0FC4 ; =sub_02020A50 - add r1, r0, #0 - ldr r0, [r1, #0x20] - ldr r1, [r1, #0x30] - bx r3 - nop -_021F0FC4: .word sub_02020A50 - thumb_func_end ov5_021F0FB8 - - thumb_func_start ov5_021F0FC8 -ov5_021F0FC8: ; 0x021F0FC8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x1c] - bl sub_020E1F6C - str r0, [r4, #0x28] - ldr r1, [r4, #0x20] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov5_021F0FC8 - - thumb_func_start ov5_021F0FE0 -ov5_021F0FE0: ; 0x021F0FE0 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x20] - sub r0, r1, r0 - ldr r1, [r4, #0x1c] - bl sub_020E1F6C - str r0, [r4, #0x28] - ldr r0, [r4, #0x10] - str r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov5_021F0FE0 - - thumb_func_start ov5_021F0FF8 -ov5_021F0FF8: ; 0x021F0FF8 - ldr r2, [r0, #0x20] - ldr r1, [r0, #0x28] - add r1, r2, r1 - str r1, [r0, #0x20] - ldr r1, [r0, #0x24] - add r2, r1, #1 - str r2, [r0, #0x24] - ldr r1, [r0, #0x1c] - cmp r2, r1 - blo _021F1016 - str r1, [r0, #0x24] - ldr r1, [r0, #0x18] - str r1, [r0, #0x20] - mov r0, #1 - bx lr -_021F1016: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F0FF8 - - thumb_func_start ov5_021F101C -ov5_021F101C: ; 0x021F101C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_02050A60 - str r0, [sp] - add r0, r7, #0 - bl sub_02050A64 - add r6, r0, #0 - add r0, r7, #0 - bl sub_02050A68 - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r6, #4] - cmp r0, #5 - bhi _021F10E0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F104A: ; jump table - .short _021F1056 - _021F104A - 2 ; case 0 - .short _021F1068 - _021F104A - 2 ; case 1 - .short _021F1088 - _021F104A - 2 ; case 2 - .short _021F10A6 - _021F104A - 2 ; case 3 - .short _021F10BE - _021F104A - 2 ; case 4 - .short _021F10D0 - _021F104A - 2 ; case 5 -_021F1056: - mov r0, #0xb - mov r1, #8 - bl sub_02018184 - str r0, [r6, #4] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F10E0 -_021F1068: - bl ov5_021F0484 - add r6, r0, #0 - mov r0, #0xb - add r1, r6, #0 - bl sub_02018184 - str r0, [r5, #4] - mov r1, #0 - add r2, r6, #0 - bl sub_020D5124 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F10E0 -_021F1088: - ldr r0, [sp] - ldr r0, [r0, #0x3c] - bl sub_0205EB98 - add r3, r0, #0 - ldr r0, [sp] - ldr r2, [r6, #0] - mov r1, #0 - bl ov6_02243F88 - str r0, [r5, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F10E0 -_021F10A6: - ldr r0, [r5, #0] - bl ov6_02243FBC - cmp r0, #0 - beq _021F10E0 - ldr r0, [r5, #0] - bl ov6_02243FC8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F10E0 -_021F10BE: - ldr r1, _021F10E4 ; =ov5_021F0488 - ldr r2, [r5, #4] - add r0, r7, #0 - bl sub_02050944 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F10E0 -_021F10D0: - add r0, r5, #0 - bl sub_020181C4 - add r0, r6, #0 - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021F10E0: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F10E4: .word ov5_021F0488 - thumb_func_end ov5_021F101C - - thumb_func_start ov5_021F10E8 -ov5_021F10E8: ; 0x021F10E8 - push {r4, lr} - mov r2, #0 - mov r1, #0xc - add r3, r2, #0 - add r4, r0, #0 - bl ov5_021DF53C - str r4, [r0, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F10E8 - - thumb_func_start ov5_021F10FC -ov5_021F10FC: ; 0x021F10FC - push {r4, lr} - add r4, r0, #0 - bl ov5_021F114C - ldr r0, [r4, #8] - cmp r0, #0 - beq _021F110E - bl ov5_021DF554 -_021F110E: - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F10FC - - thumb_func_start ov5_021F1118 -ov5_021F1118: ; 0x021F1118 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - str r1, [r5, #0] - mov r2, #0 - add r0, r3, #0 - add r1, r5, #4 - add r3, r4, #0 - str r2, [sp] - bl ov5_021DFB00 - add r0, r5, #0 - add r0, #0x18 - add r1, r5, #4 - bl sub_02073B70 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1118 - - thumb_func_start ov5_021F113C -ov5_021F113C: ; 0x021F113C - ldr r1, _021F1144 ; =0x0000FFFF - ldr r3, _021F1148 ; =sub_0207395C - stmia r0!, {r1} - bx r3 - ; .align 2, 0 -_021F1144: .word 0x0000FFFF -_021F1148: .word sub_0207395C - thumb_func_end ov5_021F113C - - thumb_func_start ov5_021F114C -ov5_021F114C: ; 0x021F114C - push {r3, r4, r5, r6, r7, lr} - ldr r6, [r0, #4] - mov r4, #0 - ldr r5, [r0, #8] - cmp r6, #0 - bls _021F116E - ldr r7, _021F1170 ; =0x0000FFFF -_021F115A: - ldr r0, [r5, #0] - cmp r0, r7 - beq _021F1166 - add r0, r5, #0 - bl ov5_021F113C -_021F1166: - add r4, r4, #1 - add r5, #0x6c - cmp r4, r6 - blo _021F115A -_021F116E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F1170: .word 0x0000FFFF - thumb_func_end ov5_021F114C - - thumb_func_start ov5_021F1174 -ov5_021F1174: ; 0x021F1174 - ldr r3, [r0, #4] - ldr r0, [r0, #8] -_021F1178: - ldr r2, [r0, #0] - cmp r2, r1 - beq _021F1186 - add r0, #0x6c - sub r3, r3, #1 - bne _021F1178 - mov r0, #0 -_021F1186: - bx lr - thumb_func_end ov5_021F1174 - - thumb_func_start ov5_021F1188 -ov5_021F1188: ; 0x021F1188 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x1d - add r6, r0, #0 - bl ov5_021DF55C - add r4, r0, #0 - cmp r5, #0 - bne _021F119E - bl sub_02022974 -_021F119E: - mov r1, #0x6c - mov r2, #0 - add r0, r6, #0 - mul r1, r5 - add r3, r2, #0 - str r5, [r4, #4] - bl ov5_021DF53C - ldr r1, _021F11BC ; =0x0000FFFF - str r0, [r4, #8] -_021F11B2: - str r1, [r0, #0] - add r0, #0x6c - sub r5, r5, #1 - bne _021F11B2 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F11BC: .word 0x0000FFFF - thumb_func_end ov5_021F1188 - - thumb_func_start ov5_021F11C0 -ov5_021F11C0: ; 0x021F11C0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #0x1d - add r5, r0, #0 - add r6, r2, #0 - bl ov5_021DF55C - add r1, r4, #0 - add r7, r0, #0 - bl ov5_021F1174 - cmp r0, #0 - bne _021F11F6 - ldr r1, _021F11F8 ; =0x0000FFFF - add r0, r7, #0 - bl ov5_021F1174 - cmp r0, #0 - bne _021F11EC - bl sub_02022974 - pop {r3, r4, r5, r6, r7, pc} -_021F11EC: - add r1, r4, #0 - add r2, r6, #0 - add r3, r5, #0 - bl ov5_021F1118 -_021F11F6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F11F8: .word 0x0000FFFF - thumb_func_end ov5_021F11C0 - - thumb_func_start ov5_021F11FC -ov5_021F11FC: ; 0x021F11FC - push {r4, lr} - add r4, r1, #0 - mov r1, #0x1d - bl ov5_021DF55C - add r1, r4, #0 - bl ov5_021F1174 - add r4, r0, #0 - bne _021F1214 - bl sub_02022974 -_021F1214: - add r4, #0x18 - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F11FC - - thumb_func_start ov5_021F121C -ov5_021F121C: ; 0x021F121C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062920 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #2 - str r4, [sp, #0xc] - str r5, [sp, #0x10] - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F1254 ; =0x0220021C - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021F1254: .word 0x0220021C - thumb_func_end ov5_021F121C - - thumb_func_start ov5_021F1258 -ov5_021F1258: ; 0x021F1258 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x1c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x24] - bl sub_02062910 - str r0, [r4, #4] - ldr r0, [r4, #0x20] - ldr r1, [r4, #0x1c] - bl ov5_021F11FC - str r0, [r4, #0x18] - ldr r0, [r4, #0x24] - bl sub_02062E94 - cmp r0, #1 - ldr r0, [r4, #0x24] - bne _021F1294 - bl sub_02062C18 - b _021F1298 -_021F1294: - bl sub_02062918 -_021F1298: - str r0, [r4, #8] - add r4, #0xc - add r0, r5, #0 - add r1, r4, #0 - bl sub_020715E4 - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F1258 - - thumb_func_start ov5_021F12A8 -ov5_021F12A8: ; 0x021F12A8 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F12A8 - - thumb_func_start ov5_021F12AC -ov5_021F12AC: ; 0x021F12AC - push {r4, r5, r6, lr} - sub sp, #0x18 - add r4, r1, #0 - ldr r6, [r4, #0x24] - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r2, [r4, #8] - add r0, r6, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F12CE - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r4, r5, r6, pc} -_021F12CE: - add r0, r6, #0 - add r1, sp, #0xc - bl sub_02063050 - add r0, r6, #0 - add r1, sp, #0 - bl sub_02063078 - ldr r1, [sp] - ldr r0, [r4, #0xc] - ldr r2, [sp, #0xc] - add r0, r1, r0 - add r0, r2, r0 - str r0, [sp, #0xc] - ldr r1, [sp, #4] - ldr r0, [r4, #0x10] - ldr r2, [sp, #0x10] - add r0, r1, r0 - add r0, r2, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #8] - ldr r0, [r4, #0x14] - ldr r2, [sp, #0x14] - add r0, r1, r0 - add r0, r2, r0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, sp, #0xc - bl sub_020715D4 - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F12AC - - thumb_func_start ov5_021F1310 -ov5_021F1310: ; 0x021F1310 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x18] - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F1310 - - thumb_func_start ov5_021F1328 -ov5_021F1328: ; 0x021F1328 - push {r4, r5, r6, lr} - mov r5, #9 - add r1, r5, #0 - add r6, r0, #0 - ldr r4, _021F1348 ; =0x02200230 - bl ov5_021F1188 -_021F1336: - ldr r1, [r4, #0] - ldr r2, [r4, #4] - add r0, r6, #0 - bl ov5_021F11C0 - add r4, #8 - sub r5, r5, #1 - bne _021F1336 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F1348: .word 0x02200230 - thumb_func_end ov5_021F1328 - - thumb_func_start ov5_021F134C -ov5_021F134C: ; 0x021F134C - push {r3, r4, r5, lr} - mov r1, #0x16 - mov r2, #0 - lsl r1, r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0x20] - bl ov5_021F14FC - add r0, r4, #0 - bl ov5_021F1388 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F134C - - thumb_func_start ov5_021F1370 -ov5_021F1370: ; 0x021F1370 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F13AC - add r0, r4, #0 - bl ov5_021F153C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1370 - - thumb_func_start ov5_021F1388 -ov5_021F1388: ; 0x021F1388 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - bl ov5_021DF574 - ldr r0, [r0, #0x38] - bl sub_02062858 - sub r2, r0, #1 - ldr r0, _021F13A8 ; =ov5_021F1424 - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x24] - pop {r4, pc} - nop -_021F13A8: .word ov5_021F1424 - thumb_func_end ov5_021F1388 - - thumb_func_start ov5_021F13AC -ov5_021F13AC: ; 0x021F13AC - ldr r3, _021F13B4 ; =sub_0200DA58 - ldr r0, [r0, #0x24] - bx r3 - nop -_021F13B4: .word sub_0200DA58 - thumb_func_end ov5_021F13AC - - thumb_func_start ov5_021F13B8 -ov5_021F13B8: ; 0x021F13B8 - add r2, r0, #0 - add r2, #0x14 - add r3, r1, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - bx lr - thumb_func_end ov5_021F13B8 - - thumb_func_start ov5_021F13C8 -ov5_021F13C8: ; 0x021F13C8 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F13C8 - - thumb_func_start ov5_021F13D4 -ov5_021F13D4: ; 0x021F13D4 - ldr r1, [r0, #4] - lsl r2, r1, #2 - ldr r1, _021F13F8 ; =0x02200284 - ldr r1, [r1, r2] - str r1, [r0, #0x10] - ldr r2, [r0, #4] - mov r1, #0xc - add r3, r2, #0 - mul r3, r1 - ldr r1, _021F13FC ; =0x022002E4 - add r2, r0, #0 - add r3, r1, r3 - ldmia r3!, {r0, r1} - add r2, #0x14 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bx lr - ; .align 2, 0 -_021F13F8: .word 0x02200284 -_021F13FC: .word 0x022002E4 - thumb_func_end ov5_021F13D4 - - thumb_func_start ov5_021F1400 -ov5_021F1400: ; 0x021F1400 - ldr r3, [r0, #0] - cmp r3, r1 - bge _021F1412 - add r2, r3, r2 - str r2, [r0, #0] - cmp r2, r1 - ble _021F1420 - str r1, [r0, #0] - bx lr -_021F1412: - cmp r3, r1 - ble _021F1420 - sub r2, r3, r2 - str r2, [r0, #0] - cmp r2, r1 - bge _021F1420 - str r1, [r0, #0] -_021F1420: - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F1400 - - thumb_func_start ov5_021F1424 -ov5_021F1424: ; 0x021F1424 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - bl sub_02013960 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #0 - beq _021F1442 - cmp r1, #1 - beq _021F1464 - cmp r1, #2 - beq _021F146E - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_021F1442: - str r4, [r5, #4] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F13D4 - ldr r0, [r5, #0x10] - bl ov5_021F13C8 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021F1554 - ldr r0, [r5, #0] - add sp, #0x10 - add r0, r0, #1 - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} -_021F1464: - ldr r0, [r5, #4] - cmp r0, r4 - beq _021F14F0 - add r0, r1, #1 - str r0, [r5, #0] -_021F146E: - ldr r0, _021F14F4 ; =0x02200284 - lsl r1, r4, #2 - ldr r6, [r0, r1] - mov r0, #0xc - add r1, r4, #0 - mul r1, r0 - ldr r0, _021F14F8 ; =0x022002E4 - add r2, sp, #4 - add r3, r0, r1 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r5, #0 - ldr r1, [sp, #4] - add r0, #0x14 - mov r2, #0x10 - bl ov5_021F1400 - ldr r0, [sp, #8] - mov r2, #0x10 - str r0, [sp] - add r0, r5, #0 - ldr r1, [sp] - add r0, #0x18 - bl ov5_021F1400 - ldr r7, [sp, #0xc] - add r0, r5, #0 - add r0, #0x1c - add r1, r7, #0 - mov r2, #0x10 - bl ov5_021F1400 - add r0, r5, #0 - mov r2, #2 - add r0, #0x10 - add r1, r6, #0 - lsl r2, r2, #8 - bl ov5_021F1400 - ldr r0, [r5, #0x10] - bl ov5_021F13C8 - add r1, r0, #0 - add r0, r5, #0 - bl ov5_021F1554 - ldr r1, [sp, #4] - ldr r0, [r5, #0x14] - cmp r1, r0 - bne _021F14F0 - ldr r1, [r5, #0x18] - ldr r0, [sp] - cmp r0, r1 - bne _021F14F0 - ldr r0, [r5, #0x1c] - cmp r7, r0 - bne _021F14F0 - ldr r0, [r5, #0x10] - cmp r6, r0 - bne _021F14F0 - str r4, [r5, #4] - mov r0, #1 - str r0, [r5, #0] -_021F14F0: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F14F4: .word 0x02200284 -_021F14F8: .word 0x022002E4 - thumb_func_end ov5_021F1424 - - thumb_func_start ov5_021F14FC -ov5_021F14FC: ; 0x021F14FC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - add r5, r0, #0 - ldr r6, _021F1538 ; =0x02200278 - str r0, [sp, #4] - mov r7, #0 - add r4, #0x28 - add r5, #0x64 -_021F150E: - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [r6, #0] - ldr r0, [r0, #0x20] - add r1, r4, #0 - mov r2, #0 - bl ov5_021DFB00 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02073B70 - add r7, r7, #1 - add r6, r6, #4 - add r4, #0x14 - add r5, #0x54 - cmp r7, #3 - blt _021F150E - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F1538: .word 0x02200278 - thumb_func_end ov5_021F14FC - - thumb_func_start ov5_021F153C -ov5_021F153C: ; 0x021F153C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x28 -_021F1544: - add r0, r5, #0 - bl sub_0207395C - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _021F1544 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F153C - - thumb_func_start ov5_021F1554 -ov5_021F1554: ; 0x021F1554 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r2, #0x1f - add r4, r1, #0 - ldr r0, [r5, #0x34] - mov r1, #1 - lsl r2, r2, #0x10 - bl sub_020B2D8C - ldr r0, [r5, #0x34] - add r1, r4, #0 - bl sub_020B3764 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F1554 - - thumb_func_start ov5_021F1570 -ov5_021F1570: ; 0x021F1570 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - mov r1, #0 - str r4, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x1c] - bl sub_02063050 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F15B0 ; =0x022002AC - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_021F15B0: .word 0x022002AC - thumb_func_end ov5_021F1570 - - thumb_func_start ov5_021F15B4 -ov5_021F15B4: ; 0x021F15B4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x14 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r5, #0 - bl sub_020715B4 - str r0, [r4, #0x10] - ldr r0, [r4, #0x1c] - bl sub_02062920 - str r0, [r4, #0] - ldr r0, [r4, #0x1c] - bl sub_02062910 - str r0, [r4, #4] - ldr r0, [r4, #0x1c] - bl sub_02062E94 - cmp r0, #1 - ldr r0, [r4, #0x1c] - bne _021F15F6 - bl sub_02062C18 - b _021F15FA -_021F15F6: - bl sub_02062918 -_021F15FA: - str r0, [r4, #8] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F15B4 - - thumb_func_start ov5_021F1600 -ov5_021F1600: ; 0x021F1600 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F1600 - - thumb_func_start ov5_021F1604 -ov5_021F1604: ; 0x021F1604 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x1c] - ldr r1, [r4, #0] - add r5, r0, #0 - ldr r2, [r4, #4] - ldr r3, [r4, #8] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F1628 - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021F1628: - add r0, r6, #0 - mov r1, #8 - bl sub_02062CBC - cmp r0, #0 - beq _021F163E - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021F163E: - mov r0, #0 - str r0, [r4, #0xc] - ldr r1, _021F166C ; =0x00100200 - add r0, r6, #0 - bl sub_020628D8 - cmp r0, #1 - bne _021F1656 - mov r0, #1 - add sp, #0xc - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, pc} -_021F1656: - add r0, r6, #0 - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021F166C: .word 0x00100200 - thumb_func_end ov5_021F1604 - - thumb_func_start ov5_021F1670 -ov5_021F1670: ; 0x021F1670 - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - add r2, r1, #0 - add r4, r0, #0 - ldr r0, [r2, #0xc] - cmp r0, #0 - bne _021F16CA - ldr r6, _021F16D0 ; =0x022002C0 - add r5, sp, #0 - mov r3, #4 -_021F1684: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _021F1684 - ldr r0, [r6, #0] - add r1, sp, #0x24 - str r0, [r5, #0] - ldr r5, [r2, #0x18] - add r0, r5, #0 - bl ov5_021F13B8 - add r0, r4, #0 - add r1, sp, #0x30 - bl sub_020715E4 - mov r0, #2 - ldr r1, [sp, #0x30] - lsl r0, r0, #0xa - sub r1, r1, r0 - str r1, [sp, #0x30] - lsl r1, r0, #3 - ldr r2, [sp, #0x34] - lsl r0, r0, #1 - sub r1, r2, r1 - str r1, [sp, #0x34] - ldr r1, [sp, #0x38] - add r5, #0x64 - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, r5, #0 - add r1, sp, #0x30 - add r2, sp, #0x24 - add r3, sp, #0 - bl sub_02073BA4 -_021F16CA: - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - nop -_021F16D0: .word 0x022002C0 - thumb_func_end ov5_021F1670 - - thumb_func_start ov5_021F16D4 -ov5_021F16D4: ; 0x021F16D4 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021DF578 - add r6, r0, #0 - mov r1, #0 - str r6, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x1c] - bl sub_02063050 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F1714 ; =0x02200298 - add r0, r6, #0 - add r2, sp, #8 - add r3, r4, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F1714: .word 0x02200298 - thumb_func_end ov5_021F16D4 - - thumb_func_start ov5_021F1718 -ov5_021F1718: ; 0x021F1718 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x1c] - ldr r1, [r4, #0] - add r5, r0, #0 - ldr r2, [r4, #4] - ldr r3, [r4, #8] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F173C - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021F173C: - mov r0, #0 - str r0, [r4, #0xc] - ldr r1, _021F1768 ; =0x00100200 - add r0, r6, #0 - bl sub_020628D8 - cmp r0, #1 - bne _021F1754 - mov r0, #1 - add sp, #0xc - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, pc} -_021F1754: - add r0, r6, #0 - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021F1768: .word 0x00100200 - thumb_func_end ov5_021F1718 - - thumb_func_start ov5_021F176C -ov5_021F176C: ; 0x021F176C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #0xc] - add r6, r0, #0 - cmp r1, #1 - beq _021F17B2 - bl sub_020715B4 - ldr r5, [r4, #0x18] - add r4, r0, #0 - mov r1, #0x54 - mul r4, r1 - add r0, r6, #0 - add r1, sp, #0 - add r5, #0x64 - bl sub_020715E4 - mov r0, #2 - ldr r1, [sp] - lsl r0, r0, #0xa - sub r1, r1, r0 - str r1, [sp] - lsl r1, r0, #3 - ldr r2, [sp, #4] - lsl r0, r0, #1 - sub r1, r2, r1 - str r1, [sp, #4] - ldr r1, [sp, #8] - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, r4 - add r1, sp, #0 - bl sub_02073BB4 -_021F17B2: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F176C - - thumb_func_start ov5_021F17B8 -ov5_021F17B8: ; 0x021F17B8 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F17E4 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F17B8 - - thumb_func_start ov5_021F17D4 -ov5_021F17D4: ; 0x021F17D4 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F17F4 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F17D4 - - thumb_func_start ov5_021F17E4 -ov5_021F17E4: ; 0x021F17E4 - ldr r3, _021F17F0 ; =ov5_021DF9E0 - ldr r0, [r0, #0] - mov r1, #2 - mov r2, #0x14 - bx r3 - nop -_021F17F0: .word ov5_021DF9E0 - thumb_func_end ov5_021F17E4 - - thumb_func_start ov5_021F17F4 -ov5_021F17F4: ; 0x021F17F4 - ldr r3, _021F17FC ; =ov5_021DFA08 - ldr r0, [r0, #0] - mov r1, #2 - bx r3 - ; .align 2, 0 -_021F17FC: .word ov5_021DFA08 - thumb_func_end ov5_021F17F4 - - thumb_func_start ov5_021F1800 -ov5_021F1800: ; 0x021F1800 - push {r4, r5, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - bl sub_02062C00 - str r0, [sp, #8] - add r0, r5, #0 - bl ov5_021DF578 - mov r1, #1 - str r0, [sp, #0xc] - bl ov5_021DF55C - str r0, [sp, #0x10] - add r0, r5, #0 - add r1, sp, #0x18 - str r5, [sp, #0x14] - bl sub_02063050 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r1, _021F1848 ; =0x02200338 - add r2, sp, #0x18 - add r3, r4, #0 - bl ov5_021DF72C - add sp, #0x24 - pop {r4, r5, pc} - nop -_021F1848: .word 0x02200338 - thumb_func_end ov5_021F1800 - - thumb_func_start ov5_021F184C -ov5_021F184C: ; 0x021F184C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x14 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - bl sub_020715B4 - str r0, [r4, #0x10] - ldr r0, [r4, #0x20] - bl sub_02062910 - str r0, [r4, #0] - ldr r0, [r4, #0x20] - bl sub_02062918 - str r0, [r4, #4] - ldr r0, [r4, #0x20] - bl sub_02062920 - str r0, [r4, #8] - bl sub_020677F4 - cmp r0, #1 - bne _021F1896 - ldr r0, [r4, #0x20] - bl sub_02067800 - str r0, [r4, #8] -_021F1896: - mov r0, #1 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - str r0, [r4, #0x2c] - str r0, [r4, #0x30] - mov r0, #0x40 - str r0, [r4, #0x34] - ldr r0, [r4, #0x10] - cmp r0, #2 - bne _021F18AE - mov r0, #0 - str r0, [r4, #0x34] -_021F18AE: - ldr r1, [r4, #0x20] - add r0, r4, #0 - add r2, sp, #0 - bl ov5_021F1A24 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F1A8C - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F184C - - thumb_func_start ov5_021F18D0 -ov5_021F18D0: ; 0x021F18D0 - push {r3, lr} - ldr r0, [r1, #0xc] - cmp r0, #1 - bne _021F18DE - ldr r0, [r1, #0x24] - bl sub_020211FC -_021F18DE: - pop {r3, pc} - thumb_func_end ov5_021F18D0 - - thumb_func_start ov5_021F18E0 -ov5_021F18E0: ; 0x021F18E0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x20] - add r5, r0, #0 - add r0, r6, #0 - bl sub_02062920 - add r7, r0, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021F1902 - ldr r0, [r4, #0x20] - bl sub_02067800 - add r7, r0, #0 -_021F1902: - ldr r0, [r4, #8] - cmp r0, r7 - bne _021F1920 - ldr r1, [r4, #0] - ldr r2, [r4, #4] - add r0, r6, #0 - bl sub_02062764 - cmp r0, #0 - beq _021F1920 - add r0, r6, #0 - bl sub_02062F64 - cmp r0, #0 - bne _021F192A -_021F1920: - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021F192A: - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x34] - add r1, r1, r0 - mov r0, #0x12 - lsl r0, r0, #8 - str r1, [r4, #0x28] - cmp r1, r0 - blt _021F1944 - str r0, [r4, #0x28] - ldr r0, [r4, #0x34] - neg r0, r0 - str r0, [r4, #0x34] - b _021F1954 -_021F1944: - mov r0, #0xe - lsl r0, r0, #8 - cmp r1, r0 - bgt _021F1954 - str r0, [r4, #0x28] - ldr r0, [r4, #0x34] - neg r0, r0 - str r0, [r4, #0x34] -_021F1954: - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0 - bl ov5_021F1A24 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _021F1974 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F1A8C -_021F1974: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021F18E0 - - thumb_func_start ov5_021F1978 -ov5_021F1978: ; 0x021F1978 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r4, [r5, #0x20] - add r6, r0, #0 - add r0, r4, #0 - bl sub_02062920 - add r7, r0, #0 - bl sub_020677F4 - cmp r0, #1 - bne _021F199A - ldr r0, [r5, #0x20] - bl sub_02067800 - add r7, r0, #0 -_021F199A: - ldr r0, [r5, #8] - cmp r0, r7 - bne _021F19B8 - ldr r1, [r5, #0] - ldr r2, [r5, #4] - add r0, r4, #0 - bl sub_02062764 - cmp r0, #0 - beq _021F19B8 - add r0, r4, #0 - bl sub_02062F64 - cmp r0, #0 - bne _021F19C2 -_021F19B8: - add r0, r6, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_021F19C2: - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _021F1A1E - add r0, r4, #0 - bl sub_02062D58 - cmp r0, #1 - ldr r0, [r5, #0x24] - bne _021F19DC - mov r1, #0 - bl sub_02021320 - b _021F19E2 -_021F19DC: - mov r1, #1 - bl sub_02021320 -_021F19E2: - add r0, r6, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r5, #0x24] - add r1, sp, #0 - bl sub_020212A8 - add r1, r5, #0 - ldr r0, [r5, #0x24] - add r1, #0x28 - bl sub_020212D0 - ldr r0, [r5, #0x20] - bl ov5_021EB1A0 - add r4, r0, #0 - bl sub_02021358 - add r1, r0, #0 - ldr r0, [r5, #0x24] - bl sub_02021344 - add r0, r4, #0 - bl sub_02021394 - add r1, r0, #0 - ldr r0, [r5, #0x24] - bl sub_02021380 -_021F1A1E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1978 - - thumb_func_start ov5_021F1A24 -ov5_021F1A24: ; 0x021F1A24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - ldr r3, _021F1A88 ; =0x0220032C - add r4, r2, #0 - add r5, r0, #0 - str r1, [sp] - ldmia r3!, {r0, r1} - add r2, sp, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r4, #0 - str r0, [r2, #0] - ldr r0, [sp] - bl sub_02063078 - ldr r0, [r4, #8] - add r1, r4, #0 - neg r6, r0 - ldr r0, [sp] - ldr r7, [r4, #0] - bl sub_02063050 - ldr r0, [r5, #0x14] - add r1, r4, #0 - bl sub_020644A4 - ldr r1, [r4, #0] - add r1, r1, r7 - str r1, [r4, #0] - mov r1, #7 - lsl r1, r1, #0xc - ldr r2, [r4, #8] - sub r1, r6, r1 - add r1, r2, r1 - str r1, [r4, #8] - cmp r0, #0 - bne _021F1A76 - mov r0, #0 - add sp, #0x10 - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} -_021F1A76: - ldr r0, [r5, #0x10] - ldr r2, [r4, #4] - lsl r1, r0, #2 - add r0, sp, #4 - ldr r0, [r0, r1] - sub r0, r2, r0 - str r0, [r4, #4] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F1A88: .word 0x0220032C - thumb_func_end ov5_021F1A24 - - thumb_func_start ov5_021F1A8C -ov5_021F1A8C: ; 0x021F1A8C - push {r4, r5, lr} - sub sp, #0x34 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x20] - bl sub_02062A40 - ldr r1, [r4, #8] - add r2, sp, #0 - bl ov5_021ED150 - cmp r0, #0 - beq _021F1AD2 - ldr r0, [r4, #0x20] - bl ov5_021EDD94 - cmp r0, #1 - beq _021F1AD2 - ldr r0, [r4, #0x18] - mov r1, #2 - bl ov5_021DF9FC - str r0, [sp] - add r0, r5, #0 - add r1, sp, #0x28 - bl sub_020715E4 - ldr r0, [r4, #0x18] - add r1, sp, #0 - add r2, sp, #0x28 - bl ov5_021DF7F8 - str r0, [r4, #0x24] - mov r0, #1 - str r0, [r4, #0xc] -_021F1AD2: - add sp, #0x34 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1A8C - - thumb_func_start ov5_021F1AD8 -ov5_021F1AD8: ; 0x021F1AD8 - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r4, r1, #0 - add r6, r4, #0 - add r5, r0, #0 - add r6, #0x10 - add r3, sp, #0 - mov r2, #5 -_021F1AE8: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021F1AE8 - ldr r0, [r4, #8] - mov r1, #2 - bl ov5_021DF9FC - str r0, [sp] - add r0, r5, #0 - add r1, sp, #0x28 - bl sub_020715E4 - ldr r0, [r4, #8] - add r1, sp, #0 - add r2, sp, #0x28 - bl ov5_021DF7F8 - str r0, [r4, #0x3c] - ldr r5, [r4, #0x38] - add r0, r5, #0 - bl sub_02021358 - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_02021344 - add r0, r5, #0 - bl sub_020213D4 - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_020213A4 - add r0, r5, #0 - bl sub_02021394 - add r1, r0, #0 - ldr r0, [r4, #0x3c] - bl sub_02021380 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_02021368 - ldr r0, [r4, #0x3c] - bl sub_02021414 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021F1AD8 - - thumb_func_start ov5_021F1B4C -ov5_021F1B4C: ; 0x021F1B4C - push {r4, r5, lr} - sub sp, #0xc - ldr r3, _021F1BA0 ; =0x02200320 - add r5, r0, #0 - add r4, r1, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, r5, #0 - str r0, [r2, #0] - add r3, #0x50 - ldmia r3!, {r0, r1} - add r2, r4, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r4, #0 - str r0, [r2, #0] - ldr r0, [r5, #4] - bl sub_020644A4 - mov r1, #7 - ldr r2, [r4, #8] - lsl r1, r1, #0xc - sub r1, r2, r1 - str r1, [r4, #8] - cmp r0, #0 - bne _021F1B8C - mov r0, #0 - add sp, #0xc - str r0, [r4, #4] - pop {r4, r5, pc} -_021F1B8C: - ldr r0, [r5, #0] - ldr r2, [r4, #4] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - sub r0, r2, r0 - str r0, [r4, #4] - add sp, #0xc - pop {r4, r5, pc} - nop -_021F1BA0: .word 0x02200320 - thumb_func_end ov5_021F1B4C - - thumb_func_start ov5_021F1BA4 -ov5_021F1BA4: ; 0x021F1BA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov5_021DF574 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #1 - str r5, [sp, #0xc] - bl ov5_021DF55C - str r0, [sp, #0x10] - add r3, sp, #0x14 - mov r2, #5 -_021F1BC6: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021F1BC6 - str r6, [sp, #0x3c] - add r0, sp, #8 - str r0, [sp] - ldr r0, [sp, #0x5c] - ldr r1, _021F1BE8 ; =0x0220034C - str r0, [sp, #4] - ldr r3, [sp, #0x58] - add r0, r5, #0 - add r2, r7, #0 - bl ov5_021DF72C - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F1BE8: .word 0x0220034C - thumb_func_end ov5_021F1BA4 - - thumb_func_start ov5_021F1BEC -ov5_021F1BEC: ; 0x021F1BEC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r6, r0, #0 - add r3, r4, #4 - mov r2, #7 -_021F1BFE: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021F1BFE - add r0, r5, #0 - bl sub_020715B4 - str r0, [r4, #0] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [r4, #0x40] - str r0, [r4, #0x44] - str r0, [r4, #0x48] - mov r0, #0x40 - str r0, [r4, #0x4c] - ldr r0, [r4, #0] - cmp r0, #2 - bne _021F1C26 - mov r0, #0 - str r0, [r4, #0x4c] -_021F1C26: - add r1, r4, #0 - add r0, r5, #0 - add r1, #0x50 - bl sub_020715E4 - add r0, r4, #0 - add r1, sp, #0 - bl ov5_021F1B4C - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F1AD8 - add r0, r5, #0 - bl sub_0207153C - mov r0, #1 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021F1BEC - - thumb_func_start ov5_021F1C54 -ov5_021F1C54: ; 0x021F1C54 - ldr r3, _021F1C5C ; =sub_020211FC - ldr r0, [r1, #0x3c] - bx r3 - nop -_021F1C5C: .word sub_020211FC - thumb_func_end ov5_021F1C54 - - thumb_func_start ov5_021F1C60 -ov5_021F1C60: ; 0x021F1C60 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r2, [r1, #0x40] - ldr r0, [r1, #0x4c] - add r2, r2, r0 - mov r0, #0x12 - lsl r0, r0, #8 - str r2, [r1, #0x40] - cmp r2, r0 - blt _021F1C80 - str r0, [r1, #0x40] - ldr r0, [r1, #0x4c] - neg r0, r0 - str r0, [r1, #0x4c] - b _021F1C90 -_021F1C80: - mov r0, #0xe - lsl r0, r0, #8 - cmp r2, r0 - bgt _021F1C90 - str r0, [r1, #0x40] - ldr r0, [r1, #0x4c] - neg r0, r0 - str r0, [r1, #0x4c] -_021F1C90: - add r0, r1, #0 - add r1, sp, #0 - bl ov5_021F1B4C - add r0, r4, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F1C60 - - thumb_func_start ov5_021F1CA4 -ov5_021F1CA4: ; 0x021F1CA4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_020212A8 - ldr r0, [r4, #0x3c] - add r4, #0x40 - add r1, r4, #0 - bl sub_020212D0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1CA4 - - thumb_func_start ov5_021F1CC8 -ov5_021F1CC8: ; 0x021F1CC8 - push {r3, r4, r5, lr} - mov r2, #0 - ldr r1, _021F1CE4 ; =0x00000824 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F1CF8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_021F1CE4: .word 0x00000824 - thumb_func_end ov5_021F1CC8 - - thumb_func_start ov5_021F1CE8 -ov5_021F1CE8: ; 0x021F1CE8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F1D80 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F1CE8 - - thumb_func_start ov5_021F1CF8 -ov5_021F1CF8: ; 0x021F1CF8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - mov r1, #0x65 - ldr r5, [sp, #4] - lsl r1, r1, #2 - add r4, r0, #4 - add r0, r0, r1 - str r0, [sp, #0xc] - ldr r1, _021F1D74 ; =0x000004DC - ldr r0, [sp, #4] - ldr r7, _021F1D78 ; =0x0220039C - add r0, r0, r1 - ldr r6, _021F1D7C ; =0x02200374 - add r5, #0xcc - str r0, [sp, #8] -_021F1D1E: - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [r7, #0] - ldr r0, [r0, #0] - add r1, r4, #0 - mov r2, #0 - bl ov5_021DFB00 - ldr r0, [sp, #0xc] - add r1, r4, #0 - bl sub_02073B70 - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [r6, #0] - ldr r0, [r0, #0] - add r1, r5, #0 - mov r2, #0 - bl ov5_021DFB00 - ldr r0, [sp, #8] - add r1, r5, #0 - bl sub_02073B70 - ldr r0, [sp, #0xc] - add r7, r7, #4 - add r0, #0x54 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r4, #0x14 - add r0, #0x54 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - add r6, r6, #4 - add r0, r0, #1 - add r5, #0x14 - str r0, [sp, #0x10] - cmp r0, #0xa - blo _021F1D1E - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F1D74: .word 0x000004DC -_021F1D78: .word 0x0220039C -_021F1D7C: .word 0x02200374 - thumb_func_end ov5_021F1CF8 - - thumb_func_start ov5_021F1D80 -ov5_021F1D80: ; 0x021F1D80 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0 - add r4, r0, #4 - add r5, #0xcc -_021F1D8A: - add r0, r4, #0 - bl sub_0207395C - add r0, r5, #0 - bl sub_0207395C - add r6, r6, #1 - add r4, #0x14 - add r5, #0x14 - cmp r6, #0xa - blt _021F1D8A - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1D80 - - thumb_func_start ov5_021F1DA4 -ov5_021F1DA4: ; 0x021F1DA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r1, r3, #0 - mov r4, #0 - cmp r0, #4 - bhi _021F1E0E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F1DBE: ; jump table - .short _021F1DC8 - _021F1DBE - 2 ; case 0 - .short _021F1DD6 - _021F1DBE - 2 ; case 1 - .short _021F1DEE - _021F1DBE - 2 ; case 2 - .short _021F1DFA - _021F1DBE - 2 ; case 3 - .short _021F1DEE - _021F1DBE - 2 ; case 4 -_021F1DC8: - mov r0, #0x65 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x54 - mul r0, r2 - add r4, r1, r0 - b _021F1E0E -_021F1DD6: - lsl r3, r1, #4 - ldr r1, _021F1E1C ; =0x022003C4 - lsl r2, r2, #2 - add r1, r1, r3 - mov r0, #0x65 - ldr r2, [r2, r1] - lsl r0, r0, #2 - mov r1, #0x54 - add r0, r5, r0 - mul r1, r2 - add r4, r0, r1 - b _021F1E0E -_021F1DEE: - ldr r0, _021F1E20 ; =0x000004DC - add r1, r5, r0 - mov r0, #0x54 - mul r0, r2 - add r4, r1, r0 - b _021F1E0E -_021F1DFA: - lsl r3, r1, #4 - ldr r1, _021F1E1C ; =0x022003C4 - lsl r2, r2, #2 - add r1, r1, r3 - ldr r0, _021F1E20 ; =0x000004DC - ldr r2, [r2, r1] - mov r1, #0x54 - add r0, r5, r0 - mul r1, r2 - add r4, r0, r1 -_021F1E0E: - cmp r4, #0 - bne _021F1E16 - bl sub_02022974 -_021F1E16: - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_021F1E1C: .word 0x022003C4 -_021F1E20: .word 0x000004DC - thumb_func_end ov5_021F1DA4 - - thumb_func_start ov5_021F1E24 -ov5_021F1E24: ; 0x021F1E24 - push {r4, lr} - mov r4, #0 - cmp r1, #4 - bhi _021F1E7C - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021F1E38: ; jump table - .short _021F1E42 - _021F1E38 - 2 ; case 0 - .short _021F1E4C - _021F1E38 - 2 ; case 1 - .short _021F1E60 - _021F1E38 - 2 ; case 2 - .short _021F1E6A - _021F1E38 - 2 ; case 3 - .short _021F1E60 - _021F1E38 - 2 ; case 4 -_021F1E42: - add r1, r0, #4 - mov r0, #0x14 - mul r0, r2 - add r4, r1, r0 - b _021F1E7C -_021F1E4C: - ldr r1, _021F1E88 ; =0x022003C4 - lsl r3, r3, #4 - lsl r2, r2, #2 - add r1, r1, r3 - ldr r2, [r2, r1] - mov r1, #0x14 - add r0, r0, #4 - mul r1, r2 - add r4, r0, r1 - b _021F1E7C -_021F1E60: - mov r1, #0x14 - add r0, #0xcc - mul r1, r2 - add r4, r0, r1 - b _021F1E7C -_021F1E6A: - ldr r1, _021F1E88 ; =0x022003C4 - lsl r3, r3, #4 - lsl r2, r2, #2 - add r1, r1, r3 - ldr r2, [r2, r1] - mov r1, #0x14 - add r0, #0xcc - mul r1, r2 - add r4, r0, r1 -_021F1E7C: - cmp r4, #0 - bne _021F1E84 - bl sub_02022974 -_021F1E84: - add r0, r4, #0 - pop {r4, pc} - ; .align 2, 0 -_021F1E88: .word 0x022003C4 - thumb_func_end ov5_021F1E24 - - thumb_func_start ov5_021F1E8C -ov5_021F1E8C: ; 0x021F1E8C - ldr r3, _021F1E94 ; =ov5_021F1ECC - mov r1, #0 - bx r3 - nop -_021F1E94: .word ov5_021F1ECC - thumb_func_end ov5_021F1E8C - - thumb_func_start ov5_021F1E98 -ov5_021F1E98: ; 0x021F1E98 - ldr r3, _021F1EA0 ; =ov5_021F1ECC - mov r1, #1 - bx r3 - nop -_021F1EA0: .word ov5_021F1ECC - thumb_func_end ov5_021F1E98 - - thumb_func_start ov5_021F1EA4 -ov5_021F1EA4: ; 0x021F1EA4 - ldr r3, _021F1EAC ; =ov5_021F1ECC - mov r1, #2 - bx r3 - nop -_021F1EAC: .word ov5_021F1ECC - thumb_func_end ov5_021F1EA4 - - thumb_func_start ov5_021F1EB0 -ov5_021F1EB0: ; 0x021F1EB0 - ldr r3, _021F1EB8 ; =ov5_021F1ECC - mov r1, #3 - bx r3 - nop -_021F1EB8: .word ov5_021F1ECC - thumb_func_end ov5_021F1EB0 - - thumb_func_start ov5_021F1EBC -ov5_021F1EBC: ; 0x021F1EBC - ldr r3, _021F1EC4 ; =ov5_021F1ECC - mov r1, #4 - bx r3 - nop -_021F1EC4: .word ov5_021F1ECC - thumb_func_end ov5_021F1EBC - - thumb_func_start ov5_021F1EC8 -ov5_021F1EC8: ; 0x021F1EC8 - mov r0, #0 - bx lr - thumb_func_end ov5_021F1EC8 - - thumb_func_start ov5_021F1ECC -ov5_021F1ECC: ; 0x021F1ECC - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - add r4, r1, #0 - bl sub_02063008 - str r0, [sp, #0xc] - add r0, r5, #0 - bl sub_02063018 - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_02063074 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0206298C - str r0, [sp, #0x14] - add r0, r5, #0 - bl sub_02062990 - str r0, [sp, #0x18] - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r7, r0, #0 - add r0, r5, #0 - bl ov5_021DF578 - mov r1, #0xb - str r0, [sp, #8] - bl ov5_021DF55C - ldr r2, [sp, #0x14] - ldr r3, [sp, #0x18] - add r1, r4, #0 - add r5, r0, #0 - str r4, [sp, #0x1c] - bl ov5_021F1DA4 - str r0, [sp, #0x24] - ldr r2, [sp, #0x14] - ldr r3, [sp, #0x18] - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F1E24 - str r0, [sp, #0x20] - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x10] - add r2, sp, #0x28 - bl sub_02064450 - str r6, [sp, #0x2c] - cmp r4, #5 - bhi _021F1F9E - add r0, r4, r4 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F1F4C: ; jump table - .short _021F1F58 - _021F1F4C - 2 ; case 0 - .short _021F1F58 - _021F1F4C - 2 ; case 1 - .short _021F1F7A - _021F1F4C - 2 ; case 2 - .short _021F1F7A - _021F1F4C - 2 ; case 3 - .short _021F1F58 - _021F1F4C - 2 ; case 4 - .short _021F1F58 - _021F1F4C - 2 ; case 5 -_021F1F58: - mov r0, #2 - lsl r0, r0, #0xe - sub r1, r6, r0 - str r1, [sp, #0x2c] - sub r1, r4, #2 - cmp r1, #1 - bhi _021F1F70 - ldr r1, [sp, #0x30] - lsr r0, r0, #2 - sub r0, r1, r0 - str r0, [sp, #0x30] - b _021F1F9E -_021F1F70: - ldr r1, [sp, #0x30] - lsr r0, r0, #3 - add r0, r1, r0 - str r0, [sp, #0x30] - b _021F1F9E -_021F1F7A: - mov r0, #0xa - lsl r0, r0, #0xc - sub r0, r6, r0 - str r0, [sp, #0x2c] - sub r0, r4, #2 - cmp r0, #1 - bhi _021F1F94 - mov r0, #2 - ldr r1, [sp, #0x30] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x30] - b _021F1F9E -_021F1F94: - mov r0, #2 - ldr r1, [sp, #0x30] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x30] -_021F1F9E: - add r0, sp, #0x1c - str r0, [sp] - ldr r0, [sp, #8] - ldr r1, _021F1FB4 ; =0x02200360 - add r2, sp, #0x28 - mov r3, #0 - str r7, [sp, #4] - bl ov5_021DF72C - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F1FB4: .word 0x02200360 - thumb_func_end ov5_021F1ECC - - thumb_func_start ov5_021F1FB8 -ov5_021F1FB8: ; 0x021F1FB8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715B4 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_020715BC - ldr r1, [r0, #8] - str r1, [r4, #0x18] - ldr r1, [r0, #4] - str r1, [r4, #0x14] - mov r1, #0x1f - str r1, [r4, #0xc] - ldr r0, [r0, #0] - str r0, [r4, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1FB8 - - thumb_func_start ov5_021F1FE0 -ov5_021F1FE0: ; 0x021F1FE0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F1FE0 - - thumb_func_start ov5_021F1FE4 -ov5_021F1FE4: ; 0x021F1FE4 - push {r3, lr} - ldr r2, [r1, #0] - cmp r2, #0 - beq _021F1FF2 - cmp r2, #1 - beq _021F2004 - pop {r3, pc} -_021F1FF2: - ldr r0, [r1, #4] - add r0, r0, #1 - str r0, [r1, #4] - cmp r0, #0x10 - blt _021F2010 - ldr r0, [r1, #0] - add r0, r0, #1 - str r0, [r1, #0] - pop {r3, pc} -_021F2004: - ldr r2, [r1, #0xc] - sub r2, r2, #2 - str r2, [r1, #0xc] - bpl _021F2010 - bl ov5_021DF74C -_021F2010: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F1FE4 - - thumb_func_start ov5_021F2014 -ov5_021F2014: ; 0x021F2014 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #8] - cmp r1, #0 - bne _021F2046 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x14] - mov r2, #0x1f - ldr r0, [r0, #0xc] - mov r1, #1 - lsl r2, r2, #0x10 - bl sub_020B2D8C - ldr r0, [r4, #0x14] - ldr r1, [r4, #0xc] - ldr r0, [r0, #0xc] - bl sub_020B3764 - ldr r0, [r4, #0x18] - add r1, sp, #0 - bl sub_02073BB4 -_021F2046: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2014 - - thumb_func_start ov5_021F204C -ov5_021F204C: ; 0x021F204C - push {r3, r4, r5, lr} - mov r1, #0x4f - mov r2, #0 - lsl r1, r1, #2 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F2078 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F204C - - thumb_func_start ov5_021F2068 -ov5_021F2068: ; 0x021F2068 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F20B8 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F2068 - - thumb_func_start ov5_021F2078 -ov5_021F2078: ; 0x021F2078 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #1 - lsl r1, r1, #8 - ldr r4, _021F20B4 ; =0x02200404 - str r0, [sp, #4] - mov r7, #0 - add r5, r0, r1 - add r6, r0, #4 -_021F208A: - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [r4, #0] - ldr r0, [r0, #0] - add r1, r5, #0 - mov r2, #0 - bl ov5_021DFB00 - add r0, r6, #0 - add r1, r5, #0 - bl sub_02073B70 - add r7, r7, #1 - add r4, r4, #4 - add r5, #0x14 - add r6, #0x54 - cmp r7, #3 - blt _021F208A - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F20B4: .word 0x02200404 - thumb_func_end ov5_021F2078 - - thumb_func_start ov5_021F20B8 -ov5_021F20B8: ; 0x021F20B8 - push {r3, r4, r5, lr} - mov r1, #1 - lsl r1, r1, #8 - mov r4, #0 - add r5, r0, r1 -_021F20C2: - add r0, r5, #0 - bl sub_0207395C - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _021F20C2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F20B8 - - thumb_func_start ov5_021F20D4 -ov5_021F20D4: ; 0x021F20D4 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - mov r1, #0xc - str r4, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x1c] - bl sub_02063050 - add r0, r5, #0 - bl sub_02062C0C - add r1, r0, #1 - add r0, sp, #0x14 - str r0, [sp] - str r1, [sp, #4] - ldr r1, _021F2114 ; =0x02200438 - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_021F2114: .word 0x02200438 - thumb_func_end ov5_021F20D4 - - thumb_func_start ov5_021F2118 -ov5_021F2118: ; 0x021F2118 - push {r4, lr} - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x18] - bl sub_02062910 - str r0, [r4, #0] - ldr r0, [r4, #0x18] - bl sub_02062918 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2118 - - thumb_func_start ov5_021F2144 -ov5_021F2144: ; 0x021F2144 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F2144 - - thumb_func_start ov5_021F2148 -ov5_021F2148: ; 0x021F2148 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x18] - ldr r1, [r4, #0] - add r5, r0, #0 - ldr r2, [r4, #4] - add r0, r6, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F216A - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021F216A: - mov r0, #0 - mov r1, #2 - str r0, [r4, #8] - add r0, r6, #0 - lsl r1, r1, #8 - bl sub_020628D8 - cmp r0, #1 - beq _021F218C - add r0, r6, #0 - bl sub_02062C00 - add r1, r6, #0 - bl sub_02055F00 - cmp r0, #0 - bne _021F2194 -_021F218C: - mov r0, #1 - add sp, #0xc - str r0, [r4, #8] - pop {r3, r4, r5, r6, pc} -_021F2194: - add r0, r6, #0 - bl sub_02062C00 - add r1, r6, #0 - bl sub_02055F88 - str r0, [r4, #0xc] - add r0, r6, #0 - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2148 - - thumb_func_start ov5_021F21B8 -ov5_021F21B8: ; 0x021F21B8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #8] - cmp r1, #1 - beq _021F21DC - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0xc] - add r2, r0, #4 - mov r0, #0x54 - mul r0, r1 - add r0, r2, r0 - add r1, sp, #0 - bl sub_02073BB4 -_021F21DC: - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F21B8 - - thumb_func_start ov5_021F21E0 -ov5_021F21E0: ; 0x021F21E0 - push {r4, lr} - mov r2, #0 - mov r1, #0xc - add r3, r2, #0 - add r4, r0, #0 - bl ov5_021DF53C - str r4, [r0, #8] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F21E0 - - thumb_func_start ov5_021F21F4 -ov5_021F21F4: ; 0x021F21F4 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F226C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F21F4 - - thumb_func_start ov5_021F2204 -ov5_021F2204: ; 0x021F2204 - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] - bx lr - thumb_func_end ov5_021F2204 - - thumb_func_start ov5_021F220C -ov5_021F220C: ; 0x021F220C - push {r3, lr} - ldr r1, [r0, #0] - sub r1, r1, #1 - str r1, [r0, #0] - bpl _021F221A - bl sub_02022974 -_021F221A: - pop {r3, pc} - thumb_func_end ov5_021F220C - - thumb_func_start ov5_021F221C -ov5_021F221C: ; 0x021F221C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021F2264 - mov r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #8] - mov r1, #0xb - mov r2, #0x6d - bl ov5_021DF9E0 - ldr r0, [r4, #8] - mov r1, #0xb - mov r2, #0xb5 - bl ov5_021DFA14 - ldr r0, [r4, #8] - mov r1, #0xc - mov r2, #0xe - mov r3, #1 - bl ov5_021DFA3C - mov r0, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F2268 ; =0x0220044C - mov r2, #0xb - str r0, [sp, #8] - ldr r0, [r4, #8] - mov r1, #0xd - add r3, r2, #0 - bl ov5_021DF864 -_021F2264: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021F2268: .word 0x0220044C - thumb_func_end ov5_021F221C - - thumb_func_start ov5_021F226C -ov5_021F226C: ; 0x021F226C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #1 - bne _021F229A - mov r0, #0 - str r0, [r4, #4] - ldr r0, [r4, #8] - mov r1, #0xb - bl ov5_021DFA08 - ldr r0, [r4, #8] - mov r1, #0xb - bl ov5_021DFA30 - ldr r0, [r4, #8] - mov r1, #0xc - bl ov5_021DFA7C - ldr r0, [r4, #8] - mov r1, #0xd - bl ov5_021DF9D4 -_021F229A: - pop {r4, pc} - thumb_func_end ov5_021F226C - - thumb_func_start ov5_021F229C -ov5_021F229C: ; 0x021F229C - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #0 - bne _021F22A8 - bl ov5_021F221C -_021F22A8: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F229C - - thumb_func_start ov5_021F22AC -ov5_021F22AC: ; 0x021F22AC - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #0 - bne _021F22B8 - bl ov5_021F226C -_021F22B8: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F22AC - - thumb_func_start ov5_021F22BC -ov5_021F22BC: ; 0x021F22BC - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - add r1, sp, #0x14 - bl ov5_021ECDA0 - mov r0, #2 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x1c] - add r0, r4, #0 - mov r1, #0x1c - str r4, [sp, #8] - bl ov5_021DF55C - str r0, [sp, #0xc] - add r0, sp, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r1, _021F2300 ; =0x02200410 - add r0, r4, #0 - add r2, sp, #0x14 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_021F2300: .word 0x02200410 - thumb_func_end ov5_021F22BC - - thumb_func_start ov5_021F2304 -ov5_021F2304: ; 0x021F2304 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x10] - bl ov5_021F229C - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0xc] - mov r1, #0xd - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x18] - ldr r0, [r4, #0x10] - bl ov5_021F2204 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F2304 - - thumb_func_start ov5_021F2344 -ov5_021F2344: ; 0x021F2344 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x18] - bl sub_020211FC - ldr r0, [r4, #0x10] - bl ov5_021F220C - ldr r0, [r4, #0x10] - bl ov5_021F22AC - pop {r4, pc} - thumb_func_end ov5_021F2344 - - thumb_func_start ov5_021F235C -ov5_021F235C: ; 0x021F235C - push {r4, r5, lr} - sub sp, #0x14 - ldr r5, _021F23B4 ; =0x02200424 - add r2, r0, #0 - add r4, r1, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r0, [r4, #8] - cmp r0, #1 - bne _021F2398 - mov r1, #0 - str r1, [r4, #8] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #5 - blt _021F2392 - add r0, r2, #0 - bl ov5_021DF74C - add sp, #0x14 - pop {r4, r5, pc} -_021F2392: - ldr r0, [r4, #0x18] - bl sub_02021380 -_021F2398: - ldr r1, [r4, #4] - ldr r0, [r4, #0x18] - lsl r2, r1, #2 - add r1, sp, #0 - ldr r1, [r1, r2] - bl sub_02021368 - cmp r0, #1 - bne _021F23AE - mov r0, #1 - str r0, [r4, #8] -_021F23AE: - add sp, #0x14 - pop {r4, r5, pc} - nop -_021F23B4: .word 0x02200424 - thumb_func_end ov5_021F235C - - thumb_func_start ov5_021F23B8 -ov5_021F23B8: ; 0x021F23B8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x18] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F23B8 - - thumb_func_start ov5_021F23D0 -ov5_021F23D0: ; 0x021F23D0 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F23FC - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F23D0 - - thumb_func_start ov5_021F23EC -ov5_021F23EC: ; 0x021F23EC - push {r4, lr} - add r4, r0, #0 - bl ov5_021F2424 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F23EC - - thumb_func_start ov5_021F23FC -ov5_021F23FC: ; 0x021F23FC - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x4e - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r4, #0x18 - add r1, r4, #0 - mov r3, #0xa5 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F23FC - - thumb_func_start ov5_021F2424 -ov5_021F2424: ; 0x021F2424 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl sub_0207395C - add r4, #0x18 - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F2424 - - thumb_func_start ov5_021F2438 -ov5_021F2438: ; 0x021F2438 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - mov r1, #0xd - add r4, r0, #0 - bl ov5_021DF55C - str r0, [sp, #0x18] - add r1, sp, #8 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r5, #0 - mov r1, #2 - str r4, [sp, #0x14] - str r5, [sp, #0x1c] - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F2478 ; =0x02200464 - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021F2478: .word 0x02200464 - thumb_func_end ov5_021F2438 - - thumb_func_start ov5_021F247C -ov5_021F247C: ; 0x021F247C - push {r3, lr} - bl sub_02071598 - mov r1, #1 - str r1, [r0, #0xc] - pop {r3, pc} - thumb_func_end ov5_021F247C - - thumb_func_start ov5_021F2488 -ov5_021F2488: ; 0x021F2488 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, r4, #0 - str r0, [r2, #0] - ldr r3, [r4, #0x14] - mov r0, #0 - str r0, [sp] - add r2, r3, #4 - ldr r0, [r4, #0x10] - add r1, #0x1c - add r3, #0x18 - bl ov5_021DFB40 - ldr r1, [r4, #0x14] - add r0, r4, #0 - add r2, r4, #0 - add r0, #0x40 - add r1, r1, #4 - add r2, #0x1c - bl sub_02073B90 - ldr r0, [r4, #0x18] - bl sub_02062910 - str r0, [r4, #4] - ldr r0, [r4, #0x18] - bl sub_02062918 - str r0, [r4, #8] - ldr r4, [r4, #0x18] - add r1, sp, #0x10 - add r0, r4, #0 - bl sub_02063050 - add r0, r4, #0 - add r1, sp, #4 - bl sub_02063078 - ldr r1, [sp, #0x10] - ldr r0, [sp, #4] - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [sp, #8] - add r0, r1, r0 - str r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [sp, #0xc] - add r0, r1, r0 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #0x10 - bl sub_020715D4 - mov r0, #1 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2488 - - thumb_func_start ov5_021F2510 -ov5_021F2510: ; 0x021F2510 - ldr r3, _021F2518 ; =sub_02073AA8 - add r1, #0x1c - add r0, r1, #0 - bx r3 - ; .align 2, 0 -_021F2518: .word sub_02073AA8 - thumb_func_end ov5_021F2510 - - thumb_func_start ov5_021F251C -ov5_021F251C: ; 0x021F251C - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0xc] - ldr r4, [r5, #0x18] - cmp r0, #0 - bne _021F2544 - ldr r1, [r5, #4] - ldr r2, [r5, #8] - add r0, r4, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F2568 - add r0, r6, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r4, r5, r6, pc} -_021F2544: - add r0, r5, #0 - add r0, #0x1c - bl sub_02073B40 - cmp r0, #1 - bne _021F255A - add r0, r6, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r4, r5, r6, pc} -_021F255A: - add r0, r5, #0 - mov r1, #1 - add r0, #0x1c - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 -_021F2568: - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _021F259E - add r0, r4, #0 - add r1, sp, #0xc - bl sub_02063050 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02063078 - ldr r1, [sp, #0xc] - ldr r0, [sp] - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r0, [sp, #4] - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [sp, #8] - add r0, r1, r0 - str r0, [sp, #0x14] - add r0, r6, #0 - add r1, sp, #0xc - bl sub_020715D4 -_021F259E: - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F251C - - thumb_func_start ov5_021F25A4 -ov5_021F25A4: ; 0x021F25A4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x40 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F25A4 - - thumb_func_start ov5_021F25C0 -ov5_021F25C0: ; 0x021F25C0 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x6c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F25EC - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F25C0 - - thumb_func_start ov5_021F25DC -ov5_021F25DC: ; 0x021F25DC - push {r4, lr} - add r4, r0, #0 - bl ov5_021F2610 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F25DC - - thumb_func_start ov5_021F25EC -ov5_021F25EC: ; 0x021F25EC - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x51 - bl ov5_021DFB00 - add r0, r4, #0 - add r0, #0x18 - add r1, r4, #4 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F25EC - - thumb_func_start ov5_021F2610 -ov5_021F2610: ; 0x021F2610 - ldr r3, _021F2618 ; =sub_0207395C - add r0, r0, #4 - bx r3 - nop -_021F2618: .word sub_0207395C - thumb_func_end ov5_021F2610 - - thumb_func_start ov5_021F261C -ov5_021F261C: ; 0x021F261C - push {r4, r5, r6, lr} - sub sp, #0x30 - add r4, r1, #0 - add r6, r2, #0 - add r2, sp, #0x14 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r5, r0, #0 - str r1, [r2, #8] - str r3, [sp, #0x20] - bl ov5_021DF578 - mov r1, #0xf - str r0, [sp, #0x24] - bl ov5_021DF55C - str r0, [sp, #0x28] - ldr r0, [sp, #0x40] - str r5, [sp, #0x2c] - cmp r0, #0 - bne _021F2666 - add r0, r5, #0 - bl sub_02062C00 - mov r1, #2 - lsl r2, r4, #0x10 - lsl r1, r1, #0xe - add r2, r2, r1 - str r2, [sp, #0x14] - lsl r2, r6, #0x10 - add r1, r2, r1 - str r1, [sp, #0x1c] - add r1, sp, #0x14 - bl sub_020644A4 - b _021F2682 -_021F2666: - ldr r3, _021F26A0 ; =0x02200484 - add r2, sp, #8 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, sp, #0x14 - str r0, [r2, #0] - add r0, r5, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #8 - bl sub_020630AC -_021F2682: - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0x20 - str r1, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x24] - ldr r1, _021F26A4 ; =0x02200490 - ldr r3, [sp, #0x40] - add r2, sp, #0x14 - bl ov5_021DF72C - add sp, #0x30 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F26A0: .word 0x02200484 -_021F26A4: .word 0x02200490 - thumb_func_end ov5_021F261C - - thumb_func_start ov5_021F26A8 -ov5_021F26A8: ; 0x021F26A8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - bl sub_020715BC - add r7, r0, #0 - add r2, r5, #0 - add r3, r7, #0 - ldr r4, [r7, #0xc] - add r2, #0x24 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r4, #0 - bl sub_02062910 - str r0, [r5, #0xc] - add r0, r4, #0 - bl sub_02062918 - str r0, [r5, #0x10] - ldr r0, [r7, #0] - str r0, [r5, #8] - add r0, r6, #0 - bl sub_020715B4 - str r0, [r5, #0x18] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [r5, #0x1c] - lsr r0, r0, #2 - str r0, [r5, #0x20] - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F26A8 - - thumb_func_start ov5_021F26F0 -ov5_021F26F0: ; 0x021F26F0 - push {lr} - sub sp, #0xc - ldr r0, [r1, #0x30] - add r1, sp, #0 - mov r2, #0 - str r2, [r1, #0] - str r2, [r1, #4] - str r2, [r1, #8] - bl sub_020630AC - add sp, #0xc - pop {pc} - thumb_func_end ov5_021F26F0 - - thumb_func_start ov5_021F2708 -ov5_021F2708: ; 0x021F2708 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r1, #0 - ldr r4, [r5, #0x30] - ldr r1, [r5, #0xc] - add r6, r0, #0 - ldr r2, [r5, #0x10] - add r0, r4, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F272A - add r0, r6, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r4, r5, r6, pc} -_021F272A: - mov r0, #0 - str r0, [r5, #0] - add r0, r4, #0 - bl sub_0206298C - mov r1, #0 - mvn r1, r1 - str r0, [r5, #4] - cmp r0, r1 - bne _021F2746 - mov r0, #1 - add sp, #0x18 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_021F2746: - ldr r1, [r5, #0x18] - cmp r1, #0 - beq _021F27B0 - str r0, [r5, #8] - ldr r1, [r5, #0x1c] - ldr r0, [r5, #0x20] - add r2, r1, r0 - mov r1, #1 - lsl r1, r1, #0xe - str r2, [r5, #0x1c] - cmp r2, r1 - blt _021F2768 - str r1, [r5, #0x1c] - ldr r0, [r5, #0x20] - neg r0, r0 - str r0, [r5, #0x20] - b _021F2776 -_021F2768: - lsr r0, r1, #2 - cmp r2, r0 - bgt _021F2776 - str r0, [r5, #0x1c] - ldr r0, [r5, #0x20] - neg r0, r0 - str r0, [r5, #0x20] -_021F2776: - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [r5, #0x1c] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x10] - mov r0, #1 - lsl r0, r0, #0xe - str r0, [sp, #0x14] - add r0, r4, #0 - add r1, sp, #0xc - bl sub_020630AC - add r0, r4, #0 - add r1, sp, #0 - bl sub_02063050 - mov r0, #1 - ldr r1, [r5, #0x1c] - lsl r0, r0, #0xc - sub r0, r1, r0 - ldr r2, [sp, #4] - add r1, sp, #0 - add r0, r2, r0 - str r0, [sp, #4] - add r0, r6, #0 - bl sub_020715D4 -_021F27B0: - add sp, #0x18 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F2708 - - thumb_func_start ov5_021F27B4 -ov5_021F27B4: ; 0x021F27B4 - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - add r3, r1, #0 - add r6, r0, #0 - ldr r0, [r3, #0] - cmp r0, #1 - beq _021F282A - mov r0, #0 - ldr r1, [r3, #8] - mvn r0, r0 - cmp r1, r0 - beq _021F282A - ldr r0, [r3, #0x14] - ldr r5, _021F2830 ; =0x02200478 - add r0, r0, #1 - str r0, [r3, #0x14] - ldmia r5!, {r0, r1} - add r4, sp, #0 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - mov r2, #0 - str r0, [r4, #0] - ldr r4, [r3, #0x2c] - ldr r0, [r3, #8] - add r4, #0x18 - cmp r0, #3 - bhi _021F2808 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F27F6: ; jump table - .short _021F27FE - _021F27F6 - 2 ; case 0 - .short _021F2808 - _021F27F6 - 2 ; case 1 - .short _021F2802 - _021F27F6 - 2 ; case 2 - .short _021F2806 - _021F27F6 - 2 ; case 3 -_021F27FE: - mov r2, #0xb4 - b _021F2808 -_021F2802: - ldr r2, _021F2834 ; =0x0000010E - b _021F2808 -_021F2806: - mov r2, #0x5a -_021F2808: - mov r1, #0 - lsl r2, r2, #0x10 - add r0, sp, #0x18 - lsr r2, r2, #0x10 - add r3, r1, #0 - bl sub_0201E2E0 - add r0, r6, #0 - add r1, sp, #0xc - bl sub_020715E4 - add r0, r4, #0 - add r1, sp, #0xc - add r2, sp, #0 - add r3, sp, #0x18 - bl sub_02073BA4 -_021F282A: - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - nop -_021F2830: .word 0x02200478 -_021F2834: .word 0x0000010E - thumb_func_end ov5_021F27B4 - - thumb_func_start ov5_021F2838 -ov5_021F2838: ; 0x021F2838 - push {r4, lr} - add r4, r1, #0 - bl sub_02071598 - mov r1, #1 - str r4, [r0, #0x18] - lsl r1, r1, #0xc - str r1, [r0, #0x1c] - lsr r1, r1, #2 - str r1, [r0, #0x20] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2838 - - thumb_func_start ov5_021F2850 -ov5_021F2850: ; 0x021F2850 - push {r4, lr} - mov r2, #0 - mov r1, #0x7c - add r3, r2, #0 - add r4, r0, #0 - bl ov5_021DF53C - str r4, [r0, #0x10] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2850 - - thumb_func_start ov5_021F2864 -ov5_021F2864: ; 0x021F2864 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F28C0 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F2864 - - thumb_func_start ov5_021F2874 -ov5_021F2874: ; 0x021F2874 - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] - bx lr - thumb_func_end ov5_021F2874 - - thumb_func_start ov5_021F287C -ov5_021F287C: ; 0x021F287C - push {r3, lr} - ldr r1, [r0, #0] - sub r1, r1, #1 - str r1, [r0, #0] - bpl _021F288A - bl sub_02022974 -_021F288A: - pop {r3, pc} - thumb_func_end ov5_021F287C - - thumb_func_start ov5_021F288C -ov5_021F288C: ; 0x021F288C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _021F28BA - mov r0, #1 - str r0, [sp] - add r1, r4, #0 - ldr r0, [r4, #0x10] - add r1, #0x14 - mov r2, #0 - mov r3, #0x52 - bl ov5_021DFB00 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0x28 - add r1, #0x14 - bl sub_02073B70 - mov r0, #1 - str r0, [r4, #4] -_021F28BA: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F288C - - thumb_func_start ov5_021F28C0 -ov5_021F28C0: ; 0x021F28C0 - push {r3, lr} - ldr r1, [r0, #4] - cmp r1, #1 - bne _021F28D2 - mov r1, #0 - str r1, [r0, #4] - add r0, #0x14 - bl sub_0207395C -_021F28D2: - pop {r3, pc} - thumb_func_end ov5_021F28C0 - - thumb_func_start ov5_021F28D4 -ov5_021F28D4: ; 0x021F28D4 - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #0 - bne _021F28E0 - bl ov5_021F288C -_021F28E0: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F28D4 - - thumb_func_start ov5_021F28E4 -ov5_021F28E4: ; 0x021F28E4 - push {r3, lr} - ldr r1, [r0, #0] - cmp r1, #0 - bne _021F28F0 - bl ov5_021F28C0 -_021F28F0: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F28E4 - - thumb_func_start ov5_021F28F4 -ov5_021F28F4: ; 0x021F28F4 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r6, r1, #0 - add r7, r2, #0 - add r2, sp, #0xc - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - str r3, [sp, #8] - add r5, r0, #0 - str r1, [r2, #8] - bl ov5_021DF578 - add r4, r0, #0 - ldr r0, [sp, #8] - str r4, [sp, #0x1c] - str r0, [sp, #0x18] - add r0, r5, #0 - bl sub_02062C00 - str r0, [sp, #0x20] - add r0, r4, #0 - mov r1, #0x10 - bl ov5_021DF55C - str r0, [sp, #0x24] - ldr r0, [sp, #0x40] - str r5, [sp, #0x28] - cmp r0, #0 - bne _021F294A - mov r0, #2 - lsl r1, r6, #0x10 - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0xc] - lsl r1, r7, #0x10 - add r0, r1, r0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - add r1, sp, #0xc - bl sub_020644A4 - b _021F2952 -_021F294A: - add r0, r5, #0 - add r1, sp, #0xc - bl sub_02063050 -_021F2952: - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0x18 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F2970 ; =0x022004B0 - ldr r3, [sp, #0x40] - add r0, r4, #0 - add r2, sp, #0xc - bl ov5_021DF72C - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F2970: .word 0x022004B0 - thumb_func_end ov5_021F28F4 - - thumb_func_start ov5_021F2974 -ov5_021F2974: ; 0x021F2974 - push {r4, lr} - add r4, r1, #0 - bl sub_02071598 - str r4, [r0, #0xc] - pop {r4, pc} - thumb_func_end ov5_021F2974 - - thumb_func_start ov5_021F2980 -ov5_021F2980: ; 0x021F2980 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r2, r0, #0 - add r6, r2, #0 - add r3, r4, #0 - ldmia r6!, {r0, r1} - add r3, #0x10 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r0, [r2, #0] - str r0, [r4, #4] - add r0, r5, #0 - bl sub_020715B4 - str r0, [r4, #0xc] - ldr r0, [r4, #0x1c] - bl ov5_021F28D4 - ldr r0, [r4, #0x1c] - bl ov5_021F2874 - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2980 - - thumb_func_start ov5_021F29BC -ov5_021F29BC: ; 0x021F29BC - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x1c] - bl ov5_021F287C - ldr r0, [r4, #0x1c] - bl ov5_021F28E4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F29BC - - thumb_func_start ov5_021F29D0 -ov5_021F29D0: ; 0x021F29D0 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [r1, #0xc] - ldr r4, [r1, #0x20] - cmp r0, #0 - beq _021F29FE - add r1, sp, #0xc - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - bl sub_020630AC - add r0, r4, #0 - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 -_021F29FE: - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F29D0 - - thumb_func_start ov5_021F2A04 -ov5_021F2A04: ; 0x021F2A04 - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - add r3, r1, #0 - add r6, r0, #0 - ldr r0, [r3, #0] - cmp r0, #1 - beq _021F2A70 - ldr r0, [r3, #8] - ldr r5, _021F2A74 ; =0x022004A4 - add r0, r0, #1 - str r0, [r3, #8] - ldmia r5!, {r0, r1} - add r4, sp, #0 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - mov r2, #0 - str r0, [r4, #0] - ldr r4, [r3, #0x1c] - ldr r0, [r3, #4] - add r4, #0x28 - cmp r0, #3 - bhi _021F2A4E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F2A3C: ; jump table - .short _021F2A44 - _021F2A3C - 2 ; case 0 - .short _021F2A4E - _021F2A3C - 2 ; case 1 - .short _021F2A48 - _021F2A3C - 2 ; case 2 - .short _021F2A4C - _021F2A3C - 2 ; case 3 -_021F2A44: - mov r2, #0xb4 - b _021F2A4E -_021F2A48: - ldr r2, _021F2A78 ; =0x0000010E - b _021F2A4E -_021F2A4C: - mov r2, #0x5a -_021F2A4E: - mov r1, #0 - lsl r2, r2, #0x10 - add r0, sp, #0x18 - lsr r2, r2, #0x10 - add r3, r1, #0 - bl sub_0201E2E0 - add r0, r6, #0 - add r1, sp, #0xc - bl sub_020715E4 - add r0, r4, #0 - add r1, sp, #0xc - add r2, sp, #0 - add r3, sp, #0x18 - bl sub_02073BA4 -_021F2A70: - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021F2A74: .word 0x022004A4 -_021F2A78: .word 0x0000010E - thumb_func_end ov5_021F2A04 - - thumb_func_start ov5_021F2A7C -ov5_021F2A7C: ; 0x021F2A7C - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F2AA8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2A7C - - thumb_func_start ov5_021F2A98 -ov5_021F2A98: ; 0x021F2A98 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F2AD0 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F2A98 - - thumb_func_start ov5_021F2AA8 -ov5_021F2AA8: ; 0x021F2AA8 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0xf - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r4, #0x18 - add r1, r4, #0 - mov r3, #0xa0 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F2AA8 - - thumb_func_start ov5_021F2AD0 -ov5_021F2AD0: ; 0x021F2AD0 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl sub_0207395C - add r4, #0x18 - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F2AD0 - - thumb_func_start ov5_021F2AE4 -ov5_021F2AE4: ; 0x021F2AE4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - bl ov5_021DF578 - mov r1, #0x11 - str r0, [sp, #8] - bl ov5_021DF55C - str r0, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #0x10 - bl sub_02064450 - mov r0, #1 - ldr r2, [sp, #0x18] - lsl r1, r4, #3 - lsl r0, r0, #0xc - add r0, r1, r0 - add r0, r2, r0 - str r0, [sp, #0x18] - add r0, r5, #0 - bl sub_02063010 - lsl r1, r0, #0xf - mov r0, #2 - lsl r0, r0, #0xe - sub r0, r1, r0 - str r0, [sp, #0x14] - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, _021F2B44 ; =0x022004C4 - add r2, sp, #0x10 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F2B44: .word 0x022004C4 - thumb_func_end ov5_021F2AE4 - - thumb_func_start ov5_021F2B48 -ov5_021F2B48: ; 0x021F2B48 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl sub_020715BC - ldr r3, [r0, #4] - ldr r1, [r0, #0] - mov r0, #0 - str r1, [r4, #0x78] - str r3, [r4, #0x7c] - str r0, [sp] - add r2, r3, #4 - ldr r0, [r4, #0x78] - add r1, r4, #0 - add r3, #0x18 - bl ov5_021DFB40 - ldr r1, [r4, #0x7c] - add r0, r4, #0 - add r0, #0x24 - add r1, r1, #4 - add r2, r4, #0 - bl sub_02073B90 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2B48 - - thumb_func_start ov5_021F2B80 -ov5_021F2B80: ; 0x021F2B80 - ldr r3, _021F2B88 ; =sub_02073AA8 - add r0, r1, #0 - bx r3 - nop -_021F2B88: .word sub_02073AA8 - thumb_func_end ov5_021F2B80 - - thumb_func_start ov5_021F2B8C -ov5_021F2B8C: ; 0x021F2B8C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02073B40 - cmp r0, #1 - bne _021F2BA4 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, pc} -_021F2BA4: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2B8C - - thumb_func_start ov5_021F2BB4 -ov5_021F2BB4: ; 0x021F2BB4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x24 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2BB4 - - thumb_func_start ov5_021F2BD0 -ov5_021F2BD0: ; 0x021F2BD0 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F2BFC - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2BD0 - - thumb_func_start ov5_021F2BEC -ov5_021F2BEC: ; 0x021F2BEC - push {r4, lr} - add r4, r0, #0 - bl ov5_021F2C24 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F2BEC - - thumb_func_start ov5_021F2BFC -ov5_021F2BFC: ; 0x021F2BFC - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x10 - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r4, #0x18 - add r1, r4, #0 - mov r3, #0xa1 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F2BFC - - thumb_func_start ov5_021F2C24 -ov5_021F2C24: ; 0x021F2C24 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl sub_0207395C - add r4, #0x18 - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F2C24 - - thumb_func_start ov5_021F2C38 -ov5_021F2C38: ; 0x021F2C38 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - add r7, r3, #0 - bl ov5_021DF578 - mov r1, #0x12 - str r0, [sp, #8] - bl ov5_021DF55C - str r0, [sp, #0xc] - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #0x10 - bl sub_02064450 - ldr r1, [sp, #0x18] - lsl r0, r4, #3 - add r0, r1, r0 - str r0, [sp, #0x18] - add r0, r5, #0 - bl sub_02063010 - lsl r1, r0, #0xf - mov r0, #2 - lsl r0, r0, #0xe - sub r0, r1, r0 - str r0, [sp, #0x14] - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, _021F2C94 ; =0x022004D8 - add r2, sp, #0x10 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021F2C94: .word 0x022004D8 - thumb_func_end ov5_021F2C38 - - thumb_func_start ov5_021F2C98 -ov5_021F2C98: ; 0x021F2C98 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl sub_020715BC - ldr r3, [r0, #4] - ldr r1, [r0, #0] - mov r0, #0 - str r1, [r4, #0x78] - str r3, [r4, #0x7c] - str r0, [sp] - add r2, r3, #4 - ldr r0, [r4, #0x78] - add r1, r4, #0 - add r3, #0x18 - bl ov5_021DFB40 - ldr r1, [r4, #0x7c] - add r0, r4, #0 - add r0, #0x24 - add r1, r1, #4 - add r2, r4, #0 - bl sub_02073B90 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2C98 - - thumb_func_start ov5_021F2CD0 -ov5_021F2CD0: ; 0x021F2CD0 - ldr r3, _021F2CD8 ; =sub_02073AA8 - add r0, r1, #0 - bx r3 - nop -_021F2CD8: .word sub_02073AA8 - thumb_func_end ov5_021F2CD0 - - thumb_func_start ov5_021F2CDC -ov5_021F2CDC: ; 0x021F2CDC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02073B40 - cmp r0, #1 - bne _021F2CF4 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, pc} -_021F2CF4: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2CDC - - thumb_func_start ov5_021F2D04 -ov5_021F2D04: ; 0x021F2D04 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x24 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2D04 - - thumb_func_start ov5_021F2D20 -ov5_021F2D20: ; 0x021F2D20 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F2D4C - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2D20 - - thumb_func_start ov5_021F2D3C -ov5_021F2D3C: ; 0x021F2D3C - push {r4, lr} - add r4, r0, #0 - bl ov5_021F2E2C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F2D3C - - thumb_func_start ov5_021F2D4C -ov5_021F2D4C: ; 0x021F2D4C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0x53 - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0x54 - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #0 - mov r2, #0xaa - bl ov5_021DFA14 - ldr r0, [r4, #0] - mov r1, #3 - mov r2, #0xab - bl ov5_021DFA14 - ldr r0, [r4, #0] - mov r1, #4 - mov r2, #0xac - bl ov5_021DFA14 - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0xad - bl ov5_021DFA14 - mov r1, #0 - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #1 - bl ov5_021DFA3C - mov r2, #1 - ldr r0, [r4, #0] - mov r1, #4 - add r3, r2, #0 - bl ov5_021DFA3C - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #2 - mov r3, #1 - bl ov5_021DFA3C - ldr r0, [r4, #0] - mov r1, #6 - mov r2, #3 - mov r3, #1 - bl ov5_021DFA3C - mov r1, #0 - str r1, [sp] - ldr r0, _021F2E1C ; =0x02200540 - str r1, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - add r2, r1, #0 - add r3, r1, #0 - bl ov5_021DF864 - mov r0, #4 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F2E20 ; =0x02200558 - mov r1, #5 - str r0, [sp, #8] - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #3 - bl ov5_021DF864 - mov r2, #5 - str r2, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F2E24 ; =0x02200528 - mov r1, #6 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r3, #4 - bl ov5_021DF864 - mov r0, #6 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F2E28 ; =0x02200570 - mov r2, #5 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #7 - add r3, r2, #0 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021F2E1C: .word 0x02200540 -_021F2E20: .word 0x02200558 -_021F2E24: .word 0x02200528 -_021F2E28: .word 0x02200570 - thumb_func_end ov5_021F2D4C - - thumb_func_start ov5_021F2E2C -ov5_021F2E2C: ; 0x021F2E2C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #0 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #5 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #0 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #3 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #4 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #5 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #0 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #4 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #5 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #6 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #0 - bl ov5_021DF9D4 - ldr r0, [r4, #0] - mov r1, #5 - bl ov5_021DF9D4 - ldr r0, [r4, #0] - mov r1, #6 - bl ov5_021DF9D4 - ldr r0, [r4, #0] - mov r1, #7 - bl ov5_021DF9D4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2E2C - - thumb_func_start ov5_021F2EA4 -ov5_021F2EA4: ; 0x021F2EA4 - push {r4, r5, r6, lr} - sub sp, #0x30 - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02063020 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_02063030 - str r0, [sp, #0xc] - add r0, r5, #0 - bl sub_02063040 - str r0, [sp, #0x10] - add r0, r4, #0 - str r4, [sp, #0x18] - bl ov5_021DF574 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0x13 - bl ov5_021DF55C - str r0, [sp, #0x1c] - add r0, r5, #0 - add r1, sp, #0x24 - str r5, [sp, #0x20] - bl sub_02063050 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F2F08 ; =0x022004EC - add r0, r4, #0 - add r2, sp, #0x24 - add r3, r6, #0 - bl ov5_021DF72C - add sp, #0x30 - pop {r4, r5, r6, pc} - nop -_021F2F08: .word 0x022004EC - thumb_func_end ov5_021F2EA4 - - thumb_func_start ov5_021F2F0C -ov5_021F2F0C: ; 0x021F2F0C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x18 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x30] - bl sub_02062924 - str r0, [r4, #4] - ldr r0, [r4, #0x30] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x30] - bl sub_02062918 - str r0, [r4, #0xc] - ldr r0, [r4, #0x18] - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x20] - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #0x30] - bl sub_02063074 - str r0, [sp, #4] - ldr r0, [r4, #0x24] - add r1, sp, #0 - bl sub_020644A4 - str r0, [r4, #0x14] - mov r0, #2 - ldr r1, [sp] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp] - mov r0, #0x12 - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0x28] - mov r1, #0 - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x34] - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #0 - bne _021F2F9A - mov r0, #1 - str r0, [r4, #0] -_021F2F9A: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F2F0C - - thumb_func_start ov5_021F2FA0 -ov5_021F2FA0: ; 0x021F2FA0 - ldr r3, _021F2FA8 ; =sub_020211FC - ldr r0, [r1, #0x34] - bx r3 - nop -_021F2FA8: .word sub_020211FC - thumb_func_end ov5_021F2FA0 - - thumb_func_start ov5_021F2FAC -ov5_021F2FAC: ; 0x021F2FAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - ldr r6, [r4, #0x30] - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F2FD0 - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F2FD0: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021F3008 - add r0, r5, #0 - add r1, sp, #0xc - bl sub_020715E4 - ldr r0, [r4, #0x18] - add r1, sp, #0 - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x20] - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [r4, #0x24] - bl sub_020644A4 - str r0, [r4, #0x14] - cmp r0, #1 - bne _021F3008 - ldr r0, [sp, #4] - add r1, sp, #0xc - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_020715D4 -_021F3008: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F301A - cmp r0, #1 - beq _021F303E - cmp r0, #2 - beq _021F304C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F301A: - mov r1, #1 - ldr r0, [r4, #0x34] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x34] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #0xc - blt _021F3086 - mov r0, #1 - add sp, #0x18 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021F303E: - mov r1, #3 - ldr r0, [r4, #0x34] - lsl r1, r1, #0xe - bl sub_02021380 - mov r0, #2 - str r0, [r4, #0] -_021F304C: - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F3066 - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F3066: - add r0, r6, #0 - bl sub_02063020 - add r7, r0, #0 - add r0, r6, #0 - bl sub_02063040 - ldr r1, [r4, #0x18] - cmp r1, r7 - bne _021F3080 - ldr r1, [r4, #0x20] - cmp r1, r0 - beq _021F3086 -_021F3080: - add r0, r5, #0 - bl ov5_021DF74C -_021F3086: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F2FAC - - thumb_func_start ov5_021F308C -ov5_021F308C: ; 0x021F308C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - bl sub_020627B4 - cmp r0, #0 - bne _021F30AE - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r4, r5, pc} -_021F30AE: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x34] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F308C - - thumb_func_start ov5_021F30C4 -ov5_021F30C4: ; 0x021F30C4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #8 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, sp, #0 - str r0, [r2, #0] - add r0, r5, #0 - bl sub_020715E4 - ldr r0, [r4, #0x14] - mov r1, #0 - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x1c] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F30C4 - - thumb_func_start ov5_021F30FC -ov5_021F30FC: ; 0x021F30FC - ldr r3, _021F3104 ; =sub_020211FC - ldr r0, [r1, #0x1c] - bx r3 - nop -_021F3104: .word sub_020211FC - thumb_func_end ov5_021F30FC - - thumb_func_start ov5_021F3108 -ov5_021F3108: ; 0x021F3108 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F3116 - cmp r0, #1 - pop {r4, pc} -_021F3116: - mov r1, #1 - ldr r0, [r4, #0x1c] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x1c] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #0xc - blt _021F3138 - mov r0, #1 - str r0, [r4, #4] - str r0, [r4, #0] -_021F3138: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3108 - - thumb_func_start ov5_021F313C -ov5_021F313C: ; 0x021F313C - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x1c] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F313C - - thumb_func_start ov5_021F3154 -ov5_021F3154: ; 0x021F3154 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - ldr r6, [r0, #0x40] - add r5, r1, #0 - add r4, r2, #0 - str r0, [sp, #0x10] - add r0, r6, #0 - mov r1, #0x13 - add r7, r3, #0 - str r5, [sp, #8] - str r4, [sp, #0xc] - str r6, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - mov r0, #2 - lsl r1, r5, #0x10 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x20] - mov r0, #9 - lsl r1, r4, #0x10 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x24] - add r0, sp, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r1, _021F31A4 ; =0x02200514 - add r0, r6, #0 - add r2, sp, #0x1c - add r3, r7, #0 - bl ov5_021DF72C - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F31A4: .word 0x02200514 - thumb_func_end ov5_021F3154 - - thumb_func_start ov5_021F31A8 -ov5_021F31A8: ; 0x021F31A8 - push {r3, lr} - bl sub_02071598 - ldr r0, [r0, #4] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F31A8 - - thumb_func_start ov5_021F31B4 -ov5_021F31B4: ; 0x021F31B4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x10 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r5, #0 - bl sub_020715B4 - str r0, [r4, #0xc] - ldr r0, [r4, #0x10] - lsl r1, r0, #0x10 - mov r0, #2 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #0x14] - lsl r1, r0, #0x10 - mov r0, #9 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r4, #0x18] - add r1, sp, #0 - bl sub_020644A4 - mov r0, #1 - ldr r1, [sp, #4] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _021F321E - cmp r0, #1 - beq _021F3222 - cmp r0, #2 - b _021F3226 -_021F321E: - mov r1, #5 - b _021F3228 -_021F3222: - mov r1, #6 - b _021F3228 -_021F3226: - mov r1, #7 -_021F3228: - ldr r0, [r4, #0x1c] - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x24] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F31B4 - - thumb_func_start ov5_021F3238 -ov5_021F3238: ; 0x021F3238 - ldr r3, _021F3240 ; =sub_020211FC - ldr r0, [r1, #0x24] - bx r3 - nop -_021F3240: .word sub_020211FC - thumb_func_end ov5_021F3238 - - thumb_func_start ov5_021F3244 -ov5_021F3244: ; 0x021F3244 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F3252 - cmp r0, #1 - pop {r4, pc} -_021F3252: - mov r1, #1 - ldr r0, [r4, #0x24] - lsl r1, r1, #0xc - bl sub_02021368 - cmp r0, #1 - bne _021F326A - mov r0, #1 - str r0, [r4, #4] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021F326A: - pop {r4, pc} - thumb_func_end ov5_021F3244 - - thumb_func_start ov5_021F326C -ov5_021F326C: ; 0x021F326C - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x24] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F326C - - thumb_func_start ov5_021F3284 -ov5_021F3284: ; 0x021F3284 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F32B0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3284 - - thumb_func_start ov5_021F32A0 -ov5_021F32A0: ; 0x021F32A0 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F32F4 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F32A0 - - thumb_func_start ov5_021F32B0 -ov5_021F32B0: ; 0x021F32B0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #3 - mov r2, #0x56 - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #2 - mov r2, #0xae - bl ov5_021DFA14 - ldr r0, [r4, #0] - mov r1, #2 - mov r2, #5 - mov r3, #1 - bl ov5_021DFA3C - mov r3, #2 - mov r1, #3 - str r3, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F32F0 ; =0x0220059C - add r2, r1, #0 - str r0, [sp, #8] - ldr r0, [r4, #0] - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021F32F0: .word 0x0220059C - thumb_func_end ov5_021F32B0 - - thumb_func_start ov5_021F32F4 -ov5_021F32F4: ; 0x021F32F4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #3 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #2 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #2 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #3 - bl ov5_021DF9D4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F32F4 - - thumb_func_start ov5_021F331C -ov5_021F331C: ; 0x021F331C - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062C00 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0x15 - str r4, [sp, #0x18] - bl ov5_021DF55C - str r0, [sp, #0x1c] - add r1, sp, #8 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r5, #0 - mov r1, #2 - str r5, [sp, #0x20] - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F3368 ; =0x02200588 - add r0, r4, #0 - add r2, sp, #8 - add r3, r6, #0 - bl ov5_021DF72C - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021F3368: .word 0x02200588 - thumb_func_end ov5_021F331C - - thumb_func_start ov5_021F336C -ov5_021F336C: ; 0x021F336C - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, sp, #0 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r5, r0, #0 - str r1, [r2, #8] - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x14 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x20] - bl sub_02062924 - str r0, [r4, #4] - ldr r0, [r4, #0x20] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x20] - bl sub_02062918 - str r0, [r4, #0xc] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0x18] - mov r1, #3 - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x24] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F336C - - thumb_func_start ov5_021F33C4 -ov5_021F33C4: ; 0x021F33C4 - ldr r3, _021F33CC ; =sub_020211FC - ldr r0, [r1, #0x24] - bx r3 - nop -_021F33CC: .word sub_020211FC - thumb_func_end ov5_021F33C4 - - thumb_func_start ov5_021F33D0 -ov5_021F33D0: ; 0x021F33D0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - ldr r7, [r4, #0x20] - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - add r0, r7, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F33F0 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, r6, r7, pc} -_021F33F0: - add r0, r5, #0 - bl sub_020715B4 - add r6, r0, #0 - cmp r6, #1 - bne _021F340E - add r0, r7, #0 - bl sub_02062EC8 - cmp r0, #0 - bne _021F340E - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, r6, r7, pc} -_021F340E: - ldr r0, [r4, #0] - cmp r0, #0 - bne _021F3444 - mov r1, #1 - ldr r0, [r4, #0x24] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x24] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #0xc - blt _021F3444 - cmp r6, #0 - bne _021F343C - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, r6, r7, pc} -_021F343C: - ldr r0, [r4, #0x24] - mov r1, #0 - bl sub_02021380 -_021F3444: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F33D0 - - thumb_func_start ov5_021F3448 -ov5_021F3448: ; 0x021F3448 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x20] - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F346C - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021F346C: - add r0, r6, #0 - add r1, sp, #0 - bl sub_02063050 - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [r4, #0x24] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3448 - - thumb_func_start ov5_021F348C -ov5_021F348C: ; 0x021F348C - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #8 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #4] - bl ov5_021F34D0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F348C - - thumb_func_start ov5_021F34A8 -ov5_021F34A8: ; 0x021F34A8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F358C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F34A8 - - thumb_func_start ov5_021F34B8 -ov5_021F34B8: ; 0x021F34B8 - push {r3, lr} - mov r1, #0x17 - bl ov5_021DF55C - ldr r1, [r0, #0] - cmp r1, #1 - beq _021F34CE - mov r1, #1 - str r1, [r0, #0] - bl ov5_021F3518 -_021F34CE: - pop {r3, pc} - thumb_func_end ov5_021F34B8 - - thumb_func_start ov5_021F34D0 -ov5_021F34D0: ; 0x021F34D0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #0x58 - bl ov5_021DF9E0 - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #0xaf - bl ov5_021DFA14 - mov r1, #7 - ldr r0, [r4, #4] - add r2, r1, #0 - mov r3, #1 - bl ov5_021DFA3C - mov r0, #7 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3514 ; =0x022005D8 - mov r2, #6 - str r0, [sp, #8] - ldr r0, [r4, #4] - mov r1, #8 - add r3, r2, #0 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - nop -_021F3514: .word 0x022005D8 - thumb_func_end ov5_021F34D0 - - thumb_func_start ov5_021F3518 -ov5_021F3518: ; 0x021F3518 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #0xc - mov r2, #0x9f - bl ov5_021DF9E0 - ldr r0, [r4, #4] - mov r1, #0xd - mov r2, #0x9d - bl ov5_021DF9E0 - ldr r0, [r4, #4] - mov r1, #0xe - mov r2, #0x9e - bl ov5_021DF9E0 - mov r0, #7 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3588 ; =0x022005D8 - mov r1, #0xe - str r0, [sp, #8] - ldr r0, [r4, #4] - mov r2, #0xc - mov r3, #6 - bl ov5_021DF864 - mov r0, #7 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3588 ; =0x022005D8 - mov r1, #0xf - str r0, [sp, #8] - ldr r0, [r4, #4] - mov r2, #0xd - mov r3, #6 - bl ov5_021DF864 - mov r0, #7 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3588 ; =0x022005D8 - mov r1, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #4] - mov r2, #0xe - mov r3, #6 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021F3588: .word 0x022005D8 - thumb_func_end ov5_021F3518 - - thumb_func_start ov5_021F358C -ov5_021F358C: ; 0x021F358C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #6 - bl ov5_021DFA08 - ldr r0, [r4, #4] - mov r1, #6 - bl ov5_021DFA30 - ldr r0, [r4, #4] - mov r1, #7 - bl ov5_021DFA7C - ldr r0, [r4, #4] - mov r1, #8 - bl ov5_021DF9D4 - ldr r0, [r4, #0] - cmp r0, #1 - bne _021F35E6 - ldr r0, [r4, #4] - mov r1, #0xc - bl ov5_021DFA08 - ldr r0, [r4, #4] - mov r1, #0xd - bl ov5_021DFA08 - ldr r0, [r4, #4] - mov r1, #0xe - bl ov5_021DFA08 - ldr r0, [r4, #4] - mov r1, #0xe - bl ov5_021DF9D4 - ldr r0, [r4, #4] - mov r1, #0xf - bl ov5_021DF9D4 - ldr r0, [r4, #4] - mov r1, #0x10 - bl ov5_021DF9D4 -_021F35E6: - pop {r4, pc} - thumb_func_end ov5_021F358C - - thumb_func_start ov5_021F35E8 -ov5_021F35E8: ; 0x021F35E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - add r4, r2, #0 - add r0, r5, #0 - add r6, r3, #0 - bl sub_02062C00 - str r0, [r4, #0] - str r7, [r4, #4] - add r0, r7, #0 - mov r1, #0x17 - bl ov5_021DF55C - str r0, [r4, #8] - add r0, r5, #0 - add r1, r6, #0 - str r5, [r4, #0xc] - bl sub_02063050 - add r0, r5, #0 - bl sub_02063020 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02063040 - add r1, r0, #0 - add r0, r4, #0 - add r2, r6, #0 - bl sub_02064450 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - ldr r1, [sp, #0x18] - str r0, [r1, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F35E8 - - thumb_func_start ov5_021F3638 -ov5_021F3638: ; 0x021F3638 - push {r3, r4, r5, lr} - sub sp, #0x28 - add r5, r0, #0 - bl ov5_021DF578 - add r1, sp, #8 - str r1, [sp] - add r1, r5, #0 - add r2, sp, #0xc - add r3, sp, #0x1c - add r4, r0, #0 - bl ov5_021F35E8 - mov r0, #2 - ldr r1, [sp, #0x24] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x24] - add r0, sp, #0xc - str r0, [sp] - ldr r0, [sp, #8] - ldr r1, _021F3674 ; =0x022005C4 - str r0, [sp, #4] - add r0, r4, #0 - add r2, sp, #0x1c - mov r3, #0 - bl ov5_021DF72C - add sp, #0x28 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021F3674: .word 0x022005C4 - thumb_func_end ov5_021F3638 - - thumb_func_start ov5_021F3678 -ov5_021F3678: ; 0x021F3678 - push {r4, r5, r6, lr} - sub sp, #0x58 - ldr r6, _021F36EC ; =0x022005F0 - add r5, r0, #0 - add r4, r1, #0 - add r3, sp, #0xc - mov r2, #6 -_021F3686: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021F3686 - add r0, r5, #0 - bl ov5_021DF578 - add r1, sp, #8 - str r1, [sp] - add r1, r5, #0 - add r2, sp, #0x3c - add r3, sp, #0x4c - add r6, r0, #0 - bl ov5_021F35E8 - ldr r0, [sp, #0x44] - ldr r0, [r0, #0] - cmp r0, #1 - beq _021F36B0 - bl sub_02022974 -_021F36B0: - mov r0, #0xc - mul r0, r4 - add r1, sp, #0xc - ldr r2, [sp, #0x4c] - ldr r1, [r1, r0] - add r3, r4, #0 - add r1, r2, r1 - str r1, [sp, #0x4c] - add r1, sp, #0x10 - ldr r2, [sp, #0x50] - ldr r1, [r1, r0] - add r1, r2, r1 - str r1, [sp, #0x50] - add r1, sp, #0x14 - ldr r0, [r1, r0] - ldr r2, [sp, #0x54] - ldr r1, _021F36F0 ; =0x022005C4 - add r0, r2, r0 - str r0, [sp, #0x54] - add r0, sp, #0x3c - str r0, [sp] - ldr r0, [sp, #8] - add r2, sp, #0x4c - str r0, [sp, #4] - add r0, r6, #0 - bl ov5_021DF72C - add sp, #0x58 - pop {r4, r5, r6, pc} - nop -_021F36EC: .word 0x022005F0 -_021F36F0: .word 0x022005C4 - thumb_func_end ov5_021F3678 - - thumb_func_start ov5_021F36F4 -ov5_021F36F4: ; 0x021F36F4 - push {r4, r5, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x1c] - bl sub_02062910 - str r0, [r4, #4] - ldr r0, [r4, #0x1c] - bl sub_02062918 - str r0, [r4, #8] - add r0, r5, #0 - add r1, sp, #0x10 - bl sub_020715E4 - ldr r3, _021F3750 ; =0x022005B4 - add r2, sp, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - bl sub_020715B4 - add r1, r0, #0 - lsl r2, r1, #2 - add r1, sp, #0 - ldr r1, [r1, r2] - ldr r0, [r4, #0x14] - add r2, sp, #0x10 - bl ov5_021DF84C - str r0, [r4, #0x20] - mov r0, #1 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 -_021F3750: .word 0x022005B4 - thumb_func_end ov5_021F36F4 - - thumb_func_start ov5_021F3754 -ov5_021F3754: ; 0x021F3754 - ldr r3, _021F375C ; =sub_020211FC - ldr r0, [r1, #0x20] - bx r3 - nop -_021F375C: .word sub_020211FC - thumb_func_end ov5_021F3754 - - thumb_func_start ov5_021F3760 -ov5_021F3760: ; 0x021F3760 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _021F378E - mov r1, #1 - ldr r0, [r4, #0x20] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x20] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #9 - blt _021F378E - add r0, r5, #0 - bl ov5_021DF74C -_021F378E: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F3760 - - thumb_func_start ov5_021F3790 -ov5_021F3790: ; 0x021F3790 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x20] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F3790 - - thumb_func_start ov5_021F37A8 -ov5_021F37A8: ; 0x021F37A8 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F37D4 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F37A8 - - thumb_func_start ov5_021F37C4 -ov5_021F37C4: ; 0x021F37C4 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F381C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F37C4 - - thumb_func_start ov5_021F37D4 -ov5_021F37D4: ; 0x021F37D4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #7 - mov r2, #0x59 - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #7 - mov r2, #0xb0 - bl ov5_021DFA14 - mov r1, #8 - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #1 - bl ov5_021DFA3C - mov r0, #8 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3818 ; =0x02200634 - mov r2, #7 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #9 - add r3, r2, #0 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - nop -_021F3818: .word 0x02200634 - thumb_func_end ov5_021F37D4 - - thumb_func_start ov5_021F381C -ov5_021F381C: ; 0x021F381C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #7 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #7 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #8 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #9 - bl ov5_021DF9D4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F381C - - thumb_func_start ov5_021F3844 -ov5_021F3844: ; 0x021F3844 - push {r4, r5, r6, lr} - sub sp, #0x30 - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02063020 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_02063030 - str r0, [sp, #0xc] - add r0, r5, #0 - bl sub_02063040 - str r0, [sp, #0x10] - add r0, r4, #0 - str r4, [sp, #0x18] - bl ov5_021DF574 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0x18 - bl ov5_021DF55C - str r0, [sp, #0x1c] - add r0, r5, #0 - add r1, sp, #0x24 - str r5, [sp, #0x20] - bl sub_02063050 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F38A8 ; =0x02200620 - add r0, r4, #0 - add r2, sp, #0x24 - add r3, r6, #0 - bl ov5_021DF72C - add sp, #0x30 - pop {r4, r5, r6, pc} - nop -_021F38A8: .word 0x02200620 - thumb_func_end ov5_021F3844 - - thumb_func_start ov5_021F38AC -ov5_021F38AC: ; 0x021F38AC - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x18 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x30] - bl sub_02062924 - str r0, [r4, #4] - ldr r0, [r4, #0x30] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x30] - bl sub_02062918 - str r0, [r4, #0xc] - ldr r0, [r4, #0x18] - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x20] - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #0x30] - bl sub_02063074 - str r0, [sp, #4] - ldr r0, [r4, #0x24] - add r1, sp, #0 - bl sub_020644A4 - str r0, [r4, #0x14] - mov r0, #2 - ldr r1, [sp] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp] - mov r0, #0x12 - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0x28] - mov r1, #9 - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x34] - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #0 - bne _021F393A - mov r0, #1 - str r0, [r4, #0] -_021F393A: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F38AC - - thumb_func_start ov5_021F3940 -ov5_021F3940: ; 0x021F3940 - ldr r3, _021F3948 ; =sub_020211FC - ldr r0, [r1, #0x34] - bx r3 - nop -_021F3948: .word sub_020211FC - thumb_func_end ov5_021F3940 - - thumb_func_start ov5_021F394C -ov5_021F394C: ; 0x021F394C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - ldr r6, [r4, #0x30] - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F3970 - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F3970: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021F39A8 - add r0, r5, #0 - add r1, sp, #0xc - bl sub_020715E4 - ldr r0, [r4, #0x18] - add r1, sp, #0 - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x20] - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [r4, #0x24] - bl sub_020644A4 - str r0, [r4, #0x14] - cmp r0, #1 - bne _021F39A8 - ldr r0, [sp, #4] - add r1, sp, #0xc - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_020715D4 -_021F39A8: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F39BA - cmp r0, #1 - beq _021F39DE - cmp r0, #2 - beq _021F39F4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F39BA: - mov r1, #1 - ldr r0, [r4, #0x34] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x34] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #0xc - blt _021F3A14 - mov r0, #1 - add sp, #0x18 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021F39DE: - mov r1, #3 - ldr r0, [r4, #0x34] - lsl r1, r1, #0xe - bl sub_02021380 - ldr r0, [r4, #0x34] - mov r1, #0 - bl sub_02021368 - mov r0, #2 - str r0, [r4, #0] -_021F39F4: - add r0, r6, #0 - bl sub_02063020 - add r7, r0, #0 - add r0, r6, #0 - bl sub_02063040 - ldr r1, [r4, #0x18] - cmp r1, r7 - bne _021F3A0E - ldr r1, [r4, #0x20] - cmp r1, r0 - beq _021F3A14 -_021F3A0E: - add r0, r5, #0 - bl ov5_021DF74C -_021F3A14: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F394C - - thumb_func_start ov5_021F3A18 -ov5_021F3A18: ; 0x021F3A18 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - bl sub_020627B4 - cmp r0, #0 - bne _021F3A3A - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r4, r5, pc} -_021F3A3A: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x34] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3A18 - - thumb_func_start ov5_021F3A50 -ov5_021F3A50: ; 0x021F3A50 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F3A7C - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3A50 - - thumb_func_start ov5_021F3A6C -ov5_021F3A6C: ; 0x021F3A6C - push {r4, lr} - add r4, r0, #0 - bl ov5_021F3AC4 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F3A6C - - thumb_func_start ov5_021F3A7C -ov5_021F3A7C: ; 0x021F3A7C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #8 - mov r2, #0x5a - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #8 - mov r2, #0xb1 - bl ov5_021DFA14 - mov r1, #9 - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #1 - bl ov5_021DFA3C - mov r0, #9 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3AC0 ; =0x02200660 - mov r2, #8 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0xa - add r3, r2, #0 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - nop -_021F3AC0: .word 0x02200660 - thumb_func_end ov5_021F3A7C - - thumb_func_start ov5_021F3AC4 -ov5_021F3AC4: ; 0x021F3AC4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #8 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #8 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #9 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #0xa - bl ov5_021DF9D4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3AC4 - - thumb_func_start ov5_021F3AEC -ov5_021F3AEC: ; 0x021F3AEC - push {r4, r5, r6, lr} - sub sp, #0x30 - add r5, r0, #0 - add r6, r1, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02063020 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_02063030 - str r0, [sp, #0xc] - add r0, r5, #0 - bl sub_02063040 - str r0, [sp, #0x10] - add r0, r4, #0 - str r4, [sp, #0x18] - bl ov5_021DF574 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0x19 - bl ov5_021DF55C - str r0, [sp, #0x1c] - add r0, r5, #0 - add r1, sp, #0x24 - str r5, [sp, #0x20] - bl sub_02063050 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F3B50 ; =0x0220064C - add r0, r4, #0 - add r2, sp, #0x24 - add r3, r6, #0 - bl ov5_021DF72C - add sp, #0x30 - pop {r4, r5, r6, pc} - nop -_021F3B50: .word 0x0220064C - thumb_func_end ov5_021F3AEC - - thumb_func_start ov5_021F3B54 -ov5_021F3B54: ; 0x021F3B54 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x18 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x30] - bl sub_02062924 - str r0, [r4, #4] - ldr r0, [r4, #0x30] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x30] - bl sub_02062918 - str r0, [r4, #0xc] - ldr r0, [r4, #0x18] - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x20] - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #0x30] - bl sub_02063074 - str r0, [sp, #4] - ldr r0, [r4, #0x24] - add r1, sp, #0 - bl sub_020644A4 - str r0, [r4, #0x14] - mov r0, #0x1e - ldr r1, [sp] - lsl r0, r0, #0xa - add r0, r1, r0 - str r0, [sp] - mov r0, #2 - ldr r1, [sp, #4] - lsl r0, r0, #0xe - sub r0, r1, r0 - str r0, [sp, #4] - mov r0, #0xd - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0x28] - mov r1, #0xa - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x34] - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #0 - bne _021F3BEC - mov r0, #1 - str r0, [r4, #0] -_021F3BEC: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3B54 - - thumb_func_start ov5_021F3BF4 -ov5_021F3BF4: ; 0x021F3BF4 - ldr r3, _021F3BFC ; =sub_020211FC - ldr r0, [r1, #0x34] - bx r3 - nop -_021F3BFC: .word sub_020211FC - thumb_func_end ov5_021F3BF4 - - thumb_func_start ov5_021F3C00 -ov5_021F3C00: ; 0x021F3C00 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - ldr r6, [r4, #0x30] - ldr r1, [r4, #4] - add r5, r0, #0 - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - add r0, r6, #0 - bl sub_020627B4 - cmp r0, #0 - bne _021F3C24 - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F3C24: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _021F3C5C - add r0, r5, #0 - add r1, sp, #0xc - bl sub_020715E4 - ldr r0, [r4, #0x18] - add r1, sp, #0 - lsl r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x20] - lsl r0, r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [r4, #0x24] - bl sub_020644A4 - str r0, [r4, #0x14] - cmp r0, #1 - bne _021F3C5C - ldr r0, [sp, #4] - add r1, sp, #0xc - str r0, [sp, #0x10] - add r0, r5, #0 - bl sub_020715D4 -_021F3C5C: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F3C6E - cmp r0, #1 - beq _021F3C92 - cmp r0, #2 - beq _021F3CA8 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_021F3C6E: - mov r1, #1 - ldr r0, [r4, #0x34] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x34] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #2 - blt _021F3CC8 - mov r0, #1 - add sp, #0x18 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} -_021F3C92: - mov r1, #2 - ldr r0, [r4, #0x34] - lsl r1, r1, #0xc - bl sub_02021380 - ldr r0, [r4, #0x34] - mov r1, #0 - bl sub_02021368 - mov r0, #2 - str r0, [r4, #0] -_021F3CA8: - add r0, r6, #0 - bl sub_02063020 - add r7, r0, #0 - add r0, r6, #0 - bl sub_02063040 - ldr r1, [r4, #0x18] - cmp r1, r7 - bne _021F3CC2 - ldr r1, [r4, #0x20] - cmp r1, r0 - beq _021F3CC8 -_021F3CC2: - add r0, r5, #0 - bl ov5_021DF74C -_021F3CC8: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F3C00 - - thumb_func_start ov5_021F3CCC -ov5_021F3CCC: ; 0x021F3CCC - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - ldr r1, [r4, #8] - ldr r2, [r4, #0xc] - bl sub_02062764 - cmp r0, #0 - bne _021F3CEC - add r0, r5, #0 - bl ov5_021DF74C - add sp, #0xc - pop {r4, r5, pc} -_021F3CEC: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x34] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F3CCC - - thumb_func_start ov5_021F3D00 -ov5_021F3D00: ; 0x021F3D00 - push {r3, r4, r5, lr} - mov r1, #0x69 - mov r2, #0 - lsl r1, r1, #2 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F3D2C - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F3D00 - - thumb_func_start ov5_021F3D1C -ov5_021F3D1C: ; 0x021F3D1C - push {r4, lr} - add r4, r0, #0 - bl ov5_021F3D6C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F3D1C - - thumb_func_start ov5_021F3D2C -ov5_021F3D2C: ; 0x021F3D2C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r6, _021F3D68 ; =0x02200678 - str r0, [sp, #4] - mov r7, #0 - add r4, r0, #4 - add r5, #0x54 -_021F3D3C: - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - ldr r3, [r6, #0] - ldr r0, [r0, #0] - add r1, r4, #0 - mov r2, #0 - bl ov5_021DFB00 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02073B70 - add r7, r7, #1 - add r6, r6, #4 - add r4, #0x14 - add r5, #0x54 - cmp r7, #4 - blt _021F3D3C - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F3D68: .word 0x02200678 - thumb_func_end ov5_021F3D2C - - thumb_func_start ov5_021F3D6C -ov5_021F3D6C: ; 0x021F3D6C - push {r3, r4, r5, lr} - mov r4, #0 - add r5, r0, #4 -_021F3D72: - add r0, r5, #0 - bl sub_0207395C - add r4, r4, #1 - add r5, #0x14 - cmp r4, #4 - blt _021F3D72 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3D6C - - thumb_func_start ov5_021F3D84 -ov5_021F3D84: ; 0x021F3D84 - mov r2, #0x54 - add r0, #0x54 - mul r2, r1 - add r0, r0, r2 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F3D84 - - thumb_func_start ov5_021F3D90 -ov5_021F3D90: ; 0x021F3D90 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021DF578 - add r6, r0, #0 - bl ov5_021DF574 - add r7, r0, #0 - add r0, r5, #0 - bl sub_02063020 - str r0, [sp, #8] - add r0, r5, #0 - bl sub_02063040 - add r1, r0, #0 - ldr r0, [sp, #8] - add r2, sp, #0x20 - bl sub_02064450 - add r0, r7, #0 - add r1, sp, #0x20 - bl sub_020644A4 - add r0, r6, #0 - mov r1, #0x1a - str r4, [sp, #0xc] - str r6, [sp, #0x10] - bl ov5_021DF55C - add r1, r4, #0 - str r0, [sp, #0x14] - str r5, [sp, #0x18] - bl ov5_021F3D84 - str r0, [sp, #0x1c] - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0xc - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F3DFC ; =0x02200688 - add r0, r6, #0 - add r2, sp, #0x20 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_021F3DFC: .word 0x02200688 - thumb_func_end ov5_021F3D90 - - thumb_func_start ov5_021F3E00 -ov5_021F3E00: ; 0x021F3E00 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_020715BC - add r3, r0, #0 - ldr r4, [r3, #0xc] - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x10 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r4, #0 - bl sub_02062910 - str r0, [r5, #8] - add r0, r4, #0 - bl sub_02062918 - str r0, [r5, #0xc] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F3E00 - - thumb_func_start ov5_021F3E30 -ov5_021F3E30: ; 0x021F3E30 - push {r4, lr} - add r2, r1, #0 - ldr r4, [r2, #0x1c] - ldr r1, [r2, #8] - ldr r2, [r2, #0xc] - add r0, r4, #0 - bl sub_02062764 - cmp r0, #1 - bne _021F3E4C - add r0, r4, #0 - mov r1, #0 - bl sub_0206A218 -_021F3E4C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3E30 - - thumb_func_start ov5_021F3E50 -ov5_021F3E50: ; 0x021F3E50 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F3E50 - - thumb_func_start ov5_021F3E54 -ov5_021F3E54: ; 0x021F3E54 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #4] - cmp r1, #1 - beq _021F3E6E - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x20] - add r1, sp, #0 - bl sub_02073BB4 -_021F3E6E: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3E54 - - thumb_func_start ov5_021F3E74 -ov5_021F3E74: ; 0x021F3E74 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F3EA0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3E74 - - thumb_func_start ov5_021F3E90 -ov5_021F3E90: ; 0x021F3E90 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F3EE8 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F3E90 - - thumb_func_start ov5_021F3EA0 -ov5_021F3EA0: ; 0x021F3EA0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #0x6b - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #9 - mov r2, #0xb4 - bl ov5_021DFA14 - ldr r0, [r4, #0] - mov r1, #0xa - mov r2, #0xc - mov r3, #1 - bl ov5_021DFA3C - mov r0, #0xa - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F3EE4 ; =0x022006B0 - mov r2, #9 - str r0, [sp, #8] - ldr r0, [r4, #0] - mov r1, #0xb - add r3, r2, #0 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - nop -_021F3EE4: .word 0x022006B0 - thumb_func_end ov5_021F3EA0 - - thumb_func_start ov5_021F3EE8 -ov5_021F3EE8: ; 0x021F3EE8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #9 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #9 - bl ov5_021DFA30 - ldr r0, [r4, #0] - mov r1, #0xa - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #0xb - bl ov5_021DF9D4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3EE8 - - thumb_func_start ov5_021F3F10 -ov5_021F3F10: ; 0x021F3F10 - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062C00 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0x1b - str r4, [sp, #0x18] - bl ov5_021DF55C - str r0, [sp, #0x1c] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x20] - bl sub_02063050 - add r0, r5, #0 - bl sub_02063020 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02063040 - add r1, r0, #0 - add r0, r6, #0 - add r2, sp, #8 - bl sub_02064450 - add r0, r5, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F3F70 ; =0x0220069C - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021F3F70: .word 0x0220069C - thumb_func_end ov5_021F3F10 - - thumb_func_start ov5_021F3F74 -ov5_021F3F74: ; 0x021F3F74 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x1c] - bl sub_02062910 - str r0, [r4, #4] - ldr r0, [r4, #0x1c] - bl sub_02062918 - str r0, [r4, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x14] - mov r1, #0xb - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x20] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov5_021F3F74 - - thumb_func_start ov5_021F3FB8 -ov5_021F3FB8: ; 0x021F3FB8 - ldr r3, _021F3FC0 ; =sub_020211FC - ldr r0, [r1, #0x20] - bx r3 - nop -_021F3FC0: .word sub_020211FC - thumb_func_end ov5_021F3FB8 - - thumb_func_start ov5_021F3FC4 -ov5_021F3FC4: ; 0x021F3FC4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _021F3FF2 - mov r1, #1 - ldr r0, [r4, #0x20] - lsl r1, r1, #0xc - bl sub_02021368 - ldr r0, [r4, #0x20] - bl sub_020213D4 - asr r1, r0, #0xb - lsr r1, r1, #0x14 - add r1, r0, r1 - asr r0, r1, #0xc - cmp r0, #7 - blt _021F3FF2 - add r0, r5, #0 - bl ov5_021DF74C -_021F3FF2: - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F3FC4 - - thumb_func_start ov5_021F3FF4 -ov5_021F3FF4: ; 0x021F3FF4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [r4, #0x20] - add r1, sp, #0 - bl sub_020212A8 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F3FF4 - - thumb_func_start ov5_021F4018 -ov5_021F4018: ; 0x021F4018 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x80 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F4044 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4018 - - thumb_func_start ov5_021F4034 -ov5_021F4034: ; 0x021F4034 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F407C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F4034 - - thumb_func_start ov5_021F4044 -ov5_021F4044: ; 0x021F4044 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x6f - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x18 - mov r3, #0xa6 - bl ov5_021DFB24 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r4, #0x3c - add r1, r4, #0 - mov r3, #0xa7 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F4044 - - thumb_func_start ov5_021F407C -ov5_021F407C: ; 0x021F407C - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl sub_0207395C - add r0, r4, #0 - add r0, #0x18 - bl sub_02073AA8 - add r4, #0x3c - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F407C - - thumb_func_start ov5_021F4098 -ov5_021F4098: ; 0x021F4098 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r1, sp, #0x1c - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - ldr r0, [sp, #8] - mov r1, #0x1e - ldr r0, [r0, #0x40] - str r0, [sp, #0x10] - bl ov5_021DF4E4 - cmp r0, #0 - bne _021F40C2 - ldr r0, [sp, #0x10] - mov r1, #0x1e - bl ov5_021DF4A8 -_021F40C2: - ldr r0, [sp, #0x10] - mov r1, #0x1e - bl ov5_021DF55C - add r7, r0, #0 - ldr r0, [sp, #0x10] - str r7, [sp, #0x18] - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - cmp r0, #1 - beq _021F411A - add r4, r7, #0 - add r4, #0x60 - mov r6, #1 - mov r5, #0x10 -_021F40E0: - mov r0, #2 - lsl r1, r5, #0xc - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x1c] - mov r0, #0x4e - lsl r0, r0, #0xe - str r0, [sp, #0x24] - ldr r0, [sp, #8] - add r1, sp, #0x1c - mov r2, #0 - bl sub_020644D0 - str r0, [sp, #0x20] - add r0, sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - ldr r1, _021F4168 ; =0x022006C8 - add r2, sp, #0x1c - mov r3, #0 - bl ov5_021DF72C - add r6, r6, #1 - add r5, #0x10 - stmia r4!, {r0} - cmp r6, #5 - blt _021F40E0 -_021F411A: - ldr r0, [sp, #0xc] - cmp r0, #0 - beq _021F4162 - mov r5, #0x12 - add r7, #0x70 - lsl r4, r5, #4 - add r6, sp, #0x1c -_021F4128: - mov r0, #2 - lsl r1, r4, #0xc - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x1c] - mov r0, #0x4e - lsl r0, r0, #0xe - str r0, [sp, #0x24] - ldr r0, [sp, #8] - add r1, r6, #0 - mov r2, #0 - bl sub_020644D0 - str r0, [sp, #0x20] - add r0, sp, #0x14 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - ldr r1, _021F4168 ; =0x022006C8 - add r2, r6, #0 - mov r3, #0 - bl ov5_021DF72C - add r5, r5, #1 - add r4, #0x10 - stmia r7!, {r0} - cmp r5, #0x16 - blt _021F4128 -_021F4162: - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F4168: .word 0x022006C8 - thumb_func_end ov5_021F4098 - - thumb_func_start ov5_021F416C -ov5_021F416C: ; 0x021F416C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r0, [r0, #0x40] - add r4, r1, #0 - mov r1, #0x1e - str r0, [sp, #4] - bl ov5_021DF4E4 - cmp r0, #1 - beq _021F4184 - bl sub_02022974 -_021F4184: - ldr r0, [sp, #4] - mov r1, #0x1e - bl ov5_021DF55C - cmp r4, #0 - bne _021F4196 - add r5, r0, #0 - add r5, #0x60 - b _021F419A -_021F4196: - add r5, r0, #0 - add r5, #0x70 -_021F419A: - mov r7, #4 - mov r6, #0 - cmp r7, #0 - ble _021F41EC - ble _021F41EC -_021F41A4: - ldr r0, [r5, #0] - bl sub_02071598 - add r4, r0, #0 - mov r0, #1 - str r0, [r4, #0] - add r0, r4, #4 - bl sub_02073A90 - add r0, r4, #4 - bl sub_02073974 - add r0, r4, #0 - add r0, #0x80 - ldr r3, [r0, #0] - mov r0, #0 - str r0, [sp] - add r2, r3, #4 - ldr r0, [sp, #4] - add r1, r4, #4 - add r3, #0x3c - bl ov5_021DFB40 - add r1, r4, #0 - add r1, #0x80 - ldr r1, [r1, #0] - add r0, r4, #0 - add r0, #0x28 - add r1, r1, #4 - add r2, r4, #4 - bl sub_02073B90 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r7 - blt _021F41A4 -_021F41EC: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F416C - - thumb_func_start ov5_021F41F0 -ov5_021F41F0: ; 0x021F41F0 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl sub_020715BC - ldr r2, [r0, #0] - ldr r1, [r0, #4] - add r0, r4, #0 - str r2, [r4, #0x7c] - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r3, [r0, #0] - mov r0, #0 - str r0, [sp] - add r2, r3, #4 - ldr r0, [r4, #0x7c] - add r1, r4, #4 - add r3, #0x18 - bl ov5_021DFB40 - add r1, r4, #0 - add r1, #0x80 - ldr r1, [r1, #0] - add r0, r4, #0 - add r0, #0x28 - add r1, r1, #4 - add r2, r4, #4 - bl sub_02073B90 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F41F0 - - thumb_func_start ov5_021F4234 -ov5_021F4234: ; 0x021F4234 - ldr r3, _021F423C ; =sub_02073AA8 - add r0, r1, #4 - bx r3 - nop -_021F423C: .word sub_02073AA8 - thumb_func_end ov5_021F4234 - - thumb_func_start ov5_021F4240 -ov5_021F4240: ; 0x021F4240 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r2, #1 - cmp r0, #1 - bne _021F4262 - add r0, r4, #4 - bl sub_02073B40 - cmp r0, #1 - bne _021F4260 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, pc} -_021F4260: - mov r2, #0 -_021F4262: - mov r1, #1 - add r0, r4, #4 - lsl r1, r1, #0xc - bl sub_02073AC0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4240 - - thumb_func_start ov5_021F4270 -ov5_021F4270: ; 0x021F4270 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x28 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4270 - - thumb_func_start ov5_021F428C -ov5_021F428C: ; 0x021F428C - push {r3, r4, r5, lr} - mov r1, #2 - mov r2, #0 - lsl r1, r1, #8 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #8] - bl ov5_021F431C - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F428C - - thumb_func_start ov5_021F42A8 -ov5_021F42A8: ; 0x021F42A8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021F42BA - bl sub_020181C4 -_021F42BA: - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021F42C8 - bl sub_020181C4 -_021F42C8: - add r0, r4, #0 - bl ov5_021F4370 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F42A8 - - thumb_func_start ov5_021F42D8 -ov5_021F42D8: ; 0x021F42D8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #0x1f - add r7, r0, #0 - add r4, r2, #0 - bl ov5_021DF55C - add r6, r0, #0 - str r4, [r6, #4] - str r5, [r6, #0] - cmp r5, #0 - beq _021F4302 - mov r2, #0 - add r0, r7, #0 - lsl r1, r5, #2 - add r3, r2, #0 - bl ov5_021DF53C - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r6, r1] -_021F4302: - cmp r4, #0 - beq _021F4318 - mov r2, #0 - add r0, r7, #0 - lsl r1, r4, #2 - add r3, r2, #0 - bl ov5_021DF53C - mov r1, #0x7f - lsl r1, r1, #2 - str r0, [r6, r1] -_021F4318: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F42D8 - - thumb_func_start ov5_021F431C -ov5_021F431C: ; 0x021F431C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r7, #0 - ldr r4, _021F4368 ; =0x022006DC - mov r6, #0 - add r5, #0xc -_021F4328: - mov r0, #0 - str r0, [sp] - ldr r0, [r7, #8] - ldr r3, [r4, #0] - add r1, r5, #0 - mov r2, #0 - bl ov5_021DFB00 - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x14 - cmp r6, #3 - blt _021F4328 - add r5, r7, #0 - ldr r4, _021F436C ; =0x02200720 - mov r6, #0 - add r5, #0x48 -_021F434A: - mov r0, #0 - str r0, [sp] - ldr r0, [r7, #8] - ldr r3, [r4, #0] - add r1, r5, #0 - mov r2, #0 - bl ov5_021DFB24 - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x24 - cmp r6, #0xc - blt _021F434A - pop {r3, r4, r5, r6, r7, pc} - nop -_021F4368: .word 0x022006DC -_021F436C: .word 0x02200720 - thumb_func_end ov5_021F431C - - thumb_func_start ov5_021F4370 -ov5_021F4370: ; 0x021F4370 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r5, #0 - mov r6, #0 - add r4, #0xc -_021F437A: - add r0, r4, #0 - bl sub_0207395C - add r6, r6, #1 - add r4, #0x14 - cmp r6, #3 - blt _021F437A - mov r4, #0 - add r5, #0x48 -_021F438C: - add r0, r5, #0 - bl sub_02073AA8 - add r4, r4, #1 - add r5, #0x24 - cmp r4, #0xc - blt _021F438C - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F4370 - - thumb_func_start ov5_021F439C -ov5_021F439C: ; 0x021F439C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r0, #0x40] - mov r1, #0x1f - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r5, [sp, #0x2c] - bl ov5_021DF55C - add r6, r0, #0 - ldr r0, [sp, #0x28] - cmp r0, #0 - bne _021F43C0 - ldr r4, [r6, #0] - mov r0, #0x7e - b _021F43C4 -_021F43C0: - ldr r4, [r6, #4] - mov r0, #0x7f -_021F43C4: - lsl r0, r0, #2 - ldr r7, [r6, r0] - cmp r4, #0 - bne _021F43D0 - bl sub_02022974 -_021F43D0: - ldr r0, [sp, #4] - mov r1, #0 - strh r0, [r5, #2] - ldr r0, [sp, #8] - cmp r4, #0 - strh r0, [r5, #4] - ldr r0, [sp, #0xc] - str r0, [r5, #8] - ldr r0, [sp] - str r0, [r5, #0x10] - str r6, [r5, #0xc] - ble _021F4400 - add r2, r7, #0 -_021F43EA: - ldr r0, [r2, #0] - cmp r0, #0 - bne _021F43F8 - lsl r0, r1, #2 - add sp, #0x10 - add r0, r7, r0 - pop {r3, r4, r5, r6, r7, pc} -_021F43F8: - add r1, r1, #1 - add r2, r2, #4 - cmp r1, r4 - blt _021F43EA -_021F4400: - bl sub_02022974 - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F439C - - thumb_func_start ov5_021F440C -ov5_021F440C: ; 0x021F440C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r2, r0, #0 - add r6, r2, #0 - add r3, r4, #0 - ldmia r6!, {r0, r1} - add r3, #0x84 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #2 - str r0, [r3, #0] - ldrsh r0, [r2, r1] - mov r3, #4 - strh r0, [r4, #2] - ldrsh r0, [r2, r3] - strh r0, [r4, #4] - mov r0, #1 - ldrsb r2, [r2, r0] - lsl r0, r0, #0xc - strb r2, [r4, #1] - str r0, [r4, #8] - ldrsh r0, [r4, r1] - ldrsh r1, [r4, r3] - add r2, sp, #0 - bl sub_02064450 - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, sp, #0 - bl sub_020644A4 - add r4, #0x8c - mov r0, #6 - ldr r1, [r4, #0] - lsl r0, r0, #0xc - add r0, r1, r0 - ldr r2, [sp, #4] - add r1, sp, #0 - add r0, r2, r0 - str r0, [sp, #4] - add r0, r5, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021F440C - - thumb_func_start ov5_021F4474 -ov5_021F4474: ; 0x021F4474 - push {r4, r5, lr} - sub sp, #0x1c - ldr r5, [r0, #0x40] - mov r4, #0 - str r4, [sp] - add r4, sp, #8 - str r4, [sp, #4] - bl ov5_021F439C - add r4, r0, #0 - add r0, sp, #8 - mov r2, #0 - str r0, [sp] - ldr r1, _021F44A0 ; =0x0220070C - add r0, r5, #0 - add r3, r2, #0 - str r2, [sp, #4] - bl ov5_021DF72C - str r0, [r4, #0] - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 -_021F44A0: .word 0x0220070C - thumb_func_end ov5_021F4474 - - thumb_func_start ov5_021F44A4 -ov5_021F44A4: ; 0x021F44A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - bl sub_02071598 - add r7, r0, #0 - ldr r0, [r7, #0x6c] - str r0, [sp, #4] - ldr r0, [r7, #0x74] - cmp r0, #0 - beq _021F44BC - bl sub_02022974 -_021F44BC: - mov r2, #1 - ldr r0, [sp, #4] - str r2, [r7, #0] - ldr r0, [r0, #8] - mov r1, #0x94 - mov r3, #0 - bl ov5_021DF53C - str r0, [r7, #0x74] - ldr r1, [r7, #0x6c] - add r0, r7, #0 - add r0, #0xc - add r1, #0xc - bl sub_02073B70 - mov r0, #0 - str r0, [sp, #8] - add r5, r0, #0 - ldr r0, [sp, #4] - ldr r4, _021F4538 ; =0x022006E8 - str r0, [sp, #0xc] - add r0, #0xc - str r0, [sp, #0xc] - ldr r0, [sp, #4] - str r0, [sp, #0x10] - add r0, #0x48 - str r0, [sp, #0x10] - add r0, r7, #0 - str r0, [sp, #0x14] - add r0, #0xc - str r0, [sp, #0x14] -_021F44FA: - mov r0, #0 - str r0, [sp] - ldr r3, [r4, #0] - ldr r0, [sp, #4] - ldr r1, [r7, #0x74] - mov r6, #0x24 - mul r6, r3 - ldr r3, [sp, #0x10] - add r1, r1, #4 - ldr r0, [r0, #8] - ldr r2, [sp, #0xc] - add r1, r1, r5 - add r3, r3, r6 - bl ov5_021DFB40 - ldr r1, [r7, #0x74] - ldr r0, [sp, #0x14] - add r1, r1, #4 - add r1, r1, r5 - bl sub_02073B84 - ldr r0, [sp, #8] - add r4, r4, #4 - add r0, r0, #1 - add r5, #0x24 - str r0, [sp, #8] - cmp r0, #4 - blt _021F44FA - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F4538: .word 0x022006E8 - thumb_func_end ov5_021F44A4 - - thumb_func_start ov5_021F453C -ov5_021F453C: ; 0x021F453C - push {r4, lr} - bl sub_02071598 - add r4, r0, #0 - ldr r0, [r4, #0x74] - cmp r0, #0 - bne _021F454E - bl sub_02022974 -_021F454E: - ldr r0, [r4, #0x74] - ldr r0, [r0, #0] - cmp r0, #0xf - bne _021F455A - mov r0, #1 - pop {r4, pc} -_021F455A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F453C - - thumb_func_start ov5_021F4560 -ov5_021F4560: ; 0x021F4560 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r2, r0, #0 - add r6, r2, #0 - add r3, r4, #0 - ldmia r6!, {r0, r1} - add r3, #0x60 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #4 - str r0, [r3, #0] - mov r0, #2 - ldrsh r0, [r2, r0] - strh r0, [r4, #4] - ldrsh r0, [r2, r1] - strh r0, [r4, #6] - mov r0, #1 - ldrsb r0, [r2, r0] - add r2, sp, #0 - strh r0, [r4, #8] - ldrsh r0, [r4, r1] - mov r1, #6 - ldrsh r1, [r4, r1] - bl sub_02064450 - ldr r0, [r4, #0x70] - add r1, sp, #0 - bl sub_020644A4 - mov r0, #6 - ldr r1, [r4, #0x68] - lsl r0, r0, #0xc - add r0, r1, r0 - ldr r2, [sp, #4] - add r1, sp, #0 - add r0, r2, r0 - str r0, [sp, #4] - add r0, r5, #0 - bl sub_020715D4 - ldr r1, [r4, #0x6c] - add r0, r4, #0 - add r0, #0xc - add r1, #0x20 - bl sub_02073B70 - mov r0, #1 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4560 - - thumb_func_start ov5_021F45D0 -ov5_021F45D0: ; 0x021F45D0 - push {r4, r5, r6, lr} - add r6, r1, #0 - ldr r0, [r6, #0x74] - cmp r0, #0 - beq _021F45F6 - mov r4, #0 - add r5, r4, #0 -_021F45DE: - ldr r0, [r6, #0x74] - add r0, r0, #4 - add r0, r0, r5 - bl sub_02073AA8 - add r4, r4, #1 - add r5, #0x24 - cmp r4, #4 - blt _021F45DE - ldr r0, [r6, #0x74] - bl sub_020181C4 -_021F45F6: - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F45D0 - - thumb_func_start ov5_021F45F8 -ov5_021F45F8: ; 0x021F45F8 - push {r3, r4, r5, r6, r7, lr} - ldr r0, [r1, #0] - str r1, [sp] - cmp r0, #0 - beq _021F464A - cmp r0, #1 - bne _021F464A - add r0, r1, #0 - ldr r0, [r0, #0x74] - cmp r0, #0 - bne _021F4612 - bl sub_02022974 -_021F4612: - ldr r0, [sp] - mov r4, #0 - ldr r6, [r0, #0x74] - mov r7, #1 - add r5, r6, #4 -_021F461C: - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 - cmp r0, #0 - beq _021F4636 - add r0, r7, #0 - ldr r1, [r6, #0] - lsl r0, r4 - orr r0, r1 - str r0, [r6, #0] -_021F4636: - add r4, r4, #1 - add r5, #0x24 - cmp r4, #4 - blt _021F461C - ldr r0, [r6, #0] - cmp r0, #0xf - bne _021F464A - ldr r0, [sp] - mov r1, #0 - str r1, [r0, #0] -_021F464A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F45F8 - - thumb_func_start ov5_021F464C -ov5_021F464C: ; 0x021F464C - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0xc - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F464C - - thumb_func_start ov5_021F4668 -ov5_021F4668: ; 0x021F4668 - push {r4, r5, lr} - sub sp, #0x1c - ldr r5, [r0, #0x40] - mov r4, #1 - str r4, [sp] - add r4, sp, #8 - str r4, [sp, #4] - bl ov5_021F439C - add r4, r0, #0 - add r0, sp, #8 - mov r2, #0 - str r0, [sp] - ldr r1, _021F4694 ; =0x022006F8 - add r0, r5, #0 - add r3, r2, #0 - str r2, [sp, #4] - bl ov5_021DF72C - str r0, [r4, #0] - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 -_021F4694: .word 0x022006F8 - thumb_func_end ov5_021F4668 - - thumb_func_start ov5_021F4698 -ov5_021F4698: ; 0x021F4698 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r2, #0 - bl sub_02071598 - add r4, r0, #0 - add r0, #0x90 - ldr r7, [r0, #0] - ldrb r0, [r4] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021F46BA - add r0, r4, #0 - add r0, #0xc - bl sub_02073A90 -_021F46BA: - ldrb r1, [r4] - mov r0, #0x40 - orr r0, r1 - strb r0, [r4] - ldrb r1, [r4] - mov r0, #0x80 - bic r1, r0 - strb r1, [r4] - ldrb r1, [r4] - mov r0, #0x3f - bic r1, r0 - mov r0, #1 - orr r0, r1 - strb r0, [r4] - add r0, r5, #0 - bl sub_0206447C - add r5, r0, #0 - cmp r6, #1 - bne _021F46E4 - add r5, r5, #4 -_021F46E4: - mov r0, #0 - add r3, r7, #0 - mov r6, #0x24 - str r0, [sp] - add r1, r4, #0 - add r2, r7, #0 - ldr r0, [r7, #8] - add r3, #0x48 - mul r6, r5 - add r1, #0xc - add r2, #0x34 - add r3, r3, r6 - bl ov5_021DFB40 - add r0, r4, #0 - add r7, #0x34 - add r4, #0xc - add r0, #0x30 - add r1, r7, #0 - add r2, r4, #0 - bl sub_02073B90 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4698 - - thumb_func_start ov5_021F4714 -ov5_021F4714: ; 0x021F4714 - push {r4, lr} - add r4, r1, #0 - bl sub_02071598 - str r4, [r0, #8] - pop {r4, pc} - thumb_func_end ov5_021F4714 - - thumb_func_start ov5_021F4720 -ov5_021F4720: ; 0x021F4720 - push {r3, lr} - bl sub_02071598 - ldrb r0, [r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1f - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4720 - - thumb_func_start ov5_021F4730 -ov5_021F4730: ; 0x021F4730 - push {r4, lr} - add r4, r1, #0 - bl ov5_021F440C - add r0, r4, #0 - add r4, #0x90 - ldr r1, [r4, #0] - add r0, #0x30 - add r1, #0x34 - bl sub_02073B70 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4730 - - thumb_func_start ov5_021F474C -ov5_021F474C: ; 0x021F474C - push {r3, lr} - ldrb r0, [r1] - lsl r0, r0, #0x19 - lsr r0, r0, #0x1f - beq _021F475E - add r1, #0xc - add r0, r1, #0 - bl sub_02073AA8 -_021F475E: - pop {r3, pc} - thumb_func_end ov5_021F474C - - thumb_func_start ov5_021F4760 -ov5_021F4760: ; 0x021F4760 - push {r4, lr} - add r4, r1, #0 - ldrb r0, [r4] - lsl r0, r0, #0x1a - lsr r0, r0, #0x1a - beq _021F4790 - cmp r0, #1 - bne _021F4790 - add r0, r4, #0 - ldr r1, [r4, #8] - add r0, #0xc - mov r2, #0 - bl sub_02073AC0 - cmp r0, #0 - beq _021F4790 - ldrb r1, [r4] - mov r0, #0x3f - bic r1, r0 - strb r1, [r4] - ldrb r1, [r4] - mov r0, #0x80 - orr r0, r1 - strb r0, [r4] -_021F4790: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4760 - - thumb_func_start ov5_021F4794 -ov5_021F4794: ; 0x021F4794 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x30 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4794 - - thumb_func_start ov5_021F47B0 -ov5_021F47B0: ; 0x021F47B0 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0xdc - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F47DC - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F47B0 - - thumb_func_start ov5_021F47CC -ov5_021F47CC: ; 0x021F47CC - push {r4, lr} - add r4, r0, #0 - bl ov5_021F4820 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F47CC - - thumb_func_start ov5_021F47DC -ov5_021F47DC: ; 0x021F47DC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r4, _021F481C ; =0x0220079C - mov r6, #0 - add r5, r7, #4 -_021F47E6: - mov r0, #0 - str r0, [sp] - ldr r0, [r7, #0] - ldr r3, [r4, #0] - add r1, r5, #0 - mov r2, #0 - bl ov5_021DFB00 - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x14 - cmp r6, #9 - blt _021F47E6 - ldr r0, [r7, #0x10] - mov r1, #0 - bl sub_020B37A4 - mov r2, #0 - str r2, [sp] - ldr r0, [r7, #0] - add r7, #0xb8 - add r1, r7, #0 - mov r3, #0xc7 - bl ov5_021DFB24 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F481C: .word 0x0220079C - thumb_func_end ov5_021F47DC - - thumb_func_start ov5_021F4820 -ov5_021F4820: ; 0x021F4820 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #4 -_021F4828: - add r0, r5, #0 - bl sub_0207395C - add r4, r4, #1 - add r5, #0x14 - cmp r4, #9 - blt _021F4828 - add r6, #0xb8 - add r0, r6, #0 - bl sub_02073AA8 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F4820 - - thumb_func_start ov5_021F4840 -ov5_021F4840: ; 0x021F4840 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - mov r1, #0x20 - str r2, [sp, #8] - str r5, [sp, #0xc] - bl ov5_021DF55C - str r0, [sp, #0x10] - add r0, r4, #0 - add r1, r6, #0 - str r4, [sp, #0x14] - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - mov r2, #0 - str r0, [sp, #4] - ldr r1, _021F4878 ; =0x02200754 - add r0, r5, #0 - add r3, r2, #0 - bl ov5_021DF72C - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_021F4878: .word 0x02200754 - thumb_func_end ov5_021F4840 - - thumb_func_start ov5_021F487C -ov5_021F487C: ; 0x021F487C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - add r6, r0, #0 - bl sub_020715BC - add r4, r0, #0 - add r2, r5, #0 - add r3, r4, #0 - add r2, #0x24 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0xc] - bl sub_0206298C - strb r0, [r5] - ldr r0, [r4, #4] - mov r1, #0x24 - mov r2, #0 - bl ov5_021DF528 - add r1, r5, #0 - add r1, #0x88 - str r0, [r1, #0] - ldr r1, [r5, #0x2c] - add r0, r5, #0 - add r0, #0x34 - add r1, r1, #4 - bl sub_02073B70 - ldr r3, [r5, #0x2c] - mov r0, #0 - add r1, r5, #0 - str r0, [sp] - add r1, #0x88 - add r2, r3, #4 - ldr r0, [r5, #0x28] - ldr r1, [r1, #0] - add r3, #0xb8 - bl ov5_021DFB40 - add r1, r5, #0 - add r1, #0x88 - add r0, r5, #0 - ldr r1, [r1, #0] - add r0, #0x34 - bl sub_02073B84 - add r0, r6, #0 - add r1, r5, #0 - bl ov5_021F4A24 - mov r0, #1 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F487C - - thumb_func_start ov5_021F48F0 -ov5_021F48F0: ; 0x021F48F0 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_02073A90 - add r4, #0x88 - ldr r0, [r4, #0] - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov5_021F48F0 - - thumb_func_start ov5_021F4908 -ov5_021F4908: ; 0x021F4908 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r4, r1, #0 - ldr r6, [r4, #0x30] - add r5, r0, #0 - add r0, r6, #0 - bl sub_0206298C - add r7, r0, #0 - add r0, r6, #0 - add r1, sp, #8 - bl sub_02063050 - ldr r1, [r4, #0x24] - add r0, r6, #0 - add r2, sp, #0x14 - bl ov5_021F4AB4 - strb r7, [r4] - strb r0, [r4, #1] - mov r0, #1 - ldrsb r0, [r4, r0] - ldr r1, [r4, #0x24] - cmp r0, r1 - bne _021F4944 - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F4A24 - b _021F4962 -_021F4944: - add r0, r4, #4 - str r0, [sp] - add r0, r4, #0 - add r0, #0x10 - str r0, [sp, #4] - mov r0, #0 - ldrsb r0, [r4, r0] - add r2, sp, #0x14 - add r3, sp, #8 - bl ov5_021F4B6C - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F49D0 -_021F4962: - add r4, #0x88 - mov r1, #1 - ldr r0, [r4, #0] - lsl r1, r1, #0xc - mov r2, #1 - bl sub_02073AC0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F4908 - - thumb_func_start ov5_021F4974 -ov5_021F4974: ; 0x021F4974 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r1, #0 - ldrb r1, [r4, #2] - cmp r1, #0 - bne _021F49CC - add r1, sp, #8 - bl sub_020715E4 - mov r0, #1 - ldr r1, [sp, #0xc] - lsl r0, r0, #0x10 - add r0, r1, r0 - str r0, [sp, #0xc] - ldrh r2, [r4, #0x1c] - add r1, sp, #0 - add r0, sp, #0 - strh r2, [r1] - ldrh r2, [r4, #0x1e] - strh r2, [r1, #2] - ldrh r2, [r4, #0x20] - strh r2, [r1, #4] - ldrh r2, [r4, #0x22] - strh r2, [r1, #6] - mov r1, #0 - bl ov5_021F4A80 - add r0, sp, #0 - add r0, #2 - mov r1, #0 - bl ov5_021F4A80 - add r0, sp, #4 - mov r1, #0 - bl ov5_021F4A80 - add r0, r4, #0 - add r4, #0x10 - add r0, #0x34 - add r1, sp, #8 - add r2, r4, #0 - add r3, sp, #0 - bl sub_02073BC8 -_021F49CC: - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov5_021F4974 - - thumb_func_start ov5_021F49D0 -ov5_021F49D0: ; 0x021F49D0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0 - ldrsb r0, [r4, r0] - lsl r2, r0, #3 - ldr r0, _021F4A20 ; =0x0220077C - add r1, r0, r2 - ldrh r0, [r0, r2] - strh r0, [r4, #0x1c] - ldrh r0, [r1, #2] - strh r0, [r4, #0x1e] - ldrh r0, [r1, #4] - strh r0, [r4, #0x20] - ldrh r0, [r1, #6] - add r1, sp, #0 - strh r0, [r4, #0x22] - ldr r0, [r4, #0x30] - bl sub_02063050 - ldr r1, [sp] - ldr r0, [r4, #4] - add r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [r4, #0xc] - add r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r4, r5, pc} - nop -_021F4A20: .word 0x0220077C - thumb_func_end ov5_021F49D0 - - thumb_func_start ov5_021F4A24 -ov5_021F4A24: ; 0x021F4A24 - push {r3, r4, r5, r6, r7, lr} - add r3, r0, #0 - add r2, r1, #0 - mov r0, #0 - ldrsb r1, [r2, r0] - mov r0, #0x48 - mov r7, #1 - add r6, r1, #0 - mul r6, r0 - ldrsb r0, [r2, r7] - ldr r5, _021F4A78 ; =0x022007C0 - mov r4, #0xc - add r1, r0, #0 - add r0, r5, r6 - mul r1, r4 - add r6, r1, r0 - add r5, r2, #0 - ldmia r6!, {r0, r1} - add r5, #0x10 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r5, #0] - mov r0, #0 - ldrsb r5, [r2, r0] - mov r0, #0x48 - add r1, r5, #0 - ldrsb r5, [r2, r7] - mul r1, r0 - ldr r0, _021F4A7C ; =0x022008E0 - mul r4, r5 - add r0, r0, r1 - add r5, r4, r0 - ldmia r5!, {r0, r1} - add r4, r2, #4 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - add r1, r2, #0 - str r0, [r4, #0] - add r0, r3, #0 - bl ov5_021F49D0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F4A78: .word 0x022007C0 -_021F4A7C: .word 0x022008E0 - thumb_func_end ov5_021F4A24 - - thumb_func_start ov5_021F4A80 -ov5_021F4A80: ; 0x021F4A80 - push {r4, lr} - add r4, r0, #0 - ldrh r0, [r4] - add r0, r0, r1 - strh r0, [r4] - ldrh r0, [r4] - lsl r1, r0, #0x10 - asr r1, r1, #0x10 - bpl _021F4AA6 - mov r0, #0x5a - lsl r0, r0, #2 - mov r1, #0 -_021F4A98: - ldrh r2, [r4] - add r2, r2, r0 - strh r2, [r4] - ldrsh r2, [r4, r1] - cmp r2, #0 - blt _021F4A98 - pop {r4, pc} -_021F4AA6: - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - strh r1, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4A80 - - thumb_func_start ov5_021F4AB4 -ov5_021F4AB4: ; 0x021F4AB4 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - str r0, [sp, #8] - str r1, [sp, #0xc] - str r2, [sp, #0x10] - add r0, r1, #0 - bne _021F4AC6 - bl sub_02022974 -_021F4AC6: - ldr r0, [sp, #8] - bl sub_02063020 - add r5, r0, #0 - ldr r0, [sp, #8] - bl sub_02063030 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - bl sub_02063040 - add r6, r0, #0 - ldr r0, [sp, #8] - bl sub_0206298C - add r4, r0, #0 - ldr r0, [sp, #8] - add r1, sp, #0x18 - bl sub_02063050 - ldr r0, [sp, #0xc] - mov r7, #0 - cmp r0, #0 - ble _021F4B5C -_021F4AF6: - add r0, r4, #0 - bl sub_0206419C - add r5, r5, r0 - add r0, r4, #0 - bl sub_020641A8 - add r6, r6, r0 - str r6, [sp] - ldr r0, [sp, #8] - ldr r3, [sp, #0x14] - add r1, sp, #0x18 - add r2, r5, #0 - str r4, [sp, #4] - bl sub_02063E18 - cmp r0, #0 - beq _021F4B54 - cmp r0, #1 - beq _021F4B54 - cmp r0, #4 - bne _021F4B44 - ldr r0, [sp, #8] - bl sub_02062A40 - add r1, r5, #0 - add r2, r6, #0 - mov r3, #1 - bl sub_0206326C - add r4, r0, #0 - bne _021F4B3A - bl sub_02022974 -_021F4B3A: - ldr r1, [sp, #0x10] - add r0, r4, #0 - bl sub_02063050 - b _021F4B4E -_021F4B44: - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - bl sub_02064450 -_021F4B4E: - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_021F4B54: - ldr r0, [sp, #0xc] - add r7, r7, #1 - cmp r7, r0 - blt _021F4AF6 -_021F4B5C: - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - bl sub_02064450 - add r0, r7, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021F4AB4 - - thumb_func_start ov5_021F4B6C -ov5_021F4B6C: ; 0x021F4B6C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r7, r1, #0 - add r1, r3, #0 - add r3, r0, #0 - str r0, [sp] - ldr r6, [sp, #0x38] - ldr r4, [sp, #0x3c] - cmp r3, #3 - bhi _021F4BB2 - add r3, r3, r3 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_021F4B8C: ; jump table - .short _021F4B94 - _021F4B8C - 2 ; case 0 - .short _021F4B9C - _021F4B8C - 2 ; case 1 - .short _021F4BA4 - _021F4B8C - 2 ; case 2 - .short _021F4BAC - _021F4B8C - 2 ; case 3 -_021F4B94: - ldr r1, [r1, #8] - ldr r0, [r2, #8] - sub r0, r1, r0 - b _021F4BB2 -_021F4B9C: - ldr r2, [r2, #8] - ldr r0, [r1, #8] - sub r0, r2, r0 - b _021F4BB2 -_021F4BA4: - ldr r1, [r1, #0] - ldr r0, [r2, #0] - sub r0, r1, r0 - b _021F4BB2 -_021F4BAC: - ldr r2, [r2, #0] - ldr r0, [r1, #0] - sub r0, r2, r0 -_021F4BB2: - asr r1, r0, #0xf - lsr r1, r1, #0x10 - add r1, r0, r1 - asr r5, r1, #0x10 - bpl _021F4BBE - neg r5, r5 -_021F4BBE: - cmp r5, r7 - ble _021F4BC4 - add r5, r7, #0 -_021F4BC4: - sub r5, r5, #1 - bpl _021F4BCA - mov r5, #0 -_021F4BCA: - lsr r1, r0, #0x1f - lsl r2, r0, #0x10 - sub r2, r2, r1 - mov r0, #0x10 - ror r2, r0 - str r5, [sp, #8] - add r0, r1, r2 - bpl _021F4BE0 - sub r1, r5, #1 - str r1, [sp, #8] - b _021F4BE8 -_021F4BE0: - cmp r0, #0 - ble _021F4BE8 - add r1, r5, #1 - str r1, [sp, #8] -_021F4BE8: - ldr r1, [sp, #8] - cmp r1, #0 - bge _021F4BF4 - mov r1, #0 - str r1, [sp, #8] - b _021F4BFA -_021F4BF4: - cmp r1, r7 - ble _021F4BFA - str r7, [sp, #8] -_021F4BFA: - ldr r1, _021F4CE0 ; =0x00001999 - bl sub_020E1F6C - add r7, r0, #0 - bpl _021F4C06 - neg r7, r7 -_021F4C06: - ldr r1, [sp, #8] - mov r0, #0xc - add r2, r1, #0 - mul r2, r0 - str r2, [sp, #0xc] - ldr r1, [sp] - mov r2, #0x48 - mul r2, r1 - str r2, [sp, #0x10] - ldr r2, _021F4CE4 ; =0x022008E0 - ldr r1, [sp, #0x10] - add r1, r2, r1 - ldr r2, [sp, #0xc] - str r1, [sp, #0x1c] - add r1, r1, r2 - str r1, [sp, #4] - add r1, r5, #0 - mul r1, r0 - ldr r0, [sp, #0x1c] - str r1, [sp, #0x14] - add r3, r1, r0 - ldmia r3!, {r0, r1} - add r2, r6, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r1, _021F4CE8 ; =0x022007C0 - str r0, [r2, #0] - ldr r0, [sp, #0x10] - add r3, r4, #0 - add r1, r1, r0 - ldr r0, [sp, #0xc] - str r1, [sp, #0x18] - add r5, r1, r0 - ldr r1, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r1, r0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r1, [r2, #0] - add r0, r3, #0 - str r1, [r0, #0] - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x1c] - ldr r1, [r0, r1] - ldr r0, [r6, #0] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, [r6, #0] - mul r0, r7 - add r0, r1, r0 - str r0, [r6, #0] - ldr r0, [sp, #4] - ldr r1, [r0, #4] - ldr r0, [r6, #4] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, [r6, #4] - mul r0, r7 - add r0, r1, r0 - str r0, [r6, #4] - ldr r0, [sp, #4] - ldr r1, [r0, #8] - ldr r0, [r6, #8] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, [r6, #8] - mul r0, r7 - add r0, r1, r0 - str r0, [r6, #8] - ldr r1, [sp, #0x18] - ldr r0, [sp, #0xc] - ldr r1, [r1, r0] - ldr r0, [r4, #0] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, [r4, #0] - mul r0, r7 - add r0, r1, r0 - str r0, [r4, #0] - ldr r1, [r5, #4] - ldr r0, [r4, #4] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, [r4, #4] - mul r0, r7 - add r0, r1, r0 - str r0, [r4, #4] - ldr r1, [r5, #8] - ldr r0, [r4, #8] - sub r0, r1, r0 - mov r1, #0xa - bl sub_020E1F6C - ldr r1, [r4, #8] - mul r0, r7 - add r0, r1, r0 - str r0, [r4, #8] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F4CE0: .word 0x00001999 -_021F4CE4: .word 0x022008E0 -_021F4CE8: .word 0x022007C0 - thumb_func_end ov5_021F4B6C - - thumb_func_start ov5_021F4CEC -ov5_021F4CEC: ; 0x021F4CEC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r1, #0 - add r1, sp, #8 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - add r4, r3, #0 - add r7, r2, #0 - str r0, [r1, #8] - cmp r4, #8 - blt _021F4D0A - bl sub_02022974 -_021F4D0A: - add r0, r6, #0 - add r1, r7, #0 - add r2, sp, #8 - bl sub_02064450 - add r0, r5, #0 - bl ov5_021DF574 - add r1, sp, #8 - bl sub_020644A4 - mov r0, #3 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #1 - ldr r1, [sp, #0x10] - lsl r0, r0, #0xe - sub r0, r1, r0 - str r0, [sp, #0x10] - str r5, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r1, _021F4D4C ; =0x02200768 - add r0, r5, #0 - add r2, sp, #8 - add r3, r4, #0 - bl ov5_021DF72C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021F4D4C: .word 0x02200768 - thumb_func_end ov5_021F4CEC - - thumb_func_start ov5_021F4D50 -ov5_021F4D50: ; 0x021F4D50 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715B4 - str r0, [r4, #0] - add r0, r5, #0 - bl sub_020715BC - str r0, [r4, #4] - mov r1, #0x20 - bl ov5_021DF55C - str r0, [r4, #8] - ldr r1, [r4, #8] - add r0, r4, #0 - add r3, r1, #4 - ldr r1, [r4, #0] - add r0, #0xc - add r2, r1, #1 - mov r1, #0x14 - mul r1, r2 - add r1, r3, r1 - bl sub_02073B70 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4D50 - - thumb_func_start ov5_021F4D88 -ov5_021F4D88: ; 0x021F4D88 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F4D88 - - thumb_func_start ov5_021F4D8C -ov5_021F4D8C: ; 0x021F4D8C - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F4D8C - - thumb_func_start ov5_021F4D90 -ov5_021F4D90: ; 0x021F4D90 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0xc - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4D90 - - thumb_func_start ov5_021F4DAC -ov5_021F4DAC: ; 0x021F4DAC - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x6c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F4DD8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4DAC - - thumb_func_start ov5_021F4DC8 -ov5_021F4DC8: ; 0x021F4DC8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F4DFC - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F4DC8 - - thumb_func_start ov5_021F4DD8 -ov5_021F4DD8: ; 0x021F4DD8 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x11 - bl ov5_021DFB00 - add r0, r4, #0 - add r0, #0x18 - add r1, r4, #4 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4DD8 - - thumb_func_start ov5_021F4DFC -ov5_021F4DFC: ; 0x021F4DFC - ldr r3, _021F4E04 ; =sub_0207395C - add r0, r0, #4 - bx r3 - nop -_021F4E04: .word sub_0207395C - thumb_func_end ov5_021F4DFC - - thumb_func_start ov5_021F4E08 -ov5_021F4E08: ; 0x021F4E08 - push {r3, r4, r5, lr} - mov r2, #0 - ldr r1, _021F4E24 ; =0x00000D6C - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F4E38 - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_021F4E24: .word 0x00000D6C - thumb_func_end ov5_021F4E08 - - thumb_func_start ov5_021F4E28 -ov5_021F4E28: ; 0x021F4E28 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F4E94 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F4E28 - - thumb_func_start ov5_021F4E38 -ov5_021F4E38: ; 0x021F4E38 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0xa6 - lsl r0, r0, #2 - mov r5, #0 - add r4, r7, #4 - add r6, r7, r0 -_021F4E46: - mov r0, #0 - str r0, [sp] - add r3, r5, #0 - ldr r0, [r7, #0] - add r1, r4, #0 - mov r2, #0 - add r3, #0x1a - bl ov5_021DFB00 - add r0, r6, #0 - add r1, r4, #0 - bl sub_02073B70 - add r5, r5, #1 - add r4, #0x14 - add r6, #0x54 - cmp r5, #0x20 - blt _021F4E46 - mov r2, #0 - mov r0, #0x14 - add r6, r5, #0 - str r2, [sp] - mul r6, r0 - add r4, r7, #4 - ldr r0, [r7, #0] - add r1, r4, r6 - mov r3, #0x19 - bl ov5_021DFB00 - mov r0, #0xa6 - lsl r0, r0, #2 - add r1, r7, r0 - mov r0, #0x54 - mul r0, r5 - add r0, r1, r0 - add r1, r4, r6 - bl sub_02073B70 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F4E38 - - thumb_func_start ov5_021F4E94 -ov5_021F4E94: ; 0x021F4E94 - push {r3, r4, r5, lr} - mov r4, #0 - add r5, r0, #4 -_021F4E9A: - add r0, r5, #0 - bl sub_0207395C - add r4, r4, #1 - add r5, #0x14 - cmp r4, #0x21 - blt _021F4E9A - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4E94 - - thumb_func_start ov5_021F4EAC -ov5_021F4EAC: ; 0x021F4EAC - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r5, r0, #0 - ldr r0, [r5, #0x40] - add r4, r1, #0 - mov r1, #3 - add r6, r2, #0 - add r7, r3, #0 - str r0, [sp, #8] - str r0, [sp, #0x24] - bl ov5_021DF55C - str r0, [sp, #0x28] - mov r0, #9 - mov r3, #0 - lsl r1, r4, #0x10 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - str r0, [sp, #0x14] - str r4, [sp, #0x18] - str r6, [sp, #0x1c] - str r5, [sp, #0x20] - str r3, [sp, #0x10] - add r0, sp, #0x18 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, _021F4F14 ; =0x02200A0C - add r2, sp, #0xc - bl ov5_021DF72C - add r5, r0, #0 - beq _021F4F0E - bl sub_02071598 - add r4, r0, #0 - ldr r0, [sp, #0x40] - str r0, [r4, #0x54] - add r0, r7, #0 - bl sub_020E17B4 - str r0, [r4, #0x58] - add r0, r7, #0 - bl sub_020E17B4 - str r0, [r4, #0x5c] -_021F4F0E: - add r0, r5, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F4F14: .word 0x02200A0C - thumb_func_end ov5_021F4EAC - - thumb_func_start ov5_021F4F18 -ov5_021F4F18: ; 0x021F4F18 - push {r3, r4, r5, r6, lr} - sub sp, #4 - ldr r4, [sp, #0x18] - add r5, r3, #0 - str r4, [sp] - bl ov5_021F4EAC - add r6, r0, #0 - beq _021F4F3C - bl sub_02071598 - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0x58] - add r0, r5, #0 - bl sub_020E17B4 - str r0, [r4, #0x5c] -_021F4F3C: - add r0, r6, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4F18 - - thumb_func_start ov5_021F4F44 -ov5_021F4F44: ; 0x021F4F44 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x6c - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x6c] - lsl r1, r0, #0x10 - mov r0, #9 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #0x70] - add r1, sp, #0 - lsl r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #4] - add r0, r5, #0 - bl sub_020715D4 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F4F44 - - thumb_func_start ov5_021F4F88 -ov5_021F4F88: ; 0x021F4F88 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F4F88 - - thumb_func_start ov5_021F4F8C -ov5_021F4F8C: ; 0x021F4F8C - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x58] - ldr r1, [r4, #0x5c] - bl sub_020E11CC - bhs _021F4FAE - ldr r0, [r4, #0x58] - bl sub_020E16BC - ldr r2, _021F4FB0 ; =0x9999999A - ldr r3, _021F4FB4 ; =0x3FC99999 - bl sub_020DFC6C - bl sub_020DFF84 - str r0, [r4, #0x58] -_021F4FAE: - pop {r4, pc} - ; .align 2, 0 -_021F4FB0: .word 0x9999999A -_021F4FB4: .word 0x3FC99999 - thumb_func_end ov5_021F4F8C - - thumb_func_start ov5_021F4FB8 -ov5_021F4FB8: ; 0x021F4FB8 - push {r3, r4, r5, r6, lr} - sub sp, #0x3c - ldr r4, _021F5058 ; =0x02200A00 - add r2, r0, #0 - add r5, r1, #0 - ldmia r4!, {r0, r1} - add r3, sp, #0x24 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r6, _021F505C ; =0x02200A20 - str r0, [r3, #0] - add r4, sp, #0 - mov r3, #4 -_021F4FD2: - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _021F4FD2 - ldr r0, [r6, #0] - str r0, [r4, #0] - mov r0, #0xa6 - ldr r1, [r5, #0x7c] - lsl r0, r0, #2 - add r4, r1, r0 - ldr r1, [r5, #0x54] - mov r0, #0x54 - add r6, r1, #0 - mul r6, r0 - add r0, r2, #0 - add r1, sp, #0x30 - bl sub_020715E4 - ldr r0, [sp, #0x24] - bl sub_020E17B4 - ldr r1, [r5, #0x58] - bl sub_020E18B0 - bl sub_020E1740 - str r0, [sp, #0x24] - ldr r0, [sp, #0x28] - bl sub_020E17B4 - ldr r1, [r5, #0x58] - bl sub_020E18B0 - bl sub_020E1740 - str r0, [sp, #0x28] - ldr r0, [sp, #0x2c] - bl sub_020E17B4 - ldr r1, [r5, #0x58] - bl sub_020E18B0 - bl sub_020E1740 - str r0, [sp, #0x2c] - mov r0, #2 - ldr r1, [sp, #0x30] - lsl r0, r0, #0xa - sub r1, r1, r0 - str r1, [sp, #0x30] - ldr r1, [sp, #0x34] - lsl r0, r0, #1 - sub r0, r1, r0 - str r0, [sp, #0x34] - mov r0, #5 - ldr r1, [sp, #0x38] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x38] - add r0, r4, r6 - add r1, sp, #0x30 - add r2, sp, #0x24 - add r3, sp, #0 - bl sub_02073BA4 - add sp, #0x3c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021F5058: .word 0x02200A00 -_021F505C: .word 0x02200A20 - thumb_func_end ov5_021F4FB8 - - thumb_func_start ov5_021F5060 -ov5_021F5060: ; 0x021F5060 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x6c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F508C - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5060 - - thumb_func_start ov5_021F507C -ov5_021F507C: ; 0x021F507C - push {r4, lr} - add r4, r0, #0 - bl ov5_021F50B0 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F507C - - thumb_func_start ov5_021F508C -ov5_021F508C: ; 0x021F508C - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x15 - bl ov5_021DFB00 - add r0, r4, #0 - add r0, #0x18 - add r1, r4, #4 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F508C - - thumb_func_start ov5_021F50B0 -ov5_021F50B0: ; 0x021F50B0 - ldr r3, _021F50B8 ; =sub_0207395C - add r0, r0, #4 - bx r3 - nop -_021F50B8: .word sub_0207395C - thumb_func_end ov5_021F50B0 - - thumb_func_start ov5_021F50BC -ov5_021F50BC: ; 0x021F50BC - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x78 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #8] - bl ov5_021F50E8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F50BC - - thumb_func_start ov5_021F50D8 -ov5_021F50D8: ; 0x021F50D8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F5110 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F50D8 - - thumb_func_start ov5_021F50E8 -ov5_021F50E8: ; 0x021F50E8 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - add r1, r4, #0 - ldr r0, [r4, #8] - add r1, #0xc - mov r3, #0x16 - bl ov5_021DFB00 - add r0, r4, #0 - add r4, #0xc - add r0, #0x20 - add r1, r4, #0 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F50E8 - - thumb_func_start ov5_021F5110 -ov5_021F5110: ; 0x021F5110 - ldr r3, _021F5118 ; =sub_0207395C - add r0, #0xc - bx r3 - nop -_021F5118: .word sub_0207395C - thumb_func_end ov5_021F5110 - - thumb_func_start ov5_021F511C -ov5_021F511C: ; 0x021F511C - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - mov r1, #5 - str r4, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x1c] - bl sub_02063050 - add r0, sp, #0x14 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r1, _021F5154 ; =0x02200A50 - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021F5154: .word 0x02200A50 - thumb_func_end ov5_021F511C - - thumb_func_start ov5_021F5158 -ov5_021F5158: ; 0x021F5158 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x30 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x38] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x38] - bl sub_02062918 - str r0, [r4, #0xc] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - ldr r0, [r4, #0x38] - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5158 - - thumb_func_start ov5_021F51A0 -ov5_021F51A0: ; 0x021F51A0 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F51A0 - - thumb_func_start ov5_021F51A4 -ov5_021F51A4: ; 0x021F51A4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x38] - ldr r1, [r4, #8] - add r5, r0, #0 - ldr r2, [r4, #0xc] - add r0, r6, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F51C0 - bl sub_02022974 -_021F51C0: - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F51D0 - cmp r0, #1 - beq _021F51EE - add sp, #0xc - cmp r0, #2 - pop {r3, r4, r5, r6, pc} -_021F51D0: - add r0, r6, #0 - add r1, sp, #0 - bl sub_02063050 - mov r0, #0xa - ldr r1, [sp, #8] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_021F51EE: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x1e - blt _021F51FE - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021F51FE: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F51A4 - - thumb_func_start ov5_021F5204 -ov5_021F5204: ; 0x021F5204 - push {r4, r5, r6, lr} - sub sp, #0x60 - ldr r5, _021F527C ; =0x02200A44 - add r2, r0, #0 - add r4, r1, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x48 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - ldr r6, _021F5280 ; =0x02200A64 - str r0, [r3, #0] - add r5, sp, #0x24 - mov r3, #4 -_021F521E: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _021F521E - ldr r0, [r6, #0] - add r1, sp, #0x54 - str r0, [r5, #0] - add r0, r2, #0 - bl sub_020715E4 - mov r0, #0x19 - ldr r1, [sp, #0x58] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x58] - mov r0, #5 - ldr r1, [sp, #0x5c] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x5c] - bl sub_020AF5E0 - mov r2, #0 - add r5, r0, #0 - add r0, sp, #0x24 - mov r1, #0x5a - add r3, r2, #0 - bl sub_0201E2E0 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020C4C88 - add r0, sp, #0x24 - add r1, sp, #0 - add r2, r0, #0 - bl sub_020BB8EC - ldr r0, [r4, #0x34] - add r1, sp, #0x54 - add r0, #0x20 - add r2, sp, #0x48 - add r3, sp, #0x24 - bl sub_02073C1C - add sp, #0x60 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F527C: .word 0x02200A44 -_021F5280: .word 0x02200A64 - thumb_func_end ov5_021F5204 - - thumb_func_start ov5_021F5284 -ov5_021F5284: ; 0x021F5284 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x78 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #8] - bl ov5_021F52B0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5284 - - thumb_func_start ov5_021F52A0 -ov5_021F52A0: ; 0x021F52A0 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F52D8 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F52A0 - - thumb_func_start ov5_021F52B0 -ov5_021F52B0: ; 0x021F52B0 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - add r1, r4, #0 - ldr r0, [r4, #8] - add r1, #0xc - mov r3, #0x17 - bl ov5_021DFB00 - add r0, r4, #0 - add r4, #0xc - add r0, #0x20 - add r1, r4, #0 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F52B0 - - thumb_func_start ov5_021F52D8 -ov5_021F52D8: ; 0x021F52D8 - ldr r3, _021F52E0 ; =sub_0207395C - add r0, #0xc - bx r3 - nop -_021F52E0: .word sub_0207395C - thumb_func_end ov5_021F52D8 - - thumb_func_start ov5_021F52E4 -ov5_021F52E4: ; 0x021F52E4 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - mov r1, #6 - str r4, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x1c] - bl sub_02063050 - add r0, sp, #0x14 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r1, _021F531C ; =0x02200A94 - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021F531C: .word 0x02200A94 - thumb_func_end ov5_021F52E4 - - thumb_func_start ov5_021F5320 -ov5_021F5320: ; 0x021F5320 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x30 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x38] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x38] - bl sub_02062918 - str r0, [r4, #0xc] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - ldr r0, [r4, #0x38] - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5320 - - thumb_func_start ov5_021F5368 -ov5_021F5368: ; 0x021F5368 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F5368 - - thumb_func_start ov5_021F536C -ov5_021F536C: ; 0x021F536C - push {r4, r5, lr} - sub sp, #0xc - add r2, r1, #0 - ldr r5, [r2, #0x38] - ldr r1, [r2, #8] - add r4, r0, #0 - ldr r2, [r2, #0xc] - add r0, r5, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F5388 - bl sub_02022974 -_021F5388: - add r0, r5, #0 - add r1, sp, #0 - bl sub_02063050 - mov r0, #0xa - ldr r1, [sp, #8] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F536C - - thumb_func_start ov5_021F53A8 -ov5_021F53A8: ; 0x021F53A8 - push {r4, r5, r6, lr} - sub sp, #0x60 - ldr r5, _021F5420 ; =0x02200A88 - add r2, r0, #0 - add r4, r1, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x48 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - ldr r6, _021F5424 ; =0x02200AA8 - str r0, [r3, #0] - add r5, sp, #0x24 - mov r3, #4 -_021F53C2: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _021F53C2 - ldr r0, [r6, #0] - add r1, sp, #0x54 - str r0, [r5, #0] - add r0, r2, #0 - bl sub_020715E4 - mov r0, #0x19 - ldr r1, [sp, #0x58] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x58] - mov r0, #5 - ldr r1, [sp, #0x5c] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x5c] - bl sub_020AF5E0 - mov r2, #0 - add r5, r0, #0 - add r0, sp, #0x24 - mov r1, #0x5a - add r3, r2, #0 - bl sub_0201E2E0 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020C4C88 - add r0, sp, #0x24 - add r1, sp, #0 - add r2, r0, #0 - bl sub_020BB8EC - ldr r0, [r4, #0x34] - add r1, sp, #0x54 - add r0, #0x20 - add r2, sp, #0x48 - add r3, sp, #0x24 - bl sub_02073C1C - add sp, #0x60 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F5420: .word 0x02200A88 -_021F5424: .word 0x02200AA8 - thumb_func_end ov5_021F53A8 - - thumb_func_start ov5_021F5428 -ov5_021F5428: ; 0x021F5428 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x78 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #8] - bl ov5_021F5454 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5428 - - thumb_func_start ov5_021F5444 -ov5_021F5444: ; 0x021F5444 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F547C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F5444 - - thumb_func_start ov5_021F5454 -ov5_021F5454: ; 0x021F5454 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - add r1, r4, #0 - ldr r0, [r4, #8] - add r1, #0xc - mov r3, #0x18 - bl ov5_021DFB00 - add r0, r4, #0 - add r4, #0xc - add r0, #0x20 - add r1, r4, #0 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5454 - - thumb_func_start ov5_021F547C -ov5_021F547C: ; 0x021F547C - ldr r3, _021F5484 ; =sub_0207395C - add r0, #0xc - bx r3 - nop -_021F5484: .word sub_0207395C - thumb_func_end ov5_021F547C - - thumb_func_start ov5_021F5488 -ov5_021F5488: ; 0x021F5488 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - mov r1, #7 - str r4, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, sp, #8 - str r5, [sp, #0x1c] - bl sub_02063050 - add r0, sp, #0x14 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r1, _021F54C0 ; =0x02200AD8 - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021F54C0: .word 0x02200AD8 - thumb_func_end ov5_021F5488 - - thumb_func_start ov5_021F54C4 -ov5_021F54C4: ; 0x021F54C4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - add r3, r0, #0 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x34 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x3c] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x3c] - bl sub_02062918 - str r0, [r4, #0xc] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - ldr r0, [r4, #0x3c] - add r1, sp, #0 - bl sub_02063050 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - mov r0, #0x3c - str r0, [r4, #0x30] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F54C4 - - thumb_func_start ov5_021F5510 -ov5_021F5510: ; 0x021F5510 - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F5510 - - thumb_func_start ov5_021F5514 -ov5_021F5514: ; 0x021F5514 - push {r3, r4, lr} - sub sp, #0xc - ldr r2, [r1, #0x30] - add r4, r0, #0 - cmp r2, #0 - beq _021F5526 - sub r0, r2, #1 - str r0, [r1, #0x30] - b _021F552E -_021F5526: - bl ov5_021DF74C - add sp, #0xc - pop {r3, r4, pc} -_021F552E: - ldr r0, [r1, #0x3c] - add r1, sp, #0 - bl sub_02063050 - mov r0, #0xa - ldr r1, [sp, #8] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F5514 - - thumb_func_start ov5_021F554C -ov5_021F554C: ; 0x021F554C - push {r4, r5, r6, lr} - sub sp, #0x60 - ldr r5, _021F55C4 ; =0x02200ACC - add r2, r0, #0 - add r4, r1, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x48 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - ldr r6, _021F55C8 ; =0x02200AEC - str r0, [r3, #0] - add r5, sp, #0x24 - mov r3, #4 -_021F5566: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _021F5566 - ldr r0, [r6, #0] - add r1, sp, #0x54 - str r0, [r5, #0] - add r0, r2, #0 - bl sub_020715E4 - mov r0, #0x19 - ldr r1, [sp, #0x58] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0x58] - mov r0, #5 - ldr r1, [sp, #0x5c] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x5c] - bl sub_020AF5E0 - mov r2, #0 - add r5, r0, #0 - add r0, sp, #0x24 - mov r1, #0x5a - add r3, r2, #0 - bl sub_0201E2E0 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020C4C88 - add r0, sp, #0x24 - add r1, sp, #0 - add r2, r0, #0 - bl sub_020BB8EC - ldr r0, [r4, #0x38] - add r1, sp, #0x54 - add r0, #0x20 - add r2, sp, #0x48 - add r3, sp, #0x24 - bl sub_02073C1C - add sp, #0x60 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F55C4: .word 0x02200ACC -_021F55C8: .word 0x02200AEC - thumb_func_end ov5_021F554C - - thumb_func_start ov5_021F55CC -ov5_021F55CC: ; 0x021F55CC - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F55F8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F55CC - - thumb_func_start ov5_021F55E8 -ov5_021F55E8: ; 0x021F55E8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F5620 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F55E8 - - thumb_func_start ov5_021F55F8 -ov5_021F55F8: ; 0x021F55F8 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x3a - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r4, #0x18 - add r1, r4, #0 - mov r3, #0xa2 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F55F8 - - thumb_func_start ov5_021F5620 -ov5_021F5620: ; 0x021F5620 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl sub_0207395C - add r4, #0x18 - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F5620 - - thumb_func_start ov5_021F5634 -ov5_021F5634: ; 0x021F5634 - push {r4, r5, lr} - sub sp, #0x1c - ldr r0, [r0, #0x40] - add r5, r1, #0 - mov r1, #8 - add r4, r3, #0 - str r0, [sp, #8] - bl ov5_021DF55C - str r0, [sp, #0xc] - mov r0, #2 - lsl r1, r5, #0x10 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x10] - mov r0, #0xa - lsl r0, r0, #0xc - str r0, [sp, #0x14] - lsl r0, r4, #0x10 - str r0, [sp, #0x18] - add r0, sp, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, _021F567C ; =0x02200B1C - add r2, sp, #0x10 - mov r3, #0 - bl ov5_021DF72C - ldr r0, _021F5680 ; =0x00000609 - bl sub_02005748 - add sp, #0x1c - pop {r4, r5, pc} - nop -_021F567C: .word 0x02200B1C -_021F5680: .word 0x00000609 - thumb_func_end ov5_021F5634 - - thumb_func_start ov5_021F5684 -ov5_021F5684: ; 0x021F5684 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl sub_020715BC - ldr r3, [r0, #4] - ldr r1, [r0, #0] - mov r0, #0 - str r1, [r4, #0x78] - str r3, [r4, #0x7c] - str r0, [sp] - add r2, r3, #4 - ldr r0, [r4, #0x78] - add r1, r4, #0 - add r3, #0x18 - bl ov5_021DFB40 - ldr r1, [r4, #0x7c] - add r0, r4, #0 - add r0, #0x24 - add r1, r1, #4 - add r2, r4, #0 - bl sub_02073B90 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5684 - - thumb_func_start ov5_021F56BC -ov5_021F56BC: ; 0x021F56BC - ldr r3, _021F56C4 ; =sub_02073AA8 - add r0, r1, #0 - bx r3 - nop -_021F56C4: .word sub_02073AA8 - thumb_func_end ov5_021F56BC - - thumb_func_start ov5_021F56C8 -ov5_021F56C8: ; 0x021F56C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02073B40 - cmp r0, #1 - bne _021F56E0 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, pc} -_021F56E0: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F56C8 - - thumb_func_start ov5_021F56F0 -ov5_021F56F0: ; 0x021F56F0 - push {r4, r5, r6, lr} - sub sp, #0x60 - ldr r3, _021F5754 ; =0x02200B10 - add r5, r0, #0 - add r4, r1, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x48 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r6, _021F5758 ; =0x02200B30 - str r0, [r2, #0] - add r3, sp, #0x24 - mov r2, #4 -_021F570A: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021F570A - ldr r0, [r6, #0] - str r0, [r3, #0] - bl sub_020AF5E0 - mov r2, #0 - add r6, r0, #0 - add r0, sp, #0x24 - mov r1, #0x5a - add r3, r2, #0 - bl sub_0201E2E0 - add r0, r6, #0 - add r1, sp, #0 - bl sub_020C4C88 - add r0, sp, #0x24 - add r1, sp, #0 - add r2, r0, #0 - bl sub_020BB8EC - add r0, r5, #0 - add r1, sp, #0x54 - bl sub_020715E4 - add r4, #0x24 - add r0, r4, #0 - add r1, sp, #0x54 - add r2, sp, #0x48 - add r3, sp, #0x24 - bl sub_02073BA4 - add sp, #0x60 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F5754: .word 0x02200B10 -_021F5758: .word 0x02200B30 - thumb_func_end ov5_021F56F0 - - thumb_func_start ov5_021F575C -ov5_021F575C: ; 0x021F575C - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x40 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #4] - bl ov5_021F5788 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F575C - - thumb_func_start ov5_021F5778 -ov5_021F5778: ; 0x021F5778 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F57B4 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F5778 - - thumb_func_start ov5_021F5788 -ov5_021F5788: ; 0x021F5788 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #8 - mov r3, #0x5c - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #4] - add r4, #0x1c - add r1, r4, #0 - mov r3, #0xa4 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5788 - - thumb_func_start ov5_021F57B4 -ov5_021F57B4: ; 0x021F57B4 - push {r4, lr} - add r4, r0, #0 - add r0, #8 - bl sub_0207395C - add r4, #0x1c - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F57B4 - - thumb_func_start ov5_021F57C8 -ov5_021F57C8: ; 0x021F57C8 - push {r4, r5, lr} - sub sp, #0x1c - ldr r0, [r0, #0x40] - add r5, r1, #0 - mov r1, #9 - add r4, r2, #0 - str r0, [sp, #8] - bl ov5_021DF55C - str r0, [sp, #0xc] - mov r0, #2 - mov r3, #0 - lsl r1, r5, #0x10 - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x10] - lsl r1, r4, #0x10 - add r0, r1, r0 - str r0, [sp, #0x18] - str r3, [sp, #0x14] - add r0, sp, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, _021F5808 ; =0x02200B54 - add r2, sp, #0x10 - bl ov5_021DF72C - add sp, #0x1c - pop {r4, r5, pc} - nop -_021F5808: .word 0x02200B54 - thumb_func_end ov5_021F57C8 - - thumb_func_start ov5_021F580C -ov5_021F580C: ; 0x021F580C - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl sub_020715BC - ldr r3, [r0, #4] - ldr r1, [r0, #0] - add r2, r3, #0 - str r1, [r4, #0x78] - str r3, [r4, #0x7c] - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0x78] - add r1, r4, #0 - add r2, #8 - add r3, #0x1c - bl ov5_021DFB40 - ldr r1, [r4, #0x7c] - add r0, r4, #0 - add r0, #0x24 - add r1, #8 - add r2, r4, #0 - bl sub_02073B90 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F580C - - thumb_func_start ov5_021F5844 -ov5_021F5844: ; 0x021F5844 - ldr r3, _021F584C ; =sub_02073AA8 - add r0, r1, #0 - bx r3 - nop -_021F584C: .word sub_02073AA8 - thumb_func_end ov5_021F5844 - - thumb_func_start ov5_021F5850 -ov5_021F5850: ; 0x021F5850 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02073B40 - cmp r0, #1 - bne _021F5868 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, pc} -_021F5868: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5850 - - thumb_func_start ov5_021F5878 -ov5_021F5878: ; 0x021F5878 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x24 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5878 - - thumb_func_start ov5_021F5894 -ov5_021F5894: ; 0x021F5894 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x3c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F58C0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5894 - - thumb_func_start ov5_021F58B0 -ov5_021F58B0: ; 0x021F58B0 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F58E8 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F58B0 - - thumb_func_start ov5_021F58C0 -ov5_021F58C0: ; 0x021F58C0 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x5b - bl ov5_021DFB00 - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r4, #0x18 - add r1, r4, #0 - mov r3, #0xa3 - bl ov5_021DFB24 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov5_021F58C0 - - thumb_func_start ov5_021F58E8 -ov5_021F58E8: ; 0x021F58E8 - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - bl sub_0207395C - add r4, #0x18 - add r0, r4, #0 - bl sub_02073AA8 - pop {r4, pc} - thumb_func_end ov5_021F58E8 - - thumb_func_start ov5_021F58FC -ov5_021F58FC: ; 0x021F58FC - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - bl ov5_021DF578 - mov r1, #0xa - str r0, [sp, #8] - bl ov5_021DF55C - str r0, [sp, #0xc] - add r0, r4, #0 - add r1, sp, #0x10 - bl sub_02063050 - add r0, r4, #0 - bl sub_0206298C - cmp r0, #3 - bhi _021F5964 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F592E: ; jump table - .short _021F5936 - _021F592E - 2 ; case 0 - .short _021F5942 - _021F592E - 2 ; case 1 - .short _021F595A - _021F592E - 2 ; case 2 - .short _021F594E - _021F592E - 2 ; case 3 -_021F5936: - mov r0, #1 - ldr r1, [sp, #0x18] - lsl r0, r0, #0x10 - sub r0, r1, r0 - str r0, [sp, #0x18] - b _021F5964 -_021F5942: - mov r0, #1 - ldr r1, [sp, #0x18] - lsl r0, r0, #0x10 - add r0, r1, r0 - str r0, [sp, #0x18] - b _021F5964 -_021F594E: - mov r0, #1 - ldr r1, [sp, #0x10] - lsl r0, r0, #0x10 - add r0, r1, r0 - str r0, [sp, #0x10] - b _021F5964 -_021F595A: - mov r0, #1 - ldr r1, [sp, #0x10] - lsl r0, r0, #0x10 - sub r0, r1, r0 - str r0, [sp, #0x10] -_021F5964: - add r0, r4, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #8 - str r1, [sp] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, _021F5984 ; =0x02200B68 - add r2, sp, #0x10 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x1c - pop {r3, r4, pc} - nop -_021F5984: .word 0x02200B68 - thumb_func_end ov5_021F58FC - - thumb_func_start ov5_021F5988 -ov5_021F5988: ; 0x021F5988 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl sub_020715BC - ldr r3, [r0, #4] - ldr r1, [r0, #0] - mov r0, #0 - str r1, [r4, #0x78] - str r3, [r4, #0x7c] - str r0, [sp] - add r2, r3, #4 - ldr r0, [r4, #0x78] - add r1, r4, #0 - add r3, #0x18 - bl ov5_021DFB40 - ldr r1, [r4, #0x7c] - add r0, r4, #0 - add r0, #0x24 - add r1, r1, #4 - add r2, r4, #0 - bl sub_02073B90 - mov r0, #1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5988 - - thumb_func_start ov5_021F59C0 -ov5_021F59C0: ; 0x021F59C0 - ldr r3, _021F59C8 ; =sub_02073AA8 - add r0, r1, #0 - bx r3 - nop -_021F59C8: .word sub_02073AA8 - thumb_func_end ov5_021F59C0 - - thumb_func_start ov5_021F59CC -ov5_021F59CC: ; 0x021F59CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02073B40 - cmp r0, #1 - bne _021F59E4 - add r0, r5, #0 - bl ov5_021DF74C - pop {r3, r4, r5, pc} -_021F59E4: - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0 - bl sub_02073AC0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F59CC - - thumb_func_start ov5_021F59F4 -ov5_021F59F4: ; 0x021F59F4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_020715E4 - add r4, #0x24 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02073BB4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F59F4 - - thumb_func_start ov5_021F5A10 -ov5_021F5A10: ; 0x021F5A10 - push {r4, lr} - mov r2, #0 - mov r1, #0xc - add r3, r2, #0 - add r4, r0, #0 - bl ov5_021DF53C - str r4, [r0, #8] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5A10 - - thumb_func_start ov5_021F5A24 -ov5_021F5A24: ; 0x021F5A24 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F5B50 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F5A24 - - thumb_func_start ov5_021F5A34 -ov5_021F5A34: ; 0x021F5A34 - mov r1, #0 - ldrsh r1, [r0, r1] - add r1, r1, #1 - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F5A34 - - thumb_func_start ov5_021F5A40 -ov5_021F5A40: ; 0x021F5A40 - push {r3, lr} - mov r1, #0 - ldrsh r2, [r0, r1] - sub r2, r2, #1 - strh r2, [r0] - ldrsh r0, [r0, r1] - cmp r0, #0 - bge _021F5A54 - bl sub_02022974 -_021F5A54: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5A40 - - thumb_func_start ov5_021F5A58 -ov5_021F5A58: ; 0x021F5A58 - mov r1, #2 - ldrsh r1, [r0, r1] - add r1, r1, #1 - strh r1, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F5A58 - - thumb_func_start ov5_021F5A64 -ov5_021F5A64: ; 0x021F5A64 - push {r3, lr} - mov r1, #2 - ldrsh r2, [r0, r1] - sub r2, r2, #1 - strh r2, [r0, #2] - ldrsh r0, [r0, r1] - cmp r0, #0 - bge _021F5A78 - bl sub_02022974 -_021F5A78: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5A64 - - thumb_func_start ov5_021F5A7C -ov5_021F5A7C: ; 0x021F5A7C - push {r3, lr} - cmp r1, #0 - bne _021F5A88 - bl ov5_021F5A34 - pop {r3, pc} -_021F5A88: - bl ov5_021F5A58 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5A7C - - thumb_func_start ov5_021F5A90 -ov5_021F5A90: ; 0x021F5A90 - push {r3, lr} - cmp r1, #0 - bne _021F5A9C - bl ov5_021F5A40 - pop {r3, pc} -_021F5A9C: - bl ov5_021F5A64 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5A90 - - thumb_func_start ov5_021F5AA4 -ov5_021F5AA4: ; 0x021F5AA4 - push {r4, lr} - ldr r0, [r0, #0x40] - add r4, r1, #0 - mov r1, #0x14 - bl ov5_021DF55C - strb r4, [r0, #6] - pop {r4, pc} - thumb_func_end ov5_021F5AA4 - - thumb_func_start ov5_021F5AB4 -ov5_021F5AB4: ; 0x021F5AB4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r4, #4] - cmp r0, #0 - bne _021F5AF8 - mov r1, #1 - strb r1, [r4, #4] - ldr r0, [r4, #8] - mov r2, #0x55 - bl ov5_021DF9E0 - ldr r0, [r4, #8] - mov r1, #1 - mov r2, #0xaa - bl ov5_021DFA14 - mov r1, #1 - ldr r0, [r4, #8] - mov r2, #4 - add r3, r1, #0 - bl ov5_021DFA3C - mov r1, #1 - str r1, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F5AFC ; =0x02200BC0 - add r2, r1, #0 - str r0, [sp, #8] - ldr r0, [r4, #8] - add r3, r1, #0 - bl ov5_021DF864 -_021F5AF8: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021F5AFC: .word 0x02200BC0 - thumb_func_end ov5_021F5AB4 - - thumb_func_start ov5_021F5B00 -ov5_021F5B00: ; 0x021F5B00 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r4, #5] - cmp r0, #0 - bne _021F5B48 - mov r0, #1 - strb r0, [r4, #5] - ldr r0, [r4, #8] - mov r1, #0xa - mov r2, #0x6c - bl ov5_021DF9E0 - ldr r0, [r4, #8] - mov r1, #0xa - mov r2, #0xaa - bl ov5_021DFA14 - ldr r0, [r4, #8] - mov r1, #0xb - mov r2, #0xd - mov r3, #1 - bl ov5_021DFA3C - mov r0, #0xb - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021F5B4C ; =0x02200BC0 - mov r2, #0xa - str r0, [sp, #8] - ldr r0, [r4, #8] - mov r1, #0xc - add r3, r2, #0 - bl ov5_021DF864 -_021F5B48: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021F5B4C: .word 0x02200BC0 - thumb_func_end ov5_021F5B00 - - thumb_func_start ov5_021F5B50 -ov5_021F5B50: ; 0x021F5B50 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #4] - cmp r0, #1 - bne _021F5B7E - mov r0, #0 - strb r0, [r4, #4] - ldr r0, [r4, #8] - mov r1, #1 - bl ov5_021DFA08 - ldr r0, [r4, #8] - mov r1, #1 - bl ov5_021DFA30 - ldr r0, [r4, #8] - mov r1, #1 - bl ov5_021DFA7C - ldr r0, [r4, #8] - mov r1, #1 - bl ov5_021DF9D4 -_021F5B7E: - pop {r4, pc} - thumb_func_end ov5_021F5B50 - - thumb_func_start ov5_021F5B80 -ov5_021F5B80: ; 0x021F5B80 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #5] - cmp r0, #1 - bne _021F5BAE - mov r0, #0 - strb r0, [r4, #5] - ldr r0, [r4, #8] - mov r1, #0xa - bl ov5_021DFA08 - ldr r0, [r4, #8] - mov r1, #0xa - bl ov5_021DFA30 - ldr r0, [r4, #8] - mov r1, #0xb - bl ov5_021DFA7C - ldr r0, [r4, #8] - mov r1, #0xc - bl ov5_021DF9D4 -_021F5BAE: - pop {r4, pc} - thumb_func_end ov5_021F5B80 - - thumb_func_start ov5_021F5BB0 -ov5_021F5BB0: ; 0x021F5BB0 - push {r3, lr} - mov r1, #0 - ldrsh r1, [r0, r1] - cmp r1, #0 - bne _021F5BBE - bl ov5_021F5AB4 -_021F5BBE: - pop {r3, pc} - thumb_func_end ov5_021F5BB0 - - thumb_func_start ov5_021F5BC0 -ov5_021F5BC0: ; 0x021F5BC0 - push {r3, lr} - mov r1, #2 - ldrsh r1, [r0, r1] - cmp r1, #0 - bne _021F5BCE - bl ov5_021F5B00 -_021F5BCE: - pop {r3, pc} - thumb_func_end ov5_021F5BC0 - - thumb_func_start ov5_021F5BD0 -ov5_021F5BD0: ; 0x021F5BD0 - push {r3, lr} - mov r1, #0 - ldrsh r1, [r0, r1] - cmp r1, #0 - bne _021F5BDE - bl ov5_021F5B50 -_021F5BDE: - pop {r3, pc} - thumb_func_end ov5_021F5BD0 - - thumb_func_start ov5_021F5BE0 -ov5_021F5BE0: ; 0x021F5BE0 - push {r3, lr} - mov r1, #2 - ldrsh r1, [r0, r1] - cmp r1, #0 - bne _021F5BEE - bl ov5_021F5B80 -_021F5BEE: - pop {r3, pc} - thumb_func_end ov5_021F5BE0 - - thumb_func_start ov5_021F5BF0 -ov5_021F5BF0: ; 0x021F5BF0 - push {r3, lr} - cmp r1, #0 - bne _021F5BFC - bl ov5_021F5BB0 - pop {r3, pc} -_021F5BFC: - bl ov5_021F5BC0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5BF0 - - thumb_func_start ov5_021F5C04 -ov5_021F5C04: ; 0x021F5C04 - push {r3, lr} - cmp r1, #0 - bne _021F5C10 - bl ov5_021F5BD0 - pop {r3, pc} -_021F5C10: - bl ov5_021F5BE0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5C04 - - thumb_func_start ov5_021F5C18 -ov5_021F5C18: ; 0x021F5C18 - push {r4, r5, r6, lr} - sub sp, #8 - ldr r6, _021F5C48 ; =0x02200B7C - add r4, r3, #0 - ldmia r6!, {r5, r6} - add r3, sp, #0 - str r5, [sp] - str r6, [sp, #4] - lsl r1, r1, #2 - ldr r1, [r3, r1] - bl ov5_021DF84C - add r5, r0, #0 - cmp r4, #1 - bne _021F5C40 - bl sub_020213F4 - mov r1, #0 - bl sub_020B37A4 -_021F5C40: - add r0, r5, #0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_021F5C48: .word 0x02200B7C - thumb_func_end ov5_021F5C18 - - thumb_func_start ov5_021F5C4C -ov5_021F5C4C: ; 0x021F5C4C - push {r3, lr} - bl sub_02071598 - ldr r0, [r0, #0x14] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5C4C - - thumb_func_start ov5_021F5C58 -ov5_021F5C58: ; 0x021F5C58 - push {r3, lr} - bl sub_02071598 - mov r1, #1 - str r1, [r0, #0x10] - ldr r0, [r0, #0x40] - cmp r0, #0 - beq _021F5C6E - mov r1, #0 - bl sub_02021320 -_021F5C6E: - pop {r3, pc} - thumb_func_end ov5_021F5C58 - - thumb_func_start ov5_021F5C70 -ov5_021F5C70: ; 0x021F5C70 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x30 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5BF0 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r3, [r4, #0x38] - ldr r0, [r4, #0x34] - ldrb r3, [r3, #6] - ldr r1, [r4, #0x30] - add r2, sp, #0 - bl ov5_021F5C18 - str r0, [r4, #0x40] - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5A7C - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #1 - bne _021F5CC8 - ldr r0, _021F5CD0 ; =0x000005DD - bl sub_02005748 -_021F5CC8: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - nop -_021F5CD0: .word 0x000005DD - thumb_func_end ov5_021F5C70 - - thumb_func_start ov5_021F5CD4 -ov5_021F5CD4: ; 0x021F5CD4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - add r5, r0, #0 - bl sub_020715E4 - ldr r0, [r4, #0] - cmp r0, #0 - beq _021F5CF0 - cmp r0, #1 - beq _021F5D12 - cmp r0, #2 - b _021F5D2A -_021F5CF0: - ldr r1, [r4, #0x1c] - ldr r0, [r4, #0x28] - add r0, r1, r0 - str r0, [r4, #0x1c] - beq _021F5D06 - mov r0, #2 - ldr r1, [r4, #0x28] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [r4, #0x28] - b _021F5D2A -_021F5D06: - mov r0, #0 - str r0, [r4, #0x28] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F5D2A -_021F5D12: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x1e - blt _021F5D2A - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #0x14] -_021F5D2A: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5CD4 - - thumb_func_start ov5_021F5D38 -ov5_021F5D38: ; 0x021F5D38 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x40] - bl sub_020211FC - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5A90 - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5C04 - pop {r4, pc} - thumb_func_end ov5_021F5D38 - - thumb_func_start ov5_021F5D54 -ov5_021F5D54: ; 0x021F5D54 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #0x10] - cmp r1, #1 - beq _021F5D86 - add r1, sp, #0 - bl sub_020715E4 - ldr r1, [sp] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r4, #0x1c] - add r0, r1, r0 - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [r4, #0x20] - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [r4, #0x40] - add r1, sp, #0 - bl sub_020212A8 -_021F5D86: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F5D54 - - thumb_func_start ov5_021F5D8C -ov5_021F5D8C: ; 0x021F5D8C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r6, r1, #0 - str r2, [sp, #8] - add r7, r3, #0 - bl ov5_021DF578 - add r4, r0, #0 - mov r1, #0x14 - str r6, [sp, #0x18] - str r4, [sp, #0x1c] - bl ov5_021DF55C - str r0, [sp, #0x20] - add r0, r5, #0 - add r1, sp, #0xc - str r5, [sp, #0x24] - bl sub_02063050 - add r0, r5, #0 - bl sub_02062C0C - add r2, r0, #1 - cmp r7, #1 - bne _021F5DC4 - ldr r1, _021F5DDC ; =0x02200BAC - b _021F5DC6 -_021F5DC4: - ldr r1, _021F5DE0 ; =0x02200B84 -_021F5DC6: - add r0, sp, #0x18 - str r0, [sp] - str r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - add r2, sp, #0xc - bl ov5_021DF72C - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F5DDC: .word 0x02200BAC -_021F5DE0: .word 0x02200B84 - thumb_func_end ov5_021F5D8C - - thumb_func_start ov5_021F5DE4 -ov5_021F5DE4: ; 0x021F5DE4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x30 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x3c] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x3c] - bl sub_02062918 - str r0, [r4, #0xc] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5BF0 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r3, [r4, #0x38] - ldr r0, [r4, #0x34] - ldrb r3, [r3, #6] - ldr r1, [r4, #0x30] - add r2, sp, #0 - bl ov5_021F5C18 - str r0, [r4, #0x40] - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5A7C - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #1 - bne _021F5E4C - ldr r0, _021F5E54 ; =0x000005DD - bl sub_02005748 -_021F5E4C: - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - nop -_021F5E54: .word 0x000005DD - thumb_func_end ov5_021F5DE4 - - thumb_func_start ov5_021F5E58 -ov5_021F5E58: ; 0x021F5E58 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x3c] - ldr r1, [r4, #8] - add r5, r0, #0 - ldr r2, [r4, #0xc] - add r0, r6, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F5E74 - bl sub_02022974 -_021F5E74: - add r0, r6, #0 - add r1, sp, #0 - bl ov5_021ECDA0 - mov r0, #2 - ldr r1, [sp, #4] - lsl r0, r0, #0x10 - add r1, r1, r0 - str r1, [sp, #4] - ldr r2, [sp, #8] - lsr r1, r0, #5 - add r1, r2, r1 - str r1, [sp, #8] - ldr r1, [r4, #0] - cmp r1, #0 - beq _021F5E9C - cmp r1, #1 - beq _021F5EBC - cmp r1, #2 - b _021F5ED4 -_021F5E9C: - ldr r2, [r4, #0x1c] - ldr r1, [r4, #0x28] - add r1, r2, r1 - str r1, [r4, #0x1c] - beq _021F5EB0 - ldr r1, [r4, #0x28] - lsr r0, r0, #4 - sub r0, r1, r0 - str r0, [r4, #0x28] - b _021F5ED4 -_021F5EB0: - mov r0, #0 - str r0, [r4, #0x28] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F5ED4 -_021F5EBC: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x1e - blt _021F5ED4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #0x14] -_021F5ED4: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021F5E58 - - thumb_func_start ov5_021F5EE0 -ov5_021F5EE0: ; 0x021F5EE0 - push {r4, lr} - add r4, r1, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x30 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x3c] - bl sub_02062910 - str r0, [r4, #8] - ldr r0, [r4, #0x3c] - bl sub_02062918 - str r0, [r4, #0xc] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [r4, #0x28] - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5BF0 - ldr r0, [r4, #0x38] - ldr r1, [r4, #0x30] - bl ov5_021F5A7C - mov r0, #1 - pop {r4, pc} - thumb_func_end ov5_021F5EE0 - - thumb_func_start ov5_021F5F24 -ov5_021F5F24: ; 0x021F5F24 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r6, [r4, #0x3c] - ldr r1, [r4, #8] - add r5, r0, #0 - ldr r2, [r4, #0xc] - add r0, r6, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F5F40 - bl sub_02022974 -_021F5F40: - add r0, r6, #0 - add r1, sp, #0 - bl ov5_021ECDA0 - mov r0, #2 - ldr r1, [sp, #4] - lsl r0, r0, #0x10 - add r1, r1, r0 - str r1, [sp, #4] - ldr r1, [sp, #8] - lsr r0, r0, #5 - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [r4, #0] - cmp r0, #6 - bhi _021F5FFA - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021F5F6C: ; jump table - .short _021F5F7A - _021F5F6C - 2 ; case 0 - .short _021F5F7A - _021F5F6C - 2 ; case 1 - .short _021F5F80 - _021F5F6C - 2 ; case 2 - .short _021F5F9E - _021F5F6C - 2 ; case 3 - .short _021F5FC0 - _021F5F6C - 2 ; case 4 - .short _021F5FE2 - _021F5F6C - 2 ; case 5 - .short _021F5FFA - _021F5F6C - 2 ; case 6 -_021F5F7A: - add r0, r0, #1 - str r0, [r4, #0] - b _021F5FFA -_021F5F80: - ldr r3, [r4, #0x38] - ldr r0, [r4, #0x34] - ldrb r3, [r3, #6] - ldr r1, [r4, #0x30] - add r2, sp, #0 - bl ov5_021F5C18 - str r0, [r4, #0x40] - mov r1, #0 - bl sub_02021320 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F5FFA -_021F5F9E: - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02021320 - mov r0, #0 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #1 - bne _021F5FBA - ldr r0, _021F6008 ; =0x000005DD - bl sub_02005748 -_021F5FBA: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_021F5FC0: - ldr r1, [r4, #0x1c] - ldr r0, [r4, #0x28] - add r0, r1, r0 - str r0, [r4, #0x1c] - beq _021F5FD6 - mov r0, #2 - ldr r1, [r4, #0x28] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [r4, #0x28] - b _021F5FFA -_021F5FD6: - mov r0, #0 - str r0, [r4, #0x28] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021F5FFA -_021F5FE2: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x1e - blt _021F5FFA - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #0x14] -_021F5FFA: - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021F6008: .word 0x000005DD - thumb_func_end ov5_021F5F24 - - thumb_func_start ov5_021F600C -ov5_021F600C: ; 0x021F600C - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #4 - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F6038 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F600C - - thumb_func_start ov5_021F6028 -ov5_021F6028: ; 0x021F6028 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F6074 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F6028 - - thumb_func_start ov5_021F6038 -ov5_021F6038: ; 0x021F6038 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #4 - mov r2, #0x57 - bl ov5_021DF9E0 - ldr r0, [r4, #0] - mov r1, #3 - mov r2, #6 - mov r3, #1 - bl ov5_021DFA3C - mov r0, #3 - str r0, [sp] - mov r3, #0 - mov r1, #4 - ldr r0, _021F6070 ; =0x02200BEC - str r3, [sp, #4] - str r0, [sp, #8] - ldr r0, [r4, #0] - add r2, r1, #0 - bl ov5_021DF864 - add sp, #0xc - pop {r3, r4, pc} - nop -_021F6070: .word 0x02200BEC - thumb_func_end ov5_021F6038 - - thumb_func_start ov5_021F6074 -ov5_021F6074: ; 0x021F6074 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #4 - bl ov5_021DFA08 - ldr r0, [r4, #0] - mov r1, #3 - bl ov5_021DFA7C - ldr r0, [r4, #0] - mov r1, #4 - bl ov5_021DF9D4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F6074 - - thumb_func_start ov5_021F6094 -ov5_021F6094: ; 0x021F6094 - push {r4, r5, lr} - sub sp, #0x24 - add r5, r0, #0 - bl ov5_021DF578 - add r4, r0, #0 - add r0, r5, #0 - bl sub_02062C00 - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #0x16 - str r4, [sp, #0x18] - bl ov5_021DF55C - str r0, [sp, #0x1c] - add r1, sp, #8 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r5, #0 - mov r1, #2 - str r5, [sp, #0x20] - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F60E0 ; =0x02200BD8 - add r0, r4, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x24 - pop {r4, r5, pc} - nop -_021F60E0: .word 0x02200BD8 - thumb_func_end ov5_021F6094 - - thumb_func_start ov5_021F60E4 -ov5_021F60E4: ; 0x021F60E4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r2, sp, #0 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r5, r0, #0 - str r1, [r2, #8] - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x1c] - bl sub_02062910 - str r0, [r4, #4] - ldr r0, [r4, #0x1c] - bl sub_02062918 - str r0, [r4, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0x14] - mov r1, #4 - add r2, sp, #0 - bl ov5_021DF84C - str r0, [r4, #0x20] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F60E4 - - thumb_func_start ov5_021F6134 -ov5_021F6134: ; 0x021F6134 - ldr r3, _021F613C ; =sub_020211FC - ldr r0, [r1, #0x20] - bx r3 - nop -_021F613C: .word sub_020211FC - thumb_func_end ov5_021F6134 - - thumb_func_start ov5_021F6140 -ov5_021F6140: ; 0x021F6140 - push {r4, lr} - add r2, r1, #0 - add r4, r0, #0 - ldr r0, [r2, #0x1c] - ldr r1, [r2, #4] - ldr r2, [r2, #8] - bl sub_02062764 - cmp r0, #0 - bne _021F615A - add r0, r4, #0 - bl ov5_021DF74C -_021F615A: - pop {r4, pc} - thumb_func_end ov5_021F6140 - - thumb_func_start ov5_021F615C -ov5_021F615C: ; 0x021F615C - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r1, #0 - ldr r4, [r5, #0x1c] - ldr r1, [r5, #4] - add r6, r0, #0 - ldr r2, [r5, #8] - add r0, r4, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F617E - add r0, r6, #0 - bl ov5_021DF74C - add sp, #0x18 - pop {r4, r5, r6, pc} -_021F617E: - add r0, r4, #0 - add r1, sp, #0xc - bl sub_02063050 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02063078 - ldr r1, [sp, #0xc] - ldr r0, [sp] - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r0, [sp, #4] - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [sp, #8] - add r1, r1, r0 - mov r0, #3 - lsl r0, r0, #0xe - str r1, [sp, #0x14] - add r0, r1, r0 - str r0, [sp, #0x14] - ldr r0, [r5, #0x20] - add r1, sp, #0xc - bl sub_020212A8 - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov5_021F615C - - thumb_func_start ov5_021F61BC -ov5_021F61BC: ; 0x021F61BC - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x6c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F61E8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F61BC - - thumb_func_start ov5_021F61D8 -ov5_021F61D8: ; 0x021F61D8 - push {r4, lr} - add r4, r0, #0 - bl ov5_021F620C - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F61D8 - - thumb_func_start ov5_021F61E8 -ov5_021F61E8: ; 0x021F61E8 - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x50 - bl ov5_021DFB00 - add r0, r4, #0 - add r0, #0x18 - add r1, r4, #4 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F61E8 - - thumb_func_start ov5_021F620C -ov5_021F620C: ; 0x021F620C - ldr r3, _021F6214 ; =sub_0207395C - add r0, r0, #4 - bx r3 - nop -_021F6214: .word sub_0207395C - thumb_func_end ov5_021F620C - - thumb_func_start ov5_021F6218 -ov5_021F6218: ; 0x021F6218 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r2, sp, #8 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r5, r0, #0 - str r1, [r2, #8] - bl sub_0205EB3C - add r4, r0, #0 - bl ov5_021DF578 - add r6, r0, #0 - mov r1, #0xe - str r6, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - add r0, r4, #0 - mov r1, #2 - str r5, [sp, #0x1c] - bl sub_02062758 - add r1, sp, #0x14 - str r1, [sp] - str r0, [sp, #4] - ldr r1, _021F6260 ; =0x02200C10 - add r0, r6, #0 - add r2, sp, #8 - mov r3, #0 - bl ov5_021DF72C - add sp, #0x20 - pop {r4, r5, r6, pc} - nop -_021F6260: .word 0x02200C10 - thumb_func_end ov5_021F6218 - - thumb_func_start ov5_021F6264 -ov5_021F6264: ; 0x021F6264 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_020715BC - add r4, r0, #0 - add r3, r4, #0 - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x24 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #8] - bl sub_0205EB3C - mov r1, #0 - mvn r1, r1 - add r4, r0, #0 - str r1, [r5, #4] - bl sub_02062910 - str r0, [r5, #0x14] - add r0, r4, #0 - bl sub_02062918 - str r0, [r5, #0x18] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F6264 - - thumb_func_start ov5_021F629C -ov5_021F629C: ; 0x021F629C - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F629C - - thumb_func_start ov5_021F62A0 -ov5_021F62A0: ; 0x021F62A0 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r1, #0 - str r0, [sp] - ldr r0, [r5, #0x2c] - str r0, [sp, #4] - bl sub_0205EB3C - ldr r1, [r5, #0x14] - ldr r2, [r5, #0x18] - add r6, r0, #0 - bl sub_02062764 - cmp r0, #0 - bne _021F62C8 - ldr r0, [sp] - bl ov5_021DF74C - add sp, #0x24 - pop {r4, r5, r6, r7, pc} -_021F62C8: - ldr r7, [r5, #4] - add r0, r6, #0 - bl sub_02062BE8 - strb r0, [r5, #8] - ldrb r0, [r5, #8] - bl ov5_021F6414 - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0] - ldr r4, [r5, #4] - sub r0, r0, #1 - cmp r4, r0 - beq _021F62F0 - ldr r0, [sp, #4] - bl sub_0205EA78 - cmp r4, r0 - beq _021F62FE -_021F62F0: - mov r0, #0 - str r0, [r5, #0x1c] - str r0, [r5, #0x20] - mov r0, #1 - add sp, #0x24 - str r0, [r5, #0] - pop {r4, r5, r6, r7, pc} -_021F62FE: - cmp r7, r4 - beq _021F6308 - mov r0, #0 - str r0, [r5, #0x1c] - str r0, [r5, #0x20] -_021F6308: - add r0, r6, #0 - bl sub_02063020 - add r4, r0, #0 - ldr r0, [r5, #4] - bl sub_0206419C - add r7, r0, #0 - add r0, r6, #0 - bl sub_02063040 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_020641A8 - add r2, r0, #0 - ldr r1, [sp, #8] - add r0, r4, r7 - add r1, r1, r2 - add r2, sp, #0xc - bl sub_02064450 - add r0, r6, #0 - add r1, sp, #0x18 - bl sub_02063050 - ldr r0, [sp, #0x1c] - add r1, sp, #0xc - str r0, [sp, #0x10] - ldr r0, [sp] - bl sub_020715D4 - ldr r0, [r5, #0x1c] - add r0, r0, #1 - str r0, [r5, #0x1c] - cmp r0, #0xf - ble _021F6368 - mov r0, #0 - str r0, [r5, #0x1c] - ldr r0, [r5, #0x20] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - str r0, [r5, #0x20] -_021F6368: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021F62A0 - - thumb_func_start ov5_021F636C -ov5_021F636C: ; 0x021F636C - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r3, r1, #0 - add r6, r0, #0 - ldr r0, [r3, #0] - cmp r0, #1 - beq _021F6408 - mov r0, #0 - ldr r1, [r3, #4] - mvn r0, r0 - cmp r1, r0 - beq _021F6408 - ldr r5, _021F640C ; =0x02200C04 - add r4, sp, #0 - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - mov r7, #0x18 - str r0, [r4, #0] - ldr r1, [r3, #4] - ldr r4, _021F6410 ; =0x02200C24 - add r0, r1, #0 - mul r0, r7 - add r0, r4, r0 - ldr r5, [r3, #0x28] - ldr r4, [r3, #0x20] - mov r3, #0xc - mul r3, r4 - mov r2, #0 - add r5, #0x18 - add r4, r0, r3 - cmp r1, #3 - bhi _021F63CE - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F63BA: ; jump table - .short _021F63C2 - _021F63BA - 2 ; case 0 - .short _021F63CE - _021F63BA - 2 ; case 1 - .short _021F63C6 - _021F63BA - 2 ; case 2 - .short _021F63CC - _021F63BA - 2 ; case 3 -_021F63C2: - mov r2, #0xb4 - b _021F63CE -_021F63C6: - add r2, r7, #0 - add r2, #0xf6 - b _021F63CE -_021F63CC: - mov r2, #0x5a -_021F63CE: - mov r1, #0 - lsl r2, r2, #0x10 - add r0, sp, #0x18 - lsr r2, r2, #0x10 - add r3, r1, #0 - bl sub_0201E2E0 - add r0, r6, #0 - add r1, sp, #0xc - bl sub_020715E4 - ldr r1, [sp, #0xc] - ldr r0, [r4, #0] - add r2, sp, #0 - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r0, [r4, #4] - add r3, sp, #0x18 - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [r4, #8] - add r0, r1, r0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, sp, #0xc - bl sub_02073BA4 -_021F6408: - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F640C: .word 0x02200C04 -_021F6410: .word 0x02200C24 - thumb_func_end ov5_021F636C - - thumb_func_start ov5_021F6414 -ov5_021F6414: ; 0x021F6414 - push {r4, lr} - add r4, r0, #0 - bl sub_0205DB10 - cmp r0, #0 - beq _021F6424 - mov r0, #0 - pop {r4, pc} -_021F6424: - add r0, r4, #0 - bl sub_0205DB1C - cmp r0, #0 - beq _021F6432 - mov r0, #1 - pop {r4, pc} -_021F6432: - add r0, r4, #0 - bl sub_0205DB04 - cmp r0, #0 - beq _021F6440 - mov r0, #2 - pop {r4, pc} -_021F6440: - add r0, r4, #0 - bl sub_0205DAF8 - cmp r0, #0 - beq _021F644E - mov r0, #3 - pop {r4, pc} -_021F644E: - mov r0, #0 - mvn r0, r0 - pop {r4, pc} - thumb_func_end ov5_021F6414 - - thumb_func_start ov5_021F6454 -ov5_021F6454: ; 0x021F6454 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - str r0, [sp, #0x1c] - add r0, #0x80 - ldr r6, [r0, #0] - mov r1, #0xf - add r0, r6, #0 - bl sub_0203F098 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x1c] - bl sub_0203E838 - add r1, r0, #0 - ldr r0, [sp, #0x1c] - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - str r0, [sp, #0x30] - ldr r0, [sp, #0x1c] - bl sub_0203E838 - add r1, r0, #0 - ldr r0, [sp, #0x1c] - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - str r0, [sp, #0x34] - ldr r0, [sp, #0x1c] - bl sub_0203E838 - add r4, r0, #0 - ldr r0, [sp, #0x1c] - bl sub_0203E838 - add r7, r0, #0 - ldr r0, [sp, #0x1c] - bl sub_0203E838 - str r0, [sp, #0x38] - ldr r0, [sp, #0x1c] - mov r2, #0x67 - str r4, [r0, #0x64] - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x20 - bl sub_0200B144 - str r0, [sp, #0x20] - add r0, r6, #0 - add r1, r4, #0 - bl sub_0203F118 - add r4, r0, #0 - ldr r0, [sp, #0x1c] - mov r1, #1 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F098 - add r5, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl sub_0203F118 - add r7, r0, #0 - ldr r1, [sp, #0x38] - add r0, r6, #0 - bl sub_0203F118 - mov r2, #1 - str r2, [sp] - ldr r1, [sp, #0x2c] - str r4, [sp, #4] - ldr r1, [r1, #0] - mov r3, #0 - str r1, [sp, #8] - ldr r1, [sp, #0x20] - str r5, [sp, #0xc] - str r1, [sp, #0x10] - str r7, [sp, #0x14] - str r0, [sp, #0x18] - add r0, r6, #0 - mov r1, #0x14 - bl ov5_021F6704 - add r7, r0, #0 - ldr r0, [r6, #0xc] - mov r1, #0xb - add r2, sp, #0x44 - bl sub_020308A0 - str r0, [sp, #0x28] - ldr r0, [sp, #0x44] - cmp r0, #1 - bne _021F6570 - ldr r1, [sp, #0x34] - mov r0, #0x20 - lsl r2, r1, #1 - ldr r1, _021F65C4 ; =0x0220210C - ldrh r1, [r1, r2] - add r2, sp, #0x40 - bl ov5_021F65FC - str r0, [sp, #0x24] - ldr r0, [sp, #0x40] - mov r4, #0 - cmp r0, #0 - ble _021F656A - ldr r0, [sp, #0x30] - ldr r5, [sp, #0x24] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x3c] -_021F653E: - ldr r0, [sp, #0x3c] - bl sub_0205E584 - add r2, r0, #0 - ldrh r3, [r5] - ldr r0, [r6, #0xc] - ldr r1, [sp, #0x28] - bl sub_020308BC - cmp r0, #0 - beq _021F6560 - ldrh r1, [r5] - add r0, r7, #0 - mov r2, #0xff - add r3, r1, #0 - bl ov5_021F6760 -_021F6560: - ldr r0, [sp, #0x40] - add r4, r4, #1 - add r5, r5, #2 - cmp r4, r0 - blt _021F653E -_021F656A: - ldr r0, [sp, #0x24] - bl sub_020181C4 -_021F6570: - ldr r0, [sp, #0x28] - cmp r0, #0 - beq _021F657A - bl sub_020181C4 -_021F657A: - ldr r2, _021F65C8 ; =0x00000169 - mov r0, #1 - mov r1, #0x1a - mov r3, #0x20 - bl sub_0200B144 - add r4, r0, #0 - add r0, r7, #0 - add r1, r4, #0 - bl ov5_021F661C - ldr r3, _021F65CC ; =0x0000FFFE - add r0, r7, #0 - mov r1, #0xc - mov r2, #0xff - bl ov5_021F6760 - add r0, r4, #0 - bl sub_0200B190 - ldr r1, [sp, #0x20] - add r0, r7, #0 - bl ov5_021F661C - add r0, r7, #0 - bl ov5_021F6768 - ldr r0, [sp, #0x1c] - ldr r1, _021F65D0 ; =ov5_021F65D4 - bl sub_0203E764 - ldr r0, [sp, #0x20] - bl sub_0200B190 - mov r0, #1 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F65C4: .word 0x0220210C -_021F65C8: .word 0x00000169 -_021F65CC: .word 0x0000FFFE -_021F65D0: .word ov5_021F65D4 - thumb_func_end ov5_021F6454 - - thumb_func_start ov5_021F65D4 -ov5_021F65D4: ; 0x021F65D4 - push {r3, lr} - add r1, r0, #0 - ldr r1, [r1, #0x64] - add r0, #0x80 - lsl r1, r1, #0x10 - ldr r0, [r0, #0] - lsr r1, r1, #0x10 - bl sub_0203F118 - ldrh r1, [r0] - ldr r0, _021F65F8 ; =0x0000EEEE - cmp r1, r0 - beq _021F65F2 - mov r0, #1 - pop {r3, pc} -_021F65F2: - mov r0, #0 - pop {r3, pc} - nop -_021F65F8: .word 0x0000EEEE - thumb_func_end ov5_021F65D4 - - thumb_func_start ov5_021F65FC -ov5_021F65FC: ; 0x021F65FC - push {r3, r4, lr} - sub sp, #0xc - add r4, r2, #0 - mov r2, #0 - add r3, r0, #0 - str r2, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0x4b - bl sub_02007068 - ldr r1, [sp, #8] - lsr r1, r1, #1 - str r1, [r4, #0] - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov5_021F65FC - - thumb_func_start ov5_021F661C -ov5_021F661C: ; 0x021F661C - mov r2, #0x7f - lsl r2, r2, #2 - str r1, [r0, r2] - bx lr - thumb_func_end ov5_021F661C - - thumb_func_start ov5_021F6624 -ov5_021F6624: ; 0x021F6624 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r2, #0 - mov r2, #0x7f - ldr r1, [sp, #0x2c] - lsl r2, r2, #2 - str r1, [r6, r2] - add r1, r2, #0 - add r1, #0xb - add r5, r3, #0 - ldrb r1, [r6, r1] - mov r3, #2 - bic r1, r3 - add r3, r2, #0 - add r3, #0xb - strb r1, [r6, r3] - ldr r3, [sp, #0x24] - add r1, r2, #4 - str r3, [r6, r1] - str r0, [r6, #0] - add r0, r2, #0 - ldr r1, [sp, #0x20] - add r0, #0x14 - str r1, [r6, r0] - add r0, r2, #0 - add r0, #0x14 - ldr r0, [r6, r0] - mov r1, #0 - strh r1, [r0] - add r0, r2, #0 - ldr r3, [sp, #0x30] - add r0, #0x18 - str r3, [r6, r0] - add r0, r2, #0 - ldr r3, [sp, #0x34] - add r0, #0x1c - str r3, [r6, r0] - add r0, r2, #0 - add r0, #0xb - ldrb r4, [r6, r0] - mov r0, #1 - bic r4, r0 - add r0, sp, #8 - ldrb r3, [r0, #0x14] - mov r0, #1 - and r0, r3 - add r3, r4, #0 - orr r3, r0 - add r0, r2, #0 - add r0, #0xb - strb r3, [r6, r0] - add r0, sp, #8 - add r3, r2, #0 - ldrb r0, [r0, #0x10] - add r3, #0xa - strb r0, [r6, r3] - add r3, r2, #0 - add r3, #0xc - strb r7, [r6, r3] - add r3, r2, #0 - add r3, #0xd - strb r5, [r6, r3] - add r3, r2, #0 - add r3, #0xf - strb r1, [r6, r3] - ldr r3, [sp, #0x28] - add r2, #8 - str r3, [r6, #0x18] - mov r3, #3 - strb r3, [r6, r2] - ldr r2, _021F66F8 ; =0x000006F4 - ldr r7, _021F66FC ; =0x00000604 - strh r0, [r6, r2] - add r2, r6, #0 - add r3, r6, #0 - add r5, r1, #0 - mov r0, #0xff -_021F66BE: - mov r4, #0x91 - lsl r4, r4, #2 - str r5, [r2, r4] - add r4, r4, #4 - str r5, [r2, r4] - strh r0, [r3, r7] - add r1, r1, #1 - add r2, #8 - add r3, r3, #2 - cmp r1, #0x78 - blt _021F66BE - add r4, r6, #0 - mov r7, #0x50 -_021F66D8: - add r0, r7, #0 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x1c] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #0x78 - blt _021F66D8 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r1, _021F6700 ; =0x0000EEEE - ldr r0, [r6, r0] - strh r1, [r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_021F66F8: .word 0x000006F4 -_021F66FC: .word 0x00000604 -_021F6700: .word 0x0000EEEE - thumb_func_end ov5_021F6624 - - thumb_func_start ov5_021F6704 -ov5_021F6704: ; 0x021F6704 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r1, #0 - add r6, r0, #0 - ldr r1, _021F675C ; =0x000006F8 - mov r0, #4 - str r2, [sp, #0x20] - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021F6722 - add sp, #0x24 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021F6722: - ldr r2, _021F675C ; =0x000006F8 - mov r1, #0 - bl sub_020D5124 - str r5, [sp] - add r0, sp, #0x28 - ldrb r0, [r0, #0x10] - add r1, r4, #0 - add r2, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x3c] - str r0, [sp, #8] - ldr r0, [sp, #0x40] - str r0, [sp, #0xc] - ldr r0, [sp, #0x44] - str r0, [sp, #0x10] - ldr r0, [sp, #0x48] - str r0, [sp, #0x14] - ldr r0, [sp, #0x4c] - str r0, [sp, #0x18] - ldr r0, [sp, #0x50] - str r0, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r0, r6, #0 - bl ov5_021F6624 - add r0, r4, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F675C: .word 0x000006F8 - thumb_func_end ov5_021F6704 - - thumb_func_start ov5_021F6760 -ov5_021F6760: ; 0x021F6760 - push {r3, lr} - bl ov5_021F6830 - pop {r3, pc} - thumb_func_end ov5_021F6760 - - thumb_func_start ov5_021F6768 -ov5_021F6768: ; 0x021F6768 - push {r3, r4, lr} - sub sp, #0x14 - ldr r3, _021F6824 ; =0x0000020B - add r4, r0, #0 - ldrb r1, [r4, r3] - cmp r1, #8 - bls _021F67A0 - sub r0, r3, #2 - ldrb r0, [r4, r0] - add r1, r4, #0 - sub r3, r3, #3 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - ldrb r3, [r4, r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - b _021F67CA -_021F67A0: - sub r0, r3, #2 - ldrb r0, [r4, r0] - sub r3, r3, #3 - mov r2, #3 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - lsl r0, r1, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r4, #0 - ldrb r3, [r4, r3] - ldr r0, [r0, #8] - add r1, #8 - bl sub_0201A7E8 -_021F67CA: - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r2, _021F6828 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r4, #0 - ldr r2, _021F6828 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - bl ov5_021F68BC - mov r2, #0x87 - lsl r2, r2, #2 - add r1, r2, #0 - add r0, r4, r2 - sub r1, #8 - sub r2, r2, #4 - ldr r1, [r4, r1] - ldr r2, [r4, r2] - ldrh r1, [r1] - ldrh r2, [r2] - mov r3, #4 - bl sub_0200112C - mov r1, #0x8f - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, _021F682C ; =ov5_021F6A34 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_021F6824: .word 0x0000020B -_021F6828: .word 0x000003D9 -_021F682C: .word ov5_021F6A34 - thumb_func_end ov5_021F6768 - - thumb_func_start ov5_021F6830 -ov5_021F6830: ; 0x021F6830 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r0, #0x50 - mov r1, #4 - add r7, r2, #0 - add r4, r3, #0 - bl sub_02023790 - add r6, r0, #0 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp] - add r2, r6, #0 - bl sub_0200B1B8 - mov r1, #2 - lsl r1, r1, #8 - ldr r0, [r5, r1] - add r1, #0xb - ldrb r1, [r5, r1] - add r2, r6, #0 - lsl r1, r1, #2 - add r1, r5, r1 - ldr r1, [r1, #0x1c] - bl sub_0200C388 - ldr r2, _021F68B4 ; =0x0000020B - ldrb r1, [r5, r2] - add r2, #0x39 - lsl r0, r1, #2 - add r0, r5, r0 - lsl r1, r1, #3 - ldr r0, [r0, #0x1c] - add r1, r5, r1 - str r0, [r1, r2] - add r0, r6, #0 - bl sub_020237BC - cmp r4, #0xfa - ldr r0, _021F68B4 ; =0x0000020B - bne _021F6896 - ldrb r1, [r5, r0] - mov r2, #2 - mvn r2, r2 - lsl r1, r1, #3 - add r1, r5, r1 - add r0, #0x3d - str r2, [r1, r0] - b _021F68A0 -_021F6896: - ldrb r1, [r5, r0] - add r0, #0x3d - lsl r1, r1, #3 - add r1, r5, r1 - str r4, [r1, r0] -_021F68A0: - ldr r1, _021F68B4 ; =0x0000020B - ldrb r0, [r5, r1] - lsl r0, r0, #1 - add r2, r5, r0 - ldr r0, _021F68B8 ; =0x00000604 - strh r7, [r2, r0] - ldrb r0, [r5, r1] - add r0, r0, #1 - strb r0, [r5, r1] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F68B4: .word 0x0000020B -_021F68B8: .word 0x00000604 - thumb_func_end ov5_021F6830 - - thumb_func_start ov5_021F68BC -ov5_021F68BC: ; 0x021F68BC - push {r4, r5} - mov r3, #0x91 - lsl r3, r3, #2 - add r1, r3, #0 - add r2, r0, r3 - sub r1, #0x28 - str r2, [r0, r1] - add r1, r3, #0 - ldr r2, _021F69B8 ; =ov5_021F69F0 - sub r1, #0x24 - str r2, [r0, r1] - add r1, r3, #0 - ldr r2, _021F69BC ; =ov5_021F69CC - sub r1, #0x20 - str r2, [r0, r1] - add r2, r0, #0 - add r1, r3, #0 - add r2, #8 - sub r1, #0x1c - str r2, [r0, r1] - add r1, r3, #0 - sub r1, #0x39 - ldrb r2, [r0, r1] - add r1, r3, #0 - sub r1, #0x18 - strh r2, [r0, r1] - add r1, r3, #0 - mov r2, #8 - sub r1, #0x16 - strh r2, [r0, r1] - add r1, r3, #0 - mov r2, #1 - sub r1, #0x14 - strb r2, [r0, r1] - add r1, r3, #0 - mov r4, #0xc - sub r1, #0x13 - strb r4, [r0, r1] - add r1, r3, #0 - mov r4, #2 - sub r1, #0x12 - strb r4, [r0, r1] - add r1, r3, #0 - sub r1, #0x11 - ldrb r4, [r0, r1] - mov r1, #0xf - bic r4, r1 - orr r4, r2 - add r2, r3, #0 - sub r2, #0x11 - strb r4, [r0, r2] - add r2, r3, #0 - sub r2, #0x11 - ldrb r5, [r0, r2] - mov r2, #0xf0 - mov r4, #0x10 - bic r5, r2 - orr r5, r4 - add r4, r3, #0 - sub r4, #0x11 - strb r5, [r0, r4] - add r4, r3, #0 - sub r4, #0x10 - ldrb r4, [r0, r4] - bic r4, r1 - mov r1, #0xf - orr r4, r1 - add r1, r3, #0 - sub r1, #0x10 - strb r4, [r0, r1] - add r1, r3, #0 - sub r1, #0x10 - ldrb r4, [r0, r1] - mov r1, #0x20 - bic r4, r2 - add r2, r4, #0 - orr r2, r1 - add r1, r3, #0 - sub r1, #0x10 - strb r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - mov r1, #7 - bic r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - mov r1, #0x78 - bic r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - ldr r1, _021F69C0 ; =0xFFFFFE7F - and r2, r1 - mov r1, #0x80 - orr r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - ldr r1, _021F69C4 ; =0xFFFF81FF - and r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - add r1, r3, #0 - sub r1, #0xe - ldrh r2, [r0, r1] - ldr r1, _021F69C8 ; =0xFFFF7FFF - and r2, r1 - add r1, r3, #0 - sub r1, #0xe - strh r2, [r0, r1] - sub r3, #0xc - str r0, [r0, r3] - pop {r4, r5} - bx lr - ; .align 2, 0 -_021F69B8: .word ov5_021F69F0 -_021F69BC: .word ov5_021F69CC -_021F69C0: .word 0xFFFFFE7F -_021F69C4: .word 0xFFFF81FF -_021F69C8: .word 0xFFFF7FFF - thumb_func_end ov5_021F68BC - - thumb_func_start ov5_021F69CC -ov5_021F69CC: ; 0x021F69CC - push {r3, lr} - mov r2, #2 - mvn r2, r2 - cmp r1, r2 - bne _021F69E2 - mov r1, #3 - mov r2, #0xf - mov r3, #4 - bl sub_0200147C - pop {r3, pc} -_021F69E2: - mov r1, #1 - mov r2, #0xf - mov r3, #2 - bl sub_0200147C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F69CC - - thumb_func_start ov5_021F69F0 -ov5_021F69F0: ; 0x021F69F0 - push {r3, r4, r5, lr} - mov r2, #0 - add r1, sp, #0 - strh r2, [r1, #2] - strh r2, [r1] - mov r1, #0x13 - add r5, r0, #0 - bl sub_02001504 - add r1, sp, #0 - add r4, r0, #0 - add r0, r5, #0 - add r1, #2 - add r2, sp, #0 - bl sub_020014DC - mov r1, #0x85 - lsl r1, r1, #2 - ldr r3, [r4, r1] - cmp r3, #0 - beq _021F6A30 - add r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021F6A30 - add r0, sp, #0 - ldrh r2, [r0, #2] - strh r2, [r3] - ldrh r2, [r0] - add r0, r1, #4 - ldr r0, [r4, r0] - strh r2, [r0] -_021F6A30: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F69F0 - - thumb_func_start ov5_021F6A34 -ov5_021F6A34: ; 0x021F6A34 - push {r4, r5, r6, lr} - mov r0, #0x81 - add r5, r1, #0 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - cmp r1, #0 - beq _021F6A48 - sub r1, r1, #1 - strb r1, [r5, r0] - pop {r4, r5, r6, pc} -_021F6A48: - bl sub_0200F2AC - cmp r0, #0 - beq _021F6AC2 - mov r0, #0x8f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02001288 - add r4, r0, #0 - mov r0, #0x8f - ldr r1, _021F6AC4 ; =0x000006F4 - lsl r0, r0, #2 - ldrh r6, [r5, r1] - ldr r0, [r5, r0] - add r1, r5, r1 - bl sub_020014D0 - ldr r0, _021F6AC4 ; =0x000006F4 - ldrh r0, [r5, r0] - cmp r6, r0 - beq _021F6A7A - ldr r0, _021F6AC8 ; =0x000005DC - bl sub_02005748 -_021F6A7A: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _021F6A8A - add r0, r0, #1 - cmp r4, r0 - beq _021F6AC2 - b _021F6AAE -_021F6A8A: - ldr r0, _021F6ACC ; =0x00000207 - ldrb r0, [r5, r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021F6AC2 - ldr r0, _021F6AC8 ; =0x000005DC - bl sub_02005748 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r1, _021F6AD0 ; =0x0000FFFE - ldr r0, [r5, r0] - strh r1, [r0] - add r0, r5, #0 - bl ov5_021F6AD4 - pop {r4, r5, r6, pc} -_021F6AAE: - ldr r0, _021F6AC8 ; =0x000005DC - bl sub_02005748 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r5, r0] - strh r4, [r0] - add r0, r5, #0 - bl ov5_021F6AD4 -_021F6AC2: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F6AC4: .word 0x000006F4 -_021F6AC8: .word 0x000005DC -_021F6ACC: .word 0x00000207 -_021F6AD0: .word 0x0000FFFE - thumb_func_end ov5_021F6A34 - - thumb_func_start ov5_021F6AD4 -ov5_021F6AD4: ; 0x021F6AD4 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _021F6B34 ; =0x000005DC - bl sub_02005748 - mov r0, #0x8f - lsl r0, r0, #2 - mov r1, #0 - ldr r0, [r6, r0] - add r2, r1, #0 - bl sub_02001384 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - add r0, #8 - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_021F6B04: - ldr r0, [r5, #0x1c] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x78 - blt _021F6B04 - ldr r0, _021F6B38 ; =0x00000207 - ldrb r1, [r6, r0] - lsl r1, r1, #0x1e - lsr r1, r1, #0x1f - cmp r1, #1 - bne _021F6B26 - sub r0, #0xb - ldr r0, [r6, r0] - bl sub_0200B190 -_021F6B26: - ldr r0, [r6, #4] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F6B34: .word 0x000005DC -_021F6B38: .word 0x00000207 - thumb_func_end ov5_021F6AD4 - - thumb_func_start ov5_021F6B3C -ov5_021F6B3C: ; 0x021F6B3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - add r1, r5, #0 - add r1, #0x80 - ldr r1, [r1, #0] - str r1, [sp] - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - str r0, [sp, #4] - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r5, #0x80 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_0203F118 - add r7, r0, #0 - ldr r0, [sp] - ldr r0, [r0, #0xc] - bl sub_0207A268 - ldr r1, [sp, #4] - bl sub_0207A0FC - add r5, r0, #0 - mov r1, #0x46 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0x47 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #0x48 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r1, #0x49 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x14] - add r0, r5, #0 - mov r1, #0x4a - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x18] - add r0, r5, #0 - mov r1, #0x4b - mov r2, #0 - bl sub_02074470 - mov r2, #0 - str r0, [sp, #0x1c] - strh r2, [r4] - add r0, sp, #8 -_021F6BF2: - lsl r3, r2, #2 - ldrh r1, [r4] - ldr r3, [r0, r3] - add r1, r1, r3 - strh r1, [r4] - add r1, r2, #1 - lsl r1, r1, #0x18 - lsr r2, r1, #0x18 - cmp r2, #6 - blo _021F6BF2 - mov r0, #0 - strh r0, [r6] - ldr r0, [sp, #8] - mov r5, #1 - strh r0, [r7] -_021F6C10: - lsl r1, r5, #2 - add r0, sp, #8 - ldr r4, [r0, r1] - ldrh r0, [r6] - lsl r1, r0, #2 - add r0, sp, #8 - ldr r0, [r0, r1] - cmp r0, r4 - bhs _021F6C28 - strh r5, [r6] - strh r4, [r7] - b _021F6C42 -_021F6C28: - cmp r0, r4 - bne _021F6C42 - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r2, r0, #0x1f - sub r2, r2, r1 - mov r0, #0x1f - ror r2, r0 - add r0, r1, r2 - bne _021F6C42 - strh r5, [r6] - strh r4, [r7] -_021F6C42: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #6 - blo _021F6C10 - ldrh r0, [r6] - lsl r1, r0, #1 - ldr r0, _021F6C5C ; =0x02200C84 - ldrh r0, [r0, r1] - strh r0, [r6] - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F6C5C: .word 0x02200C84 - thumb_func_end ov5_021F6B3C - - thumb_func_start ov5_021F6C60 -ov5_021F6C60: ; 0x021F6C60 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - mov r1, #0 - add r4, r0, #0 - str r1, [sp, #8] - add r1, r4, #0 - add r1, #0x80 - ldr r1, [r1, #0] - str r1, [sp, #4] - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F118 - str r0, [sp] - ldr r0, [sp, #4] - ldr r0, [r0, #0xc] - bl sub_0207A268 - add r7, r0, #0 - bl sub_0207A0F8 - add r6, r0, #0 - mov r4, #0 - ldr r0, [sp] - cmp r6, #0 - strh r4, [r0] - ble _021F6CC2 - add r5, sp, #0x10 -_021F6C9E: - add r0, r7, #0 - add r1, r4, #0 - bl sub_0207A0FC - mov r1, #6 - mov r2, #0 - bl sub_02074470 - str r0, [r5, #0] - cmp r0, #0x70 - bne _021F6CBA - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] -_021F6CBA: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r6 - blt _021F6C9E -_021F6CC2: - ldr r0, [sp, #8] - cmp r0, #0 - ble _021F6D16 - ldr r0, [sp, #4] - ldr r0, [r0, #0xc] - bl sub_0207D990 - ldr r2, [sp, #8] - mov r1, #0x70 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - mov r3, #4 - bl sub_0207D570 - cmp r0, #0 - bne _021F6CEE - ldr r0, [sp] - mov r1, #0xff - strh r1, [r0] - add sp, #0x28 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021F6CEE: - mov r5, #0 - str r5, [sp, #0xc] - cmp r6, #0 - ble _021F6D16 - add r4, sp, #0x10 -_021F6CF8: - ldr r0, [r4, #0] - cmp r0, #0x70 - bne _021F6D0E - add r0, r7, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #6 - add r2, sp, #0xc - bl sub_02074B30 -_021F6D0E: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, r6 - blt _021F6CF8 -_021F6D16: - mov r5, #0 - cmp r6, #0 - ble _021F6D74 -_021F6D1C: - add r0, r7, #0 - add r1, r5, #0 - bl sub_0207A0FC - mov r1, #0x70 - mov r2, #0 - add r4, r0, #0 - bl sub_02074470 - cmp r0, #0 - ble _021F6D6E - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - ldr r1, _021F6D7C ; =0x000001DF - cmp r0, r1 - beq _021F6D5A - add r1, #8 - cmp r0, r1 - beq _021F6D52 - mov r1, #0x7b - lsl r1, r1, #2 - cmp r0, r1 - beq _021F6D66 - b _021F6D6E -_021F6D52: - add r0, r4, #0 - bl sub_02077A00 - b _021F6D6E -_021F6D5A: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_02077C20 - b _021F6D6E -_021F6D66: - add r0, r4, #0 - mov r1, #0 - bl sub_02077ACC -_021F6D6E: - add r5, r5, #1 - cmp r5, r6 - blt _021F6D1C -_021F6D74: - mov r0, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F6D7C: .word 0x000001DF - thumb_func_end ov5_021F6C60 - - thumb_func_start ov5_021F6D80 -ov5_021F6D80: ; 0x021F6D80 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x80 - ldr r5, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F118 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0207A268 - add r1, r7, #0 - bl sub_0207A0FC - mov r2, #0 - add r4, r0, #0 - strh r2, [r6] - cmp r7, #0xff - bne _021F6DC8 - add r0, r2, #0 - pop {r3, r4, r5, r6, r7, pc} -_021F6DC8: - mov r1, #6 - bl sub_02074470 - cmp r0, #0x70 - bne _021F6DFC - ldr r0, [r5, #0xc] - bl sub_0207D990 - mov r1, #0x70 - mov r2, #1 - mov r3, #4 - bl sub_0207D570 - cmp r0, #0 - bne _021F6DEE - mov r0, #0xff - strh r0, [r6] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021F6DEE: - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #6 - add r2, sp, #0 - bl sub_02074B30 -_021F6DFC: - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - ble _021F6E46 - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - ldr r2, _021F6E4C ; =0x000001DF - cmp r0, r2 - beq _021F6E32 - add r1, r2, #0 - add r1, #8 - cmp r0, r1 - beq _021F6E2A - add r2, #0xd - cmp r0, r2 - beq _021F6E3E - b _021F6E46 -_021F6E2A: - add r0, r4, #0 - bl sub_02077A00 - b _021F6E46 -_021F6E32: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_02077C20 - b _021F6E46 -_021F6E3E: - add r0, r4, #0 - mov r1, #0 - bl sub_02077ACC -_021F6E46: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F6E4C: .word 0x000001DF - thumb_func_end ov5_021F6D80 - - thumb_func_start ov5_021F6E50 -ov5_021F6E50: ; 0x021F6E50 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r1, r5, #0 - add r1, #0x80 - ldr r4, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r5, #0x80 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_0203F150 - add r1, sp, #0 - strh r0, [r1] - ldr r0, [r4, #0xc] - bl sub_0207A268 - add r1, r6, #0 - bl sub_0207A0FC - mov r1, #0x70 - add r2, sp, #0 - bl sub_02074B30 - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov5_021F6E50 - - thumb_func_start ov5_021F6E9C -ov5_021F6E9C: ; 0x021F6E9C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r1, r5, #0 - add r1, #0x80 - ldr r4, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - str r0, [sp] - add r0, r5, #0 - bl sub_0203E838 - add r5, #0x80 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_0203F118 - add r6, r0, #0 - mov r0, #0xff - strh r0, [r6] - ldr r0, [r4, #0xc] - mov r7, #0 - bl sub_0207A268 - str r0, [sp, #4] - bl sub_0207A0F8 - add r5, r7, #0 - str r0, [sp, #8] - cmp r0, #0 - ble _021F6F34 -_021F6EE6: - ldr r0, [sp, #4] - add r1, r5, #0 - bl sub_0207A0FC - add r4, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - ldr r2, [sp, #0xc] - ldr r1, _021F6F40 ; =0x000001DF - cmp r2, r1 - bne _021F6F2C - ldr r1, [sp, #0x10] - cmp r1, #0 - beq _021F6F2C - cmp r0, #0 - bne _021F6F2C - ldrh r0, [r6] - cmp r0, #0xff - bne _021F6F2A - strh r5, [r6] -_021F6F2A: - add r7, r7, #1 -_021F6F2C: - ldr r0, [sp, #8] - add r5, r5, #1 - cmp r5, r0 - blt _021F6EE6 -_021F6F34: - ldr r0, [sp] - strh r7, [r0] - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021F6F40: .word 0x000001DF - thumb_func_end ov5_021F6E9C - - thumb_func_start ov5_021F6F44 -ov5_021F6F44: ; 0x021F6F44 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r1, r5, #0 - add r1, #0x80 - ldr r4, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - str r0, [sp] - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r0, r5, #0 - bl sub_0203E838 - add r5, #0x80 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_0203F150 - add r7, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0207A268 - add r1, r6, #0 - bl sub_0207A0FC - ldr r2, [sp] - add r1, r7, #0 - add r5, r0, #0 - bl sub_02077C20 - ldr r0, [r4, #0xc] - bl sub_02027560 - add r1, r5, #0 - bl sub_0202736C - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F6F44 - - thumb_func_start ov5_021F6FC0 -ov5_021F6FC0: ; 0x021F6FC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x80 - ldr r6, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F118 - add r5, r0, #0 - ldr r0, [r6, #0xc] - bl sub_0207A268 - add r1, r7, #0 - bl sub_0207A0FC - mov r1, #5 - mov r2, #0 - add r6, r0, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r6, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _021F70AE - ldr r0, _021F70C4 ; =0x0000010A - cmp r4, r0 - bgt _021F7060 - bge _021F70A4 - cmp r4, #0x84 - bgt _021F704C - bge _021F70A4 - cmp r4, #0xe - bgt _021F7046 - add r0, r4, #0 - sub r0, #0xa - bmi _021F70AE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021F703C: ; jump table - .short _021F70A4 - _021F703C - 2 ; case 0 - .short _021F70A4 - _021F703C - 2 ; case 1 - .short _021F70AE - _021F703C - 2 ; case 2 - .short _021F70A4 - _021F703C - 2 ; case 3 - .short _021F70A4 - _021F703C - 2 ; case 4 -_021F7046: - cmp r4, #0x81 - beq _021F70A4 - b _021F70AE -_021F704C: - cmp r4, #0xeb - bgt _021F7058 - bge _021F70A4 - cmp r4, #0xca - beq _021F70A4 - b _021F70AE -_021F7058: - sub r0, r0, #1 - cmp r4, r0 - beq _021F70A4 - b _021F70AE -_021F7060: - add r1, r0, #0 - add r1, #0x6c - cmp r4, r1 - bgt _021F7086 - add r1, r0, #0 - add r1, #0x6c - cmp r4, r1 - bge _021F70A4 - add r1, r0, #2 - cmp r4, r1 - bgt _021F707E - add r0, r0, #2 - cmp r4, r0 - beq _021F70A4 - b _021F70AE -_021F707E: - add r0, #0x5e - cmp r4, r0 - beq _021F70A4 - b _021F70AE -_021F7086: - add r1, r0, #0 - add r1, #0x92 - cmp r4, r1 - bgt _021F709E - add r1, r0, #0 - add r1, #0x92 - cmp r4, r1 - bge _021F70A4 - add r0, #0x87 - cmp r4, r0 - beq _021F70A4 - b _021F70AE -_021F709E: - add r0, #0x95 - cmp r4, r0 - bne _021F70AE -_021F70A4: - ldr r0, _021F70C8 ; =0x0000FFFF - add sp, #8 - strh r0, [r5] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_021F70AE: - add r0, r6, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov5_021F70CC - ldr r0, [sp] - strh r0, [r5] - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F70C4: .word 0x0000010A -_021F70C8: .word 0x0000FFFF - thumb_func_end ov5_021F6FC0 - - thumb_func_start ov5_021F70CC -ov5_021F70CC: ; 0x021F70CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - add r4, r2, #0 - add r6, r0, #0 - mov r1, #0x46 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x10] - add r0, r6, #0 - mov r1, #0x47 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x48 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #8] - add r0, r6, #0 - mov r1, #0x49 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #0x4a - mov r2, #0 - bl sub_02074470 - str r0, [sp] - add r0, r6, #0 - mov r1, #0x4b - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - cmp r5, #0 - beq _021F7168 - mov r1, #2 - and r0, r1 - lsl r0, r0, #4 - mov ip, r0 - ldr r0, [sp] - and r0, r1 - lsl r3, r0, #3 - ldr r0, [sp, #4] - and r0, r1 - lsl r0, r0, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - and r0, r1 - lsl r2, r0, #1 - ldr r0, [sp, #0x10] - and r0, r1 - asr r6, r0, #1 - ldr r0, [sp, #0xc] - and r0, r1 - orr r0, r6 - add r1, r2, #0 - orr r1, r0 - ldr r0, [sp, #0x14] - orr r0, r1 - add r1, r3, #0 - orr r1, r0 - mov r0, ip - orr r1, r0 - mov r0, #0x28 - str r1, [r5, #0] - mul r0, r1 - mov r1, #0x3f - bl sub_020E1F6C - add r0, #0x1e - str r0, [r5, #0] -_021F7168: - cmp r4, #0 - beq _021F71B2 - lsl r0, r7, #0x1f - lsr r5, r0, #0x1a - ldr r0, [sp] - mov r6, #1 - lsl r0, r0, #0x1f - lsr r3, r0, #0x1b - ldr r0, [sp, #4] - lsl r0, r0, #0x1f - lsr r2, r0, #0x1c - ldr r0, [sp, #8] - lsl r0, r0, #0x1f - lsr r1, r0, #0x1d - ldr r0, [sp, #0x10] - and r0, r6 - ldr r6, [sp, #0xc] - lsl r6, r6, #0x1f - lsr r6, r6, #0x1e - orr r0, r6 - orr r0, r1 - orr r0, r2 - orr r0, r3 - add r1, r5, #0 - orr r1, r0 - mov r0, #0xf - str r1, [r4, #0] - mul r0, r1 - mov r1, #0x3f - bl sub_020E1F6C - add r0, r0, #1 - str r0, [r4, #0] - cmp r0, #9 - blt _021F71B2 - add r0, r0, #1 - str r0, [r4, #0] -_021F71B2: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F70CC - - thumb_func_start ov5_021F71B8 -ov5_021F71B8: ; 0x021F71B8 - push {r3, r4, r5, r6, r7, lr} - add r0, #0x80 - ldr r4, [r0, #0] - ldr r0, [r4, #0xc] - bl sub_0207A268 - mov r1, #0 - bl sub_0207A0FC - add r5, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0202783C - add r4, r0, #0 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - add r3, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl sub_020278DC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F71B8 - - thumb_func_start ov5_021F7208 -ov5_021F7208: ; 0x021F7208 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x80 - ldr r5, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F118 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0202783C - add r1, sp, #8 - add r2, sp, #4 - add r3, sp, #0 - bl sub_02027914 - ldr r0, [sp, #8] - strh r0, [r6] - ldr r0, [sp, #4] - strh r0, [r7] - ldr r0, [sp] - strh r0, [r4] - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7208 - - thumb_func_start ov5_021F7270 -ov5_021F7270: ; 0x021F7270 - push {r4, r5, r6, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x80 - ldr r5, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r4, #0 - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F118 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0207A268 - add r1, r6, #0 - bl sub_0207A0FC - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - strh r0, [r4] - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F7270 - - thumb_func_start ov5_021F72B8 -ov5_021F72B8: ; 0x021F72B8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r1, r4, #0 - add r1, #0x80 - ldr r5, [r1, #0] - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F118 - add r4, r0, #0 - ldr r0, [r5, #0xc] - bl sub_020507E4 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0202CD88 - mov r1, #1 - sub r7, #0xd - add r5, r0, #0 - strh r1, [r4] - cmp r7, #7 - bls _021F7302 - b _021F740A -_021F7302: - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021F730E: ; jump table - .short _021F731E - _021F730E - 2 ; case 0 - .short _021F736E - _021F730E - 2 ; case 1 - .short _021F73BA - _021F730E - 2 ; case 2 - .short _021F73CA - _021F730E - 2 ; case 3 - .short _021F73DA - _021F730E - 2 ; case 4 - .short _021F73EA - _021F730E - 2 ; case 5 - .short _021F740A - _021F730E - 2 ; case 6 - .short _021F73FA - _021F730E - 2 ; case 7 -_021F731E: - mov r1, #0x1d - bl sub_0202CFB8 - cmp r0, #1 - bhs _021F732C - mov r0, #0 - strh r0, [r4] -_021F732C: - add r0, r5, #0 - mov r1, #0x3c - bl sub_0202CFB8 - cmp r0, #1 - bhs _021F733C - mov r0, #0 - strh r0, [r4] -_021F733C: - add r0, r5, #0 - mov r1, #0x3d - bl sub_0202CFB8 - cmp r0, #1 - bhs _021F734C - mov r0, #0 - strh r0, [r4] -_021F734C: - add r0, r5, #0 - mov r1, #0x3e - bl sub_0202CFB8 - cmp r0, #1 - bhs _021F735C - mov r0, #0 - strh r0, [r4] -_021F735C: - add r0, r5, #0 - mov r1, #0x3f - bl sub_0202CFB8 - cmp r0, #1 - bhs _021F740A - mov r0, #0 - strh r0, [r4] - b _021F740A -_021F736E: - mov r0, #0 - strh r0, [r4] - add r0, r6, #0 - bl sub_0206B588 - cmp r0, #2 - blo _021F7380 - mov r0, #1 - strh r0, [r4] -_021F7380: - add r0, r6, #0 - bl sub_0206B598 - cmp r0, #2 - blo _021F738E - mov r0, #1 - strh r0, [r4] -_021F738E: - add r0, r6, #0 - bl sub_0206B5A8 - cmp r0, #2 - blo _021F739C - mov r0, #1 - strh r0, [r4] -_021F739C: - add r0, r6, #0 - bl sub_0206B5B8 - cmp r0, #2 - blo _021F73AA - mov r0, #1 - strh r0, [r4] -_021F73AA: - add r0, r6, #0 - bl sub_0206B5C8 - cmp r0, #2 - blo _021F740A - mov r0, #1 - strh r0, [r4] - b _021F740A -_021F73BA: - mov r1, #0x49 - bl sub_0202CFB8 - cmp r0, #0xa - bhs _021F740A - mov r0, #0 - strh r0, [r4] - b _021F740A -_021F73CA: - mov r1, #0x39 - bl sub_0202CFB8 - cmp r0, #0x32 - bhs _021F740A - mov r0, #0 - strh r0, [r4] - b _021F740A -_021F73DA: - mov r1, #4 - bl sub_0202CFB8 - cmp r0, #0x32 - bhs _021F740A - mov r0, #0 - strh r0, [r4] - b _021F740A -_021F73EA: - mov r1, #0xb - bl sub_0202CFB8 - cmp r0, #0x1e - bhs _021F740A - mov r0, #0 - strh r0, [r4] - b _021F740A -_021F73FA: - mov r1, #0 - bl sub_0202CFB8 - ldr r1, _021F7410 ; =0x000493E0 - cmp r0, r1 - bhs _021F740A - mov r0, #0 - strh r0, [r4] -_021F740A: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F7410: .word 0x000493E0 - thumb_func_end ov5_021F72B8 - - thumb_func_start ov5_021F7414 -ov5_021F7414: ; 0x021F7414 - mov r0, #1 - bx lr - thumb_func_end ov5_021F7414 - - thumb_func_start ov5_021F7418 -ov5_021F7418: ; 0x021F7418 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r5, #0x80 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_0203F150 - mov r2, #0x93 - lsl r2, r2, #2 - cmp r6, r2 - beq _021F747C - add r1, r2, #2 - cmp r6, r1 - beq _021F74B0 - add r1, r2, #4 - cmp r6, r1 - beq _021F74E4 - b _021F7516 -_021F747C: - mov r1, #0x7f - str r1, [sp] - mov r5, #0 - ldr r1, _021F7528 ; =0x02200C90 - mov r2, #2 - add r3, r5, #0 -_021F7488: - ldrsh r6, [r1, r3] - cmp r4, r6 - bne _021F74A6 - ldrsh r6, [r1, r2] - cmp r0, r6 - bne _021F74A6 - ldr r0, _021F752C ; =0x000005CF - bl sub_02005748 - mov r0, #1 - ldrh r1, [r7] - lsl r0, r5 - orr r0, r1 - strh r0, [r7] - b _021F7516 -_021F74A6: - add r5, r5, #1 - add r1, r1, #4 - cmp r5, #7 - blo _021F7488 - b _021F7516 -_021F74B0: - mov r1, #0x7f - str r1, [sp] - mov r5, #0 - ldr r1, _021F7530 ; =0x02200CAC - mov r2, #2 - add r3, r5, #0 -_021F74BC: - ldrsh r6, [r1, r3] - cmp r4, r6 - bne _021F74DA - ldrsh r6, [r1, r2] - cmp r0, r6 - bne _021F74DA - ldr r0, _021F752C ; =0x000005CF - bl sub_02005748 - mov r0, #1 - ldrh r1, [r7] - lsl r0, r5 - orr r0, r1 - strh r0, [r7] - b _021F7516 -_021F74DA: - add r5, r5, #1 - add r1, r1, #4 - cmp r5, #7 - blo _021F74BC - b _021F7516 -_021F74E4: - mov r1, #0x7f - str r1, [sp] - mov r5, #0 - ldr r1, _021F7534 ; =0x02200CC8 - mov r2, #2 - add r3, r5, #0 -_021F74F0: - ldrsh r6, [r1, r3] - cmp r4, r6 - bne _021F750E - ldrsh r6, [r1, r2] - cmp r0, r6 - bne _021F750E - ldr r0, _021F752C ; =0x000005CF - bl sub_02005748 - mov r0, #1 - ldrh r1, [r7] - lsl r0, r5 - orr r0, r1 - strh r0, [r7] - b _021F7516 -_021F750E: - add r5, r5, #1 - add r1, r1, #4 - cmp r5, #7 - blo _021F74F0 -_021F7516: - ldrh r1, [r7] - ldr r0, [sp] - cmp r1, r0 - bne _021F7524 - mov r0, #0x41 - lsl r0, r0, #2 - strh r0, [r7] -_021F7524: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F7528: .word 0x02200C90 -_021F752C: .word 0x000005CF -_021F7530: .word 0x02200CAC -_021F7534: .word 0x02200CC8 - thumb_func_end ov5_021F7418 - - thumb_func_start ov5_021F7538 -ov5_021F7538: ; 0x021F7538 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r1, #0 - str r1, [sp, #8] - add r0, #0x80 - ldr r0, [r0, #0] - ldr r6, [r0, #0x38] - ldr r0, [r0, #0x3c] - bl sub_0205EB3C - add r1, sp, #0xc - str r0, [sp] - bl sub_02063050 - add r0, r6, #0 - add r1, sp, #4 - add r2, sp, #8 - mov r3, #1 - ldr r4, [sp, #0x10] - bl sub_020625B0 - cmp r0, #1 - bne _021F75FC - asr r1, r4, #3 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r7, r0, #0xc -_021F7570: - ldr r0, [sp, #4] - ldr r1, [sp] - cmp r0, r1 - beq _021F75EC - mov r1, #2 - lsl r1, r1, #0xc - bl sub_020628BC - mov r1, #1 - ldr r0, [sp, #4] - lsl r1, r1, #0xc - bl sub_020628D8 - cmp r0, #1 - bne _021F75A8 - ldr r0, [sp, #4] - add r1, sp, #0xc - bl sub_02063050 - ldr r0, [sp, #4] - add r1, sp, #0xc - str r4, [sp, #0x10] - bl sub_02063060 - ldr r0, [sp, #4] - add r1, r7, #0 - bl sub_02063034 -_021F75A8: - ldr r0, [sp, #4] - bl ov5_021EB1A0 - add r5, r0, #0 - bne _021F75D8 - ldr r0, [sp, #4] - bl sub_02062920 - bl sub_020677F4 - cmp r0, #0 - beq _021F75D8 - ldr r0, [sp, #4] - bl sub_02062D4C - cmp r0, #0 - beq _021F75D8 - ldr r0, [sp, #4] - bl sub_02062B68 - ldr r0, [sp, #4] - bl sub_02067A58 - add r5, r0, #0 -_021F75D8: - cmp r5, #0 - beq _021F75EC - ldr r0, [sp, #4] - add r1, r5, #0 - bl ov5_021EDEB4 - add r0, r5, #0 - mov r1, #1 - bl sub_02021320 -_021F75EC: - add r0, r6, #0 - add r1, sp, #4 - add r2, sp, #8 - mov r3, #1 - bl sub_020625B0 - cmp r0, #1 - beq _021F7570 -_021F75FC: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7538 - - thumb_func_start ov5_021F7604 -ov5_021F7604: ; 0x021F7604 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0 - str r1, [sp, #4] - add r0, #0x80 - ldr r0, [r0, #0] - ldr r4, [r0, #0x38] - ldr r0, [r0, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - add r0, r4, #0 - add r1, sp, #0 - add r2, sp, #4 - mov r3, #1 - bl sub_020625B0 - cmp r0, #1 - bne _021F764C - mov r6, #2 - lsl r6, r6, #0xc - add r7, sp, #0 -_021F7630: - ldr r0, [sp] - cmp r0, r5 - beq _021F763C - add r1, r6, #0 - bl sub_020628C4 -_021F763C: - add r0, r4, #0 - add r1, r7, #0 - add r2, sp, #4 - mov r3, #1 - bl sub_020625B0 - cmp r0, #1 - beq _021F7630 -_021F764C: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7604 - - thumb_func_start ov5_021F7654 -ov5_021F7654: ; 0x021F7654 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - mov r1, #2 - add r5, r0, #0 - lsl r1, r1, #0xc - bl sub_020628BC - add r0, r5, #0 - add r1, sp, #0 - bl sub_02063050 - lsl r0, r4, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r1, sp, #0 - bl sub_02063060 - add r0, r5, #0 - lsl r1, r4, #1 - bl sub_02063034 - add r0, r5, #0 - bl ov5_021EB1A0 - add r4, r0, #0 - beq _021F769A - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021EDEB4 - add r0, r4, #0 - mov r1, #1 - bl sub_02021320 -_021F769A: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7654 - - thumb_func_start ov5_021F76A0 -ov5_021F76A0: ; 0x021F76A0 - push {r4, lr} - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0x20 - ldr r4, [r0, #0x38] - add r0, r4, #0 - bl sub_0206251C - cmp r0, #0 - beq _021F76BA - mov r1, #9 - bl ov5_021F7654 -_021F76BA: - add r0, r4, #0 - mov r1, #2 - bl sub_0206251C - cmp r0, #0 - beq _021F76CC - mov r1, #9 - bl ov5_021F7654 -_021F76CC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021F76A0 - - thumb_func_start ov5_021F76D0 -ov5_021F76D0: ; 0x021F76D0 - push {r4, lr} - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0x20 - ldr r4, [r0, #0x38] - add r0, r4, #0 - bl sub_0206251C - cmp r0, #0 - beq _021F76EC - mov r1, #2 - lsl r1, r1, #0xc - bl sub_020628C4 -_021F76EC: - add r0, r4, #0 - mov r1, #2 - bl sub_0206251C - cmp r0, #0 - beq _021F7700 - mov r1, #2 - lsl r1, r1, #0xc - bl sub_020628C4 -_021F7700: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov5_021F76D0 - - thumb_func_start ov5_021F7704 -ov5_021F7704: ; 0x021F7704 - push {r4, lr} - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0xf - ldr r0, [r0, #0x38] - bl sub_0206251C - add r4, r0, #0 - beq _021F774E - bl sub_02063020 - cmp r0, #0x28 - bgt _021F7730 - cmp r0, #0x26 - blt _021F772A - beq _021F773A - cmp r0, #0x28 - beq _021F773E - b _021F7746 -_021F772A: - cmp r0, #0x1c - beq _021F7736 - b _021F7746 -_021F7730: - cmp r0, #0x30 - beq _021F7742 - b _021F7746 -_021F7736: - mov r1, #6 - b _021F7748 -_021F773A: - mov r1, #5 - b _021F7748 -_021F773E: - mov r1, #3 - b _021F7748 -_021F7742: - mov r1, #2 - b _021F7748 -_021F7746: - mov r1, #4 -_021F7748: - add r0, r4, #0 - bl ov5_021F7654 -_021F774E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7704 - - thumb_func_start ov5_021F7754 -ov5_021F7754: ; 0x021F7754 - push {r3, lr} - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0xf - ldr r0, [r0, #0x38] - bl sub_0206251C - cmp r0, #0 - beq _021F776E - mov r1, #2 - lsl r1, r1, #0xc - bl sub_020628C4 -_021F776E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7754 - - thumb_func_start ov5_021F7774 -ov5_021F7774: ; 0x021F7774 - push {r3, lr} - add r0, #0x80 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_0202C878 - bl sub_02038F8C - mov r0, #1 - pop {r3, pc} - thumb_func_end ov5_021F7774 - - thumb_func_start ov5_021F7788 -ov5_021F7788: ; 0x021F7788 - push {r4, lr} - add r4, r0, #0 - bl sub_0203E838 - add r4, #0x80 - add r1, r0, #0 - ldr r0, [r4, #0] - bl sub_0203F150 - add r1, r0, #0 - mov r0, #1 - bl sub_0200544C - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7788 - - thumb_func_start ov5_021F77A8 -ov5_021F77A8: ; 0x021F77A8 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r5, #0x80 - add r4, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - bl sub_02027560 - add r1, r6, #0 - bl sub_02026FE8 - strh r0, [r4] - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F77A8 - - thumb_func_start ov5_021F77E8 -ov5_021F77E8: ; 0x021F77E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r5, #0x80 - add r4, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - bl sub_0207A268 - add r1, r6, #0 - bl sub_0207A0FC - add r1, r7, #0 - bl ov5_021F7B60 - strh r0, [r4] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F77E8 - - thumb_func_start ov5_021F7844 -ov5_021F7844: ; 0x021F7844 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r5, #0x80 - add r7, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0xc] - bl sub_0207A268 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl sub_02054988 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov5_021F7844 - - thumb_func_start ov5_021F789C -ov5_021F789C: ; 0x021F789C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r6, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r4, r0, #0 - add r0, r6, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r6, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F118 - add r6, #0x80 - add r5, r0, #0 - ldr r0, [r6, #0] - ldr r0, [r0, #0xc] - bl sub_0207D990 - ldr r2, _021F7984 ; =0x02200CE4 - add r6, r0, #0 - mov r1, #0 -_021F78D8: - ldrh r0, [r2] - cmp r4, r0 - bne _021F78FA - mov r0, #0xc - ldr r2, _021F7988 ; =0x02200CE6 - mul r0, r1 - ldrb r2, [r2, r0] - str r2, [sp, #8] - ldr r2, _021F798C ; =0x02200CE7 - ldrb r2, [r2, r0] - str r2, [sp, #4] - ldr r2, _021F7990 ; =0x02200CE8 - ldrb r2, [r2, r0] - str r2, [sp] - ldr r2, _021F7994 ; =0x02200CE9 - ldrb r7, [r2, r0] - b _021F7902 -_021F78FA: - add r1, r1, #1 - add r2, #0xc - cmp r1, #0x26 - blo _021F78D8 -_021F7902: - cmp r1, #0x26 - bne _021F7912 - bl sub_02022974 - mov r0, #0 - add sp, #0xc - strh r0, [r5] - pop {r4, r5, r6, r7, pc} -_021F7912: - mov r0, #1 - strh r0, [r5] - ldr r0, [sp, #8] - cmp r0, #0 - beq _021F7930 - ldr r2, [sp, #8] - add r0, r6, #0 - mov r1, #0x48 - mov r3, #0x20 - bl sub_0207D688 - cmp r0, #0 - bne _021F7930 - mov r0, #0 - strh r0, [r5] -_021F7930: - ldr r0, [sp, #4] - cmp r0, #0 - beq _021F794A - ldr r2, [sp, #4] - add r0, r6, #0 - mov r1, #0x49 - mov r3, #0x20 - bl sub_0207D688 - cmp r0, #0 - bne _021F794A - mov r0, #0 - strh r0, [r5] -_021F794A: - ldr r0, [sp] - cmp r0, #0 - beq _021F7964 - ldr r2, [sp] - add r0, r6, #0 - mov r1, #0x4a - mov r3, #0x20 - bl sub_0207D688 - cmp r0, #0 - bne _021F7964 - mov r0, #0 - strh r0, [r5] -_021F7964: - cmp r7, #0 - beq _021F797C - add r0, r6, #0 - mov r1, #0x4b - add r2, r7, #0 - mov r3, #0x20 - bl sub_0207D688 - cmp r0, #0 - bne _021F797C - mov r0, #0 - strh r0, [r5] -_021F797C: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_021F7984: .word 0x02200CE4 -_021F7988: .word 0x02200CE6 -_021F798C: .word 0x02200CE7 -_021F7990: .word 0x02200CE8 -_021F7994: .word 0x02200CE9 - thumb_func_end ov5_021F789C - - thumb_func_start ov5_021F7998 -ov5_021F7998: ; 0x021F7998 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - bl sub_0203E838 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r4, #0x80 - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0xc] - bl sub_0207D990 - ldr r2, _021F7A28 ; =0x02200CE4 - add r4, r0, #0 - mov r1, #0 -_021F79C0: - ldrh r0, [r2] - cmp r5, r0 - bne _021F79E0 - mov r0, #0xc - ldr r2, _021F7A2C ; =0x02200CE6 - mul r0, r1 - ldrb r2, [r2, r0] - str r2, [sp, #4] - ldr r2, _021F7A30 ; =0x02200CE7 - ldrb r2, [r2, r0] - str r2, [sp] - ldr r2, _021F7A34 ; =0x02200CE8 - ldrb r7, [r2, r0] - ldr r2, _021F7A38 ; =0x02200CE9 - ldrb r6, [r2, r0] - b _021F79E8 -_021F79E0: - add r1, r1, #1 - add r2, #0xc - cmp r1, #0x26 - blo _021F79C0 -_021F79E8: - cmp r1, #0x26 - bne _021F79F0 - bl sub_02022974 -_021F79F0: - ldr r2, [sp, #4] - add r0, r4, #0 - mov r1, #0x48 - mov r3, #0x20 - bl sub_0207D60C - ldr r2, [sp] - add r0, r4, #0 - mov r1, #0x49 - mov r3, #0x20 - bl sub_0207D60C - add r0, r4, #0 - mov r1, #0x4a - add r2, r7, #0 - mov r3, #0x20 - bl sub_0207D60C - add r0, r4, #0 - mov r1, #0x4b - add r2, r6, #0 - mov r3, #0x20 - bl sub_0207D60C - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F7A28: .word 0x02200CE4 -_021F7A2C: .word 0x02200CE6 -_021F7A30: .word 0x02200CE7 -_021F7A34: .word 0x02200CE8 -_021F7A38: .word 0x02200CE9 - thumb_func_end ov5_021F7998 - - thumb_func_start ov5_021F7A3C -ov5_021F7A3C: ; 0x021F7A3C - mov r1, #0xc - mul r1, r0 - ldr r0, _021F7A48 ; =0x02200CE4 - ldrh r0, [r0, r1] - bx lr - nop -_021F7A48: .word 0x02200CE4 - thumb_func_end ov5_021F7A3C - - thumb_func_start ov5_021F7A4C -ov5_021F7A4C: ; 0x021F7A4C - push {r3, lr} - ldr r3, _021F7A70 ; =0x02200CE4 - mov r2, #0 -_021F7A52: - ldrh r1, [r3] - cmp r0, r1 - bne _021F7A5E - lsl r0, r2, #0x10 - lsr r0, r0, #0x10 - pop {r3, pc} -_021F7A5E: - add r2, r2, #1 - add r3, #0xc - cmp r2, #0x26 - blo _021F7A52 - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - nop -_021F7A70: .word 0x02200CE4 - thumb_func_end ov5_021F7A4C - - thumb_func_start ov5_021F7A74 -ov5_021F7A74: ; 0x021F7A74 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - lsl r1, r4, #0x10 - lsr r2, r1, #0x10 - ldr r1, _021F7B58 ; =0x000001DF - cmp r4, r1 - bhi _021F7AB6 - bhs _021F7B18 - add r3, r1, #0 - sub r3, #0x5d - cmp r4, r3 - bhi _021F7AAC - add r3, r1, #0 - sub r3, #0x5d - cmp r4, r3 - beq _021F7AD2 - b _021F7B48 -_021F7AAC: - add r3, r1, #0 - sub r3, #0x42 - cmp r4, r3 - beq _021F7AF0 - b _021F7B48 -_021F7AB6: - add r3, r1, #0 - add r3, #8 - cmp r4, r3 - bhi _021F7AC8 - add r3, r1, #0 - add r3, #8 - cmp r4, r3 - beq _021F7B04 - b _021F7B48 -_021F7AC8: - add r3, r1, #0 - add r3, #0xd - cmp r4, r3 - beq _021F7B0E - b _021F7B48 -_021F7AD2: - cmp r0, #1 - bne _021F7ADC - add r2, r1, #0 - add r2, #0xf - b _021F7B48 -_021F7ADC: - cmp r0, #2 - bne _021F7AE6 - add r2, r1, #0 - add r2, #0x10 - b _021F7B48 -_021F7AE6: - cmp r0, #3 - bne _021F7B48 - add r2, r1, #0 - add r2, #0x11 - b _021F7B48 -_021F7AF0: - cmp r0, #1 - bne _021F7AFA - add r2, r1, #0 - add r2, #0x12 - b _021F7B48 -_021F7AFA: - cmp r0, #2 - bne _021F7B48 - add r2, r1, #0 - add r2, #0x13 - b _021F7B48 -_021F7B04: - cmp r0, #1 - bne _021F7B48 - add r2, r1, #0 - add r2, #0x14 - b _021F7B48 -_021F7B0E: - cmp r0, #1 - bne _021F7B48 - add r2, r1, #0 - add r2, #0x15 - b _021F7B48 -_021F7B18: - cmp r0, #1 - bne _021F7B22 - add r2, r1, #0 - add r2, #0x16 - b _021F7B48 -_021F7B22: - cmp r0, #2 - bne _021F7B2C - add r2, r1, #0 - add r2, #0x17 - b _021F7B48 -_021F7B2C: - cmp r0, #3 - bne _021F7B36 - add r2, r1, #0 - add r2, #0x18 - b _021F7B48 -_021F7B36: - cmp r0, #4 - bne _021F7B40 - add r2, r1, #0 - add r2, #0x19 - b _021F7B48 -_021F7B40: - cmp r0, #5 - bne _021F7B48 - add r2, r1, #0 - add r2, #0x1a -_021F7B48: - sub r1, r2, #1 - lsl r0, r1, #2 - add r1, r1, r0 - ldr r0, _021F7B5C ; =0x02200EAC - add r0, r0, r1 - ldrb r0, [r5, r0] - pop {r4, r5, r6, pc} - nop -_021F7B58: .word 0x000001DF -_021F7B5C: .word 0x02200EAC - thumb_func_end ov5_021F7A74 - - thumb_func_start ov5_021F7B60 -ov5_021F7B60: ; 0x021F7B60 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - mov r1, #5 - mov r2, #0 - str r0, [sp] - bl sub_02074470 - mov r5, #0 - add r4, sp, #0xc - add r6, r5, #0 -_021F7B76: - add r1, r5, #0 - ldr r0, [sp] - add r1, #0x36 - add r2, r6, #0 - bl sub_02074470 - strh r0, [r4] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _021F7B76 - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #4] -_021F7B92: - ldr r1, [sp, #8] - ldr r0, [sp] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov5_021F7A74 - add r3, r0, #0 - ldr r0, [sp, #4] - mov r2, #0xc - mul r2, r0 - ldr r0, _021F7C00 ; =0x02200CE4 - mov r1, #0 - add r2, r0, r2 -_021F7BAC: - add r4, r3, #0 - asr r4, r1 - mov r0, #1 - and r0, r4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bne _021F7BE0 - ldr r0, [r2, #8] - cmp r7, r0 - bne _021F7BE0 - ldrh r5, [r2] - mov r6, #0 - add r4, sp, #0xc -_021F7BC8: - ldrh r0, [r4] - cmp r0, r5 - beq _021F7BD6 - add r6, r6, #1 - add r4, r4, #2 - cmp r6, #4 - blt _021F7BC8 -_021F7BD6: - cmp r6, #4 - bne _021F7BE0 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021F7BE0: - add r1, r1, #1 - add r2, #0xc - cmp r1, #8 - blt _021F7BAC - ldr r0, [sp, #4] - add r0, #8 - str r0, [sp, #4] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #5 - blt _021F7B92 - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021F7C00: .word 0x02200CE4 - thumb_func_end ov5_021F7B60 - - thumb_func_start ov5_021F7C04 -ov5_021F7C04: ; 0x021F7C04 - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - str r0, [sp, #0x14] - add r0, #0x80 - ldr r6, [r0, #0] - mov r1, #0xf - add r0, r6, #0 - bl sub_0203F098 - add r5, r0, #0 - ldr r0, [sp, #0x14] - bl sub_0203E838 - add r1, r0, #0 - ldr r0, [sp, #0x14] - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - add r4, r0, #0 - ldr r0, [sp, #0x14] - bl sub_0203E838 - add r1, r0, #0 - ldr r0, [sp, #0x14] - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x14] - bl sub_0203E838 - add r7, r0, #0 - ldr r0, [sp, #0x14] - cmp r4, #0xff - str r7, [r0, #0x64] - beq _021F7C62 - add r0, #0x80 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bl sub_0207A268 - add r1, r4, #0 - bl sub_0207A0FC - str r0, [sp, #0x2c] -_021F7C62: - ldr r2, _021F7DD4 ; =0x00000287 - mov r0, #0 - mov r1, #0x1a - mov r3, #0x20 - bl sub_0200B144 - str r0, [sp, #0x28] - add r0, r6, #0 - add r1, r7, #0 - bl sub_0203F118 - add r7, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #1 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F098 - mov r2, #1 - str r2, [sp] - str r7, [sp, #4] - ldr r1, [r5, #0] - mov r3, #0 - str r1, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - mov r1, #0x14 - str r0, [sp, #0x10] - add r0, r6, #0 - bl ov5_021F7ED8 - str r0, [sp, #0x24] - mov r0, #0 - add r1, sp, #0x38 - add r7, r0, #0 -_021F7CA8: - add r0, r0, #1 - strh r7, [r1] - add r1, r1, #2 - cmp r0, #0x26 - blo _021F7CA8 - cmp r4, #0xff - beq _021F7D46 - add r5, r7, #0 - add r4, sp, #0x30 - mov r6, #0 -_021F7CBC: - add r1, r5, #0 - ldr r0, [sp, #0x2c] - add r1, #0x36 - add r2, r6, #0 - bl sub_02074470 - strh r0, [r4] - add r5, r5, #1 - add r4, r4, #2 - cmp r5, #4 - blt _021F7CBC - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x20] - add r6, sp, #0x38 -_021F7CDA: - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x2c] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov5_021F7A74 - mov ip, r0 - ldr r0, [sp, #0x20] - mov r2, #0xc - mul r2, r0 - ldr r0, _021F7DD8 ; =0x02200CE4 - mov r1, #0 - add r2, r0, r2 -_021F7CF4: - mov r0, ip - add r3, r0, #0 - asr r3, r1 - mov r0, #1 - and r0, r3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bne _021F7D2C - ldr r3, [r2, #8] - ldr r0, [sp, #0x1c] - cmp r0, r3 - bne _021F7D2C - ldrh r4, [r2] - mov r5, #0 - add r3, sp, #0x30 -_021F7D14: - ldrh r0, [r3] - cmp r0, r4 - beq _021F7D22 - add r5, r5, #1 - add r3, r3, #2 - cmp r5, #4 - blt _021F7D14 -_021F7D22: - cmp r5, #4 - bne _021F7D2C - strh r4, [r6] - add r6, r6, #2 - add r7, r7, #1 -_021F7D2C: - add r1, r1, #1 - add r2, #0xc - cmp r1, #8 - blt _021F7CF4 - ldr r0, [sp, #0x20] - add r0, #8 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #5 - blt _021F7CDA - b _021F7D6A -_021F7D46: - ldr r5, _021F7DD8 ; =0x02200CE4 - add r6, r7, #0 - add r4, sp, #0x38 -_021F7D4C: - ldr r1, [r5, #8] - ldr r0, [sp, #0x1c] - cmp r0, r1 - bne _021F7D62 - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl ov5_021F7A3C - strh r0, [r4] - add r4, r4, #2 - add r7, r7, #1 -_021F7D62: - add r6, r6, #1 - add r5, #0xc - cmp r6, #0x26 - blo _021F7D4C -_021F7D6A: - mov r5, #0 - cmp r7, #0 - ble _021F7D88 - add r4, sp, #0x38 - mov r6, #0xff -_021F7D74: - ldrh r1, [r4] - ldr r0, [sp, #0x24] - add r2, r6, #0 - add r3, r1, #0 - bl ov5_021F7F2C - add r5, r5, #1 - add r4, r4, #2 - cmp r5, r7 - blt _021F7D74 -_021F7D88: - ldr r2, _021F7DDC ; =0x00000169 - mov r0, #1 - mov r1, #0x1a - mov r3, #0x20 - bl sub_0200B144 - add r4, r0, #0 - ldr r0, [sp, #0x24] - add r1, r4, #0 - bl ov5_021F7E10 - ldr r0, [sp, #0x24] - ldr r3, _021F7DE0 ; =0x0000FFFE - mov r1, #5 - mov r2, #0xff - bl ov5_021F7F2C - add r0, r4, #0 - bl sub_0200B190 - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x28] - bl ov5_021F7E10 - ldr r0, [sp, #0x24] - bl ov5_021F7F34 - ldr r0, [sp, #0x14] - ldr r1, _021F7DE4 ; =ov5_021F7DE8 - bl sub_0203E764 - ldr r0, [sp, #0x28] - bl sub_0200B190 - mov r0, #1 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - nop -_021F7DD4: .word 0x00000287 -_021F7DD8: .word 0x02200CE4 -_021F7DDC: .word 0x00000169 -_021F7DE0: .word 0x0000FFFE -_021F7DE4: .word ov5_021F7DE8 - thumb_func_end ov5_021F7C04 - - thumb_func_start ov5_021F7DE8 -ov5_021F7DE8: ; 0x021F7DE8 - push {r3, lr} - add r1, r0, #0 - ldr r1, [r1, #0x64] - add r0, #0x80 - lsl r1, r1, #0x10 - ldr r0, [r0, #0] - lsr r1, r1, #0x10 - bl sub_0203F118 - ldrh r1, [r0] - ldr r0, _021F7E0C ; =0x0000EEEE - cmp r1, r0 - beq _021F7E06 - mov r0, #1 - pop {r3, pc} -_021F7E06: - mov r0, #0 - pop {r3, pc} - nop -_021F7E0C: .word 0x0000EEEE - thumb_func_end ov5_021F7DE8 - - thumb_func_start ov5_021F7E10 -ov5_021F7E10: ; 0x021F7E10 - add r0, #0xb8 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov5_021F7E10 - - thumb_func_start ov5_021F7E18 -ov5_021F7E18: ; 0x021F7E18 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x2c] - add r6, r1, #0 - add r1, #0xb8 - str r4, [r1, #0] - add r1, r6, #0 - add r1, #0xc3 - ldrb r4, [r1] - mov r1, #2 - mov r7, #0x23 - bic r4, r1 - add r1, r6, #0 - add r1, #0xc3 - strb r4, [r1] - add r1, r6, #0 - ldr r4, [sp, #0x24] - add r1, #0xbc - str r4, [r1, #0] - str r0, [r6, #0] - add r0, r6, #0 - ldr r1, [sp, #0x20] - add r0, #0xcc - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xc3 - add r4, sp, #8 - ldrb r0, [r0] - mov r1, #1 - ldrb r5, [r4, #0x14] - bic r0, r1 - mov r1, #1 - and r1, r5 - orr r1, r0 - add r0, r6, #0 - add r0, #0xc3 - strb r1, [r0] - add r1, r6, #0 - ldrb r0, [r4, #0x10] - add r1, #0xc2 - lsl r7, r7, #4 - strb r0, [r1] - add r1, r6, #0 - add r1, #0xc4 - strb r2, [r1] - add r1, r6, #0 - add r1, #0xc5 - strb r3, [r1] - add r2, r6, #0 - mov r1, #0 - add r2, #0xc7 - strb r1, [r2] - ldr r2, [sp, #0x28] - mov r3, #3 - str r2, [r6, #0x18] - add r2, r6, #0 - add r2, #0xc0 - strb r3, [r2] - ldr r2, _021F7ED0 ; =0x0000027E - add r3, r6, #0 - strh r0, [r6, r2] - add r2, r6, #0 - add r5, r1, #0 - mov r0, #0xff -_021F7E96: - add r4, r2, #0 - add r4, #0xf8 - str r5, [r4, #0] - add r4, r2, #0 - add r4, #0xfc - str r5, [r4, #0] - strh r0, [r3, r7] - add r1, r1, #1 - add r2, #8 - add r3, r3, #2 - cmp r1, #0x27 - blo _021F7E96 - add r4, r6, #0 - mov r7, #0x50 -_021F7EB2: - add r0, r7, #0 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x1c] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #0x27 - blo _021F7EB2 - add r6, #0xcc - ldr r1, _021F7ED4 ; =0x0000EEEE - ldr r0, [r6, #0] - strh r1, [r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_021F7ED0: .word 0x0000027E -_021F7ED4: .word 0x0000EEEE - thumb_func_end ov5_021F7E18 - - thumb_func_start ov5_021F7ED8 -ov5_021F7ED8: ; 0x021F7ED8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r1, #0 - mov r1, #0xa - add r6, r0, #0 - mov r0, #4 - lsl r1, r1, #6 - str r2, [sp, #0x18] - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - bne _021F7EF8 - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_021F7EF8: - mov r2, #0xa - mov r1, #0 - lsl r2, r2, #6 - bl sub_020D5124 - str r5, [sp] - add r0, sp, #0x20 - ldrb r0, [r0, #0x10] - add r1, r4, #0 - add r2, r7, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x34] - str r0, [sp, #8] - ldr r0, [sp, #0x38] - str r0, [sp, #0xc] - ldr r0, [sp, #0x3c] - str r0, [sp, #0x10] - ldr r0, [sp, #0x40] - str r0, [sp, #0x14] - ldr r3, [sp, #0x18] - add r0, r6, #0 - bl ov5_021F7E18 - add r0, r4, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov5_021F7ED8 - - thumb_func_start ov5_021F7F2C -ov5_021F7F2C: ; 0x021F7F2C - push {r3, lr} - bl ov5_021F7FF8 - pop {r3, pc} - thumb_func_end ov5_021F7F2C - - thumb_func_start ov5_021F7F34 -ov5_021F7F34: ; 0x021F7F34 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - add r0, #0xc7 - ldrb r1, [r0] - cmp r1, #8 - bls _021F7F70 - add r0, r4, #0 - add r0, #0xc5 - ldrb r0, [r0] - add r3, r4, #0 - add r1, r4, #0 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r3, #0xc4 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 - b _021F7F9E -_021F7F70: - add r0, r4, #0 - add r0, #0xc5 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0xc4 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - lsl r0, r1, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r4, #0] - add r1, r4, #0 - ldrb r3, [r3] - ldr r0, [r0, #8] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 -_021F7F9E: - mov r0, #0 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r2, _021F7FF0 ; =0x000003D9 - ldr r0, [r0, #8] - mov r1, #3 - mov r3, #0xb - bl sub_0200DAA4 - add r0, r4, #0 - ldr r2, _021F7FF0 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - bl ov5_021F8090 - add r2, r4, #0 - add r2, #0xc2 - add r0, r4, #0 - ldrb r2, [r2] - add r0, #0xd0 - mov r1, #0 - mov r3, #4 - bl sub_0200112C - add r1, r4, #0 - add r1, #0xf0 - str r0, [r1, #0] - ldr r0, _021F7FF4 ; =ov5_021F81A8 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_021F7FF0: .word 0x000003D9 -_021F7FF4: .word ov5_021F81A8 - thumb_func_end ov5_021F7F34 - - thumb_func_start ov5_021F7FF8 -ov5_021F7FF8: ; 0x021F7FF8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r1, [sp] - mov r0, #0x50 - mov r1, #4 - add r7, r2, #0 - add r4, r3, #0 - bl sub_02023790 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - ldr r1, [sp] - add r2, r6, #0 - bl sub_0200B1B8 - add r1, r5, #0 - add r1, #0xc7 - ldrb r1, [r1] - add r0, r5, #0 - add r0, #0xbc - lsl r1, r1, #2 - add r1, r5, r1 - ldr r0, [r0, #0] - ldr r1, [r1, #0x1c] - add r2, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - add r0, #0xc7 - ldrb r1, [r0] - lsl r0, r1, #2 - add r0, r5, r0 - lsl r1, r1, #3 - add r1, r5, r1 - ldr r0, [r0, #0x1c] - add r1, #0xf8 - str r0, [r1, #0] - add r0, r6, #0 - bl sub_020237BC - cmp r4, #0xfa - bne _021F8064 - add r0, r5, #0 - add r0, #0xc7 - ldrb r0, [r0] - mov r1, #2 - mvn r1, r1 - lsl r0, r0, #3 - add r0, r5, r0 - add r0, #0xfc - str r1, [r0, #0] - b _021F8072 -_021F8064: - add r0, r5, #0 - add r0, #0xc7 - ldrb r0, [r0] - lsl r0, r0, #3 - add r0, r5, r0 - add r0, #0xfc - str r4, [r0, #0] -_021F8072: - add r0, r5, #0 - add r0, #0xc7 - ldrb r0, [r0] - lsl r0, r0, #1 - add r1, r5, r0 - mov r0, #0x23 - lsl r0, r0, #4 - strh r7, [r1, r0] - add r0, r5, #0 - add r0, #0xc7 - ldrb r0, [r0] - add r5, #0xc7 - add r0, r0, #1 - strb r0, [r5] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov5_021F7FF8 - - thumb_func_start ov5_021F8090 -ov5_021F8090: ; 0x021F8090 - push {r3, r4} - add r2, r0, #0 - add r1, r0, #0 - add r2, #0xf8 - add r1, #0xd0 - str r2, [r1, #0] - add r1, r0, #0 - ldr r2, _021F818C ; =ov5_021F819C - add r1, #0xd4 - str r2, [r1, #0] - add r1, r0, #0 - mov r2, #0 - add r1, #0xd8 - str r2, [r1, #0] - add r2, r0, #0 - add r1, r0, #0 - add r2, #8 - add r1, #0xdc - str r2, [r1, #0] - add r1, r0, #0 - add r1, #0xc7 - ldrb r2, [r1] - add r1, r0, #0 - add r1, #0xe0 - strh r2, [r1] - add r1, r0, #0 - mov r2, #8 - add r1, #0xe2 - strh r2, [r1] - add r1, r0, #0 - mov r2, #1 - add r1, #0xe4 - strb r2, [r1] - add r1, r0, #0 - mov r3, #0xc - add r1, #0xe5 - strb r3, [r1] - add r1, r0, #0 - mov r3, #2 - add r1, #0xe6 - strb r3, [r1] - add r1, r0, #0 - add r1, #0xe7 - ldrb r3, [r1] - mov r1, #0xf - bic r3, r1 - orr r3, r2 - add r2, r0, #0 - add r2, #0xe7 - strb r3, [r2] - add r2, r0, #0 - add r2, #0xe7 - ldrb r4, [r2] - mov r2, #0xf0 - mov r3, #0x10 - bic r4, r2 - orr r4, r3 - add r3, r0, #0 - add r3, #0xe7 - strb r4, [r3] - add r3, r0, #0 - add r3, #0xe8 - ldrb r3, [r3] - bic r3, r1 - mov r1, #0xf - orr r3, r1 - add r1, r0, #0 - add r1, #0xe8 - strb r3, [r1] - add r1, r0, #0 - add r1, #0xe8 - ldrb r3, [r1] - mov r1, #0x20 - bic r3, r2 - add r2, r3, #0 - orr r2, r1 - add r1, r0, #0 - add r1, #0xe8 - strb r2, [r1] - add r1, r0, #0 - add r1, #0xea - ldrh r2, [r1] - mov r1, #7 - bic r2, r1 - add r1, r0, #0 - add r1, #0xea - strh r2, [r1] - add r1, r0, #0 - add r1, #0xea - ldrh r2, [r1] - mov r1, #0x78 - bic r2, r1 - add r1, r0, #0 - add r1, #0xea - strh r2, [r1] - add r1, r0, #0 - add r1, #0xea - ldrh r2, [r1] - ldr r1, _021F8190 ; =0xFFFFFE7F - and r2, r1 - mov r1, #0x80 - orr r2, r1 - add r1, r0, #0 - add r1, #0xea - strh r2, [r1] - add r1, r0, #0 - add r1, #0xea - ldrh r2, [r1] - ldr r1, _021F8194 ; =0xFFFF81FF - and r2, r1 - add r1, r0, #0 - add r1, #0xea - strh r2, [r1] - add r1, r0, #0 - add r1, #0xea - ldrh r2, [r1] - ldr r1, _021F8198 ; =0xFFFF7FFF - and r2, r1 - add r1, r0, #0 - add r1, #0xea - strh r2, [r1] - add r1, r0, #0 - add r1, #0xec - str r0, [r1, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 -_021F818C: .word ov5_021F819C -_021F8190: .word 0xFFFFFE7F -_021F8194: .word 0xFFFF81FF -_021F8198: .word 0xFFFF7FFF - thumb_func_end ov5_021F8090 - - thumb_func_start ov5_021F819C -ov5_021F819C: ; 0x021F819C - ldr r3, _021F81A4 ; =sub_02001504 - mov r1, #0x13 - bx r3 - nop -_021F81A4: .word sub_02001504 - thumb_func_end ov5_021F819C - - thumb_func_start ov5_021F81A8 -ov5_021F81A8: ; 0x021F81A8 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r0, r5, #0 - add r0, #0xc0 - ldrb r0, [r0] - cmp r0, #0 - beq _021F81C4 - add r0, r5, #0 - add r0, #0xc0 - ldrb r0, [r0] - add r5, #0xc0 - sub r0, r0, #1 - strb r0, [r5] - pop {r4, r5, r6, pc} -_021F81C4: - bl sub_0200F2AC - cmp r0, #0 - beq _021F8240 - add r0, r5, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - bl sub_02001288 - add r4, r0, #0 - add r0, r5, #0 - ldr r1, _021F8244 ; =0x0000027E - add r0, #0xf0 - ldrh r6, [r5, r1] - ldr r0, [r0, #0] - add r1, r5, r1 - bl sub_020014D0 - ldr r0, _021F8244 ; =0x0000027E - ldrh r0, [r5, r0] - cmp r6, r0 - beq _021F81F6 - ldr r0, _021F8248 ; =0x000005DC - bl sub_02005748 -_021F81F6: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _021F8206 - add r0, r0, #1 - cmp r4, r0 - beq _021F8240 - b _021F822C -_021F8206: - add r0, r5, #0 - add r0, #0xc3 - ldrb r0, [r0] - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021F8240 - ldr r0, _021F8248 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0xcc - ldr r1, _021F824C ; =0x0000FFFE - ldr r0, [r0, #0] - strh r1, [r0] - add r0, r5, #0 - bl ov5_021F8250 - pop {r4, r5, r6, pc} -_021F822C: - ldr r0, _021F8248 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - strh r4, [r0] - add r0, r5, #0 - bl ov5_021F8250 -_021F8240: - pop {r4, r5, r6, pc} - nop -_021F8244: .word 0x0000027E -_021F8248: .word 0x000005DC -_021F824C: .word 0x0000FFFE - thumb_func_end ov5_021F81A8 - - thumb_func_start ov5_021F8250 -ov5_021F8250: ; 0x021F8250 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _021F82B4 ; =0x000005DC - bl sub_02005748 - add r0, r6, #0 - add r0, #0xf0 - mov r1, #0 - ldr r0, [r0, #0] - add r2, r1, #0 - bl sub_02001384 - add r0, r6, #0 - add r0, #0xdc - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200DC9C - add r0, r6, #0 - add r0, #8 - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_021F8280: - ldr r0, [r5, #0x1c] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x27 - blo _021F8280 - add r0, r6, #0 - add r0, #0xc3 - ldrb r0, [r0] - lsl r0, r0, #0x1e - lsr r0, r0, #0x1f - cmp r0, #1 - bne _021F82A6 - add r0, r6, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl sub_0200B190 -_021F82A6: - ldr r0, [r6, #4] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F82B4: .word 0x000005DC - thumb_func_end ov5_021F8250 - - thumb_func_start ov5_021F82B8 -ov5_021F82B8: ; 0x021F82B8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - add r0, #0x80 - ldr r7, [r0, #0] - mov r1, #0xf - add r0, r7, #0 - bl sub_0203F098 - str r0, [sp, #0x14] - add r0, r7, #0 - mov r1, #0 - bl sub_0203F098 - str r0, [sp, #0x18] - ldr r0, [r5, #8] - add r1, r0, #1 - str r1, [r5, #8] - ldrb r6, [r0] - add r0, r1, #1 - str r0, [r5, #8] - add r0, r5, #0 - ldrb r4, [r1] - bl sub_0203E838 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_0203F150 - str r0, [sp, #0x1c] - add r0, r5, #0 - bl sub_0203E838 - add r5, #0x80 - add r1, r0, #0 - ldr r0, [r5, #0] - bl sub_0203F118 - add r5, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021F7A4C - mov r1, #0xc - mul r1, r0 - ldr r0, [sp, #0x14] - add r2, r4, #0 - ldr r0, [r0, #0] - add r3, r5, #0 - str r0, [sp] - ldr r0, _021F8348 ; =0x02200CE6 - ldrb r0, [r0, r1] - str r0, [sp, #4] - ldr r0, _021F834C ; =0x02200CE7 - ldrb r0, [r0, r1] - str r0, [sp, #8] - ldr r0, _021F8350 ; =0x02200CE8 - ldrb r0, [r0, r1] - str r0, [sp, #0xc] - ldr r0, _021F8354 ; =0x02200CE9 - ldrb r0, [r0, r1] - add r1, r6, #0 - str r0, [sp, #0x10] - add r0, r7, #0 - bl ov5_021DD250 - ldr r1, [sp, #0x18] - str r0, [r1, #0] - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F8348: .word 0x02200CE6 -_021F834C: .word 0x02200CE7 -_021F8350: .word 0x02200CE8 -_021F8354: .word 0x02200CE9 - thumb_func_end ov5_021F82B8 - - thumb_func_start ov5_021F8358 -ov5_021F8358: ; 0x021F8358 - push {r3, lr} - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0203F098 - ldr r0, [r0, #0] - bl ov5_021DD3A8 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F8358 - - thumb_func_start ov5_021F8370 -ov5_021F8370: ; 0x021F8370 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_0203D174 - bl sub_02027860 - mov r1, #0xa - bl sub_02027F6C - mov r1, #0x47 - add r4, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x47 - add r6, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - str r5, [r6, #0] - str r4, [r6, #4] - ldr r0, [r5, #4] - mov r4, #0 - str r6, [r0, #0x24] -_021F83A4: - add r0, r5, #0 - add r1, r4, #0 - bl ov5_021F8508 - cmp r0, #1 - bne _021F83B8 - add r0, r6, #0 - add r1, r4, #0 - bl ov5_021F8480 -_021F83B8: - add r4, r4, #1 - cmp r4, #0x14 - blt _021F83A4 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F8370 - - thumb_func_start ov5_021F83C0 -ov5_021F83C0: ; 0x021F83C0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r0, [r0, #0x24] - bl sub_020181C4 - ldr r0, [r4, #4] - mov r1, #0 - str r1, [r0, #0x24] - pop {r4, pc} - thumb_func_end ov5_021F83C0 - - thumb_func_start ov5_021F83D4 -ov5_021F83D4: ; 0x021F83D4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [sp, #0x18] - ldr r5, _021F840C ; =0x0220192C - add r7, r1, #0 - str r2, [sp] - str r0, [sp, #0x18] - mov r4, #0 -_021F83E4: - ldr r1, [sp] - add r0, r7, #0 - add r2, r5, #0 - add r3, r6, #0 - bl ov5_021F851C - cmp r0, #1 - bne _021F83FC - ldr r1, [sp, #0x18] - mov r0, #1 - str r0, [r1, #0] - pop {r3, r4, r5, r6, r7, pc} -_021F83FC: - add r4, r4, #1 - add r5, #0x18 - cmp r4, #0x17 - blt _021F83E4 - ldr r1, [sp, #0x18] - mov r0, #0 - str r0, [r1, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F840C: .word 0x0220192C - thumb_func_end ov5_021F83D4 - - thumb_func_start ov5_021F8410 -ov5_021F8410: ; 0x021F8410 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - str r1, [sp] - str r2, [sp, #4] - add r7, r3, #0 - bl sub_0203D174 - bl sub_02027860 - bl sub_02027F80 - cmp r0, #0xa - bne _021F846C - ldr r5, _021F8474 ; =0x0220192C - mov r4, #0 -_021F8430: - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r5, #0 - add r3, r6, #0 - bl ov5_021F851C - cmp r0, #1 - bne _021F8464 - ldrh r0, [r5] - lsl r1, r0, #2 - ldr r0, _021F8478 ; =0x022018DC - ldr r1, [r0, r1] - ldr r0, _021F847C ; =0x00002774 - cmp r1, r0 - bne _021F8452 - cmp r7, #0 - bne _021F8464 -_021F8452: - lsl r1, r1, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - mov r2, #0 - bl sub_0203E880 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021F8464: - add r4, r4, #1 - add r5, #0x18 - cmp r4, #0x17 - blt _021F8430 -_021F846C: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021F8474: .word 0x0220192C -_021F8478: .word 0x022018DC -_021F847C: .word 0x00002774 - thumb_func_end ov5_021F8410 - - thumb_func_start ov5_021F8480 -ov5_021F8480: ; 0x021F8480 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r1, #0 - add r0, sp, #0x14 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - ldr r0, [sp, #0xc] - str r1, [sp, #0x10] - lsl r1, r0, #2 - ldr r0, _021F8500 ; =0x0220188C - ldr r6, _021F8504 ; =0x0220192C - ldr r7, [r0, r1] - ldr r0, [sp, #8] - ldr r5, [r0, #0] - add r0, #8 - str r0, [sp, #8] -_021F84A6: - ldrh r1, [r6] - ldr r0, [sp, #0xc] - cmp r1, r0 - bne _021F84F0 - ldr r4, [sp, #8] - mov r1, #0 -_021F84B2: - ldrh r0, [r4] - cmp r0, #0 - bne _021F84E8 - mov r0, #1 - strh r0, [r4] - str r7, [r4, #4] - add r0, sp, #0x14 - str r0, [sp] - ldr r0, [r5, #0x50] - add r2, r7, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r5, #0x30] - add r3, r6, #4 - bl ov5_021E19CC - strh r0, [r4, #2] - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - add r1, r7, #0 - bl ov5_021E18CC - str r0, [r4, #8] - b _021F84F0 -_021F84E8: - add r1, r1, #1 - add r4, #0xc - cmp r1, #0x17 - blt _021F84B2 -_021F84F0: - ldr r0, [sp, #0x10] - add r6, #0x18 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #0x17 - blt _021F84A6 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F8500: .word 0x0220188C -_021F8504: .word 0x0220192C - thumb_func_end ov5_021F8480 - - thumb_func_start ov5_021F8508 -ov5_021F8508: ; 0x021F8508 - push {r4, lr} - ldr r0, [r0, #0xc] - add r4, r1, #0 - bl sub_020507E4 - mov r1, #2 - add r2, r4, #0 - bl sub_0206AF6C - pop {r4, pc} - thumb_func_end ov5_021F8508 - - thumb_func_start ov5_021F851C -ov5_021F851C: ; 0x021F851C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrh r0, [r2, #2] - add r4, r2, #0 - add r6, r1, #0 - add r4, #0x10 - cmp r0, #1 - bne _021F855C - ldrh r1, [r2] - add r0, r3, #0 - bl ov5_021F8508 - cmp r0, #1 - bne _021F855C - mov r0, #2 - ldrsh r0, [r4, r0] - cmp r6, r0 - blt _021F855C - mov r0, #6 - ldrsh r0, [r4, r0] - cmp r6, r0 - bgt _021F855C - mov r0, #0 - ldrsh r0, [r4, r0] - cmp r5, r0 - blt _021F855C - mov r0, #4 - ldrsh r0, [r4, r0] - cmp r5, r0 - bgt _021F855C - mov r0, #1 - pop {r4, r5, r6, pc} -_021F855C: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov5_021F851C - - thumb_func_start ov5_021F8560 -ov5_021F8560: ; 0x021F8560 - push {r3, r4, r5, lr} - mov r2, #0 - mov r1, #0x6c - add r3, r2, #0 - add r5, r0, #0 - bl ov5_021DF53C - add r4, r0, #0 - str r5, [r4, #0] - bl ov5_021F858C - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F8560 - - thumb_func_start ov5_021F857C -ov5_021F857C: ; 0x021F857C - push {r4, lr} - add r4, r0, #0 - bl ov5_021F85B0 - add r0, r4, #0 - bl ov5_021DF554 - pop {r4, pc} - thumb_func_end ov5_021F857C - - thumb_func_start ov5_021F858C -ov5_021F858C: ; 0x021F858C - push {r3, r4, lr} - sub sp, #4 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - ldr r0, [r4, #0] - add r1, r4, #4 - mov r3, #0x51 - bl ov5_021DFB00 - add r0, r4, #0 - add r0, #0x18 - add r1, r4, #4 - bl sub_02073B70 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F858C - - thumb_func_start ov5_021F85B0 -ov5_021F85B0: ; 0x021F85B0 - ldr r3, _021F85B8 ; =sub_0207395C - add r0, r0, #4 - bx r3 - nop -_021F85B8: .word sub_0207395C - thumb_func_end ov5_021F85B0 - - thumb_func_start ov5_021F85BC -ov5_021F85BC: ; 0x021F85BC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r6, r1, #0 - add r7, r2, #0 - add r2, sp, #0x24 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r5, r0, #0 - str r3, [sp, #8] - str r1, [r2, #8] - bl sub_0205EB3C - ldr r1, [sp, #0x48] - add r4, r0, #0 - str r1, [sp, #0xc] - ldr r1, [sp, #0x50] - str r1, [sp, #0x10] - bl ov5_021DF578 - mov r1, #0x21 - str r0, [sp, #0x14] - bl ov5_021DF55C - str r0, [sp, #0x18] - ldr r0, [sp, #0x4c] - str r4, [sp, #0x1c] - str r5, [sp, #0x20] - cmp r0, #0 - bne _021F8626 - add r0, r4, #0 - bl sub_02062C00 - ldr r2, [sp, #0x50] - ldr r0, _021F865C ; =0x02201BC8 - mov r1, #0xc - add r3, r2, #0 - mul r3, r1 - ldr r2, [r0, r3] - add r1, r0, r3 - lsl r0, r6, #0x10 - add r0, r2, r0 - ldr r2, [r1, #4] - str r0, [sp, #0x24] - lsl r0, r7, #0x10 - add r0, r2, r0 - str r0, [sp, #0x28] - ldr r0, [sp, #8] - ldr r1, [r1, #8] - lsl r0, r0, #0x10 - add r0, r1, r0 - str r0, [sp, #0x2c] - b _021F863E -_021F8626: - add r0, r4, #0 - add r1, sp, #0x24 - bl sub_02063050 - ldr r2, [sp, #0x50] - mov r1, #0xc - ldr r3, _021F8660 ; =0x02201C10 - mul r1, r2 - add r0, r4, #0 - add r1, r3, r1 - bl sub_020630AC -_021F863E: - add r0, r4, #0 - mov r1, #2 - bl sub_02062758 - add r1, sp, #0xc - str r1, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x14] - ldr r1, _021F8664 ; =0x02201B54 - ldr r3, [sp, #0x4c] - add r2, sp, #0x24 - bl ov5_021DF72C - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F865C: .word 0x02201BC8 -_021F8660: .word 0x02201C10 -_021F8664: .word 0x02201B54 - thumb_func_end ov5_021F85BC - - thumb_func_start ov5_021F8668 -ov5_021F8668: ; 0x021F8668 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r0, #0 - add r3, r4, #0 - add r6, r2, #0 - add r3, #0x38 - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - mov r1, #4 - strh r0, [r4, #4] - mov r0, #1 - lsl r0, r0, #0xc - str r0, [r4, #0x2c] - lsr r0, r0, #2 - str r0, [r4, #0x30] - ldr r0, [r2, #4] - add r2, r4, #0 - str r0, [r4, #0x34] - ldrsh r1, [r4, r1] - add r2, #0xc - bl ov5_021F8878 - ldr r0, [r4, #0x34] - lsl r1, r0, #2 - ldr r0, _021F86C8 ; =0x02201B68 - ldr r0, [r0, r1] - strh r0, [r4, #8] - mov r0, #0x14 - strh r0, [r4, #0xa] - add r0, r5, #0 - bl sub_020715B4 - cmp r0, #1 - bne _021F86C4 - ldr r1, [r4, #0] - mov r0, #2 - orr r0, r1 - str r0, [r4, #0] -_021F86C4: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F86C8: .word 0x02201B68 - thumb_func_end ov5_021F8668 - - thumb_func_start ov5_021F86CC -ov5_021F86CC: ; 0x021F86CC - push {lr} - sub sp, #0xc - ldr r0, [r1, #0x48] - add r1, sp, #0 - mov r2, #0 - str r2, [r1, #0] - str r2, [r1, #4] - str r2, [r1, #8] - bl sub_020630AC - add sp, #0xc - pop {pc} - thumb_func_end ov5_021F86CC - - thumb_func_start ov5_021F86E4 -ov5_021F86E4: ; 0x021F86E4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [r5, #0] - add r7, r0, #0 - mov r0, #2 - ldr r4, [r5, #0x48] - ldr r6, [r5, #0x4c] - tst r0, r1 - bne _021F86FA - b _021F8838 -_021F86FA: - add r0, r4, #0 - bl sub_0206299C - strh r0, [r5, #4] - add r0, r6, #0 - bl sub_0205F108 - str r0, [r5, #0x34] - mov r0, #4 - ldrsh r1, [r5, r0] - sub r0, r0, #5 - cmp r1, r0 - bne _021F8718 - bl sub_02022974 -_021F8718: - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x30] - add r2, r1, r0 - mov r1, #1 - lsl r1, r1, #0xe - str r2, [r5, #0x2c] - cmp r2, r1 - blt _021F8732 - str r1, [r5, #0x2c] - ldr r0, [r5, #0x30] - neg r0, r0 - str r0, [r5, #0x30] - b _021F8740 -_021F8732: - lsr r0, r1, #2 - cmp r2, r0 - bgt _021F8740 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x30] - neg r0, r0 - str r0, [r5, #0x30] -_021F8740: - ldr r0, [r5, #0] - mov r1, #4 - tst r0, r1 - bne _021F8754 - ldrsh r1, [r5, r1] - add r2, r5, #0 - ldr r0, [r5, #0x34] - add r2, #0xc - bl ov5_021F8878 -_021F8754: - ldr r1, [r5, #0] - mov r0, #0x10 - tst r0, r1 - bne _021F8766 - ldr r0, [r5, #0x34] - lsl r1, r0, #2 - ldr r0, _021F883C ; =0x02201B68 - ldr r0, [r0, r1] - strh r0, [r5, #8] -_021F8766: - ldr r1, [r5, #0] - mov r0, #8 - tst r0, r1 - bne _021F8838 - ldr r1, [r5, #0x34] - mov r0, #0xc - add r2, r1, #0 - mul r2, r0 - ldr r0, _021F8840 ; =0x02201C10 - add r3, r0, r2 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [r5, #0] - mov r0, #0x20 - tst r0, r1 - bne _021F8796 - ldr r1, [sp, #4] - ldr r0, [r5, #0x2c] - add r0, r1, r0 - str r0, [sp, #4] - b _021F87AE -_021F8796: - ldr r1, [sp] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r0, [r5, #0x1c] - add r0, r1, r0 - str r0, [sp, #8] -_021F87AE: - add r0, r4, #0 - add r1, sp, #0 - bl sub_020630AC - add r0, r4, #0 - add r1, sp, #0 - bl sub_02063050 - ldr r1, [r5, #0] - mov r0, #0x40 - tst r0, r1 - bne _021F87D2 - ldr r1, [r5, #0x34] - mov r0, #0xc - ldr r2, _021F8844 ; =0x02201B80 - mul r0, r1 - add r4, r2, r0 - b _021F87D6 -_021F87D2: - add r4, r5, #0 - add r4, #0x20 -_021F87D6: - ldrh r0, [r5, #8] - bl sub_0201D1D4 - ldrh r3, [r5, #0xa] - ldr r1, [r4, #0] - ldr r2, [sp] - mul r0, r3 - add r0, r1, r0 - add r0, r2, r0 - str r0, [sp] - ldrh r0, [r5, #8] - bl sub_0201D15C - mov r1, #2 - ldr r3, [r4, #4] - lsl r1, r1, #0xe - add r1, r3, r1 - ldrh r3, [r5, #0xa] - ldr r2, [sp, #4] - mul r0, r3 - add r0, r1, r0 - add r1, r2, r0 - str r1, [sp, #4] - ldr r2, [sp, #8] - ldr r0, [r4, #8] - add r0, r2, r0 - str r0, [sp, #8] - ldr r3, [r5, #0] - mov r2, #0x20 - tst r2, r3 - bne _021F881C - ldr r0, [r5, #0x2c] - add r0, r1, r0 - str r0, [sp, #4] - b _021F8830 -_021F881C: - ldr r3, [sp] - ldr r2, [r5, #0x14] - add r2, r3, r2 - str r2, [sp] - ldr r2, [r5, #0x18] - add r1, r1, r2 - str r1, [sp, #4] - ldr r1, [r5, #0x1c] - add r0, r0, r1 - str r0, [sp, #8] -_021F8830: - add r0, r7, #0 - add r1, sp, #0 - bl sub_020715D4 -_021F8838: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021F883C: .word 0x02201B68 -_021F8840: .word 0x02201C10 -_021F8844: .word 0x02201B80 - thumb_func_end ov5_021F86E4 - - thumb_func_start ov5_021F8848 -ov5_021F8848: ; 0x021F8848 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r2, [r4, #0] - mov r1, #1 - tst r1, r2 - bne _021F886C - ldr r5, [r4, #0x44] - add r1, sp, #0 - add r5, #0x18 - bl sub_020715E4 - add r2, r4, #0 - add r0, r5, #0 - add r1, sp, #0 - add r2, #0xc - bl sub_02073BF0 -_021F886C: - ldrh r0, [r4, #6] - add r0, r0, #1 - strh r0, [r4, #6] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov5_021F8848 - - thumb_func_start ov5_021F8878 -ov5_021F8878: ; 0x021F8878 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - cmp r5, #6 - blo _021F8888 - bl sub_02022974 -_021F8888: - ldr r0, _021F88A4 ; =0x02201C58 - lsl r1, r5, #5 - lsl r2, r6, #3 - add r0, r0, r1 - add r1, r2, r0 - ldrh r0, [r2, r0] - strh r0, [r4] - ldrh r0, [r1, #2] - strh r0, [r4, #2] - ldrh r0, [r1, #4] - strh r0, [r4, #4] - ldrh r0, [r1, #6] - strh r0, [r4, #6] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021F88A4: .word 0x02201C58 - thumb_func_end ov5_021F8878 - - thumb_func_start ov5_021F88A8 -ov5_021F88A8: ; 0x021F88A8 - push {r3, lr} - bl sub_02071598 - add r0, #0xc - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F88A8 - - thumb_func_start ov5_021F88B4 -ov5_021F88B4: ; 0x021F88B4 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_02071598 - add r2, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - add r2, #0xc - bl ov5_021F8878 - pop {r3, r4, r5, pc} - thumb_func_end ov5_021F88B4 - - thumb_func_start ov5_021F88CC -ov5_021F88CC: ; 0x021F88CC - push {r4, lr} - add r4, r1, #0 - bl sub_02071598 - ldr r1, [r0, #0] - orr r1, r4 - str r1, [r0, #0] - pop {r4, pc} - thumb_func_end ov5_021F88CC - - thumb_func_start ov5_021F88DC -ov5_021F88DC: ; 0x021F88DC - push {r4, lr} - add r4, r1, #0 - bl sub_02071598 - ldr r2, [r0, #0] - mvn r1, r4 - and r1, r2 - str r1, [r0, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov5_021F88DC - - thumb_func_start ov5_021F88F0 -ov5_021F88F0: ; 0x021F88F0 - push {r3, lr} - bl sub_02071598 - add r0, #0x14 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F88F0 - - thumb_func_start ov5_021F88FC -ov5_021F88FC: ; 0x021F88FC - push {r3, lr} - bl sub_02071598 - add r0, #0x20 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov5_021F88FC - - thumb_func_start ov5_021F8908 -ov5_021F8908: ; 0x021F8908 - push {r4, lr} - add r4, r1, #0 - bl sub_02071598 - strh r4, [r0, #8] - pop {r4, pc} - thumb_func_end ov5_021F8908 - ; 0x021F8914 - - - .rodata - .incbin "incbin/overlay5_rodata.bin" - - .data - .incbin "incbin/overlay5_data.bin" - - .bss - .space 0x3C020 diff --git a/asm/overlay6.s b/asm/overlay6.s deleted file mode 100644 index 4de0ee4ee..000000000 --- a/asm/overlay6.s +++ /dev/null @@ -1,23102 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov6_0223E140 -ov6_0223E140: ; 0x0223E140 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x38] - cmp r1, #5 - bhi _0223E196 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E156: ; jump table - .short _0223E162 - _0223E156 - 2 ; case 0 - .short _0223E16E - _0223E156 - 2 ; case 1 - .short _0223E196 - _0223E156 - 2 ; case 2 - .short _0223E180 - _0223E156 - 2 ; case 3 - .short _0223E18C - _0223E156 - 2 ; case 4 - .short _0223E196 - _0223E156 - 2 ; case 5 -_0223E162: - bl ov6_0223E234 - ldr r0, [r4, #0x38] - add r0, r0, #1 - str r0, [r4, #0x38] - pop {r4, pc} -_0223E16E: - ldr r0, [r4, #0x30] - ldr r1, [r4, #0x34] - bl ov6_0223E2BC - str r0, [r4, #0x2c] - ldr r0, [r4, #0x38] - add r0, r0, #1 - str r0, [r4, #0x38] - pop {r4, pc} -_0223E180: - bl ov6_0223E2E8 - ldr r0, [r4, #0x38] - add r0, r0, #1 - str r0, [r4, #0x38] - pop {r4, pc} -_0223E18C: - bl ov6_0223E248 - ldr r0, [r4, #0x38] - add r0, r0, #1 - str r0, [r4, #0x38] -_0223E196: - pop {r4, pc} - thumb_func_end ov6_0223E140 - - thumb_func_start ov6_0223E198 -ov6_0223E198: ; 0x0223E198 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x38] - cmp r0, #2 - beq _0223E1A6 - bl sub_02022974 -_0223E1A6: - mov r0, #3 - str r0, [r4, #0x38] - pop {r4, pc} - thumb_func_end ov6_0223E198 - - thumb_func_start ov6_0223E1AC -ov6_0223E1AC: ; 0x0223E1AC - ldr r0, [r0, #0x38] - bx lr - thumb_func_end ov6_0223E1AC - - thumb_func_start ov6_0223E1B0 -ov6_0223E1B0: ; 0x0223E1B0 - push {r4, lr} - sub sp, #0x28 - ldr r4, _0223E1CC ; =0x02248EDC - add r3, sp, #0 - mov r2, #5 -_0223E1BA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223E1BA - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_0223E1CC: .word 0x02248EDC - thumb_func_end ov6_0223E1B0 - - thumb_func_start ov6_0223E1D0 -ov6_0223E1D0: ; 0x0223E1D0 - push {r4, r5, lr} - sub sp, #0x2c - ldr r5, _0223E22C ; =0x02248E38 - add r3, sp, #0x1c - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r5, _0223E230 ; =0x02248EC0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #4 - bl sub_02019690 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - add sp, #0x2c - pop {r4, r5, pc} - nop -_0223E22C: .word 0x02248E38 -_0223E230: .word 0x02248EC0 - thumb_func_end ov6_0223E1D0 - - thumb_func_start ov6_0223E234 -ov6_0223E234: ; 0x0223E234 - ldr r3, _0223E240 ; =sub_0200DA3C - mov r2, #1 - add r1, r0, #0 - ldr r0, _0223E244 ; =ov6_0223E25C - lsl r2, r2, #0xa - bx r3 - ; .align 2, 0 -_0223E240: .word sub_0200DA3C -_0223E244: .word ov6_0223E25C - thumb_func_end ov6_0223E234 - - thumb_func_start ov6_0223E248 -ov6_0223E248: ; 0x0223E248 - ldr r3, _0223E254 ; =sub_0200DA3C - mov r2, #1 - add r1, r0, #0 - ldr r0, _0223E258 ; =ov6_0223E280 - lsl r2, r2, #0xa - bx r3 - ; .align 2, 0 -_0223E254: .word sub_0200DA3C -_0223E258: .word ov6_0223E280 - thumb_func_end ov6_0223E248 - - thumb_func_start ov6_0223E25C -ov6_0223E25C: ; 0x0223E25C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl ov6_0223E1B0 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl ov6_0223E2A4 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl ov6_0223E1D0 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_0223E25C - - thumb_func_start ov6_0223E280 -ov6_0223E280: ; 0x0223E280 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #4 - bl sub_0201FE94 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl ov6_0223E2A4 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl ov6_0223E2AC - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov6_0223E280 - - thumb_func_start ov6_0223E2A4 -ov6_0223E2A4: ; 0x0223E2A4 - ldr r3, _0223E2A8 ; =ov5_021D143C - bx r3 - ; .align 2, 0 -_0223E2A8: .word ov5_021D143C - thumb_func_end ov6_0223E2A4 - - thumb_func_start ov6_0223E2AC -ov6_0223E2AC: ; 0x0223E2AC - push {r3, lr} - bl ov5_021D1434 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - pop {r3, pc} - thumb_func_end ov6_0223E2AC - - thumb_func_start ov6_0223E2BC -ov6_0223E2BC: ; 0x0223E2BC - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - ldr r6, _0223E2E4 ; =0x02248F04 - add r3, r0, #0 - add r2, r1, #0 - add r5, sp, #0 - mov r4, #5 -_0223E2CA: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r4, r4, #1 - bne _0223E2CA - ldr r0, [r6, #0] - str r0, [r5, #0] - add r0, sp, #0 - str r3, [sp, #0x20] - str r2, [sp, #0x24] - bl ov5_021E2098 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223E2E4: .word 0x02248F04 - thumb_func_end ov6_0223E2BC - - thumb_func_start ov6_0223E2E8 -ov6_0223E2E8: ; 0x0223E2E8 - ldr r3, _0223E2F4 ; =sub_0200DA3C - mov r2, #1 - add r1, r0, #0 - ldr r0, _0223E2F8 ; =ov6_0223E2FC - lsl r2, r2, #0xa - bx r3 - ; .align 2, 0 -_0223E2F4: .word sub_0200DA3C -_0223E2F8: .word ov6_0223E2FC - thumb_func_end ov6_0223E2E8 - - thumb_func_start ov6_0223E2FC -ov6_0223E2FC: ; 0x0223E2FC - push {r4, lr} - add r1, #0x2c - add r4, r0, #0 - add r0, r1, #0 - mov r1, #1 - mov r2, #0 - add r3, r1, #0 - bl ov5_021E20E8 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223E2FC - - thumb_func_start ov6_0223E318 -ov6_0223E318: ; 0x0223E318 - push {r4, lr} - ldr r0, [r0, #0x38] - add r4, r2, #0 - bl sub_0206251C - cmp r4, #1 - bne _0223E330 - mov r1, #1 - lsl r1, r1, #0x14 - bl sub_020628BC - pop {r4, pc} -_0223E330: - mov r1, #1 - lsl r1, r1, #0x14 - bl sub_020628C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223E318 - - thumb_func_start ov6_0223E33C -ov6_0223E33C: ; 0x0223E33C - push {r4, lr} - add r4, r0, #0 - bl sub_02050A60 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0223E358 - cmp r0, #1 - beq _0223E370 - b _0223E380 -_0223E358: - ldr r0, [r4, #0] - bl ov6_0223FE9C - ldr r0, [r4, #0] - bl ov6_0223FF6C - cmp r0, #1 - bne _0223E380 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223E380 -_0223E370: - ldr r0, [r4, #0] - bl ov6_0223FE08 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} -_0223E380: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_0223E33C - - thumb_func_start ov6_0223E384 -ov6_0223E384: ; 0x0223E384 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - bl sub_02050A60 - add r4, r0, #0 - mov r0, #4 - mov r1, #0x10 - bl sub_02018144 - add r5, r0, #0 - add r2, r5, #0 - mov r1, #0x10 - mov r0, #0 -_0223E3A0: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0223E3A0 - mov r0, #4 - bl ov6_0223FDE4 - str r0, [r5, #0] - mov r1, #0x10 - str r1, [sp] - ldr r0, [r4, #0x24] - lsl r1, r1, #9 - str r0, [sp, #4] - ldr r0, [r5, #0] - mov r2, #0 - mov r3, #1 - bl ov6_0223FE1C - ldr r1, _0223E3D4 ; =ov6_0223E33C - add r0, r6, #0 - add r2, r5, #0 - bl sub_02050944 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0223E3D4: .word ov6_0223E33C - thumb_func_end ov6_0223E384 - - thumb_func_start ov6_0223E3D8 -ov6_0223E3D8: ; 0x0223E3D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov6_0223FFF8 - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov6_0223FFF4 - ldr r1, [r5, #8] - cmp r1, r0 - beq _0223E404 - mov r1, #2 - str r0, [r5, #8] - add r0, r4, #0 - lsl r1, r1, #0xe - bl sub_020BCFD0 - sub r1, r4, r0 - ldr r0, [r5, #0] - bl ov6_0223FFFC -_0223E404: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_0223E3D8 - - thumb_func_start ov6_0223E408 -ov6_0223E408: ; 0x0223E408 - push {r4, lr} - add r4, r0, #0 - bl sub_02050A60 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #7 - bhi _0223E4E4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223E42A: ; jump table - .short _0223E43A - _0223E42A - 2 ; case 0 - .short _0223E44A - _0223E42A - 2 ; case 1 - .short _0223E45E - _0223E42A - 2 ; case 2 - .short _0223E476 - _0223E42A - 2 ; case 3 - .short _0223E4A0 - _0223E42A - 2 ; case 4 - .short _0223E4B2 - _0223E42A - 2 ; case 5 - .short _0223E4C4 - _0223E42A - 2 ; case 6 - .short _0223E4D4 - _0223E42A - 2 ; case 7 -_0223E43A: - mov r0, #0 - mov r1, #1 - bl sub_0200564C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223E4E4 -_0223E44A: - bl sub_02005684 - cmp r0, #0 - bne _0223E4E4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0x10 - str r0, [r4, #4] - b _0223E4E4 -_0223E45E: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0 - bgt _0223E4E4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, _0223E4E8 ; =0x0000065C - bl sub_02005748 - b _0223E4E4 -_0223E476: - ldr r0, [r4, #0] - bl ov6_0223FE9C - add r0, r4, #0 - bl ov6_0223E3D8 - ldr r0, [r4, #0] - bl ov6_0223FF6C - cmp r0, #1 - bne _0223E4E4 - ldr r0, _0223E4E8 ; =0x0000065C - mov r1, #0 - bl sub_020057A4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - mov r0, #0x10 - str r0, [r4, #4] - b _0223E4E4 -_0223E4A0: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0 - bgt _0223E4E4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223E4E4 -_0223E4B2: - mov r0, #0x7f - mov r1, #0x10 - mov r2, #0 - bl sub_0200560C - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223E4E4 -_0223E4C4: - bl sub_02005684 - cmp r0, #0 - bne _0223E4E4 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - b _0223E4E4 -_0223E4D4: - ldr r0, [r4, #0] - bl ov6_0223FE08 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} -_0223E4E4: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0223E4E8: .word 0x0000065C - thumb_func_end ov6_0223E408 - - thumb_func_start ov6_0223E4EC -ov6_0223E4EC: ; 0x0223E4EC - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - bl sub_02050A60 - add r4, r0, #0 - mov r0, #4 - mov r1, #0x10 - bl sub_02018144 - add r5, r0, #0 - add r2, r5, #0 - mov r1, #0x10 - mov r0, #0 -_0223E508: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0223E508 - mov r0, #4 - bl ov6_0223FDE4 - str r0, [r5, #0] - mov r0, #0x18 - str r0, [sp] - ldr r0, [r4, #0x24] - mov r1, #1 - str r0, [sp, #4] - ldr r0, [r5, #0] - lsl r1, r1, #0xe - mov r2, #0 - mov r3, #1 - bl ov6_0223FE1C - ldr r0, [r5, #0] - bl ov6_0223FFF4 - str r0, [r5, #8] - ldr r1, _0223E544 ; =ov6_0223E408 - add r0, r6, #0 - add r2, r5, #0 - bl sub_02050944 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223E544: .word ov6_0223E408 - thumb_func_end ov6_0223E4EC - - thumb_func_start ov6_0223E548 -ov6_0223E548: ; 0x0223E548 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x78 - bl sub_020D5124 - mov r0, #4 - add r1, r5, #0 - bl ov6_02240104 - str r0, [r4, #0x48] - mov r0, #0 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov6_0223E548 - - thumb_func_start ov6_0223E568 -ov6_0223E568: ; 0x0223E568 - ldr r3, _0223E570 ; =ov6_022401B8 - ldr r0, [r2, #0x48] - bx r3 - nop -_0223E570: .word ov6_022401B8 - thumb_func_end ov6_0223E568 - - thumb_func_start ov6_0223E574 -ov6_0223E574: ; 0x0223E574 - push {r4, r5, r6, lr} - add r4, r2, #0 - ldr r0, [r4, #0] - add r5, r1, #0 - cmp r0, #0xb - bls _0223E582 - b _0223E6D2 -_0223E582: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E58E: ; jump table - .short _0223E5A6 - _0223E58E - 2 ; case 0 - .short _0223E5AA - _0223E58E - 2 ; case 1 - .short _0223E5B0 - _0223E58E - 2 ; case 2 - .short _0223E5C6 - _0223E58E - 2 ; case 3 - .short _0223E616 - _0223E58E - 2 ; case 4 - .short _0223E62E - _0223E58E - 2 ; case 5 - .short _0223E65E - _0223E58E - 2 ; case 6 - .short _0223E66E - _0223E58E - 2 ; case 7 - .short _0223E68A - _0223E58E - 2 ; case 8 - .short _0223E69E - _0223E58E - 2 ; case 9 - .short _0223E6B8 - _0223E58E - 2 ; case 10 - .short _0223E6D2 - _0223E58E - 2 ; case 11 -_0223E5A6: - add r0, r0, #1 - str r0, [r4, #0] -_0223E5AA: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_0223E5B0: - ldr r0, [r4, #0x48] - mov r1, #0 - bl ov6_022401D0 - mov r0, #0 - str r0, [r4, #4] - str r0, [r4, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E5C6: - ldr r0, [r4, #4] - mov r5, #0 - cmp r0, #0xc - beq _0223E5FC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #8 - blt _0223E5FE - ldr r2, [r4, #4] - mov r1, #0x1f - lsr r5, r2, #0x1f - lsl r3, r2, #0x1f - sub r3, r3, r5 - ror r3, r1 - ldr r0, [r4, #0x48] - add r1, r5, r3 - bl ov6_02240364 - add r5, r0, #0 - beq _0223E5FE - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _0223E5FE -_0223E5FC: - mov r5, #1 -_0223E5FE: - ldr r0, [r4, #0x48] - bl ov6_022405D0 - cmp r0, #0 - beq _0223E6D2 - cmp r5, #0 - beq _0223E6D2 - mov r0, #0 - str r0, [r4, #8] - mov r0, #4 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E616: - ldr r0, [r4, #0x48] - mov r1, #0 - mov r2, #0x3c - bl ov6_02240364 - cmp r0, #0 - beq _0223E6D2 - mov r0, #0 - str r0, [r4, #8] - mov r0, #0xb - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E62E: - add r0, r4, #0 - add r0, #0x6c - bl ov6_0223E71C - add r6, r0, #0 - ldr r0, [r4, #0x6c] - cmp r0, #3 - bne _0223E652 - ldr r0, [r4, #0x74] - bl ov6_02240060 - cmp r0, #0xd - bne _0223E652 - mov r0, #4 - add r1, r5, #0 - bl ov6_02240B9C - str r0, [r4, #0x54] -_0223E652: - cmp r6, #1 - bne _0223E6D2 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E65E: - add r0, r4, #0 - add r0, #0xc - bl ov6_0223E198 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E66E: - add r0, r4, #0 - add r0, #0xc - bl ov6_0223E140 - add r0, r4, #0 - add r0, #0xc - bl ov6_0223E1AC - cmp r0, #5 - bne _0223E6D2 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E68A: - ldr r0, [r4, #0x54] - mov r1, #0 - bl ov6_02240C44 - mov r0, #0x48 - str r0, [r4, #4] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0223E69E: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0 - bgt _0223E6B8 - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - bl ov6_0223E318 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_0223E6B8: - ldr r0, [r4, #0x54] - bl ov6_02240C7C - cmp r0, #1 - bne _0223E6D2 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov6_0223E318 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_0223E6D2: - pop {r4, r5, r6, pc} - thumb_func_end ov6_0223E574 - - thumb_func_start ov6_0223E6D4 -ov6_0223E6D4: ; 0x0223E6D4 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0x48] - bl ov6_02240228 - ldr r0, [r4, #0x54] - cmp r0, #0 - beq _0223E6E8 - bl ov6_02240C94 -_0223E6E8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223E6D4 - - thumb_func_start ov6_0223E6EC -ov6_0223E6EC: ; 0x0223E6EC - ldr r0, [r0, #4] - ldr r3, _0223E6F8 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _0223E6FC ; =0x02248E90 - bx r3 - nop -_0223E6F8: .word ov5_021D1B6C -_0223E6FC: .word 0x02248E90 - thumb_func_end ov6_0223E6EC - - thumb_func_start ov6_0223E700 -ov6_0223E700: ; 0x0223E700 - ldr r3, _0223E704 ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_0223E704: .word ov5_021D1BEC - thumb_func_end ov6_0223E700 - - thumb_func_start ov6_0223E708 -ov6_0223E708: ; 0x0223E708 - push {r3, lr} - bl ov5_021D1C2C - ldr r0, [r0, #0] - cmp r0, #0xb - bne _0223E718 - mov r0, #1 - pop {r3, pc} -_0223E718: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov6_0223E708 - - thumb_func_start ov6_0223E71C -ov6_0223E71C: ; 0x0223E71C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #4 - bhi _0223E7B0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223E732: ; jump table - .short _0223E73C - _0223E732 - 2 ; case 0 - .short _0223E74C - _0223E732 - 2 ; case 1 - .short _0223E764 - _0223E732 - 2 ; case 2 - .short _0223E784 - _0223E732 - 2 ; case 3 - .short _0223E7A4 - _0223E732 - 2 ; case 4 -_0223E73C: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - bpl _0223E7B0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223E7B0 -_0223E74C: - ldr r0, [r4, #8] - mov r1, #0xd - mov r2, #4 - mov r3, #8 - bl ov6_02240000 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0x10 - str r0, [r4, #4] - b _0223E7B0 -_0223E764: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - bpl _0223E7B0 - ldr r0, [r4, #8] - mov r1, #0xd - mov r2, #4 - mov r3, #8 - bl ov6_02240000 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0x10 - str r0, [r4, #4] - b _0223E7B0 -_0223E784: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - bpl _0223E7B0 - ldr r0, [r4, #8] - mov r1, #0xd - mov r2, #4 - mov r3, #0x20 - bl ov6_02240000 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0x28 - str r0, [r4, #4] - b _0223E7B0 -_0223E7A4: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - bpl _0223E7B0 - mov r0, #1 - pop {r4, pc} -_0223E7B0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_0223E71C - - thumb_func_start ov6_0223E7B4 -ov6_0223E7B4: ; 0x0223E7B4 - push {r4, r5, r6, lr} - ldr r0, [r1, #0x38] - mov r1, #0 - add r4, r2, #0 - bl sub_0206251C - add r5, r0, #0 - bne _0223E7C8 - bl sub_02022974 -_0223E7C8: - add r0, r5, #0 - bl sub_02063020 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - add r0, r5, #0 - bl sub_02063040 - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - mov r0, #4 - bl ov6_02240768 - add r1, r6, #0 - mov r2, #0 - add r3, r5, #0 - str r0, [r4, #0] - bl ov6_0224077C - pop {r4, r5, r6, pc} - thumb_func_end ov6_0223E7B4 - - thumb_func_start ov6_0223E7F0 -ov6_0223E7F0: ; 0x0223E7F0 - ldr r3, _0223E7F8 ; =ov6_02240774 - ldr r0, [r2, #0] - bx r3 - nop -_0223E7F8: .word ov6_02240774 - thumb_func_end ov6_0223E7F0 - - thumb_func_start ov6_0223E7FC -ov6_0223E7FC: ; 0x0223E7FC - ldr r3, _0223E804 ; =ov6_022407A8 - ldr r0, [r2, #0] - bx r3 - nop -_0223E804: .word ov6_022407A8 - thumb_func_end ov6_0223E7FC - - thumb_func_start ov6_0223E808 -ov6_0223E808: ; 0x0223E808 - ldr r3, _0223E810 ; =ov6_022407B0 - ldr r0, [r2, #0] - bx r3 - nop -_0223E810: .word ov6_022407B0 - thumb_func_end ov6_0223E808 - - thumb_func_start ov6_0223E814 -ov6_0223E814: ; 0x0223E814 - ldr r0, [r0, #4] - ldr r3, _0223E820 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _0223E824 ; =0x02248E78 - bx r3 - nop -_0223E820: .word ov5_021D1B6C -_0223E824: .word 0x02248E78 - thumb_func_end ov6_0223E814 - - thumb_func_start ov6_0223E828 -ov6_0223E828: ; 0x0223E828 - ldr r3, _0223E82C ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_0223E82C: .word ov5_021D1BEC - thumb_func_end ov6_0223E828 - - thumb_func_start ov6_0223E830 -ov6_0223E830: ; 0x0223E830 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r1, #0 - ldr r0, _0223E8B8 ; =0x00001701 - ldr r1, [r5, #0x24] - add r4, r2, #0 - bl sub_02020910 - ldr r0, _0223E8BC ; =0x000C8A55 - ldr r1, [r5, #0x24] - bl sub_02020A50 - ldr r0, _0223E8C0 ; =0x002280EF - str r0, [sp, #8] - ldr r0, _0223E8C4 ; =0x000CA424 - str r0, [sp, #0xc] - ldr r0, _0223E8C8 ; =0x00268C50 - str r0, [sp, #0x10] - ldr r1, [r5, #0x24] - add r0, sp, #8 - bl sub_02020ACC - ldr r1, _0223E8CC ; =0x000022A2 - add r0, sp, #0 - strh r1, [r0] - mov r1, #0x3e - lsl r1, r1, #0xa - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - ldr r1, [r5, #0x24] - add r0, sp, #0 - bl sub_020209D4 - mov r0, #2 - mov r1, #0x7d - ldr r2, [r5, #0x24] - lsl r0, r0, #0xc - lsl r1, r1, #0x10 - bl sub_020206BC - mov r0, #4 - bl ov6_022409F4 - str r0, [r4, #4] - mov r0, #4 - bl ov6_02240AC8 - str r0, [r4, #8] - ldr r1, [r5, #0x24] - add r0, sp, #8 - bl sub_02020AAC - ldr r0, [r4, #4] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl ov6_02240A18 - ldr r0, [r4, #8] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl ov6_02240AEC - add sp, #0x14 - pop {r4, r5, pc} - nop -_0223E8B8: .word 0x00001701 -_0223E8BC: .word 0x000C8A55 -_0223E8C0: .word 0x002280EF -_0223E8C4: .word 0x000CA424 -_0223E8C8: .word 0x00268C50 -_0223E8CC: .word 0x000022A2 - thumb_func_end ov6_0223E830 - - thumb_func_start ov6_0223E8D0 -ov6_0223E8D0: ; 0x0223E8D0 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r1, #0 - ldr r0, _0223E968 ; =0x00000F81 - ldr r1, [r5, #0x24] - add r4, r2, #0 - bl sub_02020910 - ldr r0, _0223E96C ; =0x0017E532 - ldr r1, [r5, #0x24] - bl sub_02020A50 - ldr r0, _0223E970 ; =0x00F99D58 - str r0, [sp, #8] - ldr r0, _0223E974 ; =0x000C5502 - str r0, [sp, #0xc] - ldr r0, _0223E978 ; =0x028CF549 - str r0, [sp, #0x10] - ldr r1, [r5, #0x24] - add r0, sp, #8 - bl sub_02020ACC - ldr r1, _0223E97C ; =0x00000642 - add r0, sp, #0 - strh r1, [r0] - ldr r1, _0223E980 ; =0x0000EDA0 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - ldr r1, [r5, #0x24] - add r0, sp, #0 - bl sub_020209D4 - mov r0, #0x16 - mov r1, #0x7d - ldr r2, [r5, #0x24] - lsl r0, r0, #0xe - lsl r1, r1, #0x10 - bl sub_020206BC - add r0, r5, #0 - add r0, #0x4c - bl ov5_021D5278 - ldr r0, [r5, #0x44] - mov r1, #3 - bl ov5_021D521C - str r0, [r5, #0x4c] - mov r0, #4 - bl ov6_022409F4 - str r0, [r4, #4] - mov r0, #4 - bl ov6_02240AC8 - str r0, [r4, #8] - ldr r1, [r5, #0x24] - add r0, sp, #8 - bl sub_02020AAC - ldr r0, [r4, #4] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl ov6_02240A50 - ldr r0, [r4, #8] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl ov6_02240B24 - add sp, #0x14 - pop {r4, r5, pc} - nop -_0223E968: .word 0x00000F81 -_0223E96C: .word 0x0017E532 -_0223E970: .word 0x00F99D58 -_0223E974: .word 0x000C5502 -_0223E978: .word 0x028CF549 -_0223E97C: .word 0x00000642 -_0223E980: .word 0x0000EDA0 - thumb_func_end ov6_0223E8D0 - - thumb_func_start ov6_0223E984 -ov6_0223E984: ; 0x0223E984 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r1, #0 - ldr r0, _0223EA1C ; =0x000004C1 - ldr r1, [r5, #0x24] - add r4, r2, #0 - bl sub_02020910 - ldr r0, _0223EA20 ; =0x0026BEC1 - ldr r1, [r5, #0x24] - bl sub_02020A50 - ldr r0, _0223EA24 ; =0x01DF5DFD - str r0, [sp, #8] - ldr r0, _0223EA28 ; =0x00073A0C - str r0, [sp, #0xc] - ldr r0, _0223EA2C ; =0x02B9F4A2 - str r0, [sp, #0x10] - ldr r1, [r5, #0x24] - add r0, sp, #8 - bl sub_02020ACC - ldr r1, _0223EA30 ; =0x000004C2 - add r0, sp, #0 - strh r1, [r0] - mov r1, #0x29 - lsl r1, r1, #6 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - ldr r1, [r5, #0x24] - add r0, sp, #0 - bl sub_020209D4 - mov r0, #0xb - ldr r1, _0223EA34 ; =0x005C8000 - ldr r2, [r5, #0x24] - lsl r0, r0, #0x10 - bl sub_020206BC - add r0, r5, #0 - add r0, #0x4c - bl ov5_021D5278 - ldr r0, [r5, #0x44] - mov r1, #3 - bl ov5_021D521C - str r0, [r5, #0x4c] - mov r0, #4 - bl ov6_022409F4 - str r0, [r4, #4] - mov r0, #4 - bl ov6_02240AC8 - str r0, [r4, #8] - ldr r1, [r5, #0x24] - add r0, sp, #8 - bl sub_02020AAC - ldr r0, [r4, #4] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl ov6_02240A8C - ldr r0, [r4, #8] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - bl ov6_02240B60 - add sp, #0x14 - pop {r4, r5, pc} - nop -_0223EA1C: .word 0x000004C1 -_0223EA20: .word 0x0026BEC1 -_0223EA24: .word 0x01DF5DFD -_0223EA28: .word 0x00073A0C -_0223EA2C: .word 0x02B9F4A2 -_0223EA30: .word 0x000004C2 -_0223EA34: .word 0x005C8000 - thumb_func_end ov6_0223E984 - - thumb_func_start ov6_0223EA38 -ov6_0223EA38: ; 0x0223EA38 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #4] - bl ov6_02240A00 - ldr r0, [r4, #8] - bl ov6_02240AD4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223EA38 - - thumb_func_start ov6_0223EA4C -ov6_0223EA4C: ; 0x0223EA4C - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #4] - bl ov6_02240A08 - ldr r0, [r4, #8] - bl ov6_02240ADC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223EA4C - - thumb_func_start ov6_0223EA60 -ov6_0223EA60: ; 0x0223EA60 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #4] - bl ov6_02240A10 - ldr r0, [r4, #8] - bl ov6_02240AE4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223EA60 - - thumb_func_start ov6_0223EA74 -ov6_0223EA74: ; 0x0223EA74 - lsl r2, r1, #2 - ldr r1, _0223EA88 ; =0x02248E2C - ldr r3, _0223EA8C ; =ov5_021D1B6C - ldr r2, [r1, r2] - ldr r1, _0223EA90 ; =0x02249860 - str r2, [r1, #8] - ldr r0, [r0, #4] - ldr r1, _0223EA94 ; =0x02249860 - ldr r0, [r0, #4] - bx r3 - ; .align 2, 0 -_0223EA88: .word 0x02248E2C -_0223EA8C: .word ov5_021D1B6C -_0223EA90: .word 0x02249860 -_0223EA94: .word 0x02249860 - thumb_func_end ov6_0223EA74 - - thumb_func_start ov6_0223EA98 -ov6_0223EA98: ; 0x0223EA98 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0xac - mov r1, #4 - bl sub_02006C24 - add r6, r0, #0 - ldr r0, [r5, #0x10] - ldr r2, _0223EB2C ; =0x02248E48 - lsl r4, r0, #3 - add r0, r5, #0 - ldr r2, [r2, r4] - add r0, #0x9c - add r1, r6, #0 - mov r3, #4 - bl sub_020170D8 - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x24 - add r1, #0x9c - bl sub_02017258 - mov r1, #0 - add r0, r5, #0 - add r0, #0x24 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02017350 - mov r1, #1 - lsl r1, r1, #0xc - add r0, r5, #0 - add r0, #0x24 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201736C - add r0, r5, #0 - add r0, #0x24 - mov r1, #1 - bl sub_02017348 - mov r0, #4 - str r0, [sp] - add r0, r5, #0 - ldr r3, _0223EB30 ; =0x02248E4C - add r0, #0xc0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r5, #0 - ldr r3, [r3, r4] - add r0, #0xac - add r1, #0x9c - add r2, r6, #0 - bl sub_02017164 - add r0, r5, #0 - add r0, #0xac - mov r1, #0 - bl sub_02017240 - add r0, r5, #0 - add r5, #0xac - add r0, #0x24 - add r1, r5, #0 - bl sub_0201727C - add r0, r6, #0 - bl sub_02006CA8 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223EB2C: .word 0x02248E48 -_0223EB30: .word 0x02248E4C - thumb_func_end ov6_0223EA98 - - thumb_func_start ov6_0223EB34 -ov6_0223EB34: ; 0x0223EB34 - push {r4, lr} - add r4, r0, #0 - add r0, #0x9c - bl sub_02017110 - add r0, r4, #0 - add r4, #0xc0 - add r0, #0xac - add r1, r4, #0 - bl sub_020171A0 - pop {r4, pc} - thumb_func_end ov6_0223EB34 - - thumb_func_start ov6_0223EB4C -ov6_0223EB4C: ; 0x0223EB4C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - add r0, r5, #0 - bl ov6_02240074 - str r0, [r4, #8] - mov r0, #0 - strh r0, [r4, #0xc] - str r0, [r4, #0x10] - str r0, [r4, #0x1c] - str r0, [r4, #0x14] - str r0, [r4, #0x18] - add r0, r4, #0 - mov r1, #0x1e - add r0, #0xd0 - str r1, [r0, #0] - add r0, r1, #0 - add r0, #0xe6 - add r1, #0xe6 - str r5, [r4, r0] - ldr r0, [r4, r1] - mov r1, #1 - ldr r0, [r0, #0x38] - bl sub_0206251C - mov r1, #0x42 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - mov r1, #0 - ldr r0, [r0, #0x38] - bl sub_0206251C - mov r1, #0x43 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #8 - ldr r0, [r4, r1] - bl sub_0205EF3C - bl sub_0205EB3C - mov r1, #0x11 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - add r0, #0xc0 - mov r1, #4 - mov r2, #0x20 - bl sub_020182CC - add r0, r4, #0 - bl ov6_0223EA98 - mov r1, #0xc - ldrsh r1, [r4, r1] - ldr r0, _0223EBCC ; =0x0400006C - bl sub_020BDEC4 - mov r0, #0 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223EBCC: .word 0x0400006C - thumb_func_end ov6_0223EB4C - - thumb_func_start ov6_0223EBD0 -ov6_0223EBD0: ; 0x0223EBD0 - ldr r3, _0223EBD8 ; =ov6_022400A8 - ldr r0, [r2, #8] - bx r3 - nop -_0223EBD8: .word ov6_022400A8 - thumb_func_end ov6_0223EBD0 - - thumb_func_start ov6_0223EBDC -ov6_0223EBDC: ; 0x0223EBDC - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r1, [r4, #0x18] - cmp r1, #5 - bgt _0223EC04 - cmp r1, #0 - blt _0223EC0A - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223EBF8: ; jump table - .short _0223EC0C - _0223EBF8 - 2 ; case 0 - .short _0223EC60 - _0223EBF8 - 2 ; case 1 - .short _0223ECD8 - _0223EBF8 - 2 ; case 2 - .short _0223ED1C - _0223EBF8 - 2 ; case 3 - .short _0223ED8E - _0223EBF8 - 2 ; case 4 - .short _0223EDD0 - _0223EBF8 - 2 ; case 5 -_0223EC04: - cmp r1, #0x63 - bne _0223EC0A - b _0223EE3C -_0223EC0A: - b _0223EE42 -_0223EC0C: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223EE54 ; =0x0023D000 - add r0, #0xd4 - str r1, [r0, #0] - mov r1, #0x5a - add r0, r4, #0 - lsl r1, r1, #0xe - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x14 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #0x14 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223EE4C -_0223EC60: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r2, sp, #0xc - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r1, r4, #0 - add r3, r4, #0 - add r1, #0xe4 - add r3, #0xf4 - add r6, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223ECBA - cmp r6, #0 - bne _0223ECBC -_0223ECBA: - b _0223EE4C -_0223ECBC: - mov r0, #4 - str r0, [sp] - mov r0, #0 - mov r1, #0x1e - str r0, [sp, #4] - lsl r1, r1, #4 - add r2, r0, #0 - mov r3, #0x64 - bl sub_020059D0 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223EE4C -_0223ECD8: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - mov r1, #0x6f - add r0, r4, #0 - lsl r1, r1, #0xe - add r0, #0xd4 - str r1, [r0, #0] - mov r1, #0x5a - add r0, r4, #0 - lsl r1, r1, #0xe - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x14 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223EE4C -_0223ED1C: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r1, [r0, #0] - lsl r0, r1, #3 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xd8 - ldr r2, [r1, #0] - lsl r1, r0, #1 - add r0, r0, r1 - add r1, r2, r0 - add r0, r4, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, r4, #0 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0xe4 - add r3, #0xd8 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223EE4C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223EE4C -_0223ED8E: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223EE58 ; =0x001FB000 - add r0, #0xd4 - str r1, [r0, #0] - mov r1, #0x5a - add r0, r4, #0 - lsl r1, r1, #0xe - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x14 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223EE4C -_0223EDD0: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - lsl r0, r0, #0x12 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xd8 - ldr r2, [r1, #0] - lsl r1, r0, #1 - add r0, r0, r1 - sub r1, r2, r0 - add r0, r4, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, r4, #0 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0xe4 - add r3, #0xd8 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223EE4C - mov r0, #0x63 - str r0, [r4, #0x18] - b _0223EE4C -_0223EE3C: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] -_0223EE42: - mov r0, #0 - str r0, [r4, #0x18] - add sp, #0x14 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0223EE4C: - mov r0, #0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_0223EE54: .word 0x0023D000 -_0223EE58: .word 0x001FB000 - thumb_func_end ov6_0223EBDC - - thumb_func_start ov6_0223EE5C -ov6_0223EE5C: ; 0x0223EE5C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r1, [r4, #0x18] - cmp r1, #0x63 - bgt _0223EEAA - blt _0223EE6C - b _0223F5A2 -_0223EE6C: - cmp r1, #0x14 - bls _0223EE74 - bl _0223F6CA -_0223EE74: - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223EE80: ; jump table - .short _0223EEB4 - _0223EE80 - 2 ; case 0 - .short _0223EF0C - _0223EE80 - 2 ; case 1 - .short _0223EF76 - _0223EE80 - 2 ; case 2 - .short _0223EFB6 - _0223EE80 - 2 ; case 3 - .short _0223F02A - _0223EE80 - 2 ; case 4 - .short _0223F048 - _0223EE80 - 2 ; case 5 - .short _0223F0B2 - _0223EE80 - 2 ; case 6 - .short _0223F10A - _0223EE80 - 2 ; case 7 - .short _0223F1B0 - _0223EE80 - 2 ; case 8 - .short _0223F1E6 - _0223EE80 - 2 ; case 9 - .short _0223F252 - _0223EE80 - 2 ; case 10 - .short _0223F2AA - _0223EE80 - 2 ; case 11 - .short _0223F338 - _0223EE80 - 2 ; case 12 - .short _0223F38C - _0223EE80 - 2 ; case 13 - .short _0223F40C - _0223EE80 - 2 ; case 14 - .short _0223F43E - _0223EE80 - 2 ; case 15 - .short _0223F474 - _0223EE80 - 2 ; case 16 - .short _0223F496 - _0223EE80 - 2 ; case 17 - .short _0223F4C6 - _0223EE80 - 2 ; case 18 - .short _0223F4CE - _0223EE80 - 2 ; case 19 - .short _0223F514 - _0223EE80 - 2 ; case 20 -_0223EEAA: - cmp r1, #0x64 - bne _0223EEB0 - b _0223F668 -_0223EEB0: - bl _0223F6CA -_0223EEB4: - add r1, r4, #0 - mov r0, #0 - add r1, #0xd0 - str r0, [r1, #0] - add r1, r4, #0 - ldr r2, _0223F19C ; =0x0022B000 - add r1, #0xd4 - str r2, [r1, #0] - add r1, r4, #0 - ldr r2, _0223F1A0 ; =0x0015B000 - add r1, #0xd8 - str r2, [r1, #0] - add r1, r4, #0 - add r1, #0xe0 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x20 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #0x20 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223EF0C: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r7, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, r4, #0 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r6, r4, #0 - add r1, r4, #0 - add r3, #0xf4 - add r6, #0xe0 - add r1, #0xe4 - add r0, r4, #0 - ldr r3, [r3, #0] - ldr r6, [r6, #0] - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - add r0, #0x24 - add r3, r3, r6 - bl sub_02017350 - cmp r5, #0 - beq _0223F020 - cmp r7, #0 - beq _0223F020 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223EF76: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F1A4 ; =0x001FB000 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F1A0 ; =0x0015B000 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x20 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223EFB6: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r1, [r0, #0] - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xd8 - ldr r2, [r1, #0] - lsl r1, r0, #1 - add r0, r0, r1 - add r1, r2, r0 - add r0, r4, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, r4, #0 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0xe4 - add r3, #0xd8 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - bne _0223F022 -_0223F020: - b _0223F6D4 -_0223F022: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F02A: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r3, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, #0xd8 - bl sub_02017358 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] -_0223F048: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r0, r4, #0 - add r0, #0xd0 - ldr r1, [r0, #0] - mov r0, #0xb - mul r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xd8 - add r3, r4, #0 - ldr r1, [r1, #0] - lsl r0, r0, #1 - sub r1, r1, r0 - add r0, r4, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, #0xd8 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0x40 - blt _0223F190 - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F0B2: - add r1, r4, #0 - mov r0, #0 - add r1, #0xd0 - str r0, [r1, #0] - add r1, r4, #0 - ldr r2, _0223F1A8 ; =0x001D1000 - add r1, #0xd4 - str r2, [r1, #0] - add r1, r4, #0 - ldr r2, _0223F1AC ; =0x001F2000 - add r1, #0xd8 - str r2, [r1, #0] - add r1, r4, #0 - add r1, #0xdc - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x20 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #0x20 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F10A: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xdc - add r3, r4, #0 - ldr r1, [r1, #0] - lsl r0, r0, #2 - sub r1, r1, r0 - add r0, r4, #0 - add r0, #0xdc - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0xe4 - ldr r2, [r1, #0] - add r1, r4, #0 - add r1, #0xdc - ldr r1, [r1, #0] - add r3, #0xf4 - add r0, r4, #0 - add r1, r2, r1 - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223F190 - cmp r6, #0 - bne _0223F192 -_0223F190: - b _0223F6D4 -_0223F192: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 - nop -_0223F19C: .word 0x0022B000 -_0223F1A0: .word 0x0015B000 -_0223F1A4: .word 0x001FB000 -_0223F1A8: .word 0x001D1000 -_0223F1AC: .word 0x001F2000 -_0223F1B0: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_0206296C - mov r0, #0x11 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02065638 - add r0, r4, #0 - add r3, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, #0xd8 - bl sub_02017358 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] -_0223F1E6: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r0, r4, #0 - add r0, #0xd0 - ldr r1, [r0, #0] - mov r0, #0xb - mul r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xd8 - ldr r1, [r1, #0] - add r3, r4, #0 - add r1, r1, r0 - add r0, r4, #0 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, #0xd8 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0x20 - blt _0223F32E - mov r0, #1 - str r0, [r4, #0x1c] - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F252: - add r1, r4, #0 - mov r0, #0 - add r1, #0xd0 - str r0, [r1, #0] - add r1, r4, #0 - ldr r2, _0223F5B0 ; =0x001F7000 - add r1, #0xd4 - str r2, [r1, #0] - add r1, r4, #0 - ldr r2, _0223F5B4 ; =0x001F9000 - add r1, #0xd8 - str r2, [r1, #0] - add r1, r4, #0 - add r1, #0xe0 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x20 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #0x20 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F2AA: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r7, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r1, [r0, #0] - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xe0 - add r3, r4, #0 - add r6, r4, #0 - ldr r1, [r1, #0] - lsl r0, r0, #1 - add r1, r1, r0 - add r0, r4, #0 - add r0, #0xe0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, #0xf4 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r1, r4, #0 - add r6, #0xe0 - add r1, #0xe4 - add r0, r4, #0 - ldr r3, [r3, #0] - ldr r6, [r6, #0] - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - add r0, #0x24 - add r3, r3, r6 - bl sub_02017350 - cmp r5, #0 - beq _0223F32E - cmp r7, #0 - bne _0223F330 -_0223F32E: - b _0223F6D4 -_0223F330: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F338: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F5B0 ; =0x001F7000 - add r0, #0xd4 - str r1, [r0, #0] - mov r1, #0x79 - add r0, r4, #0 - lsl r1, r1, #0xe - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #8 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #8 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F38C: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r6, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #4 - blt _0223F3E6 - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0x10 - bge _0223F3E6 - add r0, r0, #2 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223F5B8 ; =0x0400006C - bl sub_020BDEC4 -_0223F3E6: - add r1, r4, #0 - add r3, r4, #0 - add r1, #0xe4 - add r3, #0xf4 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r6, #0 - beq _0223F48C - cmp r5, #0 - beq _0223F48C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F40C: - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0x10 - bge _0223F422 - add r0, r0, #2 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223F5B8 ; =0x0400006C - bl sub_020BDEC4 - b _0223F6D4 -_0223F422: - add r1, #0xfc - ldr r0, [r4, r1] - mov r1, #0 - bl sub_02062D64 - add r0, r4, #0 - add r0, #0x24 - mov r1, #0 - bl sub_02017348 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F43E: - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0 - ble _0223F454 - sub r0, r0, #1 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223F5B8 ; =0x0400006C - bl sub_020BDEC4 - b _0223F6D4 -_0223F454: - add r1, r4, #0 - mov r0, #0 - add r1, #0xd0 - str r0, [r1, #0] - mov r1, #4 - str r1, [sp] - ldr r1, _0223F5BC ; =0x000001E1 - str r0, [sp, #4] - add r2, r0, #0 - mov r3, #0x64 - bl sub_020059D0 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F474: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0x3c - bge _0223F48E -_0223F48C: - b _0223F6D4 -_0223F48E: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F496: - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0x10 - bge _0223F4AC - add r0, r0, #2 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223F5B8 ; =0x0400006C - bl sub_020BDEC4 - b _0223F6D4 -_0223F4AC: - add r1, #0xfc - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02062D64 - add r0, r4, #0 - add r0, #0x24 - mov r1, #1 - bl sub_02017348 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] -_0223F4C6: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F4CE: - add r0, r4, #0 - mov r2, #0 - add r0, #0xd0 - str r2, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F5C0 ; =0x0015D000 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xdc - str r2, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r0, r4, #0 - add r2, r4, #0 - ldr r1, [sp, #0x10] - add r0, #0xd4 - str r1, [r0, #0] - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #0x20 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F514: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0 - ble _0223F554 - sub r0, r0, #1 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223F5B8 ; =0x0400006C - bl sub_020BDEC4 -_0223F554: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - add r1, r4, #0 - add r1, #0xdc - ldr r1, [r1, #0] - lsl r0, r0, #3 - add r1, r1, r0 - add r0, r4, #0 - add r0, #0xdc - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0xd4 - ldr r2, [r1, #0] - add r1, r4, #0 - add r1, #0xdc - ldr r1, [r1, #0] - add r3, r4, #0 - add r3, #0xf4 - add r0, r4, #0 - add r1, r2, r1 - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - bne _0223F59C - b _0223F6D4 -_0223F59C: - mov r0, #0x63 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F5A2: - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - ldr r0, [r4, #0x10] - lsl r1, r0, #3 - ldr r0, _0223F5C4 ; =0x02248EA8 - b _0223F5C8 - ; .align 2, 0 -_0223F5B0: .word 0x001F7000 -_0223F5B4: .word 0x001F9000 -_0223F5B8: .word 0x0400006C -_0223F5BC: .word 0x000001E1 -_0223F5C0: .word 0x0015D000 -_0223F5C4: .word 0x02248EA8 -_0223F5C8: - ldr r0, [r0, r1] - cmp r0, #0 - ble _0223F5E0 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0223F5EE -_0223F5E0: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0223F5EE: - bl sub_020E1740 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] - ldr r0, [r4, #0x10] - lsl r1, r0, #3 - ldr r0, _0223F740 ; =0x02248EAC - ldr r0, [r0, r1] - cmp r0, #0 - ble _0223F616 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0223F624 -_0223F616: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0223F624: - bl sub_020E1740 - add r1, r4, #0 - add r1, #0xd8 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #0x14 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #0x14 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F668: - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, r4, #0 - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0xe4 - add r3, #0xf4 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223F6D4 - cmp r6, #0 - beq _0223F6D4 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F6D4 -_0223F6CA: - mov r0, #0 - str r0, [r4, #0x18] - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223F6D4: - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0223F738 - cmp r0, #0x14 - bne _0223F6F6 - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0206296C - mov r0, #0x11 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02065638 -_0223F6F6: - ldr r0, [r4, #0x1c] - cmp r0, #0x28 - bne _0223F714 - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_0206296C - mov r0, #0x11 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #3 - bl sub_02065638 -_0223F714: - ldr r0, [r4, #0x1c] - cmp r0, #0x32 - bne _0223F732 - mov r0, #0x43 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0206296C - mov r0, #0x11 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02065638 -_0223F732: - ldr r0, [r4, #0x1c] - add r0, r0, #1 - str r0, [r4, #0x1c] -_0223F738: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223F740: .word 0x02248EAC - thumb_func_end ov6_0223EE5C - - thumb_func_start ov6_0223F744 -ov6_0223F744: ; 0x0223F744 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r1, [r4, #0x18] - cmp r1, #6 - bgt _0223F76E - cmp r1, #0 - blt _0223F774 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223F760: ; jump table - .short _0223F776 - _0223F760 - 2 ; case 0 - .short _0223F7C8 - _0223F760 - 2 ; case 1 - .short _0223F82A - _0223F760 - 2 ; case 2 - .short _0223F87C - _0223F760 - 2 ; case 3 - .short _0223F8F2 - _0223F760 - 2 ; case 4 - .short _0223F946 - _0223F760 - 2 ; case 5 - .short _0223F9A8 - _0223F760 - 2 ; case 6 -_0223F76E: - cmp r1, #0x63 - bne _0223F774 - b _0223F9C6 -_0223F774: - b _0223F9CC -_0223F776: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F9DC ; =0x0025E000 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F9E0 ; =0x00172000 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #8 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #8 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F7C8: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r2, sp, #0xc - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r1, r4, #0 - add r3, r4, #0 - add r1, #0xe4 - add r3, #0xf4 - add r6, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223F8D2 - cmp r6, #0 - beq _0223F8D2 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F82A: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F9E4 ; =0x001B6000 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F9E8 ; =0x001BA000 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #8 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #8 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F87C: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r2, sp, #0xc - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r1, r4, #0 - add r3, r4, #0 - add r1, #0xe4 - add r3, #0xf4 - add r6, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - bne _0223F8D4 -_0223F8D2: - b _0223F9D6 -_0223F8D4: - cmp r6, #0 - beq _0223F9D6 - mov r0, #4 - str r0, [sp] - mov r0, #0 - ldr r1, _0223F9EC ; =0x000001E2 - str r0, [sp, #4] - add r2, r0, #0 - mov r3, #0x64 - bl sub_020059D0 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F8F2: - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - mov r1, #0x7e - add r0, r4, #0 - lsl r1, r1, #0xe - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223F9F0 ; =0x00151000 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r2, sp, #0xc - add r3, sp, #8 - bl sub_02017358 - add r2, r4, #0 - add r2, #0xd4 - add r0, r4, #0 - ldr r1, [sp, #0x10] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #8 - bl ov6_0223FD0C - add r2, r4, #0 - add r2, #0xd8 - add r0, r4, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #8 - bl ov6_0223FD0C - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F946: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r2, sp, #0xc - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x24 - add r1, sp, #0x10 - add r3, sp, #8 - bl sub_02017358 - add r1, r4, #0 - add r1, #0xd0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r4, #0 - add r1, #0xd0 - add r5, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r1, r4, #0 - add r3, r4, #0 - add r1, #0xe4 - add r3, #0xf4 - add r6, r0, #0 - add r0, r4, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #0xc] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r5, #0 - beq _0223F9D6 - cmp r6, #0 - beq _0223F9D6 - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F9A8: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0xf - ble _0223F9D6 - mov r0, #0x63 - str r0, [r4, #0x18] - b _0223F9D6 -_0223F9C6: - ldr r0, [r4, #0x18] - add r0, r0, #1 - str r0, [r4, #0x18] -_0223F9CC: - mov r0, #0 - str r0, [r4, #0x18] - add sp, #0x14 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0223F9D6: - mov r0, #0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223F9DC: .word 0x0025E000 -_0223F9E0: .word 0x00172000 -_0223F9E4: .word 0x001B6000 -_0223F9E8: .word 0x001BA000 -_0223F9EC: .word 0x000001E2 -_0223F9F0: .word 0x00151000 - thumb_func_end ov6_0223F744 - - thumb_func_start ov6_0223F9F4 -ov6_0223F9F4: ; 0x0223F9F4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r1, [r5, #0x14] - cmp r1, #0 - beq _0223FA0A - cmp r1, #1 - beq _0223FA36 - cmp r1, #2 - beq _0223FA88 - b _0223FAE8 -_0223FA0A: - ldr r1, [r5, #0x10] - cmp r1, #0 - beq _0223FA1A - cmp r1, #1 - beq _0223FA20 - cmp r1, #2 - beq _0223FA26 - b _0223FA2A -_0223FA1A: - bl ov6_0223EBDC - b _0223FA2A -_0223FA20: - bl ov6_0223F744 - b _0223FA2A -_0223FA26: - bl ov6_0223EE5C -_0223FA2A: - cmp r0, #0 - beq _0223FAEE - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - b _0223FAEE -_0223FA36: - mov r1, #0x7e - lsl r1, r1, #0xe - add r0, #0xd4 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, _0223FAF4 ; =0x001B7000 - add r0, #0xd8 - str r1, [r0, #0] - add r0, r5, #0 - mov r1, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0x24 - add r1, sp, #8 - add r2, sp, #4 - add r3, sp, #0 - bl sub_02017358 - add r2, r5, #0 - add r2, #0xd4 - add r0, r5, #0 - ldr r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0xe4 - mov r3, #6 - bl ov6_0223FD0C - add r2, r5, #0 - add r2, #0xd8 - add r0, r5, #0 - ldr r1, [sp] - ldr r2, [r2, #0] - add r0, #0xf4 - mov r3, #6 - bl ov6_0223FD0C - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - b _0223FAEE -_0223FA88: - add r0, #0x24 - add r1, sp, #8 - add r2, sp, #4 - add r3, sp, #0 - bl sub_02017358 - add r1, r5, #0 - add r1, #0xd0 - add r0, r5, #0 - ldr r1, [r1, #0] - add r0, #0xe4 - bl ov6_0223FD18 - add r1, r5, #0 - add r1, #0xd0 - add r4, r0, #0 - add r0, r5, #0 - ldr r1, [r1, #0] - add r0, #0xf4 - bl ov6_0223FD18 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r3, r5, #0 - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r1, r5, #0 - add r1, #0xe4 - add r3, #0xf4 - add r0, r5, #0 - ldr r1, [r1, #0] - ldr r2, [sp, #4] - ldr r3, [r3, #0] - add r0, #0x24 - bl sub_02017350 - cmp r4, #0 - beq _0223FAEE - cmp r6, #0 - beq _0223FAEE - ldr r0, [r5, #0x14] - add r0, r0, #1 - str r0, [r5, #0x14] - b _0223FAEE -_0223FAE8: - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0223FAEE: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223FAF4: .word 0x001B7000 - thumb_func_end ov6_0223F9F4 - - thumb_func_start ov6_0223FAF8 -ov6_0223FAF8: ; 0x0223FAF8 - push {r3, r4, r5, lr} - sub sp, #0x28 - ldr r5, _0223FCAC ; =0x02248E20 - add r3, r1, #0 - ldmia r5!, {r0, r1} - add r4, r2, #0 - add r2, sp, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r2, #0] - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223FB1C - cmp r0, #1 - beq _0223FBAE - cmp r0, #2 - beq _0223FBF8 - b _0223FC40 -_0223FB1C: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223FB36 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - b _0223FC74 -_0223FB36: - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0 - ble _0223FB4C - sub r0, r0, #1 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223FCB0 ; =0x0400006C - bl sub_020BDEC4 - b _0223FC74 -_0223FB4C: - ldr r1, [r3, #0x24] - add r0, sp, #0x1c - bl sub_02020AAC - ldr r5, _0223FCB4 ; =0x02248E14 - add r3, sp, #4 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r0, [r4, #0x10] - lsl r0, r0, #2 - ldr r0, [r2, r0] - cmp r0, #0 - ble _0223FB7E - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0223FB8C -_0223FB7E: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0223FB8C: - bl sub_020E1740 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0x63 - mov r3, #5 - add r0, #0x24 - lsl r2, r2, #0xc - lsl r3, r3, #0x12 - bl sub_02017350 - mov r0, #0 - str r0, [r4, #0x20] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223FC74 -_0223FBAE: - add r0, r4, #0 - bl ov6_0223F9F4 - cmp r0, #0 - beq _0223FBCA - ldr r0, _0223FCB8 ; =0x000006D6 - bl sub_02005748 - mov r0, #0 - str r0, [r4, #0x20] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223FBF8 -_0223FBCA: - ldr r0, [r4, #0x20] - add r2, r0, #1 - str r2, [r4, #0x20] - ldr r0, [r4, #0x10] - lsl r1, r0, #2 - add r0, sp, #0x10 - ldr r0, [r0, r1] - cmp r0, r2 - bge _0223FC74 - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0x10 - beq _0223FBF2 - add r0, r0, #2 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223FCB0 ; =0x0400006C - bl sub_020BDEC4 - b _0223FC74 -_0223FBF2: - mov r0, #0 - str r0, [r4, #0x20] - b _0223FC74 -_0223FBF8: - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0x10 - beq _0223FC0E - add r0, r0, #2 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223FCB0 ; =0x0400006C - bl sub_020BDEC4 - b _0223FC74 -_0223FC0E: - ldr r0, [r4, #0x10] - mov r1, #0x1e - add r0, r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - bl ov6_0223EB34 - ldr r0, [r4, #0x10] - cmp r0, #3 - beq _0223FC38 - add r0, r4, #0 - bl ov6_0223EA98 - mov r0, #0 - str r0, [r4, #0] - b _0223FC74 -_0223FC38: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223FC74 -_0223FC40: - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223FC5A - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xd0 - str r1, [r0, #0] - b _0223FC74 -_0223FC5A: - mov r1, #0xc - ldrsh r0, [r4, r1] - cmp r0, #0 - ble _0223FC70 - sub r0, r0, #1 - strh r0, [r4, #0xc] - ldrsh r1, [r4, r1] - ldr r0, _0223FCB0 ; =0x0400006C - bl sub_020BDEC4 - b _0223FC74 -_0223FC70: - mov r0, #6 - str r0, [r4, #0] -_0223FC74: - ldr r0, [r4, #0x10] - cmp r0, #3 - beq _0223FCA8 - ldr r1, _0223FCBC ; =0x04000454 - mov r0, #0 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xac - lsr r1, r1, #0xe - bl sub_020171CC - mov r1, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - add r4, #0x24 - add r0, r4, #0 - bl sub_02017294 - mov r2, #1 - mov r0, #0x12 - add r1, sp, #0 - str r2, [sp] - bl sub_020B275C -_0223FCA8: - add sp, #0x28 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223FCAC: .word 0x02248E20 -_0223FCB0: .word 0x0400006C -_0223FCB4: .word 0x02248E14 -_0223FCB8: .word 0x000006D6 -_0223FCBC: .word 0x04000454 - thumb_func_end ov6_0223FAF8 - - thumb_func_start ov6_0223FCC0 -ov6_0223FCC0: ; 0x0223FCC0 - ldr r3, _0223FCC8 ; =ov6_022400C4 - ldr r0, [r2, #8] - bx r3 - nop -_0223FCC8: .word ov6_022400C4 - thumb_func_end ov6_0223FCC0 - - thumb_func_start ov6_0223FCCC -ov6_0223FCCC: ; 0x0223FCCC - ldr r0, [r0, #4] - ldr r3, _0223FCD8 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _0223FCDC ; =0x02248E60 - bx r3 - nop -_0223FCD8: .word ov5_021D1B6C -_0223FCDC: .word 0x02248E60 - thumb_func_end ov6_0223FCCC - - thumb_func_start ov6_0223FCE0 -ov6_0223FCE0: ; 0x0223FCE0 - ldr r3, _0223FCE4 ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_0223FCE4: .word ov5_021D1BEC - thumb_func_end ov6_0223FCE0 - - thumb_func_start ov6_0223FCE8 -ov6_0223FCE8: ; 0x0223FCE8 - push {r3, lr} - bl ov5_021D1C2C - mov r1, #3 - str r1, [r0, #0] - pop {r3, pc} - thumb_func_end ov6_0223FCE8 - - thumb_func_start ov6_0223FCF4 -ov6_0223FCF4: ; 0x0223FCF4 - push {r3, lr} - bl ov5_021D1C2C - ldr r0, [r0, #0] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_0223FCF4 - - thumb_func_start ov6_0223FD00 -ov6_0223FD00: ; 0x0223FD00 - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0xc] - bx lr - thumb_func_end ov6_0223FD00 - - thumb_func_start ov6_0223FD0C -ov6_0223FD0C: ; 0x0223FD0C - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0xc] - bx lr - thumb_func_end ov6_0223FD0C - - thumb_func_start ov6_0223FD18 -ov6_0223FD18: ; 0x0223FD18 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r4, [r5, #0xc] - add r2, r1, #0 - cmp r2, r4 - blt _0223FD2A - add r2, r4, #0 - mov r6, #1 - b _0223FD2C -_0223FD2A: - mov r6, #0 -_0223FD2C: - ldr r0, [r5, #8] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - lsl r1, r4, #0xc - bl sub_020BCFD0 - ldr r1, [r5, #4] - add r0, r0, r1 - str r0, [r5, #0] - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_0223FD18 - - thumb_func_start ov6_0223FD58 -ov6_0223FD58: ; 0x0223FD58 - push {r3, lr} - bl sub_020170BC - pop {r3, pc} - thumb_func_end ov6_0223FD58 - - thumb_func_start ov6_0223FD60 -ov6_0223FD60: ; 0x0223FD60 - push {r3, lr} - bl sub_020170D8 - pop {r3, pc} - thumb_func_end ov6_0223FD60 - - thumb_func_start ov6_0223FD68 -ov6_0223FD68: ; 0x0223FD68 - ldr r3, _0223FD6C ; =sub_02017110 - bx r3 - ; .align 2, 0 -_0223FD6C: .word sub_02017110 - thumb_func_end ov6_0223FD68 - - thumb_func_start ov6_0223FD70 -ov6_0223FD70: ; 0x0223FD70 - push {r4, lr} - sub sp, #8 - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r4, [sp, #0x14] - str r4, [sp, #4] - bl sub_02017164 - add sp, #8 - pop {r4, pc} - thumb_func_end ov6_0223FD70 - - thumb_func_start ov6_0223FD84 -ov6_0223FD84: ; 0x0223FD84 - ldr r3, _0223FD88 ; =sub_020171A0 - bx r3 - ; .align 2, 0 -_0223FD88: .word sub_020171A0 - thumb_func_end ov6_0223FD84 - - thumb_func_start ov6_0223FD8C -ov6_0223FD8C: ; 0x0223FD8C - ldr r3, _0223FD94 ; =sub_020171CC - mov r1, #1 - lsl r1, r1, #0xc - bx r3 - ; .align 2, 0 -_0223FD94: .word sub_020171CC - thumb_func_end ov6_0223FD8C - - thumb_func_start ov6_0223FD98 -ov6_0223FD98: ; 0x0223FD98 - ldr r3, _0223FDA0 ; =sub_02017204 - mov r1, #1 - lsl r1, r1, #0xc - bx r3 - ; .align 2, 0 -_0223FDA0: .word sub_02017204 - thumb_func_end ov6_0223FD98 - - thumb_func_start ov6_0223FDA4 -ov6_0223FDA4: ; 0x0223FDA4 - ldr r3, _0223FDA8 ; =sub_02017240 - bx r3 - ; .align 2, 0 -_0223FDA8: .word sub_02017240 - thumb_func_end ov6_0223FDA4 - - thumb_func_start ov6_0223FDAC -ov6_0223FDAC: ; 0x0223FDAC - ldr r3, _0223FDB0 ; =sub_02017258 - bx r3 - ; .align 2, 0 -_0223FDB0: .word sub_02017258 - thumb_func_end ov6_0223FDAC - - thumb_func_start ov6_0223FDB4 -ov6_0223FDB4: ; 0x0223FDB4 - ldr r3, _0223FDB8 ; =sub_0201727C - bx r3 - ; .align 2, 0 -_0223FDB8: .word sub_0201727C - thumb_func_end ov6_0223FDB4 - - thumb_func_start ov6_0223FDBC -ov6_0223FDBC: ; 0x0223FDBC - ldr r3, _0223FDC0 ; =sub_02017294 - bx r3 - ; .align 2, 0 -_0223FDC0: .word sub_02017294 - thumb_func_end ov6_0223FDBC - - thumb_func_start ov6_0223FDC4 -ov6_0223FDC4: ; 0x0223FDC4 - ldr r3, _0223FDC8 ; =sub_02017348 - bx r3 - ; .align 2, 0 -_0223FDC8: .word sub_02017348 - thumb_func_end ov6_0223FDC4 - - thumb_func_start ov6_0223FDCC -ov6_0223FDCC: ; 0x0223FDCC - push {r3, lr} - bl sub_02017350 - pop {r3, pc} - thumb_func_end ov6_0223FDCC - - thumb_func_start ov6_0223FDD4 -ov6_0223FDD4: ; 0x0223FDD4 - push {r3, lr} - bl sub_0201736C - pop {r3, pc} - thumb_func_end ov6_0223FDD4 - - thumb_func_start ov6_0223FDDC -ov6_0223FDDC: ; 0x0223FDDC - ldr r3, _0223FDE0 ; =sub_02017388 - bx r3 - ; .align 2, 0 -_0223FDE0: .word sub_02017388 - thumb_func_end ov6_0223FDDC - - thumb_func_start ov6_0223FDE4 -ov6_0223FDE4: ; 0x0223FDE4 - push {r3, r4, r5, lr} - mov r1, #0x4c - add r5, r0, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x4c - add r4, r0, #0 - bl sub_020D5124 - add r0, r5, #0 - bl sub_020203AC - str r0, [r4, #0] - mov r0, #5 - str r0, [r4, #0x40] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov6_0223FDE4 - - thumb_func_start ov6_0223FE08 -ov6_0223FE08: ; 0x0223FE08 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020203B8 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0223FE08 - - thumb_func_start ov6_0223FE1C -ov6_0223FE1C: ; 0x0223FE1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp] - add r4, r3, #0 - bl ov6_0223FF7C - ldr r0, [sp, #0x2c] - ldr r1, [r5, #0] - bl sub_020203C0 - ldr r1, [sp, #0x2c] - add r0, sp, #4 - bl sub_02020AAC - add r3, sp, #4 - add r2, r5, #0 - add r2, #0x28 - ldmia r3!, {r0, r1} - add r6, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, r6, #0 - str r0, [r2, #0] - add r2, r5, #0 - ldmia r3!, {r0, r1} - add r2, #0x34 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [r5, #0] - add r0, r6, #0 - bl sub_02020690 - ldr r0, [r5, #0] - bl sub_020203D4 - ldr r0, [sp, #0x2c] - mov r1, #0 - str r0, [r5, #4] - add r0, r5, #0 - add r0, #8 - add r2, r7, #0 - add r3, r4, #0 - bl ov6_0223FD0C - add r0, r5, #0 - ldr r2, [sp] - add r0, #0x18 - mov r1, #0 - add r3, r4, #0 - bl ov6_0223FD0C - ldr r0, [sp, #0x28] - str r0, [r5, #0x48] - ldr r0, _0223FE98 ; =0x000006D5 - bl sub_02005748 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FE98: .word 0x000006D5 - thumb_func_end ov6_0223FE1C - - thumb_func_start ov6_0223FE9C -ov6_0223FE9C: ; 0x0223FE9C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r1, [r4, #0x40] - cmp r1, #5 - bhi _0223FF68 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223FEB2: ; jump table - .short _0223FEBE - _0223FEB2 - 2 ; case 0 - .short _0223FEE0 - _0223FEB2 - 2 ; case 1 - .short _0223FF02 - _0223FEB2 - 2 ; case 2 - .short _0223FF28 - _0223FEB2 - 2 ; case 3 - .short _0223FF5C - _0223FEB2 - 2 ; case 4 - .short _0223FF68 - _0223FEB2 - 2 ; case 5 -_0223FEBE: - ldr r1, [r4, #0x44] - add r1, r1, #1 - str r1, [r4, #0x44] - bl ov6_0223FFC8 - add r5, r0, #0 - ldr r1, [r4, #8] - ldr r2, [r4, #0x18] - add r0, r4, #0 - bl ov6_0223FFE4 - cmp r5, #1 - bne _0223FF68 - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - pop {r3, r4, r5, pc} -_0223FEE0: - ldr r1, [r4, #0x44] - sub r1, r1, #1 - str r1, [r4, #0x44] - bl ov6_0223FFC8 - ldr r1, [r4, #8] - ldr r2, [r4, #0x18] - add r0, r4, #0 - bl ov6_0223FFE4 - ldr r0, [r4, #0x44] - cmp r0, #0 - bne _0223FF68 - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - pop {r3, r4, r5, pc} -_0223FF02: - ldr r1, [r4, #0x44] - add r1, r1, #1 - str r1, [r4, #0x44] - bl ov6_0223FFC8 - ldr r1, [r4, #8] - ldr r2, [r4, #0x18] - add r5, r0, #0 - add r0, r4, #0 - neg r1, r1 - neg r2, r2 - bl ov6_0223FFE4 - cmp r5, #1 - bne _0223FF68 - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - pop {r3, r4, r5, pc} -_0223FF28: - ldr r1, [r4, #0x44] - sub r1, r1, #1 - str r1, [r4, #0x44] - bl ov6_0223FFC8 - ldr r1, [r4, #8] - ldr r2, [r4, #0x18] - add r0, r4, #0 - neg r1, r1 - neg r2, r2 - bl ov6_0223FFE4 - ldr r0, [r4, #0x44] - cmp r0, #0 - bne _0223FF68 - ldr r0, [r4, #0x48] - sub r0, r0, #1 - str r0, [r4, #0x48] - beq _0223FF54 - mov r0, #0 - str r0, [r4, #0x40] - pop {r3, r4, r5, pc} -_0223FF54: - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] - pop {r3, r4, r5, pc} -_0223FF5C: - ldr r0, [r4, #4] - bl sub_020203D4 - ldr r0, [r4, #0x40] - add r0, r0, #1 - str r0, [r4, #0x40] -_0223FF68: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_0223FE9C - - thumb_func_start ov6_0223FF6C -ov6_0223FF6C: ; 0x0223FF6C - ldr r0, [r0, #0x40] - cmp r0, #5 - bne _0223FF76 - mov r0, #1 - bx lr -_0223FF76: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov6_0223FF6C - - thumb_func_start ov6_0223FF7C -ov6_0223FF7C: ; 0x0223FF7C - add r3, r0, #0 - add r3, #8 - mov r2, #0x10 - mov r1, #0 -_0223FF84: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _0223FF84 - add r3, r0, #0 - add r3, #0x18 - mov r2, #0x10 - mov r1, #0 -_0223FF94: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _0223FF94 - add r1, r0, #0 - add r3, r0, #0 - mov r2, #0 - add r1, #0x28 - add r3, #0x28 - strb r2, [r1] - strb r2, [r3, #1] - strb r2, [r3, #2] - strb r2, [r3, #3] - strb r2, [r3, #4] - strb r2, [r3, #5] - strb r2, [r3, #6] - strb r2, [r3, #7] - strb r2, [r3, #8] - strb r2, [r3, #9] - strb r2, [r3, #0xa] - strb r2, [r3, #0xb] - str r2, [r0, #0x40] - str r2, [r0, #0x44] - str r2, [r0, #0x48] - bx lr - ; .align 2, 0 - thumb_func_end ov6_0223FF7C - - thumb_func_start ov6_0223FFC8 -ov6_0223FFC8: ; 0x0223FFC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0x44] - add r0, #8 - bl ov6_0223FD18 - add r4, r0, #0 - add r0, r5, #0 - ldr r1, [r5, #0x44] - add r0, #0x18 - bl ov6_0223FD18 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov6_0223FFC8 - - thumb_func_start ov6_0223FFE4 -ov6_0223FFE4: ; 0x0223FFE4 - ldr r3, [r0, #0x34] - add r1, r3, r1 - str r1, [r0, #0x28] - ldr r1, [r0, #0x38] - add r1, r1, r2 - str r1, [r0, #0x2c] - bx lr - ; .align 2, 0 - thumb_func_end ov6_0223FFE4 - - thumb_func_start ov6_0223FFF4 -ov6_0223FFF4: ; 0x0223FFF4 - ldr r0, [r0, #0x48] - bx lr - thumb_func_end ov6_0223FFF4 - - thumb_func_start ov6_0223FFF8 -ov6_0223FFF8: ; 0x0223FFF8 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov6_0223FFF8 - - thumb_func_start ov6_0223FFFC -ov6_0223FFFC: ; 0x0223FFFC - str r1, [r0, #0x10] - bx lr - thumb_func_end ov6_0223FFFC - - thumb_func_start ov6_02240000 -ov6_02240000: ; 0x02240000 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x1c] - add r4, r1, #0 - add r7, r2, #0 - add r6, r3, #0 - cmp r0, #3 - beq _0224001E - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _0224001E - bl sub_0200DA58 - mov r0, #0 - str r0, [r5, #0x20] -_0224001E: - add r0, r5, #0 - mov r1, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov6_0223FD00 - mov r0, #0 - str r0, [r5, #0x10] - str r0, [r5, #0x1c] - str r6, [r5, #0x18] - str r4, [r5, #0x14] - ldr r0, _02240054 ; =0x0400006C - ldr r1, [r5, #0] - bl sub_020BDEC4 - mov r2, #1 - ldr r0, _02240058 ; =ov6_02240064 - add r1, r5, #0 - lsl r2, r2, #0xa - bl sub_0200DA3C - str r0, [r5, #0x20] - ldr r0, _0224005C ; =0x000006D4 - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240054: .word 0x0400006C -_02240058: .word ov6_02240064 -_0224005C: .word 0x000006D4 - thumb_func_end ov6_02240000 - - thumb_func_start ov6_02240060 -ov6_02240060: ; 0x02240060 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov6_02240060 - - thumb_func_start ov6_02240064 -ov6_02240064: ; 0x02240064 - ldr r3, _0224006C ; =sub_020BDEC4 - ldr r0, _02240070 ; =0x0400006C - ldr r1, [r1, #0] - bx r3 - ; .align 2, 0 -_0224006C: .word sub_020BDEC4 -_02240070: .word 0x0400006C - thumb_func_end ov6_02240064 - - thumb_func_start ov6_02240074 -ov6_02240074: ; 0x02240074 - push {r3, r4, r5, lr} - mov r1, #5 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #6 - bl sub_02018144 - mov r2, #5 - mov r1, #0 - lsl r2, r2, #6 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x4b - str r5, [r4, #0] - mov r1, #5 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, #0x10 - add r0, r4, r0 - mov r1, #4 - mov r2, #0x20 - bl sub_020182CC - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02240074 - - thumb_func_start ov6_022400A8 -ov6_022400A8: ; 0x022400A8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x4b - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #5 - beq _022400BA - bl sub_02022974 -_022400BA: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022400A8 - - thumb_func_start ov6_022400C4 -ov6_022400C4: ; 0x022400C4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x4b - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022400FC - sub r0, r0, #4 - cmp r0, #1 - bls _022400FC - ldr r0, _02240100 ; =0x04000454 - mov r1, #0 - str r1, [r0, #0] - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - add r4, #0x40 - add r0, r4, #0 - bl ov6_0223FDBC - mov r2, #1 - mov r0, #0x12 - add r1, sp, #0 - str r2, [sp] - bl sub_020B275C -_022400FC: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02240100: .word 0x04000454 - thumb_func_end ov6_022400C4 - - thumb_func_start ov6_02240104 -ov6_02240104: ; 0x02240104 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r1, #0 - mov r1, #0x12 - lsl r1, r1, #4 - add r5, r0, #0 - bl sub_02018144 - mov r2, #0x12 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - str r6, [r4, #4] - mov r0, #0 - str r0, [r4, #0] - mov r0, #0x47 - lsl r0, r0, #2 - str r5, [r4, r0] - sub r0, #0x10 - add r0, r4, r0 - add r1, r5, #0 - mov r2, #0x20 - bl sub_020182CC - mov r2, #0x47 - lsl r2, r2, #2 - add r0, r4, #0 - ldr r1, [r4, r2] - sub r2, #0x10 - add r0, #0x34 - add r2, r4, r2 - bl ov6_02240260 - ldr r0, [r4, #4] - bl sub_0203D170 - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xac - mov r1, #0x4a - add r2, r6, #0 - mov r3, #2 - str r5, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xac - mov r1, #0x4c - add r2, r6, #0 - mov r3, #2 - str r5, [sp, #0xc] - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0xac - mov r1, #0x4b - mov r2, #0 - mov r3, #0xc0 - str r5, [sp, #4] - bl sub_02006E84 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - mov r0, #0 - str r0, [r4, #0x34] - mov r0, #0x1f - str r0, [r4, #0x38] - str r0, [sp] - ldr r0, _022401B4 ; =0x04000050 - ldr r3, [r4, #0x34] - mov r1, #4 - mov r2, #1 - bl sub_020BF55C - add r0, r4, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022401B4: .word 0x04000050 - thumb_func_end ov6_02240104 - - thumb_func_start ov6_022401B8 -ov6_022401B8: ; 0x022401B8 - push {r4, lr} - mov r1, #0x43 - add r4, r0, #0 - lsl r1, r1, #2 - add r1, r4, r1 - add r0, #0x34 - bl ov6_02240340 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov6_022401B8 - - thumb_func_start ov6_022401D0 -ov6_022401D0: ; 0x022401D0 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - add r5, r1, #0 - ldr r1, [r4, #4] - add r0, #8 - mov r2, #1 - bl ov6_02240240 - ldr r0, [r4, #8] - add r1, sp, #0 - bl sub_02063050 - add r0, r4, #0 - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, #0x34 - bl ov6_022402E4 - add r0, r4, #0 - ldr r1, [r4, #4] - add r0, #8 - add r2, r5, #0 - bl ov6_02240240 - ldr r0, [r4, #8] - add r1, sp, #0 - bl sub_02063050 - mov r0, #1 - str r0, [r4, #0] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_022401D0 - - thumb_func_start ov6_02240214 -ov6_02240214: ; 0x02240214 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224021E - cmp r0, #5 - bne _02240222 -_0224021E: - mov r0, #1 - bx lr -_02240222: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov6_02240214 - - thumb_func_start ov6_02240228 -ov6_02240228: ; 0x02240228 - push {r4, lr} - add r4, r0, #0 - bl ov6_02240214 - cmp r0, #1 - beq _0224023C - add r4, #0x34 - add r0, r4, #0 - bl ov6_02240600 -_0224023C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02240228 - - thumb_func_start ov6_02240240 -ov6_02240240: ; 0x02240240 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0x38] - add r1, r2, #0 - bl sub_0206251C - str r0, [r4, #0] - cmp r0, #0 - bne _02240256 - bl sub_02022974 -_02240256: - mov r0, #0 - str r0, [r4, #0x24] - str r0, [r4, #0x28] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02240240 - - thumb_func_start ov6_02240260 -ov6_02240260: ; 0x02240260 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #8] - mov r0, #0xac - add r6, r1, #0 - add r7, r2, #0 - bl sub_02006C24 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - add r0, #0x80 - mov r2, #6 - add r3, r6, #0 - bl ov6_0223FD60 - ldr r0, [sp, #8] - ldr r5, [sp, #8] - str r0, [sp, #0x10] - add r0, #0x80 - mov r4, #0 - add r5, #0x90 - str r0, [sp, #0x10] -_0224028E: - ldr r1, [sp, #0x10] - str r6, [sp] - ldr r2, [sp, #0xc] - add r0, r5, #0 - add r3, r4, #4 - str r7, [sp, #4] - bl ov6_0223FD70 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #2 - blt _0224028E - ldr r0, [sp, #8] - ldr r1, [sp, #8] - add r0, #8 - add r1, #0x80 - bl ov6_0223FDAC - ldr r4, [sp, #8] - ldr r6, [sp, #8] - mov r5, #0 - add r4, #0x90 - add r6, #8 -_022402BC: - add r0, r6, #0 - add r1, r4, #0 - bl ov6_0223FDB4 - add r5, r5, #1 - add r4, #0x14 - cmp r5, #2 - blt _022402BC - ldr r0, [sp, #8] - mov r1, #0 - add r0, #8 - str r0, [sp, #8] - bl ov6_0223FDC4 - ldr r0, [sp, #0xc] - bl sub_02006CA8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02240260 - - thumb_func_start ov6_022402E4 -ov6_022402E4: ; 0x022402E4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r0, #8 - bl ov6_0223FDCC - mov r1, #1 - lsl r1, r1, #0xc - add r0, r6, #0 - add r0, #8 - add r2, r1, #0 - add r3, r1, #0 - bl ov6_0223FDD4 - mov r4, #0 - add r5, r6, #0 - add r5, #0x90 - add r7, r4, #0 -_02240306: - add r0, r5, #0 - add r1, r7, #0 - bl ov6_0223FDA4 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #2 - blt _02240306 - add r0, r6, #0 - mov r2, #0 - add r0, #0xcc - str r2, [r0, #0] - add r0, r6, #0 - add r0, #0xb8 - str r2, [r0, #0] - add r0, r6, #0 - mov r1, #0x52 - add r0, #0xd0 - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xd4 - add r6, #8 - str r2, [r0, #0] - add r0, r6, #0 - mov r1, #1 - bl ov6_0223FDC4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022402E4 - - thumb_func_start ov6_02240340 -ov6_02240340: ; 0x02240340 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x80 - add r6, r1, #0 - bl ov6_0223FD68 - mov r4, #0 - add r5, #0x90 -_02240350: - add r0, r5, #0 - add r1, r6, #0 - bl ov6_0223FD84 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #2 - blt _02240350 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02240340 - - thumb_func_start ov6_02240364 -ov6_02240364: ; 0x02240364 - push {r3, r4, r5, r6} - sub sp, #8 - add r3, r1, #0 - add r1, r2, #0 - mov r6, #0 - add r2, sp, #0 - str r6, [r2, #0] - str r6, [r2, #4] - ldr r2, _022405C8 ; =0x021BF67C - add r0, #0x34 - ldr r4, [r2, #0x48] - mov r2, #0x40 - tst r2, r4 - beq _02240392 - ldr r2, [r0, #0] - add r2, r2, #1 - lsr r5, r2, #0x1f - lsl r4, r2, #0x1b - sub r4, r4, r5 - mov r2, #0x1b - ror r4, r2 - add r2, r5, r4 - str r2, [r0, #0] -_02240392: - ldr r2, _022405C8 ; =0x021BF67C - ldr r4, [r2, #0x48] - mov r2, #0x80 - tst r2, r4 - beq _022403AC - ldr r2, [r0, #0] - cmp r2, #0 - beq _022403A8 - sub r2, r2, #1 - str r2, [r0, #0] - b _022403AC -_022403A8: - mov r2, #0x1f - str r2, [r0, #0] -_022403AC: - ldr r2, _022405C8 ; =0x021BF67C - ldr r4, [r2, #0x48] - mov r2, #0x10 - tst r2, r4 - beq _022403C8 - ldr r2, [r0, #4] - add r2, r2, #1 - lsr r5, r2, #0x1f - lsl r4, r2, #0x1b - sub r4, r4, r5 - mov r2, #0x1b - ror r4, r2 - add r2, r5, r4 - str r2, [r0, #4] -_022403C8: - ldr r2, _022405C8 ; =0x021BF67C - ldr r4, [r2, #0x48] - mov r2, #0x20 - tst r2, r4 - beq _022403E2 - ldr r2, [r0, #4] - cmp r2, #0 - beq _022403DE - sub r2, r2, #1 - str r2, [r0, #4] - b _022403E2 -_022403DE: - mov r2, #0x1f - str r2, [r0, #4] -_022403E2: - cmp r1, #0xe - bls _022403E8 - b _02240584 -_022403E8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022403F4: ; jump table - .short _02240412 - _022403F4 - 2 ; case 0 - .short _02240426 - _022403F4 - 2 ; case 1 - .short _02240426 - _022403F4 - 2 ; case 2 - .short _02240426 - _022403F4 - 2 ; case 3 - .short _02240426 - _022403F4 - 2 ; case 4 - .short _0224046C - _022403F4 - 2 ; case 5 - .short _0224046C - _022403F4 - 2 ; case 6 - .short _0224046C - _022403F4 - 2 ; case 7 - .short _0224046C - _022403F4 - 2 ; case 8 - .short _022404B2 - _022403F4 - 2 ; case 9 - .short _022404B2 - _022403F4 - 2 ; case 10 - .short _022404F8 - _022403F4 - 2 ; case 11 - .short _022404F8 - _022403F4 - 2 ; case 12 - .short _0224053E - _022403F4 - 2 ; case 13 - .short _0224053E - _022403F4 - 2 ; case 14 -_02240412: - ldr r1, [r0, #4] - cmp r1, #0x10 - ble _0224041E - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_0224041E: - mov r1, #1 - str r1, [sp, #4] - str r1, [sp] - b _022405A4 -_02240426: - cmp r3, #0 - ldr r1, [r0, #0] - beq _0224044C - cmp r1, #8 - bge _02240436 - add r1, r1, #1 - str r1, [r0, #0] - b _0224043A -_02240436: - mov r1, #1 - str r1, [sp] -_0224043A: - ldr r1, [r0, #4] - cmp r1, #8 - ble _02240446 - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_02240446: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_0224044C: - cmp r1, #2 - ble _02240456 - sub r1, r1, #1 - str r1, [r0, #0] - b _0224045A -_02240456: - mov r1, #1 - str r1, [sp] -_0224045A: - ldr r1, [r0, #4] - cmp r1, #0xe - bge _02240466 - add r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_02240466: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_0224046C: - cmp r3, #0 - ldr r1, [r0, #0] - beq _02240492 - cmp r1, #8 - bge _0224047C - add r1, r1, #1 - str r1, [r0, #0] - b _02240480 -_0224047C: - mov r1, #1 - str r1, [sp] -_02240480: - ldr r1, [r0, #4] - cmp r1, #8 - ble _0224048C - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_0224048C: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_02240492: - cmp r1, #3 - ble _0224049C - sub r1, r1, #1 - str r1, [r0, #0] - b _022404A0 -_0224049C: - mov r1, #1 - str r1, [sp] -_022404A0: - ldr r1, [r0, #4] - cmp r1, #0xd - bge _022404AC - add r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_022404AC: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_022404B2: - cmp r3, #0 - ldr r1, [r0, #0] - beq _022404D8 - cmp r1, #8 - bge _022404C2 - add r1, r1, #1 - str r1, [r0, #0] - b _022404C6 -_022404C2: - mov r1, #1 - str r1, [sp] -_022404C6: - ldr r1, [r0, #4] - cmp r1, #8 - ble _022404D2 - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_022404D2: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_022404D8: - cmp r1, #4 - ble _022404E2 - sub r1, r1, #1 - str r1, [r0, #0] - b _022404E6 -_022404E2: - mov r1, #1 - str r1, [sp] -_022404E6: - ldr r1, [r0, #4] - cmp r1, #0xc - bge _022404F2 - add r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_022404F2: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_022404F8: - cmp r3, #0 - ldr r1, [r0, #0] - beq _0224051E - cmp r1, #8 - bge _02240508 - add r1, r1, #1 - str r1, [r0, #0] - b _0224050C -_02240508: - mov r1, #1 - str r1, [sp] -_0224050C: - ldr r1, [r0, #4] - cmp r1, #8 - ble _02240518 - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_02240518: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_0224051E: - cmp r1, #5 - ble _02240528 - sub r1, r1, #1 - str r1, [r0, #0] - b _0224052C -_02240528: - mov r1, #1 - str r1, [sp] -_0224052C: - ldr r1, [r0, #4] - cmp r1, #0xb - bge _02240538 - add r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_02240538: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_0224053E: - cmp r3, #0 - ldr r1, [r0, #0] - beq _02240564 - cmp r1, #8 - bge _0224054E - add r1, r1, #1 - str r1, [r0, #0] - b _02240552 -_0224054E: - mov r1, #1 - str r1, [sp] -_02240552: - ldr r1, [r0, #4] - cmp r1, #8 - ble _0224055E - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_0224055E: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_02240564: - cmp r1, #6 - ble _0224056E - sub r1, r1, #1 - str r1, [r0, #0] - b _02240572 -_0224056E: - mov r1, #1 - str r1, [sp] -_02240572: - ldr r1, [r0, #4] - cmp r1, #0xa - bge _0224057E - add r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_0224057E: - mov r1, #1 - str r1, [sp, #4] - b _022405A4 -_02240584: - ldr r1, [r0, #0] - cmp r1, #0 - ble _02240590 - sub r1, r1, #1 - str r1, [r0, #0] - b _02240594 -_02240590: - mov r1, #1 - str r1, [sp] -_02240594: - ldr r1, [r0, #4] - cmp r1, #0 - ble _022405A0 - sub r1, r1, #1 - str r1, [r0, #4] - b _022405A4 -_022405A0: - mov r1, #1 - str r1, [sp, #4] -_022405A4: - ldr r1, [r0, #0] - ldr r0, [r0, #4] - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _022405CC ; =0x04000052 - strh r1, [r0] - ldr r0, [sp] - cmp r0, #0 - beq _022405BE - ldr r0, [sp, #4] - cmp r0, #0 - beq _022405BE - mov r6, #1 -_022405BE: - add r0, r6, #0 - add sp, #8 - pop {r3, r4, r5, r6} - bx lr - nop -_022405C8: .word 0x021BF67C -_022405CC: .word 0x04000052 - thumb_func_end ov6_02240364 - - thumb_func_start ov6_022405D0 -ov6_022405D0: ; 0x022405D0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r7, #0x34 - add r5, r7, #0 - mov r4, #0 - add r5, #0x90 -_022405DC: - add r0, r5, #0 - bl ov6_0223FD98 - add r4, r4, #1 - add r6, r0, #0 - add r5, #0x14 - cmp r4, #2 - blt _022405DC - cmp r6, #0 - beq _022405FA - add r7, #8 - add r0, r7, #0 - mov r1, #0 - bl ov6_0223FDC4 -_022405FA: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022405D0 - - thumb_func_start ov6_02240600 -ov6_02240600: ; 0x02240600 - ldr r3, _02240608 ; =ov6_0223FDBC - add r0, #8 - bx r3 - nop -_02240608: .word ov6_0223FDBC - thumb_func_end ov6_02240600 - - thumb_func_start ov6_0224060C -ov6_0224060C: ; 0x0224060C - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x1e - lsl r1, r1, #4 - add r4, r0, #0 - bl sub_02018144 - mov r2, #0x1e - add r6, r0, #0 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - add r0, r6, #0 - mov r1, #0x62 - add r2, r5, #0 - add r3, r4, #0 - bl ov6_0223FD58 - add r5, r6, #0 - mov r4, #0 - add r5, #0x10 -_02240638: - add r0, r5, #0 - add r1, r6, #0 - bl ov6_022407B8 - add r4, r4, #1 - add r5, #0x90 - cmp r4, #3 - blt _02240638 - mov r0, #7 - mov r1, #0 - lsl r0, r0, #6 - str r1, [r6, r0] - add r0, r6, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_0224060C - - thumb_func_start ov6_02240654 -ov6_02240654: ; 0x02240654 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r6, #0 - mov r4, #0 - add r5, #0x10 -_0224065E: - add r0, r5, #0 - bl ov6_022407DC - add r4, r4, #1 - add r5, #0x90 - cmp r4, #3 - blt _0224065E - add r0, r6, #0 - bl ov6_0223FD68 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02240654 - - thumb_func_start ov6_0224067C -ov6_0224067C: ; 0x0224067C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _02240694 - bl sub_02022974 -_02240694: - mov r0, #0x71 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - add r1, r0, #0 - add r1, #8 - str r4, [r5, r1] - add r1, r0, #0 - add r1, #0xc - str r6, [r5, r1] - add r1, r0, #0 - add r1, #0x10 - str r7, [r5, r1] - add r2, sp, #8 - add r1, r0, #0 - ldrh r3, [r2, #0x14] - add r1, #0x14 - strh r3, [r5, r1] - add r1, r0, #0 - ldrh r3, [r2, #0x18] - add r1, #0x16 - strh r3, [r5, r1] - add r1, r0, #0 - ldrh r2, [r2, #0x1c] - add r1, #0x18 - strh r2, [r5, r1] - add r1, r0, #4 - ldr r2, [sp, #0x18] - sub r0, r0, #4 - str r2, [r5, r1] - mov r1, #1 - str r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_0224067C - - thumb_func_start ov6_022406D8 -ov6_022406D8: ; 0x022406D8 - push {r3, r4, r5, lr} - sub sp, #0x18 - mov r2, #0x71 - add r5, r0, #0 - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r1, r1, #1 - str r1, [r5, r2] - ldr r1, [r5, r2] - cmp r1, #0 - bge _0224073A - add r1, r2, #4 - ldr r1, [r5, r1] - str r1, [r5, r2] - bl ov6_022408A8 - add r4, r0, #0 - bne _02240700 - bl sub_02022974 -_02240700: - mov r1, #0x73 - lsl r1, r1, #2 - ldr r0, [r5, r1] - mov r2, #1 - str r0, [sp] - add r0, r1, #4 - ldr r0, [r5, r0] - lsl r2, r2, #0x10 - str r0, [sp, #4] - add r0, r1, #0 - add r0, #8 - ldr r0, [r5, r0] - mov r3, #0x60 - str r0, [sp, #8] - add r0, r1, #0 - add r0, #0xc - ldrh r0, [r5, r0] - str r0, [sp, #0xc] - add r0, r1, #0 - add r0, #0xe - ldrh r0, [r5, r0] - add r1, #0x10 - str r0, [sp, #0x10] - ldrh r0, [r5, r1] - mov r1, #0 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov6_022407E8 -_0224073A: - mov r4, #0 - add r5, #0x10 -_0224073E: - add r0, r5, #0 - bl ov6_0224085C - add r4, r4, #1 - add r5, #0x90 - cmp r4, #3 - blt _0224073E - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov6_022406D8 - - thumb_func_start ov6_02240750 -ov6_02240750: ; 0x02240750 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x10 -_02240758: - add r0, r5, #0 - bl ov6_0224089C - add r4, r4, #1 - add r5, #0x90 - cmp r4, #3 - blt _02240758 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02240750 - - thumb_func_start ov6_02240768 -ov6_02240768: ; 0x02240768 - ldr r3, _02240770 ; =ov6_0224060C - mov r1, #6 - bx r3 - nop -_02240770: .word ov6_0224060C - thumb_func_end ov6_02240768 - - thumb_func_start ov6_02240774 -ov6_02240774: ; 0x02240774 - ldr r3, _02240778 ; =ov6_02240654 - bx r3 - ; .align 2, 0 -_02240778: .word ov6_02240654 - thumb_func_end ov6_02240774 - - thumb_func_start ov6_0224077C -ov6_0224077C: ; 0x0224077C - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r4, #0x40 - str r4, [sp] - mov r5, #0 - str r5, [sp, #4] - str r5, [sp, #8] - str r5, [sp, #0xc] - lsl r5, r1, #0x10 - lsl r1, r4, #9 - add r1, r5, r1 - lsl r5, r2, #0x10 - mov r2, #0xa - lsl r2, r2, #0x10 - add r2, r5, r2 - lsl r5, r3, #0x10 - lsl r3, r4, #0xa - add r3, r5, r3 - bl ov6_0224067C - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov6_0224077C - - thumb_func_start ov6_022407A8 -ov6_022407A8: ; 0x022407A8 - ldr r3, _022407AC ; =ov6_022406D8 - bx r3 - ; .align 2, 0 -_022407AC: .word ov6_022406D8 - thumb_func_end ov6_022407A8 - - thumb_func_start ov6_022407B0 -ov6_022407B0: ; 0x022407B0 - ldr r3, _022407B4 ; =ov6_02240750 - bx r3 - ; .align 2, 0 -_022407B4: .word ov6_02240750 - thumb_func_end ov6_022407B0 - - thumb_func_start ov6_022407B8 -ov6_022407B8: ; 0x022407B8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - mov r1, #0 - mov r2, #0x90 - bl sub_020D5124 - add r0, r4, #4 - add r1, r5, #0 - bl ov6_0223FDAC - add r0, r4, #4 - mov r1, #0 - bl ov6_0223FDC4 - mov r0, #0 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov6_022407B8 - - thumb_func_start ov6_022407DC -ov6_022407DC: ; 0x022407DC - ldr r3, _022407E4 ; =sub_020D5124 - mov r1, #0 - mov r2, #0x90 - bx r3 - ; .align 2, 0 -_022407E4: .word sub_020D5124 - thumb_func_end ov6_022407DC - - thumb_func_start ov6_022407E8 -ov6_022407E8: ; 0x022407E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _022407FC - bl sub_02022974 -_022407FC: - add r0, r5, #0 - add r0, #0x7c - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov6_0223FD0C - add r0, r5, #4 - mov r1, #1 - bl ov6_0223FDC4 - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - add r0, r5, #4 - bl ov6_0223FDCC - mov r2, #1 - add r0, r5, #4 - add r1, r4, #0 - lsl r2, r2, #0xc - add r3, r4, #0 - bl ov6_0223FDD4 - add r1, sp, #8 - ldrh r1, [r1, #0x1c] - add r0, r5, #4 - mov r2, #0 - bl ov6_0223FDDC - add r1, sp, #8 - ldrh r1, [r1, #0x20] - add r0, r5, #4 - mov r2, #1 - bl ov6_0223FDDC - add r1, sp, #8 - ldrh r1, [r1, #0x24] - add r0, r5, #4 - mov r2, #2 - bl ov6_0223FDDC - mov r0, #1 - str r0, [r5, #0] - mov r0, #0 - add r5, #0x8c - str r0, [r5, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022407E8 - - thumb_func_start ov6_0224085C -ov6_0224085C: ; 0x0224085C - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0224089A - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x8c - str r1, [r0, #0] - add r1, r4, #0 - add r1, #0x8c - add r0, r4, #0 - ldr r1, [r1, #0] - add r0, #0x7c - bl ov6_0223FD18 - ldr r1, [r4, #0x7c] - mov r2, #1 - add r5, r0, #0 - add r0, r4, #4 - lsl r2, r2, #0xc - add r3, r1, #0 - bl ov6_0223FDD4 - cmp r5, #1 - bne _0224089A - mov r0, #0 - str r0, [r4, #0] -_0224089A: - pop {r3, r4, r5, pc} - thumb_func_end ov6_0224085C - - thumb_func_start ov6_0224089C -ov6_0224089C: ; 0x0224089C - ldr r3, _022408A4 ; =ov6_0223FDBC - add r0, r0, #4 - bx r3 - nop -_022408A4: .word ov6_0223FDBC - thumb_func_end ov6_0224089C - - thumb_func_start ov6_022408A8 -ov6_022408A8: ; 0x022408A8 - mov r2, #0 - add r3, r0, #0 -_022408AC: - ldr r1, [r3, #0x10] - cmp r1, #0 - bne _022408BC - mov r1, #0x90 - add r0, #0x10 - mul r1, r2 - add r0, r0, r1 - bx lr -_022408BC: - add r2, r2, #1 - add r3, #0x90 - cmp r2, #3 - blt _022408AC - mov r0, #0 - bx lr - thumb_func_end ov6_022408A8 - - thumb_func_start ov6_022408C8 -ov6_022408C8: ; 0x022408C8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - mov r1, #0xd4 - add r6, r0, #0 - bl sub_02018144 - add r7, r0, #0 - mov r1, #0 - mov r2, #0xd4 - bl sub_020D5124 - add r0, r7, #0 - add r0, #0xc4 - add r1, r6, #0 - mov r2, #0x20 - bl sub_020182CC - mov r0, #0x62 - add r1, r6, #0 - bl sub_02006C24 - str r0, [sp, #8] - add r0, r7, #0 - ldr r1, [sp, #8] - add r0, #0x78 - add r2, r4, #0 - add r3, r6, #0 - bl ov6_0223FD60 - add r0, r7, #0 - str r0, [sp, #0xc] - add r0, #0xc4 - str r0, [sp, #0xc] - add r0, r7, #0 - add r5, r7, #0 - str r0, [sp, #0x10] - add r0, #0x78 - mov r4, #0 - add r5, #0x88 - str r0, [sp, #0x10] -_0224091A: - ldr r0, [sp, #0xc] - str r6, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x10] - ldr r2, [sp, #8] - add r0, r5, #0 - add r3, r4, #1 - bl ov6_0223FD70 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _0224091A - add r1, r7, #0 - add r0, r7, #0 - add r1, #0x78 - bl ov6_0223FDAC - add r4, r7, #0 - mov r5, #0 - add r4, #0x88 -_02240944: - add r0, r7, #0 - add r1, r4, #0 - bl ov6_0223FDB4 - add r5, r5, #1 - add r4, #0x14 - cmp r5, #3 - blt _02240944 - add r0, r7, #0 - mov r1, #0 - bl ov6_0223FDC4 - ldr r0, [sp, #8] - bl sub_02006CA8 - add r0, r7, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_022408C8 - - thumb_func_start ov6_02240968 -ov6_02240968: ; 0x02240968 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, #0x78 - bl ov6_0223FD68 - add r5, r7, #0 - add r6, r7, #0 - mov r4, #0 - add r5, #0x88 - add r6, #0xc4 -_0224097C: - add r0, r5, #0 - add r1, r6, #0 - bl ov6_0223FD84 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _0224097C - add r0, r7, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02240968 - - thumb_func_start ov6_02240994 -ov6_02240994: ; 0x02240994 - push {r4, lr} - add r4, r0, #0 - bl ov6_0223FDCC - ldr r1, _022409D0 ; =0xFFFFFFF8 - add r0, r4, #0 - add r1, sp - ldrh r1, [r1, #0x10] - mov r2, #0 - bl ov6_0223FDDC - ldr r1, _022409D0 ; =0xFFFFFFF8 - add r0, r4, #0 - add r1, sp - ldrh r1, [r1, #0x18] - mov r2, #2 - bl ov6_0223FDDC - ldr r1, _022409D0 ; =0xFFFFFFF8 - add r0, r4, #0 - add r1, sp - ldrh r1, [r1, #0x14] - mov r2, #1 - bl ov6_0223FDDC - add r0, r4, #0 - mov r1, #1 - bl ov6_0223FDC4 - pop {r4, pc} - ; .align 2, 0 -_022409D0: .word 0xFFFFFFF8 - thumb_func_end ov6_02240994 - - thumb_func_start ov6_022409D4 -ov6_022409D4: ; 0x022409D4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x88 -_022409DC: - add r0, r5, #0 - bl ov6_0223FD8C - add r4, r4, #1 - add r5, #0x14 - cmp r4, #3 - blt _022409DC - pop {r3, r4, r5, pc} - thumb_func_end ov6_022409D4 - - thumb_func_start ov6_022409EC -ov6_022409EC: ; 0x022409EC - ldr r3, _022409F0 ; =ov6_0223FDBC - bx r3 - ; .align 2, 0 -_022409F0: .word ov6_0223FDBC - thumb_func_end ov6_022409EC - - thumb_func_start ov6_022409F4 -ov6_022409F4: ; 0x022409F4 - ldr r3, _022409FC ; =ov6_022408C8 - mov r1, #0 - bx r3 - nop -_022409FC: .word ov6_022408C8 - thumb_func_end ov6_022409F4 - - thumb_func_start ov6_02240A00 -ov6_02240A00: ; 0x02240A00 - ldr r3, _02240A04 ; =ov6_02240968 - bx r3 - ; .align 2, 0 -_02240A04: .word ov6_02240968 - thumb_func_end ov6_02240A00 - - thumb_func_start ov6_02240A08 -ov6_02240A08: ; 0x02240A08 - ldr r3, _02240A0C ; =ov6_022409D4 - bx r3 - ; .align 2, 0 -_02240A0C: .word ov6_022409D4 - thumb_func_end ov6_02240A08 - - thumb_func_start ov6_02240A10 -ov6_02240A10: ; 0x02240A10 - ldr r3, _02240A14 ; =ov6_022409EC - bx r3 - ; .align 2, 0 -_02240A14: .word ov6_022409EC - thumb_func_end ov6_02240A10 - - thumb_func_start ov6_02240A18 -ov6_02240A18: ; 0x02240A18 - push {r3, r4, lr} - sub sp, #0xc - ldr r4, _02240A3C ; =0x0000F49F - str r4, [sp] - ldr r4, _02240A40 ; =0x000080B5 - str r4, [sp, #4] - sub r4, r4, #7 - str r4, [sp, #8] - ldr r4, _02240A44 ; =0x00029BA8 - add r1, r1, r4 - ldr r4, _02240A48 ; =0x00037294 - sub r2, r2, r4 - ldr r4, _02240A4C ; =0x000B6876 - sub r3, r3, r4 - bl ov6_02240994 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02240A3C: .word 0x0000F49F -_02240A40: .word 0x000080B5 -_02240A44: .word 0x00029BA8 -_02240A48: .word 0x00037294 -_02240A4C: .word 0x000B6876 - thumb_func_end ov6_02240A18 - - thumb_func_start ov6_02240A50 -ov6_02240A50: ; 0x02240A50 - push {r3, r4, lr} - sub sp, #0xc - ldr r4, _02240A74 ; =0x0000E5B1 - str r4, [sp] - ldr r4, _02240A78 ; =0x0000C163 - str r4, [sp, #4] - ldr r4, _02240A7C ; =0x00007FF8 - str r4, [sp, #8] - ldr r4, _02240A80 ; =0x00116A4F - add r1, r1, r4 - ldr r4, _02240A84 ; =0x0004F16B - add r2, r2, r4 - ldr r4, _02240A88 ; =0x00092118 - sub r3, r3, r4 - bl ov6_02240994 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02240A74: .word 0x0000E5B1 -_02240A78: .word 0x0000C163 -_02240A7C: .word 0x00007FF8 -_02240A80: .word 0x00116A4F -_02240A84: .word 0x0004F16B -_02240A88: .word 0x00092118 - thumb_func_end ov6_02240A50 - - thumb_func_start ov6_02240A8C -ov6_02240A8C: ; 0x02240A8C - push {r3, r4, lr} - sub sp, #0xc - ldr r4, _02240AB4 ; =0x0000E71D - str r4, [sp] - ldr r4, _02240AB8 ; =0x00005335 - str r4, [sp, #4] - ldr r4, _02240ABC ; =0x00007992 - str r4, [sp, #8] - mov r4, #0xc6 - lsl r4, r4, #0xc - sub r1, r1, r4 - ldr r4, _02240AC0 ; =0x00056FFF - add r2, r2, r4 - ldr r4, _02240AC4 ; =0x00210008 - sub r3, r3, r4 - bl ov6_02240994 - add sp, #0xc - pop {r3, r4, pc} - nop -_02240AB4: .word 0x0000E71D -_02240AB8: .word 0x00005335 -_02240ABC: .word 0x00007992 -_02240AC0: .word 0x00056FFF -_02240AC4: .word 0x00210008 - thumb_func_end ov6_02240A8C - - thumb_func_start ov6_02240AC8 -ov6_02240AC8: ; 0x02240AC8 - ldr r3, _02240AD0 ; =ov6_0224060C - mov r1, #6 - bx r3 - nop -_02240AD0: .word ov6_0224060C - thumb_func_end ov6_02240AC8 - - thumb_func_start ov6_02240AD4 -ov6_02240AD4: ; 0x02240AD4 - ldr r3, _02240AD8 ; =ov6_02240654 - bx r3 - ; .align 2, 0 -_02240AD8: .word ov6_02240654 - thumb_func_end ov6_02240AD4 - - thumb_func_start ov6_02240ADC -ov6_02240ADC: ; 0x02240ADC - ldr r3, _02240AE0 ; =ov6_022406D8 - bx r3 - ; .align 2, 0 -_02240AE0: .word ov6_022406D8 - thumb_func_end ov6_02240ADC - - thumb_func_start ov6_02240AE4 -ov6_02240AE4: ; 0x02240AE4 - ldr r3, _02240AE8 ; =ov6_02240750 - bx r3 - ; .align 2, 0 -_02240AE8: .word ov6_02240750 - thumb_func_end ov6_02240AE4 - - thumb_func_start ov6_02240AEC -ov6_02240AEC: ; 0x02240AEC - push {r4, lr} - sub sp, #0x10 - mov r4, #0x40 - str r4, [sp] - ldr r4, _02240B1C ; =0x0000F49F - str r4, [sp, #4] - ldr r4, _02240B20 ; =0x000080B5 - str r4, [sp, #8] - sub r4, r4, #7 - str r4, [sp, #0xc] - mov r4, #0x11 - lsl r4, r4, #0xc - add r1, r1, r4 - mov r4, #0x6f - lsl r4, r4, #0xc - sub r2, r2, r4 - mov r4, #0xcb - lsl r4, r4, #0xc - sub r3, r3, r4 - bl ov6_0224067C - add sp, #0x10 - pop {r4, pc} - nop -_02240B1C: .word 0x0000F49F -_02240B20: .word 0x000080B5 - thumb_func_end ov6_02240AEC - - thumb_func_start ov6_02240B24 -ov6_02240B24: ; 0x02240B24 - push {r4, lr} - sub sp, #0x10 - mov r4, #0x40 - str r4, [sp] - ldr r4, _02240B50 ; =0x0000E5B1 - str r4, [sp, #4] - ldr r4, _02240B54 ; =0x0000C163 - str r4, [sp, #8] - ldr r4, _02240B58 ; =0x00007FF8 - str r4, [sp, #0xc] - ldr r4, _02240B5C ; =0x00252000 - add r1, r1, r4 - mov r4, #0x43 - lsl r4, r4, #0xc - add r2, r2, r4 - mov r4, #0xe - lsl r4, r4, #0xe - sub r3, r3, r4 - bl ov6_0224067C - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_02240B50: .word 0x0000E5B1 -_02240B54: .word 0x0000C163 -_02240B58: .word 0x00007FF8 -_02240B5C: .word 0x00252000 - thumb_func_end ov6_02240B24 - - thumb_func_start ov6_02240B60 -ov6_02240B60: ; 0x02240B60 - push {r4, lr} - sub sp, #0x10 - mov r4, #0x40 - str r4, [sp] - ldr r4, _02240B90 ; =0x0000E71D - str r4, [sp, #4] - ldr r4, _02240B94 ; =0x00005335 - str r4, [sp, #8] - ldr r4, _02240B98 ; =0x00007992 - str r4, [sp, #0xc] - mov r4, #0x53 - lsl r4, r4, #0xe - sub r1, r1, r4 - mov r4, #0xd - lsl r4, r4, #0xc - sub r2, r2, r4 - mov r4, #0x71 - lsl r4, r4, #0xe - sub r3, r3, r4 - bl ov6_0224067C - add sp, #0x10 - pop {r4, pc} - nop -_02240B90: .word 0x0000E71D -_02240B94: .word 0x00005335 -_02240B98: .word 0x00007992 - thumb_func_end ov6_02240B60 - - thumb_func_start ov6_02240B9C -ov6_02240B9C: ; 0x02240B9C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - mov r1, #0xec - add r7, r0, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0xec - add r6, r0, #0 - bl sub_020D5124 - mov r0, #0x62 - add r1, r7, #0 - bl sub_02006C24 - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0xd8 - str r4, [r0, #0] - add r0, r6, #0 - add r0, #0xdc - add r1, r7, #0 - mov r2, #0x20 - bl sub_020182CC - add r0, r6, #0 - ldr r1, [sp, #8] - add r0, #0x78 - mov r2, #0xf - add r3, r7, #0 - bl ov6_0223FD60 - add r0, r6, #0 - str r0, [sp, #0xc] - add r0, #0xdc - str r0, [sp, #0xc] - add r0, r6, #0 - add r5, r6, #0 - str r0, [sp, #0x10] - add r0, #0x78 - mov r4, #0 - add r5, #0x88 - str r0, [sp, #0x10] -_02240BF4: - ldr r0, [sp, #0xc] - str r7, [sp] - add r3, r4, #0 - str r0, [sp, #4] - ldr r1, [sp, #0x10] - ldr r2, [sp, #8] - add r0, r5, #0 - add r3, #0x10 - bl ov6_0223FD70 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #4 - blt _02240BF4 - add r1, r6, #0 - add r0, r6, #0 - add r1, #0x78 - bl ov6_0223FDAC - add r4, r6, #0 - mov r5, #0 - add r4, #0x88 -_02240C20: - add r0, r6, #0 - add r1, r4, #0 - bl ov6_0223FDB4 - add r5, r5, #1 - add r4, #0x14 - cmp r5, #4 - blt _02240C20 - add r0, r6, #0 - mov r1, #0 - bl ov6_0223FDC4 - ldr r0, [sp, #8] - bl sub_02006CA8 - add r0, r6, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02240B9C - - thumb_func_start ov6_02240C44 -ov6_02240C44: ; 0x02240C44 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r0, [r0, #0x38] - bl sub_0206251C - add r1, sp, #0 - bl sub_02063050 - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov6_0223FDCC - add r0, r4, #0 - mov r1, #1 - bl ov6_0223FDC4 - ldr r0, _02240C78 ; =0x000006D8 - bl sub_02005748 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02240C78: .word 0x000006D8 - thumb_func_end ov6_02240C44 - - thumb_func_start ov6_02240C7C -ov6_02240C7C: ; 0x02240C7C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x88 -_02240C84: - add r0, r5, #0 - bl ov6_0223FD98 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #4 - blt _02240C84 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02240C7C - - thumb_func_start ov6_02240C94 -ov6_02240C94: ; 0x02240C94 - ldr r3, _02240C98 ; =ov6_0223FDBC - bx r3 - ; .align 2, 0 -_02240C98: .word ov6_0223FDBC - thumb_func_end ov6_02240C94 - - thumb_func_start ov6_02240C9C -ov6_02240C9C: ; 0x02240C9C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl sub_02013960 - sub r1, r0, #1 - cmp r1, #1 - bhi _02240CB8 - ldr r0, [r5, #0x6c] - str r0, [r4, #0] - ldr r0, [r5, #0x70] - str r0, [r6, #0] - pop {r4, r5, r6, pc} -_02240CB8: - sub r0, r0, #3 - cmp r0, #1 - bhi _02240CC6 - ldr r0, [r5, #0x74] - str r0, [r4, #0] - ldr r0, [r5, #0x78] - str r0, [r6, #0] -_02240CC6: - pop {r4, r5, r6, pc} - thumb_func_end ov6_02240C9C - - thumb_func_start ov6_02240CC8 -ov6_02240CC8: ; 0x02240CC8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_0202D834 - str r0, [sp] - bl sub_0202D898 - cmp r0, #0 - beq _02240CFE - ldr r0, [sp] - mov r1, #2 - bl sub_0202D814 - bl ov6_02243218 - ldr r1, [r5, #0x1c] - ldr r1, [r1, #0] - cmp r1, r0 - bne _02240CFE - ldr r0, [r4, #0x64] - str r0, [r6, #0] - ldr r0, [r4, #0x68] - str r0, [r7, #0] -_02240CFE: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02240CC8 - - thumb_func_start ov6_02240D00 -ov6_02240D00: ; 0x02240D00 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x1c] - add r4, r1, #0 - ldr r0, [r0, #0] - add r6, r2, #0 - add r7, r3, #0 - bl sub_0203A2FC - cmp r0, #0 - beq _02240D54 - add r1, sp, #0 - ldr r0, [r5, #0xc] - add r1, #2 - add r2, sp, #0 - bl sub_0202DA10 - cmp r4, #0 - beq _02240D54 - mov r0, #0x6a - mov r1, #8 - mov r2, #4 - bl sub_02006ADC - add r1, sp, #0 - ldrh r2, [r1, #2] - ldr r1, _02240D58 ; =0x0000FFFF - cmp r2, r1 - beq _02240D40 - lsl r1, r2, #2 - ldr r1, [r0, r1] - str r1, [r6, #0] -_02240D40: - add r1, sp, #0 - ldrh r2, [r1] - ldr r1, _02240D58 ; =0x0000FFFF - cmp r2, r1 - beq _02240D50 - lsl r1, r2, #2 - ldr r1, [r0, r1] - str r1, [r7, #0] -_02240D50: - bl sub_020181C4 -_02240D54: - pop {r3, r4, r5, r6, r7, pc} - nop -_02240D58: .word 0x0000FFFF - thumb_func_end ov6_02240D00 - - thumb_func_start ov6_02240D5C -ov6_02240D5C: ; 0x02240D5C - push {r4, r5, r6, r7, lr} - sub sp, #0xb4 - add r5, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - str r0, [sp, #0x14] - ldr r2, [sp, #0x14] - add r0, r5, #0 - add r1, r6, #0 - bl sub_02054F94 - str r0, [sp, #0x1c] - add r2, sp, #0x24 - ldr r1, [sp, #0x1c] - add r0, r5, #0 - add r2, #1 - bl ov6_02241874 - add r1, sp, #0x24 - strb r0, [r1] - ldrb r0, [r1] - cmp r0, #0 - bne _02240D9A - add sp, #0xb4 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02240D9A: - ldr r0, [r5, #0xc] - bl sub_0207A268 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0203A640 - add r4, r0, #0 - add r0, r7, #0 - mov r1, #0 - bl sub_0207A0FC - str r0, [sp, #0x20] - ldr r1, [sp, #0x20] - add r0, r5, #0 - add r2, r4, #0 - add r3, sp, #0x30 - bl ov6_02242634 - ldr r0, [r5, #0xc] - bl sub_0202D834 - bl sub_0202D9D8 - cmp r0, #0 - bne _02240DE4 - add r0, r7, #0 - bl sub_02054A40 - mov r1, #1 - str r1, [sp, #0x34] - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x24 - strb r0, [r1, #0x18] -_02240DE4: - ldr r0, [r5, #0xc] - bl sub_0203A790 - bl sub_0203A74C - add r3, r0, #0 - ldr r0, [sp, #0x20] - add r1, sp, #0x24 - str r0, [sp] - ldrb r1, [r1] - mov r0, #0 - add r2, sp, #0x30 - bl ov6_0224226C - add r1, sp, #0x24 - strb r0, [r1] - add r0, r5, #0 - add r1, sp, #0x24 - bl ov6_02241ABC - ldr r0, [sp, #0x20] - add r1, sp, #0x24 - bl ov6_02241A90 - add r1, sp, #0x24 - ldrb r1, [r1] - ldr r2, [sp, #0x1c] - add r0, r5, #0 - bl ov6_022417C8 - cmp r0, #0 - beq _02240E2A - mov r0, #1 - str r0, [sp, #0x10] - b _02240E2E -_02240E2A: - mov r0, #0 - str r0, [sp, #0x10] -_02240E2E: - add r1, sp, #0x44 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - str r0, [r1, #0xc] - str r1, [sp] - add r0, sp, #0x48 - str r0, [sp, #4] - add r0, sp, #0x4c - add r3, r5, #0 - str r0, [sp, #8] - add r3, #0x94 - ldr r1, [sp, #0x14] - ldr r3, [r3, #0] - add r0, r6, #0 - add r2, r5, #0 - bl sub_020696DC - cmp r0, #0 - bne _02240E5E - mov r0, #0 - str r0, [sp, #0x50] - b _02240E64 -_02240E5E: - mov r0, #1 - str r0, [sp, #0x10] - str r0, [sp, #0x50] -_02240E64: - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02240E70 - add sp, #0xb4 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02240E70: - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206A984 - cmp r0, #0 - beq _02240E84 - mov r0, #1 - str r0, [sp, #0xc] - b _02240E88 -_02240E84: - mov r0, #0 - str r0, [sp, #0xc] -_02240E88: - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _02240EF0 - ldr r0, [sp, #0x50] - cmp r0, #0 - bne _02240EF0 - add r0, r5, #0 - add r1, sp, #0x28 - bl ov6_02242440 - cmp r0, #0 - beq _02240EF0 - ldr r0, [sp, #0x28] - mov r1, #6 - bl sub_0202D93C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, sp, #0x30 - bl ov6_02242388 - cmp r0, #0 - bne _02240EEA - mov r0, #0xb - add r1, r0, #0 - add r1, #0xf5 - bl sub_02051D8C - str r0, [sp, #0x2c] - add r1, r5, #0 - bl sub_02052314 - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x2c] - bl ov6_0224239C - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - bl sub_02069434 - ldr r1, [sp, #0x2c] - add r0, r5, #0 - bl sub_02050E10 - add sp, #0xb4 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02240EEA: - add sp, #0xb4 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02240EF0: - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _02240F0E - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206AE5C - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - add r2, sp, #0x2c - bl ov6_02242328 - b _02240F18 -_02240F0E: - mov r0, #0xb - mov r1, #0x4a - bl sub_02051D8C - str r0, [sp, #0x2c] -_02240F18: - ldr r0, [sp, #0x2c] - add r1, r5, #0 - bl sub_02052314 - add r0, sp, #0x24 - ldrb r0, [r0, #1] - cmp r0, #0 - bne _02240FDC - mov r7, #4 - mov r0, #0 - add r1, r4, #0 - add r2, sp, #0x54 - add r3, r7, #0 -_02240F32: - ldr r6, [r1, #8] - add r0, r0, #1 - str r6, [r2, #0] - ldrsb r6, [r1, r7] - strh r6, [r2, #4] - ldrsb r6, [r1, r3] - add r1, #8 - strh r6, [r2, #6] - add r2, #8 - cmp r0, #0xc - blt _02240F32 - add r0, r5, #0 - bl sub_0203D174 - bl sub_02027560 - bl sub_02027474 - add r6, r0, #0 - add r0, r4, #0 - add r1, sp, #0x64 - add r2, sp, #0x6c - bl ov6_02240C9C - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x54 - add r3, sp, #0x5c - bl ov6_02240CC8 - add r0, r5, #0 - add r1, r6, #0 - add r2, sp, #0x84 - add r3, sp, #0x8c - bl ov6_02240D00 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0x94 - add r3, sp, #0x9c - bl ov6_022477B8 - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _02240FB2 - ldr r1, [sp, #0x18] - add r0, r5, #0 - add r2, r6, #0 - add r3, sp, #0x54 - bl ov6_02242354 - add r0, sp, #0x54 - str r0, [sp] - add r0, sp, #0x30 - str r0, [sp, #4] - add r0, sp, #0x44 - str r0, [sp, #8] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x2c] - add r0, r5, #0 - add r3, r4, #0 - bl ov6_02241674 - b _02241024 -_02240FB2: - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206B034 - ldr r1, [sp, #0x2c] - mov r2, #0xb - str r0, [r1, #0x20] - ldr r0, [sp, #0x2c] - ldr r1, [r5, #0xc] - bl sub_02079170 - add r0, sp, #0x30 - str r0, [sp] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x2c] - add r0, r5, #0 - add r3, sp, #0x54 - bl ov6_0224174C - b _02241024 -_02240FDC: - cmp r0, #1 - bne _02241014 - mov r0, #0 - add r1, sp, #0x54 - mov r3, #0xd0 - mov r6, #0xd1 -_02240FE8: - add r2, r4, #0 - add r2, #0xd4 - ldr r2, [r2, #0] - add r0, r0, #1 - str r2, [r1, #0] - ldrsb r2, [r4, r3] - strh r2, [r1, #4] - ldrsb r2, [r4, r6] - add r4, #8 - strh r2, [r1, #6] - add r1, #8 - cmp r0, #5 - blt _02240FE8 - add r0, sp, #0x30 - str r0, [sp] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x2c] - add r0, r5, #0 - add r3, sp, #0x54 - bl ov6_02241790 - b _02241024 -_02241014: - bl sub_02022974 - ldr r0, [sp, #0x2c] - bl sub_020520A4 - add sp, #0xb4 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241024: - cmp r0, #0 - beq _02241032 - ldr r1, [sp, #0x2c] - add r0, r5, #0 - bl sub_02050E10 - b _02241036 -_02241032: - mov r0, #0 - str r0, [sp, #0x10] -_02241036: - mov r0, #4 - bl sub_0201833C - cmp r0, #0 - bne _02241044 - bl sub_02022974 -_02241044: - mov r0, #0xb - bl sub_0201833C - cmp r0, #0 - bne _02241052 - bl sub_02022974 -_02241052: - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _0224105E - ldr r0, [sp, #0x2c] - bl sub_020520A4 -_0224105E: - mov r0, #0 - add r5, #0x78 - strh r0, [r5] - ldr r0, [sp, #0x10] - add sp, #0xb4 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02240D5C - - thumb_func_start ov6_0224106C -ov6_0224106C: ; 0x0224106C - push {r4, r5, r6, r7, lr} - sub sp, #0x94 - str r0, [sp, #8] - str r1, [sp, #0xc] - str r2, [sp, #0x10] - bl ov6_02242164 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - bne _02241086 - add sp, #0x94 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241086: - ldr r0, [sp, #8] - ldr r0, [r0, #0xc] - bl sub_0207A268 - mov r1, #0 - bl sub_0207A0FC - str r0, [sp, #0x14] - ldr r0, [sp, #8] - ldr r1, [sp, #0x14] - mov r2, #0 - add r3, sp, #0x20 - bl ov6_02242634 - ldr r0, [sp, #8] - ldr r0, [r0, #0xc] - bl sub_0203A790 - bl sub_0203A74C - add r3, r0, #0 - ldr r0, [sp, #0x14] - add r1, r5, #0 - str r0, [sp] - mov r0, #1 - add r2, sp, #0x20 - bl ov6_0224226C - add r6, r0, #0 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #0x64 - blo _022410D8 - bl sub_02022974 -_022410D8: - cmp r5, r6 - blt _022410E2 - add sp, #0x94 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022410E2: - ldr r0, [sp, #8] - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206AE5C - add r1, r0, #0 - ldr r0, [sp, #8] - ldr r2, [sp, #0x10] - bl ov6_02242328 - ldr r0, [sp, #0x10] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - bl sub_02052314 - ldr r0, [sp, #0x10] - ldr r0, [r0, #0] - bl sub_0205285C - ldr r0, [sp, #8] - ldr r0, [r0, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A2F0 - cmp r0, #0 - beq _02241154 - ldr r0, [sp, #8] - bl ov6_02247660 - cmp r0, #0 - beq _02241154 - add r0, sp, #0x18 - add r0, #1 - add r1, sp, #0x18 - bl ov6_02247794 - add r0, sp, #0x1c - bl ov6_022477A0 - add r0, sp, #0x18 - ldrb r3, [r0, #1] - ldrb r4, [r0] - ldr r2, [sp, #0x1c] - mov r1, #0 - add r0, sp, #0x34 -_0224113E: - lsl r5, r1, #3 - add r1, r1, #1 - lsl r1, r1, #0x18 - add r6, r0, r5 - str r2, [r0, r5] - strh r3, [r6, #4] - lsr r1, r1, #0x18 - strh r4, [r6, #6] - cmp r1, #5 - blo _0224113E - b _022411A2 -_02241154: - ldr r0, [sp, #8] - bl sub_0203A640 - ldr r1, [sp, #0xc] - cmp r1, #0 - beq _0224116A - cmp r1, #1 - beq _02241172 - cmp r1, #2 - beq _0224117A - b _02241180 -_0224116A: - mov r1, #0x4a - lsl r1, r1, #2 - add r4, r0, r1 - b _02241180 -_02241172: - mov r1, #0x55 - lsl r1, r1, #2 - add r4, r0, r1 - b _02241180 -_0224117A: - mov r1, #6 - lsl r1, r1, #6 - add r4, r0, r1 -_02241180: - mov r6, #0 - add r1, sp, #0x34 - mov r7, #1 -_02241186: - lsl r5, r6, #3 - add r3, r4, r5 - ldr r0, [r3, #4] - add r2, r1, r5 - str r0, [r1, r5] - ldrsb r0, [r4, r5] - strh r0, [r2, #4] - ldrsb r0, [r3, r7] - strh r0, [r2, #6] - add r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #5 - blo _02241186 -_022411A2: - add r0, sp, #0x20 - str r0, [sp] - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [sp, #0x14] - ldr r2, [r2, #0] - add r3, sp, #0x34 - bl ov6_022417AC - cmp r0, #0 - bne _022411C2 - add sp, #0x94 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022411C2: - mov r0, #1 - add sp, #0x94 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_0224106C - - thumb_func_start ov6_022411C8 -ov6_022411C8: ; 0x022411C8 - push {r4, r5, r6, r7, lr} - sub sp, #0xac - add r5, r0, #0 - ldr r0, [r5, #0x3c] - str r1, [sp, #0xc] - bl sub_0205EABC - add r4, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r2, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - bl sub_02054F94 - add r1, r0, #0 - add r0, r5, #0 - add r2, sp, #0x1c - bl ov6_02241874 - cmp r0, #0 - bne _022411FC - add sp, #0xac - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022411FC: - ldr r0, [r5, #0xc] - bl sub_0207A268 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203A640 - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0 - bl sub_0207A0FC - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - add r2, r4, #0 - add r3, sp, #0x28 - bl ov6_02242634 - mov r0, #1 - mov r1, #0 - str r0, [sp, #0x30] - add r0, sp, #0x3c - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [sp, #0x2c] - str r1, [r0, #0xc] - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206A984 - cmp r0, #0 - beq _02241248 - mov r0, #1 - str r0, [sp, #0x10] - b _0224124C -_02241248: - mov r0, #0 - str r0, [sp, #0x10] -_0224124C: - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02241294 - add r0, r5, #0 - add r1, sp, #0x20 - bl ov6_02242440 - cmp r0, #0 - beq _02241294 - mov r0, #0xb - add r1, r0, #0 - add r1, #0xf5 - bl sub_02051D8C - str r0, [sp, #0x24] - add r1, r5, #0 - bl sub_02052314 - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x24] - bl ov6_0224239C - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - bl sub_02069434 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x24] - add r0, r5, #0 - bl sub_02050E78 - add sp, #0xac - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02241294: - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _022412B2 - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206AE5C - str r0, [sp, #0x14] - ldr r1, [sp, #0x14] - add r0, r5, #0 - add r2, sp, #0x24 - bl ov6_02242328 - b _022412BC -_022412B2: - mov r0, #0xb - mov r1, #0x4a - bl sub_02051D8C - str r0, [sp, #0x24] -_022412BC: - ldr r0, [sp, #0x24] - add r1, r5, #0 - bl sub_02052314 - add r0, sp, #0x1c - ldrb r0, [r0] - cmp r0, #0 - bne _02241380 - mov r7, #4 - mov r0, #0 - add r1, r4, #0 - add r2, sp, #0x4c - add r3, r7, #0 -_022412D6: - ldr r6, [r1, #8] - add r0, r0, #1 - str r6, [r2, #0] - ldrsb r6, [r1, r7] - strh r6, [r2, #4] - ldrsb r6, [r1, r3] - add r1, #8 - strh r6, [r2, #6] - add r2, #8 - cmp r0, #0xc - blt _022412D6 - add r0, r5, #0 - bl sub_0203D174 - bl sub_02027560 - bl sub_02027474 - add r6, r0, #0 - add r0, r4, #0 - add r1, sp, #0x5c - add r2, sp, #0x64 - bl ov6_02240C9C - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x4c - add r3, sp, #0x54 - bl ov6_02240CC8 - add r0, r5, #0 - add r1, r6, #0 - add r2, sp, #0x7c - add r3, sp, #0x84 - bl ov6_02240D00 - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0x8c - add r3, sp, #0x94 - bl ov6_022477B8 - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02241356 - ldr r1, [sp, #0x14] - add r0, r5, #0 - add r2, r6, #0 - add r3, sp, #0x4c - bl ov6_02242354 - add r0, sp, #0x4c - str r0, [sp] - add r0, sp, #0x28 - str r0, [sp, #4] - add r0, sp, #0x3c - str r0, [sp, #8] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x24] - add r0, r5, #0 - add r3, r4, #0 - bl ov6_02241674 - b _022413C2 -_02241356: - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206B034 - ldr r1, [sp, #0x24] - mov r2, #0xb - str r0, [r1, #0x20] - ldr r0, [sp, #0x24] - ldr r1, [r5, #0xc] - bl sub_02079170 - add r0, sp, #0x28 - str r0, [sp] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x24] - add r0, r5, #0 - add r3, sp, #0x4c - bl ov6_0224174C - b _022413C2 -_02241380: - cmp r0, #1 - bne _022413B8 - mov r0, #0 - add r1, sp, #0x4c - mov r3, #0xd0 - mov r6, #0xd1 -_0224138C: - add r2, r4, #0 - add r2, #0xd4 - ldr r2, [r2, #0] - add r0, r0, #1 - str r2, [r1, #0] - ldrsb r2, [r4, r3] - strh r2, [r1, #4] - ldrsb r2, [r4, r6] - add r4, #8 - strh r2, [r1, #6] - add r1, #8 - cmp r0, #5 - blt _0224138C - add r0, sp, #0x28 - str r0, [sp] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x24] - add r0, r5, #0 - add r3, sp, #0x4c - bl ov6_02241790 - b _022413C2 -_022413B8: - bl sub_02022974 - add sp, #0xac - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_022413C2: - cmp r0, #0 - beq _022413D2 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x24] - add r0, r5, #0 - bl sub_02050E78 - b _022413D6 -_022413D2: - bl sub_02022974 -_022413D6: - mov r0, #0 - add r5, #0x78 - strh r0, [r5] - mov r0, #1 - add sp, #0xac - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022411C8 - - thumb_func_start ov6_022413E4 -ov6_022413E4: ; 0x022413E4 - push {r4, r5, r6, r7, lr} - sub sp, #0xac - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0 - str r0, [r4, #0] - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r2, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_02054F94 - add r7, r0, #0 - add r2, sp, #0x20 - add r0, r5, #0 - add r1, r7, #0 - add r2, #1 - bl ov6_02241874 - add r1, sp, #0x20 - strb r0, [r1] - ldrb r0, [r1] - cmp r0, #0 - bne _02241426 - add sp, #0xac - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241426: - ldr r0, [r5, #0xc] - bl sub_0207A268 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0203A640 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r1, #0 - bl sub_0207A0FC - str r0, [sp, #0x1c] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x14] - add r0, r5, #0 - add r3, sp, #0x28 - bl ov6_02242634 - ldr r0, [r5, #0xc] - bl sub_0202D834 - bl sub_0202D9D8 - cmp r0, #0 - bne _02241470 - add r0, r6, #0 - bl sub_02054A40 - mov r1, #1 - str r1, [sp, #0x2c] - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - add r1, sp, #0x20 - strb r0, [r1, #0x14] -_02241470: - ldr r0, [r5, #0xc] - bl sub_0203A790 - bl sub_0203A74C - add r3, r0, #0 - ldr r0, [sp, #0x1c] - add r1, sp, #0x20 - str r0, [sp] - ldrb r1, [r1] - mov r0, #0 - add r2, sp, #0x28 - bl ov6_0224226C - add r1, sp, #0x20 - strb r0, [r1] - add r0, r5, #0 - add r1, sp, #0x20 - bl ov6_02241ABC - ldr r0, [sp, #0x1c] - add r1, sp, #0x20 - bl ov6_02241A90 - add r1, sp, #0x20 - ldrb r1, [r1] - add r0, r5, #0 - add r2, r7, #0 - bl ov6_022417C8 - cmp r0, #0 - beq _022414B6 - mov r0, #1 - str r0, [sp, #0x10] - b _022414BA -_022414B6: - mov r0, #0 - str r0, [sp, #0x10] -_022414BA: - add r1, sp, #0x3c - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - str r0, [r1, #0xc] - str r0, [sp, #0x48] - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206A984 - cmp r0, #0 - beq _022414DC - mov r0, #1 - str r0, [sp, #0xc] - b _022414E0 -_022414DC: - mov r0, #0 - str r0, [sp, #0xc] -_022414E0: - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _02241538 - add r0, r5, #0 - add r1, sp, #0x24 - bl ov6_02242440 - cmp r0, #0 - beq _02241538 - ldr r0, [sp, #0x24] - mov r1, #6 - bl sub_0202D93C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - add r1, sp, #0x28 - bl ov6_02242388 - cmp r0, #0 - bne _02241532 - mov r0, #0xb - add r1, r0, #0 - add r1, #0xf5 - bl sub_02051D8C - str r0, [r4, #0] - add r1, r5, #0 - bl sub_02052314 - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x24] - ldr r2, [r4, #0] - bl ov6_0224239C - add r5, #0x94 - ldr r0, [r5, #0] - bl sub_02069434 - add sp, #0xac - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02241532: - add sp, #0xac - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241538: - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _02241556 - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206AE5C - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - add r2, r4, #0 - bl ov6_02242328 - b _02241560 -_02241556: - mov r0, #0xb - mov r1, #0x4a - bl sub_02051D8C - str r0, [r4, #0] -_02241560: - ldr r0, [r4, #0] - add r1, r5, #0 - bl sub_02052314 - add r0, sp, #0x20 - ldrb r0, [r0, #1] - cmp r0, #0 - bne _02241624 - mov r7, #4 - ldr r1, [sp, #0x14] - mov r0, #0 - add r2, sp, #0x4c - add r3, r7, #0 -_0224157A: - ldr r6, [r1, #8] - add r0, r0, #1 - str r6, [r2, #0] - ldrsb r6, [r1, r7] - strh r6, [r2, #4] - ldrsb r6, [r1, r3] - add r1, #8 - strh r6, [r2, #6] - add r2, #8 - cmp r0, #0xc - blt _0224157A - add r0, r5, #0 - bl sub_0203D174 - bl sub_02027560 - bl sub_02027474 - add r6, r0, #0 - ldr r0, [sp, #0x14] - add r1, sp, #0x5c - add r2, sp, #0x64 - bl ov6_02240C9C - ldr r1, [sp, #0x14] - add r0, r5, #0 - add r2, sp, #0x4c - add r3, sp, #0x54 - bl ov6_02240CC8 - add r0, r5, #0 - add r1, r6, #0 - add r2, sp, #0x7c - add r3, sp, #0x84 - bl ov6_02240D00 - ldr r0, [sp, #0x14] - add r1, r6, #0 - add r2, sp, #0x8c - add r3, sp, #0x94 - bl ov6_022477B8 - ldr r0, [sp, #0xc] - cmp r0, #0 - bne _022415FA - ldr r1, [sp, #0x18] - add r0, r5, #0 - add r2, r6, #0 - add r3, sp, #0x4c - bl ov6_02242354 - add r0, sp, #0x4c - str r0, [sp] - add r0, sp, #0x28 - str r0, [sp, #4] - add r0, sp, #0x3c - str r0, [sp, #8] - ldr r1, [sp, #0x1c] - ldr r2, [r4, #0] - ldr r3, [sp, #0x14] - add r0, r5, #0 - bl ov6_02241674 - b _02241634 -_022415FA: - ldr r0, [r5, #0xc] - bl sub_020507E4 - bl sub_0206B034 - ldr r1, [r4, #0] - mov r2, #0xb - str r0, [r1, #0x20] - ldr r0, [r4, #0] - ldr r1, [r5, #0xc] - bl sub_02079170 - add r0, sp, #0x28 - str r0, [sp] - ldr r1, [sp, #0x1c] - ldr r2, [r4, #0] - add r0, r5, #0 - add r3, sp, #0x4c - bl ov6_0224174C - b _02241634 -_02241624: - bl sub_02022974 - ldr r0, [r4, #0] - bl sub_020520A4 - add sp, #0xac - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241634: - cmp r0, #0 - bne _0224163C - mov r0, #0 - str r0, [sp, #0x10] -_0224163C: - mov r0, #4 - bl sub_0201833C - cmp r0, #0 - bne _0224164A - bl sub_02022974 -_0224164A: - mov r0, #0xb - bl sub_0201833C - cmp r0, #0 - bne _02241658 - bl sub_02022974 -_02241658: - ldr r0, [sp, #0x10] - cmp r0, #0 - bne _02241666 - ldr r0, [r4, #0] - bl sub_020520A4 - b _0224166C -_02241666: - mov r0, #0 - add r5, #0x78 - strh r0, [r5] -_0224166C: - ldr r0, [sp, #0x10] - add sp, #0xac - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022413E4 - - thumb_func_start ov6_02241674 -ov6_02241674: ; 0x02241674 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - ldr r6, [sp, #0x38] - add r5, r0, #0 - ldr r0, [r6, #0xc] - add r7, r2, #0 - str r1, [sp, #0x10] - ldr r4, [sp, #0x30] - cmp r0, #0 - beq _02241722 - ldr r0, [r6, #0] - cmp r0, #1 - bne _022416A8 - ldr r0, [r3, #0x7c] - str r0, [r4, #0x20] - add r0, r3, #0 - add r0, #0x80 - ldr r0, [r0, #0] - str r0, [r4, #0x28] - add r0, r3, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r3, #0x88 - str r0, [r4, #0x50] - ldr r0, [r3, #0] - str r0, [r4, #0x58] -_022416A8: - add r0, r5, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, sp, #0x18 - add r2, sp, #0x14 - bl sub_0206978C - ldr r0, [r6, #4] - cmp r0, #1 - bne _022416E4 - add r0, r5, #0 - bl sub_0203D174 - bl sub_02025E38 - bl sub_02025F20 - str r0, [sp] - ldr r0, [sp, #0x34] - mov r2, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - str r0, [sp, #8] - str r7, [sp, #0xc] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - ldr r3, [r6, #8] - bl ov6_02241F2C - b _022416FE -_022416E4: - mov r0, #1 - str r0, [sp] - str r7, [sp, #4] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - str r0, [sp, #8] - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x34] - str r0, [sp, #0xc] - add r0, r5, #0 - add r3, r4, #0 - bl ov6_02241F7C -_022416FE: - add r4, r0, #0 - cmp r4, #0 - beq _02241744 - ldr r0, [r5, #0x3c] - bl sub_0205EABC - add r6, r0, #0 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - add r2, r0, #0 - add r0, r5, #0 - add r5, #0x94 - ldr r3, [r5, #0] - add r1, r6, #0 - bl sub_02069474 - b _02241744 -_02241722: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r1, #0 - ldr r2, [sp, #0x34] - mov r1, #0xff - add r3, r4, #0 - str r7, [sp, #8] - bl ov6_02241DC4 - add r4, r0, #0 - beq _02241744 - add r5, #0x94 - ldr r0, [r5, #0] - bl sub_02069434 -_02241744: - add r0, r4, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02241674 - - thumb_func_start ov6_0224174C -ov6_0224174C: ; 0x0224174C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - mov r0, #0 - add r5, r1, #0 - add r4, r2, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r1, #0xff - add r6, r3, #0 - str r4, [sp, #8] - bl ov6_02241DC4 - cmp r0, #0 - bne _02241774 - add sp, #0xc - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_02241774: - mov r0, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r1, #0xff - add r3, r6, #0 - str r4, [sp, #8] - bl ov6_02241DC4 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_0224174C - - thumb_func_start ov6_02241790 -ov6_02241790: ; 0x02241790 - push {lr} - sub sp, #0xc - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - str r2, [sp, #8] - add r0, r1, #0 - ldr r2, [sp, #0x10] - mov r1, #0xff - bl ov6_02241DC4 - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov6_02241790 - - thumb_func_start ov6_022417AC -ov6_022417AC: ; 0x022417AC - push {lr} - sub sp, #0xc - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r2, [sp, #8] - add r0, r1, #0 - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - bl ov6_02241DC4 - add sp, #0xc - pop {pc} - thumb_func_end ov6_022417AC - - thumb_func_start ov6_022417C8 -ov6_022417C8: ; 0x022417C8 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - lsl r1, r7, #8 - add r5, r0, #0 - add r6, r2, #0 - bl ov6_022418B4 - cmp r0, #0 - bne _02241808 - add r0, r5, #0 - add r0, #0x78 - ldrh r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x78 - strh r1, [r0] - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x64 - blo _02241800 - bl sub_02022974 -_02241800: - cmp r4, #5 - blo _02241808 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02241808: - add r0, r6, #0 - mov r4, #0x28 - bl sub_0205DAD4 - cmp r0, #0 - beq _0224181C - add r4, #0x1e - lsl r0, r4, #0x18 - lsr r4, r0, #0x18 - b _0224182C -_0224181C: - ldr r0, [r5, #0x3c] - bl sub_0205EB74 - cmp r0, #1 - bne _0224182C - add r4, #0x1e - lsl r0, r4, #0x18 - lsr r4, r0, #0x18 -_0224182C: - add r0, r5, #0 - bl sub_02055C40 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246B74 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0x64 - bls _02241844 - mov r4, #0x64 -_02241844: - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #0x64 - blo _0224185C - bl sub_02022974 -_0224185C: - cmp r6, r4 - bge _02241870 - add r0, r5, #0 - add r1, r7, #0 - bl ov6_022418DC - cmp r0, #0 - beq _02241870 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02241870: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022417C8 - - thumb_func_start ov6_02241874 -ov6_02241874: ; 0x02241874 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl sub_0205DE6C - cmp r0, #0 - beq _022418B0 - add r0, r6, #0 - bl sub_0205DB58 - cmp r0, #0 - beq _022418A0 - mov r0, #1 - strb r0, [r4] - add r0, r5, #0 - bl ov6_02242158 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r4, r5, r6, pc} -_022418A0: - mov r0, #0 - strb r0, [r4] - add r0, r5, #0 - bl ov6_0224214C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r4, r5, r6, pc} -_022418B0: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02241874 - - thumb_func_start ov6_022418B4 -ov6_022418B4: ; 0x022418B4 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #0xa - bl sub_020E2178 - lsr r1, r0, #8 - cmp r1, #8 - bls _022418C8 - mov r1, #8 -_022418C8: - mov r0, #8 - add r4, #0x78 - sub r1, r0, r1 - ldrh r0, [r4] - cmp r0, r1 - blo _022418D8 - mov r0, #1 - pop {r4, pc} -_022418D8: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_022418B4 - - thumb_func_start ov6_022418DC -ov6_022418DC: ; 0x022418DC - push {r3, r4, r5, lr} - add r4, r1, #0 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #0x64 - blo _022418F8 - bl sub_02022974 -_022418F8: - cmp r5, r4 - blo _02241900 - mov r0, #0 - pop {r3, r4, r5, pc} -_02241900: - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov6_022418DC - - thumb_func_start ov6_02241904 -ov6_02241904: ; 0x02241904 - push {r4, lr} - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x64 - blo _0224191E - bl sub_02022974 -_0224191E: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x14 - bhs _0224192A - mov r0, #0 - pop {r4, pc} -_0224192A: - blo _02241934 - cmp r0, #0x28 - bhs _02241934 - mov r0, #1 - pop {r4, pc} -_02241934: - cmp r0, #0x28 - blo _02241940 - cmp r0, #0x32 - bhs _02241940 - mov r0, #2 - pop {r4, pc} -_02241940: - cmp r0, #0x32 - blo _0224194C - cmp r0, #0x3c - bhs _0224194C - mov r0, #3 - pop {r4, pc} -_0224194C: - cmp r0, #0x3c - blo _02241958 - cmp r0, #0x46 - bhs _02241958 - mov r0, #4 - pop {r4, pc} -_02241958: - cmp r0, #0x46 - blo _02241964 - cmp r0, #0x50 - bhs _02241964 - mov r0, #5 - pop {r4, pc} -_02241964: - cmp r0, #0x50 - blo _02241970 - cmp r0, #0x55 - bhs _02241970 - mov r0, #6 - pop {r4, pc} -_02241970: - cmp r0, #0x55 - blo _0224197C - cmp r0, #0x5a - bhs _0224197C - mov r0, #7 - pop {r4, pc} -_0224197C: - cmp r0, #0x5a - blo _02241988 - cmp r0, #0x5e - bhs _02241988 - mov r0, #8 - pop {r4, pc} -_02241988: - cmp r0, #0x5e - blo _02241994 - cmp r0, #0x62 - bhs _02241994 - mov r0, #9 - pop {r4, pc} -_02241994: - cmp r0, #0x62 - bne _0224199C - mov r0, #0xa - pop {r4, pc} -_0224199C: - mov r0, #0xb - pop {r4, pc} - thumb_func_end ov6_02241904 - - thumb_func_start ov6_022419A0 -ov6_022419A0: ; 0x022419A0 - push {r4, lr} - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x64 - blo _022419BA - bl sub_02022974 -_022419BA: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0x3c - bhs _022419C6 - mov r0, #0 - pop {r4, pc} -_022419C6: - blo _022419D0 - cmp r0, #0x5a - bhs _022419D0 - mov r0, #1 - pop {r4, pc} -_022419D0: - cmp r0, #0x5a - blo _022419DC - cmp r0, #0x5f - bhs _022419DC - mov r0, #2 - pop {r4, pc} -_022419DC: - cmp r0, #0x5f - blo _022419E8 - cmp r0, #0x63 - bhs _022419E8 - mov r0, #3 - pop {r4, pc} -_022419E8: - mov r0, #4 - pop {r4, pc} - thumb_func_end ov6_022419A0 - - thumb_func_start ov6_022419EC -ov6_022419EC: ; 0x022419EC - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r4, #0 - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #0x64 - blo _02241A0A - bl sub_02022974 -_02241A0A: - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - cmp r5, #0 - beq _02241A1C - cmp r5, #1 - beq _02241A40 - cmp r5, #2 - beq _02241A64 - b _02241A88 -_02241A1C: - cmp r0, #0x3c - bhs _02241A24 - mov r4, #0 - b _02241A8C -_02241A24: - cmp r0, #0x5a - bhs _02241A2C - mov r4, #1 - b _02241A8C -_02241A2C: - cmp r0, #0x5f - bhs _02241A34 - mov r4, #2 - b _02241A8C -_02241A34: - cmp r0, #0x63 - bhs _02241A3C - mov r4, #3 - b _02241A8C -_02241A3C: - mov r4, #4 - b _02241A8C -_02241A40: - cmp r0, #0x28 - bhs _02241A48 - mov r4, #0 - b _02241A8C -_02241A48: - cmp r0, #0x50 - bhs _02241A50 - mov r4, #1 - b _02241A8C -_02241A50: - cmp r0, #0x5f - bhs _02241A58 - mov r4, #2 - b _02241A8C -_02241A58: - cmp r0, #0x63 - bhs _02241A60 - mov r4, #3 - b _02241A8C -_02241A60: - mov r4, #4 - b _02241A8C -_02241A64: - cmp r0, #0x28 - bhs _02241A6C - mov r4, #0 - b _02241A8C -_02241A6C: - cmp r0, #0x50 - bhs _02241A74 - mov r4, #1 - b _02241A8C -_02241A74: - cmp r0, #0x5f - bhs _02241A7C - mov r4, #2 - b _02241A8C -_02241A7C: - cmp r0, #0x63 - bhs _02241A84 - mov r4, #3 - b _02241A8C -_02241A84: - mov r4, #4 - b _02241A8C -_02241A88: - bl sub_02022974 -_02241A8C: - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_022419EC - - thumb_func_start ov6_02241A90 -ov6_02241A90: ; 0x02241A90 - push {r4, lr} - add r4, r1, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - cmp r1, #0xe0 - beq _02241AAC - mov r0, #5 - lsl r0, r0, #6 - cmp r1, r0 - bne _02241AB8 -_02241AAC: - ldrb r0, [r4] - mov r1, #3 - lsl r0, r0, #1 - bl sub_020E1F6C - strb r0, [r4] -_02241AB8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02241A90 - - thumb_func_start ov6_02241ABC -ov6_02241ABC: ; 0x02241ABC - push {r4, lr} - ldr r0, [r0, #0xc] - add r4, r1, #0 - bl sub_0202D834 - bl sub_0202DA04 - cmp r0, #1 - bne _02241AD6 - ldrb r0, [r4] - asr r0, r0, #1 - strb r0, [r4] - pop {r4, pc} -_02241AD6: - cmp r0, #2 - bne _02241AE2 - ldrb r1, [r4] - lsr r0, r1, #1 - add r0, r1, r0 - strb r0, [r4] -_02241AE2: - pop {r4, pc} - thumb_func_end ov6_02241ABC - - thumb_func_start ov6_02241AE4 -ov6_02241AE4: ; 0x02241AE4 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrb r0, [r1, #0xd] - cmp r0, #0 - bne _02241B1E - ldrb r0, [r1, #0xe] - cmp r0, #0x1c - bne _02241B1E - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r5, r0, #0x10 - cmp r5, #2 - blo _02241B04 - bl sub_02022974 -_02241B04: - cmp r5, #0 - bne _02241B1E - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_02074470 - mov r1, #0x19 - bl sub_020E2178 - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} -_02241B1E: - bl sub_0201D2E8 - ldr r1, _02241B3C ; =0x00000A3E - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x19 - blo _02241B34 - bl sub_02022974 -_02241B34: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, pc} - nop -_02241B3C: .word 0x00000A3E - thumb_func_end ov6_02241AE4 - - thumb_func_start ov6_02241B40 -ov6_02241B40: ; 0x02241B40 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - ldrh r2, [r0, #6] - ldrh r1, [r0, #4] - cmp r1, r2 - blo _02241B54 - lsl r0, r2, #0x18 - lsr r5, r0, #0x18 - lsl r0, r1, #0x18 - b _02241B5A -_02241B54: - lsl r0, r1, #0x18 - lsr r5, r0, #0x18 - lsl r0, r2, #0x18 -_02241B5A: - lsr r4, r0, #0x18 - bl sub_0201D2E8 - sub r1, r4, r5 - add r1, r1, #1 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_020E1F6C - lsl r0, r1, #0x18 - lsr r6, r0, #0x18 - ldrb r0, [r7, #0xd] - cmp r0, #0 - bne _02241BA4 - ldrb r0, [r7, #0xe] - cmp r0, #0x37 - beq _02241B84 - cmp r0, #0x48 - beq _02241B84 - cmp r0, #0x2e - bne _02241BA4 -_02241B84: - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r7, r0, #0x10 - cmp r7, #2 - blo _02241B94 - bl sub_02022974 -_02241B94: - cmp r7, #0 - bne _02241BA0 - add r0, r5, r6 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, r6, r7, pc} -_02241BA0: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_02241BA4: - add r0, r5, r6 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02241B40 - - thumb_func_start ov6_02241BAC -ov6_02241BAC: ; 0x02241BAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #0x10] - ldr r6, [sp, #0x40] - str r1, [sp, #0x14] - mov r0, #0xb - str r2, [sp, #0x18] - add r5, r3, #0 - bl sub_02073C74 - str r0, [sp, #0x1c] - bl sub_02073C2C - ldrb r0, [r6, #0xd] - mov r7, #0 - cmp r0, #0 - bne _02241C38 - ldrb r0, [r6, #0xe] - cmp r0, #0x38 - bne _02241C16 - ldr r0, [sp, #0x10] - mov r1, #0x12 - bl sub_020759F0 - cmp r0, #0 - beq _02241C38 - cmp r0, #0xfe - beq _02241C38 - cmp r0, #0xff - beq _02241C38 - bl sub_0201D2E8 - ldr r1, _02241CBC ; =0x00005556 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #3 - blo _02241BFE - bl sub_02022974 -_02241BFE: - cmp r4, #0 - beq _02241C38 - ldr r0, [sp, #0x44] - mov r1, #0x6f - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x24] - mov r7, #1 - b _02241C38 -_02241C16: - cmp r0, #0x1c - bne _02241C38 - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r4, r0, #0x10 - cmp r4, #2 - blo _02241C2A - bl sub_02022974 -_02241C2A: - cmp r4, #0 - bne _02241C38 - ldr r0, [sp, #0x44] - bl sub_02075BCC - str r0, [sp, #0x20] - mov r7, #1 -_02241C38: - add r0, r5, #0 - bl sub_02075E64 - add r4, r0, #0 - cmp r7, #0 - beq _02241C86 -_02241C44: - ldrb r0, [r6, #0xe] - cmp r0, #0x38 - bne _02241C6C - ldr r0, [sp, #0x10] - add r1, r4, #0 - bl sub_02075DAC - add r7, r0, #0 - cmp r7, #2 - bne _02241C5C - bl sub_02022974 -_02241C5C: - ldr r0, [sp, #0x24] - cmp r7, r0 - bne _02241C86 - add r0, r5, #0 - bl sub_02075E64 - add r4, r0, #0 - b _02241C44 -_02241C6C: - cmp r0, #0x1c - bne _02241C44 - add r0, r4, #0 - bl sub_02075BFC - ldr r1, [sp, #0x20] - cmp r0, r1 - beq _02241C86 - add r0, r5, #0 - bl sub_02075E64 - add r4, r0, #0 - b _02241C44 -_02241C86: - mov r0, #1 - str r0, [sp] - str r4, [sp, #4] - str r0, [sp, #8] - ldr r0, [r6, #0] - mov r3, #0x20 - str r0, [sp, #0xc] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - bl sub_02073D80 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x48] - add r1, r6, #0 - bl ov6_02242514 - cmp r0, #0 - bne _02241CB2 - bl sub_02022974 -_02241CB2: - ldr r0, [sp, #0x1c] - bl sub_020181C4 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241CBC: .word 0x00005556 - thumb_func_end ov6_02241BAC - - thumb_func_start ov6_02241CC0 -ov6_02241CC0: ; 0x02241CC0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - mov r0, #0xb - str r1, [sp, #0xc] - str r2, [sp, #0x10] - add r5, r3, #0 - bl sub_02073C74 - add r4, r0, #0 - bl sub_02073C2C - add r0, r7, #0 - mov r1, #0x12 - mov r6, #1 - bl sub_020759F0 - cmp r0, #0 - beq _02241CEE - cmp r0, #0xfe - beq _02241CEE - cmp r0, #0xff - bne _02241CF0 -_02241CEE: - mov r6, #0 -_02241CF0: - cmp r6, #0 - beq _02241D80 - ldrb r0, [r5, #0xd] - cmp r0, #0 - bne _02241D80 - ldrb r0, [r5, #0xe] - cmp r0, #0x38 - bne _02241D80 - bl sub_0201D2E8 - ldr r1, _02241DC0 ; =0x00005556 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #3 - blo _02241D16 - bl sub_02022974 -_02241D16: - cmp r6, #0 - beq _02241D80 - ldr r0, [sp, #0x28] - mov r1, #0x6f - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - cmp r6, #1 - bne _02241D30 - mov r6, #0 - b _02241D3C -_02241D30: - cmp r6, #0 - bne _02241D38 - mov r6, #1 - b _02241D3C -_02241D38: - bl sub_02022974 -_02241D3C: - ldr r0, [sp, #0x28] - add r1, r5, #0 - bl ov6_02241AE4 - str r6, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r2, [sp, #0xc] - add r0, r4, #0 - add r1, r7, #0 - mov r3, #0x20 - bl sub_02074088 - add r0, r4, #0 - mov r1, #7 - add r2, r5, #0 - bl sub_02074B30 - ldr r0, [sp, #0x10] - ldr r3, [sp, #0x2c] - add r1, r5, #0 - add r2, r4, #0 - bl ov6_02242514 - cmp r0, #0 - bne _02241D76 - bl sub_02022974 -_02241D76: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_02241D80: - ldr r0, [sp, #0x28] - add r1, r5, #0 - bl ov6_02241AE4 - str r0, [sp] - ldr r2, [sp, #0xc] - add r0, r4, #0 - add r1, r7, #0 - mov r3, #0x20 - bl sub_02074044 - add r0, r4, #0 - mov r1, #7 - add r2, r5, #0 - bl sub_02074B30 - ldr r0, [sp, #0x10] - ldr r3, [sp, #0x2c] - add r1, r5, #0 - add r2, r4, #0 - bl ov6_02242514 - cmp r0, #0 - bne _02241DB4 - bl sub_02022974 -_02241DB4: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02241DC0: .word 0x00005556 - thumb_func_end ov6_02241CC0 - - thumb_func_start ov6_02241DC4 -ov6_02241DC4: ; 0x02241DC4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #0xc] - mov r7, #0 - add r1, sp, #0x10 - strb r7, [r1] - add r1, sp, #0x18 - ldrb r1, [r1, #0x10] - add r6, r0, #0 - add r5, r2, #0 - add r4, r3, #0 - cmp r1, #0 - beq _02241DE8 - cmp r1, #1 - beq _02241E44 - cmp r1, #2 - beq _02241E90 - b _02241EDE -_02241DE8: - mov r1, #8 - str r1, [sp] - mov r1, #0x2a - str r1, [sp, #4] - add r1, sp, #0x10 - str r1, [sp, #8] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0xc - bl ov6_0224222C - cmp r0, #0 - bne _02241E26 - mov r0, #0xd - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - add r0, sp, #0x10 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0xc - bl ov6_0224222C - cmp r0, #0 - bne _02241E26 - bl ov6_02241904 - add r1, sp, #0x10 - strb r0, [r1] -_02241E26: - add r2, sp, #0x10 - ldrb r2, [r2] - add r0, r4, #0 - add r1, r5, #0 - bl ov6_022425D4 - add r1, sp, #0x10 - strb r0, [r1] - ldrb r0, [r1] - lsl r0, r0, #3 - add r0, r4, r0 - ldrh r0, [r0, #4] - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - b _02241EE2 -_02241E44: - mov r1, #8 - str r1, [sp] - mov r1, #0x2a - str r1, [sp, #4] - add r1, sp, #0x10 - str r1, [sp, #8] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #5 - bl ov6_0224222C - mov r0, #0xd - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - add r0, sp, #0x10 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #5 - bl ov6_0224222C - cmp r0, #0 - bne _02241E7E - bl ov6_022419A0 - add r1, sp, #0x10 - strb r0, [r1] -_02241E7E: - add r0, sp, #0x10 - ldrb r0, [r0] - add r1, r5, #0 - lsl r0, r0, #3 - add r0, r4, r0 - bl ov6_02241B40 - add r7, r0, #0 - b _02241EE2 -_02241E90: - mov r1, #8 - str r1, [sp] - mov r1, #0x2a - str r1, [sp, #4] - add r1, sp, #0x10 - str r1, [sp, #8] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #5 - bl ov6_0224222C - mov r0, #0xd - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - add r0, sp, #0x10 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #5 - bl ov6_0224222C - cmp r0, #0 - bne _02241ECC - ldr r0, [sp, #0xc] - bl ov6_022419EC - add r1, sp, #0x10 - strb r0, [r1] -_02241ECC: - add r0, sp, #0x10 - ldrb r0, [r0] - add r1, r5, #0 - lsl r0, r0, #3 - add r0, r4, r0 - bl ov6_02241B40 - add r7, r0, #0 - b _02241EE2 -_02241EDE: - bl sub_02022974 -_02241EE2: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov6_022422D0 - cmp r0, #0 - beq _02241EF6 - add sp, #0x14 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241EF6: - add r0, r7, #0 - add r1, r5, #0 - bl ov6_02242388 - cmp r0, #1 - bne _02241F08 - add sp, #0x14 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02241F08: - ldr r0, [sp, #0x30] - str r6, [sp] - str r0, [sp, #4] - add r0, sp, #0x10 - ldrb r0, [r0] - ldr r2, [sp, #0x2c] - add r1, r7, #0 - lsl r0, r0, #3 - ldr r0, [r4, r0] - add r3, r5, #0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl ov6_02241CC0 - mov r0, #1 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02241DC4 - - thumb_func_start ov6_02241F2C -ov6_02241F2C: ; 0x02241F2C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _02241F40 - bl sub_02022974 -_02241F40: - lsl r0, r4, #0x18 - lsr r1, r0, #0x18 - cmp r7, #0 - beq _02241F62 - ldr r0, [sp, #0x24] - ldr r3, [sp, #0x20] - str r0, [sp] - ldr r0, [sp, #0x28] - add r2, r6, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - str r0, [sp, #8] - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - bl ov6_02241BAC - b _02241F76 -_02241F62: - ldr r0, [sp, #0x28] - ldr r3, [sp, #0x24] - str r0, [sp] - ldr r0, [sp, #0x2c] - add r2, r6, #0 - str r0, [sp, #4] - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - bl ov6_02241CC0 -_02241F76: - mov r0, #1 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02241F2C - - thumb_func_start ov6_02241F7C -ov6_02241F7C: ; 0x02241F7C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - add r6, r1, #0 - mov r1, #0 - add r0, sp, #0x10 - strb r1, [r0] - mov r0, #8 - str r0, [sp] - mov r0, #0x2a - add r5, r3, #0 - str r0, [sp, #4] - add r0, sp, #0x10 - str r0, [sp, #8] - str r2, [sp, #0xc] - add r1, r2, #0 - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0xc - bl ov6_0224222C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bne _02241FD2 - mov r0, #0xd - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - add r0, sp, #0x10 - str r0, [sp, #8] - ldr r1, [sp, #0xc] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0xc - bl ov6_0224222C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bne _02241FD2 - bl ov6_02241904 - add r1, sp, #0x10 - strb r0, [r1] -_02241FD2: - add r0, sp, #0x10 - ldrb r0, [r0] - lsl r0, r0, #3 - add r1, r5, r0 - ldrh r1, [r1, #4] - ldr r5, [r5, r0] - ldr r0, [sp, #0x30] - lsl r1, r1, #0x18 - lsr r7, r1, #0x18 - cmp r0, #0 - bne _02241FFE - add r0, r4, #0 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, r5, #0 - add r2, r7, #0 - bl sub_02069774 - add r0, r4, #0 - bl sub_02069B74 - b _0224201A -_02241FFE: - cmp r5, r0 - bne _02242012 - add r5, r0, #0 - ldr r0, [sp, #0x34] - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r4, #0 - bl sub_02069B74 - b _0224201A -_02242012: - add r4, #0x94 - ldr r0, [r4, #0] - bl sub_02069434 -_0224201A: - ldr r0, [sp, #0x2c] - str r6, [sp] - str r0, [sp, #4] - lsl r0, r5, #0x10 - ldr r2, [sp, #0x28] - ldr r3, [sp, #0xc] - lsr r0, r0, #0x10 - add r1, r7, #0 - bl ov6_02241CC0 - mov r0, #1 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02241F7C - - thumb_func_start ov6_02242034 -ov6_02242034: ; 0x02242034 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - add r4, r1, #0 - bl ov5_021EFFE4 - str r0, [sp, #8] - ldr r0, [r5, #0xc] - bl sub_0207A268 - mov r1, #0 - bl sub_0207A0FC - str r0, [sp, #0xc] - ldr r1, [sp, #0xc] - add r0, r5, #0 - mov r2, #0 - add r3, sp, #0x10 - bl ov6_02242634 - bl sub_0201D2E8 - ldr r1, _022420D0 ; =0x00001746 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #0xb - blo _02242072 - bl sub_02022974 -_02242072: - add r0, r6, #5 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, sp, #0x10 - ldrb r1, [r0, #0xd] - cmp r1, #0 - bne _022420A4 - ldrb r0, [r0, #0xe] - cmp r0, #0x37 - beq _0224208E - cmp r0, #0x48 - beq _0224208E - cmp r0, #0x2e - bne _022420A4 -_0224208E: - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r6, r0, #0x10 - cmp r6, #2 - blo _0224209E - bl sub_02022974 -_0224209E: - cmp r6, #0 - beq _022420A4 - mov r7, #0xf -_022420A4: - add r0, r5, #0 - bl ov5_021F0040 - mov r1, #0x63 - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #2 - orr r0, r2 - str r0, [r4, r1] - ldr r0, [sp, #0xc] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #8] - mov r2, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add r3, sp, #0x10 - str r4, [sp, #4] - bl ov6_02241CC0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022420D0: .word 0x00001746 - thumb_func_end ov6_02242034 - - thumb_func_start ov6_022420D4 -ov6_022420D4: ; 0x022420D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - str r2, [sp, #8] - ldr r0, [r5, #0xc] - add r7, r1, #0 - add r6, r3, #0 - bl sub_0207A268 - mov r1, #0 - bl sub_0207A0FC - add r4, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - add r3, sp, #0xc - bl ov6_02242634 - str r4, [sp] - str r6, [sp, #4] - ldr r1, [sp, #8] - add r0, r7, #0 - mov r2, #1 - add r3, sp, #0xc - bl ov6_02241CC0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022420D4 - - thumb_func_start ov6_02242110 -ov6_02242110: ; 0x02242110 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r4, #0 - bl sub_0205DE6C - cmp r0, #0 - beq _0224213E - add r0, r6, #0 - bl sub_0205DB58 - cmp r0, #0 - beq _02242136 - add r0, r5, #0 - bl ov6_02242158 - add r4, r0, #0 - b _0224213E -_02242136: - add r0, r5, #0 - bl ov6_0224214C - add r4, r0, #0 -_0224213E: - cmp r4, #0 - beq _02242146 - mov r0, #1 - pop {r4, r5, r6, pc} -_02242146: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02242110 - - thumb_func_start ov6_0224214C -ov6_0224214C: ; 0x0224214C - push {r3, lr} - bl sub_0203A640 - ldr r0, [r0, #0] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_0224214C - - thumb_func_start ov6_02242158 -ov6_02242158: ; 0x02242158 - push {r3, lr} - bl sub_0203A640 - add r0, #0xcc - ldr r0, [r0, #0] - pop {r3, pc} - thumb_func_end ov6_02242158 - - thumb_func_start ov6_02242164 -ov6_02242164: ; 0x02242164 - push {r4, lr} - add r4, r1, #0 - bl sub_0203A640 - cmp r4, #0 - beq _0224217A - cmp r4, #1 - beq _02242182 - cmp r4, #2 - beq _0224218A - b _02242192 -_0224217A: - mov r1, #0x49 - lsl r1, r1, #2 - ldr r0, [r0, r1] - pop {r4, pc} -_02242182: - mov r1, #0x15 - lsl r1, r1, #4 - ldr r0, [r0, r1] - pop {r4, pc} -_0224218A: - mov r1, #0x5f - lsl r1, r1, #2 - ldr r0, [r0, r1] - pop {r4, pc} -_02242192: - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02242164 - - thumb_func_start ov6_0224219C -ov6_0224219C: ; 0x0224219C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - mov r0, #0 - str r1, [sp] - add r7, r2, #0 - str r3, [sp, #4] - add r4, r0, #0 - add r1, sp, #0x10 -_022421AE: - strb r4, [r1, r0] - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #0xc - blo _022421AE - ldr r0, [sp] - add r5, r4, #0 - cmp r0, #0 - bls _02242204 -_022421C2: - lsl r0, r5, #3 - str r0, [sp, #0xc] - ldr r0, [r6, r0] - mov r1, #6 - bl sub_020759F0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - mov r1, #7 - ldr r0, [r6, r0] - bl sub_020759F0 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - ldr r0, [sp, #8] - cmp r0, r7 - beq _022421EC - cmp r1, r7 - bne _022421F8 -_022421EC: - add r1, r4, #1 - lsl r1, r1, #0x18 - add r0, r4, #0 - lsr r4, r1, #0x18 - add r1, sp, #0x10 - strb r5, [r1, r0] -_022421F8: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldr r0, [sp] - cmp r5, r0 - blo _022421C2 -_02242204: - cmp r4, #0 - beq _0224220E - ldr r0, [sp] - cmp r4, r0 - bne _02242214 -_0224220E: - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02242214: - bl sub_0201D2E8 - add r1, r4, #0 - bl sub_020E1F6C - add r0, sp, #0x10 - ldrb r1, [r0, r1] - ldr r0, [sp, #4] - strb r1, [r0] - mov r0, #1 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_0224219C - - thumb_func_start ov6_0224222C -ov6_0224222C: ; 0x0224222C - push {r4, r5, r6, lr} - ldrb r0, [r1, #0xd] - add r5, r2, #0 - add r6, r3, #0 - cmp r0, #0 - bne _02242266 - add r0, sp, #0 - ldrb r1, [r1, #0xe] - ldrb r0, [r0, #0x14] - cmp r1, r0 - bne _02242266 - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r4, r0, #0x10 - cmp r4, #2 - blo _02242252 - bl sub_02022974 -_02242252: - cmp r4, #0 - bne _02242266 - add r2, sp, #0 - ldrb r2, [r2, #0x10] - ldr r3, [sp, #0x18] - add r0, r5, #0 - add r1, r6, #0 - bl ov6_0224219C - pop {r4, r5, r6, pc} -_02242266: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_0224222C - - thumb_func_start ov6_0224226C -ov6_0224226C: ; 0x0224226C - push {r3, r4} - ldrb r4, [r2, #0xd] - cmp r4, #0 - bne _022422C8 - cmp r0, #0 - ldrb r0, [r2, #0xe] - beq _0224227E - cmp r0, #0x3c - b _022422C2 -_0224227E: - cmp r0, #0x47 - beq _0224228A - cmp r0, #0x63 - beq _0224228A - cmp r0, #0x23 - bne _0224228E -_0224228A: - lsl r1, r1, #1 - b _022422C2 -_0224228E: - cmp r0, #8 - bne _0224229E - cmp r3, #0xa - bne _022422C2 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - b _022422C2 -_0224229E: - cmp r0, #0x51 - bne _022422B0 - sub r0, r3, #5 - cmp r0, #2 - bhi _022422C2 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - b _022422C2 -_022422B0: - cmp r0, #0x49 - beq _022422BC - cmp r0, #0x5f - beq _022422BC - cmp r0, #1 - bne _022422C2 -_022422BC: - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 -_022422C2: - cmp r1, #0x64 - ble _022422C8 - mov r1, #0x64 -_022422C8: - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - pop {r3, r4} - bx lr - thumb_func_end ov6_0224226C - - thumb_func_start ov6_022422D0 -ov6_022422D0: ; 0x022422D0 - push {r4, lr} - add r4, r2, #0 - ldr r2, [r0, #8] - cmp r2, #0 - beq _022422DE - mov r0, #0 - pop {r4, pc} -_022422DE: - ldrb r2, [r0, #0xd] - cmp r2, #0 - bne _02242322 - ldrb r0, [r0, #0xe] - cmp r0, #0x33 - beq _022422EE - cmp r0, #0x16 - bne _02242322 -_022422EE: - add r0, r1, #0 - mov r1, #0xa1 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #5 - bhi _02242304 - mov r0, #0 - pop {r4, pc} -_02242304: - sub r0, r0, #5 - cmp r4, r0 - bgt _02242322 - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r4, r0, #0x10 - cmp r4, #2 - blo _0224231A - bl sub_02022974 -_0224231A: - cmp r4, #0 - bne _02242322 - mov r0, #1 - pop {r4, pc} -_02242322: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022422D0 - - thumb_func_start ov6_02242328 -ov6_02242328: ; 0x02242328 - push {r4, lr} - add r4, r2, #0 - cmp r1, #0 - bne _0224233C - mov r0, #0xb - mov r1, #0 - bl sub_02051D8C - str r0, [r4, #0] - pop {r4, pc} -_0224233C: - ldr r0, [r0, #0xc] - bl sub_0203A790 - bl sub_0203A784 - add r1, r0, #0 - ldrh r1, [r1] - mov r0, #0xb - bl sub_02051F24 - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov6_02242328 - - thumb_func_start ov6_02242354 -ov6_02242354: ; 0x02242354 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r6, r2, #0 - add r4, r3, #0 - cmp r1, #0 - beq _02242382 - ldr r0, [r5, #0xc] - bl sub_0202D834 - mov r1, #1 - bl sub_0202D814 - add r1, r4, #0 - add r1, #0x38 - str r1, [sp] - ldr r2, [r5, #0x1c] - add r4, #0x30 - ldr r2, [r2, #0] - add r1, r6, #0 - add r3, r4, #0 - bl ov6_02242F74 -_02242382: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02242354 - - thumb_func_start ov6_02242388 -ov6_02242388: ; 0x02242388 - ldr r2, [r1, #4] - cmp r2, #0 - beq _02242398 - ldrb r1, [r1, #0xc] - cmp r1, r0 - bls _02242398 - mov r0, #1 - bx lr -_02242398: - mov r0, #0 - bx lr - thumb_func_end ov6_02242388 - - thumb_func_start ov6_0224239C -ov6_0224239C: ; 0x0224239C - push {r0, r1, r2, r3} - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - mov r0, #4 - add r6, r2, #0 - bl sub_02073C74 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #4 - bl sub_0202D93C - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #6 - bl sub_0202D93C - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - add r0, r5, #0 - mov r1, #2 - bl sub_0202D93C - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #3 - bl sub_0202D93C - str r0, [sp, #0xc] - add r0, r5, #0 - mov r1, #7 - bl sub_0202D93C - str r0, [sp, #0x14] - add r0, r5, #0 - mov r1, #5 - bl sub_0202D93C - add r1, sp, #0x10 - strh r0, [r1] - ldr r1, [sp, #4] - ldr r0, [sp, #0xc] - lsl r1, r1, #0x10 - str r0, [sp] - ldr r3, [sp, #8] - add r0, r4, #0 - lsr r1, r1, #0x10 - add r2, r7, #0 - bl sub_02074158 - add r0, r4, #0 - mov r1, #7 - add r2, sp, #0x30 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0xa0 - add r2, sp, #0x14 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0xa3 - add r2, sp, #0x10 - bl sub_02074B30 - ldr r0, [r6, #8] - add r1, r4, #0 - bl sub_0207A048 - cmp r0, #0 - bne _02242430 - bl sub_02022974 -_02242430: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov6_0224239C - - thumb_func_start ov6_02242440 -ov6_02242440: ; 0x02242440 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp] - ldr r0, [r0, #0xc] - str r1, [sp, #4] - mov r5, #0 - bl sub_0202D834 - add r6, r0, #0 - add r4, r5, #0 -_02242454: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202D8C4 - bl sub_0206C3C8 - add r7, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202D8F8 - cmp r0, #0 - beq _0224248C - ldr r0, [sp] - ldr r0, [r0, #0x1c] - ldr r0, [r0, #0] - cmp r7, r0 - bne _0224248C - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202D924 - lsl r2, r5, #2 - add r1, sp, #8 - str r0, [r1, r2] - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 -_0224248C: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #6 - blo _02242454 - cmp r5, #0 - bne _022424A0 - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022424A0: - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r4, r0, #0x10 - cmp r4, #2 - blo _022424B0 - bl sub_02022974 -_022424B0: - cmp r4, #0 - bne _022424BA - add sp, #0x20 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022424BA: - cmp r5, #1 - bls _02242502 - cmp r5, #0 - bne _022424C6 - bl sub_02022974 -_022424C6: - cmp r5, #1 - bhi _022424CE - mov r4, #0 - b _022424F6 -_022424CE: - bl sub_0201D2E8 - add r4, r0, #0 - ldr r0, _02242510 ; =0x0000FFFF - add r1, r5, #0 - bl sub_020E1F6C - add r1, r0, #0 - add r1, r1, #1 - lsl r1, r1, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, r5 - blo _022424F6 - bl sub_02022974 -_022424F6: - lsl r1, r4, #2 - add r0, sp, #8 - ldr r1, [r0, r1] - ldr r0, [sp, #4] - str r1, [r0, #0] - b _02242508 -_02242502: - ldr r1, [sp, #8] - ldr r0, [sp, #4] - str r1, [r0, #0] -_02242508: - mov r0, #1 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02242510: .word 0x0000FFFF - thumb_func_end ov6_02242440 - - thumb_func_start ov6_02242514 -ov6_02242514: ; 0x02242514 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - str r0, [sp] - ldrb r0, [r5, #0xd] - add r7, r2, #0 - str r3, [sp, #4] - cmp r0, #0 - bne _02242530 - ldrb r0, [r5, #0xe] - cmp r0, #0xe - bne _02242530 - mov r2, #1 - b _02242532 -_02242530: - mov r2, #0 -_02242532: - ldr r1, [sp, #4] - add r0, r7, #0 - ldr r1, [r1, #0] - bl sub_02077F0C - mov r6, #0 - add r0, r7, #0 - mov r1, #5 - add r2, r6, #0 - bl sub_02074470 - ldr r1, _022425C8 ; =0x000001A6 - cmp r0, r1 - bne _02242562 - ldrb r0, [r5, #0xf] - mov r6, #1 - cmp r0, #0 - add r0, sp, #8 - bne _0224255E - mov r1, #0 - strb r1, [r0] - b _022425A6 -_0224255E: - strb r6, [r0] - b _022425A6 -_02242562: - add r1, r1, #1 - cmp r0, r1 - bne _0224257C - ldrb r0, [r5, #0x10] - mov r6, #1 - cmp r0, #0 - add r0, sp, #8 - bne _02242578 - mov r1, #0 - strb r1, [r0] - b _022425A6 -_02242578: - strb r6, [r0] - b _022425A6 -_0224257C: - cmp r0, #0xc9 - bne _022425A6 - ldrb r0, [r5, #0x11] - mov r6, #1 - lsl r1, r0, #3 - ldr r0, _022425CC ; =0x02248FF0 - ldr r0, [r0, r1] - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - bl sub_0201D2E8 - add r1, r4, #0 - bl sub_020E1F6C - ldrb r0, [r5, #0x11] - lsl r2, r0, #3 - ldr r0, _022425D0 ; =0x02248FF4 - ldr r0, [r0, r2] - ldrb r1, [r0, r1] - add r0, sp, #8 - strb r1, [r0] -_022425A6: - cmp r6, #0 - beq _022425B4 - add r0, r7, #0 - mov r1, #0x70 - add r2, sp, #8 - bl sub_02074B30 -_022425B4: - ldr r0, [sp] - lsl r1, r0, #2 - ldr r0, [sp, #4] - add r0, r0, r1 - ldr r0, [r0, #4] - add r1, r7, #0 - bl sub_0207A048 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022425C8: .word 0x000001A6 -_022425CC: .word 0x02248FF0 -_022425D0: .word 0x02248FF4 - thumb_func_end ov6_02242514 - - thumb_func_start ov6_022425D4 -ov6_022425D4: ; 0x022425D4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrb r0, [r1, #0xd] - add r4, r2, #0 - cmp r0, #0 - bne _02242630 - ldrb r0, [r1, #0xe] - cmp r0, #0x48 - beq _022425EE - cmp r0, #0x37 - beq _022425EE - cmp r0, #0x2e - bne _02242630 -_022425EE: - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r6, r0, #0x10 - cmp r6, #2 - blo _022425FE - bl sub_02022974 -_022425FE: - cmp r6, #0 - bne _02242606 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242606: - mov r1, #0 -_02242608: - lsl r2, r1, #3 - lsl r7, r4, #3 - add r6, r5, r2 - ldr r3, [r5, r2] - ldr r2, [r5, r7] - add r0, r5, r7 - cmp r3, r2 - bne _02242622 - ldrh r2, [r6, #4] - ldrh r0, [r0, #4] - cmp r2, r0 - bls _02242622 - add r4, r1, #0 -_02242622: - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, #0xc - blo _02242608 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_02242630: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022425D4 - - thumb_func_start ov6_02242634 -ov6_02242634: ; 0x02242634 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r6, r0, #0 - add r5, r2, #0 - add r0, r7, #0 - mov r1, #0x4c - mov r2, #0 - add r4, r3, #0 - bl sub_02074470 - cmp r0, #0 - bne _0224265A - mov r2, #0 - add r0, r7, #0 - mov r1, #0xa - strb r2, [r4, #0xd] - bl sub_02074470 - b _02242660 -_0224265A: - mov r0, #1 - strb r0, [r4, #0xd] - mov r0, #0x7b -_02242660: - strb r0, [r4, #0xe] - mov r0, #0 - strb r0, [r4, #0xc] - str r0, [r4, #4] - str r0, [r4, #8] - cmp r5, #0 - beq _0224269C - add r1, r5, #0 - add r1, #0x8c - ldr r1, [r1, #0] - strb r1, [r4, #0xf] - add r1, r5, #0 - add r1, #0x90 - ldr r1, [r1, #0] - strb r1, [r4, #0x10] - add r1, r5, #0 - add r1, #0xa0 - ldr r1, [r1, #0] - cmp r1, #0 - beq _0224269A - cmp r1, #8 - ble _02242690 - bl sub_02022974 -_02242690: - add r5, #0xa0 - ldr r0, [r5, #0] - sub r0, r0, #1 - strb r0, [r4, #0x11] - b _0224269C -_0224269A: - strb r0, [r4, #0x11] -_0224269C: - ldr r0, [r6, #0xc] - bl sub_02025E38 - bl sub_02025F20 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02242634 - - thumb_func_start ov6_022426AC -ov6_022426AC: ; 0x022426AC - ldr r3, _022426B4 ; =sub_02018184 - mov r1, #0x17 - lsl r1, r1, #4 - bx r3 - ; .align 2, 0 -_022426B4: .word sub_02018184 - thumb_func_end ov6_022426AC - - thumb_func_start ov6_022426B8 -ov6_022426B8: ; 0x022426B8 - ldr r3, _022426BC ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_022426BC: .word sub_020181C4 - thumb_func_end ov6_022426B8 - - thumb_func_start ov6_022426C0 -ov6_022426C0: ; 0x022426C0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - mov r0, #0x5a - add r4, r1, #0 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r7, r0] - add r0, r4, #0 - mov r1, #0x12 - bl sub_020759F0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - beq _022426E8 - cmp r0, #0xfe - beq _022426EC - cmp r0, #0xff - beq _022426F0 - b _022426F4 -_022426E8: - mov r2, #0 - b _0224270C -_022426EC: - mov r2, #1 - b _0224270C -_022426F0: - mov r2, #2 - b _0224270C -_022426F4: - bl sub_0201D2E8 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - beq _0224270A - mov r2, #0 - b _0224270C -_0224270A: - mov r2, #1 -_0224270C: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - add r0, r7, #0 - lsl r1, r4, #0x10 - lsl r2, r2, #0x18 - add r0, #0x28 - lsr r1, r1, #0x10 - lsr r2, r2, #0x18 - mov r3, #2 - bl sub_02075FB4 - add r1, r7, #0 - mov r0, #1 - add r1, #0x3c - mov r2, #4 - bl sub_020095C4 - str r0, [r7, #0x38] - mov r0, #0x61 - mov r1, #4 - bl sub_02006C24 - ldr r4, _022427F0 ; =0x02249030 - str r0, [sp, #0x10] - mov r6, #0 - add r5, r7, #0 -_02242744: - ldrb r0, [r4] - add r1, r6, #0 - mov r2, #4 - bl sub_02009714 - add r6, r6, #1 - add r4, r4, #1 - stmia r5!, {r0} - cmp r6, #4 - blt _02242744 - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [r7, #0] - ldr r1, [sp, #0x10] - mov r2, #5 - bl sub_02009A4C - str r0, [r7, #0x10] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - ldr r0, [r7, #4] - ldr r1, [sp, #0x10] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - str r0, [r7, #0x14] - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [r7, #8] - ldr r1, [sp, #0x10] - mov r2, #6 - mov r3, #0 - bl sub_02009BC4 - str r0, [r7, #0x18] - mov r0, #3 - str r0, [sp] - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [r7, #0xc] - ldr r1, [sp, #0x10] - mov r2, #0xc - mov r3, #0 - bl sub_02009BC4 - str r0, [r7, #0x1c] - ldrh r0, [r7, #0x28] - ldrh r1, [r7, #0x2a] - mov r2, #4 - bl sub_0201363C - str r0, [r7, #0x20] - ldrh r0, [r7, #0x28] - ldrh r1, [r7, #0x2c] - mov r2, #4 - bl sub_02013660 - str r0, [r7, #0x24] - ldr r0, [r7, #0] - ldr r1, [r7, #4] - ldr r2, [r7, #0x20] - ldr r3, [r7, #0x24] - bl ov6_02242880 - ldr r0, [sp, #0x10] - bl sub_02006CA8 - add r0, r7, #0 - bl ov6_022428F8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_022427F0: .word 0x02249030 - thumb_func_end ov6_022426C0 - - thumb_func_start ov6_022427F4 -ov6_022427F4: ; 0x022427F4 - add r1, r0, #0 - mov r0, #0x5a - mov r2, #1 - lsl r0, r0, #2 - str r2, [r1, r0] - ldr r3, _0224280C ; =sub_0200D9E8 - mov r2, #0 - add r0, r0, #4 - str r2, [r1, r0] - ldr r0, _02242810 ; =ov6_02242860 - bx r3 - nop -_0224280C: .word sub_0200D9E8 -_02242810: .word ov6_02242860 - thumb_func_end ov6_022427F4 - - thumb_func_start ov6_02242814 -ov6_02242814: ; 0x02242814 - mov r1, #0x5a - mov r2, #0 - lsl r1, r1, #2 - str r2, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02242814 - - thumb_func_start ov6_02242820 -ov6_02242820: ; 0x02242820 - mov r1, #0x5b - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov6_02242820 - - thumb_func_start ov6_02242828 -ov6_02242828: ; 0x02242828 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x10] - bl sub_0200A4E4 - ldr r0, [r5, #0x14] - bl sub_0200A6DC - mov r4, #0 -_0224283A: - lsl r0, r4, #2 - ldr r0, [r5, r0] - bl sub_02009754 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _0224283A - ldr r0, [r5, #0x38] - bl sub_02021964 - ldr r0, [r5, #0x20] - bl sub_020181C4 - ldr r0, [r5, #0x24] - bl sub_020181C4 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02242828 - - thumb_func_start ov6_02242860 -ov6_02242860: ; 0x02242860 - push {r3, lr} - mov r2, #0x5a - lsl r2, r2, #2 - ldr r3, [r1, r2] - cmp r3, #0 - beq _02242874 - ldr r0, [r1, #0x38] - bl sub_020219F8 - pop {r3, pc} -_02242874: - mov r3, #1 - add r2, r2, #4 - str r3, [r1, r2] - bl sub_0200DA58 - pop {r3, pc} - thumb_func_end ov6_02242860 - - thumb_func_start ov6_02242880 -ov6_02242880: ; 0x02242880 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_02009DC8 - add r5, r0, #0 - add r0, r7, #0 - mov r1, #1 - bl sub_02009DC8 - add r7, r0, #0 - add r0, r5, #0 - bl sub_0200A3DC - add r0, r7, #0 - bl sub_0200A640 - add r0, r5, #0 - bl sub_0200A534 - add r5, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - bl sub_0200A72C - add r7, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl sub_020A81B0 - str r0, [sp] - add r0, r7, #0 - mov r1, #1 - bl sub_020A81FC - mov r1, #0x32 - add r5, r0, #0 - add r0, r4, #0 - lsl r1, r1, #6 - bl sub_020C2C54 - mov r2, #0x32 - ldr r1, [sp] - add r0, r4, #0 - lsl r2, r2, #6 - bl sub_020C02BC - add r0, r6, #0 - mov r1, #0x20 - bl sub_020C2C54 - add r0, r6, #0 - add r1, r5, #0 - mov r2, #0x20 - bl sub_020C0160 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02242880 - - thumb_func_start ov6_022428F8 -ov6_022428F8: ; 0x022428F8 - push {r4, lr} - sub sp, #0x80 - add r4, r0, #0 - mov r0, #3 - str r0, [sp] - sub r0, r0, #4 - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0 - str r1, [sp, #0xc] - str r1, [sp, #0x10] - ldr r0, [r4, #0] - mov r2, #1 - str r0, [sp, #0x14] - ldr r0, [r4, #4] - mov r3, #2 - str r0, [sp, #0x18] - ldr r0, [r4, #8] - str r0, [sp, #0x1c] - ldr r0, [r4, #0xc] - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r0, sp, #0x5c - bl sub_020093B4 - ldr r0, [r4, #0x38] - mov r1, #0 - str r0, [sp, #0x2c] - add r0, sp, #0x5c - str r0, [sp, #0x30] - mov r0, #1 - lsl r0, r0, #0xc - str r1, [sp, #0x34] - str r1, [sp, #0x38] - str r1, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - add r0, sp, #0x2c - strh r1, [r0, #0x20] - mov r0, #1 - str r0, [sp, #0x54] - mov r0, #4 - str r0, [sp, #0x58] - lsl r0, r0, #0x11 - str r0, [sp, #0x34] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x38] - add r0, sp, #0x2c - str r1, [sp, #0x50] - bl sub_02021AA0 - mov r1, #0x59 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x59 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021D6C - add sp, #0x80 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022428F8 - - thumb_func_start ov6_02242984 -ov6_02242984: ; 0x02242984 - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r5, r0, #0 - bl sub_0203A640 - add r4, r0, #0 - mov r0, #0 - add r1, sp, #4 -_02242994: - lsl r2, r0, #3 - add r2, r4, r2 - ldr r3, [r2, #8] - lsl r2, r0, #2 - add r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r3, [r1, r2] - cmp r0, #0xc - blo _02242994 - add r0, r5, #0 - bl sub_0203D174 - bl sub_02027560 - bl sub_02027474 - add r6, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0202D834 - mov r1, #1 - bl sub_0202D814 - add r1, sp, #0x20 - str r1, [sp] - ldr r2, [r5, #0x1c] - add r1, r6, #0 - ldr r2, [r2, #0] - add r3, sp, #0x1c - bl ov6_02242F74 - add r0, r4, #0 - add r1, sp, #0xc - add r2, sp, #0x10 - bl ov6_02240C9C - add r0, r4, #0 - add r1, r6, #0 - add r2, sp, #0x24 - add r3, sp, #0x28 - bl ov6_022477B8 - bl sub_0201D2E8 - ldr r1, _02242A0C ; =0x00001556 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0xc - blo _02242A00 - bl sub_02022974 -_02242A00: - lsl r1, r4, #2 - add r0, sp, #4 - ldr r0, [r0, r1] - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - nop -_02242A0C: .word 0x00001556 - thumb_func_end ov6_02242984 - - thumb_func_start ov6_02242A10 -ov6_02242A10: ; 0x02242A10 - push {r3, r4, r5, r6, r7, lr} - str r1, [sp] - mov r1, #0x34 - bl sub_02018184 - add r5, r0, #0 - ldr r0, [sp] - mov r1, #0xb - str r0, [r5, #0x2c] - mov r0, #0x6a - mov r2, #4 - bl sub_02006ADC - add r7, r0, #0 - mov r4, #0 -_02242A2E: - bl sub_0201D2E8 - ldr r1, _02242A88 ; =0x0000071D - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - cmp r6, #0x24 - blo _02242A44 - bl sub_02022974 -_02242A44: - lsl r0, r6, #0x18 - lsr r2, r0, #0x16 - add r1, r7, r2 - ldrh r2, [r7, r2] - lsl r3, r4, #2 - add r0, r5, r3 - strh r2, [r5, r3] - ldrh r1, [r1, #2] - strh r1, [r0, #2] - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #5 - blo _02242A2E - ldr r0, [sp] - ldr r0, [r0, #0x3c] - bl sub_0205EABC - strh r0, [r5, #0x14] - ldr r0, [sp] - ldr r0, [r0, #0x3c] - bl sub_0205EAC8 - strh r0, [r5, #0x16] - ldr r0, [sp] - ldr r0, [r0, #0x1c] - ldr r0, [r0, #0] - str r0, [r5, #0x30] - add r0, r7, #0 - bl sub_020181C4 - add r0, r5, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02242A88: .word 0x0000071D - thumb_func_end ov6_02242A10 - - thumb_func_start ov6_02242A8C -ov6_02242A8C: ; 0x02242A8C - ldr r3, _02242A90 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_02242A90: .word sub_020181C4 - thumb_func_end ov6_02242A8C - - thumb_func_start ov6_02242A94 -ov6_02242A94: ; 0x02242A94 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _02242AB6 - lsl r2, r5, #2 - ldrh r1, [r4, r2] - add r2, r4, r2 - ldrh r2, [r2, #2] - lsl r1, r1, #0xb - mov r0, #0xf0 - lsl r2, r2, #0xb - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl sub_02039F10 - b _02242AD2 -_02242AB6: - cmp r5, #5 - bne _02242ABE - ldr r0, [r4, #0x30] - b _02242AD2 -_02242ABE: - lsl r2, r5, #2 - ldrh r1, [r4, r2] - add r2, r4, r2 - ldr r0, [r4, #0x2c] - ldrh r2, [r2, #2] - ldr r0, [r0, #0x2c] - lsr r1, r1, #5 - lsr r2, r2, #5 - bl sub_02039E30 -_02242AD2: - lsl r3, r5, #2 - add r1, r4, r3 - ldrh r2, [r1, #2] - ldrh r1, [r4, r3] - str r0, [r4, #0x18] - mov r0, #0 - mvn r0, r0 - str r0, [r4, #0x1c] - str r1, [r4, #0x20] - str r2, [r4, #0x24] - mov r0, #0 - str r0, [r4, #0x28] - pop {r3, r4, r5, pc} - thumb_func_end ov6_02242A94 - - thumb_func_start ov6_02242AEC -ov6_02242AEC: ; 0x02242AEC - add r0, #0x18 - bx lr - thumb_func_end ov6_02242AEC - - thumb_func_start ov6_02242AF0 -ov6_02242AF0: ; 0x02242AF0 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - bl sub_0203D174 - bl sub_02027860 - mov r1, #6 - bl sub_02027F6C - mov r1, #0x42 - lsl r1, r1, #0x10 - str r1, [sp, #8] - mov r1, #1 - lsl r1, r1, #0x10 - str r1, [sp, #0xc] - ldrh r0, [r0] - cmp r0, #0 - beq _02242B20 - cmp r0, #1 - beq _02242B28 - cmp r0, #2 - beq _02242B30 - b _02242B36 -_02242B20: - mov r0, #0xa - lsl r0, r0, #0x12 - str r0, [sp, #0x10] - b _02242B36 -_02242B28: - mov r0, #0x52 - lsl r0, r0, #0x10 - str r0, [sp, #0x10] - b _02242B36 -_02242B30: - mov r0, #0x1b - lsl r0, r0, #0x12 - str r0, [sp, #0x10] -_02242B36: - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0x50] - ldr r2, _02242B54 ; =0x000001DB - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r4, #0x30] - add r3, sp, #8 - bl ov5_021E19CC - add sp, #0x14 - pop {r3, r4, pc} - nop -_02242B54: .word 0x000001DB - thumb_func_end ov6_02242AF0 - - thumb_func_start ov6_02242B58 -ov6_02242B58: ; 0x02242B58 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - str r2, [sp] - bl sub_0203D174 - bl sub_02027860 - mov r1, #6 - bl sub_02027F6C - add r4, r0, #0 - mov r0, #4 - mov r1, #0x14 - bl sub_02018184 - add r5, r0, #0 - add r2, r5, #0 - mov r1, #0x14 - mov r0, #0 -_02242B80: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _02242B80 - mov r0, #0 - strb r0, [r5, #5] - ldrh r1, [r4] - cmp r1, #0 - beq _02242B9C - cmp r1, #1 - beq _02242BC2 - cmp r1, #2 - beq _02242BEA - b _02242C0E -_02242B9C: - mov r1, #1 - strb r1, [r5, #4] - cmp r6, #1 - bne _02242BB2 - mov r0, #0x52 - lsl r0, r0, #0x10 - str r0, [r5, #0xc] - strh r1, [r4] - mov r0, #0x4a - str r0, [r5, #0x10] - b _02242C12 -_02242BB2: - mov r0, #0x1b - lsl r0, r0, #0x12 - str r0, [r5, #0xc] - mov r0, #2 - strh r0, [r4] - mov r0, #0x64 - str r0, [r5, #0x10] - b _02242C12 -_02242BC2: - cmp r6, #0 - bne _02242BD6 - mov r1, #0xa - strb r0, [r5, #4] - lsl r1, r1, #0x12 - str r1, [r5, #0xc] - strh r0, [r4] - mov r0, #0x2e - str r0, [r5, #0x10] - b _02242C12 -_02242BD6: - mov r0, #1 - strb r0, [r5, #4] - mov r0, #0x1b - lsl r0, r0, #0x12 - str r0, [r5, #0xc] - mov r0, #2 - strh r0, [r4] - mov r0, #0x64 - str r0, [r5, #0x10] - b _02242C12 -_02242BEA: - strb r0, [r5, #4] - cmp r6, #0 - bne _02242BFE - mov r1, #0xa - lsl r1, r1, #0x12 - str r1, [r5, #0xc] - strh r0, [r4] - mov r0, #0x2e - str r0, [r5, #0x10] - b _02242C12 -_02242BFE: - mov r0, #0x52 - lsl r0, r0, #0x10 - str r0, [r5, #0xc] - mov r0, #1 - strh r0, [r4] - mov r0, #0x58 - str r0, [r5, #0x10] - b _02242C12 -_02242C0E: - bl sub_02022974 -_02242C12: - ldr r0, [sp] - str r0, [r5, #8] - ldr r0, [sp] - cmp r0, #3 - bne _02242C20 - ldr r0, _02242C30 ; =ov6_02242D94 - b _02242C22 -_02242C20: - ldr r0, _02242C34 ; =ov6_02242E60 -_02242C22: - str r0, [r5, #0] - ldr r0, [r7, #0x10] - ldr r1, _02242C38 ; =ov6_02242C5C - add r2, r5, #0 - bl sub_02050944 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242C30: .word ov6_02242D94 -_02242C34: .word ov6_02242E60 -_02242C38: .word ov6_02242C5C - thumb_func_end ov6_02242B58 - - thumb_func_start ov6_02242C3C -ov6_02242C3C: ; 0x02242C3C - push {r4, lr} - add r4, r1, #0 - bl sub_0203D174 - bl sub_02027860 - mov r1, #6 - bl sub_02027F6C - ldrh r0, [r0] - cmp r0, r4 - bne _02242C58 - mov r0, #5 - pop {r4, pc} -_02242C58: - mov r0, #6 - pop {r4, pc} - thumb_func_end ov6_02242C3C - - thumb_func_start ov6_02242C5C -ov6_02242C5C: ; 0x02242C5C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldrb r1, [r4, #5] - cmp r1, #5 - bls _02242C78 - b _02242D84 -_02242C78: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242C84: ; jump table - .short _02242C90 - _02242C84 - 2 ; case 0 - .short _02242D0C - _02242C84 - 2 ; case 1 - .short _02242D1E - _02242C84 - 2 ; case 2 - .short _02242D30 - _02242C84 - 2 ; case 3 - .short _02242D68 - _02242C84 - 2 ; case 4 - .short _02242D7A - _02242C84 - 2 ; case 5 -_02242C90: - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, _02242D8C ; =0x000001DB - bl ov5_021E18CC - bl ov5_021E18BC - add r7, r0, #0 - ldr r0, _02242D8C ; =0x000001DB - ldr r1, [r5, #0x30] - bl ov5_021EF9E8 - ldr r0, [r0, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _02242CD4 - add r2, r0, #0 - add r2, #8 - beq _02242CC8 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _02242CC8 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _02242CCA -_02242CC8: - mov r1, #0 -_02242CCA: - cmp r1, #0 - beq _02242CD4 - ldr r1, [r1, #0] - add r6, r0, r1 - b _02242CD6 -_02242CD4: - mov r6, #0 -_02242CD6: - ldr r0, [r5, #0x30] - bl ov5_021EFAA0 - str r7, [sp] - str r6, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r3, #0xff - str r3, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r5, #0x50] - ldr r1, [r5, #0x54] - mov r2, #0x10 - add r3, #0xdc - bl ov5_021D41C8 - ldr r0, [r5, #0x54] - mov r1, #0x10 - mov r2, #0 - bl ov5_021D4250 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - b _02242D84 -_02242D0C: - ldr r0, [r4, #8] - cmp r0, #4 - bne _02242D18 - ldr r0, _02242D90 ; =0x000006DB - bl sub_02005748 -_02242D18: - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02242D1E: - ldr r0, _02242D90 ; =0x000006DB - bl sub_020057D4 - cmp r0, #0 - bne _02242D84 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - b _02242D84 -_02242D30: - add r0, r5, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, _02242D8C ; =0x000001DB - bl ov5_021E18CC - add r6, r0, #0 - add r0, sp, #0x18 - add r1, r6, #0 - bl ov5_021E1894 - add r0, r5, #0 - add r2, r4, #0 - ldr r5, [r4, #0] - add r1, r4, #0 - add r2, #0xc - add r3, sp, #0x18 - blx r5 - cmp r0, #0 - beq _02242D5E - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] -_02242D5E: - add r0, r6, #0 - add r1, sp, #0x18 - bl ov5_021E18A4 - b _02242D84 -_02242D68: - ldr r0, [r5, #0x50] - ldr r1, [r5, #0x54] - mov r2, #0x10 - bl ov5_021D42B0 - ldrb r0, [r4, #5] - add r0, r0, #1 - strb r0, [r4, #5] - b _02242D84 -_02242D7A: - bl sub_020181C4 - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02242D84: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02242D8C: .word 0x000001DB -_02242D90: .word 0x000006DB - thumb_func_end ov6_02242C5C - - thumb_func_start ov6_02242D94 -ov6_02242D94: ; 0x02242D94 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldrb r0, [r5, #4] - add r4, r3, #0 - add r6, r2, #0 - cmp r0, #0 - ldr r0, [r4, #8] - bne _02242DF4 - ldrb r1, [r5, #6] - lsl r2, r1, #2 - ldr r1, _02242E54 ; =0x02249074 - ldr r1, [r1, r2] - sub r0, r0, r1 - str r0, [r4, #8] - ldrb r0, [r5, #6] - cmp r0, #6 - bhs _02242E42 - mov r0, #2 - ldr r1, [r4, #8] - lsl r0, r0, #0xe - sub r1, r1, r0 - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - asr r1, r0, #0x10 - ldr r0, [r5, #0x10] - cmp r1, r0 - bgt _02242E42 - ldrb r0, [r5, #7] - add r0, r0, #1 - strb r0, [r5, #7] - ldrb r2, [r5, #6] - ldr r0, _02242E58 ; =0x02249034 - ldrb r1, [r5, #7] - ldrb r0, [r0, r2] - cmp r1, r0 - blo _02242E42 - cmp r2, #0 - bne _02242DE8 - ldr r0, _02242E5C ; =0x000006DA - bl sub_02005748 -_02242DE8: - ldrb r0, [r5, #6] - add r0, r0, #1 - strb r0, [r5, #6] - mov r0, #0 - strb r0, [r5, #7] - b _02242E42 -_02242DF4: - ldrb r1, [r5, #6] - lsl r2, r1, #2 - ldr r1, _02242E54 ; =0x02249074 - ldr r1, [r1, r2] - add r0, r0, r1 - str r0, [r4, #8] - ldrb r0, [r5, #6] - cmp r0, #6 - bhs _02242E42 - mov r0, #2 - ldr r1, [r4, #8] - lsl r0, r0, #0xe - sub r1, r1, r0 - asr r0, r1, #0xf - lsr r0, r0, #0x10 - add r0, r1, r0 - asr r1, r0, #0x10 - ldr r0, [r5, #0x10] - cmp r1, r0 - blt _02242E42 - ldrb r0, [r5, #7] - add r0, r0, #1 - strb r0, [r5, #7] - ldrb r2, [r5, #6] - ldr r0, _02242E58 ; =0x02249034 - ldrb r1, [r5, #7] - ldrb r0, [r0, r2] - cmp r1, r0 - blo _02242E42 - cmp r2, #0 - bne _02242E38 - ldr r0, _02242E5C ; =0x000006DA - bl sub_02005748 -_02242E38: - ldrb r0, [r5, #6] - add r0, r0, #1 - strb r0, [r5, #6] - mov r0, #0 - strb r0, [r5, #7] -_02242E42: - ldr r1, [r4, #8] - ldr r0, [r6, #0] - cmp r1, r0 - bne _02242E4E - mov r0, #1 - pop {r4, r5, r6, pc} -_02242E4E: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02242E54: .word 0x02249074 -_02242E58: .word 0x02249034 -_02242E5C: .word 0x000006DA - thumb_func_end ov6_02242D94 - - thumb_func_start ov6_02242E60 -ov6_02242E60: ; 0x02242E60 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x3c] - add r4, r1, #0 - add r7, r2, #0 - str r3, [sp] - bl sub_0205EB3C - add r6, r0, #0 - ldr r0, [r5, #0x3c] - add r1, sp, #4 - bl sub_0205EAEC - mov r0, #2 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xe - add r1, r1, r0 - ldr r0, [sp] - str r1, [r0, #8] - ldr r0, [r7, #0] - cmp r1, r0 - bne _02242E94 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02242E94: - ldrb r0, [r4, #4] - cmp r0, #0 - bne _02242EFC - add r0, r6, #0 - bl sub_020655F4 - cmp r0, #1 - bne _02242F5C - ldrb r1, [r4, #6] - add r0, r6, #0 - lsl r2, r1, #2 - ldr r1, _02242F64 ; =0x02249058 - ldr r1, [r1, r2] - bl sub_02065638 - ldrb r0, [r4, #6] - cmp r0, #6 - bhs _02242ED8 - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - ldr r1, [r4, #0x10] - cmp r0, r1 - ble _02242ED8 - ldrb r0, [r4, #6] - cmp r0, #0 - bne _02242ED0 - ldr r0, _02242F68 ; =0x000006D9 - bl sub_02005748 -_02242ED0: - ldrb r0, [r4, #6] - add r0, r0, #1 - strb r0, [r4, #6] - b _02242F5C -_02242ED8: - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - ldr r1, [r4, #0x10] - cmp r0, r1 - bgt _02242F5C - ldrb r0, [r4, #6] - cmp r0, #0 - beq _02242F5C - cmp r0, #6 - bne _02242EF4 - ldr r0, _02242F6C ; =0x000006DA - bl sub_02005748 -_02242EF4: - ldrb r0, [r4, #6] - sub r0, r0, #1 - strb r0, [r4, #6] - b _02242F5C -_02242EFC: - add r0, r6, #0 - bl sub_020655F4 - cmp r0, #1 - bne _02242F5C - ldrb r1, [r4, #6] - add r0, r6, #0 - lsl r2, r1, #2 - ldr r1, _02242F70 ; =0x0224903C - ldr r1, [r1, r2] - bl sub_02065638 - ldrb r0, [r4, #6] - cmp r0, #6 - bhs _02242F3A - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - ldr r1, [r4, #0x10] - cmp r0, r1 - bge _02242F3A - ldrb r0, [r4, #6] - cmp r0, #0 - bne _02242F32 - ldr r0, _02242F68 ; =0x000006D9 - bl sub_02005748 -_02242F32: - ldrb r0, [r4, #6] - add r0, r0, #1 - strb r0, [r4, #6] - b _02242F5C -_02242F3A: - ldr r0, [r5, #0x3c] - bl sub_0205EAC8 - ldr r1, [r4, #0x10] - cmp r0, r1 - blt _02242F5C - ldrb r0, [r4, #6] - cmp r0, #0 - beq _02242F5C - cmp r0, #6 - bne _02242F56 - ldr r0, _02242F6C ; =0x000006DA - bl sub_02005748 -_02242F56: - ldrb r0, [r4, #6] - sub r0, r0, #1 - strb r0, [r4, #6] -_02242F5C: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02242F64: .word 0x02249058 -_02242F68: .word 0x000006D9 -_02242F6C: .word 0x000006DA -_02242F70: .word 0x0224903C - thumb_func_end ov6_02242E60 - - thumb_func_start ov6_02242F74 -ov6_02242F74: ; 0x02242F74 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, r2, #0 - add r4, r1, #0 - add r6, r3, #0 - bl ov6_02242FC0 - add r7, r0, #0 - cmp r4, #0 - beq _02242F8C - mov r1, #9 - b _02242F8E -_02242F8C: - mov r1, #0xa -_02242F8E: - mov r0, #0x6a - mov r2, #4 - bl sub_02006ADC - lsl r1, r7, #2 - add r1, r7, r1 - add r3, r5, #0 - asr r3, r1 - mov r2, #0x1f - add r1, r3, #0 - and r1, r2 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - and r1, r2 - lsl r1, r1, #0x18 - lsr r2, r1, #0x16 - ldr r1, [r0, r2] - str r1, [r6, #0] - ldr r2, [r0, r2] - ldr r1, [sp, #0x18] - str r2, [r1, #0] - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02242F74 - - thumb_func_start ov6_02242FC0 -ov6_02242FC0: ; 0x02242FC0 - push {r4, lr} - mov r1, #0x7e - lsl r1, r1, #2 - sub r0, r0, r1 - mov r4, #0 - cmp r0, #5 - bhi _02242FFC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02242FDA: ; jump table - .short _02242FE6 - _02242FDA - 2 ; case 0 - .short _02242FE8 - _02242FDA - 2 ; case 1 - .short _02242FEC - _02242FDA - 2 ; case 2 - .short _02242FF0 - _02242FDA - 2 ; case 3 - .short _02242FF4 - _02242FDA - 2 ; case 4 - .short _02242FF8 - _02242FDA - 2 ; case 5 -_02242FE6: - b _02243000 -_02242FE8: - mov r4, #1 - b _02243000 -_02242FEC: - mov r4, #2 - b _02243000 -_02242FF0: - mov r4, #3 - b _02243000 -_02242FF4: - mov r4, #4 - b _02243000 -_02242FF8: - mov r4, #5 - b _02243000 -_02242FFC: - bl sub_02022974 -_02243000: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov6_02242FC0 - - thumb_func_start ov6_02243004 -ov6_02243004: ; 0x02243004 - push {r3, lr} - cmp r1, #9 - bhi _022430B8 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02243016: ; jump table - .short _0224302A - _02243016 - 2 ; case 0 - .short _02243034 - _02243016 - 2 ; case 1 - .short _02243050 - _02243016 - 2 ; case 2 - .short _0224305A - _02243016 - 2 ; case 3 - .short _02243064 - _02243016 - 2 ; case 4 - .short _0224306E - _02243016 - 2 ; case 5 - .short _02243078 - _02243016 - 2 ; case 6 - .short _02243094 - _02243016 - 2 ; case 7 - .short _022430A0 - _02243016 - 2 ; case 8 - .short _022430AC - _02243016 - 2 ; case 9 -_0224302A: - bl ov6_0223E6EC - ldr r1, _022430C0 ; =0x02249940 - str r0, [r1, #0] - b _022430BC -_02243034: - ldr r0, _022430C0 ; =0x02249940 - ldr r0, [r0, #0] - bl ov6_0223E708 - cmp r0, #0 - beq _0224304C - ldr r0, _022430C0 ; =0x02249940 - ldr r0, [r0, #0] - bl ov6_0223E700 - mov r0, #1 - pop {r3, pc} -_0224304C: - mov r0, #0 - pop {r3, pc} -_02243050: - bl ov6_0223E814 - ldr r1, _022430C0 ; =0x02249940 - str r0, [r1, #0] - b _022430BC -_0224305A: - ldr r0, _022430C0 ; =0x02249940 - ldr r0, [r0, #0] - bl ov6_0223E828 - b _022430BC -_02243064: - bl ov6_0223FCCC - ldr r1, _022430C0 ; =0x02249940 - str r0, [r1, #0] - b _022430BC -_0224306E: - ldr r0, _022430C0 ; =0x02249940 - ldr r0, [r0, #0] - bl ov6_0223FCE8 - b _022430BC -_02243078: - ldr r0, _022430C0 ; =0x02249940 - ldr r0, [r0, #0] - bl ov6_0223FCF4 - cmp r0, #6 - bne _02243090 - ldr r0, _022430C0 ; =0x02249940 - ldr r0, [r0, #0] - bl ov6_0223FCE0 - mov r0, #1 - pop {r3, pc} -_02243090: - mov r0, #0 - pop {r3, pc} -_02243094: - mov r1, #0 - bl ov6_0223EA74 - ldr r1, _022430C0 ; =0x02249940 - str r0, [r1, #0] - b _022430BC -_022430A0: - mov r1, #1 - bl ov6_0223EA74 - ldr r1, _022430C0 ; =0x02249940 - str r0, [r1, #0] - b _022430BC -_022430AC: - mov r1, #2 - bl ov6_0223EA74 - ldr r1, _022430C0 ; =0x02249940 - str r0, [r1, #0] - b _022430BC -_022430B8: - bl sub_02022974 -_022430BC: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_022430C0: .word 0x02249940 - thumb_func_end ov6_02243004 - - thumb_func_start ov6_022430C4 -ov6_022430C4: ; 0x022430C4 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0202D834 - bl sub_0202D830 - mov r2, #0 - ldrh r0, [r0, #2] - add r1, r2, #0 -_022430D6: - cmp r0, #0 - beq _022430DC - add r2, r2, #1 -_022430DC: - add r1, r1, #1 - cmp r1, #3 - blt _022430D6 - add r0, r2, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_022430C4 - - thumb_func_start ov6_022430E8 -ov6_022430E8: ; 0x022430E8 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #3 - blo _022430F8 - bl sub_02022974 -_022430F8: - ldr r0, [r5, #0xc] - bl sub_0202D834 - bl sub_0202D830 - add r1, sp, #0 - bl ov6_022431A0 - lsl r1, r4, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - ldrh r0, [r0] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_022430E8 - - thumb_func_start ov6_02243114 -ov6_02243114: ; 0x02243114 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #3 - blo _02243124 - bl sub_02022974 -_02243124: - ldr r0, [r5, #0xc] - bl sub_0202D834 - bl sub_0202D830 - add r1, sp, #0 - bl ov6_022431A0 - lsl r1, r4, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - ldrh r0, [r0, #2] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_02243114 - - thumb_func_start ov6_02243140 -ov6_02243140: ; 0x02243140 - ldr r3, _02243144 ; =sub_02069B90 - bx r3 - ; .align 2, 0 -_02243144: .word sub_02069B90 - thumb_func_end ov6_02243140 - - thumb_func_start ov6_02243148 -ov6_02243148: ; 0x02243148 - push {r3, lr} - sub sp, #8 - add r0, #0x94 - ldr r0, [r0, #0] - add r1, sp, #4 - add r2, sp, #0 - bl sub_0206978C - ldr r0, [sp, #4] - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02243148 - - thumb_func_start ov6_02243160 -ov6_02243160: ; 0x02243160 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r1, sp, #0 - add r4, r0, #0 - bl ov6_022431A0 - mov r2, #0 - add r3, sp, #0 - add r5, sp, #0xc -_02243172: - ldr r1, [r3, #0] - add r2, r2, #1 - ldrh r0, [r1] - add r3, r3, #4 - strh r0, [r5] - ldrh r0, [r1, #2] - strh r0, [r5, #2] - add r5, r5, #4 - cmp r2, #3 - blt _02243172 - mov r2, #0 - add r1, sp, #0xc -_0224318A: - ldrh r0, [r1] - add r2, r2, #1 - strh r0, [r4] - ldrh r0, [r1, #2] - add r1, r1, #4 - strh r0, [r4, #2] - add r4, r4, #4 - cmp r2, #3 - blt _0224318A - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02243160 - - thumb_func_start ov6_022431A0 -ov6_022431A0: ; 0x022431A0 - push {r3, r4} - ldrh r4, [r0, #6] - ldrh r3, [r0, #2] - cmp r3, r4 - ldrh r2, [r0, #0xa] - bhs _022431E2 - cmp r4, r2 - bhs _022431C0 - add r2, r0, #0 - add r2, #8 - str r2, [r1, #0] - add r2, r0, #4 - str r2, [r1, #4] - str r0, [r1, #8] - pop {r3, r4} - bx lr -_022431C0: - cmp r3, r2 - bhs _022431D4 - add r2, r0, #4 - str r2, [r1, #0] - add r2, r0, #0 - add r2, #8 - str r2, [r1, #4] - str r0, [r1, #8] - pop {r3, r4} - bx lr -_022431D4: - add r2, r0, #4 - str r2, [r1, #0] - str r0, [r1, #4] - add r0, #8 - str r0, [r1, #8] - pop {r3, r4} - bx lr -_022431E2: - cmp r3, r2 - bhs _022431F6 - add r2, r0, #0 - add r2, #8 - str r2, [r1, #0] - str r0, [r1, #4] - add r0, r0, #4 - str r0, [r1, #8] - pop {r3, r4} - bx lr -_022431F6: - cmp r4, r2 - str r0, [r1, #0] - bhs _0224320A - add r2, r0, #0 - add r2, #8 - str r2, [r1, #4] - add r0, r0, #4 - str r0, [r1, #8] - pop {r3, r4} - bx lr -_0224320A: - add r2, r0, #4 - str r2, [r1, #4] - add r0, #8 - str r0, [r1, #8] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov6_022431A0 - - thumb_func_start ov6_02243218 -ov6_02243218: ; 0x02243218 - push {r3, lr} - mov r1, #0x16 - bl sub_020E2178 - ldr r0, _02243228 ; =0x02249090 - lsl r1, r1, #2 - ldr r0, [r0, r1] - pop {r3, pc} - ; .align 2, 0 -_02243228: .word 0x02249090 - thumb_func_end ov6_02243218 - - thumb_func_start ov6_0224322C -ov6_0224322C: ; 0x0224322C - push {r4, r5, r6, lr} - sub sp, #0x1a8 - add r5, r1, #0 - mov r1, #0x16 - add r4, r2, #0 - bl sub_020E2178 - ldr r0, _02243254 ; =0x02249090 - lsl r1, r1, #2 - ldr r6, [r0, r1] - add r0, sp, #0 - add r1, r6, #0 - bl sub_0203A614 - ldr r0, [sp, #0x64] - strh r0, [r4] - strh r6, [r5] - add sp, #0x1a8 - pop {r4, r5, r6, pc} - nop -_02243254: .word 0x02249090 - thumb_func_end ov6_0224322C - - thumb_func_start ov6_02243258 -ov6_02243258: ; 0x02243258 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r2, #0 - ldr r0, [sp, #0x1c] - add r7, r3, #0 - strb r6, [r5] - ldr r4, [sp, #0x18] - strb r7, [r5, #1] - strb r4, [r5, #2] - str r0, [sp, #0x1c] - strb r0, [r5, #3] - ldr r0, [sp, #0x20] - mov r2, #4 - strb r0, [r5, #4] - ldr r0, [sp, #0x24] - strb r0, [r5, #5] - ldr r0, [sp, #0x28] - strb r0, [r5, #6] - ldr r0, [sp, #0x2c] - strb r0, [r5, #7] - add r0, r1, #0 - add r1, r5, #0 - add r1, #0xc - bl sub_020095C4 - str r0, [r5, #8] - add r0, r5, #0 - mov r2, #2 - add r0, #0xc - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - add r0, r6, #0 - mov r1, #0 - mov r2, #4 - bl sub_02009714 - mov r1, #0x4d - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r7, #0 - mov r1, #1 - mov r2, #4 - bl sub_02009714 - mov r1, #0x4e - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r4, #0 - mov r1, #2 - mov r2, #4 - bl sub_02009714 - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [sp, #0x1c] - mov r1, #3 - mov r2, #4 - bl sub_02009714 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r0, #4 - lsl r1, r6, #3 - bl ov6_02245F44 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #4 - lsl r1, r7, #3 - bl ov6_02245F44 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #4 - lsl r1, r4, #3 - bl ov6_02245F44 - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r1, [sp, #0x1c] - mov r0, #4 - lsl r1, r1, #3 - bl ov6_02245F44 - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r1, #0 - cmp r6, #0 - ble _02243334 - ble _02243334 - ldr r0, [sp, #0x20] - add r2, r1, #0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 -_02243324: - mov r3, #0x51 - lsl r3, r3, #2 - ldr r3, [r5, r3] - add r1, r1, #1 - strh r0, [r3, r2] - add r2, #8 - cmp r1, r6 - blt _02243324 -_02243334: - mov r3, #0 - cmp r7, #0 - ble _02243354 - ble _02243354 - ldr r0, [sp, #0x24] - mov r6, #0x52 - lsl r0, r0, #0x10 - add r2, r3, #0 - asr r1, r0, #0x10 - lsl r6, r6, #2 -_02243348: - ldr r0, [r5, r6] - add r3, r3, #1 - strh r1, [r0, r2] - add r2, #8 - cmp r3, r7 - blt _02243348 -_02243354: - mov r1, #0 - cmp r4, #0 - ble _02243374 - ble _02243374 - ldr r2, [sp, #0x28] - add r0, r1, #0 - lsl r2, r2, #0x10 - asr r6, r2, #0x10 - mov r2, #0x53 - lsl r2, r2, #2 -_02243368: - ldr r3, [r5, r2] - add r1, r1, #1 - strh r6, [r3, r0] - add r0, #8 - cmp r1, r4 - blt _02243368 -_02243374: - ldr r0, [sp, #0x1c] - mov r1, #0 - cmp r0, #0 - ble _02243398 - ble _02243398 - ldr r2, [sp, #0x2c] - mov r3, #0x15 - lsl r2, r2, #0x10 - add r0, r1, #0 - asr r4, r2, #0x10 - lsl r3, r3, #4 -_0224338A: - ldr r2, [r5, r3] - add r1, r1, #1 - strh r4, [r2, r0] - ldr r2, [sp, #0x1c] - add r0, #8 - cmp r1, r2 - blt _0224338A -_02243398: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02243258 - - thumb_func_start ov6_0224339C -ov6_0224339C: ; 0x0224339C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrb r0, [r5] - mov r6, #0 - cmp r0, #0 - ble _022433CC - add r4, r6, #0 - mov r7, #4 -_022433AC: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r1, [r5, r0] - ldrsb r2, [r5, r7] - add r0, r1, r4 - ldrsh r1, [r1, r4] - cmp r2, r1 - beq _022433C2 - ldr r0, [r0, #4] - bl sub_0200A4E4 -_022433C2: - ldrb r0, [r5] - add r6, r6, #1 - add r4, #8 - cmp r6, r0 - blt _022433AC -_022433CC: - ldrb r0, [r5, #1] - mov r6, #0 - cmp r0, #0 - ble _022433F8 - add r4, r6, #0 - mov r7, #5 -_022433D8: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r1, [r5, r0] - ldrsb r2, [r5, r7] - add r0, r1, r4 - ldrsh r1, [r1, r4] - cmp r2, r1 - beq _022433EE - ldr r0, [r0, #4] - bl sub_0200A6DC -_022433EE: - ldrb r0, [r5, #1] - add r6, r6, #1 - add r4, #8 - cmp r6, r0 - blt _022433D8 -_022433F8: - ldrb r0, [r5, #2] - mov r6, #0 - cmp r0, #0 - ble _02243424 - add r4, r6, #0 - mov r7, #6 -_02243404: - mov r0, #0x53 - lsl r0, r0, #2 - ldr r1, [r5, r0] - ldrsb r2, [r5, r7] - add r0, r1, r4 - ldrsh r1, [r1, r4] - cmp r2, r1 - beq _0224341A - ldr r0, [r0, #4] - bl sub_02009D4C -_0224341A: - ldrb r0, [r5, #2] - add r6, r6, #1 - add r4, #8 - cmp r6, r0 - blt _02243404 -_02243424: - ldrb r0, [r5, #3] - mov r6, #0 - cmp r0, #0 - ble _02243450 - add r4, r6, #0 - mov r7, #7 -_02243430: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r1, [r5, r0] - ldrsb r2, [r5, r7] - add r0, r1, r4 - ldrsh r1, [r1, r4] - cmp r2, r1 - beq _02243446 - ldr r0, [r0, #4] - bl sub_02009D4C -_02243446: - ldrb r0, [r5, #3] - add r6, r6, #1 - add r4, #8 - cmp r6, r0 - blt _02243430 -_02243450: - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009754 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009754 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02009754 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_02009754 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020181C4 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020181C4 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020181C4 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_020181C4 - ldr r0, [r5, #8] - bl sub_020219C0 - ldr r0, [r5, #8] - bl sub_02021964 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_0224339C - - thumb_func_start ov6_022434B0 -ov6_022434B0: ; 0x022434B0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldrb r5, [r6] - str r2, [sp, #0x10] - str r1, [sp, #0xc] - add r7, r3, #0 - mov r2, #0 - cmp r5, #0 - ble _02243516 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r3, [r6, r0] - mov r0, #4 - ldrsb r4, [r6, r0] - mov ip, r3 - add r0, r2, #0 -_022434D2: - ldrsh r1, [r3, r0] - cmp r4, r1 - bne _0224350E - lsl r4, r2, #3 - mov r0, ip - strh r7, [r0, r4] - mov r0, #0x51 - lsl r0, r0, #2 - ldr r1, [r6, r0] - mov r3, #0 - add r1, r1, r4 - strh r3, [r1, #2] - str r7, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - sub r0, #0x10 - ldr r0, [r6, r0] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - bl sub_02009A4C - mov r1, #0x51 - lsl r1, r1, #2 - ldr r1, [r6, r1] - add sp, #0x14 - add r1, r1, r4 - str r0, [r1, #4] - pop {r4, r5, r6, r7, pc} -_0224350E: - add r2, r2, #1 - add r3, #8 - cmp r2, r5 - blt _022434D2 -_02243516: - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022434B0 - - thumb_func_start ov6_02243520 -ov6_02243520: ; 0x02243520 - push {r4, r5, r6, lr} - ldrb r3, [r0] - mov r2, #0 - cmp r3, #0 - ble _0224354E - mov r4, #0x51 - lsl r4, r4, #2 - ldr r0, [r0, r4] - add r4, r2, #0 - add r6, r0, #0 -_02243534: - ldrsh r5, [r6, r4] - cmp r1, r5 - bne _02243546 - lsl r1, r2, #3 - add r0, r0, r1 - ldr r0, [r0, #4] - bl sub_0200A3DC - pop {r4, r5, r6, pc} -_02243546: - add r2, r2, #1 - add r6, #8 - cmp r2, r3 - blt _02243534 -_0224354E: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02243520 - - thumb_func_start ov6_02243554 -ov6_02243554: ; 0x02243554 - push {r4, r5, r6, lr} - ldrb r3, [r0] - mov r2, #0 - cmp r3, #0 - ble _02243582 - mov r4, #0x51 - lsl r4, r4, #2 - ldr r0, [r0, r4] - add r4, r2, #0 - add r6, r0, #0 -_02243568: - ldrsh r5, [r6, r4] - cmp r1, r5 - bne _0224357A - lsl r1, r2, #3 - add r0, r0, r1 - ldr r0, [r0, #4] - bl sub_02009D4C - pop {r4, r5, r6, pc} -_0224357A: - add r2, r2, #1 - add r6, #8 - cmp r2, r3 - blt _02243568 -_02243582: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02243554 - - thumb_func_start ov6_02243588 -ov6_02243588: ; 0x02243588 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - ldrb r5, [r6] - str r2, [sp, #0x14] - str r1, [sp, #0x10] - add r7, r3, #0 - mov r2, #0 - cmp r5, #0 - ble _022435F0 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r3, [r6, r0] - mov r0, #5 - ldrsb r4, [r6, r0] - mov ip, r3 - add r0, r2, #0 -_022435AA: - ldrsh r1, [r3, r0] - cmp r4, r1 - bne _022435E8 - lsl r4, r2, #3 - mov r0, ip - strh r7, [r0, r4] - mov r0, #0x52 - lsl r0, r0, #2 - ldr r1, [r6, r0] - mov r3, #0 - add r1, r1, r4 - strh r3, [r1, #2] - str r7, [sp] - mov r1, #1 - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #4 - str r1, [sp, #0xc] - sub r0, #0x10 - ldr r0, [r6, r0] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - bl sub_02009B04 - mov r1, #0x52 - lsl r1, r1, #2 - ldr r1, [r6, r1] - add sp, #0x18 - add r1, r1, r4 - str r0, [r1, #4] - pop {r3, r4, r5, r6, r7, pc} -_022435E8: - add r2, r2, #1 - add r3, #8 - cmp r2, r5 - blt _022435AA -_022435F0: - bl sub_02022974 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02243588 - - thumb_func_start ov6_022435F8 -ov6_022435F8: ; 0x022435F8 - push {r4, r5, r6, lr} - ldrb r3, [r0, #1] - mov r2, #0 - cmp r3, #0 - ble _02243626 - mov r4, #0x52 - lsl r4, r4, #2 - ldr r0, [r0, r4] - add r4, r2, #0 - add r6, r0, #0 -_0224360C: - ldrsh r5, [r6, r4] - cmp r1, r5 - bne _0224361E - lsl r1, r2, #3 - add r0, r0, r1 - ldr r0, [r0, #4] - bl sub_0200A640 - pop {r4, r5, r6, pc} -_0224361E: - add r2, r2, #1 - add r6, #8 - cmp r2, r3 - blt _0224360C -_02243626: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov6_022435F8 - - thumb_func_start ov6_0224362C -ov6_0224362C: ; 0x0224362C - push {r4, r5, r6, lr} - ldrb r3, [r0, #1] - mov r2, #0 - cmp r3, #0 - ble _0224365A - mov r4, #0x52 - lsl r4, r4, #2 - ldr r0, [r0, r4] - add r4, r2, #0 - add r6, r0, #0 -_02243640: - ldrsh r5, [r6, r4] - cmp r1, r5 - bne _02243652 - lsl r1, r2, #3 - add r0, r0, r1 - ldr r0, [r0, #4] - bl sub_02009D4C - pop {r4, r5, r6, pc} -_02243652: - add r2, r2, #1 - add r6, #8 - cmp r2, r3 - blt _02243640 -_0224365A: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov6_0224362C - - thumb_func_start ov6_02243660 -ov6_02243660: ; 0x02243660 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldrb r5, [r6] - str r2, [sp, #0x10] - str r1, [sp, #0xc] - add r7, r3, #0 - mov r2, #0 - cmp r5, #0 - ble _022436C6 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r3, [r6, r0] - mov r0, #6 - ldrsb r4, [r6, r0] - mov ip, r3 - add r0, r2, #0 -_02243682: - ldrsh r1, [r3, r0] - cmp r4, r1 - bne _022436BE - lsl r4, r2, #3 - mov r0, ip - strh r7, [r0, r4] - mov r0, #0x53 - lsl r0, r0, #2 - ldr r1, [r6, r0] - mov r3, #0 - add r1, r1, r4 - strh r3, [r1, #2] - str r7, [sp] - mov r1, #2 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - sub r0, #0x10 - ldr r0, [r6, r0] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - bl sub_02009BC4 - mov r1, #0x53 - lsl r1, r1, #2 - ldr r1, [r6, r1] - add sp, #0x14 - add r1, r1, r4 - str r0, [r1, #4] - pop {r4, r5, r6, r7, pc} -_022436BE: - add r2, r2, #1 - add r3, #8 - cmp r2, r5 - blt _02243682 -_022436C6: - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02243660 - - thumb_func_start ov6_022436D0 -ov6_022436D0: ; 0x022436D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldrb r5, [r6] - str r2, [sp, #0x10] - str r1, [sp, #0xc] - add r7, r3, #0 - mov r2, #0 - cmp r5, #0 - ble _02243736 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r3, [r6, r0] - mov r0, #7 - ldrsb r4, [r6, r0] - mov ip, r3 - add r0, r2, #0 -_022436F2: - ldrsh r1, [r3, r0] - cmp r4, r1 - bne _0224372E - lsl r4, r2, #3 - mov r0, ip - strh r7, [r0, r4] - mov r0, #0x15 - lsl r0, r0, #4 - ldr r1, [r6, r0] - mov r3, #0 - add r1, r1, r4 - strh r3, [r1, #2] - str r7, [sp] - mov r1, #3 - str r1, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - sub r0, #0x10 - ldr r0, [r6, r0] - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - bl sub_02009BC4 - mov r1, #0x15 - lsl r1, r1, #4 - ldr r1, [r6, r1] - add sp, #0x14 - add r1, r1, r4 - str r0, [r1, #4] - pop {r4, r5, r6, r7, pc} -_0224372E: - add r2, r2, #1 - add r3, #8 - cmp r2, r5 - blt _022436F2 -_02243736: - bl sub_02022974 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022436D0 - - thumb_func_start ov6_02243740 -ov6_02243740: ; 0x02243740 - push {r4, r5, r6, lr} - sub sp, #0x70 - add r5, r0, #0 - add r4, r1, #0 - add r1, r2, #0 - mov r0, #7 - add r2, r3, #0 - ldrsb r3, [r5, r0] - ldr r6, [sp, #0x84] - cmp r6, r3 - bne _0224375A - sub r0, #8 - str r0, [sp, #0x84] -_0224375A: - ldr r0, [sp, #0x84] - mov r3, #0 - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x88] - str r3, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0x4d - lsl r0, r0, #2 - ldr r6, [r5, r0] - str r6, [sp, #0x14] - add r6, r0, #4 - ldr r6, [r5, r6] - str r6, [sp, #0x18] - add r6, r0, #0 - add r6, #8 - ldr r6, [r5, r6] - add r0, #0xc - str r6, [sp, #0x1c] - ldr r0, [r5, r0] - str r0, [sp, #0x20] - str r3, [sp, #0x24] - str r3, [sp, #0x28] - ldr r3, [sp, #0x80] - add r0, sp, #0x4c - bl sub_020093B4 - ldr r0, [r5, #8] - add r2, sp, #0x34 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - ldmia r4!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r2, #0] - ldr r0, [sp, #0x8c] - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x44] - mov r0, #4 - str r0, [sp, #0x48] - add r0, sp, #0x2c - bl sub_02021B90 - add r4, r0, #0 - bne _022437C2 - bl sub_02022974 -_022437C2: - add r0, r4, #0 - add sp, #0x70 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02243740 - - thumb_func_start ov6_022437C8 -ov6_022437C8: ; 0x022437C8 - push {r4, lr} - add r4, r1, #0 - bl sub_02021D28 - add r2, r0, #0 - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - pop {r4, pc} - thumb_func_end ov6_022437C8 - - thumb_func_start ov6_022437DC -ov6_022437DC: ; 0x022437DC - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r4, r0, #0 - mov r2, #0 - add r0, sp, #0x1c - str r2, [r0, #0] - str r2, [r0, #4] - add r3, sp, #0x28 - str r2, [r3, #0] - str r2, [r3, #4] - ldr r6, _02243844 ; =0x0224918C - str r2, [r0, #8] - ldmia r6!, {r0, r1} - add r5, sp, #0x10 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - str r2, [r3, #8] - str r0, [r5, #0] - add r1, r3, #0 - str r2, [sp] - mov r0, #2 - str r0, [sp, #4] - str r2, [sp, #8] - mov r0, #0x84 - str r0, [sp, #0xc] - add r0, r4, #0 - add r3, r2, #0 - bl ov6_02243740 - add r4, r0, #0 - mov r1, #2 - bl sub_02021CF8 - add r0, r4, #0 - add r1, sp, #0x1c - bl sub_02021C60 - add r0, r4, #0 - add r1, sp, #0x10 - bl sub_02021C70 - mov r0, #0 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - add r0, r4, #0 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - nop -_02243844: .word 0x0224918C - thumb_func_end ov6_022437DC - - thumb_func_start ov6_02243848 -ov6_02243848: ; 0x02243848 - push {r3, r4, lr} - sub sp, #0x1c - mov r3, #0 - add r2, sp, #0x10 - str r3, [r2, #0] - str r3, [r2, #4] - str r3, [r2, #8] - cmp r1, #1 - bne _0224385C - mov r3, #1 -_0224385C: - mov r2, #2 - str r2, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #0x83 - str r1, [sp, #0xc] - add r1, sp, #0x10 - bl ov6_02243740 - add r4, r0, #0 - mov r1, #0 - bl sub_02021CAC - add r0, r4, #0 - mov r1, #6 - bl sub_02021D6C - add r0, r4, #0 - add sp, #0x1c - pop {r3, r4, pc} - thumb_func_end ov6_02243848 - - thumb_func_start ov6_02243888 -ov6_02243888: ; 0x02243888 - push {r4, r5, lr} - sub sp, #0x24 - add r5, sp, #0x18 - mov r4, #0 - str r4, [r5, #0] - str r4, [r5, #4] - str r0, [sp, #0xc] - str r2, [sp, #0x14] - str r3, [sp, #0x10] - str r4, [r5, #8] - str r1, [sp, #8] - add r0, sp, #8 - str r0, [sp] - mov r0, #0x82 - str r0, [sp, #4] - add r0, r1, #0 - ldr r1, _022438B8 ; =0x0224925C - add r2, r5, #0 - add r3, r4, #0 - bl sub_02071330 - add sp, #0x24 - pop {r4, r5, pc} - nop -_022438B8: .word 0x0224925C - thumb_func_end ov6_02243888 - - thumb_func_start ov6_022438BC -ov6_022438BC: ; 0x022438BC - push {r3, lr} - bl sub_02071598 - ldrb r0, [r0, #2] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_022438BC - - thumb_func_start ov6_022438C8 -ov6_022438C8: ; 0x022438C8 - push {r4, lr} - add r4, r1, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0x58 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x64] - bl ov6_022437DC - str r0, [r4, #0x68] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022438C8 - - thumb_func_start ov6_022438EC -ov6_022438EC: ; 0x022438EC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02071598 - add r4, r0, #0 - ldr r0, [r4, #0x6c] - cmp r0, #0 - beq _02243900 - bl sub_0207136C -_02243900: - ldr r0, [r4, #0x70] - cmp r0, #0 - beq _0224390A - bl ov5_021F0EFC -_0224390A: - add r0, r5, #0 - bl sub_0207136C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_022438EC - - thumb_func_start ov6_02243914 -ov6_02243914: ; 0x02243914 - ldr r3, _0224391C ; =sub_02021BD4 - ldr r0, [r1, #0x68] - bx r3 - nop -_0224391C: .word sub_02021BD4 - thumb_func_end ov6_02243914 - - thumb_func_start ov6_02243920 -ov6_02243920: ; 0x02243920 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrb r0, [r5] - lsl r1, r0, #2 - ldr r0, _0224393C ; =0x02249110 - ldr r4, [r0, r1] -_0224392C: - ldrb r1, [r5, #1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - blx r1 - cmp r0, #1 - beq _0224392C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224393C: .word 0x02249110 - thumb_func_end ov6_02243920 - - thumb_func_start ov6_02243940 -ov6_02243940: ; 0x02243940 - push {r3, lr} - mov r1, #0 - strb r1, [r0, #2] - ldr r0, [r0, #0x68] - bl sub_02021CAC - mov r0, #0 - pop {r3, pc} - thumb_func_end ov6_02243940 - - thumb_func_start ov6_02243950 -ov6_02243950: ; 0x02243950 - push {r4, r5, r6, lr} - sub sp, #0x30 - ldr r4, _02243AA4 ; =0x02249150 - add r2, r0, #0 - ldmia r4!, {r0, r1} - add r3, sp, #0x24 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r4, _02243AA8 ; =0x022491A4 - str r0, [r3, #0] - ldmia r4!, {r0, r1} - add r3, sp, #0x18 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - add r0, r2, #0 - bl sub_02071598 - add r4, r0, #0 - mov r3, #1 - add r5, r4, #0 - strb r3, [r4] - mov r2, #0 - strb r2, [r4, #2] - strb r2, [r4, #1] - str r2, [r4, #4] - add r6, sp, #0x24 - ldmia r6!, {r0, r1} - add r5, #8 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r5, #0] - str r2, [r4, #0x14] - str r2, [r4, #0x18] - str r2, [r4, #0x1c] - ldr r0, _02243AAC ; =0x0015E000 - add r2, r4, #0 - add r5, sp, #0x18 - str r0, [r4, #0x38] - ldmia r5!, {r0, r1} - add r2, #0x2c - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r2, #0] - lsl r0, r3, #0xa - str r0, [r4, #0x50] - mov r0, #0x2d - lsl r0, r0, #0xc - str r0, [r4, #0x40] - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [r4, #0x48] - lsl r0, r3, #0x11 - str r0, [r4, #0x4c] - mov r0, #0x2d - bl sub_0201D264 - ldr r2, [r4, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r4, #0x14] - ldr r1, [r4, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, [r4, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r4, #0x18] - ldr r1, [r4, #8] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [sp, #0x24] - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [sp, #0x28] - ldr r0, [r4, #0x68] - add r1, sp, #0x24 - bl sub_02021C50 - ldr r0, [r4, #0x68] - add r1, sp, #0x18 - bl sub_02021C70 - ldr r1, [r4, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - ldr r0, [r4, #0x68] - bl sub_02021C94 - ldr r0, [r4, #0x68] - mov r1, #0x84 - bl sub_02021F58 - ldr r0, [r4, #0x68] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0x58] - ldr r1, [r4, #0x60] - bl ov6_02245B4C - str r0, [r4, #0x6c] - ldr r0, [r4, #0x5c] - mov r1, #4 - bl ov5_021F0EB0 - ldr r2, _02243AB0 ; =0xFFF88000 - mov r1, #1 - mov r3, #0xc - str r0, [r4, #0x70] - bl ov5_021F0F10 - add r1, sp, #0xc - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - ldr r3, _02243AB4 ; =0x022491C8 - str r0, [r1, #8] - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r1, #2 - str r0, [r2, #0] - ldr r4, [r4, #0x60] - add r0, r4, #0 - bl sub_02021CF8 - add r0, r4, #0 - add r1, sp, #0xc - bl sub_02021C60 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C70 - mov r0, #0 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - add r0, r4, #0 - mov r1, #2 - bl sub_02021D6C - bl ov6_02243F2C - add sp, #0x30 - pop {r4, r5, r6, pc} - nop -_02243AA4: .word 0x02249150 -_02243AA8: .word 0x022491A4 -_02243AAC: .word 0x0015E000 -_02243AB0: .word 0xFFF88000 -_02243AB4: .word 0x022491C8 - thumb_func_end ov6_02243950 - - thumb_func_start ov6_02243AB8 -ov6_02243AB8: ; 0x02243AB8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x4c] - ldr r6, [r5, #0x68] - ldr r4, [r5, #0x60] - sub r0, r1, r0 - str r0, [r5, #0x48] - bpl _02243AD0 - mov r0, #0 - str r0, [r5, #0x48] -_02243AD0: - mov r0, #2 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0xa - cmp r1, r0 - ble _02243AE2 - mov r0, #7 - lsl r0, r0, #0xa - sub r0, r1, r0 - str r0, [r5, #0x4c] -_02243AE2: - mov r0, #1 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0xc - cmp r1, r0 - bge _02243AEE - str r0, [r5, #0x4c] -_02243AEE: - mov r0, #0x2d - bl sub_0201D264 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x14] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x18] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - cmp r0, #0x5a - bge _02243B36 - mov r0, #1 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [r5, #0x40] -_02243B36: - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x50] - sub r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [r5, #0x2c] - cmp r1, r0 - bge _02243B48 - str r0, [r5, #0x2c] -_02243B48: - ldr r1, [r5, #0x30] - ldr r0, [r5, #0x50] - sub r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [r5, #0x30] - cmp r1, r0 - bge _02243B5A - str r0, [r5, #0x30] -_02243B5A: - add r1, r5, #0 - add r0, r6, #0 - add r1, #0x2c - bl sub_02021C70 - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x2c - bl sub_02021C70 - ldr r1, [r5, #8] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp] - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r6, #0 - add r1, sp, #0 - bl sub_02021C50 - mov r0, #0x12 - ldr r1, [sp, #4] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r5, #0x48] - cmp r0, #0 - bne _02243BAA - mov r0, #0 - str r0, [r5, #4] - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] - b _02243BB0 -_02243BAA: - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] -_02243BB0: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02243AB8 - - thumb_func_start ov6_02243BB8 -ov6_02243BB8: ; 0x02243BB8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x6c] - bl ov6_02245BC8 - ldr r0, [r4, #0x70] - mov r1, #2 - mov r2, #0 - mov r3, #0xc - bl ov5_021F0F10 - mov r0, #1 - lsl r0, r0, #0xa - str r0, [r4, #0x50] - lsl r0, r0, #9 - str r0, [r4, #0x40] - mov r0, #0 - str r0, [r4, #0x48] - mov r0, #6 - lsl r0, r0, #0xa - str r0, [r4, #0x4c] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov6_02243BB8 - - thumb_func_start ov6_02243BEC -ov6_02243BEC: ; 0x02243BEC - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x4c] - ldr r4, [r5, #0x68] - add r0, r1, r0 - str r0, [r5, #0x48] - mov r0, #1 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0xc - add r2, r1, r0 - lsl r1, r0, #4 - str r2, [r5, #0x4c] - cmp r2, r1 - ble _02243C10 - lsl r0, r0, #4 - str r0, [r5, #0x4c] -_02243C10: - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D264 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x14] - mov r0, #0x80 - bl sub_0201D250 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x18] - mov r0, #0xa - ldr r1, [r5, #0x40] - lsl r0, r0, #0x10 - cmp r1, r0 - bge _02243C54 - mov r0, #1 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r5, #0x40] -_02243C54: - mov r0, #2 - ldr r1, [r5, #0x38] - lsl r0, r0, #0xc - add r1, r1, r0 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - str r1, [r5, #0x38] - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [r5, #0x2c] - cmp r1, r0 - ble _02243C86 - str r0, [r5, #0x2c] -_02243C86: - ldr r1, [r5, #0x30] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [r5, #0x30] - cmp r1, r0 - ble _02243C98 - str r0, [r5, #0x30] -_02243C98: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x2c - bl sub_02021C70 - ldr r1, [r5, #8] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp] - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x18] - sub r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C50 - ldr r1, [sp, #4] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r1, r0, #0xc - mov r0, #0xf - mvn r0, r0 - cmp r1, r0 - bgt _02243CD2 - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] -_02243CD2: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_02243BEC - - thumb_func_start ov6_02243CD8 -ov6_02243CD8: ; 0x02243CD8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x68] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x60] - mov r1, #1 - bl sub_02021D6C - mov r0, #0 - str r0, [r4, #4] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02243CD8 - - thumb_func_start ov6_02243CFC -ov6_02243CFC: ; 0x02243CFC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r0, #0 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #0x14 - bge _02243D12 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02243D12: - ldr r3, _02243DB4 ; =0x02249174 - add r2, sp, #0xc - ldmia r3!, {r0, r1} - add r6, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r3, _02243DB8 ; =0x02249180 - str r0, [r2, #0] - add r2, sp, #0 - ldmia r3!, {r0, r1} - add r5, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r7, #0 - str r0, [r2, #0] - add r2, r4, #0 - str r7, [r4, #4] - add r3, r6, #0 - ldmia r3!, {r0, r1} - add r2, #8 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - str r7, [r4, #0x14] - str r7, [r4, #0x18] - str r7, [r4, #0x1c] - str r7, [r4, #0x38] - add r2, r4, #0 - ldmia r5!, {r0, r1} - add r2, #0x2c - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r2, #0] - lsl r1, r1, #8 - ldr r0, _02243DBC ; =0x0013B000 - str r1, [r4, #0x50] - str r0, [r4, #0x40] - lsl r0, r1, #0xa - str r0, [r4, #0x48] - lsl r0, r1, #4 - str r0, [r4, #0x4c] - ldr r0, [r4, #0x68] - add r1, r6, #0 - bl sub_02021C50 - ldr r0, [r4, #0x68] - add r1, sp, #0 - bl sub_02021C70 - ldr r1, [r4, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - ldr r0, [r4, #0x68] - bl sub_02021C94 - ldr r0, [r4, #0x68] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0x60] - mov r1, #6 - bl sub_02021D6C - ldr r0, [r4, #0x60] - mov r1, #1 - bl sub_02021CC8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243DB4: .word 0x02249174 -_02243DB8: .word 0x02249180 -_02243DBC: .word 0x0013B000 - thumb_func_end ov6_02243CFC - - thumb_func_start ov6_02243DC0 -ov6_02243DC0: ; 0x02243DC0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x4c] - ldr r4, [r5, #0x68] - sub r0, r1, r0 - str r0, [r5, #0x48] - mov r0, #1 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0x10 - cmp r1, r0 - bge _02243DE0 - lsr r0, r0, #3 - add r0, r1, r0 - str r0, [r5, #0x4c] -_02243DE0: - ldr r0, [r5, #0x48] - cmp r0, #0 - bge _02243DEA - mov r0, #0 - str r0, [r5, #0x48] -_02243DEA: - ldr r0, _02243EC8 ; =0x0000013B - bl sub_0201D264 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x14] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x18] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - cmp r0, #0xb4 - bge _02243E32 - mov r0, #1 - lsl r0, r0, #0xe - sub r0, r1, r0 - str r0, [r5, #0x40] -_02243E32: - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x50] - sub r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xa - str r1, [r5, #0x2c] - cmp r1, r0 - bge _02243E44 - str r0, [r5, #0x2c] -_02243E44: - ldr r1, [r5, #0x30] - ldr r0, [r5, #0x50] - sub r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xa - str r1, [r5, #0x30] - cmp r1, r0 - bge _02243E56 - str r0, [r5, #0x30] -_02243E56: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x2c - bl sub_02021C70 - mov r0, #6 - ldr r1, [r5, #0x38] - lsl r0, r0, #0xc - add r1, r1, r0 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - str r1, [r5, #0x38] - cmp r0, #0x3c - ble _02243E7C - mov r0, #0xf - lsl r0, r0, #0xe - str r0, [r5, #0x38] -_02243E7C: - ldr r1, [r5, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - ldr r1, [r5, #8] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp] - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r5, #0x48] - cmp r0, #0 - bgt _02243EC0 - add r0, r4, #0 - mov r1, #0 - bl sub_02021CAC - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] -_02243EC0: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_02243EC8: .word 0x0000013B - thumb_func_end ov6_02243DC0 - - thumb_func_start ov6_02243ECC -ov6_02243ECC: ; 0x02243ECC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #8 - bne _02243EEA - ldr r0, [r4, #0x60] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r4, #0x5c] - mov r1, #0 - bl ov6_02243F74 -_02243EEA: - ldr r0, [r4, #4] - cmp r0, #0xa - bne _02243EF8 - ldr r0, [r4, #0x60] - mov r1, #0 - bl sub_02021CAC -_02243EF8: - ldr r0, [r4, #4] - cmp r0, #0xf - ble _02243F16 - ldr r0, [r4, #0x70] - bl ov5_021F0EF0 - cmp r0, #1 - bne _02243F16 - mov r0, #0 - str r0, [r4, #4] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - mov r0, #2 - strb r0, [r4, #2] -_02243F16: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02243ECC - - thumb_func_start ov6_02243F1C -ov6_02243F1C: ; 0x02243F1C - mov r0, #0 - bx lr - thumb_func_end ov6_02243F1C - - thumb_func_start ov6_02243F20 -ov6_02243F20: ; 0x02243F20 - ldr r3, _02243F28 ; =sub_02006C24 - mov r0, #0x61 - mov r1, #4 - bx r3 - ; .align 2, 0 -_02243F28: .word sub_02006C24 - thumb_func_end ov6_02243F20 - - thumb_func_start ov6_02243F2C -ov6_02243F2C: ; 0x02243F2C - push {lr} - sub sp, #0xc - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r3, _02243F4C ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} - nop -_02243F4C: .word 0x00007FFF - thumb_func_end ov6_02243F2C - - thumb_func_start ov6_02243F50 -ov6_02243F50: ; 0x02243F50 - push {lr} - sub sp, #0xc - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0 - ldr r3, _02243F70 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} - ; .align 2, 0 -_02243F70: .word 0x00007FFF - thumb_func_end ov6_02243F50 - - thumb_func_start ov6_02243F74 -ov6_02243F74: ; 0x02243F74 - push {r4, lr} - ldr r0, [r0, #0x3c] - add r4, r1, #0 - bl sub_0205EB3C - add r1, r4, #0 - bl sub_02062D64 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02243F74 - - thumb_func_start ov6_02243F88 -ov6_02243F88: ; 0x02243F88 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov6_02243FDC - add r1, r0, #0 - str r4, [r1, #0x5c] - str r6, [r1, #0xc] - str r5, [r1, #0x20] - cmp r5, #0 - bne _02243FAA - ldr r0, _02243FB4 ; =ov6_02244004 - mov r2, #0x85 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} -_02243FAA: - ldr r0, _02243FB8 ; =ov6_022443B8 - mov r2, #0x85 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02243FB4: .word ov6_02244004 -_02243FB8: .word ov6_022443B8 - thumb_func_end ov6_02243F88 - - thumb_func_start ov6_02243FBC -ov6_02243FBC: ; 0x02243FBC - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #4] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02243FBC - - thumb_func_start ov6_02243FC8 -ov6_02243FC8: ; 0x02243FC8 - push {r4, lr} - add r4, r0, #0 - bl sub_0201CED0 - bl ov6_02243FFC - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov6_02243FC8 - - thumb_func_start ov6_02243FDC -ov6_02243FDC: ; 0x02243FDC - push {r3, r4, r5, lr} - mov r1, #0x87 - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - bl sub_02018184 - mov r2, #0x87 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - str r5, [r4, #0x60] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02243FDC - - thumb_func_start ov6_02243FFC -ov6_02243FFC: ; 0x02243FFC - ldr r3, _02244000 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_02244000: .word sub_020181C4 - thumb_func_end ov6_02243FFC - - thumb_func_start ov6_02244004 -ov6_02244004: ; 0x02244004 - push {r3, r4, r5, lr} - ldr r4, _02244034 ; =0x022492D8 - add r5, r1, #0 -_0224400A: - ldr r1, [r5, #0] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - blx r1 - cmp r0, #1 - beq _0224400A - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _02244032 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0224402C - bl sub_020713D0 -_0224402C: - add r0, r5, #0 - bl ov6_02244C10 -_02244032: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244034: .word 0x022492D8 - thumb_func_end ov6_02244004 - - thumb_func_start ov6_02244038 -ov6_02244038: ; 0x02244038 - push {r4, lr} - add r4, r0, #0 - bl ov6_0224481C - add r0, r4, #0 - bl ov6_0224464C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_02244038 - - thumb_func_start ov6_02244050 -ov6_02244050: ; 0x02244050 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r0, #0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02244066 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, pc} -_02244066: - ldr r5, _022440B8 ; =0x02249120 - add r3, sp, #0xc - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - ldr r5, _022440BC ; =0x022491E0 - str r0, [r3, #0] - ldmia r5!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, r2, #0 - str r0, [r3, #0] - add r0, r4, #0 - bl ov6_02244CFC - mov r1, #0x79 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - add r1, sp, #0 - bl ov6_0224529C - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov6_022452BC - add r0, r4, #0 - bl ov6_0224469C - mov r0, #1 - str r0, [r4, #0x10] - ldr r1, [r4, #0] - add r1, r1, #1 - str r1, [r4, #0] - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022440B8: .word 0x02249120 -_022440BC: .word 0x022491E0 - thumb_func_end ov6_02244050 - - thumb_func_start ov6_022440C0 -ov6_022440C0: ; 0x022440C0 - push {r4, lr} - add r4, r0, #0 - bl ov6_02245FDC - mov r0, #0 - ldr r1, _022440F4 ; =0xFFFC0000 - str r0, [r4, #0x2c] - str r1, [r4, #0x54] - mov r1, #0xfe - lsl r1, r1, #0xc - str r1, [r4, #0x44] - mov r1, #0xff - lsl r1, r1, #0xc - str r1, [r4, #0x48] - mov r1, #0x5f - lsl r1, r1, #0xc - str r1, [r4, #0x4c] - mov r1, #0x61 - lsl r1, r1, #0xc - str r1, [r4, #0x50] - mov r1, #1 - str r1, [r4, #0x2c] - ldr r1, [r4, #0] - add r1, r1, #1 - str r1, [r4, #0] - pop {r4, pc} - ; .align 2, 0 -_022440F4: .word 0xFFFC0000 - thumb_func_end ov6_022440C0 - - thumb_func_start ov6_022440F8 -ov6_022440F8: ; 0x022440F8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r2, #0 - str r2, [r4, #0x2c] - ldr r1, [r4, #0x44] - ldr r0, [r4, #0x54] - add r0, r1, r0 - str r0, [r4, #0x44] - cmp r0, #0 - bgt _0224411C - mov r0, #2 - str r2, [r4, #0x44] - lsl r0, r0, #0xc - str r0, [r4, #0x54] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_0224411C: - ldr r0, [r4, #0x50] - str r0, [sp] - ldr r1, [r4, #0x44] - ldr r2, [r4, #0x4c] - ldr r3, [r4, #0x48] - add r0, r4, #0 - bl ov6_02244F80 - mov r0, #1 - str r0, [r4, #0x2c] - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022440F8 - - thumb_func_start ov6_02244138 -ov6_02244138: ; 0x02244138 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0x2c] - ldr r1, [r4, #0x4c] - ldr r0, [r4, #0x54] - sub r0, r1, r0 - str r0, [r4, #0x4c] - ldr r1, [r4, #0x50] - ldr r0, [r4, #0x54] - add r0, r1, r0 - str r0, [r4, #0x50] - mov r0, #2 - ldr r1, [r4, #0x54] - lsl r0, r0, #0xc - add r2, r1, r0 - lsl r1, r0, #4 - str r2, [r4, #0x54] - cmp r2, r1 - ble _02244166 - lsl r0, r0, #4 - str r0, [r4, #0x54] -_02244166: - mov r0, #0xe - ldr r1, [r4, #0x4c] - lsl r0, r0, #0xe - cmp r1, r0 - bge _02244172 - str r0, [r4, #0x4c] -_02244172: - mov r0, #0x22 - ldr r1, [r4, #0x50] - lsl r0, r0, #0xe - cmp r1, r0 - ble _0224417E - str r0, [r4, #0x50] -_0224417E: - ldr r0, [r4, #0x50] - str r0, [sp] - ldr r1, [r4, #0x44] - ldr r2, [r4, #0x4c] - ldr r3, [r4, #0x48] - add r0, r4, #0 - bl ov6_02244F80 - mov r0, #1 - str r0, [r4, #0x2c] - mov r0, #0xe - ldr r1, [r4, #0x4c] - lsl r0, r0, #0xe - cmp r1, r0 - bne _022441B6 - mov r0, #0x22 - ldr r1, [r4, #0x50] - lsl r0, r0, #0xe - cmp r1, r0 - bne _022441B6 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov6_02244D34 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_022441B6: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov6_02244138 - - thumb_func_start ov6_022441BC -ov6_022441BC: ; 0x022441BC - ldr r1, [r0, #8] - add r1, r1, #1 - str r1, [r0, #8] - cmp r1, #0xf - blt _022441D4 - mov r1, #0 - str r1, [r0, #8] - ldr r1, _022441D8 ; =0xFFFC0000 - str r1, [r0, #0x58] - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] -_022441D4: - mov r0, #0 - bx lr - ; .align 2, 0 -_022441D8: .word 0xFFFC0000 - thumb_func_end ov6_022441BC - - thumb_func_start ov6_022441DC -ov6_022441DC: ; 0x022441DC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [sp] - ldr r0, [r4, #0x58] - add r1, r1, r0 - mov r0, #0xa - lsl r0, r0, #0x10 - str r1, [sp] - cmp r1, r0 - bgt _02244214 - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [sp] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02244214: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, sp, #0 - bl sub_02021C50 - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022441DC - - thumb_func_start ov6_02244228 -ov6_02244228: ; 0x02244228 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r1, [r4, #0x58] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - ldr r0, _02244280 ; =0xFFFFE000 - str r1, [r4, #0x58] - cmp r1, r0 - ble _0224424C - str r0, [r4, #0x58] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, [r4, #0x5c] - bl sub_02077E3C -_0224424C: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r1, [sp] - ldr r0, [r4, #0x58] - add r0, r1, r0 - str r0, [sp] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_02244280: .word 0xFFFFE000 - thumb_func_end ov6_02244228 - - thumb_func_start ov6_02244284 -ov6_02244284: ; 0x02244284 - ldr r1, [r0, #8] - add r1, r1, #1 - str r1, [r0, #8] - cmp r1, #8 - blt _0224429C - mov r1, #0 - str r1, [r0, #8] - ldr r1, _022442A0 ; =0xFFFFF000 - str r1, [r0, #0x58] - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] -_0224429C: - mov r0, #0 - bx lr - ; .align 2, 0 -_022442A0: .word 0xFFFFF000 - thumb_func_end ov6_02244284 - - thumb_func_start ov6_022442A4 -ov6_022442A4: ; 0x022442A4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x58] - lsl r1, r0, #1 - ldr r0, _02244300 ; =0xFFFC0000 - str r1, [r4, #0x58] - cmp r1, r0 - bge _022442B8 - str r0, [r4, #0x58] -_022442B8: - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r1, [sp] - ldr r0, [r4, #0x58] - add r0, r1, r0 - str r0, [sp] - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - ldr r1, [sp] - ldr r0, _02244304 ; =0xFFFD8000 - cmp r1, r0 - bgt _022442F8 - mov r0, #1 - lsl r0, r0, #0xc - str r0, [r4, #0x54] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_022442F8: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_02244300: .word 0xFFFC0000 -_02244304: .word 0xFFFD8000 - thumb_func_end ov6_022442A4 - - thumb_func_start ov6_02244308 -ov6_02244308: ; 0x02244308 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0x2c] - ldr r1, [r4, #0x4c] - ldr r0, [r4, #0x54] - add r0, r1, r0 - str r0, [r4, #0x4c] - ldr r1, [r4, #0x50] - ldr r0, [r4, #0x54] - sub r0, r1, r0 - str r0, [r4, #0x50] - mov r0, #1 - ldr r1, [r4, #0x54] - lsl r0, r0, #0xe - add r2, r1, r0 - lsl r1, r0, #3 - str r2, [r4, #0x54] - cmp r2, r1 - ble _02244336 - lsl r0, r0, #3 - str r0, [r4, #0x54] -_02244336: - mov r0, #0x16 - ldr r1, [r4, #0x4c] - lsl r0, r0, #0xe - cmp r1, r0 - blt _02244342 - str r0, [r4, #0x4c] -_02244342: - mov r0, #0x1a - ldr r1, [r4, #0x50] - lsl r0, r0, #0xe - cmp r1, r0 - bgt _0224434E - str r0, [r4, #0x50] -_0224434E: - ldr r0, [r4, #0x50] - str r0, [sp] - ldr r1, [r4, #0x44] - ldr r2, [r4, #0x4c] - ldr r3, [r4, #0x48] - add r0, r4, #0 - bl ov6_02244F80 - mov r0, #1 - str r0, [r4, #0x2c] - mov r0, #0x16 - ldr r1, [r4, #0x4c] - lsl r0, r0, #0xe - cmp r1, r0 - bne _02244382 - mov r0, #0x1a - ldr r1, [r4, #0x50] - lsl r0, r0, #0xe - cmp r1, r0 - bne _02244382 - add r0, r4, #0 - bl ov6_02246018 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02244382: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov6_02244308 - - thumb_func_start ov6_02244388 -ov6_02244388: ; 0x02244388 - push {r4, lr} - add r4, r0, #0 - bl ov6_022448C8 - mov r0, #0 - str r0, [r4, #0x10] - ldr r1, [r4, #0] - add r1, r1, #1 - str r1, [r4, #0] - pop {r4, pc} - thumb_func_end ov6_02244388 - - thumb_func_start ov6_0224439C -ov6_0224439C: ; 0x0224439C - push {r4, lr} - add r4, r0, #0 - bl ov6_02244FB4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0224439C - - thumb_func_start ov6_022443B0 -ov6_022443B0: ; 0x022443B0 - mov r1, #1 - str r1, [r0, #4] - mov r0, #0 - bx lr - thumb_func_end ov6_022443B0 - - thumb_func_start ov6_022443B8 -ov6_022443B8: ; 0x022443B8 - push {r3, r4, r5, lr} - ldr r4, _022443E8 ; =0x02249310 - add r5, r1, #0 -_022443BE: - ldr r1, [r5, #0] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - blx r1 - cmp r0, #1 - beq _022443BE - ldr r0, [r5, #0x10] - cmp r0, #1 - bne _022443E6 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _022443E0 - bl sub_020713D0 -_022443E0: - add r0, r5, #0 - bl ov6_02244C10 -_022443E6: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022443E8: .word 0x02249310 - thumb_func_end ov6_022443B8 - - thumb_func_start ov6_022443EC -ov6_022443EC: ; 0x022443EC - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r0, #0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02244402 - add sp, #0x18 - mov r0, #0 - pop {r3, r4, r5, pc} -_02244402: - ldr r5, _02244454 ; =0x022491D4 - add r3, sp, #0xc - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - ldr r5, _02244458 ; =0x0224912C - str r0, [r3, #0] - ldmia r5!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, r2, #0 - str r0, [r3, #0] - add r0, r4, #0 - bl ov6_02244CFC - mov r1, #0x79 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - add r1, sp, #0 - bl ov6_0224529C - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - mov r1, #1 - bl ov6_022452BC - add r0, r4, #0 - bl ov6_0224469C - mov r0, #1 - str r0, [r4, #0x10] - ldr r1, [r4, #0] - add r1, r1, #1 - str r1, [r4, #0] - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244454: .word 0x022491D4 -_02244458: .word 0x0224912C - thumb_func_end ov6_022443EC - - thumb_func_start ov6_0224445C -ov6_0224445C: ; 0x0224445C - push {r4, lr} - add r4, r0, #0 - bl ov6_022451B8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0224445C - - thumb_func_start ov6_02244470 -ov6_02244470: ; 0x02244470 - push {r4, lr} - add r4, r0, #0 - bl ov6_02244DB4 - add r0, r4, #0 - bl ov6_02244674 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_02244470 - - thumb_func_start ov6_02244488 -ov6_02244488: ; 0x02244488 - push {r4, lr} - mov r1, #0x82 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - bne _0224449A - mov r0, #0 - pop {r4, pc} -_0224449A: - bl ov6_0224469C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov6_02244488 - - thumb_func_start ov6_022444A8 -ov6_022444A8: ; 0x022444A8 - push {r4, lr} - add r4, r0, #0 - bl ov6_0224543C - add r0, r4, #0 - bl ov6_0224551C - add r0, r4, #0 - bl ov6_02244F74 - add r0, r4, #0 - mov r1, #1 - bl ov6_02245F64 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022444A8 - - thumb_func_start ov6_022444D0 -ov6_022444D0: ; 0x022444D0 - push {r4, lr} - add r4, r0, #0 - bl ov6_02245470 - cmp r0, #2 - beq _022444E0 - mov r0, #0 - pop {r4, pc} -_022444E0: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022444D0 - - thumb_func_start ov6_022444F8 -ov6_022444F8: ; 0x022444F8 - push {r3, lr} - ldr r1, [r0, #8] - add r1, r1, #1 - str r1, [r0, #8] - cmp r1, #0x14 - blt _02244512 - mov r1, #0 - str r1, [r0, #8] - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] - bl ov6_022456D4 -_02244512: - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_022444F8 - - thumb_func_start ov6_02244518 -ov6_02244518: ; 0x02244518 - push {r4, lr} - add r4, r0, #0 - bl ov6_02245470 - cmp r0, #3 - beq _02244528 - mov r0, #0 - pop {r4, pc} -_02244528: - ldr r0, _02244544 ; =0x00000649 - bl sub_02005748 - mov r0, #2 - lsl r0, r0, #0xa - str r0, [r4, #0x54] - mov r0, #2 - str r0, [r4, #0x14] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} - nop -_02244544: .word 0x00000649 - thumb_func_end ov6_02244518 - - thumb_func_start ov6_02244548 -ov6_02244548: ; 0x02244548 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0x2c] - ldr r1, [r4, #0x4c] - ldr r0, [r4, #0x54] - add r0, r1, r0 - str r0, [r4, #0x4c] - ldr r1, [r4, #0x50] - ldr r0, [r4, #0x54] - sub r0, r1, r0 - str r0, [r4, #0x50] - mov r0, #2 - ldr r1, [r4, #0x54] - lsl r0, r0, #0xa - add r2, r1, r0 - lsl r1, r0, #5 - str r2, [r4, #0x54] - cmp r2, r1 - ble _02244576 - lsl r0, r0, #5 - str r0, [r4, #0x54] -_02244576: - mov r0, #0x5f - ldr r1, [r4, #0x4c] - lsl r0, r0, #0xc - cmp r1, r0 - blt _02244582 - str r0, [r4, #0x4c] -_02244582: - mov r0, #0x61 - ldr r1, [r4, #0x50] - lsl r0, r0, #0xc - cmp r1, r0 - bgt _0224458E - str r0, [r4, #0x50] -_0224458E: - ldr r0, [r4, #0x50] - str r0, [sp] - ldr r1, [r4, #0x44] - ldr r2, [r4, #0x4c] - ldr r3, [r4, #0x48] - add r0, r4, #0 - bl ov6_02244F80 - mov r0, #1 - str r0, [r4, #0x2c] - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _022445BA - add r0, r4, #0 - bl ov6_02245470 - cmp r0, #4 - bne _022445BA - mov r0, #1 - str r0, [r4, #0x18] - bl ov6_02243F50 -_022445BA: - mov r0, #0x5f - ldr r1, [r4, #0x4c] - lsl r0, r0, #0xc - cmp r1, r0 - bne _022445E6 - mov r0, #0x61 - ldr r1, [r4, #0x50] - lsl r0, r0, #0xc - cmp r1, r0 - bne _022445E6 - ldr r0, [r4, #0x60] - ldr r0, [r0, #8] - bl ov6_02244F20 - mov r0, #1 - str r0, [r4, #0x14] - add r0, r4, #0 - bl ov6_02244F58 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_022445E6: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov6_02244548 - - thumb_func_start ov6_022445EC -ov6_022445EC: ; 0x022445EC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x18] - cmp r1, #0 - bne _02244606 - bl ov6_02245470 - cmp r0, #4 - bne _02244606 - mov r0, #1 - str r0, [r4, #0x18] - bl ov6_02243F50 -_02244606: - add r0, r4, #0 - bl ov6_02245470 - cmp r0, #2 - beq _02244614 - mov r0, #0 - pop {r4, pc} -_02244614: - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _02244622 - mov r0, #1 - str r0, [r4, #0x18] - bl ov6_02243F50 -_02244622: - add r0, r4, #0 - bl ov6_02245480 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022445EC - - thumb_func_start ov6_02244634 -ov6_02244634: ; 0x02244634 - push {r4, lr} - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _02244646 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] -_02244646: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02244634 - - thumb_func_start ov6_0224464C -ov6_0224464C: ; 0x0224464C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x81 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02244670 ; =ov6_022446B8 - add r1, r4, #0 - mov r2, #0x80 - bl sub_0200DA04 - mov r1, #0x85 - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r4, pc} - nop -_02244670: .word ov6_022446B8 - thumb_func_end ov6_0224464C - - thumb_func_start ov6_02244674 -ov6_02244674: ; 0x02244674 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x81 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] - ldr r0, _02244698 ; =ov6_022447B4 - add r1, r4, #0 - mov r2, #0x80 - bl sub_0200DA04 - mov r1, #0x85 - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r4, pc} - nop -_02244698: .word ov6_022447B4 - thumb_func_end ov6_02244674 - - thumb_func_start ov6_0224469C -ov6_0224469C: ; 0x0224469C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022446B6 - bl sub_0200DA58 - mov r0, #0x85 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_022446B6: - pop {r4, pc} - thumb_func_end ov6_0224469C - - thumb_func_start ov6_022446B8 -ov6_022446B8: ; 0x022446B8 - push {r3, r4, r5, r6, r7, lr} - mov r0, #0x81 - add r6, r1, #0 - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r0, #0 - bne _0224472E - mov r7, #0x6b - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_022446CE: - ldr r0, [r5, r7] - cmp r0, #0 - beq _022446D8 - bl sub_0200A3DC -_022446D8: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022446CE - mov r7, #0x6f - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_022446E8: - ldr r0, [r4, r7] - cmp r0, #0 - beq _022446F2 - bl sub_0200A640 -_022446F2: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #3 - blt _022446E8 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r1, [r6, r0] - cmp r1, #0 - beq _0224470A - add r0, r6, #0 - bl ov6_02245118 -_0224470A: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r1, [r6, r0] - cmp r1, #0 - beq _0224471A - add r0, r6, #0 - bl ov6_02245170 -_0224471A: - mov r0, #0x81 - lsl r0, r0, #2 - ldr r1, [r6, r0] - mov r2, #0x80 - add r1, r1, #1 - str r1, [r6, r0] - ldr r0, _02244730 ; =ov6_02244734 - add r1, r6, #0 - bl sub_0200DA3C -_0224472E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244730: .word ov6_02244734 - thumb_func_end ov6_022446B8 - - thumb_func_start ov6_02244734 -ov6_02244734: ; 0x02244734 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - mov r0, #0x81 - add r6, r1, #0 - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r0, #1 - bne _022447B2 - mov r7, #0x6b - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_0224474C: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02244756 - bl sub_02009D4C -_02244756: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0224474C - mov r7, #0x6f - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_02244766: - ldr r0, [r4, r7] - cmp r0, #0 - beq _02244770 - bl sub_02009D4C -_02244770: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #3 - blt _02244766 - mov r0, #0x83 - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r0, #0 - beq _0224478E - bl sub_020181C4 - mov r0, #0x83 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r6, r0] -_0224478E: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r6, r0] - cmp r0, #0 - beq _022447A4 - bl sub_020181C4 - mov r0, #0x21 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r6, r0] -_022447A4: - mov r0, #0x82 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r6, r0] - ldr r0, [sp] - bl sub_0200DA58 -_022447B2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02244734 - - thumb_func_start ov6_022447B4 -ov6_022447B4: ; 0x022447B4 - push {r4, lr} - mov r0, #0x67 - add r4, r1, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02009DC8 - mov r1, #0x81 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - bne _022447E6 - bl sub_0200A3DC - ldr r0, _022447E8 ; =ov6_022447EC - add r1, r4, #0 - mov r2, #0x80 - bl sub_0200DA3C - mov r0, #0x81 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_022447E6: - pop {r4, pc} - ; .align 2, 0 -_022447E8: .word ov6_022447EC - thumb_func_end ov6_022447B4 - - thumb_func_start ov6_022447EC -ov6_022447EC: ; 0x022447EC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x67 - add r4, r1, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02009DC8 - mov r1, #0x81 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #1 - bne _0224481A - bl sub_02009D4C - mov r0, #0x82 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r5, #0 - bl sub_0200DA58 -_0224481A: - pop {r3, r4, r5, pc} - thumb_func_end ov6_022447EC - - thumb_func_start ov6_0224481C -ov6_0224481C: ; 0x0224481C - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov6_0224491C - mov r2, #3 - mov r3, #1 - add r4, r0, #0 - lsl r2, r2, #0x12 - add r0, r5, #0 - mov r1, #0 - lsl r3, r3, #0xc - str r2, [sp] - bl ov6_02244F80 - add r0, r5, #0 - bl ov6_02244F2C - ldr r0, [r5, #0x60] - mov r1, #0 - ldr r0, [r0, #8] - bl sub_0201A008 - strh r0, [r5, #0x24] - ldr r0, [r5, #0x60] - mov r1, #3 - ldr r0, [r0, #8] - bl sub_0201A008 - strh r0, [r5, #0x26] - ldr r2, _022448C4 ; =0x0400000A - mov r1, #3 - ldrh r3, [r2] - mov r0, #1 - bic r3, r1 - orr r0, r3 - strh r0, [r2] - ldrh r0, [r2, #4] - bic r0, r1 - strh r0, [r2, #4] - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - add r2, r5, #0 - add r0, r4, #0 - mov r1, #2 - add r2, #0x6c - bl ov6_02244E54 - ldr r0, [r5, #0x60] - add r3, r5, #0 - ldr r0, [r0, #8] - add r1, r4, #0 - mov r2, #0 - add r3, #0x68 - bl ov6_02244E7C - ldr r0, [r5, #0x60] - add r3, r5, #0 - ldr r0, [r0, #8] - add r1, r4, #0 - mov r2, #1 - add r3, #0x64 - bl ov6_02244EB4 - add r0, r5, #0 - add r1, r4, #0 - bl ov6_02244928 - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #4 - mov r1, #0x20 - bl sub_020711EC - mov r1, #0x1e - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022448C4: .word 0x0400000A - thumb_func_end ov6_0224481C - - thumb_func_start ov6_022448C8 -ov6_022448C8: ; 0x022448C8 - push {r4, lr} - add r4, r0, #0 - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0207121C - ldr r0, [r4, #0x60] - ldr r0, [r0, #8] - bl ov6_02244F20 - add r0, r4, #0 - bl ov6_02244B6C - ldr r2, _02244918 ; =0x04000008 - ldrh r1, [r4, #0x24] - ldrh r3, [r2] - mov r0, #3 - bic r3, r0 - orr r1, r3 - strh r1, [r2] - ldrh r1, [r2, #6] - bic r1, r0 - ldrh r0, [r4, #0x26] - orr r0, r1 - strh r0, [r2, #6] - mov r0, #0 - mov r1, #1 - bl sub_0205D8CC - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - pop {r4, pc} - nop -_02244918: .word 0x04000008 - thumb_func_end ov6_022448C8 - - thumb_func_start ov6_0224491C -ov6_0224491C: ; 0x0224491C - ldr r3, _02244924 ; =sub_02006C24 - mov r0, #0x61 - mov r1, #4 - bx r3 - ; .align 2, 0 -_02244924: .word sub_02006C24 - thumb_func_end ov6_0224491C - - thumb_func_start ov6_02244928 -ov6_02244928: ; 0x02244928 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r1, #0 - mov r1, #0x7d - add r5, r0, #0 - lsl r1, r1, #2 - add r1, r5, r1 - bl ov6_0224508C - add r1, r5, #0 - mov r0, #0x20 - add r1, #0x74 - mov r2, #4 - bl sub_020095C4 - str r0, [r5, #0x70] - add r0, r5, #0 - mov r2, #2 - add r0, #0x74 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - mov r0, #4 - mov r1, #0 - add r2, r0, #0 - bl sub_02009714 - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #3 - mov r1, #1 - mov r2, #4 - bl sub_02009714 - mov r1, #0x1a - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #4 - mov r1, #2 - add r2, r0, #0 - bl sub_02009714 - mov r1, #0x69 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #2 - mov r1, #3 - mov r2, #4 - bl sub_02009714 - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - mov r0, #4 - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0xa - mov r3, #0 - bl sub_02009A4C - mov r1, #0x6b - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _022449D6 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x10 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0xd - mov r3, #0 - bl sub_02009A4C - b _022449F0 -_022449D6: - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x10 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0x10 - mov r3, #0 - bl sub_02009A4C -_022449F0: - mov r1, #0x1b - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r5, #0 - add r1, r4, #0 - bl ov6_022450F4 - mov r1, #0x6d - lsl r1, r1, #2 - str r0, [r5, r1] - mov r6, #0 - str r6, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #4 - sub r1, #0x14 - str r0, [sp, #0xc] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #3 - add r3, r6, #0 - bl sub_02009B04 - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, #0xc] - add r6, r6, #1 - cmp r0, #0 - beq _02244A52 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #4 - str r2, [sp, #0xc] - sub r1, #0x1c - ldr r0, [r5, r1] - add r1, r4, #0 - mov r3, #0 - bl sub_02009B04 - lsl r1, r6, #2 - add r2, r5, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r2, r1] - add r6, r6, #1 -_02244A52: - add r0, r5, #0 - add r1, r4, #0 - bl ov6_0224514C - lsl r1, r6, #2 - add r2, r5, r1 - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r2, r1] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x18 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0xb - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x72 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _02244AA4 - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x24 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0xe - mov r3, #0 - bl sub_02009BC4 - b _02244ABC -_02244AA4: - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x24 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0x11 - mov r3, #0 - bl sub_02009BC4 -_02244ABC: - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #3 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - mov r2, #6 - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x1d - lsl r1, r1, #4 - str r0, [r5, r1] - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x28 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0xc - bl sub_02009BC4 - mov r1, #0x76 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _02244B24 - mov r0, #1 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x30 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0xf - mov r3, #0 - bl sub_02009BC4 - b _02244B3E -_02244B24: - mov r0, #1 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #4 - sub r1, #0x30 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, r4, #0 - mov r2, #0x12 - mov r3, #0 - bl sub_02009BC4 -_02244B3E: - mov r1, #0x77 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r1, #0x7d - lsl r1, r1, #2 - ldr r0, [r5, #0x5c] - add r1, r5, r1 - mov r2, #4 - bl ov6_0224509C - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r5, r1] - sub r1, #0x18 - add r0, r5, r1 - mov r1, #4 - bl ov6_022450E4 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r5, r1] - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02244928 - - thumb_func_start ov6_02244B6C -ov6_02244B6C: ; 0x02244B6C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r7, #0x6b - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_02244B78: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02244B82 - bl sub_0200A4E4 -_02244B82: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _02244B78 - mov r7, #0x6f - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_02244B92: - ldr r0, [r4, r7] - cmp r0, #0 - beq _02244B9C - bl sub_0200A6DC -_02244B9C: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #3 - blt _02244B92 - mov r7, #0x72 - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_02244BAC: - ldr r0, [r4, r7] - cmp r0, #0 - beq _02244BB6 - bl sub_02009D4C -_02244BB6: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #4 - blt _02244BAC - mov r7, #0x76 - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_02244BC6: - ldr r0, [r4, r7] - cmp r0, #0 - beq _02244BD0 - bl sub_02009D4C -_02244BD0: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #2 - blt _02244BC6 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_02009754 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r6, r0] - bl sub_02009754 - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_02009754 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_02009754 - ldr r0, [r6, #0x70] - bl sub_020219C0 - ldr r0, [r6, #0x70] - bl sub_02021964 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02244B6C - - thumb_func_start ov6_02244C10 -ov6_02244C10: ; 0x02244C10 - push {r3, lr} - ldr r0, [r0, #0x70] - cmp r0, #0 - beq _02244C1C - bl sub_020219F8 -_02244C1C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02244C10 - - thumb_func_start ov6_02244C20 -ov6_02244C20: ; 0x02244C20 - push {r4, r5, r6, lr} - sub sp, #0x70 - add r5, r0, #0 - ldr r0, [sp, #0x84] - add r4, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - cmp r0, #4 - bne _02244C68 - mov r0, #0 - mvn r0, r0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - mov r6, #0x67 - ldr r3, [sp, #0x88] - str r0, [sp, #0xc] - lsl r6, r6, #2 - str r3, [sp, #0x10] - ldr r3, [r5, r6] - str r3, [sp, #0x14] - add r3, r6, #4 - ldr r3, [r5, r3] - add r6, #8 - str r3, [sp, #0x18] - ldr r3, [r5, r6] - str r3, [sp, #0x1c] - str r0, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r3, [sp, #0x80] - add r0, sp, #0x4c - bl sub_020093B4 - b _02244CA2 -_02244C68: - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r3, #0 - ldr r0, [sp, #0x88] - str r3, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r6, [r5, r0] - str r6, [sp, #0x14] - add r6, r0, #4 - ldr r6, [r5, r6] - str r6, [sp, #0x18] - add r6, r0, #0 - add r6, #8 - ldr r6, [r5, r6] - add r0, #0xc - str r6, [sp, #0x1c] - ldr r0, [r5, r0] - str r0, [sp, #0x20] - str r3, [sp, #0x24] - str r3, [sp, #0x28] - ldr r3, [sp, #0x80] - add r0, sp, #0x4c - bl sub_020093B4 -_02244CA2: - ldr r0, [r5, #0x70] - add r2, sp, #0x34 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - ldmia r4!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r2, #0] - ldr r0, [sp, #0x8c] - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x44] - mov r0, #4 - str r0, [sp, #0x48] - add r0, sp, #0x2c - bl sub_02021B90 - add r4, r0, #0 - bne _02244CCE - bl sub_02022974 -_02244CCE: - add r0, r4, #0 - add sp, #0x70 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02244C20 - - thumb_func_start ov6_02244CD4 -ov6_02244CD4: ; 0x02244CD4 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r5, #1 - add r4, r3, #0 - str r5, [sp] - mov r3, #0 - str r3, [sp, #4] - str r3, [sp, #8] - str r2, [sp, #0xc] - add r2, r5, #0 - bl ov6_02244C20 - add r1, r4, #0 - add r5, r0, #0 - bl sub_02021D6C - add r0, r5, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02244CD4 - - thumb_func_start ov6_02244CFC -ov6_02244CFC: ; 0x02244CFC - push {r4, lr} - sub sp, #0x10 - ldr r2, [r0, #0xc] - mov r3, #0 - cmp r2, #1 - bne _02244D0A - mov r3, #1 -_02244D0A: - mov r2, #2 - str r2, [sp] - mov r4, #1 - str r4, [sp, #4] - mov r4, #0 - str r4, [sp, #8] - mov r4, #0x83 - str r4, [sp, #0xc] - bl ov6_02244C20 - add r4, r0, #0 - mov r1, #0 - bl sub_02021CAC - add r0, r4, #0 - mov r1, #6 - bl sub_02021D6C - add r0, r4, #0 - add sp, #0x10 - pop {r4, pc} - thumb_func_end ov6_02244CFC - - thumb_func_start ov6_02244D34 -ov6_02244D34: ; 0x02244D34 - push {r4, lr} - mov r1, #1 - add r4, r0, #0 - bl sub_02021CC8 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02244D34 - - thumb_func_start ov6_02244D4C -ov6_02244D4C: ; 0x02244D4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r4, r0, #0 - add r0, sp, #0x1c - mov r7, #0 - str r7, [r0, #0] - str r7, [r0, #4] - add r6, r2, #0 - ldr r5, _02244DB0 ; =0x02249168 - add r3, r1, #0 - str r7, [r0, #8] - ldmia r5!, {r0, r1} - add r2, sp, #0x10 - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - add r1, r3, #0 - str r0, [r2, #0] - str r7, [sp] - sub r0, r7, #1 - str r0, [sp, #4] - str r7, [sp, #8] - add r0, r4, #0 - add r2, r7, #0 - add r3, r7, #0 - str r6, [sp, #0xc] - bl ov6_02244C20 - add r4, r0, #0 - mov r1, #2 - bl sub_02021CF8 - add r0, r4, #0 - add r1, sp, #0x1c - bl sub_02021C60 - add r0, r4, #0 - add r1, sp, #0x10 - bl sub_02021C70 - add r0, r7, #0 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - add r0, r4, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244DB0: .word 0x02249168 - thumb_func_end ov6_02244D4C - - thumb_func_start ov6_02244DB4 -ov6_02244DB4: ; 0x02244DB4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov6_0224491C - add r6, r0, #0 - mov r0, #0x6b - mov r5, #0 - add r2, r4, #0 - lsl r0, r0, #2 -_02244DC8: - ldr r1, [r2, r0] - cmp r1, #0 - bne _02244DF4 - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r6, #0 - mov r2, #7 - bl sub_02009A4C - lsl r1, r5, #2 - add r2, r4, r1 - mov r1, #0x6b - lsl r1, r1, #2 - str r0, [r2, r1] - b _02244DFC -_02244DF4: - add r5, r5, #1 - add r2, r2, #4 - cmp r5, #4 - blt _02244DC8 -_02244DFC: - cmp r5, #4 - blt _02244E04 - bl sub_02022974 -_02244E04: - mov r0, #0x72 - mov r5, #0 - add r2, r4, #0 - lsl r0, r0, #2 -_02244E0C: - ldr r1, [r2, r0] - cmp r1, #0 - bne _02244E38 - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r6, #0 - mov r2, #8 - bl sub_02009BC4 - lsl r1, r5, #2 - add r2, r4, r1 - mov r1, #0x72 - lsl r1, r1, #2 - str r0, [r2, r1] - b _02244E40 -_02244E38: - add r5, r5, #1 - add r2, r2, #4 - cmp r5, #4 - blt _02244E0C -_02244E40: - cmp r5, #4 - blt _02244E48 - bl sub_02022974 -_02244E48: - add r0, r6, #0 - bl sub_02006CA8 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02244DB4 - - thumb_func_start ov6_02244E54 -ov6_02244E54: ; 0x02244E54 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #4 - bl sub_02006CB8 - add r1, r5, #0 - add r4, r0, #0 - bl sub_020A71B0 - ldr r1, [r5, #0] - mov r0, #3 - ldr r1, [r1, #0xc] - mov r2, #0x20 - lsl r3, r0, #7 - bl sub_0201972C - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02244E54 - - thumb_func_start ov6_02244E7C -ov6_02244E7C: ; 0x02244E7C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - add r4, r3, #0 - mov r2, #4 - bl sub_02006CB8 - add r1, r4, #0 - add r6, r0, #0 - bl sub_020A7118 - ldr r3, [r4, #0] - mov r0, #0 - str r0, [sp] - ldr r2, [r3, #0x14] - ldr r3, [r3, #0x10] - add r0, r5, #0 - mov r1, #3 - bl sub_0201958C - add r0, r6, #0 - bl sub_020181C4 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02244E7C - - thumb_func_start ov6_02244EB4 -ov6_02244EB4: ; 0x02244EB4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r2, #0 - add r6, r1, #0 - mov r2, #0 - add r4, r3, #0 - mov r1, #3 - add r3, r2, #0 - add r5, r0, #0 - bl sub_02019184 - mov r1, #3 - add r0, r5, #0 - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - add r0, r6, #0 - add r1, r7, #0 - mov r2, #4 - bl sub_02006CB8 - add r1, r4, #0 - add r6, r0, #0 - bl sub_020A7248 - ldr r3, [r4, #0] - add r0, r5, #0 - add r2, r3, #0 - ldr r3, [r3, #8] - mov r1, #3 - add r2, #0xc - bl sub_02019574 - mov r0, #0x20 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0xc - mov r2, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #3 - add r3, r2, #0 - bl sub_02019E2C - add r0, r5, #0 - mov r1, #3 - bl sub_02019448 - add r0, r6, #0 - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02244EB4 - - thumb_func_start ov6_02244F20 -ov6_02244F20: ; 0x02244F20 - ldr r3, _02244F28 ; =sub_02019EBC - mov r1, #3 - bx r3 - nop -_02244F28: .word sub_02019EBC - thumb_func_end ov6_02244F20 - - thumb_func_start ov6_02244F2C -ov6_02244F2C: ; 0x02244F2C - push {r4, lr} - add r4, r0, #0 - bl ov6_02244F8C - mov r0, #0 - str r0, [r4, #0x2c] - add r0, r4, #0 - bl ov6_02244F58 - add r0, r4, #0 - bl ov6_02244F60 - add r0, r4, #0 - bl ov6_02244F50 - mov r0, #1 - str r0, [r4, #0x2c] - pop {r4, pc} - thumb_func_end ov6_02244F2C - - thumb_func_start ov6_02244F50 -ov6_02244F50: ; 0x02244F50 - mov r1, #1 - str r1, [r0, #0x30] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02244F50 - - thumb_func_start ov6_02244F58 -ov6_02244F58: ; 0x02244F58 - mov r1, #0 - str r1, [r0, #0x30] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02244F58 - - thumb_func_start ov6_02244F60 -ov6_02244F60: ; 0x02244F60 - mov r1, #0x18 - str r1, [r0, #0x34] - mov r1, #0 - str r1, [r0, #0x38] - mov r1, #0x17 - str r1, [r0, #0x3c] - mov r1, #1 - str r1, [r0, #0x40] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02244F60 - - thumb_func_start ov6_02244F74 -ov6_02244F74: ; 0x02244F74 - mov r1, #0x17 - str r1, [r0, #0x3c] - mov r1, #1 - str r1, [r0, #0x40] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02244F74 - - thumb_func_start ov6_02244F80 -ov6_02244F80: ; 0x02244F80 - str r1, [r0, #0x44] - str r3, [r0, #0x48] - ldr r1, [sp] - str r2, [r0, #0x4c] - str r1, [r0, #0x50] - bx lr - thumb_func_end ov6_02244F80 - - thumb_func_start ov6_02244F8C -ov6_02244F8C: ; 0x02244F8C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02244F9E - bl sub_02022974 -_02244F9E: - ldr r0, _02244FB0 ; =ov6_02244FE4 - add r1, r4, #0 - mov r2, #0x81 - bl sub_0200DA04 - mov r1, #0x86 - lsl r1, r1, #2 - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 -_02244FB0: .word ov6_02244FE4 - thumb_func_end ov6_02244F8C - - thumb_func_start ov6_02244FB4 -ov6_02244FB4: ; 0x02244FB4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02244FC6 - bl sub_02022974 -_02244FC6: - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200DA58 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02244FE0 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - pop {r4, pc} - nop -_02244FE0: .word 0xFFFF1FFF - thumb_func_end ov6_02244FB4 - - thumb_func_start ov6_02244FE4 -ov6_02244FE4: ; 0x02244FE4 - push {r3, r4, r5, r6} - ldr r0, [r1, #0x2c] - cmp r0, #0 - beq _0224507A - mov r3, #1 - lsl r3, r3, #0x1a - ldr r2, [r3, #0] - ldr r0, _02245080 ; =0xFFFF1FFF - and r2, r0 - ldr r0, [r1, #0x30] - lsl r0, r0, #0xd - orr r0, r2 - str r0, [r3, #0] - add r3, #0x48 - ldrh r2, [r3] - mov r0, #0x3f - bic r2, r0 - ldr r0, [r1, #0x34] - orr r2, r0 - ldr r0, [r1, #0x38] - cmp r0, #0 - beq _02245014 - mov r0, #0x20 - orr r2, r0 -_02245014: - ldr r0, _02245084 ; =0x04000048 - strh r2, [r0] - ldrh r2, [r0, #2] - mov r0, #0x3f - bic r2, r0 - ldr r0, [r1, #0x3c] - orr r2, r0 - ldr r0, [r1, #0x40] - cmp r0, #0 - beq _0224502C - mov r0, #0x20 - orr r2, r0 -_0224502C: - ldr r5, _02245088 ; =0x0400004A - strh r2, [r5] - ldr r2, [r1, #0x50] - ldr r6, [r1, #0x48] - asr r0, r2, #0xb - lsr r0, r0, #0x14 - add r0, r2, r0 - ldr r2, [r1, #0x4c] - asr r4, r0, #0xc - asr r0, r2, #0xb - lsr r0, r0, #0x14 - add r0, r2, r0 - ldr r2, [r1, #0x44] - asr r3, r0, #0xc - asr r0, r2, #0xb - lsr r0, r0, #0x14 - asr r1, r6, #0xb - add r0, r2, r0 - lsr r1, r1, #0x14 - asr r0, r0, #0xc - add r1, r6, r1 - lsl r2, r0, #8 - mov r0, #0xff - asr r1, r1, #0xc - lsl r0, r0, #8 - lsl r1, r1, #0x18 - and r2, r0 - lsr r1, r1, #0x18 - orr r2, r1 - add r1, r5, #0 - sub r1, #0xa - strh r2, [r1] - lsl r1, r3, #8 - and r1, r0 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - orr r1, r0 - sub r0, r5, #6 - strh r1, [r0] -_0224507A: - pop {r3, r4, r5, r6} - bx lr - nop -_02245080: .word 0xFFFF1FFF -_02245084: .word 0x04000048 -_02245088: .word 0x0400004A - thumb_func_end ov6_02244FE4 - - thumb_func_start ov6_0224508C -ov6_0224508C: ; 0x0224508C - ldr r3, _02245098 ; =sub_02075EF4 - add r2, r0, #0 - add r0, r1, #0 - ldr r1, [r2, #0x5c] - mov r2, #2 - bx r3 - ; .align 2, 0 -_02245098: .word sub_02075EF4 - thumb_func_end ov6_0224508C - - thumb_func_start ov6_0224509C -ov6_0224509C: ; 0x0224509C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - mov r1, #0x32 - add r6, r0, #0 - mov r0, #4 - lsl r1, r1, #6 - add r7, r2, #0 - bl sub_02018144 - add r4, r0, #0 - bne _022450B8 - bl sub_02022974 -_022450B8: - mov r1, #0 - add r0, r6, #0 - add r2, r1, #0 - bl sub_02074470 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - ldrh r0, [r5, #6] - add r2, r7, #0 - add r3, r4, #0 - str r0, [sp, #0xc] - ldrh r0, [r5] - ldrh r1, [r5, #2] - bl sub_02013750 - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_0224509C - - thumb_func_start ov6_022450E4 -ov6_022450E4: ; 0x022450E4 - add r3, r0, #0 - add r2, r1, #0 - ldrh r0, [r3] - ldrh r1, [r3, #4] - ldr r3, _022450F0 ; =sub_02013660 - bx r3 - ; .align 2, 0 -_022450F0: .word sub_02013660 - thumb_func_end ov6_022450E4 - - thumb_func_start ov6_022450F4 -ov6_022450F4: ; 0x022450F4 - push {lr} - sub sp, #0xc - mov r2, #3 - str r2, [sp] - mov r2, #1 - str r2, [sp, #4] - mov r2, #4 - str r2, [sp, #8] - mov r2, #0x67 - lsl r2, r2, #2 - ldr r0, [r0, r2] - mov r2, #5 - mov r3, #0 - bl sub_02009A4C - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov6_022450F4 - - thumb_func_start ov6_02245118 -ov6_02245118: ; 0x02245118 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x67 - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #3 - bl sub_02009DC8 - bl sub_0200A534 - mov r1, #1 - bl sub_020A81B0 - mov r1, #0x32 - add r5, r0, #0 - add r0, r4, #0 - lsl r1, r1, #6 - bl sub_020C2C54 - mov r2, #0x32 - add r0, r4, #0 - add r1, r5, #0 - lsl r2, r2, #6 - bl sub_020C02BC - pop {r3, r4, r5, pc} - thumb_func_end ov6_02245118 - - thumb_func_start ov6_0224514C -ov6_0224514C: ; 0x0224514C - push {r3, lr} - sub sp, #0x10 - mov r2, #2 - str r2, [sp] - mov r2, #1 - str r2, [sp, #4] - str r2, [sp, #8] - mov r2, #4 - str r2, [sp, #0xc] - mov r2, #0x1a - lsl r2, r2, #4 - ldr r0, [r0, r2] - mov r2, #3 - mov r3, #0 - bl sub_02009B04 - add sp, #0x10 - pop {r3, pc} - thumb_func_end ov6_0224514C - - thumb_func_start ov6_02245170 -ov6_02245170: ; 0x02245170 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - add r4, r1, #0 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_02009DC8 - bl sub_0200A534 - add r6, r0, #0 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02009DC8 - add r1, r6, #0 - bl sub_0200A72C - mov r1, #1 - bl sub_020A81FC - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0x20 - bl sub_020C2C54 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0x20 - bl sub_020C0160 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02245170 - - thumb_func_start ov6_022451B8 -ov6_022451B8: ; 0x022451B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_02009DC8 - add r4, r0, #0 - bl sub_0200A4E4 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02009D68 - mov r1, #0x6b - mov r0, #0 - add r3, r5, #0 - lsl r1, r1, #2 -_022451E2: - ldr r2, [r3, r1] - cmp r2, r4 - bne _022451F6 - lsl r1, r0, #2 - add r2, r5, r1 - mov r1, #0x6b - mov r3, #0 - lsl r1, r1, #2 - str r3, [r2, r1] - b _022451FE -_022451F6: - add r0, r0, #1 - add r3, r3, #4 - cmp r0, #4 - blt _022451E2 -_022451FE: - cmp r0, #4 - blt _02245206 - bl sub_02022974 -_02245206: - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #2 - bl sub_02009DC8 - add r4, r0, #0 - bl sub_0200A6DC - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02009D68 - mov r1, #0x6f - mov r0, #0 - add r3, r5, #0 - lsl r1, r1, #2 -_0224522C: - ldr r2, [r3, r1] - cmp r2, r4 - bne _02245240 - lsl r1, r0, #2 - add r2, r5, r1 - mov r1, #0x6f - mov r3, #0 - lsl r1, r1, #2 - str r3, [r2, r1] - b _02245248 -_02245240: - add r0, r0, #1 - add r3, r3, #4 - cmp r0, #3 - blt _0224522C -_02245248: - cmp r0, #3 - blt _02245250 - bl sub_02022974 -_02245250: - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_02009DC8 - add r4, r0, #0 - bl sub_02009D4C - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02009D68 - mov r1, #0x72 - mov r0, #0 - add r3, r5, #0 - lsl r1, r1, #2 -_02245276: - ldr r2, [r3, r1] - cmp r2, r4 - bne _0224528A - lsl r1, r0, #2 - add r2, r5, r1 - mov r1, #0x72 - mov r3, #0 - lsl r1, r1, #2 - str r3, [r2, r1] - b _02245292 -_0224528A: - add r0, r0, #1 - add r3, r3, #4 - cmp r0, #4 - blt _02245276 -_02245292: - cmp r0, #4 - blt _0224529A - bl sub_02022974 -_0224529A: - pop {r3, r4, r5, pc} - thumb_func_end ov6_022451B8 - - thumb_func_start ov6_0224529C -ov6_0224529C: ; 0x0224529C - push {r3, lr} - sub sp, #0x10 - mov r2, #3 - str r2, [sp] - sub r3, r2, #4 - str r3, [sp, #4] - mov r3, #0 - str r3, [sp, #8] - mov r3, #0x81 - str r3, [sp, #0xc] - mov r3, #2 - bl ov6_02244C20 - add sp, #0x10 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_0224529C - - thumb_func_start ov6_022452BC -ov6_022452BC: ; 0x022452BC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - mov r0, #2 - ldr r4, _02245324 ; =0x0224936C - add r6, r1, #0 - str r0, [r5, #0x14] - mov r7, #0 -_022452CC: - ldr r0, [r4, #0] - add r1, sp, #0x1c - str r0, [sp, #0x1c] - ldr r0, [r4, #4] - add r2, sp, #0x10 - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x24] - ldr r0, [r4, #8] - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - str r0, [sp, #0x18] - ldr r0, [r4, #0xc] - str r0, [sp, #8] - ldr r0, [r4, #0x10] - ldr r3, [sp, #8] - str r0, [sp] - str r0, [sp, #0xc] - str r6, [sp, #4] - add r0, r5, #0 - bl ov6_02245328 - mov r0, #1 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0x14 - add r0, r1, r0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0xc] - ldr r3, [sp, #8] - str r0, [sp] - add r0, r5, #0 - add r1, sp, #0x1c - add r2, sp, #0x10 - str r6, [sp, #4] - bl ov6_02245328 - add r7, r7, #1 - add r4, #0x14 - cmp r7, #0xd - blt _022452CC - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245324: .word 0x0224936C - thumb_func_end ov6_022452BC - - thumb_func_start ov6_02245328 -ov6_02245328: ; 0x02245328 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [sp, #0x34] - str r3, [sp, #8] - str r5, [sp, #0x10] - add r4, r1, #0 - str r0, [sp, #0xc] - ldmia r2!, {r0, r1} - add r3, sp, #0x14 - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - ldr r1, _02245360 ; =0x02249220 - str r0, [r3, #0] - add r0, sp, #8 - str r0, [sp] - mov r0, #0x84 - str r0, [sp, #4] - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r3, [sp, #0x30] - add r2, r4, #0 - bl sub_02071330 - add sp, #0x20 - pop {r3, r4, r5, pc} - nop -_02245360: .word 0x02249220 - thumb_func_end ov6_02245328 - - thumb_func_start ov6_02245364 -ov6_02245364: ; 0x02245364 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - bl sub_020715BC - add r2, r4, #0 - add r3, r0, #0 - add r2, #0xc - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - bl sub_020715B4 - str r0, [r4, #4] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715E4 - ldr r0, [r4, #0x14] - ldr r2, [r4, #0xc] - ldr r3, [r4, #4] - add r1, sp, #0 - bl ov6_02244CD4 - mov r1, #0 - str r0, [r4, #8] - bl sub_02021CAC - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_02245364 - - thumb_func_start ov6_022453AC -ov6_022453AC: ; 0x022453AC - ldr r3, _022453B4 ; =sub_02021BD4 - ldr r0, [r1, #8] - bx r3 - nop -_022453B4: .word sub_02021BD4 - thumb_func_end ov6_022453AC - - thumb_func_start ov6_022453B8 -ov6_022453B8: ; 0x022453B8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - add r5, r0, #0 - bl sub_020715E4 - ldr r1, [sp] - ldr r0, [r4, #0x18] - add r0, r1, r0 - lsr r2, r0, #0x1f - lsl r1, r0, #0xb - str r0, [sp] - sub r1, r1, r2 - mov r0, #0xb - ror r1, r0 - add r0, r2, r1 - str r0, [sp] - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #8] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0x10] - cmp r0, #1 - bne _02245432 - ldr r3, [r4, #0x14] - ldr r0, [r3, #0x14] - cmp r0, #2 - bne _02245426 - ldr r2, [r3, #0x4c] - ldr r0, [r3, #0x50] - mov r3, #2 - ldr r6, [sp, #4] - lsl r3, r3, #0xc - sub r5, r6, r3 - mov r1, #0 - cmp r5, r2 - blt _0224541C - cmp r5, r0 - bgt _0224541C - add r3, r6, r3 - cmp r3, r2 - blt _0224541C - cmp r3, r0 - bgt _0224541C - mov r1, #1 -_0224541C: - ldr r0, [r4, #8] - bl sub_02021CAC - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_02245426: - cmp r0, #1 - bne _02245432 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02021CAC -_02245432: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_022453B8 - - thumb_func_start ov6_02245438 -ov6_02245438: ; 0x02245438 - bx lr - ; .align 2, 0 - thumb_func_end ov6_02245438 - - thumb_func_start ov6_0224543C -ov6_0224543C: ; 0x0224543C - push {r4, lr} - sub sp, #0x18 - add r2, sp, #0xc - mov r3, #0 - add r4, r0, #0 - str r3, [r2, #0] - str r3, [r2, #4] - str r3, [r2, #8] - str r4, [sp, #8] - add r0, sp, #8 - str r0, [sp] - mov r0, #0x82 - str r0, [sp, #4] - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, _0224546C ; =0x02249248 - bl sub_02071330 - mov r1, #0x7b - lsl r1, r1, #2 - str r0, [r4, r1] - add sp, #0x18 - pop {r4, pc} - ; .align 2, 0 -_0224546C: .word 0x02249248 - thumb_func_end ov6_0224543C - - thumb_func_start ov6_02245470 -ov6_02245470: ; 0x02245470 - push {r3, lr} - mov r1, #0x7b - lsl r1, r1, #2 - ldr r0, [r0, r1] - bl sub_02071598 - ldrb r0, [r0, #2] - pop {r3, pc} - thumb_func_end ov6_02245470 - - thumb_func_start ov6_02245480 -ov6_02245480: ; 0x02245480 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02071598 - add r5, r0, #0 - ldr r0, [r5, #0x60] - cmp r0, #0 - beq _0224549A - bl sub_0207136C -_0224549A: - ldr r0, [r5, #0x64] - cmp r0, #0 - beq _022454A4 - bl ov5_021F0EFC -_022454A4: - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207136C - pop {r3, r4, r5, pc} - thumb_func_end ov6_02245480 - - thumb_func_start ov6_022454B0 -ov6_022454B0: ; 0x022454B0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020715BC - ldr r0, [r0, #0] - add r1, sp, #0 - str r0, [r4, #0x5c] - add r0, r5, #0 - bl sub_020715E4 - mov r2, #0 - ldr r0, [r4, #0x5c] - add r1, sp, #0 - add r3, r2, #0 - bl ov6_02244D4C - str r0, [r4, #0x58] - mov r0, #1 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_022454B0 - - thumb_func_start ov6_022454DC -ov6_022454DC: ; 0x022454DC - ldr r3, _022454E4 ; =sub_02021BD4 - ldr r0, [r1, #0x58] - bx r3 - nop -_022454E4: .word sub_02021BD4 - thumb_func_end ov6_022454DC - - thumb_func_start ov6_022454E8 -ov6_022454E8: ; 0x022454E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldrb r0, [r5] - lsl r1, r0, #2 - ldr r0, _02245504 ; =0x02249198 - ldr r4, [r0, r1] -_022454F4: - ldrb r1, [r5, #1] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - blx r1 - cmp r0, #1 - beq _022454F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245504: .word 0x02249198 - thumb_func_end ov6_022454E8 - - thumb_func_start ov6_02245508 -ov6_02245508: ; 0x02245508 - bx lr - ; .align 2, 0 - thumb_func_end ov6_02245508 - - thumb_func_start ov6_0224550C -ov6_0224550C: ; 0x0224550C - push {r3, lr} - mov r1, #0 - strb r1, [r0, #2] - ldr r0, [r0, #0x58] - bl sub_02021CAC - mov r0, #0 - pop {r3, pc} - thumb_func_end ov6_0224550C - - thumb_func_start ov6_0224551C -ov6_0224551C: ; 0x0224551C - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r4, _022455BC ; =0x022491B0 - add r2, r0, #0 - ldmia r4!, {r0, r1} - add r3, sp, #0xc - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r4, _022455C0 ; =0x0224915C - str r0, [r3, #0] - ldmia r4!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r2, r0] - bl sub_02071598 - add r4, r0, #0 - mov r3, #1 - add r5, r4, #0 - strb r3, [r4] - mov r2, #0 - strb r2, [r4, #1] - strb r2, [r4, #2] - add r6, sp, #0xc - ldmia r6!, {r0, r1} - add r5, #8 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r6, sp, #0 - str r0, [r5, #0] - str r2, [r4, #0x14] - str r2, [r4, #0x18] - mov r0, #0xf - add r5, r4, #0 - str r2, [r4, #0x1c] - lsl r0, r0, #0xe - str r0, [r4, #0x38] - ldmia r6!, {r0, r1} - add r5, #0x2c - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r1, sp, #0xc - str r0, [r5, #0] - lsl r0, r3, #9 - str r0, [r4, #0x50] - mov r0, #0x2d - lsl r0, r0, #0xe - str r0, [r4, #0x40] - str r2, [r4, #0x48] - lsl r0, r3, #0xd - str r0, [r4, #0x4c] - ldr r0, [r4, #0x58] - bl sub_02021C50 - ldr r0, [r4, #0x58] - add r1, sp, #0 - bl sub_02021C70 - ldr r1, [r4, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - ldr r0, [r4, #0x58] - bl sub_02021C94 - ldr r0, [r4, #0x58] - mov r1, #1 - bl sub_02021CAC - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022455BC: .word 0x022491B0 -_022455C0: .word 0x0224915C - thumb_func_end ov6_0224551C - - thumb_func_start ov6_022455C4 -ov6_022455C4: ; 0x022455C4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x4c] - ldr r4, [r5, #0x58] - add r0, r1, r0 - str r0, [r5, #0x48] - mov r0, #1 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0x10 - cmp r1, r0 - bge _022455E4 - lsr r0, r0, #2 - add r0, r1, r0 - str r0, [r5, #0x4c] -_022455E4: - ldr r0, _022456C4 ; =0x0000013B - bl sub_0201D264 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x14] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x18] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r2, r0, #0xc - ldr r0, _022456C8 ; =0x0000010E - cmp r2, r0 - bge _0224562E - mov r0, #1 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [r5, #0x40] -_0224562E: - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [r5, #0x2c] - cmp r1, r0 - ble _02245640 - str r0, [r5, #0x2c] -_02245640: - ldr r1, [r5, #0x30] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [r5, #0x30] - cmp r1, r0 - ble _02245652 - str r0, [r5, #0x30] -_02245652: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x2c - bl sub_02021C70 - mov r0, #6 - ldr r1, [r5, #0x38] - lsl r0, r0, #0xc - sub r1, r1, r0 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - str r1, [r5, #0x38] - asr r0, r0, #0xc - bpl _02245674 - mov r0, #0 - str r0, [r5, #0x38] -_02245674: - ldr r1, [r5, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - ldr r1, [r5, #8] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp] - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C50 - ldr r1, [sp, #4] - ldr r0, _022456CC ; =0xFFFC0000 - cmp r1, r0 - bge _022456BE - add r0, r4, #0 - mov r1, #0 - bl sub_02021CAC - mov r0, #2 - strb r0, [r5, #2] - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] -_022456BE: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_022456C4: .word 0x0000013B -_022456C8: .word 0x0000010E -_022456CC: .word 0xFFFC0000 - thumb_func_end ov6_022455C4 - - thumb_func_start ov6_022456D0 -ov6_022456D0: ; 0x022456D0 - mov r0, #0 - bx lr - thumb_func_end ov6_022456D0 - - thumb_func_start ov6_022456D4 -ov6_022456D4: ; 0x022456D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r3, _0224582C ; =0x02249144 - add r5, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x24 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r3, _02245830 ; =0x02249138 - str r0, [r2, #0] - ldmia r3!, {r0, r1} - add r2, sp, #0x18 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02071598 - add r4, r0, #0 - mov r0, #2 - add r2, r4, #0 - strb r0, [r4] - mov r6, #0 - strb r6, [r4, #1] - mov r7, #1 - strb r7, [r4, #2] - str r6, [r4, #4] - add r3, sp, #0x24 - ldmia r3!, {r0, r1} - add r2, #8 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r3, sp, #0x18 - str r0, [r2, #0] - str r6, [r4, #0x14] - str r6, [r4, #0x18] - str r6, [r4, #0x1c] - ldr r6, _02245834 ; =0x0013B000 - add r2, r4, #0 - str r6, [r4, #0x38] - ldmia r3!, {r0, r1} - add r2, #0x2c - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r7, #0 - add r0, #0xff - str r0, [r4, #0x50] - mov r0, #0xe1 - lsl r0, r0, #0xc - str r0, [r4, #0x40] - mov r0, #3 - lsl r0, r0, #0x12 - str r0, [r4, #0x48] - lsl r0, r7, #0x11 - str r0, [r4, #0x4c] - lsr r0, r6, #0xc - bl sub_0201D264 - ldr r2, [r4, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r4, #0x14] - ldr r1, [r4, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, [r4, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r4, #0x18] - ldr r1, [r4, #8] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [sp, #0x24] - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [sp, #0x28] - ldr r0, [r4, #0x58] - add r1, sp, #0x24 - bl sub_02021C50 - ldr r0, [r4, #0x58] - add r1, sp, #0x18 - bl sub_02021C70 - ldr r1, [r4, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - ldr r0, [r4, #0x58] - bl sub_02021C94 - ldr r0, [r4, #0x58] - add r1, r7, #0 - bl sub_02021CAC - mov r1, #0x1e - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl ov6_02245B4C - str r0, [r4, #0x60] - add r0, r7, #0 - str r0, [r5, #0x1c] - ldr r0, [r5, #0x60] - mov r1, #4 - bl ov5_021F0EB0 - ldr r2, _02245838 ; =0xFFF88000 - add r1, r7, #0 - mov r3, #0xc - str r0, [r4, #0x64] - bl ov5_021F0F10 - add r1, sp, #0xc - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - ldr r3, _0224583C ; =0x022491BC - str r0, [r1, #8] - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - mov r0, #0x79 - ldr r1, [r4, #0x5c] - lsl r0, r0, #2 - ldr r4, [r1, r0] - mov r1, #2 - add r0, r4, #0 - bl sub_02021CF8 - add r0, r4, #0 - add r1, sp, #0xc - bl sub_02021C60 - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C70 - mov r0, #0 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224582C: .word 0x02249144 -_02245830: .word 0x02249138 -_02245834: .word 0x0013B000 -_02245838: .word 0xFFF88000 -_0224583C: .word 0x022491BC - thumb_func_end ov6_022456D4 - - thumb_func_start ov6_02245840 -ov6_02245840: ; 0x02245840 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x4c] - ldr r4, [r5, #0x58] - sub r0, r1, r0 - str r0, [r5, #0x48] - bpl _02245856 - mov r0, #0 - str r0, [r5, #0x48] -_02245856: - mov r0, #2 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0xa - cmp r1, r0 - ble _02245868 - mov r0, #6 - lsl r0, r0, #0xa - sub r0, r1, r0 - str r0, [r5, #0x4c] -_02245868: - mov r0, #1 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0xc - cmp r1, r0 - bge _02245874 - str r0, [r5, #0x4c] -_02245874: - ldr r0, _022459A8 ; =0x0000013B - bl sub_0201D264 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x14] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x18] - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r2, r0, #0xc - ldr r0, _022459AC ; =0x0000010E - cmp r2, r0 - bge _022458BE - mov r0, #1 - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [r5, #0x40] -_022458BE: - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #6 - lsl r0, r0, #0xa - str r1, [r5, #0x2c] - cmp r1, r0 - ble _022458D0 - str r0, [r5, #0x2c] -_022458D0: - ldr r1, [r5, #0x30] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #6 - lsl r0, r0, #0xa - str r1, [r5, #0x30] - cmp r1, r0 - ble _022458E2 - str r0, [r5, #0x30] -_022458E2: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x2c - bl sub_02021C70 - mov r0, #2 - ldr r1, [r5, #0x38] - lsl r0, r0, #0xe - add r1, r1, r0 - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - str r1, [r5, #0x38] - asr r1, r0, #0xc - mov r0, #0x5a - lsl r0, r0, #2 - cmp r1, r0 - ble _0224590A - lsl r0, r0, #0xc - str r0, [r5, #0x38] -_0224590A: - ldr r1, [r5, #0x38] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D2A4 - add r1, r0, #0 - add r0, r4, #0 - bl sub_02021C94 - ldr r1, [r5, #8] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [sp, #0x10] - add r0, r4, #0 - add r1, sp, #0xc - bl sub_02021C50 - ldr r0, [r5, #0x48] - cmp r0, #0 - bne _0224594C - mov r0, #0 - str r0, [r5, #4] - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] - b _02245952 -_0224594C: - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] -_02245952: - ldr r0, [r5, #4] - cmp r0, #0xc - bne _0224595E - ldr r0, [r5, #0x60] - bl ov6_02245B80 -_0224595E: - mov r0, #0x79 - ldr r1, [r5, #0x5c] - lsl r0, r0, #2 - ldr r4, [r1, r0] - add r0, r4, #0 - bl sub_02021D2C - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [sp] - mov r0, #5 - add r1, #0x80 - lsl r0, r0, #0xa - str r1, [sp] - cmp r1, r0 - ble _02245988 - str r0, [sp] -_02245988: - ldr r1, [sp, #4] - mov r0, #5 - add r1, #0x80 - lsl r0, r0, #0xa - str r1, [sp, #4] - cmp r1, r0 - ble _02245998 - str r0, [sp, #4] -_02245998: - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C70 - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_022459A8: .word 0x0000013B -_022459AC: .word 0x0000010E - thumb_func_end ov6_02245840 - - thumb_func_start ov6_022459B0 -ov6_022459B0: ; 0x022459B0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x79 - ldr r1, [r5, #0x5c] - lsl r0, r0, #2 - ldr r4, [r1, r0] - mov r1, #3 - add r0, r4, #0 - bl sub_02021D6C - add r0, r4, #0 - bl sub_02021D28 - ldr r4, [r0, #4] - ldr r0, [r5, #0x58] - bl sub_02021D28 - ldr r0, [r0, #4] - sub r0, r4, r0 - str r0, [r5, #0x54] - ldr r0, [r5, #0x60] - bl ov6_02245B74 - ldr r0, [r5, #0x64] - mov r1, #2 - mov r2, #0 - mov r3, #0xc - bl ov5_021F0F10 - mov r1, #1 - lsl r1, r1, #8 - str r1, [r5, #0x50] - lsl r0, r1, #0xb - str r0, [r5, #0x40] - mov r0, #0 - str r0, [r5, #0x48] - lsl r0, r1, #3 - str r0, [r5, #0x4c] - mov r0, #3 - strb r0, [r5, #2] - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_022459B0 - - thumb_func_start ov6_02245A0C -ov6_02245A0C: ; 0x02245A0C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x4c] - ldr r4, [r5, #0x58] - add r0, r1, r0 - str r0, [r5, #0x48] - mov r0, #1 - ldr r1, [r5, #0x4c] - lsl r0, r0, #0xc - add r2, r1, r0 - lsl r1, r0, #4 - str r2, [r5, #0x4c] - cmp r2, r1 - ble _02245A30 - lsl r0, r0, #4 - str r0, [r5, #0x4c] -_02245A30: - ldr r1, [r5, #0x40] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - lsl r0, r0, #4 - lsr r0, r0, #0x10 - bl sub_0201D264 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x14] - mov r0, #0x80 - bl sub_0201D250 - ldr r2, [r5, #0x48] - asr r1, r2, #0xb - lsr r1, r1, #0x14 - add r1, r2, r1 - asr r1, r1, #0xc - mul r0, r1 - str r0, [r5, #0x18] - mov r0, #0x87 - ldr r1, [r5, #0x40] - lsl r0, r0, #0xc - cmp r1, r0 - bge _02245A74 - mov r0, #1 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r5, #0x40] -_02245A74: - ldr r1, [r5, #0x2c] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #2 - lsl r0, r0, #0xc - str r1, [r5, #0x2c] - cmp r1, r0 - ble _02245A86 - str r0, [r5, #0x2c] -_02245A86: - ldr r1, [r5, #0x30] - ldr r0, [r5, #0x50] - add r1, r1, r0 - mov r0, #2 - lsl r0, r0, #0xc - str r1, [r5, #0x30] - cmp r1, r0 - ble _02245A98 - str r0, [r5, #0x30] -_02245A98: - add r1, r5, #0 - add r0, r4, #0 - add r1, #0x2c - bl sub_02021C70 - ldr r1, [r5, #8] - ldr r0, [r5, #0x14] - add r0, r1, r0 - str r0, [sp, #0x18] - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x18] - add r0, r1, r0 - str r0, [sp, #0x1c] - add r0, r4, #0 - add r1, sp, #0x18 - bl sub_02021C50 - mov r0, #0x79 - ldr r1, [r5, #0x5c] - lsl r0, r0, #2 - ldr r4, [r1, r0] - add r0, r4, #0 - bl sub_02021D2C - add r2, sp, #0xc - add r3, sp, #0x18 - add r6, r0, #0 - ldmia r3!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldmia r6!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r2, #0] - mov r0, #1 - ldr r1, [r5, #0x54] - lsl r0, r0, #0xc - sub r1, r1, r0 - str r1, [r5, #0x54] - ldr r0, [sp, #0x10] - add r0, r0, r1 - str r0, [sp, #0x10] - add r0, r4, #0 - add r1, r7, #0 - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp] - lsl r0, r0, #8 - add r2, r1, r0 - lsl r1, r0, #5 - str r2, [sp] - cmp r2, r1 - ble _02245B0E - lsl r0, r0, #5 - str r0, [sp] -_02245B0E: - mov r0, #1 - ldr r1, [sp, #4] - lsl r0, r0, #8 - add r2, r1, r0 - lsl r1, r0, #5 - str r2, [sp, #4] - cmp r2, r1 - ble _02245B22 - lsl r0, r0, #5 - str r0, [sp, #4] -_02245B22: - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C70 - ldr r1, [sp, #0x1c] - asr r0, r1, #0xb - lsr r0, r0, #0x14 - add r0, r1, r0 - asr r0, r0, #0xc - cmp r0, #0xf0 - blt _02245B42 - mov r0, #2 - strb r0, [r5, #2] - ldrb r0, [r5, #1] - add r0, r0, #1 - strb r0, [r5, #1] -_02245B42: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02245A0C - - thumb_func_start ov6_02245B48 -ov6_02245B48: ; 0x02245B48 - mov r0, #0 - bx lr - thumb_func_end ov6_02245B48 - - thumb_func_start ov6_02245B4C -ov6_02245B4C: ; 0x02245B4C - push {lr} - sub sp, #0x1c - add r2, sp, #0x10 - mov r3, #0 - str r3, [r2, #0] - str r3, [r2, #4] - str r1, [sp, #0xc] - str r3, [r2, #8] - add r1, sp, #8 - str r1, [sp] - mov r1, #0x81 - str r1, [sp, #4] - ldr r1, _02245B70 ; =0x0224920C - bl sub_02071330 - add sp, #0x1c - pop {pc} - nop -_02245B70: .word 0x0224920C - thumb_func_end ov6_02245B4C - - thumb_func_start ov6_02245B74 -ov6_02245B74: ; 0x02245B74 - push {r3, lr} - bl sub_02071598 - mov r1, #0 - str r1, [r0, #0] - pop {r3, pc} - thumb_func_end ov6_02245B74 - - thumb_func_start ov6_02245B80 -ov6_02245B80: ; 0x02245B80 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02071598 - add r4, r0, #0 - mov r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - str r0, [r4, #0xc] - str r0, [r4, #8] - str r0, [r4, #0x10] - str r0, [r4, #0x14] - str r0, [r4, #0x18] - ldr r0, [r4, #0x20] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - add r1, r2, #0 - str r0, [r3, #0] - add r0, r5, #0 - bl sub_020715D4 - ldr r0, [r4, #0x20] - mov r1, #5 - bl sub_02021D6C - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02245B80 - - thumb_func_start ov6_02245BC8 -ov6_02245BC8: ; 0x02245BC8 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02071598 - add r4, r0, #0 - mov r0, #2 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - str r0, [r4, #0xc] - str r0, [r4, #8] - str r0, [r4, #0x10] - str r0, [r4, #0x14] - str r0, [r4, #0x18] - ldr r0, [r4, #0x20] - add r1, sp, #0 - bl ov6_022437C8 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020715D4 - ldr r0, [r4, #0x20] - mov r1, #4 - bl sub_02021D6C - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02245BC8 - - thumb_func_start ov6_02245C04 -ov6_02245C04: ; 0x02245C04 - push {r4, lr} - add r4, r1, #0 - bl sub_020715BC - ldr r1, [r0, #0] - str r1, [r4, #0x1c] - ldr r0, [r0, #4] - str r0, [r4, #0x20] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov6_02245C04 - - thumb_func_start ov6_02245C18 -ov6_02245C18: ; 0x02245C18 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _02245C5C - ldr r1, [r4, #0xc] - lsl r2, r1, #2 - ldr r1, _02245C60 ; =0x022492A8 - ldr r1, [r1, r2] - str r1, [r4, #0x14] - add r1, sp, #0 - bl sub_020715E4 - ldr r1, [sp, #4] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #0x20] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0xc - blt _02245C5C - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #1 - str r0, [r4, #8] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] -_02245C5C: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02245C60: .word 0x022492A8 - thumb_func_end ov6_02245C18 - - thumb_func_start ov6_02245C64 -ov6_02245C64: ; 0x02245C64 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #4] - cmp r1, #0 - bne _02245CA8 - ldr r1, [r4, #0xc] - lsl r2, r1, #2 - ldr r1, _02245CAC ; =0x022491FC - ldr r1, [r1, r2] - str r1, [r4, #0x14] - add r1, sp, #0 - bl sub_020715E4 - ldr r1, [sp, #4] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #0x20] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #4 - blt _02245CA8 - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #1 - str r0, [r4, #8] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] -_02245CA8: - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02245CAC: .word 0x022491FC - thumb_func_end ov6_02245C64 - - thumb_func_start ov6_02245CB0 -ov6_02245CB0: ; 0x02245CB0 - push {r3, lr} - ldr r2, [r1, #0] - cmp r2, #1 - beq _02245CBE - cmp r2, #2 - beq _02245CC4 - pop {r3, pc} -_02245CBE: - bl ov6_02245C18 - pop {r3, pc} -_02245CC4: - bl ov6_02245C64 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02245CB0 - - thumb_func_start ov6_02245CCC -ov6_02245CCC: ; 0x02245CCC - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #0x5f - add r5, r0, #0 - mov r0, #4 - lsl r1, r1, #2 - bl ov6_02245F44 - add r1, r0, #0 - str r4, [r1, #0xc] - ldr r0, _02245CEC ; =ov6_02245D10 - mov r2, #0x85 - str r5, [r1, #0x14] - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245CEC: .word ov6_02245D10 - thumb_func_end ov6_02245CCC - - thumb_func_start ov6_02245CF0 -ov6_02245CF0: ; 0x02245CF0 - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #4] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02245CF0 - - thumb_func_start ov6_02245CFC -ov6_02245CFC: ; 0x02245CFC - push {r4, lr} - add r4, r0, #0 - bl sub_0201CED0 - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 - pop {r4, pc} - thumb_func_end ov6_02245CFC - - thumb_func_start ov6_02245D10 -ov6_02245D10: ; 0x02245D10 - push {r3, r4, r5, lr} - ldr r4, _02245D44 ; =0x02249270 - add r5, r1, #0 -_02245D16: - ldr r1, [r5, #0] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - blx r1 - cmp r0, #1 - beq _02245D16 - ldr r0, [r5, #0x10] - cmp r0, #0 - beq _02245D42 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02245D38 - bl sub_020713D0 -_02245D38: - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _02245D42 - bl sub_020219F8 -_02245D42: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245D44: .word 0x02249270 - thumb_func_end ov6_02245D10 - - thumb_func_start ov6_02245D48 -ov6_02245D48: ; 0x02245D48 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - mov r1, #1 - bl ov6_02243F74 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02245D48 - - thumb_func_start ov6_02245D60 -ov6_02245D60: ; 0x02245D60 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #4 - mov r1, #0x20 - bl sub_020711EC - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r2, #2 - str r2, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #4 - str r1, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - add r0, r5, #0 - add r0, #0x18 - mov r1, #0x20 - add r3, r2, #0 - str r2, [sp, #0x14] - bl ov6_02243258 - bl ov6_02243F20 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #7 - mov r3, #0 - bl ov6_022434B0 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #3 - mov r3, #0 - bl ov6_02243588 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #8 - mov r3, #0 - bl ov6_02243660 - add r0, r5, #0 - add r0, #0x18 - mov r1, #0 - bl ov6_02243520 - add r0, r5, #0 - add r0, #0x18 - mov r1, #0 - bl ov6_022435F8 - add r0, r5, #0 - add r0, #0x18 - mov r1, #0 - bl ov6_02243554 - add r0, r5, #0 - add r0, #0x18 - mov r1, #0 - bl ov6_0224362C - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _02245E32 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #0xd - mov r3, #2 - bl ov6_022434B0 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #0xe - mov r3, #2 - bl ov6_02243660 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #0xf - mov r3, #1 - bl ov6_022436D0 - add r0, r5, #0 - add r0, #0x18 - mov r1, #2 - bl ov6_02243520 - add r0, r5, #0 - add r0, #0x18 - mov r1, #2 - bl ov6_02243554 - b _02245E92 -_02245E32: - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #0x10 - mov r3, #2 - bl ov6_022434B0 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #4 - mov r3, #1 - bl ov6_02243588 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #0x11 - mov r3, #2 - bl ov6_02243660 - add r0, r5, #0 - add r0, #0x18 - add r1, r4, #0 - mov r2, #0x12 - mov r3, #1 - bl ov6_022436D0 - add r0, r5, #0 - add r0, #0x18 - mov r1, #2 - bl ov6_02243520 - add r0, r5, #0 - add r0, #0x18 - mov r1, #1 - bl ov6_022435F8 - add r0, r5, #0 - add r0, #0x18 - mov r1, #2 - bl ov6_02243554 - add r0, r5, #0 - add r0, #0x18 - mov r1, #1 - bl ov6_0224362C -_02245E92: - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02245D60 - - thumb_func_start ov6_02245EA4 -ov6_02245EA4: ; 0x02245EA4 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0xc] - add r0, #0x18 - bl ov6_02243848 - mov r1, #0x5b - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02021CAC - mov r3, #0x17 - lsl r3, r3, #4 - ldr r1, [r4, r3] - sub r3, r3, #4 - add r2, r4, #0 - ldr r0, [r4, #0x14] - ldr r3, [r4, r3] - add r2, #0x18 - bl ov6_02243888 - mov r1, #0x5d - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - bl ov6_02243950 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #1 - str r0, [r4, #0x10] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_02245EA4 - - thumb_func_start ov6_02245EEC -ov6_02245EEC: ; 0x02245EEC - push {r4, lr} - add r4, r0, #0 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov6_022438BC - cmp r0, #2 - beq _02245F02 - mov r0, #0 - pop {r4, pc} -_02245F02: - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov6_022438EC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02245EEC - - thumb_func_start ov6_02245F18 -ov6_02245F18: ; 0x02245F18 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x17 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0207121C - add r0, r4, #0 - add r0, #0x18 - bl ov6_0224339C - mov r0, #0 - str r0, [r4, #0x10] - mov r1, #1 - str r1, [r4, #4] - ldr r1, [r4, #0] - add r1, r1, #1 - str r1, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02245F18 - - thumb_func_start ov6_02245F40 -ov6_02245F40: ; 0x02245F40 - mov r0, #0 - bx lr - thumb_func_end ov6_02245F40 - - thumb_func_start ov6_02245F44 -ov6_02245F44: ; 0x02245F44 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_02018184 - add r4, r0, #0 - bne _02245F54 - bl sub_02022974 -_02245F54: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02245F44 - - thumb_func_start ov6_02245F64 -ov6_02245F64: ; 0x02245F64 - push {r3, r4, r5, lr} - ldr r0, [r0, #0x60] - add r4, r1, #0 - ldr r0, [r0, #0x3c] - bl sub_0205EB3C - add r5, r0, #0 - bl sub_02062DDC - add r0, r5, #0 - add r1, r4, #0 - bl sub_02062D64 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02245F64 - - thumb_func_start ov6_02245F80 -ov6_02245F80: ; 0x02245F80 - push {r4, lr} - add r4, r1, #0 - bl sub_020715BC - ldr r1, [r0, #0] - ldr r0, [r0, #4] - str r1, [r4, #0] - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} - thumb_func_end ov6_02245F80 - - thumb_func_start ov6_02245F94 -ov6_02245F94: ; 0x02245F94 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - bl sub_02021D28 - ldr r1, [r4, #4] - ldr r0, [r0, #4] - ldr r5, [r1, #0x4c] - ldr r3, [r1, #0x50] - ldr r1, [r1, #0x1c] - cmp r1, #0 - bne _02245FD0 - mov r1, #2 - lsl r1, r1, #0xe - sub r2, r0, r1 - cmp r2, r5 - blt _02245FC6 - add r0, r0, r1 - cmp r0, r3 - bgt _02245FC6 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021CAC - pop {r3, r4, r5, pc} -_02245FC6: - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021CAC - pop {r3, r4, r5, pc} -_02245FD0: - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021CAC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02245F94 - - thumb_func_start ov6_02245FDC -ov6_02245FDC: ; 0x02245FDC - push {r3, r4, lr} - sub sp, #0x1c - add r2, sp, #0x10 - mov r3, #0 - str r3, [r2, #0] - add r4, r0, #0 - str r3, [r2, #4] - mov r0, #0x79 - str r3, [r2, #8] - lsl r0, r0, #2 - ldr r1, [r4, r0] - sub r0, r0, #4 - str r1, [sp, #8] - str r4, [sp, #0xc] - add r1, sp, #8 - str r1, [sp] - mov r1, #0x86 - str r1, [sp, #4] - ldr r0, [r4, r0] - ldr r1, _02246014 ; =0x02249234 - bl sub_02071330 - mov r1, #0x1f - lsl r1, r1, #4 - str r0, [r4, r1] - add sp, #0x1c - pop {r3, r4, pc} - nop -_02246014: .word 0x02249234 - thumb_func_end ov6_02245FDC - - thumb_func_start ov6_02246018 -ov6_02246018: ; 0x02246018 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02246032 - bl sub_0207136C - mov r0, #0x1f - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] -_02246032: - pop {r4, pc} - thumb_func_end ov6_02246018 - - thumb_func_start ov6_02246034 -ov6_02246034: ; 0x02246034 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r1, #8] - str r1, [sp] - mov r1, #0 - bl sub_0207A0FC - add r7, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0202D834 - str r0, [sp, #4] - add r0, r7, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r6, r0, #0 - ldr r0, [sp, #4] - add r1, r6, #0 - bl ov6_02246148 - str r0, [sp, #8] - cmp r0, #0 - beq _022460E6 - add r0, r7, #0 - mov r1, #0xa3 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - add r0, r7, #0 - mov r1, #0xa0 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, [sp] - ldr r0, [r0, #0x14] - cmp r0, #1 - bne _022460A8 - cmp r4, #0 - bne _022460A8 - add r0, sp, #8 - bl sub_0202D914 - ldr r0, [r5, #0xc] - bl sub_020507E4 - lsl r1, r6, #0x10 - lsr r1, r1, #0x10 - mov r2, #2 - bl sub_0206B688 - b _022460D8 -_022460A8: - cmp r0, #4 - bne _022460C4 - add r0, sp, #8 - bl sub_0202D914 - ldr r0, [r5, #0xc] - bl sub_020507E4 - lsl r1, r6, #0x10 - lsr r1, r1, #0x10 - mov r2, #1 - bl sub_0206B688 - b _022460D8 -_022460C4: - ldr r0, [sp, #8] - mov r1, #5 - add r2, r4, #0 - bl sub_0202D980 - ldr r0, [sp, #8] - mov r1, #7 - add r2, r7, #0 - bl sub_0202D980 -_022460D8: - ldr r1, [r5, #0x1c] - ldr r0, [sp, #4] - ldr r1, [r1, #0] - bl ov6_02246110 - add sp, #0xc - pop {r4, r5, r6, r7, pc} -_022460E6: - bl sub_0201D2E8 - mov r1, #0x29 - lsl r1, r1, #4 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x64 - blo _022460FE - bl sub_02022974 -_022460FE: - cmp r4, #0x1e - bhs _0224610C - ldr r1, [r5, #0x1c] - ldr r0, [sp, #4] - ldr r1, [r1, #0] - bl ov6_02246110 -_0224610C: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02246034 - - thumb_func_start ov6_02246110 -ov6_02246110: ; 0x02246110 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_02246118: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202D8F8 - cmp r0, #0 - beq _0224613C - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202D8C4 - bl sub_0206C3C8 - cmp r6, r0 - bne _0224613C - add r0, r5, #0 - add r1, r4, #0 - bl sub_0206C33C -_0224613C: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #6 - blo _02246118 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02246110 - - thumb_func_start ov6_02246148 -ov6_02246148: ; 0x02246148 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_02246150: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202D8F8 - cmp r0, #0 - beq _02246174 - add r0, r5, #0 - add r1, r4, #0 - bl sub_0202D924 - mov r1, #4 - add r7, r0, #0 - bl sub_0202D93C - cmp r6, r0 - bne _02246174 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} -_02246174: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #6 - blo _02246150 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02246148 - - thumb_func_start ov6_02246184 -ov6_02246184: ; 0x02246184 - push {r3, r4, r5, r6, lr} - sub sp, #0x104 - add r6, r1, #0 - add r5, r0, #0 - cmp r6, #4 - blo _02246194 - bl sub_02022974 -_02246194: - add r0, r5, #0 - mov r1, #0x14 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_022461A4: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _022461A4 - mov r2, #0 - str r2, [sp] - mov r0, #0x73 - add r1, r6, #0 - add r3, r5, #0 - bl sub_02006FE8 - str r0, [r4, #0] - str r5, [r4, #0x10] - str r6, [r4, #0xc] - add r0, r5, #0 - bl sub_02073C74 - str r0, [r4, #4] - add r0, r5, #0 - bl sub_02025E6C - str r0, [r4, #8] - bl sub_02025E8C - add r0, r5, #0 - add r1, r6, #4 - bl ov6_022462E4 - add r5, r0, #0 - add r1, sp, #4 - mov r2, #0x80 - bl sub_02023DF0 - add r0, r5, #0 - bl sub_020237BC - ldr r0, [r4, #8] - add r1, sp, #4 - bl sub_02025EC0 - ldr r1, [r4, #0] - ldr r0, [r4, #8] - ldr r1, [r1, #0x40] - bl sub_02025F2C - add r0, r4, #0 - add sp, #0x104 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov6_02246184 - - thumb_func_start ov6_02246204 -ov6_02246204: ; 0x02246204 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - ldr r0, [r4, #4] - bl sub_020181C4 - ldr r0, [r4, #8] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02246204 - - thumb_func_start ov6_02246224 -ov6_02246224: ; 0x02246224 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02246224 - - thumb_func_start ov6_0224622C -ov6_0224622C: ; 0x0224622C - ldr r0, [r0, #0] - ldr r0, [r0, #0x4c] - bx lr - ; .align 2, 0 - thumb_func_end ov6_0224622C - - thumb_func_start ov6_02246234 -ov6_02246234: ; 0x02246234 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r6, r1, #0 - add r4, r2, #0 - bl sub_0207A268 - ldr r2, [r6, #4] - add r1, r4, #0 - bl sub_0207A128 - ldr r0, [r5, #0xc] - ldr r1, [r6, #4] - bl sub_0202F180 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02246234 - - thumb_func_start ov6_02246254 -ov6_02246254: ; 0x02246254 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - ldr r0, [r6, #0xc] - add r7, r2, #0 - add r5, r1, #0 - add r4, r3, #0 - bl sub_0207A268 - add r1, r7, #0 - bl sub_0207A0FC - mov r1, #0xa1 - mov r2, #0 - add r7, r0, #0 - bl sub_02074470 - add r2, r0, #0 - ldr r0, [r5, #0x10] - str r0, [sp] - ldr r0, [r6, #0x1c] - ldr r0, [r0, #0] - str r0, [sp, #4] - ldr r0, [r5, #4] - ldr r1, [r5, #0] - ldr r3, [r5, #0xc] - bl ov6_0224630C - ldr r1, [sp, #0x20] - add r0, r7, #0 - bl sub_020775EC - ldr r0, [r5, #4] - ldr r1, [sp, #0x24] - bl sub_020775EC - ldr r0, [sp, #0x20] - bl sub_02076B10 - str r0, [r4, #0] - ldr r0, [sp, #0x24] - bl sub_02076B10 - str r0, [r4, #4] - ldr r0, [r5, #8] - str r0, [r4, #8] - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, [r6, #0xc] - bl sub_02025E44 - str r0, [r4, #0x14] - add r0, r6, #0 - bl sub_02055BA8 - cmp r0, #1 - bhi _022462CE - mov r0, #0 - add sp, #8 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022462CE: - cmp r0, #2 - bne _022462DA - mov r0, #1 - add sp, #8 - str r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_022462DA: - mov r0, #2 - str r0, [r4, #0xc] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02246254 - - thumb_func_start ov6_022462E4 -ov6_022462E4: ; 0x022462E4 - push {r3, r4, r5, lr} - ldr r2, _02246308 ; =0x00000172 - add r3, r0, #0 - add r4, r1, #0 - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - add r5, r0, #0 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - bl sub_0200B190 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02246308: .word 0x00000172 - thumb_func_end ov6_022462E4 - - thumb_func_start ov6_0224630C -ov6_0224630C: ; 0x0224630C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r3, #0 - mov r3, #1 - add r4, r1, #0 - str r3, [sp] - ldr r1, [r4, #0x38] - add r5, r0, #0 - str r1, [sp, #4] - str r3, [sp, #8] - ldr r1, [r4, #0x20] - mov r3, #0x20 - str r1, [sp, #0xc] - ldr r1, [r4, #0] - bl sub_02073D80 - ldr r0, [sp, #0x28] - add r1, r6, #0 - bl ov6_022462E4 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #0x77 - add r2, r7, #0 - bl sub_02074B30 - add r0, r7, #0 - bl sub_020237BC - mov r1, #1 - add r0, sp, #0x10 - strb r1, [r0] - add r0, r5, #0 - mov r1, #0x4d - add r2, sp, #0x10 - bl sub_02074B30 - add r0, r5, #0 - mov r1, #0x46 - add r2, r4, #4 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x47 - add r2, #8 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x48 - add r2, #0xc - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x49 - add r2, #0x10 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x4a - add r2, #0x14 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x4b - add r2, #0x18 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x13 - add r2, #0x24 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x14 - add r2, #0x28 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x15 - add r2, #0x2c - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x16 - add r2, #0x30 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x17 - add r2, #0x34 - bl sub_02074B30 - add r2, r4, #0 - add r0, r5, #0 - mov r1, #6 - add r2, #0x3c - bl sub_02074B30 - ldr r0, [sp, #0x28] - add r1, r6, #4 - bl ov6_022462E4 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0x91 - add r2, r6, #0 - bl sub_02074B30 - add r0, r6, #0 - bl sub_020237BC - add r2, r4, #0 - add r0, r5, #0 - mov r1, #0x9d - add r2, #0x40 - bl sub_02074B30 - add r4, #0x48 - add r0, r5, #0 - mov r1, #0xc - add r2, r4, #0 - bl sub_02074B30 - ldr r0, [sp, #0x2c] - bl sub_0203A138 - add r3, r0, #0 - ldr r0, [sp, #0x28] - mov r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r2, #1 - bl sub_0209304C - add r0, r5, #0 - bl sub_0207418C - add r0, r5, #0 - bl sub_02075E0C - cmp r0, #0 - beq _02246440 - bl sub_02022974 -_02246440: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_0224630C - - thumb_func_start ov6_02246444 -ov6_02246444: ; 0x02246444 - ldr r3, _0224644C ; =sub_020C4CF4 - mov r1, #0 - mov r2, #0x18 - bx r3 - ; .align 2, 0 -_0224644C: .word sub_020C4CF4 - thumb_func_end ov6_02246444 - - thumb_func_start ov6_02246450 -ov6_02246450: ; 0x02246450 - strb r1, [r0, #3] - bx lr - thumb_func_end ov6_02246450 - - thumb_func_start ov6_02246454 -ov6_02246454: ; 0x02246454 - strb r1, [r0, #2] - bx lr - thumb_func_end ov6_02246454 - - thumb_func_start ov6_02246458 -ov6_02246458: ; 0x02246458 - strb r1, [r0, #1] - bx lr - thumb_func_end ov6_02246458 - - thumb_func_start ov6_0224645C -ov6_0224645C: ; 0x0224645C - ldr r3, _02246464 ; =sub_020021D0 - add r0, r0, #4 - mov r2, #8 - bx r3 - ; .align 2, 0 -_02246464: .word sub_020021D0 - thumb_func_end ov6_0224645C - - thumb_func_start ov6_02246468 -ov6_02246468: ; 0x02246468 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl sub_0202E55C - strb r0, [r5] - str r4, [r5, #0x14] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02246468 - - thumb_func_start ov6_0224647C -ov6_0224647C: ; 0x0224647C - push {r3, lr} - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _02246488 - bl sub_0202E560 -_02246488: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_0224647C - - thumb_func_start ov6_0224648C -ov6_0224648C: ; 0x0224648C - ldrb r0, [r0, #3] - bx lr - thumb_func_end ov6_0224648C - - thumb_func_start ov6_02246490 -ov6_02246490: ; 0x02246490 - ldrb r0, [r0, #2] - bx lr - thumb_func_end ov6_02246490 - - thumb_func_start ov6_02246494 -ov6_02246494: ; 0x02246494 - add r0, r0, #4 - bx lr - thumb_func_end ov6_02246494 - - thumb_func_start ov6_02246498 -ov6_02246498: ; 0x02246498 - ldr r3, _022464A0 ; =sub_0202E574 - ldr r0, [r0, #0x14] - bx r3 - nop -_022464A0: .word sub_0202E574 - thumb_func_end ov6_02246498 - - thumb_func_start ov6_022464A4 -ov6_022464A4: ; 0x022464A4 - ldrb r0, [r0] - bx lr - thumb_func_end ov6_022464A4 - - thumb_func_start ov6_022464A8 -ov6_022464A8: ; 0x022464A8 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r0, #4 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bl ov6_02246444 - add r0, r5, #0 - bl sub_0202E4C8 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_0224645C - add r0, r5, #0 - bl sub_0202E4CC - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246454 - add r0, r5, #0 - bl sub_0202E4D0 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246458 - add r0, r5, #0 - bl sub_0202E4D4 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246468 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_022464A8 - - thumb_func_start ov6_022464F8 -ov6_022464F8: ; 0x022464F8 - push {r4, r5, r6, lr} - ldr r0, [r0, #0xc] - add r6, r1, #0 - bl sub_02025E38 - add r5, r0, #0 - mov r0, #4 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bl ov6_02246444 - add r0, r5, #0 - bl sub_02025EF0 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_0224645C - add r0, r5, #0 - bl sub_02025F30 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246450 - add r0, r4, #0 - mov r1, #2 - bl ov6_02246454 - add r0, r4, #0 - mov r1, #0xc - bl ov6_02246458 - add r0, r6, #0 - bl sub_0202E4D8 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246468 - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_022464F8 - - thumb_func_start ov6_02246550 -ov6_02246550: ; 0x02246550 - push {r4, r5, r6, lr} - ldr r0, [r0, #0xc] - add r5, r1, #0 - bl sub_02025E38 - add r6, r0, #0 - mov r0, #4 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - bl ov6_02246444 - add r0, r6, #0 - strb r5, [r4] - bl sub_02025EF0 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_0224645C - add r0, r6, #0 - bl sub_02025F30 - add r1, r0, #0 - add r0, r4, #0 - bl ov6_02246450 - add r0, r4, #0 - mov r1, #2 - bl ov6_02246454 - add r0, r4, #0 - mov r1, #0xc - bl ov6_02246458 - mov r0, #0 - str r0, [r4, #0x14] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02246550 - - thumb_func_start ov6_022465A0 -ov6_022465A0: ; 0x022465A0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - add r6, r2, #0 - bl sub_0202440C - add r7, r0, #0 - sub r0, r4, #4 - cmp r0, #1 - bhi _022465C0 - add r0, r5, #0 - add r1, r6, #0 - bl ov6_02246550 - pop {r3, r4, r5, r6, r7, pc} -_022465C0: - add r0, r6, #0 - bl sub_0202E7C0 - cmp r0, #0 - bne _022465DE - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0202E794 - add r1, r0, #0 - add r0, r5, #0 - bl ov6_022464A8 - pop {r3, r4, r5, r6, r7, pc} -_022465DE: - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0202E768 - add r1, r0, #0 - add r0, r5, #0 - bl ov6_022464F8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022465A0 - - thumb_func_start ov6_022465F4 -ov6_022465F4: ; 0x022465F4 - ldr r3, _022465F8 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_022465F8: .word sub_020181C4 - thumb_func_end ov6_022465F4 - - thumb_func_start ov6_022465FC -ov6_022465FC: ; 0x022465FC - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_0202440C - mov r1, #1 - bl sub_0202E374 - pop {r3, pc} - thumb_func_end ov6_022465FC - - thumb_func_start ov6_0224660C -ov6_0224660C: ; 0x0224660C - push {r4, lr} - ldr r0, [r0, #0xc] - bl sub_0202440C - add r4, r0, #0 - bl sub_0202E380 - cmp r0, #1 - bne _02246622 - mov r0, #0 - pop {r4, pc} -_02246622: - add r0, r4, #0 - bl sub_0202E3DC - cmp r0, #0 - bne _02246630 - mov r0, #2 - pop {r4, pc} -_02246630: - cmp r0, #4 - bne _02246638 - mov r0, #1 - pop {r4, pc} -_02246638: - mov r0, #3 - pop {r4, pc} - thumb_func_end ov6_0224660C - - thumb_func_start ov6_0224663C -ov6_0224663C: ; 0x0224663C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r0, #0 - bl sub_02055BD0 - add r0, r0, #6 - mov r1, #7 - bl sub_020E1F6C - add r0, r4, #0 - add r5, r1, #0 - bl sub_02055BDC - add r6, r0, #0 - add r0, r4, #0 - bl sub_02055BE8 - mov r1, #0xf - bl sub_020E1F6C - add r6, #0x13 - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0x18 - bl sub_020E1F6C - add r6, r1, #0 - lsl r6, r6, #2 - mov r3, #7 - add r4, r4, r6 - str r3, [sp] - add r0, sp, #4 - mov r1, #0x7e - mov r2, #0 - mul r3, r4 - bl sub_02006AFC - add r0, sp, #4 - ldrb r4, [r0, r5] - cmp r4, #0 - beq _02246692 - cmp r4, #0xa - blo _02246696 -_02246692: - bl sub_02022974 -_02246696: - add r0, r4, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov6_0224663C - - thumb_func_start ov6_0224669C -ov6_0224669C: ; 0x0224669C - push {r4, lr} - sub sp, #8 - add r3, r0, #0 - sub r4, r3, #1 - mov r3, #0xc - mov r2, #1 - add r0, sp, #4 - mov r1, #0x7e - mul r3, r4 - str r2, [sp] - bl sub_02006AFC - add r0, sp, #4 - ldrb r0, [r0] - cmp r0, #6 - blo _022466C0 - bl sub_02022974 -_022466C0: - add r0, sp, #4 - ldrb r0, [r0] - add sp, #8 - pop {r4, pc} - thumb_func_end ov6_0224669C - - thumb_func_start ov6_022466C8 -ov6_022466C8: ; 0x022466C8 - push {r3, r4, lr} - sub sp, #4 - add r3, r0, #0 - sub r4, r3, #1 - mov r3, #0xc - mov r0, #0xb - mul r3, r4 - str r0, [sp] - add r0, r1, #0 - mov r1, #0x7e - mov r2, #1 - add r3, r3, #1 - bl sub_02006AFC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov6_022466C8 - - thumb_func_start ov6_022466E8 -ov6_022466E8: ; 0x022466E8 - mov r0, #1 - bx lr - thumb_func_end ov6_022466E8 - - thumb_func_start ov6_022466EC -ov6_022466EC: ; 0x022466EC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r1, #0 - str r0, [sp] - ldr r0, [r7, #0xc] - str r2, [sp, #4] - bl sub_0202440C - ldr r0, [sp] - add r1, sp, #8 - bl ov6_022466C8 - ldr r0, [sp, #4] - mov r1, #0 - mov r2, #0xb - bl sub_020C4CF4 - mov r6, #0 - add r4, r6, #0 - add r5, sp, #8 -_02246714: - ldrb r2, [r5] - cmp r2, #0 - beq _02246736 - ldr r1, [sp] - add r0, r7, #0 - bl ov6_022466E8 - cmp r0, #1 - bne _0224672E - ldrb r1, [r5] - ldr r0, [sp, #4] - strb r1, [r0, r4] - add r4, r4, #1 -_0224672E: - add r6, r6, #1 - add r5, r5, #1 - cmp r6, #0xb - blt _02246714 -_02246736: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022466EC - - thumb_func_start ov6_0224673C -ov6_0224673C: ; 0x0224673C - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - add r0, sp, #0 - mov r1, #0 - mov r2, #0xb - bl sub_020C4CF4 - mov r1, #0 - add r4, r1, #0 - add r2, sp, #0 -_02246752: - ldrb r0, [r5, r1] - cmp r0, #0 - beq _0224675E - strb r0, [r2] - add r2, r2, #1 - add r4, r4, #1 -_0224675E: - add r1, r1, #1 - cmp r1, #0xb - blt _02246752 - cmp r4, #0 - bne _0224676E - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_0224676E: - cmp r4, #1 - bne _0224677A - add r0, sp, #0 - add sp, #0xc - ldrb r0, [r0] - pop {r4, r5, pc} -_0224677A: - bl sub_0201D35C - add r1, r4, #0 - bl sub_020E2178 - add r0, sp, #0 - ldrb r0, [r0, r1] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov6_0224673C - - thumb_func_start ov6_0224678C -ov6_0224678C: ; 0x0224678C - push {r4, lr} - sub sp, #8 - add r4, r2, #0 - cmp r1, #4 - beq _022467AA - cmp r1, #5 - beq _022467AA - ldr r4, [sp, #0x10] - str r4, [sp] - ldr r4, [sp, #0x14] - str r4, [sp, #4] - bl sub_0202E614 - add sp, #8 - pop {r4, pc} -_022467AA: - ldr r1, [sp, #0x10] - cmp r1, #0 - beq _022467B6 - add sp, #8 - mov r0, #0 - pop {r4, pc} -_022467B6: - cmp r3, #0 - bne _022467C0 - add sp, #8 - mov r0, #0 - pop {r4, pc} -_022467C0: - add r1, r4, #0 - bl sub_0202E3C4 - cmp r0, #0 - bne _022467D4 - ldr r0, [sp, #0x14] - add sp, #8 - strb r4, [r0] - mov r0, #1 - pop {r4, pc} -_022467D4: - mov r0, #0 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0224678C - - thumb_func_start ov6_022467DC -ov6_022467DC: ; 0x022467DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #8] - ldr r6, [sp, #0x40] - ldr r0, [r1, #0xc] - str r2, [sp, #0xc] - str r3, [sp, #0x10] - ldr r5, [sp, #0x44] - bl sub_0202440C - str r0, [sp, #0x14] - ldrb r0, [r6] - mov r4, #0 - cmp r0, #0 - beq _0224683C - add r7, sp, #0x18 -_022467FC: - add r0, r7, #0 - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - ldr r0, [sp, #0x10] - ldr r1, [sp, #8] - str r0, [sp] - str r7, [sp, #4] - ldrb r2, [r6] - ldr r0, [sp, #0x14] - ldr r3, [sp, #0xc] - bl ov6_0224678C - cmp r0, #0 - beq _02246834 - mov r0, #0 - add r1, r7, #0 - b _0224682A -_02246822: - strb r2, [r5, r4] - add r4, r4, #1 - add r1, r1, #1 - add r0, r0, #1 -_0224682A: - ldrb r2, [r1] - cmp r2, #0 - beq _02246834 - cmp r0, #0x10 - blt _02246822 -_02246834: - add r6, r6, #1 - ldrb r0, [r6] - cmp r0, #0 - bne _022467FC -_0224683C: - add r0, r4, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022467DC - - thumb_func_start ov6_02246844 -ov6_02246844: ; 0x02246844 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - mov r4, #0 - b _02246876 -_02246850: - add r0, r6, #0 - add r1, r7, #0 - bl ov6_022465A0 - str r0, [sp] - ldr r2, [sp] - add r0, r7, #0 - add r1, r6, #0 - bl sub_0206CD2C - cmp r0, #0 - bne _0224686C - mov r0, #0 - strb r0, [r5] -_0224686C: - ldr r0, [sp] - bl ov6_022465F4 - add r5, r5, #1 - add r4, r4, #1 -_02246876: - ldrb r2, [r5] - cmp r2, #0 - beq _02246880 - cmp r4, #0x10 - blt _02246850 -_02246880: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02246844 - - thumb_func_start ov6_02246884 -ov6_02246884: ; 0x02246884 - push {r4, r5, r6, lr} - ldr r0, [r0, #0xc] - add r5, r1, #0 - bl sub_0202440C - ldrb r1, [r5] - add r4, r0, #0 - cmp r1, #0 - beq _022468AC - mov r6, #0 -_02246898: - add r0, r4, #0 - bl sub_0202E3C4 - cmp r0, #0 - beq _022468A4 - strb r6, [r5] -_022468A4: - add r5, r5, #1 - ldrb r1, [r5] - cmp r1, #0 - bne _02246898 -_022468AC: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02246884 - - thumb_func_start ov6_022468B0 -ov6_022468B0: ; 0x022468B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - bl ov6_0224663C - str r0, [sp, #8] - bl ov6_0224669C - add r4, r0, #0 - add r0, sp, #0x1c - mov r1, #0 - mov r2, #0xb - bl sub_020C4CF4 - add r0, sp, #0xc - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - ldr r0, [sp, #8] - add r1, r5, #0 - add r2, sp, #0x1c - bl ov6_022466EC - add r0, sp, #0x1c - str r0, [sp] - add r0, sp, #0xc - str r0, [sp, #4] - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov6_022467DC - cmp r0, #0 - bne _02246902 - add sp, #0x28 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02246902: - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0xc - bl ov6_02246844 - add r0, r5, #0 - add r1, sp, #0xc - bl ov6_02246884 - add r0, r5, #0 - add r1, sp, #0xc - bl ov6_0224673C - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022468B0 - - thumb_func_start ov6_02246920 -ov6_02246920: ; 0x02246920 - push {r4, lr} - mov r1, #0 - add r2, r1, #0 - add r4, r0, #0 - bl ov6_022468B0 - cmp r0, #0 - bne _02246956 - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov6_022468B0 - cmp r0, #0 - bne _02246956 - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - bl ov6_022468B0 - cmp r0, #0 - bne _02246956 - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov6_022468B0 -_02246956: - pop {r4, pc} - thumb_func_end ov6_02246920 - - thumb_func_start ov6_02246958 -ov6_02246958: ; 0x02246958 - push {r4, lr} - bl ov6_0224663C - add r4, r0, #0 - cmp r4, #9 - bls _02246968 - bl sub_02022974 -_02246968: - ldr r2, _02246974 ; =0x02249470 - sub r1, r4, #1 - mov r0, #7 - mul r0, r1 - add r0, r2, r0 - pop {r4, pc} - ; .align 2, 0 -_02246974: .word 0x02249470 - thumb_func_end ov6_02246958 - - thumb_func_start ov6_02246978 -ov6_02246978: ; 0x02246978 - push {r4, r5, r6, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - add r5, r1, #0 - bl sub_0202440C - add r6, r0, #0 - add r0, r4, #0 - bl ov6_02246958 - add r4, r0, #0 - cmp r5, #3 - bhi _022469A6 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224699E: ; jump table - .short _022469AA - _0224699E - 2 ; case 0 - .short _022469C4 - _0224699E - 2 ; case 1 - .short _022469D6 - _0224699E - 2 ; case 2 - .short _022469DA - _0224699E - 2 ; case 3 -_022469A6: - bl sub_02022974 -_022469AA: - bl sub_02013960 - cmp r0, #0 - beq _022469B8 - cmp r0, #1 - beq _022469BC - b _022469C0 -_022469B8: - ldrb r0, [r4] - pop {r4, r5, r6, pc} -_022469BC: - ldrb r0, [r4, #1] - pop {r4, r5, r6, pc} -_022469C0: - ldrb r0, [r4, #2] - pop {r4, r5, r6, pc} -_022469C4: - add r0, r6, #0 - bl sub_0202E3DC - cmp r0, #0 - bne _022469D2 - ldrb r0, [r4, #3] - pop {r4, r5, r6, pc} -_022469D2: - ldrb r0, [r4, #4] - pop {r4, r5, r6, pc} -_022469D6: - ldrb r0, [r4, #5] - pop {r4, r5, r6, pc} -_022469DA: - ldrb r0, [r4, #6] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02246978 - - thumb_func_start ov6_022469E0 -ov6_022469E0: ; 0x022469E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - str r1, [sp, #4] - add r5, r2, #0 - add r6, r3, #0 - bl ov6_0224663C - bl ov6_0224669C - add r7, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0202440C - add r1, r5, #0 - bl sub_0202E384 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov6_022465A0 - add r5, r0, #0 - bl ov6_0224647C - ldr r2, [sp, #4] - add r0, r7, #0 - add r1, r4, #0 - add r3, r5, #0 - str r6, [sp] - bl sub_0206CD00 - ldr r1, [sp, #0x20] - strh r0, [r1] - add r0, r5, #0 - bl ov6_022465F4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022469E0 - - thumb_func_start ov6_02246A30 -ov6_02246A30: ; 0x02246A30 - mov r0, #1 - bx lr - thumb_func_end ov6_02246A30 - - thumb_func_start ov6_02246A34 -ov6_02246A34: ; 0x02246A34 - mov r0, #0 - bx lr - thumb_func_end ov6_02246A34 - - thumb_func_start ov6_02246A38 -ov6_02246A38: ; 0x02246A38 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - mov r1, #2 - mov r2, #7 - bl sub_0206AF3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246A38 - - thumb_func_start ov6_02246A4C -ov6_02246A4C: ; 0x02246A4C - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - mov r1, #2 - add r2, r1, #0 - bl sub_0206AF3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246A4C - - thumb_func_start ov6_02246A60 -ov6_02246A60: ; 0x02246A60 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - mov r1, #2 - mov r2, #9 - bl sub_0206AF3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246A60 - - thumb_func_start ov6_02246A74 -ov6_02246A74: ; 0x02246A74 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - mov r1, #2 - mov r2, #0xa - bl sub_0206AF3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246A74 - - thumb_func_start ov6_02246A88 -ov6_02246A88: ; 0x02246A88 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - mov r1, #2 - mov r2, #0xb - bl sub_0206AF3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246A88 - - thumb_func_start ov6_02246A9C -ov6_02246A9C: ; 0x02246A9C - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - mov r1, #2 - mov r2, #0x11 - bl sub_0206AF3C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246A9C - - thumb_func_start ov6_02246AB0 -ov6_02246AB0: ; 0x02246AB0 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_02025E38 - bl sub_02025F58 - cmp r0, #5 - blt _02246AC4 - mov r0, #1 - pop {r3, pc} -_02246AC4: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov6_02246AB0 - - thumb_func_start ov6_02246AC8 -ov6_02246AC8: ; 0x02246AC8 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_02027560 - bl sub_02026F0C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246AC8 - - thumb_func_start ov6_02246AD8 -ov6_02246AD8: ; 0x02246AD8 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_02027560 - bl sub_02027520 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246AD8 - - thumb_func_start ov6_02246AE8 -ov6_02246AE8: ; 0x02246AE8 - push {r3, lr} - ldr r0, [r0, #0xc] - bl sub_020507E4 - bl sub_0206A954 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02246AE8 - - thumb_func_start ov6_02246AF8 -ov6_02246AF8: ; 0x02246AF8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - ldr r4, _02246B38 ; =0x022494B0 - str r0, [sp] - add r7, r1, #0 - mov r6, #0 - add r5, sp, #4 -_02246B06: - ldr r0, [sp] - ldr r1, [r4, #0] - blx r1 - add r6, r6, #1 - add r4, r4, #4 - stmia r5!, {r0} - cmp r6, #0xc - blo _02246B06 - mov r4, #0 - ldr r3, _02246B3C ; =0x02249878 - add r0, r4, #0 - add r2, sp, #4 -_02246B1E: - ldrb r1, [r3] - lsl r1, r1, #2 - ldr r1, [r2, r1] - cmp r1, #0 - beq _02246B2C - strb r4, [r7, r0] - add r0, r0, #1 -_02246B2C: - add r4, r4, #1 - add r3, r3, #1 - cmp r4, #0x23 - blo _02246B1E - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246B38: .word 0x022494B0 -_02246B3C: .word 0x02249878 - thumb_func_end ov6_02246AF8 - - thumb_func_start ov6_02246B40 -ov6_02246B40: ; 0x02246B40 - push {r3, r4, lr} - sub sp, #0x24 - add r4, r0, #0 - add r0, sp, #0 - mov r1, #0 - mov r2, #0x24 - bl sub_020C4CF4 - add r0, r4, #0 - add r1, sp, #0 - bl ov6_02246AF8 - add r4, r0, #0 - bne _02246B62 - add sp, #0x24 - mov r0, #0 - pop {r3, r4, pc} -_02246B62: - bl sub_0201D35C - add r1, r4, #0 - bl sub_020E2178 - add r0, sp, #0 - ldrb r0, [r0, r1] - add sp, #0x24 - pop {r3, r4, pc} - thumb_func_end ov6_02246B40 - - thumb_func_start ov6_02246B74 -ov6_02246B74: ; 0x02246B74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r0, #0 - cmp r1, #0 - bne _02246BE8 - cmp r4, #0 - bne _02246B88 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02246B88: - add r0, sp, #0 - bl sub_020138A4 - ldr r0, [sp, #4] - cmp r0, #0 - bne _02246B98 - bl sub_02022974 -_02246B98: - ldr r0, [sp, #4] - cmp r0, #0xc - bls _02246BA2 - bl sub_02022974 -_02246BA2: - ldr r0, [sp, #4] - ldr r3, _02246BEC ; =0x0224954C - sub r0, r0, #1 - lsl r0, r0, #3 - ldr r6, [r3, r0] - add r2, r3, r0 - mov r1, #0 - cmp r6, #0 - ble _02246BE6 - ldr r3, [r2, #4] - ldr r5, [sp, #8] -_02246BB8: - lsl r0, r1, #1 - ldrh r7, [r3, r0] - asr r7, r7, #8 - lsl r7, r7, #0x18 - lsr r7, r7, #0x18 - cmp r5, r7 - bne _02246BDC - ldr r1, [r2, #4] - ldrh r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r1, r0, #0x16 - ldr r0, _02246BF0 ; =0x02249538 - ldr r0, [r0, r1] - add r0, r4, r0 - bpl _02246BE8 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02246BDC: - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, r6 - blt _02246BB8 -_02246BE6: - add r0, r4, #0 -_02246BE8: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246BEC: .word 0x0224954C -_02246BF0: .word 0x02249538 - thumb_func_end ov6_02246B74 - - thumb_func_start ov6_02246BF4 -ov6_02246BF4: ; 0x02246BF4 - push {r4, lr} - add r4, r1, #0 - bl sub_0202D834 - bl sub_0202D9CC - ldrb r1, [r0] - cmp r1, #0 - beq _02246C20 - sub r1, r1, #1 - strb r1, [r0] - ldrb r0, [r0] - cmp r0, #0 - bne _02246C20 - mov r1, #0x7f - add r0, r4, #0 - lsl r1, r1, #4 - mov r2, #0 - bl sub_0203E880 - mov r0, #1 - pop {r4, pc} -_02246C20: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov6_02246BF4 - - thumb_func_start ov6_02246C24 -ov6_02246C24: ; 0x02246C24 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r6, r1, #0 - mov r1, #0x7b - add r2, sp, #4 - add r3, sp, #0 - add r5, r0, #0 - bl sub_020552B4 - cmp r0, #0 - beq _02246C90 - mov r0, #4 - mov r1, #0x18 - bl sub_02018184 - add r4, r0, #0 - strb r6, [r4, #0xc] - mov r0, #0 - strb r0, [r4, #0xd] - strb r0, [r4, #0xe] - strb r0, [r4, #0xf] - ldr r0, [r5, #0x2c] - bl sub_02039E10 - add r1, r0, #0 - ldr r0, [sp] - add r2, sp, #0x14 - bl sub_020553A4 - ldr r1, [sp, #4] - add r0, sp, #8 - bl ov5_021E1894 - add r3, sp, #8 - ldmia r3!, {r0, r1} - add r2, r4, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [r4, #0] - ldr r0, [sp, #0x14] - add r2, r4, #0 - add r0, r1, r0 - str r0, [r4, #0] - ldr r1, [r4, #8] - ldr r0, [sp, #0x1c] - add r0, r1, r0 - str r0, [r4, #8] - ldr r0, [r5, #0x10] - ldr r1, _02246C98 ; =ov6_02246C9C - bl sub_02050944 - add sp, #0x20 - pop {r4, r5, r6, pc} -_02246C90: - bl sub_02022974 - add sp, #0x20 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02246C98: .word ov6_02246C9C - thumb_func_end ov6_02246C24 - - thumb_func_start ov6_02246C9C -ov6_02246C9C: ; 0x02246C9C - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r4, r0, #0 - bl sub_02050A60 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldrb r1, [r4, #0xf] - cmp r1, #5 - bls _02246CB8 - b _02246EE2 -_02246CB8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246CC4: ; jump table - .short _02246CD0 - _02246CC4 - 2 ; case 0 - .short _02246DA4 - _02246CC4 - 2 ; case 1 - .short _02246E2C - _02246CC4 - 2 ; case 2 - .short _02246E58 - _02246CC4 - 2 ; case 3 - .short _02246E7A - _02246CC4 - 2 ; case 4 - .short _02246ED8 - _02246CC4 - 2 ; case 5 -_02246CD0: - ldr r0, _02246EE8 ; =0x00000205 - ldr r1, [r6, #0x30] - bl ov5_021EF9E8 - add r5, r0, #0 - ldr r1, [r6, #0x30] - mov r0, #0x7c - bl ov5_021EF9E8 - add r7, r0, #0 - ldr r0, [r5, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _02246D0E - add r2, r0, #0 - add r2, #8 - beq _02246D02 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _02246D02 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _02246D04 -_02246D02: - mov r1, #0 -_02246D04: - cmp r1, #0 - beq _02246D0E - ldr r1, [r1, #0] - add r5, r0, r1 - b _02246D10 -_02246D0E: - mov r5, #0 -_02246D10: - ldr r0, [r7, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _02246D3A - add r2, r0, #0 - add r2, #8 - beq _02246D2E - ldrb r1, [r0, #9] - cmp r1, #0 - bls _02246D2E - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _02246D30 -_02246D2E: - mov r1, #0 -_02246D30: - cmp r1, #0 - beq _02246D3A - ldr r1, [r1, #0] - add r7, r0, r1 - b _02246D3C -_02246D3A: - mov r7, #0 -_02246D3C: - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - mov r1, #0 - str r1, [sp] - str r5, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r1, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - ldr r3, _02246EE8 ; =0x00000205 - mov r2, #0x10 - bl ov5_021D41C8 - add r0, r6, #0 - mov r1, #0x7c - add r2, sp, #0x18 - mov r3, #0 - bl sub_020552B4 - cmp r0, #0 - bne _02246D72 - bl sub_02022974 -_02246D72: - ldr r0, [sp, #0x18] - bl ov5_021E18BC - add r5, r0, #0 - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - str r5, [sp] - str r7, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #0x20 - mov r3, #0x7c - bl ov5_021D41C8 - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02246EE2 -_02246DA4: - add r1, sp, #0x1c - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - ldrb r2, [r4, #0xd] - mov r1, #0xc - ldr r0, [r4, #0] - add r3, r2, #0 - ldr r2, _02246EEC ; =0x0224989C - mul r3, r1 - ldr r2, [r2, r3] - add r0, r0, r2 - str r0, [sp, #0x28] - ldrb r2, [r4, #0xd] - ldr r0, [r4, #4] - add r3, r2, #0 - ldr r2, _02246EF0 ; =0x022498A0 - mul r3, r1 - ldr r2, [r2, r3] - add r0, r0, r2 - str r0, [sp, #0x2c] - ldrb r2, [r4, #0xd] - ldr r0, [r4, #8] - add r3, r2, #0 - mul r3, r1 - ldr r1, _02246EF4 ; =0x022498A4 - ldr r1, [r1, r3] - add r0, r0, r1 - str r0, [sp, #0x30] - ldr r0, _02246EF8 ; =0x000005FE - bl sub_02005748 - add r0, sp, #0x1c - str r0, [sp] - ldr r0, [r6, #0x50] - ldr r2, _02246EE8 ; =0x00000205 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r6, #0x30] - add r3, sp, #0x28 - bl ov5_021E19CC - ldrb r1, [r4, #0xd] - add r1, r4, r1 - strb r0, [r1, #0x10] - ldrb r1, [r4, #0xd] - add r0, r6, #0 - add r0, #0xa4 - add r1, r4, r1 - ldrb r1, [r1, #0x10] - ldr r0, [r0, #0] - bl ov5_021E18E0 - bl ov5_021E18BC - add r3, r0, #0 - ldrb r2, [r4, #0xd] - ldr r0, [r6, #0x54] - mov r1, #0x10 - bl ov5_021D4220 - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02246EE2 -_02246E2C: - ldrb r0, [r4, #0xe] - cmp r0, #0xf - bhs _02246E38 - add r0, r0, #1 - strb r0, [r4, #0xe] - b _02246EE2 -_02246E38: - mov r0, #0 - strb r0, [r4, #0xe] - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r1, [r4, #0xd] - ldrb r0, [r4, #0xc] - cmp r1, r0 - bhs _02246E50 - mov r0, #1 - strb r0, [r4, #0xf] - b _02246EE2 -_02246E50: - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02246EE2 -_02246E58: - ldr r0, [r6, #0x54] - mov r1, #0x10 - mov r2, #0 - bl ov5_021D4250 - ldr r0, [r6, #0x54] - mov r1, #0x20 - mov r2, #0 - bl ov5_021D4250 - ldr r0, _02246EFC ; =0x0000048E - bl sub_02006150 - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02246EE2 -_02246E7A: - ldr r0, [r6, #0x54] - mov r1, #0x10 - bl ov5_021D42F0 - cmp r0, #0 - beq _02246EE2 - ldr r0, [r6, #0x54] - mov r1, #0x20 - bl ov5_021D42F0 - cmp r0, #0 - beq _02246EE2 - bl sub_020061E4 - cmp r0, #0 - bne _02246EE2 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #0x20 - bl ov5_021D42B0 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #0x10 - bl ov5_021D42B0 - ldrb r0, [r4, #0xc] - mov r5, #0 - cmp r0, #0 - bls _02246ED0 -_02246EB6: - add r0, r4, r5 - add r1, r6, #0 - add r1, #0xa4 - ldrb r0, [r0, #0x10] - ldr r1, [r1, #0] - bl ov5_021E1674 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldrb r0, [r4, #0xc] - cmp r5, r0 - blo _02246EB6 -_02246ED0: - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02246EE2 -_02246ED8: - bl sub_020181C4 - add sp, #0x34 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02246EE2: - mov r0, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246EE8: .word 0x00000205 -_02246EEC: .word 0x0224989C -_02246EF0: .word 0x022498A0 -_02246EF4: .word 0x022498A4 -_02246EF8: .word 0x000005FE -_02246EFC: .word 0x0000048E - thumb_func_end ov6_02246C9C - - thumb_func_start ov6_02246F00 -ov6_02246F00: ; 0x02246F00 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r2, #0 - mov r2, #0 - ldr r1, _02246F38 ; =0x000001F2 - add r3, r2, #0 - add r5, r0, #0 - bl sub_020552B4 - cmp r0, #0 - beq _02246F32 - mov r0, #4 - add r1, r0, #0 - bl sub_02018184 - add r2, r0, #0 - strb r6, [r2] - strb r4, [r2, #1] - mov r0, #0 - strb r0, [r2, #2] - ldr r0, [r5, #0x10] - ldr r1, _02246F3C ; =ov6_02246F40 - bl sub_02050944 - pop {r4, r5, r6, pc} -_02246F32: - bl sub_02022974 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02246F38: .word 0x000001F2 -_02246F3C: .word ov6_02246F40 - thumb_func_end ov6_02246F00 - - thumb_func_start ov6_02246F40 -ov6_02246F40: ; 0x02246F40 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r0, #0 - bl sub_02050A60 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldrb r1, [r4, #2] - cmp r1, #4 - bls _02246F5C - b _02247064 -_02246F5C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246F68: ; jump table - .short _02246F72 - _02246F68 - 2 ; case 0 - .short _02246FEE - _02246F68 - 2 ; case 1 - .short _0224701C - _02246F68 - 2 ; case 2 - .short _02247048 - _02246F68 - 2 ; case 3 - .short _0224705A - _02246F68 - 2 ; case 4 -_02246F72: - ldr r0, _0224706C ; =0x000001F2 - ldr r1, [r6, #0x30] - bl ov5_021EF9E8 - ldr r0, [r0, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _02246FA4 - add r2, r0, #0 - add r2, #8 - beq _02246F98 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _02246F98 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _02246F9A -_02246F98: - mov r1, #0 -_02246F9A: - cmp r1, #0 - beq _02246FA4 - ldr r1, [r1, #0] - add r7, r0, r1 - b _02246FA6 -_02246FA4: - mov r7, #0 -_02246FA6: - ldr r1, _0224706C ; =0x000001F2 - add r0, r6, #0 - add r2, sp, #0x18 - mov r3, #0 - bl sub_020552B4 - cmp r0, #0 - bne _02246FBA - bl sub_02022974 -_02246FBA: - ldr r0, [sp, #0x18] - bl ov5_021E18BC - add r5, r0, #0 - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - str r5, [sp] - str r7, [sp, #4] - str r0, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - ldrb r0, [r4] - ldr r3, _0224706C ; =0x000001F2 - mov r2, #1 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - bl ov5_021D41C8 - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] - b _02247064 -_02246FEE: - ldrb r0, [r4, #1] - mov r1, #1 - cmp r0, #0 - beq _02246FFC - cmp r0, #1 - beq _02246FFC - mov r1, #0 -_02246FFC: - cmp r1, #0 - bne _02247004 - bl sub_02022974 -_02247004: - ldrb r2, [r4, #1] - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D4250 - ldr r0, _02247070 ; =0x00000612 - bl sub_02005748 - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] - b _02247064 -_0224701C: - ldr r0, [r6, #0x54] - mov r1, #1 - bl ov5_021D42F0 - cmp r0, #0 - beq _02247064 - ldr r0, _02247070 ; =0x00000612 - mov r1, #0 - bl sub_020057A4 - ldr r0, _02247074 ; =0x000005F1 - bl sub_02005748 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #1 - bl ov5_021D42B0 - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] - b _02247064 -_02247048: - ldr r0, _02247074 ; =0x000005F1 - bl sub_020057D4 - cmp r0, #0 - bne _02247064 - ldrb r0, [r4, #2] - add r0, r0, #1 - strb r0, [r4, #2] - b _02247064 -_0224705A: - bl sub_020181C4 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02247064: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0224706C: .word 0x000001F2 -_02247070: .word 0x00000612 -_02247074: .word 0x000005F1 - thumb_func_end ov6_02246F40 - - thumb_func_start ov6_02247078 -ov6_02247078: ; 0x02247078 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r4, _022470E4 ; =0x022495AC - add r3, sp, #0x20 - add r5, r0, #0 - add r7, r1, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, sp, #0x18 - str r0, [sp] - add r1, r2, #0 - add r0, r5, #0 - mov r2, #4 - add r3, sp, #0x1c - bl sub_02055324 - cmp r0, #0 - beq _022470DA - ldr r0, [r5, #0x30] - bl ov5_021EFAA0 - add r6, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021E18BC - add r4, r0, #0 - ldr r0, [sp, #0x1c] - bl ov5_021E18C0 - str r4, [sp] - str r0, [sp, #4] - str r6, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [r5, #0x50] - ldr r1, [r5, #0x54] - ldr r3, [sp, #0x18] - add r2, r7, #0 - bl ov5_021D41C8 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} -_022470DA: - bl sub_02022974 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_022470E4: .word 0x022495AC - thumb_func_end ov6_02247078 - - thumb_func_start ov6_022470E8 -ov6_022470E8: ; 0x022470E8 - ldr r3, _022470F0 ; =ov5_021D4250 - ldr r0, [r0, #0x54] - mov r2, #0 - bx r3 - ; .align 2, 0 -_022470F0: .word ov5_021D4250 - thumb_func_end ov6_022470E8 - - thumb_func_start ov6_022470F4 -ov6_022470F4: ; 0x022470F4 - ldr r3, _022470FC ; =ov5_021D4250 - ldr r0, [r0, #0x54] - mov r2, #1 - bx r3 - ; .align 2, 0 -_022470FC: .word ov5_021D4250 - thumb_func_end ov6_022470F4 - - thumb_func_start ov6_02247100 -ov6_02247100: ; 0x02247100 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - mov r1, #0x24 - bl ov6_02247590 - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #8] - str r5, [r4, #0x1c] - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - str r0, [r4, #0x18] - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02247100 - - thumb_func_start ov6_02247120 -ov6_02247120: ; 0x02247120 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_02050A60 - add r7, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r5, r0, #0 -_02247132: - ldr r3, [r5, #0] - add r0, r6, #0 - lsl r4, r3, #2 - ldr r3, _02247158 ; =0x022495CC - add r1, r7, #0 - ldr r3, [r3, r4] - add r2, r5, #0 - blx r3 - add r4, r0, #0 - cmp r4, #2 - bne _0224714E - add r0, r5, #0 - bl sub_020181C4 -_0224714E: - cmp r4, #1 - beq _02247132 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247158: .word 0x022495CC - thumb_func_end ov6_02247120 - - thumb_func_start ov6_0224715C -ov6_0224715C: ; 0x0224715C - push {r4, lr} - add r0, r1, #0 - mov r1, #4 - add r4, r2, #0 - bl ov5_021F0EB0 - ldr r2, _022471B0 ; =0xFFF6A000 - str r0, [r4, #0x14] - mov r1, #1 - mov r3, #0xf - bl ov5_021F0F10 - ldr r0, [r4, #0x18] - ldr r1, _022471B4 ; =0x02249608 - bl sub_02065700 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - ldr r0, [r4, #8] - cmp r0, #0 - beq _02247194 - cmp r0, #1 - beq _0224719C - cmp r0, #2 - beq _022471A4 - b _022471AA -_02247194: - ldr r0, _022471B8 ; =0x00000603 - bl sub_02005748 - b _022471AA -_0224719C: - ldr r0, _022471B8 ; =0x00000603 - bl sub_02005748 - b _022471AA -_022471A4: - ldr r0, _022471BC ; =0x0000064E - bl sub_02005748 -_022471AA: - mov r0, #0 - pop {r4, pc} - nop -_022471B0: .word 0xFFF6A000 -_022471B4: .word 0x02249608 -_022471B8: .word 0x00000603 -_022471BC: .word 0x0000064E - thumb_func_end ov6_0224715C - - thumb_func_start ov6_022471C0 -ov6_022471C0: ; 0x022471C0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r0, [r4, #0xc] - bl sub_0206574C - cmp r0, #0 - bne _022471D6 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_022471D6: - ldr r0, [r4, #0xc] - bl sub_02065758 - ldr r0, [r4, #0x18] - ldr r1, _0224723C ; =0x022495DC - bl sub_02065700 - str r0, [r4, #0xc] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #8 - bge _022471F6 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_022471F6: - ldr r0, [r4, #8] - cmp r0, #2 - bne _02247216 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - b _0224722E -_02247216: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0 - ldr r3, _02247240 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 -_0224722E: - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - nop -_0224723C: .word 0x022495DC -_02247240: .word 0x00007FFF - thumb_func_end ov6_022471C0 - - thumb_func_start ov6_02247244 -ov6_02247244: ; 0x02247244 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0xc] - bl sub_0206574C - cmp r0, #1 - bne _02247262 - ldr r0, [r4, #0xc] - bl sub_02065758 - ldr r0, [r4, #0x18] - ldr r1, _02247284 ; =0x022495DC - bl sub_02065700 - str r0, [r4, #0xc] -_02247262: - bl sub_0200F2AC - cmp r0, #0 - bne _0224726E - mov r0, #0 - pop {r4, pc} -_0224726E: - ldr r0, [r4, #0xc] - bl sub_02065758 - ldr r0, [r4, #0x14] - bl ov5_021F0EFC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_02247284: .word 0x022495DC - thumb_func_end ov6_02247244 - - thumb_func_start ov6_02247288 -ov6_02247288: ; 0x02247288 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r1, #0xc] - add r4, r2, #0 - bl sub_0203A790 - ldr r1, [r4, #8] - cmp r1, #2 - bne _022472B2 - bl sub_0203A75C - add r1, sp, #0 - bl sub_0203A7F0 - ldr r2, [r4, #8] - add r0, r5, #0 - add r1, sp, #0 - bl sub_02053CD4 - b _022472C0 -_022472B2: - bl sub_0203A72C - add r1, r0, #0 - ldr r2, [r4, #8] - add r0, r5, #0 - bl sub_02053CD4 -_022472C0: - mov r0, #2 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02247288 - - thumb_func_start ov6_022472C8 -ov6_022472C8: ; 0x022472C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, r1, #0 - mov r1, #0x24 - add r6, r2, #0 - bl ov6_02247590 - add r4, r0, #0 - str r6, [r4, #8] - str r5, [r4, #0x1c] - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - str r0, [r4, #0x18] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_022472C8 - - thumb_func_start ov6_022472E8 -ov6_022472E8: ; 0x022472E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02050A60 - add r6, r0, #0 - add r0, r5, #0 - bl sub_02050A64 - ldr r7, _02247328 ; =0x022495BC - add r4, r0, #0 -_022472FC: - ldr r3, [r4, #0] - add r0, r5, #0 - lsl r3, r3, #2 - ldr r3, [r7, r3] - add r1, r6, #0 - add r2, r4, #0 - blx r3 - cmp r0, #2 - bne _02247320 - add r0, r6, #0 - add r1, r4, #0 - bl ov6_0224732C - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02247320: - cmp r0, #1 - beq _022472FC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247328: .word 0x022495BC - thumb_func_end ov6_022472E8 - - thumb_func_start ov6_0224732C -ov6_0224732C: ; 0x0224732C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #8] - cmp r0, #2 - bne _02247352 - ldr r1, [r4, #0x1c] - mov r0, #9 - ldr r1, [r1, #0] - mov r2, #4 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0202BE00 - add r4, #0x9c - add r1, r0, #0 - ldr r0, [r4, #0] - mov r2, #1 - bl sub_0202B758 -_02247352: - pop {r4, pc} - thumb_func_end ov6_0224732C - - thumb_func_start ov6_02247354 -ov6_02247354: ; 0x02247354 - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r0, [r4, #8] - add r5, r1, #0 - cmp r0, #2 - bne _0224737A - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - b _02247390 -_0224737A: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r3, _022473BC ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 -_02247390: - add r0, r5, #0 - mov r1, #4 - bl ov5_021F0EB0 - mov r1, #1 - ldr r2, _022473C0 ; =0xFFF6A000 - str r0, [r4, #0x14] - add r3, r1, #0 - bl ov5_021F0F10 - ldr r0, [r4, #0x18] - ldr r1, _022473C4 ; =0x022495DC - bl sub_02065700 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_022473BC: .word 0x00007FFF -_022473C0: .word 0xFFF6A000 -_022473C4: .word 0x022495DC - thumb_func_end ov6_02247354 - - thumb_func_start ov6_022473C8 -ov6_022473C8: ; 0x022473C8 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0xc] - bl sub_0206574C - cmp r0, #1 - bne _022473E6 - ldr r0, [r4, #0xc] - bl sub_02065758 - ldr r0, [r4, #0x18] - ldr r1, _02247408 ; =0x022495DC - bl sub_02065700 - str r0, [r4, #0xc] -_022473E6: - bl sub_0200F2AC - cmp r0, #0 - bne _022473F2 - mov r0, #0 - pop {r4, pc} -_022473F2: - ldr r0, [r4, #0x14] - mov r1, #2 - mov r2, #0 - mov r3, #0x3c - bl ov5_021F0F10 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_02247408: .word 0x022495DC - thumb_func_end ov6_022473C8 - - thumb_func_start ov6_0224740C -ov6_0224740C: ; 0x0224740C - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0xc] - bl sub_0206574C - cmp r0, #0 - bne _0224741E - mov r0, #0 - pop {r4, pc} -_0224741E: - ldr r0, [r4, #0xc] - bl sub_02065758 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - cmp r0, #4 - ldr r0, [r4, #0x18] - bge _0224743C - ldr r1, _02247450 ; =0x022495DC - bl sub_02065700 - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_0224743C: - ldr r1, _02247454 ; =0x0224966C - bl sub_02065700 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r4, pc} - nop -_02247450: .word 0x022495DC -_02247454: .word 0x0224966C - thumb_func_end ov6_0224740C - - thumb_func_start ov6_02247458 -ov6_02247458: ; 0x02247458 - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0xc] - bl sub_0206574C - cmp r0, #0 - bne _0224746A - mov r0, #0 - pop {r4, pc} -_0224746A: - ldr r0, [r4, #0x14] - bl ov5_021F0EF0 - cmp r0, #0 - bne _02247478 - mov r0, #0 - pop {r4, pc} -_02247478: - ldr r0, [r4, #0x14] - bl ov5_021F0EFC - ldr r0, [r4, #0xc] - bl sub_02065758 - mov r0, #2 - pop {r4, pc} - thumb_func_end ov6_02247458 - - thumb_func_start ov6_02247488 -ov6_02247488: ; 0x02247488 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r0, r2, #0 - mov r1, #0x24 - bl ov6_02247590 - add r4, r0, #0 - mov r0, #1 - str r0, [r4, #8] - str r5, [r4, #0x1c] - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - str r0, [r4, #0x18] - str r6, [r4, #0x20] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02247488 - - thumb_func_start ov6_022474AC -ov6_022474AC: ; 0x022474AC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_02050A60 - add r7, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r5, r0, #0 -_022474BE: - ldr r3, [r5, #0] - add r0, r6, #0 - lsl r4, r3, #2 - ldr r3, _022474E4 ; =0x022495F0 - add r1, r7, #0 - ldr r3, [r3, r4] - add r2, r5, #0 - blx r3 - add r4, r0, #0 - cmp r4, #2 - bne _022474DA - add r0, r5, #0 - bl sub_020181C4 -_022474DA: - cmp r4, #1 - beq _022474BE - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022474E4: .word 0x022495F0 - thumb_func_end ov6_022474AC - - thumb_func_start ov6_022474E8 -ov6_022474E8: ; 0x022474E8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r0, [r5, #0x3c] - add r4, r2, #0 - bl sub_0205EB98 - add r3, r0, #0 - ldr r2, [r4, #0x20] - add r0, r5, #0 - mov r1, #0 - bl ov6_02243F88 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov6_022474E8 - - thumb_func_start ov6_0224750C -ov6_0224750C: ; 0x0224750C - push {r4, lr} - add r4, r2, #0 - ldr r0, [r4, #0x10] - bl ov6_02243FBC - cmp r0, #0 - bne _0224751E - mov r0, #0 - pop {r4, pc} -_0224751E: - ldr r0, [r4, #0x10] - bl ov6_02243FC8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_0224750C - - thumb_func_start ov6_02247530 -ov6_02247530: ; 0x02247530 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r0, r2, #0 - mov r1, #0x24 - bl ov6_02247590 - add r4, r0, #0 - mov r0, #2 - str r0, [r4, #8] - str r5, [r4, #0x1c] - ldr r0, [r5, #0x3c] - bl sub_0205EB3C - str r0, [r4, #0x18] - str r6, [r4, #0x20] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov6_02247530 - - thumb_func_start ov6_02247554 -ov6_02247554: ; 0x02247554 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_02050A60 - add r7, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r5, r0, #0 -_02247566: - ldr r3, [r5, #0] - add r0, r6, #0 - lsl r4, r3, #2 - ldr r3, _0224758C ; =0x022495F0 - add r1, r7, #0 - ldr r3, [r3, r4] - add r2, r5, #0 - blx r3 - add r4, r0, #0 - cmp r4, #2 - bne _02247582 - add r0, r5, #0 - bl sub_020181C4 -_02247582: - cmp r4, #1 - beq _02247566 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224758C: .word 0x022495F0 - thumb_func_end ov6_02247554 - - thumb_func_start ov6_02247590 -ov6_02247590: ; 0x02247590 - push {r3, r4, r5, lr} - add r5, r1, #0 - bl sub_02018184 - add r4, r0, #0 - bne _022475A0 - bl sub_02022974 -_022475A0: - add r0, r4, #0 - mov r1, #0 - add r2, r5, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02247590 - - thumb_func_start ov6_022475B0 -ov6_022475B0: ; 0x022475B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - mov r0, #0x6a - mov r1, #8 - mov r2, #4 - bl sub_02006ADC - add r4, r0, #0 - add r1, sp, #4 - ldr r0, [sp] - add r1, #2 - add r2, sp, #4 - bl sub_0202DA10 - add r0, sp, #4 - ldrh r1, [r0, #2] - ldr r0, _02247620 ; =0x0000FFFF - cmp r1, r0 - beq _022475DE - lsl r0, r1, #2 - ldr r6, [r4, r0] - b _022475E0 -_022475DE: - mov r6, #0 -_022475E0: - add r0, sp, #4 - ldrh r1, [r0] - ldr r0, _02247620 ; =0x0000FFFF - cmp r1, r0 - beq _022475F0 - lsl r0, r1, #2 - ldr r7, [r4, r0] - b _022475F2 -_022475F0: - mov r7, #0 -_022475F2: - bl sub_0201D2E8 - lsl r0, r0, #4 - lsr r5, r0, #0x10 - cmp r5, #0x10 - blo _02247602 - bl sub_02022974 -_02247602: - lsl r0, r5, #2 - ldr r0, [r4, r0] - cmp r6, r0 - beq _022475F2 - cmp r7, r0 - beq _022475F2 - ldr r0, [sp] - add r1, r5, #0 - bl sub_0202DA24 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247620: .word 0x0000FFFF - thumb_func_end ov6_022475B0 - - thumb_func_start ov6_02247624 -ov6_02247624: ; 0x02247624 - push {r3, r4, lr} - sub sp, #4 - add r1, sp, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0202DA10 - add r0, sp, #0 - ldrh r1, [r0, #2] - ldr r0, _0224765C ; =0x0000FFFF - cmp r1, r0 - bne _02247640 - bl sub_02022974 -_02247640: - mov r0, #0x6a - mov r1, #8 - mov r2, #4 - bl sub_02006ADC - add r1, sp, #0 - ldrh r1, [r1, #2] - lsl r1, r1, #2 - ldr r4, [r0, r1] - bl sub_020181C4 - add r0, r4, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0224765C: .word 0x0000FFFF - thumb_func_end ov6_02247624 - - thumb_func_start ov6_02247660 -ov6_02247660: ; 0x02247660 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r0, #0 - bl sub_0201D2E8 - lsl r0, r0, #1 - lsr r4, r0, #0x10 - cmp r4, #2 - blo _02247676 - bl sub_02022974 -_02247676: - cmp r4, #0 - bne _02247680 - add sp, #0x4c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02247680: - ldr r0, [r5, #0xc] - bl sub_0202B4A0 - bl sub_0202B428 - add r4, r0, #0 - ldr r0, [r5, #0x3c] - add r1, sp, #0x18 - add r2, sp, #0x14 - bl sub_020615AC - ldr r0, [r5, #0x2c] - bl sub_02039E10 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - lsr r0, r4, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x3c] - lsr r0, r4, #0x10 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x40] - lsr r0, r4, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x44] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x48] - mov r0, #0x6a - mov r1, #1 - mov r2, #4 - bl sub_02006ADC - str r0, [sp, #0xc] - mov r4, #0 - ldr r0, [r0, #0] - add r3, r4, #0 - cmp r0, #0 - ble _022476EA -_022476D6: - ldr r1, [sp, #0xc] - lsl r2, r3, #2 - add r1, r1, r2 - ldr r1, [r1, #4] - add r4, r4, r1 - add r1, r3, #1 - lsl r1, r1, #0x18 - lsr r3, r1, #0x18 - cmp r3, r0 - blt _022476D6 -_022476EA: - lsl r0, r0, #1 - add r0, r0, #2 - lsl r1, r0, #1 - ldr r0, [sp, #0xc] - add r0, r0, r1 - str r0, [sp, #8] - asr r0, r4, #1 - lsr r0, r0, #0x1e - add r0, r4, r0 - mov r1, #1 - asr r0, r0, #2 - lsl r1, r1, #8 - str r0, [sp, #0x10] - cmp r0, r1 - blt _0224770C - bl sub_02022974 -_0224770C: - lsr r2, r4, #0x1f - lsl r1, r4, #0x1e - sub r1, r1, r2 - mov r0, #0x1e - ror r1, r0 - add r0, r2, r1 - lsl r0, r0, #0x18 - mov r7, #0 - lsr r6, r0, #0x18 - add r5, r7, #0 -_02247720: - lsl r4, r5, #2 - add r0, sp, #0x3c - ldr r0, [r0, r4] - ldr r1, [sp, #0x10] - bl sub_020E1F6C - ldr r0, [sp, #0x10] - add r2, r0, #0 - mul r2, r5 - add r0, r1, r2 - add r1, r7, r0 - add r0, sp, #0x2c - str r1, [r0, r4] - ldr r0, [r0, r4] - lsl r1, r0, #1 - ldr r0, [sp, #8] - cmp r6, #0 - ldrh r1, [r0, r1] - add r0, sp, #0x1c - str r1, [r0, r4] - beq _02247756 - add r0, r7, #1 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - sub r0, r6, #1 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 -_02247756: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #4 - blo _02247720 - ldr r0, [sp] - ldr r1, [sp, #0x14] - lsl r0, r0, #5 - mul r0, r1 - ldr r2, [sp, #0x18] - mov r3, #0 - add r2, r2, r0 - add r1, sp, #0x1c -_02247770: - lsl r0, r3, #2 - ldr r0, [r1, r0] - cmp r2, r0 - bne _0224777E - mov r0, #1 - str r0, [sp, #4] - b _02247788 -_0224777E: - add r0, r3, #1 - lsl r0, r0, #0x18 - lsr r3, r0, #0x18 - cmp r3, #4 - blo _02247770 -_02247788: - ldr r0, [sp, #0xc] - bl sub_020181C4 - ldr r0, [sp, #4] - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02247660 - - thumb_func_start ov6_02247794 -ov6_02247794: ; 0x02247794 - mov r2, #0x14 - strb r2, [r0] - mov r0, #0xa - strb r0, [r1] - bx lr - ; .align 2, 0 - thumb_func_end ov6_02247794 - - thumb_func_start ov6_022477A0 -ov6_022477A0: ; 0x022477A0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6a - mov r1, #0 - mov r2, #4 - bl sub_02006ADC - ldr r1, [r0, #0] - str r1, [r4, #0] - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov6_022477A0 - - thumb_func_start ov6_022477B8 -ov6_022477B8: ; 0x022477B8 - cmp r1, #0 - beq _0224782A - ldr r1, _0224782C ; =0x021BF6DC - ldrb r1, [r1, #6] - cmp r1, #5 - bhi _0224782A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022477D0: ; jump table - .short _0224782A - _022477D0 - 2 ; case 0 - .short _022477DC - _022477D0 - 2 ; case 1 - .short _022477EC - _022477D0 - 2 ; case 2 - .short _022477FC - _022477D0 - 2 ; case 3 - .short _0224780C - _022477D0 - 2 ; case 4 - .short _0224781C - _022477D0 - 2 ; case 5 -_022477DC: - add r1, r0, #0 - add r1, #0xac - ldr r1, [r1, #0] - add r0, #0xb0 - str r1, [r2, #0] - ldr r0, [r0, #0] - str r0, [r3, #0] - bx lr -_022477EC: - add r1, r0, #0 - add r1, #0xa4 - ldr r1, [r1, #0] - add r0, #0xa8 - str r1, [r2, #0] - ldr r0, [r0, #0] - str r0, [r3, #0] - bx lr -_022477FC: - add r1, r0, #0 - add r1, #0xb4 - ldr r1, [r1, #0] - add r0, #0xb8 - str r1, [r2, #0] - ldr r0, [r0, #0] - str r0, [r3, #0] - bx lr -_0224780C: - add r1, r0, #0 - add r1, #0xbc - ldr r1, [r1, #0] - add r0, #0xc0 - str r1, [r2, #0] - ldr r0, [r0, #0] - str r0, [r3, #0] - bx lr -_0224781C: - add r1, r0, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - add r0, #0xc8 - str r1, [r2, #0] - ldr r0, [r0, #0] - str r0, [r3, #0] -_0224782A: - bx lr - ; .align 2, 0 -_0224782C: .word 0x021BF6DC - thumb_func_end ov6_022477B8 - - thumb_func_start ov6_02247830 -ov6_02247830: ; 0x02247830 - push {r4, r5, r6, r7} - add r3, r0, #0 - add r0, r2, #0 - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r2, #0 - beq _0224788C - add r6, r3, r1 - sub r7, r1, #1 -_02247844: - sub r1, r6, #1 - ldrb r2, [r1] - mov r1, #1 - add r5, r7, #0 - and r1, r2 - lsl r1, r1, #0x18 - lsr r4, r1, #0x18 - cmp r7, #0 - ble _02247872 -_02247856: - ldrb r1, [r3, r5] - add r2, r3, r5 - sub r2, r2, #1 - asr r1, r1, #1 - strb r1, [r3, r5] - ldrb r2, [r2] - ldrb r1, [r3, r5] - lsl r2, r2, #0x1f - lsr r2, r2, #0x18 - orr r1, r2 - strb r1, [r3, r5] - sub r5, r5, #1 - cmp r5, #0 - bgt _02247856 -_02247872: - ldrb r1, [r3, r5] - asr r1, r1, #1 - strb r1, [r3, r5] - ldrb r2, [r3, r5] - lsl r1, r4, #7 - orr r1, r2 - strb r1, [r3, r5] - add r1, r0, #0 - sub r0, r0, #1 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r1, #0 - bne _02247844 -_0224788C: - pop {r4, r5, r6, r7} - bx lr - thumb_func_end ov6_02247830 - - thumb_func_start ov6_02247890 -ov6_02247890: ; 0x02247890 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r2, #0 - str r1, [sp] - add r7, r3, #0 - bl sub_02015004 - add r4, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_02015030 - add r1, sp, #4 - strh r0, [r1, #4] - add r0, r5, #0 - add r1, r7, #0 - bl sub_02015030 - add r1, sp, #4 - strh r0, [r1, #6] - add r1, sp, #0x18 - ldrh r1, [r1, #0x10] - add r0, r5, #0 - bl sub_02015030 - add r1, sp, #4 - strh r0, [r1, #8] - add r1, sp, #0x18 - ldrh r1, [r1, #0x14] - add r0, r5, #0 - bl sub_02015030 - add r1, sp, #4 - mov r2, #0 - strh r0, [r1, #0xa] - add r3, sp, #8 - add r5, sp, #4 - add r7, r2, #0 -_022478DE: - ldrsh r0, [r3, r7] - cmp r0, #0 - bge _022478EC - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_022478EC: - cmp r2, #0 - ble _02247920 - mov r6, #1 - mvn r6, r6 - ldrsh r6, [r3, r6] - cmp r0, r6 - blt _0224790C - sub r0, r0, r6 - cmp r0, #0xff - ble _02247908 - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02247908: - strb r0, [r5] - b _02247932 -_0224790C: - sub r0, r6, r0 - sub r0, r4, r0 - cmp r0, #0xff - ble _0224791C - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_0224791C: - strb r0, [r5] - b _02247932 -_02247920: - mov r0, #4 - ldrsh r0, [r1, r0] - cmp r0, #0xff - ble _02247930 - mov r0, #0 - add sp, #0x10 - mvn r0, r0 - pop {r3, r4, r5, r6, r7, pc} -_02247930: - strb r0, [r1] -_02247932: - add r2, r2, #1 - add r3, r3, #2 - add r5, r5, #1 - cmp r2, #4 - blt _022478DE - add r0, sp, #4 - mov r1, #4 - mov r2, #5 - bl ov6_02247830 - mov r2, #0 - add r1, sp, #4 - add r4, sp, #4 - mov r3, #0xf0 -_0224794E: - ldrb r5, [r4, #3] - ldrb r0, [r1] - add r2, r2, #1 - asr r6, r5, #4 - and r5, r3 - orr r5, r6 - eor r0, r5 - strb r0, [r1] - add r1, r1, #1 - cmp r2, #3 - blt _0224794E - add r2, sp, #4 - ldrb r3, [r2, #3] - mov r2, #0xf - add r0, sp, #4 - and r2, r3 - lsl r2, r2, #0x18 - mov r1, #3 - lsr r2, r2, #0x18 - bl ov6_02247830 - add r1, sp, #4 - ldrb r5, [r1] - mov r0, #0xf - add r4, r5, #0 - and r4, r0 - cmp r4, #8 - blt _0224798C - add sp, #0x10 - sub r0, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_0224798C: - ldrb r0, [r1, #1] - eor r0, r5 - strb r0, [r1, #1] - ldrb r0, [r1, #2] - eor r0, r5 - strb r0, [r1, #2] - ldrb r2, [r1, #1] - ldrb r3, [r1, #2] - lsl r0, r2, #8 - add r6, r0, #0 - ldr r0, [sp] - orr r6, r3 - cmp r0, r6 - bne _022479C6 - mov r0, #0xf0 - and r0, r5 - asr r0, r0, #4 - cmp r0, #6 - bne _022479C6 - ldrb r0, [r1, #3] - add r1, r5, r2 - mul r1, r3 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - cmp r0, r1 - bne _022479C6 - add sp, #0x10 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} -_022479C6: - mov r0, #0 - mvn r0, r0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02247890 - - thumb_func_start ov6_022479D0 -ov6_022479D0: ; 0x022479D0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - ldr r0, [sp, #0x24] - add r7, r1, #0 - str r2, [sp, #8] - add r5, r3, #0 - bl sub_02014FB0 - add r4, r0, #0 - add r0, r6, #0 - bl sub_02025F24 - add r1, r0, #0 - str r5, [sp] - add r0, sp, #0x10 - ldrh r0, [r0, #0x10] - add r2, r7, #0 - str r0, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov6_02247890 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02014FF0 - add r0, r5, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_022479D0 - - thumb_func_start ov6_02247A0C -ov6_02247A0C: ; 0x02247A0C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xb - mov r1, #8 - bl sub_02018184 - mov r1, #0 - mov r2, #8 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r1, _02247A30 ; =ov6_02247A34 - add r0, r5, #0 - add r2, r4, #0 - bl sub_02050944 - pop {r3, r4, r5, pc} - nop -_02247A30: .word ov6_02247A34 - thumb_func_end ov6_02247A0C - - thumb_func_start ov6_02247A34 -ov6_02247A34: ; 0x02247A34 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - beq _02247A56 - cmp r1, #1 - beq _02247A66 - cmp r1, #2 - beq _02247A7E - b _02247A86 -_02247A56: - add r0, r5, #0 - bl ov6_02247A90 - str r0, [r4, #0] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _02247A86 -_02247A66: - ldr r0, _02247A8C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _02247A86 - ldr r0, [r4, #0] - bl ov6_02247CC8 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _02247A86 -_02247A7E: - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, pc} -_02247A86: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02247A8C: .word 0x021BF67C - thumb_func_end ov6_02247A34 - - thumb_func_start ov6_02247A90 -ov6_02247A90: ; 0x02247A90 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r4, r0, #0 - bl sub_0203D170 - add r5, r0, #0 - add r0, r4, #0 - bl sub_0203D174 - str r0, [sp, #0x1c] - mov r0, #0xb - mov r1, #0x18 - bl sub_02018144 - mov r1, #0 - mov r2, #0x18 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - mov r1, #0x1a - mov r2, #0xd0 - mov r3, #0xb - bl sub_0200B144 - str r0, [r4, #0x10] - mov r0, #0xb - bl sub_0200B358 - str r0, [r4, #0x14] - mov r2, #3 - str r2, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #0x11 - str r0, [sp, #8] - mov r0, #0xc - str r0, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #1 - bl sub_0201A7E8 - mov r0, #0 - str r0, [sp] - mov r3, #0xb - add r0, r5, #0 - mov r1, #3 - mov r2, #1 - str r3, [sp, #4] - bl sub_0200DAA4 - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #0x64 - mov r1, #0xb - bl sub_02023790 - add r6, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #0 - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, [sp, #0x1c] - bl sub_02025E38 - add r2, r0, #0 - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200B498 - ldr r0, [r4, #0x14] - add r1, r6, #0 - add r2, r5, #0 - bl sub_0200C388 - add r0, r6, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0x78 - bl ov6_02247CF4 - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r5, #0 - bl sub_020237BC - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_0200B1EC - mov r1, #0 - mov r2, #1 - mov r3, #0x78 - add r5, r0, #0 - bl ov6_02247CF4 - add r3, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r4, #0 - add r2, r5, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0 - ldr r5, _02247CBC ; =0x022496F4 - str r0, [sp, #0x24] -_02247B9A: - ldr r0, [r4, #0x10] - ldr r1, [r5, #0] - bl sub_0200B1EC - mov r3, #4 - mov r1, #0 - ldrsh r3, [r5, r3] - add r2, r1, #0 - add r7, r0, #0 - bl ov6_02247CF4 - add r3, r0, #0 - mov r0, #6 - ldrsh r0, [r5, r0] - mov r1, #0 - add r2, r7, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - bl sub_0201D738 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x24] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, #5 - blt _02247B9A - mov r0, #0 - ldr r5, _02247CC0 ; =0x022496D4 - str r0, [sp, #0x14] -_02247BE2: - ldr r0, [r4, #0x10] - ldr r1, [r5, #0] - bl sub_0200B1EC - mov r3, #4 - ldrsh r3, [r5, r3] - mov r1, #0 - mov r2, #2 - add r7, r0, #0 - bl ov6_02247CF4 - add r3, r0, #0 - mov r0, #6 - ldrsh r0, [r5, r0] - mov r1, #0 - add r2, r7, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - bl sub_0201D738 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #4 - blt _02247BE2 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, _02247CC4 ; =0x0224971C - str r0, [sp, #0x18] -_02247C2C: - ldr r5, [sp, #0x18] - mov r7, #0 -_02247C30: - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x20] - add r2, r7, #0 - bl sub_0202F160 - str r0, [sp, #0x28] - ldr r0, [r4, #0x10] - ldr r1, [r5, #0] - bl sub_0200B1EC - str r0, [sp, #0x2c] - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0x14] - ldr r2, [sp, #0x28] - mov r1, #0 - mov r3, #4 - bl sub_0200B60C - ldr r0, [r4, #0x14] - ldr r2, [sp, #0x2c] - add r1, r6, #0 - bl sub_0200C388 - mov r3, #4 - ldrsh r3, [r5, r3] - add r0, r6, #0 - mov r1, #0 - mov r2, #2 - bl ov6_02247CF4 - add r3, r0, #0 - mov r0, #6 - ldrsh r0, [r5, r0] - mov r1, #0 - add r2, r6, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - bl sub_0201D738 - ldr r0, [sp, #0x2c] - bl sub_020237BC - add r7, r7, #1 - add r5, #8 - cmp r7, #4 - blt _02247C30 - ldr r0, [sp, #0x18] - add r0, #0x20 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, #5 - blt _02247C2C - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A954 - add r0, r4, #0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247CBC: .word 0x022496F4 -_02247CC0: .word 0x022496D4 -_02247CC4: .word 0x0224971C - thumb_func_end ov6_02247A90 - - thumb_func_start ov6_02247CC8 -ov6_02247CC8: ; 0x02247CC8 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - bl sub_0201ACF4 - add r0, r4, #0 - bl sub_0201A8FC - ldr r0, [r4, #0x10] - bl sub_0200B190 - ldr r0, [r4, #0x14] - bl sub_0200B3F0 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02247CC8 - - thumb_func_start ov6_02247CF4 -ov6_02247CF4: ; 0x02247CF4 - push {r4, r5, r6, lr} - add r5, r2, #0 - add r6, r0, #0 - add r4, r3, #0 - cmp r5, #0 - bne _02247D04 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_02247D04: - add r0, r1, #0 - add r1, r6, #0 - mov r2, #0 - bl sub_02002D7C - cmp r5, #1 - beq _02247D18 - cmp r5, #2 - beq _02247D22 - b _02247D26 -_02247D18: - lsr r1, r0, #0x1f - add r1, r0, r1 - asr r0, r1, #1 - sub r0, r4, r0 - pop {r4, r5, r6, pc} -_02247D22: - sub r0, r4, r0 - pop {r4, r5, r6, pc} -_02247D26: - bl sub_02022974 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02247CF4 - - thumb_func_start ov6_02247D30 -ov6_02247D30: ; 0x02247D30 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r6, r1, #0 - ldr r1, _02247DA4 ; =0x000001FB - add r2, sp, #4 - add r3, sp, #0 - add r5, r0, #0 - bl sub_020552B4 - cmp r0, #0 - beq _02247D9C - mov r0, #4 - mov r1, #0x18 - bl sub_02018184 - add r4, r0, #0 - strb r6, [r4, #0xc] - mov r0, #0 - strb r0, [r4, #0xd] - strb r0, [r4, #0xe] - strb r0, [r4, #0xf] - ldr r0, [r5, #0x2c] - bl sub_02039E10 - add r1, r0, #0 - ldr r0, [sp] - add r2, sp, #0x14 - bl sub_020553A4 - ldr r1, [sp, #4] - add r0, sp, #8 - bl ov5_021E1894 - add r3, sp, #8 - ldmia r3!, {r0, r1} - add r2, r4, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r1, [r4, #0] - ldr r0, [sp, #0x14] - add r2, r4, #0 - add r0, r1, r0 - str r0, [r4, #0] - ldr r1, [r4, #8] - ldr r0, [sp, #0x1c] - add r0, r1, r0 - str r0, [r4, #8] - ldr r0, [r5, #0x10] - ldr r1, _02247DA8 ; =ov6_02247DAC - bl sub_02050944 - add sp, #0x20 - pop {r4, r5, r6, pc} -_02247D9C: - bl sub_02022974 - add sp, #0x20 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02247DA4: .word 0x000001FB -_02247DA8: .word ov6_02247DAC - thumb_func_end ov6_02247D30 - - thumb_func_start ov6_02247DAC -ov6_02247DAC: ; 0x02247DAC - push {r4, r5, r6, lr} - sub sp, #0x30 - add r4, r0, #0 - bl sub_02050A60 - add r6, r0, #0 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldrb r1, [r4, #0xf] - cmp r1, #5 - bls _02247DC8 - b _02247F46 -_02247DC8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02247DD4: ; jump table - .short _02247DE0 - _02247DD4 - 2 ; case 0 - .short _02247E3E - _02247DD4 - 2 ; case 1 - .short _02247EBE - _02247DD4 - 2 ; case 2 - .short _02247EEA - _02247DD4 - 2 ; case 3 - .short _02247EFC - _02247DD4 - 2 ; case 4 - .short _02247F3C - _02247DD4 - 2 ; case 5 -_02247DE0: - ldr r0, _02247F4C ; =0x00000205 - ldr r1, [r6, #0x30] - bl ov5_021EF9E8 - ldr r0, [r0, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _02247E12 - add r2, r0, #0 - add r2, #8 - beq _02247E06 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _02247E06 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _02247E08 -_02247E06: - mov r1, #0 -_02247E08: - cmp r1, #0 - beq _02247E12 - ldr r1, [r1, #0] - add r5, r0, r1 - b _02247E14 -_02247E12: - mov r5, #0 -_02247E14: - ldr r0, [r6, #0x30] - bl ov5_021EFAA0 - mov r1, #0 - str r1, [sp] - str r5, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - str r1, [sp, #0x14] - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - ldr r3, _02247F4C ; =0x00000205 - mov r2, #0x10 - bl ov5_021D41C8 - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02247F46 -_02247E3E: - add r0, sp, #0x18 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - ldrb r5, [r4, #0xd] - mov r1, #0xc - ldr r3, [r4, #0] - add r2, r5, #0 - ldr r5, _02247F50 ; =0x022498E4 - mul r2, r1 - ldr r2, [r5, r2] - add r2, r3, r2 - str r2, [sp, #0x24] - ldrb r5, [r4, #0xd] - ldr r3, [r4, #4] - add r2, r5, #0 - ldr r5, _02247F54 ; =0x022498E8 - mul r2, r1 - ldr r2, [r5, r2] - add r2, r3, r2 - str r2, [sp, #0x28] - ldrb r3, [r4, #0xd] - ldr r2, [r4, #8] - add r5, r3, #0 - mul r5, r1 - ldr r1, _02247F58 ; =0x022498EC - add r3, sp, #0x24 - ldr r1, [r1, r5] - add r1, r2, r1 - str r1, [sp, #0x2c] - str r0, [sp] - ldr r0, [r6, #0x50] - ldr r2, _02247F4C ; =0x00000205 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - ldr r1, [r6, #0x30] - bl ov5_021E19CC - ldrb r1, [r4, #0xd] - add r1, r4, r1 - strb r0, [r1, #0x10] - ldrb r1, [r4, #0xd] - add r0, r6, #0 - add r0, #0xa4 - add r1, r4, r1 - ldrb r1, [r1, #0x10] - ldr r0, [r0, #0] - bl ov5_021E18E0 - bl ov5_021E18BC - add r3, r0, #0 - ldrb r2, [r4, #0xd] - ldr r0, [r6, #0x54] - mov r1, #0x10 - bl ov5_021D4220 - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02247F46 -_02247EBE: - ldrb r0, [r4, #0xe] - cmp r0, #0xf - bhs _02247ECA - add r0, r0, #1 - strb r0, [r4, #0xe] - b _02247F46 -_02247ECA: - mov r0, #0 - strb r0, [r4, #0xe] - ldrb r0, [r4, #0xd] - add r0, r0, #1 - strb r0, [r4, #0xd] - ldrb r1, [r4, #0xd] - ldrb r0, [r4, #0xc] - cmp r1, r0 - bhs _02247EE2 - mov r0, #1 - strb r0, [r4, #0xf] - b _02247F46 -_02247EE2: - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02247F46 -_02247EEA: - ldr r0, [r6, #0x54] - mov r1, #0x10 - mov r2, #0 - bl ov5_021D4250 - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02247F46 -_02247EFC: - ldr r0, [r6, #0x54] - mov r1, #0x10 - bl ov5_021D42F0 - cmp r0, #0 - beq _02247F46 - ldr r0, [r6, #0x50] - ldr r1, [r6, #0x54] - mov r2, #0x10 - bl ov5_021D42B0 - ldrb r0, [r4, #0xc] - mov r5, #0 - cmp r0, #0 - bls _02247F34 -_02247F1A: - add r0, r4, r5 - add r1, r6, #0 - add r1, #0xa4 - ldrb r0, [r0, #0x10] - ldr r1, [r1, #0] - bl ov5_021E1674 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - ldrb r0, [r4, #0xc] - cmp r5, r0 - blo _02247F1A -_02247F34: - ldrb r0, [r4, #0xf] - add r0, r0, #1 - strb r0, [r4, #0xf] - b _02247F46 -_02247F3C: - bl sub_020181C4 - add sp, #0x30 - mov r0, #1 - pop {r4, r5, r6, pc} -_02247F46: - mov r0, #0 - add sp, #0x30 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02247F4C: .word 0x00000205 -_02247F50: .word 0x022498E4 -_02247F54: .word 0x022498E8 -_02247F58: .word 0x022498EC - thumb_func_end ov6_02247DAC - - thumb_func_start ov6_02247F5C -ov6_02247F5C: ; 0x02247F5C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_020507E4 - bl sub_0206ADEC - cmp r0, #0 - bne _02247F8C - mov r0, #0x1f - ldr r2, [r4, #0x50] - lsl r0, r0, #4 - mov r1, #1 - bl ov5_021D3DE4 - add r4, r0, #0 - mov r1, #1 - bl ov5_021D3F08 - add r0, r4, #0 - mov r1, #1 - bl ov5_021D3E40 - pop {r4, pc} -_02247F8C: - mov r0, #0x1f - ldr r2, [r4, #0x50] - lsl r0, r0, #4 - mov r1, #0 - bl ov5_021D3DE4 - mov r1, #1 - bl ov5_021D3E40 - mov r0, #0x1f - ldr r2, [r4, #0x50] - lsl r0, r0, #4 - mov r1, #1 - bl ov5_021D3DE4 - add r4, r0, #0 - bl ov5_021D3E9C - add r0, r4, #0 - mov r1, #1 - bl ov5_021D3E40 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02247F5C - - thumb_func_start ov6_02247FBC -ov6_02247FBC: ; 0x02247FBC - ldr r3, _02247FC8 ; =sub_02050944 - ldr r0, [r0, #0x10] - ldr r1, _02247FCC ; =ov6_02247FD0 - mov r2, #0 - bx r3 - nop -_02247FC8: .word sub_02050944 -_02247FCC: .word ov6_02247FD0 - thumb_func_end ov6_02247FBC - - thumb_func_start ov6_02247FD0 -ov6_02247FD0: ; 0x02247FD0 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r4, #0 - bl sub_02050A68 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _02247FF2 - cmp r0, #1 - beq _02248018 - cmp r0, #2 - beq _02248032 - b _0224804A -_02247FF2: - mov r0, #0x1f - ldr r2, [r5, #0x50] - lsl r0, r0, #4 - mov r1, #0 - bl ov5_021D3DE4 - add r5, r0, #0 - bl ov5_021D3E4C - cmp r0, #0 - beq _0224804A - add r0, r5, #0 - mov r1, #1 - bl ov5_021D3E40 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224804A -_02248018: - mov r0, #0x1f - ldr r2, [r5, #0x50] - lsl r0, r0, #4 - mov r1, #1 - bl ov5_021D3DE4 - mov r1, #0 - bl ov5_021D3E40 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224804A -_02248032: - mov r0, #0x1f - ldr r2, [r5, #0x50] - lsl r0, r0, #4 - mov r1, #1 - bl ov5_021D3DE4 - bl ov5_021D3F70 - cmp r0, #0 - beq _0224804A - mov r0, #1 - pop {r3, r4, r5, pc} -_0224804A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_02247FD0 - - thumb_func_start ov6_02248050 -ov6_02248050: ; 0x02248050 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r2, #0 - bl sub_0206251C - add r6, r0, #0 - add r1, sp, #0 - bl sub_02063050 - add r0, r6, #0 - bl sub_02063020 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02063040 - add r4, r0, #0 - add r0, r6, #0 - bl sub_0206298C - cmp r0, #3 - bhi _022480A0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02248088: ; jump table - .short _02248090 - _02248088 - 2 ; case 0 - .short _02248094 - _02248088 - 2 ; case 1 - .short _02248098 - _02248088 - 2 ; case 2 - .short _0224809C - _02248088 - 2 ; case 3 -_02248090: - sub r4, r4, #1 - b _022480A4 -_02248094: - add r4, r4, #1 - b _022480A4 -_02248098: - sub r5, r5, #1 - b _022480A4 -_0224809C: - add r5, r5, #1 - b _022480A4 -_022480A0: - bl sub_02022974 -_022480A4: - mov r3, #2 - lsl r1, r5, #0x10 - lsl r3, r3, #0xe - ldr r2, [sp, #4] - lsl r4, r4, #0x10 - add r1, r1, r3 - add r0, r7, #0 - add r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02248050 - - thumb_func_start ov6_022480BC -ov6_022480BC: ; 0x022480BC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r1, #0 - add r6, r0, #0 - add r1, sp, #0 - bl sub_0205EAEC - add r0, r6, #0 - bl sub_0205EABC - add r5, r0, #0 - add r0, r6, #0 - bl sub_0205EAC8 - add r4, r0, #0 - add r0, r6, #0 - bl sub_0205EA78 - cmp r0, #3 - bhi _02248108 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022480F0: ; jump table - .short _022480F8 - _022480F0 - 2 ; case 0 - .short _022480FC - _022480F0 - 2 ; case 1 - .short _02248100 - _022480F0 - 2 ; case 2 - .short _02248104 - _022480F0 - 2 ; case 3 -_022480F8: - sub r4, r4, #1 - b _0224810C -_022480FC: - add r4, r4, #1 - b _0224810C -_02248100: - sub r5, r5, #1 - b _0224810C -_02248104: - add r5, r5, #1 - b _0224810C -_02248108: - bl sub_02022974 -_0224810C: - mov r3, #2 - lsl r1, r5, #0x10 - lsl r3, r3, #0xe - ldr r2, [sp, #4] - lsl r4, r4, #0x10 - add r1, r1, r3 - add r0, r7, #0 - add r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_022480BC - - thumb_func_start ov6_02248124 -ov6_02248124: ; 0x02248124 - push {r3, r4, lr} - sub sp, #0xc - add r4, r1, #0 - add r1, sp, #0 - bl sub_0205EAEC - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov6_02248124 - - thumb_func_start ov6_02248140 -ov6_02248140: ; 0x02248140 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r1, [sp, #8] - add r4, r2, #0 - add r6, r0, #0 - mov r1, #0 - mov r2, #0xdc - str r3, [sp, #0xc] - ldr r7, [sp, #0x2c] - bl sub_020D5124 - add r0, r6, #0 - ldr r1, [sp, #8] - add r0, #0x78 - add r2, r4, #0 - mov r3, #4 - bl sub_020170D8 - add r1, r6, #0 - add r0, r6, #0 - add r1, #0x78 - bl sub_02017258 - add r0, r6, #0 - ldr r1, [sp, #0x28] - add r0, #0xd8 - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - bls _022481B8 - add r0, r6, #0 - add r5, r6, #0 - str r0, [sp, #0x10] - add r0, #0x78 - add r5, #0x88 - str r0, [sp, #0x10] -_0224818E: - ldr r3, [sp, #0xc] - mov r0, #4 - str r0, [sp] - ldr r1, [sp, #0x10] - ldr r2, [sp, #8] - add r0, r5, #0 - add r3, r3, r4 - str r7, [sp, #4] - bl sub_02017164 - add r0, r6, #0 - add r1, r5, #0 - bl sub_0201727C - add r0, r6, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, #0x14 - cmp r4, r0 - blo _0224818E -_022481B8: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov6_02248140 - - thumb_func_start ov6_022481BC -ov6_022481BC: ; 0x022481BC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r0, #0x78 - add r7, r1, #0 - bl sub_02017110 - add r0, r6, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - bls _022481EE - add r5, r6, #0 - add r5, #0x88 -_022481D8: - add r0, r5, #0 - add r1, r7, #0 - bl sub_020171A0 - add r0, r6, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, #0x14 - cmp r4, r0 - blo _022481D8 -_022481EE: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022481BC - - thumb_func_start ov6_022481F0 -ov6_022481F0: ; 0x022481F0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r6, #1 - mov r4, #0 - cmp r0, #0 - bls _0224821E - add r5, r7, #0 - add r5, #0x88 -_02248204: - mov r1, #1 - add r0, r5, #0 - lsl r1, r1, #0xc - bl sub_02017204 - and r6, r0 - add r0, r7, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, #0x14 - cmp r4, r0 - blo _02248204 -_0224821E: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_022481F0 - - thumb_func_start ov6_02248224 -ov6_02248224: ; 0x02248224 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r4, #0 - cmp r0, #0 - bls _02248250 - add r5, r6, #0 - mov r7, #1 - add r5, #0x88 - lsl r7, r7, #0xc -_0224823A: - add r0, r5, #0 - add r1, r7, #0 - bl sub_020171CC - add r0, r6, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r4, r4, #1 - add r5, #0x14 - cmp r4, r0 - blo _0224823A -_02248250: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov6_02248224 - - thumb_func_start ov6_02248254 -ov6_02248254: ; 0x02248254 - ldr r3, _02248258 ; =sub_02017294 - bx r3 - ; .align 2, 0 -_02248258: .word sub_02017294 - thumb_func_end ov6_02248254 - - thumb_func_start ov6_0224825C -ov6_0224825C: ; 0x0224825C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r1, #0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf0 - bl sub_020D5124 - add r0, r4, #0 - add r0, #0xdc - mov r1, #4 - mov r2, #0x20 - bl sub_020182CC - mov r0, #0x8d - mov r1, #4 - bl sub_02006C24 - add r6, r0, #0 - mov r2, #3 - add r0, r4, #0 - str r2, [sp] - add r0, #0xdc - str r0, [sp, #4] - add r0, r4, #0 - add r1, r6, #0 - mov r3, #0 - bl ov6_02248140 - add r0, r6, #0 - bl sub_02006CA8 - ldr r0, [r5, #0x3c] - add r1, r4, #0 - bl ov6_022480BC - ldr r0, _022482B8 ; =0x0000064B - bl sub_02005748 - mov r0, #0 - add r4, #0xec - str r0, [r4, #0] - add sp, #8 - pop {r4, r5, r6, pc} - nop -_022482B8: .word 0x0000064B - thumb_func_end ov6_0224825C - - thumb_func_start ov6_022482BC -ov6_022482BC: ; 0x022482BC - ldr r3, _022482C8 ; =ov6_022481BC - add r0, r2, #0 - add r2, #0xdc - add r1, r2, #0 - bx r3 - nop -_022482C8: .word ov6_022481BC - thumb_func_end ov6_022482BC - - thumb_func_start ov6_022482CC -ov6_022482CC: ; 0x022482CC - push {r4, lr} - add r4, r2, #0 - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #0 - beq _022482DE - cmp r0, #1 - pop {r4, pc} -_022482DE: - add r0, r4, #0 - bl ov6_022481F0 - cmp r0, #1 - bne _022482FC - add r0, r4, #0 - mov r1, #0 - bl sub_02017348 - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - add r4, #0xec - add r0, r0, #1 - str r0, [r4, #0] -_022482FC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_022482CC - - thumb_func_start ov6_02248300 -ov6_02248300: ; 0x02248300 - ldr r3, _02248308 ; =ov6_02248254 - add r0, r2, #0 - bx r3 - nop -_02248308: .word ov6_02248254 - thumb_func_end ov6_02248300 - - thumb_func_start ov6_0224830C -ov6_0224830C: ; 0x0224830C - ldr r0, [r0, #4] - ldr r3, _02248318 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _0224831C ; =0x02249804 - bx r3 - nop -_02248318: .word ov5_021D1B6C -_0224831C: .word 0x02249804 - thumb_func_end ov6_0224830C - - thumb_func_start ov6_02248320 -ov6_02248320: ; 0x02248320 - ldr r3, _02248324 ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_02248324: .word ov5_021D1BEC - thumb_func_end ov6_02248320 - - thumb_func_start ov6_02248328 -ov6_02248328: ; 0x02248328 - push {r3, lr} - bl ov5_021D1C2C - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #1 - bne _0224833A - mov r0, #1 - pop {r3, pc} -_0224833A: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02248328 - - thumb_func_start ov6_02248340 -ov6_02248340: ; 0x02248340 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r1, #0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf0 - bl sub_020D5124 - add r0, r4, #0 - add r0, #0xdc - mov r1, #4 - mov r2, #0x20 - bl sub_020182CC - mov r0, #0x8d - mov r1, #4 - bl sub_02006C24 - add r6, r0, #0 - mov r3, #4 - add r0, r4, #0 - str r3, [sp] - add r0, #0xdc - str r0, [sp, #4] - add r0, r4, #0 - add r1, r6, #0 - mov r2, #8 - bl ov6_02248140 - add r0, r6, #0 - bl sub_02006CA8 - ldr r0, [r5, #0x3c] - add r1, r4, #0 - bl ov6_022480BC - ldr r0, _0224839C ; =0x0000064A - bl sub_02005748 - mov r0, #0 - add r4, #0xec - str r0, [r4, #0] - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0224839C: .word 0x0000064A - thumb_func_end ov6_02248340 - - thumb_func_start ov6_022483A0 -ov6_022483A0: ; 0x022483A0 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r1, #0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf0 - bl sub_020D5124 - add r0, r4, #0 - add r0, #0xdc - mov r1, #4 - mov r2, #0x20 - bl sub_020182CC - mov r0, #0x8d - mov r1, #4 - bl sub_02006C24 - add r6, r0, #0 - mov r3, #4 - add r0, r4, #0 - str r3, [sp] - add r0, #0xdc - str r0, [sp, #4] - add r0, r4, #0 - add r1, r6, #0 - mov r2, #8 - bl ov6_02248140 - ldr r0, [r5, #0x38] - mov r1, #0 - add r2, r4, #0 - bl ov6_02248050 - ldr r0, _022483FC ; =0x0000064A - bl sub_02005748 - add r0, r6, #0 - bl sub_02006CA8 - mov r0, #0 - add r4, #0xec - str r0, [r4, #0] - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022483FC: .word 0x0000064A - thumb_func_end ov6_022483A0 - - thumb_func_start ov6_02248400 -ov6_02248400: ; 0x02248400 - ldr r3, _0224840C ; =ov6_022481BC - add r0, r2, #0 - add r2, #0xdc - add r1, r2, #0 - bx r3 - nop -_0224840C: .word ov6_022481BC - thumb_func_end ov6_02248400 - - thumb_func_start ov6_02248410 -ov6_02248410: ; 0x02248410 - push {r4, lr} - add r4, r2, #0 - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #0 - beq _02248422 - cmp r0, #1 - pop {r4, pc} -_02248422: - add r0, r4, #0 - bl ov6_022481F0 - cmp r0, #1 - bne _02248440 - add r0, r4, #0 - mov r1, #0 - bl sub_02017348 - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - add r4, #0xec - add r0, r0, #1 - str r0, [r4, #0] -_02248440: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02248410 - - thumb_func_start ov6_02248444 -ov6_02248444: ; 0x02248444 - ldr r3, _0224844C ; =ov6_02248254 - add r0, r2, #0 - bx r3 - nop -_0224844C: .word ov6_02248254 - thumb_func_end ov6_02248444 - - thumb_func_start ov6_02248450 -ov6_02248450: ; 0x02248450 - ldr r0, [r0, #4] - ldr r3, _0224845C ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _02248460 ; =0x022497EC - bx r3 - nop -_0224845C: .word ov5_021D1B6C -_02248460: .word 0x022497EC - thumb_func_end ov6_02248450 - - thumb_func_start ov6_02248464 -ov6_02248464: ; 0x02248464 - ldr r0, [r0, #4] - ldr r3, _02248470 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _02248474 ; =0x022497D4 - bx r3 - nop -_02248470: .word ov5_021D1B6C -_02248474: .word 0x022497D4 - thumb_func_end ov6_02248464 - - thumb_func_start ov6_02248478 -ov6_02248478: ; 0x02248478 - ldr r3, _0224847C ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_0224847C: .word ov5_021D1BEC - thumb_func_end ov6_02248478 - - thumb_func_start ov6_02248480 -ov6_02248480: ; 0x02248480 - push {r3, lr} - bl ov5_021D1C2C - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #1 - bne _02248492 - mov r0, #1 - pop {r3, pc} -_02248492: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov6_02248480 - - thumb_func_start ov6_02248498 -ov6_02248498: ; 0x02248498 - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r2, #0 - mov r2, #0x73 - add r5, r1, #0 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - mov r0, #0x6e - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #4 - mov r2, #0x20 - bl sub_020182CC - mov r0, #0x8d - mov r1, #4 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x6e - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r1, r6, #0 - mov r2, #0xe - mov r3, #0xc - bl ov6_02248140 - ldr r0, [r5, #0x3c] - add r1, r4, #0 - bl ov6_02248124 - add r0, r6, #0 - bl sub_02006CA8 - ldr r0, _022484FC ; =0x0000064D - bl sub_02005748 - mov r0, #0x72 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022484FC: .word 0x0000064D - thumb_func_end ov6_02248498 - - thumb_func_start ov6_02248500 -ov6_02248500: ; 0x02248500 - push {r4, r5, r6, lr} - mov r0, #0x6e - add r5, r2, #0 - lsl r0, r0, #2 - mov r4, #0 - add r6, r5, r0 -_0224850C: - add r0, r5, #0 - add r1, r6, #0 - bl ov6_022481BC - add r4, r4, #1 - add r5, #0xdc - cmp r4, #2 - blt _0224850C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02248500 - - thumb_func_start ov6_02248520 -ov6_02248520: ; 0x02248520 - push {r4, r5, r6, lr} - sub sp, #8 - mov r0, #0x72 - add r4, r2, #0 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r5, r1, #0 - cmp r0, #0 - beq _0224853E - cmp r0, #1 - beq _02248586 - cmp r0, #2 - beq _022485C4 - add sp, #8 - pop {r4, r5, r6, pc} -_0224853E: - mov r0, #0x8d - mov r1, #4 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0x6e - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xdc - add r1, r6, #0 - mov r2, #0xb - mov r3, #9 - bl ov6_02248140 - add r0, r6, #0 - bl sub_02006CA8 - add r1, r4, #0 - ldr r0, [r5, #0x3c] - add r1, #0xdc - bl ov6_02248124 - add r0, r4, #0 - add r0, #0xdc - mov r1, #0 - bl sub_02017348 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_02248586: - add r0, r4, #0 - bl ov6_022481F0 - add r6, r0, #0 - ldr r0, [r5, #0x3c] - add r1, r4, #0 - bl ov6_02248124 - cmp r6, #1 - bne _022485D6 - add r0, r4, #0 - add r0, #0xdc - mov r1, #1 - bl sub_02017348 - add r0, r4, #0 - mov r1, #0 - bl sub_02017348 - add r1, r4, #0 - ldr r0, [r5, #0x3c] - add r1, #0xdc - bl ov6_02248124 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add sp, #8 - add r1, r1, #1 - str r1, [r4, r0] - pop {r4, r5, r6, pc} -_022485C4: - add r0, r4, #0 - add r0, #0xdc - bl ov6_02248224 - add r4, #0xdc - ldr r0, [r5, #0x3c] - add r1, r4, #0 - bl ov6_02248124 -_022485D6: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02248520 - - thumb_func_start ov6_022485DC -ov6_022485DC: ; 0x022485DC - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r4, #0 -_022485E2: - add r0, r5, #0 - bl ov6_02248254 - add r4, r4, #1 - add r5, #0xdc - cmp r4, #2 - blt _022485E2 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov6_022485DC - - thumb_func_start ov6_022485F4 -ov6_022485F4: ; 0x022485F4 - ldr r0, [r0, #4] - ldr r3, _02248600 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _02248604 ; =0x022497BC - bx r3 - nop -_02248600: .word ov5_021D1B6C -_02248604: .word 0x022497BC - thumb_func_end ov6_022485F4 - - thumb_func_start ov6_02248608 -ov6_02248608: ; 0x02248608 - ldr r3, _0224860C ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_0224860C: .word ov5_021D1BEC - thumb_func_end ov6_02248608 - - thumb_func_start ov6_02248610 -ov6_02248610: ; 0x02248610 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - add r6, r1, #0 - add r4, r2, #0 - add r5, r3, #0 - cmp r0, #0 - beq _02248628 - bl sub_02022974 -_02248628: - add r0, r6, #0 - add r1, sp, #0 - bl sub_0205EAEC - ldr r2, [sp, #4] - ldr r3, [sp, #8] - ldr r1, [sp] - add r0, r7, #0 - add r2, r2, r4 - add r3, r3, r5 - bl sub_02017350 - add r0, r7, #0 - mov r4, #0 - add r5, r7, #0 - mov r1, #1 - add r0, #0xc8 - str r1, [r0, #0] - add r5, #0x78 - add r6, r4, #0 -_02248650: - add r0, r5, #0 - add r1, r6, #0 - bl sub_02017240 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #4 - blt _02248650 - add r0, r7, #0 - mov r1, #1 - bl sub_02017348 - ldr r0, _02248674 ; =0x00000627 - bl sub_02005748 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02248674: .word 0x00000627 - thumb_func_end ov6_02248610 - - thumb_func_start ov6_02248678 -ov6_02248678: ; 0x02248678 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r0, #0xc8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022486B2 - ldr r5, [sp] - mov r4, #1 - mov r6, #0 - add r5, #0x78 - lsl r7, r4, #0xc -_0224868E: - add r0, r5, #0 - add r1, r7, #0 - bl sub_02017204 - add r6, r6, #1 - and r4, r0 - add r5, #0x14 - cmp r6, #4 - blt _0224868E - cmp r4, #1 - bne _022486B2 - ldr r0, [sp] - mov r1, #0 - add r0, #0xc8 - str r1, [r0, #0] - ldr r0, [sp] - bl sub_02017348 -_022486B2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02248678 - - thumb_func_start ov6_022486B4 -ov6_022486B4: ; 0x022486B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r1, [sp] - str r2, [sp, #4] - mov r1, #0 - mov r2, #0xcc - add r7, r0, #0 - add r5, r3, #0 - bl sub_020D5124 - ldr r1, [sp] - add r0, r7, #0 - bl sub_02017258 - add r4, r7, #0 - mov r6, #0 - add r4, #0x78 -_022486D6: - ldr r1, [sp] - ldr r2, [r5, #0] - ldr r3, [sp, #4] - add r0, r4, #0 - bl sub_02017190 - add r0, r7, #0 - add r1, r4, #0 - bl sub_0201727C - add r6, r6, #1 - add r5, r5, #4 - add r4, #0x14 - cmp r6, #4 - blt _022486D6 - add r0, r7, #0 - mov r1, #0 - bl sub_02017348 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_022486B4 - - thumb_func_start ov6_02248700 -ov6_02248700: ; 0x02248700 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r7, #0 - add r6, r1, #0 - mov r4, #0 - add r5, #0x78 -_0224870C: - add r0, r5, #0 - add r1, r6, #0 - bl sub_020171A0 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #4 - blt _0224870C - add r0, r7, #0 - mov r1, #0 - mov r2, #0xcc - bl sub_020D5124 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02248700 - - thumb_func_start ov6_02248728 -ov6_02248728: ; 0x02248728 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0xce - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0 - ldr r0, [r0, #0x3c] - bl sub_0205EAEC - mov r1, #0xcf - lsl r1, r1, #4 - ldr r2, [sp] - ldr r0, [r4, r1] - sub r0, r2, r0 - bne _02248770 - add r0, r1, #4 - ldr r2, [sp, #4] - ldr r0, [r4, r0] - cmp r2, r0 - bge _02248770 - add r0, r1, #0 - add r0, #8 - ldr r2, [sp, #8] - ldr r0, [r4, r0] - cmp r2, r0 - ble _02248770 - add r0, r1, #0 - mov r2, #0 - sub r0, #8 - str r2, [r4, r0] - mov r2, #2 - lsl r2, r2, #0x10 - sub r0, r1, #4 - str r2, [r4, r0] - b _0224877E -_02248770: - mov r1, #2 - ldr r0, _02248794 ; =0x00000CE8 - lsl r1, r1, #0x10 - str r1, [r4, r0] - lsr r1, r1, #1 - add r0, r0, #4 - str r1, [r4, r0] -_0224877E: - mov r0, #0xcf - lsl r0, r0, #4 - add r3, sp, #0 - add r2, r4, r0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add sp, #0xc - pop {r3, r4, pc} - nop -_02248794: .word 0x00000CE8 - thumb_func_end ov6_02248728 - - thumb_func_start ov6_02248798 -ov6_02248798: ; 0x02248798 - push {r4, lr} - add r4, r0, #0 - bl ov6_02248728 - mov r2, #0 - add r1, r4, #0 -_022487A4: - add r0, r1, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _022487D0 - add r1, r4, #0 - mov r0, #0xcc - mov r3, #0xce - add r1, #0x10 - mul r0, r2 - lsl r3, r3, #4 - add r0, r1, r0 - ldr r1, [r4, r3] - add r2, r3, #0 - add r2, #8 - add r3, #0xc - ldr r1, [r1, #0x3c] - ldr r2, [r4, r2] - ldr r3, [r4, r3] - bl ov6_02248610 - pop {r4, pc} -_022487D0: - add r2, r2, #1 - add r1, #0xcc - cmp r2, #0x10 - blt _022487A4 - bl sub_02022974 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov6_02248798 - - thumb_func_start ov6_022487E0 -ov6_022487E0: ; 0x022487E0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x10 -_022487E8: - add r0, r5, #0 - bl ov6_02248678 - add r4, r4, #1 - add r5, #0xcc - cmp r4, #0x10 - blt _022487E8 - pop {r3, r4, r5, pc} - thumb_func_end ov6_022487E0 - - thumb_func_start ov6_022487F8 -ov6_022487F8: ; 0x022487F8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r2, #0 - mov r2, #0xd1 - str r1, [sp, #4] - add r0, r5, #0 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - ldr r0, _02248894 ; =0x00000CFC - mov r1, #4 - add r0, r5, r0 - mov r2, #0x20 - bl sub_020182CC - mov r0, #0x8d - mov r1, #4 - bl sub_02006C24 - add r7, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - mov r2, #8 - mov r3, #4 - bl sub_020170D8 - mov r4, #0 - add r6, r5, #0 -_02248832: - mov r0, #0 - str r0, [sp] - add r0, r7, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #4 - bl sub_0200723C - mov r1, #0xcd - lsl r1, r1, #4 - str r0, [r6, r1] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #4 - blt _02248832 - add r4, r5, #0 - mov r6, #0 - add r4, #0x10 -_02248856: - ldr r2, _02248894 ; =0x00000CFC - mov r3, #0xcd - lsl r3, r3, #4 - add r0, r4, #0 - add r1, r5, #0 - add r2, r5, r2 - add r3, r5, r3 - bl ov6_022486B4 - add r6, r6, #1 - add r4, #0xcc - cmp r6, #0x10 - blt _02248856 - mov r1, #0xce - ldr r0, [sp, #4] - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r5, r1] - add r1, #0x10 - ldr r0, [r0, #0x3c] - add r1, r5, r1 - bl sub_0205EAEC - ldr r0, _02248898 ; =0x00000D0C - mov r1, #0 - str r1, [r5, r0] - add r0, r7, #0 - bl sub_02006CA8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248894: .word 0x00000CFC -_02248898: .word 0x00000D0C - thumb_func_end ov6_022487F8 - - thumb_func_start ov6_0224889C -ov6_0224889C: ; 0x0224889C - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - add r4, r5, #0 - ldr r7, _022488D4 ; =0x00000CFC - mov r6, #0 - add r4, #0x10 -_022488A8: - add r0, r4, #0 - add r1, r5, r7 - bl ov6_02248700 - add r6, r6, #1 - add r4, #0xcc - cmp r6, #0x10 - blt _022488A8 - add r0, r5, #0 - bl sub_02017110 - mov r6, #0xcd - mov r4, #0 - lsl r6, r6, #4 -_022488C4: - ldr r0, [r5, r6] - bl sub_020181C4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022488C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022488D4: .word 0x00000CFC - thumb_func_end ov6_0224889C - - thumb_func_start ov6_022488D8 -ov6_022488D8: ; 0x022488D8 - push {r4, lr} - ldr r1, _02248910 ; =0x00000D0C - add r4, r2, #0 - ldr r0, [r4, r1] - cmp r0, #0 - bne _0224890E - add r0, r1, #0 - sub r0, #0x28 - ldr r0, [r4, r0] - sub r2, r0, #1 - add r0, r1, #0 - sub r0, #0x28 - str r2, [r4, r0] - add r0, r1, #0 - sub r0, #0x28 - ldr r0, [r4, r0] - cmp r0, #0 - bge _02248908 - mov r0, #4 - sub r1, #0x28 - str r0, [r4, r1] - add r0, r4, #0 - bl ov6_02248798 -_02248908: - add r0, r4, #0 - bl ov6_022487E0 -_0224890E: - pop {r4, pc} - ; .align 2, 0 -_02248910: .word 0x00000D0C - thumb_func_end ov6_022488D8 - - thumb_func_start ov6_02248914 -ov6_02248914: ; 0x02248914 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r4, #0 - add r5, #0x10 -_0224891C: - add r0, r5, #0 - bl sub_02017294 - add r4, r4, #1 - add r5, #0xcc - cmp r4, #0x10 - blt _0224891C - pop {r3, r4, r5, pc} - thumb_func_end ov6_02248914 - - thumb_func_start ov6_0224892C -ov6_0224892C: ; 0x0224892C - ldr r0, [r0, #4] - ldr r3, _02248938 ; =ov5_021D1B6C - ldr r0, [r0, #4] - ldr r1, _0224893C ; =0x0224981C - bx r3 - nop -_02248938: .word ov5_021D1B6C -_0224893C: .word 0x0224981C - thumb_func_end ov6_0224892C - - thumb_func_start ov6_02248940 -ov6_02248940: ; 0x02248940 - ldr r3, _02248944 ; =ov5_021D1BEC - bx r3 - ; .align 2, 0 -_02248944: .word ov5_021D1BEC - thumb_func_end ov6_02248940 - - thumb_func_start ov6_02248948 -ov6_02248948: ; 0x02248948 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _0224895A - cmp r0, #1 - beq _02248972 - pop {r3, r4, r5, pc} -_0224895A: - ldr r1, [r4, #0xc] - ldr r0, [r4, #0] - lsl r2, r1, #2 - ldr r1, _02248994 ; =0x0224984C - ldr r1, [r1, r2] - blx r1 - cmp r0, #1 - bne _02248990 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_02248972: - ldr r1, [r4, #0xc] - ldr r0, [r4, #0] - lsl r2, r1, #2 - ldr r1, _02248998 ; =0x02249834 - ldr r1, [r1, r2] - blx r1 - ldr r0, [r4, #4] - mov r1, #1 - strh r1, [r0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02248990: - pop {r3, r4, r5, pc} - nop -_02248994: .word 0x0224984C -_02248998: .word 0x02249834 - thumb_func_end ov6_02248948 - - thumb_func_start ov6_0224899C -ov6_0224899C: ; 0x0224899C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - add r0, r3, #0 - mov r1, #0x10 - add r4, r2, #0 - bl sub_02018144 - add r6, r0, #0 - add r2, r6, #0 - mov r1, #0x10 - mov r0, #0 -_022489B4: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _022489B4 - ldr r1, _022489DC ; =0x02249840 - lsl r2, r4, #2 - ldr r1, [r1, r2] - add r0, r7, #0 - blx r1 - str r0, [r6, #0] - str r5, [r6, #4] - ldr r0, _022489E0 ; =ov6_02248948 - str r4, [r6, #0xc] - mov r2, #0 - add r1, r6, #0 - strh r2, [r5] - bl sub_0200D9E8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022489DC: .word 0x02249840 -_022489E0: .word ov6_02248948 - thumb_func_end ov6_0224899C - - thumb_func_start ov6_022489E4 -ov6_022489E4: ; 0x022489E4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r1, #0 - mov r1, #0x61 - add r6, r0, #0 - add r4, r3, #0 - lsl r1, r1, #2 - add r0, r2, #0 - add r2, r4, r1 - lsl r1, r6, #8 - add r1, r2, r1 - add r2, r5, #0 - bl sub_020C4DB0 - ldr r2, _02248A5C ; =0x00000584 - ldrb r0, [r4, r2] - add r0, r0, #1 - strb r0, [r4, r2] - ldr r0, _02248A60 ; =0x00000127 - ldrb r2, [r4, r2] - ldrb r1, [r4, r0] - cmp r2, r1 - blo _02248A56 - mov r3, #0 - cmp r1, #0 - ble _02248A32 - add r0, #0x5d - add r5, r4, r0 - mov r0, #1 - lsl r0, r0, #8 - add r2, r0, #0 - add r6, sp, #4 - add r2, #0x27 -_02248A26: - stmia r6!, {r5} - ldrb r1, [r4, r2] - add r3, r3, #1 - add r5, r5, r0 - cmp r3, r1 - blt _02248A26 -_02248A32: - add r0, sp, #4 - add r2, sp, #0 - bl ov6_02248A94 - mov r1, #0x47 - lsl r1, r1, #2 - strb r0, [r4, r1] - add r0, sp, #0 - ldrb r2, [r0] - add r0, r1, #1 - strb r2, [r4, r0] - ldrb r0, [r4, r1] - lsl r2, r0, #2 - add r0, sp, #4 - ldr r0, [r0, r2] - ldrb r2, [r0, #2] - add r0, r1, #6 - strb r2, [r4, r0] -_02248A56: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_02248A5C: .word 0x00000584 -_02248A60: .word 0x00000127 - thumb_func_end ov6_022489E4 - - thumb_func_start ov6_02248A64 -ov6_02248A64: ; 0x02248A64 - push {r3, lr} - ldr r1, _02248A90 ; =0x00000125 - add r3, sp, #0 - ldrb r2, [r0, r1] - strb r2, [r3] - sub r2, r1, #2 - ldrb r2, [r0, r2] - sub r1, r1, #3 - strb r2, [r3, #1] - ldrb r0, [r0, r1] - add r1, sp, #0 - mov r2, #4 - strb r0, [r3, #2] - mov r0, #0x1a - bl sub_020359DC - cmp r0, #1 - bne _02248A8C - mov r0, #1 - pop {r3, pc} -_02248A8C: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02248A90: .word 0x00000125 - thumb_func_end ov6_02248A64 - - thumb_func_start ov6_02248A94 -ov6_02248A94: ; 0x02248A94 - push {r4, r5, r6, r7} - mov r5, #0 - add r4, r5, #0 - cmp r1, #0 - ble _02248AB8 - add r6, r0, #0 -_02248AA0: - lsl r3, r5, #2 - ldr r3, [r0, r3] - ldr r7, [r6, #0] - ldrb r3, [r3] - ldrb r7, [r7] - cmp r3, r7 - bhs _02248AB0 - add r5, r4, #0 -_02248AB0: - add r4, r4, #1 - add r6, r6, #4 - cmp r4, r1 - blt _02248AA0 -_02248AB8: - lsl r1, r5, #2 - ldr r0, [r0, r1] - ldrb r0, [r0] - strb r0, [r2] - add r0, r5, #0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov6_02248A94 - - thumb_func_start ov6_02248AC8 -ov6_02248AC8: ; 0x02248AC8 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - bl sub_02073C70 - add r2, r0, #0 - ldrb r1, [r5, r2] - add r0, r5, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - bl sub_020C4DB0 - ldr r0, _02248AEC ; =0x00000584 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} - nop -_02248AEC: .word 0x00000584 - thumb_func_end ov6_02248AC8 - - thumb_func_start ov6_02248AF0 -ov6_02248AF0: ; 0x02248AF0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r2, #0 - bl sub_02073C70 - add r4, r0, #0 - mov r0, #0x14 - add r1, r4, #1 - bl sub_02018144 - add r5, r0, #0 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - bl sub_020C4DB0 - mov r0, #0x1b - add r1, r5, #0 - add r2, r4, #1 - strb r6, [r5, r4] - bl sub_020359DC - cmp r0, #1 - bne _02248B24 - mov r4, #1 - b _02248B26 -_02248B24: - mov r4, #0 -_02248B26: - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov6_02248AF0 - - thumb_func_start ov6_02248B30 -ov6_02248B30: ; 0x02248B30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r2, [sp] - str r3, [sp, #4] - bl sub_02073C70 - mov r7, #0 - ldr r4, [sp, #4] - add r6, r0, #0 - add r5, r7, #0 -_02248B44: - ldr r0, [sp] - ldr r1, [r4, #0] - add r0, r0, r5 - add r2, r6, #0 - bl sub_020C4DB0 - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, r6 - cmp r7, #4 - blt _02248B44 - ldr r1, _02248B6C ; =0x00000584 - ldr r0, [sp, #4] - ldrb r0, [r0, r1] - add r2, r0, #1 - ldr r0, [sp, #4] - strb r2, [r0, r1] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248B6C: .word 0x00000584 - thumb_func_end ov6_02248B30 - - thumb_func_start ov6_02248B70 -ov6_02248B70: ; 0x02248B70 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - add r5, r1, #0 - bl sub_02073C70 - add r6, r0, #0 - lsl r0, r6, #2 - str r0, [sp] - ldr r0, _02248BBC ; =0x00000585 - mov r7, #0 - add r0, r4, r0 - str r0, [sp, #4] - add r4, r7, #0 -_02248B8C: - ldr r1, [sp, #4] - ldr r0, [r5, #0] - add r1, r1, r4 - add r2, r6, #0 - bl sub_020C4DB0 - add r7, r7, #1 - add r4, r4, r6 - add r5, r5, #4 - cmp r7, #4 - blt _02248B8C - ldr r1, [sp, #4] - ldr r2, [sp] - mov r0, #0x1c - bl sub_0203597C - cmp r0, #1 - bne _02248BB6 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02248BB6: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248BBC: .word 0x00000585 - thumb_func_end ov6_02248B70 - - thumb_func_start ov6_02248BC0 -ov6_02248BC0: ; 0x02248BC0 - push {r3, r4, r5, lr} - add r0, r2, #0 - add r2, #0x30 - ldrb r1, [r2] - add r4, r3, #0 - add r5, r4, #0 - mov r2, #0x30 - add r3, r1, #0 - add r5, #0x10 - mul r3, r2 - add r1, r5, r3 - bl sub_020C4DB0 - ldr r0, _02248BE4 ; =0x00000584 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02248BE4: .word 0x00000584 - thumb_func_end ov6_02248BC0 - - thumb_func_start ov6_02248BE8 -ov6_02248BE8: ; 0x02248BE8 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r0, #0x14 - mov r1, #0x31 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0x30 - bl sub_020C4DB0 - add r0, r4, #0 - add r0, #0x30 - strb r5, [r0] - mov r0, #0x1d - add r1, r4, #0 - mov r2, #0x31 - bl sub_020359DC - cmp r0, #1 - bne _02248C1A - mov r5, #1 - b _02248C1C -_02248C1A: - mov r5, #0 -_02248C1C: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02248BE8 - - thumb_func_start ov6_02248C28 -ov6_02248C28: ; 0x02248C28 - push {r3, r4, r5, r6, r7, lr} - add r5, r3, #0 - add r6, r2, #0 - str r3, [sp] - mov r4, #0 - add r5, #0xd0 - mov r7, #8 -_02248C36: - lsl r0, r4, #3 - add r0, r6, r0 - add r1, r5, #0 - add r2, r7, #0 - bl sub_020C4DB0 - add r4, r4, #1 - add r5, #8 - cmp r4, #3 - blt _02248C36 - ldrb r2, [r6, #0x18] - ldr r1, _02248C60 ; =0x0000011E - ldr r0, [sp] - strb r2, [r0, r1] - ldr r1, _02248C64 ; =0x00000584 - ldrb r0, [r0, r1] - add r2, r0, #1 - ldr r0, [sp] - strb r2, [r0, r1] - pop {r3, r4, r5, r6, r7, pc} - nop -_02248C60: .word 0x0000011E -_02248C64: .word 0x00000584 - thumb_func_end ov6_02248C28 - - thumb_func_start ov6_02248C68 -ov6_02248C68: ; 0x02248C68 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - mov r0, #0x14 - mov r1, #0x19 - add r5, r2, #0 - bl sub_02018144 - add r6, r0, #0 - mov r4, #0 - mov r7, #8 -_02248C7C: - lsl r1, r4, #3 - add r0, r5, #0 - add r1, r6, r1 - add r2, r7, #0 - bl sub_020C4DB0 - add r4, r4, #1 - add r5, #8 - cmp r4, #3 - blt _02248C7C - ldr r1, _02248CB8 ; =0x0000011E - ldr r0, [sp] - mov r2, #0x19 - ldrb r0, [r0, r1] - add r1, r6, #0 - strb r0, [r6, #0x18] - mov r0, #0x1e - bl sub_020359DC - cmp r0, #1 - bne _02248CAA - mov r4, #1 - b _02248CAC -_02248CAA: - mov r4, #0 -_02248CAC: - add r0, r6, #0 - bl sub_020181C4 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02248CB8: .word 0x0000011E - thumb_func_end ov6_02248C68 - - thumb_func_start ov6_02248CBC -ov6_02248CBC: ; 0x02248CBC - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - ldrb r0, [r5] - add r6, r3, #0 - add r4, r6, #0 - add r4, #0xe8 - lsl r7, r0, #2 - ldr r0, [r4, r7] - bl sub_020237E8 - ldr r0, [r4, r7] - add r1, r5, #4 - bl sub_02023D28 - ldr r0, _02248CE4 ; =0x00000584 - ldrb r1, [r6, r0] - add r1, r1, #1 - strb r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_02248CE4: .word 0x00000584 - thumb_func_end ov6_02248CBC - - thumb_func_start ov6_02248CE8 -ov6_02248CE8: ; 0x02248CE8 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r0, r2, #0 - add r1, sp, #0 - mov r2, #8 - bl sub_02023DF0 - mov r0, #0x14 - add r1, r0, #0 - bl sub_02018144 - add r4, r0, #0 - add r0, sp, #0 - add r1, r4, #4 - mov r2, #0x10 - bl sub_020C4DB0 - strb r5, [r4] - mov r0, #0x10 - strb r0, [r4, #1] - mov r0, #0 - strb r0, [r4, #2] - strb r0, [r4, #3] - mov r0, #0x1f - add r1, r4, #0 - mov r2, #0x14 - bl sub_020359DC - cmp r0, #1 - bne _02248D2A - mov r5, #1 - b _02248D2C -_02248D2A: - mov r5, #0 -_02248D2C: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov6_02248CE8 - - thumb_func_start ov6_02248D38 -ov6_02248D38: ; 0x02248D38 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - bl sub_0202CC64 - add r2, r0, #0 - ldrb r1, [r5, r2] - add r0, r5, #0 - lsl r1, r1, #2 - add r3, r4, r1 - mov r1, #0x57 - lsl r1, r1, #2 - ldr r1, [r3, r1] - bl sub_020C4DB0 - ldr r0, _02248D60 ; =0x00000584 - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02248D60: .word 0x00000584 - thumb_func_end ov6_02248D38 - - thumb_func_start ov6_02248D64 -ov6_02248D64: ; 0x02248D64 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - bl sub_0202CC64 - add r5, r0, #0 - ldr r0, _02248D9C ; =0x00000585 - add r4, r4, r0 - cmp r6, #0 - beq _02248D84 - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl sub_020C4DB0 -_02248D84: - mov r0, #0x24 - add r1, r4, #0 - add r2, r5, #1 - strb r7, [r4, r5] - bl sub_0203597C - cmp r0, #1 - bne _02248D98 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02248D98: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248D9C: .word 0x00000585 - thumb_func_end ov6_02248D64 - - thumb_func_start ov6_02248DA0 -ov6_02248DA0: ; 0x02248DA0 - push {r3, r4, r5, r6} - ldrb r1, [r2, #6] - ldrb r4, [r2] - mov r5, #0x42 - add r0, r3, r1 - lsl r5, r5, #2 - strb r4, [r0, r5] - ldrb r6, [r2, #1] - add r4, r5, #4 - strb r6, [r0, r4] - add r4, r5, #0 - ldrb r6, [r2, #2] - add r4, #8 - add r5, #0xc - strb r6, [r0, r4] - lsl r0, r1, #1 - ldrh r2, [r2, #4] - add r0, r3, r0 - strh r2, [r0, r5] - ldr r0, _02248DD4 ; =0x00000584 - ldrb r1, [r3, r0] - add r1, r1, #1 - strb r1, [r3, r0] - pop {r3, r4, r5, r6} - bx lr - nop -_02248DD4: .word 0x00000584 - thumb_func_end ov6_02248DA0 - - thumb_func_start ov6_02248DD8 -ov6_02248DD8: ; 0x02248DD8 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r0, #0x14 - mov r1, #7 - add r6, r2, #0 - bl sub_02018144 - add r4, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - mov r2, #6 - bl sub_020C4DB0 - mov r0, #0x25 - add r1, r4, #0 - mov r2, #7 - strb r5, [r4, #6] - bl sub_020359DC - cmp r0, #1 - bne _02248E06 - mov r5, #1 - b _02248E08 -_02248E06: - mov r5, #0 -_02248E08: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov6_02248DD8 - ; 0x02248E14 - - - .rodata - .incbin "incbin/overlay6_rodata.bin" - - .data - .incbin "incbin/overlay6_data.bin" - - .bss - .space 0x20 diff --git a/asm/overlay62.s b/asm/overlay62.s deleted file mode 100644 index f27c06f67..000000000 --- a/asm/overlay62.s +++ /dev/null @@ -1,49697 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov62_0222F2C0 -ov62_0222F2C0: ; 0x0222F2C0 - push {r3, r4, r5, lr} - sub sp, #0x28 - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _0222F500 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _0222F504 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #4 - mov r1, #0x66 - bl sub_0201DBEC - mov r0, #0xa2 - mov r1, #0x66 - bl sub_02006C24 - str r0, [r4, #0x14] - mov r0, #0x66 - bl sub_02018340 - str r0, [r4, #0x24] - mov r0, #0x66 - bl sub_02002F38 - str r0, [r4, #0x28] - mov r0, #4 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - mov r0, #0x66 - mov r2, #1 - add r3, r1, #0 - bl sub_02024220 - str r0, [r4, #0x60] - mov r0, #0x66 - bl sub_0200762C - str r0, [r4, #0x64] - bl sub_020A73C0 - ldr r0, [r4, #0x28] - mov r1, #1 - bl sub_02003858 - mov r2, #2 - ldr r0, [r4, #0x28] - mov r1, #0 - lsl r2, r2, #8 - mov r3, #0x66 - bl sub_02002F70 - mov r1, #1 - ldr r0, [r4, #0x28] - lsl r2, r1, #9 - mov r3, #0x66 - bl sub_02002F70 - mov r1, #2 - ldr r0, [r4, #0x28] - lsl r2, r1, #8 - mov r3, #0x66 - bl sub_02002F70 - mov r2, #2 - ldr r0, [r4, #0x28] - mov r1, #3 - lsl r2, r2, #8 - mov r3, #0x66 - bl sub_02002F70 - ldr r0, [r4, #0x24] - bl ov62_0222F670 - add r0, r4, #0 - bl ov62_0222F848 - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - mov r0, #1 - str r0, [r4, #0x44] - add r0, r4, #0 - bl ov62_0222FF40 - mov r0, #1 - bl sub_02002B20 - ldr r0, _0222F508 ; =ov62_0222F8E4 - add r1, r4, #0 - bl sub_02017798 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0222F406 - add r0, r4, #0 - bl ov62_02241130 - ldr r1, _0222F50C ; =0x00200010 - mov r0, #1 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - ldr r1, _0222F50C ; =0x00200010 - mov r0, #2 - bl sub_0200966C - mov r0, #2 - bl sub_02009704 - bl sub_02039734 - mov r0, #1 - mov r1, #0x66 - bl sub_020397C8 - mov r0, #0x66 - bl sub_020394A8 - add r1, sp, #0x10 - add r5, r0, #0 - bl sub_020A71B0 - mov r0, #0x20 - str r0, [sp] - ldr r1, [sp, #0x10] - ldr r0, [r4, #0x28] - ldr r1, [r1, #0xc] - mov r2, #2 - mov r3, #0xe0 - bl sub_02002FBC - mov r0, #0x20 - str r0, [sp] - ldr r1, [sp, #0x10] - ldr r0, [r4, #0x28] - ldr r1, [r1, #0xc] - mov r2, #3 - mov r3, #0xe0 - bl sub_02002FBC - add r0, r5, #0 - bl sub_020181C4 -_0222F406: - mov r0, #0xc - str r0, [sp, #0x14] - mov r0, #0x66 - str r0, [sp, #0x18] - ldr r0, [r4, #0] - mov r1, #1 - str r0, [sp, #0x20] - lsl r0, r1, #0x14 - str r0, [sp, #0x24] - ldr r0, [r4, #0x18] - mov r5, sp - str r0, [sp, #4] - ldr r0, [r4, #0x1c] - sub r5, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #0x28] - add r3, sp, #0x14 - str r1, [sp, #0x1c] - str r0, [sp, #0xc] - ldmia r3!, {r0, r1} - add r2, r5, #0 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldmia r5!, {r0, r1, r2, r3} - bl sub_0208B284 - mov r1, #0x6f - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r4, r1] - add r1, r4, #0 - add r1, #0x5c - ldrb r1, [r1] - bl sub_0208B878 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B8B0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #2 - str r0, [sp, #0x1c] - lsl r0, r0, #0x13 - str r0, [sp, #0x24] - ldr r0, [r4, #0x18] - mov r5, sp - str r0, [sp, #4] - ldr r0, [r4, #0x1c] - sub r5, #0x10 - str r0, [sp, #8] - ldr r0, [r4, #0x28] - add r3, sp, #0x14 - str r0, [sp, #0xc] - ldmia r3!, {r0, r1} - add r2, r5, #0 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldmia r5!, {r0, r1, r2, r3} - bl sub_0208B284 - ldr r1, _0222F510 ; =0x000006F4 - str r0, [r4, r1] - ldr r0, [r4, r1] - add r1, r4, #0 - add r1, #0x5c - ldrb r1, [r1] - bl sub_0208B878 - ldr r0, _0222F510 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B8B0 - ldr r0, _0222F510 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - mov r0, #0x14 - mov r1, #0x66 - bl sub_02012744 - str r0, [r4, #0x50] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xa - mov r3, #0x66 - bl sub_0200B144 - str r0, [r4, #0x48] - mov r0, #0 - mov r1, #0x1a - mov r2, #0x14 - mov r3, #0x66 - bl sub_0200B144 - str r0, [r4, #0x4c] - add r0, r4, #0 - bl ov62_022338A8 - add r0, r4, #0 - bl sub_0208C06C - add r0, r4, #0 - bl ov62_022300D8 - add r0, r4, #0 - bl ov62_022337D4 - add sp, #0x28 - pop {r3, r4, r5, pc} - nop -_0222F500: .word 0xFFFFE0FF -_0222F504: .word 0x04001000 -_0222F508: .word ov62_0222F8E4 -_0222F50C: .word 0x00200010 -_0222F510: .word 0x000006F4 - thumb_func_end ov62_0222F2C0 - - thumb_func_start ov62_0222F514 -ov62_0222F514: ; 0x0222F514 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #0x24] - mov r1, #0 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #1 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #4 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #5 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019044 - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019044 - ldr r0, [r5, #0x24] - bl sub_020181C4 - ldr r0, [r5, #0x28] - mov r1, #0 - bl sub_02002FA0 - ldr r0, [r5, #0x28] - mov r1, #1 - bl sub_02002FA0 - ldr r0, [r5, #0x28] - mov r1, #2 - bl sub_02002FA0 - ldr r0, [r5, #0x28] - mov r1, #3 - bl sub_02002FA0 - ldr r0, [r5, #0x28] - bl sub_02002F54 - ldr r0, [r5, #0] - cmp r0, #0 - bne _0222F5DE - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0202783C - add r1, r5, #0 - add r1, #0x5c - ldrb r1, [r1] - bl sub_0202798C -_0222F5DE: - ldr r0, [r5, #0x14] - bl sub_02006CA8 - ldr r0, _0222F664 ; =0x0000416C - ldr r0, [r5, r0] - bl sub_0200DA58 - ldr r0, [r5, #0x18] - ldr r1, [r5, #0x1c] - bl sub_0200D0B0 - ldr r0, [r5, #0x18] - bl sub_0200C8D4 - bl sub_02039794 - bl sub_0201E530 - ldr r0, [r5, #0x2c] - bl sub_02024034 - mov r0, #0 - bl sub_02002B20 - ldr r7, _0222F668 ; =0x0000087C - mov r6, #0 - add r4, r5, #0 -_0222F614: - ldr r0, [r4, r7] - cmp r0, #0 - beq _0222F61E - bl sub_020181C4 -_0222F61E: - ldr r0, _0222F66C ; =0x0000088C - ldr r0, [r4, r0] - cmp r0, #0 - beq _0222F62A - bl sub_020181C4 -_0222F62A: - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0222F614 - ldr r0, [r5, #0x50] - bl sub_020127BC - ldr r0, [r5, #0x48] - bl sub_0200B190 - ldr r0, [r5, #0x4c] - bl sub_0200B190 - ldr r0, [r5, #0x60] - bl sub_020242C4 - ldr r0, [r5, #0x64] - bl sub_02007B6C - add r0, r5, #0 - bl ov62_022411EC - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_0201DC3C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222F664: .word 0x0000416C -_0222F668: .word 0x0000087C -_0222F66C: .word 0x0000088C - thumb_func_end ov62_0222F514 - - thumb_func_start ov62_0222F670 -ov62_0222F670: ; 0x0222F670 - push {r4, r5, lr} - sub sp, #0x3c - add r4, r0, #0 - bl sub_0201FF00 - ldr r5, _0222F7F4 ; =0x0224872C - add r3, sp, #0x2c - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0222F7F8 ; =0x02248788 - add r3, sp, #4 - mov r2, #5 -_0222F694: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0222F694 - add r0, sp, #4 - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0 - ldr r2, _0222F7FC ; =0x022487B0 - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - ldr r2, _0222F800 ; =0x022487CC - add r0, r4, #0 - mov r1, #1 - mov r3, #0 - bl sub_020183C4 - ldr r2, _0222F804 ; =0x022487E8 - add r0, r4, #0 - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - ldr r2, _0222F808 ; =0x02248804 - add r0, r4, #0 - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - ldr r2, _0222F80C ; =0x02248820 - add r0, r4, #0 - mov r1, #4 - mov r3, #0 - bl sub_020183C4 - ldr r2, _0222F810 ; =0x0224883C - add r0, r4, #0 - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - ldr r2, _0222F814 ; =0x02248858 - add r0, r4, #0 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - ldr r2, _0222F818 ; =0x02248874 - add r0, r4, #0 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #5 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #6 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #7 - bl sub_02019EBC - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #1 - bl ov62_0222F824 - mov r0, #8 - str r0, [sp] - ldr r0, _0222F81C ; =0x04000050 - mov r1, #4 - mov r2, #0x12 - mov r3, #7 - bl sub_020BF55C - mov r0, #8 - str r0, [sp] - ldr r0, _0222F820 ; =0x04001050 - mov r1, #4 - mov r2, #0x12 - mov r3, #7 - bl sub_020BF55C - add sp, #0x3c - pop {r4, r5, pc} - ; .align 2, 0 -_0222F7F4: .word 0x0224872C -_0222F7F8: .word 0x02248788 -_0222F7FC: .word 0x022487B0 -_0222F800: .word 0x022487CC -_0222F804: .word 0x022487E8 -_0222F808: .word 0x02248804 -_0222F80C: .word 0x02248820 -_0222F810: .word 0x0224883C -_0222F814: .word 0x02248858 -_0222F818: .word 0x02248874 -_0222F81C: .word 0x04000050 -_0222F820: .word 0x04001050 - thumb_func_end ov62_0222F670 - - thumb_func_start ov62_0222F824 -ov62_0222F824: ; 0x0222F824 - ldr r1, _0222F82C ; =0x021BF6DC - ldr r3, _0222F830 ; =sub_0201FFE8 - strb r0, [r1, #5] - bx r3 - ; .align 2, 0 -_0222F82C: .word 0x021BF6DC -_0222F830: .word sub_0201FFE8 - thumb_func_end ov62_0222F824 - - thumb_func_start ov62_0222F834 -ov62_0222F834: ; 0x0222F834 - push {r3, lr} - ldr r0, [r0, #0x24] - ldr r2, _0222F844 ; =0x022487E8 - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - pop {r3, pc} - ; .align 2, 0 -_0222F844: .word 0x022487E8 - thumb_func_end ov62_0222F834 - - thumb_func_start ov62_0222F848 -ov62_0222F848: ; 0x0222F848 - push {r3, r4, r5, r6, lr} - sub sp, #0x4c - add r4, r0, #0 - mov r0, #0x66 - bl sub_0200C6E4 - add r2, sp, #0x2c - ldr r5, _0222F8D8 ; =0x02248768 - str r0, [r4, #0x18] - ldmia r5!, {r0, r1} - add r3, r2, #0 - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - ldr r6, _0222F8DC ; =0x0224873C - stmia r2!, {r0, r1} - add r5, sp, #0x18 - ldmia r6!, {r0, r1} - add r2, r5, #0 - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r1, r3, #0 - str r0, [r5, #0] - ldr r0, [r4, #0x18] - mov r3, #0x20 - bl sub_0200C73C - ldr r3, _0222F8E0 ; =0x02248750 - add r2, sp, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #0x18] - bl sub_0200C704 - str r0, [r4, #0x1c] - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x1c] - mov r2, #0xc0 - bl sub_0200C7C0 - cmp r0, #0 - bne _0222F8B2 - bl sub_02022974 -_0222F8B2: - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x1c] - add r2, sp, #0 - bl sub_0200CB30 - cmp r0, #0 - bne _0222F8C4 - bl sub_02022974 -_0222F8C4: - ldr r0, [r4, #0x18] - bl sub_0200C738 - mov r2, #1 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - add sp, #0x4c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0222F8D8: .word 0x02248768 -_0222F8DC: .word 0x0224873C -_0222F8E0: .word 0x02248750 - thumb_func_end ov62_0222F848 - - thumb_func_start ov62_0222F8E4 -ov62_0222F8E4: ; 0x0222F8E4 - push {r4, lr} - add r4, r0, #0 - bl sub_0201DCAC - ldr r0, [r4, #0x28] - bl sub_02003694 - ldr r0, [r4, #0x24] - bl sub_0201C2B8 - ldr r3, _0222F908 ; =0x027E0000 - ldr r1, _0222F90C ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_0222F908: .word 0x027E0000 -_0222F90C: .word 0x00003FF8 - thumb_func_end ov62_0222F8E4 - - thumb_func_start ov62_0222F910 -ov62_0222F910: ; 0x0222F910 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #0x12 - bls _0222F91E - b _0222FAEA -_0222F91E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0222F92A: ; jump table - .short _0222F950 - _0222F92A - 2 ; case 0 - .short _0222F988 - _0222F92A - 2 ; case 1 - .short _0222F9A0 - _0222F92A - 2 ; case 2 - .short _0222F9B8 - _0222F92A - 2 ; case 3 - .short _0222F9D0 - _0222F92A - 2 ; case 4 - .short _0222F9E8 - _0222F92A - 2 ; case 5 - .short _0222FA00 - _0222F92A - 2 ; case 6 - .short _0222FA18 - _0222F92A - 2 ; case 7 - .short _0222FA30 - _0222F92A - 2 ; case 8 - .short _0222FA30 - _0222F92A - 2 ; case 9 - .short _0222FA48 - _0222F92A - 2 ; case 10 - .short _0222FA48 - _0222F92A - 2 ; case 11 - .short _0222FA60 - _0222F92A - 2 ; case 12 - .short _0222FA78 - _0222F92A - 2 ; case 13 - .short _0222FA90 - _0222F92A - 2 ; case 14 - .short _0222FAA8 - _0222F92A - 2 ; case 15 - .short _0222FAC0 - _0222F92A - 2 ; case 16 - .short _0222FACC - _0222F92A - 2 ; case 17 - .short _0222FAE4 - _0222F92A - 2 ; case 18 -_0222F950: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB0C ; =0x02248BD8 - ldr r1, [r1, r2] - blx r1 - add r6, r0, #0 - add r0, r4, #0 - mov r1, #1 - add r2, r6, #0 - add r3, r5, #0 - bl ov62_0222FB44 - cmp r6, #0 - bne _0222F96E - b _0222FAEE -_0222F96E: - ldr r0, [r4, #0x44] - cmp r0, #1 - bne _0222F97E - add r0, r4, #0 - mov r1, #0 - bl ov62_0222FB60 - b _0222FAEE -_0222F97E: - add r0, r4, #0 - mov r1, #1 - bl ov62_0222FB60 - b _0222FAEE -_0222F988: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB10 ; =0x02248BF0 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222F9A0: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB14 ; =0x02248C28 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222F9B8: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB18 ; =0x02248C50 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222F9D0: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB1C ; =0x02248D08 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222F9E8: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB20 ; =0x02248D20 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA00: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB24 ; =0x02248E24 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA18: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB28 ; =0x02248E50 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA30: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB2C ; =0x02248F58 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA48: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB30 ; =0x022490DC - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA60: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB30 ; =0x022490DC - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA78: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB34 ; =0x02249680 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FA90: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB38 ; =0x0224962C - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FAA8: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB3C ; =0x02249618 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FAC0: - mov r1, #0xff - mov r2, #1 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FACC: - ldr r1, [r4, #4] - lsl r2, r1, #2 - ldr r1, _0222FB40 ; =0x02249790 - ldr r1, [r1, r2] - blx r1 - add r2, r0, #0 - add r0, r4, #0 - mov r1, #0x10 - add r3, r5, #0 - bl ov62_0222FB44 - b _0222FAEE -_0222FAE4: - bl ov62_022348FC - b _0222FAEE -_0222FAEA: - mov r0, #1 - pop {r4, r5, r6, pc} -_0222FAEE: - bl sub_020241B4 - ldr r0, [r4, #0x64] - bl sub_02007768 - mov r0, #1 - mov r1, #0 - bl sub_020241BC - add r0, r4, #0 - bl ov62_022411D4 - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_0222FB0C: .word 0x02248BD8 -_0222FB10: .word 0x02248BF0 -_0222FB14: .word 0x02248C28 -_0222FB18: .word 0x02248C50 -_0222FB1C: .word 0x02248D08 -_0222FB20: .word 0x02248D20 -_0222FB24: .word 0x02248E24 -_0222FB28: .word 0x02248E50 -_0222FB2C: .word 0x02248F58 -_0222FB30: .word 0x022490DC -_0222FB34: .word 0x02249680 -_0222FB38: .word 0x0224962C -_0222FB3C: .word 0x02249618 -_0222FB40: .word 0x02249790 - thumb_func_end ov62_0222F910 - - thumb_func_start ov62_0222FB44 -ov62_0222FB44: ; 0x0222FB44 - push {r4, lr} - add r4, r0, #0 - cmp r2, #0 - beq _0222FB5C - str r1, [r3, #0] - mov r1, #0 - bl ov62_0222FB60 - add r0, r4, #0 - mov r1, #0 - bl ov62_0222FB6C -_0222FB5C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_0222FB44 - - thumb_func_start ov62_0222FB60 -ov62_0222FB60: ; 0x0222FB60 - str r1, [r0, #4] - mov r1, #0 - str r1, [r0, #8] - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov62_0222FB60 - - thumb_func_start ov62_0222FB6C -ov62_0222FB6C: ; 0x0222FB6C - str r1, [r0, #8] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov62_0222FB6C - - thumb_func_start ov62_0222FB74 -ov62_0222FB74: ; 0x0222FB74 - push {r4, lr} - add r4, r0, #0 - bl sub_0208C06C - add r0, r4, #0 - bl ov62_02230A5C - ldr r0, _0222FB8C ; =0x000006E4 - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - nop -_0222FB8C: .word 0x000006E4 - thumb_func_end ov62_0222FB74 - - thumb_func_start ov62_0222FB90 -ov62_0222FB90: ; 0x0222FB90 - push {r4, r5, r6, lr} - ldr r2, _0222FBF0 ; =0x000006D8 - ldr r3, _0222FBF4 ; =0x00000818 - ldr r4, [r0, r2] - ldr r1, [r0, r3] - lsl r4, r4, #2 - add r5, r0, r4 - add r4, r3, #4 - str r1, [r5, r4] - add r1, r2, #0 - add r1, #0xc - ldr r1, [r0, r1] - ldr r5, [r0, r3] - add r4, r1, #0 - ldr r1, [r0, r2] - mov r6, #0x24 - mul r4, r6 - lsl r1, r1, #2 - add r5, r5, r4 - add r4, r0, r1 - add r1, r2, #0 - sub r1, #0x14 - str r5, [r4, r1] - add r4, r2, #0 - add r4, #0xc - ldr r4, [r0, r4] - ldr r1, [r0, r3] - add r5, r4, #0 - mul r5, r6 - add r1, r1, r5 - ldr r1, [r1, #0x20] - mov r4, #0 - str r1, [r0, r3] - ldr r1, [r0, r2] - add r1, r1, #1 - str r1, [r0, r2] - add r2, #0xc - str r4, [r0, r2] - ldr r1, [r0, r3] - cmp r1, #0 - bne _0222FBE6 - add r0, r4, #0 - pop {r4, r5, r6, pc} -_0222FBE6: - bl ov62_0222FB74 - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_0222FBF0: .word 0x000006D8 -_0222FBF4: .word 0x00000818 - thumb_func_end ov62_0222FB90 - - thumb_func_start ov62_0222FBF8 -ov62_0222FBF8: ; 0x0222FBF8 - push {r3, lr} - ldr r1, _0222FC14 ; =0x000006D8 - ldr r1, [r0, r1] - lsl r1, r1, #2 - add r2, r0, r1 - ldr r1, _0222FC18 ; =0x0000081C - ldr r2, [r2, r1] - sub r1, r1, #4 - str r2, [r0, r1] - bl ov62_0222FB74 - mov r0, #1 - pop {r3, pc} - nop -_0222FC14: .word 0x000006D8 -_0222FC18: .word 0x0000081C - thumb_func_end ov62_0222FBF8 - - thumb_func_start ov62_0222FC1C -ov62_0222FC1C: ; 0x0222FC1C - push {r3, r4, r5, lr} - ldr r3, _0222FD34 ; =0x000006E4 - add r4, r0, #0 - ldr r1, _0222FD38 ; =0x00000818 - ldr r5, [r4, r3] - mov r3, #0x24 - ldr r2, [r4, r1] - mul r3, r5 - add r2, r2, r3 - ldr r2, [r2, #0x10] - cmp r2, #0x13 - bhi _0222FD30 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0222FC40: ; jump table - .short _0222FD30 - _0222FC40 - 2 ; case 0 - .short _0222FD30 - _0222FC40 - 2 ; case 1 - .short _0222FC68 - _0222FC40 - 2 ; case 2 - .short _0222FD30 - _0222FC40 - 2 ; case 3 - .short _0222FC7E - _0222FC40 - 2 ; case 4 - .short _0222FC8A - _0222FC40 - 2 ; case 5 - .short _0222FD30 - _0222FC40 - 2 ; case 6 - .short _0222FD26 - _0222FC40 - 2 ; case 7 - .short _0222FC96 - _0222FC40 - 2 ; case 8 - .short _0222FCA2 - _0222FC40 - 2 ; case 9 - .short _0222FCAE - _0222FC40 - 2 ; case 10 - .short _0222FCBA - _0222FC40 - 2 ; case 11 - .short _0222FCC6 - _0222FC40 - 2 ; case 12 - .short _0222FCD2 - _0222FC40 - 2 ; case 13 - .short _0222FCDE - _0222FC40 - 2 ; case 14 - .short _0222FCEA - _0222FC40 - 2 ; case 15 - .short _0222FCF6 - _0222FC40 - 2 ; case 16 - .short _0222FD02 - _0222FC40 - 2 ; case 17 - .short _0222FD0E - _0222FC40 - 2 ; case 18 - .short _0222FD1A - _0222FC40 - 2 ; case 19 -_0222FC68: - add r1, #0x50 - ldr r0, [r4, r1] - mov r1, #0 - add r2, r1, #0 - bl sub_0208BA84 - add r0, r4, #0 - mov r1, #2 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_0222FC7E: - ldr r3, [r4, #0x10] - mov r1, #2 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FC8A: - ldr r3, [r4, #0x10] - mov r1, #3 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FC96: - ldr r3, [r4, #0x10] - mov r1, #4 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCA2: - ldr r3, [r4, #0x10] - mov r1, #5 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCAE: - ldr r3, [r4, #0x10] - mov r1, #6 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCBA: - ldr r3, [r4, #0x10] - mov r1, #7 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCC6: - ldr r3, [r4, #0x10] - mov r1, #8 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCD2: - ldr r3, [r4, #0x10] - mov r1, #9 - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCDE: - ldr r3, [r4, #0x10] - mov r1, #0xa - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCEA: - ldr r3, [r4, #0x10] - mov r1, #0xb - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FCF6: - ldr r3, [r4, #0x10] - mov r1, #0xc - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FD02: - ldr r3, [r4, #0x10] - mov r1, #0xd - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FD0E: - ldr r3, [r4, #0x10] - mov r1, #0xe - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FD1A: - ldr r3, [r4, #0x10] - mov r1, #0xf - mov r2, #1 - bl ov62_0222FB44 - pop {r3, r4, r5, pc} -_0222FD26: - ldr r3, [r4, #0x10] - mov r1, #0x11 - mov r2, #1 - bl ov62_0222FB44 -_0222FD30: - pop {r3, r4, r5, pc} - nop -_0222FD34: .word 0x000006E4 -_0222FD38: .word 0x00000818 - thumb_func_end ov62_0222FC1C - - thumb_func_start ov62_0222FD3C -ov62_0222FD3C: ; 0x0222FD3C - push {r4, r5, r6, lr} - ldr r3, _0222FDF8 ; =0x000006E4 - add r5, r0, #0 - ldr r1, _0222FDFC ; =0x00000818 - ldr r4, [r5, r3] - mov r3, #0x24 - ldr r2, [r5, r1] - mul r3, r4 - add r2, r2, r3 - ldr r4, [r2, #0x18] - ldr r2, [r5, #0] - mov r6, #1 - cmp r2, #6 - bhi _0222FD72 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0222FD64: ; jump table - .short _0222FD72 - _0222FD64 - 2 ; case 0 - .short _0222FD72 - _0222FD64 - 2 ; case 1 - .short _0222FDCA - _0222FD64 - 2 ; case 2 - .short _0222FDE0 - _0222FD64 - 2 ; case 3 - .short _0222FDE0 - _0222FD64 - 2 ; case 4 - .short _0222FD8E - _0222FD64 - 2 ; case 5 - .short _0222FDB2 - _0222FD64 - 2 ; case 6 -_0222FD72: - cmp r4, #3 - bhi _0222FDE0 - lsl r0, r4, #2 - add r1, r5, r0 - ldr r0, _0222FE00 ; =0x0000087C - ldr r0, [r1, r0] - cmp r0, #0 - bne _0222FDE0 - ldr r1, _0222FE04 ; =0x0000010D - add r0, r5, #0 - bl ov62_0223197C - mov r6, #0 - b _0222FDE0 -_0222FD8E: - cmp r4, #0 - bne _0222FDE0 - add r1, #0x18 - ldr r0, [r5, r1] - bl sub_0202A750 - add r1, r4, #0 - bl sub_02029CA8 - bl sub_02029F34 - add r6, r0, #0 - bne _0222FDE0 - ldr r1, _0222FE08 ; =0x00000122 - add r0, r5, #0 - bl ov62_0223197C - b _0222FDE0 -_0222FDB2: - cmp r4, #0x64 - bne _0222FDE0 - bl ov62_02231974 - cmp r0, #0 - beq _0222FDE0 - ldr r1, _0222FE0C ; =0x00000111 - add r0, r5, #0 - bl ov62_0223197C - mov r6, #0 - b _0222FDE0 -_0222FDCA: - ldr r2, _0222FE10 ; =0x0000270F - cmp r4, r2 - bne _0222FDE0 - add r1, #0x64 - ldr r1, [r5, r1] - cmp r1, #0 - bne _0222FDE0 - mov r1, #0x81 - bl ov62_0223197C - mov r6, #0 -_0222FDE0: - cmp r6, #0 - bne _0222FDEC - ldr r0, _0222FE14 ; =0x00000564 - bl sub_02005748 - b _0222FDF2 -_0222FDEC: - ldr r0, _0222FE18 ; =0x00000563 - bl sub_02005748 -_0222FDF2: - add r0, r6, #0 - pop {r4, r5, r6, pc} - nop -_0222FDF8: .word 0x000006E4 -_0222FDFC: .word 0x00000818 -_0222FE00: .word 0x0000087C -_0222FE04: .word 0x0000010D -_0222FE08: .word 0x00000122 -_0222FE0C: .word 0x00000111 -_0222FE10: .word 0x0000270F -_0222FE14: .word 0x00000564 -_0222FE18: .word 0x00000563 - thumb_func_end ov62_0222FD3C - - thumb_func_start ov62_0222FE1C -ov62_0222FE1C: ; 0x0222FE1C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #0 - bne _0222FF1C - ldr r0, _0222FF20 ; =0x000006E4 - str r5, [r4, r0] - add r0, r4, #0 - bl ov62_0222FD3C - cmp r0, #0 - beq _0222FF1C - cmp r5, #4 - bhi _0222FF1C - mov r0, #0x28 - mul r0, r5 - add r1, r4, r0 - ldr r0, _0222FF24 ; =0x000005FC - add r2, sp, #0 - ldr r0, [r1, r0] - add r1, sp, #0 - add r1, #2 - bl ov62_02230E74 - mov r0, #0x6f - lsl r0, r0, #4 - add r3, sp, #0 - mov r1, #2 - ldrsh r1, [r3, r1] - mov r2, #0 - ldrsh r2, [r3, r2] - add r1, #0x10 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - asr r1, r1, #0x10 - bl sub_0208B948 - mov r0, #0x6f - lsl r0, r0, #4 - add r3, sp, #0 - mov r1, #2 - ldrsh r1, [r3, r1] - mov r2, #0 - ldrsh r2, [r3, r2] - add r1, #0x10 - lsl r1, r1, #0x10 - ldr r0, [r4, r0] - asr r1, r1, #0x10 - bl sub_0208B8B8 - ldr r2, _0222FF20 ; =0x000006E4 - ldr r1, _0222FF28 ; =0x00000818 - ldr r0, [r4, r2] - ldr r6, [r4, r1] - mov r3, #0x24 - add r5, r0, #0 - mul r5, r3 - add r0, r6, r5 - ldr r5, [r0, #0x18] - add r0, r1, #0 - add r0, #0x54 - str r5, [r4, r0] - ldr r5, [r4, r1] - ldr r1, [r4, r2] - add r0, r4, #0 - add r2, r1, #0 - mul r2, r3 - add r1, r5, r2 - ldr r1, [r1, #0x14] - bl ov62_0222FB60 - ldr r1, _0222FF20 ; =0x000006E4 - ldr r0, _0222FF28 ; =0x00000818 - ldr r2, [r4, r1] - mov r1, #0x24 - ldr r3, [r4, r0] - mul r1, r2 - add r1, r3, r1 - ldr r1, [r1, #0x14] - cmp r1, #2 - bne _0222FECE - add r0, #0x50 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA84 - b _0222FEE0 -_0222FECE: - add r0, r4, #0 - bl ov62_02230014 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 -_0222FEE0: - ldr r1, _0222FF2C ; =0x0000086C - ldr r0, _0222FF30 ; =0x000003E7 - ldr r2, [r4, r1] - cmp r2, r0 - bne _0222FEF6 - add r0, r4, #0 - mov r1, #0xc1 - bl ov62_02231BC4 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222FEF6: - ldr r0, _0222FF34 ; =0x0000270F - cmp r2, r0 - bne _0222FF08 - ldr r1, _0222FF38 ; =0x0000012D - add r0, r4, #0 - bl ov62_02231BC4 - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0222FF08: - add r1, #0x30 - ldr r0, [r4, r1] - cmp r0, #0 - beq _0222FF1C - add r0, r4, #0 - bl ov62_02231A1C - ldr r0, _0222FF3C ; =0x0000089C - mov r1, #0 - str r1, [r4, r0] -_0222FF1C: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0222FF20: .word 0x000006E4 -_0222FF24: .word 0x000005FC -_0222FF28: .word 0x00000818 -_0222FF2C: .word 0x0000086C -_0222FF30: .word 0x000003E7 -_0222FF34: .word 0x0000270F -_0222FF38: .word 0x0000012D -_0222FF3C: .word 0x0000089C - thumb_func_end ov62_0222FE1C - - thumb_func_start ov62_0222FF40 -ov62_0222FF40: ; 0x0222FF40 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - add r2, r4, #0 - ldr r0, _0222FF74 ; =0x0000060C - mov r1, #0 - add r2, #0x30 - add r3, r4, #0 -_0222FF50: - add r1, r1, #1 - str r2, [r3, r0] - add r2, r2, #4 - add r3, #0x28 - cmp r1, #5 - blt _0222FF50 - mov r0, #0x66 - str r0, [sp] - add r0, r4, #0 - ldr r2, _0222FF78 ; =ov62_0222FE1C - add r0, #0x30 - mov r1, #5 - add r3, r4, #0 - bl sub_02023FCC - str r0, [r4, #0x2c] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0222FF74: .word 0x0000060C -_0222FF78: .word ov62_0222FE1C - thumb_func_end ov62_0222FF40 - - thumb_func_start ov62_0222FF7C -ov62_0222FF7C: ; 0x0222FF7C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r1, _02230008 ; =0x00000818 - str r0, [sp] - ldr r0, [r0, r1] - cmp r0, #0 - beq _02230004 - mov r4, #0 - ldr r5, [sp] - str r4, [sp, #4] - add r6, r4, #0 - add r7, sp, #8 -_0222FF94: - ldr r1, [sp] - ldr r0, _02230008 ; =0x00000818 - ldr r0, [r1, r0] - ldr r0, [r0, r4] - cmp r0, #0 - bne _0222FFBA - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - strb r6, [r0] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - strb r6, [r0, #1] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - strb r6, [r0, #2] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - strb r6, [r0, #3] - b _0222FFF6 -_0222FFBA: - ldr r0, _02230010 ; =0x000005FC - add r1, sp, #8 - ldr r0, [r5, r0] - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - mov r0, #0 - ldrsh r1, [r7, r0] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - sub r1, #0x10 - strb r1, [r0] - mov r0, #0 - ldrsh r1, [r7, r0] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - add r1, #0x10 - strb r1, [r0, #1] - mov r0, #2 - ldrsh r1, [r7, r0] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - strb r1, [r0, #2] - mov r0, #2 - ldrsh r1, [r7, r0] - ldr r0, _0223000C ; =0x0000060C - ldr r0, [r5, r0] - add r1, #0xa0 - strb r1, [r0, #3] -_0222FFF6: - ldr r0, [sp, #4] - add r4, #0x24 - add r0, r0, #1 - add r5, #0x28 - str r0, [sp, #4] - cmp r0, #5 - blt _0222FF94 -_02230004: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02230008: .word 0x00000818 -_0223000C: .word 0x0000060C -_02230010: .word 0x000005FC - thumb_func_end ov62_0222FF7C - - thumb_func_start ov62_02230014 -ov62_02230014: ; 0x02230014 - push {r3, r4, r5, r6, r7, lr} - mov r6, #0 - ldr r7, _0223004C ; =0x0000060C - add r5, r0, #0 - add r4, r6, #0 -_0223001E: - ldr r0, _02230050 ; =0x000005FC - add r1, sp, #0 - ldr r0, [r5, r0] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - ldr r0, _0223004C ; =0x0000060C - add r6, r6, #1 - ldr r0, [r5, r0] - strb r4, [r0] - ldr r0, _0223004C ; =0x0000060C - ldr r0, [r5, r0] - strb r4, [r0, #1] - ldr r0, _0223004C ; =0x0000060C - ldr r0, [r5, r0] - strb r4, [r0, #2] - ldr r0, [r5, r7] - add r5, #0x28 - strb r4, [r0, #3] - cmp r6, #5 - blt _0223001E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223004C: .word 0x0000060C -_02230050: .word 0x000005FC - thumb_func_end ov62_02230014 - - thumb_func_start ov62_02230054 -ov62_02230054: ; 0x02230054 - ldr r3, _0223005C ; =sub_0202404C - ldr r0, [r0, #0x2c] - bx r3 - nop -_0223005C: .word sub_0202404C - thumb_func_end ov62_02230054 - - thumb_func_start ov62_02230060 -ov62_02230060: ; 0x02230060 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02230090 ; =0x000006D8 - ldr r1, [r4, r0] - cmp r1, #0 - ble _02230072 - sub r1, r1, #1 - str r1, [r4, r0] - b _0223007C -_02230072: - beq _0223007C - mov r1, #0 - str r1, [r4, r0] - bl sub_02022974 -_0223007C: - ldr r0, _02230090 ; =0x000006D8 - ldr r0, [r4, r0] - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02230094 ; =0x0000081C - ldr r1, [r1, r0] - sub r0, r0, #4 - str r1, [r4, r0] - pop {r4, pc} - nop -_02230090: .word 0x000006D8 -_02230094: .word 0x0000081C - thumb_func_end ov62_02230060 - - thumb_func_start ov62_02230098 -ov62_02230098: ; 0x02230098 - ldr r1, _022300B8 ; =0x00000838 - mov r3, #0 - str r3, [r0, r1] - mov r2, #0xff - add r1, r1, #4 - str r2, [r0, r1] - mov r1, #0x21 - add r2, r3, #0 - lsl r1, r1, #6 -_022300AA: - add r3, r3, #1 - str r2, [r0, r1] - add r0, r0, #4 - cmp r3, #8 - blt _022300AA - bx lr - nop -_022300B8: .word 0x00000838 - thumb_func_end ov62_02230098 - - thumb_func_start ov62_022300BC -ov62_022300BC: ; 0x022300BC - ldr r1, _022300C4 ; =0x00000838 - ldr r0, [r0, r1] - bx lr - nop -_022300C4: .word 0x00000838 - thumb_func_end ov62_022300BC - - thumb_func_start ov62_022300C8 -ov62_022300C8: ; 0x022300C8 - ldr r2, _022300D4 ; =0x00000838 - mov r3, #1 - str r3, [r0, r2] - add r2, r2, #4 - str r1, [r0, r2] - bx lr - ; .align 2, 0 -_022300D4: .word 0x00000838 - thumb_func_end ov62_022300C8 - - thumb_func_start ov62_022300D8 -ov62_022300D8: ; 0x022300D8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - ldr r0, [r7, #0] - ldr r6, [r7, #0x14] - ldr r4, [r7, #0x24] - ldr r5, [r7, #0x28] - cmp r0, #0 - bne _022301B6 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x43 - add r2, r4, #0 - mov r3, #1 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x43 - add r2, r4, #0 - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x45 - add r2, r4, #0 - mov r3, #5 - bl sub_0200710C - add r0, r7, #0 - mov r1, #3 - bl ov62_02231710 - add r2, r0, #0 - mov r1, #0 - mov r0, #0x12 - str r1, [sp] - lsl r0, r0, #4 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r0, r7, #0 - mov r1, #3 - bl ov62_02231710 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x12 - lsl r0, r0, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r0, r7, #0 - mov r1, #0 - bl ov62_02231710 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r0, r7, #0 - mov r1, #0 - bl ov62_02231710 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - b _02230260 -_022301B6: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x36 - add r2, r4, #0 - mov r3, #1 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x36 - add r2, r4, #0 - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x37 - add r2, r4, #0 - mov r3, #5 - bl sub_0200710C - mov r1, #0 - mov r0, #0x12 - str r1, [sp] - lsl r0, r0, #4 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r2, #0x35 - mov r3, #0x66 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x12 - lsl r0, r0, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r2, #0x35 - mov r3, #0x66 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r2, #0x34 - mov r3, #0x66 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r5, #0 - mov r1, #0xa2 - mov r2, #0x34 - mov r3, #0x66 - bl sub_02003050 -_02230260: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x46 - add r2, r4, #0 - mov r3, #5 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x46 - add r2, r4, #0 - mov r3, #1 - bl sub_0200710C - ldr r0, [r7, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - add r0, r5, #0 - mov r2, #2 - mov r3, #0x10 - bl sub_02003A2C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_022300D8 - - thumb_func_start ov62_022302A8 -ov62_022302A8: ; 0x022302A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - mov r5, #2 - ldr r6, [r0, #0x14] - ldr r4, [r0, #0x24] - cmp r2, #0 - beq _022302BA - mov r5, #0 -_022302BA: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - mov r1, #0x2d - add r2, r4, #0 - add r3, r7, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - add r3, r7, #0 - bl sub_0200710C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov62_022302A8 - - thumb_func_start ov62_022302F0 -ov62_022302F0: ; 0x022302F0 - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r5, [r0, #0x24] - ldr r4, [r0, #0x14] - mov r0, #0 - str r0, [sp] - add r6, r1, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x2d - add r2, r5, #0 - add r3, r6, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #1 - add r2, r5, #0 - add r3, r6, #0 - bl sub_0200710C - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_022302F0 - - thumb_func_start ov62_02230330 -ov62_02230330: ; 0x02230330 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r1, r0, #0 - ldr r6, [r1, #0x18] - ldr r5, [r1, #0x1c] - ldr r7, [r1, #0x28] - ldr r1, [r1, #0] - str r0, [sp, #0x18] - ldr r4, [r0, #0x14] - cmp r1, #0 - bne _02230394 - mov r1, #2 - bl ov62_02231710 - str r4, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0223045C ; =0x0000270F - mov r1, #2 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r6, #0 - add r3, r5, #0 - bl sub_0200CDC4 - ldr r0, [sp, #0x18] - mov r1, #2 - bl ov62_02231710 - str r4, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _02230460 ; =0x00002710 - add r2, r6, #0 - str r0, [sp, #0x14] - add r0, r7, #0 - add r3, r5, #0 - bl sub_0200CDC4 - b _022303D6 -_02230394: - str r4, [sp] - mov r0, #0x33 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0223045C ; =0x0000270F - mov r1, #2 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r6, #0 - add r3, r5, #0 - bl sub_0200CDC4 - str r4, [sp] - mov r0, #0x33 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _02230460 ; =0x00002710 - add r2, r6, #0 - str r0, [sp, #0x14] - add r0, r7, #0 - add r3, r5, #0 - bl sub_0200CDC4 -_022303D6: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0223045C ; =0x0000270F - add r1, r5, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x41 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _02230460 ; =0x00002710 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x41 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _0223045C ; =0x0000270F - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x2e - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _0223045C ; =0x0000270F - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x2f - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _02230460 ; =0x00002710 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x2e - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02230460 ; =0x00002710 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x2f - bl sub_0200CE54 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223045C: .word 0x0000270F -_02230460: .word 0x00002710 - thumb_func_end ov62_02230330 - - thumb_func_start ov62_02230464 -ov62_02230464: ; 0x02230464 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x80 - str r0, [sp] - ldr r0, [r0, #0x18] - add r4, sp, #0x28 - str r0, [sp, #0x18] - ldr r0, [sp] - add r2, sp, #0x20 - ldr r0, [r0, #0x1c] - mov r1, #2 - str r0, [sp, #0x14] - mov r0, #0 - strh r0, [r2, #0x2c] - strh r0, [r2, #0x2e] - strh r0, [r2, #0x30] - strh r0, [r2, #0x32] - str r0, [sp, #0x10] - str r0, [sp, #0x54] - mov r0, #1 - str r0, [sp, #0x5c] - ldr r0, [sp, #0x10] - ldr r3, _02230640 ; =0x02248890 - str r0, [sp, #0x7c] - str r0, [sp, #0x58] - ldr r0, _02230644 ; =0x0000270F - str r1, [sp, #0x78] - str r0, [sp, #0x60] - str r0, [sp, #0x64] - str r0, [sp, #0x68] - str r0, [sp, #0x6c] - sub r0, r1, #3 - str r0, [sp, #0x70] - str r0, [sp, #0x74] - add r0, sp, #0x40 - str r0, [sp, #0xc] - ldrh r0, [r3, #0x22] - ldr r5, _02230648 ; =0x022488D8 - str r4, [sp, #8] - strh r0, [r2, #0x20] - ldrh r0, [r3, #0x24] - add r6, sp, #0x20 - strh r0, [r2, #0x22] - ldrh r0, [r3, #0x26] - strh r0, [r2, #0x24] - ldrh r0, [r3, #0x28] - strh r0, [r2, #0x26] - ldrh r0, [r3, #0x2a] - strh r0, [r2, #0x28] - ldrh r0, [r3, #0x2c] - strh r0, [r2, #0x2a] - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - ldrb r0, [r3] - ldr r4, [sp] - ldr r1, _0223064C ; =0x000006F8 - strb r0, [r2] - ldrb r0, [r3, #1] - strb r0, [r2, #1] - ldrb r0, [r3, #2] - strb r0, [r2, #2] - ldrb r0, [r3, #3] - strb r0, [r2, #3] - ldrb r0, [r3, #4] - strb r0, [r2, #4] - ldrb r0, [r3, #5] - strb r0, [r2, #5] - add r0, r4, #0 - add r0, r0, r1 - str r0, [sp, #4] -_022304F6: - ldr r0, [sp, #0x10] - mov r1, #3 - mov r7, #0 - add r5, r4, #0 - bl sub_020E1F6C - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] -_02230508: - cmp r7, #0 - bne _0223051C - mov r0, #1 - str r0, [sp, #0x5c] - ldr r0, _02230644 ; =0x0000270F - str r0, [sp, #0x60] - str r0, [sp, #0x64] - str r0, [sp, #0x68] - str r0, [sp, #0x6c] - b _0223052A -_0223051C: - mov r0, #2 - str r0, [sp, #0x5c] - ldr r0, _02230650 ; =0x00002710 - str r0, [sp, #0x60] - str r0, [sp, #0x64] - str r0, [sp, #0x68] - str r0, [sp, #0x6c] -_0223052A: - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x14] - add r2, sp, #0x4c - bl sub_0200CE6C - ldr r1, _0223064C ; =0x000006F8 - ldr r2, [sp, #0xc] - str r0, [r5, r1] - add r0, r1, #0 - mov r1, #0 - ldrsh r1, [r2, r1] - ldr r0, [r5, r0] - mov r2, #0x60 - bl ov62_02230E68 - ldr r0, _0223064C ; =0x000006F8 - ldr r0, [r5, r0] - bl sub_0200D330 - ldr r0, _0223064C ; =0x000006F8 - mov r1, #2 - ldr r0, [r5, r0] - bl sub_0200D6A4 - ldr r0, _0223064C ; =0x000006F8 - ldr r1, [sp, #8] - mov r2, #0xfe - ldr r0, [r5, r0] - ldr r1, [r1, #0] - lsl r2, r2, #0x16 - bl sub_0200D6E8 - mov r0, #0x72 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r1, [sp, #0x1c] - sub r0, #0xf - strb r1, [r4, r0] - ldr r0, _02230654 ; =0x00000724 - mov r1, #0 - str r1, [r4, r0] - ldr r0, [sp, #8] - ldr r1, [r0, #0] - ldr r0, _02230658 ; =0x00000708 - str r1, [r4, r0] - mov r0, #0 - ldrsb r0, [r6, r0] - lsl r1, r0, #1 - ldr r0, _0223065C ; =0x0000071C - add r1, #0xa - str r1, [r4, r0] - ldr r0, [sp, #0x10] - cmp r0, #3 - ldr r0, _02230660 ; =0x00000718 - bge _022305AE - mov r1, #0 - str r1, [r4, r0] - add r0, r1, #0 - ldrsb r1, [r6, r0] - ldr r0, _02230664 ; =0x0000070E - add r1, #8 - strh r1, [r4, r0] - mov r1, #0 - mvn r1, r1 - b _022305C2 -_022305AE: - mov r1, #0 - str r1, [r4, r0] - add r0, r1, #0 - ldrsb r1, [r6, r0] - mov r0, #0xff - add r1, #8 - sub r1, r0, r1 - ldr r0, _02230664 ; =0x0000070E - strh r1, [r4, r0] - mov r1, #1 -_022305C2: - add r0, r0, #2 - add r7, r7, #1 - add r5, r5, #4 - strb r1, [r4, r0] - cmp r7, #2 - blt _02230508 - ldr r0, _02230668 ; =ov62_02230C28 - ldr r1, [sp, #4] - mov r2, #5 - bl sub_0200DA04 - mov r1, #7 - lsl r1, r1, #8 - str r0, [r4, r1] - ldr r0, [sp, #0xc] - add r4, #0x30 - add r0, r0, #2 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r6, r6, #1 - add r0, r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, #0x30 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #6 - bge _02230600 - b _022304F6 -_02230600: - ldr r0, [sp] - sub r1, #0x28 - ldr r0, [r0, r1] - cmp r0, #0 - beq _0223063A - ldr r7, _02230654 ; =0x00000724 -_0223060C: - ldr r4, [sp] - ldr r1, _0223064C ; =0x000006F8 - mov r0, #0 - add r2, r4, #0 - add r6, r0, #0 - add r5, r2, r1 -_02230618: - ldr r1, [r4, r7] - cmp r1, #3 - beq _0223062C - mov r0, #7 - lsl r0, r0, #8 - ldr r0, [r4, r0] - add r1, r5, #0 - bl ov62_02230C28 - mov r0, #1 -_0223062C: - add r6, r6, #1 - add r4, #0x30 - add r5, #0x30 - cmp r6, #6 - blt _02230618 - cmp r0, #0 - bne _0223060C -_0223063A: - add sp, #0x80 - pop {r3, r4, r5, r6, r7, pc} - nop -_02230640: .word 0x02248890 -_02230644: .word 0x0000270F -_02230648: .word 0x022488D8 -_0223064C: .word 0x000006F8 -_02230650: .word 0x00002710 -_02230654: .word 0x00000724 -_02230658: .word 0x00000708 -_0223065C: .word 0x0000071C -_02230660: .word 0x00000718 -_02230664: .word 0x0000070E -_02230668: .word ov62_02230C28 - thumb_func_end ov62_02230464 - - thumb_func_start ov62_0223066C -ov62_0223066C: ; 0x0223066C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0 - ldr r6, _02230698 ; =0x000006F8 - str r0, [sp] -_02230676: - mov r4, #0 - add r5, r7, #0 -_0223067A: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0223067A - ldr r0, [sp] - add r7, #0x30 - add r0, r0, #1 - str r0, [sp] - cmp r0, #6 - blt _02230676 - pop {r3, r4, r5, r6, r7, pc} - nop -_02230698: .word 0x000006F8 - thumb_func_end ov62_0223066C - - thumb_func_start ov62_0223069C -ov62_0223069C: ; 0x0223069C - push {r4, r5, r6, lr} - mov r6, #7 - add r5, r0, #0 - mov r4, #0 - lsl r6, r6, #8 -_022306A6: - ldr r0, [r5, r6] - bl sub_0200DA58 - add r4, r4, #1 - add r5, #0x30 - cmp r4, #6 - blt _022306A6 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_0223069C - - thumb_func_start ov62_022306B8 -ov62_022306B8: ; 0x022306B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - ldr r1, [r0, #0x14] - ldr r7, [r0, #0x1c] - str r1, [sp, #0x10] - ldr r1, [r0, #0x18] - ldr r0, [r0, #0] - str r1, [sp, #0xc] - cmp r0, #6 - bhi _0223070E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022306D8: ; jump table - .short _022306E6 - _022306D8 - 2 ; case 0 - .short _0223070E - _022306D8 - 2 ; case 1 - .short _022306EE - _022306D8 - 2 ; case 2 - .short _02230706 - _022306D8 - 2 ; case 3 - .short _022306FE - _022306D8 - 2 ; case 4 - .short _022306F6 - _022306D8 - 2 ; case 5 - .short _022306F6 - _022306D8 - 2 ; case 6 -_022306E6: - mov r6, #0x3f - mov r4, #0x18 - mov r5, #0x19 - b _02230714 -_022306EE: - mov r6, #0x11 - mov r4, #0x12 - mov r5, #0x13 - b _02230714 -_022306F6: - mov r6, #8 - mov r4, #9 - mov r5, #0xa - b _02230714 -_022306FE: - mov r6, #0xb - mov r4, #0xc - mov r5, #0xd - b _02230714 -_02230706: - mov r6, #0xe - mov r4, #0xf - mov r5, #0x10 - b _02230714 -_0223070E: - mov r6, #0x30 - mov r4, #0x16 - mov r5, #0x17 -_02230714: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02230798 ; =0x00002711 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r3, r6, #0 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223079C ; =0x00002712 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r3, r6, #0 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _02230798 ; =0x00002711 - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r3, r4, #0 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _0223079C ; =0x00002712 - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r3, r4, #0 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02230798 ; =0x00002711 - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r3, r5, #0 - bl sub_0200CE54 - mov r0, #0 - str r0, [sp] - ldr r0, _0223079C ; =0x00002712 - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - add r3, r5, #0 - bl sub_0200CE54 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02230798: .word 0x00002711 -_0223079C: .word 0x00002712 - thumb_func_end ov62_022306B8 - - thumb_func_start ov62_022307A0 -ov62_022307A0: ; 0x022307A0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r1, _022307B8 ; =0x00002711 - bl sub_0200D070 - ldr r0, [r4, #0x1c] - ldr r1, _022307BC ; =0x00002712 - bl sub_0200D070 - pop {r4, pc} - nop -_022307B8: .word 0x00002711 -_022307BC: .word 0x00002712 - thumb_func_end ov62_022307A0 - - thumb_func_start ov62_022307C0 -ov62_022307C0: ; 0x022307C0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _02230880 ; =0x00000534 - mov r7, #0 - add r4, r6, r0 - add r5, r6, #0 -_022307CC: - mov r2, #0x6e - lsl r2, r2, #4 - ldr r3, [r6, r2] - mov r2, #5 - sub r2, r2, r3 - lsl r2, r2, #4 - add r2, #0xd9 - lsl r2, r2, #0x10 - ldr r0, [r4, #0] - mov r1, #0x32 - asr r2, r2, #0x10 - bl ov62_02230E68 - ldr r0, _02230884 ; =0x00000548 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r5, r0] - sub r2, #0x2c - bl sub_020128C4 - add r7, r7, #1 - add r4, #0x28 - add r5, #0x28 - cmp r7, #5 - blt _022307CC - mov r5, #0 - add r4, r6, #0 - add r7, sp, #0 -_02230804: - ldr r0, _02230888 ; =0x000006D8 - ldr r0, [r6, r0] - cmp r0, #0 - beq _0223087E - ldr r0, _02230880 ; =0x00000534 - add r1, sp, #0 - ldr r0, [r4, r0] - add r1, #2 - add r2, sp, #0 - bl ov62_02230E74 - ldr r0, _02230888 ; =0x000006D8 - ldr r1, [r6, r0] - sub r0, r1, #1 - cmp r0, r5 - bne _02230834 - mov r0, #0xa9 - strh r0, [r7] - ldr r0, _02230880 ; =0x00000534 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0200D430 - b _02230862 -_02230834: - mov r0, #2 - ldrsh r0, [r7, r0] - sub r1, r1, r5 - lsl r1, r1, #2 - sub r0, r0, r1 - strh r0, [r7, #2] - ldr r0, _02230888 ; =0x000006D8 - mov r2, #5 - ldr r0, [r6, r0] - sub r1, r0, r5 - sub r0, r1, #1 - sub r2, r2, r1 - mov r1, #0x24 - mul r1, r2 - lsl r0, r0, #4 - add r1, #0x19 - add r0, r0, r1 - strh r0, [r7] - ldr r0, _02230880 ; =0x00000534 - mov r1, #2 - ldr r0, [r4, r0] - bl sub_0200D430 -_02230862: - ldr r0, _02230880 ; =0x00000534 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r7, r1] - ldrsh r2, [r7, r2] - ldr r0, [r4, r0] - bl ov62_02230E68 - ldr r0, _02230888 ; =0x000006D8 - add r5, r5, #1 - ldr r0, [r6, r0] - add r4, #0x28 - cmp r5, r0 - blt _02230804 -_0223087E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02230880: .word 0x00000534 -_02230884: .word 0x00000548 -_02230888: .word 0x000006D8 - thumb_func_end ov62_022307C0 - - thumb_func_start ov62_0223088C -ov62_0223088C: ; 0x0223088C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - add r5, r0, #0 - ldr r0, _02230A44 ; =0x00000534 - mov r1, #0x6e - add r4, r5, r0 - ldr r0, [r5, #0x18] - add r2, sp, #0x18 - str r0, [sp, #0xc] - ldr r0, [r5, #0x1c] - lsl r1, r1, #4 - str r0, [sp, #8] - ldr r0, [r5, #0x28] - str r0, [sp, #4] - mov r0, #0x2a - strh r0, [r2, #4] - ldr r3, [r5, r1] - mov r0, #5 - sub r0, r0, r3 - lsl r0, r0, #4 - add r0, #0xc9 - strh r0, [r2, #6] - ldr r1, [r5, r1] - cmp r1, #2 - bne _022308C8 - mov r0, #4 - sub r0, r0, r1 - lsl r0, r0, #4 - add r0, #0xc9 - strh r0, [r2, #6] -_022308C8: - mov r0, #0 - str r0, [sp, #0x10] - add r1, r0, #0 - add r0, sp, #0x18 - strh r1, [r0, #8] - ldr r1, [sp, #0x10] - mov r2, #1 - strh r1, [r0, #0xa] - add r0, r1, #0 - str r1, [sp, #0x4c] - ldr r1, _02230A48 ; =0x00002711 - str r0, [sp, #0x24] - str r1, [sp, #0x30] - sub r1, r1, #2 - mov r0, #3 - str r0, [sp, #0x48] - sub r0, r0, #4 - str r1, [sp, #0x14] - str r1, [sp, #0x34] - ldr r1, _02230A48 ; =0x00002711 - ldr r6, _02230A4C ; =0x022488A8 - ldr r7, [sp, #0x10] - str r2, [sp, #0x2c] - str r2, [sp, #0x28] - str r1, [sp, #0x38] - str r1, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] -_02230900: - mov r0, #2 - str r0, [sp, #0x2c] - ldr r0, _02230A50 ; =0x00002712 - ldr r1, [sp, #8] - str r0, [sp, #0x30] - sub r0, r0, #2 - str r0, [sp, #0x34] - ldr r0, _02230A50 ; =0x00002712 - add r2, sp, #0x1c - str r0, [sp, #0x38] - str r0, [sp, #0x3c] - ldrb r0, [r6, #5] - str r0, [sp, #0x24] - ldr r0, [sp, #0xc] - bl sub_0200CE6C - str r0, [r4, #0] - bl sub_0200D330 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0200D3F4 - add r2, sp, #0x18 - mov r1, #4 - ldrsh r1, [r2, r1] - add r3, r2, #0 - mov r2, #6 - add r1, #8 - lsl r1, r1, #0x10 - ldrsh r2, [r3, r2] - ldr r0, [r4, #0] - asr r1, r1, #0x10 - bl ov62_02230E68 - mov r0, #1 - str r0, [sp, #0x2c] - ldr r0, _02230A48 ; =0x00002711 - ldr r1, [sp, #8] - str r0, [sp, #0x30] - ldr r0, [sp, #0x14] - add r2, sp, #0x1c - str r0, [sp, #0x34] - ldr r0, _02230A48 ; =0x00002711 - str r0, [sp, #0x38] - str r0, [sp, #0x3c] - ldrb r0, [r6] - str r0, [sp, #0x24] - ldr r0, [sp, #0xc] - bl sub_0200CE6C - add r1, r4, #0 - add r1, #0xc8 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200D330 - add r2, sp, #0x18 - mov r1, #4 - add r0, r4, #0 - add r0, #0xc8 - ldrsh r1, [r2, r1] - add r3, r2, #0 - mov r2, #6 - ldrsh r2, [r3, r2] - ldr r0, [r0, #0] - bl ov62_02230E68 - ldr r1, _02230A54 ; =0x00000818 - add r0, r4, #0 - ldr r1, [r5, r1] - add r0, #0xc8 - ldr r0, [r0, #0] - ldr r1, [r1, r7] - bl sub_0200D3F4 - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r0, r0, #1 - add r4, #0x28 - add r7, #0x24 - str r0, [sp, #0x10] - cmp r0, #5 - blt _02230900 - mov r4, #0 - add r6, r5, #0 - add r7, sp, #0x18 -_022309B2: - ldr r0, _02230A58 ; =0x000006D8 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02230A2C - ldr r0, _02230A44 ; =0x00000534 - add r1, sp, #0x18 - ldr r0, [r6, r0] - add r1, #2 - add r2, sp, #0x18 - bl ov62_02230E74 - ldr r0, _02230A58 ; =0x000006D8 - ldr r1, [r5, r0] - sub r0, r1, #1 - cmp r0, r4 - bne _022309E2 - mov r0, #0xa9 - strh r0, [r7] - ldr r0, _02230A44 ; =0x00000534 - mov r1, #1 - ldr r0, [r6, r0] - bl sub_0200D430 - b _02230A10 -_022309E2: - mov r0, #2 - ldrsh r0, [r7, r0] - sub r1, r1, r4 - lsl r1, r1, #2 - sub r0, r0, r1 - strh r0, [r7, #2] - ldr r0, _02230A58 ; =0x000006D8 - mov r2, #5 - ldr r0, [r5, r0] - sub r1, r0, r4 - sub r0, r1, #1 - sub r2, r2, r1 - mov r1, #0x24 - mul r1, r2 - lsl r0, r0, #4 - add r1, #0x19 - add r0, r0, r1 - strh r0, [r7] - ldr r0, _02230A44 ; =0x00000534 - mov r1, #2 - ldr r0, [r6, r0] - bl sub_0200D430 -_02230A10: - ldr r0, _02230A44 ; =0x00000534 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r7, r1] - ldrsh r2, [r7, r2] - ldr r0, [r6, r0] - bl ov62_02230E68 - ldr r0, _02230A58 ; =0x000006D8 - add r4, r4, #1 - ldr r0, [r5, r0] - add r6, #0x28 - cmp r4, r0 - blt _022309B2 -_02230A2C: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [sp, #4] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02230A44: .word 0x00000534 -_02230A48: .word 0x00002711 -_02230A4C: .word 0x022488A8 -_02230A50: .word 0x00002712 -_02230A54: .word 0x00000818 -_02230A58: .word 0x000006D8 - thumb_func_end ov62_0223088C - - thumb_func_start ov62_02230A5C -ov62_02230A5C: ; 0x02230A5C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02230AB0 ; =0x000005FC - mov r4, #0 - str r4, [sp] - add r6, r5, #0 - add r7, r5, r0 -_02230A6A: - ldr r1, _02230AB4 ; =0x00000818 - ldr r0, _02230AB0 ; =0x000005FC - ldr r1, [r5, r1] - ldr r0, [r6, r0] - ldr r1, [r1, r4] - bl sub_0200D3F4 - ldr r0, _02230AB4 ; =0x00000818 - ldr r0, [r5, r0] - add r1, r0, r4 - ldr r0, [r0, r4] - cmp r0, #0 - beq _02230A9E - ldr r0, _02230AB0 ; =0x000005FC - ldr r1, [r1, #0xc] - ldr r0, [r6, r0] - bl sub_0200D364 - ldr r0, _02230AB4 ; =0x00000818 - add r1, r7, #0 - ldr r2, [r5, r0] - add r0, r5, #0 - add r3, r2, r4 - ldr r2, [r3, #8] - bl ov62_02230FC8 -_02230A9E: - ldr r0, [sp] - add r4, #0x24 - add r0, r0, #1 - add r6, #0x28 - add r7, #0x28 - str r0, [sp] - cmp r0, #5 - blt _02230A6A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02230AB0: .word 0x000005FC -_02230AB4: .word 0x00000818 - thumb_func_end ov62_02230A5C - - thumb_func_start ov62_02230AB8 -ov62_02230AB8: ; 0x02230AB8 - push {r3, r4, r5, r6, r7, lr} - ldr r7, _02230AE8 ; =0x00000548 - add r5, r0, #0 - add r6, r7, #0 - mov r4, #0 - sub r6, #0x14 -_02230AC4: - ldr r1, _02230AEC ; =0x000005FC - mov r0, #0x61 - ldr r1, [r5, r1] - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r1, [r1, #0] - bl sub_020131E0 - ldr r1, [r5, r6] - ldr r0, [r5, r7] - ldr r1, [r1, #0] - bl sub_020131E0 - add r4, r4, #1 - add r5, #0x28 - cmp r4, #5 - blt _02230AC4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02230AE8: .word 0x00000548 -_02230AEC: .word 0x000005FC - thumb_func_end ov62_02230AB8 - - thumb_func_start ov62_02230AF0 -ov62_02230AF0: ; 0x02230AF0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, _02230B64 ; =0x000006D8 - ldr r1, [r7, r0] - cmp r1, #0 - beq _02230B60 - mov r0, #0 - str r0, [sp] - cmp r1, #0 - ble _02230B60 - ldr r0, _02230B68 ; =0x00000534 - add r4, r7, #0 - add r5, r7, #0 - add r6, r7, r0 -_02230B0C: - ldr r1, _02230B6C ; =0x000006C4 - ldr r0, _02230B68 ; =0x00000534 - ldr r1, [r4, r1] - ldr r0, [r5, r0] - ldr r1, [r1, #0xc] - bl sub_0200D364 - ldr r0, _02230B6C ; =0x000006C4 - add r1, r6, #0 - ldr r3, [r4, r0] - add r0, r7, #0 - ldr r2, [r3, #8] - bl ov62_02230FC8 - ldr r0, _02230B70 ; =0x00000548 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r5, r0] - sub r2, #0x2c - bl sub_020128C4 - ldr r0, _02230B70 ; =0x00000548 - mov r1, #1 - ldr r0, [r5, r0] - bl sub_020129D0 - ldr r0, _02230B68 ; =0x00000534 - mov r1, #1 - ldr r0, [r5, r0] - bl sub_0200D3F4 - ldr r0, [sp] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp] - ldr r0, _02230B64 ; =0x000006D8 - add r5, #0x28 - ldr r1, [r7, r0] - ldr r0, [sp] - add r6, #0x28 - cmp r0, r1 - blt _02230B0C -_02230B60: - pop {r3, r4, r5, r6, r7, pc} - nop -_02230B64: .word 0x000006D8 -_02230B68: .word 0x00000534 -_02230B6C: .word 0x000006C4 -_02230B70: .word 0x00000548 - thumb_func_end ov62_02230AF0 - - thumb_func_start ov62_02230B74 -ov62_02230B74: ; 0x02230B74 - push {r3, r4, r5, lr} - ldr r1, _02230B98 ; =0x00000534 - mov r4, #0 - add r5, r0, r1 -_02230B7C: - ldr r0, [r5, #0] - bl sub_0200D0F4 - add r0, r5, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, #0x28 - cmp r4, #5 - blt _02230B7C - pop {r3, r4, r5, pc} - nop -_02230B98: .word 0x00000534 - thumb_func_end ov62_02230B74 - - thumb_func_start ov62_02230B9C -ov62_02230B9C: ; 0x02230B9C - push {r3, r4, r5, r6, r7, lr} - mov r7, #0x15 - add r5, r0, #0 - add r4, r1, #0 - mov r6, #0 - lsl r7, r7, #6 -_02230BA8: - ldr r0, [r5, r7] - cmp r0, #0 - ldr r0, _02230C18 ; =0x00000548 - bne _02230BC4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_020129D0 - ldr r0, _02230C1C ; =0x00000534 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200D3F4 - b _02230BD6 -_02230BC4: - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_020129D0 - ldr r0, _02230C1C ; =0x00000534 - add r1, r4, #0 - ldr r0, [r5, r0] - bl sub_0200D3F4 -_02230BD6: - ldr r0, _02230C20 ; =0x00000608 - ldr r0, [r5, r0] - cmp r0, #0 - bne _02230BF6 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_020129D0 - ldr r0, _02230C24 ; =0x000005FC - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0200D3F4 - b _02230C0C -_02230BF6: - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_020129D0 - ldr r0, _02230C24 ; =0x000005FC - add r1, r4, #0 - ldr r0, [r5, r0] - bl sub_0200D3F4 -_02230C0C: - add r6, r6, #1 - add r5, #0x28 - cmp r6, #5 - blt _02230BA8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02230C18: .word 0x00000548 -_02230C1C: .word 0x00000534 -_02230C20: .word 0x00000608 -_02230C24: .word 0x000005FC - thumb_func_end ov62_02230B9C - - thumb_func_start ov62_02230C28 -ov62_02230C28: ; 0x02230C28 - push {r4, lr} - sub sp, #0x40 - add r4, r1, #0 - ldr r0, [r4, #0x1c] - add r0, r0, #1 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - str r0, [r4, #0x1c] - beq _02230C44 - b _02230E58 -_02230C44: - ldr r0, [r4, #0x2c] - cmp r0, #3 - bls _02230C4C - b _02230E26 -_02230C4C: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02230C58: ; jump table - .short _02230C60 - _02230C58 - 2 ; case 0 - .short _02230C76 - _02230C58 - 2 ; case 1 - .short _02230CEC - _02230C58 - 2 ; case 2 - .short _02230D96 - _02230C58 - 2 ; case 3 -_02230C60: - ldr r1, [r4, #0x28] - cmp r1, #3 - bne _02230C70 - add r0, r0, #1 - str r0, [r4, #0x2c] - mov r0, #0 - str r0, [r4, #0x28] - b _02230E26 -_02230C70: - add r0, r1, #1 - str r0, [r4, #0x28] - b _02230E26 -_02230C76: - ldr r1, [r4, #0x28] - cmp r1, #4 - bne _02230C86 - add r0, r0, #1 - str r0, [r4, #0x2c] - mov r0, #0 - str r0, [r4, #0x28] - b _02230E26 -_02230C86: - ldr r0, [r4, #0] - add r1, sp, #0x24 - add r2, sp, #0x20 - bl sub_0200D638 - ldr r0, [r4, #4] - add r1, sp, #0x1c - add r2, sp, #0x18 - bl sub_0200D638 - ldr r1, [r4, #0x20] - ldr r0, _02230E5C ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - mov r1, #0x18 - ldrsb r1, [r4, r1] - ldr r2, [sp, #0x24] - neg r1, r1 - mul r0, r1 - add r0, r2, r0 - mov r1, #0x5a - str r0, [sp, #0x24] - str r0, [sp, #0x1c] - ldr r0, [r4, #0x20] - lsl r1, r1, #2 - add r0, #0x20 - str r0, [r4, #0x20] - bl sub_020E1F6C - str r1, [r4, #0x20] - ldr r0, [r4, #0] - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - bl sub_0200D614 - ldr r0, [r4, #4] - ldr r1, [sp, #0x1c] - ldr r2, [sp, #0x18] - bl sub_0200D614 - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] - b _02230E26 -_02230CEC: - ldr r3, _02230E60 ; =0x022488C0 - add r2, sp, #0x28 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r2, sp, #0 - ldr r0, [r4, #0] - add r1, sp, #4 - add r2, #2 - bl sub_0200D550 - ldr r0, [r4, #4] - add r1, sp, #4 - add r2, sp, #0 - bl sub_0200D550 - ldr r1, [r4, #0x28] - cmp r1, #0 - bne _02230D3A - mov r0, #0x16 - ldrsh r2, [r4, r0] - add r1, sp, #0 - mov r0, #4 - ldrsh r0, [r1, r0] - sub r0, r2, r0 - strh r0, [r4, #0x14] - mov r0, #0x14 - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x24] - bl sub_020E1F6C - strh r0, [r4, #0x14] - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] - b _02230D74 -_02230D3A: - ldr r0, [r4, #0x24] - add r0, r0, #1 - cmp r1, r0 - bne _02230D60 - mov r0, #0x16 - ldrsh r1, [r4, r0] - add r0, sp, #0 - strh r1, [r0, #4] - ldrb r0, [r4, #0x19] - lsl r1, r0, #2 - add r0, sp, #0x28 - ldr r0, [r0, r1] - str r0, [r4, #0x20] - ldr r0, [r4, #0x2c] - add r0, r0, #1 - str r0, [r4, #0x2c] - mov r0, #0 - str r0, [r4, #0x28] - b _02230D74 -_02230D60: - add r1, sp, #0 - mov r0, #4 - ldrsh r2, [r1, r0] - mov r0, #0x14 - ldrsh r0, [r4, r0] - add r0, r2, r0 - strh r0, [r1, #4] - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] -_02230D74: - add r3, sp, #0 - mov r1, #4 - mov r2, #2 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #0] - bl sub_0200D4C4 - add r3, sp, #0 - mov r1, #4 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #4] - bl sub_0200D4C4 - b _02230E26 -_02230D96: - ldr r0, [r4, #0x28] - cmp r0, #0 - bne _02230DAE - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0xc - add r2, sp, #0x10 - bl sub_0200D638 - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] -_02230DAE: - ldr r0, [r4, #0] - add r1, sp, #0x14 - add r2, sp, #0x10 - bl sub_0200D638 - ldr r0, [r4, #4] - add r1, sp, #0xc - add r2, sp, #8 - bl sub_0200D638 - ldr r1, [r4, #0x20] - ldr r0, _02230E5C ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - mov r2, #0x18 - ldrsb r2, [r4, r2] - ldr r1, [r4, #0xc] - neg r3, r2 - lsl r2, r0, #1 - add r0, r0, r2 - mul r0, r3 - add r0, r1, r0 - str r0, [sp, #0x14] - str r0, [sp, #0xc] - ldrb r0, [r4, #0x19] - lsr r2, r0, #0x1f - lsl r1, r0, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - ldr r0, [r4, #0x20] - beq _02230E02 - sub r0, r0, #4 - b _02230E04 -_02230E02: - add r0, r0, #4 -_02230E04: - str r0, [r4, #0x20] - mov r1, #0x5a - ldr r0, [r4, #0x20] - lsl r1, r1, #2 - bl sub_020E1F6C - str r1, [r4, #0x20] - ldr r0, [r4, #0] - ldr r1, [sp, #0x14] - ldr r2, [sp, #0x10] - bl sub_0200D614 - ldr r0, [r4, #4] - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - bl sub_0200D614 -_02230E26: - ldr r0, [r4, #0x2c] - cmp r0, #2 - blt _02230E58 - ldr r0, [r4, #0x10] - ldr r1, _02230E64 ; =0x3DCCCCCD - bl sub_020E1108 - bls _02230E58 - ldr r0, [r4, #0x10] - ldr r1, _02230E64 ; =0x3DCCCCCD - bl sub_020E1A9C - str r0, [r4, #0x10] - mov r2, #0xfe - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - lsl r2, r2, #0x16 - bl sub_0200D6E8 - mov r2, #0xfe - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - lsl r2, r2, #0x16 - bl sub_0200D6E8 -_02230E58: - add sp, #0x40 - pop {r4, pc} - ; .align 2, 0 -_02230E5C: .word 0x0000FFFF -_02230E60: .word 0x022488C0 -_02230E64: .word 0x3DCCCCCD - thumb_func_end ov62_02230C28 - - thumb_func_start ov62_02230E68 -ov62_02230E68: ; 0x02230E68 - push {r3, lr} - mov r3, #1 - lsl r3, r3, #0x14 - bl sub_0200D500 - pop {r3, pc} - thumb_func_end ov62_02230E68 - - thumb_func_start ov62_02230E74 -ov62_02230E74: ; 0x02230E74 - push {r3, lr} - mov r3, #1 - lsl r3, r3, #0x14 - bl sub_0200D5A0 - pop {r3, pc} - thumb_func_end ov62_02230E74 - - thumb_func_start ov62_02230E80 -ov62_02230E80: ; 0x02230E80 - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - add r6, r0, #0 - ldr r0, _02230FBC ; =0x02248890 - ldr r2, [r0, #8] - ldr r1, [r0, #0xc] - str r2, [sp, #0x2c] - str r1, [sp, #0x30] - ldr r1, [r0, #0x10] - ldr r0, [r0, #0x14] - str r1, [sp, #0x24] - str r0, [sp, #0x28] - mov r0, #0 - ldr r1, _02230FC0 ; =0x000005FC - str r0, [sp, #0x1c] - add r0, r6, r1 - sub r1, #0xc8 - str r0, [sp, #0x14] - add r0, r6, r1 - str r0, [sp, #0x10] -_02230EA8: - ldr r0, [sp, #0x14] - ldr r1, _02230FC4 ; =0x022488A8 - str r0, [sp, #0x34] - ldr r0, [sp, #0x10] - add r4, sp, #0x34 - str r0, [sp, #0x38] - mov r0, #0 - str r0, [sp, #0x18] - add r0, sp, #0x24 - str r0, [sp, #0xc] - ldr r0, [sp, #0x1c] - add r5, sp, #0x2c - add r0, r1, r0 - str r0, [sp, #8] - add r7, sp, #0x3c -_02230EC6: - add r0, r7, #0 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r6, #0x24] - add r1, r7, #0 - mov r2, #0x14 - mov r3, #2 - bl sub_0201A870 - add r0, r7, #0 - mov r1, #0x66 - bl sub_02012B20 - ldr r1, [r4, #0] - mov r2, #0x66 - str r0, [r1, #0x18] - ldr r1, [r5, #0] - add r0, r7, #0 - bl sub_02012898 - ldr r3, [r4, #0] - ldr r2, [r5, #0] - mov r1, #1 - add r3, #0x1c - bl sub_0201ED94 - ldr r0, [r4, #0] - add r1, sp, #0x20 - ldr r0, [r0, #0] - add r1, #2 - add r2, sp, #0x20 - bl sub_0200D550 - ldr r0, [r6, #0x50] - str r7, [sp, #0x50] - str r0, [sp, #0x4c] - ldr r0, [r6, #0x1c] - bl sub_0200D9B0 - str r0, [sp, #0x54] - ldr r1, [sp, #0xc] - ldr r0, [r6, #0x1c] - ldr r1, [r1, #0] - bl sub_0200D04C - str r0, [sp, #0x58] - ldr r0, [r4, #0] - add r1, sp, #0x20 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - str r0, [sp, #0x5c] - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - str r0, [sp, #0x60] - mov r0, #2 - ldrsh r0, [r1, r0] - add r0, #0x24 - str r0, [sp, #0x64] - mov r0, #0 - ldrsh r0, [r1, r0] - sub r0, #8 - str r0, [sp, #0x68] - mov r0, #3 - str r0, [sp, #0x6c] - ldr r0, [sp, #8] - ldrb r0, [r0] - sub r0, r0, #1 - str r0, [sp, #0x70] - ldr r0, [r5, #0] - str r0, [sp, #0x74] - mov r0, #0x66 - str r0, [sp, #0x78] - ldr r1, [r4, #0] - add r0, sp, #0x4c - ldr r1, [r1, #0x18] - bl sub_02012B60 - ldr r1, [r4, #0] - str r0, [r1, #0x14] - ldr r0, [r4, #0] - mov r1, #1 - ldr r0, [r0, #0x14] - bl sub_02012AC0 - add r0, r7, #0 - bl sub_0201A8FC - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0x14] - bl sub_020129D0 - ldr r0, [sp, #0xc] - add r4, r4, #4 - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r5, r5, #4 - add r0, r0, #5 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #2 - blt _02230EC6 - ldr r0, [sp, #0x14] - add r0, #0x28 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - add r0, #0x28 - str r0, [sp, #0x10] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #5 - bge _02230FB6 - b _02230EA8 -_02230FB6: - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - nop -_02230FBC: .word 0x02248890 -_02230FC0: .word 0x000005FC -_02230FC4: .word 0x022488A8 - thumb_func_end ov62_02230E80 - - thumb_func_start ov62_02230FC8 -ov62_02230FC8: ; 0x02230FC8 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r4, r0, #0 - add r5, r3, #0 - str r1, [sp, #0x10] - ldr r0, [r4, #0x48] - cmp r2, #8 - bne _02231058 - ldr r1, [r5, #0x18] - lsl r1, r1, #2 - add r3, r4, r1 - ldr r1, _02231134 ; =0x0000088C - ldr r1, [r3, r1] - cmp r1, #0 - bne _02230FF0 - add r1, r2, #0 - bl sub_0200B1EC - add r5, r0, #0 - b _022310E4 -_02230FF0: - mov r0, #0x66 - bl ov62_02231690 - add r6, r0, #0 - ldr r0, [r4, #0x48] - mov r1, #7 - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [r5, #0x18] - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02231134 ; =0x0000088C - ldr r0, [r1, r0] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x14] - ldr r1, [sp, #0x14] - add r0, r4, #0 - bl ov62_022349A8 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x14] - add r0, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl sub_0200C388 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 - b _022310E4 -_02231058: - cmp r2, #0x29 - bne _022310DC - ldr r1, [r5, #0x18] - lsl r1, r1, #2 - add r3, r4, r1 - ldr r1, _02231134 ; =0x0000088C - ldr r1, [r3, r1] - cmp r1, #0 - bne _02231074 - add r1, r2, #0 - bl sub_0200B1EC - add r5, r0, #0 - b _022310E4 -_02231074: - mov r0, #0x66 - bl ov62_02231690 - add r6, r0, #0 - ldr r0, [r4, #0x48] - mov r1, #7 - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [r5, #0x18] - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _02231134 ; =0x0000088C - ldr r0, [r1, r0] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r4, #0 - bl ov62_022349A8 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x18] - add r0, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r6, #0 - add r1, r5, #0 - add r2, r7, #0 - bl sub_0200C388 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 - b _022310E4 -_022310DC: - add r1, r2, #0 - bl sub_0200B1EC - add r5, r0, #0 -_022310E4: - add r0, sp, #0x1c - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0x24] - add r1, sp, #0x1c - mov r2, #0x14 - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02231138 ; =0x000E0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, sp, #0x1c - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x10] - ldr r0, [r0, #0x14] - ldr r1, [r1, #0x18] - add r2, sp, #0x1c - mov r3, #0x66 - bl sub_02012BE0 - add r0, r5, #0 - bl sub_020237BC - add r0, sp, #0x1c - bl sub_0201A8FC - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02231134: .word 0x0000088C -_02231138: .word 0x000E0D00 - thumb_func_end ov62_02230FC8 - - thumb_func_start ov62_0223113C -ov62_0223113C: ; 0x0223113C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r1, #0 - str r1, [sp] - ldr r1, _02231188 ; =0x000005FC - add r7, r0, r1 - sub r1, #0xc8 - add r6, r0, r1 -_0223114C: - str r7, [sp, #4] - str r6, [sp, #8] - mov r4, #0 - add r5, sp, #4 -_02231154: - ldr r0, [r5, #0] - ldr r0, [r0, #0x18] - bl sub_02012B48 - ldr r0, [r5, #0] - ldr r0, [r0, #0x14] - bl sub_02012BD8 - ldr r0, [r5, #0] - add r0, #0x1c - bl sub_0201EE28 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _02231154 - ldr r0, [sp] - add r7, #0x28 - add r0, r0, #1 - add r6, #0x28 - str r0, [sp] - cmp r0, #5 - blt _0223114C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02231188: .word 0x000005FC - thumb_func_end ov62_0223113C - - thumb_func_start ov62_0223118C -ov62_0223118C: ; 0x0223118C - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r7, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - ldr r6, _02231248 ; =0x0000270F - cmp r7, #2 - bne _0223119E - add r6, r6, #1 -_0223119E: - add r0, sp, #0xc - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0x10] - add r1, sp, #0xc - mov r2, #0x14 - mov r3, #2 - bl sub_0201A870 - add r0, sp, #0xc - mov r1, #0x66 - bl sub_02012B20 - str r0, [r5, #0xc] - add r0, sp, #0xc - add r1, r7, #0 - mov r2, #0x66 - bl sub_02012898 - add r3, r5, #0 - mov r1, #1 - add r2, r7, #0 - add r3, #0x10 - bl sub_0201ED94 - add r1, sp, #8 - ldr r0, [r5, #4] - add r1, #2 - add r2, sp, #8 - bl sub_0200D550 - ldr r0, [r4, #0x3c] - str r0, [sp, #0x1c] - add r0, sp, #0xc - str r0, [sp, #0x20] - ldr r0, [r4, #8] - bl sub_0200D9B0 - str r0, [sp, #0x24] - ldr r0, [r4, #8] - add r1, r6, #0 - bl sub_0200D04C - str r0, [sp, #0x28] - ldr r0, [r5, #4] - add r1, sp, #8 - ldr r0, [r0, #0] - str r0, [sp, #0x2c] - ldr r0, [r5, #0x14] - str r0, [sp, #0x30] - mov r0, #2 - ldrsh r0, [r1, r0] - add r0, #0x24 - str r0, [sp, #0x34] - mov r0, #0 - ldrsh r1, [r1, r0] - sub r1, #8 - str r0, [sp, #0x40] - mov r0, #0x66 - str r1, [sp, #0x38] - mov r1, #3 - str r0, [sp, #0x48] - str r7, [sp, #0x44] - str r1, [sp, #0x3c] - ldr r1, [r5, #0xc] - add r0, sp, #0x1c - bl sub_02012B60 - mov r1, #1 - str r0, [r5, #8] - bl sub_02012AC0 - add r0, sp, #0xc - bl sub_0201A8FC - ldr r0, [r5, #8] - mov r1, #0 - bl sub_020129D0 - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - nop -_02231248: .word 0x0000270F - thumb_func_end ov62_0223118C - - thumb_func_start ov62_0223124C -ov62_0223124C: ; 0x0223124C - push {r4, r5, r6, lr} - sub sp, #0x20 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x34] - add r1, r2, #0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, sp, #0x10 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0x10] - add r1, sp, #0x10 - mov r2, #0x14 - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022312AC ; =0x000E0D00 - add r2, r6, #0 - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, sp, #0x10 - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - add r2, sp, #0x10 - mov r3, #0x66 - bl sub_02012BE0 - add r0, r6, #0 - bl sub_020237BC - add r0, sp, #0x10 - bl sub_0201A8FC - add sp, #0x20 - pop {r4, r5, r6, pc} - nop -_022312AC: .word 0x000E0D00 - thumb_func_end ov62_0223124C - - thumb_func_start ov62_022312B0 -ov62_022312B0: ; 0x022312B0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - bl sub_02012B48 - ldr r0, [r4, #8] - bl sub_02012BD8 - add r4, #0x10 - add r0, r4, #0 - bl sub_0201EE28 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_022312B0 - - thumb_func_start ov62_022312CC -ov62_022312CC: ; 0x022312CC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r6, [r0, #0x14] - ldr r4, [r0, #0x18] - ldr r5, [r0, #0x1c] - mov r0, #0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, _02231318 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x31 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _02231318 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x1a - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02231318 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x1b - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02231318: .word 0x00002E94 - thumb_func_end ov62_022312CC - - thumb_func_start ov62_0223131C -ov62_0223131C: ; 0x0223131C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r6, [r0, #0x14] - ldr r4, [r0, #0x18] - ldr r5, [r0, #0x1c] - mov r0, #0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, _02231368 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x7a - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _02231368 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x7b - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02231368 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x7c - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02231368: .word 0x00002E94 - thumb_func_end ov62_0223131C - - thumb_func_start ov62_0223136C -ov62_0223136C: ; 0x0223136C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r6, [r0, #0x14] - ldr r4, [r0, #0x18] - ldr r5, [r0, #0x1c] - mov r0, #0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, _022313B8 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x1e - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _022313B8 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x20 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _022313B8 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x1f - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022313B8: .word 0x00002E94 - thumb_func_end ov62_0223136C - - thumb_func_start ov62_022313BC -ov62_022313BC: ; 0x022313BC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r1, _022313DC ; =0x00002E94 - bl sub_0200D070 - ldr r0, [r4, #0x1c] - ldr r1, _022313DC ; =0x00002E94 - bl sub_0200D090 - ldr r0, [r4, #0x1c] - ldr r1, _022313DC ; =0x00002E94 - bl sub_0200D0A0 - pop {r4, pc} - nop -_022313DC: .word 0x00002E94 - thumb_func_end ov62_022313BC - - thumb_func_start ov62_022313E0 -ov62_022313E0: ; 0x022313E0 - push {r3, r4, lr} - sub sp, #0x34 - add r2, r0, #0 - mov r3, #0x80 - add r0, sp, #0 - strh r3, [r0] - mov r3, #0x60 - strh r3, [r0, #2] - mov r3, #0 - strh r3, [r0, #4] - strh r3, [r0, #6] - mov r0, #1 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0x2c] - sub r0, r0, #4 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r0, _02231448 ; =0x00002E94 - str r3, [sp, #0xc] - str r1, [sp, #0x10] - str r3, [sp, #0x30] - str r0, [sp, #0x14] - str r0, [sp, #0x1c] - str r0, [sp, #0x20] - cmp r1, #1 - bne _0223141C - ldr r0, _0223144C ; =0x0000270F - str r0, [sp, #0x18] - b _02231420 -_0223141C: - ldr r0, _02231450 ; =0x00002710 - str r0, [sp, #0x18] -_02231420: - ldr r0, [r2, #0x18] - ldr r1, [r2, #0x1c] - add r2, sp, #0 - bl sub_0200CE6C - add r4, r0, #0 - mov r1, #2 - bl sub_0200D41C - add r0, r4, #0 - mov r1, #0 - bl sub_0200D364 - add r0, r4, #0 - bl sub_0200D330 - add r0, r4, #0 - add sp, #0x34 - pop {r3, r4, pc} - nop -_02231448: .word 0x00002E94 -_0223144C: .word 0x0000270F -_02231450: .word 0x00002710 - thumb_func_end ov62_022313E0 - - thumb_func_start ov62_02231454 -ov62_02231454: ; 0x02231454 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - bl ov62_02230B9C - add r0, r4, #0 - bl ov62_02230B74 - add r0, r4, #0 - bl ov62_022307A0 - pop {r4, pc} - thumb_func_end ov62_02231454 - - thumb_func_start ov62_0223146C -ov62_0223146C: ; 0x0223146C - push {r4, lr} - add r4, r0, #0 - bl ov62_022306B8 - add r0, r4, #0 - bl ov62_02230060 - add r0, r4, #0 - bl sub_0208C06C - add r0, r4, #0 - bl ov62_0223088C - add r0, r4, #0 - mov r1, #1 - bl ov62_02230B9C - add r0, r4, #0 - bl ov62_02230A5C - add r0, r4, #0 - bl ov62_02230AB8 - add r0, r4, #0 - bl ov62_022307C0 - add r0, r4, #0 - bl ov62_02230AF0 - pop {r4, pc} - thumb_func_end ov62_0223146C - - thumb_func_start ov62_022314A8 -ov62_022314A8: ; 0x022314A8 - push {r4, lr} - add r4, r0, #0 - bl ov62_022306B8 - add r0, r4, #0 - bl ov62_02230060 - add r0, r4, #0 - bl sub_0208C06C - add r0, r4, #0 - bl ov62_0223088C - add r0, r4, #0 - mov r1, #1 - bl ov62_02230B9C - add r0, r4, #0 - bl ov62_02230A5C - add r0, r4, #0 - bl ov62_02230AB8 - add r0, r4, #0 - bl ov62_022307C0 - add r0, r4, #0 - bl ov62_02230AF0 - ldr r0, _022314EC ; =0x000006D8 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_022314EC: .word 0x000006D8 - thumb_func_end ov62_022314A8 - - thumb_func_start ov62_022314F0 -ov62_022314F0: ; 0x022314F0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0 - str r0, [r5, #0] - add r4, r1, #0 - mov r0, #0x1f - str r0, [r4, #0] - ldr r0, [sp, #0x20] - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - bne _02231528 - ldr r0, [r4, #0] - add r1, r6, #0 - str r0, [sp] - ldr r0, _02231558 ; =0x04000050 - ldr r3, [r5, #0] - add r2, r7, #0 - bl sub_020BF55C - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r0, _0223155C ; =0x04001050 - ldr r2, [sp, #0x1c] - ldr r3, [r5, #0] - bl sub_020BF55C -_02231528: - ldr r0, [sp, #0x20] - cmp r0, #1 - bne _0223153E - ldr r0, [r4, #0] - add r1, r6, #0 - str r0, [sp] - ldr r0, _02231558 ; =0x04000050 - ldr r3, [r5, #0] - add r2, r7, #0 - bl sub_020BF55C -_0223153E: - ldr r0, [sp, #0x20] - cmp r0, #2 - bne _02231554 - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r0, _0223155C ; =0x04001050 - ldr r2, [sp, #0x1c] - ldr r3, [r5, #0] - bl sub_020BF55C -_02231554: - pop {r3, r4, r5, r6, r7, pc} - nop -_02231558: .word 0x04000050 -_0223155C: .word 0x04001050 - thumb_func_end ov62_022314F0 - - thumb_func_start ov62_02231560 -ov62_02231560: ; 0x02231560 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [sp, #0x20] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - bne _02231590 - ldr r0, [r4, #0] - add r1, r6, #0 - str r0, [sp] - ldr r0, _022315C0 ; =0x04000050 - ldr r3, [r5, #0] - add r2, r7, #0 - bl sub_020BF55C - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r0, _022315C4 ; =0x04001050 - ldr r2, [sp, #0x1c] - ldr r3, [r5, #0] - bl sub_020BF55C -_02231590: - ldr r0, [sp, #0x20] - cmp r0, #1 - bne _022315A6 - ldr r0, [r4, #0] - add r1, r6, #0 - str r0, [sp] - ldr r0, _022315C0 ; =0x04000050 - ldr r3, [r5, #0] - add r2, r7, #0 - bl sub_020BF55C -_022315A6: - ldr r0, [sp, #0x20] - cmp r0, #2 - bne _022315BC - ldr r0, [r4, #0] - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r0, _022315C4 ; =0x04001050 - ldr r2, [sp, #0x1c] - ldr r3, [r5, #0] - bl sub_020BF55C -_022315BC: - pop {r3, r4, r5, r6, r7, pc} - nop -_022315C0: .word 0x04000050 -_022315C4: .word 0x04001050 - thumb_func_end ov62_02231560 - - thumb_func_start ov62_022315C8 -ov62_022315C8: ; 0x022315C8 - push {r3, r4, lr} - sub sp, #0xc - mov r4, #8 - str r4, [sp] - mov r3, #0x12 - str r3, [sp, #4] - str r2, [sp, #8] - add r2, r4, #0 - bl ov62_022314F0 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov62_022315C8 - - thumb_func_start ov62_022315E0 -ov62_022315E0: ; 0x022315E0 - push {r4, r5} - mov r4, #1 - cmp r2, #0 - ldr r2, [r0, #0] - bne _02231602 - cmp r2, #8 - bge _022315F4 - add r2, r2, #1 - str r2, [r0, #0] - mov r4, #0 -_022315F4: - ldr r2, [r1, #0] - cmp r2, #7 - ble _02231618 - sub r2, r2, #3 - str r2, [r1, #0] - mov r4, #0 - b _02231618 -_02231602: - cmp r2, #0 - ble _0223160C - sub r2, r2, #1 - str r2, [r0, #0] - mov r4, #0 -_0223160C: - ldr r2, [r1, #0] - cmp r2, #0x1f - bge _02231618 - add r2, r2, #3 - str r2, [r1, #0] - mov r4, #0 -_02231618: - cmp r3, #0 - bne _02231634 - ldr r2, [r1, #0] - ldr r5, [r0, #0] - lsl r2, r2, #8 - orr r5, r2 - ldr r2, _0223165C ; =0x04000052 - strh r5, [r2] - ldr r2, [r1, #0] - ldr r5, [r0, #0] - lsl r2, r2, #8 - orr r5, r2 - ldr r2, _02231660 ; =0x04001052 - strh r5, [r2] -_02231634: - cmp r3, #1 - bne _02231644 - ldr r2, [r1, #0] - ldr r5, [r0, #0] - lsl r2, r2, #8 - orr r5, r2 - ldr r2, _0223165C ; =0x04000052 - strh r5, [r2] -_02231644: - cmp r3, #2 - bne _02231656 - ldr r2, [r0, #0] - ldr r0, [r1, #0] - add r1, r2, #0 - lsl r0, r0, #8 - orr r1, r0 - ldr r0, _02231660 ; =0x04001052 - strh r1, [r0] -_02231656: - add r0, r4, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 -_0223165C: .word 0x04000052 -_02231660: .word 0x04001052 - thumb_func_end ov62_022315E0 - - thumb_func_start ov62_02231664 -ov62_02231664: ; 0x02231664 - mov r2, #1 - cmp r1, #1 - ldr r1, [r0, #0] - bne _02231678 - cmp r1, #0x10 - bge _02231682 - add r1, r1, #2 - str r1, [r0, #0] - mov r2, #0 - b _02231682 -_02231678: - cmp r1, #0 - ble _02231682 - sub r1, r1, #2 - str r1, [r0, #0] - mov r2, #0 -_02231682: - add r0, r2, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov62_02231664 - - thumb_func_start ov62_02231688 -ov62_02231688: ; 0x02231688 - mov r1, #0x10 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov62_02231688 - - thumb_func_start ov62_02231690 -ov62_02231690: ; 0x02231690 - ldr r3, _0223169C ; =sub_0200B368 - add r2, r0, #0 - mov r0, #4 - mov r1, #0x40 - bx r3 - nop -_0223169C: .word sub_0200B368 - thumb_func_end ov62_02231690 - - thumb_func_start ov62_022316A0 -ov62_022316A0: ; 0x022316A0 - push {r3, r4, r5} - sub sp, #0x1c - ldr r4, _022316CC ; =0x02248944 - add r5, r0, #0 - ldmia r4!, {r0, r1} - add r3, sp, #0 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - add r5, #0x5c - str r0, [r3, #0] - ldrb r0, [r5] - lsl r0, r0, #2 - ldr r0, [r2, r0] - add sp, #0x1c - pop {r3, r4, r5} - bx lr - nop -_022316CC: .word 0x02248944 - thumb_func_end ov62_022316A0 - - thumb_func_start ov62_022316D0 -ov62_022316D0: ; 0x022316D0 - push {r3, r4, r5} - sub sp, #0x1c - ldr r4, _02231708 ; =0x0224897C - add r5, r0, #0 - ldmia r4!, {r0, r1} - add r3, sp, #0 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - ldr r0, [r5, #0] - cmp r0, #0 - beq _022316FA - add sp, #0x1c - ldr r0, _0223170C ; =0x00007E05 - pop {r3, r4, r5} - bx lr -_022316FA: - add r5, #0x5c - ldrb r0, [r5] - lsl r0, r0, #2 - ldr r0, [r2, r0] - add sp, #0x1c - pop {r3, r4, r5} - bx lr - ; .align 2, 0 -_02231708: .word 0x0224897C -_0223170C: .word 0x00007E05 - thumb_func_end ov62_022316D0 - - thumb_func_start ov62_02231710 -ov62_02231710: ; 0x02231710 - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - ldr r4, _022317BC ; =0x02248998 - add r5, r0, #0 - add r2, r1, #0 - add r3, sp, #0x58 - ldmia r4!, {r0, r1} - str r3, [sp] - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r4, _022317C0 ; =0x02248928 - str r0, [r3, #0] - add r3, sp, #0x3c - ldmia r4!, {r0, r1} - mov ip, r3 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r4, _022317C4 ; =0x022489B4 - str r0, [r3, #0] - add r3, sp, #0x20 - ldmia r4!, {r0, r1} - add r7, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r4, _022317C8 ; =0x02248960 - str r0, [r3, #0] - add r3, sp, #4 - ldmia r4!, {r0, r1} - add r6, r3, #0 - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - add r5, #0x5c - str r0, [r3, #0] - ldrb r0, [r5] - cmp r2, #3 - bhi _022317B0 - add r1, r2, r2 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02231784: ; jump table - .short _0223178C - _02231784 - 2 ; case 0 - .short _02231796 - _02231784 - 2 ; case 1 - .short _022317A0 - _02231784 - 2 ; case 2 - .short _022317A8 - _02231784 - 2 ; case 3 -_0223178C: - lsl r1, r0, #2 - ldr r0, [sp] - add sp, #0x74 - ldr r0, [r0, r1] - pop {r4, r5, r6, r7, pc} -_02231796: - lsl r1, r0, #2 - mov r0, ip - add sp, #0x74 - ldr r0, [r0, r1] - pop {r4, r5, r6, r7, pc} -_022317A0: - lsl r0, r0, #2 - add sp, #0x74 - ldr r0, [r7, r0] - pop {r4, r5, r6, r7, pc} -_022317A8: - lsl r0, r0, #2 - add sp, #0x74 - ldr r0, [r6, r0] - pop {r4, r5, r6, r7, pc} -_022317B0: - bl sub_02022974 - ldr r0, [sp, #0x58] - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - nop -_022317BC: .word 0x02248998 -_022317C0: .word 0x02248928 -_022317C4: .word 0x022489B4 -_022317C8: .word 0x02248960 - thumb_func_end ov62_02231710 - - thumb_func_start ov62_022317CC -ov62_022317CC: ; 0x022317CC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - ldr r1, [r5, #0x18] - ldr r4, [r5, #0x28] - str r1, [sp, #0x18] - ldr r7, [r5, #0x1c] - ldr r6, [r5, #0x14] - mov r1, #3 - bl ov62_02231710 - add r2, r0, #0 - mov r1, #0 - mov r0, #0x12 - str r1, [sp] - lsl r0, r0, #4 - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r4, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r0, r5, #0 - mov r1, #3 - bl ov62_02231710 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x12 - lsl r0, r0, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r0, r5, #0 - mov r1, #0 - bl ov62_02231710 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r0, r5, #0 - mov r1, #0 - bl ov62_02231710 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xa2 - mov r3, #0x66 - bl sub_02003050 - add r1, r5, #0 - mov r0, #0x6f - add r1, #0x5c - lsl r0, r0, #4 - ldrb r1, [r1] - ldr r0, [r5, r0] - bl sub_0208B63C - add r1, r5, #0 - mov r0, #0x6f - add r1, #0x5c - lsl r0, r0, #4 - ldrb r1, [r1] - ldr r0, [r5, r0] - bl sub_0208B63C - ldr r1, _022318E0 ; =0x0000270F - add r0, r7, #0 - bl sub_0200D080 - ldr r1, _022318E4 ; =0x00002710 - add r0, r7, #0 - bl sub_0200D080 - add r0, r5, #0 - mov r1, #2 - bl ov62_02231710 - str r6, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _022318E0 ; =0x0000270F - ldr r2, [sp, #0x18] - str r0, [sp, #0x14] - add r0, r4, #0 - mov r1, #2 - add r3, r7, #0 - bl sub_0200CDC4 - add r0, r5, #0 - mov r1, #2 - bl ov62_02231710 - str r6, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _022318E4 ; =0x00002710 - ldr r2, [sp, #0x18] - str r0, [sp, #0x14] - add r0, r4, #0 - add r3, r7, #0 - bl sub_0200CDC4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_022318E0: .word 0x0000270F -_022318E4: .word 0x00002710 - thumb_func_end ov62_022317CC - - thumb_func_start ov62_022318E8 -ov62_022318E8: ; 0x022318E8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x58] - ldr r2, _02231944 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r1, #2 - mov r3, #0 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - ldr r2, _02231944 ; =0x0000FFFF - add r3, r1, #0 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02231944 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r1, #3 - mov r3, #0 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02231944 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r1, #1 - mov r3, #0 - bl sub_02003A2C - add sp, #4 - pop {r3, r4, pc} - nop -_02231944: .word 0x0000FFFF - thumb_func_end ov62_022318E8 - - thumb_func_start ov62_02231948 -ov62_02231948: ; 0x02231948 - push {r3, r4, lr} - sub sp, #0xc - add r4, r2, #0 - mov r2, #0 - add r3, r0, #0 - str r2, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0x4b - mov r1, #0xd - bl sub_02007068 - ldr r1, [sp, #8] - lsr r1, r1, #1 - str r1, [r4, #0] - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02231948 - - thumb_func_start ov62_0223196C -ov62_0223196C: ; 0x0223196C - mov r2, #0x87 - lsl r2, r2, #4 - str r1, [r0, r2] - bx lr - thumb_func_end ov62_0223196C - - thumb_func_start ov62_02231974 -ov62_02231974: ; 0x02231974 - mov r1, #0x87 - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov62_02231974 - - thumb_func_start ov62_0223197C -ov62_0223197C: ; 0x0223197C - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - ldr r4, _02231A10 ; =0x000008A4 - add r6, r1, #0 - add r5, r0, #0 - sub r1, r4, #4 - ldr r1, [r5, r1] - cmp r1, #1 - beq _02231A0C - mov r2, #1 - sub r1, r4, #4 - str r2, [r5, r1] - mov r1, #6 - mov r2, #0 - bl ov62_022302A8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, _02231A14 ; =0x04001050 - mov r1, #0 - strh r1, [r0] - mov r0, #6 - bl sub_02019060 - add r0, r5, r4 - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r5, r4 - mov r2, #6 - mov r3, #1 - bl sub_0201A7E8 - ldr r0, [r5, #0x48] - add r1, r6, #0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, r4 - mov r1, #0xcc - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02231A18 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, r4 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC -_02231A0C: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02231A10: .word 0x000008A4 -_02231A14: .word 0x04001050 -_02231A18: .word 0x000F0D0C - thumb_func_end ov62_0223197C - - thumb_func_start ov62_02231A1C -ov62_02231A1C: ; 0x02231A1C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x8a - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0 - beq _02231A78 - mov r1, #0 - str r1, [r4, r0] - add r0, r0, #4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _02231A7C ; =0x000008A4 - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - mov r0, #8 - str r0, [sp] - ldr r0, _02231A80 ; =0x04000050 - mov r1, #4 - mov r2, #0x12 - mov r3, #7 - bl sub_020BF55C - mov r0, #8 - str r0, [sp] - ldr r0, _02231A84 ; =0x04001050 - mov r1, #4 - mov r2, #0x12 - mov r3, #7 - bl sub_020BF55C -_02231A78: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02231A7C: .word 0x000008A4 -_02231A80: .word 0x04000050 -_02231A84: .word 0x04001050 - thumb_func_end ov62_02231A1C - - thumb_func_start ov62_02231A88 -ov62_02231A88: ; 0x02231A88 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02231AA8 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _02231AA8 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - pop {r4, pc} - nop -_02231AA8: .word 0x000008A4 - thumb_func_end ov62_02231A88 - - thumb_func_start ov62_02231AAC -ov62_02231AAC: ; 0x02231AAC - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - ldr r4, _02231B34 ; =0x000008A4 - add r6, r1, #0 - add r5, r0, #0 - sub r1, r4, #4 - ldr r1, [r5, r1] - cmp r1, #1 - beq _02231B30 - mov r2, #1 - sub r1, r4, #4 - str r2, [r5, r1] - mov r1, #2 - mov r2, #0 - bl ov62_022302A8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, r4 - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r5, r4 - mov r2, #2 - mov r3, #1 - bl sub_0201A7E8 - ldr r0, [r5, #0x48] - add r1, r6, #0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, r4 - mov r1, #0xcc - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02231B38 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, r4 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC -_02231B30: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02231B34: .word 0x000008A4 -_02231B38: .word 0x000F0D0C - thumb_func_end ov62_02231AAC - - thumb_func_start ov62_02231B3C -ov62_02231B3C: ; 0x02231B3C - push {r4, r5, r6, lr} - sub sp, #0x10 - ldr r6, _02231B84 ; =0x000008A4 - add r5, r0, #0 - sub r0, r6, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02231B80 - ldr r0, [r5, #0x48] - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, r6 - mov r1, #0xcc - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02231B88 ; =0x000F0D0C - add r2, r4, #0 - str r0, [sp, #8] - add r0, r5, r6 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, r6 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC -_02231B80: - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02231B84: .word 0x000008A4 -_02231B88: .word 0x000F0D0C - thumb_func_end ov62_02231B3C - - thumb_func_start ov62_02231B8C -ov62_02231B8C: ; 0x02231B8C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x8a - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0 - beq _02231BBE - mov r1, #0 - str r1, [r4, r0] - add r0, r0, #4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _02231BC0 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C -_02231BBE: - pop {r4, pc} - ; .align 2, 0 -_02231BC0: .word 0x000008A4 - thumb_func_end ov62_02231B8C - - thumb_func_start ov62_02231BC4 -ov62_02231BC4: ; 0x02231BC4 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - ldr r4, _02231C6C ; =0x000008A4 - add r5, r0, #0 - sub r0, r4, #4 - ldr r0, [r5, r0] - add r6, r1, #0 - cmp r0, #1 - beq _02231C66 - add r0, r4, #0 - sub r0, #8 - ldr r0, [r5, r0] - cmp r0, #1 - beq _02231C66 - mov r1, #1 - sub r0, r4, #4 - str r1, [r5, r0] - add r0, r4, #0 - sub r0, #8 - str r1, [r5, r0] - ldr r0, _02231C70 ; =0x04001050 - mov r1, #0 - strh r1, [r0] - mov r0, #6 - bl sub_02019060 - add r0, r5, #0 - mov r1, #6 - mov r2, #0 - bl ov62_022302A8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r5, r4 - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r5, r4 - mov r2, #6 - mov r3, #1 - bl sub_0201A7E8 - ldr r0, [r5, #0x48] - add r1, r6, #0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, r4 - mov r1, #0xcc - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02231C74 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, r4 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC -_02231C66: - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_02231C6C: .word 0x000008A4 -_02231C70: .word 0x04001050 -_02231C74: .word 0x000F0D0C - thumb_func_end ov62_02231BC4 - - thumb_func_start ov62_02231C78 -ov62_02231C78: ; 0x02231C78 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xd8 - ldr r3, _02232004 ; =0x02248A28 - add r7, r1, #0 - str r0, [sp, #0x14] - add r2, sp, #0x88 - mov r1, #0x28 -_02231C86: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _02231C86 - ldr r4, _02232008 ; =0x022489F8 - add r3, sp, #0x58 - mov r2, #6 -_02231C98: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02231C98 - mov r0, #1 - str r0, [sp, #0x24] - mov r0, #0 - ldr r4, [sp, #0x14] - str r0, [sp, #0x28] - add r0, sp, #0x58 - add r4, #0xc - str r0, [sp, #0x1c] - add r5, sp, #0x88 -_02231CB2: - ldr r1, [sp, #0x1c] - ldr r0, [r7, #0x48] - ldr r1, [r1, #0] - bl sub_0200B1EC - add r6, r0, #0 - add r0, r4, #0 - bl sub_0201A7A0 - mov r0, #2 - ldrsh r0, [r5, r0] - mov r3, #0 - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #4 - ldrsh r0, [r5, r0] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #6 - ldrsh r0, [r5, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [sp, #0x24] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrsh r3, [r5, r3] - ldr r0, [r7, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r4, #0 - add r1, r6, #0 - bl ov62_0223429C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r6, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - mov r0, #4 - ldrsh r1, [r5, r0] - mov r0, #6 - ldrsh r0, [r5, r0] - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x24] - add r0, r0, r2 - str r0, [sp, #0x24] - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x1c] - add r4, #0x10 - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x28] - add r5, #8 - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, #8 - blt _02231CB2 - ldr r0, [sp, #0x14] - ldr r0, [r0, #0] - str r0, [sp, #0x20] - mov r0, #0x66 - bl ov62_02231690 - add r4, r0, #0 - ldr r5, [sp, #0x14] - ldr r0, [sp, #0x20] - mov r1, #0x66 - add r5, #0xc - bl sub_02030B94 - str r0, [sp, #0x2c] - ldr r1, [sp, #0x2c] - add r0, r7, #0 - bl ov62_022349A8 - ldr r0, [r7, #0x48] - mov r1, #0xd - bl sub_0200B1EC - str r0, [sp, #0x30] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x2c] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x30] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x2c] - bl sub_020237BC - ldr r0, [sp, #0x30] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200C41C - ldr r0, [sp, #0x20] - bl sub_02030CCC - str r0, [sp, #0x34] - ldr r5, [sp, #0x14] - ldr r0, [r7, #0x48] - mov r1, #0xf - add r5, #0x2c - bl sub_0200B1EC - str r0, [sp, #0x38] - ldr r0, [sp, #0x20] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x3c] - ldr r1, [sp, #0x3c] - add r0, r7, #0 - bl ov62_022349A8 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r2, [sp, #0x34] - add r0, r4, #0 - mov r1, #0 - bl sub_0200C2E0 - ldr r2, [sp, #0x38] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x38] - bl sub_020237BC - ldr r0, [sp, #0x3c] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200C41C - ldr r5, [sp, #0x14] - ldr r0, [r7, #0x48] - add r5, #0x3c - mov r1, #0x10 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_02030BFC - add r6, r0, #0 - ldr r0, [sp, #0x20] - bl sub_02030C08 - ldr r5, [sp, #0x14] - str r0, [sp, #0x40] - add r5, #0x4c - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - cmp r6, #0 - bne _02231F18 - ldr r0, [r7, #0x48] - mov r1, #0x15 - bl sub_0200B1EC - mov r1, #0 - add r6, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - b _02231FD2 -_02231F18: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x44] - ldr r0, [r7, #0x48] - mov r1, #0x16 - bl sub_0200B1EC - str r0, [sp, #0x48] - add r0, r4, #0 - mov r1, #0 - add r2, r6, #0 - bl sub_0200BDD0 - ldr r1, [sp, #0x44] - ldr r2, [sp, #0x48] - add r0, r4, #0 - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - ldr r2, [sp, #0x44] - str r0, [sp, #8] - add r0, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x44] - bl sub_020237BC - ldr r0, [sp, #0x48] - bl sub_020237BC - ldr r0, [sp, #0x40] - cmp r0, #0 - beq _02231FD2 - ldr r0, [sp, #0x14] - mov r1, #0 - str r0, [sp, #0x18] - add r0, #0x5c - str r0, [sp, #0x18] - bl sub_0201ADA4 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r5, r0, #0 - ldr r0, [r7, #0x48] - mov r1, #0x17 - bl sub_0200B1EC - str r0, [sp, #0x4c] - ldr r3, [sp, #0x40] - add r0, r4, #0 - mov r1, #0 - add r2, r6, #0 - bl sub_0200BE08 - ldr r2, [sp, #0x4c] - add r0, r4, #0 - add r1, r5, #0 - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x18] - mov r3, #4 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x18] - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - ldr r0, [sp, #0x4c] - bl sub_020237BC -_02231FD2: - add r0, r4, #0 - bl sub_0200C41C - ldr r5, [sp, #0x14] - ldr r0, [r7, #0x48] - add r5, #0x6c - mov r1, #0x11 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223200C ; =0x000F0D00 - b _02232010 - ; .align 2, 0 -_02232004: .word 0x02248A28 -_02232008: .word 0x022489F8 -_0223200C: .word 0x000F0D00 -_02232010: - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - add r1, sp, #0x50 - add r0, #0x7c - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - mov r2, #0x66 - bl sub_02030C28 - add r5, r0, #0 - bne _02232046 - add r0, sp, #0x50 - mov r1, #0x66 - bl sub_02014B34 - add r5, r0, #0 -_02232046: - ldr r0, [sp, #0x14] - mov r1, #0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223207C ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x14] - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200B3F0 - add sp, #0xd8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223207C: .word 0x000F0D00 - thumb_func_end ov62_02231C78 - - thumb_func_start ov62_02232080 -ov62_02232080: ; 0x02232080 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0xc -_02232088: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #8 - blt _02232088 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02232080 - - thumb_func_start ov62_022320A0 -ov62_022320A0: ; 0x022320A0 - push {r3, lr} - ldr r0, [r0, #4] - cmp r0, #0 - beq _022320AC - bl sub_0200D3F4 -_022320AC: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_022320A0 - - thumb_func_start ov62_022320B0 -ov62_022320B0: ; 0x022320B0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0x1c] - ldr r1, _022320E8 ; =0x000186A0 - bl sub_0200D070 - ldr r0, [r5, #0x1c] - ldr r1, _022320E8 ; =0x000186A0 - bl sub_0200D080 - ldr r0, [r5, #0x1c] - ldr r1, _022320E8 ; =0x000186A0 - bl sub_0200D090 - ldr r0, [r5, #0x1c] - ldr r1, _022320E8 ; =0x000186A0 - bl sub_0200D0A0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _022320E4 - bl sub_0200D0F4 - mov r0, #0 - str r0, [r4, #4] -_022320E4: - pop {r3, r4, r5, pc} - nop -_022320E8: .word 0x000186A0 - thumb_func_end ov62_022320B0 - - thumb_func_start ov62_022320EC -ov62_022320EC: ; 0x022320EC - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - add r5, r0, #0 - add r0, r1, #0 - ldr r6, [r1, #0x18] - ldr r4, [r0, #0x1c] - ldr r7, [r0, #0x28] - str r1, [sp, #0x18] - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _022321F0 ; =0x000186A0 - mov r1, #2 - str r0, [sp, #0x14] - add r0, r7, #0 - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CD7C - str r0, [sp, #0x1c] - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _022321F0 ; =0x000186A0 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _022321F0 ; =0x000186A0 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x13 - bl sub_0200CE3C - ldr r0, [r5, #0] - bl sub_02030BBC - add r7, r0, #0 - ldr r0, [r5, #0] - bl sub_02030BCC - str r0, [sp, #0x20] - ldr r0, [r5, #0] - bl sub_02030BEC - str r0, [sp, #0x24] - cmp r7, #0 - beq _022321EC - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x20] - add r0, r7, #0 - bl sub_02079D8C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022321F0 ; =0x000186A0 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r6, #0 - mov r2, #0x13 - bl sub_0200D888 - mov r1, #0x4c - add r0, sp, #0x28 - strh r1, [r0] - mov r1, #0x3c - strh r1, [r0, #2] - mov r2, #0 - strh r2, [r0, #4] - strh r2, [r0, #6] - ldr r0, _022321F0 ; =0x000186A0 - mov r1, #1 - str r0, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - sub r0, r1, #2 - str r1, [sp, #0x38] - str r0, [sp, #0x4c] - str r0, [sp, #0x50] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x18] - str r2, [sp, #0x30] - str r2, [sp, #0x34] - str r2, [sp, #0x54] - str r2, [sp, #0x58] - ldr r0, [r0, #0x18] - ldr r1, [r1, #0x1c] - add r2, sp, #0x28 - bl sub_0200CE6C - str r0, [r5, #4] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x24] - add r0, r7, #0 - bl sub_02079EDC - add r2, r0, #0 - ldr r1, [sp, #0x1c] - ldr r0, [r5, #4] - add r1, r1, r2 - bl sub_0200D430 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0200D364 -_022321EC: - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022321F0: .word 0x000186A0 - thumb_func_end ov62_022320EC - - thumb_func_start ov62_022321F4 -ov62_022321F4: ; 0x022321F4 - ldr r3, _022321FC ; =sub_0200D3F4 - ldr r0, [r0, #8] - bx r3 - nop -_022321FC: .word sub_0200D3F4 - thumb_func_end ov62_022321F4 - - thumb_func_start ov62_02232200 -ov62_02232200: ; 0x02232200 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x1c] - ldr r1, _02232230 ; =0x0002869F - bl sub_0200D070 - ldr r0, [r4, #0x1c] - ldr r1, _02232230 ; =0x0002869F - bl sub_0200D080 - ldr r0, [r4, #0x1c] - ldr r1, _02232230 ; =0x0002869F - bl sub_0200D090 - ldr r0, [r4, #0x1c] - ldr r1, _02232230 ; =0x0002869F - bl sub_0200D0A0 - ldr r0, [r5, #8] - bl sub_0200D0F4 - pop {r3, r4, r5, pc} - nop -_02232230: .word 0x0002869F - thumb_func_end ov62_02232200 - - thumb_func_start ov62_02232234 -ov62_02232234: ; 0x02232234 - push {r4, lr} - add r4, r1, #0 - cmp r0, #0x10 - bgt _02232240 - cmp r0, #0 - bge _02232246 -_02232240: - bl sub_02022974 - mov r0, #0 -_02232246: - cmp r4, #4 - bne _02232252 - mov r1, #0x4f - lsl r1, r1, #2 - add r0, r0, r1 - pop {r4, pc} -_02232252: - cmp r4, #5 - blt _0223225A - mov r0, #0 - pop {r4, pc} -_0223225A: - lsl r2, r0, #4 - ldr r0, _02232268 ; =0x02248AD8 - lsl r1, r4, #2 - add r0, r0, r2 - ldr r0, [r1, r0] - pop {r4, pc} - nop -_02232268: .word 0x02248AD8 - thumb_func_end ov62_02232234 - - thumb_func_start ov62_0223226C -ov62_0223226C: ; 0x0223226C - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - add r5, r0, #0 - mov r0, #0xe - str r0, [sp, #0x20] - ldr r0, [r5, #0] - str r1, [sp, #0x18] - mov r7, #0xd - bl sub_02030BAC - ldr r1, [sp, #0x18] - ldr r2, _02232370 ; =0x0000086C - ldr r6, [r1, #0x18] - ldr r4, [r1, #0x1c] - ldr r1, [r1, #0x28] - str r1, [sp, #0x24] - ldr r1, [sp, #0x18] - ldr r1, [r1, r2] - cmp r1, #0 - bne _022322A0 - cmp r0, #1 - bne _022322C4 - mov r0, #0x10 - mov r7, #0xf - str r0, [sp, #0x20] - b _022322C4 -_022322A0: - ldr r0, [r5, #0] - bl sub_02030CDC - str r0, [sp, #0x1c] - cmp r0, #0x10 - blt _022322B0 - mov r0, #0 - str r0, [sp, #0x1c] -_022322B0: - ldr r0, [sp, #0x1c] - mov r1, #2 - bl ov62_02232234 - add r7, r0, #0 - ldr r0, [sp, #0x1c] - mov r1, #3 - bl ov62_02232234 - str r0, [sp, #0x20] -_022322C4: - mov r0, #0x92 - str r0, [sp] - str r7, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02232374 ; =0x0002869F - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CD7C - mov r0, #0 - str r0, [sp] - ldr r0, _02232374 ; =0x0002869F - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x92 - mov r3, #9 - bl sub_0200CE0C - mov r0, #0 - str r0, [sp] - ldr r0, _02232374 ; =0x0002869F - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x92 - mov r3, #0xa - bl sub_0200CE3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02232374 ; =0x0002869F - ldr r3, [sp, #0x20] - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0x92 - bl sub_0200D888 - mov r1, #0x28 - add r0, sp, #0x28 - strh r1, [r0] - mov r1, #0x3c - strh r1, [r0, #2] - mov r2, #0 - strh r2, [r0, #4] - strh r2, [r0, #6] - ldr r0, _02232374 ; =0x0002869F - mov r1, #1 - str r0, [sp, #0x3c] - str r0, [sp, #0x40] - str r0, [sp, #0x44] - str r0, [sp, #0x48] - sub r0, r1, #2 - str r1, [sp, #0x38] - str r0, [sp, #0x4c] - str r0, [sp, #0x50] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x18] - str r2, [sp, #0x30] - str r2, [sp, #0x34] - str r2, [sp, #0x54] - str r2, [sp, #0x58] - ldr r0, [r0, #0x18] - ldr r1, [r1, #0x1c] - add r2, sp, #0x28 - bl sub_0200CE6C - str r0, [r5, #8] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r5, #8] - bl sub_0200D330 - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02232370: .word 0x0000086C -_02232374: .word 0x0002869F - thumb_func_end ov62_0223226C - - thumb_func_start ov62_02232378 -ov62_02232378: ; 0x02232378 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov62_02231C78 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_0223226C - add r0, r5, #0 - add r1, r4, #0 - bl ov62_022320EC - pop {r3, r4, r5, pc} - thumb_func_end ov62_02232378 - - thumb_func_start ov62_02232394 -ov62_02232394: ; 0x02232394 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov62_02232080 - add r0, r5, #0 - mov r1, #0 - bl ov62_022323B8 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_02232200 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_022320B0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02232394 - - thumb_func_start ov62_022323B8 -ov62_022323B8: ; 0x022323B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov62_022320A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_022321F4 - pop {r3, r4, r5, pc} - thumb_func_end ov62_022323B8 - - thumb_func_start ov62_022323CC -ov62_022323CC: ; 0x022323CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, _02232498 ; =0x0000088C - add r4, r1, #0 - ldr r0, [r4, r0] - bl sub_02030BFC - str r0, [sp, #0x10] - ldr r0, _02232498 ; =0x0000088C - ldr r0, [r4, r0] - bl sub_02030C08 - add r6, r0, #0 - ldr r0, [sp, #0x10] - add r5, #0x18 - cmp r0, #0 - bne _02232400 - cmp r6, #0 - bne _02232400 - ldr r0, [r4, #0x48] - mov r1, #0x7d - bl sub_0200B1EC - str r0, [sp, #0x14] - b _0223246C -_02232400: - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - cmp r6, #0 - beq _02232438 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x14] - ldr r0, [r4, #0x48] - mov r1, #0x17 - bl sub_0200B1EC - add r4, r0, #0 - ldr r2, [sp, #0x10] - add r0, r7, #0 - mov r1, #0 - add r3, r6, #0 - bl sub_0200BE08 - ldr r1, [sp, #0x14] - add r0, r7, #0 - add r2, r4, #0 - bl sub_0200C388 - b _02232460 -_02232438: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x14] - ldr r0, [r4, #0x48] - mov r1, #0x16 - bl sub_0200B1EC - add r4, r0, #0 - ldr r2, [sp, #0x10] - add r0, r7, #0 - mov r1, #0 - bl sub_0200BDD0 - ldr r1, [sp, #0x14] - add r0, r7, #0 - add r2, r4, #0 - bl sub_0200C388 -_02232460: - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 -_0223246C: - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223249C ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - ldr r2, [sp, #0x14] - add r0, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x14] - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02232498: .word 0x0000088C -_0223249C: .word 0x000F0D00 - thumb_func_end ov62_022323CC - - thumb_func_start ov62_022324A0 -ov62_022324A0: ; 0x022324A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - str r0, [sp, #0x18] - add r0, #0x18 - add r4, r2, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #4] - str r1, [sp, #0x14] - str r0, [r5, #4] - mov r0, #0 - str r0, [r5, #0] - str r0, [r5, #0xc] - ldr r0, [r4, #0x24] - str r0, [r5, #0x10] - str r4, [r5, #0x28] - add r0, r1, #0 - ldr r0, [r0, #0x48] - str r0, [r5, #0x34] - ldr r0, [r5, #4] - ldr r1, [r5, #0x10] - bl sub_020E1F6C - add r0, r0, #1 - str r0, [r5, #0x14] - ldr r1, [r5, #4] - ldr r0, [r5, #0x10] - cmp r1, r0 - bge _022324E6 - str r1, [r5, #0x10] - sub r0, r1, #1 - str r0, [r5, #0x40] - ldr r0, [r5, #0x10] - sub r0, r0, #1 - str r0, [r5, #0x44] -_022324E6: - ldr r0, [sp, #0x18] - bl sub_0201A7A0 - ldr r0, [r4, #0x10] - ldr r1, [sp, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r4, #0x14] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r4, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [r4, #0x1c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, [r4, #0x20] - ldr r3, [r4, #0xc] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r0, #0x24] - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [sp, #0x18] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x10] - mov r7, #0 - cmp r0, #0 - ble _02232584 - add r6, r7, #0 -_02232538: - ldr r1, [r4, #0] - ldr r0, [r5, #0x34] - ldr r1, [r1, r6] - bl sub_0200B1EC - str r0, [sp, #0x1c] - ldr r0, [r4, #8] - mov r1, #0 - lsl r0, r0, #4 - mul r0, r7 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232590 ; =0x000F0D00 - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [r4, #0] - ldr r0, [r0, r6] - cmp r0, #0x10 - bne _0223257A - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov62_022323CC -_0223257A: - ldr r0, [r5, #0x10] - add r7, r7, #1 - add r6, #0x10 - cmp r7, r0 - blt _02232538 -_02232584: - ldr r0, [sp, #0x18] - bl sub_0201A9A4 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02232590: .word 0x000F0D00 - thumb_func_end ov62_022324A0 - - thumb_func_start ov62_02232594 -ov62_02232594: ; 0x02232594 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r4, r0, #0 - str r0, [sp, #0x20] - add r0, #0x18 - add r5, r3, #0 - str r0, [sp, #0x20] - ldr r0, [r5, #4] - str r1, [sp, #0x14] - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #0xc] - ldr r0, [r5, #0x24] - cmp r2, #0 - str r0, [r4, #0x10] - str r5, [r4, #0x28] - beq _022325BC - str r2, [r4, #0x34] - b _022325C2 -_022325BC: - add r0, r1, #0 - ldr r0, [r0, #0x48] - str r0, [r4, #0x34] -_022325C2: - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - bl sub_020E1F6C - add r0, r0, #1 - str r0, [r4, #0x14] - ldr r1, [r4, #0x10] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r4, #0x40] - ldr r1, [r4, #0x10] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r4, #0x44] - ldr r1, [r4, #4] - ldr r0, [r4, #0x10] - cmp r1, r0 - bge _022325F6 - str r1, [r4, #0x10] - sub r0, r1, #1 - str r0, [r4, #0x40] - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x44] -_022325F6: - ldr r0, [sp, #0x20] - bl sub_0201A7A0 - ldr r0, [r5, #0x10] - ldr r1, [sp, #0x20] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r5, #0x14] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [r5, #0x1c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, [r5, #0x20] - ldr r3, [r5, #0xc] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r0, #0x24] - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [sp, #0x20] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223268C - ldr r0, [r4, #0x10] - mov r6, #0 - cmp r0, #0 - ble _0223268A - add r7, r6, #0 -_0223264E: - ldr r1, [r5, #0] - ldr r0, [r4, #0x34] - ldr r1, [r1, r7] - bl sub_0200B1EC - str r0, [sp, #0x24] - ldr r0, [r5, #8] - mov r1, #0 - lsl r0, r0, #4 - mul r0, r6 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232770 ; =0x000F0D00 - ldr r2, [sp, #0x24] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [sp, #0x24] - bl sub_020237BC - ldr r0, [r4, #0x10] - add r6, r6, #1 - add r7, #0x10 - cmp r6, r0 - blt _0223264E -_0223268A: - b _02232766 -_0223268C: - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #0x10] - cmp r0, #0 - ble _02232766 - ldr r0, [sp, #0x14] - mov r5, #4 - str r0, [sp, #0x1c] -_0223269C: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x14] - mov r1, #0x63 - ldr r0, [r0, #0x48] - bl sub_0200B1EC - str r0, [sp, #0x28] - mov r0, #1 - ldr r1, [sp, #0x18] - str r0, [sp] - ldr r0, [sp, #0x2c] - add r1, r1, #1 - mov r2, #2 - mov r3, #1 - bl sub_020238A0 - ldr r2, [sp, #0x1c] - ldr r1, _02232774 ; =0x00002608 - add r0, r7, #0 - ldr r1, [r2, r1] - bl sub_02023D28 - ldr r0, [sp, #0x14] - add r1, r7, #0 - bl ov62_022349A8 - mov r0, #0 - ldr r1, [sp, #0x2c] - add r2, r0, #0 - bl sub_02002D7C - mov ip, r0 - str r5, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232770 ; =0x000F0D00 - ldr r2, [sp, #0x2c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - mov r3, #0x10 - mov r6, ip - mov r1, #0 - sub r3, r3, r6 - bl sub_0201D78C - str r5, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232770 ; =0x000F0D00 - ldr r2, [sp, #0x28] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - mov r1, #0 - mov r3, #0x10 - bl sub_0201D78C - str r5, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232770 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - add r2, r7, #0 - mov r3, #0x16 - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x2c] - bl sub_020237BC - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x1c] - ldr r1, [r4, #0x10] - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r5, #0x18 - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, r1 - blt _0223269C -_02232766: - ldr r0, [sp, #0x20] - bl sub_0201A9A4 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02232770: .word 0x000F0D00 -_02232774: .word 0x00002608 - thumb_func_end ov62_02232594 - - thumb_func_start ov62_02232778 -ov62_02232778: ; 0x02232778 - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0xe0 - add r4, r0, #0 - ldr r0, [sp, #0x2f4] - add r5, r3, #0 - str r0, [sp, #0x2f4] - ldr r0, [sp, #0x2f8] - str r1, [sp, #0x14] - str r0, [sp, #0x2f8] - mov r0, #0 - str r0, [sp, #0x40] - add r6, sp, #0x264 - add r1, r0, #0 - mov r3, #7 -_02232796: - stmia r6!, {r0, r1} - stmia r6!, {r0, r1} - sub r3, r3, #1 - bne _02232796 - stmia r6!, {r0, r1} - add r0, r4, #0 - str r0, [sp, #0x50] - add r0, #0x18 - str r0, [sp, #0x50] - ldr r0, [r5, #4] - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #0xc] - ldr r0, [r5, #0x24] - cmp r2, #0 - str r0, [r4, #0x10] - str r5, [r4, #0x28] - beq _022327C0 - str r2, [r4, #0x34] - b _022327C6 -_022327C0: - ldr r0, [sp, #0x14] - ldr r0, [r0, #0x48] - str r0, [r4, #0x34] -_022327C6: - ldr r0, [r4, #4] - ldr r1, [r4, #0x10] - bl sub_020E1F6C - add r0, r0, #1 - str r0, [r4, #0x14] - ldr r1, [r4, #4] - ldr r0, [r4, #0x10] - cmp r1, r0 - bge _022327E6 - str r1, [r4, #0x10] - sub r0, r1, #1 - str r0, [r4, #0x40] - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x44] -_022327E6: - ldr r1, [r4, #0x10] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r4, #0x40] - ldr r1, [r4, #0x10] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r4, #0x44] - ldr r0, [sp, #0x50] - bl sub_0201A7A0 - ldr r0, [r5, #0x10] - ldr r1, [sp, #0x50] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r5, #0x14] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r5, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [r5, #0x1c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, [r5, #0x20] - ldr r3, [r5, #0xc] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r0, #0x24] - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [sp, #0x50] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x66 - bl ov62_02231690 - add r2, sp, #0x58 - ldr r3, _02232AA4 ; =0x022488F8 - add r5, r0, #0 - ldmia r3!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r6, #1 - str r0, [r2, #0] - ldr r0, [r4, #0x28] - ldr r1, [r0, #0] - ldr r0, [r1, #8] - str r0, [sp, #0x38] - ldr r0, [r1, #0xc] - str r0, [sp, #0x3c] - mov r0, #0 - str r0, [sp, #0x264] - ldr r0, [sp, #0x2f4] - lsl r0, r0, #2 - ldr r1, [r7, r0] - cmp r1, #1 - ble _022328B0 - add r0, r1, #0 - mov r2, #0x10 - add r3, sp, #0x268 - mov ip, r0 -_0223287C: - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - add r0, r0, r2 - ldr r1, [r0, #0xc] - ldr r7, [r0, #8] - ldr r0, [sp, #0x3c] - str r1, [sp, #0x54] - eor r1, r0 - ldr r0, [sp, #0x38] - eor r0, r7 - orr r0, r1 - bne _0223289A - ldr r0, [sp, #0x40] - str r0, [r3, #0] - b _022328A4 -_0223289A: - ldr r0, [sp, #0x54] - str r7, [sp, #0x38] - str r0, [sp, #0x3c] - str r6, [r3, #0] - str r6, [sp, #0x40] -_022328A4: - add r6, r6, #1 - mov r0, ip - add r2, #0x10 - add r3, r3, #4 - cmp r6, r0 - blt _0223287C -_022328B0: - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [r4, #0x10] - cmp r0, #0 - bgt _022328BC - b _02232A90 -_022328BC: - add r0, sp, #0x264 - str r0, [sp, #0x20] - ldr r0, [sp, #0x2f4] - ldr r6, [sp, #0x18] - str r0, [sp, #0x1c] - add r0, #0x58 - str r0, [sp, #0x1c] -_022328CA: - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - ldr r0, [r0, #0x48] - bl sub_0200B1EC - str r0, [sp, #0x4c] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x48] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x34] - ldr r0, [sp, #0x2f4] - cmp r0, #0 - beq _02232904 - cmp r0, #1 - beq _0223292A - cmp r0, #2 - beq _0223294A - b _02232984 -_02232904: - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x34] - ldr r1, [r1, #0] - add r1, r1, r6 - ldr r1, [r1, #4] - bl sub_0200B1EC - str r0, [sp, #0x44] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x44] - add r0, r5, #0 - mov r1, #1 - mov r3, #0 - bl sub_0200B48C - b _02232984 -_0223292A: - ldr r0, [r4, #0x28] - mov r1, #0x66 - ldr r0, [r0, #0] - add r0, r0, r6 - ldr r0, [r0, #4] - str r0, [sp, #0x30] - mov r0, #0xff - bl sub_02023790 - str r0, [sp, #0x44] - ldr r2, [sp, #0x30] - add r0, r5, #0 - mov r1, #1 - bl sub_0200C2E0 - b _02232984 -_0223294A: - ldr r0, [r4, #0x28] - mov r1, #0x66 - ldr r0, [r0, #0] - add r0, r0, r6 - ldr r0, [r0, #4] - str r0, [sp, #0x2c] - mov r0, #0xff - bl sub_02023790 - str r0, [sp, #0x44] - ldr r0, [sp, #0x2c] - mov r1, #0x66 - add r2, sp, #0x64 - bl sub_0200B274 - ldr r0, [sp, #0x44] - add r1, sp, #0x64 - bl sub_02023D28 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x44] - add r0, r5, #0 - mov r1, #1 - mov r3, #0 - bl sub_0200B48C -_02232984: - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - add r1, r0, r6 - ldr r0, [r1, #8] - str r0, [sp, #0x24] - ldr r0, [r1, #0xc] - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x28] - bl ov62_0223438C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x34] - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x28] - bl sub_020239D4 - mov r0, #1 - str r0, [sp] - ldr r1, [sp, #0x20] - ldr r0, [sp, #0x48] - ldr r1, [r1, #0] - mov r2, #2 - add r1, r1, #1 - mov r3, #1 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x48] - add r0, r5, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x4c] - add r0, r5, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, [r4, #0x28] - add r2, r7, #0 - ldr r0, [r0, #8] - lsl r1, r0, #4 - ldr r0, [sp, #0x18] - mul r1, r0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232AA8 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x50] - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [r4, #0x28] - ldr r0, [r0, #8] - cmp r0, #2 - bne _02232A56 - ldr r0, [sp, #0x2f8] - cmp r0, #0 - beq _02232A56 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x34] - add r0, r5, #0 - mov r1, #2 - mov r3, #0 - bl sub_0200B48C - ldr r2, [sp, #0x2f8] - add r0, r5, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, [r4, #0x28] - add r2, r7, #0 - ldr r0, [r0, #8] - mov r3, #0x10 - lsl r1, r0, #4 - ldr r0, [sp, #0x18] - mul r1, r0 - add r1, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232AA8 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x50] - bl sub_0201D78C -_02232A56: - ldr r0, [sp, #0x4c] - bl sub_020237BC - ldr r0, [sp, #0x48] - bl sub_020237BC - ldr r0, [sp, #0x44] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x34] - bl sub_020237BC - add r0, r5, #0 - bl sub_0200C41C - ldr r0, [sp, #0x20] - ldr r1, [r4, #0x10] - add r0, r0, #4 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - add r6, #0x10 - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, r1 - bge _02232A90 - b _022328CA -_02232A90: - ldr r0, [sp, #0x50] - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_0200B3F0 - add sp, #0x1fc - add sp, #0xe0 - pop {r4, r5, r6, r7, pc} - nop -_02232AA4: .word 0x022488F8 -_02232AA8: .word 0x000F0D00 - thumb_func_end ov62_02232778 - - thumb_func_start ov62_02232AAC -ov62_02232AAC: ; 0x02232AAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - str r0, [sp, #0x14] - add r0, #0x18 - add r7, r2, #0 - str r0, [sp, #0x14] - ldr r0, [r7, #4] - add r4, r1, #0 - str r0, [r6, #4] - mov r0, #0 - str r0, [r6, #0] - str r0, [r6, #0xc] - ldr r0, [r7, #0x24] - add r5, r3, #0 - str r0, [r6, #0x10] - str r7, [r6, #0x28] - ldr r0, [r4, #0x48] - str r0, [r6, #0x34] - ldr r0, [r6, #4] - ldr r1, [r6, #0x10] - bl sub_020E1F6C - add r0, r0, #1 - str r0, [r6, #0x14] - ldr r1, [r6, #0x10] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r6, #0x40] - ldr r1, [r6, #0x10] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [r6, #0x44] - ldr r1, [r6, #4] - ldr r0, [r6, #0x10] - cmp r1, r0 - bge _02232B06 - str r1, [r6, #0x10] - sub r0, r1, #1 - str r0, [r6, #0x40] - ldr r0, [r6, #0x10] - sub r0, r0, #1 - str r0, [r6, #0x44] -_02232B06: - mov r0, #1 - str r0, [r6, #0x48] - ldr r0, [sp, #0x14] - bl sub_0201A7A0 - ldr r0, [r7, #0x10] - ldr r1, [sp, #0x14] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r7, #0x14] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r7, #0x18] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [r7, #0x1c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r2, [r7, #0x20] - ldr r3, [r7, #0xc] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r4, #0x24] - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [sp, #0x14] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r6, #0x10] - mov r4, #0 - cmp r0, #0 - ble _02232BA6 -_02232B58: - ldr r0, [r7, #8] - mov r1, #0 - lsl r0, r0, #3 - mul r0, r4 - add r0, r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232BB0 ; =0x000F0D00 - add r3, r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - ldr r2, [r5, #0] - bl sub_0201D78C - ldr r0, [r7, #8] - mov r1, #0 - lsl r0, r0, #3 - mul r0, r4 - add r0, r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232BB0 ; =0x000F0D00 - mov r3, #0x88 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - ldr r2, [r5, #4] - bl sub_0201D78C - ldr r0, [r6, #0x10] - add r4, r4, #1 - add r5, #8 - cmp r4, r0 - blt _02232B58 -_02232BA6: - ldr r0, [sp, #0x14] - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02232BB0: .word 0x000F0D00 - thumb_func_end ov62_02232AAC - - thumb_func_start ov62_02232BB4 -ov62_02232BB4: ; 0x02232BB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r1, [r5, #0x38] - ldr r0, [r5, #0xc] - add r4, r2, #0 - cmp r1, r0 - bne _02232BCA - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02232BCA: - ldr r1, [r5, #0x10] - ldr r0, [r5, #4] - cmp r1, r0 - bne _02232BD8 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02232BD8: - add r7, r5, #0 - add r7, #0x18 - add r0, r7, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r3, [r5, #0x40] - ldr r1, [r5, #0x3c] - mov r0, #0 - cmp r1, r3 - blt _02232C00 - ldr r2, [r5, #0x38] - ldr r1, [r5, #4] - sub r0, r2, r3 - add r3, r3, #1 - sub r3, r1, r3 - cmp r2, r3 - blt _02232C00 - ldr r0, [r5, #0x10] - sub r0, r1, r0 -_02232C00: - ldr r1, [r5, #0x10] - mov r6, #0 - cmp r1, #0 - ble _02232C62 - lsl r0, r0, #3 - add r4, r4, r0 -_02232C0C: - ldr r2, [r4, #0] - cmp r2, #0 - beq _02232C58 - ldr r0, [r5, #0x28] - mov r1, #0 - ldr r0, [r0, #8] - add r3, r1, #0 - lsl r0, r0, #3 - mul r0, r6 - add r0, r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232C74 ; =0x000F0D00 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r7, #0 - bl sub_0201D78C - ldr r0, [r5, #0x28] - mov r1, #0 - ldr r0, [r0, #8] - mov r3, #0x88 - lsl r0, r0, #3 - mul r0, r6 - add r0, r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232C74 ; =0x000F0D00 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [r4, #4] - add r0, r7, #0 - bl sub_0201D78C -_02232C58: - ldr r0, [r5, #0x10] - add r6, r6, #1 - add r4, #8 - cmp r6, r0 - blt _02232C0C -_02232C62: - add r0, r7, #0 - bl sub_0201A954 - ldr r0, [r5, #0x38] - str r0, [r5, #0xc] - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02232C74: .word 0x000F0D00 - thumb_func_end ov62_02232BB4 - - thumb_func_start ov62_02232C78 -ov62_02232C78: ; 0x02232C78 - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0xe8 - add r4, r0, #0 - ldr r0, [sp, #0x2f8] - str r1, [sp, #0x10] - str r0, [sp, #0x2f8] - mov r0, #8 - ldrsh r1, [r4, r0] - ldr r0, [r4, #0xc] - str r3, [sp, #0x14] - cmp r1, r0 - bne _02232C9A - add sp, #0x1fc - add sp, #0xe8 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02232C9A: - ldr r1, [r4, #0x10] - ldr r0, [r4, #4] - cmp r1, r0 - bne _02232CAA - add sp, #0x1fc - add sp, #0xe8 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02232CAA: - add r0, r4, #0 - str r0, [sp, #0x58] - add r0, #0x18 - str r0, [sp, #0x58] - mov r0, #0x66 - bl ov62_02231690 - add r5, r0, #0 - ldr r0, [sp, #0x58] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp, #0x44] - str r0, [sp, #0x40] - mov r0, #8 - ldrsh r0, [r4, r0] - ldr r1, [r4, #0x10] - add r3, sp, #0x26c - str r0, [sp, #0x18] - add r0, r0, r1 - str r0, [sp, #0x34] - ldr r0, [sp, #0x44] - mov r2, #7 - add r1, r0, #0 -_02232CDC: - stmia r3!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02232CDC - stmia r3!, {r0, r1} - ldr r1, [r4, #4] - ldr r0, [sp, #0x34] - cmp r0, r1 - blt _02232CF6 - ldr r0, [r4, #0x10] - str r1, [sp, #0x34] - sub r0, r1, r0 - str r0, [sp, #0x18] -_02232CF6: - ldr r3, _02232F60 ; =0x02248904 - add r2, sp, #0x60 - ldmia r3!, {r0, r1} - add r7, r2, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r6, #1 - str r0, [r2, #0] - ldr r0, [r4, #0x28] - ldr r1, [r0, #0] - ldr r0, [r1, #8] - str r0, [sp, #0x38] - ldr r0, [r1, #0xc] - str r0, [sp, #0x3c] - mov r0, #0 - str r0, [sp, #0x26c] - ldr r0, [sp, #0x14] - lsl r0, r0, #2 - ldr r1, [r7, r0] - cmp r1, #1 - ble _02232D5C - add r0, r1, #0 - mov r2, #0x10 - add r3, sp, #0x270 - mov ip, r0 -_02232D28: - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - add r0, r0, r2 - ldr r1, [r0, #0xc] - ldr r7, [r0, #8] - ldr r0, [sp, #0x3c] - str r1, [sp, #0x5c] - eor r1, r0 - ldr r0, [sp, #0x38] - eor r0, r7 - orr r0, r1 - bne _02232D46 - ldr r0, [sp, #0x40] - str r0, [r3, #0] - b _02232D50 -_02232D46: - ldr r0, [sp, #0x5c] - str r7, [sp, #0x38] - str r0, [sp, #0x3c] - str r6, [r3, #0] - str r6, [sp, #0x40] -_02232D50: - add r6, r6, #1 - mov r0, ip - add r2, #0x10 - add r3, r3, #4 - cmp r6, r0 - blt _02232D28 -_02232D5C: - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x34] - cmp r1, r0 - blt _02232D66 - b _02232F46 -_02232D66: - add r0, r1, #0 - lsl r6, r0, #4 - add r1, sp, #0x26c - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x14] - str r0, [sp, #0x1c] - add r0, #0x58 - str r0, [sp, #0x1c] -_02232D7A: - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x1c] - ldr r0, [r0, #0x48] - bl sub_0200B1EC - str r0, [sp, #0x54] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x50] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x48] - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02232DB4 - cmp r0, #1 - beq _02232DDA - cmp r0, #2 - beq _02232DFA - b _02232E34 -_02232DB4: - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x34] - ldr r1, [r1, #0] - add r1, r1, r6 - ldr r1, [r1, #4] - bl sub_0200B1EC - str r0, [sp, #0x4c] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x4c] - add r0, r5, #0 - mov r1, #1 - mov r3, #0 - bl sub_0200B48C - b _02232E34 -_02232DDA: - ldr r0, [r4, #0x28] - mov r1, #0x66 - ldr r0, [r0, #0] - add r0, r0, r6 - ldr r0, [r0, #4] - str r0, [sp, #0x30] - mov r0, #0xff - bl sub_02023790 - str r0, [sp, #0x4c] - ldr r2, [sp, #0x30] - add r0, r5, #0 - mov r1, #1 - bl sub_0200C2E0 - b _02232E34 -_02232DFA: - ldr r0, [r4, #0x28] - mov r1, #0x66 - ldr r0, [r0, #0] - add r0, r0, r6 - ldr r0, [r0, #4] - str r0, [sp, #0x2c] - mov r0, #0xff - bl sub_02023790 - str r0, [sp, #0x4c] - ldr r0, [sp, #0x2c] - mov r1, #0x66 - add r2, sp, #0x6c - bl sub_0200B274 - ldr r0, [sp, #0x4c] - add r1, sp, #0x6c - bl sub_02023D28 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x4c] - add r0, r5, #0 - mov r1, #1 - mov r3, #0 - bl sub_0200B48C -_02232E34: - ldr r0, [r4, #0x28] - ldr r0, [r0, #0] - add r1, r0, r6 - ldr r0, [r1, #8] - str r0, [sp, #0x24] - ldr r0, [r1, #0xc] - str r0, [sp, #0x28] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x28] - bl ov62_0223438C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x48] - ldr r1, [sp, #0x24] - ldr r2, [sp, #0x28] - bl sub_020239D4 - mov r0, #1 - str r0, [sp] - ldr r1, [sp, #0x20] - ldr r0, [sp, #0x50] - ldr r1, [r1, #0] - mov r2, #2 - add r1, r1, #1 - mov r3, #1 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x50] - add r0, r5, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x54] - add r0, r5, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, [r4, #0x28] - add r2, r7, #0 - ldr r0, [r0, #8] - lsl r1, r0, #4 - ldr r0, [sp, #0x44] - mul r1, r0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232F64 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x58] - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [r4, #0x28] - ldr r0, [r0, #8] - cmp r0, #2 - bne _02232F06 - ldr r0, [sp, #0x2f8] - cmp r0, #0 - beq _02232F06 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x48] - add r0, r5, #0 - mov r1, #2 - mov r3, #0 - bl sub_0200B48C - ldr r2, [sp, #0x2f8] - add r0, r5, #0 - add r1, r7, #0 - bl sub_0200C388 - ldr r0, [r4, #0x28] - add r2, r7, #0 - ldr r0, [r0, #8] - mov r3, #0x10 - lsl r1, r0, #4 - ldr r0, [sp, #0x44] - mul r1, r0 - add r1, #0x10 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02232F64 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x58] - bl sub_0201D78C -_02232F06: - ldr r0, [sp, #0x44] - add r0, r0, #1 - str r0, [sp, #0x44] - ldr r0, [sp, #0x54] - bl sub_020237BC - ldr r0, [sp, #0x50] - bl sub_020237BC - ldr r0, [sp, #0x4c] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x48] - bl sub_020237BC - add r0, r5, #0 - bl sub_0200C41C - ldr r0, [sp, #0x20] - add r6, #0x10 - add r0, r0, #4 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - add r1, r0, #1 - ldr r0, [sp, #0x34] - str r1, [sp, #0x18] - cmp r1, r0 - bge _02232F46 - b _02232D7A -_02232F46: - ldr r0, [sp, #0x58] - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_0200B3F0 - mov r0, #8 - ldrsh r0, [r4, r0] - str r0, [r4, #0xc] - mov r0, #0 - add sp, #0x1fc - add sp, #0xe8 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02232F60: .word 0x02248904 -_02232F64: .word 0x000F0D00 - thumb_func_end ov62_02232C78 - - thumb_func_start ov62_02232F68 -ov62_02232F68: ; 0x02232F68 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [r5, #0x28] - add r7, r1, #0 - ldr r0, [r0, #0x28] - cmp r0, #0 - beq _02232FB6 - ldr r0, [r5, #0x10] - ldr r6, [sp, #0x1c] - cmp r0, #0 - ble _02232FB6 - add r4, r6, #0 -_02232F86: - ldr r0, [r5, #0x28] - ldr r0, [r0, #0x28] - add r0, r0, r4 - bl sub_02022760 - cmp r0, #0 - beq _02232FAC - add r0, r7, #0 - bl ov62_02234520 - mov r1, #8 - ldrsh r1, [r5, r1] - ldr r0, [r5, #0x28] - add r1, r1, r6 - ldr r0, [r0, #0] - lsl r1, r1, #4 - add r0, r0, r1 - ldr r0, [r0, #4] - str r0, [sp, #0x1c] -_02232FAC: - ldr r0, [r5, #0x10] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _02232F86 -_02232FB6: - mov r0, #8 - ldrsh r1, [r5, r0] - ldr r0, [r5, #0xc] - cmp r1, r0 - bne _02232FC6 - ldr r0, [sp, #0x1c] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_02232FC6: - ldr r1, [r5, #0x10] - ldr r0, [r5, #4] - cmp r1, r0 - bne _02232FD4 - ldr r0, [sp, #0x1c] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_02232FD4: - add r0, r5, #0 - str r0, [sp, #0x18] - add r0, #0x18 - mov r1, #0 - str r0, [sp, #0x18] - bl sub_0201ADA4 - mov r0, #8 - ldrsh r0, [r5, r0] - ldr r2, [r5, #0x10] - ldr r1, [r5, #4] - str r0, [sp, #0x10] - add r0, r0, r2 - mov r6, #0 - str r0, [sp, #0x14] - cmp r0, r1 - blt _02232FFC - sub r0, r1, r2 - str r0, [sp, #0x10] - str r1, [sp, #0x14] -_02232FFC: - ldr r1, [sp, #0x10] - ldr r0, [sp, #0x14] - cmp r1, r0 - bge _0223304E - add r0, r1, #0 - lsl r4, r0, #4 -_02233008: - ldr r1, [r5, #0x28] - ldr r0, [r5, #0x34] - ldr r1, [r1, #0] - ldr r1, [r1, r4] - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [r5, #0x28] - mov r1, #0 - ldr r0, [r0, #8] - add r2, r7, #0 - lsl r0, r0, #4 - mul r0, r6 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02233060 ; =0x000F0D00 - add r3, r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r1, r0, #1 - ldr r0, [sp, #0x14] - add r4, #0x10 - str r1, [sp, #0x10] - cmp r1, r0 - blt _02233008 -_0223304E: - ldr r0, [sp, #0x18] - bl sub_0201A954 - mov r0, #8 - ldrsh r0, [r5, r0] - str r0, [r5, #0xc] - ldr r0, [sp, #0x1c] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02233060: .word 0x000F0D00 - thumb_func_end ov62_02232F68 - - thumb_func_start ov62_02233064 -ov62_02233064: ; 0x02233064 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - str r1, [sp, #0x14] - str r0, [sp, #0x10] - ldr r1, [r0, #0x38] - ldr r0, [r0, #0xc] - cmp r1, r0 - bne _0223307A - add sp, #0x2c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223307A: - ldr r0, [sp, #0x10] - ldr r1, [r0, #0x10] - ldr r0, [r0, #4] - cmp r1, r0 - bne _0223308A - add sp, #0x2c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223308A: - ldr r0, [sp, #0x10] - mov r1, #0 - str r0, [sp, #0x28] - add r0, #0x18 - str r0, [sp, #0x28] - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x10] - ldr r0, [r0, #0x40] - ldr r1, [r1, #0x3c] - cmp r1, r0 - blt _022330C4 - ldr r1, [sp, #0x10] - ldr r2, [r1, #0x38] - sub r1, r2, r0 - str r1, [sp, #0x1c] - ldr r1, [sp, #0x10] - add r0, r0, #1 - ldr r1, [r1, #4] - sub r0, r1, r0 - cmp r2, r0 - blt _022330C4 - ldr r0, [sp, #0x10] - ldr r0, [r0, #0x10] - sub r0, r1, r0 - str r0, [sp, #0x1c] -_022330C4: - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x10] - ldr r0, [r0, #0x10] - cmp r0, #0 - ble _022331AE - ldr r0, [sp, #0x1c] - mov r4, #4 - lsl r1, r0, #2 - ldr r0, [sp, #0x14] - add r0, r0, r1 - str r0, [sp, #0x18] -_022330DC: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r5, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0x63 - ldr r0, [r0, #0x48] - bl sub_0200B1EC - str r0, [sp, #0x24] - mov r0, #1 - str r0, [sp] - ldr r2, [sp, #0x1c] - ldr r1, [sp, #0x20] - add r0, r7, #0 - add r1, r2, r1 - add r1, r1, #1 - mov r2, #2 - mov r3, #1 - bl sub_020238A0 - ldr r2, [sp, #0x18] - ldr r1, _022331C0 ; =0x00002608 - add r0, r5, #0 - ldr r1, [r2, r1] - bl sub_02023D28 - ldr r0, [sp, #0x14] - add r1, r5, #0 - bl ov62_022349A8 - mov r0, #0 - add r1, r7, #0 - add r2, r0, #0 - bl sub_02002D7C - mov ip, r0 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022331C4 ; =0x000F0D00 - mov r3, #0x10 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r6, ip - ldr r0, [sp, #0x28] - mov r1, #0 - add r2, r7, #0 - sub r3, r3, r6 - bl sub_0201D78C - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022331C4 ; =0x000F0D00 - ldr r2, [sp, #0x24] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - mov r1, #0 - mov r3, #0x10 - bl sub_0201D78C - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022331C4 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - add r2, r5, #0 - mov r3, #0x16 - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x24] - bl sub_020237BC - ldr r0, [sp, #0x18] - add r4, #0x18 - add r0, r0, #4 - str r0, [sp, #0x18] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x10] - ldr r1, [r0, #0x10] - ldr r0, [sp, #0x20] - cmp r0, r1 - blt _022330DC -_022331AE: - ldr r0, [sp, #0x28] - bl sub_0201A954 - ldr r0, [sp, #0x10] - ldr r1, [r0, #0x38] - str r1, [r0, #0xc] - mov r0, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022331C0: .word 0x00002608 -_022331C4: .word 0x000F0D00 - thumb_func_end ov62_02233064 - - thumb_func_start ov62_022331C8 -ov62_022331C8: ; 0x022331C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r4, #0 - mov r6, #0xff - cmp r1, #0 - bge _022331E8 - ldr r0, [r5, #0x38] - cmp r0, #0 - ble _02233200 - sub r0, r0, #1 - str r0, [r5, #0x38] - ldr r0, _022332A8 ; =0x0000055A - add r6, r4, #0 - bl sub_02005748 - b _02233200 -_022331E8: - ble _02233200 - ldr r0, [r5, #4] - ldr r1, [r5, #0x38] - sub r0, r0, #1 - cmp r1, r0 - bge _02233200 - add r0, r1, #1 - str r0, [r5, #0x38] - ldr r0, _022332A8 ; =0x0000055A - mov r6, #1 - bl sub_02005748 -_02233200: - cmp r6, #0 - beq _0223320A - cmp r6, #1 - beq _02233246 - b _0223326A -_0223320A: - ldr r2, [r5, #0x44] - ldr r1, [r5, #0x38] - cmp r1, r2 - bge _02233218 - lsl r0, r1, #0x10 - asr r4, r0, #0x10 - b _0223326A -_02233218: - ldr r0, [r5, #4] - sub r0, r0, r2 - cmp r1, r0 - blt _02233234 - add r2, r2, #1 - lsl r2, r2, #0x10 - asr r4, r2, #0x10 - cmp r1, r0 - blt _0223326A - sub r0, r1, r0 - add r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _0223326A -_02233234: - lsl r0, r2, #0x10 - asr r4, r0, #0x10 - cmp r1, r2 - bgt _0223326A - sub r0, r1, r2 - add r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _0223326A -_02233246: - ldr r0, [r5, #0x38] - ldr r2, [r5, #0x40] - cmp r0, r2 - bgt _02233254 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 - b _0223326A -_02233254: - lsl r1, r2, #0x10 - asr r4, r1, #0x10 - ldr r1, [r5, #4] - sub r1, r1, r2 - cmp r0, r1 - blt _0223326A - sub r1, r1, #1 - sub r0, r0, r1 - add r0, r4, r0 - lsl r0, r0, #0x10 - asr r4, r0, #0x10 -_0223326A: - cmp r4, #0 - bge _02233272 - bl sub_02022974 -_02233272: - cmp r6, #0xff - beq _02233278 - str r4, [r5, #0x3c] -_02233278: - ldr r2, [r5, #0x40] - ldr r0, [r5, #0x3c] - mov r3, #0 - cmp r0, r2 - blt _0223329C - ldr r1, [r5, #0x38] - sub r0, r1, r2 - lsl r0, r0, #0x10 - asr r3, r0, #0x10 - ldr r0, [r5, #4] - add r2, r2, #1 - sub r2, r0, r2 - cmp r1, r2 - blt _0223329C - ldr r1, [r5, #0x10] - sub r0, r0, r1 - lsl r0, r0, #0x10 - asr r3, r0, #0x10 -_0223329C: - add r0, r5, #0 - strh r3, [r5, #8] - bl ov62_0223349C - pop {r4, r5, r6, pc} - nop -_022332A8: .word 0x0000055A - thumb_func_end ov62_022331C8 - - thumb_func_start ov62_022332AC -ov62_022332AC: ; 0x022332AC - push {r4, lr} - add r4, r0, #0 - mov r2, #8 - ldrsh r0, [r4, r2] - add r1, r0, r1 - strh r1, [r4, #8] - ldrsh r1, [r4, r2] - cmp r1, #0 - bge _022332C2 - mov r1, #0 - strh r1, [r4, #8] -_022332C2: - ldr r2, [r4, #0x10] - ldr r1, [r4, #4] - cmp r2, r1 - bne _022332CE - mov r1, #0 - strh r1, [r4, #8] -_022332CE: - mov r1, #8 - ldrsh r1, [r4, r1] - ldr r3, [r4, #0x10] - ldr r2, [r4, #4] - add r1, r1, r3 - cmp r1, r2 - ble _022332E0 - sub r1, r2, r3 - strh r1, [r4, #8] -_022332E0: - mov r1, #8 - ldrsh r1, [r4, r1] - cmp r0, r1 - beq _022332EE - ldr r0, _022332F8 ; =0x0000055A - bl sub_02005748 -_022332EE: - add r0, r4, #0 - bl ov62_02233454 - pop {r4, pc} - nop -_022332F8: .word 0x0000055A - thumb_func_end ov62_022332AC - - thumb_func_start ov62_022332FC -ov62_022332FC: ; 0x022332FC - push {r4, lr} - add r4, r0, #0 - add r0, #0x18 - bl sub_0201ACF4 - add r4, #0x18 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - thumb_func_end ov62_022332FC - - thumb_func_start ov62_02233310 -ov62_02233310: ; 0x02233310 - ldr r3, _02233318 ; =sub_020D5124 - mov r1, #0 - mov r2, #0x50 - bx r3 - ; .align 2, 0 -_02233318: .word sub_020D5124 - thumb_func_end ov62_02233310 - - thumb_func_start ov62_0223331C -ov62_0223331C: ; 0x0223331C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x48 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x14] - ldr r7, [r4, #0x1c] - str r0, [sp, #0x10] - ldr r0, [r4, #0x18] - add r6, r2, #0 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp] - ldr r0, _02233428 ; =0x00030D40 - str r6, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x10] - add r1, r7, #0 - mov r3, #0x7f - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _02233428 ; =0x00030D40 - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r3, #0x7e - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02233428 ; =0x00030D40 - ldr r2, [sp, #0x10] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r3, #0x7d - bl sub_0200CE54 - mov r1, #0x80 - add r0, sp, #0x14 - strh r1, [r0] - mov r1, #0x60 - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - strh r1, [r0, #6] - mov r0, #1 - str r0, [sp, #0x1c] - str r0, [sp, #0x40] - sub r0, r0, #2 - str r0, [sp, #0x38] - str r0, [sp, #0x3c] - ldr r0, _02233428 ; =0x00030D40 - str r1, [sp, #0x20] - str r6, [sp, #0x24] - str r1, [sp, #0x44] - str r0, [sp, #0x28] - str r0, [sp, #0x30] - str r0, [sp, #0x34] - cmp r6, #1 - bne _022333A2 - ldr r0, _0223342C ; =0x0000270F - str r0, [sp, #0x2c] - b _022333A6 -_022333A2: - ldr r0, _02233430 ; =0x00002710 - str r0, [sp, #0x2c] -_022333A6: - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x1c] - add r2, sp, #0x14 - bl sub_0200CE6C - str r0, [r5, #0x2c] - ldr r0, [r4, #0x18] - ldr r1, [r4, #0x1c] - add r2, sp, #0x14 - bl sub_0200CE6C - str r0, [r5, #0x30] - ldr r0, [r5, #0x2c] - mov r1, #2 - bl sub_0200D41C - ldr r0, [r5, #0x30] - mov r1, #2 - bl sub_0200D41C - ldr r0, [r5, #0x2c] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x2c] - bl sub_0200D330 - ldr r0, [r5, #0x30] - bl sub_0200D330 - ldr r0, [r5, #0x30] - mov r1, #2 - bl sub_0200D7D4 - cmp r6, #1 - ldr r0, [r5, #0x2c] - bne _0223340C - mov r1, #0x80 - mov r2, #0x18 - bl sub_0200D4C4 - ldr r0, [r5, #0x30] - mov r1, #0x80 - mov r2, #0x78 - bl sub_0200D4C4 - b _0223341E -_0223340C: - mov r1, #0x80 - mov r2, #0x58 - bl sub_0200D4C4 - ldr r0, [r5, #0x30] - mov r1, #0x80 - mov r2, #0xb8 - bl sub_0200D4C4 -_0223341E: - add r0, r5, #0 - bl ov62_02233454 - add sp, #0x48 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02233428: .word 0x00030D40 -_0223342C: .word 0x0000270F -_02233430: .word 0x00002710 - thumb_func_end ov62_0223331C - - thumb_func_start ov62_02233434 -ov62_02233434: ; 0x02233434 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r3, r1, #0 - add r5, r2, #0 - ldr r0, [r4, #0x2c] - mov r1, #0x80 - add r2, r3, #0 - bl sub_0200D4C4 - ldr r0, [r4, #0x30] - mov r1, #0x80 - add r2, r5, #0 - bl sub_0200D4C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02233434 - - thumb_func_start ov62_02233454 -ov62_02233454: ; 0x02233454 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #8 - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _02233478 - ldr r0, [r4, #0x2c] - mov r1, #0 - bl sub_0200D3F4 -_02233478: - mov r0, #8 - ldrsh r1, [r4, r0] - ldr r0, [r4, #0x10] - add r1, r1, r0 - ldr r0, [r4, #4] - cmp r1, r0 - blt _0223348E - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3F4 -_0223348E: - ldr r0, [r4, #0x2c] - bl sub_0200D33C - ldr r0, [r4, #0x30] - bl sub_0200D33C - pop {r4, pc} - thumb_func_end ov62_02233454 - - thumb_func_start ov62_0223349C -ov62_0223349C: ; 0x0223349C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #8 - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _022334C0 - ldr r0, [r4, #0x2c] - mov r1, #0 - bl sub_0200D3F4 -_022334C0: - mov r0, #8 - ldrsh r1, [r4, r0] - ldr r0, [r4, #0x10] - add r1, r1, r0 - ldr r0, [r4, #4] - cmp r1, r0 - blt _022334D6 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3F4 -_022334D6: - ldr r1, [r4, #0x10] - ldr r0, [r4, #4] - cmp r1, r0 - blt _022334EE - ldr r0, [r4, #0x2c] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200D3F4 -_022334EE: - ldr r0, [r4, #0x2c] - bl sub_0200D33C - ldr r0, [r4, #0x30] - bl sub_0200D33C - pop {r4, pc} - thumb_func_end ov62_0223349C - - thumb_func_start ov62_022334FC -ov62_022334FC: ; 0x022334FC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x1c] - ldr r1, _02233528 ; =0x00030D40 - bl sub_0200D070 - ldr r0, [r4, #0x1c] - ldr r1, _02233528 ; =0x00030D40 - bl sub_0200D090 - ldr r0, [r4, #0x1c] - ldr r1, _02233528 ; =0x00030D40 - bl sub_0200D0A0 - ldr r0, [r5, #0x2c] - bl sub_0200D0F4 - ldr r0, [r5, #0x30] - bl sub_0200D0F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02233528: .word 0x00030D40 - thumb_func_end ov62_022334FC - - thumb_func_start ov62_0223352C -ov62_0223352C: ; 0x0223352C - push {r4, r5, lr} - sub sp, #0x34 - add r4, r3, #0 - mov r3, #0x80 - add r0, sp, #0 - strh r3, [r0] - mov r3, #0x60 - strh r3, [r0, #2] - mov r3, #0 - strh r3, [r0, #4] - strh r3, [r0, #6] - mov r0, #1 - str r0, [sp, #8] - str r0, [sp, #0x2c] - sub r0, r0, #2 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r0, _02233590 ; =0x00002E94 - str r3, [sp, #0xc] - str r2, [sp, #0x10] - str r3, [sp, #0x30] - str r0, [sp, #0x14] - str r0, [sp, #0x1c] - str r0, [sp, #0x20] - cmp r2, #1 - bne _02233566 - ldr r0, _02233594 ; =0x0000270F - str r0, [sp, #0x18] - b _0223356A -_02233566: - ldr r0, _02233598 ; =0x00002710 - str r0, [sp, #0x18] -_0223356A: - ldr r0, [r1, #0x18] - ldr r1, [r1, #0x1c] - add r2, sp, #0 - bl sub_0200CE6C - add r5, r0, #0 - mov r1, #2 - bl sub_0200D41C - add r0, r5, #0 - add r1, r4, #0 - bl sub_0200D364 - add r0, r5, #0 - bl sub_0200D330 - add r0, r5, #0 - add sp, #0x34 - pop {r4, r5, pc} - ; .align 2, 0 -_02233590: .word 0x00002E94 -_02233594: .word 0x0000270F -_02233598: .word 0x00002710 - thumb_func_end ov62_0223352C - - thumb_func_start ov62_0223359C -ov62_0223359C: ; 0x0223359C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl sub_0200D0F4 - ldr r0, [r4, #0x1c] - bl sub_0200D0F4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_0223359C - - thumb_func_start ov62_022335B0 -ov62_022335B0: ; 0x022335B0 - ldr r3, _022335B8 ; =ov62_022335BC - mov r2, #5 - bx r3 - nop -_022335B8: .word ov62_022335BC - thumb_func_end ov62_022335B0 - - thumb_func_start ov62_022335BC -ov62_022335BC: ; 0x022335BC - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - mov r2, #2 - add r3, r6, #0 - bl ov62_0223352C - str r0, [r5, #0x18] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - add r3, r6, #0 - bl ov62_0223352C - str r0, [r5, #0x1c] - ldr r0, [r5, #0x18] - mov r1, #0x18 - mov r2, #0x88 - bl sub_0200D4C4 - ldr r0, [r5, #0x1c] - mov r1, #0xe8 - mov r2, #0x88 - bl sub_0200D4C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_022335BC - - thumb_func_start ov62_022335F4 -ov62_022335F4: ; 0x022335F4 - ldr r3, _022335FC ; =sub_020D5124 - mov r1, #0 - mov r2, #0x20 - bx r3 - ; .align 2, 0 -_022335FC: .word sub_020D5124 - thumb_func_end ov62_022335F4 - - thumb_func_start ov62_02233600 -ov62_02233600: ; 0x02233600 - ldr r3, _02233604 ; =ov62_0223359C - bx r3 - ; .align 2, 0 -_02233604: .word ov62_0223359C - thumb_func_end ov62_02233600 - - thumb_func_start ov62_02233608 -ov62_02233608: ; 0x02233608 - push {r3, r4} - ldr r2, [r0, #0xc] - sub r4, r1, r2 - add r3, r4, #0 - mov r2, #1 - mul r3, r4 - lsl r2, r2, #8 - cmp r3, r2 - blt _0223362E - cmp r4, #0 - bge _02233624 - mov r2, #0 - mvn r2, r2 - b _02233626 -_02233624: - mov r2, #1 -_02233626: - strh r2, [r0, #0x10] - str r1, [r0, #0xc] - pop {r3, r4} - bx lr -_0223362E: - mov r1, #0 - strh r1, [r0, #0x10] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov62_02233608 - - thumb_func_start ov62_02233638 -ov62_02233638: ; 0x02233638 - ldr r2, [r1, #0x48] - cmp r2, #0 - beq _02233650 - ldr r1, [r1, #4] - cmp r1, #2 - bge _0223364A - mov r1, #0 - str r1, [r0, #0x14] - bx lr -_0223364A: - mov r1, #1 - str r1, [r0, #0x14] - bx lr -_02233650: - ldr r2, [r1, #0x10] - ldr r1, [r1, #4] - cmp r2, r1 - blt _0223365E - mov r1, #0 - str r1, [r0, #0x14] - bx lr -_0223365E: - mov r1, #1 - str r1, [r0, #0x14] - bx lr - thumb_func_end ov62_02233638 - - thumb_func_start ov62_02233664 -ov62_02233664: ; 0x02233664 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r0, sp, #4 - add r1, sp, #0 - mov r4, #0 - bl sub_020227A4 - add r6, r0, #0 - ldr r0, [r5, #0x14] - cmp r0, #0 - beq _02233688 - ldr r0, [r5, #0x18] - bl sub_0200D33C - ldr r0, [r5, #0x1c] - bl sub_0200D33C -_02233688: - ldr r0, [r5, #4] - cmp r0, #0 - bne _022336A2 - cmp r6, #0 - bne _022336A2 - mov r0, #0 - str r0, [r5, #4] - str r0, [r5, #0] - str r0, [r5, #8] - str r0, [r5, #0xc] - add sp, #8 - strh r0, [r5, #0x10] - pop {r4, r5, r6, pc} -_022336A2: - ldr r0, _022336FC ; =0x022488F0 - bl sub_02022734 - cmp r0, #0 - bne _022336B6 - ldr r0, _02233700 ; =0x022488F4 - bl sub_02022734 - cmp r0, #0 - beq _022336B8 -_022336B6: - mov r4, #1 -_022336B8: - cmp r4, #0 - ldr r0, [r5, #4] - beq _022336E8 - cmp r0, #0 - bne _022336D6 - mov r0, #1 - str r0, [r5, #4] - ldr r0, [sp, #4] - str r0, [r5, #8] - ldr r0, [sp] - add sp, #8 - str r0, [r5, #0xc] - mov r0, #2 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_022336D6: - ldr r0, [r5, #0] - sub r0, r0, #1 - str r0, [r5, #0] - ldr r1, [sp] - add r0, r5, #0 - bl ov62_02233608 - add sp, #8 - pop {r4, r5, r6, pc} -_022336E8: - cmp r0, #0 - beq _022336F6 - mov r0, #0 - str r0, [r5, #4] - str r0, [r5, #0] - str r0, [r5, #8] - str r0, [r5, #0xc] -_022336F6: - add sp, #8 - pop {r4, r5, r6, pc} - nop -_022336FC: .word 0x022488F0 -_02233700: .word 0x022488F4 - thumb_func_end ov62_02233664 - - thumb_func_start ov62_02233704 -ov62_02233704: ; 0x02233704 - push {r4, lr} - add r4, r1, #0 - mov r1, #0x83 - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl sub_0202CD88 - add r1, r4, #0 - bl sub_0202CFEC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02233704 - - thumb_func_start ov62_0223371C -ov62_0223371C: ; 0x0223371C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x77 - add r2, sp, #4 - bl sub_0202F1F8 - ldr r1, _0223374C ; =0x000008B4 - mov r3, #0 - ldr r0, [r4, r1] - sub r1, #0x84 - ldr r1, [r4, r1] - add r2, r0, #0 - str r1, [sp] - add r1, r0, #0 - add r1, #0x80 - add r2, #0xe4 - bl sub_0202FE20 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_0223374C: .word 0x000008B4 - thumb_func_end ov62_0223371C - - thumb_func_start ov62_02233750 -ov62_02233750: ; 0x02233750 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl ov62_0222F824 - bl sub_02039720 - mov r0, #1 - str r0, [r4, #4] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02233750 - - thumb_func_start ov62_0223376C -ov62_0223376C: ; 0x0223376C - ldr r2, _02233784 ; =0x0000052C - add r3, r0, #0 - str r1, [r3, r2] - mov r1, #0 - add r0, r2, #4 - str r1, [r3, r0] - add r1, r3, r2 - ldr r3, _02233788 ; =sub_0200DA04 - ldr r0, _0223378C ; =ov62_02233750 - mov r2, #4 - bx r3 - nop -_02233784: .word 0x0000052C -_02233788: .word sub_0200DA04 -_0223378C: .word ov62_02233750 - thumb_func_end ov62_0223376C - - thumb_func_start ov62_02233790 -ov62_02233790: ; 0x02233790 - mov r1, #0x53 - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov62_02233790 - - thumb_func_start ov62_02233798 -ov62_02233798: ; 0x02233798 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _022337CE - add r0, r4, #0 - bl ov62_02234534 - cmp r0, #1 - beq _022337CE - ldr r0, _022337D0 ; =0x00000524 - ldr r1, [r4, r0] - cmp r1, #1 - beq _022337CE - mov r1, #1 - str r1, [r4, r0] - ldr r0, [r4, #0x64] - bl sub_02008A94 - ldr r0, [r4, #0x1c] - bl sub_0200C7EC - bl sub_0200C800 - ldr r0, _022337D0 ; =0x00000524 - mov r1, #0 - str r1, [r4, r0] -_022337CE: - pop {r4, pc} - ; .align 2, 0 -_022337D0: .word 0x00000524 - thumb_func_end ov62_02233798 - - thumb_func_start ov62_022337D4 -ov62_022337D4: ; 0x022337D4 - push {r4, lr} - add r4, r0, #0 - ldr r0, _022337E8 ; =ov62_02233798 - add r1, r4, #0 - mov r2, #5 - bl sub_0200DA04 - ldr r1, _022337EC ; =0x0000416C - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 -_022337E8: .word ov62_02233798 -_022337EC: .word 0x0000416C - thumb_func_end ov62_022337D4 - - thumb_func_start ov62_022337F0 -ov62_022337F0: ; 0x022337F0 - push {r3, r4, lr} - sub sp, #4 - ldr r4, _02233818 ; =0x00000836 - add r3, r0, #0 - add r0, r3, r4 - str r0, [sp] - sub r0, r4, #6 - ldr r0, [r3, r0] - sub r4, r4, #2 - add r3, r3, r4 - bl ov62_02248598 - cmp r0, #1 - bls _02233812 - add sp, #4 - mov r0, #1 - pop {r3, r4, pc} -_02233812: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02233818: .word 0x00000836 - thumb_func_end ov62_022337F0 - - thumb_func_start ov62_0223381C -ov62_0223381C: ; 0x0223381C - ldr r2, _02233824 ; =0x00000874 - str r1, [r0, r2] - bx lr - nop -_02233824: .word 0x00000874 - thumb_func_end ov62_0223381C - - thumb_func_start ov62_02233828 -ov62_02233828: ; 0x02233828 - push {r3, r4, r5, r6, r7, lr} - ldr r3, _02233894 ; =0x000008B4 - add r2, r0, #0 - ldr r1, [r1, #0] - add r7, r2, r3 - str r0, [sp] - cmp r1, #1 - beq _02233892 - bl ov62_0224112C - ldr r1, _02233898 ; =0x00001D54 - mov r2, #0x1e - add r1, r7, r1 - bl ov61_0222BE20 - ldr r1, _0223389C ; =0x00003884 - mov r4, #0 - str r0, [r7, r1] - ldr r0, [r7, r1] - cmp r0, #0 - ble _02233892 - ldr r5, [sp] - mov r1, #0x9a - lsl r1, r1, #6 - add r0, r5, #0 - add r6, r0, r1 -_0223385C: - ldr r0, _022338A0 ; =0x00002608 - ldr r0, [r5, r0] - cmp r0, #0 - bne _02233868 - bl sub_02022974 -_02233868: - ldr r0, _022338A0 ; =0x00002608 - add r1, r6, #0 - ldr r0, [r5, r0] - mov r2, #0xe4 - bl sub_020C4DB0 - ldr r0, _022338A0 ; =0x00002608 - ldr r1, [sp] - ldr r0, [r5, r0] - add r2, r1, r4 - add r0, #0xa7 - ldrb r0, [r0] - ldr r1, _022338A4 ; =0x0000413C - add r4, r4, #1 - strb r0, [r2, r1] - ldr r0, _0223389C ; =0x00003884 - add r5, r5, #4 - ldr r0, [r7, r0] - add r6, #0xe4 - cmp r4, r0 - blt _0223385C -_02233892: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02233894: .word 0x000008B4 -_02233898: .word 0x00001D54 -_0223389C: .word 0x00003884 -_022338A0: .word 0x00002608 -_022338A4: .word 0x0000413C - thumb_func_end ov62_02233828 - - thumb_func_start ov62_022338A8 -ov62_022338A8: ; 0x022338A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - mov r5, #0 - add r4, r6, #0 - add r7, r5, #0 -_022338B4: - mov r0, #0x83 - str r5, [sp] - lsl r0, r0, #4 - ldr r0, [r6, r0] - mov r1, #0x66 - add r2, sp, #4 - mov r3, #0 - bl sub_0202F298 - ldr r0, [sp, #4] - cmp r0, #3 - bhi _02233980 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022338D8: ; jump table - .short _022338E0 - _022338D8 - 2 ; case 0 - .short _02233950 - _022338D8 - 2 ; case 1 - .short _02233904 - _022338D8 - 2 ; case 2 - .short _0223392A - _022338D8 - 2 ; case 3 -_022338E0: - ldr r0, _02233998 ; =0x0000087C - str r7, [r4, r0] - add r0, #0x10 - str r7, [r4, r0] - cmp r5, #0 - bne _02233980 - mov r0, #0x66 - bl sub_02030A80 - ldr r1, _0223399C ; =0x0000088C - str r0, [r4, r1] - add r0, r1, #0 - sub r1, #0x5c - ldr r0, [r4, r0] - ldr r1, [r6, r1] - bl sub_02030AA0 - b _02233980 -_02233904: - ldr r0, _02233998 ; =0x0000087C - mov r1, #0 - str r1, [r4, r0] - add r0, #0x10 - str r1, [r4, r0] - cmp r5, #0 - bne _02233980 - mov r0, #0x66 - bl sub_02030A80 - ldr r1, _0223399C ; =0x0000088C - str r0, [r4, r1] - add r0, r1, #0 - sub r1, #0x5c - ldr r0, [r4, r0] - ldr r1, [r6, r1] - bl sub_02030AA0 - b _02233980 -_0223392A: - ldr r0, _02233998 ; =0x0000087C - mov r1, #0 - str r1, [r4, r0] - add r0, #0x10 - str r1, [r4, r0] - cmp r5, #0 - bne _02233980 - mov r0, #0x66 - bl sub_02030A80 - ldr r1, _0223399C ; =0x0000088C - str r0, [r4, r1] - add r0, r1, #0 - sub r1, #0x5c - ldr r0, [r4, r0] - ldr r1, [r6, r1] - bl sub_02030AA0 - b _02233980 -_02233950: - mov r0, #0x66 - bl sub_0202FD88 - ldr r1, _02233998 ; =0x0000087C - cmp r5, #0 - str r0, [r4, r1] - bne _02233976 - mov r0, #0x66 - bl sub_02030A80 - ldr r1, _0223399C ; =0x0000088C - str r0, [r4, r1] - add r0, r1, #0 - sub r1, #0x5c - ldr r0, [r4, r0] - ldr r1, [r6, r1] - bl sub_02030AA0 - b _02233980 -_02233976: - mov r0, #0x66 - bl sub_0202FDB8 - ldr r1, _0223399C ; =0x0000088C - str r0, [r4, r1] -_02233980: - bl sub_0202F250 - cmp r0, #1 - bne _0223398C - bl sub_0202F22C -_0223398C: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #4 - blt _022338B4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02233998: .word 0x0000087C -_0223399C: .word 0x0000088C - thumb_func_end ov62_022338A8 - - thumb_func_start ov62_022339A0 -ov62_022339A0: ; 0x022339A0 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r5, r0, #0 - add r6, r4, #0 - add r7, r4, #0 -_022339AA: - ldr r0, _022339D4 ; =0x0000087C - ldr r0, [r5, r0] - cmp r0, #0 - beq _022339BA - bl sub_020181C4 - ldr r0, _022339D4 ; =0x0000087C - str r6, [r5, r0] -_022339BA: - ldr r0, _022339D8 ; =0x0000088C - ldr r0, [r5, r0] - cmp r0, #0 - beq _022339CA - bl sub_020181C4 - ldr r0, _022339D8 ; =0x0000088C - str r7, [r5, r0] -_022339CA: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022339AA - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022339D4: .word 0x0000087C -_022339D8: .word 0x0000088C - thumb_func_end ov62_022339A0 - - thumb_func_start ov62_022339DC -ov62_022339DC: ; 0x022339DC - push {r4, r5, r6, lr} - sub sp, #0x18 - ldr r4, [r0, #0x18] - ldr r5, [r0, #0x1c] - ldr r6, [r0, #0x28] - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _02233A40 ; =0x000186A0 - mov r1, #2 - str r0, [sp, #0x14] - add r0, r6, #0 - add r2, r4, #0 - add r3, r5, #0 - bl sub_0200CD7C - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02233A40 ; =0x000186A0 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02233A40 ; =0x000186A0 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x13 - bl sub_0200CE3C - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02233A40: .word 0x000186A0 - thumb_func_end ov62_022339DC - - thumb_func_start ov62_02233A44 -ov62_02233A44: ; 0x02233A44 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - ldr r1, _02233A64 ; =0x000186A0 - bl sub_0200D080 - ldr r0, [r4, #0x1c] - ldr r1, _02233A64 ; =0x000186A0 - bl sub_0200D090 - ldr r0, [r4, #0x1c] - ldr r1, _02233A64 ; =0x000186A0 - bl sub_0200D0A0 - pop {r4, pc} - nop -_02233A64: .word 0x000186A0 - thumb_func_end ov62_02233A44 - - thumb_func_start ov62_02233A68 -ov62_02233A68: ; 0x02233A68 - ldr r3, _02233A70 ; =sub_02006C24 - mov r0, #0x13 - mov r1, #0x66 - bx r3 - ; .align 2, 0 -_02233A70: .word sub_02006C24 - thumb_func_end ov62_02233A68 - - thumb_func_start ov62_02233A74 -ov62_02233A74: ; 0x02233A74 - ldr r3, _02233A78 ; =sub_02006CA8 - bx r3 - ; .align 2, 0 -_02233A78: .word sub_02006CA8 - thumb_func_end ov62_02233A74 - - thumb_func_start ov62_02233A7C -ov62_02233A7C: ; 0x02233A7C - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r2, #0 - str r1, [sp, #0xc] - add r4, r3, #0 - ldr r7, [r0, #0x18] - ldr r6, [r0, #0x1c] - bne _02233A92 - add sp, #0x4c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_02233A92: - ldr r0, [sp, #0x60] - str r0, [sp, #0x10] - ldr r0, [sp, #0x64] - ldr r2, [sp, #0x10] - str r0, [sp, #0x14] - ldr r1, [sp, #0x14] - add r0, r4, #0 - bl sub_02079D8C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02233B20 ; =0x000186A0 - ldr r2, [sp, #0xc] - add r0, r5, r0 - str r0, [sp, #8] - add r0, r7, #0 - add r1, r6, #0 - bl sub_0200D8E8 - mov r1, #0 - add r0, sp, #0x18 - add r2, r1, #0 - strh r1, [r0] - sub r2, #0x30 - strh r2, [r0, #2] - strh r1, [r0, #4] - strh r1, [r0, #6] - mov r0, #1 - str r0, [sp, #0x28] - sub r0, r0, #2 - str r1, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x44] - str r1, [sp, #0x48] - ldr r1, _02233B20 ; =0x000186A0 - str r0, [sp, #0x3c] - add r2, r5, r1 - str r2, [sp, #0x2c] - str r0, [sp, #0x40] - str r1, [sp, #0x30] - str r1, [sp, #0x34] - str r1, [sp, #0x38] - add r0, r7, #0 - add r1, r6, #0 - add r2, sp, #0x18 - bl sub_0200CE6C - add r5, r0, #0 - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - add r0, r4, #0 - bl sub_02079EDC - add r1, r0, #0 - add r0, r5, #0 - add r1, r1, #4 - bl sub_0200D430 - add r0, r5, #0 - mov r1, #1 - bl sub_0200D364 - add r0, r5, #0 - bl sub_0200D330 - add r0, r5, #0 - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02233B20: .word 0x000186A0 - thumb_func_end ov62_02233A7C - - thumb_func_start ov62_02233B24 -ov62_02233B24: ; 0x02233B24 - push {r4, lr} - add r4, r2, #0 - beq _02233B3A - ldr r2, _02233B3C ; =0x000186A0 - ldr r0, [r0, #0x1c] - add r1, r1, r2 - bl sub_0200D070 - add r0, r4, #0 - bl sub_0200D0F4 -_02233B3A: - pop {r4, pc} - ; .align 2, 0 -_02233B3C: .word 0x000186A0 - thumb_func_end ov62_02233B24 - - thumb_func_start ov62_02233B40 -ov62_02233B40: ; 0x02233B40 - push {r3, lr} - cmp r2, #0 - beq _02233B4C - add r0, r2, #0 - bl sub_0200D0F4 -_02233B4C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_02233B40 - - thumb_func_start ov62_02233B50 -ov62_02233B50: ; 0x02233B50 - push {r4, r5, r6, r7, lr} - sub sp, #0x9c - ldr r3, _02233E7C ; =0x022489D0 - add r7, r1, #0 - str r0, [sp, #0x14] - add r2, sp, #0x74 - mov r1, #0x14 -_02233B5E: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _02233B5E - ldr r3, _02233E80 ; =0x02248910 - add r2, sp, #0x5c - str r2, [sp, #0x20] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #1 - ldr r5, [sp, #0x14] - str r0, [sp, #0x3c] - mov r0, #0 - str r0, [sp, #0x40] - add r4, sp, #0x74 - add r5, #0x3c -_02233B8A: - mov r0, #0 - ldrsh r0, [r4, r0] - cmp r0, #0xff - beq _02233C3E - ldr r1, [sp, #0x20] - ldr r0, [r7, #0x48] - ldr r1, [r1, #0] - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - bl sub_0201A7A0 - mov r0, #2 - ldrsh r0, [r4, r0] - mov r3, #0 - add r1, r5, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #4 - ldrsh r0, [r4, r0] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #6 - ldrsh r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [sp, #0x3c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrsh r3, [r4, r3] - ldr r0, [r7, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02233E84 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r2, r6, #0 - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - mov r0, #4 - ldrsh r1, [r4, r0] - mov r0, #6 - ldrsh r0, [r4, r0] - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x3c] - add r0, r0, r2 - str r0, [sp, #0x3c] - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x20] - add r4, #8 - add r0, r0, #4 - str r0, [sp, #0x20] - ldr r0, [sp, #0x40] - add r5, #0x10 - add r0, r0, #1 - str r0, [sp, #0x40] - cmp r0, #5 - blt _02233B8A -_02233C3E: - ldr r0, [sp, #0x14] - ldr r6, [r0, #0] - mov r0, #0x66 - bl ov62_02231690 - ldr r5, [sp, #0x14] - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0x66 - add r5, #0x3c - bl sub_02030B94 - str r0, [sp, #0x44] - ldr r1, [sp, #0x44] - add r0, r7, #0 - bl ov62_022349A8 - ldr r0, [r7, #0x48] - mov r1, #7 - bl sub_0200B1EC - str r0, [sp, #0x48] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x44] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x48] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02233E84 ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x44] - bl sub_020237BC - ldr r0, [sp, #0x48] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200C41C - ldr r0, [sp, #0x14] - mov r1, #3 - ldr r0, [r0, #4] - mov r2, #0 - bl sub_0202FE98 - add r1, r0, #0 - ldr r5, [sp, #0x14] - ldr r0, [r7, #0x48] - add r1, #0x84 - add r5, #0x4c - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02233E84 ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200C41C - ldr r0, [sp, #0x14] - mov r1, #2 - ldr r0, [r0, #4] - mov r2, #0 - bl sub_0202FE98 - str r0, [sp, #0x4c] - cmp r0, #0 - beq _02233DD0 - ldr r5, [sp, #0x14] - mov r0, #0xff - mov r1, #0x66 - add r5, #0x5c - bl sub_02023790 - str r0, [sp, #0x50] - ldr r0, [r7, #0x48] - mov r1, #9 - bl sub_0200B1EC - str r0, [sp, #0x54] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x50] - ldr r1, [sp, #0x4c] - mov r2, #4 - mov r3, #0 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x50] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x54] - add r0, r4, #0 - add r1, r6, #0 - bl sub_0200C388 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02233E84 ; =0x000F0D00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x50] - bl sub_020237BC - ldr r0, [sp, #0x54] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200C41C - b _02233DE2 -_02233DD0: - ldr r5, [sp, #0x14] - mov r1, #0 - add r5, #0x6c - add r0, r5, #0 - bl sub_0201ADA4 - add r0, r5, #0 - bl sub_0201A9A4 -_02233DE2: - ldr r0, [sp, #0x14] - mov r1, #4 - ldr r0, [r0, #4] - mov r2, #0 - bl sub_0202FE98 - add r5, r0, #0 - str r1, [sp, #0x1c] - add r6, r1, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x38] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x34] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x30] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x1c] - add r0, #0x7c - str r0, [sp, #0x14] - ldr r2, _02233E88 ; =0x000186A0 - add r0, r5, #0 - mov r3, #0 - bl sub_020E1EE0 - str r0, [sp, #0x2c] - ldr r2, _02233E88 ; =0x000186A0 - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0 - bl sub_020E1ED4 - ldr r2, _02233E88 ; =0x000186A0 - str r0, [sp, #0x58] - mov r3, #0 - add r6, r1, #0 - bl sub_020E1EE0 - str r0, [sp, #0x28] - ldr r0, [sp, #0x58] - ldr r2, _02233E88 ; =0x000186A0 - add r1, r6, #0 - mov r3, #0 - bl sub_020E1ED4 - mov r1, #0xa - str r0, [sp, #0x24] - bl sub_020E2178 - mov r1, #0xa - bl sub_020E2178 - cmp r1, #0 - bne _02233E8C - ldr r0, [sp, #0x1c] - mov r1, #0 - eor r1, r0 - mov r2, #0 - add r0, r5, #0 - eor r0, r2 - orr r0, r1 - beq _02233E8C - ldr r0, [r7, #0x48] - mov r1, #0xc - bl sub_0200B1EC - add r6, r0, #0 - b _02233E96 - nop -_02233E7C: .word 0x022489D0 -_02233E80: .word 0x02248910 -_02233E84: .word 0x000F0D00 -_02233E88: .word 0x000186A0 -_02233E8C: - ldr r0, [r7, #0x48] - mov r1, #0xb - bl sub_0200B1EC - add r6, r0, #0 -_02233E96: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x2c] - mov r2, #5 - mov r3, #2 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r1, [sp, #0x28] - mov r2, #5 - mov r3, #2 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - mov r2, #2 - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x24] - add r3, r2, #0 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - mov r1, #2 - ldr r2, [sp, #0x38] - add r0, r4, #0 - mov r3, #0 - str r1, [sp, #4] - bl sub_0200B48C - mov r1, #1 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x34] - add r0, r4, #0 - mov r3, #0 - bl sub_0200B48C - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x30] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl sub_0200C388 - ldr r0, [sp, #0x14] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02233F70 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x14] - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x14] - bl sub_0201A9A4 - ldr r0, [sp, #0x38] - bl sub_020237BC - ldr r0, [sp, #0x34] - bl sub_020237BC - ldr r0, [sp, #0x30] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0200C41C - add r0, r4, #0 - bl sub_0200B3F0 - add sp, #0x9c - pop {r4, r5, r6, r7, pc} - nop -_02233F70: .word 0x000F0D00 - thumb_func_end ov62_02233B50 - - thumb_func_start ov62_02233F74 -ov62_02233F74: ; 0x02233F74 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x3c -_02233F7C: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #5 - blt _02233F7C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02233F74 - - thumb_func_start ov62_02233F94 -ov62_02233F94: ; 0x02233F94 - push {r3, lr} - mov r1, #3 - mov r2, #0 - bl sub_0202FE98 - cmp r0, #0x1a - bgt _02233FCC - bge _02233FD8 - add r1, r0, #0 - sub r1, #0xe - cmp r1, #9 - bhi _02233FDC - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02233FB8: ; jump table - .short _02233FD8 - _02233FB8 - 2 ; case 0 - .short _02233FDC - _02233FB8 - 2 ; case 1 - .short _02233FDC - _02233FB8 - 2 ; case 2 - .short _02233FD8 - _02233FB8 - 2 ; case 3 - .short _02233FDC - _02233FB8 - 2 ; case 4 - .short _02233FDC - _02233FB8 - 2 ; case 5 - .short _02233FD8 - _02233FB8 - 2 ; case 6 - .short _02233FDC - _02233FB8 - 2 ; case 7 - .short _02233FDC - _02233FB8 - 2 ; case 8 - .short _02233FD8 - _02233FB8 - 2 ; case 9 -_02233FCC: - cmp r0, #0x1d - bgt _02233FD4 - beq _02233FD8 - b _02233FDC -_02233FD4: - cmp r0, #0x20 - bne _02233FDC -_02233FD8: - mov r0, #1 - pop {r3, pc} -_02233FDC: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov62_02233F94 - - thumb_func_start ov62_02233FE0 -ov62_02233FE0: ; 0x02233FE0 - ldr r3, _02233FE8 ; =ov62_02233F94 - ldr r0, [r0, #4] - bx r3 - nop -_02233FE8: .word ov62_02233F94 - thumb_func_end ov62_02233FE0 - - thumb_func_start ov62_02233FEC -ov62_02233FEC: ; 0x02233FEC - push {r3, lr} - bl ov62_02233FE0 - cmp r0, #1 - bne _02233FFA - mov r0, #0x51 - pop {r3, pc} -_02233FFA: - mov r0, #0x52 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_02233FEC - - thumb_func_start ov62_02234000 -ov62_02234000: ; 0x02234000 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x140 - str r0, [sp, #0x18] - mov r0, #0 - str r1, [sp, #0x1c] - ldr r3, _0223420C ; =0x02248A78 - str r0, [sp, #0x44] - add r2, sp, #0xe0 - mov r1, #0x30 -_02234012: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _02234012 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0x18] - str r0, [sp, #0x3c] - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0x1c] - str r0, [sp, #0x38] - ldr r0, [sp, #0x1c] - ldr r4, [r0, #0x28] - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _02234210 ; =0x000186A0 - ldr r2, [sp, #0x3c] - str r0, [sp, #0x14] - ldr r3, [sp, #0x38] - add r0, r4, #0 - mov r1, #2 - bl sub_0200CD7C - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02234210 ; =0x000186A0 - ldr r1, [sp, #0x38] - str r0, [sp, #4] - ldr r0, [sp, #0x3c] - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _02234210 ; =0x000186A0 - ldr r1, [sp, #0x38] - str r0, [sp, #4] - ldr r0, [sp, #0x3c] - mov r2, #0x13 - bl sub_0200CE3C - mov r0, #6 - mov r6, #0 - str r0, [sp, #0x34] - str r0, [sp, #0x2c] - ldr r0, [sp, #0x18] - str r6, [sp, #0x30] - str r6, [sp, #0x40] - bl ov62_02233FE0 - cmp r0, #1 - bne _022340A4 - mov r0, #3 - str r0, [sp, #0x34] - str r0, [sp, #0x2c] - mov r0, #1 - str r0, [sp, #0x40] -_022340A4: - ldr r4, [sp, #0x30] - ldr r0, [sp, #0x2c] - add r1, r4, #0 - cmp r1, r0 - bge _022340EA - lsl r1, r6, #2 - add r0, sp, #0x7c - add r5, r0, r1 - add r0, sp, #0x4c - add r7, r0, r1 -_022340B8: - mov r0, #0xff - str r0, [r5, #0] - ldr r0, [sp, #0x18] - mov r1, #0 - ldr r0, [r0, #4] - add r2, r4, #0 - bl sub_0202FE98 - str r0, [sp, #0x48] - ldr r0, [sp, #0x18] - mov r1, #1 - ldr r0, [r0, #4] - add r2, r4, #0 - bl sub_0202FE98 - ldr r1, [sp, #0x48] - cmp r1, #0 - beq _022340E2 - stmia r5!, {r1} - stmia r7!, {r0} - add r6, r6, #1 -_022340E2: - ldr r0, [sp, #0x2c] - add r4, r4, #1 - cmp r4, r0 - blt _022340B8 -_022340EA: - ldr r1, [sp, #0x2c] - add r0, r6, #0 - cmp r6, r1 - bge _0223410C - lsl r2, r6, #2 - add r1, sp, #0x7c - add r3, r1, r2 - add r1, sp, #0x4c - add r4, r1, r2 - mov r2, #0 -_022340FE: - stmia r3!, {r2} - ldr r1, [sp, #0x2c] - add r0, r0, #1 - stmia r4!, {r2} - add r6, r6, #1 - cmp r0, r1 - blt _022340FE -_0223410C: - ldr r1, [sp, #0x30] - ldr r0, [sp, #0x34] - add r0, r1, r0 - str r0, [sp, #0x30] - ldr r1, [sp, #0x2c] - ldr r0, [sp, #0x34] - add r0, r1, r0 - str r0, [sp, #0x2c] - cmp r0, #0xc - ble _022340A4 - add r0, sp, #0x7c - str r0, [sp, #0x28] - ldr r0, [sp, #0x40] - mov r1, #0x30 - add r2, sp, #0xe0 - mul r1, r0 - ldr r5, [sp, #0x18] - mov r6, #0 - add r7, sp, #0x4c - add r4, r2, r1 -_02234134: - ldr r0, [sp, #0x18] - mov r1, #0 - str r1, [r0, #0xc] - ldr r0, [sp, #0x28] - ldr r0, [r0, #0] - str r0, [sp, #0x20] - cmp r0, #0 - beq _022341F2 - ldr r0, [r7, #0] - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - ldr r2, [sp, #0x24] - bl sub_02079D8C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r1, [sp, #0x44] - ldr r0, _02234210 ; =0x000186A0 - mov r2, #0x13 - add r0, r1, r0 - str r0, [sp, #8] - ldr r0, [sp, #0x3c] - ldr r1, [sp, #0x38] - bl sub_0200D888 - mov r0, #0 - ldrsh r1, [r4, r0] - add r0, sp, #0xac - add r2, sp, #0xac - add r1, #8 - strh r1, [r0] - mov r0, #2 - ldrsh r1, [r4, r0] - add r0, sp, #0xac - sub r1, #0xc - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - strh r1, [r0, #6] - add r0, r1, #0 - str r0, [sp, #0xb4] - str r0, [sp, #0xb8] - mov r0, #1 - str r0, [sp, #0xbc] - add r0, r1, #0 - str r0, [sp, #0xd8] - str r0, [sp, #0xdc] - ldr r1, [sp, #0x44] - ldr r0, _02234210 ; =0x000186A0 - add r0, r1, r0 - str r0, [sp, #0xc0] - ldr r0, _02234210 ; =0x000186A0 - ldr r1, [sp, #0x1c] - str r0, [sp, #0xc4] - str r0, [sp, #0xc8] - str r0, [sp, #0xcc] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0xd0] - str r0, [sp, #0xd4] - ldr r0, [sp, #0x1c] - ldr r1, [r1, #0x1c] - ldr r0, [r0, #0x18] - bl sub_0200CE6C - str r0, [r5, #0xc] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x24] - mov r2, #0 - bl sub_02079EDC - add r1, r0, #0 - ldr r0, [r5, #0xc] - add r1, r1, #4 - bl sub_0200D430 - ldr r0, [r5, #0xc] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r5, #0xc] - bl sub_0200D330 - mov r1, #0xc - ldr r0, [r5, #0xc] - sub r1, r1, r6 - bl sub_0200D474 - ldr r0, [sp, #0x44] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #0x44] -_022341F2: - ldr r0, [sp, #0x18] - add r6, r6, #1 - add r0, r0, #4 - str r0, [sp, #0x18] - ldr r0, [sp, #0x28] - add r7, r7, #4 - add r0, r0, #4 - add r4, r4, #4 - str r0, [sp, #0x28] - cmp r6, #0xc - blt _02234134 - add sp, #0x140 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223420C: .word 0x02248A78 -_02234210: .word 0x000186A0 - thumb_func_end ov62_02234000 - - thumb_func_start ov62_02234214 -ov62_02234214: ; 0x02234214 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov62_02233B50 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_02234000 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02234214 - - thumb_func_start ov62_02234228 -ov62_02234228: ; 0x02234228 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - str r0, [sp] - ldr r0, [r6, #0x1c] - ldr r1, _02234278 ; =0x000186A0 - bl sub_0200D080 - ldr r0, [r6, #0x1c] - ldr r1, _02234278 ; =0x000186A0 - bl sub_0200D090 - ldr r0, [r6, #0x1c] - ldr r1, _02234278 ; =0x000186A0 - bl sub_0200D0A0 - mov r4, #0 - ldr r5, [sp] - add r7, r4, #0 -_0223424C: - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _02234264 - ldr r1, _02234278 ; =0x000186A0 - ldr r0, [r6, #0x1c] - add r1, r4, r1 - bl sub_0200D070 - ldr r0, [r5, #0xc] - bl sub_0200D0F4 - str r7, [r5, #0xc] -_02234264: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xc - blt _0223424C - ldr r0, [sp] - add r1, r6, #0 - bl ov62_02233F74 - pop {r3, r4, r5, r6, r7, pc} - nop -_02234278: .word 0x000186A0 - thumb_func_end ov62_02234228 - - thumb_func_start ov62_0223427C -ov62_0223427C: ; 0x0223427C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 -_02234284: - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _02234290 - add r1, r6, #0 - bl sub_0200D3F4 -_02234290: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xc - blt _02234284 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_0223427C - - thumb_func_start ov62_0223429C -ov62_0223429C: ; 0x0223429C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0 - add r2, r0, #0 - bl sub_02002D7C - add r4, r0, #0 - add r0, r5, #0 - bl sub_0201C294 - lsl r0, r0, #3 - sub r1, r0, r4 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223429C - - thumb_func_start ov62_022342BC -ov62_022342BC: ; 0x022342BC - ldr r1, _022342C8 ; =0x00000834 - mov r2, #0 - strh r2, [r0, r1] - add r1, r1, #2 - strh r2, [r0, r1] - bx lr - ; .align 2, 0 -_022342C8: .word 0x00000834 - thumb_func_end ov62_022342BC - - thumb_func_start ov62_022342CC -ov62_022342CC: ; 0x022342CC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0202783C - add r1, sp, #4 - str r1, [sp] - ldr r1, _02234310 ; =0x0000086C - add r2, sp, #0xc - ldr r1, [r5, r1] - add r3, sp, #8 - add r1, r1, #2 - add r4, r0, #0 - bl sub_020279A8 - add r0, sp, #4 - ldrb r0, [r0] - mov r2, #0 - mvn r2, r2 - str r0, [sp] - ldr r1, _02234310 ; =0x0000086C - add r0, r4, #0 - ldr r1, [r5, r1] - add r3, r2, #0 - add r1, r1, #2 - bl sub_020279D0 - mov r0, #1 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02234310: .word 0x0000086C - thumb_func_end ov62_022342CC - - thumb_func_start ov62_02234314 -ov62_02234314: ; 0x02234314 - push {r3, lr} - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #0 - bl sub_02019060 - mov r0, #7 - mov r1, #1 - bl sub_02019060 - pop {r3, pc} - thumb_func_end ov62_02234314 - - thumb_func_start ov62_02234358 -ov62_02234358: ; 0x02234358 - push {r4, r5, r6, lr} - ldr r0, [r0, #0x44] - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r0, #0 - bne _0223436E - add r0, r5, #0 - mov r1, #1 - bl sub_0208B9E0 -_0223436E: - add r0, r5, #0 - mov r1, #1 - bl sub_0208B8B0 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0208B948 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_0208B8B8 - pop {r4, r5, r6, pc} - thumb_func_end ov62_02234358 - - thumb_func_start ov62_0223438C -ov62_0223438C: ; 0x0223438C - push {r4, r5, r6, lr} - mov r3, #0 - mov r2, #1 - mov r5, #1 - sub r2, r2, r0 - sbc r3, r1 - bhs _022343B2 - mov r4, #0xa - mov r6, #0 -_0223439E: - add r2, r4, #0 - add r3, r6, #0 - bl sub_020E1ED4 - mov r2, #0 - mov r3, #1 - add r5, r5, #1 - sub r3, r3, r0 - sbc r2, r1 - blo _0223439E -_022343B2: - add r0, r5, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_0223438C - - thumb_func_start ov62_022343B8 -ov62_022343B8: ; 0x022343B8 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r3, r2, #0 - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - bl sub_0200710C - add sp, #0x10 - pop {r4, pc} - thumb_func_end ov62_022343B8 - - thumb_func_start ov62_022343D8 -ov62_022343D8: ; 0x022343D8 - push {r4, lr} - ldr r2, _02234438 ; =0x00004160 - add r4, r1, #0 - ldr r1, [r4, r2] - add r1, r1, #1 - str r1, [r4, r2] - ldr r1, [r4, r2] - cmp r1, #7 - blt _02234422 - bl sub_0200DA58 - ldr r0, _02234438 ; =0x00004160 - mov r2, #0 - str r2, [r4, r0] - sub r1, r0, #4 - str r2, [r4, r1] - add r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0208BA54 - ldr r0, _0223443C ; =0x00004164 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _0223443C ; =0x00004164 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B8B0 - ldr r0, _0223443C ; =0x00004164 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - pop {r4, pc} -_02234422: - lsl r0, r1, #1 - add r0, r0, #6 - lsl r0, r0, #0x10 - asr r1, r0, #0x10 - add r0, r2, #4 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - pop {r4, pc} - nop -_02234438: .word 0x00004160 -_0223443C: .word 0x00004164 - thumb_func_end ov62_022343D8 - - thumb_func_start ov62_02234440 -ov62_02234440: ; 0x02234440 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _02234508 ; =0x0000415C - ldr r1, [r4, r0] - cmp r1, #1 - bne _02234460 - add r0, #0xc - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223445A - bl sub_0200DA58 -_0223445A: - ldr r0, _0223450C ; =0x00004168 - mov r1, #0 - str r1, [r4, r0] -_02234460: - ldr r0, _02234510 ; =0x021BF6DC - ldrb r0, [r0, #5] - cmp r0, #0 - bne _0223446C - ldr r0, _02234514 ; =0x000006F4 - b _02234470 -_0223446C: - mov r0, #0x6f - lsl r0, r0, #4 -_02234470: - ldr r1, [r4, r0] - ldr r0, _02234518 ; =0x00004164 - str r1, [r4, r0] - ldr r0, _02234508 ; =0x0000415C - mov r1, #1 - str r1, [r4, r0] - mov r1, #0 - add r0, r0, #4 - str r1, [r4, r0] - add r0, sp, #4 - add r1, sp, #0 - bl sub_020227C0 - ldr r0, _02234518 ; =0x00004164 - ldr r0, [r4, r0] - bl sub_0208BA30 - ldr r0, _02234518 ; =0x00004164 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0208B8B0 - ldr r0, _02234518 ; =0x00004164 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0208B9E0 - ldr r0, _02234518 ; =0x00004164 - ldr r1, [sp, #4] - ldr r2, [sp] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8B8 - ldr r0, _02234518 ; =0x00004164 - ldr r1, [sp, #4] - ldr r2, [sp] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B948 - mov r2, #1 - ldr r0, _0223451C ; =ov62_022343D8 - add r1, r4, #0 - lsl r2, r2, #0xc - bl sub_0200D9E8 - ldr r2, _0223450C ; =0x00004168 - str r0, [r4, r2] - ldr r0, [r4, r2] - cmp r0, #0 - beq _022344EE - add r1, r4, #0 - bl ov62_022343D8 - add sp, #8 - pop {r4, pc} -_022344EE: - add r0, r2, #0 - mov r1, #0 - sub r0, #0xc - str r1, [r4, r0] - sub r0, r2, #4 - ldr r0, [r4, r0] - bl sub_0208B9E0 - bl sub_02022974 - add sp, #8 - pop {r4, pc} - nop -_02234508: .word 0x0000415C -_0223450C: .word 0x00004168 -_02234510: .word 0x021BF6DC -_02234514: .word 0x000006F4 -_02234518: .word 0x00004164 -_0223451C: .word ov62_022343D8 - thumb_func_end ov62_02234440 - - thumb_func_start ov62_02234520 -ov62_02234520: ; 0x02234520 - push {r3, lr} - bl ov62_02234440 - ldr r0, _02234530 ; =0x00000563 - bl sub_02005748 - pop {r3, pc} - nop -_02234530: .word 0x00000563 - thumb_func_end ov62_02234520 - - thumb_func_start ov62_02234534 -ov62_02234534: ; 0x02234534 - ldr r1, _0223453C ; =0x00000528 - ldr r0, [r0, r1] - bx lr - nop -_0223453C: .word 0x00000528 - thumb_func_end ov62_02234534 - - thumb_func_start ov62_02234540 -ov62_02234540: ; 0x02234540 - ldr r2, _02234548 ; =0x00000528 - str r1, [r0, r2] - bx lr - nop -_02234548: .word 0x00000528 - thumb_func_end ov62_02234540 - - thumb_func_start ov62_0223454C -ov62_0223454C: ; 0x0223454C - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r4, r1, #0 - add r5, r0, #0 - add r1, r6, #0 - add r7, r3, #0 - bl ov62_022313E0 - add r1, r5, #0 - str r0, [r4, #4] - add r0, r4, #0 - add r1, #0x14 - add r2, r6, #0 - bl ov62_0223118C - add r5, #0x14 - add r0, r4, #0 - add r1, r5, #0 - add r2, r7, #0 - bl ov62_0223124C - add r3, sp, #8 - mov r1, #0x10 - mov r2, #0x14 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #4] - bl sub_0200D4C4 - add r3, sp, #8 - mov r1, #0x18 - mov r2, #0x1c - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #8] - bl sub_020128C4 - ldr r0, [r4, #8] - ldr r1, [sp, #0x2c] - bl sub_020129D0 - ldr r0, [r4, #4] - ldr r1, [sp, #0x28] - bl sub_0200D364 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_0223454C - - thumb_func_start ov62_022345A8 -ov62_022345A8: ; 0x022345A8 - push {r4, lr} - add r4, r0, #0 - bl ov62_022312B0 - ldr r0, [r4, #4] - bl sub_0200D0F4 - pop {r4, pc} - thumb_func_end ov62_022345A8 - - thumb_func_start ov62_022345B8 -ov62_022345B8: ; 0x022345B8 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r1, r2, #0 - add r0, r3, #0 - ldr r2, [r5, #4] - ldr r3, _02234878 ; =0x00000504 - str r2, [r5, r3] - ldr r4, [r5, #8] - add r2, r3, #4 - str r4, [r5, r2] - ldr r2, [r5, #0x10] - ldr r4, [r2, #0] - add r2, r3, #0 - add r2, #8 - str r4, [r5, r2] - mov r2, #1 - add r3, #0x18 - mov r4, #0xc2 - str r2, [r5, r3] - cmp r0, #0 - beq _022345EE - cmp r0, #1 - beq _0223465E - cmp r0, #2 - beq _022346B0 - b _022348AE -_022345EE: - cmp r1, #0xe - bhi _02234658 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022345FE: ; jump table - .short _0223461C - _022345FE - 2 ; case 0 - .short _02234620 - _022345FE - 2 ; case 1 - .short _02234624 - _022345FE - 2 ; case 2 - .short _02234628 - _022345FE - 2 ; case 3 - .short _0223462C - _022345FE - 2 ; case 4 - .short _02234630 - _022345FE - 2 ; case 5 - .short _02234634 - _022345FE - 2 ; case 6 - .short _02234638 - _022345FE - 2 ; case 7 - .short _0223463C - _022345FE - 2 ; case 8 - .short _02234640 - _022345FE - 2 ; case 9 - .short _02234644 - _022345FE - 2 ; case 10 - .short _02234648 - _022345FE - 2 ; case 11 - .short _0223464C - _022345FE - 2 ; case 12 - .short _02234650 - _022345FE - 2 ; case 13 - .short _02234654 - _022345FE - 2 ; case 14 -_0223461C: - mov r4, #0xf4 - b _022348AE -_02234620: - mov r4, #0xf5 - b _022348AE -_02234624: - mov r4, #0xf6 - b _022348AE -_02234628: - mov r4, #0xf7 - b _022348AE -_0223462C: - mov r4, #0xf8 - b _022348AE -_02234630: - mov r4, #0xf9 - b _022348AE -_02234634: - mov r4, #0xfa - b _022348AE -_02234638: - mov r4, #0xfb - b _022348AE -_0223463C: - mov r4, #0xfc - b _022348AE -_02234640: - mov r4, #0xfd - b _022348AE -_02234644: - mov r4, #0xfe - b _022348AE -_02234648: - mov r4, #0xff - b _022348AE -_0223464C: - add r4, #0x3e - b _022348AE -_02234650: - add r4, #0x3f - b _022348AE -_02234654: - add r4, #0x40 - b _022348AE -_02234658: - bl sub_02022974 - b _022348AE -_0223465E: - cmp r1, #9 - bhi _022346AA - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223466E: ; jump table - .short _02234682 - _0223466E - 2 ; case 0 - .short _02234686 - _0223466E - 2 ; case 1 - .short _0223468A - _0223466E - 2 ; case 2 - .short _0223468E - _0223466E - 2 ; case 3 - .short _02234692 - _0223466E - 2 ; case 4 - .short _02234696 - _0223466E - 2 ; case 5 - .short _0223469A - _0223466E - 2 ; case 6 - .short _0223469E - _0223466E - 2 ; case 7 - .short _022346A2 - _0223466E - 2 ; case 8 - .short _022346A6 - _0223466E - 2 ; case 9 -_02234682: - add r4, #0x41 - b _022348AE -_02234686: - add r4, #0x42 - b _022348AE -_0223468A: - add r4, #0x43 - b _022348AE -_0223468E: - add r4, #0x44 - b _022348AE -_02234692: - add r4, #0x45 - b _022348AE -_02234696: - add r4, #0x46 - b _022348AE -_0223469A: - add r4, #0x47 - b _022348AE -_0223469E: - add r4, #0x48 - b _022348AE -_022346A2: - add r4, #0x49 - b _022348AE -_022346A6: - add r4, #0x4a - b _022348AE -_022346AA: - bl sub_02022974 - b _022348AE -_022346B0: - cmp r6, #8 - bls _022346B6 - b _022348AA -_022346B6: - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022346C2: ; jump table - .short _022346D4 - _022346C2 - 2 ; case 0 - .short _0223470C - _022346C2 - 2 ; case 1 - .short _0223473A - _022346C2 - 2 ; case 2 - .short _0223477A - _022346C2 - 2 ; case 3 - .short _022347A8 - _022346C2 - 2 ; case 4 - .short _022347C8 - _022346C2 - 2 ; case 5 - .short _02234802 - _022346C2 - 2 ; case 6 - .short _02234848 - _022346C2 - 2 ; case 7 - .short _0223487C - _022346C2 - 2 ; case 8 -_022346D4: - cmp r1, #5 - bhi _02234706 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022346E4: ; jump table - .short _022346F0 - _022346E4 - 2 ; case 0 - .short _022346F2 - _022346E4 - 2 ; case 1 - .short _022346F6 - _022346E4 - 2 ; case 2 - .short _022346FA - _022346E4 - 2 ; case 3 - .short _022346FE - _022346E4 - 2 ; case 4 - .short _02234702 - _022346E4 - 2 ; case 5 -_022346F0: - b _022348AE -_022346F2: - mov r4, #0xc3 - b _022348AE -_022346F6: - mov r4, #0xc4 - b _022348AE -_022346FA: - mov r4, #0xc5 - b _022348AE -_022346FE: - mov r4, #0xc6 - b _022348AE -_02234702: - mov r4, #0xc7 - b _022348AE -_02234706: - bl sub_02022974 - b _022348AE -_0223470C: - cmp r1, #3 - bhi _02234734 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223471C: ; jump table - .short _02234724 - _0223471C - 2 ; case 0 - .short _02234728 - _0223471C - 2 ; case 1 - .short _0223472C - _0223471C - 2 ; case 2 - .short _02234730 - _0223471C - 2 ; case 3 -_02234724: - mov r4, #0xc8 - b _022348AE -_02234728: - mov r4, #0xc9 - b _022348AE -_0223472C: - mov r4, #0xca - b _022348AE -_02234730: - mov r4, #0xcb - b _022348AE -_02234734: - bl sub_02022974 - b _022348AE -_0223473A: - cmp r1, #6 - bhi _02234774 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223474A: ; jump table - .short _02234758 - _0223474A - 2 ; case 0 - .short _0223475C - _0223474A - 2 ; case 1 - .short _02234760 - _0223474A - 2 ; case 2 - .short _02234764 - _0223474A - 2 ; case 3 - .short _02234768 - _0223474A - 2 ; case 4 - .short _0223476C - _0223474A - 2 ; case 5 - .short _02234770 - _0223474A - 2 ; case 6 -_02234758: - mov r4, #0xcc - b _022348AE -_0223475C: - mov r4, #0xcd - b _022348AE -_02234760: - mov r4, #0xce - b _022348AE -_02234764: - mov r4, #0xcf - b _022348AE -_02234768: - mov r4, #0xd0 - b _022348AE -_0223476C: - mov r4, #0xd1 - b _022348AE -_02234770: - mov r4, #0xd2 - b _022348AE -_02234774: - bl sub_02022974 - b _022348AE -_0223477A: - cmp r1, #3 - bhi _022347A2 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223478A: ; jump table - .short _02234792 - _0223478A - 2 ; case 0 - .short _02234796 - _0223478A - 2 ; case 1 - .short _0223479A - _0223478A - 2 ; case 2 - .short _0223479E - _0223478A - 2 ; case 3 -_02234792: - mov r4, #0xd3 - b _022348AE -_02234796: - mov r4, #0xd4 - b _022348AE -_0223479A: - mov r4, #0xd5 - b _022348AE -_0223479E: - mov r4, #0xd6 - b _022348AE -_022347A2: - bl sub_02022974 - b _022348AE -_022347A8: - cmp r1, #0 - beq _022347B6 - cmp r1, #1 - beq _022347BA - cmp r1, #2 - beq _022347BE - b _022347C2 -_022347B6: - mov r4, #0xd7 - b _022348AE -_022347BA: - mov r4, #0xd8 - b _022348AE -_022347BE: - mov r4, #0xd9 - b _022348AE -_022347C2: - bl sub_02022974 - b _022348AE -_022347C8: - cmp r1, #5 - bhi _022347FC - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022347D8: ; jump table - .short _022347E4 - _022347D8 - 2 ; case 0 - .short _022347E8 - _022347D8 - 2 ; case 1 - .short _022347EC - _022347D8 - 2 ; case 2 - .short _022347F0 - _022347D8 - 2 ; case 3 - .short _022347F4 - _022347D8 - 2 ; case 4 - .short _022347F8 - _022347D8 - 2 ; case 5 -_022347E4: - mov r4, #0xda - b _022348AE -_022347E8: - mov r4, #0xdb - b _022348AE -_022347EC: - mov r4, #0xdc - b _022348AE -_022347F0: - mov r4, #0xdd - b _022348AE -_022347F4: - mov r4, #0xde - b _022348AE -_022347F8: - mov r4, #0xdf - b _022348AE -_022347FC: - bl sub_02022974 - b _022348AE -_02234802: - cmp r1, #7 - bhi _02234842 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02234812: ; jump table - .short _02234822 - _02234812 - 2 ; case 0 - .short _02234826 - _02234812 - 2 ; case 1 - .short _0223482A - _02234812 - 2 ; case 2 - .short _0223482E - _02234812 - 2 ; case 3 - .short _02234832 - _02234812 - 2 ; case 4 - .short _02234836 - _02234812 - 2 ; case 5 - .short _0223483A - _02234812 - 2 ; case 6 - .short _0223483E - _02234812 - 2 ; case 7 -_02234822: - mov r4, #0xe0 - b _022348AE -_02234826: - mov r4, #0xe1 - b _022348AE -_0223482A: - mov r4, #0xe2 - b _022348AE -_0223482E: - mov r4, #0xe3 - b _022348AE -_02234832: - mov r4, #0xe4 - b _022348AE -_02234836: - mov r4, #0xe5 - b _022348AE -_0223483A: - mov r4, #0xe6 - b _022348AE -_0223483E: - mov r4, #0xe7 - b _022348AE -_02234842: - bl sub_02022974 - b _022348AE -_02234848: - cmp r1, #3 - bhi _02234870 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02234858: ; jump table - .short _02234860 - _02234858 - 2 ; case 0 - .short _02234864 - _02234858 - 2 ; case 1 - .short _02234868 - _02234858 - 2 ; case 2 - .short _0223486C - _02234858 - 2 ; case 3 -_02234860: - mov r4, #0xe8 - b _022348AE -_02234864: - mov r4, #0xe9 - b _022348AE -_02234868: - mov r4, #0xea - b _022348AE -_0223486C: - mov r4, #0xeb - b _022348AE -_02234870: - bl sub_02022974 - b _022348AE - nop -_02234878: .word 0x00000504 -_0223487C: - cmp r1, #3 - bhi _022348A4 - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223488C: ; jump table - .short _02234894 - _0223488C - 2 ; case 0 - .short _02234898 - _0223488C - 2 ; case 1 - .short _0223489C - _0223488C - 2 ; case 2 - .short _022348A0 - _0223488C - 2 ; case 3 -_02234894: - mov r4, #0xec - b _022348AE -_02234898: - mov r4, #0xed - b _022348AE -_0223489C: - mov r4, #0xee - b _022348AE -_022348A0: - mov r4, #0xef - b _022348AE -_022348A4: - bl sub_02022974 - b _022348AE -_022348AA: - bl sub_02022974 -_022348AE: - mov r0, #0x51 - lsl r0, r0, #4 - str r4, [r5, r0] - ldr r0, [r5, r0] - pop {r4, r5, r6, pc} - thumb_func_end ov62_022345B8 - - thumb_func_start ov62_022348B8 -ov62_022348B8: ; 0x022348B8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r5, [r4, #4] - ldr r7, _022348F8 ; =0x00000504 - str r5, [r4, r7] - ldr r6, [r4, #8] - add r5, r7, #4 - str r6, [r4, r5] - ldr r5, [r4, #0x10] - ldr r6, [r5, #0] - add r5, r7, #0 - add r5, #8 - str r6, [r4, r5] - add r5, r7, #0 - mov r6, #0 - add r5, #0x10 - str r6, [r4, r5] - add r7, #0x14 - str r6, [r4, r7] - bl ov62_022345B8 - mov r1, #0x51 - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #1 - add r1, #0xc - str r0, [r4, r1] - ldr r0, [r4, #0x10] - mov r1, #0x12 - str r1, [r0, #0] - pop {r3, r4, r5, r6, r7, pc} - nop -_022348F8: .word 0x00000504 - thumb_func_end ov62_022348B8 - - thumb_func_start ov62_022348FC -ov62_022348FC: ; 0x022348FC - push {r4, lr} - ldr r2, _0223496C ; =0x00000514 - add r4, r0, #0 - ldr r1, [r4, r2] - cmp r1, #0 - beq _0223490E - cmp r1, #1 - beq _02234934 - b _0223494C -_0223490E: - add r1, r2, #4 - ldr r1, [r4, r1] - cmp r1, #8 - bge _02234922 - add r0, r2, #4 - ldr r0, [r4, r0] - add r1, r0, #1 - add r0, r2, #4 - str r1, [r4, r0] - pop {r4, pc} -_02234922: - sub r1, r2, #4 - ldr r1, [r4, r1] - bl ov62_02231AAC - ldr r0, _0223496C ; =0x00000514 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - pop {r4, pc} -_02234934: - bl sub_02022798 - cmp r0, #0 - beq _02234968 - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, _0223496C ; =0x00000514 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - pop {r4, pc} -_0223494C: - add r0, r2, #4 - ldr r0, [r4, r0] - cmp r0, #0 - ble _02234960 - add r0, r2, #4 - ldr r0, [r4, r0] - sub r1, r0, #1 - add r0, r2, #4 - str r1, [r4, r0] - pop {r4, pc} -_02234960: - sub r2, #8 - ldr r1, [r4, r2] - ldr r0, [r4, #0x10] - str r1, [r0, #0] -_02234968: - pop {r4, pc} - nop -_0223496C: .word 0x00000514 - thumb_func_end ov62_022348FC - - thumb_func_start ov62_02234970 -ov62_02234970: ; 0x02234970 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r2, #0 - mov r4, #1 - add r5, r0, #4 -_0223497A: - ldr r0, _022349A4 ; =0x0000087C - ldr r0, [r5, r0] - cmp r0, #0 - beq _02234996 - mov r1, #4 - mov r2, #0 - bl sub_0202FE98 - eor r1, r7 - eor r0, r6 - orr r0, r1 - bne _02234996 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02234996: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223497A - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022349A4: .word 0x0000087C - thumb_func_end ov62_02234970 - - thumb_func_start ov62_022349A8 -ov62_022349A8: ; 0x022349A8 - push {r4, r5, r6, lr} - add r5, r1, #0 - bl ov62_0224112C - mov r1, #0x51 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - mov r0, #0x40 - bl sub_02023790 - add r6, r0, #0 - mov r0, #0 - add r1, r5, #0 - add r2, r6, #0 - bl sub_02002DB4 - cmp r0, #0 - bne _022349DA - mov r1, #0x51 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov62_022349E4 -_022349DA: - add r0, r6, #0 - bl sub_020237BC - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_022349A8 - - thumb_func_start ov62_022349E4 -ov62_022349E4: ; 0x022349E4 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - bl sub_020237E8 - mov r0, #1 - mov r1, #0x1a - mov r2, #0xa - add r3, r5, #0 - bl sub_0200B144 - mov r1, #0x53 - add r5, r0, #0 - lsl r1, r1, #2 - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r5, #0 - bl sub_0200B190 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_022349E4 - - thumb_func_start ov62_02234A10 -ov62_02234A10: ; 0x02234A10 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - ldr r4, _02234A88 ; =0x000008A4 - add r5, r0, #0 - add r0, r5, r4 - bl sub_0201A7A0 - mov r0, #0x10 - str r0, [sp] - str r0, [sp, #4] - mov r2, #2 - str r2, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r5, r4 - mov r3, #8 - bl sub_0201A7E8 - add r0, r5, r4 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0xc0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, r4 - add r1, r6, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02234A8C ; =0x00010E00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r5, r4 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - add r0, r5, r4 - bl sub_0201A9A4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_02234A88: .word 0x000008A4 -_02234A8C: .word 0x00010E00 - thumb_func_end ov62_02234A10 - - thumb_func_start ov62_02234A90 -ov62_02234A90: ; 0x02234A90 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02234AB0 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _02234AB0 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - pop {r4, pc} - nop -_02234AB0: .word 0x000008A4 - thumb_func_end ov62_02234A90 - - thumb_func_start ov62_02234AB4 -ov62_02234AB4: ; 0x02234AB4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #6 - bls _02234AC2 - b _02234CB6 -_02234AC2: - add r2, r1, r1 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_02234ACE: ; jump table - .short _02234ADC - _02234ACE - 2 ; case 0 - .short _02234B7E - _02234ACE - 2 ; case 1 - .short _02234BC2 - _02234ACE - 2 ; case 2 - .short _02234C0E - _02234ACE - 2 ; case 3 - .short _02234C32 - _02234ACE - 2 ; case 4 - .short _02234C5A - _02234ACE - 2 ; case 5 - .short _02234C82 - _02234ACE - 2 ; case 6 -_02234ADC: - bl ov62_022300BC - cmp r0, #1 - bne _02234AEE - add r0, r4, #0 - mov r1, #1 - bl ov62_0222FB60 - b _02234CBE -_02234AEE: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - ldr r2, _02234CC4 ; =0x0000FFFE - mov r1, #2 - mov r3, #0x10 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - ldr r2, _02234CC8 ; =0x0000BFFF - mov r1, #0 - mov r3, #0x10 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - ldr r2, _02234CCC ; =0x00003FFE - mov r1, #3 - mov r3, #0x10 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - ldr r2, _02234CD0 ; =0x0000FFFF - mov r1, #1 - mov r3, #0x10 - bl sub_02003A2C - ldr r0, _02234CD4 ; =0x000006F4 - ldr r0, [r4, r0] - bl sub_0208BA30 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0208BA30 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234CBE -_02234B7E: - bl sub_0200F2AC - cmp r0, #0 - bne _02234B88 - b _02234CBE -_02234B88: - ldr r0, _02234CD4 ; =0x000006F4 - mov r1, #0x80 - ldr r0, [r4, r0] - mov r2, #0x10 - bl sub_0208B948 - ldr r0, _02234CD4 ; =0x000006F4 - mov r1, #0x80 - ldr r0, [r4, r0] - mov r2, #0xd8 - bl sub_0208B8B8 - ldr r0, _02234CD4 ; =0x000006F4 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0208B9E0 - ldr r0, _02234CD4 ; =0x000006F4 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0208B8B0 - ldr r0, _02234CD8 ; =0x0000055E - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234CBE -_02234BC2: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0x19 - blt _02234CBE - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x80 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x90 - bl sub_0208B948 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0x60 - bl sub_0208B8B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B8B0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234CBE -_02234C0E: - ldr r1, [r4, #0xc] - add r1, r1, #1 - str r1, [r4, #0xc] - cmp r1, #0x12 - blt _02234CBE - bl ov62_02234A10 - ldr r0, _02234CD4 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - mov r0, #0 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234CBE -_02234C32: - ldr r0, [r4, #0xc] - cmp r0, #0x10 - bge _02234C54 - add r0, r0, #4 - str r0, [r4, #0xc] - ldr r0, _02234CD0 ; =0x0000FFFF - mov r2, #0xf - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsl r2, r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02234CBE -_02234C54: - add r0, r1, #1 - str r0, [r4, #8] - b _02234CBE -_02234C5A: - ldr r0, [r4, #0xc] - cmp r0, #0 - ble _02234C7C - sub r0, r0, #4 - str r0, [r4, #0xc] - ldr r0, _02234CD0 ; =0x0000FFFF - mov r2, #0xf - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsl r2, r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02234CBE -_02234C7C: - add r0, r1, #1 - str r0, [r4, #8] - b _02234CBE -_02234C82: - bl sub_0202278C - cmp r0, #1 - bne _02234CBE - add r0, r4, #0 - bl ov62_02234A90 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, _02234CD4 ; =0x000006F4 - ldr r0, [r4, r0] - bl sub_0208BA54 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0208BA54 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234CBE -_02234CB6: - add r0, r4, #0 - mov r1, #1 - bl ov62_0222FB60 -_02234CBE: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02234CC4: .word 0x0000FFFE -_02234CC8: .word 0x0000BFFF -_02234CCC: .word 0x00003FFE -_02234CD0: .word 0x0000FFFF -_02234CD4: .word 0x000006F4 -_02234CD8: .word 0x0000055E - thumb_func_end ov62_02234AB4 - - thumb_func_start ov62_02234CDC -ov62_02234CDC: ; 0x02234CDC - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _02234CF4 - cmp r1, #1 - beq _02234DC4 - cmp r1, #2 - bne _02234CF2 - b _02234E8A -_02234CF2: - b _02234ECA -_02234CF4: - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02230330 - add r0, r4, #0 - bl ov62_02230464 - add r0, r4, #0 - bl ov62_022306B8 - add r0, r4, #0 - bl ov62_0223088C - add r0, r4, #0 - bl ov62_02230E80 - add r0, r4, #0 - bl ov62_02230A5C - add r0, r4, #0 - bl ov62_02230AF0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022300BC - cmp r0, #1 - bne _02234DB2 - ldr r0, [r4, #0] - cmp r0, #0 - bne _02234D56 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x45 - mov r3, #5 - bl sub_0200710C - b _02234D6E -_02234D56: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x37 - mov r3, #5 - bl sub_0200710C -_02234D6E: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0xe0 - bl sub_0208B948 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0xe0 - bl sub_0208B8B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B8B0 - ldr r1, _02234EE0 ; =0x0000083C - ldr r3, [r4, #0x10] - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #1 - bl ov62_0222FB44 - b _02234ED8 -_02234DB2: - ldr r0, _02234EE4 ; =0x0000055B - bl sub_02005748 - mov r0, #0x10 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234ED8 -_02234DC4: - bl ov62_022300BC - cmp r0, #1 - bne _02234DDE - bl sub_0200F2AC - cmp r0, #1 - beq _02234DD6 - b _02234ED8 -_02234DD6: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234ED8 -_02234DDE: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02234E5A - sub r0, r0, #2 - str r0, [r4, #0xc] - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _02234EE8 ; =0x0000FFFE - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _02234EEC ; =0x0000FFFF - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _02234EF0 ; =0x00003FFE - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _02234EEC ; =0x0000FFFF - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02234ED8 -_02234E5A: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #2 - mov r3, #0x10 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234ED8 -_02234E8A: - ldr r0, [r4, #0] - cmp r0, #0 - bne _02234EAA - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x45 - mov r3, #5 - bl sub_0200710C - b _02234EC2 -_02234EAA: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x37 - mov r3, #5 - bl sub_0200710C -_02234EC2: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234ED8 -_02234ECA: - ldr r1, _02234EF4 ; =0x00000724 - ldr r1, [r4, r1] - cmp r1, #3 - blt _02234ED8 - mov r1, #2 - bl ov62_0222FB60 -_02234ED8: - mov r0, #0 - add sp, #0x10 - pop {r4, pc} - nop -_02234EE0: .word 0x0000083C -_02234EE4: .word 0x0000055B -_02234EE8: .word 0x0000FFFE -_02234EEC: .word 0x0000FFFF -_02234EF0: .word 0x00003FFE -_02234EF4: .word 0x00000724 - thumb_func_end ov62_02234CDC - - thumb_func_start ov62_02234EF8 -ov62_02234EF8: ; 0x02234EF8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _02234F0C - cmp r1, #1 - beq _02234F74 - cmp r1, #2 - beq _02234F94 - b _02234FC0 -_02234F0C: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0x60 - bl sub_0208B948 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0x60 - bl sub_0208B8B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B8B0 - ldr r0, [r4, #0xc] - mov r3, #0x10 - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r5, [r4, #0xc] - ldr r0, [r4, #0x28] - sub r3, r3, r5 - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0xc] - cmp r0, #2 - bne _02234FC6 - mov r0, #0xf - str r0, [r4, #0xc] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234FC6 -_02234F74: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234FC6 -_02234F94: - ldr r0, [r4, #0xc] - mov r1, #1 - sub r0, r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0x58] - mov r2, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _02234FC6 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02234FC6 -_02234FC0: - mov r1, #3 - bl ov62_0222FB60 -_02234FC6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02234EF8 - - thumb_func_start ov62_02234FCC -ov62_02234FCC: ; 0x02234FCC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov62_02235008 - add r4, r0, #0 - ldr r0, _02235004 ; =0x000005FC - add r1, sp, #0 - ldr r0, [r5, r0] - add r1, #2 - add r2, sp, #0 - bl ov62_02230E74 - mov r0, #0x6f - lsl r0, r0, #4 - add r3, sp, #0 - mov r1, #2 - ldrsh r1, [r3, r1] - mov r2, #0 - ldrsh r2, [r3, r2] - add r1, #0x10 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - bl sub_0208B8B8 - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_02235004: .word 0x000005FC - thumb_func_end ov62_02234FCC - - thumb_func_start ov62_02235008 -ov62_02235008: ; 0x02235008 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldr r0, [r5, #8] - cmp r0, #0 - beq _0223501A - cmp r0, #1 - beq _02235106 - b _022351F6 -_0223501A: - mov r0, #0x66 - mov r1, #0x54 - bl sub_02018144 - mov r1, #0 - mov r2, #0x54 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - add r0, r4, #0 - add r3, r4, #0 - mov r1, #0x10 - add r0, #0x50 - strb r1, [r0] - ldr r0, [r5, #0x58] - add r3, #0x50 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldrb r3, [r3] - ldr r0, [r5, #0x28] - mov r1, #2 - mov r2, #0xc - bl sub_02003A2C - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - ble _022350FE - ldr r0, [sp, #0x14] - mov r7, #0x19 - str r0, [sp, #4] - add r6, r5, #0 -_02235068: - ldr r0, [sp, #4] - mov r2, #0x6e - str r0, [r4, #0] - mov r0, #0x5a - str r0, [r4, #4] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r1, [r5, r0] - mov r0, #5 - sub r0, r0, r1 - lsl r0, r0, #4 - add r0, r7, r0 - strh r0, [r4, #8] - lsl r2, r2, #4 - ldr r3, [r5, r2] - mov r2, #5 - sub r2, r2, r3 - ldr r0, _0223526C ; =0x000005FC - lsl r2, r2, #4 - add r2, #0xa9 - lsl r2, r2, #0x10 - ldr r0, [r6, r0] - mov r1, #0x2a - asr r2, r2, #0x10 - bl ov62_02230E68 - ldr r0, _0223526C ; =0x000005FC - add r1, r4, #0 - ldr r0, [r6, r0] - add r1, #0xc - add r2, sp, #0x20 - bl sub_0200D638 - mov r2, #0x6e - lsl r2, r2, #4 - ldr r3, [r5, r2] - mov r2, #5 - ldr r0, _0223526C ; =0x000005FC - sub r2, r2, r3 - lsl r2, r2, #4 - add r2, #0xa9 - ldr r0, [r6, r0] - ldr r1, [r4, #0xc] - lsl r2, r2, #0xc - bl sub_0200D614 - mov r0, #0x61 - lsl r0, r0, #4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r6, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r6, r0] - mov r1, #1 - bl sub_020129D0 - ldr r0, [sp, #4] - add r4, #0x10 - add r0, r0, #4 - str r0, [sp, #4] - ldr r0, [sp, #0x14] - add r7, #0x24 - add r0, r0, #1 - str r0, [sp, #0x14] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r1, [r5, r0] - ldr r0, [sp, #0x14] - add r6, #0x28 - cmp r0, r1 - blt _02235068 -_022350FE: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02235266 -_02235106: - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - cmp r0, #0 - beq _0223513C - add r0, r4, #0 - add r0, #0x50 - ldrb r0, [r0] - add r3, r4, #0 - add r3, #0x50 - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x50 - strb r1, [r0] - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldrb r3, [r3] - ldr r0, [r5, #0x28] - mov r2, #0xc - bl sub_02003A2C -_0223513C: - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r1, [r5, r0] - cmp r1, #0 - ble _022351E8 - add r6, r5, #0 - add r7, sp, #0x18 -_02235150: - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223515C - sub r0, r0, #1 - str r0, [r4, #0] - b _022351D2 -_0223515C: - ldr r0, _0223526C ; =0x000005FC - add r1, sp, #0x1c - ldr r0, [r6, r0] - add r1, #2 - add r2, sp, #0x1c - bl ov62_02230E74 - mov r0, #8 - mov r1, #4 - ldrsh r0, [r4, r0] - ldrsh r2, [r7, r1] - cmp r2, r0 - bne _0223517E - ldr r0, [sp, #0xc] - add r0, r0, #1 - str r0, [sp, #0xc] - b _022351D2 -_0223517E: - add r1, r2, #0 - sub r1, #8 - cmp r1, r0 - ble _0223518C - sub r2, #8 - strh r2, [r7, #4] - b _0223518E -_0223518C: - strh r0, [r7, #4] -_0223518E: - mov r0, #4 - ldrsh r0, [r7, r0] - ldr r1, [r4, #4] - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, _02235270 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - lsl r1, r0, #4 - ldr r0, [r4, #4] - ldr r2, [r4, #0xc] - sub r0, r0, #4 - str r0, [r4, #4] - ldr r0, _0223526C ; =0x000005FC - add r1, r2, r1 - ldr r0, [r6, r0] - ldr r2, [sp, #8] - bl sub_0200D614 - mov r0, #0x61 - lsl r0, r0, #4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r6, r0] - sub r2, #0x2c - bl sub_020128C4 -_022351D2: - ldr r0, [sp, #0x10] - add r4, #0x10 - add r0, r0, #1 - str r0, [sp, #0x10] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r1, [r5, r0] - ldr r0, [sp, #0x10] - add r6, #0x28 - cmp r0, r1 - blt _02235150 -_022351E8: - ldr r0, [sp, #0xc] - cmp r0, r1 - bne _02235266 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02235266 -_022351F6: - ldr r1, _02235274 ; =0x000006E4 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r2, [r5, r1] - ldr r4, [r5, r0] - mov r0, #0x28 - mul r0, r2 - add r0, r5, r0 - sub r1, #0xe8 - ldr r0, [r0, r1] - add r1, sp, #0x18 - add r1, #2 - add r2, sp, #0x18 - bl ov62_02230E74 - mov r0, #0x6f - lsl r0, r0, #4 - add r2, sp, #0x18 - mov r1, #2 - ldrsh r1, [r2, r1] - mov r3, #0 - ldrsh r2, [r2, r3] - add r1, #0x10 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - bl sub_0208B948 - mov r0, #0x6f - lsl r0, r0, #4 - add r2, sp, #0x18 - mov r1, #2 - ldrsh r1, [r2, r1] - mov r3, #0 - ldrsh r2, [r2, r3] - add r1, #0x10 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - bl sub_0208B8B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r5, #0 - bl ov62_0222FF7C - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02235266: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223526C: .word 0x000005FC -_02235270: .word 0x0000FFFF -_02235274: .word 0x000006E4 - thumb_func_end ov62_02235008 - - thumb_func_start ov62_02235278 -ov62_02235278: ; 0x02235278 - push {r4, lr} - add r4, r0, #0 - bl sub_02022798 - cmp r0, #0 - beq _02235292 - ldr r0, _022352D4 ; =0x0000089C - ldr r0, [r4, r0] - cmp r0, #0 - bne _02235292 - add r0, r4, #0 - bl ov62_02231A1C -_02235292: - ldr r0, [r4, #0] - cmp r0, #0 - bne _022352CA - bl ov62_022352DC - cmp r0, #1 - beq _022352A6 - cmp r0, #2 - beq _022352B8 - b _022352CA -_022352A6: - ldr r0, _022352D8 ; =0x00000563 - bl sub_02005748 - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 - mov r0, #0 - pop {r4, pc} -_022352B8: - ldr r0, _022352D8 ; =0x00000563 - bl sub_02005748 - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 - mov r0, #0 - pop {r4, pc} -_022352CA: - add r0, r4, #0 - bl ov62_02230054 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_022352D4: .word 0x0000089C -_022352D8: .word 0x00000563 - thumb_func_end ov62_02235278 - - thumb_func_start ov62_022352DC -ov62_022352DC: ; 0x022352DC - push {r3, lr} - ldr r0, _02235300 ; =0x02248BE8 - bl sub_02022734 - cmp r0, #0 - beq _022352EC - mov r0, #1 - pop {r3, pc} -_022352EC: - ldr r0, _02235304 ; =0x02248BEC - bl sub_02022734 - cmp r0, #0 - beq _022352FA - mov r0, #2 - pop {r3, pc} -_022352FA: - mov r0, #0 - pop {r3, pc} - nop -_02235300: .word 0x02248BE8 -_02235304: .word 0x02248BEC - thumb_func_end ov62_022352DC - - thumb_func_start ov62_02235308 -ov62_02235308: ; 0x02235308 - push {r4, lr} - add r4, r0, #0 - bl sub_02022974 - mov r0, #1 - str r0, [r4, #0x44] - add r0, r4, #0 - mov r1, #0 - bl ov62_0222FB60 - add r0, r4, #0 - bl ov62_02235278 - pop {r4, pc} - thumb_func_end ov62_02235308 - - thumb_func_start ov62_02235324 -ov62_02235324: ; 0x02235324 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _0223533A - cmp r1, #1 - beq _02235364 - cmp r1, #2 - beq _022353EA - b _02235416 -_0223533A: - mov r1, #0 - str r1, [r4, #0x54] - mov r0, #0x6f - str r1, [r4, #0xc] - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0208B9E0 - ldr r0, _02235434 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223542C -_02235364: - ldr r1, [r4, #0xc] - cmp r1, #0x10 - beq _022353DE - add r1, r1, #2 - str r1, [r4, #0xc] - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _02235438 ; =0x0000FFFE - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _0223543C ; =0x0000FFFF - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _02235440 ; =0x00003FFE - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022316D0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0xc] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - ldr r2, _0223543C ; =0x0000FFFF - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223542C -_022353DE: - mov r0, #0x10 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223542C -_022353EA: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _022353F6 - sub r0, r0, #4 - str r0, [r4, #0xc] - b _0223542C -_022353F6: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223542C -_02235416: - bl sub_0200F2AC - cmp r0, #1 - bne _0223542C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add sp, #0xc - mov r0, #1 - pop {r3, r4, pc} -_0223542C: - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - nop -_02235434: .word 0x000006F4 -_02235438: .word 0x0000FFFE -_0223543C: .word 0x0000FFFF -_02235440: .word 0x00003FFE - thumb_func_end ov62_02235324 - - thumb_func_start ov62_02235444 -ov62_02235444: ; 0x02235444 - push {r4, lr} - add r4, r0, #0 - bl ov62_02235008 - cmp r0, #0 - beq _02235474 - ldr r0, [r4, #0x44] - cmp r0, #1 - bne _0223546C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r4, #0 - mov r1, #0 - bl ov62_0222FB60 - b _02235474 -_0223546C: - add r0, r4, #0 - mov r1, #1 - bl ov62_0222FB60 -_02235474: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02235444 - - thumb_func_start ov62_02235478 -ov62_02235478: ; 0x02235478 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x44] - cmp r1, #1 - bne _02235498 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r4, #0 - mov r1, #0 - bl ov62_0222FB60 - b _0223549E -_02235498: - mov r1, #1 - bl ov62_0222FB60 -_0223549E: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02235478 - - thumb_func_start ov62_022354A4 -ov62_022354A4: ; 0x022354A4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrb r0, [r4, #0x1d] - cmp r0, #0 - beq _022354B6 - cmp r0, #1 - beq _022354E0 - b _02235570 -_022354B6: - mov r0, #4 - ldrsh r1, [r4, r0] - mov r0, #0 - ldrsh r0, [r4, r0] - sub r0, r1, r0 - ldrb r1, [r4, #0x1c] - bl sub_020E1F6C - strh r0, [r4, #8] - mov r0, #6 - ldrsh r1, [r4, r0] - mov r0, #2 - ldrsh r0, [r4, r0] - sub r0, r1, r0 - ldrb r1, [r4, #0x1c] - bl sub_020E1F6C - strh r0, [r4, #0xa] - ldrb r0, [r4, #0x1d] - add r0, r0, #1 - strb r0, [r4, #0x1d] -_022354E0: - add r1, sp, #0 - ldr r0, [r4, #0x20] - add r1, #2 - add r2, sp, #0 - bl ov62_02230E74 - ldrb r0, [r4, #0x1c] - add r1, sp, #0 - sub r0, r0, #1 - strb r0, [r4, #0x1c] - ldrb r0, [r4, #0x1c] - cmp r0, #0 - bne _0223550E - mov r0, #4 - ldrsh r0, [r4, r0] - strh r0, [r1, #2] - mov r0, #6 - ldrsh r0, [r4, r0] - strh r0, [r1] - ldrb r0, [r4, #0x1d] - add r0, r0, #1 - strb r0, [r4, #0x1d] - b _02235526 -_0223550E: - mov r0, #2 - ldrsh r2, [r1, r0] - mov r0, #8 - ldrsh r0, [r4, r0] - add r0, r2, r0 - strh r0, [r1, #2] - mov r0, #0 - ldrsh r2, [r1, r0] - mov r0, #0xa - ldrsh r0, [r4, r0] - add r0, r2, r0 - strh r0, [r1] -_02235526: - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _0223554C - add r3, sp, #0 - mov r1, #2 - ldrsh r1, [r3, r1] - mov r2, #0 - ldrsh r2, [r3, r2] - add r1, #0x10 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - bl sub_0208B8B8 - ldrb r0, [r4, #0x1c] - cmp r0, #2 - bne _0223554C - ldr r0, [r4, #0x30] - mov r1, #1 - str r1, [r0, #0] -_0223554C: - add r3, sp, #0 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r4, #0x20] - bl ov62_02230E68 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x24] - sub r2, #0x2c - bl sub_020128C4 - ldr r0, [r4, #0x2c] - mov r1, #1 - str r1, [r0, #0] - pop {r3, r4, r5, pc} -_02235570: - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_022354A4 - - thumb_func_start ov62_02235580 -ov62_02235580: ; 0x02235580 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _02235598 - cmp r1, #1 - beq _02235676 - cmp r1, #2 - bne _02235596 - b _02235800 -_02235596: - b _02235830 -_02235598: - mov r0, #0x66 - mov r1, #0x10 - bl sub_02018144 - str r0, [sp, #4] - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - mov r1, #0x86 - ldr r0, [sp, #4] - lsl r1, r1, #4 - str r0, [r4, r1] - mov r7, #0 - str r7, [r0, #8] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0 - ble _02235668 - ldr r0, [sp, #4] - add r6, r4, #0 - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #4] - str r0, [sp, #0x10] - add r0, #0xc - str r0, [sp, #0x10] -_022355D0: - mov r0, #0x66 - mov r1, #0x34 - bl sub_02018144 - mov r1, #0 - mov r2, #0x34 - add r5, r0, #0 - bl sub_020D5124 - ldr r0, _02235838 ; =0x000005FC - add r1, r5, #0 - ldr r0, [r6, r0] - add r2, r5, #2 - bl ov62_02230E74 - ldr r0, _02235838 ; =0x000005FC - ldr r0, [r6, r0] - str r0, [r5, #0x20] - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r6, r0] - str r0, [r5, #0x24] - ldr r0, [sp, #0xc] - str r0, [r5, #0x2c] - ldr r0, [sp, #0x10] - str r0, [r5, #0x30] - ldr r0, _0223583C ; =0x000006E4 - ldr r0, [r4, r0] - cmp r7, r0 - bne _02235626 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - str r0, [r5, #0x28] - mov r0, #0 - ldrsh r0, [r5, r0] - strh r0, [r5, #4] - mov r0, #0x2f - mvn r0, r0 - strh r0, [r5, #6] - mov r0, #8 - strb r0, [r5, #0x1c] - b _0223564E -_02235626: - mov r0, #0 - str r0, [r5, #0x28] - ldrsh r0, [r5, r0] - strh r0, [r5, #4] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r1, [r4, r0] - mov r0, #5 - sub r0, r0, r1 - lsl r0, r0, #4 - add r0, #0xcd - strh r0, [r5, #6] - mov r0, #6 - ldrsh r0, [r5, r0] - cmp r0, #0xdd - blt _0223564A - mov r0, #0xdd - strh r0, [r5, #6] -_0223564A: - mov r0, #8 - strb r0, [r5, #0x1c] -_0223564E: - mov r2, #2 - ldr r0, _02235840 ; =ov62_022354A4 - add r1, r5, #0 - lsl r2, r2, #0xc - bl sub_0200D9E8 - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r7, r7, #1 - add r6, #0x28 - cmp r7, r0 - blt _022355D0 -_02235668: - ldr r0, [sp, #4] - mov r1, #0 - str r1, [r0, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235830 -_02235676: - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r4, r0] - str r0, [sp, #8] - ldr r0, [r0, #0] - cmp r0, #0x10 - beq _022356A4 - add r1, r0, #2 - ldr r0, [sp, #8] - ldr r3, [sp, #8] - str r1, [r0, #0] - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r3, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_022356A4: - ldr r0, [sp, #8] - ldr r0, [r0, #0xc] - cmp r0, #1 - beq _022356AE - b _022357B8 -_022356AE: - ldr r0, [sp, #8] - mov r7, #0 - ldr r0, [r0, #8] - cmp r0, #0 - bne _022357AE - ldr r0, [sp, #8] - mov r1, #1 - str r1, [r0, #8] - ldr r0, _02235844 ; =0x00000534 - add r6, r4, #0 - add r0, r4, r0 - str r0, [sp, #0x18] - ldr r0, [sp, #8] - add r0, r0, #4 - str r0, [sp, #0x14] -_022356CC: - mov r0, #0x66 - mov r1, #0x34 - bl sub_02018144 - mov r1, #0 - mov r2, #0x34 - add r5, r0, #0 - bl sub_020D5124 - ldr r0, _02235844 ; =0x00000534 - add r1, r5, #0 - ldr r0, [r6, r0] - add r2, r5, #2 - bl ov62_02230E74 - ldr r0, _02235844 ; =0x00000534 - ldr r0, [r6, r0] - str r0, [r5, #0x20] - ldr r0, _02235848 ; =0x00000548 - ldr r0, [r6, r0] - str r0, [r5, #0x24] - ldr r0, [sp, #0x14] - str r0, [r5, #0x2c] - mov r0, #0 - str r0, [r5, #0x28] - ldrsh r0, [r5, r0] - strh r0, [r5, #4] - ldr r0, _0223584C ; =0x000006D8 - ldr r0, [r4, r0] - cmp r0, r7 - bne _02235774 - mov r0, #0 - ldrsh r0, [r5, r0] - ldr r1, _02235850 ; =0x00000818 - strh r0, [r5, #4] - mov r0, #0xa9 - strh r0, [r5, #6] - ldr r3, [r4, r1] - ldr r1, _0223583C ; =0x000006E4 - ldr r0, _02235844 ; =0x00000534 - ldr r2, [r4, r1] - mov r1, #0x24 - mul r1, r2 - add r1, r3, r1 - ldr r0, [r6, r0] - ldr r1, [r1, #0xc] - bl sub_0200D364 - ldr r0, _0223583C ; =0x000006E4 - mov r2, #0x28 - ldr r1, [r4, r0] - mov r0, #0x24 - add r3, r1, #0 - ldr r1, _0223584C ; =0x000006D8 - mul r3, r0 - ldr r0, _02235850 ; =0x00000818 - ldr r1, [r4, r1] - ldr r0, [r4, r0] - mul r2, r1 - ldr r1, [sp, #0x18] - mov ip, r0 - add r1, r1, r2 - mov r2, ip - add r3, r2, r3 - ldr r2, [r3, #8] - add r0, r4, #0 - bl ov62_02230FC8 - ldr r0, _0223584C ; =0x000006D8 - ldr r1, [r4, r0] - mov r0, #0x28 - mul r0, r1 - add r1, r4, r0 - ldr r0, _02235848 ; =0x00000548 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_020129D0 - ldr r0, _02235844 ; =0x00000534 - mov r1, #1 - ldr r0, [r6, r0] - bl sub_0200D3F4 - b _02235792 -_02235774: - mov r0, #0 - ldrsh r0, [r5, r0] - mov r1, #4 - sub r0, r0, #4 - strh r0, [r5, #4] - ldr r0, _0223584C ; =0x000006D8 - ldr r0, [r4, r0] - sub r2, r0, r7 - lsl r0, r2, #4 - sub r2, r1, r2 - mov r1, #0x24 - mul r1, r2 - add r1, #0x19 - add r0, r0, r1 - strh r0, [r5, #6] -_02235792: - mov r0, #4 - strb r0, [r5, #0x1c] - mov r2, #2 - ldr r0, _02235840 ; =ov62_022354A4 - add r1, r5, #0 - lsl r2, r2, #0xc - bl sub_0200D9E8 - ldr r0, _0223584C ; =0x000006D8 - add r7, r7, #1 - ldr r0, [r4, r0] - add r6, #0x28 - cmp r7, r0 - ble _022356CC -_022357AE: - ldr r0, [sp, #8] - ldr r1, [r0, #0xc] - str r1, [r0, #4] - mov r1, #0 - str r1, [r0, #0xc] -_022357B8: - ldr r0, _0223584C ; =0x000006D8 - mov r5, #0 - ldr r0, [r4, r0] - cmp r0, #0 - ble _022357EA - ldr r7, _02235844 ; =0x00000534 - add r6, r4, #0 -_022357C6: - cmp r5, r0 - bne _022357D4 - ldr r0, [r6, r7] - mov r1, #1 - bl sub_0200D430 - b _022357DE -_022357D4: - ldr r0, _02235844 ; =0x00000534 - mov r1, #2 - ldr r0, [r6, r0] - bl sub_0200D430 -_022357DE: - ldr r0, _0223584C ; =0x000006D8 - add r5, r5, #1 - ldr r0, [r4, r0] - add r6, #0x28 - cmp r5, r0 - blt _022357C6 -_022357EA: - ldr r0, [sp, #8] - ldr r0, [r0, #4] - cmp r0, #0 - bne _022357F8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022357F8: - ldr r0, [sp, #8] - mov r1, #0 - str r1, [r0, #4] - b _02235830 -_02235800: - ldr r1, _02235850 ; =0x00000818 - ldr r3, [r4, r1] - ldr r1, _0223583C ; =0x000006E4 - ldr r2, [r4, r1] - mov r1, #0x24 - mul r1, r2 - add r1, r3, r1 - ldr r1, [r1, #0x20] - cmp r1, #0 - bne _0223581A - bl ov62_0222FC1C - b _02235820 -_0223581A: - mov r1, #5 - bl ov62_0222FB60 -_02235820: - add r0, r4, #0 - bl ov62_0222FB90 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 -_02235830: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02235838: .word 0x000005FC -_0223583C: .word 0x000006E4 -_02235840: .word ov62_022354A4 -_02235844: .word 0x00000534 -_02235848: .word 0x00000548 -_0223584C: .word 0x000006D8 -_02235850: .word 0x00000818 - thumb_func_end ov62_02235580 - - thumb_func_start ov62_02235854 -ov62_02235854: ; 0x02235854 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223586C - cmp r1, #1 - beq _0223592E - cmp r1, #2 - bne _0223586A - b _02235A14 -_0223586A: - b _02235A4E -_0223586C: - mov r0, #0x66 - mov r1, #0x10 - bl sub_02018144 - str r0, [sp, #8] - mov r1, #0 - mov r2, #0x10 - bl sub_020C4CF4 - mov r1, #0x86 - ldr r0, [sp, #8] - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - mov r6, #0 - add r0, #0xc - add r7, r5, #0 - str r0, [sp, #8] -_02235894: - mov r0, #0x66 - mov r1, #0x34 - bl sub_02018144 - mov r1, #0 - mov r2, #0x34 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _02235A6C ; =0x00000534 - add r1, r4, #0 - ldr r0, [r7, r0] - add r2, r4, #2 - bl ov62_02230E74 - ldr r0, _02235A6C ; =0x00000534 - ldr r0, [r7, r0] - str r0, [r4, #0x20] - ldr r0, _02235A70 ; =0x00000548 - ldr r0, [r7, r0] - str r0, [r4, #0x24] - ldr r0, [sp, #0xc] - str r0, [r4, #0x2c] - ldr r0, [sp, #8] - str r0, [r4, #0x30] - mov r0, #0 - str r0, [r4, #0x28] - ldrsh r0, [r4, r0] - strh r0, [r4, #4] - ldr r0, _02235A74 ; =0x000006D8 - ldr r0, [r5, r0] - sub r0, r0, #1 - cmp r0, r6 - bne _022358EA - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - str r0, [r4, #0x28] - mov r0, #0 - ldrsh r0, [r4, r0] - strh r0, [r4, #4] - mov r0, #0xd9 - b _02235906 -_022358EA: - mov r0, #0 - ldrsh r0, [r4, r0] - mov r1, #0x24 - add r0, r0, #4 - strh r0, [r4, #4] - ldr r0, _02235A74 ; =0x000006D8 - ldr r0, [r5, r0] - sub r2, r0, r6 - mov r0, #5 - sub r0, r0, r2 - mul r1, r0 - add r1, #0x1d - lsl r0, r2, #4 - add r0, r1, r0 -_02235906: - strh r0, [r4, #6] - mov r0, #4 - strb r0, [r4, #0x1c] - mov r2, #2 - ldr r0, _02235A78 ; =ov62_022354A4 - add r1, r4, #0 - lsl r2, r2, #0xc - bl sub_0200D9E8 - ldr r0, _02235A74 ; =0x000006D8 - add r6, r6, #1 - ldr r0, [r5, r0] - add r7, #0x28 - sub r0, r0, #1 - cmp r6, r0 - ble _02235894 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02235A64 -_0223592E: - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r5, r0] - str r0, [sp, #4] - ldr r0, [r0, #0xc] - cmp r0, #1 - bne _02235A12 - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r7, #0 - cmp r0, #0 - ble _022359CE - ldr r0, [sp, #4] - add r6, r5, #0 - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - str r0, [sp, #0x14] - add r0, #0xc - str r0, [sp, #0x14] -_02235958: - mov r0, #0x66 - mov r1, #0x34 - bl sub_02018144 - mov r1, #0 - mov r2, #0x34 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, _02235A7C ; =0x000005FC - add r1, r4, #0 - ldr r0, [r6, r0] - add r2, r4, #2 - bl ov62_02230E74 - ldr r0, _02235A7C ; =0x000005FC - ldr r0, [r6, r0] - str r0, [r4, #0x20] - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r6, r0] - str r0, [r4, #0x24] - ldr r0, [sp, #0x10] - str r0, [r4, #0x2c] - ldr r0, [sp, #0x14] - str r0, [r4, #0x30] - mov r0, #0 - str r0, [r4, #0x28] - ldrsh r0, [r4, r0] - strh r0, [r4, #4] - mov r0, #0x6e - lsl r0, r0, #4 - ldr r1, [r5, r0] - mov r0, #5 - sub r0, r0, r1 - lsl r0, r0, #4 - add r0, #0xcd - strh r0, [r4, #6] - mov r0, #6 - ldrsh r0, [r4, r0] - cmp r0, #0xdd - blt _022359B0 - mov r0, #0xdd - strh r0, [r4, #6] -_022359B0: - mov r0, #8 - strb r0, [r4, #0x1c] - mov r2, #2 - ldr r0, _02235A78 ; =ov62_022354A4 - add r1, r4, #0 - lsl r2, r2, #0xc - bl sub_0200D9E8 - mov r0, #0x6e - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r7, r7, #1 - add r6, #0x28 - cmp r7, r0 - blt _02235958 -_022359CE: - ldr r0, [sp, #4] - mov r4, #0 - str r4, [r0, #0] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - ldr r0, _02235A74 ; =0x000006D8 - ldr r1, [r5, r0] - sub r1, r1, #1 - str r1, [r5, r0] - ldr r0, [r5, r0] - cmp r0, #0 - ble _02235A64 - ldr r7, _02235A6C ; =0x00000534 - add r6, r5, #0 -_022359EC: - sub r0, r0, #1 - cmp r4, r0 - bne _022359FC - ldr r0, [r6, r7] - mov r1, #1 - bl sub_0200D430 - b _02235A06 -_022359FC: - ldr r0, _02235A6C ; =0x00000534 - mov r1, #2 - ldr r0, [r6, r0] - bl sub_0200D430 -_02235A06: - ldr r0, _02235A74 ; =0x000006D8 - add r4, r4, #1 - ldr r0, [r5, r0] - add r6, #0x28 - cmp r4, r0 - blt _022359EC -_02235A12: - b _02235A64 -_02235A14: - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r4, #0] - cmp r0, #0x10 - beq _02235A3C - add r0, r0, #2 - str r0, [r4, #0] - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_02235A3C: - ldr r0, [r4, #4] - cmp r0, #0 - bne _02235A48 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02235A48: - mov r0, #0 - str r0, [r4, #4] - b _02235A64 -_02235A4E: - bl ov62_0222FBF8 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_020181C4 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 -_02235A64: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02235A6C: .word 0x00000534 -_02235A70: .word 0x00000548 -_02235A74: .word 0x000006D8 -_02235A78: .word ov62_022354A4 -_02235A7C: .word 0x000005FC - thumb_func_end ov62_02235854 - - thumb_func_start ov62_02235A80 -ov62_02235A80: ; 0x02235A80 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #4 - bls _02235A8E - b _02235C5C -_02235A8E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02235A9A: ; jump table - .short _02235AA4 - _02235A9A - 2 ; case 0 - .short _02235AD4 - _02235A9A - 2 ; case 1 - .short _02235B4A - _02235A9A - 2 ; case 2 - .short _02235BCE - _02235A9A - 2 ; case 3 - .short _02235BE6 - _02235A9A - 2 ; case 4 -_02235AA4: - mov r0, #0 - str r0, [r4, #0x54] - add r0, r4, #0 - add r0, #0x5c - ldrb r0, [r0] - cmp r0, #0 - beq _02235ABC - add r0, r4, #0 - add r0, #0x5c - ldrb r0, [r0] - sub r1, r0, #1 - b _02235ABE -_02235ABC: - mov r1, #6 -_02235ABE: - add r0, r4, #0 - add r0, #0x5c - strb r1, [r0] - add r0, r4, #0 - bl ov62_022316A0 - str r0, [r4, #0x58] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235C64 -_02235AD4: - add r0, r4, #0 - add r0, #0x54 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02235AE8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02235AE8: - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02235C64 -_02235B4A: - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF74 - add r1, r4, #0 - add r1, #0x5c - ldrb r1, [r1] - add r0, r4, #0 - bl ov62_022317CC - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235C64 -_02235BCE: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235C64 -_02235BE6: - add r0, r4, #0 - add r0, #0x54 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02235BFA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02235BFA: - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235C6C ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02235C64 -_02235C5C: - add r0, r4, #0 - mov r1, #0 - bl ov62_0222FB60 -_02235C64: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - nop -_02235C6C: .word 0x0000FFFF - thumb_func_end ov62_02235A80 - - thumb_func_start ov62_02235C70 -ov62_02235C70: ; 0x02235C70 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #4 - bls _02235C7E - b _02235E50 -_02235C7E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02235C8A: ; jump table - .short _02235C94 - _02235C8A - 2 ; case 0 - .short _02235CC8 - _02235C8A - 2 ; case 1 - .short _02235D3E - _02235C8A - 2 ; case 2 - .short _02235DC2 - _02235C8A - 2 ; case 3 - .short _02235DDA - _02235C8A - 2 ; case 4 -_02235C94: - mov r0, #0 - str r0, [r4, #0x54] - add r0, r4, #0 - add r0, #0x5c - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x5c - strb r1, [r0] - add r0, r4, #0 - add r0, #0x5c - ldrb r0, [r0] - mov r1, #7 - bl sub_020E1F6C - add r0, r4, #0 - add r0, #0x5c - strb r1, [r0] - add r0, r4, #0 - bl ov62_022316A0 - str r0, [r4, #0x58] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235E5A -_02235CC8: - add r0, r4, #0 - add r0, #0x54 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02235CDC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02235CDC: - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02235E5A -_02235D3E: - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF74 - add r1, r4, #0 - add r1, #0x5c - ldrb r1, [r1] - add r0, r4, #0 - bl ov62_022317CC - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235E5A -_02235DC2: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02235E5A -_02235DDA: - add r0, r4, #0 - add r0, #0x54 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02235DEE - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02235DEE: - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #0 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02235E60 ; =0x0000FFFF - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #0x54] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02235E5A -_02235E50: - mov r1, #0 - add r0, r4, #0 - str r1, [r4, #0x54] - bl ov62_0222FB60 -_02235E5A: - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02235E60: .word 0x0000FFFF - thumb_func_end ov62_02235C70 - - thumb_func_start ov62_02235E64 -ov62_02235E64: ; 0x02235E64 - push {r3, r4, r5, lr} - mov r1, #0x67 - add r5, r0, #0 - mov r0, #0x66 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x67 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02235E64 - - thumb_func_start ov62_02235EBC -ov62_02235EBC: ; 0x02235EBC - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02235ED4 - cmp r1, #1 - beq _02235F32 - b _02235FBE -_02235ED4: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02235EE8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02235EE8: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223603C -_02235F32: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - add r1, r0, #0 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #2 - bl sub_02019060 - mov r0, #4 - mov r1, #0 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #1 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223603C -_02235FBE: - mov r1, #0 - bl ov62_0223376C - add r0, r5, #0 - bl ov62_022300BC - cmp r0, #1 - bne _02236034 - ldr r0, _02236044 ; =0x0000086C - mov r6, #0 - ldr r1, [r5, r0] - cmp r1, #0 - bne _02235FDC - mov r6, #1 - b _02236006 -_02235FDC: - lsl r1, r1, #2 - add r1, r5, r1 - add r0, #0x10 - ldr r0, [r1, r0] - mov r1, #5 - add r2, r6, #0 - bl sub_0202FE98 - mov r3, #0 - mov r2, #1 - eor r1, r3 - eor r0, r2 - orr r0, r1 - bne _02235FFC - mov r6, #1 - b _02236006 -_02235FFC: - ldr r0, _02236048 ; =0x00000874 - ldr r0, [r5, r0] - cmp r0, #1 - bne _02236006 - mov r6, #1 -_02236006: - cmp r6, #0 - beq _02236022 - add r0, r5, #0 - bl ov62_02236C20 - mov r0, #0x66 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #9 - bl ov62_0222FB60 - b _0223603C -_02236022: - mov r0, #0x66 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #6 - bl ov62_0222FB60 - b _0223603C -_02236034: - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_0223603C: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02236044: .word 0x0000086C -_02236048: .word 0x00000874 - thumb_func_end ov62_02235EBC - - thumb_func_start ov62_0223604C -ov62_0223604C: ; 0x0223604C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _0223605E - b _02236160 -_0223605E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223606A: ; jump table - .short _02236072 - _0223606A - 2 ; case 0 - .short _02236088 - _0223606A - 2 ; case 1 - .short _022360AA - _0223606A - 2 ; case 2 - .short _02236106 - _0223606A - 2 ; case 3 -_02236072: - bl ov62_02236C20 - add r0, r4, #0 - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236168 -_02236088: - bl ov62_02236B2C - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223616C ; =0x02248C1C - ldr r2, _02236170 ; =ov62_02236AB0 - mov r1, #3 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x5d - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236168 -_022360AA: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - add r0, #0x9c - add r1, r4, #0 - bl ov62_02234214 - add r0, r5, #0 - add r0, #0x9c - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - add r5, #0x9c - add r0, r5, #0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236168 -_02236106: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02236146 - add r0, r5, #0 - add r0, #0x9c - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02236B64 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02236146: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02236168 -_02236160: - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_02236168: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223616C: .word 0x02248C1C -_02236170: .word ov62_02236AB0 - thumb_func_end ov62_0223604C - - thumb_func_start ov62_02236174 -ov62_02236174: ; 0x02236174 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_02236174 - - thumb_func_start ov62_0223618C -ov62_0223618C: ; 0x0223618C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #3 - bhi _0223629A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022361A8: ; jump table - .short _022361B0 - _022361A8 - 2 ; case 0 - .short _022361DC - _022361A8 - 2 ; case 1 - .short _022361F4 - _022361A8 - 2 ; case 2 - .short _02236256 - _022361A8 - 2 ; case 3 -_022361B0: - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022361C2 - add r4, #0x9c - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02234228 - b _022361CC -_022361C2: - add r4, #0x10 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02232394 -_022361CC: - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022362B2 -_022361DC: - mov r2, #1 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022362B2 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022362B2 -_022361F4: - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _02236220 - add r0, r4, #0 - add r0, #0x10 - add r1, r5, #0 - bl ov62_02232378 - add r4, #0x10 - add r0, r4, #0 - mov r1, #0 - bl ov62_022323B8 - add r0, r5, #0 - mov r1, #0x50 - mov r2, #3 - bl ov62_022343B8 - b _02236246 -_02236220: - add r0, r4, #0 - add r0, #0x9c - add r1, r5, #0 - bl ov62_02234214 - add r0, r4, #0 - add r0, #0x9c - mov r1, #0 - bl ov62_0223427C - add r4, #0x9c - add r0, r4, #0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r5, #0 - mov r2, #3 - bl ov62_022343B8 -_02236246: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022362B2 -_02236256: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _022362B2 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _02236278 - add r4, #0x10 - add r0, r4, #0 - mov r1, #1 - bl ov62_022323B8 - b _02236282 -_02236278: - add r4, #0x9c - add r0, r4, #0 - mov r1, #1 - bl ov62_0223427C -_02236282: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022362B2 -_0223629A: - ldr r1, [r4, #0xc] - mov r0, #1 - eor r1, r0 - str r1, [r4, #0xc] - add r0, r5, #0 - add r1, #0x79 - bl ov62_02236BC8 - add r0, r5, #0 - mov r1, #3 - bl ov62_0222FB60 -_022362B2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223618C - - thumb_func_start ov62_022362B8 -ov62_022362B8: ; 0x022362B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - mov r6, #0x5e - ldr r4, [r5, r0] - lsl r6, r6, #2 - add r0, r4, r6 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r3, #4 - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x82 - bl sub_0200B1EC - add r7, r0, #0 - add r0, r4, r6 - add r1, r7, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02236394 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add r6, #0x10 - add r0, r4, r6 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x15 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r3, #0x12 - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x83 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, r6 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02236394 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02236394: .word 0x000F0D00 - thumb_func_end ov62_022362B8 - - thumb_func_start ov62_02236398 -ov62_02236398: ; 0x02236398 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x5e - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - mov r0, #0x5e - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #0x62 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - mov r0, #0x62 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02236398 - - thumb_func_start ov62_022363CC -ov62_022363CC: ; 0x022363CC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r2, [r4, #8] - ldr r5, [r4, r1] - cmp r2, #7 - bls _022363E0 - b _022365EA -_022363E0: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022363EC: ; jump table - .short _022363FC - _022363EC - 2 ; case 0 - .short _02236458 - _022363EC - 2 ; case 1 - .short _022364A8 - _022363EC - 2 ; case 2 - .short _022364E6 - _022363EC - 2 ; case 3 - .short _02236530 - _022363EC - 2 ; case 4 - .short _0223658E - _022363EC - 2 ; case 5 - .short _0223659E - _022363EC - 2 ; case 6 - .short _022365B0 - _022363EC - 2 ; case 7 -_022363FC: - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _02236430 - add r0, r5, #0 - add r0, #0x9c - add r1, r4, #0 - bl ov62_02234228 - b _0223643A -_02236430: - add r0, r5, #0 - add r0, #0x10 - add r1, r4, #0 - bl ov62_02232394 -_0223643A: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02236BA8 - mov r0, #0x66 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223660C -_02236458: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223648E - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02236C94 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223648E: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223660C -_022364A8: - bl ov62_022362B8 - mov r1, #0x4a - add r0, r4, #0 - lsl r1, r1, #2 - bl ov62_02231AAC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x54 - mov r3, #7 - bl sub_0200710C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223660C -_022364E6: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02236516 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02236516: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223660C -_02236530: - ldr r0, _02236614 ; =0x02248C14 - bl sub_02022760 - cmp r0, #0 - beq _02236570 - mov r0, #0x66 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r4, #0 - bl ov62_02234520 - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024800 - cmp r0, #0 - beq _02236560 - ldr r1, _02236618 ; =0x0000012A - add r0, r4, #0 - bl ov62_02231B3C - b _02236568 -_02236560: - ldr r1, _0223661C ; =0x0000012B - add r0, r4, #0 - bl ov62_02231B3C -_02236568: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223660C -_02236570: - ldr r0, _02236620 ; =0x02248C18 - bl sub_02022760 - cmp r0, #0 - beq _0223660C - mov r0, #0x66 - mov r1, #2 - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r4, #0 - bl ov62_02234520 - mov r0, #6 - str r0, [r4, #8] - b _0223660C -_0223658E: - sub r1, #0x30 - ldr r0, [r4, r1] - bl sub_020246E0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223660C -_0223659E: - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_02236398 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223660C -_022365B0: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _022365D0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022365D0: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223660C -_022365EA: - mov r0, #0x66 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #1 - bne _022365FE - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 - b _0223660C -_022365FE: - mov r1, #0 - str r1, [r5, r0] - str r1, [r5, #0xc] - add r0, r4, #0 - mov r1, #2 - bl ov62_0222FB60 -_0223660C: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02236614: .word 0x02248C14 -_02236618: .word 0x0000012A -_0223661C: .word 0x0000012B -_02236620: .word 0x02248C18 - thumb_func_end ov62_022363CC - - thumb_func_start ov62_02236624 -ov62_02236624: ; 0x02236624 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - beq _0223663A - cmp r1, #1 - beq _0223665E - cmp r1, #2 - beq _0223666E - b _022366B2 -_0223663A: - ldr r1, _022366CC ; =0x0000012B - bl ov62_02231AAC - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022366C4 -_0223665E: - bl sub_0200F2AC - cmp r0, #1 - bne _022366C4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022366C4 -_0223666E: - ldr r1, _022366D0 ; =0x00000874 - ldr r0, [r4, r1] - cmp r0, #0 - bne _022366AA - add r0, r1, #0 - sub r0, #8 - ldr r0, [r4, r0] - sub r1, #0x44 - str r0, [sp] - ldr r0, [r4, r1] - mov r1, #0x66 - add r2, sp, #0xc - mov r3, #0 - bl sub_0202F298 - mov r1, #0x83 - lsl r1, r1, #4 - ldr r0, [r4, r1] - add r1, #0x3c - ldr r1, [r4, r1] - bl ov62_022486A4 - bl sub_0202F22C - add r0, r4, #0 - bl ov62_022339A0 - add r0, r4, #0 - bl ov62_022338A8 -_022366AA: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022366C4 -_022366B2: - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_02236C20 - add r0, r4, #0 - mov r1, #9 - bl ov62_0222FB60 -_022366C4: - mov r0, #0 - add sp, #0x10 - pop {r4, pc} - nop -_022366CC: .word 0x0000012B -_022366D0: .word 0x00000874 - thumb_func_end ov62_02236624 - - thumb_func_start ov62_022366D4 -ov62_022366D4: ; 0x022366D4 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _022366F0 - cmp r1, #1 - beq _02236710 - cmp r1, #2 - beq _02236720 - b _0223679E -_022366F0: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022367AA -_02236710: - bl sub_0200F2AC - cmp r0, #1 - bne _022367AA - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022367AA -_02236720: - mov r1, #0x66 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - bne _0223676A - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _02236742 - add r0, r4, #0 - add r0, #0x9c - add r1, r5, #0 - bl ov62_02234228 - b _0223674C -_02236742: - add r0, r4, #0 - add r0, #0x10 - add r1, r5, #0 - bl ov62_02232394 -_0223674C: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - add r0, r5, #0 - bl ov62_02236BA8 - add r0, r5, #0 - bl ov62_02236C94 -_0223676A: - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022314A8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r1, [r5, #0x10] - add r0, r5, #0 - ldr r1, [r1, #0] - bl ov62_022300C8 - ldr r0, _022367B0 ; =0x00000868 - mov r1, #1 - ldr r0, [r5, r0] - mov r2, #0 - bl sub_0208BA84 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022367AA -_0223679E: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_022367AA: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_022367B0: .word 0x00000868 - thumb_func_end ov62_022366D4 - - thumb_func_start ov62_022367B4 -ov62_022367B4: ; 0x022367B4 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _022367CE - cmp r1, #1 - beq _02236812 - cmp r1, #2 - beq _02236852 - b _02236896 -_022367CE: - mov r0, #0x5d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022367FA - add r4, #0x9c - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02234228 - b _02236804 -_022367FA: - add r4, #0x10 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02232394 -_02236804: - add r0, r5, #0 - bl ov62_02236BA8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223691A -_02236812: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02236838 - add r0, r5, #0 - bl ov62_02236C94 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02236838: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223691A -_02236852: - mov r1, #1 - bl ov62_0223376C - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223691A -_02236896: - bl ov62_02233790 - cmp r0, #0 - beq _0223691A - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _022368EA - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r4, #0 - bl sub_020181C4 - b _0223691A -_022368EA: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223691A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_022367B4 - - thumb_func_start ov62_02236920 -ov62_02236920: ; 0x02236920 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #5 - bls _02236934 - b _02236A88 -_02236934: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02236940: ; jump table - .short _0223694C - _02236940 - 2 ; case 0 - .short _0223696C - _02236940 - 2 ; case 1 - .short _0223698E - _02236940 - 2 ; case 2 - .short _022369EA - _02236940 - 2 ; case 3 - .short _02236A5A - _02236940 - 2 ; case 4 - .short _02236A78 - _02236940 - 2 ; case 5 -_0223694C: - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236A9E -_0223696C: - bl ov62_02236B2C - mov r0, #0x66 - str r0, [sp] - ldr r0, _02236AA4 ; =0x02248C1C - ldr r2, _02236AA8 ; =ov62_02236AB0 - mov r1, #3 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x5d - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236A9E -_0223698E: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - add r0, #0x9c - add r1, r4, #0 - bl ov62_02234214 - add r0, r5, #0 - add r0, #0x9c - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - add r5, #0x9c - add r0, r5, #0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236A9E -_022369EA: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02236A40 - add r0, r5, #0 - add r0, #0x9c - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02236B64 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x66 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _02236A32 - mov r0, #0xff - b _02236A36 -_02236A32: - ldr r0, [r4, #8] - add r0, r0, #1 -_02236A36: - str r0, [r4, #8] - mov r0, #0x66 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_02236A40: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02236A9E -_02236A5A: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236A9E -_02236A78: - bl sub_0200F2AC - cmp r0, #1 - bne _02236A9E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02236A9E -_02236A88: - ldr r0, _02236AAC ; =0x000006D8 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - add r0, r4, #0 - bl ov62_02230098 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_02236A9E: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02236AA4: .word 0x02248C1C -_02236AA8: .word ov62_02236AB0 -_02236AAC: .word 0x000006D8 - thumb_func_end ov62_02236920 - - thumb_func_start ov62_02236AB0 -ov62_02236AB0: ; 0x02236AB0 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r5, r2] - cmp r1, #0 - bne _02236B24 - cmp r0, #0 - beq _02236ACC - cmp r0, #1 - beq _02236ADC - cmp r0, #2 - beq _02236B16 - pop {r3, r4, r5, pc} -_02236ACC: - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02236ADC: - add r0, r5, #0 - bl ov62_02234520 - ldr r0, _02236B28 ; =0x0000086C - ldr r0, [r5, r0] - cmp r0, #0 - beq _02236B02 - add r4, #0xa0 - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0 - bl sub_0202FE98 - mov r3, #0 - mov r2, #1 - eor r1, r3 - eor r0, r2 - orr r0, r1 - bne _02236B0C -_02236B02: - add r0, r5, #0 - mov r1, #7 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02236B0C: - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02236B16: - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #8 - bl ov62_0222FB60 -_02236B24: - pop {r3, r4, r5, pc} - nop -_02236B28: .word 0x0000086C - thumb_func_end ov62_02236AB0 - - thumb_func_start ov62_02236B2C -ov62_02236B2C: ; 0x02236B2C - push {r3, r4} - mov r3, #0x86 - lsl r3, r3, #4 - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - ldr r1, [r0, r3] - lsl r2, r2, #2 - add r4, r0, r2 - add r2, r3, #0 - add r2, #0x2c - ldr r4, [r4, r2] - add r2, r1, #0 - str r4, [r1, #0x10] - add r2, #0x9c - str r4, [r2, #0] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r0, r2] - add r3, #0x1c - lsl r2, r2, #2 - add r0, r0, r2 - ldr r0, [r0, r3] - add r1, #0xa0 - str r0, [r1, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov62_02236B2C - - thumb_func_start ov62_02236B64 -ov62_02236B64: ; 0x02236B64 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - mov r6, #0x5e - ldr r4, [r5, r0] - lsl r6, r6, #2 - add r0, r4, r6 - bl sub_0201A7A0 - mov r0, #3 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r2, #6 - mov r3, #8 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0x79 - bl ov62_02236BC8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_02236B64 - - thumb_func_start ov62_02236BA8 -ov62_02236BA8: ; 0x02236BA8 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x5e - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - mov r0, #0x5e - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02236BA8 - - thumb_func_start ov62_02236BC8 -ov62_02236BC8: ; 0x02236BC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - mov r6, #0x5e - add r7, r1, #0 - ldr r4, [r5, r0] - lsl r6, r6, #2 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - add r1, r7, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, r6 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02236C1C ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02236C1C: .word 0x000F0D00 - thumb_func_end ov62_02236BC8 - - thumb_func_start ov62_02236C20 -ov62_02236C20: ; 0x02236C20 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_022312CC - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r4, r1] - sub r0, r1, #4 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - mov r0, #0x56 - lsl r0, r0, #2 - add r5, #0x14 - add r0, r4, r0 - add r1, r5, #0 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 - mov r0, #0x16 - lsl r0, r0, #4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02236C20 - - thumb_func_start ov62_02236C94 -ov62_02236C94: ; 0x02236C94 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0x56 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02236C94 - - thumb_func_start ov62_02236CBC -ov62_02236CBC: ; 0x02236CBC - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - bne _02236CD8 - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - b _02236CE6 -_02236CD8: - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 -_02236CE6: - add r4, #0xc0 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02236CBC - - thumb_func_start ov62_02236CF8 -ov62_02236CF8: ; 0x02236CF8 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r6, [r0, #0x14] - ldr r4, [r0, #0x18] - ldr r5, [r0, #0x1c] - mov r0, #0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, _02236D44 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x32 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _02236D44 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x1c - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02236D44 ; =0x00002E94 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r2, r6, #0 - mov r3, #0x1d - bl sub_0200CE54 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02236D44: .word 0x00002E94 - thumb_func_end ov62_02236CF8 - - thumb_func_start ov62_02236D48 -ov62_02236D48: ; 0x02236D48 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_02236CF8 - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - add r1, r4, #0 - add r1, #0xbc - str r0, [r1, #0] - add r0, r4, #0 - add r1, r5, #0 - add r0, #0xb8 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0xb8 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - add r0, r4, #0 - add r0, #0xc0 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r0, #0] - sub r2, #0x2c - bl sub_020128C4 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_020129D0 - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - add r1, r4, #0 - add r1, #0x98 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r1, #0xdc - mov r2, #0xe0 - bl sub_0200D4C4 - add r0, r4, #0 - add r0, #0x98 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_0200D364 - add r4, #0x98 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r5, #0 - mov r1, #1 - bl ov62_02236CBC - pop {r3, r4, r5, pc} - thumb_func_end ov62_02236D48 - - thumb_func_start ov62_02236DE8 -ov62_02236DE8: ; 0x02236DE8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r0, r4, #0 - add r0, #0xb8 - bl ov62_022312B0 - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - bl sub_0200D0F4 - add r4, #0x98 - ldr r0, [r4, #0] - bl sub_0200D0F4 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - thumb_func_end ov62_02236DE8 - - thumb_func_start ov62_02236E14 -ov62_02236E14: ; 0x02236E14 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - ldr r5, [r0, #0x24] - str r0, [sp, #0x18] - ldr r7, [r0, #0x14] - ldr r6, [r0, #0x18] - ldr r4, [r0, #0x1c] - ldr r0, [r0, #0x28] - mov r1, #0x3e - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r7, #0 - add r2, r5, #0 - mov r3, #6 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r7, #0 - mov r1, #0x44 - add r2, r5, #0 - mov r3, #6 - bl sub_0200710C - ldr r0, [sp, #0x18] - mov r1, #0 - bl ov62_02231710 - str r7, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _022370B4 ; =0x0000726C - mov r1, #3 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _022370B4 ; =0x0000726C - add r1, r4, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x42 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _022370B4 ; =0x0000726C - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x47 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _022370B4 ; =0x0000726C - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x48 - bl sub_0200CE54 - ldr r0, [sp, #0x18] - mov r1, #1 - bl ov62_02231710 - str r7, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #6 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _022370B8 ; =0x00006E7A - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022370B8 ; =0x00006E7A - add r1, r4, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x40 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _022370B8 ; =0x00006E7A - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x26 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _022370B8 ; =0x00006E7A - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x27 - bl sub_0200CE54 - ldr r3, _022370BC ; =0x02248C84 - add r2, sp, #0x3c - ldmia r3!, {r0, r1} - str r2, [sp, #0x20] - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - ldr r3, _022370C0 ; =0x02248C70 - str r0, [r2, #0] - add r2, sp, #0x28 - ldmia r3!, {r0, r1} - str r2, [sp, #0x1c] - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r5, #0 - str r0, [r2, #0] -_02236F4C: - cmp r5, #3 - bne _02236F8E - str r7, [sp] - mov r0, #0x5c - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _022370C4 ; =0x00004705 - mov r1, #2 - add r0, r5, r0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022370C4 ; =0x00004705 - add r1, r4, #0 - add r0, r5, r0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x5b - bl sub_0200CC3C - b _02236FD0 -_02236F8E: - mov r0, #0x92 - str r0, [sp] - ldr r0, [sp, #0x20] - mov r1, #2 - ldr r0, [r0, #0] - add r2, r6, #0 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _022370C4 ; =0x00004705 - add r3, r4, #0 - add r0, r5, r0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x24] - bl sub_0200CD7C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022370C4 ; =0x00004705 - ldr r3, [sp, #0x1c] - add r0, r5, r0 - str r0, [sp, #8] - ldr r3, [r3, #0] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0x92 - bl sub_0200D888 -_02236FD0: - ldr r0, [sp, #0x20] - add r5, r5, #1 - add r0, r0, #4 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r0, r0, #4 - str r0, [sp, #0x1c] - cmp r5, #5 - blt _02236F4C - mov r0, #0 - str r0, [sp] - ldr r0, _022370C4 ; =0x00004705 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x92 - mov r3, #9 - bl sub_0200CE0C - mov r0, #0 - str r0, [sp] - ldr r0, _022370C4 ; =0x00004705 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x92 - mov r3, #0xa - bl sub_0200CE3C - mov r0, #0 - str r0, [sp] - ldr r0, _022370C8 ; =0x00004706 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x59 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _022370C8 ; =0x00004706 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r7, #0 - mov r3, #0x5a - bl sub_0200CE54 - ldr r1, _022370CC ; =0x0000088C - ldr r0, [sp, #0x18] - mov r6, #0xd - ldr r0, [r0, r1] - mov r7, #0xe - bl sub_02030BAC - ldr r1, [sp, #0x18] - cmp r0, #0 - ldr r4, [r1, #0x18] - ldr r5, [r1, #0x1c] - ldr r1, [r1, #0x28] - beq _02237050 - mov r6, #0xf - mov r7, #0x10 -_02237050: - mov r0, #0x92 - str r0, [sp] - str r6, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _022370D0 ; =0x0002869F - add r2, r4, #0 - str r0, [sp, #0x14] - add r0, r1, #0 - mov r1, #2 - add r3, r5, #0 - bl sub_0200CD7C - mov r0, #0 - str r0, [sp] - ldr r0, _022370D0 ; =0x0002869F - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x92 - mov r3, #9 - bl sub_0200CE0C - mov r0, #0 - str r0, [sp] - ldr r0, _022370D0 ; =0x0002869F - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x92 - mov r3, #0xa - bl sub_0200CE3C - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _022370D0 ; =0x0002869F - add r1, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - mov r2, #0x92 - add r3, r7, #0 - bl sub_0200D888 - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022370B4: .word 0x0000726C -_022370B8: .word 0x00006E7A -_022370BC: .word 0x02248C84 -_022370C0: .word 0x02248C70 -_022370C4: .word 0x00004705 -_022370C8: .word 0x00004706 -_022370CC: .word 0x0000088C -_022370D0: .word 0x0002869F - thumb_func_end ov62_02236E14 - - thumb_func_start ov62_022370D4 -ov62_022370D4: ; 0x022370D4 - push {r4, r5, r6, r7} - add r3, r0, #0 - mov r0, #0 - cmp r1, #0 - ble _022370E6 -_022370DE: - add r0, r0, #1 - add r3, r3, #2 - cmp r0, r1 - blt _022370DE -_022370E6: - add r7, r1, r2 - cmp r0, r7 - bge _02237126 - mov r1, #0x97 -_022370EE: - ldrh r6, [r3] - mov r2, #0x1f - add r0, r0, #1 - asr r4, r6, #0xa - and r4, r2 - add r5, r4, #0 - mov r2, #0x1d - mul r5, r2 - mov r2, #0x1f - and r2, r6 - mov r4, #0x4c - mul r4, r2 - asr r6, r6, #5 - mov r2, #0x1f - and r2, r6 - add r6, r2, #0 - mul r6, r1 - add r2, r4, r6 - add r2, r5, r2 - asr r5, r2, #8 - lsl r4, r5, #0xa - lsl r2, r5, #5 - orr r2, r4 - orr r2, r5 - strh r2, [r3] - add r3, r3, #2 - cmp r0, r7 - blt _022370EE -_02237126: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov62_022370D4 - - thumb_func_start ov62_0223712C -ov62_0223712C: ; 0x0223712C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp] - ldr r0, [r0, #0x28] - mov r1, #0x83 - str r0, [sp, #4] - ldr r0, [sp] - lsl r1, r1, #4 - ldr r0, [r0, r1] - bl sub_020507E4 - add r4, r0, #0 - bl sub_0206B5C8 - str r0, [sp, #0x30] - add r0, r4, #0 - bl sub_0206B588 - str r0, [sp, #0x34] - add r0, r4, #0 - bl sub_0206B5B8 - str r0, [sp, #0x38] - add r0, r4, #0 - bl sub_0206B5A8 - str r0, [sp, #0x3c] - add r0, r4, #0 - bl sub_0206B598 - ldr r3, _022371C8 ; =0x02248C5C - str r0, [sp, #0x40] - ldmia r3!, {r0, r1} - add r2, sp, #8 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - mov r7, #0 - add r4, sp, #0x30 - add r5, sp, #0x1c - str r0, [r2, #0] -_02237180: - ldr r6, [r4, #0] - cmp r6, #0 - beq _022371B2 - add r3, sp, #8 - ldmia r3!, {r0, r1} - add r2, sp, #0x1c - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - cmp r6, #2 - str r0, [r2, #0] - bne _022371B2 - ldr r0, [sp] - mov r1, #2 - ldr r0, [r0, #0x28] - bl sub_0200316C - ldr r1, [r5, #0] - mov r2, #0x10 - add r1, r1, #4 - lsl r1, r1, #0x14 - lsr r1, r1, #0x10 - bl ov62_022370D4 -_022371B2: - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #5 - blt _02237180 - ldr r0, [sp, #4] - mov r1, #1 - bl sub_02003858 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022371C8: .word 0x02248C5C - thumb_func_end ov62_0223712C - - thumb_func_start ov62_022371CC -ov62_022371CC: ; 0x022371CC - push {r4, r5, r6, r7, lr} - sub sp, #0xa4 - add r7, r0, #0 - mov r0, #0 - str r0, [sp, #0x1c] - mov r0, #0x86 - lsl r0, r0, #4 - ldr r6, [r7, r0] - ldr r0, [sp, #0x1c] - add r1, sp, #0x20 - strh r0, [r1, #0x28] - mov r0, #1 - lsl r0, r0, #8 - strh r0, [r1, #0x2a] - ldr r0, [sp, #0x1c] - ldr r5, [sp, #0x1c] - strh r0, [r1, #0x2c] - strh r0, [r1, #0x2e] - mov r0, #0xa - str r0, [sp, #0x50] - ldr r0, [sp, #0x1c] - mov r1, #1 - str r0, [sp, #0x54] - str r0, [sp, #0x74] - str r0, [sp, #0x78] - sub r0, r1, #2 - str r0, [sp, #0x6c] - str r0, [sp, #0x70] - ldr r0, _02237490 ; =0x0002869F - str r1, [sp, #0x58] - str r0, [sp, #0x5c] - str r0, [sp, #0x60] - str r0, [sp, #0x64] - str r0, [sp, #0x68] - add r4, r6, #0 -_02237212: - ldr r0, [r7, #0x18] - ldr r1, [r7, #0x1c] - add r2, sp, #0x48 - bl sub_0200CE6C - str r0, [r4, #0x40] - mov r1, #1 - bl sub_0200D364 - ldr r0, [r4, #0x40] - bl sub_0200D330 - ldr r1, [r4, #4] - ldr r0, [r4, #0x40] - add r2, r1, #0 - bl sub_0200D6E8 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #5 - blt _02237212 - mov r5, #0 - add r4, r6, #0 -_02237240: - ldr r0, _02237494 ; =0x00004705 - add r0, r5, r0 - str r0, [sp, #0x5c] - str r0, [sp, #0x60] - cmp r5, #3 - bne _02237254 - ldr r0, _02237498 ; =0x00004706 - str r0, [sp, #0x64] - str r0, [sp, #0x68] - b _0223725A -_02237254: - ldr r0, _02237494 ; =0x00004705 - str r0, [sp, #0x64] - str r0, [sp, #0x68] -_0223725A: - ldr r0, [r7, #0x18] - ldr r1, [r7, #0x1c] - add r2, sp, #0x48 - bl sub_0200CE6C - str r0, [r4, #0x54] - cmp r5, #3 - ldr r0, [r4, #0x54] - bne _02237274 - mov r1, #0 - bl sub_0200D364 - b _0223727A -_02237274: - mov r1, #1 - bl sub_0200D364 -_0223727A: - ldr r0, [r4, #0x54] - bl sub_0200D330 - ldr r1, [r4, #4] - ldr r0, [r4, #0x54] - add r2, r1, #0 - bl sub_0200D6E8 - add r1, r5, #0 - ldr r0, [r4, #0x54] - add r1, #0xa - bl sub_0200D41C - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #5 - blt _02237240 - ldr r0, _0223749C ; =0x00006E7A - str r0, [sp, #0x5c] - str r0, [sp, #0x60] - str r0, [sp, #0x64] - str r0, [sp, #0x68] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x6c] - str r0, [sp, #0x70] - mov r0, #0x14 - str r0, [sp, #0x50] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r7, r0] - bl sub_020507E4 - add r4, r0, #0 - bl sub_0206B5C8 - str r0, [sp, #0x7c] - add r0, r4, #0 - bl sub_0206B588 - str r0, [sp, #0x80] - add r0, r4, #0 - bl sub_0206B5B8 - str r0, [sp, #0x84] - add r0, r4, #0 - bl sub_0206B5A8 - str r0, [sp, #0x88] - add r0, r4, #0 - bl sub_0206B598 - str r0, [sp, #0x8c] - mov r0, #0 - str r0, [sp, #4] - add r0, sp, #0x7c - ldr r2, _022374A0 ; =0x02248C98 - str r0, [sp, #0x10] - ldmia r2!, {r0, r1} - add r3, sp, #0x20 - stmia r3!, {r0, r1} - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - add r4, r6, #0 - add r5, sp, #0x34 - str r0, [r3, #0] -_02237300: - ldr r0, [r7, #0x18] - ldr r1, [r7, #0x1c] - add r2, sp, #0x48 - bl sub_0200CE6C - str r0, [r4, #0x68] - ldr r0, [sp, #0x10] - ldr r0, [r0, #0] - cmp r0, #0 - bne _02237336 - ldr r0, [r4, #0x68] - mov r1, #5 - bl sub_0200D364 - ldr r0, [r4, #0x68] - mov r1, #9 - bl sub_0200D41C - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_0200D3F4 - b _02237358 -_02237336: - add r3, sp, #0x20 - ldmia r3!, {r0, r1} - add r2, sp, #0x34 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r4, #0x68] - ldr r1, [r5, #0] - bl sub_0200D364 - ldr r1, [r5, #0] - ldr r0, [r4, #0x68] - add r1, r1, #4 - bl sub_0200D41C -_02237358: - ldr r0, [r4, #0x68] - bl sub_0200D330 - ldr r1, [r4, #4] - ldr r0, [r4, #0x68] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r0, [sp, #0x10] - add r4, r4, #4 - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #4] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _02237300 - ldr r0, _022374A4 ; =0x0000726C - mov r4, #0xfa - str r0, [sp, #0x5c] - str r0, [sp, #0x60] - str r0, [sp, #0x64] - str r0, [sp, #0x68] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x6c] - str r0, [sp, #0x70] - mov r0, #2 - str r0, [sp, #0x58] - mov r0, #0 - str r0, [sp, #0x18] - str r0, [sp, #0x50] - add r0, r6, #0 - add r0, #0x90 - ldr r0, [r0, #0] - lsl r4, r4, #2 - str r0, [sp] - ldr r0, [sp, #0x18] - add r5, sp, #0x90 - str r0, [sp, #8] -_022373AA: - ldr r0, [sp] - add r1, r4, #0 - bl sub_020E1F6C - str r0, [r5, #0] - ldr r0, [sp] - add r1, r4, #0 - bl sub_020E1F6C - str r1, [sp] - add r0, r4, #0 - mov r1, #0xa - bl sub_020E1F6C - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - bne _022373DC - ldr r0, [sp, #0x18] - cmp r0, #0 - bne _022373DC - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - b _022373E0 -_022373DC: - mov r0, #1 - str r0, [sp, #0x18] -_022373E0: - ldr r0, [sp, #8] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #4 - blt _022373AA - mov r0, #0xa - str r0, [sp, #0xa0] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0x58 - add r4, r6, #0 - add r5, sp, #0x90 - str r0, [sp, #0x14] -_022373FC: - ldr r0, [r7, #0x18] - ldr r1, [r7, #0x1c] - add r2, sp, #0x48 - bl sub_0200CE6C - str r0, [r4, #0x7c] - ldr r0, [r5, #0] - cmp r0, #0 - bne _0223741E - ldr r1, [sp, #0xc] - ldr r0, [sp, #0x1c] - cmp r1, r0 - bge _0223741E - ldr r0, [r4, #0x7c] - mov r1, #0 - bl sub_0200D3F4 -_0223741E: - ldr r0, [r4, #0x7c] - ldr r1, [r5, #0] - bl sub_0200D364 - ldr r1, [sp, #0x14] - ldr r0, [r4, #0x7c] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - mov r2, #0x48 - bl ov62_02230E68 - ldr r0, [r4, #0x7c] - bl sub_0200D330 - ldr r0, [sp, #0x14] - add r4, r4, #4 - add r0, #0x10 - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #5 - blt _022373FC - add r0, r6, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0200D3F4 - add r0, r6, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0200D3F4 - mov r5, #2 - mov r4, #0 - add r7, r5, #0 -_0223746C: - ldr r0, [r6, #0x40] - add r1, r5, #0 - bl sub_0200D6A4 - ldr r0, [r6, #0x54] - add r1, r7, #0 - bl sub_0200D6A4 - ldr r0, [r6, #0x68] - mov r1, #2 - bl sub_0200D6A4 - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #5 - blt _0223746C - add sp, #0xa4 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02237490: .word 0x0002869F -_02237494: .word 0x00004705 -_02237498: .word 0x00004706 -_0223749C: .word 0x00006E7A -_022374A0: .word 0x02248C98 -_022374A4: .word 0x0000726C - thumb_func_end ov62_022371CC - - thumb_func_start ov62_022374A8 -ov62_022374A8: ; 0x022374A8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r7, [r5, r0] - mov r4, #0 - add r6, r7, #0 -_022374B6: - ldr r1, _02237590 ; =0x00004705 - ldr r0, [r5, #0x1c] - add r1, r4, r1 - bl sub_0200D070 - ldr r1, _02237590 ; =0x00004705 - ldr r0, [r5, #0x1c] - add r1, r4, r1 - bl sub_0200D080 - ldr r0, [r6, #0x54] - bl sub_0200D0F4 - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #5 - blt _022374B6 - ldr r0, [r5, #0x1c] - ldr r1, _02237590 ; =0x00004705 - bl sub_0200D090 - ldr r0, [r5, #0x1c] - ldr r1, _02237590 ; =0x00004705 - bl sub_0200D0A0 - ldr r0, [r5, #0x1c] - ldr r1, _02237594 ; =0x00004706 - bl sub_0200D090 - ldr r0, [r5, #0x1c] - ldr r1, _02237594 ; =0x00004706 - bl sub_0200D0A0 - mov r6, #0 - add r4, r7, #0 -_022374FC: - ldr r0, [r4, #0x40] - bl sub_0200D0F4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #5 - blt _022374FC - ldr r0, [r5, #0x1c] - ldr r1, _02237598 ; =0x0002869F - bl sub_0200D070 - ldr r0, [r5, #0x1c] - ldr r1, _02237598 ; =0x0002869F - bl sub_0200D080 - ldr r0, [r5, #0x1c] - ldr r1, _02237598 ; =0x0002869F - bl sub_0200D090 - ldr r0, [r5, #0x1c] - ldr r1, _02237598 ; =0x0002869F - bl sub_0200D0A0 - mov r6, #0 - add r4, r7, #0 -_0223752E: - ldr r0, [r4, #0x68] - bl sub_0200D0F4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #5 - blt _0223752E - ldr r0, [r5, #0x1c] - ldr r1, _0223759C ; =0x00006E7A - bl sub_0200D070 - ldr r0, [r5, #0x1c] - ldr r1, _0223759C ; =0x00006E7A - bl sub_0200D080 - ldr r0, [r5, #0x1c] - ldr r1, _0223759C ; =0x00006E7A - bl sub_0200D090 - ldr r0, [r5, #0x1c] - ldr r1, _0223759C ; =0x00006E7A - bl sub_0200D0A0 - mov r4, #0 -_0223755E: - ldr r0, [r7, #0x7c] - bl sub_0200D0F4 - add r4, r4, #1 - add r7, r7, #4 - cmp r4, #5 - blt _0223755E - ldr r0, [r5, #0x1c] - ldr r1, _022375A0 ; =0x0000726C - bl sub_0200D070 - ldr r0, [r5, #0x1c] - ldr r1, _022375A0 ; =0x0000726C - bl sub_0200D080 - ldr r0, [r5, #0x1c] - ldr r1, _022375A0 ; =0x0000726C - bl sub_0200D090 - ldr r0, [r5, #0x1c] - ldr r1, _022375A0 ; =0x0000726C - bl sub_0200D0A0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02237590: .word 0x00004705 -_02237594: .word 0x00004706 -_02237598: .word 0x0002869F -_0223759C: .word 0x00006E7A -_022375A0: .word 0x0000726C - thumb_func_end ov62_022374A8 - - thumb_func_start ov62_022375A4 -ov62_022375A4: ; 0x022375A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r6, #0x5a - str r0, [sp] - mov r4, #0 - add r5, r0, #0 - lsl r6, r6, #2 -_022375B8: - ldr r0, [r5, #0x2c] - add r1, r6, #0 - add r0, #0x14 - str r0, [r5, #0x2c] - bl sub_020E1F6C - str r1, [r5, #0x2c] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _022375B8 - ldr r0, [sp] - ldr r1, [sp] - mov r2, #0 - add r0, #0xd4 - add r1, #0xd8 - add r3, r2, #0 - bl ov62_022315E0 - ldr r5, [sp] - mov r6, #0 - add r4, sp, #4 -_022375E4: - ldr r0, [sp] - ldr r0, [r0, #0x2c] - cmp r0, #0 - beq _022375F6 - ldr r0, [r5, #4] - ldr r1, _022376C0 ; =0x3D4CCCCD - bl sub_020E0B00 - b _02237612 -_022375F6: - ldr r0, [r5, #0x40] - mov r1, #0 - bl sub_0200D6A4 - ldr r0, [r5, #0x54] - mov r1, #0 - bl sub_0200D6A4 - ldr r0, [r5, #0x68] - mov r1, #0 - bl sub_0200D6A4 - mov r0, #0xfe - lsl r0, r0, #0x16 -_02237612: - str r0, [r5, #4] - ldr r0, [r5, #0x2c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r1, [r5, #0x18] - add r7, r1, #0 - mul r7, r0 - ldr r0, [r5, #0x2c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - ldr r1, [r5, #0x18] - add r2, r1, #0 - mul r2, r0 - mov r0, #0x6a - lsl r0, r0, #0xc - mov r1, #2 - sub r2, r0, r2 - lsl r1, r1, #0x12 - ldr r0, [r5, #0x68] - add r1, r7, r1 - bl sub_0200D614 - add r1, sp, #4 - ldr r0, [r5, #0x68] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x40] - sub r1, #0x20 - sub r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x54] - add r1, #0x10 - sub r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r1, [r5, #4] - ldr r0, [r5, #0x68] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r1, [r5, #4] - ldr r0, [r5, #0x40] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r1, [r5, #4] - ldr r0, [r5, #0x54] - add r2, r1, #0 - bl sub_0200D6E8 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #5 - blt _022375E4 - ldr r0, [sp] - ldr r0, [r0, #0x2c] - cmp r0, #0 - beq _022376BA - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022376BA: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022376C0: .word 0x3D4CCCCD - thumb_func_end ov62_022375A4 - - thumb_func_start ov62_022376C4 -ov62_022376C4: ; 0x022376C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r6, #0x5a - str r0, [sp] - mov r4, #0 - add r5, r0, #0 - lsl r6, r6, #2 -_022376D8: - ldr r0, [r5, #0x2c] - add r1, r6, #0 - add r0, #0x14 - str r0, [r5, #0x2c] - bl sub_020E1F6C - str r1, [r5, #0x2c] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _022376D8 - ldr r0, [sp] - ldr r0, [r0, #0x2c] - cmp r0, #0x14 - bne _0223771E - mov r6, #2 - ldr r4, [sp] - mov r5, #0 - add r7, r6, #0 -_022376FE: - ldr r0, [r4, #0x40] - add r1, r6, #0 - bl sub_0200D6A4 - ldr r0, [r4, #0x54] - add r1, r7, #0 - bl sub_0200D6A4 - ldr r0, [r4, #0x68] - mov r1, #2 - bl sub_0200D6A4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #5 - blt _022376FE -_0223771E: - ldr r0, [sp] - ldr r1, [sp] - add r0, #0xd4 - add r1, #0xd8 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - ldr r5, [sp] - mov r6, #0 - add r4, sp, #4 -_02237734: - ldr r0, [sp] - ldr r0, [r0, #0x2c] - cmp r0, #0 - beq _02237748 - ldr r0, [r5, #4] - ldr r1, _02237810 ; =0x3D4CCCCD - bl sub_020E1A9C - str r0, [r5, #4] - b _02237760 -_02237748: - ldr r0, [r5, #0x68] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x40] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r5, #0x54] - mov r1, #0 - bl sub_0200D3F4 -_02237760: - ldr r0, [r5, #0x2c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r1, [r5, #0x18] - add r2, r1, #0 - mul r2, r0 - mov r0, #2 - lsl r0, r0, #0x12 - sub r7, r0, r2 - ldr r0, [r5, #0x2c] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D264 - ldr r1, [r5, #0x18] - add r2, r1, #0 - mul r2, r0 - mov r0, #0x6a - lsl r0, r0, #0xc - sub r2, r0, r2 - ldr r0, [r5, #0x68] - add r1, r7, #0 - bl sub_0200D614 - add r1, sp, #4 - ldr r0, [r5, #0x68] - add r1, #2 - add r2, sp, #4 - bl sub_0200D550 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x40] - sub r1, #0x20 - sub r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x54] - add r1, #0x10 - sub r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r1, [r5, #4] - ldr r0, [r5, #0x68] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r1, [r5, #4] - ldr r0, [r5, #0x40] - add r2, r1, #0 - bl sub_0200D6E8 - ldr r1, [r5, #4] - ldr r0, [r5, #0x54] - add r2, r1, #0 - bl sub_0200D6E8 - add r6, r6, #1 - add r5, r5, #4 - cmp r6, #5 - blt _02237734 - ldr r0, [sp] - ldr r0, [r0, #0x2c] - cmp r0, #0 - beq _02237808 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02237808: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02237810: .word 0x3D4CCCCD - thumb_func_end ov62_022376C4 - - thumb_func_start ov62_02237814 -ov62_02237814: ; 0x02237814 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, _02237880 ; =0x022497C0 - ldr r5, [r0, r1] - mov r7, #0 - add r6, sp, #0 -_02237822: - mov r1, #0 - mov r2, #2 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r5, #0x68] - lsl r1, r1, #0xc - lsl r2, r2, #0xc - bl sub_0200D614 - add r1, sp, #0 - ldr r0, [r5, #0x68] - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r5, #0x40] - sub r1, #0x20 - sub r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r5, #0x54] - add r1, #0x10 - sub r2, r2, #2 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #5 - blt _02237822 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02237880: .word 0x022497C0 - thumb_func_end ov62_02237814 - - thumb_func_start ov62_02237884 -ov62_02237884: ; 0x02237884 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - bne _02237926 - mov r0, #0x66 - mov r1, #0xdc - bl sub_02018144 - mov r1, #0 - mov r2, #0xdc - add r5, r0, #0 - bl sub_020C4CF4 - mov r0, #0x86 - lsl r0, r0, #4 - str r5, [r4, r0] - mov r0, #0 - str r0, [r5, #0] - add r1, r5, #0 - add r2, r0, #0 - mov r7, #0x40 - mov r6, #0x34 -_022378B4: - sub r3, r0, #2 - cmp r3, #1 - bhi _022378BE - str r6, [r1, #0x18] - b _022378C0 -_022378BE: - str r7, [r1, #0x18] -_022378C0: - ldr r3, _02237AB8 ; =0x3E4CCCCD - str r2, [r1, #0x2c] - str r3, [r1, #4] - add r0, r0, #1 - add r1, r1, #4 - add r2, #0x48 - cmp r0, #5 - blt _022378B4 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd4 - add r1, #0xd8 - mov r2, #0 - bl ov62_022315C8 - mov r0, #4 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r2, #0 - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xd4 - add r1, #0xd8 - add r3, r2, #0 - str r2, [sp, #8] - bl ov62_02231560 - ldr r0, _02237ABC ; =0x00000561 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223792C -_02237926: - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] -_0223792C: - ldr r0, [r4, #8] - cmp r0, #4 - bls _02237934 - b _02237AA8 -_02237934: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02237940: ; jump table - .short _02237AA8 - _02237940 - 2 ; case 0 - .short _0223794A - _02237940 - 2 ; case 1 - .short _022379BE - _02237940 - 2 ; case 2 - .short _02237A1A - _02237940 - 2 ; case 3 - .short _02237A5E - _02237940 - 2 ; case 4 -_0223794A: - add r0, r5, #0 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02237974 - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0202D750 - mov r1, #0 - add r2, r1, #0 - bl sub_0202D230 - add r1, r5, #0 - add r1, #0x90 - str r0, [r1, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02237974: - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02237AB0 -_022379BE: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02231454 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - bl ov62_02234314 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - add r0, r4, #0 - bl ov62_02236E14 - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0x1c - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237AB0 -_02237A1A: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _02237AB0 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02236D48 - add r0, r4, #0 - bl ov62_022371CC - add r0, r4, #0 - bl ov62_0223712C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237AB0 -_02237A5E: - add r0, r4, #0 - bl ov62_022375A4 - add r6, r0, #0 - add r0, r5, #0 - add r1, r5, #0 - mov r2, #0 - add r0, #0xd4 - add r1, #0xd8 - add r3, r2, #0 - bl ov62_022315E0 - add r0, r5, #0 - mov r1, #0 - bl ov62_02231664 - cmp r6, #0 - bne _02237A8E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - bl ov62_02237814 -_02237A8E: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0x1c - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02237AB0 -_02237AA8: - add r0, r4, #0 - mov r1, #1 - bl ov62_0222FB60 -_02237AB0: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02237AB8: .word 0x3E4CCCCD -_02237ABC: .word 0x00000561 - thumb_func_end ov62_02237884 - - thumb_func_start ov62_02237AC0 -ov62_02237AC0: ; 0x02237AC0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - add r0, sp, #4 - add r1, sp, #0 - bl sub_020227C0 - cmp r0, #0 - beq _02237AF4 - ldr r0, [sp, #4] - cmp r0, #0x50 - bls _02237AF4 - cmp r0, #0xb0 - bhs _02237AF4 - ldr r0, [sp] - cmp r0, #0x98 - bls _02237AF4 - cmp r0, #0xb0 - bhs _02237AF4 - ldr r0, _02237AFC ; =0x00000563 - bl sub_02005748 - add r0, r4, #0 - mov r1, #2 - bl ov62_0222FB60 -_02237AF4: - mov r0, #0 - add sp, #8 - pop {r4, pc} - nop -_02237AFC: .word 0x00000563 - thumb_func_end ov62_02237AC0 - - thumb_func_start ov62_02237B00 -ov62_02237B00: ; 0x02237B00 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] - ldr r0, [r4, #8] - cmp r0, #4 - bls _02237B12 - b _02237C76 -_02237B12: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02237B1E: ; jump table - .short _02237B28 - _02237B1E - 2 ; case 0 - .short _02237B86 - _02237B1E - 2 ; case 1 - .short _02237B8A - _02237B1E - 2 ; case 2 - .short _02237BD2 - _02237B1E - 2 ; case 3 - .short _02237C16 - _02237B1E - 2 ; case 4 -_02237B28: - ldr r0, [r5, #0] - cmp r0, #0 - bne _02237B34 - ldr r0, _02237D14 ; =0x00000562 - bl sub_02005748 -_02237B34: - ldr r0, [r5, #0] - cmp r0, #0x10 - beq _02237B3E - add r0, r0, #2 - str r0, [r5, #0] -_02237B3E: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0x1c - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - ldr r2, _02237D18 ; =0x00004018 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - lsr r3, r3, #0x18 - bl sub_02003A2C - add r0, r4, #0 - bl ov62_022376C4 - cmp r0, #0 - beq _02237B7A - b _02237D0E -_02237B7A: - mov r0, #0 - str r0, [r5, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237D0E -_02237B86: - add r0, r0, #1 - str r0, [r4, #8] -_02237B8A: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022374A8 - add r0, r4, #0 - bl ov62_02236DE8 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - str r0, [r5, #0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237D0E -_02237BD2: - mov r0, #1 - bl ov62_0222F824 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02237D0E -_02237C16: - ldr r1, [r5, #0] - cmp r1, #0 - beq _02237C22 - sub r0, r1, #2 - str r0, [r5, #0] - b _02237D0E -_02237C22: - add r0, r0, #1 - str r0, [r4, #8] - add r0, r5, #0 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0x1c - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02237D0E -_02237C76: - add r0, r5, #0 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02237CDE - mov r0, #8 - str r0, [sp] - ldr r0, _02237D1C ; =0x04000050 - mov r1, #4 - mov r2, #0x12 - mov r3, #7 - bl sub_020BF55C - mov r0, #8 - str r0, [sp] - ldr r0, _02237D20 ; =0x04001050 - mov r1, #4 - mov r2, #0x12 - mov r3, #7 - bl sub_020BF55C - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - b _02237D0E -_02237CDE: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #0] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C -_02237D0E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02237D14: .word 0x00000562 -_02237D18: .word 0x00004018 -_02237D1C: .word 0x04000050 -_02237D20: .word 0x04001050 - thumb_func_end ov62_02237B00 - - thumb_func_start ov62_02237D24 -ov62_02237D24: ; 0x02237D24 - push {r3, r4, r5, lr} - mov r1, #0xba - add r5, r0, #0 - mov r0, #0x66 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0xba - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - ldr r0, _02237DB4 ; =0x00000016 - mov r1, #2 - bl sub_02006590 - mov r1, #0x86 - ldr r0, [r5, #0x24] - lsl r1, r1, #2 - str r0, [r4, r1] - mov r2, #0x48 - add r0, r1, #4 - str r2, [r4, r0] - add r0, r1, #0 - mov r2, #0x10 - add r0, #8 - str r2, [r4, r0] - mov r0, #0x66 - add r1, #0xc - str r0, [r4, r1] - bl sub_02029C68 - mov r1, #0x8e - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x66 - bl sub_02030A80 - mov r1, #0x25 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02237DB4: .word 0x00000016 - thumb_func_end ov62_02237D24 - - thumb_func_start ov62_02237DB8 -ov62_02237DB8: ; 0x02237DB8 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02237DD4 - cmp r1, #1 - beq _02237E32 - cmp r1, #2 - beq _02237E86 - b _02237E9C -_02237DD4: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02237DE8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02237DE8: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02237F00 -_02237E32: - mov r0, #0 - add r1, r0, #0 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #3 - mov r1, #2 - bl sub_02019060 - mov r0, #4 - mov r1, #0 - bl sub_02019060 - mov r0, #6 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02237F00 -_02237E86: - mov r1, #0 - bl ov62_0223376C - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02237F00 -_02237E9C: - bl ov62_02233790 - cmp r0, #0 - beq _02237F00 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - bl ov62_02239608 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_02237F00: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02237DB8 - - thumb_func_start ov62_02237F08 -ov62_02237F08: ; 0x02237F08 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02237F22 - cmp r1, #1 - beq _02237FB2 - cmp r1, #2 - beq _02237FC8 - b _02238018 -_02237F22: - bl ov62_02239518 - add r0, r5, #0 - mov r1, #0x23 - mov r2, #3 - bl ov62_022343B8 - add r0, r5, #0 - mov r1, #0x25 - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0202A750 - mov r1, #0 - bl sub_02029CA8 - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02237F8A - add r0, r1, #0 - sub r0, #0x14 - ldr r1, [r4, r1] - add r0, r4, r0 - bl ov22_0225AF8C - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl ov22_0225B074 -_02237F8A: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _02238044 ; =ov62_022394D8 - add r1, r5, #0 - bl sub_02017798 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223801E -_02237FB2: - mov r1, #0 - mov r3, #2 - ldr r0, [r5, #0x28] - add r2, r1, #0 - lsl r3, r3, #8 - bl sub_02003070 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223801E -_02237FC8: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02237FFE - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl ov62_02239724 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02237FFE: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223801E -_02238018: - mov r1, #3 - bl ov62_0222FB60 -_0223801E: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223803E - bl sub_020241B4 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_0225AFF8 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_0223803E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02238044: .word ov62_022394D8 - thumb_func_end ov62_02237F08 - - thumb_func_start ov62_02238048 -ov62_02238048: ; 0x02238048 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, _022380A8 ; =0x02248CB0 - bl sub_02022760 - cmp r0, #0 - beq _0223806A - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 -_0223806A: - ldr r0, _022380AC ; =0x02248CB4 - bl sub_02022760 - cmp r0, #0 - beq _02238082 - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #4 - bl ov62_0222FB60 -_02238082: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022380A2 - bl sub_020241B4 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_0225AFF8 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_022380A2: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022380A8: .word 0x02248CB0 -_022380AC: .word 0x02248CB4 - thumb_func_end ov62_02238048 - - thumb_func_start ov62_022380B0 -ov62_022380B0: ; 0x022380B0 - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _022380CA - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_022380CA: - ldr r0, [r4, #8] - cmp r0, #6 - bls _022380D2 - b _02238316 -_022380D2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022380DE: ; jump table - .short _022380EC - _022380DE - 2 ; case 0 - .short _0223815E - _022380DE - 2 ; case 1 - .short _022381D2 - _022380DE - 2 ; case 2 - .short _0223822A - _022380DE - 2 ; case 3 - .short _02238256 - _022380DE - 2 ; case 4 - .short _022382A6 - _022380DE - 2 ; case 5 - .short _022382C8 - _022380DE - 2 ; case 6 -_022380EC: - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - add r1, r0, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - mov r0, #7 - mov r1, #1 - bl sub_02019060 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020181C4 - mov r0, #0x25 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02030A98 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - add r0, r4, #0 - bl ov62_02239D0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_0223815E: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022381B8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022396E8 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - mov r2, #0 - ldr r0, [r4, #0x24] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022381B8: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022383CA -_022381D2: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r1, _022383D0 ; =0x0000011E - add r0, r4, #0 - bl ov62_02231AAC - mov r0, #0x66 - bl sub_02030A80 - mov r1, #0xb7 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0x83 - lsl r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02030AA0 - ldr r0, _022383D4 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_0223822A: - add r0, r4, #0 - bl ov62_0224112C - mov r2, #0xb7 - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0xb0 - ldr r2, [r5, r2] - bl ov61_0222B1B4 - cmp r0, #1 - beq _02238244 - b _022383CA -_02238244: - mov r0, #0xb7 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02030A98 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_02238256: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _022383D4 ; =0x00000565 - bne _0223828A - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #0 - bl ov62_022348B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_0223828A: - mov r1, #0 - bl sub_020057A4 - add r0, r4, #0 - mov r1, #0x2f - bl ov62_02233704 - ldr r0, _022383D8 ; =0x0000055F - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_022382A6: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_022382C8: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r5, #8 - add r0, r5, #0 - bl ov62_02231688 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022383CA -_02238316: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _022383CA - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223839A - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223834E - bl ov22_0225B020 - add r0, r4, #0 - bl ov62_0222F834 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - bl ov62_0223956C -_0223834E: - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, _022383DC ; =0x00000016 - bl sub_02006514 - ldr r0, _022383E0 ; =ov62_0222F8E4 - add r1, r4, #0 - bl sub_02017798 - b _022383CA -_0223839A: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_022383CA: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022383D0: .word 0x0000011E -_022383D4: .word 0x00000565 -_022383D8: .word 0x0000055F -_022383DC: .word 0x00000016 -_022383E0: .word ov62_0222F8E4 - thumb_func_end ov62_022380B0 - - thumb_func_start ov62_022383E4 -ov62_022383E4: ; 0x022383E4 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _022383FE - cmp r1, #1 - beq _02238470 - cmp r1, #2 - beq _022384D0 - b _0223851E -_022383FE: - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - add r1, r0, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - mov r0, #7 - mov r1, #1 - bl sub_02019060 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x25 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02030A98 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - add r0, r5, #0 - bl ov62_02239D0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022385E0 -_02238470: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022384B6 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022396E8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_022384B6: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022385E0 -_022384D0: - add r4, #8 - add r0, r4, #0 - bl ov62_02231688 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022385E0 -_0223851E: - bl ov62_02233790 - cmp r0, #0 - beq _022385E0 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _022385B0 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223855C - bl ov22_0225B020 - add r0, r5, #0 - bl ov62_0222F834 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - bl ov62_0223956C -_0223855C: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, _022385E4 ; =0x00000016 - bl sub_02006514 - ldr r0, _022385E8 ; =ov62_0222F8E4 - add r1, r5, #0 - bl sub_02017798 - b _022385E0 -_022385B0: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_022385E0: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022385E4: .word 0x00000016 -_022385E8: .word ov62_0222F8E4 - thumb_func_end ov62_022383E4 - - thumb_func_start ov62_022385EC -ov62_022385EC: ; 0x022385EC - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #0 - bne _02238604 - mov r1, #1 - bl ov62_0223958C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223860A -_02238604: - mov r1, #3 - bl ov62_0222FB60 -_0223860A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_022385EC - - thumb_func_start ov62_02238610 -ov62_02238610: ; 0x02238610 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #4 - bls _02238622 - b _02238768 -_02238622: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223862E: ; jump table - .short _02238638 - _0223862E - 2 ; case 0 - .short _0223867E - _0223862E - 2 ; case 1 - .short _022386C6 - _0223862E - 2 ; case 2 - .short _022386F2 - _0223862E - 2 ; case 3 - .short _0223870C - _0223862E - 2 ; case 4 -_02238638: - mov r1, #0x3c - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x66 - str r0, [sp] - ldr r0, _02238788 ; =0x022491F0 - ldr r2, _0223878C ; =ov62_02239BAC - mov r1, #9 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x1d - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238784 -_0223867E: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022386AC - add r0, r4, #0 - mov r1, #0x72 - bl ov62_02231AAC - add r0, r4, #0 - bl ov62_02239BD8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022386AC: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02238784 -_022386C6: - mov r0, #0x1d - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0202404C - ldr r0, _02238790 ; =0x02248CAC - bl sub_02022760 - cmp r0, #0 - bne _022386E4 - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _02238784 -_022386E4: - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238784 -_022386F2: - bl ov62_02239CE8 - mov r0, #0x1d - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02024034 - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223870C: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _0223872E - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02238784 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238784 -_0223872E: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223874E - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223874E: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02238784 -_02238768: - mov r0, #0x79 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _0223877C - add r0, r4, #0 - mov r1, #4 - bl ov62_0222FB60 - b _02238784 -_0223877C: - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 -_02238784: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02238788: .word 0x022491F0 -_0223878C: .word ov62_02239BAC -_02238790: .word 0x02248CAC - thumb_func_end ov62_02238610 - - thumb_func_start ov62_02238794 -ov62_02238794: ; 0x02238794 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #4 - bls _022387A8 - b _02238932 -_022387A8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022387B4: ; jump table - .short _022387BE - _022387B4 - 2 ; case 0 - .short _022387D6 - _022387B4 - 2 ; case 1 - .short _02238878 - _022387B4 - 2 ; case 2 - .short _022388C4 - _022387B4 - 2 ; case 3 - .short _022388F8 - _022387B4 - 2 ; case 4 -_022387BE: - mov r1, #1 - bl ov62_0223958C - add r0, r4, #0 - mov r1, #0x3a - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238954 -_022387D6: - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - bne _022387E8 - b _02238954 -_022387E8: - add r0, r4, #0 - mov r1, #0x72 - bl ov62_02231AAC - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223895C ; =0x0000047C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022335B0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r3, _02238960 ; =0x02248CDC - add r2, r5, r0 - mov r6, #5 -_0223880C: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _0223880C - ldr r0, [r3, #0] - mov r1, #0x7a - lsl r1, r1, #2 - str r0, [r2, #0] - ldr r2, [r5, r1] - add r0, r1, #4 - str r2, [r5, r0] - add r0, r1, #0 - sub r0, #0x14 - ldr r0, [r5, r0] - add r1, #8 - str r0, [r5, r1] - ldr r0, _02238964 ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - mov r3, #0x1e - ldr r0, _02238964 ; =0x0000049C - lsl r3, r3, #4 - ldr r2, [r5, r3] - add r3, #0xc - add r0, r4, r0 - add r1, r4, #0 - add r3, r5, r3 - bl ov62_02232594 - ldr r1, _0223895C ; =0x0000047C - add r0, r4, r1 - add r1, #0x20 - add r1, r4, r1 - bl ov62_02233638 - ldr r0, _02238964 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - mov r2, #2 - bl ov62_0223331C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0x2e - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238954 -_02238878: - ldr r0, _0223895C ; =0x0000047C - add r0, r4, r0 - bl ov62_02233664 - ldr r1, _02238964 ; =0x0000049C - add r0, r4, r1 - sub r1, #0x10 - ldrsh r1, [r4, r1] - bl ov62_022332AC - ldr r0, _02238964 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_02232F68 - cmp r0, #0 - beq _022388AC - mov r1, #0x2e - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022388AC: - ldr r0, _02238968 ; =0x02248CAC - bl sub_02022760 - cmp r0, #0 - beq _02238954 - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238954 -_022388C4: - bl ov62_02231B8C - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223895C ; =0x0000047C - add r0, r4, r0 - bl ov62_02233600 - ldr r0, _02238964 ; =0x0000049C - add r0, r4, r0 - bl ov62_022332FC - ldr r0, _02238964 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022334FC - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022388F8: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02238918 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02238918: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02238954 -_02238932: - add r0, r4, #0 - bl ov62_02239B7C - mov r0, #0x2e - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223894C - add r0, r4, #0 - mov r1, #6 - bl ov62_0222FB60 - b _02238954 -_0223894C: - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_02238954: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0223895C: .word 0x0000047C -_02238960: .word 0x02248CDC -_02238964: .word 0x0000049C -_02238968: .word 0x02248CAC - thumb_func_end ov62_02238794 - - thumb_func_start ov62_0223896C -ov62_0223896C: ; 0x0223896C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02238986 - cmp r1, #1 - beq _022389F2 - cmp r1, #2 - beq _02238A52 - b _02238AA0 -_02238986: - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - add r1, r0, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - mov r0, #7 - mov r1, #1 - bl sub_02019060 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x25 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02030A98 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02238B62 -_022389F2: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02238A38 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022396E8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02238A38: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02238B62 -_02238A52: - add r4, #8 - add r0, r4, #0 - bl ov62_02231688 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02238B62 -_02238AA0: - bl ov62_02233790 - cmp r0, #0 - beq _02238B62 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02238B32 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02238ADE - bl ov22_0225B020 - add r0, r5, #0 - bl ov62_0222F834 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - bl ov62_0223956C -_02238ADE: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, _02238B68 ; =0x00000016 - bl sub_02006514 - ldr r0, _02238B6C ; =ov62_0222F8E4 - add r1, r5, #0 - bl sub_02017798 - b _02238B62 -_02238B32: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_02238B62: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02238B68: .word 0x00000016 -_02238B6C: .word ov62_0222F8E4 - thumb_func_end ov62_0223896C - - thumb_func_start ov62_02238B70 -ov62_02238B70: ; 0x02238B70 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _02238B86 - mov r0, #0 - pop {r3, r4, r5, pc} -_02238B86: - ldr r0, [r4, #8] - cmp r0, #4 - bls _02238B8E - b _02238CCC -_02238B8E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02238B9A: ; jump table - .short _02238BA4 - _02238B9A - 2 ; case 0 - .short _02238BE4 - _02238B9A - 2 ; case 1 - .short _02238C00 - _02238B9A - 2 ; case 2 - .short _02238C5E - _02238B9A - 2 ; case 3 - .short _02238C98 - _02238B9A - 2 ; case 4 -_02238BA4: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r1, _02238CF4 ; =0x0000011F - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, _02238CF8 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238CF0 -_02238BE4: - add r0, r4, #0 - bl ov62_0224112C - mov r1, #0x2e - lsl r1, r1, #4 - ldr r1, [r5, r1] - bl ov61_0222B1FC - cmp r0, #1 - bne _02238CF0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238CF0 -_02238C00: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #0 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _02238CF8 ; =0x00000565 - bne _02238C4A - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #1 - bl ov62_022348B8 - mov r0, #0xb9 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - mov r0, #0x6f - str r1, [r4, #0xc] - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0208B9E0 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 - b _02238CF0 -_02238C4A: - mov r1, #0 - bl sub_020057A4 - ldr r0, _02238CFC ; =0x0000055F - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238CF0 -_02238C5E: - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02238CF0 -_02238C98: - mov r1, #0xb9 - lsl r1, r1, #2 - ldr r0, [r5, r1] - cmp r0, #0 - beq _02238CB8 - add r0, r1, #0 - mov r2, #0 - sub r0, #0xb0 - str r2, [r5, r0] - sub r1, #0xb4 - str r2, [r5, r1] - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 - b _02238CF0 -_02238CB8: - ldr r1, _02238D00 ; =0x00000125 - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0xc] - b _02238CF0 -_02238CCC: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0x3c - bge _02238CDE - bl sub_02022798 - cmp r0, #1 - bne _02238CF0 -_02238CDE: - mov r0, #0 - str r0, [r4, #0xc] - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_02238CF0: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02238CF4: .word 0x0000011F -_02238CF8: .word 0x00000565 -_02238CFC: .word 0x0000055F -_02238D00: .word 0x00000125 - thumb_func_end ov62_02238B70 - - thumb_func_start ov62_02238D04 -ov62_02238D04: ; 0x02238D04 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02238D1E - cmp r1, #1 - beq _02238DA8 - cmp r1, #2 - beq _02238DBE - b _02238E26 -_02238D1E: - mov r1, #0x8d - mov r0, #0 - lsl r1, r1, #2 - str r0, [r4, #0xc] - ldr r0, [r4, r1] - lsl r0, r0, #2 - add r2, r4, r0 - add r0, r1, #0 - add r0, #8 - ldr r0, [r2, r0] - add r1, r1, #4 - ldr r1, [r4, r1] - add r0, #0x80 - bl ov61_0222AE80 - mov r1, #0x86 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, #0x20 - ldr r1, [r4, r1] - bl ov22_0225AF8C - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl ov22_0225B074 - bl ov62_02239518 - add r0, r5, #0 - mov r1, #0x23 - mov r2, #3 - bl ov62_022343B8 - add r0, r5, #0 - mov r1, #0x24 - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _02238E50 ; =ov62_022394D8 - add r1, r5, #0 - bl sub_02017798 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02238E2C -_02238DA8: - mov r1, #0 - mov r3, #2 - ldr r0, [r5, #0x28] - add r2, r1, #0 - lsl r3, r3, #8 - bl sub_02003070 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02238E2C -_02238DBE: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02238E0C - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov22_0225B074 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r1, #0x8d - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov62_02239854 - add r0, r5, #0 - bl ov62_02239498 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02238E0C: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02238E2C -_02238E26: - mov r1, #8 - bl ov62_0222FB60 -_02238E2C: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02238E4C - bl sub_020241B4 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_0225AFF8 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_02238E4C: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02238E50: .word ov62_022394D8 - thumb_func_end ov62_02238D04 - - thumb_func_start ov62_02238E54 -ov62_02238E54: ; 0x02238E54 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, _02238F14 ; =0x02248CAC - bl sub_02022760 - cmp r0, #0 - beq _02238E76 - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #9 - bl ov62_0222FB60 -_02238E76: - ldr r0, _02238F18 ; =0x02248CB8 - bl sub_02022760 - cmp r0, #0 - beq _02238E8E - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #0xa - bl ov62_0222FB60 -_02238E8E: - ldr r0, _02238F1C ; =0x02248CBC - bl sub_02022760 - cmp r0, #0 - beq _02238EBC - mov r1, #0x8d - lsl r1, r1, #2 - ldr r0, [r4, r1] - cmp r0, #0 - beq _02238EA4 - b _02238EAA -_02238EA4: - add r0, r1, #0 - add r0, #0xb0 - ldr r0, [r4, r0] -_02238EAA: - sub r0, r0, #1 - str r0, [r4, r1] - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #0xb - bl ov62_0222FB60 -_02238EBC: - ldr r0, _02238F20 ; =0x02248CC0 - bl sub_02022760 - cmp r0, #0 - beq _02238EEE - mov r1, #0x8d - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r0, r0, #1 - str r0, [r4, r1] - ldr r0, [r4, r1] - add r1, #0xb0 - ldr r1, [r4, r1] - bl sub_020E1F6C - mov r0, #0x8d - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #0xb - bl ov62_0222FB60 -_02238EEE: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02238F0E - bl sub_020241B4 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov22_0225AFF8 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_02238F0E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02238F14: .word 0x02248CAC -_02238F18: .word 0x02248CB8 -_02238F1C: .word 0x02248CBC -_02238F20: .word 0x02248CC0 - thumb_func_end ov62_02238E54 - - thumb_func_start ov62_02238F24 -ov62_02238F24: ; 0x02238F24 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02238F3A - cmp r1, #1 - beq _02238F80 - b _02239002 -_02238F3A: - ldr r1, [r4, #0xc] - cmp r1, #0 - bne _02238F58 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - add r0, r5, #0 - bl ov62_02239D0C - b _02238F72 -_02238F58: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232394 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 -_02238F72: - add r0, r5, #0 - bl ov62_02239424 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02239008 -_02238F80: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02238FE8 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02238FC2 - bl ov22_0225B020 - add r0, r5, #0 - bl ov62_0222F834 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #0x8a - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - bl ov62_0223956C -_02238FC2: - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02238FE8: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02239008 -_02239002: - mov r1, #3 - bl ov62_0222FB60 -_02239008: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02238F24 - - thumb_func_start ov62_0223900C -ov62_0223900C: ; 0x0223900C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #4 - bls _0223901E - b _022391FE -_0223901E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223902A: ; jump table - .short _02239034 - _0223902A - 2 ; case 0 - .short _0223906A - _0223902A - 2 ; case 1 - .short _022390CA - _0223902A - 2 ; case 2 - .short _02239186 - _0223902A - 2 ; case 3 - .short _022391A2 - _0223902A - 2 ; case 4 -_02239034: - ldr r1, [r4, #0xc] - cmp r1, #0 - bne _02239048 - bl ov62_02239D0C - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - b _02239062 -_02239048: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232394 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 -_02239062: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02239216 -_0223906A: - mov r2, #1 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - bne _0223907C - b _02239216 -_0223907C: - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022390C2 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022390AA - bl ov22_0225B020 - add r0, r5, #0 - bl ov62_0222F834 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #0x8a - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - bl ov62_0223956C -_022390AA: - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C -_022390C2: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02239216 -_022390CA: - ldr r1, [r4, #0xc] - cmp r1, #0 - bne _0223911A - mov r1, #1 - bl ov62_02234540 - mov r1, #0x8d - lsl r1, r1, #2 - ldr r0, [r4, r1] - lsl r0, r0, #2 - add r2, r4, r0 - add r0, r1, #0 - add r0, #8 - add r1, #0x1c - ldr r0, [r2, r0] - ldr r1, [r4, r1] - bl ov61_0222AFC0 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232378 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #0 - bl ov62_022323B8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #0x50 - mov r2, #3 - bl ov62_022343B8 - b _0223917E -_0223911A: - mov r1, #0x8d - lsl r1, r1, #2 - ldr r0, [r4, r1] - lsl r0, r0, #2 - add r2, r4, r0 - add r0, r1, #0 - add r0, #8 - ldr r0, [r2, r0] - add r1, r1, #4 - ldr r1, [r4, r1] - add r0, #0x80 - bl ov61_0222AE80 - mov r1, #0x86 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, #0x20 - ldr r1, [r4, r1] - bl ov22_0225AF8C - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl ov22_0225B074 - bl ov62_02239518 - add r0, r5, #0 - mov r1, #0x23 - mov r2, #3 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C -_0223917E: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02239216 -_02239186: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0223919A - mov r1, #0 - mov r3, #2 - ldr r0, [r5, #0x28] - add r2, r1, #0 - lsl r3, r3, #8 - bl sub_02003070 -_0223919A: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02239216 -_022391A2: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _02239216 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022391CE - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #1 - bl ov62_022323B8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - b _022391F6 -_022391CE: - mov r1, #0x8d - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov62_02239854 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov22_0225B074 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C -_022391F6: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02239216 -_022391FE: - ldr r1, [r4, #0xc] - mov r0, #1 - eor r1, r0 - str r1, [r4, #0xc] - add r0, r5, #0 - add r1, #0x79 - bl ov62_02239440 - add r0, r5, #0 - mov r1, #8 - bl ov62_0222FB60 -_02239216: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223900C - - thumb_func_start ov62_0223921C -ov62_0223921C: ; 0x0223921C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #4 - bls _0223922E - b _02239416 -_0223922E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223923A: ; jump table - .short _02239244 - _0223923A - 2 ; case 0 - .short _0223927A - _0223923A - 2 ; case 1 - .short _022392DA - _0223923A - 2 ; case 2 - .short _0223939E - _0223923A - 2 ; case 3 - .short _022393BA - _0223923A - 2 ; case 4 -_02239244: - ldr r1, [r4, #0xc] - cmp r1, #0 - bne _02239258 - bl ov62_02239D0C - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - b _02239272 -_02239258: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232394 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 -_02239272: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223941E -_0223927A: - mov r2, #1 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - bne _0223928C - b _0223941E -_0223928C: - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022392D2 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _022392BA - bl ov22_0225B020 - add r0, r5, #0 - bl ov62_0222F834 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #0x8a - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - bl ov62_0223956C -_022392BA: - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C -_022392D2: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223941E -_022392DA: - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _0223934C - mov r1, #0x8d - lsl r1, r1, #2 - ldr r0, [r4, r1] - lsl r0, r0, #2 - add r2, r4, r0 - add r0, r1, #0 - add r0, #8 - ldr r0, [r2, r0] - add r1, r1, #4 - ldr r1, [r4, r1] - add r0, #0x80 - bl ov61_0222AE80 - mov r1, #0x86 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, #0x20 - ldr r1, [r4, r1] - bl ov22_0225AF8C - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0 - bl ov22_0225B074 - bl ov62_02239518 - add r0, r5, #0 - mov r1, #0x23 - mov r2, #3 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - b _0223938E -_0223934C: - mov r1, #0x8d - lsl r1, r1, #2 - ldr r0, [r4, r1] - lsl r0, r0, #2 - add r2, r4, r0 - add r0, r1, #0 - add r0, #8 - add r1, #0x1c - ldr r0, [r2, r0] - ldr r1, [r4, r1] - bl ov61_0222AFC0 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232378 - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #0 - bl ov62_022323B8 - add r0, r5, #0 - mov r1, #0x50 - mov r2, #3 - bl ov62_022343B8 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C -_0223938E: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223941E -_0223939E: - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022393B2 - mov r1, #0 - mov r3, #2 - ldr r0, [r5, #0x28] - add r2, r1, #0 - lsl r3, r3, #8 - bl sub_02003070 -_022393B2: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223941E -_022393BA: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _0223941E - ldr r0, [r4, #0xc] - cmp r0, #0 - bne _022393FA - mov r1, #0x8d - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov62_02239854 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl ov22_0225B074 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - b _0223940E -_022393FA: - mov r0, #0x25 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #1 - bl ov62_022323B8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C -_0223940E: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223941E -_02239416: - add r0, r5, #0 - mov r1, #8 - bl ov62_0222FB60 -_0223941E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223921C - - thumb_func_start ov62_02239424 -ov62_02239424: ; 0x02239424 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - add r0, r4, #0 - add r0, #0xd0 - bl sub_0201ACF4 - add r4, #0xd0 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02239424 - - thumb_func_start ov62_02239440 -ov62_02239440: ; 0x02239440 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r6, r1, #0 - add r4, #0xd0 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - add r1, r6, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02239494 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02239494: .word 0x000F0D00 - thumb_func_end ov62_02239440 - - thumb_func_start ov62_02239498 -ov62_02239498: ; 0x02239498 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r4, #0xd0 - add r0, r4, #0 - bl sub_0201A7A0 - mov r0, #3 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, #0 - mov r2, #6 - mov r3, #8 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0x79 - bl ov62_02239440 - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov62_02239498 - - thumb_func_start ov62_022394D8 -ov62_022394D8: ; 0x022394D8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r1, [r4, r0] - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022394F0 - bl ov22_0225B06C -_022394F0: - bl sub_0201DCAC - ldr r0, [r4, #0x28] - bl sub_02003694 - ldr r0, [r4, #0x24] - bl sub_0201C2B8 - ldr r3, _02239510 ; =0x027E0000 - ldr r1, _02239514 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_02239510: .word 0x027E0000 -_02239514: .word 0x00003FF8 - thumb_func_end ov62_022394D8 - - thumb_func_start ov62_02239518 -ov62_02239518: ; 0x02239518 - push {r4, r5} - mov r0, #1 - lsl r0, r0, #0x1a - ldr r2, [r0, #0] - ldr r1, _02239560 ; =0xFFFF1FFF - add r4, r0, #0 - and r2, r1 - lsr r1, r0, #0xd - orr r1, r2 - str r1, [r0, #0] - add r4, #0x48 - ldrh r3, [r4] - mov r2, #0x3f - mov r1, #0x1f - bic r3, r2 - orr r1, r3 - mov r3, #0x20 - orr r1, r3 - strh r1, [r4] - add r4, r0, #0 - add r4, #0x4a - ldrh r5, [r4] - mov r1, #0x1e - bic r5, r2 - orr r1, r5 - orr r1, r3 - strh r1, [r4] - add r1, r0, #0 - ldr r2, _02239564 ; =0x000048B8 - add r1, #0x40 - strh r2, [r1] - ldr r1, _02239568 ; =0x00001090 - add r0, #0x44 - strh r1, [r0] - pop {r4, r5} - bx lr - ; .align 2, 0 -_02239560: .word 0xFFFF1FFF -_02239564: .word 0x000048B8 -_02239568: .word 0x00001090 - thumb_func_end ov62_02239518 - - thumb_func_start ov62_0223956C -ov62_0223956C: ; 0x0223956C - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02239584 ; =0xFFFF1FFF - and r1, r0 - str r1, [r2, #0] - ldr r2, _02239588 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - bx lr - nop -_02239584: .word 0xFFFF1FFF -_02239588: .word 0x04001000 - thumb_func_end ov62_0223956C - - thumb_func_start ov62_0223958C -ov62_0223958C: ; 0x0223958C - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - bne _022395C0 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - b _022395E6 -_022395C0: - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_020129D0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 -_022395E6: - mov r0, #0x1a - lsl r0, r0, #4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x6f - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - thumb_func_end ov62_0223958C - - thumb_func_start ov62_02239608 -ov62_02239608: ; 0x02239608 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_022312CC - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x20 - add r0, r4, r1 - add r1, r5, #0 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - mov r0, #0x6d - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - mov r0, #0x66 - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x6d - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #0x35 - bl ov62_0223124C - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_0200D364 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - mov r0, #0x1a - lsl r0, r0, #4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x6f - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223958C - pop {r3, r4, r5, pc} - thumb_func_end ov62_02239608 - - thumb_func_start ov62_022396E8 -ov62_022396E8: ; 0x022396E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0x66 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x6d - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_022396E8 - - thumb_func_start ov62_02239724 -ov62_02239724: ; 0x02239724 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r6, [r5, r0] - add r0, r6, #0 - add r0, #0x10 - bl sub_0201A7CC - cmp r0, #1 - bne _0223973E - b _0223984A -_0223973E: - add r0, r6, #0 - str r0, [sp, #0x20] - add r0, #0x10 - str r0, [sp, #0x20] - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r3, #0x10 - str r3, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [sp, #0x20] - mov r2, #2 - bl sub_0201A7E8 - ldr r0, [sp, #0x20] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x66 - bl ov62_02231690 - str r0, [sp, #0x18] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #0x38 - bl sub_0200B1EC - str r0, [sp, #0x1c] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r1, r4, #0 - bl sub_0202A1A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_022349A8 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0202A1F4 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0x18] - add r2, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r0, [sp, #0x18] - mov r1, #1 - add r2, r5, #0 - bl sub_0200BE48 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r1, r7, #0 - bl sub_0200C388 - add r0, r7, #0 - bl sub_02023C5C - mov r5, #0 - str r0, [sp, #0x14] - cmp r0, #0 - bls _0223982C - add r6, r5, #0 -_022397F0: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_02023C9C - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x80 - sub r0, r1, r0 - lsr r3, r0, #1 - str r6, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02239850 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - add r2, r4, #0 - bl sub_0201D78C - ldr r0, [sp, #0x14] - add r5, r5, #1 - add r6, #0x10 - cmp r5, r0 - blo _022397F0 -_0223982C: - ldr r0, [sp, #0x20] - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_0200B3F0 -_0223984A: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02239850: .word 0x000F0D00 - thumb_func_end ov62_02239724 - - thumb_func_start ov62_02239854 -ov62_02239854: ; 0x02239854 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r6, [r5, r0] - add r0, r6, #0 - add r0, #0x10 - bl sub_0201A7CC - cmp r0, #1 - bne _0223986E - b _0223997A -_0223986E: - add r0, r6, #0 - str r0, [sp, #0x20] - add r0, #0x10 - str r0, [sp, #0x20] - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r3, #0x10 - str r3, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [sp, #0x20] - mov r2, #2 - bl sub_0201A7E8 - ldr r0, [sp, #0x20] - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x66 - bl ov62_02231690 - str r0, [sp, #0x18] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #0x38 - bl sub_0200B1EC - str r0, [sp, #0x1c] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r1, r4, #0 - bl sub_0202A1A0 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_022349A8 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0202A1F4 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0x18] - add r2, r4, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r0, [sp, #0x18] - mov r1, #1 - add r2, r5, #0 - bl sub_0200BE48 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x1c] - add r1, r7, #0 - bl sub_0200C388 - add r0, r7, #0 - bl sub_02023C5C - mov r5, #0 - str r0, [sp, #0x14] - cmp r0, #0 - bls _0223995C - add r6, r5, #0 -_02239920: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl sub_02023C9C - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0x80 - sub r0, r1, r0 - lsr r3, r0, #1 - str r6, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02239980 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - add r2, r4, #0 - bl sub_0201D78C - ldr r0, [sp, #0x14] - add r5, r5, #1 - add r6, #0x10 - cmp r5, r0 - blo _02239920 -_0223995C: - ldr r0, [sp, #0x20] - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_0200B3F0 -_0223997A: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02239980: .word 0x000F0D00 - thumb_func_end ov62_02239854 - - thumb_func_start ov62_02239984 -ov62_02239984: ; 0x02239984 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #8] - add r0, r1, #1 - ldr r2, _02239A04 ; =0x022497D4 - lsl r0, r0, #1 - ldrh r4, [r2, r0] - lsl r0, r1, #1 - ldrh r6, [r2, r0] - ldr r1, [sp, #8] - mov r0, #0x66 - add r2, sp, #0xc - bl ov62_02231948 - str r0, [sp, #4] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02027560 - str r0, [sp] - add r7, r6, #0 - cmp r6, r4 - bge _022399D6 - ldr r0, [sp, #4] - lsl r1, r6, #1 - add r5, r0, r1 -_022399BE: - ldrh r1, [r5] - ldr r0, [sp] - bl sub_02026FE8 - cmp r0, #0 - bne _022399CE - ldr r0, _02239A08 ; =0x0000FFFF - strh r0, [r5] -_022399CE: - add r7, r7, #1 - add r5, r5, #2 - cmp r7, r4 - blt _022399BE -_022399D6: - cmp r6, r4 - bge _022399F6 - ldr r0, [sp, #4] - lsl r1, r6, #1 - add r2, r0, r1 - ldr r0, _02239A08 ; =0x0000FFFF -_022399E2: - ldrh r1, [r2] - cmp r1, r0 - beq _022399EE - mov r0, #1 - str r0, [sp, #8] - b _022399F6 -_022399EE: - add r6, r6, #1 - add r2, r2, #2 - cmp r6, r4 - blt _022399E2 -_022399F6: - ldr r0, [sp, #4] - bl sub_020181C4 - ldr r0, [sp, #8] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02239A04: .word 0x022497D4 -_02239A08: .word 0x0000FFFF - thumb_func_end ov62_02239984 - - thumb_func_start ov62_02239A0C -ov62_02239A0C: ; 0x02239A0C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r0, r1, #1 - ldr r2, _02239B74 ; =0x022497D4 - lsl r0, r0, #1 - ldrh r6, [r2, r0] - lsl r0, r1, #1 - ldrh r0, [r2, r0] - mov r2, #0x76 - lsl r2, r2, #2 - str r0, [sp] - mov r0, #0x66 - mov r1, #0 - add r2, r4, r2 - bl ov62_02231948 - mov r2, #0x77 - lsl r2, r2, #2 - str r0, [r4, r2] - sub r2, r2, #4 - mov r0, #0x66 - mov r1, #0 - add r2, r4, r2 - bl ov62_02231948 - str r0, [sp, #8] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02027560 - str r0, [sp, #4] - mov r0, #0x75 - ldr r7, [sp] - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r7, #0 - cmp r0, r6 - bge _02239A92 - lsl r1, r0, #1 - ldr r0, [sp, #8] - add r5, r0, r1 -_02239A6A: - ldrh r1, [r5] - ldr r0, [sp, #4] - bl sub_02026FE8 - cmp r0, #0 - bne _02239A7C - ldr r0, _02239B78 ; =0x0000FFFF - strh r0, [r5] - b _02239A8A -_02239A7C: - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r0, #1 - mov r0, #0x75 - lsl r0, r0, #2 - str r1, [r4, r0] -_02239A8A: - add r7, r7, #1 - add r5, r5, #2 - cmp r7, r6 - blt _02239A6A -_02239A92: - ldr r1, [sp] - mov r0, #0 - cmp r1, r6 - bge _02239AC2 - lsl r2, r1, #1 - ldr r1, [sp, #8] - ldr r7, _02239B78 ; =0x0000FFFF - add r2, r1, r2 - add r3, r0, #0 -_02239AA4: - ldrh r1, [r2] - cmp r1, r7 - beq _02239AB6 - mov r5, #0x77 - lsl r5, r5, #2 - ldr r5, [r4, r5] - add r0, r0, #1 - strh r1, [r5, r3] - add r3, r3, #2 -_02239AB6: - ldr r1, [sp] - add r2, r2, #2 - add r1, r1, #1 - str r1, [sp] - cmp r1, r6 - blt _02239AA4 -_02239AC2: - mov r1, #0x76 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r0, r1 - bge _02239AEA - mov r7, #0x77 - ldr r1, [sp, #8] - lsl r6, r0, #1 - lsl r7, r7, #2 - add r5, r1, r6 - sub r1, r7, #4 -_02239AD8: - ldrh r3, [r5] - ldr r2, [r4, r7] - add r0, r0, #1 - strh r3, [r2, r6] - ldr r2, [r4, r1] - add r5, r5, #2 - add r6, r6, #2 - cmp r0, r2 - blt _02239AD8 -_02239AEA: - ldr r0, [sp, #8] - bl sub_020181C4 - mov r1, #0x75 - lsl r1, r1, #2 - ldr r1, [r4, r1] - mov r0, #0x66 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x7a - lsl r2, r2, #2 - str r0, [r4, r2] - ldr r0, [r4, r2] - sub r2, #0x14 - ldr r2, [r4, r2] - mov r1, #0 - lsl r2, r2, #4 - bl sub_020C4CF4 - mov r0, #0x75 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r5, #0 - cmp r0, #0 - ble _02239B54 - mov r7, #0x7a - lsl r7, r7, #2 - add r0, r7, #0 - add r2, r5, #0 - add r3, r5, #0 - sub r0, #0x14 -_02239B2A: - mov r1, #0x77 - lsl r1, r1, #2 - ldr r1, [r4, r1] - mov r6, #0x7a - lsl r6, r6, #2 - ldrh r1, [r1, r2] - ldr r6, [r4, r6] - add r5, r5, #1 - str r1, [r6, r3] - mov r1, #0x77 - lsl r1, r1, #2 - ldr r1, [r4, r1] - ldr r6, [r4, r7] - ldrh r1, [r1, r2] - add r6, r6, r3 - add r2, r2, #2 - str r1, [r6, #4] - ldr r1, [r4, r0] - add r3, #0x10 - cmp r5, r1 - blt _02239B2A -_02239B54: - mov r2, #0x67 - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x66 - bl sub_0200B144 - mov r1, #0x1e - lsl r1, r1, #4 - str r0, [r4, r1] - mov r2, #1 - add r0, r1, #4 - str r2, [r4, r0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02239B74: .word 0x022497D4 -_02239B78: .word 0x0000FFFF - thumb_func_end ov62_02239A0C - - thumb_func_start ov62_02239B7C -ov62_02239B7C: ; 0x02239B7C - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0x7a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x77 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x79 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} - thumb_func_end ov62_02239B7C - - thumb_func_start ov62_02239BAC -ov62_02239BAC: ; 0x02239BAC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #0 - bne _02239BD2 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02239984 - cmp r0, #0 - bne _02239BCA - ldr r0, _02239BD4 ; =0x00000564 - bl sub_02005748 - pop {r3, r4, r5, pc} -_02239BCA: - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02239A0C -_02239BD2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02239BD4: .word 0x00000564 - thumb_func_end ov62_02239BAC - - thumb_func_start ov62_02239BD8 -ov62_02239BD8: ; 0x02239BD8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r0, [sp, #0x14] - mov r0, #1 - str r0, [sp, #0x28] - mov r1, #0x86 - ldr r0, [sp, #0x14] - lsl r1, r1, #4 - ldr r4, [r0, r1] - ldr r5, _02239CDC ; =0x022491F0 - mov r7, #0 - add r4, #0xd0 -_02239BF0: - ldrb r0, [r5, #2] - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #0x24] - ldrb r0, [r5] - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #0x20] - ldrb r0, [r5, #3] - lsr r1, r0, #3 - ldr r0, [sp, #0x24] - sub r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - ldrb r0, [r5, #1] - lsr r1, r0, #3 - ldr r0, [sp, #0x20] - sub r0, r1, r0 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - add r0, r4, #0 - bl sub_0201A7A0 - ldr r0, [sp, #0x20] - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0x1c] - mov r2, #6 - str r0, [sp, #4] - str r6, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [sp, #0x24] - ldr r0, [r0, #0x24] - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - add r1, r7, #0 - ldr r0, [r0, #0x48] - add r1, #0x44 - bl sub_0200B1EC - str r0, [sp, #0x2c] - ldr r1, [sp, #0x2c] - add r0, r4, #0 - bl ov62_0223429C - lsl r1, r6, #3 - sub r1, #0x10 - str r0, [sp, #0x30] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r1, r7, #0 - bl ov62_02239984 - cmp r0, #1 - bne _02239C9A - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x2c] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02239CE0 ; =0x000F0D00 - ldr r3, [sp, #0x30] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0 - bl sub_0201D78C - b _02239CB6 -_02239C9A: - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x2c] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02239CE4 ; =0x000C0B00 - ldr r3, [sp, #0x30] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0 - bl sub_0201D78C -_02239CB6: - add r0, r4, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x2c] - bl sub_020237BC - ldr r0, [sp, #0x1c] - add r7, r7, #1 - add r1, r0, #0 - ldr r0, [sp, #0x28] - mul r1, r6 - add r0, r0, r1 - str r0, [sp, #0x28] - add r4, #0x10 - add r5, r5, #4 - cmp r7, #9 - blo _02239BF0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02239CDC: .word 0x022491F0 -_02239CE0: .word 0x000F0D00 -_02239CE4: .word 0x000C0B00 - thumb_func_end ov62_02239BD8 - - thumb_func_start ov62_02239CE8 -ov62_02239CE8: ; 0x02239CE8 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r5, [r0, r1] - mov r4, #0 - add r5, #0xd0 -_02239CF4: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #9 - blo _02239CF4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02239CE8 - - thumb_func_start ov62_02239D0C -ov62_02239D0C: ; 0x02239D0C - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A7CC - cmp r0, #1 - bne _02239D30 - add r0, r4, #0 - add r0, #0x10 - bl sub_0201ACF4 - add r4, #0x10 - add r0, r4, #0 - bl sub_0201A8FC -_02239D30: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02239D0C - - thumb_func_start ov62_02239D34 -ov62_02239D34: ; 0x02239D34 - bx lr - ; .align 2, 0 - thumb_func_end ov62_02239D34 - - thumb_func_start ov62_02239D38 -ov62_02239D38: ; 0x02239D38 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r1, [r1, #0] - ldr r4, [r0, r2] - cmp r1, #1 - beq _02239D5C - bl ov62_0224112C - mov r1, #0x8f - lsl r1, r1, #2 - add r1, r4, r1 - mov r2, #5 - bl ov61_0222BC90 - mov r1, #0xb9 - lsl r1, r1, #2 - str r0, [r4, r1] -_02239D5C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02239D38 - - thumb_func_start ov62_02239D60 -ov62_02239D60: ; 0x02239D60 - push {r3, r4, r5, lr} - add r5, r1, #0 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x66 - bl sub_02030A80 - ldr r1, _02239D88 ; =0x00002ED8 - str r0, [r4, r1] - lsl r0, r5, #2 - add r2, r4, r0 - mov r0, #0xe3 - lsl r0, r0, #2 - ldr r0, [r2, r0] - ldr r1, [r4, r1] - bl ov61_0222AFC0 - pop {r3, r4, r5, pc} - nop -_02239D88: .word 0x00002ED8 - thumb_func_end ov62_02239D60 - - thumb_func_start ov62_02239D8C -ov62_02239D8C: ; 0x02239D8C - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _02239D9C ; =0x00002ED8 - ldr r3, _02239DA0 ; =sub_02030A98 - ldr r0, [r1, r0] - bx r3 - nop -_02239D9C: .word 0x00002ED8 -_02239DA0: .word sub_02030A98 - thumb_func_end ov62_02239D8C - - thumb_func_start ov62_02239DA4 -ov62_02239DA4: ; 0x02239DA4 - mov r2, #0 -_02239DA6: - ldrh r1, [r0, #0x28] - cmp r1, #0 - beq _02239DB0 - mov r0, #1 - bx lr -_02239DB0: - add r2, r2, #1 - add r0, r0, #2 - cmp r2, #0x1e - blt _02239DA6 - mov r0, #0 - bx lr - thumb_func_end ov62_02239DA4 - - thumb_func_start ov62_02239DBC -ov62_02239DBC: ; 0x02239DBC - push {r3, r4} - mov r1, #0x1b - lsl r1, r1, #4 - ldr r4, [r0, r1] - add r2, r4, #0 - cmp r4, #0x1e - bge _02239DE6 - lsl r1, r4, #1 - add r3, r0, r1 -_02239DCE: - ldrh r1, [r3, #0x2c] - cmp r1, #0 - beq _02239DDE - mov r1, #0x1b - lsl r1, r1, #4 - str r2, [r0, r1] - pop {r3, r4} - bx lr -_02239DDE: - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #0x1e - blt _02239DCE -_02239DE6: - mov r3, #0 - cmp r4, #0 - ble _02239E06 - add r2, r0, #0 -_02239DEE: - ldrh r1, [r2, #0x2c] - cmp r1, #0 - beq _02239DFE - mov r1, #0x1b - lsl r1, r1, #4 - str r3, [r0, r1] - pop {r3, r4} - bx lr -_02239DFE: - add r3, r3, #1 - add r2, r2, #2 - cmp r3, r4 - blt _02239DEE -_02239E06: - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov62_02239DBC - - thumb_func_start ov62_02239E0C -ov62_02239E0C: ; 0x02239E0C - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r5, r2] - cmp r0, #3 - bhi _02239EBA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02239E26: ; jump table - .short _02239E2E - _02239E26 - 2 ; case 0 - .short _02239E54 - _02239E26 - 2 ; case 1 - .short _02239E80 - _02239E26 - 2 ; case 2 - .short _02239E94 - _02239E26 - 2 ; case 3 -_02239E2E: - cmp r1, #2 - bne _02239EBA - add r0, r5, #0 - bl ov62_02234520 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0 - ble _02239E46 - sub r1, r1, #1 - b _02239E48 -_02239E46: - mov r1, #0x11 -_02239E48: - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239E54: - cmp r1, #2 - bne _02239EBA - add r0, r5, #0 - bl ov62_02234520 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - mov r1, #0x12 - bl sub_020E1F6C - mov r0, #0x1a - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239E80: - cmp r1, #0 - bne _02239EBA - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #9 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239E94: - cmp r1, #0 - bne _02239EBA - add r0, r5, #0 - bl ov62_02234520 - add r0, r4, #4 - bl ov62_02239DA4 - cmp r0, #0 - beq _02239EB2 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239EB2: - ldr r1, _02239EBC ; =0x0000010F - add r0, r5, #0 - bl ov62_0223AC0C -_02239EBA: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02239EBC: .word 0x0000010F - thumb_func_end ov62_02239E0C - - thumb_func_start ov62_02239EC0 -ov62_02239EC0: ; 0x02239EC0 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x86 - add r4, r2, #0 - lsl r0, r0, #4 - ldr r6, [r4, r0] - cmp r1, #0 - bne _02239EF8 - cmp r5, #6 - beq _02239EEA - add r0, r4, #0 - bl ov62_02234520 - mov r0, #0xe - lsl r0, r0, #6 - str r5, [r6, r0] - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 - pop {r4, r5, r6, pc} -_02239EEA: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 -_02239EF8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_02239EC0 - - thumb_func_start ov62_02239EFC -ov62_02239EFC: ; 0x02239EFC - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x86 - add r4, r2, #0 - lsl r0, r0, #4 - ldr r6, [r4, r0] - cmp r1, #0 - bne _02239F34 - cmp r5, #6 - beq _02239F26 - add r0, r4, #0 - bl ov62_02234520 - mov r0, #0xe - lsl r0, r0, #6 - str r5, [r6, r0] - add r0, r4, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r4, r5, r6, pc} -_02239F26: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0xc - bl ov62_0222FB60 -_02239F34: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_02239EFC - - thumb_func_start ov62_02239F38 -ov62_02239F38: ; 0x02239F38 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r5, r2] - cmp r1, #0 - bne _02239F92 - cmp r0, #0 - beq _02239F52 - cmp r0, #1 - beq _02239F74 - cmp r0, #2 - beq _02239F84 -_02239F52: - add r0, r5, #0 - bl ov62_02234520 - ldr r0, _02239F94 ; =0x00002F64 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02239F6A - add r0, r5, #0 - mov r1, #7 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239F6A: - add r0, r5, #0 - mov r1, #8 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239F74: - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #9 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02239F84: - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #6 - bl ov62_0222FB60 -_02239F92: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02239F94: .word 0x00002F64 - thumb_func_end ov62_02239F38 - - thumb_func_start ov62_02239F98 -ov62_02239F98: ; 0x02239F98 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r5, r2] - cmp r1, #0 - bne _0223A0A0 - cmp r0, #0 - beq _02239FB0 - cmp r0, #1 - beq _0223A078 - pop {r3, r4, r5, pc} -_02239FB0: - add r0, r5, #0 - bl ov62_02234520 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - mov r1, #0x1e - bl sub_020E1F6C - mov r0, #0x1b - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - bl ov62_02239DBC - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #6 - bl sub_020E1F6C - ldr r0, _0223A0A4 ; =0x00002F68 - str r1, [r4, r0] - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #6 - bl sub_020E1F6C - ldr r2, _0223A0A8 ; =0x00002F6C - str r0, [r4, r2] - sub r1, r2, #4 - ldr r3, [r4, r1] - mov r1, #0x18 - mul r1, r3 - ldr r3, [r4, r2] - mov r2, #0x16 - mov r0, #0x6f - mul r2, r3 - lsl r0, r0, #4 - add r1, #0x6e - add r2, #0x34 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8B8 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223B140 - add r0, r5, #0 - bl ov62_0223B050 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r1, #0x1b - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov62_0223ADC0 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r2, [r4, r0] - lsl r1, r2, #1 - add r1, r4, r1 - ldrh r1, [r1, #0x2c] - cmp r1, #0 - beq _0223A0A0 - sub r0, #0x58 - mov r1, #1 - ldr r0, [r4, r0] - lsl r1, r2 - bl ov62_0223ADB0 - cmp r0, #1 - beq _0223A0A0 - mov r1, #0x1b - lsl r1, r1, #4 - ldr r2, [r4, r1] - sub r1, #0x54 - lsl r0, r2, #1 - add r0, r4, r0 - add r2, r4, r2 - ldrh r0, [r0, #0x2c] - ldrb r1, [r2, r1] - bl sub_02005844 - pop {r3, r4, r5, pc} -_0223A078: - add r0, r5, #0 - bl ov62_02234520 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r5, #0 - mov r1, #0xb - bl ov62_0222FB60 -_0223A0A0: - pop {r3, r4, r5, pc} - nop -_0223A0A4: .word 0x00002F68 -_0223A0A8: .word 0x00002F6C - thumb_func_end ov62_02239F98 - - thumb_func_start ov62_0223A0AC -ov62_0223A0AC: ; 0x0223A0AC - push {r3, r4, r5, lr} - sub sp, #0x18 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_0223131C - mov r0, #0x20 - str r0, [sp] - mov r0, #0xe8 - str r0, [sp, #4] - mov r0, #0x24 - str r0, [sp, #8] - sub r0, #0x2c - str r0, [sp, #0xc] - mov r0, #0 - mov r1, #0xd2 - str r0, [sp, #0x10] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, r4, r1 - mov r2, #2 - mov r3, #3 - bl ov62_0223454C - mov r0, #0x80 - str r0, [sp] - mov r0, #0xe8 - str r0, [sp, #4] - mov r0, #0x24 - str r0, [sp, #8] - sub r0, #0x2c - str r0, [sp, #0xc] - mov r0, #1 - mov r1, #0xd9 - str r0, [sp, #0x10] - lsl r1, r1, #2 - str r0, [sp, #0x14] - add r0, r5, #0 - add r1, r4, r1 - mov r2, #2 - mov r3, #0x35 - bl ov62_0223454C - add sp, #0x18 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223A0AC - - thumb_func_start ov62_0223A110 -ov62_0223A110: ; 0x0223A110 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0xd2 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022345A8 - mov r0, #0xd9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022345A8 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223A110 - - thumb_func_start ov62_0223A138 -ov62_0223A138: ; 0x0223A138 - mov r2, #0 - add r3, r0, #0 -_0223A13C: - ldrh r1, [r3, #0x2c] - cmp r1, #0 - beq _0223A14A - mov r1, #0x1b - lsl r1, r1, #4 - str r2, [r0, r1] - bx lr -_0223A14A: - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #0x1e - blt _0223A13C - bx lr - thumb_func_end ov62_0223A138 - - thumb_func_start ov62_0223A154 -ov62_0223A154: ; 0x0223A154 - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - mov r2, #0x67 - add r4, r1, #0 - add r7, r3, #0 - add r5, r0, #0 - add r0, r7, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - mov r0, #0x66 - str r0, [sp] - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov61_0222AE88 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_0223A154 - - thumb_func_start ov62_0223A17C -ov62_0223A17C: ; 0x0223A17C - push {r3, r4, r5, lr} - ldr r1, _0223A280 ; =0x00002F70 - add r5, r0, #0 - mov r0, #0x66 - bl sub_02018144 - ldr r2, _0223A280 ; =0x00002F70 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02024420 - str r0, [r4, #0] - mov r0, #0x83 - mov r2, #0x1a - lsl r0, r0, #4 - lsl r2, r2, #4 - ldr r0, [r5, r0] - ldr r1, [r4, #0] - ldr r2, [r4, r2] - add r3, r4, #4 - bl ov62_0223A154 - add r0, r4, #0 - bl ov62_0223A138 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #0 - bl ov62_022315C8 - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223A284 ; =0x02248DB4 - ldr r2, _0223A288 ; =ov62_02239E0C - mov r1, #4 - add r3, r5, #0 - bl sub_02023FCC - mov r1, #0x33 - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223A28C ; =0x02248DDC - ldr r2, _0223A290 ; =ov62_02239EC0 - mov r1, #7 - add r3, r5, #0 - bl sub_02023FCC - mov r1, #0xcd - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223A28C ; =0x02248DDC - ldr r2, _0223A294 ; =ov62_02239EFC - mov r1, #7 - add r3, r5, #0 - bl sub_02023FCC - mov r1, #0xce - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223A298 ; =0x02248D6C - ldr r2, _0223A29C ; =ov62_02239F38 - mov r1, #3 - add r3, r5, #0 - bl sub_02023FCC - mov r1, #0xcf - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223A2A0 ; =0x02248D54 - ldr r2, _0223A2A4 ; =ov62_02239F98 - mov r1, #2 - add r3, r5, #0 - bl sub_02023FCC - mov r1, #0xd - lsl r1, r1, #6 - str r0, [r4, r1] - mov r0, #0x66 - bl sub_02030A80 - mov r1, #0xe1 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #0x83 - lsl r1, r1, #4 - ldr r1, [r5, r1] - bl sub_02030AA0 - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223A280: .word 0x00002F70 -_0223A284: .word 0x02248DB4 -_0223A288: .word ov62_02239E0C -_0223A28C: .word 0x02248DDC -_0223A290: .word ov62_02239EC0 -_0223A294: .word ov62_02239EFC -_0223A298: .word 0x02248D6C -_0223A29C: .word ov62_02239F38 -_0223A2A0: .word 0x02248D54 -_0223A2A4: .word ov62_02239F98 - thumb_func_end ov62_0223A17C - - thumb_func_start ov62_0223A2A8 -ov62_0223A2A8: ; 0x0223A2A8 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223A2C2 - cmp r1, #1 - beq _0223A32E - cmp r1, #2 - beq _0223A35E - b _0223A388 -_0223A2C2: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _0223A2D8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223A2D8: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223A38E -_0223A32E: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223A38E -_0223A35E: - bl ov62_02233790 - cmp r0, #0 - beq _0223A38E - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223A0AC - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - bl ov62_02234314 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223A38E -_0223A388: - mov r1, #2 - bl ov62_0222FB60 -_0223A38E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223A2A8 - - thumb_func_start ov62_0223A394 -ov62_0223A394: ; 0x0223A394 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _0223A3A8 - b _0223A4B8 -_0223A3A8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223A3B4: ; jump table - .short _0223A3BC - _0223A3B4 - 2 ; case 0 - .short _0223A3FE - _0223A3B4 - 2 ; case 1 - .short _0223A436 - _0223A3B4 - 2 ; case 2 - .short _0223A462 - _0223A3B4 - 2 ; case 3 -_0223A3BC: - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - bl ov62_02231560 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223B140 - add r0, r4, #0 - bl ov62_0223AFEC - add r0, r4, #0 - bl ov62_0223AD7C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223A3FE: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - mov r2, #1 - add r1, r5, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A4B8 - mov r0, #0x83 - mov r2, #0x1a - lsl r0, r0, #4 - lsl r2, r2, #4 - ldr r0, [r4, r0] - ldr r1, [r5, #0] - ldr r2, [r5, r2] - add r3, r5, #4 - bl ov62_0223A154 - add r0, r5, #0 - bl ov62_0223A138 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A4B8 -_0223A436: - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223B230 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223B124 - add r0, r4, #0 - mov r1, #0 - bl ov62_0223AFC0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A4B8 -_0223A462: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A4B8 - mov r1, #0x1b - lsl r1, r1, #4 - ldr r1, [r5, r1] - add r0, r4, #0 - bl ov62_0223ADC0 - add r0, r4, #0 - bl ov62_0223AD20 - ldr r1, _0223A4C0 ; =0x0000010E - add r0, r4, #0 - bl ov62_0223AC0C - add r0, r4, #0 - mov r1, #0 - bl ov62_0223B124 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223AFC0 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _0223A4C4 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223A4B8: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223A4C0: .word 0x0000010E -_0223A4C4: .word 0x04000050 - thumb_func_end ov62_0223A394 - - thumb_func_start ov62_0223A4C8 -ov62_0223A4C8: ; 0x0223A4C8 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - bne _0223A4FC - mov r0, #0xda - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #0xdb - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - mov r0, #0xd3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - b _0223A522 -_0223A4FC: - mov r0, #0xda - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0xdb - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_020129D0 - mov r0, #0xd3 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 -_0223A522: - mov r0, #0x35 - lsl r0, r0, #4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0xdb - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - thumb_func_end ov62_0223A4C8 - - thumb_func_start ov62_0223A544 -ov62_0223A544: ; 0x0223A544 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - beq _0223A55C - cmp r0, #1 - beq _0223A5D2 - b _0223A62A -_0223A55C: - ldr r0, _0223A630 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B9E0 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A5B4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x4f - mov r3, #7 - bl sub_0200710C - add r0, r5, #0 - bl ov62_0223AB14 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223A4C8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223A5B4: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223A62A -_0223A5D2: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A60E - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r5, #0 - mov r1, #6 - bl ov62_0222FB60 - mov r1, #0x11 - add r0, r5, #0 - lsl r1, r1, #4 - bl ov62_0223AC0C -_0223A60E: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223A62A: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223A630: .word 0x000006F4 - thumb_func_end ov62_0223A544 - - thumb_func_start ov62_0223A634 -ov62_0223A634: ; 0x0223A634 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0xcd - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223A634 - - thumb_func_start ov62_0223A64C -ov62_0223A64C: ; 0x0223A64C - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _0223A666 - add sp, #0x10 - mov r0, #0 - pop {r3, r4, r5, pc} -_0223A666: - ldr r0, [r4, #8] - cmp r0, #7 - bls _0223A66E - b _0223A824 -_0223A66E: - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223A67A: ; jump table - .short _0223A68A - _0223A67A - 2 ; case 0 - .short _0223A6A8 - _0223A67A - 2 ; case 1 - .short _0223A6F4 - _0223A67A - 2 ; case 2 - .short _0223A73A - _0223A67A - 2 ; case 3 - .short _0223A73E - _0223A67A - 2 ; case 4 - .short _0223A780 - _0223A67A - 2 ; case 5 - .short _0223A7AA - _0223A67A - 2 ; case 6 - .short _0223A802 - _0223A67A - 2 ; case 7 -_0223A68A: - add r0, r4, #0 - bl ov62_0223ABBC - ldr r0, _0223A834 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223A6A8: - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - bl ov62_02231560 - add r0, r4, #0 - bl ov62_0223B140 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223AFEC - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223AD7C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A82C -_0223A6F4: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A71C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223A71C: - ldr r0, [r4, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223A82C -_0223A73A: - add r0, r0, #1 - str r0, [r4, #8] -_0223A73E: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r1, #0x12 - add r0, r4, #0 - lsl r1, r1, #4 - bl ov62_02231AAC - ldr r0, _0223A838 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A82C -_0223A780: - add r0, r4, #0 - bl ov62_0224112C - mov r1, #0x1a - lsl r1, r1, #4 - ldr r1, [r5, r1] - mov r2, #0xe - str r1, [sp] - lsl r2, r2, #6 - ldr r1, [r5, r2] - add r2, r2, #4 - ldr r2, [r5, r2] - ldr r3, [r5, #0] - bl ov61_0222B224 - cmp r0, #1 - bne _0223A82C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A82C -_0223A7AA: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #0xc - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _0223A838 ; =0x00000565 - bne _0223A7DE - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #0xc] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #2 - bl ov62_022348B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A82C -_0223A7DE: - mov r1, #0 - bl sub_020057A4 - add r0, r4, #0 - mov r1, #0x30 - bl ov62_02233704 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223196C - ldr r0, _0223A83C ; =0x0000055F - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A82C -_0223A802: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223A82C -_0223A824: - add r0, r4, #0 - mov r1, #0xa - bl ov62_0222FB60 -_0223A82C: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223A834: .word 0x000006F4 -_0223A838: .word 0x00000565 -_0223A83C: .word 0x0000055F - thumb_func_end ov62_0223A64C - - thumb_func_start ov62_0223A840 -ov62_0223A840: ; 0x0223A840 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - beq _0223A85C - cmp r0, #1 - beq _0223A87A - cmp r0, #2 - beq _0223A8E0 - b _0223A92E -_0223A85C: - ldr r0, _0223A934 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B9E0 - add r0, r5, #0 - bl ov62_0223ABBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223A87A: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A8C2 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223A4C8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x4d - mov r3, #7 - bl sub_0200710C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223A8C2: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223A92E -_0223A8E0: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A912 - ldr r1, _0223A938 ; =0x0000010E - add r0, r5, #0 - bl ov62_0223AC0C - add r0, r5, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223A912: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223A92E: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223A934: .word 0x000006F4 -_0223A938: .word 0x0000010E - thumb_func_end ov62_0223A840 - - thumb_func_start ov62_0223A93C -ov62_0223A93C: ; 0x0223A93C - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223A958 - cmp r1, #1 - beq _0223A9A2 - cmp r1, #2 - beq _0223A9E8 - b _0223A9EE -_0223A958: - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - bl ov62_02231560 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223B140 - add r0, r5, #0 - bl ov62_0223AFEC - add r0, r5, #0 - bl ov62_0223AD7C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223A9A2: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223A9CA - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223A9CA: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223A9EE -_0223A9E8: - mov r1, #0xa - bl ov62_0222FB60 -_0223A9EE: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov62_0223A93C - - thumb_func_start ov62_0223A9F4 -ov62_0223A9F4: ; 0x0223A9F4 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223AA10 - cmp r1, #1 - beq _0223AA3C - cmp r1, #2 - beq _0223AA82 - b _0223AA88 -_0223AA10: - bl ov62_0223ABBC - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - bl ov62_02231560 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223AA3C: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223AA64 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223AA64: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223AA88 -_0223AA82: - mov r1, #0xd - bl ov62_0222FB60 -_0223AA88: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223A9F4 - - thumb_func_start ov62_0223AA90 -ov62_0223AA90: ; 0x0223AA90 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - mov r1, #0x86 - ldr r6, _0223AB08 ; =0x00000101 - ldr r0, [sp, #0x14] - lsl r1, r1, #4 - ldr r1, [r0, r1] - add r0, r6, #0 - add r0, #0xb3 - ldr r5, _0223AB0C ; =0x02248D9C - ldr r7, _0223AB10 ; =0x02248D78 - add r4, r1, r0 -_0223AAAE: - add r0, r4, #0 - bl sub_0201A7A0 - ldrb r0, [r5, #1] - add r1, r4, #0 - mov r2, #2 - str r0, [sp] - ldrb r0, [r5, #2] - str r0, [sp, #4] - ldrb r0, [r5, #3] - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldrb r3, [r5] - ldr r0, [r0, #0x24] - bl sub_0201A7E8 - ldr r1, [r7, #0] - add r0, r4, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201A9A4 - ldrb r1, [r5, #2] - ldrb r0, [r5, #3] - add r4, #0x10 - add r5, r5, #4 - mul r0, r1 - add r6, r6, r0 - ldr r0, [sp, #0x18] - add r7, r7, #4 - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #3 - blt _0223AAAE - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223AB08: .word 0x00000101 -_0223AB0C: .word 0x02248D9C -_0223AB10: .word 0x02248D78 - thumb_func_end ov62_0223AA90 - - thumb_func_start ov62_0223AB14 -ov62_0223AB14: ; 0x0223AB14 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r1, [r0, r1] - mov r0, #0x8d - lsl r0, r0, #2 - ldr r5, _0223ABB4 ; =0x02248DC4 - mov r6, #1 - mov r7, #0 - add r4, r1, r0 -_0223AB2C: - add r0, r4, #0 - bl sub_0201A7A0 - ldrb r0, [r5, #1] - add r1, r4, #0 - mov r2, #6 - str r0, [sp] - ldrb r0, [r5, #2] - str r0, [sp, #4] - ldrb r0, [r5, #3] - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldrb r3, [r5] - ldr r0, [r0, #0x24] - bl sub_0201A7E8 - ldr r0, [sp, #0x14] - add r1, r7, #0 - ldr r0, [r0, #0x48] - add r1, #0x3c - bl sub_0200B1EC - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r4, #0 - bl ov62_0223429C - str r0, [sp, #0x1c] - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223ABB8 ; =0x000F0D00 - ldr r2, [sp, #0x18] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r3, [sp, #0x1c] - add r0, r4, #0 - mov r1, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x18] - bl sub_020237BC - ldrb r1, [r5, #2] - ldrb r0, [r5, #3] - add r7, r7, #1 - add r4, #0x10 - mul r0, r1 - add r6, r6, r0 - add r5, r5, #4 - cmp r7, #6 - blo _0223AB2C - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223ABB4: .word 0x02248DC4 -_0223ABB8: .word 0x000F0D00 - thumb_func_end ov62_0223AB14 - - thumb_func_start ov62_0223ABBC -ov62_0223ABBC: ; 0x0223ABBC - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x8d - lsl r0, r0, #2 - mov r4, #0 - add r5, r1, r0 -_0223ABCC: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #6 - blo _0223ABCC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223ABBC - - thumb_func_start ov62_0223ABE4 -ov62_0223ABE4: ; 0x0223ABE4 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x6d - lsl r0, r0, #2 - mov r4, #0 - add r5, r1, r0 -_0223ABF4: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #3 - blt _0223ABF4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223ABE4 - - thumb_func_start ov62_0223AC0C -ov62_0223AC0C: ; 0x0223AC0C - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r5, [r0, r2] - mov r6, #0x75 - ldr r0, [r0, #0x48] - lsl r6, r6, #2 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, r6 - mov r1, #0xcc - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223AC54 ; =0x000F0D00 - add r2, r4, #0 - str r0, [sp, #8] - add r0, r5, r6 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, r6 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223AC54: .word 0x000F0D00 - thumb_func_end ov62_0223AC0C - - thumb_func_start ov62_0223AC58 -ov62_0223AC58: ; 0x0223AC58 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r1, #0xe - lsl r1, r1, #6 - ldr r1, [r4, r1] - ldr r0, [r5, #0x48] - add r1, #0x1c - bl sub_0200B1EC - str r0, [sp, #0x10] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r7, r0, #0 - mov r0, #0x66 - bl ov62_02231690 - ldr r1, _0223AD18 ; =0x000004D4 - str r0, [sp, #0x14] - ldr r1, [r5, r1] - add r0, r6, #0 - lsl r1, r1, #2 - add r2, r4, r1 - mov r1, #0xe3 - lsl r1, r1, #2 - ldr r1, [r2, r1] - bl sub_02023D28 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_022349A8 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0 - ldr r0, [sp, #0x14] - add r2, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x10] - add r1, r7, #0 - bl sub_0200C388 - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0xcc - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223AD1C ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r4, r0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A9A4 - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_0200B3F0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223AD18: .word 0x000004D4 -_0223AD1C: .word 0x000F0D00 - thumb_func_end ov62_0223AC58 - - thumb_func_start ov62_0223AD20 -ov62_0223AD20: ; 0x0223AD20 - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r5, [r0, r1] - mov r6, #0x71 - mov r0, #0xff - mov r1, #0x66 - lsl r6, r6, #2 - bl sub_02023790 - add r1, r5, #4 - add r4, r0, #0 - bl sub_02023D28 - add r0, r5, r6 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, r6 - add r1, r4, #0 - bl ov62_0223429C - add r3, r0, #0 - mov r0, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223AD78 ; =0x000F0100 - mov r1, #0 - str r0, [sp, #8] - add r0, r5, r6 - add r2, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, r6 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223AD78: .word 0x000F0100 - thumb_func_end ov62_0223AD20 - - thumb_func_start ov62_0223AD7C -ov62_0223AD7C: ; 0x0223AD7C - push {r4, r5, r6, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x6d - lsl r0, r0, #2 - ldr r5, _0223ADAC ; =0x02248D78 - mov r6, #0 - add r4, r1, r0 -_0223AD8E: - ldr r1, [r5, #0] - add r0, r4, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201A9A4 - add r6, r6, #1 - add r4, #0x10 - add r5, r5, #4 - cmp r6, #2 - blt _0223AD8E - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223ADAC: .word 0x02248D78 - thumb_func_end ov62_0223AD7C - - thumb_func_start ov62_0223ADB0 -ov62_0223ADB0: ; 0x0223ADB0 - and r0, r1 - cmp r1, r0 - bne _0223ADBA - mov r0, #1 - bx lr -_0223ADBA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov62_0223ADB0 - - thumb_func_start ov62_0223ADC0 -ov62_0223ADC0: ; 0x0223ADC0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x14 - add r5, r1, #0 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r7, #0x6d - lsl r7, r7, #2 - add r0, r4, r7 - mov r1, #0 - bl sub_0201ADA4 - lsl r0, r5, #1 - add r0, r4, r0 - ldrh r6, [r0, #0x2c] - cmp r6, #0 - bne _0223ADF0 - add r0, r4, r7 - bl sub_0201A9A4 - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} -_0223ADF0: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r2, r7, #0 - sub r2, #0x5c - add r5, r0, #0 - ldr r0, [r4, r2] - add r2, #0x58 - ldr r2, [r4, r2] - mov r1, #1 - lsl r1, r2 - bl ov62_0223ADB0 - cmp r0, #1 - bne _0223AE14 - add r6, r7, #0 - add r6, #0x3a -_0223AE14: - add r0, r6, #0 - mov r1, #0x66 - add r2, sp, #0x10 - bl sub_0200B274 - add r0, r5, #0 - add r1, sp, #0x10 - bl sub_02023D28 - add r0, r4, r7 - add r1, r5, #0 - bl ov62_0223429C - add r3, r0, #0 - mov r0, #6 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223AE5C ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - add r0, r4, r7 - add r2, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, r7 - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223AE5C: .word 0x000F0D00 - thumb_func_end ov62_0223ADC0 - - thumb_func_start ov62_0223AE60 -ov62_0223AE60: ; 0x0223AE60 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r4, [r0, #0x28] - str r1, [sp, #0x24] - ldr r1, [r0, #0x18] - str r1, [sp, #0x20] - ldr r1, [r0, #0x1c] - str r1, [sp, #0x1c] - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, _0223AFBC ; =0x000186A0 - ldr r2, [sp, #0x20] - str r0, [sp, #0x14] - ldr r3, [sp, #0x1c] - add r0, r4, #0 - mov r1, #2 - bl sub_0200CD7C - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0223AFBC ; =0x000186A0 - ldr r1, [sp, #0x1c] - str r0, [sp, #4] - ldr r0, [sp, #0x20] - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0223AFBC ; =0x000186A0 - ldr r1, [sp, #0x1c] - str r0, [sp, #4] - ldr r0, [sp, #0x20] - mov r2, #0x13 - bl sub_0200CE3C - ldr r7, [sp, #0x24] - mov r4, #0 - add r5, r7, #0 -_0223AED2: - ldr r0, [sp, #0x24] - ldrh r6, [r7, #0x2c] - add r1, r0, r4 - mov r0, #0x57 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - ldr r1, [sp, #0x24] - str r0, [sp, #0x18] - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - lsl r1, r4 - bl ov62_0223ADB0 - str r0, [sp, #0x28] - cmp r6, #0 - beq _0223AFAE - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x18] - add r0, r6, #0 - bl sub_02079D8C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0223AFBC ; =0x000186A0 - ldr r1, [sp, #0x1c] - add r0, r4, r0 - str r0, [sp, #8] - ldr r0, [sp, #0x20] - mov r2, #0x13 - bl sub_0200D888 - add r0, r4, #0 - mov r1, #6 - bl sub_020E1F6C - add r2, r1, #0 - mov r0, #0x18 - mul r2, r0 - add r2, #0x6e - add r0, sp, #0x2c - strh r2, [r0] - add r0, r4, #0 - mov r1, #6 - bl sub_020E1F6C - mov r1, #0x16 - mul r1, r0 - add r1, #0x30 - add r0, sp, #0x2c - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - strh r1, [r0, #6] - add r0, r1, #0 - str r0, [sp, #0x34] - str r0, [sp, #0x38] - mov r0, #1 - str r0, [sp, #0x3c] - add r0, r1, #0 - str r0, [sp, #0x58] - str r0, [sp, #0x5c] - ldr r0, _0223AFBC ; =0x000186A0 - add r2, sp, #0x2c - add r0, r4, r0 - str r0, [sp, #0x40] - ldr r0, _0223AFBC ; =0x000186A0 - str r0, [sp, #0x44] - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - sub r0, r1, #1 - str r0, [sp, #0x50] - sub r0, r1, #1 - str r0, [sp, #0x54] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x1c] - bl sub_0200CE6C - mov r1, #0xad - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x28] - add r0, r6, #0 - bl sub_02079EDC - add r1, r0, #0 - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r1, #4 - bl sub_0200D430 - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0200D364 - mov r0, #0xad - lsl r0, r0, #2 - mov r1, #0x1e - ldr r0, [r5, r0] - sub r1, r1, r4 - bl sub_0200D474 -_0223AFAE: - add r4, r4, #1 - add r7, r7, #2 - add r5, r5, #4 - cmp r4, #0x1e - blt _0223AED2 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223AFBC: .word 0x000186A0 - thumb_func_end ov62_0223AE60 - - thumb_func_start ov62_0223AFC0 -ov62_0223AFC0: ; 0x0223AFC0 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r6, #0 - add r5, r4, #0 -_0223AFCE: - ldrh r0, [r4, #0x2c] - cmp r0, #0 - beq _0223AFE0 - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_0200D3F4 -_0223AFE0: - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, #4 - cmp r6, #0x1e - blt _0223AFCE - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_0223AFC0 - - thumb_func_start ov62_0223AFEC -ov62_0223AFEC: ; 0x0223AFEC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r7, r0] - ldr r0, [r7, #0x1c] - ldr r1, _0223B04C ; =0x000186A0 - bl sub_0200D080 - ldr r0, [r7, #0x1c] - ldr r1, _0223B04C ; =0x000186A0 - bl sub_0200D090 - ldr r0, [r7, #0x1c] - ldr r1, _0223B04C ; =0x000186A0 - bl sub_0200D0A0 - mov r6, #0 - add r5, r4, #0 -_0223B012: - ldrh r0, [r4, #0x2c] - cmp r0, #0 - beq _0223B03E - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223B03E - ldr r1, _0223B04C ; =0x000186A0 - ldr r0, [r7, #0x1c] - add r1, r6, r1 - bl sub_0200D070 - mov r0, #0xad - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D0F4 - mov r0, #0xad - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_0223B03E: - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, #4 - cmp r6, #0x1e - blt _0223B012 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223B04C: .word 0x000186A0 - thumb_func_end ov62_0223AFEC - - thumb_func_start ov62_0223B050 -ov62_0223B050: ; 0x0223B050 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x10] - ldr r4, [r0, r1] - mov r0, #0x1b - lsl r0, r0, #4 - ldr r2, [r4, r0] - lsl r1, r2, #2 - add r1, r4, r1 - add r3, r1, #0 - add r3, #0xe0 - ldr r3, [r3, #0] - add r5, r4, r2 - str r3, [sp, #0x14] - add r3, r0, #0 - sub r3, #0x54 - ldrb r7, [r5, r3] - lsl r3, r2, #1 - add r3, r4, r3 - ldrh r5, [r3, #0x2c] - ldr r6, [r1, #0x68] - cmp r5, #0 - bne _0223B08E - mov r0, #0xcb - mov r1, #0 - lsl r0, r0, #2 - add sp, #0x34 - str r1, [r4, r0] - pop {r4, r5, r6, r7, pc} -_0223B08E: - sub r0, #0x58 - mov r1, #1 - ldr r0, [r4, r0] - lsl r1, r2 - bl ov62_0223ADB0 - cmp r0, #1 - bne _0223B0AC - ldr r0, _0223B11C ; =0x000001EA - cmp r5, r0 - bne _0223B0A8 - mov r7, #1 - b _0223B0AA -_0223B0A8: - mov r7, #0 -_0223B0AA: - ldr r5, _0223B120 ; =0x000001EE -_0223B0AC: - add r0, r5, #0 - mov r1, #0x66 - bl sub_02075894 - str r0, [sp, #0x18] - add r0, r5, #0 - add r1, r6, #0 - bl sub_02075DAC - str r0, [sp, #0x1c] - ldr r0, [sp, #0x14] - add r1, r6, #0 - bl sub_02075E38 - lsl r3, r7, #0x18 - str r0, [sp, #0x20] - ldr r1, [sp, #0x1c] - add r0, r5, #0 - mov r2, #2 - lsr r3, r3, #0x18 - str r6, [sp] - bl sub_02076648 - ldr r0, [sp, #0x20] - ldr r2, [sp, #0x1c] - str r0, [sp] - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - add r0, sp, #0x24 - add r1, r5, #0 - mov r3, #2 - str r6, [sp, #8] - bl sub_02075FB4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r1, sp, #0x24 - ldr r0, [r0, #0x64] - mov r2, #0x2a - mov r3, #0x5b - bl sub_02007C34 - mov r1, #0xcb - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [sp, #0x18] - bl sub_020759B8 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0223B11C: .word 0x000001EA -_0223B120: .word 0x000001EE - thumb_func_end ov62_0223B050 - - thumb_func_start ov62_0223B124 -ov62_0223B124: ; 0x0223B124 - push {r3, lr} - add r2, r1, #0 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223B13E - mov r1, #6 - bl sub_02007DEC -_0223B13E: - pop {r3, pc} - thumb_func_end ov62_0223B124 - - thumb_func_start ov62_0223B140 -ov62_0223B140: ; 0x0223B140 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223B156 - bl sub_02007DC8 -_0223B156: - pop {r3, pc} - thumb_func_end ov62_0223B140 - - thumb_func_start ov62_0223B158 -ov62_0223B158: ; 0x0223B158 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - sub r0, #0x30 - ldr r0, [r5, r0] - bl sub_02024420 - ldr r1, _0223B228 ; =0x0000017A - ldrb r2, [r4, r1] - cmp r2, #0x10 - blo _0223B17C - cmp r2, #0x18 - bhs _0223B17C - mov r2, #0 - strb r2, [r4, r1] -_0223B17C: - ldr r1, _0223B228 ; =0x0000017A - ldrb r1, [r4, r1] - cmp r1, #0x18 - blo _0223B18E - cmp r1, #0x20 - bhs _0223B18E - sub r1, #0x18 - bl sub_02079CFC -_0223B18E: - ldr r0, _0223B228 ; =0x0000017A - ldrb r1, [r4, r0] - cmp r1, #0x20 - blo _0223B19A - mov r1, #0 - strb r1, [r4, r0] -_0223B19A: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r1, _0223B228 ; =0x0000017A - ldr r0, [r5, #0x14] - ldrb r2, [r4, r1] - mov r3, #3 - lsl r1, r2, #1 - add r1, r2, r1 - ldr r2, [r5, #0x24] - add r1, #0x8a - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r1, _0223B228 ; =0x0000017A - ldr r0, [r5, #0x14] - ldrb r2, [r4, r1] - mov r3, #3 - lsl r1, r2, #1 - add r1, r2, r1 - ldr r2, [r5, #0x24] - add r1, #0x8c - bl sub_0200710C - mov r0, #0 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0xc0 - mov r1, #0xa2 - str r0, [sp, #8] - add r2, r1, #0 - str r0, [sp, #0xc] - add r2, #0xd8 - ldrb r3, [r4, r2] - ldr r0, [r5, #0x28] - lsl r2, r3, #1 - add r2, r3, r2 - add r2, #0x8b - mov r3, #0x66 - bl sub_02002FEC - add r0, r5, #0 - bl ov62_0223B050 - add r0, r5, #0 - bl ov62_0223AE60 - mov r1, #0x1b - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov62_0223ADC0 - add r0, r5, #0 - bl ov62_0223AD20 - ldr r1, _0223B22C ; =0x0000010E - add r0, r5, #0 - bl ov62_0223AC0C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223B228: .word 0x0000017A -_0223B22C: .word 0x0000010E - thumb_func_end ov62_0223B158 - - thumb_func_start ov62_0223B230 -ov62_0223B230: ; 0x0223B230 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - sub r0, #0x30 - ldr r0, [r5, r0] - bl sub_02024420 - ldr r1, _0223B2E4 ; =0x0000017A - ldrb r2, [r4, r1] - cmp r2, #0x10 - blo _0223B254 - cmp r2, #0x18 - bhs _0223B254 - mov r2, #0 - strb r2, [r4, r1] -_0223B254: - ldr r1, _0223B2E4 ; =0x0000017A - ldrb r1, [r4, r1] - cmp r1, #0x18 - blo _0223B270 - cmp r1, #0x20 - bhs _0223B270 - sub r1, #0x18 - bl sub_02079CFC - cmp r0, #0 - bne _0223B270 - ldr r0, _0223B2E4 ; =0x0000017A - mov r1, #0 - strb r1, [r4, r0] -_0223B270: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r1, _0223B2E4 ; =0x0000017A - ldr r0, [r5, #0x14] - ldrb r2, [r4, r1] - mov r3, #3 - lsl r1, r2, #1 - add r1, r2, r1 - ldr r2, [r5, #0x24] - add r1, #0x8a - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r1, _0223B2E4 ; =0x0000017A - ldr r0, [r5, #0x14] - ldrb r2, [r4, r1] - mov r3, #3 - lsl r1, r2, #1 - add r1, r2, r1 - ldr r2, [r5, #0x24] - add r1, #0x8c - bl sub_0200710C - mov r0, #0 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0xc0 - mov r1, #0xa2 - str r0, [sp, #8] - add r2, r1, #0 - str r0, [sp, #0xc] - add r2, #0xd8 - ldrb r3, [r4, r2] - ldr r0, [r5, #0x28] - lsl r2, r3, #1 - add r2, r3, r2 - add r2, #0x8b - mov r3, #0x66 - bl sub_02002FEC - add r0, r5, #0 - bl ov62_0223B050 - add r0, r5, #0 - bl ov62_0223AE60 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223B2E4: .word 0x0000017A - thumb_func_end ov62_0223B230 - - thumb_func_start ov62_0223B2E8 -ov62_0223B2E8: ; 0x0223B2E8 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223B304 - cmp r1, #1 - beq _0223B37E - cmp r1, #2 - beq _0223B3C2 - b _0223B400 -_0223B304: - mov r1, #2 - bl ov62_022302F0 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223AA90 - add r0, r5, #0 - bl ov62_0223B158 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223B124 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223AFC0 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x4d - mov r3, #7 - bl sub_0200710C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223B400 -_0223B37E: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - mov r2, #0 - add r1, r4, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223B400 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223B124 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223AFC0 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _0223B408 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223B400 -_0223B3C2: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223B3E4 - mov r0, #0x33 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, #0x14 - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223B3E4: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223B400: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223B408: .word 0x04000050 - thumb_func_end ov62_0223B2E8 - - thumb_func_start ov62_0223B40C -ov62_0223B40C: ; 0x0223B40C - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0xd1 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223B40C - - thumb_func_start ov62_0223B424 -ov62_0223B424: ; 0x0223B424 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r7, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223B43A - cmp r1, #1 - beq _0223B474 - b _0223B4CA -_0223B43A: - bl ov62_0223AFEC - add r0, r5, #0 - bl ov62_0223B140 - add r0, r5, #0 - bl ov62_0223ABE4 - add r0, r5, #0 - bl ov62_0223A110 - ldr r0, _0223B560 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B8B0 - ldr r0, _0223B560 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B9E0 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223B55C -_0223B474: - bl ov62_02233790 - cmp r0, #0 - beq _0223B55C - mov r6, #0 - add r4, r7, #0 -_0223B480: - mov r0, #0x33 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024034 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #5 - blt _0223B480 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r7, r0 - bl ov62_02231688 - add r0, r5, #0 - bl ov62_0223146C - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223B55C -_0223B4CA: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r7, r0 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223B524 - add r0, r5, #0 - bl ov62_022318E8 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r7, r0 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - mov r0, #0xe1 - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_02030A98 - add r0, r7, #0 - bl sub_020181C4 - b _0223B55C -_0223B524: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r7, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r7, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223B55C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B560: .word 0x000006F4 - thumb_func_end ov62_0223B424 - - thumb_func_start ov62_0223B564 -ov62_0223B564: ; 0x0223B564 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223B580 - cmp r1, #1 - beq _0223B60A - cmp r1, #2 - beq _0223B646 - b _0223B684 -_0223B580: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #2 - bl ov62_022302F0 - add r0, r5, #0 - bl ov62_0223AA90 - ldr r1, _0223B68C ; =0x00000113 - add r0, r5, #0 - bl ov62_0223AC0C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x4f - mov r3, #7 - bl sub_0200710C - add r0, r5, #0 - bl ov62_0223AB14 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223A4C8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223B684 -_0223B60A: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - mov r2, #0 - add r1, r4, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223B684 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, _0223B690 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223B684 -_0223B646: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223B668 - mov r0, #0xce - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r0, #0xc - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223B668: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223B684: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223B68C: .word 0x00000113 -_0223B690: .word 0x04000050 - thumb_func_end ov62_0223B564 - - thumb_func_start ov62_0223B694 -ov62_0223B694: ; 0x0223B694 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0xce - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223B694 - - thumb_func_start ov62_0223B6AC -ov62_0223B6AC: ; 0x0223B6AC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r0, [r0, r1] - ldr r1, _0223B75C ; =0x02248D50 - ldr r5, _0223B760 ; =0x02248D5C - ldr r2, [r1, #0x14] - ldr r1, [r1, #0x18] - mov r7, #1 - str r1, [sp, #0x24] - mov r1, #0 - str r1, [sp, #0x18] - mov r1, #0x8d - lsl r1, r1, #2 - add r6, sp, #0x20 - str r2, [sp, #0x20] - add r4, r0, r1 -_0223B6D2: - add r0, r4, #0 - bl sub_0201A7A0 - ldrb r0, [r5, #1] - add r1, r4, #0 - mov r2, #6 - str r0, [sp] - ldrb r0, [r5, #2] - str r0, [sp, #4] - ldrb r0, [r5, #3] - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldrb r3, [r5] - ldr r0, [r0, #0x24] - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - ldr r1, [r6, #0] - ldr r0, [r0, #0x48] - bl sub_0200B1EC - str r0, [sp, #0x1c] - ldr r1, [sp, #0x1c] - add r0, r4, #0 - bl ov62_0223429C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223B764 ; =0x000F0D00 - ldr r2, [sp, #0x1c] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - ldrb r1, [r5, #2] - ldrb r0, [r5, #3] - mul r0, r1 - add r7, r7, r0 - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x18] - add r4, #0x10 - add r0, r0, #1 - add r5, r5, #4 - add r6, r6, #4 - str r0, [sp, #0x18] - cmp r0, #2 - blt _0223B6D2 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B75C: .word 0x02248D50 -_0223B760: .word 0x02248D5C -_0223B764: .word 0x000F0D00 - thumb_func_end ov62_0223B6AC - - thumb_func_start ov62_0223B768 -ov62_0223B768: ; 0x0223B768 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - mov r6, #0x8d - add r7, r1, #0 - ldr r4, [r5, r0] - lsl r6, r6, #2 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - add r1, r7, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, r6 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223B7BC ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B7BC: .word 0x000F0D00 - thumb_func_end ov62_0223B768 - - thumb_func_start ov62_0223B7C0 -ov62_0223B7C0: ; 0x0223B7C0 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - mov r6, #0x8d - ldr r4, [r5, r0] - lsl r6, r6, #2 - add r0, r4, r6 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r3, #0xc - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x22 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #0x40 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223B83C ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, r6 - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223B83C: .word 0x000F0D00 - thumb_func_end ov62_0223B7C0 - - thumb_func_start ov62_0223B840 -ov62_0223B840: ; 0x0223B840 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x8d - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - mov r0, #0x8d - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_0223B840 - - thumb_func_start ov62_0223B860 -ov62_0223B860: ; 0x0223B860 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x8d - lsl r0, r0, #2 - mov r4, #0 - add r5, r1, r0 -_0223B870: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #2 - blt _0223B870 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223B860 - - thumb_func_start ov62_0223B888 -ov62_0223B888: ; 0x0223B888 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r0, [r0, r1] - mov r1, #0x6d - str r0, [sp, #0x24] - mov r0, #1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - lsl r1, r1, #2 - ldr r5, _0223B94C ; =0x02248D50 - mov r7, #0 - add r4, r0, r1 -_0223B8A6: - add r0, r4, #0 - bl sub_0201A7A0 - ldrb r0, [r5, #1] - add r1, r4, #0 - mov r2, #2 - str r0, [sp] - ldrb r0, [r5, #2] - str r0, [sp, #4] - ldrb r0, [r5, #3] - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldrb r3, [r5] - ldr r0, [r0, #0x24] - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - cmp r7, #0 - bne _0223B902 - mov r1, #0xe - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x24] - lsl r1, r1, #6 - ldr r2, [r2, r1] - ldr r1, _0223B950 ; =0x00000136 - ldr r0, [r0, #0x48] - add r1, r2, r1 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r4, #0 - add r1, r6, #0 - bl ov62_0223429C - str r0, [sp, #0x1c] - mov r0, #0 - str r0, [sp, #0x18] -_0223B902: - cmp r6, #0 - beq _0223B928 - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x1c] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223B954 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r6, #0 - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC -_0223B928: - add r0, r4, #0 - bl sub_0201A9A4 - ldrb r1, [r5, #2] - ldrb r0, [r5, #3] - add r7, r7, #1 - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp, #0x20] - add r4, #0x10 - add r0, r0, r2 - add r5, r5, #4 - str r0, [sp, #0x20] - cmp r7, #1 - blo _0223B8A6 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223B94C: .word 0x02248D50 -_0223B950: .word 0x00000136 -_0223B954: .word 0x000F0D00 - thumb_func_end ov62_0223B888 - - thumb_func_start ov62_0223B958 -ov62_0223B958: ; 0x0223B958 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x6d - lsl r0, r0, #2 - mov r4, #0 - add r5, r1, r0 -_0223B968: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #1 - blo _0223B968 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223B958 - - thumb_func_start ov62_0223B980 -ov62_0223B980: ; 0x0223B980 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _0223B99A - add sp, #0x14 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_0223B99A: - ldr r0, [r4, #8] - cmp r0, #8 - bls _0223B9A2 - b _0223BD2C -_0223B9A2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B9AE: ; jump table - .short _0223B9C0 - _0223B9AE - 2 ; case 0 - .short _0223BA06 - _0223B9AE - 2 ; case 1 - .short _0223BA94 - _0223B9AE - 2 ; case 2 - .short _0223BAD4 - _0223B9AE - 2 ; case 3 - .short _0223BAF2 - _0223B9AE - 2 ; case 4 - .short _0223BB9A - _0223B9AE - 2 ; case 5 - .short _0223BBD8 - _0223B9AE - 2 ; case 6 - .short _0223BC58 - _0223B9AE - 2 ; case 7 - .short _0223BCA0 - _0223B9AE - 2 ; case 8 -_0223B9C0: - ldr r0, _0223BD10 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - add r0, r4, #0 - bl ov62_0223ABE4 - add r0, r4, #0 - bl ov62_0223ABBC - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - bl ov62_02231560 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223BA06: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223BA76 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - mov r1, #3 - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - add r3, r1, #0 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x4e - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223BA76: - ldr r0, [r4, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223BE5E -_0223BA94: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r1, _0223BD14 ; =0x00000121 - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, _0223BD18 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223BE5E -_0223BAD4: - add r0, r4, #0 - bl ov62_0224112C - mov r1, #0xe - lsl r1, r1, #6 - ldr r1, [r5, r1] - bl ov61_0222B290 - cmp r0, #1 - beq _0223BAEA - b _0223BE5E -_0223BAEA: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223BE5E -_0223BAF2: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #0x10 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _0223BD18 ; =0x00000565 - bne _0223BB86 - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #0x10] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #3 - bl ov62_022348B8 - mov r0, #0xe2 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r0, _0223BD1C ; =0x00002F64 - str r1, [r5, r0] - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223AA90 - ldr r0, _0223BD10 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B8B0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #7 - str r0, [r4, #8] - b _0223BE5E -_0223BB86: - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223BD20 ; =0x0000055F - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223BE5E -_0223BB9A: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #0xe2 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223BBD2 - ldr r0, [r4, #8] - ldr r1, _0223BD24 ; =0x00000126 - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0xc] - add r0, r4, #0 - bl ov62_02231AAC - b _0223BE5E -_0223BBD2: - mov r0, #0xff - str r0, [r4, #8] - b _0223BE5E -_0223BBD8: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0x3c - bge _0223BBEA - bl sub_02022798 - cmp r0, #1 - bne _0223BC6E -_0223BBEA: - mov r0, #0 - str r0, [r4, #0xc] - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, _0223BD1C ; =0x00002F64 - mov r1, #0 - str r1, [r5, r0] - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223AA90 - ldr r0, _0223BD10 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B8B0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223BE5E -_0223BC58: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - bne _0223BC70 -_0223BC6E: - b _0223BE5E -_0223BC70: - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x4f - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223BE5E -_0223BCA0: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223BCF0 - add r0, r4, #0 - mov r1, #2 - bl ov62_022302F0 - ldr r1, _0223BD28 ; =0x00000113 - add r0, r4, #0 - bl ov62_0223AC0C - add r0, r4, #0 - bl ov62_0223AB14 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223BCF0: - ldr r0, [r4, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223BE5E - nop -_0223BD10: .word 0x000006F4 -_0223BD14: .word 0x00000121 -_0223BD18: .word 0x00000565 -_0223BD1C: .word 0x00002F64 -_0223BD20: .word 0x0000055F -_0223BD24: .word 0x00000126 -_0223BD28: .word 0x00000113 -_0223BD2C: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_02231664 - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - mov r2, #0 - add r1, r5, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223BE26 - add r0, r4, #0 - bl ov62_0223B888 - add r0, r4, #0 - bl ov62_0223BE7C - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223BE64 ; =0x00002EAC - ldr r3, _0223BE68 ; =0x02248DF8 - add r2, r5, r0 - mov r6, #5 -_0223BD6A: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _0223BD6A - ldr r0, [r3, #0] - mov r1, #0xe2 - str r0, [r2, #0] - lsl r1, r1, #2 - ldr r2, [r5, r1] - ldr r0, _0223BE6C ; =0x00002EB0 - add r1, #0xf4 - str r2, [r5, r0] - add r0, r4, r1 - add r1, r4, #0 - mov r2, #2 - bl ov62_022335BC - ldr r0, _0223BE70 ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - ldr r3, _0223BE64 ; =0x00002EAC - ldr r0, _0223BE70 ; =0x0000049C - add r2, r5, r3 - sub r3, #0xa0 - add r0, r4, r0 - add r1, r4, #0 - add r3, r5, r3 - bl ov62_02232AAC - ldr r1, _0223BE74 ; =0x0000047C - add r0, r4, r1 - add r1, #0x20 - add r1, r4, r1 - bl ov62_02233638 - ldr r0, _0223BE70 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - mov r2, #1 - bl ov62_0223331C - ldr r0, _0223BE70 ; =0x0000049C - mov r1, #0x38 - add r0, r4, r0 - mov r2, #0xb0 - bl ov62_02233434 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223B6AC - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r3, _0223BE78 ; =0x000004D8 - mov r1, #0x6f - ldr r6, [r4, r3] - mov r3, #0x18 - mul r3, r6 - lsl r1, r1, #4 - add r3, #0x44 - lsl r3, r3, #0x10 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x10 - asr r3, r3, #0x10 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0xc - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 -_0223BE26: - ldr r0, [r4, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #2 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223BE5E: - mov r0, #0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223BE64: .word 0x00002EAC -_0223BE68: .word 0x02248DF8 -_0223BE6C: .word 0x00002EB0 -_0223BE70: .word 0x0000049C -_0223BE74: .word 0x0000047C -_0223BE78: .word 0x000004D8 - thumb_func_end ov62_0223B980 - - thumb_func_start ov62_0223BE7C -ov62_0223BE7C: ; 0x0223BE7C - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp] - ldr r7, [r0, r1] - mov r0, #0xe2 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r6, #0 - cmp r0, #0 - ble _0223BEE6 - add r4, r7, #0 - add r5, r7, #0 -_0223BE96: - mov r0, #0x14 - mov r1, #0x66 - bl sub_02023790 - ldr r1, _0223BEE8 ; =0x00002E10 - str r0, [r4, r1] - add r0, r1, #0 - mov r1, #0xe3 - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r5, r1] - bl sub_02023D28 - ldr r1, _0223BEE8 ; =0x00002E10 - ldr r0, [sp] - ldr r1, [r4, r1] - bl ov62_022349A8 - mov r0, #0x1e - mov r1, #0x66 - bl sub_02023790 - ldr r1, _0223BEEC ; =0x00002E0C - str r0, [r4, r1] - add r0, r1, #0 - mov r1, #0xe3 - lsl r1, r1, #2 - ldr r1, [r5, r1] - ldr r0, [r4, r0] - add r1, #0x80 - bl sub_02023D28 - mov r0, #0xe2 - lsl r0, r0, #2 - ldr r0, [r7, r0] - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, r0 - blt _0223BE96 -_0223BEE6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BEE8: .word 0x00002E10 -_0223BEEC: .word 0x00002E0C - thumb_func_end ov62_0223BE7C - - thumb_func_start ov62_0223BEF0 -ov62_0223BEF0: ; 0x0223BEF0 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r6, [r0, r1] - mov r0, #0xe2 - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r4, #0 - cmp r0, #0 - ble _0223BF38 - add r5, r6, #0 - add r7, r4, #0 -_0223BF08: - ldr r0, _0223BF3C ; =0x00002E0C - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223BF18 - bl sub_020237BC - ldr r0, _0223BF3C ; =0x00002E0C - str r7, [r5, r0] -_0223BF18: - ldr r0, _0223BF40 ; =0x00002E10 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223BF2A - bl sub_020237BC - ldr r0, _0223BF40 ; =0x00002E10 - mov r1, #0 - str r1, [r5, r0] -_0223BF2A: - mov r0, #0xe2 - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r4, r4, #1 - add r5, #8 - cmp r4, r0 - blt _0223BF08 -_0223BF38: - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BF3C: .word 0x00002E0C -_0223BF40: .word 0x00002E10 - thumb_func_end ov62_0223BEF0 - - thumb_func_start ov62_0223BF44 -ov62_0223BF44: ; 0x0223BF44 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, _0223BFA0 ; =0x00002F64 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223BF92 - ldr r0, _0223BFA4 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233664 - ldr r1, _0223BFA8 ; =0x0000049C - add r0, r5, r1 - sub r1, #0x10 - ldrsh r1, [r5, r1] - bl ov62_022331C8 - ldr r0, _0223BFA8 ; =0x0000049C - ldr r2, _0223BFAC ; =0x00002E0C - add r0, r5, r0 - add r1, r5, #0 - add r2, r4, r2 - bl ov62_02232BB4 - ldr r2, _0223BFB0 ; =0x000004D8 - mov r0, #0x6f - ldr r3, [r5, r2] - mov r2, #0x18 - mul r2, r3 - lsl r0, r0, #4 - add r2, #0x44 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8EC -_0223BF92: - mov r0, #0xcf - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223BFA0: .word 0x00002F64 -_0223BFA4: .word 0x0000047C -_0223BFA8: .word 0x0000049C -_0223BFAC: .word 0x00002E0C -_0223BFB0: .word 0x000004D8 - thumb_func_end ov62_0223BF44 - - thumb_func_start ov62_0223BFB4 -ov62_0223BFB4: ; 0x0223BFB4 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223BFD2 - cmp r1, #1 - beq _0223C0A0 - cmp r1, #2 - bne _0223BFD0 - b _0223C0D6 -_0223BFD0: - b _0223C11A -_0223BFD2: - bl ov62_0223BEF0 - add r0, r5, #0 - bl ov62_0223B860 - ldr r0, _0223C120 ; =0x00002F64 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223C016 - add r0, r5, #0 - bl ov62_0223B958 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C124 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233600 - ldr r0, _0223C128 ; =0x0000049C - add r0, r5, r0 - bl ov62_022332FC - ldr r0, _0223C128 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022334FC - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - b _0223C036 -_0223C016: - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C12C ; =0x00002ED8 - add r1, r5, #0 - add r0, r4, r0 - bl ov62_02232394 - add r0, r5, #0 - bl ov62_02239D8C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 -_0223C036: - ldr r0, _0223C120 ; =0x00002F64 - mov r1, #0 - str r1, [r4, r0] - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223AA90 - add r0, r5, #0 - mov r1, #0xff - bl ov62_0223AC58 - ldr r0, _0223C130 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B8B0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223C0A0: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C11A - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x4f - mov r3, #7 - bl sub_0200710C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223C11A -_0223C0D6: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C11A - add r0, r5, #0 - mov r1, #2 - bl ov62_022302F0 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r1, _0223C134 ; =0x00000113 - add r0, r5, #0 - bl ov62_0223AC0C - add r0, r5, #0 - bl ov62_0223AB14 - add r0, r5, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223C11A: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C120: .word 0x00002F64 -_0223C124: .word 0x0000047C -_0223C128: .word 0x0000049C -_0223C12C: .word 0x00002ED8 -_0223C130: .word 0x000006F4 -_0223C134: .word 0x00000113 - thumb_func_end ov62_0223BFB4 - - thumb_func_start ov62_0223C138 -ov62_0223C138: ; 0x0223C138 - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _0223C14C - b _0223C306 -_0223C14C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223C158: ; jump table - .short _0223C160 - _0223C158 - 2 ; case 0 - .short _0223C1FC - _0223C158 - 2 ; case 1 - .short _0223C21A - _0223C158 - 2 ; case 2 - .short _0223C2B2 - _0223C158 - 2 ; case 3 -_0223C160: - bl ov62_0223B860 - ldr r0, _0223C3E8 ; =0x00002F64 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223C19E - add r0, r4, #0 - bl ov62_0223B958 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C3EC ; =0x0000047C - add r0, r4, r0 - bl ov62_02233600 - ldr r0, _0223C3F0 ; =0x0000049C - add r0, r4, r0 - bl ov62_022332FC - ldr r0, _0223C3F0 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022334FC - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - b _0223C1BE -_0223C19E: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C3F4 ; =0x00002ED8 - add r1, r4, #0 - add r0, r5, r0 - bl ov62_02232394 - add r0, r4, #0 - bl ov62_02239D8C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 -_0223C1BE: - ldr r0, _0223C3F8 ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B8B0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223C1FC: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - add r1, r5, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C2C8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223C3E0 -_0223C21A: - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C3FC ; =0x000004D4 - add r3, r5, #4 - ldr r0, [r4, r0] - mov r2, #0x33 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0xe3 - lsl r0, r0, #2 - ldr r6, [r1, r0] - add r6, #0x80 -_0223C234: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223C234 - ldr r0, [r6, #0] - str r0, [r3, #0] - add r0, r5, #0 - bl ov62_0223A138 - add r0, r4, #0 - mov r1, #2 - bl ov62_022302F0 - add r0, r4, #0 - bl ov62_0223AA90 - add r0, r4, #0 - bl ov62_0223B158 - add r0, r4, #0 - mov r1, #0xff - bl ov62_0223AC58 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223B124 - add r0, r4, #0 - mov r1, #0 - bl ov62_0223AFC0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x4b - mov r3, #7 - bl sub_0200710C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223C3E0 -_0223C2B2: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r5, r1 - add r1, r1, #4 - mov r2, #0 - add r1, r5, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - bne _0223C2CA -_0223C2C8: - b _0223C3E0 -_0223C2CA: - add r0, r4, #0 - mov r1, #0 - bl ov62_0223B124 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223AFC0 - add r0, r4, #0 - bl ov62_0223B7C0 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _0223C400 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223C3E0 -_0223C306: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223C3C4 - mov r0, #0x33 - lsl r0, r0, #4 - ldr r1, [r5, r0] - add r0, #0x14 - str r1, [r5, r0] - add r0, r5, #0 - bl ov62_0223A138 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #6 - bl sub_020E1F6C - ldr r0, _0223C404 ; =0x00002F68 - str r1, [r5, r0] - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #6 - bl sub_020E1F6C - ldr r3, _0223C408 ; =0x00002F6C - mov r1, #0x6f - str r0, [r5, r3] - sub r2, r3, #4 - ldr r6, [r5, r2] - mov r2, #0x18 - mul r2, r6 - ldr r6, [r5, r3] - mov r3, #0x16 - mul r3, r6 - lsl r1, r1, #4 - add r2, #0x6e - add r3, #0x34 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - ldr r1, [r4, r1] - add r0, r4, #0 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0xc - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r2, [r5, r0] - lsl r1, r2, #1 - add r1, r5, r1 - ldrh r1, [r1, #0x2c] - cmp r1, #0 - beq _0223C3BC - sub r0, #0x58 - mov r1, #1 - ldr r0, [r5, r0] - lsl r1, r2 - bl ov62_0223ADB0 - cmp r0, #1 - beq _0223C3BC - mov r1, #0x1b - lsl r1, r1, #4 - ldr r2, [r5, r1] - sub r1, #0x54 - lsl r0, r2, #1 - add r0, r5, r0 - add r2, r5, r2 - ldrh r0, [r0, #0x2c] - ldrb r1, [r2, r1] - bl sub_02005844 -_0223C3BC: - add r0, r4, #0 - mov r1, #0xa - bl ov62_0222FB60 -_0223C3C4: - ldr r0, [r4, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r5, r3] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223C3E0: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223C3E8: .word 0x00002F64 -_0223C3EC: .word 0x0000047C -_0223C3F0: .word 0x0000049C -_0223C3F4: .word 0x00002ED8 -_0223C3F8: .word 0x000006F4 -_0223C3FC: .word 0x000004D4 -_0223C400: .word 0x04000050 -_0223C404: .word 0x00002F68 -_0223C408: .word 0x00002F6C - thumb_func_end ov62_0223C138 - - thumb_func_start ov62_0223C40C -ov62_0223C40C: ; 0x0223C40C - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0xd - lsl r0, r0, #6 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223C40C - - thumb_func_start ov62_0223C424 -ov62_0223C424: ; 0x0223C424 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - beq _0223C440 - cmp r0, #1 - beq _0223C486 - cmp r0, #2 - beq _0223C492 - b _0223C50A -_0223C440: - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - bl ov62_02231560 - add r0, r5, #0 - bl ov62_0223B140 - add r0, r5, #0 - bl ov62_0223AFEC - add r0, r5, #0 - bl ov62_0223AD7C - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - add r0, r5, #0 - bl ov62_0223ABE4 - add r0, r5, #0 - bl ov62_0223B840 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223C486: - ldr r0, _0223C624 ; =0x00002F64 - mov r1, #0 - str r1, [r4, r0] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223C492: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - bne _0223C4AA - b _0223C61C -_0223C4AA: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - mov r1, #3 - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - add r3, r1, #0 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x4e - mov r3, #7 - bl sub_0200710C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223C61C -_0223C50A: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - mov r2, #0 - add r1, r4, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C61C - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0208B9E0 - add r0, r5, #0 - bl ov62_0223B888 - add r0, r5, #0 - bl ov62_0223B6AC - ldr r0, _0223C628 ; =0x0000047C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #2 - bl ov62_022335BC - ldr r3, _0223C62C ; =0x00002EAC - ldr r0, _0223C630 ; =0x0000049C - add r2, r4, r3 - sub r3, #0xa0 - add r0, r5, r0 - add r1, r5, #0 - add r3, r4, r3 - bl ov62_02232AAC - ldr r1, _0223C628 ; =0x0000047C - add r0, r5, r1 - add r1, #0x20 - add r1, r5, r1 - bl ov62_02233638 - ldr r0, _0223C630 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #1 - bl ov62_0223331C - ldr r0, _0223C630 ; =0x0000049C - mov r1, #0x38 - add r0, r5, r0 - mov r2, #0xb0 - bl ov62_02233434 - ldr r3, _0223C634 ; =0x000004D8 - mov r1, #0x6f - ldr r6, [r5, r3] - mov r3, #0x18 - mul r3, r6 - lsl r1, r1, #4 - add r3, #0x44 - lsl r3, r3, #0x10 - ldr r1, [r5, r1] - add r0, r5, #0 - mov r2, #0x10 - asr r3, r3, #0x10 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0xc - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _0223C624 ; =0x00002F64 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223C5FC - ldr r0, _0223C628 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233664 - ldr r1, _0223C630 ; =0x0000049C - add r0, r5, r1 - sub r1, #0x10 - ldrsh r1, [r5, r1] - bl ov62_022331C8 - ldr r0, _0223C630 ; =0x0000049C - ldr r2, _0223C638 ; =0x00002E0C - add r0, r5, r0 - add r1, r5, #0 - add r2, r4, r2 - bl ov62_02232BB4 - ldr r2, _0223C634 ; =0x000004D8 - mov r0, #0x6f - ldr r3, [r5, r2] - mov r2, #0x18 - mul r2, r3 - lsl r0, r0, #4 - add r2, #0x44 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8EC -_0223C5FC: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 -_0223C61C: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223C624: .word 0x00002F64 -_0223C628: .word 0x0000047C -_0223C62C: .word 0x00002EAC -_0223C630: .word 0x0000049C -_0223C634: .word 0x000004D8 -_0223C638: .word 0x00002E0C - thumb_func_end ov62_0223C424 - - thumb_func_start ov62_0223C63C -ov62_0223C63C: ; 0x0223C63C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - beq _0223C658 - cmp r0, #1 - beq _0223C6C2 - cmp r0, #2 - beq _0223C73E - b _0223C782 -_0223C658: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, _0223C788 ; =0x00002F64 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223C672 - add r0, r5, #0 - bl ov62_0223B958 -_0223C672: - ldr r0, _0223C78C ; =0x0000047C - add r0, r5, r0 - bl ov62_02233600 - ldr r0, _0223C790 ; =0x0000049C - add r0, r5, r0 - bl ov62_022332FC - ldr r0, _0223C790 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022334FC - ldr r0, _0223C788 ; =0x00002F64 - mov r1, #1 - str r1, [r4, r0] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - mov r2, #8 - mov r1, #0x69 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #8] - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - bl ov62_02231560 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223C6C2: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - mov r2, #1 - add r1, r4, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C782 - ldr r1, _0223C794 ; =0x000004D4 - add r0, r5, #0 - ldr r1, [r5, r1] - bl ov62_02239D60 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C798 ; =0x00002ED8 - add r1, r5, #0 - add r0, r4, r0 - bl ov62_02232378 - ldr r0, _0223C798 ; =0x00002ED8 - mov r1, #0 - add r0, r4, r0 - bl ov62_022323B8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223C782 -_0223C73E: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C782 - ldr r0, _0223C798 ; =0x00002ED8 - mov r1, #1 - add r0, r4, r0 - bl ov62_022323B8 - ldr r1, _0223C788 ; =0x00002F64 - add r0, r5, #0 - ldr r1, [r4, r1] - add r1, #0x79 - bl ov62_0223B768 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 -_0223C782: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C788: .word 0x00002F64 -_0223C78C: .word 0x0000047C -_0223C790: .word 0x0000049C -_0223C794: .word 0x000004D4 -_0223C798: .word 0x00002ED8 - thumb_func_end ov62_0223C63C - - thumb_func_start ov62_0223C79C -ov62_0223C79C: ; 0x0223C79C - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223C7B8 - cmp r1, #1 - beq _0223C7C6 - cmp r1, #2 - beq _0223C7EA - b _0223C84A -_0223C7B8: - ldr r0, _0223C92C ; =0x00002F64 - mov r1, #0 - str r1, [r4, r0] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223C924 -_0223C7C6: - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223C930 ; =0x00002ED8 - add r1, r5, #0 - add r0, r4, r0 - bl ov62_02232394 - add r0, r5, #0 - bl ov62_02239D8C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223C7EA: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - mov r2, #1 - add r1, r4, r1 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - bne _0223C802 - b _0223C924 -_0223C802: - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - mov r1, #3 - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - add r3, r1, #0 - bl sub_0200710C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223C924 -_0223C84A: - mov r1, #0x69 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #4 - add r1, r4, r1 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _0223C924 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r1, _0223C92C ; =0x00002F64 - add r0, r5, #0 - ldr r1, [r4, r1] - add r1, #0x79 - bl ov62_0223B768 - add r0, r5, #0 - bl ov62_0223B888 - ldr r0, _0223C934 ; =0x0000047C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #2 - bl ov62_022335BC - ldr r3, _0223C938 ; =0x00002EAC - ldr r0, _0223C93C ; =0x0000049C - add r2, r4, r3 - sub r3, #0xa0 - add r0, r5, r0 - add r1, r5, #0 - add r3, r4, r3 - bl ov62_02232AAC - ldr r1, _0223C934 ; =0x0000047C - add r0, r5, r1 - add r1, #0x20 - add r1, r5, r1 - bl ov62_02233638 - ldr r0, _0223C93C ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #1 - bl ov62_0223331C - ldr r0, _0223C93C ; =0x0000049C - mov r1, #0x38 - add r0, r5, r0 - mov r2, #0xb0 - bl ov62_02233434 - ldr r0, _0223C92C ; =0x00002F64 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223C900 - ldr r0, _0223C934 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233664 - ldr r1, _0223C93C ; =0x0000049C - add r0, r5, r1 - sub r1, #0x10 - ldrsh r1, [r5, r1] - bl ov62_022331C8 - ldr r0, _0223C93C ; =0x0000049C - ldr r2, _0223C940 ; =0x00002E0C - add r0, r5, r0 - add r1, r5, #0 - add r2, r4, r2 - bl ov62_02232BB4 - ldr r2, _0223C944 ; =0x000004D8 - mov r0, #0x6f - ldr r3, [r5, r2] - mov r2, #0x18 - mul r2, r3 - lsl r0, r0, #4 - add r2, #0x44 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8EC -_0223C900: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 -_0223C924: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223C92C: .word 0x00002F64 -_0223C930: .word 0x00002ED8 -_0223C934: .word 0x0000047C -_0223C938: .word 0x00002EAC -_0223C93C: .word 0x0000049C -_0223C940: .word 0x00002E0C -_0223C944: .word 0x000004D8 - thumb_func_end ov62_0223C79C - - thumb_func_start ov62_0223C948 -ov62_0223C948: ; 0x0223C948 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r7, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223C95E - cmp r1, #1 - beq _0223C9B4 - b _0223CA0A -_0223C95E: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223ABE4 - add r0, r5, #0 - bl ov62_0223A110 - ldr r0, _0223CAA0 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B8B0 - ldr r0, _0223CAA0 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0208B8B0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223CA9C -_0223C9B4: - bl ov62_02233790 - cmp r0, #0 - beq _0223CA9C - mov r6, #0 - add r4, r7, #0 -_0223C9C0: - mov r0, #0x33 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024034 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #5 - blt _0223C9C0 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r7, r0 - bl ov62_02231688 - add r0, r5, #0 - bl ov62_0223146C - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223CA9C -_0223CA0A: - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r7, r0 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223CA64 - add r0, r5, #0 - bl ov62_022318E8 - mov r0, #0x6b - lsl r0, r0, #2 - add r0, r7, r0 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - mov r0, #0xe1 - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_02030A98 - add r0, r7, #0 - bl sub_020181C4 - b _0223CA9C -_0223CA64: - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r7, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #1 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r3, #0x6b - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - lsl r3, r3, #2 - ldr r3, [r7, r3] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r1, #3 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223CA9C: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223CAA0: .word 0x000006F4 - thumb_func_end ov62_0223C948 - - thumb_func_start ov62_0223CAA4 -ov62_0223CAA4: ; 0x0223CAA4 - bx lr - ; .align 2, 0 - thumb_func_end ov62_0223CAA4 - - thumb_func_start ov62_0223CAA8 -ov62_0223CAA8: ; 0x0223CAA8 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r1, [r1, #0] - ldr r4, [r0, r2] - cmp r1, #1 - bne _0223CAC0 - mov r0, #0xe2 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} -_0223CAC0: - bl ov62_0224112C - mov r1, #0xe3 - lsl r1, r1, #2 - add r1, r4, r1 - mov r2, #0x14 - bl ov61_0222BD18 - mov r1, #0xe2 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #4 - add r1, #0x54 - ldr r2, _0223CAE8 ; =0x00002A30 - add r0, r4, r0 - add r1, r4, r1 - bl sub_020C4DB0 - pop {r4, pc} - nop -_0223CAE8: .word 0x00002A30 - thumb_func_end ov62_0223CAA8 - - thumb_func_start ov62_0223CAEC -ov62_0223CAEC: ; 0x0223CAEC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r4, #0x1c] - cmp r0, #0 - ldr r0, _0223CBC0 ; =0x00000B0C - bne _0223CB1A - ldr r3, _0223CBC4 ; =0x02248F00 - add r2, r4, r0 - mov r6, #5 -_0223CB06: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _0223CB06 - ldr r0, [r3, #0] - mov r1, #0 - str r0, [r2, #0] - ldr r0, _0223CBC8 ; =0x00000748 - str r1, [r4, r0] - b _0223CB46 -_0223CB1A: - ldr r3, _0223CBCC ; =0x02248F2C - add r2, r4, r0 - mov r6, #5 -_0223CB20: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _0223CB20 - ldr r0, [r3, #0] - ldr r1, _0223CBD0 ; =0x00000714 - str r0, [r2, #0] - ldr r3, [r4, r1] - mov r1, #0x72 - ldr r2, [r4, #0xc] - lsl r1, r1, #2 - mul r1, r2 - ldrb r1, [r3, r1] - ldr r0, [r5, #0x4c] - add r1, #0x5e - bl sub_0200B1EC - ldr r1, _0223CBC8 ; =0x00000748 - str r0, [r4, r1] -_0223CB46: - mov r1, #0xb1 - ldr r0, [r4, #0x20] - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r3, [r4, #0xc] - ldr r0, _0223CBD4 ; =0x0000074C - lsl r2, r3, #2 - add r2, r3, r2 - add r0, r4, r0 - lsl r2, r2, #6 - add r2, r0, r2 - sub r0, r1, #4 - str r2, [r4, r0] - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223CBD8 ; =0x0000049C - add r0, r5, r0 - bl ov62_02233310 - ldr r0, [r4, #0xc] - ldr r3, _0223CBC0 ; =0x00000B0C - str r0, [sp] - ldr r0, [r4, #0x14] - ldr r2, _0223CBC8 ; =0x00000748 - str r0, [sp, #4] - ldr r0, [r4, r2] - sub r2, r2, #4 - str r0, [sp, #8] - ldr r0, _0223CBD8 ; =0x0000049C - ldr r2, [r4, r2] - add r0, r5, r0 - add r1, r5, #0 - add r3, r4, r3 - bl ov62_02232778 - ldr r1, _0223CBDC ; =0x0000047C - add r0, r5, r1 - add r1, #0x20 - add r1, r5, r1 - bl ov62_02233638 - ldr r0, _0223CBD8 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #1 - bl ov62_0223331C - ldr r0, _0223CBD8 ; =0x0000049C - mov r1, #0x70 - add r0, r5, r0 - mov r2, #0xb8 - bl ov62_02233434 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223CBC0: .word 0x00000B0C -_0223CBC4: .word 0x02248F00 -_0223CBC8: .word 0x00000748 -_0223CBCC: .word 0x02248F2C -_0223CBD0: .word 0x00000714 -_0223CBD4: .word 0x0000074C -_0223CBD8: .word 0x0000049C -_0223CBDC: .word 0x0000047C - thumb_func_end ov62_0223CAEC - - thumb_func_start ov62_0223CBE0 -ov62_0223CBE0: ; 0x0223CBE0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - ldr r0, _0223CF00 ; =0x00000714 - add r1, r4, #0 - add r1, #0xe0 - str r1, [r4, r0] - add r1, r0, #0 - sub r1, #0xdc - add r1, r4, r1 - add r0, r0, #4 - str r1, [r4, r0] - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0223CC12 - cmp r0, #1 - bne _0223CC08 - b _0223CD0C -_0223CC08: - cmp r0, #2 - bne _0223CC0E - b _0223CDF8 -_0223CC0E: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_0223CC12: - mov r6, #0 - add r5, r6, #0 - str r6, [sp] -_0223CC18: - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0xc] - cmp r0, #0 - bne _0223CC70 - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #6 - add r0, r4, r0 - add r2, r5, r0 - ldr r1, _0223CF04 ; =0x00002710 - ldr r0, _0223CF08 ; =0x0000074C - str r1, [r2, r0] - sub r0, #0x34 - ldr r2, [r4, r0] - ldr r1, [r4, #0xc] - mov r0, #0x48 - mul r0, r1 - add r0, r2, r0 - add r0, r6, r0 - ldrb r0, [r0, #4] - mov r1, #4 - bl ov62_02232234 - ldr r2, [r4, #0xc] - lsl r1, r2, #2 - add r1, r2, r1 - lsl r1, r1, #6 - add r1, r4, r1 - add r2, r5, r1 - mov r1, #0x75 - lsl r1, r1, #4 - str r0, [r2, r1] - ldr r2, [r4, #0xc] - asr r0, r6, #0x1f - lsl r1, r2, #2 - add r1, r2, r1 - lsl r1, r1, #6 - add r1, r4, r1 - add r2, r5, r1 - ldr r1, _0223CF0C ; =0x00000754 - str r6, [r2, r1] - add r1, r1, #4 - str r0, [r2, r1] - b _0223CCFA -_0223CC70: - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #6 - add r0, r4, r0 - add r2, r5, r0 - ldr r1, _0223CF10 ; =0x00004E20 - ldr r0, _0223CF08 ; =0x0000074C - str r1, [r2, r0] - sub r0, #0x38 - ldr r2, [r4, r0] - mov r0, #0x72 - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - mul r0, r1 - add r0, r2, r0 - add r0, r6, r0 - ldrb r0, [r0, #4] - mov r1, #4 - bl ov62_02232234 - ldr r2, [r4, #0xc] - lsl r1, r2, #2 - add r1, r2, r1 - lsl r1, r1, #6 - add r1, r4, r1 - add r2, r5, r1 - mov r1, #0x75 - lsl r1, r1, #4 - str r0, [r2, r1] - sub r1, #0x3c - ldr r2, [r4, r1] - mov r1, #0x72 - ldr r0, [r4, #0xc] - lsl r1, r1, #2 - mul r1, r0 - add r2, r2, r1 - ldr r1, [sp] - add r1, r1, r2 - add r1, #0x14 - ldmia r1!, {r2, r3} - lsl r1, r0, #2 - add r0, r0, r1 - lsl r0, r0, #6 - add r0, r4, r0 - add r1, r5, r0 - ldr r0, _0223CF0C ; =0x00000754 - add r0, r1, r0 - stmia r0!, {r2, r3} - ldr r1, [r4, #0xc] - lsl r0, r1, #2 - add r0, r1, r0 - lsl r0, r0, #6 - add r0, r4, r0 - add r3, r0, r5 - ldr r0, _0223CF0C ; =0x00000754 - ldr r2, [r3, r0] - add r0, r0, #4 - ldr r1, [r3, r0] - ldr r7, _0223CF14 ; =0x8AC72304 - ldr r0, _0223CF18 ; =0x89E7FFFF - sub r0, r2, r0 - sbc r1, r7 - blo _0223CCFA - ldr r1, _0223CF18 ; =0x89E7FFFF - ldr r0, _0223CF0C ; =0x00000754 - str r1, [r3, r0] - ldr r1, _0223CF14 ; =0x8AC72304 - add r0, r0, #4 - str r1, [r3, r0] -_0223CCFA: - ldr r0, [sp] - add r6, r6, #1 - add r0, #8 - add r5, #0x10 - str r0, [sp] - cmp r6, #0x10 - blt _0223CC18 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_0223CD0C: - mov r1, #0 - add r0, r1, #0 - add r7, r1, #0 -_0223CD12: - ldr r2, [r4, #0x1c] - ldr r3, [r4, #0xc] - cmp r2, #0 - bne _0223CD62 - lsl r2, r3, #2 - add r2, r3, r2 - lsl r2, r2, #6 - add r2, r4, r2 - add r5, r0, r2 - ldr r3, _0223CF1C ; =0x00007530 - ldr r2, _0223CF08 ; =0x0000074C - str r3, [r5, r2] - sub r2, #0x34 - ldr r3, [r4, #0xc] - mov r5, #0x48 - ldr r2, [r4, r2] - mul r5, r3 - add r2, r2, r5 - lsl r5, r3, #2 - add r3, r3, r5 - add r2, r1, r2 - lsl r3, r3, #6 - add r3, r4, r3 - add r5, r0, r3 - mov r3, #0x75 - ldrb r2, [r2, #0x14] - lsl r3, r3, #4 - str r2, [r5, r3] - ldr r5, [r4, #0xc] - asr r3, r1, #0x1f - lsl r2, r5, #2 - add r2, r5, r2 - lsl r2, r2, #6 - add r2, r4, r2 - ldr r5, _0223CF0C ; =0x00000754 - add r2, r0, r2 - str r1, [r2, r5] - add r5, r5, #4 - str r3, [r2, r5] - b _0223CDEA -_0223CD62: - lsl r2, r3, #2 - add r2, r3, r2 - lsl r2, r2, #6 - add r2, r4, r2 - add r5, r0, r2 - ldr r3, _0223CF20 ; =0x00009C40 - ldr r2, _0223CF08 ; =0x0000074C - str r3, [r5, r2] - sub r2, #0x38 - mov r5, #0x72 - ldr r3, [r4, #0xc] - lsl r5, r5, #2 - ldr r2, [r4, r2] - mul r5, r3 - add r2, r2, r5 - lsl r5, r3, #2 - add r2, r1, r2 - add r3, r3, r5 - add r2, #0x94 - lsl r3, r3, #6 - add r3, r4, r3 - add r5, r0, r3 - mov r3, #0x75 - ldrb r2, [r2] - lsl r3, r3, #4 - str r2, [r5, r3] - add r2, r3, #0 - sub r2, #0x3c - mov r3, #0x72 - ldr r5, [r4, #0xc] - lsl r3, r3, #2 - ldr r2, [r4, r2] - mul r3, r5 - add r2, r2, r3 - add r6, r7, r2 - add r6, #0xa0 - ldmia r6!, {r2, r3} - lsl r6, r5, #2 - add r5, r5, r6 - lsl r5, r5, #6 - add r5, r4, r5 - add r6, r0, r5 - ldr r5, _0223CF0C ; =0x00000754 - add r5, r6, r5 - stmia r5!, {r2, r3} - ldr r3, [r4, #0xc] - lsl r2, r3, #2 - add r2, r3, r2 - lsl r2, r2, #6 - add r2, r4, r2 - add r5, r2, r0 - ldr r2, _0223CF0C ; =0x00000754 - ldr r3, [r5, r2] - add r2, r2, #4 - ldr r2, [r5, r2] - ldr r6, _0223CF14 ; =0x8AC72304 - str r6, [sp, #0xc] - ldr r6, _0223CF18 ; =0x89E7FFFF - sub r3, r3, r6 - ldr r3, [sp, #0xc] - sbc r2, r3 - blo _0223CDEA - ldr r3, _0223CF18 ; =0x89E7FFFF - ldr r2, _0223CF0C ; =0x00000754 - str r3, [r5, r2] - ldr r3, _0223CF14 ; =0x8AC72304 - add r2, r2, #4 - str r3, [r5, r2] -_0223CDEA: - add r1, r1, #1 - add r0, #0x10 - add r7, #8 - cmp r1, #0xc - blt _0223CD12 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_0223CDF8: - mov r7, #0 - add r0, r7, #0 - add r1, r7, #0 - str r7, [sp, #0x10] -_0223CE00: - ldr r2, [r4, #0x1c] - ldr r3, [r4, #0xc] - cmp r2, #0 - bne _0223CE50 - lsl r2, r3, #2 - add r2, r3, r2 - lsl r2, r2, #6 - add r2, r4, r2 - add r5, r0, r2 - ldr r3, _0223CF24 ; =0x0000C350 - ldr r2, _0223CF08 ; =0x0000074C - str r3, [r5, r2] - sub r2, #0x34 - ldr r3, [r4, #0xc] - mov r5, #0x48 - ldr r2, [r4, r2] - mul r5, r3 - add r2, r2, r5 - lsl r5, r3, #2 - add r3, r3, r5 - add r2, r1, r2 - lsl r3, r3, #6 - add r3, r4, r3 - add r5, r0, r3 - mov r3, #0x75 - ldrh r2, [r2, #0x20] - lsl r3, r3, #4 - str r2, [r5, r3] - ldr r5, [r4, #0xc] - asr r3, r7, #0x1f - lsl r2, r5, #2 - add r2, r5, r2 - lsl r2, r2, #6 - add r2, r4, r2 - ldr r5, _0223CF0C ; =0x00000754 - add r2, r0, r2 - str r7, [r2, r5] - add r5, r5, #4 - str r3, [r2, r5] - b _0223CEEA -_0223CE50: - lsl r2, r3, #2 - add r2, r3, r2 - lsl r2, r2, #6 - add r2, r4, r2 - add r5, r0, r2 - ldr r3, _0223CF28 ; =0x0000EA60 - ldr r2, _0223CF08 ; =0x0000074C - str r3, [r5, r2] - sub r2, #0x38 - mov r5, #0x72 - ldr r3, [r4, #0xc] - lsl r5, r5, #2 - ldr r2, [r4, r2] - mul r5, r3 - add r2, r2, r5 - add r5, r1, r2 - mov r2, #1 - lsl r2, r2, #8 - ldrh r2, [r5, r2] - lsl r5, r3, #2 - add r3, r3, r5 - lsl r3, r3, #6 - add r3, r4, r3 - add r5, r0, r3 - mov r3, #0x75 - lsl r3, r3, #4 - str r2, [r5, r3] - ldr r2, [r4, #0xc] - str r2, [sp, #4] - add r2, r3, #0 - sub r2, #0x3c - mov r3, #0x72 - ldr r5, [sp, #4] - lsl r3, r3, #2 - ldr r2, [r4, r2] - mul r3, r5 - add r3, r2, r3 - ldr r2, [sp, #0x10] - add r3, r2, r3 - mov r2, #0x4a - lsl r2, r2, #2 - add r5, r3, r2 - ldmia r5!, {r2, r3} - ldr r5, [sp, #4] - lsl r6, r5, #2 - add r5, r5, r6 - lsl r5, r5, #6 - add r5, r4, r5 - add r6, r0, r5 - ldr r5, _0223CF0C ; =0x00000754 - add r5, r6, r5 - stmia r5!, {r2, r3} - ldr r3, [r4, #0xc] - lsl r2, r3, #2 - add r2, r3, r2 - lsl r2, r2, #6 - add r2, r4, r2 - add r3, r2, r0 - ldr r2, _0223CF0C ; =0x00000754 - str r3, [sp, #8] - ldr r5, [r3, r2] - add r2, r2, #4 - ldr r3, [r3, r2] - ldr r2, _0223CF14 ; =0x8AC72304 - mov ip, r2 - ldr r2, _0223CF18 ; =0x89E7FFFF - sub r2, r5, r2 - mov r2, ip - sbc r3, r2 - blo _0223CEEA - ldr r5, _0223CF18 ; =0x89E7FFFF - ldr r3, [sp, #8] - ldr r2, _0223CF0C ; =0x00000754 - str r5, [r3, r2] - ldr r5, _0223CF14 ; =0x8AC72304 - add r2, r2, #4 - str r5, [r3, r2] -_0223CEEA: - ldr r2, [sp, #0x10] - add r7, r7, #1 - add r2, #8 - add r0, #0x10 - add r1, r1, #2 - str r2, [sp, #0x10] - cmp r7, #0x14 - blt _0223CE00 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223CF00: .word 0x00000714 -_0223CF04: .word 0x00002710 -_0223CF08: .word 0x0000074C -_0223CF0C: .word 0x00000754 -_0223CF10: .word 0x00004E20 -_0223CF14: .word 0x8AC72304 -_0223CF18: .word 0x89E7FFFF -_0223CF1C: .word 0x00007530 -_0223CF20: .word 0x00009C40 -_0223CF24: .word 0x0000C350 -_0223CF28: .word 0x0000EA60 - thumb_func_end ov62_0223CBE0 - - thumb_func_start ov62_0223CF2C -ov62_0223CF2C: ; 0x0223CF2C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #0x14] - mov r0, #0 - str r0, [sp, #0x18] - mov r1, #0x86 - ldr r0, [sp, #0x14] - lsl r1, r1, #4 - ldr r4, [r0, r1] - ldr r5, _0223CFD8 ; =0x02248EA0 - mov r6, #1 - add r4, #0x84 -_0223CF44: - ldr r0, [r5, #4] - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r5, #8] - mov r2, #6 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r5, #0] - ldr r0, [r0, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r1, [r5, #8] - ldr r0, [r5, #0xc] - mul r0, r1 - add r6, r6, r0 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [r0, #0x48] - add r1, #0x50 - bl sub_0200B1EC - add r7, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov62_0223429C - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223CFDC ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r7, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - add r4, #0x10 - add r0, r0, #1 - add r5, #0x10 - str r0, [sp, #0x18] - cmp r0, #2 - blt _0223CF44 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223CFD8: .word 0x02248EA0 -_0223CFDC: .word 0x000F0D00 - thumb_func_end ov62_0223CF2C - - thumb_func_start ov62_0223CFE0 -ov62_0223CFE0: ; 0x0223CFE0 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r5, [r0, r1] - mov r4, #0 - add r5, #0x84 -_0223CFEC: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #2 - blt _0223CFEC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223CFE0 - - thumb_func_start ov62_0223D004 -ov62_0223D004: ; 0x0223D004 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r0, [r0, r1] - ldr r6, _0223D0F4 ; =0x02248EC0 - str r0, [sp, #0x1c] - ldr r4, [sp, #0x1c] - mov r0, #0 - ldr r5, _0223D0F8 ; =0x02248EE0 - mov r7, #1 - str r0, [sp, #0x18] - add r4, #0x24 -_0223D020: - add r0, r4, #0 - bl sub_0201A7A0 - ldr r0, [sp, #0x1c] - ldr r0, [r0, #0x1c] - cmp r0, #0 - bne _0223D068 - ldr r0, [r6, #4] - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r6, #8] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r6, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r6, #0] - ldr r0, [r0, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r1, [r6, #8] - ldr r0, [r6, #0xc] - b _0223D0A0 -_0223D068: - ldr r0, [r5, #4] - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r5, #8] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r5, #0] - ldr r0, [r0, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r1, [r5, #8] - ldr r0, [r5, #0xc] -_0223D0A0: - mul r0, r1 - add r7, r7, r0 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - mov r1, #0x43 - ldr r0, [r0, #0x48] - bl sub_0200B1EC - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223D0FC ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r2, [sp, #0x20] - add r0, r4, #0 - add r3, r1, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, [sp, #0x18] - add r4, #0x10 - add r0, r0, #1 - add r6, #0x10 - add r5, #0x10 - str r0, [sp, #0x18] - cmp r0, #2 - blt _0223D020 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D0F4: .word 0x02248EC0 -_0223D0F8: .word 0x02248EE0 -_0223D0FC: .word 0x000F0D00 - thumb_func_end ov62_0223D004 - - thumb_func_start ov62_0223D100 -ov62_0223D100: ; 0x0223D100 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r5, [r0, r1] - mov r4, #0 - add r5, #0x24 -_0223D10C: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #2 - blt _0223D10C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223D100 - - thumb_func_start ov62_0223D124 -ov62_0223D124: ; 0x0223D124 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #0x57 - blt _0223D134 - mov r5, #0 - bl sub_02022974 -_0223D134: - ldr r6, _0223D158 ; =0x022497E8 - lsl r5, r5, #2 - ldr r1, [r6, r5] - ldr r0, _0223D15C ; =0x0000FFFF - cmp r1, r0 - bne _0223D144 - bl sub_02022974 -_0223D144: - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0202CD88 - ldr r1, [r6, r5] - bl sub_0202CFB8 - pop {r4, r5, r6, pc} - nop -_0223D158: .word 0x022497E8 -_0223D15C: .word 0x0000FFFF - thumb_func_end ov62_0223D124 - - thumb_func_start ov62_0223D160 -ov62_0223D160: ; 0x0223D160 - push {r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x30 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x14] - mov r0, #0x66 - bl ov62_02231690 - add r6, r0, #0 - add r0, r4, #0 - add r0, #0x24 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r4, #0x1c] - cmp r0, #0 - ldr r0, [r5, #0x4c] - bne _0223D1A6 - ldr r1, _0223D390 ; =0x00000718 - ldr r3, [r4, #0xc] - mov r2, #0x48 - ldr r1, [r4, r1] - mul r2, r3 - ldrb r1, [r1, r2] - sub r1, r1, #1 - bl sub_0200B1EC - b _0223D1BA -_0223D1A6: - ldr r1, _0223D394 ; =0x00000714 - mov r2, #0x72 - ldr r3, [r4, #0xc] - lsl r2, r2, #2 - ldr r1, [r4, r1] - mul r2, r3 - ldrb r1, [r1, r2] - sub r1, r1, #1 - bl sub_0200B1EC -_0223D1BA: - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223D398 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x24 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - add r0, #0x24 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - add r0, #0x34 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r4, #0x1c] - cmp r0, #0 - ldr r0, [r5, #0x48] - bne _0223D200 - ldr r1, [r4, #0x14] - add r1, #0x52 - bl sub_0200B1EC - b _0223D206 -_0223D200: - mov r1, #0x5b - bl sub_0200B1EC -_0223D206: - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223D398 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x34 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - add r0, #0x34 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - ldr r0, _0223D39C ; =0x0000088C - mov r1, #0x66 - ldr r0, [r5, r0] - bl sub_02030B94 - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0223D254 - cmp r0, #1 - beq _0223D292 - cmp r0, #2 - beq _0223D2BC - b _0223D326 -_0223D254: - ldr r0, _0223D39C ; =0x0000088C - ldr r0, [r5, r0] - bl sub_02030CDC - str r0, [sp, #0x20] - ldr r0, [r5, #0x48] - mov r1, #0x55 - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [sp, #0x20] - mov r1, #4 - bl ov62_02232234 - add r1, r0, #0 - ldr r0, _0223D3A0 ; =0x00000744 - ldr r0, [r4, r0] - bl sub_0200B1EC - str r0, [sp, #0x1c] - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - add r0, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - b _0223D326 -_0223D292: - ldr r0, _0223D39C ; =0x0000088C - ldr r0, [r5, r0] - bl sub_02030CCC - str r0, [sp, #0x24] - ldr r0, [r5, #0x48] - mov r1, #0x56 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x1c] - ldr r2, [sp, #0x24] - add r0, r6, #0 - mov r1, #0 - bl sub_0200C2E0 - b _0223D326 -_0223D2BC: - ldr r0, _0223D39C ; =0x0000088C - ldr r0, [r5, r0] - bl sub_02030BBC - str r0, [sp, #0x10] - ldr r0, _0223D39C ; =0x0000088C - ldr r0, [r5, r0] - bl sub_02030BEC - str r0, [sp, #0x28] - ldr r0, [r5, #0x48] - mov r1, #0x57 - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [sp, #0x28] - cmp r0, #0 - beq _0223D2E4 - ldr r0, _0223D3A4 ; =0x000001EE - str r0, [sp, #0x10] -_0223D2E4: - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _0223D308 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x10] - mov r1, #0x66 - add r2, sp, #0x2c - bl sub_0200B274 - ldr r0, [sp, #0x1c] - add r1, sp, #0x2c - bl sub_02023D28 - b _0223D312 -_0223D308: - ldr r0, [r5, #0x48] - mov r1, #0x15 - bl sub_0200B1EC - str r0, [sp, #0x1c] -_0223D312: - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - add r0, r6, #0 - add r3, r1, #0 - bl sub_0200B48C -_0223D326: - mov r1, #1 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x18] - add r0, r6, #0 - mov r3, #0 - bl sub_0200B48C - ldr r1, [sp, #0x14] - add r0, r6, #0 - add r2, r7, #0 - bl sub_0200C388 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223D398 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r2, [sp, #0x14] - add r0, #0x34 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r4, #0x34 - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r6, #0 - bl sub_0200C41C - add r0, r6, #0 - bl sub_0200B3F0 - add sp, #0x1fc - add sp, #0x30 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D390: .word 0x00000718 -_0223D394: .word 0x00000714 -_0223D398: .word 0x000F0D00 -_0223D39C: .word 0x0000088C -_0223D3A0: .word 0x00000744 -_0223D3A4: .word 0x000001EE - thumb_func_end ov62_0223D160 - - thumb_func_start ov62_0223D3A8 -ov62_0223D3A8: ; 0x0223D3A8 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - bne _0223D3DC - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0200D3F4 - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - mov r1, #1 - bl sub_020129D0 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - b _0223D402 -_0223D3DC: - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - mov r1, #0 - bl sub_020129D0 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 -_0223D402: - add r0, r4, #0 - add r0, #0xac - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r0, #0] - sub r2, #0x2c - bl sub_020128C4 - add r4, #0xc8 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_0223D3A8 - - thumb_func_start ov62_0223D424 -ov62_0223D424: ; 0x0223D424 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_0223131C - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - add r1, r4, #0 - add r1, #0xa8 - str r0, [r1, #0] - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - add r1, r4, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r4, #0 - add r1, r5, #0 - add r0, #0xa4 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0xc0 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0xa4 - add r1, #0x14 - mov r2, #0x35 - bl ov62_0223124C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0xc0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - add r0, r4, #0 - add r0, #0xac - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r0, #0] - sub r2, #0x2c - bl sub_020128C4 - add r0, r4, #0 - add r0, #0xc8 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r0, #0] - sub r2, #0x2c - bl sub_020128C4 - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - mov r1, #0 - bl sub_020129D0 - add r4, #0xc8 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_020129D0 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223D3A8 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223D424 - - thumb_func_start ov62_0223D4E4 -ov62_0223D4E4: ; 0x0223D4E4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r0, r4, #0 - add r0, #0xa4 - bl ov62_022312B0 - add r0, r4, #0 - add r0, #0xc0 - bl ov62_022312B0 - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl sub_0200D0F4 - add r4, #0xc4 - ldr r0, [r4, #0] - bl sub_0200D0F4 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223D4E4 - - thumb_func_start ov62_0223D518 -ov62_0223D518: ; 0x0223D518 - push {r3, r4, r5} - sub sp, #0xc - ldr r5, _0223D53C ; =0x02248E88 - add r2, r0, #0 - ldmia r5!, {r0, r1} - add r4, sp, #0 - add r3, r4, #0 - stmia r4!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r4, #0] - ldr r0, [r2, #0x14] - lsl r0, r0, #2 - ldr r0, [r3, r0] - str r0, [r2, #0x20] - add sp, #0xc - pop {r3, r4, r5} - bx lr - nop -_0223D53C: .word 0x02248E88 - thumb_func_end ov62_0223D518 - - thumb_func_start ov62_0223D540 -ov62_0223D540: ; 0x0223D540 - push {r3, r4, r5, lr} - add r5, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r5, r2] - cmp r1, #0 - bne _0223D5A2 - cmp r0, #0 - beq _0223D558 - cmp r0, #1 - beq _0223D576 - b _0223D594 -_0223D558: - add r0, r5, #0 - bl ov62_02234520 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - ldr r1, [r4, #0x10] - bl sub_020E1F6C - str r1, [r4, #0xc] - add r0, r5, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_0223D576: - add r0, r5, #0 - bl ov62_02234520 - ldr r0, [r4, #0x14] - add r0, r0, #1 - str r0, [r4, #0x14] - ldr r1, [r4, #0x18] - bl sub_020E1F6C - str r1, [r4, #0x14] - add r0, r5, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_0223D594: - add r0, r5, #0 - bl ov62_02234520 - add r0, r5, #0 - mov r1, #7 - bl ov62_0222FB60 -_0223D5A2: - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223D540 - - thumb_func_start ov62_0223D5A4 -ov62_0223D5A4: ; 0x0223D5A4 - push {r3, r4, r5, lr} - ldr r1, _0223D634 ; =0x00000B38 - add r5, r0, #0 - mov r0, #0x66 - bl sub_02018144 - ldr r2, _0223D634 ; =0x00000B38 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - add r0, #0xc - ldr r0, [r5, r0] - str r0, [r4, #0x1c] - mov r0, #3 - str r0, [r4, #0x10] - add r0, r5, #0 - bl sub_0208BE68 - cmp r0, #0 - bne _0223D5DA - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] -_0223D5DA: - mov r0, #3 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov62_0223D518 - ldr r1, [r5, #0x48] - ldr r0, _0223D638 ; =0x00000744 - str r1, [r4, r0] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223D63C ; =0x02248E94 - ldr r2, _0223D640 ; =ov62_0223D540 - mov r1, #3 - add r3, r5, #0 - bl sub_02023FCC - add r4, #0xdc - str r0, [r4, #0] - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D634: .word 0x00000B38 -_0223D638: .word 0x00000744 -_0223D63C: .word 0x02248E94 -_0223D640: .word ov62_0223D540 - thumb_func_end ov62_0223D5A4 - - thumb_func_start ov62_0223D644 -ov62_0223D644: ; 0x0223D644 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223D65A - cmp r1, #1 - beq _0223D6B8 - b _0223D72E -_0223D65A: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _0223D66E - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223D66E: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223D73E -_0223D6B8: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - bl ov62_0223D424 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #0 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223D73E -_0223D72E: - bl ov62_02233790 - cmp r0, #0 - beq _0223D73E - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_0223D73E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223D644 - - thumb_func_start ov62_0223D744 -ov62_0223D744: ; 0x0223D744 - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _0223D75E - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_0223D75E: - ldr r0, [r4, #8] - cmp r0, #6 - bls _0223D766 - b _0223DA8C -_0223D766: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223D772: ; jump table - .short _0223D780 - _0223D772 - 2 ; case 0 - .short _0223D7C0 - _0223D772 - 2 ; case 1 - .short _0223D7D8 - _0223D772 - 2 ; case 2 - .short _0223D8C2 - _0223D772 - 2 ; case 3 - .short _0223D8E2 - _0223D772 - 2 ; case 4 - .short _0223D9A6 - _0223D772 - 2 ; case 5 - .short _0223DA04 - _0223D772 - 2 ; case 6 -_0223D780: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r1, _0223DABC ; =0x00000117 - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, _0223DAC0 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223DAB4 -_0223D7C0: - add r0, r4, #0 - bl ov62_0224112C - bl ov61_0222B2B8 - cmp r0, #1 - beq _0223D7D0 - b _0223DAB4 -_0223D7D0: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223DAB4 -_0223D7D8: - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - bne _0223D816 - ldr r0, _0223DAC0 ; =0x00000565 - mov r1, #0 - bl sub_020057A4 - add r0, r4, #0 - bl ov62_02231B8C - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #4 - bl ov62_022348B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #5 - str r0, [r4, #8] - b _0223DAB4 -_0223D816: - mov r0, #0x71 - lsl r0, r0, #4 - add r1, r5, r0 - add r0, #0xc - str r1, [r5, r0] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02025E5C - bl sub_0202CC58 - ldr r1, _0223DAC4 ; =0x00000728 - strh r0, [r5, r1] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02025E5C - bl sub_0202CC5C - ldr r1, _0223DAC8 ; =0x0000072A - strb r0, [r5, r1] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02025E5C - bl sub_0202CC60 - ldr r1, _0223DACC ; =0x0000072B - strb r0, [r5, r1] - add r0, r1, #0 - sub r0, #0xf - ldr r0, [r5, r0] - ldrb r2, [r0] - add r0, r1, #1 - strb r2, [r5, r0] - add r0, r1, #0 - sub r0, #0xf - ldr r0, [r5, r0] - ldrb r2, [r0, #1] - add r0, r1, #0 - add r0, #9 - strb r2, [r5, r0] - add r0, r1, #0 - sub r0, #0xf - ldr r0, [r5, r0] - ldrb r2, [r0, #2] - add r0, r1, #0 - add r0, #0x11 - strb r2, [r5, r0] - add r1, r1, #1 - ldrb r1, [r5, r1] - add r0, r4, #0 - sub r1, r1, #1 - bl ov62_0223D124 - mov r1, #0x73 - lsl r1, r1, #4 - str r0, [r5, r1] - add r1, r1, #4 - ldrb r1, [r5, r1] - add r0, r4, #0 - sub r1, r1, #1 - bl ov62_0223D124 - ldr r1, _0223DAD0 ; =0x00000738 - str r0, [r5, r1] - add r1, r1, #4 - ldrb r1, [r5, r1] - add r0, r4, #0 - sub r1, r1, #1 - bl ov62_0223D124 - mov r1, #0x1d - lsl r1, r1, #6 - str r0, [r5, r1] - ldr r0, _0223DAC0 ; =0x00000565 - mov r1, #0 - bl sub_020057A4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223DAB4 -_0223D8C2: - add r0, r4, #0 - bl ov62_0224112C - ldr r1, _0223DAD4 ; =0x0000088C - ldr r2, _0223DAD8 ; =0x0000072C - ldr r1, [r4, r1] - add r2, r5, r2 - bl ov61_0222B2D8 - cmp r0, #1 - beq _0223D8DA - b _0223DAB4 -_0223D8DA: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223DAB4 -_0223D8E2: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - bne _0223D920 - ldr r0, _0223DAC0 ; =0x00000565 - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #5 - bl ov62_022348B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #5 - str r0, [r4, #8] - b _0223DAB4 -_0223D920: - ldr r1, [r5, #0x1c] - mov r0, #0 - cmp r1, #0 - bne _0223D948 - ldr r1, _0223DADC ; =0x00000718 - ldr r2, [r5, r1] - ldrb r1, [r2] - cmp r1, #0 - beq _0223D944 - add r1, r2, #0 - add r1, #0x48 - ldrb r1, [r1] - cmp r1, #0 - beq _0223D944 - add r2, #0x90 - ldrb r1, [r2] - cmp r1, #0 - bne _0223D966 -_0223D944: - mov r0, #1 - b _0223D966 -_0223D948: - ldr r1, _0223DAE0 ; =0x00000714 - ldr r3, [r5, r1] - ldrb r1, [r3] - cmp r1, #0 - beq _0223D964 - mov r1, #0x72 - lsl r1, r1, #2 - ldrb r2, [r3, r1] - cmp r2, #0 - beq _0223D964 - lsl r1, r1, #1 - ldrb r1, [r3, r1] - cmp r1, #0 - bne _0223D966 -_0223D964: - mov r0, #1 -_0223D966: - cmp r0, #0 - beq _0223D992 - mov r2, #0 - add r0, r4, #0 - mov r1, #5 - add r3, r2, #0 - bl ov62_022348B8 - mov r1, #0x4b - mov r0, #0x51 - lsl r1, r1, #2 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #5 - str r0, [r4, #8] - b _0223DAB4 -_0223D992: - ldr r0, _0223DAC0 ; =0x00000565 - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223DAE4 ; =0x0000055F - bl sub_02005748 - mov r0, #0xff - str r0, [r4, #8] - b _0223DAB4 -_0223D9A6: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223D4E4 - add r0, r5, #0 - add r0, #0xdc - ldr r0, [r0, #0] - bl sub_02024034 - add r5, #8 - add r0, r5, #0 - bl ov62_02231688 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223DAB4 -_0223DA04: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _0223DAB4 - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223DA5A - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r5, #0 - bl sub_020181C4 - b _0223DAB4 -_0223DA5A: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223DAB4 -_0223DA8C: - add r0, r4, #0 - bl ov62_0223CBE0 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 -_0223DAB4: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223DABC: .word 0x00000117 -_0223DAC0: .word 0x00000565 -_0223DAC4: .word 0x00000728 -_0223DAC8: .word 0x0000072A -_0223DACC: .word 0x0000072B -_0223DAD0: .word 0x00000738 -_0223DAD4: .word 0x0000088C -_0223DAD8: .word 0x0000072C -_0223DADC: .word 0x00000718 -_0223DAE0: .word 0x00000714 -_0223DAE4: .word 0x0000055F - thumb_func_end ov62_0223D744 - - thumb_func_start ov62_0223DAE8 -ov62_0223DAE8: ; 0x0223DAE8 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223DB00 - cmp r1, #1 - beq _0223DBAC - b _0223DC0E -_0223DB00: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x21 - mov r3, #3 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x22 - mov r3, #7 - bl sub_0200710C - add r0, r5, #0 - bl ov62_0223D004 - add r0, r5, #0 - bl ov62_0223D160 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223DC1C ; =0x0000047C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #2 - bl ov62_022335BC - add r0, r5, #0 - bl ov62_0223CAEC - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223CF2C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DC14 -_0223DBAC: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223DBDC - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223DBDC: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223DC14 -_0223DC0E: - mov r1, #6 - bl ov62_0222FB60 -_0223DC14: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223DC1C: .word 0x0000047C - thumb_func_end ov62_0223DAE8 - - thumb_func_start ov62_0223DC20 -ov62_0223DC20: ; 0x0223DC20 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, _0223DC60 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233664 - ldr r1, _0223DC64 ; =0x0000049C - add r0, r5, r1 - sub r1, #0x10 - ldrsh r1, [r5, r1] - bl ov62_022332AC - ldr r0, _0223DC68 ; =0x00000748 - add r1, r5, #0 - ldr r0, [r4, r0] - str r0, [sp] - ldr r0, _0223DC64 ; =0x0000049C - ldr r2, [r4, #0xc] - ldr r3, [r4, #0x14] - add r0, r5, r0 - bl ov62_02232C78 - add r4, #0xdc - ldr r0, [r4, #0] - bl sub_0202404C - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223DC60: .word 0x0000047C -_0223DC64: .word 0x0000049C -_0223DC68: .word 0x00000748 - thumb_func_end ov62_0223DC20 - - thumb_func_start ov62_0223DC6C -ov62_0223DC6C: ; 0x0223DC6C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223DC82 - cmp r1, #1 - beq _0223DCD8 - b _0223DD2A -_0223DC82: - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223DD34 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233600 - ldr r0, _0223DD38 ; =0x0000049C - add r0, r5, r0 - bl ov62_022332FC - ldr r0, _0223DD3C ; =0x00000748 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223DCA4 - bl sub_020237BC -_0223DCA4: - ldr r0, _0223DD38 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022334FC - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, _0223DD40 ; =0x000006F4 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_0208B9E0 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DD30 -_0223DCD8: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223DCF8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223DCF8: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223DD30 -_0223DD2A: - mov r1, #8 - bl ov62_0222FB60 -_0223DD30: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223DD34: .word 0x0000047C -_0223DD38: .word 0x0000049C -_0223DD3C: .word 0x00000748 -_0223DD40: .word 0x000006F4 - thumb_func_end ov62_0223DC6C - - thumb_func_start ov62_0223DD44 -ov62_0223DD44: ; 0x0223DD44 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223DD5A - cmp r1, #1 - beq _0223DD8A - b _0223DDD6 -_0223DD5A: - bl ov62_0223CFE0 - add r0, r5, #0 - bl ov62_0223D100 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223D4E4 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r4, #0xdc - ldr r0, [r4, #0] - bl sub_02024034 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DE5A -_0223DD8A: - mov r1, #1 - bl ov62_02234540 - add r4, #8 - add r0, r4, #0 - bl ov62_02231688 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DE5A -_0223DDD6: - bl ov62_02233790 - cmp r0, #0 - beq _0223DE5A - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223DE2A - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r4, #0 - bl sub_020181C4 - b _0223DE5A -_0223DE2A: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223DE5A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223DD44 - - thumb_func_start ov62_0223DE60 -ov62_0223DE60: ; 0x0223DE60 - push {r3, lr} - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223DE60 - - thumb_func_start ov62_0223DE6C -ov62_0223DE6C: ; 0x0223DE6C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223DE86 - cmp r1, #1 - beq _0223DEBC - cmp r1, #2 - beq _0223DED4 - b _0223DEFE -_0223DE86: - bl ov62_0223CBE0 - add r0, r4, #0 - bl ov62_0223D518 - add r0, r5, #0 - bl ov62_0223D100 - ldr r0, _0223DF08 ; =0x0000049C - add r0, r5, r0 - bl ov62_022332FC - ldr r0, _0223DF0C ; =0x00000748 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223DEAA - bl sub_020237BC -_0223DEAA: - ldr r0, _0223DF08 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022334FC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DF04 -_0223DEBC: - mov r2, #1 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223DF04 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DF04 -_0223DED4: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _0223DF04 - add r0, r5, #0 - bl ov62_0223D004 - add r0, r5, #0 - bl ov62_0223D160 - add r0, r5, #0 - bl ov62_0223CAEC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223DF04 -_0223DEFE: - mov r1, #6 - bl ov62_0222FB60 -_0223DF04: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223DF08: .word 0x0000049C -_0223DF0C: .word 0x00000748 - thumb_func_end ov62_0223DE6C - - thumb_func_start ov62_0223DF10 -ov62_0223DF10: ; 0x0223DF10 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r1, [r1, #0] - ldr r4, [r0, r2] - cmp r1, #1 - bne _0223DF2A - mov r0, #0x71 - lsl r0, r0, #4 - add r1, r4, r0 - add r0, #0xc - str r1, [r4, r0] - pop {r4, pc} -_0223DF2A: - bl ov62_0224112C - ldr r1, _0223DF48 ; =0x0000071C - add r1, r4, r1 - bl ov61_0222BD78 - ldr r1, _0223DF48 ; =0x0000071C - mov r2, #4 - ldr r0, [r4, r1] - sub r1, #0xc - add r1, r4, r1 - bl sub_020C4DB0 - pop {r4, pc} - nop -_0223DF48: .word 0x0000071C - thumb_func_end ov62_0223DF10 - - thumb_func_start ov62_0223DF4C -ov62_0223DF4C: ; 0x0223DF4C - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r1, [r1, #0] - ldr r4, [r0, r2] - cmp r1, #1 - bne _0223DF6E - add r1, r4, #0 - ldr r0, _0223DF9C ; =0x00000714 - add r1, #0xe0 - str r1, [r4, r0] - add r1, r0, #0 - sub r1, #0xdc - add r1, r4, r1 - add r0, r0, #4 - str r1, [r4, r0] - pop {r4, pc} -_0223DF6E: - bl ov62_0224112C - ldr r2, _0223DF9C ; =0x00000714 - add r1, r4, r2 - add r2, r2, #4 - add r2, r4, r2 - bl ov61_0222BDAC - ldr r0, _0223DF9C ; =0x00000714 - add r1, r4, #0 - ldr r0, [r4, r0] - ldr r2, _0223DFA0 ; =0x00000558 - add r1, #0xe0 - bl sub_020C4DB0 - ldr r1, _0223DFA4 ; =0x00000718 - mov r2, #0xd8 - ldr r0, [r4, r1] - sub r1, #0xe0 - add r1, r4, r1 - bl sub_020C4DB0 - pop {r4, pc} - ; .align 2, 0 -_0223DF9C: .word 0x00000714 -_0223DFA0: .word 0x00000558 -_0223DFA4: .word 0x00000718 - thumb_func_end ov62_0223DF4C - - thumb_func_start ov62_0223DFA8 -ov62_0223DFA8: ; 0x0223DFA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - ldr r4, _0223E014 ; =0x02249064 - add r3, sp, #0xc - mov r2, #0x3c -_0223DFB2: - ldrh r1, [r4] - add r4, r4, #2 - strh r1, [r3] - add r3, r3, #2 - sub r2, r2, #1 - bne _0223DFB2 - mov r1, #0 - str r1, [sp, #8] - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - ldr r7, _0223E018 ; =0x00002090 - str r0, [sp, #4] - ldr r0, [sp, #8] - str r0, [sp] -_0223DFD0: - ldr r0, [sp] - ldr r4, [sp, #4] - lsl r1, r0, #2 - add r0, sp, #0xc - mov r6, #0 - add r5, r0, r1 -_0223DFDC: - ldr r0, [r4, r7] - cmp r0, #0 - beq _0223DFEE - mov r1, #0 - mov r2, #2 - ldrsh r1, [r5, r1] - ldrsh r2, [r5, r2] - bl sub_0200D4C4 -_0223DFEE: - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #6 - blt _0223DFDC - ldr r0, [sp, #4] - add r0, #0x30 - str r0, [sp, #4] - ldr r0, [sp] - add r0, r0, #6 - str r0, [sp] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #5 - blt _0223DFD0 - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - nop -_0223E014: .word 0x02249064 -_0223E018: .word 0x00002090 - thumb_func_end ov62_0223DFA8 - - thumb_func_start ov62_0223E01C -ov62_0223E01C: ; 0x0223E01C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_022312CC - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - mov r1, #0x4d - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0x20 - add r0, r4, r1 - add r1, r5, #0 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl sub_0200D364 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - mov r0, #0x47 - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x4e - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223F0A8 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223E01C - - thumb_func_start ov62_0223E0FC -ov62_0223E0FC: ; 0x0223E0FC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, _0223E224 ; =0x000008A4 - add r4, r1, #0 - sub r0, #0x44 - ldr r3, [r5, r0] - cmp r4, #0x64 - bne _0223E176 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r3, r0] - str r0, [sp, #0x14] - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x18] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - b _0223E1EE -_0223E176: - cmp r4, #0x66 - bne _0223E1E6 - lsl r0, r2, #2 - add r1, r5, r0 - ldr r0, _0223E224 ; =0x000008A4 - sub r0, #0x18 - ldr r0, [r1, r0] - str r0, [sp, #0x10] - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x10] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x1c] - ldr r1, [sp, #0x1c] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x1c] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - b _0223E1EE -_0223E1E6: - ldr r0, [r5, #0x48] - bl sub_0200B1EC - add r6, r0, #0 -_0223E1EE: - ldr r0, _0223E224 ; =0x000008A4 - mov r1, #0xcc - add r0, r5, r0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223E228 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _0223E224 ; =0x000008A4 - add r3, r1, #0 - add r0, r5, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _0223E224 ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E224: .word 0x000008A4 -_0223E228: .word 0x000F0D0C - thumb_func_end ov62_0223E0FC - - thumb_func_start ov62_0223E22C -ov62_0223E22C: ; 0x0223E22C - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _0223E246 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_0223E246: - ldr r0, [r4, #8] - cmp r0, #4 - bls _0223E24E - b _0223E3D4 -_0223E24E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223E25A: ; jump table - .short _0223E264 - _0223E25A - 2 ; case 0 - .short _0223E29A - _0223E25A - 2 ; case 1 - .short _0223E2D4 - _0223E25A - 2 ; case 2 - .short _0223E31A - _0223E25A - 2 ; case 3 - .short _0223E346 - _0223E25A - 2 ; case 4 -_0223E264: - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _0223E288 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - b _0223E294 -_0223E288: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_022323B8 -_0223E294: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223E29A: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E2BA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223E2BA: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223E3FE -_0223E2D4: - add r0, r4, #0 - mov r1, #0x75 - bl ov62_02231AAC - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _0223E404 ; =0x00002038 - mov r1, #0 - str r1, [r5, r0] - ldr r0, _0223E408 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E3FE -_0223E31A: - add r0, r4, #0 - bl ov62_0224112C - ldr r1, _0223E40C ; =0x000004D4 - ldr r1, [r4, r1] - lsl r1, r1, #2 - add r2, r4, r1 - ldr r1, _0223E410 ; =0x00002608 - ldr r2, [r2, r1] - add r1, r2, #0 - add r1, #0xd8 - add r2, #0xdc - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov61_0222B524 - cmp r0, #1 - bne _0223E3FE - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E3FE -_0223E346: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _0223E408 ; =0x00000565 - bne _0223E380 - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #8 - bl ov62_022348B8 - ldr r0, [r4, #8] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #8] - ldr r0, _0223E404 ; =0x00002038 - str r1, [r5, r0] - b _0223E3B8 -_0223E380: - mov r1, #0 - bl sub_020057A4 - mov r0, #0xff - ldr r1, _0223E404 ; =0x00002038 - str r0, [r4, #8] - mov r2, #1 - str r2, [r5, r1] - ldr r1, _0223E414 ; =0x0000413C - add r2, r4, r1 - ldr r1, _0223E40C ; =0x000004D4 - ldr r1, [r4, r1] - add r1, r2, r1 - ldr r2, _0223E418 ; =0x00000878 - str r1, [r4, r2] - add r1, r2, #0 - add r1, #0x3c - ldr r3, [r4, r1] - add r1, r0, #0 - add r1, #0x85 - str r3, [r5, r1] - add r0, #0x85 - add r2, #0x40 - add r1, r4, r2 - ldr r0, [r5, r0] - ldr r2, _0223E41C ; =0x00001D4C - bl sub_020C4DB0 -_0223E3B8: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - b _0223E3FE -_0223E3D4: - ldr r0, _0223E404 ; =0x00002038 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223E3F6 - ldr r0, _0223E420 ; =0x0000055F - bl sub_02005748 - ldr r1, _0223E424 ; =0x00002034 - add r0, r4, #0 - ldr r1, [r5, r1] - bl ov62_0222FB60 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223381C - b _0223E3FE -_0223E3F6: - add r0, r4, #0 - mov r1, #0x14 - bl ov62_0222FB60 -_0223E3FE: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223E404: .word 0x00002038 -_0223E408: .word 0x00000565 -_0223E40C: .word 0x000004D4 -_0223E410: .word 0x00002608 -_0223E414: .word 0x0000413C -_0223E418: .word 0x00000878 -_0223E41C: .word 0x00001D4C -_0223E420: .word 0x0000055F -_0223E424: .word 0x00002034 - thumb_func_end ov62_0223E22C - - thumb_func_start ov62_0223E428 -ov62_0223E428: ; 0x0223E428 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0202FF44 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02030A98 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_0223E428 - - thumb_func_start ov62_0223E448 -ov62_0223E448: ; 0x0223E448 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223E448 - - thumb_func_start ov62_0223E460 -ov62_0223E460: ; 0x0223E460 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223E47A - cmp r1, #1 - beq _0223E48A - cmp r1, #2 - beq _0223E4B8 - b _0223E504 -_0223E47A: - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223E50A -_0223E48A: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E50A - add r0, r5, #0 - bl ov62_02240A24 - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223E50A -_0223E4B8: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E4EA - add r0, r5, #0 - mov r1, #0x64 - mov r2, #0 - bl ov62_0223E0FC - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223E4EA: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223E50A -_0223E504: - mov r1, #0xc - bl ov62_0222FB60 -_0223E50A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223E460 - - thumb_func_start ov62_0223E510 -ov62_0223E510: ; 0x0223E510 - push {r4, r5, r6, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #7 - bls _0223E524 - b _0223E736 -_0223E524: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E530: ; jump table - .short _0223E540 - _0223E530 - 2 ; case 0 - .short _0223E550 - _0223E530 - 2 ; case 1 - .short _0223E5A2 - _0223E530 - 2 ; case 2 - .short _0223E5C0 - _0223E530 - 2 ; case 3 - .short _0223E5F6 - _0223E530 - 2 ; case 4 - .short _0223E63A - _0223E530 - 2 ; case 5 - .short _0223E680 - _0223E530 - 2 ; case 6 - .short _0223E6DC - _0223E530 - 2 ; case 7 -_0223E540: - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E7E8 -_0223E550: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E588 - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r1, _0223E7F0 ; =0x00000116 - add r0, r4, #0 - mov r2, #0 - bl ov62_0223E0FC - add r0, r4, #0 - bl ov62_022342BC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223E588: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223E7E8 -_0223E5A2: - ldr r2, _0223E7F4 ; =0x000004D4 - ldr r1, _0223E7F8 ; =0x00002028 - ldr r2, [r4, r2] - ldr r1, [r5, r1] - add r3, r4, r2 - ldr r2, _0223E7FC ; =0x0000413C - ldrb r2, [r3, r2] - bl ov62_022337F0 - cmp r0, #0 - beq _0223E688 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E7E8 -_0223E5C0: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - ldr r0, _0223E800 ; =0x00000565 - bl sub_02005748 - b _0223E7E8 -_0223E5F6: - bl ov62_022411B8 - cmp r0, #0 - bne _0223E604 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_0223E604: - mov r1, #0x46 - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #0 - bl ov62_0223E0FC - bl sub_0202FE04 - mov r1, #4 - mov r2, #0 - bl sub_0202FE98 - add r6, r0, #0 - add r5, r1, #0 - add r0, r4, #0 - bl ov62_0224112C - add r1, r6, #0 - add r2, r5, #0 - bl ov61_0222B550 - cmp r0, #1 - bne _0223E688 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E7E8 -_0223E63A: - bl ov62_022411B8 - cmp r0, #0 - bne _0223E648 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_0223E648: - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _0223E800 ; =0x00000565 - bne _0223E662 - mov r1, #0 - bl sub_020057A4 - b _0223E66E -_0223E662: - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223E804 ; =0x0000055F - bl sub_02005748 -_0223E66E: - ldr r0, [r4, #8] - ldr r1, _0223E808 ; =0x00000119 - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - mov r2, #0 - bl ov62_0223E0FC - b _0223E7E8 -_0223E680: - bl sub_02022798 - cmp r0, #0 - bne _0223E68A -_0223E688: - b _0223E7E8 -_0223E68A: - add r0, r4, #0 - bl ov62_02231A88 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223F038 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - bl ov62_022339A0 - add r0, r4, #0 - bl ov62_022338A8 - ldr r0, _0223E80C ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E7E8 -_0223E6DC: - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02024034 - add r0, r4, #0 - bl ov62_0223E428 - add r5, #8 - add r0, r5, #0 - bl ov62_02231688 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #1 - mov r1, #0x66 - bl sub_020397C8 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223E7E8 -_0223E736: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _0223E7E8 - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223E7B8 - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r5, #0 - bl sub_020181C4 - bl sub_0202F250 - cmp r0, #1 - bne _0223E7E8 - bl sub_0202F22C - b _0223E7E8 -_0223E7B8: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223E7E8: - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0223E7F0: .word 0x00000116 -_0223E7F4: .word 0x000004D4 -_0223E7F8: .word 0x00002028 -_0223E7FC: .word 0x0000413C -_0223E800: .word 0x00000565 -_0223E804: .word 0x0000055F -_0223E808: .word 0x00000119 -_0223E80C: .word 0x0000049C - thumb_func_end ov62_0223E510 - - thumb_func_start ov62_0223E810 -ov62_0223E810: ; 0x0223E810 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223E828 - cmp r1, #1 - beq _0223E886 - b _0223E8AC -_0223E828: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E86C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x54 - mov r3, #7 - bl sub_0200710C - ldr r2, _0223E8B8 ; =0x00002028 - add r0, r5, #0 - ldr r2, [r4, r2] - mov r1, #0x66 - bl ov62_0223E0FC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223E86C: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223E8B2 -_0223E886: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E8B2 - add r0, r5, #0 - bl ov62_02240944 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223E8B2 -_0223E8AC: - mov r1, #0xf - bl ov62_0222FB60 -_0223E8B2: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223E8B8: .word 0x00002028 - thumb_func_end ov62_0223E810 - - thumb_func_start ov62_0223E8BC -ov62_0223E8BC: ; 0x0223E8BC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r1, [r4, #8] - ldr r5, [r4, r0] - cmp r1, #3 - bls _0223E8D0 - b _0223EAD8 -_0223E8D0: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E8DC: ; jump table - .short _0223E8E4 - _0223E8DC - 2 ; case 0 - .short _0223E90C - _0223E8DC - 2 ; case 1 - .short _0223E946 - _0223E8DC - 2 ; case 2 - .short _0223EA6E - _0223E8DC - 2 ; case 3 -_0223E8E4: - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223EB04 -_0223E90C: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223E92C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223E92C: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223EB04 -_0223E946: - add r0, #0xc - ldr r0, [r4, r0] - cmp r0, #0xd2 - bne _0223E986 - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_0200D364 -_0223E986: - add r0, r4, #0 - bl ov62_0224088C - add r0, r4, #0 - bl ov62_02240900 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _0223EA0A - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _0223EA46 -_0223EA0A: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02232394 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02232378 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_0223EA46: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223EB04 -_0223EA6E: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223EABE - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _0223EA9C - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _0223EAA8 -_0223EA9C: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_022323B8 -_0223EAA8: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223EABE: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223EB04 -_0223EAD8: - ldr r1, _0223EB0C ; =0x00004138 - mov r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - ble _0223EAFC - mov r1, #0x9a - lsl r1, r1, #6 - add r5, r4, r1 - ldr r2, _0223EB0C ; =0x00004138 - add r6, r4, #0 - sub r1, #0x78 -_0223EAEE: - str r5, [r6, r1] - ldr r3, [r4, r2] - add r0, r0, #1 - add r5, #0xe4 - add r6, r6, #4 - cmp r0, r3 - blt _0223EAEE -_0223EAFC: - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 -_0223EB04: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223EB0C: .word 0x00004138 - thumb_func_end ov62_0223E8BC - - thumb_func_start ov62_0223EB10 -ov62_0223EB10: ; 0x0223EB10 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223EB10 - - thumb_func_start ov62_0223EB28 -ov62_0223EB28: ; 0x0223EB28 - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _0223EB3C - b _0223ED40 -_0223EB3C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223EB48: ; jump table - .short _0223EB50 - _0223EB48 - 2 ; case 0 - .short _0223EB78 - _0223EB48 - 2 ; case 1 - .short _0223EBC8 - _0223EB48 - 2 ; case 2 - .short _0223ECD6 - _0223EB48 - 2 ; case 3 -_0223EB50: - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223ED6C -_0223EB78: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223EBAE - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223F038 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223EBAE: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223ED6C -_0223EBC8: - bl ov62_0223E01C - ldr r0, _0223ED74 ; =0x0000086C - ldr r0, [r4, r0] - cmp r0, #0xd2 - bne _0223EC0C - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_0200D364 -_0223EC0C: - add r0, r4, #0 - bl ov62_02240900 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _0223EC7E - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _0223ECAE -_0223EC7E: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02232378 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_0223ECAE: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223ED6C -_0223ECD6: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223ED26 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _0223ED04 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _0223ED10 -_0223ED04: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_022323B8 -_0223ED10: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223ED26: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223ED6C -_0223ED40: - ldr r1, _0223ED78 ; =0x00004138 - mov r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - ble _0223ED64 - mov r1, #0x9a - lsl r1, r1, #6 - add r5, r4, r1 - ldr r2, _0223ED78 ; =0x00004138 - add r6, r4, #0 - sub r1, #0x78 -_0223ED56: - str r5, [r6, r1] - ldr r3, [r4, r2] - add r0, r0, #1 - add r5, #0xe4 - add r6, r6, #4 - cmp r0, r3 - blt _0223ED56 -_0223ED64: - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 -_0223ED6C: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223ED74: .word 0x0000086C -_0223ED78: .word 0x00004138 - thumb_func_end ov62_0223EB28 - - thumb_func_start ov62_0223ED7C -ov62_0223ED7C: ; 0x0223ED7C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223ED92 - cmp r1, #1 - beq _0223EE04 - b _0223EE7E -_0223ED92: - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl ov62_0223E428 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0223EDE2 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _0223EDEE -_0223EDE2: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232394 -_0223EDEE: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0224088C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223EE84 -_0223EE04: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223EE64 - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #0x6f - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D364 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223F0A8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223EE64: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223EE84 -_0223EE7E: - mov r1, #3 - bl ov62_0222FB60 -_0223EE84: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223ED7C - - thumb_func_start ov62_0223EE88 -ov62_0223EE88: ; 0x0223EE88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r1, #0 - ldr r1, _0223EF58 ; =0x0000088C - lsl r6, r2, #2 - add r4, r5, r1 - ldr r1, [r4, r6] - str r0, [sp, #0x10] - ldr r0, [r5, #0x48] - cmp r1, #0 - bne _0223EEA8 - mov r1, #8 - bl sub_0200B1EC - add r4, r0, #0 - b _0223EF06 -_0223EEA8: - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #7 - bl sub_0200B1EC - str r0, [sp, #0x14] - ldr r0, [r4, r6] - mov r1, #0x66 - bl sub_02030B94 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_022349A8 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - add r0, r7, #0 - add r2, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x14] - add r0, r7, #0 - add r1, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 -_0223EF06: - add r0, sp, #0x18 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r5, #0x24] - add r1, sp, #0x18 - mov r2, #0x14 - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223EF5C ; =0x000E0D00 - add r2, r4, #0 - str r0, [sp, #8] - add r0, sp, #0x18 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x10] - ldr r0, [r0, #8] - ldr r1, [r1, #0xc] - add r2, sp, #0x18 - mov r3, #0x66 - bl sub_02012BE0 - add r0, r4, #0 - bl sub_020237BC - add r0, sp, #0x18 - bl sub_0201A8FC - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223EF58: .word 0x0000088C -_0223EF5C: .word 0x000E0D00 - thumb_func_end ov62_0223EE88 - - thumb_func_start ov62_0223EF60 -ov62_0223EF60: ; 0x0223EF60 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r3, _0223F030 ; =0x02248FA8 - ldr r4, [r0, r1] - str r0, [sp] - add r2, sp, #0x20 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r3, _0223F034 ; =0x02248FB8 - add r2, sp, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp] - mov r1, #2 - bl ov62_0223136C - mov r0, #0x45 - lsl r0, r0, #2 - add r5, r4, r0 - add r0, sp, #0x20 - str r0, [sp, #8] - mov r0, #0x69 - str r0, [sp, #4] - ldr r0, [sp] - mov r6, #0 - str r0, [sp, #0xc] - add r0, #0x14 - add r7, sp, #0x10 - str r0, [sp, #0xc] -_0223EFA6: - ldr r0, [sp] - mov r1, #2 - bl ov62_022313E0 - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [sp, #0xc] - add r0, r5, #0 - mov r2, #2 - bl ov62_0223118C - ldr r2, [sp, #8] - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r5, #0 - bl ov62_0223124C - cmp r6, #3 - beq _0223EFD8 - ldr r1, [sp] - add r0, r5, #0 - add r2, r6, #1 - bl ov62_0223EE88 -_0223EFD8: - mov r0, #0x46 - ldr r2, [sp, #4] - lsl r0, r0, #2 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - mov r1, #0x32 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r7, #0] - bl sub_0200D364 - mov r0, #0x47 - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - ldr r0, [sp, #8] - add r6, r6, #1 - add r0, r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r4, #0x1c - add r0, #0x24 - add r5, #0x1c - add r7, r7, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _0223EFA6 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F030: .word 0x02248FA8 -_0223F034: .word 0x02248FB8 - thumb_func_end ov62_0223EF60 - - thumb_func_start ov62_0223F038 -ov62_0223F038: ; 0x0223F038 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp] - ldr r5, [r0, r1] - mov r0, #0x45 - lsl r0, r0, #2 - mov r6, #0 - add r4, r5, r0 - add r7, r0, #4 -_0223F04C: - add r0, r4, #0 - bl ov62_022312B0 - ldr r0, [r5, r7] - bl sub_0200D0F4 - add r6, r6, #1 - add r4, #0x1c - add r5, #0x1c - cmp r6, #4 - blt _0223F04C - ldr r0, [sp] - bl ov62_022313BC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov62_0223F038 - - thumb_func_start ov62_0223F06C -ov62_0223F06C: ; 0x0223F06C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223F06C - - thumb_func_start ov62_0223F0A8 -ov62_0223F0A8: ; 0x0223F0A8 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - bne _0223F0DC - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_020129D0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - b _0223F102 -_0223F0DC: - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3F4 - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_020129D0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 -_0223F102: - mov r0, #0x47 - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - mov r0, #0x4e - lsl r0, r0, #2 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - thumb_func_end ov62_0223F0A8 - - thumb_func_start ov62_0223F124 -ov62_0223F124: ; 0x0223F124 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r6, [r0, r1] - ldr r0, _0223F15C ; =0x00002030 - mov r4, #0 - ldr r0, [r6, r0] - cmp r0, #0 - ble _0223F152 - add r5, r6, #0 - ldr r7, _0223F15C ; =0x00002030 - add r5, #0x14 -_0223F13C: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - ldr r0, [r6, r7] - add r4, r4, #1 - add r5, #0x10 - cmp r4, r0 - blt _0223F13C -_0223F152: - ldr r0, _0223F15C ; =0x00002030 - mov r1, #0 - str r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F15C: .word 0x00002030 - thumb_func_end ov62_0223F124 - - thumb_func_start ov62_0223F160 -ov62_0223F160: ; 0x0223F160 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r6, [r0, r1] - ldr r0, _0223F198 ; =0x0000202C - mov r4, #0 - ldr r0, [r6, r0] - cmp r0, #0 - ble _0223F18E - add r5, r6, #0 - ldr r7, _0223F198 ; =0x0000202C - add r5, #0x94 -_0223F178: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - ldr r0, [r6, r7] - add r4, r4, #1 - add r5, #0x10 - cmp r4, r0 - blt _0223F178 -_0223F18E: - ldr r0, _0223F198 ; =0x0000202C - mov r1, #0 - str r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F198: .word 0x0000202C - thumb_func_end ov62_0223F160 - - thumb_func_start ov62_0223F19C -ov62_0223F19C: ; 0x0223F19C - push {r3, r4, r5, lr} - ldr r1, _0223F214 ; =0x0000217C - add r5, r0, #0 - mov r0, #0x66 - bl sub_02018144 - ldr r2, _0223F214 ; =0x0000217C - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - add r0, #0xc - ldr r1, [r5, r0] - mov r0, #0x4b - lsl r0, r0, #2 - cmp r1, r0 - bne _0223F1CA - mov r0, #0 - str r0, [r4, #0xc] - b _0223F1DE -_0223F1CA: - add r0, r0, #1 - cmp r1, r0 - bne _0223F1D6 - mov r0, #1 - str r0, [r4, #0xc] - b _0223F1DE -_0223F1D6: - cmp r1, #0xc8 - bne _0223F1DE - mov r0, #2 - str r0, [r4, #0xc] -_0223F1DE: - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223F214: .word 0x0000217C - thumb_func_end ov62_0223F19C - - thumb_func_start ov62_0223F218 -ov62_0223F218: ; 0x0223F218 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223F232 - cmp r1, #1 - beq _0223F290 - cmp r1, #2 - beq _0223F2EC - b _0223F328 -_0223F232: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _0223F246 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223F246: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223F342 -_0223F290: - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #0 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223F342 -_0223F2EC: - bl ov62_02233790 - cmp r0, #0 - beq _0223F342 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223E01C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223F342 -_0223F328: - bl ov62_022300BC - cmp r0, #1 - bne _0223F33A - add r0, r5, #0 - mov r1, #0x13 - bl ov62_0222FB60 - b _0223F342 -_0223F33A: - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_0223F342: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0223F218 - - thumb_func_start ov62_0223F348 -ov62_0223F348: ; 0x0223F348 - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _0223F362 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_0223F362: - ldr r0, [r4, #8] - cmp r0, #6 - bls _0223F36A - b _0223F622 -_0223F36A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223F376: ; jump table - .short _0223F384 - _0223F376 - 2 ; case 0 - .short _0223F3DC - _0223F376 - 2 ; case 1 - .short _0223F468 - _0223F376 - 2 ; case 2 - .short _0223F4EA - _0223F376 - 2 ; case 3 - .short _0223F50C - _0223F376 - 2 ; case 4 - .short _0223F546 - _0223F376 - 2 ; case 5 - .short _0223F57A - _0223F376 - 2 ; case 6 -_0223F384: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _0223F64C ; =0x0000086C - mov r1, #0x4b - ldr r0, [r4, r0] - lsl r1, r1, #2 - sub r0, r0, r1 - cmp r0, #1 - bhi _0223F3C6 - add r0, r4, #0 - sub r1, #0x15 - bl ov62_02231AAC - b _0223F3CE -_0223F3C6: - add r0, r4, #0 - sub r1, #8 - bl ov62_02231AAC -_0223F3CE: - ldr r0, _0223F650 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F3DC: - ldr r0, _0223F64C ; =0x0000086C - ldr r1, [r4, r0] - mov r0, #0x4b - lsl r0, r0, #2 - cmp r1, r0 - bne _0223F402 - mov r0, #0 - str r0, [r5, #0xc] - add r0, r4, #0 - bl ov62_0224112C - bl ov61_0222B4A8 - cmp r0, #1 - bne _0223F458 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F402: - add r0, r0, #1 - cmp r1, r0 - bne _0223F422 - mov r0, #1 - str r0, [r5, #0xc] - add r0, r4, #0 - bl ov62_0224112C - bl ov61_0222B4E4 - cmp r0, #1 - bne _0223F458 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F422: - cmp r1, #0xc8 - bne _0223F462 - mov r0, #2 - str r0, [r5, #0xc] - add r0, r4, #0 - bl sub_0208BE68 - cmp r0, #1 - bne _0223F44A - add r0, r4, #0 - bl ov62_0224112C - bl ov61_0222B44C - cmp r0, #1 - bne _0223F458 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F44A: - add r0, r4, #0 - bl ov62_0224112C - bl ov61_0222B3EC - cmp r0, #1 - beq _0223F45A -_0223F458: - b _0223F644 -_0223F45A: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F462: - bl sub_02022974 - b _0223F644 -_0223F468: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _0223F650 ; =0x00000565 - bne _0223F49C - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #7 - bl ov62_022348B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F49C: - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223F654 ; =0x0000055F - bl sub_02005748 - ldr r0, _0223F658 ; =0x00004138 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223F4E4 - mov r2, #0 - add r0, r4, #0 - mov r1, #5 - add r3, r2, #0 - bl ov62_022348B8 - ldr r0, [r5, #0xc] - cmp r0, #2 - bne _0223F4C6 - mov r1, #0x76 - b _0223F4CA -_0223F4C6: - mov r1, #0x4b - lsl r1, r1, #2 -_0223F4CA: - mov r0, #0x51 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F4E4: - mov r0, #0xff - str r0, [r4, #8] - b _0223F644 -_0223F4EA: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F50C: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223F52C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223F52C: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223F644 -_0223F546: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223F06C - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #1 - mov r1, #0x66 - bl sub_020397C8 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223F644 -_0223F57A: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _0223F644 - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223F5F0 - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r5, #0 - bl sub_020181C4 - b _0223F644 -_0223F5F0: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223F644 -_0223F622: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_0223F644: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223F64C: .word 0x0000086C -_0223F650: .word 0x00000565 -_0223F654: .word 0x0000055F -_0223F658: .word 0x00004138 - thumb_func_end ov62_0223F348 - - thumb_func_start ov62_0223F65C -ov62_0223F65C: ; 0x0223F65C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r3, _0223F754 ; =0x02248F8C - add r6, r4, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x14 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r6, #0x14 - str r0, [r2, #0] - add r0, r6, #0 - bl sub_0201A7A0 - mov r3, #3 - str r3, [sp] - mov r0, #0x14 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r6, #0 - mov r2, #2 - bl sub_0201A7E8 - add r0, r6, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r1, [r4, #0xc] - ldr r0, [r5, #0x48] - lsl r2, r1, #2 - add r1, sp, #0x14 - ldr r1, [r1, r2] - bl sub_0200B1EC - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F758 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - add r6, r4, #0 - add r6, #0x94 - add r0, r6, #0 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - add r0, #0xf2 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r6, #0 - mov r3, #0xb - bl sub_0201A7E8 - add r0, r6, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x5f - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #0x50 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223F758 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - ldr r0, _0223F75C ; =0x0000202C - mov r1, #1 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223F754: .word 0x02248F8C -_0223F758: .word 0x000F0D00 -_0223F75C: .word 0x0000202C - thumb_func_end ov62_0223F65C - - thumb_func_start ov62_0223F760 -ov62_0223F760: ; 0x0223F760 - push {r4, r5, r6, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223F77A - cmp r1, #1 - bne _0223F778 - b _0223F8BA -_0223F778: - b _0223F95A -_0223F77A: - bl sub_0202F250 - cmp r0, #0 - beq _0223F786 - bl sub_0202F22C -_0223F786: - ldr r0, _0223F968 ; =0x00002054 - ldr r3, _0223F96C ; =0x02248FD8 - add r2, r4, r0 - mov r6, #5 -_0223F78E: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _0223F78E - ldr r0, [r3, #0] - mov r1, #0 - str r0, [r2, #0] - ldr r0, _0223F968 ; =0x00002054 - str r1, [r4, r0] - ldr r1, _0223F970 ; =0x00004138 - add r0, r0, #4 - ldr r1, [r5, r1] - str r1, [r4, r0] - add r0, r5, #0 - bl ov62_022339DC - mov r0, #0x66 - bl ov62_02233A68 - mov r1, #0x82 - lsl r1, r1, #6 - str r0, [r4, r1] - mov r0, #0x7d - lsl r0, r0, #2 - add r1, #8 - str r0, [r4, r1] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r5, #0 - mov r1, #4 - mov r2, #3 - bl ov62_022343B8 - mov r1, #7 - add r0, r5, #0 - add r2, r1, #0 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223F0A8 - add r0, r5, #0 - bl ov62_0223F65C - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0223F974 ; =0x0000047C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022335B0 - ldr r0, _0223F978 ; =0x0000049C - ldr r3, _0223F968 ; =0x00002054 - add r0, r5, r0 - add r1, r5, #0 - mov r2, #0 - add r3, r4, r3 - bl ov62_02232594 - ldr r1, _0223F97C ; =0x000004E4 - mov r0, #1 - str r0, [r5, r1] - add r0, r1, #0 - sub r0, #0x68 - sub r1, #0x48 - add r0, r5, r0 - add r1, r5, r1 - bl ov62_02233638 - ldr r0, _0223F978 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #1 - bl ov62_0223331C - ldr r0, _0223F978 ; =0x0000049C - mov r1, #0x40 - add r0, r5, r0 - mov r2, #0xb8 - bl ov62_02233434 - ldr r0, _0223F978 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_02233064 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02240BF4 - add r0, r5, #0 - mov r1, #0 - bl ov62_02240D98 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223F960 -_0223F8BA: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223F928 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r5, #0 - mov r1, #1 - bl ov62_02240D98 - ldr r3, _0223F980 ; =0x000004D8 - mov r1, #0x6f - ldr r6, [r5, r3] - mov r3, #0x18 - mul r3, r6 - lsl r1, r1, #4 - add r3, #0x4c - lsl r3, r3, #0x10 - ldr r1, [r5, r1] - add r0, r5, #0 - mov r2, #0x10 - asr r3, r3, #0x10 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0xc - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223F928: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223F960 -_0223F95A: - mov r1, #4 - bl ov62_0222FB60 -_0223F960: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0223F968: .word 0x00002054 -_0223F96C: .word 0x02248FD8 -_0223F970: .word 0x00004138 -_0223F974: .word 0x0000047C -_0223F978: .word 0x0000049C -_0223F97C: .word 0x000004E4 -_0223F980: .word 0x000004D8 - thumb_func_end ov62_0223F760 - - thumb_func_start ov62_0223F984 -ov62_0223F984: ; 0x0223F984 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223F9A0 - cmp r1, #1 - beq _0223FA2E - cmp r1, #2 - bne _0223F99E - b _0223FAA8 -_0223F99E: - b _0223FB42 -_0223F9A0: - ldr r0, _0223FB50 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233664 - ldr r1, _0223FB54 ; =0x0000049C - add r0, r5, r1 - sub r1, #0x10 - ldrsh r1, [r5, r1] - bl ov62_022331C8 - ldr r0, _0223FB54 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_02233064 - ldr r2, _0223FB58 ; =0x000004D8 - mov r0, #0x6f - ldr r3, [r5, r2] - mov r2, #0x18 - mul r2, r3 - lsl r0, r0, #4 - add r2, #0x4c - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8EC - add r0, r5, #0 - bl ov62_02240E30 - ldr r0, _0223FB5C ; =0x02248F7C - bl sub_02022760 - cmp r0, #0 - beq _0223FA0E - add r0, r5, #0 - bl ov62_02234520 - ldr r0, _0223FB60 ; =0x000004D4 - ldr r0, [r5, r0] - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0223FB64 ; =0x00002608 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223FA0E - ldr r0, _0223FB68 ; =0x00002034 - mov r1, #6 - str r1, [r4, r0] - mov r0, #0 - str r0, [r4, #0x10] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223FA0E: - ldr r0, _0223FB6C ; =0x02248F80 - bl sub_02022760 - cmp r0, #0 - bne _0223FA1A - b _0223FB4A -_0223FA1A: - add r0, r5, #0 - bl ov62_02234520 - ldr r0, _0223FB68 ; =0x00002034 - mov r1, #5 - str r1, [r4, r0] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FB4A -_0223FA2E: - ldr r0, _0223FB50 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233600 - ldr r0, _0223FB54 ; =0x0000049C - add r0, r5, r0 - bl ov62_022332FC - ldr r0, _0223FB54 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022334FC - mov r0, #0x82 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl ov62_02233A74 - add r0, r5, #0 - bl ov62_02240DDC - add r0, r5, #0 - bl ov62_02233A44 - add r0, r5, #0 - bl ov62_0223F124 - add r0, r5, #0 - bl ov62_0223F160 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _0223FB68 ; =0x00002034 - ldr r0, [r4, r0] - cmp r0, #5 - bne _0223FAA2 - ldr r0, _0223FB50 ; =0x0000047C - add r0, r5, r0 - bl ov62_022335F4 - ldr r0, _0223FB54 ; =0x0000049C - add r0, r5, r0 - bl ov62_02233310 - ldr r0, _0223FB70 ; =0x00002084 - mov r1, #0 - str r1, [r4, r0] -_0223FAA2: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223FAA8: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223FB10 - add r0, r5, #0 - mov r1, #0 - bl ov62_0223F0A8 - ldr r0, _0223FB68 ; =0x00002034 - ldr r0, [r4, r0] - cmp r0, #6 - bne _0223FB0A - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r5, #0 - add r0, r4, r0 - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl sub_0200D364 -_0223FB0A: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223FB10: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223FB4A -_0223FB42: - ldr r1, _0223FB68 ; =0x00002034 - ldr r1, [r4, r1] - bl ov62_0222FB60 -_0223FB4A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223FB50: .word 0x0000047C -_0223FB54: .word 0x0000049C -_0223FB58: .word 0x000004D8 -_0223FB5C: .word 0x02248F7C -_0223FB60: .word 0x000004D4 -_0223FB64: .word 0x00002608 -_0223FB68: .word 0x00002034 -_0223FB6C: .word 0x02248F80 -_0223FB70: .word 0x00002084 - thumb_func_end ov62_0223F984 - - thumb_func_start ov62_0223FB74 -ov62_0223FB74: ; 0x0223FB74 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223FB8E - cmp r1, #1 - beq _0223FBA6 - cmp r1, #2 - beq _0223FBF6 - b _0223FC1C -_0223FB8E: - bl ov62_0223F124 - add r0, r5, #0 - bl ov62_0223F160 - add r0, r5, #0 - bl ov62_02231B8C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FCC0 -_0223FBA6: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223FBDC - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223F06C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0223FBDC: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223FCC0 -_0223FBF6: - add r4, #8 - add r0, r4, #0 - bl ov62_02231688 - add r0, r5, #0 - bl ov62_0223146C - mov r0, #1 - mov r1, #0x66 - bl sub_020397C8 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FCC0 -_0223FC1C: - bl ov62_02233790 - cmp r0, #0 - beq _0223FCC0 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _0223FC90 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - bl sub_020181C4 - b _0223FCC0 -_0223FC90: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_0223FCC0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223FB74 - - thumb_func_start ov62_0223FCC4 -ov62_0223FCC4: ; 0x0223FCC4 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _0223FCD6 - b _0223FE06 -_0223FCD6: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223FCE2: ; jump table - .short _0223FCEA - _0223FCE2 - 2 ; case 0 - .short _0223FCFA - _0223FCE2 - 2 ; case 1 - .short _0223FD48 - _0223FCE2 - 2 ; case 2 - .short _0223FDAA - _0223FCE2 - 2 ; case 3 -_0223FCEA: - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223FE0E -_0223FCFA: - bl ov62_02240B94 - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223FE14 ; =0x02248FC8 - ldr r2, _0223FE18 ; =ov62_02240A50 - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x62 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223FE1C ; =0x02248F98 - ldr r2, _0223FE20 ; =ov62_02240AEC - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x63 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0223FE24 ; =0x02248F84 - ldr r2, _0223FE28 ; =ov62_02240B5C - mov r1, #2 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223FE0E -_0223FD48: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0223FE0E -_0223FDAA: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223FDEC - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02240900 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0223FDEC: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0223FE0E -_0223FE06: - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 -_0223FE0E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0223FE14: .word 0x02248FC8 -_0223FE18: .word ov62_02240A50 -_0223FE1C: .word 0x02248F98 -_0223FE20: .word ov62_02240AEC -_0223FE24: .word 0x02248F84 -_0223FE28: .word ov62_02240B5C - thumb_func_end ov62_0223FCC4 - - thumb_func_start ov62_0223FE2C -ov62_0223FE2C: ; 0x0223FE2C - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0223FE2C - - thumb_func_start ov62_0223FE44 -ov62_0223FE44: ; 0x0223FE44 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #3 - bls _0223FE56 - b _0223FF74 -_0223FE56: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223FE62: ; jump table - .short _0223FE6A - _0223FE62 - 2 ; case 0 - .short _0223FEA8 - _0223FE62 - 2 ; case 1 - .short _0223FEC0 - _0223FE62 - 2 ; case 2 - .short _0223FF2C - _0223FE62 - 2 ; case 3 -_0223FE6A: - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0223FE84 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _0223FE90 -_0223FE84: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232394 -_0223FE90: - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FF8C -_0223FEA8: - mov r2, #1 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0223FF8C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FF8C -_0223FEC0: - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0223FEF0 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232378 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov62_022323B8 - add r0, r5, #0 - mov r1, #0x50 - mov r2, #3 - bl ov62_022343B8 - b _0223FF1C -_0223FEF0: - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234214 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r5, #0 - mov r2, #3 - bl ov62_022343B8 -_0223FF1C: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FF8C -_0223FF2C: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _0223FF8C - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0223FF50 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl ov62_022323B8 - b _0223FF5C -_0223FF50: - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - mov r1, #1 - bl ov62_0223427C -_0223FF5C: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0223FF8C -_0223FF74: - ldr r1, [r4, #0x10] - mov r0, #1 - eor r1, r0 - str r1, [r4, #0x10] - add r0, r5, #0 - add r1, #0x79 - bl ov62_022408A8 - add r0, r5, #0 - mov r1, #7 - bl ov62_0222FB60 -_0223FF8C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_0223FE44 - - thumb_func_start ov62_0223FF90 -ov62_0223FF90: ; 0x0223FF90 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0223FFAC - cmp r1, #1 - beq _0223FFCC - cmp r1, #2 - beq _0223FFDC - b _0224006E -_0223FFAC: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0224007A -_0223FFCC: - bl sub_0200F2AC - cmp r0, #1 - bne _0224007A - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0224007A -_0223FFDC: - mov r1, #1 - bl ov62_02234540 - ldr r0, [r4, #0x10] - cmp r0, #0 - bne _0223FFF6 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _02240002 -_0223FFF6: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02232394 -_02240002: - mov r0, #0x62 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x63 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x19 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024034 - add r0, r5, #0 - bl ov62_0223E428 - add r0, r5, #0 - bl ov62_0224088C - add r0, r5, #0 - bl ov62_022410F0 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022314A8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r1, [r5, #0x10] - add r0, r5, #0 - ldr r1, [r1, #0] - bl ov62_022300C8 - ldr r0, _02240080 ; =0x00000868 - mov r1, #1 - ldr r0, [r5, r0] - mov r2, #0 - bl sub_0208BA84 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0224007A -_0224006E: - add r0, r4, #0 - bl sub_020181C4 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0224007A: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02240080: .word 0x00000868 - thumb_func_end ov62_0223FF90 - - thumb_func_start ov62_02240084 -ov62_02240084: ; 0x02240084 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #5 - bls _02240098 - b _022402B8 -_02240098: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022400A4: ; jump table - .short _022400B0 - _022400A4 - 2 ; case 0 - .short _0224017E - _022400A4 - 2 ; case 1 - .short _022401CC - _022400A4 - 2 ; case 2 - .short _0224022E - _022400A4 - 2 ; case 3 - .short _0224028A - _022400A4 - 2 ; case 4 - .short _022402A8 - _022400A4 - 2 ; case 5 -_022400B0: - bl ov62_02234314 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - bl ov62_022315C8 - ldr r0, _022402D4 ; =0x00004138 - mov r2, #0 - ldr r0, [r4, r0] - cmp r0, #0 - ble _022400E4 - mov r0, #0x9a - lsl r0, r0, #6 - add r7, r0, #0 - add r3, r4, r0 - ldr r0, _022402D4 ; =0x00004138 - add r6, r4, #0 - sub r7, #0x78 -_022400D6: - str r3, [r6, r7] - ldr r1, [r4, r0] - add r2, r2, #1 - add r3, #0xe4 - add r6, r6, #4 - cmp r2, r1 - blt _022400D6 -_022400E4: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_0200D364 - mov r1, #0x7d - ldr r0, _022402D8 ; =0x00002088 - lsl r1, r1, #2 - str r1, [r5, r0] - ldr r1, _022402DC ; =0x000004A4 - sub r0, r0, #4 - ldrsh r1, [r4, r1] - str r1, [r5, r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022402CE -_0224017E: - bl ov62_02240B94 - mov r0, #0x66 - str r0, [sp] - ldr r0, _022402E0 ; =0x02248FC8 - ldr r2, _022402E4 ; =ov62_02240A50 - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x62 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _022402E8 ; =0x02248F98 - ldr r2, _022402EC ; =ov62_02240AEC - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x63 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _022402F0 ; =0x02248F84 - ldr r2, _022402F4 ; =ov62_02240B5C - mov r1, #2 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022402CE -_022401CC: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022402CE -_0224022E: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02240270 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02240900 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02240270: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022402CE -_0224028A: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022402CE -_022402A8: - bl sub_0200F2AC - cmp r0, #1 - bne _022402CE - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022402CE -_022402B8: - ldr r0, _022402F8 ; =0x000006D8 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - add r0, r4, #0 - bl ov62_02230098 - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 -_022402CE: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022402D4: .word 0x00004138 -_022402D8: .word 0x00002088 -_022402DC: .word 0x000004A4 -_022402E0: .word 0x02248FC8 -_022402E4: .word ov62_02240A50 -_022402E8: .word 0x02248F98 -_022402EC: .word ov62_02240AEC -_022402F0: .word 0x02248F84 -_022402F4: .word ov62_02240B5C -_022402F8: .word 0x000006D8 - thumb_func_end ov62_02240084 - - thumb_func_start ov62_022402FC -ov62_022402FC: ; 0x022402FC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - ldr r1, _022403F0 ; =0x000008A4 - add r5, r0, #0 - sub r1, #0x44 - ldr r6, [r5, r1] - mov r1, #2 - bl ov62_022302A8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _022403F0 ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - ldr r1, _022403F0 ; =0x000008A4 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r5, r1 - mov r2, #2 - mov r3, #1 - bl sub_0201A7E8 - cmp r4, #0x64 - bne _022403B0 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r6, r0] - str r0, [sp, #0x14] - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x18] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - b _022403BA -_022403B0: - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r6, r0, #0 -_022403BA: - ldr r0, _022403F0 ; =0x000008A4 - mov r1, #0xcc - add r0, r5, r0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022403F4 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _022403F0 ; =0x000008A4 - add r3, r1, #0 - add r0, r5, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _022403F0 ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022403F0: .word 0x000008A4 -_022403F4: .word 0x000F0D0C - thumb_func_end ov62_022402FC - - thumb_func_start ov62_022403F8 -ov62_022403F8: ; 0x022403F8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] - bl sub_0202FE04 - mov r1, #4 - mov r2, #0 - bl sub_0202FE98 - add r3, r0, #0 - add r2, r1, #0 - add r0, r4, #0 - add r1, r3, #0 - bl ov62_02234970 - cmp r0, #0 - ldr r0, [r4, #8] - bne _02240424 - b _02240758 -_02240424: - cmp r0, #6 - bls _0224042A - b _0224072A -_0224042A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02240436: ; jump table - .short _02240444 - _02240436 - 2 ; case 0 - .short _022404A8 - _02240436 - 2 ; case 1 - .short _02240508 - _02240436 - 2 ; case 2 - .short _02240518 - _02240436 - 2 ; case 3 - .short _02240550 - _02240436 - 2 ; case 4 - .short _022405A0 - _02240436 - 2 ; case 5 - .short _022406C0 - _02240436 - 2 ; case 6 -_02240444: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _02240460 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - b _0224046C -_02240460: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02232394 -_0224046C: - add r0, r4, #0 - bl ov62_0224088C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022410F0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02240884 -_022404A8: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022404EE - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223EF60 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022404EE: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02240884 -_02240508: - ldr r1, _0224082C ; =0x00000115 - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02240884 -_02240518: - bl sub_02022798 - cmp r0, #0 - bne _02240522 - b _02240884 -_02240522: - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02240884 -_02240550: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02240586 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223F038 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02240586: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02240884 -_022405A0: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223E01C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, _02240830 ; =0x0000086C - ldr r0, [r4, r0] - cmp r0, #0xd2 - bne _022405F6 - mov r0, #0x45 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - mov r0, #0x13 - lsl r0, r0, #4 - add r1, r4, #0 - add r0, r5, r0 - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #3 - bl sub_0200D364 -_022405F6: - add r0, r4, #0 - bl ov62_02240900 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _02240668 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _02240698 -_02240668: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02232378 - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_02240698: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02240884 -_022406C0: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02240710 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _022406EE - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _022406FA -_022406EE: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_022323B8 -_022406FA: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02240710: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02240884 -_0224072A: - ldr r1, _02240834 ; =0x00004138 - mov r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - ble _0224074E - mov r1, #0x9a - lsl r1, r1, #6 - add r5, r4, r1 - ldr r2, _02240834 ; =0x00004138 - add r6, r4, #0 - sub r1, #0x78 -_02240740: - str r5, [r6, r1] - ldr r3, [r4, r2] - add r0, r0, #1 - add r5, #0xe4 - add r6, r6, #4 - cmp r0, r3 - blt _02240740 -_0224074E: - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 - b _02240884 -_02240758: - cmp r0, #0 - beq _02240766 - cmp r0, #1 - beq _022407CA - cmp r0, #2 - beq _02240838 - b _0224087C -_02240766: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, [r5, #0x10] - cmp r0, #0 - bne _02240782 - mov r0, #0x22 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - b _0224078E -_02240782: - mov r0, #0x65 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02232394 -_0224078E: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022410F0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0224088C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02240884 -_022407CA: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02240810 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223EF60 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02240810: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02240884 - nop -_0224082C: .word 0x00000115 -_02240830: .word 0x0000086C -_02240834: .word 0x00004138 -_02240838: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _02240862 - add r0, r4, #0 - mov r1, #0x64 - mov r2, #0 - bl ov62_022402FC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02240862: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02240884 -_0224087C: - add r0, r4, #0 - mov r1, #0xc - bl ov62_0222FB60 -_02240884: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov62_022403F8 - - thumb_func_start ov62_0224088C -ov62_0224088C: ; 0x0224088C - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - add r0, r4, #0 - add r0, #0x94 - bl sub_0201ACF4 - add r4, #0x94 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_0224088C - - thumb_func_start ov62_022408A8 -ov62_022408A8: ; 0x022408A8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r6, r1, #0 - add r4, #0x94 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - add r1, r6, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022408FC ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_022408FC: .word 0x000F0D00 - thumb_func_end ov62_022408A8 - - thumb_func_start ov62_02240900 -ov62_02240900: ; 0x02240900 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r6, r4, #0 - add r6, #0x94 - add r0, r6, #0 - bl sub_0201A7A0 - mov r0, #3 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r6, #0 - mov r2, #6 - mov r3, #8 - bl sub_0201A7E8 - ldr r1, [r4, #0x10] - add r0, r5, #0 - add r1, #0x79 - bl ov62_022408A8 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov62_02240900 - - thumb_func_start ov62_02240944 -ov62_02240944: ; 0x02240944 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r6, r4, #0 - add r6, #0x94 - add r0, r6, #0 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r6, #0 - mov r3, #4 - bl sub_0201A7E8 - add r0, r6, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x82 - bl sub_0200B1EC - add r7, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02240A20 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0201A9A4 - add r4, #0xa4 - add r0, r4, #0 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x15 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, #0 - mov r3, #0x12 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x83 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02240A20 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02240A20: .word 0x000F0D00 - thumb_func_end ov62_02240944 - - thumb_func_start ov62_02240A24 -ov62_02240A24: ; 0x02240A24 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - add r0, r4, #0 - add r0, #0x94 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #0x94 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0xa4 - bl sub_0201ACF4 - add r4, #0xa4 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02240A24 - - thumb_func_start ov62_02240A50 -ov62_02240A50: ; 0x02240A50 - push {r3, r4, r5, lr} - add r4, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r5, [r4, r2] - cmp r1, #0 - bne _02240AE4 - cmp r0, #3 - bhi _02240AE4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02240A6E: ; jump table - .short _02240A76 - _02240A6E - 2 ; case 0 - .short _02240A86 - _02240A6E - 2 ; case 1 - .short _02240AAE - _02240A6E - 2 ; case 2 - .short _02240AD6 - _02240A6E - 2 ; case 3 -_02240A76: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02240A86: - add r0, r4, #0 - bl ov62_02234520 - bl sub_0202F250 - cmp r0, #0 - beq _02240A9E - add r0, r4, #0 - mov r1, #9 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02240A9E: - ldr r0, _02240AE8 ; =0x00002034 - mov r1, #9 - str r1, [r5, r0] - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02240AAE: - add r0, r4, #0 - bl ov62_02234520 - bl sub_0202F250 - cmp r0, #0 - beq _02240AC6 - add r0, r4, #0 - mov r1, #0xb - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02240AC6: - ldr r0, _02240AE8 ; =0x00002034 - mov r1, #0xb - str r1, [r5, r0] - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02240AD6: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0xa - bl ov62_0222FB60 -_02240AE4: - pop {r3, r4, r5, pc} - nop -_02240AE8: .word 0x00002034 - thumb_func_end ov62_02240A50 - - thumb_func_start ov62_02240AEC -ov62_02240AEC: ; 0x02240AEC - push {r4, lr} - add r4, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r3, [r4, r2] - cmp r1, #0 - bne _02240B54 - cmp r0, #3 - bhi _02240B54 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02240B0A: ; jump table - .short _02240B12 - _02240B0A - 2 ; case 0 - .short _02240B12 - _02240B0A - 2 ; case 1 - .short _02240B12 - _02240B0A - 2 ; case 2 - .short _02240B40 - _02240B0A - 2 ; case 3 -_02240B12: - add r1, r0, #1 - ldr r0, _02240B58 ; =0x00002028 - add r2, #0x2c - str r1, [r3, r0] - ldr r0, [r3, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, r2] - cmp r0, #0 - beq _02240B30 - add r0, r4, #0 - mov r1, #0xe - bl ov62_0222FB60 - b _02240B38 -_02240B30: - add r0, r4, #0 - mov r1, #0x11 - bl ov62_0222FB60 -_02240B38: - add r0, r4, #0 - bl ov62_02234520 - pop {r4, pc} -_02240B40: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_02231A88 - add r0, r4, #0 - mov r1, #0xd - bl ov62_0222FB60 -_02240B54: - pop {r4, pc} - nop -_02240B58: .word 0x00002028 - thumb_func_end ov62_02240AEC - - thumb_func_start ov62_02240B5C -ov62_02240B5C: ; 0x02240B5C - push {r4, lr} - add r4, r2, #0 - cmp r1, #0 - bne _02240B92 - cmp r0, #0 - beq _02240B6E - cmp r0, #1 - beq _02240B84 - pop {r4, pc} -_02240B6E: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_02240A24 - add r0, r4, #0 - mov r1, #0x11 - bl ov62_0222FB60 - pop {r4, pc} -_02240B84: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0x10 - bl ov62_0222FB60 -_02240B92: - pop {r4, pc} - thumb_func_end ov62_02240B5C - - thumb_func_start ov62_02240B94 -ov62_02240B94: ; 0x02240B94 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0x66 - bl sub_02030A80 - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, _02240BEC ; =0x000004D4 - ldr r1, [r4, r1] - ldr r0, [r5, r0] - lsl r0, r0, #2 - add r2, r5, r0 - ldr r0, _02240BF0 ; =0x00002608 - ldr r0, [r2, r0] - bl ov61_0222AFC0 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r0, #0x8c - str r1, [r4, r0] - mov r0, #0x66 - bl sub_0202FF2C - mov r1, #0x89 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, _02240BEC ; =0x000004D4 - ldr r1, [r4, r1] - ldr r0, [r5, r0] - lsl r0, r0, #2 - add r2, r5, r0 - ldr r0, _02240BF0 ; =0x00002608 - ldr r0, [r2, r0] - mov r2, #0x64 - add r0, #0x80 - bl sub_020C4DB0 - pop {r3, r4, r5, pc} - nop -_02240BEC: .word 0x000004D4 -_02240BF0: .word 0x00002608 - thumb_func_end ov62_02240B94 - - thumb_func_start ov62_02240BF4 -ov62_02240BF4: ; 0x02240BF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x80 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #8] - ldr r0, [r0, r1] - ldr r1, _02240D80 ; =0x000004A4 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - ldr r5, _02240D84 ; =0x02249034 - ldrsh r2, [r0, r1] - add r4, sp, #0x50 - mov r3, #6 -_02240C0E: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _02240C0E - mov r1, #0 - add r0, sp, #0x38 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - str r1, [r0, #0x10] - str r1, [r0, #0x14] - add r0, sp, #0x20 - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - str r1, [r0, #0x10] - str r1, [r0, #0x14] - str r1, [sp, #0x18] - ldr r0, [sp, #8] - lsl r1, r2, #2 - add r0, r0, r1 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - str r0, [sp, #0xc] -_02240C42: - ldr r1, _02240D88 ; =0x00002608 - ldr r0, [sp, #0x10] - ldr r0, [r0, r1] - cmp r0, #0 - bne _02240C4E - b _02240D5C -_02240C4E: - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _02240C5C - mov r0, #1 - b _02240C5E -_02240C5C: - mov r0, #0 -_02240C5E: - mov r7, #0 - add r1, r7, #0 - add r2, sp, #0x38 - add r4, sp, #0x20 - add r3, r7, #0 -_02240C68: - stmia r2!, {r3} - add r1, r1, #1 - stmia r4!, {r3} - cmp r1, #6 - blt _02240C68 - mov r1, #0x18 - mul r1, r0 - add r0, sp, #0x50 - str r1, [sp, #0x1c] - add r0, r0, r1 - add r1, sp, #0x38 - add r2, sp, #0x20 -_02240C80: - ldr r5, [sp, #0x10] - ldr r4, _02240D88 ; =0x00002608 - ldr r6, [r0, #0] - ldr r5, [r5, r4] - lsl r4, r6, #1 - add r4, r5, r4 - add r4, #0x80 - ldrh r4, [r4] - cmp r4, #0 - beq _02240CA6 - stmia r1!, {r4} - ldr r5, [sp, #0x10] - ldr r4, _02240D88 ; =0x00002608 - add r7, r7, #1 - ldr r4, [r5, r4] - add r4, r4, r6 - add r4, #0x98 - ldrb r4, [r4] - stmia r2!, {r4} -_02240CA6: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, #3 - blt _02240C80 - ldr r1, _02240D88 ; =0x00002608 - ldr r0, [sp, #0x10] - ldr r0, [r0, r1] - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _02240CC0 - mov r7, #3 -_02240CC0: - ldr r0, [sp, #0x1c] - add r1, sp, #0x50 - add r0, r1, r0 - lsl r4, r7, #2 - add r1, sp, #0x38 - add r2, sp, #0x20 - mov r3, #3 - add r0, #0xc - add r1, r1, r4 - add r2, r2, r4 -_02240CD4: - ldr r5, [sp, #0x10] - ldr r4, _02240D88 ; =0x00002608 - ldr r6, [r0, #0] - ldr r5, [r5, r4] - lsl r4, r6, #1 - add r4, r5, r4 - add r4, #0x80 - ldrh r4, [r4] - cmp r4, #0 - beq _02240CFA - stmia r1!, {r4} - ldr r5, [sp, #0x10] - ldr r4, _02240D88 ; =0x00002608 - add r7, r7, #1 - ldr r4, [r5, r4] - add r4, r4, r6 - add r4, #0x98 - ldrb r4, [r4] - stmia r2!, {r4} -_02240CFA: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, #6 - blt _02240CD4 - ldr r5, [sp, #0xc] - mov r7, #0 - add r6, sp, #0x38 - add r4, sp, #0x20 -_02240D0A: - ldr r2, [sp, #0x14] - ldr r1, _02240D8C ; =0x00002088 - ldr r3, [r6, #0] - ldr r2, [r2, r1] - ldr r0, [r4, #0] - add r1, r1, #4 - str r2, [r5, r1] - str r0, [sp] - mov r0, #0 - mov r1, #0x82 - str r0, [sp, #4] - ldr r2, [sp, #0x14] - lsl r1, r1, #6 - ldr r1, [r2, r1] - ldr r2, _02240D90 ; =0x0000208C - ldr r0, [sp, #8] - ldr r2, [r5, r2] - bl ov62_02233A7C - ldr r1, _02240D94 ; =0x00002090 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02240D44 - mov r1, #6 - sub r1, r1, r7 - bl sub_0200D474 -_02240D44: - ldr r1, [sp, #0x14] - ldr r0, _02240D8C ; =0x00002088 - add r7, r7, #1 - ldr r0, [r1, r0] - add r6, r6, #4 - add r2, r0, #1 - ldr r0, _02240D8C ; =0x00002088 - add r4, r4, #4 - add r5, #8 - str r2, [r1, r0] - cmp r7, #6 - blt _02240D0A -_02240D5C: - ldr r0, [sp, #0x10] - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r0, #0x30 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #5 - bge _02240D74 - b _02240C42 -_02240D74: - ldr r0, [sp, #8] - bl ov62_0223DFA8 - add sp, #0x80 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240D80: .word 0x000004A4 -_02240D84: .word 0x02249034 -_02240D88: .word 0x00002608 -_02240D8C: .word 0x00002088 -_02240D90: .word 0x0000208C -_02240D94: .word 0x00002090 - thumb_func_end ov62_02240BF4 - - thumb_func_start ov62_02240D98 -ov62_02240D98: ; 0x02240D98 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0 - str r1, [sp, #4] - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - ldr r7, _02240DD8 ; =0x00002090 - str r0, [sp] -_02240DAC: - ldr r5, [sp] - mov r4, #0 -_02240DB0: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02240DBC - add r1, r6, #0 - bl sub_0200D3F4 -_02240DBC: - add r4, r4, #1 - add r5, #8 - cmp r4, #6 - blt _02240DB0 - ldr r0, [sp] - add r0, #0x30 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _02240DAC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240DD8: .word 0x00002090 - thumb_func_end ov62_02240D98 - - thumb_func_start ov62_02240DDC -ov62_02240DDC: ; 0x02240DDC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - mov r0, #0 - str r0, [sp, #4] - mov r0, #0x86 - lsl r0, r0, #4 - ldr r0, [r6, r0] - mov r7, #0 - str r0, [sp] -_02240DF0: - ldr r5, [sp] - mov r4, #0 -_02240DF4: - ldr r0, _02240E28 ; =0x00002090 - ldr r2, [r5, r0] - cmp r2, #0 - beq _02240E0A - ldr r1, _02240E2C ; =0x0000208C - add r0, r6, #0 - ldr r1, [r5, r1] - bl ov62_02233B24 - ldr r0, _02240E28 ; =0x00002090 - str r7, [r5, r0] -_02240E0A: - add r4, r4, #1 - add r5, #8 - cmp r4, #6 - blt _02240DF4 - ldr r0, [sp] - add r0, #0x30 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _02240DF0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240E28: .word 0x00002090 -_02240E2C: .word 0x0000208C - thumb_func_end ov62_02240DDC - - thumb_func_start ov62_02240E30 -ov62_02240E30: ; 0x02240E30 - push {r4, r5, r6, r7, lr} - sub sp, #0xa4 - mov r1, #0 - str r1, [sp, #0x20] - ldr r2, [sp, #0x20] - add r1, sp, #0x8c - str r2, [r1, #0] - str r2, [r1, #4] - str r2, [r1, #8] - str r2, [r1, #0xc] - str r2, [r1, #0x10] - str r2, [r1, #0x14] - mov r2, #0x86 - lsl r2, r2, #4 - add r1, r0, #0 - ldr r1, [r1, r2] - ldr r2, _022410CC ; =0x00002084 - str r1, [sp, #0x1c] - ldr r3, [r1, r2] - ldr r2, _022410D0 ; =0x000004A4 - add r1, r0, #0 - ldrsh r1, [r1, r2] - str r0, [sp, #8] - cmp r3, r1 - bne _02240E64 - b _022410C6 -_02240E64: - mov r1, #1 - bl ov62_02234540 - ldr r1, _022410CC ; =0x00002084 - ldr r0, [sp, #0x1c] - ldr r2, [r0, r1] - ldr r1, _022410D0 ; =0x000004A4 - ldr r0, [sp, #8] - ldrsh r0, [r0, r1] - cmp r2, r0 - ble _02240E7E - mov r0, #4 - str r0, [sp, #0x20] -_02240E7E: - ldr r0, [sp, #0x20] - mov r1, #0x30 - mul r1, r0 - ldr r0, [sp, #0x1c] - mov r6, #0 - add r4, r0, r1 - add r5, sp, #0x8c - add r7, r6, #0 -_02240E8E: - ldr r0, _022410D4 ; =0x00002090 - ldr r2, [r4, r0] - cmp r2, #0 - beq _02240EAA - ldr r1, _022410D8 ; =0x0000208C - ldr r0, [sp, #8] - ldr r1, [r4, r1] - bl ov62_02233B40 - ldr r0, _022410D8 ; =0x0000208C - ldr r0, [r4, r0] - str r0, [r5, #0] - ldr r0, _022410D4 ; =0x00002090 - str r7, [r4, r0] -_02240EAA: - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #6 - blt _02240E8E - ldr r0, [sp, #0x20] - cmp r0, #0 - beq _02240EF4 - ldr r2, _022410DC ; =0x00002060 - ldr r7, [sp, #0x1c] - mov r0, #4 - add r3, r2, #0 - add r5, r2, #0 - str r0, [sp, #0xc] - add r7, #0xc0 - add r3, #0x30 - sub r4, r2, #4 - add r5, #0x2c -_02240ECE: - mov r0, #0 - add r1, r7, #0 -_02240ED2: - ldr r6, [r1, r2] - add r0, r0, #1 - str r6, [r1, r3] - ldr r6, [r1, r4] - str r6, [r1, r5] - add r1, #8 - cmp r0, #6 - blt _02240ED2 - ldr r0, [sp, #0xc] - sub r7, #0x30 - sub r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #1 - bge _02240ECE - mov r0, #0 - str r0, [sp, #0x10] - b _02240F2C -_02240EF4: - ldr r6, _022410D4 ; =0x00002090 - ldr r7, [sp, #0x1c] - mov r0, #1 - add r2, r6, #0 - add r4, r6, #0 - mov ip, r0 - add r7, #0x30 - sub r2, #0x30 - sub r3, r6, #4 - sub r4, #0x34 -_02240F08: - mov r1, #0 - add r0, r7, #0 -_02240F0C: - ldr r5, [r0, r6] - add r1, r1, #1 - str r5, [r0, r2] - ldr r5, [r0, r3] - str r5, [r0, r4] - add r0, #8 - cmp r1, #6 - blt _02240F0C - mov r0, ip - add r0, r0, #1 - add r7, #0x30 - mov ip, r0 - cmp r0, #5 - blt _02240F08 - mov r0, #4 - str r0, [sp, #0x10] -_02240F2C: - ldr r1, _022410D0 ; =0x000004A4 - ldr r0, [sp, #8] - ldr r5, _022410E0 ; =0x02249004 - ldrsh r1, [r0, r1] - ldr r0, [sp, #0x10] - add r4, sp, #0x5c - add r2, r1, r0 - mov r3, #6 -_02240F3C: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _02240F3C - add r0, sp, #0x44 - mov r4, #0 - str r4, [r0, #0] - str r4, [r0, #4] - str r4, [r0, #8] - str r4, [r0, #0xc] - str r4, [r0, #0x10] - str r4, [r0, #0x14] - add r0, sp, #0x2c - str r4, [r0, #0] - str r4, [r0, #4] - str r4, [r0, #8] - str r4, [r0, #0xc] - str r4, [r0, #0x10] - str r4, [r0, #0x14] - lsl r0, r2, #2 - str r0, [sp, #0x14] - ldr r1, _022410E4 ; =0x00002608 - ldr r0, [sp, #8] - add r1, r0, r1 - ldr r0, [sp, #0x14] - str r1, [sp, #0x24] - ldr r0, [r1, r0] - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _02240F7E - mov r4, #1 -_02240F7E: - mov r0, #0 - str r0, [sp, #0x18] - add r1, sp, #0x44 - add r2, sp, #0x2c - add r6, r0, #0 -_02240F88: - stmia r1!, {r6} - add r0, r0, #1 - stmia r2!, {r6} - cmp r0, #6 - blt _02240F88 - mov r0, #0x18 - mul r0, r4 - add r1, sp, #0x5c - add r2, r1, r0 - str r0, [sp, #0x28] - ldr r1, [sp, #8] - ldr r0, [sp, #0x14] - add r3, sp, #0x44 - add r5, sp, #0x2c - add r4, r1, r0 -_02240FA6: - ldr r0, _022410E4 ; =0x00002608 - ldr r7, [r2, #0] - ldr r1, [r4, r0] - lsl r0, r7, #1 - add r0, r1, r0 - add r0, #0x80 - ldrh r0, [r0] - cmp r0, #0 - beq _02240FCC - stmia r3!, {r0} - ldr r0, _022410E4 ; =0x00002608 - ldr r0, [r4, r0] - add r0, r0, r7 - add r0, #0x98 - ldrb r0, [r0] - stmia r5!, {r0} - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] -_02240FCC: - add r6, r6, #1 - add r2, r2, #4 - cmp r6, #3 - blt _02240FA6 - ldr r1, [sp, #0x24] - ldr r0, [sp, #0x14] - ldr r0, [r1, r0] - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _02240FE8 - mov r0, #3 - str r0, [sp, #0x18] -_02240FE8: - ldr r0, [sp, #0x28] - add r1, sp, #0x5c - add r2, r1, r0 - ldr r0, [sp, #0x18] - mov r6, #3 - lsl r1, r0, #2 - add r0, sp, #0x44 - add r3, r0, r1 - add r0, sp, #0x2c - add r2, #0xc - add r5, r0, r1 -_02240FFE: - ldr r0, _022410E4 ; =0x00002608 - ldr r7, [r2, #0] - ldr r1, [r4, r0] - lsl r0, r7, #1 - add r0, r1, r0 - add r0, #0x80 - ldrh r0, [r0] - cmp r0, #0 - beq _02241024 - stmia r3!, {r0} - ldr r0, _022410E4 ; =0x00002608 - ldr r0, [r4, r0] - add r0, r0, r7 - add r0, #0x98 - ldrb r0, [r0] - stmia r5!, {r0} - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] -_02241024: - add r6, r6, #1 - add r2, r2, #4 - cmp r6, #6 - blt _02240FFE - ldr r0, [sp, #0x10] - mov r1, #0x30 - mul r1, r0 - ldr r0, [sp, #0x1c] - mov r5, #0 - add r7, sp, #0x44 - add r6, sp, #0x2c - add r4, r0, r1 -_0224103C: - ldr r2, [sp, #0x1c] - ldr r1, _022410E8 ; =0x00002088 - ldr r3, [r7, #0] - ldr r2, [r2, r1] - ldr r0, [r6, #0] - add r1, r1, #4 - str r2, [r4, r1] - str r0, [sp] - mov r0, #0 - mov r1, #0x82 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - lsl r1, r1, #6 - ldr r1, [r2, r1] - ldr r2, _022410D8 ; =0x0000208C - ldr r0, [sp, #8] - ldr r2, [r4, r2] - bl ov62_02233A7C - ldr r1, _022410D4 ; =0x00002090 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02241076 - mov r1, #6 - sub r1, r1, r5 - bl sub_0200D474 -_02241076: - ldr r1, [sp, #0x1c] - ldr r0, _022410E8 ; =0x00002088 - add r5, r5, #1 - ldr r0, [r1, r0] - add r7, r7, #4 - add r2, r0, #1 - ldr r0, _022410E8 ; =0x00002088 - add r6, r6, #4 - add r4, #8 - str r2, [r1, r0] - cmp r5, #6 - blt _0224103C - ldr r0, [sp, #8] - bl ov62_0223DFA8 - ldr r1, _022410D0 ; =0x000004A4 - ldr r0, [sp, #8] - ldr r6, _022410EC ; =0x000186A0 - ldrsh r2, [r0, r1] - ldr r1, _022410CC ; =0x00002084 - ldr r0, [sp, #0x1c] - mov r5, #0 - str r2, [r0, r1] - add r4, sp, #0x8c -_022410A6: - ldr r1, [r4, #0] - cmp r1, #0 - beq _022410B6 - ldr r0, [sp, #8] - add r1, r1, r6 - ldr r0, [r0, #0x1c] - bl sub_0200D070 -_022410B6: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #6 - blt _022410A6 - ldr r0, [sp, #8] - mov r1, #0 - bl ov62_02234540 -_022410C6: - add sp, #0xa4 - pop {r4, r5, r6, r7, pc} - nop -_022410CC: .word 0x00002084 -_022410D0: .word 0x000004A4 -_022410D4: .word 0x00002090 -_022410D8: .word 0x0000208C -_022410DC: .word 0x00002060 -_022410E0: .word 0x02249004 -_022410E4: .word 0x00002608 -_022410E8: .word 0x00002088 -_022410EC: .word 0x000186A0 - thumb_func_end ov62_02240E30 - - thumb_func_start ov62_022410F0 -ov62_022410F0: ; 0x022410F0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov62_022312B0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D0F4 - add r0, r5, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_022410F0 - - thumb_func_start ov62_0224112C -ov62_0224112C: ; 0x0224112C - add r0, #0x68 - bx lr - thumb_func_end ov62_0224112C - - thumb_func_start ov62_02241130 -ov62_02241130: ; 0x02241130 - push {r4, lr} - sub sp, #0x40 - add r4, r0, #0 - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02025CCC - bl sub_02025D74 - str r0, [sp] - mov r0, #0x66 - str r0, [sp, #4] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, sp, #0 - str r0, [sp, #8] - ldr r0, _02241190 ; =ov62_02239D34 - str r4, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02241194 ; =ov62_02239D38 - str r4, [sp, #0x3c] - str r0, [sp, #0x14] - ldr r0, _02241198 ; =ov62_0223CAA4 - add r4, #0x68 - str r0, [sp, #0x18] - ldr r0, _0224119C ; =ov62_0223CAA8 - str r0, [sp, #0x1c] - ldr r0, _022411A0 ; =ov62_0223DF10 - str r0, [sp, #0x20] - ldr r0, _022411A4 ; =ov62_0223DF4C - str r0, [sp, #0x24] - ldr r0, _022411A8 ; =ov62_02246944 - str r0, [sp, #0x28] - ldr r0, _022411AC ; =ov62_02233828 - str r0, [sp, #0x2c] - ldr r0, _022411B0 ; =ov62_02246968 - str r0, [sp, #0x30] - ldr r0, _022411B4 ; =ov62_0224699C - str r0, [sp, #0x34] - mov r0, #0 - str r0, [sp, #0x38] - add r0, r4, #0 - bl ov61_0222B008 - add sp, #0x40 - pop {r4, pc} - ; .align 2, 0 -_02241190: .word ov62_02239D34 -_02241194: .word ov62_02239D38 -_02241198: .word ov62_0223CAA4 -_0224119C: .word ov62_0223CAA8 -_022411A0: .word ov62_0223DF10 -_022411A4: .word ov62_0223DF4C -_022411A8: .word ov62_02246944 -_022411AC: .word ov62_02233828 -_022411B0: .word ov62_02246968 -_022411B4: .word ov62_0224699C - thumb_func_end ov62_02241130 - - thumb_func_start ov62_022411B8 -ov62_022411B8: ; 0x022411B8 - push {r3, lr} - mov r1, #0x42 - lsl r1, r1, #4 - ldr r1, [r0, r1] - cmp r1, #0 - bne _022411C8 - mov r0, #0 - pop {r3, pc} -_022411C8: - bl ov62_0224112C - bl ov61_0222BBBC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_022411B8 - - thumb_func_start ov62_022411D4 -ov62_022411D4: ; 0x022411D4 - push {r3, lr} - mov r1, #0x42 - lsl r1, r1, #4 - ldr r1, [r0, r1] - cmp r1, #0 - beq _022411E8 - bl ov62_0224112C - bl ov61_0222B57C -_022411E8: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_022411D4 - - thumb_func_start ov62_022411EC -ov62_022411EC: ; 0x022411EC - push {r3, lr} - mov r1, #0x42 - lsl r1, r1, #4 - ldr r1, [r0, r1] - cmp r1, #0 - beq _02241200 - bl ov62_0224112C - bl ov61_0222B0F0 -_02241200: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_022411EC - - thumb_func_start ov62_02241204 -ov62_02241204: ; 0x02241204 - push {r4, r5, r6, r7, lr} - sub sp, #0x84 - ldr r4, _02241270 ; =0x02249430 - add r3, sp, #0xc - mov r2, #0x3c -_0224120E: - ldrh r1, [r4] - add r4, r4, #2 - strh r1, [r3] - add r3, r3, #2 - sub r2, r2, #1 - bne _0224120E - mov r1, #0 - str r1, [sp, #8] - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - ldr r7, _02241274 ; =0x0000051C - str r0, [sp, #4] - ldr r0, [sp, #8] - str r0, [sp] -_0224122C: - ldr r0, [sp] - ldr r4, [sp, #4] - lsl r1, r0, #2 - add r0, sp, #0xc - mov r6, #0 - add r5, r0, r1 -_02241238: - ldr r0, [r4, r7] - cmp r0, #0 - beq _0224124A - mov r1, #0 - mov r2, #2 - ldrsh r1, [r5, r1] - ldrsh r2, [r5, r2] - bl sub_0200D4C4 -_0224124A: - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #6 - blt _02241238 - ldr r0, [sp, #4] - add r0, #0x30 - str r0, [sp, #4] - ldr r0, [sp] - add r0, r0, #6 - str r0, [sp] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #5 - blt _0224122C - add sp, #0x84 - pop {r4, r5, r6, r7, pc} - nop -_02241270: .word 0x02249430 -_02241274: .word 0x0000051C - thumb_func_end ov62_02241204 - - thumb_func_start ov62_02241278 -ov62_02241278: ; 0x02241278 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x80 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #8] - ldr r0, [r0, r1] - ldr r4, _02241400 ; =0x022492F0 - str r0, [sp, #0x14] - add r3, sp, #0x50 - mov r2, #6 -_0224128C: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224128C - mov r0, #0 - add r1, sp, #0x38 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - str r0, [r1, #0xc] - str r0, [r1, #0x10] - str r0, [r1, #0x14] - add r1, sp, #0x20 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - str r0, [r1, #0xc] - str r0, [r1, #0x10] - str r0, [r1, #0x14] - str r0, [sp, #0x18] - ldr r1, _02241404 ; =0x000004A4 - ldr r0, [sp, #8] - ldrsh r0, [r0, r1] - lsl r1, r0, #2 - ldr r0, [sp, #8] - add r0, r0, r1 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - str r0, [sp, #0xc] -_022412C6: - ldr r1, _02241408 ; =0x00002608 - ldr r0, [sp, #0x10] - ldr r0, [r0, r1] - cmp r0, #0 - bne _022412D2 - b _022413DE -_022412D2: - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _022412E0 - mov r0, #1 - b _022412E2 -_022412E0: - mov r0, #0 -_022412E2: - mov r7, #0 - add r1, r7, #0 - add r2, sp, #0x38 - add r4, sp, #0x20 - add r3, r7, #0 -_022412EC: - stmia r2!, {r3} - add r1, r1, #1 - stmia r4!, {r3} - cmp r1, #6 - blt _022412EC - mov r1, #0x18 - mul r1, r0 - add r0, sp, #0x50 - str r1, [sp, #0x1c] - add r0, r0, r1 - add r1, sp, #0x38 - add r2, sp, #0x20 -_02241304: - ldr r5, [sp, #0x10] - ldr r4, _02241408 ; =0x00002608 - ldr r6, [r0, #0] - ldr r5, [r5, r4] - lsl r4, r6, #1 - add r4, r5, r4 - add r4, #0x80 - ldrh r4, [r4] - cmp r4, #0 - beq _0224132A - stmia r1!, {r4} - ldr r5, [sp, #0x10] - ldr r4, _02241408 ; =0x00002608 - add r7, r7, #1 - ldr r4, [r5, r4] - add r4, r4, r6 - add r4, #0x98 - ldrb r4, [r4] - stmia r2!, {r4} -_0224132A: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, #3 - blt _02241304 - ldr r1, _02241408 ; =0x00002608 - ldr r0, [sp, #0x10] - ldr r0, [r0, r1] - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _02241344 - mov r7, #3 -_02241344: - ldr r0, [sp, #0x1c] - add r1, sp, #0x50 - add r0, r1, r0 - lsl r4, r7, #2 - add r1, sp, #0x38 - add r2, sp, #0x20 - mov r3, #3 - add r0, #0xc - add r1, r1, r4 - add r2, r2, r4 -_02241358: - ldr r5, [sp, #0x10] - ldr r4, _02241408 ; =0x00002608 - ldr r6, [r0, #0] - ldr r5, [r5, r4] - lsl r4, r6, #1 - add r4, r5, r4 - add r4, #0x80 - ldrh r4, [r4] - cmp r4, #0 - beq _0224137E - stmia r1!, {r4} - ldr r5, [sp, #0x10] - ldr r4, _02241408 ; =0x00002608 - add r7, r7, #1 - ldr r4, [r5, r4] - add r4, r4, r6 - add r4, #0x98 - ldrb r4, [r4] - stmia r2!, {r4} -_0224137E: - add r3, r3, #1 - add r0, r0, #4 - cmp r3, #6 - blt _02241358 - ldr r5, [sp, #0xc] - mov r7, #0 - add r6, sp, #0x38 - add r4, sp, #0x20 -_0224138E: - ldr r2, [sp, #0x14] - ldr r1, _0224140C ; =0x00000514 - ldr r3, [r6, #0] - ldr r2, [r2, r1] - ldr r0, [r4, #0] - add r1, r1, #4 - str r2, [r5, r1] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x14] - ldr r1, _02241410 ; =0x0000050C - ldr r0, [sp, #8] - ldr r1, [r2, r1] - ldr r2, _02241414 ; =0x00000518 - ldr r2, [r5, r2] - bl ov62_02233A7C - ldr r1, _02241418 ; =0x0000051C - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - cmp r0, #0 - beq _022413C6 - mov r1, #6 - sub r1, r1, r7 - bl sub_0200D474 -_022413C6: - ldr r1, [sp, #0x14] - ldr r0, _0224140C ; =0x00000514 - add r7, r7, #1 - ldr r0, [r1, r0] - add r6, r6, #4 - add r2, r0, #1 - ldr r0, _0224140C ; =0x00000514 - add r4, r4, #4 - add r5, #8 - str r2, [r1, r0] - cmp r7, #6 - blt _0224138E -_022413DE: - ldr r0, [sp, #0x10] - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r0, #0x30 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #5 - bge _022413F6 - b _022412C6 -_022413F6: - ldr r0, [sp, #8] - bl ov62_02241204 - add sp, #0x80 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241400: .word 0x022492F0 -_02241404: .word 0x000004A4 -_02241408: .word 0x00002608 -_0224140C: .word 0x00000514 -_02241410: .word 0x0000050C -_02241414: .word 0x00000518 -_02241418: .word 0x0000051C - thumb_func_end ov62_02241278 - - thumb_func_start ov62_0224141C -ov62_0224141C: ; 0x0224141C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - mov r1, #0 - str r1, [sp, #4] - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - ldr r7, _0224145C ; =0x0000051C - str r0, [sp] -_02241430: - ldr r5, [sp] - mov r4, #0 -_02241434: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02241440 - add r1, r6, #0 - bl sub_0200D3F4 -_02241440: - add r4, r4, #1 - add r5, #8 - cmp r4, #6 - blt _02241434 - ldr r0, [sp] - add r0, #0x30 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _02241430 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224145C: .word 0x0000051C - thumb_func_end ov62_0224141C - - thumb_func_start ov62_02241460 -ov62_02241460: ; 0x02241460 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r1, #0x86 - add r6, r0, #0 - lsl r1, r1, #4 - ldr r1, [r6, r1] - str r1, [sp] - mov r1, #1 - bl ov62_02234540 - mov r0, #0 - str r0, [sp, #4] - add r7, r0, #0 -_0224147A: - ldr r5, [sp] - mov r4, #0 -_0224147E: - ldr r0, _022414B8 ; =0x0000051C - ldr r2, [r5, r0] - cmp r2, #0 - beq _02241494 - ldr r1, _022414BC ; =0x00000518 - add r0, r6, #0 - ldr r1, [r5, r1] - bl ov62_02233B24 - ldr r0, _022414B8 ; =0x0000051C - str r7, [r5, r0] -_02241494: - add r4, r4, #1 - add r5, #8 - cmp r4, #6 - blt _0224147E - ldr r0, [sp] - add r0, #0x30 - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #5 - blt _0224147A - add r0, r6, #0 - mov r1, #0 - bl ov62_02234540 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022414B8: .word 0x0000051C -_022414BC: .word 0x00000518 - thumb_func_end ov62_02241460 - - thumb_func_start ov62_022414C0 -ov62_022414C0: ; 0x022414C0 - push {r4, r5, r6, r7, lr} - sub sp, #0xa4 - mov r1, #0 - str r1, [sp, #0x20] - ldr r2, [sp, #0x20] - add r1, sp, #0x8c - str r2, [r1, #0] - str r2, [r1, #4] - str r2, [r1, #8] - str r2, [r1, #0xc] - str r2, [r1, #0x10] - str r2, [r1, #0x14] - mov r2, #0x86 - lsl r2, r2, #4 - add r1, r0, #0 - ldr r1, [r1, r2] - mov r2, #0x51 - lsl r2, r2, #4 - ldr r3, [r1, r2] - str r1, [sp, #0x1c] - sub r2, #0x6c - add r1, r0, #0 - ldrsh r1, [r1, r2] - str r0, [sp, #8] - cmp r3, r1 - bne _022414F6 - b _02241758 -_022414F6: - mov r1, #1 - bl ov62_02234540 - mov r1, #0x51 - ldr r0, [sp, #0x1c] - lsl r1, r1, #4 - ldr r2, [r0, r1] - ldr r0, [sp, #8] - sub r1, #0x6c - ldrsh r0, [r0, r1] - cmp r2, r0 - ble _02241512 - mov r0, #4 - str r0, [sp, #0x20] -_02241512: - ldr r0, [sp, #0x20] - mov r1, #0x30 - mul r1, r0 - ldr r0, [sp, #0x1c] - mov r6, #0 - add r4, r0, r1 - add r5, sp, #0x8c - add r7, r6, #0 -_02241522: - ldr r0, _0224175C ; =0x0000051C - ldr r2, [r4, r0] - cmp r2, #0 - beq _0224153E - ldr r1, _02241760 ; =0x00000518 - ldr r0, [sp, #8] - ldr r1, [r4, r1] - bl ov62_02233B40 - ldr r0, _02241760 ; =0x00000518 - ldr r0, [r4, r0] - str r0, [r5, #0] - ldr r0, _0224175C ; =0x0000051C - str r7, [r4, r0] -_0224153E: - add r6, r6, #1 - add r4, #8 - add r5, r5, #4 - cmp r6, #6 - blt _02241522 - ldr r0, [sp, #0x20] - cmp r0, #0 - beq _02241588 - ldr r2, _02241764 ; =0x000004EC - ldr r7, [sp, #0x1c] - mov r0, #4 - add r3, r2, #0 - add r5, r2, #0 - str r0, [sp, #0xc] - add r7, #0xc0 - add r3, #0x30 - sub r4, r2, #4 - add r5, #0x2c -_02241562: - mov r0, #0 - add r1, r7, #0 -_02241566: - ldr r6, [r1, r2] - add r0, r0, #1 - str r6, [r1, r3] - ldr r6, [r1, r4] - str r6, [r1, r5] - add r1, #8 - cmp r0, #6 - blt _02241566 - ldr r0, [sp, #0xc] - sub r7, #0x30 - sub r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #1 - bge _02241562 - mov r0, #0 - str r0, [sp, #0x10] - b _022415C0 -_02241588: - ldr r6, _0224175C ; =0x0000051C - ldr r7, [sp, #0x1c] - mov r0, #1 - add r2, r6, #0 - add r4, r6, #0 - mov ip, r0 - add r7, #0x30 - sub r2, #0x30 - sub r3, r6, #4 - sub r4, #0x34 -_0224159C: - mov r1, #0 - add r0, r7, #0 -_022415A0: - ldr r5, [r0, r6] - add r1, r1, #1 - str r5, [r0, r2] - ldr r5, [r0, r3] - str r5, [r0, r4] - add r0, #8 - cmp r1, #6 - blt _022415A0 - mov r0, ip - add r0, r0, #1 - add r7, #0x30 - mov ip, r0 - cmp r0, #5 - blt _0224159C - mov r0, #4 - str r0, [sp, #0x10] -_022415C0: - ldr r1, _02241768 ; =0x000004A4 - ldr r0, [sp, #8] - ldr r5, _0224176C ; =0x02249320 - ldrsh r1, [r0, r1] - ldr r0, [sp, #0x10] - add r4, sp, #0x5c - add r2, r1, r0 - mov r3, #6 -_022415D0: - ldmia r5!, {r0, r1} - stmia r4!, {r0, r1} - sub r3, r3, #1 - bne _022415D0 - add r0, sp, #0x44 - mov r4, #0 - str r4, [r0, #0] - str r4, [r0, #4] - str r4, [r0, #8] - str r4, [r0, #0xc] - str r4, [r0, #0x10] - str r4, [r0, #0x14] - add r0, sp, #0x2c - str r4, [r0, #0] - str r4, [r0, #4] - str r4, [r0, #8] - str r4, [r0, #0xc] - str r4, [r0, #0x10] - str r4, [r0, #0x14] - lsl r0, r2, #2 - str r0, [sp, #0x14] - ldr r1, _02241770 ; =0x00002608 - ldr r0, [sp, #8] - add r1, r0, r1 - ldr r0, [sp, #0x14] - str r1, [sp, #0x24] - ldr r0, [r1, r0] - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _02241612 - mov r4, #1 -_02241612: - mov r0, #0 - str r0, [sp, #0x18] - add r1, sp, #0x44 - add r2, sp, #0x2c - add r6, r0, #0 -_0224161C: - stmia r1!, {r6} - add r0, r0, #1 - stmia r2!, {r6} - cmp r0, #6 - blt _0224161C - mov r0, #0x18 - mul r0, r4 - add r1, sp, #0x5c - add r2, r1, r0 - str r0, [sp, #0x28] - ldr r1, [sp, #8] - ldr r0, [sp, #0x14] - add r3, sp, #0x44 - add r5, sp, #0x2c - add r4, r1, r0 -_0224163A: - ldr r0, _02241770 ; =0x00002608 - ldr r7, [r2, #0] - ldr r1, [r4, r0] - lsl r0, r7, #1 - add r0, r1, r0 - add r0, #0x80 - ldrh r0, [r0] - cmp r0, #0 - beq _02241660 - stmia r3!, {r0} - ldr r0, _02241770 ; =0x00002608 - ldr r0, [r4, r0] - add r0, r0, r7 - add r0, #0x98 - ldrb r0, [r0] - stmia r5!, {r0} - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] -_02241660: - add r6, r6, #1 - add r2, r2, #4 - cmp r6, #3 - blt _0224163A - ldr r1, [sp, #0x24] - ldr r0, [sp, #0x14] - ldr r0, [r1, r0] - add r0, #0x80 - bl ov62_02233F94 - cmp r0, #0 - beq _0224167C - mov r0, #3 - str r0, [sp, #0x18] -_0224167C: - ldr r0, [sp, #0x28] - add r1, sp, #0x5c - add r2, r1, r0 - ldr r0, [sp, #0x18] - mov r6, #3 - lsl r1, r0, #2 - add r0, sp, #0x44 - add r3, r0, r1 - add r0, sp, #0x2c - add r2, #0xc - add r5, r0, r1 -_02241692: - ldr r0, _02241770 ; =0x00002608 - ldr r7, [r2, #0] - ldr r1, [r4, r0] - lsl r0, r7, #1 - add r0, r1, r0 - add r0, #0x80 - ldrh r0, [r0] - cmp r0, #0 - beq _022416B8 - stmia r3!, {r0} - ldr r0, _02241770 ; =0x00002608 - ldr r0, [r4, r0] - add r0, r0, r7 - add r0, #0x98 - ldrb r0, [r0] - stmia r5!, {r0} - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] -_022416B8: - add r6, r6, #1 - add r2, r2, #4 - cmp r6, #6 - blt _02241692 - ldr r0, [sp, #0x10] - mov r1, #0x30 - mul r1, r0 - ldr r0, [sp, #0x1c] - mov r5, #0 - add r7, sp, #0x44 - add r6, sp, #0x2c - add r4, r0, r1 -_022416D0: - ldr r2, [sp, #0x1c] - ldr r1, _02241774 ; =0x00000514 - ldr r3, [r7, #0] - ldr r2, [r2, r1] - ldr r0, [r6, #0] - add r1, r1, #4 - str r2, [r4, r1] - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - ldr r1, _02241778 ; =0x0000050C - ldr r0, [sp, #8] - ldr r1, [r2, r1] - ldr r2, _02241760 ; =0x00000518 - ldr r2, [r4, r2] - bl ov62_02233A7C - ldr r1, _0224175C ; =0x0000051C - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02241708 - mov r1, #6 - sub r1, r1, r5 - bl sub_0200D474 -_02241708: - ldr r1, [sp, #0x1c] - ldr r0, _02241774 ; =0x00000514 - add r5, r5, #1 - ldr r0, [r1, r0] - add r7, r7, #4 - add r2, r0, #1 - ldr r0, _02241774 ; =0x00000514 - add r6, r6, #4 - add r4, #8 - str r2, [r1, r0] - cmp r5, #6 - blt _022416D0 - ldr r0, [sp, #8] - bl ov62_02241204 - ldr r1, _02241768 ; =0x000004A4 - ldr r0, [sp, #8] - ldr r6, _0224177C ; =0x000186A0 - ldrsh r2, [r0, r1] - ldr r0, [sp, #0x1c] - add r1, #0x6c - str r2, [r0, r1] - mov r5, #0 - add r4, sp, #0x8c -_02241738: - ldr r1, [r4, #0] - cmp r1, #0 - beq _02241748 - ldr r0, [sp, #8] - add r1, r1, r6 - ldr r0, [r0, #0x1c] - bl sub_0200D070 -_02241748: - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #6 - blt _02241738 - ldr r0, [sp, #8] - mov r1, #0 - bl ov62_02234540 -_02241758: - add sp, #0xa4 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224175C: .word 0x0000051C -_02241760: .word 0x00000518 -_02241764: .word 0x000004EC -_02241768: .word 0x000004A4 -_0224176C: .word 0x02249320 -_02241770: .word 0x00002608 -_02241774: .word 0x00000514 -_02241778: .word 0x0000050C -_0224177C: .word 0x000186A0 - thumb_func_end ov62_022414C0 - - thumb_func_start ov62_02241780 -ov62_02241780: ; 0x02241780 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r0, [r0, r1] - mov r2, #0x13 - lsl r2, r2, #6 - ldrh r3, [r0, r2] - ldr r1, _022417BC ; =0x0000FFFF - cmp r3, r1 - beq _02241796 - mov r0, #1 - bx lr -_02241796: - add r1, r2, #2 - ldrb r1, [r0, r1] - cmp r1, #0xff - beq _022417A2 - mov r0, #1 - bx lr -_022417A2: - add r1, r2, #3 - ldrb r1, [r0, r1] - cmp r1, #0xff - bne _022417B2 - add r1, r2, #4 - ldrb r0, [r0, r1] - cmp r0, #0xff - beq _022417B6 -_022417B2: - mov r0, #1 - bx lr -_022417B6: - mov r0, #0 - bx lr - nop -_022417BC: .word 0x0000FFFF - thumb_func_end ov62_02241780 - - thumb_func_start ov62_022417C0 -ov62_022417C0: ; 0x022417C0 - push {r4, r5, r6, r7, lr} - sub sp, #0x9c - add r3, r1, #0 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r0, [r0, r1] - ldr r6, _022418C8 ; =0x022493D0 - str r0, [sp, #0x20] - add r4, sp, #0x3c - mov r2, #0xc -_022417D6: - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - sub r2, r2, #1 - bne _022417D6 - ldr r6, _022418CC ; =0x022491D8 - add r4, sp, #0x24 - add r2, r4, #0 - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - cmp r3, #0 - beq _022417F8 - cmp r3, #1 - b _02241804 -_022417F8: - ldr r1, _022418D0 ; =0x00000794 - ldr r0, [sp, #0x20] - mov r3, #6 - str r3, [r0, r1] - add r5, sp, #0x3c - str r2, [sp, #0x18] -_02241804: - mov r0, #0 - str r0, [sp, #0x1c] - ldr r1, _022418D0 ; =0x00000794 - ldr r0, [sp, #0x20] - mov r7, #1 - ldr r0, [r0, r1] - lsl r7, r7, #8 - cmp r0, #0 - ble _022418C4 - ldr r1, _022418D4 ; =0x00000614 - ldr r0, [sp, #0x20] - add r4, r0, r1 -_0224181C: - add r0, r4, #0 - bl sub_0201A7A0 - ldr r0, [r5, #4] - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r5, #8] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r5, #0] - ldr r0, [r0, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [r0, #0x48] - ldr r1, [r1, #0] - bl sub_0200B1EC - add r6, r0, #0 - ldr r1, [r5, #8] - ldr r0, [r5, #0xc] - mul r0, r1 - add r7, r7, r0 - mov r0, #0 - beq _02241880 - add r0, r4, #0 - add r1, r6, #0 - bl ov62_0223429C -_02241880: - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022418D8 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x20] - add r0, r0, #4 - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - add r4, #0x10 - add r0, r0, #1 - str r0, [sp, #0x1c] - ldr r0, _022418D0 ; =0x00000794 - add r5, #0x10 - ldr r1, [r1, r0] - ldr r0, [sp, #0x1c] - cmp r0, r1 - blt _0224181C -_022418C4: - add sp, #0x9c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022418C8: .word 0x022493D0 -_022418CC: .word 0x022491D8 -_022418D0: .word 0x00000794 -_022418D4: .word 0x00000614 -_022418D8: .word 0x000F0D00 - thumb_func_end ov62_022417C0 - - thumb_func_start ov62_022418DC -ov62_022418DC: ; 0x022418DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r6, [r5, r0] - ldr r7, _0224194C ; =0x00000644 - add r4, r1, #0 - add r0, r6, r7 - mov r1, #0 - bl sub_0201ADA4 - cmp r4, #0xff - bne _02241904 - ldr r0, [r5, #0x48] - mov r1, #0x7d - bl sub_0200B1EC - add r4, r0, #0 - b _02241924 -_02241904: - add r0, r4, #0 - sub r0, #0xfa - cmp r0, #3 - ldr r0, [r5, #0x48] - bhi _0224191A - sub r4, #0x55 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - b _02241924 -_0224191A: - add r4, #0x84 - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 -_02241924: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02241950 ; =0x000F0D00 - add r2, r4, #0 - str r0, [sp, #8] - add r0, r6, r7 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, r7 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224194C: .word 0x00000644 -_02241950: .word 0x000F0D00 - thumb_func_end ov62_022418DC - - thumb_func_start ov62_02241954 -ov62_02241954: ; 0x02241954 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x1fc - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r7, _022419C8 ; =0x00000654 - add r6, r1, #0 - add r0, r4, r7 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, _022419CC ; =0x0000FFFF - cmp r6, r0 - bne _02241980 - ldr r0, [r5, #0x48] - mov r1, #0x7d - bl sub_0200B1EC - add r5, r0, #0 - b _0224199C -_02241980: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0x66 - add r2, sp, #0x10 - bl sub_0200B274 - add r0, r5, #0 - add r1, sp, #0x10 - bl sub_02023D28 -_0224199C: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022419D0 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r7 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, r7 - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - add sp, #0x1fc - add sp, #0x14 - pop {r3, r4, r5, r6, r7, pc} - nop -_022419C8: .word 0x00000654 -_022419CC: .word 0x0000FFFF -_022419D0: .word 0x000F0D00 - thumb_func_end ov62_02241954 - - thumb_func_start ov62_022419D4 -ov62_022419D4: ; 0x022419D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r7, [r5, r0] - ldr r0, _02241A9C ; =0x00000664 - str r1, [sp, #0x10] - add r0, r7, r0 - mov r1, #0 - add r4, r2, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x10] - cmp r0, #0xff - bne _02241A04 - cmp r4, #0xff - bne _02241A04 - ldr r0, [r5, #0x48] - mov r1, #0x7d - bl sub_0200B1EC - str r0, [sp, #0x14] - b _02241A70 -_02241A04: - mov r0, #0x66 - bl ov62_02231690 - add r6, r0, #0 - cmp r4, #0 - beq _02241A3C - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x14] - ldr r0, [r5, #0x48] - mov r1, #0x17 - bl sub_0200B1EC - add r5, r0, #0 - ldr r2, [sp, #0x10] - add r0, r6, #0 - mov r1, #0 - add r3, r4, #0 - bl sub_0200BE08 - ldr r1, [sp, #0x14] - add r0, r6, #0 - add r2, r5, #0 - bl sub_0200C388 - b _02241A64 -_02241A3C: - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x14] - ldr r0, [r5, #0x48] - mov r1, #0x16 - bl sub_0200B1EC - add r5, r0, #0 - ldr r2, [sp, #0x10] - add r0, r6, #0 - mov r1, #0 - bl sub_0200BDD0 - ldr r1, [sp, #0x14] - add r0, r6, #0 - add r2, r5, #0 - bl sub_0200C388 -_02241A64: - add r0, r5, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 -_02241A70: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02241AA0 ; =0x000F0D00 - ldr r2, [sp, #0x14] - str r0, [sp, #8] - ldr r0, _02241A9C ; =0x00000664 - add r3, r1, #0 - add r0, r7, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _02241A9C ; =0x00000664 - add r0, r7, r0 - bl sub_0201A9A4 - ldr r0, [sp, #0x14] - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241A9C: .word 0x00000664 -_02241AA0: .word 0x000F0D00 - thumb_func_end ov62_022419D4 - - thumb_func_start ov62_02241AA4 -ov62_02241AA4: ; 0x02241AA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r3, r1, #0 - mov r1, #0x86 - lsl r1, r1, #4 - str r0, [sp, #0x14] - ldr r0, [r0, r1] - ldr r6, _02241BA8 ; =0x02249350 - str r0, [sp, #0x20] - add r4, sp, #0x30 - mov r2, #6 -_02241ABA: - ldmia r6!, {r0, r1} - stmia r4!, {r0, r1} - sub r2, r2, #1 - bne _02241ABA - ldr r6, _02241BAC ; =0x02249144 - add r4, sp, #0x24 - ldmia r6!, {r0, r1} - add r2, r4, #0 - stmia r4!, {r0, r1} - ldr r0, [r6, #0] - cmp r3, #0 - str r0, [r4, #0] - beq _02241AD8 - cmp r3, #1 - b _02241AE4 -_02241AD8: - ldr r1, _02241BB0 ; =0x00000798 - ldr r0, [sp, #0x20] - mov r3, #3 - str r3, [r0, r1] - add r5, sp, #0x30 - str r2, [sp, #0x18] -_02241AE4: - mov r0, #0 - str r0, [sp, #0x1c] - ldr r1, _02241BB0 ; =0x00000798 - ldr r0, [sp, #0x20] - mov r7, #1 - ldr r0, [r0, r1] - lsl r7, r7, #8 - cmp r0, #0 - ble _02241BA4 - ldr r0, [sp, #0x20] - sub r1, #0xc4 - add r4, r0, r1 -_02241AFC: - add r0, r4, #0 - bl sub_0201A7A0 - ldr r0, [r5, #4] - add r1, r4, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r5, #8] - mov r2, #6 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - lsl r0, r7, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r5, #0] - ldr r0, [r0, #0x24] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - ldr r0, [r0, #0x48] - ldr r1, [r1, #0] - bl sub_0200B1EC - add r6, r0, #0 - ldr r1, [r5, #8] - ldr r0, [r5, #0xc] - mul r0, r1 - add r7, r7, r0 - mov r0, #0 - beq _02241B60 - add r0, r4, #0 - add r1, r6, #0 - bl ov62_0223429C -_02241B60: - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02241BB4 ; =0x000F0D00 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - add r2, r6, #0 - add r3, r1, #0 - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x20] - add r0, r0, #4 - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - add r4, #0x10 - add r0, r0, #1 - str r0, [sp, #0x1c] - ldr r0, _02241BB0 ; =0x00000798 - add r5, #0x10 - ldr r1, [r1, r0] - ldr r0, [sp, #0x1c] - cmp r0, r1 - blt _02241AFC -_02241BA4: - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241BA8: .word 0x02249350 -_02241BAC: .word 0x02249144 -_02241BB0: .word 0x00000798 -_02241BB4: .word 0x000F0D00 - thumb_func_end ov62_02241AA4 - - thumb_func_start ov62_02241BB8 -ov62_02241BB8: ; 0x02241BB8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r6, [r0, r1] - sub r1, #0xcc - ldr r0, [r6, r1] - mov r4, #0 - cmp r0, #0 - ble _02241BE6 - ldr r0, _02241BF0 ; =0x00000614 - ldr r7, _02241BF4 ; =0x00000794 - add r5, r6, r0 -_02241BD0: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - ldr r0, [r6, r7] - add r4, r4, #1 - add r5, #0x10 - cmp r4, r0 - blt _02241BD0 -_02241BE6: - ldr r0, _02241BF4 ; =0x00000794 - mov r1, #0 - str r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_02241BF0: .word 0x00000614 -_02241BF4: .word 0x00000794 - thumb_func_end ov62_02241BB8 - - thumb_func_start ov62_02241BF8 -ov62_02241BF8: ; 0x02241BF8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r6, [r0, r1] - sub r1, #0xc8 - ldr r0, [r6, r1] - mov r4, #0 - cmp r0, #0 - ble _02241C28 - ldr r0, _02241C30 ; =0x000006D4 - add r7, r0, #0 - add r5, r6, r0 - add r7, #0xc4 -_02241C12: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - ldr r0, [r6, r7] - add r4, r4, #1 - add r5, #0x10 - cmp r4, r0 - blt _02241C12 -_02241C28: - ldr r0, _02241C34 ; =0x00000798 - mov r1, #0 - str r1, [r6, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241C30: .word 0x000006D4 -_02241C34: .word 0x00000798 - thumb_func_end ov62_02241BF8 - - thumb_func_start ov62_02241C38 -ov62_02241C38: ; 0x02241C38 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r6, _02241D18 ; =0x00000614 - add r0, r4, r6 - bl sub_0201A7A0 - mov r3, #3 - str r3, [sp] - mov r0, #0x14 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x20 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r2, #2 - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x7e - bl sub_0200B1EC - mov r1, #0 - add r7, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02241D1C ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, r6 - bl sub_0201A9A4 - add r0, r7, #0 - bl sub_020237BC - add r6, #0xc0 - add r0, r4, r6 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - add r0, #0xf2 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r3, #0xb - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x5f - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - bl sub_02002EB4 - mov r1, #0x50 - sub r0, r1, r0 - mov r1, #0 - lsr r3, r0, #1 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02241D1C ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, r6 - bl sub_0201A9A4 - add r0, r5, #0 - bl sub_020237BC - ldr r0, _02241D20 ; =0x00000798 - mov r1, #1 - str r1, [r4, r0] - sub r0, r0, #4 - str r1, [r4, r0] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241D18: .word 0x00000614 -_02241D1C: .word 0x000F0D00 -_02241D20: .word 0x00000798 - thumb_func_end ov62_02241C38 - - thumb_func_start ov62_02241D24 -ov62_02241D24: ; 0x02241D24 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02241D3C - cmp r1, #1 - beq _02241DE6 - b _02241E7E -_02241D3C: - bl ov62_02234314 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r5, #0 - mov r1, #0x38 - mov r2, #3 - bl ov62_022343B8 - add r0, r5, #0 - mov r1, #0x3b - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - add r0, r5, #0 - bl ov62_02245C64 - add r0, r5, #0 - mov r1, #0 - bl ov62_02245C08 - mov r1, #0x7d - ldr r0, _02241E8C ; =0x00000514 - lsl r1, r1, #2 - str r1, [r4, r0] - mov r0, #0x66 - str r0, [sp] - ldr r0, _02241E90 ; =0x022491AC - ldr r2, _02241E94 ; =ov62_022458A0 - mov r1, #5 - add r3, r5, #0 - bl sub_02023FCC - ldr r1, _02241E98 ; =0x00000608 - ldr r2, _02241E9C ; =ov62_02245968 - str r0, [r4, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _02241EA0 ; =0x022491F0 - mov r1, #9 - add r3, r5, #0 - bl sub_02023FCC - ldr r1, _02241EA4 ; =0x0000060C - add r5, #8 - str r0, [r4, r1] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _02241E84 -_02241DE6: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02241E64 - add r0, r5, #0 - mov r1, #0x7c - bl ov62_02231AAC - add r0, r5, #0 - mov r1, #0 - bl ov62_022417C0 - add r0, r5, #0 - mov r1, #0 - bl ov62_02241AA4 - mov r1, #0x13 - ldr r0, _02241EA8 ; =0x0000FFFF - lsl r1, r1, #6 - strh r0, [r4, r1] - mov r2, #0xff - add r0, r1, #2 - strb r2, [r4, r0] - add r0, r1, #3 - strb r2, [r4, r0] - add r0, r1, #4 - strb r2, [r4, r0] - ldrh r1, [r4, r1] - add r0, r5, #0 - bl ov62_02241954 - ldr r1, _02241EAC ; =0x000004C2 - add r0, r5, #0 - ldrb r1, [r4, r1] - bl ov62_022418DC - ldr r2, _02241EB0 ; =0x000004C3 - add r0, r5, #0 - ldrb r1, [r4, r2] - add r2, r2, #1 - ldrb r2, [r4, r2] - bl ov62_022419D4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02241E64: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02241E84 -_02241E7E: - mov r1, #3 - bl ov62_0222FB60 -_02241E84: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02241E8C: .word 0x00000514 -_02241E90: .word 0x022491AC -_02241E94: .word ov62_022458A0 -_02241E98: .word 0x00000608 -_02241E9C: .word ov62_02245968 -_02241EA0: .word 0x022491F0 -_02241EA4: .word 0x0000060C -_02241EA8: .word 0x0000FFFF -_02241EAC: .word 0x000004C2 -_02241EB0: .word 0x000004C3 - thumb_func_end ov62_02241D24 - - thumb_func_start ov62_02241EB4 -ov62_02241EB4: ; 0x02241EB4 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _02241EC8 ; =0x00000608 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02241EC8: .word 0x00000608 - thumb_func_end ov62_02241EB4 - - thumb_func_start ov62_02241ECC -ov62_02241ECC: ; 0x02241ECC - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02241EE6 - cmp r1, #1 - beq _02241F0E - cmp r1, #2 - beq _02241F48 - b _02241F72 -_02241EE6: - bl ov62_02241BB8 - add r0, r5, #0 - bl ov62_02241BF8 - add r0, r5, #0 - bl ov62_02231B8C - ldr r0, _0224201C ; =0x00000608 - ldr r0, [r4, r0] - bl sub_02024034 - ldr r0, _02242020 ; =0x0000060C - ldr r0, [r4, r0] - bl sub_02024034 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02242016 -_02241F0E: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02241F2E - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02241F2E: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242016 -_02241F48: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02245D50 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02242016 -_02241F72: - bl ov62_02233790 - cmp r0, #0 - beq _02242016 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02241FE6 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - bl sub_020181C4 - b _02242016 -_02241FE6: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_02242016: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0224201C: .word 0x00000608 -_02242020: .word 0x0000060C - thumb_func_end ov62_02241ECC - - thumb_func_start ov62_02242024 -ov62_02242024: ; 0x02242024 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0224203A - cmp r1, #1 - beq _02242044 - b _0224207E -_0224203A: - bl ov62_02241BF8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02242044: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242064 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02242064: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022420A6 -_0224207E: - ldr r1, _022420AC ; =0x000004C5 - ldrb r1, [r4, r1] - cmp r1, #0 - beq _02242090 - cmp r1, #1 - beq _02242098 - cmp r1, #2 - beq _022420A0 - b _022420A6 -_02242090: - mov r1, #6 - bl ov62_0222FB60 - b _022420A6 -_02242098: - mov r1, #7 - bl ov62_0222FB60 - b _022420A6 -_022420A0: - mov r1, #0xa - bl ov62_0222FB60 -_022420A6: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022420AC: .word 0x000004C5 - thumb_func_end ov62_02242024 - - thumb_func_start ov62_022420B0 -ov62_022420B0: ; 0x022420B0 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #4 - bls _022420C2 - b _02242258 -_022420C2: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022420CE: ; jump table - .short _022420D8 - _022420CE - 2 ; case 0 - .short _02242106 - _022420CE - 2 ; case 1 - .short _0224219C - _022420CE - 2 ; case 2 - .short _022421E6 - _022420CE - 2 ; case 3 - .short _02242216 - _022420CE - 2 ; case 4 -_022420D8: - mov r1, #0x71 - bl ov62_02231B3C - ldr r1, _02242264 ; =0x000004C2 - mov r0, #0xff - strb r0, [r5, r1] - ldrb r1, [r5, r1] - add r0, r4, #0 - bl ov62_022418DC - add r0, r4, #0 - mov r1, #1 - bl ov62_02245C08 - add r0, r4, #0 - mov r1, #0x3d - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242260 -_02242106: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242182 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _02242268 ; =0x0000047C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022335B0 - ldr r0, _0224226C ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - add r0, r4, #0 - bl sub_0208BE68 - cmp r0, #1 - ldr r0, _0224226C ; =0x0000049C - bne _02242152 - ldr r2, _02242270 ; =0x0224926C - add r0, r4, r0 - add r1, r4, #0 - bl ov62_022324A0 - b _0224215C -_02242152: - ldr r2, _02242274 ; =0x02249240 - add r0, r4, r0 - add r1, r4, #0 - bl ov62_022324A0 -_0224215C: - ldr r1, _02242268 ; =0x0000047C - add r0, r4, r1 - add r1, #0x20 - add r1, r4, r1 - bl ov62_02233638 - ldr r0, _0224226C ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - mov r2, #2 - bl ov62_0223331C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02242182: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242260 -_0224219C: - ldr r0, _02242268 ; =0x0000047C - add r0, r4, r0 - bl ov62_02233664 - ldr r1, _0224226C ; =0x0000049C - add r0, r4, r1 - sub r1, #0x10 - ldrsh r1, [r4, r1] - bl ov62_022332AC - ldr r0, _0224226C ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_02232F68 - add r1, r0, #0 - beq _022421CE - ldr r0, _02242264 ; =0x000004C2 - strb r1, [r5, r0] - add r0, r4, #0 - bl ov62_022418DC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022421CE: - ldr r0, _02242278 ; =0x02249138 - bl sub_02022760 - cmp r0, #0 - beq _02242260 - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242260 -_022421E6: - ldr r0, _02242268 ; =0x0000047C - add r0, r4, r0 - bl ov62_02233600 - ldr r0, _0224226C ; =0x0000049C - add r0, r4, r0 - bl ov62_022332FC - ldr r0, _0224226C ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022334FC - ldr r0, _02242268 ; =0x0000047C - add r0, r4, r0 - bl ov62_022335F4 - ldr r0, _0224226C ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02242216: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0224223E - add r0, r4, #0 - mov r1, #0 - bl ov62_02245C08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224223E: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242260 -_02242258: - add r0, r4, #0 - mov r1, #0xb - bl ov62_0222FB60 -_02242260: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242264: .word 0x000004C2 -_02242268: .word 0x0000047C -_0224226C: .word 0x0000049C -_02242270: .word 0x0224926C -_02242274: .word 0x02249240 -_02242278: .word 0x02249138 - thumb_func_end ov62_022420B0 - - thumb_func_start ov62_0224227C -ov62_0224227C: ; 0x0224227C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - bne _022422B0 - mov r1, #0x72 - bl ov62_02231B3C - mov r1, #0x13 - ldr r0, _022422BC ; =0x0000FFFF - lsl r1, r1, #6 - strh r0, [r4, r1] - ldrh r1, [r4, r1] - add r0, r5, #0 - bl ov62_02241954 - add r0, r5, #0 - mov r1, #1 - bl ov62_02245C08 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_022422B0: - add r0, r5, #0 - mov r1, #8 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022422BC: .word 0x0000FFFF - thumb_func_end ov62_0224227C - - thumb_func_start ov62_022422C0 -ov62_022422C0: ; 0x022422C0 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - str r0, [sp, #0x14] - mov r0, #1 - str r0, [sp, #0x28] - mov r1, #0x86 - ldr r0, [sp, #0x14] - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _022423C8 ; =0x000006D4 - ldr r5, _022423CC ; =0x022491F0 - mov r7, #0 - add r4, r1, r0 -_022422DA: - ldrb r0, [r5, #2] - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #0x24] - ldrb r0, [r5] - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #0x20] - ldrb r0, [r5, #3] - lsr r1, r0, #3 - ldr r0, [sp, #0x24] - sub r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - ldrb r0, [r5, #1] - lsr r1, r0, #3 - ldr r0, [sp, #0x20] - sub r0, r1, r0 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - add r0, r4, #0 - bl sub_0201A7A0 - ldr r0, [sp, #0x20] - add r1, r4, #0 - str r0, [sp] - ldr r0, [sp, #0x1c] - mov r2, #6 - str r0, [sp, #4] - str r6, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [sp, #0x24] - ldr r0, [r0, #0x24] - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - add r1, r7, #0 - ldr r0, [r0, #0x48] - add r1, #0x44 - bl sub_0200B1EC - str r0, [sp, #0x2c] - ldr r1, [sp, #0x2c] - add r0, r4, #0 - bl ov62_0223429C - lsl r1, r6, #3 - sub r1, #0x10 - str r0, [sp, #0x30] - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r1, r7, #0 - bl ov62_02242748 - cmp r0, #1 - bne _02242384 - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x2c] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022423D0 ; =0x000F0D00 - ldr r3, [sp, #0x30] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0 - bl sub_0201D78C - b _022423A0 -_02242384: - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x2c] - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022423D4 ; =0x000C0B00 - ldr r3, [sp, #0x30] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0 - bl sub_0201D78C -_022423A0: - add r0, r4, #0 - bl sub_0201A9A4 - ldr r0, [sp, #0x2c] - bl sub_020237BC - ldr r0, [sp, #0x1c] - add r7, r7, #1 - add r1, r0, #0 - ldr r0, [sp, #0x28] - mul r1, r6 - add r0, r0, r1 - str r0, [sp, #0x28] - add r4, #0x10 - add r5, r5, #4 - cmp r7, #9 - blo _022422DA - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_022423C8: .word 0x000006D4 -_022423CC: .word 0x022491F0 -_022423D0: .word 0x000F0D00 -_022423D4: .word 0x000C0B00 - thumb_func_end ov62_022422C0 - - thumb_func_start ov62_022423D8 -ov62_022423D8: ; 0x022423D8 - push {r3, r4, r5, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _022423FC ; =0x000006D4 - mov r4, #0 - add r5, r1, r0 -_022423E6: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #9 - blo _022423E6 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022423FC: .word 0x000006D4 - thumb_func_end ov62_022423D8 - - thumb_func_start ov62_02242400 -ov62_02242400: ; 0x02242400 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #4 - bhi _0224250A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224241C: ; jump table - .short _02242426 - _0224241C - 2 ; case 0 - .short _02242436 - _0224241C - 2 ; case 1 - .short _02242476 - _0224241C - 2 ; case 2 - .short _0224249E - _0224241C - 2 ; case 3 - .short _022424A8 - _0224241C - 2 ; case 4 -_02242426: - mov r1, #0x3c - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242524 -_02242436: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0224245C - add r0, r4, #0 - bl ov62_022422C0 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224245C: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242524 -_02242476: - ldr r0, _02242528 ; =0x0000060C - ldr r0, [r5, r0] - bl sub_0202404C - ldr r0, _0224252C ; =0x02249138 - bl sub_02022760 - cmp r0, #0 - bne _02242490 - ldr r0, _02242530 ; =0x000004D8 - ldr r0, [r5, r0] - cmp r0, #1 - bne _02242524 -_02242490: - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242524 -_0224249E: - bl ov62_022423D8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022424A8: - ldr r0, _02242530 ; =0x000004D8 - ldr r0, [r5, r0] - cmp r0, #1 - bne _022424C8 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242524 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242524 -_022424C8: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _022424F0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02245C08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022424F0: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242524 -_0224250A: - ldr r0, _02242530 ; =0x000004D8 - ldr r0, [r5, r0] - cmp r0, #1 - bne _0224251C - add r0, r4, #0 - mov r1, #9 - bl ov62_0222FB60 - b _02242524 -_0224251C: - add r0, r4, #0 - mov r1, #0xb - bl ov62_0222FB60 -_02242524: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242528: .word 0x0000060C -_0224252C: .word 0x02249138 -_02242530: .word 0x000004D8 - thumb_func_end ov62_02242400 - - thumb_func_start ov62_02242534 -ov62_02242534: ; 0x02242534 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #4 - bls _02242548 - b _02242702 -_02242548: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242554: ; jump table - .short _0224255E - _02242554 - 2 ; case 0 - .short _0224257E - _02242554 - 2 ; case 1 - .short _02242618 - _02242554 - 2 ; case 2 - .short _0224266C - _02242554 - 2 ; case 3 - .short _0224269C - _02242554 - 2 ; case 4 -_0224255E: - mov r1, #0x72 - bl ov62_02231B3C - add r0, r4, #0 - mov r1, #1 - bl ov62_02245C08 - add r0, r4, #0 - mov r1, #0x3a - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242726 -_0224257E: - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - bne _02242590 - b _02242726 -_02242590: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _0224272C ; =0x0000047C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022335B0 - mov r0, #0x4e - lsl r0, r0, #4 - ldr r3, _02242730 ; =0x022492C4 - add r2, r5, r0 - mov r6, #5 -_022425AC: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _022425AC - ldr r0, [r3, #0] - ldr r1, _02242734 ; =0x000004DC - str r0, [r2, #0] - ldr r2, [r5, r1] - add r0, r1, #4 - str r2, [r5, r0] - add r0, r1, #0 - sub r0, #0x14 - ldr r2, [r5, r0] - add r0, r1, #0 - add r0, #8 - sub r1, #0x40 - str r2, [r5, r0] - add r0, r4, r1 - bl ov62_02233310 - ldr r3, _02242738 ; =0x0000049C - add r1, r4, #0 - add r2, r3, #0 - add r2, #0x38 - add r0, r4, r3 - add r3, #0x44 - ldr r2, [r5, r2] - add r3, r5, r3 - bl ov62_02232594 - ldr r1, _0224273C ; =0x000004E4 - mov r0, #0 - str r0, [r4, r1] - add r0, r1, #0 - sub r0, #0x68 - sub r1, #0x48 - add r0, r4, r0 - add r1, r4, r1 - bl ov62_02233638 - ldr r0, _02242738 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - mov r2, #2 - bl ov62_0223331C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242726 -_02242618: - ldr r0, _0224272C ; =0x0000047C - add r0, r4, r0 - bl ov62_02233664 - ldr r1, _02242738 ; =0x0000049C - add r0, r4, r1 - sub r1, #0x10 - ldrsh r1, [r4, r1] - bl ov62_022332AC - ldr r0, _02242738 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_02232F68 - add r1, r0, #0 - beq _0224264C - mov r0, #0x13 - lsl r0, r0, #6 - strh r1, [r5, r0] - add r0, r4, #0 - bl ov62_02241954 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224264C: - ldr r0, _02242740 ; =0x02249138 - bl sub_02022760 - cmp r0, #0 - beq _02242726 - mov r0, #0x13 - ldr r1, _02242744 ; =0x0000FFFF - lsl r0, r0, #6 - strh r1, [r5, r0] - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242726 -_0224266C: - ldr r0, _0224272C ; =0x0000047C - add r0, r4, r0 - bl ov62_02233600 - ldr r0, _02242738 ; =0x0000049C - add r0, r4, r0 - bl ov62_022332FC - ldr r0, _02242738 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022334FC - ldr r0, _0224272C ; =0x0000047C - add r0, r4, r0 - bl ov62_022335F4 - ldr r0, _02242738 ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224269C: - mov r0, #0x13 - lsl r0, r0, #6 - ldrh r1, [r5, r0] - ldr r0, _02242744 ; =0x0000FFFF - cmp r1, r0 - beq _022426EA - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _022426D0 - add r0, r4, #0 - mov r1, #0 - bl ov62_02245C08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022426D0: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242726 -_022426EA: - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242726 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242726 -_02242702: - add r0, r4, #0 - bl ov62_02242938 - mov r0, #0x13 - lsl r0, r0, #6 - ldrh r1, [r5, r0] - ldr r0, _02242744 ; =0x0000FFFF - cmp r1, r0 - beq _0224271E - add r0, r4, #0 - mov r1, #0xb - bl ov62_0222FB60 - b _02242726 -_0224271E: - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 -_02242726: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224272C: .word 0x0000047C -_02242730: .word 0x022492C4 -_02242734: .word 0x000004DC -_02242738: .word 0x0000049C -_0224273C: .word 0x000004E4 -_02242740: .word 0x02249138 -_02242744: .word 0x0000FFFF - thumb_func_end ov62_02242534 - - thumb_func_start ov62_02242748 -ov62_02242748: ; 0x02242748 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #8] - add r0, r1, #1 - ldr r2, _022427C8 ; =0x02249944 - lsl r0, r0, #1 - ldrh r4, [r2, r0] - lsl r0, r1, #1 - ldrh r6, [r2, r0] - ldr r1, [sp, #8] - mov r0, #0x66 - add r2, sp, #0xc - bl ov62_02231948 - str r0, [sp, #4] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02027560 - str r0, [sp] - add r7, r6, #0 - cmp r6, r4 - bge _0224279A - ldr r0, [sp, #4] - lsl r1, r6, #1 - add r5, r0, r1 -_02242782: - ldrh r1, [r5] - ldr r0, [sp] - bl sub_02026FE8 - cmp r0, #0 - bne _02242792 - ldr r0, _022427CC ; =0x0000FFFF - strh r0, [r5] -_02242792: - add r7, r7, #1 - add r5, r5, #2 - cmp r7, r4 - blt _02242782 -_0224279A: - cmp r6, r4 - bge _022427BA - ldr r0, [sp, #4] - lsl r1, r6, #1 - add r2, r0, r1 - ldr r0, _022427CC ; =0x0000FFFF -_022427A6: - ldrh r1, [r2] - cmp r1, r0 - beq _022427B2 - mov r0, #1 - str r0, [sp, #8] - b _022427BA -_022427B2: - add r6, r6, #1 - add r2, r2, #2 - cmp r6, r4 - blt _022427A6 -_022427BA: - ldr r0, [sp, #4] - bl sub_020181C4 - ldr r0, [sp, #8] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_022427C8: .word 0x02249944 -_022427CC: .word 0x0000FFFF - thumb_func_end ov62_02242748 - - thumb_func_start ov62_022427D0 -ov62_022427D0: ; 0x022427D0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r0, r1, #1 - ldr r2, _02242920 ; =0x02249944 - lsl r0, r0, #1 - ldrh r6, [r2, r0] - lsl r0, r1, #1 - ldrh r0, [r2, r0] - ldr r2, _02242924 ; =0x000004CC - mov r1, #0 - str r0, [sp] - mov r0, #0x66 - add r2, r4, r2 - bl ov62_02231948 - mov r2, #0x4d - lsl r2, r2, #4 - str r0, [r4, r2] - sub r2, r2, #4 - mov r0, #0x66 - mov r1, #0 - add r2, r4, r2 - bl ov62_02231948 - str r0, [sp, #8] - mov r0, #0x83 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02027560 - str r0, [sp, #4] - ldr r0, _02242928 ; =0x000004C8 - mov r1, #0 - ldr r7, [sp] - str r1, [r4, r0] - add r0, r7, #0 - cmp r0, r6 - bge _0224284E - lsl r1, r0, #1 - ldr r0, [sp, #8] - add r5, r0, r1 -_0224282A: - ldrh r1, [r5] - ldr r0, [sp, #4] - bl sub_02026FE8 - cmp r0, #0 - bne _0224283C - ldr r0, _0224292C ; =0x0000FFFF - strh r0, [r5] - b _02242846 -_0224283C: - ldr r0, _02242928 ; =0x000004C8 - ldr r0, [r4, r0] - add r1, r0, #1 - ldr r0, _02242928 ; =0x000004C8 - str r1, [r4, r0] -_02242846: - add r7, r7, #1 - add r5, r5, #2 - cmp r7, r6 - blt _0224282A -_0224284E: - ldr r1, [sp] - mov r0, #0 - cmp r1, r6 - bge _0224287E - lsl r2, r1, #1 - ldr r1, [sp, #8] - ldr r7, _0224292C ; =0x0000FFFF - add r2, r1, r2 - add r3, r0, #0 -_02242860: - ldrh r1, [r2] - cmp r1, r7 - beq _02242872 - mov r5, #0x4d - lsl r5, r5, #4 - ldr r5, [r4, r5] - add r0, r0, #1 - strh r1, [r5, r3] - add r3, r3, #2 -_02242872: - ldr r1, [sp] - add r2, r2, #2 - add r1, r1, #1 - str r1, [sp] - cmp r1, r6 - blt _02242860 -_0224287E: - ldr r1, _02242924 ; =0x000004CC - ldr r1, [r4, r1] - cmp r0, r1 - bge _022428A4 - mov r7, #0x4d - ldr r1, [sp, #8] - lsl r6, r0, #1 - lsl r7, r7, #4 - add r5, r1, r6 - sub r1, r7, #4 -_02242892: - ldrh r3, [r5] - ldr r2, [r4, r7] - add r0, r0, #1 - strh r3, [r2, r6] - ldr r2, [r4, r1] - add r5, r5, #2 - add r6, r6, #2 - cmp r0, r2 - blt _02242892 -_022428A4: - ldr r0, [sp, #8] - bl sub_020181C4 - ldr r1, _02242928 ; =0x000004C8 - mov r0, #0x66 - ldr r1, [r4, r1] - lsl r1, r1, #4 - bl sub_02018144 - ldr r2, _02242930 ; =0x000004DC - mov r1, #0 - str r0, [r4, r2] - ldr r0, [r4, r2] - sub r2, #0x14 - ldr r2, [r4, r2] - lsl r2, r2, #4 - bl sub_020C4CF4 - ldr r0, _02242928 ; =0x000004C8 - mov r5, #0 - ldr r0, [r4, r0] - cmp r0, #0 - ble _02242904 - ldr r7, _02242930 ; =0x000004DC - add r2, r5, #0 - add r0, r7, #0 - add r3, r5, #0 - sub r0, #0x14 -_022428DC: - mov r1, #0x4d - lsl r1, r1, #4 - ldr r1, [r4, r1] - ldr r6, _02242930 ; =0x000004DC - ldrh r1, [r1, r2] - ldr r6, [r4, r6] - add r5, r5, #1 - str r1, [r6, r3] - mov r1, #0x4d - lsl r1, r1, #4 - ldr r1, [r4, r1] - ldr r6, [r4, r7] - ldrh r1, [r1, r2] - add r6, r6, r3 - add r2, r2, #2 - str r1, [r6, #4] - ldr r1, [r4, r0] - add r3, #0x10 - cmp r5, r1 - blt _022428DC -_02242904: - mov r2, #0x67 - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x66 - bl sub_0200B144 - ldr r1, _02242934 ; =0x000004D4 - mov r2, #1 - str r0, [r4, r1] - add r0, r1, #4 - str r2, [r4, r0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242920: .word 0x02249944 -_02242924: .word 0x000004CC -_02242928: .word 0x000004C8 -_0224292C: .word 0x0000FFFF -_02242930: .word 0x000004DC -_02242934: .word 0x000004D4 - thumb_func_end ov62_022427D0 - - thumb_func_start ov62_02242938 -ov62_02242938: ; 0x02242938 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - ldr r0, _02242964 ; =0x000004D4 - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _02242968 ; =0x000004DC - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x4d - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r0, _0224296C ; =0x000004D8 - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - nop -_02242964: .word 0x000004D4 -_02242968: .word 0x000004DC -_0224296C: .word 0x000004D8 - thumb_func_end ov62_02242938 - - thumb_func_start ov62_02242970 -ov62_02242970: ; 0x02242970 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #4 - bls _02242982 - b _02242B0C -_02242982: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224298E: ; jump table - .short _02242998 - _0224298E - 2 ; case 0 - .short _022429CE - _0224298E - 2 ; case 1 - .short _02242A46 - _0224298E - 2 ; case 2 - .short _02242AAA - _0224298E - 2 ; case 3 - .short _02242ACA - _0224298E - 2 ; case 4 -_02242998: - mov r1, #0x73 - bl ov62_02231B3C - ldr r2, _02242B18 ; =0x000004C3 - mov r1, #0xff - strb r1, [r5, r2] - add r0, r2, #1 - strb r1, [r5, r0] - ldrb r1, [r5, r2] - add r2, r2, #1 - ldrb r2, [r5, r2] - add r0, r4, #0 - bl ov62_022419D4 - add r0, r4, #0 - mov r1, #1 - bl ov62_02245C08 - add r0, r4, #0 - mov r1, #0x39 - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242B14 -_022429CE: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242A2C - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _02242B1C ; =0x0000047C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022335B0 - ldr r0, _02242B20 ; =0x0000049C - ldr r2, _02242B24 ; =0x02249214 - add r0, r4, r0 - add r1, r4, #0 - bl ov62_022324A0 - ldr r1, _02242B1C ; =0x0000047C - add r0, r4, r1 - add r1, #0x20 - add r1, r4, r1 - bl ov62_02233638 - ldr r0, _02242B20 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - mov r2, #2 - bl ov62_0223331C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02242A2C: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242B14 -_02242A46: - ldr r0, _02242B1C ; =0x0000047C - add r0, r4, r0 - bl ov62_02233664 - ldr r1, _02242B20 ; =0x0000049C - add r0, r4, r1 - sub r1, #0x10 - ldrsh r1, [r4, r1] - bl ov62_022332AC - ldr r0, _02242B20 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_02232F68 - cmp r0, #0 - beq _02242A92 - ldr r0, _02242B28 ; =0x0000088C - ldr r0, [r4, r0] - bl sub_02030BFC - ldr r1, _02242B18 ; =0x000004C3 - strb r0, [r5, r1] - ldr r0, _02242B28 ; =0x0000088C - ldr r0, [r4, r0] - bl sub_02030C08 - ldr r2, _02242B2C ; =0x000004C4 - strb r0, [r5, r2] - sub r1, r2, #1 - ldrb r1, [r5, r1] - ldrb r2, [r5, r2] - add r0, r4, #0 - bl ov62_022419D4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02242A92: - ldr r0, _02242B30 ; =0x02249138 - bl sub_02022760 - cmp r0, #0 - beq _02242B14 - add r0, r4, #0 - bl ov62_02234520 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242B14 -_02242AAA: - ldr r0, _02242B1C ; =0x0000047C - add r0, r4, r0 - bl ov62_02233600 - ldr r0, _02242B20 ; =0x0000049C - add r0, r4, r0 - bl ov62_022332FC - ldr r0, _02242B20 ; =0x0000049C - add r1, r4, #0 - add r0, r4, r0 - bl ov62_022334FC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02242ACA: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242AF2 - add r0, r4, #0 - mov r1, #0 - bl ov62_02245C08 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02242AF2: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242B14 -_02242B0C: - add r0, r4, #0 - mov r1, #0xb - bl ov62_0222FB60 -_02242B14: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242B18: .word 0x000004C3 -_02242B1C: .word 0x0000047C -_02242B20: .word 0x0000049C -_02242B24: .word 0x02249214 -_02242B28: .word 0x0000088C -_02242B2C: .word 0x000004C4 -_02242B30: .word 0x02249138 - thumb_func_end ov62_02242970 - - thumb_func_start ov62_02242B34 -ov62_02242B34: ; 0x02242B34 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02242B4A - cmp r1, #1 - beq _02242B64 - b _02242BAE -_02242B4A: - mov r1, #0x38 - mov r2, #3 - bl ov62_022343B8 - add r0, r5, #0 - mov r1, #0x3b - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02242BB4 -_02242B64: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02242B94 - add r0, r5, #0 - mov r1, #0x7c - bl ov62_02231B3C - add r0, r5, #0 - mov r1, #0 - bl ov62_02241AA4 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02242B94: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242BB4 -_02242BAE: - mov r1, #3 - bl ov62_0222FB60 -_02242BB4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02242B34 - - thumb_func_start ov62_02242BB8 -ov62_02242BB8: ; 0x02242BB8 - push {r4, r5, r6, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _02242BD2 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_02242BD2: - ldr r0, [r4, #8] - cmp r0, #3 - bhi _02242CB6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02242BE4: ; jump table - .short _02242BEC - _02242BE4 - 2 ; case 0 - .short _02242C02 - _02242BE4 - 2 ; case 1 - .short _02242C42 - _02242BE4 - 2 ; case 2 - .short _02242C8C - _02242BE4 - 2 ; case 3 -_02242BEC: - add r0, r4, #0 - mov r1, #0x75 - bl ov62_02231B3C - ldr r0, _02242CE0 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242CD8 -_02242C02: - ldr r0, _02242CE4 ; =0x000004C2 - ldrb r6, [r5, r0] - cmp r6, #0xff - bne _02242C1A - add r0, r4, #0 - bl sub_0208BE68 - cmp r0, #1 - bne _02242C18 - mov r6, #0xff - b _02242C1A -_02242C18: - mov r6, #0xfe -_02242C1A: - add r0, r4, #0 - bl ov62_0224112C - ldr r3, _02242CE8 ; =0x000004C4 - lsl r2, r6, #0x18 - ldrb r1, [r5, r3] - lsr r2, r2, #0x18 - str r1, [sp] - sub r1, r3, #4 - sub r3, r3, #1 - ldrh r1, [r5, r1] - ldrb r3, [r5, r3] - bl ov61_0222B394 - cmp r0, #1 - bne _02242CD8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242CD8 -_02242C42: - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _02242CE0 ; =0x00000565 - bne _02242C76 - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #7 - bl ov62_022345B8 - ldr r0, _02242CEC ; =0x00004138 - mov r1, #0 - str r1, [r4, r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242CD8 -_02242C76: - mov r1, #0 - bl sub_020057A4 - mov r0, #0x51 - mov r1, #0x76 - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242CD8 -_02242C8C: - ldr r0, _02242CEC ; =0x00004138 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02242CA8 - mov r1, #0x51 - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - bl ov62_02231B3C - ldr r0, _02242CF0 ; =0x00000564 - bl sub_02005748 - b _02242CAE -_02242CA8: - ldr r0, _02242CF4 ; =0x0000055F - bl sub_02005748 -_02242CAE: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02242CD8 -_02242CB6: - ldr r0, _02242CF8 ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - ldr r0, _02242CEC ; =0x00004138 - ldr r0, [r4, r0] - cmp r0, #0 - bne _02242CD0 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 - b _02242CD8 -_02242CD0: - add r0, r4, #0 - mov r1, #0xd - bl ov62_0222FB60 -_02242CD8: - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_02242CE0: .word 0x00000565 -_02242CE4: .word 0x000004C2 -_02242CE8: .word 0x000004C4 -_02242CEC: .word 0x00004138 -_02242CF0: .word 0x00000564 -_02242CF4: .word 0x0000055F -_02242CF8: .word 0x0000049C - thumb_func_end ov62_02242BB8 - - thumb_func_start ov62_02242CFC -ov62_02242CFC: ; 0x02242CFC - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02242D12 - cmp r1, #1 - beq _02242D3A - b _02242D7C -_02242D12: - bl ov62_02241BB8 - add r0, r5, #0 - bl ov62_02241BF8 - add r0, r5, #0 - bl ov62_02231B8C - ldr r0, _02242D88 ; =0x00000608 - ldr r0, [r4, r0] - bl sub_02024034 - ldr r0, _02242D8C ; =0x0000060C - ldr r0, [r4, r0] - bl sub_02024034 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02242D82 -_02242D3A: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02242D62 - add r0, r5, #0 - mov r1, #1 - bl ov62_02245C08 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02242D62: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242D82 -_02242D7C: - mov r1, #0xe - bl ov62_0222FB60 -_02242D82: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02242D88: .word 0x00000608 -_02242D8C: .word 0x0000060C - thumb_func_end ov62_02242CFC - - thumb_func_start ov62_02242D90 -ov62_02242D90: ; 0x02242D90 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02242DAA - cmp r1, #1 - bne _02242DA8 - b _02242EAC -_02242DA8: - b _02242F4C -_02242DAA: - bl sub_0202F250 - cmp r0, #0 - beq _02242DB6 - bl sub_0202F22C -_02242DB6: - mov r0, #0x4e - lsl r0, r0, #4 - ldr r3, _02242F58 ; =0x02249298 - add r2, r4, r0 - mov r6, #5 -_02242DC0: - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - sub r6, r6, #1 - bne _02242DC0 - ldr r0, [r3, #0] - mov r1, #0 - str r0, [r2, #0] - mov r0, #0x4e - lsl r0, r0, #4 - str r1, [r4, r0] - ldr r1, _02242F5C ; =0x00004138 - add r0, r0, #4 - ldr r1, [r5, r1] - str r1, [r4, r0] - add r0, r5, #0 - bl ov62_022339DC - mov r0, #0x66 - bl ov62_02233A68 - ldr r1, _02242F60 ; =0x0000050C - mov r2, #3 - str r0, [r4, r1] - add r0, r5, #0 - mov r1, #4 - bl ov62_022343B8 - mov r1, #7 - add r0, r5, #0 - add r2, r1, #0 - bl ov62_022343B8 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - add r0, r5, #0 - bl ov62_02241C38 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _02242F64 ; =0x0000047C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022335B0 - ldr r3, _02242F68 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r3 - add r3, #0x44 - mov r2, #0 - add r3, r4, r3 - bl ov62_02232594 - ldr r1, _02242F6C ; =0x000004E4 - mov r0, #1 - str r0, [r5, r1] - add r0, r1, #0 - sub r0, #0x68 - sub r1, #0x48 - add r0, r5, r0 - add r1, r5, r1 - bl ov62_02233638 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - ldr r0, _02242F68 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - mov r2, #1 - bl ov62_0223331C - ldr r0, _02242F68 ; =0x0000049C - mov r1, #0x40 - add r0, r5, r0 - mov r2, #0xb8 - bl ov62_02233434 - ldr r0, _02242F68 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_02233064 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02241278 - add r0, r5, #0 - mov r1, #0 - bl ov62_0224141C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02242F52 -_02242EAC: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02242F1A - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r5, #0 - mov r1, #1 - bl ov62_0224141C - ldr r3, _02242F70 ; =0x000004D8 - mov r1, #0x6f - ldr r6, [r5, r3] - mov r3, #0x18 - mul r3, r6 - lsl r1, r1, #4 - add r3, #0x4c - lsl r3, r3, #0x10 - ldr r1, [r5, r1] - add r0, r5, #0 - mov r2, #0x10 - asr r3, r3, #0x10 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0xc - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02242F1A: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02242F52 -_02242F4C: - mov r1, #0xf - bl ov62_0222FB60 -_02242F52: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02242F58: .word 0x02249298 -_02242F5C: .word 0x00004138 -_02242F60: .word 0x0000050C -_02242F64: .word 0x0000047C -_02242F68: .word 0x0000049C -_02242F6C: .word 0x000004E4 -_02242F70: .word 0x000004D8 - thumb_func_end ov62_02242D90 - - thumb_func_start ov62_02242F74 -ov62_02242F74: ; 0x02242F74 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02242F8E - cmp r1, #1 - beq _02243004 - cmp r1, #2 - beq _0224307C - b _02243108 -_02242F8E: - ldr r0, _02243114 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233664 - ldr r1, _02243118 ; =0x0000049C - add r0, r5, r1 - sub r1, #0x10 - ldrsh r1, [r5, r1] - bl ov62_022331C8 - ldr r0, _02243118 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_02233064 - ldr r2, _0224311C ; =0x000004D8 - mov r0, #0x6f - ldr r3, [r5, r2] - mov r2, #0x18 - mul r2, r3 - lsl r0, r0, #4 - add r2, #0x4c - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #0x10 - asr r2, r2, #0x10 - bl sub_0208B8EC - add r0, r5, #0 - bl ov62_022414C0 - ldr r0, _02243120 ; =0x02249134 - bl sub_02022760 - cmp r0, #0 - beq _02242FE6 - add r0, r5, #0 - bl ov62_02234520 - mov r0, #0x11 - str r0, [r4, #0xc] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02242FE6: - ldr r0, _02243124 ; =0x02249138 - bl sub_02022760 - cmp r0, #0 - bne _02242FF2 - b _0224310E -_02242FF2: - add r0, r5, #0 - bl ov62_02234520 - mov r0, #0x10 - str r0, [r4, #0xc] - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0224310E -_02243004: - ldr r0, _02243114 ; =0x0000047C - add r0, r5, r0 - bl ov62_02233600 - ldr r0, _02243118 ; =0x0000049C - add r0, r5, r0 - bl ov62_022332FC - ldr r0, _02243118 ; =0x0000049C - add r1, r5, #0 - add r0, r5, r0 - bl ov62_022334FC - ldr r0, _02243128 ; =0x0000050C - ldr r0, [r4, r0] - bl ov62_02233A74 - add r0, r5, #0 - bl ov62_02241460 - add r0, r5, #0 - bl ov62_02233A44 - add r0, r5, #0 - bl ov62_02241BB8 - add r0, r5, #0 - bl ov62_02241BF8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, [r4, #0xc] - cmp r0, #0x10 - bne _02243076 - ldr r0, _02243114 ; =0x0000047C - add r0, r5, r0 - bl ov62_022335F4 - ldr r0, _02243118 ; =0x0000049C - add r0, r5, r0 - bl ov62_02233310 - mov r0, #0x51 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] -_02243076: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0224307C: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022430D6 - add r0, r5, #0 - mov r1, #0 - bl ov62_02245C08 - ldr r0, [r4, #0xc] - cmp r0, #0x11 - bne _022430D0 - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x30] - mov r1, #3 - bl sub_0200D364 -_022430D0: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_022430D6: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224310E -_02243108: - ldr r1, [r4, #0xc] - bl ov62_0222FB60 -_0224310E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_02243114: .word 0x0000047C -_02243118: .word 0x0000049C -_0224311C: .word 0x000004D8 -_02243120: .word 0x02249134 -_02243124: .word 0x02249138 -_02243128: .word 0x0000050C - thumb_func_end ov62_02242F74 - - thumb_func_start ov62_0224312C -ov62_0224312C: ; 0x0224312C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02243142 - cmp r1, #1 - beq _022431A4 - b _02243222 -_02243142: - mov r1, #0x38 - mov r2, #3 - bl ov62_022343B8 - add r0, r5, #0 - mov r1, #0x3b - mov r2, #7 - bl ov62_022343B8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02245C08 - mov r0, #0x66 - str r0, [sp] - ldr r0, _0224322C ; =0x022491AC - ldr r2, _02243230 ; =ov62_022458A0 - mov r1, #5 - add r3, r5, #0 - bl sub_02023FCC - ldr r1, _02243234 ; =0x00000608 - ldr r2, _02243238 ; =ov62_02245968 - str r0, [r4, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0224323C ; =0x022491F0 - mov r1, #9 - add r3, r5, #0 - bl sub_02023FCC - ldr r1, _02243240 ; =0x0000060C - str r0, [r4, r1] - add r0, r5, #0 - mov r1, #0 - bl ov62_02241AA4 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02243228 -_022431A4: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02243208 - add r0, r5, #0 - mov r1, #0x7c - bl ov62_02231AAC - add r0, r5, #0 - mov r1, #0 - bl ov62_022417C0 - mov r1, #0x13 - lsl r1, r1, #6 - ldrh r1, [r4, r1] - add r0, r5, #0 - bl ov62_02241954 - ldr r1, _02243244 ; =0x000004C2 - add r0, r5, #0 - ldrb r1, [r4, r1] - bl ov62_022418DC - ldr r2, _02243248 ; =0x000004C3 - add r0, r5, #0 - ldrb r1, [r4, r2] - add r2, r2, #1 - ldrb r2, [r4, r2] - bl ov62_022419D4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02243208: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02243228 -_02243222: - mov r1, #3 - bl ov62_0222FB60 -_02243228: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224322C: .word 0x022491AC -_02243230: .word ov62_022458A0 -_02243234: .word 0x00000608 -_02243238: .word ov62_02245968 -_0224323C: .word 0x022491F0 -_02243240: .word 0x0000060C -_02243244: .word 0x000004C2 -_02243248: .word 0x000004C3 - thumb_func_end ov62_0224312C - - thumb_func_start ov62_0224324C -ov62_0224324C: ; 0x0224324C - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _0224325E - b _02243392 -_0224325E: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224326A: ; jump table - .short _02243272 - _0224326A - 2 ; case 0 - .short _02243282 - _0224326A - 2 ; case 1 - .short _022432CC - _0224326A - 2 ; case 2 - .short _02243336 - _0224326A - 2 ; case 3 -_02243272: - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224339A -_02243282: - bl ov62_0224443C - mov r0, #0x66 - str r0, [sp] - ldr r0, _022433A0 ; =0x0224919C - ldr r2, _022433A4 ; =ov62_02245994 - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _022433A8 ; =0x00000608 - ldr r2, _022433AC ; =ov62_02245A28 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _022433B0 ; =0x0224915C - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _022433B4 ; =0x0000060C - ldr r2, _022433B8 ; =ov62_02245A90 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _022433BC ; =0x0224913C - mov r1, #2 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x61 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224339A -_022432CC: - mov r1, #0x73 - mov r2, #0 - lsl r1, r1, #2 - str r2, [r5, r1] - mov r1, #1 - bl ov62_02234540 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224339A -_02243336: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02243378 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02245640 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02243378: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224339A -_02243392: - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 -_0224339A: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022433A0: .word 0x0224919C -_022433A4: .word ov62_02245994 -_022433A8: .word 0x00000608 -_022433AC: .word ov62_02245A28 -_022433B0: .word 0x0224915C -_022433B4: .word 0x0000060C -_022433B8: .word ov62_02245A90 -_022433BC: .word 0x0224913C - thumb_func_end ov62_0224324C - - thumb_func_start ov62_022433C0 -ov62_022433C0: ; 0x022433C0 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _022433D4 ; =0x00000608 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_022433D4: .word 0x00000608 - thumb_func_end ov62_022433C0 - - thumb_func_start ov62_022433D8 -ov62_022433D8: ; 0x022433D8 - push {r4, lr} - add r4, r0, #0 - bl ov62_02245D80 - cmp r0, #0 - beq _022433EC - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 -_022433EC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_022433D8 - - thumb_func_start ov62_022433F0 -ov62_022433F0: ; 0x022433F0 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - bl ov62_02246850 - cmp r0, #0 - beq _0224340A - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} -_0224340A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_022433F0 - - thumb_func_start ov62_02243410 -ov62_02243410: ; 0x02243410 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02243426 - cmp r1, #1 - beq _02243494 - b _02243502 -_02243426: - ldr r0, _0224350C ; =0x00000608 - ldr r0, [r4, r0] - bl sub_02024034 - ldr r0, _02243510 ; =0x0000060C - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl ov62_022444A0 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _02243474 - sub r0, #0xc0 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _0224347E -_02243474: - add r4, #0x80 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02232394 -_0224347E: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022455C4 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02243508 -_02243494: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022434E8 - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x6f - bl ov62_0223124C - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D364 - add r0, r5, #0 - mov r1, #1 - bl ov62_02245C08 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_022434E8: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02243508 -_02243502: - mov r1, #0xe - bl ov62_0222FB60 -_02243508: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224350C: .word 0x00000608 -_02243510: .word 0x0000060C - thumb_func_end ov62_02243410 - - thumb_func_start ov62_02243514 -ov62_02243514: ; 0x02243514 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] - bl sub_0202FE04 - mov r1, #4 - mov r2, #0 - bl sub_0202FE98 - add r3, r0, #0 - add r2, r1, #0 - add r0, r4, #0 - add r1, r3, #0 - bl ov62_02234970 - cmp r0, #0 - bne _0224353E - b _0224380A -_0224353E: - ldr r0, [r4, #8] - cmp r0, #5 - bls _02243546 - b _022437DC -_02243546: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02243552: ; jump table - .short _0224355E - _02243552 - 2 ; case 0 - .short _022435AC - _02243552 - 2 ; case 1 - .short _02243612 - _02243552 - 2 ; case 2 - .short _02243622 - _02243552 - 2 ; case 3 - .short _02243660 - _02243552 - 2 ; case 4 - .short _02243772 - _02243552 - 2 ; case 5 -_0224355E: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _0224357C - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - b _02243586 -_0224357C: - add r5, #0x80 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_02232394 -_02243586: - add r0, r4, #0 - bl ov62_022455C4 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224381C -_022435AC: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022435F8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02245D50 - add r0, r4, #0 - bl ov62_02244BE4 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022435F8: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224381C -_02243612: - ldr r1, _02243824 ; =0x00000115 - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224381C -_02243622: - bl sub_02022798 - cmp r0, #0 - bne _0224362C - b _0224381C -_0224362C: - add r0, r4, #0 - bl ov62_02244CA4 - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224381C -_02243660: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02245C64 - ldr r0, _02243828 ; =0x0000086C - ldr r0, [r4, r0] - cmp r0, #0xd2 - bne _022436A2 - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #3 - bl sub_0200D364 -_022436A2: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02245640 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _0224371E - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _0224374A -_0224371E: - add r0, r5, #0 - add r0, #0x80 - add r1, r4, #0 - bl ov62_02232378 - add r5, #0x80 - add r0, r5, #0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_0224374A: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224381C -_02243772: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022437C2 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _022437A2 - sub r0, #0xc0 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _022437AC -_022437A2: - add r0, r5, #0 - add r0, #0x80 - mov r1, #1 - bl ov62_022323B8 -_022437AC: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022437C2: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224381C -_022437DC: - ldr r1, _0224382C ; =0x00004138 - mov r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - ble _02243800 - mov r1, #0x9a - lsl r1, r1, #6 - add r5, r4, r1 - ldr r2, _0224382C ; =0x00004138 - add r6, r4, #0 - sub r1, #0x78 -_022437F2: - str r5, [r6, r1] - ldr r3, [r4, r2] - add r0, r0, #1 - add r5, #0xe4 - add r6, r6, #4 - cmp r0, r3 - blt _022437F2 -_02243800: - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 - b _0224381C -_0224380A: - add r0, r4, #0 - bl ov62_02245ECC - cmp r0, #0 - beq _0224381C - add r0, r4, #0 - mov r1, #0x17 - bl ov62_0222FB60 -_0224381C: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_02243824: .word 0x00000115 -_02243828: .word 0x0000086C -_0224382C: .word 0x00004138 - thumb_func_end ov62_02243514 - - thumb_func_start ov62_02243830 -ov62_02243830: ; 0x02243830 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _02243844 ; =0x0000060C - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02243844: .word 0x0000060C - thumb_func_end ov62_02243830 - - thumb_func_start ov62_02243848 -ov62_02243848: ; 0x02243848 - push {r4, r5, r6, lr} - add r4, r0, #0 - bl ov62_02246640 - cmp r0, #0 - beq _02243880 - ldr r1, _02243884 ; =0x00004138 - mov r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - ble _02243878 - mov r1, #0x9a - lsl r1, r1, #6 - add r5, r4, r1 - ldr r2, _02243884 ; =0x00004138 - add r6, r4, #0 - sub r1, #0x78 -_0224386A: - str r5, [r6, r1] - ldr r3, [r4, r2] - add r0, r0, #1 - add r5, #0xe4 - add r6, r6, #4 - cmp r0, r3 - blt _0224386A -_02243878: - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 -_02243880: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02243884: .word 0x00004138 - thumb_func_end ov62_02243848 - - thumb_func_start ov62_02243888 -ov62_02243888: ; 0x02243888 - push {r4, r5, r6, lr} - add r4, r0, #0 - bl ov62_02246428 - cmp r0, #0 - beq _022438C0 - ldr r1, _022438C4 ; =0x00004138 - mov r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - ble _022438B8 - mov r1, #0x9a - lsl r1, r1, #6 - add r5, r4, r1 - ldr r2, _022438C4 ; =0x00004138 - add r6, r4, #0 - sub r1, #0x78 -_022438AA: - str r5, [r6, r1] - ldr r3, [r4, r2] - add r0, r0, #1 - add r5, #0xe4 - add r6, r6, #4 - cmp r0, r3 - blt _022438AA -_022438B8: - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 -_022438C0: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022438C4: .word 0x00004138 - thumb_func_end ov62_02243888 - - thumb_func_start ov62_022438C8 -ov62_022438C8: ; 0x022438C8 - push {r4, lr} - add r4, r0, #0 - bl ov62_02245FE4 - cmp r0, #0 - beq _022438DC - add r0, r4, #0 - mov r1, #0x1a - bl ov62_0222FB60 -_022438DC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_022438C8 - - thumb_func_start ov62_022438E0 -ov62_022438E0: ; 0x022438E0 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_022438E0 - - thumb_func_start ov62_022438F8 -ov62_022438F8: ; 0x022438F8 - push {r4, lr} - add r4, r0, #0 - bl ov62_02246090 - cmp r0, #0 - beq _0224390C - add r0, r4, #0 - mov r1, #0x17 - bl ov62_0222FB60 -_0224390C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_022438F8 - - thumb_func_start ov62_02243910 -ov62_02243910: ; 0x02243910 - push {r3, lr} - bl ov62_0224613C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_02243910 - - thumb_func_start ov62_0224391C -ov62_0224391C: ; 0x0224391C - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - bl ov62_022411B8 - cmp r0, #0 - bne _02243936 - add sp, #8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02243936: - ldr r0, [r4, #8] - cmp r0, #4 - bls _0224393E - b _02243AC4 -_0224393E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224394A: ; jump table - .short _02243954 - _0224394A - 2 ; case 0 - .short _0224398A - _0224394A - 2 ; case 1 - .short _022439C4 - _0224394A - 2 ; case 2 - .short _02243A0A - _0224394A - 2 ; case 3 - .short _02243A36 - _0224394A - 2 ; case 4 -_02243954: - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _0224397A - sub r0, #0xc0 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - b _02243984 -_0224397A: - add r0, r5, #0 - add r0, #0x80 - mov r1, #0 - bl ov62_022323B8 -_02243984: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224398A: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022439AA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022439AA: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02243AF8 -_022439C4: - add r0, r4, #0 - mov r1, #0x75 - bl ov62_02231AAC - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _02243B00 ; =0x000004B8 - mov r1, #0 - str r1, [r5, r0] - add r0, #0xad - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243AF8 -_02243A0A: - add r0, r4, #0 - bl ov62_0224112C - ldr r1, _02243B04 ; =0x000004D4 - ldr r1, [r4, r1] - lsl r1, r1, #2 - add r2, r4, r1 - ldr r1, _02243B08 ; =0x00002608 - ldr r2, [r2, r1] - add r1, r2, #0 - add r1, #0xd8 - add r2, #0xdc - ldr r1, [r1, #0] - ldr r2, [r2, #0] - bl ov61_0222B524 - cmp r0, #1 - bne _02243AF8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243AF8 -_02243A36: - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _02243B0C ; =0x00000565 - bne _02243A70 - mov r1, #0 - bl sub_020057A4 - add r0, r4, #0 - bl ov62_02231B8C - ldr r3, [sp, #4] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #8 - bl ov62_022348B8 - ldr r0, [r4, #8] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #8] - ldr r0, _02243B00 ; =0x000004B8 - str r1, [r5, r0] - b _02243AA8 -_02243A70: - mov r1, #0 - bl sub_020057A4 - mov r0, #0xff - str r0, [r4, #8] - ldr r0, _02243B00 ; =0x000004B8 - mov r1, #1 - str r1, [r5, r0] - ldr r1, _02243B10 ; =0x0000413C - add r2, r4, r1 - add r1, r0, #0 - add r1, #0x1c - ldr r1, [r4, r1] - add r2, r2, r1 - ldr r1, _02243B14 ; =0x00000878 - str r2, [r4, r1] - add r2, r1, #0 - add r2, #0x3c - ldr r3, [r4, r2] - add r2, r0, #4 - str r3, [r5, r2] - add r0, r0, #4 - add r1, #0x40 - ldr r0, [r5, r0] - ldr r2, _02243B18 ; =0x00001D4C - add r1, r4, r1 - bl sub_020C4DB0 -_02243AA8: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - b _02243AF8 -_02243AC4: - ldr r0, _02243B00 ; =0x000004B8 - ldr r1, [r5, r0] - cmp r1, #0 - beq _02243AEA - add r0, #0xa7 - bl sub_02005748 - add r0, r4, #0 - bl ov62_02231B8C - ldr r1, [r5, #0xc] - add r0, r4, #0 - bl ov62_0222FB60 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223381C - b _02243AF8 -_02243AEA: - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - mov r1, #0x1f - bl ov62_0222FB60 -_02243AF8: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02243B00: .word 0x000004B8 -_02243B04: .word 0x000004D4 -_02243B08: .word 0x00002608 -_02243B0C: .word 0x00000565 -_02243B10: .word 0x0000413C -_02243B14: .word 0x00000878 -_02243B18: .word 0x00001D4C - thumb_func_end ov62_0224391C - - thumb_func_start ov62_02243B1C -ov62_02243B1C: ; 0x02243B1C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #5 - bls _02243B30 - b _02243D74 -_02243B30: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02243B3C: ; jump table - .short _02243B48 - _02243B3C - 2 ; case 0 - .short _02243C3E - _02243B3C - 2 ; case 1 - .short _02243C88 - _02243B3C - 2 ; case 2 - .short _02243CEA - _02243B3C - 2 ; case 3 - .short _02243D46 - _02243B3C - 2 ; case 4 - .short _02243D64 - _02243B3C - 2 ; case 5 -_02243B48: - bl ov62_02234314 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - bl ov62_022315C8 - ldr r0, _02243D90 ; =0x00004138 - mov r2, #0 - ldr r0, [r4, r0] - cmp r0, #0 - ble _02243B7C - mov r0, #0x9a - lsl r0, r0, #6 - add r7, r0, #0 - add r3, r4, r0 - ldr r0, _02243D90 ; =0x00004138 - add r6, r4, #0 - sub r7, #0x78 -_02243B6E: - str r3, [r6, r7] - ldr r1, [r4, r0] - add r2, r2, #1 - add r3, #0xe4 - add r6, r6, #4 - cmp r2, r1 - blt _02243B6E -_02243B7C: - ldr r0, _02243D94 ; =0x000004D4 - mov r3, #3 - ldr r0, [r4, r0] - add r1, r4, r0 - ldr r0, _02243D98 ; =0x0000413C - ldrb r1, [r1, r0] - ldr r0, _02243D9C ; =0x0000079C - strb r1, [r5, r0] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - add r0, r4, #0 - bl ov62_02245C64 - add r0, r4, #0 - mov r1, #0 - bl ov62_02245C08 - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #3 - bl sub_0200D364 - mov r1, #0x13 - ldr r0, _02243DA0 ; =0x0000FFFF - lsl r1, r1, #6 - strh r0, [r5, r1] - mov r2, #0xff - add r0, r1, #2 - strb r2, [r5, r0] - add r0, r1, #3 - strb r2, [r5, r0] - add r0, r1, #4 - strb r2, [r5, r0] - add r0, r1, #0 - add r2, #0xf5 - add r0, #0x54 - str r2, [r5, r0] - add r0, r1, #0 - sub r0, #0x1c - ldrsh r0, [r4, r0] - add r1, #0x50 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243D8A -_02243C3E: - bl ov62_0224443C - mov r0, #0x66 - str r0, [sp] - ldr r0, _02243DA4 ; =0x0224919C - ldr r2, _02243DA8 ; =ov62_02245994 - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _02243DAC ; =0x00000608 - ldr r2, _02243DB0 ; =ov62_02245A28 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _02243DB4 ; =0x0224915C - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _02243DB8 ; =0x0000060C - ldr r2, _02243DBC ; =ov62_02245A90 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _02243DC0 ; =0x0224913C - mov r1, #2 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x61 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243D8A -_02243C88: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243D8A -_02243CEA: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02243D2C - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02245640 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02243D2C: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02243D8A -_02243D46: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243D8A -_02243D64: - bl sub_0200F2AC - cmp r0, #1 - bne _02243D8A - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02243D8A -_02243D74: - ldr r0, _02243DC4 ; =0x000006D8 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - add r0, r4, #0 - bl ov62_02230098 - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 -_02243D8A: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02243D90: .word 0x00004138 -_02243D94: .word 0x000004D4 -_02243D98: .word 0x0000413C -_02243D9C: .word 0x0000079C -_02243DA0: .word 0x0000FFFF -_02243DA4: .word 0x0224919C -_02243DA8: .word ov62_02245994 -_02243DAC: .word 0x00000608 -_02243DB0: .word ov62_02245A28 -_02243DB4: .word 0x0224915C -_02243DB8: .word 0x0000060C -_02243DBC: .word ov62_02245A90 -_02243DC0: .word 0x0224913C -_02243DC4: .word 0x000006D8 - thumb_func_end ov62_02243B1C - - thumb_func_start ov62_02243DC8 -ov62_02243DC8: ; 0x02243DC8 - push {r3, r4, r5, lr} - mov r1, #0x7a - add r5, r0, #0 - mov r0, #0x66 - lsl r1, r1, #4 - bl sub_02018144 - mov r2, #0x7a - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02243DC8 - - thumb_func_start ov62_02243E20 -ov62_02243E20: ; 0x02243E20 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r2, [r5, #8] - ldr r4, [r5, r1] - cmp r2, #0 - beq _02243E36 - cmp r2, #1 - beq _02243E94 - b _02243EF0 -_02243E36: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02243E4A - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02243E4A: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02243FA4 -_02243E94: - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - add r1, r0, #0 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #2 - bl sub_02019060 - mov r0, #4 - mov r1, #0 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #1 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02243FA4 -_02243EF0: - add r1, #0xc - ldr r1, [r5, r1] - cmp r1, #0xc8 - beq _02243F02 - cmp r1, #0xd2 - beq _02243F32 - cmp r1, #0xdc - beq _02243F62 - b _02243F8A -_02243F02: - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r5, #0 - bl ov62_022300BC - cmp r0, #1 - bne _02243F28 - add r0, r5, #0 - mov r1, #6 - bl ov62_0222FB60 - b _02243FA4 -_02243F28: - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 - b _02243FA4 -_02243F32: - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r5, #0 - bl ov62_022300BC - cmp r0, #1 - bne _02243F58 - add r0, r5, #0 - mov r1, #0x1e - bl ov62_0222FB60 - b _02243FA4 -_02243F58: - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 - b _02243FA4 -_02243F62: - bl ov62_022300BC - cmp r0, #1 - bne _02243F74 - add r0, r5, #0 - mov r1, #0x13 - bl ov62_0222FB60 - b _02243F7C -_02243F74: - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_02243F7C: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - b _02243FA4 -_02243F8A: - mov r1, #0 - bl ov62_0223376C - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0208B9E0 - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_02243FA4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02243E20 - - thumb_func_start ov62_02243FA8 -ov62_02243FA8: ; 0x02243FA8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - mov r2, #0x75 - ldr r6, [r5, r1] - lsl r2, r2, #2 - add r4, r6, r2 - ldr r2, [r5, #8] - cmp r2, #0 - beq _02243FCA - cmp r2, #1 - beq _0224403A - cmp r2, #2 - beq _0224405E - b _022440A0 -_02243FCA: - mov r0, #2 - str r0, [sp, #0xc] - mov r0, #5 - sub r1, #0x30 - str r0, [sp, #0x10] - str r0, [sp, #0x14] - ldr r0, [r5, r1] - bl sub_02025E44 - add r3, r0, #0 - mov r0, #0x66 - mov r1, #0xc - add r2, sp, #0xc - bl ov62_02246B00 - ldr r1, _022440AC ; =0x000004AC - mov r2, #0x22 - str r0, [r6, r1] - ldr r0, [r5, #0x14] - lsl r2, r2, #4 - str r0, [r4, r2] - ldr r3, [r5, #0x18] - add r0, r2, #4 - str r3, [r4, r0] - add r0, r2, #0 - ldr r3, [r5, #0x1c] - add r0, #8 - str r3, [r4, r0] - add r0, r2, #0 - ldr r3, [r5, #0x24] - add r0, #0xc - str r3, [r4, r0] - add r0, r2, #0 - ldr r3, [r5, #0x28] - add r0, #0x10 - str r3, [r4, r0] - add r0, r2, #0 - add r0, #0x88 - ldr r3, [r6, r1] - add r7, r4, r0 - ldmia r3!, {r0, r1} - stmia r7!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r7!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r7!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r7!, {r0, r1} - add r2, #0xb4 - str r5, [r4, r2] - add r0, r5, #0 - bl ov62_02245B24 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0224403A: - mov r2, #8 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r6, #4 - bl ov62_022314F0 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022440A6 -_0224405E: - add r0, r6, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r6, #0 - add r1, r6, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02244086 - add r0, r5, #0 - mov r1, #0x70 - bl ov62_0223197C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02244086: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r6, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022440A6 -_022440A0: - mov r1, #3 - bl ov62_0222FB60 -_022440A6: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022440AC: .word 0x000004AC - thumb_func_end ov62_02243FA8 - - thumb_func_start ov62_022440B0 -ov62_022440B0: ; 0x022440B0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r1, [r4, r0] - mov r0, #0x75 - lsl r0, r0, #2 - add r0, r1, r0 - bl ov62_02247084 - cmp r0, #1 - bne _022440D0 - add r0, r4, #0 - mov r1, #4 - bl ov62_0222FB60 -_022440D0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_022440B0 - - thumb_func_start ov62_022440D4 -ov62_022440D4: ; 0x022440D4 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #0x75 - lsl r1, r1, #2 - ldr r2, [r5, #8] - add r3, r4, r1 - cmp r2, #0 - beq _022440F2 - cmp r2, #1 - beq _02244118 - b _02244160 -_022440F2: - bl ov62_02231A1C - mov r2, #8 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, r4, #4 - bl ov62_02231560 - ldr r0, _0224417C ; =0x000004AC - ldr r0, [r4, r0] - bl ov62_02246B4C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02244118: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02244146 - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl ov62_02245BD8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02244146: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02244176 -_02244160: - add r1, #0xf4 - ldr r1, [r3, r1] - cmp r1, #0 - beq _02244170 - mov r1, #6 - bl ov62_0222FB60 - b _02244176 -_02244170: - mov r1, #5 - bl ov62_0222FB60 -_02244176: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224417C: .word 0x000004AC - thumb_func_end ov62_022440D4 - - thumb_func_start ov62_02244180 -ov62_02244180: ; 0x02244180 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - bne _022441B6 - add r4, #8 - add r0, r4, #0 - bl ov62_02231688 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02244252 -_022441B6: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02244222 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - bl sub_020181C4 - b _02244252 -_02244222: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C -_02244252: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02244180 - - thumb_func_start ov62_02244258 -ov62_02244258: ; 0x02244258 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - mov r1, #0x75 - lsl r1, r1, #2 - add r6, r5, r1 - ldr r1, [r4, #8] - cmp r1, #4 - bls _02244272 - b _022443AA -_02244272: - add r2, r1, r1 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224427E: ; jump table - .short _02244288 - _0224427E - 2 ; case 0 - .short _022442C6 - _0224427E - 2 ; case 1 - .short _022442F4 - _0224427E - 2 ; case 2 - .short _02244396 - _0224427E - 2 ; case 3 - .short _022443A4 - _0224427E - 2 ; case 4 -_02244288: - mov r1, #0x75 - bl ov62_0223197C - ldr r1, _022443CC ; =0x000006F4 - add r0, r4, #0 - ldr r1, [r4, r1] - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - ldr r0, _022443CC ; =0x000006F4 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_0208B9E0 - ldr r0, _022443CC ; =0x000006F4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _022443D0 ; =0x000004B8 - mov r1, #0 - str r1, [r5, r0] - add r0, #0xad - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022443C4 -_022442C6: - bl ov62_022411B8 - cmp r0, #0 - bne _022442D4 - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_022442D4: - add r0, r4, #0 - bl ov62_0224112C - mov r2, #0xb3 - lsl r2, r2, #2 - ldr r1, [r6, r2] - add r2, r2, #4 - ldr r2, [r6, r2] - bl ov61_0222B524 - cmp r0, #1 - bne _022443C4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022443C4 -_022442F4: - bl ov62_022411B8 - cmp r0, #0 - bne _02244302 - add sp, #4 - mov r0, #0 - pop {r3, r4, r5, r6, pc} -_02244302: - add r0, r4, #0 - bl ov62_02231A1C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #0 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _022443D4 ; =0x00000565 - bne _0224434A - mov r1, #0 - bl sub_020057A4 - ldr r0, _022443D8 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r3, [sp] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #8 - bl ov62_022348B8 - add r0, r4, #0 - mov r1, #0 - bl ov62_0223376C - ldr r0, [r4, #8] - mov r1, #0 - add r0, r0, #1 - str r0, [r4, #8] - ldr r0, _022443D0 ; =0x000004B8 - str r1, [r5, r0] - b _0224437E -_0224434A: - mov r1, #0 - bl sub_020057A4 - mov r0, #0xff - str r0, [r4, #8] - ldr r0, _022443D0 ; =0x000004B8 - mov r1, #1 - str r1, [r5, r0] - add r0, #0xa7 - bl sub_02005748 - ldr r0, _022443DC ; =0x00002604 - ldr r1, _022443E0 ; =0x00000878 - add r0, r4, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x3c - ldr r2, [r4, r0] - ldr r0, _022443E4 ; =0x000004BC - add r1, #0x40 - str r2, [r5, r0] - ldr r0, [r5, r0] - ldr r2, _022443E8 ; =0x00001D4C - add r1, r4, r1 - bl sub_020C4DB0 -_0224437E: - ldr r0, _022443CC ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - bl sub_0208B9E0 - ldr r0, _022443CC ; =0x000006F4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - b _022443C4 -_02244396: - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022443C4 -_022443A4: - add r0, r1, #1 - str r0, [r4, #8] - b _022443C4 -_022443AA: - ldr r0, _022443D0 ; =0x000004B8 - ldr r0, [r5, r0] - cmp r0, #0 - beq _022443BC - add r0, r4, #0 - mov r1, #7 - bl ov62_0222FB60 - b _022443C4 -_022443BC: - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 -_022443C4: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_022443CC: .word 0x000006F4 -_022443D0: .word 0x000004B8 -_022443D4: .word 0x00000565 -_022443D8: .word 0x04000050 -_022443DC: .word 0x00002604 -_022443E0: .word 0x00000878 -_022443E4: .word 0x000004BC -_022443E8: .word 0x00001D4C - thumb_func_end ov62_02244258 - - thumb_func_start ov62_022443EC -ov62_022443EC: ; 0x022443EC - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x66 - bl sub_02030A80 - add r1, r4, #0 - add r1, #0x80 - str r0, [r1, #0] - ldr r0, _02244438 ; =0x000004BC - add r1, r4, #0 - add r1, #0x80 - ldr r0, [r4, r0] - ldr r1, [r1, #0] - bl ov61_0222AFC0 - add r0, r4, #0 - add r0, #0x80 - ldr r1, [r0, #0] - mov r0, #0x43 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #0x66 - bl sub_0202FF2C - mov r1, #0x11 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, _02244438 ; =0x000004BC - ldr r1, [r4, r1] - ldr r0, [r4, r0] - mov r2, #0x64 - add r0, #0x80 - bl sub_020C4DB0 - pop {r4, pc} - nop -_02244438: .word 0x000004BC - thumb_func_end ov62_022443EC - - thumb_func_start ov62_0224443C -ov62_0224443C: ; 0x0224443C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - mov r0, #0x66 - bl sub_02030A80 - add r1, r4, #0 - add r1, #0x80 - str r0, [r1, #0] - ldr r0, _02244498 ; =0x000004D4 - ldr r0, [r5, r0] - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0224449C ; =0x00002608 - ldr r0, [r1, r0] - add r1, r4, #0 - add r1, #0x80 - ldr r1, [r1, #0] - bl ov61_0222AFC0 - add r0, r4, #0 - add r0, #0x80 - ldr r1, [r0, #0] - mov r0, #0x43 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #0x66 - bl sub_0202FF2C - mov r1, #0x11 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, _02244498 ; =0x000004D4 - ldr r1, [r4, r1] - ldr r0, [r5, r0] - lsl r0, r0, #2 - add r2, r5, r0 - ldr r0, _0224449C ; =0x00002608 - ldr r0, [r2, r0] - mov r2, #0x64 - add r0, #0x80 - bl sub_020C4DB0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244498: .word 0x000004D4 -_0224449C: .word 0x00002608 - thumb_func_end ov62_0224443C - - thumb_func_start ov62_022444A0 -ov62_022444A0: ; 0x022444A0 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - mov r0, #0x11 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0202FF44 - add r4, #0x80 - ldr r0, [r4, #0] - bl sub_02030A98 - pop {r4, pc} - thumb_func_end ov62_022444A0 - - thumb_func_start ov62_022444BC -ov62_022444BC: ; 0x022444BC - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _022444D0 - b _022446A0 -_022444D0: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022444DC: ; jump table - .short _022444E4 - _022444DC - 2 ; case 0 - .short _022444F2 - _022444DC - 2 ; case 1 - .short _022445DC - _022444DC - 2 ; case 2 - .short _02244644 - _022444DC - 2 ; case 3 -_022444E4: - mov r1, #0 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022446A8 -_022444F2: - bl ov62_02233790 - cmp r0, #0 - bne _022444FC - b _022446A8 -_022444FC: - mov r2, #8 - str r2, [sp] - mov r3, #0x12 - str r3, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r5, #4 - bl ov62_02231560 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #6 - mov r2, #7 - bl ov62_022343B8 - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #0 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - add r0, r4, #0 - bl ov62_022443EC - add r0, r4, #0 - bl ov62_02245C64 - mov r0, #0x66 - str r0, [sp] - ldr r0, _022446B0 ; =0x0224919C - ldr r2, _022446B4 ; =ov62_022457A0 - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _022446B8 ; =0x00000608 - ldr r2, _022446BC ; =ov62_02245800 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _022446C0 ; =0x0224915C - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _022446C4 ; =0x0000060C - ldr r2, _022446C8 ; =ov62_02245868 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _022446CC ; =0x0224913C - mov r1, #2 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x61 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022446A8 -_022445DC: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022446A8 -_02244644: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02244686 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - add r0, r4, #0 - bl ov62_02245640 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02244686: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022446A8 -_022446A0: - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 -_022446A8: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_022446B0: .word 0x0224919C -_022446B4: .word ov62_022457A0 -_022446B8: .word 0x00000608 -_022446BC: .word ov62_02245800 -_022446C0: .word 0x0224915C -_022446C4: .word 0x0000060C -_022446C8: .word ov62_02245868 -_022446CC: .word 0x0224913C - thumb_func_end ov62_022444BC - - thumb_func_start ov62_022446D0 -ov62_022446D0: ; 0x022446D0 - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _022446E4 ; =0x00000608 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_022446E4: .word 0x00000608 - thumb_func_end ov62_022446D0 - - thumb_func_start ov62_022446E8 -ov62_022446E8: ; 0x022446E8 - push {r4, lr} - add r4, r0, #0 - bl ov62_02245D80 - cmp r0, #0 - beq _022446FC - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 -_022446FC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_022446E8 - - thumb_func_start ov62_02244700 -ov62_02244700: ; 0x02244700 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - bl ov62_02246850 - cmp r0, #0 - beq _0224471A - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} -_0224471A: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02244700 - - thumb_func_start ov62_02244720 -ov62_02244720: ; 0x02244720 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _02244732 - b _022448D2 -_02244732: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224473E: ; jump table - .short _02244746 - _0224473E - 2 ; case 0 - .short _022447B4 - _0224473E - 2 ; case 1 - .short _022447F4 - _0224473E - 2 ; case 2 - .short _02244822 - _0224473E - 2 ; case 3 -_02244746: - ldr r0, _022448D8 ; =0x00000608 - ldr r0, [r5, r0] - bl sub_02024034 - ldr r0, _022448DC ; =0x0000060C - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - bl ov62_022444A0 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _02244794 - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - b _0224479E -_02244794: - add r5, #0x80 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_02232394 -_0224479E: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022455C4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022448D2 -_022447B4: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022447DA - add r0, r4, #0 - bl ov62_02245D50 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022447DA: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022448D2 -_022447F4: - add r5, #8 - add r0, r5, #0 - bl ov62_02231688 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022448D2 -_02244822: - bl ov62_02233790 - cmp r0, #0 - beq _022448D2 - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _022448A2 - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - bl sub_0202F250 - cmp r0, #1 - bne _022448D2 - bl sub_0202F22C - b _022448D2 -_022448A2: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_022448D2: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_022448D8: .word 0x00000608 -_022448DC: .word 0x0000060C - thumb_func_end ov62_02244720 - - thumb_func_start ov62_022448E0 -ov62_022448E0: ; 0x022448E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r1, #0 - ldr r1, _022449B0 ; =0x0000088C - lsl r6, r2, #2 - add r4, r5, r1 - ldr r1, [r4, r6] - str r0, [sp, #0x10] - ldr r0, [r5, #0x48] - cmp r1, #0 - bne _02244900 - mov r1, #8 - bl sub_0200B1EC - add r4, r0, #0 - b _0224495E -_02244900: - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - ldr r0, [r5, #0x48] - mov r1, #7 - bl sub_0200B1EC - str r0, [sp, #0x14] - ldr r0, [r4, r6] - mov r1, #0x66 - bl sub_02030B94 - add r6, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl ov62_022349A8 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - add r0, r7, #0 - add r2, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r2, [sp, #0x14] - add r0, r7, #0 - add r1, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 -_0224495E: - add r0, sp, #0x18 - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r5, #0x24] - add r1, sp, #0x18 - mov r2, #0x14 - mov r3, #2 - bl sub_0201A870 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _022449B4 ; =0x000E0D00 - add r2, r4, #0 - str r0, [sp, #8] - add r0, sp, #0x18 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x10] - ldr r0, [r0, #8] - ldr r1, [r1, #0xc] - add r2, sp, #0x18 - mov r3, #0x66 - bl sub_02012BE0 - add r0, r4, #0 - bl sub_020237BC - add r0, sp, #0x18 - bl sub_0201A8FC - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_022449B0: .word 0x0000088C -_022449B4: .word 0x000E0D00 - thumb_func_end ov62_022448E0 - - thumb_func_start ov62_022449B8 -ov62_022449B8: ; 0x022449B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - ldr r1, _02244AAC ; =0x000008A4 - add r5, r0, #0 - sub r1, #0x44 - ldr r6, [r5, r1] - mov r1, #2 - bl ov62_022302A8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _02244AAC ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - ldr r1, _02244AAC ; =0x000008A4 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r5, r1 - mov r2, #2 - mov r3, #1 - bl sub_0201A7E8 - cmp r4, #0x64 - bne _02244A6A - add r6, #0x80 - ldr r0, [r6, #0] - str r0, [sp, #0x14] - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x18] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - b _02244A74 -_02244A6A: - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r6, r0, #0 -_02244A74: - ldr r0, _02244AAC ; =0x000008A4 - mov r1, #0xcc - add r0, r5, r0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02244AB0 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _02244AAC ; =0x000008A4 - add r3, r1, #0 - add r0, r5, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _02244AAC ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02244AAC: .word 0x000008A4 -_02244AB0: .word 0x000F0D0C - thumb_func_end ov62_022449B8 - - thumb_func_start ov62_02244AB4 -ov62_02244AB4: ; 0x02244AB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, _02244BDC ; =0x000008A4 - add r4, r1, #0 - sub r0, #0x44 - ldr r0, [r5, r0] - cmp r4, #0x64 - bne _02244B2C - add r0, #0x80 - ldr r0, [r0, #0] - str r0, [sp, #0x14] - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x14] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x18] - ldr r1, [sp, #0x18] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x18] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x18] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - b _02244BA4 -_02244B2C: - cmp r4, #0x66 - bne _02244B9C - lsl r0, r2, #2 - add r1, r5, r0 - ldr r0, _02244BDC ; =0x000008A4 - sub r0, #0x18 - ldr r0, [r1, r0] - str r0, [sp, #0x10] - mov r0, #0x66 - bl ov62_02231690 - add r7, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r6, r0, #0 - ldr r0, [sp, #0x10] - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x1c] - ldr r1, [sp, #0x1c] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - add r1, r4, #0 - bl sub_0200B1EC - add r4, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - add r0, r7, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200C388 - ldr r0, [sp, #0x1c] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B3F0 - b _02244BA4 -_02244B9C: - ldr r0, [r5, #0x48] - bl sub_0200B1EC - add r6, r0, #0 -_02244BA4: - ldr r0, _02244BDC ; =0x000008A4 - mov r1, #0xcc - add r0, r5, r0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02244BE0 ; =0x000F0D0C - add r2, r6, #0 - str r0, [sp, #8] - ldr r0, _02244BDC ; =0x000008A4 - add r3, r1, #0 - add r0, r5, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _02244BDC ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r6, #0 - bl sub_020237BC - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02244BDC: .word 0x000008A4 -_02244BE0: .word 0x000F0D0C - thumb_func_end ov62_02244AB4 - - thumb_func_start ov62_02244BE4 -ov62_02244BE4: ; 0x02244BE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - mov r1, #0x86 - lsl r1, r1, #4 - ldr r3, _02244C9C ; =0x0224916C - ldr r4, [r0, r1] - str r0, [sp] - add r2, sp, #0x20 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r3, _02244CA0 ; =0x0224917C - add r2, sp, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp] - mov r1, #2 - bl ov62_0223136C - add r0, sp, #0x20 - str r0, [sp, #8] - mov r0, #0x69 - str r0, [sp, #4] - ldr r0, [sp] - add r5, r4, #0 - str r0, [sp, #0xc] - add r0, #0x14 - mov r6, #0 - add r5, #0x10 - add r7, sp, #0x10 - str r0, [sp, #0xc] -_02244C28: - ldr r0, [sp] - mov r1, #2 - bl ov62_022313E0 - str r0, [r4, #0x14] - ldr r1, [sp, #0xc] - add r0, r5, #0 - mov r2, #2 - bl ov62_0223118C - ldr r2, [sp, #8] - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r5, #0 - bl ov62_0223124C - cmp r6, #3 - beq _02244C56 - ldr r1, [sp] - add r0, r5, #0 - add r2, r6, #1 - bl ov62_022448E0 -_02244C56: - ldr r2, [sp, #4] - ldr r0, [r4, #0x14] - lsl r2, r2, #0x10 - mov r1, #0x32 - asr r2, r2, #0x10 - bl sub_0200D4C4 - ldr r0, [r4, #0x14] - ldr r1, [r7, #0] - bl sub_0200D364 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x18] - sub r2, #0x2c - bl sub_020128C4 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_020129D0 - ldr r0, [sp, #8] - add r6, r6, #1 - add r0, r0, #4 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r4, #0x1c - add r0, #0x24 - add r5, #0x1c - add r7, r7, #4 - str r0, [sp, #4] - cmp r6, #4 - blt _02244C28 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244C9C: .word 0x0224916C -_02244CA0: .word 0x0224917C - thumb_func_end ov62_02244BE4 - - thumb_func_start ov62_02244CA4 -ov62_02244CA4: ; 0x02244CA4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r7, r0] - mov r6, #0 - add r4, r5, #0 - add r4, #0x10 -_02244CB4: - add r0, r4, #0 - bl ov62_022312B0 - ldr r0, [r5, #0x14] - bl sub_0200D0F4 - add r6, r6, #1 - add r4, #0x1c - add r5, #0x1c - cmp r6, #4 - blt _02244CB4 - add r0, r7, #0 - bl ov62_022313BC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov62_02244CA4 - - thumb_func_start ov62_02244CD4 -ov62_02244CD4: ; 0x02244CD4 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] - bl sub_0202FE04 - mov r1, #4 - mov r2, #0 - bl sub_0202FE98 - add r3, r0, #0 - add r2, r1, #0 - add r0, r4, #0 - add r1, r3, #0 - bl ov62_02234970 - cmp r0, #0 - bne _02244CFC - b _02244F5A -_02244CFC: - ldr r0, [r4, #8] - cmp r0, #5 - bls _02244D04 - b _02244EA6 -_02244D04: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02244D10: ; jump table - .short _02244D1C - _02244D10 - 2 ; case 0 - .short _02244D6A - _02244D10 - 2 ; case 1 - .short _02244DD0 - _02244D10 - 2 ; case 2 - .short _02244DE0 - _02244D10 - 2 ; case 3 - .short _02244E18 - _02244D10 - 2 ; case 4 - .short _02244E58 - _02244D10 - 2 ; case 5 -_02244D1C: - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _02244D3A - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - b _02244D44 -_02244D3A: - add r5, #0x80 - add r0, r5, #0 - add r1, r4, #0 - bl ov62_02232394 -_02244D44: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022455C4 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02244F6C -_02244D6A: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02244DB6 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_02245D50 - add r0, r4, #0 - bl ov62_02244BE4 - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02244DB6: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02244F6C -_02244DD0: - ldr r1, _02244F70 ; =0x00000115 - add r0, r4, #0 - bl ov62_02231AAC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02244F6C -_02244DE0: - bl sub_02022798 - cmp r0, #0 - bne _02244DEA - b _02244F6C -_02244DEA: - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02244F6C -_02244E18: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02244E3E - add r0, r4, #0 - bl ov62_02244CA4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02244E3E: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02244F6C -_02244E58: - ldr r0, _02244F74 ; =0x00000608 - ldr r0, [r5, r0] - bl sub_02024034 - ldr r0, _02244F78 ; =0x0000060C - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02024034 - add r5, #8 - add r0, r5, #0 - bl ov62_02231688 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022444A0 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02244F6C -_02244EA6: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _02244F6C - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02244F28 - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - bl sub_0202F250 - cmp r0, #1 - bne _02244F6C - bl sub_0202F22C - b _02244F6C -_02244F28: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02244F6C -_02244F5A: - add r0, r4, #0 - bl ov62_02245ECC - cmp r0, #0 - beq _02244F6C - add r0, r4, #0 - mov r1, #0xd - bl ov62_0222FB60 -_02244F6C: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244F70: .word 0x00000115 -_02244F74: .word 0x00000608 -_02244F78: .word 0x0000060C - thumb_func_end ov62_02244CD4 - - thumb_func_start ov62_02244F7C -ov62_02244F7C: ; 0x02244F7C - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - ldr r0, _02244F90 ; =0x0000060C - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_02244F90: .word 0x0000060C - thumb_func_end ov62_02244F7C - - thumb_func_start ov62_02244F94 -ov62_02244F94: ; 0x02244F94 - push {r4, lr} - add r4, r0, #0 - bl ov62_02246640 - cmp r0, #0 - beq _02244FA8 - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 -_02244FA8: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02244F94 - - thumb_func_start ov62_02244FAC -ov62_02244FAC: ; 0x02244FAC - push {r4, lr} - add r4, r0, #0 - bl ov62_02246428 - cmp r0, #0 - beq _02244FC0 - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 -_02244FC0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02244FAC - - thumb_func_start ov62_02244FC4 -ov62_02244FC4: ; 0x02244FC4 - push {r4, lr} - add r4, r0, #0 - bl ov62_02245FE4 - cmp r0, #0 - beq _02244FD8 - add r0, r4, #0 - mov r1, #0x10 - bl ov62_0222FB60 -_02244FD8: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02244FC4 - - thumb_func_start ov62_02244FDC -ov62_02244FDC: ; 0x02244FDC - push {r3, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r1, [r0, r1] - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r1, r0] - bl sub_0202404C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_02244FDC - - thumb_func_start ov62_02244FF4 -ov62_02244FF4: ; 0x02244FF4 - push {r4, lr} - add r4, r0, #0 - bl ov62_02246090 - cmp r0, #0 - beq _02245008 - add r0, r4, #0 - mov r1, #0xd - bl ov62_0222FB60 -_02245008: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02244FF4 - - thumb_func_start ov62_0224500C -ov62_0224500C: ; 0x0224500C - push {r3, lr} - bl ov62_0224613C - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_0224500C - - thumb_func_start ov62_02245018 -ov62_02245018: ; 0x02245018 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #5 - bls _0224502C - b _022452E4 -_0224502C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02245038: ; jump table - .short _02245044 - _02245038 - 2 ; case 0 - .short _022450D8 - _02245038 - 2 ; case 1 - .short _02245178 - _02245038 - 2 ; case 2 - .short _02245244 - _02245038 - 2 ; case 3 - .short _022452B6 - _02245038 - 2 ; case 4 - .short _022452D4 - _02245038 - 2 ; case 5 -_02245044: - bl ov62_02233790 - cmp r0, #0 - beq _022450F0 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - bl ov62_022315C8 - ldr r0, _02245300 ; =0x00002604 - ldrb r1, [r4, r0] - ldr r0, _02245304 ; =0x0000079C - strb r1, [r5, r0] - ldr r0, _02245308 ; =0x000008B8 - ldr r1, _0224530C ; =0x000004BC - add r2, r4, r0 - str r2, [r5, r1] - ldr r1, [r5, r1] - sub r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - bl ov62_0223371C - add r0, r4, #0 - bl ov62_022443EC - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #0 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022452FA -_022450D8: - bl ov62_02233790 - cmp r0, #0 - beq _022450F0 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - bne _022450F2 -_022450F0: - b _022452FA -_022450F2: - mov r0, #0 - mov r1, #1 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #4 - mov r1, #1 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #0 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - mov r0, #0x66 - str r0, [sp] - ldr r0, _02245310 ; =0x0224919C - ldr r2, _02245314 ; =ov62_022457A0 - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _02245318 ; =0x00000608 - ldr r2, _0224531C ; =ov62_02245800 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _02245320 ; =0x0224915C - mov r1, #4 - add r3, r4, #0 - bl sub_02023FCC - ldr r1, _02245324 ; =0x0000060C - ldr r2, _02245328 ; =ov62_02245868 - str r0, [r5, r1] - mov r0, #0x66 - str r0, [sp] - ldr r0, _0224532C ; =0x0224913C - mov r1, #2 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x61 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022452FA -_02245178: - bl ov62_02245C64 - add r0, r4, #0 - bl ov62_02245640 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _022451F0 - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _0224521C -_022451F0: - add r0, r5, #0 - add r0, #0x80 - add r1, r4, #0 - bl ov62_02232378 - add r5, #0x80 - add r0, r5, #0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_0224521C: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022452FA -_02245244: - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - str r2, [r5, #8] - bl ov62_022315E0 - cmp r0, #0 - beq _0224529C - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _0224526C - sub r0, #0xc0 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _02245276 -_0224526C: - add r0, r5, #0 - add r0, #0x80 - mov r1, #1 - bl ov62_022323B8 -_02245276: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224529C: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _022452FA -_022452B6: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022452FA -_022452D4: - bl sub_0200F2AC - cmp r0, #1 - bne _022452FA - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022452FA -_022452E4: - ldr r0, _02245330 ; =0x000006D8 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - add r0, r4, #0 - bl ov62_02230098 - add r0, r4, #0 - mov r1, #8 - bl ov62_0222FB60 -_022452FA: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245300: .word 0x00002604 -_02245304: .word 0x0000079C -_02245308: .word 0x000008B8 -_0224530C: .word 0x000004BC -_02245310: .word 0x0224919C -_02245314: .word ov62_022457A0 -_02245318: .word 0x00000608 -_0224531C: .word ov62_02245800 -_02245320: .word 0x0224915C -_02245324: .word 0x0000060C -_02245328: .word ov62_02245868 -_0224532C: .word 0x0224913C -_02245330: .word 0x000006D8 - thumb_func_end ov62_02245018 - - thumb_func_start ov62_02245334 -ov62_02245334: ; 0x02245334 - push {r4, lr} - mov r1, #0x6f - add r4, r0, #0 - lsl r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02245334 - - thumb_func_start ov62_0224536C -ov62_0224536C: ; 0x0224536C - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _02245380 - b _022454A0 -_02245380: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224538C: ; jump table - .short _02245394 - _0224538C - 2 ; case 0 - .short _022453A8 - _0224538C - 2 ; case 1 - .short _02245406 - _0224538C - 2 ; case 2 - .short _0224548A - _0224538C - 2 ; case 3 -_02245394: - mov r1, #0x77 - bl ov62_02231AAC - ldr r0, _022454D0 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022454CA -_022453A8: - bl ov62_022411B8 - cmp r0, #0 - bne _022453B6 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_022453B6: - mov r3, #0 - mov r0, #0x83 - str r3, [sp] - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x66 - add r2, sp, #4 - bl sub_0202F298 - mov r0, #0x66 - bl sub_02030A80 - mov r1, #0x1d - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0x83 - lsl r1, r1, #4 - ldr r1, [r4, r1] - bl sub_02030AA0 - add r0, r4, #0 - bl ov62_0224112C - mov r1, #0x1d - lsl r1, r1, #4 - ldr r1, [r5, r1] - bl ov61_0222B338 - cmp r0, #1 - bne _022454CA - mov r0, #0x1d - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02030A98 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022454CA -_02245406: - bl ov62_022411B8 - cmp r0, #0 - bne _02245414 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_02245414: - bl sub_0202F22C - add r0, r4, #0 - bl ov62_02231B8C - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #8 - bl ov61_0222BB48 - cmp r0, #1 - bne _02245464 - ldr r0, _022454D0 ; =0x00000565 - mov r1, #0 - bl sub_020057A4 - ldr r3, [sp, #8] - add r0, r4, #0 - ldr r2, [r3, #0xc] - ldr r3, [r3, #4] - mov r1, #6 - bl ov62_022348B8 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - mov r0, #0xff - str r0, [r4, #8] - b _022454CA -_02245464: - add r0, r4, #0 - mov r1, #0x77 - bl ov62_02231AAC - add r0, r5, #0 - add r1, r4, #0 - bl ov62_022469A0 - ldr r0, _022454D0 ; =0x00000565 - mov r1, #0 - bl sub_020057A4 - ldr r0, _022454D4 ; =0x0000055F - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022454CA -_0224548A: - bl sub_02022798 - cmp r0, #0 - beq _022454CA - add r0, r4, #0 - bl ov62_02231B8C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _022454CA -_022454A0: - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - mov r1, #0x2e - bl ov62_02233704 - add r0, r4, #0 - mov r1, #4 - bl ov62_0222FB60 -_022454CA: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_022454D0: .word 0x00000565 -_022454D4: .word 0x0000055F - thumb_func_end ov62_0224536C - - thumb_func_start ov62_022454D8 -ov62_022454D8: ; 0x022454D8 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - bne _0224551C - add r4, #8 - add r0, r4, #0 - bl ov62_02231688 - add r0, r5, #0 - bl ov62_02230060 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_0223146C - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _022455C0 -_0224551C: - bl ov62_02233790 - cmp r0, #0 - beq _022455C0 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _02245590 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - b _022455C0 -_02245590: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_022455C0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_022454D8 - - thumb_func_start ov62_022455C4 -ov62_022455C4: ; 0x022455C4 - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - ldr r0, _022455E0 ; =0x000006D4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _022455E0 ; =0x000006D4 - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - nop -_022455E0: .word 0x000006D4 - thumb_func_end ov62_022455C4 - - thumb_func_start ov62_022455E4 -ov62_022455E4: ; 0x022455E4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r6, _02245638 ; =0x000006D4 - add r7, r1, #0 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - add r1, r7, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, r6 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0224563C ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02245638: .word 0x000006D4 -_0224563C: .word 0x000F0D00 - thumb_func_end ov62_022455E4 - - thumb_func_start ov62_02245640 -ov62_02245640: ; 0x02245640 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r6, _02245688 ; =0x000006D4 - add r0, r4, r6 - bl sub_0201A7A0 - mov r0, #3 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r2, #6 - mov r3, #8 - bl sub_0201A7E8 - mov r1, #0x73 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - add r1, #0x79 - bl ov62_022455E4 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - nop -_02245688: .word 0x000006D4 - thumb_func_end ov62_02245640 - - thumb_func_start ov62_0224568C -ov62_0224568C: ; 0x0224568C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r6, _02245764 ; =0x000006D4 - add r0, r4, r6 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r3, #4 - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x82 - bl sub_0200B1EC - add r7, r0, #0 - add r0, r4, r6 - add r1, r7, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02245768 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add r6, #0x10 - add r0, r4, r6 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x15 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, r6 - mov r3, #0x12 - bl sub_0201A7E8 - add r0, r4, r6 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x83 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, r6 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02245768 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, r6 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02245764: .word 0x000006D4 -_02245768: .word 0x000F0D00 - thumb_func_end ov62_0224568C - - thumb_func_start ov62_0224576C -ov62_0224576C: ; 0x0224576C - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - ldr r0, _02245798 ; =0x000006D4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _02245798 ; =0x000006D4 - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _0224579C ; =0x000006E4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _0224579C ; =0x000006E4 - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - nop -_02245798: .word 0x000006D4 -_0224579C: .word 0x000006E4 - thumb_func_end ov62_0224576C - - thumb_func_start ov62_022457A0 -ov62_022457A0: ; 0x022457A0 - push {r4, lr} - add r4, r2, #0 - cmp r1, #0 - bne _022457FE - cmp r0, #3 - bhi _022457FE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022457B8: ; jump table - .short _022457C0 - _022457B8 - 2 ; case 0 - .short _022457D0 - _022457B8 - 2 ; case 1 - .short _022457E0 - _022457B8 - 2 ; case 2 - .short _022457F0 - _022457B8 - 2 ; case 3 -_022457C0: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #9 - bl ov62_0222FB60 - pop {r4, pc} -_022457D0: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0xa - bl ov62_0222FB60 - pop {r4, pc} -_022457E0: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0xc - bl ov62_0222FB60 - pop {r4, pc} -_022457F0: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0xb - bl ov62_0222FB60 -_022457FE: - pop {r4, pc} - thumb_func_end ov62_022457A0 - - thumb_func_start ov62_02245800 -ov62_02245800: ; 0x02245800 - push {r4, lr} - add r4, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r3, [r4, r2] - cmp r1, #0 - bne _02245864 - cmp r0, #3 - bhi _02245864 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224581E: ; jump table - .short _02245826 - _0224581E - 2 ; case 0 - .short _02245826 - _0224581E - 2 ; case 1 - .short _02245826 - _0224581E - 2 ; case 2 - .short _02245856 - _0224581E - 2 ; case 3 -_02245826: - add r1, r0, #1 - mov r0, #0x72 - lsl r0, r0, #2 - str r1, [r3, r0] - ldr r0, [r3, r0] - add r2, #0x2c - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, r2] - cmp r0, #0 - beq _02245846 - add r0, r4, #0 - mov r1, #0xf - bl ov62_0222FB60 - b _0224584E -_02245846: - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 -_0224584E: - add r0, r4, #0 - bl ov62_02234520 - pop {r4, pc} -_02245856: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0xe - bl ov62_0222FB60 -_02245864: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02245800 - - thumb_func_start ov62_02245868 -ov62_02245868: ; 0x02245868 - push {r4, lr} - add r4, r2, #0 - cmp r1, #0 - bne _0224589E - cmp r0, #0 - beq _0224587A - cmp r0, #1 - beq _02245890 - pop {r4, pc} -_0224587A: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_0224576C - add r0, r4, #0 - mov r1, #0x12 - bl ov62_0222FB60 - pop {r4, pc} -_02245890: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0x11 - bl ov62_0222FB60 -_0224589E: - pop {r4, pc} - thumb_func_end ov62_02245868 - - thumb_func_start ov62_022458A0 -ov62_022458A0: ; 0x022458A0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x86 - add r4, r2, #0 - lsl r0, r0, #4 - ldr r6, [r4, r0] - cmp r1, #0 - bne _0224595C - cmp r5, #4 - bhi _0224595C - add r1, r5, r5 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022458C0: ; jump table - .short _022458CA - _022458C0 - 2 ; case 0 - .short _022458DE - _022458C0 - 2 ; case 1 - .short _022458F2 - _022458C0 - 2 ; case 2 - .short _02245924 - _022458C0 - 2 ; case 3 - .short _02245934 - _022458C0 - 2 ; case 4 -_022458CA: - add r0, r4, #0 - bl ov62_02234520 - ldr r0, _02245960 ; =0x000004C5 - mov r1, #5 - strb r5, [r6, r0] - add r0, r4, #0 - bl ov62_0222FB60 - pop {r3, r4, r5, r6, r7, pc} -_022458DE: - add r0, r4, #0 - bl ov62_02234520 - ldr r0, _02245960 ; =0x000004C5 - mov r1, #5 - strb r5, [r6, r0] - add r0, r4, #0 - bl ov62_0222FB60 - pop {r3, r4, r5, r6, r7, pc} -_022458F2: - add r0, #0x2c - ldr r0, [r4, r0] - bl sub_02030BFC - add r7, r0, #0 - add r0, r4, #0 - bl ov62_02234520 - cmp r7, #0 - bne _02245916 - ldr r0, _02245964 ; =0x00000564 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x80 - bl ov62_02231B3C - pop {r3, r4, r5, r6, r7, pc} -_02245916: - ldr r0, _02245960 ; =0x000004C5 - mov r1, #5 - strb r5, [r6, r0] - add r0, r4, #0 - bl ov62_0222FB60 - pop {r3, r4, r5, r6, r7, pc} -_02245924: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #4 - bl ov62_0222FB60 - pop {r3, r4, r5, r6, r7, pc} -_02245934: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_02241780 - cmp r0, #0 - bne _02245954 - ldr r0, _02245964 ; =0x00000564 - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x74 - bl ov62_02231B3C - pop {r3, r4, r5, r6, r7, pc} -_02245954: - add r0, r4, #0 - mov r1, #0xc - bl ov62_0222FB60 -_0224595C: - pop {r3, r4, r5, r6, r7, pc} - nop -_02245960: .word 0x000004C5 -_02245964: .word 0x00000564 - thumb_func_end ov62_022458A0 - - thumb_func_start ov62_02245968 -ov62_02245968: ; 0x02245968 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r1, #0 - bne _0224598E - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02242748 - cmp r0, #0 - bne _02245986 - ldr r0, _02245990 ; =0x00000564 - bl sub_02005748 - pop {r3, r4, r5, pc} -_02245986: - add r0, r4, #0 - add r1, r5, #0 - bl ov62_022427D0 -_0224598E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245990: .word 0x00000564 - thumb_func_end ov62_02245968 - - thumb_func_start ov62_02245994 -ov62_02245994: ; 0x02245994 - push {r3, r4, r5, lr} - add r4, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r5, [r4, r2] - cmp r1, #0 - bne _02245A24 - cmp r0, #3 - bhi _02245A24 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022459B2: ; jump table - .short _022459BA - _022459B2 - 2 ; case 0 - .short _022459CA - _022459B2 - 2 ; case 1 - .short _022459F0 - _022459B2 - 2 ; case 2 - .short _02245A16 - _022459B2 - 2 ; case 3 -_022459BA: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0x13 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_022459CA: - add r0, r4, #0 - bl ov62_02234520 - bl sub_0202F250 - cmp r0, #0 - beq _022459E2 - add r0, r4, #0 - mov r1, #0x14 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_022459E2: - mov r0, #0x14 - str r0, [r5, #0xc] - add r0, r4, #0 - mov r1, #0x1d - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_022459F0: - add r0, r4, #0 - bl ov62_02234520 - bl sub_0202F250 - cmp r0, #0 - beq _02245A08 - add r0, r4, #0 - mov r1, #0x16 - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02245A08: - mov r0, #0x16 - str r0, [r5, #0xc] - add r0, r4, #0 - mov r1, #0x1d - bl ov62_0222FB60 - pop {r3, r4, r5, pc} -_02245A16: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0x15 - bl ov62_0222FB60 -_02245A24: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02245994 - - thumb_func_start ov62_02245A28 -ov62_02245A28: ; 0x02245A28 - push {r4, lr} - add r4, r2, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r3, [r4, r2] - cmp r1, #0 - bne _02245A8C - cmp r0, #3 - bhi _02245A8C - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02245A46: ; jump table - .short _02245A4E - _02245A46 - 2 ; case 0 - .short _02245A4E - _02245A46 - 2 ; case 1 - .short _02245A4E - _02245A46 - 2 ; case 2 - .short _02245A7E - _02245A46 - 2 ; case 3 -_02245A4E: - add r1, r0, #1 - mov r0, #0x72 - lsl r0, r0, #2 - str r1, [r3, r0] - ldr r0, [r3, r0] - add r2, #0x2c - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, r2] - cmp r0, #0 - beq _02245A6E - add r0, r4, #0 - mov r1, #0x19 - bl ov62_0222FB60 - b _02245A76 -_02245A6E: - add r0, r4, #0 - mov r1, #0x1c - bl ov62_0222FB60 -_02245A76: - add r0, r4, #0 - bl ov62_02234520 - pop {r4, pc} -_02245A7E: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0x18 - bl ov62_0222FB60 -_02245A8C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02245A28 - - thumb_func_start ov62_02245A90 -ov62_02245A90: ; 0x02245A90 - push {r4, lr} - add r4, r2, #0 - cmp r1, #0 - bne _02245AC6 - cmp r0, #0 - beq _02245AA2 - cmp r0, #1 - beq _02245AB8 - pop {r4, pc} -_02245AA2: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_0224576C - add r0, r4, #0 - mov r1, #0x1c - bl ov62_0222FB60 - pop {r4, pc} -_02245AB8: - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - mov r1, #0x1b - bl ov62_0222FB60 -_02245AC6: - pop {r4, pc} - thumb_func_end ov62_02245A90 - - thumb_func_start ov62_02245AC8 -ov62_02245AC8: ; 0x02245AC8 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - ldr r0, [r4, #0x14] - bne _02245AF0 - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_020129D0 - ldr r0, [r4, #0x30] - mov r1, #0x80 - mov r2, #0xa8 - bl sub_0200D4C4 - b _02245B08 -_02245AF0: - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_020129D0 - ldr r0, [r4, #0x30] - mov r1, #0x50 - mov r2, #0xa8 - bl sub_0200D4C4 -_02245B08: - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x18] - sub r2, #0x2c - bl sub_020128C4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x34] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02245AC8 - - thumb_func_start ov62_02245B24 -ov62_02245B24: ; 0x02245B24 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - mov r1, #1 - bl ov62_022312CC - add r0, r4, #0 - mov r1, #1 - bl ov62_022313E0 - str r0, [r5, #0x14] - add r0, r4, #0 - mov r1, #1 - bl ov62_022313E0 - str r0, [r5, #0x30] - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #1 - bl ov62_0223118C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #1 - bl ov62_0223118C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x6f - bl ov62_0223124C - ldr r0, [r5, #0x14] - mov r1, #0x20 - mov r2, #0xa8 - bl sub_0200D4C4 - ldr r0, [r5, #0x30] - mov r1, #0x80 - mov r2, #0xa8 - bl sub_0200D4C4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r5, #0x18] - sub r2, #0x2c - bl sub_020128C4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r5, #0x34] - sub r2, #0x2c - bl sub_020128C4 - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_020129D0 - ldr r0, [r5, #0x34] - mov r1, #1 - bl sub_020129D0 - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #1 - bl sub_0200D364 - add r0, r4, #0 - mov r1, #0 - bl ov62_02245AC8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02245B24 - - thumb_func_start ov62_02245BD8 -ov62_02245BD8: ; 0x02245BD8 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] - add r0, r5, #0 - add r0, #0x10 - bl ov62_022312B0 - add r0, r5, #0 - add r0, #0x2c - bl ov62_022312B0 - ldr r0, [r5, #0x14] - bl sub_0200D0F4 - ldr r0, [r5, #0x30] - bl sub_0200D0F4 - add r0, r4, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02245BD8 - - thumb_func_start ov62_02245C08 -ov62_02245C08: ; 0x02245C08 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r4, [r0, r2] - cmp r1, #0 - ldr r0, [r4, #0x30] - bne _02245C30 - mov r1, #1 - bl sub_0200D3F4 - ldr r0, [r4, #0x34] - mov r1, #1 - bl sub_020129D0 - ldr r0, [r4, #0x14] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - b _02245C48 -_02245C30: - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r4, #0x34] - mov r1, #0 - bl sub_020129D0 - ldr r0, [r4, #0x14] - mov r1, #0x50 - mov r2, #0xe8 - bl sub_0200D4C4 -_02245C48: - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x18] - sub r2, #0x2c - bl sub_020128C4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x34] - sub r2, #0x2c - bl sub_020128C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02245C08 - - thumb_func_start ov62_02245C64 -ov62_02245C64: ; 0x02245C64 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - mov r1, #2 - bl ov62_022312CC - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - str r0, [r4, #0x14] - add r0, r5, #0 - mov r1, #2 - bl ov62_022313E0 - str r0, [r4, #0x30] - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #2 - bl ov62_0223118C - ldr r0, _02245D4C ; =0x0000086C - ldr r0, [r5, r0] - cmp r0, #0xd2 - bne _02245CDA - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x6f - bl ov62_0223124C - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x30] - mov r1, #1 - bl sub_0200D364 - b _02245D06 -_02245CDA: - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r4, #0 - add r1, r5, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - ldr r0, [r4, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r4, #0x30] - mov r1, #3 - bl sub_0200D364 -_02245D06: - ldr r0, [r4, #0x14] - mov r1, #0x20 - mov r2, #0xe8 - bl sub_0200D4C4 - ldr r0, [r4, #0x30] - mov r1, #0x80 - mov r2, #0xe8 - bl sub_0200D4C4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x18] - sub r2, #0x2c - bl sub_020128C4 - mov r1, #0x24 - add r2, r1, #0 - ldr r0, [r4, #0x34] - sub r2, #0x2c - bl sub_020128C4 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_020129D0 - ldr r0, [r4, #0x34] - mov r1, #1 - bl sub_020129D0 - add r0, r5, #0 - mov r1, #0 - bl ov62_02245C08 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245D4C: .word 0x0000086C - thumb_func_end ov62_02245C64 - - thumb_func_start ov62_02245D50 -ov62_02245D50: ; 0x02245D50 - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r5, [r4, r0] - add r0, r5, #0 - add r0, #0x10 - bl ov62_022312B0 - add r0, r5, #0 - add r0, #0x2c - bl ov62_022312B0 - ldr r0, [r5, #0x14] - bl sub_0200D0F4 - ldr r0, [r5, #0x30] - bl sub_0200D0F4 - add r0, r4, #0 - bl ov62_022313BC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02245D50 - - thumb_func_start ov62_02245D80 -ov62_02245D80: ; 0x02245D80 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #3 - bls _02245D92 - b _02245EAE -_02245D92: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02245D9E: ; jump table - .short _02245DA6 - _02245D9E - 2 ; case 0 - .short _02245DE4 - _02245D9E - 2 ; case 1 - .short _02245DFC - _02245D9E - 2 ; case 2 - .short _02245E66 - _02245D9E - 2 ; case 3 -_02245DA6: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _02245DC2 - sub r0, #0xc0 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _02245DCC -_02245DC2: - add r4, #0x80 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02232394 -_02245DCC: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02245EC8 -_02245DE4: - mov r2, #1 - add r0, r4, #0 - add r1, r4, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02245EC8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02245EC8 -_02245DFC: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _02245E2C - add r0, r4, #0 - add r0, #0x80 - add r1, r5, #0 - bl ov62_02232378 - add r4, #0x80 - add r0, r4, #0 - mov r1, #0 - bl ov62_022323B8 - add r0, r5, #0 - mov r1, #0x50 - mov r2, #3 - bl ov62_022343B8 - b _02245E56 -_02245E2C: - sub r0, #0xc0 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r5, #0 - mov r2, #3 - bl ov62_022343B8 -_02245E56: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02245EC8 -_02245E66: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _02245EC8 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _02245E8C - add r4, #0x80 - add r0, r4, #0 - mov r1, #1 - bl ov62_022323B8 - b _02245E96 -_02245E8C: - sub r0, #0xc0 - add r0, r4, r0 - mov r1, #1 - bl ov62_0223427C -_02245E96: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02245EC8 -_02245EAE: - mov r1, #0x73 - lsl r1, r1, #2 - ldr r2, [r4, r1] - mov r0, #1 - eor r0, r2 - str r0, [r4, r1] - ldr r1, [r4, r1] - add r0, r5, #0 - add r1, #0x79 - bl ov62_022455E4 - mov r0, #1 - pop {r3, r4, r5, pc} -_02245EC8: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02245D80 - - thumb_func_start ov62_02245ECC -ov62_02245ECC: ; 0x02245ECC - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02245EE6 - cmp r1, #1 - beq _02245F32 - cmp r1, #2 - beq _02245F98 - b _02245FDC -_02245EE6: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _02245F02 - sub r0, #0xc0 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _02245F0C -_02245F02: - add r4, #0x80 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_02232394 -_02245F0C: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022455C4 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02245FE0 -_02245F32: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02245F7E - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02245D50 - add r0, r5, #0 - bl ov62_02244BE4 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02245F7E: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02245FE0 -_02245F98: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #1 - bl ov62_022315E0 - cmp r0, #0 - beq _02245FC2 - add r0, r5, #0 - mov r1, #0x64 - mov r2, #0 - bl ov62_022449B8 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02245FC2: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02245FE0 -_02245FDC: - mov r0, #1 - pop {r3, r4, r5, pc} -_02245FE0: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02245ECC - - thumb_func_start ov62_02245FE4 -ov62_02245FE4: ; 0x02245FE4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - beq _02245FFC - cmp r0, #1 - beq _0224605C - b _02246082 -_02245FFC: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02246042 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x54 - mov r3, #7 - bl sub_0200710C - mov r2, #0x72 - lsl r2, r2, #2 - ldr r2, [r4, r2] - add r0, r5, #0 - mov r1, #0x66 - bl ov62_02244AB4 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02246042: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02246088 -_0224605C: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02246088 - add r0, r5, #0 - bl ov62_0224568C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02246088 -_02246082: - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, pc} -_02246088: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02245FE4 - - thumb_func_start ov62_02246090 -ov62_02246090: ; 0x02246090 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - ldr r0, [r5, #8] - cmp r0, #0 - beq _022460AA - cmp r0, #1 - beq _022460BA - cmp r0, #2 - beq _022460E8 - b _02246134 -_022460AA: - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02246138 -_022460BA: - add r0, r4, #0 - add r1, r4, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _02246138 - add r0, r5, #0 - bl ov62_0224576C - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02246138 -_022460E8: - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _0224611A - add r0, r5, #0 - mov r1, #0x64 - mov r2, #0 - bl ov62_02244AB4 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_0224611A: - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02246138 -_02246134: - mov r0, #1 - pop {r3, r4, r5, pc} -_02246138: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02246090 - - thumb_func_start ov62_0224613C -ov62_0224613C: ; 0x0224613C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r0, #0 - mov r2, #0x86 - lsl r2, r2, #4 - ldr r1, [r4, #8] - ldr r5, [r4, r2] - cmp r1, #7 - bls _02246150 - b _02246350 -_02246150: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224615C: ; jump table - .short _0224616C - _0224615C - 2 ; case 0 - .short _0224617C - _0224615C - 2 ; case 1 - .short _022461CE - _0224615C - 2 ; case 2 - .short _022461EE - _0224615C - 2 ; case 3 - .short _02246224 - _0224615C - 2 ; case 4 - .short _02246268 - _0224615C - 2 ; case 5 - .short _022462AE - _0224615C - 2 ; case 6 - .short _022462FA - _0224615C - 2 ; case 7 -_0224616C: - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246402 -_0224617C: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _022461B4 - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r1, _02246408 ; =0x00000116 - add r0, r4, #0 - mov r2, #0 - bl ov62_02244AB4 - add r0, r4, #0 - bl ov62_022342BC - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022461B4: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02246402 -_022461CE: - mov r1, #0x72 - sub r2, #0xc4 - lsl r1, r1, #2 - ldrb r2, [r5, r2] - ldr r1, [r5, r1] - bl ov62_022337F0 - cmp r0, #0 - beq _022462B6 - ldr r0, _0224640C ; =0x0000079C - mov r1, #0 - strb r1, [r5, r0] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246402 -_022461EE: - mov r1, #0x6f - lsl r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0x80 - mov r3, #0x60 - bl ov62_02234358 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0x18 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - ldr r0, _02246410 ; =0x00000565 - bl sub_02005748 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246402 -_02246224: - bl ov62_022411B8 - cmp r0, #0 - bne _02246232 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_02246232: - mov r1, #0x46 - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #0 - bl ov62_02244AB4 - bl sub_0202FE04 - mov r1, #4 - mov r2, #0 - bl sub_0202FE98 - add r6, r0, #0 - add r5, r1, #0 - add r0, r4, #0 - bl ov62_0224112C - add r1, r6, #0 - add r2, r5, #0 - bl ov61_0222B550 - cmp r0, #1 - bne _022462B6 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246402 -_02246268: - bl ov62_022411B8 - cmp r0, #0 - bne _02246276 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_02246276: - add r0, r4, #0 - bl ov62_0224112C - add r1, sp, #4 - bl ov61_0222BB48 - cmp r0, #1 - ldr r0, _02246410 ; =0x00000565 - bne _02246290 - mov r1, #0 - bl sub_020057A4 - b _0224629C -_02246290: - mov r1, #0 - bl sub_020057A4 - ldr r0, _02246414 ; =0x0000055F - bl sub_02005748 -_0224629C: - ldr r0, [r4, #8] - ldr r1, _02246418 ; =0x00000119 - add r0, r0, #1 - str r0, [r4, #8] - add r0, r4, #0 - mov r2, #0 - bl ov62_02244AB4 - b _02246402 -_022462AE: - bl sub_02022798 - cmp r0, #0 - bne _022462B8 -_022462B6: - b _02246402 -_022462B8: - add r0, r4, #0 - bl ov62_02231A88 - add r0, r4, #0 - bl ov62_02244CA4 - mov r0, #0x6f - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0208B9E0 - mov r0, #0x6f - lsl r0, r0, #4 - mov r1, #0 - ldr r0, [r4, r0] - add r2, r1, #0 - bl sub_0208BA08 - add r0, r4, #0 - bl ov62_022339A0 - add r0, r4, #0 - bl ov62_022338A8 - ldr r0, _0224641C ; =0x0000049C - add r0, r4, r0 - bl ov62_02233310 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246402 -_022462FA: - ldr r0, _02246420 ; =0x00000608 - ldr r0, [r5, r0] - bl sub_02024034 - ldr r0, _02246424 ; =0x0000060C - ldr r0, [r5, r0] - bl sub_02024034 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_02024034 - add r5, #8 - add r0, r5, #0 - bl ov62_02231688 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r4, #0 - bl ov62_022444A0 - add r0, r4, #0 - bl ov62_0223146C - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #1 - mov r1, #0x66 - bl sub_020397C8 - add r0, r4, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246402 -_02246350: - add r0, r4, #0 - bl ov62_02233790 - cmp r0, #0 - beq _02246402 - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _022463D2 - add r0, r4, #0 - bl ov62_022318E8 - add r0, r5, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r4, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r4, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r4, #0x10] - add r0, r4, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r4, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r5, #0 - bl sub_020181C4 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019EBC - bl sub_0202F250 - cmp r0, #1 - bne _02246402 - bl sub_0202F22C - b _02246402 -_022463D2: - ldr r0, [r4, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_02246402: - mov r0, #0 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02246408: .word 0x00000116 -_0224640C: .word 0x0000079C -_02246410: .word 0x00000565 -_02246414: .word 0x0000055F -_02246418: .word 0x00000119 -_0224641C: .word 0x0000049C -_02246420: .word 0x00000608 -_02246424: .word 0x0000060C - thumb_func_end ov62_0224613C - - thumb_func_start ov62_02246428 -ov62_02246428: ; 0x02246428 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r1, [r4, #8] - ldr r5, [r4, r0] - cmp r1, #3 - bls _0224643C - b _02246634 -_0224643C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246448: ; jump table - .short _02246450 - _02246448 - 2 ; case 0 - .short _02246478 - _02246448 - 2 ; case 1 - .short _022464B2 - _02246448 - 2 ; case 2 - .short _022465CA - _02246448 - 2 ; case 3 -_02246450: - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224663A -_02246478: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02246498 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02246498: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224663A -_022464B2: - add r0, #0xc - ldr r0, [r4, r0] - cmp r0, #0xd2 - bne _022464E6 - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #3 - bl sub_0200D364 -_022464E6: - add r0, r4, #0 - bl ov62_022455C4 - add r0, r4, #0 - bl ov62_02245640 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _0224656C - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234228 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _022465A2 -_0224656C: - add r0, r5, #0 - add r0, #0x80 - add r1, r4, #0 - bl ov62_02232394 - add r0, r5, #0 - add r0, #0x80 - add r1, r4, #0 - bl ov62_02232378 - add r5, #0x80 - add r0, r5, #0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_022465A2: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _0224663A -_022465CA: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _0224661A - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _022465FA - sub r0, #0xc0 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _02246604 -_022465FA: - add r0, r5, #0 - add r0, #0x80 - mov r1, #1 - bl ov62_022323B8 -_02246604: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_0224661A: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224663A -_02246634: - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, pc} -_0224663A: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02246428 - - thumb_func_start ov62_02246640 -ov62_02246640: ; 0x02246640 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #3 - bls _02246654 - b _0224683E -_02246654: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02246660: ; jump table - .short _02246668 - _02246660 - 2 ; case 0 - .short _02246694 - _02246660 - 2 ; case 1 - .short _022466D4 - _02246660 - 2 ; case 2 - .short _022467D4 - _02246660 - 2 ; case 3 -_02246668: - bl ov62_02231A88 - ldr r0, [r4, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0x24] - mov r1, #6 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246844 -_02246694: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022466BA - add r0, r4, #0 - bl ov62_02244CA4 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022466BA: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02246844 -_022466D4: - bl ov62_02245C64 - ldr r0, _0224684C ; =0x0000086C - ldr r0, [r4, r0] - cmp r0, #0xd2 - bne _0224670C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x10 - add r1, #0x14 - mov r2, #3 - bl ov62_0223124C - add r0, r5, #0 - add r1, r4, #0 - add r0, #0x2c - add r1, #0x14 - mov r2, #0x5e - bl ov62_0223124C - ldr r0, [r5, #0x14] - mov r1, #0 - bl sub_0200D364 - ldr r0, [r5, #0x30] - mov r1, #3 - bl sub_0200D364 -_0224670C: - add r0, r4, #0 - bl ov62_02245640 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r4, #0 - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _02246780 - sub r0, #0xc0 - add r0, r5, r0 - add r1, r4, #0 - bl ov62_02234214 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl ov62_0223427C - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov62_02233FEC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #3 - bl ov62_022343B8 - b _022467AC -_02246780: - add r0, r5, #0 - add r0, #0x80 - add r1, r4, #0 - bl ov62_02232378 - add r5, #0x80 - add r0, r5, #0 - mov r1, #0 - bl ov62_022323B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x50 - mov r3, #3 - bl sub_0200710C -_022467AC: - add r0, r4, #0 - mov r1, #0 - bl ov62_02234540 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #6 - mov r3, #7 - bl sub_0200710C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02246844 -_022467D4: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - mov r2, #0 - add r0, r5, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _02246824 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _02246804 - sub r0, #0xc0 - add r0, r5, r0 - mov r1, #1 - bl ov62_0223427C - b _0224680E -_02246804: - add r0, r5, #0 - add r0, #0x80 - mov r1, #1 - bl ov62_022323B8 -_0224680E: - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_02246824: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02246844 -_0224683E: - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, pc} -_02246844: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0224684C: .word 0x0000086C - thumb_func_end ov62_02246640 - - thumb_func_start ov62_02246850 -ov62_02246850: ; 0x02246850 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0224686C - cmp r1, #1 - beq _0224688C - cmp r1, #2 - beq _0224689C - b _0224692A -_0224686C: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x66 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02246930 -_0224688C: - bl sub_0200F2AC - cmp r0, #1 - bne _02246930 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02246930 -_0224689C: - mov r1, #1 - bl ov62_02234540 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - bne _022468B8 - sub r0, #0xc0 - add r0, r4, r0 - add r1, r5, #0 - bl ov62_02234228 - b _022468C2 -_022468B8: - add r0, r4, #0 - add r0, #0x80 - add r1, r5, #0 - bl ov62_02232394 -_022468C2: - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, _02246938 ; =0x00000608 - ldr r0, [r4, r0] - bl sub_02024034 - ldr r0, _0224693C ; =0x0000060C - ldr r0, [r4, r0] - bl sub_02024034 - mov r0, #0x61 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02024034 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_022444A0 - add r0, r5, #0 - bl ov62_022455C4 - add r0, r5, #0 - bl ov62_02245D50 - add r0, r5, #0 - bl ov62_022314A8 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r1, [r5, #0x10] - add r0, r5, #0 - ldr r1, [r1, #0] - bl ov62_022300C8 - ldr r0, _02246940 ; =0x00000868 - mov r1, #1 - ldr r0, [r5, r0] - mov r2, #0 - bl sub_0208BA84 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02246930 -_0224692A: - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_02246930: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_02246938: .word 0x00000608 -_0224693C: .word 0x0000060C -_02246940: .word 0x00000868 - thumb_func_end ov62_02246850 - - thumb_func_start ov62_02246944 -ov62_02246944: ; 0x02246944 - push {r4, lr} - mov r2, #0x86 - lsl r2, r2, #4 - ldr r1, [r1, #0] - ldr r4, [r0, r2] - cmp r1, #1 - beq _02246964 - bl ov62_0224112C - bl ov61_0222BDF0 - mov r2, #0x4b - lsl r2, r2, #4 - str r0, [r4, r2] - add r0, r2, #4 - str r1, [r4, r0] -_02246964: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02246944 - - thumb_func_start ov62_02246968 -ov62_02246968: ; 0x02246968 - push {r4, lr} - ldr r1, [r1, #0] - add r4, r0, #0 - cmp r1, #1 - beq _02246990 - bl ov62_0224112C - ldr r1, _02246994 ; =0x000008B4 - add r1, r4, r1 - bl ov61_0222BED8 - add r0, r4, #0 - bl ov62_0223371C - ldr r0, _02246994 ; =0x000008B4 - ldr r0, [r4, r0] - add r0, #0xa7 - ldrb r1, [r0] - ldr r0, _02246998 ; =0x00002604 - strb r1, [r4, r0] -_02246990: - pop {r4, pc} - nop -_02246994: .word 0x000008B4 -_02246998: .word 0x00002604 - thumb_func_end ov62_02246968 - - thumb_func_start ov62_0224699C -ov62_0224699C: ; 0x0224699C - bx lr - ; .align 2, 0 - thumb_func_end ov62_0224699C - - thumb_func_start ov62_022469A0 -ov62_022469A0: ; 0x022469A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r4, r0, #0 - mov r0, #0x66 - add r5, r1, #0 - bl ov62_02231690 - add r6, r0, #0 - mov r0, #0x4b - lsl r0, r0, #4 - ldr r7, [r4, r0] - add r0, r0, #4 - ldr r4, [r4, r0] - mov r0, #0xff - mov r1, #0x66 - str r4, [sp, #0x14] - bl sub_02023790 - str r0, [sp, #0x18] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x1c] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x20] - ldr r2, _02246AF0 ; =0x000186A0 - add r0, r7, #0 - add r1, r4, #0 - mov r3, #0 - bl sub_020E1ED4 - str r0, [sp, #0x24] - add r4, r1, #0 - ldr r0, [r5, #0x48] - ldr r1, _02246AF4 ; =0x00000127 - bl sub_0200B1EC - str r0, [sp, #0x28] - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - str r0, [sp, #0x2c] - ldr r1, [sp, #0x14] - ldr r2, _02246AF0 ; =0x000186A0 - add r0, r7, #0 - mov r3, #0 - bl sub_020E1EE0 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x18] - mov r2, #5 - mov r3, #2 - bl sub_020238A0 - ldr r0, [sp, #0x24] - ldr r2, _02246AF0 ; =0x000186A0 - add r1, r4, #0 - mov r3, #0 - bl sub_020E1EE0 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x1c] - mov r2, #5 - mov r3, #2 - bl sub_020238A0 - ldr r0, [sp, #0x24] - ldr r2, _02246AF0 ; =0x000186A0 - add r1, r4, #0 - mov r3, #0 - bl sub_020E1ED4 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - mov r2, #2 - ldr r0, [sp, #0x20] - add r3, r2, #0 - bl sub_020238A0 - mov r0, #1 - str r0, [sp] - mov r1, #2 - ldr r2, [sp, #0x18] - add r0, r6, #0 - mov r3, #0 - str r1, [sp, #4] - bl sub_0200B48C - mov r1, #1 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - add r0, r6, #0 - mov r3, #0 - bl sub_0200B48C - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x20] - add r0, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x28] - add r0, r6, #0 - bl sub_0200C388 - ldr r0, _02246AF8 ; =0x000008A4 - mov r1, #0xcc - add r0, r5, r0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02246AFC ; =0x000F0D00 - ldr r2, [sp, #0x2c] - str r0, [sp, #8] - ldr r0, _02246AF8 ; =0x000008A4 - add r3, r1, #0 - add r0, r5, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _02246AF8 ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A9A4 - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x2c] - bl sub_020237BC - add r0, r6, #0 - bl sub_0200C41C - add r0, r6, #0 - bl sub_0200B3F0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_02246AF0: .word 0x000186A0 -_02246AF4: .word 0x00000127 -_02246AF8: .word 0x000008A4 -_02246AFC: .word 0x000F0D00 - thumb_func_end ov62_022469A0 - - thumb_func_start ov62_02246B00 -ov62_02246B00: ; 0x02246B00 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x20 - str r0, [sp] - add r5, r2, #0 - add r7, r3, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x20 - add r4, r0, #0 - bl sub_020C4CF4 - ldr r1, [sp] - add r0, r6, #1 - str r6, [r4, #0] - bl sub_02023790 - str r0, [r4, #0x18] - str r7, [r4, #0x1c] - mov r2, #0 - add r1, r5, #0 - add r3, r4, #0 -_02246B2E: - ldr r0, [r1, #0] - add r2, r2, #1 - str r0, [r3, #4] - add r1, r1, #4 - add r3, r3, #4 - cmp r2, #3 - blt _02246B2E - sub r0, r2, #1 - lsl r0, r0, #2 - ldr r1, [r5, r0] - lsl r0, r2, #2 - add r0, r4, r0 - str r1, [r0, #4] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_02246B00 - - thumb_func_start ov62_02246B4C -ov62_02246B4C: ; 0x02246B4C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _02246B5A - bl sub_02022974 -_02246B5A: - cmp r4, #0 - bne _02246B62 - bl sub_02022974 -_02246B62: - ldr r0, [r4, #0x18] - bl sub_020237BC - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov62_02246B4C - - thumb_func_start ov62_02246B70 -ov62_02246B70: ; 0x02246B70 - push {r3, r4} - mov r2, #0x82 - lsl r2, r2, #2 - ldr r4, [r0, r2] - add r3, r2, #4 - str r4, [r0, r3] - str r1, [r0, r2] - add r1, r2, #0 - mov r3, #0 - add r1, #8 - str r3, [r0, r1] - add r1, r2, #0 - add r1, #0xc - str r3, [r0, r1] - add r1, r2, #0 - add r1, #0x10 - str r3, [r0, r1] - add r1, r2, #0 - add r1, #0x14 - str r3, [r0, r1] - ldr r1, [r0, r2] - cmp r1, #0 - beq _02246BC2 - sub r1, r1, #1 - lsl r1, r1, #2 - add r3, r0, r1 - add r1, r2, #0 - sub r1, #0x24 - ldrh r3, [r3, r1] - add r1, r2, #0 - add r1, #8 - str r3, [r0, r1] - ldr r1, [r0, r2] - sub r1, r1, #1 - lsl r1, r1, #2 - add r3, r0, r1 - add r1, r2, #0 - sub r1, #0x22 - ldrh r1, [r3, r1] - add r2, #0xc - str r1, [r0, r2] -_02246BC2: - mov r2, #0x83 - lsl r2, r2, #2 - ldr r1, [r0, r2] - cmp r1, #0 - beq _02246BF0 - sub r1, r1, #1 - lsl r1, r1, #2 - add r3, r0, r1 - add r1, r2, #0 - sub r1, #0x28 - ldrh r3, [r3, r1] - add r1, r2, #0 - add r1, #0xc - str r3, [r0, r1] - ldr r1, [r0, r2] - sub r1, r1, #1 - lsl r1, r1, #2 - add r3, r0, r1 - add r1, r2, #0 - sub r1, #0x26 - ldrh r1, [r3, r1] - add r2, #0x10 - str r1, [r0, r2] -_02246BF0: - pop {r3, r4} - bx lr - thumb_func_end ov62_02246B70 - - thumb_func_start ov62_02246BF4 -ov62_02246BF4: ; 0x02246BF4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - mov r2, #0xa6 - lsl r2, r2, #2 - add r4, r2, #0 - mov r1, #1 - add r3, r0, #0 - str r1, [r3, r2] - mov r5, #0 - sub r4, #0xb4 - strh r5, [r3, r4] - add r4, r2, #0 - add r4, #0x14 - ldr r5, [r3, r4] - add r4, r2, #0 - sub r4, #0xb2 - strh r5, [r3, r4] - add r4, r2, #0 - add r4, #0x14 - ldr r5, [r3, r4] - add r4, r2, #0 - sub r4, #0xb0 - strh r5, [r3, r4] - add r4, r2, #0 - add r4, #0x14 - ldr r5, [r3, r4] - add r4, r2, #0 - add r4, #0x18 - ldr r3, [r3, r4] - add r4, r2, #0 - add r5, r5, r3 - add r6, r2, #0 - sub r4, #0xae - add r3, r0, #0 - strh r5, [r3, r4] - add r4, r2, #0 - add r4, #0x14 - ldr r5, [r3, r4] - add r4, r2, #0 - add r4, #0x18 - ldr r3, [r3, r4] - add r4, r2, #0 - add r5, r5, r3 - sub r4, #0xac - add r3, r0, #0 - strh r5, [r3, r4] - add r4, r2, #0 - add r5, r2, #0 - add r4, #0x1c - add r5, #0x14 - ldr r4, [r3, r4] - ldr r3, [r3, r5] - add r6, #0x18 - add r5, r0, #0 - ldr r5, [r5, r6] - sub r2, #0xaa - add r3, r3, r5 - add r4, r4, r3 - add r3, r0, #0 - str r0, [sp] - strh r4, [r3, r2] - bl ov62_02246B70 - mov r4, #0x81 - lsl r4, r4, #2 - add r3, r4, #0 - ldr r1, [sp] - mov r0, #0 - add r3, #0xa8 -_02246C7E: - ldr r2, [sp] - add r0, r0, #1 - ldr r5, [r2, r4] - ldr r2, [r1, r3] - add r1, r1, #4 - add r5, r5, r2 - ldr r2, [sp] - cmp r0, #3 - str r5, [r2, r4] - blt _02246C7E - ldr r4, _02246D5C ; =0x02249710 - add r3, sp, #8 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #0xab - ldr r0, [sp] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r2, #0 - cmp r0, #4 - beq _02246CB2 - mov r2, #1 -_02246CB2: - mov r0, #0xc - mul r0, r2 - add r3, sp, #8 - add r0, r3, r0 - mov r2, #0x77 - ldr r5, [sp] - mov r1, #0 - add r4, r0, #0 - lsl r2, r2, #2 -_02246CC4: - ldr r3, [r4, #0] - add r1, r1, #1 - strh r3, [r5, r2] - add r4, r4, #4 - add r5, r5, #2 - cmp r1, #3 - blt _02246CC4 - sub r2, r1, #1 - lsl r2, r2, #2 - ldr r2, [r0, r2] - ldr r0, [sp] - lsl r1, r1, #1 - add r1, r0, r1 - mov r0, #0x77 - lsl r0, r0, #2 - strh r2, [r1, r0] - ldr r1, [sp] - mov r0, #0 - mov r4, #0xab - mov r5, #0x15 - add r3, r0, #0 - add r2, r1, #0 - lsl r4, r4, #2 - lsl r5, r5, #4 -_02246CF4: - ldr r6, [r1, r4] - add r3, r3, #1 - add r0, r0, r6 - sub r6, r0, #1 - str r6, [r2, r5] - add r1, r1, #4 - add r2, #0x1c - cmp r3, #2 - blt _02246CF4 - ldr r0, [sp] - mov r5, #0 - mov r7, #0xab - mov ip, r5 - str r0, [sp, #4] - add r4, r0, #0 - lsl r7, r7, #2 -_02246D14: - mov r0, #0xab - ldr r2, [sp, #4] - lsl r0, r0, #2 - ldr r0, [r2, r0] - mov r1, #0 - cmp r0, #0 - ble _02246D40 - mov r0, ip - lsl r3, r0, #2 - ldr r0, [sp] - add r2, r4, #0 - add r3, r0, r3 - mov r0, ip - add r6, r0, #1 -_02246D30: - str r6, [r2, #4] - ldr r0, [r3, r7] - add r1, r1, #1 - add r2, #0x1c - add r4, #0x1c - add r5, r5, #1 - cmp r1, r0 - blt _02246D30 -_02246D40: - ldr r0, [sp, #4] - ldr r1, [sp] - add r0, r0, #4 - str r0, [sp, #4] - mov r0, ip - add r0, r0, #1 - mov ip, r0 - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r5, r0 - blt _02246D14 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02246D5C: .word 0x02249710 - thumb_func_end ov62_02246BF4 - - thumb_func_start ov62_02246D60 -ov62_02246D60: ; 0x02246D60 - mov r2, #0x7d - lsl r2, r2, #2 - str r1, [r0, r2] - mov r3, #0 - add r1, r2, #4 - str r3, [r0, r1] - add r1, r2, #0 - add r1, #8 - str r3, [r0, r1] - add r2, #0xc - str r3, [r0, r2] - bx lr - thumb_func_end ov62_02246D60 - - thumb_func_start ov62_02246D78 -ov62_02246D78: ; 0x02246D78 - push {r4, lr} - add r4, r0, #0 - bl ov62_02246BF4 - add r0, r4, #0 - bl ov62_02247220 - add r0, r4, #0 - bl ov62_02247574 - add r0, r4, #0 - bl ov62_02247B48 - add r0, r4, #0 - bl ov62_02247754 - add r0, r4, #0 - mov r1, #0 - bl ov62_02247B88 - add r0, r4, #0 - bl ov62_0224784C - add r0, r4, #0 - bl ov62_02247CE0 - add r0, r4, #0 - mov r1, #1 - bl ov62_02246D60 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov62_02246D78 - - thumb_func_start ov62_02246DB8 -ov62_02246DB8: ; 0x02246DB8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x8d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02024034 - add r0, r4, #0 - bl ov62_02247694 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov62_02246DB8 - - thumb_func_start ov62_02246DD0 -ov62_02246DD0: ; 0x02246DD0 - push {r4, lr} - mov r1, #0x7f - add r4, r0, #0 - lsl r1, r1, #2 - ldr r2, [r4, r1] - cmp r2, #0 - bne _02246DE4 - add r0, r2, #1 - str r0, [r4, r1] - b _02246DF2 -_02246DE4: - bl ov62_022474A8 - mov r0, #0x8d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0202404C -_02246DF2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02246DD0 - - thumb_func_start ov62_02246DF8 -ov62_02246DF8: ; 0x02246DF8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x7f - add r5, r0, #0 - lsl r1, r1, #2 - ldr r2, [r5, r1] - cmp r2, #0 - beq _02246E0E - cmp r2, #1 - bne _02246E0C - b _02246F74 -_02246E0C: - b _0224701C -_02246E0E: - mov r1, #0 - add r2, r1, #0 - bl ov62_02247968 - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r6, #0 - cmp r0, #0 - ble _02246EB0 - ldr r7, _02247078 ; =0x02249974 - add r4, r5, #0 -_02246E26: - ldrb r0, [r4, #0x18] - cmp r0, #0 - beq _02246EA2 - mov r1, #0x14 - mov r2, #0x16 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, #0xc] - bl sub_0200D5DC - ldrb r0, [r4, #0x18] - sub r0, r0, #1 - strb r0, [r4, #0x18] - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r6, r0 - blt _02246E70 - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r6, r0 - bge _02246E70 - ldrb r0, [r4, #0x19] - lsl r1, r0, #2 - ldr r1, [r7, r1] - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl sub_0200D6E8 - ldrb r0, [r4, #0x19] - mov r1, #2 - add r0, r0, #1 - strb r0, [r4, #0x19] - ldr r0, [r4, #0xc] - bl sub_0200D6A4 -_02246E70: - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r6, r0 - blt _02246EA2 - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r6, r0 - bge _02246EA2 - ldrb r0, [r4, #0x19] - ldr r1, _0224707C ; =0x02249958 - lsl r2, r0, #2 - ldr r1, [r1, r2] - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl sub_0200D6E8 - ldrb r0, [r4, #0x19] - mov r1, #2 - add r0, r0, #1 - strb r0, [r4, #0x19] - ldr r0, [r4, #0xc] - bl sub_0200D6A4 -_02246EA2: - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r6, r6, #1 - add r4, #0x1c - cmp r6, r0 - blt _02246E26 -_02246EB0: - mov r7, #0x5a - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #2 -_02246EB8: - ldrb r0, [r4, r7] - cmp r0, #0 - beq _02246EE0 - mov r1, #0x59 - ldr r2, _02247080 ; =0x00000166 - mov r0, #0x57 - lsl r1, r1, #2 - lsl r0, r0, #2 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, r0] - bl sub_0200D5DC - mov r0, #0x5a - lsl r0, r0, #2 - ldrb r0, [r4, r0] - sub r1, r0, #1 - mov r0, #0x5a - lsl r0, r0, #2 - strb r1, [r4, r0] -_02246EE0: - add r6, r6, #1 - add r4, #0x1c - cmp r6, #2 - blt _02246EB8 - ldrb r0, [r5, #0x18] - cmp r0, #0 - bne _02246F68 - mov r0, #0x21 - lsl r0, r0, #4 - ldr r6, [r5, r0] - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r6, r0 - bge _02246F26 - mov r0, #0x1c - mul r0, r6 - mov r7, #0x85 - add r4, r5, r0 - lsl r7, r7, #2 -_02246F06: - ldr r0, [r4, #0] - ldr r1, [r4, #8] - bl ov62_02247B3C - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0200D364 - ldr r0, [r4, #0xc] - bl sub_0200D330 - ldr r0, [r5, r7] - add r6, r6, #1 - add r4, #0x1c - cmp r6, r0 - blt _02246F06 -_02246F26: - mov r0, #0x86 - lsl r0, r0, #2 - ldr r6, [r5, r0] - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r6, r0 - bge _02246F5E - mov r0, #0x1c - mul r0, r6 - mov r7, #0x87 - add r4, r5, r0 - lsl r7, r7, #2 -_02246F3E: - ldr r0, [r4, #0] - ldr r1, [r4, #8] - bl ov62_02247B3C - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0200D364 - ldr r0, [r4, #0xc] - bl sub_0200D330 - ldr r0, [r5, r7] - add r6, r6, #1 - add r4, #0x1c - cmp r6, r0 - blt _02246F3E -_02246F5E: - mov r0, #0x7f - lsl r0, r0, #2 - ldr r1, [r5, r0] - add r1, r1, #1 - str r1, [r5, r0] -_02246F68: - mov r0, #2 - lsl r0, r0, #8 - ldr r1, [r5, r0] - add r1, r1, #1 - str r1, [r5, r0] - b _02247072 -_02246F74: - add r0, r1, #0 - add r0, #0x14 - add r1, #0x18 - ldr r6, [r5, r0] - ldr r0, [r5, r1] - cmp r6, r0 - bge _02246FBA - mov r0, #0x1c - mul r0, r6 - ldr r7, _02247078 ; =0x02249974 - add r4, r5, r0 -_02246F8A: - ldrb r0, [r4, #0x19] - cmp r0, #6 - bne _02246F9A - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0200D6A4 - b _02246FAC -_02246F9A: - lsl r1, r0, #2 - ldr r1, [r7, r1] - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl sub_0200D6E8 - ldrb r0, [r4, #0x19] - add r0, r0, #1 - strb r0, [r4, #0x19] -_02246FAC: - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r6, r6, #1 - add r4, #0x1c - cmp r6, r0 - blt _02246F8A -_02246FBA: - mov r0, #0x86 - lsl r0, r0, #2 - ldr r6, [r5, r0] - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r6, r0 - bge _02247000 - mov r0, #0x1c - mul r0, r6 - ldr r7, _0224707C ; =0x02249958 - add r4, r5, r0 -_02246FD0: - ldrb r0, [r4, #0x19] - cmp r0, #6 - bne _02246FE0 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0200D6A4 - b _02246FF2 -_02246FE0: - lsl r1, r0, #2 - ldr r1, [r7, r1] - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl sub_0200D6E8 - ldrb r0, [r4, #0x19] - add r0, r0, #1 - strb r0, [r4, #0x19] -_02246FF2: - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r6, r6, #1 - add r4, #0x1c - cmp r6, r0 - blt _02246FD0 -_02247000: - mov r1, #2 - lsl r1, r1, #8 - ldr r0, [r5, r1] - add r0, r0, #1 - str r0, [r5, r1] - ldr r0, [r5, r1] - cmp r0, #6 - bne _02247072 - sub r0, r1, #4 - ldr r0, [r5, r0] - add r2, r0, #1 - sub r0, r1, #4 - str r2, [r5, r0] - b _02247072 -_0224701C: - bl ov62_02247CE0 - mov r1, #0xa9 - lsl r1, r1, #2 - ldr r0, [r5, r1] - cmp r0, #0 - bne _0224703E - sub r1, r1, #4 - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov62_02247518 - add r1, r0, #0 - add r0, r5, #0 - bl ov62_02247998 - b _02247050 -_0224703E: - sub r1, r1, #4 - ldr r1, [r5, r1] - add r0, r5, #0 - bl ov62_02247540 - add r1, r0, #0 - add r0, r5, #0 - bl ov62_02247998 -_02247050: - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02247064 - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - bl ov62_02247968 -_02247064: - add r0, r5, #0 - bl ov62_02247504 - add r0, r5, #0 - mov r1, #1 - bl ov62_02246D60 -_02247072: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247078: .word 0x02249974 -_0224707C: .word 0x02249958 -_02247080: .word 0x00000166 - thumb_func_end ov62_02246DF8 - - thumb_func_start ov62_02247084 -ov62_02247084: ; 0x02247084 - push {r3, r4, r5, lr} - mov r1, #0x7d - add r4, r0, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - lsl r2, r1, #2 - ldr r1, _022470A4 ; =0x02249700 - ldr r1, [r1, r2] - blx r1 - add r5, r0, #0 - bne _022470A0 - add r0, r4, #0 - bl ov62_02247A70 -_022470A0: - add r0, r5, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022470A4: .word 0x02249700 - thumb_func_end ov62_02247084 - - thumb_func_start ov62_022470A8 -ov62_022470A8: ; 0x022470A8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - mov r0, #0x64 - mov r1, #0x66 - bl sub_02023790 - mov r1, #0xb2 - str r0, [sp, #4] - mov r0, #1 - lsl r1, r1, #2 - str r0, [r7, r1] - mov r6, #0 - add r0, r1, #4 - str r6, [r7, r0] - add r0, r1, #0 - add r0, #8 - sub r1, #0xc4 - str r6, [r7, r0] - ldr r0, [r7, r1] - cmp r0, #0 - ble _02247148 - mov r0, #0xb3 - lsl r0, r0, #2 - add r4, r7, #0 - add r5, r7, r0 -_022470DC: - ldr r0, [r4, #0] - cmp r0, #0 - bne _022470F4 - mov r0, #1 - str r0, [r4, #0] - ldr r1, [r4, #8] - bl ov62_02247B3C - add r1, r0, #0 - ldr r0, [r4, #0xc] - bl sub_0200D364 -_022470F4: - ldr r0, [r4, #0] - sub r0, r0, #1 - str r0, [sp, #8] - cmp r6, #0 - beq _0224710E - ldr r0, [r5, #0] - ldr r1, [r5, #4] - mov r2, #0xa - mov r3, #0 - bl sub_020E1F1C - str r0, [r5, #0] - str r1, [r5, #4] -_0224710E: - ldr r2, [r5, #0] - ldr r1, [sp, #8] - ldr r0, [r5, #4] - add r2, r2, r1 - ldr r1, _0224715C ; =0x00000000 - str r2, [r5, #0] - adc r0, r1 - str r0, [r5, #4] - mov r0, #1 - str r0, [sp] - mov r2, #1 - ldr r0, [sp, #4] - ldr r1, [sp, #8] - add r3, r2, #0 - bl sub_020238A0 - mov r0, #0xb - lsl r0, r0, #6 - ldr r0, [r7, r0] - ldr r1, [sp, #4] - bl sub_02023E4C - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r7, r0] - add r6, r6, #1 - add r4, #0x1c - cmp r6, r0 - blt _022470DC -_02247148: - ldr r0, [sp, #4] - bl sub_020237BC - add r0, r7, #0 - mov r1, #3 - bl ov62_02246D60 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224715C: .word 0x00000000 - thumb_func_end ov62_022470A8 - - thumb_func_start ov62_02247160 -ov62_02247160: ; 0x02247160 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #0 - bne _0224719C - sub r1, r0, #4 - ldr r1, [r5, r1] - sub r2, r1, #1 - add r1, r0, #0 - sub r1, #0x80 - str r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x80 - ldr r2, [r5, r1] - mov r1, #0x1c - mul r1, r2 - add r1, r5, r1 - ldr r3, [r1, #4] - add r1, r0, #0 - mov r2, #1 - add r1, #0x94 - str r2, [r5, r1] - add r1, r0, #0 - add r1, #0x98 - str r3, [r5, r1] - add r0, #0x9c - str r2, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_0224719C: - sub r0, #0x80 - ldr r6, [r5, r0] - mov r0, #0x1c - add r4, r6, #0 - mul r4, r0 - mov r0, #0 - str r0, [r5, r4] - add r1, r5, r4 - ldr r0, [r5, r4] - ldr r1, [r1, #8] - bl ov62_02247B3C - add r1, r0, #0 - add r0, r5, r4 - ldr r0, [r0, #0xc] - bl sub_0200D364 - add r0, r5, r4 - ldr r7, [r0, #4] - cmp r6, #0 - ble _0224720C - sub r1, r6, #1 - mov r0, #0x1c - add r4, r1, #0 - mul r4, r0 - add r1, r5, r4 - ldr r0, [r5, r4] - ldr r1, [r1, #8] - bl ov62_02247B3C - add r1, r0, #0 - add r0, r5, r4 - ldr r0, [r0, #0xc] - bl sub_0200D364 - add r0, r5, r4 - ldr r3, [r0, #4] - cmp r7, r3 - beq _022471FC - mov r1, #0xa7 - lsl r1, r1, #2 - mov r2, #1 - str r2, [r5, r1] - add r0, r1, #4 - str r3, [r5, r0] - add r1, #8 - str r2, [r5, r1] - pop {r3, r4, r5, r6, r7, pc} -_022471FC: - mov r0, #0xa7 - mov r1, #2 - lsl r0, r0, #2 - str r1, [r5, r0] - sub r1, r6, #1 - add r0, r0, #4 - str r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} -_0224720C: - mov r0, #0xb2 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r5, #0 - mov r1, #3 - bl ov62_02246D60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov62_02247160 - - thumb_func_start ov62_02247220 -ov62_02247220: ; 0x02247220 - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - mov r1, #0x8e - add r4, r0, #0 - lsl r1, r1, #2 - mov r0, #0 - add r1, r4, r1 - add r2, r4, #0 -_02247230: - add r0, r0, #1 - str r1, [r2, #0x10] - add r1, r1, #4 - add r2, #0x1c - cmp r0, #0xc - blt _02247230 - ldr r5, _022472F8 ; =0x02249728 - add r3, sp, #4 - mov r2, #0x30 -_02247242: - ldrh r1, [r5] - add r5, r5, #2 - strh r1, [r3] - add r3, r3, #2 - sub r2, r2, #1 - bne _02247242 - cmp r0, #0x18 - bge _022472B0 - add r2, sp, #4 - lsl r1, r0, #3 - add r1, r2, r1 - lsl r2, r0, #2 - mov r7, #0x5b - ldr r3, _022472FC ; =0x0000023B - add r2, r4, r2 - mvn r7, r7 -_02247262: - mov r5, #0x5d - mov r6, #0x59 - mvn r5, r5 - mvn r6, r6 - ldrsh r5, [r1, r5] - ldrsh r6, [r1, r6] - add r0, r0, #1 - sub r6, r5, r6 - mov r5, #0x8e - lsl r5, r5, #2 - strb r6, [r2, r5] - mov r5, #0x5f - mov r6, #0x5b - mvn r5, r5 - mvn r6, r6 - ldrsh r5, [r1, r5] - ldrsh r6, [r1, r6] - sub r6, r5, r6 - ldr r5, _02247300 ; =0x0000023A - strb r6, [r2, r5] - mov r5, #0x5d - mov r6, #0x59 - mvn r5, r5 - mvn r6, r6 - ldrsh r5, [r1, r5] - ldrsh r6, [r1, r6] - add r6, r5, r6 - ldr r5, _02247304 ; =0x00000239 - strb r6, [r2, r5] - mov r5, #0x5f - mvn r5, r5 - ldrsh r6, [r1, r5] - ldrsh r5, [r1, r7] - add r1, #8 - add r5, r6, r5 - strb r5, [r2, r3] - add r2, r2, #4 - cmp r0, #0x18 - blt _02247262 -_022472B0: - mov r0, #0x29 - lsl r0, r0, #4 - mov r3, #0x98 - strb r3, [r4, r0] - mov r2, #0x20 - add r1, r0, #2 - strb r2, [r4, r1] - mov r2, #0xb8 - add r1, r0, #1 - strb r2, [r4, r1] - mov r1, #0x80 - add r5, r0, #3 - strb r1, [r4, r5] - add r5, r0, #4 - strb r3, [r4, r5] - add r3, r0, #6 - strb r1, [r4, r3] - add r1, r0, #5 - strb r2, [r4, r1] - add r1, r0, #7 - mov r2, #0xe0 - strb r2, [r4, r1] - mov r1, #0x66 - sub r0, #0x58 - str r1, [sp] - ldr r2, _02247308 ; =ov62_0224730C - add r0, r4, r0 - mov r1, #0x18 - add r3, r4, #0 - bl sub_02023FCC - mov r1, #0x8d - lsl r1, r1, #2 - str r0, [r4, r1] - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022472F8: .word 0x02249728 -_022472FC: .word 0x0000023B -_02247300: .word 0x0000023A -_02247304: .word 0x00000239 -_02247308: .word ov62_0224730C - thumb_func_end ov62_02247220 - - thumb_func_start ov62_0224730C -ov62_0224730C: ; 0x0224730C - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - mov r2, #0x7d - lsl r2, r2, #2 - add r5, r0, #0 - ldr r0, [r4, r2] - cmp r0, #1 - beq _0224731E - b _0224749C -_0224731E: - add r0, r2, #0 - add r0, #0xa4 - ldr r0, [r4, r0] - cmp r0, #1 - beq _0224732E - mov r0, #1 - add r2, #0xa4 - str r0, [r4, r2] -_0224732E: - cmp r1, #0 - beq _02247334 - b _0224749C -_02247334: - cmp r5, #0xb - bhi _02247368 - mov r0, #0x1c - mul r0, r5 - add r2, r4, r0 - ldr r0, [r2, #8] - cmp r0, #1 - bne _02247352 - mov r0, #0xa7 - mov r1, #2 - lsl r0, r0, #2 - str r1, [r4, r0] - add r0, r0, #4 - str r5, [r4, r0] - b _02247360 -_02247352: - mov r0, #0xa7 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r1, [r2, #4] - add r0, r0, #4 - str r1, [r4, r0] -_02247360: - ldr r0, _022474A0 ; =0x00000563 - bl sub_02005748 - pop {r3, r4, r5, r6, r7, pc} -_02247368: - cmp r5, #0x16 - bne _0224737C - mov r0, #0x6e - mov r1, #0 - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r1, #2 - add r0, r0, #2 - strh r1, [r4, r0] - b _022473AE -_0224737C: - cmp r5, #0x17 - bne _02247390 - mov r0, #0x6e - mov r1, #3 - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r1, #2 - add r0, r0, #2 - strh r1, [r4, r0] - b _022473AE -_02247390: - add r0, r5, #0 - sub r0, #0xc - mov r1, #5 - bl sub_020E2178 - mov r0, #0x6e - lsl r0, r0, #2 - strh r1, [r4, r0] - add r0, r5, #0 - sub r0, #0xc - mov r1, #5 - bl sub_020E2178 - ldr r1, _022474A4 ; =0x000001BA - strh r0, [r4, r1] -_022473AE: - cmp r5, #0xc - blo _02247480 - cmp r5, #0x15 - bhi _02247480 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0224749C - ldr r0, _022474A0 ; =0x00000563 - bl sub_02005748 - mov r0, #0x62 - lsl r0, r0, #2 - ldr r7, [r4, r0] - mov r0, #0x1c - add r6, r7, #0 - mul r6, r0 - add r0, r5, #0 - sub r0, #0xb - str r0, [r4, r6] - add r1, r4, r6 - ldr r0, [r4, r6] - ldr r1, [r1, #8] - bl ov62_02247B3C - add r1, r0, #0 - add r0, r4, r6 - ldr r0, [r0, #0xc] - bl sub_0200D364 - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov62_02247968 - sub r5, #0xc - add r0, r4, #0 - add r1, r5, #0 - bl ov62_022479D4 - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov62_02247968 - add r0, r4, #0 - mov r1, #2 - mov r2, #1 - bl ov62_02247968 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #2 - bl ov62_02247A20 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - bl sub_0200D364 - add r0, r4, r6 - ldr r2, [r0, #4] - mov r0, #0x81 - lsl r0, r0, #2 - ldr r3, [r4, r0] - add r1, r7, #1 - cmp r1, r3 - bne _02247450 - add r1, r0, #0 - mov r2, #1 - add r1, #0x98 - str r2, [r4, r1] - add r1, r0, #0 - mov r2, #0 - add r1, #0x9c - str r2, [r4, r1] - add r0, #0xa0 - str r2, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_02247450: - mov r3, #0x1c - mul r3, r1 - add r3, r4, r3 - ldr r3, [r3, #4] - cmp r2, r3 - beq _02247472 - add r1, r0, #0 - mov r2, #1 - add r1, #0x98 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0x9c - str r3, [r4, r1] - mov r1, #0 - add r0, #0xa0 - str r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_02247472: - add r2, r0, #0 - mov r3, #2 - add r2, #0x98 - str r3, [r4, r2] - add r0, #0x9c - str r1, [r4, r0] - pop {r3, r4, r5, r6, r7, pc} -_02247480: - cmp r5, #0x16 - ldr r0, _022474A0 ; =0x00000563 - bne _02247492 - bl sub_02005748 - add r0, r4, #0 - bl ov62_02247160 - pop {r3, r4, r5, r6, r7, pc} -_02247492: - bl sub_02005748 - add r0, r4, #0 - bl ov62_022470A8 -_0224749C: - pop {r3, r4, r5, r6, r7, pc} - nop -_022474A0: .word 0x00000563 -_022474A4: .word 0x000001BA - thumb_func_end ov62_0224730C - - thumb_func_start ov62_022474A8 -ov62_022474A8: ; 0x022474A8 - push {r4, lr} - mov r1, #0xa7 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r2, [r4, r1] - cmp r2, #2 - bgt _022474C6 - cmp r2, #0 - blt _02247500 - beq _02247500 - cmp r2, #1 - beq _022474CA - cmp r2, #2 - beq _022474F2 - pop {r4, pc} -_022474C6: - cmp r2, #0xff - pop {r4, pc} -_022474CA: - add r1, r1, #4 - ldr r1, [r4, r1] - bl ov62_02246B70 - add r0, r4, #0 - bl ov62_02247B48 - add r0, r4, #0 - mov r1, #1 - bl ov62_02247B88 - add r0, r4, #0 - mov r1, #2 - bl ov62_02246D60 - mov r0, #0xa7 - mov r1, #0xff - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} -_022474F2: - add r1, r1, #4 - ldr r1, [r4, r1] - bl ov62_02247998 - add r0, r4, #0 - bl ov62_02247504 -_02247500: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_022474A8 - - thumb_func_start ov62_02247504 -ov62_02247504: ; 0x02247504 - mov r2, #0xa7 - lsl r2, r2, #2 - mov r3, #0 - str r3, [r0, r2] - add r1, r2, #4 - str r3, [r0, r1] - add r2, #8 - str r3, [r0, r2] - bx lr - ; .align 2, 0 - thumb_func_end ov62_02247504 - - thumb_func_start ov62_02247518 -ov62_02247518: ; 0x02247518 - push {r3, r4} - mov r2, #0x81 - lsl r2, r2, #2 - ldr r4, [r0, r2] - mov r3, #0 - cmp r4, #0 - ble _0224753A -_02247526: - ldr r2, [r0, #4] - cmp r1, r2 - bne _02247532 - add r0, r3, #0 - pop {r3, r4} - bx lr -_02247532: - add r3, r3, #1 - add r0, #0x1c - cmp r3, r4 - blt _02247526 -_0224753A: - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov62_02247518 - - thumb_func_start ov62_02247540 -ov62_02247540: ; 0x02247540 - push {r3, r4, r5, r6} - mov r2, #0x81 - lsl r2, r2, #2 - ldr r6, [r0, r2] - mov r5, #0 - add r4, r5, #0 - cmp r6, #0 - ble _0224756E - mov r2, #1 -_02247552: - ldr r3, [r0, #4] - cmp r1, r3 - bne _0224755C - add r5, r2, #0 - b _02247566 -_0224755C: - cmp r5, #1 - bne _02247566 - sub r0, r4, #1 - pop {r3, r4, r5, r6} - bx lr -_02247566: - add r4, r4, #1 - add r0, #0x1c - cmp r4, r6 - blt _02247552 -_0224756E: - sub r0, r6, #1 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov62_02247540 - - thumb_func_start ov62_02247574 -ov62_02247574: ; 0x02247574 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - mov r2, #0x89 - lsl r2, r2, #2 - add r1, r2, #4 - ldr r5, [r0, r1] - add r1, r2, #0 - add r1, #0xc - ldr r1, [r0, r1] - ldr r6, [r0, r2] - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r7, [r0, r1] - sub r1, r2, #4 - ldr r4, [r0, r1] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x36 - add r2, r7, #0 - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x2b - add r2, r7, #0 - mov r3, #3 - bl sub_0200710C - str r4, [sp] - mov r0, #0x2c - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - mov r1, #2 - add r2, r6, #0 - add r3, r5, #0 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0x28 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [sp, #4] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0x29 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - mov r0, #0xfa - lsl r0, r0, #2 - str r0, [sp, #4] - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0x2a - bl sub_0200CE54 - str r4, [sp] - mov r0, #0x58 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, _02247690 ; =0x000003E9 - mov r1, #2 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r6, #0 - add r3, r5, #0 - bl sub_0200CDC4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02247690 ; =0x000003E9 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x57 - bl sub_0200CC3C - mov r0, #0 - str r0, [sp] - ldr r0, _02247690 ; =0x000003E9 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x55 - bl sub_0200CE24 - mov r0, #0 - str r0, [sp] - ldr r0, _02247690 ; =0x000003E9 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r4, #0 - mov r3, #0x56 - bl sub_0200CE54 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247690: .word 0x000003E9 - thumb_func_end ov62_02247574 - - thumb_func_start ov62_02247694 -ov62_02247694: ; 0x02247694 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r4, #0 - cmp r0, #0 - ble _022476BA - mov r7, #0x81 - add r5, r6, #0 - lsl r7, r7, #2 -_022476AA: - ldr r0, [r5, #0xc] - bl sub_0200D0F4 - ldr r0, [r6, r7] - add r4, r4, #1 - add r5, #0x1c - cmp r4, r0 - blt _022476AA -_022476BA: - mov r7, #0x57 - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_022476C2: - ldr r0, [r4, r7] - bl sub_0200D0F4 - add r5, r5, #1 - add r4, #0x1c - cmp r5, #2 - blt _022476C2 - mov r7, #0x65 - mov r5, #0 - add r4, r6, #0 - lsl r7, r7, #2 -_022476D8: - ldr r0, [r4, r7] - bl sub_0200D0F4 - add r5, r5, #1 - add r4, #0x1c - cmp r5, #3 - blt _022476D8 - mov r0, #0x8a - lsl r0, r0, #2 - mov r1, #0xfa - ldr r0, [r6, r0] - lsl r1, r1, #2 - bl sub_0200D070 - mov r0, #0x8a - lsl r0, r0, #2 - mov r1, #0xfa - ldr r0, [r6, r0] - lsl r1, r1, #2 - bl sub_0200D080 - mov r0, #0x8a - lsl r0, r0, #2 - mov r1, #0xfa - ldr r0, [r6, r0] - lsl r1, r1, #2 - bl sub_0200D090 - mov r0, #0x8a - lsl r0, r0, #2 - mov r1, #0xfa - ldr r0, [r6, r0] - lsl r1, r1, #2 - bl sub_0200D0A0 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r1, _02247750 ; =0x000003E9 - bl sub_0200D070 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r1, _02247750 ; =0x000003E9 - bl sub_0200D080 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r1, _02247750 ; =0x000003E9 - bl sub_0200D090 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r1, _02247750 ; =0x000003E9 - bl sub_0200D0A0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247750: .word 0x000003E9 - thumb_func_end ov62_02247694 - - thumb_func_start ov62_02247754 -ov62_02247754: ; 0x02247754 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0xc] - mov r0, #0x89 - lsl r0, r0, #2 - ldr r1, [sp] - add r2, r0, #4 - ldr r1, [r1, r0] - sub r0, #0x20 - str r1, [sp, #8] - ldr r1, [sp] - ldr r7, [sp, #0xc] - ldr r1, [r1, r2] - add r2, sp, #0x10 - str r1, [sp, #4] - ldr r1, [sp, #0xc] - strh r1, [r2] - strh r1, [r2, #2] - strh r1, [r2, #4] - strh r1, [r2, #6] - mov r1, #0xa - str r1, [sp, #0x18] - ldr r1, [sp, #0xc] - mov r2, #1 - str r1, [sp, #0x3c] - str r1, [sp, #0x40] - str r1, [sp, #0x1c] - mov r1, #0xfa - lsl r1, r1, #2 - str r1, [sp, #0x24] - str r1, [sp, #0x28] - str r1, [sp, #0x2c] - str r1, [sp, #0x30] - sub r1, r2, #2 - str r1, [sp, #0x34] - str r1, [sp, #0x38] - ldr r1, [sp] - str r2, [sp, #0x20] - ldr r0, [r1, r0] - add r0, r0, #2 - cmp r0, #0 - ble _02247846 - add r4, r1, #0 - mov r6, #0x4c - add r5, r1, #0 -_022477B2: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r1, [r4, r0] - ldr r0, [sp, #0xc] - add r0, r0, r1 - add r0, r0, #1 - cmp r7, r0 - add r2, sp, #0x10 - bne _02247800 - ldr r0, [sp, #8] - ldr r1, [sp, #4] - bl sub_0200CE6C - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - lsl r1, r6, #0x10 - ldr r0, [r4, r0] - asr r1, r1, #0x10 - mov r2, #0x18 - bl sub_0200D4C4 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x16 - bl sub_0200D364 - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D330 - ldr r0, [sp, #0xc] - add r4, #0x1c - add r0, r0, #1 - str r0, [sp, #0xc] - b _02247834 -_02247800: - ldr r0, [sp, #8] - ldr r1, [sp, #4] - bl sub_0200CE6C - lsl r1, r6, #0x10 - str r0, [r5, #0xc] - asr r1, r1, #0x10 - mov r2, #0x18 - bl sub_0200D4C4 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - bl ov62_02247B3C - add r1, r0, #0 - ldr r0, [r5, #0xc] - bl sub_0200D364 - ldr r0, [r5, #0xc] - mov r1, #0 - bl sub_0200D6A4 - ldr r0, [r5, #0xc] - bl sub_0200D330 - add r5, #0x1c -_02247834: - mov r0, #0x81 - ldr r1, [sp] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r7, r7, #1 - add r0, r0, #2 - add r6, #8 - cmp r7, r0 - blt _022477B2 -_02247846: - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov62_02247754 - - thumb_func_start ov62_0224784C -ov62_0224784C: ; 0x0224784C - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r6, [r5, r0] - add r0, r0, #4 - ldr r4, [r5, r0] - mov r2, #0 - add r0, sp, #0 - strh r2, [r0] - strh r2, [r0, #2] - strh r2, [r0, #4] - strh r2, [r0, #6] - ldr r0, _02247964 ; =0x000003E9 - mov r1, #1 - str r0, [sp, #0x14] - str r0, [sp, #0x18] - str r0, [sp, #0x1c] - str r0, [sp, #0x20] - sub r0, r1, #2 - str r1, [sp, #0x10] - str r2, [sp, #8] - str r2, [sp, #0x2c] - str r2, [sp, #0x30] - str r2, [sp, #0xc] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r6, #0 - add r1, r4, #0 - add r2, sp, #0 - bl sub_0200CE6C - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r6, #0 - add r1, r4, #0 - add r2, sp, #0 - bl sub_0200CE6C - mov r1, #0x1b - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r6, #0 - add r1, r4, #0 - add r2, sp, #0 - bl sub_0200CE6C - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r5, #0 - mov r1, #0 - bl ov62_02247998 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D330 - mov r2, #0x6e - lsl r2, r2, #2 - mov r1, #0 - strh r1, [r5, r2] - add r0, r2, #2 - strh r1, [r5, r0] - mov r0, #1 - sub r2, #0x14 - str r0, [r5, r2] - add r0, r5, #0 - bl ov62_022479D4 - mov r1, #0x1b - lsl r1, r1, #4 - ldr r0, [r5, r1] - sub r1, #0xc - ldr r1, [r5, r1] - bl sub_0200D364 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0200D330 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0200D810 - mov r2, #0x75 - lsl r2, r2, #2 - mov r1, #0 - strh r1, [r5, r2] - add r0, r2, #2 - strh r1, [r5, r0] - mov r0, #1 - sub r2, #0x14 - str r0, [r5, r2] - add r0, r5, #0 - bl ov62_022479D4 - mov r1, #0x73 - lsl r1, r1, #2 - ldr r0, [r5, r1] - sub r1, #0xc - ldr r1, [r5, r1] - bl sub_0200D364 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D330 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_0200D810 - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - bl ov62_02247968 - add r0, r5, #0 - mov r1, #2 - mov r2, #0 - bl ov62_02247968 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - nop -_02247964: .word 0x000003E9 - thumb_func_end ov62_0224784C - - thumb_func_start ov62_02247968 -ov62_02247968: ; 0x02247968 - push {r3, lr} - cmp r2, #1 - bne _02247982 - mov r2, #0x1c - mul r2, r1 - add r1, r0, r2 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_0200D3F4 - pop {r3, pc} -_02247982: - mov r2, #0x1c - mul r2, r1 - add r1, r0, r2 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D3F4 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov62_02247968 - - thumb_func_start ov62_02247998 -ov62_02247998: ; 0x02247998 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x1c - mul r0, r1 - add r0, r4, r0 - mov r2, #0x62 - ldr r0, [r0, #0xc] - lsl r2, r2, #2 - str r1, [r4, r2] - add r1, sp, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - mov r0, #0x65 - lsl r0, r0, #2 - add r3, sp, #0 - mov r2, #0 - ldrsh r2, [r3, r2] - mov r1, #2 - ldrsh r1, [r3, r1] - add r2, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - asr r2, r2, #0x10 - bl sub_0200D4C4 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov62_02247998 - - thumb_func_start ov62_022479D4 -ov62_022479D4: ; 0x022479D4 - push {r4, lr} - add r1, #0xc - mov r2, #0x1b - add r3, r0, #0 - lsl r2, r2, #4 - lsl r1, r1, #2 - ldr r0, [r3, r2] - add r3, r3, r1 - add r1, r2, #0 - add r1, #0x8a - ldrb r4, [r3, r1] - add r1, r2, #0 - add r1, #0x8b - ldrb r1, [r3, r1] - add r4, r4, r1 - lsr r1, r4, #0x1f - add r1, r4, r1 - add r4, r2, #0 - add r4, #0x88 - add r2, #0x89 - lsl r1, r1, #0xf - asr r1, r1, #0x10 - lsl r1, r1, #0x10 - ldrb r4, [r3, r4] - ldrb r2, [r3, r2] - asr r1, r1, #0x10 - add r3, r4, r2 - lsr r2, r3, #0x1f - add r2, r3, r2 - lsl r2, r2, #0xf - asr r2, r2, #0x10 - sub r2, #8 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_022479D4 - - thumb_func_start ov62_02247A20 -ov62_02247A20: ; 0x02247A20 - push {r4, lr} - add r3, r0, #0 - mov r0, #0x1c - mul r0, r2 - add r1, #0xc - mov r2, #0x65 - lsl r1, r1, #2 - add r0, r3, r0 - lsl r2, r2, #2 - add r3, r3, r1 - add r1, r2, #0 - add r1, #0xa6 - ldrb r4, [r3, r1] - add r1, r2, #0 - add r1, #0xa7 - ldrb r1, [r3, r1] - ldr r0, [r0, r2] - add r4, r4, r1 - lsr r1, r4, #0x1f - add r1, r4, r1 - add r4, r2, #0 - add r4, #0xa4 - add r2, #0xa5 - lsl r1, r1, #0xf - asr r1, r1, #0x10 - lsl r1, r1, #0x10 - ldrb r4, [r3, r4] - ldrb r2, [r3, r2] - asr r1, r1, #0x10 - add r3, r4, r2 - lsr r2, r3, #0x1f - add r2, r3, r2 - lsl r2, r2, #0xf - asr r2, r2, #0x10 - sub r2, #8 - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - pop {r4, pc} - thumb_func_end ov62_02247A20 - - thumb_func_start ov62_02247A70 -ov62_02247A70: ; 0x02247A70 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D330 - mov r0, #0x1b - lsl r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0200D330 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D330 - add r4, r5, #0 - mov r7, #0x65 - mov r6, #1 - add r4, #0x1c - lsl r7, r7, #2 -_02247A9C: - ldr r0, [r4, r7] - bl sub_0200D37C - cmp r0, #3 - bne _02247AF0 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D3B8 - cmp r0, #0 - bne _02247B32 - mov r0, #0x65 - mov r1, #0x62 - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - bl sub_0200D364 - mov r0, #0xa6 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _02247ADA - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - bl ov62_02247968 - b _02247AE4 -_02247ADA: - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - bl ov62_02247968 -_02247AE4: - add r0, r5, #0 - mov r1, #2 - mov r2, #0 - bl ov62_02247968 - b _02247B32 -_02247AF0: - mov r1, #0x62 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r0, r1 - beq _02247B04 - mov r0, #0x65 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D364 -_02247B04: - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D37C - cmp r0, #3 - beq _02247B32 - mov r0, #0xa6 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #1 - bne _02247B28 - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - bl ov62_02247968 - b _02247B32 -_02247B28: - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - bl ov62_02247968 -_02247B32: - add r6, r6, #1 - add r4, #0x1c - cmp r6, #3 - blt _02247A9C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_02247A70 - - thumb_func_start ov62_02247B3C -ov62_02247B3C: ; 0x02247B3C - mov r2, #0 - cmp r1, #0 - bne _02247B44 - mov r2, #0xb -_02247B44: - add r0, r2, r0 - bx lr - thumb_func_end ov62_02247B3C - - thumb_func_start ov62_02247B48 -ov62_02247B48: ; 0x02247B48 - push {r4, r5, r6, r7} - mov r1, #0x81 - lsl r1, r1, #2 - ldr r1, [r0, r1] - mov r3, #0 - cmp r1, #0 - ble _02247B82 - mov r6, #0x85 - lsl r6, r6, #2 - add r4, r0, #0 - add r1, r3, #0 - mov r2, #1 - sub r7, r6, #4 -_02247B62: - ldr r5, [r0, r7] - cmp r3, r5 - blt _02247B72 - ldr r5, [r0, r6] - cmp r3, r5 - bge _02247B72 - str r2, [r4, #8] - b _02247B74 -_02247B72: - str r1, [r4, #8] -_02247B74: - mov r5, #0x81 - lsl r5, r5, #2 - ldr r5, [r0, r5] - add r3, r3, #1 - add r4, #0x1c - cmp r3, r5 - blt _02247B62 -_02247B82: - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 - thumb_func_end ov62_02247B48 - - thumb_func_start ov62_02247B88 -ov62_02247B88: ; 0x02247B88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp, #4] - mov r1, #0x82 - lsl r1, r1, #2 - str r0, [sp] - ldr r0, [r0, r1] - mov r4, #0 - lsl r2, r0, #1 - ldr r0, [sp] - str r4, [sp, #8] - add r2, r0, r2 - add r0, r1, #0 - sub r0, #0x2c - ldrsh r5, [r2, r0] - ldr r0, [sp] - sub r1, r1, #4 - ldr r0, [r0, r1] - cmp r0, #0 - bgt _02247BB2 - b _02247CDA -_02247BB2: - ldr r7, [sp] - add r6, r7, #0 -_02247BB6: - mov r0, #0x21 - ldr r1, [sp] - lsl r0, r0, #4 - ldr r0, [r1, r0] - cmp r4, r0 - blt _02247BE2 - add r2, r1, #0 - mov r1, #0x85 - lsl r1, r1, #2 - ldr r1, [r2, r1] - cmp r4, r1 - bge _02247BE2 - cmp r4, r0 - bne _02247BDA - add r5, #0x14 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 - b _02247BF4 -_02247BDA: - add r5, #0x20 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 - b _02247BF4 -_02247BE2: - cmp r4, #0 - bne _02247BEE - add r5, #0x14 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 - b _02247BF4 -_02247BEE: - add r5, #8 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 -_02247BF4: - add r1, sp, #0xc - ldr r0, [r7, #0xc] - add r1, #2 - add r2, sp, #0xc - bl sub_0200D550 - ldr r0, [sp, #4] - cmp r0, #0 - bne _02247C16 - add r3, sp, #0xc - mov r2, #0 - ldrsh r2, [r3, r2] - ldr r0, [r7, #0xc] - add r1, r5, #0 - bl sub_0200D4C4 - b _02247C32 -_02247C16: - add r1, sp, #0xc - mov r0, #2 - ldrsh r0, [r1, r0] - sub r1, r5, r0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r0, r0, #1 - strh r0, [r7, #0x14] - mov r0, #0 - strh r0, [r7, #0x16] - mov r0, #2 - strb r0, [r7, #0x18] - mov r0, #0 - strb r0, [r7, #0x19] -_02247C32: - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r6, r0] - cmp r4, r0 - bne _02247CC8 - ldr r0, [sp, #8] - cmp r0, #2 - beq _02247CC8 - mov r0, #0x57 - lsl r0, r0, #2 - add r1, sp, #0xc - ldr r0, [r6, r0] - add r1, #2 - add r2, sp, #0xc - bl sub_0200D550 - ldr r1, [sp] - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r2, r1, #0 - mov r1, #0x21 - lsl r1, r1, #4 - ldr r1, [r2, r1] - cmp r1, r0 - bne _02247C6E - add r5, #8 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 - b _02247C84 -_02247C6E: - cmp r4, r1 - ble _02247C7E - cmp r4, r0 - bge _02247C7E - add r5, #0x14 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 - b _02247C84 -_02247C7E: - add r5, #8 - lsl r0, r5, #0x10 - asr r5, r0, #0x10 -_02247C84: - ldr r0, [sp, #4] - cmp r0, #0 - bne _02247C9E - mov r0, #0x57 - lsl r0, r0, #2 - add r3, sp, #0xc - mov r2, #0 - ldrsh r2, [r3, r2] - ldr r0, [r6, r0] - add r1, r5, #0 - bl sub_0200D4C4 - b _02247CC0 -_02247C9E: - add r1, sp, #0xc - mov r0, #2 - ldrsh r0, [r1, r0] - sub r1, r5, r0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - mov r0, #0x59 - lsl r0, r0, #2 - strh r1, [r6, r0] - mov r1, #0 - add r0, r0, #2 - strh r1, [r6, r0] - mov r0, #0x5a - mov r1, #2 - lsl r0, r0, #2 - strb r1, [r6, r0] -_02247CC0: - ldr r0, [sp, #8] - add r6, #0x1c - add r0, r0, #1 - str r0, [sp, #8] -_02247CC8: - mov r0, #0x81 - ldr r1, [sp] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r4, r4, #1 - add r7, #0x1c - cmp r4, r0 - bge _02247CDA - b _02247BB6 -_02247CDA: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov62_02247B88 - - thumb_func_start ov62_02247CE0 -ov62_02247CE0: ; 0x02247CE0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r6, r0] - mov r4, #0 - cmp r0, #0 - ble _02247D70 - add r5, r6, #0 -_02247CF4: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r6, r0] - cmp r4, r0 - blt _02247D10 - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r4, r0 - bge _02247D10 - mov r0, #0x10 - str r0, [sp] - add r7, r0, #0 - b _02247D16 -_02247D10: - mov r0, #4 - str r0, [sp] - mov r7, #8 -_02247D16: - add r2, sp, #4 - ldr r0, [r5, #0xc] - add r1, sp, #4 - add r2, #2 - bl sub_0200D550 - add r1, sp, #4 - mov r0, #2 - ldrsh r0, [r1, r0] - sub r1, r0, r7 - ldr r0, [r5, #0x10] - strb r1, [r0] - add r1, sp, #4 - mov r0, #0 - ldrsh r1, [r1, r0] - ldr r0, [sp] - sub r1, r1, r0 - ldr r0, [r5, #0x10] - strb r1, [r0, #2] - add r1, sp, #4 - mov r0, #2 - ldrsh r0, [r1, r0] - add r1, r0, r7 - ldr r0, [r5, #0x10] - strb r1, [r0, #1] - add r1, sp, #4 - mov r0, #0 - ldrsh r1, [r1, r0] - ldr r0, [sp] - add r1, r1, r0 - ldr r0, [r5, #0x10] - cmp r4, #0 - strb r1, [r0, #3] - bne _02247D62 - ldr r1, [r5, #0x10] - ldrb r0, [r1, #2] - sub r0, r0, #4 - strb r0, [r1, #2] -_02247D62: - mov r0, #0x81 - lsl r0, r0, #2 - ldr r0, [r6, r0] - add r4, r4, #1 - add r5, #0x1c - cmp r4, r0 - blt _02247CF4 -_02247D70: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov62_02247CE0 - - thumb_func_start ov62_02247D74 -ov62_02247D74: ; 0x02247D74 - push {r4, r5, lr} - sub sp, #0x14 - ldr r5, _02247DB0 ; =0x000008A4 - add r2, r1, #0 - add r4, r0, #0 - mov r1, #2 - bl ov62_022302A8 - add r0, r4, r5 - bl sub_0201A7A0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1e - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - str r0, [sp, #0x10] - ldr r0, [r4, #0x24] - add r1, r4, r5 - mov r2, #2 - mov r3, #1 - bl sub_0201A7E8 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_02247DB0: .word 0x000008A4 - thumb_func_end ov62_02247D74 - - thumb_func_start ov62_02247DB4 -ov62_02247DB4: ; 0x02247DB4 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02247DD4 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201ACF4 - ldr r0, _02247DD4 ; =0x000008A4 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - pop {r4, pc} - nop -_02247DD4: .word 0x000008A4 - thumb_func_end ov62_02247DB4 - - thumb_func_start ov62_02247DD8 -ov62_02247DD8: ; 0x02247DD8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - ldr r3, _02247E90 ; =0x0000011A - add r5, r0, #0 - add r0, r1, #0 - str r1, [sp, #0x10] - cmp r0, r3 - bne _02247E52 - lsl r0, r2, #2 - add r1, r5, r0 - ldr r0, _02247E94 ; =0x000008A4 - sub r0, #0x18 - ldr r7, [r1, r0] - mov r0, #0x66 - bl ov62_02231690 - add r6, r0, #0 - mov r0, #0xff - mov r1, #0x66 - bl sub_02023790 - add r4, r0, #0 - add r0, r7, #0 - mov r1, #0x66 - bl sub_02030B94 - str r0, [sp, #0x14] - ldr r1, [sp, #0x14] - add r0, r5, #0 - bl ov62_022349A8 - ldr r0, [r5, #0x48] - ldr r1, [sp, #0x10] - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - mov r1, #0 - str r0, [sp, #4] - ldr r2, [sp, #0x14] - add r0, r6, #0 - add r3, r1, #0 - bl sub_0200B48C - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - bl sub_0200C388 - ldr r0, [sp, #0x14] - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B3F0 - b _02247E5A -_02247E52: - ldr r0, [r5, #0x48] - bl sub_0200B1EC - add r4, r0, #0 -_02247E5A: - ldr r0, _02247E94 ; =0x000008A4 - mov r1, #0xcc - add r0, r5, r0 - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02247E98 ; =0x000F0D0C - add r2, r4, #0 - str r0, [sp, #8] - ldr r0, _02247E94 ; =0x000008A4 - add r3, r1, #0 - add r0, r5, r0 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, _02247E94 ; =0x000008A4 - add r0, r5, r0 - bl sub_0201A9A4 - add r0, r4, #0 - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02247E90: .word 0x0000011A -_02247E94: .word 0x000008A4 -_02247E98: .word 0x000F0D0C - thumb_func_end ov62_02247DD8 - - thumb_func_start ov62_02247E9C -ov62_02247E9C: ; 0x02247E9C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x86 - lsl r0, r0, #4 - ldr r4, [r5, r0] - add r6, r4, #0 - add r6, #0x10 - add r0, r6, #0 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r6, #0 - mov r3, #4 - bl sub_0201A7E8 - add r0, r6, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x82 - bl sub_0200B1EC - add r7, r0, #0 - add r0, r6, #0 - add r1, r7, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02247F78 ; =0x000F0D00 - add r2, r7, #0 - str r0, [sp, #8] - add r0, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r7, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0201A9A4 - add r4, #0x20 - add r0, r4, #0 - bl sub_0201A7A0 - mov r2, #6 - str r2, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x15 - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - add r1, r4, #0 - mov r3, #0x12 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x48] - mov r1, #0x83 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - bl ov62_0223429C - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _02247F78 ; =0x000F0D00 - add r2, r5, #0 - str r0, [sp, #8] - add r0, r4, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02247F78: .word 0x000F0D00 - thumb_func_end ov62_02247E9C - - thumb_func_start ov62_02247F7C -ov62_02247F7C: ; 0x02247F7C - push {r4, lr} - mov r1, #0x86 - lsl r1, r1, #4 - ldr r4, [r0, r1] - add r0, r4, #0 - add r0, #0x10 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #0x10 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x20 - bl sub_0201ACF4 - add r4, #0x20 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov62_02247F7C - - thumb_func_start ov62_02247FA8 -ov62_02247FA8: ; 0x02247FA8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x66 - mov r1, #0x30 - bl sub_02018144 - mov r1, #0 - mov r2, #0x30 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x86 - lsl r0, r0, #4 - str r4, [r5, r0] - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r4, #0 - add r1, r4, #4 - mov r2, #0 - bl ov62_022315C8 - add r0, r5, #0 - mov r1, #1 - bl ov62_0222FB60 - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02247FA8 - - thumb_func_start ov62_02247FFC -ov62_02247FFC: ; 0x02247FFC - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _02248014 - cmp r1, #1 - beq _02248072 - b _02248100 -_02248014: - add r0, r4, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - cmp r0, #0 - beq _02248028 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02248028: - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - b _0224810E -_02248072: - mov r0, #0 - add r1, r0, #0 - bl sub_02019060 - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #2 - mov r1, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #2 - bl sub_02019060 - mov r0, #4 - mov r1, #0 - bl sub_02019060 - mov r0, #5 - mov r1, #3 - bl sub_02019060 - mov r0, #6 - mov r1, #1 - bl sub_02019060 - mov r0, #7 - mov r1, #2 - bl sub_02019060 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r5, #0x14] - ldr r2, [r5, #0x24] - mov r1, #0x3e - mov r3, #7 - bl sub_020070E8 - add r0, r5, #0 - mov r1, #1 - bl ov62_02234540 - add r0, r5, #0 - bl ov62_02231454 - add r0, r5, #0 - mov r1, #0 - bl ov62_02234540 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _0224810E -_02248100: - mov r1, #0 - bl ov62_0223376C - add r0, r5, #0 - mov r1, #2 - bl ov62_0222FB60 -_0224810E: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov62_02247FFC - - thumb_func_start ov62_02248114 -ov62_02248114: ; 0x02248114 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x86 - add r4, r0, #0 - lsl r1, r1, #4 - ldr r5, [r4, r1] - ldr r1, [r4, #8] - cmp r1, #6 - bls _02248128 - b _022482F0 -_02248128: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02248134: ; jump table - .short _02248142 - _02248134 - 2 ; case 0 - .short _0224818E - _02248134 - 2 ; case 1 - .short _022481E4 - _02248134 - 2 ; case 2 - .short _02248226 - _02248134 - 2 ; case 3 - .short _0224826A - _02248134 - 2 ; case 4 - .short _02248276 - _02248134 - 2 ; case 5 - .short _022482C0 - _02248134 - 2 ; case 6 -_02248142: - bl ov62_02247E9C - add r0, r4, #0 - mov r1, #0 - bl ov62_02247D74 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x66 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - ldr r2, [r4, #0x24] - mov r1, #0x54 - mov r3, #7 - bl sub_0200710C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02248306 -_0224818E: - add r0, r5, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #0 - mov r3, #2 - bl ov62_022315E0 - cmp r0, #0 - beq _022481CA - ldr r2, _0224830C ; =0x0000086C - ldr r1, _02248310 ; =0x0000011A - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov62_02247DD8 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022481CA: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02248306 -_022481E4: - ldr r0, _02248314 ; =0x02249788 - bl sub_02022760 - cmp r0, #0 - beq _02248206 - add r0, r4, #0 - bl ov62_02234520 - ldr r1, _02248318 ; =0x0000011B - add r0, r4, #0 - mov r2, #0 - bl ov62_02247DD8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02248306 -_02248206: - ldr r0, _0224831C ; =0x0224978C - bl sub_02022760 - cmp r0, #0 - beq _02248306 - add r0, r4, #0 - bl ov62_02234520 - mov r0, #1 - str r0, [r5, #0xc] - add r0, r4, #0 - bl ov62_02247DB4 - mov r0, #4 - str r0, [r4, #8] - b _02248306 -_02248226: - ldr r0, _02248314 ; =0x02249788 - bl sub_02022760 - cmp r0, #0 - beq _02248248 - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_022342BC - mov r0, #0 - str r0, [r5, #0xc] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02248306 -_02248248: - ldr r0, _0224831C ; =0x0224978C - bl sub_02022760 - cmp r0, #0 - beq _02248306 - add r0, r4, #0 - bl ov62_02234520 - add r0, r4, #0 - bl ov62_02247DB4 - mov r0, #1 - str r0, [r5, #0xc] - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02248306 -_0224826A: - bl ov62_02247F7C - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02248306 -_02248276: - add r0, r5, #0 - add r0, #8 - mov r1, #1 - bl ov62_02231664 - add r0, r5, #0 - add r1, r5, #4 - mov r2, #1 - mov r3, #0 - bl ov62_022315E0 - cmp r0, #0 - beq _022482A6 - ldr r0, [r5, #0xc] - cmp r0, #1 - bne _022482A0 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 - b _022482A6 -_022482A0: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] -_022482A6: - ldr r0, [r4, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r5, #8] - ldr r0, [r4, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C - b _02248306 -_022482C0: - bl ov62_022342CC - cmp r0, #0 - beq _022482E6 - add r0, r4, #0 - bl ov62_022339A0 - add r0, r4, #0 - bl ov62_022338A8 - ldr r1, _02248320 ; =0x0000011D - add r0, r4, #0 - mov r2, #0 - bl ov62_02247DD8 - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - b _02248306 -_022482E6: - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 - b _02248306 -_022482F0: - bl sub_02022798 - cmp r0, #0 - beq _02248306 - add r0, r4, #0 - bl ov62_02247DB4 - add r0, r4, #0 - mov r1, #3 - bl ov62_0222FB60 -_02248306: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224830C: .word 0x0000086C -_02248310: .word 0x0000011A -_02248314: .word 0x02249788 -_02248318: .word 0x0000011B -_0224831C: .word 0x0224978C -_02248320: .word 0x0000011D - thumb_func_end ov62_02248114 - - thumb_func_start ov62_02248324 -ov62_02248324: ; 0x02248324 - push {r3, r4, r5, lr} - mov r1, #0x86 - add r5, r0, #0 - lsl r1, r1, #4 - ldr r4, [r5, r1] - ldr r1, [r5, #8] - cmp r1, #0 - beq _0224833E - cmp r1, #1 - beq _02248342 - cmp r1, #2 - beq _02248348 - b _0224837E -_0224833E: - add r0, r1, #1 - str r0, [r5, #8] -_02248342: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] -_02248348: - add r0, r5, #0 - bl ov62_0223146C - ldr r0, [r5, #0x24] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_02019EBC - ldr r0, [r5, #0x24] - mov r1, #7 - bl sub_02019EBC - add r0, r5, #0 - mov r1, #1 - bl ov62_0223376C - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - b _02248402 -_0224837E: - bl ov62_02233790 - cmp r0, #0 - beq _02248402 - add r0, r4, #0 - add r0, #8 - mov r1, #0 - bl ov62_02231664 - cmp r0, #0 - beq _022483D2 - add r0, r5, #0 - bl ov62_022318E8 - add r0, r4, #0 - add r0, #8 - bl ov62_02231688 - ldr r0, [r5, #0x58] - mov r1, #2 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r0, [r5, #0x28] - mov r2, #0xc - mov r3, #0x10 - bl sub_02003A2C - mov r1, #1 - ldr r3, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - bl ov62_0222FB44 - add r0, r5, #0 - mov r1, #5 - bl ov62_0222FB60 - add r0, r4, #0 - bl sub_020181C4 - b _02248402 -_022483D2: - ldr r0, [r5, #0x58] - mov r1, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #2 - lsr r3, r3, #0x18 - bl sub_02003A2C - ldr r0, [r5, #0x58] - mov r1, #3 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r3, [r4, #8] - ldr r0, [r5, #0x28] - lsl r3, r3, #0x18 - mov r2, #0xc - lsr r3, r3, #0x18 - bl sub_02003A2C -_02248402: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_02248324 - - thumb_func_start ov62_02248408 -ov62_02248408: ; 0x02248408 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r0, #0xaa - ldrb r0, [r0] - str r1, [sp] - str r2, [sp, #4] - add r1, sp, #0x28 - add r2, sp, #0x24 - bl sub_0202F4C0 - ldr r1, [sp, #4] - mov r0, #0x40 - bl sub_02023790 - add r4, r0, #0 - ldr r1, [sp, #4] - mov r0, #0x40 - bl sub_02023790 - str r0, [sp, #0x1c] - ldr r0, [sp, #4] - mov r1, #0x80 - bl sub_02018144 - add r5, r0, #0 - mov r0, #0 - ldr r1, [sp, #0x28] - str r0, [sp, #0x20] - cmp r1, #0 - ble _022484D2 - ldr r0, [sp] - mov r7, #0 - mvn r7, r7 - str r0, [sp, #0x14] - str r0, [sp, #0x10] - add r0, #0x3c - str r0, [sp, #0x10] - str r0, [sp, #0xc] - lsr r6, r7, #0x10 -_02248456: - ldr r2, [sp, #0x14] - mov r1, #7 - add r2, #0xe -_0224845C: - ldrh r0, [r2, #0x3c] - cmp r0, r6 - beq _0224846A - sub r1, r1, #1 - sub r2, r2, #2 - cmp r1, r7 - bgt _0224845C -_0224846A: - mov r0, #0 - mvn r0, r0 - cmp r1, r0 - bne _02248486 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #4] - bl ov62_0224856C - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x10] - mov r2, #8 - bl sub_02023DF0 - b _022484B4 -_02248486: - add r0, r4, #0 - bl sub_020237E8 - ldr r1, [sp, #0xc] - add r0, r4, #0 - bl sub_02023D28 - ldr r2, [sp, #0x1c] - mov r0, #0 - add r1, r4, #0 - bl sub_02002DB4 - cmp r0, #0 - bne _022484B4 - ldr r0, [sp, #0x1c] - ldr r1, [sp, #4] - bl ov62_0224856C - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x10] - mov r2, #8 - bl sub_02023DF0 -_022484B4: - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x28] - add r0, #0x34 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - add r0, #0x34 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r0, #0x34 - str r0, [sp, #0xc] - ldr r0, [sp, #0x20] - add r0, r0, #1 - str r0, [sp, #0x20] - cmp r0, r1 - blt _02248456 -_022484D2: - mov r0, #0 - str r0, [sp, #8] - cmp r1, #0 - ble _02248556 -_022484DA: - ldr r0, [sp] - ldr r0, [r0, #4] - bl sub_0207A0F8 - mov r6, #0 - str r0, [sp, #0x18] - cmp r0, #0 - ble _02248544 -_022484EA: - ldr r0, [sp] - add r1, r6, #0 - ldr r0, [r0, #4] - bl sub_0207A0FC - mov r1, #0xac - mov r2, #0 - add r7, r0, #0 - bl sub_02074470 - cmp r0, #0 - beq _02248544 - mov r0, #0 - add r1, r5, #0 - mov r2, #0x80 - bl sub_020C4AF0 - add r0, r7, #0 - mov r1, #0x75 - add r2, r5, #0 - bl sub_02074470 - add r0, r4, #0 - bl sub_020237E8 - add r0, r4, #0 - add r1, r5, #0 - bl sub_02023D28 - ldr r2, [sp, #0x1c] - mov r0, #0 - add r1, r4, #0 - bl sub_02002DB4 - cmp r0, #0 - bne _0224853C - add r0, r7, #0 - mov r1, #0xb3 - mov r2, #0 - bl sub_02074B30 -_0224853C: - ldr r0, [sp, #0x18] - add r6, r6, #1 - cmp r6, r0 - blt _022484EA -_02248544: - ldr r0, [sp] - ldr r1, [sp, #0x28] - add r0, r0, #4 - str r0, [sp] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, r1 - blt _022484DA -_02248556: - add r0, r4, #0 - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - add r0, r5, #0 - bl sub_020181C4 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov62_02248408 - - thumb_func_start ov62_0224856C -ov62_0224856C: ; 0x0224856C - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - bl sub_020237E8 - mov r0, #1 - mov r1, #0x1a - mov r2, #0xa - add r3, r5, #0 - bl sub_0200B144 - mov r1, #0x53 - add r5, r0, #0 - lsl r1, r1, #2 - add r2, r4, #0 - bl sub_0200B1B8 - add r0, r5, #0 - bl sub_0200B190 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov62_0224856C - - thumb_func_start ov62_02248598 -ov62_02248598: ; 0x02248598 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r6, r1, #0 - ldrh r1, [r4] - add r7, r0, #0 - add r5, r2, #0 - cmp r1, #0 - beq _022485AE - cmp r1, #1 - beq _02248602 - b _02248610 -_022485AE: - ldr r0, _02248614 ; =0x021C07A4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _022485BA - bl sub_02022974 -_022485BA: - cmp r5, #1 - bne _022485E2 - ldr r1, _02248614 ; =0x021C07A4 - ldr r2, _02248618 ; =0x0000E281 - ldr r0, [r1, #0] - add r0, #0xab - strb r5, [r0] - ldr r0, [r1, #0] - add r0, #0xcc - strh r2, [r0] - ldr r1, [r1, #0] - add r0, r7, #0 - add r1, #0x84 - mov r2, #0x58 - bl sub_0202486C - ldr r1, _02248614 ; =0x021C07A4 - ldr r1, [r1, #0] - add r1, #0xe4 - strh r0, [r1] -_022485E2: - ldr r0, _02248614 ; =0x021C07A4 - ldr r1, _0224861C ; =0x00001D4C - ldr r0, [r0, #0] - ldr r2, _02248620 ; =0x0000FFFF - ldrh r3, [r0, r1] - add r0, #0xe8 - sub r1, #0xe8 - eor r2, r3 - lsl r2, r2, #0x10 - add r2, r3, r2 - bl sub_0202F858 - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _02248610 -_02248602: - ldr r1, _02248614 ; =0x021C07A4 - ldr r3, [sp, #0x18] - ldr r1, [r1, #0] - add r2, r6, #0 - bl sub_0202F3AC - pop {r3, r4, r5, r6, r7, pc} -_02248610: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02248614: .word 0x021C07A4 -_02248618: .word 0x0000E281 -_0224861C: .word 0x00001D4C -_02248620: .word 0x0000FFFF - thumb_func_end ov62_02248598 - - thumb_func_start ov62_02248624 -ov62_02248624: ; 0x02248624 - push {r3, lr} - ldr r0, _0224864C ; =0x021C07A4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02248632 - bl sub_02022974 -_02248632: - ldr r0, _0224864C ; =0x021C07A4 - ldr r1, _02248650 ; =0x00001D4C - ldr r0, [r0, #0] - ldr r2, _02248654 ; =0x0000FFFF - ldrh r3, [r0, r1] - add r0, #0xe8 - sub r1, #0xe8 - eor r2, r3 - lsl r2, r2, #0x10 - add r2, r3, r2 - bl sub_0202F858 - pop {r3, pc} - ; .align 2, 0 -_0224864C: .word 0x021C07A4 -_02248650: .word 0x00001D4C -_02248654: .word 0x0000FFFF - thumb_func_end ov62_02248624 - - thumb_func_start ov62_02248658 -ov62_02248658: ; 0x02248658 - push {r4, r5, r6, lr} - add r4, r3, #0 - add r5, r1, #0 - ldrh r1, [r4] - add r6, r2, #0 - cmp r1, #0 - beq _0224866C - cmp r1, #1 - beq _0224868E - b _0224869C -_0224866C: - ldr r0, _022486A0 ; =0x021C07A4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02248678 - bl sub_02022974 -_02248678: - ldr r0, _022486A0 ; =0x021C07A4 - ldr r1, [r0, #0] - add r0, r1, #0 - add r0, #0xdc - str r5, [r0, #0] - add r1, #0xe0 - str r6, [r1, #0] - ldrh r0, [r4] - add r0, r0, #1 - strh r0, [r4] - b _0224869C -_0224868E: - ldr r1, _022486A0 ; =0x021C07A4 - ldr r3, [sp, #0x10] - ldr r1, [r1, #0] - mov r2, #0 - bl sub_0202F3AC - pop {r4, r5, r6, pc} -_0224869C: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022486A0: .word 0x021C07A4 - thumb_func_end ov62_02248658 - - thumb_func_start ov62_022486A4 -ov62_022486A4: ; 0x022486A4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0224871C ; =0x021C07A4 - add r4, r1, #0 - ldr r0, [r0, #0] - cmp r0, #0 - bne _022486B6 - bl sub_02022974 -_022486B6: - ldr r1, _0224871C ; =0x021C07A4 - mov r2, #1 - ldr r0, [r1, #0] - add r0, #0xab - strb r2, [r0] - ldr r0, [r1, #0] - ldr r2, _02248720 ; =0x0000E281 - add r0, #0xcc - strh r2, [r0] - ldr r1, [r1, #0] - add r0, r5, #0 - add r1, #0x84 - mov r2, #0x58 - bl sub_0202486C - ldr r1, _0224871C ; =0x021C07A4 - ldr r3, _02248724 ; =0x0000FFFF - ldr r2, [r1, #0] - add r2, #0xe4 - strh r0, [r2] - ldr r0, [r1, #0] - ldr r1, _02248728 ; =0x00001D4C - ldrh r2, [r0, r1] - add r0, #0xe8 - sub r1, #0xe8 - eor r3, r2 - lsl r3, r3, #0x10 - add r2, r2, r3 - bl sub_0202F858 - mov r0, #8 - bl sub_02017DE0 - ldr r1, _0224871C ; =0x021C07A4 - add r0, r5, #0 - ldr r1, [r1, #0] - add r2, r4, #0 - bl sub_0202447C - add r4, r0, #0 - cmp r4, #2 - bne _02248712 - add r0, r5, #0 - bl sub_020246E0 - add r4, r0, #0 -_02248712: - mov r0, #8 - bl sub_02017DF0 - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224871C: .word 0x021C07A4 -_02248720: .word 0x0000E281 -_02248724: .word 0x0000FFFF -_02248728: .word 0x00001D4C - thumb_func_end ov62_022486A4 - ; 0x0224872C - - - .rodata - .incbin "incbin/overlay62_rodata.bin" - - .data - .incbin "incbin/overlay62_data.bin" - - .bss - .space 0x0 diff --git a/asm/overlay63.s b/asm/overlay63.s deleted file mode 100644 index ebfc064e8..000000000 --- a/asm/overlay63.s +++ /dev/null @@ -1,5946 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov63_0222AE60 -ov63_0222AE60: ; 0x0222AE60 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r3, #0 - add r4, r0, #0 - ldr r1, _0222AF04 ; =0x0000229C - add r0, r6, #0 - str r2, [sp] - bl sub_02018144 - ldr r2, _0222AF04 ; =0x0000229C - add r7, r0, #0 - mov r1, #0 - bl sub_020D5124 - str r4, [r7, #0] - mov r0, #0x92 - add r1, r6, #0 - str r5, [r7, #4] - bl sub_02006C24 - ldr r1, _0222AF08 ; =0x00002294 - str r0, [r7, r1] - mov r0, #0x99 - add r1, r6, #0 - bl sub_02006C24 - ldr r1, _0222AF0C ; =0x00002298 - mov r4, #0 - str r0, [r7, r1] - add r5, r7, #0 -_0222AE9C: - mov r0, #0x98 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02009714 - mov r1, #0x8a - lsl r1, r1, #6 - str r0, [r5, r1] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0222AE9C - mov r5, #0 - add r4, r7, #0 -_0222AEB8: - mov r0, #0x17 - add r1, r5, #2 - add r2, r6, #0 - bl sub_02009714 - ldr r1, _0222AF10 ; =0x00002288 - add r5, r5, #1 - str r0, [r4, r1] - add r4, r4, #4 - cmp r5, #2 - blt _0222AEB8 - mov r4, #0 -_0222AED0: - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov63_0222B374 - add r4, r4, #1 - cmp r4, #3 - blt _0222AED0 - ldr r0, [sp] - ldr r2, [sp] - mov r1, #0x18 - str r0, [r7, #0xc] - add r0, r6, #0 - mul r1, r2 - bl sub_02018144 - str r0, [r7, #8] - ldr r3, [r7, #0xc] - mov r2, #0x18 - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222AF04: .word 0x0000229C -_0222AF08: .word 0x00002294 -_0222AF0C: .word 0x00002298 -_0222AF10: .word 0x00002288 - thumb_func_end ov63_0222AE60 - - thumb_func_start ov63_0222AF14 -ov63_0222AF14: ; 0x0222AF14 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - mov r6, #0 - cmp r0, #0 - bls _0222AF40 - add r4, r6, #0 -_0222AF22: - ldr r0, [r5, #8] - add r0, r0, r4 - bl ov63_0222BC70 - cmp r0, #0 - bne _0222AF36 - ldr r0, [r5, #8] - add r0, r0, r4 - bl ov63_0222B210 -_0222AF36: - ldr r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0x18 - cmp r6, r0 - blo _0222AF22 -_0222AF40: - mov r4, #0 -_0222AF42: - add r0, r5, #0 - add r1, r4, #0 - bl ov63_0222B404 - add r4, r4, #1 - cmp r4, #3 - blt _0222AF42 - add r0, r5, #0 - bl ov63_0222AFF8 - ldr r0, _0222AF8C ; =0x00002294 - ldr r0, [r5, r0] - bl sub_02006CA8 - ldr r0, _0222AF90 ; =0x00002298 - ldr r0, [r5, r0] - bl sub_02006CA8 - mov r7, #0x8a - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #6 -_0222AF6E: - ldr r0, [r4, r7] - bl sub_02009754 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0222AF6E - ldr r0, [r5, #8] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222AF8C: .word 0x00002294 -_0222AF90: .word 0x00002298 - thumb_func_end ov63_0222AF14 - - thumb_func_start ov63_0222AF94 -ov63_0222AF94: ; 0x0222AF94 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r7, r3, #0 - add r5, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - add r6, r2, #0 - bl ov63_0222B47C - cmp r0, #0 - bne _0222AFB0 - bl sub_02022974 -_0222AFB0: - add r0, r4, #0 - bl ov63_0222B450 - add r1, r0, #0 - ldr r0, [sp, #0x20] - add r2, r6, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r3, r7, #0 - bl ov63_0222B4CC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov63_0222AF94 - - thumb_func_start ov63_0222AFD0 -ov63_0222AFD0: ; 0x0222AFD0 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl ov63_0222B450 - add r1, r0, #0 - add r0, r4, #0 - bl ov63_0222B738 - pop {r4, pc} - thumb_func_end ov63_0222AFD0 - - thumb_func_start ov63_0222AFE4 -ov63_0222AFE4: ; 0x0222AFE4 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl ov63_0222B450 - add r1, r0, #0 - add r0, r4, #0 - bl ov63_0222B7D4 - pop {r4, pc} - thumb_func_end ov63_0222AFE4 - - thumb_func_start ov63_0222AFF8 -ov63_0222AFF8: ; 0x0222AFF8 - push {r3, r4, r5, lr} - ldr r1, _0222B028 ; =0x00002290 - add r4, r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - beq _0222B008 - bl ov63_0222B078 -_0222B008: - mov r5, #0 -_0222B00A: - add r0, r4, #0 - add r1, r5, #0 - bl ov63_0222B7D4 - cmp r0, #1 - bne _0222B01E - add r0, r4, #0 - add r1, r5, #0 - bl ov63_0222B738 -_0222B01E: - add r5, r5, #1 - cmp r5, #0x97 - blt _0222B00A - pop {r3, r4, r5, pc} - nop -_0222B028: .word 0x00002290 - thumb_func_end ov63_0222AFF8 - - thumb_func_start ov63_0222B02C -ov63_0222B02C: ; 0x0222B02C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r0, #0 - add r6, r3, #0 - str r1, [sp, #8] - str r2, [sp, #0xc] - add r0, r2, #0 - bne _0222B040 - bl sub_02022974 -_0222B040: - ldr r1, [sp, #8] - add r0, r7, #0 - add r2, r6, #0 - bl ov63_0222B97C - add r0, r7, #0 - add r1, r6, #0 - bl ov63_0222BA20 - ldr r5, _0222B074 ; =0x0222D910 - mov r4, #0 -_0222B056: - str r6, [sp] - mov r0, #1 - str r0, [sp, #4] - ldrb r1, [r5] - ldr r2, [sp, #8] - ldr r3, [sp, #0xc] - add r0, r7, #0 - bl ov63_0222B4CC - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0222B056 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222B074: .word 0x0222D910 - thumb_func_end ov63_0222B02C - - thumb_func_start ov63_0222B078 -ov63_0222B078: ; 0x0222B078 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl ov63_0222B9EC - add r0, r6, #0 - bl ov63_0222BAB0 - ldr r5, _0222B09C ; =0x0222D910 - mov r4, #0 -_0222B08A: - ldrb r1, [r5] - add r0, r6, #0 - bl ov63_0222B738 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0222B08A - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222B09C: .word 0x0222D910 - thumb_func_end ov63_0222B078 - - thumb_func_start ov63_0222B0A0 -ov63_0222B0A0: ; 0x0222B0A0 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r2, r3, #0 - add r5, r0, #0 - bl ov63_0222B7E8 - ldr r0, _0222B0B4 ; =0x0000227C - str r4, [r5, r0] - pop {r3, r4, r5, pc} - nop -_0222B0B4: .word 0x0000227C - thumb_func_end ov63_0222B0A0 - - thumb_func_start ov63_0222B0B8 -ov63_0222B0B8: ; 0x0222B0B8 - ldr r3, _0222B0BC ; =ov63_0222B914 - bx r3 - ; .align 2, 0 -_0222B0BC: .word ov63_0222B914 - thumb_func_end ov63_0222B0B8 - - thumb_func_start ov63_0222B0C0 -ov63_0222B0C0: ; 0x0222B0C0 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - str r3, [sp] - bl ov63_0222BB00 - add r4, r0, #0 - add r0, r7, #0 - bl ov63_0222B450 - str r0, [sp, #4] - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov63_0222B7D4 - cmp r0, #1 - beq _0222B0EA - bl sub_02022974 -_0222B0EA: - mov r0, #0 - add r2, sp, #0xc - add r1, r0, #0 - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - ldr r1, [r5, #0] - mov r2, #0x38 - str r1, [sp, #0xc] - ldr r1, [sp, #4] - add r7, r1, #0 - add r1, r5, #0 - mul r7, r2 - add r1, #0x24 - add r1, r1, r7 - str r1, [sp, #0x10] - ldrsh r0, [r6, r0] - lsl r0, r0, #0xc - str r0, [sp, #0x14] - mov r0, #2 - ldrsh r1, [r6, r0] - lsl r1, r1, #0xc - str r1, [sp, #0x18] - lsl r1, r0, #0xb - str r1, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - mov r1, #4 - ldrsh r1, [r6, r1] - str r1, [sp, #0x30] - ldr r1, [sp] - str r1, [sp, #0x38] - add r1, r5, #0 - str r1, [sp, #8] - add r1, #0x1c - str r1, [sp, #8] - ldr r1, [r1, r7] - cmp r1, #3 - beq _0222B142 - cmp r1, #1 - bne _0222B148 -_0222B142: - mov r0, #1 - str r0, [sp, #0x34] - b _0222B14A -_0222B148: - str r0, [sp, #0x34] -_0222B14A: - add r0, sp, #0xc - bl sub_02021AA0 - str r0, [r4, #4] - mov r1, #6 - ldrsh r1, [r6, r1] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_02021E80 - add r0, r5, r7 - ldr r0, [r0, #0x20] - cmp r0, #1 - ldr r0, [r4, #4] - bne _0222B170 - mov r1, #6 - bl sub_02021D6C - b _0222B176 -_0222B170: - mov r1, #1 - bl sub_02021D6C -_0222B176: - mov r0, #9 - str r0, [r4, #0xc] - mov r0, #0 - strh r0, [r4, #0x14] - mov r0, #1 - str r0, [r4, #0x10] - add r0, r5, #0 - add r0, #0x10 - add r0, r0, r7 - str r0, [r4, #0] - ldr r0, _0222B208 ; =0x00002248 - add r0, r5, r0 - bl ov63_0222B96C - cmp r0, #0 - beq _0222B1FC - mov r0, #0 - add r2, sp, #0xc - add r1, r0, #0 - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - ldr r1, [r5, #0] - str r1, [sp, #0xc] - ldr r1, _0222B20C ; =0x00002258 - add r2, r5, r1 - str r2, [sp, #0x10] - ldrsh r0, [r6, r0] - add r1, #0x24 - lsl r0, r0, #0xc - str r0, [sp, #0x14] - mov r0, #2 - ldrsh r2, [r6, r0] - lsl r2, r2, #0xc - str r2, [sp, #0x18] - lsl r2, r0, #0xb - str r2, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - ldr r1, [r5, r1] - str r1, [sp, #0x30] - ldr r1, [sp] - str r1, [sp, #0x38] - ldr r1, [sp, #8] - ldr r1, [r1, r7] - cmp r1, #3 - beq _0222B1DE - cmp r1, #1 - bne _0222B1E4 -_0222B1DE: - mov r0, #1 - str r0, [sp, #0x34] - b _0222B1E6 -_0222B1E4: - str r0, [sp, #0x34] -_0222B1E6: - add r0, sp, #0xc - bl sub_02021AA0 - str r0, [r4, #8] - mov r1, #6 - ldrsh r1, [r6, r1] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_02021E80 - b _0222B200 -_0222B1FC: - mov r0, #0 - str r0, [r4, #8] -_0222B200: - add r0, r4, #0 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_0222B208: .word 0x00002248 -_0222B20C: .word 0x00002258 - thumb_func_end ov63_0222B0C0 - - thumb_func_start ov63_0222B210 -ov63_0222B210: ; 0x0222B210 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _0222B21E - bl sub_02021BD4 -_0222B21E: - ldr r0, [r4, #4] - bl sub_02021BD4 - mov r1, #0x18 - mov r0, #0 -_0222B228: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _0222B228 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222B210 - - thumb_func_start ov63_0222B234 -ov63_0222B234: ; 0x0222B234 - ldr r0, [r0, #4] - bx lr - thumb_func_end ov63_0222B234 - - thumb_func_start ov63_0222B238 -ov63_0222B238: ; 0x0222B238 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - lsl r0, r1, #0xc - str r0, [sp] - lsl r0, r2, #0xc - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [r4, #4] - add r1, sp, #0 - bl sub_02021C50 - ldr r0, [r4, #8] - cmp r0, #0 - beq _0222B274 - mov r0, #2 - ldr r1, [sp] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp] - mov r0, #0xe - ldr r1, [sp, #4] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #8] - add r1, sp, #0 - bl sub_02021C50 -_0222B274: - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov63_0222B238 - - thumb_func_start ov63_0222B278 -ov63_0222B278: ; 0x0222B278 - ldr r3, _0222B280 ; =sub_02021F58 - ldr r0, [r0, #4] - bx r3 - nop -_0222B280: .word sub_02021F58 - thumb_func_end ov63_0222B278 - - thumb_func_start ov63_0222B284 -ov63_0222B284: ; 0x0222B284 - push {r3, lr} - ldr r0, [r0, #4] - bl sub_02021F74 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov63_0222B284 - - thumb_func_start ov63_0222B294 -ov63_0222B294: ; 0x0222B294 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - bl sub_02021CAC - ldr r0, [r5, #8] - cmp r0, #0 - beq _0222B2AC - add r1, r4, #0 - bl sub_02021CAC -_0222B2AC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov63_0222B294 - - thumb_func_start ov63_0222B2B0 -ov63_0222B2B0: ; 0x0222B2B0 - ldr r3, _0222B2B8 ; =sub_02021D34 - ldr r0, [r0, #4] - bx r3 - nop -_0222B2B8: .word sub_02021D34 - thumb_func_end ov63_0222B2B0 - - thumb_func_start ov63_0222B2BC -ov63_0222B2BC: ; 0x0222B2BC - ldr r0, [r0, #0] - ldr r0, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222B2BC - - thumb_func_start ov63_0222B2C4 -ov63_0222B2C4: ; 0x0222B2C4 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov63_0222B2C4 - - thumb_func_start ov63_0222B2C8 -ov63_0222B2C8: ; 0x0222B2C8 - ldr r3, _0222B2D0 ; =sub_02021E50 - ldr r0, [r0, #4] - bx r3 - nop -_0222B2D0: .word sub_02021E50 - thumb_func_end ov63_0222B2C8 - - thumb_func_start ov63_0222B2D4 -ov63_0222B2D4: ; 0x0222B2D4 - ldr r3, _0222B2DC ; =sub_02021E74 - ldr r0, [r0, #4] - bx r3 - nop -_0222B2DC: .word sub_02021E74 - thumb_func_end ov63_0222B2D4 - - thumb_func_start ov63_0222B2E0 -ov63_0222B2E0: ; 0x0222B2E0 - push {lr} - sub sp, #0xc - ldr r3, [r0, #8] - cmp r3, #0 - beq _0222B302 - add r1, #8 - lsl r1, r1, #0xc - add r2, #0xe - str r1, [sp] - lsl r1, r2, #0xc - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - ldr r0, [r0, #8] - add r1, sp, #0 - bl sub_02021C50 -_0222B302: - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov63_0222B2E0 - - thumb_func_start ov63_0222B308 -ov63_0222B308: ; 0x0222B308 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0xa - blt _0222B318 - bl sub_02022974 -_0222B318: - cmp r6, #4 - blt _0222B320 - bl sub_02022974 -_0222B320: - str r4, [r5, #0xc] - mov r0, #0 - strh r0, [r5, #0x14] - ldr r0, _0222B338 ; =0x0222D920 - lsl r1, r4, #2 - ldr r2, [r0, r1] - cmp r2, #0 - beq _0222B336 - add r0, r5, #0 - add r1, r6, #0 - blx r2 -_0222B336: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222B338: .word 0x0222D920 - thumb_func_end ov63_0222B308 - - thumb_func_start ov63_0222B33C -ov63_0222B33C: ; 0x0222B33C - push {r4, lr} - add r4, r0, #0 - ldr r2, [r4, #0xc] - ldr r1, _0222B370 ; =0x0222D904 - mov r0, #0 - ldrb r2, [r1, r2] - cmp r2, #0xff - bne _0222B350 - mov r0, #1 - b _0222B35C -_0222B350: - mov r1, #0x14 - ldrsh r1, [r4, r1] - add r1, r1, #1 - cmp r2, r1 - blt _0222B35C - mov r0, #1 -_0222B35C: - cmp r0, #1 - bne _0222B36E - add r0, r4, #0 - bl ov63_0222BB38 - mov r0, #0x14 - ldrsh r0, [r4, r0] - add r0, r0, #1 - strh r0, [r4, #0x14] -_0222B36E: - pop {r4, pc} - ; .align 2, 0 -_0222B370: .word 0x0222D904 - thumb_func_end ov63_0222B33C - - thumb_func_start ov63_0222B374 -ov63_0222B374: ; 0x0222B374 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #0xc] - add r0, r1, #0 - lsl r5, r0, #4 - ldr r0, [sp, #0xc] - str r1, [sp, #0x10] - add r1, r0, r5 - ldr r0, _0222B3F4 ; =0x00002118 - str r2, [sp, #0x14] - ldr r0, [r1, r0] - cmp r0, #0 - beq _0222B392 - bl sub_02022974 -_0222B392: - ldr r0, _0222B3F8 ; =0x0222D970 - ldr r6, _0222B3FC ; =0x0222D900 - add r4, r0, r5 - ldr r0, [sp, #0xc] - mov r7, #0 - add r5, r0, r5 - ldr r0, [sp, #0x10] - lsl r1, r0, #1 - mov r0, #1 - lsl r0, r0, #8 - add r0, r1, r0 - str r0, [sp, #0x18] -_0222B3AA: - lsr r2, r7, #0x1f - lsl r1, r7, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - ldrb r2, [r6] - ldr r1, [sp, #0x18] - add r0, r0, #2 - add r1, r2, r1 - str r1, [sp] - ldr r1, [sp, #0x14] - str r0, [sp, #4] - str r1, [sp, #8] - lsl r1, r0, #2 - ldr r0, [sp, #0xc] - ldr r2, [sp, #0xc] - add r1, r0, r1 - mov r0, #0x8a - lsl r0, r0, #6 - ldr r0, [r1, r0] - ldr r1, _0222B400 ; =0x00002294 - mov r3, #0 - ldr r1, [r2, r1] - ldr r2, [r4, #0] - bl sub_02009BC4 - ldr r1, _0222B3F4 ; =0x00002118 - add r7, r7, #1 - str r0, [r5, r1] - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r7, #4 - blt _0222B3AA - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222B3F4: .word 0x00002118 -_0222B3F8: .word 0x0222D970 -_0222B3FC: .word 0x0222D900 -_0222B400: .word 0x00002294 - thumb_func_end ov63_0222B374 - - thumb_func_start ov63_0222B404 -ov63_0222B404: ; 0x0222B404 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - lsl r5, r1, #4 - ldr r0, _0222B44C ; =0x00002118 - add r1, r6, r5 - ldr r0, [r1, r0] - cmp r0, #0 - bne _0222B418 - bl sub_02022974 -_0222B418: - mov r4, #0 - add r5, r6, r5 - add r7, r4, #0 -_0222B41E: - lsr r2, r4, #0x1f - lsl r1, r4, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r0, r2, r1 - add r0, r0, #2 - lsl r0, r0, #2 - add r1, r6, r0 - mov r0, #0x8a - lsl r0, r0, #6 - ldr r0, [r1, r0] - ldr r1, _0222B44C ; =0x00002118 - ldr r1, [r5, r1] - bl sub_02009D68 - ldr r0, _0222B44C ; =0x00002118 - add r4, r4, #1 - str r7, [r5, r0] - add r5, r5, #4 - cmp r4, #4 - blt _0222B41E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222B44C: .word 0x00002118 - thumb_func_end ov63_0222B404 - - thumb_func_start ov63_0222B450 -ov63_0222B450: ; 0x0222B450 - push {r3, lr} - ldr r3, _0222B474 ; =0x0222D9A0 - mov r2, #0 -_0222B456: - ldrh r1, [r3] - cmp r0, r1 - bne _0222B464 - ldr r0, _0222B478 ; =0x0222D9A2 - lsl r1, r2, #2 - ldrh r0, [r0, r1] - pop {r3, pc} -_0222B464: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, #0x97 - blt _0222B456 - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 -_0222B474: .word 0x0222D9A0 -_0222B478: .word 0x0222D9A2 - thumb_func_end ov63_0222B450 - - thumb_func_start ov63_0222B47C -ov63_0222B47C: ; 0x0222B47C - cmp r1, #0 - bne _0222B496 - cmp r0, #0 - beq _0222B48E - cmp r0, #0x61 - beq _0222B48E - sub r0, #0xfc - cmp r0, #1 - bhi _0222B492 -_0222B48E: - mov r0, #1 - bx lr -_0222B492: - mov r0, #0 - bx lr -_0222B496: - mov r0, #1 - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222B47C - - thumb_func_start ov63_0222B49C -ov63_0222B49C: ; 0x0222B49C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #2 - beq _0222B4B0 - cmp r4, #3 - beq _0222B4B0 - bl sub_02022974 -_0222B4B0: - sub r1, r4, #2 - cmp r6, #0 - bne _0222B4B8 - add r1, r1, #2 -_0222B4B8: - ldr r0, _0222B4C8 ; =0x0222D900 - ldrb r2, [r0, r1] - mov r0, #1 - lsl r1, r5, #1 - lsl r0, r0, #8 - add r0, r1, r0 - add r0, r2, r0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222B4C8: .word 0x0222D900 - thumb_func_end ov63_0222B49C - - thumb_func_start ov63_0222B4CC -ov63_0222B4CC: ; 0x0222B4CC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r0, #0x38 - mul r0, r4 - add r0, r5, r0 - ldr r0, [r0, #0x14] - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _0222B4E6 - bl sub_02022974 -_0222B4E6: - ldr r0, [sp, #0x1c] - cmp r0, #0 - bne _0222B4FE - ldr r0, [sp, #0x18] - add r1, r4, #0 - str r0, [sp] - add r0, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov63_0222B510 - pop {r3, r4, r5, r6, r7, pc} -_0222B4FE: - ldr r0, [sp, #0x18] - add r1, r4, #0 - str r0, [sp] - add r0, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov63_0222B664 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222B4CC - - thumb_func_start ov63_0222B510 -ov63_0222B510: ; 0x0222B510 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r0, #0 - ldr r0, [sp, #0x58] - add r6, r5, #0 - str r0, [sp, #0x40] - mov r0, #2 - lsl r0, r0, #8 - add r0, r1, r0 - str r0, [sp, #0x38] - lsl r0, r1, #1 - str r0, [sp, #0x3c] - add r4, r1, #0 - mov r0, #0x38 - mul r4, r0 - ldr r0, [sp, #0x38] - mov r1, #0x8a - str r0, [sp] - add r0, r2, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x40] - str r2, [sp, #0x2c] - ldr r2, [sp, #0x3c] - str r3, [sp, #0x30] - lsl r1, r1, #6 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, #0x14 - ldr r1, [r5, r1] - add r6, #0x14 - add r2, #0xe - mov r3, #0 - bl sub_02009A4C - str r0, [r6, r4] - ldr r0, [sp, #0x38] - ldr r2, [sp, #0x3c] - str r0, [sp] - ldr r0, [sp, #0x2c] - add r7, r5, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [sp, #0x40] - add r2, #0xd - ldr r1, _0222B660 ; =0x00002284 - str r0, [sp, #0xc] - ldr r0, [r5, r1] - add r1, #0x10 - ldr r1, [r5, r1] - add r7, #0x18 - mov r3, #0 - str r2, [sp, #0x3c] - bl sub_02009B04 - str r0, [r7, r4] - ldr r0, [r6, r4] - bl sub_02009E1C - mov r1, #6 - ldr r2, [r0, #0x10] - lsl r1, r1, #0xa - cmp r2, r1 - beq _0222B596 - mov r1, #1 - str r1, [sp, #0x34] - b _0222B59A -_0222B596: - mov r1, #0 - str r1, [sp, #0x34] -_0222B59A: - ldr r1, [sp, #0x30] - cmp r1, #2 - bne _0222B5A8 - mov r1, #2 - lsl r1, r1, #0xa - str r1, [r0, #0x10] - b _0222B5C0 -_0222B5A8: - cmp r1, #1 - bne _0222B5C0 - ldr r1, [sp, #0x34] - cmp r1, #0 - beq _0222B5BA - mov r1, #5 - lsl r1, r1, #0xa - str r1, [r0, #0x10] - b _0222B5C0 -_0222B5BA: - mov r1, #6 - lsl r1, r1, #0xa - str r1, [r0, #0x10] -_0222B5C0: - ldr r0, [r6, r4] - bl sub_0200A450 - cmp r0, #0 - bne _0222B5CE - bl sub_02022974 -_0222B5CE: - ldr r0, [r7, r4] - bl sub_0200A640 - cmp r0, #0 - bne _0222B5DC - bl sub_02022974 -_0222B5DC: - ldr r0, [r5, #4] - cmp r0, #0 - beq _0222B5EC - ldr r1, [r7, r4] - add r0, r5, #0 - mov r2, #1 - bl ov63_0222BC80 -_0222B5EC: - ldr r0, [r6, r4] - bl sub_02009D4C - ldr r0, [r7, r4] - bl sub_02009D4C - ldr r0, [sp, #0x2c] - add r1, r5, r4 - str r0, [r1, #0x1c] - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x34] - str r0, [r1, #0x20] - mov r0, #0 - str r0, [r1, #0x10] - ldr r0, [sp, #0x30] - mov r1, #2 - bl ov63_0222B49C - add r6, r0, #0 - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x34] - mov r1, #3 - bl ov63_0222B49C - str r0, [sp] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - mov r2, #0x8a - str r0, [sp, #0x10] - lsl r2, r2, #6 - ldr r1, [r5, r2] - add r3, r6, #0 - str r1, [sp, #0x14] - add r1, r2, #4 - ldr r1, [r5, r1] - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r1, [r5, r1] - add r2, #0xc - str r1, [sp, #0x1c] - ldr r1, [r5, r2] - add r5, #0x24 - str r1, [sp, #0x20] - ldr r1, [sp, #0x38] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r5, r4 - add r2, r1, #0 - bl sub_020093B4 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_0222B660: .word 0x00002284 - thumb_func_end ov63_0222B510 - - thumb_func_start ov63_0222B664 -ov63_0222B664: ; 0x0222B664 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r7, r1, #0 - add r5, r0, #0 - sub r0, r7, #2 - str r0, [sp, #0x38] - mov r0, #2 - lsl r0, r0, #8 - add r0, r7, r0 - str r0, [sp, #0x34] - mov r0, #0x38 - add r4, r7, #0 - mul r4, r0 - ldr r0, [sp, #0x34] - mov r1, #0x8a - str r0, [sp] - add r0, r2, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x50] - add r6, r5, #0 - str r2, [sp, #0x2c] - str r3, [sp, #0x30] - lsl r1, r1, #6 - str r0, [sp, #8] - ldr r0, [r5, r1] - add r1, #0x18 - ldr r1, [r5, r1] - add r6, #0x14 - sub r2, r7, #1 - mov r3, #0 - bl sub_02009A4C - str r0, [r6, r4] - ldr r0, [sp, #0x30] - cmp r0, #2 - bne _0222B6BA - ldr r0, [r6, r4] - bl sub_02009E1C - mov r1, #2 - lsl r1, r1, #0xa - str r1, [r0, #0x10] - b _0222B6CA -_0222B6BA: - cmp r0, #1 - bne _0222B6CA - ldr r0, [r6, r4] - bl sub_02009E1C - mov r1, #5 - lsl r1, r1, #0xa - str r1, [r0, #0x10] -_0222B6CA: - ldr r0, [r6, r4] - bl sub_0200A450 - cmp r0, #0 - bne _0222B6D8 - bl sub_02022974 -_0222B6D8: - ldr r0, [r6, r4] - bl sub_02009D4C - mov r0, #0 - add r2, r5, r4 - ldr r1, [sp, #0x2c] - str r0, [r2, #0x18] - str r1, [r2, #0x1c] - ldr r1, [sp, #0x30] - mov r6, #1 - str r1, [r2, #0x20] - str r6, [r2, #0x10] - mov r2, #6 - ldr r1, [sp, #0x38] - lsl r2, r2, #6 - add r3, r1, r2 - mov r2, #0x8a - str r3, [sp] - sub r1, r6, #2 - str r1, [sp, #4] - str r1, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r2, r2, #6 - ldr r1, [r5, r2] - str r1, [sp, #0x14] - add r1, r2, #4 - ldr r1, [r5, r1] - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r1, [r5, r1] - add r2, #0xc - str r1, [sp, #0x1c] - ldr r1, [r5, r2] - add r5, #0x24 - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r1, [sp, #0x34] - ldr r2, _0222B734 ; =0x00000402 - add r0, r5, r4 - bl sub_020093B4 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222B734: .word 0x00000402 - thumb_func_end ov63_0222B664 - - thumb_func_start ov63_0222B738 -ov63_0222B738: ; 0x0222B738 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - mov r0, #0x38 - add r4, r6, #0 - mul r4, r0 - add r0, r5, r4 - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _0222B750 - bl sub_02022974 -_0222B750: - add r0, r5, r4 - ldr r0, [r0, #0x10] - cmp r0, #0 - bne _0222B762 - add r0, r5, #0 - add r1, r6, #0 - bl ov63_0222B76C - pop {r4, r5, r6, pc} -_0222B762: - add r0, r5, #0 - add r1, r6, #0 - bl ov63_0222B7AC - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222B738 - - thumb_func_start ov63_0222B76C -ov63_0222B76C: ; 0x0222B76C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r5, #0 - mov r0, #0x38 - add r4, r1, #0 - mul r4, r0 - add r6, #0x14 - ldr r0, [r6, r4] - bl sub_0200A4E4 - add r7, r5, #0 - add r7, #0x18 - ldr r0, [r7, r4] - bl sub_0200A6DC - mov r0, #0x8a - lsl r0, r0, #6 - ldr r0, [r5, r0] - ldr r1, [r6, r4] - bl sub_02009D68 - ldr r0, _0222B7A8 ; =0x00002284 - ldr r1, [r7, r4] - ldr r0, [r5, r0] - bl sub_02009D68 - mov r0, #0 - str r0, [r6, r4] - str r0, [r7, r4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222B7A8: .word 0x00002284 - thumb_func_end ov63_0222B76C - - thumb_func_start ov63_0222B7AC -ov63_0222B7AC: ; 0x0222B7AC - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r6, #0 - mov r0, #0x38 - add r4, r1, #0 - add r5, #0x14 - mul r4, r0 - ldr r0, [r5, r4] - bl sub_0200A4E4 - mov r0, #0x8a - lsl r0, r0, #6 - ldr r0, [r6, r0] - ldr r1, [r5, r4] - bl sub_02009D68 - mov r0, #0 - str r0, [r5, r4] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222B7AC - - thumb_func_start ov63_0222B7D4 -ov63_0222B7D4: ; 0x0222B7D4 - mov r2, #0x38 - mul r2, r1 - add r0, r0, r2 - ldr r0, [r0, #0x14] - cmp r0, #0 - beq _0222B7E4 - mov r0, #1 - bx lr -_0222B7E4: - mov r0, #0 - bx lr - thumb_func_end ov63_0222B7D4 - - thumb_func_start ov63_0222B7E8 -ov63_0222B7E8: ; 0x0222B7E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r6, r0, #0 - ldr r0, _0222B904 ; =0x00002248 - str r1, [sp, #0x2c] - ldr r0, [r6, r0] - add r7, r2, #0 - cmp r0, #0 - beq _0222B7FE - bl sub_02022974 -_0222B7FE: - mov r4, #0 - add r0, r6, #0 - add r1, r4, #0 - bl ov63_0222B7D4 - cmp r0, #1 - bne _0222B814 - add r0, r4, #0 - str r0, [sp, #0x30] - mov r4, #1 - b _0222B84C -_0222B814: - add r0, r6, #0 - mov r1, #1 - bl ov63_0222B7D4 - cmp r0, #1 - bne _0222B826 - mov r4, #1 - str r4, [sp, #0x30] - b _0222B84C -_0222B826: - add r0, r6, #0 - mov r1, #0x95 - bl ov63_0222B7D4 - cmp r0, #1 - bne _0222B83A - mov r0, #0x95 - str r0, [sp, #0x30] - mov r4, #1 - b _0222B84C -_0222B83A: - add r0, r6, #0 - mov r1, #0x96 - bl ov63_0222B7D4 - cmp r0, #1 - bne _0222B84C - mov r0, #0x96 - str r0, [sp, #0x30] - mov r4, #1 -_0222B84C: - cmp r4, #1 - beq _0222B854 - bl sub_02022974 -_0222B854: - mov r4, #0 - add r5, r6, #0 -_0222B858: - mov r0, #0x12 - lsl r0, r0, #4 - str r0, [sp] - add r0, r4, #2 - str r0, [sp, #4] - ldr r0, _0222B908 ; =0x00002288 - str r7, [sp, #8] - ldr r1, _0222B90C ; =0x00002294 - ldr r0, [r5, r0] - ldr r1, [r6, r1] - add r2, r4, #0 - mov r3, #0 - bl sub_02009BC4 - ldr r1, _0222B910 ; =0x00002250 - add r4, r4, #1 - str r0, [r5, r1] - add r5, r5, #4 - cmp r4, #2 - blt _0222B858 - mov r0, #0x12 - lsl r0, r0, #4 - str r0, [sp] - ldr r0, [sp, #0x2c] - add r1, #0x30 - str r0, [sp, #4] - str r7, [sp, #8] - ldr r0, [r6, r1] - add r1, #0x14 - ldr r1, [r6, r1] - mov r2, #2 - mov r3, #0 - bl sub_02009A4C - ldr r1, _0222B904 ; =0x00002248 - str r0, [r6, r1] - ldr r0, [r6, r1] - bl sub_0200A450 - cmp r0, #0 - bne _0222B8AE - bl sub_02022974 -_0222B8AE: - ldr r0, _0222B904 ; =0x00002248 - ldr r0, [r6, r0] - bl sub_02009D4C - mov r1, #0x12 - lsl r1, r1, #4 - mov r0, #0 - mov r3, #0x8a - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r3, r3, #6 - ldr r2, [r6, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r6, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r6, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r6, r2] - sub r3, #0x28 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r6, r3 - add r3, r1, #0 - ldr r2, [sp, #0x30] - add r3, #0xe0 - add r2, r2, r3 - add r3, r1, #0 - bl sub_020093B4 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0222B904: .word 0x00002248 -_0222B908: .word 0x00002288 -_0222B90C: .word 0x00002294 -_0222B910: .word 0x00002250 - thumb_func_end ov63_0222B7E8 - - thumb_func_start ov63_0222B914 -ov63_0222B914: ; 0x0222B914 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _0222B960 ; =0x00002248 - add r0, r5, r0 - bl ov63_0222B96C - cmp r0, #1 - bne _0222B95C - ldr r0, _0222B960 ; =0x00002248 - ldr r0, [r5, r0] - bl sub_0200A4E4 - mov r1, #0x8a - lsl r1, r1, #6 - ldr r0, [r5, r1] - sub r1, #0x38 - ldr r1, [r5, r1] - bl sub_02009D68 - ldr r0, _0222B960 ; =0x00002248 - mov r4, #0 - add r7, r0, #0 - str r4, [r5, r0] - add r6, r4, #0 - add r7, #8 -_0222B946: - ldr r0, _0222B964 ; =0x00002288 - ldr r1, _0222B968 ; =0x00002250 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - bl sub_02009D68 - str r6, [r5, r7] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0222B946 -_0222B95C: - pop {r3, r4, r5, r6, r7, pc} - nop -_0222B960: .word 0x00002248 -_0222B964: .word 0x00002288 -_0222B968: .word 0x00002250 - thumb_func_end ov63_0222B914 - - thumb_func_start ov63_0222B96C -ov63_0222B96C: ; 0x0222B96C - ldr r0, [r0, #0] - cmp r0, #0 - beq _0222B976 - mov r0, #1 - bx lr -_0222B976: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222B96C - - thumb_func_start ov63_0222B97C -ov63_0222B97C: ; 0x0222B97C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, _0222B9E0 ; =0x00002290 - add r4, r1, #0 - ldr r0, [r5, r0] - add r6, r2, #0 - cmp r0, #0 - beq _0222B992 - bl sub_02022974 -_0222B992: - ldr r0, _0222B9E4 ; =0x00000402 - mov r2, #0 - str r0, [sp] - str r4, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - ldr r1, _0222B9E8 ; =0x00002284 - str r6, [sp, #0xc] - ldr r0, [r5, r1] - add r1, #0x14 - ldr r1, [r5, r1] - add r3, r2, #0 - bl sub_02009B04 - ldr r1, _0222B9E0 ; =0x00002290 - str r0, [r5, r1] - ldr r0, [r5, r1] - bl sub_0200A640 - cmp r0, #0 - bne _0222B9C0 - bl sub_02022974 -_0222B9C0: - ldr r0, [r5, #4] - cmp r0, #0 - beq _0222B9D2 - ldr r1, _0222B9E0 ; =0x00002290 - add r0, r5, #0 - ldr r1, [r5, r1] - mov r2, #8 - bl ov63_0222BC80 -_0222B9D2: - ldr r0, _0222B9E0 ; =0x00002290 - ldr r0, [r5, r0] - bl sub_02009D4C - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0222B9E0: .word 0x00002290 -_0222B9E4: .word 0x00000402 -_0222B9E8: .word 0x00002284 - thumb_func_end ov63_0222B97C - - thumb_func_start ov63_0222B9EC -ov63_0222B9EC: ; 0x0222B9EC - push {r4, lr} - add r4, r0, #0 - ldr r0, _0222BA18 ; =0x00002290 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0222B9FC - bl sub_02022974 -_0222B9FC: - ldr r0, _0222BA18 ; =0x00002290 - ldr r0, [r4, r0] - bl sub_0200A6DC - ldr r1, _0222BA1C ; =0x00002284 - ldr r0, [r4, r1] - add r1, #0xc - ldr r1, [r4, r1] - bl sub_02009D68 - ldr r0, _0222BA18 ; =0x00002290 - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_0222BA18: .word 0x00002290 -_0222BA1C: .word 0x00002284 - thumb_func_end ov63_0222B9EC - - thumb_func_start ov63_0222BA20 -ov63_0222BA20: ; 0x0222BA20 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, _0222BA9C ; =0x00002148 - str r1, [sp, #0xc] - ldr r0, [r5, r0] - cmp r0, #0 - beq _0222BA34 - bl sub_02022974 -_0222BA34: - mov r0, #0x11 - mov r4, #0 - str r0, [sp, #0x10] - add r6, r5, #0 - mov r7, #0x12 -_0222BA3E: - mov r0, #6 - lsl r0, r0, #6 - add r0, r4, r0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r1, _0222BAA0 ; =0x00002298 - str r0, [sp, #8] - ldr r0, _0222BAA4 ; =0x00002288 - ldr r1, [r5, r1] - ldr r0, [r5, r0] - ldr r2, [sp, #0x10] - mov r3, #0 - bl sub_02009BC4 - ldr r1, _0222BA9C ; =0x00002148 - add r2, r7, #0 - str r0, [r6, r1] - mov r0, #6 - lsl r0, r0, #6 - add r0, r4, r0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, [sp, #0xc] - ldr r1, _0222BAA0 ; =0x00002298 - str r0, [sp, #8] - ldr r0, _0222BAA8 ; =0x0000228C - ldr r1, [r5, r1] - ldr r0, [r5, r0] - mov r3, #0 - bl sub_02009BC4 - ldr r1, _0222BAAC ; =0x0000214C - add r4, r4, #1 - str r0, [r6, r1] - ldr r0, [sp, #0x10] - add r6, #0x10 - add r0, r0, #2 - add r7, r7, #2 - str r0, [sp, #0x10] - cmp r4, #0x10 - blt _0222BA3E - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0222BA9C: .word 0x00002148 -_0222BAA0: .word 0x00002298 -_0222BAA4: .word 0x00002288 -_0222BAA8: .word 0x0000228C -_0222BAAC: .word 0x0000214C - thumb_func_end ov63_0222BA20 - - thumb_func_start ov63_0222BAB0 -ov63_0222BAB0: ; 0x0222BAB0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _0222BAF0 ; =0x00002148 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0222BAC0 - bl sub_02022974 -_0222BAC0: - mov r6, #0 - add r4, r5, #0 - add r7, r6, #0 -_0222BAC6: - ldr r0, _0222BAF4 ; =0x00002288 - ldr r1, _0222BAF0 ; =0x00002148 - ldr r0, [r5, r0] - ldr r1, [r4, r1] - bl sub_02009D68 - ldr r0, _0222BAF8 ; =0x0000228C - ldr r1, _0222BAFC ; =0x0000214C - ldr r0, [r5, r0] - ldr r1, [r4, r1] - bl sub_02009D68 - ldr r0, _0222BAF0 ; =0x00002148 - add r6, r6, #1 - str r7, [r4, r0] - add r0, r0, #4 - str r7, [r4, r0] - add r4, #0x10 - cmp r6, #0x10 - blt _0222BAC6 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222BAF0: .word 0x00002148 -_0222BAF4: .word 0x00002288 -_0222BAF8: .word 0x0000228C -_0222BAFC: .word 0x0000214C - thumb_func_end ov63_0222BAB0 - - thumb_func_start ov63_0222BB00 -ov63_0222BB00: ; 0x0222BB00 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - mov r6, #0 - cmp r0, #0 - bls _0222BB2E - add r4, r6, #0 -_0222BB0E: - ldr r0, [r5, #8] - add r0, r0, r4 - bl ov63_0222BC70 - cmp r0, #1 - bne _0222BB24 - mov r0, #0x18 - ldr r1, [r5, #8] - mul r0, r6 - add r0, r1, r0 - pop {r4, r5, r6, pc} -_0222BB24: - ldr r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0x18 - cmp r6, r0 - blo _0222BB0E -_0222BB2E: - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BB00 - - thumb_func_start ov63_0222BB38 -ov63_0222BB38: ; 0x0222BB38 - push {r3, lr} - ldr r1, [r0, #0xc] - lsl r2, r1, #2 - ldr r1, _0222BB4C ; =0x0222D948 - ldr r1, [r1, r2] - cmp r1, #0 - beq _0222BB48 - blx r1 -_0222BB48: - pop {r3, pc} - nop -_0222BB4C: .word 0x0222D948 - thumb_func_end ov63_0222BB38 - - thumb_func_start ov63_0222BB50 -ov63_0222BB50: ; 0x0222BB50 - ldr r3, _0222BB58 ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - bx r3 - ; .align 2, 0 -_0222BB58: .word sub_02021DCC - thumb_func_end ov63_0222BB50 - - thumb_func_start ov63_0222BB5C -ov63_0222BB5C: ; 0x0222BB5C - ldr r3, _0222BB68 ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - mov r1, #4 - bx r3 - nop -_0222BB68: .word sub_02021DCC - thumb_func_end ov63_0222BB5C - - thumb_func_start ov63_0222BB6C -ov63_0222BB6C: ; 0x0222BB6C - ldr r3, _0222BB78 ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - add r1, r1, #5 - bx r3 - nop -_0222BB78: .word sub_02021DCC - thumb_func_end ov63_0222BB6C - - thumb_func_start ov63_0222BB7C -ov63_0222BB7C: ; 0x0222BB7C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0x10] - ldr r0, [r5, #4] - add r1, r1, #5 - bl sub_02021DCC - str r4, [r5, #0x10] - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222BB7C - - thumb_func_start ov63_0222BB90 -ov63_0222BB90: ; 0x0222BB90 - ldr r3, _0222BB9C ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - add r1, #9 - bx r3 - nop -_0222BB9C: .word sub_02021DCC - thumb_func_end ov63_0222BB90 - - thumb_func_start ov63_0222BBA0 -ov63_0222BBA0: ; 0x0222BBA0 - ldr r3, _0222BBAC ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - add r1, r1, #5 - bx r3 - nop -_0222BBAC: .word sub_02021DCC - thumb_func_end ov63_0222BBA0 - - thumb_func_start ov63_0222BBB0 -ov63_0222BBB0: ; 0x0222BBB0 - ldr r3, _0222BBBC ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - add r1, r1, #5 - bx r3 - nop -_0222BBBC: .word sub_02021DCC - thumb_func_end ov63_0222BBB0 - - thumb_func_start ov63_0222BBC0 -ov63_0222BBC0: ; 0x0222BBC0 - ldr r3, _0222BBCC ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - add r1, r1, #5 - bx r3 - nop -_0222BBCC: .word sub_02021DCC - thumb_func_end ov63_0222BBC0 - - thumb_func_start ov63_0222BBD0 -ov63_0222BBD0: ; 0x0222BBD0 - ldr r3, _0222BBDC ; =sub_02021DCC - str r1, [r0, #0x10] - ldr r0, [r0, #4] - add r1, r1, #5 - bx r3 - nop -_0222BBDC: .word sub_02021DCC - thumb_func_end ov63_0222BBD0 - - thumb_func_start ov63_0222BBE0 -ov63_0222BBE0: ; 0x0222BBE0 - ldr r3, _0222BBEC ; =sub_02021E2C - mov r1, #2 - ldr r0, [r0, #4] - lsl r1, r1, #0xc - bx r3 - nop -_0222BBEC: .word sub_02021E2C - thumb_func_end ov63_0222BBE0 - - thumb_func_start ov63_0222BBF0 -ov63_0222BBF0: ; 0x0222BBF0 - ldr r3, _0222BBFC ; =sub_02021E2C - mov r1, #2 - ldr r0, [r0, #4] - lsl r1, r1, #0xc - bx r3 - nop -_0222BBFC: .word sub_02021E2C - thumb_func_end ov63_0222BBF0 - - thumb_func_start ov63_0222BC00 -ov63_0222BC00: ; 0x0222BC00 - push {r3, lr} - add r1, r0, #0 - mov r0, #0x14 - ldrsh r0, [r1, r0] - cmp r0, #0 - ldr r0, [r1, #4] - bne _0222BC16 - mov r1, #1 - bl sub_02021E50 - pop {r3, pc} -_0222BC16: - ldr r1, [r1, #0x10] - add r1, r1, #5 - bl sub_02021D6C - pop {r3, pc} - thumb_func_end ov63_0222BC00 - - thumb_func_start ov63_0222BC20 -ov63_0222BC20: ; 0x0222BC20 - ldr r3, _0222BC2C ; =sub_02021E2C - mov r1, #2 - ldr r0, [r0, #4] - lsl r1, r1, #0xc - bx r3 - nop -_0222BC2C: .word sub_02021E2C - thumb_func_end ov63_0222BC20 - - thumb_func_start ov63_0222BC30 -ov63_0222BC30: ; 0x0222BC30 - ldr r3, _0222BC3C ; =sub_02021E2C - mov r1, #1 - ldr r0, [r0, #4] - lsl r1, r1, #0xc - bx r3 - nop -_0222BC3C: .word sub_02021E2C - thumb_func_end ov63_0222BC30 - - thumb_func_start ov63_0222BC40 -ov63_0222BC40: ; 0x0222BC40 - ldr r3, _0222BC4C ; =sub_02021E2C - mov r1, #1 - ldr r0, [r0, #4] - lsl r1, r1, #0xc - bx r3 - nop -_0222BC4C: .word sub_02021E2C - thumb_func_end ov63_0222BC40 - - thumb_func_start ov63_0222BC50 -ov63_0222BC50: ; 0x0222BC50 - ldr r3, _0222BC5C ; =sub_02021E2C - mov r1, #2 - ldr r0, [r0, #4] - lsl r1, r1, #0xe - bx r3 - nop -_0222BC5C: .word sub_02021E2C - thumb_func_end ov63_0222BC50 - - thumb_func_start ov63_0222BC60 -ov63_0222BC60: ; 0x0222BC60 - ldr r3, _0222BC6C ; =sub_02021E2C - mov r1, #6 - ldr r0, [r0, #4] - lsl r1, r1, #0xc - bx r3 - nop -_0222BC6C: .word sub_02021E2C - thumb_func_end ov63_0222BC60 - - thumb_func_start ov63_0222BC70 -ov63_0222BC70: ; 0x0222BC70 - ldr r0, [r0, #4] - cmp r0, #0 - bne _0222BC7A - mov r0, #1 - bx lr -_0222BC7A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222BC70 - - thumb_func_start ov63_0222BC80 -ov63_0222BC80: ; 0x0222BC80 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl sub_02009E34 - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #1 - bl sub_0200A760 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #2 - bl sub_0200A760 - add r6, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r7, r0 - beq _0222BCC4 - lsl r0, r4, #0x15 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r1, [sp, #4] - lsl r3, r7, #0x14 - ldr r0, [r5, #4] - ldr r1, [r1, #0xc] - mov r2, #2 - lsr r3, r3, #0x10 - bl sub_02002FBC -_0222BCC4: - mov r0, #0 - mvn r0, r0 - cmp r6, r0 - beq _0222BCE2 - lsl r0, r4, #0x15 - lsr r0, r0, #0x10 - str r0, [sp] - ldr r1, [sp, #4] - lsl r3, r6, #0x14 - ldr r0, [r5, #4] - ldr r1, [r1, #0xc] - mov r2, #3 - lsr r3, r3, #0x10 - bl sub_02002FBC -_0222BCE2: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BC80 - - thumb_func_start ov63_0222BCE8 -ov63_0222BCE8: ; 0x0222BCE8 - push {r3, r4, r5, r6, r7, lr} - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r0, r7, #0 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - bne _0222BD00 - bl sub_02022974 -_0222BD00: - strh r5, [r4] - strh r6, [r4, #2] - ldrh r2, [r4] - ldrh r1, [r4, #2] - add r0, r7, #0 - mul r1, r2 - lsl r1, r1, #2 - bl sub_02018144 - str r0, [r4, #4] - cmp r0, #0 - bne _0222BD1C - bl sub_02022974 -_0222BD1C: - ldrh r3, [r4] - ldrh r2, [r4, #2] - ldr r0, [r4, #4] - mov r1, #0 - mul r2, r3 - lsl r2, r2, #2 - bl sub_020D5124 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222BCE8 - - thumb_func_start ov63_0222BD30 -ov63_0222BD30: ; 0x0222BD30 - push {r4, lr} - add r4, r0, #0 - bne _0222BD3A - bl sub_02022974 -_0222BD3A: - ldr r0, [r4, #4] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov63_0222BD30 - - thumb_func_start ov63_0222BD48 -ov63_0222BD48: ; 0x0222BD48 - ldrh r0, [r0] - bx lr - thumb_func_end ov63_0222BD48 - - thumb_func_start ov63_0222BD4C -ov63_0222BD4C: ; 0x0222BD4C - ldrh r0, [r0, #2] - bx lr - thumb_func_end ov63_0222BD4C - - thumb_func_start ov63_0222BD50 -ov63_0222BD50: ; 0x0222BD50 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r4, #0 - bne _0222BD5E - bl sub_02022974 -_0222BD5E: - ldrh r3, [r4] - ldrh r2, [r4, #2] - ldr r0, [r4, #4] - add r1, r5, #0 - mul r2, r3 - lsl r2, r2, #2 - bl sub_020D50B8 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222BD50 - - thumb_func_start ov63_0222BD70 -ov63_0222BD70: ; 0x0222BD70 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _0222BDA8 ; =0x0222DBFC - add r4, r1, #0 - ldr r0, [r0, #0] - add r6, r2, #0 - str r0, [sp] - cmp r5, #0 - bne _0222BD88 - bl sub_02022974 -_0222BD88: - ldrh r2, [r5] - cmp r2, r4 - bls _0222BDA2 - ldrh r0, [r5, #2] - cmp r0, r6 - bls _0222BDA2 - add r0, r2, #0 - mul r0, r6 - add r0, r4, r0 - ldr r1, [r5, #4] - lsl r0, r0, #2 - ldr r0, [r1, r0] - str r0, [sp] -_0222BDA2: - ldr r0, [sp] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0222BDA8: .word 0x0222DBFC - thumb_func_end ov63_0222BD70 - - thumb_func_start ov63_0222BDAC -ov63_0222BDAC: ; 0x0222BDAC - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0 - bne _0222BDBE - bl sub_02022974 -_0222BDBE: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov63_0222BD70 - mov r1, #0 - mvn r1, r1 - str r0, [sp] - str r0, [sp, #4] - cmp r0, r1 - bne _0222BDDA - add sp, #8 - mov r0, #1 - pop {r4, r5, r6, pc} -_0222BDDA: - lsl r0, r0, #0x1f - lsr r0, r0, #0x1f - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BDAC - - thumb_func_start ov63_0222BDE4 -ov63_0222BDE4: ; 0x0222BDE4 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0 - bne _0222BDF6 - bl sub_02022974 -_0222BDF6: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov63_0222BD70 - mov r1, #0 - mvn r1, r1 - str r0, [sp] - str r0, [sp, #4] - cmp r0, r1 - bne _0222BE12 - add sp, #8 - mov r0, #0 - pop {r4, r5, r6, pc} -_0222BE12: - lsr r0, r0, #1 - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222BDE4 - - thumb_func_start ov63_0222BE18 -ov63_0222BE18: ; 0x0222BE18 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - bne _0222BE2E - bl sub_02022974 -_0222BE2E: - mov r1, #0x18 - add r0, r6, #0 - mul r1, r5 - str r5, [r4, #4] - bl sub_02018144 - str r0, [r4, #0] - cmp r0, #0 - bne _0222BE44 - bl sub_02022974 -_0222BE44: - ldr r3, [r4, #4] - mov r2, #0x18 - ldr r0, [r4, #0] - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BE18 - - thumb_func_start ov63_0222BE58 -ov63_0222BE58: ; 0x0222BE58 - push {r4, lr} - add r4, r0, #0 - bne _0222BE62 - bl sub_02022974 -_0222BE62: - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov63_0222BE58 - - thumb_func_start ov63_0222BE70 -ov63_0222BE70: ; 0x0222BE70 - push {r4, lr} - add r4, r1, #0 - ldrb r1, [r4, #7] - bl ov63_0222BF18 - add r1, r4, #0 - bl ov63_0222C350 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BE70 - - thumb_func_start ov63_0222BE84 -ov63_0222BE84: ; 0x0222BE84 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl ov63_0222BEB0 - add r5, r0, #0 - ldr r4, _0222BEAC ; =0x00000000 - beq _0222BEAA -_0222BE92: - lsl r1, r4, #0x10 - add r0, r6, #0 - lsr r1, r1, #0x10 - bl ov63_0222BF50 - cmp r0, #0 - beq _0222BEA4 - bl ov63_0222C37C -_0222BEA4: - add r4, r4, #1 - cmp r4, r5 - blo _0222BE92 -_0222BEAA: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0222BEAC: .word 0x00000000 - thumb_func_end ov63_0222BE84 - - thumb_func_start ov63_0222BEB0 -ov63_0222BEB0: ; 0x0222BEB0 - push {r4, lr} - add r4, r0, #0 - bne _0222BEBA - bl sub_02022974 -_0222BEBA: - ldr r0, [r4, #4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BEB0 - - thumb_func_start ov63_0222BEC0 -ov63_0222BEC0: ; 0x0222BEC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _0222BECE - bl sub_02022974 -_0222BECE: - cmp r4, #0 - bne _0222BED6 - bl sub_02022974 -_0222BED6: - add r0, r5, #0 - bl ov63_0222C0B8 - mov r1, #0 - ldrsh r2, [r4, r1] - strh r2, [r0, #4] - mov r2, #2 - ldrsh r3, [r4, r2] - strh r3, [r0, #6] - ldrsh r1, [r4, r1] - strh r1, [r0, #8] - ldrsh r1, [r4, r2] - strh r1, [r0, #0xa] - ldrh r1, [r4, #4] - strh r1, [r0, #0xc] - ldrh r1, [r4, #6] - strb r1, [r0, #0x15] - ldrh r1, [r4, #8] - strb r1, [r0, #0x14] - ldrh r1, [r4, #0xa] - strh r1, [r0, #0xe] - mov r1, #1 - str r1, [r0, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BEC0 - - thumb_func_start ov63_0222BF08 -ov63_0222BF08: ; 0x0222BF08 - mov r2, #0x18 - mov r1, #0 -_0222BF0C: - strb r1, [r0] - add r0, r0, #1 - sub r2, r2, #1 - bne _0222BF0C - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222BF08 - - thumb_func_start ov63_0222BF18 -ov63_0222BF18: ; 0x0222BF18 - push {r3, r4, r5, r6} - ldr r5, [r0, #4] - mov r2, #0 - cmp r5, #0 - bls _0222BF4A - ldr r4, [r0, #0] - add r3, r2, #0 - add r0, r4, #0 -_0222BF28: - ldr r6, [r0, #0] - cmp r6, #1 - bne _0222BF40 - add r6, r4, r3 - ldrh r6, [r6, #0xc] - cmp r1, r6 - bne _0222BF40 - mov r0, #0x18 - mul r0, r2 - add r0, r4, r0 - pop {r3, r4, r5, r6} - bx lr -_0222BF40: - add r2, r2, #1 - add r0, #0x18 - add r3, #0x18 - cmp r2, r5 - blo _0222BF28 -_0222BF4A: - mov r0, #0 - pop {r3, r4, r5, r6} - bx lr - thumb_func_end ov63_0222BF18 - - thumb_func_start ov63_0222BF50 -ov63_0222BF50: ; 0x0222BF50 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - bne _0222BF5E - bl sub_02022974 -_0222BF5E: - ldr r0, [r5, #4] - cmp r4, r0 - blo _0222BF68 - bl sub_02022974 -_0222BF68: - ldr r2, [r5, #0] - mov r0, #0x18 - add r1, r4, #0 - mul r1, r0 - ldr r0, [r2, r1] - cmp r0, #1 - bne _0222BF7A - add r0, r2, r1 - pop {r3, r4, r5, pc} -_0222BF7A: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov63_0222BF50 - - thumb_func_start ov63_0222BF80 -ov63_0222BF80: ; 0x0222BF80 - ldr r3, _0222BF84 ; =ov63_0222BF18 - bx r3 - ; .align 2, 0 -_0222BF84: .word ov63_0222BF18 - thumb_func_end ov63_0222BF80 - - thumb_func_start ov63_0222BF88 -ov63_0222BF88: ; 0x0222BF88 - ldr r3, _0222BF8C ; =ov63_0222BF50 - bx r3 - ; .align 2, 0 -_0222BF8C: .word ov63_0222BF50 - thumb_func_end ov63_0222BF88 - - thumb_func_start ov63_0222BF90 -ov63_0222BF90: ; 0x0222BF90 - push {r4, r5, r6, lr} - add r4, r0, #0 - add r6, r1, #0 - cmp r4, #0 - bne _0222BF9E - bl sub_02022974 -_0222BF9E: - cmp r6, #0xa - bhi _0222BFF8 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222BFAE: ; jump table - .short _0222BFC4 - _0222BFAE - 2 ; case 0 - .short _0222BFCA - _0222BFAE - 2 ; case 1 - .short _0222BFD0 - _0222BFAE - 2 ; case 2 - .short _0222BFD6 - _0222BFAE - 2 ; case 3 - .short _0222BFDC - _0222BFAE - 2 ; case 4 - .short _0222BFE0 - _0222BFAE - 2 ; case 5 - .short _0222BFE4 - _0222BFAE - 2 ; case 6 - .short _0222BFE8 - _0222BFAE - 2 ; case 7 - .short _0222BFEC - _0222BFAE - 2 ; case 8 - .short _0222BFF0 - _0222BFAE - 2 ; case 9 - .short _0222BFF4 - _0222BFAE - 2 ; case 10 -_0222BFC4: - mov r0, #4 - ldrsh r5, [r4, r0] - b _0222BFFC -_0222BFCA: - mov r0, #6 - ldrsh r5, [r4, r0] - b _0222BFFC -_0222BFD0: - mov r0, #8 - ldrsh r5, [r4, r0] - b _0222BFFC -_0222BFD6: - mov r0, #0xa - ldrsh r5, [r4, r0] - b _0222BFFC -_0222BFDC: - ldrh r5, [r4, #0xc] - b _0222BFFC -_0222BFE0: - ldrb r5, [r4, #0x15] - b _0222BFFC -_0222BFE4: - ldrb r5, [r4, #0x14] - b _0222BFFC -_0222BFE8: - ldrh r5, [r4, #0xe] - b _0222BFFC -_0222BFEC: - ldrh r5, [r4, #0x10] - b _0222BFFC -_0222BFF0: - ldrh r5, [r4, #0x12] - b _0222BFFC -_0222BFF4: - ldrh r5, [r4, #0x16] - b _0222BFFC -_0222BFF8: - bl sub_02022974 -_0222BFFC: - add r0, r5, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222BF90 - - thumb_func_start ov63_0222C000 -ov63_0222C000: ; 0x0222C000 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C010 - bl sub_02022974 -_0222C010: - cmp r6, #0xa - bhi _0222C072 - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0222C020: ; jump table - .short _0222C036 - _0222C020 - 2 ; case 0 - .short _0222C03A - _0222C020 - 2 ; case 1 - .short _0222C03E - _0222C020 - 2 ; case 2 - .short _0222C042 - _0222C020 - 2 ; case 3 - .short _0222C046 - _0222C020 - 2 ; case 4 - .short _0222C04A - _0222C020 - 2 ; case 5 - .short _0222C056 - _0222C020 - 2 ; case 6 - .short _0222C062 - _0222C020 - 2 ; case 7 - .short _0222C066 - _0222C020 - 2 ; case 8 - .short _0222C06A - _0222C020 - 2 ; case 9 - .short _0222C06E - _0222C020 - 2 ; case 10 -_0222C036: - strh r4, [r5, #4] - pop {r4, r5, r6, pc} -_0222C03A: - strh r4, [r5, #6] - pop {r4, r5, r6, pc} -_0222C03E: - strh r4, [r5, #8] - pop {r4, r5, r6, pc} -_0222C042: - strh r4, [r5, #0xa] - pop {r4, r5, r6, pc} -_0222C046: - strh r4, [r5, #0xc] - pop {r4, r5, r6, pc} -_0222C04A: - cmp r4, #0xc - blt _0222C052 - bl sub_02022974 -_0222C052: - strb r4, [r5, #0x15] - pop {r4, r5, r6, pc} -_0222C056: - cmp r4, #4 - blt _0222C05E - bl sub_02022974 -_0222C05E: - strb r4, [r5, #0x14] - pop {r4, r5, r6, pc} -_0222C062: - strh r4, [r5, #0xe] - pop {r4, r5, r6, pc} -_0222C066: - strh r4, [r5, #0x10] - pop {r4, r5, r6, pc} -_0222C06A: - strh r4, [r5, #0x12] - pop {r4, r5, r6, pc} -_0222C06E: - strh r4, [r5, #0x16] - pop {r4, r5, r6, pc} -_0222C072: - bl sub_02022974 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222C000 - - thumb_func_start ov63_0222C078 -ov63_0222C078: ; 0x0222C078 - push {r0, r1, r2, r3} - lsl r0, r1, #1 - add r2, sp, #0 - mov r1, #0 - ldrsh r3, [r2, r1] - ldr r1, _0222C0A4 ; =0x0222DC04 - ldrsb r1, [r1, r0] - add r1, r3, r1 - strh r1, [r2] - mov r1, #2 - ldrsh r3, [r2, r1] - ldr r1, _0222C0A8 ; =0x0222DC05 - ldrsb r0, [r1, r0] - add r0, r3, r0 - strh r0, [r2, #2] - ldrh r1, [r2, #2] - ldrh r0, [r2] - lsl r1, r1, #0x10 - orr r0, r1 - add sp, #0x10 - bx lr - nop -_0222C0A4: .word 0x0222DC04 -_0222C0A8: .word 0x0222DC05 - thumb_func_end ov63_0222C078 - - thumb_func_start ov63_0222C0AC -ov63_0222C0AC: ; 0x0222C0AC - ldr r1, _0222C0B4 ; =0x0222DC00 - ldrb r0, [r1, r0] - bx lr - nop -_0222C0B4: .word 0x0222DC00 - thumb_func_end ov63_0222C0AC - - thumb_func_start ov63_0222C0B8 -ov63_0222C0B8: ; 0x0222C0B8 - push {r4, lr} - ldr r4, [r0, #4] - mov r1, #0 - cmp r4, #0 - bls _0222C0DC - ldr r3, [r0, #0] - add r2, r3, #0 -_0222C0C6: - ldr r0, [r2, #0] - cmp r0, #0 - bne _0222C0D4 - mov r0, #0x18 - mul r0, r1 - add r0, r3, r0 - pop {r4, pc} -_0222C0D4: - add r1, r1, #1 - add r2, #0x18 - cmp r1, r4 - blo _0222C0C6 -_0222C0DC: - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov63_0222C0B8 - - thumb_func_start ov63_0222C0E4 -ov63_0222C0E4: ; 0x0222C0E4 - ldrh r1, [r0, #6] - ldrh r0, [r0, #4] - lsl r1, r1, #0x10 - orr r0, r1 - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222C0E4 - - thumb_func_start ov63_0222C0F0 -ov63_0222C0F0: ; 0x0222C0F0 - ldrh r1, [r0, #0xa] - ldrh r0, [r0, #8] - lsl r1, r1, #0x10 - orr r0, r1 - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222C0F0 - - thumb_func_start ov63_0222C0FC -ov63_0222C0FC: ; 0x0222C0FC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r1, #8 - bl ov63_0222BF90 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #9 - bl ov63_0222BF90 - add r6, r0, #0 - add r0, r5, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - add r0, r5, #0 - bl ov63_0222C0F0 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r2, #8 - strh r0, [r1, #8] - ldrh r0, [r1, #2] - strh r0, [r1, #0xa] - mov r0, #0xc - ldrsh r3, [r1, r0] - ldrsh r2, [r1, r2] - sub r2, r3, r2 - strh r2, [r1, #0xc] - mov r2, #0xa - ldrsh r5, [r1, r2] - mov r2, #0xe - ldrsh r2, [r1, r2] - sub r2, r2, r5 - strh r2, [r1, #0xe] - cmp r4, #0 - ble _0222C17A - ldrsh r0, [r1, r0] - add r1, r6, #0 - mul r0, r4 - bl sub_020E1F6C - add r1, sp, #0 - strh r0, [r1, #0xc] - mov r0, #0xe - ldrsh r0, [r1, r0] - add r1, r6, #0 - mul r0, r4 - bl sub_020E1F6C - add r1, sp, #0 - b _0222C17E -_0222C17A: - mov r0, #0 - strh r0, [r1, #0xc] -_0222C17E: - strh r0, [r1, #0xe] - add r1, sp, #0 - mov r0, #0xc - ldrsh r2, [r1, r0] - mov r0, #8 - ldrsh r0, [r1, r0] - add r0, r2, r0 - strh r0, [r1, #0xc] - mov r0, #0xe - ldrsh r0, [r1, r0] - add r0, r0, r5 - strh r0, [r1, #0xe] - ldrh r2, [r1, #0xe] - ldrh r0, [r1, #0xc] - lsl r1, r2, #0x10 - orr r0, r1 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222C0FC - - thumb_func_start ov63_0222C1A4 -ov63_0222C1A4: ; 0x0222C1A4 - push {r0, r1, r2, r3} - add r1, sp, #0 - ldrh r2, [r1, #4] - strh r2, [r0, #4] - ldrh r1, [r1, #6] - strh r1, [r0, #6] - add sp, #0x10 - bx lr - thumb_func_end ov63_0222C1A4 - - thumb_func_start ov63_0222C1B4 -ov63_0222C1B4: ; 0x0222C1B4 - push {r0, r1, r2, r3} - add r1, sp, #0 - ldrh r2, [r1, #4] - strh r2, [r0, #8] - ldrh r1, [r1, #6] - strh r1, [r0, #0xa] - add sp, #0x10 - bx lr - thumb_func_end ov63_0222C1B4 - - thumb_func_start ov63_0222C1C4 -ov63_0222C1C4: ; 0x0222C1C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - str r1, [sp] - add r4, r2, #0 - bl ov63_0222C0E4 - add r1, sp, #0x10 - strh r0, [r1, #0xc] - lsr r0, r0, #0x10 - strh r0, [r1, #0xe] - ldrh r0, [r1, #0xc] - mov r2, sp - sub r2, r2, #4 - strh r0, [r1, #0x1c] - ldrh r0, [r1, #0xe] - strh r0, [r1, #0x1e] - ldrh r0, [r1, #0x1c] - strh r0, [r2] - ldrh r0, [r1, #0x1e] - add r1, r4, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C078 - add r1, sp, #0x10 - strh r0, [r1, #8] - lsr r0, r0, #0x10 - strh r0, [r1, #0xa] - ldrh r0, [r1, #8] - strh r0, [r1, #0x14] - ldrh r0, [r1, #0xa] - strh r0, [r1, #0x16] - add r0, r5, #0 - mov r1, #4 - bl ov63_0222BF90 - str r0, [sp, #4] - ldr r0, [sp] - bl ov63_0222BEB0 - mov r5, #0 - str r0, [sp, #8] - cmp r0, #0 - bls _0222C2A4 - add r4, sp, #0x10 - mov r0, #0x16 - ldrsh r7, [r4, r0] - mov r0, #0x14 - ldrsh r0, [r4, r0] - str r0, [sp, #0xc] -_0222C22A: - lsl r1, r5, #0x10 - ldr r0, [sp] - lsr r1, r1, #0x10 - bl ov63_0222BF88 - add r6, r0, #0 - beq _0222C29C - mov r1, #4 - bl ov63_0222BF90 - ldr r1, [sp, #4] - cmp r0, r1 - beq _0222C29C - add r0, r6, #0 - bl ov63_0222C0E4 - strh r0, [r4, #4] - lsr r0, r0, #0x10 - strh r0, [r4, #6] - ldrh r0, [r4, #4] - strh r0, [r4, #0x18] - ldrh r0, [r4, #6] - strh r0, [r4, #0x1a] - mov r0, #0x18 - ldrsh r1, [r4, r0] - ldr r0, [sp, #0xc] - cmp r1, r0 - bne _0222C270 - mov r0, #0x1a - ldrsh r0, [r4, r0] - cmp r0, r7 - bne _0222C270 - add sp, #0x30 - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} -_0222C270: - add r0, r6, #0 - bl ov63_0222C0F0 - strh r0, [r4] - lsr r0, r0, #0x10 - strh r0, [r4, #2] - ldrh r0, [r4] - strh r0, [r4, #0x10] - ldrh r0, [r4, #2] - strh r0, [r4, #0x12] - mov r0, #0x10 - ldrsh r1, [r4, r0] - ldr r0, [sp, #0xc] - cmp r1, r0 - bne _0222C29C - mov r0, #0x12 - ldrsh r0, [r4, r0] - cmp r0, r7 - bne _0222C29C - add sp, #0x30 - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} -_0222C29C: - ldr r0, [sp, #8] - add r5, r5, #1 - cmp r5, r0 - blo _0222C22A -_0222C2A4: - mov r0, #0 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov63_0222C1C4 - - thumb_func_start ov63_0222C2AC -ov63_0222C2AC: ; 0x0222C2AC - push {r0, r1, r2, r3} - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r2, sp, #0x30 - mov r1, #6 - str r0, [sp] - ldrsh r6, [r2, r1] - bl ov63_0222BEB0 - mov r5, #0 - str r0, [sp, #8] - cmp r0, #0 - bls _0222C344 - add r1, sp, #0x30 - mov r0, #4 - ldrsh r7, [r1, r0] - add r4, sp, #0xc -_0222C2CE: - lsl r1, r5, #0x10 - ldr r0, [sp] - lsr r1, r1, #0x10 - bl ov63_0222BF88 - str r0, [sp, #4] - cmp r0, #0 - beq _0222C33C - bl ov63_0222C0E4 - strh r0, [r4, #4] - lsr r0, r0, #0x10 - strh r0, [r4, #6] - ldrh r0, [r4, #4] - strh r0, [r4, #0xc] - ldrh r0, [r4, #6] - strh r0, [r4, #0xe] - mov r0, #0xc - ldrsh r0, [r4, r0] - cmp r0, r7 - bne _0222C30C - mov r0, #0xe - ldrsh r0, [r4, r0] - cmp r0, r6 - bne _0222C30C - ldr r0, [sp, #4] - add sp, #0x1c - pop {r4, r5, r6, r7} - pop {r3} - add sp, #0x10 - bx r3 -_0222C30C: - ldr r0, [sp, #4] - bl ov63_0222C0F0 - strh r0, [r4] - lsr r0, r0, #0x10 - strh r0, [r4, #2] - ldrh r0, [r4] - strh r0, [r4, #8] - ldrh r0, [r4, #2] - strh r0, [r4, #0xa] - mov r0, #8 - ldrsh r0, [r4, r0] - cmp r0, r7 - bne _0222C33C - mov r0, #0xa - ldrsh r0, [r4, r0] - cmp r0, r6 - bne _0222C33C - ldr r0, [sp, #4] - add sp, #0x1c - pop {r4, r5, r6, r7} - pop {r3} - add sp, #0x10 - bx r3 -_0222C33C: - ldr r0, [sp, #8] - add r5, r5, #1 - cmp r5, r0 - blo _0222C2CE -_0222C344: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C2AC - - thumb_func_start ov63_0222C350 -ov63_0222C350: ; 0x0222C350 - push {r3, r4, r5, lr} - add r3, r1, #0 - ldrh r1, [r3] - mov r2, sp - sub r2, r2, #4 - strh r1, [r2] - ldrh r1, [r3, #2] - add r4, r0, #0 - strh r1, [r2, #2] - ldr r1, [r2, #0] - ldrb r2, [r3, #6] - ldrh r3, [r3, #4] - lsl r5, r3, #2 - ldr r3, _0222C378 ; =0x0222DC0C - ldr r3, [r3, r5] - blx r3 - mov r0, #0 - strh r0, [r4, #0x16] - pop {r3, r4, r5, pc} - nop -_0222C378: .word 0x0222DC0C - thumb_func_end ov63_0222C350 - - thumb_func_start ov63_0222C37C -ov63_0222C37C: ; 0x0222C37C - push {r4, lr} - mov r1, #5 - add r4, r0, #0 - bl ov63_0222BF90 - add r1, r0, #0 - lsl r2, r1, #2 - ldr r1, _0222C3A8 ; =0x0222DC3C - add r0, r4, #0 - ldr r1, [r1, r2] - blx r1 - ldrh r1, [r4, #0x16] - add r1, r1, #1 - strh r1, [r4, #0x16] - cmp r0, #1 - bne _0222C3A6 - add r0, r4, #0 - bl ov63_0222CA48 - mov r0, #0 - strh r0, [r4, #0x16] -_0222C3A6: - pop {r4, pc} - ; .align 2, 0 -_0222C3A8: .word 0x0222DC3C - thumb_func_end ov63_0222C37C - - thumb_func_start ov63_0222C3AC -ov63_0222C3AC: ; 0x0222C3AC - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C3BC - bl sub_02022974 -_0222C3BC: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C3AC - - thumb_func_start ov63_0222C404 -ov63_0222C404: ; 0x0222C404 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C414 - bl sub_02022974 -_0222C414: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #1 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #2 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C404 - - thumb_func_start ov63_0222C470 -ov63_0222C470: ; 0x0222C470 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C482 - bl sub_02022974 -_0222C482: - add r0, sp, #0x18 - ldrh r1, [r0, #4] - mov r2, sp - sub r2, r2, #4 - strh r1, [r2] - ldrh r0, [r0, #6] - add r1, r4, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C9E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - add r1, sp, #0x18 - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #2 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #8 - bl ov63_0222C000 - add sp, #8 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov63_0222C470 - - thumb_func_start ov63_0222C508 -ov63_0222C508: ; 0x0222C508 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C51A - bl sub_02022974 -_0222C51A: - add r0, sp, #0x18 - ldrh r1, [r0, #4] - mov r2, sp - sub r2, r2, #4 - strh r1, [r2] - ldrh r0, [r0, #6] - add r1, r4, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C9E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - add r1, sp, #0x18 - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #3 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #4 - bl ov63_0222C000 - add sp, #8 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov63_0222C508 - - thumb_func_start ov63_0222C5A0 -ov63_0222C5A0: ; 0x0222C5A0 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C5B0 - bl sub_02022974 -_0222C5B0: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #4 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C5A0 - - thumb_func_start ov63_0222C5F8 -ov63_0222C5F8: ; 0x0222C5F8 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C608 - bl sub_02022974 -_0222C608: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - mov r1, #5 - add r0, r5, #0 - add r2, r1, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #0x10 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C5F8 - - thumb_func_start ov63_0222C664 -ov63_0222C664: ; 0x0222C664 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C676 - bl sub_02022974 -_0222C676: - add r0, sp, #0x18 - ldrh r1, [r0, #4] - mov r2, sp - sub r2, r2, #4 - strh r1, [r2] - ldrh r0, [r0, #6] - add r1, r4, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C9E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - add r1, sp, #0x18 - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #6 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #0x10 - bl ov63_0222C000 - add sp, #8 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov63_0222C664 - - thumb_func_start ov63_0222C6FC -ov63_0222C6FC: ; 0x0222C6FC - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C70E - bl sub_02022974 -_0222C70E: - add r0, sp, #0x18 - ldrh r1, [r0, #4] - mov r2, sp - sub r2, r2, #4 - strh r1, [r2] - ldrh r0, [r0, #6] - add r1, r4, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C9E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - add r1, sp, #0x18 - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #7 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #4 - bl ov63_0222C000 - add sp, #8 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov63_0222C6FC - - thumb_func_start ov63_0222C794 -ov63_0222C794: ; 0x0222C794 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C7A4 - bl sub_02022974 -_0222C7A4: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #8 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #2 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C794 - - thumb_func_start ov63_0222C800 -ov63_0222C800: ; 0x0222C800 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C810 - bl sub_02022974 -_0222C810: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #9 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #4 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C800 - - thumb_func_start ov63_0222C86C -ov63_0222C86C: ; 0x0222C86C - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C87C - bl sub_02022974 -_0222C87C: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #0xa - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #8 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C86C - - thumb_func_start ov63_0222C8D8 -ov63_0222C8D8: ; 0x0222C8D8 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - cmp r5, #0 - bne _0222C8E8 - bl sub_02022974 -_0222C8E8: - add r1, sp, #0x10 - ldrh r2, [r1, #4] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - add r0, r5, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - add r1, sp, #0x10 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r0, r5, #0 - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #5 - mov r2, #0xb - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #8 - mov r2, #0 - bl ov63_0222C000 - add r0, r5, #0 - mov r1, #9 - mov r2, #0x10 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C8D8 - - thumb_func_start ov63_0222C944 -ov63_0222C944: ; 0x0222C944 - mov r0, #0 - bx lr - thumb_func_end ov63_0222C944 - - thumb_func_start ov63_0222C948 -ov63_0222C948: ; 0x0222C948 - ldr r3, _0222C94C ; =ov63_0222CA14 - bx r3 - ; .align 2, 0 -_0222C94C: .word ov63_0222CA14 - thumb_func_end ov63_0222C948 - - thumb_func_start ov63_0222C950 -ov63_0222C950: ; 0x0222C950 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - bl ov63_0222CA14 - add r4, r0, #0 - cmp r4, #1 - bne _0222C98A - add r0, r5, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 -_0222C98A: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222C950 - - thumb_func_start ov63_0222C990 -ov63_0222C990: ; 0x0222C990 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - bl ov63_0222CA14 - add r4, r0, #0 - cmp r4, #1 - bne _0222C9CA - add r0, r5, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 -_0222C9CA: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222C990 - - thumb_func_start ov63_0222C9D0 -ov63_0222C9D0: ; 0x0222C9D0 - mov r0, #0 - bx lr - thumb_func_end ov63_0222C9D0 - - thumb_func_start ov63_0222C9D4 -ov63_0222C9D4: ; 0x0222C9D4 - ldr r3, _0222C9D8 ; =ov63_0222CA14 - bx r3 - ; .align 2, 0 -_0222C9D8: .word ov63_0222CA14 - thumb_func_end ov63_0222C9D4 - - thumb_func_start ov63_0222C9DC -ov63_0222C9DC: ; 0x0222C9DC - ldr r3, _0222C9E0 ; =ov63_0222CA14 - bx r3 - ; .align 2, 0 -_0222C9E0: .word ov63_0222CA14 - thumb_func_end ov63_0222C9DC - - thumb_func_start ov63_0222C9E4 -ov63_0222C9E4: ; 0x0222C9E4 - push {r0, r1, r2, r3} - push {r3, lr} - add r0, sp, #8 - ldrh r2, [r0] - mov r3, sp - sub r3, r3, #4 - strh r2, [r3] - ldrh r0, [r0, #2] - strh r0, [r3, #2] - ldr r0, [r3, #0] - bl ov63_0222C078 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r2, [r1, #2] - ldrh r0, [r1] - lsl r1, r2, #0x10 - orr r0, r1 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222C9E4 - - thumb_func_start ov63_0222CA14 -ov63_0222CA14: ; 0x0222CA14 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r1, #8 - bl ov63_0222BF90 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #9 - bl ov63_0222BF90 - add r6, r0, #0 - cmp r4, r6 - bge _0222CA42 - add r0, r5, #0 - mov r1, #8 - add r2, r4, #1 - bl ov63_0222C000 - add r0, r4, #1 - cmp r0, r6 - bge _0222CA42 - mov r0, #0 - pop {r4, r5, r6, pc} -_0222CA42: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CA14 - - thumb_func_start ov63_0222CA48 -ov63_0222CA48: ; 0x0222CA48 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - add r0, r4, #0 - mov r1, #6 - bl ov63_0222BF90 - add r1, sp, #0 - add r2, r0, #0 - add r0, r4, #0 - mov r4, sp - ldrh r3, [r1, #4] - sub r4, r4, #4 - strh r3, [r4] - ldrh r1, [r1, #6] - strh r1, [r4, #2] - ldr r1, [r4, #0] - bl ov63_0222C3AC - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CA48 - - thumb_func_start ov63_0222CA88 -ov63_0222CA88: ; 0x0222CA88 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r0, #0 - add r5, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r7, #0 - bne _0222CA9C - bl sub_02022974 -_0222CA9C: - cmp r5, #0 - bne _0222CAA4 - bl sub_02022974 -_0222CAA4: - cmp r4, #0 - bne _0222CAAC - bl sub_02022974 -_0222CAAC: - cmp r6, #0 - bne _0222CAB4 - bl sub_02022974 -_0222CAB4: - ldrb r1, [r4, #3] - add r0, r5, #0 - bl ov63_0222BF80 - str r0, [sp, #4] - cmp r0, #0 - bne _0222CAC6 - bl sub_02022974 -_0222CAC6: - str r6, [sp] - add r3, r4, #0 - ldrh r4, [r4] - add r2, r5, #0 - ldr r0, [sp, #4] - lsl r5, r4, #2 - ldr r4, _0222CAE0 ; =0x0222DC6C - add r1, r7, #0 - ldr r4, [r4, r5] - blx r4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0222CAE0: .word 0x0222DC6C - thumb_func_end ov63_0222CA88 - - thumb_func_start ov63_0222CAE4 -ov63_0222CAE4: ; 0x0222CAE4 - push {r3, r4, r5, lr} - mov r1, #5 - add r5, r0, #0 - add r4, r3, #0 - bl ov63_0222BF90 - cmp r0, #0 - beq _0222CAF8 - cmp r0, #4 - bne _0222CB0C -_0222CAF8: - ldrb r0, [r4, #2] - add r1, r5, #0 - str r0, [sp] - ldrh r2, [r4] - ldrb r3, [r4, #3] - ldr r0, [sp, #0x10] - bl ov63_0222CCB8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0222CB0C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222CAE4 - - thumb_func_start ov63_0222CB10 -ov63_0222CB10: ; 0x0222CB10 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - mov r1, #5 - add r4, r3, #0 - bl ov63_0222BF90 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #6 - bl ov63_0222BF90 - cmp r6, #0 - bne _0222CB46 - ldrb r1, [r4, #2] - cmp r0, r1 - beq _0222CB46 - str r1, [sp] - ldrh r2, [r4] - ldrb r3, [r4, #3] - ldr r0, [sp, #0x18] - add r1, r5, #0 - bl ov63_0222CCB8 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0222CB46: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov63_0222CB10 - - thumb_func_start ov63_0222CB4C -ov63_0222CB4C: ; 0x0222CB4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r1, #0 - mov r1, #5 - add r5, r0, #0 - str r2, [sp, #4] - add r4, r3, #0 - bl ov63_0222BF90 - add r6, r0, #0 - bne _0222CB94 - ldrb r2, [r4, #2] - add r0, r5, #0 - add r1, r7, #0 - bl ov63_0222CC3C - cmp r0, #1 - beq _0222CB94 - ldrb r2, [r4, #2] - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov63_0222CCA4 - cmp r0, #1 - beq _0222CB94 - ldrb r0, [r4, #2] - add r1, r5, #0 - str r0, [sp] - ldrh r2, [r4] - ldrb r3, [r4, #3] - ldr r0, [sp, #0x20] - bl ov63_0222CCB8 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0222CB94: - cmp r6, #0 - bne _0222CBBA - add r0, r5, #0 - mov r1, #0xa - bl ov63_0222BF90 - cmp r0, #8 - blt _0222CBBA - ldrb r0, [r4, #2] - add r1, r5, #0 - mov r2, #5 - str r0, [sp] - ldrb r3, [r4, #3] - ldr r0, [sp, #0x20] - bl ov63_0222CCB8 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0222CBBA: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222CB4C - - thumb_func_start ov63_0222CBC0 -ov63_0222CBC0: ; 0x0222CBC0 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - bl ov63_0222CB4C - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov63_0222CBC0 - - thumb_func_start ov63_0222CBD0 -ov63_0222CBD0: ; 0x0222CBD0 - push {r3, r4, r5, lr} - mov r1, #5 - add r5, r0, #0 - add r4, r3, #0 - bl ov63_0222BF90 - cmp r0, #0 - bne _0222CBF4 - ldrb r0, [r4, #2] - add r1, r5, #0 - str r0, [sp] - ldrh r2, [r4] - ldrb r3, [r4, #3] - ldr r0, [sp, #0x10] - bl ov63_0222CCB8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0222CBF4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222CBD0 - - thumb_func_start ov63_0222CBF8 -ov63_0222CBF8: ; 0x0222CBF8 - push {r3, lr} - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CBF8 - - thumb_func_start ov63_0222CC04 -ov63_0222CC04: ; 0x0222CC04 - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - bl ov63_0222CB4C - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov63_0222CC04 - - thumb_func_start ov63_0222CC14 -ov63_0222CC14: ; 0x0222CC14 - push {r3, r4, r5, lr} - mov r1, #5 - add r5, r0, #0 - add r4, r3, #0 - bl ov63_0222BF90 - cmp r0, #0 - bne _0222CC38 - ldrb r0, [r4, #2] - add r1, r5, #0 - str r0, [sp] - ldrh r2, [r4] - ldrb r3, [r4, #3] - ldr r0, [sp, #0x10] - bl ov63_0222CCB8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0222CC38: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222CC14 - - thumb_func_start ov63_0222CC3C -ov63_0222CC3C: ; 0x0222CC3C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r2, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - mov r2, sp - sub r2, r2, #4 - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldrh r0, [r1, #0xc] - strh r0, [r2] - ldrh r0, [r1, #0xe] - add r1, r5, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C078 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #8 - strh r0, [r2, #8] - ldrh r0, [r2, #2] - strh r0, [r2, #0xa] - ldrsh r3, [r2, r1] - add r0, r4, #0 - asr r1, r3, #3 - lsr r1, r1, #0x1c - add r1, r3, r1 - mov r3, #0xa - ldrsh r3, [r2, r3] - lsl r1, r1, #0xc - lsr r1, r1, #0x10 - asr r2, r3, #3 - lsr r2, r2, #0x1c - add r2, r3, r2 - lsl r2, r2, #0xc - lsr r2, r2, #0x10 - bl ov63_0222BDAC - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CC3C - - thumb_func_start ov63_0222CCA4 -ov63_0222CCA4: ; 0x0222CCA4 - push {r3, lr} - bl ov63_0222C1C4 - cmp r0, #0 - beq _0222CCB2 - mov r0, #1 - pop {r3, pc} -_0222CCB2: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CCA4 - - thumb_func_start ov63_0222CCB8 -ov63_0222CCB8: ; 0x0222CCB8 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r5] - ldrh r0, [r1, #2] - strh r0, [r5, #2] - strh r4, [r5, #4] - ldr r0, [sp, #0x18] - strb r6, [r5, #7] - strb r0, [r5, #6] - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov63_0222CCB8 - - thumb_func_start ov63_0222CCE4 -ov63_0222CCE4: ; 0x0222CCE4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - str r1, [sp] - ldr r0, [sp, #0x18] - mov r1, #0xc - add r5, r2, #0 - add r6, r3, #0 - bl sub_02018144 - add r4, r0, #0 - ldr r1, [sp] - ldr r3, [sp, #0x18] - add r0, r7, #0 - add r2, r5, #0 - bl ov63_0222AE60 - str r0, [r4, #0] - strh r5, [r4, #8] - ldrh r2, [r4, #8] - mov r1, #0x14 - ldr r0, [sp, #0x18] - mul r1, r2 - bl sub_02018144 - str r0, [r4, #4] - ldrh r3, [r4, #8] - mov r2, #0x14 - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - mov r0, #2 - strb r0, [r4, #0xa] - strb r6, [r4, #0xb] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222CCE4 - - thumb_func_start ov63_0222CD2C -ov63_0222CD2C: ; 0x0222CD2C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, [sp, #0x28] - add r7, r0, #0 - str r1, [sp, #4] - add r0, r5, #0 - mov r1, #0xc - add r6, r2, #0 - str r3, [sp, #8] - bl sub_02018144 - add r4, r0, #0 - ldr r1, [sp, #4] - add r0, r7, #0 - add r2, r6, #0 - add r3, r5, #0 - bl ov63_0222AE60 - str r0, [r4, #0] - strh r6, [r4, #8] - ldrh r2, [r4, #8] - mov r1, #0x14 - add r0, r5, #0 - mul r1, r2 - bl sub_02018144 - str r0, [r4, #4] - ldrh r3, [r4, #8] - mov r2, #0x14 - mov r1, #0 - mul r2, r3 - bl sub_020D5124 - mov r0, #2 - strb r0, [r4, #0xa] - ldr r0, [sp, #0x24] - ldr r1, [sp, #8] - strb r0, [r4, #0xb] - str r5, [sp] - ldrb r2, [r4, #0xb] - ldr r0, [r4, #0] - ldr r3, [sp, #0x20] - bl ov63_0222AF94 - ldrb r1, [r4, #0xb] - ldr r0, [r4, #0] - ldr r2, _0222CD98 ; =0x00009C41 - add r3, r5, #0 - bl ov63_0222B0A0 - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0222CD98: .word 0x00009C41 - thumb_func_end ov63_0222CD2C - - thumb_func_start ov63_0222CD9C -ov63_0222CD9C: ; 0x0222CD9C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrh r0, [r5, #8] - mov r6, #0 - cmp r0, #0 - ble _0222CDC8 - add r4, r6, #0 -_0222CDAA: - ldr r0, [r5, #4] - add r0, r0, r4 - bl ov63_0222D07C - cmp r0, #0 - bne _0222CDBE - ldr r0, [r5, #4] - add r0, r0, r4 - bl ov63_0222CECC -_0222CDBE: - ldrh r0, [r5, #8] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _0222CDAA -_0222CDC8: - ldr r0, [r5, #0] - bl ov63_0222B0B8 - add r0, r5, #0 - bl ov63_0222CE24 - ldr r0, [r5, #0] - bl ov63_0222AF14 - ldr r0, [r5, #4] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222CD9C - - thumb_func_start ov63_0222CDE8 -ov63_0222CDE8: ; 0x0222CDE8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - bl ov63_0222AFE4 - cmp r0, #0 - bne _0222CE0A - str r4, [sp] - ldrb r2, [r5, #0xb] - ldr r0, [r5, #0] - add r1, r6, #0 - add r3, r7, #0 - bl ov63_0222AF94 -_0222CE0A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222CDE8 - - thumb_func_start ov63_0222CE0C -ov63_0222CE0C: ; 0x0222CE0C - ldr r3, _0222CE14 ; =ov63_0222AFD0 - ldr r0, [r0, #0] - bx r3 - nop -_0222CE14: .word ov63_0222AFD0 - thumb_func_end ov63_0222CE0C - - thumb_func_start ov63_0222CE18 -ov63_0222CE18: ; 0x0222CE18 - ldr r3, _0222CE20 ; =ov63_0222AFE4 - ldr r0, [r0, #0] - bx r3 - nop -_0222CE20: .word ov63_0222AFE4 - thumb_func_end ov63_0222CE18 - - thumb_func_start ov63_0222CE24 -ov63_0222CE24: ; 0x0222CE24 - ldr r3, _0222CE2C ; =ov63_0222AFF8 - ldr r0, [r0, #0] - bx r3 - nop -_0222CE2C: .word ov63_0222AFF8 - thumb_func_end ov63_0222CE24 - - thumb_func_start ov63_0222CE30 -ov63_0222CE30: ; 0x0222CE30 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldrb r1, [r5, #0xb] - add r3, r2, #0 - ldr r0, [r5, #0] - add r2, r4, #0 - bl ov63_0222B02C - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222CE30 - - thumb_func_start ov63_0222CE44 -ov63_0222CE44: ; 0x0222CE44 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - add r7, r2, #0 - str r3, [sp] - bl ov63_0222D08C - add r4, r0, #0 - add r0, r5, #0 - mov r1, #5 - bl ov63_0222BF90 - strh r0, [r4, #8] - add r0, r5, #0 - mov r1, #6 - bl ov63_0222BF90 - strh r0, [r4, #0xa] - add r0, r5, #0 - mov r1, #4 - bl ov63_0222BF90 - strh r0, [r4, #0xc] - str r5, [r4, #0] - strb r7, [r4, #0x12] - mov r0, #1 - strb r0, [r4, #0x13] - mov r1, #0 - strh r1, [r4, #0xe] - add r0, r5, #0 - strh r1, [r4, #0x10] - bl ov63_0222BF90 - add r1, sp, #4 - strh r0, [r1] - add r0, r5, #0 - mov r1, #1 - bl ov63_0222BF90 - add r1, sp, #4 - strh r0, [r1, #2] - mov r0, #2 - ldrsh r0, [r1, r0] - ldrb r1, [r4, #0x12] - bl ov63_0222D034 - add r1, sp, #4 - strh r0, [r1, #4] - ldrb r0, [r6, #0xa] - strh r0, [r1, #6] - add r0, r5, #0 - mov r1, #7 - bl ov63_0222BF90 - add r2, r0, #0 - ldr r0, [r6, #0] - ldr r3, [sp] - add r1, sp, #4 - bl ov63_0222B0C0 - str r0, [r4, #4] - add r0, r4, #0 - bl ov63_0222CF14 - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov63_0222CE44 - - thumb_func_start ov63_0222CECC -ov63_0222CECC: ; 0x0222CECC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov63_0222B210 - mov r1, #0x14 - mov r0, #0 -_0222CEDA: - strb r0, [r4] - add r4, r4, #1 - sub r1, r1, #1 - bne _0222CEDA - pop {r4, pc} - thumb_func_end ov63_0222CECC - - thumb_func_start ov63_0222CEE4 -ov63_0222CEE4: ; 0x0222CEE4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrh r0, [r5, #8] - mov r6, #0 - cmp r0, #0 - ble _0222CF10 - add r4, r6, #0 -_0222CEF2: - ldr r0, [r5, #4] - add r0, r0, r4 - bl ov63_0222D07C - cmp r0, #0 - bne _0222CF06 - ldr r0, [r5, #4] - add r0, r0, r4 - bl ov63_0222CF14 -_0222CF06: - ldrh r0, [r5, #8] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _0222CEF2 -_0222CF10: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CEE4 - - thumb_func_start ov63_0222CF14 -ov63_0222CF14: ; 0x0222CF14 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldrb r0, [r5, #0x13] - cmp r0, #0 - beq _0222CF9E - ldr r0, [r5, #0] - mov r1, #5 - bl ov63_0222BF90 - add r6, r0, #0 - ldr r0, [r5, #0] - mov r1, #6 - bl ov63_0222BF90 - add r4, r0, #0 - ldr r0, [r5, #0] - mov r1, #8 - bl ov63_0222BF90 - lsl r0, r0, #0x10 - asr r1, r0, #0x10 - ldrh r0, [r5, #8] - cmp r0, r6 - bne _0222CF50 - ldrh r0, [r5, #0xa] - cmp r0, r4 - bne _0222CF50 - cmp r1, #0 - bne _0222CF66 -_0222CF50: - strh r6, [r5, #8] - strh r4, [r5, #0xa] - ldr r0, [r5, #4] - add r1, r6, #0 - bl ov63_0222D0C4 - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov63_0222D110 -_0222CF66: - add r1, sp, #0 - add r0, r5, #0 - add r1, #2 - add r2, sp, #0 - bl ov63_0222D0E0 - add r3, sp, #0 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r5, #4] - bl ov63_0222B238 - add r1, sp, #0 - mov r0, #0 - ldrsh r0, [r1, r0] - ldrb r1, [r5, #0x12] - bl ov63_0222D034 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, [r5, #4] - bl ov63_0222B278 - ldr r0, [r5, #4] - bl ov63_0222B33C -_0222CF9E: - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CF14 - - thumb_func_start ov63_0222CFA4 -ov63_0222CFA4: ; 0x0222CFA4 - strb r1, [r0, #0x13] - bx lr - thumb_func_end ov63_0222CFA4 - - thumb_func_start ov63_0222CFA8 -ov63_0222CFA8: ; 0x0222CFA8 - ldr r3, _0222CFB0 ; =ov63_0222D110 - mov r1, #1 - ldrh r2, [r0, #0xa] - bx r3 - ; .align 2, 0 -_0222CFB0: .word ov63_0222D110 - thumb_func_end ov63_0222CFA8 - - thumb_func_start ov63_0222CFB4 -ov63_0222CFB4: ; 0x0222CFB4 - ldr r3, _0222CFBC ; =ov63_0222B33C - ldr r0, [r0, #4] - bx r3 - nop -_0222CFBC: .word ov63_0222B33C - thumb_func_end ov63_0222CFB4 - - thumb_func_start ov63_0222CFC0 -ov63_0222CFC0: ; 0x0222CFC0 - push {r4, lr} - add r4, r0, #0 - ldrh r1, [r4, #8] - ldr r0, [r4, #4] - bl ov63_0222D0C4 - add r1, r0, #0 - ldrh r2, [r4, #0xa] - add r0, r4, #0 - bl ov63_0222D110 - add r0, r4, #0 - bl ov63_0222CF14 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222CFC0 - - thumb_func_start ov63_0222CFE0 -ov63_0222CFE0: ; 0x0222CFE0 - push {r0, r1, r2, r3} - push {r3, lr} - add r3, sp, #8 - mov r1, #4 - mov r2, #6 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r0, #4] - bl ov63_0222B238 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222CFE0 - - thumb_func_start ov63_0222CFFC -ov63_0222CFFC: ; 0x0222CFFC - ldr r3, _0222D004 ; =ov63_0222B2B0 - ldr r0, [r0, #4] - bx r3 - nop -_0222D004: .word ov63_0222B2B0 - thumb_func_end ov63_0222CFFC - - thumb_func_start ov63_0222D008 -ov63_0222D008: ; 0x0222D008 - ldr r3, _0222D010 ; =ov63_0222B294 - ldr r0, [r0, #4] - bx r3 - nop -_0222D010: .word ov63_0222B294 - thumb_func_end ov63_0222D008 - - thumb_func_start ov63_0222D014 -ov63_0222D014: ; 0x0222D014 - ldr r3, _0222D01C ; =ov63_0222B284 - ldr r0, [r0, #4] - bx r3 - nop -_0222D01C: .word ov63_0222B284 - thumb_func_end ov63_0222D014 - - thumb_func_start ov63_0222D020 -ov63_0222D020: ; 0x0222D020 - push {r4, lr} - add r2, r1, #0 - add r4, r0, #0 - mov r1, #0 - bl ov63_0222D110 - ldr r0, [r4, #4] - bl ov63_0222B33C - pop {r4, pc} - thumb_func_end ov63_0222D020 - - thumb_func_start ov63_0222D034 -ov63_0222D034: ; 0x0222D034 - cmp r1, #1 - bne _0222D040 - lsl r1, r0, #1 - ldr r0, _0222D048 ; =0x00009C40 - sub r0, r0, r1 - bx lr -_0222D040: - lsl r1, r0, #1 - ldr r0, _0222D04C ; =0x00009C41 - sub r0, r0, r1 - bx lr - ; .align 2, 0 -_0222D048: .word 0x00009C40 -_0222D04C: .word 0x00009C41 - thumb_func_end ov63_0222D034 - - thumb_func_start ov63_0222D050 -ov63_0222D050: ; 0x0222D050 - push {r3, lr} - ldr r0, [r0, #4] - bl ov63_0222B234 - bl sub_02021F48 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D050 - - thumb_func_start ov63_0222D060 -ov63_0222D060: ; 0x0222D060 - push {r0, r1, r2, r3} - push {r3, lr} - add r3, sp, #8 - mov r1, #4 - mov r2, #6 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r0, #4] - bl ov63_0222B2E0 - pop {r3} - pop {r3} - add sp, #0x10 - bx r3 - thumb_func_end ov63_0222D060 - - thumb_func_start ov63_0222D07C -ov63_0222D07C: ; 0x0222D07C - ldr r0, [r0, #4] - cmp r0, #0 - bne _0222D086 - mov r0, #1 - bx lr -_0222D086: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222D07C - - thumb_func_start ov63_0222D08C -ov63_0222D08C: ; 0x0222D08C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrh r0, [r5, #8] - mov r6, #0 - cmp r0, #0 - ble _0222D0BA - add r4, r6, #0 -_0222D09A: - ldr r0, [r5, #4] - add r0, r0, r4 - bl ov63_0222D07C - cmp r0, #1 - bne _0222D0B0 - mov r0, #0x14 - ldr r1, [r5, #4] - mul r0, r6 - add r0, r1, r0 - pop {r4, r5, r6, pc} -_0222D0B0: - ldrh r0, [r5, #8] - add r6, r6, #1 - add r4, #0x14 - cmp r6, r0 - blt _0222D09A -_0222D0BA: - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D08C - - thumb_func_start ov63_0222D0C4 -ov63_0222D0C4: ; 0x0222D0C4 - push {r4, lr} - add r4, r1, #0 - bl ov63_0222B2BC - cmp r0, #2 - bne _0222D0D4 - mov r0, #0 - pop {r4, pc} -_0222D0D4: - ldr r0, _0222D0DC ; =0x0222DCA8 - ldrb r0, [r0, r4] - pop {r4, pc} - nop -_0222D0DC: .word 0x0222DCA8 - thumb_func_end ov63_0222D0C4 - - thumb_func_start ov63_0222D0E0 -ov63_0222D0E0: ; 0x0222D0E0 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r0, [r0, #0] - add r5, r1, #0 - add r4, r2, #0 - bl ov63_0222C0FC - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #4 - ldrsh r0, [r1, r0] - strh r0, [r5] - mov r0, #6 - ldrsh r0, [r1, r0] - strh r0, [r4] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D0E0 - - thumb_func_start ov63_0222D110 -ov63_0222D110: ; 0x0222D110 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - str r2, [sp] - bl ov63_0222B2D4 - add r7, r0, #0 - ldr r0, [r5, #4] - bl ov63_0222B2C4 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldr r0, [r5, #4] - ldr r2, [sp] - add r1, r4, #0 - bl ov63_0222B308 - cmp r6, r4 - beq _0222D15A - ldr r0, _0222D15C ; =0x0222DC9C - ldrb r0, [r0, r4] - cmp r0, #1 - bne _0222D14E - ldrh r0, [r5, #0x10] - cmp r0, r4 - bne _0222D14E - ldrh r1, [r5, #0xe] - ldr r0, [r5, #4] - bl ov63_0222B2C8 -_0222D14E: - ldr r0, _0222D15C ; =0x0222DC9C - ldrb r0, [r0, r6] - cmp r0, #1 - bne _0222D15A - strh r6, [r5, #0x10] - strh r7, [r5, #0xe] -_0222D15A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0222D15C: .word 0x0222DC9C - thumb_func_end ov63_0222D110 - - thumb_func_start ov63_0222D160 -ov63_0222D160: ; 0x0222D160 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - add r0, r1, #0 - bl ov63_0222C0FC - add r3, sp, #0 - strh r0, [r3] - lsr r0, r0, #0x10 - strh r0, [r3, #2] - ldrh r0, [r3] - mov r1, #6 - mov r2, #4 - strh r0, [r3, #4] - ldrh r0, [r3, #2] - strh r0, [r3, #6] - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, r4, #0 - sub r1, #0x60 - sub r2, #0x70 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl ov63_0222D1A8 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D160 - - thumb_func_start ov63_0222D19C -ov63_0222D19C: ; 0x0222D19C - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #1] - strb r1, [r0, #2] - strb r1, [r0, #3] - bx lr - thumb_func_end ov63_0222D19C - - thumb_func_start ov63_0222D1A8 -ov63_0222D1A8: ; 0x0222D1A8 - strh r1, [r0] - strh r2, [r0, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222D1A8 - - thumb_func_start ov63_0222D1B0 -ov63_0222D1B0: ; 0x0222D1B0 - mov r1, #0 - ldrsh r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222D1B0 - - thumb_func_start ov63_0222D1B8 -ov63_0222D1B8: ; 0x0222D1B8 - mov r1, #2 - ldrsh r0, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov63_0222D1B8 - - thumb_func_start ov63_0222D1C0 -ov63_0222D1C0: ; 0x0222D1C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r7, r1, #0 - add r0, r3, #0 - mov r1, #0x1c - add r5, r2, #0 - str r3, [sp, #4] - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x1c - mov r0, #0 -_0222D1DC: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0222D1DC - str r6, [r4, #0] - str r7, [r4, #4] - ldrb r0, [r5] - add r2, r5, #0 - str r0, [r4, #0x10] - ldrb r1, [r5, #1] - str r1, [r4, #0x14] - ldr r0, [r4, #4] - bl ov63_0222D31C - ldr r0, [sp, #4] - add r3, r4, #0 - str r0, [sp] - ldrb r0, [r5, #8] - ldrb r1, [r5, #9] - ldrb r2, [r5, #0xa] - add r3, #0xc - bl sub_02006F6C - str r0, [r4, #8] - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D1C0 - - thumb_func_start ov63_0222D214 -ov63_0222D214: ; 0x0222D214 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D214 - - thumb_func_start ov63_0222D228 -ov63_0222D228: ; 0x0222D228 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r1, #0 - add r6, r0, #0 - add r0, r4, #0 - bl ov63_0222D1B0 - add r5, r0, #0 - add r0, r4, #0 - bl ov63_0222D1B8 - add r4, r0, #0 - ldr r0, [r6, #0x10] - cmp r0, #0 - bne _0222D2A8 - cmp r5, #0 - ble _0222D25C - lsl r0, r5, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0222D26A -_0222D25C: - lsl r0, r5, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0222D26A: - add r7, r0, #0 - cmp r4, #0 - ble _0222D282 - lsl r0, r4, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0222D290 -_0222D282: - lsl r0, r4, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0222D290: - bl sub_020E1740 - str r0, [sp] - add r0, r7, #0 - bl sub_020E1740 - add r2, r0, #0 - ldr r0, [r6, #0] - ldr r1, [sp] - bl sub_0200962C - b _0222D30E -_0222D2A8: - cmp r5, #0 - ble _0222D2BE - lsl r0, r5, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0222D2CC -_0222D2BE: - lsl r0, r5, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0222D2CC: - add r7, r0, #0 - cmp r4, #0 - ble _0222D2E4 - lsl r0, r4, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0222D2F2 -_0222D2E4: - lsl r0, r4, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0222D2F2: - bl sub_020E1740 - str r0, [sp, #4] - add r0, r7, #0 - bl sub_020E1740 - mov r2, #3 - add r3, r0, #0 - lsl r2, r2, #0x12 - ldr r0, [r6, #0] - ldr r1, [sp, #4] - add r2, r3, r2 - bl sub_0200964C -_0222D30E: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov63_0222D378 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222D228 - - thumb_func_start ov63_0222D31C -ov63_0222D31C: ; 0x0222D31C - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - ldr r6, _0222D374 ; =0x0222DCB4 - add r5, r0, #0 - add r4, r1, #0 - ldmia r6!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldrb r1, [r2, #2] - add r0, sp, #0 - strb r1, [r0, #0x11] - ldrb r1, [r2, #3] - strb r1, [r0, #0x12] - ldrb r1, [r2, #4] - strb r1, [r0, #0x13] - ldrb r1, [r2, #5] - strb r1, [r0, #0x14] - ldrb r1, [r2, #6] - strb r1, [r0, #0x15] - mov r1, #0 - strb r1, [r0, #0x16] - ldrb r0, [r2, #7] - lsl r1, r4, #0x18 - lsr r1, r1, #0x18 - str r0, [sp, #0x18] - add r0, r5, #0 - bl sub_02019044 - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - add r2, sp, #0 - mov r3, #0 - bl sub_020183C4 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - nop -_0222D374: .word 0x0222DCB4 - thumb_func_end ov63_0222D31C - - thumb_func_start ov63_0222D378 -ov63_0222D378: ; 0x0222D378 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - asr r0, r1, #2 - lsr r0, r0, #0x1d - add r0, r1, r0 - lsl r0, r0, #0xd - asr r3, r0, #0x10 - asr r0, r2, #2 - lsr r0, r0, #0x1d - add r0, r2, r0 - lsr r4, r1, #0x1f - lsl r6, r1, #0x1d - sub r6, r6, r4 - mov r1, #0x1d - ror r6, r1 - add r4, r4, r6 - lsl r4, r4, #0x10 - asr r6, r4, #0x10 - lsr r4, r2, #0x1f - lsl r2, r2, #0x1d - sub r2, r2, r4 - ror r2, r1 - add r1, r4, r2 - lsl r1, r1, #0x10 - asr r4, r1, #0x10 - lsl r0, r0, #0xd - ldrh r1, [r5, #0x18] - asr r0, r0, #0x10 - cmp r3, r1 - bne _0222D3BC - ldrh r1, [r5, #0x1a] - cmp r0, r1 - beq _0222D3E4 -_0222D3BC: - strh r3, [r5, #0x18] - strh r0, [r5, #0x1a] - neg r0, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - neg r3, r3 - lsl r3, r3, #0x10 - ldr r0, [r5, #4] - ldr r1, [r5, #0x14] - ldr r2, [r5, #0xc] - asr r3, r3, #0x10 - bl ov63_0222D408 - ldr r1, [r5, #0x14] - ldr r0, [r5, #4] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_0201C3C0 -_0222D3E4: - ldr r1, [r5, #0x14] - ldr r0, [r5, #4] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #0 - add r3, r6, #0 - bl sub_0201C63C - ldr r1, [r5, #0x14] - ldr r0, [r5, #4] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - mov r2, #3 - add r3, r4, #0 - bl sub_0201C63C - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov63_0222D378 - - thumb_func_start ov63_0222D408 -ov63_0222D408: ; 0x0222D408 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - str r0, [sp, #0x1c] - add r0, r2, #0 - ldrh r0, [r0] - ldr r4, [sp, #0x50] - add r5, r3, #0 - lsl r0, r0, #0xd - asr r0, r0, #0x10 - str r0, [sp, #0x34] - add r0, r2, #0 - ldrh r0, [r0, #2] - str r1, [sp, #0x20] - str r2, [sp, #0x24] - lsl r0, r0, #0xd - asr r0, r0, #0x10 - str r0, [sp, #0x30] - cmp r5, #0 - bge _0222D438 - neg r0, r5 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0x2c] - b _0222D43C -_0222D438: - mov r0, #0 - str r0, [sp, #0x2c] -_0222D43C: - cmp r4, #0 - bge _0222D44A - neg r0, r4 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp, #0x28] - b _0222D44E -_0222D44A: - mov r0, #0 - str r0, [sp, #0x28] -_0222D44E: - cmp r5, #0 - bgt _0222D454 - mov r5, #0 -_0222D454: - cmp r4, #0 - bgt _0222D45A - mov r4, #0 -_0222D45A: - mov r0, #0x21 - sub r0, r0, r5 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 - mov r0, #0x19 - sub r0, r0, r4 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 - ldr r0, [sp, #0x2c] - add r1, r0, r7 - ldr r0, [sp, #0x34] - cmp r0, r1 - bge _0222D47C - sub r0, r1, r0 - sub r0, r7, r0 - lsl r0, r0, #0x10 - asr r7, r0, #0x10 -_0222D47C: - ldr r0, [sp, #0x28] - add r1, r0, r6 - ldr r0, [sp, #0x30] - cmp r0, r1 - bge _0222D48E - sub r0, r1, r0 - sub r0, r6, r0 - lsl r0, r0, #0x10 - asr r6, r0, #0x10 -_0222D48E: - mov r2, #0 - str r2, [sp] - mov r0, #0x21 - str r0, [sp, #4] - mov r0, #0x19 - ldr r1, [sp, #0x20] - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - lsl r1, r1, #0x18 - ldr r0, [sp, #0x1c] - lsr r1, r1, #0x18 - add r3, r2, #0 - bl sub_02019CB8 - lsl r0, r7, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x20] - add r0, #0xc - str r0, [sp, #0x24] - str r0, [sp, #8] - ldr r0, [sp, #0x2c] - lsl r1, r1, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x28] - lsl r2, r5, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x10] - ldr r0, [sp, #0x34] - lsl r3, r4, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x14] - ldr r0, [sp, #0x30] - lsr r1, r1, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl ov63_0222D4F8 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov63_0222D408 - - thumb_func_start ov63_0222D4F8 -ov63_0222D4F8: ; 0x0222D4F8 - push {r4, r5, r6, r7, lr} - sub sp, #0x54 - str r0, [sp, #0x1c] - str r1, [sp, #0x20] - ldr r0, [sp, #0x70] - str r3, [sp, #0x24] - str r0, [sp, #0x70] - ldr r0, [sp, #0x78] - add r4, r2, #0 - str r0, [sp, #0x78] - ldr r0, [sp, #0x7c] - str r0, [sp, #0x7c] - ldr r0, [sp, #0x80] - str r0, [sp, #0x80] - ldr r0, [sp, #0x7c] - ldr r1, [sp, #0x80] - bl ov63_0222D688 - str r0, [sp, #0x40] - cmp r0, #0 - add r1, sp, #0x58 - bne _0222D550 - ldrb r0, [r1, #0x10] - add r2, r4, #0 - str r0, [sp] - ldrb r0, [r1, #0x14] - str r0, [sp, #4] - ldr r0, [sp, #0x70] - str r0, [sp, #8] - ldrb r0, [r1, #0x1c] - str r0, [sp, #0xc] - ldr r0, [sp, #0x78] - str r0, [sp, #0x10] - ldr r0, [sp, #0x7c] - str r0, [sp, #0x14] - ldr r0, [sp, #0x80] - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x20] - ldr r3, [sp, #0x24] - bl sub_020198E8 - add sp, #0x54 - pop {r4, r5, r6, r7, pc} -_0222D550: - mov r0, #0x14 - ldrsb r0, [r1, r0] - str r0, [sp, #0x48] - cmp r0, #0 - bgt _0222D55C - b _0222D682 -_0222D55C: - mov r0, #0x10 - ldrsb r0, [r1, r0] - str r0, [sp, #0x3c] - mov r0, #0x1c - ldrsb r0, [r1, r0] - str r0, [sp, #0x38] - lsl r0, r4, #0x18 - asr r0, r0, #0x18 - str r0, [sp, #0x34] -_0222D56E: - ldr r0, [sp, #0x78] - lsr r2, r0, #0x1f - lsl r1, r0, #0x1b - sub r1, r1, r2 - mov r0, #0x1b - ror r1, r0 - add r0, r2, r1 - ldr r1, [sp, #0x48] - add r1, r0, r1 - cmp r1, #0x20 - bgt _0222D58E - ldr r1, [sp, #0x48] - str r1, [sp, #0x44] - mov r1, #0 - str r1, [sp, #0x48] - b _0222D5A2 -_0222D58E: - mov r1, #0x20 - sub r1, r1, r0 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - str r1, [sp, #0x44] - ldr r2, [sp, #0x48] - sub r1, r2, r1 - lsl r1, r1, #0x18 - asr r1, r1, #0x18 - str r1, [sp, #0x48] -_0222D5A2: - ldr r1, [sp, #0x78] - ldr r4, [sp, #0x3c] - lsl r1, r1, #0x13 - asr r2, r1, #0x18 - add r1, r4, #0 - ldr r5, [sp, #0x38] - ldr r7, [sp, #0x34] - cmp r1, #0 - ble _0222D662 - lsl r1, r2, #0x18 - lsr r1, r1, #0x18 - str r1, [sp, #0x30] - ldr r1, [sp, #0x44] - lsl r0, r0, #0x18 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - lsr r0, r0, #0x18 - str r1, [sp, #0x2c] - str r0, [sp, #0x4c] -_0222D5C8: - lsr r2, r5, #0x1f - lsl r1, r5, #0x1b - sub r1, r1, r2 - mov r0, #0x1b - ror r1, r0 - add r0, r2, r1 - str r0, [sp, #0x28] - add r0, r0, r4 - cmp r0, #0x20 - bgt _0222D5E2 - add r6, r4, #0 - mov r4, #0 - b _0222D5F2 -_0222D5E2: - ldr r0, [sp, #0x28] - mov r1, #0x20 - sub r0, r1, r0 - lsl r0, r0, #0x18 - asr r6, r0, #0x18 - sub r0, r4, r6 - lsl r0, r0, #0x18 - asr r4, r0, #0x18 -_0222D5F2: - ldr r0, [sp, #0x7c] - asr r1, r5, #4 - str r0, [sp] - ldr r0, [sp, #0x80] - lsr r1, r1, #0x1b - add r1, r5, r1 - str r0, [sp, #4] - add r0, sp, #0x50 - str r0, [sp, #8] - lsl r1, r1, #0x13 - asr r1, r1, #0x18 - lsl r1, r1, #0x18 - ldr r0, [sp, #0x70] - ldr r2, [sp, #0x30] - ldr r3, [sp, #0x40] - lsr r1, r1, #0x18 - bl ov63_0222D6BC - lsl r1, r6, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - ldr r1, [sp, #0x2c] - lsl r2, r7, #0x18 - str r1, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x28] - add r1, sp, #0x50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x4c] - lsr r2, r2, #0x18 - str r0, [sp, #0x10] - mov r0, #0 - ldrsh r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x14] - mov r0, #2 - ldrsh r0, [r1, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x18] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x20] - ldr r3, [sp, #0x24] - bl sub_020198E8 - add r0, r5, r6 - lsl r0, r0, #0x18 - asr r5, r0, #0x18 - add r0, r7, r6 - lsl r0, r0, #0x18 - asr r7, r0, #0x18 - cmp r4, #0 - bgt _0222D5C8 -_0222D662: - ldr r1, [sp, #0x78] - ldr r0, [sp, #0x44] - add r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x78] - ldr r1, [sp, #0x24] - ldr r0, [sp, #0x44] - add r0, r1, r0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x24] - ldr r0, [sp, #0x48] - cmp r0, #0 - ble _0222D682 - b _0222D56E -_0222D682: - add sp, #0x54 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D4F8 - - thumb_func_start ov63_0222D688 -ov63_0222D688: ; 0x0222D688 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0x40 - bls _0222D696 - bl sub_02022974 -_0222D696: - cmp r4, #0x40 - bls _0222D69E - bl sub_02022974 -_0222D69E: - cmp r5, #0x20 - bhi _0222D6AE - cmp r4, #0x20 - bhi _0222D6AA - mov r0, #0 - pop {r3, r4, r5, pc} -_0222D6AA: - mov r0, #2 - pop {r3, r4, r5, pc} -_0222D6AE: - cmp r4, #0x20 - bhi _0222D6B6 - mov r0, #1 - pop {r3, r4, r5, pc} -_0222D6B6: - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D688 - - thumb_func_start ov63_0222D6BC -ov63_0222D6BC: ; 0x0222D6BC - push {r4, r5, r6, lr} - add r5, r3, #0 - add r6, r2, #0 - ldr r4, [sp, #0x10] - ldr r3, [sp, #0x14] - ldr r2, [sp, #0x18] - cmp r5, #3 - bhi _0222D770 - add r5, r5, r5 - add r5, pc - ldrh r5, [r5, #6] - lsl r5, r5, #0x10 - asr r5, r5, #0x10 - add pc, r5 -_0222D6D8: ; jump table - .short _0222D6E0 - _0222D6D8 - 2 ; case 0 - .short _0222D6E6 - _0222D6D8 - 2 ; case 1 - .short _0222D704 - _0222D6D8 - 2 ; case 2 - .short _0222D722 - _0222D6D8 - 2 ; case 3 -_0222D6E0: - strh r4, [r2] - strh r3, [r2, #2] - pop {r4, r5, r6, pc} -_0222D6E6: - add r5, r1, #1 - lsl r5, r5, #5 - cmp r5, r4 - bgt _0222D6F2 - mov r4, #0x20 - b _0222D6F6 -_0222D6F2: - lsl r5, r1, #5 - sub r4, r4, r5 -_0222D6F6: - strh r4, [r2] - strh r3, [r2, #2] - lsl r2, r3, #0x16 - asr r2, r2, #0x10 - mul r2, r1 - add r0, r0, r2 - pop {r4, r5, r6, pc} -_0222D704: - add r1, r6, #1 - lsl r1, r1, #5 - strh r4, [r2] - cmp r1, r3 - bgt _0222D712 - mov r1, #0x20 - b _0222D716 -_0222D712: - lsl r1, r6, #5 - sub r1, r3, r1 -_0222D716: - strh r1, [r2, #2] - lsl r1, r4, #0x16 - asr r1, r1, #0x10 - mul r1, r6 - add r0, r0, r1 - pop {r4, r5, r6, pc} -_0222D722: - add r5, r1, #1 - lsl r5, r5, #5 - cmp r5, r4 - bgt _0222D72E - mov r5, #0x20 - b _0222D732 -_0222D72E: - lsl r5, r1, #5 - sub r5, r4, r5 -_0222D732: - strh r5, [r2] - add r5, r6, #1 - lsl r5, r5, #5 - cmp r5, r3 - bgt _0222D740 - mov r5, #0x20 - b _0222D744 -_0222D740: - lsl r5, r6, #5 - sub r5, r3, r5 -_0222D744: - strh r5, [r2, #2] - cmp r6, #0 - bne _0222D75C - mov r2, #0 - cmp r1, #0 - beq _0222D76C - mov r1, #2 - lsl r1, r1, #0xa - add r1, r2, r1 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 - b _0222D76C -_0222D75C: - lsl r2, r4, #0x16 - lsr r2, r2, #0x10 - cmp r1, #0 - beq _0222D76C - lsl r1, r3, #6 - add r1, r2, r1 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 -_0222D76C: - add r0, r0, r2 - pop {r4, r5, r6, pc} -_0222D770: - bl sub_02022974 - bl sub_02022974 - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222D6BC - - thumb_func_start ov63_0222D77C -ov63_0222D77C: ; 0x0222D77C - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _0222D792 - bl sub_02022974 -_0222D792: - add r1, r5, #1 - str r1, [r4, #4] - add r0, r6, #0 - lsl r1, r1, #3 - bl sub_02018144 - str r0, [r4, #0] - ldr r2, [r4, #4] - mov r1, #0 - lsl r2, r2, #3 - bl sub_020D5124 - mov r0, #0 - strh r0, [r4, #8] - strh r0, [r4, #0xa] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222D77C - - thumb_func_start ov63_0222D7B4 -ov63_0222D7B4: ; 0x0222D7B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D7B4 - - thumb_func_start ov63_0222D7C8 -ov63_0222D7C8: ; 0x0222D7C8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldrh r0, [r5, #0xa] - add r4, r1, #0 - ldr r1, [r5, #4] - add r0, r0, #1 - bl sub_020E2178 - ldrh r0, [r5, #8] - cmp r0, r1 - bne _0222D7E8 - add r0, r5, #0 - add r1, sp, #0 - bl ov63_0222D810 -_0222D7E8: - ldrh r0, [r5, #0xa] - ldr r3, [r5, #0] - lsl r2, r0, #3 - ldrh r0, [r4] - add r1, r3, r2 - strh r0, [r3, r2] - ldrh r0, [r4, #2] - strh r0, [r1, #2] - ldrh r0, [r4, #4] - strh r0, [r1, #4] - ldrh r0, [r4, #6] - strh r0, [r1, #6] - ldrh r0, [r5, #0xa] - ldr r1, [r5, #4] - add r0, r0, #1 - bl sub_020E2178 - strh r1, [r5, #0xa] - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222D7C8 - - thumb_func_start ov63_0222D810 -ov63_0222D810: ; 0x0222D810 - push {r4, lr} - add r4, r0, #0 - ldrh r2, [r4, #8] - ldrh r0, [r4, #0xa] - cmp r0, r2 - bne _0222D820 - mov r0, #0 - pop {r4, pc} -_0222D820: - ldr r3, [r4, #0] - lsl r0, r2, #3 - add r2, r3, r0 - ldrh r0, [r3, r0] - strh r0, [r1] - ldrh r0, [r2, #2] - strh r0, [r1, #2] - ldrh r0, [r2, #4] - strh r0, [r1, #4] - ldrh r0, [r2, #6] - strh r0, [r1, #6] - ldrh r0, [r4, #8] - ldr r1, [r4, #4] - add r0, r0, #1 - bl sub_020E2178 - strh r1, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D810 - - thumb_func_start ov63_0222D848 -ov63_0222D848: ; 0x0222D848 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - bne _0222D85E - bl sub_02022974 -_0222D85E: - add r1, r5, #1 - str r1, [r4, #4] - add r0, r6, #0 - lsl r1, r1, #2 - bl sub_02018144 - str r0, [r4, #0] - ldr r2, [r4, #4] - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - mov r0, #0 - strh r0, [r4, #8] - strh r0, [r4, #0xa] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov63_0222D848 - - thumb_func_start ov63_0222D880 -ov63_0222D880: ; 0x0222D880 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D880 - - thumb_func_start ov63_0222D894 -ov63_0222D894: ; 0x0222D894 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrh r0, [r5, #0xa] - add r4, r1, #0 - ldr r1, [r5, #4] - add r0, r0, #1 - bl sub_020E2178 - ldrh r0, [r5, #8] - cmp r0, r1 - bne _0222D8B2 - add r0, r5, #0 - add r1, sp, #0 - bl ov63_0222D8D0 -_0222D8B2: - ldrh r0, [r5, #0xa] - ldr r3, [r5, #0] - lsl r2, r0, #2 - ldrh r0, [r4] - add r1, r3, r2 - strh r0, [r3, r2] - ldrh r0, [r4, #2] - strh r0, [r1, #2] - ldrh r0, [r5, #0xa] - ldr r1, [r5, #4] - add r0, r0, #1 - bl sub_020E2178 - strh r1, [r5, #0xa] - pop {r3, r4, r5, pc} - thumb_func_end ov63_0222D894 - - thumb_func_start ov63_0222D8D0 -ov63_0222D8D0: ; 0x0222D8D0 - push {r4, lr} - add r4, r0, #0 - ldrh r2, [r4, #8] - ldrh r0, [r4, #0xa] - cmp r0, r2 - bne _0222D8E0 - mov r0, #0 - pop {r4, pc} -_0222D8E0: - ldr r3, [r4, #0] - lsl r0, r2, #2 - add r2, r3, r0 - ldrh r0, [r3, r0] - strh r0, [r1] - ldrh r0, [r2, #2] - strh r0, [r1, #2] - ldrh r0, [r4, #8] - ldr r1, [r4, #4] - add r0, r0, #1 - bl sub_020E2178 - strh r1, [r4, #8] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov63_0222D8D0 - ; 0x0222D900 - - - .rodata - .incbin "incbin/overlay63_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay7.s b/asm/overlay7.s deleted file mode 100644 index a504a1aba..000000000 --- a/asm/overlay7.s +++ /dev/null @@ -1,10384 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov7_02249960 -ov7_02249960: ; 0x02249960 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _02249A0C ; =0x0224F5A0 - add r4, r1, #0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - bne _02249982 - ldr r0, _02249A0C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0201D730 -_02249982: - cmp r4, #0 - beq _022499A4 - ldr r0, _02249A0C ; =0x0224F5A0 - add r1, r5, #0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0x10] - bl sub_0200B1B8 - ldr r0, _02249A0C ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x58] - ldr r1, [r2, #0x14] - ldr r2, [r2, #0x10] - bl sub_0200C388 - b _022499B2 -_022499A4: - ldr r0, _02249A0C ; =0x0224F5A0 - add r1, r5, #0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0x14] - bl sub_0200B1B8 -_022499B2: - ldr r0, _02249A0C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x40 - bl sub_0201A7CC - cmp r0, #0 - bne _022499D0 - ldr r0, _02249A0C ; =0x0224F5A0 - mov r2, #3 - ldr r1, [r0, #0] - ldr r0, [r1, #0x68] - add r1, #0x40 - ldr r0, [r0, #8] - bl sub_0205D8F4 -_022499D0: - ldr r0, _02249A0C ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x68] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r1, r0, #0 - ldr r0, _02249A0C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x40 - bl sub_0205D944 - ldr r0, _02249A0C ; =0x0224F5A0 - ldr r4, [r0, #0] - ldr r0, [r4, #0x68] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r2, r0, #0 - add r0, r4, #0 - ldr r1, [r4, #0x14] - add r0, #0x40 - mov r3, #1 - bl sub_0205D994 - ldr r1, _02249A0C ; =0x0224F5A0 - ldr r1, [r1, #0] - add r1, #0x94 - strb r0, [r1] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02249A0C: .word 0x0224F5A0 - thumb_func_end ov7_02249960 - - thumb_func_start ov7_02249A10 -ov7_02249A10: ; 0x02249A10 - push {r0, r1, r2, r3} - push {r3, r4, lr} - sub sp, #0x34 - ldr r0, _02249AAC ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x20 - bl sub_0201A7CC - cmp r0, #0 - bne _02249A54 - ldr r0, _02249AAC ; =0x0224F5A0 - add r3, sp, #0x60 - ldr r1, [r0, #0] - add r0, sp, #0x64 - ldrb r0, [r0] - ldrb r3, [r3] - mov r2, #3 - str r0, [sp] - add r0, sp, #0x68 - ldrb r0, [r0] - str r0, [sp, #4] - add r0, sp, #0x6c - ldrb r0, [r0] - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - add r0, sp, #0x40 - ldrh r0, [r0, #0x30] - str r0, [sp, #0x10] - ldr r0, [r1, #0x68] - add r1, #0x20 - ldr r0, [r0, #8] - bl sub_0201A7E8 -_02249A54: - ldr r0, _02249AAC ; =0x0224F5A0 - ldr r2, _02249AB0 ; =0x000003D9 - ldr r0, [r0, #0] - mov r1, #1 - add r0, #0x20 - mov r3, #0xb - bl sub_0200DC48 - add r4, sp, #0x40 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, _02249AAC ; =0x0224F5A0 - mov r3, #4 - ldr r1, [r0, #0] - ldr r0, [r1, #0x64] - add r1, #0x20 - str r1, [sp, #0x20] - str r0, [sp, #0x14] - mov r1, #0 - add r0, r2, #0 - add r2, r1, #0 - bl sub_0200112C - ldr r1, _02249AAC ; =0x0224F5A0 - ldr r2, [r1, #0] - str r0, [r2, #0x5c] - ldr r0, [r1, #0] - add r0, #0x20 - bl sub_0201A954 - add sp, #0x34 - pop {r3, r4} - pop {r3} - add sp, #0x10 - bx r3 - nop -_02249AAC: .word 0x0224F5A0 -_02249AB0: .word 0x000003D9 - thumb_func_end ov7_02249A10 - - thumb_func_start ov7_02249AB4 -ov7_02249AB4: ; 0x02249AB4 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, _02249B90 ; =0x0224F5A0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02249AC4 - bl sub_02022974 -_02249AC4: - mov r0, #4 - mov r1, #0x9c - bl sub_02018144 - ldr r1, _02249B90 ; =0x0224F5A0 - mov r2, #0x9c - str r0, [r1, #0] - mov r1, #0 - bl sub_020C4CF4 - ldr r0, _02249B90 ; =0x0224F5A0 - mov r2, #0 - ldr r1, [r0, #0] - mov r3, #4 - add r1, #0x88 - str r2, [r1, #0] - ldr r1, [r0, #0] - str r4, [r1, #0x68] - ldr r0, [r0, #0] - mov r1, #0x1a - add r0, #0x97 - strb r2, [r0] - ldr r2, _02249B94 ; =0x00000161 - mov r0, #1 - bl sub_0200B144 - ldr r1, _02249B90 ; =0x0224F5A0 - ldr r2, [r1, #0] - str r0, [r2, #0x74] - ldr r0, [r1, #0] - ldr r0, [r0, #0x68] - bl sub_0203D174 - bl sub_02025E38 - ldr r1, _02249B90 ; =0x0224F5A0 - ldr r1, [r1, #0] - str r0, [r1, #0x78] - mov r0, #4 - bl sub_02025E6C - ldr r1, _02249B90 ; =0x0224F5A0 - ldr r2, [r1, #0] - str r0, [r2, #0x7c] - ldr r0, [r1, #0] - add r0, #0x20 - bl sub_0201A7A0 - ldr r0, _02249B90 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201A7A0 - ldr r0, _02249B90 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x40 - bl sub_0201A7A0 - mov r0, #4 - bl sub_0200B358 - ldr r1, _02249B90 ; =0x0224F5A0 - ldr r1, [r1, #0] - str r0, [r1, #0x50] - mov r0, #4 - bl sub_0200B358 - ldr r1, _02249B90 ; =0x0224F5A0 - ldr r1, [r1, #0] - str r0, [r1, #0x54] - mov r0, #4 - bl sub_0200B358 - ldr r1, _02249B90 ; =0x0224F5A0 - ldr r2, [r1, #0] - str r0, [r2, #0x58] - ldr r0, [r1, #0] - mov r2, #0 - add r0, #0x98 - strb r2, [r0] - add r5, r2, #0 -_02249B66: - ldr r0, [r1, #0] - add r0, r0, r2 - add r0, #0x80 - add r2, r2, #1 - strb r5, [r0] - cmp r2, #8 - blt _02249B66 - ldr r6, _02249B90 ; =0x0224F5A0 - add r4, r5, #0 - mov r7, #0x8c -_02249B7A: - add r0, r7, #0 - mov r1, #4 - bl sub_02023790 - ldr r1, [r6, #0] - add r5, r5, #1 - str r0, [r1, r4] - add r4, r4, #4 - cmp r5, #8 - blt _02249B7A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249B90: .word 0x0224F5A0 -_02249B94: .word 0x00000161 - thumb_func_end ov7_02249AB4 - - thumb_func_start ov7_02249B98 -ov7_02249B98: ; 0x02249B98 - push {r4, r5, r6, lr} - mov r4, #0 - ldr r6, _02249C28 ; =0x0224F5A0 - add r5, r4, #0 -_02249BA0: - ldr r0, [r6, #0] - ldr r0, [r0, r5] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _02249BA0 - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x7c] - bl sub_020181C4 - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x50] - cmp r0, #0 - beq _02249BD0 - bl sub_0200B3F0 - ldr r0, _02249C28 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - str r1, [r0, #0x50] -_02249BD0: - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x54] - cmp r0, #0 - beq _02249BE6 - bl sub_0200B3F0 - ldr r0, _02249C28 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - str r1, [r0, #0x54] -_02249BE6: - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x58] - cmp r0, #0 - beq _02249BFC - bl sub_0200B3F0 - ldr r0, _02249C28 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - str r1, [r0, #0x58] -_02249BFC: - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x74] - bl sub_0200B190 - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r1, [r0, #0x4c] - cmp r1, #0 - beq _02249C16 - add r0, #0x40 - bl sub_0201A8FC -_02249C16: - ldr r0, _02249C28 ; =0x0224F5A0 - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, _02249C28 ; =0x0224F5A0 - mov r1, #0 - str r1, [r0, #0] - pop {r4, r5, r6, pc} - nop -_02249C28: .word 0x0224F5A0 - thumb_func_end ov7_02249B98 - - thumb_func_start ov7_02249C2C -ov7_02249C2C: ; 0x02249C2C - push {r4, lr} - add r4, r0, #0 - bl ov7_0224B3FC - add r2, r0, #0 - ldr r0, [r4, #0x68] - add r4, #0x91 - ldrb r1, [r4] - bl sub_02059748 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_02249C2C - - thumb_func_start ov7_02249C44 -ov7_02249C44: ; 0x02249C44 - push {r3, lr} - ldr r0, _02249C5C ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x98 - strb r1, [r0] - cmp r2, #0 - bne _02249C5A - ldr r0, _02249C60 ; =0x000005DC - bl sub_02005748 -_02249C5A: - pop {r3, pc} - ; .align 2, 0 -_02249C5C: .word 0x0224F5A0 -_02249C60: .word 0x000005DC - thumb_func_end ov7_02249C44 - - thumb_func_start ov7_02249C64 -ov7_02249C64: ; 0x02249C64 - push {r3, r4, r5, r6, r7, lr} - mov r1, #3 - add r5, r0, #0 - mov r4, #0 - bl sub_02001504 - cmp r0, #0 - bls _02249C92 - add r6, r4, #0 - mov r7, #3 -_02249C78: - lsl r2, r4, #0x18 - add r0, r5, #0 - add r1, r6, #0 - lsr r2, r2, #0x18 - bl ov7_02249C94 - add r0, r5, #0 - add r1, r7, #0 - add r4, r4, #1 - bl sub_02001504 - cmp r4, r0 - blo _02249C78 -_02249C92: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov7_02249C64 - - thumb_func_start ov7_02249C94 -ov7_02249C94: ; 0x02249C94 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r2, #0 - bl sub_02033808 - add r4, r0, #0 - mov r2, #0 - add r0, sp, #0xc - strh r2, [r0] - ldr r0, _02249E08 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x5c] - cmp r0, #0 - beq _02249CB6 - add r1, sp, #0xc - bl sub_020014DC -_02249CB6: - add r0, sp, #0xc - ldrh r1, [r0] - add r1, r1, r5 - strh r1, [r0] - ldr r0, _02249E08 ; =0x0224F5A0 - lsl r5, r5, #4 - ldr r0, [r0, #0] - add r0, #0x20 - bl sub_0201C294 - lsl r0, r0, #3 - sub r0, #8 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _02249E08 ; =0x0224F5A0 - lsl r3, r5, #0x10 - ldr r0, [r0, #0] - mov r1, #0xf - add r0, #0x20 - mov r2, #8 - lsr r3, r3, #0x10 - bl sub_0201AE78 - add r0, sp, #0xc - ldrh r2, [r0] - cmp r2, r4 - bge _02249DB8 - ldr r1, _02249E08 ; =0x0224F5A0 - add r0, r2, #0 - ldr r1, [r1, #0] - ldr r1, [r1, #0x7c] - bl sub_020339AC - mov r3, #2 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02249E08 ; =0x0224F5A0 - add r2, sp, #0xc - ldr r0, [r0, #0] - ldrh r2, [r2] - ldr r0, [r0, #0x50] - mov r1, #0 - add r2, r2, #1 - bl sub_0200B60C - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #1 - ldr r2, [r0, #0] - ldr r0, [r2, #0x50] - ldr r2, [r2, #0x7c] - bl sub_0200B498 - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0x3f - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #4] - bl sub_0200B1B8 - ldr r0, _02249E08 ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x50] - ldmia r2!, {r1, r2} - bl sub_0200C388 - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0 - ldr r2, [r0, #0] - mov r0, #0xff - str r5, [sp] - str r0, [sp, #4] - add r0, r2, #0 - str r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0x20 - mov r3, #8 - bl sub_0201D738 - ldr r0, _02249E08 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x7c] - bl sub_02025F20 - add r2, r0, #0 - mov r1, #2 - lsl r2, r2, #0x10 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02249E08 ; =0x0224F5A0 - lsr r2, r2, #0x10 - ldr r0, [r0, #0] - mov r3, #5 - ldr r0, [r0, #0x50] - bl sub_0200B60C - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0x41 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0xc] - bl sub_0200B1B8 - ldr r0, _02249E08 ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x50] - ldr r1, [r2, #8] - ldr r2, [r2, #0xc] - bl sub_0200C388 - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0 - ldr r2, [r0, #0] - mov r0, #0xff - str r5, [sp] - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - ldr r2, [r2, #8] - add r0, #0x20 - mov r3, #0x58 - bl sub_0201D738 - add sp, #0x10 - pop {r3, r4, r5, pc} -_02249DB8: - mov r3, #2 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - add r2, r2, #1 - ldr r0, [r0, #0x50] - bl sub_0200B60C - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0x40 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #4] - bl sub_0200B1B8 - ldr r0, _02249E08 ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x50] - ldmia r2!, {r1, r2} - bl sub_0200C388 - ldr r0, _02249E08 ; =0x0224F5A0 - mov r1, #0 - ldr r2, [r0, #0] - mov r0, #0xff - str r5, [sp] - str r0, [sp, #4] - add r0, r2, #0 - str r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0x20 - mov r3, #8 - bl sub_0201D738 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_02249E08: .word 0x0224F5A0 - thumb_func_end ov7_02249C94 - - thumb_func_start ov7_02249E0C -ov7_02249E0C: ; 0x02249E0C - push {r4, lr} - sub sp, #0x98 - add r4, r0, #0 - ldr r0, _02249ECC ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201A7CC - cmp r0, #0 - bne _02249E46 - ldr r0, _02249ECC ; =0x0224F5A0 - mov r2, #3 - ldr r1, [r0, #0] - mov r0, #2 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xc9 - str r0, [sp, #0x10] - ldr r0, [r1, #0x68] - add r1, #0x30 - ldr r0, [r0, #8] - mov r3, #0x17 - bl sub_0201A7E8 -_02249E46: - ldr r0, _02249ECC ; =0x0224F5A0 - ldr r2, _02249ED0 ; =0x000003D9 - ldr r0, [r0, #0] - mov r1, #1 - add r0, #0x30 - mov r3, #0xb - bl sub_0200DC48 - ldr r0, _02249ECC ; =0x0224F5A0 - mov r1, #0xf - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _02249ECC ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201A954 - add r0, r4, #0 - mov r1, #1 - add r0, #0x97 - strb r1, [r0] - ldr r0, _02249ED4 ; =ov7_0224A718 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - ldr r0, _02249ECC ; =0x0224F5A0 - ldr r0, [r0, #0] - bl ov7_02249EE0 - ldr r4, _02249ED8 ; =0x0224EF64 - add r3, sp, #0x14 - mov r2, #0x10 -_02249E8C: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _02249E8C - ldr r0, [r4, #0] - str r0, [r3, #0] - ldr r0, _02249ECC ; =0x0224F5A0 - ldr r1, [r0, #0] - add r0, r1, #0 - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #8 - bne _02249EB4 - add r1, #0x92 - ldrb r0, [r1] - mov r1, #0 - add r0, #0x67 - bl ov7_02249960 - b _02249EC0 -_02249EB4: - lsl r1, r0, #2 - add r0, sp, #0x14 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 -_02249EC0: - ldr r0, _02249EDC ; =ov7_02249F54 - bl ov7_0224A530 - add sp, #0x98 - pop {r4, pc} - nop -_02249ECC: .word 0x0224F5A0 -_02249ED0: .word 0x000003D9 -_02249ED4: .word ov7_0224A718 -_02249ED8: .word 0x0224EF64 -_02249EDC: .word ov7_02249F54 - thumb_func_end ov7_02249E0C - - thumb_func_start ov7_02249EE0 -ov7_02249EE0: ; 0x02249EE0 - push {lr} - sub sp, #0xc - ldr r0, _02249F50 ; =0x0224F5A0 - mov r1, #0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x54] - ldr r2, [r2, #0x78] - bl sub_0200B498 - ldr r0, _02249F50 ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x78] - bl sub_02025F20 - add r2, r0, #0 - mov r0, #2 - str r0, [sp] - mov r1, #1 - lsl r2, r2, #0x10 - ldr r0, _02249F50 ; =0x0224F5A0 - str r1, [sp, #4] - ldr r0, [r0, #0] - lsr r2, r2, #0x10 - ldr r0, [r0, #0x54] - mov r3, #5 - bl sub_0200B60C - ldr r0, _02249F50 ; =0x0224F5A0 - mov r1, #0x3e - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0x18] - bl sub_0200B1B8 - ldr r0, _02249F50 ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x54] - ldr r1, [r2, #0x1c] - ldr r2, [r2, #0x18] - bl sub_0200C388 - ldr r0, _02249F50 ; =0x0224F5A0 - mov r3, #2 - ldr r2, [r0, #0] - mov r1, #0 - str r3, [sp] - str r1, [sp, #4] - add r0, r2, #0 - str r1, [sp, #8] - ldr r2, [r2, #0x1c] - add r0, #0x30 - bl sub_0201D738 - add sp, #0xc - pop {pc} - nop -_02249F50: .word 0x0224F5A0 - thumb_func_end ov7_02249EE0 - - thumb_func_start ov7_02249F54 -ov7_02249F54: ; 0x02249F54 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - ldr r0, _02249FF0 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _02249FEC - mov r0, #0x10 - mov r1, #4 - bl sub_02013A04 - ldr r4, _02249FF0 ; =0x0224F5A0 - mov r5, #0 - ldr r1, [r4, #0] - mov r6, #2 - str r0, [r1, #0x64] - mov r7, #1 -_02249F7C: - str r6, [sp] - str r7, [sp, #4] - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0x50] - add r2, r5, #1 - add r3, r6, #0 - bl sub_0200B60C - ldr r2, [r4, #0] - mov r1, #0x40 - ldr r0, [r2, #0x74] - ldr r2, [r2, #4] - bl sub_0200B1B8 - ldr r2, [r4, #0] - ldr r0, [r2, #0x50] - ldmia r2!, {r1, r2} - bl sub_0200C388 - ldr r1, [r4, #0] - mov r2, #0 - ldr r0, [r1, #0x64] - ldr r1, [r1, #0] - bl sub_02013A6C - add r5, r5, #1 - cmp r5, #0x10 - blt _02249F7C - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #2 - str r0, [sp, #0x14] - mov r0, #0x14 - str r0, [sp, #0x18] - mov r0, #0xa - mov r4, sp - str r0, [sp, #0x1c] - sub r4, #0x10 - ldr r3, _02249FF4 ; =0x0224ED34 - str r1, [sp, #0x20] - add r2, r4, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r4!, {r0, r1, r2, r3} - bl ov7_02249A10 - ldr r0, _02249FF8 ; =ov7_02249FFC - bl ov7_0224A530 -_02249FEC: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249FF0: .word 0x0224F5A0 -_02249FF4: .word 0x0224ED34 -_02249FF8: .word ov7_02249FFC - thumb_func_end ov7_02249F54 - - thumb_func_start ov7_02249FFC -ov7_02249FFC: ; 0x02249FFC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov7_02249EE0 - bl sub_020360F0 - cmp r0, #0 - beq _0224A028 - ldr r0, _0224A0BC ; =0x0224F5A0 - mov r1, #3 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] - bl ov7_0224A528 - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - pop {r3, r4, r5, pc} -_0224A028: - bl sub_02033870 - cmp r0, #0 - beq _0224A036 - mov r0, #0 - mvn r0, r0 - b _0224A040 -_0224A036: - ldr r0, _0224A0BC ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x5c] - bl sub_02001288 -_0224A040: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0224A056 - add r1, r1, #1 - cmp r0, r1 - bne _0224A074 - add r0, r4, #0 - bl ov7_0224A0C8 - pop {r3, r4, r5, pc} -_0224A056: - ldr r0, _0224A0C0 ; =0x000005DC - bl sub_02005748 - ldr r0, _0224A0BC ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] - bl ov7_0224A528 - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - pop {r3, r4, r5, pc} -_0224A074: - ldr r0, _0224A0C0 ; =0x000005DC - bl sub_02005748 - add r1, r4, #0 - ldr r0, [r4, #0x5c] - add r1, #0x8e - bl sub_020014D0 - bl sub_02033808 - add r1, r4, #0 - add r1, #0x8e - ldrh r1, [r1] - cmp r0, r1 - ble _0224A0BA - add r0, r4, #0 - bl ov7_0224A0C8 - add r0, r4, #0 - add r0, #0x8e - ldrh r0, [r0] - bl sub_0203383C - add r1, r4, #0 - add r1, #0x8e - add r4, #0x8e - strh r0, [r1] - ldrh r0, [r4] - bl sub_02059788 - bl sub_020365D0 - ldr r0, _0224A0C4 ; =ov7_0224A128 - bl ov7_0224A530 -_0224A0BA: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224A0BC: .word 0x0224F5A0 -_0224A0C0: .word 0x000005DC -_0224A0C4: .word ov7_0224A128 - thumb_func_end ov7_02249FFC - - thumb_func_start ov7_0224A0C8 -ov7_0224A0C8: ; 0x0224A0C8 - push {r3, lr} - sub sp, #8 - bl sub_02033870 - cmp r0, #0 - bne _0224A0E0 - ldr r0, _0224A124 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x98 - ldrb r0, [r0] - cmp r0, #0 - beq _0224A11E -_0224A0E0: - ldr r0, _0224A124 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - add r0, #0x98 - strb r1, [r0] - bl sub_02033884 - mov r0, #0xc - str r0, [sp] - mov r0, #0x50 - str r0, [sp, #4] - ldr r0, _0224A124 ; =0x0224F5A0 - mov r1, #0xf - ldr r0, [r0, #0] - mov r2, #8 - add r0, #0x20 - mov r3, #0 - bl sub_0201AE78 - ldr r0, _0224A124 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - add r2, r1, #0 - ldr r0, [r0, #0x5c] - bl ov7_02249C64 - ldr r0, _0224A124 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x20 - bl sub_0201A954 -_0224A11E: - add sp, #8 - pop {r3, pc} - nop -_0224A124: .word 0x0224F5A0 - thumb_func_end ov7_0224A0C8 - - thumb_func_start ov7_0224A128 -ov7_0224A128: ; 0x0224A128 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - bl sub_020360F0 - cmp r0, #0 - beq _0224A152 - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - mov r0, #0 - add r1, r0, #0 - bl ov7_02249960 - add r0, r4, #0 - bl ov7_0224B348 - add sp, #0xc - pop {r4, r5, pc} -_0224A152: - bl sub_0203608C - bl sub_02032EE8 - cmp r0, #0 - beq _0224A238 - bl sub_020365D0 - ldr r1, _0224A23C ; =0x0224F5A0 - add r0, r4, #0 - add r0, #0x8e - ldr r1, [r1, #0] - ldrh r0, [r0] - ldr r1, [r1, #0x7c] - bl sub_020339AC - ldr r2, _0224A23C ; =0x0224F5A0 - ldr r0, [r4, #0x58] - ldr r2, [r2, #0] - mov r1, #1 - ldr r2, [r2, #0x7c] - bl sub_0200B498 - bl ov7_0224B3D4 - cmp r0, #2 - bgt _0224A192 - mov r0, #1 - add r1, r0, #0 - bl ov7_02249960 - b _0224A232 -_0224A192: - ldr r0, _0224A23C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224A1AE - ldr r0, _0224A23C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0201D730 -_0224A1AE: - ldr r0, _0224A23C ; =0x0224F5A0 - mov r1, #2 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0x10] - bl sub_0200B1B8 - ldr r0, _0224A23C ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x58] - ldr r1, [r2, #0x14] - ldr r2, [r2, #0x10] - bl sub_0200C388 - ldr r0, _0224A23C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x40 - bl sub_0201A7CC - cmp r0, #0 - bne _0224A1E8 - ldr r0, _0224A23C ; =0x0224F5A0 - mov r2, #3 - ldr r1, [r0, #0] - ldr r0, [r1, #0x68] - add r1, #0x40 - ldr r0, [r0, #8] - bl sub_0205D8F4 -_0224A1E8: - ldr r0, _0224A23C ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x68] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r1, r0, #0 - ldr r0, _0224A23C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x40 - bl sub_0205D944 - mov r0, #1 - bl sub_02002AC8 - mov r0, #0 - bl sub_02002AE4 - mov r0, #0 - bl sub_02002B20 - ldr r0, _0224A23C ; =0x0224F5A0 - mov r3, #0 - ldr r2, [r0, #0] - mov r1, #1 - str r3, [sp] - str r1, [sp, #4] - add r0, r2, #0 - str r3, [sp, #8] - ldr r2, [r2, #0x14] - add r0, #0x40 - bl sub_0201D738 - ldr r1, _0224A23C ; =0x0224F5A0 - ldr r1, [r1, #0] - add r1, #0x94 - strb r0, [r1] -_0224A232: - ldr r0, _0224A240 ; =ov7_0224A34C - bl ov7_0224A530 -_0224A238: - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224A23C: .word 0x0224F5A0 -_0224A240: .word ov7_0224A34C - thumb_func_end ov7_0224A128 - - thumb_func_start ov7_0224A244 -ov7_0224A244: ; 0x0224A244 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r4, r1, #0 - bl sub_020360F0 - cmp r0, #0 - beq _0224A26A - add r0, r6, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - mov r0, #0 - add r1, r0, #0 - bl ov7_02249960 - add r0, r4, #0 - bl ov7_0224B348 - b _0224A33E -_0224A26A: - mov r0, #0 - mov r1, #3 - bl sub_020365A8 - add r5, r0, #0 - bl sub_0203608C - cmp r5, r0 - bne _0224A290 - bl sub_020365D0 - add r0, r6, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - add r0, r4, #0 - bl ov7_0224B2DC - b _0224A33E -_0224A290: - mov r0, #0 - mov r1, #5 - bl sub_020365A8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224A2B4 - bl sub_020365D0 - add r0, r6, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - add r0, r4, #0 - bl ov7_0224B2DC - b _0224A33E -_0224A2B4: - mov r0, #0 - mov r1, #4 - bl sub_020365A8 - add r5, r0, #0 - bl sub_0203608C - cmp r5, r0 - bne _0224A2D6 - mov r0, #0x61 - mov r1, #0 - bl ov7_02249960 - ldr r0, _0224A344 ; =ov7_0224AB64 - bl ov7_0224A530 - b _0224A33E -_0224A2D6: - mov r0, #0 - mov r1, #2 - bl sub_020365A8 - add r5, r0, #0 - bl sub_0203608C - cmp r5, r0 - bne _0224A322 - bl sub_020365D0 - bl sub_02032E64 - add r1, r4, #0 - add r1, #0x90 - strb r0, [r1] - ldr r0, _0224A348 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224A312 - ldr r0, _0224A348 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0201D730 -_0224A312: - add r0, r6, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - add r0, r4, #0 - bl ov7_0224B08C - b _0224A33E -_0224A322: - bl ov7_0224B4E4 - cmp r0, #0 - beq _0224A33A - add r0, r6, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - add r0, r4, #0 - bl ov7_0224B2DC - b _0224A33E -_0224A33A: - mov r0, #0 - pop {r4, r5, r6, pc} -_0224A33E: - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_0224A344: .word ov7_0224AB64 -_0224A348: .word 0x0224F5A0 - thumb_func_end ov7_0224A244 - - thumb_func_start ov7_0224A34C -ov7_0224A34C: ; 0x0224A34C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0224A388 ; =0x0224F5A0 - add r4, r1, #0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224A386 - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224A244 - cmp r0, #0 - bne _0224A386 - ldr r0, _0224A38C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _0224A386 - mov r0, #3 - mov r1, #0 - bl ov7_02249960 - ldr r0, _0224A390 ; =ov7_0224A394 - bl ov7_0224A530 -_0224A386: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224A388: .word 0x0224F5A0 -_0224A38C: .word 0x021BF67C -_0224A390: .word ov7_0224A394 - thumb_func_end ov7_0224A34C - - thumb_func_start ov7_0224A394 -ov7_0224A394: ; 0x0224A394 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - bl ov7_0224A244 - cmp r0, #0 - bne _0224A3D0 - ldr r0, _0224A3D4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224A3D0 - mov r0, #4 - str r0, [sp] - ldr r0, _0224A3D4 ; =0x0224F5A0 - ldr r1, _0224A3D8 ; =0x0224ED0C - ldr r0, [r0, #0] - ldr r2, _0224A3DC ; =0x000003D9 - ldr r0, [r0, #0x68] - mov r3, #0xb - ldr r0, [r0, #8] - bl sub_02002100 - str r0, [r4, #0x60] - ldr r0, _0224A3E0 ; =ov7_0224A3E4 - bl ov7_0224A530 -_0224A3D0: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0224A3D4: .word 0x0224F5A0 -_0224A3D8: .word 0x0224ED0C -_0224A3DC: .word 0x000003D9 -_0224A3E0: .word ov7_0224A3E4 - thumb_func_end ov7_0224A394 - - thumb_func_start ov7_0224A3E4 -ov7_0224A3E4: ; 0x0224A3E4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov7_0224A244 - cmp r0, #0 - ldr r0, [r4, #0x60] - beq _0224A400 - mov r1, #4 - bl sub_02002154 - mov r0, #0 - str r0, [r4, #0x60] - pop {r3, r4, r5, pc} -_0224A400: - mov r1, #4 - bl sub_02002114 - cmp r0, #0 - bne _0224A422 - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - mov r0, #6 - mov r1, #0 - bl ov7_02249960 - add r0, r4, #0 - bl ov7_0224B348 - pop {r3, r4, r5, pc} -_0224A422: - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224A430 - ldr r0, _0224A434 ; =ov7_0224A128 - bl ov7_0224A530 -_0224A430: - pop {r3, r4, r5, pc} - nop -_0224A434: .word ov7_0224A128 - thumb_func_end ov7_0224A3E4 - - thumb_func_start ov7_0224A438 -ov7_0224A438: ; 0x0224A438 - push {r4, lr} - sub sp, #0x10 - add r4, r2, #0 - mov r2, #0 - add r0, sp, #0xc - strh r2, [r0] - ldr r0, _0224A50C ; =0x0224F5A0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x5c] - cmp r0, #0 - beq _0224A454 - add r1, sp, #0xc - bl sub_020014DC -_0224A454: - add r0, sp, #0xc - ldrh r1, [r0] - add r1, r1, r4 - strh r1, [r0] - ldrh r0, [r0] - bl sub_02032EE8 - cmp r0, #0 - beq _0224A506 - add r0, sp, #0xc - ldrh r0, [r0] - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, _0224A50C ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - ldr r0, [r0, #0x50] - bl sub_0200B498 - ldr r0, _0224A50C ; =0x0224F5A0 - mov r1, #0x42 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #4] - bl sub_0200B1B8 - ldr r0, _0224A50C ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x50] - ldmia r2!, {r1, r2} - bl sub_0200C388 - ldr r0, _0224A50C ; =0x0224F5A0 - lsl r4, r4, #4 - ldr r2, [r0, #0] - mov r1, #0 - str r4, [sp] - str r1, [sp, #4] - add r0, r2, #0 - str r1, [sp, #8] - ldr r2, [r2, #0] - add r0, #0x20 - mov r3, #8 - bl sub_0201D738 - add r0, sp, #0xc - ldrh r0, [r0] - bl sub_02032EE8 - bl sub_02025F24 - mov r1, #2 - add r2, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0224A50C ; =0x0224F5A0 - mov r3, #5 - ldr r0, [r0, #0] - ldr r0, [r0, #0x50] - bl sub_0200B60C - ldr r0, _0224A50C ; =0x0224F5A0 - mov r1, #0x41 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0xc] - bl sub_0200B1B8 - ldr r0, _0224A50C ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x50] - ldr r1, [r2, #8] - ldr r2, [r2, #0xc] - bl sub_0200C388 - ldr r0, _0224A50C ; =0x0224F5A0 - mov r1, #0 - ldr r2, [r0, #0] - mov r3, #0x48 - str r4, [sp] - str r1, [sp, #4] - add r0, r2, #0 - str r1, [sp, #8] - ldr r2, [r2, #8] - add r0, #0x20 - bl sub_0201D738 -_0224A506: - add sp, #0x10 - pop {r4, pc} - nop -_0224A50C: .word 0x0224F5A0 - thumb_func_end ov7_0224A438 - - thumb_func_start ov7_0224A510 -ov7_0224A510: ; 0x0224A510 - push {r4, lr} - add r4, r0, #0 - bl ov7_0224B3FC - add r2, r0, #0 - ldr r0, [r4, #0x68] - add r4, #0x91 - ldrb r1, [r4] - bl sub_02059708 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224A510 - - thumb_func_start ov7_0224A528 -ov7_0224A528: ; 0x0224A528 - ldr r3, _0224A52C ; =sub_0205987C - bx r3 - ; .align 2, 0 -_0224A52C: .word sub_0205987C - thumb_func_end ov7_0224A528 - - thumb_func_start ov7_0224A530 -ov7_0224A530: ; 0x0224A530 - ldr r1, _0224A538 ; =0x0224F5A0 - ldr r1, [r1, #0] - str r0, [r1, #0x6c] - bx lr - ; .align 2, 0 -_0224A538: .word 0x0224F5A0 - thumb_func_end ov7_0224A530 - - thumb_func_start ov7_0224A53C -ov7_0224A53C: ; 0x0224A53C - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, _0224A5C0 ; =ov7_0224A718 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - bl ov7_0224A5D0 - ldr r0, _0224A5C4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201A7CC - cmp r0, #0 - bne _0224A584 - ldr r0, _0224A5C4 ; =0x0224F5A0 - mov r2, #3 - ldr r1, [r0, #0] - mov r0, #2 - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xcd - str r0, [sp, #0x10] - ldr r0, [r1, #0x68] - add r1, #0x30 - ldr r0, [r0, #8] - mov r3, #0x16 - bl sub_0201A7E8 -_0224A584: - ldr r0, _0224A5C4 ; =0x0224F5A0 - ldr r2, _0224A5C8 ; =0x000003D9 - ldr r0, [r0, #0] - mov r1, #1 - add r0, #0x30 - mov r3, #0xb - bl sub_0200DC48 - ldr r0, _0224A5C4 ; =0x0224F5A0 - mov r1, #0xf - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _0224A5C4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201A954 - mov r0, #1 - add r4, #0x97 - strb r0, [r4] - mov r0, #0 - bl sub_02032E1C - ldr r0, _0224A5CC ; =ov7_0224A72C - bl ov7_0224A530 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_0224A5C0: .word ov7_0224A718 -_0224A5C4: .word 0x0224F5A0 -_0224A5C8: .word 0x000003D9 -_0224A5CC: .word ov7_0224A72C - thumb_func_end ov7_0224A53C - - thumb_func_start ov7_0224A5D0 -ov7_0224A5D0: ; 0x0224A5D0 - push {r3, r4, lr} - sub sp, #0x84 - ldr r4, _0224A644 ; =0x0224EDD8 - add r3, sp, #0 - mov r2, #0x10 -_0224A5DA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224A5DA - ldr r0, [r4, #0] - str r0, [r3, #0] - ldr r0, _0224A648 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #0x21 - blo _0224A5F6 - bl sub_02022974 -_0224A5F6: - ldr r0, _0224A648 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #8 - bne _0224A632 - bl sub_02032E64 - cmp r0, #1 - ble _0224A61E - ldr r0, _0224A648 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - add r0, #0x92 - ldrb r0, [r0] - add r0, #0x6c - bl ov7_02249960 - add sp, #0x84 - pop {r3, r4, pc} -_0224A61E: - ldr r0, _0224A648 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - add r0, #0x92 - ldrb r0, [r0] - add r0, #0x62 - bl ov7_02249960 - add sp, #0x84 - pop {r3, r4, pc} -_0224A632: - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 - add sp, #0x84 - pop {r3, r4, pc} - nop -_0224A644: .word 0x0224EDD8 -_0224A648: .word 0x0224F5A0 - thumb_func_end ov7_0224A5D0 - - thumb_func_start ov7_0224A64C -ov7_0224A64C: ; 0x0224A64C - push {r3, r4, lr} - sub sp, #0xc - bl sub_02032E64 - add r4, r0, #0 - bl ov7_0224B3D4 - cmp r4, r0 - blt _0224A668 - bl sub_02032E64 - add r2, r0, #0 - mov r4, #0x44 - b _0224A676 -_0224A668: - bl ov7_0224B3D4 - add r4, r0, #0 - bl sub_02032E64 - sub r2, r4, r0 - mov r4, #0x43 -_0224A676: - mov r0, #5 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0224A6D0 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - mov r3, #2 - ldr r0, [r0, #0x54] - bl sub_0200B60C - ldr r0, _0224A6D0 ; =0x0224F5A0 - mov r1, #0xf - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201ADA4 - ldr r0, _0224A6D0 ; =0x0224F5A0 - add r1, r4, #0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x74] - ldr r2, [r2, #0x1c] - bl sub_0200B1B8 - ldr r0, _0224A6D0 ; =0x0224F5A0 - ldr r2, [r0, #0] - ldr r0, [r2, #0x54] - ldr r1, [r2, #0x18] - ldr r2, [r2, #0x1c] - bl sub_0200C388 - ldr r0, _0224A6D0 ; =0x0224F5A0 - mov r3, #2 - ldr r2, [r0, #0] - mov r1, #0 - str r3, [sp] - str r1, [sp, #4] - add r0, r2, #0 - str r1, [sp, #8] - ldr r2, [r2, #0x18] - add r0, #0x30 - bl sub_0201D738 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0224A6D0: .word 0x0224F5A0 - thumb_func_end ov7_0224A64C - - thumb_func_start ov7_0224A6D4 -ov7_0224A6D4: ; 0x0224A6D4 - push {r3, r4, r5, r6, lr} - sub sp, #0x84 - ldr r6, _0224A714 ; =0x0224ED54 - add r2, r0, #0 - add r4, r1, #0 - add r5, sp, #0 - mov r3, #0x10 -_0224A6E2: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _0224A6E2 - ldr r0, [r6, #0] - str r0, [r5, #0] - add r0, r2, #0 - bl sub_02032EE8 - add r2, r0, #0 - beq _0224A700 - ldr r0, [r4, #0x58] - mov r1, #1 - bl sub_0200B498 -_0224A700: - add r4, #0x91 - ldrb r0, [r4] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - mov r1, #1 - bl ov7_02249960 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224A714: .word 0x0224ED54 - thumb_func_end ov7_0224A6D4 - - thumb_func_start ov7_0224A718 -ov7_0224A718: ; 0x0224A718 - push {r3, lr} - ldr r2, _0224A728 ; =0x0224F5A0 - ldr r2, [r2, #0] - ldr r2, [r2, #0x6c] - cmp r2, #0 - beq _0224A726 - blx r2 -_0224A726: - pop {r3, pc} - ; .align 2, 0 -_0224A728: .word 0x0224F5A0 - thumb_func_end ov7_0224A718 - - thumb_func_start ov7_0224A72C -ov7_0224A72C: ; 0x0224A72C - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r0, r1, #0 - bl ov7_0224A64C - ldr r0, _0224A7C4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224A7C0 - mov r0, #5 - mov r1, #4 - bl sub_02013A04 - ldr r4, _0224A7C4 ; =0x0224F5A0 - mov r5, #0 - ldr r1, [r4, #0] - mov r6, #0x45 - str r0, [r1, #0x64] - add r7, r5, #0 -_0224A75A: - ldr r1, [r4, #0] - add r2, r6, #0 - ldr r0, [r1, #0x64] - ldr r1, [r1, #0x74] - add r3, r7, #0 - bl sub_02013A4C - add r5, r5, #1 - cmp r5, #5 - blt _0224A75A - ldr r1, _0224A7C4 ; =0x0224F5A0 - mov r2, #1 - ldr r0, [r1, #0] - mov r3, #0 - add r0, #0x98 - strb r2, [r0] - add r2, r3, #0 -_0224A77C: - ldr r0, [r1, #0] - add r0, r0, r3 - add r0, #0x80 - add r3, r3, #1 - strb r2, [r0] - cmp r3, #8 - blt _0224A77C - mov r1, #1 - str r1, [sp, #0x10] - mov r0, #2 - str r0, [sp, #0x14] - mov r0, #0x11 - str r0, [sp, #0x18] - mov r0, #0xc - mov r4, sp - str r0, [sp, #0x1c] - sub r4, #0x10 - ldr r3, _0224A7C8 ; =0x0224ED14 - str r1, [sp, #0x20] - add r2, r4, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r4!, {r0, r1, r2, r3} - bl ov7_02249A10 - ldr r0, _0224A7CC ; =ov7_0224A7D0 - bl ov7_0224A530 -_0224A7C0: - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A7C4: .word 0x0224F5A0 -_0224A7C8: .word 0x0224ED14 -_0224A7CC: .word ov7_0224A7D0 - thumb_func_end ov7_0224A72C - - thumb_func_start ov7_0224A7D0 -ov7_0224A7D0: ; 0x0224A7D0 - push {r4, r5, r6, r7, lr} - sub sp, #0x8c - str r0, [sp] - add r0, r1, #0 - str r1, [sp, #4] - bl ov7_0224A64C - mov r7, #1 - ldr r4, _0224A964 ; =0x0224F5A0 - mov r5, #0 - add r6, r7, #0 -_0224A7E6: - add r0, r5, #0 - bl sub_02032DC4 - cmp r0, #0 - beq _0224A804 - cmp r5, #0 - beq _0224A804 - ldr r0, [r4, #0] - add r0, r0, r5 - add r0, #0x80 - strb r6, [r0] - ldr r0, [r4, #0] - add r0, #0x98 - strb r6, [r0] - b _0224A84E -_0224A804: - add r0, r5, #0 - bl sub_02032EE8 - cmp r0, #0 - beq _0224A828 - ldr r1, [r4, #0] - add r0, r1, r5 - add r0, #0x80 - ldrb r0, [r0] - cmp r0, #0 - bne _0224A828 - add r0, r1, r5 - add r0, #0x80 - strb r7, [r0] - ldr r0, [r4, #0] - add r0, #0x98 - strb r7, [r0] - b _0224A84E -_0224A828: - add r0, r5, #0 - bl sub_02032EE8 - cmp r0, #0 - bne _0224A84E - ldr r1, [r4, #0] - add r0, r1, r5 - add r0, #0x80 - ldrb r0, [r0] - cmp r0, #0 - beq _0224A84E - add r1, r1, r5 - add r1, #0x80 - mov r0, #0 - strb r0, [r1] - ldr r1, [r4, #0] - mov r0, #1 - add r1, #0x98 - strb r0, [r1] -_0224A84E: - add r5, r5, #1 - cmp r5, #8 - blt _0224A7E6 - ldr r1, _0224A964 ; =0x0224F5A0 - ldr r2, [r1, #0] - add r0, r2, #0 - add r0, #0x98 - ldrb r0, [r0] - cmp r0, #0 - beq _0224A8A6 - mov r0, #0 - add r2, #0x98 - strb r0, [r2] - ldr r0, [r1, #0] - ldr r0, [r0, #0x5c] - bl sub_020013AC - ldr r0, _0224A964 ; =0x0224F5A0 - mov r1, #3 - ldr r0, [r0, #0] - mov r5, #0 - ldr r0, [r0, #0x5c] - bl sub_02001504 - cmp r0, #0 - bls _0224A8A6 - ldr r4, _0224A964 ; =0x0224F5A0 - add r6, r5, #0 - mov r7, #3 -_0224A888: - ldr r0, [r4, #0] - lsl r2, r5, #0x18 - ldr r0, [r0, #0x5c] - add r1, r6, #0 - lsr r2, r2, #0x18 - bl ov7_0224A438 - ldr r0, [r4, #0] - add r1, r7, #0 - ldr r0, [r0, #0x5c] - add r5, r5, #1 - bl sub_02001504 - cmp r5, r0 - blo _0224A888 -_0224A8A6: - ldr r0, [sp, #4] - ldr r0, [r0, #0x5c] - bl sub_02001288 - add r4, r0, #0 - bl sub_02032E44 - cmp r0, #0xff - beq _0224A8DE - bl sub_02032E44 - ldr r1, [sp, #4] - add r1, #0x95 - strb r0, [r1] - ldr r0, _0224A968 ; =0x0000060D - bl sub_02005748 - ldr r0, [sp, #4] - ldr r1, [sp, #4] - add r0, #0x95 - ldrb r0, [r0] - bl ov7_0224A6D4 - ldr r0, _0224A96C ; =ov7_0224AF84 - bl ov7_0224A530 - add sp, #0x8c - pop {r4, r5, r6, r7, pc} -_0224A8DE: - bl sub_020360F0 - cmp r0, #0 - beq _0224A900 - bl ov7_0224A528 - ldr r0, [sp] - ldr r1, [sp, #4] - bl ov7_0224AFD8 - ldr r0, _0224A964 ; =0x0224F5A0 - mov r1, #3 - ldr r0, [r0, #0] - add sp, #0x8c - add r0, #0x88 - str r1, [r0, #0] - pop {r4, r5, r6, r7, pc} -_0224A900: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224A910 - add r0, r0, #1 - cmp r4, r0 - beq _0224A95E - b _0224A91A -_0224A910: - ldr r0, _0224A970 ; =ov7_0224AE10 - bl ov7_0224A530 - add sp, #0x8c - pop {r4, r5, r6, r7, pc} -_0224A91A: - bl ov7_0224B3D4 - add r4, r0, #0 - bl sub_02032E64 - cmp r4, r0 - bgt _0224A95E - ldr r4, _0224A974 ; =0x0224EEE0 - add r3, sp, #8 - mov r2, #0x10 -_0224A92E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224A92E - ldr r0, [r4, #0] - str r0, [r3, #0] - bl sub_02032E64 - ldr r1, [sp, #4] - add r1, #0x90 - strb r0, [r1] - ldr r0, [sp, #4] - add r0, #0x91 - str r0, [sp, #4] - ldrb r0, [r0] - lsl r1, r0, #2 - add r0, sp, #8 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 - ldr r0, _0224A978 ; =ov7_0224AC48 - bl ov7_0224A530 -_0224A95E: - add sp, #0x8c - pop {r4, r5, r6, r7, pc} - nop -_0224A964: .word 0x0224F5A0 -_0224A968: .word 0x0000060D -_0224A96C: .word ov7_0224AF84 -_0224A970: .word ov7_0224AE10 -_0224A974: .word 0x0224EEE0 -_0224A978: .word ov7_0224AC48 - thumb_func_end ov7_0224A7D0 - - thumb_func_start ov7_0224A97C -ov7_0224A97C: ; 0x0224A97C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - add r0, r4, #0 - bl ov7_0224A64C - ldr r0, [r4, #0x5c] - bl sub_02001288 - ldr r0, [r4, #0x60] - mov r1, #4 - bl sub_02002114 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x95 - ldrb r0, [r0] - bl sub_02035D78 - cmp r0, #0 - bne _0224AA1A - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _0224A9B6 - ldr r0, [r4, #0x60] - mov r1, #4 - bl sub_02002154 -_0224A9B6: - add r0, r4, #0 - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #8 - bne _0224AA02 - mov r5, #1 - bl ov7_0224B3E8 - cmp r0, #1 - ble _0224A9F2 - mov r4, #5 -_0224A9CC: - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0224A9E8 - add r0, r5, #0 - bl sub_02032D98 - lsl r1, r5, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl sub_02036594 -_0224A9E8: - add r5, r5, #1 - bl ov7_0224B3E8 - cmp r5, r0 - blt _0224A9CC -_0224A9F2: - mov r0, #0 - add r1, r0, #0 - bl ov7_02249960 - ldr r0, _0224AB54 ; =ov7_0224ABA4 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AA02: - add r4, #0x95 - ldrb r0, [r4] - bl sub_02032D98 - mov r0, #0 - add r1, r0, #0 - bl ov7_02249960 - ldr r0, _0224AB54 ; =ov7_0224ABA4 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AA1A: - bl sub_020360F0 - cmp r0, #0 - bne _0224AA2A - bl ov7_0224B4E4 - cmp r0, #0 - beq _0224AA52 -_0224AA2A: - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - bne _0224AA3A - ldr r0, [r4, #0x60] - mov r1, #4 - bl sub_02002154 -_0224AA3A: - add r4, #0x95 - ldrb r0, [r4] - bl sub_02032D98 - mov r0, #0 - add r1, r0, #0 - bl ov7_02249960 - ldr r0, _0224AB54 ; =ov7_0224ABA4 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AA52: - cmp r5, #0 - bne _0224AAE2 - add r0, r4, #0 - add r0, #0x91 - ldrb r0, [r0] - add r0, #0xff - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bhi _0224AA88 - bl sub_02032FE4 - cmp r0, #0 - bne _0224AA88 - mov r0, #0x61 - mov r1, #0 - bl ov7_02249960 - ldr r0, _0224AB58 ; =ov7_0224AB64 - bl ov7_0224A530 - add r4, #0x95 - ldrb r1, [r4] - mov r0, #4 - bl sub_02036594 - pop {r4, r5, r6, pc} -_0224AA88: - add r0, r4, #0 - add r0, #0x95 - ldrb r0, [r0] - bl sub_02032E1C - add r1, r4, #0 - add r1, #0x95 - ldrb r1, [r1] - mov r0, #2 - bl sub_02036594 - bl ov7_0224B3E8 - add r5, r0, #0 - bl sub_02032E64 - cmp r5, r0 - bne _0224AAD6 - bl sub_02032E64 - add r1, r4, #0 - add r1, #0x90 - strb r0, [r1] - bl ov7_0224B3E8 - cmp r0, #2 - ble _0224AAC6 - ldr r0, _0224AB5C ; =ov7_0224AC08 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AAC6: - add r0, r6, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - add r0, r4, #0 - bl ov7_0224B054 - pop {r4, r5, r6, pc} -_0224AAD6: - bl ov7_0224A5D0 - ldr r0, _0224AB60 ; =ov7_0224ABE0 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AAE2: - mov r0, #0 - mvn r0, r0 - cmp r5, r0 - beq _0224AB50 - add r0, r4, #0 - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #8 - bne _0224AB32 - mov r5, #1 - bl ov7_0224B3E8 - cmp r0, #1 - ble _0224AB26 - mov r4, #5 -_0224AB00: - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0224AB1C - add r0, r5, #0 - bl sub_02032D98 - lsl r1, r5, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl sub_02036594 -_0224AB1C: - add r5, r5, #1 - bl ov7_0224B3E8 - cmp r5, r0 - blt _0224AB00 -_0224AB26: - bl ov7_0224A5D0 - ldr r0, _0224AB60 ; =ov7_0224ABE0 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AB32: - add r0, r4, #0 - add r0, #0x95 - ldrb r0, [r0] - bl sub_02032D98 - add r4, #0x95 - ldrb r1, [r4] - mov r0, #3 - bl sub_02036594 - bl ov7_0224A5D0 - ldr r0, _0224AB60 ; =ov7_0224ABE0 - bl ov7_0224A530 -_0224AB50: - pop {r4, r5, r6, pc} - nop -_0224AB54: .word ov7_0224ABA4 -_0224AB58: .word ov7_0224AB64 -_0224AB5C: .word ov7_0224AC08 -_0224AB60: .word ov7_0224ABE0 - thumb_func_end ov7_0224A97C - - thumb_func_start ov7_0224AB64 -ov7_0224AB64: ; 0x0224AB64 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0224AB9C ; =0x0224F5A0 - add r4, r1, #0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224AB9A - ldr r0, _0224ABA0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224AB9A - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - bl ov7_0224A528 - ldr r0, _0224AB9C ; =0x0224F5A0 - mov r1, #4 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] -_0224AB9A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224AB9C: .word 0x0224F5A0 -_0224ABA0: .word 0x021BF67C - thumb_func_end ov7_0224AB64 - - thumb_func_start ov7_0224ABA4 -ov7_0224ABA4: ; 0x0224ABA4 - push {r3, lr} - add r0, r1, #0 - bl ov7_0224A64C - ldr r0, _0224ABD4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224ABD0 - ldr r0, _0224ABD8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224ABD0 - bl ov7_0224A5D0 - ldr r0, _0224ABDC ; =ov7_0224ABE0 - bl ov7_0224A530 -_0224ABD0: - pop {r3, pc} - nop -_0224ABD4: .word 0x0224F5A0 -_0224ABD8: .word 0x021BF67C -_0224ABDC: .word ov7_0224ABE0 - thumb_func_end ov7_0224ABA4 - - thumb_func_start ov7_0224ABE0 -ov7_0224ABE0: ; 0x0224ABE0 - push {r3, lr} - add r0, r1, #0 - bl ov7_0224A64C - ldr r0, _0224AC00 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224ABFE - ldr r0, _0224AC04 ; =ov7_0224A7D0 - bl ov7_0224A530 -_0224ABFE: - pop {r3, pc} - ; .align 2, 0 -_0224AC00: .word 0x0224F5A0 -_0224AC04: .word ov7_0224A7D0 - thumb_func_end ov7_0224ABE0 - - thumb_func_start ov7_0224AC08 -ov7_0224AC08: ; 0x0224AC08 - push {r4, r5, lr} - sub sp, #0x84 - ldr r5, _0224AC40 ; =0x0224EFE8 - add r4, r1, #0 - add r3, sp, #0 - mov r2, #0x10 -_0224AC14: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224AC14 - ldr r0, [r5, #0] - str r0, [r3, #0] - add r0, r4, #0 - bl ov7_0224A64C - add r4, #0x91 - ldrb r0, [r4] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 - ldr r0, _0224AC44 ; =ov7_0224AC48 - bl ov7_0224A530 - add sp, #0x84 - pop {r4, r5, pc} - ; .align 2, 0 -_0224AC40: .word 0x0224EFE8 -_0224AC44: .word ov7_0224AC48 - thumb_func_end ov7_0224AC08 - - thumb_func_start ov7_0224AC48 -ov7_0224AC48: ; 0x0224AC48 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r0, r4, #0 - bl ov7_0224A64C - mov r0, #0 - bl sub_02036994 - ldr r0, [r4, #0x5c] - bl sub_02001288 - ldr r0, _0224AC94 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224AC8E - mov r0, #4 - str r0, [sp] - ldr r0, _0224AC94 ; =0x0224F5A0 - ldr r1, _0224AC98 ; =0x0224ED0C - ldr r0, [r0, #0] - ldr r2, _0224AC9C ; =0x000003D9 - ldr r0, [r0, #0x68] - mov r3, #0xb - ldr r0, [r0, #8] - bl sub_02002100 - str r0, [r4, #0x60] - ldr r0, _0224ACA0 ; =ov7_0224ACA4 - bl ov7_0224A530 -_0224AC8E: - add sp, #4 - pop {r3, r4, pc} - nop -_0224AC94: .word 0x0224F5A0 -_0224AC98: .word 0x0224ED0C -_0224AC9C: .word 0x000003D9 -_0224ACA0: .word ov7_0224ACA4 - thumb_func_end ov7_0224AC48 - - thumb_func_start ov7_0224ACA4 -ov7_0224ACA4: ; 0x0224ACA4 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - bl ov7_0224A64C - ldr r0, [r5, #0x5c] - bl sub_02001288 - ldr r0, [r5, #0x60] - mov r1, #4 - bl sub_02002114 - add r4, r0, #0 - bl sub_020360F0 - cmp r0, #0 - bne _0224ACD6 - bl sub_02035E18 - add r1, r5, #0 - add r1, #0x90 - ldrb r1, [r1] - cmp r1, r0 - beq _0224ACF2 -_0224ACD6: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _0224ACE6 - ldr r0, [r5, #0x60] - mov r1, #4 - bl sub_02002154 -_0224ACE6: - mov r0, #0 - str r0, [r5, #0x60] - ldr r0, _0224AD5C ; =ov7_0224AD68 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224ACF2: - cmp r4, #0 - bne _0224AD34 - add r5, #0x91 - ldrb r0, [r5] - cmp r0, #8 - bne _0224AD26 - mov r4, #1 - bl sub_02035E18 - cmp r0, #1 - ble _0224AD26 -_0224AD08: - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - bne _0224AD1C - ldr r0, _0224AD5C ; =ov7_0224AD68 - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AD1C: - add r4, r4, #1 - bl sub_02035E18 - cmp r4, r0 - blt _0224AD08 -_0224AD26: - mov r0, #0xa - bl sub_020364F0 - ldr r0, _0224AD60 ; =ov7_0224AF2C - bl ov7_0224A530 - pop {r4, r5, r6, pc} -_0224AD34: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _0224AD58 - mov r0, #1 - bl sub_02036994 - bl ov7_0224A528 - add r0, r6, #0 - add r1, r5, #0 - bl ov7_0224AFD8 - ldr r0, _0224AD64 ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] -_0224AD58: - pop {r4, r5, r6, pc} - nop -_0224AD5C: .word ov7_0224AD68 -_0224AD60: .word ov7_0224AF2C -_0224AD64: .word 0x0224F5A0 - thumb_func_end ov7_0224ACA4 - - thumb_func_start ov7_0224AD68 -ov7_0224AD68: ; 0x0224AD68 - push {r3, r4, r5, r6, lr} - sub sp, #0x84 - ldr r6, _0224ADCC ; =0x0224EE5C - add r2, r0, #0 - add r4, r1, #0 - add r5, sp, #0 - mov r3, #0x10 -_0224AD76: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _0224AD76 - ldr r0, [r6, #0] - add r1, r4, #0 - str r0, [r5, #0] - add r0, r2, #0 - bl ov7_0224AFD8 - ldr r0, _0224ADD0 ; =0x0224F5A0 - ldr r1, [r0, #0] - add r0, r1, #0 - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #8 - bne _0224ADA6 - add r1, #0x92 - ldrb r0, [r1] - mov r1, #0 - add r0, #0x76 - bl ov7_02249960 - b _0224ADB8 -_0224ADA6: - add r0, r4, #0 - add r0, #0x91 - ldrb r0, [r0] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 -_0224ADB8: - bl sub_0205987C - ldr r0, _0224ADD4 ; =ov7_0224ADD8 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} - nop -_0224ADCC: .word 0x0224EE5C -_0224ADD0: .word 0x0224F5A0 -_0224ADD4: .word ov7_0224ADD8 - thumb_func_end ov7_0224AD68 - - thumb_func_start ov7_0224ADD8 -ov7_0224ADD8: ; 0x0224ADD8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224AE08 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224AE06 - ldr r0, _0224AE0C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224AE06 - ldr r0, _0224AE08 ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] - add r0, r4, #0 - bl sub_0200DA58 -_0224AE06: - pop {r4, pc} - ; .align 2, 0 -_0224AE08: .word 0x0224F5A0 -_0224AE0C: .word 0x021BF67C - thumb_func_end ov7_0224ADD8 - - thumb_func_start ov7_0224AE10 -ov7_0224AE10: ; 0x0224AE10 - push {r3, r4, r5, r6, lr} - sub sp, #0x84 - ldr r6, _0224AE6C ; =0x0224F06C - add r5, r0, #0 - add r4, r1, #0 - add r3, sp, #0 - mov r2, #0x10 -_0224AE1E: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0224AE1E - ldr r0, [r6, #0] - str r0, [r3, #0] - add r0, r4, #0 - bl ov7_0224A64C - bl sub_02032E64 - cmp r0, #1 - ble _0224AE52 - add r4, #0x91 - ldrb r0, [r4] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 - ldr r0, _0224AE70 ; =ov7_0224AE78 - bl ov7_0224A530 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} -_0224AE52: - bl ov7_0224A528 - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - ldr r0, _0224AE74 ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] - add sp, #0x84 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224AE6C: .word 0x0224F06C -_0224AE70: .word ov7_0224AE78 -_0224AE74: .word 0x0224F5A0 - thumb_func_end ov7_0224AE10 - - thumb_func_start ov7_0224AE78 -ov7_0224AE78: ; 0x0224AE78 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r0, r4, #0 - bl ov7_0224A64C - ldr r0, [r4, #0x5c] - bl sub_02001288 - ldr r0, _0224AEBC ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224AEB8 - mov r0, #4 - str r0, [sp] - ldr r0, _0224AEBC ; =0x0224F5A0 - ldr r1, _0224AEC0 ; =0x0224ED0C - ldr r0, [r0, #0] - ldr r2, _0224AEC4 ; =0x000003D9 - ldr r0, [r0, #0x68] - mov r3, #0xb - ldr r0, [r0, #8] - bl sub_02002100 - str r0, [r4, #0x60] - ldr r0, _0224AEC8 ; =ov7_0224AECC - bl ov7_0224A530 -_0224AEB8: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0224AEBC: .word 0x0224F5A0 -_0224AEC0: .word 0x0224ED0C -_0224AEC4: .word 0x000003D9 -_0224AEC8: .word ov7_0224AECC - thumb_func_end ov7_0224AE78 - - thumb_func_start ov7_0224AECC -ov7_0224AECC: ; 0x0224AECC - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - bl ov7_0224A64C - ldr r0, [r5, #0x5c] - bl sub_02001288 - ldr r0, [r5, #0x60] - mov r1, #4 - bl sub_02002114 - add r4, r0, #0 - bl sub_020360F0 - cmp r0, #0 - beq _0224AEF4 - mov r4, #1 - mvn r4, r4 -_0224AEF4: - cmp r4, #0 - bne _0224AF10 - bl ov7_0224A528 - add r0, r6, #0 - add r1, r5, #0 - bl ov7_0224AFD8 - ldr r0, _0224AF24 ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] - pop {r4, r5, r6, pc} -_0224AF10: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _0224AF22 - bl ov7_0224A5D0 - ldr r0, _0224AF28 ; =ov7_0224ABE0 - bl ov7_0224A530 -_0224AF22: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224AF24: .word 0x0224F5A0 -_0224AF28: .word ov7_0224ABE0 - thumb_func_end ov7_0224AECC - - thumb_func_start ov7_0224AF2C -ov7_0224AF2C: ; 0x0224AF2C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_020360F0 - cmp r0, #0 - bne _0224AF48 - bl sub_02035E18 - add r1, r4, #0 - add r1, #0x90 - ldrb r1, [r1] - cmp r1, r0 - beq _0224AF50 -_0224AF48: - ldr r0, _0224AF80 ; =ov7_0224AD68 - bl ov7_0224A530 - pop {r3, r4, r5, pc} -_0224AF50: - add r0, r4, #0 - bl ov7_0224A64C - ldr r0, [r4, #0x5c] - bl sub_02001288 - mov r0, #0xa - bl sub_02036540 - cmp r0, #0 - beq _0224AF7C - bl sub_02036450 - cmp r0, #0 - beq _0224AF7C - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224AFD8 - add r0, r4, #0 - bl ov7_0224B3A8 -_0224AF7C: - pop {r3, r4, r5, pc} - nop -_0224AF80: .word ov7_0224AD68 - thumb_func_end ov7_0224AF2C - - thumb_func_start ov7_0224AF84 -ov7_0224AF84: ; 0x0224AF84 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - add r0, r4, #0 - bl ov7_0224A64C - ldr r0, [r4, #0x5c] - bl sub_02001288 - ldr r0, _0224AFC8 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224AFC4 - mov r0, #4 - str r0, [sp] - ldr r0, _0224AFC8 ; =0x0224F5A0 - ldr r1, _0224AFCC ; =0x0224ED0C - ldr r0, [r0, #0] - ldr r2, _0224AFD0 ; =0x000003D9 - ldr r0, [r0, #0x68] - mov r3, #0xb - ldr r0, [r0, #8] - bl sub_02002100 - str r0, [r4, #0x60] - ldr r0, _0224AFD4 ; =ov7_0224A97C - bl ov7_0224A530 -_0224AFC4: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0224AFC8: .word 0x0224F5A0 -_0224AFCC: .word 0x0224ED0C -_0224AFD0: .word 0x000003D9 -_0224AFD4: .word ov7_0224A97C - thumb_func_end ov7_0224AF84 - - thumb_func_start ov7_0224AFD8 -ov7_0224AFD8: ; 0x0224AFD8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0224B050 ; =0x0224F5A0 - add r4, r1, #0 - ldr r0, [r0, #0] - mov r1, #0xf - add r0, #0x40 - bl sub_0201ADA4 - add r0, r4, #0 - add r0, #0x20 - mov r1, #0 - bl sub_0200DC9C - ldr r0, [r4, #0x64] - bl sub_02013A3C - mov r1, #0 - ldr r0, [r4, #0x5c] - add r2, r1, #0 - bl sub_02001384 - add r0, r4, #0 - add r0, #0x20 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #0x20 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x97 - ldrb r0, [r0] - cmp r0, #0 - beq _0224B044 - ldr r0, _0224B050 ; =0x0224F5A0 - mov r1, #0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0200DC9C - ldr r0, _0224B050 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201ACF4 - ldr r0, _0224B050 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x30 - bl sub_0201A8FC - mov r0, #0 - add r4, #0x97 - strb r0, [r4] -_0224B044: - cmp r5, #0 - beq _0224B04E - add r0, r5, #0 - bl sub_0200DA58 -_0224B04E: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B050: .word 0x0224F5A0 - thumb_func_end ov7_0224AFD8 - - thumb_func_start ov7_0224B054 -ov7_0224B054: ; 0x0224B054 - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - bl sub_02032EE8 - add r2, r0, #0 - ldr r0, [r4, #0x58] - mov r1, #1 - bl sub_0200B498 - mov r0, #0x39 - mov r1, #1 - bl ov7_02249960 - ldr r0, _0224B084 ; =ov7_0224A718 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - ldr r0, _0224B088 ; =ov7_0224B0E8 - bl ov7_0224A530 - pop {r4, pc} - nop -_0224B084: .word ov7_0224A718 -_0224B088: .word ov7_0224B0E8 - thumb_func_end ov7_0224B054 - - thumb_func_start ov7_0224B08C -ov7_0224B08C: ; 0x0224B08C - push {r4, lr} - ldr r1, _0224B0DC ; =0x0224F5A0 - add r4, r0, #0 - add r0, #0x8e - ldr r1, [r1, #0] - ldrh r0, [r0] - ldr r1, [r1, #0x7c] - bl sub_020339AC - ldr r2, _0224B0DC ; =0x0224F5A0 - ldr r0, [r4, #0x58] - ldr r2, [r2, #0] - mov r1, #1 - ldr r2, [r2, #0x7c] - bl sub_0200B498 - mov r0, #4 - mov r1, #1 - bl ov7_02249960 - bl sub_02035E18 - add r1, r4, #0 - add r1, #0x90 - strb r0, [r1] - ldr r0, _0224B0E0 ; =ov7_0224A718 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - ldr r0, _0224B0E4 ; =ov7_0224B0E8 - bl ov7_0224A530 - ldr r0, _0224B0DC ; =0x0224F5A0 - mov r1, #0x5a - ldr r0, [r0, #0] - add r0, #0x96 - strb r1, [r0] - pop {r4, pc} - nop -_0224B0DC: .word 0x0224F5A0 -_0224B0E0: .word ov7_0224A718 -_0224B0E4: .word ov7_0224B0E8 - thumb_func_end ov7_0224B08C - - thumb_func_start ov7_0224B0E8 -ov7_0224B0E8: ; 0x0224B0E8 - push {r4, lr} - add r4, r1, #0 - bl sub_0203608C - cmp r0, #0 - bne _0224B108 - bl sub_02035E18 - add r4, #0x90 - ldrb r1, [r4] - cmp r1, r0 - beq _0224B108 - ldr r0, _0224B140 ; =ov7_0224B274 - bl ov7_0224A530 - pop {r4, pc} -_0224B108: - bl ov7_0224B4E4 - cmp r0, #0 - bne _0224B118 - bl sub_020360F0 - cmp r0, #0 - beq _0224B120 -_0224B118: - ldr r0, _0224B140 ; =ov7_0224B274 - bl ov7_0224A530 - pop {r4, pc} -_0224B120: - ldr r0, _0224B144 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224B13C - mov r0, #0xa - bl sub_020364F0 - ldr r0, _0224B148 ; =ov7_0224B14C - bl ov7_0224A530 -_0224B13C: - pop {r4, pc} - nop -_0224B140: .word ov7_0224B274 -_0224B144: .word 0x0224F5A0 -_0224B148: .word ov7_0224B14C - thumb_func_end ov7_0224B0E8 - - thumb_func_start ov7_0224B14C -ov7_0224B14C: ; 0x0224B14C - push {r3, r4, r5, r6, lr} - sub sp, #0x84 - add r5, r0, #0 - add r4, r1, #0 - bl sub_0203608C - cmp r0, #0 - bne _0224B172 - bl sub_02035E18 - add r1, r4, #0 - add r1, #0x90 - ldrb r1, [r1] - cmp r1, r0 - beq _0224B172 - ldr r0, _0224B268 ; =ov7_0224B274 - bl ov7_0224A530 - b _0224B202 -_0224B172: - bl ov7_0224B4E4 - cmp r0, #0 - bne _0224B182 - bl sub_020360F0 - cmp r0, #0 - beq _0224B18C -_0224B182: - ldr r0, _0224B268 ; =ov7_0224B274 - bl ov7_0224A530 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} -_0224B18C: - mov r0, #0 - bl sub_02035D78 - cmp r0, #0 - bne _0224B1A0 - ldr r0, _0224B268 ; =ov7_0224B274 - bl ov7_0224A530 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} -_0224B1A0: - mov r0, #0 - mov r1, #5 - bl sub_020365A8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224B1BA - ldr r0, _0224B268 ; =ov7_0224B274 - bl ov7_0224A530 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} -_0224B1BA: - mov r0, #0xa - bl sub_02036540 - cmp r0, #0 - beq _0224B202 - bl sub_02036450 - cmp r0, #0 - beq _0224B202 - ldr r0, _0224B26C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224B1E8 - ldr r0, _0224B26C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0201D730 -_0224B1E8: - bl sub_02035E18 - add r1, r4, #0 - add r1, #0x90 - strb r0, [r1] - add r0, r4, #0 - bl ov7_0224B3A8 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} -_0224B202: - ldr r2, _0224B26C ; =0x0224F5A0 - ldr r0, [r2, #0] - add r1, r0, #0 - add r1, #0x96 - ldrb r1, [r1] - cmp r1, #0 - beq _0224B264 - add r1, r0, #0 - add r1, #0x96 - ldrb r1, [r1] - add r0, #0x96 - sub r1, r1, #1 - strb r1, [r0] - ldr r2, [r2, #0] - add r0, r2, #0 - add r0, #0x96 - ldrb r0, [r0] - cmp r0, #0 - bne _0224B264 - ldr r6, _0224B270 ; =0x0224F0F0 - add r5, sp, #0 - mov r3, #0x10 -_0224B22E: - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - sub r3, r3, #1 - bne _0224B22E - ldr r0, [r6, #0] - str r0, [r5, #0] - add r0, r2, #0 - add r0, #0x91 - ldrb r0, [r0] - cmp r0, #8 - bne _0224B254 - add r2, #0x92 - ldrb r0, [r2] - mov r1, #0 - add r0, #0x71 - bl ov7_02249960 - add sp, #0x84 - pop {r3, r4, r5, r6, pc} -_0224B254: - add r4, #0x91 - ldrb r0, [r4] - lsl r1, r0, #2 - add r0, sp, #0 - ldr r0, [r0, r1] - mov r1, #0 - bl ov7_02249960 -_0224B264: - add sp, #0x84 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224B268: .word ov7_0224B274 -_0224B26C: .word 0x0224F5A0 -_0224B270: .word 0x0224F0F0 - thumb_func_end ov7_0224B14C - - thumb_func_start ov7_0224B274 -ov7_0224B274: ; 0x0224B274 - push {r3, lr} - ldr r0, _0224B298 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224B294 - mov r0, #0 - add r1, r0, #0 - bl ov7_02249960 - ldr r0, _0224B29C ; =ov7_0224B2A0 - bl ov7_0224A530 -_0224B294: - pop {r3, pc} - nop -_0224B298: .word 0x0224F5A0 -_0224B29C: .word ov7_0224B2A0 - thumb_func_end ov7_0224B274 - - thumb_func_start ov7_0224B2A0 -ov7_0224B2A0: ; 0x0224B2A0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224B2D4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224B2D2 - ldr r0, _0224B2D8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224B2D2 - add r0, r4, #0 - bl sub_0200DA58 - bl ov7_0224A528 - ldr r0, _0224B2D4 ; =0x0224F5A0 - mov r1, #1 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] -_0224B2D2: - pop {r4, pc} - ; .align 2, 0 -_0224B2D4: .word 0x0224F5A0 -_0224B2D8: .word 0x021BF67C - thumb_func_end ov7_0224B2A0 - - thumb_func_start ov7_0224B2DC -ov7_0224B2DC: ; 0x0224B2DC - push {r4, lr} - ldr r1, _0224B314 ; =0x0224F5A0 - add r4, r0, #0 - add r0, #0x8e - ldr r1, [r1, #0] - ldrh r0, [r0] - ldr r1, [r1, #0x7c] - bl sub_020339AC - ldr r2, _0224B314 ; =0x0224F5A0 - ldr r0, [r4, #0x58] - ldr r2, [r2, #0] - mov r1, #1 - ldr r2, [r2, #0x7c] - bl sub_0200B498 - mov r0, #5 - mov r1, #1 - bl ov7_02249960 - bl sub_020597A4 - ldr r0, _0224B318 ; =ov7_0224B31C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r4, pc} - ; .align 2, 0 -_0224B314: .word 0x0224F5A0 -_0224B318: .word ov7_0224B31C - thumb_func_end ov7_0224B2DC - - thumb_func_start ov7_0224B31C -ov7_0224B31C: ; 0x0224B31C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0224B344 ; =0x0224F5A0 - add r4, r1, #0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224B342 - bl sub_020597A4 - add r0, r4, #0 - bl ov7_02249E0C - add r0, r5, #0 - bl sub_0200DA58 -_0224B342: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B344: .word 0x0224F5A0 - thumb_func_end ov7_0224B31C - - thumb_func_start ov7_0224B348 -ov7_0224B348: ; 0x0224B348 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_020597A4 - mov r4, #0 -_0224B352: - add r0, r4, #0 - bl sub_02032D98 - add r4, r4, #1 - cmp r4, #8 - blt _0224B352 - ldr r0, _0224B36C ; =ov7_0224B370 - add r1, r5, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_0224B36C: .word ov7_0224B370 - thumb_func_end ov7_0224B348 - - thumb_func_start ov7_0224B370 -ov7_0224B370: ; 0x0224B370 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0224B3A0 ; =0x0224F5A0 - add r4, r1, #0 - ldr r0, [r0, #0] - add r0, #0x94 - ldrb r0, [r0] - bl sub_0205DA04 - cmp r0, #0 - beq _0224B39C - ldr r0, _0224B3A4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224B39C - add r0, r4, #0 - bl ov7_02249E0C - add r0, r5, #0 - bl sub_0200DA58 -_0224B39C: - pop {r3, r4, r5, pc} - nop -_0224B3A0: .word 0x0224F5A0 -_0224B3A4: .word 0x021BF67C - thumb_func_end ov7_0224B370 - - thumb_func_start ov7_0224B3A8 -ov7_0224B3A8: ; 0x0224B3A8 - push {r3, lr} - mov r0, #0 - bl sub_02036994 - ldr r0, _0224B3D0 ; =0x0224F5A0 - mov r1, #2 - ldr r0, [r0, #0] - add r0, #0x88 - str r1, [r0, #0] - mov r0, #1 - add r1, r0, #0 - bl sub_020388F4 - bl sub_02032AC0 - mov r0, #1 - bl sub_02033EA8 - pop {r3, pc} - nop -_0224B3D0: .word 0x0224F5A0 - thumb_func_end ov7_0224B3A8 - - thumb_func_start ov7_0224B3D4 -ov7_0224B3D4: ; 0x0224B3D4 - ldr r0, _0224B3E0 ; =0x0224F5A0 - ldr r3, _0224B3E4 ; =sub_02036158 - ldr r0, [r0, #0] - add r0, #0x91 - ldrb r0, [r0] - bx r3 - ; .align 2, 0 -_0224B3E0: .word 0x0224F5A0 -_0224B3E4: .word sub_02036158 - thumb_func_end ov7_0224B3D4 - - thumb_func_start ov7_0224B3E8 -ov7_0224B3E8: ; 0x0224B3E8 - ldr r0, _0224B3F4 ; =0x0224F5A0 - ldr r3, _0224B3F8 ; =sub_02036148 - ldr r0, [r0, #0] - add r0, #0x91 - ldrb r0, [r0] - bx r3 - ; .align 2, 0 -_0224B3F4: .word 0x0224F5A0 -_0224B3F8: .word sub_02036148 - thumb_func_end ov7_0224B3E8 - - thumb_func_start ov7_0224B3FC -ov7_0224B3FC: ; 0x0224B3FC - ldr r0, _0224B410 ; =0x0224F5A0 - ldr r2, [r0, #0] - add r0, r2, #0 - add r0, #0x92 - add r2, #0x93 - ldrb r1, [r0] - ldrb r0, [r2] - lsl r0, r0, #4 - add r0, r1, r0 - bx lr - ; .align 2, 0 -_0224B410: .word 0x0224F5A0 - thumb_func_end ov7_0224B3FC - - thumb_func_start ov7_0224B414 -ov7_0224B414: ; 0x0224B414 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov7_02249AB4 - ldr r0, _0224B44C ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x91 - strb r4, [r0] - sub r0, r4, #3 - cmp r0, #1 - bhi _0224B436 - mov r0, #0 - add r5, #0xb0 - str r0, [r5, #0] -_0224B436: - ldr r0, _0224B44C ; =0x0224F5A0 - ldr r1, [r0, #0] - add r1, #0x92 - strb r6, [r1] - ldr r1, [r0, #0] - add r1, #0x93 - strb r7, [r1] - ldr r0, [r0, #0] - bl ov7_02249C2C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B44C: .word 0x0224F5A0 - thumb_func_end ov7_0224B414 - - thumb_func_start ov7_0224B450 -ov7_0224B450: ; 0x0224B450 - ldr r0, _0224B458 ; =0x0224F5A0 - ldr r3, _0224B45C ; =ov7_02249E0C - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0224B458: .word 0x0224F5A0 -_0224B45C: .word ov7_02249E0C - thumb_func_end ov7_0224B450 - - thumb_func_start ov7_0224B460 -ov7_0224B460: ; 0x0224B460 - push {r4, lr} - ldr r0, _0224B478 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x88 - ldr r4, [r0, #0] - cmp r4, #0 - beq _0224B472 - bl ov7_02249B98 -_0224B472: - add r0, r4, #0 - pop {r4, pc} - nop -_0224B478: .word 0x0224F5A0 - thumb_func_end ov7_0224B460 - - thumb_func_start ov7_0224B47C -ov7_0224B47C: ; 0x0224B47C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov7_02249AB4 - ldr r0, _0224B4B4 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x91 - strb r4, [r0] - sub r0, r4, #3 - cmp r0, #1 - bhi _0224B49E - mov r0, #0 - add r5, #0xb0 - str r0, [r5, #0] -_0224B49E: - ldr r0, _0224B4B4 ; =0x0224F5A0 - ldr r1, [r0, #0] - add r1, #0x92 - strb r6, [r1] - ldr r1, [r0, #0] - add r1, #0x93 - strb r7, [r1] - ldr r0, [r0, #0] - bl ov7_0224A510 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B4B4: .word 0x0224F5A0 - thumb_func_end ov7_0224B47C - - thumb_func_start ov7_0224B4B8 -ov7_0224B4B8: ; 0x0224B4B8 - ldr r0, _0224B4C0 ; =0x0224F5A0 - ldr r3, _0224B4C4 ; =ov7_0224A53C - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0224B4C0: .word 0x0224F5A0 -_0224B4C4: .word ov7_0224A53C - thumb_func_end ov7_0224B4B8 - - thumb_func_start ov7_0224B4C8 -ov7_0224B4C8: ; 0x0224B4C8 - push {r4, lr} - ldr r0, _0224B4E0 ; =0x0224F5A0 - ldr r0, [r0, #0] - add r0, #0x88 - ldr r4, [r0, #0] - cmp r4, #0 - beq _0224B4DA - bl ov7_02249B98 -_0224B4DA: - add r0, r4, #0 - pop {r4, pc} - nop -_0224B4E0: .word 0x0224F5A0 - thumb_func_end ov7_0224B4C8 - - thumb_func_start ov7_0224B4E4 -ov7_0224B4E4: ; 0x0224B4E4 - mov r0, #0 - bx lr - thumb_func_end ov7_0224B4E4 - - thumb_func_start ov7_0224B4E8 -ov7_0224B4E8: ; 0x0224B4E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x54 - add r4, r1, #0 - bl sub_0201A7CC - cmp r0, #0 - bne _0224B522 - add r0, r5, #0 - add r0, #0x54 - bl sub_0201A7A0 - ldr r0, [r5, #0x10] - add r1, r5, #0 - ldr r0, [r0, #8] - add r1, #0x54 - mov r2, #3 - bl sub_0205D8F4 - ldr r0, [r5, #0x10] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r1, r0, #0 - add r0, r5, #0 - add r0, #0x54 - bl sub_0205D944 - b _0224B52A -_0224B522: - add r0, r5, #0 - add r0, #0x54 - bl sub_0205D988 -_0224B52A: - ldr r0, [r5, #0x68] - ldr r2, [r5, #0x14] - add r1, r4, #0 - bl sub_0200B1B8 - ldr r0, [r5, #0x64] - ldr r1, [r5, #0x18] - ldr r2, [r5, #0x14] - bl sub_0200C388 - ldr r0, [r5, #0x10] - ldr r0, [r0, #0xc] - bl sub_02025E44 - add r2, r0, #0 - add r0, r5, #0 - ldr r1, [r5, #0x18] - add r0, #0x54 - mov r3, #1 - bl sub_0205D994 - str r0, [r5, #0x74] - pop {r3, r4, r5, pc} - thumb_func_end ov7_0224B4E8 - - thumb_func_start ov7_0224B558 -ov7_0224B558: ; 0x0224B558 - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - beq _0224B570 - add r0, #0x54 - mov r1, #0 - bl sub_0200E084 - add r0, r4, #0 - add r0, #0x54 - bl sub_0201ACF4 -_0224B570: - add r4, #0x54 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224B558 - - thumb_func_start ov7_0224B57C -ov7_0224B57C: ; 0x0224B57C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x10] - ldr r2, [r4, #0x1c] - ldr r0, [r0, #0xc] - mov r3, #4 - bl sub_0202616C - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r1, #0 - ldr r0, [r4, #0x64] - ldr r2, [r4, #0x1c] - add r3, r1, #0 - bl sub_0200B48C - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224B57C - - thumb_func_start ov7_0224B5A8 -ov7_0224B5A8: ; 0x0224B5A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r5, #0 - ldr r0, [r0, #0xc] - mov r1, #0 - add r4, #0x34 - bl sub_0202610C - mov r6, #5 - cmp r0, #0 - beq _0224B5C4 - add r6, r6, #1 -_0224B5C4: - add r0, r4, #0 - bl sub_0201A7CC - cmp r0, #0 - bne _0224B656 - add r0, r6, #2 - mov r1, #4 - bl sub_02013A04 - str r0, [r5, #8] - mov r3, #1 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r6, #2 - lsl r0, r0, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - str r3, [sp, #0x10] - ldr r0, [r5, #0x10] - add r1, r4, #0 - ldr r0, [r0, #8] - mov r2, #3 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224B6A4 ; =0x000003D9 - add r0, #0x34 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r0, [r5, #8] - ldr r1, [r5, #0x68] - mov r2, #0x7b - mov r3, #0xc - bl sub_02013A4C - mov r4, #0 - cmp r6, #0 - ble _0224B648 - mov r7, #0x71 -_0224B61C: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224B57C - ldr r0, [r5, #0x68] - ldr r2, [r5, #0x1c] - add r1, r7, #0 - bl sub_0200B1B8 - ldr r0, [r5, #0x64] - ldr r1, [r5, #0x20] - ldr r2, [r5, #0x1c] - bl sub_0200C388 - ldr r0, [r5, #8] - ldr r1, [r5, #0x20] - add r2, r4, #0 - bl sub_02013A6C - add r4, r4, #1 - cmp r4, r6 - blt _0224B61C -_0224B648: - mov r2, #0x72 - add r3, r2, #0 - ldr r0, [r5, #8] - ldr r1, [r5, #0x68] - sub r3, #0x74 - bl sub_02013A4C -_0224B656: - ldr r4, _0224B6A8 ; =0x0224F188 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r6, #2 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - add r0, sp, #0x14 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - ldr r0, [r5, #8] - mov r1, #0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0x34 - str r0, [sp, #0x20] - add r0, r2, #0 - add r2, r5, #0 - str r5, [sp, #0x30] - add r2, #0x78 - ldrh r2, [r2] - mov r3, #4 - bl sub_0200112C - str r0, [r5, #0] - add r5, #0x34 - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0224B6A4: .word 0x000003D9 -_0224B6A8: .word 0x0224F188 - thumb_func_end ov7_0224B5A8 - - thumb_func_start ov7_0224B6AC -ov7_0224B6AC: ; 0x0224B6AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0224B6E6 - mov r1, #0 - add r2, r1, #0 - bl sub_02001384 - add r0, r4, #0 - add r0, #0x34 - mov r1, #1 - bl sub_0200DC9C - add r1, r4, #0 - add r1, #0x38 - ldrb r1, [r1] - ldr r0, [r4, #0x34] - bl sub_0201C3C0 - add r0, r4, #0 - add r0, #0x34 - bl sub_0201A8FC - ldr r0, [r4, #8] - bl sub_02013A3C - mov r0, #0 - str r0, [r4, #0] -_0224B6E6: - pop {r4, pc} - thumb_func_end ov7_0224B6AC - - thumb_func_start ov7_0224B6E8 -ov7_0224B6E8: ; 0x0224B6E8 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl sub_02001288 - add r4, r0, #0 - add r2, r5, #0 - ldr r0, [r5, #0] - mov r1, #0 - add r2, #0x78 - bl sub_020014DC - add r0, r5, #0 - add r0, #0x80 - ldrh r6, [r0] - add r1, r5, #0 - ldr r0, [r5, #0] - add r1, #0x80 - bl sub_020014D0 - add r0, r5, #0 - add r0, #0x80 - ldrh r0, [r0] - cmp r6, r0 - beq _0224B720 - ldr r0, _0224B784 ; =0x000005DC - bl sub_02005748 -_0224B720: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224B750 - add r0, r0, #1 - cmp r4, r0 - beq _0224B734 - cmp r4, #0xc - beq _0224B738 - b _0224B76A -_0224B734: - mov r0, #0 - pop {r4, r5, r6, pc} -_0224B738: - ldr r0, _0224B784 ; =0x000005DC - bl sub_02005748 - ldr r0, [r5, #0x10] - mov r1, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - bl ov7_0224B6AC - mov r0, #2 - pop {r4, r5, r6, pc} -_0224B750: - ldr r0, _0224B784 ; =0x000005DC - bl sub_02005748 - ldr r0, [r5, #0x10] - mov r1, #0 - add r0, #0xb0 - str r1, [r0, #0] - add r0, r5, #0 - bl ov7_0224B6AC - mov r0, #0 - mvn r0, r0 - pop {r4, r5, r6, pc} -_0224B76A: - ldr r0, _0224B784 ; =0x000005DC - bl sub_02005748 - ldr r0, [r5, #0x10] - add r1, r4, #0 - ldr r0, [r0, #0xc] - bl sub_02026150 - ldr r1, [r5, #0x10] - add r1, #0xb0 - str r0, [r1, #0] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224B784: .word 0x000005DC - thumb_func_end ov7_0224B6E8 - - thumb_func_start ov7_0224B788 -ov7_0224B788: ; 0x0224B788 - push {r3, r4, r5, r6, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #3 - mov r1, #4 - ldr r4, _0224B82C ; =0x0224F4D8 - bl sub_02013A04 - str r0, [r5, #0xc] - mov r0, #0xa - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _0224B830 ; =0x00000201 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0x10] - add r1, #0x44 - ldr r0, [r0, #8] - mov r2, #3 - mov r3, #0x16 - bl sub_0201A7E8 - add r0, r5, #0 - ldr r2, _0224B834 ; =0x000003D9 - add r0, #0x44 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r6, #0 -_0224B7CE: - ldr r0, [r5, #0xc] - ldr r1, [r5, #0x68] - ldr r2, [r4, #0] - ldr r3, [r4, #4] - bl sub_02013A4C - add r6, r6, #1 - add r4, #8 - cmp r6, #3 - blt _0224B7CE - ldr r4, _0224B838 ; =0x0224F188 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - mov r1, #3 - add r0, sp, #0x14 - strh r1, [r0, #0x10] - strh r1, [r0, #0x12] - ldr r0, [r5, #0xc] - mov r1, #0 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #0x44 - str r0, [sp, #0x20] - add r0, r2, #0 - add r2, r5, #0 - str r5, [sp, #0x30] - add r2, #0x7a - ldrh r2, [r2] - mov r3, #4 - bl sub_0200112C - str r0, [r5, #4] - add r5, #0x44 - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x34 - pop {r3, r4, r5, r6, pc} - nop -_0224B82C: .word 0x0224F4D8 -_0224B830: .word 0x00000201 -_0224B834: .word 0x000003D9 -_0224B838: .word 0x0224F188 - thumb_func_end ov7_0224B788 - - thumb_func_start ov7_0224B83C -ov7_0224B83C: ; 0x0224B83C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - bl sub_02001288 - add r4, r0, #0 - add r2, r5, #0 - ldr r0, [r5, #4] - mov r1, #0 - add r2, #0x7a - bl sub_020014DC - add r0, r5, #0 - add r0, #0x82 - ldrh r6, [r0] - add r1, r5, #0 - ldr r0, [r5, #4] - add r1, #0x82 - bl sub_020014D0 - add r0, r5, #0 - add r0, #0x82 - ldrh r0, [r0] - cmp r6, r0 - beq _0224B874 - ldr r0, _0224B8D8 ; =0x000005DC - bl sub_02005748 -_0224B874: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224B886 - add r0, r0, #1 - cmp r4, r0 - bne _0224B892 - mov r0, #0 - pop {r4, r5, r6, pc} -_0224B886: - ldr r0, _0224B8D8 ; =0x000005DC - bl sub_02005748 - mov r4, #0 - mvn r4, r4 - b _0224B89E -_0224B892: - ldr r0, _0224B8D8 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov7_0224B6AC -_0224B89E: - ldr r0, [r5, #4] - cmp r0, #0 - beq _0224B8D4 - mov r1, #0 - add r2, r1, #0 - bl sub_02001384 - add r0, r5, #0 - add r0, #0x44 - mov r1, #1 - bl sub_0200DC9C - add r1, r5, #0 - add r1, #0x48 - ldrb r1, [r1] - ldr r0, [r5, #0x44] - bl sub_0201C3C0 - add r0, r5, #0 - add r0, #0x44 - bl sub_0201A8FC - ldr r0, [r5, #0xc] - bl sub_02013A3C - mov r0, #0 - str r0, [r5, #4] -_0224B8D4: - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224B8D8: .word 0x000005DC - thumb_func_end ov7_0224B83C - - thumb_func_start ov7_0224B8DC -ov7_0224B8DC: ; 0x0224B8DC - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - ldr r2, _0224BB80 ; =0x00000161 - str r0, [sp, #0x14] - ldr r5, [r0, #0x64] - mov r0, #0 - mov r1, #0x1a - mov r3, #4 - bl sub_0200B144 - str r0, [sp, #0x30] - mov r0, #0xb4 - mov r1, #4 - bl sub_02023790 - str r0, [sp, #0x2c] - mov r0, #0xb4 - mov r1, #4 - bl sub_02023790 - str r0, [sp, #0x28] - ldr r0, [sp, #0x14] - mov r2, #3 - str r0, [sp, #0x24] - add r0, #0x24 - str r0, [sp, #0x24] - mov r0, #2 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #0x13 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x24] - ldr r0, [r0, #0x10] - mov r3, #4 - ldr r0, [r0, #8] - bl sub_0201A7E8 - ldr r0, [sp, #0x24] - ldr r2, _0224BB84 ; =0x000003D9 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - ldr r0, [sp, #0x24] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - add r1, r0, #0 - add r1, #0x78 - ldrh r1, [r1] - sub r1, r1, #1 - bl ov7_0224B57C - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x2c] - mov r1, #0x5f - bl sub_0200B1B8 - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x2c] - add r0, r5, #0 - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x28] - mov r3, #0x39 - str r1, [sp, #8] - bl sub_0201D738 - mov r6, #0 - mov r4, #0x10 - mov r7, #0xff -_0224B982: - add r1, r6, #0 - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x2c] - add r1, #0x4b - bl sub_0200B1B8 - str r4, [sp] - str r7, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x2c] - mov r1, #0 - mov r3, #2 - bl sub_0201D738 - add r6, r6, #1 - add r4, #0xf - cmp r6, #9 - blt _0224B982 - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, _0224BB88 ; =0x0224F4CC - ldr r7, _0224BB8C ; =0x0224F4C0 - str r0, [sp, #0x20] - mov r0, #0x10 - str r0, [sp, #0x1c] -_0224B9B8: - ldr r0, [sp, #0x14] - ldrb r1, [r7] - ldr r0, [r0, #0x10] - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_02026074 - add r2, r0, #0 - ldr r0, [sp, #0x20] - ldrb r4, [r0] - ldrb r0, [r7] - cmp r0, #0xb - bls _0224B9D4 - b _0224BB10 -_0224B9D4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224B9E0: ; jump table - .short _0224BB10 - _0224B9E0 - 2 ; case 0 - .short _0224B9F8 - _0224B9E0 - 2 ; case 1 - .short _0224BA0A - _0224B9E0 - 2 ; case 2 - .short _0224BA1E - _0224B9E0 - 2 ; case 3 - .short _0224BB0A - _0224B9E0 - 2 ; case 4 - .short _0224BA3A - _0224B9E0 - 2 ; case 5 - .short _0224BB10 - _0224B9E0 - 2 ; case 6 - .short _0224BAB8 - _0224B9E0 - 2 ; case 7 - .short _0224BB10 - _0224B9E0 - 2 ; case 8 - .short _0224BB0A - _0224B9E0 - 2 ; case 9 - .short _0224BB0A - _0224B9E0 - 2 ; case 10 - .short _0224BB0A - _0224B9E0 - 2 ; case 11 -_0224B9F8: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #1 - bl sub_0200B60C - b _0224BB10 -_0224BA0A: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - b _0224BB10 -_0224BA1E: - cmp r2, #0 - bne _0224BA26 - mov r4, #0x60 - b _0224BB10 -_0224BA26: - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - b _0224BB10 -_0224BA3A: - cmp r2, #0 - ldr r0, _0224BB90 ; =0x00002710 - blt _0224BA54 - mul r0, r2 - mov r1, #0xfe - bl sub_020E1F6C - add r0, r0, #5 - mov r1, #0xa - bl sub_020E1F6C - add r6, r0, #0 - b _0224BA68 -_0224BA54: - neg r1, r2 - mul r0, r1 - mov r1, #0xfe - bl sub_020E1F6C - add r0, r0, #5 - mov r1, #0xa - bl sub_020E1F6C - neg r6, r0 -_0224BA68: - add r0, r6, #0 - mov r1, #0xc - bl sub_020E1F6C - bl sub_020D4070 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #2 - bl sub_0200B60C - add r0, r6, #0 - mov r1, #0xc - bl sub_020E1F6C - add r0, r1, #0 - bl sub_020D4070 - add r2, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - mov r3, #2 - bl sub_0200B60C - cmp r6, #0 - bne _0224BAB2 - mov r4, #0x60 - b _0224BB10 -_0224BAB2: - ble _0224BB10 - add r4, r4, #1 - b _0224BB10 -_0224BAB8: - cmp r2, #0 - ldr r0, _0224BB94 ; =0x00035D2E - blt _0224BAD0 - add r1, r2, #0 - mul r1, r0 - ldr r0, _0224BB98 ; =0x0000C350 - add r0, r1, r0 - ldr r1, _0224BB9C ; =0x000186A0 - bl sub_020E1F6C - add r6, r0, #0 - b _0224BAE2 -_0224BAD0: - neg r1, r2 - add r2, r1, #0 - mul r2, r0 - ldr r0, _0224BB98 ; =0x0000C350 - ldr r1, _0224BB9C ; =0x000186A0 - add r0, r2, r0 - bl sub_020E1F6C - neg r6, r0 -_0224BAE2: - add r0, r6, #0 - bl sub_020D4070 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r3, #3 - bl sub_0200B60C - cmp r6, #0 - bne _0224BB04 - mov r4, #0x60 - b _0224BB10 -_0224BB04: - ble _0224BB10 - add r4, r4, #1 - b _0224BB10 -_0224BB0A: - cmp r2, #0 - bne _0224BB10 - add r4, r4, #1 -_0224BB10: - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x2c] - add r1, r4, #0 - bl sub_0200B1B8 - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x2c] - add r0, r5, #0 - bl sub_0200C388 - mov r0, #0 - ldr r1, [sp, #0x28] - add r2, r0, #0 - bl sub_02002D7C - add r4, r0, #0 - ldr r0, [sp, #0x1c] - mov r3, #0xbf - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x24] - ldr r2, [sp, #0x28] - mov r1, #0 - sub r3, r3, r4 - bl sub_0201D738 - ldr r0, [sp, #0x20] - add r7, r7, #1 - add r0, r0, #1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x1c] - add r0, #0xf - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #9 - bge _0224BB64 - b _0224B9B8 -_0224BB64: - ldr r0, [sp, #0x2c] - bl sub_020237BC - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x30] - bl sub_0200B190 - ldr r0, [sp, #0x24] - bl sub_0201A954 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BB80: .word 0x00000161 -_0224BB84: .word 0x000003D9 -_0224BB88: .word 0x0224F4CC -_0224BB8C: .word 0x0224F4C0 -_0224BB90: .word 0x00002710 -_0224BB94: .word 0x00035D2E -_0224BB98: .word 0x0000C350 -_0224BB9C: .word 0x000186A0 - thumb_func_end ov7_0224B8DC - - thumb_func_start ov7_0224BBA0 -ov7_0224BBA0: ; 0x0224BBA0 - push {r4, lr} - add r4, r0, #0 - add r0, #0x24 - mov r1, #1 - bl sub_0200DC9C - add r1, r4, #0 - add r1, #0x28 - ldrb r1, [r1] - ldr r0, [r4, #0x24] - bl sub_0201C3C0 - add r4, #0x24 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224BBA0 - - thumb_func_start ov7_0224BBC4 -ov7_0224BBC4: ; 0x0224BBC4 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x10] - ldr r0, [r0, #0xc] - bl sub_0207A268 - add r1, r0, #0 - ldr r0, [r4, #0x10] - ldr r2, [r4, #0x6c] - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_0207A594 - cmp r0, #0 - beq _0224BBEE - cmp r0, #1 - beq _0224BC2E - cmp r0, #4 - beq _0224BBF4 - b _0224BC2E -_0224BBEE: - add sp, #8 - mov r0, #1 - pop {r4, pc} -_0224BBF4: - ldr r0, _0224BC70 ; =0x000005F3 - bl sub_02005748 - add r1, r4, #0 - add r1, #0x78 - ldrh r1, [r1] - add r0, r4, #0 - sub r1, r1, #1 - bl ov7_0224B57C - ldr r0, [r4, #0x10] - mov r1, #1 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_02026074 - mov r1, #1 - str r1, [sp] - str r1, [sp, #4] - add r2, r0, #0 - ldr r0, [r4, #0x64] - add r3, r1, #0 - bl sub_0200B60C - add r0, r4, #0 - mov r1, #0x6b - bl ov7_0224B4E8 - b _0224BC68 -_0224BC2E: - ldr r0, _0224BC70 ; =0x000005F3 - bl sub_02005748 - add r1, r4, #0 - add r1, #0x78 - ldrh r1, [r1] - add r0, r4, #0 - sub r1, r1, #1 - bl ov7_0224B57C - ldr r0, [r4, #0x10] - mov r1, #3 - add r0, #0xb0 - ldr r0, [r0, #0] - bl sub_02026074 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r0, [r4, #0x64] - mov r3, #3 - bl sub_0200B60C - add r0, r4, #0 - mov r1, #0x79 - bl ov7_0224B4E8 -_0224BC68: - mov r0, #0 - add sp, #8 - pop {r4, pc} - nop -_0224BC70: .word 0x000005F3 - thumb_func_end ov7_0224BBC4 - - thumb_func_start ov7_0224BC74 -ov7_0224BC74: ; 0x0224BC74 - push {r4, lr} - add r4, r0, #0 - bl sub_02050A60 - add r0, r4, #0 - bl sub_02050A64 - add r4, r0, #0 - ldr r1, [r4, #0x7c] - cmp r1, #0xb - bls _0224BC8C - b _0224BE02 -_0224BC8C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224BC98: ; jump table - .short _0224BCB0 - _0224BC98 - 2 ; case 0 - .short _0224BCBE - _0224BC98 - 2 ; case 1 - .short _0224BCDC - _0224BC98 - 2 ; case 2 - .short _0224BD0E - _0224BC98 - 2 ; case 3 - .short _0224BD1A - _0224BC98 - 2 ; case 4 - .short _0224BD40 - _0224BC98 - 2 ; case 5 - .short _0224BD5A - _0224BC98 - 2 ; case 6 - .short _0224BD78 - _0224BC98 - 2 ; case 7 - .short _0224BD8C - _0224BC98 - 2 ; case 8 - .short _0224BDAE - _0224BC98 - 2 ; case 9 - .short _0224BE06 - _0224BC98 - 2 ; case 10 - .short _0224BDC2 - _0224BC98 - 2 ; case 11 -_0224BCB0: - mov r1, #0x6a - bl ov7_0224B4E8 - ldr r0, [r4, #0x7c] - add r0, r0, #1 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BCBE: - ldr r0, [r4, #0x74] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DA04 - cmp r0, #0 - bne _0224BCCE - b _0224BE06 -_0224BCCE: - add r0, r4, #0 - bl ov7_0224B5A8 - ldr r0, [r4, #0x7c] - add r0, r0, #1 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BCDC: - bl ov7_0224B6E8 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0224BCF4 - ldr r0, [r4, #0x70] - mov r1, #2 - strh r1, [r0] - mov r0, #0xb - str r0, [r4, #0x7c] - b _0224BE06 -_0224BCF4: - cmp r0, #2 - bne _0224BD04 - ldr r0, [r4, #0x70] - mov r1, #3 - strh r1, [r0] - mov r0, #0xb - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD04: - cmp r0, #1 - bne _0224BE06 - mov r0, #3 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD0E: - bl ov7_0224B788 - ldr r0, [r4, #0x7c] - add r0, r0, #1 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD1A: - bl ov7_0224B83C - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0224BD2C - mov r0, #2 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD2C: - cmp r0, #1 - bne _0224BD36 - mov r0, #5 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD36: - cmp r0, #2 - bne _0224BE06 - mov r0, #7 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD40: - bl ov7_0224BBC4 - cmp r0, #0 - beq _0224BD54 - ldr r0, [r4, #0x70] - mov r1, #1 - strh r1, [r0] - mov r0, #0xb - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD54: - mov r0, #6 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD5A: - ldr r0, [r4, #0x74] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DA04 - cmp r0, #0 - beq _0224BE06 - ldr r0, _0224BE0C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224BE06 - mov r0, #0 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD78: - mov r1, #1 - bl ov7_0224B558 - add r0, r4, #0 - bl ov7_0224B8DC - ldr r0, [r4, #0x7c] - add r0, r0, #1 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BD8C: - ldr r1, _0224BE0C ; =0x021BF67C - ldr r2, [r1, #0x48] - mov r1, #3 - tst r1, r2 - beq _0224BE06 - bl ov7_0224BBA0 - add r0, r4, #0 - mov r1, #0x6a - bl ov7_0224B4E8 - add r0, r4, #0 - bl ov7_0224B5A8 - mov r0, #9 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BDAE: - ldr r0, [r4, #0x74] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0205DA04 - cmp r0, #0 - beq _0224BE06 - mov r0, #3 - str r0, [r4, #0x7c] - b _0224BE06 -_0224BDC2: - bl ov7_0224B6AC - add r0, r4, #0 - mov r1, #0 - bl ov7_0224B558 - ldr r0, [r4, #0x64] - bl sub_0200B3F0 - ldr r0, [r4, #0x68] - bl sub_0200B190 - ldr r0, [r4, #0x14] - bl sub_020237BC - ldr r0, [r4, #0x18] - bl sub_020237BC - ldr r0, [r4, #0x1c] - bl sub_020237BC - ldr r0, [r4, #0x20] - bl sub_020237BC - ldr r0, [r4, #0x6c] - bl sub_0207A2C0 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r4, pc} -_0224BE02: - mov r0, #1 - pop {r4, pc} -_0224BE06: - mov r0, #0 - pop {r4, pc} - nop -_0224BE0C: .word 0x021BF67C - thumb_func_end ov7_0224BC74 - - thumb_func_start ov7_0224BE10 -ov7_0224BE10: ; 0x0224BE10 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xb - mov r1, #0x84 - bl sub_02018184 - mov r1, #0 - mov r2, #0x84 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0 - str r0, [r4, #0x7c] - str r5, [r4, #0x10] - add r5, #0xb0 - str r0, [r5, #0] - mov r0, #4 - bl sub_0200B358 - str r0, [r4, #0x64] - mov r0, #0 - mov r1, #0x1a - mov r2, #0xdd - mov r3, #4 - bl sub_0200B144 - str r0, [r4, #0x68] - mov r0, #0xb4 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x14] - mov r0, #0xb4 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x18] - mov r0, #0xb4 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x1c] - mov r0, #0xb4 - mov r1, #4 - bl sub_02023790 - str r0, [r4, #0x20] - mov r0, #0xb - bl sub_0207A2A8 - str r0, [r4, #0x6c] - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov7_0224BE10 - - thumb_func_start ov7_0224BE7C -ov7_0224BE7C: ; 0x0224BE7C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl sub_02050A60 - bl ov7_0224BE10 - add r2, r0, #0 - ldr r1, _0224BE98 ; =ov7_0224BC74 - add r0, r5, #0 - str r4, [r2, #0x70] - bl sub_02050944 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224BE98: .word ov7_0224BC74 - thumb_func_end ov7_0224BE7C - - thumb_func_start ov7_0224BE9C -ov7_0224BE9C: ; 0x0224BE9C - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0xc1 - lsl r1, r1, #2 - add r5, r0, #0 - add r7, r2, #0 - bl sub_02018144 - mov r2, #0xc1 - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - str r5, [r4, #0x18] - str r7, [r4, #0x14] - str r6, [r4, #8] - add r0, r6, #0 - bl sub_0202A750 - bl sub_02029D04 - str r0, [r4, #0xc] - add r0, r6, #0 - bl sub_0207D990 - str r0, [r4, #0x10] - mov r2, #0x8f - ldr r3, [r4, #0x18] - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - bl sub_0200B144 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - bl ov7_0224C338 - add r0, r4, #0 - bl ov7_0224C35C - add r0, r4, #0 - bl ov7_0224C3CC - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov7_0224BE9C - - thumb_func_start ov7_0224BEFC -ov7_0224BEFC: ; 0x0224BEFC - push {r4, lr} - add r4, r0, #0 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200B190 - add r0, r4, #0 - bl ov7_0224C3B8 - add r0, r4, #0 - bl ov7_0224C3E0 - mov r2, #0xc1 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224BEFC - - thumb_func_start ov7_0224BF2C -ov7_0224BF2C: ; 0x0224BF2C - push {r4, r5, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0xc - bls _0224BF3A - b _0224C32A -_0224BF3A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224BF46: ; jump table - .short _0224BF60 - _0224BF46 - 2 ; case 0 - .short _0224BF9E - _0224BF46 - 2 ; case 1 - .short _0224BFDE - _0224BF46 - 2 ; case 2 - .short _0224C036 - _0224BF46 - 2 ; case 3 - .short _0224C06C - _0224BF46 - 2 ; case 4 - .short _0224C10E - _0224BF46 - 2 ; case 5 - .short _0224C122 - _0224BF46 - 2 ; case 6 - .short _0224C212 - _0224BF46 - 2 ; case 7 - .short _0224C262 - _0224BF46 - 2 ; case 8 - .short _0224C28E - _0224BF46 - 2 ; case 9 - .short _0224C2BA - _0224BF46 - 2 ; case 10 - .short _0224C2CE - _0224BF46 - 2 ; case 11 - .short _0224C2FC - _0224BF46 - 2 ; case 12 -_0224BF60: - mov r3, #0x55 - lsl r3, r3, #2 - add r0, r4, r3 - sub r3, r3, #4 - ldr r1, [r4, #0x14] - ldr r2, [r4, #0x18] - ldr r3, [r4, r3] - bl ov7_0224C3EC - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #4 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb - str r0, [r4, #0] - mov r0, #1 - str r0, [r4, #4] - b _0224C32A -_0224BF9E: - ldr r0, [r4, #0xc] - ldr r1, _0224C2EC ; =0x0224F1B4 - mov r2, #0x16 - bl ov7_0224CC88 - cmp r0, #0 - beq _0224BFD8 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb - str r0, [r4, #0] - mov r0, #0xc - str r0, [r4, #4] - b _0224C32A -_0224BFD8: - mov r0, #2 - str r0, [r4, #0] - b _0224C32A -_0224BFDE: - mov r2, #0x5a - lsl r2, r2, #2 - add r0, r4, r2 - sub r2, #0x20 - ldr r1, [r4, #0x14] - ldr r2, [r4, r2] - ldr r3, [r4, #0x18] - bl ov7_0224C620 - ldr r0, [r4, #0x18] - mov r1, #0x5a - str r0, [sp] - ldr r0, [r4, #0x14] - lsl r1, r1, #2 - str r0, [sp, #4] - mov r0, #0x2f - lsl r0, r0, #4 - ldr r2, _0224C2EC ; =0x0224F1B4 - ldr r3, [r4, #0x10] - add r0, r4, r0 - add r1, r4, r1 - bl ov7_0224CBD0 - mov r1, #0x52 - mov r0, #0x16 - lsl r1, r1, #2 - str r0, [sp] - ldr r0, [r4, r1] - add r1, #0x3c - str r0, [sp, #4] - mov r0, #0x2f - lsl r0, r0, #4 - add r0, r4, r0 - str r0, [sp, #8] - ldr r0, _0224C2F0 ; =ov7_0224CBE4 - ldr r3, _0224C2EC ; =0x0224F1B4 - str r0, [sp, #0xc] - ldr r0, [r4, #0x1c] - str r0, [sp, #0x10] - add r0, r4, r1 - ldr r1, [r4, #0x14] - ldr r2, [r4, #0x18] - bl ov7_0224C768 -_0224C036: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CA0C - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #6 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xa - str r0, [r4, #0] - mov r0, #4 - str r0, [r4, #4] - b _0224C32A -_0224C06C: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224C9A4 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224C0D2 - sub r1, r1, #1 - cmp r0, r1 - beq _0224C0D2 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x12 - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - ldr r0, [r4, #0x14] - mov r1, #3 - add r3, r2, #0 - bl sub_02019CB8 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CA34 - mov r0, #0x2b - lsl r0, r0, #4 - ldrh r0, [r4, r0] - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [sp] - add r0, r4, r1 - sub r1, #0xc - ldr r1, [r4, r1] - ldr r2, [r4, #0x18] - ldr r3, _0224C2EC ; =0x0224F1B4 - bl ov7_0224C4E0 - mov r0, #0xa - str r0, [r4, #0] - mov r0, #5 - str r0, [r4, #4] - ldr r0, _0224C2F4 ; =0x000005DC - bl sub_02005748 - b _0224C32A -_0224C0D2: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0224C0DC - b _0224C32A -_0224C0DC: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xb - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb - str r0, [r4, #0] - mov r0, #0xc - str r0, [r4, #4] - ldr r0, _0224C2F4 ; =0x000005DC - bl sub_02005748 - b _0224C32A -_0224C10E: - mov r0, #0xb9 - lsl r0, r0, #2 - ldr r1, [r4, #0x14] - ldr r2, [r4, #0x18] - add r0, r4, r0 - bl ov7_0224CC44 - mov r0, #6 - str r0, [r4, #0] - b _0224C32A -_0224C122: - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CC78 - cmp r0, #0 - bne _0224C1F8 - mov r2, #0x2b - lsl r2, r2, #4 - ldrh r2, [r4, r2] - ldr r0, [r4, #0x10] - ldr r1, _0224C2EC ; =0x0224F1B4 - ldr r3, [r4, #0x18] - bl ov7_0224CCB8 - cmp r0, #0 - bne _0224C17A - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #9 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb - str r0, [r4, #0] - mov r0, #3 - str r0, [r4, #4] - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CC6C - b _0224C32A -_0224C17A: - mov r2, #0x2b - lsl r2, r2, #4 - ldrh r2, [r4, r2] - ldr r0, [r4, #0xc] - ldr r1, _0224C2EC ; =0x0224F1B4 - bl ov7_0224CCE4 - cmp r0, #0 - bne _0224C1C2 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CC6C - mov r0, #0xb - str r0, [r4, #0] - mov r0, #3 - str r0, [r4, #4] - b _0224C32A -_0224C1C2: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #8 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CC6C - mov r0, #0xb - str r0, [r4, #0] - mov r0, #7 - str r0, [r4, #4] - b _0224C32A -_0224C1F8: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0224C202 - b _0224C32A -_0224C202: - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CC6C - mov r0, #3 - str r0, [r4, #0] - b _0224C32A -_0224C212: - ldr r0, [r4, #0x18] - mov r3, #0x2b - str r0, [sp] - lsl r3, r3, #4 - ldrh r3, [r4, r3] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - ldr r2, _0224C2EC ; =0x0224F1B4 - bl ov7_0224CCF4 - mov r0, #0x2b - lsl r0, r0, #4 - ldrh r0, [r4, r0] - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [sp] - add r0, r4, r1 - sub r1, #0xc - ldr r1, [r4, r1] - ldr r2, [r4, #0x18] - ldr r3, _0224C2EC ; =0x0224F1B4 - bl ov7_0224C580 - ldr r0, [r4, #0xc] - ldr r1, _0224C2EC ; =0x0224F1B4 - mov r2, #0x16 - bl ov7_0224CC88 - cmp r0, #0 - beq _0224C258 - mov r0, #0xb - str r0, [r4, #0] - mov r0, #8 - str r0, [r4, #4] - b _0224C32A -_0224C258: - mov r0, #0xb - str r0, [r4, #0] - mov r0, #3 - str r0, [r4, #4] - b _0224C32A -_0224C262: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xd - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb - str r0, [r4, #0] - mov r0, #9 - str r0, [r4, #4] - b _0224C32A -_0224C28E: - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #5 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - ldr r2, [r4, #0x18] - add r0, r4, r0 - add r1, r5, #0 - bl ov7_0224C468 - add r0, r5, #0 - bl sub_020237BC - mov r0, #0xb - str r0, [r4, #0] - mov r0, #0xc - str r0, [r4, #4] - b _0224C32A -_0224C2BA: - mov r0, #0x55 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224C4B8 - cmp r0, #0 - beq _0224C32A - ldr r0, [r4, #4] - str r0, [r4, #0] - b _0224C32A -_0224C2CE: - mov r0, #0x55 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224C4B8 - cmp r0, #0 - beq _0224C32A - ldr r0, _0224C2F8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224C32A - ldr r0, [r4, #4] - str r0, [r4, #0] - b _0224C32A - ; .align 2, 0 -_0224C2EC: .word 0x0224F1B4 -_0224C2F0: .word ov7_0224CBE4 -_0224C2F4: .word 0x000005DC -_0224C2F8: .word 0x021BF67C -_0224C2FC: - mov r0, #0x55 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224C444 - mov r0, #0x5a - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224C698 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224C934 - mov r0, #0xb9 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov7_0224CC6C - add sp, #0x14 - mov r0, #1 - pop {r4, r5, pc} -_0224C32A: - ldr r0, [r4, #0x1c] - bl sub_020219F8 - mov r0, #0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov7_0224BF2C - - thumb_func_start ov7_0224C338 -ov7_0224C338: ; 0x0224C338 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - bl sub_02025E44 - add r4, r0, #0 - bl sub_02027B50 - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r4, #0 - bl sub_02027AC0 - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r5, r1] - pop {r3, r4, r5, pc} - thumb_func_end ov7_0224C338 - - thumb_func_start ov7_0224C35C -ov7_0224C35C: ; 0x0224C35C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r4, #0x18] - mov r2, #1 - str r0, [sp, #4] - ldr r0, [r4, #0x14] - mov r3, #0xa - bl sub_0200DD0C - mov r1, #6 - ldr r2, [r4, #0x18] - mov r0, #0 - lsl r1, r1, #6 - bl sub_02002E98 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0x18] - mov r1, #3 - str r0, [sp, #4] - ldr r0, [r4, #0x14] - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r1, #0x1a - ldr r2, [r4, #0x18] - mov r0, #0 - lsl r1, r1, #4 - bl sub_02002E7C - ldr r0, [r4, #0x14] - mov r1, #3 - bl sub_02019EBC - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224C35C - - thumb_func_start ov7_0224C3B8 -ov7_0224C3B8: ; 0x0224C3B8 - push {r3, lr} - ldr r0, [r0, #0x14] - mov r1, #3 - bl sub_02019EBC - mov r0, #0 - mov r1, #1 - bl sub_0205D8CC - pop {r3, pc} - thumb_func_end ov7_0224C3B8 - - thumb_func_start ov7_0224C3CC -ov7_0224C3CC: ; 0x0224C3CC - push {r4, lr} - add r4, r0, #0 - add r1, r4, #0 - ldr r2, [r4, #0x18] - mov r0, #2 - add r1, #0x20 - bl sub_020095C4 - str r0, [r4, #0x1c] - pop {r4, pc} - thumb_func_end ov7_0224C3CC - - thumb_func_start ov7_0224C3E0 -ov7_0224C3E0: ; 0x0224C3E0 - ldr r3, _0224C3E8 ; =sub_02021964 - ldr r0, [r0, #0x1c] - bx r3 - nop -_0224C3E8: .word sub_02021964 - thumb_func_end ov7_0224C3E0 - - thumb_func_start ov7_0224C3EC -ov7_0224C3EC: ; 0x0224C3EC - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #1 - beq _0224C43E - str r3, [r5, #8] - add r0, r2, #0 - mov r1, #1 - bl sub_0201A778 - str r0, [r5, #4] - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xc - str r0, [sp, #0xc] - mov r0, #0x28 - str r0, [sp, #0x10] - ldr r1, [r5, #4] - add r0, r4, #0 - mov r2, #3 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, [r5, #4] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r5, #4] - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r0, #1 - str r0, [r5, #0] -_0224C43E: - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov7_0224C3EC - - thumb_func_start ov7_0224C444 -ov7_0224C444: ; 0x0224C444 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0224C466 - ldr r0, [r4, #4] - bl sub_0201ACF4 - ldr r0, [r4, #4] - bl sub_0201A8FC - ldr r0, [r4, #4] - mov r1, #1 - bl sub_0201A928 - mov r0, #0 - str r0, [r4, #0] -_0224C466: - pop {r4, pc} - thumb_func_end ov7_0224C444 - - thumb_func_start ov7_0224C468 -ov7_0224C468: ; 0x0224C468 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - add r6, r2, #0 - cmp r0, #0 - beq _0224C47C - bl sub_02022974 -_0224C47C: - ldr r0, [r5, #4] - mov r1, #0xf - bl sub_0201ADA4 - add r0, r4, #0 - add r1, r6, #0 - bl sub_02023868 - str r0, [r5, #0x10] - mov r3, #0 - str r3, [sp] - ldr r0, [r5, #8] - mov r1, #1 - str r0, [sp, #4] - ldr r0, _0224C4B4 ; =0x0001020F - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r5, #0x10] - bl sub_0201D78C - str r0, [r5, #0xc] - ldr r0, [r5, #4] - bl sub_0201A954 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0224C4B4: .word 0x0001020F - thumb_func_end ov7_0224C468 - - thumb_func_start ov7_0224C4B8 -ov7_0224C4B8: ; 0x0224C4B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0224C4DC - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _0224C4D8 - bl sub_020237BC - mov r0, #0 - str r0, [r4, #0x10] -_0224C4D8: - mov r0, #1 - pop {r4, pc} -_0224C4DC: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov7_0224C4B8 - - thumb_func_start ov7_0224C4E0 -ov7_0224C4E0: ; 0x0224C4E0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #8] - str r2, [sp, #0xc] - add r0, r2, #0 - add r4, r1, #0 - add r5, r3, #0 - bl sub_0200B358 - add r6, r0, #0 - ldr r1, [sp, #0xc] - mov r0, #0xc8 - bl sub_02023790 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #7 - bl sub_0200B1EC - ldr r1, [sp, #0x30] - str r0, [sp, #0x14] - add r7, r5, #0 - mov r0, #0xc - add r4, r1, #0 - mul r4, r0 - add r7, #8 - ldr r0, [r7, r4] - cmp r0, #1 - bne _0224C52A - add r2, r5, r4 - ldr r2, [r2, #4] - add r0, r6, #0 - mov r1, #0 - add r2, #0x95 - bl sub_0200B70C - b _0224C538 -_0224C52A: - add r2, r5, r4 - ldr r2, [r2, #4] - add r0, r6, #0 - mov r1, #0 - add r2, #0x95 - bl sub_0200B77C -_0224C538: - mov r0, #0 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r2, [r7, r4] - add r0, r6, #0 - mov r3, #3 - bl sub_0200B60C - ldr r2, [r5, r4] - add r0, r6, #0 - mov r1, #2 - bl sub_0200BFAC - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - add r0, r6, #0 - bl sub_0200C388 - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl ov7_0224C468 - add r0, r6, #0 - bl sub_0200B3F0 - ldr r0, [sp, #0x10] - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov7_0224C4E0 - - thumb_func_start ov7_0224C580 -ov7_0224C580: ; 0x0224C580 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #8] - str r2, [sp, #0xc] - add r0, r2, #0 - add r4, r1, #0 - add r5, r3, #0 - bl sub_0200B358 - add r6, r0, #0 - ldr r1, [sp, #0xc] - mov r0, #0xc8 - bl sub_02023790 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #0xc - bl sub_0200B1EC - ldr r1, [sp, #0x30] - str r0, [sp, #0x14] - add r7, r5, #0 - mov r0, #0xc - add r4, r1, #0 - mul r4, r0 - add r7, #8 - ldr r0, [r7, r4] - cmp r0, #1 - bne _0224C5CA - add r2, r5, r4 - ldr r2, [r2, #4] - add r0, r6, #0 - mov r1, #0 - add r2, #0x95 - bl sub_0200B70C - b _0224C5D8 -_0224C5CA: - add r2, r5, r4 - ldr r2, [r2, #4] - add r0, r6, #0 - mov r1, #0 - add r2, #0x95 - bl sub_0200B77C -_0224C5D8: - mov r0, #0 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r2, [r7, r4] - add r0, r6, #0 - mov r3, #3 - bl sub_0200B60C - ldr r2, [r5, r4] - add r0, r6, #0 - mov r1, #2 - bl sub_0200BFAC - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - add r0, r6, #0 - bl sub_0200C388 - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0xc] - bl ov7_0224C468 - add r0, r6, #0 - bl sub_0200B3F0 - ldr r0, [sp, #0x10] - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov7_0224C580 - - thumb_func_start ov7_0224C620 -ov7_0224C620: ; 0x0224C620 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r0, #0 - ldr r0, [r6, #0] - add r4, r1, #0 - add r7, r2, #0 - str r3, [sp, #0x14] - cmp r0, #1 - beq _0224C692 - add r0, r3, #0 - mov r1, #1 - bl sub_0201A778 - str r0, [r6, #4] - mov r0, #0xb - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x94 - str r0, [sp, #0x10] - ldr r1, [r6, #4] - add r0, r4, #0 - mov r2, #3 - mov r3, #1 - bl sub_0201A7E8 - ldr r0, [sp, #0x14] - bl sub_0200B358 - str r0, [r6, #8] - mov r4, #0 - add r5, r6, #0 -_0224C668: - add r1, r4, #0 - add r0, r7, #0 - add r1, #0x10 - bl sub_0200B1EC - str r0, [r5, #0x10] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _0224C668 - ldr r1, [sp, #0x14] - mov r0, #0x20 - bl sub_02023790 - str r0, [r6, #0xc] - ldr r0, [r6, #4] - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #1 - str r0, [r6, #0] -_0224C692: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov7_0224C620 - - thumb_func_start ov7_0224C698 -ov7_0224C698: ; 0x0224C698 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - cmp r0, #0 - beq _0224C6D8 - mov r4, #0 - add r5, r6, #0 -_0224C6A6: - ldr r0, [r5, #0x10] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _0224C6A6 - ldr r0, [r6, #0xc] - bl sub_020237BC - ldr r0, [r6, #8] - bl sub_0200B3F0 - ldr r0, [r6, #4] - bl sub_0201ACF4 - ldr r0, [r6, #4] - bl sub_0201A8FC - ldr r0, [r6, #4] - mov r1, #1 - bl sub_0201A928 - mov r0, #0 - str r0, [r6, #0] -_0224C6D8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov7_0224C698 - - thumb_func_start ov7_0224C6DC -ov7_0224C6DC: ; 0x0224C6DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - add r5, r0, #0 - ldr r0, [r5, #8] - add r6, #0x95 - add r4, r2, #0 - mov r1, #0 - add r2, r6, #0 - add r7, r3, #0 - bl sub_0200B70C - mov r1, #1 - str r1, [sp] - str r1, [sp, #4] - ldr r0, [r5, #8] - add r2, r4, #0 - mov r3, #3 - bl sub_0200B60C - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r5, #8] - mov r1, #2 - add r2, r7, #0 - mov r3, #3 - bl sub_0200B60C - ldr r0, [r5, #4] - mov r1, #0xf - bl sub_0201ADA4 - mov r7, #0 - add r6, r5, #0 - add r4, r7, #0 -_0224C724: - ldr r0, [r5, #8] - ldr r1, [r5, #0xc] - ldr r2, [r6, #0x10] - bl sub_0200C388 - mov r1, #0 - str r4, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0224C764 ; =0x0001020F - add r3, r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [r5, #4] - ldr r2, [r5, #0xc] - bl sub_0201D78C - add r7, r7, #1 - add r6, r6, #4 - add r4, #0x10 - cmp r7, #3 - blt _0224C724 - ldr r0, [r5, #4] - mov r1, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224C764: .word 0x0001020F - thumb_func_end ov7_0224C6DC - - thumb_func_start ov7_0224C768 -ov7_0224C768: ; 0x0224C768 - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - add r5, r0, #0 - ldr r0, [sp, #0x78] - add r4, r1, #0 - str r0, [sp, #0x78] - ldr r0, [r5, #0] - str r2, [sp, #0x14] - str r3, [sp, #0x18] - cmp r0, #1 - bne _0224C780 - b _0224C924 -_0224C780: - ldr r0, [sp, #0x78] - mov r1, #1 - mov r2, #0x12 - str r1, [r5, #0] - add r0, r0, #1 - lsl r2, r2, #4 - str r0, [r5, r2] - add r0, r2, #0 - ldr r3, [sp, #0x80] - add r0, #0x10 - str r3, [r5, r0] - ldr r0, [sp, #0x84] - add r2, #0x14 - str r0, [r5, r2] - ldr r0, [sp, #0x14] - bl sub_0201A778 - str r0, [r5, #4] - mov r0, #1 - str r0, [sp] - mov r0, #0xe - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xe8 - str r0, [sp, #0x10] - ldr r1, [r5, #4] - add r0, r4, #0 - mov r2, #3 - mov r3, #0x11 - bl sub_0201A7E8 - ldr r0, [sp, #0x14] - bl sub_0200B358 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r1, [sp, #0x14] - mov r0, #0x20 - bl sub_02023790 - mov r1, #0x4a - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [sp, #0x7c] - mov r1, #0x10 - bl sub_0200B1EC - str r0, [sp, #0x1c] - ldr r0, [sp, #0x78] - mov r7, #0 - cmp r0, #0 - bls _0224C844 - add r6, r5, #0 - add r4, r5, #0 -_0224C7F4: - mov r0, #0x49 - ldr r2, [sp, #0x18] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200BFAC - mov r0, #0x49 - mov r1, #0x4a - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - ldr r2, [sp, #0x1c] - bl sub_0200C388 - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp, #0x14] - bl sub_02023868 - add r1, r6, #0 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r6, r6, #4 - str r0, [r4, #0xc] - str r7, [r4, #0x10] - ldr r0, [sp, #0x18] - add r7, r7, #1 - add r0, #0xc - str r0, [sp, #0x18] - ldr r0, [sp, #0x78] - add r4, #8 - cmp r7, r0 - blo _0224C7F4 -_0224C844: - ldr r0, [sp, #0x78] - add r4, r5, #0 - lsl r6, r0, #2 - ldr r0, [sp, #0x7c] - add r4, #0xc4 - mov r1, #0x13 - bl sub_0200B1EC - str r0, [r4, r6] - ldr r0, [sp, #0x78] - lsl r1, r0, #3 - ldr r0, [r4, r6] - add r1, r5, r1 - str r0, [r1, #0xc] - ldr r0, [sp, #0x78] - str r0, [r1, #0x10] - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200B3F0 - mov r0, #0x4a - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r3, [sp, #0x14] - ldr r0, [r5, #4] - ldr r1, _0224C928 ; =0x0224F4F0 - lsl r3, r3, #0x18 - str r0, [r1, #0xc] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r5, r0] - lsr r3, r3, #0x18 - strh r0, [r1, #0x10] - add r0, r5, #0 - add r0, #0xc - str r0, [r1, #0] - mov r1, #0 - ldr r0, _0224C92C ; =0x0224F4F0 - add r2, r1, #0 - bl sub_0200112C - str r0, [r5, #8] - ldr r0, [r5, #4] - mov r1, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - mov r7, #0x4e - mov r4, #0 - add r6, r5, #0 - lsl r7, r7, #2 -_0224C8B8: - ldr r2, [sp, #0x14] - mov r0, #1 - add r1, r4, #0 - bl sub_02009714 - str r0, [r6, r7] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #4 - blt _0224C8B8 - ldr r2, [sp, #0x14] - add r0, sp, #0x40 - add r1, r5, #0 - bl ov7_0224CA54 - ldr r0, [sp, #0x88] - mov r6, #0 - str r0, [sp, #0x20] - add r0, sp, #0x40 - str r0, [sp, #0x24] - mov r0, #1 - str r0, [sp, #0x38] - ldr r0, [sp, #0x14] - mov r7, #0x56 - str r0, [sp, #0x3c] - mov r0, #3 - lsl r0, r0, #0x12 - ldr r4, _0224C930 ; =0x0224F1A8 - str r6, [sp, #0x34] - str r0, [sp, #0x28] - lsl r7, r7, #2 -_0224C8F6: - ldrb r0, [r4] - lsl r0, r0, #0xc - str r0, [sp, #0x2c] - add r0, sp, #0x20 - bl sub_02021B90 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_02021D6C - ldr r0, [r5, r7] - mov r1, #1 - bl sub_02021CC8 - add r6, r6, #1 - add r4, r4, #1 - add r5, r5, #4 - cmp r6, #2 - blt _0224C8F6 -_0224C924: - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224C928: .word 0x0224F4F0 -_0224C92C: .word 0x0224F4F0 -_0224C930: .word 0x0224F1A8 - thumb_func_end ov7_0224C768 - - thumb_func_start ov7_0224C934 -ov7_0224C934: ; 0x0224C934 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - cmp r0, #0 - beq _0224C9A2 - mov r7, #0x56 - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_0224C946: - ldr r0, [r5, r7] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0224C946 - add r0, r6, #0 - bl ov7_0224CB40 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r6, r0] - mov r5, #0 - cmp r0, #0 - ble _0224C980 - mov r7, #0x12 - add r4, r6, #0 - lsl r7, r7, #4 -_0224C96C: - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl sub_020237BC - ldr r0, [r6, r7] - add r5, r5, #1 - add r4, r4, #4 - cmp r5, r0 - blt _0224C96C -_0224C980: - mov r1, #0 - ldr r0, [r6, #8] - add r2, r1, #0 - bl sub_02001384 - ldr r0, [r6, #4] - bl sub_0201ACF4 - ldr r0, [r6, #4] - bl sub_0201A8FC - ldr r0, [r6, #4] - mov r1, #1 - bl sub_0201A928 - mov r0, #1 - str r0, [r6, #0] -_0224C9A2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov7_0224C934 - - thumb_func_start ov7_0224C9A4 -ov7_0224C9A4: ; 0x0224C9A4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - bl sub_02001288 - mov r1, #0 - add r4, r0, #0 - mvn r1, r1 - cmp r4, r1 - bne _0224C9EA - ldr r0, [r5, #8] - add r1, sp, #0 - bl sub_020014D0 - mov r2, #0x4b - add r0, sp, #0 - lsl r2, r2, #2 - ldrh r1, [r0] - ldrh r0, [r5, r2] - cmp r0, r1 - beq _0224CA02 - strh r1, [r5, r2] - add r0, r2, #4 - ldrh r1, [r5, r2] - add r2, #8 - ldr r0, [r5, r0] - ldr r2, [r5, r2] - blx r2 - ldr r0, _0224CA08 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov7_0224CB70 - b _0224CA02 -_0224C9EA: - sub r0, r1, #1 - cmp r4, r0 - beq _0224CA02 - mov r0, #0x4b - lsl r0, r0, #2 - ldrh r2, [r5, r0] - sub r0, #0xc - ldr r0, [r5, r0] - sub r0, r0, #1 - cmp r2, r0 - bne _0224CA02 - sub r4, r1, #1 -_0224CA02: - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_0224CA08: .word 0x000005DC - thumb_func_end ov7_0224C9A4 - - thumb_func_start ov7_0224CA0C -ov7_0224CA0C: ; 0x0224CA0C - push {r4, lr} - mov r2, #0x13 - lsl r2, r2, #4 - add r4, r0, #0 - sub r1, r2, #4 - ldr r0, [r4, r2] - add r2, r2, #4 - ldrh r1, [r4, r1] - ldr r2, [r4, r2] - blx r2 - ldr r0, [r4, #4] - mov r1, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - add r0, r4, #0 - bl ov7_0224CB70 - pop {r4, pc} - thumb_func_end ov7_0224CA0C - - thumb_func_start ov7_0224CA34 -ov7_0224CA34: ; 0x0224CA34 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x57 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224CA34 - - thumb_func_start ov7_0224CA54 -ov7_0224CA54: ; 0x0224CA54 - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r4, r2, #0 - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0x3e - add r1, r4, #0 - bl sub_02006C24 - ldr r1, _0224CB3C ; =0x00001388 - add r6, r0, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - lsr r0, r1, #4 - str r4, [sp, #8] - ldr r0, [r5, r0] - add r1, r6, #0 - mov r2, #4 - mov r3, #0 - bl sub_02009A4C - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, _0224CB3C ; =0x00001388 - sub r1, #0xc - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #0xa - mov r3, #0 - bl sub_02009B04 - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, _0224CB3C ; =0x00001388 - sub r1, #0xc - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - str r4, [sp, #8] - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #5 - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, _0224CB3C ; =0x00001388 - sub r1, #0xc - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - str r4, [sp, #8] - ldr r0, [r5, r1] - add r1, r6, #0 - mov r2, #6 - mov r3, #0 - bl sub_02009BC4 - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r6, #0 - bl sub_02006CA8 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A3DC - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A640 - ldr r1, _0224CB3C ; =0x00001388 - mov r0, #0 - mov r3, #0x4f - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsr r2, r1, #4 - ldr r2, [r5, r2] - lsl r3, r3, #2 - str r2, [sp, #0x14] - ldr r2, [r5, r3] - str r2, [sp, #0x18] - add r2, r3, #4 - ldr r2, [r5, r2] - add r3, #8 - str r2, [sp, #0x1c] - ldr r2, [r5, r3] - add r3, r1, #0 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r7, #0 - add r2, r1, #0 - bl sub_020093B4 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_0224CB3C: .word 0x00001388 - thumb_func_end ov7_0224CA54 - - thumb_func_start ov7_0224CB40 -ov7_0224CB40: ; 0x0224CB40 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x52 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A4E4 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A6DC - mov r6, #0x4e - mov r4, #0 - lsl r6, r6, #2 -_0224CB5E: - ldr r0, [r5, r6] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0224CB5E - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov7_0224CB40 - - thumb_func_start ov7_0224CB70 -ov7_0224CB70: ; 0x0224CB70 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #8] - add r1, sp, #0 - mov r2, #0 - bl sub_020014DC - add r0, sp, #0 - ldrh r0, [r0] - cmp r0, #0 - bne _0224CB96 - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - b _0224CBA2 -_0224CB96: - mov r0, #0x56 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC -_0224CBA2: - add r0, sp, #0 - ldrh r2, [r0] - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - sub r1, r1, #7 - cmp r2, r1 - blt _0224CBC0 - add r0, #0x3c - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - add sp, #4 - pop {r3, r4, pc} -_0224CBC0: - add r0, #0x3c - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov7_0224CB70 - - thumb_func_start ov7_0224CBD0 -ov7_0224CBD0: ; 0x0224CBD0 - push {r3, r4} - ldr r4, [sp, #0xc] - str r4, [r0, #4] - str r1, [r0, #8] - str r2, [r0, #0xc] - ldr r1, [sp, #8] - str r3, [r0, #0x10] - str r1, [r0, #0] - pop {r3, r4} - bx lr - thumb_func_end ov7_0224CBD0 - - thumb_func_start ov7_0224CBE4 -ov7_0224CBE4: ; 0x0224CBE4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - cmp r1, #0x16 - bhs _0224CC1C - add r4, r1, #0 - mov r0, #0xc - mul r4, r0 - ldr r1, [r5, #0xc] - ldr r0, [r5, #0x10] - add r1, r1, r4 - ldr r1, [r1, #4] - ldr r2, [r5, #0] - add r1, #0x95 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0207D730 - ldr r1, [r5, #0xc] - add r3, r0, #0 - add r2, r1, r4 - ldr r1, [r2, #4] - ldr r0, [r5, #8] - ldr r2, [r2, #8] - bl ov7_0224C6DC - add sp, #0x10 - pop {r3, r4, r5, pc} -_0224CC1C: - mov r0, #0xa - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0x11 - str r0, [sp, #0xc] - mov r2, #0 - ldr r0, [r5, #4] - mov r1, #3 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r5, #4] - mov r1, #3 - bl sub_02019448 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov7_0224CBE4 - - thumb_func_start ov7_0224CC44 -ov7_0224CC44: ; 0x0224CC44 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r2, #0 - cmp r0, #1 - beq _0224CC66 - add r0, r1, #0 - ldr r1, _0224CC68 ; =0x0224F1AC - mov r2, #0x1f - mov r3, #0xb - str r4, [sp] - bl sub_02002100 - str r0, [r5, #4] - str r4, [r5, #8] - mov r0, #1 - str r0, [r5, #0] -_0224CC66: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224CC68: .word 0x0224F1AC - thumb_func_end ov7_0224CC44 - - thumb_func_start ov7_0224CC6C -ov7_0224CC6C: ; 0x0224CC6C - ldr r1, [r0, #0] - cmp r1, #0 - beq _0224CC76 - mov r1, #0 - str r1, [r0, #0] -_0224CC76: - bx lr - thumb_func_end ov7_0224CC6C - - thumb_func_start ov7_0224CC78 -ov7_0224CC78: ; 0x0224CC78 - ldr r3, _0224CC84 ; =sub_02002114 - add r1, r0, #0 - ldr r0, [r1, #4] - ldr r1, [r1, #8] - bx r3 - nop -_0224CC84: .word sub_02002114 - thumb_func_end ov7_0224CC78 - - thumb_func_start ov7_0224CC88 -ov7_0224CC88: ; 0x0224CC88 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - add r6, r2, #0 - ldr r4, _0224CCB4 ; =0x00000000 - beq _0224CCAE -_0224CC94: - ldr r1, [r5, #0] - add r0, r7, #0 - mov r2, #1 - bl sub_02029D50 - cmp r0, #1 - bne _0224CCA6 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0224CCA6: - add r4, r4, #1 - add r5, #0xc - cmp r4, r6 - blo _0224CC94 -_0224CCAE: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224CCB4: .word 0x00000000 - thumb_func_end ov7_0224CC88 - - thumb_func_start ov7_0224CCB8 -ov7_0224CCB8: ; 0x0224CCB8 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - mov r1, #0xc - mul r4, r1 - add r1, r5, r4 - ldr r1, [r1, #4] - add r2, r3, #0 - add r1, #0x95 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl sub_0207D730 - add r1, r5, r4 - ldr r1, [r1, #8] - cmp r0, r1 - blo _0224CCDE - mov r0, #1 - pop {r3, r4, r5, pc} -_0224CCDE: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov7_0224CCB8 - - thumb_func_start ov7_0224CCE4 -ov7_0224CCE4: ; 0x0224CCE4 - mov r3, #0xc - mul r3, r2 - ldr r1, [r1, r3] - ldr r3, _0224CCF0 ; =sub_02029D50 - mov r2, #1 - bx r3 - ; .align 2, 0 -_0224CCF0: .word sub_02029D50 - thumb_func_end ov7_0224CCE4 - - thumb_func_start ov7_0224CCF4 -ov7_0224CCF4: ; 0x0224CCF4 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0xc - mul r1, r3 - add r3, r2, r1 - ldr r4, [r3, #4] - ldr r1, [r2, r1] - ldr r5, [r3, #8] - add r4, #0x95 - mov r2, #1 - bl sub_02029E2C - lsl r1, r4, #0x10 - lsl r2, r5, #0x10 - ldr r3, [sp, #0x10] - add r0, r6, #0 - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl sub_0207D60C - cmp r0, #1 - beq _0224CD24 - bl sub_02022974 -_0224CD24: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov7_0224CCF4 - - thumb_func_start ov7_0224CD28 -ov7_0224CD28: ; 0x0224CD28 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - mov r1, #1 - add r5, r0, #0 - ldr r2, _0224CD84 ; =0x0000FFFF - mov r0, #0 - lsl r1, r1, #8 -_0224CD36: - lsl r3, r0, #1 - ldrh r3, [r4, r3] - cmp r3, r2 - beq _0224CD48 - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, r1 - blo _0224CD36 -_0224CD48: - mov r1, #0x23 - lsl r1, r1, #4 - strb r0, [r5, r1] - ldrb r1, [r5, r1] - mov r0, #0xb - lsl r1, r1, #1 - bl sub_02018144 - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r5, r1] - add r1, r1, #4 - ldrb r1, [r5, r1] - mov r0, #0 - cmp r1, #0 - ble _0224CD82 - mov r1, #0x8b - lsl r1, r1, #2 - add r2, r1, #4 -_0224CD6E: - lsl r7, r0, #1 - ldrh r6, [r4, r7] - ldr r3, [r5, r1] - add r0, r0, #1 - strh r6, [r3, r7] - lsl r0, r0, #0x10 - ldrb r3, [r5, r2] - lsr r0, r0, #0x10 - cmp r0, r3 - blt _0224CD6E -_0224CD82: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224CD84: .word 0x0000FFFF - thumb_func_end ov7_0224CD28 - - thumb_func_start ov7_0224CD88 -ov7_0224CD88: ; 0x0224CD88 - push {r4, lr} - mov r1, #0x95 - mov r0, #0xb - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x95 - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov7_0224CD88 - - thumb_func_start ov7_0224CDA4 -ov7_0224CDA4: ; 0x0224CDA4 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r7, r0, #0 - str r2, [sp] - add r6, r3, #0 - bl ov7_0224CD88 - add r4, r0, #0 - ldr r0, [r5, #8] - mov r1, #0xb - str r0, [r4, #0] - mov r0, #0x60 - bl sub_02023790 - mov r1, #0x8d - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #0xc] - bl sub_02025E38 - mov r1, #0x83 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #0xc] - bl sub_02025E44 - mov r1, #0x85 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #0xc] - bl sub_0202CD88 - mov r1, #0x87 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r5, #0xc] - bl sub_020507E4 - mov r1, #0x89 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r2, [sp, #0x18] - add r0, r1, #4 - str r2, [r4, r0] - add r0, r5, #0 - bl ov7_0224CE90 - ldr r1, _0224CE88 ; =0x00000242 - mov r3, #0xb - strb r0, [r4, r1] - add r0, r5, #0 - add r0, #0x9c - ldr r2, [r0, #0] - add r0, r1, #0 - sub r0, #0x2a - str r2, [r4, r0] - add r0, r1, #3 - strb r6, [r4, r0] - ldr r0, [r5, #0xc] - sub r1, #0x22 - str r0, [r4, r1] - mov r0, #1 - mov r1, #2 - mov r2, #0 - bl sub_0200C440 - mov r1, #0x25 - lsl r1, r1, #4 - str r0, [r4, r1] - sub r1, #0xb - ldrb r0, [r4, r1] - cmp r0, #0 - bne _0224CE44 - ldr r0, [r5, #0xc] - bl sub_0207D990 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r4, r1] - b _0224CE72 -_0224CE44: - cmp r0, #3 - bne _0224CE56 - ldr r0, [r5, #0xc] - bl sub_0207D990 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r4, r1] - b _0224CE72 -_0224CE56: - cmp r0, #1 - ldr r0, [r5, #0xc] - bne _0224CE68 - bl sub_020298B0 - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r4, r1] - b _0224CE72 -_0224CE68: - bl sub_0202CA1C - mov r1, #0x21 - lsl r1, r1, #4 - str r0, [r4, r1] -_0224CE72: - ldr r1, [sp] - add r0, r4, #0 - bl ov7_0224CD28 - ldr r1, _0224CE8C ; =ov7_0224CEAC - add r0, r7, #0 - add r2, r4, #0 - bl sub_02050944 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224CE88: .word 0x00000242 -_0224CE8C: .word ov7_0224CEAC - thumb_func_end ov7_0224CDA4 - - thumb_func_start ov7_0224CE90 -ov7_0224CE90: ; 0x0224CE90 - push {r3, lr} - ldr r0, [r0, #0x3c] - bl sub_0205EA78 - cmp r0, #0 - beq _0224CEA4 - cmp r0, #1 - beq _0224CEA4 - cmp r0, #3 - bne _0224CEA8 -_0224CEA4: - mov r0, #0xa - pop {r3, pc} -_0224CEA8: - mov r0, #8 - pop {r3, pc} - thumb_func_end ov7_0224CE90 - - thumb_func_start ov7_0224CEAC -ov7_0224CEAC: ; 0x0224CEAC - push {r4, r5, r6, lr} - add r6, r0, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - ldr r1, _0224D004 ; =0x00000233 - add r4, r0, #0 - ldrb r1, [r4, r1] - cmp r1, #0x14 - bls _0224CEC8 - b _0224CFD0 -_0224CEC8: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224CED4: ; jump table - .short _0224CEFE - _0224CED4 - 2 ; case 0 - .short _0224CF0A - _0224CED4 - 2 ; case 1 - .short _0224CF14 - _0224CED4 - 2 ; case 2 - .short _0224CF24 - _0224CED4 - 2 ; case 3 - .short _0224CF2E - _0224CED4 - 2 ; case 4 - .short _0224CF38 - _0224CED4 - 2 ; case 5 - .short _0224CF42 - _0224CED4 - 2 ; case 6 - .short _0224CF4C - _0224CED4 - 2 ; case 7 - .short _0224CF56 - _0224CED4 - 2 ; case 8 - .short _0224CF60 - _0224CED4 - 2 ; case 9 - .short _0224CF6A - _0224CED4 - 2 ; case 10 - .short _0224CF74 - _0224CED4 - 2 ; case 11 - .short _0224CF7E - _0224CED4 - 2 ; case 12 - .short _0224CF8C - _0224CED4 - 2 ; case 13 - .short _0224CF96 - _0224CED4 - 2 ; case 14 - .short _0224CFA0 - _0224CED4 - 2 ; case 15 - .short _0224CFD0 - _0224CED4 - 2 ; case 16 - .short _0224CFD0 - _0224CED4 - 2 ; case 17 - .short _0224CFA8 - _0224CED4 - 2 ; case 18 - .short _0224CFB6 - _0224CED4 - 2 ; case 19 - .short _0224CFC6 - _0224CED4 - 2 ; case 20 -_0224CEFE: - bl ov7_0224D008 - ldr r0, _0224D004 ; =0x00000233 - mov r1, #1 - strb r1, [r4, r0] - b _0224CFD0 -_0224CF0A: - bl ov7_0224D1EC - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF14: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224D388 - ldr r0, _0224D004 ; =0x00000233 - mov r1, #3 - strb r1, [r4, r0] - b _0224CFD0 -_0224CF24: - bl ov7_0224D620 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF2E: - bl ov7_0224DC84 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF38: - bl ov7_0224DE94 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF42: - bl ov7_0224DFB0 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF4C: - bl ov7_0224E3A0 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF56: - bl ov7_0224E3D8 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF60: - bl ov7_0224E5B0 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF6A: - bl ov7_0224E6B8 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF74: - bl ov7_0224E7C8 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF7E: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224E950 - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF8C: - bl ov7_0224EA2C - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CF96: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224EC20 - b _0224CFD0 -_0224CFA0: - add r0, r6, #0 - bl ov7_0224EC38 - b _0224CFD0 -_0224CFA8: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224EC9C - ldr r1, _0224D004 ; =0x00000233 - strb r0, [r4, r1] - b _0224CFD0 -_0224CFB6: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224EA54 - ldr r0, _0224D004 ; =0x00000233 - mov r1, #0x14 - strb r1, [r4, r0] - b _0224CFD0 -_0224CFC6: - add r0, r5, #0 - add r1, r4, #0 - bl ov7_0224D250 - pop {r4, r5, r6, pc} -_0224CFD0: - ldr r0, _0224D004 ; =0x00000233 - ldrb r1, [r4, r0] - cmp r1, #4 - blo _0224CFFE - cmp r1, #0xb - bhi _0224CFFE - sub r0, #0x3b - mov r1, #1 - ldr r0, [r4, r0] - lsl r1, r1, #0xc - bl sub_02021E2C - mov r0, #0x7f - lsl r0, r0, #2 - mov r1, #1 - ldr r0, [r4, r0] - lsl r1, r1, #0xc - bl sub_02021E2C - add r4, #0x94 - ldr r0, [r4, #0] - bl sub_020219F8 -_0224CFFE: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_0224D004: .word 0x00000233 - thumb_func_end ov7_0224CEAC - - thumb_func_start ov7_0224D008 -ov7_0224D008: ; 0x0224D008 - push {r4, lr} - add r4, r0, #0 - bl ov7_0224D018 - add r0, r4, #0 - bl ov7_0224D040 - pop {r4, pc} - thumb_func_end ov7_0224D008 - - thumb_func_start ov7_0224D018 -ov7_0224D018: ; 0x0224D018 - push {r4, lr} - ldr r2, _0224D03C ; =0x0000021F - add r4, r0, #0 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xb - bl sub_0200B144 - add r1, r4, #0 - add r1, #0x88 - str r0, [r1, #0] - mov r0, #0xb - bl sub_0200B358 - add r4, #0x8c - str r0, [r4, #0] - pop {r4, pc} - nop -_0224D03C: .word 0x0000021F - thumb_func_end ov7_0224D018 - - thumb_func_start ov7_0224D040 -ov7_0224D040: ; 0x0224D040 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, _0224D1E0 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #0 - bne _0224D0BC - mov r4, #3 - add r0, r4, #0 - mov r1, #0xb - bl sub_02013A04 - add r1, r5, #0 - add r1, #0x84 - str r0, [r1, #0] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0xf - mov r3, #2 - bl sub_02013A4C - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x10 - mov r3, #0xe - bl sub_02013A4C - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - mov r2, #0x11 - add r3, r2, #0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - sub r3, #0x13 - bl sub_02013A4C - mov r3, #1 - str r3, [sp] - mov r1, #0xd - str r1, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, _0224D1E4 ; =0x000001E9 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, #8 - add r2, r4, #0 - bl sub_0201A7E8 - b _0224D174 -_0224D0BC: - cmp r0, #3 - bne _0224D11C - mov r4, #2 - add r0, r4, #0 - mov r1, #0xb - bl sub_02013A04 - add r1, r5, #0 - add r1, #0x84 - str r0, [r1, #0] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x1d - add r3, r4, #0 - bl sub_02013A4C - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - mov r2, #0x1e - add r3, r2, #0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - sub r3, #0x20 - bl sub_02013A4C - mov r1, #0xd - str r1, [sp] - mov r0, #7 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, _0224D1E4 ; =0x000001E9 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, #8 - mov r2, #3 - mov r3, #0x17 - bl sub_0201A7E8 - b _0224D174 -_0224D11C: - mov r4, #2 - add r0, r4, #0 - mov r1, #0xb - bl sub_02013A04 - add r1, r5, #0 - add r1, #0x84 - str r0, [r1, #0] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0xf - add r3, r4, #0 - bl sub_02013A4C - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x84 - add r1, #0x88 - mov r2, #0x11 - add r3, r2, #0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - sub r3, #0x13 - bl sub_02013A4C - mov r3, #1 - str r3, [sp] - mov r1, #0xd - str r1, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, _0224D1E4 ; =0x000001E9 - add r1, r5, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0] - add r1, #8 - mov r2, #3 - bl sub_0201A7E8 -_0224D174: - add r0, r5, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r2, sp, #0x14 - str r0, [sp, #0x14] - add r0, r5, #0 - add r0, #8 - str r0, [sp, #0x18] - mov r0, #0 - strb r0, [r2, #8] - mov r1, #1 - strb r1, [r2, #9] - strb r4, [r2, #0xa] - ldrb r3, [r2, #0xb] - mov r1, #0xf - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0x30 - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0xc0 - bic r3, r1 - strb r3, [r2, #0xb] - str r0, [sp] - mov r3, #0xb - str r3, [sp, #4] - ldr r0, [r5, #0] - ldr r2, _0224D1E8 ; =0x000003D9 - mov r1, #3 - bl sub_0200DAA4 - add r0, r5, #0 - ldr r2, _0224D1E8 ; =0x000003D9 - add r0, #8 - mov r1, #1 - mov r3, #0xb - bl sub_0200DC48 - mov r0, #0xb - str r0, [sp] - mov r0, #2 - mov r2, #0 - str r0, [sp, #4] - add r0, sp, #0x14 - mov r1, #8 - add r3, r2, #0 - bl sub_02001B7C - add r5, #0x80 - str r0, [r5, #0] - add sp, #0x20 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224D1E0: .word 0x00000245 -_0224D1E4: .word 0x000001E9 -_0224D1E8: .word 0x000003D9 - thumb_func_end ov7_0224D040 - - thumb_func_start ov7_0224D1EC -ov7_0224D1EC: ; 0x0224D1EC - push {r4, lr} - add r4, r0, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_02001BE0 - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0224D208 - add r1, r1, #1 - cmp r0, r1 - beq _0224D218 - b _0224D212 -_0224D208: - add r0, r4, #0 - bl ov7_0224D21C - mov r0, #0x13 - pop {r4, pc} -_0224D212: - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - pop {r4, pc} -_0224D218: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov7_0224D1EC - - thumb_func_start ov7_0224D21C -ov7_0224D21C: ; 0x0224D21C - push {r4, lr} - add r4, r0, #0 - add r0, #8 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #8 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02001BC4 - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - bl sub_02013A3C - add r4, #8 - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - thumb_func_end ov7_0224D21C - - thumb_func_start ov7_0224D250 -ov7_0224D250: ; 0x0224D250 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #9 - add r4, r1, #0 - lsl r0, r0, #6 - ldrb r0, [r4, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224D268 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224D268: - ldr r0, _0224D37C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _0224D274 - b _0224D378 -_0224D274: - add r0, r4, #0 - add r0, #0x18 - mov r1, #0 - bl sub_0200E084 - add r0, r4, #0 - add r0, #0x18 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - bl sub_0200B190 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - bl sub_0200B3F0 - mov r0, #0x8d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _0224D380 ; =0x00000245 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0224D35A - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - bl sub_0203A138 - cmp r0, #0x65 - beq _0224D35A - ldr r0, [r5, #0x1c] - ldr r0, [r0, #0] - cmp r0, #0x51 - beq _0224D35A - ldr r1, _0224D384 ; =0x000001BE - cmp r0, r1 - beq _0224D35A - add r0, r1, #0 - add r0, #0x85 - ldrb r2, [r4, r0] - cmp r2, #0 - beq _0224D2EE - add r1, #0x86 - ldrb r0, [r4, r1] - cmp r0, #0 - beq _0224D2EE - mov r0, #0xb - bl sub_0202BD38 - add r1, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #1 - bl sub_0202B758 - b _0224D35A -_0224D2EE: - cmp r2, #1 - bls _0224D308 - mov r0, #0xb - bl sub_0202BD14 - add r1, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #1 - bl sub_0202B758 - b _0224D35A -_0224D308: - mov r0, #0x91 - lsl r0, r0, #2 - ldrb r0, [r4, r0] - cmp r0, #1 - bls _0224D328 - mov r0, #0xb - bl sub_0202BD2C - add r1, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #1 - bl sub_0202B758 - b _0224D35A -_0224D328: - cmp r2, #0 - beq _0224D342 - mov r0, #0xb - bl sub_0202BD08 - add r1, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #1 - bl sub_0202B758 - b _0224D35A -_0224D342: - cmp r0, #0 - beq _0224D35A - mov r0, #0xb - bl sub_0202BD20 - add r1, r0, #0 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #1 - bl sub_0202B758 -_0224D35A: - mov r0, #0x25 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200C560 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #1 - pop {r3, r4, r5, pc} -_0224D378: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224D37C: .word 0x021BF67C -_0224D380: .word 0x00000245 -_0224D384: .word 0x000001BE - thumb_func_end ov7_0224D250 - - thumb_func_start ov7_0224D388 -ov7_0224D388: ; 0x0224D388 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x12 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #6 - mov r2, #0 - str r0, [sp, #8] - add r4, r1, #0 - str r2, [sp, #0xc] - ldr r0, [r4, #0] - mov r1, #3 - add r3, r2, #0 - bl sub_02019CB8 - add r0, r4, #0 - bl ov7_0224D21C - add r0, r4, #0 - bl ov7_0224D3E8 - mov r0, #0xb - bl sub_020203AC - add r1, r4, #0 - add r1, #0x90 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0x90 - ldr r0, [r5, #0x24] - ldr r1, [r1, #0] - bl sub_020203C0 - add r0, r4, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl sub_020203D4 - ldr r0, _0224D3E4 ; =0x00000241 - mov r1, #0 - strb r1, [r4, r0] - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0224D3E4: .word 0x00000241 - thumb_func_end ov7_0224D388 - - thumb_func_start ov7_0224D3E8 -ov7_0224D3E8: ; 0x0224D3E8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r5, #0 - ldr r7, _0224D43C ; =0x0224F328 - mov r6, #0 - add r4, #8 -_0224D3F4: - ldr r0, _0224D440 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _0224D410 - cmp r0, #3 - beq _0224D410 - cmp r6, #1 - bne _0224D410 - ldr r0, [r5, #0] - ldr r2, _0224D444 ; =0x0224F2BC - add r1, r4, #0 - bl sub_0201A8D4 - b _0224D42E -_0224D410: - cmp r0, #3 - bne _0224D424 - cmp r6, #2 - bne _0224D424 - ldr r0, [r5, #0] - ldr r2, _0224D448 ; =0x0224F2C4 - add r1, r4, #0 - bl sub_0201A8D4 - b _0224D42E -_0224D424: - ldr r0, [r5, #0] - add r1, r4, #0 - add r2, r7, #0 - bl sub_0201A8D4 -_0224D42E: - add r6, r6, #1 - add r4, #0x10 - add r7, #8 - cmp r6, #6 - blo _0224D3F4 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D43C: .word 0x0224F328 -_0224D440: .word 0x00000245 -_0224D444: .word 0x0224F2BC -_0224D448: .word 0x0224F2C4 - thumb_func_end ov7_0224D3E8 - - thumb_func_start ov7_0224D44C -ov7_0224D44C: ; 0x0224D44C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x28 - mov r1, #1 - bl sub_0200DC9C - mov r4, #0 - add r5, #8 -_0224D45C: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #6 - blo _0224D45C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov7_0224D44C - - thumb_func_start ov7_0224D474 -ov7_0224D474: ; 0x0224D474 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x3e - mov r1, #0xb - bl sub_02006C24 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r2, #0xb - str r2, [sp, #0xc] - ldr r2, [r5, #0] - mov r3, #1 - add r4, r0, #0 - bl sub_020070E8 - ldr r0, _0224D544 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _0224D4A4 - cmp r0, #3 - bne _0224D4BE -_0224D4A4: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r4, #0 - mov r1, #2 - mov r3, #1 - bl sub_0200710C - b _0224D4D6 -_0224D4BE: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0xb - str r0, [sp, #0xc] - ldr r2, [r5, #0] - add r0, r4, #0 - mov r1, #3 - mov r3, #1 - bl sub_0200710C -_0224D4D6: - ldr r0, _0224D544 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #3 - bne _0224D4F2 - mov r0, #0x20 - mov r2, #0 - str r0, [sp] - mov r1, #0xb - add r0, r4, #0 - add r3, r2, #0 - str r1, [sp, #4] - bl sub_02007130 - b _0224D506 -_0224D4F2: - mov r0, #0x20 - str r0, [sp] - mov r0, #0xb - mov r2, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #1 - add r3, r2, #0 - bl sub_02007130 -_0224D506: - mov r0, #0 - str r0, [sp] - mov r3, #0xb - str r3, [sp, #4] - ldr r0, [r5, #0] - mov r1, #3 - mov r2, #0x1f - bl sub_0200DAA4 - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - ldr r0, [r5, #0] - mov r1, #3 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0224D544: .word 0x00000245 - thumb_func_end ov7_0224D474 - - thumb_func_start ov7_0224D548 -ov7_0224D548: ; 0x0224D548 - push {r4, lr} - add r4, r0, #0 - bl sub_02020014 - mov r1, #0x8f - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #0 - bl sub_0201A008 - mov r1, #0x8e - lsl r1, r1, #2 - strb r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #1 - bl sub_0201A008 - ldr r1, _0224D5CC ; =0x00000239 - strb r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #2 - bl sub_0201A008 - ldr r1, _0224D5D0 ; =0x0000023A - strb r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #3 - bl sub_0201A008 - ldr r1, _0224D5D4 ; =0x0000023B - strb r0, [r4, r1] - mov r0, #0 - mov r1, #3 - bl sub_02019060 - mov r0, #1 - mov r1, #2 - bl sub_02019060 - mov r0, #2 - mov r1, #1 - bl sub_02019060 - mov r0, #3 - mov r1, #0 - bl sub_02019060 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - pop {r4, pc} - nop -_0224D5CC: .word 0x00000239 -_0224D5D0: .word 0x0000023A -_0224D5D4: .word 0x0000023B - thumb_func_end ov7_0224D548 - - thumb_func_start ov7_0224D5D8 -ov7_0224D5D8: ; 0x0224D5D8 - push {r4, lr} - mov r1, #0x8e - add r4, r0, #0 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - mov r0, #0 - bl sub_02019060 - ldr r1, _0224D614 ; =0x00000239 - mov r0, #1 - ldrb r1, [r4, r1] - bl sub_02019060 - ldr r1, _0224D618 ; =0x0000023A - mov r0, #2 - ldrb r1, [r4, r1] - bl sub_02019060 - ldr r1, _0224D61C ; =0x0000023B - mov r0, #3 - ldrb r1, [r4, r1] - bl sub_02019060 - mov r0, #0x8f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0201FF48 - pop {r4, pc} - nop -_0224D614: .word 0x00000239 -_0224D618: .word 0x0000023A -_0224D61C: .word 0x0000023B - thumb_func_end ov7_0224D5D8 - - thumb_func_start ov7_0224D620 -ov7_0224D620: ; 0x0224D620 - push {r4, r5, lr} - sub sp, #0xc - ldr r1, _0224D690 ; =0x00000241 - add r4, r0, #0 - add r0, r1, #1 - ldrb r2, [r4, r1] - ldrb r0, [r4, r0] - cmp r2, r0 - beq _0224D65A - ldr r5, _0224D694 ; =0x0224F2D4 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, r4, #0 - str r0, [r3, #0] - add r1, #0x90 - ldr r1, [r1, #0] - add r0, r2, #0 - bl sub_02020990 - ldr r0, _0224D690 ; =0x00000241 - add sp, #0xc - ldrb r1, [r4, r0] - add r1, r1, #1 - strb r1, [r4, r0] - mov r0, #3 - pop {r4, r5, pc} -_0224D65A: - mov r0, #0 - strb r0, [r4, r1] - mov r1, #6 - mov r2, #2 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - add r0, r4, #0 - bl ov7_0224EAD0 - add r0, r4, #0 - bl ov7_0224D474 - add r0, r4, #0 - bl ov7_0224D548 - add r0, r4, #0 - bl ov7_0224D6BC - add r0, r4, #0 - mov r1, #0 - bl ov7_0224DAF8 - mov r0, #4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224D690: .word 0x00000241 -_0224D694: .word 0x0224F2D4 - thumb_func_end ov7_0224D620 - - thumb_func_start ov7_0224D698 -ov7_0224D698: ; 0x0224D698 - push {r3, lr} - ldr r2, _0224D6B8 ; =0x00000245 - ldrb r0, [r0, r2] - cmp r0, #1 - bne _0224D6A6 - add r0, r1, #0 - pop {r3, pc} -_0224D6A6: - cmp r0, #2 - bne _0224D6B4 - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - bl sub_02098164 - add r1, r0, #0 -_0224D6B4: - add r0, r1, #0 - pop {r3, pc} - ; .align 2, 0 -_0224D6B8: .word 0x00000245 - thumb_func_end ov7_0224D698 - - thumb_func_start ov7_0224D6BC -ov7_0224D6BC: ; 0x0224D6BC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r2, _0224D850 ; =0x00000245 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - ldrb r0, [r5, r2] - cmp r0, #0 - beq _0224D6D2 - cmp r0, #3 - bne _0224D6F2 -_0224D6D2: - mov r2, #0x62 - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0xb - bl sub_0200B144 - str r0, [sp, #0xc] - ldr r2, _0224D854 ; =0x00000287 - mov r0, #0 - mov r1, #0x1a - mov r3, #0xb - bl sub_0200B144 - str r0, [sp, #4] - b _0224D714 -_0224D6F2: - cmp r0, #1 - bne _0224D706 - ldr r0, [sp] - mov r1, #0x1a - add r2, #0x2d - mov r3, #0xb - bl sub_0200B144 - str r0, [sp, #0xc] - b _0224D714 -_0224D706: - ldr r0, [sp] - mov r1, #0x1a - mov r2, #0xc - mov r3, #0xb - bl sub_0200B144 - str r0, [sp, #0xc] -_0224D714: - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r0, [r5, r0] - mov r1, #0xb - add r0, r0, #1 - bl sub_02013A04 - str r0, [r5, #0x7c] - mov r0, #0 - str r0, [sp, #8] - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r0, [r5, r0] - cmp r0, #0 - bls _0224D7B4 - ldr r4, [sp, #8] -_0224D734: - mov r1, #0x8b - lsl r1, r1, #2 - ldr r1, [r5, r1] - add r0, r5, #0 - ldrh r1, [r1, r4] - bl ov7_0224D698 - add r6, r0, #0 - mov r0, #0x69 - lsl r0, r0, #2 - cmp r6, r0 - bhi _0224D780 - sub r0, #0x5c - cmp r6, r0 - blo _0224D780 - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D268 - add r1, r0, #0 - ldr r0, [sp, #4] - bl sub_0200B1EC - add r7, r0, #0 - mov r2, #0x8b - lsl r2, r2, #2 - ldr r2, [r5, r2] - ldr r0, [r5, #0x7c] - ldrh r2, [r2, r4] - add r1, r7, #0 - bl sub_02013A6C - add r0, r7, #0 - bl sub_020237BC - mov r0, #1 - str r0, [sp] - b _0224D7A0 -_0224D780: - ldr r0, [sp, #0xc] - add r1, r6, #0 - bl sub_0200B1EC - mov r2, #0x8b - add r7, r0, #0 - lsl r2, r2, #2 - ldr r2, [r5, r2] - ldr r0, [r5, #0x7c] - ldrh r2, [r2, r4] - add r1, r7, #0 - bl sub_02013A6C - add r0, r7, #0 - bl sub_020237BC -_0224D7A0: - ldr r0, [sp, #8] - add r4, r4, #2 - add r0, r0, #1 - str r0, [sp, #8] - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r1, [r5, r0] - ldr r0, [sp, #8] - cmp r0, r1 - blo _0224D734 -_0224D7B4: - ldr r0, [sp] - cmp r0, #0 - ldr r0, [r5, #0x7c] - beq _0224D7CE - add r1, r5, #0 - add r1, #0x88 - mov r2, #0x1a - add r3, r2, #0 - ldr r1, [r1, #0] - sub r3, #0x1c - bl sub_02013A4C - b _0224D7DE -_0224D7CE: - add r1, r5, #0 - add r1, #0x88 - mov r2, #8 - add r3, r2, #0 - ldr r1, [r1, #0] - sub r3, #0xa - bl sub_02013A4C -_0224D7DE: - ldr r0, [sp, #0xc] - bl sub_0200B190 - ldr r0, _0224D850 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _0224D7F0 - cmp r0, #3 - bne _0224D7F6 -_0224D7F0: - ldr r0, [sp, #4] - bl sub_0200B190 -_0224D7F6: - ldr r3, _0224D858 ; =0x0224F308 - add r2, sp, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0x69 - lsl r0, r0, #2 - cmp r6, r0 - bhi _0224D820 - sub r0, #0x5c - cmp r6, r0 - blo _0224D820 - mov r1, #0x23 - add r0, sp, #0x10 - strb r1, [r0, #0x15] - b _0224D826 -_0224D820: - mov r1, #0 - add r0, sp, #0x10 - strb r1, [r0, #0x15] -_0224D826: - ldr r0, [r5, #0x7c] - mov r3, #0xb - str r0, [sp, #0x10] - add r0, r5, #0 - add r0, #8 - str r0, [sp, #0x1c] - mov r0, #0x23 - lsl r0, r0, #4 - ldrb r0, [r5, r0] - add r1, r0, #1 - add r0, sp, #0x10 - strh r1, [r0, #0x10] - mov r1, #0 - add r0, sp, #0x10 - add r2, r1, #0 - str r5, [sp, #0x2c] - bl sub_0200112C - str r0, [r5, #0x78] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224D850: .word 0x00000245 -_0224D854: .word 0x00000287 -_0224D858: .word 0x0224F308 - thumb_func_end ov7_0224D6BC - - thumb_func_start ov7_0224D85C -ov7_0224D85C: ; 0x0224D85C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - mov r1, #0x13 - str r0, [sp, #0x10] - add r6, r2, #0 - bl sub_02001504 - add r4, r0, #0 - cmp r6, #1 - beq _0224D878 - ldr r0, _0224D9AC ; =0x00000638 - bl sub_02005748 -_0224D878: - add r0, r4, #0 - add r0, #0x18 - mov r1, #0 - bl sub_0201ADA4 - mov r1, #1 - mvn r1, r1 - cmp r5, r1 - beq _0224D938 - ldr r2, _0224D9B0 ; =0x00000245 - ldrb r0, [r4, r2] - cmp r0, #0 - bne _0224D8A8 - mov r0, #0x82 - mov r1, #0xb - bl sub_02023790 - lsl r1, r5, #0x10 - lsr r1, r1, #0x10 - mov r2, #0xb - add r6, r0, #0 - bl sub_0207CFC8 - b _0224D90C -_0224D8A8: - cmp r0, #3 - bne _0224D8C2 - mov r0, #0x82 - mov r1, #0xb - bl sub_02023790 - lsl r1, r5, #0x10 - lsr r1, r1, #0x10 - mov r2, #0xb - add r6, r0, #0 - bl sub_0207CFC8 - b _0224D90C -_0224D8C2: - cmp r0, #1 - bne _0224D8E6 - mov r0, #0 - mov r1, #0x1a - add r2, #0x2d - mov r3, #0xb - bl sub_0200B144 - add r1, r5, #0 - add r7, r0, #0 - add r1, #0x8a - bl sub_0200B1EC - add r6, r0, #0 - add r0, r7, #0 - bl sub_0200B190 - b _0224D90C -_0224D8E6: - mov r0, #0 - mov r1, #0x1a - sub r2, #0x27 - mov r3, #0xb - bl sub_0200B144 - add r7, r0, #0 - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - bl sub_020981F4 - add r1, r0, #0 - add r0, r7, #0 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r7, #0 - bl sub_0200B190 -_0224D90C: - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0224D9B4 ; =0x000F0E00 - add r2, r6, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x18 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r6, #0 - bl sub_020237BC - lsl r1, r5, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - bl ov7_0224EB7C - b _0224D940 -_0224D938: - add r0, r4, #0 - lsr r1, r1, #0x10 - bl ov7_0224EB7C -_0224D940: - add r1, sp, #0x14 - ldr r0, [sp, #0x10] - add r1, #2 - add r2, sp, #0x14 - bl sub_020014DC - add r0, sp, #0x14 - ldrh r0, [r0, #2] - cmp r0, #0 - bne _0224D962 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - b _0224D96E -_0224D962: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC -_0224D96E: - ldr r0, [sp, #0x10] - mov r1, #2 - bl sub_02001504 - cmp r0, #7 - bls _0224D992 - add r1, sp, #0x14 - ldrh r1, [r1, #2] - add r1, r1, #7 - cmp r0, r1 - bls _0224D992 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - b _0224D99E -_0224D992: - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC -_0224D99E: - add r4, #0x18 - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0224D9AC: .word 0x00000638 -_0224D9B0: .word 0x00000245 -_0224D9B4: .word 0x000F0E00 - thumb_func_end ov7_0224D85C - - thumb_func_start ov7_0224D9B8 -ov7_0224D9B8: ; 0x0224D9B8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r1, #0 - mov r1, #0x13 - add r7, r2, #0 - bl sub_02001504 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _0224DAA0 - lsl r0, r5, #0x10 - lsr r2, r0, #0x10 - mov r0, #0x69 - lsl r0, r0, #2 - cmp r2, r0 - bhi _0224DA0A - add r1, r0, #0 - sub r1, #0x5c - cmp r2, r1 - blo _0224DA0A - add r1, r0, #0 - sub r1, #0x5d - sub r1, r2, r1 - lsl r1, r1, #0x10 - lsr r2, r1, #0x10 - mov r1, #2 - add r3, r4, #0 - str r1, [sp] - add r3, #8 - str r3, [sp, #4] - mov r3, #0 - str r3, [sp, #8] - add r3, r7, #4 - str r3, [sp, #0xc] - add r0, #0xac - ldr r0, [r4, r0] - add r3, r1, #0 - bl sub_0200C648 -_0224DA0A: - lsl r1, r5, #0x10 - add r0, r4, #0 - lsr r1, r1, #0x10 - bl ov7_0224E890 - str r0, [sp, #0x14] - mov r0, #0xc - mov r1, #0xb - bl sub_02023790 - str r0, [sp, #0x18] - ldr r0, _0224DAF0 ; =0x00000245 - ldrb r0, [r4, r0] - cmp r0, #3 - bne _0224DA38 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x20 - bl sub_0200B1EC - str r0, [sp, #0x10] - b _0224DA46 -_0224DA38: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #9 - bl sub_0200B1EC - str r0, [sp, #0x10] -_0224DA46: - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r2, [sp, #0x14] - mov r1, #0 - mov r3, #4 - bl sub_0200B60C - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x10] - bl sub_0200C388 - mov r0, #0 - ldr r1, [sp, #0x18] - add r2, r0, #0 - bl sub_02002D7C - mov ip, r0 - str r7, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0224DAF4 ; =0x00010200 - ldr r2, [sp, #0x18] - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0 - mov r6, ip - mov r3, #0x98 - add r0, #8 - sub r3, r3, r6 - str r1, [sp, #0xc] - bl sub_0201D78C - ldr r0, [sp, #0x10] - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC -_0224DAA0: - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - bne _0224DAEC - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #8 - bl sub_0200B1EC - add r5, r0, #0 - mov r0, #0x98 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #8 - mov r1, #0xf - mov r2, #0 - add r3, r7, #0 - bl sub_0201AE78 - mov r1, #0 - str r7, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0224DAF4 ; =0x00010200 - add r4, #8 - str r0, [sp, #8] - add r0, r4, #0 - add r2, r5, #0 - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r5, #0 - bl sub_020237BC -_0224DAEC: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224DAF0: .word 0x00000245 -_0224DAF4: .word 0x00010200 - thumb_func_end ov7_0224D9B8 - - thumb_func_start ov7_0224DAF8 -ov7_0224DAF8: ; 0x0224DAF8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0224DC80 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #3 - bne _0224DBA2 - cmp r1, #0 - bne _0224DB24 - add r0, r5, #0 - add r0, #0x28 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x28 - mov r1, #1 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - b _0224DB3A -_0224DB24: - mov r0, #0x48 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0 - add r0, #0x28 - mov r1, #0xf - add r3, r2, #0 - bl sub_0201AE78 -_0224DB3A: - mov r0, #0x10 - mov r1, #0xb - bl sub_02023790 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x26 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - bl ov7_0224E8F4 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - mov r1, #0 - add r7, r0, #0 - mov r3, #0x40 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x28 - add r2, r4, #0 - sub r3, r3, r7 - str r1, [sp, #8] - bl sub_0201D738 - b _0224DC66 -_0224DBA2: - cmp r1, #0 - bne _0224DBEA - add r0, r5, #0 - add r0, #0x28 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x28 - mov r1, #1 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x12 - bl sub_0200B1EC - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x28 - add r2, r4, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r4, #0 - bl sub_020237BC - b _0224DBFE -_0224DBEA: - mov r0, #0x48 - str r0, [sp] - add r0, r5, #0 - mov r3, #0x10 - add r0, #0x28 - mov r1, #0xf - mov r2, #0 - str r3, [sp, #4] - bl sub_0201AE78 -_0224DBFE: - mov r0, #0x10 - mov r1, #0xb - bl sub_02023790 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x13 - bl sub_0200B1EC - add r6, r0, #0 - add r0, r5, #0 - bl ov7_0224E8F4 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - add r7, r0, #0 - mov r0, #0x10 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - mov r3, #0x48 - mov r1, #0 - add r0, #0x28 - add r2, r4, #0 - sub r3, r3, r7 - str r1, [sp, #8] - bl sub_0201D738 -_0224DC66: - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r5, #0x28 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224DC80: .word 0x00000245 - thumb_func_end ov7_0224DAF8 - - thumb_func_start ov7_0224DC84 -ov7_0224DC84: ; 0x0224DC84 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r2, sp, #0 - ldr r0, [r5, #0x78] - mov r1, #0 - add r2, #2 - bl sub_020014DC - ldr r0, [r5, #0x78] - bl sub_02001288 - add r4, r0, #0 - ldr r0, [r5, #0x78] - mov r1, #0 - add r2, sp, #0 - bl sub_020014DC - add r0, sp, #0 - ldrh r2, [r0] - ldrh r0, [r0, #2] - cmp r0, r2 - beq _0224DCC4 - mov r0, #2 - lsl r2, r2, #4 - lsl r0, r0, #8 - add r2, #0x18 - lsl r2, r2, #0x10 - ldr r0, [r5, r0] - mov r1, #0xac - asr r2, r2, #0x10 - bl sub_0200D494 -_0224DCC4: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0224DCD6 - add r0, r0, #1 - cmp r4, r0 - bne _0224DCD4 - b _0224DE7C -_0224DCD4: - b _0224DD04 -_0224DCD6: - mov r1, #0 - ldr r0, [r5, #0x78] - add r2, r1, #0 - bl sub_02001384 - ldr r0, [r5, #0x7c] - bl sub_02013A3C - add r0, r5, #0 - bl ov7_0224D44C - add r0, r5, #0 - bl ov7_0224D5D8 - ldr r0, [r5, #0] - mov r1, #1 - bl sub_02019EBC - ldr r0, _0224DE80 ; =0x000005DC - bl sub_02005748 - mov r0, #0xc - pop {r3, r4, r5, pc} -_0224DD04: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021D34 - mov r1, #0x82 - lsl r1, r1, #2 - strh r0, [r5, r1] - sub r1, #0xc - ldr r0, [r5, r1] - bl sub_02021D34 - ldr r1, _0224DE84 ; =0x0000020A - strh r0, [r5, r1] - sub r1, #0x12 - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, r5, #0 - mov r1, #1 - bl ov7_0224EC10 - add r0, r5, #0 - add r0, #0x58 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x18 - bl sub_0201ACF4 - add r0, r5, #0 - add r0, #0x58 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - ldr r1, _0224DE88 ; =0x00000246 - mov r2, #1 - strh r4, [r5, r1] - add r0, r1, #2 - strh r2, [r5, r0] - ldrh r1, [r5, r1] - add r0, r5, #0 - bl ov7_0224E890 - mov r1, #0x93 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r5, #0 - bl ov7_0224E8F4 - mov r2, #0x93 - lsl r2, r2, #2 - ldr r1, [r5, r2] - cmp r0, r1 - bhs _0224DDE0 - sub r0, r2, #7 - ldrb r0, [r5, r0] - cmp r0, #3 - bne _0224DD9C - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x25 - bl sub_0200B1EC - b _0224DDA8 -_0224DD9C: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_0200B1EC -_0224DDA8: - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0x20 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #0x58 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r5, r1] - mov r0, #0xa - pop {r3, r4, r5, pc} -_0224DDE0: - sub r2, r2, #7 - ldrb r2, [r5, r2] - cmp r2, #1 - bne _0224DDF6 - ldr r0, _0224DE80 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov7_0224E098 - pop {r3, r4, r5, pc} -_0224DDF6: - bl sub_020E2178 - ldr r1, _0224DE8C ; =0x0000024A - strh r0, [r5, r1] - ldrh r0, [r5, r1] - cmp r0, #0x63 - bls _0224DE08 - mov r0, #0x63 - strh r0, [r5, r1] -_0224DE08: - ldr r1, _0224DE88 ; =0x00000246 - add r0, r5, #0 - ldrh r1, [r5, r1] - mov r2, #0 - bl ov7_0224E834 - ldr r0, _0224DE90 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #3 - bne _0224DE2A - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x21 - bl sub_0200B1EC - b _0224DE36 -_0224DE2A: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #4 - bl sub_0200B1EC -_0224DE36: - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0x20 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #0x58 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r5, r1] - add r0, r5, #0 - mov r1, #1 - bl ov7_0224EB38 - ldr r0, _0224DE80 ; =0x000005DC - bl sub_02005748 - mov r0, #5 - pop {r3, r4, r5, pc} -_0224DE7C: - mov r0, #4 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224DE80: .word 0x000005DC -_0224DE84: .word 0x0000020A -_0224DE88: .word 0x00000246 -_0224DE8C: .word 0x0000024A -_0224DE90: .word 0x00000245 - thumb_func_end ov7_0224DC84 - - thumb_func_start ov7_0224DE94 -ov7_0224DE94: ; 0x0224DE94 - push {r4, lr} - add r4, r0, #0 - mov r0, #9 - lsl r0, r0, #6 - ldrb r0, [r4, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224DEAA - mov r0, #5 - pop {r4, pc} -_0224DEAA: - add r0, r4, #0 - bl ov7_0224DED4 - add r0, r4, #0 - mov r1, #0 - bl ov7_0224E28C - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #6 - pop {r4, pc} - thumb_func_end ov7_0224DE94 - - thumb_func_start ov7_0224DED4 -ov7_0224DED4: ; 0x0224DED4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r1, _0224DFAC ; =0x00000245 - add r5, r0, #0 - ldrb r0, [r5, r1] - cmp r0, #0 - bne _0224DEF6 - add r0, r1, #0 - add r1, r1, #1 - sub r0, #0x35 - ldrh r1, [r5, r1] - ldr r0, [r5, r0] - mov r2, #0xb - bl sub_0207D730 - add r4, r0, #0 - b _0224DF28 -_0224DEF6: - cmp r0, #3 - bne _0224DF0E - add r0, r1, #0 - add r1, r1, #1 - sub r0, #0x35 - ldrh r1, [r5, r1] - ldr r0, [r5, r0] - mov r2, #0xb - bl sub_0207D730 - add r4, r0, #0 - b _0224DF28 -_0224DF0E: - cmp r0, #2 - bne _0224DF26 - add r0, r1, #0 - add r1, r1, #1 - sub r0, #0x35 - ldrh r1, [r5, r1] - ldr r0, [r5, r0] - bl sub_0202CBC8 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - b _0224DF28 -_0224DF26: - mov r4, #0 -_0224DF28: - add r0, r5, #0 - add r0, #0x48 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x48 - mov r1, #1 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - mov r0, #0x18 - mov r1, #0xb - bl sub_02023790 - add r6, r0, #0 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x14 - bl sub_0200B1EC - add r7, r0, #0 - mov r0, #1 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #0 - add r2, r4, #0 - mov r3, #3 - bl sub_0200B60C - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r6, #0 - add r2, r7, #0 - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x48 - add r2, r6, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r7, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add r5, #0x48 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0224DFAC: .word 0x00000245 - thumb_func_end ov7_0224DED4 - - thumb_func_start ov7_0224DFB0 -ov7_0224DFB0: ; 0x0224DFB0 - push {r4, lr} - mov r1, #0x92 - add r4, r0, #0 - lsl r1, r1, #2 - add r0, r4, r1 - add r1, r1, #2 - ldrh r1, [r4, r1] - bl sub_0208C15C - cmp r0, #0 - beq _0224DFD8 - ldr r0, _0224E08C ; =0x00000638 - bl sub_02005748 - add r0, r4, #0 - mov r1, #1 - bl ov7_0224E28C - mov r0, #6 - pop {r4, pc} -_0224DFD8: - ldr r0, _0224E090 ; =0x021BF67C - mov r1, #1 - ldr r2, [r0, #0x48] - add r0, r2, #0 - tst r0, r1 - beq _0224E028 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - add r0, r4, #0 - add r0, #0x48 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0x38 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0x58 - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, _0224E094 ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - bl ov7_0224E098 - pop {r4, pc} -_0224E028: - mov r0, #2 - tst r0, r2 - beq _0224E088 - add r0, r4, #0 - add r0, #0x48 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0x38 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0x58 - mov r1, #0 - bl sub_0200E084 - add r0, r4, #0 - mov r1, #0 - bl ov7_0224EB38 - mov r1, #0x7e - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0x10 - ldrh r1, [r4, r1] - bl sub_02021CAC - mov r1, #0x7f - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0xe - ldrh r1, [r4, r1] - bl sub_02021CAC - add r0, r4, #0 - mov r1, #0 - bl ov7_0224EC10 - add r4, #0x18 - add r0, r4, #0 - bl sub_0201A9A4 - ldr r0, _0224E094 ; =0x000005DC - bl sub_02005748 - mov r0, #4 - pop {r4, pc} -_0224E088: - mov r0, #6 - pop {r4, pc} - ; .align 2, 0 -_0224E08C: .word 0x00000638 -_0224E090: .word 0x021BF67C -_0224E094: .word 0x000005DC - thumb_func_end ov7_0224DFB0 - - thumb_func_start ov7_0224E098 -ov7_0224E098: ; 0x0224E098 - push {r3, r4, r5, lr} - sub sp, #8 - ldr r2, _0224E284 ; =0x00000245 - add r4, r0, #0 - ldrb r0, [r4, r2] - cmp r0, #0 - bne _0224E0BC - add r0, r2, #0 - add r1, r2, #1 - add r2, r2, #3 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldrh r2, [r4, r2] - ldr r0, [r4, r0] - mov r3, #0xb - bl sub_0207D55C - b _0224E100 -_0224E0BC: - cmp r0, #3 - bne _0224E0D6 - add r0, r2, #0 - add r1, r2, #1 - add r2, r2, #3 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldrh r2, [r4, r2] - ldr r0, [r4, r0] - mov r3, #0xb - bl sub_0207D55C - b _0224E100 -_0224E0D6: - cmp r0, #1 - bne _0224E0EE - sub r2, #0x35 - ldr r0, [r4, r2] - bl sub_020289A0 - cmp r0, #0xc8 - bne _0224E0EA - mov r0, #0 - b _0224E100 -_0224E0EA: - mov r0, #1 - b _0224E100 -_0224E0EE: - add r0, r2, #0 - add r1, r2, #1 - add r2, r2, #3 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, r0] - bl sub_0202CB70 -_0224E100: - cmp r0, #0 - bne _0224E192 - mov r0, #0x92 - mov r1, #0 - lsl r0, r0, #2 - strh r1, [r4, r0] - sub r0, r0, #3 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0224E124 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #7 - bl sub_0200B1EC - add r5, r0, #0 - b _0224E15A -_0224E124: - cmp r0, #3 - bne _0224E138 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #7 - bl sub_0200B1EC - add r5, r0, #0 - b _0224E15A -_0224E138: - cmp r0, #1 - bne _0224E14C - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0xc - bl sub_0200B1EC - add r5, r0, #0 - b _0224E15A -_0224E14C: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0xe - bl sub_0200B1EC - add r5, r0, #0 -_0224E15A: - add r0, r4, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - add r2, r5, #0 - bl sub_0200C388 - add r0, r5, #0 - bl sub_020237BC - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r4, r2] - sub r2, #0x20 - add r0, r4, #0 - ldr r2, [r4, r2] - add r0, #0x58 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r4, r1] - add sp, #8 - mov r0, #0xa - pop {r3, r4, r5, pc} -_0224E192: - ldr r1, _0224E288 ; =0x00000246 - add r0, r4, #0 - ldrh r1, [r4, r1] - mov r2, #0 - bl ov7_0224E834 - mov r0, #0 - str r0, [sp] - mov r1, #1 - mov r2, #0x92 - add r0, r4, #0 - str r1, [sp, #4] - lsl r2, r2, #2 - add r0, #0x8c - ldrsh r2, [r4, r2] - ldr r0, [r0, #0] - mov r3, #2 - bl sub_0200B60C - mov r0, #0 - str r0, [sp] - mov r0, #1 - mov r2, #0x93 - str r0, [sp, #4] - lsl r2, r2, #2 - ldr r3, [r4, r2] - sub r2, r2, #4 - add r0, r4, #0 - ldrsh r2, [r4, r2] - add r0, #0x8c - ldr r0, [r0, #0] - mul r2, r3 - mov r1, #2 - mov r3, #6 - bl sub_0200B60C - ldr r1, _0224E288 ; =0x00000246 - add r2, r1, #0 - ldrh r0, [r4, r1] - sub r2, #0xa2 - cmp r0, r2 - bhi _0224E226 - sub r1, #0xfe - cmp r0, r1 - blo _0224E226 - bl sub_0207D268 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #3 - bl sub_0200B630 - ldr r0, _0224E284 ; =0x00000245 - ldrb r0, [r4, r0] - cmp r0, #3 - bne _0224E216 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x24 - bl sub_0200B1EC - add r5, r0, #0 - b _0224E24C -_0224E216: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x1b - bl sub_0200B1EC - add r5, r0, #0 - b _0224E24C -_0224E226: - ldr r0, _0224E284 ; =0x00000245 - ldrb r0, [r4, r0] - cmp r0, #3 - bne _0224E23E - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x23 - bl sub_0200B1EC - add r5, r0, #0 - b _0224E24C -_0224E23E: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #5 - bl sub_0200B1EC - add r5, r0, #0 -_0224E24C: - add r0, r4, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - add r2, r5, #0 - bl sub_0200C388 - add r0, r5, #0 - bl sub_020237BC - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r4, r2] - sub r2, #0x20 - add r0, r4, #0 - ldr r2, [r4, r2] - add r0, #0x58 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r4, r1] - mov r0, #7 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224E284: .word 0x00000245 -_0224E288: .word 0x00000246 - thumb_func_end ov7_0224E098 - - thumb_func_start ov7_0224E28C -ov7_0224E28C: ; 0x0224E28C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r0, #0x38 - mov r1, #0xf - bl sub_0201ADA4 - cmp r4, #0 - bne _0224E2AE - add r0, r5, #0 - add r0, #0x38 - mov r1, #1 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 -_0224E2AE: - mov r0, #0x18 - mov r1, #0xb - bl sub_02023790 - add r4, r0, #0 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x15 - bl sub_0200B1EC - mov r3, #2 - add r6, r0, #0 - mov r2, #0x92 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - lsl r2, r2, #2 - add r0, #0x8c - ldrsh r2, [r5, r2] - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200B60C - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_0200C388 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - mov r1, #0 - add r0, r5, #0 - add r0, #0x38 - add r2, r4, #0 - add r3, r1, #0 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0224E39C ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #3 - bne _0224E322 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x22 - bl sub_0200B1EC - b _0224E32E -_0224E322: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x16 - bl sub_0200B1EC -_0224E32E: - add r7, r0, #0 - mov r0, #1 - str r0, [sp] - mov r2, #0x93 - str r0, [sp, #4] - lsl r2, r2, #2 - ldr r3, [r5, r2] - sub r2, r2, #4 - add r0, r5, #0 - ldrsh r2, [r5, r2] - add r0, #0x8c - ldr r0, [r0, #0] - mul r2, r3 - mov r1, #0 - mov r3, #6 - bl sub_0200B60C - add r0, r5, #0 - add r0, #0x8c - ldr r0, [r0, #0] - add r1, r4, #0 - add r2, r7, #0 - bl sub_0200C388 - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - bl sub_02002D7C - add r6, r0, #0 - mov r0, #8 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - add r0, r5, #0 - mov r3, #0x60 - mov r1, #0 - add r0, #0x38 - add r2, r4, #0 - sub r3, r3, r6 - str r1, [sp, #8] - bl sub_0201D738 - add r0, r7, #0 - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r5, #0x38 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224E39C: .word 0x00000245 - thumb_func_end ov7_0224E28C - - thumb_func_start ov7_0224E3A0 -ov7_0224E3A0: ; 0x0224E3A0 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #9 - lsl r0, r0, #6 - ldrb r0, [r4, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224E3BA - add sp, #4 - mov r0, #7 - pop {r3, r4, pc} -_0224E3BA: - mov r3, #0xb - str r3, [sp] - ldr r0, [r4, #0] - ldr r1, _0224E3D4 ; =0x0224F2CC - mov r2, #0x1f - bl sub_02002100 - add r4, #0x80 - str r0, [r4, #0] - mov r0, #8 - add sp, #4 - pop {r3, r4, pc} - nop -_0224E3D4: .word 0x0224F2CC - thumb_func_end ov7_0224E3A0 - - thumb_func_start ov7_0224E3D8 -ov7_0224E3D8: ; 0x0224E3D8 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, #0x80 - ldr r0, [r0, #0] - mov r1, #0xb - bl sub_02002114 - cmp r0, #0 - beq _0224E3F6 - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - bne _0224E3F4 - b _0224E55E -_0224E3F4: - b _0224E5A0 -_0224E3F6: - ldr r2, _0224E5A4 ; =0x00000245 - ldrb r0, [r4, r2] - cmp r0, #0 - bne _0224E454 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #6 - bl sub_0200B1EC - mov r2, #0x92 - lsl r2, r2, #2 - add r5, r0, #0 - ldrsh r0, [r4, r2] - cmp r0, #1 - bne _0224E428 - add r0, r4, #0 - sub r2, r2, #2 - add r0, #0x8c - ldrh r2, [r4, r2] - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200B70C - b _0224E438 -_0224E428: - add r0, r4, #0 - sub r2, r2, #2 - add r0, #0x8c - ldrh r2, [r4, r2] - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200B77C -_0224E438: - ldr r0, _0224E5A8 ; =0x00000246 - mov r1, #5 - ldrh r0, [r4, r0] - mov r2, #0xb - bl sub_0207CFF0 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0200B7B4 - b _0224E518 -_0224E454: - cmp r0, #3 - bne _0224E4AC - add r0, r2, #3 - ldrsh r0, [r4, r0] - cmp r0, #1 - bne _0224E472 - add r0, r4, #0 - add r2, r2, #1 - add r0, #0x8c - ldrh r2, [r4, r2] - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200B70C - b _0224E482 -_0224E472: - add r0, r4, #0 - add r2, r2, #1 - add r0, #0x8c - ldrh r2, [r4, r2] - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200B77C -_0224E482: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #6 - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, _0224E5A8 ; =0x00000246 - mov r1, #5 - ldrh r0, [r4, r0] - mov r2, #0xb - bl sub_0207CFF0 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0200B7B4 - b _0224E518 -_0224E4AC: - cmp r0, #1 - bne _0224E4CC - add r1, r2, #1 - ldrh r1, [r4, r1] - add r0, r4, #0 - mov r2, #0 - bl ov7_0224E834 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0xb - bl sub_0200B1EC - add r5, r0, #0 - b _0224E518 -_0224E4CC: - add r0, r2, #3 - ldrsh r0, [r4, r0] - cmp r0, #1 - bne _0224E4F0 - add r0, r2, #1 - ldrh r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02098164 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200BE64 - b _0224E50A -_0224E4F0: - add r0, r2, #1 - ldrh r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02098164 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x8c - ldr r0, [r0, #0] - mov r1, #0 - bl sub_0200BE98 -_0224E50A: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0xd - bl sub_0200B1EC - add r5, r0, #0 -_0224E518: - add r0, r4, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - add r2, r5, #0 - bl sub_0200C388 - add r0, r5, #0 - bl sub_020237BC - add r0, r4, #0 - add r0, #0x58 - mov r1, #0xf - bl sub_0201ADA4 - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r4, r2] - sub r2, #0x20 - add r0, r4, #0 - ldr r2, [r4, r2] - add r0, #0x58 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r4, r1] - ldr r0, _0224E5AC ; =0x00000644 - bl sub_02005748 - mov r0, #9 - pop {r3, r4, r5, pc} -_0224E55E: - add r0, r4, #0 - add r0, #0x58 - mov r1, #0 - bl sub_0200E084 - add r0, r4, #0 - mov r1, #0 - bl ov7_0224EB38 - mov r1, #0x7e - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0x10 - ldrh r1, [r4, r1] - bl sub_02021CAC - mov r1, #0x7f - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0xe - ldrh r1, [r4, r1] - bl sub_02021CAC - add r0, r4, #0 - mov r1, #0 - bl ov7_0224EC10 - add r4, #0x18 - add r0, r4, #0 - bl sub_0201A9A4 - mov r0, #4 - pop {r3, r4, r5, pc} -_0224E5A0: - mov r0, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224E5A4: .word 0x00000245 -_0224E5A8: .word 0x00000246 -_0224E5AC: .word 0x00000644 - thumb_func_end ov7_0224E3D8 - - thumb_func_start ov7_0224E5B0 -ov7_0224E5B0: ; 0x0224E5B0 - push {r4, lr} - add r4, r0, #0 - mov r0, #9 - lsl r0, r0, #6 - ldrb r0, [r4, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224E5C6 - mov r0, #9 - pop {r4, pc} -_0224E5C6: - ldr r2, _0224E6B4 ; =0x00000245 - ldrb r0, [r4, r2] - cmp r0, #0 - bne _0224E5FC - add r0, r2, #0 - add r1, r2, #1 - add r2, r2, #3 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldrh r2, [r4, r2] - ldr r0, [r4, r0] - mov r3, #0xb - bl sub_0207D570 - mov r2, #0x22 - lsl r2, r2, #4 - add r1, r2, #0 - ldr r0, [r4, r2] - add r2, #0x28 - ldrsh r2, [r4, r2] - add r1, #0x26 - ldrh r1, [r4, r1] - lsl r2, r2, #0x18 - lsr r2, r2, #0x18 - bl sub_0206D504 - b _0224E63C -_0224E5FC: - cmp r0, #3 - bne _0224E616 - add r0, r2, #0 - add r1, r2, #1 - add r2, r2, #3 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldrh r2, [r4, r2] - ldr r0, [r4, r0] - mov r3, #0xb - bl sub_0207D570 - b _0224E63C -_0224E616: - cmp r0, #1 - bne _0224E62A - add r0, r2, #0 - add r1, r2, #1 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldr r0, [r4, r0] - bl sub_0202895C - b _0224E63C -_0224E62A: - add r0, r2, #0 - add r1, r2, #1 - add r2, r2, #3 - sub r0, #0x35 - ldrh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [r4, r0] - bl sub_0202CAE0 -_0224E63C: - mov r1, #0x93 - lsl r1, r1, #2 - ldr r2, [r4, r1] - sub r1, r1, #4 - ldrsh r1, [r4, r1] - add r0, r4, #0 - mul r1, r2 - bl ov7_0224E920 - ldr r2, _0224E6B4 ; =0x00000245 - ldrb r0, [r4, r2] - cmp r0, #3 - bne _0224E66E - add r0, r2, #0 - add r3, r2, #7 - add r2, r2, #3 - sub r0, #0x29 - ldrsh r2, [r4, r2] - ldr r3, [r4, r3] - ldr r0, [r4, r0] - mov r1, #0x45 - mul r2, r3 - bl sub_0202CF70 - b _0224E684 -_0224E66E: - add r0, r2, #0 - add r3, r2, #7 - add r2, r2, #3 - sub r0, #0x29 - ldrsh r2, [r4, r2] - ldr r3, [r4, r3] - ldr r0, [r4, r0] - mov r1, #0x23 - mul r2, r3 - bl sub_0202CF70 -_0224E684: - add r0, r4, #0 - mov r1, #1 - bl ov7_0224DAF8 - mov r1, #0x92 - lsl r1, r1, #2 - ldrsh r0, [r4, r1] - cmp r0, #1 - ble _0224E69E - mov r2, #2 - sub r0, r1, #5 - strb r2, [r4, r0] - b _0224E6B0 -_0224E69E: - sub r0, r1, #5 - ldrb r0, [r4, r0] - cmp r0, #0xff - beq _0224E6B0 - sub r0, r1, #5 - ldrb r0, [r4, r0] - add r2, r0, #1 - sub r0, r1, #5 - strb r2, [r4, r0] -_0224E6B0: - mov r0, #0xa - pop {r4, pc} - ; .align 2, 0 -_0224E6B4: .word 0x00000245 - thumb_func_end ov7_0224E5B0 - - thumb_func_start ov7_0224E6B8 -ov7_0224E6B8: ; 0x0224E6B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #9 - lsl r0, r0, #6 - ldrb r0, [r5, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224E6CE - mov r0, #0xa - pop {r3, r4, r5, pc} -_0224E6CE: - ldr r0, _0224E7BC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224E7B6 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #1 - bne _0224E6EA - sub r0, r0, #4 - ldr r0, [r5, r0] - bl sub_0206B3B4 -_0224E6EA: - ldr r0, _0224E7C0 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _0224E6F6 - cmp r0, #3 - bne _0224E774 -_0224E6F6: - ldr r1, _0224E7C4 ; =0x00000246 - ldrh r0, [r5, r1] - cmp r0, #4 - bne _0224E774 - add r0, r1, #2 - ldrsh r0, [r5, r0] - cmp r0, #0xa - blt _0224E774 - sub r1, #0x36 - ldr r0, [r5, r1] - mov r1, #0xc - mov r2, #1 - mov r3, #0xb - bl sub_0207D570 - cmp r0, #1 - bne _0224E774 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0xa - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - add r0, r5, #0 - add r0, #0x58 - mov r1, #0xf - bl sub_0201ADA4 - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0x20 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #0x58 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r5, r1] - sub r1, #0x20 - ldr r0, [r5, r1] - bl sub_0202CD88 - mov r1, #0x32 - bl sub_0202CF28 - mov r0, #0xb - pop {r3, r4, r5, pc} -_0224E774: - add r0, r5, #0 - add r0, #0x58 - mov r1, #0 - bl sub_0200E084 - add r0, r5, #0 - mov r1, #0 - bl ov7_0224EB38 - mov r1, #0x7e - lsl r1, r1, #2 - ldr r0, [r5, r1] - add r1, #0x10 - ldrh r1, [r5, r1] - bl sub_02021CAC - mov r1, #0x7f - lsl r1, r1, #2 - ldr r0, [r5, r1] - add r1, #0xe - ldrh r1, [r5, r1] - bl sub_02021CAC - add r0, r5, #0 - mov r1, #0 - bl ov7_0224EC10 - add r5, #0x18 - add r0, r5, #0 - bl sub_0201A9A4 - mov r0, #4 - pop {r3, r4, r5, pc} -_0224E7B6: - mov r0, #0xa - pop {r3, r4, r5, pc} - nop -_0224E7BC: .word 0x021BF67C -_0224E7C0: .word 0x00000245 -_0224E7C4: .word 0x00000246 - thumb_func_end ov7_0224E6B8 - - thumb_func_start ov7_0224E7C8 -ov7_0224E7C8: ; 0x0224E7C8 - push {r4, lr} - add r4, r0, #0 - mov r0, #9 - lsl r0, r0, #6 - ldrb r0, [r4, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224E7DE - mov r0, #0xb - pop {r4, pc} -_0224E7DE: - ldr r0, _0224E830 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0224E82A - add r0, r4, #0 - add r0, #0x58 - mov r1, #0 - bl sub_0200E084 - add r0, r4, #0 - mov r1, #0 - bl ov7_0224EB38 - mov r1, #0x7e - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0x10 - ldrh r1, [r4, r1] - bl sub_02021CAC - mov r1, #0x7f - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, #0xe - ldrh r1, [r4, r1] - bl sub_02021CAC - add r0, r4, #0 - mov r1, #0 - bl ov7_0224EC10 - add r4, #0x18 - add r0, r4, #0 - bl sub_0201A9A4 - mov r0, #4 - pop {r4, pc} -_0224E82A: - mov r0, #0xb - pop {r4, pc} - nop -_0224E830: .word 0x021BF67C - thumb_func_end ov7_0224E7C8 - - thumb_func_start ov7_0224E834 -ov7_0224E834: ; 0x0224E834 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, _0224E88C ; =0x00000245 - add r3, r1, #0 - ldrb r0, [r4, r0] - add r5, r2, #0 - cmp r0, #0 - bne _0224E852 - add r4, #0x8c - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, r3, #0 - bl sub_0200B70C - pop {r3, r4, r5, pc} -_0224E852: - cmp r0, #3 - bne _0224E864 - add r4, #0x8c - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, r3, #0 - bl sub_0200B70C - pop {r3, r4, r5, pc} -_0224E864: - cmp r0, #1 - bne _0224E876 - add r4, #0x8c - ldr r0, [r4, #0] - add r1, r5, #0 - add r2, r3, #0 - bl sub_0200BC80 - pop {r3, r4, r5, pc} -_0224E876: - lsl r0, r3, #0x18 - lsr r0, r0, #0x18 - bl sub_02098164 - add r4, #0x8c - add r2, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - bl sub_0200BE64 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224E88C: .word 0x00000245 - thumb_func_end ov7_0224E834 - - thumb_func_start ov7_0224E890 -ov7_0224E890: ; 0x0224E890 - push {r3, lr} - ldr r2, _0224E8C8 ; =0x00000245 - ldrb r2, [r0, r2] - cmp r2, #0 - bne _0224E8A6 - add r0, r1, #0 - mov r1, #0 - mov r2, #0xb - bl sub_0207CFF0 - pop {r3, pc} -_0224E8A6: - cmp r2, #3 - bne _0224E8B0 - bl ov7_0224E8CC - pop {r3, pc} -_0224E8B0: - cmp r2, #1 - bne _0224E8BC - add r0, r1, #0 - bl sub_0205745C - pop {r3, pc} -_0224E8BC: - lsl r0, r1, #0x18 - lsr r0, r0, #0x18 - bl sub_020981D0 - pop {r3, pc} - nop -_0224E8C8: .word 0x00000245 - thumb_func_end ov7_0224E890 - - thumb_func_start ov7_0224E8CC -ov7_0224E8CC: ; 0x0224E8CC - ldr r3, _0224E8EC ; =0x0224F3F8 - mov r2, #0 -_0224E8D0: - ldrh r0, [r3] - cmp r1, r0 - bne _0224E8DE - ldr r0, _0224E8F0 ; =0x0224F3FA - lsl r1, r2, #2 - ldrh r0, [r0, r1] - bx lr -_0224E8DE: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, #0x29 - blo _0224E8D0 - mov r0, #0 - bx lr - nop -_0224E8EC: .word 0x0224F3F8 -_0224E8F0: .word 0x0224F3FA - thumb_func_end ov7_0224E8CC - - thumb_func_start ov7_0224E8F4 -ov7_0224E8F4: ; 0x0224E8F4 - push {r3, lr} - ldr r1, _0224E91C ; =0x00000245 - ldrb r2, [r0, r1] - cmp r2, #3 - bne _0224E910 - sub r1, #0x25 - ldr r0, [r0, r1] - bl sub_0202D750 - mov r1, #0 - add r2, r1, #0 - bl sub_0202D230 - pop {r3, pc} -_0224E910: - sub r1, #0x39 - ldr r0, [r0, r1] - bl sub_02025F74 - pop {r3, pc} - nop -_0224E91C: .word 0x00000245 - thumb_func_end ov7_0224E8F4 - - thumb_func_start ov7_0224E920 -ov7_0224E920: ; 0x0224E920 - push {r4, lr} - ldr r2, _0224E94C ; =0x00000245 - add r4, r1, #0 - ldrb r3, [r0, r2] - cmp r3, #3 - bne _0224E940 - sub r2, #0x25 - ldr r0, [r0, r2] - bl sub_0202D750 - lsl r1, r4, #0x10 - lsr r1, r1, #0x10 - mov r2, #6 - bl sub_0202D230 - pop {r4, pc} -_0224E940: - sub r2, #0x39 - ldr r0, [r0, r2] - bl sub_02025FB8 - pop {r4, pc} - nop -_0224E94C: .word 0x00000245 - thumb_func_end ov7_0224E920 - - thumb_func_start ov7_0224E950 -ov7_0224E950: ; 0x0224E950 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, _0224EA20 ; =0x00000241 - add r5, r1, #0 - add r1, r0, #1 - ldrb r2, [r5, r0] - ldrb r1, [r5, r1] - cmp r2, r1 - beq _0224E98C - ldr r4, _0224EA24 ; =0x0224F2E0 - add r3, sp, #0 - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - add r1, r5, #0 - str r0, [r3, #0] - add r1, #0x90 - ldr r1, [r1, #0] - add r0, r2, #0 - bl sub_02020990 - ldr r0, _0224EA20 ; =0x00000241 - add sp, #0xc - ldrb r1, [r5, r0] - add r1, r1, #1 - strb r1, [r5, r0] - mov r0, #0xc - pop {r4, r5, pc} -_0224E98C: - mov r1, #0 - strb r1, [r5, r0] - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - ldr r1, [r4, #0x24] - bl sub_020203C0 - add r0, r5, #0 - add r0, #0x90 - ldr r0, [r0, #0] - bl sub_020203B8 - ldr r0, [r4, #0x24] - bl sub_020203D4 - add r0, r5, #0 - bl ov7_0224EB14 - ldr r0, _0224EA28 ; =0x00000245 - ldrb r0, [r5, r0] - cmp r0, #3 - bne _0224E9C0 - add sp, #0xc - mov r0, #0x13 - pop {r4, r5, pc} -_0224E9C0: - add r1, r5, #0 - ldr r0, [r4, #8] - add r1, #0x18 - mov r2, #3 - bl sub_0205D8F4 - mov r1, #0x85 - lsl r1, r1, #2 - add r0, r5, #0 - ldr r1, [r5, r1] - add r0, #0x18 - bl sub_0205D944 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0x20 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #0x18 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r5, r1] - mov r0, #0xd - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224EA20: .word 0x00000241 -_0224EA24: .word 0x0224F2E0 -_0224EA28: .word 0x00000245 - thumb_func_end ov7_0224E950 - - thumb_func_start ov7_0224EA2C -ov7_0224EA2C: ; 0x0224EA2C - push {r4, lr} - add r4, r0, #0 - mov r0, #9 - lsl r0, r0, #6 - ldrb r0, [r4, r0] - bl sub_0205DA04 - cmp r0, #0 - bne _0224EA42 - mov r0, #0xd - pop {r4, pc} -_0224EA42: - add r0, r4, #0 - add r0, #0x18 - bl sub_0201A8FC - add r0, r4, #0 - bl ov7_0224D040 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov7_0224EA2C - - thumb_func_start ov7_0224EA54 -ov7_0224EA54: ; 0x0224EA54 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _0224EACC ; =0x00000245 - add r4, r1, #0 - ldrb r0, [r4, r0] - cmp r0, #3 - bne _0224EA70 - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #0x1f - bl sub_0200B1EC - b _0224EA7C -_0224EA70: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_0200B1EC -_0224EA7C: - add r6, r0, #0 - add r0, r4, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - add r1, r4, #0 - ldr r0, [r5, #8] - add r1, #0x18 - mov r2, #3 - bl sub_0205D8F4 - mov r1, #0x85 - lsl r1, r1, #2 - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0x18 - bl sub_0205D944 - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r4, r2] - sub r2, #0x20 - add r0, r4, #0 - ldr r2, [r4, r2] - add r0, #0x18 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r4, r1] - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224EACC: .word 0x00000245 - thumb_func_end ov7_0224EA54 - - thumb_func_start ov7_0224EAD0 -ov7_0224EAD0: ; 0x0224EAD0 - push {r3, r4, r5, r6, r7, lr} - ldr r1, _0224EB0C ; =0x0224F2EC - add r5, r0, #0 - add r0, #0x94 - mov r2, #4 - mov r3, #0xb - bl ov5_021D2F14 - add r7, r5, #0 - ldr r4, _0224EB10 ; =0x0224F358 - mov r6, #0 - add r7, #0x94 -_0224EAE8: - add r0, r7, #0 - add r1, r4, #0 - bl ov5_021D3104 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r5, r1] - add r6, r6, #1 - add r4, #0x28 - add r5, r5, #4 - cmp r6, #4 - blo _0224EAE8 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - pop {r3, r4, r5, r6, r7, pc} - nop -_0224EB0C: .word 0x0224F2EC -_0224EB10: .word 0x0224F358 - thumb_func_end ov7_0224EAD0 - - thumb_func_start ov7_0224EB14 -ov7_0224EB14: ; 0x0224EB14 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r6, #0x7e - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #2 -_0224EB20: - ldr r0, [r5, r6] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blo _0224EB20 - add r7, #0x94 - add r0, r7, #0 - bl ov5_021D30A8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov7_0224EB14 - - thumb_func_start ov7_0224EB38 -ov7_0224EB38: ; 0x0224EB38 - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - bne _0224EB5E - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xb1 - mov r2, #8 - bl sub_0200D494 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xb1 - mov r2, #0x84 - bl sub_0200D494 - pop {r4, pc} -_0224EB5E: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa2 - mov r2, #0x6c - bl sub_0200D494 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xa2 - mov r2, #0x84 - bl sub_0200D494 - pop {r4, pc} - thumb_func_end ov7_0224EB38 - - thumb_func_start ov7_0224EB7C -ov7_0224EB7C: ; 0x0224EB7C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _0224EC0C ; =0x00000245 - add r6, r1, #0 - ldrb r1, [r4, r0] - cmp r1, #0 - beq _0224EB9E - cmp r1, #3 - beq _0224EB9E - sub r0, #0x41 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - add sp, #8 - pop {r4, r5, r6, pc} -_0224EB9E: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02009DC8 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #1 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - mov r2, #0x10 - bl sub_02009968 - add r0, r5, #0 - bl sub_0200A4C0 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02009DC8 - add r5, r0, #0 - add r0, r6, #0 - mov r1, #2 - bl sub_0207CE78 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - mov r2, #0x10 - bl sub_020099D4 - add r0, r5, #0 - bl sub_0200A6B8 - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0224EC0C: .word 0x00000245 - thumb_func_end ov7_0224EB7C - - thumb_func_start ov7_0224EC10 -ov7_0224EC10: ; 0x0224EC10 - mov r2, #2 - lsl r2, r2, #8 - ldr r3, _0224EC1C ; =sub_0200D414 - ldr r0, [r0, r2] - bx r3 - nop -_0224EC1C: .word sub_0200D414 - thumb_func_end ov7_0224EC10 - - thumb_func_start ov7_0224EC20 -ov7_0224EC20: ; 0x0224EC20 - push {r4, lr} - mov r0, #0 - add r4, r1, #0 - bl ov5_021D1744 - ldr r0, _0224EC34 ; =0x00000233 - mov r1, #0xf - strb r1, [r4, r0] - pop {r4, pc} - nop -_0224EC34: .word 0x00000233 - thumb_func_end ov7_0224EC20 - - thumb_func_start ov7_0224EC38 -ov7_0224EC38: ; 0x0224EC38 - push {r4, r5, r6, lr} - add r6, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _0224EC8E - add r0, r6, #0 - bl sub_02050A60 - add r5, r0, #0 - add r0, r6, #0 - bl sub_02050A64 - add r4, r0, #0 - bl ov7_0224D21C - ldr r0, [r5, #0xc] - bl sub_0207D990 - ldr r1, _0224EC90 ; =0x0224F49C - mov r2, #0xb - bl sub_0207D824 - add r3, r5, #0 - str r0, [r4, #4] - add r3, #0x98 - ldr r1, [r5, #0xc] - ldr r3, [r3, #0] - mov r2, #2 - bl sub_0207CB2C - ldr r1, [r4, #4] - add r0, r5, #0 - bl sub_0203D1E4 - ldr r1, _0224EC94 ; =0x0209AC15 - add r0, r6, #0 - add r2, r4, #0 - bl sub_02050924 - ldr r0, _0224EC98 ; =0x00000233 - mov r1, #0x10 - strb r1, [r4, r0] -_0224EC8E: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224EC90: .word 0x0224F49C -_0224EC94: .word 0x0209AC15 -_0224EC98: .word 0x00000233 - thumb_func_end ov7_0224EC38 - - thumb_func_start ov7_0224EC9C -ov7_0224EC9C: ; 0x0224EC9C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - bl sub_0200F2AC - cmp r0, #0 - bne _0224ECAE - mov r0, #0x12 - pop {r3, r4, r5, pc} -_0224ECAE: - add r1, r5, #0 - ldr r0, [r4, #8] - add r1, #0x18 - mov r2, #3 - bl sub_0205D8F4 - mov r1, #0x85 - lsl r1, r1, #2 - add r0, r5, #0 - ldr r1, [r5, r1] - add r0, #0x18 - bl sub_0205D944 - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_0200B1EC - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x8d - add r0, #0x8c - lsl r1, r1, #2 - ldr r0, [r0, #0] - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - add r0, r4, #0 - bl sub_020237BC - mov r2, #0x8d - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0x20 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #0x18 - mov r3, #1 - bl sub_0205D994 - mov r1, #9 - lsl r1, r1, #6 - strb r0, [r5, r1] - mov r0, #0xd - pop {r3, r4, r5, pc} - thumb_func_end ov7_0224EC9C - ; 0x0224ED0C - - - .rodata - .incbin "incbin/overlay7_rodata.bin" - - .data - .incbin "incbin/overlay7_data.bin" - - .bss - .space 0x20 diff --git a/asm/overlay70.s b/asm/overlay70.s deleted file mode 100644 index 97977c275..000000000 --- a/asm/overlay70.s +++ /dev/null @@ -1,34722 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov70_0225C700 -ov70_0225C700: ; 0x0225C700 - mov r3, #0 - ldrsh r2, [r0, r3] - lsl r2, r2, #0xc - str r2, [r1, #0] - mov r2, #2 - ldrsh r0, [r0, r2] - lsl r0, r0, #0xc - str r0, [r1, #8] - str r3, [r1, #4] - bx lr - thumb_func_end ov70_0225C700 - - thumb_func_start ov70_0225C714 -ov70_0225C714: ; 0x0225C714 - ldr r3, [r0, #0] - asr r2, r3, #0xb - lsr r2, r2, #0x14 - add r2, r3, r2 - asr r2, r2, #0xc - strh r2, [r1] - ldr r2, [r0, #8] - asr r0, r2, #0xb - lsr r0, r0, #0x14 - add r0, r2, r0 - asr r0, r0, #0xc - strh r0, [r1, #2] - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225C714 - - thumb_func_start ov70_0225C730 -ov70_0225C730: ; 0x0225C730 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - add r0, r1, #0 - add r1, r2, #0 - mov r2, #0 - add r7, r3, #0 - bl sub_0200723C - add r4, r0, #0 - bl sub_020B3C1C - add r6, r0, #0 - bl sub_0201CBCC - add r0, r6, #0 - add r1, sp, #0xc - add r2, sp, #8 - bl sub_020AE9B8 - add r0, r6, #0 - bl sub_020AEA70 - str r0, [sp, #4] - add r0, r4, #0 - bl sub_02022F24 - add r6, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl sub_02018144 - str r0, [r5, #0] - add r1, r4, #0 - add r2, r6, #0 - bl sub_020D50B8 - ldr r0, [r5, #0] - bl sub_020B3C1C - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - add r5, r0, #0 - bl sub_020AE8EC - ldr r1, [sp, #4] - add r0, r5, #0 - bl sub_020AEA18 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225C730 - - thumb_func_start ov70_0225C7A0 -ov70_0225C7A0: ; 0x0225C7A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - add r1, sp, #0x54 - add r2, sp, #0x58 - add r3, sp, #0x5c - bl sub_02017358 - add r0, r5, #0 - add r1, sp, #0x48 - add r2, sp, #0x4c - add r3, sp, #0x50 - bl sub_02017374 - add r0, r5, #0 - mov r1, #0 - bl sub_02017394 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #1 - bl sub_02017394 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #2 - bl sub_02017394 - add r5, r0, #0 - add r0, sp, #0x24 - bl sub_020BB4C8 - asr r0, r6, #4 - lsl r3, r0, #1 - lsl r1, r3, #1 - ldr r2, _0225C854 ; =0x020F983C - add r3, r3, #1 - lsl r3, r3, #1 - ldrsh r1, [r2, r1] - ldrsh r2, [r2, r3] - add r0, sp, #0 - bl sub_020BB5AC - add r1, sp, #0x24 - add r0, sp, #0 - add r2, r1, #0 - bl sub_020BB8EC - asr r0, r5, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - ldr r3, _0225C854 ; =0x020F983C - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #0 - bl sub_020BB5E4 - add r1, sp, #0x24 - add r0, sp, #0 - add r2, r1, #0 - bl sub_020BB8EC - asr r0, r7, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - ldr r3, _0225C854 ; =0x020F983C - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #0 - bl sub_020BB5C8 - add r1, sp, #0x24 - add r0, sp, #0 - add r2, r1, #0 - bl sub_020BB8EC - ldr r0, [r4, #8] - add r1, sp, #0x54 - add r2, sp, #0x24 - add r3, sp, #0x48 - bl sub_0201CED8 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225C854: .word 0x020F983C - thumb_func_end ov70_0225C7A0 - - thumb_func_start ov70_0225C858 -ov70_0225C858: ; 0x0225C858 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #4 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0x23 - mov r1, #0x2a - add r2, r5, #0 - bl ov63_0222BCE8 - str r0, [r4, #0] - mov r0, #1 - mov r1, #0 - str r0, [sp] - mov r0, #0xae - add r2, r1, #0 - add r3, r5, #0 - bl sub_02006FE8 - add r5, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - bl ov63_0222BD50 - add r0, r5, #0 - bl sub_020181C4 - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225C858 - - thumb_func_start ov70_0225C894 -ov70_0225C894: ; 0x0225C894 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov63_0222BD30 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225C894 - - thumb_func_start ov70_0225C8A8 -ov70_0225C8A8: ; 0x0225C8A8 - mov r0, #0x23 - bx lr - thumb_func_end ov70_0225C8A8 - - thumb_func_start ov70_0225C8AC -ov70_0225C8AC: ; 0x0225C8AC - ldr r3, _0225C8B4 ; =ov63_0222BDAC - ldr r0, [r0, #0] - bx r3 - nop -_0225C8B4: .word ov63_0222BDAC - thumb_func_end ov70_0225C8AC - - thumb_func_start ov70_0225C8B8 -ov70_0225C8B8: ; 0x0225C8B8 - push {r3, lr} - ldr r0, [r0, #0] - bl ov63_0222BDE4 - lsr r0, r0, #0xf - pop {r3, pc} - thumb_func_end ov70_0225C8B8 - - thumb_func_start ov70_0225C8C4 -ov70_0225C8C4: ; 0x0225C8C4 - push {r3, lr} - ldr r0, [r0, #0] - bl ov63_0222BDE4 - ldr r1, _0225C8D4 ; =0x00007FFF - and r0, r1 - pop {r3, pc} - nop -_0225C8D4: .word 0x00007FFF - thumb_func_end ov70_0225C8C4 - - thumb_func_start ov70_0225C8D8 -ov70_0225C8D8: ; 0x0225C8D8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r5, #0 - ldr r7, [sp, #0x28] - str r0, [sp] - str r1, [sp, #4] - str r2, [sp, #8] - str r3, [sp, #0xc] - str r5, [sp, #0x10] -_0225C8EA: - ldr r0, [sp, #0x10] - mov r4, #0 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 -_0225C8F2: - lsl r1, r4, #0x10 - ldr r0, [sp] - lsr r1, r1, #0x10 - add r2, r6, #0 - bl ov70_0225C8B8 - ldr r1, [sp, #4] - cmp r0, r1 - bne _0225C91A - cmp r5, r7 - blo _0225C918 - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - strh r4, [r0] - ldr r0, [sp, #0xc] - add sp, #0x14 - strh r1, [r0] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0225C918: - add r5, r5, #1 -_0225C91A: - add r4, r4, #1 - cmp r4, #0x23 - blt _0225C8F2 - ldr r0, [sp, #0x10] - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #0x2a - blt _0225C8EA - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_0225C8D8 - - thumb_func_start ov70_0225C930 -ov70_0225C930: ; 0x0225C930 - ldr r3, _0225C94C ; =0x0226D4DC - mov r2, #0 -_0225C934: - ldrb r1, [r3] - cmp r0, r1 - bne _0225C93E - mov r0, #1 - bx lr -_0225C93E: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #0x20 - blo _0225C934 - mov r0, #0 - bx lr - nop -_0225C94C: .word 0x0226D4DC - thumb_func_end ov70_0225C930 - - thumb_func_start ov70_0225C950 -ov70_0225C950: ; 0x0225C950 - ldr r3, _0225C96C ; =0x0226D4CC - mov r2, #0 -_0225C954: - ldrb r1, [r3] - cmp r0, r1 - bne _0225C95E - mov r0, #1 - bx lr -_0225C95E: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #3 - blo _0225C954 - mov r0, #0 - bx lr - nop -_0225C96C: .word 0x0226D4CC - thumb_func_end ov70_0225C950 - - thumb_func_start ov70_0225C970 -ov70_0225C970: ; 0x0225C970 - ldr r3, _0225C98C ; =0x0226D4D4 - mov r2, #0 -_0225C974: - ldrb r1, [r3] - cmp r0, r1 - bne _0225C97E - mov r0, #1 - bx lr -_0225C97E: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #7 - blo _0225C974 - mov r0, #0 - bx lr - nop -_0225C98C: .word 0x0226D4D4 - thumb_func_end ov70_0225C970 - - thumb_func_start ov70_0225C990 -ov70_0225C990: ; 0x0225C990 - ldr r3, _0225C9AC ; =0x0226D4D0 - mov r2, #0 -_0225C994: - ldrb r1, [r3] - cmp r0, r1 - bne _0225C99E - mov r0, #1 - bx lr -_0225C99E: - add r2, r2, #1 - add r3, r3, #1 - cmp r2, #4 - blo _0225C994 - mov r0, #0 - bx lr - nop -_0225C9AC: .word 0x0226D4D0 - thumb_func_end ov70_0225C990 - - thumb_func_start ov70_0225C9B0 -ov70_0225C9B0: ; 0x0225C9B0 - ldr r0, [r0, #0] - bx lr - thumb_func_end ov70_0225C9B0 - - thumb_func_start ov70_0225C9B4 -ov70_0225C9B4: ; 0x0225C9B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - add r0, r3, #0 - mov r1, #0x28 - str r2, [sp] - str r3, [sp, #4] - bl sub_02018144 - mov r1, #0 - mov r2, #0x28 - add r4, r0, #0 - bl sub_020D5124 - ldr r1, [sp, #4] - add r0, r5, #0 - bl ov63_0222BE18 - str r0, [r4, #0] - ldr r2, [sp, #4] - ldr r3, [sp, #0x20] - add r0, r5, #0 - add r1, r6, #0 - bl ov66_022343A8 - str r0, [r4, #4] - ldr r1, [sp, #4] - mov r0, #0x20 - bl ov63_0222D848 - str r0, [r4, #0x10] - mov r0, #0x28 - add r7, r5, #0 - mul r7, r0 - ldr r0, [sp, #4] - add r1, r7, #0 - strh r5, [r4, #0xc] - bl sub_02018144 - mov r1, #0 - add r2, r7, #0 - str r0, [r4, #8] - bl sub_020D5124 - ldr r0, [sp] - str r0, [r4, #0x14] - add r0, r4, #0 - strh r6, [r4, #0xe] - bl ov70_0225D0D8 - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225C9B4 - - thumb_func_start ov70_0225CA20 -ov70_0225CA20: ; 0x0225CA20 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_020181C4 - ldr r0, [r4, #0x10] - bl ov63_0222D880 - ldr r0, [r4, #4] - bl ov66_02234548 - ldr r0, [r4, #0] - bl ov63_0222BE58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov70_0225CA20 - - thumb_func_start ov70_0225CA44 -ov70_0225CA44: ; 0x0225CA44 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl ov63_0222BE84 - add r0, r4, #0 - ldr r1, [r4, #4] - add r0, #0x18 - bl ov70_0225D954 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CA44 - - thumb_func_start ov70_0225CA5C -ov70_0225CA5C: ; 0x0225CA5C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldrh r0, [r5, #0xc] - mov r6, #0 - cmp r0, #0 - ble _0225CA8C - add r4, r6, #0 -_0225CA6C: - ldr r0, [r5, #8] - add r0, r0, r4 - bl ov70_0225D2FC - cmp r0, #0 - bne _0225CA82 - ldr r0, [r5, #8] - add r1, r5, #0 - add r0, r0, r4 - ldr r2, [r0, #0x24] - blx r2 -_0225CA82: - ldrh r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0x28 - cmp r6, r0 - blt _0225CA6C -_0225CA8C: - ldr r0, [r5, #0x14] - bl ov70_0225C9B0 - add r4, r0, #0 - ldr r0, [r5, #0x10] - add r1, sp, #8 - bl ov63_0222D8D0 - cmp r0, #1 - bne _0225CAC8 - add r7, sp, #0 - add r6, sp, #8 -_0225CAA4: - ldr r1, [r5, #0] - add r0, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov63_0222CA88 - cmp r0, #1 - bne _0225CABC - ldr r0, [r5, #0] - add r1, r7, #0 - bl ov63_0222BE70 -_0225CABC: - ldr r0, [r5, #0x10] - add r1, r6, #0 - bl ov63_0222D8D0 - cmp r0, #1 - beq _0225CAA4 -_0225CAC8: - ldr r0, [r5, #4] - bl ov66_02234590 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CA5C - - thumb_func_start ov70_0225CAD4 -ov70_0225CAD4: ; 0x0225CAD4 - ldr r3, _0225CADC ; =ov66_022345C4 - ldr r0, [r0, #4] - bx r3 - nop -_0225CADC: .word ov66_022345C4 - thumb_func_end ov70_0225CAD4 - - thumb_func_start ov70_0225CAE0 -ov70_0225CAE0: ; 0x0225CAE0 - ldr r3, _0225CAE8 ; =ov66_02234604 - ldr r0, [r0, #4] - bx r3 - nop -_0225CAE8: .word ov66_02234604 - thumb_func_end ov70_0225CAE0 - - thumb_func_start ov70_0225CAEC -ov70_0225CAEC: ; 0x0225CAEC - add r3, r0, #0 - add r2, r1, #0 - ldr r1, [r3, #4] - lsl r3, r2, #2 - ldr r2, _0225CB00 ; =0x0226D518 - add r0, #0x18 - ldr r2, [r2, r3] - ldr r3, _0225CB04 ; =ov70_0225D920 - bx r3 - nop -_0225CB00: .word 0x0226D518 -_0225CB04: .word ov70_0225D920 - thumb_func_end ov70_0225CAEC - - thumb_func_start ov70_0225CB08 -ov70_0225CB08: ; 0x0225CB08 - lsl r2, r1, #2 - ldr r1, _0225CB14 ; =0x0226D518 - ldr r3, _0225CB18 ; =ov70_0225D93C - add r0, #0x18 - ldr r1, [r1, r2] - bx r3 - ; .align 2, 0 -_0225CB14: .word 0x0226D518 -_0225CB18: .word ov70_0225D93C - thumb_func_end ov70_0225CB08 - - thumb_func_start ov70_0225CB1C -ov70_0225CB1C: ; 0x0225CB1C - ldr r3, _0225CB24 ; =ov63_0222D894 - ldr r0, [r0, #0x10] - bx r3 - nop -_0225CB24: .word ov63_0222D894 - thumb_func_end ov70_0225CB1C - - thumb_func_start ov70_0225CB28 -ov70_0225CB28: ; 0x0225CB28 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - add r2, sp, #4 - add r4, r1, #0 - ldr r0, [r5, #0x14] - mov r1, #3 - add r2, #2 - add r3, sp, #4 - bl ov70_0225C8D8 - cmp r0, #0 - bne _0225CB4A - bl sub_02022974 -_0225CB4A: - add r3, sp, #4 - ldrh r2, [r3, #2] - ldrh r3, [r3] - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0225CB5C - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225CB28 - - thumb_func_start ov70_0225CB5C -ov70_0225CB5C: ; 0x0225CB5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - str r3, [sp] - bl ov70_0225D2C0 - add r4, r0, #0 - lsl r0, r7, #4 - add r1, sp, #4 - strh r0, [r1] - ldr r0, [sp] - mov r2, #0 - lsl r0, r0, #4 - strh r0, [r1, #2] - strh r6, [r1, #4] - strh r2, [r1, #6] - strh r2, [r1, #8] - ldrh r0, [r5, #0xe] - cmp r0, #0 - bne _0225CB8C - strh r2, [r1, #0xa] - b _0225CB90 -_0225CB8C: - mov r0, #0x61 - strh r0, [r1, #0xa] -_0225CB90: - ldr r0, [r5, #0] - add r1, sp, #4 - bl ov63_0222BEC0 - str r0, [r4, #0] - ldr r0, [r5, #4] - ldr r1, [r4, #0] - bl ov66_0223461C - str r0, [r4, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - str r4, [r5, #0x20] - bl ov70_0225CDEC - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CB5C - - thumb_func_start ov70_0225CBB8 -ov70_0225CBB8: ; 0x0225CBB8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r7, r1, #0 - str r2, [sp, #4] - bl ov70_0225D2C0 - mov r6, #0 - str r0, [sp, #8] - add r4, r6, #0 -_0225CBCC: - str r4, [sp] - add r2, sp, #0xc - ldr r0, [r5, #0x14] - add r1, r7, #4 - add r2, #2 - add r3, sp, #0xc - bl ov70_0225C8D8 - cmp r0, #0 - bne _0225CBE6 - add sp, #0x1c - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0225CBE6: - add r0, r5, #0 - bl ov70_0225CCAC - cmp r0, #0 - bne _0225CBF4 - mov r6, #1 - b _0225CC06 -_0225CBF4: - add r1, sp, #0xc - add r2, sp, #0xc - ldrh r1, [r1, #2] - ldrh r2, [r2] - bl ov70_0225CEDC - cmp r0, #0 - bne _0225CC06 - mov r6, #1 -_0225CC06: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r6, #0 - beq _0225CBCC - add r1, sp, #0xc - ldrh r0, [r1, #2] - lsl r0, r0, #4 - strh r0, [r1, #4] - ldrh r0, [r1] - lsl r0, r0, #4 - strh r0, [r1, #6] - strh r7, [r1, #8] - mov r0, #0 - strh r0, [r1, #0xa] - mov r0, #1 - strh r0, [r1, #0xc] - ldr r0, [sp, #4] - strh r0, [r1, #0xe] - ldr r0, [r5, #0] - add r1, sp, #0x10 - bl ov63_0222BEC0 - ldr r1, [sp, #8] - str r0, [r1, #0] - ldr r0, [r5, #4] - ldr r1, [r1, #0] - bl ov66_0223461C - ldr r1, [sp, #8] - mov r2, #0 - str r0, [r1, #4] - add r0, r5, #0 - bl ov70_0225CDEC - ldr r0, [sp, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CBB8 - - thumb_func_start ov70_0225CC54 -ov70_0225CC54: ; 0x0225CC54 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - bl ov66_02234798 - ldr r0, [r4, #0] - bl ov63_0222BF08 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x28 - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov70_0225CC54 - - thumb_func_start ov70_0225CC70 -ov70_0225CC70: ; 0x0225CC70 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrh r0, [r5, #0xc] - add r7, r1, #0 - mov r6, #0 - cmp r0, #0 - ble _0225CCA6 - add r4, r6, #0 -_0225CC80: - ldr r0, [r5, #8] - ldr r0, [r0, r4] - cmp r0, #0 - beq _0225CC9C - mov r1, #4 - bl ov63_0222BF90 - cmp r0, r7 - bne _0225CC9C - mov r0, #0x28 - ldr r1, [r5, #8] - mul r0, r6 - add r0, r1, r0 - pop {r3, r4, r5, r6, r7, pc} -_0225CC9C: - ldrh r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0x28 - cmp r6, r0 - blt _0225CC80 -_0225CCA6: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CC70 - - thumb_func_start ov70_0225CCAC -ov70_0225CCAC: ; 0x0225CCAC - ldr r0, [r0, #0x20] - bx lr - thumb_func_end ov70_0225CCAC - - thumb_func_start ov70_0225CCB0 -ov70_0225CCB0: ; 0x0225CCB0 - ldr r0, [r0, #0x24] - bx lr - thumb_func_end ov70_0225CCB0 - - thumb_func_start ov70_0225CCB4 -ov70_0225CCB4: ; 0x0225CCB4 - push {r0, r1, r2, r3} - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0225CCC4 - bl sub_02022974 -_0225CCC4: - add r1, sp, #8 - ldrh r2, [r1, #4] - mov r3, sp - ldr r0, [r4, #0] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1A4 - add r1, sp, #8 - mov r3, sp - ldrh r2, [r1, #4] - ldr r0, [r4, #0] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C1B4 - ldr r0, [r4, #0] - mov r1, #5 - mov r2, #0 - bl ov63_0222C000 - pop {r4} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov70_0225CCB4 - - thumb_func_start ov70_0225CD04 -ov70_0225CD04: ; 0x0225CD04 - push {r0, r1, r2, r3} - push {r3, r4, r5, lr} - add r1, sp, #0x10 - add r4, r2, #0 - mov r3, sp - ldrh r2, [r1, #4] - sub r3, r3, #4 - add r5, r0, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov70_0225CCB4 - ldr r0, [r5, #0] - mov r1, #6 - add r2, r4, #0 - bl ov63_0222C000 - pop {r3, r4, r5} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov70_0225CD04 - - thumb_func_start ov70_0225CD34 -ov70_0225CD34: ; 0x0225CD34 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0225CD44 - bl sub_02022974 -_0225CD44: - ldr r0, [r4, #0] - bl ov63_0222C0FC - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r2, [r1, #2] - ldrh r0, [r1] - lsl r1, r2, #0x10 - orr r0, r1 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CD34 - - thumb_func_start ov70_0225CD60 -ov70_0225CD60: ; 0x0225CD60 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #0 - bne _0225CD70 - bl sub_02022974 -_0225CD70: - ldr r0, [r5, #0] - add r1, r4, #0 - bl ov63_0222BF90 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CD60 - - thumb_func_start ov70_0225CD7C -ov70_0225CD7C: ; 0x0225CD7C - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #5 - add r6, r2, #0 - add r7, r3, #0 - bl ov63_0222BF90 - cmp r0, #0 - beq _0225CD96 - bl sub_02022974 -_0225CD96: - ldr r0, [r4, #0] - mov r1, #4 - bl ov63_0222BF90 - add r3, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225CD7C - - thumb_func_start ov70_0225CDAC -ov70_0225CDAC: ; 0x0225CDAC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - add r6, r2, #0 - add r7, r3, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - strh r6, [r1, #8] - strb r7, [r1, #0xa] - ldr r0, [r4, #0] - mov r1, #4 - bl ov63_0222BF90 - add r1, sp, #0 - strb r0, [r1, #0xb] - ldr r0, [r5, #0] - add r1, sp, #4 - bl ov63_0222BE70 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CDAC - - thumb_func_start ov70_0225CDEC -ov70_0225CDEC: ; 0x0225CDEC - push {r4, r5, r6, lr} - add r4, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - cmp r4, #0xa - blt _0225CDFC - bl sub_02022974 -_0225CDFC: - ldrb r0, [r5, #0xb] - lsl r1, r0, #2 - ldr r0, _0225CE30 ; =0x0226D530 - ldr r2, [r0, r1] - cmp r2, #0 - beq _0225CE0E - add r0, r5, #0 - add r1, r6, #0 - blx r2 -_0225CE0E: - mov r2, #0 - strh r2, [r5, #8] - strb r2, [r5, #0xa] - add r1, r5, #0 - strb r4, [r5, #0xb] - add r1, #0xc - mov r0, #0x18 -_0225CE1C: - strb r2, [r1] - add r1, r1, #1 - sub r0, r0, #1 - bne _0225CE1C - ldr r0, _0225CE34 ; =0x0226D558 - lsl r1, r4, #2 - ldr r0, [r0, r1] - str r0, [r5, #0x24] - pop {r4, r5, r6, pc} - nop -_0225CE30: .word 0x0226D530 -_0225CE34: .word 0x0226D558 - thumb_func_end ov70_0225CDEC - - thumb_func_start ov70_0225CE38 -ov70_0225CE38: ; 0x0225CE38 - ldrb r0, [r0, #0xa] - bx lr - thumb_func_end ov70_0225CE38 - - thumb_func_start ov70_0225CE3C -ov70_0225CE3C: ; 0x0225CE3C - ldrb r0, [r0, #0xb] - bx lr - thumb_func_end ov70_0225CE3C - - thumb_func_start ov70_0225CE40 -ov70_0225CE40: ; 0x0225CE40 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - mov r1, #6 - bl ov63_0222BF90 - add r2, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r5, #0] - bl ov63_0222C1C4 - cmp r0, #0 - bne _0225CE60 - mov r0, #0 - pop {r3, r4, r5, pc} -_0225CE60: - mov r1, #4 - bl ov63_0222BF90 - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225CC70 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225CE40 - - thumb_func_start ov70_0225CE70 -ov70_0225CE70: ; 0x0225CE70 - ldr r3, _0225CE78 ; =ov66_022347CC - ldr r0, [r0, #4] - bx r3 - nop -_0225CE78: .word ov66_022347CC - thumb_func_end ov70_0225CE70 - - thumb_func_start ov70_0225CE7C -ov70_0225CE7C: ; 0x0225CE7C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - lsl r0, r1, #4 - add r1, sp, #0 - strh r0, [r1] - lsl r0, r2, #4 - strh r0, [r1, #2] - mov r3, sp - ldrh r2, [r1] - ldr r0, [r4, #0] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #2] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov63_0222C2AC - cmp r0, #0 - bne _0225CEAA - add sp, #4 - mov r0, #0 - pop {r3, r4, pc} -_0225CEAA: - ldrh r2, [r4, #0xc] - mov r1, #0 - cmp r2, #0 - ble _0225CED0 - ldr r3, [r4, #8] -_0225CEB4: - ldr r2, [r3, #0] - cmp r2, r0 - bne _0225CEC6 - mov r0, #0x28 - ldr r2, [r4, #8] - mul r0, r1 - add sp, #4 - add r0, r2, r0 - pop {r3, r4, pc} -_0225CEC6: - ldrh r2, [r4, #0xc] - add r1, r1, #1 - add r3, #0x28 - cmp r1, r2 - blt _0225CEB4 -_0225CED0: - bl sub_02022974 - mov r0, #0 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225CE7C - - thumb_func_start ov70_0225CEDC -ov70_0225CEDC: ; 0x0225CEDC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r4, r2, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldr r0, [r5, #0] - bl ov63_0222C0F0 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #0xc - strh r0, [r2, #8] - ldrh r0, [r2, #2] - strh r0, [r2, #0xa] - ldrsh r1, [r2, r1] - lsl r0, r6, #4 - cmp r1, r0 - bne _0225CF2C - mov r1, #0xe - ldrsh r2, [r2, r1] - lsl r1, r4, #4 - cmp r2, r1 - bne _0225CF2C - add sp, #0x10 - mov r0, #1 - pop {r4, r5, r6, pc} -_0225CF2C: - add r2, sp, #0 - mov r1, #8 - ldrsh r1, [r2, r1] - cmp r1, r0 - bne _0225CF46 - mov r0, #0xa - ldrsh r1, [r2, r0] - lsl r0, r4, #4 - cmp r1, r0 - bne _0225CF46 - add sp, #0x10 - mov r0, #1 - pop {r4, r5, r6, pc} -_0225CF46: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225CEDC - - thumb_func_start ov70_0225CF4C -ov70_0225CF4C: ; 0x0225CF4C - push {r4, r5, r6, r7, lr} - sub sp, #0x2c - add r6, r0, #0 - ldr r0, [r1, #0] - str r2, [sp] - str r3, [sp, #4] - bl ov63_0222C0E4 - add r4, sp, #0x1c - strh r0, [r4, #4] - lsr r0, r0, #0x10 - strh r0, [r4, #6] - ldrh r0, [r4, #4] - mov r5, sp - ldr r7, _0225D02C ; =0x0226D504 - strh r0, [r4, #0xc] - ldrh r0, [r4, #6] - sub r5, r5, #4 - strh r0, [r4, #0xe] - mov r0, #0 - str r0, [sp, #0x10] - ldrh r0, [r4, #0xc] - str r0, [sp, #0x14] - ldrh r0, [r4, #0xe] - str r0, [sp, #0x18] -_0225CF7E: - ldr r0, [sp, #0x14] - strh r0, [r5] - ldr r0, [sp, #0x18] - strh r0, [r5, #2] - ldrb r1, [r7] - ldr r0, [r5, #0] - bl ov63_0222C078 - strh r0, [r4] - lsr r0, r0, #0x10 - strh r0, [r4, #2] - ldrh r0, [r4] - strh r0, [r4, #8] - ldrh r0, [r4, #2] - strh r0, [r4, #0xa] - mov r0, #0xa - ldrsh r1, [r4, r0] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - str r0, [sp, #0xc] - mov r0, #8 - ldrsh r1, [r4, r0] - ldr r2, [sp, #0xc] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - str r0, [sp, #8] - ldr r1, [sp, #8] - lsl r2, r2, #0x10 - lsl r1, r1, #0x10 - ldr r0, [r6, #0x14] - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov70_0225C8AC - cmp r0, #1 - beq _0225D018 - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r6, #0x14] - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov70_0225C8C4 - cmp r0, #0 - beq _0225CFE8 - cmp r0, #0x2a - bne _0225D018 -_0225CFE8: - ldrh r1, [r4, #8] - ldr r0, [r6, #0] - strh r1, [r5] - ldrh r1, [r4, #0xa] - strh r1, [r5, #2] - ldr r1, [r5, #0] - bl ov63_0222C2AC - cmp r0, #0 - bne _0225D018 - ldr r1, _0225D02C ; =0x0226D504 - ldr r0, [sp, #0x10] - ldrb r1, [r1, r0] - ldr r0, [sp] - str r1, [r0, #0] - add r1, sp, #0x1c - ldr r0, [sp, #4] - ldrh r2, [r1, #8] - add sp, #0x2c - strh r2, [r0] - ldrh r1, [r1, #0xa] - strh r1, [r0, #2] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0225D018: - ldr r0, [sp, #0x10] - add r7, r7, #1 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #4 - blt _0225CF7E - mov r0, #0 - add sp, #0x2c - pop {r4, r5, r6, r7, pc} - nop -_0225D02C: .word 0x0226D504 - thumb_func_end ov70_0225CF4C - - thumb_func_start ov70_0225D030 -ov70_0225D030: ; 0x0225D030 - ldr r3, _0225D038 ; =ov66_022347B0 - ldr r0, [r0, #4] - bx r3 - nop -_0225D038: .word ov66_022347B0 - thumb_func_end ov70_0225D030 - - thumb_func_start ov70_0225D03C -ov70_0225D03C: ; 0x0225D03C - ldr r3, _0225D044 ; =ov66_022347D4 - ldr r0, [r0, #4] - bx r3 - nop -_0225D044: .word ov66_022347D4 - thumb_func_end ov70_0225D03C - - thumb_func_start ov70_0225D048 -ov70_0225D048: ; 0x0225D048 - ldr r3, _0225D050 ; =ov66_022347F8 - ldr r0, [r0, #4] - bx r3 - nop -_0225D050: .word ov66_022347F8 - thumb_func_end ov70_0225D048 - - thumb_func_start ov70_0225D054 -ov70_0225D054: ; 0x0225D054 - ldr r3, _0225D05C ; =ov66_0223481C - ldr r0, [r0, #4] - bx r3 - nop -_0225D05C: .word ov66_0223481C - thumb_func_end ov70_0225D054 - - thumb_func_start ov70_0225D060 -ov70_0225D060: ; 0x0225D060 - ldr r3, _0225D068 ; =ov66_02234834 - ldr r0, [r0, #4] - bx r3 - nop -_0225D068: .word ov66_02234834 - thumb_func_end ov70_0225D060 - - thumb_func_start ov70_0225D06C -ov70_0225D06C: ; 0x0225D06C - push {r3, lr} - cmp r1, #0 - ldr r0, [r0, #4] - beq _0225D07C - mov r1, #1 - bl ov66_02234850 - pop {r3, pc} -_0225D07C: - bl ov66_0223487C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D06C - - thumb_func_start ov70_0225D084 -ov70_0225D084: ; 0x0225D084 - push {r3, lr} - cmp r1, #0 - ldr r0, [r0, #4] - beq _0225D094 - mov r1, #0 - bl ov66_02234850 - pop {r3, pc} -_0225D094: - bl ov66_0223487C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D084 - - thumb_func_start ov70_0225D09C -ov70_0225D09C: ; 0x0225D09C - push {r3, lr} - cmp r1, #0 - ldr r0, [r0, #4] - beq _0225D0AC - mov r1, #2 - bl ov66_02234850 - pop {r3, pc} -_0225D0AC: - bl ov66_0223487C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D09C - - thumb_func_start ov70_0225D0B4 -ov70_0225D0B4: ; 0x0225D0B4 - ldr r3, _0225D0BC ; =ov66_022347C4 - ldr r0, [r0, #4] - bx r3 - nop -_0225D0BC: .word ov66_022347C4 - thumb_func_end ov70_0225D0B4 - - thumb_func_start ov70_0225D0C0 -ov70_0225D0C0: ; 0x0225D0C0 - ldr r3, _0225D0C8 ; =ov66_0223488C - ldr r0, [r0, #4] - bx r3 - nop -_0225D0C8: .word ov66_0223488C - thumb_func_end ov70_0225D0C0 - - thumb_func_start ov70_0225D0CC -ov70_0225D0CC: ; 0x0225D0CC - ldr r3, _0225D0D4 ; =ov66_022348A8 - ldr r0, [r0, #4] - bx r3 - nop -_0225D0D4: .word ov66_022348A8 - thumb_func_end ov70_0225D0CC - - thumb_func_start ov70_0225D0D8 -ov70_0225D0D8: ; 0x0225D0D8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0 - ldr r4, _0225D178 ; =0x0226D508 - str r0, [sp, #8] -_0225D0E4: - mov r0, #0 - str r0, [sp, #4] - str r0, [sp] - ldrb r1, [r4] - add r2, sp, #0xc - ldr r0, [r5, #0x14] - add r2, #2 - add r3, sp, #0xc - bl ov70_0225C8D8 - cmp r0, #1 - bne _0225D166 - add r7, sp, #0xc -_0225D0FE: - add r0, r5, #0 - bl ov70_0225D2C0 - add r6, r0, #0 - ldrh r0, [r7, #2] - add r1, sp, #0x10 - lsl r0, r0, #4 - strh r0, [r7, #4] - ldrh r0, [r7] - lsl r0, r0, #4 - strh r0, [r7, #6] - ldrb r0, [r4, #3] - strh r0, [r7, #8] - mov r0, #0 - strh r0, [r7, #0xa] - ldrb r0, [r4, #1] - strh r0, [r7, #0xc] - ldrb r0, [r4, #2] - strh r0, [r7, #0xe] - ldr r0, [r5, #0] - bl ov63_0222BEC0 - add r1, r0, #0 - str r1, [r6, #0] - ldr r0, [r5, #4] - bl ov66_0223461C - str r0, [r6, #4] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov70_0225CDEC - ldrb r0, [r4] - cmp r0, #0x61 - bne _0225D148 - str r6, [r5, #0x24] -_0225D148: - ldr r0, [sp, #4] - add r2, sp, #0xc - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - str r0, [sp] - ldrb r1, [r4] - ldr r0, [r5, #0x14] - add r2, #2 - add r3, sp, #0xc - bl ov70_0225C8D8 - cmp r0, #1 - beq _0225D0FE -_0225D166: - ldr r0, [sp, #8] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #4 - blo _0225D0E4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0225D178: .word 0x0226D508 - thumb_func_end ov70_0225D0D8 - - thumb_func_start ov70_0225D17C -ov70_0225D17C: ; 0x0225D17C - push {r3, r4, lr} - sub sp, #4 - add r4, sp, #0 - strh r1, [r4] - strb r2, [r4, #2] - add r1, sp, #0 - strb r3, [r4, #3] - bl ov70_0225CB1C - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D17C - - thumb_func_start ov70_0225D194 -ov70_0225D194: ; 0x0225D194 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - bl sub_0201D35C - add r1, r4, #0 - bl sub_020E2178 - ldrb r0, [r5, r1] - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225D194 - - thumb_func_start ov70_0225D1A8 -ov70_0225D1A8: ; 0x0225D1A8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r1, #0] - add r6, r2, #0 - add r4, r3, #0 - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - mov r2, sp - sub r2, r2, #4 - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldrh r0, [r1, #0xc] - strh r0, [r2] - ldrh r0, [r1, #0xe] - add r1, r6, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C078 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #8 - strh r0, [r2, #8] - ldrh r0, [r2, #2] - strh r0, [r2, #0xa] - ldrsh r3, [r2, r1] - ldr r0, [r5, #0x14] - asr r1, r3, #3 - lsr r1, r1, #0x1c - add r1, r3, r1 - mov r3, #0xa - ldrsh r3, [r2, r3] - lsl r1, r1, #0xc - lsr r1, r1, #0x10 - asr r2, r3, #3 - lsr r2, r2, #0x1c - add r2, r3, r2 - lsl r2, r2, #0xc - lsr r2, r2, #0x10 - bl ov70_0225C8B8 - cmp r0, r4 - bne _0225D218 - add sp, #0x10 - mov r0, #1 - pop {r4, r5, r6, pc} -_0225D218: - mov r0, #0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D1A8 - - thumb_func_start ov70_0225D220 -ov70_0225D220: ; 0x0225D220 - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0xc] - bx lr - thumb_func_end ov70_0225D220 - - thumb_func_start ov70_0225D22C -ov70_0225D22C: ; 0x0225D22C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r6, [r5, #8] - beq _0225D248 - lsl r0, r4, #0xc - bl sub_020E17FC - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0225D256 -_0225D248: - lsl r0, r4, #0xc - bl sub_020E17FC - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0225D256: - bl sub_020E1740 - add r2, r0, #0 - asr r1, r6, #0x1f - add r0, r6, #0 - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r6, r2, #0xc - orr r6, r0 - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _0225D28E - lsl r0, r0, #0xc - bl sub_020E17FC - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0225D29C -_0225D28E: - lsl r0, r0, #0xc - bl sub_020E17FC - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0225D29C: - bl sub_020E1740 - add r1, r0, #0 - add r0, r6, #0 - bl sub_020BCFD0 - ldr r1, [r5, #4] - add r0, r0, r1 - str r0, [r5, #0] - ldr r0, [r5, #0xc] - cmp r4, r0 - blo _0225D2B8 - mov r0, #1 - pop {r4, r5, r6, pc} -_0225D2B8: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225D22C - - thumb_func_start ov70_0225D2BC -ov70_0225D2BC: ; 0x0225D2BC - ldr r0, [r0, #0] - bx lr - thumb_func_end ov70_0225D2BC - - thumb_func_start ov70_0225D2C0 -ov70_0225D2C0: ; 0x0225D2C0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldrh r0, [r5, #0xc] - mov r6, #0 - cmp r0, #0 - ble _0225D2EE - add r4, r6, #0 -_0225D2CE: - ldr r0, [r5, #8] - add r0, r0, r4 - bl ov70_0225D2FC - cmp r0, #0 - beq _0225D2E4 - mov r0, #0x28 - ldr r1, [r5, #8] - mul r0, r6 - add r0, r1, r0 - pop {r4, r5, r6, pc} -_0225D2E4: - ldrh r0, [r5, #0xc] - add r6, r6, #1 - add r4, #0x28 - cmp r6, r0 - blt _0225D2CE -_0225D2EE: - bl sub_02022974 - mov r0, #0x28 - ldr r1, [r5, #8] - mul r0, r6 - add r0, r1, r0 - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225D2C0 - - thumb_func_start ov70_0225D2FC -ov70_0225D2FC: ; 0x0225D2FC - ldr r0, [r0, #0] - cmp r0, #0 - bne _0225D306 - mov r0, #1 - bx lr -_0225D306: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225D2FC - - thumb_func_start ov70_0225D30C -ov70_0225D30C: ; 0x0225D30C - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225D30C - - thumb_func_start ov70_0225D310 -ov70_0225D310: ; 0x0225D310 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0] - add r5, r1, #0 - mov r1, #6 - bl ov63_0222BF90 - add r4, r0, #0 - ldr r0, [r7, #0] - mov r1, #4 - bl ov63_0222BF90 - add r6, r0, #0 - ldr r0, [r7, #0] - mov r1, #5 - bl ov63_0222BF90 - cmp r0, #0 - bne _0225D3D2 - ldr r0, _0225D3D4 ; =0x021BF67C - mov r1, #2 - ldr r0, [r0, #0x44] - add r2, r0, #0 - tst r2, r1 - beq _0225D344 - mov r1, #3 -_0225D344: - mov r2, #0x40 - tst r2, r0 - beq _0225D368 - cmp r4, #0 - bne _0225D35A - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D35A: - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D368: - mov r2, #0x80 - tst r2, r0 - beq _0225D38C - cmp r4, #1 - bne _0225D37E - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D37E: - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D38C: - mov r2, #0x20 - tst r2, r0 - beq _0225D3B0 - cmp r4, #2 - bne _0225D3A2 - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D3A2: - add r0, r5, #0 - mov r1, #1 - mov r2, #2 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D3B0: - mov r2, #0x10 - tst r0, r2 - beq _0225D3D2 - cmp r4, #3 - bne _0225D3C6 - add r0, r5, #0 - add r2, r4, #0 - add r3, r6, #0 - bl ov70_0225D17C - pop {r3, r4, r5, r6, r7, pc} -_0225D3C6: - add r0, r5, #0 - mov r1, #1 - mov r2, #3 - add r3, r6, #0 - bl ov70_0225D17C -_0225D3D2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225D3D4: .word 0x021BF67C - thumb_func_end ov70_0225D310 - - thumb_func_start ov70_0225D3D8 -ov70_0225D3D8: ; 0x0225D3D8 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldrh r0, [r4, #8] - add r5, r1, #0 - cmp r0, #4 - bhi _0225D4C0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D3F0: ; jump table - .short _0225D3FA - _0225D3F0 - 2 ; case 0 - .short _0225D40C - _0225D3F0 - 2 ; case 1 - .short _0225D422 - _0225D3F0 - 2 ; case 2 - .short _0225D48E - _0225D3F0 - 2 ; case 3 - .short _0225D4B0 - _0225D3F0 - 2 ; case 4 -_0225D3FA: - ldr r0, _0225D4C4 ; =0x0226D500 - mov r1, #4 - bl ov70_0225D194 - strh r0, [r4, #0xc] - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225D40C: - mov r0, #0xc - ldrsh r1, [r4, r0] - sub r1, r1, #1 - strh r1, [r4, #0xc] - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _0225D4C0 - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225D422: - ldr r0, [r4, #0] - mov r1, #4 - bl ov63_0222BF90 - add r6, r0, #0 - ldr r0, [r4, #0] - mov r1, #6 - bl ov63_0222BF90 - add r7, r0, #0 - ldr r0, _0225D4C8 ; =0x0226D4FC - mov r1, #4 - bl ov70_0225D194 - strh r0, [r4, #0xe] - mov r2, #0xe - ldrsh r2, [r4, r2] - add r0, r5, #0 - add r1, r4, #0 - add r3, r6, #4 - bl ov70_0225D1A8 - cmp r0, #1 - bne _0225D47A - mov r0, #0xe - ldrsh r3, [r4, r0] - cmp r7, r3 - bne _0225D46A - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov70_0225CD7C - mov r0, #4 - strh r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225D46A: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov70_0225CD7C - mov r0, #3 - strh r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225D47A: - mov r3, #0xe - ldrsh r3, [r4, r3] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov70_0225CD7C - mov r0, #4 - strh r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225D48E: - ldr r0, [r4, #0] - mov r1, #5 - bl ov63_0222BF90 - cmp r0, #0 - bne _0225D4C0 - mov r3, #0xe - ldrsh r3, [r4, r3] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov70_0225CD7C - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - pop {r3, r4, r5, r6, r7, pc} -_0225D4B0: - ldr r0, [r4, #0] - mov r1, #5 - bl ov63_0222BF90 - cmp r0, #0 - bne _0225D4C0 - mov r0, #0 - strh r0, [r4, #8] -_0225D4C0: - pop {r3, r4, r5, r6, r7, pc} - nop -_0225D4C4: .word 0x0226D500 -_0225D4C8: .word 0x0226D4FC - thumb_func_end ov70_0225D3D8 - - thumb_func_start ov70_0225D4CC -ov70_0225D4CC: ; 0x0225D4CC - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldrh r0, [r4, #8] - cmp r0, #3 - bhi _0225D572 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D4E4: ; jump table - .short _0225D4EC - _0225D4E4 - 2 ; case 0 - .short _0225D516 - _0225D4E4 - 2 ; case 1 - .short _0225D532 - _0225D4E4 - 2 ; case 2 - .short _0225D572 - _0225D4E4 - 2 ; case 3 -_0225D4EC: - ldr r0, [r4, #4] - mov r1, #0 - bl ov66_022347B0 - ldr r0, [r4, #4] - mov r1, #0 - bl ov66_02234850 - add r0, r4, #0 - mov r2, #0x7d - add r0, #0xc - mov r1, #0 - lsl r2, r2, #0xe - mov r3, #0x18 - bl ov70_0225D220 - mov r0, #0x20 - str r0, [r4, #0x1c] - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] -_0225D516: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bne _0225D572 - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0x1c] - ldr r0, _0225D578 ; =0x0000064F - bl sub_02005748 - add sp, #0xc - pop {r4, r5, pc} -_0225D532: - add r0, r4, #0 - ldr r1, [r4, #0x1c] - add r0, #0xc - bl ov70_0225D22C - add r5, r0, #0 - ldr r0, [r4, #0x1c] - add r1, sp, #0 - add r0, r0, #1 - str r0, [r4, #0x1c] - ldr r0, [r4, #4] - bl ov66_0223481C - add r0, r4, #0 - add r0, #0xc - bl ov70_0225D2BC - str r0, [sp, #4] - ldr r0, [r4, #4] - add r1, sp, #0 - bl ov66_022347F8 - cmp r5, #1 - bne _0225D572 - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldr r0, [r4, #4] - bl ov66_0223487C - mov r0, #1 - strb r0, [r4, #0xa] -_0225D572: - add sp, #0xc - pop {r4, r5, pc} - nop -_0225D578: .word 0x0000064F - thumb_func_end ov70_0225D4CC - - thumb_func_start ov70_0225D57C -ov70_0225D57C: ; 0x0225D57C - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldrh r0, [r4, #8] - cmp r0, #3 - bhi _0225D62A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D594: ; jump table - .short _0225D59C - _0225D594 - 2 ; case 0 - .short _0225D5CC - _0225D594 - 2 ; case 1 - .short _0225D60A - _0225D594 - 2 ; case 2 - .short _0225D62A - _0225D594 - 2 ; case 3 -_0225D59C: - ldr r0, [r4, #4] - mov r1, #0 - bl ov66_022347B0 - ldr r0, [r4, #4] - mov r1, #0 - bl ov66_02234850 - add r0, r4, #0 - mov r1, #0x7d - add r0, #0xc - lsl r1, r1, #0xe - mov r2, #0 - mov r3, #0x18 - bl ov70_0225D220 - mov r0, #0 - str r0, [r4, #0x1c] - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldr r0, _0225D630 ; =0x0000064F - bl sub_02005748 -_0225D5CC: - add r0, r4, #0 - ldr r1, [r4, #0x1c] - add r0, #0xc - bl ov70_0225D22C - add r5, r0, #0 - ldr r0, [r4, #0x1c] - add r1, sp, #0 - add r0, r0, #1 - str r0, [r4, #0x1c] - ldr r0, [r4, #4] - bl ov66_0223481C - add r0, r4, #0 - add r0, #0xc - bl ov70_0225D2BC - str r0, [sp, #4] - ldr r0, [r4, #4] - add r1, sp, #0 - bl ov66_022347F8 - cmp r5, #1 - bne _0225D62A - mov r0, #0x20 - str r0, [r4, #0x1c] - ldrh r0, [r4, #8] - add sp, #0xc - add r0, r0, #1 - strh r0, [r4, #8] - pop {r4, r5, pc} -_0225D60A: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bne _0225D62A - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldr r0, [r4, #4] - bl ov66_0223487C - ldr r0, [r4, #4] - mov r1, #1 - bl ov66_022347B0 - mov r0, #1 - strb r0, [r4, #0xa] -_0225D62A: - add sp, #0xc - pop {r4, r5, pc} - nop -_0225D630: .word 0x0000064F - thumb_func_end ov70_0225D57C - - thumb_func_start ov70_0225D634 -ov70_0225D634: ; 0x0225D634 - ldr r3, _0225D63C ; =ov70_0225D664 - mov r2, #2 - bx r3 - nop -_0225D63C: .word ov70_0225D664 - thumb_func_end ov70_0225D634 - - thumb_func_start ov70_0225D640 -ov70_0225D640: ; 0x0225D640 - ldr r3, _0225D648 ; =ov70_0225D664 - mov r2, #3 - bx r3 - nop -_0225D648: .word ov70_0225D664 - thumb_func_end ov70_0225D640 - - thumb_func_start ov70_0225D64C -ov70_0225D64C: ; 0x0225D64C - ldr r3, _0225D654 ; =ov70_0225D664 - mov r2, #0 - bx r3 - nop -_0225D654: .word ov70_0225D664 - thumb_func_end ov70_0225D64C - - thumb_func_start ov70_0225D658 -ov70_0225D658: ; 0x0225D658 - ldr r3, _0225D660 ; =ov70_0225D664 - mov r2, #1 - bx r3 - nop -_0225D660: .word ov70_0225D664 - thumb_func_end ov70_0225D658 - - thumb_func_start ov70_0225D664 -ov70_0225D664: ; 0x0225D664 - push {r4, r5, r6, lr} - sub sp, #0x28 - add r4, r0, #0 - ldrh r0, [r4, #8] - add r5, r2, #0 - cmp r0, #3 - bls _0225D674 - b _0225D816 -_0225D674: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D680: ; jump table - .short _0225D688 - _0225D680 - 2 ; case 0 - .short _0225D6E4 - _0225D680 - 2 ; case 1 - .short _0225D79E - _0225D680 - 2 ; case 2 - .short _0225D816 - _0225D680 - 2 ; case 3 -_0225D688: - ldr r0, [r4, #4] - mov r1, #0 - bl ov66_022347B0 - ldr r0, [r4, #4] - mov r1, #0 - bl ov66_02234850 - ldr r0, [r4, #4] - mov r1, #2 - bl ov66_02234888 - add r0, r4, #0 - mov r2, #1 - add r0, #0xc - mov r1, #0 - lsl r2, r2, #0x10 - mov r3, #4 - bl ov70_0225D220 - ldr r0, [r4, #4] - add r1, sp, #0x1c - bl ov66_0223481C - cmp r5, #3 - bhi _0225D6DA - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D6C8: ; jump table - .short _0225D6D0 - _0225D6C8 - 2 ; case 0 - .short _0225D6D0 - _0225D6C8 - 2 ; case 1 - .short _0225D6D6 - _0225D6C8 - 2 ; case 2 - .short _0225D6D6 - _0225D6C8 - 2 ; case 3 -_0225D6D0: - ldr r0, [sp, #0x24] - str r0, [r4, #0x20] - b _0225D6DA -_0225D6D6: - ldr r0, [sp, #0x1c] - str r0, [r4, #0x20] -_0225D6DA: - mov r0, #0 - str r0, [r4, #0x1c] - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] -_0225D6E4: - add r0, r4, #0 - ldr r1, [r4, #0x1c] - add r0, #0xc - bl ov70_0225D22C - add r6, r0, #0 - ldr r0, [r4, #0x1c] - add r1, sp, #0x10 - add r0, r0, #1 - str r0, [r4, #0x1c] - ldr r0, [r4, #4] - bl ov66_0223481C - cmp r5, #3 - bhi _0225D754 - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D70E: ; jump table - .short _0225D716 - _0225D70E - 2 ; case 0 - .short _0225D726 - _0225D70E - 2 ; case 1 - .short _0225D736 - _0225D70E - 2 ; case 2 - .short _0225D746 - _0225D70E - 2 ; case 3 -_0225D716: - add r0, r4, #0 - add r0, #0xc - bl ov70_0225D2BC - ldr r1, [r4, #0x20] - sub r0, r1, r0 - str r0, [sp, #0x18] - b _0225D754 -_0225D726: - add r0, r4, #0 - add r0, #0xc - bl ov70_0225D2BC - ldr r1, [r4, #0x20] - add r0, r1, r0 - str r0, [sp, #0x18] - b _0225D754 -_0225D736: - add r0, r4, #0 - add r0, #0xc - bl ov70_0225D2BC - ldr r1, [r4, #0x20] - sub r0, r1, r0 - str r0, [sp, #0x10] - b _0225D754 -_0225D746: - add r0, r4, #0 - add r0, #0xc - bl ov70_0225D2BC - ldr r1, [r4, #0x20] - add r0, r1, r0 - str r0, [sp, #0x10] -_0225D754: - ldr r0, [r4, #4] - add r1, sp, #0x10 - bl ov66_022347F8 - cmp r6, #1 - bne _0225D816 - add r0, r5, #0 - bl ov63_0222C0AC - mov r1, #4 - str r1, [r4, #0x1c] - cmp r0, #3 - bhi _0225D794 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225D77A: ; jump table - .short _0225D788 - _0225D77A - 2 ; case 0 - .short _0225D794 - _0225D77A - 2 ; case 1 - .short _0225D78E - _0225D77A - 2 ; case 2 - .short _0225D782 - _0225D77A - 2 ; case 3 -_0225D782: - ldr r0, [r4, #0x1c] - add r0, r0, #2 - str r0, [r4, #0x1c] -_0225D788: - ldr r0, [r4, #0x1c] - add r0, r0, #2 - str r0, [r4, #0x1c] -_0225D78E: - ldr r0, [r4, #0x1c] - add r0, r0, #2 - str r0, [r4, #0x1c] -_0225D794: - ldrh r0, [r4, #8] - add sp, #0x28 - add r0, r0, #1 - strh r0, [r4, #8] - pop {r4, r5, r6, pc} -_0225D79E: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bne _0225D816 - ldrh r0, [r4, #8] - add r0, r0, #1 - strh r0, [r4, #8] - ldr r0, [r4, #0] - bl ov63_0222C0E4 - add r1, sp, #0 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - mov r2, sp - sub r2, r2, #4 - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldrh r0, [r1, #0xc] - strh r0, [r2] - ldrh r0, [r1, #0xe] - add r1, r5, #0 - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C078 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #8] - ldrh r0, [r1, #2] - strh r0, [r1, #0xa] - add r0, r5, #0 - bl ov63_0222C0AC - add r1, sp, #0 - mov r5, sp - add r2, r0, #0 - ldrh r3, [r1, #8] - sub r5, r5, #4 - add r0, r4, #0 - strh r3, [r5] - ldrh r1, [r1, #0xa] - strh r1, [r5, #2] - ldr r1, [r5, #0] - bl ov70_0225CD04 - ldr r0, [r4, #4] - bl ov66_0223487C - ldr r0, [r4, #4] - mov r1, #1 - bl ov66_022347B0 - mov r0, #1 - strb r0, [r4, #0xa] -_0225D816: - add sp, #0x28 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D664 - - thumb_func_start ov70_0225D81C -ov70_0225D81C: ; 0x0225D81C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldrh r0, [r5, #8] - cmp r0, #0 - beq _0225D830 - cmp r0, #1 - beq _0225D850 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0225D830: - ldr r0, [r5, #4] - mov r1, #0 - bl ov66_022347B0 - add r1, r5, #0 - ldr r0, [r5, #4] - add r1, #0x10 - bl ov66_0223481C - mov r0, #0x1c - str r0, [r5, #0xc] - ldrh r0, [r5, #8] - add sp, #0xc - add r0, r0, #1 - strh r0, [r5, #8] - pop {r3, r4, r5, r6, pc} -_0225D850: - ldr r0, [r5, #0xc] - sub r0, r0, #1 - str r0, [r5, #0xc] - bpl _0225D85C - mov r0, #0x1c - str r0, [r5, #0xc] -_0225D85C: - add r3, r5, #0 - add r3, #0x10 - ldmia r3!, {r0, r1} - add r2, sp, #0 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [r5, #0xc] - sub r0, #0x10 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - cmp r0, #0 - ble _0225D8DE - mov r1, #6 - bl sub_020E1F6C - lsl r0, r1, #0x10 - asr r1, r0, #0x10 - mov r0, #0xb4 - mul r0, r1 - mov r1, #6 - bl sub_020E1F6C - add r4, r0, #0 - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - ldr r2, _0225D8F4 ; =0xFFFFE000 - asr r1, r0, #0x1f - asr r3, r2, #0xd - bl sub_020E1F1C - mov r3, #2 - mov r6, #0 - lsl r3, r3, #0xa - add r3, r0, r3 - adc r1, r6 - lsl r0, r1, #0x14 - lsr r1, r3, #0xc - ldr r2, [sp, #8] - orr r1, r0 - add r0, r2, r1 - str r0, [sp, #8] - lsl r0, r4, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D15C - mov r2, #0xa - asr r1, r0, #0x1f - lsl r2, r2, #0xc - add r3, r6, #0 - bl sub_020E1F1C - mov r3, #2 - add r4, r6, #0 - lsl r3, r3, #0xa - add r3, r0, r3 - adc r1, r4 - lsl r0, r1, #0x14 - lsr r1, r3, #0xc - ldr r2, [sp, #4] - orr r1, r0 - add r0, r2, r1 - str r0, [sp, #4] -_0225D8DE: - ldr r0, [r5, #4] - add r1, sp, #0 - bl ov66_022347F8 - ldr r0, [r5, #4] - mov r1, #1 - bl ov66_02234834 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0225D8F4: .word 0xFFFFE000 - thumb_func_end ov70_0225D81C - - thumb_func_start ov70_0225D8F8 -ov70_0225D8F8: ; 0x0225D8F8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #1 - bl ov66_022347B0 - ldr r0, [r4, #4] - add r1, sp, #0 - bl ov66_0223481C - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r4, #4] - add r1, sp, #0 - bl ov66_022347F8 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225D8F8 - - thumb_func_start ov70_0225D920 -ov70_0225D920: ; 0x0225D920 - strb r2, [r0, #1] - strb r2, [r0, #2] - mov r3, #0 - strb r3, [r0, #3] - strh r3, [r0, #4] - strh r3, [r0, #6] - strb r3, [r0] - add r0, r1, #0 - ldr r3, _0225D938 ; =ov66_02234610 - add r1, r2, #0 - bx r3 - nop -_0225D938: .word ov66_02234610 - thumb_func_end ov70_0225D920 - - thumb_func_start ov70_0225D93C -ov70_0225D93C: ; 0x0225D93C - mov r2, #1 - strb r2, [r0] - ldrb r2, [r0, #1] - strb r2, [r0, #2] - ldrb r2, [r0, #1] - sub r1, r1, r2 - strb r1, [r0, #3] - mov r1, #0 - strh r1, [r0, #4] - mov r1, #0x3c - strh r1, [r0, #6] - bx lr - thumb_func_end ov70_0225D93C - - thumb_func_start ov70_0225D954 -ov70_0225D954: ; 0x0225D954 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r0, [r5] - add r4, r1, #0 - cmp r0, #0 - bne _0225D964 - mov r0, #1 - pop {r3, r4, r5, pc} -_0225D964: - mov r0, #4 - ldrsh r1, [r5, r0] - add r1, r1, #1 - strh r1, [r5, #4] - ldrsh r1, [r5, r0] - mov r0, #6 - ldrsh r0, [r5, r0] - cmp r1, r0 - blt _0225D97A - mov r0, #0 - strb r0, [r5] -_0225D97A: - mov r0, #4 - ldrsh r1, [r5, r0] - mov r0, #3 - ldrsb r0, [r5, r0] - mul r0, r1 - mov r1, #6 - ldrsh r1, [r5, r1] - bl sub_020E1F6C - strb r0, [r5, #1] - mov r0, #2 - ldrb r1, [r5, #1] - ldrsb r0, [r5, r0] - add r0, r1, r0 - strb r0, [r5, #1] - ldrb r1, [r5, #1] - add r0, r4, #0 - bl ov66_02234610 - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225D954 - - thumb_func_start ov70_0225D9A4 -ov70_0225D9A4: ; 0x0225D9A4 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - bl sub_02006840 - mov r2, #0x3a - add r5, r0, #0 - mov r0, #3 - mov r1, #0x70 - lsl r2, r2, #0xc - bl sub_02017FC8 - mov r2, #0x3d - mov r0, #3 - mov r1, #0x71 - lsl r2, r2, #0xc - bl sub_02017FC8 - mov r1, #0xfe - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #0x70 - bl sub_0200681C - mov r2, #0xfe - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020D5124 - add r0, r5, #0 - add r0, #0xc - str r0, [r4, #0x38] - ldr r0, [r5, #0x1c] - str r0, [r4, #0x34] - bl ov66_0222E338 - strb r0, [r4, #2] - ldr r0, [r4, #0x34] - bl ov66_0222E338 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0225DA02 - bl sub_02022974 -_0225DA02: - mov r0, #1 - bl sub_02002AC8 - mov r0, #0 - bl sub_02002AE4 - mov r0, #0 - bl sub_02002B20 - ldr r0, [r5, #0] - bl sub_02025E38 - mov r1, #0xfd - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r5, #0] - add r0, #0x3c - mov r2, #0x70 - bl ov70_0225E4EC - mov r0, #0x70 - bl ov70_0225C858 - mov r1, #0xfa - lsl r1, r1, #2 - str r0, [r4, r1] - add r1, #0xc - ldr r0, [r4, r1] - bl sub_02025F30 - add r1, r0, #0 - mov r0, #0x71 - mov r2, #0xfa - str r0, [sp] - lsl r2, r2, #2 - ldr r2, [r4, r2] - mov r0, #0x18 - mov r3, #0x70 - bl ov70_0225C9B4 - mov r2, #0x3e - lsl r2, r2, #4 - str r0, [r4, r2] - mov r0, #0x71 - str r0, [sp] - add r2, #8 - ldr r0, [r5, #4] - ldr r1, [r5, #8] - ldr r2, [r4, r2] - mov r3, #0x70 - bl ov70_02261E10 - mov r1, #0xf9 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x70 - bl ov70_02260A70 - mov r1, #0xfb - lsl r1, r1, #2 - str r0, [r4, r1] - sub r1, #0xf4 - add r0, r4, r1 - add r1, r4, #0 - ldr r2, [r5, #0] - add r1, #0x3c - mov r3, #0x70 - bl ov70_0225E9C8 - mov r0, #0xc6 - lsl r0, r0, #2 - add r1, r4, #0 - ldr r2, [r5, #0] - add r0, r4, r0 - add r1, #0x3c - mov r3, #0x70 - bl ov70_0225EBA8 - mov r0, #0xce - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x3c - mov r2, #0x70 - bl ov70_0225EC20 - mov r0, #0x39 - lsl r0, r0, #4 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x3c - mov r2, #0x70 - bl ov70_0225F114 - mov r0, #0xf1 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x3c - mov r2, #0x70 - bl ov70_0225EFD4 - mov r0, #0xb7 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0x70 - bl ov70_0225F208 - mov r1, #0x3a - lsl r1, r1, #4 - add r0, r4, r1 - sub r1, #0xc4 - add r1, r4, r1 - mov r2, #0x70 - bl ov70_0225F098 - mov r0, #0x70 - str r0, [sp] - mov r3, #0xfd - mov r0, #0x61 - lsl r3, r3, #2 - lsl r0, r0, #2 - add r2, r4, #0 - ldr r1, [r4, #0x38] - ldr r3, [r4, r3] - add r0, r4, r0 - add r2, #0x3c - bl ov70_0225F350 - ldr r0, [r4, #0x34] - bl ov66_0222E3BC - add r5, r0, #0 - bl ov66_0222E8D8 - cmp r0, #1 - bne _0225DB2E - mov r0, #0x61 - mov r2, #0xb7 - lsl r0, r0, #2 - add r1, r4, #0 - lsl r2, r2, #2 - add r0, r4, r0 - add r1, #0x3c - add r2, r4, r2 - mov r3, #0x70 - str r5, [sp] - bl ov70_0225F8AC -_0225DB2E: - add r0, r4, #0 - mov r1, #0x70 - bl ov70_02262DA8 - mov r1, #0x3f - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - bl ov70_022630A4 - add r0, r4, #0 - bl ov70_022630EC - mov r0, #0x70 - str r0, [sp] - mov r0, #0x71 - mov r3, #0xfa - str r0, [sp, #4] - lsl r3, r3, #2 - add r2, r3, #4 - ldr r1, [r4, r3] - sub r3, #8 - ldr r0, [r4, #0x34] - ldr r2, [r4, r2] - ldr r3, [r4, r3] - bl ov70_02269190 - mov r1, #0xf5 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0x70 - add r1, r4, #0 - bl ov70_0226C60C - mov r1, #0xf7 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, _0225DB8C ; =ov70_0225E4C8 - add r1, r4, #0 - bl sub_02017798 - bl sub_020177A4 - mov r0, #1 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0225DB8C: .word ov70_0225E4C8 - thumb_func_end ov70_0225D9A4 - - thumb_func_start ov70_0225DB90 -ov70_0225DB90: ; 0x0225DB90 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r0, #0 - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r6, #0 - bl sub_02006840 - ldr r0, [r5, #0] - cmp r0, #8 - bhi _0225DC58 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225DBB6: ; jump table - .short _0225DBC8 - _0225DBB6 - 2 ; case 0 - .short _0225DBEA - _0225DBB6 - 2 ; case 1 - .short _0225DBFE - _0225DBB6 - 2 ; case 2 - .short _0225DC7A - _0225DBB6 - 2 ; case 3 - .short _0225DCF8 - _0225DBB6 - 2 ; case 4 - .short _0225DD08 - _0225DBB6 - 2 ; case 5 - .short _0225DD58 - _0225DBB6 - 2 ; case 6 - .short _0225DD76 - _0225DBB6 - 2 ; case 7 - .short _0225DDD0 - _0225DBB6 - 2 ; case 8 -_0225DBC8: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x70 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #1 - strb r0, [r4, #3] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225DDE2 -_0225DBEA: - bl sub_0200F2AC - cmp r0, #1 - bne _0225DC58 - mov r0, #0 - strb r0, [r4, #3] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225DDE2 -_0225DBFE: - ldrb r0, [r4, #4] - lsl r0, r0, #0x1c - lsr r0, r0, #0x1c - cmp r0, #1 - bne _0225DC26 - bl ov66_02231760 - cmp r0, #1 - beq _0225DC1A - ldr r0, [r4, #0x34] - bl ov66_0222DFF8 - cmp r0, #0 - beq _0225DC26 -_0225DC1A: - ldrb r1, [r4, #4] - mov r0, #0xf0 - bic r1, r0 - mov r0, #0x10 - orr r0, r1 - strb r0, [r4, #4] -_0225DC26: - ldrb r0, [r4, #7] - cmp r0, #0 - bne _0225DC42 - ldr r0, [r4, #0x34] - bl ov66_0222E138 - cmp r0, #1 - bne _0225DC42 - mov r0, #1 - strb r0, [r4, #6] - add r0, r4, #0 - mov r1, #8 - bl ov70_0225DF38 -_0225DC42: - ldrb r0, [r4] - cmp r0, #1 - beq _0225DC5A - ldrb r0, [r4, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - cmp r0, #1 - beq _0225DC5A - ldrb r0, [r4, #6] - cmp r0, #1 - beq _0225DC5A -_0225DC58: - b _0225DDE2 -_0225DC5A: - ldrb r0, [r4, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - beq _0225DC68 - mov r0, #3 - str r0, [r5, #0] - b _0225DDE2 -_0225DC68: - ldrb r0, [r4, #6] - cmp r0, #1 - bne _0225DC74 - mov r0, #5 - str r0, [r5, #0] - b _0225DDE2 -_0225DC74: - mov r0, #7 - str r0, [r5, #0] - b _0225DDE2 -_0225DC7A: - mov r0, #0xbe - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EB74 - mov r0, #0xce - lsl r0, r0, #2 - mov r1, #0 - add r0, r4, r0 - add r2, r1, #0 - bl ov70_0225EF14 - mov r0, #0xf1 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225F024 - mov r0, #0x3a - lsl r0, r0, #4 - add r0, r4, r0 - bl ov70_0225F100 - bl sub_020383E8 - cmp r0, #0 - beq _0225DCBE - mov r1, #0x39 - lsl r1, r1, #4 - add r0, r4, r1 - sub r1, #0xb4 - add r1, r4, r1 - bl ov70_0225F184 - b _0225DCF2 -_0225DCBE: - bl sub_0203881C - cmp r0, #0 - beq _0225DCDC - bl ov66_022326DC - mov r1, #0x39 - lsl r1, r1, #4 - add r2, r0, #0 - add r0, r4, r1 - sub r1, #0xb4 - add r1, r4, r1 - bl ov70_0225F1C0 - b _0225DCF2 -_0225DCDC: - ldr r0, [r4, #0x34] - bl ov66_0222DFF8 - mov r1, #0x39 - lsl r1, r1, #4 - add r2, r0, #0 - add r0, r4, r1 - sub r1, #0xb4 - add r1, r4, r1 - bl ov70_0225F1F0 -_0225DCF2: - mov r0, #4 - str r0, [r5, #0] - b _0225DDE2 -_0225DCF8: - ldr r0, _0225DDF4 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0225DDE2 - mov r0, #7 - str r0, [r5, #0] - b _0225DDE2 -_0225DD08: - mov r0, #0xbe - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EB74 - mov r0, #0xce - lsl r0, r0, #2 - mov r1, #0 - add r0, r4, r0 - add r2, r1, #0 - bl ov70_0225EF14 - mov r0, #0xf1 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225F024 - mov r0, #0x3a - lsl r0, r0, #4 - add r0, r4, r0 - bl ov70_0225F100 - mov r0, #0xb7 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - mov r2, #0x46 - bl ov70_0225F288 - add r1, r0, #0 - mov r0, #0xbe - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EA44 - mov r0, #6 - str r0, [r5, #0] - mov r0, #0x3c - str r0, [r4, #8] - b _0225DDE2 -_0225DD58: - mov r0, #0xbe - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EB5C - cmp r0, #0 - beq _0225DDE2 - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0 - bgt _0225DDE2 - mov r0, #7 - str r0, [r5, #0] - b _0225DDE2 -_0225DD76: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225F798 - cmp r0, #5 - bne _0225DDA8 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x70 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #1 - strb r0, [r4, #3] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225DDE2 -_0225DDA8: - cmp r0, #0 - bne _0225DDE2 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x70 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #1 - strb r0, [r4, #3] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0225DDE2 -_0225DDD0: - bl sub_0200F2AC - cmp r0, #1 - bne _0225DDE2 - mov r0, #0 - strb r0, [r4, #3] - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0225DDE2: - add r0, r4, #0 - bl ov70_0225E88C - add r0, r4, #0 - bl ov70_0225E92C - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0225DDF4: .word 0x021BF67C - thumb_func_end ov70_0225DB90 - - thumb_func_start ov70_0225DDF8 -ov70_0225DDF8: ; 0x0225DDF8 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006840 - ldrb r1, [r4, #1] - str r1, [r0, #0x18] - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_0226C6F8 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02269204 - mov r0, #0x3f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_02262DF4 - mov r0, #0x61 - mov r1, #0xc6 - lsl r0, r0, #2 - lsl r1, r1, #2 - add r2, r4, #0 - add r0, r4, r0 - add r1, r4, r1 - add r2, #0x3c - bl ov70_0225F3E4 - mov r0, #0xb7 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225F25C - mov r0, #0xbe - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EA14 - mov r0, #0xc6 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EBBC - mov r0, #0xce - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x3c - bl ov70_0225ED4C - mov r0, #0x39 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov70_0225F144 - mov r0, #0x3a - lsl r0, r0, #4 - add r0, r4, r0 - bl ov70_0225F100 - mov r0, #0xf1 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225EFD8 - mov r0, #0xfb - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02260AD4 - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_022621AC - mov r0, #0x3e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_0225CA20 - mov r0, #0xfa - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_0225C894 - add r0, r4, #0 - add r0, #0x3c - bl ov70_0225E6D0 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #0x70 - bl sub_0201807C - mov r0, #0x71 - bl sub_0201807C - mov r0, #0 - bl sub_020057BC - mov r0, #0 - bl sub_0200592C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225DDF8 - - thumb_func_start ov70_0225DEE8 -ov70_0225DEE8: ; 0x0225DEE8 - ldr r0, [r0, #0x34] - bx lr - thumb_func_end ov70_0225DEE8 - - thumb_func_start ov70_0225DEEC -ov70_0225DEEC: ; 0x0225DEEC - ldr r0, [r0, #0x38] - bx lr - thumb_func_end ov70_0225DEEC - - thumb_func_start ov70_0225DEF0 -ov70_0225DEF0: ; 0x0225DEF0 - mov r1, #0x3e - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov70_0225DEF0 - - thumb_func_start ov70_0225DEF8 -ov70_0225DEF8: ; 0x0225DEF8 - mov r1, #0xf9 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov70_0225DEF8 - - thumb_func_start ov70_0225DF00 -ov70_0225DF00: ; 0x0225DF00 - mov r1, #0xfa - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov70_0225DF00 - - thumb_func_start ov70_0225DF08 -ov70_0225DF08: ; 0x0225DF08 - mov r1, #0xfb - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov70_0225DF08 - - thumb_func_start ov70_0225DF10 -ov70_0225DF10: ; 0x0225DF10 - mov r1, #0x3f - lsl r1, r1, #4 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov70_0225DF10 - - thumb_func_start ov70_0225DF18 -ov70_0225DF18: ; 0x0225DF18 - ldrb r3, [r0, #4] - mov r2, #0xf - lsl r1, r1, #0x18 - bic r3, r2 - lsr r2, r1, #0x18 - mov r1, #0xf - and r1, r2 - orr r1, r3 - strb r1, [r0, #4] - bx lr - thumb_func_end ov70_0225DF18 - - thumb_func_start ov70_0225DF2C -ov70_0225DF2C: ; 0x0225DF2C - ldrb r0, [r0, #2] - bx lr - thumb_func_end ov70_0225DF2C - - thumb_func_start ov70_0225DF30 -ov70_0225DF30: ; 0x0225DF30 - ldrb r0, [r0, #3] - bx lr - thumb_func_end ov70_0225DF30 - - thumb_func_start ov70_0225DF34 -ov70_0225DF34: ; 0x0225DF34 - strb r1, [r0] - bx lr - thumb_func_end ov70_0225DF34 - - thumb_func_start ov70_0225DF38 -ov70_0225DF38: ; 0x0225DF38 - strb r1, [r0, #1] - bx lr - thumb_func_end ov70_0225DF38 - - thumb_func_start ov70_0225DF3C -ov70_0225DF3C: ; 0x0225DF3C - strb r1, [r0, #5] - bx lr - thumb_func_end ov70_0225DF3C - - thumb_func_start ov70_0225DF40 -ov70_0225DF40: ; 0x0225DF40 - ldrb r0, [r0, #5] - bx lr - thumb_func_end ov70_0225DF40 - - thumb_func_start ov70_0225DF44 -ov70_0225DF44: ; 0x0225DF44 - mov r1, #1 - strb r1, [r0, #7] - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225DF44 - - thumb_func_start ov70_0225DF4C -ov70_0225DF4C: ; 0x0225DF4C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0x14 - blo _0225DF5C - bl sub_02022974 -_0225DF5C: - add r0, r5, r4 - strb r6, [r0, #0xc] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0225DF4C - - thumb_func_start ov70_0225DF64 -ov70_0225DF64: ; 0x0225DF64 - add r0, r0, r1 - ldrb r0, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225DF64 - - thumb_func_start ov70_0225DF6C -ov70_0225DF6C: ; 0x0225DF6C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0x14 - blo _0225DF7C - bl sub_02022974 -_0225DF7C: - add r0, r5, r4 - add r0, #0x20 - strb r6, [r0] - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225DF6C - - thumb_func_start ov70_0225DF84 -ov70_0225DF84: ; 0x0225DF84 - add r0, r0, r1 - add r0, #0x20 - ldrb r0, [r0] - bx lr - thumb_func_end ov70_0225DF84 - - thumb_func_start ov70_0225DF8C -ov70_0225DF8C: ; 0x0225DF8C - mov r2, #0xbe - lsl r2, r2, #2 - ldr r3, _0225DF98 ; =ov70_0225EA44 - add r0, r0, r2 - bx r3 - nop -_0225DF98: .word ov70_0225EA44 - thumb_func_end ov70_0225DF8C - - thumb_func_start ov70_0225DF9C -ov70_0225DF9C: ; 0x0225DF9C - mov r2, #0xbe - lsl r2, r2, #2 - ldr r3, _0225DFA8 ; =ov70_0225EAA4 - add r0, r0, r2 - bx r3 - nop -_0225DFA8: .word ov70_0225EAA4 - thumb_func_end ov70_0225DF9C - - thumb_func_start ov70_0225DFAC -ov70_0225DFAC: ; 0x0225DFAC - mov r1, #0xbe - lsl r1, r1, #2 - ldr r3, _0225DFB8 ; =ov70_0225EB5C - add r0, r0, r1 - bx r3 - nop -_0225DFB8: .word ov70_0225EB5C - thumb_func_end ov70_0225DFAC - - thumb_func_start ov70_0225DFBC -ov70_0225DFBC: ; 0x0225DFBC - mov r1, #0xbe - lsl r1, r1, #2 - ldr r3, _0225DFC8 ; =ov70_0225EB08 - add r0, r0, r1 - bx r3 - nop -_0225DFC8: .word ov70_0225EB08 - thumb_func_end ov70_0225DFBC - - thumb_func_start ov70_0225DFCC -ov70_0225DFCC: ; 0x0225DFCC - mov r1, #0xbe - lsl r1, r1, #2 - ldr r3, _0225DFD8 ; =ov70_0225EB24 - add r0, r0, r1 - bx r3 - nop -_0225DFD8: .word ov70_0225EB24 - thumb_func_end ov70_0225DFCC - - thumb_func_start ov70_0225DFDC -ov70_0225DFDC: ; 0x0225DFDC - mov r1, #0xbe - lsl r1, r1, #2 - ldr r3, _0225DFE8 ; =ov70_0225EB4C - add r0, r0, r1 - bx r3 - nop -_0225DFE8: .word ov70_0225EB4C - thumb_func_end ov70_0225DFDC - - thumb_func_start ov70_0225DFEC -ov70_0225DFEC: ; 0x0225DFEC - mov r1, #0xbe - lsl r1, r1, #2 - ldr r3, _0225DFF8 ; =ov70_0225EB74 - add r0, r0, r1 - bx r3 - nop -_0225DFF8: .word ov70_0225EB74 - thumb_func_end ov70_0225DFEC - - thumb_func_start ov70_0225DFFC -ov70_0225DFFC: ; 0x0225DFFC - mov r2, #0xc6 - lsl r2, r2, #2 - ldr r3, _0225E008 ; =ov70_0225EBC4 - add r0, r0, r2 - bx r3 - nop -_0225E008: .word ov70_0225EBC4 - thumb_func_end ov70_0225DFFC - - thumb_func_start ov70_0225E00C -ov70_0225E00C: ; 0x0225E00C - push {r3, lr} - mov r2, #0xce - lsl r2, r2, #2 - add r0, r0, r2 - mov r2, #0x71 - mov r3, #0 - bl ov70_0225EDA8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E00C - - thumb_func_start ov70_0225E020 -ov70_0225E020: ; 0x0225E020 - push {r3, lr} - add r3, r2, #0 - mov r2, #0xce - lsl r2, r2, #2 - add r0, r0, r2 - mov r2, #0x71 - bl ov70_0225EDA8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E020 - - thumb_func_start ov70_0225E034 -ov70_0225E034: ; 0x0225E034 - mov r1, #0xce - lsl r1, r1, #2 - ldr r3, _0225E040 ; =ov70_0225EDE0 - add r0, r0, r1 - bx r3 - nop -_0225E040: .word ov70_0225EDE0 - thumb_func_end ov70_0225E034 - - thumb_func_start ov70_0225E044 -ov70_0225E044: ; 0x0225E044 - mov r3, #0xce - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _0225E050 ; =ov70_0225EDF8 - bx r3 - nop -_0225E050: .word ov70_0225EDF8 - thumb_func_end ov70_0225E044 - - thumb_func_start ov70_0225E054 -ov70_0225E054: ; 0x0225E054 - mov r1, #0xce - lsl r1, r1, #2 - ldr r3, _0225E060 ; =ov70_0225EE04 - add r0, r0, r1 - bx r3 - nop -_0225E060: .word ov70_0225EE04 - thumb_func_end ov70_0225E054 - - thumb_func_start ov70_0225E064 -ov70_0225E064: ; 0x0225E064 - mov r2, #0xce - lsl r2, r2, #2 - ldr r3, _0225E070 ; =ov70_0225EE08 - add r0, r0, r2 - bx r3 - nop -_0225E070: .word ov70_0225EE08 - thumb_func_end ov70_0225E064 - - thumb_func_start ov70_0225E074 -ov70_0225E074: ; 0x0225E074 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - str r3, [sp] - mov r0, #0x70 - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #0xf - str r0, [sp, #0x10] - mov r0, #0xce - lsl r0, r0, #2 - add r4, r2, #0 - add r0, r5, r0 - add r5, #0x3c - add r2, r5, #0 - add r3, r4, #0 - bl ov70_0225EE30 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E074 - - thumb_func_start ov70_0225E0A4 -ov70_0225E0A4: ; 0x0225E0A4 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - str r3, [sp] - mov r0, #0x70 - str r0, [sp, #4] - add r4, r2, #0 - add r0, sp, #0x10 - ldrb r2, [r0, #0x10] - add r3, r4, #0 - str r2, [sp, #8] - ldrb r2, [r0, #0x14] - str r2, [sp, #0xc] - ldrb r0, [r0, #0x18] - str r0, [sp, #0x10] - mov r0, #0xce - lsl r0, r0, #2 - add r0, r5, r0 - add r5, #0x3c - add r2, r5, #0 - bl ov70_0225EE30 - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov70_0225E0A4 - - thumb_func_start ov70_0225E0D4 -ov70_0225E0D4: ; 0x0225E0D4 - mov r1, #0xce - lsl r1, r1, #2 - ldr r3, _0225E0E0 ; =ov70_0225EED8 - add r0, r0, r1 - bx r3 - nop -_0225E0E0: .word ov70_0225EED8 - thumb_func_end ov70_0225E0D4 - - thumb_func_start ov70_0225E0E4 -ov70_0225E0E4: ; 0x0225E0E4 - mov r3, #0xce - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _0225E0F0 ; =ov70_0225EF14 - bx r3 - nop -_0225E0F0: .word ov70_0225EF14 - thumb_func_end ov70_0225E0E4 - - thumb_func_start ov70_0225E0F4 -ov70_0225E0F4: ; 0x0225E0F4 - mov r2, #0xce - lsl r2, r2, #2 - ldr r3, _0225E100 ; =ov70_0225EF6C - add r0, r0, r2 - bx r3 - nop -_0225E100: .word ov70_0225EF6C - thumb_func_end ov70_0225E0F4 - - thumb_func_start ov70_0225E104 -ov70_0225E104: ; 0x0225E104 - push {r4, r5, lr} - sub sp, #0xc - str r2, [sp] - add r5, r0, #0 - str r3, [sp, #4] - add r0, sp, #8 - ldrb r0, [r0, #0x10] - add r4, r1, #0 - mov r2, #0x70 - str r0, [sp, #8] - mov r0, #0xf1 - lsl r0, r0, #2 - add r0, r5, r0 - add r5, #0x3c - add r1, r5, #0 - add r3, r4, #0 - bl ov70_0225EFE0 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov70_0225E104 - - thumb_func_start ov70_0225E12C -ov70_0225E12C: ; 0x0225E12C - mov r1, #0xf1 - lsl r1, r1, #2 - ldr r3, _0225E138 ; =ov70_0225F024 - add r0, r0, r1 - bx r3 - nop -_0225E138: .word ov70_0225F024 - thumb_func_end ov70_0225E12C - - thumb_func_start ov70_0225E13C -ov70_0225E13C: ; 0x0225E13C - push {r4, lr} - mov r4, #0xf1 - lsl r4, r4, #2 - add r0, r0, r4 - bl ov70_0225F048 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E13C - - thumb_func_start ov70_0225E14C -ov70_0225E14C: ; 0x0225E14C - push {r3, r4, lr} - sub sp, #4 - add r4, sp, #0 - ldrh r4, [r4, #0x10] - str r4, [sp] - mov r4, #0xf1 - lsl r4, r4, #2 - add r0, r0, r4 - bl ov70_0225F078 - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov70_0225E14C - - thumb_func_start ov70_0225E164 -ov70_0225E164: ; 0x0225E164 - push {lr} - sub sp, #0x14 - mov r3, #0 - add r2, r0, #0 - str r3, [sp] - mov r0, #0x70 - str r0, [sp, #4] - mov r0, #0x19 - str r0, [sp, #8] - mov r0, #0xd - mov r1, #0xce - str r0, [sp, #0xc] - mov r0, #6 - lsl r1, r1, #2 - str r0, [sp, #0x10] - add r0, r2, r1 - add r1, #0x6c - add r1, r2, r1 - add r2, #0x3c - bl ov70_0225EE30 - add sp, #0x14 - pop {pc} - ; .align 2, 0 - thumb_func_end ov70_0225E164 - - thumb_func_start ov70_0225E194 -ov70_0225E194: ; 0x0225E194 - push {lr} - sub sp, #0x14 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x70 - str r0, [sp, #4] - mov r0, #0x19 - str r0, [sp, #8] - mov r0, #0xd - mov r1, #0xce - str r0, [sp, #0xc] - mov r0, #6 - lsl r1, r1, #2 - str r0, [sp, #0x10] - add r0, r2, r1 - add r1, #0x6c - add r1, r2, r1 - add r2, #0x3c - mov r3, #0 - bl ov70_0225EE30 - add sp, #0x14 - pop {pc} - thumb_func_end ov70_0225E194 - - thumb_func_start ov70_0225E1C4 -ov70_0225E1C4: ; 0x0225E1C4 - push {r3, lr} - mov r1, #0xce - lsl r1, r1, #2 - add r0, r0, r1 - bl ov70_0225EED8 - cmp r0, #0 - beq _0225E1EA - cmp r0, #1 - beq _0225E1E6 - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - bne _0225E1EE - ldr r0, _0225E1F4 ; =0x000005DC - bl sub_02005748 -_0225E1E6: - mov r0, #1 - pop {r3, pc} -_0225E1EA: - mov r0, #0 - pop {r3, pc} -_0225E1EE: - mov r0, #2 - pop {r3, pc} - nop -_0225E1F4: .word 0x000005DC - thumb_func_end ov70_0225E1C4 - - thumb_func_start ov70_0225E1F8 -ov70_0225E1F8: ; 0x0225E1F8 - mov r1, #0xce - lsl r1, r1, #2 - add r0, r0, r1 - mov r1, #0 - ldr r3, _0225E208 ; =ov70_0225EF14 - add r2, r1, #0 - bx r3 - nop -_0225E208: .word ov70_0225EF14 - thumb_func_end ov70_0225E1F8 - - thumb_func_start ov70_0225E20C -ov70_0225E20C: ; 0x0225E20C - mov r3, #0xb7 - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _0225E218 ; =ov70_0225F288 - bx r3 - nop -_0225E218: .word ov70_0225F288 - thumb_func_end ov70_0225E20C - - thumb_func_start ov70_0225E21C -ov70_0225E21C: ; 0x0225E21C - push {r3, r4, lr} - sub sp, #4 - ldr r4, [sp, #0x10] - str r4, [sp] - mov r4, #0xb7 - lsl r4, r4, #2 - add r0, r0, r4 - bl ov70_0225F2A8 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E21C - - thumb_func_start ov70_0225E234 -ov70_0225E234: ; 0x0225E234 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x70 - add r4, r1, #0 - add r7, r2, #0 - bl sub_02025E6C - add r6, r0, #0 - ldr r0, [r5, #0x34] - bl ov66_0222E338 - cmp r4, r0 - ldr r0, [r5, #0x34] - bne _0225E256 - bl ov66_0222E3BC - b _0225E25C -_0225E256: - add r1, r4, #0 - bl ov66_0222E374 -_0225E25C: - add r1, r6, #0 - mov r2, #0x70 - bl ov66_0222E640 - mov r0, #0xb7 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r6, #0 - add r2, r7, #0 - bl ov70_0225F2C8 - add r0, r6, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E234 - - thumb_func_start ov70_0225E27C -ov70_0225E27C: ; 0x0225E27C - mov r3, #0xb7 - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _0225E288 ; =ov70_0225F2D8 - bx r3 - nop -_0225E288: .word ov70_0225F2D8 - thumb_func_end ov70_0225E27C - - thumb_func_start ov70_0225E28C -ov70_0225E28C: ; 0x0225E28C - mov r3, #0xb7 - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _0225E298 ; =ov70_0225F2E8 - bx r3 - nop -_0225E298: .word ov70_0225F2E8 - thumb_func_end ov70_0225E28C - - thumb_func_start ov70_0225E29C -ov70_0225E29C: ; 0x0225E29C - mov r3, #0xb7 - lsl r3, r3, #2 - add r0, r0, r3 - ldr r3, _0225E2A8 ; =ov70_0225F2F8 - bx r3 - nop -_0225E2A8: .word ov70_0225F2F8 - thumb_func_end ov70_0225E29C - - thumb_func_start ov70_0225E2AC -ov70_0225E2AC: ; 0x0225E2AC - mov r3, #0xb7 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _0225E2B8 ; =sub_0200C158 - bx r3 - nop -_0225E2B8: .word sub_0200C158 - thumb_func_end ov70_0225E2AC - - thumb_func_start ov70_0225E2BC -ov70_0225E2BC: ; 0x0225E2BC - mov r3, #0xb7 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _0225E2C8 ; =sub_0200C190 - bx r3 - nop -_0225E2C8: .word sub_0200C190 - thumb_func_end ov70_0225E2BC - - thumb_func_start ov70_0225E2CC -ov70_0225E2CC: ; 0x0225E2CC - mov r3, #0xb7 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _0225E2D8 ; =sub_0200C1C8 - bx r3 - nop -_0225E2D8: .word sub_0200C1C8 - thumb_func_end ov70_0225E2CC - - thumb_func_start ov70_0225E2DC -ov70_0225E2DC: ; 0x0225E2DC - mov r3, #0xb7 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _0225E2E8 ; =sub_0200C200 - bx r3 - nop -_0225E2E8: .word sub_0200C200 - thumb_func_end ov70_0225E2DC - - thumb_func_start ov70_0225E2EC -ov70_0225E2EC: ; 0x0225E2EC - mov r3, #0xb7 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _0225E2F8 ; =sub_0200C238 - bx r3 - nop -_0225E2F8: .word sub_0200C238 - thumb_func_end ov70_0225E2EC - - thumb_func_start ov70_0225E2FC -ov70_0225E2FC: ; 0x0225E2FC - mov r3, #0xb7 - lsl r3, r3, #2 - ldr r0, [r0, r3] - ldr r3, _0225E308 ; =sub_0200C270 - bx r3 - nop -_0225E308: .word sub_0200C270 - thumb_func_end ov70_0225E2FC - - thumb_func_start ov70_0225E30C -ov70_0225E30C: ; 0x0225E30C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r2, #0 - add r4, r1, #0 - bl ov66_022316E8 - add r2, r0, #0 - mov r0, #0xb7 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_0200B7EC - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225E30C - - thumb_func_start ov70_0225E328 -ov70_0225E328: ; 0x0225E328 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - add r4, r1, #0 - add r6, r2, #0 - bl ov70_0225F7F8 - cmp r4, r0 - bne _0225E368 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov70_0225F7FC - cmp r0, #1 - bne _0225E368 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov70_0225F834 - cmp r0, #0 - bne _0225E368 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - bl ov70_0225F828 - cmp r6, r0 - beq _0225E376 -_0225E368: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r4, #0 - add r2, r6, #0 - bl ov70_0225F79C -_0225E376: - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225E328 - - thumb_func_start ov70_0225E378 -ov70_0225E378: ; 0x0225E378 - push {r3, lr} - add r3, r0, #0 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r3, r0 - add r3, #0x3c - add r2, r1, #0 - add r1, r3, #0 - mov r3, #0x70 - bl ov70_0225F7A8 - pop {r3, pc} - thumb_func_end ov70_0225E378 - - thumb_func_start ov70_0225E390 -ov70_0225E390: ; 0x0225E390 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225F7FC - cmp r0, #0 - beq _0225E3CC - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_0225F7F8 - add r1, r0, #0 - ldr r0, [r4, #0x34] - bl ov66_0222E374 - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [sp] - add r0, r4, r1 - add r1, #8 - add r1, r4, r1 - add r4, #0x3c - add r2, r4, #0 - mov r3, #0x70 - bl ov70_0225FDA0 -_0225E3CC: - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov70_0225E390 - - thumb_func_start ov70_0225E3D0 -ov70_0225E3D0: ; 0x0225E3D0 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r3, _0225E3DC ; =ov70_0225F7E0 - add r0, r0, r1 - bx r3 - nop -_0225E3DC: .word ov70_0225F7E0 - thumb_func_end ov70_0225E3D0 - - thumb_func_start ov70_0225E3E0 -ov70_0225E3E0: ; 0x0225E3E0 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r3, _0225E3EC ; =ov70_0225F7F8 - add r0, r0, r1 - bx r3 - nop -_0225E3EC: .word ov70_0225F7F8 - thumb_func_end ov70_0225E3E0 - - thumb_func_start ov70_0225E3F0 -ov70_0225E3F0: ; 0x0225E3F0 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r3, _0225E3FC ; =ov70_0225F7FC - add r0, r0, r1 - bx r3 - nop -_0225E3FC: .word ov70_0225F7FC - thumb_func_end ov70_0225E3F0 - - thumb_func_start ov70_0225E400 -ov70_0225E400: ; 0x0225E400 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r3, _0225E40C ; =ov70_0225F814 - add r0, r0, r1 - bx r3 - nop -_0225E40C: .word ov70_0225F814 - thumb_func_end ov70_0225E400 - - thumb_func_start ov70_0225E410 -ov70_0225E410: ; 0x0225E410 - mov r1, #0x61 - lsl r1, r1, #2 - ldr r3, _0225E41C ; =ov70_0225F7EC - add r0, r0, r1 - bx r3 - nop -_0225E41C: .word ov70_0225F7EC - thumb_func_end ov70_0225E410 - - thumb_func_start ov70_0225E420 -ov70_0225E420: ; 0x0225E420 - mov r2, #0xf7 - lsl r2, r2, #2 - ldr r0, [r0, r2] - ldr r3, _0225E42C ; =ov70_0226C810 - mov r2, #1 - bx r3 - ; .align 2, 0 -_0225E42C: .word ov70_0226C810 - thumb_func_end ov70_0225E420 - - thumb_func_start ov70_0225E430 -ov70_0225E430: ; 0x0225E430 - ldr r1, _0225E438 ; =0x0000018A - mov r2, #1 - strh r2, [r0, r1] - bx lr - ; .align 2, 0 -_0225E438: .word 0x0000018A - thumb_func_end ov70_0225E430 - - thumb_func_start ov70_0225E43C -ov70_0225E43C: ; 0x0225E43C - mov r2, #0x61 - lsl r2, r2, #2 - ldr r3, _0225E448 ; =ov70_0225F934 - add r0, r0, r2 - bx r3 - nop -_0225E448: .word ov70_0225F934 - thumb_func_end ov70_0225E43C - - thumb_func_start ov70_0225E44C -ov70_0225E44C: ; 0x0225E44C - mov r1, #0xa6 - lsl r1, r1, #2 - ldr r3, _0225E458 ; =ov70_02260A68 - add r0, r0, r1 - bx r3 - nop -_0225E458: .word ov70_02260A68 - thumb_func_end ov70_0225E44C - - thumb_func_start ov70_0225E45C -ov70_0225E45C: ; 0x0225E45C - mov r1, #0xf6 - lsl r1, r1, #2 - ldr r3, [r0, r1] - mov r2, #0 - str r2, [r0, r1] - add r0, r3, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225E45C - - thumb_func_start ov70_0225E46C -ov70_0225E46C: ; 0x0225E46C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0x14 - blo _0225E47A - bl sub_02022974 -_0225E47A: - ldr r0, [r5, #0x34] - add r1, r4, #0 - bl ov66_0222E374 - bl ov66_0222E8C4 - add r6, r0, #0 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - add r2, r6, #0 - bl ov70_02269268 - ldr r0, [r5, #0x34] - bl ov66_0222E338 - cmp r4, r0 - bne _0225E4A8 - ldr r0, [r5, #0x34] - add r1, r6, #0 - bl ov66_0222EB6C -_0225E4A8: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E46C - - thumb_func_start ov70_0225E4AC -ov70_0225E4AC: ; 0x0225E4AC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0x14 - blo _0225E4BA - bl sub_02022974 -_0225E4BA: - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl ov70_02269298 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225E4AC - - thumb_func_start ov70_0225E4C8 -ov70_0225E4C8: ; 0x0225E4C8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_022622A4 - mov r0, #0x3e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_0225CAE0 - add r4, #0x3c - add r0, r4, #0 - bl ov70_0225E740 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E4C8 - - thumb_func_start ov70_0225E4EC -ov70_0225E4EC: ; 0x0225E4EC - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - str r1, [sp, #0x14] - ldr r0, _0225E698 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, _0225E69C ; =0x04001050 - add r6, r2, #0 - strh r1, [r0] - mov r0, #0x20 - add r1, r6, #0 - bl sub_0201DBEC - ldr r0, _0225E6A0 ; =0x0226D664 - bl sub_0201FE94 - ldr r0, _0225E6A4 ; =0x021BF6DC - mov r1, #0 - strb r1, [r0, #5] - bl sub_0201FFE8 - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - ldr r0, _0225E6A8 ; =0x0226D5BC - bl sub_02018368 - add r0, r6, #0 - bl sub_02018340 - str r0, [r5, #0] - mov r0, #0 - ldr r7, _0225E6AC ; =0x0226D6B4 - ldr r4, _0225E6B0 ; =0x0226D5CC - str r0, [sp, #0x18] -_0225E536: - ldr r1, [r4, #0] - ldr r0, [r5, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - add r2, r7, #0 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0] - mov r1, #0x20 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - mov r2, #0 - add r3, r6, #0 - bl sub_02019690 - ldr r1, [r4, #0] - ldr r0, [r5, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_02019EBC - ldr r0, [sp, #0x18] - add r7, #0x1c - add r0, r0, #1 - add r4, r4, #4 - str r0, [sp, #0x18] - cmp r0, #4 - blt _0225E536 - ldr r0, [sp, #0x14] - bl sub_02025E44 - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - mov r0, #0 - mov r1, #0xa0 - add r2, r6, #0 - bl sub_02002E7C - mov r0, #0 - mov r1, #0x80 - add r2, r6, #0 - bl sub_02002E98 - mov r0, #0 - str r0, [sp] - str r6, [sp, #4] - ldr r0, [r5, #0] - mov r1, #1 - mov r2, #0x55 - mov r3, #3 - bl sub_0200DAA4 - mov r1, #1 - str r4, [sp] - str r6, [sp, #4] - ldr r0, [r5, #0] - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200DD0C - mov r0, #3 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r6, [sp, #8] - ldr r0, [r5, #0] - mov r1, #1 - mov r2, #0x1f - mov r3, #2 - bl sub_0200E2A4 - mov r0, #0x20 - str r0, [sp] - mov r0, #0xba - mov r1, #0x5a - mov r2, #0 - mov r3, #0x40 - str r6, [sp, #4] - bl sub_02006E84 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7e - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x1f - str r3, [sp, #0xc] - add r2, r0, #0 - str r6, [sp, #0x10] - bl sub_0200A784 - ldr r0, _0225E6B4 ; =0x0226D5DC - ldr r2, _0225E6B8 ; =0x00100010 - mov r1, #0x10 - bl sub_0201E88C - mov r0, #0x18 - add r1, r6, #0 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - mov r0, #1 - mov r1, #0x10 - bl sub_0200966C - mov r0, #1 - bl sub_02009704 - bl sub_02039734 - add r1, r5, #0 - mov r0, #0x18 - add r1, #8 - add r2, r6, #0 - bl sub_020095C4 - str r0, [r5, #4] - add r0, r5, #0 - mov r2, #1 - add r0, #8 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - mov r7, #0 - add r4, r5, #0 -_0225E642: - mov r0, #0x18 - add r1, r7, #0 - add r2, r6, #0 - bl sub_02009714 - mov r1, #0x13 - lsl r1, r1, #4 - str r0, [r4, r1] - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #4 - blt _0225E642 - mov r0, #0x18 - add r1, r6, #0 - bl sub_0201DCC8 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - str r0, [sp] - ldr r0, _0225E6BC ; =ov70_0225E754 - mov r1, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #2 - add r3, r1, #0 - bl sub_02024220 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r5, r1] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0225E698: .word 0x04000050 -_0225E69C: .word 0x04001050 -_0225E6A0: .word 0x0226D664 -_0225E6A4: .word 0x021BF6DC -_0225E6A8: .word 0x0226D5BC -_0225E6AC: .word 0x0226D6B4 -_0225E6B0: .word 0x0226D5CC -_0225E6B4: .word 0x0226D5DC -_0225E6B8: .word 0x00100010 -_0225E6BC: .word ov70_0225E754 - thumb_func_end ov70_0225E4EC - - thumb_func_start ov70_0225E6C0 -ov70_0225E6C0: ; 0x0225E6C0 - push {r3, lr} - ldr r0, [r0, #4] - bl sub_020219F8 - bl sub_0201DCE8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E6C0 - - thumb_func_start ov70_0225E6D0 -ov70_0225E6D0: ; 0x0225E6D0 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl sub_0201DC3C - ldr r5, _0225E73C ; =0x0226D5CC - mov r4, #0 -_0225E6DC: - ldr r1, [r5, #0] - ldr r0, [r6, #0] - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0225E6DC - ldr r0, [r6, #0] - bl sub_020181C4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r6, r0] - bl sub_0201DCF0 - mov r0, #5 - lsl r0, r0, #6 - mov r4, #0 - add r7, r0, #0 - str r4, [r6, r0] - add r5, r6, #0 - sub r7, #0x10 -_0225E70E: - ldr r0, [r5, r7] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0225E70E - ldr r0, [r6, #4] - bl sub_02021964 - bl sub_0201E958 - bl sub_0201F8B4 - bl sub_0200A878 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_020242C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_0225E73C: .word 0x0226D5CC - thumb_func_end ov70_0225E6D0 - - thumb_func_start ov70_0225E740 -ov70_0225E740: ; 0x0225E740 - push {r3, lr} - ldr r0, [r0, #0] - bl sub_0201C2B8 - bl sub_0200A858 - bl sub_0201DCAC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E740 - - thumb_func_start ov70_0225E754 -ov70_0225E754: ; 0x0225E754 - push {r3, r4, lr} - sub sp, #0xc - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _0225E864 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r2, [r0] - ldr r1, _0225E868 ; =0xFFFFCFFD - and r2, r1 - strh r2, [r0] - ldrh r3, [r0] - add r2, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0225E86C ; =0x0000CFFB - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #8 - orr r2, r3 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldr r0, _0225E870 ; =0x0226D5EC - bl sub_020BFD2C - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r1, #0 - ldr r0, _0225E874 ; =0x00006B5A - ldr r2, _0225E878 ; =0x00007FFF - mov r3, #0x3f - str r1, [sp] - bl sub_020BFD58 - ldr r1, _0225E87C ; =0xBFFF0000 - ldr r0, _0225E880 ; =0x04000580 - ldr r2, _0225E884 ; =0xFFFFF224 - str r1, [r0, #0] - ldr r1, _0225E888 ; =0xFFFFF805 - mov r0, #0 - mov r3, #0x6e - bl sub_020AF51C - mov r1, #0 - add r0, sp, #4 - strh r1, [r0] - strh r1, [r0, #2] - mov r1, #1 - lsl r1, r1, #0xc - strh r1, [r0, #4] - add r0, sp, #4 - add r1, r0, #0 - bl sub_020BD4FC - add r4, sp, #4 - mov r1, #0 - mov r2, #2 - mov r3, #4 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - mov r0, #1 - bl sub_020AF51C - mov r1, #0 - add r0, r4, #0 - strh r1, [r0] - strh r1, [r0, #2] - mov r1, #1 - lsl r1, r1, #0xc - strh r1, [r0, #4] - add r0, sp, #4 - add r1, r0, #0 - bl sub_020BD4FC - mov r0, #2 - mov r1, #0 - mov r3, #4 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r0] - ldrsh r3, [r4, r3] - bl sub_020AF51C - ldr r1, _0225E878 ; =0x00007FFF - mov r0, #2 - bl sub_020AF558 - mov r1, #0 - add r0, r4, #0 - strh r1, [r0] - strh r1, [r0, #2] - mov r1, #1 - lsl r1, r1, #0xc - strh r1, [r0, #4] - add r0, sp, #4 - add r1, r0, #0 - bl sub_020BD4FC - mov r1, #0 - mov r2, #2 - mov r3, #4 - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldrsh r3, [r4, r3] - mov r0, #3 - bl sub_020AF51C - ldr r1, _0225E878 ; =0x00007FFF - mov r0, #3 - bl sub_020AF558 - add sp, #0xc - pop {r3, r4, pc} - nop -_0225E864: .word 0x04000008 -_0225E868: .word 0xFFFFCFFD -_0225E86C: .word 0x0000CFFB -_0225E870: .word 0x0226D5EC -_0225E874: .word 0x00006B5A -_0225E878: .word 0x00007FFF -_0225E87C: .word 0xBFFF0000 -_0225E880: .word 0x04000580 -_0225E884: .word 0xFFFFF224 -_0225E888: .word 0xFFFFF805 - thumb_func_end ov70_0225E754 - - thumb_func_start ov70_0225E88C -ov70_0225E88C: ; 0x0225E88C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x3e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_0225CA44 - ldrb r0, [r4, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - bne _0225E8B2 - ldrb r0, [r4, #6] - cmp r0, #0 - bne _0225E8B2 - mov r0, #0x3f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_02262E20 -_0225E8B2: - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02262210 - ldrb r0, [r4, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - bne _0225E8E8 - ldrb r0, [r4, #6] - cmp r0, #0 - bne _0225E8E8 - mov r0, #0x3e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_0225CA5C - mov r0, #0x3f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_02262E2C - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_0226C718 -_0225E8E8: - add r0, r4, #0 - bl ov70_0225E970 - ldrb r0, [r4, #3] - cmp r0, #0 - bne _0225E91E - ldrb r0, [r4, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x1c - cmp r0, #1 - beq _0225E90A - ldrb r0, [r4, #6] - cmp r0, #1 - beq _0225E90A - ldrb r0, [r4] - cmp r0, #1 - bne _0225E90E -_0225E90A: - mov r2, #1 - b _0225E910 -_0225E90E: - mov r2, #0 -_0225E910: - mov r0, #0x61 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, #0 - mov r3, #0x70 - bl ov70_0225F418 -_0225E91E: - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02269220 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E88C - - thumb_func_start ov70_0225E92C -ov70_0225E92C: ; 0x0225E92C - push {r4, lr} - add r4, r0, #0 - bl sub_020241B4 - mov r0, #0xfb - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02260AEC - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02262298 - mov r0, #0x3e - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov70_0225CAD4 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02269240 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - add r4, #0x3c - add r0, r4, #0 - bl ov70_0225E6C0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E92C - - thumb_func_start ov70_0225E970 -ov70_0225E970: ; 0x0225E970 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - ldr r0, [r7, #0x34] - bl ov66_0222E190 - str r0, [sp, #8] - mov r4, #0 -_0225E980: - add r0, r4, #0 - bl ov66_02233184 - add r6, r0, #0 - cmp r6, #1 - bne _0225E99E - add r0, r4, #0 - bl ov66_022331A4 - cmp r0, #0 - bne _0225E99A - mov r5, #1 - b _0225E9A0 -_0225E99A: - mov r5, #0 - b _0225E9A0 -_0225E99E: - mov r5, #0 -_0225E9A0: - add r0, r4, #0 - bl ov66_02233224 - add r2, r0, #0 - ldr r0, [sp, #8] - str r5, [sp] - str r0, [sp, #4] - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r7, r0] - add r1, r4, #0 - add r3, r6, #0 - bl ov70_022627BC - add r4, r4, #1 - cmp r4, #3 - blt _0225E980 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225E970 - - thumb_func_start ov70_0225E9C8 -ov70_0225E9C8: ; 0x0225E9C8 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0x5e - str r0, [sp, #0x10] - ldr r0, [r1, #0] - add r4, r2, #0 - add r6, r3, #0 - add r1, r5, #0 - mov r2, #1 - mov r3, #2 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r0, #6 - lsl r0, r0, #6 - add r1, r6, #0 - bl sub_02023790 - str r0, [r5, #0x18] - add r0, r4, #0 - bl sub_02025E44 - bl sub_02027AC0 - str r0, [r5, #0x14] - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov70_0225E9C8 - - thumb_func_start ov70_0225EA14 -ov70_0225EA14: ; 0x0225EA14 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _0225EA30 - ldr r0, [r4, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 -_0225EA30: - add r0, r4, #0 - bl ov70_0225EB38 - ldr r0, [r4, #0x18] - bl sub_020237BC - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - thumb_func_end ov70_0225EA14 - - thumb_func_start ov70_0225EA44 -ov70_0225EA44: ; 0x0225EA44 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _0225EA64 - ldr r0, [r5, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 -_0225EA64: - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r5, #0x18] - add r1, r4, #0 - bl sub_02023810 - mov r3, #0 - str r3, [sp] - ldr r0, [r5, #0x14] - mov r1, #1 - str r0, [sp, #4] - ldr r0, _0225EAA0 ; =0x0001020F - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r2, [r5, #0x18] - add r0, r5, #0 - bl sub_0201D78C - mov r1, #1 - str r0, [r5, #0x10] - add r0, r5, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200E060 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0225EAA0: .word 0x0001020F - thumb_func_end ov70_0225EA44 - - thumb_func_start ov70_0225EAA4 -ov70_0225EAA4: ; 0x0225EAA4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _0225EAC4 - ldr r0, [r5, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 -_0225EAC4: - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r5, #0x18] - add r1, r4, #0 - bl sub_02023810 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0225EB04 ; =0x0001020F - mov r1, #1 - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r2, [r5, #0x18] - add r0, r5, #0 - bl sub_0201D78C - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200E060 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0225EB04: .word 0x0001020F - thumb_func_end ov70_0225EAA4 - - thumb_func_start ov70_0225EB08 -ov70_0225EB08: ; 0x0225EB08 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0225EB16 - bl sub_02022974 -_0225EB16: - add r0, r4, #0 - mov r1, #1 - bl sub_0200E7FC - str r0, [r4, #0x1c] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225EB08 - - thumb_func_start ov70_0225EB24 -ov70_0225EB24: ; 0x0225EB24 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0225EB36 - bl sub_0200EBA0 - mov r0, #0 - str r0, [r4, #0x1c] -_0225EB36: - pop {r4, pc} - thumb_func_end ov70_0225EB24 - - thumb_func_start ov70_0225EB38 -ov70_0225EB38: ; 0x0225EB38 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x1c] - cmp r0, #0 - beq _0225EB4A - bl sub_0200EBC8 - mov r0, #0 - str r0, [r4, #0x1c] -_0225EB4A: - pop {r4, pc} - thumb_func_end ov70_0225EB38 - - thumb_func_start ov70_0225EB4C -ov70_0225EB4C: ; 0x0225EB4C - ldr r0, [r0, #0x1c] - cmp r0, #0 - beq _0225EB56 - mov r0, #1 - bx lr -_0225EB56: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225EB4C - - thumb_func_start ov70_0225EB5C -ov70_0225EB5C: ; 0x0225EB5C - push {r3, lr} - ldr r0, [r0, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0225EB70 - mov r0, #1 - pop {r3, pc} -_0225EB70: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov70_0225EB5C - - thumb_func_start ov70_0225EB74 -ov70_0225EB74: ; 0x0225EB74 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _0225EB90 - ldr r0, [r4, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 -_0225EB90: - add r0, r4, #0 - bl ov70_0225EB38 - add r0, r4, #0 - mov r1, #1 - bl sub_0200E084 - add r0, r4, #0 - bl sub_0201AD10 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225EB74 - - thumb_func_start ov70_0225EBA8 -ov70_0225EBA8: ; 0x0225EBA8 - push {r4, lr} - add r4, r0, #0 - bl ov70_0225E9C8 - add r0, r4, #0 - mov r1, #2 - bl sub_0201C2B4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225EBA8 - - thumb_func_start ov70_0225EBBC -ov70_0225EBBC: ; 0x0225EBBC - ldr r3, _0225EBC0 ; =ov70_0225EA14 - bx r3 - ; .align 2, 0 -_0225EBC0: .word ov70_0225EA14 - thumb_func_end ov70_0225EBBC - - thumb_func_start ov70_0225EBC4 -ov70_0225EBC4: ; 0x0225EBC4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0x10] - add r4, r1, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _0225EBE4 - ldr r0, [r5, #0x10] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D730 -_0225EBE4: - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r5, #0x18] - add r1, r4, #0 - bl sub_02023810 - mov r3, #0 - str r3, [sp] - ldr r0, [r5, #0x14] - mov r1, #1 - str r0, [sp, #4] - str r3, [sp, #8] - ldr r2, [r5, #0x18] - add r0, r5, #0 - bl sub_0201D738 - str r0, [r5, #0x10] - mov r0, #3 - str r0, [sp] - add r0, r5, #0 - mov r1, #1 - mov r2, #0x1f - mov r3, #2 - bl sub_0200E69C - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225EBC4 - - thumb_func_start ov70_0225EC20 -ov70_0225EC20: ; 0x0225EC20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x70 - add r5, r2, #0 - add r7, r0, #0 - add r4, r1, #0 - mov r0, #0x3e - add r1, r5, #0 - bl sub_02006C24 - add r6, r0, #0 - ldr r0, _0225ED44 ; =0x00001388 - add r1, r6, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x13 - str r5, [sp, #8] - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r2, #4 - mov r3, #0 - bl sub_02009A4C - str r0, [r7, #0x40] - ldr r0, _0225ED44 ; =0x00001388 - add r1, r6, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4d - str r5, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #0xa - mov r3, #0 - bl sub_02009B04 - str r0, [r7, #0x44] - ldr r1, _0225ED44 ; =0x00001388 - mov r0, #2 - str r1, [sp] - str r0, [sp, #4] - lsr r0, r1, #4 - str r5, [sp, #8] - ldr r0, [r4, r0] - add r1, r6, #0 - mov r2, #5 - mov r3, #0 - bl sub_02009BC4 - str r0, [r7, #0x48] - ldr r0, _0225ED44 ; =0x00001388 - add r1, r6, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4f - str r5, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r2, #6 - mov r3, #0 - bl sub_02009BC4 - str r0, [r7, #0x4c] - add r0, r6, #0 - bl sub_02006CA8 - ldr r0, [r7, #0x40] - bl sub_0200A3DC - ldr r0, [r7, #0x44] - bl sub_0200A640 - ldr r1, _0225ED44 ; =0x00001388 - mov r0, #0 - str r1, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r0, #0x13 - str r2, [sp, #0x10] - lsl r0, r0, #4 - ldr r3, [r4, r0] - str r3, [sp, #0x14] - add r3, r0, #4 - ldr r3, [r4, r3] - str r3, [sp, #0x18] - add r3, r0, #0 - add r3, #8 - ldr r3, [r4, r3] - add r0, #0xc - str r3, [sp, #0x1c] - ldr r0, [r4, r0] - add r3, r1, #0 - str r0, [sp, #0x20] - str r2, [sp, #0x24] - str r2, [sp, #0x28] - add r0, sp, #0x4c - add r2, r1, #0 - bl sub_020093B4 - ldr r0, [r4, #4] - mov r6, #0 - str r0, [sp, #0x2c] - add r0, sp, #0x4c - str r0, [sp, #0x30] - mov r0, #1 - str r0, [sp, #0x44] - mov r0, #3 - lsl r0, r0, #0x12 - str r5, [sp, #0x48] - ldr r4, _0225ED48 ; =0x0226D580 - str r6, [sp, #0x40] - str r0, [sp, #0x34] - add r5, r7, #0 -_0225ED0E: - ldrb r0, [r4] - lsl r0, r0, #0xc - str r0, [sp, #0x38] - add r0, sp, #0x2c - bl sub_02021B90 - str r0, [r5, #0x50] - add r1, r6, #0 - bl sub_02021D6C - ldr r0, [r5, #0x50] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r5, #0x50] - mov r1, #0 - bl sub_02021CAC - add r6, r6, #1 - add r4, r4, #1 - add r5, r5, #4 - cmp r6, #2 - blt _0225ED0E - mov r0, #0 - str r0, [r7, #0x3c] - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225ED44: .word 0x00001388 -_0225ED48: .word 0x0226D580 - thumb_func_end ov70_0225EC20 - - thumb_func_start ov70_0225ED4C -ov70_0225ED4C: ; 0x0225ED4C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - ldr r1, [r5, #0x34] - cmp r1, #0 - beq _0225ED5C - bl ov70_0225EDE0 -_0225ED5C: - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _0225ED6C - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225EF14 -_0225ED6C: - mov r7, #0 - add r4, r5, #0 -_0225ED70: - ldr r0, [r4, #0x50] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0x50] - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #2 - blt _0225ED70 - ldr r0, [r5, #0x40] - bl sub_0200A4E4 - ldr r0, [r5, #0x44] - bl sub_0200A6DC - mov r7, #0x13 - mov r4, #0 - lsl r7, r7, #4 -_0225ED94: - ldr r0, [r6, r7] - ldr r1, [r5, #0x40] - bl sub_02009D68 - add r4, r4, #1 - add r5, r5, #4 - add r6, r6, #4 - cmp r4, #4 - blt _0225ED94 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225ED4C - - thumb_func_start ov70_0225EDA8 -ov70_0225EDA8: ; 0x0225EDA8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x34] - add r4, r1, #0 - add r7, r2, #0 - add r6, r3, #0 - cmp r0, #0 - beq _0225EDBC - bl sub_02022974 -_0225EDBC: - add r0, r4, #0 - add r1, r7, #0 - bl sub_02013A04 - str r0, [r5, #0x34] - mov r1, #0 - strh r4, [r5, #0x38] - cmp r4, #0 - bls _0225EDDE - add r2, r1, #0 -_0225EDD0: - ldr r0, [r5, #0x34] - add r1, r1, #1 - add r0, r0, r2 - str r6, [r0, #4] - add r2, #8 - cmp r1, r4 - blo _0225EDD0 -_0225EDDE: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225EDA8 - - thumb_func_start ov70_0225EDE0 -ov70_0225EDE0: ; 0x0225EDE0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _0225EDF4 - bl sub_02013A3C - mov r0, #0 - str r0, [r4, #0x34] - strh r0, [r4, #0x38] -_0225EDF4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225EDE0 - - thumb_func_start ov70_0225EDF8 -ov70_0225EDF8: ; 0x0225EDF8 - ldr r3, _0225EE00 ; =sub_02013A6C - ldr r0, [r0, #0x34] - bx r3 - nop -_0225EE00: .word sub_02013A6C - thumb_func_end ov70_0225EDF8 - - thumb_func_start ov70_0225EE04 -ov70_0225EE04: ; 0x0225EE04 - ldr r0, [r0, #0x34] - bx lr - thumb_func_end ov70_0225EE04 - - thumb_func_start ov70_0225EE08 -ov70_0225EE08: ; 0x0225EE08 - push {r3, r4} - ldrh r2, [r0, #0x38] - mov r3, #0 - cmp r2, #0 - ble _0225EE2A - ldr r4, [r0, #0x34] -_0225EE14: - ldr r2, [r4, #4] - cmp r1, r2 - bne _0225EE20 - mov r0, #1 - pop {r3, r4} - bx lr -_0225EE20: - ldrh r2, [r0, #0x38] - add r3, r3, #1 - add r4, #8 - cmp r3, r2 - blt _0225EE14 -_0225EE2A: - mov r0, #0 - pop {r3, r4} - bx lr - thumb_func_end ov70_0225EE08 - - thumb_func_start ov70_0225EE30 -ov70_0225EE30: ; 0x0225EE30 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0x30] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _0225EE46 - bl sub_02022974 -_0225EE46: - ldrh r0, [r4, #0x12] - lsl r0, r0, #1 - cmp r0, #0x12 - blt _0225EE52 - bl sub_02022974 -_0225EE52: - add r3, r4, #0 - add r2, r5, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r1, r5, #0 - add r1, #0x20 - str r1, [r5, #0xc] - ldrh r0, [r4, #0x10] - add r3, sp, #0x18 - mov r2, #1 - strh r0, [r5, #0x3a] - ldr r0, _0225EED4 ; =ov70_0225EF58 - str r0, [r5, #4] - ldrb r0, [r3, #0x1c] - str r0, [sp] - add r0, sp, #0x38 - ldrb r0, [r0] - str r0, [sp, #4] - ldrh r0, [r4, #0x12] - lsl r0, r0, #0x19 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #0xca - str r0, [sp, #0x10] - ldrb r3, [r3, #0x18] - ldr r0, [r6, #0] - bl sub_0201A7E8 - add r0, r5, #0 - add r0, #0x20 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - add r0, #0x20 - mov r1, #1 - mov r2, #0x55 - mov r3, #3 - bl sub_0200DC48 - add r2, sp, #0x18 - ldr r3, [sp, #0x2c] - ldrh r2, [r2, #0x10] - lsl r3, r3, #0x18 - add r0, r5, #0 - add r1, r7, #0 - lsr r3, r3, #0x18 - bl sub_0200112C - str r0, [r5, #0x30] - add r5, #0x20 - add r0, r5, #0 - bl sub_0201A9A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0225EED4: .word ov70_0225EF58 - thumb_func_end ov70_0225EE30 - - thumb_func_start ov70_0225EED8 -ov70_0225EED8: ; 0x0225EED8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x30] - cmp r0, #0 - bne _0225EEE8 - mov r0, #1 - mvn r0, r0 - pop {r3, r4, r5, pc} -_0225EEE8: - bl sub_02001288 - add r4, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0225EEFC - add r0, r0, #1 - cmp r4, r0 - bne _0225EF04 -_0225EEFC: - add r0, r5, #0 - bl ov70_0225EF70 - b _0225EF0A -_0225EF04: - ldr r0, _0225EF10 ; =0x000005DC - bl sub_02005748 -_0225EF0A: - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_0225EF10: .word 0x000005DC - thumb_func_end ov70_0225EED8 - - thumb_func_start ov70_0225EF14 -ov70_0225EF14: ; 0x0225EF14 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x30] - cmp r0, #0 - beq _0225EF56 - bl sub_02001384 - mov r0, #0 - str r0, [r5, #0x30] - add r0, r5, #0 - add r0, #0x20 - mov r1, #1 - bl sub_0200DC9C - add r0, r5, #0 - add r0, #0x20 - bl sub_0201AD10 - add r0, r5, #0 - add r0, #0x20 - bl sub_0201A8FC - mov r4, #0 - str r4, [r5, #0x3c] - add r6, r4, #0 -_0225EF46: - ldr r0, [r5, #0x50] - add r1, r6, #0 - bl sub_02021CAC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0225EF46 -_0225EF56: - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225EF14 - - thumb_func_start ov70_0225EF58 -ov70_0225EF58: ; 0x0225EF58 - push {r3, lr} - cmp r2, #0 - bne _0225EF64 - ldr r0, _0225EF68 ; =0x000005DC - bl sub_02005748 -_0225EF64: - pop {r3, pc} - nop -_0225EF68: .word 0x000005DC - thumb_func_end ov70_0225EF58 - - thumb_func_start ov70_0225EF6C -ov70_0225EF6C: ; 0x0225EF6C - str r1, [r0, #0x3c] - bx lr - thumb_func_end ov70_0225EF6C - - thumb_func_start ov70_0225EF70 -ov70_0225EF70: ; 0x0225EF70 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0x3c] - cmp r0, #0 - bne _0225EF90 - ldr r0, [r4, #0x50] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x54] - mov r1, #0 - bl sub_02021CAC - add sp, #4 - pop {r3, r4, pc} -_0225EF90: - ldr r0, [r4, #0x30] - add r1, sp, #0 - mov r2, #0 - bl sub_020014DC - add r0, sp, #0 - ldrh r0, [r0] - cmp r0, #0 - ldr r0, [r4, #0x50] - bne _0225EFAC - mov r1, #0 - bl sub_02021CAC - b _0225EFB2 -_0225EFAC: - mov r1, #1 - bl sub_02021CAC -_0225EFB2: - add r0, sp, #0 - ldrh r1, [r0] - ldrh r0, [r4, #0x3a] - sub r0, r0, #7 - cmp r1, r0 - ldr r0, [r4, #0x54] - blt _0225EFCA - mov r1, #0 - bl sub_02021CAC - add sp, #4 - pop {r3, r4, pc} -_0225EFCA: - mov r1, #1 - bl sub_02021CAC - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov70_0225EF70 - - thumb_func_start ov70_0225EFD4 -ov70_0225EFD4: ; 0x0225EFD4 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225EFD4 - - thumb_func_start ov70_0225EFD8 -ov70_0225EFD8: ; 0x0225EFD8 - ldr r3, _0225EFDC ; =ov70_0225F024 - bx r3 - ; .align 2, 0 -_0225EFDC: .word ov70_0225F024 - thumb_func_end ov70_0225EFD8 - - thumb_func_start ov70_0225EFE0 -ov70_0225EFE0: ; 0x0225EFE0 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - add r0, sp, #0x10 - ldrb r2, [r0, #0x10] - str r2, [sp] - ldrb r2, [r0, #0x14] - str r2, [sp, #4] - ldrb r0, [r0, #0x18] - mov r2, #1 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #0xca - str r0, [sp, #0x10] - ldr r0, [r1, #0] - add r1, r4, #0 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x55 - mov r3, #3 - bl sub_0200DC48 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov70_0225EFE0 - - thumb_func_start ov70_0225F024 -ov70_0225F024: ; 0x0225F024 - push {r4, lr} - add r4, r0, #0 - bl sub_0201A7CC - cmp r0, #1 - bne _0225F044 - add r0, r4, #0 - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - bl sub_0201AD10 - add r0, r4, #0 - bl sub_0201A8FC -_0225F044: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F024 - - thumb_func_start ov70_0225F048 -ov70_0225F048: ; 0x0225F048 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r1, #0 - str r3, [sp] - add r5, r2, #0 - mov r1, #0xff - str r1, [sp, #4] - ldr r1, _0225F074 ; =0x0001020F - add r4, r0, #0 - str r1, [sp, #8] - mov r1, #0 - add r2, r6, #0 - add r3, r5, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_0225F074: .word 0x0001020F - thumb_func_end ov70_0225F048 - - thumb_func_start ov70_0225F078 -ov70_0225F078: ; 0x0225F078 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - str r3, [sp] - add r1, sp, #8 - add r4, r2, #0 - ldrh r1, [r1, #0x10] - add r2, r5, #0 - add r3, r4, #0 - str r1, [sp, #4] - mov r1, #0xf - bl sub_0201AE78 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F078 - - thumb_func_start ov70_0225F098 -ov70_0225F098: ; 0x0225F098 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r6, r2, #0 - cmp r0, #0 - beq _0225F0AA - bl sub_02022974 -_0225F0AA: - mov r0, #2 - add r1, r6, #0 - bl sub_02013A04 - str r0, [r5, #0] - add r0, r4, #0 - mov r1, #1 - mov r2, #0x43 - bl ov70_0225F288 - add r1, r0, #0 - ldr r0, [r5, #0] - mov r2, #0 - bl sub_02013A6C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x42 - bl ov70_0225F288 - add r1, r0, #0 - ldr r0, [r5, #0] - mov r2, #1 - bl sub_02013A6C - ldr r3, _0225F0FC ; =0x0226D644 - add r2, r5, #4 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #2 - strh r0, [r5, #0x14] - ldr r0, [r5, #0] - str r0, [r5, #4] - pop {r4, r5, r6, pc} - nop -_0225F0FC: .word 0x0226D644 - thumb_func_end ov70_0225F098 - - thumb_func_start ov70_0225F100 -ov70_0225F100: ; 0x0225F100 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0225F112 - bl sub_02013A3C - mov r0, #0 - str r0, [r4, #0] -_0225F112: - pop {r4, pc} - thumb_func_end ov70_0225F100 - - thumb_func_start ov70_0225F114 -ov70_0225F114: ; 0x0225F114 - push {r3, r4, lr} - sub sp, #0x14 - mov r3, #4 - add r4, r0, #0 - str r3, [sp] - mov r0, #0x17 - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #5 - str r0, [sp, #0xc] - mov r0, #0x5e - str r0, [sp, #0x10] - ldr r0, [r1, #0] - add r1, r4, #0 - mov r2, #1 - bl sub_0201A7E8 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - add sp, #0x14 - pop {r3, r4, pc} - thumb_func_end ov70_0225F114 - - thumb_func_start ov70_0225F144 -ov70_0225F144: ; 0x0225F144 - ldr r3, _0225F148 ; =sub_0201A8FC - bx r3 - ; .align 2, 0 -_0225F148: .word sub_0201A8FC - thumb_func_end ov70_0225F144 - - thumb_func_start ov70_0225F14C -ov70_0225F14C: ; 0x0225F14C - push {r4, lr} - sub sp, #0x10 - add r2, r1, #0 - mov r1, #0 - str r1, [sp] - mov r3, #0xff - str r3, [sp, #4] - ldr r3, _0225F180 ; =0x0001020F - add r4, r0, #0 - str r3, [sp, #8] - add r3, r1, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x55 - mov r3, #3 - bl sub_0200DC48 - add r0, r4, #0 - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, pc} - nop -_0225F180: .word 0x0001020F - thumb_func_end ov70_0225F14C - - thumb_func_start ov70_0225F184 -ov70_0225F184: ; 0x0225F184 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r1, #0 - bl sub_020382F8 - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl ov66_022316F4 - add r7, r0, #0 - mov r0, #2 - str r0, [sp] - ldr r1, [r4, #0] - add r0, r5, #0 - mov r2, #5 - mov r3, #0 - bl ov70_0225F2A8 - add r0, r5, #0 - mov r1, #2 - add r2, r7, #0 - bl ov70_0225F288 - add r1, r0, #0 - add r0, r6, #0 - bl ov70_0225F14C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F184 - - thumb_func_start ov70_0225F1C0 -ov70_0225F1C0: ; 0x0225F1C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r2, #0 - add r4, r1, #0 - bl ov66_0223270C - add r1, r0, #0 - mov r0, #2 - str r0, [sp] - add r0, r4, #0 - mov r2, #5 - mov r3, #0 - bl ov70_0225F2A8 - add r0, r4, #0 - mov r1, #2 - mov r2, #0x20 - bl ov70_0225F288 - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225F14C - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225F1C0 - - thumb_func_start ov70_0225F1F0 -ov70_0225F1F0: ; 0x0225F1F0 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #2 - mov r2, #0xe - bl ov70_0225F288 - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225F14C - pop {r4, pc} - thumb_func_end ov70_0225F1F0 - - thumb_func_start ov70_0225F208 -ov70_0225F208: ; 0x0225F208 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - str r0, [sp] - mov r0, #8 - mov r1, #0x40 - add r2, r7, #0 - bl sub_0200B368 - ldr r1, [sp] - ldr r4, _0225F258 ; =0x0226D5AC - str r0, [r1, #0] - mov r6, #0 - add r5, r1, #0 -_0225F222: - ldr r2, [r4, #0] - mov r0, #1 - mov r1, #0x1a - add r3, r7, #0 - bl sub_0200B144 - str r0, [r5, #4] - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #4 - blt _0225F222 - mov r0, #0x1e - lsl r0, r0, #4 - add r1, r7, #0 - bl sub_02023790 - ldr r1, [sp] - str r0, [r1, #0x14] - mov r0, #0x1e - lsl r0, r0, #4 - add r1, r7, #0 - bl sub_02023790 - ldr r1, [sp] - str r0, [r1, #0x18] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225F258: .word 0x0226D5AC - thumb_func_end ov70_0225F208 - - thumb_func_start ov70_0225F25C -ov70_0225F25C: ; 0x0225F25C - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - bl sub_0200B3F0 - mov r4, #0 - add r5, r6, #0 -_0225F26A: - ldr r0, [r5, #4] - bl sub_0200B190 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0225F26A - ldr r0, [r6, #0x14] - bl sub_020237BC - ldr r0, [r6, #0x18] - bl sub_020237BC - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F25C - - thumb_func_start ov70_0225F288 -ov70_0225F288: ; 0x0225F288 - push {r4, lr} - add r4, r0, #0 - lsl r0, r1, #2 - add r0, r4, r0 - add r1, r2, #0 - ldr r0, [r0, #4] - ldr r2, [r4, #0x18] - bl sub_0200B1B8 - ldr r0, [r4, #0] - ldr r1, [r4, #0x14] - ldr r2, [r4, #0x18] - bl sub_0200C388 - ldr r0, [r4, #0x14] - pop {r4, pc} - thumb_func_end ov70_0225F288 - - thumb_func_start ov70_0225F2A8 -ov70_0225F2A8: ; 0x0225F2A8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, [sp, #0x18] - add r4, r2, #0 - str r1, [sp] - mov r1, #1 - str r1, [sp, #4] - add r1, r3, #0 - ldr r0, [r0, #0] - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200B60C - add sp, #8 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225F2A8 - - thumb_func_start ov70_0225F2C8 -ov70_0225F2C8: ; 0x0225F2C8 - add r3, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, _0225F2D4 ; =sub_0200B498 - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0225F2D4: .word sub_0200B498 - thumb_func_end ov70_0225F2C8 - - thumb_func_start ov70_0225F2D8 -ov70_0225F2D8: ; 0x0225F2D8 - add r3, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, _0225F2E4 ; =sub_0200C0B0 - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0225F2E4: .word sub_0200C0B0 - thumb_func_end ov70_0225F2D8 - - thumb_func_start ov70_0225F2E8 -ov70_0225F2E8: ; 0x0225F2E8 - add r3, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, _0225F2F4 ; =sub_0200C0E8 - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0225F2F4: .word sub_0200C0E8 - thumb_func_end ov70_0225F2E8 - - thumb_func_start ov70_0225F2F8 -ov70_0225F2F8: ; 0x0225F2F8 - add r3, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, _0225F304 ; =sub_0200C120 - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0225F304: .word sub_0200C120 - thumb_func_end ov70_0225F2F8 - - thumb_func_start ov70_0225F308 -ov70_0225F308: ; 0x0225F308 - add r3, r1, #0 - add r1, r2, #0 - add r2, r3, #0 - ldr r3, _0225F314 ; =sub_0200BDD0 - ldr r0, [r0, #0] - bx r3 - ; .align 2, 0 -_0225F314: .word sub_0200BDD0 - thumb_func_end ov70_0225F308 - - thumb_func_start ov70_0225F318 -ov70_0225F318: ; 0x0225F318 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r2, #0 - add r1, r3, #0 - ldr r0, [r0, #0] - add r2, r5, #0 - add r3, r4, #0 - bl sub_0200BE08 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0225F318 - - thumb_func_start ov70_0225F32C -ov70_0225F32C: ; 0x0225F32C - ldr r3, _0225F334 ; =sub_0200BE48 - ldr r0, [r0, #0] - bx r3 - nop -_0225F334: .word sub_0200BE48 - thumb_func_end ov70_0225F32C - - thumb_func_start ov70_0225F338 -ov70_0225F338: ; 0x0225F338 - ldr r3, _0225F340 ; =sub_0200C41C - ldr r0, [r0, #0] - bx r3 - nop -_0225F340: .word sub_0200C41C - thumb_func_end ov70_0225F338 - - thumb_func_start ov70_0225F344 -ov70_0225F344: ; 0x0225F344 - mov r1, #0xf6 - mov r2, #1 - lsl r1, r1, #2 - str r2, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225F344 - - thumb_func_start ov70_0225F350 -ov70_0225F350: ; 0x0225F350 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r4, [sp, #0x20] - add r5, r0, #0 - add r0, r3, #0 - add r7, r1, #0 - add r6, r2, #0 - bl sub_02025F30 - str r0, [sp, #4] - mov r0, #0xba - add r1, r4, #0 - bl sub_02006C24 - mov r2, #0x53 - lsl r2, r2, #2 - str r0, [r5, r2] - str r4, [sp] - ldr r2, [r5, r2] - ldr r3, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - bl ov70_0225F9BC - mov r2, #0x53 - lsl r2, r2, #2 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #8 - add r1, r6, #0 - add r3, r4, #0 - bl ov70_0225FA84 - mov r2, #0x45 - lsl r2, r2, #2 - add r0, r5, r2 - add r2, #0x38 - ldr r2, [r5, r2] - add r1, r6, #0 - add r3, r4, #0 - bl ov70_02260744 - mov r1, #0 - strb r1, [r5, #2] - strb r1, [r5, #1] - ldrh r0, [r7, #6] - cmp r0, #0 - bne _0225F3DC - mov r0, #4 - strb r1, [r5] - bl sub_0201975C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0225F3DC: - mov r0, #5 - strb r0, [r5] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225F350 - - thumb_func_start ov70_0225F3E4 -ov70_0225F3E4: ; 0x0225F3E4 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r5, r0 - add r6, r1, #0 - add r4, r2, #0 - bl ov70_022607A8 - add r0, r5, #0 - add r0, #8 - add r1, r6, #0 - add r2, r4, #0 - bl ov70_0225FAA8 - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0225FA10 - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02006CA8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F3E4 - - thumb_func_start ov70_0225F418 -ov70_0225F418: ; 0x0225F418 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - add r5, r1, #0 - add r4, r0, #0 - add r0, r5, #0 - str r0, [sp, #0x38] - add r0, #0x3c - str r0, [sp, #0x38] - mov r0, #0xb7 - lsl r0, r0, #2 - ldrb r1, [r4] - add r7, r3, #0 - ldr r6, [r5, #0x34] - str r0, [sp, #0x3c] - cmp r1, #0xa - bhi _0225F4FA - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225F444: ; jump table - .short _0225F45A - _0225F444 - 2 ; case 0 - .short _0225F468 - _0225F444 - 2 ; case 1 - .short _0225F486 - _0225F444 - 2 ; case 2 - .short _0225F4D4 - _0225F444 - 2 ; case 3 - .short _0225F4F2 - _0225F444 - 2 ; case 4 - .short _0225F506 - _0225F444 - 2 ; case 5 - .short _0225F5E2 - _0225F444 - 2 ; case 6 - .short _0225F600 - _0225F444 - 2 ; case 7 - .short _0225F648 - _0225F444 - 2 ; case 8 - .short _0225F74E - _0225F444 - 2 ; case 9 - .short _0225F780 - _0225F444 - 2 ; case 10 -_0225F45A: - ldrh r0, [r4, #6] - cmp r0, #1 - bne _0225F4FA - add r0, r1, #1 - add sp, #0x50 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F468: - mov r0, #4 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r1, #0 - ldr r3, _0225F790 ; =0x00007FFF - str r7, [sp, #8] - add r2, r1, #0 - bl sub_0200F174 - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F486: - bl sub_0200F2AC - cmp r0, #1 - bne _0225F4FA - add r0, r6, #0 - bl ov66_0222E3BC - mov r2, #0xb7 - lsl r2, r2, #2 - str r0, [sp] - ldr r1, [sp, #0x38] - add r0, r4, #0 - add r2, r5, r2 - add r3, r7, #0 - bl ov70_0225F8AC - mov r0, #4 - strb r0, [r4, #1] - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F4D4: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r3, _0225F790 ; =0x00007FFF - str r7, [sp, #8] - mov r0, #4 - add r2, r1, #0 - bl sub_0200F174 - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F4F2: - bl sub_0200F2AC - cmp r0, #1 - beq _0225F4FC -_0225F4FA: - b _0225F78C -_0225F4FC: - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F506: - cmp r2, #1 - beq _0225F608 - ldrb r0, [r4, #1] - cmp r0, #4 - bhi _0225F5D2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225F51C: ; jump table - .short _0225F5D2 - _0225F51C - 2 ; case 0 - .short _0225F526 - _0225F51C - 2 ; case 1 - .short _0225F5C2 - _0225F51C - 2 ; case 2 - .short _0225F542 - _0225F51C - 2 ; case 3 - .short _0225F5D2 - _0225F51C - 2 ; case 4 -_0225F526: - mov r2, #0x45 - lsl r2, r2, #2 - add r0, r4, r2 - add r2, #0x38 - ldr r1, [sp, #0x38] - ldr r2, [r4, r2] - bl ov70_022607D4 - cmp r0, #1 - bne _0225F5D2 - add r0, r5, #0 - bl ov70_0225F344 - b _0225F5D2 -_0225F542: - ldr r2, _0225F794 ; =0x00000153 - ldrb r0, [r4, r2] - cmp r0, #0 - beq _0225F56E - sub r1, r2, #3 - mov r0, #0xf7 - sub r2, r2, #1 - lsl r0, r0, #2 - ldrh r1, [r4, r1] - ldrb r2, [r4, r2] - ldr r0, [r5, r0] - bl ov70_0226C810 - cmp r0, #0 - bne _0225F56E - ldr r0, _0225F794 ; =0x00000153 - mov r1, #0 - strb r1, [r4, r0] - sub r0, #0x3f - add r0, r4, r0 - bl ov70_02260A68 -_0225F56E: - mov r2, #0x45 - lsl r2, r2, #2 - add r0, r4, r2 - add r2, #0x38 - ldr r1, [sp, #0x38] - ldr r2, [r4, r2] - add r3, r7, #0 - bl ov70_022607D4 - cmp r0, #1 - bne _0225F5D2 - add r0, r6, #0 - bl ov66_0222E338 - add r1, r0, #0 - add r0, r6, #0 - bl ov66_0222EBD4 - add r0, r6, #0 - bl ov66_0222EC50 - add r0, r6, #0 - bl ov66_0222E338 - add r1, r0, #0 - add r0, r6, #0 - bl ov66_0222EBA4 - add r1, sp, #0x4c - add r2, sp, #0x48 - bl ov66_0222EC04 - ldr r0, _0225F794 ; =0x00000153 - mov r1, #1 - strb r1, [r4, r0] - sub r1, r0, #3 - ldr r2, [sp, #0x4c] - sub r0, r0, #1 - strh r2, [r4, r1] - ldr r1, [sp, #0x48] - strb r1, [r4, r0] - b _0225F5D2 -_0225F5C2: - ldr r1, [sp, #0x3c] - add r0, r4, #0 - add r1, #0x3c - str r1, [sp, #0x3c] - add r0, #8 - add r1, r5, r1 - bl ov70_0225FACC -_0225F5D2: - ldrb r0, [r4, #2] - cmp r0, #0 - beq _0225F608 - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F5E2: - mov r0, #3 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r2, #0 - str r7, [sp, #8] - mov r0, #4 - add r3, r2, #0 - bl sub_0200F174 - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F600: - bl sub_0200F2AC - cmp r0, #1 - beq _0225F60A -_0225F608: - b _0225F78C -_0225F60A: - ldrb r0, [r4, #1] - cmp r0, #4 - bhi _0225F63E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225F61C: ; jump table - .short _0225F63E - _0225F61C - 2 ; case 0 - .short _0225F626 - _0225F61C - 2 ; case 1 - .short _0225F630 - _0225F61C - 2 ; case 2 - .short _0225F626 - _0225F61C - 2 ; case 3 - .short _0225F626 - _0225F61C - 2 ; case 4 -_0225F626: - ldr r1, [sp, #0x38] - add r0, r4, #0 - bl ov70_0225F920 - b _0225F63E -_0225F630: - mov r1, #0xc6 - lsl r1, r1, #2 - ldr r2, [sp, #0x38] - add r0, r4, #0 - add r1, r5, r1 - bl ov70_0225F89C -_0225F63E: - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F648: - ldrb r0, [r4, #2] - cmp r0, #4 - bhi _0225F740 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0225F65A: ; jump table - .short _0225F740 - _0225F65A - 2 ; case 0 - .short _0225F664 - _0225F65A - 2 ; case 1 - .short _0225F67E - _0225F65A - 2 ; case 2 - .short _0225F710 - _0225F65A - 2 ; case 3 - .short _0225F664 - _0225F65A - 2 ; case 4 -_0225F664: - add r0, r6, #0 - bl ov66_0222E3BC - mov r2, #0xb7 - lsl r2, r2, #2 - str r0, [sp] - ldr r1, [sp, #0x38] - add r0, r4, #0 - add r2, r5, r2 - add r3, r7, #0 - bl ov70_0225F8AC - b _0225F740 -_0225F67E: - add r0, r6, #0 - bl ov66_0222E3BC - str r0, [sp, #0x28] - ldrb r0, [r4, #3] - str r0, [sp, #0x24] - add r0, r6, #0 - bl ov66_0222E338 - ldr r1, [sp, #0x24] - cmp r1, r0 - bne _0225F6A4 - add r0, r6, #0 - bl ov66_0222E3BC - str r0, [sp, #0x20] - mov r0, #1 - str r0, [sp, #0x2c] - b _0225F6B0 -_0225F6A4: - add r0, r6, #0 - bl ov66_0222E374 - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x2c] -_0225F6B0: - ldrb r1, [r4, #3] - add r0, r6, #0 - bl ov66_0222E924 - str r0, [sp, #0x34] - ldrh r0, [r4, #4] - cmp r0, #1 - bne _0225F6DC - ldrb r1, [r4, #3] - add r0, r6, #0 - bl ov66_0222E944 - str r0, [sp, #0x30] - ldrb r1, [r4, #3] - add r0, r6, #0 - bl ov66_0222E954 - cmp r0, #0 - bne _0225F6E0 - mov r1, #0 - str r1, [sp, #0x30] - b _0225F6E0 -_0225F6DC: - mov r0, #0 - str r0, [sp, #0x30] -_0225F6E0: - ldr r1, [sp, #0x2c] - ldr r3, [sp, #0x3c] - str r1, [sp] - ldr r1, [sp, #0x20] - str r7, [sp, #4] - str r1, [sp, #8] - ldr r1, [sp, #0x28] - ldr r2, [sp, #0x38] - str r1, [sp, #0xc] - ldr r1, [sp, #0x34] - add r3, r5, r3 - str r1, [sp, #0x10] - ldr r1, [sp, #0x30] - str r1, [sp, #0x14] - mov r1, #0xc6 - str r0, [sp, #0x18] - mov r0, #1 - lsl r1, r1, #2 - str r0, [sp, #0x1c] - add r0, r4, #0 - add r1, r5, r1 - bl ov70_0225F844 - b _0225F740 -_0225F710: - add r0, r6, #0 - bl ov66_0222E338 - add r1, r0, #0 - add r0, r6, #0 - bl ov66_0222EBA4 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _0225F72C - bl sub_02022974 - mov r0, #0 -_0225F72C: - add r1, sp, #0x44 - add r2, sp, #0x40 - bl ov66_0222EC04 - ldr r1, [sp, #0x38] - ldr r3, [sp, #0x40] - add r0, r4, #0 - add r2, r7, #0 - bl ov70_0225F8F0 -_0225F740: - mov r0, #0 - strb r0, [r4, #2] - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F74E: - mov r0, #3 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - str r7, [sp, #8] - mov r0, #4 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - cmp r0, #2 - bne _0225F776 - mov r1, #0xc6 - add r0, r4, #0 - lsl r1, r1, #2 - add r0, #8 - add r1, r5, r1 - bl ov70_0225FACC -_0225F776: - ldrb r0, [r4] - add sp, #0x50 - add r0, r0, #1 - strb r0, [r4] - pop {r3, r4, r5, r6, r7, pc} -_0225F780: - bl sub_0200F2AC - cmp r0, #1 - bne _0225F78C - mov r0, #5 - strb r0, [r4] -_0225F78C: - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225F790: .word 0x00007FFF -_0225F794: .word 0x00000153 - thumb_func_end ov70_0225F418 - - thumb_func_start ov70_0225F798 -ov70_0225F798: ; 0x0225F798 - ldrb r0, [r0] - bx lr - thumb_func_end ov70_0225F798 - - thumb_func_start ov70_0225F79C -ov70_0225F79C: ; 0x0225F79C - mov r3, #2 - strb r3, [r0, #2] - strb r1, [r0, #3] - strh r2, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225F79C - - thumb_func_start ov70_0225F7A8 -ov70_0225F7A8: ; 0x0225F7A8 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - add r7, r3, #0 - cmp r4, #0x1b - blo _0225F7BA - bl sub_02022974 -_0225F7BA: - ldrb r0, [r5, #1] - cmp r0, #2 - beq _0225F7C4 - bl sub_02022974 -_0225F7C4: - ldrb r0, [r5, #1] - cmp r0, #2 - bne _0225F7DE - mov r2, #0x53 - str r4, [sp] - lsl r2, r2, #2 - add r0, r5, #0 - ldr r2, [r5, r2] - add r0, #8 - add r1, r6, #0 - add r3, r7, #0 - bl ov70_0225FEC4 -_0225F7DE: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225F7A8 - - thumb_func_start ov70_0225F7E0 -ov70_0225F7E0: ; 0x0225F7E0 - ldrb r1, [r0, #1] - cmp r1, #1 - beq _0225F7EA - mov r1, #1 - strb r1, [r0, #2] -_0225F7EA: - bx lr - thumb_func_end ov70_0225F7E0 - - thumb_func_start ov70_0225F7EC -ov70_0225F7EC: ; 0x0225F7EC - ldrb r1, [r0, #1] - cmp r1, #3 - beq _0225F7F6 - mov r1, #3 - strb r1, [r0, #2] -_0225F7F6: - bx lr - thumb_func_end ov70_0225F7EC - - thumb_func_start ov70_0225F7F8 -ov70_0225F7F8: ; 0x0225F7F8 - ldrb r0, [r0, #3] - bx lr - thumb_func_end ov70_0225F7F8 - - thumb_func_start ov70_0225F7FC -ov70_0225F7FC: ; 0x0225F7FC - ldrb r1, [r0, #2] - cmp r1, #2 - bne _0225F806 - mov r0, #1 - bx lr -_0225F806: - ldrb r0, [r0, #1] - cmp r0, #2 - bne _0225F810 - mov r0, #1 - bx lr -_0225F810: - mov r0, #0 - bx lr - thumb_func_end ov70_0225F7FC - - thumb_func_start ov70_0225F814 -ov70_0225F814: ; 0x0225F814 - ldrb r1, [r0, #2] - cmp r1, #0 - bne _0225F824 - ldrb r0, [r0, #1] - cmp r0, #2 - bne _0225F824 - mov r0, #1 - bx lr -_0225F824: - mov r0, #0 - bx lr - thumb_func_end ov70_0225F814 - - thumb_func_start ov70_0225F828 -ov70_0225F828: ; 0x0225F828 - ldr r3, _0225F830 ; =ov70_0225FEEC - add r0, #8 - bx r3 - nop -_0225F830: .word ov70_0225FEEC - thumb_func_end ov70_0225F828 - - thumb_func_start ov70_0225F834 -ov70_0225F834: ; 0x0225F834 - ldrb r0, [r0, #2] - cmp r0, #0 - beq _0225F83E - mov r0, #1 - bx lr -_0225F83E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225F834 - - thumb_func_start ov70_0225F844 -ov70_0225F844: ; 0x0225F844 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - add r4, r3, #0 - ldrb r3, [r5, #1] - add r6, r1, #0 - add r7, r2, #0 - cmp r3, #2 - bne _0225F85A - bl ov70_0225F89C -_0225F85A: - ldr r0, [sp, #0x40] - str r4, [sp] - str r0, [sp, #4] - mov r0, #0x53 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r2, r5, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x44] - add r1, r6, #0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x48] - add r2, #8 - str r0, [sp, #0x10] - ldr r0, [sp, #0x4c] - add r3, r7, #0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x50] - str r0, [sp, #0x18] - ldr r0, [sp, #0x54] - str r0, [sp, #0x1c] - ldr r0, [sp, #0x58] - str r0, [sp, #0x20] - ldr r0, [sp, #0x5c] - str r0, [sp, #0x24] - add r0, r5, #0 - bl ov70_0225FAD0 - mov r0, #2 - strb r0, [r5, #1] - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F844 - - thumb_func_start ov70_0225F89C -ov70_0225F89C: ; 0x0225F89C - push {r4, lr} - add r4, r0, #0 - add r0, #8 - bl ov70_0225FE80 - mov r0, #0 - strb r0, [r4, #1] - pop {r4, pc} - thumb_func_end ov70_0225F89C - - thumb_func_start ov70_0225F8AC -ov70_0225F8AC: ; 0x0225F8AC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldrb r0, [r5, #1] - add r4, r1, #0 - add r7, r2, #0 - add r6, r3, #0 - cmp r0, #1 - beq _0225F8C8 - add r0, #0xfd - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bhi _0225F8D0 -_0225F8C8: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0225F920 -_0225F8D0: - mov r0, #0x53 - lsl r0, r0, #2 - ldr r1, [r5, r0] - sub r0, #0x38 - str r1, [sp] - ldr r3, [sp, #0x20] - add r0, r5, r0 - add r1, r4, #0 - add r2, r7, #0 - str r6, [sp, #4] - bl ov70_02260870 - mov r0, #1 - strb r0, [r5, #1] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225F8AC - - thumb_func_start ov70_0225F8F0 -ov70_0225F8F0: ; 0x0225F8F0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r2, #0 - ldrb r2, [r5, #1] - add r6, r1, #0 - add r7, r3, #0 - cmp r2, #3 - bne _0225F904 - bl ov70_0225F920 -_0225F904: - mov r3, #0x45 - lsl r3, r3, #2 - add r0, r5, r3 - str r4, [sp] - add r3, #0x38 - ldr r3, [r5, r3] - add r1, r6, #0 - add r2, r7, #0 - bl ov70_02260930 - mov r0, #3 - strb r0, [r5, #1] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225F8F0 - - thumb_func_start ov70_0225F920 -ov70_0225F920: ; 0x0225F920 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x45 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov70_022609A8 - mov r0, #0 - strb r0, [r4, #1] - pop {r4, pc} - thumb_func_end ov70_0225F920 - - thumb_func_start ov70_0225F934 -ov70_0225F934: ; 0x0225F934 - ldr r2, _0225F93C ; =0x0000011A - strh r1, [r0, r2] - bx lr - nop -_0225F93C: .word 0x0000011A - thumb_func_end ov70_0225F934 - - thumb_func_start ov70_0225F940 -ov70_0225F940: ; 0x0225F940 - add r1, r0, #0 - mov r0, #0x55 - lsl r0, r0, #2 - strh r2, [r1, r0] - add r0, r0, #2 - strh r3, [r1, r0] - ldr r3, _0225F954 ; =sub_0200DA3C - ldr r0, _0225F958 ; =ov70_0225F95C - mov r2, #0 - bx r3 - ; .align 2, 0 -_0225F954: .word sub_0200DA3C -_0225F958: .word ov70_0225F95C - thumb_func_end ov70_0225F940 - - thumb_func_start ov70_0225F95C -ov70_0225F95C: ; 0x0225F95C - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - mov r3, #0 - ldr r1, _0225F9B8 ; =0x00000156 - str r3, [sp] - add r5, r0, #0 - ldrh r0, [r4, r1] - mov r2, #4 - str r0, [sp, #4] - add r0, r1, #0 - sub r1, r1, #2 - sub r0, #0xa - ldrh r1, [r4, r1] - ldr r0, [r4, r0] - bl sub_02007130 - mov r1, #0xa0 - add r2, r1, #0 - add r2, #0xb6 - ldrh r2, [r4, r2] - mov r0, #4 - bl sub_02002E7C - bl sub_0207C944 - add r6, r0, #0 - bl sub_0207C920 - add r1, r0, #0 - mov r0, #0x60 - str r0, [sp] - add r0, #0xf6 - ldrh r0, [r4, r0] - mov r3, #0x16 - mov r2, #4 - str r0, [sp, #4] - add r0, r6, #0 - lsl r3, r3, #4 - bl sub_02006E84 - add r0, r5, #0 - bl sub_0200DA58 - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0225F9B8: .word 0x00000156 - thumb_func_end ov70_0225F95C - - thumb_func_start ov70_0225F9BC -ov70_0225F9BC: ; 0x0225F9BC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r1, #0 - add r5, r2, #0 - ldr r4, [sp, #0x20] - cmp r3, #0 - bne _0225F9DC - mov r3, #0 - str r3, [sp] - add r0, r5, #0 - mov r1, #0x56 - mov r2, #4 - str r4, [sp, #4] - bl sub_02007130 - b _0225F9EC -_0225F9DC: - mov r3, #0 - str r3, [sp] - add r0, r5, #0 - mov r1, #0x57 - mov r2, #4 - str r4, [sp, #4] - bl sub_02007130 -_0225F9EC: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r6, #0] - add r0, r5, #0 - mov r1, #0x36 - mov r3, #4 - bl sub_020070E8 - mov r0, #4 - mov r1, #0xa0 - add r2, r4, #0 - bl sub_02002E7C - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov70_0225F9BC - - thumb_func_start ov70_0225FA10 -ov70_0225FA10: ; 0x0225FA10 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225FA10 - - thumb_func_start ov70_0225FA14 -ov70_0225FA14: ; 0x0225FA14 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r0, [sp, #0x2c] - add r6, r3, #0 - str r0, [sp] - add r0, r1, #0 - add r1, r2, #0 - mov r2, #0 - add r3, sp, #0xc - ldr r4, [sp, #0x28] - bl sub_020071D0 - ldr r2, [sp, #0xc] - add r7, r0, #0 - ldr r0, [r2, #8] - add r2, #0xc - lsr r1, r0, #1 - mov r0, #0 - cmp r1, #0 - ble _0225FA4C -_0225FA3E: - ldrh r3, [r2] - add r0, r0, #1 - add r3, r3, r4 - strh r3, [r2] - add r2, r2, #2 - cmp r0, r1 - blt _0225FA3E -_0225FA4C: - ldr r2, [sp, #0xc] - mov r3, #0 - str r3, [sp] - ldrh r0, [r2] - lsl r1, r6, #0x18 - lsr r1, r1, #0x18 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #0] - bl sub_020198C0 - lsl r1, r6, #0x18 - ldr r0, [r5, #0] - lsr r1, r1, #0x18 - bl sub_0201C3C0 - add r0, r7, #0 - bl sub_020181C4 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0225FA14 - - thumb_func_start ov70_0225FA84 -ov70_0225FA84: ; 0x0225FA84 - push {r3, r4, r5, r6, r7, lr} - ldr r4, _0225FAA4 ; =0x0226D68C - add r7, r1, #0 - mov r6, #0 - add r5, r0, #4 -_0225FA8E: - ldr r0, [r7, #0] - add r1, r5, #0 - add r2, r4, #0 - bl sub_0201A8D4 - add r6, r6, #1 - add r4, #8 - add r5, #0x10 - cmp r6, #5 - blt _0225FA8E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225FAA4: .word 0x0226D68C - thumb_func_end ov70_0225FA84 - - thumb_func_start ov70_0225FAA8 -ov70_0225FAA8: ; 0x0225FAA8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r3, [r4, #0x54] - cmp r3, #0 - beq _0225FAB6 - bl ov70_0225FE80 -_0225FAB6: - mov r5, #0 - add r4, r4, #4 -_0225FABA: - add r0, r4, #0 - bl sub_0201A8FC - add r5, r5, #1 - add r4, #0x10 - cmp r5, #5 - blt _0225FABA - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225FAA8 - - thumb_func_start ov70_0225FACC -ov70_0225FACC: ; 0x0225FACC - bx lr - ; .align 2, 0 - thumb_func_end ov70_0225FACC - - thumb_func_start ov70_0225FAD0 -ov70_0225FAD0: ; 0x0225FAD0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #0xc] - ldr r0, [sp, #0x30] - ldr r4, [sp, #0x28] - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - add r5, r2, #0 - str r0, [sp, #0x34] - ldr r0, [sp, #0x38] - add r6, r3, #0 - str r0, [sp, #0x38] - add r0, r4, #0 - bl ov70_0225F338 - ldr r0, [sp, #0x38] - bl ov66_0222E7C8 - cmp r0, #0 - bne _0225FB1C - ldr r0, [sp, #0x40] - ldr r7, _0225FD98 ; =0x00070800 - cmp r0, #0 - bne _0225FB0E - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x34] - add r1, r6, #0 - mov r2, #0x56 - bl ov70_0225F940 - b _0225FB40 -_0225FB0E: - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x34] - add r1, r6, #0 - mov r2, #0x58 - bl ov70_0225F940 - b _0225FB40 -_0225FB1C: - ldr r0, [sp, #0x40] - mov r7, #0xc1 - lsl r7, r7, #0xa - cmp r0, #0 - bne _0225FB34 - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x34] - add r1, r6, #0 - mov r2, #0x57 - bl ov70_0225F940 - b _0225FB40 -_0225FB34: - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x34] - add r1, r6, #0 - mov r2, #0x58 - bl ov70_0225F940 -_0225FB40: - ldr r0, [r6, #0] - mov r1, #4 - mov r2, #0 - bl sub_02019F04 - ldr r0, [r6, #0] - mov r1, #5 - mov r2, #0 - bl sub_02019F04 - ldr r0, [r6, #0] - mov r1, #6 - mov r2, #0 - bl sub_02019F04 - add r0, r5, #0 - bl ov70_022602C0 - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r1, [sp, #0x30] - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x5c - mov r3, #4 - bl ov70_0225FA14 - ldr r0, [sp, #0x34] - bl sub_02025E6C - str r0, [sp, #0x10] - ldr r0, [sp, #0x38] - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x34] - bl ov66_0222E640 - mov r2, #0 - str r2, [sp] - str r2, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #0x2c - str r7, [sp, #8] - bl ov70_022602DC - ldr r0, [sp, #0x10] - bl sub_02025F24 - add r1, r0, #0 - mov r0, #2 - str r0, [sp] - add r0, r4, #0 - mov r2, #5 - mov r3, #0 - bl ov70_0225F2A8 - mov r0, #0x7a - str r0, [sp] - mov r2, #0 - ldr r0, _0225FD9C ; =0x00010200 - str r2, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #0x31 - bl ov70_02260314 - mov r2, #0 - str r2, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #0x2d - str r7, [sp, #8] - bl ov70_022602DC - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02260370 - mov r0, #0x7a - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #0 - mov r3, #0x32 - bl ov70_02260314 - add r0, r5, #0 - mov r1, #0 - bl ov70_02260360 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - mov r3, #0x2e - str r7, [sp, #8] - bl ov70_022602DC - ldr r0, [sp, #0x38] - bl ov66_0222E880 - cmp r0, #0 - bne _0225FC3E - mov r0, #0x20 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #1 - mov r3, #0x37 - bl ov70_022602DC - b _0225FC60 -_0225FC3E: - ldr r2, [sp, #0x38] - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02260380 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #1 - mov r3, #0x33 - bl ov70_022602DC -_0225FC60: - add r0, r5, #0 - mov r1, #1 - bl ov70_02260360 - ldr r0, [sp, #0x44] - cmp r0, #0 - beq _0225FD06 - mov r0, #1 - str r0, [r5, #0] - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02260370 - mov r0, #8 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #4 - mov r3, #0x38 - str r7, [sp, #8] - bl ov70_022602DC - ldr r2, [sp, #0x48] - add r0, r5, #0 - add r1, r4, #0 - bl ov70_022603B0 - mov r0, #6 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #4 - mov r3, #0x3b - bl ov70_022602DC - mov r0, #0x5a - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #4 - mov r3, #0x3c - bl ov70_022602DC - mov r0, #6 - str r0, [sp] - mov r0, #0x2c - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #4 - mov r3, #0x3d - bl ov70_022602DC - mov r0, #0x5a - str r0, [sp] - mov r0, #0x2c - str r0, [sp, #4] - ldr r0, _0225FD9C ; =0x00010200 - add r1, r4, #0 - str r0, [sp, #8] - add r0, r5, #0 - mov r2, #4 - mov r3, #0x3e - bl ov70_022602DC - add r0, r5, #0 - mov r1, #4 - bl ov70_02260360 - b _0225FD3A -_0225FD06: - mov r1, #0 - str r1, [r5, #0] - mov r0, #8 - str r0, [sp] - str r1, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r2, #4 - mov r3, #0x30 - str r7, [sp, #8] - bl ov70_022602DC - add r0, r5, #0 - mov r1, #4 - bl ov70_02260360 - ldr r0, [sp, #0x38] - ldr r2, [sp, #0x30] - str r0, [sp] - ldr r0, [sp, #0x3c] - ldr r3, [sp, #0x34] - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - bl ov70_022603CC -_0225FD3A: - ldr r0, [sp, #0x38] - bl ov66_0222E8C4 - str r0, [sp] - ldr r0, [sp, #0x4c] - ldr r2, [sp, #0x30] - str r0, [sp, #4] - ldr r3, [sp, #0x34] - add r0, r5, #0 - add r1, r6, #0 - bl ov70_0225FEF0 - ldr r0, [sp, #0x2c] - cmp r0, #1 - bne _0225FD6A - ldr r0, [sp, #0x38] - bl ov66_0222E7C8 - cmp r0, #1 - bne _0225FD66 - mov r0, #0x61 - b _0225FD70 -_0225FD66: - mov r0, #0 - b _0225FD70 -_0225FD6A: - ldr r0, [sp, #0x38] - bl ov66_0222E858 -_0225FD70: - ldr r2, [sp, #0x30] - str r0, [sp] - ldr r3, [sp, #0x34] - add r0, r5, #0 - add r1, r6, #0 - bl ov70_02260080 - ldr r0, [sp, #0x38] - ldr r3, [sp, #0x34] - str r0, [sp] - ldr r0, [sp, #0xc] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225FDA0 - ldr r0, [sp, #0x10] - bl sub_020181C4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225FD98: .word 0x00070800 -_0225FD9C: .word 0x00010200 - thumb_func_end ov70_0225FAD0 - - thumb_func_start ov70_0225FDA0 -ov70_0225FDA0: ; 0x0225FDA0 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - ldr r0, [sp, #0x48] - ldr r6, _0225FE78 ; =0x0226D624 - str r0, [sp, #0x48] - mov r0, #0 - str r0, [sp, #0x24] - ldr r0, _0225FE7C ; =0x0226D590 - add r5, r2, #0 - str r3, [sp, #0x1c] - str r0, [sp, #0x20] - mov r4, #2 -_0225FDB8: - ldr r0, [sp, #0x48] - ldr r1, [sp, #0x24] - bl ov66_0222E8E8 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - beq _0225FE60 - bl ov66_022316E8 - lsl r0, r0, #0x10 - lsr r7, r0, #0x10 - bl sub_0207C944 - str r0, [sp, #0x28] - add r0, r7, #0 - bl sub_0207C908 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - ldr r0, [sp, #0x28] - ldr r3, [sp, #0x1c] - mov r2, #1 - bl sub_02006FE8 - add r1, sp, #0x30 - str r0, [sp, #0x2c] - bl sub_020A7118 - ldr r0, [sp, #0x20] - mov r1, #6 - ldrh r0, [r0] - add r3, r1, #0 - add r3, #0xfa - str r0, [sp] - ldr r2, [sp, #0x30] - ldr r0, [r5, #0] - ldr r2, [r2, #0x14] - bl sub_0201958C - ldr r0, [sp, #0x2c] - bl sub_020181C4 - mov r0, #4 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - lsl r3, r4, #0x18 - str r6, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #4 - str r0, [sp, #0x14] - mov r0, #2 - str r0, [sp, #0x18] - ldr r0, [r5, #0] - mov r1, #6 - mov r2, #0x1a - lsr r3, r3, #0x18 - bl sub_020198E8 - add r0, r7, #0 - bl sub_0207C92C - mov r1, #4 - add r0, #0xb - str r1, [sp] - mov r1, #2 - lsl r0, r0, #0x18 - str r1, [sp, #4] - lsr r0, r0, #0x18 - str r0, [sp, #8] - lsl r3, r4, #0x18 - ldr r0, [r5, #0] - mov r1, #6 - mov r2, #0x1a - lsr r3, r3, #0x18 - bl sub_02019E2C - ldr r0, [r5, #0] - mov r1, #6 - bl sub_0201C3C0 -_0225FE60: - ldr r0, [sp, #0x20] - add r6, #0x10 - add r0, r0, #2 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - add r4, r4, #2 - add r0, r0, #1 - str r0, [sp, #0x24] - cmp r0, #2 - blt _0225FDB8 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0225FE78: .word 0x0226D624 -_0225FE7C: .word 0x0226D590 - thumb_func_end ov70_0225FDA0 - - thumb_func_start ov70_0225FE80 -ov70_0225FE80: ; 0x0225FE80 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - add r4, r2, #0 - cmp r1, #1 - bne _0225FE92 - mov r0, #0 - str r0, [r5, #0] - b _0225FE98 -_0225FE92: - add r1, r4, #0 - bl ov70_0226068C -_0225FE98: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02260048 - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02260228 - ldr r0, [r4, #0] - mov r1, #4 - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #5 - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #6 - bl sub_02019EBC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_0225FE80 - - thumb_func_start ov70_0225FEC4 -ov70_0225FEC4: ; 0x0225FEC4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov70_02260048 - ldr r0, [sp, #0x20] - add r1, r4, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov70_0225FEF0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0225FEC4 - - thumb_func_start ov70_0225FEEC -ov70_0225FEEC: ; 0x0225FEEC - ldr r0, [r0, #0] - bx lr - thumb_func_end ov70_0225FEEC - - thumb_func_start ov70_0225FEF0 -ov70_0225FEF0: ; 0x0225FEF0 - push {r4, r5, r6, r7, lr} - sub sp, #0x7c - add r5, r0, #0 - ldr r0, [sp, #0x90] - add r4, r1, #0 - add r6, r3, #0 - str r2, [sp, #0x2c] - cmp r0, #0x1b - blo _0225FF06 - bl sub_02022974 -_0225FF06: - ldr r0, [r5, #0x54] - cmp r0, #0 - beq _0225FF10 - bl sub_02022974 -_0225FF10: - ldr r0, [sp, #0x90] - mov r1, #3 - bl sub_020E2178 - add r7, r0, #0 - ldr r0, [sp, #0x90] - mov r1, #3 - bl sub_020E2178 - str r1, [sp, #0x30] - lsl r0, r7, #1 - str r0, [sp, #0x34] - mov r1, #0x64 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x34] - str r6, [sp, #8] - add r1, #0xcc - ldr r0, [r4, r1] - add r2, r7, r2 - ldr r1, [sp, #0x2c] - add r2, #0x3d - mov r3, #0 - bl sub_02009A4C - str r0, [r5, #0x58] - bl sub_0200A3DC - cmp r0, #0 - bne _0225FF52 - bl sub_02022974 -_0225FF52: - ldr r0, [r5, #0x58] - bl sub_02009D4C - mov r1, #0x64 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - str r6, [sp, #0xc] - add r1, #0xd0 - ldr r0, [r4, r1] - ldr r1, [sp, #0x2c] - mov r2, #0x59 - mov r3, #0 - bl sub_02009B04 - str r0, [r5, #0x5c] - bl sub_0200A640 - cmp r0, #0 - bne _0225FF82 - bl sub_02022974 -_0225FF82: - ldr r0, [r5, #0x5c] - bl sub_02009D4C - mov r1, #0x64 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r2, [sp, #0x34] - str r6, [sp, #8] - add r1, #0xd4 - ldr r0, [r4, r1] - add r2, r7, r2 - ldr r1, [sp, #0x2c] - add r2, #0x3c - mov r3, #0 - bl sub_02009BC4 - str r0, [r5, #0x60] - mov r1, #0x64 - str r1, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r2, [sp, #0x34] - str r6, [sp, #8] - add r1, #0xd8 - ldr r0, [r4, r1] - add r2, r7, r2 - ldr r1, [sp, #0x2c] - add r2, #0x3b - mov r3, #0 - bl sub_02009BC4 - str r0, [r5, #0x64] - mov r0, #0 - add r2, sp, #0x38 - add r1, r0, #0 - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - mov r1, #0x64 - add r2, r1, #0 - str r1, [sp] - sub r2, #0x65 - str r2, [sp, #4] - str r2, [sp, #8] - str r0, [sp, #0xc] - add r2, r1, #0 - str r0, [sp, #0x10] - add r2, #0xcc - ldr r2, [r4, r2] - add r3, r1, #0 - str r2, [sp, #0x14] - add r2, r1, #0 - add r2, #0xd0 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r1, #0 - add r2, #0xd4 - ldr r2, [r4, r2] - str r2, [sp, #0x1c] - add r2, r1, #0 - add r2, #0xd8 - ldr r2, [r4, r2] - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x58 - add r2, r1, #0 - bl sub_020093B4 - ldr r0, [r4, #4] - str r0, [sp, #0x38] - add r0, sp, #0x58 - str r0, [sp, #0x3c] - mov r0, #0x10 - str r0, [sp, #0x4c] - mov r0, #2 - str r0, [sp, #0x50] - mov r0, #0xd - lsl r0, r0, #0x10 - str r0, [sp, #0x40] - mov r0, #0x66 - lsl r0, r0, #0xe - str r0, [sp, #0x44] - add r0, sp, #0x38 - str r6, [sp, #0x54] - bl sub_02021B90 - ldr r1, [sp, #0x30] - str r0, [r5, #0x54] - bl sub_02021D6C - ldr r0, [r5, #0x54] - ldr r1, [sp, #0x94] - bl sub_02021CAC - add sp, #0x7c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_0225FEF0 - - thumb_func_start ov70_02260048 -ov70_02260048: ; 0x02260048 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x54] - add r4, r1, #0 - bl sub_02021BD4 - mov r0, #0 - str r0, [r5, #0x54] - ldr r0, [r5, #0x58] - bl sub_0200A4E4 - ldr r0, [r5, #0x5c] - bl sub_0200A6DC - mov r7, #0x13 - mov r6, #0 - lsl r7, r7, #4 -_0226006A: - ldr r0, [r4, r7] - ldr r1, [r5, #0x58] - bl sub_02009D68 - add r6, r6, #1 - add r5, r5, #4 - add r4, r4, #4 - cmp r6, #4 - blt _0226006A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02260048 - - thumb_func_start ov70_02260080 -ov70_02260080: ; 0x02260080 - push {r4, r5, r6, r7, lr} - sub sp, #0x94 - add r6, r0, #0 - ldr r0, [r6, #0x68] - add r5, r1, #0 - str r3, [sp, #0x2c] - ldr r4, [sp, #0xa8] - cmp r0, #0 - beq _02260096 - bl sub_02022974 -_02260096: - ldr r1, _02260224 ; =0x0226D724 - mov r0, #0 -_0226009A: - ldrh r2, [r1] - cmp r4, r2 - bne _022600AA - ldrh r2, [r1, #2] - str r2, [sp, #0x34] - ldrh r2, [r1, #4] - str r2, [sp, #0x30] - ldrh r7, [r1, #6] -_022600AA: - add r0, r0, #1 - add r1, #8 - cmp r0, #0x12 - blo _0226009A - ldr r0, [sp, #0x34] - mov r1, #2 - add r2, sp, #0x7c - bl sub_02076AAC - mov r1, #0x65 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - add r1, #0xcb - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x7c] - ldr r2, [sp, #0x80] - mov r3, #0 - bl sub_0200985C - str r0, [r6, #0x6c] - bl sub_0200A3DC - cmp r0, #0 - bne _022600E4 - bl sub_02022974 -_022600E4: - mov r1, #0x65 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r0, [sp, #0x2c] - add r1, #0xcf - str r0, [sp, #0xc] - ldr r0, [r5, r1] - ldr r1, [sp, #0x7c] - ldr r2, [sp, #0x84] - mov r3, #0 - bl sub_020098B8 - str r0, [r6, #0x70] - bl sub_02009E34 - bl ov70_02260268 - ldr r0, [r6, #0x70] - bl sub_0200A640 - cmp r0, #0 - bne _0226011A - bl sub_02022974 -_0226011A: - ldr r0, [r6, #0x70] - bl sub_02009D4C - mov r1, #0x65 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - add r1, #0xd3 - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x7c] - ldr r2, [sp, #0x88] - mov r3, #0 - bl sub_02009918 - str r0, [r6, #0x74] - mov r1, #0x65 - str r1, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - add r1, #0xd7 - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x7c] - ldr r2, [sp, #0x8c] - mov r3, #0 - bl sub_02009918 - str r0, [r6, #0x78] - mov r0, #0 - add r2, sp, #0x38 - add r1, r0, #0 - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - stmia r2!, {r0, r1} - mov r1, #0x65 - add r2, r1, #0 - str r1, [sp] - sub r2, #0x66 - str r2, [sp, #4] - str r2, [sp, #8] - mov r2, #1 - str r2, [sp, #0xc] - mov r2, #3 - str r2, [sp, #0x10] - add r2, r1, #0 - add r2, #0xcb - ldr r2, [r5, r2] - add r3, r1, #0 - str r2, [sp, #0x14] - add r2, r1, #0 - add r2, #0xcf - ldr r2, [r5, r2] - str r2, [sp, #0x18] - add r2, r1, #0 - add r2, #0xd3 - ldr r2, [r5, r2] - str r2, [sp, #0x1c] - add r2, r1, #0 - add r2, #0xd7 - ldr r2, [r5, r2] - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x58 - add r2, r1, #0 - bl sub_020093B4 - ldr r0, [r5, #4] - str r0, [sp, #0x38] - add r0, sp, #0x58 - str r0, [sp, #0x3c] - mov r0, #0x20 - str r0, [sp, #0x4c] - mov r0, #2 - str r0, [sp, #0x50] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x54] - ldr r0, [sp, #0x30] - cmp r0, #0 - beq _022601D4 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _022601E2 -_022601D4: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_022601E2: - bl sub_020E1740 - str r0, [sp, #0x40] - cmp r7, #0 - beq _022601FE - lsl r0, r7, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226020C -_022601FE: - lsl r0, r7, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226020C: - bl sub_020E1740 - mov r1, #1 - lsl r1, r1, #0x14 - add r0, r0, r1 - str r0, [sp, #0x44] - add r0, sp, #0x38 - bl sub_02021B90 - str r0, [r6, #0x68] - add sp, #0x94 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02260224: .word 0x0226D724 - thumb_func_end ov70_02260080 - - thumb_func_start ov70_02260228 -ov70_02260228: ; 0x02260228 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x68] - add r4, r1, #0 - bl sub_02021F98 - bl sub_0201ED1C - ldr r0, [r5, #0x68] - bl sub_02021BD4 - mov r0, #0 - str r0, [r5, #0x68] - ldr r0, [r5, #0x6c] - bl sub_0200A4E4 - ldr r0, [r5, #0x70] - bl sub_0200A6DC - mov r7, #0x13 - mov r6, #0 - lsl r7, r7, #4 -_02260254: - ldr r0, [r4, r7] - ldr r1, [r5, #0x6c] - bl sub_02009D68 - add r6, r6, #1 - add r5, r5, #4 - add r4, r4, #4 - cmp r6, #4 - blt _02260254 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02260228 - - thumb_func_start ov70_02260268 -ov70_02260268: ; 0x02260268 - push {r4, r5, r6, r7} - ldr r1, [r0, #8] - ldr r4, [r0, #0xc] - lsr r3, r1, #1 - mov r2, #0 - cmp r3, #0 - ble _022602BC - mov r5, #0xc8 -_02260278: - ldrh r6, [r4] - mov r0, #0x1f - add r2, r2, #1 - add r1, r6, #0 - asr r7, r6, #5 - and r1, r0 - and r0, r7 - asr r7, r6, #0xa - mov r6, #0x1f - and r6, r7 - mov r7, #0x1d - mul r7, r6 - mov r6, #0x4c - mul r6, r1 - mov r1, #0x97 - mul r1, r0 - add r0, r6, r1 - add r0, r7, r0 - asr r6, r0, #8 - lsl r0, r6, #8 - add r7, r6, #0 - asr r1, r0, #8 - lsl r0, r6, #7 - mul r7, r5 - asr r0, r0, #8 - asr r6, r7, #8 - lsl r0, r0, #0xa - lsl r6, r6, #5 - orr r0, r6 - orr r0, r1 - strh r0, [r4] - add r4, r4, #2 - cmp r2, r3 - blt _02260278 -_022602BC: - pop {r4, r5, r6, r7} - bx lr - thumb_func_end ov70_02260268 - - thumb_func_start ov70_022602C0 -ov70_022602C0: ; 0x022602C0 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r0, #4 - add r6, r4, #0 -_022602C8: - add r0, r5, #0 - add r1, r6, #0 - bl sub_0201ADA4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #5 - blt _022602C8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_022602C0 - - thumb_func_start ov70_022602DC -ov70_022602DC: ; 0x022602DC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r2, #0 - add r0, r1, #0 - mov r1, #1 - add r2, r3, #0 - bl ov70_0225F288 - add r3, sp, #0x10 - add r2, r0, #0 - ldrb r0, [r3, #0x14] - mov r1, #0 - add r5, r5, #4 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x28] - str r0, [sp, #8] - str r1, [sp, #0xc] - lsl r0, r4, #4 - ldrb r3, [r3, #0x10] - add r0, r5, r0 - bl sub_0201D78C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_022602DC - - thumb_func_start ov70_02260314 -ov70_02260314: ; 0x02260314 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r4, r2, #0 - add r0, r1, #0 - mov r1, #1 - add r2, r3, #0 - bl ov70_0225F288 - add r6, r0, #0 - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - bl sub_02002D7C - add r1, sp, #0x10 - ldrb r1, [r1, #0x10] - sub r3, r1, r0 - bpl _0226033C - mov r3, #0 -_0226033C: - add r0, sp, #0x10 - ldrb r0, [r0, #0x14] - add r2, r5, #4 - mov r1, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, [sp, #0x28] - str r0, [sp, #8] - lsl r0, r4, #4 - add r0, r2, r0 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02260314 - - thumb_func_start ov70_02260360 -ov70_02260360: ; 0x02260360 - ldr r3, _0226036C ; =sub_0201A9A4 - add r2, r0, #4 - lsl r0, r1, #4 - add r0, r2, r0 - bx r3 - nop -_0226036C: .word sub_0201A9A4 - thumb_func_end ov70_02260360 - - thumb_func_start ov70_02260370 -ov70_02260370: ; 0x02260370 - ldr r3, _0226037C ; =ov70_0225F2C8 - add r0, r1, #0 - add r1, r2, #0 - mov r2, #0 - bx r3 - nop -_0226037C: .word ov70_0225F2C8 - thumb_func_end ov70_02260370 - - thumb_func_start ov70_02260380 -ov70_02260380: ; 0x02260380 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r0, r6, #0 - add r5, r1, #0 - bl ov66_0222E880 - add r4, r0, #0 - add r0, r6, #0 - bl ov66_0222E8A4 - add r6, r0, #0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_0225F308 - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - mov r3, #1 - bl ov70_0225F318 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02260380 - - thumb_func_start ov70_022603B0 -ov70_022603B0: ; 0x022603B0 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r2, #0 - mov r4, #0 -_022603B8: - ldrh r2, [r5] - add r0, r6, #0 - add r1, r4, #0 - bl ov70_0225F32C - add r4, r4, #1 - add r5, r5, #2 - cmp r4, #4 - blt _022603B8 - pop {r4, r5, r6, pc} - thumb_func_end ov70_022603B0 - - thumb_func_start ov70_022603CC -ov70_022603CC: ; 0x022603CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x98 - add r7, r0, #0 - ldr r0, [sp, #0xb0] - add r5, r1, #0 - str r0, [sp, #0xb0] - mov r0, #0xc0 - add r1, r3, #0 - str r2, [sp, #0x2c] - str r3, [sp, #0x30] - bl sub_02006C24 - str r0, [sp, #0x50] - ldr r0, [sp, #0xb4] - bl ov66_0222E798 - str r0, [sp, #0x44] - ldr r0, [sp, #0xb4] - bl ov66_0222E7C8 - str r0, [sp, #0x4c] - ldr r0, _0226067C ; =0x0226D60C - mov r6, #0 - str r0, [sp, #0x40] - ldr r0, _02260680 ; =0x0226D59C - add r4, r7, #0 - str r0, [sp, #0x3c] - ldr r0, _02260684 ; =0x0226D594 - str r0, [sp, #0x38] -_02260406: - cmp r6, #2 - bne _02260426 - ldr r0, [sp, #0x4c] - cmp r0, #1 - bne _02260446 - add r1, r4, #0 - add r1, #0xac - mov r0, #0 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xfc - str r0, [r1, #0] - b _022604EC -_02260426: - cmp r6, #3 - bne _02260446 - ldr r0, [sp, #0x4c] - cmp r0, #0 - bne _02260446 - add r1, r4, #0 - add r1, #0xac - mov r0, #0 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xfc - str r0, [r1, #0] - b _022604EC -_02260446: - ldr r0, [sp, #0x40] - ldrh r0, [r0] - cmp r0, #0xc0 - bne _02260454 - ldr r0, [sp, #0x50] - str r0, [sp, #0x34] - b _02260458 -_02260454: - ldr r0, [sp, #0x2c] - str r0, [sp, #0x34] -_02260458: - add r0, r6, #0 - add r0, #0x96 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x40] - ldr r2, [sp, #0x40] - ldrh r0, [r0, #4] - ldr r1, [sp, #0x34] - mov r3, #0 - str r0, [sp, #8] - ldr r0, [sp, #0x30] - str r0, [sp, #0xc] - mov r0, #0x4d - lsl r0, r0, #2 - ldrh r2, [r2, #2] - ldr r0, [r5, r0] - bl sub_02009B04 - add r1, r4, #0 - add r1, #0xac - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_0200A640 - cmp r0, #0 - bne _02260496 - bl sub_02022974 -_02260496: - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_02009D4C - add r0, r6, #0 - add r0, #0x96 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x3c] - str r0, [sp, #8] - mov r0, #0x4e - lsl r0, r0, #2 - ldrh r2, [r2] - ldr r0, [r5, r0] - ldr r1, [sp, #0x34] - mov r3, #0 - bl sub_02009BC4 - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - add r0, r6, #0 - add r0, #0x96 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x38] - str r0, [sp, #8] - mov r0, #0x4f - lsl r0, r0, #2 - ldrh r2, [r2] - ldr r0, [r5, r0] - ldr r1, [sp, #0x34] - mov r3, #0 - bl sub_02009BC4 - add r1, r4, #0 - add r1, #0xfc - str r0, [r1, #0] -_022604EC: - ldr r0, [sp, #0x40] - add r6, r6, #1 - add r0, r0, #6 - str r0, [sp, #0x40] - ldr r0, [sp, #0x3c] - add r4, r4, #4 - add r0, r0, #2 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x38] - add r0, r0, #2 - str r0, [sp, #0x38] - cmp r6, #4 - bge _02260508 - b _02260406 -_02260508: - ldr r0, _02260688 ; =0x0226D7B4 - mov r6, #0 - str r0, [sp, #0x48] -_0226050E: - ldr r0, [sp, #0xb0] - add r1, r6, #0 - bl ov66_0222E728 - add r4, r0, #0 - ldr r0, [sp, #0xb0] - add r1, r6, #0 - bl ov66_0222E760 - add r1, r0, #0 - cmp r4, #0x18 - bne _02260532 - add r1, r7, #0 - add r1, #0xbc - mov r0, #0 - str r0, [r1, #0] - str r0, [r7, #0x7c] - b _02260660 -_02260532: - ldr r2, [sp, #0x44] - ldr r3, [sp, #0x4c] - add r0, r4, #0 - bl ov70_02260728 - add r4, r0, #0 - ldrb r0, [r4] - cmp r0, #1 - bne _02260548 - ldr r1, [sp, #0x2c] - b _0226054A -_02260548: - ldr r1, [sp, #0x50] -_0226054A: - add r0, r6, #0 - add r0, #0x96 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - mov r3, #0 - str r0, [sp, #8] - mov r0, #0x13 - lsl r0, r0, #4 - ldrh r2, [r4, #2] - ldr r0, [r5, r0] - bl sub_02009A4C - add r1, r7, #0 - add r1, #0xbc - str r0, [r1, #0] - add r0, r7, #0 - add r0, #0xbc - ldr r0, [r0, #0] - bl sub_0200A3DC - cmp r0, #0 - bne _0226057E - bl sub_02022974 -_0226057E: - add r0, r7, #0 - add r0, #0xbc - ldr r0, [r0, #0] - bl sub_02009D4C - ldrb r2, [r4] - mov r0, #0 - mvn r0, r0 - add r2, #0x96 - str r2, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0x13 - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r6, #0 - str r0, [sp, #0x14] - mov r0, #0x4d - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, #0x96 - str r0, [sp, #0x18] - mov r0, #0x4e - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r3, r2, #0 - str r0, [sp, #0x1c] - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0x54 - bl sub_020093B4 - ldr r0, [r5, #4] - ldr r2, [sp, #0x48] - str r0, [sp, #0x78] - add r0, sp, #0x54 - str r0, [sp, #0x7c] - mov r0, #0 - str r0, [sp, #0x8c] - mov r0, #2 - str r0, [sp, #0x90] - ldr r0, [sp, #0x30] - add r3, sp, #0x80 - str r0, [sp, #0x94] - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - mov r0, #4 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _02260608 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _02260616 -_02260608: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_02260616: - bl sub_020E1740 - ldr r1, [sp, #0x80] - add r0, r1, r0 - str r0, [sp, #0x80] - mov r0, #6 - ldrsh r0, [r4, r0] - cmp r0, #0 - ble _0226063A - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _02260648 -_0226063A: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_02260648: - bl sub_020E1740 - ldr r1, [sp, #0x84] - add r0, r1, r0 - str r0, [sp, #0x84] - add r0, sp, #0x78 - bl sub_02021B90 - str r0, [r7, #0x7c] - ldrb r1, [r4, #1] - bl sub_02021F24 -_02260660: - ldr r0, [sp, #0x48] - add r6, r6, #1 - add r0, #0xc - add r7, r7, #4 - str r0, [sp, #0x48] - cmp r6, #0xc - bge _02260670 - b _0226050E -_02260670: - ldr r0, [sp, #0x50] - bl sub_02006CA8 - add sp, #0x98 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226067C: .word 0x0226D60C -_02260680: .word 0x0226D59C -_02260684: .word 0x0226D594 -_02260688: .word 0x0226D7B4 - thumb_func_end ov70_022603CC - - thumb_func_start ov70_0226068C -ov70_0226068C: ; 0x0226068C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r7, #0 - add r4, r5, #0 -_02260696: - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - cmp r0, #0 - beq _022606CC - ldr r0, [r4, #0x7c] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0x7c] - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - bl sub_0200A4E4 - mov r0, #0x13 - add r1, r4, #0 - lsl r0, r0, #4 - add r1, #0xbc - ldr r0, [r6, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - add r1, r4, #0 - add r1, #0xbc - mov r0, #0 - str r0, [r1, #0] -_022606CC: - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #0xc - blt _02260696 - mov r4, #0 - add r7, r4, #0 -_022606D8: - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r0, #0 - beq _0226071C - bl sub_0200A6DC - mov r0, #0x4d - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xac - ldr r0, [r6, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x4e - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xec - ldr r0, [r6, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - mov r0, #0x4f - add r1, r5, #0 - lsl r0, r0, #2 - add r1, #0xfc - ldr r0, [r6, r0] - ldr r1, [r1, #0] - bl sub_02009D68 - add r0, r5, #0 - add r0, #0xac - str r7, [r0, #0] -_0226071C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _022606D8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226068C - - thumb_func_start ov70_02260728 -ov70_02260728: ; 0x02260728 - cmp r1, r2 - bne _02260734 - ldr r1, _0226073C ; =0x0226D5FC - lsl r0, r3, #3 - add r0, r1, r0 - bx lr -_02260734: - ldr r1, _02260740 ; =0x0226D844 - lsl r0, r0, #3 - add r0, r1, r0 - bx lr - ; .align 2, 0 -_0226073C: .word 0x0226D5FC -_02260740: .word 0x0226D844 - thumb_func_end ov70_02260728 - - thumb_func_start ov70_02260744 -ov70_02260744: ; 0x02260744 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #4] - ldr r0, [r1, #0] - ldr r1, [sp, #4] - str r2, [sp, #8] - ldr r2, _0226079C ; =0x0226D5A4 - add r1, #0xc - add r7, r3, #0 - bl sub_0201A8D4 - ldr r4, [sp, #4] - ldr r5, [sp, #4] - mov r6, #0 - add r4, #0x2c -_02260762: - add r1, r6, #0 - ldr r0, [sp, #8] - add r1, #0x38 - mov r2, #0 - add r3, r4, #0 - str r7, [sp] - bl sub_020071D0 - str r0, [r5, #0x20] - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #3 - blt _02260762 - ldr r0, _022607A0 ; =0x0226D58C - ldr r2, _022607A4 ; =ov70_02260A50 - ldr r3, [sp, #4] - mov r1, #1 - str r7, [sp] - bl sub_02023FCC - ldr r1, [sp, #4] - str r0, [r1, #0x1c] - ldr r0, [sp, #4] - mov r1, #1 - strh r1, [r0, #6] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226079C: .word 0x0226D5A4 -_022607A0: .word 0x0226D58C -_022607A4: .word ov70_02260A50 - thumb_func_end ov70_02260744 - - thumb_func_start ov70_022607A8 -ov70_022607A8: ; 0x022607A8 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0x1c] - bl sub_02024034 - add r0, r6, #0 - add r0, #0xc - bl sub_0201A8FC - mov r4, #0 - add r5, r6, #0 -_022607BE: - ldr r0, [r5, #0x20] - bl sub_020181C4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _022607BE - mov r0, #0 - strb r0, [r6, #2] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_022607A8 - - thumb_func_start ov70_022607D4 -ov70_022607D4: ; 0x022607D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #4] - ldrh r0, [r5, #6] - add r6, r1, #0 - add r7, r2, #0 - add r4, r3, #0 - cmp r0, #0 - bne _022607F2 - ldr r0, [r5, #0x1c] - bl sub_0202404C - b _022607F6 -_022607F2: - mov r0, #1 - strb r0, [r5, #3] -_022607F6: - ldrb r0, [r5, #2] - cmp r0, #1 - bne _02260812 - mov r2, #0 - ldrsh r0, [r5, r2] - cmp r0, #0 - bne _02260812 - strb r2, [r5, #2] - add r0, r5, #0 - add r1, r6, #0 - add r3, r7, #0 - str r4, [sp] - bl ov70_022609D4 -_02260812: - ldrb r1, [r5, #3] - ldrh r0, [r5, #4] - cmp r1, r0 - beq _02260868 - strh r1, [r5, #4] - ldrb r0, [r5, #3] - cmp r0, #2 - bne _02260832 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - add r3, r7, #0 - str r4, [sp] - bl ov70_022609D4 - b _02260854 -_02260832: - ldrb r0, [r5, #2] - cmp r0, #0 - str r4, [sp] - bne _02260848 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - add r3, r7, #0 - bl ov70_022609D4 - b _02260854 -_02260848: - add r0, r5, #0 - add r1, r6, #0 - mov r2, #2 - add r3, r7, #0 - bl ov70_022609D4 -_02260854: - ldrb r0, [r5, #2] - cmp r0, #0 - bne _02260868 - ldrb r0, [r5, #3] - cmp r0, #2 - bne _02260868 - mov r0, #1 - strb r0, [r5, #2] - str r0, [sp, #4] - strh r0, [r5] -_02260868: - ldr r0, [sp, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_022607D4 - - thumb_func_start ov70_02260870 -ov70_02260870: ; 0x02260870 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r6, r1, #0 - ldr r4, [sp, #0x34] - str r0, [sp, #8] - ldr r7, [sp, #0x30] - str r3, [sp, #0x14] - str r4, [sp, #0xc] - str r2, [sp, #0x10] - ldr r2, [r6, #0] - add r0, r7, #0 - mov r1, #0x37 - mov r3, #4 - bl sub_0200710C - mov r0, #0 - strh r0, [r5, #8] - ldr r0, [sp, #0x14] - bl ov66_0222E8C4 - strh r0, [r5, #0xa] - mov r0, #5 - lsl r0, r0, #6 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldrh r1, [r5, #0xa] - ldr r2, [r6, #0] - add r0, r7, #0 - mov r3, #6 - bl sub_020070E8 - mov r0, #5 - lsl r0, r0, #6 - str r0, [sp] - str r4, [sp, #4] - ldrh r2, [r5, #0xa] - add r0, r6, #0 - add r1, r7, #0 - add r2, #0x1b - mov r3, #6 - bl ov70_0225FA14 - ldr r0, [sp, #0x10] - mov r1, #1 - mov r2, #0x3f - bl ov70_0225F288 - str r0, [sp, #0x18] - add r0, r5, #0 - add r0, #0xc - mov r1, #0 - bl sub_0201ADA4 - mov r0, #4 - str r0, [sp] - mov r1, #0 - ldr r0, _0226092C ; =0x000F0E00 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - ldr r2, [sp, #0x18] - str r1, [sp, #0xc] - add r0, #0xc - add r3, r1, #0 - bl sub_0201D78C - ldrb r0, [r5, #2] - cmp r0, #0 - str r4, [sp] - bne _0226091A - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - add r3, r7, #0 - bl ov70_022609D4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} -_0226091A: - add r0, r5, #0 - add r1, r6, #0 - mov r2, #2 - add r3, r7, #0 - bl ov70_022609D4 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0226092C: .word 0x000F0E00 - thumb_func_end ov70_02260870 - - thumb_func_start ov70_02260930 -ov70_02260930: ; 0x02260930 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r2, #0 - add r5, r0, #0 - add r6, r1, #0 - str r3, [sp, #0x10] - ldr r4, [sp, #0x28] - cmp r7, #3 - blo _02260946 - bl sub_02022974 -_02260946: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldr r0, [sp, #0x10] - ldr r2, [r6, #0] - mov r1, #0x37 - mov r3, #4 - bl sub_0200710C - mov r0, #1 - strh r0, [r5, #8] - mov r0, #5 - strh r7, [r5, #0xa] - lsl r0, r0, #6 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldrh r1, [r5, #0xa] - ldr r0, [sp, #0x10] - ldr r2, [r6, #0] - add r1, #0x5d - mov r3, #6 - bl sub_020070E8 - ldrb r0, [r5, #2] - cmp r0, #0 - str r4, [sp] - bne _02260996 - ldr r3, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - bl ov70_022609D4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_02260996: - ldr r3, [sp, #0x10] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #2 - bl ov70_022609D4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02260930 - - thumb_func_start ov70_022609A8 -ov70_022609A8: ; 0x022609A8 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0] - mov r1, #4 - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #5 - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #6 - bl sub_02019EBC - ldr r0, [r4, #0] - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_022609A8 - - thumb_func_start ov70_022609D4 -ov70_022609D4: ; 0x022609D4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0x20 - add r4, r1, #0 - add r6, r2, #0 - str r0, [sp] - mov r1, #0x15 - str r1, [sp, #4] - lsl r1, r6, #2 - add r1, r5, r1 - ldr r1, [r1, #0x2c] - add r7, r3, #0 - add r1, #0xc - str r1, [sp, #8] - mov r2, #0 - str r2, [sp, #0xc] - mov r3, #3 - str r3, [sp, #0x10] - str r0, [sp, #0x14] - str r0, [sp, #0x18] - ldr r0, [r4, #0] - mov r1, #5 - bl sub_020198E8 - ldr r0, [r4, #0] - mov r1, #5 - bl sub_0201C3C0 - ldrh r0, [r5, #8] - cmp r0, #1 - bne _02260A34 - mov r0, #5 - lsl r0, r0, #6 - str r0, [sp] - ldr r0, [sp, #0x30] - ldr r2, _02260A48 ; =0x0226D584 - str r0, [sp, #4] - ldrh r3, [r5, #0xa] - ldrb r2, [r2, r6] - add r0, r4, #0 - lsl r3, r3, #1 - add r2, r2, r3 - add r1, r7, #0 - add r2, #0x60 - mov r3, #6 - bl ov70_0225FA14 -_02260A34: - ldr r3, _02260A4C ; =0x0226D588 - ldr r0, [r4, #0] - ldrsb r3, [r3, r6] - mov r1, #6 - mov r2, #3 - bl sub_0201C63C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_02260A48: .word 0x0226D584 -_02260A4C: .word 0x0226D588 - thumb_func_end ov70_022609D4 - - thumb_func_start ov70_02260A50 -ov70_02260A50: ; 0x02260A50 - strb r1, [r2, #3] - ldrb r0, [r2, #3] - cmp r0, #0 - bne _02260A5E - mov r0, #2 - strb r0, [r2, #3] - bx lr -_02260A5E: - cmp r0, #3 - bne _02260A66 - mov r0, #1 - strb r0, [r2, #3] -_02260A66: - bx lr - thumb_func_end ov70_02260A50 - - thumb_func_start ov70_02260A68 -ov70_02260A68: ; 0x02260A68 - mov r1, #0 - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02260A68 - - thumb_func_start ov70_02260A70 -ov70_02260A70: ; 0x02260A70 - push {r4, r5, lr} - sub sp, #0xc - mov r1, #0x14 - add r5, r0, #0 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x14 - mov r0, #0 -_02260A84: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _02260A84 - add r0, r5, #0 - bl sub_020203AC - str r0, [r4, #0] - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r1, _02260AC8 ; =0x0029AEC1 - str r0, [sp, #8] - add r0, r4, #0 - ldr r2, _02260ACC ; =0x0226D904 - ldr r3, _02260AD0 ; =0x000005C1 - add r0, #8 - bl sub_020206D0 - ldr r0, [r4, #0] - bl sub_020203D4 - mov r0, #0x96 - mov r1, #0xe1 - ldr r2, [r4, #0] - lsl r0, r0, #0xc - lsl r1, r1, #0xe - bl sub_020206BC - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02260AC8: .word 0x0029AEC1 -_02260ACC: .word 0x0226D904 -_02260AD0: .word 0x000005C1 - thumb_func_end ov70_02260A70 - - thumb_func_start ov70_02260AD4 -ov70_02260AD4: ; 0x02260AD4 - push {r4, lr} - add r4, r0, #0 - bl sub_020203E0 - ldr r0, [r4, #0] - bl sub_020203B8 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02260AD4 - - thumb_func_start ov70_02260AEC -ov70_02260AEC: ; 0x02260AEC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _02260B10 - add r1, r4, #0 - add r1, #8 - bl ov70_0225D054 - mov r0, #2 - ldr r1, [r4, #8] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [r4, #8] - ldr r1, [r4, #0x10] - lsl r0, r0, #2 - sub r0, r1, r0 - str r0, [r4, #0x10] -_02260B10: - bl sub_020203EC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02260AEC - - thumb_func_start ov70_02260B18 -ov70_02260B18: ; 0x02260B18 - str r1, [r0, #8] - str r2, [r0, #0xc] - str r3, [r0, #0x10] - bx lr - thumb_func_end ov70_02260B18 - - thumb_func_start ov70_02260B20 -ov70_02260B20: ; 0x02260B20 - push {r3, r4} - mov r4, #2 - lsl r4, r4, #0xe - add r1, r1, r4 - str r1, [r0, #8] - lsl r1, r4, #2 - str r2, [r0, #0xc] - sub r1, r3, r1 - str r1, [r0, #0x10] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov70_02260B20 - - thumb_func_start ov70_02260B38 -ov70_02260B38: ; 0x02260B38 - str r1, [r0, #4] - bx lr - thumb_func_end ov70_02260B38 - - thumb_func_start ov70_02260B3C -ov70_02260B3C: ; 0x02260B3C - mov r1, #0 - str r1, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02260B3C - - thumb_func_start ov70_02260B44 -ov70_02260B44: ; 0x02260B44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r1, #0 - add r5, r0, #0 - ldr r1, _02260BB4 ; =0x000004A4 - add r0, r2, #0 - str r2, [sp] - bl sub_02018144 - ldr r2, _02260BB4 ; =0x000004A4 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0xb4 - mul r0, r5 - str r0, [sp, #4] - ldr r0, [sp] - ldr r1, [sp, #4] - bl sub_02018144 - mov r1, #0x47 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xe4 - add r7, r6, #0 - mul r7, r0 - ldr r0, [sp] - add r1, r7, #0 - bl sub_02018144 - mov r1, #0x12 - lsl r1, r1, #4 - str r0, [r4, r1] - sub r0, r1, #4 - ldr r0, [r4, r0] - ldr r2, [sp, #4] - mov r1, #0 - bl sub_020D5124 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - add r2, r7, #0 - bl sub_020D5124 - mov r0, #0x49 - lsl r0, r0, #2 - strb r5, [r4, r0] - add r0, r0, #1 - strb r6, [r4, r0] - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02260BB4: .word 0x000004A4 - thumb_func_end ov70_02260B44 - - thumb_func_start ov70_02260BB8 -ov70_02260BB8: ; 0x02260BB8 - push {r4, lr} - mov r1, #0x4a - add r4, r0, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - beq _02260BCA - bl ov70_02260D80 -_02260BCA: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02260BB8 - - thumb_func_start ov70_02260BE8 -ov70_02260BE8: ; 0x02260BE8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x4b - add r5, r0, #0 - lsl r1, r1, #2 - add r1, r5, r1 - bl ov70_022616B0 - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - ble _02260C24 - mov r7, #0x71 - add r6, r4, #0 - lsl r7, r7, #2 -_02260C08: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r5, r7 - add r0, r0, r6 - bl ov70_02261968 - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - add r4, r4, #1 - add r6, #0xb4 - cmp r4, r0 - blt _02260C08 -_02260C24: - ldr r0, _02260C4C ; =0x00000125 - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _02260C4A - ldr r7, _02260C4C ; =0x00000125 - add r4, r6, #0 -_02260C32: - mov r1, #0x12 - lsl r1, r1, #4 - ldr r1, [r5, r1] - add r0, r5, #0 - add r1, r1, r4 - bl ov70_02261C60 - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, #0xe4 - cmp r6, r0 - blt _02260C32 -_02260C4A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02260C4C: .word 0x00000125 - thumb_func_end ov70_02260BE8 - - thumb_func_start ov70_02260C50 -ov70_02260C50: ; 0x02260C50 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bne _02260C5A - bl sub_02022974 -_02260C5A: - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - bne _02260C68 - bl sub_02022974 -_02260C68: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _02260C76 - bl sub_02022974 -_02260C76: - mov r1, #0x4b - lsl r1, r1, #2 - add r0, r5, #0 - add r1, r5, r1 - bl ov70_022616FC - ldr r0, _02260CDC ; =0x00000125 - mov r4, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _02260CAC - mov r7, #0xa7 - add r6, r4, #0 - lsl r7, r7, #2 -_02260C92: - mov r1, #0x12 - lsl r1, r1, #4 - ldr r1, [r5, r1] - add r0, r5, r7 - add r1, r1, r6 - bl ov70_02261C04 - ldr r0, _02260CDC ; =0x00000125 - add r4, r4, #1 - ldrb r0, [r5, r0] - add r6, #0xe4 - cmp r4, r0 - blt _02260C92 -_02260CAC: - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - ble _02260CDA - mov r7, #0x71 - add r6, r4, #0 - lsl r7, r7, #2 -_02260CBE: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r5, r7 - add r0, r0, r6 - bl ov70_022619F4 - mov r0, #0x49 - lsl r0, r0, #2 - ldrb r0, [r5, r0] - add r4, r4, #1 - add r6, #0xb4 - cmp r4, r0 - blt _02260CBE -_02260CDA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02260CDC: .word 0x00000125 - thumb_func_end ov70_02260C50 - - thumb_func_start ov70_02260CE0 -ov70_02260CE0: ; 0x02260CE0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_02260CE0 - - thumb_func_start ov70_02260CE4 -ov70_02260CE4: ; 0x02260CE4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02260D78 ; =0x00000127 - add r7, r3, #0 - strb r2, [r5, r0] - sub r0, r0, #1 - strb r1, [r5, r0] - add r0, r1, #0 - add r1, r2, #0 - add r2, r7, #0 - ldr r4, [sp, #0x18] - bl ov70_022613F4 - add r6, r0, #0 - mov r0, #0xaf - add r1, r7, #0 - bl sub_02006C24 - add r7, r0, #0 - ldr r0, _02260D7C ; =0x00000494 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #4 - bl sub_020182CC - ldr r0, _02260D7C ; =0x00000494 - add r1, r7, #0 - add r0, r5, r0 - str r0, [sp] - mov r0, #0x4b - lsl r0, r0, #2 - add r0, r5, r0 - add r2, r6, #0 - add r3, r4, #0 - bl ov70_022614F4 - mov r0, #0xa7 - ldr r2, _02260D7C ; =0x00000494 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r7, #0 - add r2, r5, r2 - add r3, r6, #0 - str r4, [sp] - bl ov70_02261B24 - mov r0, #0x71 - ldr r2, _02260D7C ; =0x00000494 - lsl r0, r0, #2 - add r0, r5, r0 - add r1, r7, #0 - add r2, r5, r2 - add r3, r6, #0 - str r4, [sp] - bl ov70_0226174C - add r0, r7, #0 - bl sub_02006CA8 - add r0, r6, #0 - bl ov70_02261418 - mov r1, #0x4b - lsl r1, r1, #2 - add r0, r5, #0 - add r1, r5, r1 - bl ov70_022615E8 - mov r0, #0x4a - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - pop {r3, r4, r5, r6, r7, pc} - nop -_02260D78: .word 0x00000127 -_02260D7C: .word 0x00000494 - thumb_func_end ov70_02260CE4 - - thumb_func_start ov70_02260D80 -ov70_02260D80: ; 0x02260D80 - push {r4, lr} - mov r1, #0x4b - add r4, r0, #0 - lsl r1, r1, #2 - add r1, r4, r1 - bl ov70_02261664 - mov r0, #0x4b - ldr r1, _02260DC4 ; =0x00000494 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, r1 - bl ov70_022615A4 - mov r0, #0xa7 - ldr r1, _02260DC4 ; =0x00000494 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, r1 - bl ov70_02261BB4 - mov r0, #0x71 - ldr r1, _02260DC4 ; =0x00000494 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, r1 - bl ov70_022618C8 - mov r0, #0x4a - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} - nop -_02260DC4: .word 0x00000494 - thumb_func_end ov70_02260D80 - - thumb_func_start ov70_02260DC8 -ov70_02260DC8: ; 0x02260DC8 - push {r3, lr} - mov r2, #7 - add r1, r0, #0 - lsl r2, r2, #6 - ldr r0, [r1, r2] - cmp r0, #1 - bne _02260DF2 - add r0, r2, #0 - sub r0, #0xbc - ldr r0, [r1, r0] - cmp r0, #0 - bne _02260DF2 - add r0, r2, #0 - mov r3, #1 - sub r0, #0xbc - str r3, [r1, r0] - sub r2, #0x24 - add r0, r1, #4 - add r1, r1, r2 - bl sub_0201727C -_02260DF2: - pop {r3, pc} - thumb_func_end ov70_02260DC8 - - thumb_func_start ov70_02260DF4 -ov70_02260DF4: ; 0x02260DF4 - push {r4, lr} - mov r1, #7 - add r4, r0, #0 - lsl r1, r1, #6 - ldr r0, [r4, r1] - cmp r0, #1 - bne _02260E1E - add r0, r1, #0 - sub r0, #0xbc - ldr r0, [r4, r0] - cmp r0, #1 - bne _02260E1E - sub r1, #0x24 - add r0, r4, #4 - add r1, r4, r1 - bl sub_02017288 - mov r0, #0x41 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_02260E1E: - pop {r4, pc} - thumb_func_end ov70_02260DF4 - - thumb_func_start ov70_02260E20 -ov70_02260E20: ; 0x02260E20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r7, r0, #0 - add r6, r2, #0 - str r3, [sp] - cmp r5, #2 - ble _02260E34 - bl sub_02022974 -_02260E34: - cmp r6, #3 - ble _02260E3C - bl sub_02022974 -_02260E3C: - add r0, r7, #0 - bl ov70_02261718 - mov r1, #0x71 - lsl r1, r1, #2 - add r4, r0, #0 - add r2, r7, r1 - lsl r1, r5, #4 - add r0, r4, #4 - add r1, r2, r1 - bl sub_02017258 - add r0, r4, #4 - mov r1, #1 - bl sub_02017348 - ldr r1, [sp] - add r0, r4, #0 - bl ov70_02260EA0 - add r1, sp, #4 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - bl ov70_02260EE4 - strb r6, [r4, #1] - add r0, r4, #0 - strb r5, [r4, #2] - mov r1, #1 - strb r1, [r4] - str r1, [r4, #0x7c] - add r0, #0x84 - str r1, [r0, #0] - add r0, r4, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02260E20 - - thumb_func_start ov70_02260E8C -ov70_02260E8C: ; 0x02260E8C - push {r4, lr} - add r4, r0, #0 - add r0, r4, #4 - mov r1, #0 - bl sub_02017348 - mov r0, #0 - strb r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02260E8C - - thumb_func_start ov70_02260EA0 -ov70_02260EA0: ; 0x02260EA0 - push {r4, lr} - add r3, r0, #0 - add r4, r1, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - add r2, #0x9c - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - add r1, r3, #0 - str r0, [r2, #0] - add r1, #0x9c - ldr r2, [r1, #0] - add r1, r3, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - add r0, r3, #4 - add r1, r2, r1 - add r2, r3, #0 - add r2, #0xa0 - ldr r4, [r2, #0] - add r2, r3, #0 - add r2, #0xac - ldr r2, [r2, #0] - add r2, r4, r2 - add r4, r3, #0 - add r4, #0xa4 - add r3, #0xb0 - ldr r4, [r4, #0] - ldr r3, [r3, #0] - add r3, r4, r3 - bl sub_02017350 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02260EA0 - - thumb_func_start ov70_02260EE4 -ov70_02260EE4: ; 0x02260EE4 - push {r4, lr} - add r3, r0, #0 - add r4, r1, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - add r2, #0xa8 - stmia r2!, {r0, r1} - ldr r0, [r4, #0] - add r1, r3, #0 - str r0, [r2, #0] - add r1, #0x9c - ldr r2, [r1, #0] - add r1, r3, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - add r0, r3, #4 - add r1, r2, r1 - add r2, r3, #0 - add r2, #0xa0 - ldr r4, [r2, #0] - add r2, r3, #0 - add r2, #0xac - ldr r2, [r2, #0] - add r2, r4, r2 - add r4, r3, #0 - add r4, #0xa4 - add r3, #0xb0 - ldr r4, [r4, #0] - ldr r3, [r3, #0] - add r3, r4, r3 - bl sub_02017350 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02260EE4 - - thumb_func_start ov70_02260F28 -ov70_02260F28: ; 0x02260F28 - push {r3, lr} - add r3, r1, #0 - add r0, r0, #4 - add r2, r1, #4 - add r3, #8 - bl sub_02017358 - pop {r3, pc} - thumb_func_end ov70_02260F28 - - thumb_func_start ov70_02260F38 -ov70_02260F38: ; 0x02260F38 - ldr r3, _02260F40 ; =sub_02017348 - add r0, r0, #4 - bx r3 - nop -_02260F40: .word sub_02017348 - thumb_func_end ov70_02260F38 - - thumb_func_start ov70_02260F44 -ov70_02260F44: ; 0x02260F44 - add r1, r0, #0 - add r1, #0x80 - ldr r1, [r1, #0] - cmp r1, #0 - bne _02260F58 - mov r1, #1 - add r0, #0x80 - str r1, [r0, #0] - add r0, r1, #0 - bx lr -_02260F58: - mov r0, #0 - bx lr - thumb_func_end ov70_02260F44 - - thumb_func_start ov70_02260F5C -ov70_02260F5C: ; 0x02260F5C - add r1, r0, #0 - add r1, #0x88 - ldr r1, [r1, #0] - cmp r1, #0 - bne _02260F70 - mov r1, #1 - add r0, #0x88 - str r1, [r0, #0] - add r0, r1, #0 - bx lr -_02260F70: - mov r0, #0 - bx lr - thumb_func_end ov70_02260F5C - - thumb_func_start ov70_02260F74 -ov70_02260F74: ; 0x02260F74 - ldr r3, _02260F7C ; =sub_02017388 - add r0, r0, #4 - mov r2, #0 - bx r3 - ; .align 2, 0 -_02260F7C: .word sub_02017388 - thumb_func_end ov70_02260F74 - - thumb_func_start ov70_02260F80 -ov70_02260F80: ; 0x02260F80 - add r0, #0x80 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02260F80 - - thumb_func_start ov70_02260F88 -ov70_02260F88: ; 0x02260F88 - add r0, #0x88 - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02260F88 - - thumb_func_start ov70_02260F90 -ov70_02260F90: ; 0x02260F90 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - str r1, [sp] - str r2, [sp, #4] - str r3, [sp, #8] - bl ov70_02261AF0 - mov r1, #0xa7 - lsl r1, r1, #2 - add r2, r7, r1 - ldr r1, [sp] - str r0, [sp, #0xc] - lsl r1, r1, #4 - add r0, r0, #4 - add r1, r2, r1 - bl sub_02017258 - ldr r5, [sp, #0xc] - ldr r0, [sp] - mov r1, #0xc - mul r1, r0 - mov r0, #0xa7 - lsl r0, r0, #2 - add r0, r7, r0 - str r0, [sp, #0x10] - ldr r0, [sp] - mov r6, #0 - lsl r0, r0, #4 - add r4, r7, r1 - add r5, #0x7c - str r0, [sp, #0x14] -_02260FD0: - mov r0, #0xef - lsl r0, r0, #2 - ldr r2, [r4, r0] - cmp r2, #0 - beq _02260FEA - ldr r3, [sp, #0x10] - ldr r1, [sp, #0x14] - add r0, r5, #0 - add r1, r3, r1 - ldr r3, _02261054 ; =0x00000494 - add r3, r7, r3 - bl sub_02017190 -_02260FEA: - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x14 - cmp r6, #3 - blt _02260FD0 - ldr r0, [sp, #0xc] - mov r1, #1 - add r0, r0, #4 - bl sub_02017348 - ldr r0, [sp, #4] - add r1, sp, #0x18 - lsl r0, r0, #4 - strh r0, [r1] - ldr r0, [sp, #8] - mov r3, sp - lsl r0, r0, #4 - strh r0, [r1, #2] - ldrh r2, [r1] - sub r3, r3, #4 - ldr r0, [sp, #0xc] - strh r2, [r3] - ldrh r1, [r1, #2] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov70_022610BC - ldr r0, [sp, #0xc] - mov r2, #1 - ldr r1, [sp] - strh r2, [r0] - strh r1, [r0, #2] - mov r1, #0x14 - add r0, #0xcc - strb r1, [r0] - ldr r0, [sp, #0xc] - lsl r1, r2, #0xc - add r0, #0xdc - str r1, [r0, #0] - ldr r0, [sp, #0xc] - mov r1, #0 - add r0, #0xe0 - strb r1, [r0] - ldr r0, [sp, #0xc] - mov r1, #0x1f - add r0, #0xe1 - strb r1, [r0] - ldr r0, [sp, #0xc] - add r0, #0xe2 - strb r1, [r0] - ldr r0, [sp, #0xc] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02261054: .word 0x00000494 - thumb_func_end ov70_02260F90 - - thumb_func_start ov70_02261058 -ov70_02261058: ; 0x02261058 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - str r1, [sp] - add r0, r1, #4 - mov r1, #0 - bl sub_02017348 - mov r0, #0xa7 - ldr r5, [sp] - lsl r0, r0, #2 - mov r7, #0 - add r0, r6, r0 - add r4, r7, #0 - add r5, #0x7c - str r0, [sp, #4] -_02261078: - ldr r0, [sp] - ldrh r1, [r0, #2] - mov r0, #0xc - mul r0, r1 - add r0, r6, r0 - add r2, r4, r0 - mov r0, #0xef - lsl r0, r0, #2 - ldr r2, [r2, r0] - cmp r2, #0 - beq _0226109E - lsl r3, r1, #4 - ldr r1, [sp, #4] - add r0, r5, #0 - add r1, r1, r3 - ldr r3, _022610B4 ; =0x00000494 - add r3, r6, r3 - bl sub_02017190 -_0226109E: - add r7, r7, #1 - add r4, r4, #4 - add r5, #0x14 - cmp r7, #3 - blt _02261078 - ldr r0, [sp] - mov r1, #0 - strh r1, [r0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_022610B4: .word 0x00000494 - thumb_func_end ov70_02261058 - - thumb_func_start ov70_022610B8 -ov70_022610B8: ; 0x022610B8 - ldrh r0, [r0, #2] - bx lr - thumb_func_end ov70_022610B8 - - thumb_func_start ov70_022610BC -ov70_022610BC: ; 0x022610BC - push {r0, r1, r2, r3} - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - add r0, sp, #0x1c - add r1, sp, #0 - bl ov70_0225C700 - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #4 - bl sub_02017350 - add sp, #0xc - pop {r3, r4} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 - thumb_func_end ov70_022610BC - - thumb_func_start ov70_022610E4 -ov70_022610E4: ; 0x022610E4 - push {r3, lr} - sub sp, #0x10 - add r0, r0, #4 - add r1, sp, #4 - add r2, sp, #8 - add r3, sp, #0xc - bl sub_02017358 - add r0, sp, #4 - add r1, sp, #0 - bl ov70_0225C714 - add r0, sp, #0 - ldrh r1, [r0, #2] - ldrh r0, [r0] - lsl r1, r1, #0x10 - orr r0, r1 - add sp, #0x10 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_022610E4 - - thumb_func_start ov70_0226110C -ov70_0226110C: ; 0x0226110C - push {r3, r4, lr} - sub sp, #4 - mov r4, #0 - str r4, [sp] - bl ov70_0226111C - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov70_0226110C - - thumb_func_start ov70_0226111C -ov70_0226111C: ; 0x0226111C - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r2, #0 - str r0, [sp] - add r4, r1, #0 - add r7, r3, #0 - cmp r5, #3 - blt _02261130 - bl sub_02022974 -_02261130: - cmp r7, #7 - blt _02261138 - bl sub_02022974 -_02261138: - ldrh r0, [r4, #2] - cmp r0, #0x12 - blo _02261142 - bl sub_02022974 -_02261142: - ldrh r0, [r4, #2] - mov r1, #0xc - lsl r6, r5, #2 - mul r1, r0 - ldr r0, [sp] - add r0, r0, r1 - add r1, r0, r6 - mov r0, #0xef - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0226121C - add r0, r4, #0 - str r0, [sp, #4] - add r0, #0xb8 - str r0, [sp, #4] - ldrb r0, [r0, r5] - cmp r0, #0 - bne _02261178 - add r2, r4, #0 - mov r1, #0x14 - add r2, #0x7c - mul r1, r5 - add r0, r4, #4 - add r1, r2, r1 - bl sub_0201727C -_02261178: - ldr r0, [sp, #4] - mov r1, #1 - strb r1, [r0, r5] - add r0, r4, r5 - add r0, #0xbc - strb r7, [r0] - add r0, r4, r6 - ldr r1, [sp, #0x20] - add r0, #0xd0 - str r1, [r0, #0] - add r0, r4, #0 - str r0, [sp, #8] - add r0, #0xcd - str r0, [sp, #8] - mov r0, #0 - ldr r1, [sp, #8] - cmp r7, #6 - strb r0, [r1, r5] - bhi _02261208 - add r1, r7, r7 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022611AA: ; jump table - .short _022611B8 - _022611AA - 2 ; case 0 - .short _022611B8 - _022611AA - 2 ; case 1 - .short _022611B8 - _022611AA - 2 ; case 2 - .short _022611C0 - _022611AA - 2 ; case 3 - .short _022611C0 - _022611AA - 2 ; case 4 - .short _022611D6 - _022611AA - 2 ; case 5 - .short _022611F0 - _022611AA - 2 ; case 6 -_022611B8: - add r1, r4, r6 - add r1, #0xc0 - str r0, [r1, #0] - b _02261208 -_022611C0: - add r1, r4, #0 - mov r0, #0x14 - add r1, #0x7c - mul r0, r5 - add r0, r1, r0 - bl sub_0201724C - add r1, r4, r6 - add r1, #0xc0 - str r0, [r1, #0] - b _02261208 -_022611D6: - add r1, r4, r6 - add r1, #0xc0 - str r0, [r1, #0] - bl sub_0201D35C - add r1, r4, #0 - add r1, #0xcc - ldrb r1, [r1] - bl sub_020E2178 - ldr r0, [sp, #8] - strb r1, [r0, r5] - b _02261208 -_022611F0: - add r1, r4, r6 - add r1, #0xc0 - str r0, [r1, #0] - bl sub_0201D35C - add r1, r4, #0 - add r1, #0xcc - ldrb r1, [r1] - bl sub_020E2178 - ldr r0, [sp, #8] - strb r1, [r0, r5] -_02261208: - add r1, r4, #0 - mov r0, #0x14 - add r1, #0x7c - mul r0, r5 - add r0, r1, r0 - add r1, r4, r6 - add r1, #0xc0 - ldr r1, [r1, #0] - bl sub_02017240 -_0226121C: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_0226111C - - thumb_func_start ov70_02261220 -ov70_02261220: ; 0x02261220 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - cmp r4, #3 - blt _02261230 - bl sub_02022974 -_02261230: - ldrh r0, [r5, #2] - cmp r0, #0x12 - blo _0226123A - bl sub_02022974 -_0226123A: - ldrh r1, [r5, #2] - mov r0, #0xc - mul r0, r1 - add r1, r6, r0 - lsl r0, r4, #2 - add r1, r1, r0 - mov r0, #0xef - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _02261288 - add r6, r5, #0 - add r6, #0xb8 - ldrb r0, [r6, r4] - cmp r0, #1 - bne _02261288 - add r2, r5, #0 - mov r1, #0x14 - add r2, #0x7c - mul r1, r4 - add r0, r5, #4 - add r1, r2, r1 - bl sub_02017288 - lsl r2, r4, #2 - mov r0, #0 - add r1, r5, r2 - strb r0, [r6, r4] - add r1, #0xc0 - str r0, [r1, #0] - add r1, r5, r4 - add r1, #0xbc - strb r0, [r1] - add r1, r5, r4 - add r1, #0xcd - strb r0, [r1] - add r1, r5, r2 - add r1, #0xd0 - str r0, [r1, #0] -_02261288: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02261220 - - thumb_func_start ov70_0226128C -ov70_0226128C: ; 0x0226128C - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r4, #0 -_02261294: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02261348 - cmp r0, #1 - bne _022612AA - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov70_02261220 -_022612AA: - add r4, r4, #1 - cmp r4, #3 - blt _02261294 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0226128C - - thumb_func_start ov70_022612B4 -ov70_022612B4: ; 0x022612B4 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - cmp r4, #3 - blt _022612C4 - bl sub_02022974 -_022612C4: - ldrh r0, [r5, #2] - cmp r0, #0x12 - blo _022612CE - bl sub_02022974 -_022612CE: - ldrh r1, [r5, #2] - mov r0, #0xc - mul r0, r1 - add r1, r6, r0 - lsl r0, r4, #2 - add r1, r1, r0 - mov r0, #0xef - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _022612EC - add r0, r5, r4 - add r0, #0xb8 - ldrb r0, [r0] - pop {r4, r5, r6, pc} -_022612EC: - mov r0, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov70_022612B4 - - thumb_func_start ov70_022612F0 -ov70_022612F0: ; 0x022612F0 - push {r3, r4, r5, r6, r7, lr} - add r4, r2, #0 - add r6, r0, #0 - add r5, r1, #0 - add r7, r3, #0 - cmp r4, #3 - blt _02261302 - bl sub_02022974 -_02261302: - ldrh r0, [r5, #2] - cmp r0, #0x12 - blo _0226130C - bl sub_02022974 -_0226130C: - ldrh r1, [r5, #2] - mov r0, #0xc - mul r0, r1 - add r1, r6, r0 - lsl r0, r4, #2 - add r1, r1, r0 - mov r0, #0xef - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - bne _02261326 - bl sub_02022974 -_02261326: - add r0, r5, r4 - add r0, #0xbc - ldrb r0, [r0] - cmp r0, #2 - bne _02261346 - add r2, r5, #0 - mov r0, #0x14 - add r2, #0xc0 - lsl r1, r4, #2 - str r7, [r2, r1] - add r5, #0x7c - mul r0, r4 - ldr r1, [r2, r1] - add r0, r5, r0 - bl sub_02017240 -_02261346: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_022612F0 - - thumb_func_start ov70_02261348 -ov70_02261348: ; 0x02261348 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #3 - blt _02261356 - bl sub_02022974 -_02261356: - ldrh r0, [r5, #2] - cmp r0, #0x12 - blo _02261360 - bl sub_02022974 -_02261360: - add r0, r5, r4 - add r0, #0xb8 - ldrb r0, [r0] - pop {r3, r4, r5, pc} - thumb_func_end ov70_02261348 - - thumb_func_start ov70_02261368 -ov70_02261368: ; 0x02261368 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #3 - blt _02261376 - bl sub_02022974 -_02261376: - ldrh r0, [r5, #2] - cmp r0, #0x12 - blo _02261380 - bl sub_02022974 -_02261380: - lsl r0, r4, #2 - add r0, r5, r0 - add r0, #0xc0 - ldr r0, [r0, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02261368 - - thumb_func_start ov70_0226138C -ov70_0226138C: ; 0x0226138C - ldr r3, _02261394 ; =sub_02017348 - add r0, r0, #4 - bx r3 - nop -_02261394: .word sub_02017348 - thumb_func_end ov70_0226138C - - thumb_func_start ov70_02261398 -ov70_02261398: ; 0x02261398 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4, #2] - add r6, r2, #0 - cmp r0, #0x12 - blo _022613AA - bl sub_02022974 -_022613AA: - ldrh r0, [r4, #2] - lsl r0, r0, #4 - add r1, r5, r0 - mov r0, #0xa9 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - bl sub_020B3664 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02261398 - - thumb_func_start ov70_022613C0 -ov70_022613C0: ; 0x022613C0 - add r0, #0xdc - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov70_022613C0 - - thumb_func_start ov70_022613C8 -ov70_022613C8: ; 0x022613C8 - push {r3, r4} - add r3, r0, #0 - mov r4, #1 - add r3, #0xe0 - strb r4, [r3] - add r3, r0, #0 - add r3, #0xe1 - strb r1, [r3] - add r0, #0xe2 - strb r2, [r0] - pop {r3, r4} - bx lr - thumb_func_end ov70_022613C8 - - thumb_func_start ov70_022613E0 -ov70_022613E0: ; 0x022613E0 - mov r1, #0 - add r0, #0xe0 - strb r1, [r0] - bx lr - thumb_func_end ov70_022613E0 - - thumb_func_start ov70_022613E8 -ov70_022613E8: ; 0x022613E8 - push {r3, lr} - add r0, r0, #4 - bl sub_0201736C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_022613E8 - - thumb_func_start ov70_022613F4 -ov70_022613F4: ; 0x022613F4 - push {r3, r4, r5, lr} - add r5, r2, #0 - lsl r2, r1, #2 - add r1, r1, r2 - add r4, r0, r1 - cmp r4, #0x19 - blo _02261406 - bl sub_02022974 -_02261406: - mov r0, #1 - str r0, [sp] - mov r0, #0xae - add r1, r4, #1 - mov r2, #0 - add r3, r5, #0 - bl sub_02006FE8 - pop {r3, r4, r5, pc} - thumb_func_end ov70_022613F4 - - thumb_func_start ov70_02261418 -ov70_02261418: ; 0x02261418 - ldr r3, _0226141C ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_0226141C: .word sub_020181C4 - thumb_func_end ov70_02261418 - - thumb_func_start ov70_02261420 -ov70_02261420: ; 0x02261420 - push {r4, lr} - add r4, r0, #0 - bl ov70_0225C730 - ldr r0, [r4, #0] - bl sub_020B3C0C - str r0, [r4, #4] - cmp r0, #0 - beq _02261454 - add r2, r0, #0 - add r2, #8 - beq _02261448 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _02261448 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _0226144A -_02261448: - mov r1, #0 -_0226144A: - cmp r1, #0 - beq _02261454 - ldr r1, [r1, #0] - add r0, r0, r1 - b _02261456 -_02261454: - mov r0, #0 -_02261456: - str r0, [r4, #8] - ldr r0, [r4, #0] - bl sub_020B3C1C - str r0, [r4, #0xc] - ldr r0, [r4, #0] - ldr r1, [r4, #0xc] - bl sub_0201CBB0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02261420 - - thumb_func_start ov70_0226146C -ov70_0226146C: ; 0x0226146C - ldr r3, _02261470 ; =sub_02017110 - bx r3 - ; .align 2, 0 -_02261470: .word sub_02017110 - thumb_func_end ov70_0226146C - - thumb_func_start ov70_02261474 -ov70_02261474: ; 0x02261474 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - bl sub_0201724C - add r1, r0, #0 - ldr r0, [r5, #0] - add r0, r0, r4 - cmp r0, r1 - bge _0226148E - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_0226148E: - bl sub_020E1F6C - str r1, [r5, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02261474 - - thumb_func_start ov70_02261498 -ov70_02261498: ; 0x02261498 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - bl sub_0201724C - ldr r1, [r5, #0] - add r1, r1, r4 - cmp r1, r0 - bge _022614B2 - str r1, [r5, #0] - mov r0, #0 - pop {r3, r4, r5, pc} -_022614B2: - mov r1, #2 - lsl r1, r1, #0xa - sub r0, r0, r1 - str r0, [r5, #0] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02261498 - - thumb_func_start ov70_022614C0 -ov70_022614C0: ; 0x022614C0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - bl sub_0201724C - ldr r1, [r5, #0] - sub r1, r1, r4 - bmi _022614D6 - str r1, [r5, #0] - pop {r3, r4, r5, pc} -_022614D6: - add r0, r0, r1 - str r0, [r5, #0] - pop {r3, r4, r5, pc} - thumb_func_end ov70_022614C0 - - thumb_func_start ov70_022614DC -ov70_022614DC: ; 0x022614DC - ldr r1, [r0, #0] - sub r1, r1, r2 - cmp r1, #0 - ble _022614EA - str r1, [r0, #0] - mov r0, #0 - bx lr -_022614EA: - mov r1, #0 - str r1, [r0, #0] - mov r0, #1 - bx lr - ; .align 2, 0 - thumb_func_end ov70_022614DC - - thumb_func_start ov70_022614F4 -ov70_022614F4: ; 0x022614F4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #8] - ldr r0, [sp, #0x30] - mov r7, #6 - ldr r5, [sp, #8] - str r1, [sp, #0xc] - str r2, [sp, #0x10] - str r3, [sp, #0x14] - str r0, [sp, #0x30] - mov r6, #0 - add r4, r2, #0 - lsl r7, r7, #6 -_0226150E: - ldr r1, [sp, #0xc] - ldr r2, [r4, r7] - ldr r3, [sp, #0x14] - add r0, r5, #0 - bl ov70_02261420 - ldr r0, [r5, #0] - bl ov66_02231668 - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x10 - cmp r6, #2 - blt _0226150E - ldr r6, [sp, #8] - ldr r4, [sp, #0x10] - add r0, r6, #0 - add r5, r6, #0 - str r0, [sp, #0x18] - add r0, #0x10 - mov r7, #0 - add r5, #0x20 - str r0, [sp, #0x18] -_0226153C: - mov r0, #6 - ldr r1, [sp, #0x10] - lsl r0, r0, #6 - ldr r1, [r1, r0] - add r0, #0xc - ldr r0, [r4, r0] - cmp r1, r0 - bne _02261556 - add r1, r6, #0 - add r1, #0x84 - mov r0, #0 - str r0, [r1, #0] - b _02261594 -_02261556: - add r1, r6, #0 - add r1, #0x84 - mov r0, #1 - str r0, [r1, #0] - cmp r7, #3 - beq _0226157C - ldr r0, [sp, #0x14] - mov r3, #0x63 - str r0, [sp] - ldr r0, [sp, #0x30] - lsl r3, r3, #2 - str r0, [sp, #4] - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [r4, r3] - add r0, r5, #0 - bl sub_02017164 - b _02261594 -_0226157C: - ldr r0, [sp, #0x14] - mov r3, #0x63 - str r0, [sp] - ldr r0, [sp, #0x30] - lsl r3, r3, #2 - str r0, [sp, #4] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0xc] - ldr r3, [r4, r3] - add r0, r5, #0 - bl sub_02017164 -_02261594: - add r7, r7, #1 - add r4, r4, #4 - add r6, r6, #4 - add r5, #0x14 - cmp r7, #5 - blt _0226153C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_022614F4 - - thumb_func_start ov70_022615A4 -ov70_022615A4: ; 0x022615A4 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r6, #0 - str r1, [sp] - mov r7, #0 - add r4, r6, #0 - add r5, #0x20 -_022615B2: - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022615CC - ldr r1, [sp] - add r0, r5, #0 - bl sub_020171A0 - add r1, r4, #0 - add r1, #0x84 - mov r0, #0 - str r0, [r1, #0] -_022615CC: - add r7, r7, #1 - add r4, r4, #4 - add r5, #0x14 - cmp r7, #5 - blt _022615B2 - mov r4, #0 -_022615D8: - add r0, r6, #0 - bl ov70_0226146C - add r4, r4, #1 - add r6, #0x10 - cmp r4, #2 - blt _022615D8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_022615A4 - - thumb_func_start ov70_022615E8 -ov70_022615E8: ; 0x022615E8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - mov r0, #1 - add r7, r1, #0 - str r0, [r6, #0] - mov r0, #0 - str r0, [sp] - add r4, r7, #0 - add r5, r6, #4 -_022615FC: - add r0, r5, #0 - add r1, r4, #0 - bl sub_02017258 - add r0, r5, #0 - mov r1, #1 - bl sub_02017348 - ldr r0, [sp] - add r4, #0x10 - add r0, r0, #1 - add r5, #0x78 - str r0, [sp] - cmp r0, #2 - blt _022615FC - add r0, r6, #0 - str r0, [sp, #8] - add r0, #0x7c - add r4, r7, #0 - str r0, [sp, #8] - add r0, r6, #4 - mov r5, #0 - add r4, #0x20 - str r0, [sp, #4] -_0226162C: - add r0, r7, #0 - add r0, #0x84 - ldr r0, [r0, #0] - cmp r0, #1 - bne _02261654 - add r1, r6, #0 - add r1, #0xf4 - mov r0, #1 - str r0, [r1, #0] - cmp r5, #3 - beq _0226164C - ldr r0, [sp, #4] - add r1, r4, #0 - bl sub_0201727C - b _02261654 -_0226164C: - ldr r0, [sp, #8] - add r1, r4, #0 - bl sub_0201727C -_02261654: - add r5, r5, #1 - add r7, r7, #4 - add r6, r6, #4 - add r4, #0x14 - cmp r5, #4 - blt _0226162C - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_022615E8 - - thumb_func_start ov70_02261664 -ov70_02261664: ; 0x02261664 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - str r0, [sp] - add r0, #0x7c - mov r6, #0 - add r4, r7, #0 - add r5, #0x20 - str r0, [sp] -_02261676: - add r0, r4, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - cmp r0, #1 - bne _0226169E - add r1, r4, #0 - add r1, #0xf4 - mov r0, #0 - str r0, [r1, #0] - cmp r6, #3 - beq _02261696 - add r0, r7, #4 - add r1, r5, #0 - bl sub_02017288 - b _0226169E -_02261696: - ldr r0, [sp] - add r1, r5, #0 - bl sub_02017288 -_0226169E: - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x14 - cmp r6, #4 - blt _02261676 - mov r0, #0 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02261664 - - thumb_func_start ov70_022616B0 -ov70_022616B0: ; 0x022616B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - add r4, r1, #0 - mov r0, #0x42 - add r4, #0x20 - lsl r0, r0, #2 - add r6, r5, r0 - add r7, r4, #0 -_022616C4: - add r0, r5, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022616E6 - mov r2, #1 - add r0, r6, #0 - add r1, r4, #0 - lsl r2, r2, #0xc - bl ov70_02261474 - mov r1, #0x42 - lsl r1, r1, #2 - ldr r1, [r5, r1] - add r0, r7, #0 - bl sub_02017240 -_022616E6: - ldr r0, [sp] - add r5, r5, #4 - add r0, r0, #1 - add r4, #0x14 - add r6, r6, #4 - add r7, #0x14 - str r0, [sp] - cmp r0, #5 - blt _022616C4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_022616B0 - - thumb_func_start ov70_022616FC -ov70_022616FC: ; 0x022616FC - push {r3, r4, r5, lr} - ldr r1, [r0, #0] - cmp r1, #0 - beq _02261716 - mov r4, #0 - add r5, r0, #4 -_02261708: - add r0, r5, #0 - bl sub_02017294 - add r4, r4, #1 - add r5, #0x78 - cmp r4, #2 - blt _02261708 -_02261716: - pop {r3, r4, r5, pc} - thumb_func_end ov70_022616FC - - thumb_func_start ov70_02261718 -ov70_02261718: ; 0x02261718 - push {r4, lr} - mov r1, #0x49 - lsl r1, r1, #2 - ldrb r4, [r0, r1] - mov r2, #0 - cmp r4, #0 - ble _02261742 - sub r1, #8 - ldr r3, [r0, r1] - add r1, r3, #0 -_0226172C: - ldrb r0, [r1] - cmp r0, #0 - bne _0226173A - mov r0, #0xb4 - mul r0, r2 - add r0, r3, r0 - pop {r4, pc} -_0226173A: - add r2, r2, #1 - add r1, #0xb4 - cmp r2, r4 - blt _0226172C -_02261742: - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02261718 - - thumb_func_start ov70_0226174C -ov70_0226174C: ; 0x0226174C - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - str r0, [sp, #8] - ldr r0, [sp, #0x58] - mov r7, #0x4a - str r0, [sp, #0x58] - mov r0, #0 - str r0, [sp, #0x40] - add r0, r3, #0 - str r0, [sp, #0x24] - ldr r0, [sp, #8] - str r1, [sp, #0xc] - str r0, [sp, #0x20] - add r0, #0x20 - str r2, [sp, #0x10] - str r3, [sp, #0x14] - str r0, [sp, #0x20] - lsl r7, r7, #2 -_02261770: - ldr r4, [sp, #0x24] - ldr r5, [sp, #0x20] - mov r6, #0 -_02261776: - ldr r1, [sp, #0xc] - ldr r2, [r4, r7] - ldr r3, [sp, #0x58] - add r0, r5, #0 - bl ov70_0225C730 - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #3 - blt _02261776 - ldr r0, [sp, #0x24] - add r0, #0xc - str r0, [sp, #0x24] - ldr r0, [sp, #0x20] - add r0, #0xc - str r0, [sp, #0x20] - ldr r0, [sp, #0x40] - add r0, r0, #1 - str r0, [sp, #0x40] - cmp r0, #2 - blt _02261770 - ldr r4, [sp, #8] - ldr r6, [sp, #0x14] - mov r7, #0 - add r5, r4, #0 -_022617AA: - mov r0, #0 - mov r1, #0x12 - str r0, [sp] - lsl r1, r1, #4 - ldr r0, [sp, #0xc] - ldr r1, [r6, r1] - ldr r3, [sp, #0x58] - mov r2, #0 - bl sub_0200723C - str r0, [r4, #0] - bl sub_020B3C0C - str r0, [r4, #4] - cmp r0, #0 - beq _022617EA - add r1, r0, #0 - add r1, #8 - beq _022617DE - ldrb r2, [r0, #9] - cmp r2, #0 - bls _022617DE - ldrh r2, [r0, #0xe] - add r1, r1, r2 - add r1, r1, #4 - b _022617E0 -_022617DE: - mov r1, #0 -_022617E0: - cmp r1, #0 - beq _022617EA - ldr r1, [r1, #0] - add r0, r0, r1 - b _022617EC -_022617EA: - mov r0, #0 -_022617EC: - str r0, [r4, #8] - ldr r0, [r5, #0x20] - bl sub_020B3C1C - str r0, [r4, #0xc] - add r7, r7, #1 - add r6, r6, #4 - add r4, #0x10 - add r5, #0xc - cmp r7, #2 - blt _022617AA - mov r0, #0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x14] - ldr r7, [sp, #0x14] - str r0, [sp, #0x3c] - ldr r0, [sp, #8] - str r0, [sp, #0x38] - add r0, #0x38 - str r0, [sp, #0x38] - ldr r0, [sp, #0x14] - str r0, [sp, #0x34] - ldr r0, [sp, #8] - str r0, [sp, #0x30] -_0226181C: - mov r0, #0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x3c] - ldr r6, [sp, #0x34] - str r0, [sp, #0x2c] - ldr r0, [sp, #0x38] - ldr r5, [sp, #0x30] - str r0, [sp, #0x28] -_0226182C: - mov r0, #5 - ldr r1, [sp, #0x2c] - lsl r0, r0, #6 - ldr r3, [r1, r0] - ldr r1, [sp, #0x14] - sub r0, #0x20 - ldr r0, [r1, r0] - cmp r0, r3 - beq _02261880 - ldr r0, [sp, #0x58] - ldr r1, [sp, #8] - str r0, [sp] - ldr r0, [sp, #0x10] - ldr r2, [sp, #0xc] - str r0, [sp, #4] - ldr r0, [sp, #0x28] - bl sub_02017164 - ldr r0, [sp, #0x18] - cmp r0, #1 - blt _02261880 - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r7, r0] - mov r4, #0 - cmp r0, #0 - bls _02261880 -_02261862: - mov r0, #0x59 - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r4, r0 - beq _02261874 - ldr r0, [r5, #0x40] - add r1, r4, #0 - bl sub_020AE5CC -_02261874: - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r7, r0] - add r4, r4, #1 - cmp r4, r0 - blo _02261862 -_02261880: - ldr r0, [sp, #0x2c] - add r6, r6, #4 - add r0, r0, #4 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - add r5, #0x14 - add r0, #0x14 - str r0, [sp, #0x28] - ldr r0, [sp, #0x18] - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, #4 - blt _0226182C - ldr r0, [sp, #0x3c] - add r7, r7, #4 - add r0, #0x10 - str r0, [sp, #0x3c] - ldr r0, [sp, #8] - add r0, #0x10 - str r0, [sp, #8] - ldr r0, [sp, #0x38] - add r0, #0x50 - str r0, [sp, #0x38] - ldr r0, [sp, #0x34] - add r0, #0xc - str r0, [sp, #0x34] - ldr r0, [sp, #0x30] - add r0, #0x50 - str r0, [sp, #0x30] - ldr r0, [sp, #0x1c] - add r0, r0, #1 - str r0, [sp, #0x1c] - cmp r0, #2 - blt _0226181C - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_0226174C - - thumb_func_start ov70_022618C8 -ov70_022618C8: ; 0x022618C8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - ldr r7, [sp] - mov r0, #0 - add r6, r1, #0 - str r0, [sp, #8] - add r7, #0x38 -_022618D8: - mov r4, #0 - add r5, r7, #0 -_022618DC: - add r0, r5, #0 - add r1, r6, #0 - bl sub_020171A0 - add r4, r4, #1 - add r5, #0x14 - cmp r4, #4 - blt _022618DC - ldr r0, [sp, #8] - add r7, #0x50 - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #2 - blt _022618D8 - ldr r4, [sp] - mov r5, #0 -_022618FC: - ldr r0, [r4, #0] - bl sub_020181C4 - add r5, r5, #1 - add r4, #0x10 - cmp r5, #2 - blt _022618FC - mov r0, #0 - ldr r7, _02261960 ; =0x02100DF0 - str r0, [sp, #4] -_02261910: - ldr r4, [sp] - mov r5, #0 -_02261914: - ldr r0, [r4, #0x20] - bl sub_020B3C1C - add r1, sp, #0x10 - add r2, sp, #0xc - add r6, r0, #0 - bl sub_020AE9B8 - ldr r0, [sp, #0x10] - ldr r1, [r7, #0] - blx r1 - ldr r0, [sp, #0xc] - ldr r1, [r7, #0] - blx r1 - add r0, r6, #0 - bl sub_020AEA70 - ldr r1, _02261964 ; =0x02100DF8 - ldr r1, [r1, #0] - blx r1 - ldr r0, [r4, #0x20] - bl sub_020181C4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #3 - blt _02261914 - ldr r0, [sp] - add r0, #0xc - str r0, [sp] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #2 - blt _02261910 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_02261960: .word 0x02100DF0 -_02261964: .word 0x02100DF8 - thumb_func_end ov70_022618C8 - - thumb_func_start ov70_02261968 -ov70_02261968: ; 0x02261968 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r7, #0 - str r0, [sp] - add r4, r0, #0 - add r0, r1, #0 - str r1, [sp, #4] - add r0, #0x38 - add r6, r7, #0 - add r5, #0x8c - str r0, [sp, #4] -_02261980: - ldr r0, [r4, #0x7c] - cmp r0, #0 - beq _022619E4 - cmp r7, #3 - bhi _022619E0 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02261996: ; jump table - .short _0226199E - _02261996 - 2 ; case 0 - .short _022619B8 - _02261996 - 2 ; case 1 - .short _0226199E - _02261996 - 2 ; case 2 - .short _022619B8 - _02261996 - 2 ; case 3 -_0226199E: - ldr r1, [sp] - mov r2, #0x50 - ldrb r1, [r1, #2] - add r0, r5, #0 - mul r2, r1 - ldr r1, [sp, #4] - add r1, r1, r2 - mov r2, #1 - add r1, r1, r6 - lsl r2, r2, #0xc - bl ov70_02261474 - b _022619E4 -_022619B8: - ldr r1, [sp] - mov r2, #0x50 - ldrb r1, [r1, #2] - add r0, r5, #0 - mul r2, r1 - ldr r1, [sp, #4] - add r1, r1, r2 - mov r2, #1 - add r1, r1, r6 - lsl r2, r2, #0xc - bl ov70_02261498 - cmp r0, #1 - bne _022619E4 - mov r0, #0 - add r1, r4, #0 - str r0, [r4, #0x7c] - add r1, #0x8c - str r0, [r1, #0] - b _022619E4 -_022619E0: - bl sub_02022974 -_022619E4: - add r7, r7, #1 - add r4, r4, #4 - add r6, #0x14 - add r5, r5, #4 - cmp r7, #4 - blt _02261980 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02261968 - - thumb_func_start ov70_022619F4 -ov70_022619F4: ; 0x022619F4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldrb r0, [r5] - str r1, [sp] - cmp r0, #0 - beq _02261AEA - ldrb r0, [r5, #2] - lsl r1, r0, #4 - ldr r0, [sp] - add r0, r0, r1 - add r1, r5, #4 - bl ov70_0225C7A0 - cmp r0, #0 - beq _02261AEA - ldrb r0, [r5, #1] - cmp r0, #3 - blo _02261A1E - bl sub_02022974 -_02261A1E: - ldrb r0, [r5, #2] - cmp r0, #2 - blo _02261A28 - bl sub_02022974 -_02261A28: - ldrb r1, [r5, #2] - mov r0, #0xc - add r2, r1, #0 - mul r2, r0 - ldr r0, [sp] - add r1, r0, r2 - ldrb r0, [r5, #1] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #0x20] - bl sub_020B3C1C - ldrb r1, [r5, #2] - lsl r2, r1, #4 - ldr r1, [sp] - add r1, r1, r2 - str r0, [r1, #0xc] - ldrb r0, [r5, #2] - lsl r1, r0, #4 - ldr r0, [sp] - add r1, r0, r1 - ldr r0, [r1, #4] - ldr r1, [r1, #0xc] - bl sub_020AF1E8 - cmp r0, #0 - bne _02261A62 - bl sub_02022974 -_02261A62: - ldr r7, [sp] - mov r0, #0 - str r0, [sp, #4] - add r6, r5, #0 - add r4, r0, #0 - add r7, #0x38 -_02261A6E: - ldr r0, [r6, #0x7c] - cmp r0, #0 - beq _02261A98 - ldrb r2, [r5, #2] - mov r1, #0x50 - add r0, r5, #4 - mul r1, r2 - add r1, r7, r1 - add r1, r1, r4 - bl sub_0201727C - ldrb r1, [r5, #2] - mov r0, #0x50 - mul r0, r1 - add r1, r6, #0 - add r1, #0x8c - add r0, r7, r0 - ldr r1, [r1, #0] - add r0, r0, r4 - bl sub_02017240 -_02261A98: - ldr r0, [sp, #4] - add r6, r6, #4 - add r0, r0, #1 - add r4, #0x14 - str r0, [sp, #4] - cmp r0, #4 - blt _02261A6E - add r0, r5, #4 - bl sub_02017294 - ldr r0, [sp] - mov r7, #0 - str r0, [sp, #8] - add r0, #0x38 - add r6, r5, #0 - add r4, r7, #0 - str r0, [sp, #8] -_02261ABA: - ldr r0, [r6, #0x7c] - cmp r0, #0 - beq _02261AD2 - ldrb r1, [r5, #2] - mov r2, #0x50 - add r0, r5, #4 - mul r2, r1 - ldr r1, [sp, #8] - add r1, r1, r2 - add r1, r1, r4 - bl sub_02017288 -_02261AD2: - add r7, r7, #1 - add r6, r6, #4 - add r4, #0x14 - cmp r7, #4 - blt _02261ABA - ldrb r0, [r5, #2] - lsl r1, r0, #4 - ldr r0, [sp] - add r0, r0, r1 - ldr r0, [r0, #4] - bl sub_020AF298 -_02261AEA: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_022619F4 - - thumb_func_start ov70_02261AF0 -ov70_02261AF0: ; 0x02261AF0 - push {r4, lr} - ldr r3, _02261B20 ; =0x00000125 - mov r1, #0 - ldrb r2, [r0, r3] - cmp r2, #0 - ble _02261B18 - sub r3, r3, #5 - ldr r4, [r0, r3] - add r3, r4, #0 -_02261B02: - ldrh r0, [r3] - cmp r0, #0 - bne _02261B10 - mov r0, #0xe4 - mul r0, r1 - add r0, r4, r0 - pop {r4, pc} -_02261B10: - add r1, r1, #1 - add r3, #0xe4 - cmp r1, r2 - blt _02261B02 -_02261B18: - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_02261B20: .word 0x00000125 - thumb_func_end ov70_02261AF0 - - thumb_func_start ov70_02261B24 -ov70_02261B24: ; 0x02261B24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - add r7, r3, #0 - str r0, [sp, #0x30] - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, [sp, #4] - str r1, [sp, #8] - str r7, [sp, #0x10] - str r0, [sp, #0xc] -_02261B3C: - ldr r0, [sp, #4] - ldr r1, [sp, #8] - ldr r2, [r7, #0] - ldr r3, [sp, #0x30] - bl ov70_02261420 - ldr r0, [sp, #0x14] - cmp r0, #0xb - beq _02261B5A - cmp r0, #0xc - beq _02261B5A - ldr r0, [sp, #4] - ldr r0, [r0, #0] - bl ov66_02231668 -_02261B5A: - ldr r4, [sp, #0x10] - ldr r5, [sp, #0xc] - mov r6, #0 -_02261B60: - ldr r1, [r4, #0x48] - ldr r0, [r7, #0] - cmp r0, r1 - beq _02261B7E - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #8] - ldr r3, [sp, #0x30] - mov r2, #0 - bl sub_0200723C - mov r1, #0x12 - lsl r1, r1, #4 - str r0, [r5, r1] - b _02261B86 -_02261B7E: - mov r0, #0x12 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] -_02261B86: - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #3 - blt _02261B60 - ldr r0, [sp, #4] - add r7, r7, #4 - add r0, #0x10 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - add r0, #0xc - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r0, #0xc - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #0x12 - blt _02261B3C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02261B24 - - thumb_func_start ov70_02261BB4 -ov70_02261BB4: ; 0x02261BB4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #8] - ldr r0, [sp] - mov r7, #0x12 - str r0, [sp, #4] - mov r6, #0 - lsl r7, r7, #4 -_02261BC8: - ldr r5, [sp] - mov r4, #0 -_02261BCC: - ldr r0, [r5, r7] - cmp r0, #0 - beq _02261BDC - bl sub_020181C4 - mov r0, #0x12 - lsl r0, r0, #4 - str r6, [r5, r0] -_02261BDC: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _02261BCC - ldr r0, [sp, #4] - bl ov70_0226146C - ldr r0, [sp] - add r0, #0xc - str r0, [sp] - ldr r0, [sp, #4] - add r0, #0x10 - str r0, [sp, #4] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp, #8] - cmp r0, #0x12 - blt _02261BC8 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_02261BB4 - - thumb_func_start ov70_02261C04 -ov70_02261C04: ; 0x02261C04 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldrh r0, [r4] - cmp r0, #0 - beq _02261C5C - ldrh r0, [r4, #2] - add r1, r4, #4 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov70_0225C7A0 - cmp r0, #0 - beq _02261C5C - add r0, r4, #0 - add r0, #0xe0 - ldrb r0, [r0] - cmp r0, #1 - bne _02261C3C - ldrh r0, [r4, #2] - add r1, r4, #0 - add r1, #0xe1 - lsl r0, r0, #4 - add r0, r5, r0 - ldrb r1, [r1] - ldr r0, [r0, #8] - bl sub_020B3764 -_02261C3C: - add r0, r4, #4 - bl sub_02017294 - add r0, r4, #0 - add r0, #0xe0 - ldrb r0, [r0] - cmp r0, #1 - bne _02261C5C - ldrh r0, [r4, #2] - add r4, #0xe2 - ldrb r1, [r4] - lsl r0, r0, #4 - add r0, r5, r0 - ldr r0, [r0, #8] - bl sub_020B3764 -_02261C5C: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02261C04 - - thumb_func_start ov70_02261C60 -ov70_02261C60: ; 0x02261C60 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r1, #0 - str r0, [sp] - add r0, r4, #0 - str r0, [sp, #0xc] - add r0, #0x7c - add r7, r4, #0 - mov r5, #0 - str r0, [sp, #0xc] - add r7, #0xc0 - add r6, r4, #0 - str r0, [sp, #8] -_02261C7A: - add r0, r4, r5 - add r0, #0xb8 - ldrb r0, [r0] - cmp r0, #0 - beq _02261CE6 - add r0, r4, r5 - add r0, #0xbc - ldrb r0, [r0] - cmp r0, #6 - bhi _02261CE6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02261C9A: ; jump table - .short _02261CA8 - _02261C9A - 2 ; case 0 - .short _02261CC4 - _02261C9A - 2 ; case 1 - .short _02261DF4 - _02261C9A - 2 ; case 2 - .short _02261D0A - _02261C9A - 2 ; case 3 - .short _02261D26 - _02261C9A - 2 ; case 4 - .short _02261D6A - _02261C9A - 2 ; case 5 - .short _02261DC0 - _02261C9A - 2 ; case 6 -_02261CA8: - add r2, r4, #0 - add r2, #0xdc - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r7, #0 - bl ov70_02261474 - add r1, r6, #0 - add r1, #0xc0 - ldr r0, [sp, #8] - ldr r1, [r1, #0] - bl sub_02017240 - b _02261DF4 -_02261CC4: - add r2, r4, #0 - add r2, #0xdc - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r7, #0 - bl ov70_02261498 - add r1, r6, #0 - add r1, #0xc0 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - ldr r1, [r1, #0] - bl sub_02017240 - ldr r0, [sp, #0x14] - cmp r0, #1 - beq _02261CE8 -_02261CE6: - b _02261DF4 -_02261CE8: - add r0, r6, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r4, #0 - str r0, [sp, #0x10] - ldr r0, [sp] - add r2, r5, #0 - bl ov70_02261220 - ldr r0, [sp, #0x10] - cmp r0, #0 - beq _02261DF4 - ldr r0, [sp] - ldr r2, [sp, #0x10] - add r1, r4, #0 - blx r2 - b _02261DF4 -_02261D0A: - add r2, r4, #0 - add r2, #0xdc - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r7, #0 - bl ov70_022614C0 - add r1, r6, #0 - add r1, #0xc0 - ldr r0, [sp, #8] - ldr r1, [r1, #0] - bl sub_02017240 - b _02261DF4 -_02261D26: - add r2, r4, #0 - add r2, #0xdc - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r7, #0 - bl ov70_022614DC - add r1, r6, #0 - add r1, #0xc0 - str r0, [sp, #0x18] - ldr r0, [sp, #8] - ldr r1, [r1, #0] - bl sub_02017240 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _02261DF4 - add r0, r6, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - add r1, r4, #0 - str r0, [sp, #4] - ldr r0, [sp] - add r2, r5, #0 - bl ov70_02261220 - ldr r0, [sp, #4] - cmp r0, #0 - beq _02261DF4 - ldr r0, [sp] - ldr r2, [sp, #4] - add r1, r4, #0 - blx r2 - b _02261DF4 -_02261D6A: - add r0, r4, r5 - add r0, #0xcd - ldrb r0, [r0] - cmp r0, #0 - beq _02261D84 - add r0, r4, r5 - add r0, #0xcd - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r4, r5 - add r0, #0xcd - strb r1, [r0] - b _02261DF4 -_02261D84: - add r2, r4, #0 - add r2, #0xdc - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r7, #0 - bl ov70_02261498 - cmp r0, #1 - bne _02261DB2 - bl sub_0201D35C - add r1, r4, #0 - add r1, #0xcc - ldrb r1, [r1] - bl sub_020E2178 - add r0, r4, r5 - add r0, #0xcd - strb r1, [r0] - add r1, r6, #0 - add r1, #0xc0 - mov r0, #0 - str r0, [r1, #0] -_02261DB2: - add r1, r6, #0 - add r1, #0xc0 - ldr r0, [sp, #8] - ldr r1, [r1, #0] - bl sub_02017240 - b _02261DF4 -_02261DC0: - add r0, r4, r5 - add r0, #0xcd - ldrb r0, [r0] - cmp r0, #0 - beq _02261DDA - add r0, r4, r5 - add r0, #0xcd - ldrb r0, [r0] - sub r1, r0, #1 - add r0, r4, r5 - add r0, #0xcd - strb r1, [r0] - b _02261DF4 -_02261DDA: - add r2, r4, #0 - add r2, #0xdc - ldr r1, [sp, #0xc] - ldr r2, [r2, #0] - add r0, r7, #0 - bl ov70_02261474 - add r1, r6, #0 - add r1, #0xc0 - ldr r0, [sp, #8] - ldr r1, [r1, #0] - bl sub_02017240 -_02261DF4: - ldr r0, [sp, #0xc] - add r5, r5, #1 - add r0, #0x14 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r7, r7, #4 - add r0, #0x14 - add r6, r6, #4 - str r0, [sp, #8] - cmp r5, #3 - bge _02261E0C - b _02261C7A -_02261E0C: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_02261C60 - - thumb_func_start ov70_02261E10 -ov70_02261E10: ; 0x02261E10 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r6, r1, #0 - add r5, r0, #0 - ldr r1, _0226217C ; =0x00000614 - add r0, r3, #0 - add r7, r2, #0 - str r3, [sp, #4] - bl sub_02018144 - ldr r2, _0226217C ; =0x00000614 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x61 - str r7, [r4, #0] - lsl r0, r0, #4 - strb r5, [r4, r0] - add r0, r0, #1 - strb r6, [r4, r0] - ldr r2, [sp, #4] - ldr r3, [sp, #0x48] - mov r0, #9 - mov r1, #0x80 - bl ov70_02260B44 - str r0, [r4, #4] - ldr r0, [sp, #0x48] - ldr r3, [sp, #4] - str r0, [sp] - ldr r0, [r4, #4] - add r1, r6, #0 - add r2, r5, #0 - bl ov70_02260CE4 - mov r0, #0 - ldr r5, _02262180 ; =0x0226D944 - str r0, [sp, #0xc] -_02261E5E: - mov r0, #0 - str r0, [sp] - ldrh r1, [r5] - str r0, [sp, #8] - add r2, sp, #0x1c - ldr r0, [r4, #0] - add r2, #2 - add r3, sp, #0x1c - bl ov70_0225C8D8 - cmp r0, #1 - beq _02261E78 - b _0226212C -_02261E78: - mov r0, #0x92 - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #0x10] - mov r0, #0xda - lsl r0, r0, #2 - add r0, r4, r0 - str r0, [sp, #0x14] - ldr r0, _02262184 ; =0x000004E8 - mov r7, sp - add r0, r4, r0 - str r0, [sp, #0x18] - sub r7, r7, #4 - add r6, sp, #0x1c -_02261E94: - ldrh r1, [r5, #2] - ldrh r2, [r6, #2] - ldrh r3, [r6] - ldr r0, [r4, #4] - bl ov70_02260F90 - ldr r1, _02262188 ; =0x00000612 - ldrb r1, [r4, r1] - lsl r1, r1, #2 - add r1, r4, r1 - str r0, [r1, #8] - ldrh r0, [r5, #2] - cmp r0, #0x10 - bls _02261EB2 - b _02262106 -_02261EB2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02261EBE: ; jump table - .short _02261F0C - _02261EBE - 2 ; case 0 - .short _02262106 - _02261EBE - 2 ; case 1 - .short _02262106 - _02261EBE - 2 ; case 2 - .short _02262106 - _02261EBE - 2 ; case 3 - .short _02262106 - _02261EBE - 2 ; case 4 - .short _02262106 - _02261EBE - 2 ; case 5 - .short _02261EE0 - _02261EBE - 2 ; case 6 - .short _02261EE0 - _02261EBE - 2 ; case 7 - .short _02261EE0 - _02261EBE - 2 ; case 8 - .short _02262106 - _02261EBE - 2 ; case 9 - .short _02261F4A - _02261EBE - 2 ; case 10 - .short _02261F76 - _02261EBE - 2 ; case 11 - .short _02261F76 - _02261EBE - 2 ; case 12 - .short _02261F8C - _02261EBE - 2 ; case 13 - .short _02261FEA - _02261EBE - 2 ; case 14 - .short _02262048 - _02261EBE - 2 ; case 15 - .short _02262084 - _02261EBE - 2 ; case 16 -_02261EE0: - ldr r1, _02262188 ; =0x00000612 - mov r2, #0 - ldrb r1, [r4, r1] - ldr r0, [r4, #4] - add r3, r2, #0 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_0226110C - ldr r0, _02262188 ; =0x00000612 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r2, [r0, #8] - ldrh r0, [r5, #2] - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x85 - lsl r0, r0, #2 - str r2, [r1, r0] - b _02262106 -_02261F0C: - ldr r1, _02262188 ; =0x00000612 - mov r2, #0 - ldrb r1, [r4, r1] - ldr r0, [r4, #4] - add r3, r2, #0 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_0226110C - ldr r1, _02262188 ; =0x00000612 - ldr r0, [r4, #4] - ldrb r1, [r4, r1] - mov r2, #1 - mov r3, #0 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_0226110C - ldr r1, _02262188 ; =0x00000612 - ldr r0, [r4, #4] - ldrb r1, [r4, r1] - mov r2, #2 - mov r3, #0 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_0226110C - b _02262106 -_02261F4A: - ldr r1, _02262188 ; =0x00000612 - ldr r0, [r4, #4] - ldrb r1, [r4, r1] - mov r2, #0 - mov r3, #2 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_0226110C - ldr r0, _02262188 ; =0x00000612 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r2, [r0, #8] - ldrh r0, [r5] - lsl r0, r0, #2 - add r1, r4, r0 - mov r0, #0x45 - lsl r0, r0, #2 - str r2, [r1, r0] - b _02262106 -_02261F76: - ldr r1, _02262188 ; =0x00000612 - ldr r0, [r4, #4] - ldrb r1, [r4, r1] - mov r2, #0 - mov r3, #2 - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_0226110C - b _02262106 -_02261F8C: - ldr r0, _0226218C ; =0x00000608 - mov r1, #0xc - ldrb r0, [r4, r0] - mul r1, r0 - ldr r0, [sp, #0x10] - add r0, r0, r1 - ldr r1, _02262188 ; =0x00000612 - ldrb r1, [r4, r1] - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_022629FC - ldr r0, _0226218C ; =0x00000608 - ldrb r0, [r4, r0] - add r1, r0, #1 - ldr r0, _0226218C ; =0x00000608 - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #0x18 - bls _02261FBA - bl sub_02022974 -_02261FBA: - ldr r0, _02262188 ; =0x00000612 - mov r1, #0 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_0226138C - ldrh r1, [r5] - ldr r0, _02262190 ; =0x0000FFA4 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bls _02261FDA - b _02262106 -_02261FDA: - ldr r0, _02262188 ; =0x00000612 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_02262D48 - b _02262106 -_02261FEA: - ldr r0, _02262194 ; =0x00000609 - mov r1, #0xc - ldrb r0, [r4, r0] - mul r1, r0 - ldr r0, [sp, #0x14] - add r0, r0, r1 - ldr r1, _02262188 ; =0x00000612 - ldrb r1, [r4, r1] - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_022629FC - ldr r0, _02262194 ; =0x00000609 - ldrb r0, [r4, r0] - add r1, r0, #1 - ldr r0, _02262194 ; =0x00000609 - strb r1, [r4, r0] - sub r0, r0, #1 - ldrb r0, [r4, r0] - cmp r0, #0x18 - bls _0226201A - bl sub_02022974 -_0226201A: - ldr r0, _02262188 ; =0x00000612 - mov r1, #0 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_0226138C - ldrh r1, [r5] - ldr r0, _02262190 ; =0x0000FFA4 - add r0, r1, r0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r0, #1 - bhi _02262106 - ldr r0, _02262188 ; =0x00000612 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_02262D48 - b _02262106 -_02262048: - ldr r0, _02262188 ; =0x00000612 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r2, [r0, #8] - ldr r0, _02262198 ; =0x0000060A - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _0226219C ; =0x00000488 - str r2, [r1, r0] - ldr r0, _02262198 ; =0x0000060A - ldrb r0, [r4, r0] - add r1, r0, #1 - ldr r0, _02262198 ; =0x0000060A - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #0x18 - bls _02262072 - bl sub_02022974 -_02262072: - ldr r0, _02262188 ; =0x00000612 - mov r1, #0 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_0226138C - b _02262106 -_02262084: - ldr r0, _022621A0 ; =0x0000060B - mov r1, #0xc - ldrb r0, [r4, r0] - mul r1, r0 - ldr r0, [sp, #0x18] - add r0, r0, r1 - ldr r1, _02262188 ; =0x00000612 - ldrb r1, [r4, r1] - lsl r1, r1, #2 - add r1, r4, r1 - ldr r1, [r1, #8] - bl ov70_022629FC - ldr r0, _022621A0 ; =0x0000060B - ldrb r0, [r4, r0] - add r1, r0, #1 - ldr r0, _022621A0 ; =0x0000060B - strb r1, [r4, r0] - ldrb r0, [r4, r0] - cmp r0, #0x18 - bls _022620B2 - bl sub_02022974 -_022620B2: - ldr r0, _02262188 ; =0x00000612 - mov r1, #0 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_0226138C - ldr r0, _02262188 ; =0x00000612 - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - bl ov70_022610E4 - strh r0, [r6, #4] - lsr r0, r0, #0x10 - strh r0, [r6, #6] - ldrh r0, [r6, #4] - strh r0, [r6, #8] - ldrh r0, [r6, #6] - strh r0, [r6, #0xa] - mov r0, #8 - ldrsh r0, [r6, r0] - add r0, #8 - strh r0, [r6, #8] - mov r0, #0xa - ldrsh r0, [r6, r0] - add r0, #0x14 - strh r0, [r6, #0xa] - ldr r0, _02262188 ; =0x00000612 - ldrh r1, [r6, #8] - ldrb r0, [r4, r0] - lsl r0, r0, #2 - add r0, r4, r0 - ldr r0, [r0, #8] - strh r1, [r7] - ldrh r1, [r6, #0xa] - strh r1, [r7, #2] - ldr r1, [r7, #0] - bl ov70_022610BC -_02262106: - ldr r0, _02262188 ; =0x00000612 - add r2, sp, #0x1c - ldrb r0, [r4, r0] - add r2, #2 - add r3, sp, #0x1c - add r1, r0, #1 - ldr r0, _02262188 ; =0x00000612 - strb r1, [r4, r0] - ldr r0, [sp, #8] - add r0, r0, #1 - str r0, [sp] - str r0, [sp, #8] - ldrh r1, [r5] - ldr r0, [r4, #0] - bl ov70_0225C8D8 - cmp r0, #1 - bne _0226212C - b _02261E94 -_0226212C: - ldr r0, [sp, #0xc] - add r5, r5, #4 - add r0, r0, #1 - str r0, [sp, #0xc] - cmp r0, #0x23 - bhs _0226213A - b _02261E5E -_0226213A: - mov r0, #0xa - mov r7, #0 - lsl r0, r0, #0xe - ldr r6, _022621A4 ; =0x0226D920 - str r7, [sp, #0x28] - str r0, [sp, #0x30] - str r7, [sp, #0x2c] - add r5, r4, #0 -_0226214A: - ldrh r1, [r6] - ldrh r2, [r6, #2] - ldr r0, [r4, #4] - add r3, sp, #0x28 - bl ov70_02260E20 - mov r1, #0x82 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl ov70_02260F38 - add r7, r7, #1 - add r6, r6, #4 - add r5, r5, #4 - cmp r7, #9 - blt _0226214A - ldr r0, _022621A8 ; =0x00000613 - mov r1, #9 - strb r1, [r4, r0] - add r0, r4, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226217C: .word 0x00000614 -_02262180: .word 0x0226D944 -_02262184: .word 0x000004E8 -_02262188: .word 0x00000612 -_0226218C: .word 0x00000608 -_02262190: .word 0x0000FFA4 -_02262194: .word 0x00000609 -_02262198: .word 0x0000060A -_0226219C: .word 0x00000488 -_022621A0: .word 0x0000060B -_022621A4: .word 0x0226D920 -_022621A8: .word 0x00000613 - thumb_func_end ov70_02261E10 - - thumb_func_start ov70_022621AC -ov70_022621AC: ; 0x022621AC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02262208 ; =0x00000613 - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _022621D2 - ldr r7, _02262208 ; =0x00000613 - add r4, r5, #0 -_022621BE: - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov70_02260E8C - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _022621BE -_022621D2: - ldr r0, _0226220C ; =0x00000612 - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _022621F2 - ldr r7, _0226220C ; =0x00000612 - add r4, r5, #0 -_022621E0: - ldr r0, [r5, #4] - ldr r1, [r4, #8] - bl ov70_02261058 - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _022621E0 -_022621F2: - ldr r0, [r5, #4] - bl ov70_02260D80 - ldr r0, [r5, #4] - bl ov70_02260BB8 - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_02262208: .word 0x00000613 -_0226220C: .word 0x00000612 - thumb_func_end ov70_022621AC - - thumb_func_start ov70_02262210 -ov70_02262210: ; 0x02262210 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02262288 ; =0x00000608 - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _02262238 - mov r0, #0x92 - lsl r0, r0, #2 - ldr r7, _02262288 ; =0x00000608 - add r4, r5, r0 -_02262226: - ldr r1, [r5, #4] - add r0, r4, #0 - bl ov70_02262A04 - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, #0xc - cmp r6, r0 - blt _02262226 -_02262238: - ldr r0, _0226228C ; =0x00000609 - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _0226225C - mov r0, #0xda - lsl r0, r0, #2 - ldr r7, _0226228C ; =0x00000609 - add r4, r5, r0 -_0226224A: - ldr r1, [r5, #4] - add r0, r4, #0 - bl ov70_02262BEC - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, #0xc - cmp r6, r0 - blt _0226224A -_0226225C: - ldr r0, _02262290 ; =0x0000060B - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _0226227E - ldr r0, _02262294 ; =0x000004E8 - ldr r7, _02262290 ; =0x0000060B - add r4, r5, r0 -_0226226C: - ldr r1, [r5, #4] - add r0, r4, #0 - bl ov70_02262C94 - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, #0xc - cmp r6, r0 - blt _0226226C -_0226227E: - ldr r0, [r5, #4] - bl ov70_02260BE8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02262288: .word 0x00000608 -_0226228C: .word 0x00000609 -_02262290: .word 0x0000060B -_02262294: .word 0x000004E8 - thumb_func_end ov70_02262210 - - thumb_func_start ov70_02262298 -ov70_02262298: ; 0x02262298 - ldr r3, _022622A0 ; =ov70_02260C50 - ldr r0, [r0, #4] - bx r3 - nop -_022622A0: .word ov70_02260C50 - thumb_func_end ov70_02262298 - - thumb_func_start ov70_022622A4 -ov70_022622A4: ; 0x022622A4 - ldr r3, _022622AC ; =ov70_02260CE0 - ldr r0, [r0, #4] - bx r3 - nop -_022622AC: .word ov70_02260CE0 - thumb_func_end ov70_022622A4 - - thumb_func_start ov70_022622B0 -ov70_022622B0: ; 0x022622B0 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _022622E8 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - add r6, r2, #0 - cmp r0, r4 - bhi _022622C6 - bl sub_02022974 -_022622C6: - mov r0, #0xa - lsl r0, r0, #0xe - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #4] - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - str r6, [sp] - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - bl ov70_02260EA0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_022622E8: .word 0x00000613 - thumb_func_end ov70_022622B0 - - thumb_func_start ov70_022622EC -ov70_022622EC: ; 0x022622EC - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _02262314 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - add r6, r2, #0 - cmp r0, r4 - bhi _02262300 - bl sub_02022974 -_02262300: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - bl ov70_02260EE4 - pop {r4, r5, r6, pc} - nop -_02262314: .word 0x00000613 - thumb_func_end ov70_022622EC - - thumb_func_start ov70_02262318 -ov70_02262318: ; 0x02262318 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02262368 ; =0x00000613 - add r6, r1, #0 - ldrb r0, [r5, r0] - add r7, r2, #0 - add r4, r3, #0 - cmp r0, r6 - bhi _0226232E - bl sub_02022974 -_0226232E: - cmp r7, #3 - blo _02262336 - bl sub_02022974 -_02262336: - lsl r0, r6, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r4, #0 - bl ov70_02260F28 - ldr r1, _0226236C ; =0x0226D914 - lsl r0, r7, #2 - ldrsh r1, [r1, r0] - ldr r2, [r4, #0] - lsl r1, r1, #0xc - add r1, r2, r1 - str r1, [r4, #0] - ldr r1, _02262370 ; =0x0226D916 - ldr r2, [r4, #8] - ldrsh r0, [r1, r0] - lsl r0, r0, #0xc - add r0, r2, r0 - str r0, [r4, #8] - mov r0, #0xa - lsl r0, r0, #0xe - str r0, [r4, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02262368: .word 0x00000613 -_0226236C: .word 0x0226D914 -_02262370: .word 0x0226D916 - thumb_func_end ov70_02262318 - - thumb_func_start ov70_02262374 -ov70_02262374: ; 0x02262374 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _02262398 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - cmp r0, r4 - bhi _02262386 - bl sub_02022974 -_02262386: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov70_02260F44 - pop {r3, r4, r5, pc} - nop -_02262398: .word 0x00000613 - thumb_func_end ov70_02262374 - - thumb_func_start ov70_0226239C -ov70_0226239C: ; 0x0226239C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _022623C0 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - cmp r0, r4 - bhi _022623AE - bl sub_02022974 -_022623AE: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov70_02260F5C - pop {r3, r4, r5, pc} - nop -_022623C0: .word 0x00000613 - thumb_func_end ov70_0226239C - - thumb_func_start ov70_022623C4 -ov70_022623C4: ; 0x022623C4 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _022623EC ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - add r6, r2, #0 - cmp r0, r4 - bhi _022623D8 - bl sub_02022974 -_022623D8: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - bl ov70_02260F38 - pop {r4, r5, r6, pc} - nop -_022623EC: .word 0x00000613 - thumb_func_end ov70_022623C4 - - thumb_func_start ov70_022623F0 -ov70_022623F0: ; 0x022623F0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _02262418 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - add r6, r2, #0 - cmp r0, r4 - bhi _02262404 - bl sub_02022974 -_02262404: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, r6, #0 - bl ov70_02260F74 - pop {r4, r5, r6, pc} - nop -_02262418: .word 0x00000613 - thumb_func_end ov70_022623F0 - - thumb_func_start ov70_0226241C -ov70_0226241C: ; 0x0226241C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _02262440 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - cmp r0, r4 - bhi _0226242E - bl sub_02022974 -_0226242E: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov70_02260F80 - pop {r3, r4, r5, pc} - nop -_02262440: .word 0x00000613 - thumb_func_end ov70_0226241C - - thumb_func_start ov70_02262444 -ov70_02262444: ; 0x02262444 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _02262468 ; =0x00000613 - add r4, r1, #0 - ldrb r0, [r5, r0] - cmp r0, r4 - bhi _02262456 - bl sub_02022974 -_02262456: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x82 - lsl r0, r0, #2 - ldr r0, [r1, r0] - bl ov70_02260F88 - pop {r3, r4, r5, pc} - nop -_02262468: .word 0x00000613 - thumb_func_end ov70_02262444 - - thumb_func_start ov70_0226246C -ov70_0226246C: ; 0x0226246C - ldr r3, _02262474 ; =ov70_02260DC8 - ldr r0, [r0, #4] - bx r3 - nop -_02262474: .word ov70_02260DC8 - thumb_func_end ov70_0226246C - - thumb_func_start ov70_02262478 -ov70_02262478: ; 0x02262478 - ldr r3, _02262480 ; =ov70_02260DF4 - ldr r0, [r0, #4] - bx r3 - nop -_02262480: .word ov70_02260DF4 - thumb_func_end ov70_02262478 - - thumb_func_start ov70_02262484 -ov70_02262484: ; 0x02262484 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _02262514 ; =0x00000612 - str r1, [sp] - ldrb r0, [r5, r0] - mov r6, #0 - cmp r0, #0 - ble _0226250E - ldr r1, [sp] - sub r0, r2, #1 - sub r1, r1, #1 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - lsl r0, r0, #0x18 - add r4, r5, #0 - str r1, [sp, #4] - lsr r7, r0, #0x18 -_022624A8: - ldr r0, [r4, #8] - ldr r1, [sp, #4] - add r2, r7, #0 - bl ov70_022628C8 - str r0, [sp, #8] - ldr r0, [r4, #8] - ldr r1, [sp] - add r2, r7, #0 - bl ov70_022628C8 - ldr r1, [sp, #8] - cmp r1, #1 - beq _022624C8 - cmp r0, #1 - bne _02262502 -_022624C8: - ldr r0, [r4, #8] - bl ov70_022610B8 - cmp r0, #4 - bhi _02262502 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022624DE: ; jump table - .short _02262502 - _022624DE - 2 ; case 0 - .short _022624E8 - _022624DE - 2 ; case 1 - .short _022624E8 - _022624DE - 2 ; case 2 - .short _022624E8 - _022624DE - 2 ; case 3 - .short _022624E8 - _022624DE - 2 ; case 4 -_022624E8: - ldr r0, _02262518 ; =0x00000611 - ldrb r0, [r5, r0] - cmp r0, #4 - bne _022624FA - ldr r1, [r4, #8] - add r0, r5, #0 - bl ov70_022629AC - b _02262502 -_022624FA: - ldr r1, [r4, #8] - add r0, r5, #0 - bl ov70_02262968 -_02262502: - ldr r0, _02262514 ; =0x00000612 - add r6, r6, #1 - ldrb r0, [r5, r0] - add r4, r4, #4 - cmp r6, r0 - blt _022624A8 -_0226250E: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02262514: .word 0x00000612 -_02262518: .word 0x00000611 - thumb_func_end ov70_02262484 - - thumb_func_start ov70_0226251C -ov70_0226251C: ; 0x0226251C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _022625D4 ; =0x00000612 - add r7, r1, #0 - ldrb r0, [r5, r0] - mov r6, #0 - cmp r0, #0 - ble _022625D2 - add r4, r5, #0 -_0226252E: - ldr r0, [r4, #8] - bl ov70_022610B8 - cmp r0, #4 - bhi _0226254E - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02262544: ; jump table - .short _022625C6 - _02262544 - 2 ; case 0 - .short _02262554 - _02262544 - 2 ; case 1 - .short _02262554 - _02262544 - 2 ; case 2 - .short _02262554 - _02262544 - 2 ; case 3 - .short _02262554 - _02262544 - 2 ; case 4 -_0226254E: - cmp r0, #0xf - beq _02262564 - b _022625C6 -_02262554: - cmp r7, #1 - bne _022625C6 - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #1 - bl ov70_02261398 - b _022625C6 -_02262564: - cmp r7, #1 - bne _022625A0 - mov r1, #2 - ldr r0, [r4, #8] - lsl r1, r1, #0xa - bl ov70_022613C0 - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #0 - mov r3, #6 - bl ov70_0226110C - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #1 - mov r3, #6 - bl ov70_0226110C - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #2 - mov r3, #6 - bl ov70_0226110C - ldr r0, [r4, #8] - mov r1, #1 - bl ov70_0226138C - b _022625C6 -_022625A0: - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #0 - bl ov70_02261220 - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #1 - bl ov70_02261220 - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #2 - bl ov70_02261220 - ldr r0, [r4, #8] - mov r1, #0 - bl ov70_0226138C -_022625C6: - ldr r0, _022625D4 ; =0x00000612 - add r6, r6, #1 - ldrb r0, [r5, r0] - add r4, r4, #4 - cmp r6, r0 - blt _0226252E -_022625D2: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022625D4: .word 0x00000612 - thumb_func_end ov70_0226251C - - thumb_func_start ov70_022625D8 -ov70_022625D8: ; 0x022625D8 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _02262604 ; =0x0000060B - add r7, r1, #0 - ldrb r0, [r6, r0] - mov r4, #0 - cmp r0, #0 - ble _02262600 - ldr r0, _02262608 ; =0x000004E8 - add r5, r6, r0 -_022625EC: - add r0, r5, #0 - add r1, r7, #0 - bl ov70_02262BD0 - ldr r0, _02262604 ; =0x0000060B - add r4, r4, #1 - ldrb r0, [r6, r0] - add r5, #0xc - cmp r4, r0 - blt _022625EC -_02262600: - pop {r3, r4, r5, r6, r7, pc} - nop -_02262604: .word 0x0000060B -_02262608: .word 0x000004E8 - thumb_func_end ov70_022625D8 - - thumb_func_start ov70_0226260C -ov70_0226260C: ; 0x0226260C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02262654 ; =0x00000612 - mov r6, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _02262652 - ldr r7, _02262654 ; =0x00000612 - add r4, r5, #0 -_0226261E: - ldr r0, [r4, #8] - bl ov70_022610B8 - cmp r0, #4 - bhi _02262648 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02262634: ; jump table - .short _02262648 - _02262634 - 2 ; case 0 - .short _0226263E - _02262634 - 2 ; case 1 - .short _0226263E - _02262634 - 2 ; case 2 - .short _0226263E - _02262634 - 2 ; case 3 - .short _0226263E - _02262634 - 2 ; case 4 -_0226263E: - ldr r0, [r5, #4] - ldr r1, [r4, #8] - mov r2, #1 - bl ov70_02261398 -_02262648: - ldrb r0, [r5, r7] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _0226261E -_02262652: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02262654: .word 0x00000612 - thumb_func_end ov70_0226260C - - thumb_func_start ov70_02262658 -ov70_02262658: ; 0x02262658 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, _02262710 ; =0x00000612 - add r7, r1, #0 - ldrb r0, [r4, r0] - mov r6, #0 - cmp r0, #0 - ble _0226270E - add r5, r4, #0 -_0226266A: - ldr r0, [r5, #8] - bl ov70_022610B8 - cmp r0, #0xb - beq _02262678 - cmp r0, #0xc - bne _02262702 -_02262678: - cmp r7, #3 - bhi _02262702 - add r0, r7, r7 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02262688: ; jump table - .short _02262690 - _02262688 - 2 ; case 0 - .short _022626A6 - _02262688 - 2 ; case 1 - .short _022626C0 - _02262688 - 2 ; case 2 - .short _022626E4 - _02262688 - 2 ; case 3 -_02262690: - ldr r0, [r4, #4] - ldr r1, [r5, #8] - mov r2, #0 - mov r3, #2 - bl ov70_0226110C - mov r0, #0x91 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _02262702 -_022626A6: - ldr r0, _02262714 ; =ov70_02262908 - mov r2, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r1, [r5, #8] - mov r3, #1 - bl ov70_0226111C - mov r0, #0x91 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - b _02262702 -_022626C0: - ldr r0, _02262718 ; =ov70_02262938 - mov r2, #0 - str r0, [sp] - ldr r0, [r4, #4] - ldr r1, [r5, #8] - mov r3, #4 - bl ov70_0226111C - ldr r0, [r4, #4] - ldr r1, [r5, #8] - mov r2, #1 - bl ov70_02261220 - mov r0, #0x91 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _02262702 -_022626E4: - ldr r0, [r4, #4] - ldr r1, [r5, #8] - mov r2, #1 - mov r3, #0 - bl ov70_0226110C - ldr r0, [r4, #4] - ldr r1, [r5, #8] - mov r2, #0 - bl ov70_02261220 - mov r0, #0x91 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] -_02262702: - ldr r0, _02262710 ; =0x00000612 - add r6, r6, #1 - ldrb r0, [r4, r0] - add r5, r5, #4 - cmp r6, r0 - blt _0226266A -_0226270E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02262710: .word 0x00000612 -_02262714: .word ov70_02262908 -_02262718: .word ov70_02262938 - thumb_func_end ov70_02262658 - - thumb_func_start ov70_0226271C -ov70_0226271C: ; 0x0226271C - mov r1, #0x91 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov70_0226271C - - thumb_func_start ov70_02262724 -ov70_02262724: ; 0x02262724 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02262750 ; =0x00000608 - add r6, r1, #0 - ldrb r0, [r5, r0] - add r7, r2, #0 - mov r4, #0 - cmp r0, #0 - ble _0226274C -_02262736: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov70_02262754 - ldr r0, _02262750 ; =0x00000608 - add r4, r4, #1 - ldrb r0, [r5, r0] - cmp r4, r0 - blt _02262736 -_0226274C: - pop {r3, r4, r5, r6, r7, pc} - nop -_02262750: .word 0x00000608 - thumb_func_end ov70_02262724 - - thumb_func_start ov70_02262754 -ov70_02262754: ; 0x02262754 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, _02262788 ; =0x00000608 - ldrb r0, [r4, r0] - cmp r1, r0 - bhs _02262784 - mov r0, #0x92 - lsl r0, r0, #2 - add r5, r4, r0 - mov r0, #0xc - mul r0, r1 - cmp r2, #0 - beq _0226277A - ldr r1, [r4, #4] - add r0, r5, r0 - add r2, r3, #0 - bl ov70_02262A50 - b _02262780 -_0226277A: - add r0, r5, r0 - bl ov70_02262A80 -_02262780: - mov r0, #1 - pop {r3, r4, r5, pc} -_02262784: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02262788: .word 0x00000608 - thumb_func_end ov70_02262754 - - thumb_func_start ov70_0226278C -ov70_0226278C: ; 0x0226278C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _022627B8 ; =0x00000609 - add r7, r1, #0 - ldrb r0, [r6, r0] - mov r4, #0 - cmp r0, #0 - ble _022627B6 - mov r0, #0xda - lsl r0, r0, #2 - add r5, r6, r0 -_022627A2: - add r0, r5, #0 - add r1, r7, #0 - bl ov70_02262BD0 - ldr r0, _022627B8 ; =0x00000609 - add r4, r4, #1 - ldrb r0, [r6, r0] - add r5, #0xc - cmp r4, r0 - blt _022627A2 -_022627B6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022627B8: .word 0x00000609 - thumb_func_end ov70_0226278C - - thumb_func_start ov70_022627BC -ov70_022627BC: ; 0x022627BC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r1, r5, r0 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r6, [r1, r0] - add r0, #0xc - ldr r7, [r1, r0] - ldr r0, [sp, #0x18] - add r4, r2, #0 - cmp r0, #1 - beq _022627DA - cmp r3, #1 - bne _0226288A -_022627DA: - add r0, r6, #0 - mov r1, #1 - bl ov70_02261348 - cmp r0, #0 - bne _022627F2 - ldr r0, [r5, #4] - add r1, r6, #0 - mov r2, #1 - mov r3, #0 - bl ov70_0226110C -_022627F2: - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _02262830 - add r0, r4, #4 - lsl r1, r0, #2 - beq _02262810 - lsl r0, r0, #0xe - bl sub_020E17FC - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226281E -_02262810: - lsl r0, r0, #0xe - bl sub_020E17FC - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226281E: - bl sub_020E1740 - add r3, r0, #0 - ldr r0, [r5, #4] - add r1, r7, #0 - mov r2, #0 - bl ov70_022612F0 - pop {r3, r4, r5, r6, r7, pc} -_02262830: - ldr r0, _022628C4 ; =0x0000060C - mov r1, #0x1c - ldr r0, [r5, r0] - add r0, r0, #1 - bl sub_020E2178 - ldr r0, _022628C4 ; =0x0000060C - str r1, [r5, r0] - ldr r0, [r5, r0] - cmp r0, #0xe - bhs _0226287C - lsl r0, r4, #2 - beq _0226285C - lsl r0, r4, #0xe - bl sub_020E17FC - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226286A -_0226285C: - lsl r0, r4, #0xe - bl sub_020E17FC - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226286A: - bl sub_020E1740 - add r3, r0, #0 - ldr r0, [r5, #4] - add r1, r7, #0 - mov r2, #0 - bl ov70_022612F0 - pop {r3, r4, r5, r6, r7, pc} -_0226287C: - mov r2, #0 - ldr r0, [r5, #4] - add r1, r7, #0 - add r3, r2, #0 - bl ov70_022612F0 - pop {r3, r4, r5, r6, r7, pc} -_0226288A: - ldr r0, [sp, #0x1c] - cmp r0, #0 - ldr r0, [r5, #4] - beq _022628AC - add r1, r6, #0 - bl ov70_0226128C - ldr r0, [r5, #4] - add r1, r7, #0 - bl ov70_0226128C - ldr r0, [r5, #4] - add r1, r6, #0 - mov r2, #1 - bl ov70_02261398 - pop {r3, r4, r5, r6, r7, pc} -_022628AC: - add r1, r6, #0 - mov r2, #1 - bl ov70_02261220 - mov r2, #0 - ldr r0, [r5, #4] - add r1, r7, #0 - add r3, r2, #0 - bl ov70_022612F0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022628C4: .word 0x0000060C - thumb_func_end ov70_022627BC - - thumb_func_start ov70_022628C8 -ov70_022628C8: ; 0x022628C8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - lsl r1, r2, #0x14 - asr r4, r1, #0x10 - bl ov70_022610E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #4 - ldrsh r2, [r1, r0] - lsl r0, r5, #0x14 - asr r0, r0, #0x10 - cmp r2, r0 - bne _02262900 - mov r0, #6 - ldrsh r0, [r1, r0] - cmp r0, r4 - bne _02262900 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_02262900: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_022628C8 - - thumb_func_start ov70_02262908 -ov70_02262908: ; 0x02262908 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - bl ov70_022610B8 - add r4, r0, #0 - cmp r4, #0xb - beq _02262922 - cmp r4, #0xc - beq _02262922 - bl sub_02022974 -_02262922: - sub r4, #0xb - cmp r4, #1 - bhi _02262934 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - mov r3, #0 - bl ov70_0226110C -_02262934: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02262908 - - thumb_func_start ov70_02262938 -ov70_02262938: ; 0x02262938 - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - bl ov70_022610B8 - add r4, r0, #0 - cmp r4, #0xb - beq _02262952 - cmp r4, #0xc - beq _02262952 - bl sub_02022974 -_02262952: - sub r4, #0xb - cmp r4, #1 - bhi _02262964 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - mov r3, #2 - bl ov70_0226110C -_02262964: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02262938 - - thumb_func_start ov70_02262968 -ov70_02262968: ; 0x02262968 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - ldr r0, [r6, #4] - add r2, r4, #0 - add r5, r1, #0 - bl ov70_022612B4 - cmp r0, #0 - bne _02262980 - mov r4, #1 - b _02262992 -_02262980: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02261368 - mov r1, #2 - lsl r1, r1, #0xc - cmp r0, r1 - ble _02262992 - mov r4, #1 -_02262992: - cmp r4, #1 - bne _022629A4 - add r0, r6, #0 - add r1, r5, #0 - bl ov70_022629DC - ldr r0, _022629A8 ; =0x000005A5 - bl sub_02005748 -_022629A4: - pop {r4, r5, r6, pc} - nop -_022629A8: .word 0x000005A5 - thumb_func_end ov70_02262968 - - thumb_func_start ov70_022629AC -ov70_022629AC: ; 0x022629AC - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r4, #0 - ldr r0, [r5, #4] - add r2, r4, #0 - add r6, r1, #0 - bl ov70_022612B4 - cmp r0, #0 - bne _022629C2 - mov r4, #1 -_022629C2: - cmp r4, #1 - bne _022629D4 - add r0, r5, #0 - add r1, r6, #0 - bl ov70_022629DC - ldr r0, _022629D8 ; =0x000005A9 - bl sub_02005748 -_022629D4: - pop {r4, r5, r6, pc} - nop -_022629D8: .word 0x000005A9 - thumb_func_end ov70_022629AC - - thumb_func_start ov70_022629DC -ov70_022629DC: ; 0x022629DC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - mov r7, #1 -_022629E6: - ldr r0, [r5, #4] - add r1, r6, #0 - add r2, r4, #0 - add r3, r7, #0 - bl ov70_0226110C - add r4, r4, #1 - cmp r4, #3 - blt _022629E6 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_022629DC - - thumb_func_start ov70_022629FC -ov70_022629FC: ; 0x022629FC - str r1, [r0, #0] - mov r1, #0 - strh r1, [r0, #4] - bx lr - thumb_func_end ov70_022629FC - - thumb_func_start ov70_02262A04 -ov70_02262A04: ; 0x02262A04 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrh r2, [r4, #4] - add r5, r1, #0 - cmp r2, #4 - bhi _02262A4E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_02262A1C: ; jump table - .short _02262A4E - _02262A1C - 2 ; case 0 - .short _02262A26 - _02262A1C - 2 ; case 1 - .short _02262A4E - _02262A1C - 2 ; case 2 - .short _02262A30 - _02262A1C - 2 ; case 3 - .short _02262A3A - _02262A1C - 2 ; case 4 -_02262A26: - bl ov70_02262AA4 - mov r0, #2 - strh r0, [r4, #4] - pop {r3, r4, r5, pc} -_02262A30: - bl ov70_02262B24 - mov r0, #4 - strh r0, [r4, #4] - pop {r3, r4, r5, pc} -_02262A3A: - bl ov70_02262B2C - cmp r0, #1 - bne _02262A4E - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02262AE0 - mov r0, #0 - strh r0, [r4, #4] -_02262A4E: - pop {r3, r4, r5, pc} - thumb_func_end ov70_02262A04 - - thumb_func_start ov70_02262A50 -ov70_02262A50: ; 0x02262A50 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r2, #0 - ldrh r2, [r5, #4] - ldr r3, _02262A7C ; =0x0000FFFF - add r6, r2, r3 - lsl r6, r6, #0x10 - lsr r6, r6, #0x10 - cmp r6, #1 - bls _02262A7A - sub r3, r3, #2 - add r2, r2, r3 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - cmp r2, #1 - bhi _02262A74 - bl ov70_02262AE0 -_02262A74: - mov r0, #1 - strh r0, [r5, #4] - str r4, [r5, #8] -_02262A7A: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02262A7C: .word 0x0000FFFF - thumb_func_end ov70_02262A50 - - thumb_func_start ov70_02262A80 -ov70_02262A80: ; 0x02262A80 - ldrh r2, [r0, #4] - ldr r1, _02262AA0 ; =0x0000FFFD - add r1, r2, r1 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - cmp r1, #1 - bls _02262A9C - cmp r2, #1 - bhi _02262A98 - mov r1, #0 - strh r1, [r0, #4] - bx lr -_02262A98: - mov r1, #3 - strh r1, [r0, #4] -_02262A9C: - bx lr - nop -_02262AA0: .word 0x0000FFFD - thumb_func_end ov70_02262A80 - - thumb_func_start ov70_02262AA4 -ov70_02262AA4: ; 0x02262AA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - bl ov70_022613C0 - mov r2, #0 - ldr r1, [r5, #0] - add r0, r4, #0 - add r3, r2, #0 - bl ov70_0226110C - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #1 - mov r3, #0 - bl ov70_0226110C - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #2 - mov r3, #0 - bl ov70_0226110C - ldr r0, [r5, #0] - mov r1, #1 - bl ov70_0226138C - pop {r3, r4, r5, pc} - thumb_func_end ov70_02262AA4 - - thumb_func_start ov70_02262AE0 -ov70_02262AE0: ; 0x02262AE0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #0 - bl ov70_02261220 - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #1 - bl ov70_02261220 - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #2 - bl ov70_02261220 - ldr r0, [r5, #0] - mov r1, #0 - bl ov70_0226138C - ldr r0, [r5, #0] - bl ov70_022613E0 - mov r1, #1 - lsl r1, r1, #0xc - ldr r0, [r5, #0] - add r2, r1, #0 - add r3, r1, #0 - bl ov70_022613E8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02262AE0 - - thumb_func_start ov70_02262B24 -ov70_02262B24: ; 0x02262B24 - mov r1, #0 - strh r1, [r0, #6] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02262B24 - - thumb_func_start ov70_02262B2C -ov70_02262B2C: ; 0x02262B2C - push {r3, r4, r5, lr} - add r4, r0, #0 - mov r0, #6 - ldrsh r1, [r4, r0] - cmp r1, #0xa - bge _02262BC8 - add r1, r1, #1 - strh r1, [r4, #6] - ldrsh r0, [r4, r0] - ldr r2, [r4, #8] - lsl r0, r0, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #0xa - lsl r1, r1, #0xc - bl sub_020BCFD0 - add r2, r0, #0 - ldr r1, [r4, #8] - ldr r0, [r4, #0] - add r1, r2, r1 - bl ov70_022613C0 - mov r0, #6 - ldrsh r1, [r4, r0] - mov r0, #0x1f - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - mov r2, #0x1f - sub r1, r2, r0 - lsl r1, r1, #0x18 - ldr r0, [r4, #0] - lsr r1, r1, #0x18 - bl ov70_022613C8 - mov r0, #6 - ldrsh r0, [r4, r0] - ldr r2, _02262BCC ; =0x000002E1 - mov r3, #0 - lsl r0, r0, #0xc - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #0xa - lsl r1, r1, #0xc - bl sub_020BCFD0 - mov r3, #1 - add r5, r0, #0 - lsl r3, r3, #0xc - add r1, r5, r3 - ldr r0, [r4, #0] - add r2, r1, #0 - add r3, r5, r3 - bl ov70_022613E8 - mov r0, #0 - pop {r3, r4, r5, pc} -_02262BC8: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02262BCC: .word 0x000002E1 - thumb_func_end ov70_02262B2C - - thumb_func_start ov70_02262BD0 -ov70_02262BD0: ; 0x02262BD0 - ldrh r3, [r0, #4] - ldr r2, _02262BE8 ; =0x0000FFFF - add r2, r3, r2 - lsl r2, r2, #0x10 - lsr r2, r2, #0x10 - cmp r2, #1 - bls _02262BE4 - mov r2, #1 - strh r2, [r0, #4] - str r1, [r0, #8] -_02262BE4: - bx lr - nop -_02262BE8: .word 0x0000FFFF - thumb_func_end ov70_02262BD0 - - thumb_func_start ov70_02262BEC -ov70_02262BEC: ; 0x02262BEC - push {r4, lr} - add r4, r0, #0 - ldrh r2, [r4, #4] - cmp r2, #4 - bhi _02262C5E - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_02262C02: ; jump table - .short _02262C62 - _02262C02 - 2 ; case 0 - .short _02262C0C - _02262C02 - 2 ; case 1 - .short _02262C16 - _02262C02 - 2 ; case 2 - .short _02262C2A - _02262C02 - 2 ; case 3 - .short _02262C34 - _02262C02 - 2 ; case 4 -_02262C0C: - bl ov70_02262C64 - mov r0, #2 - strh r0, [r4, #4] - pop {r4, pc} -_02262C16: - add r0, r1, #0 - ldr r1, [r4, #0] - mov r2, #0 - bl ov70_022612B4 - cmp r0, #0 - bne _02262C62 - mov r0, #3 - strh r0, [r4, #4] - pop {r4, pc} -_02262C2A: - bl ov70_02262B24 - mov r0, #4 - strh r0, [r4, #4] - pop {r4, pc} -_02262C34: - bl ov70_02262B2C - cmp r0, #1 - bne _02262C62 - ldr r0, [r4, #0] - mov r1, #0 - bl ov70_0226138C - ldr r0, [r4, #0] - bl ov70_022613E0 - mov r1, #1 - lsl r1, r1, #0xc - ldr r0, [r4, #0] - add r2, r1, #0 - add r3, r1, #0 - bl ov70_022613E8 - mov r0, #0 - strh r0, [r4, #4] - pop {r4, pc} -_02262C5E: - bl sub_02022974 -_02262C62: - pop {r4, pc} - thumb_func_end ov70_02262BEC - - thumb_func_start ov70_02262C64 -ov70_02262C64: ; 0x02262C64 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - bl ov70_022613C0 - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #0 - mov r3, #1 - bl ov70_0226110C - mov r2, #1 - ldr r1, [r5, #0] - add r0, r4, #0 - add r3, r2, #0 - bl ov70_0226110C - ldr r0, [r5, #0] - mov r1, #1 - bl ov70_0226138C - pop {r3, r4, r5, pc} - thumb_func_end ov70_02262C64 - - thumb_func_start ov70_02262C94 -ov70_02262C94: ; 0x02262C94 - push {r4, lr} - add r4, r0, #0 - ldrh r2, [r4, #4] - cmp r2, #4 - bhi _02262D06 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_02262CAA: ; jump table - .short _02262D0A - _02262CAA - 2 ; case 0 - .short _02262CB4 - _02262CAA - 2 ; case 1 - .short _02262CBE - _02262CAA - 2 ; case 2 - .short _02262CD2 - _02262CAA - 2 ; case 3 - .short _02262CDC - _02262CAA - 2 ; case 4 -_02262CB4: - bl ov70_02262D0C - mov r0, #2 - strh r0, [r4, #4] - pop {r4, pc} -_02262CBE: - add r0, r1, #0 - ldr r1, [r4, #0] - mov r2, #0 - bl ov70_022612B4 - cmp r0, #0 - bne _02262D0A - mov r0, #3 - strh r0, [r4, #4] - pop {r4, pc} -_02262CD2: - bl ov70_02262B24 - mov r0, #4 - strh r0, [r4, #4] - pop {r4, pc} -_02262CDC: - bl ov70_02262B2C - cmp r0, #1 - bne _02262D0A - ldr r0, [r4, #0] - mov r1, #0 - bl ov70_0226138C - ldr r0, [r4, #0] - bl ov70_022613E0 - mov r1, #1 - lsl r1, r1, #0xc - ldr r0, [r4, #0] - add r2, r1, #0 - add r3, r1, #0 - bl ov70_022613E8 - mov r0, #0 - strh r0, [r4, #4] - pop {r4, pc} -_02262D06: - bl sub_02022974 -_02262D0A: - pop {r4, pc} - thumb_func_end ov70_02262C94 - - thumb_func_start ov70_02262D0C -ov70_02262D0C: ; 0x02262D0C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, [r5, #0] - ldr r1, [r5, #8] - bl ov70_022613C0 - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #0 - mov r3, #1 - bl ov70_0226110C - mov r2, #1 - ldr r1, [r5, #0] - add r0, r4, #0 - add r3, r2, #0 - bl ov70_0226110C - ldr r1, [r5, #0] - add r0, r4, #0 - mov r2, #2 - mov r3, #1 - bl ov70_0226110C - ldr r0, [r5, #0] - mov r1, #1 - bl ov70_0226138C - pop {r3, r4, r5, pc} - thumb_func_end ov70_02262D0C - - thumb_func_start ov70_02262D48 -ov70_02262D48: ; 0x02262D48 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - cmp r4, #0x5c - beq _02262D5C - cmp r4, #0x5d - beq _02262D5C - bl sub_02022974 -_02262D5C: - add r0, r5, #0 - bl ov70_022610E4 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - sub r4, #0x5c - lsl r2, r4, #2 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #4 - ldrsh r3, [r1, r0] - ldr r0, _02262DA4 ; =0x0226D90C - ldr r0, [r0, r2] - add r0, r3, r0 - strh r0, [r1, #4] - mov r0, #6 - ldrsh r0, [r1, r0] - mov r3, sp - sub r3, r3, #4 - sub r0, #0xa - strh r0, [r1, #6] - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov70_022610BC - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02262DA4: .word 0x0226D90C - thumb_func_end ov70_02262D48 - - thumb_func_start ov70_02262DA8 -ov70_02262DA8: ; 0x02262DA8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0xbf - add r4, r0, #0 - add r0, r6, #0 - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0xbf - mov r1, #0 - lsl r2, r2, #2 - add r7, r0, #0 - bl sub_020D5124 - str r6, [r7, #0] - add r5, r7, #0 - str r4, [r7, #4] - mov r4, #0 - add r5, #8 -_02262DCE: - add r0, r5, #0 - add r1, r4, #0 - add r2, r6, #0 - bl ov70_02262F64 - add r4, r4, #1 - add r5, #0x24 - cmp r4, #0x14 - blt _02262DCE - mov r0, #0xb6 - lsl r0, r0, #2 - add r0, r7, r0 - mov r1, #0 - add r2, r6, #0 - bl ov70_02262F64 - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02262DA8 - - thumb_func_start ov70_02262DF4 -ov70_02262DF4: ; 0x02262DF4 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r6, #0 - mov r4, #0 - add r5, #8 -_02262DFE: - add r0, r5, #0 - bl ov70_02262F70 - add r4, r4, #1 - add r5, #0x24 - cmp r4, #0x14 - blt _02262DFE - mov r0, #0xb6 - lsl r0, r0, #2 - add r0, r6, r0 - bl ov70_02262F70 - add r0, r6, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02262DF4 - - thumb_func_start ov70_02262E20 -ov70_02262E20: ; 0x02262E20 - ldr r3, _02262E28 ; =ov70_02262F14 - mov r1, #0 - bx r3 - nop -_02262E28: .word ov70_02262F14 - thumb_func_end ov70_02262E20 - - thumb_func_start ov70_02262E2C -ov70_02262E2C: ; 0x02262E2C - ldr r3, _02262E34 ; =ov70_02262F14 - mov r1, #1 - bx r3 - nop -_02262E34: .word ov70_02262F14 - thumb_func_end ov70_02262E2C - - thumb_func_start ov70_02262E38 -ov70_02262E38: ; 0x02262E38 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov70_02262E38 - - thumb_func_start ov70_02262E3C -ov70_02262E3C: ; 0x02262E3C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - add r4, r1, #0 - cmp r0, #0 - beq _02262E4C - bl sub_02022974 -_02262E4C: - ldrh r0, [r5] - add r1, r4, #0 - bl sub_02018144 - mov r1, #0 - add r2, r4, #0 - str r0, [r5, #8] - bl sub_020D5124 - ldr r0, [r5, #8] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02262E3C - - thumb_func_start ov70_02262E64 -ov70_02262E64: ; 0x02262E64 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - bne _02262E72 - bl sub_02022974 -_02262E72: - ldr r0, [r4, #8] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02262E64 - - thumb_func_start ov70_02262E80 -ov70_02262E80: ; 0x02262E80 - ldr r0, [r0, #8] - bx lr - thumb_func_end ov70_02262E80 - - thumb_func_start ov70_02262E84 -ov70_02262E84: ; 0x02262E84 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov70_02262E84 - - thumb_func_start ov70_02262E88 -ov70_02262E88: ; 0x02262E88 - str r1, [r0, #0x10] - bx lr - thumb_func_end ov70_02262E88 - - thumb_func_start ov70_02262E8C -ov70_02262E8C: ; 0x02262E8C - ldr r1, [r0, #0x10] - add r1, r1, #1 - str r1, [r0, #0x10] - bx lr - thumb_func_end ov70_02262E8C - - thumb_func_start ov70_02262E94 -ov70_02262E94: ; 0x02262E94 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _02262EA6 - bl sub_02022974 -_02262EA6: - cmp r4, #0x14 - blo _02262EAE - bl sub_02022974 -_02262EAE: - mov r0, #0x24 - add r5, #8 - mul r0, r4 - add r0, r5, r0 - add r1, r6, #0 - add r2, r7, #0 - bl ov70_02262FD4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02262E94 - - thumb_func_start ov70_02262EC0 -ov70_02262EC0: ; 0x02262EC0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r5, #0 - bne _02262ED2 - bl sub_02022974 -_02262ED2: - cmp r4, #0x14 - blo _02262EDA - bl sub_02022974 -_02262EDA: - mov r0, #0x24 - add r5, #8 - mul r0, r4 - add r0, r5, r0 - add r1, r6, #0 - add r2, r7, #0 - bl ov70_0226300C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02262EC0 - - thumb_func_start ov70_02262EEC -ov70_02262EEC: ; 0x02262EEC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0 - bne _02262EFC - bl sub_02022974 -_02262EFC: - cmp r4, #0x14 - blo _02262F04 - bl sub_02022974 -_02262F04: - mov r0, #0x24 - add r5, #8 - mul r0, r4 - add r0, r5, r0 - add r1, r6, #0 - bl ov70_02263008 - pop {r4, r5, r6, pc} - thumb_func_end ov70_02262EEC - - thumb_func_start ov70_02262F14 -ov70_02262F14: ; 0x02262F14 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0xb6 - lsl r0, r0, #2 - add r0, r7, r0 - str r1, [sp] - bl ov70_0226307C - cmp r0, #1 - bne _02262F3A - mov r0, #0xb6 - lsl r0, r0, #2 - ldr r2, [sp] - add r0, r7, r0 - add r1, r7, #0 - mov r3, #0 - bl ov70_02262F94 - pop {r3, r4, r5, r6, r7, pc} -_02262F3A: - add r6, r7, #0 - add r6, #8 - mov r4, #0 - add r5, r6, #0 -_02262F42: - add r0, r6, #0 - bl ov70_0226307C - cmp r0, #1 - bne _02262F58 - ldr r2, [sp] - add r0, r5, #0 - add r1, r7, #0 - add r3, r4, #0 - bl ov70_02262F94 -_02262F58: - add r4, r4, #1 - add r6, #0x24 - add r5, #0x24 - cmp r4, #0x14 - blt _02262F42 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02262F14 - - thumb_func_start ov70_02262F64 -ov70_02262F64: ; 0x02262F64 - strh r2, [r0] - mov r2, #1 - strb r2, [r0, #2] - strb r1, [r0, #3] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02262F64 - - thumb_func_start ov70_02262F70 -ov70_02262F70: ; 0x02262F70 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02262F7E - bl sub_020181C4 -_02262F7E: - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _02262F88 - bl sub_020181C4 -_02262F88: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x24 - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov70_02262F70 - - thumb_func_start ov70_02262F94 -ov70_02262F94: ; 0x02262F94 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrb r0, [r5, #2] - add r6, r1, #0 - add r7, r3, #0 - cmp r0, #0 - beq _02262FD2 - cmp r2, #0 - beq _02262FAC - cmp r2, #1 - beq _02262FB2 - b _02262FB8 -_02262FAC: - ldr r0, [r5, #4] - ldr r4, [r0, #0] - b _02262FBC -_02262FB2: - ldr r0, [r5, #4] - ldr r4, [r0, #4] - b _02262FBC -_02262FB8: - bl sub_02022974 -_02262FBC: - cmp r4, #0 - beq _02262FD2 - ldr r1, [r6, #4] - add r0, r5, #0 - add r2, r7, #0 - blx r4 - cmp r0, #1 - bne _02262FD2 - add r0, r5, #0 - bl ov70_02263044 -_02262FD2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02262F94 - - thumb_func_start ov70_02262FD4 -ov70_02262FD4: ; 0x02262FD4 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov70_0226306C - cmp r0, #1 - beq _02262FEA - bl sub_02022974 -_02262FEA: - ldr r0, [r5, #8] - cmp r0, #0 - beq _02262FF4 - bl sub_02022974 -_02262FF4: - mov r3, #0 - add r0, r5, #4 - add r1, r4, #0 - add r2, r6, #0 - str r3, [sp] - bl ov70_0226308C - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02262FD4 - - thumb_func_start ov70_02263008 -ov70_02263008: ; 0x02263008 - strb r1, [r0, #2] - bx lr - thumb_func_end ov70_02263008 - - thumb_func_start ov70_0226300C -ov70_0226300C: ; 0x0226300C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - bl ov70_0226306C - cmp r0, #1 - beq _02263022 - bl sub_02022974 -_02263022: - add r2, r5, #0 - add r3, r5, #4 - add r2, #0x14 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r3, #0 - add r0, r5, #4 - add r1, r4, #0 - add r2, r6, #0 - str r3, [sp] - bl ov70_0226308C - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0226300C - - thumb_func_start ov70_02263044 -ov70_02263044: ; 0x02263044 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _02263052 - bl sub_02022974 -_02263052: - add r3, r4, #0 - add r3, #0x14 - add r2, r4, #4 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r4, #0x14 - add r0, r4, #0 - bl ov70_02263098 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02263044 - - thumb_func_start ov70_0226306C -ov70_0226306C: ; 0x0226306C - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _02263076 - mov r0, #1 - bx lr -_02263076: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226306C - - thumb_func_start ov70_0226307C -ov70_0226307C: ; 0x0226307C - ldr r0, [r0, #4] - cmp r0, #0 - beq _02263086 - mov r0, #1 - bx lr -_02263086: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226307C - - thumb_func_start ov70_0226308C -ov70_0226308C: ; 0x0226308C - str r1, [r0, #0] - ldr r1, [sp] - str r3, [r0, #0xc] - str r1, [r0, #4] - str r2, [r0, #8] - bx lr - thumb_func_end ov70_0226308C - - thumb_func_start ov70_02263098 -ov70_02263098: ; 0x02263098 - mov r1, #0 - str r1, [r0, #0] - str r1, [r0, #0xc] - str r1, [r0, #4] - str r1, [r0, #8] - bx lr - thumb_func_end ov70_02263098 - - thumb_func_start ov70_022630A4 -ov70_022630A4: ; 0x022630A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov70_0225DEEC - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225DF10 - add r7, r0, #0 - add r0, r5, #0 - bl ov70_0225DF2C - add r6, r0, #0 - add r0, r5, #0 - bl ov70_0225DEE8 - mov r1, #1 - bl ov66_0222E3E4 - ldrh r0, [r4, #6] - cmp r0, #4 - blo _022630D4 - bl sub_02022974 -_022630D4: - ldrh r2, [r4, #6] - ldr r3, _022630E8 ; =0x0226DA78 - add r0, r7, #0 - lsl r2, r2, #3 - add r2, r3, r2 - add r1, r6, #0 - mov r3, #0 - bl ov70_02262E94 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022630E8: .word 0x0226DA78 - thumb_func_end ov70_022630A4 - - thumb_func_start ov70_022630EC -ov70_022630EC: ; 0x022630EC - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - bl ov70_0225DF2C - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DF10 - ldr r7, _0226311C ; =0x0226DA10 - add r6, r0, #0 - mov r4, #0 -_02263102: - cmp r5, r4 - beq _02263112 - add r0, r6, #0 - add r1, r4, #0 - add r2, r7, #0 - mov r3, #0 - bl ov70_02262E94 -_02263112: - add r4, r4, #1 - cmp r4, #0x14 - blt _02263102 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226311C: .word 0x0226DA10 - thumb_func_end ov70_022630EC - - thumb_func_start ov70_02263120 -ov70_02263120: ; 0x02263120 - cmp r0, #3 - bhi _02263146 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02263130: ; jump table - .short _02263138 - _02263130 - 2 ; case 0 - .short _0226313C - _02263130 - 2 ; case 1 - .short _02263140 - _02263130 - 2 ; case 2 - .short _02263144 - _02263130 - 2 ; case 3 -_02263138: - mov r1, #0x40 - b _02263146 -_0226313C: - mov r1, #0x80 - b _02263146 -_02263140: - mov r1, #0x20 - b _02263146 -_02263144: - mov r1, #0x10 -_02263146: - ldr r0, _02263158 ; =0x021BF67C - ldr r0, [r0, #0x44] - tst r0, r1 - beq _02263152 - mov r0, #1 - bx lr -_02263152: - mov r0, #0 - bx lr - nop -_02263158: .word 0x021BF67C - thumb_func_end ov70_02263120 - - thumb_func_start ov70_0226315C -ov70_0226315C: ; 0x0226315C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r1, [sp] - add r7, r0, #0 - str r2, [sp, #4] - add r4, r3, #0 - ldr r5, [sp, #0x28] - bl ov70_02262E80 - str r0, [sp, #0xc] - ldr r0, [sp] - bl ov70_0225DF10 - str r0, [sp, #8] - ldr r0, [r4, #8] - mov r2, #0 - cmp r0, #3 - beq _022631F0 - add r6, r4, #0 - add r1, r2, #0 -_02263184: - add r3, r1, #0 -_02263186: - ldrb r0, [r6, r3] - cmp r0, #0xff - beq _022631E6 - cmp r5, r0 - bne _022631E0 - mov r0, #0x18 - add r5, r2, #0 - mul r5, r0 - add r6, r4, r5 - ldr r0, [r6, #8] - cmp r0, #0 - beq _022631A6 - cmp r0, #1 - beq _022631BE - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_022631A6: - add r0, r7, #0 - bl ov70_02262E64 - add r2, r6, #0 - ldr r0, [sp, #8] - ldr r1, [sp, #4] - add r2, #0xc - mov r3, #0 - bl ov70_02262E94 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_022631BE: - ldr r7, [r6, #0x14] - cmp r7, #0 - beq _022631CE - ldrb r3, [r3, r6] - ldr r0, [sp, #0xc] - ldr r1, [sp] - ldr r2, [sp, #4] - blx r7 -_022631CE: - add r2, r4, r5 - ldr r0, [sp, #8] - ldr r1, [sp, #4] - add r2, #0xc - mov r3, #0 - bl ov70_02262EC0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} -_022631E0: - add r3, r3, #1 - cmp r3, #8 - blt _02263186 -_022631E6: - add r6, #0x18 - ldr r0, [r6, #8] - add r2, r2, #1 - cmp r0, #3 - bne _02263184 -_022631F0: - bl sub_02022974 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0226315C - - thumb_func_start ov70_022631F8 -ov70_022631F8: ; 0x022631F8 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - bl ov70_0225DEF0 - add r1, r4, #0 - bl ov70_0225CB28 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225DF08 - add r5, r0, #0 - add r0, r4, #0 - add r1, sp, #0 - bl ov70_0225D054 - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r5, #0 - bl ov70_02260B20 - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_022631F8 - - thumb_func_start ov70_02263230 -ov70_02263230: ; 0x02263230 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - str r3, [sp] - bl ov70_0225DEF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225DF08 - str r0, [sp, #4] - ldr r3, [sp] - add r0, r4, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov70_0225CB5C - add r5, r0, #0 - ldr r3, [sp, #0x20] - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov70_0225CD7C - ldr r0, [sp, #4] - add r1, r5, #0 - bl ov70_02260B38 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02263230 - - thumb_func_start ov70_02263270 -ov70_02263270: ; 0x02263270 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - str r0, [r4, #0] - strb r0, [r4, #4] - mov r0, #1 - strb r0, [r4, #5] - bl sub_0201D35C - mov r1, #3 - and r0, r1 - strb r0, [r4, #6] - mov r0, #1 - strb r0, [r4, #7] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_02263270 - - thumb_func_start ov70_02263290 -ov70_02263290: ; 0x02263290 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #5] - cmp r0, #0 - beq _022632A4 - cmp r0, #1 - beq _022632AA - cmp r0, #2 - beq _022632BC - b _0226331E -_022632A4: - mov r0, #0 - str r0, [r4, #0] - b _0226331E -_022632AA: - ldrb r0, [r4, #6] - sub r0, r0, #1 - cmp r0, #0 - ble _022632B6 - strb r0, [r4, #6] - b _0226331E -_022632B6: - mov r0, #2 - strb r0, [r4, #5] - b _0226331E -_022632BC: - mov r0, #4 - ldrsb r1, [r4, r0] - mov r3, #0 - add r1, r1, #1 - strb r1, [r4, #4] - ldrsb r1, [r4, r0] - ldr r0, _02263324 ; =0x00007FFF - add r2, r1, #0 - mul r2, r0 - asr r0, r2, #1 - lsr r0, r0, #0x1e - add r0, r2, r0 - lsl r0, r0, #0xe - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02263328 ; =0x020F983C - mov r2, #6 - ldrsh r0, [r0, r1] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r4, #0] - mov r0, #4 - ldrsb r0, [r4, r0] - cmp r0, #4 - blt _0226331E - ldrb r0, [r4, #7] - cmp r0, #1 - bne _0226331C - strb r3, [r4, #4] - mov r0, #1 - strb r0, [r4, #5] - bl sub_0201D35C - mov r1, #3 - and r0, r1 - strb r0, [r4, #6] - b _0226331E -_0226331C: - strb r3, [r4, #5] -_0226331E: - ldr r0, [r4, #0] - pop {r4, pc} - nop -_02263324: .word 0x00007FFF -_02263328: .word 0x020F983C - thumb_func_end ov70_02263290 - - thumb_func_start ov70_0226332C -ov70_0226332C: ; 0x0226332C - mov r1, #0 - strb r1, [r0, #7] - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226332C - - thumb_func_start ov70_02263334 -ov70_02263334: ; 0x02263334 - ldrb r0, [r0, #5] - cmp r0, #0 - beq _0226333E - mov r0, #1 - bx lr -_0226333E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_02263334 - - thumb_func_start ov70_02263344 -ov70_02263344: ; 0x02263344 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - add r0, r5, #0 - bl ov70_0225DEF0 - add r1, r4, #0 - add r7, r0, #0 - bl ov70_0225CC70 - str r0, [sp] - add r0, r5, #0 - bl ov70_0225DEE8 - str r0, [sp, #4] - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _0226337A - cmp r0, #1 - beq _0226339E - cmp r0, #2 - beq _022633B4 - b _0226340C -_0226337A: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0225E46C - add r0, r6, #0 - mov r1, #1 - bl ov70_02262E88 - ldr r0, [sp, #4] - bl ov66_0222E338 - cmp r4, r0 - bne _0226340C - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E43C - b _0226340C -_0226339E: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0225E4AC - cmp r0, #1 - bne _0226340C - add r0, r6, #0 - mov r1, #2 - bl ov70_02262E88 - b _0226340C -_022633B4: - ldr r0, [sp, #4] - bl ov66_0222E338 - cmp r4, r0 - bne _022633CA - ldr r1, [sp] - add r0, r7, #0 - mov r2, #1 - bl ov70_0225CDEC - b _02263400 -_022633CA: - add r0, r5, #0 - bl ov70_0225E3F0 - cmp r0, #1 - bne _022633EA - add r0, r5, #0 - bl ov70_0225E3E0 - cmp r4, r0 - beq _022633F4 - ldr r1, [sp] - add r0, r7, #0 - mov r2, #2 - bl ov70_0225CDEC - b _022633F4 -_022633EA: - ldr r1, [sp] - add r0, r7, #0 - mov r2, #2 - bl ov70_0225CDEC -_022633F4: - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF4C -_02263400: - add r0, r5, #0 - bl ov70_0225E44C - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0226340C: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02263344 - - thumb_func_start ov70_02263414 -ov70_02263414: ; 0x02263414 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - str r2, [sp] - bl ov70_0225DEE8 - str r0, [sp, #4] - add r0, r5, #0 - bl ov70_0225DEF0 - str r0, [sp, #8] - bl ov70_0225CCAC - add r7, r0, #0 - add r0, r6, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0x16 - bhi _022634FE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02263452: ; jump table - .short _02263480 - _02263452 - 2 ; case 0 - .short _022634C0 - _02263452 - 2 ; case 1 - .short _022634F6 - _02263452 - 2 ; case 2 - .short _02263510 - _02263452 - 2 ; case 3 - .short _0226352A - _02263452 - 2 ; case 4 - .short _02263544 - _02263452 - 2 ; case 5 - .short _0226355E - _02263452 - 2 ; case 6 - .short _02263578 - _02263452 - 2 ; case 7 - .short _0226358E - _02263452 - 2 ; case 8 - .short _022635AE - _02263452 - 2 ; case 9 - .short _022635E0 - _02263452 - 2 ; case 10 - .short _02263654 - _02263452 - 2 ; case 11 - .short _0226369A - _02263452 - 2 ; case 12 - .short _022636CC - _02263452 - 2 ; case 13 - .short _022638F6 - _02263452 - 2 ; case 14 - .short _02263740 - _02263452 - 2 ; case 15 - .short _02263786 - _02263452 - 2 ; case 16 - .short _022637DE - _02263452 - 2 ; case 17 - .short _022637FE - _02263452 - 2 ; case 18 - .short _0226384C - _02263452 - 2 ; case 19 - .short _02263876 - _02263452 - 2 ; case 20 - .short _022638AA - _02263452 - 2 ; case 21 - .short _022638BE - _02263452 - 2 ; case 22 -_02263480: - add r0, r6, #0 - mov r1, #0x2c - bl ov70_02262E3C - add r1, r5, #0 - add r4, r0, #0 - bl ov70_022653DC - ldr r0, [sp, #4] - bl ov66_0222E2CC - ldr r0, [sp, #4] - bl ov66_0222F0DC - strh r0, [r4, #2] - ldrh r1, [r4, #2] - ldr r0, [sp, #4] - bl ov66_0222E528 - ldr r1, [sp] - add r0, r5, #0 - bl ov70_022631F8 - add r1, r0, #0 - ldr r0, [sp, #8] - mov r2, #4 - bl ov70_0225CDEC - add r0, r6, #0 - bl ov70_02262E8C - b _022638F6 -_022634C0: - add r0, r5, #0 - bl ov70_0225DF30 - cmp r0, #0 - bne _022634FE - add r0, r7, #0 - bl ov70_0225CE38 - cmp r0, #1 - bne _022634FE - ldr r0, [sp, #8] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - add r0, r5, #0 - bl ov70_0225DF08 - add r1, r7, #0 - bl ov70_02260B38 - mov r0, #0x10 - str r0, [r4, #4] - add r0, r6, #0 - bl ov70_02262E8C - b _022638F6 -_022634F6: - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - beq _02263500 -_022634FE: - b _022638F6 -_02263500: - add r0, r5, #0 - mov r1, #1 - bl ov70_0225DF18 - add r0, r6, #0 - bl ov70_02262E8C - b _022638F6 -_02263510: - ldr r0, [sp, #8] - add r1, r7, #0 - mov r2, #2 - mov r3, #0 - bl ov70_0225CD7C - mov r0, #4 - strh r0, [r4] - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - b _022638F6 -_0226352A: - ldr r0, [sp, #8] - add r1, r7, #0 - mov r2, #2 - mov r3, #0 - bl ov70_0225CD7C - mov r0, #5 - strh r0, [r4] - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - b _022638F6 -_02263544: - ldr r0, [sp, #8] - add r1, r7, #0 - mov r2, #1 - mov r3, #3 - bl ov70_0225CD7C - mov r0, #6 - strh r0, [r4] - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - b _022638F6 -_0226355E: - ldr r0, [sp, #8] - add r1, r7, #0 - mov r2, #2 - mov r3, #3 - bl ov70_0225CD7C - mov r0, #8 - strh r0, [r4] - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - b _022638F6 -_02263578: - add r0, r7, #0 - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _02263662 - ldrh r1, [r4] - add r0, r6, #0 - bl ov70_02262E88 - b _022638F6 -_0226358E: - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x10 - strh r0, [r4] - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - b _022638F6 -_022635AE: - add r0, r5, #0 - mov r1, #1 - mov r2, #5 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r4, #8 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E0F4 - add r0, r6, #0 - mov r1, #0xa - bl ov70_02262E88 - b _022638F6 -_022635E0: - add r0, r5, #0 - mov r7, #0 - bl ov70_0225E0D4 - add r2, r0, #0 - beq _02263600 - sub r0, r7, #2 - cmp r2, r0 - beq _022635FA - add r0, r0, #1 - cmp r2, r0 - beq _02263614 - b _02263608 -_022635FA: - ldr r0, _022638FC ; =0x000005DC - bl sub_02005748 -_02263600: - mov r0, #0 - strh r0, [r4, #0x28] - mov r7, #1 - b _02263614 -_02263608: - add r0, r5, #0 - mov r1, #0 - strh r2, [r4, #0x28] - mov r7, #1 - bl ov70_0225E30C -_02263614: - cmp r7, #1 - bne _02263662 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - ldrh r0, [r4, #0x28] - cmp r0, #0 - beq _0226364A - add r0, r5, #0 - mov r1, #1 - mov r2, #8 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225E164 - add r0, r6, #0 - mov r1, #0xb - bl ov70_02262E88 - b _022638F6 -_0226364A: - add r0, r6, #0 - mov r1, #0x11 - bl ov70_02262E88 - b _022638F6 -_02263654: - add r0, r5, #0 - bl ov70_0225E1C4 - cmp r0, #0 - beq _02263664 - cmp r0, #1 - beq _0226368A -_02263662: - b _022638F6 -_02263664: - add r0, r5, #0 - bl ov70_0225E1F8 - add r0, r6, #0 - mov r1, #0xc - bl ov70_02262E88 - ldrh r1, [r4, #0x28] - ldrh r2, [r4, #0x2a] - ldr r0, [sp, #4] - bl ov66_0222E56C - add r0, r5, #0 - bl ov70_0225E390 - ldr r0, _02263900 ; =0x000005E5 - bl sub_02005748 - b _022638F6 -_0226368A: - add r0, r5, #0 - bl ov70_0225E1F8 - add r0, r6, #0 - mov r1, #9 - bl ov70_02262E88 - b _022638F6 -_0226369A: - add r0, r5, #0 - mov r1, #1 - mov r2, #0xa - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r4, #8 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E0F4 - add r0, r6, #0 - mov r1, #0xd - bl ov70_02262E88 - b _022638F6 -_022636CC: - add r0, r5, #0 - mov r7, #0 - bl ov70_0225E0D4 - add r2, r0, #0 - beq _022636EC - sub r0, r7, #2 - cmp r2, r0 - beq _022636E6 - add r0, r0, #1 - cmp r2, r0 - beq _02263700 - b _022636F4 -_022636E6: - ldr r0, _022638FC ; =0x000005DC - bl sub_02005748 -_022636EC: - mov r0, #0 - strh r0, [r4, #0x2a] - mov r7, #1 - b _02263700 -_022636F4: - add r0, r5, #0 - mov r1, #0 - strh r2, [r4, #0x2a] - mov r7, #1 - bl ov70_0225E30C -_02263700: - cmp r7, #1 - bne _0226374E - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - ldrh r0, [r4, #0x2a] - cmp r0, #0 - beq _02263736 - add r0, r5, #0 - mov r1, #1 - mov r2, #8 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225E164 - add r0, r6, #0 - mov r1, #0xf - bl ov70_02262E88 - b _022638F6 -_02263736: - add r0, r6, #0 - mov r1, #0x13 - bl ov70_02262E88 - b _022638F6 -_02263740: - add r0, r5, #0 - bl ov70_0225E1C4 - cmp r0, #0 - beq _02263750 - cmp r0, #1 - beq _02263776 -_0226374E: - b _022638F6 -_02263750: - add r0, r5, #0 - bl ov70_0225E1F8 - add r0, r6, #0 - mov r1, #0x14 - bl ov70_02262E88 - ldrh r1, [r4, #0x28] - ldrh r2, [r4, #0x2a] - ldr r0, [sp, #4] - bl ov66_0222E56C - add r0, r5, #0 - bl ov70_0225E390 - ldr r0, _02263900 ; =0x000005E5 - bl sub_02005748 - b _022638F6 -_02263776: - add r0, r5, #0 - bl ov70_0225E1F8 - add r0, r6, #0 - mov r1, #0xc - bl ov70_02262E88 - b _022638F6 -_02263786: - ldr r0, _02263904 ; =0x000005A8 - bl sub_02005748 - add r0, r5, #0 - bl ov70_0225E430 - ldr r1, [sp] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrh r1, [r4, #2] - add r0, r5, #0 - mov r2, #1 - bl ov70_0225E29C - ldr r0, [sp, #4] - ldr r1, [sp] - bl ov66_0222E924 - cmp r0, #0 - bne _022637BE - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E20C - b _022637C8 -_022637BE: - add r0, r5, #0 - mov r1, #1 - mov r2, #0x7c - bl ov70_0225E20C -_022637C8: - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x12 - strh r0, [r4] - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - b _022638F6 -_022637DE: - add r0, r5, #0 - mov r1, #1 - mov r2, #2 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x16 - strh r0, [r4] - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - b _022638F6 -_022637FE: - ldr r0, _02263904 ; =0x000005A8 - bl sub_020057D4 - cmp r0, #0 - bne _022638F6 - ldr r0, _02263908 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _022638F6 - ldr r0, _022638FC ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #1 - mov r2, #4 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #9 - strh r0, [r4] - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - ldrh r1, [r4, #0x28] - ldrh r2, [r4, #0x2a] - ldr r0, [sp, #4] - bl ov66_0222E56C - ldr r1, [sp] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E328 - b _022638F6 -_0226384C: - ldrh r2, [r4, #0x28] - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E30C - add r0, r5, #0 - mov r1, #1 - mov r2, #0xc - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x11 - strh r0, [r4] - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - b _022638F6 -_02263876: - ldrh r2, [r4, #0x28] - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E30C - ldrh r2, [r4, #0x2a] - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E30C - add r0, r5, #0 - mov r1, #1 - mov r2, #0xb - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x11 - strh r0, [r4] - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - b _022638F6 -_022638AA: - add r0, r5, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _022638F6 - ldrh r1, [r4] - add r0, r6, #0 - bl ov70_02262E88 - b _022638F6 -_022638BE: - ldr r0, [sp, #8] - add r1, r7, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r5, #0 - bl ov70_0225DFEC - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02265450 - add r0, r6, #0 - bl ov70_02262E64 - add r0, r5, #0 - bl ov70_0225DF10 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225DF2C - add r1, r0, #0 - ldr r2, _0226390C ; =0x0226D9D0 - add r0, r4, #0 - mov r3, #0 - bl ov70_02262E94 -_022638F6: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022638FC: .word 0x000005DC -_02263900: .word 0x000005E5 -_02263904: .word 0x000005A8 -_02263908: .word 0x021BF67C -_0226390C: .word 0x0226D9D0 - thumb_func_end ov70_02263414 - - thumb_func_start ov70_02263910 -ov70_02263910: ; 0x02263910 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - str r2, [sp, #4] - bl ov70_0225DEE8 - str r0, [sp, #8] - add r0, r4, #0 - bl ov70_0225DEEC - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DEF0 - str r0, [sp, #0xc] - bl ov70_0225CCAC - add r7, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #5 - bls _02263944 - b _02263A4E -_02263944: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02263950: ; jump table - .short _0226395C - _02263950 - 2 ; case 0 - .short _02263988 - _02263950 - 2 ; case 1 - .short _022639BE - _02263950 - 2 ; case 2 - .short _022639EE - _02263950 - 2 ; case 3 - .short _02263A12 - _02263950 - 2 ; case 4 - .short _02263A2A - _02263950 - 2 ; case 5 -_0226395C: - mov r0, #1 - str r0, [sp] - ldrh r2, [r6] - ldrh r3, [r6, #2] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov70_02263230 - bl ov66_02231760 - cmp r0, #0 - bne _02263978 - bl ov66_02232AA4 -_02263978: - ldr r0, [sp, #8] - mov r1, #0 - bl ov66_0222E31C - add r0, r5, #0 - bl ov70_02262E8C - b _02263A4E -_02263988: - bl ov66_02231760 - cmp r0, #0 - bne _02263998 - bl ov66_02232AD4 - cmp r0, #0 - beq _02263A4E -_02263998: - add r0, r4, #0 - bl ov70_0225DEEC - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DF30 - cmp r0, #0 - bne _02263A4E - add r0, r5, #0 - bl ov70_02262E8C - ldrh r3, [r6, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #2 - bl ov70_0225CDAC - b _02263A4E -_022639BE: - add r0, r7, #0 - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _02263A4E - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF18 - ldr r0, [sp, #8] - bl ov66_0222E2B4 - cmp r0, #1 - bne _022639E4 - add r0, r5, #0 - bl ov70_02262E8C - b _02263A4E -_022639E4: - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _02263A4E -_022639EE: - ldrh r1, [r6, #8] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #0 - mov r2, #0x15 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _02263A4E -_02263A12: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _02263A4E - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r5, #0 - bl ov70_02262E8C - b _02263A4E -_02263A2A: - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DF10 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DF2C - add r1, r0, #0 - ldr r2, _02263A54 ; =0x0226D9D0 - add r0, r5, #0 - mov r3, #0 - bl ov70_02262E94 -_02263A4E: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02263A54: .word 0x0226D9D0 - thumb_func_end ov70_02263910 - - thumb_func_start ov70_02263A58 -ov70_02263A58: ; 0x02263A58 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - str r2, [sp, #4] - bl ov70_0225DF10 - str r0, [sp, #8] - add r0, r4, #0 - bl ov70_0225DEF0 - str r0, [sp, #0xc] - bl ov70_0225CCAC - add r7, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - str r0, [sp, #0x10] - add r0, r4, #0 - bl ov70_0225DEEC - add r6, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #5 - bls _02263A94 - b _02263B96 -_02263A94: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02263AA0: ; jump table - .short _02263AAC - _02263AA0 - 2 ; case 0 - .short _02263ADE - _02263AA0 - 2 ; case 1 - .short _02263B04 - _02263AA0 - 2 ; case 2 - .short _02263B36 - _02263AA0 - 2 ; case 3 - .short _02263B5A - _02263AA0 - 2 ; case 4 - .short _02263B72 - _02263AA0 - 2 ; case 5 -_02263AAC: - mov r0, #1 - str r0, [sp] - ldrh r2, [r6] - ldrh r3, [r6, #2] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov70_02263230 - add r0, r5, #0 - bl ov70_02262E8C - ldr r0, [sp, #8] - ldr r1, [sp, #4] - ldr r2, _02263B9C ; =0x0226DA00 - mov r3, #0 - bl ov70_02262EC0 - ldr r0, [sp, #0x10] - mov r1, #0 - bl ov66_0222E2C4 - ldr r0, [sp, #0x10] - bl ov66_0222E2CC - b _02263B96 -_02263ADE: - add r0, r4, #0 - bl ov70_0225DEEC - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DF30 - cmp r0, #0 - bne _02263B96 - add r0, r5, #0 - bl ov70_02262E8C - ldrh r3, [r6, #4] - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #2 - bl ov70_0225CDAC - b _02263B96 -_02263B04: - add r0, r7, #0 - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _02263B96 - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF18 - ldr r0, [sp, #0x10] - bl ov66_0222E220 - cmp r0, #1 - bne _02263B2C - add r0, r5, #0 - mov r1, #3 - bl ov70_02262E88 - b _02263B96 -_02263B2C: - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _02263B96 -_02263B36: - ldrh r1, [r6, #8] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #0 - mov r2, #8 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _02263B96 -_02263B5A: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _02263B96 - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r5, #0 - bl ov70_02262E8C - b _02263B96 -_02263B72: - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DF10 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DF2C - add r1, r0, #0 - ldr r2, _02263BA0 ; =0x0226D9D0 - add r0, r5, #0 - mov r3, #0 - bl ov70_02262E94 -_02263B96: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02263B9C: .word 0x0226DA00 -_02263BA0: .word 0x0226D9D0 - thumb_func_end ov70_02263A58 - - thumb_func_start ov70_02263BA4 -ov70_02263BA4: ; 0x02263BA4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - str r2, [sp, #4] - bl ov70_0225DEE8 - add r7, r0, #0 - add r0, r4, #0 - bl ov70_0225DEEC - str r0, [sp, #8] - add r0, r4, #0 - bl ov70_0225DEF0 - str r0, [sp, #0xc] - bl ov70_0225CCAC - add r6, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #5 - bhi _02263CBE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02263BE2: ; jump table - .short _02263BEE - _02263BE2 - 2 ; case 0 - .short _02263C12 - _02263BE2 - 2 ; case 1 - .short _02263C38 - _02263BE2 - 2 ; case 2 - .short _02263C68 - _02263BE2 - 2 ; case 3 - .short _02263C82 - _02263BE2 - 2 ; case 4 - .short _02263C9A - _02263BE2 - 2 ; case 5 -_02263BEE: - mov r0, #1 - str r0, [sp] - ldr r2, [sp, #8] - ldr r3, [sp, #8] - ldrh r2, [r2] - ldrh r3, [r3, #2] - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov70_02263230 - add r0, r7, #0 - mov r1, #0 - bl ov66_0222E31C - add r0, r5, #0 - bl ov70_02262E8C - b _02263CBE -_02263C12: - add r0, r4, #0 - bl ov70_0225DEEC - add r7, r0, #0 - add r0, r4, #0 - bl ov70_0225DF30 - cmp r0, #0 - bne _02263CBE - add r0, r5, #0 - bl ov70_02262E8C - ldrh r3, [r7, #4] - ldr r0, [sp, #0xc] - add r1, r6, #0 - mov r2, #2 - bl ov70_0225CDAC - b _02263CBE -_02263C38: - add r0, r6, #0 - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _02263CBE - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF18 - add r0, r7, #0 - bl ov66_0222E2B4 - cmp r0, #1 - bne _02263C5E - add r0, r5, #0 - bl ov70_02262E8C - b _02263CBE -_02263C5E: - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _02263CBE -_02263C68: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x5b - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _02263CBE -_02263C82: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _02263CBE - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r5, #0 - bl ov70_02262E8C - b _02263CBE -_02263C9A: - ldr r0, [sp, #0xc] - add r1, r6, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DF10 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DF2C - add r1, r0, #0 - ldr r2, _02263CC4 ; =0x0226D9D0 - add r0, r5, #0 - mov r3, #0 - bl ov70_02262E94 -_02263CBE: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02263CC4: .word 0x0226D9D0 - thumb_func_end ov70_02263BA4 - - thumb_func_start ov70_02263CC8 -ov70_02263CC8: ; 0x02263CC8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x50 - str r0, [sp, #4] - add r5, r1, #0 - add r7, r2, #0 - bl ov70_02262E80 - str r0, [sp, #0x30] - ldr r0, [sp, #4] - bl ov70_02262E84 - cmp r0, #0 - beq _02263CE8 - cmp r0, #1 - beq _02263CF8 - b _02264106 -_02263CE8: - ldr r0, [sp, #4] - mov r1, #4 - bl ov70_02262E3C - ldr r0, [sp, #4] - bl ov70_02262E8C - b _02264106 -_02263CF8: - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E43C - add r0, r5, #0 - bl ov70_0225DF10 - str r0, [sp, #0x14] - add r0, r5, #0 - bl ov70_0225DEE8 - str r0, [sp, #0x18] - add r0, r5, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225DF00 - str r0, [sp, #0x1c] - add r0, r5, #0 - bl ov70_0225DEF8 - str r0, [sp, #0x20] - add r0, r4, #0 - bl ov70_0225CCB0 - add r6, r0, #0 - beq _02263D7A - ldr r0, [sp, #0x18] - bl ov66_0222E12C - cmp r0, #0 - bne _02263D66 - ldr r0, [sp, #0x18] - bl ov66_0222E19C - cmp r0, #1 - bne _02263D66 - ldr r0, [sp, #0x18] - bl ov66_0222E0F4 - cmp r0, #0 - bne _02263D66 - add r0, r6, #0 - bl ov70_0225CE3C - cmp r0, #9 - beq _02263D7A - add r0, r4, #0 - add r1, r6, #0 - mov r2, #9 - bl ov70_0225CDEC - b _02263D7A -_02263D66: - add r0, r6, #0 - bl ov70_0225CE3C - cmp r0, #0 - beq _02263D7A - add r0, r4, #0 - add r1, r6, #0 - mov r2, #0 - bl ov70_0225CDEC -_02263D7A: - add r0, r4, #0 - bl ov70_0225CCAC - str r0, [sp, #0x28] - mov r1, #5 - bl ov70_0225CD60 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - mov r1, #6 - bl ov70_0225CD60 - str r0, [sp, #8] - ldr r0, [sp, #0x28] - bl ov70_0225CD34 - add r1, sp, #0x40 - strh r0, [r1, #4] - lsr r0, r0, #0x10 - strh r0, [r1, #6] - ldrh r0, [r1, #4] - mov r2, sp - sub r2, r2, #4 - strh r0, [r1, #0xc] - ldrh r0, [r1, #6] - strh r0, [r1, #0xe] - ldrh r0, [r1, #0xc] - strh r0, [r2] - ldrh r0, [r1, #0xe] - ldr r1, [sp, #8] - strh r0, [r2, #2] - ldr r0, [r2, #0] - bl ov63_0222C078 - add r2, sp, #0x40 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #0xc - strh r0, [r2, #8] - ldrh r0, [r2, #2] - strh r0, [r2, #0xa] - ldrsh r1, [r2, r1] - ldr r0, [sp, #0x1c] - asr r3, r1, #3 - lsr r3, r3, #0x1c - add r3, r1, r3 - lsl r1, r3, #0xc - mov r3, #0xe - ldrsh r2, [r2, r3] - lsr r1, r1, #0x10 - asr r3, r2, #3 - lsr r3, r3, #0x1c - add r3, r2, r3 - lsl r2, r3, #0xc - lsr r2, r2, #0x10 - bl ov70_0225C8C4 - str r0, [sp, #0x24] - add r0, sp, #0x40 - mov r1, #0xa - ldrsh r2, [r0, r1] - asr r1, r2, #3 - lsr r1, r1, #0x1c - add r1, r2, r1 - asr r1, r1, #4 - str r1, [sp, #0x10] - mov r1, #8 - ldrsh r1, [r0, r1] - ldr r2, [sp, #0x10] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - str r0, [sp, #0xc] - ldr r1, [sp, #0xc] - lsl r2, r2, #0x10 - lsl r1, r1, #0x10 - ldr r0, [sp, #0x1c] - lsr r1, r1, #0x10 - lsr r2, r2, #0x10 - bl ov70_0225C8C4 - add r6, r0, #0 - add r0, r5, #0 - bl ov70_0225E3E0 - add r1, r0, #0 - cmp r1, r7 - beq _02263E44 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF84 - cmp r0, #0 - beq _02263E44 - add r0, r5, #0 - bl ov70_0225E3D0 -_02263E44: - ldr r0, [sp, #0x2c] - cmp r0, #0 - beq _02263E90 - add r0, r5, #0 - bl ov70_0225E400 - cmp r0, #1 - bne _02263E5C - ldr r0, [sp, #0x2c] - sub r0, r0, #1 - cmp r0, #2 - bls _02263E5E -_02263E5C: - b _02264106 -_02263E5E: - add r0, r5, #0 - bl ov70_0225E3E0 - add r1, r0, #0 - cmp r1, r7 - beq _02263E88 - add r0, r4, #0 - bl ov70_0225CC70 - add r6, r0, #0 - beq _02263E88 - bl ov70_0225CE3C - cmp r0, #0 - bne _02263E88 - ldr r2, [sp, #0x30] - add r0, r4, #0 - ldr r2, [r2, #0] - add r1, r6, #0 - bl ov70_0225CDEC -_02263E88: - add r0, r5, #0 - bl ov70_0225E3D0 - b _02264106 -_02263E90: - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E43C - ldr r0, [sp, #0x24] - bl ov70_0225C930 - cmp r0, #1 - bne _02263ED6 - ldr r0, [sp, #0x24] - ldr r3, _0226410C ; =0x0226DBB8 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r7, #0 - bl ov70_0226315C - ldr r1, [sp, #0x28] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - ldr r1, [sp, #0x24] - add r0, r5, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov70_0225DF3C - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02263ED6: - add r0, r5, #0 - bl ov70_0225E45C - cmp r0, #1 - bne _02263F04 - ldr r1, [sp, #0x28] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - ldr r0, [sp, #0x14] - ldr r2, _02264110 ; =0x0226DA18 - add r1, r7, #0 - mov r3, #0 - bl ov70_02262EC0 - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02263F04: - ldr r0, [sp, #0x18] - bl ov66_0222EE08 - cmp r0, #0 - beq _02263F32 - ldr r0, [sp, #0x14] - ldr r2, _02264114 ; =0x0226DA08 - add r1, r7, #0 - mov r3, #0 - bl ov70_02262EC0 - ldr r1, [sp, #0x28] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02263F32: - ldr r0, _02264118 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0226401C - ldr r1, [sp, #0x28] - add r0, r4, #0 - bl ov70_0225CE40 - str r0, [sp, #0x34] - cmp r0, #0 - beq _02263FA2 - mov r1, #5 - bl ov70_0225CD60 - str r0, [sp, #0x38] - ldr r0, [sp, #0x34] - mov r1, #4 - bl ov70_0225CD60 - add r1, r0, #0 - cmp r1, #0xfe - beq _02263FA2 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF64 - ldr r1, [sp, #0x38] - cmp r1, #0 - bne _02263FA2 - cmp r0, #0 - bne _02263FA2 - ldr r0, [sp, #0x14] - ldr r2, _0226411C ; =0x0226D9F8 - add r1, r7, #0 - mov r3, #0 - bl ov70_02262EC0 - ldr r1, [sp, #0x28] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - ldr r1, [sp, #0x34] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02263FA2: - add r0, r6, #0 - bl ov70_0225C990 - cmp r0, #1 - bne _02263FE2 - ldr r0, [sp, #0x28] - mov r1, #6 - bl ov70_0225CD60 - cmp r0, #0 - bne _02263FE2 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - ldr r0, [sp, #0x20] - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl ov70_02262484 - lsl r1, r6, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF3C - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02263FE2: - add r0, r6, #0 - bl ov70_0225C970 - cmp r0, #1 - bne _0226401C - ldr r0, [sp, #4] - ldr r3, _02264120 ; =0x0226DB28 - add r1, r5, #0 - add r2, r7, #0 - str r6, [sp] - bl ov70_0226315C - ldr r1, [sp, #0x28] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r6, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF3C - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226401C: - ldr r0, [sp, #8] - bl ov70_02263120 - cmp r0, #1 - bne _022640BC - ldr r0, [sp, #8] - cmp r0, #0 - bne _02264066 - add r0, r6, #0 - bl ov70_0225C950 - cmp r0, #1 - bne _02264066 - ldr r0, [sp, #4] - ldr r3, _02264124 ; =0x0226DAF8 - add r1, r5, #0 - add r2, r7, #0 - str r6, [sp] - bl ov70_0226315C - ldr r1, [sp, #0x28] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r6, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF3C - add r0, r5, #0 - mov r1, #1 - bl ov70_0225E43C - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02264066: - ldr r1, [sp, #0x28] - add r0, r4, #0 - bl ov70_0225CE40 - str r0, [sp, #0x3c] - cmp r0, #0 - beq _022640BC - mov r1, #4 - bl ov70_0225CD60 - add r6, r0, #0 - cmp r6, #0xfe - beq _022640BC - add r0, r5, #0 - bl ov70_0225E3F0 - cmp r0, #0 - bne _022640BC - lsl r1, r6, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF84 - cmp r0, #0 - bne _022640BC - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - bl ov70_0225E328 - ldr r0, [sp, #0x3c] - bl ov70_0225CE3C - ldr r1, [sp, #0x30] - mov r2, #0 - str r0, [r1, #0] - ldr r1, [sp, #0x3c] - add r0, r4, #0 - bl ov70_0225CDEC - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_022640BC: - ldr r0, _02264118 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - lsl r0, r0, #0xa - tst r0, r1 - beq _02264106 - add r0, r5, #0 - bl ov70_0225E3F0 - cmp r0, #0 - bne _022640EA - ldr r0, [sp, #0x18] - bl ov66_0222E338 - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E328 - ldr r0, _02264128 ; =0x000005DC - bl sub_02005748 - b _02264100 -_022640EA: - add r0, r5, #0 - bl ov70_0225E3E0 - cmp r0, r7 - bne _02264100 - add r0, r5, #0 - bl ov70_0225E3D0 - ldr r0, _02264128 ; =0x000005DC - bl sub_02005748 -_02264100: - add sp, #0x50 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02264106: - mov r0, #0 - add sp, #0x50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226410C: .word 0x0226DBB8 -_02264110: .word 0x0226DA18 -_02264114: .word 0x0226DA08 -_02264118: .word 0x021BF67C -_0226411C: .word 0x0226D9F8 -_02264120: .word 0x0226DB28 -_02264124: .word 0x0226DAF8 -_02264128: .word 0x000005DC - thumb_func_end ov70_02263CC8 - - thumb_func_start ov70_0226412C -ov70_0226412C: ; 0x0226412C - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - bl ov70_0225DEF0 - bl ov70_0225CCAC - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - beq _0226414C - add r0, r4, #0 - mov r1, #1 - bl ov70_0225E43C -_0226414C: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov70_0226412C - - thumb_func_start ov70_02264150 -ov70_02264150: ; 0x02264150 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r7, r2, #0 - bl ov70_02262E84 - cmp r0, #9 - bhi _022641F8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226416C: ; jump table - .short _02264180 - _0226416C - 2 ; case 0 - .short _022641C2 - _0226416C - 2 ; case 1 - .short _022641D4 - _0226416C - 2 ; case 2 - .short _022641EE - _0226416C - 2 ; case 3 - .short _02264202 - _0226416C - 2 ; case 4 - .short _02264210 - _0226416C - 2 ; case 5 - .short _0226424C - _0226416C - 2 ; case 6 - .short _02264280 - _0226416C - 2 ; case 7 - .short _022642B2 - _0226416C - 2 ; case 8 - .short _022642D2 - _0226416C - 2 ; case 9 -_02264180: - add r0, r4, #0 - bl ov70_0225DEF0 - add r6, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r6, #0 - mov r2, #0 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #0xb - bl ov66_0222E3E4 - ldr r0, _0226431C ; =0x000005DD - bl sub_02005748 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x41 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _02264316 -_022641C2: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _022641F8 - add r0, r5, #0 - bl ov70_02262E8C - b _02264316 -_022641D4: - add r0, r4, #0 - mov r1, #2 - mov r2, #0x19 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _02264316 -_022641EE: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - beq _022641FA -_022641F8: - b _02264316 -_022641FA: - add r0, r5, #0 - bl ov70_02262E8C - b _02264316 -_02264202: - add r0, r4, #0 - bl ov70_0225E194 - add r0, r5, #0 - bl ov70_02262E8C - b _02264316 -_02264210: - add r0, r4, #0 - mov r6, #0 - bl ov70_0225E1C4 - cmp r0, #0 - beq _02264224 - cmp r0, #1 - beq _02264230 - cmp r0, #2 - b _0226423A -_02264224: - add r0, r5, #0 - mov r1, #6 - bl ov70_02262E88 - mov r6, #1 - b _0226423A -_02264230: - add r0, r5, #0 - mov r1, #8 - bl ov70_02262E88 - mov r6, #1 -_0226423A: - cmp r6, #1 - bne _02264316 - add r0, r4, #0 - bl ov70_0225E1F8 - add r0, r4, #0 - bl ov70_0225DFEC - b _02264316 -_0226424C: - add r0, r4, #0 - mov r1, #0 - bl ov70_0225DF18 - add r0, r4, #0 - bl ov70_0225DEF0 - add r6, r0, #0 - bl ov70_0225CCAC - add r7, r0, #0 - add r0, r4, #0 - bl ov70_0225DF08 - bl ov70_02260B3C - add r0, r6, #0 - add r1, r7, #0 - mov r2, #3 - bl ov70_0225CDEC - add r0, r5, #0 - mov r1, #7 - bl ov70_02262E88 - b _02264316 -_02264280: - add r0, r4, #0 - bl ov70_0225DEF0 - bl ov70_0225CCAC - bl ov70_0225CE38 - cmp r0, #1 - bne _02264316 - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF34 - add r0, r4, #0 - mov r1, #0 - bl ov70_0225DF38 - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #0xb - bl ov66_0222E3E4 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022642B2: - add r0, r4, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #2 - mov r3, #0 - bl ov70_0225CDAC - add r0, r5, #0 - bl ov70_02262E8C - b _02264316 -_022642D2: - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #1 - bl ov66_0222E3E4 - add r0, r4, #0 - bl ov70_0225DEF0 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DF10 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225CCAC - mov r1, #5 - add r6, r0, #0 - bl ov70_0225CD60 - cmp r0, #0 - bne _02264316 - add r0, r5, #0 - add r1, r6, #0 - mov r2, #1 - bl ov70_0225CDEC - ldr r2, _02264320 ; =0x0226D9D0 - add r0, r4, #0 - add r1, r7, #0 - mov r3, #0 - bl ov70_02262E94 -_02264316: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226431C: .word 0x000005DD -_02264320: .word 0x0226D9D0 - thumb_func_end ov70_02264150 - - thumb_func_start ov70_02264324 -ov70_02264324: ; 0x02264324 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r4, r1, #0 - add r5, r0, #0 - str r2, [sp, #0x10] - add r0, r4, #0 - bl ov70_0225DEF0 - ldr r1, [sp, #0x10] - str r0, [sp, #0x28] - bl ov70_0225CC70 - add r7, r0, #0 - add r0, r4, #0 - bl ov70_0225DF40 - str r0, [sp, #0x20] - add r0, r5, #0 - bl ov70_02262E80 - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - str r0, [sp, #0x24] - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #8 - bls _02264362 - b _022646BC -_02264362: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226436E: ; jump table - .short _02264380 - _0226436E - 2 ; case 0 - .short _02264440 - _0226436E - 2 ; case 1 - .short _022644DE - _0226436E - 2 ; case 2 - .short _022645B4 - _0226436E - 2 ; case 3 - .short _02264606 - _0226436E - 2 ; case 4 - .short _0226461E - _0226436E - 2 ; case 5 - .short _02264644 - _0226436E - 2 ; case 6 - .short _0226465E - _0226436E - 2 ; case 7 - .short _0226468C - _0226436E - 2 ; case 8 -_02264380: - add r0, r5, #0 - mov r1, #0xc - bl ov70_02262E3C - add r4, r0, #0 - ldr r0, [sp, #0x20] - bl ov70_02264B64 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #3 - bhi _022643C4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022643A4: ; jump table - .short _022643AC - _022643A4 - 2 ; case 0 - .short _022643B2 - _022643A4 - 2 ; case 1 - .short _022643B8 - _022643A4 - 2 ; case 2 - .short _022643BE - _022643A4 - 2 ; case 3 -_022643AC: - mov r0, #3 - str r0, [r4, #8] - b _022643CC -_022643B2: - mov r0, #4 - str r0, [r4, #8] - b _022643CC -_022643B8: - mov r0, #5 - str r0, [r4, #8] - b _022643CC -_022643BE: - mov r0, #6 - str r0, [r4, #8] - b _022643CC -_022643C4: - bl sub_02022974 - mov r0, #5 - str r0, [r4, #8] -_022643CC: - ldr r0, [sp, #0x24] - bl ov66_0222E12C - cmp r0, #1 - bne _022643E8 - mov r0, #0x16 - strh r0, [r4, #4] - mov r0, #0 - strh r0, [r4, #6] - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _022646BC -_022643E8: - ldr r0, [sp, #0x24] - bl ov66_0222E004 - cmp r0, #1 - bne _02264404 - mov r0, #0x48 - strh r0, [r4, #4] - mov r0, #1 - strh r0, [r4, #6] - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _022646BC -_02264404: - ldr r0, [sp, #0x20] - bl ov70_02264B64 - lsl r0, r0, #0x18 - lsr r6, r0, #0x18 - add r0, r6, #0 - bl ov66_02232B00 - cmp r0, #0 - bne _0226442A - mov r0, #0x14 - strh r0, [r4, #4] - mov r0, #0 - strh r0, [r4, #6] - add r0, r5, #0 - mov r1, #3 - bl ov70_02262E88 - b _022646BC -_0226442A: - add r0, r6, #0 - bl ov66_02232A48 - cmp r0, #0 - bne _02264438 - bl sub_02022974 -_02264438: - add r0, r5, #0 - bl ov70_02262E8C - b _022646BC -_02264440: - bl ov66_02232A84 - cmp r0, #1 - bne _022644C6 - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - add r1, sp, #0x40 - mov r0, #0 - strb r0, [r1] - strb r0, [r1, #1] - strb r0, [r1, #2] - strb r0, [r1, #3] - add r0, r4, #0 - bl ov70_0225DEE8 - add r7, r0, #0 - bl ov66_0222E964 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x1c] - ldr r0, [r6, #8] - sub r0, r0, #5 - cmp r0, #1 - bhi _022644A0 - mov r5, #0 - add r4, r5, #0 -_0226447A: - add r0, r7, #0 - add r1, r4, #0 - bl ov66_0222E974 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02264498 - cmp r5, #4 - bhs _02264492 - add r1, sp, #0x40 - strb r0, [r1, r5] -_02264492: - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 -_02264498: - add r4, r4, #1 - cmp r4, #4 - blt _0226447A - b _022644A6 -_022644A0: - ldr r0, [sp, #0x10] - add r1, sp, #0x38 - strb r0, [r1, #8] -_022644A6: - add r3, sp, #0x38 - ldrb r0, [r3, #9] - str r0, [sp] - ldrb r0, [r3, #0xa] - str r0, [sp, #4] - ldrb r0, [r3, #0xb] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldrb r3, [r3, #8] - ldr r1, [r6, #8] - ldr r2, [sp, #0x1c] - add r0, r7, #0 - bl ov66_0222EA10 - b _022646BC -_022644C6: - cmp r0, #2 - beq _022644CC - b _022646BC -_022644CC: - mov r0, #0x14 - strh r0, [r6, #4] - mov r0, #0 - strh r0, [r6, #6] - add r0, r5, #0 - mov r1, #3 - bl ov70_02262E88 - b _022646BC -_022644DE: - ldr r0, [sp, #0x20] - bl ov70_02264BCC - str r0, [sp, #0x2c] - ldr r0, [sp, #0x20] - bl ov70_02264C34 - str r0, [sp, #0x30] - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF34 - ldr r1, [sp, #0x2c] - add r0, r4, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov70_0225DF38 - add r0, r4, #0 - bl ov70_0225DEE8 - ldr r1, [sp, #0x30] - bl ov66_0222E3E4 - ldr r0, [sp, #0x24] - ldr r1, [r6, #8] - bl ov66_0222EF94 - ldr r0, [r6, #8] - cmp r0, #6 - bhi _02264548 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02264528: ; jump table - .short _02264548 - _02264528 - 2 ; case 0 - .short _02264548 - _02264528 - 2 ; case 1 - .short _02264548 - _02264528 - 2 ; case 2 - .short _02264536 - _02264528 - 2 ; case 3 - .short _02264536 - _02264528 - 2 ; case 4 - .short _0226453C - _02264528 - 2 ; case 5 - .short _02264542 - _02264528 - 2 ; case 6 -_02264536: - mov r0, #5 - str r0, [sp, #0x18] - b _0226454C -_0226453C: - mov r0, #3 - str r0, [sp, #0x18] - b _0226454C -_02264542: - mov r0, #4 - str r0, [sp, #0x18] - b _0226454C -_02264548: - bl sub_02022974 -_0226454C: - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x18] - bl ov66_0222F040 - add r0, r7, #0 - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - str r0, [sp, #0x34] - add r0, r4, #0 - bl ov70_0225DEEC - add r4, r0, #0 - add r0, r7, #0 - bl ov70_0225CD34 - add r1, sp, #0x38 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #1 - strh r0, [r4, #6] - mov r0, #4 - ldrsh r2, [r1, r0] - asr r0, r2, #3 - lsr r0, r0, #0x1c - add r0, r2, r0 - asr r0, r0, #4 - strh r0, [r4] - mov r0, #6 - ldrsh r1, [r1, r0] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - strh r0, [r4, #2] - ldr r0, [sp, #0x34] - strh r0, [r4, #4] - ldr r0, [r6, #8] - strh r0, [r4, #8] - add r0, r5, #0 - bl ov70_02262E64 - add sp, #0x44 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_022645B4: - add r0, r7, #0 - mov r1, #6 - bl ov70_0225CD60 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #3 - bhi _022645F0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022645D0: ; jump table - .short _022645D8 - _022645D0 - 2 ; case 0 - .short _022645DE - _022645D0 - 2 ; case 1 - .short _022645E4 - _022645D0 - 2 ; case 2 - .short _022645EA - _022645D0 - 2 ; case 3 -_022645D8: - mov r0, #6 - str r0, [sp, #0x14] - b _022645F4 -_022645DE: - mov r0, #5 - str r0, [sp, #0x14] - b _022645F4 -_022645E4: - mov r0, #8 - str r0, [sp, #0x14] - b _022645F4 -_022645EA: - mov r0, #7 - str r0, [sp, #0x14] - b _022645F4 -_022645F0: - bl sub_02022974 -_022645F4: - ldr r0, [sp, #0x28] - ldr r2, [sp, #0x14] - add r1, r7, #0 - bl ov70_0225CDEC - add r0, r5, #0 - bl ov70_02262E8C - b _022646BC -_02264606: - add r0, r7, #0 - bl ov70_0225CE38 - cmp r0, #1 - bne _022646BC - mov r0, #8 - str r0, [r6, #0] - add r0, r5, #0 - mov r1, #7 - bl ov70_02262E88 - b _022646BC -_0226461E: - add r0, r7, #0 - mov r1, #6 - bl ov70_0225CD60 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl ov63_0222C0AC - lsl r0, r0, #0x18 - lsr r3, r0, #0x18 - ldr r0, [sp, #0x28] - add r1, r7, #0 - mov r2, #2 - bl ov70_0225CDAC - add r0, r5, #0 - bl ov70_02262E8C - b _022646BC -_02264644: - add r0, r7, #0 - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _022646BC - mov r0, #8 - str r0, [r6, #0] - add r0, r5, #0 - mov r1, #7 - bl ov70_02262E88 - b _022646BC -_0226465E: - ldr r0, [r6, #0] - sub r0, r0, #1 - str r0, [r6, #0] - cmp r0, #0 - bgt _022646BC - ldr r1, [r6, #8] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E27C - ldrh r1, [r6, #6] - ldrh r2, [r6, #4] - add r0, r4, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _022646BC -_0226468C: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #0 - beq _022646BC - add r0, r5, #0 - bl ov70_02262E64 - ldr r0, [sp, #0x28] - add r1, r7, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r4, #0 - bl ov70_0225DF10 - ldr r1, [sp, #0x10] - ldr r2, _022646C4 ; =0x0226D9D0 - mov r3, #0 - bl ov70_02262E94 -_022646BC: - mov r0, #0 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - nop -_022646C4: .word 0x0226D9D0 - thumb_func_end ov70_02264324 - - thumb_func_start ov70_022646C8 -ov70_022646C8: ; 0x022646C8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r4, r1, #0 - add r7, r0, #0 - str r2, [sp] - bl ov70_02262E80 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DF10 - str r0, [sp, #0x14] - add r0, r4, #0 - bl ov70_0225DEF0 - str r0, [sp, #0x18] - bl ov70_0225CCAC - str r0, [sp, #0x10] - add r0, r4, #0 - bl ov70_0225DEE8 - str r0, [sp, #0xc] - add r0, r7, #0 - bl ov70_02262E84 - cmp r0, #7 - bls _02264702 - b _02264966 -_02264702: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226470E: ; jump table - .short _0226471E - _0226470E - 2 ; case 0 - .short _02264792 - _0226470E - 2 ; case 1 - .short _022647AC - _0226470E - 2 ; case 2 - .short _0226486A - _0226470E - 2 ; case 3 - .short _0226488A - _0226470E - 2 ; case 4 - .short _0226489E - _0226470E - 2 ; case 5 - .short _02264922 - _0226470E - 2 ; case 6 - .short _0226493A - _0226470E - 2 ; case 7 -_0226471E: - add r0, r7, #0 - mov r1, #4 - bl ov70_02262E3C - add r5, r0, #0 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - mov r2, #0 - bl ov70_0225CDEC - add r0, r7, #0 - bl ov70_02262E8C - mov r0, #0 - strb r0, [r5] - add r0, r4, #0 - bl ov70_0225DF40 - cmp r0, #0x1e - beq _02264750 - cmp r0, #0x1f - beq _0226475C - cmp r0, #0x20 - beq _02264768 - b _02264774 -_02264750: - mov r0, #0 - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #2 - strb r0, [r5, #3] - b _02264778 -_0226475C: - mov r0, #1 - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #3 - strb r0, [r5, #3] - b _02264778 -_02264768: - mov r0, #2 - strb r0, [r5, #1] - strb r0, [r5, #2] - mov r0, #4 - strb r0, [r5, #3] - b _02264778 -_02264774: - bl sub_02022974 -_02264778: - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #0xc - bl ov66_0222E3E4 - ldr r0, [sp, #0x14] - ldr r1, [sp] - ldr r2, _0226496C ; =0x0226DA20 - add r3, r5, #0 - bl ov70_02262EC0 - b _02264966 -_02264792: - ldrb r0, [r5] - cmp r0, #8 - bne _022647A2 - add r0, r7, #0 - mov r1, #2 - bl ov70_02262E88 - b _02264966 -_022647A2: - add r0, r7, #0 - mov r1, #3 - bl ov70_02262E88 - b _02264966 -_022647AC: - add r0, r4, #0 - bl ov70_0225DF40 - cmp r0, #0x1e - beq _022647C0 - cmp r0, #0x1f - beq _022647C8 - cmp r0, #0x20 - beq _022647D0 - b _022647D6 -_022647C0: - mov r0, #0 - mov r6, #3 - str r0, [sp, #8] - b _022647D6 -_022647C8: - mov r0, #1 - mov r6, #4 - str r0, [sp, #8] - b _022647D6 -_022647D0: - mov r0, #2 - mov r6, #5 - str r0, [sp, #8] -_022647D6: - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF34 - lsl r1, r6, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl ov70_0225DF38 - ldrb r1, [r5, #2] - ldr r0, [sp, #0xc] - bl ov66_0222EF94 - ldr r0, [sp, #0xc] - bl ov66_0222F030 - ldr r0, [sp, #0xc] - ldr r1, [sp, #8] - bl ov66_0222F040 - ldr r0, [sp, #0x10] - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - str r0, [sp, #0x1c] - add r0, r4, #0 - bl ov70_0225DEEC - add r6, r0, #0 - ldr r0, [sp, #0x10] - bl ov70_0225CD34 - add r1, sp, #0x20 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #2 - strh r0, [r6, #6] - mov r0, #4 - ldrsh r0, [r1, r0] - asr r2, r0, #3 - lsr r2, r2, #0x1c - add r2, r0, r2 - asr r0, r2, #4 - strh r0, [r6] - mov r0, #6 - ldrsh r1, [r1, r0] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - strh r0, [r6, #2] - ldr r0, [sp, #0x1c] - strh r0, [r6, #4] - ldrb r0, [r5, #2] - strh r0, [r6, #8] - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #1 - bl ov66_0222E2C4 - add r0, r7, #0 - bl ov70_02262E64 - add sp, #0x28 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0226486A: - ldr r0, [sp, #0x10] - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - add r3, r0, #0 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - mov r2, #2 - bl ov70_0225CDAC - add r0, r7, #0 - bl ov70_02262E8C - b _02264966 -_0226488A: - ldr r0, [sp, #0x10] - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _02264966 - add r0, r7, #0 - bl ov70_02262E8C - b _02264966 -_0226489E: - mov r0, #1 - str r0, [sp, #4] - ldrb r0, [r5] - cmp r0, #7 - bhi _022648F4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022648B4: ; jump table - .short _022648C4 - _022648B4 - 2 ; case 0 - .short _022648D2 - _022648B4 - 2 ; case 1 - .short _022648D6 - _022648B4 - 2 ; case 2 - .short _022648E4 - _022648B4 - 2 ; case 3 - .short _022648E8 - _022648B4 - 2 ; case 4 - .short _022648F4 - _022648B4 - 2 ; case 5 - .short _022648EC - _022648B4 - 2 ; case 6 - .short _022648F0 - _022648B4 - 2 ; case 7 -_022648C4: - ldrb r1, [r5, #2] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E27C - mov r6, #4 - b _022648F8 -_022648D2: - mov r6, #5 - b _022648F8 -_022648D6: - ldrb r1, [r5, #2] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E27C - mov r6, #6 - b _022648F8 -_022648E4: - mov r6, #0x13 - b _022648F8 -_022648E8: - mov r6, #0x11 - b _022648F8 -_022648EC: - mov r6, #0x1d - b _022648F8 -_022648F0: - mov r6, #7 - b _022648F8 -_022648F4: - mov r0, #0 - str r0, [sp, #4] -_022648F8: - ldr r0, [sp, #4] - cmp r0, #0 - beq _02264918 - add r0, r4, #0 - mov r1, #0 - add r2, r6, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r7, #0 - bl ov70_02262E8C - b _02264966 -_02264918: - add r0, r7, #0 - mov r1, #7 - bl ov70_02262E88 - b _02264966 -_02264922: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _02264966 - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r7, #0 - bl ov70_02262E8C - b _02264966 -_0226493A: - add r0, r7, #0 - bl ov70_02262E64 - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #1 - bl ov66_0222E3E4 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x10] - mov r2, #1 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DF10 - ldr r1, [sp] - ldr r2, _02264970 ; =0x0226D9D0 - mov r3, #0 - bl ov70_02262E94 -_02264966: - mov r0, #0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226496C: .word 0x0226DA20 -_02264970: .word 0x0226D9D0 - thumb_func_end ov70_022646C8 - - thumb_func_start ov70_02264974 -ov70_02264974: ; 0x02264974 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r4, r1, #0 - add r5, r0, #0 - str r2, [sp] - bl ov70_02262E80 - str r0, [sp, #8] - add r0, r4, #0 - bl ov70_0225DF10 - add r0, r4, #0 - bl ov70_0225DEF0 - str r0, [sp, #0xc] - bl ov70_0225CCAC - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - add r7, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #6 - bls _022649AC - b _02264B56 -_022649AC: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022649B8: ; jump table - .short _022649C6 - _022649B8 - 2 ; case 0 - .short _02264A2A - _022649B8 - 2 ; case 1 - .short _02264AC0 - _022649B8 - 2 ; case 2 - .short _02264AE0 - _022649B8 - 2 ; case 3 - .short _02264AF4 - _022649B8 - 2 ; case 4 - .short _02264B10 - _022649B8 - 2 ; case 5 - .short _02264B28 - _022649B8 - 2 ; case 6 -_022649C6: - add r0, r5, #0 - mov r1, #0xc - bl ov70_02262E3C - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #0xd - bl ov66_0222E3E4 - add r0, r7, #0 - bl ov66_0222E12C - cmp r0, #1 - bne _022649F4 - mov r0, #0x7a - strh r0, [r6] - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - b _02264B5A -_022649F4: - add r0, r7, #0 - bl ov66_0222E19C - cmp r0, #1 - bne _02264A04 - mov r0, #0xa - strh r0, [r6, #2] - b _02264A20 -_02264A04: - add r0, r7, #0 - bl ov66_0222E0DC - cmp r0, #1 - bne _02264A1C - mov r0, #0x62 - strh r0, [r6] - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - b _02264B5A -_02264A1C: - mov r0, #9 - strh r0, [r6, #2] -_02264A20: - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02264B5A -_02264A2A: - ldr r0, [sp, #8] - ldrh r0, [r0, #2] - cmp r0, #9 - bne _02264A38 - mov r0, #9 - str r0, [sp, #4] - b _02264A42 -_02264A38: - mov r0, #0xa - str r0, [sp, #4] - add r0, r7, #0 - bl ov66_0222E10C -_02264A42: - add r0, r4, #0 - mov r1, #1 - bl ov70_0225DF34 - ldr r1, [sp, #4] - add r0, r4, #0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - bl ov70_0225DF38 - mov r1, #0x17 - add r2, r1, #0 - add r0, r7, #0 - sub r2, #0x18 - bl ov66_0222E500 - add r0, r6, #0 - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - add r7, r0, #0 - add r0, r4, #0 - bl ov70_0225DEEC - add r4, r0, #0 - add r0, r6, #0 - bl ov70_0225CD34 - add r1, sp, #0x10 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - mov r0, #3 - strh r0, [r4, #6] - mov r0, #4 - ldrsh r2, [r1, r0] - asr r0, r2, #3 - lsr r0, r0, #0x1c - add r0, r2, r0 - asr r0, r0, #4 - strh r0, [r4] - mov r0, #6 - ldrsh r1, [r1, r0] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - strh r0, [r4, #2] - strh r7, [r4, #4] - mov r0, #0 - strh r0, [r4, #8] - add r0, r5, #0 - bl ov70_02262E64 - add sp, #0x18 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02264AC0: - add r0, r6, #0 - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - add r3, r0, #0 - ldr r0, [sp, #0xc] - add r1, r6, #0 - mov r2, #2 - bl ov70_0225CDAC - add r0, r5, #0 - bl ov70_02262E8C - b _02264B5A -_02264AE0: - add r0, r6, #0 - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - bne _02264B5A - add r0, r5, #0 - bl ov70_02262E8C - b _02264B5A -_02264AF4: - ldr r2, [sp, #8] - add r0, r4, #0 - ldrh r2, [r2] - mov r1, #1 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - bl ov70_02262E8C - b _02264B5A -_02264B10: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _02264B5A - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r5, #0 - bl ov70_02262E8C - b _02264B5A -_02264B28: - add r0, r5, #0 - bl ov70_02262E64 - add r0, r4, #0 - bl ov70_0225DEE8 - mov r1, #1 - bl ov66_0222E3E4 - ldr r0, [sp, #0xc] - add r1, r6, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r4, #0 - bl ov70_0225DF10 - ldr r1, [sp] - ldr r2, _02264B60 ; =0x0226D9D0 - mov r3, #0 - bl ov70_02262E94 - b _02264B5A -_02264B56: - bl sub_02022974 -_02264B5A: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02264B60: .word 0x0226D9D0 - thumb_func_end ov70_02264974 - - thumb_func_start ov70_02264B64 -ov70_02264B64: ; 0x02264B64 - push {r3, lr} - cmp r0, #0x1d - bhi _02264BC2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02264B76: ; jump table - .short _02264BC2 - _02264B76 - 2 ; case 0 - .short _02264BC2 - _02264B76 - 2 ; case 1 - .short _02264BC2 - _02264B76 - 2 ; case 2 - .short _02264BC2 - _02264B76 - 2 ; case 3 - .short _02264BC2 - _02264B76 - 2 ; case 4 - .short _02264BC2 - _02264B76 - 2 ; case 5 - .short _02264BBA - _02264B76 - 2 ; case 6 - .short _02264BBA - _02264B76 - 2 ; case 7 - .short _02264BBA - _02264B76 - 2 ; case 8 - .short _02264BBA - _02264B76 - 2 ; case 9 - .short _02264BBA - _02264B76 - 2 ; case 10 - .short _02264BBA - _02264B76 - 2 ; case 11 - .short _02264BBA - _02264B76 - 2 ; case 12 - .short _02264BBA - _02264B76 - 2 ; case 13 - .short _02264BBE - _02264B76 - 2 ; case 14 - .short _02264BBE - _02264B76 - 2 ; case 15 - .short _02264BBE - _02264B76 - 2 ; case 16 - .short _02264BBE - _02264B76 - 2 ; case 17 - .short _02264BBE - _02264B76 - 2 ; case 18 - .short _02264BBE - _02264B76 - 2 ; case 19 - .short _02264BBE - _02264B76 - 2 ; case 20 - .short _02264BBE - _02264B76 - 2 ; case 21 - .short _02264BB2 - _02264B76 - 2 ; case 22 - .short _02264BB2 - _02264B76 - 2 ; case 23 - .short _02264BB2 - _02264B76 - 2 ; case 24 - .short _02264BB2 - _02264B76 - 2 ; case 25 - .short _02264BB6 - _02264B76 - 2 ; case 26 - .short _02264BB6 - _02264B76 - 2 ; case 27 - .short _02264BB6 - _02264B76 - 2 ; case 28 - .short _02264BB6 - _02264B76 - 2 ; case 29 -_02264BB2: - mov r0, #2 - pop {r3, pc} -_02264BB6: - mov r0, #3 - pop {r3, pc} -_02264BBA: - mov r0, #0 - pop {r3, pc} -_02264BBE: - mov r0, #1 - pop {r3, pc} -_02264BC2: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02264B64 - - thumb_func_start ov70_02264BCC -ov70_02264BCC: ; 0x02264BCC - push {r3, lr} - cmp r0, #0x1d - bhi _02264C2A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02264BDE: ; jump table - .short _02264C2A - _02264BDE - 2 ; case 0 - .short _02264C2A - _02264BDE - 2 ; case 1 - .short _02264C2A - _02264BDE - 2 ; case 2 - .short _02264C2A - _02264BDE - 2 ; case 3 - .short _02264C2A - _02264BDE - 2 ; case 4 - .short _02264C2A - _02264BDE - 2 ; case 5 - .short _02264C22 - _02264BDE - 2 ; case 6 - .short _02264C22 - _02264BDE - 2 ; case 7 - .short _02264C22 - _02264BDE - 2 ; case 8 - .short _02264C22 - _02264BDE - 2 ; case 9 - .short _02264C22 - _02264BDE - 2 ; case 10 - .short _02264C22 - _02264BDE - 2 ; case 11 - .short _02264C22 - _02264BDE - 2 ; case 12 - .short _02264C22 - _02264BDE - 2 ; case 13 - .short _02264C26 - _02264BDE - 2 ; case 14 - .short _02264C26 - _02264BDE - 2 ; case 15 - .short _02264C26 - _02264BDE - 2 ; case 16 - .short _02264C26 - _02264BDE - 2 ; case 17 - .short _02264C26 - _02264BDE - 2 ; case 18 - .short _02264C26 - _02264BDE - 2 ; case 19 - .short _02264C26 - _02264BDE - 2 ; case 20 - .short _02264C26 - _02264BDE - 2 ; case 21 - .short _02264C1A - _02264BDE - 2 ; case 22 - .short _02264C1A - _02264BDE - 2 ; case 23 - .short _02264C1A - _02264BDE - 2 ; case 24 - .short _02264C1A - _02264BDE - 2 ; case 25 - .short _02264C1E - _02264BDE - 2 ; case 26 - .short _02264C1E - _02264BDE - 2 ; case 27 - .short _02264C1E - _02264BDE - 2 ; case 28 - .short _02264C1E - _02264BDE - 2 ; case 29 -_02264C1A: - mov r0, #1 - pop {r3, pc} -_02264C1E: - mov r0, #2 - pop {r3, pc} -_02264C22: - mov r0, #6 - pop {r3, pc} -_02264C26: - mov r0, #7 - pop {r3, pc} -_02264C2A: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02264BCC - - thumb_func_start ov70_02264C34 -ov70_02264C34: ; 0x02264C34 - push {r3, lr} - cmp r0, #0x1d - bhi _02264C92 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02264C46: ; jump table - .short _02264C92 - _02264C46 - 2 ; case 0 - .short _02264C92 - _02264C46 - 2 ; case 1 - .short _02264C92 - _02264C46 - 2 ; case 2 - .short _02264C92 - _02264C46 - 2 ; case 3 - .short _02264C92 - _02264C46 - 2 ; case 4 - .short _02264C92 - _02264C46 - 2 ; case 5 - .short _02264C8A - _02264C46 - 2 ; case 6 - .short _02264C8A - _02264C46 - 2 ; case 7 - .short _02264C8A - _02264C46 - 2 ; case 8 - .short _02264C8A - _02264C46 - 2 ; case 9 - .short _02264C8A - _02264C46 - 2 ; case 10 - .short _02264C8A - _02264C46 - 2 ; case 11 - .short _02264C8A - _02264C46 - 2 ; case 12 - .short _02264C8A - _02264C46 - 2 ; case 13 - .short _02264C8E - _02264C46 - 2 ; case 14 - .short _02264C8E - _02264C46 - 2 ; case 15 - .short _02264C8E - _02264C46 - 2 ; case 16 - .short _02264C8E - _02264C46 - 2 ; case 17 - .short _02264C8E - _02264C46 - 2 ; case 18 - .short _02264C8E - _02264C46 - 2 ; case 19 - .short _02264C8E - _02264C46 - 2 ; case 20 - .short _02264C8E - _02264C46 - 2 ; case 21 - .short _02264C82 - _02264C46 - 2 ; case 22 - .short _02264C82 - _02264C46 - 2 ; case 23 - .short _02264C82 - _02264C46 - 2 ; case 24 - .short _02264C82 - _02264C46 - 2 ; case 25 - .short _02264C86 - _02264C46 - 2 ; case 26 - .short _02264C86 - _02264C46 - 2 ; case 27 - .short _02264C86 - _02264C46 - 2 ; case 28 - .short _02264C86 - _02264C46 - 2 ; case 29 -_02264C82: - mov r0, #7 - pop {r3, pc} -_02264C86: - mov r0, #8 - pop {r3, pc} -_02264C8A: - mov r0, #5 - pop {r3, pc} -_02264C8E: - mov r0, #6 - pop {r3, pc} -_02264C92: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02264C34 - - thumb_func_start ov70_02264C9C -ov70_02264C9C: ; 0x02264C9C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _02264CB0 - cmp r0, #1 - beq _02264D06 - b _02264D30 -_02264CB0: - add r0, r4, #0 - bl ov70_0225DEE8 - add r6, r0, #0 - bl ov66_0222E12C - cmp r0, #1 - bne _02264CCE - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - bl ov70_0225E20C - add r1, r0, #0 - b _02264CF2 -_02264CCE: - add r0, r6, #0 - bl ov66_0222E170 - cmp r0, #1 - bne _02264CE6 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4e - bl ov70_0225E20C - add r1, r0, #0 - b _02264CF2 -_02264CE6: - add r0, r4, #0 - mov r1, #1 - mov r2, #2 - bl ov70_0225E20C - add r1, r0, #0 -_02264CF2: - add r0, r4, #0 - bl ov70_0225DF8C - ldr r0, _02264D34 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov70_02262E8C - b _02264D30 -_02264D06: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #0 - beq _02264D30 - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r4, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov70_0225CDEC - mov r0, #1 - pop {r4, r5, r6, pc} -_02264D30: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02264D34: .word 0x000005DC - thumb_func_end ov70_02264C9C - - thumb_func_start ov70_02264D38 -ov70_02264D38: ; 0x02264D38 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - str r2, [sp] - bl ov70_0225DEF0 - str r0, [sp, #8] - add r0, r5, #0 - bl ov70_0225DEF8 - add r7, r0, #0 - add r0, r5, #0 - bl ov70_0225DF08 - str r0, [sp, #0xc] - add r0, r5, #0 - bl ov70_0225DEE8 - str r0, [sp, #4] - add r0, r6, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0xf - bls _02264D76 - b _022650D2 -_02264D76: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02264D82: ; jump table - .short _02264DA2 - _02264D82 - 2 ; case 0 - .short _02264DEA - _02264D82 - 2 ; case 1 - .short _02264E5E - _02264D82 - 2 ; case 2 - .short _02264EF4 - _02264D82 - 2 ; case 3 - .short _02264F28 - _02264D82 - 2 ; case 4 - .short _02264F58 - _02264D82 - 2 ; case 5 - .short _02264F94 - _02264D82 - 2 ; case 6 - .short _02264FAA - _02264D82 - 2 ; case 7 - .short _02264FC2 - _02264D82 - 2 ; case 8 - .short _02264FE2 - _02264D82 - 2 ; case 9 - .short _02265002 - _02264D82 - 2 ; case 10 - .short _02265022 - _02264D82 - 2 ; case 11 - .short _02265036 - _02264D82 - 2 ; case 12 - .short _02265046 - _02264D82 - 2 ; case 13 - .short _02265092 - _02264D82 - 2 ; case 14 - .short _022650A8 - _02264D82 - 2 ; case 15 -_02264DA2: - add r0, r6, #0 - mov r1, #0x18 - bl ov70_02262E3C - add r4, r0, #0 - ldr r0, [sp, #8] - ldr r1, [sp] - bl ov70_0225CC70 - str r0, [r4, #0xc] - add r0, r5, #0 - bl ov70_0225DF40 - cmp r0, #0x21 - beq _02264DCA - cmp r0, #0x22 - beq _02264DD0 - cmp r0, #0x23 - beq _02264DD6 - b _02264DDC -_02264DCA: - mov r0, #2 - strh r0, [r4, #6] - b _02264DE0 -_02264DD0: - mov r0, #1 - strh r0, [r4, #6] - b _02264DE0 -_02264DD6: - mov r0, #0 - strh r0, [r4, #6] - b _02264DE0 -_02264DDC: - bl sub_02022974 -_02264DE0: - add r0, r6, #0 - mov r1, #1 - bl ov70_02262E88 - b _022650D2 -_02264DEA: - ldr r0, [sp, #4] - bl ov66_0222E170 - cmp r0, #0 - bne _02264E02 - mov r0, #8 - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #6 - bl ov70_02262E88 - b _022650D2 -_02264E02: - ldr r0, [sp, #4] - bl ov66_0222E12C - cmp r0, #1 - bne _02264E1A - mov r0, #0xa - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #6 - bl ov70_02262E88 - b _022650D2 -_02264E1A: - ldrh r2, [r4, #6] - ldr r0, [sp, #4] - ldr r1, [sp] - bl ov66_0222EBB4 - mov r1, #0 - mvn r1, r1 - str r0, [r4, #0] - cmp r0, r1 - beq _02264E50 - add r0, r6, #0 - mov r1, #2 - bl ov70_02262E88 - add r0, r5, #0 - mov r1, #0 - mov r2, #0x1f - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - b _022650D2 -_02264E50: - mov r0, #9 - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #6 - bl ov70_02262E88 - b _022650D2 -_02264E5E: - ldr r0, _022650D8 ; =0x021BF67C - mov r1, #2 - ldr r0, [r0, #0x48] - tst r1, r0 - bne _02264E6E - mov r1, #0x80 - tst r0, r1 - beq _02264E8E -_02264E6E: - ldr r0, [sp, #4] - ldr r1, [sp] - bl ov66_0222EBC4 - add r0, r5, #0 - bl ov70_0225DFCC - mov r0, #6 - strb r0, [r4, #0xa] - mov r0, #0xf - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #0xc - bl ov70_02262E88 - b _022650D2 -_02264E8E: - add r0, r4, #0 - add r1, r7, #0 - bl ov70_02265104 - cmp r0, #1 - beq _02264E9C - b _022650D2 -_02264E9C: - add r0, r5, #0 - bl ov70_0225DFCC - ldr r0, [sp, #4] - bl ov66_0222EC40 - mov r0, #0 - strh r0, [r4, #8] - add r0, r5, #0 - bl ov70_0225DEE8 - mov r1, #0xa - bl ov66_0222E3E4 - add r0, r5, #0 - bl ov70_0225DF44 - ldr r0, [sp, #0xc] - bl ov70_02260B3C - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov70_0225D030 - ldr r0, [r4, #0xc] - mov r1, #1 - bl ov70_0225D06C - ldr r0, _022650DC ; =0x000005AA - bl sub_02005748 - add r0, r5, #0 - bl ov70_0225E410 - mov r0, #3 - strb r0, [r4, #0xa] - add r0, r6, #0 - mov r1, #0xc - bl ov70_02262E88 - ldr r0, [sp, #4] - bl ov66_0222F000 - b _022650D2 -_02264EF4: - ldr r2, [sp, #0xc] - add r0, r4, #0 - add r1, r7, #0 - bl ov70_02265144 - cmp r0, #1 - bne _02264FB6 - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov70_0225D06C - ldr r0, [r4, #0xc] - mov r1, #2 - bl ov70_0225D060 - ldr r0, [r4, #0xc] - mov r1, #8 - bl ov70_0225D0B4 - add r0, r6, #0 - mov r1, #4 - bl ov70_02262E88 - mov r0, #0 - strh r0, [r4, #8] - b _022650D2 -_02264F28: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265344 - ldr r1, [sp, #0xc] - add r0, r4, #0 - bl ov70_022650E4 - add r0, r4, #0 - add r1, r7, #0 - bl ov70_022652BC - cmp r0, #1 - bne _02264FB6 - add r0, r6, #0 - mov r1, #5 - bl ov70_02262E88 - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E43C - b _022650D2 -_02264F58: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265344 - ldr r1, [sp, #0xc] - add r0, r4, #0 - bl ov70_022650E4 - ldr r0, [r4, #0xc] - add r1, sp, #0x10 - bl ov70_0225D054 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265370 - mov r0, #6 - ldr r1, [sp, #0x10] - lsl r0, r0, #0x10 - cmp r1, r0 - bge _02264FB6 - mov r0, #0 - strb r0, [r4, #0xb] - add r0, r6, #0 - mov r1, #0xd - bl ov70_02262E88 - b _022650D2 -_02264F94: - ldr r0, [sp, #8] - ldr r1, [r4, #0xc] - mov r2, #2 - mov r3, #1 - bl ov70_0225CDAC - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - b _022650D2 -_02264FAA: - ldr r0, [r4, #0xc] - mov r1, #5 - bl ov70_0225CD60 - cmp r0, #0 - beq _02264FB8 -_02264FB6: - b _022650D2 -_02264FB8: - ldrh r1, [r4, #4] - add r0, r6, #0 - bl ov70_02262E88 - b _022650D2 -_02264FC2: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x1e - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0xf - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #0xb - bl ov70_02262E88 - b _022650D2 -_02264FE2: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x20 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0xf - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #0xb - bl ov70_02262E88 - b _022650D2 -_02265002: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x21 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0xf - strh r0, [r4, #4] - add r0, r6, #0 - mov r1, #0xb - bl ov70_02262E88 - b _022650D2 -_02265022: - add r0, r5, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _022650D2 - ldrh r1, [r4, #4] - add r0, r6, #0 - bl ov70_02262E88 - b _022650D2 -_02265036: - add r0, r5, #0 - bl ov70_0225DFEC - ldrb r1, [r4, #0xa] - add r0, r6, #0 - bl ov70_02262E88 - b _022650D2 -_02265046: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265344 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265370 - ldrb r0, [r4, #0xb] - add r0, r0, #1 - strb r0, [r4, #0xb] - ldrb r0, [r4, #0xb] - cmp r0, #0x78 - bls _022650D2 - add r0, r5, #0 - mov r1, #1 - bl ov70_0225DF34 - add r0, r5, #0 - mov r1, #0 - bl ov70_0225DF38 - add r0, r5, #0 - bl ov70_0225DFEC - add r0, r5, #0 - bl ov70_0225DEE8 - mov r1, #0xb - bl ov66_0222E3E4 - add r0, r6, #0 - mov r1, #0xe - bl ov70_02262E88 - b _022650D2 -_02265092: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265344 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02265370 - b _022650D2 -_022650A8: - add r0, r5, #0 - bl ov70_0225DF10 - add r7, r0, #0 - add r0, r5, #0 - bl ov70_0225DFEC - ldr r0, [sp, #8] - ldr r1, [r4, #0xc] - mov r2, #1 - bl ov70_0225CDEC - add r0, r6, #0 - bl ov70_02262E64 - ldr r1, [sp] - ldr r2, _022650E0 ; =0x0226D9D0 - add r0, r7, #0 - mov r3, #0 - bl ov70_02262E94 -_022650D2: - mov r0, #0 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022650D8: .word 0x021BF67C -_022650DC: .word 0x000005AA -_022650E0: .word 0x0226D9D0 - thumb_func_end ov70_02264D38 - - thumb_func_start ov70_022650E4 -ov70_022650E4: ; 0x022650E4 - push {r3, r4, lr} - sub sp, #0xc - ldr r0, [r0, #0xc] - add r4, r1, #0 - add r1, sp, #0 - bl ov70_0225D054 - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl ov70_02260B18 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_022650E4 - - thumb_func_start ov70_02265104 -ov70_02265104: ; 0x02265104 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov66_0222EC04 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r4, #0 - add r3, sp, #8 - bl ov70_02262318 - ldr r0, [r5, #0xc] - add r1, sp, #0x14 - bl ov70_0225D054 - mov r0, #1 - ldr r1, [sp, #0x14] - lsl r0, r0, #0x10 - add r1, r1, r0 - ldr r0, [sp, #8] - cmp r1, r0 - blt _0226513E - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, pc} -_0226513E: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov70_02265104 - - thumb_func_start ov70_02265144 -ov70_02265144: ; 0x02265144 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - mov r0, #8 - add r6, r1, #0 - ldrsh r1, [r5, r0] - add r7, r2, #0 - add r1, r1, #1 - strh r1, [r5, #8] - ldrsh r0, [r5, r0] - cmp r0, #0x18 - bge _02265160 - mov r4, #0 - b _02265166 -_02265160: - mov r0, #0x18 - strh r0, [r5, #8] - mov r4, #1 -_02265166: - ldr r0, [r5, #0] - add r1, sp, #0xc - add r2, sp, #8 - bl ov66_0222EC04 - ldr r1, [sp, #0xc] - ldr r2, [sp, #8] - add r0, r6, #0 - add r3, sp, #0x1c - bl ov70_02262318 - ldr r0, [r5, #0xc] - bl ov70_0225CD34 - add r1, sp, #0 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r2, [r1] - add r0, sp, #4 - strh r2, [r1, #4] - ldrh r2, [r1, #2] - strh r2, [r1, #6] - add r1, sp, #0x28 - bl ov70_0225C700 - mov r0, #0 - str r0, [sp, #0x10] - ldr r1, [sp, #0x20] - ldr r0, [sp, #0x2c] - sub r6, r1, r0 - mov r0, #8 - ldrsh r0, [r5, r0] - cmp r0, #0 - ble _022651BE - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _022651CC -_022651BE: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_022651CC: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #6 - lsl r1, r1, #0xe - bl sub_020BCFD0 - str r0, [sp, #0x14] - mov r0, #8 - ldrsh r2, [r5, r0] - cmp r2, #4 - blt _02265252 - ldr r1, [sp, #0x24] - ldr r0, [sp, #0x30] - sub r6, r1, r0 - sub r0, r2, #4 - cmp r0, #0 - ble _0226521A - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _02265228 -_0226521A: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_02265228: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #5 - lsl r1, r1, #0xe - bl sub_020BCFD0 - str r0, [sp, #0x18] - b _02265256 -_02265252: - mov r0, #0 - str r0, [sp, #0x18] -_02265256: - add r0, sp, #0x10 - add r1, sp, #0x28 - add r2, r0, #0 - bl sub_020BD17C - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x14] - ldr r3, [sp, #0x18] - add r0, r7, #0 - bl ov70_02260B18 - mov r0, #8 - ldrsh r1, [r5, r0] - ldr r0, _022652B4 ; =0x00007FFF - mul r0, r1 - mov r1, #0x18 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r2, r0, #2 - ldr r0, _022652B8 ; =0x020F983C - ldr r1, [sp, #0x14] - ldrsh r3, [r0, r2] - asr r0, r3, #0x1f - lsr r2, r3, #0x10 - lsl r0, r0, #0x10 - orr r0, r2 - mov r2, #2 - lsl r6, r3, #0x10 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r6, r2 - adc r0, r3 - lsl r0, r0, #0x14 - lsr r2, r2, #0xc - orr r2, r0 - add r0, r1, r2 - str r0, [sp, #0x14] - ldr r0, [r5, #0xc] - add r1, sp, #0x10 - bl ov70_0225D048 - add r0, r4, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022652B4: .word 0x00007FFF -_022652B8: .word 0x020F983C - thumb_func_end ov70_02265144 - - thumb_func_start ov70_022652BC -ov70_022652BC: ; 0x022652BC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #8 - ldrsh r1, [r5, r0] - add r1, r1, #1 - strh r1, [r5, #8] - ldrsh r0, [r5, r0] - cmp r0, #0x10 - bge _022652D4 - mov r6, #0 - b _022652DA -_022652D4: - mov r0, #0x10 - strh r0, [r5, #8] - mov r6, #1 -_022652DA: - mov r0, #8 - ldrsh r0, [r5, r0] - mov r3, #0 - lsr r2, r0, #0x1f - lsl r1, r0, #0x1d - sub r1, r1, r2 - mov r0, #0x1d - ror r1, r0 - add r1, r2, r1 - ldr r0, _0226533C ; =0x00007FFF - add r2, r1, #0 - mul r2, r0 - asr r0, r2, #2 - lsr r0, r0, #0x1d - add r0, r2, r0 - lsl r0, r0, #0xd - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02265340 ; =0x020F983C - mov r2, #3 - ldrsh r0, [r0, r1] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r4, r2, #0xc - orr r4, r0 - ldr r0, [r5, #0xc] - add r1, sp, #0 - bl ov70_0225D054 - ldr r0, [sp, #4] - add r1, sp, #0 - add r0, r0, r4 - str r0, [sp, #4] - ldr r0, [r5, #0xc] - bl ov70_0225D048 - add r0, r6, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0226533C: .word 0x00007FFF -_02265340: .word 0x020F983C - thumb_func_end ov70_022652BC - - thumb_func_start ov70_02265344 -ov70_02265344: ; 0x02265344 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - add r1, sp, #0 - add r2, sp, #4 - bl ov66_0222EC04 - ldr r1, [sp] - ldr r2, [sp, #4] - add r0, r4, #0 - add r3, sp, #8 - bl ov70_02262318 - ldr r0, [r5, #0xc] - add r1, sp, #8 - bl ov70_0225D048 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02265344 - - thumb_func_start ov70_02265370 -ov70_02265370: ; 0x02265370 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r2, #0 - add r1, sp, #4 - add r2, sp, #0 - bl ov66_0222EC04 - ldr r1, [sp, #4] - add r0, r4, #0 - bl ov70_0225E420 - cmp r0, #1 - bne _022653A4 - add r0, r5, #0 - add r0, #0x10 - bl ov70_02263334 - cmp r0, #0 - bne _022653B8 - add r0, r5, #0 - add r0, #0x10 - bl ov70_02263270 - b _022653B8 -_022653A4: - add r0, r5, #0 - add r0, #0x10 - bl ov70_02263334 - cmp r0, #1 - bne _022653B8 - add r0, r5, #0 - add r0, #0x10 - bl ov70_0226332C -_022653B8: - add r0, r5, #0 - add r0, #0x10 - bl ov70_02263290 - add r4, r0, #0 - ldr r0, [r5, #0xc] - add r1, sp, #8 - bl ov70_0225D054 - ldr r0, [sp, #0xc] - add r1, sp, #8 - add r0, r0, r4 - str r0, [sp, #0xc] - ldr r0, [r5, #0xc] - bl ov70_0225D048 - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov70_02265370 - - thumb_func_start ov70_022653DC -ov70_022653DC: ; 0x022653DC - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x12 - bl ov70_0225E00C - mov r4, #1 - mov r6, #0 - add r7, r4, #0 -_022653F0: - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov70_0225E30C - add r0, r5, #0 - add r1, r7, #0 - mov r2, #6 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov70_0225E044 - add r4, r4, #1 - cmp r4, #0x12 - blt _022653F0 - add r0, r5, #0 - mov r1, #1 - mov r2, #7 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E044 - ldr r2, [sp] - ldr r3, _0226544C ; =0x0226DA98 - add r2, #8 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r5, #0 - bl ov70_0225E054 - ldr r1, [sp] - str r0, [r1, #8] - pop {r3, r4, r5, r6, r7, pc} - nop -_0226544C: .word 0x0226DA98 - thumb_func_end ov70_022653DC - - thumb_func_start ov70_02265450 -ov70_02265450: ; 0x02265450 - ldr r3, _02265458 ; =ov70_0225E034 - add r0, r1, #0 - bx r3 - nop -_02265458: .word ov70_0225E034 - thumb_func_end ov70_02265450 - - thumb_func_start ov70_0226545C -ov70_0226545C: ; 0x0226545C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - add r4, r2, #0 - bl ov70_0225DEE8 - str r0, [sp, #8] - add r0, r6, #0 - bl ov70_0225DEF0 - add r1, r4, #0 - str r0, [sp, #0xc] - bl ov70_0225CC70 - add r7, r0, #0 - add r0, r5, #0 - bl ov70_02262E80 - str r0, [sp, #0x10] - add r0, r6, #0 - bl ov70_0225DF10 - str r0, [sp, #0x14] - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #5 - bhi _02265516 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022654A4: ; jump table - .short _022654B0 - _022654A4 - 2 ; case 0 - .short _022654C0 - _022654A4 - 2 ; case 1 - .short _022654E4 - _022654A4 - 2 ; case 2 - .short _02265528 - _022654A4 - 2 ; case 3 - .short _022655DA - _022654A4 - 2 ; case 4 - .short _022655EC - _022654A4 - 2 ; case 5 -_022654B0: - add r0, r5, #0 - mov r1, #8 - bl ov70_02262E3C - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 -_022654C0: - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov66_0222E02C - add r6, r0, #0 - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov66_0222E34C - cmp r6, #1 - beq _022654DA - cmp r0, #1 - bne _02265516 -_022654DA: - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - b _02265620 -_022654E4: - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov66_0222E374 - add r6, r0, #0 - bne _022654FA - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02265620 -_022654FA: - bl ov66_0222E8D8 - cmp r0, #1 - bne _02265516 - add r0, r6, #0 - bl ov66_0222E858 - add r2, r0, #0 - ldr r0, [sp, #0xc] - add r1, r4, #0 - bl ov70_0225CBB8 - cmp r0, #0 - bne _02265518 -_02265516: - b _02265620 -_02265518: - mov r1, #0 - bl ov70_0225D0C0 - add r0, r5, #0 - mov r1, #3 - bl ov70_02262E88 - b _02265620 -_02265528: - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov66_0222E374 - cmp r0, #0 - bne _02265548 - cmp r7, #0 - beq _0226553E - add r0, r7, #0 - bl ov70_0225CC54 -_0226553E: - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02265620 -_02265548: - bl ov66_0222E71C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - ldr r1, [sp, #8] - add r2, r6, #0 - add r3, r7, #0 - bl ov70_02265CCC - cmp r0, #0 - beq _022655A6 - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF6C - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - add r0, r7, #0 - mov r1, #0 - bl ov70_0225D030 - ldr r0, [sp, #0x14] - ldr r2, _02265628 ; =0x0226D9F0 - ldr r3, [sp, #0x10] - add r1, r4, #0 - bl ov70_02262EC0 - b _02265620 -_022655A6: - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #4 - bl ov70_0225CDEC - add r0, r5, #0 - mov r1, #4 - bl ov70_02262E88 - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF6C - add r0, r7, #0 - mov r1, #1 - bl ov70_0225D0C0 - b _02265620 -_022655DA: - add r0, r7, #0 - bl ov70_0225CE38 - cmp r0, #1 - bne _02265620 - add r0, r5, #0 - bl ov70_02262E8C - b _02265620 -_022655EC: - add r0, r5, #0 - bl ov70_02262E64 - ldr r0, [sp, #0xc] - add r1, r7, #0 - mov r2, #2 - bl ov70_0225CDEC - ldr r0, [sp, #0x14] - ldr r2, _0226562C ; =0x0226D9D8 - add r1, r4, #0 - mov r3, #0 - bl ov70_02262E94 - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF4C - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF6C -_02265620: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02265628: .word 0x0226D9F0 -_0226562C: .word 0x0226D9D8 - thumb_func_end ov70_0226545C - - thumb_func_start ov70_02265630 -ov70_02265630: ; 0x02265630 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r4, r2, #0 - bl ov70_0225DEE8 - add r6, r0, #0 - add r0, r5, #0 - bl ov70_0225DEF0 - str r0, [sp, #0x10] - add r0, r5, #0 - bl ov70_0225DF10 - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - add r1, r4, #0 - bl ov70_0225CC70 - add r7, r0, #0 - ldr r0, [sp, #0x10] - bl ov70_0225CCAC - ldr r0, [sp, #8] - bl ov70_02262E80 - str r0, [sp, #0x14] - ldr r0, [sp, #8] - bl ov70_02262E84 - cmp r0, #0 - beq _0226567A - cmp r0, #1 - beq _0226568C - b _022657BA -_0226567A: - ldr r0, [sp, #8] - mov r1, #8 - bl ov70_02262E3C - str r0, [sp, #0x14] - ldr r0, [sp, #8] - mov r1, #1 - bl ov70_02262E88 -_0226568C: - add r0, r6, #0 - add r1, r4, #0 - bl ov66_0222E058 - cmp r0, #0 - beq _022656CE - ldr r0, [sp, #8] - bl ov70_02262E64 - ldr r0, [sp, #0x10] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF6C - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - ldr r0, [sp, #0xc] - ldr r2, _022657C0 ; =0x0226D9E0 - add r1, r4, #0 - mov r3, #0 - bl ov70_02262E94 - b _022657BA -_022656CE: - add r0, r6, #0 - add r1, r4, #0 - bl ov66_0222E09C - add r0, r6, #0 - bl ov66_0222E170 - cmp r0, #1 - bne _0226572E - add r0, r6, #0 - add r1, r4, #0 - bl ov66_0222EBA4 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0226572E - ldr r0, [sp, #0x10] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF6C - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - add r0, r7, #0 - mov r1, #0 - bl ov70_0225D030 - ldr r0, [sp, #8] - bl ov70_02262E64 - ldr r0, [sp, #0xc] - ldr r2, _022657C4 ; =0x0226D9E8 - ldr r3, [sp, #0x14] - add r1, r4, #0 - bl ov70_02262E94 - b _022657BA -_0226572E: - add r0, r6, #0 - add r1, r4, #0 - bl ov66_0222E374 - bl ov66_0222E71C - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x14] - add r1, r6, #0 - add r2, r5, #0 - add r3, r7, #0 - bl ov70_02265CCC - cmp r0, #0 - beq _0226578C - ldr r0, [sp, #0x10] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF6C - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - add r0, r7, #0 - mov r1, #0 - bl ov70_0225D030 - ldr r0, [sp, #0xc] - ldr r2, _022657C8 ; =0x0226D9F0 - ldr r3, [sp, #0x14] - add r1, r4, #0 - bl ov70_02262EC0 - b _022657BA -_0226578C: - add r0, r6, #0 - add r1, r4, #0 - bl ov66_0222EB54 - cmp r0, #1 - bne _022657BA - ldr r0, [sp, #0x10] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - ldr r0, [sp, #0xc] - ldr r2, _022657CC ; =0x0226DA18 - add r1, r4, #0 - mov r3, #0 - bl ov70_02262EC0 -_022657BA: - mov r0, #0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022657C0: .word 0x0226D9E0 -_022657C4: .word 0x0226D9E8 -_022657C8: .word 0x0226D9F0 -_022657CC: .word 0x0226DA18 - thumb_func_end ov70_02265630 - - thumb_func_start ov70_022657D0 -ov70_022657D0: ; 0x022657D0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - str r2, [sp] - add r0, r6, #0 - bl ov70_0225DEF0 - ldr r1, [sp] - add r7, r0, #0 - bl ov70_0225CC70 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _022657FC - cmp r0, #1 - beq _0226580E - cmp r0, #2 - beq _02265820 - b _02265836 -_022657FC: - add r0, r7, #0 - add r1, r4, #0 - mov r2, #3 - bl ov70_0225CDEC - add r0, r5, #0 - bl ov70_02262E8C - b _02265836 -_0226580E: - add r0, r4, #0 - bl ov70_0225CE38 - cmp r0, #0 - beq _02265836 - add r0, r5, #0 - bl ov70_02262E8C - b _02265836 -_02265820: - add r0, r4, #0 - bl ov70_0225CC54 - add r0, r6, #0 - bl ov70_0225DF10 - ldr r1, [sp] - ldr r2, _0226583C ; =0x0226DA10 - mov r3, #0 - bl ov70_02262E94 -_02265836: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226583C: .word 0x0226DA10 - thumb_func_end ov70_022657D0 - - thumb_func_start ov70_02265840 -ov70_02265840: ; 0x02265840 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - add r7, r2, #0 - bl ov70_0225DEE8 - str r0, [sp] - add r0, r6, #0 - bl ov70_0225DEF0 - str r0, [sp, #8] - add r0, r6, #0 - bl ov70_0225DEF8 - str r0, [sp, #4] - add r0, r5, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #4 - bhi _022658DE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02265880: ; jump table - .short _0226588A - _02265880 - 2 ; case 0 - .short _022658D4 - _02265880 - 2 ; case 1 - .short _0226593A - _02265880 - 2 ; case 2 - .short _022659E8 - _02265880 - 2 ; case 3 - .short _02265A58 - _02265880 - 2 ; case 4 -_0226588A: - add r0, r5, #0 - mov r1, #0x20 - bl ov70_02262E3C - add r4, r0, #0 - ldr r0, [sp, #8] - add r1, r7, #0 - bl ov70_0225CC70 - str r0, [r4, #0] - ldr r0, [sp] - add r1, r7, #0 - bl ov66_0222EBA4 - mov r1, #0 - mvn r1, r1 - str r0, [r4, #4] - cmp r0, r1 - bne _022658B4 - bl sub_02022974 -_022658B4: - add r2, r4, #0 - ldr r0, [r4, #4] - add r1, r4, #4 - add r2, #8 - bl ov66_0222EC04 - ldr r0, [sp, #8] - ldr r1, [r4, #0] - mov r2, #3 - bl ov70_0225CDEC - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02265A74 -_022658D4: - ldr r0, [r4, #0] - bl ov70_0225CE38 - cmp r0, #0 - bne _022658E0 -_022658DE: - b _02265A74 -_022658E0: - ldr r0, [sp, #4] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - add r3, sp, #0x34 - bl ov70_02262318 - mov r0, #1 - ldr r1, [sp, #0x34] - lsl r0, r0, #0x10 - sub r0, r1, r0 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - add r1, sp, #0x34 - bl ov70_0225D054 - ldr r0, [sp, #0x38] - mov r3, sp - str r0, [r4, #0xc] - mov r1, #0 - str r1, [r4, #0x14] - add r0, sp, #0xc - strh r1, [r0] - strh r1, [r0, #2] - add r1, sp, #0xc - ldrh r2, [r1] - ldr r0, [r4, #0] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #2] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov70_0225CCB4 - ldr r0, _02265A7C ; =0x0000064F - bl sub_02005748 - ldr r0, [r4, #0] - mov r1, #1 - bl ov70_0225D084 - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - b _02265A74 -_0226593A: - ldr r0, [r4, #0x14] - mov r6, #0 - add r0, r0, #1 - str r0, [r4, #0x14] - cmp r0, #0x18 - blt _0226594C - mov r0, #0x18 - str r0, [r4, #0x14] - mov r6, #1 -_0226594C: - ldr r0, [sp, #4] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - add r3, sp, #0x28 - bl ov70_02262318 - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x2c] - str r0, [sp, #0x24] - ldr r0, [r4, #0x10] - str r0, [sp, #0x1c] - ldr r0, [r4, #0xc] - sub r7, r1, r0 - ldr r0, [r4, #0x14] - cmp r0, #0 - ble _0226597E - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226598C -_0226597E: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226598C: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r7, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - mov r1, #6 - lsl r1, r1, #0xe - bl sub_020BCFD0 - str r0, [sp, #0x20] - ldr r1, [r4, #0xc] - add r0, r0, r1 - str r0, [sp, #0x20] - ldr r0, [r4, #0] - add r1, sp, #0x1c - bl ov70_0225D048 - cmp r6, #1 - bne _02265A74 - ldr r0, [r4, #0] - mov r1, #0 - bl ov70_0225D084 - ldr r0, [r4, #0] - mov r1, #8 - bl ov70_0225D0B4 - ldr r0, [r4, #0] - mov r1, #2 - bl ov70_0225D060 - add r0, r5, #0 - mov r1, #3 - bl ov70_02262E88 - b _02265A74 -_022659E8: - ldr r1, [r4, #4] - add r0, r6, #0 - bl ov70_0225E420 - cmp r0, #1 - bne _02265A0A - add r0, r4, #0 - add r0, #0x18 - bl ov70_02263334 - cmp r0, #0 - bne _02265A1E - add r0, r4, #0 - add r0, #0x18 - bl ov70_02263270 - b _02265A1E -_02265A0A: - add r0, r4, #0 - add r0, #0x18 - bl ov70_02263334 - cmp r0, #1 - bne _02265A1E - add r0, r4, #0 - add r0, #0x18 - bl ov70_0226332C -_02265A1E: - add r0, r4, #0 - add r0, #0x18 - bl ov70_02263290 - add r6, r0, #0 - ldr r0, [sp, #4] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - add r3, sp, #0x10 - bl ov70_02262318 - ldr r0, [sp, #0x14] - add r1, sp, #0x10 - add r0, r0, r6 - str r0, [sp, #0x14] - ldr r0, [r4, #0] - bl ov70_0225D048 - ldr r0, [sp] - ldr r1, [r4, #4] - bl ov66_0222EB7C - cmp r0, #2 - bne _02265A74 - add r0, r5, #0 - mov r1, #4 - bl ov70_02262E88 - b _02265A74 -_02265A58: - ldr r0, [r4, #0] - bl ov70_0225CC54 - add r0, r5, #0 - bl ov70_02262E64 - add r0, r6, #0 - bl ov70_0225DF10 - ldr r2, _02265A80 ; =0x0226DA10 - add r1, r7, #0 - mov r3, #0 - bl ov70_02262E94 -_02265A74: - mov r0, #0 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_02265A7C: .word 0x0000064F -_02265A80: .word 0x0226DA10 - thumb_func_end ov70_02265840 - - thumb_func_start ov70_02265A84 -ov70_02265A84: ; 0x02265A84 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r1, [sp] - add r7, r0, #0 - add r4, r2, #0 - bl ov70_02262E38 - add r6, r0, #0 - ldr r0, [sp] - bl ov70_0225DEE8 - str r0, [sp, #8] - ldr r0, [sp] - bl ov70_0225DEF0 - str r0, [sp, #0xc] - add r1, r4, #0 - bl ov70_0225CC70 - add r5, r0, #0 - ldr r0, [sp, #0xc] - bl ov70_0225CCAC - str r0, [sp, #0x10] - add r0, r7, #0 - bl ov70_02262E84 - cmp r0, #0xa - bhi _02265B68 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02265ACA: ; jump table - .short _02265AE0 - _02265ACA - 2 ; case 0 - .short _02265AF8 - _02265ACA - 2 ; case 1 - .short _02265B0A - _02265ACA - 2 ; case 2 - .short _02265B1C - _02265ACA - 2 ; case 3 - .short _02265B5E - _02265ACA - 2 ; case 4 - .short _02265B94 - _02265ACA - 2 ; case 5 - .short _02265C3E - _02265ACA - 2 ; case 6 - .short _02265B0A - _02265ACA - 2 ; case 7 - .short _02265C50 - _02265ACA - 2 ; case 8 - .short _02265B0A - _02265ACA - 2 ; case 9 - .short _02265C9E - _02265ACA - 2 ; case 10 -_02265AE0: - ldrb r0, [r6, #4] - cmp r0, #0 - bne _02265AEE - add r0, r7, #0 - bl ov70_02262E8C - b _02265CC6 -_02265AEE: - add r0, r7, #0 - mov r1, #3 - bl ov70_02262E88 - b _02265CC6 -_02265AF8: - ldr r0, [sp, #0xc] - add r1, r5, #0 - mov r2, #3 - bl ov70_0225CDEC - add r0, r7, #0 - bl ov70_02262E8C - b _02265CC6 -_02265B0A: - add r0, r5, #0 - bl ov70_0225CE38 - cmp r0, #1 - bne _02265B68 - add r0, r7, #0 - bl ov70_02262E8C - b _02265CC6 -_02265B1C: - add r0, r5, #0 - bl ov70_0225CD34 - add r2, sp, #0x14 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - add r1, sp, #0x1c - strh r0, [r2, #8] - ldrh r0, [r2, #2] - strh r0, [r2, #0xa] - add r0, r5, #0 - bl ov70_0225D03C - add r0, r5, #0 - bl ov70_0225D0CC - cmp r0, #0 - bne _02265B4C - add r0, r5, #0 - mov r1, #1 - bl ov70_0225D0C0 -_02265B4C: - ldr r0, [sp, #0xc] - add r1, r5, #0 - mov r2, #4 - bl ov70_0225CDEC - add r0, r7, #0 - bl ov70_02262E8C - b _02265CC6 -_02265B5E: - add r0, r5, #0 - bl ov70_0225CE38 - cmp r0, #1 - beq _02265B6A -_02265B68: - b _02265CC6 -_02265B6A: - add r0, r7, #0 - bl ov70_02262E8C - ldr r0, [sp, #0xc] - add r1, r5, #0 - mov r2, #0 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF4C - lsl r1, r4, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF6C - b _02265CC6 -_02265B94: - mov r0, #0 - str r0, [sp, #4] - ldrb r0, [r6, #3] - cmp r0, #1 - bne _02265BD4 - ldr r0, [sp, #8] - bl ov66_0222EEAC - cmp r0, #0 - bne _02265BD4 - ldr r0, [sp, #8] - bl ov66_0222E3BC - bl ov66_0222E71C - cmp r0, #9 - bne _02265BD4 - ldr r0, [sp, #8] - bl ov66_0222EEA0 - add r0, r5, #0 - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - add r3, r0, #0 - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x10] - mov r2, #0 - bl ov70_0225CDAC -_02265BD4: - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov66_0222E374 - add r5, r0, #0 - bne _02265BE6 - mov r0, #1 - str r0, [sp, #4] - b _02265C18 -_02265BE6: - ldrb r0, [r6, #3] - cmp r0, #1 - bne _02265BFC - ldr r0, [sp, #8] - bl ov66_0222EDF4 - cmp r0, #0 - bne _02265BFC - mov r0, #1 - str r0, [sp, #4] - b _02265C18 -_02265BFC: - ldr r0, [sp, #8] - add r1, r4, #0 - bl ov66_0222E09C - cmp r0, #0 - beq _02265C18 - add r0, r5, #0 - bl ov66_0222E71C - ldrb r1, [r6, #2] - cmp r0, r1 - beq _02265C18 - mov r0, #1 - str r0, [sp, #4] -_02265C18: - ldr r0, [sp, #4] - cmp r0, #1 - bne _02265CC6 - add r0, r7, #0 - bl ov70_02262E8C - lsl r1, r4, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF4C - lsl r1, r4, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - mov r2, #1 - bl ov70_0225DF6C - b _02265CC6 -_02265C3E: - ldr r0, [sp, #0xc] - add r1, r5, #0 - mov r2, #3 - bl ov70_0225CDEC - add r0, r7, #0 - bl ov70_02262E8C - b _02265CC6 -_02265C50: - ldr r0, [sp, #0xc] - bl ov70_0225CCAC - ldrb r1, [r6] - ldrb r2, [r6, #1] - bl ov70_0225CEDC - cmp r0, #0 - bne _02265CC6 - ldrb r0, [r6] - mov r3, sp - add r1, sp, #0x14 - lsl r0, r0, #4 - strh r0, [r1, #4] - ldrb r0, [r6, #1] - sub r3, r3, #4 - lsl r0, r0, #4 - strh r0, [r1, #6] - ldrh r2, [r1, #4] - add r0, r5, #0 - strh r2, [r3] - ldrh r1, [r1, #6] - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov70_0225CCB4 - add r0, r5, #0 - add r1, sp, #0x18 - bl ov70_0225D03C - ldr r0, [sp, #0xc] - add r1, r5, #0 - mov r2, #4 - bl ov70_0225CDEC - add r0, r7, #0 - bl ov70_02262E8C - b _02265CC6 -_02265C9E: - ldr r0, [sp, #0xc] - add r1, r5, #0 - mov r2, #2 - bl ov70_0225CDEC - lsl r1, r4, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF4C - lsl r1, r4, #0x18 - ldr r0, [sp] - lsr r1, r1, #0x18 - mov r2, #0 - bl ov70_0225DF6C - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02265CC6: - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02265A84 - - thumb_func_start ov70_02265CCC -ov70_02265CCC: ; 0x02265CCC - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r6, r2, #0 - add r4, r0, #0 - add r0, r6, #0 - str r1, [sp, #4] - str r3, [sp, #8] - mov r7, #0 - bl ov70_0225DEF0 - add r5, r0, #0 - bl ov70_0225CCAC - str r0, [sp, #0xc] - add r0, r6, #0 - bl ov70_0225DF00 - add r6, r0, #0 - ldr r0, [sp, #8] - mov r1, #4 - bl ov70_0225CD60 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x20] - add r0, sp, #0x28 - ldrb r0, [r0, #0x10] - cmp r0, #0xe - bhi _02265D44 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02265D12: ; jump table - .short _02265E50 - _02265D12 - 2 ; case 0 - .short _02265E50 - _02265D12 - 2 ; case 1 - .short _02265D30 - _02265D12 - 2 ; case 2 - .short _02265D4C - _02265D12 - 2 ; case 3 - .short _02265D66 - _02265D12 - 2 ; case 4 - .short _02265D80 - _02265D12 - 2 ; case 5 - .short _02265D9E - _02265D12 - 2 ; case 6 - .short _02265DBC - _02265D12 - 2 ; case 7 - .short _02265DDA - _02265D12 - 2 ; case 8 - .short _02265DFE - _02265D12 - 2 ; case 9 - .short _02265DF8 - _02265D12 - 2 ; case 10 - .short _02265E50 - _02265D12 - 2 ; case 11 - .short _02265E50 - _02265D12 - 2 ; case 12 - .short _02265E50 - _02265D12 - 2 ; case 13 - .short _02265E50 - _02265D12 - 2 ; case 14 -_02265D30: - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265EB4 ; =0x0226DA28 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #4 - bl ov70_02265ED0 - cmp r0, #0 - beq _02265D46 -_02265D44: - b _02265E56 -_02265D46: - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265D4C: - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265EB8 ; =0x0226DA58 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #4 - bl ov70_02265ED0 - cmp r0, #0 - bne _02265E56 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265D66: - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265EBC ; =0x0226DA38 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #4 - bl ov70_02265ED0 - cmp r0, #0 - bne _02265E56 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265D80: - add r0, r7, #0 - str r0, [sp, #0x20] - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265EC0 ; =0x0226DAB8 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #8 - bl ov70_02265ED0 - cmp r0, #0 - bne _02265E56 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265D9E: - add r0, r7, #0 - str r0, [sp, #0x20] - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265EC4 ; =0x0226DAD8 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #8 - bl ov70_02265ED0 - cmp r0, #0 - bne _02265E56 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265DBC: - mov r0, #3 - str r0, [sp, #0x20] - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265EC8 ; =0x0226DA48 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #4 - bl ov70_02265ED0 - cmp r0, #0 - bne _02265E56 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265DDA: - add r0, r7, #0 - str r0, [sp, #0x20] - add r0, sp, #0x1c - str r0, [sp] - ldr r2, _02265ECC ; =0x0226DA68 - add r0, r6, #0 - add r1, r5, #0 - mov r3, #4 - bl ov70_02265ED0 - cmp r0, #0 - bne _02265E56 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265DF8: - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265DFE: - ldr r0, [sp, #4] - bl ov66_0222EDF4 - cmp r0, #0 - bne _02265E0E - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265E0E: - ldr r0, [sp, #4] - bl ov66_0222EE08 - cmp r0, #0 - bne _02265E1E - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265E1E: - ldr r0, [sp, #4] - bl ov66_0222EE1C - ldr r1, [sp, #0x10] - cmp r1, r0 - beq _02265E30 - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265E30: - ldr r1, [sp, #0xc] - add r0, r5, #0 - add r2, sp, #0x20 - add r3, sp, #0x1c - bl ov70_0225CF4C - cmp r0, #1 - beq _02265E44 - bl sub_02022974 -_02265E44: - ldr r0, [sp, #0x20] - bl ov63_0222C0AC - str r0, [sp, #0x20] - mov r7, #1 - b _02265E56 -_02265E50: - add sp, #0x24 - add r0, r7, #0 - pop {r4, r5, r6, r7, pc} -_02265E56: - ldr r0, [sp, #8] - bl ov70_0225CD34 - add r1, sp, #0x14 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - ldrh r0, [r1] - mov r3, sp - sub r3, r3, #4 - strh r0, [r1, #4] - ldrh r0, [r1, #2] - strh r0, [r1, #6] - ldrh r2, [r1, #8] - ldr r0, [sp, #8] - strh r2, [r3] - ldrh r1, [r1, #0xa] - strh r1, [r3, #2] - ldr r1, [r3, #0] - ldr r2, [sp, #0x20] - bl ov70_0225CD04 - add r1, sp, #0x14 - mov r0, #4 - ldrsh r2, [r1, r0] - asr r0, r2, #3 - lsr r0, r0, #0x1c - add r0, r2, r0 - asr r0, r0, #4 - strb r0, [r4] - mov r0, #6 - ldrsh r1, [r1, r0] - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - strb r0, [r4, #1] - add r0, sp, #0x28 - ldrb r0, [r0, #0x10] - strb r0, [r4, #2] - ldr r0, [sp, #0x3c] - strb r7, [r4, #3] - strb r0, [r4, #4] - mov r0, #1 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02265EB4: .word 0x0226DA28 -_02265EB8: .word 0x0226DA58 -_02265EBC: .word 0x0226DA38 -_02265EC0: .word 0x0226DAB8 -_02265EC4: .word 0x0226DAD8 -_02265EC8: .word 0x0226DA48 -_02265ECC: .word 0x0226DA68 - thumb_func_end ov70_02265CCC - - thumb_func_start ov70_02265ED0 -ov70_02265ED0: ; 0x02265ED0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - ldr r0, [sp, #0x20] - add r5, r2, #0 - str r1, [sp, #4] - add r6, r3, #0 - str r0, [sp, #0x20] - ldr r4, _02265F34 ; =0x00000000 - beq _02265F2C -_02265EE4: - mov r0, #0 - str r0, [sp] - add r2, sp, #8 - ldr r1, [r5, #0] - add r0, r7, #0 - add r2, #2 - add r3, sp, #8 - bl ov70_0225C8D8 - cmp r0, #1 - bne _02265F24 - add r1, sp, #8 - add r2, sp, #8 - ldrh r1, [r1, #2] - ldrh r2, [r2] - ldr r0, [sp, #4] - bl ov70_0225CE7C - cmp r0, #0 - bne _02265F24 - add r1, sp, #8 - ldrh r0, [r1, #2] - lsl r2, r0, #4 - ldr r0, [sp, #0x20] - strh r2, [r0] - ldrh r0, [r1] - lsl r1, r0, #4 - ldr r0, [sp, #0x20] - add sp, #0xc - strh r1, [r0, #2] - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02265F24: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r6 - blo _02265EE4 -_02265F2C: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02265F34: .word 0x00000000 - thumb_func_end ov70_02265ED0 - - thumb_func_start ov70_02265F38 -ov70_02265F38: ; 0x02265F38 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - add r7, r0, #0 - add r5, r1, #0 - str r2, [sp, #0x10] - bl ov70_02262E38 - add r6, r0, #0 - add r0, r7, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r5, #0 - bl ov70_0225DEE8 - str r0, [sp, #0x34] - add r0, r7, #0 - bl ov70_02262E84 - cmp r0, #0x1b - bhi _02266050 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02265F6E: ; jump table - .short _02266050 - _02265F6E - 2 ; case 0 - .short _02266050 - _02265F6E - 2 ; case 1 - .short _02266050 - _02265F6E - 2 ; case 2 - .short _02266050 - _02265F6E - 2 ; case 3 - .short _02266050 - _02265F6E - 2 ; case 4 - .short _02266050 - _02265F6E - 2 ; case 5 - .short _02266050 - _02265F6E - 2 ; case 6 - .short _02266024 - _02265F6E - 2 ; case 7 - .short _02265FEE - _02265F6E - 2 ; case 8 - .short _02265FA6 - _02265F6E - 2 ; case 9 - .short _02265FA6 - _02265F6E - 2 ; case 10 - .short _02265FA6 - _02265F6E - 2 ; case 11 - .short _02265FA6 - _02265F6E - 2 ; case 12 - .short _02265FA6 - _02265F6E - 2 ; case 13 - .short _02265FA6 - _02265F6E - 2 ; case 14 - .short _02266050 - _02265F6E - 2 ; case 15 - .short _02266050 - _02265F6E - 2 ; case 16 - .short _02266024 - _02265F6E - 2 ; case 17 - .short _02266024 - _02265F6E - 2 ; case 18 - .short _02266024 - _02265F6E - 2 ; case 19 - .short _02266024 - _02265F6E - 2 ; case 20 - .short _02266024 - _02265F6E - 2 ; case 21 - .short _02266024 - _02265F6E - 2 ; case 22 - .short _02266050 - _02265F6E - 2 ; case 23 - .short _02266050 - _02265F6E - 2 ; case 24 - .short _02266050 - _02265F6E - 2 ; case 25 - .short _02265FA6 - _02265F6E - 2 ; case 26 - .short _02265FA6 - _02265F6E - 2 ; case 27 -_02265FA6: - ldrb r0, [r6, #1] - bl ov66_02233224 - ldrh r1, [r4, #8] - cmp r1, r0 - bls _02265FC0 - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02266050 -_02265FC0: - bl sub_02035E18 - ldrh r1, [r4, #8] - cmp r1, r0 - ble _02265FD8 - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02266050 -_02265FD8: - bl sub_020388AC - cmp r0, #0 - bne _02265FEE - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02266050 -_02265FEE: - bl ov66_02233374 - cmp r0, #1 - bne _0226600E - ldrb r0, [r6, #1] - bl ov66_02233224 - cmp r0, #1 - bhi _0226600E - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02266050 -_0226600E: - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - bpl _02266024 - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02266050 -_02266024: - bl sub_020380E4 - cmp r0, #5 - bhi _02266050 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02266038: ; jump table - .short _02266050 - _02266038 - 2 ; case 0 - .short _02266050 - _02266038 - 2 ; case 1 - .short _02266044 - _02266038 - 2 ; case 2 - .short _02266044 - _02266038 - 2 ; case 3 - .short _02266044 - _02266038 - 2 ; case 4 - .short _02266044 - _02266038 - 2 ; case 5 -_02266044: - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 -_02266050: - add r0, r7, #0 - bl ov70_02262E84 - cmp r0, #0x1c - bls _0226605E - bl _022669AC -_0226605E: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226606A: ; jump table - .short _022660A4 - _0226606A - 2 ; case 0 - .short _022660B6 - _0226606A - 2 ; case 1 - .short _022660FA - _0226606A - 2 ; case 2 - .short _02266118 - _0226606A - 2 ; case 3 - .short _0226613E - _0226606A - 2 ; case 4 - .short _022661AC - _0226606A - 2 ; case 5 - .short _022661CA - _0226606A - 2 ; case 6 - .short _022662B4 - _0226606A - 2 ; case 7 - .short _02266472 - _0226606A - 2 ; case 8 - .short _022664FA - _0226606A - 2 ; case 9 - .short _0226654E - _0226606A - 2 ; case 10 - .short _0226657A - _0226606A - 2 ; case 11 - .short _022665F2 - _0226606A - 2 ; case 12 - .short _02266620 - _0226606A - 2 ; case 13 - .short _0226665A - _0226606A - 2 ; case 14 - .short _02266700 - _0226606A - 2 ; case 15 - .short _02266750 - _0226606A - 2 ; case 16 - .short _02266776 - _0226606A - 2 ; case 17 - .short _0226679E - _0226606A - 2 ; case 18 - .short _022667AE - _0226606A - 2 ; case 19 - .short _02266806 - _0226606A - 2 ; case 20 - .short _02266866 - _0226606A - 2 ; case 21 - .short _022668B8 - _0226606A - 2 ; case 22 - .short _02266902 - _0226606A - 2 ; case 23 - .short _02266914 - _0226606A - 2 ; case 24 - .short _02266926 - _0226606A - 2 ; case 25 - .short _0226693A - _0226606A - 2 ; case 26 - .short _0226695E - _0226606A - 2 ; case 27 - .short _02266988 - _0226606A - 2 ; case 28 -_022660A4: - add r0, r7, #0 - mov r1, #0x44 - bl ov70_02262E3C - add r0, r7, #0 - bl ov70_02262E8C - bl _022669AC -_022660B6: - ldr r0, [sp, #0x34] - bl ov66_0222E210 - cmp r0, #0 - beq _022660D0 - mov r0, #7 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - bl _022669AC -_022660D0: - ldr r0, [sp, #0x34] - bl ov66_0222E190 - cmp r0, #0 - beq _022660EA - mov r0, #2 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - bl _022669AC -_022660EA: - ldr r0, _022663C4 ; =0x000005DD - bl sub_02005748 - add r0, r7, #0 - bl ov70_02262E8C - bl _022669AC -_022660FA: - ldrb r1, [r6, #2] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E27C - mov r0, #3 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #0 - bl ov70_02266AF0 - bl _022669AC -_02266118: - add r0, r4, #0 - add r1, r5, #0 - mov r2, #3 - mov r3, #1 - bl ov70_02266B30 - add r4, #0x18 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r7, #0 - mov r1, #4 - bl ov70_02262E88 - bl _022669AC -_0226613E: - mov r0, #0 - str r0, [sp, #0x30] - add r0, r5, #0 - bl ov70_0225E0D4 - cmp r0, #2 - bhi _0226615A - cmp r0, #0 - beq _02266182 - cmp r0, #1 - beq _02266174 - cmp r0, #2 - beq _02266162 - b _0226618E -_0226615A: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - bne _0226618E -_02266162: - mov r0, #5 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - mov r0, #1 - str r0, [sp, #0x30] - b _0226618E -_02266174: - add r0, r7, #0 - mov r1, #5 - bl ov70_02262E88 - mov r0, #1 - str r0, [sp, #0x30] - b _0226618E -_02266182: - add r0, r7, #0 - mov r1, #6 - bl ov70_02262E88 - mov r0, #1 - str r0, [sp, #0x30] -_0226618E: - ldr r0, [sp, #0x30] - cmp r0, #1 - beq _02266198 - bl _022669AC -_02266198: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02266BA0 - b _022669AC -_022661AC: - ldrb r1, [r6, #2] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E27C - mov r0, #2 - str r0, [sp] - ldrb r3, [r6, #2] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - add r3, #0x22 - bl ov70_02266AF0 - b _022669AC -_022661CA: - ldr r0, [sp, #0x34] - bl ov66_0222E190 - cmp r0, #0 - beq _022661E2 - mov r0, #2 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - b _022669AC -_022661E2: - ldrb r0, [r6, #1] - bl ov66_02233184 - cmp r0, #1 - bne _02266226 - ldrb r0, [r6, #1] - bl ov66_022331E4 - cmp r0, #0 - beq _02266200 - ldrb r0, [r6, #1] - bl ov66_022331A4 - cmp r0, #0 - bne _0226620E -_02266200: - mov r0, #1 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - b _022669AC -_0226620E: - ldrb r0, [r6, #1] - bl ov66_022332F8 - cmp r0, #0 - bne _02266226 - mov r0, #7 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - b _022669AC -_02266226: - ldrb r0, [r6, #1] - bl ov66_022332F8 - strh r0, [r4] - mov r0, #0xe1 - lsl r0, r0, #2 - str r0, [r4, #0x10] - mov r1, #0 - ldrsh r2, [r4, r1] - ldr r0, _022663C8 ; =0x0000014A - cmp r2, r0 - ble _02266248 - add r0, r5, #0 - mov r2, #0xa - bl ov70_0225E20C - b _02266254 -_02266248: - mov r0, #1 - str r0, [r4, #0x14] - add r0, r5, #0 - mov r2, #0xb - bl ov70_0225E20C -_02266254: - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - ldrb r0, [r6, #1] - bl sub_0203883C - bl ov66_02233374 - cmp r0, #1 - bne _0226628A - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldrb r1, [r6, #2] - ldr r0, [sp, #0x34] - ldr r3, [sp, #0x10] - mov r2, #1 - bl ov66_0222EA10 - mov r0, #1 - strb r0, [r4, #7] -_0226628A: - mov r0, #0 - ldrsh r0, [r4, r0] - add r1, r5, #0 - mov r3, #1 - str r0, [sp] - ldrb r2, [r6, #2] - add r0, r4, #0 - add r0, #0x3c - bl ov70_02266C68 - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov70_02266CFC - add r0, r7, #0 - mov r1, #7 - bl ov70_02262E88 - b _022669AC -_022662B4: - bl sub_020388AC - str r0, [sp, #0x2c] - ldrb r0, [r6, #1] - bl ov66_02233224 - str r0, [sp, #0x28] - ldrb r0, [r6, #1] - bl ov66_022332F8 - strh r0, [r4] - mov r1, #0 - add r0, r4, #0 - ldrsh r1, [r4, r1] - add r0, #0x3c - bl ov70_02266CCC - mov r0, #0 - ldrsh r1, [r4, r0] - ldr r0, _022663C8 ; =0x0000014A - cmp r1, r0 - bgt _02266308 - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _02266308 - add r0, r5, #0 - bl ov70_0225DFCC - mov r0, #1 - str r0, [r4, #0x14] - add r0, r5, #0 - mov r1, #0 - mov r2, #0xb - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC -_02266308: - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - ldr r0, [sp, #0x2c] - cmp r0, #0 - bne _02266328 - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_02266328: - cmp r0, #2 - bne _0226637E - mov r0, #8 - strb r0, [r6] - ldr r0, [sp, #0x28] - cmp r0, #4 - bne _0226633A - mov r6, #0x10 - b _0226633C -_0226633A: - mov r6, #0x12 -_0226633C: - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r5, #0 - mov r1, #0 - add r2, r6, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - add r0, r7, #0 - mov r1, #9 - bl ov70_02262E88 - ldr r0, [sp, #0x28] - mov r1, #0 - strh r0, [r4, #8] - add r0, r4, #0 - add r0, #0x3c - bl ov70_02266CCC - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - b _022669AC -_0226637E: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _022663D4 - ldr r0, _022663CC ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _022663D4 - ldr r0, _022663D0 ; =0x000005DC - bl sub_02005748 - bl ov66_02233374 - cmp r0, #0 - bne _022663B0 - mov r0, #6 - strb r0, [r6] - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_022663B0: - mov r0, #6 - strb r0, [r6] - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r7, #0 - mov r1, #0x10 - bl ov70_02262E88 - b _022669AC - ; .align 2, 0 -_022663C4: .word 0x000005DD -_022663C8: .word 0x0000014A -_022663CC: .word 0x021BF67C -_022663D0: .word 0x000005DC -_022663D4: - bl ov66_02233374 - cmp r0, #1 - bne _02266420 - ldrb r1, [r4, #7] - ldr r0, [sp, #0x28] - cmp r1, r0 - beq _02266400 - strb r0, [r4, #7] - cmp r0, #4 - beq _02266400 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldrb r1, [r6, #2] - ldr r0, [sp, #0x34] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x10] - bl ov66_0222EA10 -_02266400: - mov r0, #0 - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _02266420 - ldrb r0, [r6, #1] - bl ov66_02233224 - cmp r0, #1 - bhi _02266420 - mov r0, #3 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_02266420: - ldrb r0, [r6, #1] - bl ov66_02233184 - cmp r0, #1 - bne _02266442 - ldrb r0, [r6, #1] - bl ov66_022331A4 - cmp r0, #0 - bne _02266442 - mov r0, #0 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_02266442: - mov r0, #0 - ldrsh r0, [r4, r0] - cmp r0, #0 - bne _022664EA - add r0, r7, #0 - mov r1, #8 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r5, #0 - mov r1, #0 - mov r2, #0x12 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - b _022669AC -_02266472: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - bl sub_020388AC - add r5, r0, #0 - ldrb r0, [r6, #1] - bl ov66_02233224 - str r0, [sp, #0x24] - bl sub_020380E4 - cmp r0, #3 - beq _022664A2 - cmp r0, #4 - bne _022664AE -_022664A2: - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 -_022664AE: - cmp r5, #0 - bne _022664C0 - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_022664C0: - cmp r5, #2 - bne _022664D6 - mov r0, #8 - strb r0, [r6] - add r0, r7, #0 - mov r1, #9 - bl ov70_02262E88 - ldr r0, [sp, #0x24] - strh r0, [r4, #8] - b _022669AC -_022664D6: - ldrb r0, [r6, #1] - bl ov66_02233184 - cmp r0, #1 - bne _022664EA - ldrb r0, [r6, #1] - bl ov66_022331A4 - cmp r0, #0 - beq _022664EC -_022664EA: - b _022669AC -_022664EC: - mov r0, #0 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_022664FA: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - add r0, r5, #0 - bl ov70_0225DEE8 - ldrb r1, [r6, #3] - bl ov66_0222E3E4 - bl sub_02038B40 - add r0, r5, #0 - bl ov70_0225DEE8 - bl ov66_0222E0C4 - mov r1, #0 - bl sub_020329E0 - ldr r0, [sp, #0x34] - bl ov66_0222E918 - bl sub_020331F4 - mov r0, #0 - bl sub_0203632C - add r0, r4, #0 - add r1, r7, #0 - mov r2, #0xa - mov r3, #0x11 - bl ov70_02266B18 - b _022669AC -_0226654E: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - bl sub_02032AC0 - bl sub_0203608C - bl sub_02032E1C - add r0, r7, #0 - mov r1, #0xb - bl ov70_02262E88 - b _022669AC -_0226657A: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - bl sub_02032E44 - cmp r0, #0xff - beq _022665A4 -_02266598: - bl sub_02032E1C - bl sub_02032E44 - cmp r0, #0xff - bne _02266598 -_022665A4: - bl sub_02032E64 - add r5, r0, #0 - ldrb r0, [r6, #1] - bl ov66_02233224 - cmp r5, r0 - blo _022665DC - bl ov66_02233374 - cmp r0, #1 - bne _022665CA - ldrh r0, [r4, #2] - cmp r0, #0 - bne _022665CA - bl ov66_022330CC - mov r0, #1 - strh r0, [r4, #2] -_022665CA: - bl ov66_02233128 - cmp r0, #1 - bne _0226664E - add r0, r7, #0 - mov r1, #0xc - bl ov70_02262E88 - b _022669AC -_022665DC: - bl ov66_02233128 - cmp r0, #1 - bne _0226664E - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_022665F2: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - bl sub_020365F4 - ldr r0, [sp, #0x34] - bl ov66_0222E238 - add r0, r4, #0 - add r1, r7, #0 - mov r2, #0xd - mov r3, #0xe - bl ov70_02266B18 - b _022669AC -_02266620: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - ldr r0, [sp, #0x34] - bl ov66_0222E344 - str r0, [r4, #0xc] - bl sub_0203608C - add r4, #0xc - add r1, r4, #0 - bl sub_02036614 - cmp r0, #1 - beq _02266650 -_0226664E: - b _022669AC -_02266650: - add r0, r7, #0 - mov r1, #0xe - bl ov70_02262E88 - b _022669AC -_0226665A: - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CF0 - bl sub_02032E64 - str r0, [sp, #0x20] - bl sub_0203608C - mov r5, #0 - str r0, [sp, #0x1c] - str r5, [sp, #0x18] - bl ov66_02233340 - str r0, [sp, #0x14] - ldr r0, [sp, #0x20] - add r4, r5, #0 - cmp r0, #0 - ble _022666DC -_0226668E: - ldr r0, [sp, #0x1c] - cmp r0, r4 - beq _022666BE - add r0, r4, #0 - bl sub_0203664C - str r0, [sp, #0x38] - cmp r0, #0 - beq _022666D4 - ldr r1, [sp, #0x38] - ldr r0, [sp, #0x34] - ldr r1, [r1, #0] - add r2, r4, #0 - bl ov66_0222E24C - ldr r0, [sp, #0x38] - ldr r1, [r0, #0] - ldr r0, [sp, #0x14] - cmp r1, r0 - bne _022666BA - mov r0, #1 - str r0, [sp, #0x18] -_022666BA: - add r5, r5, #1 - b _022666D4 -_022666BE: - ldr r0, [sp, #0x34] - add r1, r4, #0 - bl ov66_0222E27C - bl ov66_02233374 - cmp r0, #1 - bne _022666D2 - mov r0, #1 - str r0, [sp, #0x18] -_022666D2: - add r5, r5, #1 -_022666D4: - ldr r0, [sp, #0x20] - add r4, r4, #1 - cmp r4, r0 - blt _0226668E -_022666DC: - ldr r0, [sp, #0x20] - cmp r5, r0 - bne _022667C0 - ldr r0, [sp, #0x18] - cmp r0, #1 - bne _022666F2 - add r0, r7, #0 - mov r1, #0xf - bl ov70_02262E88 - b _022669AC -_022666F2: - mov r0, #4 - strb r0, [r6] - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _022669AC -_02266700: - mov r0, #0 - mov r1, #1 - bl sub_020388F4 - bl ov66_02233374 - cmp r0, #1 - bne _0226673C - ldr r0, [sp, #0x34] - add r1, sp, #0x3c - bl ov66_0222E294 - ldrb r0, [r6, #1] - bl ov66_02233224 - add r3, sp, #0x3c - add r2, r0, #0 - ldrb r0, [r3, #1] - str r0, [sp] - ldrb r0, [r3, #2] - str r0, [sp, #4] - ldrb r0, [r3, #3] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - ldrb r1, [r6, #2] - ldrb r3, [r3] - ldr r0, [sp, #0x34] - bl ov66_0222EA10 -_0226673C: - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r4, #0 - add r1, r7, #0 - mov r2, #0x1c - mov r3, #0x12 - bl ov70_02266B18 - b _022669AC -_02266750: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x1a - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - add r0, r7, #0 - mov r1, #0x11 - bl ov70_02262E88 - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02266CB0 - b _022669AC -_02266776: - ldr r0, [sp, #0x10] - add r1, r5, #0 - str r0, [sp] - add r0, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov70_02266BAC - cmp r0, #0 - bne _022667C0 - add r0, r5, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _022667C0 - add r0, r7, #0 - mov r1, #0x12 - bl ov70_02262E88 - b _022669AC -_0226679E: - add r0, r5, #0 - bl ov70_0225E194 - add r0, r7, #0 - mov r1, #0x13 - bl ov70_02262E88 - b _022669AC -_022667AE: - add r0, r5, #0 - bl ov70_0225E1C4 - cmp r0, #0 - beq _022667C2 - cmp r0, #1 - beq _022667D8 - cmp r0, #2 - beq _022667E8 -_022667C0: - b _022669AC -_022667C2: - add r0, r5, #0 - bl ov70_0225E1F8 - add r0, r7, #0 - mov r1, #0x17 - bl ov70_02262E88 - ldr r0, [sp, #0x34] - bl ov66_0222E200 - b _022669AC -_022667D8: - add r0, r5, #0 - bl ov70_0225E1F8 - add r0, r7, #0 - mov r1, #0x14 - bl ov70_02262E88 - b _022669AC -_022667E8: - ldr r0, [sp, #0x10] - add r1, r5, #0 - str r0, [sp] - add r0, r4, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov70_02266BAC - cmp r0, #1 - beq _022667FE - b _022669AC -_022667FE: - add r0, r5, #0 - bl ov70_0225E1F8 - b _022669AC -_02266806: - ldrb r0, [r6, #1] - bl ov66_022332F8 - strh r0, [r4] - mov r0, #0 - ldrsh r0, [r4, r0] - add r1, r5, #0 - mov r3, #1 - str r0, [sp] - add r0, r4, #0 - ldrb r2, [r6, #2] - add r0, #0x3c - bl ov70_02266C68 - add r0, r4, #0 - add r0, #0x3c - add r1, r5, #0 - mov r2, #1 - bl ov70_02266CFC - mov r1, #0 - ldrsh r2, [r4, r1] - ldr r0, _022669B4 ; =0x0000014A - cmp r2, r0 - ble _02266842 - add r0, r5, #0 - mov r2, #0xa - bl ov70_0225E20C - b _0226684E -_02266842: - mov r0, #1 - str r0, [r4, #0x14] - add r0, r5, #0 - mov r2, #0xb - bl ov70_0225E20C -_0226684E: - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - add r0, r7, #0 - mov r1, #7 - bl ov70_02262E88 - b _022669AC -_02266866: - ldrb r0, [r6, #1] - bl ov66_02233224 - mov r1, #8 - strb r1, [r6] - cmp r0, #4 - bne _02266878 - mov r2, #0x10 - b _0226687A -_02266878: - mov r2, #0x12 -_0226687A: - add r0, r5, #0 - mov r1, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - add r0, r7, #0 - mov r1, #9 - bl ov70_02262E88 - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - ldrb r2, [r6, #2] - add r0, #0x3c - add r1, r5, #0 - mov r3, #1 - bl ov70_02266C68 - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov70_02266CFC - b _022669AC -_022668B8: - add r0, r5, #0 - mov r1, #0 - mov r2, #0x12 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF9C - add r0, r5, #0 - bl ov70_0225DFBC - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - ldrb r2, [r6, #2] - add r0, #0x3c - add r1, r5, #0 - mov r3, #1 - bl ov70_02266C68 - add r0, r4, #0 - add r0, #0x3c - mov r1, #0 - bl ov70_02266CCC - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov70_02266CF0 - add r0, r7, #0 - mov r1, #8 - bl ov70_02262E88 - b _022669AC -_02266902: - bl sub_02032A70 - bl sub_0203888C - add r0, r7, #0 - mov r1, #0x18 - bl ov70_02262E88 - b _022669AC -_02266914: - bl sub_020388AC - cmp r0, #0 - bne _022669AC - add r0, r7, #0 - mov r1, #0x1c - bl ov70_02262E88 - b _022669AC -_02266926: - add r0, r5, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _022669AC - ldrb r1, [r4, #4] - add r0, r7, #0 - bl ov70_02262E88 - b _022669AC -_0226693A: - mov r0, #5 - ldrsb r0, [r4, r0] - cmp r0, #0 - ble _02266946 - sub r0, r0, #1 - strb r0, [r4, #5] -_02266946: - mov r0, #5 - ldrsb r0, [r4, r0] - cmp r0, #0 - bne _022669AC - ldrb r0, [r4, #6] - bl sub_020364F0 - add r0, r7, #0 - mov r1, #0x1b - bl ov70_02262E88 - b _022669AC -_0226695E: - ldrh r0, [r4, #0xa] - add r0, r0, #1 - strh r0, [r4, #0xa] - ldrh r0, [r4, #0xa] - cmp r0, #0x96 - blo _02266974 - ldrb r0, [r4, #6] - bl sub_020364F0 - mov r0, #0 - strh r0, [r4, #0xa] -_02266974: - ldrb r0, [r4, #6] - bl sub_02036540 - cmp r0, #0 - beq _022669AC - ldrb r1, [r4, #4] - add r0, r7, #0 - bl ov70_02262E88 - b _022669AC -_02266988: - add r0, r5, #0 - bl ov70_0225DFEC - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02266BA0 - add r4, #0x3c - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02266CB0 - add r0, r7, #0 - bl ov70_02262E64 - add sp, #0x40 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022669AC: - mov r0, #0 - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_022669B4: .word 0x0000014A - thumb_func_end ov70_02265F38 - - thumb_func_start ov70_022669B8 -ov70_022669B8: ; 0x022669B8 - push {r4, lr} - add r4, r0, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _022669CA - cmp r0, #1 - beq _022669EC - b _022669F8 -_022669CA: - mov r0, #0 - add r1, r0, #0 - bl sub_020388F4 - bl sub_020382C0 - cmp r0, #0 - bne _022669E2 - bl sub_02032A70 - bl sub_0203888C -_022669E2: - add r0, r4, #0 - mov r1, #1 - bl ov70_02262E88 - b _022669F8 -_022669EC: - bl sub_020382C0 - cmp r0, #1 - bne _022669F8 - mov r0, #1 - pop {r4, pc} -_022669F8: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov70_022669B8 - - thumb_func_start ov70_022669FC -ov70_022669FC: ; 0x022669FC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r5, r1, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _02266A1A - cmp r0, #1 - beq _02266A90 - b _02266AE6 -_02266A1A: - add r0, r6, #0 - mov r1, #8 - bl ov70_02262E3C - str r0, [sp, #4] - add r0, r5, #0 - bl ov70_0225DF40 - cmp r0, #0x27 - beq _02266A38 - cmp r0, #0x28 - beq _02266A3E - cmp r0, #0x29 - beq _02266A44 - b _02266A4A -_02266A38: - mov r7, #0x2a - mov r4, #0 - b _02266A54 -_02266A3E: - mov r7, #0x29 - mov r4, #1 - b _02266A54 -_02266A44: - mov r7, #0x2b - mov r4, #2 - b _02266A54 -_02266A4A: - bl sub_02022974 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02266A54: - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_0225E27C - add r0, r5, #0 - mov r1, #1 - add r2, r7, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DFFC - mov r3, #0 - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r4, #0 - str r3, [sp] - bl ov70_02266C68 - ldr r0, [sp, #4] - add r1, r5, #0 - mov r2, #1 - bl ov70_02266CFC - add r0, r6, #0 - bl ov70_02262E8C - b _02266AE6 -_02266A90: - ldr r0, _02266AEC ; =0x021BF67C - mov r1, #1 - ldr r0, [r0, #0x48] - tst r1, r0 - bne _02266AAC - mov r1, #0x10 - tst r1, r0 - bne _02266AAC - mov r1, #0x20 - tst r1, r0 - bne _02266AAC - mov r1, #0x80 - tst r0, r1 - beq _02266ADC -_02266AAC: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02266CB0 - add r0, r5, #0 - bl ov70_0225DFEC - add r0, r5, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r6, #0 - bl ov70_02262E64 - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02266ADC: - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - bl ov70_02266CFC -_02266AE6: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02266AEC: .word 0x021BF67C - thumb_func_end ov70_022669FC - - thumb_func_start ov70_02266AF0 -ov70_02266AF0: ; 0x02266AF0 - push {r4, r5, r6, lr} - add r6, r2, #0 - add r5, r0, #0 - add r4, r1, #0 - add r0, r6, #0 - mov r1, #0 - add r2, r3, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r6, #0 - bl ov70_0225DF8C - ldr r0, [sp, #0x10] - mov r1, #0x19 - strb r0, [r5, #4] - add r0, r4, #0 - bl ov70_02262E88 - pop {r4, r5, r6, pc} - thumb_func_end ov70_02266AF0 - - thumb_func_start ov70_02266B18 -ov70_02266B18: ; 0x02266B18 - strb r2, [r0, #4] - strb r3, [r0, #6] - mov r2, #0 - strb r2, [r0, #5] - strh r2, [r0, #0xa] - add r0, r1, #0 - ldr r3, _02266B2C ; =ov70_02262E88 - mov r1, #0x1a - bx r3 - nop -_02266B2C: .word ov70_02262E88 - thumb_func_end ov70_02266B18 - - thumb_func_start ov70_02266B30 -ov70_02266B30: ; 0x02266B30 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r2, #0 - str r0, [sp] - add r0, r5, #0 - add r1, r6, #0 - add r7, r3, #0 - bl ov70_0225E00C - ldr r0, [sp] - mov r4, #0 - str r6, [r0, #0x38] - cmp r6, #0 - bls _02266B66 -_02266B4C: - add r0, r5, #0 - mov r1, #0 - add r2, r7, r4 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov70_0225E044 - add r4, r4, #1 - cmp r4, r6 - blo _02266B4C -_02266B66: - ldr r2, [sp] - ldr r3, _02266B9C ; =0x0226DC94 - add r2, #0x18 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp] - ldr r1, [r0, #0x38] - strh r1, [r0, #0x28] - ldr r1, [r0, #0x38] - ldrh r0, [r0, #0x2a] - cmp r0, r1 - bls _02266B8E - ldr r0, [sp] - strh r1, [r0, #0x2a] -_02266B8E: - add r0, r5, #0 - bl ov70_0225E054 - ldr r1, [sp] - str r0, [r1, #0x18] - pop {r3, r4, r5, r6, r7, pc} - nop -_02266B9C: .word 0x0226DC94 - thumb_func_end ov70_02266B30 - - thumb_func_start ov70_02266BA0 -ov70_02266BA0: ; 0x02266BA0 - ldr r3, _02266BA8 ; =ov70_0225E034 - add r0, r1, #0 - bx r3 - nop -_02266BA8: .word ov70_0225E034 - thumb_func_end ov70_02266BA0 - - thumb_func_start ov70_02266BAC -ov70_02266BAC: ; 0x02266BAC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - add r4, r2, #0 - add r0, r1, #0 - add r6, r3, #0 - bl ov70_0225DEE8 - str r0, [sp, #0x10] - bl sub_020388AC - add r7, r0, #0 - ldrb r0, [r4, #1] - bl ov66_02233224 - add r2, r0, #0 - cmp r7, #0 - bne _02266BE2 - mov r0, #4 - strb r0, [r4] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02266BE2: - cmp r7, #2 - bne _02266BF6 - add r0, r6, #0 - mov r1, #0x15 - strh r2, [r5, #8] - bl ov70_02262E88 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02266BF6: - ldrb r0, [r5, #7] - cmp r0, r2 - beq _02266C16 - strb r2, [r5, #7] - cmp r2, #4 - beq _02266C16 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldrb r1, [r4, #2] - ldr r0, [sp, #0x10] - ldr r3, [sp, #0x28] - bl ov66_0222EA10 -_02266C16: - ldrb r0, [r4, #1] - bl ov66_022332F8 - strh r0, [r5] - mov r0, #0 - ldrsh r2, [r5, r0] - cmp r2, #0 - bne _02266C50 - ldrb r0, [r4, #1] - bl ov66_02233224 - cmp r0, #1 - bhi _02266C42 - mov r0, #3 - strb r0, [r4] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02266C42: - add r0, r6, #0 - mov r1, #0x16 - bl ov70_02262E88 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02266C50: - ldr r1, _02266C64 ; =0x0000014A - cmp r2, r1 - bgt _02266C60 - add r0, r6, #0 - mov r1, #0x14 - bl ov70_02262E88 - mov r0, #1 -_02266C60: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02266C64: .word 0x0000014A - thumb_func_end ov70_02266BAC - - thumb_func_start ov70_02266C68 -ov70_02266C68: ; 0x02266C68 - push {r3, r4, r5, r6, r7, lr} - add r4, r3, #0 - add r5, r0, #0 - add r7, r1, #0 - add r6, r2, #0 - cmp r4, #2 - blo _02266C7A - bl sub_02022974 -_02266C7A: - mov r0, #0 - strb r0, [r5] - strb r0, [r5, #1] - strb r0, [r5, #2] - strb r0, [r5, #3] - strb r0, [r5, #4] - strb r0, [r5, #5] - strb r0, [r5, #6] - strb r0, [r5, #7] - strb r4, [r5, #6] - ldr r1, [sp, #0x18] - add r0, r5, #0 - strb r6, [r5, #3] - bl ov70_02266CCC - ldr r0, _02266CAC ; =0x0226DC90 - mov r1, #0x12 - ldrb r0, [r0, r4] - mov r2, #3 - mov r3, #0xd - str r0, [sp] - add r0, r7, #0 - bl ov70_0225E104 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02266CAC: .word 0x0226DC90 - thumb_func_end ov70_02266C68 - - thumb_func_start ov70_02266CB0 -ov70_02266CB0: ; 0x02266CB0 - mov r2, #0 - strb r2, [r0] - strb r2, [r0, #1] - strb r2, [r0, #2] - strb r2, [r0, #3] - strb r2, [r0, #4] - strb r2, [r0, #5] - strb r2, [r0, #6] - strb r2, [r0, #7] - ldr r3, _02266CC8 ; =ov70_0225E12C - add r0, r1, #0 - bx r3 - ; .align 2, 0 -_02266CC8: .word ov70_0225E12C - thumb_func_end ov70_02266CB0 - - thumb_func_start ov70_02266CCC -ov70_02266CCC: ; 0x02266CCC - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - mov r1, #0x1e - bl sub_020E1F6C - lsl r0, r0, #0x10 - asr r1, r0, #0x10 - mov r0, #4 - ldrsh r0, [r4, r0] - cmp r1, r0 - beq _02266CEE - strh r1, [r4, #4] - ldrb r1, [r4, #7] - mov r0, #8 - orr r0, r1 - strb r0, [r4, #7] -_02266CEE: - pop {r4, pc} - thumb_func_end ov70_02266CCC - - thumb_func_start ov70_02266CF0 -ov70_02266CF0: ; 0x02266CF0 - push {r3, lr} - mov r3, #0 - bl ov70_02266D08 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02266CF0 - - thumb_func_start ov70_02266CFC -ov70_02266CFC: ; 0x02266CFC - push {r3, lr} - mov r3, #1 - bl ov70_02266D08 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02266CFC - - thumb_func_start ov70_02266D08 -ov70_02266D08: ; 0x02266D08 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - str r3, [sp, #4] - cmp r2, #0 - beq _02266D1A - mov r0, #0xff - strb r0, [r5, #7] -_02266D1A: - ldrb r0, [r5, #3] - cmp r0, #0 - beq _02266D2A - cmp r0, #1 - beq _02266D2E - cmp r0, #2 - beq _02266D32 - b _02266D36 -_02266D2A: - mov r6, #0 - b _02266D3C -_02266D2E: - mov r6, #1 - b _02266D3C -_02266D32: - mov r6, #2 - b _02266D3C -_02266D36: - bl sub_02022974 - mov r6, #2 -_02266D3C: - add r0, r6, #0 - bl ov66_02233184 - add r7, r0, #0 - ldrb r0, [r5] - cmp r0, r7 - beq _02266D52 - ldrb r1, [r5, #7] - mov r0, #4 - orr r0, r1 - strb r0, [r5, #7] -_02266D52: - strb r7, [r5] - add r0, r6, #0 - bl ov66_022331A4 - ldrb r1, [r5, #2] - cmp r1, r0 - beq _02266D68 - ldrb r2, [r5, #7] - mov r1, #4 - orr r1, r2 - strb r1, [r5, #7] -_02266D68: - strb r0, [r5, #2] - cmp r7, #1 - bne _02266D76 - add r0, r6, #0 - bl ov66_022331E4 - b _02266D78 -_02266D76: - mov r0, #4 -_02266D78: - ldrb r1, [r5, #1] - cmp r1, r0 - beq _02266D86 - ldrb r2, [r5, #7] - mov r1, #2 - orr r1, r2 - strb r1, [r5, #7] -_02266D86: - strb r0, [r5, #1] - ldrb r1, [r5, #7] - mov r0, #1 - tst r0, r1 - beq _02266DC0 - mov r0, #0x10 - mov r1, #0 - str r0, [sp] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0x68 - bl ov70_0225E14C - ldrb r1, [r5, #3] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x36 - bl ov70_0225E20C - mov r2, #0 - add r1, r0, #0 - add r0, r4, #0 - add r3, r2, #0 - bl ov70_0225E13C -_02266DC0: - ldrb r1, [r5, #7] - mov r0, #4 - tst r0, r1 - beq _02266DFE - mov r2, #0x10 - add r0, r4, #0 - mov r1, #0x24 - mov r3, #0x68 - str r2, [sp] - bl ov70_0225E14C - ldr r0, [sp, #4] - cmp r0, #1 - bne _02266DFE - ldrb r0, [r5, #2] - cmp r0, #0 - bne _02266DFE - ldrb r0, [r5] - cmp r0, #1 - bne _02266DFE - add r0, r4, #0 - mov r1, #1 - mov r2, #0x45 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0x24 - mov r3, #0x10 - bl ov70_0225E13C -_02266DFE: - ldrb r1, [r5, #7] - mov r0, #2 - tst r0, r1 - beq _02266E4E - mov r2, #0x20 - add r0, r4, #0 - mov r1, #0 - mov r3, #0x68 - str r2, [sp] - bl ov70_0225E14C - mov r0, #2 - str r0, [sp] - mov r2, #1 - ldrb r1, [r5, #1] - add r0, r4, #0 - add r3, r2, #0 - bl ov70_0225E21C - mov r0, #2 - str r0, [sp] - ldrb r2, [r5, #1] - mov r1, #4 - add r0, r4, #0 - sub r1, r1, r2 - mov r2, #1 - mov r3, #0 - bl ov70_0225E21C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x44 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x20 - bl ov70_0225E13C -_02266E4E: - ldrb r0, [r5, #6] - cmp r0, #1 - bne _02266E92 - ldrb r1, [r5, #7] - mov r0, #8 - tst r0, r1 - beq _02266E92 - mov r0, #0x10 - str r0, [sp] - add r0, r4, #0 - mov r1, #0 - mov r2, #0x40 - mov r3, #0x68 - bl ov70_0225E14C - mov r2, #2 - str r2, [sp] - mov r1, #4 - ldrsh r1, [r5, r1] - add r0, r4, #0 - mov r3, #0 - bl ov70_0225E21C - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0 - mov r3, #0x40 - bl ov70_0225E13C -_02266E92: - mov r0, #0 - strb r0, [r5, #7] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02266D08 - - thumb_func_start ov70_02266E9C -ov70_02266E9C: ; 0x02266E9C - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - str r2, [sp, #0xc] - bl ov70_0225DEE8 - add r7, r0, #0 - add r0, r5, #0 - bl ov70_0225DF10 - str r0, [sp, #0x24] - add r0, r6, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r7, #0 - bl ov66_0222EE30 - str r0, [sp, #0x20] - add r0, r7, #0 - bl ov66_0222EE3C - str r0, [sp, #0x1c] - add r0, r7, #0 - bl ov66_0222EE68 - cmp r0, #0 - beq _02266EF4 - cmp r4, #0 - beq _02266EF4 - ldrh r0, [r4, #0xa] - cmp r0, #0 - beq _02266EF4 - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - mov r0, #0 - strh r0, [r4, #0xa] -_02266EF4: - cmp r4, #0 - beq _02266F16 - add r0, r7, #0 - bl ov66_0222E3BC - str r0, [sp, #0x18] - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02266F12 - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222E374 - str r0, [sp, #0x14] - b _02266F16 -_02266F12: - mov r0, #0 - str r0, [sp, #0x14] -_02266F16: - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _02266F3E - ldrh r0, [r4, #0xa] - cmp r0, #0 - beq _02266F3E - ldr r0, [sp, #0x14] - cmp r0, #0 - bne _02266F3E - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - mov r0, #0 - strh r0, [r4, #0xa] -_02266F3E: - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0x26 - bls _02266F4C - bl _02267A2E -_02266F4C: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02266F58: ; jump table - .short _02266FA6 - _02266F58 - 2 ; case 0 - .short _0226706C - _02266F58 - 2 ; case 1 - .short _02267090 - _02266F58 - 2 ; case 2 - .short _022670D8 - _02266F58 - 2 ; case 3 - .short _02267116 - _02266F58 - 2 ; case 4 - .short _02267146 - _02266F58 - 2 ; case 5 - .short _022671B8 - _02266F58 - 2 ; case 6 - .short _022671E6 - _02266F58 - 2 ; case 7 - .short _02267216 - _02266F58 - 2 ; case 8 - .short _0226724E - _02266F58 - 2 ; case 9 - .short _0226727C - _02266F58 - 2 ; case 10 - .short _022672AA - _02266F58 - 2 ; case 11 - .short _022672DA - _02266F58 - 2 ; case 12 - .short _02267356 - _02266F58 - 2 ; case 13 - .short _02267414 - _02266F58 - 2 ; case 14 - .short _02267444 - _02266F58 - 2 ; case 15 - .short _022674C4 - _02266F58 - 2 ; case 16 - .short _02267510 - _02266F58 - 2 ; case 17 - .short _02267520 - _02266F58 - 2 ; case 18 - .short _0226758E - _02266F58 - 2 ; case 19 - .short _022675A0 - _02266F58 - 2 ; case 20 - .short _022675E0 - _02266F58 - 2 ; case 21 - .short _02267622 - _02266F58 - 2 ; case 22 - .short _02267654 - _02266F58 - 2 ; case 23 - .short _02267682 - _02266F58 - 2 ; case 24 - .short _022676DA - _02266F58 - 2 ; case 25 - .short _02267720 - _02266F58 - 2 ; case 26 - .short _02267768 - _02266F58 - 2 ; case 27 - .short _022677AE - _02266F58 - 2 ; case 28 - .short _0226780C - _02266F58 - 2 ; case 29 - .short _02267874 - _02266F58 - 2 ; case 30 - .short _022678A2 - _02266F58 - 2 ; case 31 - .short _022678D0 - _02266F58 - 2 ; case 32 - .short _02267912 - _02266F58 - 2 ; case 33 - .short _02267944 - _02266F58 - 2 ; case 34 - .short _0226796C - _02266F58 - 2 ; case 35 - .short _022679A0 - _02266F58 - 2 ; case 36 - .short _022679AA - _02266F58 - 2 ; case 37 - .short _022679B6 - _02266F58 - 2 ; case 38 -_02266FA6: - add r0, r6, #0 - mov r1, #0x50 - bl ov70_02262E3C - add r4, r0, #0 - mov r1, #0 - add r0, #0x44 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x46 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x38 - str r1, [r4, #0x48] - bl ov70_02269114 - add r0, r5, #0 - bl ov70_0225DEF0 - str r0, [sp, #0x28] - bl ov70_0225CCAC - str r0, [sp, #0x2c] - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x2c] - bl ov70_0225CE40 - str r0, [sp, #0x30] - cmp r0, #0 - bne _02266FF2 - mov r0, #0 - strh r0, [r4, #0xa] - add r0, r6, #0 - mov r1, #0x26 - bl ov70_02262E88 - bl _02267A2E -_02266FF2: - mov r1, #4 - bl ov70_0225CD60 - str r0, [sp, #0x34] - ldr r0, [sp, #0x2c] - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - str r0, [sp, #0x38] - add r0, r7, #0 - bl ov66_0222EC60 - ldr r2, [sp, #0x34] - add r0, r4, #0 - add r1, r7, #0 - bl ov70_02268B50 - str r0, [sp, #0x3c] - ldr r0, [sp, #0x30] - mov r1, #0 - str r0, [r4, #0x10] - bl ov70_0225D030 - ldr r0, [sp, #0x30] - ldr r1, [sp, #0x38] - bl ov70_0225D060 - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x34] - mov r2, #0 - bl ov70_02262EEC - ldr r0, _02267390 ; =0x000005E4 - bl sub_02005748 - add r0, r7, #0 - mov r1, #9 - bl ov66_0222E3E4 - ldr r0, [sp, #0x3c] - cmp r0, #1 - bne _02267060 - ldr r1, [sp, #0x34] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E328 - add r0, r6, #0 - mov r1, #1 - bl ov70_02262E88 - bl _02267A2E -_02267060: - add r0, r6, #0 - mov r1, #0x22 - bl ov70_02262E88 - bl _02267A2E -_0226706C: - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222EC70 - cmp r0, #1 - bne _02267084 - add r0, r6, #0 - mov r1, #2 - bl ov70_02262E88 - bl _02267A2E -_02267084: - add r0, r6, #0 - mov r1, #0x22 - bl ov70_02262E88 - bl _02267A2E -_02267090: - ldr r0, [sp, #0x20] - cmp r0, #4 - bhi _022670CC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022670A2: ; jump table - .short _022670C0 - _022670A2 - 2 ; case 0 - .short _02267A2E - _022670A2 - 2 ; case 1 - .short _022670AC - _022670A2 - 2 ; case 2 - .short _022670CC - _022670A2 - 2 ; case 3 - .short _022670CC - _022670A2 - 2 ; case 4 -_022670AC: - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222EEE4 - add r0, r6, #0 - mov r1, #3 - bl ov70_02262E88 - bl _02267A2E -_022670C0: - add r0, r6, #0 - mov r1, #0x22 - bl ov70_02262E88 - bl _02267A2E -_022670CC: - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - bl _02267A2E -_022670D8: - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222EEF4 - add r0, r7, #0 - bl ov66_0222F020 - add r0, r7, #0 - mov r1, #7 - bl ov66_0222F040 - ldr r0, [sp, #0x18] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #0x14] - add r2, r5, #0 - str r0, [sp, #4] - ldrb r3, [r4, #4] - add r0, r4, #0 - bl ov70_02268BF4 - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #4 - add r3, r6, #0 - bl ov70_02268BA4 - bl _02267A2E -_02267116: - ldr r0, [sp, #0x14] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #0x18] - add r2, r5, #0 - str r0, [sp, #4] - ldrb r3, [r4, #5] - add r0, r4, #0 - bl ov70_02268BF4 - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #5 - add r3, r6, #0 - bl ov70_02268BA4 - add r0, r7, #0 - mov r1, #0 - bl ov66_0222ECD4 - bl _02267A2E -_02267146: - ldr r0, [sp, #0x20] - cmp r0, #4 - bhi _022671A6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267158: ; jump table - .short _022671A6 - _02267158 - 2 ; case 0 - .short _022671A6 - _02267158 - 2 ; case 1 - .short _02267162 - _02267158 - 2 ; case 2 - .short _0226718A - _02267158 - 2 ; case 3 - .short _022671A6 - _02267158 - 2 ; case 4 -_02267162: - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r7, #0 - bl ov66_0222EE24 - cmp r0, #0 - beq _0226717E - add r0, r6, #0 - mov r1, #6 - bl ov70_02262E88 - bl _02267A2E -_0226717E: - add r0, r6, #0 - mov r1, #8 - bl ov70_02262E88 - bl _02267A2E -_0226718A: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - bne _0226719A - add r0, r5, #0 - bl ov70_0225DFBC -_0226719A: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268D70 - bl _02267A2E -_022671A6: - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - bl _02267A2E -_022671B8: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02268CC8 - cmp r0, #1 - bne _022671DA - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #7 - add r3, r6, #0 - bl ov70_02268BA4 - bl _02267A2E -_022671DA: - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - bl _02267A2E -_022671E6: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x28 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #9 - add r3, r6, #0 - bl ov70_02268BA4 - bl _02267A2E -_02267216: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrh r1, [r4, #8] - add r0, r5, #0 - mov r2, #1 - bl ov70_0225E234 - ldrb r1, [r4, #3] - ldrh r2, [r4, #8] - add r0, r5, #0 - bl ov70_02268AF8 - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #9 - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_0226724E: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2e - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xb - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_0226727C: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x36 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xb - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_022672AA: - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - ldr r3, _02267394 ; =0x00000203 - add r0, #0x14 - add r1, r5, #0 - mov r2, #3 - bl ov70_02268E44 - add r1, r4, #0 - mov r2, #0 - add r0, r5, #0 - add r1, #0x14 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r4, #0 - bl ov70_02268DB8 - add r0, r6, #0 - mov r1, #0xc - bl ov70_02262E88 - b _02267A2E -_022672DA: - add r0, r5, #0 - bl ov70_0225E0D4 - cmp r0, #0 - beq _022672EE - cmp r0, #1 - beq _022672FA - cmp r0, #2 - beq _02267318 - b _0226732A -_022672EE: - add r0, r6, #0 - mov r1, #0xd - bl ov70_02262E88 - mov r0, #1 - b _02267334 -_022672FA: - add r0, r6, #0 - mov r1, #0x13 - bl ov70_02262E88 - ldr r0, [r4, #0x10] - mov r1, #4 - bl ov70_0225CD60 - add r2, r0, #0 - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov66_0222E990 - mov r0, #1 - b _02267334 -_02267318: - add r0, r7, #0 - bl ov66_0222ED7C - add r0, r6, #0 - mov r1, #0x21 - bl ov70_02262E88 - mov r0, #1 - b _02267334 -_0226732A: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268DCC - mov r0, #0 -_02267334: - cmp r0, #1 - beq _0226733A - b _02267A2E -_0226733A: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - add r0, r4, #0 - bl ov70_02268DC4 - b _02267A2E -_02267356: - ldr r0, [sp, #0x18] - bl ov66_0222E8C4 - str r0, [sp, #0x40] - ldr r0, [sp, #0x14] - bl ov66_0222E8C4 - ldr r1, [sp, #0x40] - cmp r1, r0 - bne _022673C4 - mov r0, #1 - strb r0, [r4, #0xc] - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #1 - bl ov70_02268D38 - ldrb r1, [r4, #3] - ldr r2, _02267398 ; =0x000001FB - b _0226739C - nop -_02267390: .word 0x000005E4 -_02267394: .word 0x00000203 -_02267398: .word 0x000001FB -_0226739C: - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x12 - add r3, r6, #0 - bl ov70_02268BA4 - add r0, r7, #0 - mov r1, #4 - bl ov66_0222ECD4 - b _02267A2E -_022673C4: - mov r2, #0 - strb r2, [r4, #0xc] - ldrb r1, [r4, #3] - add r0, r5, #0 - bl ov70_0225E234 - mov r3, #1 - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - str r3, [sp] - bl ov70_02268D38 - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #2 - bl ov70_02268D38 - mov r2, #0x7f - ldrb r1, [r4, #3] - add r0, r5, #0 - lsl r2, r2, #2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xe - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_02267414: - mov r0, #1 - str r0, [sp] - add r0, r4, #0 - ldr r3, _02267750 ; =0x00000206 - add r0, #0x14 - add r1, r5, #0 - mov r2, #2 - bl ov70_02268E44 - add r1, r4, #0 - mov r2, #0 - add r0, r5, #0 - add r1, #0x14 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r4, #0 - bl ov70_02268DB8 - add r0, r6, #0 - mov r1, #0xf - bl ov70_02262E88 - b _02267A2E -_02267444: - add r0, r5, #0 - bl ov70_0225E0D4 - cmp r0, #0 - beq _02267454 - cmp r0, #1 - beq _0226748C - b _02267498 -_02267454: - add r0, r7, #0 - mov r1, #3 - bl ov66_0222ECD4 - add r0, r6, #0 - mov r1, #0x10 - bl ov70_02262E88 - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222EF44 - ldr r0, [r4, #0x10] - mov r1, #4 - bl ov70_0225CD60 - add r6, r0, #0 - ldr r0, [sp, #0x14] - bl ov66_0222E8C4 - add r3, r0, #0 - ldr r1, [sp, #0xc] - add r0, r7, #0 - add r2, r6, #0 - bl ov66_0222E9CC - mov r0, #1 - b _022674A2 -_0226748C: - add r0, r6, #0 - mov r1, #0xa - bl ov70_02262E88 - mov r0, #1 - b _022674A2 -_02267498: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268DCC - mov r0, #0 -_022674A2: - cmp r0, #1 - beq _022674A8 - b _02267A2E -_022674A8: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - add r0, r4, #0 - bl ov70_02268DC4 - b _02267A2E -_022674C4: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - mov r3, #1 - bl ov70_02268D38 - ldrb r1, [r4, #3] - ldr r2, _02267754 ; =0x000001FE - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x11 - add r3, r6, #0 - bl ov70_02268BA4 - ldr r0, [sp, #0x14] - bl ov66_0222E8C4 - add r1, r0, #0 - add r0, r7, #0 - bl ov66_0222E528 - b _02267A2E -_02267510: - ldr r0, _02267758 ; =0x000005A8 - bl sub_02005748 - add r0, r6, #0 - mov r1, #0x12 - bl ov70_02262E88 - b _02267A2E -_02267520: - ldr r0, [sp, #0x20] - cmp r0, #4 - bhi _0226757E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267532: ; jump table - .short _0226757E - _02267532 - 2 ; case 0 - .short _0226757E - _02267532 - 2 ; case 1 - .short _0226753C - _02267532 - 2 ; case 2 - .short _02267564 - _02267532 - 2 ; case 3 - .short _0226757E - _02267532 - 2 ; case 4 -_0226753C: - ldr r1, [sp, #0x14] - add r0, r4, #0 - bl ov70_02268E20 - ldrb r0, [r4, #0xc] - cmp r0, #1 - bne _02267554 - add r0, r6, #0 - mov r1, #0x21 - bl ov70_02262E88 - b _0226755C -_02267554: - add r0, r6, #0 - mov r1, #0xa - bl ov70_02262E88 -_0226755C: - add r0, r5, #0 - bl ov70_0225DFCC - b _02267A2E -_02267564: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - bne _02267574 - add r0, r5, #0 - bl ov70_0225DFBC -_02267574: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268D70 - b _02267A2E -_0226757E: - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02267A2E -_0226758E: - add r0, r7, #0 - mov r1, #5 - bl ov66_0222ECD4 - add r0, r6, #0 - mov r1, #0x14 - bl ov70_02262E88 - b _02267A2E -_022675A0: - ldr r0, _0226775C ; =0x00000207 - add r1, r5, #0 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0x14 - mov r2, #0x1e - mov r3, #4 - bl ov70_02268EEC - mov r0, #8 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x17 - add r1, r4, #0 - mov r2, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r1, #0x14 - add r3, r2, #0 - bl ov70_0225E0A4 - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - add r0, r4, #0 - bl ov70_02268DB8 - b _02267A2E -_022675E0: - add r0, r5, #0 - bl ov70_0225E0D4 - mov r1, #1 - mvn r1, r1 - str r0, [sp, #0x44] - cmp r0, r1 - beq _022675F6 - add r1, r1, #1 - cmp r0, r1 - bne _02267600 -_022675F6: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268DCC - b _02267A2E -_02267600: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - ldr r0, [sp, #0x44] - mov r1, #0x16 - strb r0, [r4] - add r0, r6, #0 - bl ov70_02262E88 - b _02267A2E -_02267622: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r3, [r4] - ldr r2, _02267760 ; =0x000001DD - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, r3, r2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x17 - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_02267654: - mov r0, #0 - str r0, [sp] - ldrb r3, [r4] - add r0, r4, #0 - add r0, #0x14 - lsl r3, r3, #2 - add r1, r5, #0 - mov r2, #4 - add r3, #0x73 - bl ov70_02268E44 - add r1, r4, #0 - mov r2, #0 - add r0, r5, #0 - add r1, #0x14 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r6, #0 - mov r1, #0x18 - bl ov70_02262E88 - b _02267A2E -_02267682: - add r0, r5, #0 - bl ov70_0225E0D4 - str r0, [sp, #0x48] - cmp r0, #3 - bhi _022676D0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226769A: ; jump table - .short _022676A2 - _0226769A - 2 ; case 0 - .short _022676A2 - _0226769A - 2 ; case 1 - .short _022676A2 - _0226769A - 2 ; case 2 - .short _022676A2 - _0226769A - 2 ; case 3 -_022676A2: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - add r0, r4, #0 - bl ov70_02268DC4 - ldrb r0, [r4] - lsl r1, r0, #2 - ldr r0, [sp, #0x48] - add r0, r0, r1 - strb r0, [r4, #1] - add r0, r6, #0 - mov r1, #0x19 - bl ov70_02262E88 - b _02267A2E -_022676D0: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268DCC - b _02267A2E -_022676DA: - ldrb r2, [r4, #1] - add r0, r4, #0 - add r0, #0x38 - add r2, r2, #6 - lsl r2, r2, #0x10 - add r1, r7, #0 - lsr r2, r2, #0x10 - mov r3, #2 - bl ov70_0226911C - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r3, [r4, #1] - ldr r2, _02267764 ; =0x00000165 - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, r3, r2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1a - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_02267720: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r2, [r4] - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, #0x55 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1b - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E - ; .align 2, 0 -_02267750: .word 0x00000206 -_02267754: .word 0x000001FE -_02267758: .word 0x000005A8 -_0226775C: .word 0x00000207 -_02267760: .word 0x000001DD -_02267764: .word 0x00000165 -_02267768: - add r0, r4, #0 - add r0, #0x38 - bl ov70_02269178 - cmp r0, #1 - bne _0226779A - add r0, r4, #0 - add r0, #0x38 - bl ov70_02269188 - cmp r0, #2 - bne _0226778A - add r0, r6, #0 - mov r1, #0x1c - bl ov70_02262E88 - b _02267A2E -_0226778A: - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02267A2E -_0226779A: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - beq _022677A6 - b _02267A2E -_022677A6: - add r0, r5, #0 - bl ov70_0225DFBC - b _02267A2E -_022677AE: - ldr r0, [sp, #0x20] - cmp r0, #4 - bhi _022677FC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022677C0: ; jump table - .short _022677FC - _022677C0 - 2 ; case 0 - .short _022677FC - _022677C0 - 2 ; case 1 - .short _022677CA - _022677C0 - 2 ; case 2 - .short _022677E2 - _022677C0 - 2 ; case 3 - .short _022677FC - _022677C0 - 2 ; case 4 -_022677CA: - ldr r1, [sp, #0x14] - add r0, r4, #0 - bl ov70_02268E20 - add r0, r6, #0 - mov r1, #0x1d - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02267A2E -_022677E2: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - bne _022677F2 - add r0, r5, #0 - bl ov70_0225DFBC -_022677F2: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268D70 - b _02267A2E -_022677FC: - add r0, r6, #0 - mov r1, #0x20 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02267A2E -_0226780C: - ldr r0, [sp, #0x1c] - sub r0, r0, #6 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x1c] - cmp r0, #0x7e - bhs _02267820 - cmp r0, #6 - bhs _0226782A -_02267820: - add r0, r6, #0 - mov r1, #0x23 - bl ov70_02262E88 - b _02267A2E -_0226782A: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldr r2, [sp, #0x10] - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, #0xec - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - ldrb r1, [r4, #1] - ldr r0, [sp, #0x10] - cmp r0, r1 - bne _02267862 - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1e - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_02267862: - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1f - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_02267874: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x33 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xa - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_022678A2: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x32 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x25 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xa - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_022678D0: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2d - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0 - strh r0, [r4, #0xa] - mov r0, #0x24 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x26 - add r3, r6, #0 - bl ov70_02268BA4 - add r0, r7, #0 - bl ov66_0222EDC0 - b _02267A2E -_02267912: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2b - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0 - strh r0, [r4, #0xa] - mov r0, #0x24 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x26 - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_02267944: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2a - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0 - strh r0, [r4, #0xa] - mov r0, #0x24 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x26 - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_0226796C: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r2, #0x59 - ldrb r1, [r4, #3] - add r0, r5, #0 - lsl r2, r2, #2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0 - strh r0, [r4, #0xa] - mov r0, #0x24 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x26 - add r3, r6, #0 - bl ov70_02268BA4 - b _02267A2E -_022679A0: - add r0, r4, #0 - add r1, r6, #0 - bl ov70_02268BBC - b _02267A2E -_022679AA: - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov70_02268BD8 - b _02267A2E -_022679B6: - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - cmp r0, #1 - bne _022679CE - add r1, r4, #0 - add r1, #0x46 - ldrh r1, [r1] - ldr r2, [r4, #0x48] - add r0, r7, #0 - bl ov66_0222E500 -_022679CE: - add r0, r7, #0 - bl ov66_0222EC60 - add r0, r5, #0 - bl ov70_0225DFEC - add r0, r7, #0 - mov r1, #1 - bl ov66_0222E3E4 - add r0, r5, #0 - bl ov70_0225DEF0 - add r7, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r7, #0 - mov r2, #1 - bl ov70_0225CDEC - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02267A1C - mov r1, #1 - bl ov70_0225D030 - ldr r0, [r4, #0x10] - mov r1, #4 - bl ov70_0225CD60 - add r1, r0, #0 - ldr r0, [sp, #0x24] - mov r2, #1 - bl ov70_02262EEC - add r0, r5, #0 - bl ov70_0225E3D0 -_02267A1C: - add r0, r4, #0 - bl ov70_02268BA0 - add r0, r6, #0 - bl ov70_02262E64 - add sp, #0x4c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02267A2E: - add r0, r4, #0 - bl ov70_02268E08 - add r4, #0x38 - add r0, r4, #0 - add r1, r7, #0 - bl ov70_02269144 - mov r0, #0 - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_02266E9C - - thumb_func_start ov70_02267A44 -ov70_02267A44: ; 0x02267A44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - bl ov70_0225DEE8 - add r7, r0, #0 - add r0, r6, #0 - bl ov70_02262E80 - add r4, r0, #0 - add r0, r7, #0 - bl ov66_0222EE30 - str r0, [sp, #0x14] - add r0, r7, #0 - bl ov66_0222EE3C - str r0, [sp, #0x10] - add r0, r7, #0 - bl ov66_0222EE68 - cmp r0, #0 - beq _02267A92 - cmp r4, #0 - beq _02267A92 - ldrh r0, [r4, #0xa] - cmp r0, #1 - bne _02267A92 - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - mov r0, #0 - strh r0, [r4, #0xa] -_02267A92: - cmp r4, #0 - beq _02267AA8 - add r0, r7, #0 - bl ov66_0222E3BC - str r0, [sp, #0xc] - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222E374 - str r0, [sp, #8] -_02267AA8: - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _02267AD0 - ldrh r0, [r4, #0xa] - cmp r0, #1 - bne _02267AD0 - ldr r0, [sp, #8] - cmp r0, #0 - bne _02267AD0 - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - mov r0, #0 - strh r0, [r4, #0xa] -_02267AD0: - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0x1f - bhi _02267B96 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267AE6: ; jump table - .short _02267B26 - _02267AE6 - 2 ; case 0 - .short _02267B8C - _02267AE6 - 2 ; case 1 - .short _02267BBE - _02267AE6 - 2 ; case 2 - .short _02267BFA - _02267AE6 - 2 ; case 3 - .short _02267C6C - _02267AE6 - 2 ; case 4 - .short _02267C96 - _02267AE6 - 2 ; case 5 - .short _02267CC4 - _02267AE6 - 2 ; case 6 - .short _02267CFC - _02267AE6 - 2 ; case 7 - .short _02267D2A - _02267AE6 - 2 ; case 8 - .short _02267D58 - _02267AE6 - 2 ; case 9 - .short _02267E1E - _02267AE6 - 2 ; case 10 - .short _02267E5A - _02267AE6 - 2 ; case 11 - .short _02267EA0 - _02267AE6 - 2 ; case 12 - .short _02267EDC - _02267AE6 - 2 ; case 13 - .short _02267F2A - _02267AE6 - 2 ; case 14 - .short _02267F6E - _02267AE6 - 2 ; case 15 - .short _02267F9C - _02267AE6 - 2 ; case 16 - .short _02267FFC - _02267AE6 - 2 ; case 17 - .short _0226804A - _02267AE6 - 2 ; case 18 - .short _0226807A - _02267AE6 - 2 ; case 19 - .short _022680AA - _02267AE6 - 2 ; case 20 - .short _022680DC - _02267AE6 - 2 ; case 21 - .short _02268110 - _02267AE6 - 2 ; case 22 - .short _0226819E - _02267AE6 - 2 ; case 23 - .short _022681EA - _02267AE6 - 2 ; case 24 - .short _02268234 - _02267AE6 - 2 ; case 25 - .short _02268262 - _02267AE6 - 2 ; case 26 - .short _022682A4 - _02267AE6 - 2 ; case 27 - .short _022682D6 - _02267AE6 - 2 ; case 28 - .short _02268304 - _02267AE6 - 2 ; case 29 - .short _0226830E - _02267AE6 - 2 ; case 30 - .short _0226831A - _02267AE6 - 2 ; case 31 -_02267B26: - add r0, r6, #0 - mov r1, #0x50 - bl ov70_02262E3C - add r4, r0, #0 - mov r1, #0 - add r0, #0x44 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x46 - strh r1, [r0] - add r0, r7, #0 - str r1, [r4, #0x48] - bl ov66_0222EE1C - str r0, [sp, #0x18] - ldr r2, [sp, #0x18] - add r0, r4, #0 - add r1, r7, #0 - bl ov70_02268B50 - str r0, [sp, #0x1c] - ldr r0, _02267E98 ; =0x000005E4 - bl sub_02005748 - add r0, r7, #0 - mov r1, #9 - bl ov66_0222E3E4 - ldr r0, [sp, #0x1c] - cmp r0, #1 - bne _02267B82 - ldr r1, [sp, #0x18] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E328 - ldr r1, [sp, #0x18] - add r0, r7, #0 - bl ov66_0222EEE4 - add r0, r6, #0 - mov r1, #1 - bl ov70_02262E88 - b _02268382 -_02267B82: - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - b _02268382 -_02267B8C: - add r0, r7, #0 - bl ov66_0222EEAC - cmp r0, #0 - bne _02267B98 -_02267B96: - b _02268382 -_02267B98: - ldr r0, [sp, #8] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #0xc] - add r2, r5, #0 - str r0, [sp, #4] - ldrb r3, [r4, #5] - add r0, r4, #0 - bl ov70_02268BF4 - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #2 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267BBE: - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222EEF4 - add r0, r7, #0 - bl ov66_0222F020 - add r0, r7, #0 - mov r1, #7 - bl ov66_0222F040 - ldr r0, [sp, #0xc] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #8] - add r2, r5, #0 - str r0, [sp, #4] - ldrb r3, [r4, #4] - add r0, r4, #0 - bl ov70_02268BF4 - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #3 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267BFA: - ldr r0, [sp, #0x14] - cmp r0, #4 - bhi _02267C5C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267C0C: ; jump table - .short _02267C5C - _02267C0C - 2 ; case 0 - .short _02267C5C - _02267C0C - 2 ; case 1 - .short _02267C42 - _02267C0C - 2 ; case 2 - .short _02267C16 - _02267C0C - 2 ; case 3 - .short _02267C5C - _02267C0C - 2 ; case 4 -_02267C16: - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r7, #0 - mov r1, #0 - bl ov66_0222ECD4 - add r0, r7, #0 - bl ov66_0222EE24 - cmp r0, #0 - beq _02267C38 - add r0, r6, #0 - mov r1, #4 - bl ov70_02262E88 - b _02268382 -_02267C38: - add r0, r6, #0 - mov r1, #6 - bl ov70_02262E88 - b _02268382 -_02267C42: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - bne _02267C52 - add r0, r5, #0 - bl ov70_0225DFBC -_02267C52: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268D70 - b _02268382 -_02267C5C: - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02268382 -_02267C6C: - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02268CC8 - cmp r0, #1 - bne _02267C8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #5 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267C8C: - add r0, r6, #0 - mov r1, #5 - bl ov70_02262E88 - b _02268382 -_02267C96: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x28 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #7 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267CC4: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrh r1, [r4, #8] - add r0, r5, #0 - mov r2, #1 - bl ov70_0225E234 - ldrb r1, [r4, #3] - ldrh r2, [r4, #8] - add r0, r5, #0 - bl ov70_02268AF8 - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #7 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267CFC: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2f - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #9 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267D2A: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x35 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #9 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267D58: - ldr r0, [sp, #0x14] - cmp r0, #4 - bhi _02267E0E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267D6A: ; jump table - .short _02267DFE - _02267D6A - 2 ; case 0 - .short _02267E0E - _02267D6A - 2 ; case 1 - .short _02267DE4 - _02267D6A - 2 ; case 2 - .short _02267D74 - _02267D6A - 2 ; case 3 - .short _02267E0E - _02267D6A - 2 ; case 4 -_02267D74: - ldr r0, [sp, #0x10] - cmp r0, #3 - beq _02267D84 - cmp r0, #4 - beq _02267DA0 - cmp r0, #5 - beq _02267DBC - b _02267DCE -_02267D84: - add r0, r6, #0 - mov r1, #0xa - bl ov70_02262E88 - add r0, r7, #0 - bl ov66_0222EEB8 - mov r0, #1 - str r0, [r4, #0x4c] - ldr r1, [sp, #8] - add r0, r4, #0 - bl ov70_02268E20 - b _02267DDC -_02267DA0: - add r0, r6, #0 - mov r1, #0xe - bl ov70_02262E88 - add r0, r7, #0 - bl ov66_0222EEB8 - mov r0, #1 - str r0, [r4, #0x4c] - ldr r1, [sp, #8] - add r0, r4, #0 - bl ov70_02268E20 - b _02267DDC -_02267DBC: - add r0, r7, #0 - mov r1, #1 - bl ov66_0222ECD4 - add r0, r6, #0 - mov r1, #0xf - bl ov70_02262E88 - b _02267DDC -_02267DCE: - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC -_02267DDC: - add r0, r5, #0 - bl ov70_0225DFCC - b _02268382 -_02267DE4: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - bne _02267DF4 - add r0, r5, #0 - bl ov70_0225DFBC -_02267DF4: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268D70 - b _02268382 -_02267DFE: - add r0, r6, #0 - mov r1, #0x1b - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02268382 -_02267E0E: - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02268382 -_02267E1E: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r3, #1 - str r3, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02268D38 - ldrb r1, [r4, #3] - ldr r2, _02267E9C ; =0x000001FF - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xb - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267E5A: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r3, #1 - str r3, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02268D38 - mov r2, #2 - ldrb r1, [r4, #3] - add r0, r5, #0 - lsl r2, r2, #8 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xc - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 - ; .align 2, 0 -_02267E98: .word 0x000005E4 -_02267E9C: .word 0x000001FF -_02267EA0: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r3, #1 - str r3, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02268D38 - ldrb r1, [r4, #3] - ldr r2, _02268218 ; =0x00000201 - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0xd - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267EDC: - ldr r0, _0226821C ; =0x000005A8 - bl sub_02005748 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - ldr r2, _02268220 ; =0x00000202 - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #8 - add r3, r6, #0 - bl ov70_02268BA4 - add r0, r7, #0 - mov r1, #2 - bl ov66_0222ECD4 - add r0, r7, #0 - bl ov66_0222E3BC - bl ov66_0222E8C4 - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225E378 - b _02268382 -_02267F2A: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - mov r3, #1 - str r3, [sp] - add r0, r4, #0 - add r1, r7, #0 - add r2, r5, #0 - bl ov70_02268D38 - ldrb r1, [r4, #3] - ldr r2, _02268224 ; =0x000001FB - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1b - add r3, r6, #0 - bl ov70_02268BA4 - add r0, r7, #0 - mov r1, #2 - bl ov66_0222ECD4 - b _02268382 -_02267F6E: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - ldr r2, _02268228 ; =0x000002AF - add r0, r5, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x10 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02267F9C: - ldr r0, [sp, #0x14] - cmp r0, #4 - bhi _02267FEC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02267FAE: ; jump table - .short _02267FEC - _02267FAE - 2 ; case 0 - .short _02267FEC - _02267FAE - 2 ; case 1 - .short _02267FD2 - _02267FAE - 2 ; case 2 - .short _02267FB8 - _02267FAE - 2 ; case 3 - .short _02267FEC - _02267FAE - 2 ; case 4 -_02267FB8: - add r0, r6, #0 - mov r1, #0x11 - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - add r0, r7, #0 - bl ov66_0222EEB8 - mov r0, #1 - str r0, [r4, #0x4c] - b _02268382 -_02267FD2: - add r0, r5, #0 - bl ov70_0225DFDC - cmp r0, #0 - bne _02267FE2 - add r0, r5, #0 - bl ov70_0225DFBC -_02267FE2: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268D70 - b _02268382 -_02267FEC: - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - add r0, r5, #0 - bl ov70_0225DFCC - b _02268382 -_02267FFC: - ldr r0, [sp, #0x10] - cmp r0, #6 - blo _02268006 - cmp r0, #0x7e - blo _02268010 -_02268006: - add r0, r6, #0 - mov r1, #0x1a - bl ov70_02262E88 - b _02268382 -_02268010: - sub r0, r0, #6 - strb r0, [r4, #2] - ldrb r0, [r4, #2] - mov r2, #0 - lsr r0, r0, #2 - strb r0, [r4] - ldrb r1, [r4, #3] - add r0, r5, #0 - bl ov70_0225E234 - ldrb r2, [r4] - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, #0x37 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x12 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_0226804A: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r2, [r4] - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, #0x55 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x13 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_0226807A: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r2, [r4, #2] - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, #0xec - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x14 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_022680AA: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r3, [r4] - ldr r2, _0226822C ; =0x000001DD - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, r3, r2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x15 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_022680DC: - mov r0, #2 - str r0, [sp] - ldrb r3, [r4] - add r0, r4, #0 - add r0, #0x14 - lsl r3, r3, #2 - add r1, r5, #0 - mov r2, #5 - add r3, #0x73 - bl ov70_02268E44 - add r1, r4, #0 - mov r2, #0 - add r0, r5, #0 - add r1, #0x14 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r4, #0 - bl ov70_02268DB8 - add r0, r6, #0 - mov r1, #0x16 - bl ov70_02262E88 - b _02268382 -_02268110: - add r0, r5, #0 - bl ov70_0225E0D4 - cmp r0, #4 - bhi _0226816A - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02268126: ; jump table - .short _02268130 - _02268126 - 2 ; case 0 - .short _02268130 - _02268126 - 2 ; case 1 - .short _02268130 - _02268126 - 2 ; case 2 - .short _02268130 - _02268126 - 2 ; case 3 - .short _02268152 - _02268126 - 2 ; case 4 -_02268130: - ldrb r1, [r4] - lsl r1, r1, #2 - add r0, r0, r1 - strb r0, [r4, #1] - ldrb r1, [r4, #1] - add r0, r7, #0 - add r1, r1, #6 - lsl r1, r1, #0x10 - lsr r1, r1, #0x10 - bl ov66_0222ECD4 - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - mov r0, #1 - b _02268174 -_02268152: - mov r0, #0x7e - strb r0, [r4, #1] - ldrb r1, [r4, #1] - add r0, r7, #0 - bl ov66_0222ECD4 - add r0, r6, #0 - mov r1, #0x1c - bl ov70_02262E88 - mov r0, #1 - b _02268174 -_0226816A: - add r0, r4, #0 - add r1, r5, #0 - bl ov70_02268DCC - mov r0, #0 -_02268174: - cmp r0, #0 - bne _0226817A - b _02268382 -_0226817A: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - add r0, r4, #0 - bl ov70_02268DC4 - ldr r1, [sp, #8] - add r0, r4, #0 - bl ov70_02268E20 - b _02268382 -_0226819E: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r3, [r4, #1] - ldr r2, _02268230 ; =0x00000165 - ldrb r1, [r4, #3] - add r0, r5, #0 - add r2, r3, r2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - ldrb r1, [r4, #2] - ldrb r0, [r4, #1] - cmp r1, r0 - bne _022681D8 - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x18 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_022681D8: - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x19 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_022681EA: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x33 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x19 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 - ; .align 2, 0 -_02268218: .word 0x00000201 -_0226821C: .word 0x000005A8 -_02268220: .word 0x00000202 -_02268224: .word 0x000001FB -_02268228: .word 0x000002AF -_0226822C: .word 0x000001DD -_02268230: .word 0x00000165 -_02268234: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x34 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #8 - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02268262: - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r4, #0 - add r0, #0x14 - add r1, r5, #0 - bl ov70_02269108 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2d - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0 - strh r0, [r4, #0xa] - mov r0, #0x1d - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1f - add r3, r6, #0 - bl ov70_02268BA4 - add r0, r7, #0 - bl ov66_0222EDC0 - b _02268382 -_022682A4: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x2b - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0 - strh r0, [r4, #0xa] - mov r0, #0x1d - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1f - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_022682D6: - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r4, #3] - add r0, r5, #0 - mov r2, #0x31 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - mov r0, #0x1e - str r0, [sp] - add r0, r4, #0 - mov r1, #0x80 - mov r2, #0x1b - add r3, r6, #0 - bl ov70_02268BA4 - b _02268382 -_02268304: - add r0, r4, #0 - add r1, r6, #0 - bl ov70_02268BBC - b _02268382 -_0226830E: - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov70_02268BD8 - b _02268382 -_0226831A: - add r0, r4, #0 - add r0, #0x44 - ldrh r0, [r0] - cmp r0, #1 - bne _02268332 - add r1, r4, #0 - add r1, #0x46 - ldrh r1, [r1] - ldr r2, [r4, #0x48] - add r0, r7, #0 - bl ov66_0222E500 -_02268332: - ldr r0, [r4, #0x4c] - cmp r0, #0 - bne _02268340 - ldrb r1, [r4, #3] - add r0, r7, #0 - bl ov66_0222EED4 -_02268340: - add r0, r7, #0 - bl ov66_0222EC60 - add r0, r5, #0 - bl ov70_0225DFEC - add r0, r4, #0 - bl ov70_02268BA0 - add r0, r6, #0 - bl ov70_02262E64 - add r0, r7, #0 - mov r1, #1 - bl ov66_0222E3E4 - add r0, r5, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov70_0225CDEC - add r0, r5, #0 - bl ov70_0225E3D0 - add sp, #0x20 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02268382: - add r0, r4, #0 - bl ov70_02268E08 - mov r0, #0 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02267A44 - - thumb_func_start ov70_02268390 -ov70_02268390: ; 0x02268390 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - bl ov70_02262E80 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - add r7, r0, #0 - add r0, r6, #0 - bl ov70_02262E84 - cmp r0, #0x18 - bls _022683B2 - b _02268892 -_022683B2: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022683BE: ; jump table - .short _022683F0 - _022683BE - 2 ; case 0 - .short _02268430 - _022683BE - 2 ; case 1 - .short _02268450 - _022683BE - 2 ; case 2 - .short _02268470 - _022683BE - 2 ; case 3 - .short _02268490 - _022683BE - 2 ; case 4 - .short _022684B0 - _022683BE - 2 ; case 5 - .short _022684DA - _022683BE - 2 ; case 6 - .short _02268588 - _022683BE - 2 ; case 7 - .short _022685A8 - _022683BE - 2 ; case 8 - .short _022685C6 - _022683BE - 2 ; case 9 - .short _0226863E - _022683BE - 2 ; case 10 - .short _02268668 - _022683BE - 2 ; case 11 - .short _02268692 - _022683BE - 2 ; case 12 - .short _022686BC - _022683BE - 2 ; case 13 - .short _022686DC - _022683BE - 2 ; case 14 - .short _022686FC - _022683BE - 2 ; case 15 - .short _0226871C - _022683BE - 2 ; case 16 - .short _02268740 - _022683BE - 2 ; case 17 - .short _022687B6 - _022683BE - 2 ; case 18 - .short _022687D6 - _022683BE - 2 ; case 19 - .short _022687F6 - _022683BE - 2 ; case 20 - .short _02268816 - _022683BE - 2 ; case 21 - .short _02268836 - _022683BE - 2 ; case 22 - .short _02268856 - _022683BE - 2 ; case 23 - .short _0226886A - _022683BE - 2 ; case 24 -_022683F0: - add r0, r6, #0 - mov r1, #0x28 - bl ov70_02262E3C - ldr r0, _0226873C ; =0x000005DC - bl sub_02005748 - add r0, r7, #0 - bl ov66_0222E12C - cmp r0, #1 - bne _02268412 - add r0, r6, #0 - mov r1, #2 - bl ov70_02262E88 - b _02268892 -_02268412: - add r0, r7, #0 - bl ov66_0222E170 - cmp r0, #1 - bne _02268426 - add r0, r6, #0 - mov r1, #1 - bl ov70_02262E88 - b _02268892 -_02268426: - add r0, r6, #0 - mov r1, #3 - bl ov70_02262E88 - b _02268892 -_02268430: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4e - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #0x18 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268450: - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #0x18 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268470: - add r0, r4, #0 - mov r1, #1 - mov r2, #0xf - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268490: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x10 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #5 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022684B0: - add r0, r5, #4 - add r1, r4, #0 - bl ov70_02268FB8 - mov r0, #0x10 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xf - mov r2, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov70_0225E0A4 - add r0, r6, #0 - mov r1, #6 - bl ov70_02262E88 - b _02268892 -_022684DA: - add r0, r4, #0 - mov r7, #0 - bl ov70_0225E0D4 - cmp r0, #7 - bhi _02268502 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022684F2: ; jump table - .short _0226850C - _022684F2 - 2 ; case 0 - .short _02268518 - _022684F2 - 2 ; case 1 - .short _02268524 - _022684F2 - 2 ; case 2 - .short _02268530 - _022684F2 - 2 ; case 3 - .short _0226853C - _022684F2 - 2 ; case 4 - .short _02268548 - _022684F2 - 2 ; case 5 - .short _02268554 - _022684F2 - 2 ; case 6 - .short _02268566 - _022684F2 - 2 ; case 7 -_02268502: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _02268560 - b _02268570 -_0226850C: - add r0, r6, #0 - mov r1, #7 - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_02268518: - add r0, r6, #0 - mov r1, #8 - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_02268524: - add r0, r6, #0 - mov r1, #0xd - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_02268530: - add r0, r6, #0 - mov r1, #0xe - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_0226853C: - add r0, r6, #0 - mov r1, #0xf - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_02268548: - add r0, r6, #0 - mov r1, #0x15 - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_02268554: - add r0, r6, #0 - mov r1, #0x10 - bl ov70_02262E88 - mov r7, #1 - b _02268570 -_02268560: - ldr r0, _0226873C ; =0x000005DC - bl sub_02005748 -_02268566: - add r0, r6, #0 - mov r1, #0x16 - bl ov70_02262E88 - mov r7, #1 -_02268570: - cmp r7, #1 - bne _02268628 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r5, #4 - add r1, r4, #0 - bl ov70_02269108 - b _02268892 -_02268588: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x17 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022685A8: - add r0, r5, #4 - add r1, r4, #0 - bl ov70_02269090 - mov r2, #0 - add r0, r4, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r6, #0 - mov r1, #9 - bl ov70_02262E88 - b _02268892 -_022685C6: - add r0, r4, #0 - mov r7, #0 - bl ov70_0225E0D4 - cmp r0, #3 - bhi _022685E6 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022685DE: ; jump table - .short _022685F0 - _022685DE - 2 ; case 0 - .short _022685FC - _022685DE - 2 ; case 1 - .short _02268608 - _022685DE - 2 ; case 2 - .short _0226861A - _022685DE - 2 ; case 3 -_022685E6: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _02268614 - b _02268624 -_022685F0: - add r0, r6, #0 - mov r1, #0xa - bl ov70_02262E88 - mov r7, #1 - b _02268624 -_022685FC: - add r0, r6, #0 - mov r1, #0xb - bl ov70_02262E88 - mov r7, #1 - b _02268624 -_02268608: - add r0, r6, #0 - mov r1, #0xc - bl ov70_02262E88 - mov r7, #1 - b _02268624 -_02268614: - ldr r0, _0226873C ; =0x000005DC - bl sub_02005748 -_0226861A: - add r0, r6, #0 - mov r1, #4 - bl ov70_02262E88 - mov r7, #1 -_02268624: - cmp r7, #1 - beq _0226862A -_02268628: - b _02268892 -_0226862A: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r5, #4 - add r1, r4, #0 - bl ov70_02269108 - b _02268892 -_0226863E: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x18 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268668: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x19 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268692: - add r0, r4, #0 - mov r1, #2 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1a - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022686BC: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x12 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022686DC: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x13 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022686FC: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x14 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_0226871C: - add r0, r5, #4 - add r1, r4, #0 - bl ov70_02269018 - mov r2, #0 - add r0, r4, #0 - add r1, r5, #4 - add r3, r2, #0 - bl ov70_0225E074 - add r0, r6, #0 - mov r1, #0x11 - bl ov70_02262E88 - b _02268892 - nop -_0226873C: .word 0x000005DC -_02268740: - add r0, r4, #0 - mov r7, #0 - bl ov70_0225E0D4 - cmp r0, #3 - bhi _02268760 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02268758: ; jump table - .short _0226876A - _02268758 - 2 ; case 0 - .short _02268776 - _02268758 - 2 ; case 1 - .short _02268782 - _02268758 - 2 ; case 2 - .short _02268794 - _02268758 - 2 ; case 3 -_02268760: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0226878E - b _0226879E -_0226876A: - add r0, r6, #0 - mov r1, #0x12 - bl ov70_02262E88 - mov r7, #1 - b _0226879E -_02268776: - add r0, r6, #0 - mov r1, #0x13 - bl ov70_02262E88 - mov r7, #1 - b _0226879E -_02268782: - add r0, r6, #0 - mov r1, #0x14 - bl ov70_02262E88 - mov r7, #1 - b _0226879E -_0226878E: - ldr r0, _02268898 ; =0x000005DC - bl sub_02005748 -_02268794: - add r0, r6, #0 - mov r1, #4 - bl ov70_02262E88 - mov r7, #1 -_0226879E: - cmp r7, #1 - bne _02268892 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov70_0225E0E4 - add r0, r5, #4 - add r1, r4, #0 - bl ov70_02269108 - b _02268892 -_022687B6: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1b - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022687D6: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1c - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_022687F6: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1d - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268816: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x1e - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #4 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268836: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x16 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - mov r0, #0x18 - str r0, [r5, #0] - add r0, r6, #0 - mov r1, #0x17 - bl ov70_02262E88 - b _02268892 -_02268856: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #0 - beq _02268892 - ldr r1, [r5, #0] - add r0, r6, #0 - bl ov70_02262E88 - b _02268892 -_0226886A: - add r0, r6, #0 - bl ov70_02262E64 - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r4, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov70_0225CDEC - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02268892: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268898: .word 0x000005DC - thumb_func_end ov70_02268390 - - thumb_func_start ov70_0226889C -ov70_0226889C: ; 0x0226889C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - bl ov70_02262E80 - add r0, r4, #0 - bl ov70_0225DEE8 - add r6, r0, #0 - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #0 - beq _022688C6 - cmp r0, #1 - bne _022688BE - b _022689FE -_022688BE: - cmp r0, #2 - bne _022688C4 - b _02268A12 -_022688C4: - b _02268A32 -_022688C6: - ldr r0, _02268A38 ; =0x000005DC - bl sub_02005748 - add r0, r6, #0 - bl ov66_0222E12C - cmp r0, #0 - bne _022688FC - add r0, r6, #0 - bl ov66_0222E170 - cmp r0, #1 - bne _02268918 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4e - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02268A32 -_022688FC: - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02268A32 -_02268918: - add r0, r6, #0 - bl ov66_0222F05C - cmp r0, #8 - bhi _022689E2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226892E: ; jump table - .short _02268940 - _0226892E - 2 ; case 0 - .short _02268958 - _0226892E - 2 ; case 1 - .short _02268970 - _0226892E - 2 ; case 2 - .short _02268988 - _0226892E - 2 ; case 3 - .short _022689A0 - _0226892E - 2 ; case 4 - .short _022689B8 - _0226892E - 2 ; case 5 - .short _022689C6 - _0226892E - 2 ; case 6 - .short _022689D4 - _0226892E - 2 ; case 7 - .short _022689E2 - _0226892E - 2 ; case 8 -_02268940: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x49 - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_02268958: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x49 - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_02268970: - add r0, r4, #0 - mov r1, #2 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x49 - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_02268988: - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4d - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_022689A0: - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl ov70_0225E27C - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4d - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_022689B8: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4a - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_022689C6: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4f - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_022689D4: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4b - bl ov70_0225E20C - add r1, r0, #0 - b _022689EE -_022689E2: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x4c - bl ov70_0225E20C - add r1, r0, #0 -_022689EE: - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #1 - bl ov70_02262E88 - b _02268A32 -_022689FE: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #0 - beq _02268A32 - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - b _02268A32 -_02268A12: - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r4, #0 - bl ov70_0225DEF0 - add r4, r0, #0 - bl ov70_0225CCAC - add r1, r0, #0 - add r0, r4, #0 - mov r2, #1 - bl ov70_0225CDEC - mov r0, #1 - pop {r4, r5, r6, pc} -_02268A32: - mov r0, #0 - pop {r4, r5, r6, pc} - nop -_02268A38: .word 0x000005DC - thumb_func_end ov70_0226889C - - thumb_func_start ov70_02268A3C -ov70_02268A3C: ; 0x02268A3C - push {r3, lr} - sub sp, #8 - bl ov66_0222E7C4 - str r0, [sp] - str r0, [sp, #4] - add r0, sp, #0 - ldrb r0, [r0, #4] - cmp r0, #0x18 - bhi _02268AA0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02268A5C: ; jump table - .short _02268A9A - _02268A5C - 2 ; case 0 - .short _02268A9A - _02268A5C - 2 ; case 1 - .short _02268A9A - _02268A5C - 2 ; case 2 - .short _02268A9A - _02268A5C - 2 ; case 3 - .short _02268A8E - _02268A5C - 2 ; case 4 - .short _02268A8E - _02268A5C - 2 ; case 5 - .short _02268A8E - _02268A5C - 2 ; case 6 - .short _02268A8E - _02268A5C - 2 ; case 7 - .short _02268A8E - _02268A5C - 2 ; case 8 - .short _02268A8E - _02268A5C - 2 ; case 9 - .short _02268A8E - _02268A5C - 2 ; case 10 - .short _02268A94 - _02268A5C - 2 ; case 11 - .short _02268A94 - _02268A5C - 2 ; case 12 - .short _02268A94 - _02268A5C - 2 ; case 13 - .short _02268A94 - _02268A5C - 2 ; case 14 - .short _02268A94 - _02268A5C - 2 ; case 15 - .short _02268A94 - _02268A5C - 2 ; case 16 - .short _02268A94 - _02268A5C - 2 ; case 17 - .short _02268A94 - _02268A5C - 2 ; case 18 - .short _02268A9A - _02268A5C - 2 ; case 19 - .short _02268A9A - _02268A5C - 2 ; case 20 - .short _02268A9A - _02268A5C - 2 ; case 21 - .short _02268A9A - _02268A5C - 2 ; case 22 - .short _02268A9A - _02268A5C - 2 ; case 23 - .short _02268A9A - _02268A5C - 2 ; case 24 -_02268A8E: - add sp, #8 - mov r0, #0 - pop {r3, pc} -_02268A94: - add sp, #8 - mov r0, #1 - pop {r3, pc} -_02268A9A: - add sp, #8 - mov r0, #2 - pop {r3, pc} -_02268AA0: - bl sub_02022974 - mov r0, #1 - add sp, #8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02268A3C - - thumb_func_start ov70_02268AAC -ov70_02268AAC: ; 0x02268AAC - push {r4, r5, r6, lr} - add r6, r1, #0 - add r5, r0, #0 - add r4, r2, #0 - bl ov70_0225DEE8 - add r1, r6, #0 - bl ov66_0222E924 - cmp r0, #1 - bne _02268ADE - ldr r3, _02268AEC ; =0x0226DD5C - ldr r0, _02268AF0 ; =0x00000163 - mov r2, #0 -_02268AC8: - ldrh r1, [r3] - cmp r4, r1 - bne _02268AD6 - ldr r0, _02268AF4 ; =0x0226DD5E - lsl r1, r2, #2 - ldrh r4, [r0, r1] - b _02268ADE -_02268AD6: - add r2, r2, #1 - add r3, r3, #4 - cmp r2, r0 - blo _02268AC8 -_02268ADE: - add r0, r5, #0 - mov r1, #3 - add r2, r4, #0 - bl ov70_0225E20C - pop {r4, r5, r6, pc} - nop -_02268AEC: .word 0x0226DD5C -_02268AF0: .word 0x00000163 -_02268AF4: .word 0x0226DD5E - thumb_func_end ov70_02268AAC - - thumb_func_start ov70_02268AF8 -ov70_02268AF8: ; 0x02268AF8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r4, r0, #0 - add r6, r2, #0 - bl ov70_0225DEE8 - add r7, r0, #0 - add r1, r5, #0 - bl ov66_0222E924 - add r5, r0, #0 - add r0, r7, #0 - add r1, r6, #0 - bl ov66_0222E924 - mov r2, #0x29 - cmp r5, #1 - bne _02268B24 - cmp r0, #1 - bne _02268B24 - ldr r2, _02268B44 ; =0x000002AA - b _02268B3A -_02268B24: - cmp r5, #1 - bne _02268B30 - cmp r0, #0 - bne _02268B30 - ldr r2, _02268B48 ; =0x00000226 - b _02268B3A -_02268B30: - cmp r5, #0 - bne _02268B3A - cmp r0, #1 - bne _02268B3A - ldr r2, _02268B4C ; =0x000002A9 -_02268B3A: - add r0, r4, #0 - mov r1, #3 - bl ov70_0225E20C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268B44: .word 0x000002AA -_02268B48: .word 0x00000226 -_02268B4C: .word 0x000002A9 - thumb_func_end ov70_02268AF8 - - thumb_func_start ov70_02268B50 -ov70_02268B50: ; 0x02268B50 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0 - add r6, r2, #0 - mvn r0, r0 - add r4, r1, #0 - cmp r6, r0 - bne _02268B64 - bl sub_02022974 -_02268B64: - strb r6, [r5, #3] - add r0, r4, #0 - bl ov66_0222E338 - strh r0, [r5, #8] - mov r0, #1 - strh r0, [r5, #0xa] - add r0, r4, #0 - bl ov66_0222E3BC - add r6, r0, #0 - ldrb r1, [r5, #3] - add r0, r4, #0 - bl ov66_0222E374 - add r4, r0, #0 - bne _02268B8A - mov r0, #0 - pop {r4, r5, r6, pc} -_02268B8A: - add r0, r6, #0 - bl ov70_02268A3C - strb r0, [r5, #4] - add r0, r4, #0 - bl ov70_02268A3C - strb r0, [r5, #5] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02268B50 - - thumb_func_start ov70_02268BA0 -ov70_02268BA0: ; 0x02268BA0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_02268BA0 - - thumb_func_start ov70_02268BA4 -ov70_02268BA4: ; 0x02268BA4 - strb r1, [r0, #6] - ldr r1, _02268BB4 ; =0xFFFFFFF0 - strb r2, [r0, #7] - add r0, r3, #0 - add r1, sp - ldr r3, _02268BB8 ; =ov70_02262E88 - ldrb r1, [r1, #0x10] - bx r3 - ; .align 2, 0 -_02268BB4: .word 0xFFFFFFF0 -_02268BB8: .word ov70_02262E88 - thumb_func_end ov70_02268BA4 - - thumb_func_start ov70_02268BBC -ov70_02268BBC: ; 0x02268BBC - push {r3, lr} - add r2, r0, #0 - ldrb r0, [r2, #6] - cmp r0, #0 - beq _02268BCC - sub r0, r0, #1 - strb r0, [r2, #6] - pop {r3, pc} -_02268BCC: - add r0, r1, #0 - ldrb r1, [r2, #7] - bl ov70_02262E88 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_02268BBC - - thumb_func_start ov70_02268BD8 -ov70_02268BD8: ; 0x02268BD8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r2, #0 - add r4, r1, #0 - bl ov70_0225DFAC - cmp r0, #0 - beq _02268BF0 - ldrb r1, [r5, #7] - add r0, r4, #0 - bl ov70_02262E88 -_02268BF0: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov70_02268BD8 - - thumb_func_start ov70_02268BF4 -ov70_02268BF4: ; 0x02268BF4 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r4, r3, #0 - ldr r3, [sp, #0x10] - add r0, r5, #0 - mov r1, #0 - add r2, r4, #0 - bl ov70_02268C44 - ldr r3, [sp, #0x14] - add r0, r5, #0 - mov r1, #1 - add r2, r4, #0 - bl ov70_02268C44 - ldr r0, [sp, #0x10] - bl ov66_0222E80C - add r4, r0, #0 - ldr r0, [sp, #0x14] - bl ov66_0222E80C - add r3, r0, #0 - ldr r2, _02268C40 ; =0x0226DCDC - lsl r4, r4, #4 - lsl r3, r3, #1 - add r2, r2, r4 - ldrh r2, [r3, r2] - add r0, r5, #0 - mov r1, #3 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - bl ov70_0225DF8C - pop {r3, r4, r5, pc} - nop -_02268C40: .word 0x0226DCDC - thumb_func_end ov70_02268BF4 - - thumb_func_start ov70_02268C44 -ov70_02268C44: ; 0x02268C44 - push {r4, r5, r6, lr} - add r4, r0, #0 - add r0, r3, #0 - add r5, r1, #0 - add r6, r2, #0 - bl ov66_0222E80C - cmp r0, #7 - bhi _02268CBA - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02268C62: ; jump table - .short _02268CBA - _02268C62 - 2 ; case 0 - .short _02268C72 - _02268C62 - 2 ; case 1 - .short _02268C7E - _02268C62 - 2 ; case 2 - .short _02268C8A - _02268C62 - 2 ; case 3 - .short _02268C96 - _02268C62 - 2 ; case 4 - .short _02268CA2 - _02268C62 - 2 ; case 5 - .short _02268CBA - _02268C62 - 2 ; case 6 - .short _02268CAE - _02268C62 - 2 ; case 7 -_02268C72: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2AC - pop {r4, r5, r6, pc} -_02268C7E: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2BC - pop {r4, r5, r6, pc} -_02268C8A: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2CC - pop {r4, r5, r6, pc} -_02268C96: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2DC - pop {r4, r5, r6, pc} -_02268CA2: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2EC - pop {r4, r5, r6, pc} -_02268CAE: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2FC - pop {r4, r5, r6, pc} -_02268CBA: - add r0, r4, #0 - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0225E2BC - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_02268C44 - - thumb_func_start ov70_02268CC8 -ov70_02268CC8: ; 0x02268CC8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r5, r0, #0 - add r0, r6, #0 - add r7, r2, #0 - bl ov66_0222E3BC - str r0, [sp] - ldrb r1, [r5, #3] - add r0, r6, #0 - bl ov66_0222E374 - add r6, r0, #0 - ldr r0, [sp] - bl ov66_0222E824 - cmp r0, #0 - bne _02268CF0 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02268CF0: - add r0, r6, #0 - bl ov66_0222E824 - cmp r0, #0 - bne _02268CFE - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02268CFE: - ldrb r1, [r5, #5] - ldrb r0, [r5, #4] - cmp r0, r1 - beq _02268D34 - cmp r1, #0 - beq _02268D14 - cmp r1, #1 - beq _02268D18 - cmp r1, #2 - beq _02268D1C - b _02268D1E -_02268D14: - mov r4, #0x27 - b _02268D1E -_02268D18: - mov r4, #0x25 - b _02268D1E -_02268D1C: - mov r4, #0x26 -_02268D1E: - add r0, r7, #0 - mov r1, #3 - add r2, r4, #0 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r7, #0 - bl ov70_0225DF8C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02268D34: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02268CC8 - - thumb_func_start ov70_02268D38 -ov70_02268D38: ; 0x02268D38 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r6, r2, #0 - add r7, r3, #0 - bl ov66_0222E3BC - str r0, [sp] - ldrb r1, [r5, #3] - add r0, r4, #0 - bl ov66_0222E374 - ldr r1, [sp, #0x18] - cmp r1, #0 - bne _02268D5E - bl ov66_0222E8C4 - b _02268D64 -_02268D5E: - ldr r0, [sp] - bl ov66_0222E8C4 -_02268D64: - add r1, r0, #0 - add r0, r6, #0 - add r2, r7, #0 - bl ov70_0225E29C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02268D38 - - thumb_func_start ov70_02268D70 -ov70_02268D70: ; 0x02268D70 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - bl ov66_0222EE90 - ldr r1, _02268DB4 ; =0x000001C2 - cmp r0, r1 - bne _02268DB0 - add r0, r4, #0 - bl ov70_0225DFCC - ldrb r1, [r5, #3] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E234 - mov r2, #0xab - ldrb r1, [r5, #3] - add r0, r4, #0 - lsl r2, r2, #2 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r4, #0 - bl ov70_0225DFBC -_02268DB0: - pop {r3, r4, r5, pc} - nop -_02268DB4: .word 0x000001C2 - thumb_func_end ov70_02268D70 - - thumb_func_start ov70_02268DB8 -ov70_02268DB8: ; 0x02268DB8 - mov r1, #0 - strh r1, [r0, #0xe] - mov r1, #1 - strb r1, [r0, #0xd] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02268DB8 - - thumb_func_start ov70_02268DC4 -ov70_02268DC4: ; 0x02268DC4 - mov r1, #0 - strh r1, [r0, #0xe] - strb r1, [r0, #0xd] - bx lr - thumb_func_end ov70_02268DC4 - - thumb_func_start ov70_02268DCC -ov70_02268DCC: ; 0x02268DCC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrb r0, [r5, #0xd] - add r4, r1, #0 - cmp r0, #1 - bne _02268DFE - mov r0, #0xe - ldrsh r1, [r5, r0] - ldr r0, _02268E00 ; =0x000001C2 - cmp r1, r0 - bne _02268DFE - ldrb r1, [r5, #3] - add r0, r4, #0 - mov r2, #0 - bl ov70_0225E234 - ldrb r1, [r5, #3] - ldr r2, _02268E04 ; =0x000002AB - add r0, r4, #0 - bl ov70_02268AAC - add r1, r0, #0 - add r0, r4, #0 - bl ov70_0225DF8C -_02268DFE: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02268E00: .word 0x000001C2 -_02268E04: .word 0x000002AB - thumb_func_end ov70_02268DCC - - thumb_func_start ov70_02268E08 -ov70_02268E08: ; 0x02268E08 - ldrb r1, [r0, #0xd] - cmp r1, #1 - bne _02268E1E - mov r1, #0xe - ldrsh r2, [r0, r1] - mov r1, #0xe1 - lsl r1, r1, #2 - cmp r2, r1 - bgt _02268E1E - add r1, r2, #1 - strh r1, [r0, #0xe] -_02268E1E: - bx lr - thumb_func_end ov70_02268E08 - - thumb_func_start ov70_02268E20 -ov70_02268E20: ; 0x02268E20 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov66_0222E7A0 - add r1, r5, #0 - mov r2, #1 - add r1, #0x44 - strh r2, [r1] - add r1, r5, #0 - add r1, #0x46 - strh r0, [r1] - add r0, r4, #0 - bl ov66_0222E798 - str r0, [r5, #0x48] - pop {r3, r4, r5, pc} - thumb_func_end ov70_02268E20 - - thumb_func_start ov70_02268E44 -ov70_02268E44: ; 0x02268E44 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r7, r2, #0 - str r0, [sp] - add r0, r5, #0 - add r1, r7, #0 - str r3, [sp, #4] - ldr r6, [sp, #0x20] - bl ov70_0225E00C - ldr r0, [sp] - mov r4, #0 - str r7, [r0, #0x20] - cmp r7, #0 - bls _02268EAE - sub r0, r7, #1 - str r0, [sp, #8] -_02268E68: - cmp r6, #0 - beq _02268E92 - ldr r0, [sp, #8] - cmp r4, r0 - bne _02268E92 - cmp r6, #1 - bne _02268E84 - ldr r2, _02268EE4 ; =0x00000205 - add r0, r5, #0 - mov r1, #3 - bl ov70_0225E20C - add r1, r0, #0 - b _02268EA0 -_02268E84: - add r0, r5, #0 - mov r1, #3 - mov r2, #0xeb - bl ov70_0225E20C - add r1, r0, #0 - b _02268EA0 -_02268E92: - ldr r2, [sp, #4] - add r0, r5, #0 - mov r1, #3 - add r2, r2, r4 - bl ov70_0225E20C - add r1, r0, #0 -_02268EA0: - add r0, r5, #0 - add r2, r4, #0 - bl ov70_0225E044 - add r4, r4, #1 - cmp r4, r7 - blo _02268E68 -_02268EAE: - ldr r3, _02268EE8 ; =0x0226DCBC - ldr r2, [sp] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp] - ldr r1, [r0, #0x20] - strh r1, [r0, #0x10] - ldr r1, [r0, #0x20] - ldrh r0, [r0, #0x12] - cmp r0, r1 - bls _02268ED4 - ldr r0, [sp] - strh r1, [r0, #0x12] -_02268ED4: - add r0, r5, #0 - bl ov70_0225E054 - ldr r1, [sp] - str r0, [r1, #0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_02268EE4: .word 0x00000205 -_02268EE8: .word 0x0226DCBC - thumb_func_end ov70_02268E44 - - thumb_func_start ov70_02268EEC -ov70_02268EEC: ; 0x02268EEC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - ldr r0, [sp, #0x20] - add r5, r1, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x24] - str r3, [sp, #4] - str r0, [sp, #0x24] - add r0, r5, #0 - add r1, r3, #0 - add r4, r2, #0 - bl ov70_0225E020 - ldr r1, [sp, #4] - ldr r0, [sp] - mov r7, #0 - str r1, [r0, #0x20] - add r0, r1, #0 - beq _02268F7C - sub r0, r0, #1 - str r0, [sp, #8] -_02268F18: - ldr r0, [sp, #0x24] - cmp r0, #0 - beq _02268F48 - ldr r0, [sp, #8] - cmp r7, r0 - bne _02268F48 - ldr r0, [sp, #0x24] - add r6, r4, #0 - cmp r0, #1 - bne _02268F3A - ldr r2, _02268FB0 ; =0x00000205 - add r0, r5, #0 - mov r1, #3 - bl ov70_0225E20C - add r1, r0, #0 - b _02268F6C -_02268F3A: - add r0, r5, #0 - mov r1, #3 - mov r2, #0xeb - bl ov70_0225E20C - add r1, r0, #0 - b _02268F6C -_02268F48: - bl sub_0201D35C - add r1, r4, #0 - bl sub_020E2178 - add r0, r5, #0 - add r6, r1, #0 - bl ov70_0225E064 - cmp r0, #1 - beq _02268F48 - ldr r2, [sp, #0x20] - add r0, r5, #0 - mov r1, #3 - add r2, r2, r6 - bl ov70_0225E20C - add r1, r0, #0 -_02268F6C: - add r0, r5, #0 - add r2, r6, #0 - bl ov70_0225E044 - ldr r0, [sp, #4] - add r7, r7, #1 - cmp r7, r0 - blo _02268F18 -_02268F7C: - ldr r3, _02268FB4 ; =0x0226DCBC - ldr r2, [sp] - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [sp] - ldr r1, [r0, #0x20] - strh r1, [r0, #0x10] - ldr r1, [r0, #0x20] - ldrh r0, [r0, #0x12] - cmp r0, r1 - bls _02268FA2 - ldr r0, [sp] - strh r1, [r0, #0x12] -_02268FA2: - add r0, r5, #0 - bl ov70_0225E054 - ldr r1, [sp] - str r0, [r1, #0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02268FB0: .word 0x00000205 -_02268FB4: .word 0x0226DCBC - thumb_func_end ov70_02268EEC - - thumb_func_start ov70_02268FB8 -ov70_02268FB8: ; 0x02268FB8 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - add r7, r0, #0 - add r0, r6, #0 - mov r1, #8 - bl ov70_0225E00C - mov r0, #8 - ldr r5, _02269010 ; =0x0226DCB4 - str r0, [r7, #0x20] - mov r4, #0 -_02268FCE: - ldrb r2, [r5] - add r0, r6, #0 - mov r1, #1 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r6, #0 - add r2, r4, #0 - bl ov70_0225E044 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #8 - blt _02268FCE - ldr r3, _02269014 ; =0x0226DCBC - add r2, r7, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r7, #0x20] - strh r0, [r7, #0x10] - ldr r0, [r7, #0x20] - strh r0, [r7, #0x12] - add r0, r6, #0 - bl ov70_0225E054 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269010: .word 0x0226DCB4 -_02269014: .word 0x0226DCBC - thumb_func_end ov70_02268FB8 - - thumb_func_start ov70_02269018 -ov70_02269018: ; 0x02269018 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #4 - bl ov70_0225E00C - mov r0, #4 - mov r4, #0 - str r0, [r6, #0x20] - add r7, r4, #0 -_0226902E: - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov70_0225E28C - add r0, r5, #0 - mov r1, #1 - mov r2, #0x27 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov70_0225E044 - add r4, r4, #1 - cmp r4, #3 - blt _0226902E - add r0, r5, #0 - mov r1, #1 - mov r2, #0x25 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - mov r2, #3 - bl ov70_0225E044 - ldr r3, _0226908C ; =0x0226DCBC - add r2, r6, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r6, #0x20] - strh r0, [r6, #0x10] - ldr r0, [r6, #0x20] - strh r0, [r6, #0x12] - add r0, r5, #0 - bl ov70_0225E054 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226908C: .word 0x0226DCBC - thumb_func_end ov70_02269018 - - thumb_func_start ov70_02269090 -ov70_02269090: ; 0x02269090 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #4 - bl ov70_0225E00C - mov r0, #4 - mov r4, #0 - str r0, [r6, #0x20] - add r7, r4, #0 -_022690A6: - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov70_0225E27C - add r0, r5, #0 - mov r1, #1 - mov r2, #0x26 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - add r2, r4, #0 - bl ov70_0225E044 - add r4, r4, #1 - cmp r4, #3 - blt _022690A6 - add r0, r5, #0 - mov r1, #1 - mov r2, #0x25 - bl ov70_0225E20C - add r1, r0, #0 - add r0, r5, #0 - mov r2, #3 - bl ov70_0225E044 - ldr r3, _02269104 ; =0x0226DCBC - add r2, r6, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r6, #0x20] - strh r0, [r6, #0x10] - ldr r0, [r6, #0x20] - strh r0, [r6, #0x12] - add r0, r5, #0 - bl ov70_0225E054 - str r0, [r6, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269104: .word 0x0226DCBC - thumb_func_end ov70_02269090 - - thumb_func_start ov70_02269108 -ov70_02269108: ; 0x02269108 - ldr r3, _02269110 ; =ov70_0225E034 - add r0, r1, #0 - bx r3 - nop -_02269110: .word ov70_0225E034 - thumb_func_end ov70_02269108 - - thumb_func_start ov70_02269114 -ov70_02269114: ; 0x02269114 - mov r1, #0 - strh r1, [r0] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02269114 - - thumb_func_start ov70_0226911C -ov70_0226911C: ; 0x0226911C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrh r0, [r5] - add r7, r1, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r0, #0 - beq _02269130 - bl sub_02022974 -_02269130: - mov r0, #1 - strh r0, [r5] - strh r4, [r5, #2] - add r0, r7, #0 - strh r6, [r5, #4] - bl ov66_0222EE30 - strh r0, [r5, #6] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226911C - - thumb_func_start ov70_02269144 -ov70_02269144: ; 0x02269144 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldrh r0, [r5] - add r4, r1, #0 - cmp r0, #0 - beq _02269176 - add r0, r4, #0 - bl ov66_0222EE30 - str r0, [r5, #8] - ldrh r1, [r5, #4] - cmp r0, r1 - bne _0226916C - ldrh r1, [r5, #2] - add r0, r4, #0 - bl ov66_0222ECD4 - mov r0, #0 - strh r0, [r5] - pop {r3, r4, r5, pc} -_0226916C: - ldrh r1, [r5, #6] - cmp r0, r1 - beq _02269176 - mov r0, #0 - strh r0, [r5] -_02269176: - pop {r3, r4, r5, pc} - thumb_func_end ov70_02269144 - - thumb_func_start ov70_02269178 -ov70_02269178: ; 0x02269178 - ldrh r0, [r0] - cmp r0, #1 - beq _02269182 - mov r0, #1 - bx lr -_02269182: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_02269178 - - thumb_func_start ov70_02269188 -ov70_02269188: ; 0x02269188 - ldr r0, [r0, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bx lr - thumb_func_end ov70_02269188 - - thumb_func_start ov70_02269190 -ov70_02269190: ; 0x02269190 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - add r7, r1, #0 - ldr r0, [sp, #0x20] - ldr r1, _022691FC ; =0x0001082C - str r2, [sp] - str r3, [sp, #4] - ldr r5, [sp, #0x24] - bl sub_02018144 - ldr r2, _022691FC ; =0x0001082C - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - ldr r0, [sp, #4] - str r6, [r4, #0] - str r0, [r4, #4] - ldr r0, [sp] - ldr r1, [sp, #0x20] - str r0, [r4, #8] - mov r0, #0xba - str r7, [r4, #0xc] - bl sub_02006C24 - add r6, r0, #0 - ldr r0, _02269200 ; =0x0001081C - add r1, r5, #0 - add r0, r4, r0 - mov r2, #4 - bl sub_020182CC - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov70_02269540 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov70_022695E0 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov70_0226965C - add r0, r6, #0 - bl sub_02006CA8 - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022691FC: .word 0x0001082C -_02269200: .word 0x0001081C - thumb_func_end ov70_02269190 - - thumb_func_start ov70_02269204 -ov70_02269204: ; 0x02269204 - push {r4, lr} - add r4, r0, #0 - bl ov70_022695C4 - add r0, r4, #0 - bl ov70_02269608 - add r0, r4, #0 - bl ov70_02269700 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov70_02269204 - - thumb_func_start ov70_02269220 -ov70_02269220: ; 0x02269220 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r5, r6, #0 - mov r7, #0xd1 - mov r4, #0 - add r5, #0x10 - lsl r7, r7, #4 -_0226922E: - add r0, r6, #0 - add r1, r5, #0 - bl ov70_0226978C - add r4, r4, #1 - add r5, r5, r7 - cmp r4, #0x14 - blt _0226922E - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_02269220 - - thumb_func_start ov70_02269240 -ov70_02269240: ; 0x02269240 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #4] - bl ov70_0225CCAC - add r5, r6, #0 - mov r7, #0xd1 - mov r4, #0 - add r5, #0x10 - lsl r7, r7, #4 -_02269254: - add r0, r6, #0 - add r1, r5, #0 - bl ov70_022697C8 - add r4, r4, #1 - add r5, r5, r7 - cmp r4, #0x14 - blt _02269254 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_02269240 - - thumb_func_start ov70_02269268 -ov70_02269268: ; 0x02269268 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #0x14 - blo _02269278 - bl sub_02022974 -_02269278: - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov70_0225CC70 - add r2, r0, #0 - beq _02269296 - mov r1, #0xd1 - lsl r1, r1, #4 - add r0, r5, #0 - add r5, #0x10 - mul r1, r4 - add r1, r5, r1 - add r3, r6, #0 - bl ov70_02269738 -_02269296: - pop {r4, r5, r6, pc} - thumb_func_end ov70_02269268 - - thumb_func_start ov70_02269298 -ov70_02269298: ; 0x02269298 - push {r3, lr} - mov r2, #0xd1 - lsl r2, r2, #4 - add r0, #0x10 - mul r2, r1 - add r0, r0, r2 - bl ov70_02269800 - cmp r0, #1 - beq _022692B0 - mov r0, #1 - pop {r3, pc} -_022692B0: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov70_02269298 - - thumb_func_start ov70_022692B4 -ov70_022692B4: ; 0x022692B4 - push {r3, r4} - ldr r4, [sp, #0x14] - sub r2, r2, r1 - str r4, [r0, #0] - str r1, [r0, #4] - str r2, [r0, #0x10] - str r1, [r0, #0x14] - ldr r1, [sp, #8] - str r3, [r0, #8] - sub r1, r1, r3 - str r1, [r0, #0x18] - ldr r2, [sp, #0xc] - ldr r1, [sp, #0x10] - str r3, [r0, #0x1c] - str r2, [r0, #0xc] - sub r1, r1, r2 - str r1, [r0, #0x20] - str r2, [r0, #0x24] - pop {r3, r4} - bx lr - thumb_func_end ov70_022692B4 - - thumb_func_start ov70_022692DC -ov70_022692DC: ; 0x022692DC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - mov r7, #0 - cmp r4, r0 - ble _022692F0 - add r4, r0, #0 - mov r7, #1 -_022692F0: - ldr r6, [r5, #0x10] - cmp r6, #0 - beq _02269374 - cmp r0, #0 - ble _0226930E - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - str r0, [sp, #8] - b _0226931E -_0226930E: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C - str r0, [sp, #8] -_0226931E: - cmp r4, #0 - ble _02269334 - lsl r0, r4, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _02269342 -_02269334: - lsl r0, r4, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_02269342: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r6, r2, #0xc - orr r6, r0 - ldr r0, [sp, #8] - bl sub_020E1740 - add r1, r0, #0 - add r0, r6, #0 - bl sub_020BCFD0 - ldr r1, [r5, #0x14] - add r0, r1, r0 - str r0, [r5, #4] -_02269374: - ldr r6, [r5, #0x18] - cmp r6, #0 - beq _022693FA - ldr r0, [r5, #0] - cmp r0, #0 - ble _02269394 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - str r0, [sp, #4] - b _022693A4 -_02269394: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C - str r0, [sp, #4] -_022693A4: - cmp r4, #0 - ble _022693BA - lsl r0, r4, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _022693C8 -_022693BA: - lsl r0, r4, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_022693C8: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r6, r2, #0xc - orr r6, r0 - ldr r0, [sp, #4] - bl sub_020E1740 - add r1, r0, #0 - add r0, r6, #0 - bl sub_020BCFD0 - ldr r1, [r5, #0x1c] - add r0, r1, r0 - str r0, [r5, #8] -_022693FA: - ldr r6, [r5, #0x20] - cmp r6, #0 - beq _02269480 - ldr r0, [r5, #0] - cmp r0, #0 - ble _0226941A - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - str r0, [sp] - b _0226942A -_0226941A: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C - str r0, [sp] -_0226942A: - cmp r4, #0 - ble _02269440 - lsl r0, r4, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226944E -_02269440: - lsl r0, r4, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226944E: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r4, r2, #0xc - orr r4, r0 - ldr r0, [sp] - bl sub_020E1740 - add r1, r0, #0 - add r0, r4, #0 - bl sub_020BCFD0 - ldr r1, [r5, #0x24] - add r0, r1, r0 - str r0, [r5, #0xc] -_02269480: - add r0, r7, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_022692DC - - thumb_func_start ov70_02269488 -ov70_02269488: ; 0x02269488 - push {r3, r4} - ldr r4, [r0, #4] - str r4, [r1, #0] - ldr r1, [r0, #8] - str r1, [r2, #0] - ldr r0, [r0, #0xc] - str r0, [r3, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov70_02269488 - - thumb_func_start ov70_0226949C -ov70_0226949C: ; 0x0226949C - push {r4, lr} - add r4, r0, #0 - strh r1, [r4] - asr r0, r1, #4 - lsl r1, r0, #2 - ldr r0, _022694CC ; =0x020F983C - strh r2, [r4, #2] - ldrsh r0, [r0, r1] - add r2, r3, #0 - str r3, [r4, #4] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_022694CC: .word 0x020F983C - thumb_func_end ov70_0226949C - - thumb_func_start ov70_022694D0 -ov70_022694D0: ; 0x022694D0 - push {r4, lr} - add r4, r0, #0 - ldrh r1, [r4] - ldrh r0, [r4, #2] - add r0, r1, r0 - strh r0, [r4] - ldrh r0, [r4] - ldr r2, [r4, #4] - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _02269504 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_02269504: .word 0x020F983C - thumb_func_end ov70_022694D0 - - thumb_func_start ov70_02269508 -ov70_02269508: ; 0x02269508 - ldr r0, [r0, #8] - str r0, [r1, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov70_02269508 - - thumb_func_start ov70_02269510 -ov70_02269510: ; 0x02269510 - push {r3, r4, r5, lr} - ldr r0, [r0, #4] - ldr r4, [r1, #8] - add r5, r2, #0 - bl ov70_0225CCAC - cmp r4, r0 - bne _0226952C - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - mov r1, #5 - bl sub_02005770 - pop {r3, r4, r5, pc} -_0226952C: - add r0, r4, #0 - bl ov70_0225CE70 - cmp r0, #0 - bne _0226953E - lsl r0, r5, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_0226953E: - pop {r3, r4, r5, pc} - thumb_func_end ov70_02269510 - - thumb_func_start ov70_02269540 -ov70_02269540: ; 0x02269540 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - mov r4, #0 -_0226954A: - mov r0, #0 - add r1, r4, #0 - str r0, [sp] - add r0, r6, #0 - add r1, #0x81 - mov r2, #0 - add r3, r7, #0 - bl sub_0200723C - ldr r1, _022695B4 ; =0x00010550 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - bl sub_020B3C0C - ldr r1, _022695B8 ; =0x00010554 - str r0, [r5, r1] - add r0, r1, #0 - ldr r1, [r5, r0] - cmp r1, #0 - beq _02269594 - add r0, r1, #0 - add r0, #8 - beq _02269588 - ldrb r2, [r1, #9] - cmp r2, #0 - bls _02269588 - ldrh r2, [r1, #0xe] - add r0, r0, r2 - add r0, r0, #4 - b _0226958A -_02269588: - mov r0, #0 -_0226958A: - cmp r0, #0 - beq _02269594 - ldr r0, [r0, #0] - add r1, r1, r0 - b _02269596 -_02269594: - mov r1, #0 -_02269596: - ldr r0, _022695BC ; =0x00010558 - str r1, [r5, r0] - mov r1, #0 - add r0, r0, #4 - str r1, [r5, r0] - ldr r0, _022695BC ; =0x00010558 - ldr r1, _022695C0 ; =0x00007FFF - ldr r0, [r5, r0] - bl sub_020B3624 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xf - blt _0226954A - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022695B4: .word 0x00010550 -_022695B8: .word 0x00010554 -_022695BC: .word 0x00010558 -_022695C0: .word 0x00007FFF - thumb_func_end ov70_02269540 - - thumb_func_start ov70_022695C4 -ov70_022695C4: ; 0x022695C4 - push {r4, r5, r6, lr} - ldr r6, _022695DC ; =0x00010550 - add r5, r0, #0 - mov r4, #0 -_022695CC: - ldr r0, [r5, r6] - bl sub_020181C4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xf - blt _022695CC - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022695DC: .word 0x00010550 - thumb_func_end ov70_022695C4 - - thumb_func_start ov70_022695E0 -ov70_022695E0: ; 0x022695E0 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - ldr r1, _02269604 ; =0x00010640 - add r7, r2, #0 - mov r4, #0 - add r5, r0, r1 -_022695EC: - add r2, r4, #0 - add r0, r5, #0 - add r1, r6, #0 - add r2, #0x90 - add r3, r7, #0 - bl ov70_0225C730 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x27 - blt _022695EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269604: .word 0x00010640 - thumb_func_end ov70_022695E0 - - thumb_func_start ov70_02269608 -ov70_02269608: ; 0x02269608 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r7, _02269650 ; =0x02100DF0 - add r5, r0, #0 - mov r4, #0 -_02269612: - ldr r0, _02269654 ; =0x00010640 - ldr r0, [r5, r0] - bl sub_020B3C1C - add r1, sp, #4 - add r2, sp, #0 - add r6, r0, #0 - bl sub_020AE9B8 - ldr r0, [sp, #4] - ldr r1, [r7, #0] - blx r1 - ldr r0, [sp] - ldr r1, [r7, #0] - blx r1 - add r0, r6, #0 - bl sub_020AEA70 - ldr r1, _02269658 ; =0x02100DF8 - ldr r1, [r1, #0] - blx r1 - ldr r0, _02269654 ; =0x00010640 - ldr r0, [r5, r0] - bl sub_020181C4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0x27 - blt _02269612 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269650: .word 0x02100DF0 -_02269654: .word 0x00010640 -_02269658: .word 0x02100DF8 - thumb_func_end ov70_02269608 - - thumb_func_start ov70_0226965C -ov70_0226965C: ; 0x0226965C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0 - ldr r4, _022696E8 ; =0x0226E5A4 - str r1, [sp, #8] - str r2, [sp, #0xc] - str r0, [sp, #0x10] -_0226966C: - ldr r0, _022696EC ; =0x0001081C - mov r6, #0 - add r0, r5, r0 - str r0, [sp, #0x14] - ldr r0, _022696F0 ; =0x000106DC - add r0, r5, r0 - str r0, [sp, #0x18] - ldr r0, _022696F4 ; =0x00010550 - add r0, r5, r0 - str r0, [sp, #0x1c] -_02269680: - add r7, r4, r6 - ldrb r1, [r7, #2] - cmp r1, #0x11 - beq _022696D2 - mov r0, #0x14 - mul r0, r1 - add r1, r5, r0 - ldr r0, _022696F0 ; =0x000106DC - ldr r0, [r1, r0] - cmp r0, #0 - bne _022696D2 - ldrb r0, [r4, #1] - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _022696F8 ; =0x00010640 - ldr r0, [r1, r0] - bl sub_020B3C1C - ldrb r1, [r4] - lsl r1, r1, #4 - add r2, r5, r1 - ldr r1, _022696FC ; =0x0001055C - str r0, [r2, r1] - ldrb r3, [r7, #2] - ldr r0, [sp, #0xc] - str r0, [sp] - ldr r0, [sp, #0x14] - add r1, r3, #0 - str r0, [sp, #4] - mov r0, #0x14 - mul r1, r0 - ldr r0, [sp, #0x18] - add r3, #0xb7 - add r0, r0, r1 - ldrb r1, [r4] - lsl r2, r1, #4 - ldr r1, [sp, #0x1c] - add r1, r1, r2 - ldr r2, [sp, #8] - bl sub_02017164 -_022696D2: - add r6, r6, #1 - cmp r6, #2 - blt _02269680 - ldr r0, [sp, #0x10] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, #0x27 - blt _0226966C - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022696E8: .word 0x0226E5A4 -_022696EC: .word 0x0001081C -_022696F0: .word 0x000106DC -_022696F4: .word 0x00010550 -_022696F8: .word 0x00010640 -_022696FC: .word 0x0001055C - thumb_func_end ov70_0226965C - - thumb_func_start ov70_02269700 -ov70_02269700: ; 0x02269700 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _02269730 ; =0x000106DC - mov r6, #0 - add r4, r5, r0 - ldr r0, _02269734 ; =0x0001081C - add r7, r5, r0 -_0226970E: - ldr r0, _02269730 ; =0x000106DC - ldr r0, [r5, r0] - cmp r0, #0 - beq _02269724 - add r0, r4, #0 - add r1, r7, #0 - bl sub_020171A0 - ldr r0, _02269730 ; =0x000106DC - mov r1, #0 - str r1, [r5, r0] -_02269724: - add r6, r6, #1 - add r5, #0x14 - add r4, #0x14 - cmp r6, #0x10 - blt _0226970E - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02269730: .word 0x000106DC -_02269734: .word 0x0001081C - thumb_func_end ov70_02269700 - - thumb_func_start ov70_02269738 -ov70_02269738: ; 0x02269738 - push {r3, r4, r5, r6, r7, lr} - add r7, r3, #0 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r7, #0x1b - blo _0226974A - bl sub_02022974 -_0226974A: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_022697F0 - str r6, [r4, #8] - add r0, r6, #0 - mov r1, #5 - strb r7, [r4] - bl ov70_0225CD60 - add r0, #0x28 - str r0, [r4, #4] - ldrb r2, [r4] - add r0, r5, #0 - add r1, r4, #0 - lsl r3, r2, #2 - ldr r2, _02269784 ; =0x0226E43C - ldr r2, [r2, r3] - blx r2 - ldrb r2, [r4] - add r0, r5, #0 - add r1, r4, #0 - lsl r3, r2, #2 - ldr r2, _02269788 ; =0x0226E4A8 - ldr r2, [r2, r3] - bl ov70_02269510 - pop {r3, r4, r5, r6, r7, pc} - nop -_02269784: .word 0x0226E43C -_02269788: .word 0x0226E4A8 - thumb_func_end ov70_02269738 - - thumb_func_start ov70_0226978C -ov70_0226978C: ; 0x0226978C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_02269800 - cmp r0, #0 - beq _022697C0 - ldrb r0, [r4] - cmp r0, #0x1b - blo _022697A6 - bl sub_02022974 -_022697A6: - ldrb r2, [r4] - add r0, r5, #0 - add r1, r4, #0 - lsl r3, r2, #2 - ldr r2, _022697C4 ; =0x0226E3D0 - ldr r2, [r2, r3] - blx r2 - cmp r0, #1 - bne _022697C0 - add r0, r5, #0 - add r1, r4, #0 - bl ov70_022697F0 -_022697C0: - pop {r3, r4, r5, pc} - nop -_022697C4: .word 0x0226E3D0 - thumb_func_end ov70_0226978C - - thumb_func_start ov70_022697C8 -ov70_022697C8: ; 0x022697C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov70_02269800 - cmp r0, #0 - bne _022697DC - mov r0, #0 - pop {r3, r4, r5, pc} -_022697DC: - ldrb r0, [r4] - cmp r0, #0x1b - blo _022697E6 - bl sub_02022974 -_022697E6: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226A998 - pop {r3, r4, r5, pc} - thumb_func_end ov70_022697C8 - - thumb_func_start ov70_022697F0 -ov70_022697F0: ; 0x022697F0 - ldr r3, _022697FC ; =sub_020D5124 - mov r2, #0xd1 - add r0, r1, #0 - mov r1, #0 - lsl r2, r2, #4 - bx r3 - ; .align 2, 0 -_022697FC: .word sub_020D5124 - thumb_func_end ov70_022697F0 - - thumb_func_start ov70_02269800 -ov70_02269800: ; 0x02269800 - ldr r0, [r0, #8] - cmp r0, #0 - beq _0226980A - mov r0, #1 - bx lr -_0226980A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_02269800 - - thumb_func_start ov70_02269810 -ov70_02269810: ; 0x02269810 - lsl r1, r1, #2 - add r1, r0, r1 - ldr r0, _02269824 ; =0x0000087C - ldr r0, [r1, r0] - cmp r0, #0 - beq _02269820 - mov r0, #1 - bx lr -_02269820: - mov r0, #0 - bx lr - ; .align 2, 0 -_02269824: .word 0x0000087C - thumb_func_end ov70_02269810 - - thumb_func_start ov70_02269828 -ov70_02269828: ; 0x02269828 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - str r0, [sp] - add r5, r1, #0 - add r6, r3, #0 - cmp r4, #0x12 - blo _0226983C - bl sub_02022974 -_0226983C: - ldr r0, _02269870 ; =0x0000087C - add r7, r5, r0 - lsl r0, r4, #2 - str r0, [sp, #4] - ldr r0, [r7, r0] - cmp r0, #0 - beq _0226984E - bl sub_02022974 -_0226984E: - ldr r0, [sp, #4] - ldr r2, _02269874 ; =0x00010550 - ldr r1, [sp] - str r6, [r7, r0] - add r2, r1, r2 - ldrb r1, [r6] - mov r0, #0x78 - add r5, #0xc - mul r0, r4 - lsl r1, r1, #4 - add r0, r5, r0 - add r1, r2, r1 - bl sub_02017258 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02269870: .word 0x0000087C -_02269874: .word 0x00010550 - thumb_func_end ov70_02269828 - - thumb_func_start ov70_02269878 -ov70_02269878: ; 0x02269878 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r2, #0 - str r0, [sp] - lsl r7, r5, #2 - add r0, r1, #0 - str r1, [sp, #4] - add r1, r0, r7 - ldr r0, _022699AC ; =0x0000087C - ldr r0, [r1, r0] - cmp r0, #0 - bne _02269894 - bl sub_02022974 -_02269894: - mov r0, #0x78 - add r6, r5, #0 - mul r6, r0 - ldr r0, [sp, #4] - add r0, #0xc - add r0, r0, r6 - bl sub_0201734C - cmp r0, #0 - beq _022699A6 - ldr r0, [sp, #4] - add r1, r0, r7 - ldr r0, _022699AC ; =0x0000087C - ldr r2, [r1, r0] - ldr r0, _022699B0 ; =0x00010550 - ldrb r3, [r2] - ldr r1, [sp] - add r1, r1, r0 - lsl r3, r3, #4 - add r1, r1, r3 - str r1, [sp, #0xc] - ldrb r1, [r2, #1] - add r0, #0xf0 - lsl r2, r1, #2 - ldr r1, [sp] - add r1, r1, r2 - ldr r0, [r1, r0] - bl sub_020B3C1C - ldr r1, [sp, #0xc] - mov r2, #0 - str r0, [r1, #0xc] - add r0, r1, #0 - ldr r0, [r0, #8] - ldr r1, [r1, #0xc] - add r3, r2, #0 - bl sub_020AED78 - cmp r0, #0 - bne _022698E8 - bl sub_02022974 -_022698E8: - ldr r0, [sp, #0xc] - ldr r1, [sp, #0xc] - mov r2, #0 - ldr r0, [r0, #8] - ldr r1, [r1, #0xc] - add r3, r2, #0 - bl sub_020AF09C - cmp r0, #0 - bne _02269900 - bl sub_02022974 -_02269900: - ldr r0, [sp, #4] - lsl r1, r5, #3 - add r5, r0, r1 - add r0, r0, r7 - str r0, [sp, #8] - ldr r0, [sp, #4] - ldr r1, _022699B4 ; =0x000106DC - str r0, [sp, #0x10] - add r0, #0xc - str r0, [sp, #0x10] - ldr r0, [sp] - mov r4, #0 - add r7, r0, r1 -_0226991A: - ldr r1, [sp, #8] - ldr r0, _022699AC ; =0x0000087C - ldr r0, [r1, r0] - add r0, r0, r4 - ldrb r1, [r0, #2] - cmp r1, #0x11 - beq _0226994E - mov r0, #0x14 - mul r0, r1 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x14] - add r0, r0, r6 - add r1, r7, r1 - bl sub_0201727C - ldr r1, _022699B8 ; =0x000008C4 - ldr r0, [sp, #0x14] - ldr r1, [r5, r1] - add r0, r7, r0 - bl sub_02017240 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0226991A -_0226994E: - ldr r0, [sp, #0xc] - ldr r1, [sp, #4] - ldr r0, [r0, #8] - ldr r1, [r1, #4] - bl sub_020B3724 - ldr r0, [sp, #4] - add r0, #0xc - str r0, [sp, #4] - add r0, r0, r6 - bl sub_02017294 - ldr r1, _022699B4 ; =0x000106DC - ldr r0, [sp] - ldr r7, _022699AC ; =0x0000087C - mov r4, #0 - add r5, r0, r1 -_02269970: - ldr r0, [sp, #8] - ldr r0, [r0, r7] - add r0, r0, r4 - ldrb r1, [r0, #2] - cmp r1, #0x11 - beq _02269990 - ldr r0, [sp, #4] - mov r2, #0x14 - mul r2, r1 - add r0, r0, r6 - add r1, r5, r2 - bl sub_02017288 - add r4, r4, #1 - cmp r4, #2 - blt _02269970 -_02269990: - ldr r0, [sp, #0xc] - ldr r0, [r0, #8] - bl sub_020AEE28 - ldr r0, [sp, #0xc] - ldr r0, [r0, #8] - bl sub_020AF164 - ldr r0, [sp, #0xc] - mov r1, #0 - str r1, [r0, #0xc] -_022699A6: - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_022699AC: .word 0x0000087C -_022699B0: .word 0x00010550 -_022699B4: .word 0x000106DC -_022699B8: .word 0x000008C4 - thumb_func_end ov70_02269878 - - thumb_func_start ov70_022699BC -ov70_022699BC: ; 0x022699BC - push {r3, r4, lr} - sub sp, #4 - mov r4, #2 - lsl r4, r4, #0xc - str r4, [sp] - bl ov70_022699E4 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_022699BC - - thumb_func_start ov70_022699D0 -ov70_022699D0: ; 0x022699D0 - push {r3, r4, lr} - sub sp, #4 - mov r4, #2 - lsl r4, r4, #0xc - str r4, [sp] - bl ov70_02269A3C - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov70_022699D0 - - thumb_func_start ov70_022699E4 -ov70_022699E4: ; 0x022699E4 - push {r4, r5, r6, lr} - add r4, r1, #0 - ldr r1, _02269A30 ; =0x000106DC - add r6, r2, #0 - add r0, r0, r1 - lsl r1, r6, #2 - add r2, r4, r1 - ldr r1, _02269A34 ; =0x0000087C - add r5, r3, #0 - ldr r1, [r2, r1] - add r1, r1, r5 - ldrb r2, [r1, #2] - mov r1, #0x14 - mul r1, r2 - add r0, r0, r1 - bl sub_0201724C - add r1, r0, #0 - ldr r0, _02269A38 ; =0x000008C4 - lsl r2, r6, #3 - add r0, r4, r0 - add r4, r0, r2 - lsl r5, r5, #2 - ldr r2, [r4, r5] - ldr r0, [sp, #0x10] - add r0, r0, r2 - cmp r0, r1 - bge _02269A20 - str r0, [r4, r5] - pop {r4, r5, r6, pc} -_02269A20: - mov r0, #2 - lsl r0, r0, #0xc - add r0, r2, r0 - bl sub_020E1F6C - str r1, [r4, r5] - pop {r4, r5, r6, pc} - nop -_02269A30: .word 0x000106DC -_02269A34: .word 0x0000087C -_02269A38: .word 0x000008C4 - thumb_func_end ov70_022699E4 - - thumb_func_start ov70_02269A3C -ov70_02269A3C: ; 0x02269A3C - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _02269A84 ; =0x000106DC - add r4, r2, #0 - add r0, r0, r1 - lsl r1, r4, #2 - add r2, r5, r1 - ldr r1, _02269A88 ; =0x0000087C - add r6, r3, #0 - ldr r1, [r2, r1] - add r1, r1, r6 - ldrb r2, [r1, #2] - mov r1, #0x14 - mul r1, r2 - add r0, r0, r1 - bl sub_0201724C - ldr r3, _02269A8C ; =0x000008C4 - lsl r1, r4, #3 - add r2, r5, r3 - add r2, r2, r1 - lsl r1, r6, #2 - ldr r5, [sp, #0x10] - ldr r4, [r2, r1] - add r4, r5, r4 - cmp r4, r0 - bge _02269A78 - str r4, [r2, r1] - mov r0, #0 - pop {r4, r5, r6, pc} -_02269A78: - sub r3, #0xc4 - sub r0, r0, r3 - str r0, [r2, r1] - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_02269A84: .word 0x000106DC -_02269A88: .word 0x0000087C -_02269A8C: .word 0x000008C4 - thumb_func_end ov70_02269A3C - - thumb_func_start ov70_02269A90 -ov70_02269A90: ; 0x02269A90 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r1, _02269ADC ; =0x000106DC - add r4, r2, #0 - add r0, r0, r1 - lsl r1, r4, #2 - add r2, r5, r1 - ldr r1, _02269AE0 ; =0x0000087C - add r6, r3, #0 - ldr r1, [r2, r1] - add r1, r1, r6 - ldrb r2, [r1, #2] - mov r1, #0x14 - mul r1, r2 - add r0, r0, r1 - bl sub_0201724C - ldr r1, [sp, #0x10] - cmp r0, r1 - bge _02269ACC - mov r1, #2 - lsl r2, r4, #3 - lsl r1, r1, #0xa - add r3, r5, r2 - lsl r2, r6, #2 - sub r0, r0, r1 - add r2, r3, r2 - add r1, #0xc4 - str r0, [r2, r1] - pop {r4, r5, r6, pc} -_02269ACC: - lsl r0, r4, #3 - add r2, r5, r0 - lsl r0, r6, #2 - add r2, r2, r0 - ldr r0, _02269AE4 ; =0x000008C4 - str r1, [r2, r0] - pop {r4, r5, r6, pc} - nop -_02269ADC: .word 0x000106DC -_02269AE0: .word 0x0000087C -_02269AE4: .word 0x000008C4 - thumb_func_end ov70_02269A90 - - thumb_func_start ov70_02269AE8 -ov70_02269AE8: ; 0x02269AE8 - push {r4, lr} - lsl r2, r2, #2 - add r2, r1, r2 - ldr r1, _02269B08 ; =0x0000087C - ldr r4, _02269B0C ; =0x000106DC - ldr r1, [r2, r1] - add r0, r0, r4 - add r1, r1, r3 - ldrb r2, [r1, #2] - mov r1, #0x14 - mul r1, r2 - add r0, r0, r1 - bl sub_02017248 - pop {r4, pc} - nop -_02269B08: .word 0x0000087C -_02269B0C: .word 0x000106DC - thumb_func_end ov70_02269AE8 - - thumb_func_start ov70_02269B10 -ov70_02269B10: ; 0x02269B10 - ldr r3, _02269B18 ; =ov70_0226B92C - mov r2, #1 - bx r3 - nop -_02269B18: .word ov70_0226B92C - thumb_func_end ov70_02269B10 - - thumb_func_start ov70_02269B1C -ov70_02269B1C: ; 0x02269B1C - ldr r3, _02269B24 ; =ov70_0226B92C - mov r2, #2 - bx r3 - nop -_02269B24: .word ov70_0226B92C - thumb_func_end ov70_02269B1C - - thumb_func_start ov70_02269B28 -ov70_02269B28: ; 0x02269B28 - ldr r3, _02269B30 ; =ov70_0226B92C - mov r2, #3 - bx r3 - nop -_02269B30: .word ov70_0226B92C - thumb_func_end ov70_02269B28 - - thumb_func_start ov70_02269B34 -ov70_02269B34: ; 0x02269B34 - ldr r3, _02269B3C ; =ov70_0226BAC8 - mov r2, #1 - bx r3 - nop -_02269B3C: .word ov70_0226BAC8 - thumb_func_end ov70_02269B34 - - thumb_func_start ov70_02269B40 -ov70_02269B40: ; 0x02269B40 - ldr r3, _02269B48 ; =ov70_0226BAC8 - mov r2, #2 - bx r3 - nop -_02269B48: .word ov70_0226BAC8 - thumb_func_end ov70_02269B40 - - thumb_func_start ov70_02269B4C -ov70_02269B4C: ; 0x02269B4C - ldr r3, _02269B54 ; =ov70_0226BAC8 - mov r2, #3 - bx r3 - nop -_02269B54: .word ov70_0226BAC8 - thumb_func_end ov70_02269B4C - - thumb_func_start ov70_02269B58 -ov70_02269B58: ; 0x02269B58 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r7, r1, #0 - add r5, r7, #0 - str r0, [sp] - mov r4, #0 - add r5, #0xc -_02269B66: - add r3, r4, #3 - lsl r6, r3, #2 - ldr r3, _02269BB0 ; =0x0226E5A4 - ldr r0, [sp] - add r1, r7, #0 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - ldr r0, [r7, #8] - add r1, sp, #4 - bl ov70_0225D054 - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r2, r1, r0 - ldr r1, [sp, #4] - ldr r3, [sp, #0xc] - add r0, r5, #0 - str r2, [sp, #8] - bl sub_02017350 - add r0, r5, #0 - mov r1, #0 - bl sub_02017348 - add r4, r4, #1 - add r5, #0x78 - cmp r4, #3 - blt _02269B66 - ldr r0, _02269BB4 ; =0x00000954 - mov r1, #0xff - str r1, [r7, r0] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_02269BB0: .word 0x0226E5A4 -_02269BB4: .word 0x00000954 - thumb_func_end ov70_02269B58 - - thumb_func_start ov70_02269BB8 -ov70_02269BB8: ; 0x02269BB8 - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _02269CE8 ; =0x0226E5C8 - mov r2, #1 - add r5, r0, #0 - add r4, r1, #0 - bl ov70_02269828 - ldr r3, _02269CEC ; =0x0226E5D4 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_02269828 - add r0, r4, #0 - add r0, #0x84 - mov r1, #0 - bl sub_02017348 - ldr r0, [r4, #8] - add r1, sp, #0xc - bl ov70_0225D054 - mov r2, #1 - ldr r0, [sp, #0x10] - lsl r2, r2, #0x10 - add r0, r0, r2 - str r0, [sp, #0x10] - ldr r1, [sp, #0xc] - lsr r0, r2, #1 - add r0, r1, r0 - add r5, sp, #0xc - str r0, [sp, #0xc] - ldmia r5!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #8 - str r0, [r3, #0] - ldr r0, [sp, #4] - add r0, r0, r2 - str r0, [sp, #4] - ldr r0, _02269CF0 ; =0x00000958 - str r1, [r4, r0] - ldr r0, [r4, #8] - mov r1, #6 - bl ov70_0225CD60 - cmp r0, #3 - bhi _02269CC8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02269C28: ; jump table - .short _02269C30 - _02269C28 - 2 ; case 0 - .short _02269C50 - _02269C28 - 2 ; case 1 - .short _02269C72 - _02269C28 - 2 ; case 2 - .short _02269C9E - _02269C28 - 2 ; case 3 -_02269C30: - mov r0, #7 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - sub r1, r1, r0 - str r1, [sp, #0x14] - ldr r1, [sp, #8] - lsr r0, r0, #1 - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _02269CF4 ; =0x0000BFFF - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - b _02269CC8 -_02269C50: - mov r0, #6 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x14] - mov r0, #0xb - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _02269CF8 ; =0x00003FFF - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - b _02269CC8 -_02269C72: - mov r0, #0x17 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp] - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x84 - mov r1, #0 - mov r2, #1 - bl sub_02017388 - b _02269CC8 -_02269C9E: - mov r0, #0x17 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [sp] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - mov r1, #2 - ldr r0, [sp, #8] - lsl r1, r1, #0xe - add r0, r0, r1 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0x84 - sub r1, r1, #1 - mov r2, #1 - bl sub_02017388 -_02269CC8: - add r0, r4, #0 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0x84 - bl sub_02017350 - add r4, #0xc - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl sub_02017350 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02269CE8: .word 0x0226E5C8 -_02269CEC: .word 0x0226E5D4 -_02269CF0: .word 0x00000958 -_02269CF4: .word 0x0000BFFF -_02269CF8: .word 0x00003FFF - thumb_func_end ov70_02269BB8 - - thumb_func_start ov70_02269CFC -ov70_02269CFC: ; 0x02269CFC - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _02269F00 ; =0x0226E5C8 - mov r2, #1 - add r5, r0, #0 - add r4, r1, #0 - bl ov70_02269828 - ldr r3, _02269F04 ; =0x0226E5D4 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_02269828 - ldr r3, _02269F08 ; =0x0226E5CC - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov70_02269828 - add r0, r4, #0 - add r0, #0x84 - mov r1, #0 - bl sub_02017348 - ldr r0, [r4, #8] - add r1, sp, #0xc - bl ov70_0225D054 - mov r2, #1 - ldr r0, [sp, #0x10] - lsl r2, r2, #0x10 - add r0, r0, r2 - str r0, [sp, #0x10] - ldr r1, [sp, #0xc] - lsr r0, r2, #1 - add r0, r1, r0 - add r5, sp, #0xc - str r0, [sp, #0xc] - ldmia r5!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #8 - str r0, [r3, #0] - ldr r0, [sp, #4] - add r0, r0, r2 - str r0, [sp, #4] - ldr r0, _02269F0C ; =0x00000958 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] - ldr r0, [r4, #8] - mov r1, #6 - bl ov70_0225CD60 - cmp r0, #3 - bls _02269D72 - b _02269EEE -_02269D72: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02269D7E: ; jump table - .short _02269D86 - _02269D7E - 2 ; case 0 - .short _02269DDA - _02269D7E - 2 ; case 1 - .short _02269E30 - _02269D7E - 2 ; case 2 - .short _02269E90 - _02269D7E - 2 ; case 3 -_02269D86: - mov r0, #7 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - sub r1, r1, r0 - str r1, [sp, #0x14] - ldr r1, [sp, #8] - lsr r0, r0, #1 - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _02269F10 ; =0x0000A38D - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _02269F14 ; =0x0000DC70 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - add r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0x84 - bl sub_02017350 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - sub r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0xfc - bl sub_02017350 - b _02269EEE -_02269DDA: - mov r0, #6 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x14] - mov r0, #0xb - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _02269F18 ; =0x0000238E - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _02269F1C ; =0x00005C71 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - sub r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0x84 - bl sub_02017350 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - add r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0xfc - bl sub_02017350 - b _02269EEE -_02269E30: - mov r0, #0x17 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp] - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _02269F20 ; =0x0000E38F - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _02269F24 ; =0x00001C71 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0x84 - sub r3, r5, r3 - bl sub_02017350 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0xfc - add r3, r5, r3 - bl sub_02017350 - b _02269EEE -_02269E90: - mov r0, #0x17 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [sp] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _02269F28 ; =0x0000638D - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _02269F2C ; =0x00009C71 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0x84 - add r3, r5, r3 - bl sub_02017350 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0xfc - sub r3, r5, r3 - bl sub_02017350 -_02269EEE: - add r4, #0xc - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl sub_02017350 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02269F00: .word 0x0226E5C8 -_02269F04: .word 0x0226E5D4 -_02269F08: .word 0x0226E5CC -_02269F0C: .word 0x00000958 -_02269F10: .word 0x0000A38D -_02269F14: .word 0x0000DC70 -_02269F18: .word 0x0000238E -_02269F1C: .word 0x00005C71 -_02269F20: .word 0x0000E38F -_02269F24: .word 0x00001C71 -_02269F28: .word 0x0000638D -_02269F2C: .word 0x00009C71 - thumb_func_end ov70_02269CFC - - thumb_func_start ov70_02269F30 -ov70_02269F30: ; 0x02269F30 - push {r3, r4, r5, lr} - sub sp, #0x18 - ldr r3, _0226A1BC ; =0x0226E5C8 - mov r2, #1 - add r5, r0, #0 - add r4, r1, #0 - bl ov70_02269828 - ldr r3, _0226A1C0 ; =0x0226E5D4 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_02269828 - ldr r3, _0226A1C4 ; =0x0226E5CC - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov70_02269828 - ldr r3, _0226A1C8 ; =0x0226E5D0 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #3 - bl ov70_02269828 - add r0, r4, #0 - add r0, #0x84 - mov r1, #0 - bl sub_02017348 - ldr r1, _0226A1CC ; =0x00000958 - mov r2, #8 - str r2, [r4, r1] - add r0, r1, #4 - str r2, [r4, r0] - add r1, #8 - str r2, [r4, r1] - ldr r0, [r4, #8] - add r1, sp, #0xc - bl ov70_0225D054 - mov r2, #1 - ldr r0, [sp, #0x10] - lsl r2, r2, #0x10 - add r0, r0, r2 - str r0, [sp, #0x10] - ldr r1, [sp, #0xc] - lsr r0, r2, #1 - add r0, r1, r0 - add r5, sp, #0xc - str r0, [sp, #0xc] - ldmia r5!, {r0, r1} - add r3, sp, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #6 - str r0, [r3, #0] - ldr r0, [sp, #4] - add r0, r0, r2 - str r0, [sp, #4] - ldr r0, [r4, #8] - bl ov70_0225CD60 - cmp r0, #3 - bls _02269FB6 - b _0226A1AA -_02269FB6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02269FC2: ; jump table - .short _02269FCA - _02269FC2 - 2 ; case 0 - .short _0226A03C - _02269FC2 - 2 ; case 1 - .short _0226A0B0 - _02269FC2 - 2 ; case 2 - .short _0226A12E - _02269FC2 - 2 ; case 3 -_02269FCA: - mov r0, #7 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - sub r1, r1, r0 - str r1, [sp, #0x14] - ldr r1, [sp, #8] - lsr r0, r0, #1 - sub r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _0226A1D0 ; =0x0000A38D - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _0226A1D4 ; =0x0000DC70 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, _0226A1D8 ; =0x0000BFFF - add r0, r4, r0 - mov r2, #1 - bl sub_02017388 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - add r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0x84 - bl sub_02017350 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - sub r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0xfc - bl sub_02017350 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, r4, r0 - bl sub_02017350 - b _0226A1AA -_0226A03C: - mov r0, #6 - ldr r1, [sp, #0x14] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0x14] - mov r0, #0xb - ldr r1, [sp, #8] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _0226A1DC ; =0x0000238E - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _0226A1E0 ; =0x00005C71 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, _0226A1E4 ; =0x00003FFF - add r0, r4, r0 - mov r2, #1 - bl sub_02017388 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - sub r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0x84 - bl sub_02017350 - mov r1, #2 - add r0, r4, #0 - ldr r2, [sp, #0xc] - lsl r1, r1, #0xe - add r1, r2, r1 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, #0xfc - bl sub_02017350 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, r4, r0 - bl sub_02017350 - b _0226A1AA -_0226A0B0: - mov r0, #0x17 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp] - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _0226A1E8 ; =0x0000E38F - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _0226A1EC ; =0x00001C71 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r0, #0x5d - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - mov r2, #1 - bl sub_02017388 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0x84 - sub r3, r5, r3 - bl sub_02017350 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0xfc - add r3, r5, r3 - bl sub_02017350 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, r4, r0 - bl sub_02017350 - b _0226A1AA -_0226A12E: - mov r0, #0x17 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #0xc] - mov r0, #7 - ldr r1, [sp] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - mov r0, #2 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #8] - add r0, r4, #0 - ldr r1, _0226A1F0 ; =0x0000638D - add r0, #0x84 - mov r2, #1 - bl sub_02017388 - add r0, r4, #0 - ldr r1, _0226A1F4 ; =0x00009C71 - add r0, #0xfc - mov r2, #1 - bl sub_02017388 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, _0226A1F8 ; =0x00007FFF - add r0, r4, r0 - mov r2, #1 - bl sub_02017388 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0x84 - add r3, r5, r3 - bl sub_02017350 - mov r3, #2 - add r0, r4, #0 - ldr r5, [sp, #0x14] - lsl r3, r3, #0xe - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - add r0, #0xfc - sub r3, r5, r3 - bl sub_02017350 - mov r0, #0x5d - lsl r0, r0, #2 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - add r0, r4, r0 - bl sub_02017350 -_0226A1AA: - add r4, #0xc - ldr r1, [sp] - ldr r2, [sp, #4] - ldr r3, [sp, #8] - add r0, r4, #0 - bl sub_02017350 - add sp, #0x18 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0226A1BC: .word 0x0226E5C8 -_0226A1C0: .word 0x0226E5D4 -_0226A1C4: .word 0x0226E5CC -_0226A1C8: .word 0x0226E5D0 -_0226A1CC: .word 0x00000958 -_0226A1D0: .word 0x0000A38D -_0226A1D4: .word 0x0000DC70 -_0226A1D8: .word 0x0000BFFF -_0226A1DC: .word 0x0000238E -_0226A1E0: .word 0x00005C71 -_0226A1E4: .word 0x00003FFF -_0226A1E8: .word 0x0000E38F -_0226A1EC: .word 0x00001C71 -_0226A1F0: .word 0x0000638D -_0226A1F4: .word 0x00009C71 -_0226A1F8: .word 0x00007FFF - thumb_func_end ov70_02269F30 - - thumb_func_start ov70_0226A1FC -ov70_0226A1FC: ; 0x0226A1FC - ldr r3, _0226A204 ; =ov70_0226A9D0 - mov r2, #1 - bx r3 - nop -_0226A204: .word ov70_0226A9D0 - thumb_func_end ov70_0226A1FC - - thumb_func_start ov70_0226A208 -ov70_0226A208: ; 0x0226A208 - ldr r3, _0226A210 ; =ov70_0226A9D0 - mov r2, #2 - bx r3 - nop -_0226A210: .word ov70_0226A9D0 - thumb_func_end ov70_0226A208 - - thumb_func_start ov70_0226A214 -ov70_0226A214: ; 0x0226A214 - ldr r3, _0226A21C ; =ov70_0226A9D0 - mov r2, #3 - bx r3 - nop -_0226A21C: .word ov70_0226A9D0 - thumb_func_end ov70_0226A214 - - thumb_func_start ov70_0226A220 -ov70_0226A220: ; 0x0226A220 - ldr r3, _0226A228 ; =ov70_0226B7B0 - mov r2, #1 - bx r3 - nop -_0226A228: .word ov70_0226B7B0 - thumb_func_end ov70_0226A220 - - thumb_func_start ov70_0226A22C -ov70_0226A22C: ; 0x0226A22C - ldr r3, _0226A234 ; =ov70_0226B7B0 - mov r2, #2 - bx r3 - nop -_0226A234: .word ov70_0226B7B0 - thumb_func_end ov70_0226A22C - - thumb_func_start ov70_0226A238 -ov70_0226A238: ; 0x0226A238 - ldr r3, _0226A240 ; =ov70_0226B7B0 - mov r2, #4 - bx r3 - nop -_0226A240: .word ov70_0226B7B0 - thumb_func_end ov70_0226A238 - - thumb_func_start ov70_0226A244 -ov70_0226A244: ; 0x0226A244 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A284 ; =0x0226E640 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A250: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A288 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A250 - mov r0, #0 - str r0, [sp] - ldr r0, _0226A28C ; =0x00000954 - ldr r1, _0226A290 ; =0x0226E2EC - add r0, r7, r0 - mov r2, #2 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A284: .word 0x0226E640 -_0226A288: .word 0x0226E5A4 -_0226A28C: .word 0x00000954 -_0226A290: .word 0x0226E2EC - thumb_func_end ov70_0226A244 - - thumb_func_start ov70_0226A294 -ov70_0226A294: ; 0x0226A294 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A2D4 ; =0x0226E650 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A2A0: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A2D8 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A2A0 - mov r0, #0 - str r0, [sp] - ldr r0, _0226A2DC ; =0x00000954 - ldr r1, _0226A2E0 ; =0x0226E304 - add r0, r7, r0 - mov r2, #2 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A2D4: .word 0x0226E650 -_0226A2D8: .word 0x0226E5A4 -_0226A2DC: .word 0x00000954 -_0226A2E0: .word 0x0226E304 - thumb_func_end ov70_0226A294 - - thumb_func_start ov70_0226A2E4 -ov70_0226A2E4: ; 0x0226A2E4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A324 ; =0x0226E660 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A2F0: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A328 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A2F0 - mov r0, #0 - str r0, [sp] - ldr r0, _0226A32C ; =0x00000954 - ldr r1, _0226A330 ; =0x0226E34C - add r0, r7, r0 - mov r2, #3 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A324: .word 0x0226E660 -_0226A328: .word 0x0226E5A4 -_0226A32C: .word 0x00000954 -_0226A330: .word 0x0226E34C - thumb_func_end ov70_0226A2E4 - - thumb_func_start ov70_0226A334 -ov70_0226A334: ; 0x0226A334 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A374 ; =0x0226E640 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A340: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A378 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A340 - mov r0, #1 - str r0, [sp] - ldr r0, _0226A37C ; =0x00000954 - ldr r1, _0226A380 ; =0x0226E2FC - add r0, r7, r0 - mov r2, #2 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A374: .word 0x0226E640 -_0226A378: .word 0x0226E5A4 -_0226A37C: .word 0x00000954 -_0226A380: .word 0x0226E2FC - thumb_func_end ov70_0226A334 - - thumb_func_start ov70_0226A384 -ov70_0226A384: ; 0x0226A384 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A3C4 ; =0x0226E650 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A390: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A3C8 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A390 - mov r0, #1 - str r0, [sp] - ldr r0, _0226A3CC ; =0x00000954 - ldr r1, _0226A3D0 ; =0x0226E334 - add r0, r7, r0 - mov r2, #3 - mov r3, #0x29 - str r7, [sp, #4] - bl ov70_0226BC40 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A3C4: .word 0x0226E650 -_0226A3C8: .word 0x0226E5A4 -_0226A3CC: .word 0x00000954 -_0226A3D0: .word 0x0226E334 - thumb_func_end ov70_0226A384 - - thumb_func_start ov70_0226A3D4 -ov70_0226A3D4: ; 0x0226A3D4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A414 ; =0x0226E660 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A3E0: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A418 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A3E0 - mov r0, #1 - str r0, [sp] - ldr r0, _0226A41C ; =0x00000954 - ldr r1, _0226A420 ; =0x0226E358 - add r0, r7, r0 - mov r2, #3 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A414: .word 0x0226E660 -_0226A418: .word 0x0226E5A4 -_0226A41C: .word 0x00000954 -_0226A420: .word 0x0226E358 - thumb_func_end ov70_0226A3D4 - - thumb_func_start ov70_0226A424 -ov70_0226A424: ; 0x0226A424 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A468 ; =0x0226E640 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A430: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A46C ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A430 - ldr r0, _0226A470 ; =0x00000954 - mov r2, #2 - str r2, [sp] - ldr r1, _0226A474 ; =0x0226E314 - add r0, r7, r0 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - ldr r0, [sp, #8] - add r1, r7, #0 - bl ov70_0226BB34 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A468: .word 0x0226E640 -_0226A46C: .word 0x0226E5A4 -_0226A470: .word 0x00000954 -_0226A474: .word 0x0226E314 - thumb_func_end ov70_0226A424 - - thumb_func_start ov70_0226A478 -ov70_0226A478: ; 0x0226A478 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A4BC ; =0x0226E650 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A484: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A4C0 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A484 - ldr r0, _0226A4C4 ; =0x00000954 - mov r2, #2 - str r2, [sp] - ldr r1, _0226A4C8 ; =0x0226E2F4 - add r0, r7, r0 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - ldr r0, [sp, #8] - add r1, r7, #0 - bl ov70_0226BB34 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A4BC: .word 0x0226E650 -_0226A4C0: .word 0x0226E5A4 -_0226A4C4: .word 0x00000954 -_0226A4C8: .word 0x0226E2F4 - thumb_func_end ov70_0226A478 - - thumb_func_start ov70_0226A4CC -ov70_0226A4CC: ; 0x0226A4CC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r5, _0226A510 ; =0x0226E660 - str r0, [sp, #8] - add r7, r1, #0 - mov r4, #0 -_0226A4D8: - ldrb r3, [r5] - ldr r0, [sp, #8] - add r1, r7, #0 - lsl r6, r3, #2 - ldr r3, _0226A514 ; =0x0226E5A4 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - add r4, r4, #1 - add r5, r5, #1 - cmp r4, #0x10 - blt _0226A4D8 - ldr r0, _0226A518 ; =0x00000954 - mov r2, #2 - str r2, [sp] - ldr r1, _0226A51C ; =0x0226E30C - add r0, r7, r0 - mov r3, #0x21 - str r7, [sp, #4] - bl ov70_0226BC40 - ldr r0, [sp, #8] - add r1, r7, #0 - bl ov70_0226BB34 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226A510: .word 0x0226E660 -_0226A514: .word 0x0226E5A4 -_0226A518: .word 0x00000954 -_0226A51C: .word 0x0226E30C - thumb_func_end ov70_0226A4CC - - thumb_func_start ov70_0226A520 -ov70_0226A520: ; 0x0226A520 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #4] - add r5, r1, #0 - mov r0, #2 - ldrsh r0, [r5, r0] - add r0, r0, #1 - cmp r0, #0x36 - bgt _0226A534 - strh r0, [r5, #2] -_0226A534: - mov r0, #2 - ldrsh r1, [r5, r0] - mov r0, #6 - mul r0, r1 - mov r1, #0x36 - bl sub_020E1F6C - add r6, r0, #0 - ldr r0, _0226A5E8 ; =0x00000955 - ldrsb r4, [r5, r0] - cmp r4, r6 - bhs _0226A572 - add r7, r5, #0 - add r7, #0xc -_0226A550: - add r0, r4, #0 - mov r1, #3 - bl sub_020E1F6C - ldr r0, _0226A5EC ; =0x00000954 - ldrsb r0, [r5, r0] - cmp r1, r0 - bhs _0226A56C - mov r0, #0x78 - mul r0, r1 - add r0, r7, r0 - mov r1, #1 - bl sub_02017348 -_0226A56C: - add r4, r4, #1 - cmp r4, r6 - blo _0226A550 -_0226A572: - ldr r1, _0226A5E8 ; =0x00000955 - mov r0, #1 - str r0, [sp, #8] - strb r6, [r5, r1] - sub r0, r1, #1 - ldrsb r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - ble _0226A5CC - add r7, r5, #0 - add r7, #0xc - add r6, r7, #0 -_0226A58A: - add r0, r7, #0 - bl sub_0201734C - cmp r0, #1 - bne _0226A5BE - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov70_022699D0 - str r0, [sp, #8] - cmp r0, #0 - beq _0226A5BE - add r0, r6, #0 - mov r1, #0 - bl sub_02017348 - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov70_02269A90 -_0226A5BE: - ldr r0, _0226A5EC ; =0x00000954 - add r4, r4, #1 - ldrsb r0, [r5, r0] - add r7, #0x78 - add r6, #0x78 - cmp r4, r0 - blt _0226A58A -_0226A5CC: - ldr r0, _0226A5E8 ; =0x00000955 - ldrsb r0, [r5, r0] - cmp r0, #6 - blt _0226A5E0 - ldr r0, [sp, #8] - cmp r0, #1 - bne _0226A5E0 - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0226A5E0: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A5E8: .word 0x00000955 -_0226A5EC: .word 0x00000954 - thumb_func_end ov70_0226A520 - - thumb_func_start ov70_0226A5F0 -ov70_0226A5F0: ; 0x0226A5F0 - ldr r3, _0226A5F8 ; =ov70_0226B998 - mov r2, #0 - bx r3 - nop -_0226A5F8: .word ov70_0226B998 - thumb_func_end ov70_0226A5F0 - - thumb_func_start ov70_0226A5FC -ov70_0226A5FC: ; 0x0226A5FC - ldr r3, _0226A604 ; =ov70_0226B998 - mov r2, #1 - bx r3 - nop -_0226A604: .word ov70_0226B998 - thumb_func_end ov70_0226A5FC - - thumb_func_start ov70_0226A608 -ov70_0226A608: ; 0x0226A608 - ldr r3, _0226A610 ; =ov70_0226B998 - mov r2, #2 - bx r3 - nop -_0226A610: .word ov70_0226B998 - thumb_func_end ov70_0226A608 - - thumb_func_start ov70_0226A614 -ov70_0226A614: ; 0x0226A614 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r1, #0 - mov r0, #2 - ldrsh r1, [r5, r0] - lsl r0, r1, #1 - add r1, r1, r0 - asr r0, r1, #4 - lsr r0, r0, #0x1b - add r0, r1, r0 - asr r4, r0, #5 - ldr r0, _0226A6C0 ; =0x00000954 - ldrsh r1, [r5, r0] - cmp r4, r1 - beq _0226A662 - strh r4, [r5, r0] - add r0, r0, #2 - ldrsh r0, [r5, r0] - cmp r0, r4 - bls _0226A662 - cmp r4, #0 - beq _0226A652 - add r2, r5, #0 - sub r1, r4, #1 - mov r0, #0x78 - mul r0, r1 - add r2, #0xc - add r0, r2, r0 - mov r1, #0 - bl sub_02017348 -_0226A652: - add r1, r5, #0 - mov r0, #0x78 - add r1, #0xc - mul r0, r4 - add r0, r1, r0 - mov r1, #1 - bl sub_02017348 -_0226A662: - mov r0, #2 - ldrsh r0, [r5, r0] - cmp r0, #0x20 - bge _0226A66E - add r0, r0, #1 - strh r0, [r5, #2] -_0226A66E: - ldr r0, _0226A6C4 ; =0x00000956 - mov r4, #0 - ldrsh r0, [r5, r0] - str r4, [sp] - cmp r0, #0 - ble _0226A6BA - add r6, r5, #0 - add r6, #0xc -_0226A67E: - add r0, r6, #0 - bl sub_0201734C - cmp r0, #0 - beq _0226A6AE - ldr r0, _0226A6C4 ; =0x00000956 - ldrsh r0, [r5, r0] - sub r0, r0, #1 - cmp r4, r0 - bne _0226A6A2 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov70_022699D0 - str r0, [sp] - b _0226A6AE -_0226A6A2: - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov70_022699BC -_0226A6AE: - ldr r0, _0226A6C4 ; =0x00000956 - add r4, r4, #1 - ldrsh r0, [r5, r0] - add r6, #0x78 - cmp r4, r0 - blt _0226A67E -_0226A6BA: - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - nop -_0226A6C0: .word 0x00000954 -_0226A6C4: .word 0x00000956 - thumb_func_end ov70_0226A614 - - thumb_func_start ov70_0226A6C8 -ov70_0226A6C8: ; 0x0226A6C8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #4] - ldr r0, _0226A810 ; =0x0000087C - add r5, r1, #0 - ldr r0, [r5, r0] - ldrb r0, [r0, #2] - cmp r0, #0x11 - bne _0226A6DE - bl sub_02022974 -_0226A6DE: - ldr r0, _0226A814 ; =0x00000954 - ldr r1, [r5, r0] - cmp r1, #0 - ble _0226A6F6 - sub r1, r1, #1 - str r1, [r5, r0] - add r0, r5, #0 - add r0, #0xc - mov r1, #0 - bl sub_02017348 - b _0226A752 -_0226A6F6: - mov r0, #2 - ldrsh r1, [r5, r0] - cmp r1, #3 - bge _0226A752 - add r0, r5, #0 - add r1, r1, #1 - bl ov70_02269810 - cmp r0, #1 - bne _0226A752 - add r0, r5, #0 - add r0, #0xc - mov r1, #1 - bl sub_02017348 - mov r2, #0 - ldr r0, [sp, #4] - add r1, r5, #0 - add r3, r2, #0 - bl ov70_022699D0 - cmp r0, #1 - bne _0226A752 - mov r1, #2 - ldrsh r0, [r5, r1] - mov r2, #3 - add r0, r0, #1 - strh r0, [r5, #2] - ldr r0, _0226A814 ; =0x00000954 - str r2, [r5, r0] - ldrsh r0, [r5, r1] - cmp r0, #3 - bge _0226A748 - mov r2, #0 - ldr r0, [sp, #4] - add r1, r5, #0 - add r3, r2, #0 - str r2, [sp] - bl ov70_02269A90 - b _0226A752 -_0226A748: - add r0, r5, #0 - add r0, #0xc - mov r1, #0 - bl sub_02017348 -_0226A752: - add r7, r5, #0 - mov r4, #1 - add r7, #0xc - str r4, [sp, #8] - add r7, #0x78 - add r6, r5, #4 -_0226A75E: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02269810 - cmp r0, #1 - bne _0226A7FE - mov r0, #2 - ldrsh r1, [r5, r0] - sub r0, r4, #1 - cmp r1, r0 - ble _0226A7FA - add r0, r7, #0 - mov r1, #1 - bl sub_02017348 - mov r0, #0xa - lsl r0, r0, #0xa - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov70_02269A3C - cmp r0, #0 - bne _0226A798 - mov r0, #0 - str r0, [sp, #8] - b _0226A7FE -_0226A798: - sub r0, r4, #1 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, _0226A818 ; =0x00000958 - ldr r0, [r1, r0] - cmp r0, #0 - bne _0226A7C6 - add r0, r7, #0 - mov r1, #0 - bl sub_02017348 - ldr r0, _0226A810 ; =0x0000087C - ldr r0, [r6, r0] - ldrb r0, [r0] - lsl r1, r0, #4 - ldr r0, [sp, #4] - add r1, r0, r1 - ldr r0, _0226A81C ; =0x00010558 - ldr r0, [r1, r0] - mov r1, #0x1f - bl sub_020B3764 - b _0226A7FE -_0226A7C6: - ldr r0, _0226A818 ; =0x00000958 - ldr r0, [r1, r0] - sub r2, r0, #1 - ldr r0, _0226A818 ; =0x00000958 - str r2, [r1, r0] - sub r0, #0xdc - ldr r0, [r6, r0] - ldrb r0, [r0] - lsl r2, r0, #4 - ldr r0, [sp, #4] - add r2, r0, r2 - ldr r0, _0226A81C ; =0x00010558 - ldr r0, [r2, r0] - ldr r2, _0226A818 ; =0x00000958 - ldr r1, [r1, r2] - mov r2, #0x14 - mul r2, r1 - asr r1, r2, #2 - lsr r1, r1, #0x1d - add r1, r2, r1 - asr r1, r1, #3 - bl sub_020B3764 - mov r0, #0 - str r0, [sp, #8] - b _0226A7FE -_0226A7FA: - mov r0, #0 - str r0, [sp, #8] -_0226A7FE: - add r4, r4, #1 - add r7, #0x78 - add r6, r6, #4 - cmp r4, #3 - ble _0226A75E - ldr r0, [sp, #8] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226A810: .word 0x0000087C -_0226A814: .word 0x00000954 -_0226A818: .word 0x00000958 -_0226A81C: .word 0x00010558 - thumb_func_end ov70_0226A6C8 - - thumb_func_start ov70_0226A820 -ov70_0226A820: ; 0x0226A820 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r2, [r4, #1] - add r5, r0, #0 - cmp r2, #0 - beq _0226A832 - cmp r2, #1 - beq _0226A848 - b _0226A854 -_0226A832: - bl ov70_0226AC08 - cmp r0, #0 - beq _0226A854 - mov r0, #1 - strb r0, [r4, #1] - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226ADA0 - b _0226A854 -_0226A848: - bl ov70_0226AF60 - cmp r0, #0 - beq _0226A854 - mov r0, #1 - pop {r3, r4, r5, pc} -_0226A854: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0226A820 - - thumb_func_start ov70_0226A858 -ov70_0226A858: ; 0x0226A858 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, _0226A924 ; =0x00000955 - str r0, [sp] - add r0, r1, #1 - ldrsb r2, [r5, r1] - ldrb r0, [r5, r0] - cmp r2, r0 - bge _0226A8C4 - sub r0, r1, #1 - ldrsb r0, [r5, r0] - add r2, r0, #1 - sub r0, r1, #1 - strb r2, [r5, r0] - ldrsb r0, [r5, r0] - cmp r0, #8 - blt _0226A888 - mov r2, #0 - sub r0, r1, #1 - strb r2, [r5, r0] - ldrsb r0, [r5, r1] - add r0, r0, #1 - strb r0, [r5, r1] -_0226A888: - ldr r0, _0226A928 ; =0x00000954 - ldrsb r1, [r5, r0] - lsl r2, r1, #2 - asr r1, r2, #2 - lsr r1, r1, #0x1d - add r1, r2, r1 - asr r2, r1, #3 - add r1, r0, #1 - ldrsb r1, [r5, r1] - add r0, r0, #3 - ldrb r6, [r5, r0] - lsl r1, r1, #2 - add r7, r2, r1 - cmp r6, r7 - bhs _0226A8C0 - add r1, r5, #0 - mov r0, #0x78 - add r1, #0xc - mul r0, r6 - add r4, r1, r0 -_0226A8B0: - add r0, r4, #0 - mov r1, #1 - bl sub_02017348 - add r6, r6, #1 - add r4, #0x78 - cmp r6, r7 - blo _0226A8B0 -_0226A8C0: - ldr r0, _0226A92C ; =0x00000957 - strb r7, [r5, r0] -_0226A8C4: - ldr r0, _0226A92C ; =0x00000957 - mov r4, #0 - ldrb r0, [r5, r0] - cmp r0, #0 - ble _0226A904 - add r7, r5, #0 - add r7, #0xc - add r6, r7, #0 -_0226A8D4: - add r0, r7, #0 - bl sub_0201734C - cmp r0, #1 - bne _0226A8F6 - ldr r0, [sp] - add r1, r5, #0 - add r2, r4, #0 - bl ov70_0226B8C4 - str r0, [sp, #4] - cmp r0, #1 - bne _0226A8F6 - add r0, r6, #0 - mov r1, #0 - bl sub_02017348 -_0226A8F6: - ldr r0, _0226A92C ; =0x00000957 - add r4, r4, #1 - ldrb r0, [r5, r0] - add r7, #0x78 - add r6, #0x78 - cmp r4, r0 - blt _0226A8D4 -_0226A904: - ldr r0, _0226A924 ; =0x00000955 - ldrsb r1, [r5, r0] - add r0, r0, #1 - ldrb r0, [r5, r0] - cmp r1, r0 - bne _0226A91C - ldr r0, [sp, #4] - cmp r0, #1 - bne _0226A91C - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0226A91C: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226A924: .word 0x00000955 -_0226A928: .word 0x00000954 -_0226A92C: .word 0x00000957 - thumb_func_end ov70_0226A858 - - thumb_func_start ov70_0226A930 -ov70_0226A930: ; 0x0226A930 - push {r4, lr} - add r4, r1, #0 - mov r1, #2 - ldr r0, _0226A954 ; =0x00000954 - ldrsh r1, [r4, r1] - add r0, r4, r0 - bl ov70_0226BCC0 - mov r1, #2 - ldrsh r1, [r4, r1] - add r1, r1, #1 - strh r1, [r4, #2] - cmp r0, #2 - bne _0226A950 - mov r0, #1 - pop {r4, pc} -_0226A950: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 -_0226A954: .word 0x00000954 - thumb_func_end ov70_0226A930 - - thumb_func_start ov70_0226A958 -ov70_0226A958: ; 0x0226A958 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #2 - add r6, r0, #0 - ldr r0, _0226A994 ; =0x00000954 - ldrsh r1, [r5, r1] - add r0, r5, r0 - bl ov70_0226BCC0 - add r4, r0, #0 - mov r0, #2 - ldrsh r0, [r5, r0] - add r0, r0, #1 - strh r0, [r5, #2] - cmp r4, #1 - bne _0226A980 - add r0, r6, #0 - add r1, r5, #0 - bl ov70_0226BBA8 -_0226A980: - add r0, r6, #0 - add r1, r5, #0 - bl ov70_0226BBDC - cmp r4, #2 - bne _0226A990 - mov r0, #1 - pop {r4, r5, r6, pc} -_0226A990: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0226A994: .word 0x00000954 - thumb_func_end ov70_0226A958 - - thumb_func_start ov70_0226A998 -ov70_0226A998: ; 0x0226A998 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #8] - bl ov70_0225CE70 - cmp r0, #1 - bne _0226A9AC - mov r0, #0 - pop {r4, r5, r6, pc} -_0226A9AC: - mov r4, #0 -_0226A9AE: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_02269810 - cmp r0, #1 - bne _0226A9C4 - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov70_02269878 -_0226A9C4: - add r4, r4, #1 - cmp r4, #0x12 - blt _0226A9AE - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov70_0226A998 - - thumb_func_start ov70_0226A9D0 -ov70_0226A9D0: ; 0x0226A9D0 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #4] - add r4, r1, #0 - add r6, r2, #0 - bl ov70_0225CCAC - ldr r1, [r4, #8] - cmp r1, r0 - bne _0226A9EC - ldr r0, [r5, #8] - bl ov70_02260B3C -_0226A9EC: - ldr r0, [r4, #8] - bl ov70_0225CD34 - add r2, sp, #0 - strh r0, [r2] - lsr r0, r0, #0x10 - strh r0, [r2, #2] - ldrh r0, [r2] - mov r1, #4 - strh r0, [r2, #4] - ldrh r0, [r2, #2] - strh r0, [r2, #6] - ldrsh r1, [r2, r1] - ldr r0, [r5, #0xc] - asr r3, r1, #3 - lsr r3, r3, #0x1c - add r3, r1, r3 - lsl r1, r3, #0xc - mov r3, #6 - ldrsh r2, [r2, r3] - lsr r1, r1, #0x10 - asr r3, r2, #3 - lsr r3, r3, #0x1c - add r3, r2, r3 - lsl r2, r3, #0xc - lsr r2, r2, #0x10 - bl ov70_0225C8C4 - cmp r0, #0x2a - bne _0226AA2C - mov r1, #1 - b _0226AA2E -_0226AA2C: - mov r1, #0 -_0226AA2E: - ldr r0, _0226AB00 ; =0x00000965 - cmp r6, #1 - strb r1, [r4, r0] - beq _0226AA3E - cmp r6, #2 - beq _0226AA58 - cmp r6, #3 - b _0226AA8A -_0226AA3E: - ldr r3, _0226AB04 ; =0x0226E5E4 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_02269828 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov70_0226B714 - b _0226AAD2 -_0226AA58: - ldr r3, _0226AB04 ; =0x0226E5E4 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_02269828 - ldr r3, _0226AB08 ; =0x0226E5E8 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov70_02269828 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - mov r3, #2 - bl ov70_0226B714 - mov r2, #1 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov70_0226B714 - b _0226AAD2 -_0226AA8A: - ldr r3, _0226AB04 ; =0x0226E5E4 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0 - bl ov70_02269828 - ldr r3, _0226AB08 ; =0x0226E5E8 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - bl ov70_02269828 - ldr r3, _0226AB0C ; =0x0226E5EC - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - bl ov70_02269828 - mov r2, #0 - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov70_0226B714 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #1 - mov r3, #2 - bl ov70_0226B714 - add r0, r5, #0 - add r1, r4, #0 - mov r2, #2 - mov r3, #1 - bl ov70_0226B714 -_0226AAD2: - ldr r0, _0226AB10 ; =0x00000955 - mov r1, #0 - strb r6, [r4, r0] - ldr r0, [r4, #8] - bl ov70_0225D030 - ldr r0, _0226AB00 ; =0x00000965 - ldrb r0, [r4, r0] - cmp r0, #0 - bne _0226AAF2 - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226AB14 - add sp, #8 - pop {r4, r5, r6, pc} -_0226AAF2: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226ABAC - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0226AB00: .word 0x00000965 -_0226AB04: .word 0x0226E5E4 -_0226AB08: .word 0x0226E5E8 -_0226AB0C: .word 0x0226E5EC -_0226AB10: .word 0x00000955 - thumb_func_end ov70_0226A9D0 - - thumb_func_start ov70_0226AB14 -ov70_0226AB14: ; 0x0226AB14 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r1, #0 - ldr r0, [r5, #8] - add r1, sp, #0x10 - bl ov70_0225D054 - ldr r0, _0226AB94 ; =0x00000955 - ldrsb r0, [r5, r0] - sub r1, r0, #1 - ldr r0, _0226AB98 ; =0x0226E2E8 - ldrb r0, [r0, r1] - cmp r0, #0 - beq _0226AB42 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226AB50 -_0226AB42: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226AB50: - ldr r6, [sp, #0x14] - ldr r4, [sp, #0x18] - ldr r7, [sp, #0x10] - bl sub_020E1740 - add r0, r6, r0 - str r0, [sp] - str r4, [sp, #4] - str r4, [sp, #8] - mov r0, #0x6c - str r0, [sp, #0xc] - ldr r0, _0226AB9C ; =0x00000A04 - add r1, r7, #0 - add r0, r5, r0 - add r2, r7, #0 - add r3, r6, #0 - bl ov70_022692B4 - ldr r0, _0226ABA0 ; =0x00000A2C - mov r3, #2 - ldr r2, _0226ABA4 ; =0x0000071C - add r0, r5, r0 - mov r1, #0 - lsl r3, r3, #0xe - bl ov70_0226949C - add r0, r5, #0 - bl ov70_0226B324 - ldr r0, _0226ABA8 ; =0x00000956 - mov r1, #0 - strh r1, [r5, r0] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226AB94: .word 0x00000955 -_0226AB98: .word 0x0226E2E8 -_0226AB9C: .word 0x00000A04 -_0226ABA0: .word 0x00000A2C -_0226ABA4: .word 0x0000071C -_0226ABA8: .word 0x00000956 - thumb_func_end ov70_0226AB14 - - thumb_func_start ov70_0226ABAC -ov70_0226ABAC: ; 0x0226ABAC - push {r3, r4, lr} - sub sp, #0x1c - add r4, r1, #0 - ldr r0, [r4, #8] - add r1, sp, #0x10 - bl ov70_0225D054 - mov r0, #2 - ldr r3, [sp, #0x14] - lsl r0, r0, #0xc - ldr r2, [sp, #0x18] - ldr r1, [sp, #0x10] - add r0, r3, r0 - str r0, [sp] - str r2, [sp, #4] - str r2, [sp, #8] - mov r0, #2 - str r0, [sp, #0xc] - ldr r0, _0226ABF8 ; =0x00000A04 - add r2, r1, #0 - add r0, r4, r0 - bl ov70_022692B4 - ldr r0, _0226ABFC ; =0x00000A2C - mov r1, #0 - ldr r2, _0226AC00 ; =0x0000071C - add r0, r4, r0 - add r3, r1, #0 - bl ov70_0226949C - add r0, r4, #0 - bl ov70_0226B51C - ldr r0, _0226AC04 ; =0x00000956 - mov r1, #0 - strh r1, [r4, r0] - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_0226ABF8: .word 0x00000A04 -_0226ABFC: .word 0x00000A2C -_0226AC00: .word 0x0000071C -_0226AC04: .word 0x00000956 - thumb_func_end ov70_0226ABAC - - thumb_func_start ov70_0226AC08 -ov70_0226AC08: ; 0x0226AC08 - push {r3, lr} - ldr r2, _0226AC20 ; =0x00000965 - ldrb r2, [r1, r2] - cmp r2, #0 - bne _0226AC18 - bl ov70_0226AC24 - pop {r3, pc} -_0226AC18: - bl ov70_0226AD20 - pop {r3, pc} - nop -_0226AC20: .word 0x00000965 - thumb_func_end ov70_0226AC08 - - thumb_func_start ov70_0226AC24 -ov70_0226AC24: ; 0x0226AC24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - ldr r1, _0226AD0C ; =0x00000A04 - add r6, r0, #0 - add r0, r5, r1 - sub r1, #0xae - ldrsh r1, [r5, r1] - bl ov70_022692DC - str r0, [sp] - ldr r0, _0226AD10 ; =0x00000A2C - add r0, r5, r0 - bl ov70_022694D0 - ldr r0, _0226AD14 ; =0x00000956 - ldrsh r1, [r5, r0] - add r1, r1, #1 - strh r1, [r5, r0] - ldr r0, [r5, #8] - add r1, sp, #0xc - bl ov70_0225D054 - ldr r0, _0226AD0C ; =0x00000A04 - add r1, sp, #0xc - add r0, r5, r0 - add r2, sp, #0x10 - add r3, sp, #0x14 - bl ov70_02269488 - ldr r0, _0226AD10 ; =0x00000A2C - add r1, sp, #8 - add r0, r5, r0 - bl ov70_02269508 - ldr r0, [sp] - cmp r0, #0 - bne _0226AC78 - ldr r1, [sp, #0xc] - ldr r0, [sp, #8] - add r0, r1, r0 - str r0, [sp, #0xc] -_0226AC78: - ldr r0, [r5, #8] - add r1, sp, #0xc - bl ov70_0225D048 - add r0, r5, #0 - bl ov70_0226B324 - ldr r0, _0226AD18 ; =0x00000955 - mov r4, #0 - ldrsb r0, [r5, r0] - cmp r0, #0 - ble _0226ACA4 - ldr r7, _0226AD18 ; =0x00000955 -_0226AC92: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov70_0226B744 - ldrsb r0, [r5, r7] - add r4, r4, #1 - cmp r4, r0 - blt _0226AC92 -_0226ACA4: - ldr r0, [r6, #4] - ldr r7, [r5, #8] - bl ov70_0225CCAC - cmp r7, r0 - bne _0226AD06 - ldr r0, _0226AD1C ; =0x021BF67C - mov r1, #0x40 - ldr r0, [r0, #0x48] - mov r4, #4 - tst r1, r0 - beq _0226ACBE - mov r4, #0 -_0226ACBE: - mov r1, #0x80 - tst r1, r0 - beq _0226ACC6 - mov r4, #1 -_0226ACC6: - mov r1, #0x10 - tst r1, r0 - beq _0226ACCE - mov r4, #3 -_0226ACCE: - mov r1, #0x20 - tst r0, r1 - beq _0226ACD6 - mov r4, #2 -_0226ACD6: - cmp r4, #4 - beq _0226AD06 - add r0, r7, #0 - add r1, r4, #0 - bl ov70_0225D060 - ldr r0, [r5, #8] - bl ov70_0225CD34 - add r1, sp, #4 - strh r0, [r1] - lsr r0, r0, #0x10 - strh r0, [r1, #2] - mov r3, sp - ldrh r2, [r1] - ldr r0, [r5, #8] - sub r3, r3, #4 - strh r2, [r3] - ldrh r1, [r1, #2] - add r2, r4, #0 - strh r1, [r3, #2] - ldr r1, [r3, #0] - bl ov70_0225CD04 -_0226AD06: - ldr r0, [sp] - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226AD0C: .word 0x00000A04 -_0226AD10: .word 0x00000A2C -_0226AD14: .word 0x00000956 -_0226AD18: .word 0x00000955 -_0226AD1C: .word 0x021BF67C - thumb_func_end ov70_0226AC24 - - thumb_func_start ov70_0226AD20 -ov70_0226AD20: ; 0x0226AD20 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - ldr r1, _0226AD90 ; =0x00000A04 - add r6, r0, #0 - add r0, r5, r1 - sub r1, #0xae - ldrsh r1, [r5, r1] - bl ov70_022692DC - str r0, [sp] - ldr r0, _0226AD94 ; =0x00000A2C - add r0, r5, r0 - bl ov70_022694D0 - ldr r0, _0226AD98 ; =0x00000956 - ldrsh r1, [r5, r0] - add r1, r1, #1 - strh r1, [r5, r0] - ldr r0, [r5, #8] - add r1, sp, #4 - bl ov70_0225D054 - ldr r0, _0226AD90 ; =0x00000A04 - add r1, sp, #4 - add r0, r5, r0 - add r2, sp, #8 - add r3, sp, #0xc - bl ov70_02269488 - ldr r0, [r5, #8] - add r1, sp, #4 - bl ov70_0225D048 - add r0, r5, #0 - bl ov70_0226B51C - ldr r0, _0226AD9C ; =0x00000955 - mov r4, #0 - ldrsb r0, [r5, r0] - cmp r0, #0 - ble _0226AD88 - ldr r7, _0226AD9C ; =0x00000955 -_0226AD76: - add r0, r6, #0 - add r1, r5, #0 - add r2, r4, #0 - bl ov70_0226B744 - ldrsb r0, [r5, r7] - add r4, r4, #1 - cmp r4, r0 - blt _0226AD76 -_0226AD88: - ldr r0, [sp] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226AD90: .word 0x00000A04 -_0226AD94: .word 0x00000A2C -_0226AD98: .word 0x00000956 -_0226AD9C: .word 0x00000955 - thumb_func_end ov70_0226AD20 - - thumb_func_start ov70_0226ADA0 -ov70_0226ADA0: ; 0x0226ADA0 - push {r3, lr} - ldr r2, _0226ADB8 ; =0x00000965 - ldrb r2, [r1, r2] - cmp r2, #0 - bne _0226ADB0 - bl ov70_0226ADBC - pop {r3, pc} -_0226ADB0: - bl ov70_0226AF1C - pop {r3, pc} - nop -_0226ADB8: .word 0x00000965 - thumb_func_end ov70_0226ADA0 - - thumb_func_start ov70_0226ADBC -ov70_0226ADBC: ; 0x0226ADBC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r1, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #8] - add r1, sp, #0x24 - bl ov70_0225D054 - ldr r0, _0226AF04 ; =0x00000955 - ldrsb r0, [r5, r0] - sub r1, r0, #1 - ldr r0, _0226AF08 ; =0x0226E2E8 - ldrb r0, [r0, r1] - cmp r0, #0 - beq _0226ADEC - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226ADFA -_0226ADEC: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226ADFA: - ldr r6, [sp, #0x28] - ldr r4, [sp, #0x2c] - ldr r7, [sp, #0x24] - bl sub_020E1740 - sub r0, r6, r0 - str r0, [sp] - str r4, [sp, #4] - str r4, [sp, #8] - mov r0, #0xa - str r0, [sp, #0xc] - ldr r0, _0226AF0C ; =0x00000A04 - add r1, r7, #0 - add r0, r5, r0 - add r2, r7, #0 - add r3, r6, #0 - bl ov70_022692B4 - ldr r1, _0226AF10 ; =0x00000956 - mov r4, #0 - strh r4, [r5, r1] - sub r0, r1, #2 - strb r4, [r5, r0] - sub r0, r1, #1 - ldrsb r0, [r5, r0] - cmp r0, #0 - ble _0226AEFA - add r0, r5, #0 - str r0, [sp, #0x14] - add r0, #0xc - str r0, [sp, #0x14] - add r0, r1, #0 - add r0, #0x36 - add r1, #0x12 - add r7, r5, r0 - add r6, r5, r1 -_0226AE42: - ldr r0, [sp, #0x14] - add r1, sp, #0x24 - add r2, sp, #0x28 - add r3, sp, #0x2c - bl sub_02017358 - mov r0, #0x96 - add r1, r5, r4 - lsl r0, r0, #4 - ldrb r0, [r1, r0] - cmp r0, #0 - beq _0226AE64 - cmp r0, #1 - beq _0226AE7E - cmp r0, #2 - beq _0226AE98 - b _0226AEB0 -_0226AE64: - ldr r0, [sp, #0x24] - ldr r1, [sp, #0x28] - str r0, [sp, #0x20] - mov r0, #1 - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x1c] - mov r0, #1 - ldr r1, [sp, #0x2c] - lsl r0, r0, #0x12 - sub r0, r1, r0 - str r0, [sp, #0x18] - b _0226AEB0 -_0226AE7E: - mov r0, #1 - ldr r1, [sp, #0x24] - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x20] - mov r0, #1 - ldr r1, [sp, #0x28] - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x18] - b _0226AEB0 -_0226AE98: - mov r0, #1 - ldr r1, [sp, #0x24] - lsl r0, r0, #0x12 - sub r0, r1, r0 - str r0, [sp, #0x20] - mov r0, #1 - ldr r1, [sp, #0x28] - lsl r0, r0, #0x12 - add r0, r1, r0 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x18] -_0226AEB0: - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x20] - str r0, [sp] - ldr r0, [sp, #0x2c] - str r0, [sp, #4] - ldr r0, [sp, #0x18] - str r0, [sp, #8] - mov r0, #0x1a - str r0, [sp, #0xc] - ldr r1, [sp, #0x24] - ldr r3, [sp, #0x28] - add r0, r7, #0 - bl ov70_022692B4 - mov r3, #6 - ldr r2, _0226AF14 ; =0x00000AAA - add r0, r6, #0 - mov r1, #0 - lsl r3, r3, #0xc - bl ov70_0226949C - ldr r0, [sp, #0x10] - add r1, r5, #0 - add r2, r4, #0 - mov r3, #3 - bl ov70_0226B714 - ldr r0, [sp, #0x14] - add r4, r4, #1 - add r0, #0x78 - str r0, [sp, #0x14] - ldr r0, _0226AF04 ; =0x00000955 - add r7, #0x28 - ldrsb r0, [r5, r0] - add r6, #0xc - cmp r4, r0 - blt _0226AE42 -_0226AEFA: - ldr r0, _0226AF18 ; =0x00000964 - mov r1, #0 - strb r1, [r5, r0] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226AF04: .word 0x00000955 -_0226AF08: .word 0x0226E2E8 -_0226AF0C: .word 0x00000A04 -_0226AF10: .word 0x00000956 -_0226AF14: .word 0x00000AAA -_0226AF18: .word 0x00000964 - thumb_func_end ov70_0226ADBC - - thumb_func_start ov70_0226AF1C -ov70_0226AF1C: ; 0x0226AF1C - push {r3, r4, lr} - sub sp, #0x1c - add r4, r1, #0 - ldr r0, [r4, #8] - add r1, sp, #0x10 - bl ov70_0225D054 - mov r0, #2 - ldr r3, [sp, #0x14] - lsl r0, r0, #0xc - ldr r2, [sp, #0x18] - ldr r1, [sp, #0x10] - sub r0, r3, r0 - str r0, [sp] - str r2, [sp, #4] - str r2, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - ldr r0, _0226AF58 ; =0x00000A04 - add r2, r1, #0 - add r0, r4, r0 - bl ov70_022692B4 - ldr r0, _0226AF5C ; =0x00000956 - mov r1, #0 - strh r1, [r4, r0] - sub r0, r0, #2 - strb r1, [r4, r0] - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_0226AF58: .word 0x00000A04 -_0226AF5C: .word 0x00000956 - thumb_func_end ov70_0226AF1C - - thumb_func_start ov70_0226AF60 -ov70_0226AF60: ; 0x0226AF60 - push {r3, lr} - ldr r2, _0226AF78 ; =0x00000965 - ldrb r2, [r1, r2] - cmp r2, #0 - bne _0226AF70 - bl ov70_0226AF7C - pop {r3, pc} -_0226AF70: - bl ov70_0226B1D0 - pop {r3, pc} - nop -_0226AF78: .word 0x00000965 - thumb_func_end ov70_0226AF60 - - thumb_func_start ov70_0226AF7C -ov70_0226AF7C: ; 0x0226AF7C - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - add r4, r1, #0 - ldr r1, _0226B1A8 ; =0x00000954 - add r6, r0, #0 - ldrsb r0, [r4, r1] - cmp r0, #4 - bhi _0226AFB2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226AF98: ; jump table - .short _0226AFA2 - _0226AF98 - 2 ; case 0 - .short _0226AFBA - _0226AF98 - 2 ; case 1 - .short _0226AFD0 - _0226AF98 - 2 ; case 2 - .short _0226B006 - _0226AF98 - 2 ; case 3 - .short _0226B05E - _0226AF98 - 2 ; case 4 -_0226AFA2: - add r0, r1, #2 - ldrsh r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #8 - bge _0226AFB4 -_0226AFB2: - b _0226B0D8 -_0226AFB4: - mov r0, #1 - strb r0, [r4, r1] - b _0226B0D8 -_0226AFBA: - ldr r0, [r4, #8] - mov r1, #1 - bl ov70_0225D09C - ldr r0, _0226B1AC ; =0x00000956 - mov r1, #0x10 - strh r1, [r4, r0] - mov r1, #2 - sub r0, r0, #2 - strb r1, [r4, r0] - b _0226B0D8 -_0226AFD0: - add r0, r1, #2 - ldrsh r0, [r4, r0] - sub r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - bgt _0226B0D8 - ldr r0, [r4, #8] - mov r1, #0 - bl ov70_0225D09C - ldr r0, _0226B1A8 ; =0x00000954 - mov r1, #3 - strb r1, [r4, r0] - mov r1, #0 - add r0, r0, #2 - strh r1, [r4, r0] - ldr r0, [r4, #8] - mov r1, #6 - bl ov70_0225CD60 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov70_0225D060 - b _0226B0D8 -_0226B006: - add r0, r1, #0 - add r1, r1, #2 - add r0, #0xb0 - ldrsh r1, [r4, r1] - add r0, r4, r0 - bl ov70_022692DC - add r5, r0, #0 - ldr r0, _0226B1AC ; =0x00000956 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - ldr r0, [r4, #8] - add r1, sp, #0x30 - bl ov70_0225D054 - ldr r0, _0226B1B0 ; =0x00000A04 - add r1, sp, #0x30 - add r0, r4, r0 - add r2, sp, #0x34 - add r3, sp, #0x38 - bl ov70_02269488 - ldr r0, [r4, #8] - add r1, sp, #0x30 - bl ov70_0225D048 - cmp r5, #1 - bne _0226B0D8 - ldr r0, _0226B1A8 ; =0x00000954 - mov r1, #4 - strb r1, [r4, r0] - add r1, r0, #2 - mov r2, #0 - strh r2, [r4, r1] - ldr r1, [sp, #0x34] - add r0, r0, #4 - str r1, [r4, r0] - ldr r2, _0226B1B4 ; =0x000005AB - add r0, r6, #0 - add r1, r4, #0 - bl ov70_02269510 - b _0226B0D8 -_0226B05E: - add r0, r1, #2 - ldrsh r1, [r4, r0] - ldr r0, _0226B1B8 ; =0x00007FFF - mul r0, r1 - mov r1, #0xa - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r1, r0, #2 - ldr r0, _0226B1BC ; =0x020F983C - ldrsh r2, [r0, r1] - asr r0, r2, #0x1f - lsr r1, r2, #0x11 - lsl r0, r0, #0xf - orr r0, r1 - mov r1, #2 - lsl r3, r2, #0xf - mov r2, #0 - lsl r1, r1, #0xa - add r1, r3, r1 - adc r0, r2 - lsr r5, r1, #0xc - lsl r0, r0, #0x14 - orr r5, r0 - ldr r0, [r4, #8] - add r1, sp, #0x24 - bl ov70_0225D054 - ldr r0, _0226B1C0 ; =0x00000958 - add r1, sp, #0x24 - ldr r0, [r4, r0] - add r0, r0, r5 - str r0, [sp, #0x28] - ldr r0, [r4, #8] - bl ov70_0225D048 - ldr r0, _0226B1AC ; =0x00000956 - ldrsh r1, [r4, r0] - add r1, r1, #1 - cmp r1, #0xa - ble _0226B0D6 - ldr r0, [r4, #8] - mov r1, #1 - bl ov70_0225D030 - ldr r0, [r6, #4] - ldr r4, [r4, #8] - bl ov70_0225CCAC - cmp r4, r0 - bne _0226B0D0 - ldr r0, [r6, #8] - add r1, r4, #0 - bl ov70_02260B38 -_0226B0D0: - add sp, #0x3c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0226B0D6: - strh r1, [r4, r0] -_0226B0D8: - ldr r1, _0226B1C4 ; =0x00000964 - mov r5, #0 - ldrb r0, [r4, r1] - add r0, r0, #1 - strb r0, [r4, r1] - add r0, r1, #0 - sub r0, #0xf - ldrsb r0, [r4, r0] - cmp r0, #0 - ble _0226B1A0 - add r0, r1, #0 - add r0, #0x28 - add r7, r4, r0 - add r0, r1, #4 - add r0, r4, r0 - str r0, [sp, #0x10] - add r0, r4, #0 - str r0, [sp, #0xc] - add r0, #0xc - str r0, [sp, #0xc] - ldr r0, [sp, #0x10] - str r7, [sp, #8] - str r0, [sp, #4] - ldr r0, [sp, #0xc] - str r0, [sp] -_0226B10A: - ldr r1, _0226B1C4 ; =0x00000964 - add r0, r7, #0 - ldrb r1, [r4, r1] - bl ov70_022692DC - cmp r0, #0 - bne _0226B152 - ldr r0, [sp, #0x10] - bl ov70_022694D0 - ldr r0, [sp, #0xc] - add r1, sp, #0x18 - add r2, sp, #0x1c - add r3, sp, #0x20 - bl sub_02017358 - ldr r0, [sp, #8] - add r1, sp, #0x18 - add r2, sp, #0x1c - add r3, sp, #0x20 - bl ov70_02269488 - ldr r0, [sp, #4] - add r1, sp, #0x14 - bl ov70_02269508 - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x14] - ldr r2, [sp, #0x1c] - add r1, r1, r0 - ldr r0, [sp] - ldr r3, [sp, #0x20] - str r1, [sp, #0x18] - bl sub_02017350 - b _0226B16C -_0226B152: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - mov r3, #4 - bl ov70_0226B714 - cmp r0, #1 - bne _0226B16C - ldr r2, _0226B1C8 ; =0x00000591 - add r0, r6, #0 - add r1, r4, #0 - bl ov70_02269510 -_0226B16C: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov70_0226B744 - ldr r0, [sp, #0x10] - add r5, r5, #1 - add r0, #0xc - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r7, #0x28 - add r0, #0x78 - str r0, [sp, #0xc] - ldr r0, [sp, #8] - add r0, #0x28 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r0, #0xc - str r0, [sp, #4] - ldr r0, [sp] - add r0, #0x78 - str r0, [sp] - ldr r0, _0226B1CC ; =0x00000955 - ldrsb r0, [r4, r0] - cmp r5, r0 - blt _0226B10A -_0226B1A0: - mov r0, #0 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_0226B1A8: .word 0x00000954 -_0226B1AC: .word 0x00000956 -_0226B1B0: .word 0x00000A04 -_0226B1B4: .word 0x000005AB -_0226B1B8: .word 0x00007FFF -_0226B1BC: .word 0x020F983C -_0226B1C0: .word 0x00000958 -_0226B1C4: .word 0x00000964 -_0226B1C8: .word 0x00000591 -_0226B1CC: .word 0x00000955 - thumb_func_end ov70_0226AF7C - - thumb_func_start ov70_0226B1D0 -ov70_0226B1D0: ; 0x0226B1D0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - ldr r0, _0226B30C ; =0x00000955 - add r4, r1, #0 - ldrsb r0, [r4, r0] - mov r5, #0 - cmp r0, #0 - ble _0226B1F6 - ldr r7, _0226B30C ; =0x00000955 -_0226B1E4: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov70_0226B744 - ldrsb r0, [r4, r7] - add r5, r5, #1 - cmp r5, r0 - blt _0226B1E4 -_0226B1F6: - ldr r1, _0226B310 ; =0x00000954 - ldrsb r0, [r4, r1] - cmp r0, #3 - bls _0226B200 - b _0226B304 -_0226B200: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226B20C: ; jump table - .short _0226B214 - _0226B20C - 2 ; case 0 - .short _0226B246 - _0226B20C - 2 ; case 1 - .short _0226B25C - _0226B20C - 2 ; case 2 - .short _0226B292 - _0226B20C - 2 ; case 3 -_0226B214: - ldr r2, _0226B314 ; =0x00000591 - add r0, r6, #0 - add r1, r4, #0 - bl ov70_02269510 - ldr r0, _0226B30C ; =0x00000955 - mov r5, #0 - ldrsb r0, [r4, r0] - cmp r0, #0 - ble _0226B23E - ldr r7, _0226B30C ; =0x00000955 -_0226B22A: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - mov r3, #4 - bl ov70_0226B714 - ldrsb r0, [r4, r7] - add r5, r5, #1 - cmp r5, r0 - blt _0226B22A -_0226B23E: - ldr r0, _0226B310 ; =0x00000954 - mov r1, #1 - strb r1, [r4, r0] - b _0226B304 -_0226B246: - ldr r0, [r4, #8] - mov r1, #1 - bl ov70_0225D09C - ldr r0, _0226B318 ; =0x00000956 - mov r1, #8 - strh r1, [r4, r0] - mov r1, #2 - sub r0, r0, #2 - strb r1, [r4, r0] - b _0226B304 -_0226B25C: - add r0, r1, #2 - ldrsh r0, [r4, r0] - sub r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0 - bgt _0226B304 - ldr r0, [r4, #8] - mov r1, #0 - bl ov70_0225D09C - ldr r0, _0226B310 ; =0x00000954 - mov r1, #3 - strb r1, [r4, r0] - mov r1, #0 - add r0, r0, #2 - strh r1, [r4, r0] - ldr r0, [r4, #8] - mov r1, #6 - bl ov70_0225CD60 - add r1, r0, #0 - ldr r0, [r4, #8] - bl ov70_0225D060 - b _0226B304 -_0226B292: - add r0, r1, #0 - add r1, r1, #2 - add r0, #0xb0 - ldrsh r1, [r4, r1] - add r0, r4, r0 - bl ov70_022692DC - add r5, r0, #0 - ldr r0, _0226B318 ; =0x00000956 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - ldr r0, [r4, #8] - add r1, sp, #0 - bl ov70_0225D054 - ldr r0, _0226B31C ; =0x00000A04 - add r1, sp, #0 - add r0, r4, r0 - add r2, sp, #4 - add r3, sp, #8 - bl ov70_02269488 - ldr r0, [r4, #8] - add r1, sp, #0 - bl ov70_0225D048 - cmp r5, #1 - bne _0226B304 - ldr r0, _0226B318 ; =0x00000956 - mov r1, #0 - strh r1, [r4, r0] - ldr r1, [sp, #4] - add r0, r0, #2 - str r1, [r4, r0] - ldr r2, _0226B320 ; =0x000005AB - add r0, r6, #0 - add r1, r4, #0 - bl ov70_02269510 - ldr r0, [r4, #8] - mov r1, #1 - bl ov70_0225D030 - ldr r0, [r6, #4] - ldr r4, [r4, #8] - bl ov70_0225CCAC - cmp r4, r0 - bne _0226B2FE - ldr r0, [r6, #8] - add r1, r4, #0 - bl ov70_02260B38 -_0226B2FE: - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0226B304: - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - nop -_0226B30C: .word 0x00000955 -_0226B310: .word 0x00000954 -_0226B314: .word 0x00000591 -_0226B318: .word 0x00000956 -_0226B31C: .word 0x00000A04 -_0226B320: .word 0x000005AB - thumb_func_end ov70_0226B1D0 - - thumb_func_start ov70_0226B324 -ov70_0226B324: ; 0x0226B324 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #8] - add r1, sp, #0 - bl ov70_0225D054 - ldr r0, _0226B518 ; =0x00000955 - ldrsb r0, [r5, r0] - cmp r0, #1 - beq _0226B342 - cmp r0, #2 - beq _0226B392 - cmp r0, #3 - b _0226B42E -_0226B342: - mov r0, #0xf - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - ldr r2, [sp, #4] - add r3, r0, #0 - add r1, r1, r4 - add r2, r2, r3 - mov r3, #1 - add r5, #0xc - ldr r4, [sp, #8] - lsl r3, r3, #0xc - add r0, r5, #0 - add r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0226B392: - mov r0, #0xe - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - add r3, r0, #0 - ldr r2, [sp, #4] - add r1, r1, r4 - add r2, r2, r3 - mov r3, #1 - add r0, r5, #0 - ldr r4, [sp, #8] - lsl r3, r3, #0xc - add r0, #0xc - add r3, r4, r3 - bl sub_02017350 - mov r0, #0xe - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #0xe - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - ldr r2, [sp, #4] - add r3, r0, #0 - add r1, r1, r4 - add r2, r2, r3 - mov r3, #1 - add r5, #0x84 - ldr r4, [sp, #8] - lsl r3, r3, #0xc - add r0, r5, #0 - add r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0226B42E: - mov r0, #0xf - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - add r3, r0, #0 - ldr r2, [sp, #4] - add r1, r1, r4 - add r2, r2, r3 - mov r3, #1 - add r0, r5, #0 - ldr r4, [sp, #8] - lsl r3, r3, #0xc - add r0, #0xc - add r3, r4, r3 - bl sub_02017350 - mov r0, #0xe - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - add r3, r0, #0 - ldr r2, [sp, #4] - add r1, r1, r4 - add r2, r2, r3 - mov r3, #1 - add r0, r5, #0 - ldr r4, [sp, #8] - lsl r3, r3, #0xc - add r0, #0x84 - add r3, r4, r3 - bl sub_02017350 - mov r0, #0xe - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #0xe - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - ldr r2, [sp, #4] - add r3, r0, #0 - add r1, r1, r4 - add r2, r2, r3 - mov r3, #1 - add r5, #0xfc - ldr r4, [sp, #8] - lsl r3, r3, #0xc - add r0, r5, #0 - add r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0226B518: .word 0x00000955 - thumb_func_end ov70_0226B324 - - thumb_func_start ov70_0226B51C -ov70_0226B51C: ; 0x0226B51C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #8] - add r1, sp, #0 - bl ov70_0225D054 - ldr r0, _0226B710 ; =0x00000955 - ldrsb r0, [r5, r0] - cmp r0, #1 - beq _0226B53A - cmp r0, #2 - beq _0226B58A - cmp r0, #3 - b _0226B626 -_0226B53A: - mov r0, #3 - lsl r0, r0, #0x10 - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - ldr r2, [sp, #4] - add r3, r0, #0 - add r1, r1, r4 - add r2, r2, r3 - mov r3, #2 - add r5, #0xc - ldr r4, [sp, #8] - lsl r3, r3, #0xe - add r0, r5, #0 - sub r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0226B58A: - mov r0, #0xb - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - add r3, r0, #0 - ldr r2, [sp, #4] - add r1, r1, r4 - add r2, r2, r3 - mov r3, #2 - add r0, r5, #0 - ldr r4, [sp, #8] - lsl r3, r3, #0xe - add r0, #0xc - sub r3, r4, r3 - bl sub_02017350 - mov r0, #0xb - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #0xe - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - ldr r2, [sp, #4] - add r3, r0, #0 - add r1, r1, r4 - add r2, r2, r3 - mov r3, #2 - add r5, #0x84 - ldr r4, [sp, #8] - lsl r3, r3, #0xe - add r0, r5, #0 - sub r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0226B626: - mov r0, #3 - lsl r0, r0, #0x10 - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - add r3, r0, #0 - ldr r2, [sp, #4] - add r1, r1, r4 - add r2, r2, r3 - mov r3, #2 - add r0, r5, #0 - ldr r4, [sp, #8] - lsl r3, r3, #0xe - add r0, #0xc - sub r3, r4, r3 - bl sub_02017350 - mov r0, #0xb - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #2 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - add r3, r0, #0 - ldr r2, [sp, #4] - add r1, r1, r4 - add r2, r2, r3 - mov r3, #2 - add r0, r5, #0 - ldr r4, [sp, #8] - lsl r3, r3, #0xe - add r0, #0x84 - sub r3, r4, r3 - bl sub_02017350 - mov r0, #0xb - lsl r0, r0, #0xe - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - add r6, r0, #0 - mov r0, #0xe - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - bl sub_020E1740 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020E1740 - ldr r1, [sp] - ldr r2, [sp, #4] - add r3, r0, #0 - add r1, r1, r4 - add r2, r2, r3 - mov r3, #2 - add r5, #0xfc - ldr r4, [sp, #8] - lsl r3, r3, #0xe - add r0, r5, #0 - sub r3, r4, r3 - bl sub_02017350 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0226B710: .word 0x00000955 - thumb_func_end ov70_0226B51C - - thumb_func_start ov70_0226B714 -ov70_0226B714: ; 0x0226B714 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r6, #0x96 - lsl r6, r6, #4 - add r5, r1, r6 - add r4, r3, #0 - ldrb r3, [r5, r2] - cmp r4, r3 - beq _0226B73E - strb r4, [r5, r2] - mov r3, #0 - add r5, r1, r2 - sub r6, r6, #4 - strb r3, [r5, r6] - lsl r4, r4, #0xd - str r4, [sp] - bl ov70_02269A90 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0226B73E: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov70_0226B714 - - thumb_func_start ov70_0226B744 -ov70_0226B744: ; 0x0226B744 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - mov r3, #0x96 - add r7, r1, #0 - add r5, r2, #0 - add r4, r7, r5 - lsl r3, r3, #4 - ldrb r6, [r4, r3] - sub r3, r3, #4 - add r4, r7, r3 - ldrb r3, [r4, r5] - str r0, [sp, #4] - cmp r3, #0 - bne _0226B7A4 - mov r3, #0 - bl ov70_02269AE8 - lsl r1, r6, #0xd - str r0, [sp, #8] - cmp r0, r1 - bne _0226B778 - mov r0, #1 - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #8] - b _0226B790 -_0226B778: - cmp r6, #4 - beq _0226B780 - str r1, [sp, #8] - b _0226B790 -_0226B780: - add r1, r7, #0 - mov r0, #0x78 - add r1, #0xc - mul r0, r5 - add r0, r1, r0 - mov r1, #0 - bl sub_02017348 -_0226B790: - ldr r0, [sp, #8] - add r1, r7, #0 - str r0, [sp] - ldr r0, [sp, #4] - add r2, r5, #0 - mov r3, #0 - bl ov70_02269A90 - mov r0, #8 - strb r0, [r4, r5] -_0226B7A4: - ldrb r0, [r4, r5] - sub r0, r0, #1 - strb r0, [r4, r5] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226B744 - - thumb_func_start ov70_0226B7B0 -ov70_0226B7B0: ; 0x0226B7B0 - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - str r0, [sp, #0x10] - add r0, r1, #0 - str r1, [sp, #0x14] - ldr r0, [r0, #8] - add r1, sp, #0x50 - str r2, [sp, #0x18] - bl ov70_0225D054 - mov r0, #0 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - cmp r0, #0 - bls _0226B88E - ldr r0, [sp, #0x20] - str r0, [sp, #0x1c] -_0226B7D2: - ldr r1, [sp, #0x20] - add r1, #0xd - cmp r1, #0xf - bls _0226B7DC - mov r1, #0xf -_0226B7DC: - ldr r0, _0226B8AC ; =0x0226E370 - ldr r7, _0226B8B0 ; =0x0226E3A0 - str r0, [sp, #0x34] - lsl r0, r1, #2 - str r0, [sp, #0x24] - ldr r0, [sp, #0x14] - ldr r1, _0226B8B4 ; =0x00000968 - str r0, [sp, #0x28] - add r0, #0xc - str r0, [sp, #0x28] - ldr r0, [sp, #0x14] - mov r4, #0 - add r0, r0, r1 - str r0, [sp, #0x30] -_0226B7F8: - ldr r0, [sp, #0x1c] - ldr r6, _0226B8B8 ; =0x0226E5A4 - add r5, r4, r0 - ldr r3, [sp, #0x24] - ldr r0, [sp, #0x10] - ldr r1, [sp, #0x14] - add r2, r5, #0 - add r3, r6, r3 - bl ov70_02269828 - ldr r1, [sp, #0x34] - add r0, sp, #0x50 - add r2, sp, #0x44 - bl sub_020BD17C - add r0, sp, #0x44 - add r1, r7, #0 - add r2, sp, #0x38 - bl sub_020BD17C - mov r0, #0x78 - mul r0, r5 - ldr r1, [sp, #0x28] - str r0, [sp, #0x2c] - add r0, r1, r0 - ldr r1, [sp, #0x44] - ldr r2, [sp, #0x48] - ldr r3, [sp, #0x4c] - bl sub_02017350 - ldr r1, [sp, #0x28] - ldr r0, [sp, #0x2c] - add r0, r1, r0 - mov r1, #0 - bl sub_02017348 - ldr r0, [sp, #0x14] - mov r1, #0 - add r2, r0, r5 - ldr r0, _0226B8BC ; =0x00000958 - strb r1, [r2, r0] - ldr r0, [sp, #0x3c] - add r1, r5, #0 - str r0, [sp] - ldr r0, [sp, #0x4c] - str r0, [sp, #4] - ldr r0, [sp, #0x40] - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0x28 - mul r1, r0 - ldr r0, [sp, #0x30] - ldr r2, [sp, #0x38] - add r0, r0, r1 - ldr r1, [sp, #0x44] - ldr r3, [sp, #0x48] - bl ov70_022692B4 - ldr r0, [sp, #0x34] - add r4, r4, #1 - add r0, #0xc - add r7, #0xc - str r0, [sp, #0x34] - cmp r4, #4 - blt _0226B7F8 - ldr r0, [sp, #0x1c] - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x20] - add r1, r0, #1 - ldr r0, [sp, #0x18] - str r1, [sp, #0x20] - cmp r1, r0 - blo _0226B7D2 -_0226B88E: - ldr r2, _0226B8C0 ; =0x00000956 - ldr r1, [sp, #0x18] - ldr r0, [sp, #0x14] - sub r3, r2, #1 - strb r1, [r0, r2] - ldr r1, [sp, #0x14] - mov r0, #0 - strb r0, [r1, r3] - sub r3, r2, #2 - strb r0, [r1, r3] - add r2, r2, #1 - strb r0, [r1, r2] - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - nop -_0226B8AC: .word 0x0226E370 -_0226B8B0: .word 0x0226E3A0 -_0226B8B4: .word 0x00000968 -_0226B8B8: .word 0x0226E5A4 -_0226B8BC: .word 0x00000958 -_0226B8C0: .word 0x00000956 - thumb_func_end ov70_0226B7B0 - - thumb_func_start ov70_0226B8C4 -ov70_0226B8C4: ; 0x0226B8C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r2, #0 - ldr r2, _0226B924 ; =0x00000958 - add r5, r1, #0 - add r1, r5, r2 - add r7, r0, #0 - ldrsb r0, [r1, r4] - add r6, r4, #0 - add r2, #0x10 - add r0, r0, #1 - strb r0, [r1, r4] - mov r0, #0x28 - mul r6, r0 - add r0, r5, r2 - ldrsb r1, [r1, r4] - add r0, r0, r6 - bl ov70_022692DC - str r0, [sp] - ldr r0, _0226B928 ; =0x00000968 - add r1, sp, #4 - add r0, r5, r0 - add r0, r0, r6 - add r2, sp, #8 - add r3, sp, #0xc - bl ov70_02269488 - add r1, r5, #0 - mov r0, #0x78 - add r1, #0xc - mul r0, r4 - add r0, r1, r0 - ldr r1, [sp, #4] - ldr r2, [sp, #8] - ldr r3, [sp, #0xc] - bl sub_02017350 - add r0, r7, #0 - add r1, r5, #0 - add r2, r4, #0 - mov r3, #0 - bl ov70_022699BC - ldr r0, [sp] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226B924: .word 0x00000958 -_0226B928: .word 0x00000968 - thumb_func_end ov70_0226B8C4 - - thumb_func_start ov70_0226B92C -ov70_0226B92C: ; 0x0226B92C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - add r7, r1, #0 - mov r6, #0 - str r2, [sp, #4] - add r0, r2, #0 - beq _0226B986 - add r5, r7, #0 - ldr r4, _0226B990 ; =0x0226E5A4 - add r5, #0xc -_0226B942: - ldr r0, [sp] - add r1, r7, #0 - add r2, r6, #0 - add r3, r4, #0 - bl ov70_02269828 - ldr r0, [r7, #8] - add r1, sp, #8 - bl ov70_0225D054 - mov r0, #2 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xe - add r2, r1, r0 - mov r0, #6 - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - add r3, r1, r0 - ldr r1, [sp, #8] - add r0, r5, #0 - str r2, [sp, #0xc] - str r3, [sp, #0x10] - bl sub_02017350 - add r0, r5, #0 - mov r1, #0 - bl sub_02017348 - ldr r0, [sp, #4] - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x78 - cmp r6, r0 - blo _0226B942 -_0226B986: - ldr r1, _0226B994 ; =0x00000954 - ldr r0, [sp, #4] - strb r0, [r7, r1] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226B990: .word 0x0226E5A4 -_0226B994: .word 0x00000954 - thumb_func_end ov70_0226B92C - - thumb_func_start ov70_0226B998 -ov70_0226B998: ; 0x0226B998 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - str r0, [sp, #4] - add r5, r1, #0 - mov r0, #2 - ldrsh r1, [r5, r0] - mov r0, #0xc - add r6, r2, #0 - mul r0, r1 - mov r1, #0x30 - bl sub_020E1F6C - add r4, r0, #0 - ldr r0, _0226BABC ; =0x00000954 - ldr r1, [r5, r0] - cmp r4, r1 - beq _0226BA9C - str r4, [r5, r0] - cmp r4, #0 - beq _0226B9EA - mov r0, #0x30 - add r2, r6, #0 - mul r2, r0 - ldr r0, _0226BAC0 ; =0x0226E510 - lsl r1, r4, #2 - add r0, r0, r2 - add r2, r1, r0 - ldrh r0, [r1, r0] - add r1, sp, #8 - strh r0, [r1, #4] - ldrh r0, [r2, #2] - strh r0, [r1, #6] - ldrh r2, [r1, #4] - add r0, r5, #0 - mov r1, #0x78 - add r0, #0xc - mul r1, r2 - add r0, r0, r1 - mov r1, #0 - bl sub_02017348 -_0226B9EA: - mov r0, #0x30 - add r2, r6, #0 - mul r2, r0 - ldr r0, _0226BAC4 ; =0x0226E514 - lsl r1, r4, #2 - add r0, r0, r2 - add r2, r1, r0 - ldrh r1, [r1, r0] - add r0, sp, #8 - strh r1, [r0] - ldrh r4, [r2, #2] - strh r4, [r0, #2] - cmp r4, #0 - beq _0226BA8A - beq _0226BA1C - lsl r7, r4, #0xc - add r0, r7, #0 - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226BA2C -_0226BA1C: - lsl r7, r4, #0xc - add r0, r7, #0 - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226BA2C: - add r1, sp, #8 - ldrh r6, [r1] - bl sub_020E1740 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #0 - bl ov70_02269A90 - cmp r4, #0 - beq _0226BA58 - add r0, r7, #0 - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226BA66 -_0226BA58: - add r0, r7, #0 - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226BA66: - bl sub_020E1740 - str r0, [sp] - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - mov r3, #1 - bl ov70_02269A90 - add r1, r5, #0 - mov r0, #0x78 - add r1, #0xc - mul r0, r6 - add r0, r1, r0 - mov r1, #1 - bl sub_02017348 - b _0226BA9C -_0226BA8A: - ldrh r1, [r0] - add r2, r5, #0 - mov r0, #0x78 - mul r0, r1 - add r2, #0xc - add r0, r2, r0 - mov r1, #0 - bl sub_02017348 -_0226BA9C: - mov r0, #2 - ldrsh r0, [r5, r0] - cmp r0, #0x30 - bge _0226BAA8 - add r0, r0, #1 - strh r0, [r5, #2] -_0226BAA8: - mov r0, #2 - ldrsh r0, [r5, r0] - cmp r0, #0x30 - blt _0226BAB6 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0226BAB6: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BABC: .word 0x00000954 -_0226BAC0: .word 0x0226E510 -_0226BAC4: .word 0x0226E514 - thumb_func_end ov70_0226B998 - - thumb_func_start ov70_0226BAC8 -ov70_0226BAC8: ; 0x0226BAC8 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - add r7, r1, #0 - mov r4, #0 - str r2, [sp, #4] - add r0, r2, #0 - beq _0226BB1C - add r5, r7, #0 - add r5, #0xc -_0226BADC: - add r3, r4, #6 - lsl r6, r3, #2 - ldr r3, _0226BB2C ; =0x0226E5A4 - ldr r0, [sp] - add r1, r7, #0 - add r2, r4, #0 - add r3, r3, r6 - bl ov70_02269828 - ldr r0, [r7, #8] - add r1, sp, #8 - bl ov70_0225D054 - mov r0, #2 - ldr r1, [sp, #0xc] - lsl r0, r0, #0xe - add r2, r1, r0 - ldr r1, [sp, #8] - ldr r3, [sp, #0x10] - add r0, r5, #0 - str r2, [sp, #0xc] - bl sub_02017350 - add r0, r5, #0 - mov r1, #0 - bl sub_02017348 - ldr r0, [sp, #4] - add r4, r4, #1 - add r5, #0x78 - cmp r4, r0 - blo _0226BADC -_0226BB1C: - ldr r0, _0226BB30 ; =0x00000954 - mov r1, #0xff - strh r1, [r7, r0] - add r1, r0, #2 - ldr r0, [sp, #4] - strh r0, [r7, r1] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BB2C: .word 0x0226E5A4 -_0226BB30: .word 0x00000954 - thumb_func_end ov70_0226BAC8 - - thumb_func_start ov70_0226BB34 -ov70_0226BB34: ; 0x0226BB34 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp] - ldr r0, [r1, #8] - str r1, [sp, #4] - add r1, sp, #8 - bl ov70_0225D054 - mov r0, #0xa - ldr r7, [sp, #4] - mov r4, #0 - ldr r1, [sp, #0x10] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x10] - mov r0, #1 - ldr r1, [sp, #8] - lsl r0, r0, #0xe - sub r1, r1, r0 - str r1, [sp, #8] - ldr r1, [sp, #0xc] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0xc] - add r5, r4, #0 - add r7, #0xc -_0226BB68: - add r3, r4, #0 - add r3, #0x25 - lsl r6, r3, #2 - ldr r3, _0226BBA4 ; =0x0226E5A4 - add r2, r4, #0 - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, #0x10 - add r3, r3, r6 - bl ov70_02269828 - add r1, r4, #0 - add r1, #0x10 - mov r0, #0x78 - mul r0, r1 - ldr r1, [sp, #8] - ldr r2, [sp, #0xc] - ldr r3, [sp, #0x10] - add r0, r7, r0 - add r1, r1, r5 - bl sub_02017350 - mov r0, #6 - lsl r0, r0, #0xe - add r4, r4, #1 - add r5, r5, r0 - cmp r4, #2 - blt _0226BB68 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BBA4: .word 0x0226E5A4 - thumb_func_end ov70_0226BB34 - - thumb_func_start ov70_0226BBA8 -ov70_0226BBA8: ; 0x0226BBA8 - push {r3, r4, r5, r6, r7, lr} - ldr r0, _0226BBD8 ; =0x00000D0C - mov r2, #1 - strh r2, [r1, r0] - add r4, r1, #0 - mov r5, #0 - add r0, r0, #2 - strh r5, [r1, r0] - add r4, #0xc - add r7, r2, #0 - mov r6, #0x78 -_0226BBBE: - add r0, r5, #0 - add r0, #0x10 - add r1, r0, #0 - mul r1, r6 - add r0, r4, r1 - add r1, r7, #0 - bl sub_02017348 - add r5, r5, #1 - cmp r5, #2 - blt _0226BBBE - pop {r3, r4, r5, r6, r7, pc} - nop -_0226BBD8: .word 0x00000D0C - thumb_func_end ov70_0226BBA8 - - thumb_func_start ov70_0226BBDC -ov70_0226BBDC: ; 0x0226BBDC - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r1, _0226BC38 ; =0x00000D0C - add r7, r0, #0 - ldrh r0, [r5, r1] - cmp r0, #0 - beq _0226BC36 - add r0, r1, #2 - ldrh r0, [r5, r0] - cmp r0, #0xd - bhs _0226BBFE - add r0, r1, #2 - ldrh r0, [r5, r0] - add r2, r0, #1 - add r0, r1, #2 - strh r2, [r5, r0] - b _0226BC02 -_0226BBFE: - mov r0, #0 - strh r0, [r5, r1] -_0226BC02: - add r6, r5, #0 - mov r4, #0 - add r6, #0xc -_0226BC08: - ldr r0, _0226BC3C ; =0x00000D0E - ldrh r0, [r5, r0] - cmp r0, #0xd - bhs _0226BC20 - add r2, r4, #0 - add r0, r7, #0 - add r1, r5, #0 - add r2, #0x10 - mov r3, #0 - bl ov70_022699BC - b _0226BC30 -_0226BC20: - add r1, r4, #0 - add r1, #0x10 - mov r0, #0x78 - mul r0, r1 - add r0, r6, r0 - mov r1, #0 - bl sub_02017348 -_0226BC30: - add r4, r4, #1 - cmp r4, #2 - blt _0226BC08 -_0226BC36: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BC38: .word 0x00000D0C -_0226BC3C: .word 0x00000D0E - thumb_func_end ov70_0226BBDC - - thumb_func_start ov70_0226BC40 -ov70_0226BC40: ; 0x0226BC40 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, [sp, #0x30] - mov r7, #2 - str r0, [sp, #0x30] - ldr r0, [sp, #0x34] - mov r6, #1 - str r0, [sp, #0x34] - mov r0, #0x3b - lsl r0, r0, #4 - str r1, [r5, r0] - add r1, r0, #4 - ldr r4, [sp, #0x34] - strh r2, [r5, r1] - add r0, r0, #6 - strh r3, [r5, r0] - mov r0, #0 - str r0, [sp, #0x14] - mov r0, #3 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - add r4, #0xc - str r0, [sp, #0xc] -_0226BC70: - ldr r1, [sp, #0x10] - mov r0, #0x78 - mul r0, r1 - add r0, r4, r0 - str r0, [sp] - ldr r0, [sp, #0x34] - ldr r2, [sp, #0xc] - ldr r0, [r0, #8] - mov r1, #0x78 - mul r1, r2 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - mov r2, #0x78 - mov r3, #0x78 - mul r2, r6 - mul r3, r7 - str r0, [sp, #8] - add r0, r5, #0 - add r1, r4, r1 - add r2, r4, r2 - add r3, r4, r3 - bl ov70_0226BD64 - ldr r0, [sp, #0x10] - add r7, r7, #4 - add r0, r0, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #0xc] - add r6, r6, #4 - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [sp, #0x14] - add r5, #0xec - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #4 - blt _0226BC70 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226BC40 - - thumb_func_start ov70_0226BCC0 -ov70_0226BCC0: ; 0x0226BCC0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0xed - lsl r0, r0, #2 - ldrh r0, [r5, r0] - str r1, [sp] - cmp r0, #0 - ble _0226BD2E - ldr r4, [sp, #8] - add r6, sp, #0x10 -_0226BCDC: - mov r0, #0x3b - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r0, r4 - ldrh r0, [r0, r4] - strh r0, [r6] - ldrh r0, [r1, #2] - strh r0, [r6, #2] - ldrh r1, [r6] - ldr r0, [sp] - cmp r1, r0 - bne _0226BD1A - ldrb r7, [r6, #2] - cmp r7, #4 - blo _0226BCFE - bl sub_02022974 -_0226BCFE: - ldrb r0, [r6, #3] - str r0, [sp, #4] - cmp r0, #4 - bls _0226BD0A - bl sub_02022974 -_0226BD0A: - mov r0, #0xec - mul r0, r7 - ldr r1, [sp, #4] - add r0, r5, r0 - bl ov70_0226BDA0 - mov r0, #1 - str r0, [sp, #8] -_0226BD1A: - ldr r0, [sp, #0xc] - add r4, r4, #4 - add r0, r0, #1 - str r0, [sp, #0xc] - mov r0, #0xed - lsl r0, r0, #2 - ldrh r1, [r5, r0] - ldr r0, [sp, #0xc] - cmp r0, r1 - blt _0226BCDC -_0226BD2E: - mov r7, #1 - mov r6, #0 - add r4, r5, #0 -_0226BD34: - add r0, r4, #0 - bl ov70_0226BDE8 - cmp r0, #0 - bne _0226BD40 - mov r7, #0 -_0226BD40: - add r6, r6, #1 - add r4, #0xec - cmp r6, #4 - blt _0226BD34 - ldr r0, _0226BD60 ; =0x000003B6 - ldrh r1, [r5, r0] - ldr r0, [sp] - cmp r1, r0 - bhi _0226BD5A - cmp r7, #1 - bne _0226BD5A - mov r0, #2 - str r0, [sp, #8] -_0226BD5A: - ldr r0, [sp, #8] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BD60: .word 0x000003B6 - thumb_func_end ov70_0226BCC0 - - thumb_func_start ov70_0226BD64 -ov70_0226BD64: ; 0x0226BD64 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [sp, #0x20] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #3 - blo _0226BD78 - bl sub_02022974 -_0226BD78: - add r0, r5, #0 - add r0, #0xd8 - str r4, [r0, #0] - add r0, r5, #0 - add r0, #0xdc - str r6, [r0, #0] - add r0, r5, #0 - add r0, #0xe0 - str r7, [r0, #0] - add r0, r5, #0 - ldr r1, [sp, #0x18] - add r0, #0xe4 - str r1, [r0, #0] - add r0, r5, #0 - ldr r1, [sp, #0x1c] - add r0, #0xe8 - str r1, [r0, #0] - ldr r0, [sp, #0x20] - strh r0, [r5, #2] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0226BD64 - - thumb_func_start ov70_0226BDA0 -ov70_0226BDA0: ; 0x0226BDA0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - ldr r4, _0226BDE0 ; =0x00000000 - beq _0226BDC0 - add r5, r7, #0 -_0226BDAC: - add r0, r5, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02017348 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r6 - blo _0226BDAC -_0226BDC0: - mov r0, #0 - strh r0, [r7] - mov r0, #1 - strb r0, [r7, #6] - strh r6, [r7, #4] - ldrh r2, [r7, #2] - add r1, r7, #0 - add r1, #0xe8 - lsl r3, r2, #2 - ldr r2, _0226BDE4 ; =0x0226E364 - ldr r1, [r1, #0] - ldr r2, [r2, r3] - add r0, r7, #0 - blx r2 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226BDE0: .word 0x00000000 -_0226BDE4: .word 0x0226E364 - thumb_func_end ov70_0226BDA0 - - thumb_func_start ov70_0226BDE8 -ov70_0226BDE8: ; 0x0226BDE8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrb r1, [r5, #6] - cmp r1, #0 - bne _0226BDF6 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0226BDF6: - ldrh r1, [r5, #2] - lsl r2, r1, #2 - ldr r1, _0226BE38 ; =0x0226E31C - ldr r1, [r1, r2] - blx r1 - mov r6, #0 - str r0, [sp] - ldrsh r0, [r5, r6] - add r0, r0, #1 - strh r0, [r5] - ldr r0, [sp] - cmp r0, #1 - bne _0226BE34 - ldrh r0, [r5, #4] - cmp r0, #0 - ble _0226BE30 - add r4, r5, #0 - add r7, r6, #0 -_0226BE1A: - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r1, r7, #0 - bl sub_02017348 - ldrh r0, [r5, #4] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _0226BE1A -_0226BE30: - mov r0, #0 - strb r0, [r5, #6] -_0226BE34: - ldr r0, [sp] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BE38: .word 0x0226E31C - thumb_func_end ov70_0226BDE8 - - thumb_func_start ov70_0226BE3C -ov70_0226BE3C: ; 0x0226BE3C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - str r0, [sp, #0x10] - add r0, r1, #0 - add r1, sp, #0x24 - bl ov70_0225D054 - mov r1, #2 - ldr r0, [sp, #0x24] - lsl r1, r1, #0xe - add r0, r0, r1 - str r0, [sp, #0x24] - ldr r2, [sp, #0x28] - lsl r0, r1, #1 - add r0, r2, r0 - str r0, [sp, #0x28] - ldr r0, [sp, #0x2c] - mov r4, #0 - sub r0, r0, r1 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x10] - ldrh r0, [r0, #4] - cmp r0, #0 - ble _0226BF50 - ldr r0, [sp, #0x10] - str r0, [sp, #0x1c] - add r0, #8 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x10] - str r0, [sp, #0x18] - add r0, #0xa8 - str r0, [sp, #0x18] - ldr r0, [sp, #0x10] - str r0, [sp, #0x14] -_0226BE80: - cmp r4, #3 - bhi _0226BEFE - add r0, r4, r4 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226BE90: ; jump table - .short _0226BE98 - _0226BE90 - 2 ; case 0 - .short _0226BEB0 - _0226BE90 - 2 ; case 1 - .short _0226BEC8 - _0226BE90 - 2 ; case 2 - .short _0226BEE4 - _0226BE90 - 2 ; case 3 -_0226BE98: - mov r0, #3 - ldr r1, [sp, #0x24] - lsl r0, r0, #0xe - sub r7, r1, r0 - mov r0, #1 - ldr r1, [sp, #0x28] - lsl r0, r0, #0x10 - add r6, r1, r0 - ldr r5, [sp, #0x2c] - mov r0, #0 - str r0, [sp, #0x20] - b _0226BEFE -_0226BEB0: - mov r0, #3 - ldr r1, [sp, #0x24] - lsl r0, r0, #0xe - add r7, r1, r0 - mov r0, #1 - ldr r1, [sp, #0x28] - lsl r0, r0, #0x10 - add r6, r1, r0 - ldr r5, [sp, #0x2c] - ldr r0, _0226BF54 ; =0x00007FFF - str r0, [sp, #0x20] - b _0226BEFE -_0226BEC8: - mov r0, #2 - ldr r1, [sp, #0x24] - lsl r0, r0, #0xe - sub r7, r1, r0 - ldr r1, [sp, #0x28] - lsl r0, r0, #1 - add r6, r1, r0 - mov r0, #6 - ldr r1, [sp, #0x2c] - lsl r0, r0, #0xc - sub r5, r1, r0 - ldr r0, _0226BF54 ; =0x00007FFF - str r0, [sp, #0x20] - b _0226BEFE -_0226BEE4: - mov r0, #2 - ldr r1, [sp, #0x24] - lsl r0, r0, #0xe - add r7, r1, r0 - ldr r1, [sp, #0x28] - lsl r0, r0, #1 - add r6, r1, r0 - mov r0, #6 - ldr r1, [sp, #0x2c] - lsl r0, r0, #0xc - sub r5, r1, r0 - mov r0, #0 - str r0, [sp, #0x20] -_0226BEFE: - str r6, [sp] - ldr r0, [sp, #0x2c] - add r2, r7, #0 - str r0, [sp, #4] - str r5, [sp, #8] - mov r0, #0x12 - str r0, [sp, #0xc] - ldr r0, [sp, #0x1c] - ldr r1, [sp, #0x24] - ldr r3, [sp, #0x28] - bl ov70_022692B4 - mov r3, #6 - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x20] - ldr r2, _0226BF58 ; =0x00000CCC - lsl r3, r3, #0xc - bl ov70_0226949C - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x24] - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x2c] - bl sub_02017350 - ldr r0, [sp, #0x1c] - add r4, r4, #1 - add r0, #0x28 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x18] - add r0, #0xc - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r0, r0, #4 - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - ldrh r0, [r0, #4] - cmp r4, r0 - blt _0226BE80 -_0226BF50: - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226BF54: .word 0x00007FFF -_0226BF58: .word 0x00000CCC - thumb_func_end ov70_0226BE3C - - thumb_func_start ov70_0226BF5C -ov70_0226BF5C: ; 0x0226BF5C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, [sp] - ldrh r0, [r0, #4] - cmp r0, #0 - ble _0226BFDC - ldr r0, [sp] - ldr r6, [sp] - str r0, [sp, #4] - add r0, #0xa8 - add r6, #8 - ldr r5, [sp] - str r0, [sp, #4] - add r4, r0, #0 - add r7, r6, #0 -_0226BF80: - ldr r0, [sp, #4] - bl ov70_022694D0 - ldr r2, [sp] - mov r1, #0 - ldrsh r1, [r2, r1] - add r0, r6, #0 - bl ov70_022692DC - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0x10 - bl ov70_02269508 - add r0, r7, #0 - add r1, sp, #0x14 - add r2, sp, #0x18 - add r3, sp, #0x1c - bl ov70_02269488 - ldr r1, [sp, #0x14] - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x18] - add r1, r1, r0 - add r0, r5, #0 - str r1, [sp, #0x14] - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r3, [sp, #0x1c] - bl sub_02017350 - ldr r0, [sp, #4] - add r6, #0x28 - add r0, #0xc - str r0, [sp, #4] - ldr r0, [sp, #0xc] - add r4, #0xc - add r0, r0, #1 - str r0, [sp, #0xc] - ldr r0, [sp] - add r7, #0x28 - ldrh r1, [r0, #4] - ldr r0, [sp, #0xc] - add r5, r5, #4 - cmp r0, r1 - blt _0226BF80 -_0226BFDC: - ldr r0, [sp, #8] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226BF5C - - thumb_func_start ov70_0226BFE4 -ov70_0226BFE4: ; 0x0226BFE4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r0, [sp, #0x10] - add r0, r1, #0 - add r1, sp, #0x1c - bl ov70_0225D054 - mov r0, #2 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0xe - add r1, r1, r0 - str r1, [sp, #0x1c] - ldr r1, [sp, #0x20] - mov r4, #0 - add r1, r1, r0 - str r1, [sp, #0x20] - ldr r1, [sp, #0x24] - sub r0, r1, r0 - str r0, [sp, #0x24] - ldr r0, [sp, #0x10] - ldrh r0, [r0, #4] - cmp r0, #0 - ble _0226C0C6 - ldr r1, [sp, #0x10] - str r1, [sp, #0x18] - add r1, #8 - str r1, [sp, #0x18] - ldr r1, [sp, #0x10] - str r1, [sp, #0x14] - add r1, #0xa8 - str r1, [sp, #0x14] -_0226C022: - cmp r4, #3 - bhi _0226C08A - add r1, r4, r4 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226C032: ; jump table - .short _0226C03A - _0226C032 - 2 ; case 0 - .short _0226C04A - _0226C032 - 2 ; case 1 - .short _0226C05A - _0226C032 - 2 ; case 2 - .short _0226C07C - _0226C032 - 2 ; case 3 -_0226C03A: - mov r0, #1 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0x10 - sub r7, r1, r0 - ldr r1, [sp, #0x24] - ldr r6, [sp, #0x20] - add r5, r1, r0 - b _0226C08A -_0226C04A: - mov r0, #1 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0x10 - add r7, r1, r0 - ldr r1, [sp, #0x24] - ldr r6, [sp, #0x20] - add r5, r1, r0 - b _0226C08A -_0226C05A: - cmp r0, #3 - bne _0226C06C - mov r0, #2 - ldr r1, [sp, #0x24] - lsl r0, r0, #0x10 - ldr r7, [sp, #0x1c] - ldr r6, [sp, #0x20] - sub r5, r1, r0 - b _0226C08A -_0226C06C: - mov r0, #1 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0x10 - sub r7, r1, r0 - ldr r1, [sp, #0x24] - ldr r6, [sp, #0x20] - sub r5, r1, r0 - b _0226C08A -_0226C07C: - mov r0, #1 - ldr r1, [sp, #0x1c] - lsl r0, r0, #0x10 - add r7, r1, r0 - ldr r1, [sp, #0x24] - ldr r6, [sp, #0x20] - sub r5, r1, r0 -_0226C08A: - str r6, [sp] - ldr r0, [sp, #0x24] - add r2, r7, #0 - str r0, [sp, #4] - str r5, [sp, #8] - mov r0, #0x13 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - ldr r1, [sp, #0x1c] - ldr r3, [sp, #0x20] - bl ov70_022692B4 - mov r3, #2 - ldr r0, [sp, #0x14] - ldr r1, _0226C0D0 ; =0x00001555 - ldr r2, _0226C0D4 ; =0x0000071C - lsl r3, r3, #0x10 - bl ov70_0226949C - ldr r0, [sp, #0x18] - add r4, r4, #1 - add r0, #0x28 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r0, #0xc - str r0, [sp, #0x14] - ldr r0, [sp, #0x10] - ldrh r0, [r0, #4] - cmp r4, r0 - blt _0226C022 -_0226C0C6: - ldr r0, [sp, #0x10] - bl ov70_0226C0D8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C0D0: .word 0x00001555 -_0226C0D4: .word 0x0000071C - thumb_func_end ov70_0226BFE4 - - thumb_func_start ov70_0226C0D8 -ov70_0226C0D8: ; 0x0226C0D8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0 - str r0, [sp, #8] - ldrh r0, [r5, #4] - cmp r0, #0 - ble _0226C16A - add r4, r5, #0 - add r0, r5, #0 - add r4, #0xa8 - str r0, [sp, #4] - add r0, #8 - str r0, [sp, #4] - str r4, [sp] - add r6, r0, #0 - add r7, r5, #0 -_0226C0FA: - mov r0, #0 - ldrsh r0, [r5, r0] - cmp r0, #0xe - bne _0226C112 - mov r3, #3 - ldr r2, _0226C178 ; =0x00000E38 - add r0, r4, #0 - mov r1, #0 - lsl r3, r3, #0xe - bl ov70_0226949C - b _0226C118 -_0226C112: - add r0, r4, #0 - bl ov70_022694D0 -_0226C118: - mov r1, #0 - ldrsh r1, [r5, r1] - ldr r0, [sp, #4] - bl ov70_022692DC - ldr r0, [sp] - add r1, sp, #0xc - bl ov70_02269508 - add r0, r6, #0 - add r1, sp, #0x10 - add r2, sp, #0x14 - add r3, sp, #0x18 - bl ov70_02269488 - ldr r1, [sp, #0x14] - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x18] - add r2, r1, r0 - add r0, r7, #0 - str r2, [sp, #0x14] - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x10] - bl sub_02017350 - ldr r0, [sp, #4] - ldrh r1, [r5, #4] - add r0, #0x28 - str r0, [sp, #4] - ldr r0, [sp] - add r4, #0xc - add r0, #0xc - str r0, [sp] - ldr r0, [sp, #8] - add r6, #0x28 - add r0, r0, #1 - add r7, r7, #4 - str r0, [sp, #8] - cmp r0, r1 - blt _0226C0FA -_0226C16A: - mov r0, #0 - ldrsh r1, [r5, r0] - cmp r1, #0x16 - blt _0226C174 - mov r0, #1 -_0226C174: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C178: .word 0x00000E38 - thumb_func_end ov70_0226C0D8 - - thumb_func_start ov70_0226C17C -ov70_0226C17C: ; 0x0226C17C - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - add r0, r1, #0 - add r1, sp, #0x10 - bl ov70_0225D054 - mov r1, #2 - ldr r0, [sp, #0x10] - lsl r1, r1, #0xe - add r0, r0, r1 - str r0, [sp, #0x10] - mov r0, #5 - ldr r2, [sp, #0x14] - lsl r0, r0, #0xe - add r0, r2, r0 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - mov r4, #0 - sub r0, r0, r1 - str r0, [sp, #0x18] - ldrh r0, [r5, #4] - cmp r0, #0 - ble _0226C1D8 - mov r6, #5 - mov r7, #7 - lsl r6, r6, #0xc - lsl r7, r7, #0xc -_0226C1B4: - str r6, [sp] - mov r0, #0xe - mov r3, #0xd - str r7, [sp, #4] - lsl r0, r0, #0xc - str r0, [sp, #8] - mov r0, #8 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r4, #0 - add r2, sp, #0x10 - lsl r3, r3, #0xc - bl ov70_0226C2A4 - ldrh r0, [r5, #4] - add r4, r4, #1 - cmp r4, r0 - blt _0226C1B4 -_0226C1D8: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_0226C17C - - thumb_func_start ov70_0226C1DC -ov70_0226C1DC: ; 0x0226C1DC - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r5, r0, #0 - ldrh r0, [r5, #4] - mov r6, #0 - cmp r0, #0 - ble _0226C27E - add r4, r5, #0 - str r4, [sp, #0x10] - add r4, #8 - str r4, [sp, #0x10] - add r7, r5, #0 -_0226C1F4: - mov r1, #0 - ldrsh r1, [r5, r1] - ldr r0, [sp, #0x10] - bl ov70_022692DC - str r0, [sp, #0x14] - add r0, r4, #0 - add r1, sp, #0x18 - add r2, sp, #0x1c - add r3, sp, #0x20 - bl ov70_02269488 - add r0, r7, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r1, [sp, #0x18] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x20] - bl sub_02017350 - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _0226C26C - ldrb r0, [r5, #7] - add r2, sp, #0x18 - cmp r0, #0 - bne _0226C24A - mov r0, #1 - lsl r0, r0, #0xe - str r0, [sp] - ldr r0, _0226C2A0 ; =0xFFFFD000 - ldr r3, _0226C2A0 ; =0xFFFFD000 - str r0, [sp, #4] - mov r0, #3 - lsl r0, r0, #0xc - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl ov70_0226C2A4 - b _0226C26C -_0226C24A: - mov r0, #5 - lsl r0, r0, #0xc - str r0, [sp] - mov r0, #6 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0xa - lsl r0, r0, #0xc - str r0, [sp, #8] - mov r0, #4 - mov r3, #0xa - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - lsl r3, r3, #0xc - bl ov70_0226C2A4 -_0226C26C: - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r0, #0x28 - str r0, [sp, #0x10] - ldrh r0, [r5, #4] - add r4, #0x28 - add r7, r7, #4 - cmp r6, r0 - blt _0226C1F4 -_0226C27E: - ldr r0, [sp, #0x14] - cmp r0, #1 - bne _0226C29A - ldrb r0, [r5, #7] - add r0, r0, #1 - cmp r0, #3 - bge _0226C294 - strb r0, [r5, #7] - mov r0, #0 - strh r0, [r5] - b _0226C29A -_0226C294: - add sp, #0x24 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0226C29A: - mov r0, #0 - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C2A0: .word 0xFFFFD000 - thumb_func_end ov70_0226C1DC - - thumb_func_start ov70_0226C2A4 -ov70_0226C2A4: ; 0x0226C2A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r7, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r5, #3 - bhi _0226C302 - add r3, r5, r5 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_0226C2C0: ; jump table - .short _0226C2C8 - _0226C2C0 - 2 ; case 0 - .short _0226C2D6 - _0226C2C0 - 2 ; case 1 - .short _0226C2E4 - _0226C2C0 - 2 ; case 2 - .short _0226C2F4 - _0226C2C0 - 2 ; case 3 -_0226C2C8: - ldr r0, [r4, #0] - ldr r1, [r4, #4] - sub r2, r0, r6 - ldr r0, [sp, #0x28] - add r0, r1, r0 - ldr r1, [r4, #8] - b _0226C302 -_0226C2D6: - ldr r0, [r4, #0] - ldr r1, [r4, #4] - add r2, r0, r6 - ldr r0, [sp, #0x28] - add r0, r1, r0 - ldr r1, [r4, #8] - b _0226C302 -_0226C2E4: - ldr r1, [r4, #0] - ldr r0, [sp, #0x2c] - sub r2, r1, r0 - ldr r1, [r4, #4] - ldr r0, [sp, #0x30] - add r0, r1, r0 - ldr r1, [r4, #8] - b _0226C302 -_0226C2F4: - ldr r1, [r4, #0] - ldr r0, [sp, #0x2c] - add r2, r1, r0 - ldr r1, [r4, #4] - ldr r0, [sp, #0x30] - add r0, r1, r0 - ldr r1, [r4, #8] -_0226C302: - str r0, [sp] - ldr r0, [r4, #8] - str r0, [sp, #4] - str r1, [sp, #8] - ldr r0, [sp, #0x34] - add r1, r7, #0 - str r0, [sp, #0xc] - mov r0, #0x28 - add r1, #8 - mul r0, r5 - add r0, r1, r0 - ldr r1, [r4, #0] - ldr r3, [r4, #4] - bl ov70_022692B4 - lsl r0, r5, #2 - add r0, r7, r0 - add r0, #0xd8 - ldr r0, [r0, #0] - ldr r1, [r4, #0] - ldr r2, [r4, #4] - ldr r3, [r4, #8] - bl sub_02017350 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C2A4 - - thumb_func_start ov70_0226C338 -ov70_0226C338: ; 0x0226C338 - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x60 - add r6, r2, #0 - bl sub_02018144 - mov r1, #0 - mov r2, #0x60 - add r4, r0, #0 - bl sub_020D5124 - mov r1, #0xa - ldr r2, _0226C394 ; =0x0226E678 - mul r1, r5 - add r0, r4, #0 - add r1, r2, r1 - bl ov70_0226C568 - ldr r2, _0226C398 ; =0x0226E670 - lsl r1, r6, #1 - add r0, r4, #0 - add r1, r2, r1 - bl ov70_0226C58C - mov r1, #0 - add r2, r4, #0 - mov r0, #0x3c -_0226C36E: - add r1, r1, #1 - str r0, [r2, #0x48] - add r2, r2, #4 - cmp r1, #2 - blt _0226C36E - mov r2, #0 - add r1, r4, #0 - mov r0, #0x3c -_0226C37E: - add r2, r2, #1 - str r0, [r1, #0x50] - add r1, r1, #4 - cmp r2, #4 - blt _0226C37E - add r0, r4, #0 - bl ov70_0226C598 - add r0, r4, #0 - pop {r4, r5, r6, pc} - nop -_0226C394: .word 0x0226E678 -_0226C398: .word 0x0226E670 - thumb_func_end ov70_0226C338 - - thumb_func_start ov70_0226C39C -ov70_0226C39C: ; 0x0226C39C - ldr r3, _0226C3A0 ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_0226C3A0: .word sub_020181C4 - thumb_func_end ov70_0226C39C - - thumb_func_start ov70_0226C3A4 -ov70_0226C3A4: ; 0x0226C3A4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp, #4] - ldr r4, [sp, #4] - mov r0, #0 - add r6, r4, #0 - add r5, r4, #0 - add r7, r0, #0 - add r6, #0x30 - add r5, #0x18 -_0226C3B8: - ldr r1, [r4, #0x48] - add r1, r1, #1 - cmp r1, #0x3c - bgt _0226C3D4 - str r1, [r4, #0x48] - mov r0, #0x3c - str r0, [sp] - ldr r3, [r4, #0x48] - add r0, r5, #0 - add r1, r6, #0 - add r2, r4, #0 - bl ov70_0226C50C - mov r0, #1 -_0226C3D4: - add r7, r7, #1 - add r4, r4, #4 - add r6, r6, #4 - add r5, r5, #4 - cmp r7, #2 - blt _0226C3B8 - ldr r4, [sp, #4] - mov r1, #0 - add r7, r4, #0 - add r6, r4, #0 - add r5, r4, #0 - str r1, [sp, #8] - add r7, #8 - add r6, #0x38 - add r5, #0x20 -_0226C3F2: - ldr r1, [r4, #0x50] - add r1, r1, #1 - cmp r1, #0x3c - bgt _0226C40E - str r1, [r4, #0x50] - mov r0, #0x3c - str r0, [sp] - ldr r3, [r4, #0x50] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov70_0226C50C - mov r0, #1 -_0226C40E: - ldr r1, [sp, #8] - add r4, r4, #4 - add r1, r1, #1 - add r7, r7, #4 - add r6, r6, #4 - add r5, r5, #4 - str r1, [sp, #8] - cmp r1, #4 - blt _0226C3F2 - cmp r0, #0 - beq _0226C42A - ldr r0, [sp, #4] - bl ov70_0226C598 -_0226C42A: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C3A4 - - thumb_func_start ov70_0226C430 -ov70_0226C430: ; 0x0226C430 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldrb r0, [r5] - ldr r2, _0226C49C ; =0x0226E678 - strb r0, [r5, #0x18] - ldrb r0, [r5, #1] - strb r0, [r5, #0x19] - ldrb r0, [r5, #2] - strb r0, [r5, #0x1a] - ldrb r0, [r5, #3] - strb r0, [r5, #0x1b] - mov r0, #0 - str r0, [r5, #0x48] - mov r0, #0xa - mul r0, r1 - add r4, r2, r0 - add r0, r5, #0 - add r0, #0x30 - add r1, r4, #0 - bl ov70_0226C4E8 - add r6, r4, #2 - add r4, r5, #0 - mov r7, #0 - add r4, #0x38 -_0226C462: - ldrb r1, [r5, #8] - add r0, r5, #0 - add r0, #0x20 - strb r1, [r0] - add r0, r5, #0 - ldrb r1, [r5, #9] - add r0, #0x21 - strb r1, [r0] - add r0, r5, #0 - ldrb r1, [r5, #0xa] - add r0, #0x22 - strb r1, [r0] - add r0, r5, #0 - ldrb r1, [r5, #0xb] - add r0, #0x23 - strb r1, [r0] - mov r0, #0 - str r0, [r5, #0x50] - add r0, r4, #0 - add r1, r6, #0 - bl ov70_0226C4E8 - add r7, r7, #1 - add r5, r5, #4 - add r6, r6, #2 - add r4, r4, #4 - cmp r7, #4 - blt _0226C462 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226C49C: .word 0x0226E678 - thumb_func_end ov70_0226C430 - - thumb_func_start ov70_0226C4A0 -ov70_0226C4A0: ; 0x0226C4A0 - ldrb r2, [r0, #4] - ldr r3, _0226C4C0 ; =ov70_0226C4E8 - lsl r1, r1, #1 - strb r2, [r0, #0x1c] - ldrb r2, [r0, #5] - strb r2, [r0, #0x1d] - ldrb r2, [r0, #6] - strb r2, [r0, #0x1e] - ldrb r2, [r0, #7] - strb r2, [r0, #0x1f] - mov r2, #0 - str r2, [r0, #0x4c] - ldr r2, _0226C4C4 ; =0x0226E670 - add r0, #0x34 - add r1, r2, r1 - bx r3 - ; .align 2, 0 -_0226C4C0: .word ov70_0226C4E8 -_0226C4C4: .word 0x0226E670 - thumb_func_end ov70_0226C4A0 - - thumb_func_start ov70_0226C4C8 -ov70_0226C4C8: ; 0x0226C4C8 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226C4C8 - - thumb_func_start ov70_0226C4CC -ov70_0226C4CC: ; 0x0226C4CC - push {r3, r4} - mov r3, #0 - mov r2, #2 - ldrsb r4, [r0, r3] - ldrsb r2, [r0, r2] - mov r3, #1 - ldrsb r0, [r0, r3] - lsl r2, r2, #0xa - lsl r0, r0, #5 - orr r0, r4 - orr r0, r2 - strh r0, [r1] - pop {r3, r4} - bx lr - thumb_func_end ov70_0226C4CC - - thumb_func_start ov70_0226C4E8 -ov70_0226C4E8: ; 0x0226C4E8 - push {r3, r4} - ldrh r3, [r1] - mov r2, #0x1f - and r3, r2 - strb r3, [r0] - ldrh r4, [r1] - lsl r3, r2, #5 - and r3, r4 - asr r3, r3, #5 - strb r3, [r0, #1] - ldrh r3, [r1] - lsl r1, r2, #0xa - and r1, r3 - asr r1, r1, #0xa - strb r1, [r0, #2] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226C4E8 - - thumb_func_start ov70_0226C50C -ov70_0226C50C: ; 0x0226C50C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #1 - add r4, r2, #0 - ldrsb r2, [r1, r0] - ldrsb r0, [r5, r0] - add r6, r3, #0 - sub r0, r2, r0 - str r0, [sp, #4] - mov r0, #2 - ldrsb r2, [r1, r0] - ldrsb r0, [r5, r0] - sub r0, r2, r0 - str r0, [sp] - mov r0, #0 - ldrsb r7, [r5, r0] - ldrsb r0, [r1, r0] - ldr r1, [sp, #0x20] - sub r0, r0, r7 - mul r0, r6 - bl sub_020E1F6C - add r0, r7, r0 - strb r0, [r4] - ldr r0, [sp, #4] - ldr r1, [sp, #0x20] - mul r0, r6 - bl sub_020E1F6C - mov r1, #1 - ldrsb r1, [r5, r1] - add r0, r1, r0 - strb r0, [r4, #1] - ldr r0, [sp] - ldr r1, [sp, #0x20] - mul r0, r6 - bl sub_020E1F6C - mov r1, #2 - ldrsb r1, [r5, r1] - add r0, r1, r0 - strb r0, [r4, #2] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C50C - - thumb_func_start ov70_0226C568 -ov70_0226C568: ; 0x0226C568 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov70_0226C4E8 - mov r6, #0 - add r4, r4, #2 - add r5, #8 -_0226C578: - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226C4E8 - add r6, r6, #1 - add r4, r4, #2 - add r5, r5, #4 - cmp r6, #4 - blt _0226C578 - pop {r4, r5, r6, pc} - thumb_func_end ov70_0226C568 - - thumb_func_start ov70_0226C58C -ov70_0226C58C: ; 0x0226C58C - ldr r3, _0226C594 ; =ov70_0226C4E8 - add r0, r0, #4 - bx r3 - nop -_0226C594: .word ov70_0226C4E8 - thumb_func_end ov70_0226C58C - - thumb_func_start ov70_0226C598 -ov70_0226C598: ; 0x0226C598 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, sp, #4 - str r0, [sp] - mov r4, #0 - add r5, r0, #0 - add r7, #2 - add r6, sp, #4 -_0226C5A8: - add r0, r5, #0 - add r1, r7, #0 - bl ov70_0226C4CC - ldrh r1, [r6, #2] - add r0, r4, #0 - bl sub_020AF558 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0226C5A8 - ldr r0, [sp] - add r1, sp, #4 - add r0, #8 - add r1, #2 - bl ov70_0226C4CC - ldr r0, [sp] - add r1, sp, #4 - add r0, #0xc - bl ov70_0226C4CC - add r1, sp, #4 - ldrh r0, [r1, #2] - ldrh r1, [r1] - mov r2, #0 - bl sub_020AF56C - ldr r0, [sp] - add r1, sp, #4 - add r0, #0x10 - add r1, #2 - bl ov70_0226C4CC - ldr r0, [sp] - add r1, sp, #4 - add r0, #0x14 - str r0, [sp] - bl ov70_0226C4CC - add r1, sp, #4 - ldrh r0, [r1, #2] - ldrh r1, [r1] - mov r2, #0 - bl sub_020AF590 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C598 - - thumb_func_start ov70_0226C60C -ov70_0226C60C: ; 0x0226C60C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - mov r1, #0x1c - add r6, r0, #0 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x1c - mov r0, #0 -_0226C622: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0226C622 - str r5, [r4, #0] - add r0, r5, #0 - bl ov70_0225DEE8 - str r0, [r4, #4] - add r0, r5, #0 - bl ov70_0225DEF8 - str r0, [r4, #8] - add r0, r5, #0 - bl ov70_0225DEF0 - str r0, [r4, #0xc] - ldr r0, [r4, #4] - bl ov66_0222E1B8 - bl ov70_0226C81C - add r7, r0, #0 - ldr r0, [r4, #4] - bl ov66_0222E1D0 - bl ov70_0226C848 - str r0, [sp, #4] - ldr r0, [r4, #4] - bl ov66_0222E1E8 - bl ov70_0226C87C - add r3, r0, #0 - ldr r2, [sp, #4] - add r0, r6, #0 - add r1, r7, #0 - bl ov70_0226C338 - str r0, [r4, #0x10] - add r0, r5, #0 - add r1, r6, #0 - bl ov70_0226CE54 - str r0, [r4, #0x14] - ldr r0, [r4, #4] - ldr r1, [r4, #8] - add r2, r6, #0 - bl ov70_0226C8B4 - str r0, [r4, #0x18] - ldr r0, [r4, #0xc] - add r1, r7, #0 - bl ov70_0225CAEC - ldr r0, [r4, #4] - bl ov66_0222E158 - add r5, r0, #0 - ldr r0, [r4, #4] - bl ov66_0222E120 - ldr r0, [r4, #4] - bl ov66_0222E170 - str r0, [sp] - ldr r0, [r4, #4] - bl ov66_0222E19C - add r7, r0, #0 - ldr r0, [r4, #4] - bl ov66_0222E12C - add r6, r0, #0 - ldr r0, [r4, #4] - bl ov66_0222E190 - cmp r5, #2 - bne _0226C6C8 - ldr r0, [r4, #8] - bl ov70_0226260C -_0226C6C8: - cmp r5, #1 - beq _0226C6DC - cmp r5, #0 - bne _0226C6DC - cmp r7, #1 - bne _0226C6DC - ldr r0, [r4, #8] - mov r1, #3 - bl ov70_02262658 -_0226C6DC: - ldr r0, [sp] - cmp r0, #1 - bne _0226C6E8 - ldr r0, [r4, #8] - bl ov70_0226246C -_0226C6E8: - cmp r6, #1 - bne _0226C6F2 - add r0, r4, #0 - bl ov70_0226C8A8 -_0226C6F2: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0226C60C - - thumb_func_start ov70_0226C6F8 -ov70_0226C6F8: ; 0x0226C6F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl ov70_0226C914 - ldr r0, [r4, #0x14] - bl ov70_0226CF38 - ldr r0, [r4, #0x10] - bl ov70_0226C39C - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C6F8 - - thumb_func_start ov70_0226C718 -ov70_0226C718: ; 0x0226C718 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - mov r1, #1 - bl ov66_0222E084 - cmp r0, #0 - beq _0226C744 - ldr r0, [r5, #4] - bl ov66_0222E1B8 - bl ov70_0226C81C - add r4, r0, #0 - ldr r0, [r5, #0x10] - add r1, r4, #0 - bl ov70_0226C430 - ldr r0, [r5, #0xc] - add r1, r4, #0 - bl ov70_0225CB08 -_0226C744: - ldr r0, [r5, #4] - mov r1, #2 - bl ov66_0222E084 - cmp r0, #0 - beq _0226C762 - ldr r0, [r5, #4] - bl ov66_0222E1D0 - bl ov70_0226C848 - add r1, r0, #0 - ldr r0, [r5, #0x10] - bl ov70_0226C4A0 -_0226C762: - ldr r0, [r5, #4] - mov r1, #3 - bl ov66_0222E084 - cmp r0, #0 - beq _0226C780 - ldr r0, [r5, #4] - bl ov66_0222E1E8 - bl ov70_0226C87C - add r1, r0, #0 - ldr r0, [r5, #0x10] - bl ov70_0226C4C8 -_0226C780: - ldr r0, [r5, #4] - bl ov66_0222E19C - cmp r0, #1 - bne _0226C7A6 - ldr r0, [r5, #4] - bl ov66_0222E158 - cmp r0, #0 - bne _0226C7A6 - ldr r0, [r5, #8] - bl ov70_0226271C - cmp r0, #0 - bne _0226C7A6 - ldr r0, [r5, #8] - mov r1, #1 - bl ov70_02262658 -_0226C7A6: - ldr r0, [r5, #4] - mov r1, #5 - bl ov66_0222E084 - cmp r0, #0 - beq _0226C7CA - ldr r0, [r5, #4] - bl ov66_0222E158 - cmp r0, #1 - bne _0226C7CA - ldr r0, [r5, #8] - bl ov70_0226260C - ldr r0, [r5, #8] - mov r1, #2 - bl ov70_02262658 -_0226C7CA: - ldr r0, [r5, #4] - mov r1, #6 - bl ov66_0222E084 - cmp r0, #0 - beq _0226C7E6 - ldr r0, [r5, #4] - bl ov66_0222E170 - cmp r0, #1 - bne _0226C7E6 - ldr r0, [r5, #8] - bl ov70_0226246C -_0226C7E6: - ldr r0, [r5, #4] - bl ov66_0222E12C - cmp r0, #1 - bne _0226C7FC - ldr r0, [r5, #8] - bl ov70_02262478 - add r0, r5, #0 - bl ov70_0226C8A8 -_0226C7FC: - ldr r0, [r5, #0x10] - bl ov70_0226C3A4 - ldr r0, [r5, #0x14] - bl ov70_0226CF40 - ldr r0, [r5, #0x18] - bl ov70_0226C924 - pop {r3, r4, r5, pc} - thumb_func_end ov70_0226C718 - - thumb_func_start ov70_0226C810 -ov70_0226C810: ; 0x0226C810 - ldr r3, _0226C818 ; =ov70_0226CFFC - ldr r0, [r0, #0x14] - bx r3 - nop -_0226C818: .word ov70_0226CFFC - thumb_func_end ov70_0226C810 - - thumb_func_start ov70_0226C81C -ov70_0226C81C: ; 0x0226C81C - push {r3, lr} - cmp r0, #6 - bhi _0226C840 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226C82E: ; jump table - .short _0226C840 - _0226C82E - 2 ; case 0 - .short _0226C83C - _0226C82E - 2 ; case 1 - .short _0226C83C - _0226C82E - 2 ; case 2 - .short _0226C83C - _0226C82E - 2 ; case 3 - .short _0226C83C - _0226C82E - 2 ; case 4 - .short _0226C83C - _0226C82E - 2 ; case 5 - .short _0226C83C - _0226C82E - 2 ; case 6 -_0226C83C: - sub r0, r0, #1 - pop {r3, pc} -_0226C840: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov70_0226C81C - - thumb_func_start ov70_0226C848 -ov70_0226C848: ; 0x0226C848 - push {r3, lr} - cmp r0, #0xa - bhi _0226C874 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226C85A: ; jump table - .short _0226C874 - _0226C85A - 2 ; case 0 - .short _0226C874 - _0226C85A - 2 ; case 1 - .short _0226C874 - _0226C85A - 2 ; case 2 - .short _0226C874 - _0226C85A - 2 ; case 3 - .short _0226C874 - _0226C85A - 2 ; case 4 - .short _0226C874 - _0226C85A - 2 ; case 5 - .short _0226C874 - _0226C85A - 2 ; case 6 - .short _0226C870 - _0226C85A - 2 ; case 7 - .short _0226C870 - _0226C85A - 2 ; case 8 - .short _0226C870 - _0226C85A - 2 ; case 9 - .short _0226C870 - _0226C85A - 2 ; case 10 -_0226C870: - sub r0, r0, #7 - pop {r3, pc} -_0226C874: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov70_0226C848 - - thumb_func_start ov70_0226C87C -ov70_0226C87C: ; 0x0226C87C - push {r3, lr} - add r1, r0, #0 - sub r1, #0xb - cmp r1, #3 - bhi _0226C89E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0226C892: ; jump table - .short _0226C89A - _0226C892 - 2 ; case 0 - .short _0226C89A - _0226C892 - 2 ; case 1 - .short _0226C89A - _0226C892 - 2 ; case 2 - .short _0226C89A - _0226C892 - 2 ; case 3 -_0226C89A: - sub r0, #0xb - pop {r3, pc} -_0226C89E: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C87C - - thumb_func_start ov70_0226C8A8 -ov70_0226C8A8: ; 0x0226C8A8 - ldr r3, _0226C8B0 ; =sub_020AF558 - mov r0, #2 - mov r1, #0 - bx r3 - ; .align 2, 0 -_0226C8B0: .word sub_020AF558 - thumb_func_end ov70_0226C8A8 - - thumb_func_start ov70_0226C8B4 -ov70_0226C8B4: ; 0x0226C8B4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - add r0, r2, #0 - mov r1, #0x10 - bl sub_02018144 - add r4, r0, #0 - add r2, r4, #0 - mov r1, #0x10 - mov r0, #0 -_0226C8CA: - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0226C8CA - str r5, [r4, #0] - add r0, r5, #0 - str r6, [r4, #4] - bl ov66_0222F104 - add r7, r0, #0 - add r0, r5, #0 - bl ov66_0222E158 - strh r0, [r4, #0xa] - ldrh r0, [r4, #0xa] - cmp r0, #0 - beq _0226C90E - cmp r7, #0 - beq _0226C90E - add r0, r6, #0 - mov r1, #1 - bl ov70_0226251C - add r0, r4, #0 - bl ov70_0226CC3C - add r0, r5, #0 - bl ov66_0222F114 - add r2, r0, #0 - add r0, r4, #0 - add r1, r7, #0 - bl ov70_0226CB1C -_0226C90E: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226C8B4 - - thumb_func_start ov70_0226C914 -ov70_0226C914: ; 0x0226C914 - push {r4, lr} - add r4, r0, #0 - bl ov70_0226CC58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov70_0226C914 - - thumb_func_start ov70_0226C924 -ov70_0226C924: ; 0x0226C924 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov66_0222F104 - add r4, r0, #0 - ldr r0, [r5, #0] - bl ov66_0222F114 - add r7, r0, #0 - ldr r0, [r5, #0] - bl ov66_0222E158 - add r6, r0, #0 - ldrh r0, [r5, #0xa] - cmp r0, r6 - beq _0226C964 - strh r6, [r5, #0xa] - cmp r6, #1 - bne _0226C964 - ldr r0, [r5, #4] - mov r1, #1 - bl ov70_0226251C - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov70_0226CB1C - add r0, r5, #0 - bl ov70_0226CC3C -_0226C964: - cmp r6, #0 - beq _0226C982 - ldrb r0, [r5, #8] - cmp r0, r4 - beq _0226C978 - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov70_0226CB1C -_0226C978: - add r0, r5, #0 - add r1, r4, #0 - add r2, r7, #0 - bl ov70_0226C984 -_0226C982: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0226C924 - - thumb_func_start ov70_0226C984 -ov70_0226C984: ; 0x0226C984 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #6 - blo _0226C994 - bl sub_02022974 -_0226C994: - cmp r4, #6 - bhs _0226C9A4 - ldr r2, _0226C9A8 ; =0x0226E6E4 - lsl r3, r4, #2 - ldr r2, [r2, r3] - add r0, r5, #0 - add r1, r6, #0 - blx r2 -_0226C9A4: - pop {r4, r5, r6, pc} - nop -_0226C9A8: .word 0x0226E6E4 - thumb_func_end ov70_0226C984 - - thumb_func_start ov70_0226C9AC -ov70_0226C9AC: ; 0x0226C9AC - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226C9AC - - thumb_func_start ov70_0226C9B0 -ov70_0226C9B0: ; 0x0226C9B0 - bx lr - ; .align 2, 0 - thumb_func_end ov70_0226C9B0 - - thumb_func_start ov70_0226C9B4 -ov70_0226C9B4: ; 0x0226C9B4 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r0, r1, #0 - mov r1, #0xe - bl sub_020E2178 - cmp r1, #0 - bne _0226CA2E - ldr r5, _0226CA30 ; =0x0226E74C - mov r4, #0 -_0226C9C8: - ldr r0, [r7, #0xc] - add r1, r4, #0 - lsl r2, r0, #3 - ldr r0, _0226CA34 ; =0x0226E72C - mov r6, #0 - add r3, r0, r2 - mov r0, #3 - and r1, r0 - ldr r0, _0226CA34 ; =0x0226E72C - ldr r0, [r0, r2] - cmp r1, r0 - bne _0226C9E8 - mov r0, #1 - str r0, [sp] - add r6, r0, #0 - b _0226C9F4 -_0226C9E8: - ldr r0, [r3, #4] - cmp r1, r0 - bne _0226C9F4 - add r0, r6, #0 - str r0, [sp] - mov r6, #1 -_0226C9F4: - cmp r6, #1 - bne _0226CA1A - cmp r4, #0x11 - bhs _0226CA16 - ldrb r1, [r5] - mov r3, #1 - ldr r0, [r7, #4] - ldr r2, [sp] - lsl r3, r3, #0xc - bl ov70_02262754 - add r6, r0, #0 - cmp r6, #1 - beq _0226CA1C - bl sub_02022974 - b _0226CA1C -_0226CA16: - mov r6, #0 - b _0226CA1C -_0226CA1A: - mov r6, #1 -_0226CA1C: - add r5, r5, #1 - add r4, r4, #1 - cmp r6, #1 - beq _0226C9C8 - ldr r0, [r7, #0xc] - add r1, r0, #1 - mov r0, #3 - and r0, r1 - str r0, [r7, #0xc] -_0226CA2E: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226CA30: .word 0x0226E74C -_0226CA34: .word 0x0226E72C - thumb_func_end ov70_0226C9B4 - - thumb_func_start ov70_0226CA38 -ov70_0226CA38: ; 0x0226CA38 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r0, r1, #0 - mov r1, #6 - bl sub_020E2178 - cmp r1, #0 - bne _0226CAC8 - ldr r0, [r5, #0xc] - lsl r1, r0, #1 - ldr r0, _0226CACC ; =0x0226E6D4 - ldrb r0, [r0, r1] - str r0, [sp] - ldr r0, _0226CAD0 ; =0x0226E6D5 - ldrb r0, [r0, r1] - add r1, sp, #4 - bl ov70_0226CBB4 - ldr r0, [sp, #8] - mov r4, #0 - cmp r0, #0 - bls _0226CA8A - mov r7, #1 - add r6, r4, #0 - lsl r7, r7, #0xc -_0226CA6C: - ldr r1, [sp, #4] - ldr r0, [r5, #4] - ldrb r1, [r1, r4] - add r2, r6, #0 - add r3, r7, #0 - bl ov70_02262754 - cmp r0, #1 - beq _0226CA82 - bl sub_02022974 -_0226CA82: - ldr r0, [sp, #8] - add r4, r4, #1 - cmp r4, r0 - blo _0226CA6C -_0226CA8A: - ldr r0, [sp] - add r1, sp, #4 - bl ov70_0226CBB4 - ldr r0, [sp, #8] - mov r4, #0 - cmp r0, #0 - bls _0226CABC - mov r6, #1 - lsl r7, r6, #0xc -_0226CA9E: - ldr r1, [sp, #4] - ldr r0, [r5, #4] - ldrb r1, [r1, r4] - add r2, r6, #0 - add r3, r7, #0 - bl ov70_02262754 - cmp r0, #1 - beq _0226CAB4 - bl sub_02022974 -_0226CAB4: - ldr r0, [sp, #8] - add r4, r4, #1 - cmp r4, r0 - blo _0226CA9E -_0226CABC: - ldr r0, [r5, #0xc] - mov r1, #7 - add r0, r0, #1 - bl sub_020E2178 - str r1, [r5, #0xc] -_0226CAC8: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226CACC: .word 0x0226E6D4 -_0226CAD0: .word 0x0226E6D5 - thumb_func_end ov70_0226CA38 - - thumb_func_start ov70_0226CAD4 -ov70_0226CAD4: ; 0x0226CAD4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #3 - bhs _0226CB0C - lsl r2, r0, #3 - ldr r0, _0226CB10 ; =0x0226E6FC - ldr r0, [r0, r2] - cmp r0, r1 - bhs _0226CB0C - ldr r1, _0226CB14 ; =0x0226E700 - ldr r0, [r4, #4] - ldr r1, [r1, r2] - bl ov70_0226278C - ldr r1, [r4, #0xc] - ldr r0, [r4, #4] - lsl r2, r1, #3 - ldr r1, _0226CB14 ; =0x0226E700 - ldr r1, [r1, r2] - bl ov70_022625D8 - ldr r0, _0226CB18 ; =0x0000059D - bl sub_02005748 - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] -_0226CB0C: - pop {r4, pc} - nop -_0226CB10: .word 0x0226E6FC -_0226CB14: .word 0x0226E700 -_0226CB18: .word 0x0000059D - thumb_func_end ov70_0226CAD4 - - thumb_func_start ov70_0226CB1C -ov70_0226CB1C: ; 0x0226CB1C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #6 - blo _0226CB2C - bl sub_02022974 -_0226CB2C: - cmp r4, #6 - bhs _0226CB4C - add r1, r5, #0 - mov r0, #0 - add r1, #0xc - strb r0, [r5, #0xc] - strb r0, [r1, #1] - strb r0, [r1, #2] - strb r0, [r1, #3] - ldr r2, _0226CB50 ; =0x0226E714 - lsl r3, r4, #2 - ldr r2, [r2, r3] - add r0, r5, #0 - add r1, r6, #0 - blx r2 - strb r4, [r5, #8] -_0226CB4C: - pop {r4, r5, r6, pc} - nop -_0226CB50: .word 0x0226E714 - thumb_func_end ov70_0226CB1C - - thumb_func_start ov70_0226CB54 -ov70_0226CB54: ; 0x0226CB54 - ldr r3, _0226CB60 ; =ov70_02262724 - mov r2, #1 - ldr r0, [r0, #4] - mov r1, #0 - lsl r2, r2, #0xc - bx r3 - ; .align 2, 0 -_0226CB60: .word ov70_02262724 - thumb_func_end ov70_0226CB54 - - thumb_func_start ov70_0226CB64 -ov70_0226CB64: ; 0x0226CB64 - ldr r3, _0226CB70 ; =ov70_02262724 - mov r1, #1 - ldr r0, [r0, #4] - lsl r2, r1, #0xc - bx r3 - nop -_0226CB70: .word ov70_02262724 - thumb_func_end ov70_0226CB64 - - thumb_func_start ov70_0226CB74 -ov70_0226CB74: ; 0x0226CB74 - ldr r3, _0226CB80 ; =ov70_02262724 - mov r2, #1 - ldr r0, [r0, #4] - mov r1, #0 - lsl r2, r2, #0xc - bx r3 - ; .align 2, 0 -_0226CB80: .word ov70_02262724 - thumb_func_end ov70_0226CB74 - - thumb_func_start ov70_0226CB84 -ov70_0226CB84: ; 0x0226CB84 - ldr r3, _0226CB90 ; =ov70_02262724 - mov r2, #1 - ldr r0, [r0, #4] - mov r1, #0 - lsl r2, r2, #0xc - bx r3 - ; .align 2, 0 -_0226CB90: .word ov70_02262724 - thumb_func_end ov70_0226CB84 - - thumb_func_start ov70_0226CB94 -ov70_0226CB94: ; 0x0226CB94 - push {r4, lr} - add r4, r0, #0 - bl ov70_0226CC58 - mov r2, #1 - ldr r0, [r4, #4] - mov r1, #0 - lsl r2, r2, #0xc - bl ov70_02262724 - ldr r0, [r4, #4] - mov r1, #0 - bl ov70_0226251C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0226CB94 - - thumb_func_start ov70_0226CBB4 -ov70_0226CBB4: ; 0x0226CBB4 - push {r3, lr} - cmp r0, #6 - bhi _0226CC1A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226CBC6: ; jump table - .short _0226CBD4 - _0226CBC6 - 2 ; case 0 - .short _0226CBDE - _0226CBC6 - 2 ; case 1 - .short _0226CBE8 - _0226CBC6 - 2 ; case 2 - .short _0226CBF2 - _0226CBC6 - 2 ; case 3 - .short _0226CBFC - _0226CBC6 - 2 ; case 4 - .short _0226CC06 - _0226CBC6 - 2 ; case 5 - .short _0226CC10 - _0226CBC6 - 2 ; case 6 -_0226CBD4: - mov r0, #6 - str r0, [r1, #4] - ldr r0, _0226CC20 ; =0x0226E6CC - str r0, [r1, #0] - pop {r3, pc} -_0226CBDE: - mov r0, #2 - str r0, [r1, #4] - ldr r0, _0226CC24 ; =0x0226E6C4 - str r0, [r1, #0] - pop {r3, pc} -_0226CBE8: - mov r0, #2 - str r0, [r1, #4] - ldr r0, _0226CC28 ; =0x0226E6BC - str r0, [r1, #0] - pop {r3, pc} -_0226CBF2: - mov r0, #1 - str r0, [r1, #4] - ldr r0, _0226CC2C ; =0x0226E6B4 - str r0, [r1, #0] - pop {r3, pc} -_0226CBFC: - mov r0, #1 - str r0, [r1, #4] - ldr r0, _0226CC30 ; =0x0226E6B8 - str r0, [r1, #0] - pop {r3, pc} -_0226CC06: - mov r0, #2 - str r0, [r1, #4] - ldr r0, _0226CC34 ; =0x0226E6C0 - str r0, [r1, #0] - pop {r3, pc} -_0226CC10: - mov r0, #3 - str r0, [r1, #4] - ldr r0, _0226CC38 ; =0x0226E6C8 - str r0, [r1, #0] - pop {r3, pc} -_0226CC1A: - bl sub_02022974 - pop {r3, pc} - ; .align 2, 0 -_0226CC20: .word 0x0226E6CC -_0226CC24: .word 0x0226E6C4 -_0226CC28: .word 0x0226E6BC -_0226CC2C: .word 0x0226E6B4 -_0226CC30: .word 0x0226E6B8 -_0226CC34: .word 0x0226E6C0 -_0226CC38: .word 0x0226E6C8 - thumb_func_end ov70_0226CBB4 - - thumb_func_start ov70_0226CC3C -ov70_0226CC3C: ; 0x0226CC3C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #9] - cmp r0, #0 - bne _0226CC50 - ldr r0, _0226CC54 ; =0x0000059E - bl sub_02005748 - mov r0, #1 - strb r0, [r4, #9] -_0226CC50: - pop {r4, pc} - nop -_0226CC54: .word 0x0000059E - thumb_func_end ov70_0226CC3C - - thumb_func_start ov70_0226CC58 -ov70_0226CC58: ; 0x0226CC58 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #9] - cmp r0, #0 - beq _0226CC6E - ldr r0, _0226CC70 ; =0x0000059E - mov r1, #0 - bl sub_020057A4 - mov r0, #0 - strb r0, [r4, #9] -_0226CC6E: - pop {r4, pc} - ; .align 2, 0 -_0226CC70: .word 0x0000059E - thumb_func_end ov70_0226CC58 - - thumb_func_start ov70_0226CC74 -ov70_0226CC74: ; 0x0226CC74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r4, r1, #0 - add r5, r0, #0 - bl ov70_02262E80 - add r6, r0, #0 - add r0, r4, #0 - bl ov70_0225DEE8 - str r0, [sp] - add r0, r4, #0 - bl ov70_0225DEF0 - str r0, [sp, #4] - bl ov70_0225CCB0 - add r7, r0, #0 - ldr r0, [sp, #4] - bl ov70_0225CCAC - str r0, [sp, #8] - add r0, r5, #0 - bl ov70_02262E84 - cmp r0, #5 - bls _0226CCAC - b _0226CE46 -_0226CCAC: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0226CCB8: ; jump table - .short _0226CCC4 - _0226CCB8 - 2 ; case 0 - .short _0226CD9A - _0226CCB8 - 2 ; case 1 - .short _0226CDAA - _0226CCB8 - 2 ; case 2 - .short _0226CDDC - _0226CCB8 - 2 ; case 3 - .short _0226CDFC - _0226CCB8 - 2 ; case 4 - .short _0226CE32 - _0226CCB8 - 2 ; case 5 -_0226CCC4: - add r0, r5, #0 - mov r1, #4 - bl ov70_02262E3C - add r6, r0, #0 - ldr r0, _0226CE50 ; =0x000005DC - bl sub_02005748 - ldr r0, [sp, #8] - mov r1, #6 - bl ov70_0225CD60 - bl ov63_0222C0AC - str r0, [sp, #0xc] - ldr r0, [sp, #4] - add r1, r7, #0 - mov r2, #0 - bl ov70_0225CDEC - add r0, r7, #0 - mov r1, #0 - bl ov70_0225D030 - ldr r1, [sp, #0xc] - add r0, r7, #0 - bl ov70_0225D060 - ldr r0, [sp] - bl ov66_0222E12C - cmp r0, #0 - beq _0226CD26 - add r0, r4, #0 - mov r1, #1 - mov r2, #3 - bl ov70_0225E20C - add r1, r0, #0 - mov r0, #4 - str r0, [r6, #0] - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _0226CE4A -_0226CD26: - ldr r0, [sp] - bl ov66_0222E19C - cmp r0, #1 - bne _0226CD50 - add r0, r4, #0 - mov r1, #1 - mov r2, #0x58 - bl ov70_0225E20C - add r1, r0, #0 - mov r0, #4 - str r0, [r6, #0] - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _0226CE4A -_0226CD50: - ldr r0, [sp] - bl ov66_0222E0DC - cmp r0, #1 - bne _0226CD7A - add r0, r4, #0 - mov r1, #1 - mov r2, #0x57 - bl ov70_0225E20C - add r1, r0, #0 - mov r0, #4 - str r0, [r6, #0] - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _0226CE4A -_0226CD7A: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x51 - bl ov70_0225E20C - add r1, r0, #0 - mov r0, #1 - str r0, [r6, #0] - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _0226CE4A -_0226CD9A: - add r0, r4, #0 - bl ov70_0225E164 - add r0, r5, #0 - mov r1, #2 - bl ov70_02262E88 - b _0226CE4A -_0226CDAA: - add r0, r4, #0 - bl ov70_0225E1C4 - cmp r0, #0 - beq _0226CDBC - cmp r0, #1 - beq _0226CDCC - cmp r0, #2 - b _0226CE4A -_0226CDBC: - add r0, r5, #0 - mov r1, #3 - bl ov70_02262E88 - add r0, r4, #0 - bl ov70_0225E1F8 - b _0226CE4A -_0226CDCC: - add r0, r5, #0 - mov r1, #4 - bl ov70_02262E88 - add r0, r4, #0 - bl ov70_0225E1F8 - b _0226CE4A -_0226CDDC: - add r0, r4, #0 - mov r1, #1 - mov r2, #0x55 - bl ov70_0225E20C - add r1, r0, #0 - mov r0, #4 - str r0, [r6, #0] - add r0, r4, #0 - bl ov70_0225DF8C - add r0, r5, #0 - mov r1, #5 - bl ov70_02262E88 - b _0226CE4A -_0226CDFC: - add r0, r4, #0 - bl ov70_0225DFEC - add r0, r4, #0 - bl ov70_0225E1F8 - ldr r0, [sp, #4] - ldr r1, [sp, #8] - mov r2, #1 - bl ov70_0225CDEC - add r0, r5, #0 - bl ov70_02262E64 - add r0, r7, #0 - mov r1, #1 - bl ov70_0225D030 - ldr r0, [sp, #4] - add r1, r7, #0 - mov r2, #0 - mov r3, #1 - bl ov70_0225CDAC - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0226CE32: - add r0, r4, #0 - bl ov70_0225DFAC - cmp r0, #1 - bne _0226CE4A - ldr r1, [r6, #0] - add r0, r5, #0 - bl ov70_02262E88 - b _0226CE4A -_0226CE46: - bl sub_02022974 -_0226CE4A: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226CE50: .word 0x000005DC - thumb_func_end ov70_0226CC74 - - thumb_func_start ov70_0226CE54 -ov70_0226CE54: ; 0x0226CE54 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - add r0, r1, #0 - mov r1, #0xc4 - bl sub_02018144 - add r4, r0, #0 - mov r1, #0 - mov r2, #0xc4 - bl sub_020D5124 - str r5, [r4, #0] - add r0, r5, #0 - bl ov70_0225DEE8 - str r0, [r4, #4] - add r0, r5, #0 - bl ov70_0225DEF8 - str r0, [r4, #8] - add r0, r5, #0 - bl ov70_0225DF00 - str r0, [r4, #0xc] - bl ov70_0225C8A8 - add r1, r0, #6 - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - ldr r1, [r0, #0] - mov r0, #7 - mvn r0, r0 - sub r1, r0, r1 - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xbc - ldr r0, [r0, #0] - ldr r6, _0226CF34 ; =0x0226E760 - lsl r1, r0, #0x10 - add r0, r4, #0 - add r0, #0xbc - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r7, #0 - lsl r1, r0, #0x10 - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - add r5, r4, #0 -_0226CEC6: - mov r0, #0 - str r0, [sp] - ldrb r1, [r6] - add r2, sp, #4 - ldr r0, [r4, #0xc] - add r2, #2 - add r3, sp, #4 - bl ov70_0225C8D8 - add r0, sp, #4 - ldrh r0, [r0, #2] - add r7, r7, #1 - add r6, r6, #1 - lsl r1, r0, #4 - add r0, r5, #0 - add r0, #0xaa - strh r1, [r0] - add r0, sp, #4 - ldrh r0, [r0] - lsl r1, r0, #4 - add r0, r5, #0 - add r0, #0xac - add r5, r5, #4 - strh r1, [r0] - cmp r7, #3 - blt _0226CEC6 - mov r5, #0 -_0226CEFC: - add r2, r4, #0 - add r2, #0xbc - ldr r0, [r4, #8] - ldr r2, [r2, #0] - add r1, r5, #0 - bl ov70_022622B0 - ldr r0, [r4, #4] - add r1, r5, #0 - bl ov66_0222EB7C - cmp r0, #1 - bne _0226CF26 - add r0, r4, #0 - add r1, r5, #0 - bl ov70_0226D020 - add r0, r4, #0 - add r1, r5, #0 - bl ov70_0226D46C -_0226CF26: - add r5, r5, #1 - cmp r5, #9 - blt _0226CEFC - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0226CF34: .word 0x0226E760 - thumb_func_end ov70_0226CE54 - - thumb_func_start ov70_0226CF38 -ov70_0226CF38: ; 0x0226CF38 - ldr r3, _0226CF3C ; =sub_020181C4 - bx r3 - ; .align 2, 0 -_0226CF3C: .word sub_020181C4 - thumb_func_end ov70_0226CF38 - - thumb_func_start ov70_0226CF40 -ov70_0226CF40: ; 0x0226CF40 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #4] - bl ov66_0222E338 - add r1, r0, #0 - ldr r0, [r5, #4] - bl ov66_0222EBA4 - mov r1, #0 - mvn r1, r1 - str r0, [sp, #8] - cmp r0, r1 - bne _0226CF62 - mov r6, #0 - b _0226CF6C -_0226CF62: - add r1, sp, #8 - add r2, sp, #4 - bl ov66_0222EC04 - mov r6, #1 -_0226CF6C: - mov r4, #0 -_0226CF6E: - ldr r0, [r5, #4] - add r1, r4, #0 - bl ov66_0222EB7C - cmp r0, #1 - ldr r0, [r5, #8] - bne _0226CFB6 - add r1, r4, #0 - mov r2, #1 - bl ov70_022623C4 - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226D020 - add r0, r5, #0 - add r1, r4, #0 - bl ov70_0226D46C - cmp r6, #0 - beq _0226CFA4 - ldr r0, [sp, #8] - cmp r0, r4 - bne _0226CFA2 - mov r7, #1 - b _0226CFA4 -_0226CFA2: - mov r7, #0 -_0226CFA4: - ldr r0, [sp, #4] - add r1, r4, #0 - str r0, [sp] - add r0, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov70_0226D0E8 - b _0226CFBE -_0226CFB6: - add r1, r4, #0 - mov r2, #0 - bl ov70_022623C4 -_0226CFBE: - add r4, r4, #1 - cmp r4, #9 - blt _0226CF6E - add r7, r5, #0 - mov r6, #0 - add r4, r5, #0 - add r7, #0x2c -_0226CFCC: - ldr r0, [r5, #8] - add r1, r6, #0 - bl ov70_0226241C - strb r0, [r4, #0x10] - ldr r1, [r5, #8] - add r0, r7, #0 - add r2, r6, #0 - bl ov70_0226D2D8 - strb r0, [r4, #0x11] - ldr r0, [r5, #8] - add r1, r6, #0 - bl ov70_02262444 - strb r0, [r4, #0x12] - add r6, r6, #1 - add r4, r4, #3 - add r7, #0xe - cmp r6, #9 - blt _0226CFCC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov70_0226CF40 - - thumb_func_start ov70_0226CFFC -ov70_0226CFFC: ; 0x0226CFFC - push {r4, r5, r6, lr} - add r5, r1, #0 - add r6, r0, #0 - add r4, r2, #0 - cmp r5, #9 - blo _0226D00C - bl sub_02022974 -_0226D00C: - cmp r4, #3 - blt _0226D014 - bl sub_02022974 -_0226D014: - lsl r0, r5, #1 - add r0, r5, r0 - add r0, r6, r0 - add r0, r0, r4 - ldrb r0, [r0, #0x10] - pop {r4, r5, r6, pc} - thumb_func_end ov70_0226CFFC - - thumb_func_start ov70_0226D020 -ov70_0226D020: ; 0x0226D020 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #4] - str r1, [sp] - bl ov66_0222EB8C - add r4, r0, #0 - ldr r0, [r5, #4] - bl ov66_0222EB9C - add r6, r0, #0 - add r0, r5, #0 - add r0, #0xc0 - mov r1, #2 - ldr r0, [r0, #0] - lsl r1, r1, #0xc - bl sub_020BCFD0 - add r7, r0, #0 - cmp r6, #0 - ble _0226D05C - lsl r0, r6, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226D06A -_0226D05C: - lsl r0, r6, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226D06A: - add r6, r0, #0 - cmp r4, #0 - ble _0226D082 - lsl r0, r4, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226D090 -_0226D082: - lsl r0, r4, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226D090: - bl sub_020E1740 - asr r1, r0, #0x1f - asr r3, r7, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r4, r2, #0xc - orr r4, r0 - add r0, r6, #0 - bl sub_020E1740 - add r1, r0, #0 - add r0, r4, #0 - bl sub_020BCFD0 - asr r2, r0, #0x1f - lsl r3, r2, #0xd - lsr r1, r0, #0x13 - lsl r2, r0, #0xd - mov r0, #2 - orr r3, r1 - mov r1, #0 - lsl r0, r0, #0xa - add r2, r2, r0 - adc r3, r1 - lsl r0, r3, #0x14 - lsr r3, r2, #0xc - orr r3, r0 - add r0, r5, #0 - add r0, #0xbc - ldr r2, [r0, #0] - ldr r0, [r5, #8] - ldr r1, [sp] - add r2, r3, r2 - bl ov70_022622B0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov70_0226D020 - - thumb_func_start ov70_0226D0E8 -ov70_0226D0E8: ; 0x0226D0E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - ldr r0, [sp, #0x30] - str r1, [sp] - str r0, [sp, #0x30] - ldr r0, [r7, #4] - str r2, [sp, #4] - add r5, r3, #0 - bl ov66_0222EB38 - add r6, r0, #0 - ldr r0, [r7, #4] - bl ov66_0222EB28 - ldr r0, [sp] - mov r4, #0 - lsl r1, r0, #1 - add r0, r0, r1 - str r0, [sp, #0x10] - ldr r0, [sp] - mov r1, #3 - bl sub_020E2178 - str r1, [sp, #8] - mov r0, #0xc - ldr r1, _0226D240 ; =0x0226E774 - mul r0, r6 - add r0, r1, r0 - str r0, [sp, #0xc] - add r0, r7, #0 - str r0, [sp, #0x14] - add r0, #0x2c - str r0, [sp, #0x14] - ldr r0, [sp] - mov r1, #0xe - mul r1, r0 - str r1, [sp, #0x18] -_0226D134: - ldr r1, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r4, r1 - bl ov66_0222EBE4 - mov r6, #0 - cmp r5, #1 - bne _0226D14C - ldr r1, [sp, #0x30] - cmp r4, r1 - bne _0226D14C - mov r6, #1 -_0226D14C: - cmp r0, #1 - bne _0226D232 - cmp r4, #0 - beq _0226D15E - cmp r4, #1 - beq _0226D1C2 - cmp r4, #2 - beq _0226D1F8 - b _0226D232 -_0226D15E: - ldr r0, [r7, #8] - ldr r1, [sp] - bl ov70_02262374 - cmp r0, #1 - bne _0226D232 - ldr r0, [sp, #8] - cmp r0, #2 - bne _0226D194 - ldr r3, [sp, #0xc] - ldr r0, [sp, #4] - ldrh r3, [r3, #2] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D27C - ldr r0, [sp, #0xc] - ldrh r3, [r0, #8] - ldr r0, _0226D244 ; =0x0000FFFE - cmp r3, r0 - beq _0226D1B6 - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D24C - b _0226D1B6 -_0226D194: - ldr r3, [sp, #0xc] - ldr r0, [sp, #4] - ldrh r3, [r3] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D27C - ldr r0, [sp, #0xc] - ldrh r3, [r0, #4] - ldr r0, _0226D244 ; =0x0000FFFE - cmp r3, r0 - beq _0226D1B6 - ldr r0, [sp, #4] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D24C -_0226D1B6: - ldr r1, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r4, r1 - bl ov66_0222EBF4 - b _0226D232 -_0226D1C2: - ldr r0, [sp, #8] - cmp r0, #2 - bne _0226D1CC - mov r1, #1 - b _0226D1CE -_0226D1CC: - mov r1, #0 -_0226D1CE: - ldr r2, [sp, #0x14] - ldr r0, [sp, #0x18] - ldr r3, [sp] - add r0, r2, r0 - ldr r2, [r7, #8] - bl ov70_0226D2A0 - cmp r0, #1 - bne _0226D232 - ldr r1, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r4, r1 - bl ov66_0222EBF4 - ldr r0, [sp, #4] - ldr r3, _0226D248 ; =0x000005AF - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D24C - b _0226D232 -_0226D1F8: - ldr r0, [r7, #8] - ldr r1, [sp] - bl ov70_0226239C - cmp r0, #1 - bne _0226D232 - ldr r1, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r4, r1 - bl ov66_0222EBF4 - ldr r0, [sp, #8] - cmp r0, #2 - bne _0226D224 - ldr r3, [sp, #0xc] - ldr r0, [sp, #4] - ldrh r3, [r3, #0xa] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D24C - b _0226D232 -_0226D224: - ldr r3, [sp, #0xc] - ldr r0, [sp, #4] - ldrh r3, [r3, #6] - add r1, r5, #0 - add r2, r6, #0 - bl ov70_0226D24C -_0226D232: - add r4, r4, #1 - cmp r4, #3 - bge _0226D23A - b _0226D134 -_0226D23A: - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0226D240: .word 0x0226E774 -_0226D244: .word 0x0000FFFE -_0226D248: .word 0x000005AF - thumb_func_end ov70_0226D0E8 - - thumb_func_start ov70_0226D24C -ov70_0226D24C: ; 0x0226D24C - push {r3, lr} - cmp r0, #0 - beq _0226D270 - cmp r1, #0 - beq _0226D278 - cmp r2, #0 - beq _0226D266 - lsl r0, r3, #0x10 - lsr r0, r0, #0x10 - mov r1, #5 - bl sub_02005770 - pop {r3, pc} -_0226D266: - lsl r0, r3, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 - pop {r3, pc} -_0226D270: - lsl r0, r3, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_0226D278: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0226D24C - - thumb_func_start ov70_0226D27C -ov70_0226D27C: ; 0x0226D27C - push {r3, lr} - cmp r0, #0 - beq _0226D292 - cmp r1, #0 - beq _0226D29C - lsl r0, r3, #0x10 - lsr r0, r0, #0x10 - mov r1, #0 - bl sub_02005844 - pop {r3, pc} -_0226D292: - lsl r0, r3, #0x10 - lsr r0, r0, #0x10 - mov r1, #0 - bl sub_02005844 -_0226D29C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov70_0226D27C - - thumb_func_start ov70_0226D2A0 -ov70_0226D2A0: ; 0x0226D2A0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r4, #2 - blo _0226D2B2 - bl sub_02022974 -_0226D2B2: - ldrh r0, [r5] - cmp r0, #1 - bne _0226D2BC - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0226D2BC: - ldr r3, _0226D2D4 ; =0x0226E76C - strh r4, [r5, #2] - lsl r4, r4, #2 - mov r0, #1 - strh r0, [r5] - ldr r3, [r3, r4] - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - blx r3 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0226D2D4: .word 0x0226E76C - thumb_func_end ov70_0226D2A0 - - thumb_func_start ov70_0226D2D8 -ov70_0226D2D8: ; 0x0226D2D8 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldrh r3, [r4] - cmp r3, #0 - beq _0226D312 - ldrh r3, [r4, #2] - lsl r5, r3, #2 - ldr r3, _0226D318 ; =0x0226E764 - ldr r3, [r3, r5] - blx r3 - cmp r0, #1 - bne _0226D30E - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - strb r0, [r4, #0xc] - strb r0, [r4, #0xd] -_0226D30E: - mov r0, #1 - pop {r3, r4, r5, pc} -_0226D312: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_0226D318: .word 0x0226E764 - thumb_func_end ov70_0226D2D8 - - thumb_func_start ov70_0226D31C -ov70_0226D31C: ; 0x0226D31C - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - strh r0, [r4, #4] - mov r0, #8 - strh r0, [r4, #6] - mov r0, #5 - bl sub_0201D2A4 - strh r0, [r4, #8] - mov r0, #2 - strh r0, [r4, #0xa] - mov r0, #4 - strh r0, [r4, #0xc] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0226D31C - - thumb_func_start ov70_0226D33C -ov70_0226D33C: ; 0x0226D33C - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - strh r0, [r4, #4] - mov r0, #0x10 - strh r0, [r4, #6] - mov r0, #0xa - bl sub_0201D2A4 - strh r0, [r4, #8] - mov r0, #4 - strh r0, [r4, #0xa] - mov r0, #2 - strh r0, [r4, #0xc] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov70_0226D33C - - thumb_func_start ov70_0226D35C -ov70_0226D35C: ; 0x0226D35C - push {r3, r4, r5, r6, lr} - sub sp, #0x1c - add r5, r0, #0 - add r0, sp, #0x10 - mov r4, #0 - str r4, [r0, #0] - str r4, [r0, #4] - str r4, [r0, #8] - mov r0, #4 - ldrsh r0, [r5, r0] - str r1, [sp] - str r2, [sp, #4] - add r1, r0, #1 - mov r0, #6 - ldrsh r0, [r5, r0] - cmp r1, r0 - bge _0226D382 - strh r1, [r5, #4] - b _0226D394 -_0226D382: - strh r4, [r5, #4] - mov r0, #0xc - ldrsh r0, [r5, r0] - sub r0, r0, #1 - cmp r0, #0 - ble _0226D392 - strh r0, [r5, #0xc] - b _0226D394 -_0226D392: - mov r4, #1 -_0226D394: - mov r0, #4 - ldrsh r1, [r5, r0] - ldr r0, _0226D464 ; =0x0000FFFF - mul r0, r1 - mov r1, #6 - ldrsh r1, [r5, r1] - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldrh r0, [r5, #8] - cmp r0, #0 - beq _0226D3C0 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226D3CE -_0226D3C0: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226D3CE: - bl sub_020E1740 - add r2, r0, #0 - asr r0, r6, #4 - lsl r1, r0, #2 - ldr r0, _0226D468 ; =0x020F983C - asr r3, r2, #0x1f - ldrsh r0, [r0, r1] - str r0, [sp, #8] - asr r0, r0, #0x1f - str r0, [sp, #0xc] - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - lsl r0, r1, #4 - lsr r6, r0, #0x10 - mov r0, #0xa - ldrsh r0, [r5, r0] - cmp r0, #0 - ble _0226D41A - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0226D428 -_0226D41A: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0226D428: - bl sub_020E1740 - add r2, r0, #0 - ldr r0, [sp, #8] - ldr r1, [sp, #0xc] - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [sp, #0x14] - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, r6, #0 - bl ov70_022623F0 - ldr r0, [sp] - ldr r1, [sp, #4] - add r2, sp, #0x10 - bl ov70_022622EC - add r0, r4, #0 - add sp, #0x1c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0226D464: .word 0x0000FFFF -_0226D468: .word 0x020F983C - thumb_func_end ov70_0226D35C - - thumb_func_start ov70_0226D46C -ov70_0226D46C: ; 0x0226D46C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - str r1, [sp] - add r0, r1, #0 - lsl r1, r0, #1 - ldr r0, [sp] - mov r6, #0 - add r0, r0, r1 - str r0, [sp, #4] -_0226D480: - ldr r1, [sp, #4] - ldr r0, [r7, #4] - add r1, r6, r1 - bl ov66_0222EC30 - add r4, r0, #0 - ldr r0, [r7, #8] - ldr r1, [sp] - add r2, r6, #0 - add r3, sp, #8 - bl ov70_02262318 - cmp r4, #3 - bge _0226D4C2 - lsl r0, r4, #2 - add r5, r7, r0 -_0226D4A0: - mov r0, #0xaa - ldrsh r0, [r5, r0] - add r0, #0x10 - lsl r1, r0, #0xc - ldr r0, [sp, #8] - cmp r1, r0 - ble _0226D4BA - ldr r1, [sp, #4] - ldr r0, [r7, #4] - add r1, r6, r1 - add r2, r4, #0 - bl ov66_0222EC20 -_0226D4BA: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _0226D4A0 -_0226D4C2: - add r6, r6, #1 - cmp r6, #3 - blt _0226D480 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov70_0226D46C - ; 0x0226D4CC - - - .rodata - .incbin "incbin/overlay70_rodata.bin" - - - .bss - .space 0x0 diff --git a/asm/overlay76.s b/asm/overlay76.s deleted file mode 100644 index b818c3b4c..000000000 --- a/asm/overlay76.s +++ /dev/null @@ -1,7590 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov76_0223B140 -ov76_0223B140: ; 0x0223B140 - push {r3, lr} - ldr r0, _0223B154 ; =0x0000000B - mov r1, #2 - bl sub_02006590 - ldr r0, _0223B158 ; =0x0000000C - mov r1, #2 - bl sub_02006590 - pop {r3, pc} - ; .align 2, 0 -_0223B154: .word 0x0000000B -_0223B158: .word 0x0000000C - thumb_func_end ov76_0223B140 - - thumb_func_start ov76_0223B15C -ov76_0223B15C: ; 0x0223B15C - add r3, r2, #0 - sub r3, #0xa - strb r3, [r0] - add r3, r1, #0 - sub r3, #0xa - strb r3, [r0, #2] - add r2, #0xa - strb r2, [r0, #1] - add r1, #0xa - strb r1, [r0, #3] - bx lr - ; .align 2, 0 - thumb_func_end ov76_0223B15C - - thumb_func_start ov76_0223B174 -ov76_0223B174: ; 0x0223B174 - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #2] - mov r1, #0xc0 - strb r1, [r0, #1] - mov r1, #0xff - strb r1, [r0, #3] - bx lr - thumb_func_end ov76_0223B174 - - thumb_func_start ov76_0223B184 -ov76_0223B184: ; 0x0223B184 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - beq _0223B1D8 - cmp r2, #1 - bne _0223B1B4 - ldr r3, _0223B1DC ; =0x021BF6BC - mov r1, #0x1c - mov r2, #0x1e - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, r4, #0 - bl sub_0200D4C4 - add r1, sp, #0 - add r0, r4, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r0, r5, #0 - bl ov76_0223B174 - pop {r3, r4, r5, pc} -_0223B1B4: - add r1, sp, #0 - add r0, r4, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r3, sp, #0 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, r5, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x18 - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - bl ov76_0223B15C -_0223B1D8: - pop {r3, r4, r5, pc} - nop -_0223B1DC: .word 0x021BF6BC - thumb_func_end ov76_0223B184 - - thumb_func_start ov76_0223B1E0 -ov76_0223B1E0: ; 0x0223B1E0 - push {r3, r4, r5, r6, r7, lr} - mov r4, #0 - add r7, r4, #0 - mov r6, #0xcb - add r5, r0, #0 - sub r7, #0x38 - lsl r6, r6, #2 -_0223B1EE: - ldr r0, [r5, r6] - cmp r0, #0 - beq _0223B1FC - add r1, r7, #0 - mov r2, #0x10 - bl sub_0200D5DC -_0223B1FC: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #8 - blt _0223B1EE - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B1E0 - - thumb_func_start ov76_0223B208 -ov76_0223B208: ; 0x0223B208 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r0, #0xf1 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r6, #0 - lsl r0, r0, #3 - add r0, r7, r0 - ldr r4, [r0, #8] - add r5, r7, #0 -_0223B21C: - ldrb r1, [r4] - cmp r1, #0 - beq _0223B25A - mov r0, #0xca - lsl r0, r0, #2 - strb r1, [r5, r0] - ldrb r1, [r4, #1] - add r0, r0, #1 - strb r1, [r5, r0] - ldrb r1, [r4, #2] - ldr r0, _0223B274 ; =0x0000032A - strb r1, [r5, r0] - lsl r1, r6, #0x18 - add r0, r7, #0 - lsr r1, r1, #0x18 - bl ov76_0223B52C - mov r0, #0x33 - mov r1, #0xcb - lsl r0, r0, #4 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - mov r2, #0 - bl ov76_0223B184 - mov r0, #0xc9 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - b _0223B266 -_0223B25A: - mov r0, #0xc9 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r0, #4 - strb r1, [r5, r0] -_0223B266: - add r6, r6, #1 - add r4, r4, #3 - add r5, #0x10 - cmp r6, #8 - blt _0223B21C - pop {r3, r4, r5, r6, r7, pc} - nop -_0223B274: .word 0x0000032A - thumb_func_end ov76_0223B208 - - thumb_func_start ov76_0223B278 -ov76_0223B278: ; 0x0223B278 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - mov r0, #0xc9 - mov r4, #0 - add r3, r6, #0 - lsl r0, r0, #2 -_0223B286: - ldr r2, [r3, r0] - cmp r2, #1 - beq _0223B2E8 - add r0, r6, r1 - mov r1, #0x42 - lsl r1, r1, #4 - ldrb r3, [r0, r1] - lsl r5, r4, #4 - add r0, r1, #0 - add r2, r6, r5 - sub r0, #0xf8 - strb r3, [r2, r0] - add r0, r1, #0 - sub r0, #0xf7 - add r7, r6, r0 - mov r0, #0xbe - sub r1, #0xf6 - strb r0, [r7, r5] - add r0, r6, r1 - mov r1, #0x46 - strb r1, [r0, r5] - str r0, [sp] - add r0, sp, #8 - add r1, sp, #4 - bl sub_020227A4 - ldr r0, [sp, #8] - strb r0, [r7, r5] - ldr r1, [sp, #4] - ldr r0, [sp] - strb r1, [r0, r5] - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - bl ov76_0223B52C - lsl r1, r4, #0x18 - add r0, r6, #0 - lsr r1, r1, #0x18 - bl ov76_0223B314 - mov r0, #0xc9 - mov r2, #1 - add r1, r6, r5 - lsl r0, r0, #2 - str r2, [r1, r0] - add sp, #0xc - add r0, r4, #0 - pop {r4, r5, r6, r7, pc} -_0223B2E8: - add r4, r4, #1 - add r3, #0x10 - cmp r4, #8 - blt _0223B286 - mov r0, #0xff - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B278 - - thumb_func_start ov76_0223B2F8 -ov76_0223B2F8: ; 0x0223B2F8 - mov r1, #0xc9 - mov r3, #0 - lsl r1, r1, #2 -_0223B2FE: - ldr r2, [r0, r1] - cmp r2, #1 - beq _0223B308 - mov r0, #1 - bx lr -_0223B308: - add r3, r3, #1 - add r0, #0x10 - cmp r3, #8 - blt _0223B2FE - mov r0, #0 - bx lr - thumb_func_end ov76_0223B2F8 - - thumb_func_start ov76_0223B314 -ov76_0223B314: ; 0x0223B314 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0xc9 - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - lsl r7, r7, #2 -_0223B320: - ldr r0, [r5, r7] - cmp r0, #1 - bne _0223B360 - cmp r4, r6 - bne _0223B338 - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D474 - b _0223B360 -_0223B338: - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D488 - add r1, r0, #0 - bne _0223B354 - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r1, #1 - bl sub_0200D474 - b _0223B360 -_0223B354: - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r1, #2 - bl sub_0200D474 -_0223B360: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #8 - blt _0223B320 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B314 - - thumb_func_start ov76_0223B36C -ov76_0223B36C: ; 0x0223B36C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r1, #0 - add r1, r0, #0 - add r1, #0xdc - ldr r4, [r1, #0] - add r1, r0, #0 - add r1, #0xe0 - ldr r5, [r1, #0] - mov r1, #0x5b - str r1, [sp] - add r1, #0xca - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #1 - str r1, [sp, #0xc] - mov r1, #2 - str r1, [sp, #0x10] - ldr r1, _0223B3F0 ; =0x0000532D - add r6, r2, #0 - str r1, [sp, #0x14] - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #3 - add r2, r4, #0 - add r3, r5, #0 - bl sub_0200CD7C - add r0, r7, #0 - bl sub_02098140 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223B3F4 ; =0x00004E20 - add r1, r5, #0 - add r0, r6, r0 - str r0, [sp, #8] - add r0, r4, #0 - mov r2, #0x5b - bl sub_0200CBDC - mov r0, #1 - str r0, [sp] - ldr r0, _0223B3F8 ; =0x0000564D - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x5b - mov r3, #0x5d - bl sub_0200CE0C - mov r3, #1 - ldr r0, _0223B3FC ; =0x000059D9 - str r3, [sp] - str r0, [sp, #4] - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0x5b - bl sub_0200CE3C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B3F0: .word 0x0000532D -_0223B3F4: .word 0x00004E20 -_0223B3F8: .word 0x0000564D -_0223B3FC: .word 0x000059D9 - thumb_func_end ov76_0223B36C - - thumb_func_start ov76_0223B400 -ov76_0223B400: ; 0x0223B400 - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - mov r1, #0x26 - lsl r1, r1, #4 - str r0, [sp] - ldr r0, [r0, r1] - cmp r0, #0 - bne _0223B412 - b _0223B520 -_0223B412: - ldr r0, [sp] - mov r7, #0 - str r7, [r0, r1] - add r4, sp, #0x54 - add r5, sp, #0x34 - add r6, r0, #0 -_0223B41E: - mov r0, #0xff - str r0, [r4, #0] - str r0, [r5, #0] - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r0, #0 - beq _0223B436 - bl sub_0200D488 - str r0, [r4, #0] - str r7, [r5, #0] -_0223B436: - add r7, r7, #1 - add r4, r4, #4 - add r5, r5, #4 - add r6, #0x10 - cmp r7, #8 - blt _0223B41E - mov r0, #0 - mov ip, r0 -_0223B446: - mov r0, ip - mov r3, #7 - cmp r0, #7 - bge _0223B476 - add r4, sp, #0x70 - add r5, sp, #0x50 -_0223B452: - sub r7, r4, #4 - ldr r2, [r4, #0] - ldr r0, [r7, #0] - cmp r0, r2 - blt _0223B46A - ldr r1, [r5, #0] - sub r6, r5, #4 - str r0, [r4, #0] - ldr r0, [r6, #0] - str r0, [r5, #0] - str r2, [r7, #0] - str r1, [r6, #0] -_0223B46A: - sub r3, r3, #1 - mov r0, ip - sub r4, r4, #4 - sub r5, r5, #4 - cmp r3, r0 - bgt _0223B452 -_0223B476: - mov r0, ip - add r0, r0, #1 - mov ip, r0 - cmp r0, #7 - blt _0223B446 - mov r3, #0xca - lsl r3, r3, #2 - ldr r0, [sp] - mov r2, #0 - add r1, sp, #0x1c - add r4, r3, #1 - add r5, r3, #2 -_0223B48E: - ldrb r6, [r0, r3] - add r2, r2, #1 - strb r6, [r1] - ldrb r6, [r0, r4] - strb r6, [r1, #1] - ldrb r6, [r0, r5] - add r0, #0x10 - strb r6, [r1, #2] - add r1, r1, #3 - cmp r2, #8 - blt _0223B48E - add r3, sp, #0x1c - add r2, sp, #4 - mov r1, #0x18 -_0223B4AA: - ldrb r0, [r3] - add r3, r3, #1 - strb r0, [r2] - add r2, r2, #1 - sub r1, r1, #1 - bne _0223B4AA - ldr r5, [sp] - mov r6, #0 - add r4, sp, #0x34 - add r7, sp, #4 -_0223B4BE: - ldr r1, [r4, #0] - cmp r1, #0xff - bne _0223B4D6 - mov r0, #0xca - mov r1, #0 - lsl r0, r0, #2 - strb r1, [r5, r0] - add r0, r0, #1 - strb r1, [r5, r0] - ldr r0, _0223B524 ; =0x0000032A - strb r1, [r5, r0] - b _0223B516 -_0223B4D6: - lsl r0, r1, #1 - add r0, r1, r0 - ldrb r1, [r7, r0] - mov r0, #0xca - lsl r0, r0, #2 - strb r1, [r5, r0] - ldr r1, [r4, #0] - lsl r0, r1, #1 - add r0, r1, r0 - add r0, r7, r0 - ldrb r1, [r0, #1] - ldr r0, _0223B528 ; =0x00000329 - strb r1, [r5, r0] - ldr r1, [r4, #0] - lsl r0, r1, #1 - add r0, r1, r0 - add r0, r7, r0 - ldrb r1, [r0, #2] - ldr r0, _0223B524 ; =0x0000032A - strb r1, [r5, r0] - ldr r0, [r4, #0] - lsl r1, r0, #4 - ldr r0, [sp] - add r1, r0, r1 - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #0 - beq _0223B516 - add r1, r6, #0 - bl sub_0200D474 -_0223B516: - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x10 - cmp r6, #8 - blt _0223B4BE -_0223B520: - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B524: .word 0x0000032A -_0223B528: .word 0x00000329 - thumb_func_end ov76_0223B400 - - thumb_func_start ov76_0223B52C -ov76_0223B52C: ; 0x0223B52C - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r1, #0 - add r1, r0, #0 - add r1, #0xdc - ldr r7, [r1, #0] - add r1, r0, #0 - add r1, #0xe0 - ldr r6, [r1, #0] - mov r1, #0xc9 - lsl r1, r1, #2 - add r2, r0, r1 - lsl r1, r5, #4 - add r4, r2, r1 - ldr r1, [r2, r1] - cmp r1, #1 - bne _0223B558 - bl sub_02022974 - add sp, #0x34 - mov r0, #0 - pop {r4, r5, r6, r7, pc} -_0223B558: - ldrb r1, [r4, #4] - add r2, r5, #0 - bl ov76_0223B36C - ldrb r1, [r4, #5] - add r0, sp, #0 - strh r1, [r0] - ldrb r1, [r4, #6] - strh r1, [r0, #2] - mov r1, #0 - strh r1, [r0, #4] - strh r1, [r0, #6] - mov r0, #2 - str r0, [sp, #0x10] - mov r0, #1 - str r0, [sp, #0x2c] - sub r0, r0, #2 - str r1, [sp, #0xc] - str r1, [sp, #0x30] - str r1, [sp, #8] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldrb r0, [r4, #4] - bl sub_02098140 - ldr r0, _0223B5B4 ; =0x00004E20 - add r1, r6, #0 - add r0, r5, r0 - str r0, [sp, #0x14] - ldr r0, _0223B5B8 ; =0x0000532D - add r2, sp, #0 - str r0, [sp, #0x18] - ldr r0, _0223B5BC ; =0x0000564D - str r0, [sp, #0x1c] - ldr r0, _0223B5C0 ; =0x000059D9 - str r0, [sp, #0x20] - add r0, r7, #0 - bl sub_0200CE6C - str r0, [r4, #8] - bl sub_0200D330 - mov r0, #1 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0223B5B4: .word 0x00004E20 -_0223B5B8: .word 0x0000532D -_0223B5BC: .word 0x0000564D -_0223B5C0: .word 0x000059D9 - thumb_func_end ov76_0223B52C - - thumb_func_start ov76_0223B5C4 -ov76_0223B5C4: ; 0x0223B5C4 - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - add r6, r1, #0 - mov r1, #0xc9 - add r4, r0, #0 - lsl r7, r5, #4 - add r3, r4, r7 - lsl r1, r1, #2 - ldr r2, [r3, r1] - cmp r2, #0 - bne _0223B5DE - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223B5DE: - cmp r6, #3 - bhi _0223B66E - add r2, r6, r6 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0223B5EE: ; jump table - .short _0223B5F6 - _0223B5EE - 2 ; case 0 - .short _0223B636 - _0223B5EE - 2 ; case 1 - .short _0223B60C - _0223B5EE - 2 ; case 2 - .short _0223B636 - _0223B5EE - 2 ; case 3 -_0223B5F6: - add r1, r4, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - cmp r1, #0xff - bne _0223B672 - add r4, #0xd4 - add r1, r5, #0 - str r5, [r4, #0] - bl ov76_0223B314 - b _0223B672 -_0223B60C: - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, r5 - bne _0223B672 - add r0, r1, #0 - add r0, #0xc - add r1, #8 - ldr r0, [r3, r0] - ldr r1, [r3, r1] - mov r2, #1 - bl ov76_0223B184 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B758 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B7D4 - b _0223B672 -_0223B636: - add r1, r4, #0 - add r1, #0xd4 - ldr r1, [r1, #0] - cmp r1, #0xff - bne _0223B672 - add r1, r5, #0 - bl ov76_0223B6C4 - mov r1, #0x33 - add r2, r4, r7 - lsl r1, r1, #4 - add r6, r0, #0 - ldr r0, [r2, r1] - sub r1, r1, #4 - ldr r1, [r2, r1] - mov r2, #0 - bl ov76_0223B184 - cmp r6, #0 - bne _0223B666 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B704 -_0223B666: - mov r0, #0xff - add r4, #0xd4 - str r0, [r4, #0] - b _0223B672 -_0223B66E: - bl sub_02022974 -_0223B672: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B5C4 - - thumb_func_start ov76_0223B678 -ov76_0223B678: ; 0x0223B678 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r7, #0xc9 - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_0223B684: - ldr r0, [r5, r7] - cmp r0, #1 - bne _0223B692 - add r0, r6, #0 - add r1, r4, #0 - bl ov76_0223B704 -_0223B692: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #8 - blt _0223B684 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223B678 - - thumb_func_start ov76_0223B69C -ov76_0223B69C: ; 0x0223B69C - push {r3, r4, r5, r6, r7, lr} - mov r7, #0xc9 - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - lsl r7, r7, #2 -_0223B6A8: - ldr r0, [r5, r7] - cmp r0, #1 - bne _0223B6BA - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r6, #0 - bl sub_0200D3F4 -_0223B6BA: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #8 - blt _0223B6A8 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223B69C - - thumb_func_start ov76_0223B6C4 -ov76_0223B6C4: ; 0x0223B6C4 - push {r3, lr} - lsl r1, r1, #4 - add r2, r0, r1 - mov r0, #0xc9 - lsl r0, r0, #2 - ldr r1, [r2, r0] - cmp r1, #0 - bne _0223B6D8 - mov r0, #1 - pop {r3, pc} -_0223B6D8: - add r0, #8 - ldr r0, [r2, r0] - add r1, sp, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r2, sp, #0 - mov r0, #2 - mov r1, #0 - ldrsh r0, [r2, r0] - ldrsh r1, [r2, r1] - mov r2, #0xbe - mov r3, #0x46 - bl ov12_02237E54 - cmp r0, #0x3c - bgt _0223B700 - mov r0, #1 - pop {r3, pc} -_0223B700: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov76_0223B6C4 - - thumb_func_start ov76_0223B704 -ov76_0223B704: ; 0x0223B704 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0xca - add r7, r1, #0 - lsl r0, r0, #2 - lsl r4, r7, #4 - add r6, r5, r0 - ldrb r0, [r6, r4] - bl sub_02098140 - add r0, r5, #0 - add r0, #0xe0 - ldr r1, _0223B754 ; =0x00004E20 - ldr r0, [r0, #0] - add r1, r7, r1 - bl sub_0200D070 - mov r0, #0xcb - lsl r0, r0, #2 - add r7, r5, r0 - ldr r0, [r7, r4] - bl sub_0200D0F4 - mov r1, #0 - mov r2, #0xc9 - lsl r2, r2, #2 - str r1, [r7, r4] - add r3, r5, r4 - str r1, [r3, r2] - strb r1, [r6, r4] - add r0, r2, #5 - strb r1, [r3, r0] - add r0, r2, #6 - add r2, #0xc - strb r1, [r3, r0] - ldr r0, [r3, r2] - add r2, r1, #0 - bl ov76_0223B15C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B754: .word 0x00004E20 - thumb_func_end ov76_0223B704 - - thumb_func_start ov76_0223B758 -ov76_0223B758: ; 0x0223B758 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - bl ov76_0223B6C4 - cmp r0, #0 - bne _0223B778 - lsl r0, r5, #4 - add r1, r4, r0 - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_0200D810 - pop {r3, r4, r5, pc} -_0223B778: - lsl r0, r5, #4 - add r1, r4, r0 - mov r0, #0xcb - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_0200D810 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B758 - - thumb_func_start ov76_0223B78C -ov76_0223B78C: ; 0x0223B78C - push {r4, r5, r6, r7} - mov r2, #0xf1 - lsl r2, r2, #2 - ldr r2, [r0, r2] - ldr r4, _0223B7D0 ; =0x00000329 - lsl r2, r2, #3 - add r2, r0, r2 - ldr r2, [r2, #8] - mov r1, #0 - add r3, r4, #1 - sub r5, r4, #1 -_0223B7A2: - ldrb r7, [r0, r5] - ldrb r6, [r2] - cmp r7, r6 - bne _0223B7BA - ldrb r7, [r0, r4] - ldrb r6, [r2, #1] - cmp r7, r6 - bne _0223B7BA - ldrb r7, [r0, r3] - ldrb r6, [r2, #2] - cmp r7, r6 - beq _0223B7C0 -_0223B7BA: - mov r0, #1 - pop {r4, r5, r6, r7} - bx lr -_0223B7C0: - add r1, r1, #1 - add r2, r2, #3 - add r0, #0x10 - cmp r1, #8 - blt _0223B7A2 - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr - ; .align 2, 0 -_0223B7D0: .word 0x00000329 - thumb_func_end ov76_0223B78C - - thumb_func_start ov76_0223B7D4 -ov76_0223B7D4: ; 0x0223B7D4 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r4, r1, #4 - mov r0, #0xcb - add r1, r5, r4 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0 - add r1, #2 - add r2, sp, #0 - bl sub_0200D550 - add r2, sp, #0 - mov r0, #2 - ldrsh r1, [r2, r0] - ldr r0, _0223B804 ; =0x00000329 - add r3, r5, r4 - strb r1, [r3, r0] - mov r1, #0 - ldrsh r1, [r2, r1] - add r0, r0, #1 - strb r1, [r3, r0] - pop {r3, r4, r5, pc} - nop -_0223B804: .word 0x00000329 - thumb_func_end ov76_0223B7D4 - - thumb_func_start ov76_0223B808 -ov76_0223B808: ; 0x0223B808 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r3, #0xca - add r7, r0, #0 - lsl r3, r3, #2 - mov r0, #0 - add r1, r7, #0 - add r2, sp, #0 - add r4, r3, #1 - add r5, r3, #2 -_0223B81C: - ldrb r6, [r1, r3] - add r0, r0, #1 - strb r6, [r2] - ldrb r6, [r1, r4] - strb r6, [r2, #1] - ldrb r6, [r1, r5] - add r1, #0x10 - strb r6, [r2, #2] - add r2, r2, #3 - cmp r0, #8 - blt _0223B81C - ldr r0, [r7, #0] - mov r2, #0xf1 - lsl r2, r2, #2 - ldr r0, [r0, #0x20] - ldr r2, [r7, r2] - add r1, sp, #0 - bl sub_0202CA40 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B808 - - thumb_func_start ov76_0223B848 -ov76_0223B848: ; 0x0223B848 - push {r3, r4, r5, r6} - mov r3, #0xca - lsl r3, r3, #2 - mov r2, #0 - add r4, r3, #1 - add r5, r3, #2 -_0223B854: - ldrb r6, [r1, r3] - add r2, r2, #1 - strb r6, [r0] - ldrb r6, [r1, r4] - strb r6, [r0, #1] - ldrb r6, [r1, r5] - add r1, #0x10 - strb r6, [r0, #2] - add r0, r0, #3 - cmp r2, #8 - blt _0223B854 - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 - thumb_func_end ov76_0223B848 - - thumb_func_start ov76_0223B870 -ov76_0223B870: ; 0x0223B870 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r0, r1, #0 - add r1, sp, #0 - add r4, r2, #0 - add r1, #2 - add r2, sp, #0 - add r6, r3, #0 - bl sub_0200D550 - add r1, sp, #0 - mov r0, #0 - ldrsh r2, [r1, r0] - sub r2, r2, r6 - strb r2, [r5] - ldrsh r0, [r1, r0] - add r0, r0, r6 - strb r0, [r5, #1] - mov r0, #2 - ldrsh r2, [r1, r0] - sub r2, r2, r4 - strb r2, [r5, #2] - ldrsh r0, [r1, r0] - add r0, r0, r4 - strb r0, [r5, #3] - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov76_0223B870 - - thumb_func_start ov76_0223B8A8 -ov76_0223B8A8: ; 0x0223B8A8 - push {r4, lr} - add r4, r0, #0 - mov r0, #2 - mov r1, #0x35 - bl sub_02012744 - mov r1, #0x8d - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #2 - mov r1, #0x35 - bl sub_02002BB8 - pop {r4, pc} - thumb_func_end ov76_0223B8A8 - - thumb_func_start ov76_0223B8C4 -ov76_0223B8C4: ; 0x0223B8C4 - push {r4, lr} - add r4, r0, #0 - mov r0, #2 - bl sub_02002C60 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02012870 - mov r0, #9 - lsl r0, r0, #6 - add r0, r4, r0 - bl sub_0201EE28 - mov r0, #0x8f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02012870 - mov r0, #0x93 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201EE28 - mov r0, #0x8d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020127BC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B8C4 - - thumb_func_start ov76_0223B904 -ov76_0223B904: ; 0x0223B904 - push {r3, lr} - sub sp, #0x18 - add r3, r0, #0 - mov r0, #0xe - str r0, [sp] - mov r0, #7 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0223B93C ; =0x00007530 - add r2, r3, #0 - str r0, [sp, #0x14] - add r0, r3, #0 - add r0, #0xe8 - add r2, #0xdc - add r3, #0xe0 - ldr r0, [r0, #0] - ldr r2, [r2, #0] - ldr r3, [r3, #0] - mov r1, #3 - bl sub_0200CD7C - add sp, #0x18 - pop {r3, pc} - ; .align 2, 0 -_0223B93C: .word 0x00007530 - thumb_func_end ov76_0223B904 - - thumb_func_start ov76_0223B940 -ov76_0223B940: ; 0x0223B940 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl ov76_0223B904 - mov r1, #0 - add r0, r4, #0 - mov r2, #0x68 - mov r3, #0xa5 - str r1, [sp] - bl ov76_0223B98C - mov r0, #0 - str r0, [sp] - add r0, r4, #0 - mov r1, #1 - mov r2, #0xc0 - mov r3, #0xa5 - bl ov76_0223B98C - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov76_0223B940 - - thumb_func_start ov76_0223B96C -ov76_0223B96C: ; 0x0223B96C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x8e - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r4, r1, #0 - bl sub_020129D0 - mov r0, #0x8f - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_020129D0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov76_0223B96C - - thumb_func_start ov76_0223B98C -ov76_0223B98C: ; 0x0223B98C - push {r4, r5, r6, r7, lr} - sub sp, #0x5c - add r5, r0, #0 - add r4, r1, #0 - str r2, [sp, #0x10] - add r7, r3, #0 - mov r0, #0 - mov r1, #0x1a - mov r2, #8 - mov r3, #0x35 - bl sub_0200B144 - add r1, r4, #5 - str r0, [sp, #0x14] - bl sub_0200B1EC - str r0, [sp, #0x18] - add r0, sp, #0x1c - bl sub_0201A7A0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - add r1, sp, #0x1c - mov r2, #0xa - mov r3, #2 - bl sub_0201A870 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223BA88 ; =0x000F0D02 - ldr r2, [sp, #0x18] - str r0, [sp, #8] - add r0, sp, #0x1c - mov r1, #2 - str r3, [sp, #0xc] - bl sub_0201D78C - add r0, sp, #0x1c - mov r1, #2 - mov r2, #0x35 - bl sub_02012898 - mov r3, #9 - lsl r3, r3, #6 - mov r1, #0xc - add r6, r4, #0 - mul r6, r1 - add r3, r5, r3 - mov r1, #1 - mov r2, #2 - add r3, r3, r6 - bl sub_0201ED94 - mov r0, #0x8d - lsl r0, r0, #2 - ldr r0, [r5, r0] - str r0, [sp, #0x2c] - add r0, sp, #0x1c - str r0, [sp, #0x30] - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - bl sub_0200D9B0 - str r0, [sp, #0x34] - add r0, r5, #0 - add r0, #0xe0 - ldr r0, [r0, #0] - ldr r1, _0223BA8C ; =0x00007530 - bl sub_0200D04C - str r0, [sp, #0x38] - mov r2, #0 - mov r0, #0x91 - str r2, [sp, #0x3c] - add r1, r5, r6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - str r0, [sp, #0x40] - ldr r1, [sp, #0x18] - mov r0, #2 - bl sub_02002D7C - lsr r1, r0, #1 - ldr r0, [sp, #0x10] - add r7, #0xc0 - sub r0, r0, r1 - str r0, [sp, #0x44] - mov r0, #1 - str r0, [sp, #0x4c] - mov r0, #0x28 - str r0, [sp, #0x50] - mov r0, #2 - str r0, [sp, #0x54] - mov r0, #0x35 - str r0, [sp, #0x58] - mov r0, #0x8e - lsl r0, r0, #2 - add r5, r5, r0 - str r7, [sp, #0x48] - lsl r4, r4, #2 - add r0, sp, #0x2c - bl sub_020127E8 - str r0, [r5, r4] - ldr r0, [r5, r4] - ldr r1, [sp, #0x70] - bl sub_02012AC0 - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_0200B190 - add r0, sp, #0x1c - bl sub_0201A8FC - add sp, #0x5c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BA88: .word 0x000F0D02 -_0223BA8C: .word 0x00007530 - thumb_func_end ov76_0223B98C - - thumb_func_start ov76_0223BA90 -ov76_0223BA90: ; 0x0223BA90 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r7, r0, #0 - mov r0, #0 - str r0, [sp, #4] - str r0, [sp] - add r3, r0, #0 - add r5, r0, #0 - mov r0, #0x42 - lsl r0, r0, #4 -_0223BAA4: - add r2, r7, r3 - add r3, r3, #1 - strb r5, [r2, r0] - cmp r3, #8 - blt _0223BAA4 - lsl r0, r1, #3 - str r0, [sp, #8] -_0223BAB2: - mov r6, #0 - add r4, r7, #0 -_0223BAB6: - ldr r0, [r4, #8] - add r1, r5, #0 - bl sub_0202CA94 - cmp r0, #0 - bne _0223BACA - add r6, r6, #1 - add r4, #8 - cmp r6, #0xc - blt _0223BAB6 -_0223BACA: - add r1, r7, r5 - add r1, #0x80 - ldrb r1, [r1] - cmp r1, #0 - bne _0223BAD8 - cmp r0, #1 - bne _0223BAFA -_0223BAD8: - ldr r0, [sp] - add r1, r0, #1 - ldr r0, [sp, #8] - str r1, [sp] - cmp r1, r0 - ble _0223BAFA - ldr r0, [sp, #4] - add r2, r5, #1 - add r1, r7, r0 - mov r0, #0x42 - lsl r0, r0, #4 - strb r2, [r1, r0] - ldr r0, [sp, #4] - add r0, r0, #1 - str r0, [sp, #4] - cmp r0, #8 - bge _0223BB00 -_0223BAFA: - add r5, r5, #1 - cmp r5, #0x51 - blt _0223BAB2 -_0223BB00: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov76_0223BA90 - - thumb_func_start ov76_0223BB04 -ov76_0223BB04: ; 0x0223BB04 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r7, r0, #0 - add r0, #0xdc - ldr r6, [r0, #0] - add r0, r7, #0 - add r0, #0xe0 - ldr r5, [r0, #0] - add r0, r7, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - mov r4, #0 - str r0, [sp, #0x18] -_0223BB1E: - mov r0, #0x42 - add r1, r7, r4 - lsl r0, r0, #4 - ldrb r0, [r1, r0] - bl sub_02098140 - add r3, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223BB9C ; =0x000061A8 - add r1, r5, #0 - add r0, r4, r0 - str r0, [sp, #8] - add r0, r6, #0 - mov r2, #0x5b - bl sub_0200CBDC - add r4, r4, #1 - cmp r4, #8 - blt _0223BB1E - mov r0, #0x5b - str r0, [sp] - add r0, #0xca - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - ldr r0, _0223BBA0 ; =0x000066B4 - mov r1, #3 - str r0, [sp, #0x14] - ldr r0, [sp, #0x18] - add r2, r6, #0 - add r3, r5, #0 - bl sub_0200CD7C - mov r0, #1 - str r0, [sp] - ldr r0, _0223BBA4 ; =0x00006A2C - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x5b - mov r3, #0xb4 - bl sub_0200CE0C - mov r0, #1 - str r0, [sp] - ldr r0, _0223BBA8 ; =0x00006DB8 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x5b - mov r3, #0x58 - bl sub_0200CE3C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223BB9C: .word 0x000061A8 -_0223BBA0: .word 0x000066B4 -_0223BBA4: .word 0x00006A2C -_0223BBA8: .word 0x00006DB8 - thumb_func_end ov76_0223BB04 - - thumb_func_start ov76_0223BBAC -ov76_0223BBAC: ; 0x0223BBAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - add r5, r0, #0 - add r0, #0xdc - ldr r0, [r0, #0] - mov r4, #0 - str r0, [sp] - add r0, r5, #0 - add r0, #0xe0 - ldr r7, [r0, #0] - add r0, sp, #4 - strh r4, [r0, #0x20] - strh r4, [r0, #0x22] - strh r4, [r0, #0x24] - strh r4, [r0, #0x26] - mov r0, #0x3c - str r0, [sp, #0x2c] - mov r0, #2 - str r0, [sp, #0x34] - mov r0, #1 - str r0, [sp, #0x50] - sub r0, r0, #2 - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - ldr r0, _0223BC5C ; =0x000066B4 - str r4, [sp, #0x54] - str r0, [sp, #0x3c] - ldr r0, _0223BC60 ; =0x00006A2C - str r4, [sp, #0x30] - str r0, [sp, #0x40] - ldr r0, _0223BC64 ; =0x00006DB8 - str r0, [sp, #0x44] - mov r0, #0xf9 - lsl r0, r0, #2 - add r6, r5, r0 -_0223BBF2: - ldr r0, _0223BC68 ; =0x000061A8 - add r1, r7, #0 - add r0, r4, r0 - str r0, [sp, #0x38] - ldr r0, [sp] - add r2, sp, #0x24 - bl sub_0200CE6C - add r4, r4, #1 - stmia r6!, {r0} - cmp r4, #8 - blt _0223BBF2 - ldr r3, _0223BC6C ; =0x0223ED3C - add r2, sp, #4 - mov r1, #0x10 -_0223BC10: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _0223BC10 - mov r7, #0xf9 - mov r6, #0 - add r4, sp, #4 - lsl r7, r7, #2 -_0223BC24: - mov r2, #2 - ldrsh r2, [r4, r2] - mov r0, #0xf9 - mov r1, #0 - lsl r0, r0, #2 - sub r2, r2, #1 - lsl r2, r2, #0x10 - ldrsh r1, [r4, r1] - ldr r0, [r5, r0] - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200D330 - ldr r0, [r5, r7] - mov r1, #0 - bl sub_0200D3CC - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #8 - blt _0223BC24 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BC5C: .word 0x000066B4 -_0223BC60: .word 0x00006A2C -_0223BC64: .word 0x00006DB8 -_0223BC68: .word 0x000061A8 -_0223BC6C: .word 0x0223ED3C - thumb_func_end ov76_0223BBAC - - thumb_func_start ov76_0223BC70 -ov76_0223BC70: ; 0x0223BC70 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r7, #0xf9 - mov r4, #0 - add r5, r6, #0 - lsl r7, r7, #2 -_0223BC7C: - add r0, r6, #0 - add r0, #0xe0 - ldr r1, _0223BC9C ; =0x000061A8 - ldr r0, [r0, #0] - add r1, r4, r1 - bl sub_0200D070 - ldr r0, [r5, r7] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _0223BC7C - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BC9C: .word 0x000061A8 - thumb_func_end ov76_0223BC70 - - thumb_func_start ov76_0223BCA0 -ov76_0223BCA0: ; 0x0223BCA0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - mov r7, #0 - str r0, [sp] - str r1, [sp, #4] - add r6, r7, #0 - add r4, r1, #0 - add r5, r1, #0 -_0223BCB0: - mov r0, #0x51 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _0223BCC6 - add r0, r5, #0 - bl ov12_02225C50 - cmp r0, #1 - bne _0223BCC6 - mov r7, #1 -_0223BCC6: - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x24 - cmp r6, #8 - blt _0223BCB0 - mov r1, #0x12 - ldr r0, [sp, #4] - lsl r1, r1, #4 - add r0, r0, r1 - bl ov12_02225C14 - cmp r0, #1 - bne _0223BD0E - mov r4, #0x59 - ldr r0, [sp, #4] - lsl r4, r4, #2 - ldr r0, [r0, r4] - ldr r3, [sp, #4] - sub r4, #0x44 - ldrsh r3, [r3, r4] - mov r1, #5 - mov r2, #0 - mov r7, #1 - bl sub_02019184 - mov r4, #0x59 - ldr r0, [sp, #4] - lsl r4, r4, #2 - ldr r0, [r0, r4] - ldr r3, [sp, #4] - sub r4, #0x42 - ldrsh r3, [r3, r4] - mov r1, #5 - mov r2, #3 - bl sub_02019184 -_0223BD0E: - cmp r7, #0 - bne _0223BD2A - mov r1, #0x5b - ldr r0, [sp, #4] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r2, #0 - str r2, [r0, #0] - ldr r0, [sp, #4] - bl sub_020181C4 - ldr r0, [sp] - bl sub_0200DA58 -_0223BD2A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223BCA0 - - thumb_func_start ov76_0223BD30 -ov76_0223BD30: ; 0x0223BD30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - str r1, [sp, #0xc] - mov r1, #0x17 - str r0, [sp, #8] - mov r0, #0x35 - lsl r1, r1, #4 - str r2, [sp, #0x10] - bl sub_02018144 - str r0, [sp, #0x1c] - ldr r0, [sp, #8] - mov r1, #0x59 - add r0, #0xe4 - ldr r2, [r0, #0] - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - str r2, [r0, r1] - add r4, r0, #0 - add r5, r0, #0 - ldr r0, [sp, #0xc] - mov r1, #0x38 - lsl r0, r0, #4 - neg r0, r0 - str r0, [sp, #0x18] - ldr r0, [sp, #0xc] - ldr r6, [sp, #8] - mul r1, r0 - ldr r0, [sp, #0x10] - mov r7, #0 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r1, [sp, #0x14] - str r0, [sp, #0x20] -_0223BD74: - mov r0, #0xc9 - lsl r0, r0, #2 - ldr r0, [r6, r0] - cmp r0, #0 - bne _0223BD88 - mov r0, #0x51 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223BDDE -_0223BD88: - mov r0, #0xcb - lsl r0, r0, #2 - ldr r1, [r6, r0] - mov r0, #0x51 - lsl r0, r0, #2 - str r1, [r4, r0] - add r1, sp, #0x24 - ldr r0, [r4, r0] - add r1, #2 - add r2, sp, #0x24 - bl sub_0200D550 - add r1, sp, #0x24 - mov r0, #0 - ldrsh r3, [r1, r0] - mov r0, #2 - ldrsh r1, [r1, r0] - ldr r0, [sp, #0x18] - ldr r2, [sp, #0x14] - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [sp, #0x20] - add r2, r1, r2 - lsl r2, r2, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - asr r2, r2, #0x10 - bl ov12_02225BC8 - mov r1, #0x51 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov12_02225C50 - mov r1, #0x51 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r5, #0 - bl ov12_02225C50 -_0223BDDE: - add r7, r7, #1 - add r6, #0x10 - add r4, r4, #4 - add r5, #0x24 - cmp r7, #8 - blt _0223BD74 - mov r1, #0x59 - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #5 - bl sub_020192EC - add r4, r0, #0 - mov r1, #0x59 - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #5 - bl sub_020192F8 - add r3, r0, #0 - ldr r0, [sp, #0xc] - mov r5, #0x37 - lsl r0, r0, #4 - add r0, r3, r0 - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - str r0, [sp] - ldr r0, [sp, #0x10] - mov r1, #0x12 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] - lsl r3, r3, #0x10 - ldr r2, [sp, #0xc] - mvn r5, r5 - mul r5, r2 - add r2, r4, r5 - lsl r2, r2, #0x10 - ldr r0, [sp, #0x1c] - lsl r1, r1, #4 - add r0, r0, r1 - lsl r1, r4, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl ov12_02225BC8 - mov r2, #0x96 - lsl r2, r2, #2 - ldr r0, [sp, #8] - add r1, r2, #0 - add r3, r0, r2 - ldr r0, [sp, #0x1c] - sub r1, #0xec - str r3, [r0, r1] - sub r2, #0xec - ldr r0, [r0, r2] - mov r3, #1 - str r3, [r0, #0] - ldr r0, _0223BE68 ; =ov76_0223BCA0 - ldr r1, [sp, #0x1c] - lsl r2, r3, #0xc - bl sub_0200D9E8 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223BE68: .word ov76_0223BCA0 - thumb_func_end ov76_0223BD30 - - thumb_func_start ov76_0223BE6C -ov76_0223BE6C: ; 0x0223BE6C - push {r3, lr} - sub sp, #8 - mov r2, #2 - mov r1, #0 - ldr r0, _0223BE88 ; =ov76_0223BE8C - str r2, [sp] - str r0, [sp, #4] - mov r0, #0x35 - add r3, r1, #0 - bl sub_02024220 - add sp, #8 - pop {r3, pc} - nop -_0223BE88: .word ov76_0223BE8C - thumb_func_end ov76_0223BE6C - - thumb_func_start ov76_0223BE8C -ov76_0223BE8C: ; 0x0223BE8C - push {r3, lr} - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r0, _0223BEF8 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r2, [r0] - ldr r1, _0223BEFC ; =0xFFFFCFFD - and r2, r1 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0223BF00 ; =0x0000CFFB - and r3, r2 - strh r3, [r0] - ldrh r3, [r0] - sub r2, #0x1c - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r0, #0 - ldr r2, _0223BF04 ; =0x00007FFF - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _0223BF08 ; =0xBFFF0000 - ldr r0, _0223BF0C ; =0x04000580 - str r1, [r0, #0] - pop {r3, pc} - ; .align 2, 0 -_0223BEF8: .word 0x04000008 -_0223BEFC: .word 0xFFFFCFFD -_0223BF00: .word 0x0000CFFB -_0223BF04: .word 0x00007FFF -_0223BF08: .word 0xBFFF0000 -_0223BF0C: .word 0x04000580 - thumb_func_end ov76_0223BE8C - - thumb_func_start ov76_0223BF10 -ov76_0223BF10: ; 0x0223BF10 - push {r3, r4, r5, lr} - ldr r3, _0223BF48 ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _0223BF4C ; =0x02100DF4 - mov r1, #0 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - add r2, r1, #0 - blx r3 - add r5, r0, #0 - cmp r4, #0 - bne _0223BF38 - bl sub_02022974 -_0223BF38: - cmp r5, #0 - bne _0223BF40 - bl sub_02022974 -_0223BF40: - bl sub_02014000 - pop {r3, r4, r5, pc} - nop -_0223BF48: .word 0x02100DEC -_0223BF4C: .word 0x02100DF4 - thumb_func_end ov76_0223BF10 - - thumb_func_start ov76_0223BF50 -ov76_0223BF50: ; 0x0223BF50 - push {r3, lr} - bl sub_020241B4 - bl sub_0201469C - cmp r0, #0 - ble _0223BF66 - bl sub_020241B4 - bl sub_020A73C0 -_0223BF66: - bl sub_020146C0 - mov r0, #1 - mov r1, #0 - bl sub_020241BC - pop {r3, pc} - thumb_func_end ov76_0223BF50 - - thumb_func_start ov76_0223BF74 -ov76_0223BF74: ; 0x0223BF74 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x40 - str r1, [sp, #0x18] - str r0, [sp, #0x14] - ldr r1, [sp, #0x58] - add r0, r3, #0 - add r6, r2, #0 - str r3, [sp, #0x1c] - bl ov76_0223D45C - cmp r0, #3 - bhi _0223BFF2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223BF98: ; jump table - .short _0223BFA0 - _0223BF98 - 2 ; case 0 - .short _0223BFB2 - _0223BF98 - 2 ; case 1 - .short _0223BFC8 - _0223BF98 - 2 ; case 2 - .short _0223BFDE - _0223BF98 - 2 ; case 3 -_0223BFA0: - mov r0, #0 - str r0, [sp, #0x24] - mov r0, #4 - str r0, [sp, #0x28] - mov r0, #1 - mov r5, #0xd - mov r4, #6 - str r0, [sp, #0x2c] - b _0223BFF2 -_0223BFB2: - mov r0, #2 - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp, #0x28] - mov r0, #4 - str r0, [sp, #0x2c] - mov r0, #1 - mov r5, #0xb - mov r4, #8 - str r0, [sp, #0x30] - b _0223BFF2 -_0223BFC8: - mov r0, #3 - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp, #0x28] - mov r0, #4 - str r0, [sp, #0x2c] - mov r0, #1 - mov r5, #0xb - mov r4, #8 - str r0, [sp, #0x30] - b _0223BFF2 -_0223BFDE: - mov r0, #2 - str r0, [sp, #0x24] - mov r0, #0 - str r0, [sp, #0x28] - mov r0, #4 - str r0, [sp, #0x2c] - mov r0, #1 - mov r5, #0xb - mov r4, #8 - str r0, [sp, #0x30] -_0223BFF2: - lsr r0, r4, #0x1f - add r0, r4, r0 - asr r7, r0, #1 - ldr r0, [sp, #0x18] - bl sub_0201A7A0 - lsl r0, r5, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #9 - str r0, [sp, #4] - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - mov r0, #0xa6 - str r0, [sp, #0x10] - lsl r2, r6, #0x18 - ldr r0, [sp, #0x14] - ldr r1, [sp, #0x18] - lsr r2, r2, #0x18 - mov r3, #0x15 - bl sub_0201A7E8 - add r0, r7, #0 - mov r1, #0x35 - bl sub_02013A04 - mov r2, #0x67 - ldr r1, [sp, #0x1c] - lsl r2, r2, #2 - str r0, [r1, r2] - mov r0, #0 - mov r1, #0x1a - mov r2, #8 - mov r3, #0x35 - bl sub_0200B144 - mov r6, #0 - str r0, [sp, #0x20] - cmp r7, #0 - ble _0223C080 - add r5, sp, #0x24 -_0223C04A: - ldr r1, [r5, #0] - ldr r0, [sp, #0x20] - lsl r2, r1, #3 - ldr r1, _0223C0E8 ; =0x0223EF3C - ldr r1, [r1, r2] - bl sub_0200B1EC - ldr r2, [r5, #0] - add r4, r0, #0 - lsl r3, r2, #3 - ldr r2, _0223C0E8 ; =0x0223EF3C - mov r0, #0x67 - add r2, r2, r3 - ldr r1, [sp, #0x1c] - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r2, [r2, #4] - add r1, r4, #0 - bl sub_02013A6C - add r0, r4, #0 - bl sub_020237BC - add r6, r6, #1 - add r5, r5, #4 - cmp r6, r7 - blt _0223C04A -_0223C080: - ldr r0, [sp, #0x20] - bl sub_0200B190 - mov r1, #0x67 - ldr r0, [sp, #0x1c] - lsl r1, r1, #2 - ldr r0, [r0, r1] - mov r1, #0 - str r0, [sp, #0x34] - add r0, sp, #0x24 - strb r1, [r0, #0x18] - ldr r1, [sp, #0x18] - mov r2, #0xf - str r1, [sp, #0x38] - mov r1, #1 - strb r1, [r0, #0x19] - strb r7, [r0, #0x1a] - ldrb r3, [r0, #0x1b] - bic r3, r2 - strb r3, [r0, #0x1b] - ldrb r3, [r0, #0x1b] - mov r2, #0x30 - bic r3, r2 - strb r3, [r0, #0x1b] - ldrb r3, [r0, #0x1b] - mov r2, #0xc0 - bic r3, r2 - mov r2, #0x40 - orr r2, r3 - strb r2, [r0, #0x1b] - ldr r0, [sp, #0x18] - mov r2, #0x1f - mov r3, #0xd - bl sub_0200DC48 - mov r0, #0x35 - str r0, [sp] - mov r0, #2 - mov r2, #0 - str r0, [sp, #4] - add r0, sp, #0x34 - mov r1, #8 - add r3, r2, #0 - bl sub_02001B7C - mov r2, #0x1a - ldr r1, [sp, #0x1c] - lsl r2, r2, #4 - str r0, [r1, r2] - add sp, #0x40 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223C0E8: .word 0x0223EF3C - thumb_func_end ov76_0223BF74 - - thumb_func_start ov76_0223C0EC -ov76_0223C0EC: ; 0x0223C0EC - push {r4, r5} - lsr r5, r0, #0x1f - lsl r4, r0, #0x1e - sub r4, r4, r5 - mov r3, #0x1e - ror r4, r3 - add r4, r5, r4 - mov r3, #0x38 - mul r3, r4 - add r3, #0x28 - strh r3, [r1] - asr r1, r0, #2 - mov r0, #0x35 - mul r0, r1 - add r0, #0x1b - strh r0, [r2] - pop {r4, r5} - bx lr - thumb_func_end ov76_0223C0EC - - thumb_func_start ov76_0223C110 -ov76_0223C110: ; 0x0223C110 - push {r4, r5, r6, lr} - sub sp, #0x18 - add r1, r0, #0 - add r1, #0xdc - ldr r4, [r1, #0] - add r1, r0, #0 - add r1, #0xe0 - add r0, #0xe8 - ldr r5, [r1, #0] - ldr r6, [r0, #0] - bl sub_02079FD0 - mov r1, #0x13 - str r1, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r0, #3 - str r0, [sp, #0xc] - mov r0, #1 - str r0, [sp, #0x10] - mov r0, #0xfa - lsl r0, r0, #6 - str r0, [sp, #0x14] - add r0, r6, #0 - mov r1, #2 - add r2, r4, #0 - add r3, r5, #0 - bl sub_0200CD7C - bl sub_02079FDC - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0223C180 ; =0x00004268 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x13 - bl sub_0200CE0C - bl sub_02079FE8 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, _0223C184 ; =0x00004650 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x13 - bl sub_0200CE3C - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223C180: .word 0x00004268 -_0223C184: .word 0x00004650 - thumb_func_end ov76_0223C110 - - thumb_func_start ov76_0223C188 -ov76_0223C188: ; 0x0223C188 - push {r4, r5, r6, r7, lr} - sub sp, #0x4c - add r5, r0, #0 - ldr r1, [r5, #0] - mov r6, #0 - ldr r0, [r1, #0] - cmp r0, #0 - ble _0223C276 - str r6, [sp, #0xc] - add r4, r5, #0 -_0223C19C: - ldr r0, [sp, #0xc] - add r0, r1, r0 - ldr r7, [r0, #4] - add r0, r7, #0 - bl sub_02079D80 - add r3, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, _0223C27C ; =0x00003A98 - add r1, r5, #0 - add r0, r6, r0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - mov r2, #0x13 - bl sub_0200D888 - mov r1, #0 - add r0, sp, #0x18 - strh r1, [r0] - strh r1, [r0, #2] - strh r1, [r0, #4] - strh r1, [r0, #6] - mov r0, #0xa - str r0, [sp, #0x20] - add r0, r1, #0 - str r0, [sp, #0x24] - mov r0, #1 - str r0, [sp, #0x28] - mov r0, #2 - str r0, [sp, #0x44] - add r0, r1, #0 - str r0, [sp, #0x48] - ldr r0, _0223C27C ; =0x00003A98 - add r2, sp, #0x18 - add r0, r6, r0 - str r0, [sp, #0x2c] - mov r0, #0xfa - lsl r0, r0, #6 - str r0, [sp, #0x30] - ldr r0, _0223C280 ; =0x00004268 - str r0, [sp, #0x34] - ldr r0, _0223C284 ; =0x00004650 - str r0, [sp, #0x38] - sub r0, r1, #1 - str r0, [sp, #0x3c] - sub r0, r1, #1 - str r0, [sp, #0x40] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200CE6C - mov r1, #0xbf - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r7, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x10] - add r0, r7, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074470 - str r0, [sp, #0x14] - add r0, r7, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - ldr r0, [sp, #0x10] - ldr r2, [sp, #0x14] - bl sub_02079EDC - add r1, r0, #0 - mov r0, #0xbf - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r0, [r0, #0] - bl sub_02021F24 - mov r0, #0xbf - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D364 - ldr r0, [sp, #0xc] - ldr r1, [r5, #0] - add r0, r0, #4 - str r0, [sp, #0xc] - ldr r0, [r1, #0] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, r0 - blt _0223C19C -_0223C276: - add sp, #0x4c - pop {r4, r5, r6, r7, pc} - nop -_0223C27C: .word 0x00003A98 -_0223C280: .word 0x00004268 -_0223C284: .word 0x00004650 - thumb_func_end ov76_0223C188 - - thumb_func_start ov76_0223C288 -ov76_0223C288: ; 0x0223C288 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - mov r4, #0 - ldr r0, [r0, #0] - cmp r0, #0 - ble _0223C2B0 - mov r7, #0xbf - add r5, r6, #0 - lsl r7, r7, #2 -_0223C29C: - ldr r0, [r5, r7] - mov r1, #0 - bl sub_0200D3F4 - ldr r0, [r6, #0] - add r4, r4, #1 - ldr r0, [r0, #0] - add r5, r5, #4 - cmp r4, r0 - blt _0223C29C -_0223C2B0: - mov r5, #0 - add r4, r6, #0 -_0223C2B4: - ldr r7, [r4, #4] - cmp r7, #0xff - beq _0223C2F8 - add r1, sp, #0 - add r0, r5, #0 - add r1, #2 - add r2, sp, #0 - bl ov76_0223C0EC - add r2, sp, #0 - mov r1, #2 - ldrsh r1, [r2, r1] - add r3, r2, #0 - mov r2, #0 - ldrsh r2, [r3, r2] - lsl r0, r7, #2 - add r7, r6, r0 - mov r0, #0xbf - lsl r0, r0, #2 - sub r1, #0x10 - add r2, #0xc - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - ldr r0, [r7, r0] - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - mov r0, #0xbf - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r1, #1 - bl sub_0200D3F4 -_0223C2F8: - add r5, r5, #1 - add r4, #8 - cmp r5, #0xc - blt _0223C2B4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223C288 - - thumb_func_start ov76_0223C304 -ov76_0223C304: ; 0x0223C304 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - mov r4, #0 - ldr r0, [r0, #0] - cmp r0, #0 - ble _0223C32A - mov r7, #0xbf - add r5, r6, #0 - lsl r7, r7, #2 -_0223C318: - ldr r0, [r5, r7] - bl sub_0200D330 - ldr r0, [r6, #0] - add r4, r4, #1 - ldr r0, [r0, #0] - add r5, r5, #4 - cmp r4, r0 - blt _0223C318 -_0223C32A: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C304 - - thumb_func_start ov76_0223C32C -ov76_0223C32C: ; 0x0223C32C - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, [r6, #0] - mov r4, #0 - ldr r0, [r0, #0] - cmp r0, #0 - ble _0223C352 - mov r7, #0xbf - add r5, r6, #0 - lsl r7, r7, #2 -_0223C340: - ldr r0, [r5, r7] - bl sub_0200D0F4 - ldr r0, [r6, #0] - add r4, r4, #1 - ldr r0, [r0, #0] - add r5, r5, #4 - cmp r4, r0 - blt _0223C340 -_0223C352: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C32C - - thumb_func_start ov76_0223C354 -ov76_0223C354: ; 0x0223C354 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r6, #0 - add r4, r7, #0 - add r5, r7, #0 -_0223C35E: - ldr r0, [r4, #8] - bl ov76_0223D430 - mov r1, #0x9a - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0x99 - ldr r1, [r4, #4] - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223C38C - mov r0, #0x99 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0xff - beq _0223C38C - add r0, r7, #0 - add r1, r6, #0 - bl ov76_0223E91C -_0223C38C: - add r6, r6, #1 - add r4, #8 - add r5, #0xc - cmp r6, #0xc - blt _0223C35E - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C354 - - thumb_func_start ov76_0223C398 -ov76_0223C398: ; 0x0223C398 - push {r3, r4, r5, r6, lr} - sub sp, #0x4c - add r4, r0, #0 - mov r0, #0x35 - bl sub_0200C6E4 - add r2, sp, #0x2c - ldr r5, _0223C418 ; =0x0223ED1C - str r0, [r4, #8] - ldmia r5!, {r0, r1} - add r3, r2, #0 - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - ldr r6, _0223C41C ; =0x0223ECF0 - stmia r2!, {r0, r1} - add r5, sp, #0x18 - ldmia r6!, {r0, r1} - add r2, r5, #0 - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r1, r3, #0 - str r0, [r5, #0] - ldr r0, [r4, #8] - mov r3, #0x20 - bl sub_0200C73C - ldr r3, _0223C420 ; =0x0223ED04 - add r2, sp, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r4, #8] - bl sub_0200C704 - str r0, [r4, #0xc] - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - mov r2, #0x80 - bl sub_0200C7C0 - cmp r0, #0 - bne _0223C402 - bl sub_02022974 -_0223C402: - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - add r2, sp, #0 - bl sub_0200CB30 - cmp r0, #0 - bne _0223C414 - bl sub_02022974 -_0223C414: - add sp, #0x4c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223C418: .word 0x0223ED1C -_0223C41C: .word 0x0223ECF0 -_0223C420: .word 0x0223ED04 - thumb_func_end ov76_0223C398 - - thumb_func_start ov76_0223C424 -ov76_0223C424: ; 0x0223C424 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - ldr r1, [r4, #0xc] - bl sub_0200D0B0 - ldr r0, [r4, #8] - bl sub_0200C8D4 - pop {r4, pc} - thumb_func_end ov76_0223C424 - - thumb_func_start ov76_0223C438 -ov76_0223C438: ; 0x0223C438 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #2 - add r4, r1, #0 - str r0, [sp, #4] - ldr r0, _0223C49C ; =0x0000AFC8 - add r1, r5, #0 - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r3, _0223C4A0 ; =0x00000109 - add r2, r4, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0223C4A4 ; =0x0000B798 - add r1, r5, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, r4, #0 - mov r3, #0xad - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0223C4A8 ; =0x0000BB80 - add r2, r4, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xdc - add r5, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r5, #0] - mov r3, #0x51 - bl sub_0200CE54 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223C49C: .word 0x0000AFC8 -_0223C4A0: .word 0x00000109 -_0223C4A4: .word 0x0000B798 -_0223C4A8: .word 0x0000BB80 - thumb_func_end ov76_0223C438 - - thumb_func_start ov76_0223C4AC -ov76_0223C4AC: ; 0x0223C4AC - push {r4, r5, r6, r7, lr} - sub sp, #0x64 - ldr r4, _0223C530 ; =0x0223ED5C - add r6, r0, #0 - add r3, sp, #0 - mov r2, #6 -_0223C4B8: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223C4B8 - mov r7, #0 - add r4, sp, #0 - add r5, r6, #0 -_0223C4C6: - ldr r1, [r4, #0] - add r0, sp, #0 - strh r1, [r0, #0x30] - ldr r1, [r4, #4] - add r2, sp, #0x30 - strh r1, [r0, #0x32] - mov r1, #0 - strh r1, [r0, #0x34] - strh r1, [r0, #0x36] - mov r0, #0x28 - str r0, [sp, #0x38] - mov r0, #2 - str r0, [sp, #0x3c] - str r0, [sp, #0x40] - mov r0, #1 - str r0, [sp, #0x5c] - add r0, r1, #0 - str r0, [sp, #0x60] - ldr r0, _0223C534 ; =0x0000AFC8 - str r0, [sp, #0x44] - ldr r0, _0223C538 ; =0x000066B2 - str r0, [sp, #0x48] - ldr r0, _0223C53C ; =0x0000B798 - str r0, [sp, #0x4c] - ldr r0, _0223C540 ; =0x0000BB80 - str r0, [sp, #0x50] - sub r0, r1, #1 - str r0, [sp, #0x54] - sub r0, r1, #1 - str r0, [sp, #0x58] - add r0, r6, #0 - add r1, r6, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200CE6C - mov r1, #0xc5 - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - ldr r1, [r4, #8] - bl sub_0200D7D4 - add r7, r7, #1 - add r4, #0xc - add r5, r5, #4 - cmp r7, #4 - blt _0223C4C6 - add sp, #0x64 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223C530: .word 0x0223ED5C -_0223C534: .word 0x0000AFC8 -_0223C538: .word 0x000066B2 -_0223C53C: .word 0x0000B798 -_0223C540: .word 0x0000BB80 - thumb_func_end ov76_0223C4AC - - thumb_func_start ov76_0223C544 -ov76_0223C544: ; 0x0223C544 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223C564 - mov r6, #0xc5 - mov r4, #0 - lsl r6, r6, #2 -_0223C556: - ldr r0, [r5, r6] - bl sub_0200D330 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223C556 -_0223C564: - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov76_0223C544 - - thumb_func_start ov76_0223C568 -ov76_0223C568: ; 0x0223C568 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0xc5 - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - lsl r7, r7, #2 -_0223C574: - ldr r0, [r5, r7] - add r1, r6, #0 - bl sub_0200D3F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223C574 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223C568 - - thumb_func_start ov76_0223C588 -ov76_0223C588: ; 0x0223C588 - push {r4, r5, r6, lr} - mov r6, #0xc5 - add r5, r0, #0 - mov r4, #0 - lsl r6, r6, #2 -_0223C592: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223C592 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov76_0223C588 - - thumb_func_start ov76_0223C5A4 -ov76_0223C5A4: ; 0x0223C5A4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r2, #0 - mov r2, #1 - str r2, [sp] - ldr r2, [sp, #0x3c] - ldr r4, [sp, #0x48] - str r2, [sp, #4] - ldr r2, _0223C618 ; =0x00002AF8 - add r5, r0, #0 - add r2, r3, r2 - str r2, [sp, #8] - add r2, r4, #0 - add r6, r1, #0 - bl sub_0200CC3C - ldr r0, [sp, #0x30] - str r4, [sp] - str r0, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - ldr r1, [sp, #0x44] - add r2, r5, #0 - str r1, [sp, #0xc] - ldr r1, [sp, #0x3c] - add r3, r6, #0 - str r1, [sp, #0x10] - ldr r1, _0223C618 ; =0x00002AF8 - add r0, r0, r1 - str r0, [sp, #0x14] - ldr r1, [sp, #0x40] - add r0, r7, #0 - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - ldr r3, [sp, #0x34] - ldr r0, _0223C618 ; =0x00002AF8 - add r1, r6, #0 - add r0, r3, r0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r4, #0 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r3, [sp, #0x38] - ldr r0, _0223C618 ; =0x00002AF8 - add r1, r6, #0 - add r0, r3, r0 - str r0, [sp, #4] - add r0, r5, #0 - add r2, r4, #0 - bl sub_0200CE54 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223C618: .word 0x00002AF8 - thumb_func_end ov76_0223C5A4 - - thumb_func_start ov76_0223C61C -ov76_0223C61C: ; 0x0223C61C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x58 - add r5, r0, #0 - ldr r0, _0223C7CC ; =0x0000011E - add r4, r1, #0 - str r0, [sp] - mov r0, #0xae - str r0, [sp, #4] - mov r3, #0x52 - str r3, [sp, #8] - mov r1, #1 - add r2, r5, #0 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r5, #0 - add r1, r5, #0 - str r4, [sp, #0x18] - add r0, #0xdc - add r1, #0xe0 - add r2, #0xe8 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - add r3, #0xb8 - bl ov76_0223C5A4 - ldr r0, _0223C7D0 ; =0x00000123 - add r2, r5, #0 - str r0, [sp] - mov r0, #0xb3 - str r0, [sp, #4] - mov r3, #0x57 - str r3, [sp, #8] - mov r1, #1 - str r1, [sp, #0xc] - mov r0, #2 - str r0, [sp, #0x10] - str r1, [sp, #0x14] - add r0, r5, #0 - add r1, r5, #0 - str r4, [sp, #0x18] - add r0, #0xdc - add r1, #0xe0 - add r2, #0xe8 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - ldr r2, [r2, #0] - add r3, #0xbc - bl ov76_0223C5A4 - mov r6, #0 - add r4, r5, #0 - add r7, sp, #0x1c -_0223C68A: - mov r0, #0 - strh r0, [r7, #8] - strh r0, [r7, #0xa] - strh r0, [r7, #0xc] - mov r0, #0x9a - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - strh r0, [r7, #0xe] - mov r0, #0x28 - sub r0, r0, r6 - str r0, [sp, #0x2c] - mov r0, #0 - str r0, [sp, #0x30] - mov r0, #1 - str r0, [sp, #0x34] - mov r0, #2 - str r0, [sp, #0x50] - mov r0, #0 - str r0, [sp, #0x54] - ldr r0, _0223C7D4 ; =0x00002C02 - add r1, #0xe0 - str r0, [sp, #0x38] - add r0, #0x14 - str r0, [sp, #0x3c] - ldr r0, _0223C7D8 ; =0x00002BA6 - add r2, sp, #0x24 - str r0, [sp, #0x40] - sub r0, #0x5c - str r0, [sp, #0x44] - mov r0, #0 - mvn r0, r0 - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - add r0, r5, #0 - add r0, #0xdc - ldr r0, [r0, #0] - ldr r1, [r1, #0] - bl sub_0200CE6C - mov r1, #0x9b - lsl r1, r1, #2 - str r0, [r4, r1] - add r1, sp, #0x20 - add r0, r6, #0 - add r1, #2 - add r2, sp, #0x20 - bl ov76_0223C0EC - mov r0, #0x9b - mov r1, #6 - mov r2, #4 - lsl r0, r0, #2 - ldrsh r1, [r7, r1] - ldrsh r2, [r7, r2] - ldr r0, [r4, r0] - bl sub_0200D4C4 - add r6, r6, #1 - add r4, #0xc - cmp r6, #0xc - blt _0223C68A - mov r1, #0 - add r0, sp, #0x1c - strh r1, [r0, #8] - strh r1, [r0, #0xa] - strh r1, [r0, #0xc] - strh r1, [r0, #0xe] - mov r0, #0x14 - str r0, [sp, #0x2c] - mov r0, #1 - str r1, [sp, #0x30] - str r1, [sp, #0x54] - ldr r1, _0223C7DC ; =0x00002C0B - str r0, [sp, #0x34] - add r0, r1, #0 - add r0, #0x10 - str r0, [sp, #0x3c] - add r0, r1, #0 - mov r2, #2 - sub r0, #0x60 - str r1, [sp, #0x38] - str r0, [sp, #0x40] - sub r0, r2, #3 - sub r1, #0xbc - str r1, [sp, #0x44] - add r1, r5, #0 - str r2, [sp, #0x50] - str r0, [sp, #0x48] - str r0, [sp, #0x4c] - add r0, r5, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, sp, #0x24 - bl sub_0200CE6C - mov r1, #0xbd - lsl r1, r1, #2 - str r0, [r5, r1] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0xdc - add r1, #0xe0 - ldr r0, [r0, #0] - ldr r1, [r1, #0] - add r2, sp, #0x24 - bl sub_0200CE6C - mov r1, #0xbe - lsl r1, r1, #2 - str r0, [r5, r1] - add r1, #0xcc - ldr r0, [r5, r1] - add r1, sp, #0x1c - add r1, #2 - add r2, sp, #0x1c - bl ov76_0223C0EC - mov r0, #0xbd - lsl r0, r0, #2 - add r3, sp, #0x1c - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r5, r0] - bl sub_0200D4C4 - mov r0, #0xbe - lsl r0, r0, #2 - add r3, sp, #0x1c - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - ldr r0, [r5, r0] - bl sub_0200D4C4 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x19 - bl sub_0200D474 - mov r0, #0xbd - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200D364 - add sp, #0x58 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223C7CC: .word 0x0000011E -_0223C7D0: .word 0x00000123 -_0223C7D4: .word 0x00002C02 -_0223C7D8: .word 0x00002BA6 -_0223C7DC: .word 0x00002C0B - thumb_func_end ov76_0223C61C - - thumb_func_start ov76_0223C7E0 -ov76_0223C7E0: ; 0x0223C7E0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov76_0223C354 - add r0, r5, #0 - bl ov76_0223C288 - mov r7, #0x9a - lsl r7, r7, #2 - mov r4, #0 - add r6, r7, #4 -_0223C7F6: - ldr r0, [r5, r6] - cmp r0, #0 - beq _0223C802 - ldr r1, [r5, r7] - bl sub_0200D364 -_0223C802: - add r4, r4, #1 - add r5, #0xc - cmp r4, #0xc - blt _0223C7F6 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C7E0 - - thumb_func_start ov76_0223C80C -ov76_0223C80C: ; 0x0223C80C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - lsl r6, r1, #3 - add r0, r5, r6 - ldr r0, [r0, #4] - lsl r4, r2, #3 - str r1, [sp] - add r1, r5, r4 - ldr r7, [r1, #4] - cmp r0, #0xff - beq _0223C838 - add r1, r2, #1 - str r1, [sp, #0xc] - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #4] - mov r1, #0xa2 - add r2, sp, #0xc - bl sub_02074B30 -_0223C838: - cmp r7, #0xff - beq _0223C852 - ldr r0, [sp] - add r2, sp, #8 - add r0, r0, #1 - str r0, [sp, #8] - ldr r1, [r5, #0] - lsl r0, r7, #2 - add r0, r1, r0 - ldr r0, [r0, #4] - mov r1, #0xa2 - bl sub_02074B30 -_0223C852: - add r2, r5, #4 - ldr r1, [r2, r6] - ldr r0, [r2, r4] - add r7, r5, #0 - str r0, [r2, r6] - str r1, [r2, r4] - add r7, #8 - ldr r0, [r7, r6] - add r1, sp, #0x10 - bl sub_0202CA10 - add r0, r5, #0 - str r0, [sp, #4] - add r0, #8 - str r0, [sp, #4] - ldr r0, [r0, r4] - ldr r1, [r7, r6] - bl sub_0202CA10 - ldr r1, [sp, #4] - add r0, sp, #0x10 - ldr r1, [r1, r4] - bl sub_0202CA10 - add r0, r5, #0 - bl ov76_0223C7E0 - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C80C - - thumb_func_start ov76_0223C88C -ov76_0223C88C: ; 0x0223C88C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r6, #0x9b - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #2 -_0223C898: - ldr r0, [r5, r6] - bl sub_0200D330 - add r4, r4, #1 - add r5, #0xc - cmp r4, #0xc - blt _0223C898 - mov r0, #0xbd - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_0200D330 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_0200D330 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C88C - - thumb_func_start ov76_0223C8BC -ov76_0223C8BC: ; 0x0223C8BC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r6, #0x9b - mov r4, #0 - add r5, r7, #0 - lsl r6, r6, #2 -_0223C8C8: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, #0xc - cmp r4, #0xc - blt _0223C8C8 - mov r0, #0xbd - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_0200D0F4 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r7, r0] - bl sub_0200D0F4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223C8BC - - thumb_func_start ov76_0223C8EC -ov76_0223C8EC: ; 0x0223C8EC - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r2, #0 - add r4, r1, #0 - lsl r1, r6, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #0x35 - str r1, [sp, #4] - mov r1, #1 - add r2, r1, #0 - mov r3, #0xf - add r5, r0, #0 - bl sub_0200DD0C - add r0, r6, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xc0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0x26 - mov r3, #0x35 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x35 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #1 - mov r2, #0x1f - mov r3, #0xd - bl sub_0200DAA4 - bl sub_0200DAA0 - add r2, r0, #0 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0x26 - mov r3, #0x35 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xe - mov r2, #7 - mov r3, #0x35 - bl sub_02003050 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov76_0223C8EC - - thumb_func_start ov76_0223C974 -ov76_0223C974: ; 0x0223C974 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r6, r2, #0 - add r4, r1, #0 - lsl r1, r6, #0x18 - lsr r1, r1, #0x18 - str r1, [sp] - mov r1, #0x35 - str r1, [sp, #4] - mov r1, #4 - mov r2, #1 - mov r3, #0xf - add r5, r0, #0 - bl sub_0200DD0C - add r0, r6, #0 - bl sub_0200DD08 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xc0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0x26 - mov r3, #0x35 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - mov r0, #0x35 - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #4 - mov r2, #0x1f - mov r3, #0xd - bl sub_0200DAA4 - bl sub_0200DAA0 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xd0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0x26 - mov r3, #0x35 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0xe0 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xe - mov r2, #7 - mov r3, #0x35 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x30 - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xe - mov r2, #7 - mov r3, #0x35 - bl sub_02003050 - mov r0, #1 - str r0, [sp] - mov r0, #0x20 - mov r1, #0x5b - str r0, [sp, #4] - mov r0, #0xb0 - add r2, r1, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r2, #0xcb - mov r3, #0x35 - bl sub_02003050 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov76_0223C974 - - thumb_func_start ov76_0223CA30 -ov76_0223CA30: ; 0x0223CA30 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, _0223CA94 ; =0x0000FFFF - add r4, r0, #0 - cmp r5, r1 - bne _0223CA4E - mov r1, #0xf - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201A954 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0223CA4E: - mov r0, #0 - mov r1, #0x1a - mov r2, #8 - mov r3, #0x35 - bl sub_0200B144 - add r1, r5, #0 - add r6, r0, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - add r0, r4, #0 - mov r1, #1 - add r2, r5, #0 - str r3, [sp, #8] - bl sub_0201D738 - add r0, r4, #0 - bl sub_0201A954 - add r0, r5, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223CA94: .word 0x0000FFFF - thumb_func_end ov76_0223CA30 - - thumb_func_start ov76_0223CA98 -ov76_0223CA98: ; 0x0223CA98 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0201A7A0 - ldr r0, [sp, #0x28] - lsl r2, r4, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x2c] - lsl r3, r6, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - add r1, r5, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xe - str r0, [sp, #0xc] - ldr r0, [sp, #0x34] - lsr r2, r2, #0x18 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - add r0, r7, #0 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - mov r1, #1 - add r0, r5, #0 - add r2, r1, #0 - mov r3, #0xc - bl sub_0200E060 - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov76_0223CA98 - - thumb_func_start ov76_0223CAFC -ov76_0223CAFC: ; 0x0223CAFC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r7, r0, #0 - add r0, r5, #0 - add r4, r2, #0 - add r6, r3, #0 - bl sub_0201A7A0 - ldr r0, [sp, #0x28] - lsl r2, r4, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [sp, #0x2c] - lsl r3, r6, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [sp, #0x30] - add r1, r5, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [sp, #0x38] - lsr r2, r2, #0x18 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldr r0, [sp, #0x34] - lsr r3, r3, #0x18 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - add r0, r7, #0 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r5, #0 - bl sub_0201A954 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov76_0223CAFC - - thumb_func_start ov76_0223CB58 -ov76_0223CB58: ; 0x0223CB58 - push {r3, r4, lr} - sub sp, #0x14 - mov r1, #2 - add r4, r0, #0 - str r1, [sp] - mov r0, #4 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #0x94 - str r1, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0xe4 - add r1, #0x88 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #3 - bl ov76_0223CAFC - mov r1, #2 - str r1, [sp] - mov r0, #4 - str r0, [sp, #4] - str r1, [sp, #8] - mov r1, #0x9c - str r1, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0xe4 - add r1, #0x90 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #0xa - bl ov76_0223CAFC - mov r0, #5 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r1, #0xa4 - str r1, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0xe4 - add r1, #0x98 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #3 - bl ov76_0223CAFC - mov r0, #5 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r1, #0xac - str r1, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0xe4 - add r1, #0xa0 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #0xa - bl ov76_0223CAFC - mov r0, #8 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r1, #0xb4 - str r1, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0xe4 - add r1, #0xa8 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #3 - bl ov76_0223CAFC - mov r0, #8 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r1, #0xbc - str r1, [sp, #0xc] - mov r0, #0xb - str r0, [sp, #0x10] - add r0, r4, #0 - add r0, #0xe4 - add r1, #0xb0 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #0xa - bl ov76_0223CAFC - mov r2, #0xb - str r2, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r1, #0xc4 - str r1, [sp, #0xc] - add r0, r4, #0 - str r2, [sp, #0x10] - add r0, #0xe4 - add r1, #0xb8 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #3 - bl ov76_0223CAFC - mov r2, #0xb - str r2, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r1, #0xcc - str r1, [sp, #0xc] - add r0, r4, #0 - str r2, [sp, #0x10] - add r0, #0xe4 - add r1, #0xc0 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r2, #6 - mov r3, #0xa - bl ov76_0223CAFC - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223CB58 - - thumb_func_start ov76_0223CC8C -ov76_0223CC8C: ; 0x0223CC8C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r7, #0 - add r5, #0xec - mov r6, #3 - add r5, #0x30 -_0223CC9A: - ldr r0, _0223CD18 ; =0x0000041D - add r1, r7, r6 - ldrb r0, [r1, r0] - str r0, [sp, #0x10] - cmp r0, #0 - bne _0223CCB6 - add r0, r5, #0 - mov r1, #0xee - bl sub_0201ADA4 - add r0, r5, #0 - bl sub_0201A954 - b _0223CD0A -_0223CCB6: - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x64 - mov r1, #0x35 - bl sub_02023790 - ldr r1, [sp, #0x10] - add r4, r0, #0 - ldr r0, [r7, #0x64] - sub r1, r1, #1 - bl sub_0202CA90 - add r1, r0, #0 - mov r0, #1 - str r0, [sp] - add r0, r4, #0 - mov r2, #3 - mov r3, #1 - bl sub_020238A0 - mov r0, #0 - str r0, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223CD1C ; =0x00010200 - mov r1, #0 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r5, #0 - add r2, r4, #0 - mov r3, #7 - bl sub_0201D78C - add r0, r5, #0 - bl sub_0201A954 - add r0, r4, #0 - bl sub_020237BC -_0223CD0A: - add r6, r6, #1 - add r5, #0x10 - cmp r6, #0xb - blt _0223CC9A - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223CD18: .word 0x0000041D -_0223CD1C: .word 0x00010200 - thumb_func_end ov76_0223CC8C - - thumb_func_start ov76_0223CD20 -ov76_0223CD20: ; 0x0223CD20 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - add r0, r1, #3 - lsl r4, r0, #4 - mov r0, #0x42 - add r1, r6, r1 - lsl r0, r0, #4 - add r5, r6, #0 - ldrb r7, [r1, r0] - add r5, #0xec - cmp r7, #0 - bne _0223CD4C - add r0, r5, r4 - mov r1, #0xee - bl sub_0201ADA4 - add r0, r5, r4 - bl sub_0201A954 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_0223CD4C: - add r0, r5, r4 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0x64 - mov r1, #0x35 - bl sub_02023790 - str r0, [sp, #0x10] - ldr r0, [r6, #0x64] - sub r1, r7, #1 - bl sub_0202CA90 - add r1, r0, #0 - mov r3, #1 - ldr r0, [sp, #0x10] - mov r2, #3 - str r3, [sp] - bl sub_020238A0 - mov r1, #0 - str r1, [sp] - mov r0, #0xff - str r0, [sp, #4] - ldr r0, _0223CDA0 ; =0x00010200 - ldr r2, [sp, #0x10] - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, r4 - mov r1, #1 - mov r3, #7 - bl sub_0201D78C - add r0, r5, r4 - bl sub_0201A954 - ldr r0, [sp, #0x10] - bl sub_020237BC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223CDA0: .word 0x00010200 - thumb_func_end ov76_0223CD20 - - thumb_func_start ov76_0223CDA4 -ov76_0223CDA4: ; 0x0223CDA4 - push {r3, r4, r5, lr} - add r0, #0xec - add r5, r0, #0 - mov r4, #3 - add r5, #0x30 -_0223CDAE: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xb - blt _0223CDAE - pop {r3, r4, r5, pc} - thumb_func_end ov76_0223CDA4 - - thumb_func_start ov76_0223CDC4 -ov76_0223CDC4: ; 0x0223CDC4 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, _0223CE28 ; =0x0000FFFF - add r4, r0, #0 - cmp r5, r1 - bne _0223CDE2 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r4, #0 - bl sub_0201A954 - add sp, #0xc - pop {r3, r4, r5, r6, pc} -_0223CDE2: - mov r0, #0 - mov r1, #0x1a - mov r2, #0xc - mov r3, #0x35 - bl sub_0200B144 - add r1, r5, #0 - add r6, r0, #0 - bl sub_0200B1EC - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - add r0, r4, #0 - mov r1, #1 - add r2, r5, #0 - str r3, [sp, #8] - bl sub_0201D738 - add r0, r4, #0 - bl sub_0201A954 - add r0, r5, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_0200B190 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223CE28: .word 0x0000FFFF - thumb_func_end ov76_0223CDC4 - - thumb_func_start ov76_0223CE2C -ov76_0223CE2C: ; 0x0223CE2C - push {r3, lr} - bl sub_0201FFD0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - pop {r3, pc} - thumb_func_end ov76_0223CE2C - - thumb_func_start ov76_0223CE44 -ov76_0223CE44: ; 0x0223CE44 - push {lr} - sub sp, #0xc - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x35 - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} - ; .align 2, 0 - thumb_func_end ov76_0223CE44 - - thumb_func_start ov76_0223CE64 -ov76_0223CE64: ; 0x0223CE64 - push {lr} - sub sp, #0xc - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x35 - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - add sp, #0xc - pop {pc} - thumb_func_end ov76_0223CE64 - - thumb_func_start ov76_0223CE84 -ov76_0223CE84: ; 0x0223CE84 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - add r4, r1, #0 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xd7 - mov r3, #2 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xe7 - mov r3, #2 - bl sub_0200710C - mov r1, #0 - str r1, [sp] - mov r0, #0x40 - str r0, [sp, #4] - add r0, r5, #0 - str r1, [sp, #8] - add r0, #0xe8 - mov r1, #0x5b - add r2, r1, #0 - ldr r0, [r0, #0] - add r2, #0xc5 - mov r3, #0x35 - bl sub_02003050 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xd8 - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r1, #0x35 - str r1, [sp, #0xc] - add r5, #0xe4 - ldr r2, [r5, #0] - add r0, r4, #0 - add r1, #0xe8 - mov r3, #3 - bl sub_0200710C - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov76_0223CE84 - - thumb_func_start ov76_0223CF24 -ov76_0223CF24: ; 0x0223CF24 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - add r4, r1, #0 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xd6 - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xe6 - mov r3, #5 - bl sub_0200710C - mov r0, #1 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0 - mov r1, #0x5b - add r2, r1, #0 - add r5, #0xe8 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r2, #0xc4 - mov r3, #0x35 - bl sub_02003050 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov76_0223CF24 - - thumb_func_start ov76_0223CF88 -ov76_0223CF88: ; 0x0223CF88 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - add r4, r1, #0 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xd6 - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r1, #0x35 - add r2, r5, #0 - str r1, [sp, #0xc] - add r2, #0xe4 - ldr r2, [r2, #0] - add r0, r4, #0 - add r1, #0xe5 - mov r3, #7 - bl sub_0200710C - mov r0, #1 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0 - mov r1, #0x5b - add r2, r1, #0 - add r5, #0xe8 - str r0, [sp, #8] - ldr r0, [r5, #0] - add r2, #0xc4 - mov r3, #0x35 - bl sub_02003050 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov76_0223CF88 - - thumb_func_start ov76_0223CFEC -ov76_0223CFEC: ; 0x0223CFEC - push {r4, r5, r6, lr} - sub sp, #0x18 - add r5, r1, #0 - add r1, r0, #0 - add r1, #0xdc - ldr r6, [r1, #0] - add r1, r0, #0 - add r1, #0xe0 - ldr r4, [r1, #0] - ldr r1, _0223D128 ; =0x00000122 - str r5, [sp] - str r1, [sp, #4] - mov r1, #0 - str r1, [sp, #8] - mov r1, #3 - str r1, [sp, #0xc] - mov r2, #2 - str r2, [sp, #0x10] - ldr r2, _0223D12C ; =0x000066B2 - add r0, #0xe8 - str r2, [sp, #0x14] - ldr r0, [r0, #0] - add r2, r6, #0 - add r3, r4, #0 - bl sub_0200CDC4 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223D130 ; =0x000062B9 - ldr r3, _0223D134 ; =0x00000111 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0223D138 ; =0x00006A29 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0xb1 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0223D13C ; =0x00006DB5 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0x55 - bl sub_0200CE54 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223D140 ; =0x000062BA - ldr r3, _0223D144 ; =0x00000112 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0223D148 ; =0x00006A2A - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0xb2 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0223D14C ; =0x00006DB6 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0x56 - bl sub_0200CE54 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223D150 ; =0x000062B6 - ldr r3, _0223D154 ; =0x0000010E - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0223D158 ; =0x00006A27 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0xaf - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0223D15C ; =0x00006DB3 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0x53 - bl sub_0200CE54 - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223D160 ; =0x000089C8 - mov r3, #0x11 - str r0, [sp, #8] - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - lsl r3, r3, #4 - bl sub_0200CC3C - mov r0, #1 - str r0, [sp] - ldr r0, _0223D164 ; =0x00006A28 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0xb0 - bl sub_0200CE24 - mov r0, #1 - str r0, [sp] - ldr r0, _0223D168 ; =0x00006DB4 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - add r2, r5, #0 - mov r3, #0x54 - bl sub_0200CE54 - add sp, #0x18 - pop {r4, r5, r6, pc} - nop -_0223D128: .word 0x00000122 -_0223D12C: .word 0x000066B2 -_0223D130: .word 0x000062B9 -_0223D134: .word 0x00000111 -_0223D138: .word 0x00006A29 -_0223D13C: .word 0x00006DB5 -_0223D140: .word 0x000062BA -_0223D144: .word 0x00000112 -_0223D148: .word 0x00006A2A -_0223D14C: .word 0x00006DB6 -_0223D150: .word 0x000062B6 -_0223D154: .word 0x0000010E -_0223D158: .word 0x00006A27 -_0223D15C: .word 0x00006DB3 -_0223D160: .word 0x000089C8 -_0223D164: .word 0x00006A28 -_0223D168: .word 0x00006DB4 - thumb_func_end ov76_0223CFEC - - thumb_func_start ov76_0223D16C -ov76_0223D16C: ; 0x0223D16C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xa0 - add r7, r0, #0 - add r0, #0xdc - ldr r6, [r0, #0] - add r0, r7, #0 - add r0, #0xe0 - ldr r5, [r0, #0] - mov r0, #0xf9 - lsl r0, r0, #2 - add r4, r7, r0 - mov r1, #0 - add r2, sp, #0x6c - strh r1, [r2] - strh r1, [r2, #2] - strh r1, [r2, #4] - strh r1, [r2, #6] - mov r0, #0x3c - str r0, [sp, #0x74] - mov r0, #2 - str r0, [sp, #0x7c] - mov r0, #1 - str r1, [sp, #0x9c] - sub r1, r0, #2 - str r0, [sp, #0x98] - str r0, [sp, #0x78] - ldr r0, _0223D2B8 ; =0x000062B9 - str r1, [sp, #0x90] - str r0, [sp, #0x80] - ldr r0, _0223D2BC ; =0x000066B2 - str r1, [sp, #0x94] - str r0, [sp, #0x84] - ldr r0, _0223D2C0 ; =0x00006A29 - add r1, r5, #0 - str r0, [sp, #0x88] - ldr r0, _0223D2C4 ; =0x00006DB5 - str r0, [sp, #0x8c] - add r0, r6, #0 - bl sub_0200CE6C - str r0, [r4, #0x20] - ldr r0, _0223D2C8 ; =0x000062BA - add r1, r5, #0 - str r0, [sp, #0x80] - ldr r0, _0223D2BC ; =0x000066B2 - add r2, sp, #0x6c - str r0, [sp, #0x84] - ldr r0, _0223D2CC ; =0x00006A2A - str r0, [sp, #0x88] - ldr r0, _0223D2D0 ; =0x00006DB6 - str r0, [sp, #0x8c] - add r0, r6, #0 - bl sub_0200CE6C - str r0, [r4, #0x24] - mov r0, #1 - str r0, [sp, #0x98] - str r0, [sp, #0x78] - ldr r0, _0223D2D4 ; =0x000089C8 - add r1, r5, #0 - str r0, [sp, #0x80] - ldr r0, _0223D2BC ; =0x000066B2 - add r2, sp, #0x6c - str r0, [sp, #0x84] - ldr r0, _0223D2D8 ; =0x00006A28 - str r0, [sp, #0x88] - ldr r0, _0223D2DC ; =0x00006DB4 - str r0, [sp, #0x8c] - add r0, r6, #0 - bl sub_0200CE6C - str r0, [r4, #0x28] - mov r0, #1 - str r0, [sp, #0x98] - mov r0, #0 - str r0, [sp, #0x78] - ldr r0, _0223D2E0 ; =0x000062B6 - add r1, r5, #0 - str r0, [sp, #0x80] - ldr r0, _0223D2BC ; =0x000066B2 - add r2, sp, #0x6c - str r0, [sp, #0x84] - ldr r0, _0223D2E4 ; =0x00006A27 - str r0, [sp, #0x88] - ldr r0, _0223D2E8 ; =0x00006DB3 - str r0, [sp, #0x8c] - add r0, r6, #0 - bl sub_0200CE6C - str r0, [r4, #0x2c] - add r0, r6, #0 - add r1, r5, #0 - add r2, sp, #0x6c - bl sub_0200CE6C - ldr r3, _0223D2EC ; =0x0223ED8C - str r0, [r4, #0x30] - add r2, sp, #0x38 - mov r1, #0x1a -_0223D232: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _0223D232 - ldr r3, _0223D2F0 ; =0x0223EDC0 - add r2, sp, #4 - mov r1, #0x1a -_0223D244: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _0223D244 - mov r0, #8 - str r0, [sp] - mov r0, #0x1d - add r4, r7, #0 - lsl r0, r0, #4 - add r7, r7, r0 - add r6, sp, #0x58 - add r4, #0x20 - add r5, sp, #0x24 - add r7, #0x20 -_0223D264: - mov r0, #0xf9 - mov r1, #0 - mov r2, #2 - lsl r0, r0, #2 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r4, r0] - bl sub_0200D4C4 - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200D330 - mov r0, #0xf9 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3CC - mov r1, #0xf9 - mov r2, #0 - mov r3, #2 - lsl r1, r1, #2 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - ldr r1, [r4, r1] - add r0, r7, #0 - bl ov76_0223B870 - ldr r0, [sp] - add r6, r6, #4 - add r0, r0, #1 - add r4, r4, #4 - add r5, r5, #4 - add r7, r7, #4 - str r0, [sp] - cmp r0, #0xd - blt _0223D264 - add sp, #0xa0 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D2B8: .word 0x000062B9 -_0223D2BC: .word 0x000066B2 -_0223D2C0: .word 0x00006A29 -_0223D2C4: .word 0x00006DB5 -_0223D2C8: .word 0x000062BA -_0223D2CC: .word 0x00006A2A -_0223D2D0: .word 0x00006DB6 -_0223D2D4: .word 0x000089C8 -_0223D2D8: .word 0x00006A28 -_0223D2DC: .word 0x00006DB4 -_0223D2E0: .word 0x000062B6 -_0223D2E4: .word 0x00006A27 -_0223D2E8: .word 0x00006DB3 -_0223D2EC: .word 0x0223ED8C -_0223D2F0: .word 0x0223EDC0 - thumb_func_end ov76_0223D16C - - thumb_func_start ov76_0223D2F4 -ov76_0223D2F4: ; 0x0223D2F4 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0xf9 - add r5, r0, #0 - add r6, r1, #0 - mov r4, #0 - lsl r7, r7, #2 -_0223D300: - ldr r0, [r5, r7] - cmp r0, #0 - beq _0223D30C - add r1, r6, #0 - bl sub_0200D3F4 -_0223D30C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xd - blt _0223D300 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223D2F4 - - thumb_func_start ov76_0223D318 -ov76_0223D318: ; 0x0223D318 - bx lr - ; .align 2, 0 - thumb_func_end ov76_0223D318 - - thumb_func_start ov76_0223D31C -ov76_0223D31C: ; 0x0223D31C - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r6, #0xf9 - mov r4, #8 - add r5, #0x20 - lsl r6, r6, #2 -_0223D328: - ldr r0, [r5, r6] - bl sub_0200D0F4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xd - blt _0223D328 - pop {r4, r5, r6, pc} - thumb_func_end ov76_0223D31C - - thumb_func_start ov76_0223D338 -ov76_0223D338: ; 0x0223D338 - add r1, r0, #0 - mov r0, #0xf1 - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r3, _0223D34C ; =sub_0202CA10 - lsl r0, r0, #3 - add r0, r1, r0 - ldr r0, [r0, #8] - add r1, #0x68 - bx r3 - ; .align 2, 0 -_0223D34C: .word sub_0202CA10 - thumb_func_end ov76_0223D338 - - thumb_func_start ov76_0223D350 -ov76_0223D350: ; 0x0223D350 - mov r1, #0xf1 - add r2, r0, #0 - lsl r1, r1, #2 - ldr r1, [r2, r1] - ldr r3, _0223D364 ; =sub_0202CA10 - lsl r1, r1, #3 - add r1, r2, r1 - add r0, #0x68 - ldr r1, [r1, #8] - bx r3 - ; .align 2, 0 -_0223D364: .word sub_0202CA10 - thumb_func_end ov76_0223D350 - - thumb_func_start ov76_0223D368 -ov76_0223D368: ; 0x0223D368 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0223D36E: - ldr r0, [r5, #0x64] - add r1, r4, #0 - bl sub_0202CA90 - add r1, r5, r4 - add r1, #0x80 - add r4, r4, #1 - strb r0, [r1] - cmp r4, #0x51 - blt _0223D36E - pop {r3, r4, r5, pc} - thumb_func_end ov76_0223D368 - - thumb_func_start ov76_0223D384 -ov76_0223D384: ; 0x0223D384 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_0223D38A: - add r2, r5, r4 - add r2, #0x80 - ldrb r2, [r2] - ldr r0, [r5, #0x64] - add r1, r4, #0 - bl sub_0202CADC - add r4, r4, #1 - cmp r4, #0x51 - blt _0223D38A - pop {r3, r4, r5, pc} - thumb_func_end ov76_0223D384 - - thumb_func_start ov76_0223D3A0 -ov76_0223D3A0: ; 0x0223D3A0 - push {r3, lr} - mov r0, #7 - str r0, [sp] - ldr r0, _0223D3C4 ; =0x04000050 - mov r1, #0 - mov r2, #6 - mov r3, #0xb - bl sub_020BF55C - mov r0, #8 - str r0, [sp] - ldr r0, _0223D3C8 ; =0x04001050 - mov r1, #0 - mov r2, #0xe - mov r3, #7 - bl sub_020BF55C - pop {r3, pc} - ; .align 2, 0 -_0223D3C4: .word 0x04000050 -_0223D3C8: .word 0x04001050 - thumb_func_end ov76_0223D3A0 - - thumb_func_start ov76_0223D3CC -ov76_0223D3CC: ; 0x0223D3CC - push {r3, r4, r5, r6, r7, lr} - mov r1, #0xf1 - add r5, r0, #0 - lsl r1, r1, #2 - ldr r0, [r5, r1] - lsl r0, r0, #3 - add r0, r5, r0 - ldr r0, [r0, #4] - cmp r0, #0xff - beq _0223D3F2 - ldr r2, [r5, #0] - lsl r0, r0, #2 - add r0, r2, r0 - add r1, #0x64 - ldr r0, [r0, #4] - ldr r1, [r5, r1] - bl sub_020775EC - pop {r3, r4, r5, r6, r7, pc} -_0223D3F2: - ldr r1, [r5, #0] - mov r6, #0 - ldr r0, [r1, #0] - cmp r0, #0 - ble _0223D428 - add r4, r6, #0 -_0223D3FE: - add r0, r1, r4 - ldr r7, [r0, #4] - mov r1, #0x4c - add r0, r7, #0 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _0223D41C - ldr r1, _0223D42C ; =0x00000428 - add r0, r7, #0 - ldr r1, [r5, r1] - bl sub_020775EC - pop {r3, r4, r5, r6, r7, pc} -_0223D41C: - ldr r1, [r5, #0] - add r6, r6, #1 - ldr r0, [r1, #0] - add r4, r4, #4 - cmp r6, r0 - blt _0223D3FE -_0223D428: - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D42C: .word 0x00000428 - thumb_func_end ov76_0223D3CC - - thumb_func_start ov76_0223D430 -ov76_0223D430: ; 0x0223D430 - push {r3, r4, r5, r6, r7, lr} - mov r7, #0 - add r6, r0, #0 - add r5, r7, #0 - add r4, r7, #0 -_0223D43A: - add r0, r6, #0 - add r1, r4, #0 - bl sub_0202CA64 - bl sub_0202CA7C - cmp r0, #0 - beq _0223D44C - add r5, r5, #1 -_0223D44C: - add r4, r4, #1 - cmp r4, #8 - blt _0223D43A - cmp r5, #0 - beq _0223D458 - mov r7, #1 -_0223D458: - add r0, r7, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov76_0223D430 - - thumb_func_start ov76_0223D45C -ov76_0223D45C: ; 0x0223D45C - mov r2, #0xc - mul r2, r1 - add r1, r0, r2 - mov r0, #0x99 - lsl r0, r0, #2 - ldr r2, [r1, r0] - add r0, r0, #4 - ldr r0, [r1, r0] - cmp r2, #0xff - bne _0223D478 - cmp r0, #0 - bne _0223D478 - mov r0, #0 - bx lr -_0223D478: - cmp r2, #0xff - bne _0223D484 - cmp r0, #1 - bne _0223D484 - mov r0, #1 - bx lr -_0223D484: - cmp r2, #0xff - beq _0223D490 - cmp r0, #1 - bne _0223D490 - mov r0, #2 - bx lr -_0223D490: - mov r0, #3 - bx lr - thumb_func_end ov76_0223D45C - - thumb_func_start ov76_0223D494 -ov76_0223D494: ; 0x0223D494 - push {r3, r4} - cmp r2, #0xff - bne _0223D4A6 - mov r2, #0xf6 - lsl r2, r2, #2 - ldr r4, [r0, r2] - sub r2, r2, #4 - str r4, [r0, r2] - b _0223D4AC -_0223D4A6: - mov r4, #0xf5 - lsl r4, r4, #2 - str r2, [r0, r4] -_0223D4AC: - mov r2, #0xf3 - lsl r2, r2, #2 - str r1, [r0, r2] - add r1, r2, #0 - add r1, #0xc - str r3, [r0, r1] - mov r1, #0 - add r2, #0x10 - str r1, [r0, r2] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov76_0223D494 - - thumb_func_start ov76_0223D4C4 -ov76_0223D4C4: ; 0x0223D4C4 - push {r4, lr} - add r4, r0, #0 - add r0, #0xfc - mov r1, #1 - bl sub_0200DC9C - add r0, r4, #0 - add r0, #0xfc - bl sub_0201ACF4 - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02001BC4 - mov r0, #0x67 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02013A3C - add r4, #0xfc - add r0, r4, #0 - bl sub_0201A8FC - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223D4C4 - - thumb_func_start ov76_0223D4FC -ov76_0223D4FC: ; 0x0223D4FC - push {r3, lr} - mov r1, #1 - mov r2, #0 - mov r3, #3 - bl ov76_0223D494 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov76_0223D4FC - - thumb_func_start ov76_0223D50C -ov76_0223D50C: ; 0x0223D50C - push {r4, lr} - add r4, r0, #0 - bl ov76_0223B400 - add r0, r4, #0 - bl ov76_0223B808 - add r0, r4, #0 - bl ov76_0223C7E0 - mov r2, #0 - add r0, r4, #0 - mov r1, #2 - add r3, r2, #0 - bl ov76_0223D494 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov76_0223D50C - - thumb_func_start ov76_0223D530 -ov76_0223D530: ; 0x0223D530 - push {r3, lr} - mov r1, #3 - mov r2, #0 - add r3, r1, #0 - bl ov76_0223D494 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov76_0223D530 - - thumb_func_start ov76_0223D540 -ov76_0223D540: ; 0x0223D540 - push {r3, lr} - mov r1, #4 - mov r2, #0 - mov r3, #3 - bl ov76_0223D494 - mov r0, #0 - pop {r3, pc} - thumb_func_end ov76_0223D540 - - thumb_func_start ov76_0223D550 -ov76_0223D550: ; 0x0223D550 - push {r3, r4, r5, lr} - mov r1, #0xf3 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - lsl r2, r1, #2 - ldr r1, _0223D570 ; =0x0223EE04 - ldr r1, [r1, r2] - blx r1 - add r4, #0xe0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl sub_0200C7EC - add r0, r5, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D570: .word 0x0223EE04 - thumb_func_end ov76_0223D550 - - thumb_func_start ov76_0223D574 -ov76_0223D574: ; 0x0223D574 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223D5FC ; =0x021BF67C - mov r1, #0x10 - ldr r0, [r0, #0x4c] - tst r1, r0 - beq _0223D592 - ldr r0, [r4, #0] - mov r1, #0xc - add r0, r0, #1 - str r0, [r4, #0] - bl sub_020E1F6C - str r1, [r4, #0] - b _0223D5F8 -_0223D592: - mov r1, #0x20 - tst r1, r0 - beq _0223D5AA - ldr r0, [r4, #0] - cmp r0, #0 - ble _0223D5A4 - sub r0, r0, #1 - str r0, [r4, #0] - b _0223D5F8 -_0223D5A4: - mov r0, #0xb - str r0, [r4, #0] - b _0223D5F8 -_0223D5AA: - mov r1, #0x40 - tst r1, r0 - beq _0223D5CE - ldr r1, [r4, #0] - asr r0, r1, #1 - lsr r0, r0, #0x1e - add r0, r1, r0 - asr r0, r0, #2 - beq _0223D5CA - sub r0, r1, #4 - mov r1, #0xc - str r0, [r4, #0] - bl sub_020E1F6C - str r1, [r4, #0] - b _0223D5F8 -_0223D5CA: - mov r0, #0 - pop {r4, pc} -_0223D5CE: - mov r1, #0x80 - tst r0, r1 - beq _0223D5F4 - ldr r1, [r4, #0] - asr r0, r1, #1 - lsr r0, r0, #0x1e - add r0, r1, r0 - asr r0, r0, #2 - cmp r0, #2 - beq _0223D5F0 - add r0, r1, #4 - mov r1, #0xc - str r0, [r4, #0] - bl sub_020E1F6C - str r1, [r4, #0] - b _0223D5F8 -_0223D5F0: - mov r0, #0 - pop {r4, pc} -_0223D5F4: - mov r0, #0 - pop {r4, pc} -_0223D5F8: - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_0223D5FC: .word 0x021BF67C - thumb_func_end ov76_0223D574 - - thumb_func_start ov76_0223D600 -ov76_0223D600: ; 0x0223D600 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r4, #0 - str r2, [sp] - cmp r1, #0 - bne _0223D610 - mov r4, #1 -_0223D610: - mov r0, #0xf1 - lsl r0, r0, #2 - lsl r6, r1, #2 - add r7, r5, r0 - add r1, sp, #4 - ldr r0, [r7, r6] - add r1, #2 - add r2, sp, #4 - bl ov76_0223C0EC - mov r0, #0xbd - add r1, r5, r6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r3, sp, #4 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - bl sub_0200D4C4 - ldr r0, [sp] - cmp r0, #1 - bne _0223D66E - mov r0, #0xf1 - lsl r0, r0, #2 - add r1, r5, r0 - ldr r0, [r7, r6] - lsl r4, r4, #2 - str r0, [r1, r4] - ldr r0, [r1, r4] - add r1, sp, #4 - add r1, #2 - add r2, sp, #4 - bl ov76_0223C0EC - mov r0, #0xbd - add r1, r5, r4 - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r3, sp, #4 - mov r1, #2 - mov r2, #0 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - bl sub_0200D4C4 -_0223D66E: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov76_0223D600 - - thumb_func_start ov76_0223D674 -ov76_0223D674: ; 0x0223D674 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #6 - bls _0223D686 - b _0223D92A -_0223D686: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223D692: ; jump table - .short _0223D6A0 - _0223D692 - 2 ; case 0 - .short _0223D79A - _0223D692 - 2 ; case 1 - .short _0223D7AA - _0223D692 - 2 ; case 2 - .short _0223D7BE - _0223D692 - 2 ; case 3 - .short _0223D880 - _0223D692 - 2 ; case 4 - .short _0223D8DE - _0223D692 - 2 ; case 5 - .short _0223D8EE - _0223D692 - 2 ; case 6 -_0223D6A0: - mov r0, #0x5b - mov r1, #0x35 - bl sub_02006C24 - add r5, r0, #0 - add r0, r4, #0 - bl ov76_0223C110 - add r0, r4, #0 - bl ov76_0223C188 - add r0, r4, #0 - bl ov76_0223C288 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223CE84 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223CF24 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223CF88 - add r0, r4, #0 - bl ov76_0223C354 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223C61C - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - add r1, r4, #0 - str r3, [sp, #8] - mov r0, #0x28 - str r0, [sp, #0xc] - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - add r1, #0xec - mov r2, #1 - bl ov76_0223CA98 - add r0, r4, #0 - bl ov76_0223B208 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223B69C - add r0, r4, #0 - bl ov76_0223B1E0 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223CFEC - add r0, r4, #0 - bl ov76_0223D16C - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223C438 - add r0, r4, #0 - bl ov76_0223C4AC - add r0, r4, #0 - bl ov76_0223D338 - add r0, r4, #0 - bl ov76_0223D368 - ldr r1, _0223D93C ; =0x00000418 - add r0, r4, #0 - ldr r1, [r4, r1] - bl ov76_0223BA90 - add r0, r4, #0 - bl ov76_0223BB04 - add r0, r4, #0 - bl ov76_0223BBAC - add r0, r4, #0 - mov r1, #0 - bl ov76_0223D2F4 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223C568 - add r0, r4, #0 - bl ov76_0223B940 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223B96C - add r0, r4, #0 - add r0, #0xec - mov r1, #7 - bl ov76_0223CA30 - bl ov76_0223CE2C - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DCB8 - add r0, r5, #0 - bl sub_02006CA8 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223D92A -_0223D79A: - bl ov76_0223CE44 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223D92A -_0223D7AA: - bl sub_0200F2AC - cmp r0, #1 - beq _0223D7B4 - b _0223D92A -_0223D7B4: - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_0223D7BE: - bl sub_02022798 - cmp r0, #1 - bne _0223D7CE - add r0, r4, #0 - bl ov76_0223D4FC - b _0223D92A -_0223D7CE: - mov r0, #0xf1 - lsl r0, r0, #2 - ldr r6, [r4, r0] - add r0, r4, r0 - bl ov76_0223D574 - mov r1, #0xf1 - lsl r1, r1, #2 - ldr r5, [r4, r1] - cmp r0, #1 - str r6, [r4, r1] - bne _0223D82A - add r0, r4, #0 - bl ov76_0223B400 - add r0, r4, #0 - bl ov76_0223B808 - add r0, r4, #0 - bl ov76_0223C7E0 - mov r0, #0xf1 - lsl r0, r0, #2 - str r5, [r4, r0] - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - bl ov76_0223D600 - add r0, r4, #0 - bl ov76_0223B678 - add r0, r4, #0 - bl ov76_0223B208 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223B69C - add r0, r4, #0 - bl ov76_0223B1E0 - ldr r0, _0223D940 ; =0x000005DC - bl sub_02005748 - b _0223D92A -_0223D82A: - ldr r0, _0223D944 ; =0x021BF67C - ldr r2, [r0, #0x48] - mov r0, #1 - tst r0, r2 - beq _0223D86C - add r0, r1, #0 - add r0, #0x10 - ldr r0, [r4, r0] - add r1, #0x10 - add r0, r0, #1 - str r0, [r4, r1] - add r0, r4, #0 - add r0, #0xec - mov r1, #8 - bl ov76_0223CA30 - mov r0, #0xf1 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r4, #0 - str r0, [sp] - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - add r1, #0xfc - mov r2, #1 - add r3, r4, #0 - bl ov76_0223BF74 - ldr r0, _0223D940 ; =0x000005DC - bl sub_02005748 - b _0223D92A -_0223D86C: - mov r0, #2 - tst r0, r2 - beq _0223D92A - mov r0, #5 - add r1, #0x10 - str r0, [r4, r1] - ldr r0, _0223D948 ; =0x000005DD - bl sub_02005748 - b _0223D92A -_0223D880: - mov r0, #0x1a - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02001BE0 - add r1, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r1, r0 - beq _0223D89C - add r0, r0, #1 - cmp r1, r0 - beq _0223D92A - b _0223D8B6 -_0223D89C: - add r0, r4, #0 - bl ov76_0223D4C4 - add r0, r4, #0 - add r0, #0xec - mov r1, #7 - bl ov76_0223CA30 - mov r0, #0xf5 - mov r1, #3 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223D92A -_0223D8B6: - cmp r1, #0 - beq _0223D92A - add r0, r4, #0 - blx r1 - cmp r0, #1 - beq _0223D8CA - add r0, r4, #0 - bl ov76_0223D4C4 - b _0223D92A -_0223D8CA: - add r0, r4, #0 - add r0, #0xec - mov r1, #7 - bl ov76_0223CA30 - mov r0, #0xf5 - mov r1, #3 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223D92A -_0223D8DE: - bl ov76_0223CE64 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223D92A -_0223D8EE: - bl sub_0200F2AC - cmp r0, #1 - bne _0223D92A - add r0, r4, #0 - add r0, #0xec - bl sub_0201A8FC - add r0, r4, #0 - bl ov76_0223C8BC - add r0, r4, #0 - bl ov76_0223C32C - add r0, r4, #0 - bl ov76_0223D31C - add r0, r4, #0 - bl ov76_0223C588 - add r0, r4, #0 - bl ov76_0223BC70 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02097F30 - add sp, #0x10 - mov r0, #0 - pop {r4, r5, r6, pc} -_0223D92A: - add r0, r4, #0 - bl ov76_0223C304 - add r0, r4, #0 - bl ov76_0223C88C - mov r0, #1 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223D93C: .word 0x00000418 -_0223D940: .word 0x000005DC -_0223D944: .word 0x021BF67C -_0223D948: .word 0x000005DD - thumb_func_end ov76_0223D674 - - thumb_func_start ov76_0223D94C -ov76_0223D94C: ; 0x0223D94C - push {r3, lr} - cmp r1, #3 - bhi _0223D97E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223D95E: ; jump table - .short _0223D966 - _0223D95E - 2 ; case 0 - .short _0223D976 - _0223D95E - 2 ; case 1 - .short _0223D96E - _0223D95E - 2 ; case 2 - .short _0223D976 - _0223D95E - 2 ; case 3 -_0223D966: - mov r1, #1 - bl sub_0200D3CC - pop {r3, pc} -_0223D96E: - mov r1, #2 - bl sub_0200D3CC - pop {r3, pc} -_0223D976: - mov r1, #0 - bl sub_0200D3CC - pop {r3, pc} -_0223D97E: - bl sub_02022974 - pop {r3, pc} - thumb_func_end ov76_0223D94C - - thumb_func_start ov76_0223D984 -ov76_0223D984: ; 0x0223D984 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - cmp r5, #0 - beq _0223D9A8 - add r1, sp, #4 - add r2, sp, #0 - bl sub_020129A4 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r5, #0 - add r1, r1, r4 - add r2, r2, r6 - bl sub_020128C4 -_0223D9A8: - add sp, #8 - pop {r4, r5, r6, pc} - thumb_func_end ov76_0223D984 - - thumb_func_start ov76_0223D9AC -ov76_0223D9AC: ; 0x0223D9AC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #3 - beq _0223D9BE - cmp r0, #6 - beq _0223D9D8 - b _0223D9F8 -_0223D9BE: - mov r1, #0 - ldr r0, [r4, #8] - sub r2, r1, #1 - bl ov76_0223D984 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_0200D3CC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_0223D9D8: - ldr r0, [r4, #8] - mov r1, #0 - mov r2, #2 - bl ov76_0223D984 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_0200D3CC - add r0, r5, #0 - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r3, r4, r5, pc} -_0223D9F8: - add r0, r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov76_0223D9AC - - thumb_func_start ov76_0223DA00 -ov76_0223DA00: ; 0x0223DA00 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #0x35 - mov r1, #0xc - bl sub_02018144 - add r4, r0, #0 - mov r0, #1 - str r0, [r4, #0] - mov r1, #0 - str r6, [r4, #4] - add r0, r5, #0 - sub r2, r1, #1 - str r5, [r4, #8] - bl ov76_0223D984 - mov r2, #0xfa - ldr r0, _0223DA30 ; =ov76_0223D9AC - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_0200D9E8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223DA30: .word ov76_0223D9AC - thumb_func_end ov76_0223DA00 - - thumb_func_start ov76_0223DA34 -ov76_0223DA34: ; 0x0223DA34 - push {r4, r5, r6, lr} - add r4, r2, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r6, r1, #0 - cmp r0, #0 - bne _0223DA48 - b _0223DC84 -_0223DA48: - cmp r5, #0x14 - bls _0223DA4E - b _0223DC80 -_0223DA4E: - add r0, r5, r5 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223DA5A: ; jump table - .short _0223DBC2 - _0223DA5A - 2 ; case 0 - .short _0223DBC2 - _0223DA5A - 2 ; case 1 - .short _0223DBC2 - _0223DA5A - 2 ; case 2 - .short _0223DBC2 - _0223DA5A - 2 ; case 3 - .short _0223DBC2 - _0223DA5A - 2 ; case 4 - .short _0223DBC2 - _0223DA5A - 2 ; case 5 - .short _0223DBC2 - _0223DA5A - 2 ; case 6 - .short _0223DBC2 - _0223DA5A - 2 ; case 7 - .short _0223DA84 - _0223DA5A - 2 ; case 8 - .short _0223DACE - _0223DA5A - 2 ; case 9 - .short _0223DB1C - _0223DA5A - 2 ; case 10 - .short _0223DB4A - _0223DA5A - 2 ; case 11 - .short _0223DB88 - _0223DA5A - 2 ; case 12 - .short _0223DC50 - _0223DA5A - 2 ; case 13 - .short _0223DC50 - _0223DA5A - 2 ; case 14 - .short _0223DC50 - _0223DA5A - 2 ; case 15 - .short _0223DC50 - _0223DA5A - 2 ; case 16 - .short _0223DC50 - _0223DA5A - 2 ; case 17 - .short _0223DC50 - _0223DA5A - 2 ; case 18 - .short _0223DC50 - _0223DA5A - 2 ; case 19 - .short _0223DC50 - _0223DA5A - 2 ; case 20 -_0223DA84: - cmp r6, #0 - bne _0223DAC2 - ldr r1, _0223DC88 ; =0x00000418 - ldr r0, [r4, r1] - cmp r0, #0 - ble _0223DA92 - b _0223DA96 -_0223DA92: - add r0, r1, #4 - ldr r0, [r4, r0] -_0223DA96: - sub r0, r0, #1 - str r0, [r4, r1] - add r0, r4, #0 - bl ov76_0223BC70 - ldr r1, _0223DC88 ; =0x00000418 - add r0, r4, #0 - ldr r1, [r4, r1] - bl ov76_0223BA90 - add r0, r4, #0 - bl ov76_0223BB04 - add r0, r4, #0 - bl ov76_0223BBAC - add r0, r4, #0 - bl ov76_0223CC8C - ldr r0, _0223DC8C ; =0x000006C5 - bl sub_02005748 -_0223DAC2: - ldr r0, _0223DC90 ; =0x00000404 - add r1, r6, #0 - ldr r0, [r4, r0] - bl ov76_0223D94C - pop {r4, r5, r6, pc} -_0223DACE: - cmp r6, #0 - bne _0223DB10 - ldr r1, _0223DC88 ; =0x00000418 - ldr r0, [r4, r1] - add r0, r0, #1 - str r0, [r4, r1] - ldr r0, [r4, r1] - add r1, r1, #4 - ldr r1, [r4, r1] - bl sub_020E1F6C - ldr r0, _0223DC88 ; =0x00000418 - str r1, [r4, r0] - add r0, r4, #0 - bl ov76_0223BC70 - ldr r1, _0223DC88 ; =0x00000418 - add r0, r4, #0 - ldr r1, [r4, r1] - bl ov76_0223BA90 - add r0, r4, #0 - bl ov76_0223BB04 - add r0, r4, #0 - bl ov76_0223BBAC - add r0, r4, #0 - bl ov76_0223CC8C - ldr r0, _0223DC8C ; =0x000006C5 - bl sub_02005748 -_0223DB10: - ldr r0, _0223DC94 ; =0x00000408 - add r1, r6, #0 - ldr r0, [r4, r0] - bl ov76_0223D94C - pop {r4, r5, r6, pc} -_0223DB1C: - cmp r6, #0 - bne _0223DB3E - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #5 - beq _0223DB34 - mov r1, #5 - str r1, [r4, r0] - ldr r0, _0223DC98 ; =0x000005DD - bl sub_02005748 -_0223DB34: - ldr r0, _0223DC9C ; =0x0000040C - mov r1, #0 - ldr r0, [r4, r0] - bl ov76_0223DA00 -_0223DB3E: - ldr r0, _0223DC9C ; =0x0000040C - add r1, r6, #0 - ldr r0, [r4, r0] - bl ov76_0223D94C - pop {r4, r5, r6, pc} -_0223DB4A: - cmp r6, #0 - bne _0223DB7A - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #6 - beq _0223DB6A - mov r1, #6 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DCB8 - ldr r0, _0223DCA0 ; =0x000005E2 - bl sub_02005748 -_0223DB6A: - mov r0, #0x41 - mov r1, #0x8e - lsl r0, r0, #4 - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - bl ov76_0223DA00 -_0223DB7A: - mov r0, #0x41 - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, r6, #0 - bl ov76_0223D94C - pop {r4, r5, r6, pc} -_0223DB88: - cmp r6, #0 - bne _0223DBB6 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #7 - beq _0223DBA8 - mov r1, #7 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DCB8 - ldr r0, _0223DC98 ; =0x000005DD - bl sub_02005748 -_0223DBA8: - ldr r0, _0223DCA4 ; =0x00000414 - mov r1, #0x8f - lsl r1, r1, #2 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - bl ov76_0223DA00 -_0223DBB6: - ldr r0, _0223DCA4 ; =0x00000414 - add r1, r6, #0 - ldr r0, [r4, r0] - bl ov76_0223D94C - pop {r4, r5, r6, pc} -_0223DBC2: - cmp r6, #0 - bne _0223DC84 - add r0, r4, #0 - bl ov76_0223B2F8 - cmp r0, #0 - bne _0223DBE2 - ldr r0, _0223DCA8 ; =0x000005F2 - bl sub_02005748 - add r4, #0xec - add r0, r4, #0 - mov r1, #0xf - bl ov76_0223CA30 - pop {r4, r5, r6, pc} -_0223DBE2: - mov r0, #0x42 - lsl r0, r0, #4 - add r6, r4, r0 - ldrb r1, [r6, r5] - cmp r1, #0 - beq _0223DC38 - ldr r0, [r4, #0x64] - sub r1, r1, #1 - bl sub_0202CA90 - cmp r0, #0 - beq _0223DC38 - lsl r1, r5, #0x18 - add r0, r4, #0 - lsr r1, r1, #0x18 - bl ov76_0223B278 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] - ldrb r0, [r6, r5] - bl sub_02098164 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0xec - bl ov76_0223CDC4 - ldr r0, [r4, #0] - mov r2, #0 - ldrb r1, [r6, r5] - ldr r0, [r0, #0x20] - mvn r2, r2 - bl sub_0202CAE0 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223CD20 - ldr r0, _0223DCAC ; =0x000005EB - bl sub_02005748 - pop {r4, r5, r6, pc} -_0223DC38: - ldrb r0, [r6, r5] - cmp r0, #0 - beq _0223DC84 - ldr r0, _0223DCA8 ; =0x000005F2 - bl sub_02005748 - add r4, #0xec - add r0, r4, #0 - mov r1, #0x10 - bl ov76_0223CA30 - pop {r4, r5, r6, pc} -_0223DC50: - cmp r6, #0 - bne _0223DC84 - sub r5, #0xd - lsl r2, r5, #0x18 - add r0, r4, #0 - lsr r2, r2, #0x18 - bl ov76_0223B5C4 - lsl r0, r5, #4 - add r1, r4, r0 - mov r0, #0xca - lsl r0, r0, #2 - ldrb r0, [r1, r0] - bl sub_02098164 - add r4, #0xec - add r1, r0, #0 - add r0, r4, #0 - bl ov76_0223CDC4 - ldr r0, _0223DCAC ; =0x000005EB - bl sub_02005748 - pop {r4, r5, r6, pc} -_0223DC80: - bl sub_02022974 -_0223DC84: - pop {r4, r5, r6, pc} - nop -_0223DC88: .word 0x00000418 -_0223DC8C: .word 0x000006C5 -_0223DC90: .word 0x00000404 -_0223DC94: .word 0x00000408 -_0223DC98: .word 0x000005DD -_0223DC9C: .word 0x0000040C -_0223DCA0: .word 0x000005E2 -_0223DCA4: .word 0x00000414 -_0223DCA8: .word 0x000005F2 -_0223DCAC: .word 0x000005EB - thumb_func_end ov76_0223DA34 - - thumb_func_start ov76_0223DCB0 -ov76_0223DCB0: ; 0x0223DCB0 - mov r1, #0x96 - lsl r1, r1, #2 - ldr r0, [r0, r1] - bx lr - thumb_func_end ov76_0223DCB0 - - thumb_func_start ov76_0223DCB8 -ov76_0223DCB8: ; 0x0223DCB8 - add r0, #0xd8 - str r1, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov76_0223DCB8 - - thumb_func_start ov76_0223DCC0 -ov76_0223DCC0: ; 0x0223DCC0 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - add r1, sp, #0x10 - mov r0, #0 - strb r0, [r1] - strb r0, [r1, #1] - strb r0, [r1, #2] - mov r7, #0x1d - lsl r7, r7, #4 - strb r0, [r1, #3] - ldr r1, _0223DD7C ; =0x0223EE44 - ldr r2, [sp, #4] - add r3, r7, #1 - add r4, r7, #2 - add r5, r7, #3 -_0223DCE0: - ldrb r6, [r1] - add r0, r0, #1 - strb r6, [r2, r7] - ldrb r6, [r1, #1] - strb r6, [r2, r3] - ldrb r6, [r1, #2] - strb r6, [r2, r4] - ldrb r6, [r1, #3] - add r1, r1, #4 - strb r6, [r2, r5] - add r2, r2, #4 - cmp r0, #0xd - blt _0223DCE0 - cmp r0, #0x15 - bge _0223DD5A - mov r3, #0x1d - ldr r2, [sp, #4] - lsl r3, r3, #4 - add r2, r2, r3 - lsl r4, r0, #2 - ldr r1, [sp, #4] - ldr r3, [sp, #4] - add r1, r1, r4 - add r2, r2, r4 - lsl r4, r0, #4 - add r5, sp, #0xc - add r3, r3, r4 - ldrb r4, [r5, #4] - strb r4, [r5] - ldrb r4, [r5, #5] - strb r4, [r5, #1] - ldrb r4, [r5, #6] - strb r4, [r5, #2] - ldrb r4, [r5, #7] - strb r4, [r5, #3] - ldrb r4, [r5, #2] - ldrb r6, [r5] - ldrb r7, [r5, #1] - str r4, [sp, #8] - ldrb r4, [r5, #3] - mov ip, r4 -_0223DD32: - mov r4, #0x1d - lsl r4, r4, #4 - strb r6, [r1, r4] - add r4, r4, #1 - strb r7, [r1, r4] - ldr r5, _0223DD80 ; =0x000001D2 - ldr r4, [sp, #8] - add r0, r0, #1 - strb r4, [r1, r5] - add r5, r5, #1 - mov r4, ip - strb r4, [r1, r5] - mov r4, #0x26 - lsl r4, r4, #4 - str r2, [r3, r4] - add r1, r1, #4 - add r2, r2, #4 - add r3, #0x10 - cmp r0, #0x15 - blt _0223DD32 -_0223DD5A: - mov r0, #0x35 - str r0, [sp] - mov r1, #0x1d - ldr r0, [sp, #4] - lsl r1, r1, #4 - add r0, r0, r1 - ldr r2, _0223DD84 ; =ov76_0223DA34 - ldr r3, [sp, #4] - mov r1, #0x15 - bl sub_02023FCC - mov r2, #0x73 - ldr r1, [sp, #4] - lsl r2, r2, #2 - str r0, [r1, r2] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223DD7C: .word 0x0223EE44 -_0223DD80: .word 0x000001D2 -_0223DD84: .word ov76_0223DA34 - thumb_func_end ov76_0223DCC0 - - thumb_func_start ov76_0223DD88 -ov76_0223DD88: ; 0x0223DD88 - push {r4, r5, r6, lr} - sub sp, #0x48 - ldr r1, _0223DDF4 ; =0x00000428 - add r5, r0, #0 - ldr r1, [r5, r1] - add r0, sp, #0x38 - mov r2, #2 - bl sub_02075EF4 - ldr r0, _0223DDF4 ; =0x00000428 - mov r1, #5 - ldr r0, [r5, r0] - mov r2, #0 - bl sub_02074470 - add r4, r0, #0 - ldr r0, _0223DDF4 ; =0x00000428 - mov r1, #2 - ldr r0, [r5, r0] - bl sub_020765AC - add r6, r0, #0 - mov r0, #0x6b - lsl r0, r0, #2 - str r6, [r5, r0] - ldr r0, _0223DDF8 ; =0x0000042C - lsl r2, r4, #0x10 - ldr r0, [r5, r0] - add r1, sp, #0x10 - lsr r2, r2, #0x10 - mov r3, #1 - bl sub_020789BC - ldr r0, _0223DDFC ; =0xFFFFFD80 - add r6, #0x30 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - add r0, sp, #0x10 - str r0, [sp, #8] - mov r0, #0x69 - str r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, sp, #0x38 - mov r2, #0xc0 - add r3, r6, #0 - bl sub_02007C34 - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r5, r1] - add sp, #0x48 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223DDF4: .word 0x00000428 -_0223DDF8: .word 0x0000042C -_0223DDFC: .word 0xFFFFFD80 - thumb_func_end ov76_0223DD88 - - thumb_func_start ov76_0223DE00 -ov76_0223DE00: ; 0x0223DE00 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0223DE4C ; =0x00000428 - mov r1, #5 - ldr r0, [r5, r0] - mov r2, #0 - bl sub_02074470 - add r4, r0, #0 - ldr r0, _0223DE4C ; =0x00000428 - ldr r0, [r5, r0] - bl sub_02075BCC - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02007B98 - mov r0, #2 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r2, #0x97 - str r0, [sp, #8] - ldr r0, _0223DE50 ; =0x0000042C - lsl r2, r2, #2 - ldr r1, [r5, r2] - sub r2, #0xb4 - lsl r3, r4, #0x10 - ldr r0, [r5, r0] - ldr r2, [r5, r2] - lsr r3, r3, #0x10 - bl sub_020789F4 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223DE4C: .word 0x00000428 -_0223DE50: .word 0x0000042C - thumb_func_end ov76_0223DE00 - - thumb_func_start ov76_0223DE54 -ov76_0223DE54: ; 0x0223DE54 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xc - mov r2, #0 - bl sub_02007DEC - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xd - mov r2, #0 - bl sub_02007DEC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223DE54 - - thumb_func_start ov76_0223DE78 -ov76_0223DE78: ; 0x0223DE78 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xc - bl sub_020080C0 - mov r1, #1 - lsl r1, r1, #8 - cmp r0, r1 - bne _0223DE94 - mov r0, #0 - pop {r4, pc} -_0223DE94: - add r1, #0xa8 - ldr r0, [r4, r1] - mov r1, #0xc - bl sub_020080C0 - mov r2, #1 - lsl r2, r2, #8 - cmp r0, r2 - blt _0223DEC6 - add r0, r2, #0 - add r0, #0xa8 - ldr r0, [r4, r0] - mov r1, #0xc - bl sub_02007DEC - mov r0, #0x6a - lsl r0, r0, #2 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, r0] - add r2, #0xf3 - bl sub_02007DEC - mov r0, #0 - pop {r4, pc} -_0223DEC6: - add r2, #0xa8 - ldr r0, [r4, r2] - mov r1, #0xc - mov r2, #0x20 - bl sub_02008274 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xd - mov r2, #0x20 - bl sub_02008274 - mov r1, #0x6a - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, r1, #4 - ldr r1, [r4, r1] - bl sub_020087C8 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223DE78 - - thumb_func_start ov76_0223DEF4 -ov76_0223DEF4: ; 0x0223DEF4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xc - bl sub_020080C0 - cmp r0, #0 - bne _0223DF0C - mov r0, #0 - pop {r4, pc} -_0223DF0C: - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xc - bl sub_020080C0 - cmp r0, #0 - bgt _0223DF3C - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xc - mov r2, #0 - bl sub_02007DEC - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0xd - mov r2, #0 - bl sub_02007DEC - mov r0, #0 - pop {r4, pc} -_0223DF3C: - mov r0, #0x6a - lsl r0, r0, #2 - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2c - bl sub_02008274 - mov r0, #0x6a - lsl r0, r0, #2 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, r0] - sub r2, #0x2d - bl sub_02008274 - mov r1, #0x6a - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, r1, #4 - ldr r1, [r4, r1] - bl sub_020087C8 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223DEF4 - - thumb_func_start ov76_0223DF70 -ov76_0223DF70: ; 0x0223DF70 - add r2, r1, #0 - mov r1, #0x6a - lsl r1, r1, #2 - ldr r0, [r0, r1] - ldr r3, _0223DF80 ; =sub_02007DEC - mov r1, #6 - bx r3 - nop -_0223DF80: .word sub_02007DEC - thumb_func_end ov76_0223DF70 - - thumb_func_start ov76_0223DF84 -ov76_0223DF84: ; 0x0223DF84 - mov r1, #0x6a - lsl r1, r1, #2 - ldr r3, _0223DF90 ; =sub_02007DC8 - ldr r0, [r0, r1] - bx r3 - nop -_0223DF90: .word sub_02007DC8 - thumb_func_end ov76_0223DF84 - - thumb_func_start ov76_0223DF94 -ov76_0223DF94: ; 0x0223DF94 - push {r4, r5, r6, r7, lr} - sub sp, #0xa4 - mov r1, #0xf5 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r2, [r4, r1] - cmp r2, #0xa - bhi _0223E014 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0223DFB0: ; jump table - .short _0223DFC6 - _0223DFB0 - 2 ; case 0 - .short _0223E00C - _0223DFB0 - 2 ; case 1 - .short _0223E082 - _0223DFB0 - 2 ; case 2 - .short _0223E0BA - _0223DFB0 - 2 ; case 3 - .short _0223E7C0 - _0223DFB0 - 2 ; case 4 - .short _0223E0DA - _0223DFB0 - 2 ; case 5 - .short _0223E42E - _0223DFB0 - 2 ; case 6 - .short _0223E49A - _0223DFB0 - 2 ; case 7 - .short _0223E6BC - _0223DFB0 - 2 ; case 8 - .short _0223E6F0 - _0223DFB0 - 2 ; case 9 - .short _0223E77C - _0223DFB0 - 2 ; case 10 -_0223DFC6: - mov r1, #0 - bl ov76_0223DCB8 - add r0, r4, #0 - ldr r1, _0223E304 ; =0x0000FFFF - add r0, #0xec - bl ov76_0223CA30 - add r0, r4, #0 - bl ov76_0223CB58 - add r0, r4, #0 - bl ov76_0223CC8C - add r0, r4, #0 - mov r1, #1 - mov r2, #4 - bl ov76_0223BD30 - add r0, r4, #0 - bl ov76_0223D338 - add r0, r4, #0 - bl ov76_0223D368 - mov r0, #0x26 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E00C: - bl ov76_0223DCB0 - cmp r0, #1 - bne _0223E016 -_0223E014: - b _0223E7C0 -_0223E016: - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #1 - mov r2, #3 - bl sub_02003178 - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E304 ; =0x0000FFFF - mov r1, #4 - bl sub_02003178 - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #7 - mov r1, #1 - bl sub_02019060 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223D2F4 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223C568 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223B96C - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E082: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0223E180 - mov r0, #3 - mov r1, #1 - bl sub_02019060 - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #1 - mov r2, #2 - bl sub_02003178 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E0BA: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0223E180 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223DCB8 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E0DA: - add r2, r1, #0 - add r2, #8 - ldr r2, [r4, r2] - cmp r2, #7 - bls _0223E0E6 - b _0223E3F4 -_0223E0E6: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0223E0F2: ; jump table - .short _0223E102 - _0223E0F2 - 2 ; case 0 - .short _0223E174 - _0223E0F2 - 2 ; case 1 - .short _0223E1CA - _0223E0F2 - 2 ; case 2 - .short _0223E22E - _0223E0F2 - 2 ; case 3 - .short _0223E27A - _0223E0F2 - 2 ; case 4 - .short _0223E2BE - _0223E0F2 - 2 ; case 5 - .short _0223E314 - _0223E0F2 - 2 ; case 6 - .short _0223E388 - _0223E0F2 - 2 ; case 7 -_0223E102: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r3, #0 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E308 ; =0x0000080B - mov r1, #2 - bl sub_02003178 - mov r3, #0 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E304 ; =0x0000FFFF - mov r1, #8 - bl sub_02003178 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DCB8 - mov r0, #0x3e - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r4, #0 - bl ov76_0223D3CC - add r0, r4, #0 - bl ov76_0223DD88 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223DF70 - add r0, r4, #0 - add r0, #0xec - mov r1, #0xd - bl ov76_0223CA30 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E174: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - beq _0223E182 -_0223E180: - b _0223E7C0 -_0223E182: - mov r0, #0x35 - str r0, [sp, #0x80] - mov r1, #1 - mov r2, #0 - mov r0, #0xff - str r0, [sp, #0x88] - add r0, r4, #0 - str r1, [sp, #0x7c] - str r1, [sp, #0x94] - str r2, [sp, #0x84] - str r2, [sp, #0x90] - add r0, #0xdc - ldr r0, [r0, #0] - mov r1, #0x9b - str r0, [sp, #0x98] - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - str r0, [sp, #0x9c] - ldr r0, _0223E30C ; =0x00000428 - ldr r0, [r4, r0] - bl sub_02074470 - str r0, [sp, #0x8c] - add r0, sp, #0x7c - bl ov12_02237728 - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E1CA: - add r2, sp, #0x58 - mov r0, #0 - str r0, [r2, #0] - str r0, [r2, #4] - str r0, [r2, #8] - mov r0, #1 - str r0, [sp, #0x58] - add r0, r1, #0 - add r0, #0x54 - ldr r0, [r4, r0] - sub r1, #0x10 - str r0, [sp, #0x60] - ldr r0, [r4, r1] - add r1, r4, #0 - add r0, r0, #1 - str r0, [sp, #0x18] - add r0, sp, #0x64 - bl ov76_0223B848 - ldr r0, _0223E30C ; =0x00000428 - mov r1, #0xa2 - ldr r0, [r4, r0] - add r2, sp, #0x18 - bl sub_02074B30 - ldr r0, _0223E30C ; =0x00000428 - mov r1, #0xab - ldr r0, [r4, r0] - add r2, sp, #0x64 - bl sub_02074B30 - mov r0, #0x35 - add r1, sp, #0x58 - bl ov12_02236004 - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - bl ov12_02236320 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - mov r1, #0 - add r0, r0, #4 - str r1, [r4, r0] - b _0223E7C0 -_0223E22E: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_02236374 - cmp r0, #1 - bne _0223E2EA - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_02237810 - cmp r0, #1 - bne _0223E2EA - add r0, r4, #0 - bl ov76_0223DE78 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_022363B4 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DF70 - add r0, r4, #0 - bl ov76_0223DE54 - ldr r0, _0223E310 ; =0x000006C6 - bl sub_02005748 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E27A: - bl ov76_0223DE78 - add r5, r0, #0 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_022377F8 - cmp r0, #0 - bne _0223E2EA - cmp r5, #0 - bne _0223E2EA - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_0223783C - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - bl ov76_0223DE00 - mov r0, #0x3e - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - sub r1, r0, #4 - ldr r1, [r4, r1] - sub r0, r0, #4 - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E2BE: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_022363C4 - cmp r0, #0 - bne _0223E2EA - mov r0, #0x97 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_020160F4 - cmp r0, #1 - bne _0223E2EA - mov r0, #0x6a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02007C24 - cmp r0, #0 - beq _0223E2EC -_0223E2EA: - b _0223E7C0 -_0223E2EC: - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_02236428 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 - nop -_0223E304: .word 0x0000FFFF -_0223E308: .word 0x0000080B -_0223E30C: .word 0x00000428 -_0223E310: .word 0x000006C6 -_0223E314: - add r0, r1, #0 - add r0, #0xc - ldr r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #0 - add r0, #0xc - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0xc - ldr r0, [r4, r0] - cmp r0, #0x1e - blt _0223E402 - add r0, r1, #0 - mov r2, #0 - add r0, #0xc - str r2, [r4, r0] - mov r0, #0x35 - mov r3, #1 - str r0, [sp, #0x34] - mov r0, #5 - str r0, [sp, #0x38] - mov r0, #0xff - str r0, [sp, #0x3c] - add r0, r4, #0 - str r3, [sp, #0x30] - str r2, [sp, #0x44] - str r3, [sp, #0x48] - add r0, #0xdc - ldr r0, [r0, #0] - add r1, #0x54 - str r0, [sp, #0x4c] - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - str r0, [sp, #0x50] - ldr r0, [r4, r1] - mov r1, #0x9b - bl sub_02074470 - str r0, [sp, #0x40] - add r0, sp, #0x30 - bl ov12_02237728 - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r4, r1] - bl ov76_0223D3A0 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E388: - bl ov76_0223DEF4 - add r5, r0, #0 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_022377F8 - cmp r0, #0 - bne _0223E402 - cmp r5, #0 - bne _0223E402 - mov r0, #0xa - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E6E8 ; =0x0000080B - mov r1, #2 - bl sub_02003178 - mov r0, #0xa - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E6EC ; =0x0000FFFF - mov r1, #8 - bl sub_02003178 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223DF70 - add r0, r4, #0 - bl ov76_0223DF84 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov12_0223783C - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E3F4: - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - beq _0223E404 -_0223E402: - b _0223E7C0 -_0223E404: - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - mov r1, #1 - bl ov76_0223DCB8 - mov r0, #0xf7 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r1, #4 - sub r0, #8 - str r1, [r4, r0] - add r0, r4, #0 - ldr r1, _0223E6EC ; =0x0000FFFF - add r0, #0xec - bl ov76_0223CA30 - b _0223E7C0 -_0223E42E: - add r0, #0xec - mov r1, #0xc - bl ov76_0223CA30 - add r0, r4, #0 - bl ov76_0223B78C - cmp r0, #1 - bne _0223E448 - mov r0, #0x26 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] -_0223E448: - add r0, r4, #0 - bl ov76_0223B808 - add r0, r4, #0 - bl ov76_0223C7E0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x28] - bl sub_0202CD88 - mov r1, #6 - bl sub_0202CFEC - mov r0, #0xf1 - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r0, #0xc - mul r0, r1 - add r2, r4, r0 - mov r0, #0x99 - lsl r0, r0, #2 - ldr r0, [r2, r0] - cmp r0, #0xff - beq _0223E490 - ldr r2, [r4, #0] - lsl r0, r0, #2 - add r0, r2, r0 - ldr r5, [r0, #4] - ldr r0, [r2, #0x20] - bl sub_0202CA28 - add r2, r0, #0 - add r0, r5, #0 - mov r1, #0xab - bl sub_02074B30 -_0223E490: - mov r0, #0xf5 - mov r1, #8 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223E7C0 -_0223E49A: - add r1, #8 - ldr r1, [r4, r1] - cmp r1, #5 - bhi _0223E524 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E4AE: ; jump table - .short _0223E4BA - _0223E4AE - 2 ; case 0 - .short _0223E518 - _0223E4AE - 2 ; case 1 - .short _0223E59C - _0223E4AE - 2 ; case 2 - .short _0223E5AE - _0223E4AE - 2 ; case 3 - .short _0223E616 - _0223E4AE - 2 ; case 4 - .short _0223E652 - _0223E4AE - 2 ; case 5 -_0223E4BA: - bl ov76_0223B78C - cmp r0, #0 - bne _0223E4CC - mov r0, #0xf5 - mov r1, #8 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223E7C0 -_0223E4CC: - mov r3, #0 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E6E8 ; =0x0000080B - mov r1, #2 - bl sub_02003178 - mov r3, #0 - str r3, [sp] - mov r0, #0xa - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E6EC ; =0x0000FFFF - mov r1, #8 - bl sub_02003178 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DCB8 - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E518: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - beq _0223E526 -_0223E524: - b _0223E7C0 -_0223E526: - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #0 - bl sub_02003858 - mov r0, #1 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r2, #4 - add r0, r4, #0 - str r2, [sp, #8] - mov r1, #0x28 - str r1, [sp, #0xc] - add r0, #0xe4 - add r1, #0xe4 - ldr r0, [r0, #0] - add r1, r4, r1 - mov r3, #2 - bl ov76_0223CA98 - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r1, #0x19 - str r0, [sp, #0x1c] - mov r0, #4 - str r0, [sp, #0x20] - mov r0, #0xd4 - str r0, [sp, #0x24] - mov r0, #5 - str r0, [sp, #0x28] - add r0, sp, #0x10 - strb r1, [r0, #0x1c] - mov r1, #6 - strb r1, [r0, #0x1d] - mov r0, #0x35 - bl sub_02015920 - mov r1, #0x89 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - add r1, sp, #0x1c - bl sub_02015958 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0xe - bl ov76_0223CA30 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E59C: - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_0223E5AE: - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020159FC - cmp r0, #0 - beq _0223E65E - cmp r0, #1 - beq _0223E5C4 - cmp r0, #2 - bne _0223E65E -_0223E5C4: - mov r1, #0x3e - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02003858 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02015A54 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02015938 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl sub_0200E084 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E616: - mov r0, #0xa - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E6E8 ; =0x0000080B - mov r1, #2 - bl sub_02003178 - mov r0, #0xa - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E6EC ; =0x0000FFFF - mov r1, #8 - bl sub_02003178 - mov r0, #0xf7 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E652: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - beq _0223E660 -_0223E65E: - b _0223E7C0 -_0223E660: - mov r0, #0x3e - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0 - beq _0223E6AA - cmp r1, #1 - beq _0223E674 - cmp r1, #2 - beq _0223E6A4 - b _0223E6AA -_0223E674: - add r0, r4, #0 - bl ov76_0223D350 - add r0, r4, #0 - bl ov76_0223D384 - add r0, r4, #0 - bl ov76_0223CC8C - add r0, r4, #0 - bl ov76_0223B678 - add r0, r4, #0 - bl ov76_0223B208 - add r0, r4, #0 - mov r1, #1 - bl ov76_0223B69C - mov r0, #0xf5 - mov r1, #6 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223E6AA -_0223E6A4: - mov r1, #4 - sub r0, #0xc - str r1, [r4, r0] -_0223E6AA: - add r0, r4, #0 - mov r1, #1 - bl ov76_0223DCB8 - mov r0, #0xf7 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223E7C0 -_0223E6BC: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r3, #0 - str r3, [sp] - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - mov r1, #1 - mov r2, #2 - bl sub_02003178 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 - ; .align 2, 0 -_0223E6E8: .word 0x0000080B -_0223E6EC: .word 0x0000FFFF -_0223E6F0: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0223E7C0 - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - mov r1, #1 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - add r2, r1, #0 - bl sub_02003178 - mov r0, #0x10 - str r0, [sp] - mov r3, #0 - str r3, [sp, #4] - add r0, r4, #0 - str r3, [sp, #8] - add r0, #0xe8 - ldr r0, [r0, #0] - ldr r2, _0223E89C ; =0x0000FFFF - mov r1, #4 - bl sub_02003178 - mov r0, #3 - add r1, r0, #0 - bl sub_02019060 - mov r0, #7 - mov r1, #3 - bl sub_02019060 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223D2F4 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223C568 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223B96C - mov r1, #0 - add r0, r4, #0 - mvn r1, r1 - mov r2, #4 - bl ov76_0223BD30 - add r0, r4, #0 - mov r1, #0 - bl ov76_0223DCB8 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E7C0 -_0223E77C: - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_0200384C - cmp r0, #0 - bne _0223E7C0 - add r0, r4, #0 - bl ov76_0223DCB0 - cmp r0, #1 - beq _0223E7C0 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3F4 - mov r1, #0 - add r0, r4, #0 - mov r2, #0xff - add r3, r1, #0 - bl ov76_0223D494 - add r0, r4, #0 - add r0, #0xec - mov r1, #7 - bl ov76_0223CA30 - add r0, r4, #0 - bl ov76_0223CDA4 - add sp, #0xa4 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223E7C0: - add r0, r4, #0 - add r0, #0xd4 - ldr r5, [r0, #0] - cmp r5, #0xff - bne _0223E7D6 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0202404C - b _0223E87E -_0223E7D6: - add r0, sp, #0x14 - add r1, sp, #0x10 - bl sub_020227A4 - cmp r0, #0 - beq _0223E824 - lsl r6, r5, #4 - mov r0, #0xca - add r1, r4, r6 - lsl r0, r0, #2 - ldrb r0, [r1, r0] - bl sub_02098164 - add r1, r0, #0 - add r0, r4, #0 - add r0, #0xec - bl ov76_0223CDC4 - mov r0, #0xcb - ldr r2, [sp, #0x10] - add r1, r4, r6 - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r1, [sp, #0x14] - lsl r2, r2, #0x10 - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_0200D4C4 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B758 - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B7D4 - b _0223E87E -_0223E824: - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B6C4 - lsl r6, r5, #4 - mov r2, #0x33 - add r1, r4, r6 - lsl r2, r2, #4 - add r7, r0, #0 - ldr r0, [r1, r2] - sub r2, r2, #4 - ldr r1, [r1, r2] - mov r2, #0 - bl ov76_0223B184 - cmp r7, #0 - bne _0223E866 - mov r1, #0xca - ldr r0, [r4, #0] - add r2, r4, r6 - lsl r1, r1, #2 - ldrb r1, [r2, r1] - ldr r0, [r0, #0x20] - mov r2, #1 - bl sub_0202CB20 - add r0, r4, #0 - bl ov76_0223CC8C - add r0, r4, #0 - add r1, r5, #0 - bl ov76_0223B704 -_0223E866: - ldr r0, _0223E8A0 ; =0x000005EA - bl sub_02005748 - add r0, r4, #0 - mov r1, #0xff - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - ldr r1, _0223E89C ; =0x0000FFFF - add r0, #0xec - bl ov76_0223CDC4 -_0223E87E: - add r0, r4, #0 - bl ov76_0223D318 - add r0, r4, #0 - bl ov76_0223C544 - add r0, r4, #0 - bl ov76_0223C304 - add r0, r4, #0 - bl ov76_0223C88C - mov r0, #1 - add sp, #0xa4 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E89C: .word 0x0000FFFF -_0223E8A0: .word 0x000005EA - thumb_func_end ov76_0223DF94 - - thumb_func_start ov76_0223E8A4 -ov76_0223E8A4: ; 0x0223E8A4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _0223E8BC - cmp r1, #1 - beq _0223E8C0 - cmp r1, #2 - beq _0223E8D0 - b _0223E90A -_0223E8BC: - add r1, r1, #1 - str r1, [r4, r0] -_0223E8C0: - bl ov76_0223CE64 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E90A -_0223E8D0: - bl sub_0200F2AC - cmp r0, #1 - bne _0223E90A - add r0, r4, #0 - add r0, #0xec - bl sub_0201A8FC - add r0, r4, #0 - bl ov76_0223C8BC - add r0, r4, #0 - bl ov76_0223C32C - add r0, r4, #0 - bl ov76_0223D31C - add r0, r4, #0 - bl ov76_0223C588 - add r0, r4, #0 - bl ov76_0223BC70 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02097F30 - mov r0, #0 - pop {r4, pc} -_0223E90A: - add r0, r4, #0 - bl ov76_0223C304 - add r0, r4, #0 - bl ov76_0223C88C - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov76_0223E8A4 - - thumb_func_start ov76_0223E91C -ov76_0223E91C: ; 0x0223E91C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - mov r0, #0 - add r4, r5, #4 - lsl r6, r1, #3 - str r0, [sp] - ldr r0, [r4, r6] - cmp r0, #0xff - beq _0223E940 - ldr r1, [r5, #0] - lsl r0, r0, #2 - add r0, r1, r0 - ldr r0, [r0, #4] - mov r1, #0xa2 - add r2, sp, #0 - bl sub_02074B30 -_0223E940: - mov r0, #0xff - str r0, [r4, r6] - add r0, r5, #0 - bl ov76_0223C7E0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov76_0223E91C - - thumb_func_start ov76_0223E950 -ov76_0223E950: ; 0x0223E950 - push {r4, lr} - mov r2, #0xf5 - add r4, r0, #0 - lsl r2, r2, #2 - ldr r1, [r4, r2] - cmp r1, #0 - beq _0223E968 - cmp r1, #1 - beq _0223E986 - cmp r1, #2 - beq _0223E996 - b _0223E9AA -_0223E968: - sub r2, #0x10 - ldr r1, [r4, r2] - bl ov76_0223E91C - add r0, r4, #0 - add r0, #0xec - mov r1, #9 - bl ov76_0223CA30 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - b _0223E9AA -_0223E986: - ldr r0, _0223E9BC ; =0x021BF67C - ldr r3, [r0, #0x48] - ldr r0, _0223E9C0 ; =0x00000CF3 - tst r0, r3 - beq _0223E9AA - add r0, r1, #1 - str r0, [r4, r2] - b _0223E9AA -_0223E996: - mov r1, #0 - mov r2, #0xff - add r3, r1, #0 - bl ov76_0223D494 - add r0, r4, #0 - add r0, #0xec - mov r1, #7 - bl ov76_0223CA30 -_0223E9AA: - add r0, r4, #0 - bl ov76_0223C304 - add r0, r4, #0 - bl ov76_0223C88C - mov r0, #1 - pop {r4, pc} - nop -_0223E9BC: .word 0x021BF67C -_0223E9C0: .word 0x00000CF3 - thumb_func_end ov76_0223E950 - - thumb_func_start ov76_0223E9C4 -ov76_0223E9C4: ; 0x0223E9C4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #3 - bls _0223E9D4 - b _0223EAFC -_0223E9D4: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223E9E0: ; jump table - .short _0223E9E8 - _0223E9E0 - 2 ; case 0 - .short _0223EA2A - _0223E9E0 - 2 ; case 1 - .short _0223EAB4 - _0223E9E0 - 2 ; case 2 - .short _0223EAC4 - _0223E9E0 - 2 ; case 3 -_0223E9E8: - sub r0, #0xe0 - ldr r0, [r4, r0] - mov r1, #0x19 - bl sub_0200D474 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x14 - bl sub_0200D474 - mov r0, #0xbd - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D364 - add r0, r4, #0 - add r0, #0xec - mov r1, #0xa - bl ov76_0223CA30 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_0200D3F4 - mov r0, #0xf5 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_0223EA2A: - mov r0, #0xf2 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov76_0223D574 - cmp r0, #1 - bne _0223EA4A - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov76_0223D600 - ldr r0, _0223EB0C ; =0x000005DC - bl sub_02005748 - b _0223EAFC -_0223EA4A: - ldr r0, _0223EB10 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - beq _0223EA88 - mov r2, #0xf1 - lsl r2, r2, #2 - ldr r1, [r4, r2] - add r2, r2, #4 - ldr r2, [r4, r2] - add r0, r4, #0 - bl ov76_0223C80C - mov r1, #1 - add r0, r4, #0 - add r2, r1, #0 - bl ov76_0223D600 - add r0, r4, #0 - add r0, #0xec - mov r1, #0xb - bl ov76_0223CA30 - mov r0, #0xf5 - mov r1, #2 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _0223EB0C ; =0x000005DC - bl sub_02005748 - b _0223EAFC -_0223EA88: - mov r0, #2 - tst r0, r1 - beq _0223EAFC - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D3F4 - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - bl ov76_0223D600 - mov r0, #0xf5 - mov r1, #3 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _0223EB14 ; =0x000005DD - bl sub_02005748 - b _0223EAFC -_0223EAB4: - ldr r1, _0223EB10 ; =0x021BF67C - ldr r2, [r1, #0x48] - ldr r1, _0223EB18 ; =0x00000CF3 - tst r1, r2 - beq _0223EAFC - mov r1, #3 - str r1, [r4, r0] - b _0223EAFC -_0223EAC4: - sub r0, #0xe0 - ldr r0, [r4, r0] - mov r1, #0x14 - bl sub_0200D474 - mov r0, #0xbe - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0x19 - bl sub_0200D474 - mov r1, #0 - add r0, r4, #0 - mov r2, #0xff - add r3, r1, #0 - bl ov76_0223D494 - mov r0, #0xbd - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200D364 - add r0, r4, #0 - add r0, #0xec - mov r1, #7 - bl ov76_0223CA30 -_0223EAFC: - add r0, r4, #0 - bl ov76_0223C304 - add r0, r4, #0 - bl ov76_0223C88C - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_0223EB0C: .word 0x000005DC -_0223EB10: .word 0x021BF67C -_0223EB14: .word 0x000005DD -_0223EB18: .word 0x00000CF3 - thumb_func_end ov76_0223E9C4 - - thumb_func_start ov76_0223EB1C -ov76_0223EB1C: ; 0x0223EB1C - mov r0, #0 - bx lr - thumb_func_end ov76_0223EB1C - - thumb_func_start ov76_0223EB20 -ov76_0223EB20: ; 0x0223EB20 - push {r3, lr} - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _0223EB4C ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _0223EB50 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - pop {r3, pc} - ; .align 2, 0 -_0223EB4C: .word 0xFFFFE0FF -_0223EB50: .word 0x04001000 - thumb_func_end ov76_0223EB20 - - thumb_func_start ov76_0223EB54 -ov76_0223EB54: ; 0x0223EB54 - push {r3, lr} - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - pop {r3, pc} - thumb_func_end ov76_0223EB54 - - thumb_func_start ov76_0223EB64 -ov76_0223EB64: ; 0x0223EB64 - push {r4, r5, lr} - sub sp, #0xfc - add r4, r0, #0 - bl sub_0201FF00 - ldr r5, _0223EC9C ; =0x0223EE1C - add r3, sp, #0x10 - mov r2, #5 -_0223EB74: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223EB74 - add r0, sp, #0x10 - bl sub_0201FE94 - mov r1, #6 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x62 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - mov r1, #0x19 - mov r2, #1 - mov r0, #0 - lsl r1, r1, #0x16 - lsl r2, r2, #0x12 - bl sub_020C4B4C - mov r1, #0x66 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x14 - lsl r2, r2, #0x10 - bl sub_020C4B4C - ldr r5, _0223ECA0 ; =0x0223EDF4 - add r3, sp, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223ECA4 ; =0x0223EE78 - add r3, sp, #0xa8 - mov r2, #0xa -_0223EBD4: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223EBD4 - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - add r2, sp, #0xa8 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - add r2, sp, #0xc4 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - add r2, sp, #0xe0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - ldr r1, _0223ECA8 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r2, r0 - strh r2, [r1] - add r1, r0, #0 - bl sub_0201FF0C - ldr r5, _0223ECAC ; =0x0223EECC - add r3, sp, #0x38 - mov r2, #0xe -_0223EC36: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223EC36 - add r0, r4, #0 - mov r1, #4 - add r2, sp, #0x38 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #5 - add r2, sp, #0x54 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #6 - add r2, sp, #0x70 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #7 - add r2, sp, #0x8c - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #5 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #6 - bl sub_02019EBC - add r0, r4, #0 - mov r1, #7 - bl sub_02019EBC - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - add sp, #0xfc - pop {r4, r5, pc} - nop -_0223EC9C: .word 0x0223EE1C -_0223ECA0: .word 0x0223EDF4 -_0223ECA4: .word 0x0223EE78 -_0223ECA8: .word 0x04000008 -_0223ECAC: .word 0x0223EECC - thumb_func_end ov76_0223EB64 - - thumb_func_start ov76_0223ECB0 -ov76_0223ECB0: ; 0x0223ECB0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x69 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02008A94 - bl sub_0201DCAC - bl sub_0200C800 - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - bl sub_02003694 - add r4, #0xe4 - ldr r0, [r4, #0] - bl sub_0201C2B8 - ldr r3, _0223ECE8 ; =0x027E0000 - ldr r1, _0223ECEC ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_0223ECE8: .word 0x027E0000 -_0223ECEC: .word 0x00003FF8 - thumb_func_end ov76_0223ECB0 - ; 0x0223ECF0 - - - .rodata - .incbin "incbin/overlay76_rodata.bin" - - .section .sinit, 4 - .word ov76_0223B140 - - .bss - .space 0x0 diff --git a/asm/overlay77.s b/asm/overlay77.s deleted file mode 100644 index b04a3a313..000000000 --- a/asm/overlay77.s +++ /dev/null @@ -1,12375 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov77_021D0D80 -ov77_021D0D80: ; 0x021D0D80 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - ldr r1, _021D0E20 ; =0x04001050 - mov r0, #0 - strh r0, [r1] - ldr r1, _021D0E24 ; =0x04000050 - strh r0, [r1] - add r1, r0, #0 - bl sub_02017798 - mov r0, #0 - add r1, r0, #0 - bl sub_020177BC - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D0E28 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D0E2C ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - mov r2, #1 - mov r0, #3 - mov r1, #0x1e - lsl r2, r2, #0x12 - bl sub_02017FC8 - ldr r1, _021D0E30 ; =0x00000504 - add r0, r4, #0 - mov r2, #0x1e - bl sub_0200681C - ldr r2, _021D0E30 ; =0x00000504 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x1e - str r0, [r4, #0] - ldr r0, _021D0E34 ; =0x000004EC - mov r1, #0 - strh r1, [r4, r0] - add r0, #0x10 - str r1, [r4, r0] - bl ov77_021D1184 - add r0, r4, #0 - bl ov77_021D17B4 - add r0, r4, #0 - bl ov77_021D11CC - ldr r0, _021D0E38 ; =ov77_021D1178 - add r1, r4, #0 - bl sub_02017798 - bl sub_0201FFD0 - mov r0, #1 - pop {r4, pc} - nop -_021D0E20: .word 0x04001050 -_021D0E24: .word 0x04000050 -_021D0E28: .word 0xFFFFE0FF -_021D0E2C: .word 0x04001000 -_021D0E30: .word 0x00000504 -_021D0E34: .word 0x000004EC -_021D0E38: .word ov77_021D1178 - thumb_func_end ov77_021D0D80 - - thumb_func_start ov77_021D0E3C -ov77_021D0E3C: ; 0x021D0E3C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #6 - bhi _021D0E7A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D0E5A: ; jump table - .short _021D0E68 - _021D0E5A - 2 ; case 0 - .short _021D0EB8 - _021D0E5A - 2 ; case 1 - .short _021D0ED8 - _021D0E5A - 2 ; case 2 - .short _021D0EEE - _021D0E5A - 2 ; case 3 - .short _021D0FBC - _021D0E5A - 2 ; case 4 - .short _021D1078 - _021D0E5A - 2 ; case 5 - .short _021D10BC - _021D0E5A - 2 ; case 6 -_021D0E68: - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D1A60 - cmp r0, #1 - beq _021D0E7C -_021D0E7A: - b _021D10DC -_021D0E7C: - mov r1, #0x8e - ldr r2, _021D10E4 ; =0x021BF67C - mov r0, #0 - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r1, [r2, #0x6c] - cmp r1, #0 - bne _021D0EA6 - mov r2, #0x4f - mov r1, #0x1e - lsl r2, r2, #4 - str r1, [r4, r2] - add r1, r2, #0 - mov r3, #1 - sub r1, #0x18 - str r3, [r4, r1] - sub r2, #0x14 - str r0, [r4, r2] - mov r0, #2 - str r0, [r5, #0] - b _021D10DC -_021D0EA6: - mov r1, #0x4f - lsl r1, r1, #4 - str r0, [r4, r1] - str r0, [r2, #0x6c] - mov r0, #1 - sub r1, #0x14 - str r0, [r4, r1] - str r0, [r5, #0] - b _021D10DC -_021D0EB8: - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D1DF0 - cmp r0, #1 - bne _021D0F9E - mov r0, #0x8e - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #2 - str r0, [r5, #0] - b _021D10DC -_021D0ED8: - mov r0, #0 - bl sub_02004234 - mov r0, #1 - ldr r1, _021D10E8 ; =0x00000495 - add r2, r0, #0 - bl sub_02004550 - mov r0, #3 - str r0, [r5, #0] - b _021D10DC -_021D0EEE: - mov r0, #0x4f - lsl r0, r0, #4 - ldr r1, [r4, r0] - cmp r1, #0 - beq _021D0F12 - sub r1, r1, #1 - str r1, [r4, r0] - mov r1, #0 - sub r0, #0x60 - str r1, [r4, r0] - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D20E4 - b _021D10DC -_021D0F12: - mov r1, #1 - sub r0, #0x60 - str r1, [r4, r0] - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D20E4 - ldr r1, _021D10EC ; =0x000004FC - ldr r2, _021D10E4 ; =0x021BF67C - ldr r0, [r4, r1] - add r0, r0, #1 - str r0, [r4, r1] - ldr r3, [r2, #0x48] - mov r0, #1 - add r6, r3, #0 - and r6, r0 - cmp r6, #1 - beq _021D0F44 - mov r6, #8 - and r3, r6 - cmp r3, #8 - bne _021D0F68 -_021D0F44: - ldr r0, _021D10F0 ; =0x000004EC - mov r1, #1 - strh r1, [r4, r0] - mov r0, #0 - mov r1, #0x3c - bl sub_0200564C - ldr r0, _021D10F4 ; =0x000001E7 - mov r1, #1 - bl sub_02005844 - ldr r0, [r4, #4] - ldr r1, [r4, #0] - bl ov77_021D1D48 - mov r0, #4 - str r0, [r5, #0] - b _021D10DC -_021D0F68: - ldr r6, [r2, #0x44] - mov r3, #0x46 - and r3, r6 - cmp r3, #0x46 - bne _021D0F94 - mov r2, #2 - sub r1, #0x10 - strh r2, [r4, r1] - mov r1, #6 - str r1, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0] - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #6 - str r0, [r5, #0] - b _021D10DC -_021D0F94: - mov r3, #0xe1 - ldr r6, [r4, r1] - lsl r3, r3, #2 - cmp r6, r3 - bgt _021D0FA0 -_021D0F9E: - b _021D10DC -_021D0FA0: - mov r3, #3 - sub r1, #0x10 - strh r3, [r4, r1] - mov r1, #0 - str r0, [r2, #0x6c] - bl sub_0201FF74 - mov r0, #0 - mov r1, #0x3c - bl sub_0200564C - mov r0, #5 - str r0, [r5, #0] - b _021D10DC -_021D0FBC: - mov r0, #0x49 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D20E4 - mov r0, #5 - lsl r0, r0, #8 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0xa - bne _021D0FFA - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r3, _021D10F8 ; =0x00007FFF - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 -_021D0FFA: - bl sub_0200598C - cmp r0, #0 - bne _021D10DC - bl sub_0200F2AC - cmp r0, #1 - bne _021D10DC - mov r0, #5 - lsl r0, r0, #8 - ldr r1, [r4, r0] - cmp r1, #0xa - blt _021D10DC - sub r0, #0x6b - mov r1, #0 - bl sub_020055D0 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - mov r0, #6 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r4, #0] - ldr r3, _021D10F8 ; =0x00007FFF - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #6 - str r0, [r5, #0] - b _021D10DC -_021D1078: - mov r0, #0x49 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D20E4 - bl sub_02005684 - cmp r0, #0 - bne _021D10DC - ldr r0, _021D10E8 ; =0x00000495 - mov r1, #0 - bl sub_020055D0 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r3, _021D10F8 ; =0x00007FFF - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - mov r0, #6 - str r0, [r5, #0] - b _021D10DC -_021D10BC: - bl sub_0200F2AC - cmp r0, #1 - bne _021D10DC - mov r0, #0x8e - lsl r0, r0, #2 - ldr r1, [r4, #4] - ldr r2, [r4, #0] - add r0, r4, r0 - bl ov77_021D21C0 - cmp r0, #1 - bne _021D10DC - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D10DC: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021D10E4: .word 0x021BF67C -_021D10E8: .word 0x00000495 -_021D10EC: .word 0x000004FC -_021D10F0: .word 0x000004EC -_021D10F4: .word 0x000001E7 -_021D10F8: .word 0x00007FFF - thumb_func_end ov77_021D0E3C - - thumb_func_start ov77_021D10FC -ov77_021D10FC: ; 0x021D10FC - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - bl sub_0200682C - add r6, r0, #0 - ldr r0, _021D1164 ; =0x000004EC - ldr r4, [r6, #0] - ldrh r5, [r6, r0] - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - add r0, r6, #0 - bl ov77_021D11FC - add r0, r6, #0 - bl ov77_021D1908 - add r0, r7, #0 - bl sub_02006830 - add r0, r4, #0 - bl sub_0201807C - cmp r5, #1 - beq _021D1138 - cmp r5, #2 - beq _021D1144 - cmp r5, #3 - beq _021D1150 -_021D1138: - mov r0, #0 - ldr r1, _021D1168 ; =0x020F8AB4 - mvn r0, r0 - bl sub_02000EC4 - b _021D115E -_021D1144: - mov r0, #0 - ldr r1, _021D116C ; =0x020F8A48 - mvn r0, r0 - bl sub_02000EC4 - b _021D115E -_021D1150: - mov r0, #0 - bl sub_02004234 - ldr r0, _021D1170 ; =0x0000004D - ldr r1, _021D1174 ; =0x021D788C - bl sub_02000EC4 -_021D115E: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D1164: .word 0x000004EC -_021D1168: .word 0x020F8AB4 -_021D116C: .word 0x020F8A48 -_021D1170: .word 0x0000004D -_021D1174: .word 0x021D788C - thumb_func_end ov77_021D10FC - - thumb_func_start ov77_021D1178 -ov77_021D1178: ; 0x021D1178 - ldr r3, _021D1180 ; =sub_0201C2B8 - ldr r0, [r0, #4] - bx r3 - nop -_021D1180: .word sub_0201C2B8 - thumb_func_end ov77_021D1178 - - thumb_func_start ov77_021D1184 -ov77_021D1184: ; 0x021D1184 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D11A0 ; =0x021D7404 - add r3, sp, #0 - mov r2, #5 -_021D118E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D118E - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D11A0: .word 0x021D7404 - thumb_func_end ov77_021D1184 - - thumb_func_start ov77_021D11A4 -ov77_021D11A4: ; 0x021D11A4 - ldr r0, _021D11C8 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - and r0, r1 - cmp r0, #1 - beq _021D11C0 - mov r0, #8 - and r0, r1 - cmp r0, #8 - beq _021D11C0 - mov r0, #4 - and r0, r1 - cmp r0, #4 - bne _021D11C4 -_021D11C0: - mov r0, #1 - bx lr -_021D11C4: - mov r0, #0 - bx lr - ; .align 2, 0 -_021D11C8: .word 0x021BF67C - thumb_func_end ov77_021D11A4 - - thumb_func_start ov77_021D11CC -ov77_021D11CC: ; 0x021D11CC - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #4 - mov r1, #0 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r4, #0] - mov r2, #1 - add r3, r1, #0 - bl sub_02024220 - str r0, [r4, #8] - ldr r1, _021D11F8 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - strh r0, [r1] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_021D11F8: .word 0x04000008 - thumb_func_end ov77_021D11CC - - thumb_func_start ov77_021D11FC -ov77_021D11FC: ; 0x021D11FC - ldr r3, _021D1204 ; =sub_020242C4 - ldr r0, [r0, #8] - bx r3 - nop -_021D1204: .word sub_020242C4 - thumb_func_end ov77_021D11FC - - thumb_func_start ov77_021D1208 -ov77_021D1208: ; 0x021D1208 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r3, #0 - add r5, r0, #0 - add r6, r1, #0 - add r7, r2, #0 - add r0, #0x70 - add r1, r4, #0 - mov r2, #4 - bl sub_020182CC - mov r0, #0x30 - add r1, r6, #0 - add r2, r4, #0 - bl sub_02006AC0 - str r0, [r5, #0x5c] - mov r0, #0x30 - add r1, r7, #0 - add r2, r4, #0 - bl sub_02006AC0 - str r0, [r5, #0x60] - mov r0, #0x30 - mov r1, #2 - add r2, r4, #0 - bl sub_02006AC0 - add r1, r5, #0 - add r2, r5, #0 - str r0, [r5, #0x64] - add r0, r5, #4 - add r1, #0x58 - add r2, #0x5c - bl sub_0201CA3C - ldr r0, [r5, #0x60] - mov r1, #0 - bl sub_020B3C5C - add r6, r0, #0 - ldr r0, [r5, #0x64] - mov r1, #0 - bl sub_020B3C5C - add r7, r0, #0 - add r0, r5, #0 - ldr r2, [r5, #0x58] - add r0, #0x70 - add r1, r6, #0 - bl sub_020B2CB4 - str r0, [r5, #0x68] - add r0, r5, #0 - ldr r2, [r5, #0x58] - add r0, #0x70 - add r1, r7, #0 - bl sub_020B2CB4 - str r0, [r5, #0x6c] - ldr r0, [r5, #0x5c] - bl sub_020B3C1C - str r0, [sp] - ldr r0, [r5, #0x68] - ldr r2, [r5, #0x58] - ldr r3, [sp] - add r1, r6, #0 - bl sub_020AE4F0 - ldr r0, [r5, #0x6c] - ldr r2, [r5, #0x58] - ldr r3, [sp] - add r1, r7, #0 - bl sub_020AE4F0 - ldr r1, [r5, #0x68] - add r0, r5, #4 - bl sub_020AE77C - ldr r1, [r5, #0x6c] - add r0, r5, #4 - bl sub_020AE77C - add r3, r5, #0 - add r6, sp, #0x10 - mov r7, #0 - str r7, [r6, #0] - add r2, sp, #4 - str r7, [r6, #4] - str r7, [r2, #0] - str r7, [r6, #8] - str r7, [r2, #4] - ldmia r6!, {r0, r1} - str r7, [r2, #8] - add r3, #0x80 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - ldr r6, _021D12FC ; =0x021D72E4 - str r0, [r3, #0] - add r3, r5, #0 - ldmia r6!, {r0, r1} - add r3, #0x8c - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - add r3, r5, #0 - ldmia r2!, {r0, r1} - add r3, #0x98 - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - add r1, r4, #0 - str r0, [r3, #0] - add r0, r5, #0 - add r0, #0xac - str r7, [r0, #0] - add r0, r5, #0 - bl ov77_021D1300 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_021D12FC: .word 0x021D72E4 - thumb_func_end ov77_021D1208 - - thumb_func_start ov77_021D1300 -ov77_021D1300: ; 0x021D1300 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x30 - add r4, r1, #0 - bl sub_02006C24 - add r6, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r5, r0 - add r1, r6, #0 - mov r2, #0x13 - add r3, r4, #0 - bl sub_020170D8 - mov r0, #0x56 - lsl r0, r0, #2 - mov r2, #0x1f - ldr r0, [r5, r0] - mov r1, #1 - lsl r2, r2, #0x10 - bl sub_020B2D8C - mov r0, #0x56 - lsl r0, r0, #2 - mov r2, #0x3f - ldr r0, [r5, r0] - mov r1, #1 - lsl r2, r2, #0x18 - bl sub_020B2D8C - add r0, r5, #0 - mov r1, #0x4a - str r4, [sp] - add r0, #0x70 - lsl r1, r1, #2 - str r0, [sp, #4] - add r0, r5, r1 - add r1, #0x28 - add r1, r5, r1 - add r2, r6, #0 - mov r3, #0x15 - bl sub_02017164 - mov r0, #0x4a - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_02017240 - add r0, r5, #0 - mov r1, #0x4f - str r4, [sp] - add r0, #0x70 - lsl r1, r1, #2 - str r0, [sp, #4] - add r0, r5, r1 - add r1, #0x14 - add r1, r5, r1 - add r2, r6, #0 - mov r3, #0x14 - bl sub_02017164 - mov r0, #0x4f - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_02017240 - mov r1, #0x15 - add r0, r5, #0 - lsl r1, r1, #4 - add r0, #0xb0 - add r1, r5, r1 - bl sub_02017258 - mov r1, #0 - add r0, r5, #0 - add r0, #0xb0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02017350 - mov r1, #1 - lsl r1, r1, #0xc - add r0, r5, #0 - add r0, #0xb0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201736C - add r0, r5, #0 - add r0, #0xb0 - mov r1, #1 - bl sub_02017348 - mov r1, #0x4a - add r0, r5, #0 - lsl r1, r1, #2 - add r0, #0xb0 - add r1, r5, r1 - bl sub_0201727C - mov r1, #0x4f - add r0, r5, #0 - lsl r1, r1, #2 - add r0, #0xb0 - add r1, r5, r1 - bl sub_0201727C - mov r0, #2 - lsl r0, r0, #8 - add r0, r5, r0 - add r1, r6, #0 - mov r2, #0x10 - add r3, r4, #0 - bl sub_020170D8 - mov r0, #0x82 - lsl r0, r0, #2 - mov r2, #0x1f - ldr r0, [r5, r0] - mov r1, #1 - lsl r2, r2, #0x10 - bl sub_020B2D8C - mov r0, #0x82 - lsl r0, r0, #2 - mov r2, #0x3f - ldr r0, [r5, r0] - mov r1, #1 - lsl r2, r2, #0x18 - bl sub_020B2D8C - add r0, r5, #0 - mov r1, #0x76 - str r4, [sp] - add r0, #0x70 - lsl r1, r1, #2 - str r0, [sp, #4] - add r0, r5, r1 - add r1, #0x28 - add r1, r5, r1 - add r2, r6, #0 - mov r3, #0x12 - bl sub_02017164 - mov r0, #0x76 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_02017240 - add r0, r5, #0 - mov r1, #0x7b - str r4, [sp] - add r0, #0x70 - lsl r1, r1, #2 - str r0, [sp, #4] - add r0, r5, r1 - add r1, #0x14 - add r1, r5, r1 - add r2, r6, #0 - mov r3, #0x11 - bl sub_02017164 - mov r0, #0x7b - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #0 - bl sub_02017240 - mov r1, #0x16 - lsl r1, r1, #4 - add r0, r5, r1 - add r1, #0xa0 - add r1, r5, r1 - bl sub_02017258 - mov r1, #0 - mov r0, #0x16 - lsl r0, r0, #4 - add r0, r5, r0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02017350 - mov r0, #0x16 - mov r1, #1 - lsl r1, r1, #0xc - lsl r0, r0, #4 - add r0, r5, r0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201736C - mov r0, #0x16 - lsl r0, r0, #4 - add r0, r5, r0 - mov r1, #1 - bl sub_02017348 - mov r1, #0x16 - lsl r1, r1, #4 - add r0, r5, r1 - add r1, #0x78 - add r1, r5, r1 - bl sub_0201727C - mov r1, #0x16 - lsl r1, r1, #4 - add r0, r5, r1 - add r1, #0x8c - add r1, r5, r1 - bl sub_0201727C - add r0, r6, #0 - bl sub_02006CA8 - mov r1, #0x85 - ldr r0, _021D14DC ; =0xFFFFFED2 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r2, _021D14E0 ; =0x0000E383 - add r0, r1, #4 - str r2, [r5, r0] - add r0, r1, #0 - mov r2, #1 - lsl r2, r2, #0xc - add r0, #8 - str r2, [r5, r0] - mov r0, #0x1e - lsl r0, r0, #0xa - add r1, #0xc - str r0, [r5, r1] - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D14DC: .word 0xFFFFFED2 -_021D14E0: .word 0x0000E383 - thumb_func_end ov77_021D1300 - - thumb_func_start ov77_021D14E4 -ov77_021D14E4: ; 0x021D14E4 - push {r4, lr} - add r4, r0, #0 - bl ov77_021D1514 - add r0, r4, #0 - ldr r1, [r4, #0x68] - add r0, #0x70 - bl sub_020B2CD8 - add r0, r4, #0 - ldr r1, [r4, #0x6c] - add r0, #0x70 - bl sub_020B2CD8 - ldr r0, [r4, #0x60] - bl sub_020181C4 - ldr r0, [r4, #0x64] - bl sub_020181C4 - ldr r0, [r4, #0x5c] - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov77_021D14E4 - - thumb_func_start ov77_021D1514 -ov77_021D1514: ; 0x021D1514 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x15 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_02017110 - mov r0, #0x4a - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x70 - bl sub_020171A0 - mov r0, #0x4f - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x70 - bl sub_020171A0 - mov r0, #2 - lsl r0, r0, #8 - add r0, r4, r0 - bl sub_02017110 - mov r0, #0x76 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x70 - bl sub_020171A0 - mov r0, #0x7b - lsl r0, r0, #2 - add r0, r4, r0 - add r4, #0x70 - add r1, r4, #0 - bl sub_020171A0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D1514 - - thumb_func_start ov77_021D1568 -ov77_021D1568: ; 0x021D1568 - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - ldr r6, _021D16F4 ; =0x021D73E0 - add r5, r0, #0 - add r4, r1, #0 - add r3, sp, #0 - mov r2, #4 -_021D1576: - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D1576 - ldr r0, [r6, #0] - str r0, [r3, #0] - mov r0, #0x2a - lsl r0, r0, #4 - ldr r1, [r5, r0] - cmp r1, #0 - bne _021D15B6 - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #1 - bne _021D15B6 - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl ov77_021D25AC - add r1, r4, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - mov r0, #0 - bl sub_02020854 - add r0, r4, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl sub_020203D4 - b _021D15CC -_021D15B6: - add r1, r4, #0 - add r1, #0xa4 - ldr r1, [r1, #0] - mov r0, #0 - bl sub_02020854 - add r0, r4, #0 - add r0, #0xa4 - ldr r0, [r0, #0] - bl sub_020203D4 -_021D15CC: - mov r0, #0xab - lsl r0, r0, #2 - ldr r1, [r5, r0] - add r1, r1, #2 - str r1, [r5, r0] - mov r1, #0x5a - ldr r0, [r5, r0] - lsl r1, r1, #2 - bl sub_020E1F6C - mov r0, #0xab - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r1, [r5, r0] - ldr r0, _021D16F8 ; =0x0000FFFF - mul r0, r1 - mov r1, #0x5a - lsl r1, r1, #2 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0201D250 - bl sub_020E01B8 - ldr r2, _021D16FC ; =0x33333333 - ldr r3, _021D1700 ; =0x3FD33333 - bl sub_020E0234 - bl sub_020E0088 - add r1, r4, #0 - add r1, #0x84 - ldr r1, [r1, #0] - sub r1, r1, r0 - add r0, r4, #0 - add r0, #0x84 - str r1, [r0, #0] - ldr r0, [r4, #0] - cmp r0, #0 - beq _021D16F0 - cmp r0, #1 - beq _021D162C - cmp r0, #2 - beq _021D1640 - add sp, #0x24 - pop {r3, r4, r5, r6, pc} -_021D162C: - bl sub_020241B4 - mov r0, #1 - add r1, r0, #0 - bl sub_020241BC - mov r0, #0 - add sp, #0x24 - str r0, [r4, #0] - pop {r3, r4, r5, r6, pc} -_021D1640: - bl sub_020241B4 - bl sub_020203EC - add r1, r4, #0 - add r0, sp, #0 - add r1, #0x98 - bl sub_0201E268 - mov r0, #0x2a - lsl r0, r0, #4 - ldr r1, [r5, r0] - cmp r1, #0 - bne _021D166C - add r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #1 - bne _021D1680 - add r0, r4, #0 - bl ov77_021D1704 - b _021D1680 -_021D166C: - bl sub_020C2BE8 - add r1, r4, #0 - add r3, r4, #0 - add r0, r4, #4 - add r1, #0x80 - add r2, sp, #0 - add r3, #0x8c - bl sub_0201CA74 -_021D1680: - add r0, r4, #0 - add r0, #0xac - ldr r0, [r0, #0] - cmp r0, #0 - beq _021D1694 - cmp r0, #1 - beq _021D16A0 - cmp r0, #2 - beq _021D16B0 - b _021D16E8 -_021D1694: - ldr r0, [r4, #0x68] - mov r1, #0 - str r1, [r0, #0] - ldr r0, [r4, #0x6c] - str r1, [r0, #0] - b _021D16E8 -_021D16A0: - ldr r0, [r4, #0x68] - ldr r0, [r0, #0] - cmp r0, #0 - bne _021D16B0 - mov r0, #0 - add r4, #0xac - str r0, [r4, #0] - b _021D16E8 -_021D16B0: - ldr r2, [r4, #0x68] - mov r0, #1 - ldr r1, [r2, #0] - lsl r0, r0, #0xc - add r1, r1, r0 - str r1, [r2, #0] - ldr r2, [r4, #0x6c] - ldr r1, [r2, #0] - add r0, r1, r0 - str r0, [r2, #0] - ldr r2, [r4, #0x68] - ldr r0, [r2, #8] - ldr r1, [r2, #0] - ldrh r0, [r0, #4] - lsl r0, r0, #0xc - cmp r1, r0 - bne _021D16D6 - mov r0, #0 - str r0, [r2, #0] -_021D16D6: - ldr r2, [r4, #0x6c] - ldr r0, [r2, #8] - ldr r1, [r2, #0] - ldrh r0, [r0, #4] - lsl r0, r0, #0xc - cmp r1, r0 - bne _021D16E8 - mov r0, #0 - str r0, [r2, #0] -_021D16E8: - mov r0, #1 - add r1, r0, #0 - bl sub_020241BC -_021D16F0: - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D16F4: .word 0x021D73E0 -_021D16F8: .word 0x0000FFFF -_021D16FC: .word 0x33333333 -_021D1700: .word 0x3FD33333 - thumb_func_end ov77_021D1568 - - thumb_func_start ov77_021D1704 -ov77_021D1704: ; 0x021D1704 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x89 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - cmp r1, #1 - bne _021D172C - sub r0, #0xfc - mov r1, #1 - add r0, r4, r0 - lsl r1, r1, #0xc - bl sub_02017204 - cmp r0, #1 - bne _021D172C - mov r0, #0x89 - mov r1, #2 - lsl r0, r0, #2 - strb r1, [r4, r0] -_021D172C: - ldr r0, _021D17B0 ; =0x00000225 - ldrb r1, [r4, r0] - cmp r1, #1 - bne _021D174A - sub r0, #0xe9 - mov r1, #1 - add r0, r4, r0 - lsl r1, r1, #0xc - bl sub_02017204 - cmp r0, #1 - bne _021D174A - ldr r0, _021D17B0 ; =0x00000225 - mov r1, #2 - strb r1, [r4, r0] -_021D174A: - mov r0, #0x76 - lsl r0, r0, #2 - mov r1, #1 - add r0, r4, r0 - lsl r1, r1, #0xc - bl sub_020171CC - mov r0, #0x7b - lsl r0, r0, #2 - mov r1, #1 - add r0, r4, r0 - lsl r1, r1, #0xc - bl sub_020171CC - mov r1, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - mov r0, #0x16 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_02017294 - mov r0, #0x89 - lsl r0, r0, #2 - ldrb r1, [r4, r0] - cmp r1, #2 - bne _021D178C - add r0, r0, #1 - ldrb r0, [r4, r0] - cmp r0, #2 - beq _021D1796 -_021D178C: - add r4, #0xb0 - add r0, r4, #0 - bl sub_02017294 - b _021D17A0 -_021D1796: - add r4, #0xb0 - add r0, r4, #0 - mov r1, #0 - bl sub_02017348 -_021D17A0: - mov r2, #1 - mov r0, #0x12 - add r1, sp, #0 - str r2, [sp] - bl sub_020B275C - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_021D17B0: .word 0x00000225 - thumb_func_end ov77_021D1704 - - thumb_func_start ov77_021D17B4 -ov77_021D17B4: ; 0x021D17B4 - push {r3, r4, r5, lr} - sub sp, #0xb8 - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02018340 - add r3, sp, #0xa8 - ldr r5, _021D18EC ; =0x021D72F0 - str r0, [r4, #4] - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D18F0 ; =0x021D7354 - add r3, sp, #0x8c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D18F4 ; =0x021D7370 - add r3, sp, #0x70 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D18F8 ; =0x021D738C - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #6 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D18FC ; =0x021D73A8 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D1900 ; =0x021D7300 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D1904 ; =0x021D731C - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #7 - str r0, [r3, #0] - ldr r0, [r4, #4] - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - add sp, #0xb8 - pop {r3, r4, r5, pc} - nop -_021D18EC: .word 0x021D72F0 -_021D18F0: .word 0x021D7354 -_021D18F4: .word 0x021D7370 -_021D18F8: .word 0x021D738C -_021D18FC: .word 0x021D73A8 -_021D1900: .word 0x021D7300 -_021D1904: .word 0x021D731C - thumb_func_end ov77_021D17B4 - - thumb_func_start ov77_021D1908 -ov77_021D1908: ; 0x021D1908 - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #8 - mov r1, #0 - bl sub_0201FF74 - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #5 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #6 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #4] - mov r1, #7 - bl sub_02019044 - ldr r0, [r4, #4] - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov77_021D1908 - - thumb_func_start ov77_021D1984 -ov77_021D1984: ; 0x021D1984 - push {r3, r4, lr} - sub sp, #0x14 - mov r3, #0 - add r2, sp, #0 - strh r3, [r2] - add r4, r1, #0 - add r1, sp, #8 - strh r3, [r2, #2] - str r3, [r1, #0] - strh r3, [r2, #4] - str r3, [r1, #4] - strh r3, [r2, #6] - mov r2, #0x2a - str r3, [r1, #8] - lsl r2, r2, #4 - ldr r0, [r0, r2] - cmp r0, #1 - beq _021D1A54 - sub r2, #0x90 - ldr r0, [r4, r2] - cmp r0, #0x3c - bhs _021D19C0 - ldr r0, _021D1A58 ; =0xFFFFF600 - str r0, [sp, #0x10] - add r0, r1, #0 - add r1, r4, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - bl sub_02020990 -_021D19C0: - mov r1, #0x21 - lsl r1, r1, #4 - ldr r0, [r4, r1] - cmp r0, #0x4b - bne _021D19D6 - add r0, r1, #0 - mov r2, #1 - add r0, #0x14 - strb r2, [r4, r0] - add r1, #0x15 - strb r2, [r4, r1] -_021D19D6: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #0xfa - blo _021D1A4A - add r1, r4, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - add r0, sp, #0 - bl sub_02020A94 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r0, sp, #0 - strh r1, [r0] - add r1, r4, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - add r0, sp, #0 - bl sub_020209D4 - mov r1, #0x86 - lsl r1, r1, #2 - sub r0, r1, #4 - ldr r2, [r4, r1] - ldr r0, [r4, r0] - add r0, r2, r0 - str r0, [r4, r1] - ldr r2, [r4, r1] - ldr r0, _021D1A5C ; =0x0000C011 - cmp r2, r0 - bge _021D1A4A - str r0, [r4, r1] - add r1, #8 - ldr r0, [r4, r1] - add r1, r4, #0 - asr r0, r0, #8 - neg r0, r0 - add r1, #0xa8 - lsl r0, r0, #0x10 - ldr r1, [r1, #0] - lsr r0, r0, #0x10 - bl sub_0202094C - mov r1, #0x22 - lsl r1, r1, #4 - add r0, r1, #0 - ldr r2, [r4, r1] - add r0, #0x60 - sub r0, r2, r0 - str r0, [r4, r1] - mov r0, #1 - ldr r2, [r4, r1] - lsl r0, r0, #0xc - cmp r2, r0 - bge _021D1A4A - str r0, [r4, r1] -_021D1A4A: - mov r0, #0x21 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_021D1A54: - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_021D1A58: .word 0xFFFFF600 -_021D1A5C: .word 0x0000C011 - thumb_func_end ov77_021D1984 - - thumb_func_start ov77_021D1A60 -ov77_021D1A60: ; 0x021D1A60 - push {r3, r4, r5, r6, lr} - sub sp, #0x24 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - bl ov77_021D24C8 - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov77_021D2214 - add r0, r5, #4 - mov r1, #1 - mov r2, #0 - add r3, r4, #0 - bl ov77_021D1208 - ldr r0, _021D1BF0 ; =0x04000060 - ldr r2, _021D1BF4 ; =0xFFFFCFFF - ldrh r1, [r0] - add r3, r1, #0 - and r3, r2 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0] - and r2, r1 - mov r1, #8 - orr r1, r2 - strh r1, [r0] - mov r0, #0x9d - lsl r0, r0, #2 - add r1, r0, #0 - ldr r2, [r5, r0] - sub r1, #0x34 - str r2, [r5, r1] - add r1, r0, #4 - ldr r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x30 - str r2, [r5, r1] - add r1, r0, #0 - add r1, #8 - ldr r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x2c - str r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x18 - ldr r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x28 - str r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x14 - ldr r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x24 - str r2, [r5, r1] - add r1, r0, #0 - sub r1, #0x10 - ldr r1, [r5, r1] - sub r0, #0x20 - str r1, [r5, r0] - add r0, r4, #0 - bl sub_020203AC - add r1, r5, #0 - add r1, #0xa8 - str r0, [r1, #0] - mov r3, #0 - add r0, r5, #0 - mov r1, #9 - mov r2, #0xb6 - str r3, [sp] - add r0, #0xa8 - ldr r0, [r0, #0] - lsl r1, r1, #6 - str r0, [sp, #4] - add r0, r5, r1 - add r1, #0xc - add r1, r5, r1 - lsl r2, r2, #4 - bl sub_02020784 - add r2, r5, #0 - add r2, #0xa8 - mov r1, #0x4b - ldr r2, [r2, #0] - mov r0, #0 - lsl r1, r1, #0xe - bl sub_020206BC - add r1, r5, #0 - add r1, #0xa8 - ldr r1, [r1, #0] - mov r0, #0 - bl sub_02020854 - add r0, r5, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - bl sub_020203D4 - add r1, sp, #0x18 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - add r0, r4, #0 - bl sub_020203AC - add r1, r5, #0 - add r1, #0xac - str r0, [r1, #0] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - mov r1, #0xa - str r0, [sp, #8] - ldr r2, _021D1BF8 ; =0x021D72C8 - ldr r3, _021D1BFC ; =0x00000FA4 - add r0, sp, #0x18 - lsl r1, r1, #0x10 - bl sub_020206D0 - add r2, r5, #0 - add r2, #0xac - mov r1, #0x4b - ldr r2, [r2, #0] - mov r0, #0 - lsl r1, r1, #0xe - bl sub_020206BC - ldr r4, _021D1C00 ; =0x021D72D8 - add r3, sp, #0xc - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - add r1, r5, #0 - str r0, [r3, #0] - add r1, #0xac - ldr r1, [r1, #0] - add r0, r2, #0 - bl sub_02020990 - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_020203D4 - mov r3, #0xa3 - lsl r3, r3, #2 - add r2, r3, #2 - ldrsh r1, [r5, r3] - add r3, r3, #4 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - mov r0, #0 - bl sub_020AF51C - ldr r1, _021D1C04 ; =0x00007FFF - mov r0, #0 - bl sub_020AF558 - ldr r3, _021D1C08 ; =0x00000292 - mov r0, #1 - add r2, r3, #2 - ldrsh r1, [r5, r3] - add r3, r3, #4 - ldrsh r2, [r5, r2] - ldrsh r3, [r5, r3] - bl sub_020AF51C - ldr r1, _021D1C04 ; =0x00007FFF - mov r0, #1 - bl sub_020AF558 - ldr r2, _021D1BF0 ; =0x04000060 - ldr r0, _021D1BF4 ; =0xFFFFCFFF - ldrh r1, [r2] - and r1, r0 - mov r0, #0x10 - orr r0, r1 - strh r0, [r2] - ldr r0, _021D1C0C ; =0x021BF6DC - mov r1, #1 - strb r1, [r0, #5] - bl sub_0201FFE8 - mov r0, #2 - str r0, [r5, #4] - mov r0, #1 - add sp, #0x24 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D1BF0: .word 0x04000060 -_021D1BF4: .word 0xFFFFCFFF -_021D1BF8: .word 0x021D72C8 -_021D1BFC: .word 0x00000FA4 -_021D1C00: .word 0x021D72D8 -_021D1C04: .word 0x00007FFF -_021D1C08: .word 0x00000292 -_021D1C0C: .word 0x021BF6DC - thumb_func_end ov77_021D1A60 - - thumb_func_start ov77_021D1C10 -ov77_021D1C10: ; 0x021D1C10 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xa - lsl r0, r0, #6 - ldr r1, [r4, r0] - sub r0, #0xc - ldr r0, [r4, r0] - sub r0, r1, r0 - mov r1, #0x3c - bl sub_020E1F6C - mov r1, #9 - lsl r1, r1, #6 - ldr r2, [r4, r1] - add r0, r2, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x44 - add r1, #0x38 - ldr r2, [r4, r0] - ldr r0, [r4, r1] - mov r1, #0x3c - sub r0, r2, r0 - bl sub_020E1F6C - mov r1, #0x91 - lsl r1, r1, #2 - ldr r2, [r4, r1] - add r0, r2, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x44 - add r1, #0x38 - ldr r2, [r4, r0] - ldr r0, [r4, r1] - mov r1, #0x3c - sub r0, r2, r0 - bl sub_020E1F6C - mov r1, #0x92 - lsl r1, r1, #2 - ldr r2, [r4, r1] - add r0, r2, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x20 - add r1, #0x14 - ldr r2, [r4, r0] - ldr r0, [r4, r1] - mov r1, #0x3c - sub r0, r2, r0 - bl sub_020E1F6C - mov r1, #0x93 - lsl r1, r1, #2 - ldr r2, [r4, r1] - add r0, r2, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x20 - add r1, #0x14 - ldr r2, [r4, r0] - ldr r0, [r4, r1] - mov r1, #0x3c - sub r0, r2, r0 - bl sub_020E1F6C - mov r1, #0x25 - lsl r1, r1, #4 - ldr r2, [r4, r1] - add r0, r2, r0 - str r0, [r4, r1] - add r0, r1, #0 - add r0, #0x20 - add r1, #0x14 - ldr r2, [r4, r0] - ldr r0, [r4, r1] - mov r1, #0x3c - sub r0, r2, r0 - bl sub_020E1F6C - mov r1, #0x95 - lsl r1, r1, #2 - ldr r2, [r4, r1] - add r0, r2, r0 - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D1C10 - - thumb_func_start ov77_021D1CC0 -ov77_021D1CC0: ; 0x021D1CC0 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r4, r1, #0 - mov r1, #5 - add r5, r0, #0 - bl sub_02019044 - ldr r6, _021D1D3C ; =0x021D73C4 - add r3, sp, #0x10 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r5, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x17 - add r2, r5, #0 - mov r3, #5 - str r4, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x19 - add r2, r5, #0 - mov r3, #5 - str r4, [sp, #0xc] - bl sub_02006E60 - ldr r0, _021D1D40 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - mov r3, #0xa - ldr r0, _021D1D44 ; =0x04001050 - mov r1, #2 - mov r2, #8 - str r3, [sp] - bl sub_020BF55C - mov r0, #2 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - nop -_021D1D3C: .word 0x021D73C4 -_021D1D40: .word 0x04000050 -_021D1D44: .word 0x04001050 - thumb_func_end ov77_021D1CC0 - - thumb_func_start ov77_021D1D48 -ov77_021D1D48: ; 0x021D1D48 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r5, r1, #0 - mov r1, #4 - add r4, r0, #0 - bl sub_02019044 - ldr r6, _021D1DE4 ; =0x021D7338 - add r3, sp, #0x10 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x16 - add r2, r4, #0 - mov r3, #4 - str r5, [sp, #0xc] - bl sub_02006E60 - ldr r0, _021D1DE8 ; =0x04001008 - mov r2, #3 - ldrh r1, [r0] - bic r1, r2 - strh r1, [r0] - ldrh r3, [r0, #2] - mov r1, #1 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #2] - ldrh r1, [r0, #4] - bic r1, r2 - strh r1, [r0, #4] - ldrh r3, [r0, #6] - mov r1, #2 - bic r3, r2 - orr r1, r3 - strh r1, [r0, #6] - mov r2, #0 - add r0, r4, #0 - mov r1, #6 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - mov r1, #6 - mov r2, #3 - mov r3, #1 - bl sub_02019184 - mov r0, #0xa - str r0, [sp] - ldr r0, _021D1DEC ; =0x04001050 - mov r1, #3 - mov r2, #0xc - mov r3, #0x1a - bl sub_020BF55C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D1DE4: .word 0x021D7338 -_021D1DE8: .word 0x04001008 -_021D1DEC: .word 0x04001050 - thumb_func_end ov77_021D1D48 - - thumb_func_start ov77_021D1DF0 -ov77_021D1DF0: ; 0x021D1DF0 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r4, r0, #0 - add r7, r1, #0 - add r5, r2, #0 - mov r6, #0 - bl ov77_021D11A4 - cmp r0, #1 - bne _021D1E22 - mov r0, #0x2a - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - add r1, r6, #0 - add r0, r0, #4 - str r1, [r4, r0] - bl sub_0200F2C0 - mov r0, #3 - bl sub_0200ABB0 - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_021D1E22: - ldr r0, [r4, #0] - cmp r0, #0xa - bhi _021D1EAC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D1E34: ; jump table - .short _021D1E4A - _021D1E34 - 2 ; case 0 - .short _021D1E78 - _021D1E34 - 2 ; case 1 - .short _021D1E98 - _021D1E34 - 2 ; case 2 - .short _021D1EFA - _021D1E34 - 2 ; case 3 - .short _021D1F3A - _021D1E34 - 2 ; case 4 - .short _021D1F54 - _021D1E34 - 2 ; case 5 - .short _021D1FAC - _021D1E34 - 2 ; case 6 - .short _021D1FFE - _021D1E34 - 2 ; case 7 - .short _021D1FE8 - _021D1E34 - 2 ; case 8 - .short _021D2028 - _021D1E34 - 2 ; case 9 - .short _021D20A2 - _021D1E34 - 2 ; case 10 -_021D1E4A: - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - add r0, r6, #0 - ldr r1, _021D20D8 ; =0x0000029A - ldr r2, _021D20DC ; =0x0000010B - strh r0, [r4, r1] - sub r1, #0x6e - strh r2, [r4, r1] - mov r1, #0xf - str r1, [sp] - mov r1, #3 - str r1, [sp, #4] - mov r1, #1 - add r2, r1, #0 - add r3, r0, #0 - str r5, [sp, #8] - bl sub_0200F174 - mov r0, #1 - str r0, [r4, #0] - b _021D20BC -_021D1E78: - bl sub_0200F2AC - cmp r0, #1 - bne _021D1EAC - mov r0, #0x8b - lsl r0, r0, #2 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _021D1E90 - sub r1, r1, #1 - strh r1, [r4, r0] - b _021D20BC -_021D1E90: - mov r1, #2 - strh r1, [r4, r0] - str r1, [r4, #0] - b _021D20BC -_021D1E98: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _021D1EAC - mov r0, #2 - bl sub_0200AC1C - cmp r0, #1 - beq _021D1EAE -_021D1EAC: - b _021D20BC -_021D1EAE: - mov r0, #0x8b - lsl r0, r0, #2 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _021D1EF0 - mov r0, #1 - str r0, [sp] - mov r0, #0xa - mov r1, #0x10 - add r2, r6, #0 - mov r3, #7 - bl sub_0200AAE0 - mov r0, #2 - str r0, [sp] - mov r0, #0xa - mov r1, #0x10 - add r2, r6, #0 - mov r3, #0x27 - bl sub_0200AAE0 - ldr r1, _021D20D8 ; =0x0000029A - mov r0, #2 - strh r0, [r4, r1] - add r0, r1, #0 - sub r0, #0x6e - ldrh r0, [r4, r0] - sub r1, #0x6e - sub r0, r0, #1 - strh r0, [r4, r1] - mov r0, #3 - str r0, [r4, #0] - b _021D20BC -_021D1EF0: - add r1, r6, #0 - strh r1, [r4, r0] - mov r0, #4 - str r0, [r4, #0] - b _021D20BC -_021D1EFA: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _021D1FB4 - mov r0, #2 - bl sub_0200AC1C - cmp r0, #1 - bne _021D1FB4 - mov r0, #1 - str r0, [sp] - mov r0, #0xa - add r1, r6, #0 - mov r2, #0x10 - mov r3, #7 - bl sub_0200AAE0 - mov r0, #2 - str r0, [sp] - mov r0, #0xa - add r1, r6, #0 - mov r2, #0x10 - mov r3, #0x27 - bl sub_0200AAE0 - ldr r0, _021D20D8 ; =0x0000029A - mov r1, #3 - strh r1, [r4, r0] - mov r0, #2 - str r0, [r4, #0] - b _021D20BC -_021D1F3A: - mov r0, #0x8b - lsl r0, r0, #2 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _021D1F4A - sub r1, r1, #1 - strh r1, [r4, r0] - b _021D20BC -_021D1F4A: - mov r1, #1 - strh r1, [r4, r0] - mov r0, #5 - str r0, [r4, #0] - b _021D20BC -_021D1F54: - bl sub_0200F2AC - cmp r0, #1 - bne _021D1FB4 - mov r0, #0x8b - lsl r0, r0, #2 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _021D1F94 - mov r0, #5 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - add r0, r6, #0 - ldr r3, _021D20E0 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - str r5, [sp, #8] - bl sub_0200F174 - ldr r1, _021D20D8 ; =0x0000029A - mov r0, #2 - strh r0, [r4, r1] - add r0, r1, #0 - sub r0, #0x6e - ldrh r0, [r4, r0] - sub r1, #0x6e - sub r0, r0, #1 - strh r0, [r4, r1] - mov r0, #6 - str r0, [r4, #0] - b _021D20BC -_021D1F94: - mov r1, #0xa - strh r1, [r4, r0] - mov r1, #8 - str r1, [r4, #0] - mov r1, #1 - add r0, #0x74 - str r1, [r4, r0] - add r0, r6, #0 - add r1, r0, #0 - bl sub_0200F344 - b _021D20BC -_021D1FAC: - bl sub_0200F2AC - cmp r0, #1 - beq _021D1FB6 -_021D1FB4: - b _021D20BC -_021D1FB6: - mov r0, #0xa9 - add r1, r6, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #2 - mov r1, #1 - bl sub_0201FF74 - add r0, r4, #0 - mov r1, #2 - add r0, #0xb0 - str r1, [r0, #0] - mov r0, #0x10 - str r0, [sp] - mov r0, #3 - mov r1, #1 - str r0, [sp, #4] - ldr r3, _021D20E0 ; =0x00007FFF - add r2, r1, #0 - str r5, [sp, #8] - bl sub_0200F174 - mov r0, #5 - str r0, [r4, #0] - b _021D20BC -_021D1FE8: - mov r0, #0x8b - lsl r0, r0, #2 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _021D1FF8 - sub r1, r1, #1 - strh r1, [r4, r0] - b _021D20BC -_021D1FF8: - mov r0, #7 - str r0, [r4, #0] - b _021D20BC -_021D1FFE: - mov r0, #0x30 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #3 - add r2, r1, #0 - add r3, r6, #0 - str r5, [sp, #8] - bl sub_0200F174 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #9 - str r0, [r4, #0] - mov r0, #0xaa - add r1, r6, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - b _021D20BC -_021D2028: - add r0, r4, #0 - bl ov77_021D1C10 - add r1, r4, #0 - mov r0, #9 - add r1, #0xa8 - lsl r0, r0, #6 - ldr r1, [r1, #0] - add r0, r4, r0 - bl sub_02020ACC - add r1, r4, #0 - mov r0, #0x93 - add r1, #0xa8 - lsl r0, r0, #2 - ldr r1, [r1, #0] - add r0, r4, r0 - bl sub_02020ADC - mov r0, #0xaa - lsl r0, r0, #2 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r0, [r4, r0] - cmp r0, #0x3c - blt _021D20BC - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - add r0, r7, #0 - add r1, r5, #0 - bl ov77_021D1CC0 - mov r0, #0x10 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r1, #1 - ldr r3, _021D20E0 ; =0x00007FFF - mov r0, #4 - add r2, r1, #0 - str r5, [sp, #8] - bl sub_0200F174 - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x8b - mov r1, #0x5a - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #0xa - str r0, [r4, #0] - b _021D20BC -_021D20A2: - mov r0, #0x8b - lsl r0, r0, #2 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _021D20B2 - sub r1, r1, #1 - strh r1, [r4, r0] - b _021D20BC -_021D20B2: - bl sub_0200F2AC - cmp r0, #1 - bne _021D20BC - mov r6, #1 -_021D20BC: - add r0, r4, #0 - bl ov77_021D2438 - add r0, r4, #0 - add r1, r4, #4 - bl ov77_021D1984 - add r0, r4, #0 - add r1, r4, #4 - bl ov77_021D1568 - add r0, r6, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D20D8: .word 0x0000029A -_021D20DC: .word 0x0000010B -_021D20E0: .word 0x00007FFF - thumb_func_end ov77_021D1DF0 - - thumb_func_start ov77_021D20E4 -ov77_021D20E4: ; 0x021D20E4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r6, r1, #0 - add r7, r2, #0 - mov r4, #0 - cmp r0, #0 - beq _021D20FA - cmp r0, #1 - beq _021D2174 - b _021D21B0 -_021D20FA: - add r1, r5, #0 - mov r0, #0xa - add r1, #0xa8 - lsl r0, r0, #6 - ldr r1, [r1, #0] - add r0, r5, r0 - bl sub_02020ACC - add r1, r5, #0 - mov r0, #0x9a - add r1, #0xa8 - lsl r0, r0, #2 - ldr r1, [r1, #0] - add r0, r5, r0 - bl sub_02020ADC - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - add r0, r4, #0 - bl sub_0200F338 - mov r0, #1 - bl sub_0200F338 - add r0, r5, #0 - mov r1, #2 - add r0, #0xb0 - str r1, [r0, #0] - ldr r1, _021D21BC ; =0x00007FFF - mov r0, #1 - bl sub_020AF558 - add r0, r6, #0 - add r1, r7, #0 - bl ov77_021D1CC0 - mov r0, #0x8b - add r1, r4, #0 - lsl r0, r0, #2 - strh r1, [r5, r0] - mov r0, #1 - str r0, [r5, #0] - b _021D21B0 -_021D2174: - mov r0, #0x96 - lsl r0, r0, #2 - ldr r1, [r5, r0] - cmp r1, #1 - bne _021D219C - sub r0, #0x2c - ldrh r0, [r5, r0] - cmp r0, #0 - bne _021D2190 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - b _021D219C -_021D2190: - cmp r0, #0x10 - bne _021D219C - mov r0, #1 - add r1, r4, #0 - bl sub_0201FF74 -_021D219C: - mov r1, #0x8b - lsl r1, r1, #2 - ldrh r0, [r5, r1] - mov r4, #1 - add r0, r0, #1 - strh r0, [r5, r1] - ldrh r2, [r5, r1] - mov r0, #0x1f - and r0, r2 - strh r0, [r5, r1] -_021D21B0: - add r0, r5, #0 - add r1, r5, #4 - bl ov77_021D1568 - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D21BC: .word 0x00007FFF - thumb_func_end ov77_021D20E4 - - thumb_func_start ov77_021D21C0 -ov77_021D21C0: ; 0x021D21C0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0xa8 - ldr r0, [r0, #0] - add r4, r1, #0 - add r6, r2, #0 - bl sub_020203B8 - add r0, r5, #0 - add r0, #0xac - ldr r0, [r0, #0] - bl sub_020203B8 - add r0, r5, #4 - bl ov77_021D14E4 - add r0, r4, #0 - add r1, r6, #0 - add r2, r5, #0 - bl ov77_021D2428 - ldr r2, _021D2208 ; =0x04000050 - mov r3, #0 - strh r3, [r2] - add r2, #0x10 - ldrh r1, [r2] - ldr r0, _021D220C ; =0x0000CFDF - and r0, r1 - strh r0, [r2] - ldr r0, _021D2210 ; =0x021BF6DC - strb r3, [r0, #5] - bl sub_0201FFE8 - mov r0, #1 - pop {r4, r5, r6, pc} - nop -_021D2208: .word 0x04000050 -_021D220C: .word 0x0000CFDF -_021D2210: .word 0x021BF6DC - thumb_func_end ov77_021D21C0 - - thumb_func_start ov77_021D2214 -ov77_021D2214: ; 0x021D2214 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r5, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - add r4, r1, #0 - str r0, [sp, #8] - add r6, r2, #0 - mov r0, #0x30 - mov r1, #0x17 - add r2, r5, #0 - mov r3, #7 - str r4, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x1a - add r2, r5, #0 - mov r3, #3 - str r4, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x18 - add r2, r5, #0 - mov r3, #7 - str r4, [sp, #0xc] - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x1b - add r2, r5, #0 - mov r3, #3 - str r4, [sp, #0xc] - bl sub_02006E60 - mov r3, #0 - str r3, [sp] - mov r0, #0x30 - mov r1, #7 - mov r2, #4 - str r4, [sp, #4] - bl sub_02006E84 - mov r2, #0 - str r2, [sp] - mov r0, #0x30 - mov r1, #6 - add r3, r2, #0 - str r4, [sp, #4] - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0xc - add r2, r5, #0 - mov r3, #6 - str r4, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - mov r3, #1 - mov r0, #0x30 - mov r1, #0xb - mov r2, #6 - lsl r3, r3, #0xe - str r4, [sp, #4] - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #0x16 - add r2, r5, #0 - mov r3, #6 - str r4, [sp, #0xc] - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - mov r1, #0xe - add r2, r5, #0 - mov r3, #5 - str r4, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - mov r0, #0x80 - mov r1, #0xd - mov r2, #6 - lsl r3, r0, #6 - str r4, [sp, #4] - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x80 - mov r1, #0xc - add r2, r5, #0 - mov r3, #5 - str r4, [sp, #0xc] - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #5 - add r2, r5, #0 - mov r3, #1 - str r4, [sp, #0xc] - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x30 - mov r1, #3 - add r2, r5, #0 - mov r3, #1 - str r4, [sp, #0xc] - bl sub_02006E60 - mov r0, #0x60 - str r0, [sp] - mov r0, #0x30 - mov r1, #4 - mov r2, #0 - mov r3, #0x20 - str r4, [sp, #4] - bl sub_02006E84 - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - add r3, r4, #0 - bl sub_02019690 - ldr r2, _021D2418 ; =0x00000261 - mov r0, #1 - mov r1, #0x1a - add r3, r4, #0 - bl sub_0200B144 - add r7, r0, #0 - mov r0, #0x40 - add r1, r4, #0 - bl sub_02023790 - mov r1, #0x23 - lsl r1, r1, #4 - add r4, r0, #0 - ldr r2, _021D241C ; =0x021D72D0 - add r0, r5, #0 - add r1, r6, r1 - bl sub_0201A8D4 - mov r1, #0 - mov r0, #0xe0 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0x23 - lsl r0, r0, #4 - add r0, r6, r0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - add r0, r7, #0 - mov r1, #0 - add r2, r4, #0 - bl sub_0200B1B8 - ldr r3, _021D2420 ; =0x00000237 - mov r0, #0 - ldrb r3, [r6, r3] - add r1, r4, #0 - mov r2, #1 - lsl r3, r3, #3 - bl sub_02002EEC - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - ldr r0, _021D2424 ; =0x00010100 - str r1, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #0x23 - lsl r0, r0, #4 - str r1, [sp, #0x10] - add r0, r6, r0 - add r2, r4, #0 - str r1, [sp, #0x14] - bl sub_0201D7E0 - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_0200B190 - mov r1, #0x15 - add r0, sp, #0x18 - strh r1, [r0, #2] - strh r1, [r0] - add r1, sp, #0x18 - mov r0, #4 - add r1, #2 - mov r2, #2 - mov r3, #0x42 - bl sub_0201972C - mov r0, #4 - add r1, sp, #0x18 - mov r2, #2 - mov r3, #0x44 - bl sub_0201972C - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2418: .word 0x00000261 -_021D241C: .word 0x021D72D0 -_021D2420: .word 0x00000237 -_021D2424: .word 0x00010100 - thumb_func_end ov77_021D2214 - - thumb_func_start ov77_021D2428 -ov77_021D2428: ; 0x021D2428 - mov r0, #0x23 - lsl r0, r0, #4 - ldr r3, _021D2434 ; =sub_0201A8FC - add r0, r2, r0 - bx r3 - nop -_021D2434: .word sub_0201A8FC - thumb_func_end ov77_021D2428 - - thumb_func_start ov77_021D2438 -ov77_021D2438: ; 0x021D2438 - push {r4, lr} - ldr r1, _021D24C4 ; =0x0000029A - ldrh r2, [r0, r1] - cmp r2, #3 - bhi _021D2498 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D244E: ; jump table - .short _021D2456 - _021D244E - 2 ; case 0 - .short _021D2498 - _021D244E - 2 ; case 1 - .short _021D2462 - _021D244E - 2 ; case 2 - .short _021D247E - _021D244E - 2 ; case 3 -_021D2456: - mov r3, #5 - sub r2, r1, #2 - strh r3, [r0, r2] - mov r2, #1 - strh r2, [r0, r1] - b _021D2498 -_021D2462: - sub r2, r1, #2 - ldrh r2, [r0, r2] - add r3, r2, #2 - sub r2, r1, #2 - strh r3, [r0, r2] - ldrh r2, [r0, r2] - cmp r2, #0x1f - blo _021D2498 - mov r3, #0x1f - sub r2, r1, #2 - strh r3, [r0, r2] - mov r2, #1 - strh r2, [r0, r1] - b _021D2498 -_021D247E: - sub r2, r1, #2 - ldrh r2, [r0, r2] - sub r3, r2, #2 - sub r2, r1, #2 - strh r3, [r0, r2] - ldrh r2, [r0, r2] - cmp r2, #5 - bhi _021D2498 - mov r3, #5 - sub r2, r1, #2 - strh r3, [r0, r2] - mov r2, #1 - strh r2, [r0, r1] -_021D2498: - mov r1, #0xa6 - lsl r1, r1, #2 - ldrh r3, [r0, r1] - mov r1, #0x1f - lsl r1, r1, #0xa - lsl r2, r3, #0xa - and r1, r2 - add r4, r3, #0 - mov r2, #0x1f - and r4, r2 - lsl r3, r3, #5 - lsl r2, r2, #5 - and r2, r3 - orr r2, r4 - orr r1, r2 - lsl r1, r1, #0x10 - mov r0, #1 - lsr r1, r1, #0x10 - bl sub_020AF558 - pop {r4, pc} - nop -_021D24C4: .word 0x0000029A - thumb_func_end ov77_021D2438 - - thumb_func_start ov77_021D24C8 -ov77_021D24C8: ; 0x021D24C8 - push {r4, r5, r6, lr} - sub sp, #0x18 - mov r1, #0x97 - lsl r1, r1, #2 - add r4, r0, #0 - mov r5, #0 - mov r3, #3 - mov r2, #0x96 - str r5, [r4, r1] - lsl r3, r3, #0x12 - add r0, r1, #4 - str r3, [r4, r0] - add r0, r1, #0 - lsl r2, r2, #0xe - add r0, #8 - str r2, [r4, r0] - add r0, r1, #0 - add r6, r1, #0 - ldr r2, _021D2590 ; =0xFFFC0000 - add r0, #0xc - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0x10 - str r3, [r4, r0] - mov r2, #0x79 - add r0, r1, #0 - lsl r2, r2, #0xe - add r0, #0x14 - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0x18 - str r5, [r4, r0] - mov r2, #0x19 - add r0, r1, #0 - lsl r2, r2, #0xe - add r0, #0x1c - str r2, [r4, r0] - ldr r0, _021D2594 ; =0xFFFEE000 - add r6, #0x20 - str r0, [r4, r6] - add r6, r1, #0 - add r6, #0x24 - str r5, [r4, r6] - add r5, r1, #0 - add r5, #0x28 - str r2, [r4, r5] - add r2, r1, #0 - add r2, #0x2c - str r0, [r4, r2] - add r0, r1, #0 - ldr r2, _021D2598 ; =0x000008DB - add r0, #0x30 - strh r2, [r4, r0] - add r0, r1, #0 - ldr r2, _021D259C ; =0xFFFFF85F - add r0, #0x32 - strh r2, [r4, r0] - add r2, r1, #0 - ldr r0, _021D25A0 ; =0xFFFFF513 - add r2, #0x34 - strh r0, [r4, r2] - add r2, r1, #0 - ldr r5, _021D25A4 ; =0xFFFFF725 - add r2, #0x36 - strh r5, [r4, r2] - add r2, r1, #0 - ldr r5, _021D25A8 ; =0x000007A1 - add r2, #0x38 - strh r5, [r4, r2] - add r2, r1, #0 - add r2, #0x3a - strh r0, [r4, r2] - add r0, r1, #0 - lsr r2, r3, #6 - add r0, #0x40 - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0x24 - add r1, #0xc - add r0, r4, r0 - add r1, r4, r1 - add r2, sp, #0xc - bl sub_020BD1B0 - add r0, sp, #0xc - add r1, sp, #0 - bl sub_020BD3E4 - mov r0, #0xa3 - ldr r1, [sp] - lsl r0, r0, #2 - strh r1, [r4, r0] - add r1, r0, #2 - ldr r2, [sp, #4] - add r0, r0, #4 - strh r2, [r4, r1] - ldr r1, [sp, #8] - strh r1, [r4, r0] - add sp, #0x18 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D2590: .word 0xFFFC0000 -_021D2594: .word 0xFFFEE000 -_021D2598: .word 0x000008DB -_021D259C: .word 0xFFFFF85F -_021D25A0: .word 0xFFFFF513 -_021D25A4: .word 0xFFFFF725 -_021D25A8: .word 0x000007A1 - thumb_func_end ov77_021D24C8 - - thumb_func_start ov77_021D25AC -ov77_021D25AC: ; 0x021D25AC - bx lr - ; .align 2, 0 - thumb_func_end ov77_021D25AC - - thumb_func_start ov77_021D25B0 -ov77_021D25B0: ; 0x021D25B0 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D25CC ; =0x021D76F4 - add r3, sp, #0 - mov r2, #5 -_021D25BA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D25BA - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D25CC: .word 0x021D76F4 - thumb_func_end ov77_021D25B0 - - thumb_func_start ov77_021D25D0 -ov77_021D25D0: ; 0x021D25D0 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D25EC ; =0x021D771C - add r3, sp, #0 - mov r2, #5 -_021D25DA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D25DA - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D25EC: .word 0x021D771C - thumb_func_end ov77_021D25D0 - - thumb_func_start ov77_021D25F0 -ov77_021D25F0: ; 0x021D25F0 - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D260C ; =0x021D7744 - add r3, sp, #0 - mov r2, #5 -_021D25FA: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D25FA - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D260C: .word 0x021D7744 - thumb_func_end ov77_021D25F0 - - thumb_func_start ov77_021D2610 -ov77_021D2610: ; 0x021D2610 - push {r3, r4, r5, lr} - sub sp, #0xb8 - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02018340 - add r3, sp, #0xa8 - ldr r5, _021D2708 ; =0x021D74CC - str r0, [r4, #0xc] - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D270C ; =0x021D7510 - add r3, sp, #0x8c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2710 ; =0x021D752C - add r3, sp, #0x70 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2714 ; =0x021D7548 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2718 ; =0x021D75F0 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D271C ; =0x021D75D4 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2720 ; =0x021D7580 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #7 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - add sp, #0xb8 - pop {r3, r4, r5, pc} - nop -_021D2708: .word 0x021D74CC -_021D270C: .word 0x021D7510 -_021D2710: .word 0x021D752C -_021D2714: .word 0x021D7548 -_021D2718: .word 0x021D75F0 -_021D271C: .word 0x021D75D4 -_021D2720: .word 0x021D7580 - thumb_func_end ov77_021D2610 - - thumb_func_start ov77_021D2724 -ov77_021D2724: ; 0x021D2724 - push {r4, r5, lr} - sub sp, #0xd4 - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02018340 - add r3, sp, #0x70 - ldr r5, _021D2810 ; =0x021D74AC - str r0, [r4, #0xc] - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D2814 ; =0x021D75B8 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2818 ; =0x021D760C - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D281C ; =0x021D7628 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2820 ; =0x021D7644 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D2824 ; =0x021D7838 - add r3, sp, #0x80 - mov r2, #0xa -_021D27CC: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D27CC - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - add r2, sp, #0x80 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - mov r1, #6 - add r2, sp, #0x9c - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - mov r1, #7 - add r2, sp, #0xb8 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - add sp, #0xd4 - pop {r4, r5, pc} - ; .align 2, 0 -_021D2810: .word 0x021D74AC -_021D2814: .word 0x021D75B8 -_021D2818: .word 0x021D760C -_021D281C: .word 0x021D7628 -_021D2820: .word 0x021D7644 -_021D2824: .word 0x021D7838 - thumb_func_end ov77_021D2724 - - thumb_func_start ov77_021D2828 -ov77_021D2828: ; 0x021D2828 - push {r3, r4, r5, lr} - sub sp, #0xa8 - mov r1, #0 - add r4, r0, #0 - bl ov77_021D361C - ldr r5, _021D28EC ; =0x021D767C - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D28F0 ; =0x021D7698 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D28F4 ; =0x021D76B4 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - ldr r5, _021D28F8 ; =0x021D77E4 - add r3, sp, #0x54 - mov r2, #0xa -_021D289A: - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D289A - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - add r2, sp, #0x54 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - mov r1, #6 - add r2, sp, #0x70 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - mov r1, #7 - add r2, sp, #0x8c - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - ldr r0, _021D28FC ; =0x0000028E - mov r1, #1 - strb r1, [r4, r0] - add sp, #0xa8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D28EC: .word 0x021D767C -_021D28F0: .word 0x021D7698 -_021D28F4: .word 0x021D76B4 -_021D28F8: .word 0x021D77E4 -_021D28FC: .word 0x0000028E - thumb_func_end ov77_021D2828 - - thumb_func_start ov77_021D2900 -ov77_021D2900: ; 0x021D2900 - push {r3, r4, r5, lr} - sub sp, #0x48 - add r4, r0, #0 - bl ov77_021D35B8 - add r0, r4, #0 - bl ov77_021D2828 - ldr r5, _021D29F0 ; =0x021D74DC - add r3, sp, #0x38 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D29F4 ; =0x021D7564 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - add r3, r1, #0 - bl sub_020183C4 - ldr r5, _021D29F8 ; =0x021D759C - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - mov r1, #0 - ldr r0, [r4, #0xc] - add r2, r1, #0 - add r3, r1, #0 - bl sub_02019184 - mov r1, #0 - ldr r0, [r4, #0xc] - mov r2, #3 - add r3, r1, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r4, #0xc] - mov r1, #4 - add r3, r2, #0 - bl sub_02019184 - ldr r0, [r4, #0xc] - mov r1, #4 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #2 - mov r1, #1 - bl sub_0201FF74 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r0, #8 - mov r1, #1 - bl sub_0201FF0C - mov r0, #8 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r0, _021D29FC ; =0x0000028E - mov r1, #2 - strb r1, [r4, r0] - add sp, #0x48 - pop {r3, r4, r5, pc} - nop -_021D29F0: .word 0x021D74DC -_021D29F4: .word 0x021D7564 -_021D29F8: .word 0x021D759C -_021D29FC: .word 0x0000028E - thumb_func_end ov77_021D2900 - - thumb_func_start ov77_021D2A00 -ov77_021D2A00: ; 0x021D2A00 - push {r4, r5, lr} - sub sp, #0x2c - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_02018340 - add r3, sp, #0x1c - ldr r5, _021D2A50 ; =0x021D74BC - str r0, [r4, #0xc] - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _021D2A54 ; =0x021D7660 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - ldr r0, [r4, #0xc] - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0 - bl sub_0201975C - add sp, #0x2c - pop {r4, r5, pc} - nop -_021D2A50: .word 0x021D74BC -_021D2A54: .word 0x021D7660 - thumb_func_end ov77_021D2A00 - - thumb_func_start ov77_021D2A58 -ov77_021D2A58: ; 0x021D2A58 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #4 - str r0, [sp] - ldr r0, _021D2A94 ; =ov77_021D2AA0 - mov r1, #0 - str r0, [sp, #4] - ldr r0, [r4, #0] - mov r2, #1 - add r3, r1, #0 - bl sub_02024220 - str r0, [r4, #0x10] - ldr r3, _021D2A98 ; =0x02100DEC - mov r0, #2 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _021D2A9C ; =0x02100DF4 - mov r0, #0x80 - ldr r3, [r3, #0] - mov r1, #0 - mov r2, #1 - blx r3 - add sp, #8 - pop {r4, pc} - nop -_021D2A94: .word ov77_021D2AA0 -_021D2A98: .word 0x02100DEC -_021D2A9C: .word 0x02100DF4 - thumb_func_end ov77_021D2A58 - - thumb_func_start ov77_021D2AA0 -ov77_021D2AA0: ; 0x021D2AA0 - push {r3, lr} - bl sub_020B2628 - ldr r0, _021D2B14 ; =0x04000008 - mov r1, #3 - ldrh r2, [r0] - bic r2, r1 - mov r1, #1 - orr r1, r2 - strh r1, [r0] - add r0, #0x58 - ldrh r2, [r0] - ldr r1, _021D2B18 ; =0xFFFFCFFD - and r2, r1 - strh r2, [r0] - ldrh r3, [r0] - add r2, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _021D2B1C ; =0x0000CFFB - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #8 - orr r2, r3 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldr r0, _021D2B20 ; =0x021D74EC - bl sub_020BFD2C - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r0, #0 - ldr r2, _021D2B24 ; =0x00007FFF - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _021D2B28 ; =0xBFFF0000 - ldr r0, _021D2B2C ; =0x04000580 - str r1, [r0, #0] - pop {r3, pc} - nop -_021D2B14: .word 0x04000008 -_021D2B18: .word 0xFFFFCFFD -_021D2B1C: .word 0x0000CFFB -_021D2B20: .word 0x021D74EC -_021D2B24: .word 0x00007FFF -_021D2B28: .word 0xBFFF0000 -_021D2B2C: .word 0x04000580 - thumb_func_end ov77_021D2AA0 - - thumb_func_start ov77_021D2B30 -ov77_021D2B30: ; 0x021D2B30 - ldr r3, _021D2B34 ; =sub_0200A858 - bx r3 - ; .align 2, 0 -_021D2B34: .word sub_0200A858 - thumb_func_end ov77_021D2B30 - - thumb_func_start ov77_021D2B38 -ov77_021D2B38: ; 0x021D2B38 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r0, [sp] - ldr r0, _021D2C64 ; =0x0000025B - add r5, #0x34 - ldrb r0, [r5, r0] - cmp r0, #1 - bne _021D2B84 - ldr r0, _021D2C68 ; =0x021BF6DC - mov r1, #1 - strb r1, [r0, #5] - bl sub_0201FFE8 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #8 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - ldr r1, _021D2C64 ; =0x0000025B - mov r0, #0 - strb r0, [r5, r1] - ldr r1, [r5, #0x28] - bl sub_02020854 - ldr r0, [r5, #0x28] - bl sub_020203D4 -_021D2B84: - ldr r0, [sp] - ldr r0, [r0, #0xc] - cmp r0, #0 - beq _021D2B90 - bl sub_0201C2B8 -_021D2B90: - ldr r7, _021D2C6C ; =0x00000247 - mov r4, #0 - add r6, r7, #1 -_021D2B96: - ldr r0, _021D2C6C ; =0x00000247 - ldrb r1, [r5, r0] - mov r0, #1 - tst r0, r1 - beq _021D2BAA - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - mov r1, #1 - bl sub_02019120 -_021D2BAA: - mov r0, #0x92 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - mov r0, #1 - tst r0, r1 - beq _021D2BC0 - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - mov r1, #0 - bl sub_02019120 -_021D2BC0: - ldrb r0, [r5, r7] - add r4, r4, #1 - asr r0, r0, #1 - strb r0, [r5, r7] - ldrb r0, [r5, r6] - asr r0, r0, #1 - strb r0, [r5, r6] - cmp r4, #8 - blt _021D2B96 - mov r2, #0x25 - lsl r2, r2, #4 - sub r1, r2, #2 - ldrsh r6, [r5, r1] - sub r1, r2, #6 - ldrsh r1, [r5, r1] - sub r4, r2, #4 - ldrsh r4, [r5, r4] - lsl r3, r1, #8 - mov r1, #0xff - lsl r1, r1, #8 - lsl r4, r4, #0x18 - ldrsh r0, [r5, r2] - and r3, r1 - lsr r4, r4, #0x18 - orr r3, r4 - ldr r4, _021D2C70 ; =0x04000040 - lsl r0, r0, #0x18 - strh r3, [r4] - lsl r3, r6, #8 - and r3, r1 - lsr r0, r0, #0x18 - orr r0, r3 - strh r0, [r4, #4] - add r0, r2, #0 - add r0, #8 - ldrsh r4, [r5, r0] - add r0, r2, #6 - ldrsh r3, [r5, r0] - add r0, r2, #2 - add r6, r2, #4 - ldrsh r0, [r5, r0] - ldrsh r6, [r5, r6] - lsl r3, r3, #8 - lsl r0, r0, #8 - lsl r6, r6, #0x18 - and r0, r1 - lsr r6, r6, #0x18 - orr r6, r0 - ldr r0, _021D2C74 ; =0x04001040 - and r3, r1 - lsl r1, r4, #0x18 - lsr r1, r1, #0x18 - strh r6, [r0] - orr r1, r3 - sub r2, #0xb - strh r1, [r0, #4] - ldrb r0, [r5, r2] - cmp r0, #1 - bne _021D2C40 - bl ov77_021D2C80 - ldr r0, _021D2C78 ; =0x00000245 - mov r1, #0 - strb r1, [r5, r0] -_021D2C40: - ldr r0, _021D2C7C ; =0x00000246 - ldrb r0, [r5, r0] - cmp r0, #1 - bne _021D2C52 - bl ov77_021D2CE8 - ldr r0, _021D2C7C ; =0x00000246 - mov r1, #0 - strb r1, [r5, r0] -_021D2C52: - bl sub_0201DCAC - bl sub_0200A858 - ldr r0, [sp] - ldr r0, [r0, #0x50] - bl ov77_021D6E40 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2C64: .word 0x0000025B -_021D2C68: .word 0x021BF6DC -_021D2C6C: .word 0x00000247 -_021D2C70: .word 0x04000040 -_021D2C74: .word 0x04001040 -_021D2C78: .word 0x00000245 -_021D2C7C: .word 0x00000246 - thumb_func_end ov77_021D2B38 - - thumb_func_start ov77_021D2C80 -ov77_021D2C80: ; 0x021D2C80 - push {r3, r4, r5, r6} - mov r0, #1 - lsl r0, r0, #0x1a - ldr r1, [r0, #0] - ldr r2, _021D2CE0 ; =0xFFFF1FFF - add r3, r1, #0 - add r5, r0, #0 - and r3, r2 - lsr r1, r0, #0xd - orr r1, r3 - str r1, [r0, #0] - add r5, #0x48 - ldrh r1, [r5] - mov r4, #0x3f - mov r3, #0x1f - bic r1, r4 - orr r1, r3 - mov r6, #0x20 - orr r1, r6 - strh r1, [r5] - add r0, #0x4a - ldrh r1, [r0] - mov r5, #0x11 - bic r1, r4 - orr r1, r5 - orr r1, r6 - strh r1, [r0] - ldr r0, _021D2CE4 ; =0x04001000 - ldr r1, [r0, #0] - and r2, r1 - lsr r1, r0, #0xd - orr r1, r2 - add r2, r0, #0 - str r1, [r0, #0] - add r2, #0x48 - ldrh r1, [r2] - add r0, #0x4a - bic r1, r4 - orr r1, r3 - orr r1, r6 - strh r1, [r2] - ldrh r1, [r0] - bic r1, r4 - orr r1, r5 - orr r1, r6 - strh r1, [r0] - pop {r3, r4, r5, r6} - bx lr - ; .align 2, 0 -_021D2CE0: .word 0xFFFF1FFF -_021D2CE4: .word 0x04001000 - thumb_func_end ov77_021D2C80 - - thumb_func_start ov77_021D2CE8 -ov77_021D2CE8: ; 0x021D2CE8 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D2D00 ; =0xFFFF1FFF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D2D04 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - bx lr - nop -_021D2D00: .word 0xFFFF1FFF -_021D2D04: .word 0x04001000 - thumb_func_end ov77_021D2CE8 - - thumb_func_start ov77_021D2D08 -ov77_021D2D08: ; 0x021D2D08 - push {r4, lr} - add r4, r0, #0 - bl sub_0200AB84 - ldr r1, _021D2D8C ; =0x00007FFF - mov r0, #0 - bl sub_0200F344 - ldr r1, _021D2D8C ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - mov r0, #0 - add r1, r0, #0 - bl sub_020177BC - bl sub_0201FF00 - bl sub_0201FF68 - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - mov r2, #0xa - mov r0, #3 - mov r1, #0x4c - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r1, #0x2b - add r0, r4, #0 - lsl r1, r1, #4 - mov r2, #0x4c - bl sub_0200681C - mov r2, #0x2b - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x4c - str r0, [r4, #0] - mov r1, #0 - mov r0, #0xab - str r1, [r4, #8] - lsl r0, r0, #2 - strb r1, [r4, r0] - ldr r0, _021D2D90 ; =0x021BF6DC - strb r1, [r0, #5] - bl sub_0201FFE8 - bl sub_0201D2D0 - str r0, [r4, #0x14] - mov r0, #0 - bl sub_0201D2DC - mov r0, #1 - pop {r4, pc} - nop -_021D2D8C: .word 0x00007FFF -_021D2D90: .word 0x021BF6DC - thumb_func_end ov77_021D2D08 - - thumb_func_start ov77_021D2D94 -ov77_021D2D94: ; 0x021D2D94 - push {r3, r4, r5, lr} - add r4, r1, #0 - bl sub_0200682C - add r5, r0, #0 - mov r0, #0xab - lsl r0, r0, #2 - ldrb r0, [r5, r0] - cmp r0, #0 - beq _021D2DD0 - ldr r0, _021D2E58 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _021D2DB8 - mov r0, #8 - tst r0, r1 - beq _021D2DD0 -_021D2DB8: - mov r0, #1 - str r0, [r5, #8] - ldr r1, _021D2E58 ; =0x021BF67C - mov r0, #0 - str r0, [r1, #0x6c] - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 -_021D2DD0: - ldr r0, [r4, #0] - cmp r0, #4 - bhi _021D2E3E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2DE2: ; jump table - .short _021D2DEC - _021D2DE2 - 2 ; case 0 - .short _021D2DFC - _021D2DE2 - 2 ; case 1 - .short _021D2E0E - _021D2DE2 - 2 ; case 2 - .short _021D2E20 - _021D2DE2 - 2 ; case 3 - .short _021D2E32 - _021D2DE2 - 2 ; case 4 -_021D2DEC: - mov r0, #0xab - lsl r0, r0, #2 - add r0, r5, r0 - str r0, [r5, #0x30] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D2E42 -_021D2DFC: - add r0, r5, #0 - bl ov77_021D2E9C - cmp r0, #0 - beq _021D2E42 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D2E42 -_021D2E0E: - add r0, r5, #0 - bl ov77_021D33F0 - cmp r0, #0 - beq _021D2E42 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D2E42 -_021D2E20: - add r0, r5, #0 - bl ov77_021D5254 - cmp r0, #0 - beq _021D2E42 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _021D2E42 -_021D2E32: - ldr r1, [r5, #4] - ldr r0, _021D2E5C ; =0x0000097E - cmp r1, r0 - blt _021D2E42 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2E3E: - bl sub_02022974 -_021D2E42: - ldr r0, [r5, #8] - cmp r0, #0 - beq _021D2E4C - mov r0, #1 - pop {r3, r4, r5, pc} -_021D2E4C: - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D2E58: .word 0x021BF67C -_021D2E5C: .word 0x0000097E - thumb_func_end ov77_021D2D94 - - thumb_func_start ov77_021D2E60 -ov77_021D2E60: ; 0x021D2E60 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - bne _021D2E76 - bl sub_0200F2C0 -_021D2E76: - ldr r0, [r4, #0x14] - bl sub_0201D2DC - add r0, r5, #0 - bl sub_02006830 - mov r0, #0x4c - bl sub_0201807C - ldr r0, _021D2E94 ; =0x0000004D - ldr r1, _021D2E98 ; =0x021D742C - bl sub_02000EC4 - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D2E94: .word 0x0000004D -_021D2E98: .word 0x021D742C - thumb_func_end ov77_021D2E60 - - thumb_func_start ov77_021D2E9C -ov77_021D2E9C: ; 0x021D2E9C - push {r4, lr} - add r1, r0, #0 - ldr r0, [r1, #8] - add r4, r1, #0 - add r4, #0x18 - cmp r0, #0 - beq _021D2EAE - mov r0, #3 - strb r0, [r4] -_021D2EAE: - ldrb r0, [r4] - cmp r0, #3 - bhi _021D2F06 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D2EC0: ; jump table - .short _021D2EC8 - _021D2EC0 - 2 ; case 0 - .short _021D2ED6 - _021D2EC0 - 2 ; case 1 - .short _021D2EE6 - _021D2EC0 - 2 ; case 2 - .short _021D2EFC - _021D2EC0 - 2 ; case 3 -_021D2EC8: - add r0, r1, #0 - bl ov77_021D2F0C - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _021D2F06 -_021D2ED6: - add r1, #0x18 - add r0, r1, #0 - bl ov77_021D2F38 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _021D2F06 -_021D2EE6: - add r0, r1, #0 - ldr r1, [r1, #4] - add r0, #0x18 - bl ov77_021D30D0 - cmp r0, #0 - beq _021D2F06 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _021D2F06 -_021D2EFC: - add r0, r1, #0 - bl ov77_021D3234 - mov r0, #1 - pop {r4, pc} -_021D2F06: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D2E9C - - thumb_func_start ov77_021D2F0C -ov77_021D2F0C: ; 0x021D2F0C - push {r4, lr} - add r4, r0, #0 - bl ov77_021D25B0 - add r0, r4, #0 - bl ov77_021D2610 - ldr r0, [r4, #0xc] - str r0, [r4, #0x24] - bl ov77_021D670C - str r0, [r4, #0x2c] - ldr r0, _021D2F34 ; =ov77_021D2B30 - add r1, r4, #0 - bl sub_02017798 - mov r0, #1 - strb r0, [r4, #0x1a] - pop {r4, pc} - nop -_021D2F34: .word ov77_021D2B30 - thumb_func_end ov77_021D2F0C - - thumb_func_start ov77_021D2F38 -ov77_021D2F38: ; 0x021D2F38 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x10 - mov r3, #2 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x10 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x11 - mov r3, #2 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x12 - mov r3, #6 - bl sub_02006E60 - mov r2, #0 - str r2, [sp] - mov r0, #0x4c - str r0, [sp, #4] - mov r0, #0x80 - mov r1, #0xf - add r3, r2, #0 - bl sub_02006E84 - mov r3, #0 - str r3, [sp] - mov r0, #0x4c - str r0, [sp, #4] - mov r0, #0x80 - mov r1, #0xf - mov r2, #4 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x30 - mov r1, #0xf - mov r3, #1 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x30 - mov r1, #0xd - mov r3, #1 - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x4c - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x30 - mov r1, #0xe - add r3, r2, #0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x13 - mov r3, #3 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x13 - mov r3, #7 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x72 - mov r3, #5 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x80 - mov r1, #0x71 - mov r3, #5 - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x4c - str r0, [sp, #4] - mov r0, #0x80 - mov r1, #0x73 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D30C8 ; =0x04000050 - mov r1, #2 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D30CC ; =0x04001050 - mov r1, #2 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - mov r0, #1 - add r1, r0, #0 - bl sub_020C12B4 - mov r0, #0 - bl sub_0200F338 - mov r0, #1 - bl sub_0200F338 - bl sub_0201FFD0 - add sp, #0x10 - pop {r4, pc} - nop -_021D30C8: .word 0x04000050 -_021D30CC: .word 0x04001050 - thumb_func_end ov77_021D2F38 - - thumb_func_start ov77_021D30D0 -ov77_021D30D0: ; 0x021D30D0 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x14] - add r5, r1, #0 - bl ov77_021D69C0 - ldrb r0, [r4, #1] - cmp r0, #5 - bls _021D30E6 - b _021D3208 -_021D30E6: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D30F2: ; jump table - .short _021D30FE - _021D30F2 - 2 ; case 0 - .short _021D3122 - _021D30F2 - 2 ; case 1 - .short _021D3148 - _021D30F2 - 2 ; case 2 - .short _021D31AE - _021D30F2 - 2 ; case 3 - .short _021D31CE - _021D30F2 - 2 ; case 4 - .short _021D31FA - _021D30F2 - 2 ; case 5 -_021D30FE: - mov r2, #0 - strb r2, [r4, #7] - strb r2, [r4, #6] - ldr r0, _021D3210 ; =ov77_021D32A4 - strb r2, [r4, #8] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x10] - mov r0, #1 - ldr r1, _021D3214 ; =0x00000494 - add r2, r0, #0 - bl sub_02004550 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D3208 -_021D3122: - ldrb r0, [r4, #8] - cmp r0, #0 - beq _021D3208 - cmp r5, #0x73 - blt _021D3208 - mov r2, #0 - strb r2, [r4, #7] - mov r0, #0x10 - strb r0, [r4, #6] - ldr r0, _021D3218 ; =ov77_021D3300 - strb r2, [r4, #8] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x10] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D3208 -_021D3148: - ldrb r0, [r4, #8] - cmp r0, #0 - beq _021D3208 - ldr r0, _021D321C ; =0x00000109 - cmp r5, r0 - blt _021D3208 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D3220 ; =0x04000050 - mov r1, #4 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - mov r0, #0x10 - str r0, [sp] - ldr r0, _021D3224 ; =0x04001050 - mov r1, #4 - mov r2, #8 - mov r3, #0 - bl sub_020BF55C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF74 - mov r2, #0 - strb r2, [r4, #7] - strb r2, [r4, #6] - ldr r0, _021D3228 ; =ov77_021D3360 - strb r2, [r4, #8] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x10] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D3208 -_021D31AE: - ldrb r0, [r4, #8] - cmp r0, #0 - beq _021D3208 - mov r2, #0 - strb r2, [r4, #7] - strb r2, [r4, #6] - ldr r0, _021D322C ; =ov77_021D33A8 - strb r2, [r4, #8] - add r1, r4, #0 - bl sub_0200D9E8 - str r0, [r4, #0x10] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D3208 -_021D31CE: - ldrb r0, [r4, #8] - cmp r0, #0 - beq _021D3208 - ldr r0, _021D3230 ; =0x000001EA - cmp r5, r0 - blt _021D3208 - mov r0, #0x12 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #2 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D3208 -_021D31FA: - bl sub_0200F2AC - cmp r0, #0 - beq _021D3208 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D3208: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_021D3210: .word ov77_021D32A4 -_021D3214: .word 0x00000494 -_021D3218: .word ov77_021D3300 -_021D321C: .word 0x00000109 -_021D3220: .word 0x04000050 -_021D3224: .word 0x04001050 -_021D3228: .word ov77_021D3360 -_021D322C: .word ov77_021D33A8 -_021D3230: .word 0x000001EA - thumb_func_end ov77_021D30D0 - - thumb_func_start ov77_021D3234 -ov77_021D3234: ; 0x021D3234 - push {r4, lr} - add r4, r0, #0 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - ldrb r0, [r4, #0x1a] - cmp r0, #0 - beq _021D3286 - ldr r0, [r4, #0x2c] - bl ov77_021D67B0 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #6 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #7 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #5 - bl sub_02019044 - ldr r0, [r4, #0xc] - bl sub_020181C4 - mov r0, #0 - strb r0, [r4, #0x1a] -_021D3286: - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _021D32A0 - ldr r0, [r4, #8] - cmp r0, #0 - bne _021D3296 - bl sub_02022974 -_021D3296: - ldr r0, [r4, #0x28] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x28] -_021D32A0: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D3234 - - thumb_func_start ov77_021D32A4 -ov77_021D32A4: ; 0x021D32A4 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r1, [r4, #7] - add r1, r1, #1 - strb r1, [r4, #7] - ldrb r1, [r4, #7] - cmp r1, #6 - blo _021D32C0 - mov r1, #0 - strb r1, [r4, #7] - ldrb r1, [r4, #6] - add r1, r1, #1 - strb r1, [r4, #6] -_021D32C0: - ldrb r1, [r4, #6] - cmp r1, #0x10 - blo _021D32D2 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #1 - strb r0, [r4, #8] -_021D32D2: - mov r0, #0x10 - str r0, [sp] - ldrb r3, [r4, #6] - ldr r0, _021D32F8 ; =0x04000050 - mov r1, #2 - mov r2, #8 - bl sub_020BF55C - mov r0, #0x10 - str r0, [sp] - ldrb r3, [r4, #6] - ldr r0, _021D32FC ; =0x04001050 - mov r1, #2 - mov r2, #8 - bl sub_020BF55C - add sp, #4 - pop {r3, r4, pc} - nop -_021D32F8: .word 0x04000050 -_021D32FC: .word 0x04001050 - thumb_func_end ov77_021D32A4 - - thumb_func_start ov77_021D3300 -ov77_021D3300: ; 0x021D3300 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r1, [r4, #7] - add r1, r1, #1 - strb r1, [r4, #7] - ldrb r1, [r4, #7] - cmp r1, #4 - blo _021D331C - mov r1, #0 - strb r1, [r4, #7] - ldrb r1, [r4, #6] - sub r1, r1, #1 - strb r1, [r4, #6] -_021D331C: - ldrb r1, [r4, #6] - cmp r1, #0 - bne _021D3332 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x10] - mov r1, #1 - strb r1, [r4, #8] - ldr r0, [r4, #0x18] - strb r1, [r0] -_021D3332: - mov r0, #0x10 - str r0, [sp] - ldrb r3, [r4, #6] - ldr r0, _021D3358 ; =0x04000050 - mov r1, #2 - mov r2, #8 - bl sub_020BF55C - mov r0, #0x10 - str r0, [sp] - ldrb r3, [r4, #6] - ldr r0, _021D335C ; =0x04001050 - mov r1, #2 - mov r2, #8 - bl sub_020BF55C - add sp, #4 - pop {r3, r4, pc} - nop -_021D3358: .word 0x04000050 -_021D335C: .word 0x04001050 - thumb_func_end ov77_021D3300 - - thumb_func_start ov77_021D3360 -ov77_021D3360: ; 0x021D3360 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r1, [r4, #7] - add r1, r1, #1 - strb r1, [r4, #7] - ldrb r1, [r4, #7] - cmp r1, #4 - blo _021D337C - mov r1, #0 - strb r1, [r4, #7] - ldrb r1, [r4, #6] - add r1, r1, #1 - strb r1, [r4, #6] -_021D337C: - ldrb r1, [r4, #6] - cmp r1, #0x10 - blo _021D338E - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #1 - strb r0, [r4, #8] -_021D338E: - mov r0, #0x10 - str r0, [sp] - ldrb r3, [r4, #6] - ldr r0, _021D33A4 ; =0x04000050 - mov r1, #4 - mov r2, #8 - bl sub_020BF55C - add sp, #4 - pop {r3, r4, pc} - nop -_021D33A4: .word 0x04000050 - thumb_func_end ov77_021D3360 - - thumb_func_start ov77_021D33A8 -ov77_021D33A8: ; 0x021D33A8 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldrb r1, [r4, #7] - add r1, r1, #1 - strb r1, [r4, #7] - ldrb r1, [r4, #7] - cmp r1, #4 - blo _021D33C4 - mov r1, #0 - strb r1, [r4, #7] - ldrb r1, [r4, #6] - add r1, r1, #1 - strb r1, [r4, #6] -_021D33C4: - ldrb r1, [r4, #6] - cmp r1, #0x10 - blo _021D33D6 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #1 - strb r0, [r4, #8] -_021D33D6: - mov r0, #0x10 - str r0, [sp] - ldrb r3, [r4, #6] - ldr r0, _021D33EC ; =0x04001050 - mov r1, #4 - mov r2, #8 - bl sub_020BF55C - add sp, #4 - pop {r3, r4, pc} - nop -_021D33EC: .word 0x04001050 - thumb_func_end ov77_021D33A8 - - thumb_func_start ov77_021D33F0 -ov77_021D33F0: ; 0x021D33F0 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #8] - add r4, r5, #0 - add r4, #0x34 - cmp r0, #0 - beq _021D3402 - mov r0, #4 - strb r0, [r4] -_021D3402: - ldrb r0, [r4] - cmp r0, #4 - bhi _021D34A4 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D3414: ; jump table - .short _021D341E - _021D3414 - 2 ; case 0 - .short _021D342C - _021D3414 - 2 ; case 1 - .short _021D343C - _021D3414 - 2 ; case 2 - .short _021D3458 - _021D3414 - 2 ; case 3 - .short _021D349A - _021D3414 - 2 ; case 4 -_021D341E: - add r0, r5, #0 - bl ov77_021D34A8 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _021D34A4 -_021D342C: - add r5, #0x34 - add r0, r5, #0 - bl ov77_021D37C0 - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _021D34A4 -_021D343C: - add r0, r5, #0 - add r0, #0x34 - mov r1, #0 - bl ov77_021D40DC - cmp r0, #1 - bne _021D34A4 - mov r0, #1 - add r5, #0x3a - strb r0, [r5] - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] - b _021D34A4 -_021D3458: - add r1, r5, #0 - ldr r2, [r5, #4] - add r0, r5, #0 - add r1, #0x34 - bl ov77_021D4230 - cmp r0, #0 - beq _021D346E - ldrb r0, [r4] - add r0, r0, #1 - strb r0, [r4] -_021D346E: - ldr r0, [r5, #0x48] - bl ov77_021D6020 - add r0, r5, #0 - add r0, #0x3a - ldrb r0, [r0] - cmp r0, #0 - beq _021D3492 - add r0, r5, #0 - add r0, #0x39 - ldrb r0, [r0] - cmp r0, #0 - bne _021D34A4 - add r5, #0x34 - add r0, r5, #0 - bl ov77_021D4188 - b _021D34A4 -_021D3492: - ldr r0, [r5, #0x50] - bl ov77_021D6E50 - b _021D34A4 -_021D349A: - add r0, r5, #0 - bl ov77_021D36F8 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D34A4: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov77_021D33F0 - - thumb_func_start ov77_021D34A8 -ov77_021D34A8: ; 0x021D34A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - bl ov77_021D25D0 - add r0, r5, #0 - bl ov77_021D2724 - add r0, r5, #0 - bl ov77_021D2A58 - bl ov77_021D555C - add r4, r0, #0 - bl ov77_021D6CB8 - add r6, r0, #0 - mov r0, #0x4c - add r1, r4, #0 - bl sub_02018144 - str r0, [r5, #0x48] - mov r0, #0x10 - bl ov77_021D6734 - str r0, [r5, #0x4c] - mov r0, #0x4c - add r1, r6, #0 - bl sub_02018144 - str r0, [r5, #0x50] - ldr r0, [r5, #0x48] - mov r1, #0 - add r2, r4, #0 - bl sub_020D5124 - ldr r0, [r5, #0x50] - mov r1, #0 - add r2, r6, #0 - bl sub_020D5124 - add r0, r5, #0 - mov r1, #4 - add r0, #0x3c - strb r1, [r0] - ldr r0, [r5, #0x50] - bl ov77_021D6CFC - ldr r0, [r5, #0xc] - mov r1, #0 - str r0, [r5, #0x44] - ldr r0, _021D3598 ; =0x021BF6DC - strb r1, [r0, #5] - bl sub_0201FFE8 - ldr r6, _021D359C ; =0x021D776C - ldr r7, _021D35A0 ; =0x021D7444 - mov r4, #0 -_021D351C: - mov r0, #0xc - add r1, r4, #0 - mul r1, r0 - add r3, r6, r1 - ldr r2, [r3, #4] - ldr r1, [r6, r1] - ldr r3, [r3, #8] - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - lsl r3, r3, #0x10 - add r0, r4, #0 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - asr r3, r3, #0x10 - bl sub_020AF51C - lsl r1, r4, #1 - ldrh r1, [r7, r1] - add r0, r4, #0 - bl sub_020AF558 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021D351C - ldr r0, _021D35A4 ; =0x00004210 - ldr r1, _021D35A8 ; =0x0000318A - mov r2, #0 - bl sub_020AF56C - ldr r0, _021D35AC ; =0x00004A52 - ldr r1, _021D35B0 ; =0x000039CE - mov r2, #0 - bl sub_020AF590 - mov r0, #0x1f - str r0, [sp] - mov r0, #2 - lsl r0, r0, #0xe - mov r1, #0 - str r0, [sp, #4] - mov r0, #0xd - mov r2, #2 - add r3, r1, #0 - bl sub_020AF5B4 - ldr r0, _021D35B4 ; =ov77_021D2B38 - add r1, r5, #0 - bl sub_02017798 - mov r0, #0xf - mvn r0, r0 - mov r1, #8 - mov r2, #1 - bl sub_0200AB4C - mov r0, #1 - add r5, #0x36 - strb r0, [r5] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3598: .word 0x021BF6DC -_021D359C: .word 0x021D776C -_021D35A0: .word 0x021D7444 -_021D35A4: .word 0x00004210 -_021D35A8: .word 0x0000318A -_021D35AC: .word 0x00004A52 -_021D35B0: .word 0x000039CE -_021D35B4: .word ov77_021D2B38 - thumb_func_end ov77_021D34A8 - - thumb_func_start ov77_021D35B8 -ov77_021D35B8: ; 0x021D35B8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, #0x38 - ldrb r0, [r0] - cmp r0, #0 - bne _021D35CE - add r0, r5, #0 - add r0, #0x39 - ldrb r0, [r0] - cmp r0, #0 - beq _021D3618 -_021D35CE: - bl sub_020203E0 - ldr r0, [r5, #0x5c] - bl sub_020203B8 - mov r0, #0x27 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r6, #0 - cmp r0, #0 - ble _021D35FE - mov r7, #0x27 - add r4, r5, #0 - lsl r7, r7, #4 -_021D35EA: - add r0, r4, #0 - add r0, #0xb4 - ldr r0, [r0, #0] - bl sub_020181C4 - ldr r0, [r5, r7] - add r6, r6, #1 - add r4, #0x58 - cmp r6, r0 - blt _021D35EA -_021D35FE: - mov r0, #0x27 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r5, r0] - ldr r0, [r5, #0x54] - bl sub_020181C4 - add r0, r5, #0 - mov r1, #0 - add r0, #0x38 - strb r1, [r0] - add r5, #0x39 - strb r1, [r5] -_021D3618: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov77_021D35B8 - - thumb_func_start ov77_021D361C -ov77_021D361C: ; 0x021D361C - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x36 - ldrb r0, [r0] - add r4, r1, #0 - cmp r0, #0 - beq _021D36F0 - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _021D36F0 - ldr r1, _021D36F4 ; =0x0000028E - ldrb r1, [r5, r1] - cmp r1, #0 - bne _021D3670 - mov r1, #3 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #1 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #4 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #5 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #6 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #7 - bl sub_02019044 - b _021D36E2 -_021D3670: - cmp r1, #1 - bne _021D36A4 - mov r1, #3 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #1 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #5 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #6 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #7 - bl sub_02019044 - b _021D36E2 -_021D36A4: - mov r1, #0 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #3 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #1 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #4 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #5 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #6 - bl sub_02019044 - ldr r0, [r5, #0xc] - mov r1, #7 - bl sub_02019044 -_021D36E2: - cmp r4, #1 - bne _021D36F0 - ldr r0, [r5, #0xc] - bl sub_020181C4 - mov r0, #0 - str r0, [r5, #0xc] -_021D36F0: - pop {r3, r4, r5, pc} - nop -_021D36F4: .word 0x0000028E - thumb_func_end ov77_021D361C - - thumb_func_start ov77_021D36F8 -ov77_021D36F8: ; 0x021D36F8 - push {r4, lr} - mov r3, #1 - lsl r3, r3, #0x1a - ldr r2, [r3, #0] - ldr r1, _021D37B8 ; =0xFFFF1FFF - add r4, r0, #0 - and r1, r2 - str r1, [r3, #0] - bl ov77_021D35B8 - add r0, r4, #0 - add r0, #0x37 - ldrb r0, [r0] - cmp r0, #0 - beq _021D3724 - ldr r0, [r4, #0x48] - bl ov77_021D5BAC - add r0, r4, #0 - mov r1, #0 - add r0, #0x37 - strb r1, [r0] -_021D3724: - add r0, r4, #0 - add r0, #0x36 - ldrb r0, [r0] - cmp r0, #0 - beq _021D3788 - ldr r0, [r4, #0x4c] - cmp r0, #0 - beq _021D373C - bl ov77_021D6760 - mov r0, #0 - str r0, [r4, #0x4c] -_021D373C: - ldr r0, [r4, #0x48] - cmp r0, #0 - beq _021D374A - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x48] -_021D374A: - ldr r0, [r4, #0x50] - cmp r0, #0 - beq _021D375E - bl ov77_021D6E28 - ldr r0, [r4, #0x50] - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0x50] -_021D375E: - add r0, r4, #0 - mov r1, #1 - bl ov77_021D361C - mov r0, #0x9d - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D377C - bl sub_020181C4 - mov r0, #0x9d - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_021D377C: - ldr r0, [r4, #0x10] - bl sub_020242C4 - mov r0, #0 - add r4, #0x36 - strb r0, [r4] -_021D3788: - bl sub_020B2628 - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D37B8 ; =0xFFFF1FFF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D37BC ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - pop {r4, pc} - nop -_021D37B8: .word 0xFFFF1FFF -_021D37BC: .word 0x04001000 - thumb_func_end ov77_021D36F8 - - thumb_func_start ov77_021D37C0 -ov77_021D37C0: ; 0x021D37C0 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #0x80 - mov r1, #0x4c - bl sub_02006C24 - mov r3, #6 - lsl r3, r3, #6 - str r3, [sp] - mov r1, #0x40 - str r1, [sp, #4] - mov r1, #0x4c - str r1, [sp, #8] - mov r1, #0x60 - mov r2, #0 - add r4, r0, #0 - bl sub_02007148 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x5f - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0xc - mov r3, #3 - bl sub_0200710C - mov r3, #7 - lsl r3, r3, #6 - str r3, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xd - mov r2, #0 - bl sub_02007148 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0xe - mov r3, #2 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0xc - mov r3, #2 - bl sub_0200710C - mov r0, #0x41 - mov r1, #0x4c - bl sub_02006C24 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - mov r1, #0x4c - str r1, [sp, #0xc] - ldr r2, [r5, #0x10] - mov r1, #0x38 - mov r3, #1 - add r6, r0, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r6, #0 - mov r1, #0x39 - mov r3, #1 - bl sub_0200710C - mov r0, #1 - lsl r0, r0, #0xa - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r6, #0 - mov r1, #0x39 - mov r3, #1 - bl sub_0200710C - mov r0, #0x20 - str r0, [sp] - mov r0, #0x4c - mov r2, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r1, #0x37 - add r3, r2, #0 - bl sub_02007130 - add r0, r6, #0 - bl sub_02006CA8 - mov r3, #0 - str r3, [sp] - mov r0, #0x4c - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x3d - mov r2, #4 - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x3b - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x3f - mov r3, #5 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x3a - mov r3, #6 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x3e - mov r3, #6 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x3c - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x40 - mov r3, #7 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0xe - mov r3, #4 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0xc - mov r3, #4 - bl sub_0200710C - mov r3, #7 - lsl r3, r3, #6 - str r3, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, r4, #0 - mov r1, #0xd - mov r2, #4 - bl sub_02007148 - ldr r0, [r5, #0x14] - bl ov77_021D5564 - ldr r0, [r5, #0x14] - bl ov77_021D5C3C - ldr r0, [r5, #0x14] - ldr r1, [r5, #0x18] - bl ov77_021D5FB4 - mov r1, #5 - mov r0, #0 - lsl r1, r1, #0x18 - mov r2, #2 - bl sub_020C4AF0 - ldr r1, _021D3A0C ; =0x05000400 - mov r0, #0 - mov r2, #2 - bl sub_020C4AF0 - mov r0, #0xe - mov r1, #0 - bl sub_0201FF0C - mov r0, #0xf - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - bl sub_0200F338 - mov r0, #1 - bl sub_0200F338 - add r0, r4, #0 - bl sub_02006CA8 - mov r0, #1 - strb r0, [r5, #3] - add sp, #0x10 - pop {r4, r5, r6, pc} - nop -_021D3A0C: .word 0x05000400 - thumb_func_end ov77_021D37C0 - - thumb_func_start ov77_021D3A10 -ov77_021D3A10: ; 0x021D3A10 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #2 - add r3, r2, #0 - bl sub_02018898 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #3 - add r3, r2, #0 - bl sub_02018898 - ldr r1, _021D3B54 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - strh r2, [r1] - mov r0, #1 - mov r1, #3 - bl sub_02019060 - mov r0, #0x80 - mov r1, #0x4c - bl sub_02006C24 - mov r2, #0 - str r2, [sp] - mov r1, #0x4c - str r1, [sp, #4] - mov r1, #0x44 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x42 - mov r3, #1 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x46 - mov r3, #1 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x41 - mov r3, #2 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x45 - mov r3, #2 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x43 - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x47 - mov r3, #3 - bl sub_0200710C - mov r1, #5 - mov r0, #0 - lsl r1, r1, #0x18 - mov r2, #2 - bl sub_020C4AF0 - ldr r1, _021D3B58 ; =0x05000400 - mov r0, #0 - mov r2, #2 - bl sub_020C4AF0 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #1 - add r3, r2, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #5 - add r3, r2, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #6 - add r3, r2, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r5, #0x10] - mov r1, #7 - add r3, r2, #0 - bl sub_02019184 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_021D3B54: .word 0x04000008 -_021D3B58: .word 0x05000400 - thumb_func_end ov77_021D3A10 - - thumb_func_start ov77_021D3B5C -ov77_021D3B5C: ; 0x021D3B5C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - bl ov77_021D2828 - mov r0, #0x80 - mov r1, #0x4c - bl sub_02006C24 - mov r2, #0 - str r2, [sp] - mov r1, #0x4c - str r1, [sp, #4] - mov r1, #0x48 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r3, #0 - str r3, [sp] - mov r0, #0x4c - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0x48 - mov r2, #4 - bl sub_02007130 - mov r1, #2 - mov r0, #0x4c - lsl r1, r1, #8 - bl sub_02018144 - mov r2, #9 - lsl r2, r2, #6 - str r0, [r5, r2] - mov r0, #5 - ldr r1, [r5, r2] - lsl r0, r0, #0x18 - sub r2, #0x40 - bl sub_020C4B18 - mov r1, #9 - lsl r1, r1, #6 - ldr r1, [r5, r1] - mov r0, #0 - mov r2, #2 - bl sub_020C4AF0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x49 - mov r3, #1 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0x4c - str r1, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r3, #1 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x49 - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r1, #0x4c - str r1, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r3, #5 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4a - mov r3, #2 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4d - mov r3, #2 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4a - mov r3, #6 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4d - mov r3, #6 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4b - mov r3, #3 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4e - mov r3, #3 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4b - mov r3, #7 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x4e - mov r3, #7 - bl sub_0200710C - mov r1, #5 - mov r0, #0 - lsl r1, r1, #0x18 - mov r2, #2 - bl sub_020C4AF0 - ldr r1, _021D3D48 ; =0x05000400 - mov r0, #0 - mov r2, #2 - bl sub_020C4AF0 - mov r2, #0 - add r3, r2, #0 - ldr r0, [r5, #0x10] - mov r1, #1 - sub r3, #0x80 - bl sub_02019184 - mov r2, #0 - add r3, r2, #0 - ldr r0, [r5, #0x10] - mov r1, #2 - sub r3, #0xc8 - bl sub_02019184 - mov r2, #0 - add r3, r2, #0 - ldr r0, [r5, #0x10] - mov r1, #3 - sub r3, #0x98 - bl sub_02019184 - ldr r0, [r5, #0x10] - mov r1, #5 - mov r2, #0 - mov r3, #0x80 - bl sub_02019184 - ldr r0, [r5, #0x10] - mov r1, #6 - mov r2, #0 - mov r3, #0xc0 - bl sub_02019184 - ldr r0, [r5, #0x10] - mov r1, #7 - mov r2, #0 - mov r3, #0xb0 - bl sub_02019184 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_021D3D48: .word 0x05000400 - thumb_func_end ov77_021D3B5C - - thumb_func_start ov77_021D3D4C -ov77_021D3D4C: ; 0x021D3D4C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - bl ov77_021D2900 - mov r0, #0x80 - mov r1, #0x4c - bl sub_02006C24 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - mov r1, #0x4c - str r1, [sp, #0xc] - ldr r2, [r5, #0x10] - mov r1, #0x4f - add r4, r0, #0 - bl sub_020070E8 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - str r3, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x50 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x51 - mov r3, #4 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r5, #0x10] - add r0, r4, #0 - mov r1, #0x52 - mov r3, #4 - bl sub_0200710C - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov77_021D3D4C - - thumb_func_start ov77_021D3DC4 -ov77_021D3DC4: ; 0x021D3DC4 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D3ED8 ; =0x021BF6DC - ldrb r0, [r0, #5] - cmp r0, #0 - ldr r0, [r4, #0x10] - bne _021D3E50 - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r1, #3 - ldr r0, [r4, #0x10] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - add r3, #0xfd - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #6 - add r3, #0xfd - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #7 - add r3, #0xfd - bl sub_02019184 - mov r0, #1 - add r1, r0, #0 - bl sub_02019060 - mov r0, #2 - add r1, r0, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #0 - bl sub_02019060 - mov r0, #5 - mov r1, #1 - bl sub_02019060 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - mov r0, #7 - mov r1, #0 - bl sub_02019060 - b _021D3ECC -_021D3E50: - mov r2, #3 - add r3, r2, #0 - mov r1, #1 - add r3, #0xfd - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #2 - add r3, #0xfd - bl sub_02019184 - mov r1, #3 - add r3, r1, #0 - ldr r0, [r4, #0x10] - add r2, r1, #0 - add r3, #0xfd - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #5 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #7 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r0, #1 - add r1, r0, #0 - bl sub_02019060 - mov r0, #2 - add r1, r0, #0 - bl sub_02019060 - mov r0, #3 - mov r1, #0 - bl sub_02019060 - mov r0, #5 - mov r1, #1 - bl sub_02019060 - mov r0, #6 - mov r1, #2 - bl sub_02019060 - mov r0, #7 - mov r1, #0 - bl sub_02019060 -_021D3ECC: - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov77_021D636C - pop {r4, pc} - nop -_021D3ED8: .word 0x021BF6DC - thumb_func_end ov77_021D3DC4 - - thumb_func_start ov77_021D3EDC -ov77_021D3EDC: ; 0x021D3EDC - push {r4, lr} - lsl r2, r1, #2 - ldr r1, _021D3F20 ; =0x021D7458 - add r4, r0, #0 - ldr r1, [r1, r2] - mov r0, #0x80 - mov r2, #0x4c - bl sub_02006AC0 - str r0, [r4, #0x20] - bl sub_020B3C1C - str r0, [r4, #0x24] - bl sub_0201CBCC - cmp r0, #0 - bne _021D3F02 - bl sub_02022974 -_021D3F02: - ldr r0, [r4, #0x24] - ldr r0, [r0, #0x14] - cmp r0, #0 - bne _021D3F0E - bl sub_02022974 -_021D3F0E: - ldr r2, [r4, #0x24] - ldr r0, [r4, #0x20] - ldr r1, [r2, #0x14] - add r1, r2, r1 - sub r1, r1, r0 - bl sub_020182F0 - pop {r4, pc} - nop -_021D3F20: .word 0x021D7458 - thumb_func_end ov77_021D3EDC - - thumb_func_start ov77_021D3F24 -ov77_021D3F24: ; 0x021D3F24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - str r3, [sp] - cmp r3, #6 - ble _021D3F38 - mov r0, #6 - str r0, [sp] -_021D3F38: - mov r0, #0x80 - mov r1, #0x4c - bl sub_02006C24 - str r0, [sp, #8] - lsl r0, r4, #0x18 - lsr r7, r0, #0x18 - ldr r0, [sp] - cmp r7, r0 - bge _021D4036 - mov r0, #0x18 - ldr r1, _021D4040 ; =0x021D779C - mul r0, r6 - add r0, r1, r0 - str r0, [sp, #4] - add r0, r5, #0 - str r0, [sp, #0xc] - add r0, #0x2c - str r0, [sp, #0xc] -_021D3F5E: - ldr r0, [sp, #4] - lsl r1, r7, #2 - ldr r1, [r0, r1] - cmp r1, #0 - beq _021D4036 - mov r0, #0x58 - add r6, r7, #0 - mul r6, r0 - ldr r0, [sp, #8] - mov r2, #0x4c - bl sub_02006CB8 - add r1, r5, r6 - add r1, #0x80 - str r0, [r1, #0] - add r0, r5, r6 - add r0, #0x80 - ldr r0, [r0, #0] - ldr r1, [r5, #0x24] - bl sub_0201CBB0 - cmp r0, #0 - bne _021D3F90 - bl sub_02022974 -_021D3F90: - add r0, r5, r6 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_020B3C0C - ldrb r0, [r0, #9] - cmp r0, #1 - beq _021D3FA4 - bl sub_02022974 -_021D3FA4: - add r0, r5, r6 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_020B3C0C - cmp r0, #0 - beq _021D3FD2 - add r2, r0, #0 - add r2, #8 - beq _021D3FC6 - ldrb r1, [r0, #9] - cmp r1, #0 - bls _021D3FC6 - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _021D3FC8 -_021D3FC6: - mov r1, #0 -_021D3FC8: - cmp r1, #0 - beq _021D3FD2 - ldr r1, [r1, #0] - add r4, r0, r1 - b _021D3FD4 -_021D3FD2: - mov r4, #0 -_021D3FD4: - cmp r4, #0 - bne _021D3FDC - bl sub_02022974 -_021D3FDC: - ldr r0, [sp, #0xc] - add r1, r4, #0 - add r0, r0, r6 - bl sub_020AE608 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x40 - bl sub_020B2CE4 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x80 - bl sub_020B2CE4 - mov r2, #2 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #8 - bl sub_020B2CE4 - mov r2, #1 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #0xa - bl sub_020B2CE4 - add r0, r4, #0 - mov r1, #0 - mov r2, #0xf - bl sub_020B2D8C - mov r0, #0x8f - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r0, #1 - mov r0, #0x8f - lsl r0, r0, #2 - str r1, [r5, r0] - add r0, r7, #1 - lsl r0, r0, #0x18 - lsr r7, r0, #0x18 - ldr r0, [sp] - cmp r7, r0 - blt _021D3F5E -_021D4036: - ldr r0, [sp, #8] - bl sub_02006CA8 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4040: .word 0x021D779C - thumb_func_end ov77_021D3F24 - - thumb_func_start ov77_021D4044 -ov77_021D4044: ; 0x021D4044 - push {r4, r5, lr} - sub sp, #0x24 - add r4, r0, #0 - mov r0, #0x4c - bl sub_020203AC - add r3, sp, #0x18 - ldr r5, _021D40A0 ; =0x021D7494 - str r0, [r4, #0x28] - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - ldr r1, _021D40A4 ; =0x0029AEC1 - str r0, [r3, #0] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [r4, #0x28] - ldr r3, _021D40A8 ; =0x000005C1 - str r0, [sp, #8] - add r0, r2, #0 - ldr r2, _021D40AC ; =0x021D7500 - bl sub_020206D0 - ldr r0, _021D40B0 ; =0x00000981 - ldr r1, [r4, #0x28] - bl sub_02020910 - ldr r5, _021D40B4 ; =0x021D7464 - add r3, sp, #0xc - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r1, [r4, #0x28] - add r0, r2, #0 - bl sub_02020990 - ldr r0, [r4, #0x28] - bl sub_020203D4 - add sp, #0x24 - pop {r4, r5, pc} - nop -_021D40A0: .word 0x021D7494 -_021D40A4: .word 0x0029AEC1 -_021D40A8: .word 0x000005C1 -_021D40AC: .word 0x021D7500 -_021D40B0: .word 0x00000981 -_021D40B4: .word 0x021D7464 - thumb_func_end ov77_021D4044 - - thumb_func_start ov77_021D40B8 -ov77_021D40B8: ; 0x021D40B8 - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - bl ov77_021D3EDC - add r0, r4, #0 - add r1, r5, #0 - mov r2, #0 - mov r3, #6 - bl ov77_021D3F24 - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4044 - mov r0, #1 - strb r0, [r4, #4] - pop {r3, r4, r5, pc} - thumb_func_end ov77_021D40B8 - - thumb_func_start ov77_021D40DC -ov77_021D40DC: ; 0x021D40DC - push {r3, r4, r5, lr} - add r4, r0, #0 - add r5, r1, #0 - ldrb r2, [r4, #9] - bne _021D4126 - cmp r2, #0 - beq _021D40F2 - cmp r2, #1 - beq _021D4104 - cmp r2, #2 - b _021D410E -_021D40F2: - mov r2, #1 - strb r2, [r4, #5] - bl ov77_021D3EDC - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4044 - b _021D417C -_021D4104: - mov r2, #0 - mov r3, #1 - bl ov77_021D3F24 - b _021D417C -_021D410E: - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - mov r3, #6 - bl ov77_021D3F24 - mov r0, #0 - strb r0, [r4, #9] - strb r0, [r4, #5] - mov r0, #1 - strb r0, [r4, #4] - pop {r3, r4, r5, pc} -_021D4126: - cmp r2, #3 - bhi _021D4164 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D4136: ; jump table - .short _021D413E - _021D4136 - 2 ; case 0 - .short _021D4150 - _021D4136 - 2 ; case 1 - .short _021D415A - _021D4136 - 2 ; case 2 - .short _021D4164 - _021D4136 - 2 ; case 3 -_021D413E: - mov r2, #1 - strb r2, [r4, #5] - bl ov77_021D3EDC - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4044 - b _021D417C -_021D4150: - mov r2, #0 - mov r3, #2 - bl ov77_021D3F24 - b _021D417C -_021D415A: - mov r2, #2 - mov r3, #4 - bl ov77_021D3F24 - b _021D417C -_021D4164: - add r0, r4, #0 - add r1, r5, #0 - mov r2, #4 - mov r3, #6 - bl ov77_021D3F24 - mov r0, #0 - strb r0, [r4, #9] - strb r0, [r4, #5] - mov r0, #1 - strb r0, [r4, #4] - pop {r3, r4, r5, pc} -_021D417C: - ldrb r0, [r4, #9] - add r0, r0, #1 - strb r0, [r4, #9] - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D40DC - - thumb_func_start ov77_021D4188 -ov77_021D4188: ; 0x021D4188 - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - ldr r4, _021D4224 ; =0x021D76D0 - add r5, r0, #0 - add r3, sp, #0x18 - mov r2, #4 -_021D4194: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D4194 - ldr r0, [r4, #0] - add r2, sp, #0xc - str r0, [r3, #0] - ldr r3, _021D4228 ; =0x021D7488 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r1, sp, #0 - str r0, [r2, #0] - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - str r0, [r1, #8] - bl sub_020B2628 - bl sub_020241B4 - bl sub_020203EC - mov r0, #0x97 - lsl r0, r0, #2 - ldrb r1, [r5, r0] - cmp r1, #1 - bne _021D41FE - sub r0, #0x20 - ldr r0, [r5, r0] - mov r4, #0 - cmp r0, #0 - ble _021D41FE - add r6, r5, #0 - mov r7, #0x8f - add r6, #0x2c - lsl r7, r7, #2 -_021D41DE: - bl sub_020C2BE8 - mov r0, #0x58 - mul r0, r4 - add r0, r6, r0 - add r1, sp, #0 - add r2, sp, #0x18 - add r3, sp, #0xc - bl sub_0201CA74 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - ldr r0, [r5, r7] - cmp r4, r0 - blt _021D41DE -_021D41FE: - ldr r0, _021D422C ; =0x0000025D - ldrb r0, [r5, r0] - cmp r0, #1 - bne _021D4216 - bl sub_020B2628 - bl sub_020241B4 - bl sub_0201469C - bl sub_020146C0 -_021D4216: - mov r0, #0 - mov r1, #1 - bl sub_020241BC - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_021D4224: .word 0x021D76D0 -_021D4228: .word 0x021D7488 -_021D422C: .word 0x0000025D - thumb_func_end ov77_021D4188 - - thumb_func_start ov77_021D4230 -ov77_021D4230: ; 0x021D4230 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r6, r0, #0 - ldrb r0, [r4, #7] - add r5, r2, #0 - cmp r0, #0 - bne _021D424C - mov r1, #0x91 - lsl r1, r1, #2 - ldrb r1, [r4, r1] - ldr r0, [r4, #0x18] - bl ov77_021D6BA0 -_021D424C: - ldrb r0, [r4, #7] - ldrb r1, [r4, #8] - add r0, r0, #1 - bl sub_020E1F6C - strb r1, [r4, #7] - ldrb r0, [r4, #1] - cmp r0, #0x13 - bhi _021D42D0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D426A: ; jump table - .short _021D4292 - _021D426A - 2 ; case 0 - .short _021D42BE - _021D426A - 2 ; case 1 - .short _021D4318 - _021D426A - 2 ; case 2 - .short _021D43D8 - _021D426A - 2 ; case 3 - .short _021D4428 - _021D426A - 2 ; case 4 - .short _021D45C2 - _021D426A - 2 ; case 5 - .short _021D469C - _021D426A - 2 ; case 6 - .short _021D46D2 - _021D426A - 2 ; case 7 - .short _021D4742 - _021D426A - 2 ; case 8 - .short _021D47D8 - _021D426A - 2 ; case 9 - .short _021D4878 - _021D426A - 2 ; case 10 - .short _021D48B8 - _021D426A - 2 ; case 11 - .short _021D4906 - _021D426A - 2 ; case 12 - .short _021D4946 - _021D426A - 2 ; case 13 - .short _021D4986 - _021D426A - 2 ; case 14 - .short _021D49D0 - _021D426A - 2 ; case 15 - .short _021D4AA6 - _021D426A - 2 ; case 16 - .short _021D4AD6 - _021D426A - 2 ; case 17 - .short _021D4B24 - _021D426A - 2 ; case 18 - .short _021D4B4E - _021D426A - 2 ; case 19 -_021D4292: - mov r0, #0xa - lsl r0, r0, #6 - cmp r5, r0 - blt _021D42D0 - mov r0, #3 - mov r1, #1 - bl sub_02019120 - mov r0, #1 - mov r1, #0 - str r0, [sp] - mov r0, #8 - add r2, r1, #0 - sub r2, #0x10 - add r3, r0, #0 - bl sub_0200AAE0 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - bl _021D4B54 -_021D42BE: - mov r0, #1 - bl sub_0200AC1C - cmp r0, #1 - bne _021D42D0 - mov r0, #0xaf - lsl r0, r0, #2 - cmp r5, r0 - beq _021D42D4 -_021D42D0: - bl _021D4B54 -_021D42D4: - mov r0, #0 - mov r1, #1 - bl sub_02019120 - ldr r0, [r4, #0x1c] - mov r1, #9 - bl ov77_021D6CD0 - ldr r0, [r4, #0x1c] - mov r1, #0xa - bl ov77_021D6CD0 - ldr r0, [r4, #0x1c] - mov r1, #0xb - bl ov77_021D6CD0 - mov r1, #0 - ldr r0, _021D45DC ; =0x04000050 - mov r2, #0xf - add r3, r1, #0 - str r1, [sp] - bl sub_020BF55C - ldr r0, _021D45E0 ; =0x0000025D - mov r1, #1 - strb r1, [r4, r0] - ldr r0, [r4, #0x14] - bl ov77_021D6050 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - bl _021D4B54 -_021D4318: - ldr r0, _021D45E4 ; =0x00000311 - cmp r5, r0 - bne _021D4336 - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - mov r1, #0 - str r0, [sp, #8] - ldr r3, _021D45E8 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 -_021D4336: - ldr r0, _021D45EC ; =0x00000316 - cmp r5, r0 - bne _021D4368 - bl sub_0200F2AC - cmp r0, #1 - beq _021D4348 - bl sub_02022974 -_021D4348: - ldr r0, _021D45F0 ; =0x00000247 - mov r2, #4 - strb r2, [r4, r0] - mov r1, #8 - add r0, r0, #1 - strb r1, [r4, r0] - str r2, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - ldr r3, _021D45E8 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 -_021D4368: - mov r0, #0x3b - lsl r0, r0, #4 - cmp r5, r0 - bne _021D439A - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - ldr r0, _021D45F4 ; =0x0000025B - mov r3, #1 - strb r3, [r4, r0] - add r1, r0, #2 - mov r2, #0 - strb r2, [r4, r1] - add r0, r0, #1 - strb r3, [r4, r0] - ldr r0, [r4, #0x1c] - bl ov77_021D6CBC - bl sub_02014710 - cmp r0, #0 - beq _021D439A - bl sub_02022974 -_021D439A: - ldr r0, _021D45F8 ; =0x000003B1 - cmp r5, r0 - bne _021D43A8 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 -_021D43A8: - ldr r0, _021D45FC ; =0x000003CF - cmp r5, r0 - blt _021D4458 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #0x12 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - ldr r3, _021D45E8 ; =0x00007FFF - mov r0, #3 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #0x10 - strb r0, [r4, #8] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D43D8: - add r0, r6, #0 - add r1, r4, #0 - add r2, r5, #0 - bl ov77_021D513C - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4F38 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D6530 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D60E0 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D61B8 - ldr r0, _021D4600 ; =0x00000628 - cmp r5, r0 - blt _021D4458 - mov r0, #0x12 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - ldr r3, _021D45E8 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4428: - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4F38 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D6530 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D60E0 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D61B8 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4458 - mov r0, #0x19 - lsl r0, r0, #6 - cmp r5, r0 - bge _021D445A -_021D4458: - b _021D4B54 -_021D445A: - mov r0, #4 - mov r1, #0 - bl sub_02019120 - ldr r0, [r4, #0x14] - ldr r1, [r4, #0x18] - bl ov77_021D6000 - mov r0, #0x91 - mov r1, #1 - lsl r0, r0, #2 - strb r1, [r4, r0] - add r0, r6, #0 - add r1, r4, #0 - bl ov77_021D3A10 - mov r1, #1 - ldr r0, [r4, #0x14] - add r2, r1, #0 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #2 - mov r2, #1 - bl ov77_021D603C - mov r0, #1 - add r1, r0, #0 - bl sub_02019120 - mov r0, #2 - mov r1, #1 - bl sub_02019120 - mov r0, #3 - mov r1, #1 - bl sub_02019120 - mov r0, #5 - mov r1, #1 - bl sub_02019120 - mov r0, #6 - mov r1, #1 - bl sub_02019120 - mov r0, #7 - mov r1, #1 - bl sub_02019120 - mov r1, #1 - add r3, r1, #0 - ldr r0, [r4, #0x10] - mov r2, #0 - add r3, #0xff - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #2 - add r3, #0xfd - bl sub_02019184 - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #3 - add r3, r2, #0 - bl sub_02019184 - mov r1, #3 - ldr r0, [r4, #0x10] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - mov r1, #5 - add r3, r1, #0 - ldr r0, [r4, #0x10] - mov r2, #0 - add r3, #0xfb - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #5 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #6 - add r3, r2, #0 - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #6 - add r3, #0xfd - bl sub_02019184 - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #7 - add r3, r2, #0 - bl sub_02019184 - ldr r0, [r4, #0x10] - mov r1, #7 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r2, #0x26 - lsl r2, r2, #4 - mov r0, #1 - lsl r0, r0, #0x14 - add r1, r2, #0 - str r0, [r4, r2] - add r6, r2, #0 - mov r0, #0 - sub r1, #0x16 - strh r0, [r4, r1] - add r1, r2, #0 - mov r5, #0xff - sub r1, #0x14 - strh r5, [r4, r1] - add r1, r2, #0 - mov r3, #0x20 - sub r1, #0x12 - strh r3, [r4, r1] - mov r1, #0x9f - sub r6, #0x10 - strh r1, [r4, r6] - add r6, r2, #0 - sub r6, #0xe - strh r0, [r4, r6] - add r6, r2, #0 - sub r6, #0xc - strh r5, [r4, r6] - add r5, r2, #0 - sub r5, #0xa - strh r3, [r4, r5] - add r3, r2, #0 - sub r3, #8 - strh r1, [r4, r3] - mov r1, #1 - sub r2, #0x1b - strb r1, [r4, r2] - ldr r2, _021D45DC ; =0x04000050 - strb r0, [r4, #6] - strh r0, [r2] - ldr r2, _021D4604 ; =0x04001050 - ldr r3, _021D45E8 ; =0x00007FFF - strh r0, [r2] - mov r2, #0x12 - str r2, [sp] - str r1, [sp, #4] - mov r2, #0x4c - str r2, [sp, #8] - add r2, r1, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D45C2: - add r0, r4, #0 - bl ov77_021D4B70 - ldr r0, [r4, #0x14] - bl ov77_021D607C - bl sub_0200F2AC - cmp r0, #0 - beq _021D46B0 - ldr r0, _021D4608 ; =0x00000726 - b _021D460C - nop -_021D45DC: .word 0x04000050 -_021D45E0: .word 0x0000025D -_021D45E4: .word 0x00000311 -_021D45E8: .word 0x00007FFF -_021D45EC: .word 0x00000316 -_021D45F0: .word 0x00000247 -_021D45F4: .word 0x0000025B -_021D45F8: .word 0x000003B1 -_021D45FC: .word 0x000003CF -_021D4600: .word 0x00000628 -_021D4604: .word 0x04001050 -_021D4608: .word 0x00000726 -_021D460C: - cmp r5, r0 - blt _021D46B0 - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #3 - add r3, r2, #0 - bl sub_0201C63C - mov r1, #3 - add r3, r1, #0 - ldr r0, [r4, #0x10] - add r2, r1, #0 - add r3, #0xfd - bl sub_0201C63C - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #7 - add r3, r2, #0 - bl sub_0201C63C - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #7 - add r3, #0xfd - bl sub_0201C63C - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #2 - add r3, r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #6 - add r3, r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - mov r0, #0x92 - mov r1, #0x22 - lsl r0, r0, #2 - strb r1, [r4, r0] - mov r1, #1 - sub r0, r0, #2 - strb r1, [r4, r0] - ldr r0, [r4, #0x14] - mov r2, #0 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #2 - mov r2, #0 - bl ov77_021D603C - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D469C: - add r0, r4, #0 - bl ov77_021D4BE4 - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4C04 - ldr r0, _021D49F8 ; =0x00000735 - cmp r5, r0 - beq _021D46B2 -_021D46B0: - b _021D4B54 -_021D46B2: - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D46D2: - add r0, r4, #0 - bl ov77_021D4BE4 - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4C04 - bl sub_0200F2AC - cmp r0, #0 - beq _021D47B6 - ldr r0, _021D49FC ; =0x00000247 - mov r1, #0x22 - strb r1, [r4, r0] - mov r2, #0 - mov r1, #0x44 - add r0, r0, #1 - strb r1, [r4, r0] - ldr r0, [r4, #0x10] - mov r1, #1 - add r3, r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #1 - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - add r3, r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #5 - mov r2, #3 - mov r3, #0 - bl sub_0201C63C - mov r0, #4 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4742: - add r0, r4, #0 - bl ov77_021D4BE4 - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4C04 - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D6470 - bl sub_0200F2AC - cmp r0, #0 - beq _021D47B6 - ldr r0, _021D4A00 ; =0x00000744 - cmp r5, r0 - bne _021D47B0 - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #1 - add r3, r2, #0 - bl sub_0201C63C - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #1 - add r3, #0xfd - bl sub_0201C63C - mov r2, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - add r3, r2, #0 - bl sub_0201C63C - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - add r3, #0xfd - bl sub_0201C63C - ldr r0, [r4, #0x14] - mov r1, #0xb - mov r2, #1 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0xc - mov r2, #1 - bl ov77_021D603C - b _021D4B54 -_021D47B0: - add r0, #0x3c - cmp r5, r0 - bge _021D47B8 -_021D47B6: - b _021D4B54 -_021D47B8: - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - ldr r3, _021D4A04 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D47D8: - ldr r0, [r4, #0x14] - add r1, r5, #0 - bl ov77_021D6470 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4868 - mov r0, #0x40 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - ldr r3, _021D4A04 ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - ldr r0, [r4, #0x14] - mov r1, #0xb - mov r2, #0 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0xc - mov r2, #0 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0xd - mov r2, #1 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0xe - mov r2, #1 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0xf - mov r2, #1 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0x10 - mov r2, #1 - bl ov77_021D603C - ldr r0, [r4, #0x14] - mov r1, #0 - bl ov77_021D636C - add r0, r6, #0 - add r1, r4, #0 - bl ov77_021D3B5C - ldr r0, _021D4A08 ; =0x021BF6DC - mov r1, #0 - strb r1, [r0, #5] - bl sub_0201FFE8 - add r0, r4, #0 - bl ov77_021D3DC4 - ldr r0, _021D4A0C ; =0x00000246 - mov r1, #1 - strb r1, [r4, r0] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4868: - add r0, r4, #0 - bl ov77_021D4BE4 - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4C04 - b _021D4B54 -_021D4878: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - add r0, r4, #0 - add r1, r5, #0 - bl ov77_021D4DC8 - bl sub_0200F2AC - cmp r0, #0 - beq _021D48CA - ldr r0, _021D4A10 ; =0x000007DA - cmp r5, r0 - blt _021D48CA - mov r0, #4 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D48B8: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - bne _021D48CC -_021D48CA: - b _021D4B54 -_021D48CC: - mov r1, #0 - ldr r0, _021D4A14 ; =0x04000050 - mov r2, #0x3e - add r3, r1, #0 - str r1, [sp] - bl sub_020BF55C - mov r1, #5 - mov r2, #2 - mov r0, #0 - lsl r1, r1, #0x18 - lsl r2, r2, #8 - bl sub_020C4AF0 - mov r0, #4 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4906: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - beq _021D49E2 - ldr r0, [r4, #0x1c] - mov r1, #0 - add r2, r5, #0 - bl ov77_021D6E78 - cmp r0, #0 - beq _021D49E2 - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4946: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - beq _021D49E2 - ldr r0, _021D4A08 ; =0x021BF6DC - mov r1, #1 - strb r1, [r0, #5] - bl sub_0201FFE8 - add r0, r4, #0 - bl ov77_021D3DC4 - mov r0, #4 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4986: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - beq _021D49E2 - ldr r0, _021D4A18 ; =0x00000852 - cmp r5, r0 - blt _021D49E2 - ldr r0, [r4, #0x1c] - mov r1, #1 - add r2, r5, #0 - bl ov77_021D6E78 - cmp r0, #0 - beq _021D49E2 - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0xc] - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D49D0: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - bne _021D49E4 -_021D49E2: - b _021D4B54 -_021D49E4: - mov r2, #9 - lsl r2, r2, #6 - ldr r0, [r4, r2] - mov r1, #5 - lsl r1, r1, #0x18 - sub r2, #0x40 - bl sub_020C4B18 - ldr r0, _021D4A08 ; =0x021BF6DC - b _021D4A1C - ; .align 2, 0 -_021D49F8: .word 0x00000735 -_021D49FC: .word 0x00000247 -_021D4A00: .word 0x00000744 -_021D4A04: .word 0x00007FFF -_021D4A08: .word 0x021BF6DC -_021D4A0C: .word 0x00000246 -_021D4A10: .word 0x000007DA -_021D4A14: .word 0x04000050 -_021D4A18: .word 0x00000852 -_021D4A1C: - mov r1, #0 - strb r1, [r0, #5] - bl sub_0201FFE8 - add r0, r6, #0 - add r1, r4, #0 - bl ov77_021D3D4C - add r0, r4, #0 - bl ov77_021D3DC4 - ldr r0, [r4, #0x14] - mov r1, #1 - bl ov77_021D636C - mov r2, #0 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #1 - sub r3, #0x3c - bl sub_0201C63C - mov r2, #0 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #2 - sub r3, #0x3c - bl sub_0201C63C - mov r2, #0 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #3 - sub r3, #0x3c - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #5 - mov r2, #0 - mov r3, #0x3c - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #0 - mov r3, #0x3c - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #7 - mov r2, #0 - mov r3, #0x3c - bl sub_0201C63C - mov r0, #0x10 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4AA6: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4B54 - mov r0, #0x10 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #4 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4AD6: - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4B54 - ldr r0, _021D4B5C ; =0x000008A7 - cmp r5, r0 - blt _021D4AF4 - add r0, r4, #0 - bl ov77_021D4E90 -_021D4AF4: - ldr r0, _021D4B60 ; =0x000008A8 - cmp r5, r0 - blt _021D4B54 - ldr r1, _021D4B64 ; =0x00000247 - mov r0, #0x11 - ldrb r2, [r4, r1] - ldr r3, _021D4B68 ; =0x00007FFF - orr r0, r2 - strb r0, [r4, r1] - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4B24: - add r0, r4, #0 - bl ov77_021D4E90 - mov r1, #1 - ldr r0, [r4, #0x14] - lsl r1, r1, #0x10 - bl ov77_021D6290 - bl sub_0200F2AC - cmp r0, #0 - beq _021D4B54 - ldr r0, _021D4B6C ; =0x021BF6DC - mov r1, #1 - strb r1, [r0, #5] - bl sub_0201FFE8 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D4B54 -_021D4B4E: - add sp, #0xc - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_021D4B54: - mov r0, #0 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021D4B5C: .word 0x000008A7 -_021D4B60: .word 0x000008A8 -_021D4B64: .word 0x00000247 -_021D4B68: .word 0x00007FFF -_021D4B6C: .word 0x021BF6DC - thumb_func_end ov77_021D4230 - - thumb_func_start ov77_021D4B70 -ov77_021D4B70: ; 0x021D4B70 - push {r4, lr} - mov r3, #0x26 - add r4, r0, #0 - lsl r3, r3, #4 - add r0, r3, #0 - ldr r1, [r4, r3] - add r0, #0x20 - add r0, r1, r0 - str r0, [r4, r3] - add r0, r3, #4 - ldr r1, [r4, r0] - mov r0, #0x11 - lsl r0, r0, #4 - add r1, r1, r0 - add r0, r3, #4 - str r1, [r4, r0] - add r3, r3, #4 - ldr r3, [r4, r3] - ldr r0, [r4, #0x10] - asr r3, r3, #0xc - mov r1, #1 - mov r2, #3 - neg r3, r3 - bl sub_02019184 - mov r3, #0x26 - lsl r3, r3, #4 - ldr r3, [r4, r3] - ldr r0, [r4, #0x10] - asr r3, r3, #0xc - mov r1, #2 - mov r2, #3 - neg r3, r3 - bl sub_02019184 - mov r3, #0x99 - lsl r3, r3, #2 - ldr r3, [r4, r3] - ldr r0, [r4, #0x10] - asr r3, r3, #0xc - mov r1, #5 - mov r2, #3 - neg r3, r3 - bl sub_02019184 - mov r3, #0x26 - lsl r3, r3, #4 - ldr r3, [r4, r3] - ldr r0, [r4, #0x10] - asr r3, r3, #0xc - mov r1, #6 - mov r2, #3 - neg r3, r3 - bl sub_02019184 - mov r0, #0 - str r0, [r4, #0xc] - pop {r4, pc} - thumb_func_end ov77_021D4B70 - - thumb_func_start ov77_021D4BE4 -ov77_021D4BE4: ; 0x021D4BE4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #3 - mov r2, #1 - mov r3, #0x10 - bl sub_0201C63C - mov r2, #1 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #7 - sub r3, #0x11 - bl sub_0201C63C - pop {r4, pc} - thumb_func_end ov77_021D4BE4 - - thumb_func_start ov77_021D4C04 -ov77_021D4C04: ; 0x021D4C04 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - ldr r0, _021D4DB0 ; =0x00000744 - cmp r1, r0 - beq _021D4C10 - b _021D4D42 -_021D4C10: - ldr r7, _021D4DB4 ; =0x04000048 - ldr r3, _021D4DB8 ; =0x0000024A - ldrh r2, [r7] - mov r0, #0x3f - mov r1, #0x1f - bic r2, r0 - orr r1, r2 - mov r6, #0x20 - orr r1, r6 - strh r1, [r7] - ldrh r2, [r7, #2] - mov r1, #0x1d - add r5, r3, #4 - bic r2, r0 - orr r1, r2 - orr r1, r6 - strh r1, [r7, #2] - mov r1, #0 - strh r1, [r4, r3] - mov r2, #0xff - add r1, r3, #2 - strh r2, [r4, r1] - mov r1, #0 - strh r1, [r4, r5] - add r5, r3, #6 - mov r1, #0x88 - strh r1, [r4, r5] - add r1, r5, #0 - ldrsh r1, [r4, r1] - str r1, [sp] - add r1, r3, #4 - ldrsh r1, [r4, r1] - mov ip, r1 - ldrsh r1, [r4, r3] - lsl r5, r1, #8 - lsl r1, r2, #8 - and r1, r5 - add r5, r3, #2 - ldrsh r5, [r4, r5] - lsl r5, r5, #0x18 - lsr r5, r5, #0x18 - orr r5, r1 - add r1, r7, #0 - sub r1, #8 - strh r5, [r1] - mov r1, ip - lsl r5, r1, #8 - lsl r1, r2, #8 - and r1, r5 - ldr r5, [sp] - lsl r5, r5, #0x18 - lsr r5, r5, #0x18 - orr r5, r1 - sub r1, r7, #4 - strh r5, [r1] - lsl r1, r6, #0x15 - ldr r7, [r1, #0] - ldr r5, _021D4DBC ; =0xFFFF1FFF - and r7, r5 - lsl r5, r6, #8 - orr r5, r7 - str r5, [r1, #0] - ldr r1, _021D4DC0 ; =0x04001048 - mov r5, #0x1f - ldrh r7, [r1] - bic r7, r0 - orr r5, r7 - orr r5, r6 - strh r5, [r1] - ldrh r5, [r1, #2] - bic r5, r0 - mov r0, #0x1d - orr r0, r5 - orr r0, r6 - strh r0, [r1, #2] - ldrh r5, [r1] - ldr r0, _021D4DC4 ; =0xFFFFC0FF - and r5, r0 - mov r0, #0x1f - lsl r0, r0, #8 - orr r5, r0 - lsr r0, r1, #0xd - orr r0, r5 - add r5, r3, #0 - strh r0, [r1] - add r5, #8 - mov r0, #0 - strh r0, [r4, r5] - add r0, r3, #0 - add r0, #0xa - add r5, r3, #0 - strh r2, [r4, r0] - add r5, #0xc - mov r0, #0 - strh r0, [r4, r5] - add r5, r3, #0 - add r5, #0xe - mov r0, #0x88 - strh r0, [r4, r5] - add r0, r3, #0 - add r0, #0xe - ldrsh r6, [r4, r0] - add r0, r3, #0 - add r0, #0xc - ldrsh r5, [r4, r0] - add r0, r3, #0 - add r0, #8 - ldrsh r0, [r4, r0] - lsl r5, r5, #8 - lsl r7, r0, #8 - lsl r0, r2, #8 - and r0, r7 - add r7, r3, #0 - add r7, #0xa - ldrsh r7, [r4, r7] - lsl r7, r7, #0x18 - lsr r7, r7, #0x18 - orr r7, r0 - add r0, r1, #0 - sub r0, #8 - strh r7, [r0] - lsl r0, r2, #8 - and r5, r0 - lsl r0, r6, #0x18 - lsr r0, r0, #0x18 - orr r5, r0 - sub r0, r1, #4 - strh r5, [r0] - add r0, r3, #0 - add r0, #0xe - add r3, #0xc - ldrsh r0, [r4, r0] - ldrsh r5, [r4, r3] - lsr r4, r1, #0x12 - sub r3, r1, #6 - strh r4, [r3] - lsl r0, r0, #0x18 - lsl r3, r5, #8 - lsl r2, r2, #8 - and r2, r3 - lsr r0, r0, #0x18 - orr r2, r0 - sub r0, r1, #2 - strh r2, [r0] - sub r1, #0x48 - ldr r2, [r1, #0] - ldr r0, _021D4DBC ; =0xFFFF1FFF - and r2, r0 - mov r0, #6 - lsl r0, r0, #0xc - orr r0, r2 - str r0, [r1, #0] - pop {r3, r4, r5, r6, r7, pc} -_021D4D42: - ble _021D4DAE - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02019FF0 - mov r1, #1 - lsl r1, r1, #8 - cmp r0, r1 - blt _021D4D60 - mov r1, #0x92 - lsl r1, r1, #2 - ldrb r2, [r4, r1] - mov r0, #2 - orr r0, r2 - strb r0, [r4, r1] -_021D4D60: - ldr r0, [r4, #0x10] - mov r1, #5 - bl sub_02019FF0 - mov r1, #0xff - mvn r1, r1 - cmp r0, r1 - bgt _021D4D7C - mov r1, #0x92 - lsl r1, r1, #2 - ldrb r2, [r4, r1] - mov r0, #0x20 - orr r0, r2 - strb r0, [r4, r1] -_021D4D7C: - mov r1, #1 - ldr r0, [r4, #0x10] - add r2, r1, #0 - mov r3, #0xc - bl sub_0201C63C - mov r2, #4 - ldr r0, [r4, #0x10] - mov r1, #1 - sub r3, r2, #5 - bl sub_0201C63C - mov r2, #1 - add r3, r2, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - sub r3, #0xd - bl sub_0201C63C - mov r2, #4 - ldr r0, [r4, #0x10] - mov r1, #5 - sub r3, r2, #5 - bl sub_0201C63C -_021D4DAE: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D4DB0: .word 0x00000744 -_021D4DB4: .word 0x04000048 -_021D4DB8: .word 0x0000024A -_021D4DBC: .word 0xFFFF1FFF -_021D4DC0: .word 0x04001048 -_021D4DC4: .word 0xFFFFC0FF - thumb_func_end ov77_021D4C04 - - thumb_func_start ov77_021D4DC8 -ov77_021D4DC8: ; 0x021D4DC8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _021D4E84 ; =0x00000788 - add r4, r1, #0 - cmp r4, r0 - ble _021D4E0A - ldr r0, [r5, #0x10] - mov r1, #1 - bl sub_020192EC - add r3, r0, #0 - add r3, #0x14 - cmp r3, #0 - ble _021D4DE6 - mov r3, #0 -_021D4DE6: - ldr r0, [r5, #0x10] - mov r1, #1 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r5, #0x10] - mov r1, #5 - bl sub_020192EC - add r3, r0, #0 - sub r3, #0x14 - bpl _021D4E00 - mov r3, #0 -_021D4E00: - ldr r0, [r5, #0x10] - mov r1, #5 - mov r2, #0 - bl sub_0201C63C -_021D4E0A: - ldr r0, _021D4E88 ; =0x0000078E - cmp r4, r0 - blt _021D4E46 - ldr r0, [r5, #0x10] - mov r1, #2 - bl sub_020192EC - add r3, r0, #0 - add r3, #0x14 - cmp r3, #0 - ble _021D4E22 - mov r3, #0 -_021D4E22: - ldr r0, [r5, #0x10] - mov r1, #2 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r5, #0x10] - mov r1, #6 - bl sub_020192EC - add r3, r0, #0 - sub r3, #0x14 - bpl _021D4E3C - mov r3, #0 -_021D4E3C: - ldr r0, [r5, #0x10] - mov r1, #6 - mov r2, #0 - bl sub_0201C63C -_021D4E46: - ldr r0, _021D4E8C ; =0x00000794 - cmp r4, r0 - blt _021D4E82 - ldr r0, [r5, #0x10] - mov r1, #3 - bl sub_020192EC - add r3, r0, #0 - add r3, #0x14 - cmp r3, #0 - ble _021D4E5E - mov r3, #0 -_021D4E5E: - ldr r0, [r5, #0x10] - mov r1, #3 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r5, #0x10] - mov r1, #7 - bl sub_020192EC - add r3, r0, #0 - sub r3, #0x14 - bpl _021D4E78 - mov r3, #0 -_021D4E78: - ldr r0, [r5, #0x10] - mov r1, #7 - mov r2, #0 - bl sub_0201C63C -_021D4E82: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D4E84: .word 0x00000788 -_021D4E88: .word 0x0000078E -_021D4E8C: .word 0x00000794 - thumb_func_end ov77_021D4DC8 - - thumb_func_start ov77_021D4E90 -ov77_021D4E90: ; 0x021D4E90 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_020192EC - add r3, r0, #0 - add r3, #0xc - cmp r3, #0 - ble _021D4EA6 - mov r3, #0 -_021D4EA6: - ldr r0, [r4, #0x10] - mov r1, #1 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #5 - bl sub_020192EC - add r3, r0, #0 - sub r3, #0xc - bpl _021D4EC0 - mov r3, #0 -_021D4EC0: - ldr r0, [r4, #0x10] - mov r1, #5 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #2 - bl sub_020192EC - add r3, r0, #0 - add r3, #0xc - cmp r3, #0 - ble _021D4EDC - mov r3, #0 -_021D4EDC: - ldr r0, [r4, #0x10] - mov r1, #2 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #6 - bl sub_020192EC - add r3, r0, #0 - sub r3, #0xc - bpl _021D4EF6 - mov r3, #0 -_021D4EF6: - ldr r0, [r4, #0x10] - mov r1, #6 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #3 - bl sub_020192EC - add r3, r0, #0 - add r3, #0xc - cmp r3, #0 - ble _021D4F12 - mov r3, #0 -_021D4F12: - ldr r0, [r4, #0x10] - mov r1, #3 - mov r2, #0 - bl sub_0201C63C - ldr r0, [r4, #0x10] - mov r1, #7 - bl sub_020192EC - add r3, r0, #0 - sub r3, #0xc - bpl _021D4F2C - mov r3, #0 -_021D4F2C: - ldr r0, [r4, #0x10] - mov r1, #7 - mov r2, #0 - bl sub_0201C63C - pop {r4, pc} - thumb_func_end ov77_021D4E90 - - thumb_func_start ov77_021D4F38 -ov77_021D4F38: ; 0x021D4F38 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x70 - add r4, r0, #0 - add r0, sp, #0x64 - mov r2, #0 - str r2, [r0, #0] - ldr r5, _021D5100 ; =0x000004A7 - str r2, [r0, #4] - str r2, [r0, #8] - cmp r1, r5 - bge _021D4F84 - ldr r0, [r4, #0x28] - bl sub_02020A88 - ldr r1, _021D5104 ; =0x000005C1 - sub r0, #0x20 - cmp r0, r1 - ble _021D4F66 - ldr r0, _021D5108 ; =0x0000FFE0 - ldr r1, [r4, #0x28] - bl sub_0202094C - b _021D4F6E -_021D4F66: - add r0, r1, #0 - ldr r1, [r4, #0x28] - bl sub_02020910 -_021D4F6E: - mov r0, #2 - ldr r1, [sp, #0x6c] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x6c] - ldr r1, [r4, #0x28] - add r0, sp, #0x64 - bl sub_02020990 - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} -_021D4F84: - bne _021D502A - ldr r6, _021D510C ; =0x021D7470 - add r5, sp, #0x58 - ldmia r6!, {r0, r1} - add r3, r5, #0 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - ldr r1, _021D5110 ; =0x0029AEC1 - str r0, [r5, #0] - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x28] - ldr r2, _021D5114 ; =0x021D7500 - str r0, [sp, #8] - add r0, r3, #0 - ldr r3, _021D5104 ; =0x000005C1 - bl sub_020206D0 - ldr r5, _021D5118 ; =0x021D74A0 - add r3, sp, #0x4c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r1, [r4, #0x28] - add r0, r2, #0 - bl sub_02020990 - bl sub_020B2628 - ldr r3, _021D511C ; =0x00001194 - mov r0, #1 - mov r1, #0 - mov r2, #3 - bl sub_020BFC74 - ldr r1, _021D5120 ; =0x001F7FFF - ldr r0, _021D5124 ; =0x04000358 - mov r7, #0 - str r1, [r0, #0] - mov r0, #4 - add r1, r7, #0 - mov r2, #8 - mov r3, #0xc - add r4, sp, #0x2c -_021D4FE0: - lsl r5, r3, #0x18 - mov ip, r5 - lsl r5, r0, #8 - lsl r6, r2, #0x10 - orr r5, r1 - orr r5, r6 - mov r6, ip - orr r5, r6 - add r7, r7, #1 - stmia r4!, {r5} - add r0, #0x10 - add r1, #0x10 - add r2, #0x10 - add r3, #0x10 - cmp r7, #8 - blt _021D4FE0 - add r0, sp, #0x2c - bl sub_020BFD44 - mov r0, #9 - str r0, [sp] - ldr r0, _021D5128 ; =0x04000050 - mov r1, #2 - mov r2, #0x21 - mov r3, #7 - bl sub_020BF55C - mov r0, #1 - mov r1, #0 - bl sub_02019060 - mov r0, #1 - add r1, r0, #0 - bl sub_02019120 - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} -_021D502A: - add r3, r5, #0 - add r3, #0xd2 - cmp r1, r3 - bge _021D5052 - mov r1, #1 - ldr r2, [sp, #0x64] - lsl r1, r1, #0xe - add r1, r2, r1 - str r1, [sp, #0x64] - ldr r1, [r4, #0x28] - bl sub_02020990 - mov r1, #1 - ldr r0, [r4, #0x10] - add r2, r1, #0 - mov r3, #4 - bl sub_0201C63C - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} -_021D5052: - add r5, #0xd2 - cmp r1, r5 - bne _021D50CC - ldr r6, _021D512C ; =0x021D744C - add r5, sp, #0x20 - ldmia r6!, {r0, r1} - add r3, r5, #0 - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - ldr r1, _021D5110 ; =0x0029AEC1 - str r0, [r5, #0] - str r2, [sp] - str r2, [sp, #4] - ldr r0, [r4, #0x28] - ldr r2, _021D5114 ; =0x021D7500 - str r0, [sp, #8] - add r0, r3, #0 - ldr r3, _021D5104 ; =0x000005C1 - bl sub_020206D0 - ldr r5, _021D5130 ; =0x021D747C - add r3, sp, #0x14 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r1, [r4, #0x28] - add r0, r2, #0 - bl sub_02020990 - ldr r2, _021D5134 ; =0x021D743C - add r1, sp, #0xc - ldrh r3, [r2] - add r0, sp, #0xc - strh r3, [r1] - ldrh r3, [r2, #2] - strh r3, [r1, #2] - ldrh r3, [r2, #4] - ldrh r2, [r2, #6] - strh r3, [r1, #4] - strh r2, [r1, #6] - ldr r1, [r4, #0x28] - bl sub_020209F8 - bl sub_020B2628 - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - ldr r0, _021D5128 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - mov r0, #1 - bl sub_02019120 - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} -_021D50CC: - ldr r0, _021D5138 ; =0x00000618 - cmp r1, r0 - blt _021D50EA - ldr r0, [r4, #0x28] - bl sub_02020A88 - mov r1, #1 - add r0, #0x18 - lsl r1, r1, #0xe - cmp r0, r1 - bge _021D50EA - ldr r1, [r4, #0x28] - mov r0, #0x18 - bl sub_0202094C -_021D50EA: - mov r0, #2 - ldr r1, [sp, #0x64] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x64] - ldr r1, [r4, #0x28] - add r0, sp, #0x64 - bl sub_02020990 - add sp, #0x70 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D5100: .word 0x000004A7 -_021D5104: .word 0x000005C1 -_021D5108: .word 0x0000FFE0 -_021D510C: .word 0x021D7470 -_021D5110: .word 0x0029AEC1 -_021D5114: .word 0x021D7500 -_021D5118: .word 0x021D74A0 -_021D511C: .word 0x00001194 -_021D5120: .word 0x001F7FFF -_021D5124: .word 0x04000358 -_021D5128: .word 0x04000050 -_021D512C: .word 0x021D744C -_021D5130: .word 0x021D747C -_021D5134: .word 0x021D743C -_021D5138: .word 0x00000618 - thumb_func_end ov77_021D4F38 - - thumb_func_start ov77_021D513C -ov77_021D513C: ; 0x021D513C - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _021D524C ; =0x00000573 - add r4, r1, #0 - cmp r2, r0 - bgt _021D5174 - bge _021D51FA - sub r0, #0xd2 - sub r0, r2, r0 - cmp r0, #9 - bhi _021D5246 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5160: ; jump table - .short _021D517E - _021D5160 - 2 ; case 0 - .short _021D5246 - _021D5160 - 2 ; case 1 - .short _021D5246 - _021D5160 - 2 ; case 2 - .short _021D5246 - _021D5160 - 2 ; case 3 - .short _021D5246 - _021D5160 - 2 ; case 4 - .short _021D5246 - _021D5160 - 2 ; case 5 - .short _021D519A - _021D5160 - 2 ; case 6 - .short _021D51B8 - _021D5160 - 2 ; case 7 - .short _021D51C4 - _021D5160 - 2 ; case 8 - .short _021D51D0 - _021D5160 - 2 ; case 9 -_021D5174: - ldr r0, _021D5250 ; =0x00000579 - cmp r2, r0 - beq _021D5216 - add sp, #0xc - pop {r4, r5, pc} -_021D517E: - mov r0, #4 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - add sp, #0xc - pop {r4, r5, pc} -_021D519A: - bl sub_0200F2AC - cmp r0, #1 - beq _021D51A6 - bl sub_02022974 -_021D51A6: - add r0, r5, #0 - bl ov77_021D35B8 - add r0, r4, #0 - mov r1, #1 - bl ov77_021D40DC - add sp, #0xc - pop {r4, r5, pc} -_021D51B8: - add r0, r4, #0 - mov r1, #1 - bl ov77_021D40DC - add sp, #0xc - pop {r4, r5, pc} -_021D51C4: - add r0, r4, #0 - mov r1, #1 - bl ov77_021D40DC - add sp, #0xc - pop {r4, r5, pc} -_021D51D0: - add r0, r4, #0 - mov r1, #1 - bl ov77_021D40DC - cmp r0, #1 - beq _021D51E0 - bl sub_02022974 -_021D51E0: - mov r0, #4 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - add sp, #0xc - pop {r4, r5, pc} -_021D51FA: - mov r0, #4 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - add sp, #0xc - pop {r4, r5, pc} -_021D5216: - bl sub_0200F2AC - cmp r0, #1 - beq _021D5222 - bl sub_02022974 -_021D5222: - add r0, r5, #0 - bl ov77_021D35B8 - add r0, r4, #0 - mov r1, #2 - bl ov77_021D40B8 - mov r0, #4 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 -_021D5246: - add sp, #0xc - pop {r4, r5, pc} - nop -_021D524C: .word 0x00000573 -_021D5250: .word 0x00000579 - thumb_func_end ov77_021D513C - - thumb_func_start ov77_021D5254 -ov77_021D5254: ; 0x021D5254 - push {r3, r4, r5, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - mov r5, #0xa7 - lsl r5, r5, #2 - cmp r0, #0 - beq _021D5266 - mov r0, #3 - strb r0, [r4, r5] -_021D5266: - ldrb r0, [r4, r5] - cmp r0, #3 - bhi _021D52C2 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D5278: ; jump table - .short _021D5280 - _021D5278 - 2 ; case 0 - .short _021D528E - _021D5278 - 2 ; case 1 - .short _021D52A0 - _021D5278 - 2 ; case 2 - .short _021D52B8 - _021D5278 - 2 ; case 3 -_021D5280: - add r0, r4, #0 - bl ov77_021D52C8 - ldrb r0, [r4, r5] - add r0, r0, #1 - strb r0, [r4, r5] - b _021D52C2 -_021D528E: - mov r0, #0xa7 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov77_021D5308 - ldrb r0, [r4, r5] - add r0, r0, #1 - strb r0, [r4, r5] - b _021D52C2 -_021D52A0: - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r1, [r4, #4] - add r0, r4, r0 - bl ov77_021D5390 - cmp r0, #0 - beq _021D52C2 - ldrb r0, [r4, r5] - add r0, r0, #1 - strb r0, [r4, r5] - b _021D52C2 -_021D52B8: - add r0, r4, #0 - bl ov77_021D5478 - mov r0, #1 - pop {r3, r4, r5, pc} -_021D52C2: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D5254 - - thumb_func_start ov77_021D52C8 -ov77_021D52C8: ; 0x021D52C8 - push {r4, lr} - add r4, r0, #0 - bl ov77_021D25F0 - add r0, r4, #0 - bl ov77_021D2A00 - mov r0, #0xa9 - ldr r1, [r4, #0xc] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r1, _021D52FC ; =0x00007FFF - mov r0, #0 - bl sub_0200F344 - ldr r1, _021D52FC ; =0x00007FFF - mov r0, #1 - bl sub_0200F344 - ldr r0, _021D5300 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - ldr r0, _021D5304 ; =0x0000029E - mov r1, #1 - strb r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_021D52FC: .word 0x00007FFF -_021D5300: .word 0x04000050 -_021D5304: .word 0x0000029E - thumb_func_end ov77_021D52C8 - - thumb_func_start ov77_021D5308 -ov77_021D5308: ; 0x021D5308 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r2, #0 - add r4, r0, #0 - str r2, [sp] - mov r0, #0x4c - str r0, [sp, #4] - mov r0, #0x80 - mov r1, #0x63 - add r3, r2, #0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #8] - mov r0, #0x80 - mov r1, #0x62 - mov r3, #2 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - ldr r2, [r4, #8] - mov r0, #0x80 - mov r1, #0x61 - mov r3, #2 - bl sub_02006E60 - bl sub_0201FF00 - mov r0, #0 - bl sub_0201FF48 - mov r0, #0 - bl sub_0201FFB0 - ldr r0, _021D538C ; =0xFFFE8000 - mov r2, #0 - str r0, [r4, #4] - ldr r0, [r4, #8] - mov r1, #2 - add r3, r2, #0 - bl sub_02019184 - ldr r5, [r4, #4] - ldr r0, [r4, #8] - asr r3, r5, #0xb - lsr r3, r3, #0x14 - add r3, r5, r3 - mov r1, #2 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - mov r0, #1 - strb r0, [r4, #3] - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D538C: .word 0xFFFE8000 - thumb_func_end ov77_021D5308 - - thumb_func_start ov77_021D5390 -ov77_021D5390: ; 0x021D5390 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldrb r0, [r4, #1] - cmp r0, #4 - bhi _021D5448 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D53A8: ; jump table - .short _021D53B2 - _021D53A8 - 2 ; case 0 - .short _021D53D6 - _021D53A8 - 2 ; case 1 - .short _021D5404 - _021D53A8 - 2 ; case 2 - .short _021D5414 - _021D53A8 - 2 ; case 3 - .short _021D543A - _021D53A8 - 2 ; case 4 -_021D53B2: - ldr r0, _021D546C ; =0x0000089D - cmp r1, r0 - blt _021D5448 - mov r0, #0x1e - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - ldr r3, _021D5470 ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D5448 -_021D53D6: - bl sub_0200F2AC - cmp r0, #0 - beq _021D5448 - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x5a - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D5448 -_021D5404: - bl sub_0200F2AC - cmp r0, #0 - beq _021D5448 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D5448 -_021D5414: - ldr r0, _021D5474 ; =0x00000974 - cmp r1, r0 - blt _021D5448 - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - b _021D5448 -_021D543A: - bl sub_0200F2AC - cmp r0, #0 - beq _021D5448 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D5448: - mov r0, #1 - ldr r1, [r4, #4] - lsl r0, r0, #0xa - add r5, r1, r0 - asr r3, r5, #0xb - str r5, [r4, #4] - lsr r3, r3, #0x14 - add r3, r5, r3 - ldr r0, [r4, #8] - mov r1, #2 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_021D546C: .word 0x0000089D -_021D5470: .word 0x00007FFF -_021D5474: .word 0x00000974 - thumb_func_end ov77_021D5390 - - thumb_func_start ov77_021D5478 -ov77_021D5478: ; 0x021D5478 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D54A8 ; =0x0000029E - ldrb r0, [r4, r0] - cmp r0, #0 - beq _021D5498 - ldr r0, [r4, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0xc] - bl sub_020181C4 - ldr r0, _021D54A8 ; =0x0000029E - mov r1, #0 - strb r1, [r4, r0] -_021D5498: - ldr r0, _021D54AC ; =0x0000029F - ldrb r1, [r4, r0] - cmp r1, #0 - beq _021D54A4 - mov r1, #0 - strb r1, [r4, r0] -_021D54A4: - pop {r4, pc} - nop -_021D54A8: .word 0x0000029E -_021D54AC: .word 0x0000029F - thumb_func_end ov77_021D5478 - - thumb_func_start ov77_021D54B0 -ov77_021D54B0: ; 0x021D54B0 - push {r4, lr} - sub sp, #0x10 - ldr r4, _021D54E4 ; =0x021D78BC - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_0201E86C - mov r0, #0xb - mov r1, #0x4c - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - mov r0, #6 - mov r1, #0x4c - bl sub_0201DBEC - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_021D54E4: .word 0x021D78BC - thumb_func_end ov77_021D54B0 - - thumb_func_start ov77_021D54E8 -ov77_021D54E8: ; 0x021D54E8 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r6, r0, #0 - mov r0, #0 - str r6, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - ldr r0, [sp, #0x44] - add r5, r1, #0 - str r0, [sp, #0xc] - mov r1, #0x4b - str r2, [sp, #0x10] - lsl r1, r1, #2 - ldr r0, [r5, r1] - add r4, r3, #0 - str r0, [sp, #0x14] - add r0, r1, #4 - ldr r0, [r5, r0] - add r2, r6, #0 - str r0, [sp, #0x18] - add r0, r1, #0 - add r0, #8 - ldr r0, [r5, r0] - add r1, #0xc - str r0, [sp, #0x1c] - ldr r0, [r5, r1] - add r1, r6, #0 - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r0, [sp, #0x40] - add r3, r6, #0 - bl sub_020093B4 - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r4, #0] - ldr r0, [sp, #0x40] - str r0, [r4, #4] - str r1, [r4, #8] - str r1, [r4, #0xc] - mov r0, #1 - str r1, [r4, #0x10] - lsl r0, r0, #0xc - str r0, [r4, #0x14] - str r0, [r4, #0x18] - str r0, [r4, #0x1c] - strh r1, [r4, #0x20] - mov r0, #1 - str r0, [r4, #0x24] - ldr r0, [sp, #0x48] - str r0, [r4, #0x28] - mov r0, #0x4c - str r0, [r4, #0x2c] - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - thumb_func_end ov77_021D54E8 - - thumb_func_start ov77_021D555C -ov77_021D555C: ; 0x021D555C - mov r0, #0x2a - lsl r0, r0, #4 - bx lr - ; .align 2, 0 - thumb_func_end ov77_021D555C - - thumb_func_start ov77_021D5564 -ov77_021D5564: ; 0x021D5564 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - add r5, r0, #0 - add r3, r1, #0 - ldr r0, _021D55C4 ; =0xFFCFFFEF - mov r1, #0x10 - and r3, r0 - orr r3, r1 - str r3, [r2, #0] - ldr r3, _021D55C8 ; =0x04001000 - ldr r2, [r3, #0] - and r0, r2 - orr r0, r1 - str r0, [r3, #0] - bl ov77_021D54B0 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x80 - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r2, #0x4c - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - mov r0, #0x21 - add r1, r5, #4 - mov r2, #0x4c - bl sub_020095C4 - str r0, [r5, #0] - mov r0, #3 - mov r1, #0x4c - bl sub_0201DCC8 - mov r1, #0xa7 - lsl r1, r1, #2 - ldr r4, _021D55CC ; =0x021D7914 - b _021D55D0 - nop -_021D55C4: .word 0xFFCFFFEF -_021D55C8: .word 0x04001000 -_021D55CC: .word 0x021D7914 -_021D55D0: - str r0, [r5, r1] - mov r7, #0 - add r6, r5, #0 -_021D55D6: - ldrb r0, [r4] - add r1, r7, #0 - mov r2, #0x4c - bl sub_02009714 - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r6, r1] - add r7, r7, #1 - add r4, r4, #1 - add r6, r6, #4 - cmp r7, #4 - blt _021D55D6 - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x2e - bl sub_0200985C - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x2e - mov r3, #0 - bl sub_0200985C - mov r1, #0x53 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x32 - mov r3, #0 - bl sub_0200985C - mov r1, #0x57 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #3 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x57 - mov r3, #0 - bl sub_0200985C - mov r1, #0x5b - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x16 - mov r3, #0 - bl sub_0200985C - mov r1, #0x5f - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #5 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x17 - mov r3, #0 - bl sub_0200985C - mov r1, #0x63 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x5b - mov r3, #0 - bl sub_0200985C - mov r1, #0x67 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #7 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x53 - mov r3, #0 - bl sub_0200985C - mov r1, #0x6b - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x53 - mov r3, #0 - bl sub_0200985C - mov r1, #0x6f - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #9 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x36 - mov r3, #0 - bl sub_0200985C - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xa - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x36 - mov r3, #0 - bl sub_0200985C - mov r1, #0x77 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r3, #0 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x31 - bl sub_020098B8 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r1, #1 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x31 - mov r3, #0 - bl sub_020098B8 - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x35 - mov r3, #0 - bl sub_020098B8 - mov r1, #0x16 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #3 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x5a - mov r3, #0 - bl sub_020098B8 - mov r1, #0x17 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x14 - mov r3, #0 - bl sub_020098B8 - mov r1, #6 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r0, #5 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x15 - mov r3, #0 - bl sub_020098B8 - mov r1, #0x19 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x5e - mov r3, #0 - bl sub_020098B8 - mov r1, #0x1a - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #7 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x56 - mov r3, #0 - bl sub_020098B8 - mov r1, #0x1b - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x56 - mov r3, #0 - bl sub_020098B8 - mov r1, #7 - lsl r1, r1, #6 - str r0, [r5, r1] - mov r0, #9 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x39 - mov r3, #0 - bl sub_020098B8 - mov r1, #0x1d - lsl r1, r1, #4 - str r0, [r5, r1] - mov r0, #0xa - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x39 - mov r3, #0 - bl sub_020098B8 - mov r1, #0x1e - lsl r1, r1, #4 - str r0, [r5, r1] - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x30 - bl sub_02009918 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x30 - mov r3, #0 - bl sub_02009918 - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x33 - mov r3, #0 - bl sub_02009918 - mov r1, #0x59 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #3 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x59 - mov r3, #0 - bl sub_02009918 - mov r1, #0x5d - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #4 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x18 - mov r3, #0 - bl sub_02009918 - mov r1, #0x61 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #6 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x5d - mov r3, #0 - bl sub_02009918 - mov r1, #0x69 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #7 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x55 - mov r3, #0 - bl sub_02009918 - mov r1, #0x6d - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #8 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x55 - mov r3, #0 - bl sub_02009918 - mov r1, #0x71 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #9 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x37 - mov r3, #0 - bl sub_02009918 - mov r1, #0x75 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xa - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x37 - mov r3, #0 - bl sub_02009918 - mov r1, #0x79 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #5 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x19 - mov r3, #0 - bl sub_02009918 - mov r1, #0x65 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x2f - bl sub_02009918 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #1 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x2f - mov r3, #0 - bl sub_02009918 - mov r1, #0x56 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #2 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x34 - mov r3, #0 - bl sub_02009918 - mov r1, #0x5a - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #3 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x58 - mov r3, #0 - bl sub_02009918 - mov r1, #0x5e - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #4 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x1a - mov r3, #0 - bl sub_02009918 - mov r1, #0x62 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #5 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x1b - mov r3, #0 - bl sub_02009918 - mov r1, #0x66 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #6 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x5c - mov r3, #0 - bl sub_02009918 - mov r1, #0x6a - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #7 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x54 - mov r3, #0 - bl sub_02009918 - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #8 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x54 - mov r3, #0 - bl sub_02009918 - mov r1, #0x72 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #9 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x38 - mov r3, #0 - bl sub_02009918 - mov r1, #0x76 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #0xa - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r5, r0] - mov r1, #0x80 - mov r2, #0x38 - mov r3, #0 - bl sub_02009918 - mov r1, #0x7a - lsl r1, r1, #2 - add r7, r1, #0 - add r6, r1, #0 - str r0, [r5, r1] - mov r4, #0 - sub r7, #0xac - sub r6, #0xa8 -_021D5B8C: - ldr r0, [r5, r7] - bl sub_0200A3DC - ldr r0, [r5, r6] - bl sub_0200A640 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xb - blt _021D5B8C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov77_021D5564 - - thumb_func_start ov77_021D5BAC -ov77_021D5BAC: ; 0x021D5BAC - push {r3, r4, r5, r6, r7, lr} - mov r7, #5 - add r5, r0, #0 - mov r4, #0 - lsl r7, r7, #6 -_021D5BB6: - lsl r0, r4, #4 - add r6, r5, r0 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r6, r0] - bl sub_0200A4E4 - ldr r0, [r6, r7] - bl sub_0200A6DC - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0xb - blo _021D5BB6 - mov r6, #0x4b - mov r4, #0 - lsl r6, r6, #2 -_021D5BDA: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - bl sub_02009754 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021D5BDA - ldr r0, [r5, #0] - bl sub_02021964 - mov r0, #0x23 - lsl r0, r0, #4 - mov r4, #0 - add r6, r5, r0 - mov r7, #0x24 -_021D5BFE: - add r0, r4, #0 - mul r0, r7 - add r0, r6, r0 - bl sub_020094F0 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D5BFE - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _021D5C28 - bl sub_0201DCF0 - mov r0, #0xa7 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_021D5C28: - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - bl sub_0201DC3C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov77_021D5BAC - - thumb_func_start ov77_021D5C3C -ov77_021D5C3C: ; 0x021D5C3C - push {r4, r5, r6, r7, lr} - sub sp, #0xac - ldr r3, _021D5FA4 ; =0x021D78FC - add r5, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x40 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r3, _021D5FA8 ; =0x021D78CC - add r2, sp, #0x28 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r3, _021D5FAC ; =0x021D78E4 - add r2, sp, #0x10 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r0, #0x23 - lsl r0, r0, #4 - add r0, r5, r0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - add r1, r5, #0 - add r2, r0, #0 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #5 - lsl r0, r0, #0x10 - str r0, [sp, #0x60] - mov r0, #7 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x7b - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x9e - lsl r0, r0, #2 - add r0, r5, r0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r1, #2 - str r1, [sp, #8] - add r1, r5, #0 - mov r2, #0 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #5 - lsl r0, r0, #0x10 - str r0, [sp, #0x60] - mov r0, #0x13 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x1f - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x95 - lsl r0, r0, #2 - add r0, r5, r0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #2 - add r1, r5, #0 - mov r2, #0 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #0xb - lsl r0, r0, #0x10 - str r0, [sp, #0x60] - mov r0, #7 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x7d - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, sp, #0x88 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #3 - add r1, r5, #0 - add r3, sp, #0x58 - bl ov77_021D54E8 - ldr r0, _021D5FB0 ; =0xFFFC0000 - str r0, [sp, #0x60] - mov r0, #7 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x7e - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, sp, #0x88 - str r0, [sp] - mov r2, #0 - str r2, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #6 - add r1, r5, #0 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #5 - lsl r0, r0, #0x12 - str r0, [sp, #0x60] - mov r0, #7 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x85 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, sp, #0x88 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r2, #1 - mov r0, #7 - add r1, r5, #0 - add r3, sp, #0x58 - str r2, [sp, #8] - bl ov77_021D54E8 - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x60] - mov r0, #6 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x86 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CF8 - add r0, sp, #0x88 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #8 - add r1, r5, #0 - mov r2, #1 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x60] - mov r0, #0x12 - lsl r0, r0, #0x10 - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x87 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CF8 - add r0, sp, #0x88 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #9 - add r1, r5, #0 - mov r2, #3 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x60] - mov r0, #0x1a - lsl r0, r0, #0xe - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x22 - lsl r1, r1, #4 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x89 - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, sp, #0x88 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xa - add r1, r5, #0 - mov r2, #3 - add r3, sp, #0x58 - bl ov77_021D54E8 - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x60] - mov r0, #0x4a - lsl r0, r0, #0xe - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x8a - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - add r0, sp, #0x58 - bl sub_02021AA0 - mov r1, #0x8b - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0 - str r0, [sp, #0xc] - add r7, sp, #0x28 - add r6, sp, #0x10 - add r4, sp, #0x40 -_021D5F36: - add r0, sp, #0x88 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #4 - add r1, r5, #0 - mov r2, #0 - add r3, sp, #0x58 - bl ov77_021D54E8 - ldr r0, [r7, #0] - lsl r0, r0, #0xc - str r0, [sp, #0x60] - ldr r0, [r6, #0] - lsl r0, r0, #0xc - str r0, [sp, #0x64] - add r0, sp, #0x58 - bl sub_02021AA0 - ldr r1, [r4, #0] - lsl r1, r1, #2 - add r2, r5, r1 - mov r1, #0x7b - lsl r1, r1, #2 - str r0, [r2, r1] - ldr r0, [r4, #0] - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r4, #0] - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CAC - ldr r0, [sp, #0xc] - add r7, r7, #4 - add r0, r0, #1 - add r6, r6, #4 - add r4, r4, #4 - str r0, [sp, #0xc] - cmp r0, #6 - blt _021D5F36 - add sp, #0xac - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D5FA4: .word 0x021D78FC -_021D5FA8: .word 0x021D78CC -_021D5FAC: .word 0x021D78E4 -_021D5FB0: .word 0xFFFC0000 - thumb_func_end ov77_021D5C3C - - thumb_func_start ov77_021D5FB4 -ov77_021D5FB4: ; 0x021D5FB4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - add r3, r0, #0 - add r0, sp, #0x3c - str r0, [sp] - mov r2, #0 - add r6, r1, #0 - add r1, r3, #0 - str r2, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #5 - add r3, sp, #0xc - bl ov77_021D54E8 - mov r5, #0 - add r7, sp, #0xc -_021D5FD6: - add r0, r6, #0 - add r1, r5, #0 - bl ov77_021D6794 - add r4, r0, #0 - add r0, r7, #0 - bl sub_02021AA0 - str r0, [r4, #0] - mov r1, #0 - bl sub_02021CC8 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021CAC - add r5, r5, #1 - cmp r5, #0x10 - blt _021D5FD6 - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov77_021D5FB4 - - thumb_func_start ov77_021D6000 -ov77_021D6000: ; 0x021D6000 - push {r4, r5, r6, lr} - mov r4, #0 - add r5, r1, #0 - add r6, r4, #0 -_021D6008: - add r0, r5, #0 - add r1, r4, #0 - bl ov77_021D6794 - ldr r0, [r0, #0] - add r1, r6, #0 - bl sub_02021CAC - add r4, r4, #1 - cmp r4, #0x10 - blt _021D6008 - pop {r4, r5, r6, pc} - thumb_func_end ov77_021D6000 - - thumb_func_start ov77_021D6020 -ov77_021D6020: ; 0x021D6020 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020219F8 - mov r0, #0xa7 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D6038 - bl sub_0201DCE8 -_021D6038: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6020 - - thumb_func_start ov77_021D603C -ov77_021D603C: ; 0x021D603C - lsl r1, r1, #2 - add r1, r0, r1 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r1, r0] - ldr r3, _021D604C ; =sub_02021CAC - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_021D604C: .word sub_02021CAC - thumb_func_end ov77_021D603C - - thumb_func_start ov77_021D6050 -ov77_021D6050: ; 0x021D6050 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r4, r1, #0 - bl sub_02021CC8 - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02021CC8 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r4, #0 - bl sub_02021CC8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6050 - - thumb_func_start ov77_021D607C -ov77_021D607C: ; 0x021D607C - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0x1f - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #2 - ldr r1, [sp] - lsl r0, r0, #8 - sub r1, r1, r0 - str r1, [sp] - sub r0, #0x10 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - mov r0, #0x7d - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #2 - ldr r1, [sp] - lsl r0, r0, #8 - add r1, r1, r0 - str r1, [sp] - sub r0, #0xc - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D607C - - thumb_func_start ov77_021D60E0 -ov77_021D60E0: ; 0x021D60E0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, _021D61B0 ; =0x00000582 - add r4, r0, #0 - cmp r5, r1 - bge _021D60F4 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D60F4: - bne _021D60FE - mov r1, #3 - mov r2, #1 - bl ov77_021D603C -_021D60FE: - ldr r0, _021D61B4 ; =0x00000627 - cmp r5, r0 - bge _021D6154 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #0x12 - ldr r1, [sp] - lsl r0, r0, #0xc - add r1, r1, r0 - mov r0, #0xb - lsl r0, r0, #0x10 - str r1, [sp] - cmp r1, r0 - blt _021D6142 - str r0, [sp] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D6142: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D6154: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #0x12 - ldr r1, [sp] - lsl r0, r0, #0xc - add r1, r1, r0 - mov r0, #5 - lsl r0, r0, #0x12 - str r1, [sp] - cmp r1, r0 - blt _021D619C - str r0, [sp] - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add r0, r4, #0 - mov r1, #3 - mov r2, #0 - bl ov77_021D603C - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D619C: - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_021D61B0: .word 0x00000582 -_021D61B4: .word 0x00000627 - thumb_func_end ov77_021D60E0 - - thumb_func_start ov77_021D61B8 -ov77_021D61B8: ; 0x021D61B8 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, _021D6284 ; =0x000005DC - add r4, r0, #0 - cmp r5, r1 - bge _021D61CC - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D61CC: - bne _021D61D6 - mov r1, #0xa - mov r2, #1 - bl ov77_021D603C -_021D61D6: - ldr r0, _021D6288 ; =0x00000627 - cmp r5, r0 - bge _021D622C - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #0x12 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r1, r1, r0 - mov r0, #5 - lsl r0, r0, #0x10 - str r1, [sp] - cmp r1, r0 - bgt _021D621A - str r0, [sp] - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D621A: - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D622C: - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - mov r0, #0x12 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r1, r1, r0 - ldr r0, _021D628C ; =0xFFFC0000 - str r1, [sp] - cmp r1, r0 - bgt _021D6272 - str r0, [sp] - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add r0, r4, #0 - mov r1, #0xa - mov r2, #0 - bl ov77_021D603C - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D6272: - mov r0, #0x85 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D6284: .word 0x000005DC -_021D6288: .word 0x00000627 -_021D628C: .word 0xFFFC0000 - thumb_func_end ov77_021D61B8 - - thumb_func_start ov77_021D6290 -ov77_021D6290: ; 0x021D6290 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - ldr r0, _021D6364 ; =0x021BF6DC - add r7, r1, #0 - ldrb r0, [r0, #5] - cmp r0, #0 - bne _021D62A6 - mov r6, #0xd - mov r4, #0xf - b _021D62AA -_021D62A6: - mov r6, #0xf - mov r4, #0xd -_021D62AA: - mov r0, #0x7b - lsl r0, r0, #2 - add r0, r5, r0 - str r0, [sp] - ldr r1, [sp] - lsl r0, r6, #2 - str r0, [sp, #4] - ldr r0, [r1, r0] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #0xc] - add r1, r0, r7 - mov r0, #6 - lsl r0, r0, #0x12 - str r1, [sp, #0xc] - cmp r1, r0 - blt _021D62E0 - mov r0, #1 - lsl r0, r0, #0x14 - sub r0, r1, r0 - str r0, [sp, #0xc] -_021D62E0: - ldr r1, [sp] - ldr r0, [sp, #4] - ldr r0, [r1, r0] - add r1, sp, #0xc - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0xc] - lsl r0, r0, #0x14 - sub r0, r1, r0 - str r0, [sp, #0xc] - add r0, r6, #1 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0xc - bl sub_02021C50 - mov r0, #0x7b - lsl r0, r0, #2 - add r6, r5, r0 - lsl r0, r4, #2 - str r0, [sp, #8] - ldr r0, [r6, r0] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0xc - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, [sp, #0xc] - sub r1, r0, r7 - ldr r0, _021D6368 ; =0xFFF80000 - str r1, [sp, #0xc] - cmp r1, r0 - bgt _021D6338 - mov r0, #1 - lsl r0, r0, #0x14 - add r0, r1, r0 - str r0, [sp, #0xc] -_021D6338: - ldr r0, [sp, #8] - add r1, sp, #0xc - ldr r0, [r6, r0] - bl sub_02021C50 - mov r0, #1 - ldr r1, [sp, #0xc] - lsl r0, r0, #0x14 - add r0, r1, r0 - str r0, [sp, #0xc] - add r0, r4, #1 - lsl r0, r0, #2 - add r1, r5, r0 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r1, r0] - add r1, sp, #0xc - bl sub_02021C50 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D6364: .word 0x021BF6DC -_021D6368: .word 0xFFF80000 - thumb_func_end ov77_021D6290 - - thumb_func_start ov77_021D636C -ov77_021D636C: ; 0x021D636C - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - cmp r1, #0 - bne _021D63E2 - ldr r0, _021D646C ; =0x021BF6DC - ldrb r0, [r0, #5] - cmp r0, #0 - bne _021D63B0 - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021F24 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021F24 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021F24 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021F24 - b _021D6412 -_021D63B0: - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021F24 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021F24 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021F24 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021F24 - b _021D6412 -_021D63E2: - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021F24 - mov r0, #0x89 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021F24 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021F24 - mov r0, #0x8b - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #2 - bl sub_02021F24 -_021D6412: - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, r2, #0 - str r0, [r3, #0] - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp] - mov r0, #0x22 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_02021C50 - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, r2, #0 - str r0, [r3, #0] - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp] - mov r0, #0x8a - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, pc} - nop -_021D646C: .word 0x021BF6DC - thumb_func_end ov77_021D636C - - thumb_func_start ov77_021D6470 -ov77_021D6470: ; 0x021D6470 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _021D652C ; =0x00000744 - add r6, r1, #0 - sub r4, r6, r0 - bpl _021D6480 - mov r4, #0 -_021D6480: - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021D30 - mov r1, #7 - add r2, r0, #0 - lsl r1, r1, #0xa - mov r0, #0x86 - add r1, r2, r1 - lsl r0, r0, #2 - add r1, r1, r4 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021D30 - mov r1, #7 - add r2, r0, #0 - lsl r1, r1, #0xa - mov r0, #0x87 - sub r1, r2, r1 - lsl r0, r0, #2 - sub r1, r1, r4 - lsl r1, r1, #0x10 - ldr r0, [r5, r0] - lsr r1, r1, #0x10 - bl sub_02021C94 - ldr r0, _021D652C ; =0x00000744 - cmp r6, r0 - blt _021D6526 - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021D28 - add r4, r0, #0 - add r3, sp, #0 - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - mov r0, #1 - ldr r1, [sp] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp] - mov r0, #0x86 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r2, #0 - bl sub_02021C50 - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021D28 - add r4, r0, #0 - add r3, sp, #0 - ldmia r4!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [r3, #0] - mov r0, #1 - ldr r1, [sp] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp] - mov r0, #0x87 - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r2, #0 - bl sub_02021C50 -_021D6526: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_021D652C: .word 0x00000744 - thumb_func_end ov77_021D6470 - - thumb_func_start ov77_021D6530 -ov77_021D6530: ; 0x021D6530 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r3, _021D6650 ; =0x021D78B0 - add r2, sp, #0x18 - str r0, [sp] - str r1, [sp, #4] - ldmia r3!, {r0, r1} - str r2, [sp, #8] - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - ldr r0, _021D6654 ; =0x021D789C - ldr r1, [r0, #8] - str r1, [sp, #0x14] - ldr r1, [r0, #0xc] - ldr r0, [r0, #0x10] - str r1, [sp, #0xc] - str r0, [sp, #0x10] - ldr r1, _021D6658 ; =0x000005A5 - ldr r0, [sp, #4] - cmp r0, r1 - blt _021D65AC - mov r4, #0 -_021D655E: - ldr r0, [sp, #8] - lsl r7, r4, #2 - ldr r0, [r0, r7] - lsl r1, r0, #2 - ldr r0, [sp] - add r5, r0, r1 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0x24 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r0, _021D665C ; =0x021D79AC - ldr r1, [sp, #0x24] - ldr r0, [r0, r7] - sub r0, r1, r0 - str r0, [sp, #0x24] - mov r0, #1 - ldr r1, [sp, #0x28] - lsl r0, r0, #0xe - sub r0, r1, r0 - str r0, [sp, #0x28] - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r5, r0] - add r1, r2, #0 - bl sub_02021C50 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D655E -_021D65AC: - ldr r1, _021D6660 ; =0x000005D2 - ldr r0, [sp, #4] - cmp r0, r1 - blt _021D65F4 - ldr r0, [sp, #0x14] - lsl r1, r0, #2 - ldr r0, [sp] - add r4, r0, r1 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r5, r0, #0 - add r3, sp, #0x24 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - ldr r0, _021D6664 ; =0x021D79A0 - ldr r1, [sp, #0x24] - ldr r0, [r0, #0] - sub r0, r1, r0 - str r0, [sp, #0x24] - mov r0, #3 - ldr r1, [sp, #0x28] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x28] - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 -_021D65F4: - ldr r1, _021D6668 ; =0x000005E6 - ldr r0, [sp, #4] - cmp r0, r1 - blt _021D664C - mov r5, #0 -_021D65FE: - lsl r7, r5, #2 - add r0, sp, #0xc - ldr r0, [r0, r7] - lsl r1, r0, #2 - ldr r0, [sp] - add r4, r0, r1 - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0x24 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - ldr r0, _021D666C ; =0x021D79A4 - ldr r1, [sp, #0x24] - ldr r0, [r0, r7] - sub r0, r1, r0 - str r0, [sp, #0x24] - mov r0, #3 - ldr r1, [sp, #0x28] - lsl r0, r0, #0xc - sub r0, r1, r0 - str r0, [sp, #0x28] - mov r0, #0x7b - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r2, #0 - bl sub_02021C50 - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, #2 - blo _021D65FE -_021D664C: - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6650: .word 0x021D78B0 -_021D6654: .word 0x021D789C -_021D6658: .word 0x000005A5 -_021D665C: .word 0x021D79AC -_021D6660: .word 0x000005D2 -_021D6664: .word 0x021D79A0 -_021D6668: .word 0x000005E6 -_021D666C: .word 0x021D79A4 - thumb_func_end ov77_021D6530 - - thumb_func_start ov77_021D6670 -ov77_021D6670: ; 0x021D6670 - push {r4, lr} - sub sp, #0x10 - ldr r4, _021D669C ; =0x021D7920 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_0201E86C - mov r0, #1 - mov r1, #0x4c - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_021D669C: .word 0x021D7920 - thumb_func_end ov77_021D6670 - - thumb_func_start ov77_021D66A0 -ov77_021D66A0: ; 0x021D66A0 - push {r3, r4, r5, r6, lr} - sub sp, #0x2c - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - str r1, [sp] - sub r0, r1, #1 - str r0, [sp, #4] - str r0, [sp, #8] - add r6, r2, #0 - str r1, [sp, #0xc] - mov r2, #0x4b - str r1, [sp, #0x10] - lsl r2, r2, #2 - ldr r0, [r5, r2] - add r3, r1, #0 - str r0, [sp, #0x14] - add r0, r2, #4 - ldr r0, [r5, r0] - str r0, [sp, #0x18] - add r0, r2, #0 - add r0, #8 - ldr r0, [r5, r0] - add r2, #0xc - str r0, [sp, #0x1c] - ldr r0, [r5, r2] - add r2, r1, #0 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - str r1, [sp, #0x28] - add r0, r6, #0 - bl sub_020093B4 - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r4, #0] - str r6, [r4, #4] - str r1, [r4, #8] - str r1, [r4, #0xc] - mov r0, #1 - str r1, [r4, #0x10] - lsl r0, r0, #0xc - str r0, [r4, #0x14] - str r0, [r4, #0x18] - str r0, [r4, #0x1c] - strh r1, [r4, #0x20] - mov r0, #1 - str r0, [r4, #0x24] - str r0, [r4, #0x28] - mov r0, #0x4c - str r0, [r4, #0x2c] - add sp, #0x2c - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov77_021D66A0 - - thumb_func_start ov77_021D670C -ov77_021D670C: ; 0x021D670C - push {r4, lr} - mov r1, #0x7d - mov r0, #0x4c - lsl r1, r1, #2 - bl sub_02018144 - mov r2, #0x7d - add r4, r0, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020D5124 - add r0, r4, #0 - bl ov77_021D6800 - add r0, r4, #0 - bl ov77_021D6964 - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov77_021D670C - - thumb_func_start ov77_021D6734 -ov77_021D6734: ; 0x021D6734 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x4c - mov r1, #8 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0xc - add r6, r5, #0 - mul r6, r0 - mov r0, #0x4c - add r1, r6, #0 - bl sub_02018144 - mov r1, #0 - add r2, r6, #0 - str r0, [r4, #4] - bl sub_020D5124 - str r5, [r4, #0] - add r0, r4, #0 - pop {r4, r5, r6, pc} - thumb_func_end ov77_021D6734 - - thumb_func_start ov77_021D6760 -ov77_021D6760: ; 0x021D6760 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - mov r6, #0 - cmp r0, #0 - ble _021D6786 - add r4, r6, #0 -_021D676E: - ldr r0, [r5, #4] - add r0, r0, r4 - ldr r0, [r0, #8] - cmp r0, #0 - beq _021D677C - bl sub_0200DA58 -_021D677C: - ldr r0, [r5, #0] - add r6, r6, #1 - add r4, #0xc - cmp r6, r0 - blt _021D676E -_021D6786: - ldr r0, [r5, #4] - bl sub_020181C4 - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov77_021D6760 - - thumb_func_start ov77_021D6794 -ov77_021D6794: ; 0x021D6794 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r4, r0 - blt _021D67A4 - bl sub_02022974 -_021D67A4: - mov r0, #0xc - ldr r1, [r5, #4] - mul r0, r4 - add r0, r1, r0 - add r0, r0, #4 - pop {r3, r4, r5, pc} - thumb_func_end ov77_021D6794 - - thumb_func_start ov77_021D67B0 -ov77_021D67B0: ; 0x021D67B0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl ov77_021D691C - mov r6, #0x73 - mov r4, #0 - lsl r6, r6, #2 -_021D67BE: - lsl r0, r4, #4 - add r0, r5, r0 - ldr r0, [r0, r6] - cmp r0, #0 - beq _021D67CC - bl sub_0200DA58 -_021D67CC: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D67BE - mov r6, #0x55 - mov r4, #0 - mov r7, #0xc - lsl r6, r6, #2 -_021D67DE: - add r0, r4, #0 - mul r0, r7 - add r0, r5, r0 - ldr r0, [r0, r6] - cmp r0, #0 - beq _021D67EE - bl sub_0200DA58 -_021D67EE: - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #0xa - blo _021D67DE - add r0, r5, #0 - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov77_021D67B0 - - thumb_func_start ov77_021D6800 -ov77_021D6800: ; 0x021D6800 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - add r7, r0, #0 - add r3, r1, #0 - ldr r0, _021D6910 ; =0xFFCFFFEF - mov r1, #0x10 - and r3, r0 - orr r3, r1 - str r3, [r2, #0] - ldr r3, _021D6914 ; =0x04001000 - ldr r2, [r3, #0] - and r0, r2 - orr r0, r1 - str r0, [r3, #0] - bl ov77_021D6670 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x80 - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r2, #0x4c - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - mov r0, #0xa - add r1, r7, #4 - mov r2, #0x4c - bl sub_020095C4 - ldr r4, _021D6918 ; =0x021D7930 - str r0, [r7, #0] - mov r6, #0 - add r5, r7, #0 -_021D6854: - ldrb r0, [r4] - add r1, r6, #0 - mov r2, #0x4c - bl sub_02009714 - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r5, r1] - add r6, r6, #1 - add r4, r4, #1 - add r5, r5, #4 - cmp r6, #4 - blt _021D6854 - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe0 - ldr r0, [r7, r0] - mov r1, #0x80 - mov r2, #4 - bl sub_0200985C - mov r1, #0x4f - lsl r1, r1, #2 - str r0, [r7, r1] - mov r3, #0 - str r3, [sp] - mov r2, #3 - str r2, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x4c - str r0, [sp, #0xc] - add r0, #0xe4 - ldr r0, [r7, r0] - mov r1, #0x80 - bl sub_020098B8 - mov r1, #5 - lsl r1, r1, #6 - str r0, [r7, r1] - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xe8 - ldr r0, [r7, r0] - mov r1, #0x80 - mov r2, #5 - bl sub_02009918 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r7, r1] - mov r3, #0 - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4c - str r0, [sp, #8] - add r0, #0xec - ldr r0, [r7, r0] - mov r1, #0x80 - mov r2, #6 - bl sub_02009918 - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r7, r1] - sub r1, #0xc - ldr r0, [r7, r1] - bl sub_0200A328 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r7, r0] - bl sub_0200A5C8 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021D6910: .word 0xFFCFFFEF -_021D6914: .word 0x04001000 -_021D6918: .word 0x021D7930 - thumb_func_end ov77_021D6800 - - thumb_func_start ov77_021D691C -ov77_021D691C: ; 0x021D691C - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0x4f - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_0200A4E4 - mov r0, #5 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_0200A6DC - mov r6, #0x4b - mov r4, #0 - lsl r6, r6, #2 -_021D693A: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - bl sub_02009754 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #4 - blo _021D693A - ldr r0, [r5, #0] - bl sub_02021964 - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov77_021D691C - - thumb_func_start ov77_021D6964 -ov77_021D6964: ; 0x021D6964 - push {r4, r5, r6, r7, lr} - sub sp, #0x54 - add r7, r0, #0 - mov r6, #0 - add r4, r6, #0 - add r5, r7, #0 -_021D6970: - add r0, r7, #0 - add r1, sp, #0 - add r2, sp, #0x30 - bl ov77_021D66A0 - add r0, sp, #0 - str r4, [sp, #8] - str r4, [sp, #0xc] - bl sub_02021AA0 - mov r1, #0x15 - lsl r1, r1, #4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x15 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #2 - lsl r0, r0, #0xc - add r6, r6, #1 - add r4, r4, r0 - add r5, #0xc - cmp r6, #0xa - blt _021D6970 - add sp, #0x54 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6964 - - thumb_func_start ov77_021D69B4 -ov77_021D69B4: ; 0x021D69B4 - ldr r3, _021D69BC ; =sub_020219F8 - ldr r0, [r0, #0] - bx r3 - nop -_021D69BC: .word sub_020219F8 - thumb_func_end ov77_021D69B4 - - thumb_func_start ov77_021D69C0 -ov77_021D69C0: ; 0x021D69C0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - cmp r1, #0xb4 - bne _021D69E2 - mov r2, #3 - str r2, [sp] - mov r0, #0 - str r0, [sp, #4] - mov r0, #0x71 - lsl r0, r0, #2 - add r0, r4, r0 - add r1, r4, #0 - add r3, r2, #0 - bl ov77_021D6A0C - b _021D69FC -_021D69E2: - ldr r0, _021D6A08 ; =0x0000011D - cmp r1, r0 - bne _021D69FC - mov r2, #3 - add r0, #0xb7 - str r2, [sp] - mov r1, #1 - str r1, [sp, #4] - add r0, r4, r0 - add r1, r4, #0 - add r3, r2, #0 - bl ov77_021D6A0C -_021D69FC: - add r0, r4, #0 - bl ov77_021D69B4 - add sp, #8 - pop {r4, pc} - nop -_021D6A08: .word 0x0000011D - thumb_func_end ov77_021D69C0 - - thumb_func_start ov77_021D6A0C -ov77_021D6A0C: ; 0x021D6A0C - push {r4, lr} - add r4, r0, #0 - strb r2, [r4] - ldr r2, _021D6A3C ; =0xFFFFFFF8 - strb r3, [r4, #1] - add r2, sp - ldrb r0, [r2, #0x10] - strb r0, [r4, #2] - mov r0, #0 - strb r0, [r4, #4] - strb r0, [r4, #3] - mov r0, #0x53 - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [r4, #0xc] - ldrb r0, [r2, #0x14] - add r1, r4, #0 - mov r2, #0xa - strb r0, [r4, #5] - ldr r0, _021D6A40 ; =ov77_021D6B0C - bl sub_0200D9E8 - str r0, [r4, #8] - pop {r4, pc} - ; .align 2, 0 -_021D6A3C: .word 0xFFFFFFF8 -_021D6A40: .word ov77_021D6B0C - thumb_func_end ov77_021D6A0C - - thumb_func_start ov77_021D6A44 -ov77_021D6A44: ; 0x021D6A44 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - str r0, [sp] - cmp r2, #0 - bne _021D6A54 - mov r7, #0x40 - b _021D6A56 -_021D6A54: - mov r7, #0x20 -_021D6A56: - mov r5, #0 - cmp r6, #0 - bls _021D6AD2 -_021D6A5C: - ldr r0, [sp] - mov r1, #0xa - bl ov77_021D6ADC - add r4, r0, #0 - ldr r0, [r4, #4] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #4 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r2, r0, #0x19 - sub r2, r2, r1 - mov r0, #0x19 - ror r2, r0 - add r0, r1, r2 - add r0, #0x40 - lsl r0, r0, #0xc - str r0, [sp, #4] - bl sub_0201D2E8 - lsr r1, r0, #0x1f - lsl r2, r0, #0x1a - sub r2, r2, r1 - mov r0, #0x1a - ror r2, r0 - add r0, r1, r2 - add r0, r7, r0 - lsl r0, r0, #0xc - str r0, [sp, #8] - ldr r0, [r4, #4] - add r1, sp, #4 - bl sub_02021C50 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r4, #4] - mov r1, #1 - bl sub_02021CAC - ldr r0, _021D6AD8 ; =ov77_021D6B48 - add r1, r4, #0 - mov r2, #0x14 - bl sub_0200D9E8 - str r0, [r4, #8] - add r0, r5, #1 - lsl r0, r0, #0x18 - lsr r5, r0, #0x18 - cmp r5, r6 - blo _021D6A5C -_021D6AD2: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D6AD8: .word ov77_021D6B48 - thumb_func_end ov77_021D6A44 - - thumb_func_start ov77_021D6ADC -ov77_021D6ADC: ; 0x021D6ADC - push {r4, lr} - mov r4, #0 - mov r2, #0xc -_021D6AE2: - add r1, r4, #0 - mul r1, r2 - add r3, r0, r1 - ldrb r1, [r0, r1] - cmp r1, #0 - bne _021D6AFA - mov r0, #1 - strb r0, [r3] - mov r0, #0 - strb r0, [r3, #1] - add r0, r3, #0 - pop {r4, pc} -_021D6AFA: - add r1, r4, #1 - lsl r1, r1, #0x18 - lsr r4, r1, #0x18 - cmp r4, #0xa - blo _021D6AE2 - bl sub_02022974 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov77_021D6ADC - - thumb_func_start ov77_021D6B0C -ov77_021D6B0C: ; 0x021D6B0C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldrb r1, [r4, #4] - add r5, r0, #0 - add r0, r1, #1 - strb r0, [r4, #4] - ldrb r0, [r4, #1] - cmp r1, r0 - blo _021D6B44 - ldrb r1, [r4] - ldrb r2, [r4, #5] - ldr r0, [r4, #0xc] - bl ov77_021D6A44 - mov r0, #0 - strb r0, [r4, #4] - ldrb r0, [r4, #3] - add r0, r0, #1 - strb r0, [r4, #3] - ldrb r1, [r4, #3] - ldrb r0, [r4, #2] - cmp r1, r0 - blo _021D6B44 - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #8] -_021D6B44: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6B0C - - thumb_func_start ov77_021D6B48 -ov77_021D6B48: ; 0x021D6B48 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - bl sub_02021D28 - add r6, r0, #0 - add r3, sp, #0 - ldmia r6!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldr r0, [r6, #0] - str r0, [r3, #0] - mov r0, #3 - ldr r1, [sp, #4] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #4] - add r1, r2, #0 - bl sub_02021C50 - ldrb r0, [r4, #1] - add r0, r0, #1 - strb r0, [r4, #1] - ldrb r0, [r4, #1] - cmp r0, #0x50 - blo _021D6B9C - add r0, r5, #0 - bl sub_0200DA58 - mov r1, #0 - str r1, [r4, #8] - strb r1, [r4] - ldr r0, [r4, #4] - bl sub_02021CC8 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021CAC -_021D6B9C: - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov77_021D6B48 - - thumb_func_start ov77_021D6BA0 -ov77_021D6BA0: ; 0x021D6BA0 - ldr r3, _021D6BA8 ; =ov77_021D6BAC - add r2, r1, #0 - mov r1, #2 - bx r3 - ; .align 2, 0 -_021D6BA8: .word ov77_021D6BAC - thumb_func_end ov77_021D6BA0 - - thumb_func_start ov77_021D6BAC -ov77_021D6BAC: ; 0x021D6BAC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - ldr r0, [r6, #4] - add r7, r1, #0 - str r2, [sp] - str r0, [sp, #4] - ldr r4, _021D6C3C ; =0x00000000 - beq _021D6C36 -_021D6BBE: - ldr r0, [sp, #4] - ldr r1, [r6, #0] - bl ov77_021D6ADC - add r5, r0, #0 - ldr r0, [r5, #4] - bl sub_02021D28 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #8 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bl sub_0201D2E8 - mov r1, #0xe0 - bl sub_020E1F6C - add r1, #0xa - lsl r0, r1, #0xc - str r0, [sp, #8] - bl sub_0201D2E8 - mov r1, #0x38 - bl sub_020E1F6C - add r1, #0xfa - lsl r0, r1, #0xc - str r0, [sp, #0xc] - ldr r0, [r5, #4] - add r1, sp, #8 - bl sub_02021C50 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [sp] - cmp r0, #0 - ldr r0, [r5, #4] - bne _021D6C1A - mov r1, #1 - bl sub_02021CAC - b _021D6C20 -_021D6C1A: - mov r1, #0 - bl sub_02021CAC -_021D6C20: - ldr r0, _021D6C40 ; =ov77_021D6C44 - add r1, r5, #0 - mov r2, #0x14 - bl sub_0200D9E8 - str r0, [r5, #8] - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, r7 - blo _021D6BBE -_021D6C36: - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021D6C3C: .word 0x00000000 -_021D6C40: .word ov77_021D6C44 - thumb_func_end ov77_021D6BAC - - thumb_func_start ov77_021D6C44 -ov77_021D6C44: ; 0x021D6C44 - push {r4, lr} - add r4, r1, #0 - ldrb r1, [r4, #1] - add r1, r1, #1 - strb r1, [r4, #1] - ldrb r1, [r4, #1] - cmp r1, #8 - blo _021D6C6C - bl sub_0200DA58 - mov r1, #0 - str r1, [r4, #8] - strb r1, [r4] - ldr r0, [r4, #4] - bl sub_02021CC8 - ldr r0, [r4, #4] - mov r1, #0 - bl sub_02021CAC -_021D6C6C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6C44 - - thumb_func_start ov77_021D6C70 -ov77_021D6C70: ; 0x021D6C70 - push {r4, lr} - ldr r3, _021D6C90 ; =0x02100DEC - mov r2, #0 - ldr r3, [r3, #0] - blx r3 - add r4, r0, #0 - bl sub_020145B4 - cmp r4, #0 - bne _021D6C88 - bl sub_02022974 -_021D6C88: - lsl r0, r4, #0x10 - lsr r0, r0, #0xd - pop {r4, pc} - nop -_021D6C90: .word 0x02100DEC - thumb_func_end ov77_021D6C70 - - thumb_func_start ov77_021D6C94 -ov77_021D6C94: ; 0x021D6C94 - push {r4, lr} - ldr r3, _021D6CB4 ; =0x02100DF4 - mov r2, #1 - ldr r3, [r3, #0] - blx r3 - add r4, r0, #0 - bne _021D6CA6 - bl sub_02022974 -_021D6CA6: - add r0, r4, #0 - bl sub_020145F4 - lsl r0, r4, #0x10 - lsr r0, r0, #0xd - pop {r4, pc} - nop -_021D6CB4: .word 0x02100DF4 - thumb_func_end ov77_021D6C94 - - thumb_func_start ov77_021D6CB8 -ov77_021D6CB8: ; 0x021D6CB8 - mov r0, #0x2c - bx lr - thumb_func_end ov77_021D6CB8 - - thumb_func_start ov77_021D6CBC -ov77_021D6CBC: ; 0x021D6CBC - push {r4, lr} - add r4, r0, #0 - beq _021D6CC8 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _021D6CCC -_021D6CC8: - bl sub_02022974 -_021D6CCC: - ldr r0, [r4, #0x18] - pop {r4, pc} - thumb_func_end ov77_021D6CBC - - thumb_func_start ov77_021D6CD0 -ov77_021D6CD0: ; 0x021D6CD0 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r5, #0 - beq _021D6CE0 - ldr r0, [r5, #0x18] - cmp r0, #0 - bne _021D6CE4 -_021D6CE0: - bl sub_02022974 -_021D6CE4: - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_02014788 - mov r2, #0 - ldr r0, [r5, #0x18] - add r1, r4, #0 - add r3, r2, #0 - bl sub_020146F4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6CD0 - - thumb_func_start ov77_021D6CFC -ov77_021D6CFC: ; 0x021D6CFC - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - ldr r3, _021D6E14 ; =0x021D7934 - add r5, r0, #0 - ldmia r3!, {r0, r1} - add r2, sp, #0x28 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, sp, #0x10 - bl sub_02013880 - ldr r2, [sp, #0x10] - ldr r1, [sp, #0x14] - ldr r0, [sp, #0x18] - mul r1, r2 - add r2, r0, r1 - mov r1, #1 - add r4, r2, #0 - and r4, r1 - mov r1, #3 - bl sub_020E2178 - add r2, r1, #0 - mov r1, #0 - add r6, sp, #0x28 - add r7, sp, #0x1c -_021D6D32: - lsl r3, r2, #2 - ldr r3, [r6, r3] - lsl r0, r1, #2 - str r3, [r7, r0] - add r0, r5, r0 - str r2, [r0, #0x1c] - cmp r4, #0 - beq _021D6D46 - add r2, r2, #1 - b _021D6D48 -_021D6D46: - sub r2, r2, #1 -_021D6D48: - cmp r2, #3 - blt _021D6D50 - mov r2, #0 - b _021D6D56 -_021D6D50: - cmp r2, #0 - bge _021D6D56 - mov r2, #2 -_021D6D56: - add r0, r1, #1 - lsl r0, r0, #0x18 - lsr r1, r0, #0x18 - cmp r1, #3 - blo _021D6D32 - mov r0, #0x4c - bl sub_0200762C - ldr r7, _021D6E18 ; =0x021D7958 - str r0, [r5, #0] - mov r4, #0 -_021D6D6C: - lsl r6, r4, #2 - add r1, sp, #0x1c - mov r0, #0 - ldr r1, [r1, r6] - str r0, [sp] - str r0, [sp, #4] - lsl r1, r1, #0x10 - str r0, [sp, #8] - add r0, sp, #0x34 - lsr r1, r1, #0x10 - mov r2, #0 - mov r3, #2 - bl sub_02075FB4 - add r6, r5, r6 - ldr r0, [r6, #0x1c] - add r1, sp, #0x34 - lsl r2, r0, #3 - ldr r0, _021D6E1C ; =0x000003FF - add r3, r7, r2 - str r0, [sp] - str r4, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r5, #0] - ldr r2, [r7, r2] - ldr r3, [r3, #4] - bl sub_02007C34 - mov r1, #6 - mov r2, #1 - str r0, [r6, #4] - bl sub_02007DEC - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D6D6C - mov r0, #1 - str r0, [r5, #0x10] - bl sub_02014000 - mov r1, #0x12 - mov r0, #0x4c - lsl r1, r1, #0xa - bl sub_02018144 - str r0, [r5, #0x14] - mov r0, #1 - str r0, [sp] - mov r0, #0x4c - str r0, [sp, #4] - mov r3, #0x12 - ldr r0, _021D6E20 ; =ov77_021D6C70 - ldr r1, _021D6E24 ; =ov77_021D6C94 - ldr r2, [r5, #0x14] - lsl r3, r3, #0xa - bl sub_02014014 - str r0, [r5, #0x18] - bl sub_02014784 - add r2, r0, #0 - mov r0, #1 - mov r1, #0xe1 - lsl r0, r0, #0xc - lsl r1, r1, #0xe - bl sub_020206BC - mov r0, #0x3d - mov r1, #4 - mov r2, #0x4c - bl sub_020144C4 - add r1, r0, #0 - ldr r0, [r5, #0x18] - mov r2, #0xa - mov r3, #1 - bl sub_020144CC - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6E14: .word 0x021D7934 -_021D6E18: .word 0x021D7958 -_021D6E1C: .word 0x000003FF -_021D6E20: .word ov77_021D6C70 -_021D6E24: .word ov77_021D6C94 - thumb_func_end ov77_021D6CFC - - thumb_func_start ov77_021D6E28 -ov77_021D6E28: ; 0x021D6E28 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl sub_0201411C - ldr r0, [r4, #0x14] - bl sub_020181C4 - ldr r0, [r4, #0] - bl sub_02007B6C - pop {r4, pc} - thumb_func_end ov77_021D6E28 - - thumb_func_start ov77_021D6E40 -ov77_021D6E40: ; 0x021D6E40 - push {r3, lr} - cmp r0, #0 - beq _021D6E4C - ldr r0, [r0, #0] - bl sub_02008A94 -_021D6E4C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6E40 - - thumb_func_start ov77_021D6E50 -ov77_021D6E50: ; 0x021D6E50 - push {r4, lr} - add r4, r0, #0 - beq _021D6E74 - bl sub_020B2628 - bl sub_020241B4 - bl sub_020A73C0 - ldr r0, [r4, #0] - bl sub_02007768 - bl ov77_021D725C - mov r0, #1 - mov r1, #0 - bl sub_020241BC -_021D6E74: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov77_021D6E50 - - thumb_func_start ov77_021D6E78 -ov77_021D6E78: ; 0x021D6E78 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r0, #0 - add r2, r4, #0 - add r2, #0x28 - ldrb r2, [r2] - add r5, r4, #0 - add r6, r1, #0 - add r5, #0x28 - cmp r2, #5 - bls _021D6E90 - b _021D6FE2 -_021D6E90: - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_021D6E9C: ; jump table - .short _021D6EA8 - _021D6E9C - 2 ; case 0 - .short _021D6EEA - _021D6E9C - 2 ; case 1 - .short _021D6F0E - _021D6E9C - 2 ; case 2 - .short _021D6F6E - _021D6E9C - 2 ; case 3 - .short _021D6F92 - _021D6E9C - 2 ; case 4 - .short _021D6FBE - _021D6E9C - 2 ; case 5 -_021D6EA8: - ldr r0, _021D6FE8 ; =0x0400004A - mov r1, #0x3f - ldrh r2, [r0] - add r7, r4, #4 - bic r2, r1 - mov r1, #0x11 - orr r1, r2 - mov r2, #0x20 - orr r1, r2 - strh r1, [r0] - lsl r0, r6, #2 - str r0, [sp] - ldr r0, [r7, r0] - mov r1, #0xc - lsl r2, r2, #5 - bl sub_02007DEC - ldr r0, [sp] - mov r2, #1 - ldr r0, [r7, r0] - mov r1, #0xd - lsl r2, r2, #0xa - bl sub_02007DEC - ldr r0, [sp] - mov r1, #6 - ldr r0, [r7, r0] - mov r2, #0 - bl sub_02007DEC - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] -_021D6EEA: - lsl r2, r6, #2 - add r2, r4, r2 - ldr r2, [r2, #0x1c] - add r0, r4, #0 - lsl r3, r2, #3 - ldr r2, _021D6FEC ; =0x021D7940 - add r1, r6, #0 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _021D6FE2 - mov r0, #0 - add r4, #0x29 - strb r0, [r4] - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - b _021D6FE2 -_021D6F0E: - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_02014788 - add r0, r4, #0 - str r0, [sp, #4] - add r0, #0x1c - str r0, [sp, #4] - ldr r1, [sp, #4] - lsl r6, r6, #2 - add r7, r4, #4 - ldr r1, [r1, r6] - mov r2, #0xc - mul r2, r1 - ldr r1, _021D6FF0 ; =0x021D7970 - ldr r0, [r4, #0x18] - ldr r1, [r1, r2] - ldr r2, _021D6FF4 ; =ov77_021D7268 - ldr r3, [r7, r6] - bl sub_020146F4 - ldr r1, [sp, #4] - mov r2, #0xc - ldr r1, [r1, r6] - ldr r0, [r4, #0x18] - mul r2, r1 - ldr r1, _021D6FF8 ; =0x021D7974 - ldr r3, [r7, r6] - ldr r1, [r1, r2] - ldr r2, _021D6FF4 ; =ov77_021D7268 - bl sub_020146F4 - ldr r1, [sp, #4] - ldr r0, [r4, #0x18] - ldr r2, [r1, r6] - mov r1, #0xc - add r3, r2, #0 - mul r3, r1 - ldr r1, _021D6FFC ; =0x021D7978 - ldr r2, _021D6FF4 ; =ov77_021D7268 - ldr r1, [r1, r3] - ldr r3, [r7, r6] - bl sub_020146F4 - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - b _021D6FE2 -_021D6F6E: - ldr r0, [r4, #0x18] - bl sub_02014710 - cmp r0, #0 - bne _021D6FE2 - ldr r1, _021D6FE8 ; =0x0400004A - mov r0, #0x3f - ldrh r2, [r1] - bic r2, r0 - mov r0, #0x10 - orr r2, r0 - mov r0, #0x20 - orr r0, r2 - strh r0, [r1] - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - b _021D6FE2 -_021D6F92: - lsl r6, r6, #2 - add r2, r4, r6 - ldr r2, [r2, #0x1c] - lsl r3, r2, #3 - ldr r2, _021D7000 ; =0x021D7944 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _021D6FE2 - add r0, r4, r6 - ldr r0, [r0, #4] - mov r1, #6 - mov r2, #1 - bl sub_02007DEC - mov r0, #0 - add r4, #0x29 - strb r0, [r4] - ldrb r0, [r5] - add r0, r0, #1 - strb r0, [r5] - b _021D6FE2 -_021D6FBE: - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x29 - strb r1, [r0] - add r0, r4, #0 - add r0, #0x29 - ldrb r0, [r0] - cmp r0, #0x14 - blo _021D6FE2 - mov r0, #0 - add r4, #0x29 - strb r0, [r4] - strb r0, [r5] - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_021D6FE2: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D6FE8: .word 0x0400004A -_021D6FEC: .word 0x021D7940 -_021D6FF0: .word 0x021D7970 -_021D6FF4: .word ov77_021D7268 -_021D6FF8: .word 0x021D7974 -_021D6FFC: .word 0x021D7978 -_021D7000: .word 0x021D7944 - thumb_func_end ov77_021D6E78 - - thumb_func_start ov77_021D7004 -ov77_021D7004: ; 0x021D7004 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r4, [r0, #4] - mov r1, #0 - add r0, r4, #0 - mov r2, #6 - bl sub_02008274 - mov r1, #1 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x11 - bl sub_02008274 - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x8c - bl sub_02008274 - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x8d - bl sub_02008274 - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x29 - add r5, #0x29 - strb r1, [r0] - ldrb r0, [r5] - cmp r0, #6 - blo _021D706E - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D706E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D7004 - - thumb_func_start ov77_021D7074 -ov77_021D7074: ; 0x021D7074 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r4, [r0, #4] - mov r1, #0 - add r0, r4, #0 - sub r2, r1, #3 - bl sub_02008274 - mov r1, #1 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x13 - bl sub_02008274 - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x29 - add r5, #0x29 - strb r1, [r0] - ldrb r0, [r5] - cmp r0, #6 - blo _021D70C6 - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D70C6: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D7074 - - thumb_func_start ov77_021D70CC -ov77_021D70CC: ; 0x021D70CC - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r4, [r0, #4] - mov r1, #0 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x10 - bl sub_02008274 - mov r1, #1 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x11 - bl sub_02008274 - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x8c - bl sub_02008274 - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x8d - bl sub_02008274 - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x29 - add r5, #0x29 - strb r1, [r0] - ldrb r0, [r5] - cmp r0, #6 - blo _021D7138 - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D7138: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov77_021D70CC - - thumb_func_start ov77_021D713C -ov77_021D713C: ; 0x021D713C - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r4, [r0, #4] - mov r1, #0 - add r0, r4, #0 - sub r2, r1, #6 - bl sub_02008274 - mov r1, #1 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x11 - bl sub_02008274 - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x29 - add r5, #0x29 - strb r1, [r0] - ldrb r0, [r5] - cmp r0, #6 - blo _021D718E - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D718E: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D713C - - thumb_func_start ov77_021D7194 -ov77_021D7194: ; 0x021D7194 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r4, [r0, #4] - mov r1, #0 - add r0, r4, #0 - mov r2, #8 - bl sub_02008274 - mov r1, #1 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x11 - bl sub_02008274 - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x8c - bl sub_02008274 - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x8d - bl sub_02008274 - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x29 - add r5, #0x29 - strb r1, [r0] - ldrb r0, [r5] - cmp r0, #6 - blo _021D71FE - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D71FE: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D7194 - - thumb_func_start ov77_021D7204 -ov77_021D7204: ; 0x021D7204 - push {r3, r4, r5, lr} - add r5, r0, #0 - lsl r0, r1, #2 - add r0, r5, r0 - ldr r4, [r0, #4] - mov r1, #0 - add r0, r4, #0 - mov r2, #6 - bl sub_02008274 - mov r1, #1 - add r2, r1, #0 - add r0, r4, #0 - sub r2, #0x15 - bl sub_02008274 - add r0, r5, #0 - add r0, #0x29 - ldrb r0, [r0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0x29 - add r5, #0x29 - strb r1, [r0] - ldrb r0, [r5] - cmp r0, #6 - blo _021D7256 - mov r1, #0xc - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf4 - bl sub_02007DEC - mov r1, #0xd - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xf3 - bl sub_02007DEC - mov r0, #1 - pop {r3, r4, r5, pc} -_021D7256: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D7204 - - thumb_func_start ov77_021D725C -ov77_021D725C: ; 0x021D725C - push {r3, lr} - bl sub_0201469C - bl sub_020146C0 - pop {r3, pc} - thumb_func_end ov77_021D725C - - thumb_func_start ov77_021D7268 -ov77_021D7268: ; 0x021D7268 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - bl sub_02014764 - add r2, sp, #0 - mov r1, #0 - str r1, [r2, #0] - str r1, [r2, #4] - add r4, r0, #0 - str r1, [r2, #8] - bl sub_020080C0 - sub r0, #0x80 - mov r1, #0xac - mul r1, r0 - str r1, [sp] - add r0, r4, #0 - mov r1, #1 - bl sub_020080C0 - sub r0, #0x60 - mov r1, #0xac - mul r1, r0 - str r1, [sp, #4] - mov r0, #0x40 - str r0, [sp, #8] - ldr r0, [r5, #0x20] - ldr r1, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #4] - add r0, r1, r0 - str r0, [r5, #0x28] - ldr r0, [r5, #0x20] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - ldr r0, [r0, #8] - add r0, r1, r0 - str r0, [r5, #0x2c] - ldr r0, [r5, #0x20] - ldr r1, [sp, #8] - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - add r0, r1, r0 - str r0, [r5, #0x30] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov77_021D7268 - ; 0x021D72C8 - - - .rodata - .incbin "incbin/overlay77_rodata.bin" - - .data - .incbin "incbin/overlay77_data.bin" - - .bss - .space 0x0 diff --git a/asm/overlay79.s b/asm/overlay79.s deleted file mode 100644 index 923211e13..000000000 --- a/asm/overlay79.s +++ /dev/null @@ -1,5524 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov79_021D0D80 -ov79_021D0D80: ; 0x021D0D80 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02006840 - mov r2, #2 - add r5, r0, #0 - mov r0, #3 - mov r1, #0x2d - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r1, #2 - add r0, r4, #0 - lsl r1, r1, #8 - mov r2, #0x2d - bl sub_0200681C - mov r2, #2 - mov r1, #0 - lsl r2, r2, #8 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x2d - str r0, [r4, #0] - str r5, [r4, #0x20] - ldrb r0, [r5, #3] - strb r0, [r4, #0x1b] - ldr r0, _021D0DC0 ; =0x0000FFFF - strh r0, [r4, #0x14] - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D0DC0: .word 0x0000FFFF - thumb_func_end ov79_021D0D80 - - thumb_func_start ov79_021D0DC4 -ov79_021D0DC4: ; 0x021D0DC4 - push {r3, lr} - bl sub_0200682C - bl ov79_021D0E1C - cmp r0, #0 - beq _021D0DD6 - mov r0, #1 - pop {r3, pc} -_021D0DD6: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov79_021D0DC4 - - thumb_func_start ov79_021D0DDC -ov79_021D0DDC: ; 0x021D0DDC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - ldrb r1, [r4, #0x1a] - ldr r0, [r4, #0x20] - strb r1, [r0, #1] - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x20] - strb r1, [r0, #2] - ldrb r1, [r4, #0x1b] - ldr r0, [r4, #0x20] - strb r1, [r0, #3] - add r0, r4, #0 - add r0, #0x80 - ldrh r1, [r0] - ldr r0, [r4, #0x20] - strh r1, [r0, #4] - add r0, r4, #0 - add r0, #0x82 - ldrh r1, [r0] - ldr r0, [r4, #0x20] - strh r1, [r0, #6] - add r0, r5, #0 - bl sub_02006830 - ldr r0, [r4, #0] - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov79_021D0DDC - - thumb_func_start ov79_021D0E1C -ov79_021D0E1C: ; 0x021D0E1C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #6 - bls _021D0E2A - b _021D0F5E -_021D0E2A: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D0E36: ; jump table - .short _021D0E44 - _021D0E36 - 2 ; case 0 - .short _021D0E94 - _021D0E36 - 2 ; case 1 - .short _021D0EBC - _021D0E36 - 2 ; case 2 - .short _021D0ECE - _021D0E36 - 2 ; case 3 - .short _021D0F04 - _021D0E36 - 2 ; case 4 - .short _021D0F16 - _021D0E36 - 2 ; case 5 - .short _021D0F24 - _021D0E36 - 2 ; case 6 -_021D0E44: - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D0F70 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D0F74 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - mov r0, #0 - bl sub_0200F32C - mov r0, #1 - bl sub_0200F32C - bl sub_0201E3D8 - mov r0, #4 - bl sub_0201E450 - b _021D0F64 -_021D0E94: - bl ov79_021D122C - cmp r0, #0 - bne _021D0EA2 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021D0EA2: - mov r0, #0 - str r0, [r4, #0xc] - mov r1, #6 - str r1, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r2, [r4, #0] - add r3, r0, #0 - str r2, [sp, #8] - add r2, r1, #0 - bl sub_0200F174 - b _021D0F64 -_021D0EBC: - bl ov79_021D21F8 - bl sub_0200F2AC - cmp r0, #0 - bne _021D0F64 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021D0ECE: - bl ov79_021D21F8 - ldrh r1, [r4, #0x18] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _021D0F78 ; =0x021D394C - ldr r1, [r1, r2] - blx r1 - cmp r0, #0 - bne _021D0EE8 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021D0EE8: - mov r0, #0 - str r0, [r4, #0xc] - mov r1, #6 - str r1, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r1, [r4, #0] - add r2, r0, #0 - str r1, [sp, #8] - add r1, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - b _021D0F64 -_021D0F04: - bl ov79_021D21F8 - bl sub_0200F2AC - cmp r0, #0 - bne _021D0F64 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021D0F16: - bl ov79_021D12A0 - cmp r0, #0 - bne _021D0F64 - add sp, #0xc - mov r0, #0 - pop {r3, r4, pc} -_021D0F24: - bl sub_0201E530 - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D0F70 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D0F74 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - b _021D0F64 -_021D0F5E: - add sp, #0xc - mov r0, #1 - pop {r3, r4, pc} -_021D0F64: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_021D0F70: .word 0xFFFFE0FF -_021D0F74: .word 0x04001000 -_021D0F78: .word 0x021D394C - thumb_func_end ov79_021D0E1C - - thumb_func_start ov79_021D0F7C -ov79_021D0F7C: ; 0x021D0F7C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _021D0F8E - bl sub_0200C800 -_021D0F8E: - bl sub_0201DCAC - ldr r0, [r4, #0x24] - bl sub_0201C2B8 - ldr r3, _021D0FA8 ; =0x027E0000 - ldr r1, _021D0FAC ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_021D0FA8: .word 0x027E0000 -_021D0FAC: .word 0x00003FF8 - thumb_func_end ov79_021D0F7C - - thumb_func_start ov79_021D0FB0 -ov79_021D0FB0: ; 0x021D0FB0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _021D0FE8 ; =0x021D3964 - bl sub_02022664 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021D0FE4 - ldr r0, _021D0FE8 ; =0x021D3964 - bl sub_02022644 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - bne _021D0FE0 - ldrh r0, [r4, #0x14] - cmp r0, #1 - bne _021D0FE0 - ldrb r1, [r4, #0x1b] - add r0, r4, #0 - mov r2, #2 - bl ov79_021D1B24 -_021D0FE0: - mov r0, #0 - mvn r0, r0 -_021D0FE4: - pop {r4, pc} - nop -_021D0FE8: .word 0x021D3964 - thumb_func_end ov79_021D0FB0 - - thumb_func_start ov79_021D0FEC -ov79_021D0FEC: ; 0x021D0FEC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r1, r5, #0 - add r1, #0xc4 - ldr r1, [r1, #0] - mov r4, #0 - mvn r4, r4 - cmp r1, #0 - bne _021D1002 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D1002: - bl ov79_021D0FB0 - add r1, r0, #0 - ldr r0, _021D1098 ; =0x021BF67C - ldr r0, [r0, #0x44] - cmp r0, #0 - beq _021D1024 - ldrh r0, [r5, #0x14] - cmp r0, #0 - bne _021D1036 - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl sub_02001288 - add r4, r0, #0 - b _021D1036 -_021D1024: - cmp r1, #0 - blt _021D1032 - lsl r1, r1, #0x18 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl ov79_021D1C44 -_021D1032: - mov r0, #0 - pop {r3, r4, r5, pc} -_021D1036: - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - bne _021D1042 - mov r0, #0 - pop {r3, r4, r5, pc} -_021D1042: - ldr r0, _021D1098 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _021D105E - ldr r0, _021D109C ; =0x000005DC - bl sub_02005748 - mov r0, #0xff - strb r0, [r5, #0x1a] - mov r0, #0 - str r0, [r5, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D105E: - mov r0, #1 - tst r0, r1 - beq _021D1092 - ldr r0, _021D109C ; =0x000005DC - bl sub_02005748 - cmp r4, #0xff - beq _021D107C - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _021D107C - add r0, r0, #1 - cmp r4, r0 - bne _021D1088 -_021D107C: - mov r0, #0xff - strb r0, [r5, #0x1a] - mov r0, #0 - str r0, [r5, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} -_021D1088: - strb r4, [r5, #0x1a] - mov r0, #1 - strh r0, [r5, #0x18] - mov r0, #0 - pop {r3, r4, r5, pc} -_021D1092: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D1098: .word 0x021BF67C -_021D109C: .word 0x000005DC - thumb_func_end ov79_021D0FEC - - thumb_func_start ov79_021D10A0 -ov79_021D10A0: ; 0x021D10A0 - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - bl ov79_021D2214 - add r0, r4, #0 - bl ov79_021D1ED8 - mov r0, #2 - strh r0, [r4, #0x18] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov79_021D10A0 - - thumb_func_start ov79_021D10B8 -ov79_021D10B8: ; 0x021D10B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - bl sub_02001288 - add r4, r0, #0 - ldr r0, _021D1144 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _021D10EA - ldr r0, _021D1148 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - bl ov79_021D1F60 - add r0, r5, #0 - mov r1, #0 - bl ov79_021D2214 - mov r0, #0 - strh r0, [r5, #0x18] - pop {r3, r4, r5, pc} -_021D10EA: - mov r0, #1 - tst r0, r1 - beq _021D113E - ldr r0, _021D1148 ; =0x000005DC - bl sub_02005748 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bhi _021D110E - bhs _021D112C - cmp r4, #1 - bhi _021D112C - cmp r4, #0 - beq _021D1114 - cmp r4, #1 - beq _021D111A - b _021D112C -_021D110E: - add r0, r0, #1 - cmp r4, r0 - b _021D112C -_021D1114: - mov r0, #1 - str r0, [r5, #0x10] - pop {r3, r4, r5, pc} -_021D111A: - add r0, r5, #0 - bl ov79_021D1F60 - add r0, r5, #0 - bl ov79_021D1FBC - mov r0, #3 - strh r0, [r5, #0x18] - b _021D113E -_021D112C: - add r0, r5, #0 - bl ov79_021D1F60 - add r0, r5, #0 - mov r1, #0 - bl ov79_021D2214 - mov r0, #0 - strh r0, [r5, #0x18] -_021D113E: - mov r0, #0 - pop {r3, r4, r5, pc} - nop -_021D1144: .word 0x021BF67C -_021D1148: .word 0x000005DC - thumb_func_end ov79_021D10B8 - - thumb_func_start ov79_021D114C -ov79_021D114C: ; 0x021D114C - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #0x1f] - bl sub_0201D724 - cmp r0, #0 - beq _021D115E - mov r0, #0 - pop {r4, pc} -_021D115E: - add r0, r4, #0 - bl ov79_021D2054 - mov r0, #4 - strh r0, [r4, #0x18] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov79_021D114C - - thumb_func_start ov79_021D116C -ov79_021D116C: ; 0x021D116C - push {r4, lr} - add r4, r0, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - ldr r1, [r4, #0] - bl sub_02002114 - cmp r0, #0 - beq _021D1188 - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _021D119C - b _021D11B6 -_021D1188: - ldr r0, _021D11BC ; =0x000005DC - bl sub_02005748 - add r0, r4, #0 - bl ov79_021D2008 - mov r0, #5 - strh r0, [r4, #0x18] - mov r0, #0 - pop {r4, pc} -_021D119C: - ldr r0, _021D11BC ; =0x000005DC - bl sub_02005748 - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl sub_0200E084 - mov r0, #1 - strh r0, [r4, #0x18] - mov r0, #0 - pop {r4, pc} -_021D11B6: - mov r0, #0 - pop {r4, pc} - nop -_021D11BC: .word 0x000005DC - thumb_func_end ov79_021D116C - - thumb_func_start ov79_021D11C0 -ov79_021D11C0: ; 0x021D11C0 - push {r4, lr} - add r4, r0, #0 - ldrb r0, [r4, #0x1f] - bl sub_0201D724 - cmp r0, #0 - beq _021D11D2 - mov r0, #0 - pop {r4, pc} -_021D11D2: - ldr r0, _021D1228 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _021D11E0 - mov r0, #0 - pop {r4, pc} -_021D11E0: - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #1 - bl sub_0200E084 - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - ldrb r0, [r4, #0x1a] - ldr r3, [r4, #0x20] - lsl r2, r0, #3 - add r3, #0x20 - ldrb r1, [r3, r2] - mov r0, #0x40 - orr r0, r1 - strb r0, [r3, r2] - ldr r0, [r4, #0x20] - mov r1, #1 - strb r1, [r0, #2] - add r0, r4, #0 - mov r1, #0 - bl ov79_021D1AB8 - add r0, r4, #0 - bl ov79_021D196C - add r0, r4, #0 - mov r1, #0 - bl ov79_021D2214 - mov r0, #0 - strh r0, [r4, #0x18] - pop {r4, pc} - ; .align 2, 0 -_021D1228: .word 0x021BF67C - thumb_func_end ov79_021D11C0 - - thumb_func_start ov79_021D122C -ov79_021D122C: ; 0x021D122C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #5 - bhi _021D1290 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D1242: ; jump table - .short _021D124E - _021D1242 - 2 ; case 0 - .short _021D1254 - _021D1242 - 2 ; case 1 - .short _021D125A - _021D1242 - 2 ; case 2 - .short _021D1266 - _021D1242 - 2 ; case 3 - .short _021D126C - _021D1242 - 2 ; case 4 - .short _021D1272 - _021D1242 - 2 ; case 5 -_021D124E: - bl ov79_021D132C - b _021D1290 -_021D1254: - bl ov79_021D13C4 - b _021D1290 -_021D125A: - bl ov79_021D1568 - add r0, r4, #0 - bl ov79_021D14A4 - b _021D1290 -_021D1266: - bl ov79_021D20F4 - b _021D1290 -_021D126C: - bl ov79_021D167C - b _021D1290 -_021D1272: - bl ov79_021D196C - ldrb r1, [r4, #0x1b] - add r0, r4, #0 - mov r2, #4 - bl ov79_021D1B24 - ldr r0, _021D129C ; =ov79_021D0F7C - add r1, r4, #0 - bl sub_02017798 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - pop {r4, pc} -_021D1290: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - pop {r4, pc} - nop -_021D129C: .word ov79_021D0F7C - thumb_func_end ov79_021D122C - - thumb_func_start ov79_021D12A0 -ov79_021D12A0: ; 0x021D12A0 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #8] - cmp r1, #5 - bhi _021D1302 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D12B6: ; jump table - .short _021D12C2 - _021D12B6 - 2 ; case 0 - .short _021D12DA - _021D12B6 - 2 ; case 1 - .short _021D12E6 - _021D12B6 - 2 ; case 2 - .short _021D12F2 - _021D12B6 - 2 ; case 3 - .short _021D12F8 - _021D12B6 - 2 ; case 4 - .short _021D12FE - _021D12B6 - 2 ; case 5 -_021D12C2: - add r1, r4, #0 - add r1, #0xd0 - ldr r1, [r1, #0] - cmp r1, #0 - beq _021D12D0 - bl ov79_021D1F60 -_021D12D0: - add r0, r4, #0 - mov r1, #1 - bl ov79_021D1AB8 - b _021D1302 -_021D12DA: - bl ov79_021D17E8 - add r0, r4, #0 - bl ov79_021D21CC - b _021D1302 -_021D12E6: - bl ov79_021D1548 - add r0, r4, #0 - bl ov79_021D1618 - b _021D1302 -_021D12F2: - bl ov79_021D14A0 - b _021D1302 -_021D12F8: - bl ov79_021D13A4 - b _021D1302 -_021D12FE: - mov r0, #1 - pop {r4, pc} -_021D1302: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - mov r0, #0 - pop {r4, pc} - thumb_func_end ov79_021D12A0 - - thumb_func_start ov79_021D130C -ov79_021D130C: ; 0x021D130C - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D1328 ; =0x021D3980 - add r3, sp, #0 - mov r2, #5 -_021D1316: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D1316 - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D1328: .word 0x021D3980 - thumb_func_end ov79_021D130C - - thumb_func_start ov79_021D132C -ov79_021D132C: ; 0x021D132C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xb8 - add r5, r0, #0 - bl ov79_021D130C - ldr r0, [r5, #0] - bl sub_02018340 - add r3, sp, #0 - ldr r4, _021D139C ; =0x021D3910 - str r0, [r5, #0x24] - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r4, _021D13A0 ; =0x021D3A10 - add r3, sp, #0x10 - mov r2, #0x15 -_021D1358: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D1358 - mov r4, #0 - add r7, r4, #0 - add r6, sp, #0x10 -_021D1366: - lsl r1, r4, #0x18 - ldr r0, [r5, #0x24] - lsr r1, r1, #0x18 - add r2, r6, #0 - mov r3, #0 - bl sub_020183C4 - lsl r1, r4, #0x18 - ldr r0, [r5, #0x24] - lsr r1, r1, #0x18 - bl sub_02019EBC - lsl r0, r4, #0x18 - ldr r3, [r5, #0] - lsr r0, r0, #0x18 - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - add r7, r7, #1 - add r4, r4, #1 - add r6, #0x1c - cmp r7, #6 - blt _021D1366 - add sp, #0xb8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D139C: .word 0x021D3910 -_021D13A0: .word 0x021D3A10 - thumb_func_end ov79_021D132C - - thumb_func_start ov79_021D13A4 -ov79_021D13A4: ; 0x021D13A4 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 -_021D13AA: - lsl r1, r4, #0x18 - ldr r0, [r5, #0x24] - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - cmp r4, #6 - blt _021D13AA - ldr r0, [r5, #0x24] - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov79_021D13A4 - - thumb_func_start ov79_021D13C4 -ov79_021D13C4: ; 0x021D13C4 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #0x53 - bl sub_02006C24 - add r4, r0, #0 - mov r0, #2 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x53 - bl sub_0208C210 - mov r0, #3 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x53 - bl sub_0208C210 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #6 - lsl r0, r0, #6 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x53 - bl sub_0208C210 - mov r1, #0 - str r1, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #6 - lsl r0, r0, #6 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x53 - bl sub_0208C210 - mov r0, #0xa - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x53 - bl sub_0208C210 - mov r0, #0xb - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x24] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x53 - bl sub_0208C210 - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, [r5, #0x24] - mov r1, #3 - bl sub_0201C3C0 - ldr r0, [r5, #0x24] - mov r1, #5 - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov79_021D13C4 - - thumb_func_start ov79_021D14A0 -ov79_021D14A0: ; 0x021D14A0 - bx lr - ; .align 2, 0 - thumb_func_end ov79_021D14A0 - - thumb_func_start ov79_021D14A4 -ov79_021D14A4: ; 0x021D14A4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r0, #0 - mov r0, #0 - str r0, [sp] - ldr r0, [r6, #0] - mov r1, #1 - str r0, [sp, #4] - ldr r0, [r6, #0x24] - mov r2, #0x1f - mov r3, #0xf - bl sub_0200DAA4 - ldr r0, [r6, #0x20] - ldr r0, [r0, #0x18] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r6, #0] - mov r1, #1 - str r0, [sp, #4] - ldr r0, [r6, #0x24] - add r2, r1, #0 - mov r3, #0xe - bl sub_0200DD0C - mov r1, #0x1a - ldr r2, [r6, #0] - mov r0, #0 - lsl r1, r1, #4 - bl sub_02002E7C - mov r1, #6 - ldr r2, [r6, #0] - mov r0, #0 - lsl r1, r1, #6 - bl sub_02002E98 - mov r1, #0x1a - ldr r2, [r6, #0] - mov r0, #4 - lsl r1, r1, #4 - bl sub_02002E7C - add r5, r6, #0 - ldr r4, _021D1544 ; =0x021D39A8 - mov r7, #0 - add r5, #0xe8 -_021D1508: - ldrb r0, [r4, #2] - add r1, r5, #0 - str r0, [sp] - ldrb r0, [r4, #3] - str r0, [sp, #4] - ldrb r0, [r4, #4] - str r0, [sp, #8] - ldrb r0, [r4, #5] - str r0, [sp, #0xc] - ldrh r0, [r4, #6] - str r0, [sp, #0x10] - ldrb r2, [r4] - ldrb r3, [r4, #1] - ldr r0, [r6, #0x24] - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r7, r7, #1 - add r4, #8 - add r5, #0x10 - cmp r7, #0xd - blt _021D1508 - add r0, r6, #0 - bl ov79_021D2078 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1544: .word 0x021D39A8 - thumb_func_end ov79_021D14A4 - - thumb_func_start ov79_021D1548 -ov79_021D1548: ; 0x021D1548 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0xe8 -_021D1550: - add r0, r5, #0 - bl sub_0201ACF4 - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xd - blt _021D1550 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov79_021D1548 - - thumb_func_start ov79_021D1568 -ov79_021D1568: ; 0x021D1568 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #2 - bl sub_02002BB8 - ldr r2, _021D1614 ; =0x000001CF - ldr r3, [r5, #0] - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - str r0, [r5, #0x2c] - ldr r0, [r5, #0] - bl sub_020158A8 - str r0, [r5, #0x28] - ldr r2, [r5, #0] - mov r0, #2 - mov r1, #0x40 - bl sub_0200B368 - str r0, [r5, #0x30] - ldr r1, [r5, #0] - mov r0, #0x40 - bl sub_02023790 - str r0, [r5, #0x34] - ldr r0, [r5, #0x2c] - mov r1, #6 - bl sub_0200B1EC - str r0, [r5, #0x38] - ldr r0, [r5, #0x2c] - mov r1, #0x16 - bl sub_0200B1EC - str r0, [r5, #0x3c] - ldr r0, [r5, #0x2c] - mov r1, #4 - bl sub_0200B1EC - str r0, [r5, #0x40] - ldr r0, [r5, #0x2c] - mov r1, #7 - bl sub_0200B1EC - str r0, [r5, #0x44] - ldr r0, [r5, #0x2c] - mov r1, #8 - bl sub_0200B1EC - str r0, [r5, #0x48] - ldr r0, [r5, #0x2c] - mov r1, #0 - bl sub_0200B1EC - str r0, [r5, #0x4c] - mov r4, #0 - add r6, r5, #0 -_021D15E0: - add r1, r4, #0 - ldr r0, [r5, #0x2c] - add r1, #0xb - bl sub_0200B1EC - str r0, [r6, #0x50] - cmp r4, #5 - bge _021D1604 - add r1, r4, #0 - ldr r0, [r5, #0x2c] - add r1, #0x11 - bl sub_0200B1EC - str r0, [r6, #0x68] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #6 - blt _021D15E0 -_021D1604: - ldr r0, [r5, #0x20] - ldr r0, [r0, #0x18] - bl sub_02027AC0 - add r5, #0x7c - strb r0, [r5] - pop {r4, r5, r6, pc} - nop -_021D1614: .word 0x000001CF - thumb_func_end ov79_021D1568 - - thumb_func_start ov79_021D1618 -ov79_021D1618: ; 0x021D1618 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021D1620: - ldr r0, [r5, #0x50] - bl sub_020237BC - cmp r4, #5 - bge _021D1638 - ldr r0, [r5, #0x68] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _021D1620 -_021D1638: - ldr r0, [r6, #0x4c] - bl sub_020237BC - ldr r0, [r6, #0x48] - bl sub_020237BC - ldr r0, [r6, #0x44] - bl sub_020237BC - ldr r0, [r6, #0x40] - bl sub_020237BC - ldr r0, [r6, #0x3c] - bl sub_020237BC - ldr r0, [r6, #0x38] - bl sub_020237BC - ldr r0, [r6, #0x34] - bl sub_020237BC - ldr r0, [r6, #0x30] - bl sub_0200B3F0 - ldr r0, [r6, #0x28] - bl sub_020158F4 - ldr r0, [r6, #0x2c] - bl sub_0200B190 - mov r0, #2 - bl sub_02002C60 - pop {r4, r5, r6, pc} - thumb_func_end ov79_021D1618 - - thumb_func_start ov79_021D167C -ov79_021D167C: ; 0x021D167C - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r6, _021D17D4 ; =0x021D3AB8 - mov r7, #0 - add r4, r5, #0 -_021D1688: - mov r0, #0x6e - mov r1, #0x6f - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200CA08 - mov r1, #7 - lsl r1, r1, #6 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - add r7, r7, #1 - add r6, #0x28 - add r4, r4, #4 - cmp r7, #3 - blt _021D1688 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r6, _021D17D8 ; =0x021D3920 - mov r7, #0 - add r4, r5, #0 -_021D16DE: - mov r0, #0x6e - mov r1, #0x6f - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - ldr r2, _021D17DC ; =0x021D3B30 - bl sub_0200CA08 - mov r1, #0x73 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r7, #3 - bl sub_02021D6C - mov r0, #0x73 - mov r1, #0 - mov r2, #2 - lsl r0, r0, #2 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r4, r0] - bl sub_0200D494 - add r7, r7, #1 - add r4, r4, #4 - add r6, r6, #4 - cmp r7, #5 - blt _021D16DE - mov r7, #0 - ldr r6, _021D17E0 ; =0x021D3934 - add r4, r5, #0 - str r7, [sp, #0x10] -_021D1730: - mov r0, #0x6e - mov r1, #0x6f - lsl r0, r0, #2 - lsl r1, r1, #2 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - ldr r2, _021D17E4 ; =0x021D3B58 - bl sub_0200CA08 - mov r1, #0x1e - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - ldr r1, [sp, #0x10] - bl sub_02021D6C - mov r0, #0x1e - lsl r0, r0, #4 - mov r1, #2 - ldr r0, [r4, r0] - lsl r1, r1, #0xc - bl sub_02021CE4 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - add r1, r7, #2 - bl sub_02021E90 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x1e - mov r1, #0 - mov r2, #2 - lsl r0, r0, #4 - ldrsh r1, [r6, r1] - ldrsh r2, [r6, r2] - ldr r0, [r4, r0] - bl sub_0200D494 - ldr r0, [sp, #0x10] - add r7, r7, #1 - add r0, r0, #3 - add r4, r4, #4 - add r6, r6, #4 - str r0, [sp, #0x10] - cmp r7, #6 - blt _021D1730 - mov r1, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #0x7e - str r1, [sp, #0xc] - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r2, #0xe7 - mov r3, #0x4c - bl sub_0209916C - mov r1, #0x7f - lsl r1, r1, #2 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #0 - ldr r0, [r0, #4] - bl sub_0200D3F4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D17D4: .word 0x021D3AB8 -_021D17D8: .word 0x021D3920 -_021D17DC: .word 0x021D3B30 -_021D17E0: .word 0x021D3934 -_021D17E4: .word 0x021D3B58 - thumb_func_end ov79_021D167C - - thumb_func_start ov79_021D17E8 -ov79_021D17E8: ; 0x021D17E8 - push {r3, r4, r5, r6, r7, lr} - mov r1, #0x7e - add r5, r0, #0 - lsl r1, r1, #2 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - bl sub_02099370 - mov r7, #0x1e - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #4 -_021D1802: - ldr r0, [r4, r7] - bl sub_0200C7E4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #6 - blt _021D1802 - mov r7, #0x73 - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #2 -_021D1818: - ldr r0, [r4, r7] - bl sub_0200C7E4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #5 - blt _021D1818 - mov r6, #7 - mov r4, #0 - lsl r6, r6, #6 -_021D182C: - ldr r0, [r5, r6] - bl sub_0200C7E4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021D182C - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov79_021D17E8 - - thumb_func_start ov79_021D183C -ov79_021D183C: ; 0x021D183C - ldrb r2, [r0, #4] - mov r1, #0x20 - bic r2, r1 - strb r2, [r0, #4] - mov r1, #0xff - strb r1, [r0, #6] - ldrb r1, [r0, #6] - strb r1, [r0, #7] - bx lr - ; .align 2, 0 - thumb_func_end ov79_021D183C - - thumb_func_start ov79_021D1850 -ov79_021D1850: ; 0x021D1850 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r5, r0, #0 - add r6, r1, #0 - add r4, r2, #0 - cmp r3, #0 - beq _021D186E - mov r0, #0x42 - lsl r0, r0, #2 - mov r1, #1 - add r0, r5, r0 - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 -_021D186E: - mov r0, #0xd8 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - add r0, #0xe8 - mov r2, #0 - add r0, r5, r0 - mov r1, #0xff - add r3, r2, #0 - bl sub_0201AE78 - mov r0, #1 - bl sub_02002AC8 - mov r0, #0 - bl sub_02002AE4 - mov r3, #0 - str r3, [sp] - ldr r0, _021D18B0 ; =0x0001020F - str r4, [sp, #4] - str r0, [sp, #8] - mov r0, #0x42 - lsl r0, r0, #2 - add r0, r5, r0 - mov r1, #1 - add r2, r6, #0 - str r3, [sp, #0xc] - bl sub_0201D78C - strb r0, [r5, #0x1f] - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D18B0: .word 0x0001020F - thumb_func_end ov79_021D1850 - - thumb_func_start ov79_021D18B4 -ov79_021D18B4: ; 0x021D18B4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r5, r1, #0 - mov r0, #0xff - strb r0, [r5, #0x1e] - ldrb r0, [r5, #0x1e] - strb r0, [r5, #0x1d] - ldrb r2, [r5, #0x1b] - cmp r2, #5 - bne _021D18D2 - mov r7, #0x1f - b _021D18E8 -_021D18D2: - mov r7, #1 - ldr r1, [sp, #4] - cmp r2, #0 - ble _021D18E8 -_021D18DA: - lsl r0, r7, #0x19 - lsr r7, r0, #0x18 - add r0, r1, #1 - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - cmp r1, r2 - blt _021D18DA -_021D18E8: - ldr r0, [sp] - mov r6, #0 - ldrb r0, [r0] - cmp r0, #0 - ble _021D195E - ldr r0, [sp] - str r0, [sp, #8] - add r0, #0x1c - str r0, [sp, #8] -_021D18FA: - ldr r0, [sp, #8] - lsl r1, r6, #3 - add r4, r0, r1 - add r0, r4, #0 - bl ov79_021D183C - ldrb r0, [r4, #4] - lsl r1, r0, #0x18 - lsr r1, r1, #0x1f - beq _021D1950 - lsl r1, r0, #0x19 - lsr r1, r1, #0x1f - bne _021D1950 - mov r1, #0x1f - and r1, r0 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - tst r1, r7 - beq _021D1950 - mov r1, #0x20 - orr r0, r1 - strb r0, [r4, #4] - ldrb r0, [r5, #0x1d] - cmp r0, #0xff - ldrb r0, [r4, #5] - bne _021D1932 - strb r0, [r5, #0x1d] - b _021D193E -_021D1932: - ldrb r1, [r5, #0x1e] - lsl r2, r1, #3 - ldr r1, [sp] - add r1, r1, r2 - add r1, #0x23 - strb r0, [r1] -_021D193E: - ldrb r0, [r5, #0x1e] - strb r0, [r4, #6] - ldrb r0, [r4, #5] - strb r0, [r5, #0x1e] - ldr r0, [sp, #4] - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #4] -_021D1950: - add r0, r6, #1 - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - ldr r0, [sp] - ldrb r0, [r0] - cmp r6, r0 - blt _021D18FA -_021D195E: - ldr r0, [sp, #4] - add r0, r0, #1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov79_021D18B4 - - thumb_func_start ov79_021D196C -ov79_021D196C: ; 0x021D196C - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0x20] - add r1, r5, #0 - bl ov79_021D18B4 - strb r0, [r5, #0x1c] - ldrb r0, [r5, #0x1c] - ldr r1, [r5, #0] - bl sub_02013A04 - add r1, r5, #0 - add r1, #0xcc - str r0, [r1, #0] - ldrb r4, [r5, #0x1e] - cmp r4, #0xff - beq _021D19E6 - mov r7, #0 -_021D1992: - ldr r1, [r5, #0x20] - lsl r0, r4, #3 - add r1, #0x1c - add r6, r1, r0 - ldrb r4, [r6, #6] - ldrb r1, [r6, #2] - ldr r0, [r5, #0x28] - bl sub_02015918 - add r2, r0, #0 - str r7, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [r5, #0x30] - add r1, r7, #0 - add r3, r7, #0 - bl sub_0200B48C - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldrb r2, [r6, #1] - ldr r0, [r5, #0x30] - mov r1, #1 - mov r3, #2 - bl sub_0200B60C - ldr r0, [r5, #0x30] - ldr r1, [r5, #0x34] - ldr r2, [r5, #0x3c] - bl sub_0200C388 - add r0, r5, #0 - add r0, #0xcc - ldrb r2, [r6, #5] - ldr r0, [r0, #0] - ldr r1, [r5, #0x34] - bl sub_02013A6C - cmp r4, #0xff - bne _021D1992 -_021D19E6: - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - ldr r1, [r5, #0x38] - mov r2, #0xff - bl sub_02013A6C - add r1, r5, #0 - ldr r0, _021D1AB4 ; =0x021D3BB0 - add r1, #0x84 - mov r2, #0x20 - bl sub_020C4DB0 - ldr r0, [r5, #0x20] - ldrh r1, [r0, #6] - add r0, r5, #0 - add r0, #0x82 - strh r1, [r0] - ldr r0, [r5, #0x20] - ldrh r1, [r0, #4] - add r0, r5, #0 - add r0, #0x80 - strh r1, [r0] - ldr r0, [r5, #0x20] - ldrb r0, [r0, #2] - cmp r0, #0 - beq _021D1A64 - add r0, r5, #0 - add r0, #0x80 - ldrh r0, [r0] - cmp r0, #0 - bne _021D1A48 - add r0, r5, #0 - add r0, #0x82 - ldrh r1, [r0] - cmp r1, #0 - beq _021D1A5E - ldrb r0, [r5, #0x1c] - sub r0, r0, #1 - cmp r1, r0 - blt _021D1A5E - add r0, r5, #0 - add r0, #0x82 - ldrh r0, [r0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0x82 - strh r1, [r0] - b _021D1A5E -_021D1A48: - add r1, r0, #6 - ldrb r0, [r5, #0x1c] - cmp r1, r0 - blt _021D1A5E - add r0, r5, #0 - add r0, #0x80 - ldrh r0, [r0] - sub r1, r0, #1 - add r0, r5, #0 - add r0, #0x80 - strh r1, [r0] -_021D1A5E: - ldr r0, [r5, #0x20] - mov r1, #0 - strb r1, [r0, #2] -_021D1A64: - add r1, r5, #0 - add r0, r5, #0 - add r1, #0xe8 - add r0, #0x90 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xcc - ldr r1, [r0, #0] - add r0, r5, #0 - add r0, #0x84 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xa0 - str r5, [r0, #0] - add r0, r5, #0 - add r2, r5, #0 - ldrb r1, [r5, #0x1c] - add r0, #0x94 - add r2, #0x82 - strh r1, [r0] - mov r0, #0 - strh r0, [r5, #0x16] - add r1, r5, #0 - add r1, #0x80 - ldr r3, [r5, #0] - add r0, r5, #0 - lsl r3, r3, #0x18 - ldrh r1, [r1] - ldrh r2, [r2] - add r0, #0x84 - lsr r3, r3, #0x18 - bl sub_0200112C - add r1, r5, #0 - add r1, #0xc4 - str r0, [r1, #0] - mov r0, #1 - strh r0, [r5, #0x16] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1AB4: .word 0x021D3BB0 - thumb_func_end ov79_021D196C - - thumb_func_start ov79_021D1AB8 -ov79_021D1AB8: ; 0x021D1AB8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0xb0 - str r0, [sp] - mov r0, #0x60 - add r4, r1, #0 - mov r1, #0 - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0xe8 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - cmp r4, #0 - beq _021D1AE2 - add r0, r5, #0 - add r0, #0xe8 - bl sub_0201ACF4 -_021D1AE2: - add r0, r5, #0 - add r0, #0xc4 - add r1, r5, #0 - add r2, r5, #0 - ldr r0, [r0, #0] - add r1, #0x80 - add r2, #0x82 - bl sub_02001384 - add r0, r5, #0 - add r0, #0xcc - ldr r0, [r0, #0] - bl sub_02013A3C - add r0, r5, #0 - add r0, #0x80 - ldrh r1, [r0] - ldr r0, [r5, #0x20] - strh r1, [r0, #4] - add r0, r5, #0 - add r0, #0x82 - ldrh r1, [r0] - ldr r0, [r5, #0x20] - strh r1, [r0, #6] - add r0, r5, #0 - mov r1, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r5, #0xcc - str r1, [r5, #0] - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov79_021D1AB8 - - thumb_func_start ov79_021D1B24 -ov79_021D1B24: ; 0x021D1B24 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - cmp r2, #4 - bls _021D1B30 - b _021D1C36 -_021D1B30: - add r0, r2, r2 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D1B3C: ; jump table - .short _021D1B46 - _021D1B3C - 2 ; case 0 - .short _021D1B76 - _021D1B3C - 2 ; case 1 - .short _021D1BA6 - _021D1B3C - 2 ; case 2 - .short _021D1BD4 - _021D1B3C - 2 ; case 3 - .short _021D1C02 - _021D1B3C - 2 ; case 4 -_021D1B46: - mov r0, #0x1e - lsl r0, r0, #4 - add r6, r4, r0 - lsl r7, r5, #2 - lsl r1, r5, #1 - ldr r0, [r6, r7] - add r1, r5, r1 - bl sub_02021D6C - ldr r0, [r6, r7] - mov r1, #0 - bl sub_02021CC8 - add r1, r4, #0 - add r0, r5, #7 - add r1, #0xe8 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #1 - mov r2, #2 - mov r3, #0 - bl sub_0201C04C - b _021D1C36 -_021D1B76: - mov r0, #0x1e - lsl r0, r0, #4 - add r6, r4, r0 - lsl r7, r5, #2 - ldr r0, [r6, r7] - bl sub_02021DE0 - ldr r0, [r6, r7] - mov r1, #1 - bl sub_02021CC8 - add r1, r4, #0 - add r0, r5, #7 - add r1, #0xe8 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - mov r2, #4 - add r3, r1, #0 - bl sub_0201C04C - mov r0, #1 - strh r0, [r4, #0x14] - b _021D1C36 -_021D1BA6: - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r1, r5, #1 - add r1, r5, r1 - add r1, r1, #1 - bl sub_02021D6C - add r1, r4, #0 - add r0, r5, #7 - add r1, #0xe8 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #1 - mov r2, #2 - mov r3, #0 - bl sub_0201C04C - mov r0, #0 - strh r0, [r4, #0x14] - b _021D1C36 -_021D1BD4: - lsl r0, r5, #2 - add r1, r4, r0 - mov r0, #0x1e - lsl r0, r0, #4 - ldr r0, [r1, r0] - lsl r1, r5, #1 - add r1, r5, r1 - add r1, r1, #2 - bl sub_02021D6C - add r1, r4, #0 - add r0, r5, #7 - add r1, #0xe8 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - mov r2, #2 - add r3, r1, #0 - bl sub_0201C04C - mov r0, #1 - strh r0, [r4, #0x14] - b _021D1C36 -_021D1C02: - mov r0, #0x1e - lsl r0, r0, #4 - lsl r1, r5, #1 - add r1, r5, r1 - add r6, r4, r0 - lsl r7, r5, #2 - ldr r0, [r6, r7] - add r1, r1, #1 - bl sub_02021D6C - ldr r0, [r6, r7] - mov r1, #1 - bl sub_02021CC8 - add r1, r4, #0 - add r0, r5, #7 - add r1, #0xe8 - lsl r0, r0, #4 - add r0, r1, r0 - mov r1, #0 - mov r2, #2 - add r3, r1, #0 - bl sub_0201C04C - mov r0, #0 - strh r0, [r4, #0x14] -_021D1C36: - add r0, r5, #7 - add r4, #0xe8 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0201A954 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov79_021D1B24 - - thumb_func_start ov79_021D1C44 -ov79_021D1C44: ; 0x021D1C44 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _021D1D14 ; =0x000005E4 - add r5, r1, #0 - bl sub_02005748 - ldrh r1, [r4, #0x14] - ldr r0, _021D1D18 ; =0x0000FFFF - cmp r1, r0 - beq _021D1C76 - ldrb r1, [r4, #0x1b] - cmp r5, r1 - bne _021D1C6E - add r0, r4, #0 - add r1, r5, #0 - mov r2, #3 - bl ov79_021D1B24 - add sp, #0x10 - pop {r3, r4, r5, pc} -_021D1C6E: - add r0, r4, #0 - mov r2, #0 - bl ov79_021D1B24 -_021D1C76: - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov79_021D1B24 - add r0, r4, #0 - mov r1, #0 - strb r5, [r4, #0x1b] - bl ov79_021D1AB8 - add r0, r4, #0 - mov r2, #0 - add r0, #0x82 - strh r2, [r0] - add r0, r4, #0 - add r0, #0x82 - ldrh r1, [r0] - add r0, r4, #0 - add r0, #0x80 - strh r1, [r0] - ldr r0, [r4, #0x20] - strh r2, [r0, #6] - ldr r1, [r4, #0x20] - ldrh r0, [r1, #6] - strh r0, [r1, #4] - add r0, r4, #0 - bl ov79_021D196C - mov r1, #0xa0 - str r1, [sp] - mov r0, #0x18 - add r1, #0xa8 - str r0, [sp, #4] - add r0, r4, r1 - mov r1, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - ldrb r1, [r4, #0x1b] - cmp r1, #5 - bne _021D1CD8 - mov r0, #0x52 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201A954 - add sp, #0x10 - pop {r3, r4, r5, pc} -_021D1CD8: - lsl r1, r1, #2 - add r1, r4, r1 - mov r0, #0 - ldr r1, [r1, #0x68] - add r2, r0, #0 - bl sub_02002D7C - mov r2, #0xa0 - sub r3, r2, r0 - mov r0, #3 - str r0, [sp] - mov r1, #0 - ldr r0, _021D1D1C ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - add r2, #0xa8 - str r1, [sp, #0xc] - add r0, r4, r2 - ldrb r2, [r4, #0x1b] - lsl r2, r2, #2 - add r2, r4, r2 - lsr r4, r3, #0x1f - add r4, r3, r4 - ldr r2, [r2, #0x68] - asr r3, r4, #1 - bl sub_0201D78C - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_021D1D14: .word 0x000005E4 -_021D1D18: .word 0x0000FFFF -_021D1D1C: .word 0x00010200 - thumb_func_end ov79_021D1C44 - - thumb_func_start ov79_021D1D20 -ov79_021D1D20: ; 0x021D1D20 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r1, #0 - ldr r6, _021D1D84 ; =0x00000001 - bne _021D1D4A - mov r4, #0 - mov r6, #0x73 - add r7, r4, #0 - lsl r6, r6, #2 -_021D1D32: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, r6] - add r1, r7, #0 - bl sub_02021CAC - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #5 - blo _021D1D32 - pop {r3, r4, r5, r6, r7, pc} -_021D1D4A: - mov r4, #0 -_021D1D4C: - ldrb r0, [r7, #4] - tst r0, r6 - beq _021D1D64 - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #1 - bl sub_02021CAC - b _021D1D74 -_021D1D64: - lsl r0, r4, #2 - add r1, r5, r0 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r1, r0] - mov r1, #0 - bl sub_02021CAC -_021D1D74: - lsl r0, r6, #0x19 - lsr r6, r0, #0x18 - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #5 - blo _021D1D4C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1D84: .word 0x00000001 - thumb_func_end ov79_021D1D20 - - thumb_func_start ov79_021D1D88 -ov79_021D1D88: ; 0x021D1D88 - ldr r3, _021D1D90 ; =sub_02001504 - mov r1, #0x13 - bx r3 - nop -_021D1D90: .word sub_02001504 - thumb_func_end ov79_021D1D88 - - thumb_func_start ov79_021D1D94 -ov79_021D1D94: ; 0x021D1D94 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - mov r1, #0x13 - add r7, r0, #0 - add r6, r2, #0 - bl sub_02001504 - add r4, r0, #0 - cmp r6, #0 - bne _021D1DB0 - ldr r0, _021D1ED0 ; =0x000005DC - bl sub_02005748 -_021D1DB0: - add r1, sp, #0x10 - add r0, r7, #0 - add r1, #2 - add r2, sp, #0x10 - bl sub_020014DC - add r2, sp, #0x10 - ldrh r2, [r2] - mov r0, #7 - lsl r0, r0, #6 - lsl r2, r2, #4 - add r2, #0x28 - lsl r2, r2, #0x10 - ldr r0, [r4, r0] - mov r1, #0x69 - asr r2, r2, #0x10 - bl sub_0200D494 - add r0, sp, #0x10 - ldrh r0, [r0, #2] - cmp r0, #0 - bne _021D1DEA - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - b _021D1DF6 -_021D1DEA: - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC -_021D1DF6: - add r0, sp, #0x10 - ldrh r1, [r0, #2] - ldrb r0, [r4, #0x1c] - sub r0, r0, #6 - cmp r1, r0 - bge _021D1E10 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CAC - b _021D1E1C -_021D1E10: - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC -_021D1E1C: - mov r0, #0x50 - str r0, [sp] - mov r1, #0 - mov r0, #0x10 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xf8 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0201AE78 - cmp r5, #0xff - bne _021D1E58 - add r0, r4, #0 - mov r1, #0 - bl ov79_021D1D20 - add r0, r4, #0 - add r0, #0xf8 - bl sub_0201A954 - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - ldr r0, [r0, #4] - bl sub_0200D3F4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} -_021D1E58: - ldr r1, [r4, #0x20] - lsl r5, r5, #3 - add r1, #0x1c - add r0, r4, #0 - add r1, r1, r5 - bl ov79_021D1D20 - ldr r0, [r4, #0x34] - bl sub_020237E8 - ldr r0, [r4, #0x20] - add r0, r0, r5 - ldrb r2, [r0, #0x1f] - cmp r2, #0x63 - bls _021D1E78 - mov r2, #0x63 -_021D1E78: - mov r1, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0x30] - mov r3, #2 - bl sub_0200B60C - ldr r0, [r4, #0x30] - ldr r1, [r4, #0x34] - ldr r2, [r4, #0x40] - bl sub_0200C388 - mov r1, #0 - str r1, [sp] - ldr r0, _021D1ED4 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r4, #0 - ldr r2, [r4, #0x34] - add r0, #0xf8 - mov r3, #8 - bl sub_0201D78C - ldr r2, [r4, #0x20] - mov r1, #0x7e - lsl r1, r1, #2 - add r2, r2, r5 - ldr r0, [r4, r1] - add r1, r1, #4 - ldrb r2, [r2, #0x1e] - ldr r1, [r4, r1] - bl sub_0209933C - mov r0, #0x7f - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - ldr r0, [r0, #4] - bl sub_0200D3F4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D1ED0: .word 0x000005DC -_021D1ED4: .word 0x00010200 - thumb_func_end ov79_021D1D94 - - thumb_func_start ov79_021D1ED8 -ov79_021D1ED8: ; 0x021D1ED8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #3 - bl sub_02013A04 - add r1, r5, #0 - add r1, #0xd0 - str r0, [r1, #0] - mov r4, #0 -_021D1EEC: - add r0, r5, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - ldr r1, [r5, #0x2c] - add r2, r4, #1 - add r3, r4, #0 - bl sub_02013A4C - add r0, r4, #1 - lsl r0, r0, #0x18 - lsr r4, r0, #0x18 - cmp r4, #3 - blo _021D1EEC - add r1, r5, #0 - ldr r0, _021D1F5C ; =0x021D3B90 - add r1, #0xa4 - mov r2, #0x20 - bl sub_020C4DB0 - mov r0, #0x46 - lsl r0, r0, #2 - add r1, r5, #0 - add r0, r5, r0 - add r1, #0xb0 - str r0, [r1, #0] - add r1, r5, #0 - add r1, #0xd0 - ldr r2, [r1, #0] - add r1, r5, #0 - add r1, #0xa4 - str r2, [r1, #0] - add r1, r5, #0 - add r1, #0xc0 - str r5, [r1, #0] - add r1, r5, #0 - mov r2, #3 - add r1, #0xb4 - strh r2, [r1] - mov r1, #1 - mov r2, #0x1f - mov r3, #0xf - bl sub_0200DC48 - ldr r3, [r5, #0] - add r0, r5, #0 - mov r1, #0 - lsl r3, r3, #0x18 - add r0, #0xa4 - add r2, r1, #0 - lsr r3, r3, #0x18 - bl sub_0200112C - add r5, #0xc8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} - nop -_021D1F5C: .word 0x021D3B90 - thumb_func_end ov79_021D1ED8 - - thumb_func_start ov79_021D1F60 -ov79_021D1F60: ; 0x021D1F60 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r0, #0x46 - lsl r0, r0, #2 - add r0, r4, r0 - mov r1, #0 - bl sub_0200DC9C - mov r0, #0x46 - lsl r0, r0, #2 - add r0, r4, r0 - bl sub_0201ACF4 - add r0, r4, #0 - add r0, #0xc8 - add r2, sp, #0 - ldr r0, [r0, #0] - add r1, sp, #0 - add r2, #2 - bl sub_02001384 - add r0, r4, #0 - add r0, #0xd0 - ldr r0, [r0, #0] - bl sub_02013A3C - add r0, r4, #0 - mov r1, #0 - add r0, #0xc8 - str r1, [r0, #0] - add r4, #0xd0 - str r1, [r4, #0] - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D1F60 - - thumb_func_start ov79_021D1FA8 -ov79_021D1FA8: ; 0x021D1FA8 - push {r3, lr} - cmp r2, #0 - bne _021D1FB4 - ldr r0, _021D1FB8 ; =0x000005DC - bl sub_02005748 -_021D1FB4: - pop {r3, pc} - nop -_021D1FB8: .word 0x000005DC - thumb_func_end ov79_021D1FA8 - - thumb_func_start ov79_021D1FBC -ov79_021D1FBC: ; 0x021D1FBC - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x34] - bl sub_020237E8 - ldrb r1, [r4, #0x1a] - ldr r2, [r4, #0x20] - ldr r0, [r4, #0x28] - lsl r1, r1, #3 - add r1, r2, r1 - ldrb r1, [r1, #0x1e] - bl sub_02015918 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r3, #2 - str r3, [sp, #4] - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200B48C - ldr r0, [r4, #0x30] - ldr r1, [r4, #0x34] - ldr r2, [r4, #0x44] - bl sub_0200C388 - add r0, r4, #0 - ldr r1, [r4, #0x34] - add r4, #0x7c - ldrb r2, [r4] - mov r3, #1 - bl ov79_021D1850 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D1FBC - - thumb_func_start ov79_021D2008 -ov79_021D2008: ; 0x021D2008 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x34] - bl sub_020237E8 - ldrb r1, [r4, #0x1a] - ldr r2, [r4, #0x20] - ldr r0, [r4, #0x28] - lsl r1, r1, #3 - add r1, r2, r1 - ldrb r1, [r1, #0x1e] - bl sub_02015918 - add r2, r0, #0 - mov r0, #1 - str r0, [sp] - mov r3, #2 - str r3, [sp, #4] - ldr r0, [r4, #0x30] - mov r1, #0 - bl sub_0200B48C - ldr r0, [r4, #0x30] - ldr r1, [r4, #0x34] - ldr r2, [r4, #0x48] - bl sub_0200C388 - add r0, r4, #0 - ldr r1, [r4, #0x34] - add r4, #0x7c - ldrb r2, [r4] - mov r3, #0 - bl ov79_021D1850 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D2008 - - thumb_func_start ov79_021D2054 -ov79_021D2054: ; 0x021D2054 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r1, _021D2074 ; =0x021D3B88 - str r0, [sp] - ldr r0, [r4, #0x24] - mov r2, #0x1f - mov r3, #0xf - bl sub_02002100 - add r4, #0xd4 - str r0, [r4, #0] - add sp, #4 - pop {r3, r4, pc} - nop -_021D2074: .word 0x021D3B88 - thumb_func_end ov79_021D2054 - - thumb_func_start ov79_021D2078 -ov79_021D2078: ; 0x021D2078 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - mov r1, #0 - add r5, r0, #0 - str r1, [sp] - ldr r0, _021D20E8 ; =0x00010200 - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - mov r0, #0x4e - lsl r0, r0, #2 - ldr r2, [r5, #0x4c] - add r0, r5, r0 - mov r3, #4 - bl sub_0201D78C - add r0, r5, #0 - str r0, [sp, #0x10] - add r0, #0xe8 - ldr r4, _021D20EC ; =0x021D3B80 - mov r6, #0 - str r0, [sp, #0x10] -_021D20A4: - ldr r1, [r5, #0x50] - mov r0, #2 - mov r2, #0 - bl sub_02002D7C - mov r1, #0x40 - sub r3, r1, r0 - ldrb r0, [r4] - lsr r7, r3, #0x1f - add r7, r3, r7 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _021D20F0 ; =0x00020301 - asr r3, r7, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - add r0, r6, #7 - lsl r1, r0, #4 - ldr r0, [sp, #0x10] - ldr r2, [r5, #0x50] - add r0, r0, r1 - mov r1, #2 - bl sub_0201D78C - add r6, r6, #1 - add r5, r5, #4 - add r4, r4, #1 - cmp r6, #6 - blt _021D20A4 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_021D20E8: .word 0x00010200 -_021D20EC: .word 0x021D3B80 -_021D20F0: .word 0x00020301 - thumb_func_end ov79_021D2078 - - thumb_func_start ov79_021D20F4 -ov79_021D20F4: ; 0x021D20F4 - push {r4, r5, r6, r7, lr} - sub sp, #0x54 - add r4, r0, #0 - ldr r1, [r4, #0] - mov r0, #0x20 - bl sub_0201DBEC - ldr r0, [r4, #0] - bl sub_0200C6E4 - mov r1, #0x6e - lsl r1, r1, #2 - str r0, [r4, r1] - ldr r0, [r4, r1] - bl sub_0200C704 - mov r7, #0x6f - lsl r7, r7, #2 - add r2, sp, #0x34 - ldr r3, _021D21C0 ; =0x021D3C00 - str r0, [r4, r7] - ldmia r3!, {r0, r1} - add r6, r2, #0 - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - ldr r5, _021D21C4 ; =0x021D3BD0 - stmia r2!, {r0, r1} - add r3, sp, #0x20 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, r6, #0 - str r0, [r3, #0] - sub r0, r7, #4 - ldr r0, [r4, r0] - mov r3, #0x20 - bl sub_0200C73C - sub r1, r7, #4 - ldr r0, [r4, r1] - add r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0xe - bl sub_0200C7C0 - ldr r0, [r4, #0] - bl sub_0200A93C - ldr r0, [r4, #0] - bl sub_0200A944 - ldr r5, _021D21C8 ; =0x021D3BE4 - add r3, sp, #4 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - sub r1, r7, #4 - str r0, [r3, #0] - ldr r0, [r4, r1] - add r1, r1, #4 - ldr r1, [r4, r1] - bl sub_0200C8F0 - mov r1, #1 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0] - add r2, r1, #0 - add r3, r1, #0 - bl sub_02098FFC - add r1, r7, #0 - add r1, #0x3c - str r0, [r4, r1] - bl sub_02035E38 - cmp r0, #0 - beq _021D21AC - bl sub_02039734 -_021D21AC: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x54 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D21C0: .word 0x021D3C00 -_021D21C4: .word 0x021D3BD0 -_021D21C8: .word 0x021D3BE4 - thumb_func_end ov79_021D20F4 - - thumb_func_start ov79_021D21CC -ov79_021D21CC: ; 0x021D21CC - push {r4, lr} - add r4, r0, #0 - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0209903C - mov r1, #0x6e - lsl r1, r1, #2 - ldr r0, [r4, r1] - add r1, r1, #4 - ldr r1, [r4, r1] - bl sub_0200C8B0 - mov r0, #0x6e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200C8D4 - bl sub_0201DC3C - pop {r4, pc} - thumb_func_end ov79_021D21CC - - thumb_func_start ov79_021D21F8 -ov79_021D21F8: ; 0x021D21F8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6f - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200C7EC - mov r0, #0x7e - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_02099160 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D21F8 - - thumb_func_start ov79_021D2214 -ov79_021D2214: ; 0x021D2214 - push {r4, lr} - add r4, r0, #0 - cmp r1, #0 - bne _021D2242 - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021E90 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - pop {r4, pc} -_021D2242: - mov r0, #7 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #9 - bl sub_02021E90 - mov r0, #0x71 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CC8 - mov r0, #0x72 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CC8 - pop {r4, pc} - thumb_func_end ov79_021D2214 - - thumb_func_start ov79_021D2268 -ov79_021D2268: ; 0x021D2268 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - add r5, r1, #0 - add r1, sp, #0 - mov r0, #0 - str r0, [r1, #0] - str r0, [r1, #4] - add r4, r2, #0 - str r0, [r1, #8] - add r7, r3, #0 - ldr r0, [r4, #0] - add r1, r7, #0 - bl sub_020BCFD0 - str r0, [r5, #0] - ldr r0, [r4, #4] - add r1, r7, #0 - bl sub_020BCFD0 - str r0, [r5, #4] - ldr r0, [r4, #8] - add r1, r7, #0 - bl sub_020BCFD0 - add r2, sp, #0 - str r0, [r5, #8] - ldmia r2!, {r0, r1} - stmia r6!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r6, #0] - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov79_021D2268 - - thumb_func_start ov79_021D22AC -ov79_021D22AC: ; 0x021D22AC - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02006840 - mov r2, #1 - add r5, r0, #0 - mov r0, #3 - mov r1, #0x2e - lsl r2, r2, #0x10 - bl sub_02017FC8 - mov r1, #0x6f - add r0, r4, #0 - lsl r1, r1, #2 - mov r2, #0x2e - bl sub_0200681C - mov r2, #0x6f - mov r1, #0 - lsl r2, r2, #2 - add r4, r0, #0 - bl sub_020C4CF4 - mov r0, #0x2e - str r0, [r4, #0] - str r5, [r4, #0x10] - mov r0, #1 - pop {r3, r4, r5, pc} - thumb_func_end ov79_021D22AC - - thumb_func_start ov79_021D22E4 -ov79_021D22E4: ; 0x021D22E4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #2 - blt _021D2308 - cmp r0, #5 - bgt _021D2308 - add r0, r4, #0 - add r0, #0x40 - bl ov79_021D3820 - ldr r0, [r4, #0x5c] - bl sub_02099160 -_021D2308: - ldr r0, [r5, #0] - cmp r0, #7 - bls _021D2310 - b _021D2442 -_021D2310: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_021D231C: ; jump table - .short _021D232C - _021D231C - 2 ; case 0 - .short _021D2372 - _021D231C - 2 ; case 1 - .short _021D238C - _021D231C - 2 ; case 2 - .short _021D23B6 - _021D231C - 2 ; case 3 - .short _021D23C4 - _021D231C - 2 ; case 4 - .short _021D23EE - _021D231C - 2 ; case 5 - .short _021D23FC - _021D231C - 2 ; case 6 - .short _021D240C - _021D231C - 2 ; case 7 -_021D232C: - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D2454 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D2458 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - mov r0, #0 - bl sub_0200F32C - mov r0, #1 - bl sub_0200F32C - b _021D2448 -_021D2372: - add r0, r4, #0 - bl ov79_021D247C - cmp r0, #0 - bne _021D2382 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D2382: - ldr r0, _021D245C ; =ov79_021D252C - add r1, r4, #0 - bl sub_02017798 - b _021D2448 -_021D238C: - ldr r1, [r4, #4] - add r0, r1, #1 - str r0, [r4, #4] - cmp r1, #4 - bge _021D239C - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D239C: - mov r0, #0 - str r0, [r4, #4] - mov r1, #6 - str r1, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r2, [r4, #0] - add r3, r0, #0 - str r2, [sp, #8] - add r2, r1, #0 - bl sub_0200F174 - b _021D2448 -_021D23B6: - bl sub_0200F2AC - cmp r0, #0 - bne _021D2448 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D23C4: - add r0, r4, #0 - bl ov79_021D2928 - cmp r0, #0 - bne _021D23D4 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D23D4: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - b _021D2448 -_021D23EE: - bl sub_0200F2AC - cmp r0, #0 - bne _021D2448 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D23FC: - add r0, r4, #0 - bl ov79_021D24D4 - cmp r0, #0 - bne _021D2448 - add sp, #0xc - mov r0, #0 - pop {r4, r5, pc} -_021D240C: - mov r0, #0 - add r1, r0, #0 - bl sub_0200F344 - mov r0, #1 - mov r1, #0 - bl sub_0200F344 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _021D2454 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _021D2458 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - b _021D2448 -_021D2442: - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_021D2448: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_021D2454: .word 0xFFFFE0FF -_021D2458: .word 0x04001000 -_021D245C: .word ov79_021D252C - thumb_func_end ov79_021D22E4 - - thumb_func_start ov79_021D2460 -ov79_021D2460: ; 0x021D2460 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - add r0, r5, #0 - bl sub_02006830 - ldr r0, [r4, #0] - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov79_021D2460 - - thumb_func_start ov79_021D247C -ov79_021D247C: ; 0x021D247C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #0 - beq _021D2490 - cmp r1, #1 - beq _021D249C - cmp r1, #2 - beq _021D24A8 - b _021D24C8 -_021D2490: - bl ov79_021D257C - add r0, r4, #0 - bl ov79_021D2634 - b _021D24C8 -_021D249C: - bl ov79_021D2768 - add r0, r4, #0 - bl ov79_021D270C - b _021D24C8 -_021D24A8: - bl ov79_021D27D8 - add r0, r4, #0 - add r1, r4, #0 - ldr r2, [r4, #0] - add r0, #0x40 - add r1, #0x30 - bl ov79_021D3768 - add r0, r4, #0 - bl ov79_021D2864 - mov r0, #0 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} -_021D24C8: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D247C - - thumb_func_start ov79_021D24D4 -ov79_021D24D4: ; 0x021D24D4 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #3 - bhi _021D2520 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D24EA: ; jump table - .short _021D24F2 - _021D24EA - 2 ; case 0 - .short _021D2506 - _021D24EA - 2 ; case 1 - .short _021D2512 - _021D24EA - 2 ; case 2 - .short _021D2518 - _021D24EA - 2 ; case 3 -_021D24F2: - bl ov79_021D2908 - add r0, r4, #0 - add r0, #0x40 - bl ov79_021D385C - add r0, r4, #0 - bl ov79_021D2858 - b _021D2520 -_021D2506: - bl ov79_021D2754 - add r0, r4, #0 - bl ov79_021D27AC - b _021D2520 -_021D2512: - bl ov79_021D260C - b _021D2520 -_021D2518: - mov r0, #0 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} -_021D2520: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D24D4 - - thumb_func_start ov79_021D252C -ov79_021D252C: ; 0x021D252C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x68] - bl sub_0201C2B8 - ldr r0, [r4, #0x44] - bl sub_02008A94 - bl sub_0200C800 - bl sub_0201DCAC - ldr r3, _021D2554 ; =0x027E0000 - ldr r1, _021D2558 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_021D2554: .word 0x027E0000 -_021D2558: .word 0x00003FF8 - thumb_func_end ov79_021D252C - - thumb_func_start ov79_021D255C -ov79_021D255C: ; 0x021D255C - push {r4, lr} - sub sp, #0x28 - ldr r4, _021D2578 ; =0x021D3C70 - add r3, sp, #0 - mov r2, #5 -_021D2566: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D2566 - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_021D2578: .word 0x021D3C70 - thumb_func_end ov79_021D255C - - thumb_func_start ov79_021D257C -ov79_021D257C: ; 0x021D257C - push {r4, r5, r6, r7, lr} - sub sp, #0x6c - add r5, r0, #0 - bl ov79_021D255C - ldr r0, [r5, #0] - bl sub_02018340 - add r3, sp, #8 - ldr r4, _021D2600 ; =0x021D3C2C - str r0, [r5, #0x68] - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r4, _021D2604 ; =0x021D3C98 - add r3, sp, #0x18 - mov r2, #0xa -_021D25A8: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _021D25A8 - ldr r1, _021D2608 ; =0x021D3C20 - ldr r0, [r4, #0] - ldrb r2, [r1] - str r0, [r3, #0] - add r0, sp, #4 - strb r2, [r0] - ldrb r2, [r1, #1] - ldrb r1, [r1, #2] - add r4, sp, #4 - strb r2, [r0, #1] - strb r1, [r0, #2] - mov r0, #0 - str r0, [sp] - add r6, sp, #0x18 -_021D25CC: - ldrb r7, [r4] - ldr r0, [r5, #0x68] - add r2, r6, #0 - add r1, r7, #0 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r5, #0x68] - add r1, r7, #0 - bl sub_02019EBC - ldr r3, [r5, #0] - add r0, r7, #0 - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - ldr r0, [sp] - add r4, r4, #1 - add r0, r0, #1 - add r6, #0x1c - str r0, [sp] - cmp r0, #3 - blt _021D25CC - add sp, #0x6c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2600: .word 0x021D3C2C -_021D2604: .word 0x021D3C98 -_021D2608: .word 0x021D3C20 - thumb_func_end ov79_021D257C - - thumb_func_start ov79_021D260C -ov79_021D260C: ; 0x021D260C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #1 -_021D2612: - lsl r1, r4, #0x18 - ldr r0, [r5, #0x68] - lsr r1, r1, #0x18 - bl sub_02019044 - add r4, r4, #1 - cmp r4, #3 - blt _021D2612 - ldr r0, [r5, #0x68] - mov r1, #4 - bl sub_02019044 - ldr r0, [r5, #0x68] - bl sub_020181C4 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov79_021D260C - - thumb_func_start ov79_021D2634 -ov79_021D2634: ; 0x021D2634 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #0x57 - bl sub_02006C24 - add r4, r0, #0 - mov r0, #2 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x68] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x57 - bl sub_0208C210 - mov r0, #3 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x68] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x57 - bl sub_0208C210 - mov r1, #0 - str r1, [sp] - mov r0, #2 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x20 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - ldr r0, [r5, #0x68] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x57 - bl sub_0208C210 - mov r0, #1 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xa0 - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [r5, #0x68] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x57 - bl sub_0208C210 - mov r0, #4 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x68] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x57 - bl sub_0208C210 - mov r0, #5 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [r5, #0x68] - ldr r1, [r5, #0] - add r2, r4, #0 - mov r3, #0x57 - bl sub_0208C210 - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, [r5, #0x68] - mov r1, #2 - bl sub_0201C3C0 - ldr r0, [r5, #0x68] - mov r1, #4 - bl sub_0201C3C0 - add sp, #0x14 - pop {r4, r5, pc} - thumb_func_end ov79_021D2634 - - thumb_func_start ov79_021D270C -ov79_021D270C: ; 0x021D270C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - add r1, r4, #0 - ldr r0, [r4, #0x68] - ldr r2, _021D2750 ; =0x021D3C24 - add r1, #0x6c - bl sub_0201A8D4 - add r0, r4, #0 - add r0, #0x6c - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r4, #0x10] - mov r1, #1 - ldrb r0, [r0, #0xb] - add r2, r1, #0 - mov r3, #0xe - str r0, [sp] - ldr r0, [r4, #0] - str r0, [sp, #4] - ldr r0, [r4, #0x68] - bl sub_0200DD0C - mov r1, #0x1e - ldr r2, [r4, #0] - mov r0, #0 - lsl r1, r1, #4 - bl sub_02002E98 - add sp, #8 - pop {r4, pc} - nop -_021D2750: .word 0x021D3C24 - thumb_func_end ov79_021D270C - - thumb_func_start ov79_021D2754 -ov79_021D2754: ; 0x021D2754 - push {r4, lr} - add r4, r0, #0 - add r0, #0x6c - bl sub_0201ACF4 - add r4, #0x6c - add r0, r4, #0 - bl sub_0201A8FC - pop {r4, pc} - thumb_func_end ov79_021D2754 - - thumb_func_start ov79_021D2768 -ov79_021D2768: ; 0x021D2768 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r2, _021D27A8 ; =0x000001CE - ldr r3, [r6, #0] - mov r0, #0 - mov r1, #0x1a - bl sub_0200B144 - str r0, [r6, #0x18] - ldr r2, [r6, #0] - mov r0, #1 - mov r1, #0x40 - bl sub_0200B368 - str r0, [r6, #0x1c] - ldr r1, [r6, #0] - mov r0, #0x40 - bl sub_02023790 - str r0, [r6, #0x20] - mov r4, #0 - add r5, r6, #0 -_021D2794: - ldr r0, [r6, #0x18] - add r1, r4, #0 - bl sub_0200B1EC - str r0, [r5, #0x24] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021D2794 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_021D27A8: .word 0x000001CE - thumb_func_end ov79_021D2768 - - thumb_func_start ov79_021D27AC -ov79_021D27AC: ; 0x021D27AC - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_021D27B4: - ldr r0, [r5, #0x24] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #3 - blt _021D27B4 - ldr r0, [r6, #0x20] - bl sub_020237BC - ldr r0, [r6, #0x1c] - bl sub_0200B3F0 - ldr r0, [r6, #0x18] - bl sub_0200B190 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov79_021D27AC - - thumb_func_start ov79_021D27D8 -ov79_021D27D8: ; 0x021D27D8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x10] - mov r1, #5 - ldr r0, [r0, #0] - mov r2, #0 - str r0, [r4, #0x30] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0] - bl sub_02074470 - strh r0, [r4, #0x34] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0] - bl sub_02075D6C - add r1, r4, #0 - add r1, #0x37 - strb r0, [r1] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0] - bl sub_02075BCC - add r1, r4, #0 - add r1, #0x36 - strb r0, [r1] - ldr r0, [r4, #0x10] - mov r1, #0x70 - ldr r0, [r0, #0] - mov r2, #0 - bl sub_02074470 - add r1, r0, #0 - ldrh r0, [r4, #0x34] - mov r2, #0x1c - bl sub_020759CC - mov r1, #1 - eor r1, r0 - add r0, r4, #0 - add r0, #0x38 - strb r1, [r0] - ldr r1, [r4, #0] - mov r0, #0xc - bl sub_02023790 - str r0, [r4, #0x3c] - ldr r0, [r4, #0x10] - ldr r2, [r4, #0x3c] - ldr r0, [r0, #0] - mov r1, #0x77 - bl sub_02074470 - add r1, r4, #0 - ldr r0, [r4, #0x10] - add r1, #0x36 - ldrb r1, [r1] - ldr r0, [r0, #4] - bl sub_02098EAC - add r4, #0x39 - strb r0, [r4] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D27D8 - - thumb_func_start ov79_021D2858 -ov79_021D2858: ; 0x021D2858 - ldr r3, _021D2860 ; =sub_020237BC - ldr r0, [r0, #0x3c] - bx r3 - nop -_021D2860: .word sub_020237BC - thumb_func_end ov79_021D2858 - - thumb_func_start ov79_021D2864 -ov79_021D2864: ; 0x021D2864 - push {r3, r4, r5, r6, lr} - sub sp, #0x44 - add r4, r0, #0 - ldr r1, [r4, #0] - mov r0, #0x20 - bl sub_0201DBEC - ldr r0, [r4, #0] - bl sub_0200C6E4 - add r2, sp, #0x24 - ldr r5, _021D2900 ; =0x021D3C50 - str r0, [r4, #0x7c] - ldmia r5!, {r0, r1} - add r3, r2, #0 - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r5!, {r0, r1} - ldr r6, _021D2904 ; =0x021D3C3C - stmia r2!, {r0, r1} - add r5, sp, #0x10 - ldmia r6!, {r0, r1} - add r2, r5, #0 - stmia r5!, {r0, r1} - ldmia r6!, {r0, r1} - stmia r5!, {r0, r1} - ldr r0, [r6, #0] - add r1, r3, #0 - str r0, [r5, #0] - ldr r0, [r4, #0x7c] - mov r3, #0x20 - bl sub_0200C73C - ldr r0, [r4, #0] - bl sub_0200A93C - mov r0, #0 - str r0, [sp] - mov r1, #2 - ldr r0, [r4, #0] - add r2, r1, #0 - mov r3, #1 - bl sub_02098FFC - str r0, [r4, #0x5c] - mov r1, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - str r1, [sp, #8] - str r1, [sp, #0xc] - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x5c] - ldrh r1, [r1, #8] - mov r2, #0x64 - mov r3, #0x5a - bl sub_0209916C - str r0, [r4, #0x60] - ldr r0, [r0, #4] - mov r1, #0 - bl sub_0200D3F4 - bl sub_02035E38 - cmp r0, #0 - beq _021D28F4 - bl sub_02039734 -_021D28F4: - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x44 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_021D2900: .word 0x021D3C50 -_021D2904: .word 0x021D3C3C - thumb_func_end ov79_021D2864 - - thumb_func_start ov79_021D2908 -ov79_021D2908: ; 0x021D2908 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x5c] - ldr r1, [r4, #0x60] - bl sub_02099370 - ldr r0, [r4, #0x5c] - bl sub_0209903C - ldr r0, [r4, #0x7c] - bl sub_0200C8D4 - bl sub_0201DC3C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D2908 - - thumb_func_start ov79_021D2928 -ov79_021D2928: ; 0x021D2928 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #4] - cmp r1, #8 - bhi _021D29A8 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_021D293E: ; jump table - .short _021D2950 - _021D293E - 2 ; case 0 - .short _021D295C - _021D293E - 2 ; case 1 - .short _021D2968 - _021D293E - 2 ; case 2 - .short _021D2974 - _021D293E - 2 ; case 3 - .short _021D2980 - _021D293E - 2 ; case 4 - .short _021D298C - _021D293E - 2 ; case 5 - .short _021D2998 - _021D293E - 2 ; case 6 - .short _021D29A0 - _021D293E - 2 ; case 7 - .short _021D29A8 - _021D293E - 2 ; case 8 -_021D2950: - add r1, r4, #0 - add r1, #0x80 - bl ov79_021D2A04 - str r0, [r4, #4] - b _021D29B0 -_021D295C: - add r1, r4, #0 - add r1, #0x80 - bl ov79_021D2AE0 - str r0, [r4, #4] - b _021D29B0 -_021D2968: - add r1, r4, #0 - add r1, #0x80 - bl ov79_021D2AF0 - str r0, [r4, #4] - b _021D29B0 -_021D2974: - add r1, r4, #0 - add r1, #0x80 - bl ov79_021D2B3C - str r0, [r4, #4] - b _021D29B0 -_021D2980: - add r1, r4, #0 - add r1, #0x80 - bl ov79_021D2B54 - str r0, [r4, #4] - b _021D29B0 -_021D298C: - add r1, r4, #0 - add r1, #0x80 - bl ov79_021D2B84 - str r0, [r4, #4] - b _021D29B0 -_021D2998: - bl ov79_021D2B94 - str r0, [r4, #4] - b _021D29B0 -_021D29A0: - bl ov79_021D2C08 - str r0, [r4, #4] - b _021D29B0 -_021D29A8: - mov r0, #0 - str r0, [r4, #4] - mov r0, #1 - pop {r4, pc} -_021D29B0: - mov r0, #0 - pop {r4, pc} - thumb_func_end ov79_021D2928 - - thumb_func_start ov79_021D29B4 -ov79_021D29B4: ; 0x021D29B4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r2, #0 - add r3, r5, #0 - add r0, r1, #0 - mov r2, #0x1c - add r3, #0xcc - mul r0, r2 - add r4, r3, r0 - add r0, r4, #0 - mov r1, #0 - bl sub_020C4CF4 - str r5, [r4, #0x14] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #0x18] - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] - pop {r4, r5, r6, pc} - thumb_func_end ov79_021D29B4 - - thumb_func_start ov79_021D29E4 -ov79_021D29E4: ; 0x021D29E4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - bl sub_0200DA58 - ldr r1, [r4, #0x14] - mov r2, #0x1c - ldr r0, [r1, #4] - sub r0, r0, #1 - str r0, [r1, #4] - add r0, r4, #0 - mov r1, #0 - bl sub_020C4CF4 - mov r0, #0 - pop {r4, pc} - thumb_func_end ov79_021D29E4 - - thumb_func_start ov79_021D2A04 -ov79_021D2A04: ; 0x021D2A04 - push {r3, r4, r5, lr} - sub sp, #0x18 - add r4, r1, #0 - mov r2, #0x4f - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #2 - bl sub_020C4CF4 - ldr r0, [r5, #0x60] - mov r2, #0x18 - ldr r0, [r0, #4] - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - ldr r1, [r5, #0x58] - add r0, r4, #0 - add r0, #0xc8 - str r1, [r0, #0] - add r5, #0x39 - ldrb r0, [r5] - mov r1, #2 - lsl r1, r1, #0x12 - str r0, [r4, #8] - str r2, [r4, #0] - mov r0, #0xe - str r1, [r4, #0xc] - lsl r0, r0, #0x10 - str r0, [r4, #0x10] - str r1, [r4, #0x18] - lsl r0, r2, #0xe - str r0, [r4, #0x1c] - lsr r0, r1, #7 - str r0, [r4, #0x30] - str r0, [r4, #0x34] - lsr r0, r1, #8 - str r0, [r4, #0x3c] - str r0, [r4, #0x40] - add r1, r4, #0 - str r2, [r4, #0x64] - mov r0, #0 - str r0, [r4, #0x60] - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, #0xc - bl sub_02021C50 - add r0, r4, #0 - add r1, r4, #0 - add r0, #0xc - add r1, #0x18 - add r2, sp, #0xc - bl sub_020BD1B0 - add r1, r4, #0 - mov r3, #6 - add r0, sp, #0 - add r1, #0x48 - add r2, sp, #0xc - lsl r3, r3, #0xe - bl ov79_021D2268 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CF8 - add r0, r4, #0 - add r0, #0xc4 - add r1, r4, #0 - ldr r0, [r0, #0] - add r1, #0x30 - bl sub_02021C70 - ldr r2, _021D2AD0 ; =ov79_021D2C50 - add r0, r4, #0 - mov r1, #0 - bl ov79_021D29B4 - ldr r2, _021D2AD4 ; =ov79_021D2D7C - add r0, r4, #0 - mov r1, #1 - bl ov79_021D29B4 - ldr r2, _021D2AD8 ; =ov79_021D2F4C - add r0, r4, #0 - mov r1, #2 - bl ov79_021D29B4 - ldr r2, _021D2ADC ; =ov79_021D3094 - add r0, r4, #0 - mov r1, #3 - bl ov79_021D29B4 - mov r0, #1 - add sp, #0x18 - pop {r3, r4, r5, pc} - nop -_021D2AD0: .word ov79_021D2C50 -_021D2AD4: .word ov79_021D2D7C -_021D2AD8: .word ov79_021D2F4C -_021D2ADC: .word ov79_021D3094 - thumb_func_end ov79_021D2A04 - - thumb_func_start ov79_021D2AE0 -ov79_021D2AE0: ; 0x021D2AE0 - ldr r0, [r1, #4] - cmp r0, #0 - beq _021D2AEA - mov r0, #1 - bx lr -_021D2AEA: - mov r0, #2 - bx lr - ; .align 2, 0 - thumb_func_end ov79_021D2AE0 - - thumb_func_start ov79_021D2AF0 -ov79_021D2AF0: ; 0x021D2AF0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x30] - mov r1, #0x70 - mov r2, #0 - bl sub_02074470 - add r1, r4, #0 - add r1, #0x39 - ldrb r1, [r1] - cmp r1, #1 - ldr r1, [r4, #0] - bne _021D2B22 - lsl r0, r0, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r1, [r4, #0x34] - mov r0, #0xb - mov r2, #0 - mov r3, #0x7f - bl sub_020059D0 - b _021D2B36 -_021D2B22: - lsl r0, r0, #0x18 - str r1, [sp] - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #0 - ldrh r1, [r4, #0x34] - add r2, r0, #0 - mov r3, #0x7f - bl sub_020059D0 -_021D2B36: - mov r0, #3 - add sp, #8 - pop {r4, pc} - thumb_func_end ov79_021D2AF0 - - thumb_func_start ov79_021D2B3C -ov79_021D2B3C: ; 0x021D2B3C - push {r3, lr} - bl sub_0200598C - cmp r0, #0 - beq _021D2B4A - mov r0, #3 - pop {r3, pc} -_021D2B4A: - mov r0, #0 - bl sub_0200592C - mov r0, #4 - pop {r3, pc} - thumb_func_end ov79_021D2B3C - - thumb_func_start ov79_021D2B54 -ov79_021D2B54: ; 0x021D2B54 - push {r4, lr} - add r4, r1, #0 - add r0, r4, #0 - add r0, #0x68 - mov r1, #0 - mov r2, #0x5c - bl sub_020C4CF4 - ldr r2, _021D2B7C ; =ov79_021D3290 - add r0, r4, #0 - mov r1, #0 - bl ov79_021D29B4 - ldr r2, _021D2B80 ; =ov79_021D33DC - add r0, r4, #0 - mov r1, #1 - bl ov79_021D29B4 - mov r0, #5 - pop {r4, pc} - ; .align 2, 0 -_021D2B7C: .word ov79_021D3290 -_021D2B80: .word ov79_021D33DC - thumb_func_end ov79_021D2B54 - - thumb_func_start ov79_021D2B84 -ov79_021D2B84: ; 0x021D2B84 - ldr r0, [r1, #4] - cmp r0, #0 - beq _021D2B8E - mov r0, #5 - bx lr -_021D2B8E: - mov r0, #6 - bx lr - ; .align 2, 0 - thumb_func_end ov79_021D2B84 - - thumb_func_start ov79_021D2B94 -ov79_021D2B94: ; 0x021D2B94 - push {r4, lr} - sub sp, #0x10 - mov r1, #1 - add r4, r0, #0 - add r0, #0x6c - add r2, r1, #0 - mov r3, #0xe - bl sub_0200E060 - add r0, r4, #0 - add r0, #0x6c - mov r1, #0xff - bl sub_0201ADA4 - ldr r0, [r4, #0x20] - bl sub_020237E8 - mov r0, #1 - str r0, [sp] - mov r3, #2 - str r3, [sp, #4] - ldr r0, [r4, #0x1c] - ldr r2, [r4, #0x3c] - mov r1, #0 - bl sub_0200B48C - add r2, r4, #0 - add r2, #0x39 - ldrb r2, [r2] - ldr r0, [r4, #0x1c] - ldr r1, [r4, #0x20] - lsl r2, r2, #2 - add r2, r4, r2 - ldr r2, [r2, #0x24] - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - ldr r0, [r4, #0x10] - mov r1, #1 - ldrb r0, [r0, #0xa] - str r0, [sp, #4] - ldr r0, _021D2C04 ; =0x0001020F - str r0, [sp, #8] - str r3, [sp, #0xc] - add r0, r4, #0 - ldr r2, [r4, #0x20] - add r0, #0x6c - bl sub_0201D78C - strh r0, [r4, #0xc] - mov r0, #0 - strh r0, [r4, #0xe] - mov r0, #7 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_021D2C04: .word 0x0001020F - thumb_func_end ov79_021D2B94 - - thumb_func_start ov79_021D2C08 -ov79_021D2C08: ; 0x021D2C08 - push {r4, lr} - add r4, r0, #0 - ldrh r0, [r4, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - beq _021D2C1E - mov r0, #7 - pop {r4, pc} -_021D2C1E: - ldr r0, _021D2C4C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - bne _021D2C36 - ldrh r1, [r4, #0xe] - add r0, r1, #1 - strh r0, [r4, #0xe] - cmp r1, #0x5a - bhs _021D2C36 - mov r0, #7 - pop {r4, pc} -_021D2C36: - add r0, r4, #0 - add r0, #0x6c - mov r1, #1 - bl sub_0200E084 - add r4, #0x6c - add r0, r4, #0 - bl sub_0201ACF4 - mov r0, #8 - pop {r4, pc} - ; .align 2, 0 -_021D2C4C: .word 0x021BF67C - thumb_func_end ov79_021D2C08 - - thumb_func_start ov79_021D2C50 -ov79_021D2C50: ; 0x021D2C50 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - ldr r4, [r6, #0x14] - add r7, r0, #0 - mov r0, #0x18 - add r5, r4, #0 - str r0, [r6, #4] - mov r0, #1 - add r5, #0xc - lsl r0, r0, #0xc - str r0, [r5, #0x24] - str r0, [r5, #0x28] - lsr r0, r0, #1 - str r0, [r5, #0x30] - str r0, [r5, #0x34] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x24 - add r1, #0x30 - add r2, sp, #0xc - bl sub_020BD1B0 - ldr r0, [r6, #4] - cmp r0, #0 - ble _021D2C96 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D2CA4 -_021D2C96: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D2CA4: - bl sub_020E1740 - add r1, r5, #0 - add r3, r0, #0 - add r0, sp, #0 - add r1, #0x3c - add r2, sp, #0xc - bl ov79_021D2268 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CAC - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - mov r1, #1 - bl sub_02021CF8 - add r4, #0xc4 - add r5, #0x24 - ldr r0, [r4, #0] - add r1, r5, #0 - bl sub_02021C70 - ldr r1, _021D2CE8 ; =ov79_021D2CEC - add r0, r7, #0 - bl sub_0201CECC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D2CE8: .word ov79_021D2CEC - thumb_func_end ov79_021D2C50 - - thumb_func_start ov79_021D2CEC -ov79_021D2CEC: ; 0x021D2CEC - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r6, [r5, #0x14] - add r1, sp, #0 - mov r0, #0 - str r0, [r1, #0] - add r4, r6, #0 - str r0, [r1, #4] - str r0, [r1, #8] - add r4, #0xc - ldr r0, [r4, #0x3c] - ldr r2, [r5, #0xc] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - mov r0, #2 - add r3, r1, #0 - mov r7, #0 - lsl r0, r0, #0xa - add r0, r2, r0 - adc r3, r7 - ldr r1, [r4, #0x24] - lsl r2, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - sub r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #0x40] - ldr r2, [r5, #0xc] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r3, #2 - ldr r2, [r4, #0x28] - add r4, r7, #0 - lsl r3, r3, #0xa - add r3, r0, r3 - adc r1, r4 - lsl r0, r1, #0x14 - lsr r1, r3, #0xc - orr r1, r0 - sub r0, r2, r1 - str r0, [sp, #4] - add r0, r6, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - add r1, sp, #0 - bl sub_02021C70 - mov r0, #1 - ldr r1, [r5, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r5, #0xc] - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] - bne _021D2D78 - add r6, #0xc4 - ldr r0, [r6, #0] - add r1, r7, #0 - bl sub_02021CAC - add r0, r5, #0 - bl ov79_021D29E4 -_021D2D78: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov79_021D2CEC - - thumb_func_start ov79_021D2D7C -ov79_021D2D7C: ; 0x021D2D7C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r1, #0 - ldr r6, [r5, #0x14] - add r7, r0, #0 - add r3, sp, #0xc - mov r0, #0 - str r0, [r3, #0] - str r0, [r3, #4] - str r0, [r3, #8] - mov r2, #0x18 - mov r1, #2 - add r4, r6, #0 - mov r0, #0xe - str r2, [r5, #4] - lsl r1, r1, #0x12 - add r4, #0xc - str r1, [r6, #0xc] - lsl r0, r0, #0x10 - str r0, [r4, #4] - str r1, [r4, #0xc] - lsl r0, r2, #0xe - str r0, [r4, #0x10] - add r0, r4, #0 - add r0, #0xc - add r1, r4, #0 - add r2, r3, #0 - bl sub_020BD1B0 - ldr r0, [r5, #4] - cmp r0, #0 - ble _021D2DCE - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D2DDC -_021D2DCE: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D2DDC: - bl sub_020E1740 - add r1, r4, #0 - add r3, r0, #0 - add r0, sp, #0 - add r1, #0x18 - add r2, sp, #0xc - bl ov79_021D2268 - ldr r0, [r5, #4] - cmp r0, #0 - ble _021D2E06 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D2E14 -_021D2E06: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D2E14: - bl sub_020E1740 - add r1, r0, #0 - mov r0, #0x2d - lsl r0, r0, #0xe - bl sub_020BCFD0 - str r0, [r4, #0x48] - ldr r0, [r5, #4] - cmp r0, #0 - ble _021D2E3C - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D2E4A -_021D2E3C: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D2E4A: - bl sub_020E1740 - add r1, r0, #0 - mov r0, #1 - lsl r0, r0, #0xc - bl sub_020BCFD0 - add r6, #0xc4 - str r0, [r4, #0x4c] - ldr r0, [r6, #0] - add r1, r4, #0 - bl sub_02021C50 - ldr r1, _021D2E70 ; =ov79_021D2E74 - add r0, r7, #0 - bl sub_0201CECC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2E70: .word ov79_021D2E74 - thumb_func_end ov79_021D2D7C - - thumb_func_start ov79_021D2E74 -ov79_021D2E74: ; 0x021D2E74 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r6, [r5, #0x14] - ldr r2, [r5, #0xc] - add r4, r6, #0 - add r4, #0xc - ldr r0, [r4, #0x18] - asr r3, r2, #0x1f - asr r1, r0, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - mov r0, #2 - add r3, r1, #0 - mov r7, #0 - lsl r0, r0, #0xa - add r0, r2, r0 - adc r3, r7 - ldr r1, [r6, #0xc] - lsl r2, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - add r0, r1, r0 - str r0, [sp] - ldr r0, [r4, #0x1c] - ldr r2, [r5, #0xc] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - mov r0, #2 - add r3, r1, #0 - lsl r0, r0, #0xa - add r0, r2, r0 - adc r3, r7 - ldr r1, [r4, #4] - lsl r2, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - add r0, r1, r0 - str r0, [sp, #4] - ldr r0, [r4, #0x48] - ldr r2, [r5, #0xc] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - add r3, r7, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - lsl r0, r1, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, _021D2F48 ; =0xFFFC0000 - asr r1, r0, #0x1f - asr r3, r2, #0x12 - bl sub_020E1F1C - add r3, r7, #0 - mov r7, #2 - add r2, r1, #0 - lsl r7, r7, #0xa - add r0, r0, r7 - adc r2, r3 - lsl r2, r2, #0x14 - lsr r0, r0, #0xc - orr r0, r2 - asr r4, r0, #0x1f - lsr r2, r0, #0x14 - lsl r4, r4, #0xc - orr r4, r2 - lsl r0, r0, #0xc - add r2, r0, r7 - adc r4, r3 - ldr r1, [sp, #4] - lsl r0, r4, #0x14 - lsr r2, r2, #0xc - orr r2, r0 - add r0, r1, r2 - add r6, #0xc4 - str r0, [sp, #4] - ldr r0, [r6, #0] - add r1, sp, #0 - bl sub_02021C50 - ldr r1, [r5, #0xc] - lsl r0, r7, #1 - add r0, r1, r0 - str r0, [r5, #0xc] - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] - bne _021D2F44 - add r0, r5, #0 - bl ov79_021D29E4 -_021D2F44: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2F48: .word 0xFFFC0000 - thumb_func_end ov79_021D2E74 - - thumb_func_start ov79_021D2F4C -ov79_021D2F4C: ; 0x021D2F4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - ldr r4, [r6, #0x14] - add r7, r0, #0 - add r5, r4, #0 - mov r1, #0x18 - mov r0, #1 - add r5, #0x68 - str r1, [r6, #4] - lsl r0, r0, #0xc - str r0, [r5, #0x24] - str r0, [r5, #0x28] - lsl r0, r1, #8 - str r0, [r5, #0x30] - str r0, [r5, #0x34] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x30 - add r1, #0x24 - add r2, sp, #0xc - bl sub_020BD1B0 - ldr r0, [r6, #4] - cmp r0, #0 - ble _021D2F92 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D2FA0 -_021D2F92: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D2FA0: - bl sub_020E1740 - add r5, #0x3c - add r3, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - add r2, sp, #0xc - bl ov79_021D2268 - add r0, r4, #0 - add r0, #0xc8 - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r0, #0] - add r2, #0xf4 - bl sub_02007DEC - add r4, #0xc8 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #0] - add r2, #0xf3 - bl sub_02007DEC - ldr r1, _021D2FDC ; =ov79_021D2FE0 - add r0, r7, #0 - bl sub_0201CECC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D2FDC: .word ov79_021D2FE0 - thumb_func_end ov79_021D2F4C - - thumb_func_start ov79_021D2FE0 -ov79_021D2FE0: ; 0x021D2FE0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - ldr r6, [r5, #0x14] - ldr r0, [r5, #0xc] - add r4, r6, #0 - add r4, #0x68 - str r0, [sp, #4] - asr r7, r0, #0x1f - ldr r0, [r4, #0x40] - ldr r2, [sp, #4] - asr r1, r0, #0x1f - add r3, r7, #0 - bl sub_020E1F1C - mov r3, #2 - add r2, r0, #0 - lsl r3, r3, #0xa - add r3, r2, r3 - ldr r2, _021D3090 ; =0x00000000 - ldr r0, [r4, #0x28] - adc r1, r2 - lsr r2, r3, #0xc - lsl r1, r1, #0x14 - orr r2, r1 - add r0, r0, r2 - str r0, [sp] - ldr r0, [r4, #0x3c] - ldr r2, [sp, #4] - asr r1, r0, #0x1f - add r3, r7, #0 - bl sub_020E1F1C - mov r2, #2 - add r3, r0, #0 - add r0, r6, #0 - add r7, r1, #0 - add r0, #0xc8 - lsl r2, r2, #0xa - mov r1, #0xc - add r3, r3, r2 - ldr r2, _021D3090 ; =0x00000000 - ldr r4, [r4, #0x24] - adc r7, r2 - lsl r2, r7, #0x14 - lsr r3, r3, #0xc - orr r3, r2 - add r2, r4, r3 - ldr r0, [r0, #0] - asr r2, r2, #4 - bl sub_02007DEC - add r0, r6, #0 - add r0, #0xc8 - ldr r2, [sp] - ldr r0, [r0, #0] - mov r1, #0xd - asr r2, r2, #4 - bl sub_02007DEC - mov r0, #1 - ldr r1, [r5, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r5, #0xc] - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] - bne _021D308A - add r0, r6, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #0 - mov r2, #0x80 - bl sub_02007DEC - add r6, #0xc8 - ldr r0, [r6, #0] - mov r1, #1 - mov r2, #0x60 - bl sub_02007DEC - add r0, r5, #0 - bl ov79_021D29E4 -_021D308A: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D3090: .word 0x00000000 - thumb_func_end ov79_021D2FE0 - - thumb_func_start ov79_021D3094 -ov79_021D3094: ; 0x021D3094 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - ldr r4, [r6, #0x14] - add r7, r0, #0 - mov r0, #0x18 - mov r1, #2 - add r5, r4, #0 - str r0, [r6, #4] - lsl r1, r1, #0x12 - add r5, #0x68 - str r1, [r4, #0x68] - lsl r0, r0, #0xe - str r0, [r5, #4] - mov r0, #7 - str r1, [r5, #0xc] - lsl r0, r0, #0x10 - str r0, [r5, #0x10] - add r0, r5, #0 - add r0, #0xc - add r1, r5, #0 - add r2, sp, #0xc - bl sub_020BD1B0 - ldr r0, [r6, #4] - cmp r0, #0 - ble _021D30DC - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D30EA -_021D30DC: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D30EA: - bl sub_020E1740 - add r1, r5, #0 - add r3, r0, #0 - add r0, sp, #0 - add r1, #0x18 - add r2, sp, #0xc - bl ov79_021D2268 - add r0, r4, #0 - add r0, #0xc8 - ldr r2, [r5, #0] - ldr r0, [r0, #0] - mov r1, #0 - asr r2, r2, #0xc - bl sub_02007DEC - add r4, #0xc8 - ldr r2, [r5, #4] - ldr r0, [r4, #0] - mov r1, #1 - asr r2, r2, #0xc - bl sub_02007DEC - ldr r1, _021D3128 ; =ov79_021D312C - add r0, r7, #0 - bl sub_0201CECC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D3128: .word ov79_021D312C - thumb_func_end ov79_021D3094 - - thumb_func_start ov79_021D312C -ov79_021D312C: ; 0x021D312C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - ldr r5, [r6, #0x14] - ldr r7, [r6, #0xc] - add r4, r5, #0 - str r0, [sp] - asr r0, r7, #0x1f - str r0, [sp, #8] - add r4, #0x68 - ldr r0, [r4, #0x1c] - ldr r3, [sp, #8] - asr r1, r0, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov r3, #2 - add r2, r0, #0 - lsl r3, r3, #0xa - add r3, r2, r3 - ldr r2, _021D3260 ; =0x00000000 - ldr r0, [r4, #4] - adc r1, r2 - lsr r2, r3, #0xc - lsl r1, r1, #0x14 - orr r2, r1 - add r0, r0, r2 - str r0, [sp, #4] - ldr r0, [r4, #0x18] - ldr r3, [sp, #8] - asr r1, r0, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov ip, r0 - ldr r2, [r5, #0x68] - add r7, r1, #0 - str r2, [sp, #0xc] - mov r2, #2 - add r0, r5, #0 - add r0, #0xc8 - mov r1, #0 - mov r3, ip - lsl r2, r2, #0xa - add r2, r3, r2 - adc r7, r1 - lsl r3, r7, #0x14 - lsr r2, r2, #0xc - orr r2, r3 - ldr r3, [sp, #0xc] - ldr r0, [r0, #0] - add r2, r3, r2 - asr r2, r2, #0xc - bl sub_02007DEC - add r0, r5, #0 - add r0, #0xc8 - ldr r2, [sp, #4] - ldr r0, [r0, #0] - mov r1, #1 - asr r2, r2, #0xc - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - sub r0, r0, #4 - add r1, r0, #0 - mul r1, r0 - mov r0, #0x10 - sub r0, r0, r1 - neg r0, r0 - cmp r0, #0 - ble _021D31D2 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D31E0 -_021D31D2: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D31E0: - bl sub_020E1740 - ldr r2, _021D3264 ; =0x00001666 - asr r1, r0, #0x1f - mov r3, #0 - bl sub_020E1F1C - add r3, r1, #0 - mov r1, #4 - add r7, r0, #0 - add r0, r5, #0 - add r0, #0xc8 - lsl r2, r1, #9 - add r7, r7, r2 - ldr r2, _021D3260 ; =0x00000000 - ldr r0, [r0, #0] - adc r3, r2 - lsl r2, r3, #0x14 - lsr r3, r7, #0xc - orr r3, r2 - asr r2, r3, #0xc - bl sub_02007DEC - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x50 - strh r1, [r0] - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - cmp r0, #8 - bls _021D322E - add r0, r4, #0 - mov r1, #0 - add r0, #0x50 - strh r1, [r0] -_021D322E: - mov r0, #1 - ldr r1, [r6, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r6, #0xc] - ldr r1, [r6, #4] - sub r0, r1, #1 - str r0, [r6, #4] - cmp r1, #0 - bne _021D325C - add r5, #0xc8 - ldr r0, [r5, #0] - mov r1, #4 - mov r2, #0 - bl sub_02007DEC - mov r0, #0 - add r4, #0x50 - strh r0, [r4] - ldr r0, [sp] - ldr r1, _021D3268 ; =ov79_021D326C - bl sub_0201CECC -_021D325C: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3260: .word 0x00000000 -_021D3264: .word 0x00001666 -_021D3268: .word ov79_021D326C - thumb_func_end ov79_021D312C - - thumb_func_start ov79_021D326C -ov79_021D326C: ; 0x021D326C - push {r3, lr} - ldr r3, [r1, #0x14] - add r3, #0x68 - add r0, r3, #0 - add r0, #0x50 - ldrh r2, [r0] - add r0, r3, #0 - add r0, #0x50 - ldrh r0, [r0] - add r3, #0x50 - add r0, r0, #1 - strh r0, [r3] - cmp r2, #4 - blo _021D328E - add r0, r1, #0 - bl ov79_021D29E4 -_021D328E: - pop {r3, pc} - thumb_func_end ov79_021D326C - - thumb_func_start ov79_021D3290 -ov79_021D3290: ; 0x021D3290 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - ldr r4, [r6, #0x14] - add r7, r0, #0 - add r5, r4, #0 - mov r1, #8 - mov r0, #6 - add r5, #0x68 - str r1, [r6, #4] - lsl r0, r0, #0xa - str r0, [r5, #0x24] - str r0, [r5, #0x28] - lsl r0, r1, #9 - str r0, [r5, #0x30] - str r0, [r5, #0x34] - add r0, r5, #0 - add r1, r5, #0 - add r0, #0x30 - add r1, #0x24 - add r2, sp, #0xc - bl sub_020BD1B0 - ldr r0, [r6, #4] - cmp r0, #0 - ble _021D32D6 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D32E4 -_021D32D6: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D32E4: - bl sub_020E1740 - add r5, #0x3c - add r3, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - add r2, sp, #0xc - bl ov79_021D2268 - add r0, r4, #0 - add r0, #0xc8 - mov r1, #0xc - ldr r0, [r0, #0] - lsl r2, r1, #5 - bl sub_02007DEC - add r4, #0xc8 - mov r2, #6 - ldr r0, [r4, #0] - mov r1, #0xd - lsl r2, r2, #6 - bl sub_02007DEC - ldr r1, _021D3320 ; =ov79_021D3324 - add r0, r7, #0 - bl sub_0201CECC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D3320: .word ov79_021D3324 - thumb_func_end ov79_021D3290 - - thumb_func_start ov79_021D3324 -ov79_021D3324: ; 0x021D3324 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r1, #0 - ldr r6, [r5, #0x14] - ldr r0, [r5, #0xc] - add r4, r6, #0 - add r4, #0x68 - str r0, [sp, #4] - asr r7, r0, #0x1f - ldr r0, [r4, #0x40] - ldr r2, [sp, #4] - asr r1, r0, #0x1f - add r3, r7, #0 - bl sub_020E1F1C - mov r3, #2 - add r2, r0, #0 - lsl r3, r3, #0xa - add r3, r2, r3 - ldr r2, _021D33D8 ; =0x00000000 - ldr r0, [r4, #0x28] - adc r1, r2 - lsr r2, r3, #0xc - lsl r1, r1, #0x14 - orr r2, r1 - add r0, r0, r2 - str r0, [sp] - ldr r0, [r4, #0x3c] - ldr r2, [sp, #4] - asr r1, r0, #0x1f - add r3, r7, #0 - bl sub_020E1F1C - mov r2, #2 - add r3, r0, #0 - add r0, r6, #0 - add r7, r1, #0 - add r0, #0xc8 - lsl r2, r2, #0xa - mov r1, #0xc - add r3, r3, r2 - ldr r2, _021D33D8 ; =0x00000000 - ldr r4, [r4, #0x24] - adc r7, r2 - lsl r2, r7, #0x14 - lsr r3, r3, #0xc - orr r3, r2 - add r2, r4, r3 - ldr r0, [r0, #0] - asr r2, r2, #4 - bl sub_02007DEC - add r0, r6, #0 - add r0, #0xc8 - ldr r2, [sp] - ldr r0, [r0, #0] - mov r1, #0xd - asr r2, r2, #4 - bl sub_02007DEC - mov r0, #1 - ldr r1, [r5, #0xc] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r5, #0xc] - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] - bne _021D33D2 - add r0, r6, #0 - add r0, #0xc8 - mov r1, #0xc - add r2, r1, #0 - ldr r0, [r0, #0] - add r2, #0xf4 - bl sub_02007DEC - add r6, #0xc8 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r6, #0] - add r2, #0xf3 - bl sub_02007DEC - add r0, r5, #0 - bl ov79_021D29E4 -_021D33D2: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D33D8: .word 0x00000000 - thumb_func_end ov79_021D3324 - - thumb_func_start ov79_021D33DC -ov79_021D33DC: ; 0x021D33DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r6, r1, #0 - ldr r4, [r6, #0x14] - add r7, r0, #0 - mov r0, #8 - add r5, r4, #0 - str r0, [r6, #4] - lsl r1, r0, #0x10 - mov r0, #7 - add r5, #0x68 - str r1, [r4, #0x68] - lsl r0, r0, #0x10 - str r0, [r5, #4] - mov r0, #6 - str r1, [r5, #0xc] - lsl r0, r0, #0x10 - str r0, [r5, #0x10] - add r0, r5, #0 - add r0, #0xc - add r1, r5, #0 - add r2, sp, #0xc - bl sub_020BD1B0 - ldr r0, [r6, #4] - cmp r0, #0 - ble _021D3424 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D3432 -_021D3424: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D3432: - bl sub_020E1740 - add r1, r5, #0 - add r3, r0, #0 - add r0, sp, #0 - add r1, #0x18 - add r2, sp, #0xc - bl ov79_021D2268 - ldr r0, [r6, #4] - cmp r0, #0 - ble _021D345C - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D346A -_021D345C: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D346A: - bl sub_020E1740 - add r1, r0, #0 - mov r0, #0x2d - lsl r0, r0, #0xe - bl sub_020BCFD0 - str r0, [r5, #0x48] - add r0, r4, #0 - add r0, #0xc8 - ldr r2, [r5, #0] - ldr r0, [r0, #0] - mov r1, #0 - asr r2, r2, #0xc - bl sub_02007DEC - add r4, #0xc8 - ldr r2, [r5, #4] - ldr r0, [r4, #0] - mov r1, #1 - asr r2, r2, #0xc - bl sub_02007DEC - ldr r1, _021D34A4 ; =ov79_021D34A8 - add r0, r7, #0 - bl sub_0201CECC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D34A4: .word ov79_021D34A8 - thumb_func_end ov79_021D33DC - - thumb_func_start ov79_021D34A8 -ov79_021D34A8: ; 0x021D34A8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - ldr r5, [r6, #0x14] - ldr r7, [r6, #0xc] - add r4, r5, #0 - str r0, [sp] - asr r0, r7, #0x1f - str r0, [sp, #8] - add r4, #0x68 - ldr r0, [r4, #0x1c] - ldr r3, [sp, #8] - asr r1, r0, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov r3, #2 - add r2, r0, #0 - lsl r3, r3, #0xa - add r3, r2, r3 - ldr r2, _021D35A4 ; =0x00000000 - ldr r0, [r4, #4] - adc r1, r2 - lsr r2, r3, #0xc - lsl r1, r1, #0x14 - orr r2, r1 - add r0, r0, r2 - str r0, [sp, #4] - ldr r0, [r4, #0x18] - ldr r3, [sp, #8] - asr r1, r0, #0x1f - add r2, r7, #0 - bl sub_020E1F1C - mov ip, r0 - ldr r2, [r5, #0x68] - add r7, r1, #0 - str r2, [sp, #0xc] - mov r2, #2 - add r0, r5, #0 - add r0, #0xc8 - mov r1, #0 - mov r3, ip - lsl r2, r2, #0xa - add r2, r3, r2 - adc r7, r1 - lsl r3, r7, #0x14 - lsr r2, r2, #0xc - orr r2, r3 - ldr r3, [sp, #0xc] - ldr r0, [r0, #0] - add r2, r3, r2 - asr r2, r2, #0xc - bl sub_02007DEC - add r0, r5, #0 - add r0, #0xc8 - ldr r2, [sp, #4] - ldr r0, [r0, #0] - mov r1, #1 - asr r2, r2, #0xc - bl sub_02007DEC - ldr r0, [r4, #0x48] - ldr r2, [r6, #0xc] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - lsl r0, r1, #4 - lsr r0, r0, #0x10 - bl sub_0201D250 - ldr r2, _021D35A8 ; =0xFFFFA000 - asr r1, r0, #0x1f - asr r3, r2, #0xf - bl sub_020E1F1C - add r4, r1, #0 - mov r1, #4 - add r3, r0, #0 - add r0, r5, #0 - add r0, #0xc8 - mov r7, #0 - lsl r2, r1, #9 - add r2, r3, r2 - adc r4, r7 - lsl r3, r4, #0x14 - lsr r2, r2, #0xc - orr r2, r3 - ldr r0, [r0, #0] - asr r2, r2, #0xc - bl sub_02007DEC - add r2, r6, #0 - add r2, #0xc - mov r0, #1 - ldr r1, [r2, #0] - lsl r0, r0, #0xc - add r0, r1, r0 - str r0, [r2, #0] - ldr r0, [r6, #4] - sub r0, r0, #1 - str r0, [r6, #4] - bne _021D359E - add r5, #0xc8 - ldr r0, [r5, #0] - mov r1, #4 - add r2, r7, #0 - bl sub_02007DEC - ldr r0, [sp] - ldr r1, _021D35AC ; =ov79_021D35B0 - bl sub_0201CECC -_021D359E: - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_021D35A4: .word 0x00000000 -_021D35A8: .word 0xFFFFA000 -_021D35AC: .word ov79_021D35B0 - thumb_func_end ov79_021D34A8 - - thumb_func_start ov79_021D35B0 -ov79_021D35B0: ; 0x021D35B0 - push {r3, lr} - ldr r3, [r1, #4] - add r2, r3, #1 - str r2, [r1, #4] - cmp r3, #4 - blt _021D35E0 - ldr r2, [r1, #0x14] - ldr r2, [r2, #8] - cmp r2, #0 - beq _021D35CA - cmp r2, #1 - beq _021D35D2 - b _021D35DA -_021D35CA: - ldr r1, _021D35E4 ; =ov79_021D35EC - bl sub_0201CECC - pop {r3, pc} -_021D35D2: - ldr r1, _021D35E8 ; =ov79_021D36CC - bl sub_0201CECC - pop {r3, pc} -_021D35DA: - add r0, r1, #0 - bl ov79_021D29E4 -_021D35E0: - pop {r3, pc} - nop -_021D35E4: .word ov79_021D35EC -_021D35E8: .word ov79_021D36CC - thumb_func_end ov79_021D35B0 - - thumb_func_start ov79_021D35EC -ov79_021D35EC: ; 0x021D35EC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x14] - mov r1, #0 - add r0, #0x68 - mov r2, #0x5c - bl sub_020C4CF4 - mov r0, #3 - str r0, [r4, #4] - ldr r1, _021D360C ; =ov79_021D3610 - add r0, r5, #0 - bl sub_0201CECC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D360C: .word ov79_021D3610 - thumb_func_end ov79_021D35EC - - thumb_func_start ov79_021D3610 -ov79_021D3610: ; 0x021D3610 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - ldr r7, [r5, #0x14] - add r4, r7, #0 - add r4, #0x68 - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - sub r0, r0, #4 - add r1, r0, #0 - mul r1, r0 - mov r0, #0x10 - sub r0, r0, r1 - neg r0, r0 - cmp r0, #0 - ble _021D3642 - lsl r0, r0, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _021D3650 -_021D3642: - lsl r0, r0, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_021D3650: - bl sub_020E1740 - ldr r2, _021D36C4 ; =0x00001666 - asr r1, r0, #0x1f - mov r3, #0 - bl sub_020E1F1C - add r6, r1, #0 - mov r1, #4 - add r3, r0, #0 - add r0, r7, #0 - add r0, #0xc8 - lsl r2, r1, #9 - add r3, r3, r2 - ldr r2, _021D36C8 ; =0x00000000 - ldr r0, [r0, #0] - adc r6, r2 - lsl r2, r6, #0x14 - lsr r3, r3, #0xc - orr r3, r2 - asr r2, r3, #0xc - bl sub_02007DEC - add r1, r4, #0 - mov r0, #0 - add r1, #0x52 - strh r0, [r1] - add r1, r4, #0 - add r1, #0x50 - ldrh r1, [r1] - add r2, r1, #1 - add r1, r4, #0 - add r1, #0x50 - strh r2, [r1] - add r1, r4, #0 - add r1, #0x50 - ldrh r1, [r1] - cmp r1, #8 - bls _021D36A8 - add r4, #0x50 - strh r0, [r4] - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] -_021D36A8: - ldr r0, [r5, #4] - cmp r0, #0 - bne _021D36C0 - add r7, #0xc8 - ldr r0, [r7, #0] - mov r1, #4 - mov r2, #0 - bl sub_02007DEC - add r0, r5, #0 - bl ov79_021D29E4 -_021D36C0: - pop {r3, r4, r5, r6, r7, pc} - nop -_021D36C4: .word 0x00001666 -_021D36C8: .word 0x00000000 - thumb_func_end ov79_021D3610 - - thumb_func_start ov79_021D36CC -ov79_021D36CC: ; 0x021D36CC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x14] - mov r1, #0 - add r0, #0x68 - mov r2, #0x5c - bl sub_020C4CF4 - mov r0, #0x20 - str r0, [r4, #4] - ldr r1, _021D36EC ; =ov79_021D36F0 - add r0, r5, #0 - bl sub_0201CECC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_021D36EC: .word ov79_021D36F0 - thumb_func_end ov79_021D36CC - - thumb_func_start ov79_021D36F0 -ov79_021D36F0: ; 0x021D36F0 - push {r4, r5, r6, lr} - add r5, r1, #0 - ldr r6, [r5, #0x14] - add r4, r6, #0 - add r4, #0x68 - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - bl sub_0201D250 - asr r1, r0, #0x1f - lsr r2, r0, #0x13 - lsl r1, r1, #0xd - orr r1, r2 - mov r2, #2 - lsl r3, r0, #0xd - mov r0, #0 - lsl r2, r2, #0xa - add r2, r3, r2 - adc r1, r0 - lsl r1, r1, #0x14 - lsr r2, r2, #0xc - orr r2, r1 - add r1, r4, #0 - add r1, #0x50 - ldrh r3, [r1] - ldr r1, _021D3764 ; =0x00000167 - cmp r3, r1 - bls _021D372C - b _021D3734 -_021D372C: - add r0, r4, #0 - add r0, #0x50 - ldrh r0, [r0] - add r0, #0x5a -_021D3734: - add r4, #0x50 - strh r0, [r4] - add r0, r6, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - mov r1, #3 - asr r2, r2, #0xc - bl sub_02007DEC - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] - bne _021D3760 - add r6, #0xc8 - ldr r0, [r6, #0] - mov r1, #3 - mov r2, #0 - bl sub_02007DEC - add r0, r5, #0 - bl ov79_021D29E4 -_021D3760: - pop {r4, r5, r6, pc} - nop -_021D3764: .word 0x00000167 - thumb_func_end ov79_021D36F0 - - thumb_func_start ov79_021D3768 -ov79_021D3768: ; 0x021D3768 - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r4, r2, #0 - mov r1, #0 - mov r2, #0x1c - add r5, r0, #0 - bl sub_020C4CF4 - bl sub_020B28CC - bl sub_020BF9AC - bl sub_020BFB4C - ldr r0, _021D3804 ; =0x04000060 - ldr r1, _021D3808 ; =0xFFFFCFFD - ldrh r2, [r0] - ldr r3, _021D380C ; =0x0000CFFB - and r2, r1 - strh r2, [r0] - ldrh r2, [r0] - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r6, [r0] - add r1, r1, #2 - sub r3, #0x1c - and r6, r2 - mov r2, #8 - orr r2, r6 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x10 - orr r1, r2 - strh r1, [r0] - ldrh r1, [r0] - and r1, r3 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_020BFC74 - mov r0, #0 - ldr r2, _021D3810 ; =0x00007FFF - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _021D3814 ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _021D3818 ; =0xBFFF0000 - str r0, [r1, #0x40] - add r0, r5, #0 - add r1, r4, #0 - bl ov79_021D3870 - add r0, r5, #0 - add r1, r7, #0 - add r2, r4, #0 - bl ov79_021D38D0 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r1, _021D381C ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - mov r0, #1 - orr r0, r2 - strh r0, [r1] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_021D3804: .word 0x04000060 -_021D3808: .word 0xFFFFCFFD -_021D380C: .word 0x0000CFFB -_021D3810: .word 0x00007FFF -_021D3814: .word 0x04000540 -_021D3818: .word 0xBFFF0000 -_021D381C: .word 0x04000008 - thumb_func_end ov79_021D3768 - - thumb_func_start ov79_021D3820 -ov79_021D3820: ; 0x021D3820 - push {r4, lr} - add r4, r0, #0 - bl sub_020241B4 - bl sub_020203EC - ldr r2, _021D3854 ; =0x04000440 - mov r3, #0 - add r1, r2, #0 - str r3, [r2, #0] - add r1, #0x14 - str r3, [r1, #0] - mov r0, #2 - str r0, [r2, #0] - str r3, [r1, #0] - bl sub_020AF480 - bl sub_020A73C0 - ldr r0, [r4, #4] - bl sub_02007768 - ldr r0, _021D3858 ; =0x04000540 - mov r1, #1 - str r1, [r0, #0] - pop {r4, pc} - ; .align 2, 0 -_021D3854: .word 0x04000440 -_021D3858: .word 0x04000540 - thumb_func_end ov79_021D3820 - - thumb_func_start ov79_021D385C -ov79_021D385C: ; 0x021D385C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - bl sub_020203B8 - ldr r0, [r4, #4] - bl sub_02007B6C - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov79_021D385C - - thumb_func_start ov79_021D3870 -ov79_021D3870: ; 0x021D3870 - push {r4, r5, lr} - sub sp, #0x1c - ldr r5, _021D38C8 ; =0x021D3CEC - add r4, r0, #0 - add r2, r1, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x10 - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - add r1, sp, #8 - str r0, [r3, #0] - mov r0, #0 - strh r0, [r1] - strh r0, [r1, #2] - strh r0, [r1, #4] - strh r0, [r1, #6] - add r0, r2, #0 - bl sub_020203AC - str r0, [r4, #0] - mov r1, #1 - str r1, [sp] - ldr r0, [r4, #0] - ldr r3, _021D38CC ; =0x000005C1 - str r0, [sp, #4] - add r0, sp, #0x10 - lsl r1, r1, #0x10 - add r2, sp, #8 - bl sub_02020738 - mov r1, #0x19 - ldr r2, [r4, #0] - mov r0, #0 - lsl r1, r1, #0xe - bl sub_020206BC - ldr r0, [r4, #0] - bl sub_020206B0 - ldr r0, [r4, #0] - bl sub_020203D4 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 -_021D38C8: .word 0x021D3CEC -_021D38CC: .word 0x000005C1 - thumb_func_end ov79_021D3870 - - thumb_func_start ov79_021D38D0 -ov79_021D38D0: ; 0x021D38D0 - push {r4, r5, r6, lr} - sub sp, #0x20 - add r5, r0, #0 - add r0, r2, #0 - add r4, r1, #0 - bl sub_0200762C - str r0, [r5, #4] - ldr r1, [r4, #0] - add r0, sp, #0x10 - mov r2, #2 - bl sub_02075EF4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r5, #4] - add r1, sp, #0x10 - mov r2, #0x80 - mov r3, #0x60 - bl sub_02007C34 - ldrb r2, [r4, #8] - mov r1, #0x23 - add r6, r0, #0 - bl sub_02007DEC - str r6, [r5, #0x18] - add sp, #0x20 - pop {r4, r5, r6, pc} - thumb_func_end ov79_021D38D0 - ; 0x021D3910 - - - .rodata - .incbin "incbin/overlay79_rodata.bin" - - .data - .incbin "incbin/overlay79_data.bin" - - .bss - .space 0x0 diff --git a/asm/overlay83.s b/asm/overlay83.s deleted file mode 100644 index 8022eacd8..000000000 --- a/asm/overlay83.s +++ /dev/null @@ -1,10087 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov83_0223B5A0 -ov83_0223B5A0: ; 0x0223B5A0 - push {r3, lr} - ldr r0, [r0, #0x18] - bl ov83_0223CBFC - bl sub_0201DCAC - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov83_0223B5A0 - - thumb_func_start ov83_0223B5B0 -ov83_0223B5B0: ; 0x0223B5B0 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_02006840 - mov r2, #2 - add r4, r0, #0 - mov r0, #3 - mov r1, #0x38 - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, _0223B64C ; =0x00001604 - add r0, r5, #0 - mov r2, #0x38 - bl sub_0200681C - ldr r2, _0223B64C ; =0x00001604 - add r5, r0, #0 - mov r1, #0 - bl sub_020D5124 - str r5, [r4, #0x18] - mov r1, #0x38 - str r1, [r5, #0] - mov r0, #0x10 - bl sub_0201DBEC - ldrh r0, [r4, #6] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - cmp r0, #1 - bne _0223B5F4 - mov r1, #1 - b _0223B5F6 -_0223B5F4: - mov r1, #0 -_0223B5F6: - ldr r0, _0223B650 ; =0x0000142C - str r1, [r5, r0] - ldr r1, [r4, #0x10] - add r0, r5, #0 - ldr r1, [r1, #0x10] - bl ov83_0223D150 - add r0, r4, #0 - add r0, #0x26 - ldrb r0, [r0] - cmp r0, #0 - beq _0223B614 - mov r0, #1 - bl sub_0203632C -_0223B614: - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x18] - bl sub_02027B50 - str r0, [r5, #0x24] - ldr r0, [r4, #0x10] - ldr r0, [r0, #0x18] - bl sub_02027AC0 - str r0, [r5, #0x28] - mov r0, #0xae - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r0, _0223B654 ; =ov83_0223B5A0 - add r1, r4, #0 - bl sub_02017798 - bl sub_020177A4 - ldr r1, _0223B658 ; =0x0000049F - mov r0, #0xc - mov r2, #1 - bl sub_02004550 - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_0223B64C: .word 0x00001604 -_0223B650: .word 0x0000142C -_0223B654: .word ov83_0223B5A0 -_0223B658: .word 0x0000049F - thumb_func_end ov83_0223B5B0 - - thumb_func_start ov83_0223B65C -ov83_0223B65C: ; 0x0223B65C - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - add r5, r1, #0 - bl sub_02006840 - add r7, r0, #0 - add r0, r4, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0xc] - ldr r1, _0223B70C ; =0x0224024C - str r0, [sp] - lsl r0, r0, #3 - add r1, r1, r0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223B68A - cmp r0, #1 - beq _0223B6CC - cmp r0, #2 - beq _0223B6DC - b _0223B6F0 -_0223B68A: - ldr r3, [r1, #0] - cmp r3, #0 - beq _0223B6F0 - ldr r6, [r1, #4] - add r2, r4, #0 - add r0, r7, #0 - add r1, r4, #0 - add r2, #0x10 - blx r3 - str r0, [r4, #0xc] - ldrb r0, [r4, #0x19] - cmp r0, #0 - beq _0223B6AC - ldrb r0, [r4, #0x1a] - str r0, [r4, #0xc] - mov r0, #0 - strb r0, [r4, #0x19] -_0223B6AC: - ldr r1, [r4, #0xc] - ldr r0, [sp] - cmp r0, r1 - beq _0223B6F0 - mov r0, #0 - str r0, [r4, #0x10] - ldrh r0, [r7, #6] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - beq _0223B6F0 - cmp r6, #0 - beq _0223B6F0 - str r6, [r4, #8] - mov r0, #1 - str r0, [r5, #0] - b _0223B6F0 -_0223B6CC: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_020364F0 - mov r0, #2 - str r0, [r5, #0] - b _0223B6F0 -_0223B6DC: - ldr r0, [r4, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_02036540 - cmp r0, #0 - beq _0223B6F0 - mov r0, #0 - str r0, [r5, #0] - str r0, [r4, #8] -_0223B6F0: - add r0, r4, #0 - bl ov83_0223CBA4 - ldr r0, [r4, #0] - ldr r1, [r4, #0x20] - bl sub_02038A1C - ldr r0, [r4, #4] - cmp r0, #0 - beq _0223B708 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223B708: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223B70C: .word 0x0224024C - thumb_func_end ov83_0223B65C - - thumb_func_start ov83_0223B710 -ov83_0223B710: ; 0x0223B710 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02006840 - add r4, r0, #0 - add r0, r5, #0 - bl sub_0200682C - add r6, r0, #0 - add r0, r4, #0 - add r0, #0x26 - ldrb r0, [r0] - ldr r7, [r6, #0] - cmp r0, #0 - beq _0223B73A - bl sub_0203608C - cmp r0, #0 - bne _0223B73A - bl ov4_021D25FC -_0223B73A: - add r0, r6, #0 - bl ov83_0223D1EC - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201DC3C - ldr r2, _0223B770 ; =0x00001604 - add r0, r6, #0 - mov r1, #0 - bl sub_020C4CF4 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0 - str r0, [r4, #0x18] - add r0, r7, #0 - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223B770: .word 0x00001604 - thumb_func_end ov83_0223B710 - - thumb_func_start ov83_0223B774 -ov83_0223B774: ; 0x0223B774 - strb r1, [r0, #0x18] - mov r1, #1 - str r1, [r0, #0x14] - bx lr - thumb_func_end ov83_0223B774 - - thumb_func_start ov83_0223B77C -ov83_0223B77C: ; 0x0223B77C - strb r1, [r0, #0x1a] - mov r1, #1 - strb r1, [r0, #0x19] - bx lr - thumb_func_end ov83_0223B77C - - thumb_func_start ov83_0223B784 -ov83_0223B784: ; 0x0223B784 - mov r1, #1 - str r1, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223B784 - - thumb_func_start ov83_0223B78C -ov83_0223B78C: ; 0x0223B78C - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r2, [r4, #0] - add r5, r1, #0 - cmp r2, #0 - beq _0223B7A8 - cmp r2, #1 - bne _0223B7A0 - b _0223B8B2 -_0223B7A0: - cmp r2, #2 - bne _0223B7A6 - b _0223B8D0 -_0223B7A6: - b _0223B8E0 -_0223B7A8: - bl ov83_0223C82C - ldr r0, _0223B8E8 ; =0x00001428 - ldr r0, [r5, r0] - bl ov83_0223D570 - cmp r0, #0 - bne _0223B7C2 - mov r0, #0xba - lsl r0, r0, #2 - add r0, r5, r0 - bl ov83_0223FDB0 -_0223B7C2: - ldr r0, [r5, #0x24] - ldr r2, _0223B8EC ; =0x0000157C - str r0, [sp] - ldr r0, [r5, #0] - ldr r3, _0223B8F0 ; =0x00001424 - str r0, [sp, #4] - ldr r0, _0223B8F4 ; =0x0000054C - ldr r1, [r5, r3] - add r3, #0xc - add r0, r5, r0 - add r2, r5, r2 - add r3, r5, r3 - bl ov83_0223DEA0 - ldr r0, _0223B8F8 ; =0x000005A4 - add r0, r5, r0 - bl ov83_0223E340 - ldr r0, [r5, #0x24] - ldr r2, _0223B8EC ; =0x0000157C - str r0, [sp] - ldr r0, [r5, #0] - ldr r3, _0223B8F0 ; =0x00001424 - str r0, [sp, #4] - ldr r0, _0223B8FC ; =0x0000063C - ldr r1, [r5, r3] - add r3, #0xc - add r0, r5, r0 - add r2, r5, r2 - add r3, r5, r3 - bl ov83_0223E6D4 - mov r0, #0x16 - lsl r0, r0, #6 - add r0, r5, r0 - bl ov83_0223E244 - ldr r0, _0223B900 ; =0x0000058C - add r0, r5, r0 - bl ov83_0223E244 - ldr r0, _0223B904 ; =0x00000598 - add r0, r5, r0 - bl ov83_0223E244 - ldr r3, _0223B908 ; =0x00001430 - ldr r0, _0223B90C ; =0x0000061C - add r2, r3, #0 - add r1, r5, r3 - sub r2, #0xc - sub r3, #8 - ldr r2, [r5, r2] - ldr r3, [r5, r3] - add r0, r5, r0 - bl ov83_0223E5A4 - ldr r0, _0223B910 ; =0x00000674 - add r0, r5, r0 - bl ov83_0223ED3C - ldr r0, _0223B914 ; =0x00000A88 - add r0, r5, r0 - bl ov83_0223F29C - ldr r1, _0223B8F0 ; =0x00001424 - ldr r0, _0223B918 ; =0x00000B08 - ldr r1, [r5, r1] - add r0, r5, r0 - bl ov83_0223F494 - mov r0, #0x2d - lsl r0, r0, #4 - add r0, r5, r0 - bl ov83_0223F820 - add r0, r5, #0 - bl ov83_0223C958 - bl sub_02039734 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - ldr r0, _0223B8F0 ; =0x00001424 - ldr r0, [r5, r0] - cmp r0, #1 - ble _0223B87A - ldr r0, _0223B8F4 ; =0x0000054C - add r0, r5, r0 - bl ov83_0223DF84 -_0223B87A: - ldr r0, _0223B8F8 ; =0x000005A4 - mov r1, #3 - add r0, r5, r0 - mov r2, #1 - bl ov83_0223E484 - ldr r0, _0223B8F8 ; =0x000005A4 - mov r1, #4 - add r0, r5, r0 - mov r2, #1 - bl ov83_0223E484 - ldr r0, _0223B8F8 ; =0x000005A4 - mov r1, #5 - add r0, r5, r0 - mov r2, #1 - bl ov83_0223E484 - ldr r0, _0223B8F8 ; =0x000005A4 - mov r1, #6 - add r0, r5, r0 - mov r2, #1 - bl ov83_0223E484 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223B8E0 -_0223B8B2: - mov r0, #6 - mov r1, #1 - str r0, [sp] - str r1, [sp, #4] - ldr r0, [r5, #0] - ldr r3, _0223B91C ; =0x0000FFFF - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223B8E0 -_0223B8D0: - bl sub_0200F2AC - cmp r0, #0 - beq _0223B8E0 - ldr r0, [r5, #0xc] - add sp, #0xc - add r0, r0, #1 - pop {r4, r5, pc} -_0223B8E0: - ldr r0, [r5, #0xc] - add sp, #0xc - pop {r4, r5, pc} - nop -_0223B8E8: .word 0x00001428 -_0223B8EC: .word 0x0000157C -_0223B8F0: .word 0x00001424 -_0223B8F4: .word 0x0000054C -_0223B8F8: .word 0x000005A4 -_0223B8FC: .word 0x0000063C -_0223B900: .word 0x0000058C -_0223B904: .word 0x00000598 -_0223B908: .word 0x00001430 -_0223B90C: .word 0x0000061C -_0223B910: .word 0x00000674 -_0223B914: .word 0x00000A88 -_0223B918: .word 0x00000B08 -_0223B91C: .word 0x0000FFFF - thumb_func_end ov83_0223B78C - - thumb_func_start ov83_0223B920 -ov83_0223B920: ; 0x0223B920 - push {r4, lr} - ldr r0, _0223B94C ; =0x00001428 - add r4, r1, #0 - ldr r0, [r4, r0] - bl ov83_0223D570 - cmp r0, #0 - bne _0223B946 - ldr r3, _0223B94C ; =0x00001428 - mov r1, #0 - ldr r3, [r4, r3] - mov r0, #0x16 - add r2, r1, #0 - bl ov83_0223D508 - cmp r0, #0 - bne _0223B946 - ldr r0, [r4, #0xc] - pop {r4, pc} -_0223B946: - ldr r0, [r4, #0xc] - add r0, r0, #1 - pop {r4, pc} - ; .align 2, 0 -_0223B94C: .word 0x00001428 - thumb_func_end ov83_0223B920 - - thumb_func_start ov83_0223B950 -ov83_0223B950: ; 0x0223B950 - ldr r0, [r1, #0x14] - cmp r0, #0 - beq _0223B95E - ldrb r0, [r1, #0x18] - str r0, [r1, #0xc] - mov r0, #0 - str r0, [r1, #0x14] -_0223B95E: - ldr r0, [r1, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223B950 - - thumb_func_start ov83_0223B964 -ov83_0223B964: ; 0x0223B964 - push {r3, r4, r5, lr} - add r4, r2, #0 - add r5, r1, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _0223B97A - cmp r1, #1 - beq _0223B990 - cmp r1, #2 - beq _0223B9B4 - b _0223B9D2 -_0223B97A: - ldr r1, _0223B9DC ; =0x00001424 - mov r0, #0xd7 - lsl r0, r0, #2 - ldr r1, [r5, r1] - add r0, r5, r0 - bl ov83_0223DB18 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223B9D6 -_0223B990: - ldr r1, [r0, #8] - ldr r0, _0223B9E0 ; =0x00001430 - mov r2, #0 - str r1, [r5, r0] - ldr r0, _0223B9E4 ; =0x000015F8 - add r3, r5, #0 - mov r1, #2 -_0223B99E: - add r2, r2, #1 - strh r1, [r3, r0] - add r3, r3, #2 - cmp r2, #5 - blt _0223B99E - ldr r0, _0223B9E8 ; =0x00001602 - strh r1, [r5, r0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0223B9D6 -_0223B9B4: - bl ov83_0223D4B8 - ldr r3, _0223B9E0 ; =0x00001430 - add r2, r0, #0 - add r1, r5, r3 - sub r3, #8 - ldr r3, [r5, r3] - mov r0, #0x19 - bl ov83_0223D508 - cmp r0, #1 - bne _0223B9D6 - ldr r0, [r5, #0xc] - add r0, r0, #1 - pop {r3, r4, r5, pc} -_0223B9D2: - bl sub_02022974 -_0223B9D6: - ldr r0, [r5, #0xc] - pop {r3, r4, r5, pc} - nop -_0223B9DC: .word 0x00001424 -_0223B9E0: .word 0x00001430 -_0223B9E4: .word 0x000015F8 -_0223B9E8: .word 0x00001602 - thumb_func_end ov83_0223B964 - - thumb_func_start ov83_0223B9EC -ov83_0223B9EC: ; 0x0223B9EC - push {r3, r4, r5, r6, r7, lr} - add r5, r2, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #5 - bls _0223B9FA - b _0223BB18 -_0223B9FA: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223BA06: ; jump table - .short _0223BA12 - _0223BA06 - 2 ; case 0 - .short _0223BA26 - _0223BA06 - 2 ; case 1 - .short _0223BA38 - _0223BA06 - 2 ; case 2 - .short _0223BA78 - _0223BA06 - 2 ; case 3 - .short _0223BA94 - _0223BA06 - 2 ; case 4 - .short _0223BABA - _0223BA06 - 2 ; case 5 -_0223BA12: - ldr r0, _0223BB1C ; =0x0000141C - ldr r1, [r4, #0] - ldr r2, [r4, #0x20] - add r0, r4, r0 - bl ov83_0223F790 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223BB18 -_0223BA26: - mov r0, #0xd7 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov83_0223DC68 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223BB18 -_0223BA38: - mov r0, #0xd7 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov83_0223DD30 - add r1, r0, #0 - cmp r1, #1 - bne _0223BA5C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - ldr r0, _0223BB20 ; =0x0000054C - add r0, r4, r0 - bl ov83_0223DF70 - mov r0, #0x18 - str r0, [r4, #0x1c] - b _0223BB18 -_0223BA5C: - cmp r1, #0 - beq _0223BB18 - add r2, r4, r1 - ldr r1, _0223BB24 ; =0x0000155E - ldr r0, _0223BB20 ; =0x0000054C - ldrb r2, [r2, r1] - sub r1, #0xc2 - add r0, r4, r0 - lsl r2, r2, #2 - add r2, r4, r2 - ldr r1, [r2, r1] - bl ov83_0223DF30 - b _0223BB18 -_0223BA78: - ldr r0, [r4, #0x1c] - cmp r0, #0 - ble _0223BA84 - sub r0, r0, #1 - str r0, [r4, #0x1c] - b _0223BB18 -_0223BA84: - ldr r0, _0223BB28 ; =0x00000598 - add r0, r4, r0 - bl ov83_0223E2FC - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223BB18 -_0223BA94: - ldr r0, _0223BB28 ; =0x00000598 - add r0, r4, r0 - bl ov83_0223E32C - cmp r0, #0 - beq _0223BB18 - ldr r0, _0223BB20 ; =0x0000054C - add r0, r4, r0 - bl ov83_0223DFAC - mov r0, #0x16 - lsl r0, r0, #6 - add r0, r4, r0 - bl ov83_0223E2E4 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223BB18 -_0223BABA: - mov r0, #0x16 - lsl r0, r0, #6 - add r0, r4, r0 - bl ov83_0223E32C - add r6, r0, #0 - ldr r0, _0223BB2C ; =0x00000588 - ldr r0, [r4, r0] - bl sub_02021E74 - add r7, r0, #0 - add r0, r7, #1 - mov r1, #3 - bl sub_020E1F6C - add r5, r0, #0 - mov r0, #0xd6 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, r5 - beq _0223BAFC - cmp r7, #0xa - bge _0223BAF0 - ldr r0, _0223BB30 ; =0x000006BD - bl sub_02005748 - b _0223BAF6 -_0223BAF0: - ldr r0, _0223BB34 ; =0x000006BE - bl sub_02005748 -_0223BAF6: - mov r0, #0xd6 - lsl r0, r0, #2 - str r5, [r4, r0] -_0223BAFC: - cmp r6, #0 - beq _0223BB18 - ldr r0, _0223BB38 ; =0x0000061C - mov r1, #1 - add r0, r4, r0 - bl ov83_0223E69C - ldr r0, _0223BB3C ; =0x000005A4 - add r0, r4, r0 - bl ov83_0223E500 - ldr r0, [r4, #0xc] - add r0, r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223BB18: - ldr r0, [r4, #0xc] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BB1C: .word 0x0000141C -_0223BB20: .word 0x0000054C -_0223BB24: .word 0x0000155E -_0223BB28: .word 0x00000598 -_0223BB2C: .word 0x00000588 -_0223BB30: .word 0x000006BD -_0223BB34: .word 0x000006BE -_0223BB38: .word 0x0000061C -_0223BB3C: .word 0x000005A4 - thumb_func_end ov83_0223B9EC - - thumb_func_start ov83_0223BB40 -ov83_0223BB40: ; 0x0223BB40 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - mov r0, #0x2d - add r5, r1, #0 - lsl r0, r0, #4 - add r0, r5, r0 - bl ov83_0223F83C - ldr r0, _0223BCC4 ; =0x00001434 - mov r1, #0x2d - lsl r1, r1, #4 - add r0, r5, r0 - add r1, r5, r1 - bl ov83_0223F88C - ldr r0, _0223BCC8 ; =0x00001428 - ldr r0, [r5, r0] - bl ov83_0223D570 - cmp r0, #0 - bne _0223BBCE - ldr r2, _0223BCCC ; =0x00001430 - mov r0, #0xba - add r1, r5, r2 - sub r2, #0xc - lsl r0, r0, #2 - ldr r2, [r5, r2] - add r0, r5, r0 - bl ov83_0223FDD8 - cmp r0, #1 - bne _0223BB92 - ldr r3, _0223BCC8 ; =0x00001428 - mov r1, #0 - ldr r3, [r5, r3] - mov r0, #0x17 - add r2, r1, #0 - bl ov83_0223D508 - ldr r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} -_0223BB92: - mov r0, #0xba - lsl r0, r0, #2 - add r0, r5, r0 - bl ov83_0223FFA0 - ldr r0, _0223BCD0 ; =0x00001578 - ldr r2, _0223BCCC ; =0x00001430 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223BBBE - mov r0, #0xba - add r1, r5, r2 - sub r2, #0xc - lsl r0, r0, #2 - ldr r2, [r5, r2] - add r0, r5, r0 - bl ov83_0223FE50 - ldr r0, _0223BCD0 ; =0x00001578 - mov r1, #1 - str r1, [r5, r0] - b _0223BBCE -_0223BBBE: - mov r0, #0xba - add r1, r5, r2 - sub r2, #0xc - lsl r0, r0, #2 - ldr r2, [r5, r2] - add r0, r5, r0 - bl ov83_0223FEC0 -_0223BBCE: - add r4, #0x26 - ldrb r0, [r4] - cmp r0, #0 - beq _0223BC84 - ldr r0, _0223BCD4 ; =0x000015F4 - ldr r1, [r5, r0] - add r1, r1, #1 - str r1, [r5, r0] - ldr r2, [r5, r0] - mov r1, #1 - tst r1, r2 - bne _0223BC9E - mov r1, #0 - str r1, [r5, r0] - ldr r0, _0223BCC8 ; =0x00001428 - ldr r0, [r5, r0] - bl ov83_0223D570 - cmp r0, #0 - bne _0223BC5E - mov r7, #1 - add r6, r7, #0 - add r4, r5, #2 -_0223BBFC: - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0223BC12 - ldr r0, _0223BCD8 ; =0x000015F8 - ldrh r0, [r4, r0] - cmp r0, #0 - bne _0223BC12 - mov r7, #0 -_0223BC12: - add r6, r6, #1 - add r4, r4, #2 - cmp r6, #8 - blt _0223BBFC - cmp r7, #0 - beq _0223BC9E - bl ov83_0223D4BC - ldr r3, _0223BCC4 ; =0x00001434 - add r2, r0, #0 - add r1, r5, r3 - sub r3, #0xc - ldr r3, [r5, r3] - mov r0, #0x1a - bl ov83_0223D508 - ldr r0, _0223BCD0 ; =0x00001578 - mov r1, #0 - add r7, r0, #0 - str r1, [r5, r0] - mov r6, #1 - add r4, r5, #2 - add r7, #0x80 -_0223BC40: - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - bl sub_02035D78 - cmp r0, #0 - beq _0223BC54 - ldr r0, _0223BCD8 ; =0x000015F8 - ldrh r0, [r4, r0] - sub r0, r0, #1 - strh r0, [r4, r7] -_0223BC54: - add r6, r6, #1 - add r4, r4, #2 - cmp r6, #8 - blt _0223BC40 - b _0223BC9E -_0223BC5E: - ldr r0, _0223BCDC ; =0x00001602 - ldrh r0, [r5, r0] - cmp r0, #0 - beq _0223BC9E - bl ov83_0223D4C8 - ldr r3, _0223BCC4 ; =0x00001434 - add r2, r0, #0 - add r1, r5, r3 - sub r3, #0xc - ldr r3, [r5, r3] - mov r0, #0x20 - bl ov83_0223D508 - ldr r0, _0223BCDC ; =0x00001602 - ldrh r1, [r5, r0] - sub r1, r1, #1 - strh r1, [r5, r0] - b _0223BC9E -_0223BC84: - bl ov83_0223D4BC - ldr r3, _0223BCC4 ; =0x00001434 - add r2, r0, #0 - add r1, r5, r3 - sub r3, #0xc - ldr r3, [r5, r3] - mov r0, #0x1a - bl ov83_0223D508 - ldr r0, _0223BCD0 ; =0x00001578 - mov r1, #0 - str r1, [r5, r0] -_0223BC9E: - add r0, r5, #0 - bl ov83_0223C3E8 - ldr r0, _0223BCE0 ; =0x00000674 - ldr r1, _0223BCCC ; =0x00001430 - add r0, r5, r0 - add r1, r5, r1 - bl ov83_0223EDA4 - ldr r0, _0223BCE4 ; =0x00000A88 - add r0, r5, r0 - bl ov83_0223F378 - ldr r0, _0223BCE8 ; =0x00000B08 - add r0, r5, r0 - bl ov83_0223F52C - ldr r0, [r5, #0xc] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BCC4: .word 0x00001434 -_0223BCC8: .word 0x00001428 -_0223BCCC: .word 0x00001430 -_0223BCD0: .word 0x00001578 -_0223BCD4: .word 0x000015F4 -_0223BCD8: .word 0x000015F8 -_0223BCDC: .word 0x00001602 -_0223BCE0: .word 0x00000674 -_0223BCE4: .word 0x00000A88 -_0223BCE8: .word 0x00000B08 - thumb_func_end ov83_0223BB40 - - thumb_func_start ov83_0223BCEC -ov83_0223BCEC: ; 0x0223BCEC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r4, r1, #0 - ldr r0, _0223BF34 ; =0x00000674 - ldr r1, _0223BF38 ; =0x00001430 - add r6, r2, #0 - add r0, r4, r0 - add r1, r4, r1 - bl ov83_0223EDA4 - ldr r0, [r6, #0] - cmp r0, #6 - bls _0223BD0A - b _0223BF28 -_0223BD0A: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223BD16: ; jump table - .short _0223BD24 - _0223BD16 - 2 ; case 0 - .short _0223BDAE - _0223BD16 - 2 ; case 1 - .short _0223BDDA - _0223BD16 - 2 ; case 2 - .short _0223BDFA - _0223BD16 - 2 ; case 3 - .short _0223BE80 - _0223BD16 - 2 ; case 4 - .short _0223BEDA - _0223BD16 - 2 ; case 5 - .short _0223BF20 - _0223BD16 - 2 ; case 6 -_0223BD24: - ldr r0, _0223BF3C ; =0x0000063C - add r0, r4, r0 - bl ov83_0223E994 - ldr r0, _0223BF40 ; =0x00000A88 - mov r1, #0 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223BF40 ; =0x00000A88 - mov r1, #1 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223BF40 ; =0x00000A88 - mov r1, #2 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223BF40 ; =0x00000A88 - mov r1, #3 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223BF44 ; =0x0000058C - add r0, r4, r0 - bl ov83_0223E2E4 - ldr r0, _0223BF48 ; =0x000006BA - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223BF4C ; =0x000006BB - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223BF50 ; =0x000006BF - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223BF54 ; =0x000006C1 - mov r1, #0 - bl sub_020057A4 - ldr r0, _0223BF58 ; =0x000006C2 - bl sub_02005748 - ldr r0, _0223BF5C ; =0x000005A4 - mov r1, #0 - add r0, r4, r0 - add r2, r1, #0 - bl ov83_0223E484 - ldr r0, _0223BF5C ; =0x000005A4 - mov r1, #1 - add r0, r4, r0 - mov r2, #0 - bl ov83_0223E484 - ldr r0, _0223BF5C ; =0x000005A4 - mov r1, #2 - add r0, r4, r0 - mov r2, #0 - bl ov83_0223E484 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BDAE: - ldr r0, _0223BF44 ; =0x0000058C - add r0, r4, r0 - bl ov83_0223E32C - cmp r0, #0 - beq _0223BDE2 - mov r0, #6 - str r0, [sp] - mov r0, #1 - mov r1, #0 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r2, r1, #0 - str r0, [sp, #8] - mov r0, #3 - add r3, r1, #0 - bl sub_0200F174 - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BDDA: - bl sub_0200F2AC - cmp r0, #0 - bne _0223BDE4 -_0223BDE2: - b _0223BF2C -_0223BDE4: - add r7, #0x26 - ldrb r0, [r7] - cmp r0, #0 - beq _0223BDF2 - mov r0, #0 - bl sub_0203632C -_0223BDF2: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BDFA: - ldr r0, [r7, #0x10] - ldr r0, [r0, #0xc] - bl sub_0202CD88 - ldr r1, _0223BF60 ; =0x0000142C - add r5, r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - bne _0223BE1C - mov r1, #0xc - bl sub_0202CFEC - add r0, r5, #0 - mov r1, #0x34 - bl sub_0202CF28 - b _0223BE2A -_0223BE1C: - mov r1, #0x12 - bl sub_0202CFEC - add r0, r5, #0 - mov r1, #0x35 - bl sub_0202CF28 -_0223BE2A: - ldr r0, _0223BF60 ; =0x0000142C - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223BE78 - ldr r0, [r7, #0x10] - ldr r0, [r0, #0xc] - bl sub_0202B370 - str r0, [sp, #0xc] - ldr r0, _0223BF64 ; =0x00001424 - mov r5, #0 - ldr r0, [r4, r0] - cmp r0, #0 - ble _0223BE78 -_0223BE46: - ldr r0, _0223BF68 ; =0x00001560 - add r1, r4, r5 - ldrb r0, [r1, r0] - bl sub_02032F1C - add r1, r0, #0 - ldr r0, [r7, #0x10] - add r2, sp, #0x10 - ldr r0, [r0, #0xc] - bl sub_0203909C - cmp r0, #0 - beq _0223BE64 - cmp r0, #1 - bne _0223BE6E -_0223BE64: - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x10] - mov r2, #1 - bl sub_0202B1D0 -_0223BE6E: - ldr r0, _0223BF64 ; =0x00001424 - add r5, r5, #1 - ldr r0, [r4, r0] - cmp r5, r0 - blt _0223BE46 -_0223BE78: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BE80: - ldr r0, _0223BF6C ; =0x00001428 - ldr r0, [r4, r0] - bl ov83_0223D570 - cmp r0, #0 - bne _0223BED2 - ldr r0, [r4, #0] - bl sub_0202A93C - add r5, r0, #0 - ldr r0, [r4, #0] - ldr r3, _0223BF38 ; =0x00001430 - str r0, [sp] - mov r0, #0xba - add r2, r4, r3 - sub r3, #0xc - lsl r0, r0, #2 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r5, #0 - bl ov83_0223FFD4 - bl sub_0202A910 - ldr r3, _0223BF6C ; =0x00001428 - add r2, r0, #0 - ldr r3, [r4, r3] - mov r0, #0x1c - add r1, r5, #0 - bl ov83_0223D508 - add r7, r0, #0 - add r0, r5, #0 - bl sub_020181C4 - cmp r7, #1 - bne _0223BF2C - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BED2: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BEDA: - ldr r0, _0223BF6C ; =0x00001428 - ldr r0, [r4, r0] - bl ov83_0223D570 - cmp r0, #0 - bne _0223BF18 - ldr r2, _0223BF38 ; =0x00001430 - mov r0, #0xba - add r1, r4, r2 - sub r2, #0xc - lsl r0, r0, #2 - ldr r2, [r4, r2] - add r0, r4, r0 - bl ov83_022401AC - bl ov83_0223D4C0 - ldr r3, _0223BF70 ; =0x00001450 - add r2, r0, #0 - add r1, r4, r3 - sub r3, #0x28 - ldr r3, [r4, r3] - mov r0, #0x1b - bl ov83_0223D508 - cmp r0, #1 - bne _0223BF2C - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BF18: - ldr r0, [r6, #0] - add r0, r0, #1 - str r0, [r6, #0] - b _0223BF2C -_0223BF20: - ldr r0, [r4, #0xc] - add sp, #0x14 - add r0, r0, #1 - pop {r4, r5, r6, r7, pc} -_0223BF28: - bl sub_02022974 -_0223BF2C: - ldr r0, [r4, #0xc] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223BF34: .word 0x00000674 -_0223BF38: .word 0x00001430 -_0223BF3C: .word 0x0000063C -_0223BF40: .word 0x00000A88 -_0223BF44: .word 0x0000058C -_0223BF48: .word 0x000006BA -_0223BF4C: .word 0x000006BB -_0223BF50: .word 0x000006BF -_0223BF54: .word 0x000006C1 -_0223BF58: .word 0x000006C2 -_0223BF5C: .word 0x000005A4 -_0223BF60: .word 0x0000142C -_0223BF64: .word 0x00001424 -_0223BF68: .word 0x00001560 -_0223BF6C: .word 0x00001428 -_0223BF70: .word 0x00001450 - thumb_func_end ov83_0223BCEC - - thumb_func_start ov83_0223BF74 -ov83_0223BF74: ; 0x0223BF74 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r2, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #0xb - bls _0223BF86 - b _0223C21C -_0223BF86: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223BF92: ; jump table - .short _0223BFAA - _0223BF92 - 2 ; case 0 - .short _0223C006 - _0223BF92 - 2 ; case 1 - .short _0223C01C - _0223BF92 - 2 ; case 2 - .short _0223C040 - _0223BF92 - 2 ; case 3 - .short _0223C06E - _0223BF92 - 2 ; case 4 - .short _0223C09A - _0223BF92 - 2 ; case 5 - .short _0223C0CE - _0223BF92 - 2 ; case 6 - .short _0223C0F4 - _0223BF92 - 2 ; case 7 - .short _0223C10E - _0223BF92 - 2 ; case 8 - .short _0223C18A - _0223BF92 - 2 ; case 9 - .short _0223C1B4 - _0223BF92 - 2 ; case 10 - .short _0223C1F2 - _0223BF92 - 2 ; case 11 -_0223BFAA: - ldr r0, _0223C228 ; =0x0000063C - mov r1, #0 - add r0, r4, r0 - bl ov83_0223EC4C - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0xae - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r4, #0] - ldr r3, _0223C22C ; =0x00001414 - str r0, [sp] - add r0, r4, r3 - add r3, #0x80 - ldrb r3, [r4, r3] - mov r1, #0x80 - mov r2, #0x90 - bl ov83_0223F730 - mov r0, #6 - mov r2, #0 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r0, [r4, #0] - add r3, r2, #0 - str r0, [sp, #8] - mov r0, #3 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C220 -_0223C006: - bl sub_0200F2AC - cmp r0, #0 - bne _0223C010 - b _0223C220 -_0223C010: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0x1e - str r0, [r4, #0x1c] - b _0223C220 -_0223C01C: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bpl _0223C11C - ldr r0, _0223C228 ; =0x0000063C - mov r1, #1 - add r0, r4, r0 - bl ov83_0223EC4C - ldr r0, _0223C230 ; =0x000006C3 - bl sub_02005748 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0x1e - str r0, [r4, #0x1c] - b _0223C220 -_0223C040: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bpl _0223C11C - ldr r0, _0223C228 ; =0x0000063C - mov r1, #2 - add r0, r4, r0 - bl ov83_0223EC4C - ldr r0, _0223C22C ; =0x00001414 - add r0, r4, r0 - bl ov83_0223F784 - ldr r0, _0223C230 ; =0x000006C3 - bl sub_02005748 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0x96 - lsl r0, r0, #2 - str r0, [r4, #0x1c] - b _0223C220 -_0223C06E: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bmi _0223C088 - ldr r0, _0223C234 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223C088 - ldr r0, _0223C238 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0223C090 -_0223C088: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C220 -_0223C090: - ldr r0, _0223C22C ; =0x00001414 - add r0, r4, r0 - bl ov83_0223F784 - b _0223C220 -_0223C09A: - ldr r0, _0223C22C ; =0x00001414 - add r0, r4, r0 - bl ov83_0223F770 - ldr r0, _0223C228 ; =0x0000063C - add r0, r4, r0 - bl ov83_0223EC70 - ldr r1, _0223C23C ; =0x00001530 - ldr r2, _0223C240 ; =0x00001424 - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r0, r6, #0 - bl ov83_0223C8B0 - ldr r0, _0223C228 ; =0x0000063C - mov r1, #0 - add r0, r4, r0 - bl ov83_0223EC8C - mov r0, #0x96 - str r0, [r4, #0x1c] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C220 -_0223C0CE: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - ldr r0, _0223C234 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223C0EC - ldr r0, [r4, #0x1c] - cmp r0, #0 - blt _0223C0EC - ldr r0, _0223C238 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0223C11C -_0223C0EC: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C220 -_0223C0F4: - ldr r0, _0223C228 ; =0x0000063C - mov r1, #1 - add r0, r4, r0 - bl ov83_0223EC8C - ldr r0, _0223C244 ; =0x0000141C - add r0, r4, r0 - bl ov83_0223F7B0 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C220 -_0223C10E: - ldr r0, _0223C244 ; =0x0000141C - add r0, r4, r0 - bl ov83_0223F7DC - sub r1, r0, #1 - cmp r1, #1 - bls _0223C11E -_0223C11C: - b _0223C220 -_0223C11E: - cmp r0, #1 - bne _0223C16A - ldr r0, [r6, #0x10] - ldr r0, [r0, #8] - bl sub_0202AC98 - cmp r0, #0x64 - blo _0223C142 - ldr r0, _0223C228 ; =0x0000063C - mov r1, #2 - add r0, r4, r0 - bl ov83_0223EC8C - mov r0, #0xa - str r0, [r5, #0] - mov r0, #0x96 - str r0, [r4, #0x1c] - b _0223C220 -_0223C142: - ldr r0, [r6, #0x10] - mov r1, #4 - ldr r0, [r0, #0x14] - bl sub_0207D69C - cmp r0, #0 - bne _0223C164 - ldr r0, _0223C228 ; =0x0000063C - mov r1, #5 - add r0, r4, r0 - bl ov83_0223EC8C - mov r0, #0xa - str r0, [r5, #0] - mov r0, #0x96 - str r0, [r4, #0x1c] - b _0223C220 -_0223C164: - mov r0, #9 - str r0, [r5, #0] - b _0223C16E -_0223C16A: - mov r0, #0xb - str r0, [r5, #0] -_0223C16E: - ldr r0, _0223C240 ; =0x00001424 - ldr r0, [r4, r0] - cmp r0, #1 - ble _0223C220 - ldr r0, _0223C228 ; =0x0000063C - mov r1, #6 - add r0, r4, r0 - bl ov83_0223EC8C - ldr r0, _0223C228 ; =0x0000063C - add r0, r4, r0 - bl ov83_0223E9BC - b _0223C220 -_0223C18A: - mov r0, #0x35 - mov r1, #1 - lsl r0, r0, #4 - str r1, [r4, r0] - bl ov83_0223D4B0 - ldr r3, _0223C248 ; =0x00001428 - mov r1, #0x35 - lsl r1, r1, #4 - add r2, r0, #0 - ldr r3, [r4, r3] - mov r0, #0x1e - add r1, r4, r1 - bl ov83_0223D508 - cmp r0, #1 - bne _0223C220 - ldr r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - pop {r3, r4, r5, r6, pc} -_0223C1B4: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - ldr r0, _0223C234 ; =0x021BF6BC - ldrh r0, [r0, #0x20] - cmp r0, #0 - bne _0223C1D2 - ldr r0, [r4, #0x1c] - cmp r0, #0 - blt _0223C1D2 - ldr r0, _0223C238 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #3 - tst r0, r1 - beq _0223C220 -_0223C1D2: - ldr r0, _0223C240 ; =0x00001424 - ldr r0, [r4, r0] - cmp r0, #1 - ble _0223C1EC - ldr r0, _0223C228 ; =0x0000063C - mov r1, #6 - add r0, r4, r0 - bl ov83_0223EC8C - ldr r0, _0223C228 ; =0x0000063C - add r0, r4, r0 - bl ov83_0223E9BC -_0223C1EC: - mov r0, #0xb - str r0, [r5, #0] - b _0223C220 -_0223C1F2: - mov r0, #0x35 - mov r1, #0 - lsl r0, r0, #4 - str r1, [r4, r0] - bl ov83_0223D4B0 - ldr r3, _0223C248 ; =0x00001428 - mov r1, #0x35 - lsl r1, r1, #4 - add r2, r0, #0 - ldr r3, [r4, r3] - mov r0, #0x1e - add r1, r4, r1 - bl ov83_0223D508 - cmp r0, #1 - bne _0223C220 - ldr r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - pop {r3, r4, r5, r6, pc} -_0223C21C: - bl sub_02022974 -_0223C220: - ldr r0, [r4, #0xc] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - nop -_0223C228: .word 0x0000063C -_0223C22C: .word 0x00001414 -_0223C230: .word 0x000006C3 -_0223C234: .word 0x021BF6BC -_0223C238: .word 0x021BF67C -_0223C23C: .word 0x00001530 -_0223C240: .word 0x00001424 -_0223C244: .word 0x0000141C -_0223C248: .word 0x00001428 - thumb_func_end ov83_0223BF74 - - thumb_func_start ov83_0223C24C -ov83_0223C24C: ; 0x0223C24C - ldr r3, _0223C254 ; =ov83_0223CB5C - add r0, r1, #0 - add r1, r2, #0 - bx r3 - ; .align 2, 0 -_0223C254: .word ov83_0223CB5C - thumb_func_end ov83_0223C24C - - thumb_func_start ov83_0223C258 -ov83_0223C258: ; 0x0223C258 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r2, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - cmp r0, #4 - bhi _0223C32E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223C274: ; jump table - .short _0223C27E - _0223C274 - 2 ; case 0 - .short _0223C2D8 - _0223C274 - 2 ; case 1 - .short _0223C2E8 - _0223C274 - 2 ; case 2 - .short _0223C308 - _0223C274 - 2 ; case 3 - .short _0223C318 - _0223C274 - 2 ; case 4 -_0223C27E: - ldr r0, _0223C334 ; =0x00001575 - ldrb r0, [r4, r0] - cmp r0, #1 - bne _0223C296 - ldr r0, _0223C338 ; =0x0000063C - mov r1, #3 - add r0, r4, r0 - bl ov83_0223EC8C - mov r0, #1 - str r0, [r6, #0x20] - b _0223C2CC -_0223C296: - mov r0, #0 - str r0, [r6, #0x20] - ldr r0, _0223C33C ; =0x00001424 - ldr r0, [r4, r0] - cmp r0, #1 - bgt _0223C2A8 - mov r0, #2 - str r0, [r5, #0] - b _0223C32E -_0223C2A8: - ldr r0, _0223C338 ; =0x0000063C - mov r1, #4 - add r0, r4, r0 - bl ov83_0223EC8C - ldr r0, _0223C340 ; =0x0000142C - ldr r0, [r4, r0] - cmp r0, #1 - bne _0223C2CC - ldr r0, [r4, #0] - bl sub_0202C1E0 - add r1, r0, #0 - ldr r0, [r6, #0x10] - mov r2, #4 - ldr r0, [r0, #0x1c] - bl sub_0202B758 -_0223C2CC: - mov r0, #0x3c - str r0, [r4, #0x1c] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C32E -_0223C2D8: - ldr r0, [r4, #0x1c] - sub r0, r0, #1 - str r0, [r4, #0x1c] - bpl _0223C32E - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C32E -_0223C2E8: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C32E -_0223C308: - bl sub_0200F2AC - cmp r0, #0 - beq _0223C32E - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0223C32E -_0223C318: - add r0, r4, #0 - add r1, r5, #0 - bl ov83_0223CB8C - add r0, r4, #0 - bl ov83_0223CAA4 - ldr r0, [r4, #0xc] - add sp, #0xc - add r0, r0, #1 - pop {r3, r4, r5, r6, pc} -_0223C32E: - ldr r0, [r4, #0xc] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223C334: .word 0x00001575 -_0223C338: .word 0x0000063C -_0223C33C: .word 0x00001424 -_0223C340: .word 0x0000142C - thumb_func_end ov83_0223C258 - - thumb_func_start ov83_0223C344 -ov83_0223C344: ; 0x0223C344 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0xd7 - add r4, r1, #0 - lsl r0, r0, #2 - add r0, r4, r0 - bl ov83_0223DB30 - ldr r0, _0223C3C0 ; =0x0000054C - add r0, r4, r0 - bl ov83_0223DEC4 - mov r0, #0x16 - lsl r0, r0, #6 - add r0, r4, r0 - bl ov83_0223E260 - ldr r0, _0223C3C4 ; =0x0000058C - add r0, r4, r0 - bl ov83_0223E260 - ldr r0, _0223C3C8 ; =0x00000598 - add r0, r4, r0 - bl ov83_0223E260 - ldr r0, _0223C3CC ; =0x000005A4 - add r0, r4, r0 - bl ov83_0223E34C - ldr r0, _0223C3D0 ; =0x0000061C - add r0, r4, r0 - bl ov83_0223E5C0 - ldr r0, _0223C3D4 ; =0x0000063C - add r0, r4, r0 - bl ov83_0223E6F8 - ldr r0, _0223C3D8 ; =0x00000674 - add r0, r4, r0 - bl ov83_0223ED4C - ldr r0, _0223C3DC ; =0x00000A88 - add r0, r4, r0 - bl ov83_0223F2A8 - ldr r0, _0223C3E0 ; =0x00000B08 - add r0, r4, r0 - bl ov83_0223F4AC - ldr r0, _0223C3E4 ; =0x0000141C - add r0, r4, r0 - bl ov83_0223F7A4 - add r0, r5, #0 - add r1, r4, #0 - bl ov83_0223C87C - add r0, r4, #0 - bl ov83_0223B784 - ldr r0, [r4, #0xc] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C3C0: .word 0x0000054C -_0223C3C4: .word 0x0000058C -_0223C3C8: .word 0x00000598 -_0223C3CC: .word 0x000005A4 -_0223C3D0: .word 0x0000061C -_0223C3D4: .word 0x0000063C -_0223C3D8: .word 0x00000674 -_0223C3DC: .word 0x00000A88 -_0223C3E0: .word 0x00000B08 -_0223C3E4: .word 0x0000141C - thumb_func_end ov83_0223C344 - - thumb_func_start ov83_0223C3E8 -ov83_0223C3E8: ; 0x0223C3E8 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223C470 ; =0x000014C8 - add r4, r5, r0 - ldrb r0, [r4, #0xc] - cmp r0, #0 - ldr r0, _0223C474 ; =0x000015F0 - bne _0223C400 - ldrh r2, [r5, r0] - ldrh r1, [r4, #0xa] - add r1, r2, r1 - b _0223C406 -_0223C400: - ldrh r2, [r5, r0] - ldrh r1, [r4, #0xa] - sub r1, r2, r1 -_0223C406: - strh r1, [r5, r0] - ldr r1, _0223C474 ; =0x000015F0 - ldr r0, _0223C478 ; =0x000005A4 - ldrh r1, [r5, r1] - add r0, r5, r0 - bl ov83_0223E4A4 - add r0, r5, #0 - bl ov83_0223C90C - ldrh r0, [r4, #0xa] - ldrb r1, [r4, #0xd] - bl ov83_0223FB68 - add r1, r0, #0 - ldr r0, _0223C478 ; =0x000005A4 - add r0, r5, r0 - bl ov83_0223E4C0 - ldr r0, _0223C478 ; =0x000005A4 - ldrb r1, [r4, #0xd] - add r0, r5, r0 - bl ov83_0223E51C - ldr r0, _0223C47C ; =0x0000061C - add r0, r5, r0 - bl ov83_0223E658 - add r0, r5, #0 - bl ov83_0223C480 - add r0, r5, #0 - bl ov83_0223C758 - add r0, r5, #0 - bl ov83_0223C558 - add r0, r5, #0 - bl ov83_0223C600 - add r0, r5, #0 - bl ov83_0223C6D4 - add r0, r5, #0 - bl ov83_0223C7FC - mov r0, #0 - strb r0, [r4, #0x13] - strb r0, [r4, #0x12] - strb r0, [r4, #0xf] - strb r0, [r4, #0xe] - pop {r3, r4, r5, pc} - nop -_0223C470: .word 0x000014C8 -_0223C474: .word 0x000015F0 -_0223C478: .word 0x000005A4 -_0223C47C: .word 0x0000061C - thumb_func_end ov83_0223C3E8 - - thumb_func_start ov83_0223C480 -ov83_0223C480: ; 0x0223C480 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _0223C534 ; =0x000014C8 - mov r2, #7 - add r4, r5, r0 - ldrb r3, [r4, #0xd] - ldr r0, _0223C538 ; =0x000005A4 - mov r1, #5 - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223C53C ; =0x02240234 - add r0, r5, r0 - ldrb r2, [r2, r6] - bl ov83_0223E484 - ldrb r3, [r4, #0xd] - ldr r0, _0223C538 ; =0x000005A4 - mov r2, #7 - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223C540 ; =0x02240235 - add r0, r5, r0 - ldrb r2, [r2, r6] - mov r1, #6 - bl ov83_0223E484 - ldrb r2, [r4, #0xd] - ldr r0, _0223C538 ; =0x000005A4 - mov r1, #7 - add r3, r2, #0 - ldr r2, _0223C544 ; =0x02240236 - mul r3, r1 - ldrb r2, [r2, r3] - add r0, r5, r0 - bl ov83_0223E484 - ldrb r3, [r4, #0xd] - ldr r0, _0223C538 ; =0x000005A4 - mov r2, #7 - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223C548 ; =0x02240237 - add r0, r5, r0 - ldrb r2, [r2, r6] - mov r1, #0 - bl ov83_0223E484 - ldrb r3, [r4, #0xd] - ldr r0, _0223C538 ; =0x000005A4 - mov r2, #7 - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223C54C ; =0x02240238 - add r0, r5, r0 - ldrb r2, [r2, r6] - mov r1, #1 - bl ov83_0223E484 - ldrb r3, [r4, #0xd] - ldr r0, _0223C538 ; =0x000005A4 - mov r2, #7 - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223C550 ; =0x02240239 - add r0, r5, r0 - ldrb r2, [r2, r6] - mov r1, #2 - bl ov83_0223E484 - ldrb r1, [r4, #0xd] - mov r0, #7 - add r2, r1, #0 - mul r2, r0 - ldr r0, _0223C554 ; =0x0224023A - ldrb r1, [r0, r2] - cmp r1, #8 - beq _0223C532 - ldrb r2, [r4, #0x10] - ldr r0, _0223C538 ; =0x000005A4 - cmp r2, #0 - beq _0223C52A - add r0, r5, r0 - bl ov83_0223E4E0 - pop {r4, r5, r6, pc} -_0223C52A: - add r0, r5, r0 - mov r2, #0 - bl ov83_0223E484 -_0223C532: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223C534: .word 0x000014C8 -_0223C538: .word 0x000005A4 -_0223C53C: .word 0x02240234 -_0223C540: .word 0x02240235 -_0223C544: .word 0x02240236 -_0223C548: .word 0x02240237 -_0223C54C: .word 0x02240238 -_0223C550: .word 0x02240239 -_0223C554: .word 0x0224023A - thumb_func_end ov83_0223C480 - - thumb_func_start ov83_0223C558 -ov83_0223C558: ; 0x0223C558 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223C5F4 ; =0x000014C8 - add r1, r4, r0 - ldrb r2, [r1, #0x11] - ldrb r0, [r1, #0xc] - cmp r2, r0 - beq _0223C578 - ldrh r0, [r1, #0xa] - cmp r0, #0 - beq _0223C578 - mov r0, #0xb - lsl r0, r0, #6 - ldr r1, [r4, r0] - cmp r1, #0 - beq _0223C596 -_0223C578: - ldr r0, _0223C5F8 ; =0x00000A88 - mov r1, #1 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223C5F8 ; =0x00000A88 - mov r1, #3 - add r0, r4, r0 - bl ov83_0223F3D0 - mov r0, #0xb1 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - pop {r4, pc} -_0223C596: - cmp r2, #0 - bne _0223C5C6 - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #1 - beq _0223C5F0 - ldr r0, _0223C5F8 ; =0x00000A88 - mov r1, #1 - add r0, r4, r0 - bl ov83_0223F3A0 - mov r0, #0xb1 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _0223C5F8 ; =0x00000A88 - mov r1, #3 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223C5FC ; =0x000006C1 - bl sub_02005748 - pop {r4, pc} -_0223C5C6: - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #2 - beq _0223C5F0 - ldr r0, _0223C5F8 ; =0x00000A88 - mov r1, #3 - add r0, r4, r0 - bl ov83_0223F3A0 - mov r0, #0xb1 - mov r1, #2 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, _0223C5F8 ; =0x00000A88 - mov r1, #1 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223C5FC ; =0x000006C1 - bl sub_02005748 -_0223C5F0: - pop {r4, pc} - nop -_0223C5F4: .word 0x000014C8 -_0223C5F8: .word 0x00000A88 -_0223C5FC: .word 0x000006C1 - thumb_func_end ov83_0223C558 - - thumb_func_start ov83_0223C600 -ov83_0223C600: ; 0x0223C600 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223C6C4 ; =0x000014C8 - mov r1, #0xb1 - lsl r1, r1, #2 - add r4, r5, r0 - ldr r0, [r5, r1] - cmp r0, #0 - bne _0223C61A - sub r0, r1, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223C630 -_0223C61A: - ldr r0, _0223C6C8 ; =0x0000063C - add r0, r5, r0 - bl ov83_0223E994 - mov r0, #0xb3 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - sub r0, r0, #4 - str r1, [r5, r0] - pop {r3, r4, r5, pc} -_0223C630: - add r1, #8 - ldr r0, [r5, r1] - cmp r0, #0 - bne _0223C664 - ldrb r0, [r4, #0x13] - cmp r0, #0 - beq _0223C678 - ldr r0, _0223C6C8 ; =0x0000063C - add r0, r5, r0 - bl ov83_0223E994 - ldr r0, _0223C6C8 ; =0x0000063C - ldrb r2, [r4, #0xd] - ldr r1, _0223C6CC ; =0x02240208 - add r0, r5, r0 - ldrb r1, [r1, r2] - bl ov83_0223E908 - mov r0, #0xb3 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - mov r1, #0 - sub r0, r0, #4 - str r1, [r5, r0] - b _0223C678 -_0223C664: - ldr r0, _0223C6C8 ; =0x0000063C - add r0, r5, r0 - bl ov83_0223E984 - cmp r0, #0 - beq _0223C678 - mov r0, #0xb3 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_0223C678: - mov r0, #0xb2 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223C6AE - ldrb r0, [r4, #0x12] - cmp r0, #0 - beq _0223C6C2 - ldr r0, _0223C6C8 ; =0x0000063C - add r0, r5, r0 - bl ov83_0223E994 - ldr r0, _0223C6C8 ; =0x0000063C - ldrb r2, [r4, #0xd] - ldr r1, _0223C6D0 ; =0x0224020C - add r0, r5, r0 - ldrb r1, [r1, r2] - bl ov83_0223E908 - mov r0, #0xb2 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r5, r0] - mov r1, #0 - add r0, r0, #4 - str r1, [r5, r0] - pop {r3, r4, r5, pc} -_0223C6AE: - ldr r0, _0223C6C8 ; =0x0000063C - add r0, r5, r0 - bl ov83_0223E984 - cmp r0, #0 - beq _0223C6C2 - mov r0, #0xb2 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] -_0223C6C2: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C6C4: .word 0x000014C8 -_0223C6C8: .word 0x0000063C -_0223C6CC: .word 0x02240208 -_0223C6D0: .word 0x0224020C - thumb_func_end ov83_0223C600 - - thumb_func_start ov83_0223C6D4 -ov83_0223C6D4: ; 0x0223C6D4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223C748 ; =0x000014C8 - add r4, r5, r0 - ldrb r0, [r4, #0x13] - cmp r0, #0 - beq _0223C6FE - ldr r0, _0223C74C ; =0x00000674 - ldrb r1, [r4, #0xd] - add r0, r5, r0 - mov r2, #2 - bl ov83_0223EDDC - ldrb r0, [r4, #0xd] - lsl r1, r0, #2 - ldr r0, _0223C750 ; =0x02240210 - ldr r0, [r0, r1] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_0223C6FE: - ldrb r0, [r4, #0x12] - cmp r0, #1 - bne _0223C722 - ldr r0, _0223C74C ; =0x00000674 - ldrb r1, [r4, #0xd] - add r0, r5, r0 - mov r2, #1 - bl ov83_0223EDDC - ldrb r0, [r4, #0xd] - lsl r1, r0, #2 - ldr r0, _0223C754 ; =0x0224021C - ldr r0, [r0, r1] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 - b _0223C732 -_0223C722: - cmp r0, #2 - bne _0223C732 - ldr r0, _0223C74C ; =0x00000674 - ldrb r1, [r4, #0xd] - add r0, r5, r0 - mov r2, #0 - bl ov83_0223EDDC -_0223C732: - ldrh r0, [r4, #0xa] - ldrb r1, [r4, #0xd] - bl ov83_0223FB50 - cmp r0, #0 - bne _0223C746 - ldr r0, _0223C74C ; =0x00000674 - add r0, r5, r0 - bl ov83_0223EFCC -_0223C746: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C748: .word 0x000014C8 -_0223C74C: .word 0x00000674 -_0223C750: .word 0x02240210 -_0223C754: .word 0x0224021C - thumb_func_end ov83_0223C6D4 - - thumb_func_start ov83_0223C758 -ov83_0223C758: ; 0x0223C758 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223C7F0 ; =0x000014C8 - add r1, r4, r0 - ldrb r0, [r1, #0xe] - cmp r0, #0 - beq _0223C7B0 - ldrb r0, [r1, #0x11] - cmp r0, #0 - ldr r0, _0223C7F4 ; =0x00000A88 - bne _0223C790 - add r0, r4, r0 - mov r1, #0 - bl ov83_0223F3A0 - ldr r0, _0223C7F4 ; =0x00000A88 - mov r1, #2 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223C7F8 ; =0x000006C1 - bl sub_02005748 - mov r0, #0xb - mov r1, #1 - lsl r0, r0, #6 - str r1, [r4, r0] - b _0223C7B0 -_0223C790: - add r0, r4, r0 - mov r1, #2 - bl ov83_0223F3A0 - ldr r0, _0223C7F4 ; =0x00000A88 - mov r1, #0 - add r0, r4, r0 - bl ov83_0223F3D0 - ldr r0, _0223C7F8 ; =0x000006C1 - bl sub_02005748 - mov r0, #0xb - mov r1, #2 - lsl r0, r0, #6 - str r1, [r4, r0] -_0223C7B0: - mov r0, #0xb - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #1 - bne _0223C7D2 - ldr r0, _0223C7F4 ; =0x00000A88 - mov r1, #0 - add r0, r4, r0 - bl ov83_0223F3F0 - cmp r0, #1 - bne _0223C7EC - mov r0, #0xb - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] - pop {r4, pc} -_0223C7D2: - cmp r0, #2 - bne _0223C7EC - ldr r0, _0223C7F4 ; =0x00000A88 - mov r1, #2 - add r0, r4, r0 - bl ov83_0223F3F0 - cmp r0, #1 - bne _0223C7EC - mov r0, #0xb - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] -_0223C7EC: - pop {r4, pc} - nop -_0223C7F0: .word 0x000014C8 -_0223C7F4: .word 0x00000A88 -_0223C7F8: .word 0x000006C1 - thumb_func_end ov83_0223C758 - - thumb_func_start ov83_0223C7FC -ov83_0223C7FC: ; 0x0223C7FC - push {r3, lr} - ldr r3, _0223C820 ; =0x00001434 - add r2, r3, #1 - ldrb r1, [r0, r3] - add r3, #0xa3 - ldrb r3, [r0, r3] - ldrb r2, [r0, r2] - cmp r3, #1 - bne _0223C81C - ldr r3, _0223C824 ; =0x00000B08 - add r0, r0, r3 - bl ov83_0223F544 - ldr r0, _0223C828 ; =0x000006BF - bl sub_02005748 -_0223C81C: - pop {r3, pc} - nop -_0223C820: .word 0x00001434 -_0223C824: .word 0x00000B08 -_0223C828: .word 0x000006BF - thumb_func_end ov83_0223C7FC - - thumb_func_start ov83_0223C82C -ov83_0223C82C: ; 0x0223C82C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - bl sub_0202A93C - ldr r1, _0223C870 ; =0x00001530 - str r0, [r4, r1] - ldr r0, _0223C874 ; =0x00001428 - ldr r0, [r4, r0] - bl ov83_0223D570 - ldr r1, _0223C878 ; =0x00001574 - mov r6, #0 - strb r0, [r4, r1] - add r0, r1, #0 - mov r3, #0x80 - mov r2, #0x60 - sub r0, #0xb4 - sub r1, #0xb3 -_0223C854: - strb r3, [r4, r0] - strb r2, [r4, r1] - add r6, r6, #1 - add r4, #0x1c - cmp r6, #4 - blt _0223C854 - add r5, #0x26 - ldrb r0, [r5] - cmp r0, #0 - beq _0223C86E - mov r0, #2 - bl sub_02035938 -_0223C86E: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223C870: .word 0x00001530 -_0223C874: .word 0x00001428 -_0223C878: .word 0x00001574 - thumb_func_end ov83_0223C82C - - thumb_func_start ov83_0223C87C -ov83_0223C87C: ; 0x0223C87C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223C8AC ; =0x00001530 - add r4, r1, #0 - ldr r0, [r4, r0] - cmp r0, #0 - bne _0223C88E - bl sub_02022974 -_0223C88E: - ldr r0, _0223C8AC ; =0x00001530 - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r1, _0223C8AC ; =0x00001530 - mov r0, #0 - add r5, #0x26 - str r0, [r4, r1] - ldrb r1, [r5] - cmp r1, #0 - beq _0223C8A8 - bl sub_02035938 -_0223C8A8: - pop {r3, r4, r5, pc} - nop -_0223C8AC: .word 0x00001530 - thumb_func_end ov83_0223C87C - - thumb_func_start ov83_0223C8B0 -ov83_0223C8B0: ; 0x0223C8B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0x10] - add r7, r1, #0 - ldr r0, [r0, #0xc] - add r6, r2, #0 - bl sub_0202440C - mov r4, #0 - str r0, [sp] - cmp r6, #0 - ble _0223C8EA -_0223C8CE: - ldr r0, [r5, #0x10] - add r1, r7, #0 - ldr r0, [r0, #8] - bl sub_0202AB74 - ldr r1, _0223C908 ; =0x0000FFFF - cmp r0, r1 - bne _0223C8E4 - mov r0, #0 - str r0, [sp, #4] - b _0223C8EA -_0223C8E4: - add r4, r4, #1 - cmp r4, r6 - blt _0223C8CE -_0223C8EA: - add r5, #0x26 - ldrb r0, [r5] - cmp r0, #0 - bne _0223C902 - add r0, r7, #0 - mov r1, #0 - bl sub_0202A974 - add r1, r0, #0 - ldr r0, [sp] - bl sub_0206CFCC -_0223C902: - ldr r0, [sp, #4] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223C908: .word 0x0000FFFF - thumb_func_end ov83_0223C8B0 - - thumb_func_start ov83_0223C90C -ov83_0223C90C: ; 0x0223C90C - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223C950 ; =0x000014C8 - add r4, r5, r0 - ldrb r2, [r4, #0xc] - cmp r2, #0 - bne _0223C926 - mov r0, #0xd5 - lsl r0, r0, #2 - ldr r1, [r5, r0] - ldrh r0, [r4, #8] - cmp r1, r0 - bgt _0223C936 -_0223C926: - cmp r2, #1 - bne _0223C946 - mov r0, #0xd5 - lsl r0, r0, #2 - ldr r1, [r5, r0] - ldrh r0, [r4, #8] - cmp r1, r0 - bge _0223C946 -_0223C936: - ldrb r0, [r4, #0xd] - lsl r1, r0, #2 - ldr r0, _0223C954 ; =0x02240228 - ldr r0, [r0, r1] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_02005748 -_0223C946: - ldrh r1, [r4, #8] - mov r0, #0xd5 - lsl r0, r0, #2 - str r1, [r5, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C950: .word 0x000014C8 -_0223C954: .word 0x02240228 - thumb_func_end ov83_0223C90C - - thumb_func_start ov83_0223C958 -ov83_0223C958: ; 0x0223C958 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r1, [r5, #0] - mov r0, #0x7a - bl sub_02006C24 - add r4, r0, #0 - add r0, r5, #0 - bl ov83_0223CE9C - add r0, r5, #0 - ldr r1, [r5, #0] - add r0, #0x20 - bl ov83_0223CC30 - add r0, r5, #0 - bl ov83_0223CD64 - add r0, r5, #0 - bl ov83_0223CCF8 - add r0, r5, #0 - bl ov83_0223CD28 - add r0, r5, #0 - add r1, r4, #0 - bl ov83_0223CDD0 - ldr r0, _0223CA7C ; =0x0000054C - ldr r1, [r5, #0x20] - ldr r2, [r5, #0] - add r0, r5, r0 - add r3, r4, #0 - bl ov83_0223DEE0 - ldr r0, _0223CA80 ; =0x0000063C - ldr r1, [r5, #0x20] - ldr r2, [r5, #0] - add r0, r5, r0 - add r3, r4, #0 - bl ov83_0223E720 - mov r1, #0xaf - ldr r0, _0223CA84 ; =0x000005A4 - lsl r1, r1, #2 - ldr r1, [r5, r1] - ldr r2, [r5, #0] - add r0, r5, r0 - add r3, r4, #0 - bl ov83_0223E368 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #0x16 - mov r2, #0x5a - lsl r0, r0, #6 - add r1, r5, #0 - lsl r2, r2, #2 - ldr r3, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r2, r5, r2 - bl ov83_0223E28C - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, _0223CA88 ; =0x00000598 - mov r2, #0x5a - add r1, r5, #0 - lsl r2, r2, #2 - ldr r3, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r2, r5, r2 - bl ov83_0223E28C - mov r0, #5 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, _0223CA8C ; =0x0000058C - mov r2, #0x5a - add r1, r5, #0 - lsl r2, r2, #2 - ldr r3, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r2, r5, r2 - bl ov83_0223E28C - ldr r0, _0223CA90 ; =0x0000061C - mov r2, #0x5a - add r1, r5, #0 - lsl r2, r2, #2 - ldr r3, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r2, r5, r2 - bl ov83_0223E5DC - ldr r0, _0223CA94 ; =0x00000674 - mov r2, #0x5a - add r1, r5, #0 - lsl r2, r2, #2 - ldr r3, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r2, r5, r2 - bl ov83_0223ED6C - ldr r0, _0223CA98 ; =0x00000A88 - add r1, r5, #0 - ldr r2, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r3, r4, #0 - bl ov83_0223F2C4 - ldr r0, _0223CA9C ; =0x00000B08 - mov r2, #0x5a - add r1, r5, #0 - lsl r2, r2, #2 - ldr r3, [r5, #0] - add r0, r5, r0 - add r1, #0x2c - add r2, r5, r2 - bl ov83_0223F4CC - add r0, r5, #0 - bl ov83_0223CF2C - add r0, r4, #0 - bl sub_02006CA8 - ldr r0, _0223CAA0 ; =0x021BF6DC - mov r1, #1 - strb r1, [r0, #5] - bl sub_0201FFE8 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223CA7C: .word 0x0000054C -_0223CA80: .word 0x0000063C -_0223CA84: .word 0x000005A4 -_0223CA88: .word 0x00000598 -_0223CA8C: .word 0x0000058C -_0223CA90: .word 0x0000061C -_0223CA94: .word 0x00000674 -_0223CA98: .word 0x00000A88 -_0223CA9C: .word 0x00000B08 -_0223CAA0: .word 0x021BF6DC - thumb_func_end ov83_0223C958 - - thumb_func_start ov83_0223CAA4 -ov83_0223CAA4: ; 0x0223CAA4 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223CB34 ; =0x0000063C - add r0, r4, r0 - bl ov83_0223E760 - ldr r0, _0223CB38 ; =0x0000054C - add r0, r4, r0 - bl ov83_0223DF10 - ldr r0, _0223CB3C ; =0x000005A4 - add r0, r4, r0 - bl ov83_0223E438 - add r0, r4, #0 - bl ov83_0223CE7C - mov r0, #0x16 - lsl r0, r0, #6 - add r0, r4, r0 - bl ov83_0223E2C8 - ldr r0, _0223CB40 ; =0x0000058C - add r0, r4, r0 - bl ov83_0223E2C8 - ldr r0, _0223CB44 ; =0x00000598 - add r0, r4, r0 - bl ov83_0223E2C8 - ldr r0, _0223CB48 ; =0x0000061C - add r0, r4, r0 - bl ov83_0223E63C - ldr r0, _0223CB4C ; =0x00000674 - add r0, r4, r0 - bl ov83_0223ED78 - ldr r0, _0223CB50 ; =0x00000A88 - add r0, r4, r0 - bl ov83_0223F348 - ldr r0, _0223CB54 ; =0x00000B08 - add r0, r4, r0 - bl ov83_0223F510 - add r0, r4, #0 - add r0, #0x20 - bl ov83_0223CCCC - add r0, r4, #0 - bl ov83_0223CD1C - add r0, r4, #0 - bl ov83_0223CDC0 - add r0, r4, #0 - bl ov83_0223CD54 - add r0, r4, #0 - bl ov83_0223CF20 - add r0, r4, #0 - bl ov83_0223D068 - ldr r0, _0223CB58 ; =0x021BF6DC - mov r1, #0 - strb r1, [r0, #5] - bl sub_0201FFE8 - pop {r4, pc} - nop -_0223CB34: .word 0x0000063C -_0223CB38: .word 0x0000054C -_0223CB3C: .word 0x000005A4 -_0223CB40: .word 0x0000058C -_0223CB44: .word 0x00000598 -_0223CB48: .word 0x0000061C -_0223CB4C: .word 0x00000674 -_0223CB50: .word 0x00000A88 -_0223CB54: .word 0x00000B08 -_0223CB58: .word 0x021BF6DC - thumb_func_end ov83_0223CAA4 - - thumb_func_start ov83_0223CB5C -ov83_0223CB5C: ; 0x0223CB5C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r1, _0223CB88 ; =0x0000149C - str r0, [sp] - mov r0, #0xd7 - mov r3, #0x5a - lsl r0, r0, #2 - add r2, r4, #0 - lsl r3, r3, #2 - add r0, r4, r0 - add r1, r4, r1 - add r2, #0x2c - add r3, r4, r3 - bl ov83_0223DB4C - ldr r0, [r4, #0xc] - add r0, r0, #1 - add sp, #4 - pop {r3, r4, pc} - nop -_0223CB88: .word 0x0000149C - thumb_func_end ov83_0223CB5C - - thumb_func_start ov83_0223CB8C -ov83_0223CB8C: ; 0x0223CB8C - push {r4, lr} - add r4, r0, #0 - mov r0, #0xd7 - lsl r0, r0, #2 - add r1, r4, #0 - add r0, r4, r0 - add r1, #0x2c - bl ov83_0223DC1C - ldr r0, [r4, #0xc] - add r0, r0, #1 - pop {r4, pc} - thumb_func_end ov83_0223CB8C - - thumb_func_start ov83_0223CBA4 -ov83_0223CBA4: ; 0x0223CBA4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_020241B4 - mov r1, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - bl sub_020B2628 - bl sub_020A73C0 - mov r0, #0xaf - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223CBCE - bl sub_020150EC -_0223CBCE: - mov r2, #1 - mov r0, #0x12 - add r1, sp, #0 - str r2, [sp] - bl sub_020B275C - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - mov r0, #0xae - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223CBF6 - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _0223CBF6 - bl sub_020219F8 -_0223CBF6: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223CBA4 - - thumb_func_start ov83_0223CBFC -ov83_0223CBFC: ; 0x0223CBFC - push {r4, lr} - add r4, r0, #0 - bl sub_0200A858 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0223CC0E - bl sub_0201C2B8 -_0223CC0E: - pop {r4, pc} - thumb_func_end ov83_0223CBFC - - thumb_func_start ov83_0223CC10 -ov83_0223CC10: ; 0x0223CC10 - push {r4, lr} - sub sp, #0x28 - ldr r4, _0223CC2C ; =0x022402F0 - add r3, sp, #0 - mov r2, #5 -_0223CC1A: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223CC1A - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_0223CC2C: .word 0x022402F0 - thumb_func_end ov83_0223CC10 - - thumb_func_start ov83_0223CC30 -ov83_0223CC30: ; 0x0223CC30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x88 - str r1, [sp] - add r6, r0, #0 - bl ov83_0223CC10 - ldr r0, [sp] - bl sub_02018340 - add r3, sp, #8 - ldr r4, _0223CCC0 ; =0x022402E0 - str r0, [r6, #0] - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #0 - mov r1, #2 - bl sub_02019060 - ldr r4, _0223CCC4 ; =0x02240318 - add r3, sp, #0x18 - mov r2, #0xe -_0223CC6E: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223CC6E - ldr r1, _0223CCC8 ; =0x022402BC - add r0, sp, #4 - ldrb r2, [r1] - mov r7, #0 - add r5, sp, #4 - strb r2, [r0] - ldrb r2, [r1, #1] - add r4, sp, #0x18 - strb r2, [r0, #1] - ldrb r2, [r1, #2] - ldrb r1, [r1, #3] - strb r2, [r0, #2] - strb r1, [r0, #3] -_0223CC90: - ldrb r1, [r5] - ldr r0, [r6, #0] - add r2, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldrb r1, [r5] - ldr r0, [r6, #0] - bl sub_02019EBC - ldrb r0, [r5] - ldr r3, [sp] - mov r1, #0x20 - mov r2, #0 - bl sub_02019690 - add r7, r7, #1 - add r4, #0x1c - add r5, r5, #1 - cmp r7, #4 - blt _0223CC90 - add sp, #0x88 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CCC0: .word 0x022402E0 -_0223CCC4: .word 0x02240318 -_0223CCC8: .word 0x022402BC - thumb_func_end ov83_0223CC30 - - thumb_func_start ov83_0223CCCC -ov83_0223CCCC: ; 0x0223CCCC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - mov r1, #5 - bl sub_02019044 - ldr r0, [r4, #0] - mov r1, #4 - bl sub_02019044 - ldr r0, [r4, #0] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0] - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov83_0223CCCC - - thumb_func_start ov83_0223CCF8 -ov83_0223CCF8: ; 0x0223CCF8 - push {r3, lr} - add r3, r0, #0 - ldr r3, [r3, #0] - add r0, #0x2c - mov r1, #0x48 - mov r2, #0x10 - bl ov83_0223D754 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov83_0223CCF8 - - thumb_func_start ov83_0223CD1C -ov83_0223CD1C: ; 0x0223CD1C - ldr r3, _0223CD24 ; =ov83_0223D784 - add r0, #0x2c - bx r3 - nop -_0223CD24: .word ov83_0223D784 - thumb_func_end ov83_0223CD1C - - thumb_func_start ov83_0223CD28 -ov83_0223CD28: ; 0x0223CD28 - push {r3, r4, r5, lr} - sub sp, #0x10 - ldr r5, _0223CD50 ; =0x022402C0 - add r3, sp, #0 - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - str r0, [sp, #0xc] - add r0, r2, #0 - bl sub_02015064 - mov r1, #0xaf - lsl r1, r1, #2 - str r0, [r4, r1] - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223CD50: .word 0x022402C0 - thumb_func_end ov83_0223CD28 - - thumb_func_start ov83_0223CD54 -ov83_0223CD54: ; 0x0223CD54 - mov r1, #0xaf - lsl r1, r1, #2 - ldr r3, _0223CD60 ; =sub_020150A8 - ldr r0, [r0, r1] - bx r3 - nop -_0223CD60: .word sub_020150A8 - thumb_func_end ov83_0223CD54 - - thumb_func_start ov83_0223CD64 -ov83_0223CD64: ; 0x0223CD64 - push {r4, r5, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x80 - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - ldr r2, [r4, #0] - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - ldr r5, _0223CDB8 ; =0x022402D0 - add r3, sp, #0x14 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - ldr r1, _0223CDBC ; =0x00200010 - str r0, [sp, #0x20] - add r0, r2, #0 - mov r2, #0x10 - bl sub_0201E88C - ldr r1, [r4, #0] - mov r0, #0x20 - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x24 - pop {r4, r5, pc} - nop -_0223CDB8: .word 0x022402D0 -_0223CDBC: .word 0x00200010 - thumb_func_end ov83_0223CD64 - - thumb_func_start ov83_0223CDC0 -ov83_0223CDC0: ; 0x0223CDC0 - push {r3, lr} - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - pop {r3, pc} - thumb_func_end ov83_0223CDC0 - - thumb_func_start ov83_0223CDD0 -ov83_0223CDD0: ; 0x0223CDD0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - str r0, [sp, #0x18] - ldr r0, _0223CE78 ; =0x02240388 - str r1, [sp, #0x1c] - str r0, [sp, #0x24] - mov r0, #0xc - str r0, [sp, #0x2c] - mov r1, #0x5a - ldr r0, [sp, #0x18] - lsl r1, r1, #2 - add r0, r0, r1 - str r0, [sp, #0x20] - ldr r0, [sp, #0x18] - mov r4, #0 - str r0, [sp, #0x28] - add r0, #0x2c - mov r7, #0xd - mov r5, #0xe - str r0, [sp, #0x28] -_0223CDF8: - cmp r4, #0 - ble _0223CE2E - ldr r0, [sp, #0x24] - ldrb r0, [r0] - cmp r0, #8 - bne _0223CE2E - str r5, [sp] - ldr r0, [sp, #0x2c] - str r7, [sp, #4] - str r0, [sp, #8] - mov r0, #0x7d - lsl r0, r0, #4 - add r0, r4, r0 - str r0, [sp, #0xc] - ldr r0, [sp, #0x18] - mov r3, #0x5b - ldr r0, [r0, #0] - ldr r6, [sp, #0x18] - str r0, [sp, #0x10] - lsl r3, r3, #2 - ldr r0, [sp, #0x28] - ldr r1, [sp, #0x20] - ldr r2, [sp, #0x1c] - ldr r3, [r6, r3] - bl ov83_0223D894 - b _0223CE56 -_0223CE2E: - mov r0, #2 - str r0, [sp] - str r5, [sp, #4] - ldr r0, [sp, #0x2c] - str r7, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0x7d - lsl r0, r0, #4 - add r0, r4, r0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x24] - ldr r0, [r0, #0] - ldr r1, [sp, #0x20] - str r0, [sp, #0x14] - ldrb r3, [r3] - ldr r0, [sp, #0x28] - ldr r2, [sp, #0x1c] - bl ov83_0223D7A8 -_0223CE56: - ldr r0, [sp, #0x24] - add r4, r4, #1 - add r0, r0, #1 - str r0, [sp, #0x24] - ldr r0, [sp, #0x2c] - add r7, r7, #3 - add r0, r0, #3 - str r0, [sp, #0x2c] - ldr r0, [sp, #0x20] - add r5, r5, #3 - add r0, #0x38 - str r0, [sp, #0x20] - cmp r4, #6 - blt _0223CDF8 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CE78: .word 0x02240388 - thumb_func_end ov83_0223CDD0 - - thumb_func_start ov83_0223CE7C -ov83_0223CE7C: ; 0x0223CE7C - push {r4, r5, r6, lr} - mov r1, #0x5a - lsl r1, r1, #2 - add r6, r0, #0 - mov r4, #0 - add r5, r0, r1 - add r6, #0x2c -_0223CE8A: - add r0, r6, #0 - add r1, r5, #0 - bl ov83_0223D95C - add r4, r4, #1 - add r5, #0x38 - cmp r4, #6 - blt _0223CE8A - pop {r4, r5, r6, pc} - thumb_func_end ov83_0223CE7C - - thumb_func_start ov83_0223CE9C -ov83_0223CE9C: ; 0x0223CE9C - push {r3, r4, lr} - sub sp, #4 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _0223CF08 ; =0x04000060 - ldr r2, _0223CF0C ; =0xFFFFCFFD - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - ldrh r3, [r0] - add r1, r2, #2 - and r3, r1 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r1, [r0] - ldr r3, _0223CF10 ; =0x0000CFFB - and r1, r3 - strh r1, [r0] - add r1, r2, #2 - ldrh r4, [r0] - sub r3, #0x1c - lsr r2, r2, #0x11 - and r4, r1 - mov r1, #8 - orr r1, r4 - strh r1, [r0] - ldrh r1, [r0] - and r1, r3 - strh r1, [r0] - mov r1, #0 - ldr r0, _0223CF14 ; =0x000043FF - mov r3, #0x3f - str r1, [sp] - bl sub_020BFD58 - ldr r2, _0223CF18 ; =0x04000540 - mov r0, #2 - ldr r1, _0223CF1C ; =0xBFFF0000 - str r0, [r2, #0] - str r1, [r2, #0x40] - mov r1, #1 - bl sub_020A5A94 - mov r0, #2 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - add sp, #4 - pop {r3, r4, pc} - nop -_0223CF08: .word 0x04000060 -_0223CF0C: .word 0xFFFFCFFD -_0223CF10: .word 0x0000CFFB -_0223CF14: .word 0x000043FF -_0223CF18: .word 0x04000540 -_0223CF1C: .word 0xBFFF0000 - thumb_func_end ov83_0223CE9C - - thumb_func_start ov83_0223CF20 -ov83_0223CF20: ; 0x0223CF20 - push {r3, lr} - bl sub_020A5B1C - bl sub_020A5F50 - pop {r3, pc} - thumb_func_end ov83_0223CF20 - - thumb_func_start ov83_0223CF2C -ov83_0223CF2C: ; 0x0223CF2C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r2, #0x1d - ldr r3, [r5, #0] - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #4 - bl sub_0200B144 - ldr r1, _0223D030 ; =0x0000157C - str r0, [r5, r1] - ldr r2, [r5, #0] - mov r0, #4 - mov r1, #0x40 - bl sub_0200B368 - mov r1, #0x56 - lsl r1, r1, #6 - str r0, [r5, r1] - ldr r1, [r5, #0] - mov r0, #0x40 - bl sub_02023790 - ldr r1, _0223D034 ; =0x00001584 - str r0, [r5, r1] - sub r1, #8 - ldr r0, [r5, r1] - mov r1, #0 - bl sub_0200B1EC - ldr r1, _0223D038 ; =0x00001588 - str r0, [r5, r1] - sub r1, #0xc - ldr r0, [r5, r1] - mov r1, #1 - bl sub_0200B1EC - ldr r1, _0223D03C ; =0x0000158C - str r0, [r5, r1] - sub r1, #0x10 - ldr r0, [r5, r1] - mov r1, #2 - bl sub_0200B1EC - ldr r1, _0223D040 ; =0x00001590 - str r0, [r5, r1] - sub r1, #0x14 - ldr r0, [r5, r1] - mov r1, #0x14 - bl sub_0200B1EC - ldr r1, _0223D044 ; =0x00001594 - str r0, [r5, r1] - sub r1, #0x18 - ldr r0, [r5, r1] - mov r1, #0x15 - bl sub_0200B1EC - ldr r1, _0223D048 ; =0x00001598 - str r0, [r5, r1] - sub r1, #0x1c - ldr r0, [r5, r1] - mov r1, #0x16 - bl sub_0200B1EC - ldr r1, _0223D04C ; =0x0000159C - str r0, [r5, r1] - sub r1, #0x20 - ldr r0, [r5, r1] - mov r1, #0x17 - bl sub_0200B1EC - ldr r1, _0223D050 ; =0x000015A0 - str r0, [r5, r1] - sub r1, #0x24 - ldr r0, [r5, r1] - mov r1, #0x18 - bl sub_0200B1EC - ldr r1, _0223D054 ; =0x000015A4 - str r0, [r5, r1] - sub r1, #0x28 - ldr r0, [r5, r1] - mov r1, #0x19 - bl sub_0200B1EC - ldr r1, _0223D058 ; =0x000015A8 - str r0, [r5, r1] - sub r1, #0x2c - ldr r0, [r5, r1] - mov r1, #8 - bl sub_0200B1EC - ldr r1, _0223D05C ; =0x000015AC - str r0, [r5, r1] - sub r1, #0x30 - ldr r0, [r5, r1] - mov r1, #9 - bl sub_0200B1EC - ldr r1, _0223D060 ; =0x000015B0 - mov r4, #0 - str r0, [r5, r1] - add r6, r5, #0 - add r7, r1, #4 -_0223CFFE: - ldr r0, _0223D030 ; =0x0000157C - add r1, r4, #3 - ldr r0, [r5, r0] - bl sub_0200B1EC - str r0, [r6, r7] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #5 - blt _0223CFFE - ldr r7, _0223D064 ; =0x000015C8 - mov r4, #0 - add r6, r5, #0 -_0223D018: - ldr r0, _0223D030 ; =0x0000157C - add r1, r4, #0 - ldr r0, [r5, r0] - add r1, #0xa - bl sub_0200B1EC - str r0, [r6, r7] - add r4, r4, #1 - add r6, r6, #4 - cmp r4, #0xa - blt _0223D018 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D030: .word 0x0000157C -_0223D034: .word 0x00001584 -_0223D038: .word 0x00001588 -_0223D03C: .word 0x0000158C -_0223D040: .word 0x00001590 -_0223D044: .word 0x00001594 -_0223D048: .word 0x00001598 -_0223D04C: .word 0x0000159C -_0223D050: .word 0x000015A0 -_0223D054: .word 0x000015A4 -_0223D058: .word 0x000015A8 -_0223D05C: .word 0x000015AC -_0223D060: .word 0x000015B0 -_0223D064: .word 0x000015C8 - thumb_func_end ov83_0223CF2C - - thumb_func_start ov83_0223D068 -ov83_0223D068: ; 0x0223D068 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - ldr r0, _0223D108 ; =0x000015B0 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D10C ; =0x000015AC - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D110 ; =0x0000159C - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D114 ; =0x00001598 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D118 ; =0x00001594 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D11C ; =0x00001590 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D120 ; =0x0000158C - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D124 ; =0x00001588 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D128 ; =0x000015A0 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D12C ; =0x000015A4 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r0, _0223D130 ; =0x000015A8 - ldr r0, [r6, r0] - bl sub_020237BC - ldr r7, _0223D134 ; =0x000015B4 - mov r4, #0 - add r5, r6, #0 -_0223D0CA: - ldr r0, [r5, r7] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #5 - blt _0223D0CA - ldr r7, _0223D138 ; =0x000015C8 - mov r5, #0 - add r4, r6, #0 -_0223D0DE: - ldr r0, [r4, r7] - bl sub_020237BC - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #0xa - blt _0223D0DE - ldr r0, _0223D13C ; =0x00001584 - ldr r0, [r6, r0] - bl sub_020237BC - mov r0, #0x56 - lsl r0, r0, #6 - ldr r0, [r6, r0] - bl sub_0200B3F0 - ldr r0, _0223D140 ; =0x0000157C - ldr r0, [r6, r0] - bl sub_0200B190 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D108: .word 0x000015B0 -_0223D10C: .word 0x000015AC -_0223D110: .word 0x0000159C -_0223D114: .word 0x00001598 -_0223D118: .word 0x00001594 -_0223D11C: .word 0x00001590 -_0223D120: .word 0x0000158C -_0223D124: .word 0x00001588 -_0223D128: .word 0x000015A0 -_0223D12C: .word 0x000015A4 -_0223D130: .word 0x000015A8 -_0223D134: .word 0x000015B4 -_0223D138: .word 0x000015C8 -_0223D13C: .word 0x00001584 -_0223D140: .word 0x0000157C - thumb_func_end ov83_0223D068 - - thumb_func_start ov83_0223D144 -ov83_0223D144: ; 0x0223D144 - ldr r0, _0223D148 ; =0x02240390 - bx lr - ; .align 2, 0 -_0223D148: .word 0x02240390 - thumb_func_end ov83_0223D144 - - thumb_func_start ov83_0223D14C -ov83_0223D14C: ; 0x0223D14C - mov r0, #0xb - bx lr - thumb_func_end ov83_0223D14C - - thumb_func_start ov83_0223D150 -ov83_0223D150: ; 0x0223D150 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, _0223D1D8 ; =0x0000142C - add r4, r1, #0 - ldr r1, [r7, r0] - cmp r1, #1 - bne _0223D168 - bl sub_02035E18 - ldr r1, _0223D1DC ; =0x00001424 - str r0, [r7, r1] - b _0223D16E -_0223D168: - mov r1, #1 - sub r0, #8 - str r1, [r7, r0] -_0223D16E: - bl ov83_0223D144 - add r5, r0, #0 - bl ov83_0223D14C - add r1, r0, #0 - ldr r0, [r7, #0] - ldr r3, _0223D1D8 ; =0x0000142C - str r0, [sp] - ldr r3, [r7, r3] - add r0, r5, #0 - add r2, r7, #0 - bl ov83_0223D4CC - ldr r1, _0223D1E0 ; =0x00001428 - str r0, [r7, r1] - ldr r0, _0223D1E4 ; =0x00001560 - mov r1, #4 - add r0, r7, r0 - add r2, r1, #0 - bl sub_020D5124 - ldr r0, _0223D1D8 ; =0x0000142C - ldr r0, [r7, r0] - cmp r0, #1 - bne _0223D1CC - mov r6, #0 - add r4, r6, #0 - add r5, r7, #0 -_0223D1A8: - add r0, r4, #0 - bl sub_02032EE8 - ldr r1, _0223D1E8 ; =0x00001564 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0223D1C2 - ldr r0, _0223D1E4 ; =0x00001560 - add r1, r7, r6 - strb r4, [r1, r0] - add r6, r6, #1 -_0223D1C2: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223D1A8 - pop {r3, r4, r5, r6, r7, pc} -_0223D1CC: - ldr r0, _0223D1E4 ; =0x00001560 - mov r1, #0 - strb r1, [r7, r0] - add r0, r0, #4 - str r4, [r7, r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D1D8: .word 0x0000142C -_0223D1DC: .word 0x00001424 -_0223D1E0: .word 0x00001428 -_0223D1E4: .word 0x00001560 -_0223D1E8: .word 0x00001564 - thumb_func_end ov83_0223D150 - - thumb_func_start ov83_0223D1EC -ov83_0223D1EC: ; 0x0223D1EC - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223D200 ; =0x00001428 - ldr r0, [r4, r0] - bl ov83_0223D558 - ldr r0, _0223D200 ; =0x00001428 - mov r1, #0 - str r1, [r4, r0] - pop {r4, pc} - ; .align 2, 0 -_0223D200: .word 0x00001428 - thumb_func_end ov83_0223D1EC - - thumb_func_start ov83_0223D204 -ov83_0223D204: ; 0x0223D204 - add r0, r3, #0 - ldr r3, _0223D20C ; =ov83_0223B774 - mov r1, #3 - bx r3 - ; .align 2, 0 -_0223D20C: .word ov83_0223B774 - thumb_func_end ov83_0223D204 - - thumb_func_start ov83_0223D210 -ov83_0223D210: ; 0x0223D210 - add r0, r3, #0 - ldr r3, _0223D218 ; =ov83_0223B77C - mov r1, #8 - bx r3 - ; .align 2, 0 -_0223D218: .word ov83_0223B77C - thumb_func_end ov83_0223D210 - - thumb_func_start ov83_0223D21C -ov83_0223D21C: ; 0x0223D21C - push {r3, r4, r5, lr} - ldr r0, _0223D250 ; =0x0000149C - add r5, r1, #0 - add r4, r3, #0 - add r1, r2, #0 - add r0, r4, r0 - add r2, r5, #0 - bl sub_020D50B8 - ldr r0, _0223D254 ; =0x000014AC - mov r1, #0xa - add r3, r4, r0 - add r0, #0x1c - add r2, r4, r0 -_0223D238: - ldrh r0, [r3] - add r3, r3, #2 - strh r0, [r2] - add r2, r2, #2 - sub r1, r1, #1 - bne _0223D238 - add r0, r4, #0 - mov r1, #5 - bl ov83_0223B774 - pop {r3, r4, r5, pc} - nop -_0223D250: .word 0x0000149C -_0223D254: .word 0x000014AC - thumb_func_end ov83_0223D21C - - thumb_func_start ov83_0223D258 -ov83_0223D258: ; 0x0223D258 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r6, r0, #0 - ldr r0, _0223D2D4 ; =0x00001428 - add r5, r3, #0 - ldr r0, [r5, r0] - str r1, [sp] - str r2, [sp, #4] - bl ov83_0223D570 - cmp r0, #0 - bne _0223D2D0 - ldr r0, _0223D2D8 ; =0x00001544 - lsl r4, r6, #2 - add r7, r5, r0 - ldr r1, [sp, #4] - ldr r2, [sp] - add r0, r7, r4 - bl sub_020D50B8 - ldr r0, _0223D2DC ; =0x00001554 - mov r2, #1 - add r1, r5, r6 - strb r2, [r1, r0] - ldr r1, [r7, r4] - add r2, r5, r4 - sub r0, #0xf0 - str r1, [r2, r0] - mov r0, #0 - ldr r1, _0223D2DC ; =0x00001554 - add r3, r0, #0 -_0223D296: - add r2, r5, r3 - ldrb r2, [r2, r1] - cmp r2, #1 - bne _0223D2A0 - add r0, r0, #1 -_0223D2A0: - add r3, r3, #1 - cmp r3, #4 - blt _0223D296 - ldr r1, _0223D2E0 ; =0x00001424 - ldr r2, [r5, r1] - cmp r0, r2 - blt _0223D2D0 - mov r0, #0xba - lsl r0, r0, #2 - add r1, #0x50 - add r0, r5, r0 - add r1, r5, r1 - bl ov83_0223FF44 - bl ov83_0223D4B4 - ldr r3, _0223D2E4 ; =0x00001464 - add r2, r0, #0 - add r1, r5, r3 - sub r3, #0x3c - ldr r3, [r5, r3] - mov r0, #0x18 - bl ov83_0223D508 -_0223D2D0: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D2D4: .word 0x00001428 -_0223D2D8: .word 0x00001544 -_0223D2DC: .word 0x00001554 -_0223D2E0: .word 0x00001424 -_0223D2E4: .word 0x00001464 - thumb_func_end ov83_0223D258 - - thumb_func_start ov83_0223D2E8 -ov83_0223D2E8: ; 0x0223D2E8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r3, #0 - mov ip, r2 - ldr r3, _0223D348 ; =0x000014D6 - mov r2, #0x1c - add r5, r0, #0 - mul r5, r2 - add r2, r4, r3 - str r2, [sp, #4] - str r1, [sp] - mov r1, ip - ldrb r2, [r2, r5] - add r1, #8 - cmp r2, #1 - bne _0223D31C - ldrb r1, [r1, #0xe] - cmp r1, #0 - bne _0223D31C - cmp r0, #0 - bne _0223D31C - add r1, r4, r5 - sub r0, r3, #2 - mov r6, #1 - ldrb r7, [r1, r0] - b _0223D31E -_0223D31C: - mov r6, #0 -_0223D31E: - mov r0, #0x53 - lsl r0, r0, #6 - add r0, r4, r0 - ldr r2, [sp] - add r0, r0, r5 - mov r1, ip - bl sub_020D50B8 - cmp r6, #1 - bne _0223D33C - ldr r0, [sp, #4] - add r1, r4, r5 - strb r6, [r0, r5] - ldr r0, _0223D34C ; =0x000014D4 - strb r7, [r1, r0] -_0223D33C: - ldr r0, _0223D350 ; =0x00001602 - ldrh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D348: .word 0x000014D6 -_0223D34C: .word 0x000014D4 -_0223D350: .word 0x00001602 - thumb_func_end ov83_0223D2E8 - - thumb_func_start ov83_0223D354 -ov83_0223D354: ; 0x0223D354 - push {r3, r4, r5, r6, r7, lr} - add r4, r0, #0 - mov ip, r1 - add r1, r2, #0 - mov r2, #0x1c - ldr r0, _0223D39C ; =0x000014D6 - add r5, r3, #0 - mul r4, r2 - add r7, r5, r0 - ldrb r2, [r7, r4] - cmp r2, #1 - bne _0223D37E - ldrb r2, [r1, #0xe] - cmp r2, #0 - bne _0223D37E - add r2, r5, r4 - sub r0, r0, #2 - ldrb r0, [r2, r0] - mov r6, #1 - str r0, [sp] - b _0223D380 -_0223D37E: - mov r6, #0 -_0223D380: - ldr r0, _0223D3A0 ; =0x000014C8 - mov r2, ip - add r0, r5, r0 - add r0, r0, r4 - bl sub_020D50B8 - cmp r6, #1 - bne _0223D39A - strb r6, [r7, r4] - ldr r1, _0223D3A4 ; =0x000014D4 - ldr r0, [sp] - add r2, r5, r4 - strb r0, [r2, r1] -_0223D39A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D39C: .word 0x000014D6 -_0223D3A0: .word 0x000014C8 -_0223D3A4: .word 0x000014D4 - thumb_func_end ov83_0223D354 - - thumb_func_start ov83_0223D3A8 -ov83_0223D3A8: ; 0x0223D3A8 - push {r4, r5, r6, lr} - add r4, r0, #0 - mov r0, #0x53 - add r5, r3, #0 - lsl r0, r0, #6 - add r6, r1, #0 - add r1, r5, r0 - mov r0, #0x1c - mul r0, r4 - add r0, r1, r0 - add r1, r2, #0 - add r2, r6, #0 - bl sub_020D50B8 - ldr r0, _0223D3D4 ; =0x000015F8 - lsl r1, r4, #1 - add r2, r5, r0 - ldrh r0, [r2, r1] - add r0, r0, #1 - strh r0, [r2, r1] - pop {r4, r5, r6, pc} - nop -_0223D3D4: .word 0x000015F8 - thumb_func_end ov83_0223D3A8 - - thumb_func_start ov83_0223D3D8 -ov83_0223D3D8: ; 0x0223D3D8 - push {r3, r4, r5, lr} - ldr r0, _0223D3F4 ; =0x00001488 - add r5, r1, #0 - add r4, r3, #0 - add r1, r2, #0 - add r0, r4, r0 - add r2, r5, #0 - bl sub_020D50B8 - add r0, r4, #0 - mov r1, #0xa - bl ov83_0223B774 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D3F4: .word 0x00001488 - thumb_func_end ov83_0223D3D8 - - thumb_func_start ov83_0223D3F8 -ov83_0223D3F8: ; 0x0223D3F8 - push {r4, lr} - ldr r0, _0223D40C ; =0x00001530 - add r4, r1, #0 - ldr r0, [r3, r0] - add r1, r2, #0 - add r2, r4, #0 - bl sub_020D50B8 - pop {r4, pc} - nop -_0223D40C: .word 0x00001530 - thumb_func_end ov83_0223D3F8 - - thumb_func_start ov83_0223D410 -ov83_0223D410: ; 0x0223D410 - push {r3, r4, r5, lr} - ldr r0, _0223D42C ; =0x00001575 - add r5, r1, #0 - add r4, r3, #0 - add r1, r2, #0 - add r0, r4, r0 - add r2, r5, #0 - bl sub_020D50B8 - add r0, r4, #0 - mov r1, #0xc - bl ov83_0223B774 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D42C: .word 0x00001575 - thumb_func_end ov83_0223D410 - - thumb_func_start ov83_0223D430 -ov83_0223D430: ; 0x0223D430 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, _0223D49C ; =0x00001428 - add r4, r3, #0 - ldr r0, [r4, r0] - add r6, r1, #0 - add r7, r2, #0 - bl ov83_0223D570 - cmp r0, #0 - bne _0223D49A - ldr r0, _0223D4A0 ; =0x00001558 - add r1, r7, #0 - add r0, r4, r0 - add r0, r0, r5 - add r2, r6, #0 - bl sub_020D50B8 - ldr r0, _0223D4A4 ; =0x0000155C - add r1, r4, r5 - mov r2, #1 - strb r2, [r1, r0] - add r6, sp, #0 - mov r3, #0 - strb r2, [r6] - add r2, r3, #0 - sub r7, r0, #4 - add r5, r0, #0 -_0223D468: - add r1, r4, r2 - ldrb r0, [r1, r5] - cmp r0, #1 - bne _0223D47A - ldrb r0, [r6] - ldrb r1, [r1, r7] - add r3, r3, #1 - and r0, r1 - strb r0, [r6] -_0223D47A: - add r2, r2, #1 - cmp r2, #4 - blt _0223D468 - ldr r0, _0223D4A8 ; =0x00001424 - ldr r0, [r4, r0] - cmp r3, r0 - blt _0223D49A - bl ov83_0223D4B0 - ldr r3, _0223D49C ; =0x00001428 - add r2, r0, #0 - ldr r3, [r4, r3] - mov r0, #0x1d - add r1, sp, #0 - bl ov83_0223D508 -_0223D49A: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D49C: .word 0x00001428 -_0223D4A0: .word 0x00001558 -_0223D4A4: .word 0x0000155C -_0223D4A8: .word 0x00001424 - thumb_func_end ov83_0223D430 - - thumb_func_start ov83_0223D4AC -ov83_0223D4AC: ; 0x0223D4AC - mov r0, #0 - bx lr - thumb_func_end ov83_0223D4AC - - thumb_func_start ov83_0223D4B0 -ov83_0223D4B0: ; 0x0223D4B0 - mov r0, #1 - bx lr - thumb_func_end ov83_0223D4B0 - - thumb_func_start ov83_0223D4B4 -ov83_0223D4B4: ; 0x0223D4B4 - mov r0, #0x24 - bx lr - thumb_func_end ov83_0223D4B4 - - thumb_func_start ov83_0223D4B8 -ov83_0223D4B8: ; 0x0223D4B8 - mov r0, #4 - bx lr - thumb_func_end ov83_0223D4B8 - - thumb_func_start ov83_0223D4BC -ov83_0223D4BC: ; 0x0223D4BC - mov r0, #0x1c - bx lr - thumb_func_end ov83_0223D4BC - - thumb_func_start ov83_0223D4C0 -ov83_0223D4C0: ; 0x0223D4C0 - mov r0, #0x14 - bx lr - thumb_func_end ov83_0223D4C0 - - thumb_func_start ov83_0223D4C4 -ov83_0223D4C4: ; 0x0223D4C4 - mov r0, #0x14 - bx lr - thumb_func_end ov83_0223D4C4 - - thumb_func_start ov83_0223D4C8 -ov83_0223D4C8: ; 0x0223D4C8 - mov r0, #8 - bx lr - thumb_func_end ov83_0223D4C8 - - thumb_func_start ov83_0223D4CC -ov83_0223D4CC: ; 0x0223D4CC - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - add r7, r1, #0 - ldr r0, [sp, #0x18] - mov r1, #8 - str r2, [sp] - add r5, r3, #0 - bl sub_02018144 - add r4, r0, #0 - mov r0, #0 - str r5, [r4, #0] - str r0, [r4, #4] - cmp r5, #1 - bne _0223D4F6 - ldr r2, [sp] - add r0, r6, #0 - add r1, r7, #0 - bl sub_02032798 - b _0223D504 -_0223D4F6: - ldr r2, [sp] - ldr r3, [sp, #0x18] - add r0, r6, #0 - add r1, r7, #0 - bl ov83_0223D584 - str r0, [r4, #4] -_0223D504: - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223D4CC - - thumb_func_start ov83_0223D508 -ov83_0223D508: ; 0x0223D508 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r3, #0] - add r6, r1, #0 - add r7, r2, #0 - cmp r0, #1 - bne _0223D54A - bl sub_0203895C - cmp r0, #0x1d - bne _0223D53E - add r0, r5, #0 - mov r4, #1 - bl sub_0203626C - cmp r0, #0 - beq _0223D52C - mov r4, #0 -_0223D52C: - bl ov4_021D1404 - cmp r0, #0 - bne _0223D536 - mov r4, #0 -_0223D536: - cmp r4, #0 - bne _0223D53E - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_0223D53E: - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl sub_020359DC - pop {r3, r4, r5, r6, r7, pc} -_0223D54A: - ldr r0, [r3, #4] - add r1, r5, #0 - add r2, r6, #0 - add r3, r7, #0 - bl ov83_0223D638 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223D508 - - thumb_func_start ov83_0223D558 -ov83_0223D558: ; 0x0223D558 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - bne _0223D568 - ldr r0, [r4, #4] - bl ov83_0223D620 -_0223D568: - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - thumb_func_end ov83_0223D558 - - thumb_func_start ov83_0223D570 -ov83_0223D570: ; 0x0223D570 - push {r3, lr} - ldr r0, [r0, #0] - cmp r0, #1 - bne _0223D57E - bl sub_0203608C - pop {r3, pc} -_0223D57E: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D570 - - thumb_func_start ov83_0223D584 -ov83_0223D584: ; 0x0223D584 - push {r3, r4, r5, r6, r7, lr} - add r6, r1, #0 - mov r1, #0x1b - add r5, r0, #0 - add r0, r3, #0 - lsl r1, r1, #4 - add r7, r2, #0 - bl sub_02018144 - mov r2, #0x1b - mov r1, #0 - lsl r2, r2, #4 - add r4, r0, #0 - bl sub_020D5124 - mov r1, #0x1a - lsl r1, r1, #4 - str r5, [r4, r1] - add r0, r1, #4 - str r6, [r4, r0] - add r1, #8 - str r7, [r4, r1] - ldr r0, _0223D5C4 ; =ov83_0223D5CC - ldr r2, _0223D5C8 ; =0x00001388 - add r1, r4, #0 - bl sub_0200DA3C - mov r1, #0x6b - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D5C4: .word ov83_0223D5CC -_0223D5C8: .word 0x00001388 - thumb_func_end ov83_0223D584 - - thumb_func_start ov83_0223D5CC -ov83_0223D5CC: ; 0x0223D5CC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r7, r1, #0 - mov r0, #0 - str r0, [sp] - add r6, r7, #0 -_0223D5D8: - ldr r0, [r6, #0] - cmp r0, #1 - bne _0223D60E - mov r4, #0x1a - lsl r4, r4, #4 - ldr r4, [r7, r4] - mov r3, #0x6a - mov ip, r4 - ldr r4, [r6, #4] - mov r5, #0xc - mul r5, r4 - str r5, [sp, #4] - lsl r3, r3, #2 - add r2, r6, #0 - ldr r4, [sp, #4] - mov r5, ip - ldr r1, [r6, #0x30] - ldr r3, [r7, r3] - ldr r4, [r5, r4] - mov r0, #0 - add r2, #8 - blx r4 - add r0, r6, #0 - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 -_0223D60E: - ldr r0, [sp] - add r6, #0x34 - add r0, r0, #1 - str r0, [sp] - cmp r0, #8 - blt _0223D5D8 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D5CC - - thumb_func_start ov83_0223D620 -ov83_0223D620: ; 0x0223D620 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x6b - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200DA58 - add r0, r4, #0 - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D620 - - thumb_func_start ov83_0223D638 -ov83_0223D638: ; 0x0223D638 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - mov r4, #0 - str r2, [sp] - add r7, r1, #0 - add r5, r3, #0 - add r0, r4, #0 - add r2, r6, #0 -_0223D648: - ldr r1, [r2, #0] - cmp r1, #0 - bne _0223D656 - mov r1, #0x34 - mul r1, r0 - add r4, r6, r1 - b _0223D65E -_0223D656: - add r0, r0, #1 - add r2, #0x34 - cmp r0, #8 - blt _0223D648 -_0223D65E: - cmp r4, #0 - bne _0223D666 - bl sub_02022974 -_0223D666: - mov r0, #0x1a - lsl r0, r0, #4 - add r1, r7, #0 - ldr r2, [r6, r0] - sub r1, #0x16 - mov r0, #0xc - mul r0, r1 - add r0, r2, r0 - ldr r0, [r0, #4] - blx r0 - cmp r0, r5 - beq _0223D682 - bl sub_02022974 -_0223D682: - cmp r5, #0x26 - blt _0223D68A - bl sub_02022974 -_0223D68A: - sub r7, #0x16 - str r7, [r4, #4] - cmp r5, #0 - ble _0223D69E - add r0, r4, #0 - ldr r1, [sp] - add r0, #8 - add r2, r5, #0 - bl sub_020D50B8 -_0223D69E: - str r5, [r4, #0x30] - mov r0, #1 - str r0, [r4, #0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D638 - - thumb_func_start ov83_0223D6A8 -ov83_0223D6A8: ; 0x0223D6A8 - push {r4, lr} - add r4, r0, #0 - add r0, r2, #0 - mov r2, #0 - bl sub_02002D7C - lsr r0, r0, #1 - sub r0, r4, r0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D6A8 - - thumb_func_start ov83_0223D6BC -ov83_0223D6BC: ; 0x0223D6BC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - str r2, [sp] - add r0, r3, #0 - mov r2, #0 - add r3, sp, #4 - bl sub_020071B4 - add r4, r0, #0 - ldr r0, [sp, #4] - str r5, [sp, #8] - str r0, [sp, #0xc] - add r0, sp, #8 - bl sub_02015128 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D6BC - - thumb_func_start ov83_0223D6EC -ov83_0223D6EC: ; 0x0223D6EC - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r2, #0 - add r5, r0, #0 - add r0, r3, #0 - add r2, sp, #0 - add r3, r4, #0 - bl sub_020071EC - add r4, r0, #0 - ldr r0, [sp] - str r5, [sp, #4] - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - add r0, sp, #4 - bl sub_020151A4 - add r5, r0, #0 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D6EC - - thumb_func_start ov83_0223D720 -ov83_0223D720: ; 0x0223D720 - push {r4, lr} - sub sp, #0x20 - str r0, [sp] - str r1, [sp, #4] - str r2, [sp, #8] - add r0, sp, #0 - ldr r1, [sp, #0x28] - strh r3, [r0, #0xc] - strh r1, [r0, #0xe] - mov r2, #0 - strh r2, [r0, #0x10] - mov r1, #0x1f - str r1, [sp, #0x14] - ldr r1, [sp, #0x2c] - str r1, [sp, #0x18] - strh r2, [r0, #0x1c] - add r0, sp, #0 - bl sub_02015214 - mov r1, #0 - add r4, r0, #0 - bl sub_02015240 - add r0, r4, #0 - add sp, #0x20 - pop {r4, pc} - thumb_func_end ov83_0223D720 - - thumb_func_start ov83_0223D754 -ov83_0223D754: ; 0x0223D754 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r0, r1, #0 - add r6, r3, #0 - add r7, r2, #0 - add r1, r5, #4 - add r2, r6, #0 - bl sub_020095C4 - str r0, [r5, #0] - mov r4, #0 -_0223D76A: - add r0, r7, #0 - add r1, r4, #0 - add r2, r6, #0 - bl sub_02009714 - mov r1, #0x4b - lsl r1, r1, #2 - str r0, [r5, r1] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223D76A - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223D754 - - thumb_func_start ov83_0223D784 -ov83_0223D784: ; 0x0223D784 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl sub_02021964 - mov r4, #0 - mov r6, #0x4b - str r4, [r5, #0] - lsl r6, r6, #2 -_0223D796: - ldr r0, [r5, r6] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223D796 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D784 - - thumb_func_start ov83_0223D7A8 -ov83_0223D7A8: ; 0x0223D7A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - ldr r6, [sp, #0x58] - add r5, r0, #0 - ldr r7, [sp, #0x5c] - str r6, [sp] - mov r0, #1 - str r0, [sp, #4] - str r7, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - add r4, r1, #0 - str r3, [sp, #0x30] - str r2, [sp, #0x2c] - add r1, r2, #0 - ldr r0, [r5, r0] - ldr r2, [sp, #0x4c] - mov r3, #0 - bl sub_02009AA8 - str r0, [r4, #0] - str r6, [sp] - mov r1, #1 - ldr r0, [sp, #0x48] - str r1, [sp, #4] - str r0, [sp, #8] - str r7, [sp, #0xc] - mov r0, #0x13 - str r1, [sp, #0x10] - lsl r0, r0, #4 - ldr r0, [r5, r0] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x30] - mov r3, #0 - bl sub_02009B64 - str r0, [r4, #4] - mov r3, #0 - str r3, [r4, #0x10] - str r6, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4d - str r7, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x50] - bl sub_02009BC4 - str r0, [r4, #8] - str r6, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4e - str r7, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x54] - mov r3, #0 - bl sub_02009BC4 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl sub_0200A450 - cmp r0, #0 - bne _0223D838 - bl sub_02022974 -_0223D838: - ldr r0, [r4, #0] - bl sub_02009D4C - ldr r0, [r4, #4] - bl sub_0200A640 - cmp r0, #0 - bne _0223D84C - bl sub_02022974 -_0223D84C: - ldr r0, [r4, #4] - bl sub_02009D4C - mov r0, #0 - mov r2, #0x4b - str r6, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r4, #0x14 - str r1, [sp, #0x14] - add r1, r2, #4 - ldr r1, [r5, r1] - add r3, r6, #0 - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r1, [r5, r1] - add r2, #0xc - str r1, [sp, #0x1c] - ldr r1, [r5, r2] - add r2, r6, #0 - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r4, #0 - add r1, r6, #0 - bl sub_020093B4 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - thumb_func_end ov83_0223D7A8 - - thumb_func_start ov83_0223D894 -ov83_0223D894: ; 0x0223D894 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - ldr r6, [sp, #0x5c] - add r5, r0, #0 - ldr r7, [sp, #0x60] - str r6, [sp] - mov r0, #1 - str r0, [sp, #4] - str r7, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0x4b - lsl r0, r0, #2 - add r4, r1, #0 - str r3, [sp, #0x30] - str r2, [sp, #0x2c] - add r1, r2, #0 - ldr r0, [r5, r0] - ldr r2, [sp, #0x50] - mov r3, #0 - bl sub_02009AA8 - str r0, [r4, #0] - ldr r0, [sp, #0x30] - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #0x10] - ldr r0, [sp, #0x30] - bl sub_02009E08 - str r0, [sp, #0x34] - str r6, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x4d - str r7, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x54] - mov r3, #0 - bl sub_02009BC4 - str r0, [r4, #8] - str r6, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x4e - str r7, [sp, #8] - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [sp, #0x2c] - ldr r2, [sp, #0x58] - mov r3, #0 - bl sub_02009BC4 - str r0, [r4, #0xc] - ldr r0, [r4, #0] - bl sub_0200A450 - cmp r0, #0 - bne _0223D912 - bl sub_02022974 -_0223D912: - ldr r0, [r4, #0] - bl sub_02009D4C - mov r0, #0 - mov r2, #0x4b - str r6, [sp] - mvn r0, r0 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - lsl r2, r2, #2 - ldr r1, [r5, r2] - add r4, #0x14 - str r1, [sp, #0x14] - add r1, r2, #4 - ldr r1, [r5, r1] - add r3, r6, #0 - str r1, [sp, #0x18] - add r1, r2, #0 - add r1, #8 - ldr r1, [r5, r1] - add r2, #0xc - str r1, [sp, #0x1c] - ldr r1, [r5, r2] - ldr r2, [sp, #0x34] - str r1, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r4, #0 - add r1, r6, #0 - bl sub_020093B4 - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D894 - - thumb_func_start ov83_0223D95C -ov83_0223D95C: ; 0x0223D95C - push {r3, r4, r5, r6, r7, lr} - add r7, r1, #0 - add r5, r0, #0 - ldr r0, [r7, #0] - bl sub_0200A4E4 - ldr r0, [r7, #0x10] - cmp r0, #0 - bne _0223D974 - ldr r0, [r7, #4] - bl sub_0200A6DC -_0223D974: - mov r6, #0 - add r4, r7, #0 -_0223D978: - cmp r6, #1 - beq _0223D98A - mov r0, #0x4b - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0] - bl sub_02009D68 - b _0223D99C -_0223D98A: - ldr r0, [r7, #0x10] - cmp r0, #0 - bne _0223D99C - mov r0, #0x4b - lsl r0, r0, #2 - ldr r0, [r5, r0] - ldr r1, [r4, #0] - bl sub_02009D68 -_0223D99C: - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #4 - blt _0223D978 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223D95C - - thumb_func_start ov83_0223D9A8 -ov83_0223D9A8: ; 0x0223D9A8 - push {r4, lr} - sub sp, #0x20 - ldr r0, [r0, #0] - add r1, #0x14 - str r0, [sp] - ldr r0, [sp, #0x28] - str r1, [sp, #4] - str r0, [sp, #0x10] - ldr r0, [sp, #0x2c] - str r2, [sp, #8] - str r0, [sp, #0x14] - mov r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x30] - str r3, [sp, #0xc] - str r0, [sp, #0x1c] - add r0, sp, #0 - bl sub_02021B90 - add r4, r0, #0 - bne _0223D9D6 - bl sub_02022974 -_0223D9D6: - add r0, r4, #0 - add sp, #0x20 - pop {r4, pc} - thumb_func_end ov83_0223D9A8 - - thumb_func_start ov83_0223D9DC -ov83_0223D9DC: ; 0x0223D9DC - str r1, [r0, #0] - str r1, [r0, #4] - sub r1, r2, r1 - str r1, [r0, #8] - str r3, [r0, #0x10] - mov r1, #0 - str r1, [r0, #0xc] - bx lr - thumb_func_end ov83_0223D9DC - - thumb_func_start ov83_0223D9EC -ov83_0223D9EC: ; 0x0223D9EC - push {r4, lr} - add r4, r0, #0 - ldr r2, [r4, #0xc] - ldr r0, [r4, #8] - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, [r4, #0x10] - lsl r1, r1, #0xc - bl sub_020BCFD0 - ldr r1, [r4, #4] - add r0, r0, r1 - str r0, [r4, #0] - ldr r0, [r4, #0xc] - ldr r1, [r4, #0x10] - add r0, r0, #1 - cmp r0, r1 - bgt _0223DA2C - str r0, [r4, #0xc] - mov r0, #0 - pop {r4, pc} -_0223DA2C: - str r1, [r4, #0xc] - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223D9EC - - thumb_func_start ov83_0223DA34 -ov83_0223DA34: ; 0x0223DA34 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r5, r0, #0 - add r7, r2, #0 - add r0, r3, #0 - add r6, r1, #0 - lsl r2, r4, #0xc - str r3, [sp] - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - sub r0, r7, r6 - mov r7, #2 - mov r3, #0 - lsl r7, r7, #0xa - add r2, r2, r7 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r2, r2, #0xc - orr r2, r1 - sub r2, r0, r2 - asr r1, r2, #0x1f - lsr r0, r2, #0x13 - lsl r1, r1, #0xd - orr r1, r0 - lsl r0, r2, #0xd - add r0, r0, r7 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - add r1, r4, #0 - mul r1, r4 - lsl r1, r1, #0xc - bl sub_020BCFD0 - str r6, [r5, #0] - ldr r1, [sp] - str r6, [r5, #4] - str r1, [r5, #8] - str r0, [r5, #0xc] - mov r0, #0 - str r0, [r5, #0x10] - str r4, [r5, #0x14] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223DA34 - - thumb_func_start ov83_0223DA94 -ov83_0223DA94: ; 0x0223DA94 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r6, [r5, #0x10] - ldr r0, [r5, #8] - lsl r2, r6, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsr r4, r2, #0xc - lsl r0, r1, #0x14 - add r2, r6, #0 - orr r4, r0 - ldr r0, [r5, #0xc] - mul r2, r6 - lsl r2, r2, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - lsl r1, r2, #2 - bl sub_020BCFD0 - ldr r1, [r5, #4] - add r0, r4, r0 - add r0, r1, r0 - str r0, [r5, #0] - ldr r0, [r5, #0x10] - ldr r1, [r5, #0x14] - add r0, r0, #1 - cmp r0, r1 - bgt _0223DAF4 - str r0, [r5, #0x10] - mov r0, #0 - pop {r4, r5, r6, pc} -_0223DAF4: - str r1, [r5, #0x10] - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223DA94 - - thumb_func_start ov83_0223DAFC -ov83_0223DAFC: ; 0x0223DAFC - push {r4} - sub sp, #0xc - str r2, [sp, #4] - str r3, [sp, #8] - add r2, sp, #0 - add r4, r0, #0 - str r1, [sp] - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - add sp, #0xc - pop {r4} - bx lr - thumb_func_end ov83_0223DAFC - - thumb_func_start ov83_0223DB18 -ov83_0223DB18: ; 0x0223DB18 - push {r3, r4, r5, lr} - mov r2, #0x1f - add r4, r1, #0 - mov r1, #0 - lsl r2, r2, #4 - add r5, r0, #0 - bl sub_020D5124 - mov r0, #0x42 - lsl r0, r0, #2 - str r4, [r5, r0] - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223DB18 - - thumb_func_start ov83_0223DB30 -ov83_0223DB30: ; 0x0223DB30 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223DB3E - bl sub_02022974 -_0223DB3E: - mov r2, #0x1f - add r0, r4, #0 - mov r1, #0 - lsl r2, r2, #4 - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov83_0223DB30 - - thumb_func_start ov83_0223DB4C -ov83_0223DB4C: ; 0x0223DB4C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r6, [sp, #0x48] - str r0, [sp, #0x18] - str r1, [sp, #0x1c] - mov r0, #0x35 - add r1, r6, #0 - add r7, r2, #0 - str r3, [sp, #0x20] - bl sub_02006C24 - ldr r4, [sp, #0x18] - str r0, [sp, #0x24] - mov r0, #0 - ldr r5, [sp, #0x18] - str r0, [sp, #0x28] - str r0, [sp, #0x2c] - add r4, #0x28 -_0223DB70: - ldr r0, [sp, #0x1c] - ldr r3, [r0, #0] - cmp r3, #0 - beq _0223DBEC - mov r0, #1 - str r0, [sp] - add r0, r3, #0 - sub r0, #0x8f - str r0, [sp, #4] - mov r0, #5 - str r0, [sp, #8] - mov r0, #4 - str r0, [sp, #0xc] - mov r0, #0xfa - ldr r1, [sp, #0x2c] - lsl r0, r0, #2 - add r0, r1, r0 - str r0, [sp, #0x10] - ldr r2, [sp, #0x24] - add r0, r7, #0 - add r1, r4, #0 - sub r3, #0x4f - str r6, [sp, #0x14] - bl ov83_0223D7A8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r2, #0 - add r0, r7, #0 - add r1, r4, #0 - add r3, r2, #0 - str r6, [sp, #8] - bl ov83_0223D9A8 - mov r1, #0 - str r0, [r5, #8] - bl sub_02021CAC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r2, #0 - ldr r1, [sp, #0x20] - str r6, [sp, #8] - add r0, r7, #0 - add r3, r2, #0 - bl ov83_0223D9A8 - str r0, [r5, #0x18] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #0x18] - mov r1, #1 - bl sub_02021D6C - ldr r0, [sp, #0x28] - add r4, #0x38 - add r0, r0, #1 - add r5, r5, #4 - str r0, [sp, #0x28] -_0223DBEC: - mov r0, #0x42 - ldr r1, [sp, #0x18] - lsl r0, r0, #2 - ldr r1, [r1, r0] - ldr r0, [sp, #0x28] - cmp r1, r0 - beq _0223DC0A - ldr r0, [sp, #0x1c] - add r0, r0, #4 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x2c] - add r0, r0, #1 - str r0, [sp, #0x2c] - cmp r0, #4 - blt _0223DB70 -_0223DC0A: - ldr r0, [sp, #0x24] - bl sub_02006CA8 - ldr r0, [sp, #0x18] - mov r1, #1 - str r1, [r0, #0] - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223DB4C - - thumb_func_start ov83_0223DC1C -ov83_0223DC1C: ; 0x0223DC1C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r0, [r7, #0] - str r1, [sp] - cmp r0, #1 - beq _0223DC2C - bl sub_02022974 -_0223DC2C: - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r7, r0] - mov r4, #0 - cmp r0, #0 - ble _0223DC62 - add r6, r7, #0 - add r5, r7, #0 - add r6, #0x28 -_0223DC3E: - ldr r0, [r5, #8] - bl sub_02021BD4 - ldr r0, [r5, #0x18] - bl sub_02021BD4 - ldr r0, [sp] - add r1, r6, #0 - bl ov83_0223D95C - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r7, r0] - add r4, r4, #1 - add r5, r5, #4 - add r6, #0x38 - cmp r4, r0 - blt _0223DC3E -_0223DC62: - mov r0, #0 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223DC1C - - thumb_func_start ov83_0223DC68 -ov83_0223DC68: ; 0x0223DC68 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #4] - ldr r0, [r0, #4] - cmp r0, #0 - beq _0223DC78 - bl sub_02022974 -_0223DC78: - mov r0, #0 - str r0, [sp, #0xc] - mov r2, #0x42 - ldr r0, [sp, #4] - lsl r2, r2, #2 - ldr r0, [r0, r2] - cmp r0, #0 - ble _0223DD18 - ldr r0, [sp, #4] - add r1, r2, #4 - add r0, r0, r1 - str r0, [sp, #8] - ldr r0, [sp, #4] - add r2, #0x64 - ldr r4, _0223DD2C ; =0x02240460 - add r7, r0, r2 - add r6, r0, #0 - add r5, r0, #0 -_0223DC9C: - ldrb r0, [r4, #0x10] - mov r1, #8 - mov r2, #0xa - str r0, [sp] - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r0, [sp, #8] - ldr r3, [r4, #0] - lsl r1, r1, #0xc - lsl r2, r2, #0xc - bl ov83_0223DA34 - ldrb r0, [r4, #0x10] - mov r1, #0xc - mov r2, #0xe - str r0, [sp] - ldrsh r1, [r4, r1] - ldrsh r2, [r4, r2] - ldr r3, [r4, #4] - add r0, r7, #0 - lsl r1, r1, #0xc - lsl r2, r2, #0xc - bl ov83_0223DA34 - mov r1, #0x43 - mov r2, #0x5b - lsl r1, r1, #2 - lsl r2, r2, #2 - ldr r1, [r6, r1] - ldr r2, [r6, r2] - add r0, sp, #0x10 - mov r3, #0 - bl ov83_0223DAFC - ldr r0, [r5, #8] - add r1, sp, #0x10 - bl sub_02021C50 - mov r0, #0x73 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r5, r0] - ldrb r1, [r4, #0x11] - add r0, #0x10 - add r4, #0x14 - str r1, [r5, r0] - ldr r0, [sp, #8] - ldr r1, [sp, #4] - add r0, #0x18 - str r0, [sp, #8] - ldr r0, [sp, #0xc] - add r7, #0x18 - add r0, r0, #1 - str r0, [sp, #0xc] - mov r0, #0x42 - lsl r0, r0, #2 - ldr r1, [r1, r0] - ldr r0, [sp, #0xc] - add r6, #0x18 - add r5, r5, #4 - cmp r0, r1 - blt _0223DC9C -_0223DD18: - mov r1, #0x7b - ldr r0, [sp, #4] - mov r2, #0 - lsl r1, r1, #2 - str r2, [r0, r1] - mov r1, #1 - str r1, [r0, #4] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223DD2C: .word 0x02240460 - thumb_func_end ov83_0223DC68 - - thumb_func_start ov83_0223DD30 -ov83_0223DD30: ; 0x0223DD30 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r6, #4] - cmp r0, #0 - bne _0223DD46 - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223DD46: - mov r0, #0x7b - lsl r0, r0, #2 - add r1, r0, #0 - sub r1, #0xe4 - ldr r2, [r6, r0] - ldr r1, [r6, r1] - cmp r2, r1 - bge _0223DD96 - add r1, r0, #0 - sub r1, #0x10 - add r1, r6, r1 - lsl r3, r2, #2 - ldr r2, [r1, r3] - sub r2, r2, #1 - str r2, [r1, r3] - ldr r1, [r6, r0] - lsl r1, r1, #2 - add r2, r6, r1 - add r1, r0, #0 - sub r1, #0x10 - ldr r1, [r2, r1] - cmp r1, #0 - bgt _0223DD96 - add r3, r0, #0 - mov r1, #1 - sub r3, #0x20 - str r1, [r2, r3] - ldr r0, [r6, r0] - lsl r0, r0, #2 - add r0, r6, r0 - ldr r0, [r0, #8] - bl sub_02021CAC - mov r1, #0x7b - lsl r1, r1, #2 - ldr r2, [r6, r1] - add r0, r2, #2 - str r0, [sp, #4] - add r0, r2, #1 - str r0, [r6, r1] -_0223DD96: - mov r1, #0x42 - mov r0, #0 - lsl r1, r1, #2 - str r0, [sp, #8] - ldr r0, [r6, r1] - cmp r0, #0 - ble _0223DE7A - add r0, r1, #4 - add r0, r6, r0 - add r1, #0x64 - add r4, r6, #0 - str r0, [sp] - add r7, r6, r1 - add r5, r6, #0 -_0223DDB2: - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #3 - bhi _0223DE58 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223DDC8: ; jump table - .short _0223DE5C - _0223DDC8 - 2 ; case 0 - .short _0223DDD0 - _0223DDC8 - 2 ; case 1 - .short _0223DE36 - _0223DDC8 - 2 ; case 2 - .short _0223DE5C - _0223DDC8 - 2 ; case 3 -_0223DDD0: - ldr r0, [sp] - bl ov83_0223DA94 - str r0, [sp, #0xc] - add r0, r7, #0 - bl ov83_0223DA94 - mov r1, #0x43 - mov r2, #0x5b - lsl r1, r1, #2 - lsl r2, r2, #2 - ldr r1, [r5, r1] - ldr r2, [r5, r2] - add r0, sp, #0x10 - mov r3, #0 - bl ov83_0223DAFC - ldr r0, [r4, #8] - add r1, sp, #0x10 - bl sub_02021C50 - ldr r0, [sp, #0xc] - cmp r0, #1 - bne _0223DE5C - ldr r0, [r4, #0x18] - add r1, sp, #0x10 - bl sub_02021C50 - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0x18] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_02021CAC - ldr r0, _0223DE9C ; =0x000006BC - bl sub_02005748 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r0, #1 - mov r0, #0x73 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223DE5C -_0223DE36: - ldr r0, [r4, #0x18] - bl sub_02021FD0 - cmp r0, #0 - bne _0223DE5C - ldr r0, [r4, #0x18] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r0, #1 - mov r0, #0x73 - lsl r0, r0, #2 - str r1, [r4, r0] - b _0223DE5C -_0223DE58: - bl sub_02022974 -_0223DE5C: - ldr r0, [sp] - add r4, r4, #4 - add r0, #0x18 - str r0, [sp] - ldr r0, [sp, #8] - add r7, #0x18 - add r0, r0, #1 - str r0, [sp, #8] - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r6, r0] - ldr r1, [sp, #8] - add r5, #0x18 - cmp r1, r0 - blt _0223DDB2 -_0223DE7A: - sub r0, r0, #1 - lsl r0, r0, #2 - add r1, r6, r0 - mov r0, #0x73 - lsl r0, r0, #2 - ldr r0, [r1, r0] - cmp r0, #3 - bne _0223DE94 - mov r0, #0 - str r0, [r6, #4] - add sp, #0x1c - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223DE94: - ldr r0, [sp, #4] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223DE9C: .word 0x000006BC - thumb_func_end ov83_0223DD30 - - thumb_func_start ov83_0223DEA0 -ov83_0223DEA0: ; 0x0223DEA0 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - mov r1, #0 - mov r2, #0x34 - add r7, r3, #0 - bl sub_020D5124 - str r6, [r5, #0x18] - ldr r0, [sp, #0x1c] - str r4, [r5, #0x14] - str r0, [r5, #0] - ldr r0, [sp, #0x18] - str r7, [r5, #0x1c] - str r0, [r5, #0x10] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223DEA0 - - thumb_func_start ov83_0223DEC4 -ov83_0223DEC4: ; 0x0223DEC4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _0223DED2 - bl sub_02022974 -_0223DED2: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x34 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223DEC4 - - thumb_func_start ov83_0223DEE0 -ov83_0223DEE0: ; 0x0223DEE0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x30] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _0223DEF4 - bl sub_02022974 -_0223DEF4: - add r0, r5, #0 - add r1, r6, #0 - str r4, [r5, #4] - bl ov83_0223E09C - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov83_0223E15C - mov r0, #1 - str r0, [r5, #0x30] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223DEE0 - - thumb_func_start ov83_0223DF10 -ov83_0223DF10: ; 0x0223DF10 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x30] - cmp r0, #1 - beq _0223DF1E - bl sub_02022974 -_0223DF1E: - add r0, r4, #0 - bl ov83_0223E138 - add r0, r4, #0 - bl ov83_0223E208 - mov r0, #0 - str r0, [r4, #0x30] - pop {r4, pc} - thumb_func_end ov83_0223DF10 - - thumb_func_start ov83_0223DF30 -ov83_0223DF30: ; 0x0223DF30 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x18] - add r2, r1, #0 - ldr r0, [r0, #4] - mov r1, #0 - bl sub_0200B70C - ldr r2, [r4, #0x18] - ldr r0, [r2, #4] - ldr r1, [r2, #8] - ldr r2, [r2, #0x10] - bl sub_0200C388 - ldr r0, [r4, #8] - mov r1, #0xf - bl sub_0201ADA4 - ldr r1, [r4, #0x18] - mov r2, #0 - ldr r0, [r4, #8] - ldr r1, [r1, #8] - add r3, r2, #0 - bl ov83_0223E21C - mov r1, #0 - ldr r0, [r4, #8] - mov r2, #1 - add r3, r1, #0 - bl sub_0200E060 - pop {r4, pc} - thumb_func_end ov83_0223DF30 - - thumb_func_start ov83_0223DF70 -ov83_0223DF70: ; 0x0223DF70 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0201ACF4 - ldr r0, [r4, #4] - mov r1, #4 - bl sub_02019EBC - pop {r4, pc} - thumb_func_end ov83_0223DF70 - - thumb_func_start ov83_0223DF84 -ov83_0223DF84: ; 0x0223DF84 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - mov r1, #0xf - bl sub_0201ADA4 - ldr r1, [r4, #0x18] - mov r2, #0 - ldr r0, [r4, #8] - ldr r1, [r1, #0xc] - add r3, r2, #0 - bl ov83_0223E21C - mov r1, #0 - ldr r0, [r4, #8] - mov r2, #1 - add r3, r1, #0 - bl sub_0200E060 - pop {r4, pc} - thumb_func_end ov83_0223DF84 - - thumb_func_start ov83_0223DFAC -ov83_0223DFAC: ; 0x0223DFAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0x14] - cmp r0, #1 - beq _0223E098 - mov r4, #0 - cmp r0, #0 - ble _0223E08A -_0223DFBE: - lsr r2, r4, #0x1f - lsl r1, r4, #0x1f - sub r1, r1, r2 - mov r0, #0x1f - ror r1, r0 - add r1, r2, r1 - add r2, r4, r2 - asr r2, r2, #1 - mov r0, #0xc - add r6, r1, #0 - mul r6, r0 - lsl r0, r2, #2 - add r2, r2, r0 - str r2, [sp, #0x1c] - mov r2, #0xa - str r2, [sp] - mov r2, #4 - str r2, [sp, #4] - ldr r2, [r5, #0x2c] - lsl r0, r0, #0x18 - add r2, #0xc - str r2, [sp, #8] - mov r2, #0xa - mul r2, r1 - lsl r1, r2, #0x18 - lsr r1, r1, #0x18 - str r1, [sp, #0xc] - lsr r0, r0, #0x18 - ldr r3, [sp, #0x1c] - str r0, [sp, #0x10] - mov r0, #0x14 - str r0, [sp, #0x14] - mov r0, #8 - add r2, r6, #5 - add r3, #0xd - str r0, [sp, #0x18] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r5, #4] - mov r1, #5 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - mov r0, #0xa - ldr r3, [sp, #0x1c] - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #2 - add r2, r6, #5 - add r3, #0xd - str r0, [sp, #8] - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r5, #4] - mov r1, #5 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_02019E2C - ldr r7, [r5, #0x1c] - mov r2, #0x13 - ldr r0, [r5, #0x18] - add r3, r7, r4 - lsl r2, r2, #4 - ldrb r2, [r3, r2] - ldr r0, [r0, #4] - mov r1, #0 - lsl r2, r2, #2 - add r3, r7, r2 - mov r2, #0x4d - lsl r2, r2, #2 - ldr r2, [r3, r2] - bl sub_0200B498 - ldr r2, [r5, #0x18] - ldr r0, [r2, #4] - ldr r1, [r2, #8] - ldr r2, [r2, #0x14] - bl sub_0200C388 - ldr r1, [r5, #0x18] - lsl r0, r6, #3 - ldr r1, [r1, #8] - add r0, #0x20 - mov r2, #1 - bl ov83_0223D6A8 - ldr r1, [r5, #0x18] - ldr r3, [sp, #0x1c] - add r2, r0, #0 - lsl r3, r3, #3 - ldr r0, [r5, #0xc] - ldr r1, [r1, #8] - add r3, #8 - bl ov83_0223E21C - ldr r0, [r5, #0x14] - add r4, r4, #1 - cmp r4, r0 - blt _0223DFBE -_0223E08A: - ldr r0, [r5, #0xc] - bl sub_0201A9A4 - ldr r0, [r5, #4] - mov r1, #5 - bl sub_0201C3C0 -_0223E098: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223DFAC - - thumb_func_start ov83_0223E09C -ov83_0223E09C: ; 0x0223E09C - push {r4, r5, lr} - sub sp, #0x14 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #1 - bl sub_0201A778 - str r0, [r5, #8] - add r0, r4, #0 - mov r1, #1 - bl sub_0201A778 - str r0, [r5, #0xc] - mov r0, #0x13 - str r0, [sp] - mov r0, #0x17 - str r0, [sp, #4] - mov r2, #4 - str r2, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r5, #4] - ldr r1, [r5, #8] - add r3, r2, #0 - bl sub_0201A7E8 - mov r0, #0xd - str r0, [sp] - mov r0, #0x14 - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - mov r0, #0x1f - str r0, [sp, #0x10] - ldr r0, [r5, #4] - ldr r1, [r5, #0xc] - mov r2, #4 - mov r3, #6 - bl sub_0201A7E8 - ldr r0, [r5, #8] - mov r1, #0xf - bl sub_0201ADA4 - ldr r0, [r5, #0xc] - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [r5, #0x10] - mov r1, #4 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - str r4, [sp, #4] - ldr r0, [r5, #4] - mov r2, #1 - mov r3, #0 - bl sub_0200DD0C - mov r0, #4 - mov r1, #0x20 - add r2, r4, #0 - bl sub_02002E98 - mov r1, #1 - ldr r0, [r5, #8] - add r2, r1, #0 - mov r3, #0 - bl sub_0200E060 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E09C - - thumb_func_start ov83_0223E138 -ov83_0223E138: ; 0x0223E138 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - bl sub_0201A8FC - ldr r0, [r4, #8] - mov r1, #1 - bl sub_0201A928 - ldr r0, [r4, #0xc] - bl sub_0201A8FC - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_0201A928 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E138 - - thumb_func_start ov83_0223E15C -ov83_0223E15C: ; 0x0223E15C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r2, #0 - mov r3, #0x40 - add r5, r0, #0 - add r4, r1, #0 - str r3, [sp] - add r0, r6, #0 - mov r1, #1 - mov r2, #4 - str r4, [sp, #4] - bl sub_02007130 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r5, #4] - add r0, r6, #0 - mov r3, #5 - bl sub_020070E8 - ldr r0, [r5, #0x14] - cmp r0, #1 - bne _0223E194 - mov r1, #2 - b _0223E196 -_0223E194: - mov r1, #3 -_0223E196: - add r3, r5, #0 - str r4, [sp] - add r0, r6, #0 - mov r2, #0 - add r3, #0x24 - bl sub_020071D0 - str r0, [r5, #0x20] - ldr r2, [r5, #0x24] - mov r3, #0 - str r3, [sp] - ldrh r0, [r2] - mov r1, #5 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_020198C0 - ldr r1, [r5, #0x24] - mov r2, #0 - ldrh r0, [r1] - add r3, r2, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r1, #2] - mov r1, #5 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_02019E2C - add r3, r5, #0 - str r4, [sp] - add r0, r6, #0 - mov r1, #4 - mov r2, #0 - add r3, #0x2c - bl sub_020071D0 - str r0, [r5, #0x28] - ldr r0, [r5, #4] - mov r1, #5 - bl sub_0201C3C0 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E15C - - thumb_func_start ov83_0223E208 -ov83_0223E208: ; 0x0223E208 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - bl sub_020181C4 - ldr r0, [r4, #0x28] - bl sub_020181C4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E208 - - thumb_func_start ov83_0223E21C -ov83_0223E21C: ; 0x0223E21C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r1, #0 - add r4, r2, #0 - str r3, [sp] - mov r2, #0 - ldr r1, _0223E240 ; =0x0001020F - str r2, [sp, #4] - str r1, [sp, #8] - str r2, [sp, #0xc] - mov r1, #1 - add r2, r5, #0 - add r3, r4, #0 - bl sub_0201D78C - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223E240: .word 0x0001020F - thumb_func_end ov83_0223E21C - - thumb_func_start ov83_0223E244 -ov83_0223E244: ; 0x0223E244 - mov r1, #0 - strb r1, [r0] - strb r1, [r0, #1] - strb r1, [r0, #2] - strb r1, [r0, #3] - strb r1, [r0, #4] - strb r1, [r0, #5] - strb r1, [r0, #6] - strb r1, [r0, #7] - strb r1, [r0, #8] - strb r1, [r0, #9] - strb r1, [r0, #0xa] - strb r1, [r0, #0xb] - bx lr - thumb_func_end ov83_0223E244 - - thumb_func_start ov83_0223E260 -ov83_0223E260: ; 0x0223E260 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223E26E - bl sub_02022974 -_0223E26E: - mov r0, #0 - strb r0, [r4] - strb r0, [r4, #1] - strb r0, [r4, #2] - strb r0, [r4, #3] - strb r0, [r4, #4] - strb r0, [r4, #5] - strb r0, [r4, #6] - strb r0, [r4, #7] - strb r0, [r4, #8] - strb r0, [r4, #9] - strb r0, [r4, #0xa] - strb r0, [r4, #0xb] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E260 - - thumb_func_start ov83_0223E28C -ov83_0223E28C: ; 0x0223E28C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r1, #0 - ldr r3, [sp, #0x18] - mov r1, #0x38 - mul r1, r3 - add r1, r2, r1 - mov r2, #2 - mov r3, #6 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov83_0223D9A8 - str r0, [r4, #8] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #8] - ldr r1, [sp, #0x1c] - bl sub_02021D6C - mov r0, #1 - str r0, [r4, #0] - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov83_0223E28C - - thumb_func_start ov83_0223E2C8 -ov83_0223E2C8: ; 0x0223E2C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #1 - beq _0223E2D6 - bl sub_02022974 -_0223E2D6: - ldr r0, [r4, #8] - bl sub_02021BD4 - mov r0, #0 - str r0, [r4, #0] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E2C8 - - thumb_func_start ov83_0223E2E4 -ov83_0223E2E4: ; 0x0223E2E4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02021CC8 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E2E4 - - thumb_func_start ov83_0223E2FC -ov83_0223E2FC: ; 0x0223E2FC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #8] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x2a - lsl r0, r0, #0xe - str r0, [sp] - mov r0, #0xf - lsl r0, r0, #0xe - str r0, [sp, #4] - ldr r0, [r4, #8] - add r1, sp, #0 - bl sub_02021C50 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E2FC - - thumb_func_start ov83_0223E32C -ov83_0223E32C: ; 0x0223E32C - push {r3, lr} - ldr r0, [r0, #8] - bl sub_02021FD0 - cmp r0, #0 - bne _0223E33C - mov r0, #1 - pop {r3, pc} -_0223E33C: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov83_0223E32C - - thumb_func_start ov83_0223E340 -ov83_0223E340: ; 0x0223E340 - ldr r3, _0223E348 ; =sub_020D5124 - mov r1, #0 - mov r2, #0x78 - bx r3 - ; .align 2, 0 -_0223E348: .word sub_020D5124 - thumb_func_end ov83_0223E340 - - thumb_func_start ov83_0223E34C -ov83_0223E34C: ; 0x0223E34C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x74] - cmp r0, #0 - beq _0223E35A - bl sub_02022974 -_0223E35A: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x78 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E34C - - thumb_func_start ov83_0223E368 -ov83_0223E368: ; 0x0223E368 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r0, [sp, #8] - ldr r0, [r0, #0x74] - add r7, r2, #0 - str r1, [sp, #0xc] - str r3, [sp, #0x10] - cmp r0, #0 - beq _0223E37E - bl sub_02022974 -_0223E37E: - ldr r4, _0223E420 ; =0x02240418 - ldr r5, [sp, #8] - mov r6, #0 -_0223E384: - ldrb r1, [r4] - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x10] - add r2, r7, #0 - bl ov83_0223D6BC - add r6, r6, #1 - add r4, r4, #1 - stmia r5!, {r0} - cmp r6, #6 - blt _0223E384 - ldr r4, _0223E424 ; =0x02240438 - ldr r5, [sp, #8] - mov r6, #0 -_0223E3A0: - ldrb r1, [r4] - ldr r0, [sp, #0xc] - ldr r3, [sp, #0x10] - add r2, r7, #0 - bl ov83_0223D6EC - str r0, [r5, #0x18] - add r6, r6, #1 - add r4, r4, #1 - add r5, r5, #4 - cmp r6, #8 - blt _0223E3A0 - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, _0223E428 ; =0x02240428 - ldr r6, _0223E42C ; =0x02240430 - ldr r4, _0223E430 ; =0x02240440 - ldr r5, [sp, #8] - ldr r7, _0223E434 ; =0x02240420 - str r0, [sp, #0x18] -_0223E3C8: - ldrb r0, [r6] - str r0, [sp] - ldr r0, [sp, #0x18] - ldrb r0, [r0] - str r0, [sp, #4] - ldrb r1, [r7] - ldrb r3, [r4] - ldr r0, [sp, #0xc] - lsl r2, r1, #2 - ldr r1, [sp, #8] - ldr r1, [r1, r2] - ldr r2, [r5, #0x18] - bl ov83_0223D720 - str r0, [r5, #0x38] - ldrb r2, [r4] - mov r1, #0x80 - ldrb r3, [r6] - sub r1, r1, r2 - mov r2, #0x60 - sub r2, r2, r3 - lsl r1, r1, #0x10 - lsl r2, r2, #0x10 - asr r1, r1, #0x10 - asr r2, r2, #0x10 - bl sub_02015268 - ldr r0, [sp, #0x18] - add r6, r6, #1 - add r0, r0, #1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x14] - add r4, r4, #1 - add r0, r0, #1 - add r5, r5, #4 - add r7, r7, #1 - str r0, [sp, #0x14] - cmp r0, #8 - blt _0223E3C8 - ldr r0, [sp, #8] - mov r1, #1 - str r1, [r0, #0x74] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E420: .word 0x02240418 -_0223E424: .word 0x02240438 -_0223E428: .word 0x02240428 -_0223E42C: .word 0x02240430 -_0223E430: .word 0x02240440 -_0223E434: .word 0x02240420 - thumb_func_end ov83_0223E368 - - thumb_func_start ov83_0223E438 -ov83_0223E438: ; 0x0223E438 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0x74] - cmp r0, #1 - beq _0223E446 - bl sub_02022974 -_0223E446: - mov r4, #0 - add r5, r6, #0 -_0223E44A: - ldr r0, [r5, #0x38] - bl sub_02015238 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _0223E44A - mov r5, #0 - add r4, r6, #0 -_0223E45C: - ldr r0, [r4, #0] - bl sub_02015164 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #6 - blt _0223E45C - mov r5, #0 - add r4, r6, #0 -_0223E46E: - ldr r0, [r4, #0x18] - bl sub_020151D4 - add r5, r5, #1 - add r4, r4, #4 - cmp r5, #8 - blt _0223E46E - mov r0, #0 - str r0, [r6, #0x74] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E438 - - thumb_func_start ov83_0223E484 -ov83_0223E484: ; 0x0223E484 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #8 - blo _0223E494 - bl sub_02022974 -_0223E494: - lsl r0, r4, #2 - add r0, r5, r0 - ldr r0, [r0, #0x38] - add r1, r6, #0 - bl sub_02015240 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E484 - - thumb_func_start ov83_0223E4A4 -ov83_0223E4A4: ; 0x0223E4A4 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #5 - add r5, #0x14 -_0223E4AE: - ldr r0, [r5, #0x38] - add r1, r6, #0 - bl sub_020152BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - ble _0223E4AE - pop {r4, r5, r6, pc} - thumb_func_end ov83_0223E4A4 - - thumb_func_start ov83_0223E4C0 -ov83_0223E4C0: ; 0x0223E4C0 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r4, #5 - add r5, #0x14 -_0223E4CA: - ldr r0, [r5, #0x38] - add r1, r6, #0 - add r2, r6, #0 - bl sub_02015270 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - ble _0223E4CA - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E4C0 - - thumb_func_start ov83_0223E4E0 -ov83_0223E4E0: ; 0x0223E4E0 - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - add r6, r2, #0 - cmp r4, #8 - blo _0223E4F0 - bl sub_02022974 -_0223E4F0: - lsl r0, r4, #2 - add r0, r5, r0 - lsl r1, r6, #0x18 - ldr r0, [r0, #0x38] - lsr r1, r1, #0x18 - bl sub_02015294 - pop {r4, r5, r6, pc} - thumb_func_end ov83_0223E4E0 - - thumb_func_start ov83_0223E500 -ov83_0223E500: ; 0x0223E500 - push {r3, lr} - mov r2, #1 - str r2, [r0, #0x6c] - mov r1, #0 - str r1, [r0, #0x70] - lsl r1, r2, #0xc - ldr r2, _0223E518 ; =0x00000FAE - add r0, #0x58 - mov r3, #4 - bl ov83_0223D9DC - pop {r3, pc} - ; .align 2, 0 -_0223E518: .word 0x00000FAE - thumb_func_end ov83_0223E500 - - thumb_func_start ov83_0223E51C -ov83_0223E51C: ; 0x0223E51C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x6c] - add r3, r1, #0 - cmp r0, #0 - beq _0223E52E - cmp r0, #1 - beq _0223E568 - b _0223E592 -_0223E52E: - ldr r0, [r5, #0x70] - cmp r0, #0 - bne _0223E54C - ldr r1, _0223E598 ; =0x02240448 - lsl r4, r3, #2 - ldr r2, _0223E59C ; =0x02240454 - ldr r1, [r1, r4] - ldr r2, [r2, r4] - ldr r4, _0223E5A0 ; =0x02240414 - add r0, r5, #0 - ldrb r3, [r4, r3] - add r0, #0x58 - bl ov83_0223D9DC - b _0223E562 -_0223E54C: - ldr r1, _0223E59C ; =0x02240454 - lsl r4, r3, #2 - ldr r2, _0223E598 ; =0x02240448 - ldr r1, [r1, r4] - ldr r2, [r2, r4] - ldr r4, _0223E5A0 ; =0x02240414 - add r0, r5, #0 - ldrb r3, [r4, r3] - add r0, #0x58 - bl ov83_0223D9DC -_0223E562: - ldr r0, [r5, #0x6c] - add r0, r0, #1 - str r0, [r5, #0x6c] -_0223E568: - add r0, r5, #0 - add r0, #0x58 - bl ov83_0223D9EC - add r7, r0, #0 - mov r6, #0 - add r4, r5, #0 -_0223E576: - ldr r1, [r5, #0x58] - ldr r0, [r4, #0x38] - add r2, r1, #0 - bl sub_02015270 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #2 - ble _0223E576 - cmp r7, #1 - bne _0223E596 - mov r0, #0 - str r0, [r5, #0x6c] - pop {r3, r4, r5, r6, r7, pc} -_0223E592: - bl sub_02022974 -_0223E596: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E598: .word 0x02240448 -_0223E59C: .word 0x02240454 -_0223E5A0: .word 0x02240414 - thumb_func_end ov83_0223E51C - - thumb_func_start ov83_0223E5A4 -ov83_0223E5A4: ; 0x0223E5A4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r2, #0 - mov r1, #0 - mov r2, #0x20 - add r5, r0, #0 - add r7, r3, #0 - bl sub_020D5124 - str r4, [r5, #0x14] - str r6, [r5, #0x18] - str r7, [r5, #0x1c] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E5A4 - - thumb_func_start ov83_0223E5C0 -ov83_0223E5C0: ; 0x0223E5C0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223E5CE - bl sub_02022974 -_0223E5CE: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x20 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E5C0 - - thumb_func_start ov83_0223E5DC -ov83_0223E5DC: ; 0x0223E5DC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - str r0, [sp, #0xc] - mov r0, #2 - lsl r0, r0, #0x12 - str r0, [sp, #0x14] - mov r0, #6 - add r6, r2, #0 - lsl r0, r0, #0x10 - ldr r5, [sp, #0xc] - str r1, [sp, #0x10] - add r7, r3, #0 - str r0, [sp, #0x18] - mov r4, #0 - add r6, #0x38 -_0223E5FA: - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - ldr r0, [sp, #0x10] - str r7, [sp, #8] - add r1, r6, #0 - mov r2, #0x80 - mov r3, #0x60 - bl ov83_0223D9A8 - str r0, [r5, #4] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r5, #4] - add r1, r4, #4 - bl sub_02021D6C - ldr r0, [r5, #4] - add r1, sp, #0x14 - bl sub_02021C50 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223E5FA - ldr r0, [sp, #0xc] - mov r1, #1 - str r1, [r0, #0] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E5DC - - thumb_func_start ov83_0223E63C -ov83_0223E63C: ; 0x0223E63C - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_0223E644: - ldr r0, [r5, #4] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223E644 - mov r0, #0 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - thumb_func_end ov83_0223E63C - - thumb_func_start ov83_0223E658 -ov83_0223E658: ; 0x0223E658 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r6, r0, #0 - ldr r7, [r6, #0x14] - ldr r0, [r6, #0x18] - add r7, #0x98 - mov r4, #0 - cmp r0, #0 - bls _0223E696 - add r5, r6, #0 -_0223E66C: - ldr r0, [r6, #0x14] - add r1, r0, r4 - mov r0, #0x13 - lsl r0, r0, #4 - ldrb r1, [r1, r0] - add r0, r7, r1 - ldrb r1, [r7, r1] - lsl r1, r1, #0xc - str r1, [sp] - ldrb r0, [r0, #4] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - ldr r0, [r5, #4] - bl sub_02021C50 - ldr r0, [r6, #0x18] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blo _0223E66C -_0223E696: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E658 - - thumb_func_start ov83_0223E69C -ov83_0223E69C: ; 0x0223E69C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x18] - mov r6, #0 - str r1, [sp] - cmp r0, #0 - bls _0223E6D2 - add r7, r5, #0 -_0223E6AC: - ldr r0, [r5, #0x14] - add r1, r0, r6 - mov r0, #0x13 - lsl r0, r0, #4 - ldrb r4, [r1, r0] - ldr r0, [r5, #0x1c] - bl ov83_0223D570 - cmp r4, r0 - beq _0223E6C8 - ldr r0, [r7, #4] - ldr r1, [sp] - bl sub_02021CAC -_0223E6C8: - ldr r0, [r5, #0x18] - add r6, r6, #1 - add r7, r7, #4 - cmp r6, r0 - blo _0223E6AC -_0223E6D2: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223E69C - - thumb_func_start ov83_0223E6D4 -ov83_0223E6D4: ; 0x0223E6D4 - push {r3, r4, r5, r6, r7, lr} - add r4, r1, #0 - add r6, r2, #0 - add r5, r0, #0 - mov r1, #0 - mov r2, #0x38 - add r7, r3, #0 - bl sub_020D5124 - str r6, [r5, #0x1c] - ldr r0, [sp, #0x1c] - str r4, [r5, #0x20] - str r0, [r5, #0] - ldr r0, [sp, #0x18] - str r7, [r5, #0x24] - str r0, [r5, #0x18] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E6D4 - - thumb_func_start ov83_0223E6F8 -ov83_0223E6F8: ; 0x0223E6F8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _0223E706 - bl sub_02022974 -_0223E706: - add r0, r4, #0 - bl ov83_0223E994 - add r0, r4, #0 - bl ov83_0223E9D0 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x38 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E6F8 - - thumb_func_start ov83_0223E720 -ov83_0223E720: ; 0x0223E720 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x28] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r0, #0 - beq _0223E734 - bl sub_02022974 -_0223E734: - add r0, r5, #0 - add r1, r6, #0 - str r4, [r5, #4] - bl ov83_0223E77C - add r0, r5, #0 - add r1, r6, #0 - add r2, r7, #0 - bl ov83_0223E844 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #1 - str r0, [r5, #0x28] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E720 - - thumb_func_start ov83_0223E760 -ov83_0223E760: ; 0x0223E760 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - cmp r0, #1 - beq _0223E76E - bl sub_02022974 -_0223E76E: - add r0, r4, #0 - bl ov83_0223E824 - mov r0, #0 - str r0, [r4, #0x28] - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E760 - - thumb_func_start ov83_0223E77C -ov83_0223E77C: ; 0x0223E77C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r7, r0, #0 - ldr r0, [r7, #0x18] - str r1, [sp, #0x14] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - add r0, r1, #0 - str r0, [sp, #4] - ldr r0, [r7, #4] - mov r1, #2 - mov r2, #1 - mov r3, #0 - bl sub_0200DD0C - ldr r2, [sp, #0x14] - mov r0, #0 - mov r1, #0x40 - bl sub_02002E98 - mov r0, #0 - str r0, [sp] - ldr r0, [sp, #0x14] - mov r1, #2 - str r0, [sp, #4] - ldr r0, [r7, #4] - mov r2, #0x1f - mov r3, #1 - bl sub_0200DAA4 - ldr r2, [sp, #0x14] - mov r0, #0 - mov r1, #0x60 - bl sub_02002E7C - ldr r5, _0223E820 ; =0x022405C0 - mov r6, #0 - add r4, r7, #0 -_0223E7CA: - ldr r0, [sp, #0x14] - mov r1, #1 - bl sub_0201A778 - str r0, [r4, #8] - ldrh r0, [r5, #2] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r5, #4] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r5, #6] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldrh r0, [r5, #8] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0xc] - ldrh r0, [r5, #0xa] - str r0, [sp, #0x10] - ldrh r3, [r5] - ldr r0, [r7, #4] - ldr r1, [r4, #8] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [r4, #8] - mov r1, #0 - bl sub_0201ADA4 - add r6, r6, #1 - add r4, r4, #4 - add r5, #0xc - cmp r6, #4 - blt _0223E7CA - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223E820: .word 0x022405C0 - thumb_func_end ov83_0223E77C - - thumb_func_start ov83_0223E824 -ov83_0223E824: ; 0x0223E824 - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r4, #0 - mov r6, #1 -_0223E82C: - ldr r0, [r5, #8] - bl sub_0201A8FC - ldr r0, [r5, #8] - add r1, r6, #0 - bl sub_0201A928 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223E82C - pop {r4, r5, r6, pc} - thumb_func_end ov83_0223E824 - - thumb_func_start ov83_0223E844 -ov83_0223E844: ; 0x0223E844 - push {r3, r4, r5, r6, lr} - sub sp, #0x14 - add r5, r0, #0 - add r6, r2, #0 - mov r0, #0x20 - add r4, r1, #0 - str r0, [sp] - add r0, r6, #0 - mov r1, #6 - mov r2, #0 - mov r3, #0x80 - str r4, [sp, #4] - bl sub_02007130 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r4, [sp, #0xc] - ldr r2, [r5, #4] - add r0, r6, #0 - mov r1, #5 - mov r3, #1 - bl sub_020070E8 - str r4, [sp] - add r0, r6, #0 - mov r1, #7 - mov r2, #0 - add r3, sp, #0x10 - bl sub_020071D0 - ldr r2, [sp, #0x10] - mov r3, #0 - str r3, [sp] - add r4, r0, #0 - ldrh r0, [r2] - mov r1, #1 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldrh r0, [r2, #2] - add r2, #0xc - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_020198C0 - ldr r1, [sp, #0x10] - mov r2, #0 - ldrh r0, [r1] - add r3, r2, #0 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp] - ldrh r0, [r1, #2] - mov r1, #1 - lsl r0, r0, #0x15 - lsr r0, r0, #0x18 - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - ldr r0, [r5, #4] - bl sub_02019E2C - add r0, r4, #0 - bl sub_020181C4 - ldr r0, [r5, #4] - mov r1, #1 - bl sub_0201C3C0 - add sp, #0x14 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E844 - - thumb_func_start ov83_0223E8DC -ov83_0223E8DC: ; 0x0223E8DC - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0x30] - add r0, r0, #1 - str r0, [r4, #0x30] - cmp r0, #0x1e - blt _0223E906 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r5, #0 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x2c] -_0223E906: - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223E8DC - - thumb_func_start ov83_0223E908 -ov83_0223E908: ; 0x0223E908 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #0x2c] - add r5, r1, #0 - cmp r0, #0 - beq _0223E91A - bl sub_02022974 -_0223E91A: - mov r2, #1 - ldr r0, _0223E97C ; =ov83_0223E8DC - add r1, r4, #0 - lsl r2, r2, #0xa - bl sub_0200D9E8 - str r0, [r4, #0x2c] - mov r1, #0 - str r1, [r4, #0x30] - ldr r0, [r4, #8] - bl sub_0201ADA4 - ldr r1, [r4, #0x1c] - lsl r5, r5, #2 - add r1, r1, r5 - ldr r1, [r1, #0x38] - mov r0, #1 - mov r2, #0 - mov r3, #0x80 - bl sub_02002EEC - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - ldr r0, _0223E980 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #8] - add r2, r2, r5 - ldr r2, [r2, #0x38] - mov r1, #1 - bl sub_0201D78C - ldr r0, [r4, #8] - bl sub_0201A954 - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #4 - mov r1, #1 - bl sub_0201FF0C - add sp, #0x10 - pop {r3, r4, r5, pc} - nop -_0223E97C: .word ov83_0223E8DC -_0223E980: .word 0x0001020F - thumb_func_end ov83_0223E908 - - thumb_func_start ov83_0223E984 -ov83_0223E984: ; 0x0223E984 - ldr r0, [r0, #0x2c] - cmp r0, #0 - bne _0223E98E - mov r0, #1 - bx lr -_0223E98E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223E984 - - thumb_func_start ov83_0223E994 -ov83_0223E994: ; 0x0223E994 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x2c] - cmp r0, #0 - beq _0223E9B8 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - ldr r0, [r4, #0x2c] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x2c] -_0223E9B8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223E994 - - thumb_func_start ov83_0223E9BC -ov83_0223E9BC: ; 0x0223E9BC - push {r4, lr} - add r4, r0, #0 - bl ov83_0223E9D0 - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_0200E7FC - str r0, [r4, #0x34] - pop {r4, pc} - thumb_func_end ov83_0223E9BC - - thumb_func_start ov83_0223E9D0 -ov83_0223E9D0: ; 0x0223E9D0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _0223E9E2 - bl sub_0200EBA0 - mov r0, #0 - str r0, [r4, #0x34] -_0223E9E2: - pop {r4, pc} - thumb_func_end ov83_0223E9D0 - - thumb_func_start ov83_0223E9E4 -ov83_0223E9E4: ; 0x0223E9E4 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0xc] - mov r1, #0xf - bl sub_0201ADA4 - ldr r1, [r4, #0x1c] - mov r0, #0 - ldr r1, [r1, #0x34] - add r2, r0, #0 - mov r3, #0xe0 - bl sub_02002EEC - mov r1, #0 - add r3, r0, #0 - str r1, [sp] - ldr r0, _0223EA68 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #0x34] - bl sub_0201D78C - ldr r0, [r4, #0xc] - mov r1, #0 - mov r2, #0x1f - mov r3, #1 - bl sub_0200DC48 - ldr r0, [r4, #0x10] - mov r1, #0xf - bl sub_0201ADA4 - mov r1, #0 - str r1, [sp] - ldr r0, _0223EA68 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0x10] - ldr r2, [r2, #0x64] - add r3, r1, #0 - bl sub_0201D78C - ldr r0, [r4, #0x10] - mov r1, #0 - mov r2, #0x1f - mov r3, #1 - bl sub_0200DC48 - ldr r0, [r4, #0xc] - bl sub_0201A9A4 - ldr r0, [r4, #0x10] - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0223EA68: .word 0x0001020F - thumb_func_end ov83_0223E9E4 - - thumb_func_start ov83_0223EA6C -ov83_0223EA6C: ; 0x0223EA6C - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - mov r0, #0x18 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EBD4 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #0x4c] - add r3, r1, #0 - bl sub_0201D78C - mov r3, #2 - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [r4, #0x24] - ldr r0, [r4, #0x1c] - add r2, #0x66 - ldrb r2, [r2] - ldr r0, [r0, #4] - mov r1, #0 - bl sub_0200B60C - mov r3, #2 - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r2, [r4, #0x24] - ldr r0, [r4, #0x1c] - add r2, #0x67 - ldrb r2, [r2] - ldr r0, [r0, #4] - bl sub_0200B60C - mov r1, #2 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r2, [r4, #0x24] - ldr r0, [r4, #0x1c] - add r2, #0x68 - ldrb r2, [r2] - ldr r0, [r0, #4] - add r3, r1, #0 - bl sub_0200B60C - ldr r2, [r4, #0x1c] - ldr r0, [r2, #4] - ldr r1, [r2, #8] - ldr r2, [r2, #0x50] - bl sub_0200C388 - mov r0, #0x18 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EBD4 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #8] - mov r3, #0xa0 - bl sub_0201D78C - mov r0, #0x30 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EBD4 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #0x54] - add r3, r1, #0 - bl sub_0201D78C - mov r1, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0x1c] - ldr r2, [r4, #0x24] - ldr r0, [r0, #4] - ldr r2, [r2, #0x58] - mov r3, #4 - bl sub_0200B60C - ldr r0, [r4, #0x24] - ldr r0, [r0, #0x58] - cmp r0, #1 - bne _0223EB34 - mov r2, #3 - b _0223EB36 -_0223EB34: - mov r2, #5 -_0223EB36: - ldr r3, [r4, #0x1c] - lsl r2, r2, #2 - add r2, r3, r2 - ldr r0, [r3, #4] - ldr r1, [r3, #8] - ldr r2, [r2, #0x4c] - bl sub_0200C388 - mov r0, #0x30 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EBD4 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #8] - mov r3, #0xa0 - bl sub_0201D78C - mov r0, #0x44 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EBD4 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #0x5c] - add r3, r1, #0 - bl sub_0201D78C - mov r1, #0 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0x1c] - ldr r2, [r4, #0x24] - ldr r0, [r0, #4] - ldr r2, [r2, #0x5c] - mov r3, #4 - bl sub_0200B60C - ldr r0, [r4, #0x24] - ldr r0, [r0, #0x5c] - cmp r0, #1 - bne _0223EB9C - mov r2, #3 - b _0223EB9E -_0223EB9C: - mov r2, #5 -_0223EB9E: - ldr r3, [r4, #0x1c] - lsl r2, r2, #2 - add r2, r3, r2 - ldr r0, [r3, #4] - ldr r1, [r3, #8] - ldr r2, [r2, #0x4c] - bl sub_0200C388 - mov r0, #0x44 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EBD4 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0xc] - ldr r2, [r2, #8] - mov r3, #0xa0 - bl sub_0201D78C - ldr r0, [r4, #0xc] - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, pc} - nop -_0223EBD4: .word 0x0001020F - thumb_func_end ov83_0223EA6C - - thumb_func_start ov83_0223EBD8 -ov83_0223EBD8: ; 0x0223EBD8 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r2, [r4, #0x24] - ldr r0, [r4, #0x1c] - add r2, #0x64 - ldrb r2, [r2] - ldr r0, [r0, #4] - mov r1, #3 - bl sub_0200BF74 - mov r3, #2 - str r3, [sp] - mov r1, #1 - str r1, [sp, #4] - ldr r2, [r4, #0x24] - ldr r0, [r4, #0x1c] - add r2, #0x65 - ldrb r2, [r2] - ldr r0, [r0, #4] - bl sub_0200B60C - mov r1, #2 - str r1, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0x1c] - ldr r2, [r4, #0x20] - ldr r0, [r0, #4] - add r3, r1, #0 - bl sub_0200B60C - ldr r2, [r4, #0x1c] - ldr r0, [r2, #4] - ldr r1, [r2, #8] - ldr r2, [r2, #0x68] - bl sub_0200C388 - mov r0, #0x18 - str r0, [sp] - mov r1, #0 - ldr r0, _0223EC48 ; =0x0001020F - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, [r4, #0x1c] - ldr r0, [r4, #0x10] - ldr r2, [r2, #8] - mov r3, #0x10 - bl sub_0201D78C - ldr r0, [r4, #0x10] - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0223EC48: .word 0x0001020F - thumb_func_end ov83_0223EBD8 - - thumb_func_start ov83_0223EC4C -ov83_0223EC4C: ; 0x0223EC4C - push {r3, lr} - cmp r1, #0 - beq _0223EC5C - cmp r1, #1 - beq _0223EC62 - cmp r1, #2 - beq _0223EC68 - pop {r3, pc} -_0223EC5C: - bl ov83_0223E9E4 - pop {r3, pc} -_0223EC62: - bl ov83_0223EA6C - pop {r3, pc} -_0223EC68: - bl ov83_0223EBD8 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov83_0223EC4C - - thumb_func_start ov83_0223EC70 -ov83_0223EC70: ; 0x0223EC70 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - mov r1, #2 - bl sub_02019EBC - ldr r0, [r4, #0xc] - bl sub_0201ACF4 - ldr r0, [r4, #0x10] - bl sub_0201ACF4 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223EC70 - - thumb_func_start ov83_0223EC8C -ov83_0223EC8C: ; 0x0223EC8C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - add r6, r1, #0 - bl ov83_0223E9D0 - ldr r0, [r4, #0x14] - mov r1, #0xf - bl sub_0201ADA4 - cmp r6, #6 - bhi _0223ED0C - add r0, r6, r6 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223ECB0: ; jump table - .short _0223ECBE - _0223ECB0 - 2 ; case 0 - .short _0223ECEA - _0223ECB0 - 2 ; case 1 - .short _0223ECF0 - _0223ECB0 - 2 ; case 2 - .short _0223ECF6 - _0223ECB0 - 2 ; case 3 - .short _0223ECFC - _0223ECB0 - 2 ; case 4 - .short _0223ED02 - _0223ECB0 - 2 ; case 5 - .short _0223ED08 - _0223ECB0 - 2 ; case 6 -_0223ECBE: - mov r3, #0x51 - ldr r2, [r4, #0x24] - lsl r3, r3, #2 - ldrb r5, [r2, r3] - ldr r0, [r4, #0x1c] - sub r3, #0x10 - lsl r5, r5, #2 - add r2, r2, r5 - ldr r0, [r0, #4] - ldr r2, [r2, r3] - mov r1, #0 - bl sub_0200B498 - ldr r2, [r4, #0x1c] - ldr r0, [r2, #4] - ldr r1, [r2, #8] - ldr r2, [r2, #0x18] - bl sub_0200C388 - ldr r0, [r4, #0x1c] - ldr r5, [r0, #8] - b _0223ED0C -_0223ECEA: - ldr r0, [r4, #0x1c] - ldr r5, [r0, #0x1c] - b _0223ED0C -_0223ECF0: - ldr r0, [r4, #0x1c] - ldr r5, [r0, #0x28] - b _0223ED0C -_0223ECF6: - ldr r0, [r4, #0x1c] - ldr r5, [r0, #0x24] - b _0223ED0C -_0223ECFC: - ldr r0, [r4, #0x1c] - ldr r5, [r0, #0x20] - b _0223ED0C -_0223ED02: - ldr r0, [r4, #0x1c] - ldr r5, [r0, #0x2c] - b _0223ED0C -_0223ED08: - ldr r0, [r4, #0x1c] - ldr r5, [r0, #0xc] -_0223ED0C: - mov r3, #0 - str r3, [sp] - ldr r0, _0223ED38 ; =0x0001020F - str r3, [sp, #4] - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r4, #0x14] - mov r1, #1 - add r2, r5, #0 - bl sub_0201D78C - mov r1, #0 - ldr r0, [r4, #0x14] - mov r2, #1 - add r3, r1, #0 - bl sub_0200E060 - ldr r0, [r4, #0x14] - bl sub_0201A9A4 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223ED38: .word 0x0001020F - thumb_func_end ov83_0223EC8C - - thumb_func_start ov83_0223ED3C -ov83_0223ED3C: ; 0x0223ED3C - ldr r3, _0223ED44 ; =sub_020D5124 - mov r1, #0 - ldr r2, _0223ED48 ; =0x00000414 - bx r3 - ; .align 2, 0 -_0223ED44: .word sub_020D5124 -_0223ED48: .word 0x00000414 - thumb_func_end ov83_0223ED3C - - thumb_func_start ov83_0223ED4C -ov83_0223ED4C: ; 0x0223ED4C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223ED5A - bl sub_02022974 -_0223ED5A: - ldr r2, _0223ED68 ; =0x00000414 - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - pop {r4, pc} - nop -_0223ED68: .word 0x00000414 - thumb_func_end ov83_0223ED4C - - thumb_func_start ov83_0223ED6C -ov83_0223ED6C: ; 0x0223ED6C - str r1, [r0, #4] - str r2, [r0, #8] - str r3, [r0, #0xc] - mov r1, #1 - str r1, [r0, #0] - bx lr - thumb_func_end ov83_0223ED6C - - thumb_func_start ov83_0223ED78 -ov83_0223ED78: ; 0x0223ED78 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r5, r7, #0 - mov r6, #0 - add r4, r7, #0 - add r5, #0x10 -_0223ED84: - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223ED94 - add r0, r5, #0 - bl ov83_0223F054 -_0223ED94: - add r6, r6, #1 - add r4, #0x80 - add r5, #0x80 - cmp r6, #8 - blt _0223ED84 - mov r0, #0 - str r0, [r7, #0] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223ED78 - - thumb_func_start ov83_0223EDA4 -ov83_0223EDA4: ; 0x0223EDA4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r5, #0 - add r7, r1, #0 - mov r6, #0 - add r4, #0x10 -_0223EDB0: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223EDCE - add r0, r4, #0 - bl ov83_0223F074 - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _0223EDCE - add r0, r4, #0 - add r1, r7, #0 - bl ov83_0223F0F4 -_0223EDCE: - add r6, r6, #1 - add r5, #0x80 - add r4, #0x80 - cmp r6, #8 - blt _0223EDB0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223EDA4 - - thumb_func_start ov83_0223EDDC -ov83_0223EDDC: ; 0x0223EDDC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0xb8 - add r5, r0, #0 - lsl r0, r1, #1 - add r0, r1, r0 - add r2, r2, r0 - mov r0, #0x1c - add r1, r2, #0 - mul r1, r0 - ldr r0, _0223EFC0 ; =0x022404B0 - add r3, sp, #0x9c - add r4, r0, r1 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r4, #0] - cmp r2, #8 - str r0, [r3, #0] - blt _0223EE0A - b _0223EFBC -_0223EE0A: - add r0, r5, #0 - bl ov83_0223EFF4 - str r0, [sp, #0x60] - cmp r0, #0 - bne _0223EE2C - add r0, r5, #0 - bl ov83_0223F018 - str r0, [sp, #0x60] - cmp r0, #0 - bne _0223EE26 - bl sub_02022974 -_0223EE26: - ldr r0, [sp, #0x60] - bl ov83_0223F054 -_0223EE2C: - bl sub_0201D35C - lsl r0, r0, #0x10 - lsr r6, r0, #0x10 - bl sub_0201D35C - add r1, sp, #0x9c - ldrb r1, [r1, #0x11] - bl sub_020E2178 - add r0, sp, #0x9c - ldrb r0, [r0, #0x10] - add r4, r0, r1 - bl sub_0201D35C - add r1, sp, #0x9c - ldrb r1, [r1, #0x13] - bl sub_020E2178 - add r0, sp, #0x9c - ldrb r0, [r0, #0x12] - add r0, r0, r1 - add r0, r0, r4 - asr r1, r6, #4 - lsl r2, r1, #1 - lsl r0, r0, #0xc - str r0, [sp, #0x6c] - asr r0, r0, #0x1f - lsl r3, r2, #1 - ldr r1, _0223EFC4 ; =0x020F983C - str r0, [sp, #0x70] - ldr r0, [sp, #0xa8] - ldrsh r6, [r1, r3] - lsl r3, r4, #0xc - add r2, r2, #1 - str r3, [sp, #0x64] - asr r3, r3, #0x1f - lsl r2, r2, #1 - str r0, [sp, #0x74] - asr r0, r0, #0x1f - str r3, [sp, #0x68] - ldrsh r4, [r1, r2] - str r0, [sp, #0x78] - bl sub_0201D35C - ldr r1, [sp, #0xa0] - bl sub_020E2178 - ldr r0, [sp, #0x9c] - ldr r2, [sp, #0x64] - add r0, r0, r1 - str r0, [sp, #0x5c] - asr r0, r6, #0x1f - str r0, [sp, #0x7c] - ldr r1, [sp, #0x7c] - ldr r3, [sp, #0x68] - add r0, r6, #0 - asr r7, r4, #0x1f - bl sub_020E1F1C - str r1, [sp, #0x58] - str r0, [sp, #0x80] - ldr r1, [sp, #0x7c] - ldr r2, [sp, #0x6c] - ldr r3, [sp, #0x70] - add r0, r6, #0 - bl sub_020E1F1C - str r1, [sp, #0x50] - str r0, [sp, #0x84] - ldr r1, [sp, #0x7c] - ldr r2, [sp, #0x74] - ldr r3, [sp, #0x78] - add r0, r6, #0 - bl sub_020E1F1C - str r0, [sp, #0x88] - str r1, [sp, #0x98] - ldr r2, [sp, #0x64] - ldr r3, [sp, #0x68] - add r0, r4, #0 - add r1, r7, #0 - bl sub_020E1F1C - str r0, [sp, #0x8c] - str r1, [sp, #0x48] - ldr r2, [sp, #0x6c] - ldr r3, [sp, #0x70] - add r0, r4, #0 - add r1, r7, #0 - bl sub_020E1F1C - str r0, [sp, #0x90] - str r1, [sp, #0x40] - ldr r2, [sp, #0x74] - ldr r3, [sp, #0x78] - add r0, r4, #0 - add r1, r7, #0 - bl sub_020E1F1C - add r2, r0, #0 - mov r4, #2 - ldr r0, [sp, #0x88] - ldr r3, [sp, #0x98] - mov r6, #0 - lsl r4, r4, #0xa - add r0, r0, r4 - adc r3, r6 - str r3, [sp, #0x98] - lsl r3, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r3 - str r0, [sp] - ldr r0, [sp, #0x8c] - ldr r3, [sp, #0x48] - add r0, r0, r4 - adc r3, r6 - str r3, [sp, #0x48] - mov r7, #6 - lsl r3, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r3 - lsl r7, r7, #0x10 - add r0, r0, r7 - str r0, [sp, #4] - ldr r0, [sp, #0x90] - ldr r3, [sp, #0x40] - add r0, r0, r4 - adc r3, r6 - str r3, [sp, #0x40] - lsl r3, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r3 - add r0, r0, r7 - add r2, r2, r4 - adc r1, r6 - str r0, [sp, #8] - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [sp, #0xc] - ldr r0, _0223EFC8 ; =0x0000019A - add r2, sp, #0x9c - str r0, [sp, #0x10] - ldr r0, [sp, #0x5c] - mov r1, #0x38 - str r0, [sp, #0x14] - ldr r0, [sp, #0xa4] - str r0, [sp, #0x18] - ldrb r0, [r2, #0x18] - str r0, [sp, #0x1c] - ldrb r0, [r2, #0x14] - str r0, [sp, #0x20] - ldrb r3, [r2, #0x15] - ldr r0, [r5, #8] - mul r1, r3 - add r0, r0, r1 - str r0, [sp, #0x24] - ldrb r0, [r2, #0x16] - str r0, [sp, #0x28] - ldr r0, [r5, #4] - str r0, [sp, #0x2c] - ldr r0, [r5, #0xc] - str r0, [sp, #0x30] - ldrb r0, [r2, #0x19] - str r0, [sp, #0x34] - ldrb r0, [r2, #0x1a] - str r0, [sp, #0x38] - ldrb r1, [r2, #0x17] - ldr r2, [sp, #0x80] - ldr r0, [sp, #0x60] - add r3, r2, r4 - ldr r2, [sp, #0x58] - adc r2, r6 - str r2, [sp, #0x58] - lsl r2, r2, #0x14 - lsr r3, r3, #0xc - orr r3, r2 - lsl r2, r4, #8 - add r2, r3, r2 - ldr r3, [sp, #0x84] - add r7, r3, r4 - ldr r3, [sp, #0x50] - adc r3, r6 - str r3, [sp, #0x50] - lsl r3, r3, #0x14 - lsr r6, r7, #0xc - orr r6, r3 - lsl r3, r4, #8 - add r3, r6, r3 - bl ov83_0223F1C0 - mov r1, #0x41 - lsl r1, r1, #4 - ldr r2, [r5, r1] - ldr r0, [sp, #0x60] - str r2, [r0, #0x7c] - ldr r0, [r5, r1] - add r0, r0, #1 - str r0, [r5, r1] -_0223EFBC: - add sp, #0xb8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223EFC0: .word 0x022404B0 -_0223EFC4: .word 0x020F983C -_0223EFC8: .word 0x0000019A - thumb_func_end ov83_0223EDDC - - thumb_func_start ov83_0223EFCC -ov83_0223EFCC: ; 0x0223EFCC - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r5, #0 - mov r6, #0 - add r4, #0x10 -_0223EFD6: - add r0, r5, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0223EFE6 - add r0, r4, #0 - bl ov83_0223F268 -_0223EFE6: - add r6, r6, #1 - add r5, #0x80 - add r4, #0x80 - cmp r6, #8 - blt _0223EFD6 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223EFCC - - thumb_func_start ov83_0223EFF4 -ov83_0223EFF4: ; 0x0223EFF4 - mov r2, #0 - add r3, r0, #0 -_0223EFF8: - add r1, r3, #0 - add r1, #0x88 - ldr r1, [r1, #0] - cmp r1, #0 - bne _0223F00A - add r0, #0x10 - lsl r1, r2, #7 - add r0, r0, r1 - bx lr -_0223F00A: - add r2, r2, #1 - add r3, #0x80 - cmp r2, #8 - blt _0223EFF8 - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223EFF4 - - thumb_func_start ov83_0223F018 -ov83_0223F018: ; 0x0223F018 - push {r4, r5} - mov r2, #0 - add r3, r0, #0 - add r1, r2, #0 - add r3, #0x10 -_0223F022: - add r4, r0, #0 - add r4, #0x88 - ldr r4, [r4, #0] - cmp r4, #0 - beq _0223F042 - cmp r2, #0 - bne _0223F034 - add r2, r3, #0 - b _0223F042 -_0223F034: - add r4, r0, #0 - add r4, #0x8c - ldr r5, [r2, #0x7c] - ldr r4, [r4, #0] - cmp r5, r4 - ble _0223F042 - add r2, r3, #0 -_0223F042: - add r1, r1, #1 - add r0, #0x80 - add r3, #0x80 - cmp r1, #8 - blt _0223F022 - add r0, r2, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223F018 - - thumb_func_start ov83_0223F054 -ov83_0223F054: ; 0x0223F054 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x78] - cmp r0, #0 - bne _0223F062 - bl sub_02022974 -_0223F062: - ldr r0, [r4, #0x78] - bl sub_02021BD4 - add r0, r4, #0 - mov r1, #0 - mov r2, #0x80 - bl sub_020D5124 - pop {r4, pc} - thumb_func_end ov83_0223F054 - - thumb_func_start ov83_0223F074 -ov83_0223F074: ; 0x0223F074 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _0223F0C6 - add r0, r4, #0 - add r0, #0x30 - bl ov83_0223DA94 - str r0, [r4, #4] - add r0, r4, #0 - add r0, #0x48 - bl ov83_0223DA94 - add r0, r4, #0 - add r0, #0x60 - bl ov83_0223DA94 - ldr r0, [r4, #0x30] - add r1, r4, #0 - str r0, [r4, #0x14] - ldr r0, [r4, #0x48] - add r1, #0x14 - str r0, [r4, #0x18] - ldr r0, [r4, #0x78] - bl sub_02021C50 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0223F0C6 - ldr r0, [r4, #0x60] - add r1, r4, #0 - str r0, [r4, #0x20] - ldr r0, [r4, #0x60] - add r1, #0x20 - str r0, [r4, #0x24] - ldr r0, [r4, #0x60] - str r0, [r4, #0x28] - ldr r0, [r4, #0x78] - bl sub_02021C70 -_0223F0C6: - ldr r0, [r4, #8] - cmp r0, #0 - bne _0223F0DA - ldr r0, [r4, #0x78] - bl sub_02021FD0 - cmp r0, #0 - bne _0223F0DA - mov r0, #1 - str r0, [r4, #8] -_0223F0DA: - ldr r0, [r4, #0] - cmp r0, #0 - bne _0223F0F2 - ldr r0, [r4, #4] - cmp r0, #1 - bne _0223F0F2 - ldr r0, [r4, #8] - cmp r0, #1 - bne _0223F0F2 - add r0, r4, #0 - bl ov83_0223F054 -_0223F0F2: - pop {r4, pc} - thumb_func_end ov83_0223F074 - - thumb_func_start ov83_0223F0F4 -ov83_0223F0F4: ; 0x0223F0F4 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [r5, #4] - cmp r0, #1 - bne _0223F1B8 - ldr r0, [r5, #8] - cmp r0, #1 - bne _0223F1B8 - add r0, r1, #0 - add r0, #0xa4 - ldrb r0, [r0] - ldr r2, [r5, #0x2c] - cmp r0, #0 - bne _0223F11A - add r1, #0xa2 - ldrh r0, [r1] - add r0, r2, r0 - b _0223F120 -_0223F11A: - add r1, #0xa2 - ldrh r0, [r1] - sub r0, r2, r0 -_0223F120: - str r0, [r5, #0x2c] - mov r0, #2 - ldr r1, [r5, #0x14] - lsl r0, r0, #0x12 - sub r4, r1, r0 - mov r0, #6 - mov r2, #0 - ldr r1, [r5, #0x18] - lsl r0, r0, #0x10 - sub r6, r1, r0 - asr r0, r4, #0xc - asr r1, r6, #0xc - add r3, r2, #0 - bl sub_0201E3BC - add r7, r0, #0 - add r0, r6, #0 - add r1, r4, #0 - bl sub_020BDA20 - lsl r6, r7, #0xc - ldr r1, [r5, #0x2c] - asr r7, r6, #0x1f - add r0, r0, r1 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - asr r0, r0, #4 - lsl r4, r0, #1 - add r0, r4, #1 - lsl r1, r0, #1 - ldr r0, _0223F1BC ; =0x020F983C - add r2, r6, #0 - ldrsh r0, [r0, r1] - add r3, r7, #0 - asr r1, r0, #0x1f - bl sub_020E1F1C - add r2, r0, #0 - mov r0, #2 - mov r3, #0 - lsl r0, r0, #0xa - add r0, r2, r0 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - str r0, [sp] - ldr r0, _0223F1BC ; =0x020F983C - lsl r1, r4, #1 - ldrsh r0, [r0, r1] - add r2, r6, #0 - add r3, r7, #0 - asr r1, r0, #0x1f - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r0, r0, r2 - adc r1, r3 - lsl r1, r1, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r3, [sp] - lsl r1, r2, #8 - add r1, r3, r1 - str r1, [sp] - mov r1, #6 - lsl r1, r1, #0x10 - str r0, [sp, #4] - add r0, r0, r1 - str r0, [sp, #4] - ldr r0, [r5, #0x78] - add r1, sp, #0 - bl sub_02021C50 -_0223F1B8: - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F1BC: .word 0x020F983C - thumb_func_end ov83_0223F0F4 - - thumb_func_start ov83_0223F1C0 -ov83_0223F1C0: ; 0x0223F1C0 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [sp, #0x40] - str r1, [r5, #0] - add r4, r2, #0 - str r0, [sp] - add r0, r5, #0 - add r2, r3, #0 - ldr r3, [sp, #0x20] - add r0, #0x30 - add r1, r4, #0 - ldr r6, [sp, #0x30] - bl ov83_0223DA34 - ldr r0, [sp, #0x40] - ldr r1, [sp, #0x24] - str r0, [sp] - add r0, r5, #0 - ldr r2, [sp, #0x28] - ldr r3, [sp, #0x2c] - add r0, #0x48 - bl ov83_0223DA34 - ldr r0, [sp, #0x40] - ldr r2, [sp, #0x34] - str r0, [sp] - add r0, r5, #0 - ldr r3, [sp, #0x38] - add r0, #0x60 - add r1, r6, #0 - bl ov83_0223DA34 - ldr r3, [sp, #0x24] - str r4, [r5, #0x14] - str r3, [r5, #0x18] - str r6, [r5, #0x20] - str r6, [r5, #0x24] - ldr r0, [sp, #0x3c] - str r6, [r5, #0x28] - str r0, [r5, #0xc] - ldr r0, [sp, #0x54] - ldr r1, [sp, #0x44] - str r0, [r5, #0x10] - mov r0, #0 - str r0, [sp] - add r0, sp, #0x58 - ldrb r0, [r0] - add r2, r4, #0 - str r0, [sp, #4] - ldr r0, [sp, #0x50] - str r0, [sp, #8] - ldr r0, [sp, #0x4c] - bl ov83_0223D9A8 - str r0, [r5, #0x78] - cmp r0, #0 - bne _0223F238 - bl sub_02022974 -_0223F238: - ldr r0, [r5, #0xc] - cmp r0, #0 - beq _0223F24A - add r1, r5, #0 - ldr r0, [r5, #0x78] - add r1, #0x20 - mov r2, #2 - bl sub_02021C80 -_0223F24A: - ldr r0, [r5, #0x78] - ldr r1, [sp, #0x48] - bl sub_02021D6C - ldr r0, [r5, #0x78] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r5, #0x78] - mov r1, #2 - bl sub_02021E80 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F1C0 - - thumb_func_start ov83_0223F268 -ov83_0223F268: ; 0x0223F268 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #1 - bne _0223F296 - mov r0, #8 - str r0, [sp] - add r0, r4, #0 - ldr r1, [r4, #0x60] - add r0, #0x60 - mov r2, #0xcd - mov r3, #0 - bl ov83_0223DA34 - mov r0, #0 - str r0, [r4, #0] - mov r0, #1 - str r0, [r4, #0xc] - ldr r0, [r4, #0x78] - mov r1, #2 - bl sub_02021CF8 -_0223F296: - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F268 - - thumb_func_start ov83_0223F29C -ov83_0223F29C: ; 0x0223F29C - ldr r3, _0223F2A4 ; =sub_020D5124 - mov r1, #0 - mov r2, #0x80 - bx r3 - ; .align 2, 0 -_0223F2A4: .word sub_020D5124 - thumb_func_end ov83_0223F29C - - thumb_func_start ov83_0223F2A8 -ov83_0223F2A8: ; 0x0223F2A8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x7c] - cmp r0, #0 - beq _0223F2B6 - bl sub_02022974 -_0223F2B6: - add r0, r4, #0 - mov r1, #0 - mov r2, #0x80 - bl sub_020D5124 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F2A8 - - thumb_func_start ov83_0223F2C4 -ov83_0223F2C4: ; 0x0223F2C4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r6, r0, #0 - ldr r0, [r6, #0x7c] - add r7, r1, #0 - add r4, r3, #0 - str r2, [sp, #0x18] - cmp r0, #0 - beq _0223F2DA - bl sub_02022974 -_0223F2DA: - str r7, [r6, #0] - mov r0, #2 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x1f - str r0, [sp, #8] - mov r0, #0x1e - str r0, [sp, #0xc] - ldr r0, _0223F344 ; =0x00001B58 - add r1, r6, #4 - str r0, [sp, #0x10] - ldr r0, [sp, #0x18] - add r2, r4, #0 - str r0, [sp, #0x14] - add r0, r7, #0 - mov r3, #0x21 - bl ov83_0223D7A8 - mov r4, #0 - add r5, r6, #0 -_0223F304: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x18] - mov r2, #2 - mov r3, #6 - str r0, [sp, #8] - add r0, r7, #0 - add r1, r6, #4 - lsl r2, r2, #0x12 - lsl r3, r3, #0x10 - bl ov83_0223D9A8 - str r0, [r5, #0x3c] - cmp r4, #2 - blt _0223F32C - ldr r0, [r5, #0x3c] - mov r1, #1 - bl sub_02021D6C -_0223F32C: - ldr r0, [r5, #0x3c] - mov r1, #0 - bl sub_02021CAC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0223F304 - mov r0, #1 - str r0, [r6, #0x7c] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223F344: .word 0x00001B58 - thumb_func_end ov83_0223F2C4 - - thumb_func_start ov83_0223F348 -ov83_0223F348: ; 0x0223F348 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, [r6, #0x7c] - cmp r0, #1 - beq _0223F356 - bl sub_02022974 -_0223F356: - mov r4, #0 - add r5, r6, #0 -_0223F35A: - ldr r0, [r5, #0x3c] - bl sub_02021BD4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0223F35A - ldr r0, [r6, #0] - add r1, r6, #4 - bl ov83_0223D95C - mov r0, #0 - str r0, [r6, #0x7c] - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F348 - - thumb_func_start ov83_0223F378 -ov83_0223F378: ; 0x0223F378 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0x3c -_0223F380: - cmp r4, #2 - beq _0223F388 - cmp r4, #0 - bne _0223F390 -_0223F388: - add r0, r5, #0 - bl ov83_0223F420 - b _0223F396 -_0223F390: - add r0, r5, #0 - bl ov83_0223F458 -_0223F396: - add r4, r4, #1 - add r5, #0x10 - cmp r4, #4 - blt _0223F380 - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223F378 - - thumb_func_start ov83_0223F3A0 -ov83_0223F3A0: ; 0x0223F3A0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #4 - blt _0223F3AE - bl sub_02022974 -_0223F3AE: - cmp r5, #2 - beq _0223F3B6 - cmp r5, #0 - bne _0223F3C2 -_0223F3B6: - add r4, #0x3c - lsl r0, r5, #4 - add r0, r4, r0 - bl ov83_0223F410 - pop {r3, r4, r5, pc} -_0223F3C2: - add r4, #0x3c - lsl r0, r5, #4 - add r0, r4, r0 - bl ov83_0223F44C - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F3A0 - - thumb_func_start ov83_0223F3D0 -ov83_0223F3D0: ; 0x0223F3D0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #4 - blt _0223F3DE - bl sub_02022974 -_0223F3DE: - lsl r0, r5, #4 - mov r1, #0 - add r0, r4, r0 - str r1, [r0, #0x48] - ldr r0, [r0, #0x3c] - bl sub_02021CAC - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F3D0 - - thumb_func_start ov83_0223F3F0 -ov83_0223F3F0: ; 0x0223F3F0 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #4 - blt _0223F3FE - bl sub_02022974 -_0223F3FE: - lsl r0, r5, #4 - add r0, r4, r0 - ldr r0, [r0, #0x48] - cmp r0, #0 - bne _0223F40C - mov r0, #1 - pop {r3, r4, r5, pc} -_0223F40C: - mov r0, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223F3F0 - - thumb_func_start ov83_0223F410 -ov83_0223F410: ; 0x0223F410 - mov r1, #0 - str r1, [r0, #4] - mov r1, #3 - str r1, [r0, #8] - mov r1, #1 - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223F410 - - thumb_func_start ov83_0223F420 -ov83_0223F420: ; 0x0223F420 - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0xc] - cmp r1, #0 - beq _0223F448 - bl ov83_0223F458 - ldr r0, [r4, #4] - cmp r0, #0 - bne _0223F448 - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0 - bgt _0223F448 - mov r1, #0 - str r1, [r4, #0xc] - ldr r0, [r4, #0] - bl sub_02021CAC -_0223F448: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F420 - - thumb_func_start ov83_0223F44C -ov83_0223F44C: ; 0x0223F44C - mov r1, #0 - str r1, [r0, #4] - mov r1, #1 - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov83_0223F44C - - thumb_func_start ov83_0223F458 -ov83_0223F458: ; 0x0223F458 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0223F490 - ldr r0, [r4, #4] - cmp r0, #0 - bne _0223F472 - ldr r0, [r4, #0] - mov r1, #1 - bl sub_02021CAC - b _0223F48A -_0223F472: - cmp r0, #8 - bne _0223F480 - ldr r0, [r4, #0] - mov r1, #0 - bl sub_02021CAC - b _0223F48A -_0223F480: - cmp r0, #0x10 - bne _0223F48A - mov r0, #0 - str r0, [r4, #4] - pop {r4, pc} -_0223F48A: - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] -_0223F490: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F458 - - thumb_func_start ov83_0223F494 -ov83_0223F494: ; 0x0223F494 - push {r3, r4, r5, lr} - ldr r2, _0223F4A8 ; =0x0000090C - add r4, r1, #0 - mov r1, #0 - add r5, r0, #0 - bl sub_020D5124 - str r4, [r5, #4] - pop {r3, r4, r5, pc} - nop -_0223F4A8: .word 0x0000090C - thumb_func_end ov83_0223F494 - - thumb_func_start ov83_0223F4AC -ov83_0223F4AC: ; 0x0223F4AC - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223F4BA - bl sub_02022974 -_0223F4BA: - ldr r2, _0223F4C8 ; =0x0000090C - add r0, r4, #0 - mov r1, #0 - bl sub_020D5124 - pop {r4, pc} - nop -_0223F4C8: .word 0x0000090C - thumb_func_end ov83_0223F4AC - - thumb_func_start ov83_0223F4CC -ov83_0223F4CC: ; 0x0223F4CC - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r6, r2, #0 - str r0, [sp, #0xc] - str r1, [sp, #0x10] - add r7, r3, #0 - mov r4, #0 - add r5, r0, #0 - add r6, #0x38 -_0223F4DE: - mov r0, #0 - str r0, [sp] - mov r0, #5 - str r0, [sp, #4] - mov r2, #0 - ldr r0, [sp, #0x10] - add r1, r6, #0 - add r3, r2, #0 - str r7, [sp, #8] - bl ov83_0223D9A8 - mov r1, #0 - str r0, [r5, #0x50] - bl sub_02021CAC - add r4, r4, #1 - add r5, #0x48 - cmp r4, #0x20 - blt _0223F4DE - ldr r0, [sp, #0xc] - mov r1, #1 - str r1, [r0, #0] - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F4CC - - thumb_func_start ov83_0223F510 -ov83_0223F510: ; 0x0223F510 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_0223F518: - ldr r0, [r5, #0x50] - bl sub_02021BD4 - add r4, r4, #1 - add r5, #0x48 - cmp r4, #0x20 - blt _0223F518 - mov r0, #0 - str r0, [r6, #0] - pop {r4, r5, r6, pc} - thumb_func_end ov83_0223F510 - - thumb_func_start ov83_0223F52C -ov83_0223F52C: ; 0x0223F52C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r4, #0 - add r5, #0xc -_0223F534: - add r0, r5, #0 - bl ov83_0223F670 - add r4, r4, #1 - add r5, #0x48 - cmp r4, #0x20 - blt _0223F534 - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223F52C - - thumb_func_start ov83_0223F544 -ov83_0223F544: ; 0x0223F544 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - add r4, r0, #0 - add r0, r1, #0 - str r1, [sp, #0x10] - add r1, r2, #0 - sub r0, #0x80 - sub r1, #0x60 - str r2, [sp, #0x14] - bl sub_020BDA20 - asr r0, r0, #4 - lsl r1, r0, #1 - add r0, r1, #1 - ldr r7, _0223F648 ; =0x020F983C - lsl r0, r0, #1 - ldrsh r3, [r7, r0] - asr r6, r3, #0x1f - lsr r2, r3, #0x10 - lsl r0, r6, #0x10 - orr r0, r2 - mov r2, #2 - lsl r5, r3, #0x10 - lsl r2, r2, #0xa - add r5, r5, r2 - ldr r2, _0223F64C ; =0x00000000 - adc r0, r2 - lsr r2, r5, #0xc - lsl r0, r0, #0x14 - str r2, [sp, #0x18] - orr r2, r0 - lsl r0, r1, #1 - str r2, [sp, #0x18] - ldrsh r2, [r7, r0] - asr r0, r2, #0x1f - mov ip, r0 - lsr r1, r2, #0x10 - lsl r0, r0, #0x10 - orr r0, r1 - mov r1, #2 - lsl r5, r2, #0x10 - lsl r1, r1, #0xa - add r1, r5, r1 - ldr r5, _0223F64C ; =0x00000000 - adc r0, r5 - lsr r7, r1, #0xc - lsl r0, r0, #0x14 - orr r7, r0 - lsr r0, r3, #0x14 - lsl r1, r6, #0xc - orr r1, r0 - mov r0, #2 - lsl r3, r3, #0xc - lsl r0, r0, #0xa - add r0, r3, r0 - ldr r3, _0223F64C ; =0x00000000 - adc r1, r3 - lsr r6, r0, #0xc - lsl r1, r1, #0x14 - orr r6, r1 - mov r1, ip - lsr r0, r2, #0x14 - lsl r1, r1, #0xc - orr r1, r0 - mov r0, #2 - lsl r2, r2, #0xc - lsl r0, r0, #0xa - add r2, r2, r0 - ldr r0, _0223F64C ; =0x00000000 - adc r1, r0 - lsl r0, r1, #0x14 - lsr r5, r2, #0xc - orr r5, r0 - add r0, r4, #0 - bl ov83_0223F650 - cmp r0, #0 - beq _0223F604 - mov r2, #2 - ldr r1, [sp, #0x18] - lsl r2, r2, #0x12 - add r1, r1, r2 - str r1, [sp] - mov r1, #6 - lsl r1, r1, #0x10 - add r1, r7, r1 - str r1, [sp, #4] - str r6, [sp, #8] - str r5, [sp, #0xc] - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - ldr r1, [r4, #8] - lsl r2, r2, #0xc - lsl r3, r3, #0xc - bl ov83_0223F6CC -_0223F604: - add r0, r4, #0 - bl ov83_0223F650 - cmp r0, #0 - beq _0223F636 - mov r2, #2 - ldr r1, [sp, #0x18] - lsl r2, r2, #0x12 - sub r1, r2, r1 - str r1, [sp] - mov r1, #6 - lsl r1, r1, #0x10 - sub r1, r1, r7 - str r1, [sp, #4] - neg r1, r6 - str r1, [sp, #8] - neg r1, r5 - ldr r2, [sp, #0x10] - ldr r3, [sp, #0x14] - str r1, [sp, #0xc] - ldr r1, [r4, #8] - lsl r2, r2, #0xc - lsl r3, r3, #0xc - bl ov83_0223F6CC -_0223F636: - ldr r0, [r4, #8] - ldr r1, [r4, #4] - add r0, r0, #1 - bl sub_020E1F6C - str r1, [r4, #8] - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_0223F648: .word 0x020F983C -_0223F64C: .word 0x00000000 - thumb_func_end ov83_0223F544 - - thumb_func_start ov83_0223F650 -ov83_0223F650: ; 0x0223F650 - mov r2, #0 - add r3, r0, #0 -_0223F654: - ldr r1, [r3, #0xc] - cmp r1, #0 - bne _0223F664 - mov r1, #0x48 - add r0, #0xc - mul r1, r2 - add r0, r0, r1 - bx lr -_0223F664: - add r2, r2, #1 - add r3, #0x48 - cmp r2, #0x20 - blt _0223F654 - mov r0, #0 - bx lr - thumb_func_end ov83_0223F650 - - thumb_func_start ov83_0223F670 -ov83_0223F670: ; 0x0223F670 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223F6B0 - ldr r0, [r4, #4] - cmp r0, #0 - bne _0223F6A4 - add r0, r4, #0 - add r0, #0x14 - bl ov83_0223DA94 - str r0, [r4, #4] - add r0, r4, #0 - add r0, #0x2c - bl ov83_0223DA94 - ldr r0, [r4, #0x14] - add r1, r4, #0 - str r0, [r4, #8] - ldr r0, [r4, #0x2c] - add r1, #8 - str r0, [r4, #0xc] - ldr r0, [r4, #0x44] - bl sub_02021C50 -_0223F6A4: - ldr r0, [r4, #4] - cmp r0, #1 - bne _0223F6B0 - add r0, r4, #0 - bl ov83_0223F6B4 -_0223F6B0: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F670 - - thumb_func_start ov83_0223F6B4 -ov83_0223F6B4: ; 0x0223F6B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0223F6CA - ldr r0, [r4, #0x44] - mov r1, #0 - bl sub_02021CAC - mov r0, #0 - str r0, [r4, #0] -_0223F6CA: - pop {r4, pc} - thumb_func_end ov83_0223F6B4 - - thumb_func_start ov83_0223F6CC -ov83_0223F6CC: ; 0x0223F6CC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0x10 - add r4, r2, #0 - add r6, r3, #0 - str r0, [sp] - add r0, r5, #0 - add r7, r1, #0 - ldr r2, [sp, #0x18] - ldr r3, [sp, #0x20] - add r0, #0x14 - add r1, r4, #0 - bl ov83_0223DA34 - mov r0, #0x10 - str r0, [sp] - add r0, r5, #0 - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x24] - add r0, #0x2c - add r1, r6, #0 - bl ov83_0223DA34 - str r4, [r5, #8] - str r6, [r5, #0xc] - ldr r0, [r5, #0x44] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r5, #0x44] - add r1, r7, #0 - bl sub_02021D6C - ldr r0, [r5, #0x44] - bl sub_02021DE0 - ldr r0, [r5, #0x44] - mov r1, #1 - bl sub_02021CC8 - ldr r0, [r5, #0x44] - mov r1, #2 - bl sub_02021E80 - mov r0, #1 - str r0, [r5, #0] - mov r0, #0 - str r0, [r5, #4] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F6CC - - thumb_func_start ov83_0223F730 -ov83_0223F730: ; 0x0223F730 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #2 - add r4, r1, #0 - str r0, [sp] - ldr r0, [sp, #0x28] - mov r1, #1 - add r6, r2, #0 - add r7, r3, #0 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02098FFC - str r0, [r5, #0] - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - lsl r2, r4, #0x10 - lsl r3, r6, #0x10 - ldr r0, [r5, #0] - add r1, r7, #0 - lsr r2, r2, #0x10 - lsr r3, r3, #0x10 - bl sub_0209916C - str r0, [r5, #4] - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F730 - - thumb_func_start ov83_0223F770 -ov83_0223F770: ; 0x0223F770 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r1, [r4, #4] - bl sub_02099370 - ldr r0, [r4, #0] - bl sub_0209903C - pop {r4, pc} - thumb_func_end ov83_0223F770 - - thumb_func_start ov83_0223F784 -ov83_0223F784: ; 0x0223F784 - ldr r3, _0223F78C ; =sub_02099160 - ldr r0, [r0, #0] - bx r3 - nop -_0223F78C: .word sub_02099160 - thumb_func_end ov83_0223F784 - - thumb_func_start ov83_0223F790 -ov83_0223F790: ; 0x0223F790 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r4, r2, #0 - bl sub_02015920 - str r0, [r5, #0] - str r4, [r5, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F790 - - thumb_func_start ov83_0223F7A4 -ov83_0223F7A4: ; 0x0223F7A4 - ldr r3, _0223F7AC ; =sub_02015938 - ldr r0, [r0, #0] - bx r3 - nop -_0223F7AC: .word sub_02015938 - thumb_func_end ov83_0223F7A4 - - thumb_func_start ov83_0223F7B0 -ov83_0223F7B0: ; 0x0223F7B0 - push {lr} - sub sp, #0x14 - ldr r1, [r0, #4] - mov r2, #0x18 - str r1, [sp] - mov r1, #2 - str r1, [sp, #4] - mov r1, #0xaf - str r1, [sp, #8] - mov r1, #5 - str r1, [sp, #0xc] - add r1, sp, #0 - strb r2, [r1, #0x10] - mov r2, #8 - strb r2, [r1, #0x11] - ldr r0, [r0, #0] - add r1, sp, #0 - bl sub_02015958 - add sp, #0x14 - pop {pc} - ; .align 2, 0 - thumb_func_end ov83_0223F7B0 - - thumb_func_start ov83_0223F7DC -ov83_0223F7DC: ; 0x0223F7DC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - bl sub_020159FC - add r4, r0, #0 - beq _0223F7F0 - ldr r0, [r5, #0] - bl sub_02015A54 -_0223F7F0: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223F7DC - - thumb_func_start ov83_0223F7F4 -ov83_0223F7F4: ; 0x0223F7F4 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r4, r1, #0 - add r1, r3, #0 - ldr r3, [sp, #0x1c] - add r5, r0, #0 - ldr r6, [sp, #0x18] - add r0, r2, #0 - sub r4, r4, r3 - sub r1, r1, r3 - mov r3, #0 - str r3, [sp] - sub r2, r5, r6 - sub r0, r0, r6 - add r3, r4, #0 - bl sub_0201D4CC - mov r1, #0xa0 - mul r1, r0 - add r0, r1, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov83_0223F7F4 - - thumb_func_start ov83_0223F820 -ov83_0223F820: ; 0x0223F820 - add r3, r0, #0 - mov r2, #0x18 - mov r1, #0 -_0223F826: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _0223F826 - mov r2, #0x80 - str r2, [r0, #0] - mov r1, #0x60 - str r1, [r0, #4] - str r2, [r0, #8] - str r1, [r0, #0xc] - bx lr - thumb_func_end ov83_0223F820 - - thumb_func_start ov83_0223F83C -ov83_0223F83C: ; 0x0223F83C - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, _0223F888 ; =0x021BF6BC - ldrh r1, [r0, #0x22] - cmp r1, #0 - beq _0223F860 - ldrh r1, [r0, #0x1c] - str r1, [r4, #0] - ldrh r0, [r0, #0x1e] - str r0, [r4, #4] - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _0223F860 - ldr r0, [r4, #0] - str r0, [r4, #8] - ldr r0, [r4, #4] - str r0, [r4, #0xc] -_0223F860: - mov r0, #0x80 - str r0, [sp] - mov r0, #0x60 - str r0, [sp, #4] - ldr r0, [r4, #0] - ldr r1, [r4, #4] - ldr r2, [r4, #8] - ldr r3, [r4, #0xc] - bl ov83_0223F7F4 - str r0, [r4, #0x10] - ldr r0, [r4, #0] - str r0, [r4, #8] - ldr r0, [r4, #4] - str r0, [r4, #0xc] - ldr r0, _0223F888 ; =0x021BF6BC - ldrh r0, [r0, #0x22] - str r0, [r4, #0x14] - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_0223F888: .word 0x021BF6BC - thumb_func_end ov83_0223F83C - - thumb_func_start ov83_0223F88C -ov83_0223F88C: ; 0x0223F88C - ldr r2, [r1, #0] - strb r2, [r0] - ldr r2, [r1, #4] - strb r2, [r0, #1] - ldr r1, [r1, #0x10] - cmp r1, #0 - bge _0223F8A4 - neg r1, r1 - strh r1, [r0, #2] - mov r1, #1 - strb r1, [r0, #4] - bx lr -_0223F8A4: - strh r1, [r0, #2] - mov r1, #0 - strb r1, [r0, #4] - bx lr - thumb_func_end ov83_0223F88C - - thumb_func_start ov83_0223F8AC -ov83_0223F8AC: ; 0x0223F8AC - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - mov r2, #0x80 - mov r3, #0x60 - bl sub_0201E3BC - add r4, r0, #0 - ldr r0, [r5, #0xc] - cmp r0, #0 - bge _0223F8C6 - neg r0, r0 -_0223F8C6: - lsl r0, r0, #0x10 - ldr r1, [r5, #0] - lsr r0, r0, #0x10 - bl ov83_0223FB68 - asr r2, r0, #0x1f - lsl r3, r2, #0x12 - lsr r1, r0, #0xe - orr r3, r1 - mov r1, #2 - lsl r2, r0, #0x12 - mov r0, #0 - lsl r1, r1, #0xa - add r2, r2, r1 - adc r3, r0 - lsl r1, r3, #0x14 - lsr r2, r2, #0xc - orr r2, r1 - asr r1, r2, #0xc - cmp r4, #0x10 - bhs _0223F8F4 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223F8F4: - add r1, #8 - cmp r4, r1 - bls _0223F8FC - mov r0, #2 -_0223F8FC: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223F8AC - - thumb_func_start ov83_0223F900 -ov83_0223F900: ; 0x0223F900 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r0, #0 - mov r0, #1 - str r0, [r5, #0x10] - mov r0, #0 - add r4, r1, #0 - str r2, [sp] - str r3, [sp, #4] - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, r2, #0 - beq _0223F98C -_0223F91A: - ldr r0, [sp, #0xc] - add r1, r4, r0 - mov r0, #0x13 - lsl r0, r0, #4 - ldrb r1, [r1, r0] - mov r0, #0x1c - add r6, r1, #0 - mul r6, r0 - add r1, r4, r6 - add r2, r4, r6 - add r1, #0x90 - add r2, #0x91 - ldrb r1, [r1] - ldrb r2, [r2] - add r0, r5, #0 - bl ov83_0223F8AC - cmp r0, #0 - beq _0223F94A - cmp r0, #1 - beq _0223F952 - cmp r0, #2 - beq _0223F962 - b _0223F968 -_0223F94A: - add r0, r4, r6 - add r0, #0x92 - ldrh r7, [r0] - b _0223F968 -_0223F952: - add r0, r4, r6 - add r0, #0x92 - ldrh r0, [r0] - lsl r0, r0, #0xf - lsr r7, r0, #0x10 - mov r0, #0 - str r0, [r5, #0x10] - b _0223F968 -_0223F962: - mov r7, #0 - add r0, r7, #0 - str r0, [r5, #0x10] -_0223F968: - add r0, r4, r6 - add r0, #0x94 - ldrb r0, [r0] - cmp r0, #0 - bne _0223F97A - ldr r0, [sp, #8] - add r0, r0, r7 - str r0, [sp, #8] - b _0223F980 -_0223F97A: - ldr r0, [sp, #8] - sub r0, r0, r7 - str r0, [sp, #8] -_0223F980: - ldr r0, [sp, #0xc] - add r1, r0, #1 - ldr r0, [sp] - str r1, [sp, #0xc] - cmp r1, r0 - blo _0223F91A -_0223F98C: - ldr r0, [sp, #8] - ldr r1, [sp] - bl sub_020E1F6C - add r4, r0, #0 - ldr r1, [r5, #0] - ldr r0, _0223FA74 ; =0x02240590 - ldrb r0, [r0, r1] - mov r1, #0x33 - lsl r1, r1, #0xe - lsl r0, r0, #0xc - bl sub_020BCFD0 - add r2, r0, #0 - lsl r0, r4, #0xc - asr r1, r0, #0x1f - asr r3, r2, #0x1f - bl sub_020E1F1C - mov r4, #2 - mov r2, #0 - lsl r4, r4, #0xa - add r4, r0, r4 - adc r1, r2 - lsl r0, r1, #0x14 - lsr r1, r4, #0xc - orr r1, r0 - ldr r3, [r5, #0xc] - asr r0, r1, #0xc - add r0, r3, r0 - str r0, [r5, #0xc] - cmp r0, #0 - ble _0223F9E0 - ldr r1, [r5, #0] - lsl r3, r1, #1 - ldr r1, _0223FA78 ; =0x0224059C - ldrh r1, [r1, r3] - sub r0, r0, r1 - str r0, [r5, #0xc] - bpl _0223F9F4 - str r2, [r5, #0xc] - b _0223F9F4 -_0223F9E0: - bge _0223F9F4 - ldr r1, [r5, #0] - lsl r3, r1, #1 - ldr r1, _0223FA78 ; =0x0224059C - ldrh r1, [r1, r3] - add r0, r0, r1 - str r0, [r5, #0xc] - cmp r0, #0 - ble _0223F9F4 - str r2, [r5, #0xc] -_0223F9F4: - ldr r1, [r5, #0xc] - ldr r0, _0223FA7C ; =0x00000E38 - cmp r1, r0 - ble _0223FA00 - str r0, [r5, #0xc] - b _0223FA08 -_0223FA00: - ldr r0, _0223FA80 ; =0xFFFFF1C8 - cmp r1, r0 - bge _0223FA08 - str r0, [r5, #0xc] -_0223FA08: - ldr r0, [r5, #0xc] - mov r1, #0xa0 - ldr r4, [r5, #8] - bl sub_020E1F6C - add r1, r0, #0 - mov r0, #0x44 - bl sub_0201D580 - ldr r1, [r5, #8] - add r0, r1, r0 - str r0, [r5, #8] - ldr r0, [sp, #4] - cmp r0, #0 - bne _0223FA2C - ldr r0, [r5, #0xc] - cmp r0, #0 - bge _0223FA38 -_0223FA2C: - ldr r0, [sp, #4] - cmp r0, #1 - bne _0223FA68 - ldr r0, [r5, #0xc] - cmp r0, #0 - bge _0223FA68 -_0223FA38: - ldr r0, [sp, #4] - cmp r0, #0 - bne _0223FA54 - lsl r0, r4, #0x10 - lsr r1, r0, #0x10 - ldr r0, [r5, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r1, r0 - ble _0223FA68 - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] - b _0223FA68 -_0223FA54: - lsl r0, r4, #0x10 - lsr r1, r0, #0x10 - ldr r0, [r5, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - cmp r1, r0 - bge _0223FA68 - ldr r0, [r5, #4] - add r0, r0, #1 - str r0, [r5, #4] -_0223FA68: - ldr r0, [r5, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FA74: .word 0x02240590 -_0223FA78: .word 0x0224059C -_0223FA7C: .word 0x00000E38 -_0223FA80: .word 0xFFFFF1C8 - thumb_func_end ov83_0223F900 - - thumb_func_start ov83_0223FA84 -ov83_0223FA84: ; 0x0223FA84 - ldr r0, [r0, #8] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bx lr - thumb_func_end ov83_0223FA84 - - thumb_func_start ov83_0223FA8C -ov83_0223FA8C: ; 0x0223FA8C - ldr r0, [r0, #4] - bx lr - thumb_func_end ov83_0223FA8C - - thumb_func_start ov83_0223FA90 -ov83_0223FA90: ; 0x0223FA90 - push {r3, r4, r5, lr} - add r5, r1, #0 - add r4, r0, #0 - cmp r5, #3 - blt _0223FA9E - bl sub_02022974 -_0223FA9E: - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223FA90 - - thumb_func_start ov83_0223FAA8 -ov83_0223FAA8: ; 0x0223FAA8 - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov83_0223FAA8 - - thumb_func_start ov83_0223FAAC -ov83_0223FAAC: ; 0x0223FAAC - push {r4, r5, r6, lr} - add r5, r0, #0 - mov r0, #0 - str r0, [r5, #0x18] - add r4, r1, #0 - add r6, r2, #0 - str r0, [r5, #0x10] - add r0, r4, #0 - add r1, r6, #0 - bl ov83_0223FB30 - cmp r0, #0 - beq _0223FAEA - ldr r0, [r5, #0xc] - add r0, r0, #1 - str r0, [r5, #0xc] - cmp r0, #0x1e - blo _0223FAE4 - ldr r1, [r5, #4] - ldr r0, _0223FB2C ; =0x0000270F - cmp r1, r0 - bhs _0223FADC - add r0, r1, #1 - str r0, [r5, #4] -_0223FADC: - mov r0, #1 - str r0, [r5, #0x18] - mov r0, #0 - str r0, [r5, #0xc] -_0223FAE4: - mov r0, #0 - str r0, [r5, #0x14] - pop {r4, r5, r6, pc} -_0223FAEA: - add r0, r4, #0 - add r1, r6, #0 - bl ov83_0223FB50 - cmp r0, #0 - beq _0223FB26 - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - cmp r0, #0x5a - blo _0223FB2A - mov r0, #0 - str r0, [r5, #8] - ldr r0, [r5, #0x14] - cmp r0, #0 - bne _0223FB14 - mov r0, #2 - str r0, [r5, #0x10] - mov r0, #1 - str r0, [r5, #0x14] - pop {r4, r5, r6, pc} -_0223FB14: - mov r0, #1 - str r0, [r5, #0x10] - ldr r1, [r5, #0] - ldr r0, _0223FB2C ; =0x0000270F - cmp r1, r0 - bhs _0223FB2A - add r0, r1, #1 - str r0, [r5, #0] - pop {r4, r5, r6, pc} -_0223FB26: - mov r0, #0 - str r0, [r5, #0x14] -_0223FB2A: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223FB2C: .word 0x0000270F - thumb_func_end ov83_0223FAAC - - thumb_func_start ov83_0223FB30 -ov83_0223FB30: ; 0x0223FB30 - cmp r1, #2 - bne _0223FB38 - mov r0, #0 - bx lr -_0223FB38: - cmp r0, #0 - bge _0223FB3E - neg r0, r0 -_0223FB3E: - ldr r1, _0223FB4C ; =0x00000E38 - cmp r0, r1 - blt _0223FB48 - mov r0, #1 - bx lr -_0223FB48: - mov r0, #0 - bx lr - ; .align 2, 0 -_0223FB4C: .word 0x00000E38 - thumb_func_end ov83_0223FB30 - - thumb_func_start ov83_0223FB50 -ov83_0223FB50: ; 0x0223FB50 - cmp r0, #0 - bge _0223FB56 - neg r0, r0 -_0223FB56: - ldr r1, _0223FB64 ; =0x0000038E - cmp r0, r1 - bgt _0223FB60 - mov r0, #1 - bx lr -_0223FB60: - mov r0, #0 - bx lr - ; .align 2, 0 -_0223FB64: .word 0x0000038E - thumb_func_end ov83_0223FB50 - - thumb_func_start ov83_0223FB68 -ov83_0223FB68: ; 0x0223FB68 - push {r3, lr} - ldr r1, _0223FB9C ; =0x0000038E - sub r0, r0, r1 - bpl _0223FB72 - mov r0, #0 -_0223FB72: - lsl r2, r0, #0xc - asr r1, r2, #0x1f - lsr r0, r2, #0x16 - lsl r3, r1, #0xa - orr r3, r0 - mov r0, #2 - lsl r2, r2, #0xa - mov r1, #0 - lsl r0, r0, #0xa - add r0, r2, r0 - adc r3, r1 - lsl r1, r3, #0x14 - lsr r0, r0, #0xc - orr r0, r1 - ldr r1, _0223FBA0 ; =0x00AAA000 - bl sub_020BCFD0 - mov r1, #1 - lsl r1, r1, #0xc - add r0, r0, r1 - pop {r3, pc} - ; .align 2, 0 -_0223FB9C: .word 0x0000038E -_0223FBA0: .word 0x00AAA000 - thumb_func_end ov83_0223FB68 - - thumb_func_start ov83_0223FBA4 -ov83_0223FBA4: ; 0x0223FBA4 - add r3, r0, #0 - mov r2, #0x10 - mov r1, #0 -_0223FBAA: - strb r1, [r3] - add r3, r3, #1 - sub r2, r2, #1 - bne _0223FBAA - mov r1, #2 - str r1, [r0, #8] - sub r1, r1, #3 - str r1, [r0, #4] - bx lr - thumb_func_end ov83_0223FBA4 - - thumb_func_start ov83_0223FBBC -ov83_0223FBBC: ; 0x0223FBBC - push {r4, r5, r6, lr} - add r4, r1, #0 - add r5, r0, #0 - mov r1, #0 - str r1, [r5, #0xc] - add r1, r2, #0 - add r6, r3, #0 - bl ov83_0223FC3C - cmp r0, #1 - beq _0223FC34 - cmp r6, #1 - beq _0223FC34 - ldr r0, [r5, #4] - cmp r0, #0 - bge _0223FC2E - bl sub_0201D35C - mov r1, #5 - add r6, r0, #0 - bl sub_020E2178 - ldr r0, [r5, #8] - cmp r1, r0 - bhi _0223FBF4 - mov r1, #1 - str r1, [r5, #0xc] - b _0223FBFA -_0223FBF4: - mov r0, #1 - mov r1, #0 - str r0, [r5, #0xc] -_0223FBFA: - ldr r0, [r5, #0] - cmp r1, r0 - bne _0223FC18 - cmp r0, #1 - ldr r0, [r5, #8] - bne _0223FC0E - sub r0, r0, #1 - bmi _0223FC1E - str r0, [r5, #8] - b _0223FC1E -_0223FC0E: - add r0, r0, #1 - cmp r0, #5 - bge _0223FC1E - str r0, [r5, #8] - b _0223FC1E -_0223FC18: - str r1, [r5, #0] - mov r0, #2 - str r0, [r5, #8] -_0223FC1E: - add r0, r6, #0 - mov r1, #0x3c - bl sub_020E2178 - ldr r0, _0223FC38 ; =0x022405F0 - ldrb r0, [r0, r4] - add r0, r0, r1 - str r0, [r5, #4] -_0223FC2E: - ldr r0, [r5, #4] - sub r0, r0, #1 - str r0, [r5, #4] -_0223FC34: - pop {r4, r5, r6, pc} - nop -_0223FC38: .word 0x022405F0 - thumb_func_end ov83_0223FBBC - - thumb_func_start ov83_0223FC3C -ov83_0223FC3C: ; 0x0223FC3C - cmp r1, #0 - bge _0223FC46 - ldr r2, [r0, #0] - cmp r2, #0 - beq _0223FC50 -_0223FC46: - cmp r1, #0 - ble _0223FC54 - ldr r0, [r0, #0] - cmp r0, #1 - bne _0223FC54 -_0223FC50: - mov r0, #1 - bx lr -_0223FC54: - mov r0, #0 - bx lr - thumb_func_end ov83_0223FC3C - - thumb_func_start ov83_0223FC58 -ov83_0223FC58: ; 0x0223FC58 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r7, #0x1f - add r0, r1, #0 - str r1, [sp] - add r6, r7, #0 - bl ov83_0223FA8C - add r4, r0, #0 - ldr r0, [r5, #8] - cmp r0, #3 - blt _0223FC74 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223FC74: - mov r1, #0x96 - ldr r2, [r5, #0] - lsl r1, r1, #2 - cmp r2, r1 - beq _0223FC86 - ldr r1, _0223FCE4 ; =0x02240594 - ldrb r0, [r1, r0] - cmp r4, r0 - blt _0223FCA0 -_0223FC86: - ldr r0, [r5, #8] - mov r4, #0 - add r0, r0, #1 - str r0, [r5, #8] - str r4, [r5, #0] - ldr r1, [r5, #8] - cmp r1, #3 - blt _0223FC9A - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223FC9A: - ldr r0, [sp] - bl ov83_0223FA90 -_0223FCA0: - mov r0, #0x96 - ldr r1, [r5, #0] - lsl r0, r0, #2 - sub r1, r0, r1 - cmp r1, #0x3c - bgt _0223FCB8 - mov r0, #0x1f - mul r0, r1 - mov r1, #0x3c - bl sub_020E1F6C - add r7, r0, #0 -_0223FCB8: - ldr r1, [r5, #8] - ldr r0, _0223FCE4 ; =0x02240594 - ldrb r0, [r0, r1] - sub r1, r0, r4 - cmp r1, #5 - bgt _0223FCD0 - mov r0, #0x1f - mul r0, r1 - mov r1, #5 - bl sub_020E1F6C - add r6, r0, #0 -_0223FCD0: - cmp r7, r6 - bge _0223FCD8 - str r7, [r5, #4] - b _0223FCDA -_0223FCD8: - str r6, [r5, #4] -_0223FCDA: - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223FCE4: .word 0x02240594 - thumb_func_end ov83_0223FC58 - - thumb_func_start ov83_0223FCE8 -ov83_0223FCE8: ; 0x0223FCE8 - push {r3, r4, r5, r6, r7, lr} - add r5, r1, #0 - mov r1, #0 - str r1, [r0, #0xc] - add r7, r5, #0 - add r4, r3, #0 - str r0, [sp] - ldr r1, [sp, #0x18] - add r0, r4, #0 - add r6, r2, #0 - add r7, #0x98 - bl ov83_0223FB50 - cmp r0, #1 - beq _0223FD18 - ldr r1, [sp, #0x18] - add r0, r4, #0 - bl ov83_0223FB30 - cmp r0, #1 - beq _0223FD18 - ldr r0, [sp, #0x1c] - cmp r0, #0 - bne _0223FD22 -_0223FD18: - ldr r0, [sp] - mov r1, #0 - str r1, [r0, #4] - str r1, [r0, #8] - pop {r3, r4, r5, r6, r7, pc} -_0223FD22: - cmp r6, #1 - bgt _0223FD30 - ldr r0, [sp] - mov r1, #0 - str r1, [r0, #4] - str r1, [r0, #8] - pop {r3, r4, r5, r6, r7, pc} -_0223FD30: - ldr r0, [sp, #0x20] - cmp r0, #1 - beq _0223FDAE - mov r0, #0 - cmp r6, #0 - ble _0223FD5E - mov r2, #0x96 - mov r4, #0x1c - lsl r2, r2, #2 -_0223FD42: - mov r1, #0x13 - add r3, r5, r0 - lsl r1, r1, #4 - ldrb r1, [r3, r1] - add r3, r1, #0 - mul r3, r4 - add r1, r5, r3 - add r1, #0x92 - ldrh r1, [r1] - cmp r1, r2 - bls _0223FDAE - add r0, r0, #1 - cmp r0, r6 - blt _0223FD42 -_0223FD5E: - mov r4, #1 - cmp r6, #1 - ble _0223FD8E -_0223FD64: - mov r0, #0x13 - add r1, r5, r4 - lsl r0, r0, #4 - ldrb r2, [r1, r0] - ldrb r0, [r7] - ldrb r1, [r7, #4] - add r3, r7, r2 - ldrb r2, [r7, r2] - ldrb r3, [r3, #4] - bl sub_0201E3BC - cmp r0, #0x20 - bls _0223FD88 - ldr r0, [sp] - mov r1, #0 - str r1, [r0, #4] - str r1, [r0, #8] - pop {r3, r4, r5, r6, r7, pc} -_0223FD88: - add r4, r4, #1 - cmp r4, r6 - blt _0223FD64 -_0223FD8E: - ldr r0, [sp] - ldr r0, [r0, #4] - cmp r0, #4 - bge _0223FD9E - add r1, r0, #1 - ldr r0, [sp] - str r1, [r0, #4] - pop {r3, r4, r5, r6, r7, pc} -_0223FD9E: - ldr r0, [sp] - mov r2, #1 - str r2, [r0, #0xc] - ldr r0, [r0, #0] - add r1, r0, #1 - ldr r0, [sp] - str r1, [r0, #0] - str r2, [r0, #8] -_0223FDAE: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov83_0223FCE8 - - thumb_func_start ov83_0223FDB0 -ov83_0223FDB0: ; 0x0223FDB0 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - mov r2, #0x68 - bl sub_020D5124 - add r0, r4, #0 - add r0, #0xc - bl ov83_0223FBA4 - mov r1, #0 - mov r0, #0x1f - str r0, [r4, #0x50] - add r4, #0xc - add r0, r4, #0 - add r2, r1, #0 - add r3, r1, #0 - bl ov83_0223FBBC - pop {r4, pc} - thumb_func_end ov83_0223FDB0 - - thumb_func_start ov83_0223FDD8 -ov83_0223FDD8: ; 0x0223FDD8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - add r4, r1, #0 - add r1, r5, #0 - add r0, #0x4c - add r1, #0x1c - add r6, r2, #0 - bl ov83_0223FC58 - cmp r0, #1 - bne _0223FDF6 - add sp, #0xc - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_0223FDF6: - add r0, r5, #0 - ldr r3, [r5, #0xc] - add r0, #0x1c - add r1, r4, #0 - add r2, r6, #0 - bl ov83_0223F900 - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FAA8 - add r7, r0, #0 - add r0, r5, #0 - ldr r2, [r5, #0x54] - add r0, #0x30 - add r1, r7, #0 - bl ov83_0223FAAC - add r0, r5, #0 - add r0, #0xc - add r1, r7, #0 - bl ov83_0223FC3C - ldr r1, [r5, #0x54] - add r2, r6, #0 - str r1, [sp] - ldr r1, [r5, #0x2c] - add r3, r7, #0 - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r0, #0x58 - add r1, r4, #0 - bl ov83_0223FCE8 - add r0, r5, #0 - ldr r1, [r5, #0x54] - ldr r3, [r5, #0x60] - add r0, #0xc - add r2, r7, #0 - bl ov83_0223FBBC - mov r0, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov83_0223FDD8 - - thumb_func_start ov83_0223FE50 -ov83_0223FE50: ; 0x0223FE50 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r4, #0xc - mov r2, #0 -_0223FE5A: - add r3, r1, #0 - add r3, #0x90 - ldrb r3, [r3] - add r0, r4, r2 - strb r3, [r4, r2] - add r3, r1, #0 - add r3, #0x91 - ldrb r3, [r3] - add r2, r2, #1 - add r1, #0x1c - strb r3, [r0, #4] - cmp r2, #4 - blt _0223FE5A - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FAA8 - cmp r0, #0 - blt _0223FE86 - strh r0, [r4, #0xa] - mov r0, #0 - b _0223FE8C -_0223FE86: - neg r0, r0 - strh r0, [r4, #0xa] - mov r0, #1 -_0223FE8C: - strb r0, [r4, #0xc] - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FA84 - strh r0, [r4, #8] - ldr r0, [r5, #0x40] - strb r0, [r4, #0x12] - ldr r0, [r5, #0x48] - strb r0, [r4, #0x13] - ldr r0, [r5, #0xc] - strb r0, [r4, #0x11] - ldr r0, [r5, #0x18] - strb r0, [r4, #0xe] - ldr r0, [r5, #0x54] - cmp r0, #3 - bge _0223FEB0 - b _0223FEB2 -_0223FEB0: - mov r0, #2 -_0223FEB2: - strb r0, [r4, #0xd] - ldr r0, [r5, #0x50] - strb r0, [r4, #0x10] - ldr r0, [r5, #0x64] - strb r0, [r4, #0xf] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223FE50 - - thumb_func_start ov83_0223FEC0 -ov83_0223FEC0: ; 0x0223FEC0 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r4, #0xc - mov r2, #0 -_0223FECA: - add r3, r1, #0 - add r3, #0x90 - ldrb r3, [r3] - add r0, r4, r2 - strb r3, [r4, r2] - add r3, r1, #0 - add r3, #0x91 - ldrb r3, [r3] - add r2, r2, #1 - add r1, #0x1c - strb r3, [r0, #4] - cmp r2, #4 - blt _0223FECA - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FAA8 - cmp r0, #0 - blt _0223FEF6 - strh r0, [r4, #0xa] - mov r0, #0 - b _0223FEFC -_0223FEF6: - neg r0, r0 - strh r0, [r4, #0xa] - mov r0, #1 -_0223FEFC: - strb r0, [r4, #0xc] - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FA84 - strh r0, [r4, #8] - ldr r0, [r5, #0x40] - cmp r0, #0 - beq _0223FF10 - strb r0, [r4, #0x12] -_0223FF10: - ldrb r0, [r4, #0x13] - cmp r0, #0 - bne _0223FF1A - ldr r0, [r5, #0x48] - strb r0, [r4, #0x13] -_0223FF1A: - ldr r0, [r5, #0x18] - cmp r0, #1 - bne _0223FF28 - ldr r0, [r5, #0xc] - strb r0, [r4, #0x11] - ldr r0, [r5, #0x18] - strb r0, [r4, #0xe] -_0223FF28: - ldr r0, [r5, #0x54] - cmp r0, #3 - bge _0223FF30 - b _0223FF32 -_0223FF30: - mov r0, #2 -_0223FF32: - strb r0, [r4, #0xd] - ldr r0, [r5, #0x50] - strb r0, [r4, #0x10] - ldrb r0, [r4, #0xf] - cmp r0, #0 - bne _0223FF42 - ldr r0, [r5, #0x64] - strb r0, [r4, #0xf] -_0223FF42: - pop {r3, r4, r5, pc} - thumb_func_end ov83_0223FEC0 - - thumb_func_start ov83_0223FF44 -ov83_0223FF44: ; 0x0223FF44 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - mov r3, #0 - mov r1, #0x80 - mov r0, #0x60 -_0223FF50: - add r2, r4, r3 - strb r1, [r4, r3] - add r3, r3, #1 - strb r0, [r2, #4] - cmp r3, #4 - blt _0223FF50 - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FAA8 - cmp r0, #0 - blt _0223FF6E - strh r0, [r4, #0xa] - mov r0, #0 - b _0223FF74 -_0223FF6E: - neg r0, r0 - strh r0, [r4, #0xa] - mov r0, #1 -_0223FF74: - strb r0, [r4, #0xc] - add r0, r5, #0 - add r0, #0x1c - bl ov83_0223FA84 - strh r0, [r4, #8] - ldr r0, [r5, #0x40] - strb r0, [r4, #0x12] - ldr r0, [r5, #0x48] - strb r0, [r4, #0x13] - ldr r0, [r5, #0xc] - strb r0, [r4, #0x11] - ldr r0, [r5, #0x18] - strb r0, [r4, #0xe] - ldr r0, [r5, #0x54] - strb r0, [r4, #0xd] - ldr r0, [r5, #0x50] - strb r0, [r4, #0x10] - ldr r0, [r5, #0x64] - strb r0, [r4, #0xf] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov83_0223FF44 - - thumb_func_start ov83_0223FFA0 -ov83_0223FFA0: ; 0x0223FFA0 - ldr r1, [r0, #0] - add r1, r1, #1 - str r1, [r0, #0] - bx lr - thumb_func_end ov83_0223FFA0 - - thumb_func_start ov83_0223FFA8 -ov83_0223FFA8: ; 0x0223FFA8 - push {r4, lr} - add r4, r1, #0 - mov r1, #6 - bl sub_020E2178 - ldr r1, _0223FFCC ; =0x02240597 - ldrb r1, [r1, r4] - mul r1, r0 - add r0, r1, #0 - mov r1, #0xa - bl sub_020E2178 - ldr r1, _0223FFD0 ; =0x0000270F - cmp r0, r1 - ble _0223FFC8 - add r0, r1, #0 -_0223FFC8: - pop {r4, pc} - nop -_0223FFCC: .word 0x02240597 -_0223FFD0: .word 0x0000270F - thumb_func_end ov83_0223FFA8 - - thumb_func_start ov83_0223FFD4 -ov83_0223FFD4: ; 0x0223FFD4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x60 - str r0, [sp] - ldr r0, [sp, #0x78] - str r1, [sp, #4] - str r0, [sp, #0x78] - add r0, r2, #0 - str r0, [sp, #0x24] - add r0, #0x34 - str r0, [sp, #0x24] - mov r1, #0 - add r0, sp, #0x4c - str r1, [r0, #0] - str r1, [r0, #4] - str r1, [r0, #8] - str r1, [r0, #0xc] - str r1, [r0, #0x10] - add r0, r1, #0 - add r6, r3, #0 - str r2, [sp, #8] - str r1, [sp, #0x20] - str r0, [sp, #0x18] - str r0, [sp, #0x28] - cmp r6, #0 - bls _02240086 -_02240006: - ldr r1, [sp, #8] - ldr r0, [sp, #0x28] - add r1, r1, r0 - mov r0, #0x13 - lsl r0, r0, #4 - ldrb r0, [r1, r0] - ldr r1, [sp, #0x78] - lsl r4, r0, #2 - ldr r0, [sp, #0x24] - ldr r0, [r0, r4] - bl sub_020973C8 - mov r3, #0 - add r7, r0, #0 - add r2, r3, #0 - cmp r6, #0 - bls _02240048 - ldr r0, [sp, #0x24] - mov r5, #0x13 - ldr r4, [r0, r4] - lsl r5, r5, #4 -_02240030: - ldr r0, [sp, #8] - add r0, r0, r2 - ldrb r0, [r0, r5] - lsl r1, r0, #2 - ldr r0, [sp, #0x24] - ldr r0, [r0, r1] - cmp r4, r0 - bne _02240042 - add r3, r3, #1 -_02240042: - add r2, r2, #1 - cmp r2, r6 - blo _02240030 -_02240048: - ldr r0, [sp, #0x18] - cmp r3, r0 - ble _02240050 - str r3, [sp, #0x18] -_02240050: - mov r5, #0 - add r4, sp, #0x4c -_02240054: - add r0, r7, #0 - add r1, r5, #5 - bl sub_020973D4 - ldr r1, [r4, #0] - add r5, r5, #1 - add r0, r1, r0 - stmia r4!, {r0} - cmp r5, #5 - blt _02240054 - add r0, r7, #0 - mov r1, #0xa - bl sub_020973D4 - ldr r1, [sp, #0x20] - add r0, r1, r0 - str r0, [sp, #0x20] - add r0, r7, #0 - bl sub_020181C4 - ldr r0, [sp, #0x28] - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, r6 - blo _02240006 -_02240086: - ldr r0, [sp, #0x18] - cmp r0, #2 - blt _02240096 - cmp r6, #1 - bls _02240096 - mov r0, #1 - str r0, [sp, #0x14] - b _0224009A -_02240096: - mov r0, #0 - str r0, [sp, #0x14] -_0224009A: - ldr r0, [sp, #0x20] - add r1, r6, #0 - bl sub_020E2178 - sub r0, r0, r6 - mov r5, #0 - add r4, sp, #0x4c - str r0, [sp, #0x1c] - str r5, [sp, #0xc] - add r7, sp, #0x38 - str r4, [sp, #0x2c] -_022400B0: - ldr r0, [sp, #0xc] - mov r1, #5 - add r0, r0, #1 - bl sub_020E1F6C - lsl r2, r1, #2 - ldr r1, [sp, #0x2c] - ldr r0, [r4, #0] - ldr r1, [r1, r2] - sub r0, r0, r1 - str r0, [r7, #0] - bpl _022400CA - add r5, r5, #1 -_022400CA: - ldr r0, [sp, #0xc] - add r4, r4, #4 - add r0, r0, #1 - add r7, r7, #4 - str r0, [sp, #0xc] - cmp r0, #5 - blt _022400B0 - mov r2, #0 - add r1, sp, #0x38 -_022400DC: - ldr r0, [r1, #0] - add r2, r2, #1 - sub r0, r0, r5 - stmia r1!, {r0} - cmp r2, #5 - blt _022400DC - cmp r5, #4 - blt _022400F0 - mov r0, #1 - str r0, [sp, #0x14] -_022400F0: - ldr r1, [sp] - ldr r0, _022401A8 ; =0x001B7740 - ldr r1, [r1, #0] - bl sub_020E2178 - mov r1, #0xa - add r5, r0, #0 - bl sub_020E1F6C - cmp r1, #5 - blt _02240108 - add r5, #0xa -_02240108: - add r0, r5, #0 - mov r1, #0xa - mov r7, #0 - add r4, sp, #0x38 - bl sub_020E1F6C - str r0, [sp, #0x10] -_02240116: - ldr r0, [sp, #0x10] - ldr r1, [r4, #0] - add r5, r0, #0 - mul r5, r1 - add r0, r5, #0 - mov r1, #0x64 - bl sub_020E1F6C - cmp r1, #0x32 - blt _0224012C - add r5, #0x64 -_0224012C: - add r0, r5, #0 - mov r1, #0x64 - bl sub_020E1F6C - ldr r1, [sp] - ldr r2, [r1, #0x30] - ldr r1, [r1, #0x34] - add r1, r2, r1 - sub r0, r0, r1 - str r0, [r4, #0] - bpl _02240146 - mov r0, #0 - str r0, [r4, #0] -_02240146: - add r7, r7, #1 - add r4, r4, #4 - cmp r7, #5 - blt _02240116 - cmp r6, #1 - bls _02240168 - ldr r0, [sp] - add r1, r6, #0 - ldr r0, [r0, #0x58] - bl ov83_0223FFA8 - cmp r0, #0xa - ble _02240162 - mov r0, #0xa -_02240162: - ldr r1, [sp, #0x1c] - sub r0, r1, r0 - str r0, [sp, #0x1c] -_02240168: - ldr r0, [sp, #0x1c] - cmp r0, #0xf - bge _02240172 - mov r0, #0xf - str r0, [sp, #0x1c] -_02240172: - mov r3, #0 - add r1, sp, #0x38 - add r2, sp, #0x30 -_02240178: - ldr r0, [r1, #0] - add r3, r3, #1 - strb r0, [r2] - add r1, r1, #4 - add r2, r2, #1 - cmp r3, #5 - blt _02240178 - ldr r2, [sp, #0x1c] - ldr r0, [sp, #4] - lsl r2, r2, #0x18 - ldr r3, [sp, #0x14] - add r1, sp, #0x30 - lsr r2, r2, #0x18 - bl sub_0202A9E4 - ldr r1, [sp] - str r0, [r1, #4] - ldr r0, [sp, #4] - bl sub_0202AABC - ldr r1, [sp] - str r0, [r1, #8] - add sp, #0x60 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022401A8: .word 0x001B7740 - thumb_func_end ov83_0223FFD4 - - thumb_func_start ov83_022401AC -ov83_022401AC: ; 0x022401AC - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0x34] - add r4, r1, #0 - str r0, [r1, #0x20] - ldr r0, [r5, #0x30] - add r4, #0x20 - str r0, [r4, #4] - ldr r0, [r5, #0x58] - add r1, r2, #0 - bl ov83_0223FFA8 - str r0, [r4, #8] - ldr r0, [r5, #4] - ldr r1, _02240204 ; =0x00000708 - strb r0, [r4, #0xc] - ldr r0, [r5, #8] - strb r0, [r4, #0xd] - ldr r5, [r5, #0] - add r0, r5, #0 - bl sub_020E1F6C - strb r0, [r4, #0xe] - ldrb r1, [r4, #0xe] - ldr r0, _02240204 ; =0x00000708 - mul r0, r1 - sub r5, r5, r0 - add r0, r5, #0 - mov r1, #0x1e - bl sub_020E1F6C - strb r0, [r4, #0xf] - ldrb r0, [r4, #0xf] - mov r1, #0x1e - add r2, r0, #0 - mul r2, r1 - sub r2, r5, r2 - mov r0, #0x64 - mul r0, r2 - bl sub_020E1F6C - strb r0, [r4, #0x10] - pop {r3, r4, r5, pc} - nop -_02240204: .word 0x00000708 - thumb_func_end ov83_022401AC - ; 0x02240208 - - - .rodata - .incbin "incbin/overlay83_rodata.bin" - - .data - .incbin "incbin/overlay83_data.bin" - - .bss - .space 0x0 diff --git a/asm/overlay94.s b/asm/overlay94.s deleted file mode 100644 index c5a4c247a..000000000 --- a/asm/overlay94.s +++ /dev/null @@ -1,21241 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov94_0223B140 -ov94_0223B140: ; 0x0223B140 - push {r3, r4} - ldr r3, _0223B158 ; =0x02246AC0 - mov r4, #1 - str r4, [r3, #0] - mov r4, #0 - str r4, [r3, #4] - str r0, [r3, #8] - str r1, [r3, #0xc] - str r2, [r3, #0x10] - pop {r3, r4} - bx lr - nop -_0223B158: .word 0x02246AC0 - thumb_func_end ov94_0223B140 - - thumb_func_start ov94_0223B15C -ov94_0223B15C: ; 0x0223B15C - push {r3, lr} - ldr r1, _0223B440 ; =0x02246AC0 - ldr r0, [r1, #0] - cmp r0, #0x18 - bls _0223B168 - b _0223B7A4 -_0223B168: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B174: ; jump table - .short _0223B7A4 - _0223B174 - 2 ; case 0 - .short _0223B7A4 - _0223B174 - 2 ; case 1 - .short _0223B1A6 - _0223B174 - 2 ; case 2 - .short _0223B798 - _0223B174 - 2 ; case 3 - .short _0223B254 - _0223B174 - 2 ; case 4 - .short _0223B798 - _0223B174 - 2 ; case 5 - .short _0223B2DA - _0223B174 - 2 ; case 6 - .short _0223B798 - _0223B174 - 2 ; case 7 - .short _0223B35A - _0223B174 - 2 ; case 8 - .short _0223B798 - _0223B174 - 2 ; case 9 - .short _0223B3EE - _0223B174 - 2 ; case 10 - .short _0223B798 - _0223B174 - 2 ; case 11 - .short _0223B46C - _0223B174 - 2 ; case 12 - .short _0223B798 - _0223B174 - 2 ; case 13 - .short _0223B4F2 - _0223B174 - 2 ; case 14 - .short _0223B798 - _0223B174 - 2 ; case 15 - .short _0223B56A - _0223B174 - 2 ; case 16 - .short _0223B798 - _0223B174 - 2 ; case 17 - .short _0223B63C - _0223B174 - 2 ; case 18 - .short _0223B798 - _0223B174 - 2 ; case 19 - .short _0223B690 - _0223B174 - 2 ; case 20 - .short _0223B798 - _0223B174 - 2 ; case 21 - .short _0223B700 - _0223B174 - 2 ; case 22 - .short _0223B798 - _0223B174 - 2 ; case 23 - .short _0223B7A4 - _0223B174 - 2 ; case 24 -_0223B1A6: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B1B4 - cmp r0, #7 - beq _0223B1CC - pop {r3, pc} -_0223B1B4: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B440 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B1CC: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - ldr r2, _0223B444 ; =0x02246BE0 - str r1, [r0, #0] - ldrb r2, [r2, #0x1c] - cmp r2, #0xe - bhi _0223B246 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0223B1E6: ; jump table - .short _0223B246 - _0223B1E6 - 2 ; case 0 - .short _0223B204 - _0223B1E6 - 2 ; case 1 - .short _0223B20A - _0223B1E6 - 2 ; case 2 - .short _0223B210 - _0223B1E6 - 2 ; case 3 - .short _0223B246 - _0223B1E6 - 2 ; case 4 - .short _0223B246 - _0223B1E6 - 2 ; case 5 - .short _0223B246 - _0223B1E6 - 2 ; case 6 - .short _0223B216 - _0223B1E6 - 2 ; case 7 - .short _0223B228 - _0223B1E6 - 2 ; case 8 - .short _0223B22E - _0223B1E6 - 2 ; case 9 - .short _0223B234 - _0223B1E6 - 2 ; case 10 - .short _0223B23A - _0223B1E6 - 2 ; case 11 - .short _0223B21C - _0223B1E6 - 2 ; case 12 - .short _0223B222 - _0223B1E6 - 2 ; case 13 - .short _0223B240 - _0223B1E6 - 2 ; case 14 -_0223B204: - mov r1, #0 - str r1, [r0, #4] - b _0223B24E -_0223B20A: - sub r1, #0x1d - str r1, [r0, #4] - b _0223B24E -_0223B210: - sub r1, #0x1c - str r1, [r0, #4] - b _0223B24E -_0223B216: - sub r1, #0x19 - str r1, [r0, #4] - b _0223B24E -_0223B21C: - sub r1, #0x1e - str r1, [r0, #4] - b _0223B24E -_0223B222: - sub r1, #0x1f - str r1, [r0, #4] - b _0223B24E -_0223B228: - sub r1, #0x20 - str r1, [r0, #4] - b _0223B24E -_0223B22E: - sub r1, #0x21 - str r1, [r0, #4] - b _0223B24E -_0223B234: - sub r1, #0x22 - str r1, [r0, #4] - b _0223B24E -_0223B23A: - sub r1, #0x23 - str r1, [r0, #4] - b _0223B24E -_0223B240: - sub r1, #0x1a - str r1, [r0, #4] - b _0223B24E -_0223B246: - mov r1, #0xc - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B24E: - bl ov60_0221FDEC - pop {r3, pc} -_0223B254: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B262 - cmp r0, #7 - beq _0223B27A - pop {r3, pc} -_0223B262: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B440 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B27A: - ldr r0, _0223B440 ; =0x02246AC0 - mov r2, #0x18 - ldr r1, _0223B444 ; =0x02246BE0 - str r2, [r0, #0] - ldrb r1, [r1, #0x1c] - cmp r1, #5 - bgt _0223B2A4 - cmp r1, #0 - blt _0223B2CC - add r3, r1, r1 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_0223B298: ; jump table - .short _0223B2CC - _0223B298 - 2 ; case 0 - .short _0223B2AA - _0223B298 - 2 ; case 1 - .short _0223B2B0 - _0223B298 - 2 ; case 2 - .short _0223B2B6 - _0223B298 - 2 ; case 3 - .short _0223B2CC - _0223B298 - 2 ; case 4 - .short _0223B2BC - _0223B298 - 2 ; case 5 -_0223B2A4: - cmp r1, #0xe - beq _0223B2C2 - b _0223B2CC -_0223B2AA: - mov r1, #0 - str r1, [r0, #4] - b _0223B2D4 -_0223B2B0: - sub r2, #0x1d - str r2, [r0, #4] - b _0223B2D4 -_0223B2B6: - sub r2, #0x1c - str r2, [r0, #4] - b _0223B2D4 -_0223B2BC: - sub r2, #0x1b - str r2, [r0, #4] - b _0223B2D4 -_0223B2C2: - mov r1, #1 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B2D4 -_0223B2CC: - mov r1, #0xc - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B2D4: - bl ov60_0221FDEC - pop {r3, pc} -_0223B2DA: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B2E8 - cmp r0, #7 - beq _0223B300 - pop {r3, pc} -_0223B2E8: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B440 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B300: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE20 - mov r1, #0x49 - lsl r1, r1, #2 - cmp r0, r1 - bne _0223B31A - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #4] - b _0223B354 -_0223B31A: - ldr r0, _0223B448 ; =0x02246BC0 - ldr r0, [r0, #0x40] - ldrb r0, [r0] - cmp r0, #3 - beq _0223B338 - cmp r0, #5 - beq _0223B32E - cmp r0, #0xe - beq _0223B342 - b _0223B34C -_0223B32E: - mov r1, #2 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B354 -_0223B338: - mov r1, #3 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B354 -_0223B342: - mov r1, #1 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B354 -_0223B34C: - mov r1, #0xc - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B354: - bl ov60_0221FDEC - pop {r3, pc} -_0223B35A: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B368 - cmp r0, #7 - beq _0223B380 - pop {r3, pc} -_0223B368: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B440 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B380: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE20 - mov r1, #0x49 - lsl r1, r1, #2 - cmp r0, r1 - bne _0223B39A - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #1 - str r1, [r0, #4] - b _0223B3E8 -_0223B39A: - ldr r0, _0223B448 ; =0x02246BC0 - ldr r0, [r0, #0x40] - ldrb r0, [r0] - cmp r0, #5 - bgt _0223B3B4 - cmp r0, #3 - blt _0223B3E0 - beq _0223B3C4 - cmp r0, #4 - beq _0223B3CE - cmp r0, #5 - beq _0223B3BA - b _0223B3E0 -_0223B3B4: - cmp r0, #0xe - beq _0223B3D6 - b _0223B3E0 -_0223B3BA: - mov r1, #2 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B3E8 -_0223B3C4: - mov r1, #3 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B3E8 -_0223B3CE: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #4] - b _0223B3E8 -_0223B3D6: - mov r1, #1 - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B3E8 -_0223B3E0: - mov r1, #0xc - ldr r0, _0223B440 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B3E8: - bl ov60_0221FDEC - pop {r3, pc} -_0223B3EE: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B3FC - cmp r0, #7 - beq _0223B414 - pop {r3, pc} -_0223B3FC: - ldr r0, _0223B440 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B440 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B414: - ldr r1, _0223B440 ; =0x02246AC0 - mov r2, #0x18 - ldr r0, _0223B444 ; =0x02246BE0 - str r2, [r1, #0] - ldrb r0, [r0, #0x1c] - cmp r0, #5 - bgt _0223B432 - cmp r0, #1 - blt _0223B45E - beq _0223B438 - cmp r0, #3 - beq _0223B452 - cmp r0, #5 - beq _0223B44C - b _0223B45E -_0223B432: - cmp r0, #0xe - beq _0223B458 - b _0223B45E -_0223B438: - mov r0, #0 - str r0, [r1, #4] - b _0223B466 - nop -_0223B440: .word 0x02246AC0 -_0223B444: .word 0x02246BE0 -_0223B448: .word 0x02246BC0 -_0223B44C: - sub r2, #0x1b - str r2, [r1, #4] - b _0223B466 -_0223B452: - sub r2, #0x1c - str r2, [r1, #4] - b _0223B466 -_0223B458: - sub r2, #0x1a - str r2, [r1, #4] - b _0223B466 -_0223B45E: - mov r1, #0xc - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B466: - bl ov60_0221FDEC - pop {r3, pc} -_0223B46C: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B47A - cmp r0, #7 - beq _0223B492 - pop {r3, pc} -_0223B47A: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B492: - ldr r0, _0223B740 ; =0x02246AC0 - mov r2, #0x18 - ldr r1, _0223B744 ; =0x02246BE0 - str r2, [r0, #0] - ldrb r1, [r1, #0x1c] - cmp r1, #5 - bgt _0223B4BC - cmp r1, #0 - blt _0223B4E4 - add r3, r1, r1 - add r3, pc - ldrh r3, [r3, #6] - lsl r3, r3, #0x10 - asr r3, r3, #0x10 - add pc, r3 -_0223B4B0: ; jump table - .short _0223B4E4 - _0223B4B0 - 2 ; case 0 - .short _0223B4C2 - _0223B4B0 - 2 ; case 1 - .short _0223B4CE - _0223B4B0 - 2 ; case 2 - .short _0223B4D4 - _0223B4B0 - 2 ; case 3 - .short _0223B4E4 - _0223B4B0 - 2 ; case 4 - .short _0223B4C8 - _0223B4B0 - 2 ; case 5 -_0223B4BC: - cmp r1, #0xe - beq _0223B4DA - b _0223B4E4 -_0223B4C2: - mov r1, #0 - str r1, [r0, #4] - b _0223B4EC -_0223B4C8: - sub r2, #0x1b - str r2, [r0, #4] - b _0223B4EC -_0223B4CE: - sub r2, #0x1d - str r2, [r0, #4] - b _0223B4EC -_0223B4D4: - sub r2, #0x1c - str r2, [r0, #4] - b _0223B4EC -_0223B4DA: - mov r1, #1 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B4EC -_0223B4E4: - mov r1, #0xc - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B4EC: - bl ov60_0221FDEC - pop {r3, pc} -_0223B4F2: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B500 - cmp r0, #7 - beq _0223B518 - pop {r3, pc} -_0223B500: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B518: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE20 - mov r1, #0x49 - lsl r1, r1, #2 - cmp r0, r1 - blo _0223B53C - bl ov60_0221FE20 - mov r1, #0x49 - lsl r1, r1, #2 - bl sub_020E2178 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - b _0223B564 -_0223B53C: - cmp r0, #0 - bne _0223B548 - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #4] - b _0223B564 -_0223B548: - ldr r0, _0223B748 ; =0x02246BC0 - ldr r0, [r0, #0x40] - ldrb r0, [r0] - cmp r0, #0xe - bne _0223B55C - mov r1, #1 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B564 -_0223B55C: - mov r1, #0xc - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B564: - bl ov60_0221FDEC - pop {r3, pc} -_0223B56A: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B578 - cmp r0, #7 - beq _0223B590 - pop {r3, pc} -_0223B578: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B590: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE20 - mov r1, #0x49 - lsl r1, r1, #2 - cmp r0, r1 - bne _0223B5AA - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #4] - b _0223B636 -_0223B5AA: - ldr r0, _0223B748 ; =0x02246BC0 - ldr r0, [r0, #0x40] - ldrb r0, [r0] - cmp r0, #0xe - bhi _0223B62E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223B5C0: ; jump table - .short _0223B62E - _0223B5C0 - 2 ; case 0 - .short _0223B62E - _0223B5C0 - 2 ; case 1 - .short _0223B5DE - _0223B5C0 - 2 ; case 2 - .short _0223B62E - _0223B5C0 - 2 ; case 3 - .short _0223B62E - _0223B5C0 - 2 ; case 4 - .short _0223B62E - _0223B5C0 - 2 ; case 5 - .short _0223B62E - _0223B5C0 - 2 ; case 6 - .short _0223B62E - _0223B5C0 - 2 ; case 7 - .short _0223B5FC - _0223B5C0 - 2 ; case 8 - .short _0223B606 - _0223B5C0 - 2 ; case 9 - .short _0223B610 - _0223B5C0 - 2 ; case 10 - .short _0223B61A - _0223B5C0 - 2 ; case 11 - .short _0223B5E8 - _0223B5C0 - 2 ; case 12 - .short _0223B5F2 - _0223B5C0 - 2 ; case 13 - .short _0223B624 - _0223B5C0 - 2 ; case 14 -_0223B5DE: - mov r1, #4 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B5E8: - mov r1, #5 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B5F2: - mov r1, #6 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B5FC: - mov r1, #7 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B606: - mov r1, #8 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B610: - mov r1, #9 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B61A: - mov r1, #0xa - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B624: - mov r1, #1 - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B636 -_0223B62E: - mov r1, #0xc - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B636: - bl ov60_0221FDEC - pop {r3, pc} -_0223B63C: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B64A - cmp r0, #7 - beq _0223B662 - pop {r3, pc} -_0223B64A: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B662: - ldr r1, _0223B740 ; =0x02246AC0 - mov r2, #0x18 - ldr r0, _0223B744 ; =0x02246BE0 - str r2, [r1, #0] - ldrb r0, [r0, #0x1c] - cmp r0, #1 - beq _0223B67A - cmp r0, #2 - beq _0223B686 - cmp r0, #0xe - beq _0223B680 - b _0223B68A -_0223B67A: - mov r0, #0 - str r0, [r1, #4] - b _0223B68A -_0223B680: - sub r2, #0x1a - str r2, [r1, #4] - b _0223B68A -_0223B686: - sub r2, #0x1d - str r2, [r1, #4] -_0223B68A: - bl ov60_0221FDEC - pop {r3, pc} -_0223B690: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B69E - cmp r0, #7 - beq _0223B6B6 - pop {r3, pc} -_0223B69E: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B6B6: - ldr r1, _0223B740 ; =0x02246AC0 - mov r2, #0x18 - ldr r0, _0223B744 ; =0x02246BE0 - str r2, [r1, #0] - ldrb r0, [r0, #0x1c] - cmp r0, #7 - bgt _0223B6D4 - cmp r0, #1 - blt _0223B6F2 - beq _0223B6DA - cmp r0, #6 - beq _0223B6E0 - cmp r0, #7 - beq _0223B6E6 - b _0223B6F2 -_0223B6D4: - cmp r0, #0xe - beq _0223B6EC - b _0223B6F2 -_0223B6DA: - mov r0, #0 - str r0, [r1, #4] - b _0223B6FA -_0223B6E0: - mov r0, #1 - str r0, [r1, #4] - b _0223B6FA -_0223B6E6: - mov r0, #2 - str r0, [r1, #4] - b _0223B6FA -_0223B6EC: - sub r2, #0x1a - str r2, [r1, #4] - b _0223B6FA -_0223B6F2: - mov r1, #0xc - ldr r0, _0223B740 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B6FA: - bl ov60_0221FDEC - pop {r3, pc} -_0223B700: - bl ov60_0221FD48 - cmp r0, #1 - beq _0223B70E - cmp r0, #7 - beq _0223B726 - pop {r3, pc} -_0223B70E: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE14 - bl ov94_0223BC18 - ldr r1, _0223B740 ; =0x02246AC0 - str r0, [r1, #4] - bl ov60_0221FDEC - pop {r3, pc} -_0223B726: - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - bl ov60_0221FE20 - cmp r0, #8 - bne _0223B73C - ldr r0, _0223B740 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #4] - b _0223B792 -_0223B73C: - ldr r0, _0223B744 ; =0x02246BE0 - b _0223B74C - ; .align 2, 0 -_0223B740: .word 0x02246AC0 -_0223B744: .word 0x02246BE0 -_0223B748: .word 0x02246BC0 -_0223B74C: - ldrb r0, [r0, #0x1c] - cmp r0, #7 - bgt _0223B762 - cmp r0, #1 - blt _0223B78A - beq _0223B768 - cmp r0, #6 - beq _0223B770 - cmp r0, #7 - beq _0223B778 - b _0223B78A -_0223B762: - cmp r0, #0xe - beq _0223B780 - b _0223B78A -_0223B768: - ldr r0, _0223B7A8 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #4] - b _0223B792 -_0223B770: - ldr r0, _0223B7A8 ; =0x02246AC0 - mov r1, #1 - str r1, [r0, #4] - b _0223B792 -_0223B778: - ldr r0, _0223B7A8 ; =0x02246AC0 - mov r1, #2 - str r1, [r0, #4] - b _0223B792 -_0223B780: - mov r1, #1 - ldr r0, _0223B7A8 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] - b _0223B792 -_0223B78A: - mov r1, #0xc - ldr r0, _0223B7A8 ; =0x02246AC0 - mvn r1, r1 - str r1, [r0, #4] -_0223B792: - bl ov60_0221FDEC - pop {r3, pc} -_0223B798: - mov r0, #0x18 - str r0, [r1, #0] - sub r0, #0x24 - str r0, [r1, #4] - bl ov60_0221FDEC -_0223B7A4: - pop {r3, pc} - nop -_0223B7A8: .word 0x02246AC0 - thumb_func_end ov94_0223B15C - - thumb_func_start ov94_0223B7AC -ov94_0223B7AC: ; 0x0223B7AC - ldr r0, _0223B7B4 ; =0x02246AC0 - mov r1, #0 - str r1, [r0, #0] - bx lr - ; .align 2, 0 -_0223B7B4: .word 0x02246AC0 - thumb_func_end ov94_0223B7AC - - thumb_func_start ov94_0223B7B8 -ov94_0223B7B8: ; 0x0223B7B8 - ldr r1, _0223B7D4 ; =0x02246AC0 - ldr r0, [r1, #0] - cmp r0, #1 - beq _0223B7C6 - cmp r0, #0x18 - beq _0223B7CA - b _0223B7D0 -_0223B7C6: - mov r0, #1 - bx lr -_0223B7CA: - mov r0, #1 - str r0, [r1, #0] - bx lr -_0223B7D0: - mov r0, #0 - bx lr - ; .align 2, 0 -_0223B7D4: .word 0x02246AC0 - thumb_func_end ov94_0223B7B8 - - thumb_func_start ov94_0223B7D8 -ov94_0223B7D8: ; 0x0223B7D8 - ldr r0, _0223B7E0 ; =0x02246AC0 - ldr r0, [r0, #4] - bx lr - nop -_0223B7E0: .word 0x02246AC0 - thumb_func_end ov94_0223B7D8 - - thumb_func_start ov94_0223B7E4 -ov94_0223B7E4: ; 0x0223B7E4 - push {r3, lr} - add r1, r0, #0 - mov r2, #0x49 - ldr r0, _0223B824 ; =0x02246AD4 - lsl r2, r2, #2 - bl sub_020D50B8 - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - mov r2, #0x49 - ldr r0, _0223B828 ; =0x02246400 - ldr r1, _0223B824 ; =0x02246AD4 - ldr r3, _0223B82C ; =0x02246BFC - lsl r2, r2, #2 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223B814 - ldr r0, _0223B830 ; =0x02246AC0 - mov r1, #2 - str r1, [r0, #0] - pop {r3, pc} -_0223B814: - ldr r0, _0223B830 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - ; .align 2, 0 -_0223B824: .word 0x02246AD4 -_0223B828: .word 0x02246400 -_0223B82C: .word 0x02246BFC -_0223B830: .word 0x02246AC0 - thumb_func_end ov94_0223B7E4 - - thumb_func_start ov94_0223B834 -ov94_0223B834: ; 0x0223B834 - push {r3, lr} - ldr r0, _0223B874 ; =0x02246ACC - ldr r2, _0223B878 ; =0x02246AD4 - ldr r1, [r0, #0] - ldr r0, [r0, #4] - str r1, [r2, #0] - str r0, [r2, #4] - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - ldr r0, _0223B87C ; =0x0224644C - ldr r1, _0223B878 ; =0x02246AD4 - ldr r3, _0223B880 ; =0x02246BFC - mov r2, #8 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223B862 - ldr r0, _0223B884 ; =0x02246AC0 - mov r1, #4 - str r1, [r0, #0] - pop {r3, pc} -_0223B862: - ldr r0, _0223B884 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - nop -_0223B874: .word 0x02246ACC -_0223B878: .word 0x02246AD4 -_0223B87C: .word 0x0224644C -_0223B880: .word 0x02246BFC -_0223B884: .word 0x02246AC0 - thumb_func_end ov94_0223B834 - - thumb_func_start ov94_0223B888 -ov94_0223B888: ; 0x0223B888 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, _0223B8C8 ; =0x02246BC0 - str r4, [r0, #0x40] - bl ov60_0221FC84 - mov r0, #0x49 - lsl r0, r0, #2 - str r0, [sp] - ldr r0, _0223B8CC ; =0x0224649C - ldr r1, _0223B8D0 ; =0x02246AD4 - mov r2, #0 - add r3, r4, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223B8B6 - ldr r0, _0223B8D4 ; =0x02246AC0 - mov r1, #6 - str r1, [r0, #0] - add sp, #4 - pop {r3, r4, pc} -_0223B8B6: - ldr r0, _0223B8D4 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223B8C8: .word 0x02246BC0 -_0223B8CC: .word 0x0224649C -_0223B8D0: .word 0x02246AD4 -_0223B8D4: .word 0x02246AC0 - thumb_func_end ov94_0223B888 - - thumb_func_start ov94_0223B8D8 -ov94_0223B8D8: ; 0x0223B8D8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, _0223B918 ; =0x02246BC0 - str r4, [r0, #0x40] - bl ov60_0221FC84 - mov r0, #0x49 - lsl r0, r0, #2 - str r0, [sp] - ldr r0, _0223B91C ; =0x022464E4 - ldr r1, _0223B920 ; =0x02246AD4 - mov r2, #0 - add r3, r4, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223B906 - ldr r0, _0223B924 ; =0x02246AC0 - mov r1, #8 - str r1, [r0, #0] - add sp, #4 - pop {r3, r4, pc} -_0223B906: - ldr r0, _0223B924 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223B918: .word 0x02246BC0 -_0223B91C: .word 0x022464E4 -_0223B920: .word 0x02246AD4 -_0223B924: .word 0x02246AC0 - thumb_func_end ov94_0223B8D8 - - thumb_func_start ov94_0223B928 -ov94_0223B928: ; 0x0223B928 - push {r3, lr} - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - ldr r0, _0223B95C ; =0x02246530 - ldr r1, _0223B960 ; =0x02246AD4 - ldr r3, _0223B964 ; =0x02246BFC - mov r2, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223B94A - ldr r0, _0223B968 ; =0x02246AC0 - mov r1, #0xa - str r1, [r0, #0] - pop {r3, pc} -_0223B94A: - ldr r0, _0223B968 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - nop -_0223B95C: .word 0x02246530 -_0223B960: .word 0x02246AD4 -_0223B964: .word 0x02246BFC -_0223B968: .word 0x02246AC0 - thumb_func_end ov94_0223B928 - - thumb_func_start ov94_0223B96C -ov94_0223B96C: ; 0x0223B96C - push {r3, lr} - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - ldr r0, _0223B9A0 ; =0x0224657C - ldr r1, _0223B9A4 ; =0x02246AD4 - ldr r3, _0223B9A8 ; =0x02246BFC - mov r2, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223B98E - ldr r0, _0223B9AC ; =0x02246AC0 - mov r1, #0xc - str r1, [r0, #0] - pop {r3, pc} -_0223B98E: - ldr r0, _0223B9AC ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - nop -_0223B9A0: .word 0x0224657C -_0223B9A4: .word 0x02246AD4 -_0223B9A8: .word 0x02246BFC -_0223B9AC: .word 0x02246AC0 - thumb_func_end ov94_0223B96C - - thumb_func_start ov94_0223B9B0 -ov94_0223B9B0: ; 0x0223B9B0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _0223BA14 ; =0x02246BC0 - add r6, r2, #0 - str r6, [r0, #0x40] - add r4, r1, #0 - bl ov60_0221FC84 - ldrb r0, [r5] - ldr r1, _0223BA18 ; =0x02246AD4 - mov r2, #7 - strb r0, [r1] - ldrb r0, [r5, #1] - add r3, r6, #0 - strb r0, [r1, #1] - ldrb r0, [r5, #2] - strb r0, [r1, #2] - ldrb r0, [r5, #3] - strb r0, [r1, #3] - ldrb r0, [r5, #4] - strb r0, [r1, #4] - ldrb r0, [r5, #5] - strb r0, [r1, #5] - ldr r0, _0223BA1C ; =0x02246AC0 - strb r4, [r0, #0x1a] - mov r0, #0x49 - lsl r0, r0, #2 - mul r0, r4 - str r0, [sp] - ldr r0, _0223BA20 ; =0x022465C8 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223BA00 - ldr r0, _0223BA1C ; =0x02246AC0 - mov r1, #0xe - str r1, [r0, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0223BA00: - ldr r0, _0223BA1C ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - add sp, #4 - pop {r3, r4, r5, r6, pc} - nop -_0223BA14: .word 0x02246BC0 -_0223BA18: .word 0x02246AD4 -_0223BA1C: .word 0x02246AC0 -_0223BA20: .word 0x022465C8 - thumb_func_end ov94_0223B9B0 - - thumb_func_start ov94_0223BA24 -ov94_0223BA24: ; 0x0223BA24 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223BA78 ; =0x02246BC0 - add r4, r1, #0 - str r4, [r0, #0x40] - bl ov60_0221FC84 - ldr r3, _0223BA7C ; =0x02246AD4 - add r2, r5, #0 - mov r1, #8 -_0223BA38: - ldrb r0, [r2] - add r2, r2, #1 - strb r0, [r3] - add r3, r3, #1 - sub r1, r1, #1 - bne _0223BA38 - mov r0, #6 - ldrsb r1, [r5, r0] - mov r0, #0x49 - lsl r0, r0, #2 - mul r0, r1 - str r0, [sp] - ldr r0, _0223BA80 ; =0x022465C8 - ldr r1, _0223BA7C ; =0x02246AD4 - mov r2, #8 - add r3, r4, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223BA68 - ldr r0, _0223BA84 ; =0x02246AC0 - mov r1, #0xe - str r1, [r0, #0] - pop {r3, r4, r5, pc} -_0223BA68: - ldr r0, _0223BA84 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223BA78: .word 0x02246BC0 -_0223BA7C: .word 0x02246AD4 -_0223BA80: .word 0x022465C8 -_0223BA84: .word 0x02246AC0 - thumb_func_end ov94_0223BA24 - - thumb_func_start ov94_0223BA88 -ov94_0223BA88: ; 0x0223BA88 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - ldr r0, _0223BADC ; =0x02246BC0 - add r6, r2, #0 - add r4, r1, #0 - str r6, [r0, #0x40] - bl ov60_0221FC84 - mov r2, #0x49 - ldr r0, _0223BAE0 ; =0x02246AD4 - add r1, r4, #0 - lsl r2, r2, #2 - bl sub_020D50B8 - ldr r0, _0223BADC ; =0x02246BC0 - mov r2, #0x49 - str r5, [r0, #0x38] - lsl r2, r2, #2 - str r2, [sp] - ldr r0, _0223BAE4 ; =0x02246614 - ldr r1, _0223BAE0 ; =0x02246AD4 - add r2, r2, #4 - add r3, r6, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223BACA - ldr r0, _0223BAE8 ; =0x02246AC0 - mov r1, #0x10 - str r1, [r0, #0] - add sp, #4 - pop {r3, r4, r5, r6, pc} -_0223BACA: - ldr r0, _0223BAE8 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223BADC: .word 0x02246BC0 -_0223BAE0: .word 0x02246AD4 -_0223BAE4: .word 0x02246614 -_0223BAE8: .word 0x02246AC0 - thumb_func_end ov94_0223BA88 - - thumb_func_start ov94_0223BAEC -ov94_0223BAEC: ; 0x0223BAEC - push {r3, lr} - ldr r0, _0223BB2C ; =0x02246ACC - ldr r2, _0223BB30 ; =0x02246AD4 - ldr r1, [r0, #0] - ldr r0, [r0, #4] - str r1, [r2, #0] - str r0, [r2, #4] - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - ldr r0, _0223BB34 ; =0x02246664 - ldr r1, _0223BB30 ; =0x02246AD4 - ldr r3, _0223BB38 ; =0x02246BFC - mov r2, #8 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223BB1A - ldr r0, _0223BB3C ; =0x02246AC0 - mov r1, #0x12 - str r1, [r0, #0] - pop {r3, pc} -_0223BB1A: - ldr r0, _0223BB3C ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - nop -_0223BB2C: .word 0x02246ACC -_0223BB30: .word 0x02246AD4 -_0223BB34: .word 0x02246664 -_0223BB38: .word 0x02246BFC -_0223BB3C: .word 0x02246AC0 - thumb_func_end ov94_0223BAEC - - thumb_func_start ov94_0223BB40 -ov94_0223BB40: ; 0x0223BB40 - push {r3, lr} - bl ov60_0221FC84 - mov r0, #2 - str r0, [sp] - ldr r0, _0223BB74 ; =0x022466B8 - ldr r1, _0223BB78 ; =0x02246AD4 - ldr r3, _0223BB7C ; =0x02246BFC - mov r2, #0 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223BB62 - ldr r0, _0223BB80 ; =0x02246AC0 - mov r1, #0x14 - str r1, [r0, #0] - pop {r3, pc} -_0223BB62: - ldr r0, _0223BB80 ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, pc} - nop -_0223BB74: .word 0x022466B8 -_0223BB78: .word 0x02246AD4 -_0223BB7C: .word 0x02246BFC -_0223BB80: .word 0x02246AC0 - thumb_func_end ov94_0223BB40 - - thumb_func_start ov94_0223BB84 -ov94_0223BB84: ; 0x0223BB84 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0x1c - add r4, r1, #0 - bl sub_020C3FA0 - ldr r0, _0223BBD0 ; =0x02246AD4 - add r1, r5, #0 - mov r2, #0x64 - bl sub_020D50B8 - ldr r0, _0223BBD4 ; =0x02246BC0 - str r4, [r0, #0x40] - bl ov60_0221FC84 - mov r0, #8 - str r0, [sp] - ldr r3, _0223BBD4 ; =0x02246BC0 - ldr r0, _0223BBD8 ; =0x02246704 - ldr r1, _0223BBD0 ; =0x02246AD4 - ldr r3, [r3, #0x40] - mov r2, #0x64 - bl ov94_0223BBE0 - cmp r0, #0 - beq _0223BBC0 - ldr r0, _0223BBDC ; =0x02246AC0 - mov r1, #0x16 - str r1, [r0, #0] - pop {r3, r4, r5, pc} -_0223BBC0: - ldr r0, _0223BBDC ; =0x02246AC0 - mov r1, #0x18 - str r1, [r0, #0] - sub r1, #0x25 - str r1, [r0, #4] - bl ov60_0221FDEC - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223BBD0: .word 0x02246AD4 -_0223BBD4: .word 0x02246BC0 -_0223BBD8: .word 0x02246704 -_0223BBDC: .word 0x02246AC0 - thumb_func_end ov94_0223BB84 - - thumb_func_start ov94_0223BBE0 -ov94_0223BBE0: ; 0x0223BBE0 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r1, #0 - ldr r1, [sp, #0x18] - str r3, [sp] - str r1, [sp, #4] - add r4, r2, #0 - ldr r1, _0223BC14 ; =0x02246AC0 - add r2, r5, #0 - ldr r1, [r1, #8] - add r3, r4, #0 - bl ov60_0221FCA8 - cmp r0, #0 - beq _0223BC06 - cmp r0, #1 - beq _0223BC0C - cmp r0, #2 - b _0223BC0C -_0223BC06: - add sp, #8 - mov r0, #1 - pop {r3, r4, r5, pc} -_0223BC0C: - mov r0, #0 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223BC14: .word 0x02246AC0 - thumb_func_end ov94_0223BBE0 - - thumb_func_start ov94_0223BC18 -ov94_0223BC18: ; 0x0223BC18 - push {r4, lr} - cmp r0, #0x20 - bhi _0223BC90 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223BC2A: ; jump table - .short _0223BC6C - _0223BC2A - 2 ; case 0 - .short _0223BC6C - _0223BC2A - 2 ; case 1 - .short _0223BC72 - _0223BC2A - 2 ; case 2 - .short _0223BC6C - _0223BC2A - 2 ; case 3 - .short _0223BC6C - _0223BC2A - 2 ; case 4 - .short _0223BC6C - _0223BC2A - 2 ; case 5 - .short _0223BC6C - _0223BC2A - 2 ; case 6 - .short _0223BC90 - _0223BC2A - 2 ; case 7 - .short _0223BC72 - _0223BC2A - 2 ; case 8 - .short _0223BC6C - _0223BC2A - 2 ; case 9 - .short _0223BC6C - _0223BC2A - 2 ; case 10 - .short _0223BC78 - _0223BC2A - 2 ; case 11 - .short _0223BC7E - _0223BC2A - 2 ; case 12 - .short _0223BC7E - _0223BC2A - 2 ; case 13 - .short _0223BC6C - _0223BC2A - 2 ; case 14 - .short _0223BC8A - _0223BC2A - 2 ; case 15 - .short _0223BC84 - _0223BC2A - 2 ; case 16 - .short _0223BC84 - _0223BC2A - 2 ; case 17 - .short _0223BC84 - _0223BC2A - 2 ; case 18 - .short _0223BC84 - _0223BC2A - 2 ; case 19 - .short _0223BC6C - _0223BC2A - 2 ; case 20 - .short _0223BC6C - _0223BC2A - 2 ; case 21 - .short _0223BC6C - _0223BC2A - 2 ; case 22 - .short _0223BC6C - _0223BC2A - 2 ; case 23 - .short _0223BC90 - _0223BC2A - 2 ; case 24 - .short _0223BC72 - _0223BC2A - 2 ; case 25 - .short _0223BC84 - _0223BC2A - 2 ; case 26 - .short _0223BC84 - _0223BC2A - 2 ; case 27 - .short _0223BC84 - _0223BC2A - 2 ; case 28 - .short _0223BC84 - _0223BC2A - 2 ; case 29 - .short _0223BC8A - _0223BC2A - 2 ; case 30 - .short _0223BC84 - _0223BC2A - 2 ; case 31 - .short _0223BC6C - _0223BC2A - 2 ; case 32 -_0223BC6C: - mov r4, #0xc - mvn r4, r4 - b _0223BC94 -_0223BC72: - mov r4, #0xc - mvn r4, r4 - b _0223BC94 -_0223BC78: - mov r4, #0xe - mvn r4, r4 - b _0223BC94 -_0223BC7E: - mov r4, #0xe - mvn r4, r4 - b _0223BC94 -_0223BC84: - mov r4, #1 - mvn r4, r4 - b _0223BC94 -_0223BC8A: - mov r4, #1 - mvn r4, r4 - b _0223BC94 -_0223BC90: - mov r4, #0xc - mvn r4, r4 -_0223BC94: - mov r0, #0xc - mvn r0, r0 - cmp r4, r0 - beq _0223BCAC - bl ov4_02213898 - cmp r0, #9 - beq _0223BCA8 - mov r4, #0xd - mvn r4, r4 -_0223BCA8: - bl ov4_021D76E8 -_0223BCAC: - add r0, r4, #0 - pop {r4, pc} - thumb_func_end ov94_0223BC18 - - thumb_func_start ov94_0223BCB0 -ov94_0223BCB0: ; 0x0223BCB0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - add r6, r0, #0 - ldr r0, [r5, #0] - cmp r0, #0 - beq _0223BCC6 - cmp r0, #1 - bne _0223BCC4 - b _0223BDD4 -_0223BCC4: - b _0223BDEA -_0223BCC6: - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _0223BDF0 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _0223BDF4 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - mov r2, #7 - mov r0, #3 - mov r1, #0x3e - lsl r2, r2, #0x10 - bl sub_02017FC8 - ldr r1, _0223BDF8 ; =0x00001488 - add r0, r6, #0 - mov r2, #0x3e - bl sub_0200681C - ldr r2, _0223BDF8 ; =0x00001488 - mov r1, #0 - add r4, r0, #0 - bl sub_020D5124 - mov r0, #0x3e - bl sub_02018340 - str r0, [r4, #4] - ldr r0, _0223BDFC ; =0x02246C04 - add r2, sp, #0 - ldr r3, _0223BE00 ; =0x02245A00 - str r4, [r0, #4] - add r7, r2, #0 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, r7, #0 - bl sub_02018368 - mov r0, #0xb - mov r1, #0x40 - mov r2, #0x3e - bl sub_0200B368 - mov r1, #0xb9 - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r2, _0223BE04 ; =0x0000029F - mov r0, #0 - mov r1, #0x1a - mov r3, #0x3e - bl sub_0200B144 - ldr r1, _0223BE08 ; =0x00000B94 - ldr r2, _0223BE0C ; =0x000002A2 - str r0, [r4, r1] - mov r0, #0 - mov r1, #0x1a - mov r3, #0x3e - bl sub_0200B144 - ldr r1, _0223BE10 ; =0x00000B9C - ldr r2, _0223BE14 ; =0x000002B7 - str r0, [r4, r1] - mov r0, #0 - mov r1, #0x1a - mov r3, #0x3e - bl sub_0200B144 - mov r1, #0xba - lsl r1, r1, #4 - str r0, [r4, r1] - mov r2, #0x67 - mov r0, #0 - mov r1, #0x1a - lsl r2, r2, #2 - mov r3, #0x3e - bl sub_0200B144 - ldr r1, _0223BE18 ; =0x00000B98 - ldr r2, _0223BE1C ; =0x000002B6 - str r0, [r4, r1] - mov r0, #0 - mov r1, #0x1a - mov r3, #0x3e - bl sub_0200B144 - ldr r1, _0223BE20 ; =0x00000BA4 - str r0, [r4, r1] - mov r0, #4 - mov r1, #8 - bl sub_02017DD4 - add r0, r4, #0 - add r1, r6, #0 - bl ov94_0223C03C - add r0, r4, #0 - bl ov94_0223C4E0 - ldr r1, _0223BE24 ; =0x00000497 - mov r0, #0xb - mov r2, #1 - bl sub_02004550 - ldr r1, _0223BE28 ; =0x00020020 - mov r0, #0x3e - bl sub_02018144 - str r0, [r4, #0x4c] - add r0, #0x1f - mov r1, #0x1f - bic r0, r1 - mov r1, #2 - lsl r1, r1, #0x10 - mov r2, #0 - bl sub_020A5404 - str r0, [r4, #0x50] - mov r0, #1 - str r0, [r5, #0] - b _0223BDEA -_0223BDD4: - bl sub_02099550 - bl sub_020995B4 - bl sub_02033478 - mov r0, #0 - str r0, [r5, #0] - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0223BDEA: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223BDF0: .word 0xFFFFE0FF -_0223BDF4: .word 0x04001000 -_0223BDF8: .word 0x00001488 -_0223BDFC: .word 0x02246C04 -_0223BE00: .word 0x02245A00 -_0223BE04: .word 0x0000029F -_0223BE08: .word 0x00000B94 -_0223BE0C: .word 0x000002A2 -_0223BE10: .word 0x00000B9C -_0223BE14: .word 0x000002B7 -_0223BE18: .word 0x00000B98 -_0223BE1C: .word 0x000002B6 -_0223BE20: .word 0x00000BA4 -_0223BE24: .word 0x00000497 -_0223BE28: .word 0x00020020 - thumb_func_end ov94_0223BCB0 - - thumb_func_start ov94_0223BE2C -ov94_0223BE2C: ; 0x0223BE2C - push {r4, r5, r6, lr} - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - bl ov4_021D8018 - bl ov94_0223B15C - ldr r1, [r5, #0] - cmp r1, #5 - bhi _0223BF1C - add r0, r1, r1 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223BE50: ; jump table - .short _0223BE5C - _0223BE50 - 2 ; case 0 - .short _0223BE78 - _0223BE50 - 2 ; case 1 - .short _0223BE9C - _0223BE50 - 2 ; case 2 - .short _0223BEAA - _0223BE50 - 2 ; case 3 - .short _0223BEBE - _0223BE50 - 2 ; case 4 - .short _0223BF18 - _0223BE50 - 2 ; case 5 -_0223BE5C: - bl sub_020334A4 - cmp r0, #0 - beq _0223BF1C - ldr r1, [r4, #0x50] - ldr r0, _0223BF38 ; =0x02246C04 - str r1, [r0, #0] - ldr r0, _0223BF3C ; =ov94_0223C468 - ldr r1, _0223BF40 ; =ov94_0223C490 - bl ov4_021D776C - mov r0, #1 - str r0, [r5, #0] - b _0223BF1C -_0223BE78: - ldr r3, [r4, #0x14] - mov r2, #0xc - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223BF44 ; =0x0224674C - add r0, r4, #0 - ldr r2, [r2, r6] - blx r2 - str r0, [r5, #0] - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223BF1C - add r0, r4, #0 - bl ov94_0223C508 - b _0223BF1C -_0223BE9C: - bl sub_0200F2AC - cmp r0, #0 - beq _0223BF1C - mov r0, #3 - str r0, [r5, #0] - b _0223BF1C -_0223BEAA: - ldr r3, [r4, #0x14] - mov r2, #0xc - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223BF48 ; =0x02246750 - add r0, r4, #0 - ldr r2, [r2, r6] - blx r2 - str r0, [r5, #0] - b _0223BF1C -_0223BEBE: - bl sub_0200F2AC - cmp r0, #0 - beq _0223BF1C - mov r0, #0x42 - lsl r0, r0, #2 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223BF02 - add r0, r4, #0 - bl ov94_0223C4E0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025F30 - add r1, r0, #0 - add r0, r4, #0 - bl ov94_02243EF8 - mov r1, #0x47 - lsl r1, r1, #2 - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0 - bl ov94_02244234 - add r0, r4, #0 - bl ov94_0223D068 - mov r0, #0x42 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_0223BF02: - ldr r3, [r4, #0x14] - mov r2, #0xc - add r6, r3, #0 - mul r6, r2 - ldr r2, _0223BF4C ; =0x02246754 - ldr r1, [r5, #0] - ldr r2, [r2, r6] - add r0, r4, #0 - blx r2 - str r0, [r5, #0] - b _0223BF1C -_0223BF18: - mov r0, #1 - pop {r4, r5, r6, pc} -_0223BF1C: - add r0, r4, #0 - bl ov94_0223C578 - add r0, r4, #0 - bl ov94_0223C598 - ldr r0, _0223BF50 ; =0x00000BE8 - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223BF34 - bl sub_020219F8 -_0223BF34: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223BF38: .word 0x02246C04 -_0223BF3C: .word ov94_0223C468 -_0223BF40: .word ov94_0223C490 -_0223BF44: .word 0x0224674C -_0223BF48: .word 0x02246750 -_0223BF4C: .word 0x02246754 -_0223BF50: .word 0x00000BE8 - thumb_func_end ov94_0223BE2C - - thumb_func_start ov94_0223BF54 -ov94_0223BF54: ; 0x0223BF54 - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r0, [r4, #0x4c] - bl sub_020181C4 - bl sub_020995C4 - bl sub_02099560 - add r0, r4, #0 - bl ov94_0223C508 - ldr r0, _0223BFD4 ; =0x00000B98 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0xba - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _0223BFD8 ; =0x00000B9C - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _0223BFDC ; =0x00000B94 - ldr r0, [r4, r0] - bl sub_0200B190 - ldr r0, _0223BFE0 ; =0x00000BA4 - ldr r0, [r4, r0] - bl sub_0200B190 - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_0200B3F0 - add r0, r4, #0 - bl ov94_0223C0A0 - bl sub_020334CC - ldr r0, [r4, #4] - bl sub_020181C4 - ldr r0, [r4, #0] - bl sub_020181C4 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - mov r0, #0x3e - bl sub_0201807C - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223BFD4: .word 0x00000B98 -_0223BFD8: .word 0x00000B9C -_0223BFDC: .word 0x00000B94 -_0223BFE0: .word 0x00000BA4 - thumb_func_end ov94_0223BF54 - - thumb_func_start ov94_0223BFE4 -ov94_0223BFE4: ; 0x0223BFE4 - push {r4, lr} - ldr r1, _0223C010 ; =0x000010B8 - add r4, r0, #0 - ldr r1, [r4, r1] - cmp r1, #0 - beq _0223BFF8 - blx r1 - ldr r0, _0223C010 ; =0x000010B8 - mov r1, #0 - str r1, [r4, r0] -_0223BFF8: - bl sub_0201DCAC - bl sub_0200A858 - ldr r3, _0223C014 ; =0x027E0000 - ldr r1, _0223C018 ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r4, pc} - nop -_0223C010: .word 0x000010B8 -_0223C014: .word 0x027E0000 -_0223C018: .word 0x00003FF8 - thumb_func_end ov94_0223BFE4 - - thumb_func_start ov94_0223C01C -ov94_0223C01C: ; 0x0223C01C - push {r4, lr} - sub sp, #0x28 - ldr r4, _0223C038 ; =0x02245A20 - add r3, sp, #0 - mov r2, #5 -_0223C026: - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - sub r2, r2, #1 - bne _0223C026 - add r0, sp, #0 - bl sub_0201FE94 - add sp, #0x28 - pop {r4, pc} - ; .align 2, 0 -_0223C038: .word 0x02245A20 - thumb_func_end ov94_0223C01C - - thumb_func_start ov94_0223C03C -ov94_0223C03C: ; 0x0223C03C - push {r3, r4, r5, lr} - add r4, r0, #0 - add r0, r1, #0 - bl sub_02006840 - mov r1, #0 - str r0, [r4, #0] - add r0, r4, #0 - add r2, r1, #0 - str r1, [r4, #0x14] - bl ov94_0223C4C0 - mov r2, #0x11 - ldr r0, _0223C098 ; =0x00000B7E - mov r1, #0 - lsl r2, r2, #4 - strh r1, [r4, r2] - strh r1, [r4, r0] - mov r5, #3 - add r3, r0, #2 - strb r5, [r4, r3] - add r3, r0, #3 - strb r1, [r4, r3] - add r3, r0, #4 - strb r1, [r4, r3] - add r0, r0, #6 - strh r1, [r4, r0] - ldr r0, _0223C09C ; =0x00001090 - mov r3, #0x12 - strh r1, [r4, r0] - add r2, r2, #4 - strh r3, [r4, r2] - add r2, r0, #0 - add r2, #0x1c - strh r1, [r4, r2] - add r2, r0, #0 - add r2, #0x1e - strh r1, [r4, r2] - add r2, r0, #2 - strh r1, [r4, r2] - add r2, r0, #0 - sub r2, #0x14 - str r1, [r4, r2] - add r0, #0xc0 - str r1, [r4, r0] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223C098: .word 0x00000B7E -_0223C09C: .word 0x00001090 - thumb_func_end ov94_0223C03C - - thumb_func_start ov94_0223C0A0 -ov94_0223C0A0: ; 0x0223C0A0 - bx lr - ; .align 2, 0 - thumb_func_end ov94_0223C0A0 - - thumb_func_start ov94_0223C0A4 -ov94_0223C0A4: ; 0x0223C0A4 - push {r4, lr} - sub sp, #0x10 - ldr r4, _0223C0D0 ; =0x02245A10 - add r3, sp, #0 - add r2, r3, #0 - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r4!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_0201E86C - mov r0, #0x14 - mov r1, #0x3e - bl sub_0201F834 - bl sub_0201E994 - bl sub_0201F8E4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0223C0D0: .word 0x02245A10 - thumb_func_end ov94_0223C0A4 - - thumb_func_start ov94_0223C0D4 -ov94_0223C0D4: ; 0x0223C0D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - mov r0, #0x68 - mov r1, #0x3e - bl sub_02006C24 - str r0, [sp, #0x18] - bl sub_020A7944 - mov r0, #0 - str r0, [sp] - mov r1, #0x7e - str r1, [sp, #4] - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r2, #0x3e - str r2, [sp, #0x10] - add r2, r0, #0 - bl sub_0200A784 - ldr r1, _0223C2DC ; =0x00000BEC - mov r0, #0x4e - add r1, r5, r1 - mov r2, #0x3e - bl sub_020095C4 - ldr r1, _0223C2E0 ; =0x00000BE8 - mov r2, #1 - str r0, [r5, r1] - add r0, r1, #4 - add r0, r5, r0 - mov r1, #0 - lsl r2, r2, #0x14 - bl sub_0200964C - ldr r7, _0223C2E4 ; =0x00000D14 - mov r6, #0 - add r4, r5, #0 -_0223C124: - mov r0, #3 - add r1, r6, #0 - mov r2, #0x3e - bl sub_02009714 - str r0, [r4, r7] - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #4 - blt _0223C124 - mov r0, #0 - str r0, [sp] - mov r3, #1 - str r3, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - ldr r0, _0223C2E4 ; =0x00000D14 - ldr r1, [sp, #0x18] - ldr r0, [r5, r0] - mov r2, #0x12 - bl sub_02009A4C - ldr r1, _0223C2E8 ; =0x00000D24 - mov r3, #0 - str r0, [r5, r1] - str r3, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #3 - str r0, [sp, #8] - mov r0, #0x3e - sub r1, #0xc - str r0, [sp, #0xc] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r2, #9 - bl sub_02009B04 - ldr r1, _0223C2EC ; =0x00000D28 - mov r2, #0x13 - str r0, [r5, r1] - mov r0, #0 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x3e - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r3, #1 - bl sub_02009BC4 - ldr r1, _0223C2F0 ; =0x00000D2C - mov r2, #0x14 - str r0, [r5, r1] - mov r0, #0 - str r0, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x3e - sub r1, #0xc - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r3, #1 - bl sub_02009BC4 - mov r1, #0xd3 - lsl r1, r1, #4 - str r0, [r5, r1] - mov r3, #1 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x3e - sub r1, #0x1c - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r2, #0x20 - bl sub_02009A4C - ldr r1, _0223C2F4 ; =0x00000D34 - mov r2, #8 - str r0, [r5, r1] - mov r0, #1 - str r0, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #9 - str r0, [sp, #8] - mov r0, #0x3e - sub r1, #0x1c - str r0, [sp, #0xc] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r3, #0 - bl sub_02009B04 - ldr r1, _0223C2F8 ; =0x00000D38 - mov r3, #1 - str r0, [r5, r1] - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - mov r0, #0x3e - sub r1, #0x1c - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r2, #0x21 - bl sub_02009BC4 - ldr r1, _0223C2FC ; =0x00000D3C - mov r3, #1 - str r0, [r5, r1] - str r3, [sp] - mov r0, #3 - str r0, [sp, #4] - mov r0, #0x3e - sub r1, #0x1c - str r0, [sp, #8] - ldr r0, [r5, r1] - ldr r1, [sp, #0x18] - mov r2, #0x22 - bl sub_02009BC4 - mov r1, #0x35 - lsl r1, r1, #6 - str r0, [r5, r1] - sub r1, #0x1c - ldr r0, [r5, r1] - bl sub_0200A328 - ldr r0, _0223C2F4 ; =0x00000D34 - ldr r0, [r5, r0] - bl sub_0200A328 - ldr r0, _0223C2EC ; =0x00000D28 - ldr r0, [r5, r0] - bl sub_0200A5C8 - ldr r0, _0223C2F8 ; =0x00000D38 - ldr r0, [r5, r0] - bl sub_0200A5C8 - bl sub_02079FD0 - add r1, r0, #0 - mov r0, #0x13 - add r2, sp, #0x1c - mov r3, #0x3e - bl sub_02006F88 - str r0, [sp, #0x14] - ldr r0, [sp, #0x1c] - mov r1, #0x60 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [sp, #0x1c] - mov r1, #0x60 - ldr r0, [r0, #0xc] - add r2, r1, #0 - bl sub_020C0160 - ldr r0, [sp, #0x1c] - mov r7, #0x1f - ldr r4, [r0, #0xc] - mov r3, #0 - add r5, r7, #0 -_0223C27C: - ldrh r2, [r4] - mov r0, #0x1f - add r3, r3, #1 - add r1, r2, #0 - and r1, r0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r1, r0, #1 - asr r0, r2, #0xa - add r6, r0, #0 - and r6, r7 - lsr r0, r6, #0x1f - add r0, r6, r0 - asr r2, r2, #5 - add r6, r2, #0 - and r6, r5 - lsr r2, r6, #0x1f - add r2, r6, r2 - asr r0, r0, #1 - asr r2, r2, #1 - lsl r0, r0, #0xa - lsl r2, r2, #5 - orr r0, r2 - orr r0, r1 - strh r0, [r4] - add r4, r4, #2 - cmp r3, #0x30 - blt _0223C27C - ldr r0, [sp, #0x1c] - mov r1, #0x60 - ldr r0, [r0, #0xc] - bl sub_020C2C54 - ldr r0, [sp, #0x1c] - mov r1, #0xc0 - ldr r0, [r0, #0xc] - mov r2, #0x60 - bl sub_020C0160 - ldr r0, [sp, #0x14] - bl sub_020181C4 - ldr r0, [sp, #0x18] - bl sub_02006CA8 - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223C2DC: .word 0x00000BEC -_0223C2E0: .word 0x00000BE8 -_0223C2E4: .word 0x00000D14 -_0223C2E8: .word 0x00000D24 -_0223C2EC: .word 0x00000D28 -_0223C2F0: .word 0x00000D2C -_0223C2F4: .word 0x00000D34 -_0223C2F8: .word 0x00000D38 -_0223C2FC: .word 0x00000D3C - thumb_func_end ov94_0223C0D4 - - thumb_func_start ov94_0223C300 -ov94_0223C300: ; 0x0223C300 - push {r3, r4} - ldr r4, _0223C328 ; =0x00000BE8 - ldr r1, [r1, r4] - str r1, [r0, #0] - str r2, [r0, #4] - mov r2, #0 - mov r1, #1 - str r2, [r0, #0x10] - lsl r1, r1, #0xc - str r1, [r0, #0x14] - str r1, [r0, #0x18] - str r1, [r0, #0x1c] - strh r2, [r0, #0x20] - mov r1, #1 - str r1, [r0, #0x24] - str r3, [r0, #0x28] - mov r1, #0x3e - str r1, [r0, #0x2c] - pop {r3, r4} - bx lr - ; .align 2, 0 -_0223C328: .word 0x00000BE8 - thumb_func_end ov94_0223C300 - - thumb_func_start ov94_0223C32C -ov94_0223C32C: ; 0x0223C32C - push {r3, r4, lr} - sub sp, #0x2c - mov r1, #0 - add r4, r0, #0 - str r1, [sp] - sub r0, r1, #1 - str r0, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r2, _0223C3BC ; =0x00000D14 - str r1, [sp, #0x10] - ldr r0, [r4, r2] - add r3, r1, #0 - str r0, [sp, #0x14] - add r0, r2, #4 - ldr r0, [r4, r0] - str r0, [sp, #0x18] - add r0, r2, #0 - add r0, #8 - ldr r0, [r4, r0] - str r0, [sp, #0x1c] - add r0, r2, #0 - add r0, #0xc - ldr r0, [r4, r0] - add r2, #0x40 - str r0, [sp, #0x20] - str r1, [sp, #0x24] - add r0, r4, r2 - add r2, r1, #0 - str r1, [sp, #0x28] - bl sub_020093B4 - mov r1, #1 - str r1, [sp] - sub r0, r1, #2 - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r3, _0223C3BC ; =0x00000D14 - str r0, [sp, #0x10] - ldr r2, [r4, r3] - str r2, [sp, #0x14] - add r2, r3, #4 - ldr r2, [r4, r2] - str r2, [sp, #0x18] - add r2, r3, #0 - add r2, #8 - ldr r2, [r4, r2] - str r2, [sp, #0x1c] - add r2, r3, #0 - add r2, #0xc - ldr r2, [r4, r2] - add r3, #0x64 - str r2, [sp, #0x20] - str r0, [sp, #0x24] - str r0, [sp, #0x28] - add r0, r4, r3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_020093B4 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x2c - pop {r3, r4, pc} - ; .align 2, 0 -_0223C3BC: .word 0x00000D14 - thumb_func_end ov94_0223C32C - - thumb_func_start ov94_0223C3C0 -ov94_0223C3C0: ; 0x0223C3C0 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - ldr r5, _0223C3F0 ; =0x022459F8 - add r4, sp, #4 - ldrh r6, [r5] - add r3, sp, #4 - strh r6, [r4] - ldrh r6, [r5, #2] - strh r6, [r4, #2] - ldrh r6, [r5, #4] - ldrh r5, [r5, #6] - strh r6, [r4, #4] - strh r5, [r4, #6] - strb r1, [r4, #2] - strh r2, [r4, #6] - mov r1, #0x3e - str r1, [sp] - add r1, r3, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_02002100 - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223C3F0: .word 0x022459F8 - thumb_func_end ov94_0223C3C0 - - thumb_func_start ov94_0223C3F4 -ov94_0223C3F4: ; 0x0223C3F4 - str r1, [r0, #0x2c] - str r2, [r0, #0x30] - bx lr - ; .align 2, 0 - thumb_func_end ov94_0223C3F4 - - thumb_func_start ov94_0223C3FC -ov94_0223C3FC: ; 0x0223C3FC - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - add r5, r2, #0 - cmp r1, #0 - ble _0223C41A - lsl r0, r1, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0223C428 -_0223C41A: - lsl r0, r1, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0223C428: - bl sub_020E1740 - str r0, [sp] - cmp r5, #0 - ble _0223C444 - lsl r0, r5, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _0223C452 -_0223C444: - lsl r0, r5, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_0223C452: - bl sub_020E1740 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov94_0223C3FC - - thumb_func_start ov94_0223C468 -ov94_0223C468: ; 0x0223C468 - push {r4, r5, r6, lr} - add r5, r1, #0 - add r4, r2, #0 - bl sub_020C3D98 - add r6, r0, #0 - ldr r0, _0223C48C ; =0x02246C04 - add r1, r5, #0 - ldr r0, [r0, #0] - add r2, r4, #0 - bl sub_020A5448 - add r4, r0, #0 - add r0, r6, #0 - bl sub_020C3DAC - add r0, r4, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223C48C: .word 0x02246C04 - thumb_func_end ov94_0223C468 - - thumb_func_start ov94_0223C490 -ov94_0223C490: ; 0x0223C490 - push {r3, r4, r5, lr} - add r5, r1, #0 - beq _0223C4AC - bl sub_020C3D98 - add r4, r0, #0 - ldr r0, _0223C4B0 ; =0x02246C04 - add r1, r5, #0 - ldr r0, [r0, #0] - bl sub_020A55D8 - add r0, r4, #0 - bl sub_020C3DAC -_0223C4AC: - pop {r3, r4, r5, pc} - nop -_0223C4B0: .word 0x02246C04 - thumb_func_end ov94_0223C490 - - thumb_func_start ov94_0223C4B4 -ov94_0223C4B4: ; 0x0223C4B4 - push {r3, lr} - bl ov4_021D7EAC - mov r1, #3 - sub r0, r1, r0 - pop {r3, pc} - thumb_func_end ov94_0223C4B4 - - thumb_func_start ov94_0223C4C0 -ov94_0223C4C0: ; 0x0223C4C0 - str r1, [r0, #0x18] - str r2, [r0, #0x24] - bx lr - ; .align 2, 0 - thumb_func_end ov94_0223C4C0 - - thumb_func_start ov94_0223C4C8 -ov94_0223C4C8: ; 0x0223C4C8 - ldr r1, [r0, #0x14] - str r1, [r0, #0x20] - ldr r1, [r0, #0x18] - str r1, [r0, #0x14] - bx lr - ; .align 2, 0 - thumb_func_end ov94_0223C4C8 - - thumb_func_start ov94_0223C4D4 -ov94_0223C4D4: ; 0x0223C4D4 - ldr r0, [r0, #0] - ldr r3, _0223C4DC ; =sub_02027AC0 - ldr r0, [r0, #0x24] - bx r3 - ; .align 2, 0 -_0223C4DC: .word sub_02027AC0 - thumb_func_end ov94_0223C4D4 - - thumb_func_start ov94_0223C4E0 -ov94_0223C4E0: ; 0x0223C4E0 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223C01C - bl ov94_0223C0A4 - add r0, r4, #0 - bl ov94_0223C0D4 - add r0, r4, #0 - bl ov94_0223C32C - ldr r0, _0223C504 ; =ov94_0223BFE4 - add r1, r4, #0 - bl sub_02017798 - pop {r4, pc} - nop -_0223C504: .word ov94_0223BFE4 - thumb_func_end ov94_0223C4E0 - - thumb_func_start ov94_0223C508 -ov94_0223C508: ; 0x0223C508 - push {r3, r4, r5, r6, r7, lr} - add r6, r0, #0 - bl ov94_022443B8 - ldr r0, _0223C560 ; =0x00000D24 - ldr r0, [r6, r0] - bl sub_0200A4E4 - ldr r0, _0223C564 ; =0x00000D34 - ldr r0, [r6, r0] - bl sub_0200A4E4 - ldr r0, _0223C568 ; =0x00000D28 - ldr r0, [r6, r0] - bl sub_0200A6DC - ldr r0, _0223C56C ; =0x00000D38 - ldr r0, [r6, r0] - bl sub_0200A6DC - ldr r7, _0223C570 ; =0x00000D14 - mov r4, #0 - add r5, r6, #0 -_0223C536: - ldr r0, [r5, r7] - bl sub_02009754 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #4 - blt _0223C536 - ldr r0, _0223C574 ; =0x00000BE8 - ldr r0, [r6, r0] - bl sub_02021964 - ldr r0, _0223C574 ; =0x00000BE8 - mov r1, #0 - str r1, [r6, r0] - bl sub_0200A878 - bl sub_0201E958 - bl sub_0201F8B4 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223C560: .word 0x00000D24 -_0223C564: .word 0x00000D34 -_0223C568: .word 0x00000D28 -_0223C56C: .word 0x00000D38 -_0223C570: .word 0x00000D14 -_0223C574: .word 0x00000BE8 - thumb_func_end ov94_0223C508 - - thumb_func_start ov94_0223C578 -ov94_0223C578: ; 0x0223C578 - ldrh r1, [r0, #0x3a] - cmp r1, #0 - beq _0223C582 - sub r1, r1, #1 - strh r1, [r0, #0x3a] -_0223C582: - bx lr - thumb_func_end ov94_0223C578 - - thumb_func_start ov94_0223C584 -ov94_0223C584: ; 0x0223C584 - ldr r1, _0223C594 ; =0x000010AE - mov r2, #1 - strh r2, [r0, r1] - mov r2, #0 - sub r1, r1, #2 - strh r2, [r0, r1] - bx lr - nop -_0223C594: .word 0x000010AE - thumb_func_end ov94_0223C584 - - thumb_func_start ov94_0223C598 -ov94_0223C598: ; 0x0223C598 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223C5D0 ; =0x000010AE - ldrh r1, [r4, r0] - cmp r1, #0 - beq _0223C5CC - ldr r0, [r4, #0] - sub r1, r1, #1 - ldr r0, [r0, #0xc] - bl sub_02079B54 - ldr r1, _0223C5D4 ; =0x000010AC - ldrh r2, [r4, r1] - add r0, r2, r0 - strh r0, [r4, r1] - add r0, r1, #2 - ldrh r0, [r4, r0] - add r2, r0, #1 - add r0, r1, #2 - strh r2, [r4, r0] - ldrh r0, [r4, r0] - cmp r0, #0x13 - bne _0223C5CC - mov r2, #0 - add r0, r1, #2 - strh r2, [r4, r0] -_0223C5CC: - pop {r4, pc} - nop -_0223C5D0: .word 0x000010AE -_0223C5D4: .word 0x000010AC - thumb_func_end ov94_0223C598 - - thumb_func_start ov94_0223C5D8 -ov94_0223C5D8: ; 0x0223C5D8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223C5EC ; =0x00000EFC - mov r1, #1 - add r0, r4, r0 - bl sub_0200E7FC - ldr r1, _0223C5F0 ; =0x0000107C - str r0, [r4, r1] - pop {r4, pc} - ; .align 2, 0 -_0223C5EC: .word 0x00000EFC -_0223C5F0: .word 0x0000107C - thumb_func_end ov94_0223C5D8 - - thumb_func_start ov94_0223C5F4 -ov94_0223C5F4: ; 0x0223C5F4 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223C60C ; =0x0000107C - ldr r0, [r4, r0] - cmp r0, #0 - beq _0223C60A - bl sub_0200EBA0 - ldr r0, _0223C60C ; =0x0000107C - mov r1, #0 - str r1, [r4, r0] -_0223C60A: - pop {r4, pc} - ; .align 2, 0 -_0223C60C: .word 0x0000107C - thumb_func_end ov94_0223C5F4 - - thumb_func_start ov94_0223C610 -ov94_0223C610: ; 0x0223C610 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_0223CB0C - ldr r0, [r4, #4] - bl ov94_0223C720 - add r0, r4, #0 - bl ov94_0223C888 - add r0, r4, #0 - bl ov94_0223C9C0 - add r0, r4, #0 - bl ov94_0223C950 - add r0, r4, #0 - bl ov94_02245934 - add r0, r4, #0 - bl ov94_0223CF3C - ldr r1, _0223C6CC ; =0x00000449 - mov r0, #0x17 - mov r2, #1 - bl sub_02004550 - ldrh r0, [r4, #0x34] - cmp r0, #0 - bne _0223C684 - add r0, r4, #0 - bl ov94_0223C85C - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #1 - strh r0, [r4, #0x34] - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025F30 - add r1, r0, #0 - add r0, r4, #0 - bl ov94_02243FA8 - b _0223C6BE -_0223C684: - ldr r0, _0223C6D0 ; =0x000010B0 - ldr r0, [r4, r0] - cmp r0, #1 - bne _0223C6A4 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - b _0223C6BA -_0223C6A4: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 -_0223C6BA: - mov r0, #5 - str r0, [r4, #0x2c] -_0223C6BE: - ldr r0, _0223C6D0 ; =0x000010B0 - mov r1, #0 - str r1, [r4, r0] - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - nop -_0223C6CC: .word 0x00000449 -_0223C6D0: .word 0x000010B0 - thumb_func_end ov94_0223C610 - - thumb_func_start ov94_0223C6D4 -ov94_0223C6D4: ; 0x0223C6D4 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223C4B4 - bl sub_020397B0 - ldr r1, [r4, #0x2c] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _0223C6F0 ; =0x022467C4 - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_0223C6F0: .word 0x022467C4 - thumb_func_end ov94_0223C6D4 - - thumb_func_start ov94_0223C6F4 -ov94_0223C6F4: ; 0x0223C6F4 - push {r4, lr} - add r4, r0, #0 - bl sub_02039794 - add r0, r4, #0 - bl ov94_0223C9B0 - add r0, r4, #0 - bl ov94_0223CB34 - add r0, r4, #0 - bl ov94_0223CAC8 - ldr r0, [r4, #4] - bl ov94_0223C830 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_0223C6F4 - - thumb_func_start ov94_0223C720 -ov94_0223C720: ; 0x0223C720 - push {r4, r5, lr} - sub sp, #0x9c - ldr r5, _0223C818 ; =0x02245A54 - add r3, sp, #0x8c - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223C81C ; =0x02245AB4 - add r3, sp, #0x70 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _0223C820 ; =0x02245A98 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _0223C824 ; =0x02245AD0 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _0223C828 ; =0x02245AEC - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _0223C82C ; =0x02245A7C - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - add r0, r4, #0 - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x9c - pop {r4, r5, pc} - nop -_0223C818: .word 0x02245A54 -_0223C81C: .word 0x02245AB4 -_0223C820: .word 0x02245A98 -_0223C824: .word 0x02245AD0 -_0223C828: .word 0x02245AEC -_0223C82C: .word 0x02245A7C - thumb_func_end ov94_0223C720 - - thumb_func_start ov94_0223C830 -ov94_0223C830: ; 0x0223C830 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_0223C830 - - thumb_func_start ov94_0223C85C -ov94_0223C85C: ; 0x0223C85C - push {r4, lr} - add r4, r0, #0 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CAC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_0223C85C - - thumb_func_start ov94_0223C888 -ov94_0223C888: ; 0x0223C888 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - ldr r5, [r6, #4] - mov r0, #0x68 - mov r1, #0x3e - bl sub_02006C24 - mov r1, #0x60 - str r1, [sp] - mov r1, #0x3e - mov r2, #0 - str r1, [sp, #4] - mov r1, #4 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [r6, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - mov r0, #3 - lsl r0, r0, #0xa - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0xe - add r2, r5, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x1e - add r2, r5, #0 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x1d - add r2, r5, #0 - mov r3, #2 - bl sub_0200710C - add r0, r6, #0 - bl ov94_0223D068 - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov94_0223C888 - - thumb_func_start ov94_0223C950 -ov94_0223C950: ; 0x0223C950 - push {r4, lr} - sub sp, #0x30 - ldr r2, _0223C9A4 ; =0x00000D54 - add r4, r0, #0 - add r0, sp, #0 - add r1, r4, #0 - add r2, r4, r2 - mov r3, #1 - bl ov94_0223C300 - mov r0, #0x11 - lsl r0, r0, #4 - ldrh r1, [r4, r0] - lsl r2, r1, #2 - ldr r1, _0223C9A8 ; =0x02245A48 - ldrh r1, [r1, r2] - lsl r1, r1, #0xc - str r1, [sp, #8] - ldrh r0, [r4, r0] - lsl r1, r0, #2 - ldr r0, _0223C9AC ; =0x02245A4A - ldrh r0, [r0, r1] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0x37 - lsl r1, r1, #6 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021D6C - add sp, #0x30 - pop {r4, pc} - ; .align 2, 0 -_0223C9A4: .word 0x00000D54 -_0223C9A8: .word 0x02245A48 -_0223C9AC: .word 0x02245A4A - thumb_func_end ov94_0223C950 - - thumb_func_start ov94_0223C9B0 -ov94_0223C9B0: ; 0x0223C9B0 - mov r1, #0x37 - lsl r1, r1, #6 - ldr r3, _0223C9BC ; =sub_02021BD4 - ldr r0, [r0, r1] - bx r3 - nop -_0223C9BC: .word sub_02021BD4 - thumb_func_end ov94_0223C9B0 - - thumb_func_start ov94_0223C9C0 -ov94_0223C9C0: ; 0x0223C9C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r3, #1 - add r7, r0, #0 - str r3, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - ldr r1, _0223CAB0 ; =0x00000F1C - str r0, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r7, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _0223CAB0 ; =0x00000F1C - mov r1, #0 - add r0, r7, r0 - bl sub_0201ADA4 - mov r0, #2 - str r0, [sp] - mov r3, #0 - ldr r0, _0223CAB4 ; =0x000F0400 - str r3, [sp, #4] - str r0, [sp, #8] - ldr r0, _0223CAB0 ; =0x00000F1C - ldr r2, _0223CAB8 ; =0x00000BB4 - str r3, [sp, #0xc] - ldr r2, [r7, r2] - add r0, r7, r0 - mov r1, #1 - bl sub_0201D78C - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, _0223CABC ; =0x00000F3C - mov r6, #0x61 - mov r4, #6 - add r5, r7, r0 -_0223CA18: - lsl r0, r4, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xf - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r5, #0 - mov r2, #1 - mov r3, #9 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r0, [sp, #0x14] - add r6, #0x1e - add r0, r0, #1 - add r4, r4, #5 - add r5, #0x10 - str r0, [sp, #0x14] - cmp r0, #3 - blt _0223CA18 - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - ldr r1, _0223CAC0 ; =0x00000EFC - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x60 - str r0, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r7, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _0223CAC0 ; =0x00000EFC - mov r1, #0xf - add r0, r7, r0 - bl sub_0201ADA4 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x96 - ldr r1, _0223CAC4 ; =0x0000103C - str r0, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r7, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, _0223CAC4 ; =0x0000103C - mov r1, #0xf - add r0, r7, r0 - bl sub_0201ADA4 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223CAB0: .word 0x00000F1C -_0223CAB4: .word 0x000F0400 -_0223CAB8: .word 0x00000BB4 -_0223CABC: .word 0x00000F3C -_0223CAC0: .word 0x00000EFC -_0223CAC4: .word 0x0000103C - thumb_func_end ov94_0223C9C0 - - thumb_func_start ov94_0223CAC8 -ov94_0223CAC8: ; 0x0223CAC8 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _0223CAFC ; =0x0000103C - add r0, r6, r0 - bl sub_0201A8FC - ldr r0, _0223CB00 ; =0x00000EFC - add r0, r6, r0 - bl sub_0201A8FC - ldr r0, _0223CB04 ; =0x00000F3C - mov r4, #0 - add r5, r6, r0 -_0223CAE2: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #3 - blt _0223CAE2 - ldr r0, _0223CB08 ; =0x00000F1C - add r0, r6, r0 - bl sub_0201A8FC - pop {r4, r5, r6, pc} - nop -_0223CAFC: .word 0x0000103C -_0223CB00: .word 0x00000EFC -_0223CB04: .word 0x00000F3C -_0223CB08: .word 0x00000F1C - thumb_func_end ov94_0223CAC8 - - thumb_func_start ov94_0223CB0C -ov94_0223CB0C: ; 0x0223CB0C - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r4, r1] - sub r1, #0x1c - ldr r0, [r4, r1] - mov r1, #0x27 - bl sub_0200B1EC - ldr r1, _0223CB30 ; =0x00000BB4 - str r0, [r4, r1] - pop {r4, pc} - nop -_0223CB30: .word 0x00000BB4 - thumb_func_end ov94_0223CB0C - - thumb_func_start ov94_0223CB34 -ov94_0223CB34: ; 0x0223CB34 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _0223CB4C ; =0x00000BB4 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 -_0223CB4C: .word 0x00000BB4 - thumb_func_end ov94_0223CB34 - - thumb_func_start ov94_0223CB50 -ov94_0223CB50: ; 0x0223CB50 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223CB8C ; =0x00001090 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _0223CB86 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - mov r0, #4 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - mov r1, #7 - mov r2, #0xb - bl ov94_0223C4C0 - mov r0, #1 - str r0, [r4, #0x1c] - mov r0, #9 - str r0, [r4, #0x2c] -_0223CB86: - mov r0, #3 - pop {r4, pc} - nop -_0223CB8C: .word 0x00001090 - thumb_func_end ov94_0223CB50 - - thumb_func_start ov94_0223CB90 -ov94_0223CB90: ; 0x0223CB90 - push {r3, lr} - mov r1, #0xa - mov r2, #2 - bl ov94_0223C3F4 - mov r0, #3 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov94_0223CB90 - - thumb_func_start ov94_0223CBA0 -ov94_0223CBA0: ; 0x0223CBA0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #3 - str r0, [r4, #0x2c] - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov94_0223CBA0 - - thumb_func_start ov94_0223CBC4 -ov94_0223CBC4: ; 0x0223CBC4 - push {r4, lr} - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _0223CBD4 - mov r0, #5 - str r0, [r4, #0x2c] -_0223CBD4: - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_0223CBC4 - - thumb_func_start ov94_0223CBD8 -ov94_0223CBD8: ; 0x0223CBD8 - push {r4, lr} - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _0223CBE8 - mov r0, #5 - str r0, [r4, #0x2c] -_0223CBE8: - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_0223CBD8 - - thumb_func_start ov94_0223CBEC -ov94_0223CBEC: ; 0x0223CBEC - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223CC24 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #4 - mov r2, #1 - mov r3, #0 - bl ov94_0223CF80 - add r0, r4, #0 - mov r1, #0xa - mov r2, #6 - bl ov94_0223C3F4 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - add r0, r4, #0 - bl ov94_0223C584 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0223CC24: .word 0x00000F0F - thumb_func_end ov94_0223CBEC - - thumb_func_start ov94_0223CC28 -ov94_0223CC28: ; 0x0223CC28 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223CDBC ; =0x021BF67C - mov r2, #2 - ldr r1, [r1, #0x48] - add r4, r0, #0 - tst r2, r1 - beq _0223CC64 - bl ov94_0223C4D4 - add r2, r0, #0 - ldr r0, _0223CDC0 ; =0x00000F0F - mov r1, #7 - str r0, [sp] - add r0, r4, #0 - mov r3, #0 - bl ov94_0223CFD8 - add r0, r4, #0 - mov r1, #0xa - mov r2, #0xc - bl ov94_0223C3F4 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CC8 - b _0223CDB4 -_0223CC64: - mov r2, #1 - tst r2, r1 - beq _0223CD36 - mov r1, #0x11 - lsl r1, r1, #4 - ldrh r1, [r4, r1] - cmp r1, #0 - beq _0223CC7E - cmp r1, #1 - beq _0223CCF0 - cmp r1, #2 - beq _0223CD04 - b _0223CDB4 -_0223CC7E: - ldrh r1, [r4, #0x36] - cmp r1, #0 - bne _0223CC98 - mov r1, #5 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #9 - str r0, [r4, #0x2c] - ldr r0, _0223CDC4 ; =0x000005DC - bl sub_02005748 - b _0223CDB4 -_0223CC98: - ldrh r1, [r4, #0x3a] - cmp r1, #0 - bne _0223CCBA - mov r1, #7 - mov r2, #0xb - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r4, #0x1c] - mov r0, #9 - str r0, [r4, #0x2c] - ldr r0, _0223CDC8 ; =0x00000708 - strh r0, [r4, #0x3a] - ldr r0, _0223CDC4 ; =0x000005DC - bl sub_02005748 - b _0223CDB4 -_0223CCBA: - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CC8 - ldr r0, _0223CDC0 ; =0x00000F0F - mov r1, #0x22 - str r0, [sp] - add r0, r4, #0 - mov r2, #1 - mov r3, #0 - bl ov94_0223CF80 - add r0, r4, #0 - mov r1, #0xb - mov r2, #5 - bl ov94_0223C3F4 - ldr r0, _0223CDCC ; =0x000005F3 - bl sub_02005748 - mov r0, #0x42 - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] - b _0223CDB4 -_0223CCF0: - mov r1, #4 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #9 - str r0, [r4, #0x2c] - ldr r0, _0223CDC4 ; =0x000005DC - bl sub_02005748 - b _0223CDB4 -_0223CD04: - bl ov94_0223C4D4 - add r2, r0, #0 - ldr r0, _0223CDC0 ; =0x00000F0F - mov r1, #7 - str r0, [sp] - add r0, r4, #0 - mov r3, #0 - bl ov94_0223CFD8 - add r0, r4, #0 - mov r1, #0xa - mov r2, #0xc - bl ov94_0223C3F4 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021CC8 - ldr r0, _0223CDC4 ; =0x000005DC - bl sub_02005748 - b _0223CDB4 -_0223CD36: - mov r2, #0x40 - add r0, r1, #0 - tst r0, r2 - beq _0223CD76 - add r0, r2, #0 - add r0, #0xd0 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _0223CDB4 - add r0, r2, #0 - add r0, #0xd0 - ldrh r0, [r4, r0] - add r2, #0xd0 - sub r0, r0, #1 - strh r0, [r4, r2] - ldr r0, _0223CDC4 ; =0x000005DC - bl sub_02005748 - mov r0, #0x11 - lsl r0, r0, #4 - ldrh r0, [r4, r0] - ldr r1, _0223CDD0 ; =0x02245A48 - ldr r2, _0223CDD4 ; =0x02245A4A - lsl r3, r0, #2 - mov r0, #0x37 - lsl r0, r0, #6 - ldrh r1, [r1, r3] - ldrh r2, [r2, r3] - ldr r0, [r4, r0] - bl ov94_0223C3FC - b _0223CDB4 -_0223CD76: - mov r2, #0x80 - add r0, r1, #0 - tst r0, r2 - beq _0223CDB4 - add r0, r2, #0 - add r0, #0x90 - ldrh r0, [r4, r0] - cmp r0, #2 - bhs _0223CDB4 - add r0, r2, #0 - add r0, #0x90 - ldrh r0, [r4, r0] - add r2, #0x90 - add r0, r0, #1 - strh r0, [r4, r2] - ldr r0, _0223CDC4 ; =0x000005DC - bl sub_02005748 - mov r0, #0x11 - lsl r0, r0, #4 - ldrh r0, [r4, r0] - ldr r1, _0223CDD0 ; =0x02245A48 - ldr r2, _0223CDD4 ; =0x02245A4A - lsl r3, r0, #2 - mov r0, #0x37 - lsl r0, r0, #6 - ldrh r1, [r1, r3] - ldrh r2, [r2, r3] - ldr r0, [r4, r0] - bl ov94_0223C3FC -_0223CDB4: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0223CDBC: .word 0x021BF67C -_0223CDC0: .word 0x00000F0F -_0223CDC4: .word 0x000005DC -_0223CDC8: .word 0x00000708 -_0223CDCC: .word 0x000005F3 -_0223CDD0: .word 0x02245A48 -_0223CDD4: .word 0x02245A4A - thumb_func_end ov94_0223CC28 - - thumb_func_start ov94_0223CDD8 -ov94_0223CDD8: ; 0x0223CDD8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025F30 - add r1, r0, #0 - add r0, r4, #0 - bl ov94_022440B8 - mov r0, #8 - str r0, [r4, #0x2c] - ldr r0, _0223CDFC ; =0x00001090 - mov r1, #0 - strh r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_0223CDFC: .word 0x00001090 - thumb_func_end ov94_0223CDD8 - - thumb_func_start ov94_0223CE00 -ov94_0223CE00: ; 0x0223CE00 - ldr r1, _0223CE10 ; =0x00001090 - ldrh r1, [r0, r1] - cmp r1, #0 - beq _0223CE0C - mov r1, #9 - str r1, [r0, #0x2c] -_0223CE0C: - mov r0, #3 - bx lr - ; .align 2, 0 -_0223CE10: .word 0x00001090 - thumb_func_end ov94_0223CE00 - - thumb_func_start ov94_0223CE14 -ov94_0223CE14: ; 0x0223CE14 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _0223CE3A - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - b _0223CE52 -_0223CE3A: - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 -_0223CE52: - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov94_0223CE14 - - thumb_func_start ov94_0223CE5C -ov94_0223CE5C: ; 0x0223CE5C - push {r4, lr} - add r4, r0, #0 - mov r1, #0xd - add r2, r1, #0 - ldr r0, [r4, #4] - add r2, #0xf5 - bl ov94_0223C3C0 - ldr r1, _0223CE78 ; =0x00001070 - str r0, [r4, r1] - mov r0, #0xd - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223CE78: .word 0x00001070 - thumb_func_end ov94_0223CE5C - - thumb_func_start ov94_0223CE7C -ov94_0223CE7C: ; 0x0223CE7C - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223CEE0 ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0223CEDA - sub r1, r1, #1 - cmp r0, r1 - ldr r0, _0223CEE4 ; =0x0000103C - bne _0223CEBC - add r0, r4, r0 - mov r1, #1 - bl sub_0200E084 - ldr r0, _0223CEE4 ; =0x0000103C - add r0, r4, r0 - bl sub_0201ACF4 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021CC8 - mov r0, #5 - str r0, [r4, #0x2c] - b _0223CEDA -_0223CEBC: - add r0, r4, r0 - mov r1, #1 - bl sub_0200E084 - ldr r0, _0223CEE4 ; =0x0000103C - add r0, r4, r0 - bl sub_0201ACF4 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #7 - str r0, [r4, #0x2c] -_0223CEDA: - mov r0, #3 - pop {r4, pc} - nop -_0223CEE0: .word 0x00001070 -_0223CEE4: .word 0x0000103C - thumb_func_end ov94_0223CE7C - - thumb_func_start ov94_0223CEE8 -ov94_0223CEE8: ; 0x0223CEE8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223CF04 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223CF00 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223CF00: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223CF04: .word 0x00000BE4 - thumb_func_end ov94_0223CEE8 - - thumb_func_start ov94_0223CF08 -ov94_0223CF08: ; 0x0223CF08 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223CF38 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223CF34 - mov r0, #0x42 - lsl r0, r0, #6 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0x2d - ble _0223CF34 - mov r1, #0 - str r1, [r4, r0] - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223CF34: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223CF38: .word 0x00000BE4 - thumb_func_end ov94_0223CF08 - - thumb_func_start ov94_0223CF3C -ov94_0223CF3C: ; 0x0223CF3C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldrh r1, [r7, #0x36] - mov r0, #0xc - ldr r2, _0223CF70 ; =0x02245A64 - mul r0, r1 - add r4, r2, r0 - ldr r0, _0223CF74 ; =0x00000F3C - mov r6, #0 - add r5, r7, r0 -_0223CF50: - ldr r1, _0223CF78 ; =0x00000B94 - ldr r2, [r4, #0] - ldr r1, [r7, r1] - ldr r3, _0223CF7C ; =0x00000F0F - add r0, r5, #0 - bl ov94_0223D030 - add r0, r5, #0 - bl sub_0201A954 - add r6, r6, #1 - add r4, r4, #4 - add r5, #0x10 - cmp r6, #3 - blt _0223CF50 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223CF70: .word 0x02245A64 -_0223CF74: .word 0x00000F3C -_0223CF78: .word 0x00000B94 -_0223CF7C: .word 0x00000F0F - thumb_func_end ov94_0223CF3C - - thumb_func_start ov94_0223CF80 -ov94_0223CF80: ; 0x0223CF80 - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r2, _0223CFCC ; =0x00000B94 - add r5, r0, #0 - ldr r0, [r5, r2] - add r2, #0x1c - ldr r2, [r5, r2] - bl sub_0200B1B8 - ldr r0, _0223CFD0 ; =0x00000EFC - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _0223CFD0 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _0223CFD0 ; =0x00000EFC - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _0223CFD4 ; =0x00000BE4 - str r0, [r5, r1] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223CFCC: .word 0x00000B94 -_0223CFD0: .word 0x00000EFC -_0223CFD4: .word 0x00000BE4 - thumb_func_end ov94_0223CF80 - - thumb_func_start ov94_0223CFD8 -ov94_0223CFD8: ; 0x0223CFD8 - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r2, _0223D024 ; =0x00000B94 - add r5, r0, #0 - ldr r0, [r5, r2] - add r2, #0x1c - ldr r2, [r5, r2] - bl sub_0200B1B8 - ldr r0, _0223D028 ; =0x0000103C - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _0223D028 ; =0x0000103C - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _0223D028 ; =0x0000103C - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _0223D02C ; =0x00000BE4 - str r0, [r5, r1] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223D024: .word 0x00000B94 -_0223D028: .word 0x0000103C -_0223D02C: .word 0x00000BE4 - thumb_func_end ov94_0223CFD8 - - thumb_func_start ov94_0223D030 -ov94_0223D030: ; 0x0223D030 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r0, r1, #0 - add r4, r3, #0 - add r1, r2, #0 - bl sub_0200B1EC - lsl r1, r4, #0x18 - add r6, r0, #0 - add r0, r5, #0 - lsr r1, r1, #0x18 - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - add r0, r5, #0 - mov r1, #1 - add r2, r6, #0 - str r3, [sp, #8] - bl sub_0201D738 - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - thumb_func_end ov94_0223D030 - - thumb_func_start ov94_0223D068 -ov94_0223D068: ; 0x0223D068 - push {r4, lr} - sub sp, #0x10 - ldr r4, [r0, #4] - mov r0, #2 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - mov r0, #0x68 - mov r1, #5 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - mov r0, #0x2a - lsl r0, r0, #0xa - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - mov r0, #0x68 - mov r1, #0xf - add r2, r4, #0 - mov r3, #5 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - mov r0, #0x68 - mov r1, #0x1f - add r2, r4, #0 - mov r3, #5 - bl sub_02006E60 - add sp, #0x10 - pop {r4, pc} - thumb_func_end ov94_0223D068 - - thumb_func_start ov94_0223D0C4 -ov94_0223D0C4: ; 0x0223D0C4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_0223D53C - ldr r0, [r4, #4] - bl ov94_0223D1D4 - add r0, r4, #0 - bl ov94_0223D2E8 - add r0, r4, #0 - bl ov94_0223D438 - add r0, r4, #0 - bl ov94_0223D3DC - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_02076B10 - str r0, [sp] - mov r0, #0x87 - lsl r0, r0, #2 - ldr r2, _0223D188 ; =0x00000B94 - add r0, r4, r0 - str r0, [sp, #4] - add r1, r2, #4 - ldr r0, [r4, r2] - sub r2, r2, #4 - ldr r3, _0223D18C ; =0x00000F6C - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r3, r4, r3 - bl ov94_0223D910 - ldr r1, _0223D190 ; =0x0000100C - mov r2, #0x8f - add r0, r4, r1 - str r0, [sp] - ldr r0, _0223D188 ; =0x00000B94 - mov r3, #0x13 - sub r1, #0x50 - lsl r2, r2, #2 - lsl r3, r3, #4 - ldr r0, [r4, r0] - add r1, r4, r1 - add r2, r4, r2 - add r3, r4, r3 - bl ov94_0223DA78 - ldr r1, _0223D194 ; =0x00000223 - mov r2, #0 - ldrsb r0, [r4, r1] - add r1, r1, #1 - ldrsb r1, [r4, r1] - bl ov94_02242970 - mov r1, #0x22 - lsl r1, r1, #4 - ldrsh r2, [r4, r1] - ldr r3, _0223D198 ; =0x00000FDC - add r1, r1, #2 - str r2, [sp] - ldrsb r1, [r4, r1] - ldr r2, _0223D188 ; =0x00000B94 - add r3, r4, r3 - str r1, [sp, #4] - str r0, [sp, #8] - add r1, r2, #4 - ldr r0, [r4, r2] - sub r2, r2, #4 - ldr r1, [r4, r1] - ldr r2, [r4, r2] - bl ov94_02242368 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_0223DB2C - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0223D188: .word 0x00000B94 -_0223D18C: .word 0x00000F6C -_0223D190: .word 0x0000100C -_0223D194: .word 0x00000223 -_0223D198: .word 0x00000FDC - thumb_func_end ov94_0223D0C4 - - thumb_func_start ov94_0223D19C -ov94_0223D19C: ; 0x0223D19C - push {r3, lr} - ldr r1, [r0, #0x2c] - lsl r2, r1, #2 - ldr r1, _0223D1AC ; =0x02246808 - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - nop -_0223D1AC: .word 0x02246808 - thumb_func_end ov94_0223D19C - - thumb_func_start ov94_0223D1B0 -ov94_0223D1B0: ; 0x0223D1B0 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223D428 - add r0, r4, #0 - bl ov94_0223D57C - add r0, r4, #0 - bl ov94_0223D504 - ldr r0, [r4, #4] - bl ov94_0223D2BC - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov94_0223D1B0 - - thumb_func_start ov94_0223D1D4 -ov94_0223D1D4: ; 0x0223D1D4 - push {r4, r5, lr} - sub sp, #0x8c - ldr r5, _0223D2A8 ; =0x02245B78 - add r4, r0, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x70 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _0223D2AC ; =0x02245B5C - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _0223D2B0 ; =0x02245B40 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _0223D2B4 ; =0x02245B24 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _0223D2B8 ; =0x02245B08 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - add sp, #0x8c - pop {r4, r5, pc} - nop -_0223D2A8: .word 0x02245B78 -_0223D2AC: .word 0x02245B5C -_0223D2B0: .word 0x02245B40 -_0223D2B4: .word 0x02245B24 -_0223D2B8: .word 0x02245B08 - thumb_func_end ov94_0223D1D4 - - thumb_func_start ov94_0223D2BC -ov94_0223D2BC: ; 0x0223D2BC - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_0223D2BC - - thumb_func_start ov94_0223D2E8 -ov94_0223D2E8: ; 0x0223D2E8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - ldr r5, [r6, #4] - mov r0, #0x68 - mov r1, #0x3e - bl sub_02006C24 - mov r1, #0x60 - str r1, [sp] - mov r1, #0x3e - mov r2, #0 - str r1, [sp, #4] - mov r1, #7 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #5 - mov r2, #4 - mov r3, #0 - bl sub_02007130 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [r6, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x11 - add r2, r5, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x19 - add r2, r5, #0 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - mov r0, #0x2a - lsl r0, r0, #0xa - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0xf - add r2, r5, #0 - mov r3, #5 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x1f - add r2, r5, #0 - mov r3, #5 - bl sub_0200710C - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov94_0223D2E8 - - thumb_func_start ov94_0223D3DC -ov94_0223D3DC: ; 0x0223D3DC - push {r4, lr} - sub sp, #0x30 - ldr r2, _0223D424 ; =0x00000D54 - add r4, r0, #0 - add r0, sp, #0 - add r1, r4, #0 - add r2, r4, r2 - mov r3, #1 - bl ov94_0223C300 - mov r0, #0xd - lsl r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0x3a - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0xed - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0xed - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x25 - bl sub_02021D6C - bl sub_02039734 - add sp, #0x30 - pop {r4, pc} - ; .align 2, 0 -_0223D424: .word 0x00000D54 - thumb_func_end ov94_0223D3DC - - thumb_func_start ov94_0223D428 -ov94_0223D428: ; 0x0223D428 - mov r1, #0xed - lsl r1, r1, #4 - ldr r3, _0223D434 ; =sub_02021BD4 - ldr r0, [r0, r1] - bx r3 - nop -_0223D434: .word sub_02021BD4 - thumb_func_end ov94_0223D428 - - thumb_func_start ov94_0223D438 -ov94_0223D438: ; 0x0223D438 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #0x14] - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, _0223D4F4 ; =0x00000EFC - ldr r1, [sp, #0x14] - ldr r0, [r0, #4] - add r1, r1, r2 - mov r2, #0 - bl sub_0201A7E8 - ldr r1, _0223D4F4 ; =0x00000EFC - ldr r0, [sp, #0x14] - add r0, r0, r1 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0xf - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x5e - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, _0223D4F8 ; =0x00000F3C - ldr r1, [sp, #0x14] - ldr r0, [r0, #4] - add r1, r1, r2 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - ldr r1, _0223D4FC ; =0x00000F6C - ldr r0, [sp, #0x14] - ldr r4, _0223D500 ; =0x02245B94 - mov r6, #0x86 - mov r7, #0 - add r5, r0, r1 -_0223D4A0: - ldr r0, [r4, #4] - add r1, r5, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r4, #8] - mov r2, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r4, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r4, #0] - ldr r0, [r0, #4] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r1, [r4, #8] - ldr r0, [r4, #0xc] - add r7, r7, #1 - mul r0, r1 - add r6, r6, r0 - add r4, #0x10 - add r5, #0x10 - cmp r7, #0xc - blt _0223D4A0 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D4F4: .word 0x00000EFC -_0223D4F8: .word 0x00000F3C -_0223D4FC: .word 0x00000F6C -_0223D500: .word 0x02245B94 - thumb_func_end ov94_0223D438 - - thumb_func_start ov94_0223D504 -ov94_0223D504: ; 0x0223D504 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223D530 ; =0x00000EFC - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223D534 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223D538 ; =0x00000F6C - mov r4, #0 - add r5, r5, r0 -_0223D51E: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xc - blt _0223D51E - pop {r3, r4, r5, pc} - nop -_0223D530: .word 0x00000EFC -_0223D534: .word 0x00000F3C -_0223D538: .word 0x00000F6C - thumb_func_end ov94_0223D504 - - thumb_func_start ov94_0223D53C -ov94_0223D53C: ; 0x0223D53C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r5, r1] - sub r1, #0x1c - ldr r0, [r5, r1] - mov r1, #0x27 - bl sub_0200B1EC - ldr r1, _0223D578 ; =0x00000BB4 - mov r4, #0 - str r0, [r5, r1] - mov r7, #0x14 - add r6, r1, #4 -_0223D562: - add r0, r7, #0 - mov r1, #0x3e - bl sub_02023790 - str r0, [r5, r6] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xa - blt _0223D562 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223D578: .word 0x00000BB4 - thumb_func_end ov94_0223D53C - - thumb_func_start ov94_0223D57C -ov94_0223D57C: ; 0x0223D57C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - ldr r6, _0223D5A8 ; =0x00000BB8 - mov r4, #0 - add r5, r7, #0 -_0223D586: - ldr r0, [r5, r6] - bl sub_020237BC - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #0xa - blt _0223D586 - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r7, r0] - bl sub_020237BC - ldr r0, _0223D5AC ; =0x00000BB4 - ldr r0, [r7, r0] - bl sub_020237BC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223D5A8: .word 0x00000BB8 -_0223D5AC: .word 0x00000BB4 - thumb_func_end ov94_0223D57C - - thumb_func_start ov94_0223D5B0 -ov94_0223D5B0: ; 0x0223D5B0 - mov r1, #1 - str r1, [r0, #0x2c] - mov r0, #3 - bx lr - thumb_func_end ov94_0223D5B0 - - thumb_func_start ov94_0223D5B8 -ov94_0223D5B8: ; 0x0223D5B8 - push {r4, lr} - sub sp, #8 - ldr r1, _0223D60C ; =0x021BF67C - mov r2, #1 - ldr r3, [r1, #0x48] - add r4, r0, #0 - add r1, r3, #0 - tst r1, r2 - beq _0223D5F0 - ldr r1, _0223D610 ; =0x00000F0F - mov r3, #0 - str r1, [sp] - mov r1, #0x13 - lsl r1, r1, #4 - add r1, r4, r1 - str r1, [sp, #4] - mov r1, #5 - bl ov94_0223D88C - add r0, r4, #0 - mov r1, #3 - mov r2, #7 - bl ov94_0223C3F4 - ldr r0, _0223D614 ; =0x000005DC - bl sub_02005748 - b _0223D606 -_0223D5F0: - mov r1, #2 - tst r3, r1 - beq _0223D606 - str r1, [r4, #0x2c] - add r1, r2, #0 - mov r2, #0 - bl ov94_0223C4C0 - ldr r0, _0223D614 ; =0x000005DC - bl sub_02005748 -_0223D606: - mov r0, #3 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_0223D60C: .word 0x021BF67C -_0223D610: .word 0x00000F0F -_0223D614: .word 0x000005DC - thumb_func_end ov94_0223D5B8 - - thumb_func_start ov94_0223D618 -ov94_0223D618: ; 0x0223D618 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #6 - mov r1, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov94_0223D618 - - thumb_func_start ov94_0223D640 -ov94_0223D640: ; 0x0223D640 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _0223D65C ; =0x0000015A - mov r1, #0xf - bl ov94_0223C3C0 - ldr r1, _0223D660 ; =0x00001070 - str r0, [r4, r1] - mov r0, #6 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_0223D65C: .word 0x0000015A -_0223D660: .word 0x00001070 - thumb_func_end ov94_0223D640 - - thumb_func_start ov94_0223D664 -ov94_0223D664: ; 0x0223D664 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223D6AC ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0223D6A8 - sub r1, r1, #1 - cmp r0, r1 - bne _0223D68E - ldr r0, _0223D6B0 ; =0x00000EFC - mov r1, #0 - add r0, r4, r0 - str r1, [r4, #0x2c] - bl sub_0200E084 - b _0223D6A2 -_0223D68E: - mov r0, #2 - str r0, [r4, #0x2c] - ldr r0, _0223D6B4 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #7 - mov r2, #8 - bl ov94_0223C4C0 -_0223D6A2: - add r0, r4, #0 - bl ov94_0223DBBC -_0223D6A8: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223D6AC: .word 0x00001070 -_0223D6B0: .word 0x00000EFC -_0223D6B4: .word 0x000010B0 - thumb_func_end ov94_0223D664 - - thumb_func_start ov94_0223D6B8 -ov94_0223D6B8: ; 0x0223D6B8 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0 - add r2, sp, #8 - strb r0, [r2, #8] - mov r0, #1 - strb r0, [r2, #9] - mov r0, #2 - strb r0, [r2, #0xa] - ldrb r3, [r2, #0xb] - mov r1, #0xf - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0x30 - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0xc0 - bic r3, r1 - mov r1, #0x3e - strb r3, [r2, #0xb] - bl sub_02013A04 - ldr r1, _0223D744 ; =0x0000106C - mov r2, #0x36 - str r0, [r4, r1] - ldr r0, [r4, r1] - ldr r1, _0223D748 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl sub_02013A4C - ldr r0, _0223D744 ; =0x0000106C - ldr r1, _0223D748 ; =0x00000B94 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - mov r2, #0x37 - mov r3, #2 - bl sub_02013A4C - ldr r0, _0223D744 ; =0x0000106C - mov r1, #0 - ldr r0, [r4, r0] - mov r2, #0x1f - str r0, [sp, #8] - ldr r0, _0223D74C ; =0x00000F3C - mov r3, #0xb - add r0, r4, r0 - str r0, [sp, #0xc] - bl sub_0200DC48 - mov r0, #0x3e - str r0, [sp] - mov r0, #2 - mov r2, #0 - str r0, [sp, #4] - add r0, sp, #8 - mov r1, #9 - add r3, r2, #0 - bl sub_02001B7C - ldr r1, _0223D750 ; =0x00001074 - str r0, [r4, r1] - mov r0, #8 - str r0, [r4, #0x2c] - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_0223D744: .word 0x0000106C -_0223D748: .word 0x00000B94 -_0223D74C: .word 0x00000F3C -_0223D750: .word 0x00001074 - thumb_func_end ov94_0223D6B8 - - thumb_func_start ov94_0223D754 -ov94_0223D754: ; 0x0223D754 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _0223D828 ; =0x00001074 - ldr r0, [r5, r0] - bl sub_02001BE0 - cmp r0, #1 - beq _0223D774 - cmp r0, #2 - beq _0223D7F2 - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0223D7F2 - b _0223D822 -_0223D774: - ldr r0, _0223D828 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _0223D82C ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223D830 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - mov r0, #0x13 - lsl r0, r0, #4 - add r4, r5, r0 - add r0, r4, #0 - bl ov94_02241498 - cmp r0, #0 - beq _0223D7CE - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - cmp r0, #6 - bne _0223D7CE - ldr r0, _0223D834 ; =0x00000F0F - mov r1, #0x24 - str r0, [sp] - add r0, r5, #0 - mov r2, #1 - mov r3, #0 - str r4, [sp, #4] - bl ov94_0223D88C - add r0, r5, #0 - mov r1, #3 - mov r2, #1 - bl ov94_0223C3F4 - add sp, #8 - mov r0, #3 - pop {r3, r4, r5, pc} -_0223D7CE: - ldr r0, _0223D834 ; =0x00000F0F - mov r1, #6 - str r0, [sp] - add r0, r5, #0 - mov r2, #1 - mov r3, #0 - str r4, [sp, #4] - bl ov94_0223D88C - add r0, r5, #0 - mov r1, #3 - mov r2, #5 - bl ov94_0223C3F4 - add r0, r5, #0 - bl ov94_0223DBBC - b _0223D822 -_0223D7F2: - ldr r0, _0223D828 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _0223D82C ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223D830 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - mov r0, #2 - str r0, [r5, #0x2c] - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - add r0, r5, #0 - bl ov94_0223DBBC -_0223D822: - mov r0, #3 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223D828: .word 0x00001074 -_0223D82C: .word 0x0000106C -_0223D830: .word 0x00000F3C -_0223D834: .word 0x00000F0F - thumb_func_end ov94_0223D754 - - thumb_func_start ov94_0223D838 -ov94_0223D838: ; 0x0223D838 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223D854 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223D850 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223D850: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223D854: .word 0x00000BE4 - thumb_func_end ov94_0223D838 - - thumb_func_start ov94_0223D858 -ov94_0223D858: ; 0x0223D858 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223D888 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223D884 - mov r0, #0x42 - lsl r0, r0, #6 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0x2d - ble _0223D884 - mov r1, #0 - str r1, [r4, r0] - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223D884: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223D888: .word 0x00000BE4 - thumb_func_end ov94_0223D858 - - thumb_func_start ov94_0223D88C -ov94_0223D88C: ; 0x0223D88C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, [sp, #0x24] - add r6, r1, #0 - add r4, r2, #0 - bl sub_02076B10 - add r2, r0, #0 - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200B538 - ldr r0, _0223D904 ; =0x00000B94 - add r1, r6, #0 - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0xb9 - add r6, r0, #0 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, #0x20 - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - ldr r0, _0223D908 ; =0x00000EFC - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _0223D908 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _0223D908 ; =0x00000EFC - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _0223D90C ; =0x00000BE4 - str r0, [r5, r1] - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0223D904: .word 0x00000B94 -_0223D908: .word 0x00000EFC -_0223D90C: .word 0x00000BE4 - thumb_func_end ov94_0223D88C - - thumb_func_start ov94_0223D910 -ov94_0223D910: ; 0x0223D910 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r5, r0, #0 - str r1, [sp, #8] - mov r0, #0x16 - mov r1, #0x3e - add r7, r2, #0 - add r6, r3, #0 - ldr r4, [sp, #0x4c] - bl sub_02023790 - str r0, [sp, #0x1c] - mov r0, #0x12 - mov r1, #0x3e - bl sub_02023790 - str r0, [sp, #0x18] - ldr r0, [sp, #0x48] - ldr r2, [sp, #0x1c] - mov r1, #0x77 - bl sub_02074570 - mov r2, #0 - ldrsh r0, [r4, r2] - mov r1, #6 - str r0, [sp, #0x10] - mov r0, #2 - ldrsb r0, [r4, r0] - str r0, [sp, #0x14] - mov r0, #3 - ldrsb r4, [r4, r0] - ldr r0, [sp, #0x48] - bl sub_02074570 - str r0, [sp, #0x30] - add r0, r5, #0 - mov r1, #0x46 - bl sub_0200B1EC - str r0, [sp, #0x20] - ldr r0, [sp, #0x14] - ldr r2, _0223DA6C ; =0x02245FD8 - lsl r0, r0, #2 - str r0, [sp, #0xc] - ldr r1, [sp, #0xc] - add r0, r5, #0 - ldr r1, [r2, r1] - bl sub_0200B1EC - str r0, [sp, #0x28] - mov r0, #0 - str r0, [sp] - mov r0, #1 - mov r1, #3 - str r0, [sp, #4] - add r0, r7, #0 - add r2, r4, #0 - add r3, r1, #0 - bl sub_0200B60C - add r0, r7, #0 - add r1, r5, #0 - mov r2, #0x66 - mov r3, #0x3e - bl sub_0200B29C - str r0, [sp, #0x24] - ldr r0, [sp, #8] - ldr r1, [sp, #0x10] - bl sub_0200B1EC - ldr r1, [sp, #0x30] - str r0, [sp, #0x2c] - lsl r1, r1, #0x10 - ldr r0, [sp, #0x18] - lsr r1, r1, #0x10 - mov r2, #0x3e - bl sub_0207CFA0 - mov r4, #0 - add r5, r6, #0 - add r7, r4, #0 -_0223D9B4: - add r0, r5, #0 - add r1, r7, #0 - bl sub_0201ADA4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #5 - blt _0223D9B4 - mov r2, #0 - ldr r0, _0223DA70 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x1c] - add r0, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - ldr r0, [sp, #0x14] - cmp r0, #3 - beq _0223D9F2 - mov r3, #0 - ldr r1, _0223DA74 ; =0x022467FC - ldr r0, [sp, #0xc] - str r3, [sp] - ldr r0, [r1, r0] - ldr r1, [sp, #0x28] - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #0x46 - bl ov94_02245900 -_0223D9F2: - mov r2, #0 - ldr r0, _0223DA70 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r6, #0 - ldr r1, [sp, #0x2c] - add r0, #0x10 - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0223DA70 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r6, #0 - ldr r1, [sp, #0x24] - add r0, #0x20 - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0223DA70 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r6, #0 - ldr r1, [sp, #0x20] - add r0, #0x30 - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0223DA70 ; =0x000F0200 - str r2, [sp] - add r6, #0x40 - str r0, [sp, #4] - ldr r1, [sp, #0x18] - add r0, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - ldr r0, [sp, #0x20] - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x24] - bl sub_020237BC - ldr r0, [sp, #0x28] - bl sub_020237BC - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x2c] - bl sub_020237BC - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - nop -_0223DA6C: .word 0x02245FD8 -_0223DA70: .word 0x000F0200 -_0223DA74: .word 0x022467FC - thumb_func_end ov94_0223D910 - - thumb_func_start ov94_0223DA78 -ov94_0223DA78: ; 0x0223DA78 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r7, r0, #0 - add r5, r1, #0 - mov r0, #0x10 - mov r1, #0x3e - str r2, [sp, #8] - str r3, [sp, #0xc] - bl sub_02023790 - add r4, r0, #0 - mov r0, #0x10 - mov r1, #0x3e - bl sub_02023790 - add r6, r0, #0 - add r0, r7, #0 - mov r1, #0x30 - bl sub_0200B1EC - str r0, [sp, #0x10] - ldr r1, [sp, #8] - add r0, r4, #0 - bl sub_02023D28 - add r0, r7, #0 - mov r1, #0xac - bl sub_0200B1EC - add r7, r0, #0 - ldr r0, [sp, #0xc] - mov r1, #0x91 - add r2, r6, #0 - bl sub_02074470 - mov r2, #0 - ldr r0, _0223DB28 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x10] - add r0, r5, #0 - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0223DB28 ; =0x000F0200 - str r2, [sp] - add r5, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0223DB28 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x28] - add r1, r7, #0 - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0223DB28 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x28] - add r1, r6, #0 - add r0, #0x10 - add r3, r2, #0 - bl ov94_02245900 - ldr r0, [sp, #0x10] - bl sub_020237BC - add r0, r4, #0 - bl sub_020237BC - add r0, r7, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - nop -_0223DB28: .word 0x000F0200 - thumb_func_end ov94_0223DA78 - - thumb_func_start ov94_0223DB2C -ov94_0223DB2C: ; 0x0223DB2C - push {r4, r5, r6, lr} - sub sp, #0x30 - mov r1, #0x32 - add r5, r0, #0 - mov r0, #0x3e - lsl r1, r1, #6 - bl sub_02018144 - add r4, r0, #0 - add r0, sp, #0x20 - add r1, r5, #0 - mov r2, #2 - bl sub_02075EF4 - mov r1, #0 - add r0, r5, #0 - add r2, r1, #0 - bl sub_02074470 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - mov r3, #0 - str r3, [sp] - mov r1, #0xa - str r1, [sp, #4] - str r1, [sp, #8] - str r4, [sp, #0xc] - str r6, [sp, #0x10] - str r3, [sp, #0x14] - mov r1, #2 - str r1, [sp, #0x18] - str r0, [sp, #0x1c] - add r1, sp, #0x20 - ldrh r0, [r1] - ldrh r1, [r1, #2] - mov r2, #0x3e - bl sub_020136A4 - mov r1, #0x32 - add r0, r4, #0 - lsl r1, r1, #6 - bl sub_020C2C54 - mov r1, #0x4a - mov r2, #0x32 - add r0, r4, #0 - lsl r1, r1, #8 - lsl r2, r2, #6 - bl sub_020C02BC - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3e - mov r3, #0x1a - str r0, [sp, #4] - add r1, sp, #0x20 - ldrh r0, [r1] - ldrh r1, [r1, #4] - mov r2, #1 - lsl r3, r3, #4 - bl sub_02006E84 - add r0, r4, #0 - bl sub_020181C4 - add sp, #0x30 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov94_0223DB2C - - thumb_func_start ov94_0223DBBC -ov94_0223DBBC: ; 0x0223DBBC - push {r3, r4, lr} - sub sp, #0xc - ldr r1, _0223DBF8 ; =0x00000223 - add r4, r0, #0 - ldrsb r0, [r4, r1] - add r1, r1, #1 - ldrsb r1, [r4, r1] - mov r2, #0 - bl ov94_02242970 - mov r1, #0x22 - lsl r1, r1, #4 - ldrsh r2, [r4, r1] - add r1, r1, #2 - ldr r3, _0223DBFC ; =0x00000FDC - str r2, [sp] - ldrsb r1, [r4, r1] - ldr r2, _0223DC00 ; =0x00000B94 - add r3, r4, r3 - str r1, [sp, #4] - str r0, [sp, #8] - add r1, r2, #4 - ldr r0, [r4, r2] - sub r2, r2, #4 - ldr r1, [r4, r1] - ldr r2, [r4, r2] - bl ov94_02242368 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0223DBF8: .word 0x00000223 -_0223DBFC: .word 0x00000FDC -_0223DC00: .word 0x00000B94 - thumb_func_end ov94_0223DBBC - - thumb_func_start ov94_0223DC04 -ov94_0223DC04: ; 0x0223DC04 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_0223DFDC - ldr r0, [r4, #4] - bl ov94_0223DD1C - add r0, r4, #0 - bl ov94_0223DE04 - add r0, r4, #0 - bl ov94_0223DED8 - add r0, r4, #0 - bl ov94_0223DE7C - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, r0, #4 - add r5, r1, #0 - mul r5, r0 - mov r0, #0x95 - lsl r0, r0, #2 - add r0, r4, r0 - add r0, r0, r5 - bl sub_02076B10 - str r0, [sp] - mov r0, #0xd - lsl r0, r0, #6 - add r0, r4, r0 - ldr r2, _0223DCD4 ; =0x00000B94 - add r0, r0, r5 - str r0, [sp, #4] - add r1, r2, #4 - ldr r0, [r4, r2] - sub r2, r2, #4 - ldr r3, _0223DCD8 ; =0x00000F6C - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r3, r4, r3 - bl ov94_0223D910 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - mov r2, #0x36 - add r3, r1, #0 - add r0, r0, #4 - mov r5, #0x95 - lsl r2, r2, #4 - lsl r5, r5, #2 - ldr r1, _0223DCDC ; =0x0000100C - mul r3, r0 - add r0, r4, r1 - str r0, [sp] - ldr r0, _0223DCD4 ; =0x00000B94 - sub r1, #0x50 - add r2, r4, r2 - ldr r0, [r4, r0] - add r5, r4, r5 - add r2, r2, r3 - add r1, r4, r1 - add r3, r5, r3 - bl ov94_0223DA78 - mov r0, #0x95 - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, r0, #4 - mul r0, r1 - add r0, r2, r0 - bl ov94_0223DB2C - ldr r0, _0223DCD4 ; =0x00000B94 - ldr r1, _0223DCE0 ; =0x00000FDC - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_0223E358 - add r0, r4, #0 - bl ov94_0223E240 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #2 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223DCD4: .word 0x00000B94 -_0223DCD8: .word 0x00000F6C -_0223DCDC: .word 0x0000100C -_0223DCE0: .word 0x00000FDC - thumb_func_end ov94_0223DC04 - - thumb_func_start ov94_0223DCE4 -ov94_0223DCE4: ; 0x0223DCE4 - push {r3, lr} - ldr r1, [r0, #0x2c] - lsl r2, r1, #2 - ldr r1, _0223DCF4 ; =0x0224682C - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - nop -_0223DCF4: .word 0x0224682C - thumb_func_end ov94_0223DCE4 - - thumb_func_start ov94_0223DCF8 -ov94_0223DCF8: ; 0x0223DCF8 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223DEC8 - add r0, r4, #0 - bl ov94_0223E074 - add r0, r4, #0 - bl ov94_0223DFA4 - ldr r0, [r4, #4] - bl ov94_0223DDE0 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov94_0223DCF8 - - thumb_func_start ov94_0223DD1C -ov94_0223DD1C: ; 0x0223DD1C - push {r3, r4, r5, lr} - sub sp, #0x70 - ldr r5, _0223DDD0 ; =0x02245CA8 - add r4, r0, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x54 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _0223DDD4 ; =0x02245C8C - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _0223DDD8 ; =0x02245C70 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _0223DDDC ; =0x02245C54 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - add sp, #0x70 - pop {r3, r4, r5, pc} - nop -_0223DDD0: .word 0x02245CA8 -_0223DDD4: .word 0x02245C8C -_0223DDD8: .word 0x02245C70 -_0223DDDC: .word 0x02245C54 - thumb_func_end ov94_0223DD1C - - thumb_func_start ov94_0223DDE0 -ov94_0223DDE0: ; 0x0223DDE0 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_0223DDE0 - - thumb_func_start ov94_0223DE04 -ov94_0223DE04: ; 0x0223DE04 - push {r3, r4, r5, lr} - sub sp, #0x10 - mov r1, #0x1a - add r5, r0, #0 - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - ldr r4, [r5, #4] - bl sub_02002E98 - ldr r0, [r5, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - mov r0, #0x68 - mov r1, #0x11 - add r2, r4, #0 - bl sub_02006E3C - mov r0, #0x60 - str r0, [sp] - mov r0, #0x3e - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x68 - mov r1, #7 - add r3, r2, #0 - bl sub_02006E84 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov94_0223DE04 - - thumb_func_start ov94_0223DE7C -ov94_0223DE7C: ; 0x0223DE7C - push {r4, lr} - sub sp, #0x30 - ldr r2, _0223DEC4 ; =0x00000D54 - add r4, r0, #0 - add r0, sp, #0 - add r1, r4, #0 - add r2, r4, r2 - mov r3, #1 - bl ov94_0223C300 - mov r0, #0xd - lsl r0, r0, #0x10 - str r0, [sp, #8] - mov r0, #0x3a - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0xed - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0xed - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0x25 - bl sub_02021D6C - bl sub_02039734 - add sp, #0x30 - pop {r4, pc} - ; .align 2, 0 -_0223DEC4: .word 0x00000D54 - thumb_func_end ov94_0223DE7C - - thumb_func_start ov94_0223DEC8 -ov94_0223DEC8: ; 0x0223DEC8 - mov r1, #0xed - lsl r1, r1, #4 - ldr r3, _0223DED4 ; =sub_02021BD4 - ldr r0, [r0, r1] - bx r3 - nop -_0223DED4: .word sub_02021BD4 - thumb_func_end ov94_0223DEC8 - - thumb_func_start ov94_0223DED8 -ov94_0223DED8: ; 0x0223DED8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r0, [sp, #0x14] - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, _0223DF94 ; =0x00000EFC - ldr r1, [sp, #0x14] - ldr r0, [r0, #4] - add r1, r1, r2 - mov r2, #0 - bl sub_0201A7E8 - ldr r1, _0223DF94 ; =0x00000EFC - ldr r0, [sp, #0x14] - add r0, r0, r1 - mov r1, #0 - bl sub_0201ADA4 - mov r0, #0xf - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x5e - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, _0223DF98 ; =0x00000F3C - ldr r1, [sp, #0x14] - ldr r0, [r0, #4] - add r1, r1, r2 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - ldr r1, _0223DF9C ; =0x00000F6C - ldr r0, [sp, #0x14] - ldr r4, _0223DFA0 ; =0x02245CC4 - mov r6, #0x86 - mov r7, #0 - add r5, r0, r1 -_0223DF40: - ldr r0, [r4, #4] - add r1, r5, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - ldr r0, [r4, #8] - mov r2, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #4] - ldr r0, [r4, #0xc] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r3, [r4, #0] - ldr r0, [r0, #4] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - ldr r1, [r4, #8] - ldr r0, [r4, #0xc] - add r7, r7, #1 - mul r0, r1 - add r6, r6, r0 - add r4, #0x10 - add r5, #0x10 - cmp r7, #0xc - blo _0223DF40 - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223DF94: .word 0x00000EFC -_0223DF98: .word 0x00000F3C -_0223DF9C: .word 0x00000F6C -_0223DFA0: .word 0x02245CC4 - thumb_func_end ov94_0223DED8 - - thumb_func_start ov94_0223DFA4 -ov94_0223DFA4: ; 0x0223DFA4 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, _0223DFD0 ; =0x00000EFC - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223DFD4 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223DFD8 ; =0x00000F6C - mov r4, #0 - add r5, r5, r0 -_0223DFBE: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #0xc - blo _0223DFBE - pop {r3, r4, r5, pc} - nop -_0223DFD0: .word 0x00000EFC -_0223DFD4: .word 0x00000F3C -_0223DFD8: .word 0x00000F6C - thumb_func_end ov94_0223DFA4 - - thumb_func_start ov94_0223DFDC -ov94_0223DFDC: ; 0x0223DFDC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x95 - lsl r0, r0, #2 - add r2, r5, r0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r5, r0] - add r0, r0, #4 - mul r0, r1 - add r4, r2, r0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r5, r1] - sub r1, #0x20 - ldr r0, [r5, r1] - bl sub_0200C41C - ldr r0, _0223E064 ; =0x0000011E - ldrb r2, [r4, r0] - cmp r2, #0 - beq _0223E01C - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #8 - bl sub_0200BDD0 -_0223E01C: - ldr r2, _0223E068 ; =0x0000011F - ldrb r3, [r4, r2] - cmp r3, #0 - beq _0223E034 - mov r0, #0xb9 - sub r2, r2, #1 - lsl r0, r0, #4 - ldrb r2, [r4, r2] - ldr r0, [r5, r0] - mov r1, #9 - bl sub_0200BE08 -_0223E034: - mov r1, #0xb9 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, r1, #4 - ldr r1, [r5, r1] - mov r2, #0x4f - mov r3, #0x3e - bl sub_0200B29C - ldr r1, _0223E06C ; =0x00000BB8 - mov r2, #0x50 - str r0, [r5, r1] - add r0, r1, #0 - sub r0, #0x28 - sub r1, #0x24 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - mov r3, #0x3e - bl sub_0200B29C - ldr r1, _0223E070 ; =0x00000BBC - str r0, [r5, r1] - pop {r3, r4, r5, pc} - nop -_0223E064: .word 0x0000011E -_0223E068: .word 0x0000011F -_0223E06C: .word 0x00000BB8 -_0223E070: .word 0x00000BBC - thumb_func_end ov94_0223DFDC - - thumb_func_start ov94_0223E074 -ov94_0223E074: ; 0x0223E074 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223E094 ; =0x00000BB8 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _0223E098 ; =0x00000BBC - ldr r0, [r4, r0] - bl sub_020237BC - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 -_0223E094: .word 0x00000BB8 -_0223E098: .word 0x00000BBC - thumb_func_end ov94_0223E074 - - thumb_func_start ov94_0223E09C -ov94_0223E09C: ; 0x0223E09C - mov r1, #1 - str r1, [r0, #0x2c] - mov r0, #3 - bx lr - thumb_func_end ov94_0223E09C - - thumb_func_start ov94_0223E0A4 -ov94_0223E0A4: ; 0x0223E0A4 - push {r3, r4, r5, lr} - ldr r1, _0223E174 ; =0x021BF67C - mov r2, #1 - ldr r1, [r1, #0x48] - add r4, r0, #0 - add r3, r1, #0 - tst r3, r2 - beq _0223E0D2 - ldr r1, _0223E178 ; =0x00000F0F - mov r3, #0 - str r1, [sp] - mov r1, #0x10 - bl ov94_0223E300 - add r0, r4, #0 - mov r1, #3 - mov r2, #4 - bl ov94_0223C3F4 - ldr r0, _0223E17C ; =0x000005DC - bl sub_02005748 - b _0223E170 -_0223E0D2: - mov r3, #2 - add r5, r1, #0 - tst r5, r3 - beq _0223E0EC - mov r1, #4 - mov r2, #0 - str r3, [r4, #0x2c] - bl ov94_0223C4C0 - ldr r0, _0223E17C ; =0x000005DC - bl sub_02005748 - b _0223E170 -_0223E0EC: - mov r0, #0x10 - tst r0, r1 - beq _0223E108 - ldr r0, _0223E180 ; =0x00000112 - ldrh r1, [r4, r0] - cmp r1, #0 - bne _0223E170 - strh r2, [r4, r0] - mov r0, #6 - str r0, [r4, #0x2c] - ldr r0, _0223E17C ; =0x000005DC - bl sub_02005748 - b _0223E170 -_0223E108: - mov r2, #0x20 - add r0, r1, #0 - tst r0, r2 - beq _0223E12C - add r0, r2, #0 - add r0, #0xf2 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _0223E170 - mov r0, #0 - add r2, #0xf2 - strh r0, [r4, r2] - mov r0, #6 - str r0, [r4, #0x2c] - ldr r0, _0223E17C ; =0x000005DC - bl sub_02005748 - b _0223E170 -_0223E12C: - add r2, #0xfc - ldr r0, [r4, r2] - bl ov94_02244214 - add r5, r0, #0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r0, [r4, r0] - cmp r5, r0 - beq _0223E170 - cmp r5, #0 - blt _0223E170 - add r0, r5, #1 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _0223E184 ; =0x00000ED4 - ldr r0, [r1, r0] - lsl r1, r5, #2 - add r1, #0x10 - bl sub_02021D6C - mov r0, #2 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #3 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #0x12 - lsl r0, r0, #4 - str r5, [r4, r0] - ldr r0, _0223E17C ; =0x000005DC - bl sub_02005748 -_0223E170: - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223E174: .word 0x021BF67C -_0223E178: .word 0x00000F0F -_0223E17C: .word 0x000005DC -_0223E180: .word 0x00000112 -_0223E184: .word 0x00000ED4 - thumb_func_end ov94_0223E0A4 - - thumb_func_start ov94_0223E188 -ov94_0223E188: ; 0x0223E188 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #6 - mov r1, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov94_0223E188 - - thumb_func_start ov94_0223E1B0 -ov94_0223E1B0: ; 0x0223E1B0 - push {r4, lr} - add r4, r0, #0 - mov r2, #0x1f - ldr r0, [r4, #4] - mov r1, #0xf - lsl r2, r2, #4 - bl ov94_0223C3C0 - ldr r1, _0223E1CC ; =0x00001070 - str r0, [r4, r1] - mov r0, #5 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223E1CC: .word 0x00001070 - thumb_func_end ov94_0223E1B0 - - thumb_func_start ov94_0223E1D0 -ov94_0223E1D0: ; 0x0223E1D0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223E234 ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0223E22E - sub r1, r1, #1 - cmp r0, r1 - bne _0223E20E - mov r0, #2 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #4 - mov r2, #0 - bl ov94_0223C4C0 - ldr r0, _0223E238 ; =0x00000B94 - ldr r1, _0223E23C ; =0x00000FDC - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_0223E358 - add r0, r4, #0 - bl ov94_0223E240 - b _0223E22E -_0223E20E: - mov r0, #2 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #5 - mov r2, #6 - bl ov94_0223C4C0 - ldr r0, _0223E238 ; =0x00000B94 - ldr r1, _0223E23C ; =0x00000FDC - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_0223E358 - add r0, r4, #0 - bl ov94_0223E240 -_0223E22E: - mov r0, #3 - pop {r4, pc} - nop -_0223E234: .word 0x00001070 -_0223E238: .word 0x00000B94 -_0223E23C: .word 0x00000FDC - thumb_func_end ov94_0223E1D0 - - thumb_func_start ov94_0223E240 -ov94_0223E240: ; 0x0223E240 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _0223E2C0 ; =0x00000112 - ldrh r0, [r4, r0] - cmp r0, #0 - bne _0223E290 - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x68 - mov r1, #0x1b - bl sub_02006E60 - ldr r2, _0223E2C4 ; =0x00000B94 - mov r5, #0x12 - ldr r0, _0223E2C8 ; =0x00000FFC - mov r3, #0xd1 - lsl r5, r5, #4 - ldr r1, [r4, r2] - add r2, r2, #4 - lsl r3, r3, #2 - ldr r6, [r4, r5] - add r0, r4, r0 - ldr r2, [r4, r2] - add r3, r4, r3 - add r4, r5, #4 - mul r4, r6 - add r3, r3, r4 - bl ov94_0223E3B0 - add sp, #0x10 - pop {r4, r5, r6, pc} -_0223E290: - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - ldr r2, [r4, #4] - mov r0, #0x68 - mov r1, #0x1c - bl sub_02006E60 - ldr r2, _0223E2CC ; =0x00000BB8 - ldr r0, _0223E2C8 ; =0x00000FFC - ldr r1, [r4, r2] - add r2, r2, #4 - ldr r2, [r4, r2] - add r0, r4, r0 - bl ov94_0223E424 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0223E2C0: .word 0x00000112 -_0223E2C4: .word 0x00000B94 -_0223E2C8: .word 0x00000FFC -_0223E2CC: .word 0x00000BB8 - thumb_func_end ov94_0223E240 - - thumb_func_start ov94_0223E2D0 -ov94_0223E2D0: ; 0x0223E2D0 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223E240 - mov r0, #1 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_0223E2D0 - - thumb_func_start ov94_0223E2E0 -ov94_0223E2E0: ; 0x0223E2E0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223E2FC ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223E2F8 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223E2F8: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223E2FC: .word 0x00000BE4 - thumb_func_end ov94_0223E2E0 - - thumb_func_start ov94_0223E300 -ov94_0223E300: ; 0x0223E300 - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r2, _0223E34C ; =0x00000B94 - add r5, r0, #0 - ldr r0, [r5, r2] - add r2, #0x1c - ldr r2, [r5, r2] - bl sub_0200B1B8 - ldr r0, _0223E350 ; =0x00000EFC - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _0223E350 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _0223E350 ; =0x00000EFC - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _0223E354 ; =0x00000BE4 - str r0, [r5, r1] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223E34C: .word 0x00000B94 -_0223E350: .word 0x00000EFC -_0223E354: .word 0x00000BE4 - thumb_func_end ov94_0223E300 - - thumb_func_start ov94_0223E358 -ov94_0223E358: ; 0x0223E358 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - add r6, r0, #0 - mov r1, #0x4a - bl sub_0200B1EC - add r4, r0, #0 - add r0, r6, #0 - mov r1, #0x4e - bl sub_0200B1EC - add r6, r0, #0 - mov r2, #0 - ldr r0, _0223E3AC ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - mov r3, #2 - bl ov94_02245900 - mov r0, #1 - str r0, [sp] - ldr r0, _0223E3AC ; =0x000F0200 - add r5, #0x10 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - mov r2, #0 - mov r3, #2 - bl ov94_02245900 - add r0, r4, #0 - bl sub_020237BC - add r0, r6, #0 - bl sub_020237BC - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0223E3AC: .word 0x000F0200 - thumb_func_end ov94_0223E358 - - thumb_func_start ov94_0223E3B0 -ov94_0223E3B0: ; 0x0223E3B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r6, r1, #0 - mov r1, #0 - add r5, r0, #0 - add r7, r2, #0 - add r4, r3, #0 - bl sub_0201ADA4 - mov r0, #3 - str r0, [sp] - ldr r0, _0223E420 ; =0x000F0200 - mov r3, #0 - str r0, [sp, #4] - ldrsh r2, [r4, r3] - add r0, r5, #0 - add r1, r7, #0 - bl ov94_02242158 - mov r0, #3 - str r0, [sp] - mov r0, #0x46 - str r0, [sp, #4] - ldr r0, _0223E420 ; =0x000F0200 - mov r2, #2 - str r0, [sp, #8] - ldrsb r2, [r4, r2] - add r0, r5, #0 - add r1, r6, #0 - mov r3, #0 - bl ov94_02242204 - mov r0, #3 - mov r1, #4 - ldrsb r0, [r4, r0] - ldrsb r1, [r4, r1] - mov r2, #0 - bl ov94_02242970 - add r2, r0, #0 - mov r0, #0x13 - str r0, [sp] - ldr r0, _0223E420 ; =0x000F0200 - mov r3, #0 - str r0, [sp, #4] - str r3, [sp, #8] - mov r0, #8 - add r5, #0x10 - str r0, [sp, #0xc] - add r0, r5, #0 - add r1, r6, #0 - bl ov94_0224226C - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223E420: .word 0x000F0200 - thumb_func_end ov94_0223E3B0 - - thumb_func_start ov94_0223E424 -ov94_0223E424: ; 0x0223E424 - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r1, #0 - mov r1, #0 - add r6, r0, #0 - add r4, r2, #0 - bl sub_0201ADA4 - cmp r5, #0 - beq _0223E44A - mov r2, #0 - ldr r0, _0223E468 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r6, #0 - add r1, r5, #0 - mov r3, #3 - bl ov94_02245900 -_0223E44A: - cmp r4, #0 - beq _0223E462 - mov r0, #0 - str r0, [sp] - ldr r0, _0223E468 ; =0x000F0200 - add r1, r4, #0 - str r0, [sp, #4] - add r0, r6, #0 - mov r2, #8 - mov r3, #0x13 - bl ov94_02245900 -_0223E462: - add sp, #8 - pop {r4, r5, r6, pc} - nop -_0223E468: .word 0x000F0200 - thumb_func_end ov94_0223E424 - - thumb_func_start ov94_0223E46C -ov94_0223E46C: ; 0x0223E46C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_0223E9B8 - ldr r0, [r4, #4] - bl ov94_0223E598 - add r0, r4, #0 - bl ov94_0223E6B8 - add r0, r4, #0 - bl ov94_0223E7D4 - add r0, r4, #0 - bl ov94_0223E770 - ldr r1, _0223E538 ; =0x00000F6C - ldr r2, _0223E53C ; =0x00000B94 - add r0, r4, r1 - add r1, #0xe0 - ldr r2, [r4, r2] - add r1, r4, r1 - bl ov94_0223F9FC - mov r3, #0 - ldr r0, _0223E540 ; =0x00010200 - str r3, [sp] - str r0, [sp, #4] - ldr r2, _0223E544 ; =0x00000B98 - ldr r0, _0223E548 ; =0x00000F7C - ldr r1, [r4, r2] - sub r2, #0x1a - ldrsh r2, [r4, r2] - add r0, r4, r0 - bl ov94_02242158 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223E540 ; =0x00010200 - ldr r2, _0223E53C ; =0x00000B94 - str r0, [sp, #8] - ldr r1, [r4, r2] - sub r2, #0x14 - ldr r0, _0223E54C ; =0x00000F9C - ldrsb r2, [r4, r2] - add r0, r4, r0 - mov r3, #1 - bl ov94_02242204 - ldr r1, _0223E550 ; =0x00000B81 - mov r2, #1 - ldrsb r0, [r4, r1] - add r1, r1, #1 - ldrsb r1, [r4, r1] - bl ov94_02242970 - add r2, r0, #0 - mov r3, #0 - ldr r0, _0223E540 ; =0x00010200 - str r3, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r1, _0223E53C ; =0x00000B94 - ldr r0, _0223E554 ; =0x00000FBC - ldr r1, [r4, r1] - add r0, r4, r0 - bl ov94_022422B8 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223E540 ; =0x00010200 - ldr r3, _0223E558 ; =0x0000105C - str r0, [sp, #8] - ldr r2, _0223E55C ; =0x00000BA4 - add r0, r4, r3 - ldr r1, [r4, r2] - sub r2, #0x10 - add r3, #0xf4 - ldr r2, [r4, r2] - ldr r3, [r4, r3] - bl ov94_0224218C - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0223E538: .word 0x00000F6C -_0223E53C: .word 0x00000B94 -_0223E540: .word 0x00010200 -_0223E544: .word 0x00000B98 -_0223E548: .word 0x00000F7C -_0223E54C: .word 0x00000F9C -_0223E550: .word 0x00000B81 -_0223E554: .word 0x00000FBC -_0223E558: .word 0x0000105C -_0223E55C: .word 0x00000BA4 - thumb_func_end ov94_0223E46C - - thumb_func_start ov94_0223E560 -ov94_0223E560: ; 0x0223E560 - push {r3, lr} - ldr r1, [r0, #0x2c] - lsl r2, r1, #2 - ldr r1, _0223E570 ; =0x02246860 - ldr r1, [r1, r2] - blx r1 - pop {r3, pc} - nop -_0223E570: .word 0x02246860 - thumb_func_end ov94_0223E560 - - thumb_func_start ov94_0223E574 -ov94_0223E574: ; 0x0223E574 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223E7C4 - add r0, r4, #0 - bl ov94_0223EA20 - add r0, r4, #0 - bl ov94_0223E968 - ldr r0, [r4, #4] - bl ov94_0223E684 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov94_0223E574 - - thumb_func_start ov94_0223E598 -ov94_0223E598: ; 0x0223E598 - push {r3, r4, r5, lr} - sub sp, #0x70 - ldr r5, _0223E674 ; =0x02245DC8 - add r4, r0, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x54 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _0223E678 ; =0x02245DAC - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - ldr r5, _0223E67C ; =0x02245DE4 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - ldr r5, _0223E680 ; =0x02245E00 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #3 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #3 - bl sub_02019EBC - mov r0, #2 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #3 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - add sp, #0x70 - pop {r3, r4, r5, pc} - nop -_0223E674: .word 0x02245DC8 -_0223E678: .word 0x02245DAC -_0223E67C: .word 0x02245DE4 -_0223E680: .word 0x02245E00 - thumb_func_end ov94_0223E598 - - thumb_func_start ov94_0223E684 -ov94_0223E684: ; 0x0223E684 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - add r0, r4, #0 - mov r1, #3 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_0223E684 - - thumb_func_start ov94_0223E6B8 -ov94_0223E6B8: ; 0x0223E6B8 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - ldr r5, [r6, #4] - mov r0, #0x68 - mov r1, #0x3e - bl sub_02006C24 - mov r1, #0x60 - str r1, [sp] - mov r1, #0x3e - mov r2, #0 - str r1, [sp, #4] - mov r1, #3 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #5 - mov r2, #4 - mov r3, #0 - bl sub_02007130 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [r6, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0xd - add r2, r5, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x1a - add r2, r5, #0 - bl sub_0200710C - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov94_0223E6B8 - - thumb_func_start ov94_0223E770 -ov94_0223E770: ; 0x0223E770 - push {r4, lr} - sub sp, #0x30 - ldr r2, _0223E7C0 ; =0x00000D54 - add r4, r0, #0 - add r0, sp, #0 - add r1, r4, #0 - add r2, r4, r2 - mov r3, #1 - bl ov94_0223C300 - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #8] - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0x37 - lsl r1, r1, #6 - str r0, [r4, r1] - ldr r0, [r4, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02021D6C - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021E80 - bl sub_02039734 - add sp, #0x30 - pop {r4, pc} - ; .align 2, 0 -_0223E7C0: .word 0x00000D54 - thumb_func_end ov94_0223E770 - - thumb_func_start ov94_0223E7C4 -ov94_0223E7C4: ; 0x0223E7C4 - mov r1, #0x37 - lsl r1, r1, #6 - ldr r3, _0223E7D0 ; =sub_02021BD4 - ldr r0, [r0, r1] - bx r3 - nop -_0223E7D0: .word sub_02021BD4 - thumb_func_end ov94_0223E7C4 - - thumb_func_start ov94_0223E7D4 -ov94_0223E7D4: ; 0x0223E7D4 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - mov r3, #1 - str r0, [sp, #0x14] - str r3, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, _0223E944 ; =0x00000F1C - ldr r1, [sp, #0x14] - ldr r0, [r0, #4] - add r1, r1, r2 - mov r2, #0 - bl sub_0201A7E8 - ldr r1, _0223E944 ; =0x00000F1C - ldr r0, [sp, #0x14] - add r0, r0, r1 - mov r1, #0 - bl sub_0201ADA4 - mov r2, #0 - ldr r0, _0223E948 ; =0x000F0D00 - str r2, [sp] - str r0, [sp, #4] - ldr r1, _0223E944 ; =0x00000F1C - ldr r0, [sp, #0x14] - ldr r3, _0223E94C ; =0x00000BB4 - add r0, r0, r1 - ldr r1, [sp, #0x14] - ldr r1, [r1, r3] - mov r3, #1 - bl ov94_022458CC - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x60 - str r0, [sp, #0x10] - ldr r0, [sp, #0x14] - ldr r2, _0223E950 ; =0x00000EFC - ldr r1, [sp, #0x14] - ldr r0, [r0, #4] - add r1, r1, r2 - mov r2, #0 - bl sub_0201A7E8 - ldr r1, _0223E950 ; =0x00000EFC - ldr r0, [sp, #0x14] - add r0, r0, r1 - mov r1, #0 - bl sub_0201ADA4 - ldr r1, _0223E954 ; =0x00000F6C - ldr r0, [sp, #0x14] - ldr r4, _0223E958 ; =0x02245D94 - mov r7, #0 - mov r6, #1 - add r5, r0, r1 -_0223E860: - ldrh r0, [r4, #2] - add r1, r5, #0 - mov r2, #3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [sp, #0x14] - lsl r3, r3, #0x18 - ldr r0, [r0, #4] - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r7, r7, #1 - add r6, #0x16 - add r4, r4, #4 - add r5, #0x10 - cmp r7, #6 - blt _0223E860 - ldr r1, _0223E954 ; =0x00000F6C - ldr r0, [sp, #0x14] - ldr r4, _0223E95C ; =0x02245D84 - add r0, r0, r1 - mov r5, #0 - mov r6, #0x96 - str r0, [sp, #0x18] -_0223E8AE: - add r0, r5, #6 - lsl r7, r0, #4 - ldrh r0, [r4, #2] - ldr r1, [sp, #0x18] - mov r2, #2 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #8 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [sp, #0x14] - add r1, r1, r7 - lsl r3, r3, #0x18 - ldr r0, [r0, #4] - lsr r3, r3, #0x18 - bl sub_0201A7E8 - ldr r0, [sp, #0x18] - mov r1, #0 - add r0, r0, r7 - bl sub_0201ADA4 - add r5, r5, #1 - add r6, #0x10 - add r4, r4, #4 - cmp r5, #2 - blt _0223E8AE - ldr r1, _0223E960 ; =0x0000104C - ldr r0, [sp, #0x14] - ldr r4, _0223E964 ; =0x02245D8C - mov r7, #0 - mov r6, #0x85 - add r5, r0, r1 -_0223E900: - ldrh r0, [r4, #2] - add r1, r5, #0 - mov r2, #3 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [sp, #0x14] - lsl r3, r3, #0x18 - ldr r0, [r0, #4] - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r7, r7, #1 - add r6, #0x38 - add r4, r4, #4 - add r5, #0x10 - cmp r7, #2 - blt _0223E900 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0223E944: .word 0x00000F1C -_0223E948: .word 0x000F0D00 -_0223E94C: .word 0x00000BB4 -_0223E950: .word 0x00000EFC -_0223E954: .word 0x00000F6C -_0223E958: .word 0x02245D94 -_0223E95C: .word 0x02245D84 -_0223E960: .word 0x0000104C -_0223E964: .word 0x02245D8C - thumb_func_end ov94_0223E7D4 - - thumb_func_start ov94_0223E968 -ov94_0223E968: ; 0x0223E968 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _0223E9A8 ; =0x00000EFC - add r0, r6, r0 - bl sub_0201A8FC - ldr r0, _0223E9AC ; =0x00000F1C - add r0, r6, r0 - bl sub_0201A8FC - ldr r0, _0223E9B0 ; =0x00000F6C - mov r4, #0 - add r5, r6, r0 -_0223E982: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #8 - blt _0223E982 - ldr r0, _0223E9B4 ; =0x0000104C - mov r4, #0 - add r5, r6, r0 -_0223E996: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #2 - blt _0223E996 - pop {r4, r5, r6, pc} - nop -_0223E9A8: .word 0x00000EFC -_0223E9AC: .word 0x00000F1C -_0223E9B0: .word 0x00000F6C -_0223E9B4: .word 0x0000104C - thumb_func_end ov94_0223E968 - - thumb_func_start ov94_0223E9B8 -ov94_0223E9B8: ; 0x0223E9B8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r4, r1] - sub r1, #0x1c - ldr r0, [r4, r1] - mov r1, #0x29 - bl sub_0200B1EC - ldr r1, _0223EA18 ; =0x00000BB4 - str r0, [r4, r1] - mov r0, #0x3e - mov r1, #0x30 - bl sub_02018144 - ldr r1, _0223EA1C ; =0x00001084 - mov r2, #0x30 - str r0, [r4, r1] - ldr r1, [r4, r1] - mov r0, #0 - bl sub_020C4BB8 - ldr r2, _0223EA1C ; =0x00001084 - mov r0, #0x3e - ldr r2, [r4, r2] - mov r1, #0 - add r2, #0x1c - bl ov94_02242524 - ldr r1, _0223EA1C ; =0x00001084 - ldr r1, [r4, r1] - str r0, [r1, #0x18] - mov r0, #0x3e - bl ov94_02242548 - ldr r1, _0223EA1C ; =0x00001084 - ldr r2, [r4, r1] - add r1, #0x38 - str r0, [r2, #0x14] - add r0, r4, r1 - bl ov94_02242AAC - pop {r4, pc} - ; .align 2, 0 -_0223EA18: .word 0x00000BB4 -_0223EA1C: .word 0x00001084 - thumb_func_end ov94_0223E9B8 - - thumb_func_start ov94_0223EA20 -ov94_0223EA20: ; 0x0223EA20 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223EA54 ; =0x00001084 - ldr r0, [r4, r0] - ldr r0, [r0, #0x14] - bl sub_020181C4 - ldr r0, _0223EA54 ; =0x00001084 - ldr r0, [r4, r0] - ldr r0, [r0, #0x18] - bl sub_020181C4 - ldr r0, _0223EA54 ; =0x00001084 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _0223EA58 ; =0x00000BB4 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 -_0223EA54: .word 0x00001084 -_0223EA58: .word 0x00000BB4 - thumb_func_end ov94_0223EA20 - - thumb_func_start ov94_0223EA5C -ov94_0223EA5C: ; 0x0223EA5C - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223EA80 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #8 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223EA80: .word 0x00000F0F - thumb_func_end ov94_0223EA5C - - thumb_func_start ov94_0223EA84 -ov94_0223EA84: ; 0x0223EA84 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov94_0223EFAC - ldr r0, _0223EBB0 ; =0x021BF67C - mov r2, #1 - ldr r1, [r0, #0x48] - add r0, r1, #0 - tst r0, r2 - beq _0223EB42 - add r0, r4, #0 - bl ov94_0223EF94 - cmp r0, #5 - bls _0223EAA4 - b _0223EBAC -_0223EAA4: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223EAB0: ; jump table - .short _0223EABC - _0223EAB0 - 2 ; case 0 - .short _0223EAC8 - _0223EAB0 - 2 ; case 1 - .short _0223EB02 - _0223EAB0 - 2 ; case 2 - .short _0223EB0E - _0223EAB0 - 2 ; case 3 - .short _0223EB1A - _0223EAB0 - 2 ; case 4 - .short _0223EB20 - _0223EAB0 - 2 ; case 5 -_0223EABC: - mov r0, #3 - str r0, [r4, #0x2c] - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - b _0223EBAC -_0223EAC8: - ldr r0, _0223EBB8 ; =0x00000B7E - ldrsh r0, [r4, r0] - cmp r0, #0 - beq _0223EAF6 - mov r1, #0x12 - bl sub_020759F0 - ldr r1, _0223EBBC ; =0x00001084 - ldr r2, [r4, r1] - str r0, [r2, #0x20] - ldr r1, [r4, r1] - ldr r0, _0223EBB8 ; =0x00000B7E - ldr r1, [r1, #0x20] - add r0, r4, r0 - bl ov94_02241B80 - cmp r0, #0 - beq _0223EAF6 - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - mov r0, #3 - pop {r3, r4, r5, pc} -_0223EAF6: - mov r0, #8 - str r0, [r4, #0x2c] - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - b _0223EBAC -_0223EB02: - mov r0, #0xb - str r0, [r4, #0x2c] - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - b _0223EBAC -_0223EB0E: - mov r0, #0xe - str r0, [r4, #0x2c] - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - b _0223EBAC -_0223EB1A: - mov r0, #0x11 - str r0, [r4, #0x2c] - b _0223EBAC -_0223EB20: - ldr r0, _0223EBC0 ; =0x00000F0F - mov r1, #0xf - str r0, [sp] - add r0, r4, #0 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #0x19 - bl ov94_0223C3F4 - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - b _0223EBAC -_0223EB42: - mov r0, #2 - tst r0, r1 - beq _0223EB68 - ldr r0, _0223EBC0 ; =0x00000F0F - mov r1, #0xf - str r0, [sp] - add r0, r4, #0 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #0x19 - bl ov94_0223C3F4 - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 - b _0223EBAC -_0223EB68: - mov r0, #0x47 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl ov94_02244214 - add r5, r0, #0 - ldr r0, _0223EBC4 ; =0x00001092 - ldrh r0, [r4, r0] - cmp r0, #0 - beq _0223EBAC - cmp r5, #0 - blt _0223EBAC - add r0, r5, #1 - lsl r0, r0, #2 - add r1, r4, r0 - ldr r0, _0223EBC8 ; =0x00000ED4 - ldr r0, [r1, r0] - lsl r1, r5, #2 - add r1, #0x10 - bl sub_02021D6C - mov r0, #2 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #3 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #0x12 - lsl r0, r0, #4 - str r5, [r4, r0] - ldr r0, _0223EBB4 ; =0x000005DC - bl sub_02005748 -_0223EBAC: - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0223EBB0: .word 0x021BF67C -_0223EBB4: .word 0x000005DC -_0223EBB8: .word 0x00000B7E -_0223EBBC: .word 0x00001084 -_0223EBC0: .word 0x00000F0F -_0223EBC4: .word 0x00001092 -_0223EBC8: .word 0x00000ED4 - thumb_func_end ov94_0223EA84 - - thumb_func_start ov94_0223EBCC -ov94_0223EBCC: ; 0x0223EBCC - push {r3, r4, lr} - sub sp, #4 - ldr r3, _0223EC60 ; =0x00000B7E - add r4, r0, #0 - ldrsh r1, [r4, r3] - cmp r1, #0 - bne _0223EBFA - ldr r1, _0223EC64 ; =0x00000F0F - mov r2, #1 - str r1, [sp] - mov r1, #0xc - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - ldr r0, _0223EC68 ; =0x000005F3 - bl sub_02005748 - b _0223EC58 -_0223EBFA: - ldr r2, _0223EC6C ; =0x00001150 - add r1, r3, #6 - add r0, r4, r3 - add r3, #0xe - ldr r2, [r4, r2] - ldr r3, [r4, r3] - add r1, r4, r1 - bl ov94_0223FB0C - cmp r0, #0 - beq _0223EC32 - ldr r0, _0223EC64 ; =0x00000F0F - mov r1, #0x21 - str r0, [sp] - add r0, r4, #0 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - ldr r0, _0223EC68 ; =0x000005F3 - bl sub_02005748 - b _0223EC58 -_0223EC32: - ldr r0, _0223EC70 ; =0x000005FF - bl sub_02005748 - ldr r0, _0223EC64 ; =0x00000F0F - mov r1, #0xd - str r0, [sp] - add r0, r4, #0 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #0x12 - bl ov94_0223C3F4 - add r0, r4, #0 - bl ov94_022442E4 -_0223EC58: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0223EC60: .word 0x00000B7E -_0223EC64: .word 0x00000F0F -_0223EC68: .word 0x000005F3 -_0223EC6C: .word 0x00001150 -_0223EC70: .word 0x000005FF - thumb_func_end ov94_0223EBCC - - thumb_func_start ov94_0223EC74 -ov94_0223EC74: ; 0x0223EC74 - push {r3, r4, lr} - sub sp, #0x2c - cmp r1, #1 - ldr r0, [r0, #0] - bne _0223EC86 - ldr r0, [r0, #0] - bl sub_0202DA9C - b _0223EC8C -_0223EC86: - ldr r0, [r0, #0] - bl sub_0202DA8C -_0223EC8C: - lsr r1, r0, #0x18 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp, #0x1c] - lsr r1, r0, #0x10 - lsl r1, r1, #0x18 - lsr r1, r1, #0x18 - str r1, [sp, #0x20] - lsr r1, r0, #8 - lsl r1, r1, #0x18 - lsl r0, r0, #0x18 - lsr r1, r1, #0x18 - lsr r0, r0, #0x18 - str r1, [sp, #0x24] - str r0, [sp, #0x28] - add r0, sp, #0xc - add r1, sp, #0 - bl ov4_021D806C - add r0, sp, #0xc - bl sub_020CC16C - add r4, r0, #0 - add r0, sp, #0x1c - bl sub_020CC16C - sub r0, r4, r0 - bmi _0223ECCE - cmp r0, #3 - bge _0223ECCE - add sp, #0x2c - mov r0, #1 - pop {r3, r4, pc} -_0223ECCE: - mov r0, #0 - add sp, #0x2c - pop {r3, r4, pc} - thumb_func_end ov94_0223EC74 - - thumb_func_start ov94_0223ECD4 -ov94_0223ECD4: ; 0x0223ECD4 - push {r3, r4, r5, lr} - sub sp, #8 - mov r1, #1 - add r5, r0, #0 - mov r4, #3 - bl ov94_0223EC74 - cmp r0, #0 - beq _0223ECE8 - add r4, r4, #2 -_0223ECE8: - add r0, r5, #0 - mov r1, #0 - bl ov94_0223EC74 - cmp r0, #0 - beq _0223ECF6 - add r4, r4, #2 -_0223ECF6: - ldr r0, _0223ED88 ; =0x00001150 - ldr r0, [r5, r0] - cmp r0, #0 - bne _0223ED10 - ldr r0, _0223ED8C ; =0x00000B7E - mov r2, #0x95 - lsl r2, r2, #2 - add r0, r5, r0 - add r1, r4, #0 - add r2, r5, r2 - bl ov94_0223B9B0 - b _0223ED4E -_0223ED10: - add r0, sp, #0 - mov r1, #0 - mov r2, #8 - bl sub_020C4CF4 - ldr r1, _0223ED8C ; =0x00000B7E - add r0, sp, #0 - ldrsh r2, [r5, r1] - strh r2, [r0] - add r2, r1, #2 - ldrsb r2, [r5, r2] - strb r2, [r0, #2] - add r2, r1, #3 - ldrsb r2, [r5, r2] - strb r2, [r0, #3] - add r2, r1, #4 - ldrsb r2, [r5, r2] - add r1, r1, #5 - strb r2, [r0, #4] - ldrsb r1, [r5, r1] - strb r1, [r0, #5] - ldr r1, _0223ED88 ; =0x00001150 - strb r4, [r0, #6] - ldr r1, [r5, r1] - strb r1, [r0, #7] - mov r1, #0x95 - lsl r1, r1, #2 - add r0, sp, #0 - add r1, r5, r1 - bl ov94_0223BA24 -_0223ED4E: - ldr r1, _0223ED8C ; =0x00000B7E - ldrh r2, [r5, r1] - add r0, r1, #6 - strh r2, [r5, r0] - add r0, r1, #2 - ldrh r2, [r5, r0] - add r0, r1, #0 - add r0, #8 - strh r2, [r5, r0] - add r0, r1, #4 - ldrh r2, [r5, r0] - add r0, r1, #0 - add r0, #0xa - strh r2, [r5, r0] - ldr r2, _0223ED88 ; =0x00001150 - add r1, #0xe - ldr r0, [r5, r2] - sub r2, #0xbe - str r0, [r5, r1] - ldr r0, _0223ED90 ; =0x00001484 - mov r1, #0 - str r1, [r5, r0] - mov r0, #0x13 - str r0, [r5, #0x2c] - strh r1, [r5, r2] - mov r0, #3 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_0223ED88: .word 0x00001150 -_0223ED8C: .word 0x00000B7E -_0223ED90: .word 0x00001484 - thumb_func_end ov94_0223ECD4 - - thumb_func_start ov94_0223ED94 -ov94_0223ED94: ; 0x0223ED94 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _0223EE1C - bl ov94_0223B7D8 - add r5, r0, #0 - ldr r0, _0223EE38 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - add r0, r5, #0 - add r0, #0xf - cmp r0, #0x16 - bhi _0223EE32 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0223EDC0: ; jump table - .short _0223EE16 - _0223EDC0 - 2 ; case 0 - .short _0223EE0A - _0223EDC0 - 2 ; case 1 - .short _0223EE10 - _0223EDC0 - 2 ; case 2 - .short _0223EE16 - _0223EDC0 - 2 ; case 3 - .short _0223EE32 - _0223EDC0 - 2 ; case 4 - .short _0223EE32 - _0223EDC0 - 2 ; case 5 - .short _0223EE32 - _0223EDC0 - 2 ; case 6 - .short _0223EE32 - _0223EDC0 - 2 ; case 7 - .short _0223EE32 - _0223EDC0 - 2 ; case 8 - .short _0223EE32 - _0223EDC0 - 2 ; case 9 - .short _0223EE32 - _0223EDC0 - 2 ; case 10 - .short _0223EE32 - _0223EDC0 - 2 ; case 11 - .short _0223EE32 - _0223EDC0 - 2 ; case 12 - .short _0223EE0A - _0223EDC0 - 2 ; case 13 - .short _0223EE32 - _0223EDC0 - 2 ; case 14 - .short _0223EDEE - _0223EDC0 - 2 ; case 15 - .short _0223EDEE - _0223EDC0 - 2 ; case 16 - .short _0223EDEE - _0223EDC0 - 2 ; case 17 - .short _0223EDEE - _0223EDC0 - 2 ; case 18 - .short _0223EDEE - _0223EDC0 - 2 ; case 19 - .short _0223EDEE - _0223EDC0 - 2 ; case 20 - .short _0223EDEE - _0223EDC0 - 2 ; case 21 - .short _0223EDEE - _0223EDC0 - 2 ; case 22 -_0223EDEE: - mov r0, #0x47 - lsl r0, r0, #2 - str r5, [r4, r0] - ldr r0, _0223EE3C ; =0x000005FF - bl sub_020057A4 - add r0, r4, #0 - add r1, r5, #0 - mov r2, #1 - bl ov94_02244234 - mov r0, #0x14 - str r0, [r4, #0x2c] - b _0223EE32 -_0223EE0A: - mov r0, #0x1d - str r0, [r4, #0x2c] - b _0223EE32 -_0223EE10: - bl sub_02038A0C - b _0223EE32 -_0223EE16: - mov r0, #0x16 - str r0, [r4, #0x2c] - b _0223EE32 -_0223EE1C: - ldr r0, _0223EE38 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _0223EE32 - bl sub_02038A0C -_0223EE32: - mov r0, #3 - pop {r3, r4, r5, pc} - nop -_0223EE38: .word 0x00001484 -_0223EE3C: .word 0x000005FF - thumb_func_end ov94_0223ED94 - - thumb_func_start ov94_0223EE40 -ov94_0223EE40: ; 0x0223EE40 - push {r3, r4, lr} - sub sp, #4 - mov r1, #0x47 - add r4, r0, #0 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - ldr r1, _0223EE94 ; =0x00000F0F - bne _0223EE70 - str r1, [sp] - mov r1, #0xe - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - ldr r0, _0223EE98 ; =0x000005F3 - bl sub_02005748 - b _0223EE8E -_0223EE70: - str r1, [sp] - mov r1, #0x1e - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #0x15 - bl ov94_0223C3F4 - mov r0, #0x42 - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] -_0223EE8E: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223EE94: .word 0x00000F0F -_0223EE98: .word 0x000005F3 - thumb_func_end ov94_0223EE40 - - thumb_func_start ov94_0223EE9C -ov94_0223EE9C: ; 0x0223EE9C - push {r3, r4, lr} - sub sp, #4 - mov r1, #0x42 - add r4, r0, #0 - lsl r1, r1, #6 - ldr r2, [r4, r1] - add r2, r2, #1 - str r2, [r4, r1] - ldr r1, [r4, r1] - cmp r1, #0x2d - ble _0223EED0 - ldr r1, _0223EED8 ; =0x00000F0F - mov r2, #1 - str r1, [sp] - mov r1, #0x20 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - ldr r0, _0223EEDC ; =0x00001092 - mov r1, #1 - strh r1, [r4, r0] -_0223EED0: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0223EED8: .word 0x00000F0F -_0223EEDC: .word 0x00001092 - thumb_func_end ov94_0223EE9C - - thumb_func_start ov94_0223EEE0 -ov94_0223EEE0: ; 0x0223EEE0 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223EF10 ; =0x00000B84 - add r4, r0, #0 - mov r3, #0 - strh r3, [r4, r1] - ldr r1, _0223EF14 ; =0x00000F0F - mov r2, #1 - str r1, [sp] - mov r1, #0x26 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - ldr r0, _0223EF18 ; =0x000005F3 - bl sub_02005748 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0223EF10: .word 0x00000B84 -_0223EF14: .word 0x00000F0F -_0223EF18: .word 0x000005F3 - thumb_func_end ov94_0223EEE0 - - thumb_func_start ov94_0223EF1C -ov94_0223EF1C: ; 0x0223EF1C - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223EF50 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0x93 - mov r2, #4 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x18 - mov r2, #0x1e - bl ov94_0223C3F4 - mov r0, #0x42 - mov r1, #0 - lsl r0, r0, #6 - str r1, [r4, r0] - ldr r0, _0223EF54 ; =0x000005F3 - bl sub_02005748 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0223EF50: .word 0x00000F0F -_0223EF54: .word 0x000005F3 - thumb_func_end ov94_0223EF1C - - thumb_func_start ov94_0223EF58 -ov94_0223EF58: ; 0x0223EF58 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223EF8C ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0x98 - mov r2, #4 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x18 - mov r2, #2 - bl ov94_0223C3F4 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - ldr r0, _0223EF90 ; =0x000005F3 - bl sub_02005748 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223EF8C: .word 0x00000F0F -_0223EF90: .word 0x000005F3 - thumb_func_end ov94_0223EF58 - - thumb_func_start ov94_0223EF94 -ov94_0223EF94: ; 0x0223EF94 - ldr r1, _0223EFA8 ; =0x00001084 - ldr r1, [r0, r1] - ldr r0, [r1, #0x24] - cmp r0, #0 - bne _0223EFA2 - ldr r0, [r1, #0x28] - bx lr -_0223EFA2: - ldr r0, [r1, #0x2c] - add r0, r0, #4 - bx lr - ; .align 2, 0 -_0223EFA8: .word 0x00001084 - thumb_func_end ov94_0223EF94 - - thumb_func_start ov94_0223EFAC -ov94_0223EFAC: ; 0x0223EFAC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, _0223F094 ; =0x021BF67C - mov r1, #0x40 - ldr r0, [r0, #0x48] - tst r1, r0 - beq _0223EFEE - ldr r0, _0223F098 ; =0x00001084 - ldr r1, [r4, r0] - ldr r0, [r1, #0x24] - cmp r0, #0 - bne _0223EFD8 - ldr r0, [r1, #0x28] - cmp r0, #0 - ble _0223F064 - sub r0, r0, #1 - str r0, [r1, #0x28] - ldr r0, _0223F09C ; =0x000005DC - bl sub_02005748 - b _0223F064 -_0223EFD8: - ldr r0, [r1, #0x2c] - cmp r0, #0 - beq _0223EFE4 - ldr r0, _0223F09C ; =0x000005DC - bl sub_02005748 -_0223EFE4: - ldr r0, _0223F098 ; =0x00001084 - mov r1, #0 - ldr r0, [r4, r0] - str r1, [r0, #0x2c] - b _0223F064 -_0223EFEE: - mov r1, #0x80 - tst r1, r0 - beq _0223F026 - ldr r0, _0223F098 ; =0x00001084 - ldr r1, [r4, r0] - ldr r0, [r1, #0x24] - cmp r0, #0 - bne _0223F010 - ldr r0, [r1, #0x28] - cmp r0, #3 - bge _0223F064 - add r0, r0, #1 - str r0, [r1, #0x28] - ldr r0, _0223F09C ; =0x000005DC - bl sub_02005748 - b _0223F064 -_0223F010: - ldr r0, [r1, #0x2c] - cmp r0, #1 - beq _0223F01C - ldr r0, _0223F09C ; =0x000005DC - bl sub_02005748 -_0223F01C: - ldr r0, _0223F098 ; =0x00001084 - mov r1, #1 - ldr r0, [r4, r0] - str r1, [r0, #0x2c] - b _0223F064 -_0223F026: - mov r1, #0x10 - tst r1, r0 - beq _0223F046 - ldr r0, _0223F098 ; =0x00001084 - ldr r0, [r4, r0] - ldr r0, [r0, #0x24] - cmp r0, #1 - beq _0223F03C - ldr r0, _0223F09C ; =0x000005DC - bl sub_02005748 -_0223F03C: - ldr r0, _0223F098 ; =0x00001084 - mov r1, #1 - ldr r0, [r4, r0] - str r1, [r0, #0x24] - b _0223F064 -_0223F046: - mov r1, #0x20 - tst r0, r1 - beq _0223F064 - ldr r0, _0223F098 ; =0x00001084 - ldr r0, [r4, r0] - ldr r0, [r0, #0x24] - cmp r0, #0 - beq _0223F05C - ldr r0, _0223F09C ; =0x000005DC - bl sub_02005748 -_0223F05C: - ldr r0, _0223F098 ; =0x00001084 - mov r1, #0 - ldr r0, [r4, r0] - str r1, [r0, #0x24] -_0223F064: - add r0, r4, #0 - bl ov94_0223EF94 - lsl r1, r0, #2 - ldr r0, _0223F0A0 ; =0x02246848 - ldrh r0, [r0, r1] - lsl r0, r0, #0xc - str r0, [sp] - add r0, r4, #0 - bl ov94_0223EF94 - lsl r1, r0, #2 - ldr r0, _0223F0A4 ; =0x0224684A - ldrh r0, [r0, r1] - add r1, sp, #0 - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r4, r0] - bl sub_02021C50 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0223F094: .word 0x021BF67C -_0223F098: .word 0x00001084 -_0223F09C: .word 0x000005DC -_0223F0A0: .word 0x02246848 -_0223F0A4: .word 0x0224684A - thumb_func_end ov94_0223EFAC - - thumb_func_start ov94_0223F0A8 -ov94_0223F0A8: ; 0x0223F0A8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #6 - mov r1, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - thumb_func_end ov94_0223F0A8 - - thumb_func_start ov94_0223F0D0 -ov94_0223F0D0: ; 0x0223F0D0 - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _0223F148 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #9 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #4 - bl ov94_0223C3F4 - mov r0, #5 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0xb6 - ldr r1, _0223F14C ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0xf - bl sub_0201A7E8 - ldr r0, _0223F14C ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #5 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0xea - ldr r1, _0223F150 ; =0x00000F4C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - ldr r0, _0223F150 ; =0x00000F4C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_0223F148: .word 0x00000F0F -_0223F14C: .word 0x00000F3C -_0223F150: .word 0x00000F4C - thumb_func_end ov94_0223F0D0 - - thumb_func_start ov94_0223F154 -ov94_0223F154: ; 0x0223F154 - push {r4, lr} - ldr r3, _0223F17C ; =0x00000B94 - add r4, r0, #0 - ldr r1, _0223F180 ; =0x0000106C - ldr r2, _0223F184 ; =0x00000F3C - ldr r3, [r4, r3] - add r1, r4, r1 - add r2, r4, r2 - bl ov94_022426A8 - ldr r1, _0223F188 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _0223F18C ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #5 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223F17C: .word 0x00000B94 -_0223F180: .word 0x0000106C -_0223F184: .word 0x00000F3C -_0223F188: .word 0x00001078 -_0223F18C: .word 0x0000FFFF - thumb_func_end ov94_0223F154 - - thumb_func_start ov94_0223F190 -ov94_0223F190: ; 0x0223F190 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223F240 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_02242A6C - cmp r0, #9 - bhi _0223F1C6 - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0223F1B2: ; jump table - .short _0223F23A - _0223F1B2 - 2 ; case 0 - .short _0223F1D0 - _0223F1B2 - 2 ; case 1 - .short _0223F1D0 - _0223F1B2 - 2 ; case 2 - .short _0223F1D0 - _0223F1B2 - 2 ; case 3 - .short _0223F1D0 - _0223F1B2 - 2 ; case 4 - .short _0223F1D0 - _0223F1B2 - 2 ; case 5 - .short _0223F1D0 - _0223F1B2 - 2 ; case 6 - .short _0223F1D0 - _0223F1B2 - 2 ; case 7 - .short _0223F1D0 - _0223F1B2 - 2 ; case 8 - .short _0223F1D0 - _0223F1B2 - 2 ; case 9 -_0223F1C6: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _0223F1F4 - b _0223F23A -_0223F1D0: - ldr r0, _0223F244 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #6 - ldr r0, [r4, r0] - add r2, r2, #4 - bl sub_02001384 - ldr r0, _0223F248 ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _0223F24C ; =0x000005DC - bl sub_02005748 - mov r0, #6 - str r0, [r4, #0x2c] - b _0223F23A -_0223F1F4: - ldr r0, _0223F244 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #6 - ldr r0, [r4, r0] - add r2, r2, #4 - bl sub_02001384 - ldr r0, _0223F248 ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _0223F250 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _0223F254 ; =0x00000EFC - mov r1, #0 - add r0, r4, r0 - bl sub_0200E084 - ldr r0, _0223F250 ; =0x00000F3C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _0223F258 ; =0x00000F4C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _0223F24C ; =0x000005DC - bl sub_02005748 - mov r0, #0 - str r0, [r4, #0x2c] -_0223F23A: - mov r0, #3 - pop {r4, pc} - nop -_0223F240: .word 0x00001078 -_0223F244: .word 0x00001084 -_0223F248: .word 0x0000106C -_0223F24C: .word 0x000005DC -_0223F250: .word 0x00000F3C -_0223F254: .word 0x00000EFC -_0223F258: .word 0x00000F4C - thumb_func_end ov94_0223F190 - - thumb_func_start ov94_0223F25C -ov94_0223F25C: ; 0x0223F25C - push {r3, r4, lr} - sub sp, #0xc - ldr r3, _0223F29C ; =0x00000B98 - add r4, r0, #0 - ldr r1, [r4, r3] - sub r3, r3, #4 - str r1, [sp] - ldr r1, _0223F2A0 ; =0x00001084 - ldr r2, [r4, r1] - sub r1, #0x18 - str r2, [sp, #4] - ldr r2, [r4, #0] - add r1, r4, r1 - ldr r2, [r2, #0x10] - str r2, [sp, #8] - ldr r2, _0223F2A4 ; =0x00000F4C - ldr r3, [r4, r3] - add r2, r4, r2 - bl ov94_022427C0 - ldr r1, _0223F2A8 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _0223F2AC ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #7 - str r0, [r4, #0x2c] - mov r0, #3 - add sp, #0xc - pop {r3, r4, pc} - nop -_0223F29C: .word 0x00000B98 -_0223F2A0: .word 0x00001084 -_0223F2A4: .word 0x00000F4C -_0223F2A8: .word 0x00001078 -_0223F2AC: .word 0x0000FFFF - thumb_func_end ov94_0223F25C - - thumb_func_start ov94_0223F2B0 -ov94_0223F2B0: ; 0x0223F2B0 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, _0223F3EC ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_02242A6C - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _0223F2D8 - add r0, r0, #1 - cmp r5, r0 - bne _0223F2D6 - b _0223F3E4 -_0223F2D6: - b _0223F31E -_0223F2D8: - ldr r0, _0223F3F0 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #0 - ldr r0, [r4, r0] - add r1, #0xa - add r2, #8 - bl sub_02001384 - ldr r0, _0223F3F4 ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _0223F3F8 ; =0x00000F4C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _0223F3FC ; =0x000005DC - bl sub_02005748 - mov r0, #4 - str r0, [r4, #0x2c] - ldr r0, _0223F3F0 ; =0x00001084 - ldr r3, [r4, r0] - add r0, #0x38 - ldrh r2, [r3, #6] - ldrh r1, [r3, #4] - add r0, r4, r0 - add r1, r2, r1 - ldrh r2, [r3, #0xa] - ldrh r3, [r3, #8] - bl ov94_02242AC4 - b _0223F3E4 -_0223F31E: - ldr r0, _0223F3F0 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #0 - ldr r0, [r4, r0] - add r1, #0xa - add r2, #8 - bl sub_02001384 - ldr r0, _0223F3F4 ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _0223F400 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _0223F3F8 ; =0x00000F4C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _0223F400 ; =0x00000F3C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _0223F3F8 ; =0x00000F4C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _0223F404 ; =0x00000B7E - strh r5, [r4, r0] - mov r0, #0 - str r0, [r4, #0x2c] - ldr r0, _0223F3FC ; =0x000005DC - bl sub_02005748 - ldr r0, _0223F408 ; =0x00000F7C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r3, #0 - ldr r0, _0223F40C ; =0x00010200 - str r3, [sp] - str r0, [sp, #4] - ldr r1, _0223F410 ; =0x00000B98 - ldr r0, _0223F408 ; =0x00000F7C - ldr r1, [r4, r1] - add r0, r4, r0 - add r2, r5, #0 - bl ov94_02242158 - add r0, r5, #0 - mov r1, #0x12 - bl sub_020759F0 - ldr r1, _0223F3F0 ; =0x00001084 - ldr r2, [r4, r1] - str r0, [r2, #0x20] - ldr r3, [r4, r1] - add r1, #0x38 - add r0, r4, r1 - ldrh r2, [r3, #6] - ldrh r1, [r3, #4] - add r1, r2, r1 - ldrh r2, [r3, #0xa] - ldrh r3, [r3, #8] - bl ov94_02242AC4 - ldr r1, _0223F3F0 ; =0x00001084 - ldr r0, _0223F404 ; =0x00000B7E - ldr r1, [r4, r1] - add r0, r4, r0 - ldr r1, [r1, #0x20] - bl ov94_02241B80 - cmp r0, #0 - beq _0223F3E4 - ldr r0, _0223F414 ; =0x00000F9C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223F40C ; =0x00010200 - ldr r2, _0223F418 ; =0x00000B94 - str r0, [sp, #8] - ldr r1, [r4, r2] - sub r2, #0x14 - ldr r0, _0223F414 ; =0x00000F9C - ldrsb r2, [r4, r2] - add r0, r4, r0 - mov r3, #1 - bl ov94_02242204 -_0223F3E4: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223F3EC: .word 0x00001078 -_0223F3F0: .word 0x00001084 -_0223F3F4: .word 0x0000106C -_0223F3F8: .word 0x00000F4C -_0223F3FC: .word 0x000005DC -_0223F400: .word 0x00000F3C -_0223F404: .word 0x00000B7E -_0223F408: .word 0x00000F7C -_0223F40C: .word 0x00010200 -_0223F410: .word 0x00000B98 -_0223F414: .word 0x00000F9C -_0223F418: .word 0x00000B94 - thumb_func_end ov94_0223F2B0 - - thumb_func_start ov94_0223F41C -ov94_0223F41C: ; 0x0223F41C - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _0223F46C ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #9 - bl ov94_0223C3F4 - mov r0, #0xa - str r0, [sp] - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0xb6 - ldr r1, _0223F470 ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - ldr r0, _0223F470 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - nop -_0223F46C: .word 0x00000F0F -_0223F470: .word 0x00000F3C - thumb_func_end ov94_0223F41C - - thumb_func_start ov94_0223F474 -ov94_0223F474: ; 0x0223F474 - push {r4, lr} - ldr r2, _0223F49C ; =0x00000B94 - add r4, r0, #0 - ldr r0, _0223F4A0 ; =0x0000106C - ldr r1, _0223F4A4 ; =0x00000F3C - ldr r2, [r4, r2] - add r0, r4, r0 - add r1, r4, r1 - bl ov94_02242840 - ldr r1, _0223F4A8 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _0223F4AC ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #0xa - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223F49C: .word 0x00000B94 -_0223F4A0: .word 0x0000106C -_0223F4A4: .word 0x00000F3C -_0223F4A8: .word 0x00001078 -_0223F4AC: .word 0x0000FFFF - thumb_func_end ov94_0223F474 - - thumb_func_start ov94_0223F4B0 -ov94_0223F4B0: ; 0x0223F4B0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0223F580 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r5, r0] - add r1, r5, r1 - bl ov94_02242A6C - add r4, r0, #0 - cmp r4, #2 - bhi _0223F4D8 - cmp r4, #0 - beq _0223F51C - cmp r4, #1 - beq _0223F51C - cmp r4, #2 - beq _0223F51C - b _0223F578 -_0223F4D8: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _0223F578 - ldr r0, _0223F580 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _0223F584 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223F588 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0223F58C ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - ldr r0, _0223F588 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223F590 ; =0x000005DC - bl sub_02005748 - mov r0, #0 - str r0, [r5, #0x2c] - b _0223F578 -_0223F51C: - ldr r0, _0223F580 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _0223F584 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223F588 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0223F588 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223F590 ; =0x000005DC - bl sub_02005748 - mov r0, #0x2e - add r1, r4, #1 - lsl r0, r0, #6 - strb r1, [r5, r0] - ldr r0, _0223F594 ; =0x00000F9C - mov r1, #0 - add r0, r5, r0 - str r1, [r5, #0x2c] - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223F598 ; =0x00010200 - ldr r2, _0223F59C ; =0x00000B94 - str r0, [sp, #8] - ldr r1, [r5, r2] - sub r2, #0x14 - ldr r0, _0223F594 ; =0x00000F9C - ldrsb r2, [r5, r2] - add r0, r5, r0 - mov r3, #1 - bl ov94_02242204 -_0223F578: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223F580: .word 0x00001078 -_0223F584: .word 0x0000106C -_0223F588: .word 0x00000F3C -_0223F58C: .word 0x00000EFC -_0223F590: .word 0x000005DC -_0223F594: .word 0x00000F9C -_0223F598: .word 0x00010200 -_0223F59C: .word 0x00000B94 - thumb_func_end ov94_0223F4B0 - - thumb_func_start ov94_0223F5A0 -ov94_0223F5A0: ; 0x0223F5A0 - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _0223F5F0 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xb - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #0xc - bl ov94_0223C3F4 - mov r0, #5 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0xb6 - ldr r1, _0223F5F4 ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0xf - bl sub_0201A7E8 - ldr r0, _0223F5F4 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - nop -_0223F5F0: .word 0x00000F0F -_0223F5F4: .word 0x00000F3C - thumb_func_end ov94_0223F5A0 - - thumb_func_start ov94_0223F5F8 -ov94_0223F5F8: ; 0x0223F5F8 - push {r4, lr} - ldr r2, _0223F624 ; =0x00000B94 - add r4, r0, #0 - ldr r0, _0223F628 ; =0x0000106C - ldr r1, _0223F62C ; =0x00000F3C - ldr r2, [r4, r2] - add r0, r4, r0 - add r1, r4, r1 - mov r3, #1 - bl ov94_022428B0 - ldr r1, _0223F630 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _0223F634 ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #0xd - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_0223F624: .word 0x00000B94 -_0223F628: .word 0x0000106C -_0223F62C: .word 0x00000F3C -_0223F630: .word 0x00001078 -_0223F634: .word 0x0000FFFF - thumb_func_end ov94_0223F5F8 - - thumb_func_start ov94_0223F638 -ov94_0223F638: ; 0x0223F638 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0223F704 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r5, r0] - add r1, r5, r1 - bl ov94_02242A6C - add r4, r0, #0 - cmp r4, #0xb - beq _0223F662 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _0223F662 - add r0, r0, #1 - cmp r4, r0 - beq _0223F6FC - b _0223F69E -_0223F662: - ldr r0, _0223F704 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _0223F708 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223F70C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0223F710 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - ldr r0, _0223F70C ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223F714 ; =0x000005DC - bl sub_02005748 - mov r0, #0 - str r0, [r5, #0x2c] - b _0223F6FC -_0223F69E: - ldr r0, _0223F704 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _0223F708 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223F70C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0223F70C ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223F714 ; =0x000005DC - bl sub_02005748 - ldr r0, _0223F718 ; =0x00000B7E - add r1, r4, #0 - add r0, r5, r0 - mov r2, #1 - bl ov94_02242934 - ldr r0, _0223F71C ; =0x00000FBC - mov r1, #0 - add r0, r5, r0 - str r1, [r5, #0x2c] - bl sub_0201ADA4 - mov r3, #0 - ldr r0, _0223F720 ; =0x00010200 - str r3, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - ldr r1, _0223F724 ; =0x00000B94 - ldr r0, _0223F71C ; =0x00000FBC - ldr r1, [r5, r1] - add r0, r5, r0 - add r2, r4, #0 - bl ov94_022422B8 -_0223F6FC: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223F704: .word 0x00001078 -_0223F708: .word 0x0000106C -_0223F70C: .word 0x00000F3C -_0223F710: .word 0x00000EFC -_0223F714: .word 0x000005DC -_0223F718: .word 0x00000B7E -_0223F71C: .word 0x00000FBC -_0223F720: .word 0x00010200 -_0223F724: .word 0x00000B94 - thumb_func_end ov94_0223F638 - - thumb_func_start ov94_0223F728 -ov94_0223F728: ; 0x0223F728 - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _0223F778 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xa9 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #0xf - bl ov94_0223C3F4 - mov r0, #5 - str r0, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0xb6 - ldr r1, _0223F77C ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, _0223F77C ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - nop -_0223F778: .word 0x00000F0F -_0223F77C: .word 0x00000F3C - thumb_func_end ov94_0223F728 - - thumb_func_start ov94_0223F780 -ov94_0223F780: ; 0x0223F780 - push {r4, lr} - ldr r3, _0223F7AC ; =0x00000BA4 - add r4, r0, #0 - ldr r0, _0223F7B0 ; =0x0000106C - ldr r1, _0223F7B4 ; =0x00000F3C - ldr r2, [r4, r3] - sub r3, #0x10 - ldr r3, [r4, r3] - add r0, r4, r0 - add r1, r4, r1 - bl ov94_022429B4 - ldr r1, _0223F7B8 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _0223F7BC ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #0x10 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223F7AC: .word 0x00000BA4 -_0223F7B0: .word 0x0000106C -_0223F7B4: .word 0x00000F3C -_0223F7B8: .word 0x00001078 -_0223F7BC: .word 0x0000FFFF - thumb_func_end ov94_0223F780 - - thumb_func_start ov94_0223F7C0 -ov94_0223F7C0: ; 0x0223F7C0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0223F890 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r5, r0] - add r1, r5, r1 - bl ov94_02242A6C - add r4, r0, #0 - mov r0, #0 - mvn r0, r0 - cmp r4, r0 - beq _0223F888 - sub r0, r0, #1 - cmp r4, r0 - beq _0223F7EE - ldr r0, _0223F894 ; =0x02245FD4 - ldr r0, [r0, #0] - add r0, r0, #1 - cmp r4, r0 - bne _0223F82A -_0223F7EE: - ldr r0, _0223F890 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _0223F898 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223F89C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0223F8A0 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - ldr r0, _0223F89C ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223F8A4 ; =0x000005DC - bl sub_02005748 - mov r0, #0 - str r0, [r5, #0x2c] - b _0223F888 -_0223F82A: - ldr r0, _0223F890 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _0223F898 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _0223F89C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0223F89C ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0223F8A4 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - add r1, r4, #0 - bl ov94_02242A44 - ldr r0, _0223F8A8 ; =0x0000105C - mov r1, #0 - add r0, r5, r0 - str r1, [r5, #0x2c] - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - ldr r0, _0223F8AC ; =0x00010200 - ldr r3, _0223F8A8 ; =0x0000105C - str r0, [sp, #8] - ldr r2, _0223F8B0 ; =0x00000BA4 - add r0, r5, r3 - ldr r1, [r5, r2] - sub r2, #0x10 - add r3, #0xf4 - ldr r2, [r5, r2] - ldr r3, [r5, r3] - bl ov94_0224218C -_0223F888: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - nop -_0223F890: .word 0x00001078 -_0223F894: .word 0x02245FD4 -_0223F898: .word 0x0000106C -_0223F89C: .word 0x00000F3C -_0223F8A0: .word 0x00000EFC -_0223F8A4: .word 0x000005DC -_0223F8A8: .word 0x0000105C -_0223F8AC: .word 0x00010200 -_0223F8B0: .word 0x00000BA4 - thumb_func_end ov94_0223F7C0 - - thumb_func_start ov94_0223F8B4 -ov94_0223F8B4: ; 0x0223F8B4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _0223F8D0 ; =0x00000186 - mov r1, #0xf - bl ov94_0223C3C0 - ldr r1, _0223F8D4 ; =0x00001070 - str r0, [r4, r1] - mov r0, #0x1a - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_0223F8D0: .word 0x00000186 -_0223F8D4: .word 0x00001070 - thumb_func_end ov94_0223F8B4 - - thumb_func_start ov94_0223F8D8 -ov94_0223F8D8: ; 0x0223F8D8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223F91C ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0223F916 - sub r1, r1, #1 - cmp r0, r1 - bne _0223F8FA - mov r0, #0 - str r0, [r4, #0x2c] - b _0223F916 -_0223F8FA: - mov r0, #2 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - add r0, r4, #0 - bl ov94_022442E4 - mov r0, #0x47 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] -_0223F916: - mov r0, #3 - pop {r4, pc} - nop -_0223F91C: .word 0x00001070 - thumb_func_end ov94_0223F8D8 - - thumb_func_start ov94_0223F920 -ov94_0223F920: ; 0x0223F920 - mov r1, #1 - str r1, [r0, #0x2c] - mov r0, #3 - bx lr - thumb_func_end ov94_0223F920 - - thumb_func_start ov94_0223F928 -ov94_0223F928: ; 0x0223F928 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _0223F94C ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0x92 - mov r2, #1 - mov r3, #0 - bl ov94_0223F9A4 - add r0, r4, #0 - mov r1, #0x17 - mov r2, #1 - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_0223F94C: .word 0x00000F0F - thumb_func_end ov94_0223F928 - - thumb_func_start ov94_0223F950 -ov94_0223F950: ; 0x0223F950 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223F96C ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223F968 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223F968: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223F96C: .word 0x00000BE4 - thumb_func_end ov94_0223F950 - - thumb_func_start ov94_0223F970 -ov94_0223F970: ; 0x0223F970 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0223F9A0 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _0223F99C - mov r0, #0x42 - lsl r0, r0, #6 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - cmp r1, #0x2d - ble _0223F99C - mov r1, #0 - str r1, [r4, r0] - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_0223F99C: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0223F9A0: .word 0x00000BE4 - thumb_func_end ov94_0223F970 - - thumb_func_start ov94_0223F9A4 -ov94_0223F9A4: ; 0x0223F9A4 - push {r4, r5, lr} - sub sp, #0xc - add r4, r2, #0 - ldr r2, _0223F9F0 ; =0x00000B94 - add r5, r0, #0 - ldr r0, [r5, r2] - add r2, #0x1c - ldr r2, [r5, r2] - bl sub_0200B1B8 - ldr r0, _0223F9F4 ; =0x00000EFC - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _0223F9F4 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _0223F9F4 ; =0x00000EFC - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _0223F9F8 ; =0x00000BE4 - str r0, [r5, r1] - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0223F9F0: .word 0x00000B94 -_0223F9F4: .word 0x00000EFC -_0223F9F8: .word 0x00000BE4 - thumb_func_end ov94_0223F9A4 - - thumb_func_start ov94_0223F9FC -ov94_0223F9FC: ; 0x0223F9FC - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r4, r2, #0 - add r5, r0, #0 - add r7, r1, #0 - add r0, r4, #0 - mov r1, #0x3b - bl sub_0200B1EC - add r6, r0, #0 - mov r2, #0 - ldr r0, _0223FB04 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r1, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - mov r1, #0x3d - bl sub_0200B1EC - add r6, r0, #0 - mov r2, #0 - ldr r0, _0223FB04 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x20 - add r1, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - mov r1, #0x3f - bl sub_0200B1EC - add r6, r0, #0 - mov r2, #0 - ldr r0, _0223FB04 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x40 - add r1, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - mov r1, #0xa5 - bl sub_0200B1EC - add r6, r0, #0 - mov r2, #0 - ldr r0, _0223FB04 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - add r0, r7, #0 - add r1, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - mov r1, #0x41 - bl sub_0200B1EC - add r6, r0, #0 - add r3, r5, #0 - add r3, #0x67 - ldrb r3, [r3] - mov r0, #0 - add r1, r6, #0 - add r2, r0, #0 - lsl r3, r3, #3 - bl sub_02002EEC - add r2, r0, #0 - mov r3, #0 - ldr r0, _0223FB08 ; =0x00010200 - str r3, [sp] - str r0, [sp, #4] - add r0, r5, #0 - add r0, #0x60 - add r1, r6, #0 - bl ov94_02245900 - add r0, r6, #0 - bl sub_020237BC - add r0, r4, #0 - mov r1, #0x42 - bl sub_0200B1EC - add r4, r0, #0 - add r3, r5, #0 - add r3, #0x77 - ldrb r3, [r3] - mov r0, #0 - add r1, r4, #0 - add r2, r0, #0 - lsl r3, r3, #3 - bl sub_02002EEC - add r2, r0, #0 - mov r3, #0 - ldr r0, _0223FB08 ; =0x00010200 - str r3, [sp] - add r5, #0x70 - str r0, [sp, #4] - add r0, r5, #0 - add r1, r4, #0 - bl ov94_02245900 - add r0, r4, #0 - bl sub_020237BC - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FB04: .word 0x000F0200 -_0223FB08: .word 0x00010200 - thumb_func_end ov94_0223F9FC - - thumb_func_start ov94_0223FB0C -ov94_0223FB0C: ; 0x0223FB0C - push {r4, r5} - mov r4, #0 - ldrsh r5, [r0, r4] - ldrsh r4, [r1, r4] - cmp r5, r4 - bne _0223FB40 - mov r4, #2 - ldrsb r5, [r0, r4] - ldrsb r4, [r1, r4] - cmp r5, r4 - bne _0223FB40 - mov r4, #3 - ldrsb r5, [r0, r4] - ldrsb r4, [r1, r4] - cmp r5, r4 - bne _0223FB40 - mov r4, #4 - ldrsb r5, [r0, r4] - ldrsb r0, [r1, r4] - cmp r5, r0 - bne _0223FB40 - cmp r2, r3 - bne _0223FB40 - mov r0, #1 - pop {r4, r5} - bx lr -_0223FB40: - mov r0, #0 - pop {r4, r5} - bx lr - ; .align 2, 0 - thumb_func_end ov94_0223FB0C - - thumb_func_start ov94_0223FB48 -ov94_0223FB48: ; 0x0223FB48 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_022401E0 - ldr r0, [r4, #4] - bl ov94_0223FC08 - add r0, r4, #0 - bl ov94_0223FD4C - add r0, r4, #0 - bl ov94_02240028 - add r0, r4, #0 - bl ov94_0223FE24 - ldr r0, [r4, #0x20] - cmp r0, #8 - bne _0223FB88 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - b _0223FB9E -_0223FB88: - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 -_0223FB9E: - mov r1, #0x45 - lsl r1, r1, #2 - ldrh r1, [r4, r1] - add r0, r4, #0 - bl ov94_02240FA0 - add r0, r4, #0 - bl ov94_02245934 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov94_0223FB48 - - thumb_func_start ov94_0223FBBC -ov94_0223FBBC: ; 0x0223FBBC - push {r4, lr} - add r4, r0, #0 - bl ov94_0223C4B4 - bl sub_020397B0 - ldr r1, [r4, #0x2c] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _0223FBD8 ; =0x022468DC - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_0223FBD8: .word 0x022468DC - thumb_func_end ov94_0223FBBC - - thumb_func_start ov94_0223FBDC -ov94_0223FBDC: ; 0x0223FBDC - push {r4, lr} - add r4, r0, #0 - bl sub_02039794 - add r0, r4, #0 - bl ov94_0223FFC8 - add r0, r4, #0 - bl ov94_02240268 - add r0, r4, #0 - bl ov94_02240190 - ldr r0, [r4, #4] - bl ov94_0223FD20 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_0223FBDC - - thumb_func_start ov94_0223FC08 -ov94_0223FC08: ; 0x0223FC08 - push {r4, r5, lr} - sub sp, #0x9c - ldr r5, _0223FD08 ; =0x02245E24 - add r3, sp, #0x8c - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _0223FD0C ; =0x02245E9C - add r3, sp, #0x70 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _0223FD10 ; =0x02245EB8 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _0223FD14 ; =0x02245E80 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - ldr r5, _0223FD18 ; =0x02245E48 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _0223FD1C ; =0x02245E64 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - str r0, [r3, #0] - add r0, r4, #0 - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x9c - pop {r4, r5, pc} - nop -_0223FD08: .word 0x02245E24 -_0223FD0C: .word 0x02245E9C -_0223FD10: .word 0x02245EB8 -_0223FD14: .word 0x02245E80 -_0223FD18: .word 0x02245E48 -_0223FD1C: .word 0x02245E64 - thumb_func_end ov94_0223FC08 - - thumb_func_start ov94_0223FD20 -ov94_0223FD20: ; 0x0223FD20 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_0223FD20 - - thumb_func_start ov94_0223FD4C -ov94_0223FD4C: ; 0x0223FD4C - push {r4, r5, r6, lr} - sub sp, #0x10 - add r6, r0, #0 - ldr r5, [r6, #4] - mov r0, #0x68 - mov r1, #0x3e - bl sub_02006C24 - mov r1, #0x60 - str r1, [sp] - mov r1, #0x3e - mov r2, #0 - str r1, [sp, #4] - mov r1, #2 - add r3, r2, #0 - add r4, r0, #0 - bl sub_02007130 - mov r0, #1 - lsl r0, r0, #8 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #5 - mov r2, #4 - mov r3, #0 - bl sub_02007130 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [r6, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r5, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0xc - add r2, r5, #0 - bl sub_020070E8 - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x18 - add r2, r5, #0 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - add r0, r4, #0 - mov r1, #0x1d - add r2, r5, #0 - mov r3, #2 - bl sub_0200710C - add r0, r4, #0 - bl sub_02006CA8 - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov94_0223FD4C - - thumb_func_start ov94_0223FE24 -ov94_0223FE24: ; 0x0223FE24 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - ldr r2, _0223FFA8 ; =0x00000D54 - add r5, r0, #0 - add r0, sp, #0 - add r1, r5, #0 - add r2, r5, r2 - mov r3, #1 - bl ov94_0223C300 - ldr r0, _0223FFAC ; =0x00000116 - ldrh r1, [r5, r0] - lsl r2, r1, #2 - ldr r1, _0223FFB0 ; =0x02245ED4 - ldrh r1, [r1, r2] - lsl r1, r1, #0xc - str r1, [sp, #8] - ldrh r0, [r5, r0] - lsl r1, r0, #2 - ldr r0, _0223FFB4 ; =0x02245ED6 - ldrh r0, [r0, r1] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0x37 - lsl r1, r1, #6 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #4 - bl sub_02021D6C - ldr r0, _0223FFAC ; =0x00000116 - ldrh r0, [r5, r0] - cmp r0, #0x1f - beq _0223FE7E - cmp r0, #5 - bhi _0223FE8C -_0223FE7E: - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021E80 - b _0223FE98 -_0223FE8C: - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021E80 -_0223FE98: - ldr r6, _0223FFB0 ; =0x02245ED4 - mov r7, #0 - add r4, r5, #0 -_0223FE9E: - ldrh r0, [r6] - lsl r0, r0, #0xc - str r0, [sp, #8] - ldrh r0, [r6, #2] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - mov r0, #0x14 - str r0, [sp, #0x24] - add r0, sp, #0 - bl sub_02021AA0 - ldr r1, _0223FFB8 ; =0x00000DC8 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - add r1, r7, #6 - bl sub_02021D6C - ldr r0, _0223FFB8 ; =0x00000DC8 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_02021E80 - add r7, r7, #1 - add r6, r6, #4 - add r4, r4, #4 - cmp r7, #0x1e - blt _0223FE9E - ldr r6, _0223FFB0 ; =0x02245ED4 - mov r7, #0 - add r4, r5, #0 -_0223FEDC: - ldrh r0, [r6] - add r0, r0, #4 - lsl r0, r0, #0xc - str r0, [sp, #8] - ldrh r0, [r6, #2] - add r0, r0, #6 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - mov r0, #0xa - str r0, [sp, #0x24] - add r0, sp, #0 - bl sub_02021AA0 - mov r1, #0x39 - lsl r1, r1, #6 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - mov r1, #0x28 - bl sub_02021D6C - mov r0, #0x39 - lsl r0, r0, #6 - ldr r0, [r4, r0] - mov r1, #1 - bl sub_02021E80 - add r7, r7, #1 - add r6, r6, #4 - add r4, r4, #4 - cmp r7, #0x1e - blt _0223FEDC - ldr r6, _0223FFB0 ; =0x02245ED4 - mov r7, #0 - add r4, r5, #0 -_0223FF22: - ldrh r0, [r6] - add r0, #0xc - lsl r0, r0, #0xc - str r0, [sp, #8] - ldrh r0, [r6, #2] - add r0, r0, #6 - lsl r0, r0, #0xc - str r0, [sp, #0xc] - mov r0, #0xa - str r0, [sp, #0x24] - add r0, sp, #0 - bl sub_02021AA0 - ldr r1, _0223FFBC ; =0x00000EB8 - str r0, [r4, r1] - add r0, r1, #0 - ldr r0, [r4, r0] - mov r1, #0x2a - bl sub_02021D6C - ldr r0, _0223FFBC ; =0x00000EB8 - mov r1, #1 - ldr r0, [r4, r0] - bl sub_02021E80 - add r7, r7, #1 - add r6, r6, #4 - add r4, r4, #4 - cmp r7, #6 - blt _0223FF22 - ldr r4, _0223FFC0 ; =0x02245E1C - ldr r7, _0223FFC4 ; =0x00000EF4 - mov r6, #0 -_0223FF64: - ldrh r0, [r4] - lsl r0, r0, #0xc - str r0, [sp, #8] - ldrh r0, [r4, #2] - lsl r0, r0, #0xc - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - ldr r1, _0223FFC4 ; =0x00000EF4 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, _0223FFC4 ; =0x00000EF4 - add r1, r6, #0 - ldr r0, [r5, r0] - add r1, #0x26 - bl sub_02021D6C - ldr r0, [r5, r7] - mov r1, #1 - bl sub_02021E80 - add r6, r6, #1 - add r4, r4, #4 - add r5, r5, #4 - cmp r6, #2 - blt _0223FF64 - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_0223FFA8: .word 0x00000D54 -_0223FFAC: .word 0x00000116 -_0223FFB0: .word 0x02245ED4 -_0223FFB4: .word 0x02245ED6 -_0223FFB8: .word 0x00000DC8 -_0223FFBC: .word 0x00000EB8 -_0223FFC0: .word 0x02245E1C -_0223FFC4: .word 0x00000EF4 - thumb_func_end ov94_0223FE24 - - thumb_func_start ov94_0223FFC8 -ov94_0223FFC8: ; 0x0223FFC8 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r7, _0224001C ; =0x00000EF4 - mov r6, #0 - add r4, r5, #0 -_0223FFD2: - ldr r0, [r4, r7] - bl sub_02021BD4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #2 - blt _0223FFD2 - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r5, r0] - bl sub_02021BD4 - mov r7, #0x39 - mov r6, #0 - add r4, r5, #0 - lsl r7, r7, #6 -_0223FFF2: - ldr r0, _02240020 ; =0x00000DC8 - ldr r0, [r4, r0] - bl sub_02021BD4 - ldr r0, [r4, r7] - bl sub_02021BD4 - add r6, r6, #1 - add r4, r4, #4 - cmp r6, #0x1e - blt _0223FFF2 - ldr r6, _02240024 ; =0x00000EB8 - mov r4, #0 -_0224000C: - ldr r0, [r5, r6] - bl sub_02021BD4 - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #6 - blt _0224000C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224001C: .word 0x00000EF4 -_02240020: .word 0x00000DC8 -_02240024: .word 0x00000EB8 - thumb_func_end ov94_0223FFC8 - - thumb_func_start ov94_02240028 -ov94_02240028: ; 0x02240028 - push {r3, r4, lr} - sub sp, #0x14 - mov r3, #1 - add r4, r0, #0 - str r3, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - ldr r1, _0224015C ; =0x00000F1C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _0224015C ; =0x00000F1C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r2, #0 - ldr r0, _02240160 ; =0x000F0E00 - str r2, [sp] - str r0, [sp, #4] - ldr r1, _02240164 ; =0x00000BB4 - ldr r0, _0224015C ; =0x00000F1C - ldr r1, [r4, r1] - add r0, r4, r0 - mov r3, #1 - bl ov94_02245900 - mov r1, #3 - str r1, [sp] - mov r0, #0xd - str r0, [sp, #4] - str r1, [sp, #8] - str r0, [sp, #0xc] - mov r0, #0x60 - ldr r1, _02240168 ; =0x00000F2C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #5 - bl sub_0201A7E8 - ldr r0, _02240168 ; =0x00000F2C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - ldr r0, _02240168 ; =0x00000F2C - add r0, r4, r0 - bl sub_0201A954 - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - ldr r1, _0224016C ; =0x00000EFC - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - add r0, #0xfc - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _0224016C ; =0x00000EFC - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02240170 ; =0x0000013F - ldr r1, _02240174 ; =0x0000103C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, _02240174 ; =0x0000103C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #0x15 - str r0, [sp] - mov r0, #6 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - ldr r0, _02240178 ; =0x00000165 - ldr r1, _0224017C ; =0x00000F4C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #1 - mov r3, #0x19 - bl sub_0201A7E8 - ldr r0, _0224017C ; =0x00000F4C - mov r1, #6 - add r0, r4, r0 - bl sub_0201ADA4 - mov r3, #1 - ldr r0, _02240180 ; =0x00010306 - str r3, [sp] - str r0, [sp, #4] - ldr r1, _02240184 ; =0x00000BAC - ldr r0, _0224017C ; =0x00000F4C - ldr r1, [r4, r1] - add r0, r4, r0 - mov r2, #0 - bl ov94_02245900 - mov r1, #0xd - str r1, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #6 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, _02240188 ; =0x00000171 - ldr r1, _0224018C ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - add sp, #0x14 - pop {r3, r4, pc} - nop -_0224015C: .word 0x00000F1C -_02240160: .word 0x000F0E00 -_02240164: .word 0x00000BB4 -_02240168: .word 0x00000F2C -_0224016C: .word 0x00000EFC -_02240170: .word 0x0000013F -_02240174: .word 0x0000103C -_02240178: .word 0x00000165 -_0224017C: .word 0x00000F4C -_02240180: .word 0x00010306 -_02240184: .word 0x00000BAC -_02240188: .word 0x00000171 -_0224018C: .word 0x00000F3C - thumb_func_end ov94_02240028 - - thumb_func_start ov94_02240190 -ov94_02240190: ; 0x02240190 - push {r4, lr} - add r4, r0, #0 - ldr r0, _022401C8 ; =0x0000103C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _022401CC ; =0x00000F4C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _022401D0 ; =0x00000F3C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _022401D4 ; =0x00000EFC - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _022401D8 ; =0x00000F2C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _022401DC ; =0x00000F1C - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - nop -_022401C8: .word 0x0000103C -_022401CC: .word 0x00000F4C -_022401D0: .word 0x00000F3C -_022401D4: .word 0x00000EFC -_022401D8: .word 0x00000F2C -_022401DC: .word 0x00000F1C - thumb_func_end ov94_02240190 - - thumb_func_start ov94_022401E0 -ov94_022401E0: ; 0x022401E0 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x12 - mov r1, #0x3e - bl sub_02023790 - ldr r1, _02240250 ; =0x00000BA8 - str r0, [r4, r1] - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r4, r1] - ldr r0, [r4, #0x24] - cmp r0, #5 - bne _02240214 - sub r1, #0x1c - ldr r0, [r4, r1] - mov r1, #0x15 - bl sub_0200B1EC - ldr r1, _02240254 ; =0x00000BB4 - str r0, [r4, r1] - b _02240226 -_02240214: - cmp r0, #6 - bne _02240226 - sub r1, #0x1c - ldr r0, [r4, r1] - mov r1, #0x11 - bl sub_0200B1EC - ldr r1, _02240254 ; =0x00000BB4 - str r0, [r4, r1] -_02240226: - ldr r0, _02240258 ; =0x00000B94 - mov r1, #0x67 - ldr r0, [r4, r0] - bl sub_0200B1EC - ldr r1, _0224025C ; =0x00000BAC - str r0, [r4, r1] - ldr r0, _02240260 ; =0x00000116 - ldrh r1, [r4, r0] - cmp r1, #0x1e - bne _02240240 - mov r1, #0 - strh r1, [r4, r0] -_02240240: - mov r0, #0x3e - mov r1, #0x78 - bl sub_02018144 - ldr r1, _02240264 ; =0x000010A8 - str r0, [r4, r1] - pop {r4, pc} - nop -_02240250: .word 0x00000BA8 -_02240254: .word 0x00000BB4 -_02240258: .word 0x00000B94 -_0224025C: .word 0x00000BAC -_02240260: .word 0x00000116 -_02240264: .word 0x000010A8 - thumb_func_end ov94_022401E0 - - thumb_func_start ov94_02240268 -ov94_02240268: ; 0x02240268 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02240298 ; =0x000010A8 - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r0, _0224029C ; =0x00000BA8 - ldr r0, [r4, r0] - bl sub_020237BC - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _022402A0 ; =0x00000BAC - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _022402A4 ; =0x00000BB4 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 -_02240298: .word 0x000010A8 -_0224029C: .word 0x00000BA8 -_022402A0: .word 0x00000BAC -_022402A4: .word 0x00000BB4 - thumb_func_end ov94_02240268 - - thumb_func_start ov94_022402A8 -ov94_022402A8: ; 0x022402A8 - push {r4, lr} - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _022402B8 - mov r0, #1 - str r0, [r4, #0x2c] -_022402B8: - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_022402A8 - - thumb_func_start ov94_022402BC -ov94_022402BC: ; 0x022402BC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - bl ov94_022404F0 - ldr r0, [r5, #0x24] - cmp r0, #5 - bne _022403CC - ldr r0, _022404E0 ; =0x021BF67C - ldr r2, [r0, #0x48] - mov r0, #2 - tst r0, r2 - beq _022402EC - add r0, r5, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r5, #0x2c] - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - b _022404DA -_022402EC: - mov r1, #1 - add r0, r2, #0 - tst r0, r1 - beq _02240336 - ldr r0, _022404E8 ; =0x00000116 - ldrh r0, [r5, r0] - cmp r0, #0x1e - bne _02240310 - add r0, r5, #0 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r5, #0x2c] - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - b _022404DA -_02240310: - cmp r0, #0x1f - beq _02240336 - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_022412F4 - cmp r0, #1 - beq _02240338 - cmp r0, #2 - beq _022403AE -_02240336: - b _022404DA -_02240338: - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_0224121C - cmp r0, #0 - beq _02240390 - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - add r2, r0, #0 - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_0200B5CC - ldr r0, _022404EC ; =0x00000F0F - mov r3, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x16 - mov r2, #1 - str r3, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #3 - mov r2, #7 - bl ov94_0223C3F4 - b _022404DA -_02240390: - ldr r0, _022404EC ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x1a - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _022404DA -_022403AE: - ldr r0, _022404EC ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x1b - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _022404DA -_022403CC: - cmp r0, #6 - bne _02240432 - ldr r0, _022404E0 ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #2 - tst r0, r1 - beq _022403F0 - add r0, r5, #0 - mov r1, #3 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r5, #0x2c] - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - b _022404DA -_022403F0: - mov r0, #1 - tst r0, r1 - beq _022404DA - ldr r2, _022404E8 ; =0x00000116 - ldrh r3, [r5, r2] - cmp r3, #0x1e - bne _02240414 - add r0, r5, #0 - mov r1, #3 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r5, #0x2c] - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - b _022404DA -_02240414: - cmp r3, #0x1f - beq _022404DA - ldr r1, [r5, #0] - sub r2, r2, #2 - ldr r0, [r1, #8] - ldrh r2, [r5, r2] - ldr r1, [r1, #0xc] - bl ov94_022412F4 - cmp r0, #0 - beq _022404D4 - cmp r0, #1 - beq _02240434 - cmp r0, #2 - beq _022404D4 -_02240432: - b _022404DA -_02240434: - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - mov r2, #0x12 - lsl r2, r2, #4 - mov r1, #0xd1 - ldr r3, [r5, r2] - lsl r1, r1, #2 - add r2, r2, #4 - add r1, r5, r1 - mul r2, r3 - add r1, r1, r2 - add r4, r0, #0 - bl ov94_02241384 - cmp r0, #0 - beq _022404CC - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_0224121C - cmp r0, #0 - beq _022404AE - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - add r2, r4, #0 - bl sub_0200B5CC - ldr r0, _022404EC ; =0x00000F0F - mov r3, #0 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x12 - mov r2, #1 - str r3, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #3 - mov r2, #9 - bl ov94_0223C3F4 - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - b _022404DA -_022404AE: - ldr r0, _022404EC ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x1a - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _022404DA -_022404CC: - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 - b _022404DA -_022404D4: - ldr r0, _022404E4 ; =0x000005DC - bl sub_02005748 -_022404DA: - mov r0, #3 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022404E0: .word 0x021BF67C -_022404E4: .word 0x000005DC -_022404E8: .word 0x00000116 -_022404EC: .word 0x00000F0F - thumb_func_end ov94_022402BC - - thumb_func_start ov94_022404F0 -ov94_022404F0: ; 0x022404F0 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _022405B4 ; =0x021BF67C - mov r4, #0 - ldr r0, [r0, #0x48] - mov r1, #0x40 - add r6, r4, #0 - tst r1, r0 - beq _02240506 - mov r6, #1 - b _02240522 -_02240506: - mov r1, #0x80 - tst r1, r0 - beq _02240510 - mov r6, #2 - b _02240522 -_02240510: - mov r1, #0x20 - tst r1, r0 - beq _0224051A - mov r6, #3 - b _02240522 -_0224051A: - mov r1, #0x10 - tst r0, r1 - beq _02240522 - mov r6, #4 -_02240522: - cmp r6, #0 - beq _02240568 - ldr r0, _022405B8 ; =0x00000116 - ldr r1, _022405BC ; =0x02245F54 - ldrh r3, [r5, r0] - sub r6, r6, #1 - lsl r2, r3, #2 - add r1, r1, r2 - ldrb r2, [r6, r1] - cmp r2, r3 - beq _02240568 - cmp r2, #0x63 - beq _02240540 - cmp r2, #0x65 - bne _02240564 -_02240540: - mov r0, #0x45 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - mov r1, #0x13 - sub r2, #0x64 - bl ov94_022405CC - mov r1, #0x45 - lsl r1, r1, #2 - strh r0, [r5, r1] - ldrh r1, [r5, r1] - add r0, r5, #0 - bl ov94_02240FA0 - ldr r0, _022405C0 ; =0x000005DC - bl sub_02005748 - b _02240568 -_02240564: - mov r4, #1 - strh r2, [r5, r0] -_02240568: - cmp r4, #0 - beq _0224058A - ldr r0, _022405C0 ; =0x000005DC - bl sub_02005748 - ldr r0, _022405B8 ; =0x00000116 - ldr r1, _022405C4 ; =0x02245ED4 - ldrh r0, [r5, r0] - ldr r2, _022405C8 ; =0x02245ED6 - lsl r3, r0, #2 - mov r0, #0x37 - lsl r0, r0, #6 - ldrh r1, [r1, r3] - ldrh r2, [r2, r3] - ldr r0, [r5, r0] - bl ov94_0223C3FC -_0224058A: - ldr r0, _022405B8 ; =0x00000116 - ldrh r0, [r5, r0] - cmp r0, #0x1f - beq _02240596 - cmp r0, #5 - bhi _022405A4 -_02240596: - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #0 - bl sub_02021E80 - pop {r4, r5, r6, pc} -_022405A4: - mov r0, #0x37 - lsl r0, r0, #6 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021E80 - pop {r4, r5, r6, pc} - nop -_022405B4: .word 0x021BF67C -_022405B8: .word 0x00000116 -_022405BC: .word 0x02245F54 -_022405C0: .word 0x000005DC -_022405C4: .word 0x02245ED4 -_022405C8: .word 0x02245ED6 - thumb_func_end ov94_022404F0 - - thumb_func_start ov94_022405CC -ov94_022405CC: ; 0x022405CC - add r0, r0, r2 - bpl _022405D4 - sub r0, r1, #1 - bx lr -_022405D4: - cmp r0, r1 - bne _022405DA - mov r0, #0 -_022405DA: - bx lr - thumb_func_end ov94_022405CC - - thumb_func_start ov94_022405DC -ov94_022405DC: ; 0x022405DC - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0 - add r2, sp, #8 - strb r0, [r2, #8] - mov r0, #1 - strb r0, [r2, #9] - mov r0, #3 - strb r0, [r2, #0xa] - ldrb r3, [r2, #0xb] - mov r1, #0xf - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0x30 - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0xc0 - bic r3, r1 - mov r1, #0x3e - strb r3, [r2, #0xb] - bl sub_02013A04 - ldr r1, _02240678 ; =0x0000106C - mov r2, #0x5e - str r0, [r4, r1] - ldr r0, [r4, r1] - ldr r1, _0224067C ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl sub_02013A4C - ldr r0, _02240678 ; =0x0000106C - ldr r1, _0224067C ; =0x00000B94 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - mov r2, #0x5f - mov r3, #2 - bl sub_02013A4C - ldr r0, _02240678 ; =0x0000106C - ldr r1, _0224067C ; =0x00000B94 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - mov r2, #0x60 - mov r3, #3 - bl sub_02013A4C - ldr r0, _02240678 ; =0x0000106C - mov r1, #1 - ldr r0, [r4, r0] - mov r2, #0x1f - str r0, [sp, #8] - ldr r0, _02240680 ; =0x00000F3C - mov r3, #0xb - add r0, r4, r0 - str r0, [sp, #0xc] - bl sub_0200DC48 - mov r0, #0x3e - str r0, [sp] - mov r0, #2 - mov r2, #0 - str r0, [sp, #4] - add r0, sp, #8 - mov r1, #9 - add r3, r2, #0 - bl sub_02001B7C - ldr r1, _02240684 ; =0x00001074 - str r0, [r4, r1] - mov r0, #8 - str r0, [r4, #0x2c] - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_02240678: .word 0x0000106C -_0224067C: .word 0x00000B94 -_02240680: .word 0x00000F3C -_02240684: .word 0x00001074 - thumb_func_end ov94_022405DC - - thumb_func_start ov94_02240688 -ov94_02240688: ; 0x02240688 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _02240818 ; =0x00001074 - ldr r0, [r5, r0] - bl sub_02001BE0 - cmp r0, #3 - bhi _022406AA - cmp r0, #1 - blo _022406A8 - beq _022406B6 - cmp r0, #2 - beq _022406E2 - cmp r0, #3 - beq _022406B2 -_022406A8: - b _02240810 -_022406AA: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - bne _022406B4 -_022406B2: - b _022407E6 -_022406B4: - b _02240810 -_022406B6: - ldr r0, _02240818 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _0224081C ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02240820 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - mov r0, #2 - str r0, [r5, #0x2c] - add r0, r5, #0 - mov r1, #8 - mov r2, #5 - bl ov94_0223C4C0 - b _02240810 -_022406E2: - ldr r0, _02240818 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _0224081C ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02240820 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - add r4, r0, #0 - bl ov94_0224123C - cmp r0, #0 - beq _0224073A - ldr r0, _02240824 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x25 - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _02240810 -_0224073A: - add r0, r4, #0 - bl ov94_02241278 - cmp r0, #0 - beq _02240762 - ldr r0, _02240824 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0xaa - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _02240810 -_02240762: - add r0, r4, #0 - bl ov94_022412C8 - cmp r0, #0 - beq _0224078A - ldr r0, _02240824 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0xab - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _02240810 -_0224078A: - mov r0, #0x45 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - mov r4, #0 - bl ov94_022411D0 - cmp r0, #0 - beq _022407B8 - ldr r1, _02240828 ; =0x00000116 - ldr r0, [r5, #0] - ldrh r1, [r5, r1] - ldr r0, [r0, #8] - bl sub_0207A0FC - mov r1, #0xa2 - add r2, r4, #0 - bl sub_02074470 - cmp r0, #0 - beq _022407B8 - mov r0, #0xe - mov r4, #1 - str r0, [r5, #0x2c] -_022407B8: - cmp r4, #0 - bne _02240810 - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r5, r1] - mov r0, #2 - str r0, [r5, #0x2c] - add r0, r5, #0 - mov r1, #6 - mov r2, #0 - bl ov94_0223C4C0 - b _02240810 -_022407E6: - ldr r0, _02240818 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _0224081C ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02240820 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _0224082C ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - mov r0, #1 - str r0, [r5, #0x2c] -_02240810: - mov r0, #3 - add sp, #8 - pop {r3, r4, r5, pc} - nop -_02240818: .word 0x00001074 -_0224081C: .word 0x0000106C -_02240820: .word 0x00000F3C -_02240824: .word 0x00000F0F -_02240828: .word 0x00000116 -_0224082C: .word 0x00000EFC - thumb_func_end ov94_02240688 - - thumb_func_start ov94_02240830 -ov94_02240830: ; 0x02240830 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0 - add r2, sp, #8 - strb r0, [r2, #8] - mov r0, #1 - strb r0, [r2, #9] - mov r0, #3 - strb r0, [r2, #0xa] - ldrb r3, [r2, #0xb] - mov r1, #0xf - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0x30 - bic r3, r1 - strb r3, [r2, #0xb] - ldrb r3, [r2, #0xb] - mov r1, #0xc0 - bic r3, r1 - mov r1, #0x3e - strb r3, [r2, #0xb] - bl sub_02013A04 - ldr r1, _022408D8 ; =0x0000106C - mov r2, #0x54 - str r0, [r4, r1] - ldr r0, [r4, r1] - ldr r1, _022408DC ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl sub_02013A4C - ldr r0, _022408D8 ; =0x0000106C - ldr r1, _022408DC ; =0x00000B94 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - mov r2, #0x55 - mov r3, #2 - bl sub_02013A4C - ldr r0, _022408D8 ; =0x0000106C - ldr r1, _022408DC ; =0x00000B94 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - mov r2, #0x56 - mov r3, #3 - bl sub_02013A4C - ldr r0, _022408D8 ; =0x0000106C - mov r1, #0xf - ldr r0, [r4, r0] - str r0, [sp, #8] - ldr r0, _022408E0 ; =0x00000F3C - add r0, r4, r0 - str r0, [sp, #0xc] - bl sub_0201ADA4 - ldr r0, _022408E0 ; =0x00000F3C - mov r1, #1 - add r0, r4, r0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - mov r0, #0x3e - str r0, [sp] - mov r0, #2 - mov r2, #0 - str r0, [sp, #4] - add r0, sp, #8 - mov r1, #9 - add r3, r2, #0 - bl sub_02001B7C - ldr r1, _022408E4 ; =0x00001074 - str r0, [r4, r1] - mov r0, #0xa - str r0, [r4, #0x2c] - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - nop -_022408D8: .word 0x0000106C -_022408DC: .word 0x00000B94 -_022408E0: .word 0x00000F3C -_022408E4: .word 0x00001074 - thumb_func_end ov94_02240830 - - thumb_func_start ov94_022408E8 -ov94_022408E8: ; 0x022408E8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, _02240A54 ; =0x00001074 - ldr r0, [r5, r0] - bl sub_02001BE0 - cmp r0, #3 - bhi _0224090A - cmp r0, #1 - blo _02240908 - beq _02240916 - cmp r0, #2 - beq _02240942 - cmp r0, #3 - beq _02240912 -_02240908: - b _02240A4E -_0224090A: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - bne _02240914 -_02240912: - b _02240A24 -_02240914: - b _02240A4E -_02240916: - ldr r0, _02240A54 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _02240A58 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02240A5C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - mov r0, #2 - str r0, [r5, #0x2c] - add r0, r5, #0 - mov r1, #8 - mov r2, #6 - bl ov94_0223C4C0 - b _02240A4E -_02240942: - ldr r0, _02240A54 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _02240A58 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02240A5C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r5, #0] - ldrh r2, [r5, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r5, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - add r4, r0, #0 - bl ov94_0224123C - cmp r0, #0 - beq _0224099A - ldr r0, _02240A60 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0x25 - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _02240A4E -_0224099A: - add r0, r4, #0 - bl ov94_02241278 - cmp r0, #0 - beq _022409C2 - ldr r0, _02240A60 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0xaa - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _02240A4E -_022409C2: - add r0, r4, #0 - bl ov94_022412C8 - cmp r0, #0 - beq _022409EA - ldr r0, _02240A60 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - mov r1, #0xab - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r5, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - b _02240A4E -_022409EA: - mov r0, #0x45 - lsl r0, r0, #2 - ldrh r0, [r5, r0] - mov r4, #0 - bl ov94_022411D0 - cmp r0, #0 - beq _02240A18 - ldr r1, _02240A64 ; =0x00000116 - ldr r0, [r5, #0] - ldrh r1, [r5, r1] - ldr r0, [r0, #8] - bl sub_0207A0FC - mov r1, #0xa2 - add r2, r4, #0 - bl sub_02074470 - cmp r0, #0 - beq _02240A18 - mov r0, #0xb - mov r4, #1 - str r0, [r5, #0x2c] -_02240A18: - cmp r4, #0 - bne _02240A4E - add r0, r5, #0 - bl ov94_02240BB0 - b _02240A4E -_02240A24: - ldr r0, _02240A54 ; =0x00001074 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02001BC4 - ldr r0, _02240A58 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02240A5C ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _02240A68 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - mov r0, #1 - str r0, [r5, #0x2c] -_02240A4E: - mov r0, #3 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02240A54: .word 0x00001074 -_02240A58: .word 0x0000106C -_02240A5C: .word 0x00000F3C -_02240A60: .word 0x00000F0F -_02240A64: .word 0x00000116 -_02240A68: .word 0x00000EFC - thumb_func_end ov94_022408E8 - - thumb_func_start ov94_02240A6C -ov94_02240A6C: ; 0x02240A6C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - beq _02240A7C - cmp r0, #8 - bne _02240A9C -_02240A7C: - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, _02240AC0 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - b _02240AB4 -_02240A9C: - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 -_02240AB4: - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - nop -_02240AC0: .word 0x000010B0 - thumb_func_end ov94_02240A6C - - thumb_func_start ov94_02240AC4 -ov94_02240AC4: ; 0x02240AC4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _02240AE0 ; =0x000001AD - mov r1, #0xf - bl ov94_0223C3C0 - ldr r1, _02240AE4 ; =0x00001070 - str r0, [r4, r1] - mov r0, #6 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_02240AE0: .word 0x000001AD -_02240AE4: .word 0x00001070 - thumb_func_end ov94_02240AC4 - - thumb_func_start ov94_02240AE8 -ov94_02240AE8: ; 0x02240AE8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02240B1C ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02240B18 - sub r1, r1, #1 - cmp r0, r1 - bne _02240B0A - mov r0, #0 - str r0, [r4, #0x2c] - b _02240B18 -_02240B0A: - mov r0, #2 - mov r1, #0 - str r0, [r4, #0x2c] - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 -_02240B18: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02240B1C: .word 0x00001070 - thumb_func_end ov94_02240AE8 - - thumb_func_start ov94_02240B20 -ov94_02240B20: ; 0x02240B20 - push {r4, lr} - sub sp, #8 - ldr r1, _02240B48 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r2, #1 - mov r1, #0x19 - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r4, #0 - mov r1, #3 - mov r2, #0xc - bl ov94_0223C3F4 - mov r0, #3 - add sp, #8 - pop {r4, pc} - nop -_02240B48: .word 0x00000F0F - thumb_func_end ov94_02240B20 - - thumb_func_start ov94_02240B4C -ov94_02240B4C: ; 0x02240B4C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _02240B68 ; =0x000001AD - mov r1, #0xd - bl ov94_0223C3C0 - ldr r1, _02240B6C ; =0x00001070 - str r0, [r4, r1] - mov r0, #0xd - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_02240B68: .word 0x000001AD -_02240B6C: .word 0x00001070 - thumb_func_end ov94_02240B4C - - thumb_func_start ov94_02240B70 -ov94_02240B70: ; 0x02240B70 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02240BA8 ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02240BA2 - sub r1, r1, #1 - cmp r0, r1 - bne _02240B9C - ldr r0, _02240BAC ; =0x0000103C - mov r1, #0 - add r0, r4, r0 - bl sub_0200E084 - mov r0, #1 - str r0, [r4, #0x2c] - b _02240BA2 -_02240B9C: - add r0, r4, #0 - bl ov94_02240BB0 -_02240BA2: - mov r0, #3 - pop {r4, pc} - nop -_02240BA8: .word 0x00001070 -_02240BAC: .word 0x0000103C - thumb_func_end ov94_02240B70 - - thumb_func_start ov94_02240BB0 -ov94_02240BB0: ; 0x02240BB0 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - mov r0, #0x95 - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, r0, #4 - mul r0, r1 - add r0, r2, r0 - bl ov94_02241498 - cmp r0, #0 - beq _02240C08 - mov r0, #0x45 - lsl r0, r0, #2 - ldrh r0, [r4, r0] - cmp r0, #0x12 - beq _02240C08 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - cmp r0, #6 - bne _02240C08 - ldr r0, _02240C50 ; =0x00000F0F - mov r2, #1 - str r0, [sp] - add r0, r4, #0 - mov r1, #0x1c - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r4, #0 - mov r1, #4 - mov r2, #1 - bl ov94_0223C3F4 - add sp, #8 - mov r0, #0 - pop {r4, pc} -_02240C08: - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r4, #0] - ldrh r2, [r4, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r4, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #2 - str r0, [r4, #0x2c] - ldr r0, _02240C54 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #7 - mov r2, #9 - bl ov94_0223C4C0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r4, #0 - bl ov94_022413BC - mov r0, #0x47 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #1 - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_02240C50: .word 0x00000F0F -_02240C54: .word 0x000010B0 - thumb_func_end ov94_02240BB0 - - thumb_func_start ov94_02240C58 -ov94_02240C58: ; 0x02240C58 - push {r4, lr} - sub sp, #8 - ldr r1, _02240C80 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r2, #1 - mov r1, #0x19 - mov r3, #0 - str r2, [sp, #4] - bl ov94_02240D58 - add r0, r4, #0 - mov r1, #3 - mov r2, #0xf - bl ov94_0223C3F4 - mov r0, #3 - add sp, #8 - pop {r4, pc} - nop -_02240C80: .word 0x00000F0F - thumb_func_end ov94_02240C58 - - thumb_func_start ov94_02240C84 -ov94_02240C84: ; 0x02240C84 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _02240CA0 ; =0x000001AD - mov r1, #0xd - bl ov94_0223C3C0 - ldr r1, _02240CA4 ; =0x00001070 - str r0, [r4, r1] - mov r0, #0x10 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_02240CA0: .word 0x000001AD -_02240CA4: .word 0x00001070 - thumb_func_end ov94_02240C84 - - thumb_func_start ov94_02240CA8 -ov94_02240CA8: ; 0x02240CA8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02240D00 ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02240CFC - sub r1, r1, #1 - cmp r0, r1 - bne _02240CD4 - ldr r0, _02240D04 ; =0x0000103C - mov r1, #0 - add r0, r4, r0 - bl sub_0200E084 - mov r0, #1 - str r0, [r4, #0x2c] - b _02240CFC -_02240CD4: - mov r3, #0x45 - lsl r3, r3, #2 - ldr r1, [r4, #0] - ldrh r2, [r4, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r4, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - mov r1, #0x46 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #2 - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - bl ov94_0223C4C0 -_02240CFC: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02240D00: .word 0x00001070 -_02240D04: .word 0x0000103C - thumb_func_end ov94_02240CA8 - - thumb_func_start ov94_02240D08 -ov94_02240D08: ; 0x02240D08 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02240D24 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02240D20 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_02240D20: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02240D24: .word 0x00000BE4 - thumb_func_end ov94_02240D08 - - thumb_func_start ov94_02240D28 -ov94_02240D28: ; 0x02240D28 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02240D50 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02240D4A - ldr r0, _02240D54 ; =0x0000103C - mov r1, #0 - add r0, r4, r0 - bl sub_0200E084 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_02240D4A: - mov r0, #3 - pop {r4, pc} - nop -_02240D50: .word 0x00000BE4 -_02240D54: .word 0x0000103C - thumb_func_end ov94_02240D28 - - thumb_func_start ov94_02240D58 -ov94_02240D58: ; 0x02240D58 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _02240DC0 ; =0x00000B94 - add r6, r2, #0 - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0xb9 - add r7, r0, #0 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, #0x20 - ldr r1, [r5, r1] - add r2, r7, #0 - bl sub_0200C388 - ldr r0, [sp, #0x24] - cmp r0, #0 - bne _02240D84 - ldr r0, _02240DC4 ; =0x00000EFC - b _02240D86 -_02240D84: - ldr r0, _02240DC8 ; =0x0000103C -_02240D86: - add r4, r5, r0 - add r0, r4, #0 - mov r1, #0xf - bl sub_0201ADA4 - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r6, [sp, #4] - mov r2, #0xbb - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r4, #0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _02240DCC ; =0x00000BE4 - str r0, [r5, r1] - add r0, r7, #0 - bl sub_020237BC - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02240DC0: .word 0x00000B94 -_02240DC4: .word 0x00000EFC -_02240DC8: .word 0x0000103C -_02240DCC: .word 0x00000BE4 - thumb_func_end ov94_02240D58 - - thumb_func_start ov94_02240DD0 -ov94_02240DD0: ; 0x02240DD0 - push {r3, r4, r5, lr} - add r5, r2, #0 - add r2, r3, #0 - bl sub_02006CB8 - add r4, r0, #0 - beq _02240DF2 - add r1, r5, #0 - bl sub_020A7164 - cmp r0, #0 - bne _02240DF2 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #0 - pop {r3, r4, r5, pc} -_02240DF2: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov94_02240DD0 - - thumb_func_start ov94_02240DF8 -ov94_02240DF8: ; 0x02240DF8 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - add r5, r1, #0 - add r6, r2, #0 - add r1, r6, #0 - add r2, r5, #0 - str r0, [sp] - add r7, r3, #0 - ldr r4, [sp, #0x28] - bl sub_02079D8C - add r1, r0, #0 - ldr r0, [sp, #0x24] - add r2, sp, #8 - mov r3, #0x3e - bl ov94_02240DD0 - str r0, [sp, #4] - ldr r0, [sp, #8] - add r1, r4, #0 - mov r2, #2 - ldr r0, [r0, #0x14] - add r1, #0xc - lsl r2, r2, #8 - bl sub_020C4C14 - lsl r0, r7, #4 - add r0, #0xc - lsl r0, r0, #5 - str r0, [r4, #0] - ldr r0, [sp, #0x20] - add r1, r5, #0 - str r0, [r4, #8] - ldr r0, [sp] - add r2, r6, #0 - bl sub_02079EDC - add r0, r0, #3 - str r0, [r4, #4] - ldr r0, [sp, #4] - bl sub_020181C4 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - thumb_func_end ov94_02240DF8 - - thumb_func_start ov94_02240E50 -ov94_02240E50: ; 0x02240E50 - push {r4, lr} - add r4, r1, #0 - bl sub_02075B40 - strb r0, [r4, #3] - pop {r4, pc} - thumb_func_end ov94_02240E50 - - thumb_func_start ov94_02240E5C -ov94_02240E5C: ; 0x02240E5C - push {r3, r4, r5, r6, r7, lr} - ldr r1, _02240EA8 ; =0x000010B4 - mov r6, #2 - lsl r6, r6, #8 - add r7, r6, #0 - ldr r5, [r0, r1] - str r0, [sp] - mov r4, #0 - add r7, #0xc -_02240E6E: - ldr r0, [r5, #8] - cmp r0, #0 - beq _02240E92 - add r0, r5, #0 - add r0, #0xc - add r1, r6, #0 - bl sub_020C2C54 - add r0, r5, #0 - ldr r1, [r5, #0] - add r0, #0xc - add r2, r6, #0 - bl sub_020C02BC - ldr r0, [r5, #8] - ldr r1, [r5, #4] - bl sub_02021E90 -_02240E92: - add r4, r4, #1 - add r5, r5, r7 - cmp r4, #0x1e - blt _02240E6E - ldr r1, _02240EA8 ; =0x000010B4 - ldr r0, [sp] - ldr r0, [r0, r1] - bl sub_020181C4 - pop {r3, r4, r5, r6, r7, pc} - nop -_02240EA8: .word 0x000010B4 - thumb_func_end ov94_02240E5C - - thumb_func_start ov94_02240EAC -ov94_02240EAC: ; 0x02240EAC - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - str r1, [sp, #0xc] - add r7, r2, #0 - add r6, r3, #0 - ldr r4, [sp, #0x40] - bl sub_02073D20 - add r0, r5, #0 - mov r1, #0xac - mov r2, #0 - bl sub_02074570 - str r0, [sp, #0x1c] - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - strh r0, [r6] - add r0, r5, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - str r0, [sp, #0x10] - add r0, r5, #0 - mov r1, #0x4c - mov r2, #0 - bl sub_02074570 - str r0, [sp, #0x14] - add r0, r5, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074570 - str r0, [sp, #0x18] - ldrh r0, [r6] - mov r1, #0x6f - mov r2, #0 - strh r0, [r4] - add r0, r5, #0 - bl sub_02074570 - add r0, r0, #1 - strb r0, [r4, #2] - ldr r0, [sp, #0x14] - cmp r0, #0 - beq _02240F16 - mov r0, #0 - strb r0, [r4, #3] -_02240F16: - add r0, r5, #0 - mov r1, #1 - bl sub_02073D48 - ldr r0, [sp, #0x1c] - cmp r0, #0 - beq _02240F84 - ldr r0, [sp, #0xc] - ldr r1, [sp, #0x10] - str r0, [sp] - ldr r0, [sp, #0x3c] - ldr r2, [sp, #0x14] - str r0, [sp, #4] - ldr r0, [sp, #0x44] - ldr r3, [sp, #0x38] - str r0, [sp, #8] - ldrh r0, [r6] - bl ov94_02240DF8 - ldr r0, [sp, #0xc] - mov r1, #1 - bl sub_02021CAC - ldr r0, [sp, #0x18] - cmp r0, #0 - beq _02240F78 - add r0, r7, #0 - mov r1, #1 - bl sub_02021CAC - ldr r0, [sp, #0x18] - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _02240F6C - add r0, r7, #0 - mov r1, #0x29 - bl sub_02021D6C - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_02240F6C: - add r0, r7, #0 - mov r1, #0x28 - bl sub_02021D6C - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_02240F78: - add r0, r7, #0 - mov r1, #0 - bl sub_02021CAC - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} -_02240F84: - ldr r0, [sp, #0xc] - mov r1, #0 - bl sub_02021CAC - add r0, r7, #0 - mov r1, #0 - bl sub_02021CAC - ldr r0, [sp, #0x44] - mov r1, #0 - str r1, [r0, #8] - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov94_02240EAC - - thumb_func_start ov94_02240FA0 -ov94_02240FA0: ; 0x02240FA0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x68 - add r5, r0, #0 - ldr r0, [r5, #0] - str r1, [sp, #0x10] - ldr r0, [r0, #0xc] - ldr r1, _022411A4 ; =0x00003D68 - str r0, [sp, #0x20] - mov r0, #3 - bl sub_02018184 - ldr r1, _022411A8 ; =0x000010B4 - str r0, [sp, #0x18] - str r0, [r5, r1] - mov r0, #0x13 - mov r1, #0x3e - bl sub_02006C24 - str r0, [sp, #0x1c] - ldr r0, [sp, #0x10] - cmp r0, #0 - blt _02241060 - cmp r0, #0x12 - bge _02241060 - ldr r6, _022411AC ; =0x000010A8 - mov r4, #0 -_02240FD4: - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x10] - add r2, r4, #0 - bl sub_02079C9C - ldr r2, [r5, r6] - lsl r1, r4, #2 - add r1, r2, r1 - bl ov94_02240E50 - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x1e - blo _02240FD4 - mov r4, #0 -_02240FF4: - ldr r0, _022411AC ; =0x000010A8 - lsl r6, r4, #2 - ldr r1, [r5, r0] - mov r0, #0 - strh r0, [r1, r6] - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x10] - add r2, r4, #0 - add r7, r5, r6 - bl sub_02079C9C - ldr r1, [sp, #0x1c] - str r4, [sp] - str r1, [sp, #4] - ldr r1, _022411AC ; =0x000010A8 - add r2, r4, #0 - ldr r1, [r5, r1] - add r3, sp, #0x2c - add r1, r1, r6 - str r1, [sp, #8] - mov r1, #0x83 - lsl r1, r1, #2 - mul r2, r1 - ldr r1, [sp, #0x18] - lsl r6, r4, #1 - add r1, r1, r2 - str r1, [sp, #0xc] - ldr r1, _022411B0 ; =0x00000DC8 - mov r2, #0x39 - lsl r2, r2, #6 - ldr r1, [r7, r1] - ldr r2, [r7, r2] - add r3, r3, r6 - bl ov94_02240EAC - cmp r4, #6 - bhs _02241048 - ldr r0, _022411B4 ; =0x00000EB8 - mov r1, #0 - ldr r0, [r7, r0] - bl sub_02021CAC -_02241048: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x1e - blo _02240FF4 - ldr r2, _022411B8 ; =0x00000BA8 - ldr r0, [sp, #0x20] - ldr r1, [sp, #0x10] - ldr r2, [r5, r2] - bl sub_02079AF4 - b _0224114C -_02241060: - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - mov r4, #0 - str r0, [sp, #0x14] - cmp r0, #0 - ble _022410F0 -_02241070: - ldr r0, [r5, #0] - add r1, r4, #0 - ldr r0, [r0, #8] - bl sub_0207A0FC - str r0, [sp, #0x24] - bl sub_02076B10 - ldr r1, _022411AC ; =0x000010A8 - lsl r6, r4, #2 - ldr r1, [r5, r1] - str r0, [sp, #0x28] - add r1, r1, r6 - bl ov94_02240E50 - mov r2, #0x39 - ldr r0, [sp, #0x1c] - str r4, [sp] - str r0, [sp, #4] - ldr r0, _022411AC ; =0x000010A8 - add r1, r4, #0 - ldr r0, [r5, r0] - add r7, r5, r6 - add r0, r0, r6 - str r0, [sp, #8] - mov r0, #0x83 - lsl r0, r0, #2 - mul r1, r0 - ldr r0, [sp, #0x18] - lsl r2, r2, #6 - add r0, r0, r1 - str r0, [sp, #0xc] - ldr r1, _022411B0 ; =0x00000DC8 - ldr r0, [sp, #0x28] - ldr r1, [r7, r1] - ldr r2, [r7, r2] - lsl r6, r4, #1 - add r3, sp, #0x2c - add r3, r3, r6 - bl ov94_02240EAC - ldr r0, [sp, #0x24] - mov r1, #0xa2 - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - ldr r0, _022411B4 ; =0x00000EB8 - beq _022410DC - ldr r0, [r7, r0] - mov r1, #1 - bl sub_02021CAC - b _022410E4 -_022410DC: - ldr r0, [r7, r0] - mov r1, #0 - bl sub_02021CAC -_022410E4: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - ldr r0, [sp, #0x14] - cmp r4, r0 - blt _02241070 -_022410F0: - cmp r4, #0x1e - bhs _0224113E - mov r7, #0 -_022410F6: - ldr r0, _022411AC ; =0x000010A8 - lsl r1, r4, #2 - ldr r0, [r5, r0] - add r6, r5, r1 - strh r7, [r0, r1] - ldr r0, _022411B0 ; =0x00000DC8 - add r1, r7, #0 - ldr r0, [r6, r0] - bl sub_02021CAC - mov r0, #0x39 - lsl r0, r0, #6 - ldr r0, [r6, r0] - mov r1, #0 - bl sub_02021CAC - mov r0, #0x83 - lsl r0, r0, #2 - add r1, r4, #0 - mul r1, r0 - ldr r0, [sp, #0x18] - add r1, r0, r1 - mov r0, #0 - str r0, [r1, #8] - cmp r4, #6 - bhs _02241134 - ldr r0, _022411B4 ; =0x00000EB8 - mov r1, #0 - ldr r0, [r6, r0] - bl sub_02021CAC -_02241134: - add r0, r4, #1 - lsl r0, r0, #0x10 - lsr r4, r0, #0x10 - cmp r4, #0x1e - blo _022410F6 -_0224113E: - ldr r2, _022411BC ; =0x00000B94 - mov r1, #0x59 - ldr r0, [r5, r2] - add r2, #0x14 - ldr r2, [r5, r2] - bl sub_0200B1B8 -_0224114C: - ldr r0, [sp, #0x1c] - bl sub_02006CA8 - ldr r0, _022411C0 ; =0x00000F2C - mov r1, #0 - add r0, r5, r0 - bl sub_0201ADA4 - mov r0, #1 - str r0, [sp] - ldr r0, _022411C4 ; =0x00010200 - ldr r1, _022411B8 ; =0x00000BA8 - str r0, [sp, #4] - ldr r0, _022411C0 ; =0x00000F2C - ldr r1, [r5, r1] - add r0, r5, r0 - mov r2, #0 - mov r3, #5 - bl ov94_02245900 - ldr r0, [r5, #0x24] - cmp r0, #6 - bne _0224119A - mov r3, #0x12 - lsl r3, r3, #4 - mov r2, #0xd1 - ldr r4, [r5, r3] - ldr r0, _022411AC ; =0x000010A8 - lsl r2, r2, #2 - add r3, r3, #4 - ldr r1, _022411B0 ; =0x00000DC8 - add r2, r5, r2 - mul r3, r4 - add r2, r2, r3 - ldr r0, [r5, r0] - ldr r3, [sp, #0x18] - add r1, r5, r1 - bl ov94_02241464 -_0224119A: - ldr r1, _022411C8 ; =ov94_02240E5C - ldr r0, _022411CC ; =0x000010B8 - str r1, [r5, r0] - add sp, #0x68 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022411A4: .word 0x00003D68 -_022411A8: .word 0x000010B4 -_022411AC: .word 0x000010A8 -_022411B0: .word 0x00000DC8 -_022411B4: .word 0x00000EB8 -_022411B8: .word 0x00000BA8 -_022411BC: .word 0x00000B94 -_022411C0: .word 0x00000F2C -_022411C4: .word 0x00010200 -_022411C8: .word ov94_02240E5C -_022411CC: .word 0x000010B8 - thumb_func_end ov94_02240FA0 - - thumb_func_start ov94_022411D0 -ov94_022411D0: ; 0x022411D0 - cmp r0, #0x12 - bne _022411D8 - mov r0, #1 - bx lr -_022411D8: - mov r0, #0 - bx lr - thumb_func_end ov94_022411D0 - - thumb_func_start ov94_022411DC -ov94_022411DC: ; 0x022411DC - push {r3, r4, r5, r6, r7, lr} - add r6, r2, #0 - add r5, r0, #0 - add r0, r6, #0 - add r7, r1, #0 - add r4, r3, #0 - bl ov94_022411D0 - cmp r0, #0 - beq _0224120E - add r0, r5, #0 - bl sub_0207A0F8 - sub r0, r0, #1 - cmp r4, r0 - ble _02241200 - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} -_02241200: - add r0, r5, #0 - add r1, r4, #0 - bl sub_0207A0FC - bl sub_02076B10 - pop {r3, r4, r5, r6, r7, pc} -_0224120E: - add r0, r7, #0 - add r1, r6, #0 - add r2, r4, #0 - bl sub_02079C9C - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov94_022411DC - - thumb_func_start ov94_0224121C -ov94_0224121C: ; 0x0224121C - push {r4, lr} - add r4, r0, #0 - add r0, r2, #0 - bl ov94_022411D0 - cmp r0, #0 - beq _02241238 - add r0, r4, #0 - bl sub_0207A0F8 - cmp r0, #2 - bge _02241238 - mov r0, #0 - pop {r4, pc} -_02241238: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov94_0224121C - - thumb_func_start ov94_0224123C -ov94_0224123C: ; 0x0224123C - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - mov r4, #0 - bl sub_02073D20 - ldr r5, _02241274 ; =0x02245E34 - str r0, [sp] - add r6, r4, #0 -_0224124C: - ldrh r1, [r5] - add r0, r7, #0 - mov r2, #0 - bl sub_02074570 - add r6, r6, #1 - add r4, r4, r0 - add r5, r5, #2 - cmp r6, #0xa - blt _0224124C - ldr r1, [sp] - add r0, r7, #0 - bl sub_02073D48 - cmp r4, #0 - beq _02241270 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_02241270: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241274: .word 0x02245E34 - thumb_func_end ov94_0224123C - - thumb_func_start ov94_02241278 -ov94_02241278: ; 0x02241278 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - bl sub_02073D20 - add r7, r0, #0 - add r0, r5, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - add r6, r0, #0 - add r0, r5, #0 - add r1, r7, #0 - bl sub_02073D48 - cmp r6, #0 - ble _022412BE - ldr r1, _022412C4 ; =0x000001DF - cmp r4, r1 - beq _022412BA - add r0, r1, #0 - add r0, #8 - cmp r4, r0 - beq _022412BA - add r1, #0xd - cmp r4, r1 - bne _022412BE -_022412BA: - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_022412BE: - mov r0, #0 - pop {r3, r4, r5, r6, r7, pc} - nop -_022412C4: .word 0x000001DF - thumb_func_end ov94_02241278 - - thumb_func_start ov94_022412C8 -ov94_022412C8: ; 0x022412C8 - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_02073D20 - add r6, r0, #0 - add r0, r5, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074570 - add r4, r0, #0 - add r0, r5, #0 - add r1, r6, #0 - bl sub_02073D48 - cmp r4, #0x70 - bne _022412EE - mov r0, #1 - pop {r4, r5, r6, pc} -_022412EE: - mov r0, #0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov94_022412C8 - - thumb_func_start ov94_022412F4 -ov94_022412F4: ; 0x022412F4 - push {r4, lr} - bl ov94_022411DC - add r4, r0, #0 - bne _02241302 - mov r0, #0 - pop {r4, pc} -_02241302: - mov r1, #0xac - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _02241312 - mov r0, #0 - pop {r4, pc} -_02241312: - add r0, r4, #0 - mov r1, #0xad - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - beq _02241324 - mov r0, #2 - pop {r4, pc} -_02241324: - mov r0, #1 - pop {r4, pc} - thumb_func_end ov94_022412F4 - - thumb_func_start ov94_02241328 -ov94_02241328: ; 0x02241328 - push {r3, r4} - mov r4, #0 - ldrsh r3, [r0, r4] - ldrsh r2, [r1, r4] - cmp r3, r2 - beq _0224133A - add r0, r4, #0 - pop {r3, r4} - bx lr -_0224133A: - mov r2, #2 - ldrsb r3, [r1, r2] - cmp r3, #3 - beq _0224134E - ldrsb r2, [r0, r2] - cmp r3, r2 - beq _0224134E - add r0, r4, #0 - pop {r3, r4} - bx lr -_0224134E: - mov r2, #3 - ldrsb r3, [r0, r2] - cmp r3, #0 - bne _0224135C - mov r0, #0 - pop {r3, r4} - bx lr -_0224135C: - ldrsb r0, [r1, r2] - cmp r0, #0 - beq _0224136C - cmp r0, r3 - ble _0224136C - mov r0, #0 - pop {r3, r4} - bx lr -_0224136C: - mov r0, #4 - ldrsb r0, [r1, r0] - cmp r0, #0 - beq _0224137E - cmp r0, r3 - bge _0224137E - mov r0, #0 - pop {r3, r4} - bx lr -_0224137E: - mov r0, #1 - pop {r3, r4} - bx lr - thumb_func_end ov94_02241328 - - thumb_func_start ov94_02241384 -ov94_02241384: ; 0x02241384 - push {r3, r4, r5, lr} - add r4, r1, #0 - mov r1, #5 - mov r2, #0 - add r5, r0, #0 - bl sub_02074570 - add r1, sp, #0 - strh r0, [r1] - add r0, r5, #0 - mov r1, #0x6f - mov r2, #0 - bl sub_02074570 - add r1, r0, #1 - add r0, sp, #0 - strb r1, [r0, #2] - add r0, r5, #0 - bl sub_02075B40 - add r1, sp, #0 - strb r0, [r1, #3] - add r0, sp, #0 - add r1, r4, #0 - bl ov94_02241328 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov94_02241384 - - thumb_func_start ov94_022413BC -ov94_022413BC: ; 0x022413BC - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - mov r0, #0x46 - add r5, r1, #0 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - add r1, sp, #0 - strh r0, [r1, #6] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - mov r1, #0x6f - mov r2, #0 - bl sub_02074570 - add r1, r0, #1 - add r0, sp, #0 - strb r1, [r0, #8] - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r5, r0] - bl sub_02075B40 - add r1, sp, #0 - strb r0, [r1, #9] - add r0, r4, #0 - ldrh r2, [r1, #6] - add r0, #0xec - strh r2, [r0] - add r0, r4, #0 - ldrh r1, [r1, #8] - add r0, #0xee - strh r1, [r0] - add r0, r4, #0 - add r1, r5, #0 - bl ov94_022425A8 - mov r0, #0x95 - lsl r0, r0, #2 - add r2, r5, r0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r5, r0] - add r0, r0, #4 - mul r0, r1 - add r0, r2, r0 - bl sub_02076B10 - mov r1, #5 - mov r2, #0 - add r5, r0, #0 - bl sub_02074570 - add r1, sp, #0 - strh r0, [r1] - add r0, r5, #0 - mov r1, #0x6f - mov r2, #0 - bl sub_02074570 - add r0, r0, #1 - add r1, sp, #0 - strb r0, [r1, #2] - mov r0, #0 - strb r0, [r1, #3] - strb r0, [r1, #4] - add r0, r4, #0 - ldrh r2, [r1] - add r0, #0xf0 - strh r2, [r0] - add r0, r4, #0 - ldrh r2, [r1, #2] - add r0, #0xf2 - add r4, #0xf4 - strh r2, [r0] - ldrh r0, [r1, #4] - strh r0, [r4] - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov94_022413BC - - thumb_func_start ov94_02241464 -ov94_02241464: ; 0x02241464 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r7, r2, #0 - add r4, r3, #0 - mov r6, #0 -_0224146E: - mov r0, #0 - ldrsh r0, [r5, r0] - cmp r0, #0 - beq _02241488 - add r0, r5, #0 - add r1, r7, #0 - bl ov94_02241328 - cmp r0, #0 - bne _02241488 - ldr r0, [r4, #4] - add r0, r0, #3 - str r0, [r4, #4] -_02241488: - mov r0, #0x83 - lsl r0, r0, #2 - add r6, r6, #1 - add r5, r5, #4 - add r4, r4, r0 - cmp r6, #0x1e - blt _0224146E - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov94_02241464 - - thumb_func_start ov94_02241498 -ov94_02241498: ; 0x02241498 - push {r3, lr} - mov r1, #6 - mov r2, #0 - bl sub_02074470 - lsl r0, r0, #0x10 - lsr r0, r0, #0x10 - bl sub_0207D2D0 - cmp r0, #0 - beq _022414B2 - mov r0, #1 - pop {r3, pc} -_022414B2: - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov94_02241498 - - thumb_func_start ov94_022414B8 -ov94_022414B8: ; 0x022414B8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_022418B8 - ldr r0, [r4, #4] - bl ov94_022415F8 - add r0, r4, #0 - bl ov94_0224170C - add r0, r4, #0 - bl ov94_022417A0 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - add r0, r4, #0 - bl ov94_02245934 - mov r0, #0 - str r0, [sp] - mov r0, #3 - ldr r2, _02241538 ; =0x00000B94 - str r0, [sp, #4] - sub r0, r0, #4 - str r0, [sp, #8] - add r1, r2, #4 - ldr r0, [r4, r2] - sub r2, r2, #4 - ldr r3, _0224153C ; =0x00000F6C - ldr r1, [r4, r1] - ldr r2, [r4, r2] - add r3, r4, r3 - bl ov94_022422D4 - ldr r1, _02241540 ; =0x00000B74 - mov r3, #0x46 - add r0, r4, r1 - str r0, [sp] - add r0, r1, #0 - add r0, #0x20 - add r1, #0x1c - ldr r2, _02241544 ; =0x00000F9C - lsl r3, r3, #2 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - ldr r3, [r4, r3] - add r2, r4, r2 - bl ov94_022423FC - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_02241538: .word 0x00000B94 -_0224153C: .word 0x00000F6C -_02241540: .word 0x00000B74 -_02241544: .word 0x00000F9C - thumb_func_end ov94_022414B8 - - thumb_func_start ov94_02241548 -ov94_02241548: ; 0x02241548 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223C4B4 - bl sub_020397B0 - ldr r1, [r4, #0x2c] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02241564 ; =0x0224695C - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_02241564: .word 0x0224695C - thumb_func_end ov94_02241548 - - thumb_func_start ov94_02241568 -ov94_02241568: ; 0x02241568 - push {r4, lr} - add r4, r0, #0 - bl sub_02039794 - add r0, r4, #0 - bl ov94_02241920 - add r0, r4, #0 - bl ov94_02241880 - ldr r0, [r4, #4] - bl ov94_022416E0 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - thumb_func_end ov94_02241568 - - thumb_func_start ov94_0224158C -ov94_0224158C: ; 0x0224158C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _022415EC ; =0x00000B94 - add r4, r2, #0 - ldr r0, [r5, r0] - bl sub_0200B1EC - mov r1, #0xb9 - add r6, r0, #0 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, #0x20 - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - ldr r0, _022415F0 ; =0x00000EFC - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _022415F0 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _022415F0 ; =0x00000EFC - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _022415F4 ; =0x00000BE4 - str r0, [r5, r1] - add r0, r6, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022415EC: .word 0x00000B94 -_022415F0: .word 0x00000EFC -_022415F4: .word 0x00000BE4 - thumb_func_end ov94_0224158C - - thumb_func_start ov94_022415F8 -ov94_022415F8: ; 0x022415F8 - push {r4, r5, lr} - sub sp, #0x8c - ldr r5, _022416CC ; =0x0224601C - add r4, r0, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x70 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _022416D0 ; =0x02246038 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _022416D4 ; =0x02246054 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - ldr r5, _022416D8 ; =0x02246070 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _022416DC ; =0x02246000 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - add sp, #0x8c - pop {r4, r5, pc} - nop -_022416CC: .word 0x0224601C -_022416D0: .word 0x02246038 -_022416D4: .word 0x02246054 -_022416D8: .word 0x02246070 -_022416DC: .word 0x02246000 - thumb_func_end ov94_022415F8 - - thumb_func_start ov94_022416E0 -ov94_022416E0: ; 0x022416E0 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_022416E0 - - thumb_func_start ov94_0224170C -ov94_0224170C: ; 0x0224170C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r5, r0, #0 - ldr r4, [r5, #4] - mov r0, #0x60 - str r0, [sp] - mov r0, #0x3e - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x68 - mov r1, #1 - add r3, r2, #0 - bl sub_02006E84 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [r5, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - mov r0, #0xa - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - mov r0, #0x68 - mov r1, #0xb - add r2, r4, #0 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - mov r0, #6 - lsl r0, r0, #8 - str r0, [sp, #4] - mov r3, #1 - str r3, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - mov r0, #0x68 - mov r1, #0x17 - add r2, r4, #0 - bl sub_02006E60 - add sp, #0x10 - pop {r3, r4, r5, pc} - thumb_func_end ov94_0224170C - - thumb_func_start ov94_022417A0 -ov94_022417A0: ; 0x022417A0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - mov r3, #1 - add r7, r0, #0 - str r3, [sp] - mov r0, #0x1c - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - ldr r1, _02241868 ; =0x00000F1C - str r0, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r7, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _02241868 ; =0x00000F1C - mov r1, #0 - add r0, r7, r0 - bl sub_0201ADA4 - mov r2, #0 - ldr r0, _0224186C ; =0x000F0E00 - str r2, [sp] - str r0, [sp, #4] - ldr r1, _02241870 ; =0x00000BB4 - ldr r0, _02241868 ; =0x00000F1C - ldr r1, [r7, r1] - add r0, r7, r0 - mov r3, #1 - bl ov94_022458CC - mov r0, #0x15 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r3, #2 - ldr r1, _02241874 ; =0x00000EFC - str r3, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x60 - str r0, [sp, #0x10] - ldr r0, [r7, #4] - add r1, r7, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _02241874 ; =0x00000EFC - mov r1, #0 - add r0, r7, r0 - bl sub_0201ADA4 - mov r0, #0 - str r0, [sp, #0x14] - ldr r0, _02241878 ; =0x00000F6C - ldr r4, _0224187C ; =0x02245FE8 - mov r6, #0x96 - add r5, r7, r0 -_0224181C: - ldrh r0, [r4, #2] - add r1, r5, #0 - mov r2, #0 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0xb - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - lsl r0, r6, #0x10 - lsr r0, r0, #0x10 - str r0, [sp, #0x10] - ldrh r3, [r4] - ldr r0, [r7, #4] - lsl r3, r3, #0x18 - lsr r3, r3, #0x18 - bl sub_0201A7E8 - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r0, r5, #0 - bl sub_0201A954 - ldr r0, [sp, #0x14] - add r6, #0x16 - add r0, r0, #1 - add r4, r4, #4 - add r5, #0x10 - str r0, [sp, #0x14] - cmp r0, #6 - blt _0224181C - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02241868: .word 0x00000F1C -_0224186C: .word 0x000F0E00 -_02241870: .word 0x00000BB4 -_02241874: .word 0x00000EFC -_02241878: .word 0x00000F6C -_0224187C: .word 0x02245FE8 - thumb_func_end ov94_022417A0 - - thumb_func_start ov94_02241880 -ov94_02241880: ; 0x02241880 - push {r4, r5, r6, lr} - add r6, r0, #0 - ldr r0, _022418AC ; =0x00000F6C - mov r4, #0 - add r5, r6, r0 -_0224188A: - add r0, r5, #0 - bl sub_0201A8FC - add r4, r4, #1 - add r5, #0x10 - cmp r4, #6 - blt _0224188A - ldr r0, _022418B0 ; =0x00000EFC - add r0, r6, r0 - bl sub_0201A8FC - ldr r0, _022418B4 ; =0x00000F1C - add r0, r6, r0 - bl sub_0201A8FC - pop {r4, r5, r6, pc} - nop -_022418AC: .word 0x00000F6C -_022418B0: .word 0x00000EFC -_022418B4: .word 0x00000F1C - thumb_func_end ov94_02241880 - - thumb_func_start ov94_022418B8 -ov94_022418B8: ; 0x022418B8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r4, r1] - sub r1, #0x1c - ldr r0, [r4, r1] - mov r1, #0x5a - bl sub_0200B1EC - ldr r1, _02241918 ; =0x00000BB4 - str r0, [r4, r1] - mov r0, #0x3e - mov r1, #0x30 - bl sub_02018144 - ldr r1, _0224191C ; =0x00001084 - mov r2, #0x30 - str r0, [r4, r1] - ldr r1, [r4, r1] - mov r0, #0 - bl sub_020C4BB8 - ldr r2, _0224191C ; =0x00001084 - mov r0, #0x3e - ldr r2, [r4, r2] - mov r1, #0 - add r2, #0x1c - bl ov94_02242524 - ldr r1, _0224191C ; =0x00001084 - ldr r1, [r4, r1] - str r0, [r1, #0x18] - mov r0, #0x3e - bl ov94_02242548 - ldr r1, _0224191C ; =0x00001084 - ldr r2, [r4, r1] - add r1, #0x38 - str r0, [r2, #0x14] - add r0, r4, r1 - bl ov94_02242AAC - pop {r4, pc} - ; .align 2, 0 -_02241918: .word 0x00000BB4 -_0224191C: .word 0x00001084 - thumb_func_end ov94_022418B8 - - thumb_func_start ov94_02241920 -ov94_02241920: ; 0x02241920 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02241954 ; =0x00001084 - ldr r0, [r4, r0] - ldr r0, [r0, #0x14] - bl sub_020181C4 - ldr r0, _02241954 ; =0x00001084 - ldr r0, [r4, r0] - ldr r0, [r0, #0x18] - bl sub_020181C4 - ldr r0, _02241954 ; =0x00001084 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - ldr r0, _02241958 ; =0x00000BB4 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - ; .align 2, 0 -_02241954: .word 0x00001084 -_02241958: .word 0x00000BB4 - thumb_func_end ov94_02241920 - - thumb_func_start ov94_0224195C -ov94_0224195C: ; 0x0224195C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - beq _02241984 - ldr r0, _0224198C ; =0x00000F0F - mov r1, #9 - str r0, [sp] - add r0, r4, #0 - mov r2, #1 - mov r3, #0 - bl ov94_0224158C - add r0, r4, #0 - mov r1, #0x10 - mov r2, #1 - bl ov94_0223C3F4 -_02241984: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0224198C: .word 0x00000F0F - thumb_func_end ov94_0224195C - - thumb_func_start ov94_02241990 -ov94_02241990: ; 0x02241990 - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _02241A08 ; =0x021BF67C - add r4, r0, #0 - ldr r2, [r1, #0x48] - mov r1, #2 - tst r1, r2 - beq _022419AC - mov r1, #5 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r4, #0x2c] -_022419AC: - mov r0, #5 - str r0, [sp] - mov r0, #4 - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, _02241A0C ; =0x0000011A - ldr r1, _02241A10 ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0xf - bl sub_0201A7E8 - ldr r0, _02241A10 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #5 - str r0, [sp] - mov r0, #0xa - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, _02241A14 ; =0x0000014E - ldr r1, _02241A18 ; =0x00000F4C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - ldr r0, _02241A18 ; =0x00000F4C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - str r0, [r4, #0x2c] - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_02241A08: .word 0x021BF67C -_02241A0C: .word 0x0000011A -_02241A10: .word 0x00000F3C -_02241A14: .word 0x0000014E -_02241A18: .word 0x00000F4C - thumb_func_end ov94_02241990 - - thumb_func_start ov94_02241A1C -ov94_02241A1C: ; 0x02241A1C - push {r4, lr} - ldr r3, _02241A44 ; =0x00000B94 - add r4, r0, #0 - ldr r1, _02241A48 ; =0x0000106C - ldr r2, _02241A4C ; =0x00000F3C - ldr r3, [r4, r3] - add r1, r4, r1 - add r2, r4, r2 - bl ov94_022426A8 - ldr r1, _02241A50 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _02241A54 ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #4 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02241A44: .word 0x00000B94 -_02241A48: .word 0x0000106C -_02241A4C: .word 0x00000F3C -_02241A50: .word 0x00001078 -_02241A54: .word 0x0000FFFF - thumb_func_end ov94_02241A1C - - thumb_func_start ov94_02241A58 -ov94_02241A58: ; 0x02241A58 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02241B10 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_02242A6C - cmp r0, #9 - bhi _02241A8E - add r1, r0, r0 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02241A7A: ; jump table - .short _02241B0C - _02241A7A - 2 ; case 0 - .short _02241A98 - _02241A7A - 2 ; case 1 - .short _02241A98 - _02241A7A - 2 ; case 2 - .short _02241A98 - _02241A7A - 2 ; case 3 - .short _02241A98 - _02241A7A - 2 ; case 4 - .short _02241A98 - _02241A7A - 2 ; case 5 - .short _02241A98 - _02241A7A - 2 ; case 6 - .short _02241A98 - _02241A7A - 2 ; case 7 - .short _02241A98 - _02241A7A - 2 ; case 8 - .short _02241A98 - _02241A7A - 2 ; case 9 -_02241A8E: - mov r1, #1 - mvn r1, r1 - cmp r0, r1 - beq _02241ABC - b _02241B0C -_02241A98: - ldr r0, _02241B14 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #6 - ldr r0, [r4, r0] - add r2, r2, #4 - bl sub_02001384 - ldr r0, _02241B18 ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - mov r0, #5 - str r0, [r4, #0x2c] - ldr r0, _02241B1C ; =0x000005DC - bl sub_02005748 - b _02241B0C -_02241ABC: - ldr r0, _02241B14 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #6 - ldr r0, [r4, r0] - add r2, r2, #4 - bl sub_02001384 - ldr r0, _02241B18 ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _02241B20 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _02241B24 ; =0x00000EFC - mov r1, #0 - add r0, r4, r0 - bl sub_0200E084 - ldr r0, _02241B20 ; =0x00000F3C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _02241B28 ; =0x00000F4C - add r0, r4, r0 - bl sub_0201A8FC - mov r1, #5 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r4, #0x2c] - ldr r0, _02241B1C ; =0x000005DC - bl sub_02005748 -_02241B0C: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02241B10: .word 0x00001078 -_02241B14: .word 0x00001084 -_02241B18: .word 0x0000106C -_02241B1C: .word 0x000005DC -_02241B20: .word 0x00000F3C -_02241B24: .word 0x00000EFC -_02241B28: .word 0x00000F4C - thumb_func_end ov94_02241A58 - - thumb_func_start ov94_02241B2C -ov94_02241B2C: ; 0x02241B2C - push {r3, r4, lr} - sub sp, #0xc - ldr r3, _02241B6C ; =0x00000B98 - add r4, r0, #0 - ldr r1, [r4, r3] - sub r3, r3, #4 - str r1, [sp] - ldr r1, _02241B70 ; =0x00001084 - ldr r2, [r4, r1] - sub r1, #0x18 - str r2, [sp, #4] - ldr r2, [r4, #0] - add r1, r4, r1 - ldr r2, [r2, #0x10] - str r2, [sp, #8] - ldr r2, _02241B74 ; =0x00000F4C - ldr r3, [r4, r3] - add r2, r4, r2 - bl ov94_022427C0 - ldr r1, _02241B78 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _02241B7C ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #6 - str r0, [r4, #0x2c] - mov r0, #3 - add sp, #0xc - pop {r3, r4, pc} - nop -_02241B6C: .word 0x00000B98 -_02241B70: .word 0x00001084 -_02241B74: .word 0x00000F4C -_02241B78: .word 0x00001078 -_02241B7C: .word 0x0000FFFF - thumb_func_end ov94_02241B2C - - thumb_func_start ov94_02241B80 -ov94_02241B80: ; 0x02241B80 - cmp r1, #0 - beq _02241B8E - cmp r1, #0xfe - beq _02241B96 - cmp r1, #0xff - beq _02241B9E - b _02241BA6 -_02241B8E: - mov r1, #1 - strb r1, [r0, #2] - add r0, r1, #0 - bx lr -_02241B96: - mov r1, #2 - strb r1, [r0, #2] - mov r0, #1 - bx lr -_02241B9E: - mov r1, #3 - strb r1, [r0, #2] - mov r0, #1 - bx lr -_02241BA6: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov94_02241B80 - - thumb_func_start ov94_02241BAC -ov94_02241BAC: ; 0x02241BAC - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, _02241CE4 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r4, r0] - add r1, r4, r1 - bl ov94_02242A6C - add r5, r0, #0 - mov r0, #1 - mvn r0, r0 - cmp r5, r0 - beq _02241BD4 - add r0, r0, #1 - cmp r5, r0 - bne _02241BD2 - b _02241CDC -_02241BD2: - b _02241C2A -_02241BD4: - ldr r0, _02241CE8 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #0 - ldr r0, [r4, r0] - add r1, #0xa - add r2, #8 - bl sub_02001384 - ldr r0, _02241CEC ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _02241CF0 ; =0x00000F4C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _02241CF4 ; =0x00000F3C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _02241CF0 ; =0x00000F4C - add r0, r4, r0 - bl sub_0201A8FC - mov r0, #0 - str r0, [r4, #0x2c] - ldr r0, _02241CF8 ; =0x000005DC - bl sub_02005748 - ldr r0, _02241CE8 ; =0x00001084 - ldr r3, [r4, r0] - add r0, #0x38 - ldrh r2, [r3, #6] - ldrh r1, [r3, #4] - add r0, r4, r0 - add r1, r2, r1 - ldrh r2, [r3, #0xa] - ldrh r3, [r3, #8] - bl ov94_02242AC4 - b _02241CDC -_02241C2A: - ldr r0, _02241CE8 ; =0x00001084 - ldr r2, [r4, r0] - sub r0, #0xc - add r1, r2, #0 - ldr r0, [r4, r0] - add r1, #0xa - add r2, #8 - bl sub_02001384 - ldr r0, _02241CEC ; =0x0000106C - ldr r0, [r4, r0] - bl sub_02013A3C - ldr r0, _02241CF4 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _02241CF0 ; =0x00000F4C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - ldr r0, _02241CF4 ; =0x00000F3C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _02241CF0 ; =0x00000F4C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _02241CFC ; =0x00000B78 - strh r5, [r4, r0] - ldr r0, _02241CF8 ; =0x000005DC - bl sub_02005748 - add r0, r5, #0 - mov r1, #0x12 - bl sub_020759F0 - ldr r1, _02241CE8 ; =0x00001084 - ldr r2, [r4, r1] - str r0, [r2, #0x20] - ldr r1, [r4, r1] - ldr r0, _02241CFC ; =0x00000B78 - ldr r1, [r1, #0x20] - add r0, r4, r0 - bl ov94_02241B80 - cmp r0, #0 - beq _02241C9A - mov r0, #0xa - str r0, [r4, #0x2c] - ldr r0, _02241D00 ; =0x00000B7A - ldrsb r1, [r4, r0] - b _02241CA0 -_02241C9A: - mov r0, #7 - str r0, [r4, #0x2c] - mov r1, #3 -_02241CA0: - ldr r2, _02241CFC ; =0x00000B78 - ldr r3, _02241D04 ; =0x00000F6C - ldrsh r0, [r4, r2] - add r3, r4, r3 - str r0, [sp] - mov r0, #0 - str r1, [sp, #4] - mvn r0, r0 - str r0, [sp, #8] - add r0, r2, #0 - add r1, r2, #0 - add r0, #0x1c - add r1, #0x20 - add r2, #0x18 - ldr r0, [r4, r0] - ldr r1, [r4, r1] - ldr r2, [r4, r2] - bl ov94_022422D4 - ldr r0, _02241CE8 ; =0x00001084 - ldr r3, [r4, r0] - add r0, #0x38 - ldrh r2, [r3, #6] - ldrh r1, [r3, #4] - add r0, r4, r0 - add r1, r2, r1 - ldrh r2, [r3, #0xa] - ldrh r3, [r3, #8] - bl ov94_02242AC4 -_02241CDC: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - nop -_02241CE4: .word 0x00001078 -_02241CE8: .word 0x00001084 -_02241CEC: .word 0x0000106C -_02241CF0: .word 0x00000F4C -_02241CF4: .word 0x00000F3C -_02241CF8: .word 0x000005DC -_02241CFC: .word 0x00000B78 -_02241D00: .word 0x00000B7A -_02241D04: .word 0x00000F6C - thumb_func_end ov94_02241BAC - - thumb_func_start ov94_02241D08 -ov94_02241D08: ; 0x02241D08 - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _02241D58 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl ov94_0224158C - add r0, r4, #0 - mov r1, #0x10 - mov r2, #8 - bl ov94_0223C3F4 - mov r0, #0xa - str r0, [sp] - str r0, [sp, #4] - mov r0, #8 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - ldr r0, _02241D5C ; =0x0000011A - ldr r1, _02241D60 ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0x15 - bl sub_0201A7E8 - ldr r0, _02241D60 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - nop -_02241D58: .word 0x00000F0F -_02241D5C: .word 0x0000011A -_02241D60: .word 0x00000F3C - thumb_func_end ov94_02241D08 - - thumb_func_start ov94_02241D64 -ov94_02241D64: ; 0x02241D64 - push {r4, lr} - ldr r2, _02241D8C ; =0x00000B94 - add r4, r0, #0 - ldr r0, _02241D90 ; =0x0000106C - ldr r1, _02241D94 ; =0x00000F3C - ldr r2, [r4, r2] - add r0, r4, r0 - add r1, r4, r1 - bl ov94_02242840 - ldr r1, _02241D98 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _02241D9C ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #9 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02241D8C: .word 0x00000B94 -_02241D90: .word 0x0000106C -_02241D94: .word 0x00000F3C -_02241D98: .word 0x00001078 -_02241D9C: .word 0x0000FFFF - thumb_func_end ov94_02241D64 - - thumb_func_start ov94_02241DA0 -ov94_02241DA0: ; 0x02241DA0 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _02241E70 ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r5, r0] - add r1, r5, r1 - bl ov94_02242A6C - add r4, r0, #0 - cmp r4, #2 - bhi _02241DC8 - cmp r4, #0 - beq _02241E0C - cmp r4, #1 - beq _02241E0C - cmp r4, #2 - beq _02241E0C - b _02241E68 -_02241DC8: - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - bne _02241E68 - ldr r0, _02241E70 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _02241E74 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02241E78 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _02241E7C ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - ldr r0, _02241E78 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _02241E80 ; =0x000005DC - bl sub_02005748 - mov r0, #0 - str r0, [r5, #0x2c] - b _02241E68 -_02241E0C: - ldr r0, _02241E70 ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _02241E74 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02241E78 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _02241E78 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _02241E80 ; =0x000005DC - bl sub_02005748 - ldr r3, _02241E84 ; =0x00000F6C - ldr r2, _02241E88 ; =0x00000B7A - add r0, r4, #1 - strb r0, [r5, r2] - mov r1, #0xa - str r1, [r5, #0x2c] - sub r0, r2, #2 - ldrsh r0, [r5, r0] - sub r1, #0xb - add r3, r5, r3 - str r0, [sp] - ldrsb r0, [r5, r2] - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r2, #0 - add r1, r2, #0 - add r0, #0x1a - add r1, #0x1e - add r2, #0x16 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - ldr r2, [r5, r2] - bl ov94_022422D4 -_02241E68: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - nop -_02241E70: .word 0x00001078 -_02241E74: .word 0x0000106C -_02241E78: .word 0x00000F3C -_02241E7C: .word 0x00000EFC -_02241E80: .word 0x000005DC -_02241E84: .word 0x00000F6C -_02241E88: .word 0x00000B7A - thumb_func_end ov94_02241DA0 - - thumb_func_start ov94_02241E8C -ov94_02241E8C: ; 0x02241E8C - push {r3, r4, lr} - sub sp, #0x14 - ldr r1, _02241EDC ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xb - mov r2, #1 - mov r3, #0 - bl ov94_0224158C - add r0, r4, #0 - mov r1, #0x10 - mov r2, #0xb - bl ov94_0223C3F4 - mov r0, #5 - str r0, [sp] - mov r0, #0x10 - str r0, [sp, #4] - mov r0, #0xd - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, _02241EE0 ; =0x0000011A - ldr r1, _02241EE4 ; =0x00000F3C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #0xf - bl sub_0201A7E8 - ldr r0, _02241EE4 ; =0x00000F3C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #3 - add sp, #0x14 - pop {r3, r4, pc} - nop -_02241EDC: .word 0x00000F0F -_02241EE0: .word 0x0000011A -_02241EE4: .word 0x00000F3C - thumb_func_end ov94_02241E8C - - thumb_func_start ov94_02241EE8 -ov94_02241EE8: ; 0x02241EE8 - push {r4, lr} - ldr r2, _02241F14 ; =0x00000B94 - add r4, r0, #0 - ldr r0, _02241F18 ; =0x0000106C - ldr r1, _02241F1C ; =0x00000F3C - ldr r2, [r4, r2] - add r0, r4, r0 - add r1, r4, r1 - mov r3, #0 - bl ov94_022428B0 - ldr r1, _02241F20 ; =0x00001078 - str r0, [r4, r1] - mov r0, #0x43 - ldr r1, _02241F24 ; =0x0000FFFF - lsl r0, r0, #2 - strh r1, [r4, r0] - mov r0, #0xc - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_02241F14: .word 0x00000B94 -_02241F18: .word 0x0000106C -_02241F1C: .word 0x00000F3C -_02241F20: .word 0x00001078 -_02241F24: .word 0x0000FFFF - thumb_func_end ov94_02241EE8 - - thumb_func_start ov94_02241F28 -ov94_02241F28: ; 0x02241F28 - push {r4, r5, lr} - sub sp, #0xc - add r5, r0, #0 - ldr r0, _0224201C ; =0x00001078 - mov r1, #0x43 - lsl r1, r1, #2 - ldr r0, [r5, r0] - add r1, r5, r1 - bl ov94_02242A6C - add r4, r0, #0 - cmp r4, #0xc - beq _02241F52 - mov r0, #1 - mvn r0, r0 - cmp r4, r0 - beq _02241F52 - add r0, r0, #1 - cmp r4, r0 - beq _02242016 - b _02241FA6 -_02241F52: - ldr r0, _0224201C ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _02242020 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02242024 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _02242028 ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - bl sub_0200E084 - ldr r0, _02242024 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _0224202C ; =0x000005DC - bl sub_02005748 - ldr r1, _02242030 ; =0x00001084 - ldr r0, _02242034 ; =0x00000B78 - ldr r1, [r5, r1] - add r0, r5, r0 - ldr r1, [r1, #0x20] - bl ov94_02241B80 - cmp r0, #0 - beq _02241FA0 - mov r0, #0 - str r0, [r5, #0x2c] - b _02242016 -_02241FA0: - mov r0, #7 - str r0, [r5, #0x2c] - b _02242016 -_02241FA6: - ldr r0, _0224202C ; =0x000005DC - bl sub_02005748 - ldr r0, _0224201C ; =0x00001078 - mov r1, #0 - ldr r0, [r5, r0] - add r2, r1, #0 - bl sub_02001384 - ldr r0, _02242020 ; =0x0000106C - ldr r0, [r5, r0] - bl sub_02013A3C - ldr r0, _02242024 ; =0x00000F3C - mov r1, #0 - add r0, r5, r0 - bl sub_0200DC9C - ldr r0, _02242024 ; =0x00000F3C - add r0, r5, r0 - bl sub_0201A8FC - ldr r0, _02242034 ; =0x00000B78 - add r1, r4, #0 - add r0, r5, r0 - mov r2, #0 - bl ov94_02242934 - mov r0, #0xd - ldr r1, _02242038 ; =0x00000B7B - str r0, [r5, #0x2c] - ldrsb r0, [r5, r1] - add r1, r1, #1 - ldrsb r1, [r5, r1] - mov r2, #0 - bl ov94_02242970 - ldr r2, _02242034 ; =0x00000B78 - ldr r3, _0224203C ; =0x00000F6C - ldrsh r1, [r5, r2] - add r3, r5, r3 - str r1, [sp] - add r1, r2, #2 - ldrsb r1, [r5, r1] - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r2, #0 - add r1, r2, #0 - add r0, #0x1c - add r1, #0x20 - add r2, #0x18 - ldr r0, [r5, r0] - ldr r1, [r5, r1] - ldr r2, [r5, r2] - bl ov94_022422D4 -_02242016: - mov r0, #3 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224201C: .word 0x00001078 -_02242020: .word 0x0000106C -_02242024: .word 0x00000F3C -_02242028: .word 0x00000EFC -_0224202C: .word 0x000005DC -_02242030: .word 0x00001084 -_02242034: .word 0x00000B78 -_02242038: .word 0x00000B7B -_0224203C: .word 0x00000F6C - thumb_func_end ov94_02241F28 - - thumb_func_start ov94_02242040 -ov94_02242040: ; 0x02242040 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _02242064 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0x17 - mov r2, #1 - mov r3, #0 - bl ov94_0224158C - add r0, r4, #0 - mov r1, #0x10 - mov r2, #0xe - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02242064: .word 0x00000F0F - thumb_func_end ov94_02242040 - - thumb_func_start ov94_02242068 -ov94_02242068: ; 0x02242068 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - ldr r2, _02242084 ; =0x000001EA - mov r1, #0xf - bl ov94_0223C3C0 - ldr r1, _02242088 ; =0x00001070 - str r0, [r4, r1] - mov r0, #0xf - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - nop -_02242084: .word 0x000001EA -_02242088: .word 0x00001070 - thumb_func_end ov94_02242068 - - thumb_func_start ov94_0224208C -ov94_0224208C: ; 0x0224208C - push {r4, lr} - add r4, r0, #0 - ldr r0, _022420DC ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _022420D8 - sub r1, r1, #1 - cmp r0, r1 - bne _022420B8 - mov r1, #5 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r4, #0x2c] - b _022420D8 -_022420B8: - mov r1, #7 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #2 - str r0, [r4, #0x2c] - ldr r0, _022420E0 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - add r1, r4, #0 - bl ov94_02242668 -_022420D8: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_022420DC: .word 0x00001070 -_022420E0: .word 0x000010B0 - thumb_func_end ov94_0224208C - - thumb_func_start ov94_022420E4 -ov94_022420E4: ; 0x022420E4 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - ldr r0, [r4, #0x18] - cmp r0, #0 - bne _02242110 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, _02242134 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - b _02242128 -_02242110: - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 -_02242128: - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - nop -_02242134: .word 0x000010B0 - thumb_func_end ov94_022420E4 - - thumb_func_start ov94_02242138 -ov94_02242138: ; 0x02242138 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02242154 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02242150 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_02242150: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02242154: .word 0x00000BE4 - thumb_func_end ov94_02242138 - - thumb_func_start ov94_02242158 -ov94_02242158: ; 0x02242158 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - add r5, r3, #0 - cmp r2, #0 - beq _02242186 - add r0, r1, #0 - add r1, r2, #0 - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [sp, #0x1c] - str r5, [sp] - str r0, [sp, #4] - ldr r3, [sp, #0x18] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - bl ov94_02245900 - add r0, r4, #0 - bl sub_020237BC -_02242186: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov94_02242158 - - thumb_func_start ov94_0224218C -ov94_0224218C: ; 0x0224218C - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r0, #0 - cmp r3, #0 - beq _022421BE - add r0, r1, #0 - add r1, r3, #0 - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x1c] - str r0, [sp] - ldr r0, [sp, #0x20] - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0 - bl ov94_02245900 - add r0, r5, #0 - bl sub_020237BC - add sp, #8 - pop {r3, r4, r5, pc} -_022421BE: - add r0, r2, #0 - mov r1, #0xa7 - bl sub_0200B1EC - add r5, r0, #0 - ldr r0, [sp, #0x18] - ldr r3, [sp, #0x1c] - str r0, [sp] - ldr r0, [sp, #0x20] - add r1, r5, #0 - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0 - bl ov94_02245900 - add r0, r5, #0 - bl sub_020237BC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov94_0224218C - - thumb_func_start ov94_022421E8 -ov94_022421E8: ; 0x022421E8 - cmp r0, #1 - bne _022421F2 - ldr r0, _02242200 ; =0x02246920 - ldr r0, [r0, #0] - bx lr -_022421F2: - cmp r0, #2 - bne _022421FA - ldr r0, _02242200 ; =0x02246920 - ldr r1, [r0, #4] -_022421FA: - add r0, r1, #0 - bx lr - nop -_02242200: .word 0x02246920 - thumb_func_end ov94_022421E8 - - thumb_func_start ov94_02242204 -ov94_02242204: ; 0x02242204 - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - add r5, r2, #0 - cmp r3, #0 - bne _02242214 - cmp r5, #3 - beq _02242264 -_02242214: - add r0, r1, #0 - ldr r1, _02242268 ; =0x02245FD8 - lsl r2, r5, #2 - ldr r1, [r1, r2] - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [sp, #0x1c] - cmp r0, #3 - ble _02242244 - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov94_022421E8 - mov r1, #0 - str r1, [sp] - str r0, [sp, #4] - ldr r2, [sp, #0x1c] - ldr r3, [sp, #0x18] - add r0, r6, #0 - add r1, r4, #0 - bl ov94_02245900 - b _0224225E -_02242244: - ldr r1, [sp, #0x20] - add r0, r5, #0 - bl ov94_022421E8 - ldr r1, [sp, #0x1c] - ldr r3, [sp, #0x18] - str r1, [sp] - str r0, [sp, #4] - add r0, r6, #0 - add r1, r4, #0 - mov r2, #0 - bl ov94_02245900 -_0224225E: - add r0, r4, #0 - bl sub_020237BC -_02242264: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02242268: .word 0x02245FD8 - thumb_func_end ov94_02242204 - - thumb_func_start ov94_0224226C -ov94_0224226C: ; 0x0224226C - push {r4, r5, r6, lr} - sub sp, #8 - add r6, r0, #0 - mov r0, #0 - mvn r0, r0 - add r5, r3, #0 - cmp r2, r0 - beq _022422AC - ldr r0, [sp, #0x20] - cmp r0, #0 - bne _02242286 - ldr r3, _022422B0 ; =0x0224610C - b _02242288 -_02242286: - ldr r3, _022422B4 ; =0x022460AC -_02242288: - add r0, r1, #0 - lsl r1, r2, #3 - ldr r1, [r3, r1] - bl sub_0200B1EC - add r4, r0, #0 - ldr r0, [sp, #0x1c] - str r5, [sp] - str r0, [sp, #4] - ldr r2, [sp, #0x24] - ldr r3, [sp, #0x18] - add r0, r6, #0 - add r1, r4, #0 - bl ov94_02245900 - add r0, r4, #0 - bl sub_020237BC -_022422AC: - add sp, #8 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_022422B0: .word 0x0224610C -_022422B4: .word 0x022460AC - thumb_func_end ov94_0224226C - - thumb_func_start ov94_022422B8 -ov94_022422B8: ; 0x022422B8 - push {r4, lr} - sub sp, #0x10 - ldr r4, [sp, #0x18] - str r4, [sp] - ldr r4, [sp, #0x1c] - str r4, [sp, #4] - ldr r4, [sp, #0x20] - str r4, [sp, #8] - mov r4, #0 - str r4, [sp, #0xc] - bl ov94_0224226C - add sp, #0x10 - pop {r4, pc} - thumb_func_end ov94_022422B8 - - thumb_func_start ov94_022422D4 -ov94_022422D4: ; 0x022422D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0x10] - mov r1, #0x61 - str r0, [sp, #0xc] - add r6, r3, #0 - bl sub_0200B1EC - str r0, [sp, #0x14] - mov r2, #0 - ldr r0, _02242364 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x14] - add r0, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - add r5, r6, #0 - mov r4, #1 - add r5, #0x10 - mov r7, #0 -_02242300: - add r0, r5, #0 - add r1, r7, #0 - bl sub_0201ADA4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #3 - blt _02242300 - mov r3, #0 - ldr r0, _02242364 ; =0x000F0200 - str r3, [sp] - str r0, [sp, #4] - add r0, r6, #0 - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x30] - add r0, #0x10 - bl ov94_02242158 - ldr r2, [sp, #0x34] - sub r0, r2, #1 - cmp r0, #1 - bhi _02242342 - mov r3, #0 - str r3, [sp] - mov r0, #0x46 - str r0, [sp, #4] - ldr r0, _02242364 ; =0x000F0200 - ldr r1, [sp, #0xc] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x10 - bl ov94_02242204 -_02242342: - mov r1, #0 - ldr r0, _02242364 ; =0x000F0200 - str r1, [sp] - str r0, [sp, #4] - str r1, [sp, #8] - add r6, #0x20 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x38] - add r0, r6, #0 - mov r3, #2 - bl ov94_022422B8 - ldr r0, [sp, #0x14] - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242364: .word 0x000F0200 - thumb_func_end ov94_022422D4 - - thumb_func_start ov94_02242368 -ov94_02242368: ; 0x02242368 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - str r1, [sp, #0x10] - mov r1, #0x61 - str r0, [sp, #0xc] - add r6, r3, #0 - bl sub_0200B1EC - str r0, [sp, #0x14] - mov r2, #0 - ldr r0, _022423F8 ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r1, [sp, #0x14] - add r0, r6, #0 - add r3, r2, #0 - bl ov94_02245900 - add r5, r6, #0 - mov r4, #1 - add r5, #0x10 - mov r7, #0 -_02242394: - add r0, r5, #0 - add r1, r7, #0 - bl sub_0201ADA4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #3 - blt _02242394 - mov r3, #0 - ldr r0, _022423F8 ; =0x000F0200 - str r3, [sp] - str r0, [sp, #4] - add r0, r6, #0 - ldr r1, [sp, #0x10] - ldr r2, [sp, #0x30] - add r0, #0x10 - bl ov94_02242158 - ldr r2, [sp, #0x34] - sub r0, r2, #1 - cmp r0, #1 - bhi _022423D6 - mov r3, #0 - str r3, [sp] - mov r0, #0x46 - str r0, [sp, #4] - ldr r0, _022423F8 ; =0x000F0200 - ldr r1, [sp, #0xc] - str r0, [sp, #8] - add r0, r6, #0 - add r0, #0x10 - bl ov94_02242204 -_022423D6: - mov r1, #0 - ldr r0, _022423F8 ; =0x000F0200 - str r1, [sp] - str r0, [sp, #4] - str r1, [sp, #8] - add r6, #0x20 - ldr r1, [sp, #0xc] - ldr r2, [sp, #0x38] - add r0, r6, #0 - mov r3, #2 - bl ov94_022422B8 - ldr r0, [sp, #0x14] - bl sub_020237BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022423F8: .word 0x000F0200 - thumb_func_end ov94_02242368 - - thumb_func_start ov94_022423FC -ov94_022423FC: ; 0x022423FC - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r4, r0, #0 - add r5, r1, #0 - mov r0, #0xb - mov r1, #0x3e - str r2, [sp, #8] - str r3, [sp, #0xc] - ldr r7, [sp, #0x38] - bl sub_02023790 - str r0, [sp, #0x18] - mov r0, #0xb - mov r1, #0x3e - bl sub_02023790 - str r0, [sp, #0x14] - ldr r0, [sp, #0xc] - ldr r2, [sp, #0x18] - mov r1, #0x77 - bl sub_02074570 - ldr r0, [sp, #0xc] - mov r1, #0x6f - mov r2, #0 - bl sub_02074570 - add r6, r0, #1 - ldr r0, [sp, #0xc] - bl sub_02075B40 - str r0, [sp, #0x10] - add r0, r4, #0 - mov r1, #0x64 - bl sub_0200B1EC - str r0, [sp, #0x20] - mov r0, #0 - str r0, [sp] - mov r0, #1 - mov r1, #3 - str r0, [sp, #4] - ldr r2, [sp, #0x10] - add r0, r5, #0 - add r3, r1, #0 - bl sub_0200B60C - add r0, r5, #0 - add r1, r4, #0 - mov r2, #0x66 - mov r3, #0x3e - bl sub_0200B29C - str r0, [sp, #0x1c] - cmp r6, #3 - beq _0224247A - ldr r1, _02242518 ; =0x02245FD8 - lsl r2, r6, #2 - ldr r1, [r1, r2] - ldr r2, [sp, #0x14] - add r0, r4, #0 - bl sub_0200B1B8 -_0224247A: - ldr r5, [sp, #8] - mov r4, #0 -_0224247E: - add r0, r5, #0 - mov r1, #0 - bl sub_0201ADA4 - add r4, r4, #1 - add r5, #0x10 - cmp r4, #3 - blt _0224247E - mov r2, #0 - ldr r0, _0224251C ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [sp, #0x20] - add r3, r2, #0 - bl ov94_02245900 - mov r2, #0 - ldr r0, _0224251C ; =0x000F0200 - str r2, [sp] - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [sp, #0x18] - add r0, #0x10 - add r3, r2, #0 - bl ov94_02245900 - mov r0, #2 - str r0, [sp] - ldr r0, _0224251C ; =0x000F0200 - mov r2, #0 - str r0, [sp, #4] - ldr r0, [sp, #8] - ldr r1, [sp, #0x1c] - add r0, #0x20 - add r3, r2, #0 - bl ov94_02245900 - cmp r6, #3 - beq _022424EA - sub r0, r6, #1 - mov r3, #0 - lsl r1, r0, #2 - ldr r0, _02242520 ; =0x02246920 - str r3, [sp] - ldr r0, [r0, r1] - ldr r1, [sp, #0x14] - str r0, [sp, #4] - ldr r0, [sp, #8] - mov r2, #0x46 - add r0, #0x10 - str r0, [sp, #8] - bl ov94_02245900 -_022424EA: - ldr r0, [sp, #0xc] - mov r1, #5 - mov r2, #0 - bl sub_02074570 - strh r0, [r7] - ldr r0, [sp, #0x10] - strb r6, [r7, #2] - strb r0, [r7, #3] - ldr r0, [sp, #0x1c] - bl sub_020237BC - ldr r0, [sp, #0x14] - bl sub_020237BC - ldr r0, [sp, #0x18] - bl sub_020237BC - ldr r0, [sp, #0x20] - bl sub_020237BC - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242518: .word 0x02245FD8 -_0224251C: .word 0x000F0200 -_02242520: .word 0x02246920 - thumb_func_end ov94_022423FC - - thumb_func_start ov94_02242524 -ov94_02242524: ; 0x02242524 - push {r3, r4, lr} - sub sp, #0xc - add r4, r2, #0 - mov r2, #0 - add r3, r0, #0 - str r2, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0x4b - mov r1, #0xd - bl sub_02007068 - ldr r1, [sp, #8] - lsr r1, r1, #1 - str r1, [r4, #0] - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02242524 - - thumb_func_start ov94_02242548 -ov94_02242548: ; 0x02242548 - push {r4, r5, r6, r7, lr} - sub sp, #0xc - ldr r1, _022425A0 ; =0x000001EE - add r5, r0, #0 - mov r0, #0x3e - bl sub_02018144 - add r4, r0, #0 - ldr r2, _022425A0 ; =0x000001EE - mov r0, #0 - add r1, r4, #0 - bl sub_020C4BB8 - mov r2, #0 - str r2, [sp] - add r0, sp, #8 - str r0, [sp, #4] - mov r0, #0x4b - mov r1, #0xc - add r3, r5, #0 - bl sub_02007068 - add r7, r0, #0 - ldr r0, [sp, #8] - ldr r5, _022425A4 ; =0x00000000 - lsr r3, r0, #1 - beq _02242594 - ldr r0, _022425A0 ; =0x000001EE - add r6, r7, #0 - mov r1, #1 -_02242584: - ldrh r2, [r6] - cmp r2, r0 - bhs _0224258C - strb r1, [r4, r2] -_0224258C: - add r5, r5, #1 - add r6, r6, #2 - cmp r5, r3 - blo _02242584 -_02242594: - add r0, r7, #0 - bl sub_020181C4 - add r0, r4, #0 - add sp, #0xc - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022425A0: .word 0x000001EE -_022425A4: .word 0x00000000 - thumb_func_end ov94_02242548 - - thumb_func_start ov94_022425A8 -ov94_022425A8: ; 0x022425A8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x45 - add r4, r1, #0 - lsl r0, r0, #2 - ldrh r0, [r4, r0] - bl ov94_022411D0 - cmp r0, #0 - beq _022425DC - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02077ACC - bl sub_02073C70 - add r2, r0, #0 - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - bl sub_020C4C14 - b _022425F4 -_022425DC: - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_02077ADC - mov r0, #0x46 - lsl r0, r0, #2 - ldr r0, [r4, r0] - add r1, r5, #0 - bl sub_020774C8 -_022425F4: - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025EF0 - add r1, r0, #0 - mov r0, #0x43 - lsl r0, r0, #2 - add r0, r5, r0 - mov r2, #8 - bl sub_020021D0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025F24 - mov r1, #0x47 - lsl r1, r1, #2 - strh r0, [r5, r1] - ldr r0, [r4, #0] - ldr r0, [r0, #0x18] - bl sub_0202C8C0 - ldr r1, _0224265C ; =0x0000011E - strb r0, [r5, r1] - ldr r0, [r4, #0] - ldr r0, [r0, #0x18] - bl sub_0202C8C4 - ldr r1, _02242660 ; =0x0000011F - strb r0, [r5, r1] - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025F8C - mov r1, #0x12 - lsl r1, r1, #4 - strb r0, [r5, r1] - ldr r0, [r4, #0] - ldr r0, [r0, #0x1c] - bl sub_02025F30 - add r1, r5, #0 - add r1, #0xf6 - strb r0, [r1] - ldr r0, _02242664 ; =0x00000122 - mov r1, #0xc - strb r1, [r5, r0] - mov r1, #2 - add r0, r0, #1 - strb r1, [r5, r0] - pop {r3, r4, r5, pc} - nop -_0224265C: .word 0x0000011E -_02242660: .word 0x0000011F -_02242664: .word 0x00000122 - thumb_func_end ov94_022425A8 - - thumb_func_start ov94_02242668 -ov94_02242668: ; 0x02242668 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov94_022425A8 - ldr r0, _022426A4 ; =0x00000B74 - add r1, r5, #0 - ldrh r2, [r4, r0] - add r1, #0xec - strh r2, [r1] - add r1, r0, #2 - ldrh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xee - strh r2, [r1] - add r1, r0, #4 - ldrh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xf0 - strh r2, [r1] - add r1, r0, #6 - ldrh r2, [r4, r1] - add r1, r5, #0 - add r1, #0xf2 - strh r2, [r1] - add r0, #8 - ldrh r0, [r4, r0] - add r5, #0xf4 - strh r0, [r5] - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022426A4: .word 0x00000B74 - thumb_func_end ov94_02242668 - - thumb_func_start ov94_022426A8 -ov94_022426A8: ; 0x022426A8 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r7, r0, #0 - add r5, r1, #0 - mov r0, #9 - mov r1, #0x3e - str r2, [sp] - add r6, r3, #0 - bl sub_02013A04 - str r0, [r5, #0] - mov r4, #0 -_022426C0: - add r2, r4, #0 - ldr r0, [r5, #0] - add r1, r6, #0 - add r2, #0x68 - add r3, r4, #1 - bl sub_02013A4C - add r4, r4, #1 - cmp r4, #9 - blt _022426C0 - ldr r3, _02242710 ; =0x0224608C - add r2, sp, #4 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [sp, #4] - ldr r0, [sp] - mov r2, #0x1f - mov r3, #0xb - str r0, [sp, #0x10] - bl sub_0200DC48 - ldr r0, _02242714 ; =0x00001084 - mov r3, #0x3e - ldr r2, [r7, r0] - add r0, sp, #4 - ldrh r1, [r2, #6] - ldrh r2, [r2, #4] - bl sub_0200112C - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - nop -_02242710: .word 0x0224608C -_02242714: .word 0x00001084 - thumb_func_end ov94_022426A8 - - thumb_func_start ov94_02242718 -ov94_02242718: ; 0x02242718 - push {r4, r5, r6, r7, lr} - sub sp, #0x1c - str r2, [sp, #8] - str r1, [sp, #4] - ldr r2, [sp, #0x38] - str r0, [sp] - ldr r1, _022427BC ; =0x02246928 - lsl r0, r2, #1 - ldrh r0, [r1, r0] - mov r7, #0 - str r3, [sp, #0xc] - str r0, [sp, #0x14] - add r0, r2, #1 - lsl r0, r0, #1 - ldrh r1, [r1, r0] - ldr r0, [sp, #0x14] - ldr r6, [sp, #0x3c] - sub r4, r1, r0 - str r7, [sp, #0x18] - cmp r4, #0 - ble _02242762 - lsl r1, r0, #1 - add r0, r3, #0 - add r5, r0, r1 -_02242748: - ldrh r1, [r5] - add r0, r6, #0 - bl sub_02026FE8 - cmp r0, #0 - beq _02242756 - add r7, r7, #1 -_02242756: - ldr r0, [sp, #0x18] - add r5, r5, #2 - add r0, r0, #1 - str r0, [sp, #0x18] - cmp r0, r4 - blt _02242748 -_02242762: - add r0, r7, #1 - mov r1, #0x3e - bl sub_02013A04 - ldr r1, [sp] - str r0, [r1, #0] - mov r0, #0 - str r0, [sp, #0x10] - cmp r4, #0 - ble _022427A4 - ldr r0, [sp, #0x14] - lsl r1, r0, #1 - ldr r0, [sp, #0xc] - add r5, r0, r1 -_0224277E: - ldrh r1, [r5] - add r0, r6, #0 - bl sub_02026FE8 - cmp r0, #0 - beq _02242798 - ldrh r2, [r5] - ldr r0, [sp] - ldr r1, [sp, #4] - ldr r0, [r0, #0] - add r3, r2, #0 - bl sub_02013A4C -_02242798: - ldr r0, [sp, #0x10] - add r5, r5, #2 - add r0, r0, #1 - str r0, [sp, #0x10] - cmp r0, r4 - blt _0224277E -_022427A4: - ldr r0, [sp] - mov r2, #0x79 - add r3, r2, #0 - ldr r0, [r0, #0] - ldr r1, [sp, #8] - sub r3, #0x7b - bl sub_02013A4C - add r0, r7, #1 - add sp, #0x1c - pop {r4, r5, r6, r7, pc} - nop -_022427BC: .word 0x02246928 - thumb_func_end ov94_02242718 - - thumb_func_start ov94_022427C0 -ov94_022427C0: ; 0x022427C0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x38 - ldr r5, [sp, #0x54] - add r7, r0, #0 - add r6, r1, #0 - add r0, r2, #0 - mov r1, #0xf - str r2, [sp, #0x10] - str r3, [sp, #0x14] - bl sub_0201ADA4 - ldrh r1, [r5, #6] - ldrh r0, [r5, #4] - ldr r2, [sp, #0x14] - add r4, r1, r0 - ldr r0, [r5, #0x14] - ldr r1, [sp, #0x50] - str r0, [sp] - ldr r0, [r5, #0x1c] - str r0, [sp, #4] - ldr r0, [sp, #0x58] - str r4, [sp, #8] - str r0, [sp, #0xc] - ldr r3, [r5, #0x18] - add r0, r6, #0 - bl ov94_02242718 - ldr r3, _0224283C ; =0x0224608C - add r5, r0, #0 - add r2, sp, #0x18 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, sp, #0x18 - strh r5, [r0, #0x10] - ldr r0, [r6, #0] - mov r1, #0 - str r0, [sp, #0x18] - ldr r0, [sp, #0x10] - mov r2, #0x1f - mov r3, #0xb - str r0, [sp, #0x24] - bl sub_0200DC48 - lsl r1, r4, #1 - mov r2, #0x43 - add r3, r7, r1 - lsl r2, r2, #6 - ldrh r1, [r3, r2] - add r2, #0x12 - ldrh r2, [r3, r2] - add r0, sp, #0x18 - mov r3, #0x3e - bl sub_0200112C - add sp, #0x38 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224283C: .word 0x0224608C - thumb_func_end ov94_022427C0 - - thumb_func_start ov94_02242840 -ov94_02242840: ; 0x02242840 - push {r4, r5, r6, r7, lr} - sub sp, #0x24 - add r6, r0, #0 - str r1, [sp] - mov r0, #4 - mov r1, #0x3e - add r7, r2, #0 - bl sub_02013A04 - ldr r5, _022428A8 ; =0x0224693C - str r0, [r6, #0] - mov r4, #0 -_02242858: - ldr r0, [r6, #0] - ldr r2, [r5, #0] - ldr r3, [r5, #4] - add r1, r7, #0 - bl sub_02013A4C - add r4, r4, #1 - add r5, #8 - cmp r4, #4 - blt _02242858 - ldr r3, _022428AC ; =0x0224608C - add r2, sp, #4 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - mov r1, #4 - add r0, sp, #4 - strh r1, [r0, #0x10] - ldr r0, [r6, #0] - mov r1, #0 - str r0, [sp, #4] - ldr r0, [sp] - mov r2, #0x1f - mov r3, #0xb - str r0, [sp, #0x10] - bl sub_0200DC48 - mov r1, #0 - add r0, sp, #4 - add r2, r1, #0 - mov r3, #0x3e - bl sub_0200112C - add sp, #0x24 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022428A8: .word 0x0224693C -_022428AC: .word 0x0224608C - thumb_func_end ov94_02242840 - - thumb_func_start ov94_022428B0 -ov94_022428B0: ; 0x022428B0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r7, r0, #0 - str r1, [sp] - str r2, [sp, #4] - cmp r3, #0 - bne _022428C4 - ldr r5, _02242928 ; =0x0224610C - mov r6, #0xd - b _022428C8 -_022428C4: - ldr r5, _0224292C ; =0x022460AC - mov r6, #0xc -_022428C8: - add r0, r6, #0 - mov r1, #0x3e - bl sub_02013A04 - mov r4, #0 - str r0, [r7, #0] - cmp r6, #0 - ble _022428EC -_022428D8: - ldr r0, [r7, #0] - ldr r1, [sp, #4] - ldr r2, [r5, #0] - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 - add r5, #8 - cmp r4, r6 - blt _022428D8 -_022428EC: - ldr r3, _02242930 ; =0x0224608C - add r2, sp, #8 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r0, sp, #8 - strh r6, [r0, #0x10] - ldr r0, [r7, #0] - mov r1, #0 - str r0, [sp, #8] - ldr r0, [sp] - mov r2, #0x1f - mov r3, #0xb - str r0, [sp, #0x14] - bl sub_0200DC48 - mov r1, #0 - add r0, sp, #8 - add r2, r1, #0 - mov r3, #0x3e - bl sub_0200112C - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - nop -_02242928: .word 0x0224610C -_0224292C: .word 0x022460AC -_02242930: .word 0x0224608C - thumb_func_end ov94_022428B0 - - thumb_func_start ov94_02242934 -ov94_02242934: ; 0x02242934 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - cmp r2, #0 - bne _0224294A - ldr r6, _02242968 ; =0x0224610C - cmp r4, #0xc - blt _02242954 - bl sub_02022974 - b _02242954 -_0224294A: - ldr r6, _0224296C ; =0x022460AC - cmp r4, #0xb - blo _02242954 - bl sub_02022974 -_02242954: - lsl r0, r4, #3 - add r1, r6, r0 - mov r0, #4 - ldrsh r0, [r1, r0] - strb r0, [r5, #3] - mov r0, #6 - ldrsh r0, [r1, r0] - strb r0, [r5, #4] - pop {r4, r5, r6, pc} - nop -_02242968: .word 0x0224610C -_0224296C: .word 0x022460AC - thumb_func_end ov94_02242934 - - thumb_func_start ov94_02242970 -ov94_02242970: ; 0x02242970 - push {r4, r5, r6, r7} - cmp r2, #0 - bne _0224297C - ldr r4, _022429AC ; =0x0224610C - mov r3, #0xd - b _02242980 -_0224297C: - ldr r4, _022429B0 ; =0x022460AC - mov r3, #0xc -_02242980: - mov r2, #0 - cmp r3, #0 - ble _022429A4 - mov r5, #6 - mov r6, #4 -_0224298A: - ldrsh r7, [r4, r6] - cmp r0, r7 - bne _0224299C - ldrsh r7, [r4, r5] - cmp r1, r7 - bne _0224299C - add r0, r2, #0 - pop {r4, r5, r6, r7} - bx lr -_0224299C: - add r2, r2, #1 - add r4, #8 - cmp r2, r3 - blt _0224298A -_022429A4: - mov r0, #0 - pop {r4, r5, r6, r7} - bx lr - nop -_022429AC: .word 0x0224610C -_022429B0: .word 0x022460AC - thumb_func_end ov94_02242970 - - thumb_func_start ov94_022429B4 -ov94_022429B4: ; 0x022429B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x28 - add r5, r0, #0 - str r1, [sp] - str r3, [sp, #4] - mov r0, #0x84 - mov r1, #0x3e - add r7, r2, #0 - bl sub_02013A04 - ldr r1, [sp, #4] - mov r2, #0xa7 - mov r3, #0 - str r0, [r5, #0] - bl sub_02013A4C - mov r0, #0x84 - mov r4, #1 - sub r6, r0, #1 - b _022429F0 -_022429DC: - sub r2, r4, #1 - lsl r3, r2, #1 - ldr r2, _02242A3C ; =0x02246174 - ldr r0, [r5, #0] - ldrh r2, [r2, r3] - add r1, r7, #0 - add r3, r4, #0 - bl sub_02013A4C - add r4, r4, #1 -_022429F0: - cmp r4, r6 - blt _022429DC - ldr r0, [r5, #0] - ldr r1, [sp, #4] - mov r2, #0xa8 - add r3, r6, #0 - bl sub_02013A4C - ldr r3, _02242A40 ; =0x0224608C - add r2, sp, #8 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - add r1, sp, #8 - mov r0, #0x84 - strh r0, [r1, #0x10] - ldr r0, [r5, #0] - mov r1, #1 - str r0, [sp, #8] - ldr r0, [sp] - mov r2, #0x1f - mov r3, #0xb - str r0, [sp, #0x14] - bl sub_0200DC48 - mov r1, #0 - add r0, sp, #8 - add r2, r1, #0 - mov r3, #0x3e - bl sub_0200112C - add sp, #0x28 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02242A3C: .word 0x02246174 -_02242A40: .word 0x0224608C - thumb_func_end ov94_022429B4 - - thumb_func_start ov94_02242A44 -ov94_02242A44: ; 0x02242A44 - cmp r1, #0 - bne _02242A50 - ldr r1, _02242A64 ; =0x00001150 - mov r2, #0 - str r2, [r0, r1] - bx lr -_02242A50: - sub r1, r1, #1 - cmp r1, #0x82 - bhs _02242A60 - lsl r2, r1, #1 - ldr r1, _02242A68 ; =0x02246174 - ldrh r2, [r1, r2] - ldr r1, _02242A64 ; =0x00001150 - str r2, [r0, r1] -_02242A60: - bx lr - nop -_02242A64: .word 0x00001150 -_02242A68: .word 0x02246174 - thumb_func_end ov94_02242A44 - - thumb_func_start ov94_02242A6C -ov94_02242A6C: ; 0x02242A6C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - bl sub_02001288 - add r6, r0, #0 - add r0, r5, #0 - add r1, sp, #0 - bl sub_020014D0 - add r0, sp, #0 - ldrh r1, [r4] - ldrh r0, [r0] - cmp r1, r0 - beq _02242A9E - ldr r0, _02242AA4 ; =0x0000FFFF - cmp r1, r0 - beq _02242A98 - ldr r0, _02242AA8 ; =0x000005DC - bl sub_02005748 -_02242A98: - add r0, sp, #0 - ldrh r0, [r0] - strh r0, [r4] -_02242A9E: - add r0, r6, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_02242AA4: .word 0x0000FFFF -_02242AA8: .word 0x000005DC - thumb_func_end ov94_02242A6C - - thumb_func_start ov94_02242AAC -ov94_02242AAC: ; 0x02242AAC - mov r2, #0 - add r3, r0, #0 - add r1, r2, #0 -_02242AB2: - strh r1, [r3, #4] - strh r1, [r3, #0x16] - add r2, r2, #1 - add r3, r3, #2 - cmp r2, #9 - blt _02242AB2 - strh r1, [r0] - strh r1, [r0, #2] - bx lr - thumb_func_end ov94_02242AAC - - thumb_func_start ov94_02242AC4 -ov94_02242AC4: ; 0x02242AC4 - lsl r1, r1, #1 - add r0, r0, r1 - strh r2, [r0, #4] - strh r3, [r0, #0x16] - bx lr - ; .align 2, 0 - thumb_func_end ov94_02242AC4 - - thumb_func_start ov94_02242AD0 -ov94_02242AD0: ; 0x02242AD0 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_02242D84 - ldr r0, [r4, #4] - bl ov94_02242B54 - add r0, r4, #0 - bl ov94_02242CAC - add r0, r4, #0 - bl ov94_02242D38 - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - add r0, r4, #0 - bl ov94_02245934 - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02242AD0 - - thumb_func_start ov94_02242B14 -ov94_02242B14: ; 0x02242B14 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223C4B4 - bl sub_020397B0 - ldr r1, [r4, #0x2c] - add r0, r4, #0 - lsl r2, r1, #2 - ldr r1, _02242B30 ; =0x022469A0 - ldr r1, [r1, r2] - blx r1 - pop {r4, pc} - nop -_02242B30: .word 0x022469A0 - thumb_func_end ov94_02242B14 - - thumb_func_start ov94_02242B34 -ov94_02242B34: ; 0x02242B34 - push {r4, lr} - add r4, r0, #0 - bl ov94_02242D98 - add r0, r4, #0 - bl ov94_02242D74 - ldr r0, [r4, #4] - bl ov94_02242C80 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02242B34 - - thumb_func_start ov94_02242B54 -ov94_02242B54: ; 0x02242B54 - push {r4, r5, lr} - sub sp, #0x9c - ldr r5, _02242C68 ; =0x02246278 - add r3, sp, #0x8c - add r4, r0, #0 - add r2, r3, #0 - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - add r0, r2, #0 - bl sub_02018368 - ldr r5, _02242C6C ; =0x022462C0 - add r3, sp, #0x70 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _02242C70 ; =0x022462A4 - add r3, sp, #0x54 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #1 - bl sub_02019EBC - ldr r5, _02242C74 ; =0x022462F8 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #2 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #2 - bl sub_02019EBC - ldr r5, _02242C78 ; =0x022462DC - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _02242C7C ; =0x02246288 - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #1 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x9c - pop {r4, r5, pc} - nop -_02242C68: .word 0x02246278 -_02242C6C: .word 0x022462C0 -_02242C70: .word 0x022462A4 -_02242C74: .word 0x022462F8 -_02242C78: .word 0x022462DC -_02242C7C: .word 0x02246288 - thumb_func_end ov94_02242B54 - - thumb_func_start ov94_02242C80 -ov94_02242C80: ; 0x02242C80 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_02242C80 - - thumb_func_start ov94_02242CAC -ov94_02242CAC: ; 0x02242CAC - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r4, [r5, #4] - mov r0, #0x60 - mov r1, #0 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - mov r0, #0x68 - add r2, r1, #0 - add r3, r1, #0 - bl sub_02006E84 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [r5, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - ldr r0, _02242D34 ; =0x00001090 - ldrh r0, [r5, r0] - cmp r0, #0 - bne _02242D24 - mov r0, #4 - mov r1, #0 - bl sub_02019120 - mov r0, #5 - mov r1, #0 - bl sub_02019120 - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF74 -_02242D24: - ldr r0, [r5, #0x20] - cmp r0, #9 - bne _02242D30 - add r0, r5, #0 - bl ov94_0223D068 -_02242D30: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02242D34: .word 0x00001090 - thumb_func_end ov94_02242CAC - - thumb_func_start ov94_02242D38 -ov94_02242D38: ; 0x02242D38 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - ldr r1, _02242D70 ; =0x00000EFC - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, _02242D70 ; =0x00000EFC - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - add sp, #0x14 - pop {r3, r4, pc} - nop -_02242D70: .word 0x00000EFC - thumb_func_end ov94_02242D38 - - thumb_func_start ov94_02242D74 -ov94_02242D74: ; 0x02242D74 - ldr r1, _02242D7C ; =0x00000EFC - ldr r3, _02242D80 ; =sub_0201A8FC - add r0, r0, r1 - bx r3 - ; .align 2, 0 -_02242D7C: .word 0x00000EFC -_02242D80: .word sub_0201A8FC - thumb_func_end ov94_02242D74 - - thumb_func_start ov94_02242D84 -ov94_02242D84: ; 0x02242D84 - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r4, r1] - pop {r4, pc} - thumb_func_end ov94_02242D84 - - thumb_func_start ov94_02242D98 -ov94_02242D98: ; 0x02242D98 - mov r1, #0xbb - lsl r1, r1, #4 - ldr r3, _02242DA4 ; =sub_020237BC - ldr r0, [r0, r1] - bx r3 - nop -_02242DA4: .word sub_020237BC - thumb_func_end ov94_02242D98 - - thumb_func_start ov94_02242DA8 -ov94_02242DA8: ; 0x02242DA8 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r1, [r4, #0x24] - cmp r1, #0xc - bhi _02242E80 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242DC0: ; jump table - .short _02242E80 - _02242DC0 - 2 ; case 0 - .short _02242E80 - _02242DC0 - 2 ; case 1 - .short _02242E80 - _02242DC0 - 2 ; case 2 - .short _02242E80 - _02242DC0 - 2 ; case 3 - .short _02242E80 - _02242DC0 - 2 ; case 4 - .short _02242E80 - _02242DC0 - 2 ; case 5 - .short _02242E80 - _02242DC0 - 2 ; case 6 - .short _02242DDA - _02242DC0 - 2 ; case 7 - .short _02242DF6 - _02242DC0 - 2 ; case 8 - .short _02242E12 - _02242DC0 - 2 ; case 9 - .short _02242E2E - _02242DC0 - 2 ; case 10 - .short _02242E50 - _02242DC0 - 2 ; case 11 - .short _02242E66 - _02242DC0 - 2 ; case 12 -_02242DDA: - ldr r1, _02242E90 ; =0x00000F0F - mov r2, #0x18 - str r1, [sp] - ldr r1, _02242E94 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #2 - bl ov94_0223C3F4 - b _02242E84 -_02242DF6: - ldr r1, _02242E90 ; =0x00000F0F - mov r2, #0x18 - str r1, [sp] - ldr r1, _02242E94 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #7 - bl ov94_0223C3F4 - b _02242E84 -_02242E12: - ldr r1, _02242E90 ; =0x00000F0F - mov r2, #0x18 - str r1, [sp] - ldr r1, _02242E94 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0xc - bl ov94_0223C3F4 - b _02242E84 -_02242E2E: - ldr r1, _02242E90 ; =0x00000F0F - mov r2, #0x18 - str r1, [sp] - ldr r1, _02242E94 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x12 - bl ov94_0223C3F4 - ldr r0, _02242E98 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - b _02242E84 -_02242E50: - ldr r1, _02242E90 ; =0x00000F0F - mov r2, #0x18 - str r1, [sp] - ldr r1, _02242E94 ; =0x00000B94 - mov r3, #0 - ldr r1, [r4, r1] - bl ov94_02245824 - mov r0, #0x18 - str r0, [r4, #0x2c] - b _02242E84 -_02242E66: - ldr r1, _02242E90 ; =0x00000F0F - mov r2, #0x8e - str r1, [sp] - ldr r1, _02242E94 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - mov r0, #1 - str r0, [r4, #0x18] - mov r0, #0x1d - str r0, [r4, #0x2c] - b _02242E84 -_02242E80: - bl sub_02022974 -_02242E84: - add r0, r4, #0 - bl ov94_0223C5D8 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02242E90: .word 0x00000F0F -_02242E94: .word 0x00000B94 -_02242E98: .word 0x000010B0 - thumb_func_end ov94_02242DA8 - - thumb_func_start ov94_02242E9C -ov94_02242E9C: ; 0x02242E9C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0207893C - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_0223B7E4 - mov r0, #3 - str r0, [r4, #0x2c] - ldr r0, _02242ECC ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #4 - mov r2, #6 - bl ov94_02243EC8 - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02242ECC: .word 0x00001484 - thumb_func_end ov94_02242E9C - - thumb_func_start ov94_02242ED0 -ov94_02242ED0: ; 0x02242ED0 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _02242F58 - bl ov94_0223B7D8 - ldr r1, _02242F74 ; =0x00001484 - mov r2, #0 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0xf - cmp r1, #0xf - bhi _02242F6E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242EFA: ; jump table - .short _02242F4A - _02242EFA - 2 ; case 0 - .short _02242F4A - _02242EFA - 2 ; case 1 - .short _02242F52 - _02242EFA - 2 ; case 2 - .short _02242F42 - _02242EFA - 2 ; case 3 - .short _02242F3A - _02242EFA - 2 ; case 4 - .short _02242F3A - _02242EFA - 2 ; case 5 - .short _02242F3A - _02242EFA - 2 ; case 6 - .short _02242F3A - _02242EFA - 2 ; case 7 - .short _02242F3A - _02242EFA - 2 ; case 8 - .short _02242F3A - _02242EFA - 2 ; case 9 - .short _02242F3A - _02242EFA - 2 ; case 10 - .short _02242F42 - _02242EFA - 2 ; case 11 - .short _02242F6E - _02242EFA - 2 ; case 12 - .short _02242F4A - _02242EFA - 2 ; case 13 - .short _02242F32 - _02242EFA - 2 ; case 14 - .short _02242F1A - _02242EFA - 2 ; case 15 -_02242F1A: - add r0, r4, #0 - mov r1, #1 - bl ov94_02243B08 - ldr r0, [r4, #0] - mov r1, #0x2c - ldr r0, [r0, #0x28] - bl sub_0202CF28 - mov r0, #0x1e - str r0, [r4, #0x2c] - b _02242F6E -_02242F32: - str r0, [r4, #0x3c] - mov r0, #0x26 - str r0, [r4, #0x2c] - b _02242F6E -_02242F3A: - str r0, [r4, #0x3c] - mov r0, #0x27 - str r0, [r4, #0x2c] - b _02242F6E -_02242F42: - str r0, [r4, #0x3c] - mov r0, #0x27 - str r0, [r4, #0x2c] - b _02242F6E -_02242F4A: - str r0, [r4, #0x3c] - mov r0, #0x26 - str r0, [r4, #0x2c] - b _02242F6E -_02242F52: - bl sub_02038A0C - b _02242F6E -_02242F58: - ldr r0, _02242F74 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _02242F6E - bl sub_02038A0C -_02242F6E: - mov r0, #3 - pop {r4, pc} - nop -_02242F74: .word 0x00001484 - thumb_func_end ov94_02242ED0 - - thumb_func_start ov94_02242F78 -ov94_02242F78: ; 0x02242F78 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B834 - mov r0, #5 - str r0, [r4, #0x2c] - ldr r0, _02242F94 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #1 - strh r0, [r4, #0x36] - mov r0, #3 - pop {r4, pc} - nop -_02242F94: .word 0x00001484 - thumb_func_end ov94_02242F78 - - thumb_func_start ov94_02242F98 -ov94_02242F98: ; 0x02242F98 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _02242FFE - bl ov94_0223B7D8 - ldr r1, _02243018 ; =0x00001484 - mov r2, #0 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0xf - cmp r1, #0xf - bhi _02243014 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02242FC2: ; jump table - .short _02242FF0 - _02242FC2 - 2 ; case 0 - .short _02242FF0 - _02242FC2 - 2 ; case 1 - .short _02242FF8 - _02242FC2 - 2 ; case 2 - .short _02242FE8 - _02242FC2 - 2 ; case 3 - .short _02243014 - _02242FC2 - 2 ; case 4 - .short _02243014 - _02242FC2 - 2 ; case 5 - .short _02243014 - _02242FC2 - 2 ; case 6 - .short _02243014 - _02242FC2 - 2 ; case 7 - .short _02243014 - _02242FC2 - 2 ; case 8 - .short _02243014 - _02242FC2 - 2 ; case 9 - .short _02242FF0 - _02242FC2 - 2 ; case 10 - .short _02242FE8 - _02242FC2 - 2 ; case 11 - .short _02242FF0 - _02242FC2 - 2 ; case 12 - .short _02242FF0 - _02242FC2 - 2 ; case 13 - .short _02242FF0 - _02242FC2 - 2 ; case 14 - .short _02242FE2 - _02242FC2 - 2 ; case 15 -_02242FE2: - mov r0, #0x21 - str r0, [r4, #0x2c] - b _02243014 -_02242FE8: - str r0, [r4, #0x3c] - mov r0, #0x27 - str r0, [r4, #0x2c] - b _02243014 -_02242FF0: - mov r0, #4 - bl sub_02038AE0 - b _02243014 -_02242FF8: - bl sub_02038A0C - b _02243014 -_02242FFE: - ldr r0, _02243018 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _02243014 - bl sub_02038A0C -_02243014: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02243018: .word 0x00001484 - thumb_func_end ov94_02242F98 - - thumb_func_start ov94_0224301C -ov94_0224301C: ; 0x0224301C - push {r4, lr} - add r4, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_0223B888 - mov r0, #8 - str r0, [r4, #0x2c] - ldr r0, _02243044 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - add r0, r4, #0 - mov r1, #9 - mov r2, #0xb - bl ov94_02243EC8 - mov r0, #3 - pop {r4, pc} - nop -_02243044: .word 0x00001484 - thumb_func_end ov94_0224301C - - thumb_func_start ov94_02243048 -ov94_02243048: ; 0x02243048 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _022430E0 - bl ov94_0223B7D8 - ldr r1, _022430FC ; =0x00001484 - mov r2, #0 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0xf - cmp r1, #0xf - bhi _022430F6 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02243072: ; jump table - .short _022430D2 - _02243072 - 2 ; case 0 - .short _022430D2 - _02243072 - 2 ; case 1 - .short _022430DA - _02243072 - 2 ; case 2 - .short _022430CA - _02243072 - 2 ; case 3 - .short _022430F6 - _02243072 - 2 ; case 4 - .short _022430F6 - _02243072 - 2 ; case 5 - .short _022430F6 - _02243072 - 2 ; case 6 - .short _022430F6 - _02243072 - 2 ; case 7 - .short _022430F6 - _02243072 - 2 ; case 8 - .short _022430F6 - _02243072 - 2 ; case 9 - .short _022430F6 - _02243072 - 2 ; case 10 - .short _022430C4 - _02243072 - 2 ; case 11 - .short _022430BE - _02243072 - 2 ; case 12 - .short _022430D2 - _02243072 - 2 ; case 13 - .short _022430F6 - _02243072 - 2 ; case 14 - .short _02243092 - _02243072 - 2 ; case 15 -_02243092: - ldr r0, _02243100 ; =0x00000251 - ldrsb r5, [r4, r0] - cmp r5, #0 - beq _022430A0 - mov r0, #0x18 - str r0, [r4, #0x2c] - b _022430F6 -_022430A0: - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0202DAAC - mov r1, #0x13 - lsl r1, r1, #4 - add r2, r0, #0 - add r0, r4, #0 - add r1, r4, r1 - add r3, r5, #0 - bl ov94_02243BC4 - mov r0, #0x1e - str r0, [r4, #0x2c] - b _022430F6 -_022430BE: - mov r0, #0x26 - str r0, [r4, #0x2c] - b _022430F6 -_022430C4: - mov r0, #0x26 - str r0, [r4, #0x2c] - b _022430F6 -_022430CA: - str r0, [r4, #0x3c] - mov r0, #0x27 - str r0, [r4, #0x2c] - b _022430F6 -_022430D2: - str r0, [r4, #0x3c] - mov r0, #0x26 - str r0, [r4, #0x2c] - b _022430F6 -_022430DA: - bl sub_02038A0C - b _022430F6 -_022430E0: - ldr r0, _022430FC ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _022430F6 - bl sub_02038A0C -_022430F6: - mov r0, #3 - pop {r3, r4, r5, pc} - nop -_022430FC: .word 0x00001484 -_02243100: .word 0x00000251 - thumb_func_end ov94_02243048 - - thumb_func_start ov94_02243104 -ov94_02243104: ; 0x02243104 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B96C - mov r0, #0xa - str r0, [r4, #0x2c] - ldr r0, _0224311C ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_0224311C: .word 0x00001484 - thumb_func_end ov94_02243104 - - thumb_func_start ov94_02243120 -ov94_02243120: ; 0x02243120 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _02243184 - bl ov94_0223B7D8 - ldr r1, _022431A0 ; =0x00001484 - mov r2, #0 - add r0, #0xf - str r2, [r4, r1] - cmp r0, #0xf - bhi _0224319A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02243148: ; jump table - .short _02243176 - _02243148 - 2 ; case 0 - .short _02243176 - _02243148 - 2 ; case 1 - .short _0224317E - _02243148 - 2 ; case 2 - .short _02243176 - _02243148 - 2 ; case 3 - .short _0224319A - _02243148 - 2 ; case 4 - .short _0224319A - _02243148 - 2 ; case 5 - .short _0224319A - _02243148 - 2 ; case 6 - .short _0224319A - _02243148 - 2 ; case 7 - .short _0224319A - _02243148 - 2 ; case 8 - .short _0224319A - _02243148 - 2 ; case 9 - .short _0224316E - _02243148 - 2 ; case 10 - .short _0224316E - _02243148 - 2 ; case 11 - .short _0224316E - _02243148 - 2 ; case 12 - .short _02243176 - _02243148 - 2 ; case 13 - .short _0224319A - _02243148 - 2 ; case 14 - .short _02243168 - _02243148 - 2 ; case 15 -_02243168: - mov r0, #0x21 - str r0, [r4, #0x2c] - b _0224319A -_0224316E: - mov r0, #3 - bl sub_02038AE0 - b _0224319A -_02243176: - mov r0, #4 - bl sub_02038AE0 - b _0224319A -_0224317E: - bl sub_02038A0C - b _0224319A -_02243184: - ldr r0, _022431A0 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _0224319A - bl sub_02038A0C -_0224319A: - mov r0, #3 - pop {r4, pc} - nop -_022431A0: .word 0x00001484 - thumb_func_end ov94_02243120 - - thumb_func_start ov94_022431A4 -ov94_022431A4: ; 0x022431A4 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_0207893C - mov r1, #0x12 - lsl r1, r1, #4 - ldr r2, [r4, r1] - add r0, r1, #4 - mul r0, r2 - add r2, r4, r0 - mov r0, #0xd7 - lsl r0, r0, #2 - ldr r0, [r2, r0] - mov r2, #0xa5 - add r1, #0x10 - lsl r2, r2, #4 - add r1, r4, r1 - add r2, r4, r2 - bl ov94_0223BA88 - add r0, r4, #0 - mov r1, #0xe - mov r2, #0x10 - bl ov94_02243EC8 - mov r0, #0xd - str r0, [r4, #0x2c] - ldr r0, _022431EC ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_022431EC: .word 0x00001484 - thumb_func_end ov94_022431A4 - - thumb_func_start ov94_022431F0 -ov94_022431F0: ; 0x022431F0 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _022432BA - bl ov94_0223B7D8 - ldr r2, _022432D4 ; =0x00001484 - mov r1, #0 - str r1, [r4, r2] - add r2, r0, #0 - add r2, #0xf - cmp r2, #0xf - bhi _022432D0 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224321A: ; jump table - .short _022432AC - _0224321A - 2 ; case 0 - .short _022432AC - _0224321A - 2 ; case 1 - .short _022432B4 - _0224321A - 2 ; case 2 - .short _022432A4 - _0224321A - 2 ; case 3 - .short _0224329C - _0224321A - 2 ; case 4 - .short _0224329C - _0224321A - 2 ; case 5 - .short _0224329C - _0224321A - 2 ; case 6 - .short _0224329C - _0224321A - 2 ; case 7 - .short _0224329C - _0224321A - 2 ; case 8 - .short _0224329C - _0224321A - 2 ; case 9 - .short _02243294 - _0224321A - 2 ; case 10 - .short _022432D0 - _0224321A - 2 ; case 11 - .short _022432D0 - _0224321A - 2 ; case 12 - .short _022432AC - _0224321A - 2 ; case 13 - .short _022432D0 - _0224321A - 2 ; case 14 - .short _0224323A - _0224321A - 2 ; case 15 -_0224323A: - mov r0, #0x1e - str r0, [r4, #0x2c] - add r0, r4, #0 - bl ov94_02243B08 - mov r2, #0x45 - lsl r2, r2, #2 - mov r1, #0xa5 - lsl r1, r1, #4 - ldrh r2, [r4, r2] - add r0, r4, #0 - add r1, r4, r1 - bl ov94_02243CE4 - ldr r0, [r4, #0] - mov r1, #0xa5 - lsl r1, r1, #4 - ldr r0, [r0, #0x18] - add r1, r4, r1 - bl ov94_02243E2C - ldr r0, [r4, #0] - mov r1, #0x19 - ldr r0, [r0, #0x28] - bl sub_0202CFEC - ldr r0, [r4, #0] - mov r1, #0xa5 - lsl r1, r1, #4 - ldr r0, [r0, #0x2c] - add r1, r4, r1 - bl ov94_02243E48 - ldr r0, [r4, #0] - mov r1, #0x18 - ldr r0, [r0, #0x28] - bl sub_0202CF28 - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_0202440C - bl sub_0206D104 - b _022432D0 -_02243294: - str r0, [r4, #0x3c] - mov r0, #0x11 - str r0, [r4, #0x2c] - b _022432D0 -_0224329C: - str r0, [r4, #0x3c] - mov r0, #0x27 - str r0, [r4, #0x2c] - b _022432D0 -_022432A4: - str r0, [r4, #0x3c] - mov r0, #0x27 - str r0, [r4, #0x2c] - b _022432D0 -_022432AC: - str r0, [r4, #0x3c] - mov r0, #0x26 - str r0, [r4, #0x2c] - b _022432D0 -_022432B4: - bl sub_02038A0C - b _022432D0 -_022432BA: - ldr r0, _022432D4 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _022432D0 - bl sub_02038A0C -_022432D0: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_022432D4: .word 0x00001484 - thumb_func_end ov94_022431F0 - - thumb_func_start ov94_022432D8 -ov94_022432D8: ; 0x022432D8 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223BAEC - mov r0, #0xf - str r0, [r4, #0x2c] - ldr r0, _022432F0 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_022432F0: .word 0x00001484 - thumb_func_end ov94_022432D8 - - thumb_func_start ov94_022432F4 -ov94_022432F4: ; 0x022432F4 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _02243358 - bl ov94_0223B7D8 - ldr r1, _02243374 ; =0x00001484 - mov r2, #0 - add r0, #0xf - str r2, [r4, r1] - cmp r0, #0xf - bhi _0224336E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224331C: ; jump table - .short _0224334A - _0224331C - 2 ; case 0 - .short _0224334A - _0224331C - 2 ; case 1 - .short _02243352 - _0224331C - 2 ; case 2 - .short _0224334A - _0224331C - 2 ; case 3 - .short _0224336E - _0224331C - 2 ; case 4 - .short _0224336E - _0224331C - 2 ; case 5 - .short _0224336E - _0224331C - 2 ; case 6 - .short _0224336E - _0224331C - 2 ; case 7 - .short _0224336E - _0224331C - 2 ; case 8 - .short _0224336E - _0224331C - 2 ; case 9 - .short _02243342 - _0224331C - 2 ; case 10 - .short _0224336E - _0224331C - 2 ; case 11 - .short _0224336E - _0224331C - 2 ; case 12 - .short _0224334A - _0224331C - 2 ; case 13 - .short _0224336E - _0224331C - 2 ; case 14 - .short _0224333C - _0224331C - 2 ; case 15 -_0224333C: - mov r0, #0x21 - str r0, [r4, #0x2c] - b _0224336E -_02243342: - mov r0, #3 - bl sub_02038AE0 - b _0224336E -_0224334A: - mov r0, #4 - bl sub_02038AE0 - b _0224336E -_02243352: - bl sub_02038A0C - b _0224336E -_02243358: - ldr r0, _02243374 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _0224336E - bl sub_02038A0C -_0224336E: - mov r0, #3 - pop {r4, pc} - nop -_02243374: .word 0x00001484 - thumb_func_end ov94_022432F4 - - thumb_func_start ov94_02243378 -ov94_02243378: ; 0x02243378 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_0223B8D8 - mov r0, #0x19 - str r0, [r4, #0x2c] - ldr r0, _02243394 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02243394: .word 0x00001484 - thumb_func_end ov94_02243378 - - thumb_func_start ov94_02243398 -ov94_02243398: ; 0x02243398 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - bne _022433A6 - b _02243528 -_022433A6: - bl ov94_0223B7D8 - ldr r1, _02243544 ; =0x00001484 - mov r2, #0 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0xf - cmp r1, #0x10 - bhi _02243408 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022433C4: ; jump table - .short _02243516 - _022433C4 - 2 ; case 0 - .short _02243516 - _022433C4 - 2 ; case 1 - .short _0224351E - _022433C4 - 2 ; case 2 - .short _02243516 - _022433C4 - 2 ; case 3 - .short _0224353E - _022433C4 - 2 ; case 4 - .short _0224353E - _022433C4 - 2 ; case 5 - .short _0224353E - _022433C4 - 2 ; case 6 - .short _0224353E - _022433C4 - 2 ; case 7 - .short _0224353E - _022433C4 - 2 ; case 8 - .short _0224353E - _022433C4 - 2 ; case 9 - .short _0224353E - _022433C4 - 2 ; case 10 - .short _022434C8 - _022433C4 - 2 ; case 11 - .short _0224345E - _022433C4 - 2 ; case 12 - .short _02243516 - _022433C4 - 2 ; case 13 - .short _0224353E - _022433C4 - 2 ; case 14 - .short _022433E6 - _022433C4 - 2 ; case 15 - .short _022433EC - _022433C4 - 2 ; case 16 -_022433E6: - mov r0, #0x1a - str r0, [r4, #0x2c] - b _0224353E -_022433EC: - mov r1, #0x13 - mov r0, #1 - lsl r1, r1, #4 - strh r0, [r4, #0x36] - add r0, r4, #0 - add r1, r4, r1 - bl ov94_02243E84 - cmp r0, #0 - beq _02243452 - cmp r0, #1 - beq _0224340A - cmp r0, #2 - beq _0224342E -_02243408: - b _0224353E -_0224340A: - add r0, r4, #0 - bl ov94_0223C5F4 - ldr r0, _02243548 ; =0x00000F0F - ldr r1, _0224354C ; =0x00000B94 - str r0, [sp] - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x1d - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x1c - bl ov94_0223C3F4 - b _0224353E -_0224342E: - add r0, r4, #0 - bl ov94_0223C5F4 - ldr r0, _02243548 ; =0x00000F0F - ldr r1, _0224354C ; =0x00000B94 - str r0, [sp] - ldr r1, [r4, r1] - add r0, r4, #0 - mov r2, #0x23 - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x1c - bl ov94_0223C3F4 - b _0224353E -_02243452: - mov r0, #0x12 - str r0, [r4, #0x2c] - ldr r0, _02243550 ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - b _0224353E -_0224345E: - strh r2, [r4, #0x36] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0202DA60 - cmp r0, #0 - beq _022434C0 - mov r0, #0x3e - bl sub_02073C74 - add r5, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - ldr r0, [r0, #0] - bl sub_0202DA70 - add r0, r5, #0 - bl sub_02076B10 - add r2, r0, #0 - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B5CC - mov r0, #2 - str r0, [r4, #0x28] - mov r0, #0x22 - str r0, [r4, #0x2c] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0202DAAC - add r2, r0, #0 - add r0, r4, #0 - add r1, r5, #0 - mov r3, #0 - bl ov94_02243BC4 - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0202DA68 - add r0, r5, #0 - bl sub_020181C4 - b _0224353E -_022434C0: - add r0, r4, #0 - bl ov94_0224362C - b _0224353E -_022434C8: - strh r2, [r4, #0x36] - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0202DA60 - cmp r0, #0 - beq _0224353E - mov r0, #0x3e - bl sub_02073C74 - add r5, r0, #0 - ldr r0, [r4, #0] - add r1, r5, #0 - ldr r0, [r0, #0] - bl sub_0202DA70 - add r0, r5, #0 - bl sub_02076B10 - add r2, r0, #0 - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #0 - bl sub_0200B5CC - mov r0, #3 - str r0, [r4, #0x28] - mov r0, #0x22 - str r0, [r4, #0x2c] - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0202DA68 - add r0, r5, #0 - bl sub_020181C4 - b _0224353E -_02243516: - str r0, [r4, #0x3c] - mov r0, #0x26 - str r0, [r4, #0x2c] - b _0224353E -_0224351E: - mov r0, #3 - mov r1, #1 - bl sub_02039834 - b _0224353E -_02243528: - ldr r0, _02243544 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _0224353E - bl sub_02038A0C -_0224353E: - mov r0, #3 - pop {r3, r4, r5, pc} - nop -_02243544: .word 0x00001484 -_02243548: .word 0x00000F0F -_0224354C: .word 0x00000B94 -_02243550: .word 0x000010B0 - thumb_func_end ov94_02243398 - - thumb_func_start ov94_02243554 -ov94_02243554: ; 0x02243554 - push {r4, lr} - mov r1, #1 - mov r2, #0 - add r4, r0, #0 - bl ov94_0223C4C0 - mov r0, #0x24 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_02243554 - - thumb_func_start ov94_02243568 -ov94_02243568: ; 0x02243568 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_0223B888 - mov r0, #0x1b - str r0, [r4, #0x2c] - ldr r0, _02243584 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02243584: .word 0x00001484 - thumb_func_end ov94_02243568 - - thumb_func_start ov94_02243588 -ov94_02243588: ; 0x02243588 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _0224360C - bl ov94_0223B7D8 - ldr r2, _02243628 ; =0x00001484 - mov r1, #0 - str r1, [r4, r2] - add r2, r0, #0 - add r2, #0xf - cmp r2, #0xf - bhi _02243604 - add r2, r2, r2 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_022435B2: ; jump table - .short _022435F2 - _022435B2 - 2 ; case 0 - .short _022435F2 - _022435B2 - 2 ; case 1 - .short _022435FC - _022435B2 - 2 ; case 2 - .short _022435F2 - _022435B2 - 2 ; case 3 - .short _02243604 - _022435B2 - 2 ; case 4 - .short _02243604 - _022435B2 - 2 ; case 5 - .short _02243604 - _022435B2 - 2 ; case 6 - .short _02243604 - _022435B2 - 2 ; case 7 - .short _02243604 - _022435B2 - 2 ; case 8 - .short _02243604 - _022435B2 - 2 ; case 9 - .short _02243604 - _022435B2 - 2 ; case 10 - .short _02243604 - _022435B2 - 2 ; case 11 - .short _022435EE - _022435B2 - 2 ; case 12 - .short _022435F2 - _022435B2 - 2 ; case 13 - .short _02243604 - _022435B2 - 2 ; case 14 - .short _022435D2 - _022435B2 - 2 ; case 15 -_022435D2: - add r0, r4, #0 - bl ov94_02243ED8 - cmp r0, #0 - beq _022435E8 - mov r0, #0x16 - str r0, [r4, #0x2c] - mov r0, #0 - strh r0, [r4, #0x36] - mov r0, #3 - pop {r4, pc} -_022435E8: - mov r0, #1 - strh r0, [r4, #0x36] - b _02243604 -_022435EE: - strh r1, [r4, #0x36] - b _02243604 -_022435F2: - str r0, [r4, #0x3c] - mov r0, #0x26 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} -_022435FC: - bl sub_02038A0C - mov r0, #3 - pop {r4, pc} -_02243604: - add r0, r4, #0 - bl ov94_0224362C - b _02243622 -_0224360C: - ldr r0, _02243628 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _02243622 - bl sub_02038A0C -_02243622: - mov r0, #3 - pop {r4, pc} - nop -_02243628: .word 0x00001484 - thumb_func_end ov94_02243588 - - thumb_func_start ov94_0224362C -ov94_0224362C: ; 0x0224362C - push {r4, lr} - add r4, r0, #0 - ldr r1, [r4, #0x1c] - cmp r1, #1 - beq _0224363C - cmp r1, #2 - beq _0224364A - pop {r4, pc} -_0224363C: - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #0x24 - str r0, [r4, #0x2c] - pop {r4, pc} -_0224364A: - mov r1, #2 - mov r2, #3 - bl ov94_0223C4C0 - mov r0, #0x24 - str r0, [r4, #0x2c] - pop {r4, pc} - thumb_func_end ov94_0224362C - - thumb_func_start ov94_02243658 -ov94_02243658: ; 0x02243658 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0202DAAC - ldr r3, _022436D0 ; =0x00000251 - mov r1, #0x13 - lsl r1, r1, #4 - add r2, r0, #0 - ldrsb r3, [r4, r3] - add r0, r4, #0 - add r1, r4, r1 - bl ov94_02243BC4 - ldr r0, [r4, #0] - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, #0x18] - add r1, r4, r1 - bl ov94_02243E2C - ldr r0, [r4, #0] - mov r1, #0x19 - ldr r0, [r0, #0x28] - bl sub_0202CFEC - ldr r0, [r4, #0] - mov r1, #0x13 - lsl r1, r1, #4 - ldr r0, [r0, #0x2c] - add r1, r4, r1 - bl ov94_02243E48 - ldr r0, [r4, #0] - mov r1, #0x18 - ldr r0, [r0, #0x28] - bl sub_0202CF28 - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_0202440C - bl sub_0206D104 - ldr r0, [r4, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0202DA68 - mov r0, #0x1e - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #0x13 - mov r2, #0xb - bl ov94_02243EC8 - mov r0, #3 - pop {r4, pc} - nop -_022436D0: .word 0x00000251 - thumb_func_end ov94_02243658 - - thumb_func_start ov94_022436D4 -ov94_022436D4: ; 0x022436D4 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B928 - mov r0, #0x14 - str r0, [r4, #0x2c] - ldr r0, _022436EC ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_022436EC: .word 0x00001484 - thumb_func_end ov94_022436D4 - - thumb_func_start ov94_022436F0 -ov94_022436F0: ; 0x022436F0 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _02243758 - bl ov94_0223B7D8 - ldr r1, _02243774 ; =0x00001484 - mov r2, #0 - str r2, [r4, r1] - add r1, r0, #0 - add r1, #0xf - cmp r1, #0xf - bhi _0224376E - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224371A: ; jump table - .short _0224374A - _0224371A - 2 ; case 0 - .short _0224374A - _0224371A - 2 ; case 1 - .short _02243752 - _0224371A - 2 ; case 2 - .short _02243748 - _0224371A - 2 ; case 3 - .short _0224376E - _0224371A - 2 ; case 4 - .short _0224376E - _0224371A - 2 ; case 5 - .short _0224376E - _0224371A - 2 ; case 6 - .short _0224376E - _0224371A - 2 ; case 7 - .short _0224376E - _0224371A - 2 ; case 8 - .short _0224376E - _0224371A - 2 ; case 9 - .short _0224376E - _0224371A - 2 ; case 10 - .short _02243748 - _0224371A - 2 ; case 11 - .short _02243740 - _0224371A - 2 ; case 12 - .short _0224374A - _0224371A - 2 ; case 13 - .short _0224376E - _0224371A - 2 ; case 14 - .short _0224373A - _0224371A - 2 ; case 15 -_0224373A: - mov r0, #0x21 - str r0, [r4, #0x2c] - b _0224376E -_02243740: - mov r0, #3 - bl sub_02038AE0 - b _0224376E -_02243748: - str r0, [r4, #0x3c] -_0224374A: - mov r0, #4 - bl sub_02038AE0 - b _0224376E -_02243752: - bl sub_02038A0C - b _0224376E -_02243758: - ldr r0, _02243774 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _0224376E - bl sub_02038A0C -_0224376E: - mov r0, #3 - pop {r4, pc} - nop -_02243774: .word 0x00001484 - thumb_func_end ov94_022436F0 - - thumb_func_start ov94_02243778 -ov94_02243778: ; 0x02243778 - mov r0, #3 - bx lr - thumb_func_end ov94_02243778 - - thumb_func_start ov94_0224377C -ov94_0224377C: ; 0x0224377C - push {r4, lr} - add r4, r0, #0 - mov r1, #1 - strh r1, [r4, #0x36] - mov r1, #9 - mov r2, #7 - bl ov94_0223C4C0 - mov r0, #0x24 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_0224377C - - thumb_func_start ov94_02243794 -ov94_02243794: ; 0x02243794 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - strh r1, [r4, #0x36] - mov r1, #9 - mov r2, #8 - bl ov94_0223C4C0 - mov r0, #0x24 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_02243794 - - thumb_func_start ov94_022437AC -ov94_022437AC: ; 0x022437AC - push {r4, lr} - mov r1, #9 - add r2, r1, #0 - add r4, r0, #0 - bl ov94_0223C4C0 - mov r0, #0x24 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_022437AC - - thumb_func_start ov94_022437C0 -ov94_022437C0: ; 0x022437C0 - push {r4, lr} - add r4, r0, #0 - mov r1, #0 - strh r1, [r4, #0x36] - mov r1, #9 - mov r2, #0xa - bl ov94_0223C4C0 - mov r0, #0x1e - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_022437C0 - - thumb_func_start ov94_022437D8 -ov94_022437D8: ; 0x022437D8 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B96C - mov r0, #0x17 - str r0, [r4, #0x2c] - ldr r0, _022437F0 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_022437F0: .word 0x00001484 - thumb_func_end ov94_022437D8 - - thumb_func_start ov94_022437F4 -ov94_022437F4: ; 0x022437F4 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _02243866 - bl ov94_0223B7D8 - ldr r1, _02243880 ; =0x00001484 - mov r2, #0 - add r0, #0xf - str r2, [r4, r1] - cmp r0, #0xf - bhi _0224387C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224381C: ; jump table - .short _02243858 - _0224381C - 2 ; case 0 - .short _02243858 - _0224381C - 2 ; case 1 - .short _02243860 - _0224381C - 2 ; case 2 - .short _02243858 - _0224381C - 2 ; case 3 - .short _0224387C - _0224381C - 2 ; case 4 - .short _0224387C - _0224381C - 2 ; case 5 - .short _0224387C - _0224381C - 2 ; case 6 - .short _0224387C - _0224381C - 2 ; case 7 - .short _0224387C - _0224381C - 2 ; case 8 - .short _0224387C - _0224381C - 2 ; case 9 - .short _02243850 - _0224381C - 2 ; case 10 - .short _0224384A - _0224381C - 2 ; case 11 - .short _02243844 - _0224381C - 2 ; case 12 - .short _02243858 - _0224381C - 2 ; case 13 - .short _0224387C - _0224381C - 2 ; case 14 - .short _0224383C - _0224381C - 2 ; case 15 -_0224383C: - add r0, r4, #0 - bl ov94_0224362C - b _0224387C -_02243844: - add r0, r4, #0 - bl ov94_0224362C -_0224384A: - add r0, r4, #0 - bl ov94_0224362C -_02243850: - mov r0, #3 - bl sub_02038AE0 - b _0224387C -_02243858: - mov r0, #4 - bl sub_02038AE0 - b _0224387C -_02243860: - bl sub_02038A0C - b _0224387C -_02243866: - ldr r0, _02243880 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _0224387C - bl sub_02038A0C -_0224387C: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02243880: .word 0x00001484 - thumb_func_end ov94_022437F4 - - thumb_func_start ov94_02243884 -ov94_02243884: ; 0x02243884 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _022438C0 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - ldr r1, _022438C4 ; =0x00000B94 - mov r2, #0x8d - ldr r1, [r4, r1] - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x24 - bl ov94_0223C3F4 - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - add r0, r4, #0 - bl ov94_0223C5F4 - add r0, r4, #0 - bl ov94_022442E4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_022438C0: .word 0x00000F0F -_022438C4: .word 0x00000B94 - thumb_func_end ov94_02243884 - - thumb_func_start ov94_022438C8 -ov94_022438C8: ; 0x022438C8 - push {r3, lr} - ldr r1, [r0, #0x3c] - mov r2, #0x94 - add r1, #0xf - cmp r1, #0xe - bhi _02243908 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022438E0: ; jump table - .short _02243908 - _022438E0 - 2 ; case 0 - .short _02243906 - _022438E0 - 2 ; case 1 - .short _02243908 - _022438E0 - 2 ; case 2 - .short _02243908 - _022438E0 - 2 ; case 3 - .short _022438FE - _022438E0 - 2 ; case 4 - .short _022438FE - _022438E0 - 2 ; case 5 - .short _022438FE - _022438E0 - 2 ; case 6 - .short _022438FE - _022438E0 - 2 ; case 7 - .short _022438FE - _022438E0 - 2 ; case 8 - .short _022438FE - _022438E0 - 2 ; case 9 - .short _02243908 - _022438E0 - 2 ; case 10 - .short _02243908 - _022438E0 - 2 ; case 11 - .short _02243908 - _022438E0 - 2 ; case 12 - .short _02243906 - _022438E0 - 2 ; case 13 - .short _02243902 - _022438E0 - 2 ; case 14 -_022438FE: - mov r2, #0x1a - b _02243908 -_02243902: - mov r2, #0x91 - b _02243908 -_02243906: - mov r2, #0x96 -_02243908: - ldr r1, _02243918 ; =0x00000F0F - mov r3, #1 - str r1, [sp] - ldr r1, _0224391C ; =0x00000B94 - ldr r1, [r0, r1] - bl ov94_02245824 - pop {r3, pc} - ; .align 2, 0 -_02243918: .word 0x00000F0F -_0224391C: .word 0x00000B94 - thumb_func_end ov94_022438C8 - - thumb_func_start ov94_02243920 -ov94_02243920: ; 0x02243920 - push {r4, lr} - add r4, r0, #0 - bl ov94_022438C8 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x24 - bl ov94_0223C3F4 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - add r0, r4, #0 - bl ov94_0223C5F4 - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02243920 - - thumb_func_start ov94_02243948 -ov94_02243948: ; 0x02243948 - push {r4, lr} - add r4, r0, #0 - bl ov94_022438C8 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x24 - bl ov94_0223C3F4 - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - add r0, r4, #0 - bl ov94_0223C5F4 - add r0, r4, #0 - bl ov94_022442E4 - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_02243948 - - thumb_func_start ov94_02243974 -ov94_02243974: ; 0x02243974 - push {r4, lr} - add r4, r0, #0 - mov r1, #0x25 - mov r2, #0x1e - bl ov94_0223C3F4 - add r0, r4, #0 - mov r1, #0x21 - mov r2, #0x24 - bl ov94_02243EC8 - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02243974 - - thumb_func_start ov94_02243990 -ov94_02243990: ; 0x02243990 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl sub_02024804 - ldr r0, [r4, #0] - mov r1, #2 - ldr r0, [r0, #0x20] - bl sub_02024814 - mov r0, #0x1f - str r0, [r4, #0x2c] - bl sub_0201D2E8 - ldr r1, _022439C8 ; =0x00000445 - bl sub_020E1F6C - lsl r0, r0, #0x10 - lsr r5, r0, #0x10 - cmp r5, #0x3c - blo _022439BC - bl sub_02022974 -_022439BC: - mov r0, #0x42 - add r1, r5, #2 - lsl r0, r0, #6 - str r1, [r4, r0] - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022439C8: .word 0x00000445 - thumb_func_end ov94_02243990 - - thumb_func_start ov94_022439CC -ov94_022439CC: ; 0x022439CC - mov r1, #0x42 - lsl r1, r1, #6 - ldr r2, [r0, r1] - sub r2, r2, #1 - str r2, [r0, r1] - ldr r1, [r0, r1] - cmp r1, #0 - bne _022439E0 - mov r1, #0x20 - str r1, [r0, #0x2c] -_022439E0: - mov r0, #3 - bx lr - thumb_func_end ov94_022439CC - - thumb_func_start ov94_022439E4 -ov94_022439E4: ; 0x022439E4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_02024828 - cmp r0, #1 - bne _022439FA - ldr r0, _02243A00 ; =0x00001088 - ldrh r0, [r4, r0] - str r0, [r4, #0x2c] -_022439FA: - mov r0, #3 - pop {r4, pc} - nop -_02243A00: .word 0x00001088 - thumb_func_end ov94_022439E4 - - thumb_func_start ov94_02243A04 -ov94_02243A04: ; 0x02243A04 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_02024828 - cmp r0, #2 - bne _02243A20 - ldr r0, _02243A24 ; =0x0000108A - ldrh r0, [r4, r0] - str r0, [r4, #0x2c] - add r0, r4, #0 - bl ov94_0223C5F4 -_02243A20: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02243A24: .word 0x0000108A - thumb_func_end ov94_02243A04 - - thumb_func_start ov94_02243A28 -ov94_02243A28: ; 0x02243A28 - push {r4, lr} - add r4, r0, #0 - bl sub_02024804 - ldr r0, [r4, #0] - mov r1, #2 - ldr r0, [r0, #0x20] - bl sub_02024814 - mov r0, #0x23 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02243A28 - - thumb_func_start ov94_02243A44 -ov94_02243A44: ; 0x02243A44 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_02024828 - cmp r0, #2 - bne _02243A82 - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - add r0, r4, #0 - bl ov94_0223C5F4 - ldr r0, _02243A88 ; =0x00000F0F - ldr r1, _02243A8C ; =0x00000B94 - str r0, [sp] - ldr r1, [r4, r1] - ldr r2, [r4, #0x28] - add r0, r4, #0 - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x25 - mov r2, #0x1c - bl ov94_0223C3F4 -_02243A82: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02243A88: .word 0x00000F0F -_02243A8C: .word 0x00000B94 - thumb_func_end ov94_02243A44 - - thumb_func_start ov94_02243A90 -ov94_02243A90: ; 0x02243A90 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_0223C5F4 - bl sub_02039794 - ldr r0, _02243AE4 ; =0x000010B0 - ldr r0, [r4, r0] - cmp r0, #1 - bne _02243AC0 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - b _02243AD8 -_02243AC0: - mov r0, #6 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 -_02243AD8: - mov r0, #0 - str r0, [r4, #0x2c] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - nop -_02243AE4: .word 0x000010B0 - thumb_func_end ov94_02243A90 - - thumb_func_start ov94_02243AE8 -ov94_02243AE8: ; 0x02243AE8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02243B04 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02243B00 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_02243B00: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02243B04: .word 0x00000BE4 - thumb_func_end ov94_02243AE8 - - thumb_func_start ov94_02243B08 -ov94_02243B08: ; 0x02243B08 - push {r4, r5, r6, lr} - add r6, r1, #0 - mov r1, #0x45 - add r5, r0, #0 - lsl r1, r1, #2 - ldrh r0, [r5, r1] - cmp r0, #0x12 - beq _02243B62 - mov r0, #0x3e - bl sub_02073C74 - mov r2, #0x45 - lsl r2, r2, #2 - add r4, r0, #0 - ldr r0, [r5, #0] - ldrh r1, [r5, r2] - add r2, r2, #2 - ldrh r2, [r5, r2] - ldr r0, [r0, #0xc] - bl sub_02079C9C - add r1, r4, #0 - bl sub_020774C8 - mov r2, #0x45 - ldr r0, [r5, #0] - lsl r2, r2, #2 - ldrh r2, [r5, r2] - ldr r0, [r0, #0] - add r1, r4, #0 - bl sub_0202DA7C - mov r2, #0x45 - lsl r2, r2, #2 - ldr r0, [r5, #0] - ldrh r1, [r5, r2] - add r2, r2, #2 - ldrh r2, [r5, r2] - ldr r0, [r0, #0xc] - bl sub_02079968 - add r0, r4, #0 - bl sub_020181C4 - b _02243BAA -_02243B62: - ldr r0, [r5, #0] - add r1, r1, #2 - ldrh r1, [r5, r1] - ldr r0, [r0, #8] - bl sub_0207A0FC - add r4, r0, #0 - bl sub_0207893C - mov r2, #0x45 - ldr r0, [r5, #0] - lsl r2, r2, #2 - ldrh r2, [r5, r2] - ldr r0, [r0, #0] - add r1, r4, #0 - bl sub_0202DA7C - ldr r1, _02243BBC ; =0x00000116 - ldr r0, [r5, #0] - ldrh r1, [r5, r1] - ldr r0, [r0, #8] - bl sub_0207A080 - ldr r0, [r5, #0] - ldr r1, _02243BC0 ; =0x000001B9 - ldr r0, [r0, #8] - bl sub_0207A230 - cmp r0, #0 - bne _02243BAA - ldr r0, [r5, #0] - ldr r0, [r0, #0x20] - bl sub_0202CC98 - bl sub_0202CCA8 -_02243BAA: - cmp r6, #0 - beq _02243BB8 - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl sub_0202DA68 -_02243BB8: - pop {r4, r5, r6, pc} - nop -_02243BBC: .word 0x00000116 -_02243BC0: .word 0x000001B9 - thumb_func_end ov94_02243B08 - - thumb_func_start ov94_02243BC4 -ov94_02243BC4: ; 0x02243BC4 - push {r0, r1, r2, r3} - push {r4, r5, r6, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #6 - mov r2, #0 - add r6, r3, #0 - bl sub_02074470 - ldr r0, [r5, #0] - add r1, r4, #0 - ldr r0, [r0, #0x20] - bl sub_0202F180 - mov r0, #0x12 - str r0, [sp, #0x20] - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - cmp r0, #6 - bne _02243BF8 - mov r0, #0 - str r0, [sp, #0x20] -_02243BF8: - cmp r6, #0 - beq _02243C74 - mov r1, #0x46 - add r0, sp, #0 - strb r1, [r0] - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - ldr r1, _02243CE0 ; =0x000001ED - cmp r0, r1 - bne _02243C56 - add r0, r4, #0 - mov r1, #0x6e - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _02243C3C - add r0, r4, #0 - mov r1, #0x99 - mov r2, #0 - bl sub_02074470 - cmp r0, #0x56 - bne _02243C56 - add r0, r4, #0 - mov r1, #0x6e - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _02243C56 -_02243C3C: - ldr r0, [r5, #0] - ldr r0, [r0, #0x20] - bl sub_020507E4 - add r6, r0, #0 - bl sub_0206B5F8 - cmp r0, #0 - bne _02243C56 - add r0, r6, #0 - mov r1, #1 - bl sub_0206B608 -_02243C56: - add r0, r4, #0 - mov r1, #9 - add r2, sp, #0 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0x6f - mov r2, #0 - bl sub_02074B30 - ldr r0, [r5, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl ov94_02243DE8 -_02243C74: - ldr r0, [sp, #0x20] - cmp r0, #0x12 - bne _02243C9C - ldr r0, [r5, #0] - add r1, r4, #0 - ldr r0, [r0, #8] - bl sub_0207A048 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - mov r1, #0x4a - mov r2, #0x12 - lsl r1, r1, #2 - str r2, [r5, r1] - sub r2, r0, #1 - add r0, r1, #4 - str r2, [r5, r0] - b _02243CCC -_02243C9C: - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r1, sp, #0x20 - ldr r0, [r0, #0xc] - add r2, sp, #4 - bl sub_020799F0 - add r0, r4, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r5, #0] - ldr r1, [sp, #0x20] - ldr r0, [r0, #0xc] - bl sub_020798A0 - mov r0, #0x4a - ldr r1, [sp, #0x20] - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r1, [sp, #4] - add r0, r0, #4 - str r1, [r5, r0] -_02243CCC: - ldr r0, [r5, #0] - mov r1, #0 - ldr r0, [r0, #0] - bl sub_0202DA68 - add sp, #8 - pop {r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 -_02243CE0: .word 0x000001ED - thumb_func_end ov94_02243BC4 - - thumb_func_start ov94_02243CE4 -ov94_02243CE4: ; 0x02243CE4 - push {r0, r1, r2, r3} - push {r4, r5, r6, lr} - sub sp, #8 - add r5, r0, #0 - ldr r0, [r5, #0] - add r4, r1, #0 - ldr r0, [r0, #0x20] - bl sub_0202F180 - mov r0, #0x12 - str r0, [sp, #0x20] - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - cmp r0, #6 - bne _02243D0A - mov r0, #0 - str r0, [sp, #0x20] -_02243D0A: - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - ldr r1, _02243DE4 ; =0x000001ED - cmp r0, r1 - bne _02243D5E - add r0, r4, #0 - mov r1, #0x6e - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _02243D44 - add r0, r4, #0 - mov r1, #0x99 - mov r2, #0 - bl sub_02074470 - cmp r0, #0x56 - bne _02243D5E - add r0, r4, #0 - mov r1, #0x6e - mov r2, #0 - bl sub_02074470 - cmp r0, #0 - bne _02243D5E -_02243D44: - ldr r0, [r5, #0] - ldr r0, [r0, #0x20] - bl sub_020507E4 - add r6, r0, #0 - bl sub_0206B5F8 - cmp r0, #0 - bne _02243D5E - add r0, r6, #0 - mov r1, #1 - bl sub_0206B608 -_02243D5E: - mov r1, #0x46 - add r0, sp, #0 - strb r1, [r0] - add r0, r4, #0 - mov r1, #9 - add r2, sp, #0 - bl sub_02074B30 - add r0, r4, #0 - mov r1, #0x6f - mov r2, #0 - bl sub_02074B30 - ldr r0, [sp, #0x20] - cmp r0, #0x12 - bne _02243DA0 - ldr r0, [r5, #0] - add r1, r4, #0 - ldr r0, [r0, #8] - bl sub_0207A048 - ldr r0, [r5, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - mov r1, #0x4a - mov r2, #0x12 - lsl r1, r1, #2 - str r2, [r5, r1] - sub r2, r0, #1 - add r0, r1, #4 - str r2, [r5, r0] - b _02243DD0 -_02243DA0: - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r5, #0] - add r1, sp, #0x20 - ldr r0, [r0, #0xc] - add r2, sp, #4 - bl sub_020799F0 - add r0, r4, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r5, #0] - ldr r1, [sp, #0x20] - ldr r0, [r0, #0xc] - bl sub_020798A0 - mov r0, #0x4a - ldr r1, [sp, #0x20] - lsl r0, r0, #2 - str r1, [r5, r0] - ldr r1, [sp, #4] - add r0, r0, #4 - str r1, [r5, r0] -_02243DD0: - ldr r0, [r5, #0] - mov r1, #1 - ldr r0, [r0, #0] - bl ov94_02243DE8 - add sp, #8 - pop {r4, r5, r6} - pop {r3} - add sp, #0x10 - bx r3 - ; .align 2, 0 -_02243DE4: .word 0x000001ED - thumb_func_end ov94_02243CE4 - - thumb_func_start ov94_02243DE8 -ov94_02243DE8: ; 0x02243DE8 - push {r4, r5, lr} - sub sp, #0x1c - add r5, r0, #0 - add r4, r1, #0 - add r0, sp, #0xc - add r1, sp, #0 - bl ov4_021D806C - ldr r0, [sp, #0x14] - ldr r3, [sp, #0x10] - lsl r0, r0, #0x18 - lsr r1, r0, #0x10 - ldr r0, [sp, #0xc] - lsl r3, r3, #0x18 - ldr r2, [sp, #0x18] - lsl r0, r0, #0x18 - lsr r3, r3, #8 - orr r0, r3 - orr r0, r1 - add r1, r2, #0 - orr r1, r0 - cmp r4, #1 - bne _02243E20 - add r0, r5, #0 - bl sub_0202DAA4 - add sp, #0x1c - pop {r4, r5, pc} -_02243E20: - add r0, r5, #0 - bl sub_0202DA94 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov94_02243DE8 - - thumb_func_start ov94_02243E2C -ov94_02243E2C: ; 0x02243E2C - push {r4, lr} - ldr r3, _02243E44 ; =0x0000011E - add r4, r1, #0 - add r2, r3, #1 - ldrb r1, [r4, r3] - add r3, r3, #5 - ldrb r2, [r4, r2] - ldrb r3, [r4, r3] - bl sub_02038FDC - pop {r4, pc} - nop -_02243E44: .word 0x0000011E - thumb_func_end ov94_02243E2C - - thumb_func_start ov94_02243E48 -ov94_02243E48: ; 0x02243E48 - push {r4, r5, lr} - sub sp, #0x1c - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - mov r1, #0x75 - add r2, sp, #4 - bl sub_02074470 - add r0, r4, #0 - bl sub_02075D6C - add r3, r0, #0 - mov r0, #0x3e - str r0, [sp] - add r0, #0xce - add r0, r4, r0 - add r4, #0xf6 - ldrb r1, [r4] - add r2, sp, #4 - bl sub_0202C1EC - add r1, r0, #0 - add r0, r5, #0 - mov r2, #4 - bl sub_0202B758 - add sp, #0x1c - pop {r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov94_02243E48 - - thumb_func_start ov94_02243E84 -ov94_02243E84: ; 0x02243E84 - push {r4, lr} - add r4, r0, #0 - add r0, r1, #0 - bl ov94_02241498 - cmp r0, #0 - beq _02243EA2 - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - cmp r0, #6 - bne _02243EA2 - mov r0, #2 - pop {r4, pc} -_02243EA2: - ldr r0, _02243EC4 ; =0x000010AC - ldrh r1, [r4, r0] - mov r0, #0x87 - lsl r0, r0, #2 - cmp r1, r0 - bne _02243EBE - ldr r0, [r4, #0] - ldr r0, [r0, #8] - bl sub_0207A0F8 - cmp r0, #6 - bne _02243EBE - mov r0, #1 - pop {r4, pc} -_02243EBE: - mov r0, #0 - pop {r4, pc} - nop -_02243EC4: .word 0x000010AC - thumb_func_end ov94_02243E84 - - thumb_func_start ov94_02243EC8 -ov94_02243EC8: ; 0x02243EC8 - ldr r3, _02243ED4 ; =0x00001088 - strh r1, [r0, r3] - add r1, r3, #2 - strh r2, [r0, r1] - bx lr - nop -_02243ED4: .word 0x00001088 - thumb_func_end ov94_02243EC8 - - thumb_func_start ov94_02243ED8 -ov94_02243ED8: ; 0x02243ED8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r0, [r0, #0] - bl sub_0202DA60 - cmp r0, #0 - bne _02243EF2 - ldrh r0, [r4, #0x36] - cmp r0, #0 - beq _02243EF2 - mov r0, #1 - pop {r4, pc} -_02243EF2: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02243ED8 - - thumb_func_start ov94_02243EF8 -ov94_02243EF8: ; 0x02243EF8 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x30 - add r5, r0, #0 - add r4, r1, #0 - bl ov94_0224432C - ldr r2, _02243F94 ; =0x00000D78 - add r0, sp, #0 - add r1, r5, #0 - add r2, r5, r2 - mov r3, #2 - bl ov94_0223C300 - mov r0, #2 - str r0, [sp, #0x28] - lsl r0, r0, #0x12 - str r0, [sp, #8] - ldr r0, _02243F98 ; =0x00182000 - str r0, [sp, #0xc] - add r0, sp, #0 - bl sub_02021AA0 - ldr r1, _02243F9C ; =0x00000ED4 - str r0, [r5, r1] - ldr r0, [r5, r1] - mov r1, #1 - bl sub_02021CC8 - ldr r0, _02243F9C ; =0x00000ED4 - mov r1, #7 - mul r1, r4 - ldr r0, [r5, r0] - add r1, r1, #3 - bl sub_02021D6C - ldr r0, _02243F9C ; =0x00000ED4 - mov r1, #1 - ldr r0, [r5, r0] - bl sub_02021CAC - ldr r4, _02243FA0 ; =0x02246322 - mov r7, #0 - mov r6, #0xe -_02243F4E: - add r0, sp, #0 - bl sub_02021AA0 - ldr r1, _02243FA4 ; =0x00000ED8 - str r0, [r5, r1] - add r0, r1, #0 - ldr r0, [r5, r0] - mov r1, #1 - bl sub_02021CC8 - ldr r0, _02243FA4 ; =0x00000ED8 - add r1, r6, #0 - ldr r0, [r5, r0] - bl sub_02021D6C - ldr r0, _02243FA4 ; =0x00000ED8 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02021CAC - ldr r0, _02243FA4 ; =0x00000ED8 - ldrh r1, [r4] - ldrh r2, [r4, #2] - ldr r0, [r5, r0] - bl ov94_022441A0 - add r7, r7, #1 - add r5, r5, #4 - add r6, r6, #4 - add r4, r4, #4 - cmp r7, #7 - blt _02243F4E - add sp, #0x30 - pop {r3, r4, r5, r6, r7, pc} - nop -_02243F94: .word 0x00000D78 -_02243F98: .word 0x00182000 -_02243F9C: .word 0x00000ED4 -_02243FA0: .word 0x02246322 -_02243FA4: .word 0x00000ED8 - thumb_func_end ov94_02243EF8 - - thumb_func_start ov94_02243FA8 -ov94_02243FA8: ; 0x02243FA8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - bl ov94_02243EF8 - ldr r0, _02243FE4 ; =ov94_0224400C - mov r1, #0x10 - mov r2, #5 - mov r3, #0x3e - bl sub_0200679C - ldr r1, _02243FE8 ; =0x0000108C - str r0, [r5, r1] - ldr r0, [r5, r1] - bl sub_0201CED0 - mov r1, #0 - add r2, r1, #0 - str r1, [r0, #0] - sub r2, #0x28 - str r2, [r0, #4] - str r4, [r0, #8] - str r5, [r0, #0xc] - bl ov94_02243FF0 - ldr r0, _02243FEC ; =0x0000062F - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_02243FE4: .word ov94_0224400C -_02243FE8: .word 0x0000108C -_02243FEC: .word 0x0000062F - thumb_func_end ov94_02243FA8 - - thumb_func_start ov94_02243FF0 -ov94_02243FF0: ; 0x02243FF0 - add r3, r0, #0 - ldr r2, [r3, #0xc] - ldr r0, _02244004 ; =0x00000ED4 - ldr r3, [r3, #8] - ldr r0, [r2, r0] - mov r2, #7 - mul r2, r3 - ldr r3, _02244008 ; =sub_02021D6C - add r1, r1, r2 - bx r3 - ; .align 2, 0 -_02244004: .word 0x00000ED4 -_02244008: .word sub_02021D6C - thumb_func_end ov94_02243FF0 - - thumb_func_start ov94_0224400C -ov94_0224400C: ; 0x0224400C - push {r4, r5, r6, lr} - add r4, r1, #0 - add r6, r0, #0 - ldr r0, [r4, #0] - ldr r5, [r4, #0xc] - cmp r0, #3 - bhi _022440A8 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02244026: ; jump table - .short _0224402E - _02244026 - 2 ; case 0 - .short _02244054 - _02244026 - 2 ; case 1 - .short _0224406E - _02244026 - 2 ; case 2 - .short _02244094 - _02244026 - 2 ; case 3 -_0224402E: - ldr r0, [r4, #4] - cmp r0, #0xa0 - ble _02244042 - mov r0, #0xa0 - str r0, [r4, #4] - mov r1, #1 - add r0, r4, #0 - str r1, [r4, #0] - bl ov94_02243FF0 -_02244042: - ldr r0, [r4, #4] - mov r1, #0x80 - add r2, r0, #5 - ldr r0, _022440AC ; =0x00000ED4 - str r2, [r4, #4] - ldr r0, [r5, r0] - bl ov94_022441A0 - pop {r4, r5, r6, pc} -_02244054: - ldr r0, _022440AC ; =0x00000ED4 - ldr r0, [r5, r0] - bl sub_02021FD0 - cmp r0, #0 - bne _022440A8 - add r0, r4, #0 - mov r1, #2 - bl ov94_02243FF0 - mov r0, #2 - str r0, [r4, #0] - pop {r4, r5, r6, pc} -_0224406E: - ldr r0, [r4, #4] - cmp r0, #0x82 - bge _02244082 - mov r0, #0x82 - str r0, [r4, #4] - mov r1, #3 - add r0, r4, #0 - str r1, [r4, #0] - bl ov94_02243FF0 -_02244082: - ldr r0, [r4, #4] - mov r1, #0x80 - sub r2, r0, #2 - ldr r0, _022440AC ; =0x00000ED4 - str r2, [r4, #4] - ldr r0, [r5, r0] - bl ov94_022441A0 - pop {r4, r5, r6, pc} -_02244094: - ldr r0, _022440B0 ; =0x0000060D - bl sub_02005748 - ldr r1, [r4, #0xc] - ldr r0, _022440B4 ; =0x00001090 - mov r2, #1 - strh r2, [r1, r0] - add r0, r6, #0 - bl sub_020067D0 -_022440A8: - pop {r4, r5, r6, pc} - nop -_022440AC: .word 0x00000ED4 -_022440B0: .word 0x0000060D -_022440B4: .word 0x00001090 - thumb_func_end ov94_0224400C - - thumb_func_start ov94_022440B8 -ov94_022440B8: ; 0x022440B8 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r1, #0 - ldr r0, _022440F0 ; =ov94_022440FC - mov r1, #0x10 - mov r2, #5 - mov r3, #0x3e - bl sub_0200679C - ldr r1, _022440F4 ; =0x0000108C - str r0, [r5, r1] - ldr r0, [r5, r1] - bl sub_0201CED0 - mov r1, #0 - str r1, [r0, #0] - mov r1, #0x82 - str r1, [r0, #4] - str r4, [r0, #8] - mov r1, #5 - str r5, [r0, #0xc] - bl ov94_02243FF0 - ldr r0, _022440F8 ; =0x0000060E - bl sub_02005748 - pop {r3, r4, r5, pc} - nop -_022440F0: .word ov94_022440FC -_022440F4: .word 0x0000108C -_022440F8: .word 0x0000060E - thumb_func_end ov94_022440B8 - - thumb_func_start ov94_022440FC -ov94_022440FC: ; 0x022440FC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - ldr r5, [r4, #0xc] - cmp r1, #3 - bhi _02244196 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02244114: ; jump table - .short _0224411C - _02244114 - 2 ; case 0 - .short _02244144 - _02244114 - 2 ; case 1 - .short _02244166 - _02244114 - 2 ; case 2 - .short _0224418C - _02244114 - 2 ; case 3 -_0224411C: - ldr r0, [r4, #4] - cmp r0, #0xa0 - ble _02244132 - mov r0, #0xa0 - str r0, [r4, #4] - mov r0, #1 - str r0, [r4, #0] - add r0, r4, #0 - mov r1, #6 - bl ov94_02243FF0 -_02244132: - ldr r0, [r4, #4] - mov r1, #0x80 - add r2, r0, #2 - ldr r0, _02244198 ; =0x00000ED4 - str r2, [r4, #4] - ldr r0, [r5, r0] - bl ov94_022441A0 - pop {r3, r4, r5, pc} -_02244144: - ldr r0, _02244198 ; =0x00000ED4 - ldr r0, [r5, r0] - bl sub_02021FD0 - cmp r0, #0 - bne _02244196 - add r0, r4, #0 - mov r1, #0 - bl ov94_02243FF0 - mov r0, #2 - str r0, [r4, #0] - mov r0, #0x63 - lsl r0, r0, #4 - bl sub_02005748 - pop {r3, r4, r5, pc} -_02244166: - mov r0, #0x13 - ldr r1, [r4, #4] - mvn r0, r0 - cmp r1, r0 - bge _0224417A - mov r1, #3 - add r0, r4, #0 - str r1, [r4, #0] - bl ov94_02243FF0 -_0224417A: - ldr r0, [r4, #4] - mov r1, #0x80 - sub r2, r0, #5 - ldr r0, _02244198 ; =0x00000ED4 - str r2, [r4, #4] - ldr r0, [r5, r0] - bl ov94_022441A0 - pop {r3, r4, r5, pc} -_0224418C: - ldr r1, _0224419C ; =0x00001090 - mov r2, #1 - strh r2, [r5, r1] - bl sub_020067D0 -_02244196: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244198: .word 0x00000ED4 -_0224419C: .word 0x00001090 - thumb_func_end ov94_022440FC - - thumb_func_start ov94_022441A0 -ov94_022441A0: ; 0x022441A0 - push {r4, r5, lr} - sub sp, #0xc - add r4, r0, #0 - add r5, r2, #0 - cmp r1, #0 - ble _022441BE - lsl r0, r1, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _022441CC -_022441BE: - lsl r0, r1, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_022441CC: - bl sub_020E1740 - sub r5, #8 - str r0, [sp] - cmp r5, #0 - ble _022441EA - lsl r0, r5, #0xc - bl sub_020E17B4 - add r1, r0, #0 - mov r0, #0x3f - lsl r0, r0, #0x18 - bl sub_020E0B00 - b _022441F8 -_022441EA: - lsl r0, r5, #0xc - bl sub_020E17B4 - mov r1, #0x3f - lsl r1, r1, #0x18 - bl sub_020E1A9C -_022441F8: - bl sub_020E1740 - mov r1, #1 - lsl r1, r1, #0x14 - add r0, r0, r1 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - add r0, r4, #0 - add r1, sp, #0 - bl sub_02021C50 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov94_022441A0 - - thumb_func_start ov94_02244214 -ov94_02244214: ; 0x02244214 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02244230 ; =0x0224633E - bl sub_02022664 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _0224422A - cmp r0, r4 - blt _0224422E -_0224422A: - mov r0, #0 - mvn r0, r0 -_0224422E: - pop {r4, pc} - ; .align 2, 0 -_02244230: .word 0x0224633E - thumb_func_end ov94_02244214 - - thumb_func_start ov94_02244234 -ov94_02244234: ; 0x02244234 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - str r0, [sp, #4] - str r1, [sp, #8] - str r2, [sp, #0xc] - add r0, r1, #0 - beq _0224424E - add r0, r2, #0 - cmp r0, #1 - bne _0224424E - ldr r0, _022442C8 ; =0x0000064F - bl sub_02005748 -_0224424E: - ldr r4, [sp, #4] - mov r0, #0xe - mov r6, #0 - str r0, [sp, #0x10] - add r5, r4, #0 - mov r7, #0x11 -_0224425A: - ldr r0, [sp, #8] - cmp r6, r0 - bge _022442A4 - ldr r0, _022442CC ; =0x0000034A - ldr r1, [sp, #4] - ldrb r0, [r4, r0] - mov r3, #0xdd - add r2, r1, #0 - str r0, [sp] - ldr r0, _022442D0 ; =0x00001098 - lsl r3, r3, #2 - ldr r0, [r1, r0] - ldr r1, _022442D4 ; =0x000010A0 - ldrb r3, [r4, r3] - ldr r1, [r2, r1] - add r2, r6, #0 - bl ov94_02244378 - ldr r0, [sp, #0xc] - cmp r0, #0 - ldr r0, _022442D8 ; =0x00000ED8 - beq _02244290 - ldr r0, [r5, r0] - ldr r1, [sp, #0x10] - bl sub_02021D6C - b _02244298 -_02244290: - ldr r0, [r5, r0] - add r1, r7, #0 - bl sub_02021D6C -_02244298: - ldr r0, _022442D8 ; =0x00000ED8 - mov r1, #1 - ldr r0, [r5, r0] - bl sub_02021CAC - b _022442AE -_022442A4: - ldr r0, _022442D8 ; =0x00000ED8 - mov r1, #0 - ldr r0, [r5, r0] - bl sub_02021CAC -_022442AE: - mov r0, #0x49 - lsl r0, r0, #2 - add r4, r4, r0 - ldr r0, [sp, #0x10] - add r6, r6, #1 - add r0, r0, #4 - str r0, [sp, #0x10] - add r5, r5, #4 - add r7, r7, #4 - cmp r6, #7 - blt _0224425A - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022442C8: .word 0x0000064F -_022442CC: .word 0x0000034A -_022442D0: .word 0x00001098 -_022442D4: .word 0x000010A0 -_022442D8: .word 0x00000ED8 - thumb_func_end ov94_02244234 - - thumb_func_start ov94_022442DC -ov94_022442DC: ; 0x022442DC - lsl r0, r0, #2 - add r0, #0xe - bx lr - ; .align 2, 0 - thumb_func_end ov94_022442DC - - thumb_func_start ov94_022442E4 -ov94_022442E4: ; 0x022442E4 - push {r3, r4, r5, r6, r7, lr} - ldr r7, _02244328 ; =0x00000ED8 - add r5, r0, #0 - mov r4, #0 -_022442EC: - ldr r0, [r5, r7] - bl sub_02021D34 - cmp r0, #0 - beq _0224431E - ldr r0, _02244328 ; =0x00000ED8 - ldr r0, [r5, r0] - bl sub_02021E24 - add r6, r0, #0 - add r0, r4, #0 - bl ov94_022442DC - add r0, r0, #1 - cmp r6, r0 - beq _0224431E - add r0, r4, #0 - bl ov94_022442DC - add r1, r0, #0 - ldr r0, _02244328 ; =0x00000ED8 - add r1, r1, #1 - ldr r0, [r5, r0] - bl sub_02021D6C -_0224431E: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #7 - blt _022442EC - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244328: .word 0x00000ED8 - thumb_func_end ov94_022442E4 - - thumb_func_start ov94_0224432C -ov94_0224432C: ; 0x0224432C - push {r3, r4, lr} - sub sp, #4 - ldr r2, _0224436C ; =0x000010A0 - add r4, r0, #0 - mov r0, #0x56 - mov r1, #7 - add r2, r4, r2 - mov r3, #0x3e - bl sub_02006F88 - ldr r3, _02244370 ; =0x0000109C - mov r1, #9 - str r0, [r4, r3] - mov r0, #0x3e - sub r3, r3, #4 - str r0, [sp] - mov r0, #0x56 - mov r2, #1 - add r3, r4, r3 - bl sub_02006F50 - ldr r1, _02244374 ; =0x00001094 - str r0, [r4, r1] - add r0, r1, #4 - mov r1, #2 - ldr r0, [r4, r0] - lsl r1, r1, #0xe - bl sub_020C2C54 - add sp, #4 - pop {r3, r4, pc} - nop -_0224436C: .word 0x000010A0 -_02244370: .word 0x0000109C -_02244374: .word 0x00001094 - thumb_func_end ov94_0224432C - - thumb_func_start ov94_02244378 -ov94_02244378: ; 0x02244378 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r6, r1, #0 - ldr r0, [sp, #0x18] - add r1, r3, #0 - add r5, r2, #0 - bl sub_0205CA0C - add r4, r0, #0 - mov r0, #6 - lsl r0, r0, #8 - ldr r1, [r7, #0x14] - mul r0, r4 - add r0, r1, r0 - ldr r1, _022443B4 ; =0x02246314 - lsl r2, r5, #1 - ldrh r1, [r1, r2] - mov r2, #2 - ldr r6, [r6, #0xc] - lsl r2, r2, #8 - bl sub_020C0314 - lsl r0, r4, #5 - add r1, r5, #2 - add r0, r6, r0 - lsl r1, r1, #5 - mov r2, #0x20 - bl sub_020C01B8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022443B4: .word 0x02246314 - thumb_func_end ov94_02244378 - - thumb_func_start ov94_022443B8 -ov94_022443B8: ; 0x022443B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _022443D8 ; =0x00001090 - ldrh r1, [r4, r0] - cmp r1, #0 - beq _022443D4 - add r0, #0xc - ldr r0, [r4, r0] - bl sub_020181C4 - ldr r0, _022443DC ; =0x00001094 - ldr r0, [r4, r0] - bl sub_020181C4 -_022443D4: - pop {r4, pc} - nop -_022443D8: .word 0x00001090 -_022443DC: .word 0x00001094 - thumb_func_end ov94_022443B8 - - thumb_func_start ov94_022443E0 -ov94_022443E0: ; 0x022443E0 - push {r4, lr} - mov r3, #0x45 - add r4, r0, #0 - lsl r3, r3, #2 - ldr r1, [r4, #0] - ldrh r2, [r4, r3] - add r3, r3, #2 - ldr r0, [r1, #8] - ldrh r3, [r4, r3] - ldr r1, [r1, #0xc] - bl ov94_022411DC - add r1, r4, #0 - add r1, #0xbc - str r0, [r1, #0] - add r0, r4, #0 - mov r1, #2 - add r0, #0xcd - strb r1, [r0] - add r0, r4, #0 - mov r2, #1 - add r0, #0xcf - strb r2, [r0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xd0 - strb r1, [r0] - add r0, r4, #0 - add r0, #0xce - strb r2, [r0] - add r0, r4, #0 - add r0, #0xd4 - strh r1, [r0] - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_0208C324 - add r1, r4, #0 - add r1, #0xe8 - str r0, [r1, #0] - ldr r0, [r4, #0] - ldr r1, [r0, #0x34] - add r0, r4, #0 - add r0, #0xd8 - str r1, [r0, #0] - ldr r0, [r4, #0] - ldr r1, [r0, #0x24] - add r0, r4, #0 - add r0, #0xc0 - str r1, [r0, #0] - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_0202D79C - add r1, r4, #0 - add r1, #0xdc - str r0, [r1, #0] - add r0, r4, #0 - ldr r1, _02244488 ; =0x02246360 - add r0, #0xbc - bl sub_0208D720 - ldr r1, [r4, #0] - add r0, r4, #0 - ldr r1, [r1, #0x1c] - add r0, #0xbc - bl sub_0208E9C0 - add r1, r4, #0 - ldr r0, _0224448C ; =0x020F410C - add r1, #0xbc - mov r2, #0x3e - bl sub_020067E8 - add r1, r4, #0 - add r1, #0xb8 - str r0, [r1, #0] - mov r0, #0x42 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #2 - pop {r4, pc} - nop -_02244488: .word 0x02246360 -_0224448C: .word 0x020F410C - thumb_func_end ov94_022443E0 - - thumb_func_start ov94_02244490 -ov94_02244490: ; 0x02244490 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - mov r4, #3 - bl sub_02006844 - cmp r0, #0 - beq _022444B8 - add r0, r5, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl sub_02006814 - ldr r2, [r5, #0x24] - add r0, r5, #0 - mov r1, #5 - bl ov94_0223C4C0 - mov r4, #4 -_022444B8: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov94_02244490 - - thumb_func_start ov94_022444BC -ov94_022444BC: ; 0x022444BC - push {r3, lr} - bl ov94_0223C4C8 - mov r0, #1 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov94_022444BC - - thumb_func_start ov94_022444C8 -ov94_022444C8: ; 0x022444C8 - push {r4, lr} - add r4, r0, #0 - mov r0, #0x3e - bl sub_02073C74 - ldr r1, _02244670 ; =0x000010A4 - str r0, [r4, r1] - ldr r0, [r4, #0x24] - cmp r0, #0xa - bls _022444DE - b _02244648 -_022444DE: - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_022444EA: ; jump table - .short _02244648 - _022444EA - 2 ; case 0 - .short _02244648 - _022444EA - 2 ; case 1 - .short _02244648 - _022444EA - 2 ; case 2 - .short _02244648 - _022444EA - 2 ; case 3 - .short _02244648 - _022444EA - 2 ; case 4 - .short _02244648 - _022444EA - 2 ; case 5 - .short _02244648 - _022444EA - 2 ; case 6 - .short _02244500 - _022444EA - 2 ; case 7 - .short _02244546 - _022444EA - 2 ; case 8 - .short _022445E0 - _022444EA - 2 ; case 9 - .short _0224458C - _022444EA - 2 ; case 10 -_02244500: - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_02076B10 - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xec - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_02244870 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0xf4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #3 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #2 - add r0, #0xfc - str r1, [r0, #0] - b _02244648 -_02244546: - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_02076B10 - add r1, r4, #0 - add r1, #0xf0 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xf0 - ldr r1, [r0, #0] - add r0, r4, #0 - add r0, #0xec - str r1, [r0, #0] - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_02244870 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0xf4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #3 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #4 - add r0, #0xfc - str r1, [r0, #0] - b _02244648 -_0224458C: - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl sub_02076B10 - add r1, r4, #0 - add r1, #0xf0 - str r0, [r1, #0] - ldr r0, [r4, #0] - ldr r1, _02244670 ; =0x000010A4 - ldr r0, [r0, #0] - ldr r1, [r4, r1] - bl sub_0202DA70 - ldr r0, _02244670 ; =0x000010A4 - ldr r0, [r4, r0] - bl sub_02076B10 - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - mov r0, #0x13 - lsl r0, r0, #4 - add r0, r4, r0 - bl ov94_02244870 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0xf4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #3 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #1 - add r0, #0xfc - str r1, [r0, #0] - b _02244648 -_022445E0: - ldr r0, [r4, #0] - ldr r1, [r4, r1] - ldr r0, [r0, #0] - bl sub_0202DA70 - ldr r0, _02244670 ; =0x000010A4 - ldr r0, [r4, r0] - bl sub_02076B10 - add r1, r4, #0 - add r1, #0xec - str r0, [r1, #0] - mov r0, #0x95 - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, r0, #4 - mul r0, r1 - add r0, r2, r0 - bl sub_02076B10 - add r1, r4, #0 - add r1, #0xf0 - str r0, [r1, #0] - mov r0, #0x95 - lsl r0, r0, #2 - add r2, r4, r0 - mov r0, #0x12 - lsl r0, r0, #4 - ldr r1, [r4, r0] - add r0, r0, #4 - mul r0, r1 - add r0, r2, r0 - bl ov94_02244870 - mov r1, #0x49 - lsl r1, r1, #2 - str r0, [r4, r1] - add r0, r4, #0 - ldr r1, [r4, r1] - add r0, #0xf4 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #3 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r4, #0 - mov r1, #1 - add r0, #0xfc - str r1, [r0, #0] -_02244648: - ldr r0, [r4, #0] - mov r2, #0x3e - ldr r1, [r0, #0x24] - mov r0, #1 - lsl r0, r0, #8 - str r1, [r4, r0] - add r1, r4, #0 - ldr r0, _02244674 ; =0x0224636C - add r1, #0xec - bl sub_020067E8 - add r1, r4, #0 - add r1, #0xb8 - str r0, [r1, #0] - mov r0, #0x42 - mov r1, #1 - lsl r0, r0, #2 - str r1, [r4, r0] - mov r0, #2 - pop {r4, pc} - ; .align 2, 0 -_02244670: .word 0x000010A4 -_02244674: .word 0x0224636C - thumb_func_end ov94_022444C8 - - thumb_func_start ov94_02244678 -ov94_02244678: ; 0x02244678 - push {r4, r5, r6, r7, lr} - sub sp, #0x34 - add r4, r0, #0 - ldr r0, [r4, #0x2c] - mov r6, #3 - cmp r0, #0 - beq _0224468E - cmp r0, #1 - bne _0224468C - b _0224480C -_0224468C: - b _02244842 -_0224468E: - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl sub_02006844 - cmp r0, #0 - bne _0224469E - b _02244842 -_0224469E: - add r0, r4, #0 - add r0, #0xb8 - ldr r0, [r0, #0] - bl sub_02006814 - ldr r1, [r4, #0x24] - cmp r1, #9 - bne _02244724 - add r0, r4, #0 - bl ov94_022448AC - mov r1, #6 - mov r2, #0 - add r7, r0, #0 - bl sub_02074470 - add r3, r0, #0 - add r0, sp, #0x30 - lsl r3, r3, #0x10 - str r0, [sp] - mov r0, #0 - add r1, r7, #0 - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02076B94 - str r0, [sp, #0x24] - cmp r0, #0 - beq _02244716 - ldr r5, [r4, #0] - ldr r0, [r5, #0x20] - bl sub_02056B24 - ldr r1, [r5, #0x3c] - ldr r2, [sp, #0x24] - str r1, [sp] - ldr r1, [r5, #0x10] - str r1, [sp, #4] - ldr r1, [r5, #0x30] - str r1, [sp, #8] - ldr r1, [r5, #0x28] - str r1, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x30] - add r1, r7, #0 - str r0, [sp, #0x14] - mov r0, #4 - str r0, [sp, #0x18] - mov r0, #0x3e - str r0, [sp, #0x1c] - ldr r3, [r5, #0x24] - mov r0, #0 - bl sub_0207AE68 - mov r1, #0x41 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #1 - str r0, [r4, #0x2c] - b _02244842 -_02244716: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r6, #4 - b _02244842 -_02244724: - cmp r1, #8 - beq _0224472C - cmp r1, #0xa - bne _022447FE -_0224472C: - add r0, r4, #0 - bl ov94_022448AC - add r7, r0, #0 - mov r0, #0x3e - bl sub_02073C74 - str r0, [sp, #0x20] - ldr r0, [r4, #0] - ldr r1, [sp, #0x20] - ldr r0, [r0, #0] - bl sub_0202DA70 - add r0, r7, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074470 - add r5, r0, #0 - ldr r0, [sp, #0x20] - mov r1, #5 - mov r2, #0 - bl sub_02074470 - cmp r5, r0 - bne _0224477A - mov r1, #0 - add r0, r7, #0 - add r2, r1, #0 - bl sub_02074470 - add r5, r0, #0 - mov r1, #0 - ldr r0, [sp, #0x20] - add r2, r1, #0 - bl sub_02074470 - cmp r5, r0 - beq _022447EA -_0224477A: - add r0, r7, #0 - mov r1, #6 - mov r2, #0 - bl sub_02074470 - add r3, r0, #0 - add r0, sp, #0x2c - lsl r3, r3, #0x10 - str r0, [sp] - mov r0, #0 - add r1, r7, #0 - mov r2, #1 - lsr r3, r3, #0x10 - bl sub_02076B94 - str r0, [sp, #0x28] - cmp r0, #0 - beq _022447DC - ldr r5, [r4, #0] - ldr r0, [r5, #0x20] - bl sub_02056B24 - ldr r1, [r5, #0x3c] - ldr r2, [sp, #0x28] - str r1, [sp] - ldr r1, [r5, #0x10] - str r1, [sp, #4] - ldr r1, [r5, #0x30] - str r1, [sp, #8] - ldr r1, [r5, #0x28] - str r1, [sp, #0xc] - str r0, [sp, #0x10] - ldr r0, [sp, #0x2c] - add r1, r7, #0 - str r0, [sp, #0x14] - mov r0, #4 - str r0, [sp, #0x18] - mov r0, #0x3e - str r0, [sp, #0x1c] - ldr r3, [r5, #0x24] - mov r0, #0 - bl sub_0207AE68 - mov r1, #0x41 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #1 - str r0, [r4, #0x2c] - b _022447F6 -_022447DC: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r6, #4 - b _022447F6 -_022447EA: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r6, #4 -_022447F6: - ldr r0, [sp, #0x20] - bl sub_020181C4 - b _02244842 -_022447FE: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r6, #4 - b _02244842 -_0224480C: - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207B0D0 - cmp r0, #0 - beq _02244842 - mov r0, #0x41 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0207B0E0 - add r0, r4, #0 - bl ov94_022448E8 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02244848 ; =0xFFFF1FFF - and r0, r1 - str r0, [r2, #0] - add r0, r4, #0 - mov r1, #7 - mov r2, #0xc - bl ov94_0223C4C0 - mov r6, #4 -_02244842: - add r0, r6, #0 - add sp, #0x34 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02244848: .word 0xFFFF1FFF - thumb_func_end ov94_02244678 - - thumb_func_start ov94_0224484C -ov94_0224484C: ; 0x0224484C - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224486C ; =0x000010A4 - ldr r0, [r4, r0] - bl sub_020181C4 - mov r0, #0x49 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_020181C4 - add r0, r4, #0 - bl ov94_0223C4C8 - mov r0, #1 - pop {r4, pc} - ; .align 2, 0 -_0224486C: .word 0x000010A4 - thumb_func_end ov94_0224484C - - thumb_func_start ov94_02244870 -ov94_02244870: ; 0x02244870 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3e - bl sub_02025E6C - add r4, r0, #0 - bl sub_02025E8C - mov r1, #0x43 - lsl r1, r1, #2 - add r0, r4, #0 - add r1, r5, r1 - bl sub_02025EC0 - ldr r1, _022448A4 ; =0x00000122 - add r0, r4, #0 - ldrb r1, [r5, r1] - bl sub_02025FD0 - ldr r1, _022448A8 ; =0x00000123 - add r0, r4, #0 - ldrb r1, [r5, r1] - bl sub_02025FDC - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022448A4: .word 0x00000122 -_022448A8: .word 0x00000123 - thumb_func_end ov94_02244870 - - thumb_func_start ov94_022448AC -ov94_022448AC: ; 0x022448AC - push {r3, lr} - cmp r1, #9 - bne _022448C6 - mov r1, #0x95 - lsl r1, r1, #2 - add r3, r0, r1 - mov r1, #0x12 - lsl r1, r1, #4 - ldr r2, [r0, r1] - add r0, r1, #4 - mul r0, r2 - add r0, r3, r0 - pop {r3, pc} -_022448C6: - cmp r1, #0xa - bne _022448D2 - mov r1, #0x13 - lsl r1, r1, #4 - add r0, r0, r1 - pop {r3, pc} -_022448D2: - cmp r1, #8 - bne _022448DE - mov r1, #0x13 - lsl r1, r1, #4 - add r0, r0, r1 - pop {r3, pc} -_022448DE: - bl sub_02022974 - mov r0, #0 - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov94_022448AC - - thumb_func_start ov94_022448E8 -ov94_022448E8: ; 0x022448E8 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - ldr r1, [r5, #0x24] - bl ov94_022448AC - mov r2, #0x4a - lsl r2, r2, #2 - add r4, r0, #0 - ldr r0, [r5, r2] - cmp r0, #0x12 - bne _02244918 - ldr r0, [r5, #0] - add r1, r2, #4 - ldr r0, [r0, #8] - ldr r1, [r5, r1] - bl sub_0207A0FC - add r1, r0, #0 - add r0, r4, #0 - bl sub_020775EC - add sp, #8 - pop {r3, r4, r5, pc} -_02244918: - mov r0, #0 - str r0, [sp, #4] - str r0, [sp] - ldr r0, [r5, #0] - ldr r1, [r5, r2] - add r2, r2, #4 - ldr r0, [r0, #0xc] - ldr r2, [r5, r2] - bl sub_02079968 - ldr r0, [r5, #0] - add r1, sp, #4 - ldr r0, [r0, #0xc] - add r2, sp, #0 - bl sub_020799F0 - add r0, r4, #0 - bl sub_02076B10 - add r2, r0, #0 - ldr r0, [r5, #0] - ldr r1, [sp, #4] - ldr r0, [r0, #0xc] - bl sub_020798A0 - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov94_022448E8 - - thumb_func_start ov94_02244950 -ov94_02244950: ; 0x02244950 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov94_02244F2C - mov r0, #6 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #4] - bl ov94_02244A7C - add r0, r4, #0 - bl ov94_02244B8C - add r0, r4, #0 - bl ov94_02244E48 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - mov r0, #2 - mov r1, #1 - bl sub_0201FF0C - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF74 - mov r0, #2 - mov r1, #1 - bl sub_0201FF74 - ldr r0, [r4, #0] - ldr r0, [r0, #0x20] - bl sub_02038438 - add r0, r4, #0 - bl ov94_02245934 - bl ov4_021D7A8C - cmp r0, #0 - bne _022449EA - ldr r0, [r4, #0] - ldr r0, [r0, #0x40] - cmp r0, #0 - beq _022449E4 - ldr r0, _022449F4 ; =0x00000F0F - ldr r1, _022449F8 ; =0x00000B9C - str r0, [sp] - mov r2, #1 - ldr r1, [r4, r1] - add r0, r4, #0 - add r3, r2, #0 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0xc - mov r2, #2 - bl ov94_0223C3F4 - add r0, r4, #0 - bl ov94_0223C5D8 - b _022449EE -_022449E4: - mov r0, #0 - str r0, [r4, #0x2c] - b _022449EE -_022449EA: - mov r0, #0x11 - str r0, [r4, #0x2c] -_022449EE: - mov r0, #2 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_022449F4: .word 0x00000F0F -_022449F8: .word 0x00000B9C - thumb_func_end ov94_02244950 - - thumb_func_start ov94_022449FC -ov94_022449FC: ; 0x022449FC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl ov94_0223C4B4 - bl sub_020397B0 - ldr r4, [r5, #0x2c] - ldr r1, _02244A28 ; =0x02246A40 - lsl r2, r4, #2 - ldr r1, [r1, r2] - add r0, r5, #0 - blx r1 - ldr r1, [r5, #0x2c] - cmp r4, r1 - beq _02244A26 - mov r1, #0x52 - mov r2, #0 - lsl r1, r1, #6 - strh r2, [r5, r1] - add r1, r1, #2 - strh r2, [r5, r1] -_02244A26: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02244A28: .word 0x02246A40 - thumb_func_end ov94_022449FC - - thumb_func_start ov94_02244A2C -ov94_02244A2C: ; 0x02244A2C - push {r4, lr} - add r4, r0, #0 - ldr r0, _02244A74 ; =0x00001154 - ldr r0, [r4, r0] - cmp r0, #0 - beq _02244A46 - bl sub_0200DA58 - ldr r0, _02244A74 ; =0x00001154 - mov r1, #0 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] -_02244A46: - add r0, r4, #0 - bl ov94_02244F64 - add r0, r4, #0 - bl ov94_02244F00 - ldr r0, [r4, #4] - bl ov94_02244B68 - ldr r0, _02244A78 ; =0x00001158 - mov r1, #0 - str r1, [r4, r0] - add r0, r4, #0 - bl ov94_0223C4C8 - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _02244A6E - mov r0, #5 - pop {r4, pc} -_02244A6E: - mov r0, #1 - pop {r4, pc} - nop -_02244A74: .word 0x00001154 -_02244A78: .word 0x00001158 - thumb_func_end ov94_02244A2C - - thumb_func_start ov94_02244A7C -ov94_02244A7C: ; 0x02244A7C - push {r3, r4, r5, lr} - sub sp, #0x70 - ldr r5, _02244B58 ; =0x022463B4 - add r4, r0, #0 - ldmia r5!, {r0, r1} - add r3, sp, #0x54 - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #0 - str r0, [r3, #0] - add r0, r4, #0 - add r3, r1, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0 - bl sub_0201FF0C - add r0, r4, #0 - mov r1, #0 - bl sub_02019EBC - ldr r5, _02244B5C ; =0x02246398 - add r3, sp, #0x38 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #1 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0 - bl sub_0201FF0C - ldr r5, _02244B60 ; =0x022463D0 - add r3, sp, #0x1c - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #4 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - mov r1, #0 - bl sub_0201FF74 - add r0, r4, #0 - mov r1, #4 - bl sub_02019EBC - ldr r5, _02244B64 ; =0x0224637C - add r3, sp, #0 - ldmia r5!, {r0, r1} - add r2, r3, #0 - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldmia r5!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r5, #0] - mov r1, #5 - str r0, [r3, #0] - add r0, r4, #0 - mov r3, #0 - bl sub_020183C4 - mov r0, #2 - mov r1, #0 - bl sub_0201FF74 - mov r0, #0 - mov r1, #0x20 - add r2, r0, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #4 - mov r1, #0x20 - mov r2, #0 - mov r3, #0x3e - bl sub_02019690 - mov r0, #0x10 - mov r1, #0 - bl sub_0201FF74 - add sp, #0x70 - pop {r3, r4, r5, pc} - nop -_02244B58: .word 0x022463B4 -_02244B5C: .word 0x02246398 -_02244B60: .word 0x022463D0 -_02244B64: .word 0x0224637C - thumb_func_end ov94_02244A7C - - thumb_func_start ov94_02244B68 -ov94_02244B68: ; 0x02244B68 - push {r4, lr} - add r4, r0, #0 - mov r1, #5 - bl sub_02019044 - add r0, r4, #0 - mov r1, #4 - bl sub_02019044 - add r0, r4, #0 - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - mov r1, #0 - bl sub_02019044 - pop {r4, pc} - thumb_func_end ov94_02244B68 - - thumb_func_start ov94_02244B8C -ov94_02244B8C: ; 0x02244B8C - push {r4, r5, r6, r7, lr} - sub sp, #0x3c - str r0, [sp, #0x10] - ldr r4, [r0, #4] - mov r0, #0x5c - mov r1, #0x3e - bl sub_02006C24 - mov r2, #0 - str r2, [sp] - mov r1, #0x3e - str r1, [sp, #4] - mov r1, #3 - add r3, r2, #0 - str r0, [sp, #0x2c] - bl sub_02007130 - mov r3, #0 - str r3, [sp] - mov r0, #0x3e - str r0, [sp, #4] - ldr r0, [sp, #0x2c] - mov r1, #3 - mov r2, #4 - bl sub_02007130 - mov r1, #0x1a - mov r0, #0 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - mov r1, #0x1a - mov r0, #4 - lsl r1, r1, #4 - mov r2, #0x3e - bl sub_02002E98 - ldr r0, [sp, #0x10] - ldr r0, [r0, #0] - ldr r0, [r0, #0x24] - bl sub_02027B50 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r1, #0 - mov r2, #1 - mov r3, #0xa - bl sub_0200DD0C - mov r1, #0 - str r1, [sp] - mov r0, #0x3e - str r0, [sp, #4] - add r0, r4, #0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DAA4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - ldr r0, [sp, #0x2c] - mov r1, #2 - add r2, r4, #0 - mov r3, #1 - bl sub_020070E8 - mov r1, #0 - mov r0, #6 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - ldr r0, [sp, #0x2c] - mov r1, #5 - add r2, r4, #0 - mov r3, #1 - bl sub_0200710C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - str r0, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - ldr r0, [sp, #0x2c] - mov r1, #0xa - add r2, r4, #0 - mov r3, #5 - bl sub_020070E8 - mov r1, #0 - mov r0, #6 - str r1, [sp] - lsl r0, r0, #8 - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #0x3e - str r0, [sp, #0xc] - ldr r0, [sp, #0x2c] - mov r1, #0xb - add r2, r4, #0 - mov r3, #5 - bl sub_0200710C - mov r0, #0 - add r1, r0, #0 - bl sub_0201975C - mov r0, #4 - mov r1, #0 - bl sub_0201975C - mov r2, #0xcb - ldr r1, _02244DA0 ; =0x00001154 - ldr r0, [sp, #0x10] - lsl r2, r2, #2 - add r0, r0, r1 - mov r1, #0 - bl sub_020C4CF4 - ldr r0, [sp, #0x2c] - mov r1, #4 - add r2, sp, #0x38 - mov r3, #0x3e - bl sub_020071EC - add r4, r0, #0 - ldr r0, [sp, #0x38] - ldr r2, _02244DA4 ; =0x0000115C - ldr r1, [sp, #0x10] - ldr r0, [r0, #0xc] - add r1, r1, r2 - mov r2, #0x80 - bl sub_020C4B18 - ldr r0, [sp, #0x38] - ldr r2, _02244DA8 ; =0x000011DC - ldr r1, [sp, #0x10] - ldr r0, [r0, #0xc] - add r1, r1, r2 - mov r2, #0x80 - bl sub_020C4B18 - add r0, r4, #0 - bl sub_020181C4 - mov r0, #0 - str r0, [sp, #0x24] - str r0, [sp, #0x28] - ldr r1, _02244DA8 ; =0x000011DC - ldr r0, [sp, #0x10] - add r0, r0, r1 - str r0, [sp, #0x18] - ldr r0, [sp, #0x10] - sub r1, #0x80 - add r0, r0, r1 - str r0, [sp, #0x14] -_02244CDC: - mov r0, #0 - str r0, [sp, #0x20] - str r0, [sp, #0x1c] - ldr r0, [sp, #0x28] - add r0, r0, #1 - lsl r1, r0, #5 - ldr r0, [sp, #0x10] - add r0, r0, r1 - str r0, [sp, #0x30] -_02244CEE: - ldr r0, [sp, #0x24] - cmp r0, #0x15 - blt _02244CF8 - bl sub_02022974 -_02244CF8: - ldr r0, [sp, #0x30] - mov r7, #1 - add r4, r0, #2 - ldr r0, [sp, #0x18] - add r6, r0, #2 - ldr r0, [sp, #0x14] - add r5, r0, #2 - ldr r0, [sp, #0x20] - asr r0, r0, #8 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp, #0x34] -_02244D10: - ldr r0, _02244DA4 ; =0x0000115C - ldr r3, [sp, #0x34] - ldrh r0, [r4, r0] - add r1, r6, #0 - mov r2, #1 - str r0, [sp] - add r0, r5, #0 - bl sub_0200393C - add r7, r7, #1 - add r4, r4, #2 - add r6, r6, #2 - add r5, r5, #2 - cmp r7, #0x10 - blt _02244D10 - ldr r0, [sp, #0x18] - add r0, #0x20 - str r0, [sp, #0x18] - ldr r0, [sp, #0x24] - add r0, r0, #1 - str r0, [sp, #0x24] - ldr r0, [sp, #0x1c] - cmp r0, #1 - beq _02244D5A - mov r0, #3 - ldr r1, [sp, #0x20] - lsl r0, r0, #8 - add r1, r1, r0 - mov r0, #1 - lsl r0, r0, #0xc - str r1, [sp, #0x20] - cmp r1, r0 - blt _02244CEE - str r0, [sp, #0x20] - mov r0, #1 - str r0, [sp, #0x1c] - b _02244CEE -_02244D5A: - ldr r0, [sp, #0x14] - add r0, #0x20 - str r0, [sp, #0x14] - ldr r0, [sp, #0x28] - add r0, r0, #1 - str r0, [sp, #0x28] - cmp r0, #3 - blt _02244CDC - ldr r1, _02244DA8 ; =0x000011DC - ldr r0, [sp, #0x10] - add r0, r0, r1 - mov r1, #0x2a - lsl r1, r1, #4 - bl sub_020C2C54 - ldr r1, _02244DAC ; =0x00001158 - ldr r0, [sp, #0x10] - mov r2, #1 - str r2, [r0, r1] - sub r2, r1, #4 - ldr r1, [sp, #0x10] - ldr r0, _02244DB0 ; =ov94_02244DB4 - add r1, r1, r2 - mov r2, #0x14 - bl sub_0200DA04 - ldr r2, _02244DA0 ; =0x00001154 - ldr r1, [sp, #0x10] - str r0, [r1, r2] - ldr r0, [sp, #0x2c] - bl sub_02006CA8 - add sp, #0x3c - pop {r4, r5, r6, r7, pc} - nop -_02244DA0: .word 0x00001154 -_02244DA4: .word 0x0000115C -_02244DA8: .word 0x000011DC -_02244DAC: .word 0x00001158 -_02244DB0: .word ov94_02244DB4 - thumb_func_end ov94_02244B8C - - thumb_func_start ov94_02244DB4 -ov94_02244DB4: ; 0x02244DB4 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _02244E3C - ldr r0, _02244E40 ; =0x0000032B - mov r1, #1 - ldrb r2, [r4, r0] - eor r2, r1 - strb r2, [r4, r0] - ldrb r2, [r4, r0] - tst r1, r2 - bne _02244E3C - sub r0, r0, #3 - ldrsh r0, [r4, r0] - add r1, r4, #0 - add r1, #0x88 - lsl r0, r0, #5 - add r0, r1, r0 - mov r1, #0 - mov r2, #0x20 - bl sub_020C00B4 - mov r0, #0xca - lsl r0, r0, #2 - ldrsh r0, [r4, r0] - add r1, r4, #0 - add r1, #0x88 - lsl r0, r0, #5 - add r0, r1, r0 - mov r1, #0 - mov r2, #0x20 - bl sub_020C0108 - ldr r0, _02244E44 ; =0x0000032A - ldrsb r1, [r4, r0] - cmp r1, #0 - bne _02244E20 - sub r1, r0, #2 - ldrsh r1, [r4, r1] - add r2, r1, #1 - sub r1, r0, #2 - strh r2, [r4, r1] - ldrsh r1, [r4, r1] - cmp r1, #0x15 - blt _02244E3C - mov r2, #0x13 - sub r1, r0, #2 - strh r2, [r4, r1] - ldrsb r2, [r4, r0] - mov r1, #1 - eor r1, r2 - strb r1, [r4, r0] - pop {r4, pc} -_02244E20: - sub r1, r0, #2 - ldrsh r1, [r4, r1] - sub r2, r1, #1 - sub r1, r0, #2 - strh r2, [r4, r1] - ldrsh r1, [r4, r1] - cmp r1, #0 - bge _02244E3C - mov r2, #1 - sub r1, r0, #2 - strh r2, [r4, r1] - ldrsb r1, [r4, r0] - eor r1, r2 - strb r1, [r4, r0] -_02244E3C: - pop {r4, pc} - nop -_02244E40: .word 0x0000032B -_02244E44: .word 0x0000032A - thumb_func_end ov94_02244DB4 - - thumb_func_start ov94_02244E48 -ov94_02244E48: ; 0x02244E48 - push {r3, r4, lr} - sub sp, #0x14 - mov r3, #4 - add r4, r0, #0 - str r3, [sp] - mov r0, #0x17 - str r0, [sp, #4] - mov r0, #0x10 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x94 - ldr r1, _02244EEC ; =0x00000F2C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - bl sub_0201A7E8 - ldr r0, _02244EEC ; =0x00000F2C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r0, #1 - str r0, [sp] - mov r0, #0x18 - str r0, [sp, #4] - mov r0, #2 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x81 - lsl r0, r0, #2 - ldr r1, _02244EF0 ; =0x00000F1C - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #4 - bl sub_0201A7E8 - ldr r0, _02244EF0 ; =0x00000F1C - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - mov r3, #1 - ldr r0, _02244EF4 ; =0x000F0E00 - str r3, [sp] - str r0, [sp, #4] - ldr r1, _02244EF8 ; =0x00000BB4 - ldr r0, _02244EF0 ; =0x00000F1C - ldr r1, [r4, r1] - add r0, r4, r0 - mov r2, #0 - bl ov94_022458CC - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - str r0, [sp, #8] - mov r0, #0xd - str r0, [sp, #0xc] - mov r0, #0x28 - ldr r1, _02244EFC ; =0x00000EFC - str r0, [sp, #0x10] - ldr r0, [r4, #4] - add r1, r4, r1 - mov r2, #0 - mov r3, #2 - bl sub_0201A7E8 - ldr r0, _02244EFC ; =0x00000EFC - mov r1, #0 - add r0, r4, r0 - bl sub_0201ADA4 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_02244EEC: .word 0x00000F2C -_02244EF0: .word 0x00000F1C -_02244EF4: .word 0x000F0E00 -_02244EF8: .word 0x00000BB4 -_02244EFC: .word 0x00000EFC - thumb_func_end ov94_02244E48 - - thumb_func_start ov94_02244F00 -ov94_02244F00: ; 0x02244F00 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02244F20 ; =0x00000EFC - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _02244F24 ; =0x00000F1C - add r0, r4, r0 - bl sub_0201A8FC - ldr r0, _02244F28 ; =0x00000F2C - add r0, r4, r0 - bl sub_0201A8FC - pop {r4, pc} - nop -_02244F20: .word 0x00000EFC -_02244F24: .word 0x00000F1C -_02244F28: .word 0x00000F2C - thumb_func_end ov94_02244F00 - - thumb_func_start ov94_02244F2C -ov94_02244F2C: ; 0x02244F2C - push {r4, lr} - add r4, r0, #0 - mov r0, #0xb4 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbb - lsl r1, r1, #4 - str r0, [r4, r1] - mov r0, #1 - lsl r0, r0, #8 - mov r1, #0x3e - bl sub_02023790 - mov r1, #0xbe - lsl r1, r1, #4 - str r0, [r4, r1] - sub r1, #0x4c - ldr r0, [r4, r1] - mov r1, #0x1f - bl sub_0200B1EC - ldr r1, _02244F60 ; =0x00000BB4 - str r0, [r4, r1] - pop {r4, pc} - nop -_02244F60: .word 0x00000BB4 - thumb_func_end ov94_02244F2C - - thumb_func_start ov94_02244F64 -ov94_02244F64: ; 0x02244F64 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02244F88 ; =0x00000BB4 - ldr r0, [r4, r0] - bl sub_020237BC - mov r0, #0xbe - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - mov r0, #0xbb - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl sub_020237BC - pop {r4, pc} - nop -_02244F88: .word 0x00000BB4 - thumb_func_end ov94_02244F64 - - thumb_func_start ov94_02244F8C -ov94_02244F8C: ; 0x02244F8C - push {r3, r4, lr} - sub sp, #4 - ldr r1, _02244FBC ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xba - lsl r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0x11 - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0xd - mov r2, #1 - bl ov94_0223C3F4 - ldr r0, _02244FC0 ; =0x000010AE - mov r1, #1 - strh r1, [r4, r0] - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_02244FBC: .word 0x00000F0F -_02244FC0: .word 0x000010AE - thumb_func_end ov94_02244F8C - - thumb_func_start ov94_02244FC4 -ov94_02244FC4: ; 0x02244FC4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - ldr r0, _02245020 ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02245018 - sub r1, r1, #1 - cmp r0, r1 - bne _02244FF6 - bl sub_0203848C - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #0xb - str r0, [r4, #0x2c] - b _02245018 -_02244FF6: - ldr r0, _02245024 ; =0x00000F0F - ldr r1, _02245028 ; =0x00000B9C - str r0, [sp] - mov r2, #1 - ldr r1, [r4, r1] - add r0, r4, #0 - add r3, r2, #0 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0xc - mov r2, #2 - bl ov94_0223C3F4 - add r0, r4, #0 - bl ov94_0223C5D8 -_02245018: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_02245020: .word 0x00001070 -_02245024: .word 0x00000F0F -_02245028: .word 0x00000B9C - thumb_func_end ov94_02244FC4 - - thumb_func_start ov94_0224502C -ov94_0224502C: ; 0x0224502C - push {r3, r4, lr} - sub sp, #4 - ldr r1, _02245054 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - ldr r1, _02245058 ; =0x00000B94 - mov r2, #7 - ldr r1, [r4, r1] - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0xd - mov r2, #0x10 - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_02245054: .word 0x00000F0F -_02245058: .word 0x00000B94 - thumb_func_end ov94_0224502C - - thumb_func_start ov94_0224505C -ov94_0224505C: ; 0x0224505C - push {r4, lr} - add r4, r0, #0 - ldr r0, _022450BC ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _022450B8 - sub r1, r1, #1 - cmp r0, r1 - bne _0224509A - bl ov4_021D7A8C - cmp r0, #0 - bne _02245086 - mov r0, #0 - str r0, [r4, #0x2c] - b _022450B8 -_02245086: - add r0, r4, #0 - mov r1, #7 - mov r2, #0xb - bl ov94_0223C4C0 - mov r0, #1 - str r0, [r4, #0x1c] - mov r0, #0xb - str r0, [r4, #0x2c] - b _022450B8 -_0224509A: - bl ov4_021D7A8C - cmp r0, #0 - beq _022450A6 - bl ov4_021D7DB0 -_022450A6: - bl sub_0203848C - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #0xb - str r0, [r4, #0x2c] -_022450B8: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_022450BC: .word 0x00001070 - thumb_func_end ov94_0224505C - - thumb_func_start ov94_022450C0 -ov94_022450C0: ; 0x022450C0 - push {r3, r4, lr} - sub sp, #4 - ldr r1, _022450E8 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xba - lsl r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0x1a - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0xc - mov r2, #0x12 - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_022450E8: .word 0x00000F0F - thumb_func_end ov94_022450C0 - - thumb_func_start ov94_022450EC -ov94_022450EC: ; 0x022450EC - push {r4, lr} - add r4, r0, #0 - bl sub_0203848C - bl ov4_021D7DB0 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #0x13 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_022450EC - - thumb_func_start ov94_0224510C -ov94_0224510C: ; 0x0224510C - push {r3, r4, lr} - sub sp, #4 - ldr r1, _02245134 ; =0x00000F0F - add r4, r0, #0 - str r1, [sp] - mov r1, #0xba - lsl r1, r1, #4 - ldr r1, [r4, r1] - mov r2, #0x1b - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0x14 - mov r2, #0xb - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_02245134: .word 0x00000F0F - thumb_func_end ov94_0224510C - - thumb_func_start ov94_02245138 -ov94_02245138: ; 0x02245138 - push {r4, lr} - add r4, r0, #0 - add r0, #0x54 - mov r1, #2 - mov r2, #1 - mov r3, #0x14 - bl ov4_021D78C8 - mov r0, #2 - bl ov4_021D792C - bl ov4_021D797C - mov r0, #3 - str r0, [r4, #0x2c] - pop {r4, pc} - thumb_func_end ov94_02245138 - - thumb_func_start ov94_02245158 -ov94_02245158: ; 0x02245158 - push {r4, lr} - sub sp, #0x48 - add r4, r0, #0 - bl ov4_021D7AE4 - bl ov4_021D7A8C - cmp r0, #0 - beq _022451D6 - bl ov4_021D7BFC - cmp r0, #8 - bhi _022451B6 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224517E: ; jump table - .short _022451B6 - _0224517E - 2 ; case 0 - .short _022451B6 - _0224517E - 2 ; case 1 - .short _022451B6 - _0224517E - 2 ; case 2 - .short _022451B6 - _0224517E - 2 ; case 3 - .short _022451CC - _0224517E - 2 ; case 4 - .short _022451B6 - _0224517E - 2 ; case 5 - .short _022451B6 - _0224517E - 2 ; case 6 - .short _02245190 - _0224517E - 2 ; case 7 - .short _022451B6 - _0224517E - 2 ; case 8 -_02245190: - add r0, sp, #8 - add r1, sp, #4 - bl ov4_021D75F4 - str r0, [r4, #0x40] - ldr r0, [sp, #8] - str r0, [r4, #0x44] - ldr r0, [sp, #4] - str r0, [r4, #0x48] - bl ov4_021D76E8 - bl ov4_021D7DB0 - add r0, r4, #0 - bl ov94_0223C5F4 - mov r0, #0x17 - str r0, [r4, #0x2c] - b _022451D6 -_022451B6: - add r0, sp, #0 - bl ov4_021D75D4 - add r0, r4, #0 - bl ov94_0223C5F4 - mov r0, #0x15 - str r0, [r4, #0x2c] - sub r0, #0x17 - str r0, [r4, #0x3c] - b _022451D6 -_022451CC: - add r0, sp, #0xc - bl ov4_021D7EB8 - mov r0, #4 - str r0, [r4, #0x2c] -_022451D6: - mov r0, #3 - add sp, #0x48 - pop {r4, pc} - thumb_func_end ov94_02245158 - - thumb_func_start ov94_022451DC -ov94_022451DC: ; 0x022451DC - push {r4, lr} - add r4, r0, #0 - bl ov4_021D81DC - mov r0, #5 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - thumb_func_end ov94_022451DC - - thumb_func_start ov94_022451EC -ov94_022451EC: ; 0x022451EC - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - bl ov4_021D82A0 - cmp r0, #5 - bhi _0224528C - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02245206: ; jump table - .short _02245218 - _02245206 - 2 ; case 0 - .short _0224528C - _02245206 - 2 ; case 1 - .short _0224528C - _02245206 - 2 ; case 2 - .short _02245212 - _02245206 - 2 ; case 3 - .short _02245218 - _02245206 - 2 ; case 4 - .short _02245218 - _02245206 - 2 ; case 5 -_02245212: - mov r0, #6 - str r0, [r4, #0x2c] - b _0224528C -_02245218: - add r0, r4, #0 - bl ov94_0223C5F4 - add r0, sp, #4 - add r1, sp, #0 - bl ov4_021D75F4 - str r0, [r4, #0x40] - ldr r0, [sp, #4] - str r0, [r4, #0x44] - bl ov4_021D76E8 - bl ov4_021D7DB0 - mov r0, #0x17 - str r0, [r4, #0x2c] - ldr r1, [sp] - cmp r1, #7 - bhi _0224527A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224524A: ; jump table - .short _0224527A - _0224524A - 2 ; case 0 - .short _0224525A - _0224524A - 2 ; case 1 - .short _0224525A - _0224524A - 2 ; case 2 - .short _0224526C - _0224524A - 2 ; case 3 - .short _0224525E - _0224524A - 2 ; case 4 - .short _02245276 - _0224524A - 2 ; case 5 - .short _02245268 - _0224524A - 2 ; case 6 - .short _02245276 - _0224524A - 2 ; case 7 -_0224525A: - str r0, [r4, #0x2c] - b _0224527A -_0224525E: - bl ov4_021E55B0 - mov r0, #0x17 - str r0, [r4, #0x2c] - b _0224527A -_02245268: - str r0, [r4, #0x2c] - b _0224527A -_0224526C: - bl ov4_021D8E8C - mov r0, #0x17 - str r0, [r4, #0x2c] - b _0224527A -_02245276: - bl sub_02038A0C -_0224527A: - ldr r1, [sp, #4] - ldr r0, _02245294 ; =0xFFFFB1E0 - cmp r1, r0 - bge _0224528C - ldr r0, _02245298 ; =0xFFFF8AD1 - cmp r1, r0 - blt _0224528C - mov r0, #0x17 - str r0, [r4, #0x2c] -_0224528C: - mov r0, #3 - add sp, #8 - pop {r4, pc} - nop -_02245294: .word 0xFFFFB1E0 -_02245298: .word 0xFFFF8AD1 - thumb_func_end ov94_022451EC - - thumb_func_start ov94_0224529C -ov94_0224529C: ; 0x0224529C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #0x14] - bl sub_0202AD28 - add r4, r0, #0 - ldr r0, [r5, #0] - ldr r0, [r0, #4] - bl sub_02025D74 - cmp r0, #0 - bne _022452C0 - ldr r1, [r5, #0] - ldr r0, [r1, #4] - ldr r1, [r1, #0x38] - bl sub_02025D78 -_022452C0: - ldr r0, [r5, #0] - ldr r0, [r0, #4] - bl sub_02025D74 - add r6, r0, #0 - add r0, r4, #0 - bl sub_020A471C - add r3, r0, #0 - add r2, r1, #0 - add r0, r6, #0 - add r1, r3, #0 - bl ov94_0223B140 - mov r0, #7 - str r0, [r5, #0x2c] - mov r0, #3 - pop {r4, r5, r6, pc} - thumb_func_end ov94_0224529C - - thumb_func_start ov94_022452E4 -ov94_022452E4: ; 0x022452E4 - push {r4, lr} - add r4, r0, #0 - bl ov94_0223BB40 - mov r0, #8 - str r0, [r4, #0x2c] - ldr r0, _022452FC ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_022452FC: .word 0x00001484 - thumb_func_end ov94_022452E4 - - thumb_func_start ov94_02245300 -ov94_02245300: ; 0x02245300 - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - beq _0224539A - bl ov94_0223B7D8 - add r5, r0, #0 - ldr r0, _022453B4 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - add r0, r5, #0 - add r0, #0xf - cmp r0, #0x11 - bhi _0224538E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224532C: ; jump table - .short _02245372 - _0224532C - 2 ; case 0 - .short _02245380 - _0224532C - 2 ; case 1 - .short _0224538E - _0224532C - 2 ; case 2 - .short _02245372 - _0224532C - 2 ; case 3 - .short _0224538E - _0224532C - 2 ; case 4 - .short _0224538E - _0224532C - 2 ; case 5 - .short _0224538E - _0224532C - 2 ; case 6 - .short _0224538E - _0224532C - 2 ; case 7 - .short _0224538E - _0224532C - 2 ; case 8 - .short _0224538E - _0224532C - 2 ; case 9 - .short _0224538E - _0224532C - 2 ; case 10 - .short _0224538E - _0224532C - 2 ; case 11 - .short _0224538E - _0224532C - 2 ; case 12 - .short _02245380 - _0224532C - 2 ; case 13 - .short _02245364 - _0224532C - 2 ; case 14 - .short _02245350 - _0224532C - 2 ; case 15 - .short _02245356 - _0224532C - 2 ; case 16 - .short _02245364 - _0224532C - 2 ; case 17 -_02245350: - mov r0, #9 - str r0, [r4, #0x2c] - b _022453B0 -_02245356: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _022453B0 -_02245364: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _022453B0 -_02245372: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _022453B0 -_02245380: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _022453B0 -_0224538E: - add r0, r4, #0 - bl ov94_0223C5F4 - bl sub_02038A0C - b _022453B0 -_0224539A: - ldr r0, _022453B4 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _022453B0 - bl sub_02038A0C -_022453B0: - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022453B4: .word 0x00001484 - thumb_func_end ov94_02245300 - - thumb_func_start ov94_022453B8 -ov94_022453B8: ; 0x022453B8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - ldr r1, _022453E4 ; =0x000010E4 - ldr r0, [r0, #0x20] - add r1, r4, r1 - bl sub_02030E78 - ldr r1, _022453E4 ; =0x000010E4 - add r0, r4, r1 - add r1, #0x64 - add r1, r4, r1 - bl ov94_0223BB84 - mov r0, #0xa - str r0, [r4, #0x2c] - ldr r0, _022453E8 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - mov r0, #3 - pop {r4, pc} - nop -_022453E4: .word 0x000010E4 -_022453E8: .word 0x00001484 - thumb_func_end ov94_022453B8 - - thumb_func_start ov94_022453EC -ov94_022453EC: ; 0x022453EC - push {r3, r4, r5, lr} - add r4, r0, #0 - bl ov94_0223B7B8 - cmp r0, #0 - bne _022453FA - b _0224550A -_022453FA: - bl ov94_0223B7D8 - add r5, r0, #0 - ldr r0, _02245524 ; =0x00001484 - mov r1, #0 - str r1, [r4, r0] - add r0, r5, #0 - add r0, #0xf - cmp r0, #0x11 - bhi _022454FE - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224541A: ; jump table - .short _022454E2 - _0224541A - 2 ; case 0 - .short _022454F0 - _0224541A - 2 ; case 1 - .short _022454FE - _0224541A - 2 ; case 2 - .short _022454E2 - _0224541A - 2 ; case 3 - .short _022454FE - _0224541A - 2 ; case 4 - .short _022454FE - _0224541A - 2 ; case 5 - .short _022454FE - _0224541A - 2 ; case 6 - .short _022454FE - _0224541A - 2 ; case 7 - .short _022454FE - _0224541A - 2 ; case 8 - .short _022454FE - _0224541A - 2 ; case 9 - .short _022454FE - _0224541A - 2 ; case 10 - .short _022454FE - _0224541A - 2 ; case 11 - .short _022454FE - _0224541A - 2 ; case 12 - .short _022454F0 - _0224541A - 2 ; case 13 - .short _022454D4 - _0224541A - 2 ; case 14 - .short _0224543E - _0224541A - 2 ; case 15 - .short _022454C6 - _0224541A - 2 ; case 16 - .short _022454D4 - _0224541A - 2 ; case 17 -_0224543E: - add r0, r4, #0 - bl ov94_0223C5F4 - ldr r0, _02245528 ; =0x00001148 - ldr r1, [r4, r0] - cmp r1, #0 - beq _02245456 - cmp r1, #1 - beq _022454A6 - cmp r1, #2 - beq _022454B0 - b _022454BA -_02245456: - add r0, r0, #4 - ldr r0, [r4, r0] - cmp r0, #3 - bhi _022454A0 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224546A: ; jump table - .short _02245472 - _0224546A - 2 ; case 0 - .short _0224548C - _0224546A - 2 ; case 1 - .short _02245496 - _0224546A - 2 ; case 2 - .short _02245482 - _0224546A - 2 ; case 3 -_02245472: - add r0, r4, #0 - mov r1, #1 - mov r2, #0 - bl ov94_0223C4C0 - mov r0, #0xb - str r0, [r4, #0x2c] - b _02245520 -_02245482: - ldr r0, _0224552C ; =0xFFFFEC75 - str r0, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_0224548C: - ldr r0, _02245530 ; =0xFFFFEC78 - str r0, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_02245496: - ldr r0, _02245534 ; =0xFFFFEC77 - str r0, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454A0: - bl sub_02038A0C - b _02245520 -_022454A6: - ldr r0, _02245538 ; =0xFFFFEC74 - str r0, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454B0: - ldr r0, _0224553C ; =0xFFFFEC73 - str r0, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454BA: - add r0, r4, #0 - bl ov94_0223C5F4 - bl sub_02038A0C - b _02245520 -_022454C6: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454D4: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454E2: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454F0: - add r0, r4, #0 - bl ov94_0223C5F4 - str r5, [r4, #0x3c] - mov r0, #0x15 - str r0, [r4, #0x2c] - b _02245520 -_022454FE: - add r0, r4, #0 - bl ov94_0223C5F4 - bl sub_02038A0C - b _02245520 -_0224550A: - ldr r0, _02245524 ; =0x00001484 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] - ldr r1, [r4, r0] - mov r0, #0xe1 - lsl r0, r0, #4 - cmp r1, r0 - bne _02245520 - bl sub_02038A0C -_02245520: - mov r0, #3 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02245524: .word 0x00001484 -_02245528: .word 0x00001148 -_0224552C: .word 0xFFFFEC75 -_02245530: .word 0xFFFFEC78 -_02245534: .word 0xFFFFEC77 -_02245538: .word 0xFFFFEC74 -_0224553C: .word 0xFFFFEC73 - thumb_func_end ov94_022453EC - - thumb_func_start ov94_02245540 -ov94_02245540: ; 0x02245540 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x44] - ldr r1, [r4, #0x48] - neg r0, r0 - bl ov4_021D1F3C - ldr r2, [r4, #0x44] - add r1, r0, #0 - add r0, r4, #0 - neg r2, r2 - bl ov94_022459B4 - mov r0, #0x18 - str r0, [r4, #0x2c] - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02245540 - - thumb_func_start ov94_02245564 -ov94_02245564: ; 0x02245564 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224558C ; =0x021BF67C - ldr r1, [r0, #0x48] - mov r0, #1 - tst r0, r1 - bne _02245578 - mov r0, #2 - tst r0, r1 - beq _02245586 -_02245578: - ldr r0, _02245590 ; =0x00000F2C - mov r1, #0 - add r0, r4, r0 - bl sub_0200DC9C - mov r0, #0 - str r0, [r4, #0x2c] -_02245586: - mov r0, #3 - pop {r4, pc} - nop -_0224558C: .word 0x021BF67C -_02245590: .word 0x00000F2C - thumb_func_end ov94_02245564 - - thumb_func_start ov94_02245594 -ov94_02245594: ; 0x02245594 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl sub_02039794 - add r0, r4, #0 - bl ov94_0223C5F4 - mov r0, #6 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3e - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #0 - str r0, [r4, #0x2c] - ldr r0, _022455CC ; =0x000010B0 - mov r1, #1 - str r1, [r4, r0] - mov r0, #4 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_022455CC: .word 0x000010B0 - thumb_func_end ov94_02245594 - - thumb_func_start ov94_022455D0 -ov94_022455D0: ; 0x022455D0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _02245604 ; =0x00001070 - mov r1, #0x3e - ldr r0, [r4, r0] - bl sub_02002114 - mov r1, #0 - mvn r1, r1 - cmp r0, r1 - beq _02245600 - sub r1, r1, #1 - cmp r0, r1 - bne _022455F2 - mov r0, #0 - str r0, [r4, #0x2c] - b _02245600 -_022455F2: - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #0xb - str r0, [r4, #0x2c] -_02245600: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_02245604: .word 0x00001070 - thumb_func_end ov94_022455D0 - - thumb_func_start ov94_02245608 -ov94_02245608: ; 0x02245608 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - mov r2, #0xd - ldr r0, [r4, #0x3c] - mvn r2, r2 - cmp r0, r2 - bgt _02245646 - bge _02245682 - ldr r1, _022456BC ; =0xFFFFEC78 - cmp r0, r1 - bgt _0224563E - ldr r1, _022456C0 ; =0x0000138D - add r1, r0, r1 - bmi _02245686 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02245632: ; jump table - .short _0224569A - _02245632 - 2 ; case 0 - .short _02245696 - _02245632 - 2 ; case 1 - .short _0224568A - _02245632 - 2 ; case 2 - .short _02245686 - _02245632 - 2 ; case 3 - .short _02245692 - _02245632 - 2 ; case 4 - .short _0224568E - _02245632 - 2 ; case 5 -_0224563E: - mov r1, #0xe - mvn r1, r1 - cmp r0, r1 - b _02245686 -_02245646: - add r1, r2, #0 - add r1, #9 - cmp r0, r1 - bgt _0224565C - add r1, r2, #0 - add r1, #9 - cmp r0, r1 - bge _02245686 - add r1, r2, #2 - cmp r0, r1 - b _02245686 -_0224565C: - add r0, r0, #3 - cmp r0, #5 - bhi _02245686 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224566E: ; jump table - .short _02245686 - _0224566E - 2 ; case 0 - .short _02245682 - _0224566E - 2 ; case 1 - .short _0224567E - _0224566E - 2 ; case 2 - .short _02245686 - _0224566E - 2 ; case 3 - .short _0224567A - _0224566E - 2 ; case 4 - .short _0224567E - _0224566E - 2 ; case 5 -_0224567A: - mov r2, #0x90 - b _0224569C -_0224567E: - mov r2, #0x91 - b _0224569C -_02245682: - mov r2, #0x96 - b _0224569C -_02245686: - mov r2, #0x95 - b _0224569C -_0224568A: - mov r2, #0xb1 - b _0224569C -_0224568E: - mov r2, #0xae - b _0224569C -_02245692: - mov r2, #0xae - b _0224569C -_02245696: - mov r2, #0xaf - b _0224569C -_0224569A: - mov r2, #0xb0 -_0224569C: - ldr r0, _022456C4 ; =0x00000F0F - ldr r1, _022456C8 ; =0x00000B94 - str r0, [sp] - ldr r1, [r4, r1] - add r0, r4, #0 - mov r3, #1 - bl ov94_02245824 - add r0, r4, #0 - mov r1, #0xc - mov r2, #0x16 - bl ov94_0223C3F4 - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 -_022456BC: .word 0xFFFFEC78 -_022456C0: .word 0x0000138D -_022456C4: .word 0x00000F0F -_022456C8: .word 0x00000B94 - thumb_func_end ov94_02245608 - - thumb_func_start ov94_022456CC -ov94_022456CC: ; 0x022456CC - push {r3, r4, lr} - sub sp, #4 - mov r1, #0x52 - add r4, r0, #0 - lsl r1, r1, #6 - ldrsh r1, [r4, r1] - cmp r1, #3 - bhi _02245768 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022456E8: ; jump table - .short _022456F0 - _022456E8 - 2 ; case 0 - .short _0224570C - _022456E8 - 2 ; case 1 - .short _02245730 - _022456E8 - 2 ; case 2 - .short _0224574C - _022456E8 - 2 ; case 3 -_022456F0: - ldr r1, _0224578C ; =0x00000F0F - mov r2, #0xb2 - str r1, [sp] - ldr r1, _02245790 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - mov r0, #0x52 - lsl r0, r0, #6 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - b _02245784 -_0224570C: - ldr r0, _02245794 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02245784 - bl sub_0203848C - bl ov4_021D7DB0 - mov r0, #0x52 - lsl r0, r0, #6 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - b _02245784 -_02245730: - ldr r1, _0224578C ; =0x00000F0F - mov r2, #0xb3 - str r1, [sp] - ldr r1, _02245790 ; =0x00000B94 - mov r3, #1 - ldr r1, [r4, r1] - bl ov94_02245824 - mov r0, #0x52 - lsl r0, r0, #6 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - b _02245784 -_0224574C: - ldr r0, _02245794 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02245784 - mov r0, #0x52 - lsl r0, r0, #6 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - b _02245784 -_02245768: - ldr r0, _02245798 ; =0x00001482 - ldrsh r1, [r4, r0] - add r1, r1, #1 - strh r1, [r4, r0] - ldrsh r0, [r4, r0] - cmp r0, #0x1e - ble _02245784 - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl ov94_0223C4C0 - mov r0, #0xb - str r0, [r4, #0x2c] -_02245784: - mov r0, #3 - add sp, #4 - pop {r3, r4, pc} - nop -_0224578C: .word 0x00000F0F -_02245790: .word 0x00000B94 -_02245794: .word 0x00000BE4 -_02245798: .word 0x00001482 - thumb_func_end ov94_022456CC - - thumb_func_start ov94_0224579C -ov94_0224579C: ; 0x0224579C - push {r4, lr} - add r4, r0, #0 - ldr r0, _022457B8 ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _022457B4 - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_022457B4: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_022457B8: .word 0x00000BE4 - thumb_func_end ov94_0224579C - - thumb_func_start ov94_022457BC -ov94_022457BC: ; 0x022457BC - push {r4, lr} - add r4, r0, #0 - ldr r0, _022457EC ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _022457E8 - mov r0, #0x42 - lsl r0, r0, #6 - ldr r0, [r4, r0] - cmp r0, #0x1e - ble _022457DE - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_022457DE: - mov r0, #0x42 - lsl r0, r0, #6 - ldr r1, [r4, r0] - add r1, r1, #1 - str r1, [r4, r0] -_022457E8: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_022457EC: .word 0x00000BE4 - thumb_func_end ov94_022457BC - - thumb_func_start ov94_022457F0 -ov94_022457F0: ; 0x022457F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, _0224581C ; =0x00000BE4 - ldr r0, [r4, r0] - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - bl sub_0201D724 - cmp r0, #0 - bne _02245818 - mov r2, #0x8d - ldr r0, [r4, #4] - mov r1, #0xd - lsl r2, r2, #2 - bl ov94_0223C3C0 - ldr r1, _02245820 ; =0x00001070 - str r0, [r4, r1] - ldr r0, [r4, #0x30] - str r0, [r4, #0x2c] -_02245818: - mov r0, #3 - pop {r4, pc} - ; .align 2, 0 -_0224581C: .word 0x00000BE4 -_02245820: .word 0x00001070 - thumb_func_end ov94_022457F0 - - thumb_func_start ov94_02245824 -ov94_02245824: ; 0x02245824 - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - add r0, r1, #0 - add r1, r2, #0 - add r4, r3, #0 - bl sub_0200B1EC - mov r1, #0xb9 - add r6, r0, #0 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, #0x20 - ldr r1, [r5, r1] - add r2, r6, #0 - bl sub_0200C388 - add r0, r6, #0 - bl sub_020237BC - ldr r0, _0224588C ; =0x00000EFC - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _0224588C ; =0x00000EFC - mov r1, #0 - add r0, r5, r0 - mov r2, #1 - mov r3, #0xa - bl sub_0200E060 - mov r3, #0 - str r3, [sp] - str r4, [sp, #4] - mov r2, #0xbb - ldr r0, _0224588C ; =0x00000EFC - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _02245890 ; =0x00000BE4 - str r0, [r5, r1] - mov r0, #0x42 - mov r1, #0 - lsl r0, r0, #6 - str r1, [r5, r0] - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224588C: .word 0x00000EFC -_02245890: .word 0x00000BE4 - thumb_func_end ov94_02245824 - - thumb_func_start ov94_02245894 -ov94_02245894: ; 0x02245894 - push {r4, lr} - add r4, r0, #0 - cmp r3, #1 - beq _022458A2 - cmp r3, #2 - beq _022458B8 - b _022458C6 -_022458A2: - ldr r0, [sp, #0xc] - mov r2, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r1, r1, r0 - lsr r0, r1, #0x1f - add r0, r1, r0 - asr r2, r0, #1 - b _022458C6 -_022458B8: - ldr r0, [sp, #0xc] - mov r2, #0 - bl sub_02002D7C - ldrb r1, [r4, #7] - lsl r1, r1, #3 - sub r2, r1, r0 -_022458C6: - add r0, r2, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov94_02245894 - - thumb_func_start ov94_022458CC -ov94_022458CC: ; 0x022458CC - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r3, #0 - ldr r3, [sp, #0x24] - add r5, r0, #0 - str r3, [sp] - mov r3, #1 - str r3, [sp, #4] - ldr r3, [sp, #0x20] - add r6, r1, #0 - bl ov94_02245894 - add r3, r0, #0 - str r4, [sp] - mov r1, #0 - ldr r0, [sp, #0x24] - str r1, [sp, #4] - str r0, [sp, #8] - str r1, [sp, #0xc] - add r0, r5, #0 - mov r1, #1 - add r2, r6, #0 - bl sub_0201D78C - add sp, #0x10 - pop {r4, r5, r6, pc} - thumb_func_end ov94_022458CC - - thumb_func_start ov94_02245900 -ov94_02245900: ; 0x02245900 - push {r4, r5, r6, lr} - sub sp, #0x10 - add r4, r3, #0 - ldr r3, [sp, #0x24] - add r5, r0, #0 - str r3, [sp] - mov r3, #0 - str r3, [sp, #4] - ldr r3, [sp, #0x20] - add r6, r1, #0 - bl ov94_02245894 - add r3, r0, #0 - str r4, [sp] - mov r1, #0 - ldr r0, [sp, #0x24] - str r1, [sp, #4] - str r0, [sp, #8] - add r0, r5, #0 - add r2, r6, #0 - str r1, [sp, #0xc] - bl sub_0201D78C - add sp, #0x10 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov94_02245900 - - thumb_func_start ov94_02245934 -ov94_02245934: ; 0x02245934 - ldr r3, _02245938 ; =sub_02039734 - bx r3 - ; .align 2, 0 -_02245938: .word sub_02039734 - thumb_func_end ov94_02245934 - - thumb_func_start ov94_0224593C -ov94_0224593C: ; 0x0224593C - push {r3, r4, r5, r6, lr} - sub sp, #0xc - add r5, r0, #0 - mov r0, #1 - add r6, r1, #0 - lsl r0, r0, #8 - mov r1, #0x3e - bl sub_02023790 - add r4, r0, #0 - mov r0, #0xba - lsl r0, r0, #4 - ldr r0, [r5, r0] - add r1, r6, #0 - add r2, r4, #0 - bl sub_0200B1B8 - mov r1, #0xb9 - lsl r1, r1, #4 - ldr r0, [r5, r1] - add r1, #0x50 - ldr r1, [r5, r1] - add r2, r4, #0 - bl sub_0200C388 - ldr r0, _022459AC ; =0x00000F2C - mov r1, #0xf - add r0, r5, r0 - bl sub_0201ADA4 - ldr r0, _022459AC ; =0x00000F2C - mov r1, #1 - add r0, r5, r0 - mov r2, #0x1f - mov r3, #0xb - bl sub_0200DC48 - mov r3, #0 - str r3, [sp] - str r3, [sp, #4] - mov r2, #0xbe - ldr r0, _022459AC ; =0x00000F2C - str r3, [sp, #8] - lsl r2, r2, #4 - ldr r2, [r5, r2] - add r0, r5, r0 - mov r1, #1 - bl sub_0201D738 - ldr r1, _022459B0 ; =0x00000BE4 - str r0, [r5, r1] - add r0, r4, #0 - bl sub_020237BC - add sp, #0xc - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_022459AC: .word 0x00000F2C -_022459B0: .word 0x00000BE4 - thumb_func_end ov94_0224593C - - thumb_func_start ov94_022459B4 -ov94_022459B4: ; 0x022459B4 - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0 - add r4, r1, #0 - mvn r0, r0 - cmp r4, r0 - bne _022459C6 - mov r4, #0xb -_022459C6: - mov r0, #2 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0xb9 - lsl r0, r0, #4 - ldr r0, [r5, r0] - mov r1, #0 - mov r3, #5 - bl sub_0200B60C - ldr r0, _022459F4 ; =0x00000EFC - mov r1, #1 - add r0, r5, r0 - bl sub_0200E084 - add r0, r5, #0 - add r1, r4, #0 - bl ov94_0224593C - add sp, #8 - pop {r3, r4, r5, pc} - nop -_022459F4: .word 0x00000EFC - thumb_func_end ov94_022459B4 - ; 0x022459F8 - - - .rodata - .incbin "incbin/overlay94_rodata.bin" - - .data - .incbin "incbin/overlay94_data.bin" - - .bss - .space 0x160 diff --git a/asm/overlay95.s b/asm/overlay95.s deleted file mode 100644 index 5eded59d7..000000000 --- a/asm/overlay95.s +++ /dev/null @@ -1,10493 +0,0 @@ - .include "macros/function.inc" - .include "global.inc" - - .text - - thumb_func_start ov95_02246C20 -ov95_02246C20: ; 0x02246C20 - push {r4, r5, lr} - sub sp, #0x14 - add r5, r0, #0 - bl sub_0200F2AC - cmp r0, #0 - bne _02246C30 - b _02246DCA -_02246C30: - mov r0, #3 - mov r1, #0x39 - lsl r2, r0, #0xf - bl sub_02017FC8 - mov r0, #3 - mov r1, #0x3a - lsl r2, r0, #0xf - bl sub_02017FC8 - bl ov95_02247688 - ldr r1, _02246DD0 ; =0x00000492 - mov r0, #3 - mov r2, #1 - bl sub_02004550 - mov r1, #0x56 - add r0, r5, #0 - lsl r1, r1, #2 - mov r2, #0x39 - bl sub_0200681C - add r4, r0, #0 - bne _02246C64 - b _02246DC4 -_02246C64: - add r0, r5, #0 - bl sub_02006840 - str r0, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - mov r0, #0x39 - bl sub_02018340 - str r0, [r4, #8] - mov r0, #0x19 - lsl r0, r0, #4 - mov r1, #0x39 - bl sub_02023790 - str r0, [r4, #0x14] - ldr r2, _02246DD4 ; =0x0000015E - mov r0, #0 - mov r1, #0x1a - mov r3, #0x39 - bl sub_0200B144 - str r0, [r4, #0x10] - mov r0, #0x39 - bl sub_0200B358 - str r0, [r4, #0xc] - ldr r2, [r4, #0] - ldr r0, [r2, #0x10] - cmp r0, #1 - beq _02246CAC - cmp r0, #2 - beq _02246CDE - cmp r0, #4 - beq _02246CEA - b _02246D02 -_02246CAC: - ldr r0, [r4, #0xc] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200B5CC - ldr r2, [r4, #0] - ldr r0, [r4, #0xc] - ldr r2, [r2, #4] - mov r1, #1 - bl sub_0200B5CC - ldr r2, [r4, #0] - ldr r0, [r4, #0xc] - ldr r2, [r2, #8] - mov r1, #2 - bl sub_0200B498 - ldr r0, [r4, #0] - ldr r0, [r0, #4] - bl ov95_02246DEC - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r4, r1] - b _02246D02 -_02246CDE: - ldr r0, [r4, #0xc] - ldr r2, [r2, #0] - mov r1, #0 - bl sub_0200B5CC - b _02246D02 -_02246CEA: - ldr r0, [r4, #0xc] - ldr r2, [r2, #4] - mov r1, #1 - bl sub_0200B5CC - ldr r0, [r4, #0] - ldr r0, [r0, #4] - bl ov95_02246DEC - mov r1, #0x52 - lsl r1, r1, #2 - str r0, [r4, r1] -_02246D02: - bl sub_020A7944 - mov r0, #1 - str r0, [sp] - mov r0, #0x7f - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - mov r3, #0x20 - str r3, [sp, #0xc] - mov r1, #0x39 - str r1, [sp, #0x10] - mov r1, #0x80 - add r2, r0, #0 - bl sub_0200A784 - add r1, r4, #0 - mov r0, #0x40 - add r1, #0x1c - mov r2, #0x39 - bl sub_020095C4 - str r0, [r4, #0x18] - add r0, r4, #0 - mov r2, #0x3a - add r0, #0x1c - mov r1, #0 - lsl r2, r2, #0xe - bl sub_0200964C - ldr r0, [r4, #0] - mov r1, #5 - ldr r0, [r0, #0] - mov r2, #0 - bl sub_02074570 - mov r1, #0x53 - lsl r1, r1, #2 - strh r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #0x70 - ldr r0, [r0, #0] - mov r2, #0 - bl sub_02074570 - ldr r1, _02246DD8 ; =0x0000014E - mov r2, #0 - strh r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #5 - ldr r0, [r0, #4] - bl sub_02074570 - mov r1, #0x15 - lsl r1, r1, #4 - strh r0, [r4, r1] - ldr r0, [r4, #0] - mov r1, #0x70 - ldr r0, [r0, #4] - mov r2, #0 - bl sub_02074570 - ldr r1, _02246DDC ; =0x00000152 - strh r0, [r4, r1] - mov r0, #0 - add r1, r1, #2 - str r0, [r4, r1] - add r1, r0, #0 - bl sub_02017798 - bl sub_020177A4 - bl sub_0201FF00 - bl sub_0201FF68 - mov r2, #1 - lsl r2, r2, #0x1a - ldr r1, [r2, #0] - ldr r0, _02246DE0 ; =0xFFFFE0FF - and r1, r0 - str r1, [r2, #0] - ldr r2, _02246DE4 ; =0x04001000 - ldr r1, [r2, #0] - and r0, r1 - str r0, [r2, #0] - ldr r0, _02246DE8 ; =ov95_02246F0C - add r1, r4, #0 - mov r2, #1 - bl sub_0200DA20 - mov r1, #0x51 - lsl r1, r1, #2 - str r0, [r4, r1] - mov r0, #0 - add r1, #0x10 - str r0, [r4, r1] -_02246DC4: - add sp, #0x14 - mov r0, #1 - pop {r4, r5, pc} -_02246DCA: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, pc} - ; .align 2, 0 -_02246DD0: .word 0x00000492 -_02246DD4: .word 0x0000015E -_02246DD8: .word 0x0000014E -_02246DDC: .word 0x00000152 -_02246DE0: .word 0xFFFFE0FF -_02246DE4: .word 0x04001000 -_02246DE8: .word ov95_02246F0C - thumb_func_end ov95_02246C20 - - thumb_func_start ov95_02246DEC -ov95_02246DEC: ; 0x02246DEC - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - add r4, r0, #0 - add r0, r5, #0 - mov r1, #0x70 - mov r2, #0 - bl sub_02074570 - add r1, r0, #0 - add r0, r4, #0 - mov r2, #0x1c - bl sub_020759CC - cmp r0, #0 - bne _02246E16 - mov r0, #1 - pop {r3, r4, r5, pc} -_02246E16: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_02246DEC - - thumb_func_start ov95_02246E1C -ov95_02246E1C: ; 0x02246E1C - push {r4, r5, r6, lr} - add r5, r0, #0 - bl sub_020C3D98 - add r6, r0, #0 - add r0, r5, #0 - bl sub_0200682C - add r4, r0, #0 - mov r0, #0x51 - lsl r0, r0, #2 - ldr r0, [r4, r0] - bl sub_0200DA58 - bl sub_02039794 - ldr r0, [r4, #0xc] - bl sub_0200B3F0 - ldr r0, [r4, #0x10] - bl sub_0200B190 - ldr r0, [r4, #0x14] - bl sub_020237BC - ldr r0, [r4, #8] - bl sub_020181C4 - ldr r0, [r4, #0x18] - bl sub_02021964 - bl sub_0200A878 - add r0, r5, #0 - bl sub_02006830 - mov r0, #0x39 - bl sub_0201807C - mov r0, #0x3a - bl sub_0201807C - add r0, r6, #0 - bl sub_020C3DAC - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov95_02246E1C - - thumb_func_start ov95_02246E7C -ov95_02246E7C: ; 0x02246E7C - push {r4, r5, r6, lr} - add r5, r1, #0 - bl sub_0200682C - add r4, r0, #0 - ldr r3, [r4, #4] - cmp r3, #7 - bhs _02246EF8 - ldr r1, [r4, #0] - ldr r6, _02246EFC ; =0x0224BE98 - lsl r2, r3, #4 - ldr r1, [r1, #0x10] - ldr r6, [r6, r2] - tst r1, r6 - beq _02246EE8 - mov r1, #0x55 - lsl r1, r1, #2 - ldr r1, [r4, r1] - cmp r1, #0 - bne _02246EB0 - ldr r1, _02246F00 ; =0x0224BE8C - ldr r1, [r1, r2] - blx r1 - mov r1, #0x55 - lsl r1, r1, #2 - str r0, [r4, r1] -_02246EB0: - ldr r2, [r4, #4] - mov r0, #0x55 - lsl r3, r2, #4 - ldr r2, _02246F04 ; =0x0224BE90 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r2, [r2, r3] - add r1, r5, #0 - blx r2 - cmp r0, #0 - beq _02246EF0 - ldr r1, [r4, #4] - mov r0, #0x55 - lsl r2, r1, #4 - ldr r1, _02246F08 ; =0x0224BE94 - lsl r0, r0, #2 - ldr r0, [r4, r0] - ldr r1, [r1, r2] - blx r1 - mov r0, #0x55 - mov r1, #0 - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - str r1, [r5, #0] - b _02246EF0 -_02246EE8: - add r0, r3, #1 - str r0, [r4, #4] - mov r0, #0 - str r0, [r5, #0] -_02246EF0: - bl ov95_02247694 - mov r0, #0 - pop {r4, r5, r6, pc} -_02246EF8: - mov r0, #1 - pop {r4, r5, r6, pc} - ; .align 2, 0 -_02246EFC: .word 0x0224BE98 -_02246F00: .word 0x0224BE8C -_02246F04: .word 0x0224BE90 -_02246F08: .word 0x0224BE94 - thumb_func_end ov95_02246E7C - - thumb_func_start ov95_02246F0C -ov95_02246F0C: ; 0x02246F0C - push {r3, lr} - ldr r0, [r1, #0x18] - bl sub_020219F8 - bl sub_0200A858 - ldr r3, _02246F28 ; =0x027E0000 - ldr r1, _02246F2C ; =0x00003FF8 - mov r0, #1 - ldr r2, [r3, r1] - orr r0, r2 - str r0, [r3, r1] - pop {r3, pc} - nop -_02246F28: .word 0x027E0000 -_02246F2C: .word 0x00003FF8 - thumb_func_end ov95_02246F0C - - thumb_func_start ov95_02246F30 -ov95_02246F30: ; 0x02246F30 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - add r5, r0, #0 - mov r0, #0x39 - add r6, r1, #0 - add r1, r0, #0 - add r1, #0xc7 - bl sub_02018144 - add r4, r0, #0 - ldr r0, _02246FF4 ; =0x00000000 - str r0, [r5, #0] - beq _02246FEC - mov r0, #0x5d - mov r1, #6 - add r2, sp, #4 - mov r3, #0x39 - bl sub_02006F88 - add r7, r0, #0 - beq _02246F6A - mov r0, #0 - add r1, r4, #0 - mov r2, #0x60 - bl sub_020C4AF0 - add r0, r7, #0 - bl sub_020181C4 -_02246F6A: - add r1, r4, #0 - mov r0, #0 - add r1, #0xec - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xe8 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xf0 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xf4 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xe4 - str r5, [r1, #0] - add r1, r4, #0 - add r1, #0xf8 - str r0, [r1, #0] - add r1, r4, #0 - add r1, #0xfc - str r6, [r1, #0] - add r3, r4, #0 - add r2, r0, #0 -_02246F9A: - add r1, r3, #0 - add r1, #0xc4 - add r0, r0, #1 - add r3, r3, #4 - str r2, [r1, #0] - cmp r0, #8 - blt _02246F9A - mov r0, #8 - str r0, [sp] - ldr r0, _02246FF8 ; =0x04000050 - mov r1, #4 - mov r2, #0xc - mov r3, #0x10 - bl sub_020BF55C - mov r0, #8 - str r0, [sp] - ldr r0, _02246FFC ; =0x04001050 - mov r1, #4 - mov r2, #0xc - mov r3, #0x10 - bl sub_020BF55C - ldr r0, _02247000 ; =ov95_02247060 - add r1, r4, #0 - mov r2, #0x14 - bl sub_0200DA3C - add r1, r4, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02246FEC - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r1, #1 - str r1, [r0, #0] -_02246FEC: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02246FF4: .word 0x00000000 -_02246FF8: .word 0x04000050 -_02246FFC: .word 0x04001050 -_02247000: .word ov95_02247060 - thumb_func_end ov95_02246F30 - - thumb_func_start ov95_02247004 -ov95_02247004: ; 0x02247004 - add r1, r0, #0 - add r1, #0xe4 - ldr r1, [r1, #0] - ldr r1, [r1, #0] - cmp r1, #1 - bne _02247016 - mov r1, #1 - add r0, #0xe8 - str r1, [r0, #0] -_02247016: - bx lr - thumb_func_end ov95_02247004 - - thumb_func_start ov95_02247018 -ov95_02247018: ; 0x02247018 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - cmp r0, #1 - bne _0224705E - mov r4, #0 - add r5, r6, #0 -_0224702A: - add r0, r5, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224703C - add r0, r6, #0 - add r1, r4, #0 - bl ov95_02247224 -_0224703C: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #8 - blt _0224702A - add r0, r6, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r1, #0 - str r1, [r0, #0] - add r0, r6, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - bl sub_0200DA58 - add r0, r6, #0 - bl sub_020181C4 -_0224705E: - pop {r4, r5, r6, pc} - thumb_func_end ov95_02247018 - - thumb_func_start ov95_02247060 -ov95_02247060: ; 0x02247060 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xe8 - ldr r0, [r0, #0] - cmp r0, #0 - bne _022470DE - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0xf0 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xf0 - ldr r0, [r0, #0] - cmp r0, #0 - bgt _0224709C - ldr r0, _02247144 ; =0x000006AE - bl sub_02005748 - add r0, r4, #0 - mov r1, #0x1e - add r0, #0xf0 - str r1, [r0, #0] - add r0, r4, #0 - bl ov95_02247170 -_0224709C: - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #0 - beq _02247140 - bl sub_020C096C - bl sub_020C0BBC - add r0, r4, #0 - mov r1, #0x60 - bl sub_020C2C54 - mov r1, #6 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0A0C - mov r1, #6 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0BD4 - bl sub_020C0A7C - bl sub_020C0C38 - mov r0, #0 - add r4, #0xec - str r0, [r4, #0] - pop {r3, r4, r5, pc} -_022470DE: - add r0, r4, #0 - add r0, #0xec - ldr r0, [r0, #0] - cmp r0, #0 - beq _02247120 - bl sub_020C096C - bl sub_020C0BBC - add r0, r4, #0 - mov r1, #0x60 - bl sub_020C2C54 - mov r1, #6 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0A0C - mov r1, #6 - add r0, r4, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0BD4 - bl sub_020C0A7C - bl sub_020C0C38 - add r0, r4, #0 - mov r1, #0 - add r0, #0xec - str r1, [r0, #0] -_02247120: - add r0, r4, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02247140 - add r0, r4, #0 - add r0, #0xe4 - ldr r0, [r0, #0] - mov r1, #0 - str r1, [r0, #0] - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_02247140: - pop {r3, r4, r5, pc} - nop -_02247144: .word 0x000006AE - thumb_func_end ov95_02247060 - - thumb_func_start ov95_02247148 -ov95_02247148: ; 0x02247148 - push {r3, r4} - cmp r1, #0 - blt _02247158 - cmp r1, #0x60 - bge _02247158 - mov r4, #0 - lsl r1, r1, #1 - strh r4, [r0, r1] -_02247158: - cmp r2, #0 - blt _02247164 - cmp r2, #0x60 - bge _02247164 - lsl r1, r2, #1 - strh r3, [r0, r1] -_02247164: - mov r1, #1 - add r0, #0xec - str r1, [r0, #0] - pop {r3, r4} - bx lr - ; .align 2, 0 - thumb_func_end ov95_02247148 - - thumb_func_start ov95_02247170 -ov95_02247170: ; 0x02247170 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r5, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0224721C - mov r0, #0x39 - mov r1, #0x18 - bl sub_02018144 - add r4, r0, #0 - beq _0224721C - add r0, r5, #0 - str r5, [r4, #0] - add r0, #0xfc - ldr r0, [r0, #0] - cmp r0, #1 - bne _022471A2 - mov r0, #0 - mvn r0, r0 - b _022471A4 -_022471A2: - mov r0, #0xf -_022471A4: - str r0, [r4, #4] - mov r0, #0 - str r0, [r4, #0xc] - mov r0, #2 - str r0, [r4, #8] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r1, r4, #0 - str r0, [r4, #0x10] - add r0, r5, #0 - add r0, #0xfc - ldr r0, [r0, #0] - mov r2, #0xa - str r0, [r4, #0x14] - ldr r0, _02247220 ; =ov95_02247254 - bl sub_0200D9E8 - add r1, r5, #0 - add r1, #0xf8 - ldr r1, [r1, #0] - lsl r1, r1, #2 - add r1, r5, r1 - add r1, #0xc4 - str r0, [r1, #0] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - lsl r0, r0, #2 - add r0, r5, r0 - add r0, #0xc4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02247216 - add r0, r5, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xf4 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r5, #0 - add r0, #0xf8 - str r1, [r0, #0] - add r0, r5, #0 - add r0, #0xf8 - ldr r0, [r0, #0] - cmp r0, #8 - blt _0224721C - mov r0, #0 - add r5, #0xf8 - str r0, [r5, #0] - pop {r3, r4, r5, pc} -_02247216: - add r0, r4, #0 - bl sub_020181C4 -_0224721C: - pop {r3, r4, r5, pc} - nop -_02247220: .word ov95_02247254 - thumb_func_end ov95_02247170 - - thumb_func_start ov95_02247224 -ov95_02247224: ; 0x02247224 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r5, #0 - lsl r4, r1, #2 - add r6, #0xc4 - ldr r0, [r6, r4] - cmp r0, #0 - beq _02247252 - bl sub_0201CED0 - bl sub_020181C4 - ldr r0, [r6, r4] - bl sub_0200DA58 - mov r0, #0 - str r0, [r6, r4] - add r0, r5, #0 - add r0, #0xf4 - ldr r0, [r0, #0] - add r5, #0xf4 - sub r0, r0, #1 - str r0, [r5, #0] -_02247252: - pop {r4, r5, r6, pc} - thumb_func_end ov95_02247224 - - thumb_func_start ov95_02247254 -ov95_02247254: ; 0x02247254 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0xc] - add r1, r0, #1 - str r1, [r4, #0xc] - ldr r0, [r4, #8] - cmp r1, r0 - blt _022472BC - mov r3, #0 - str r3, [r4, #0xc] - ldr r0, [r4, #0x14] - cmp r0, #1 - bne _02247294 - ldr r1, [r4, #4] - ldr r0, [r4, #0] - add r2, r1, #1 - cmp r2, #0xf - blt _02247286 - bl ov95_02247148 - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - bl ov95_02247224 - pop {r4, pc} -_02247286: - ldr r3, _022472C0 ; =0x00007FFF - bl ov95_02247148 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r4, pc} -_02247294: - ldr r2, [r4, #4] - ldr r0, [r4, #0] - cmp r2, #0 - bge _022472AE - add r1, r2, #0 - add r2, r2, #1 - bl ov95_02247148 - ldr r0, [r4, #0] - ldr r1, [r4, #0x10] - bl ov95_02247224 - pop {r4, pc} -_022472AE: - ldr r3, _022472C0 ; =0x00007FFF - add r1, r2, #1 - bl ov95_02247148 - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] -_022472BC: - pop {r4, pc} - nop -_022472C0: .word 0x00007FFF - thumb_func_end ov95_02247254 - - thumb_func_start ov95_022472C4 -ov95_022472C4: ; 0x022472C4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - add r6, r1, #0 - mov r0, #0x39 - mov r1, #0x24 - add r7, r2, #0 - str r3, [sp, #4] - ldr r5, [sp, #0x28] - bl sub_02018144 - add r4, r0, #0 - ldr r0, _02247324 ; =0x00000001 - str r0, [r5, #0] - beq _0224731C - ldr r1, [sp] - str r1, [r4, #0] - str r6, [r4, #8] - ldr r1, [sp, #4] - str r7, [r4, #0xc] - str r1, [r4, #0x10] - ldr r1, [sp, #0x20] - str r1, [r4, #0x14] - cmp r6, r7 - bge _022472F8 - mov r0, #0 -_022472F8: - str r0, [r4, #0x18] - ldr r0, [sp, #0x24] - mov r2, #0 - str r0, [r4, #0x1c] - str r5, [r4, #4] - ldr r0, _02247328 ; =ov95_0224732C - add r1, r4, #0 - str r2, [r5, #0] - bl sub_0200DA04 - str r0, [r4, #0x20] - cmp r0, #0 - bne _0224731C - mov r0, #1 - str r0, [r5, #0] - add r0, r4, #0 - bl sub_020181C4 -_0224731C: - add r0, r4, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247324: .word 0x00000001 -_02247328: .word ov95_0224732C - thumb_func_end ov95_022472C4 - - thumb_func_start ov95_0224732C -ov95_0224732C: ; 0x0224732C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - ldr r1, [r4, #0x10] - mul r1, r0 - asr r2, r1, #0xc - asr r1, r2, #4 - lsr r1, r1, #0x1b - add r1, r2, r1 - asr r2, r1, #5 - ldr r1, [r4, #0x18] - cmp r1, #0 - beq _0224734E - cmp r1, #1 - beq _02247364 - b _02247378 -_0224734E: - ldr r1, [r4, #0xc] - add r0, r0, r2 - cmp r0, r1 - bge _0224735A - str r0, [r4, #8] - b _02247378 -_0224735A: - str r1, [r4, #8] - ldr r0, [r4, #4] - mov r1, #1 - str r1, [r0, #0] - b _02247378 -_02247364: - ldr r1, [r4, #0xc] - sub r0, r0, r2 - cmp r0, r1 - ble _02247370 - str r0, [r4, #8] - b _02247378 -_02247370: - str r1, [r4, #8] - ldr r0, [r4, #4] - mov r1, #1 - str r1, [r0, #0] -_02247378: - add r0, r4, #0 - bl ov95_022473A0 - ldr r0, [r4, #4] - ldr r0, [r0, #0] - cmp r0, #0 - beq _02247394 - add r0, r4, #0 - bl ov95_022476C8 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} -_02247394: - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0x10] - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224732C - - thumb_func_start ov95_022473A0 -ov95_022473A0: ; 0x022473A0 - push {r3, r4, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, [r4, #8] - add r2, sp, #4 - str r0, [sp, #4] - mov r0, #0 - str r0, [sp, #8] - str r0, [sp, #0xc] - ldr r0, [r4, #8] - mov r3, #0x80 - str r0, [sp, #0x10] - ldr r0, [r4, #0x1c] - lsl r1, r0, #2 - ldr r0, _022473E4 ; =0x0224BE74 - ldr r0, [r0, r1] - mov r1, #2 - str r0, [sp] - ldr r0, [r4, #0] - bl sub_02019348 - ldr r0, [r4, #0x1c] - add r2, sp, #4 - lsl r1, r0, #2 - ldr r0, _022473E4 ; =0x0224BE74 - mov r3, #0x80 - ldr r0, [r0, r1] - mov r1, #6 - str r0, [sp] - ldr r0, [r4, #0] - bl sub_02019348 - add sp, #0x14 - pop {r3, r4, pc} - ; .align 2, 0 -_022473E4: .word 0x0224BE74 - thumb_func_end ov95_022473A0 - - thumb_func_start ov95_022473E8 -ov95_022473E8: ; 0x022473E8 - push {r4, r5, r6, r7, lr} - sub sp, #0x44 - add r5, r0, #0 - ldr r0, [sp, #0x58] - add r4, r1, #0 - str r2, [sp, #0x14] - str r3, [sp, #0x18] - cmp r0, #0 - beq _02247400 - mov r6, #0x19 - lsl r6, r6, #8 - b _02247404 -_02247400: - mov r6, #0x32 - lsl r6, r6, #6 -_02247404: - mov r0, #0x39 - add r1, r6, #0 - bl sub_02018184 - add r7, r0, #0 - beq _022474AA - ldr r3, _022474D0 ; =0x0224BE7C - add r2, sp, #0x24 - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - ldmia r3!, {r0, r1} - stmia r2!, {r0, r1} - cmp r4, #0 - ldr r0, [r5, #0] - bne _02247426 - ldr r4, [r0, #0] - b _02247428 -_02247426: - ldr r4, [r0, #4] -_02247428: - add r0, r4, #0 - bl sub_02073D20 - str r0, [sp, #0x20] - add r0, sp, #0x34 - add r1, r4, #0 - mov r2, #2 - mov r3, #0 - bl sub_02075F0C - mov r1, #0 - add r0, r4, #0 - add r2, r1, #0 - bl sub_02074570 - str r0, [sp, #0x1c] - add r0, r4, #0 - mov r1, #5 - mov r2, #0 - bl sub_02074570 - lsl r0, r0, #0x10 - ldr r1, [sp, #0x58] - lsr r0, r0, #0x10 - cmp r1, #0 - beq _02247462 - ldr r1, [sp, #0x2c] - lsl r1, r1, #1 - str r1, [sp, #0x2c] -_02247462: - ldr r1, [sp, #0x1c] - str r7, [sp] - str r1, [sp, #4] - ldr r1, [sp, #0x58] - mov r2, #0x39 - str r1, [sp, #8] - mov r1, #2 - str r1, [sp, #0xc] - str r0, [sp, #0x10] - add r1, sp, #0x24 - ldrh r0, [r1, #0x10] - ldrh r1, [r1, #0x12] - add r3, sp, #0x24 - bl sub_02013720 - add r0, r7, #0 - add r1, r6, #0 - bl sub_020C2C54 - ldr r1, [sp, #0x14] - mov r0, #0 - str r0, [sp] - lsl r1, r1, #0x18 - ldr r0, [r5, #8] - lsr r1, r1, #0x18 - add r2, r7, #0 - add r3, r6, #0 - bl sub_0201958C - ldr r1, [sp, #0x20] - add r0, r4, #0 - bl sub_02073D48 - add r0, r7, #0 - bl sub_020181C4 -_022474AA: - ldr r0, [sp, #0x14] - cmp r0, #4 - blo _022474B4 - mov r2, #4 - b _022474B6 -_022474B4: - mov r2, #0 -_022474B6: - mov r0, #0x20 - str r0, [sp] - mov r0, #0x39 - ldr r3, [sp, #0x18] - str r0, [sp, #4] - add r1, sp, #0x24 - ldrh r0, [r1, #0x10] - ldrh r1, [r1, #0x14] - lsl r3, r3, #5 - bl sub_02006E84 - add sp, #0x44 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_022474D0: .word 0x0224BE7C - thumb_func_end ov95_022473E8 - - thumb_func_start ov95_022474D4 -ov95_022474D4: ; 0x022474D4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x20 - add r5, r0, #0 - add r4, r2, #0 - add r6, r3, #0 - cmp r1, #0 - bne _022474E6 - ldr r1, _02247564 ; =0x00000106 - b _022474F6 -_022474E6: - mov r1, #0x52 - lsl r1, r1, #2 - ldr r0, [r5, r1] - cmp r0, #0 - beq _022474F4 - sub r1, #0x41 - b _022474F6 -_022474F4: - sub r1, #0x42 -_022474F6: - mov r0, #0x39 - str r0, [sp] - mov r0, #7 - mov r2, #0 - add r3, sp, #0x1c - bl sub_02006F6C - add r7, r0, #0 - beq _0224755E - mov r0, #0xa - str r0, [sp] - str r0, [sp, #4] - ldr r0, [sp, #0x1c] - ldr r2, [sp, #0x38] - add r0, #0xc - str r0, [sp, #8] - mov r0, #0 - str r0, [sp, #0xc] - str r0, [sp, #0x10] - mov r0, #0x20 - ldr r3, [sp, #0x3c] - str r0, [sp, #0x14] - str r0, [sp, #0x18] - lsl r1, r4, #0x18 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r5, #8] - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_020198E8 - mov r0, #0xa - str r0, [sp] - str r0, [sp, #4] - lsl r0, r6, #0x18 - ldr r2, [sp, #0x38] - ldr r3, [sp, #0x3c] - lsr r0, r0, #0x18 - str r0, [sp, #8] - lsl r1, r4, #0x18 - lsl r2, r2, #0x18 - lsl r3, r3, #0x18 - ldr r0, [r5, #8] - lsr r1, r1, #0x18 - lsr r2, r2, #0x18 - lsr r3, r3, #0x18 - bl sub_02019E2C - add r0, r7, #0 - bl sub_020181C4 -_0224755E: - add sp, #0x20 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247564: .word 0x00000106 - thumb_func_end ov95_022474D4 - - thumb_func_start ov95_02247568 -ov95_02247568: ; 0x02247568 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - add r4, r1, #0 - add r6, r3, #0 - mov r0, #0x3a - add r3, r5, #0 - str r0, [sp] - add r1, r2, #0 - add r0, r4, #0 - mov r2, #1 - add r3, #8 - bl sub_02006FA0 - str r0, [r5, #0] - mov r0, #0x3a - add r3, r5, #0 - str r0, [sp] - add r0, r4, #0 - add r1, r6, #0 - mov r2, #1 - add r3, #0xc - bl sub_02006FBC - str r0, [r5, #4] - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov95_02247568 - - thumb_func_start ov95_022475A0 -ov95_022475A0: ; 0x022475A0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _022475B2 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] -_022475B2: - ldr r0, [r4, #4] - cmp r0, #0 - beq _022475C0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #4] -_022475C0: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_022475A0 - - thumb_func_start ov95_022475C4 -ov95_022475C4: ; 0x022475C4 - str r2, [r0, #0] - str r3, [r0, #8] - ldr r2, [r1, #8] - str r2, [r0, #0xc] - ldr r1, [r1, #0xc] - ldr r2, [sp] - str r1, [r0, #0x10] - add r1, r0, #0 - add r1, #0x20 - strb r2, [r1] - mov r1, #0 - str r1, [r0, #4] - str r1, [r0, #0x14] - str r1, [r0, #0x18] - str r1, [r0, #0x1c] - bx lr - thumb_func_end ov95_022475C4 - - thumb_func_start ov95_022475E4 -ov95_022475E4: ; 0x022475E4 - push {r4, lr} - sub sp, #0x20 - ldr r0, [r0, #0x18] - str r0, [sp] - lsl r0, r2, #0xc - str r0, [sp, #8] - lsl r0, r3, #0xc - str r0, [sp, #0xc] - mov r0, #0 - str r0, [sp, #0x10] - ldr r0, [sp, #0x28] - str r1, [sp, #4] - str r0, [sp, #0x14] - ldr r0, [sp, #0x2c] - str r0, [sp, #0x18] - mov r0, #0x39 - str r0, [sp, #0x1c] - add r0, sp, #0 - bl sub_02021B90 - add r4, r0, #0 - beq _02247620 - mov r1, #1 - bl sub_02021CC8 - mov r1, #1 - add r0, r4, #0 - lsl r1, r1, #0xc - bl sub_02021CE4 -_02247620: - add r0, r4, #0 - add sp, #0x20 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_022475E4 - - thumb_func_start ov95_02247628 -ov95_02247628: ; 0x02247628 - ldr r0, [r0, #8] - bx lr - thumb_func_end ov95_02247628 - - thumb_func_start ov95_0224762C -ov95_0224762C: ; 0x0224762C - ldr r0, [r0, #0xc] - bx lr - thumb_func_end ov95_0224762C - - thumb_func_start ov95_02247630 -ov95_02247630: ; 0x02247630 - ldr r0, [r0, #0x10] - bx lr - thumb_func_end ov95_02247630 - - thumb_func_start ov95_02247634 -ov95_02247634: ; 0x02247634 - ldr r0, [r0, #0] - ldr r0, [r0, #0] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02247634 - - thumb_func_start ov95_0224763C -ov95_0224763C: ; 0x0224763C - ldr r0, [r0, #0] - ldr r0, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov95_0224763C - - thumb_func_start ov95_02247644 -ov95_02247644: ; 0x02247644 - ldr r0, [r0, #0] - ldr r0, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02247644 - - thumb_func_start ov95_0224764C -ov95_0224764C: ; 0x0224764C - mov r1, #0x53 - lsl r1, r1, #2 - ldrh r0, [r0, r1] - bx lr - thumb_func_end ov95_0224764C - - thumb_func_start ov95_02247654 -ov95_02247654: ; 0x02247654 - ldr r1, _0224765C ; =0x0000014E - ldrh r0, [r0, r1] - bx lr - nop -_0224765C: .word 0x0000014E - thumb_func_end ov95_02247654 - - thumb_func_start ov95_02247660 -ov95_02247660: ; 0x02247660 - mov r1, #0x15 - lsl r1, r1, #4 - ldrh r0, [r0, r1] - bx lr - thumb_func_end ov95_02247660 - - thumb_func_start ov95_02247668 -ov95_02247668: ; 0x02247668 - ldr r1, _02247670 ; =0x00000152 - ldrh r0, [r0, r1] - bx lr - nop -_02247670: .word 0x00000152 - thumb_func_end ov95_02247668 - - thumb_func_start ov95_02247674 -ov95_02247674: ; 0x02247674 - ldr r0, [r0, #0] - ldr r3, _0224767C ; =sub_02027B50 - ldr r0, [r0, #0x14] - bx r3 - ; .align 2, 0 -_0224767C: .word sub_02027B50 - thumb_func_end ov95_02247674 - - thumb_func_start ov95_02247680 -ov95_02247680: ; 0x02247680 - ldr r0, [r0, #0] - ldr r0, [r0, #0x10] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02247680 - - thumb_func_start ov95_02247688 -ov95_02247688: ; 0x02247688 - ldr r0, _02247690 ; =0x0224C2E0 - mov r1, #0 - str r1, [r0, #0] - bx lr - ; .align 2, 0 -_02247690: .word 0x0224C2E0 - thumb_func_end ov95_02247688 - - thumb_func_start ov95_02247694 -ov95_02247694: ; 0x02247694 - push {r4, r5, r6, lr} - ldr r6, _022476C0 ; =0x0224C2E0 - ldr r0, [r6, #0] - cmp r0, #0 - beq _022476BC - mov r4, #0 - cmp r0, #0 - ble _022476B6 - ldr r5, _022476C4 ; =0x0224C2E4 -_022476A6: - ldr r0, [r5, #0] - bl sub_020181C4 - ldr r0, [r6, #0] - add r4, r4, #1 - add r5, r5, #4 - cmp r4, r0 - blt _022476A6 -_022476B6: - ldr r0, _022476C0 ; =0x0224C2E0 - mov r1, #0 - str r1, [r0, #0] -_022476BC: - pop {r4, r5, r6, pc} - nop -_022476C0: .word 0x0224C2E0 -_022476C4: .word 0x0224C2E4 - thumb_func_end ov95_02247694 - - thumb_func_start ov95_022476C8 -ov95_022476C8: ; 0x022476C8 - push {r4, lr} - add r4, r0, #0 - ldr r0, _022476E8 ; =0x0224C2E0 - ldr r0, [r0, #0] - cmp r0, #0x20 - blt _022476D8 - bl sub_02022974 -_022476D8: - ldr r0, _022476E8 ; =0x0224C2E0 - ldr r2, [r0, #0] - add r1, r2, #1 - str r1, [r0, #0] - ldr r0, _022476EC ; =0x0224C2E4 - lsl r1, r2, #2 - str r4, [r0, r1] - pop {r4, pc} - ; .align 2, 0 -_022476E8: .word 0x0224C2E0 -_022476EC: .word 0x0224C2E4 - thumb_func_end ov95_022476C8 - - thumb_func_start ov95_022476F0 -ov95_022476F0: ; 0x022476F0 - push {r3, r4, r5, r6, r7, lr} - add r7, r0, #0 - add r4, r1, #0 - mov r0, #0x3a - mov r1, #0x20 - add r5, r2, #0 - str r3, [sp] - bl sub_02018144 - add r6, r0, #0 - beq _02247736 - ldr r3, [sp] - add r1, r4, #0 - add r2, r5, #0 - bl ov95_02247AF0 - mov r1, #0x8c - mov r0, #0x3a - mul r1, r7 - bl sub_02018144 - str r0, [r6, #0x18] - mov r4, #0 - str r7, [r6, #0x1c] - cmp r7, #0 - bls _02247736 - add r5, r4, #0 -_02247726: - ldr r0, [r6, #0x18] - add r0, r0, r5 - bl ov95_02247868 - add r4, r4, #1 - add r5, #0x8c - cmp r4, r7 - blo _02247726 -_02247736: - add r0, r6, #0 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov95_022476F0 - - thumb_func_start ov95_0224773C -ov95_0224773C: ; 0x0224773C - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, [r5, #0x1c] - mov r6, #0 - cmp r0, #0 - bls _0224775C - add r4, r6, #0 -_0224774A: - ldr r0, [r5, #0x18] - add r0, r0, r4 - bl ov95_0224789C - ldr r0, [r5, #0x1c] - add r6, r6, #1 - add r4, #0x8c - cmp r6, r0 - blo _0224774A -_0224775C: - ldr r0, [r5, #0x18] - bl sub_020181C4 - add r0, r5, #0 - bl ov95_02247B5C - add r0, r5, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} - thumb_func_end ov95_0224773C - - thumb_func_start ov95_02247770 -ov95_02247770: ; 0x02247770 - push {r3, r4, r5, r6, lr} - sub sp, #4 - mov r1, #0 - add r5, r0, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - bl sub_020203EC - ldr r0, [r5, #0x1c] - mov r6, #0 - cmp r0, #0 - bls _022477A6 - add r4, r6, #0 -_0224778E: - ldr r0, [r5, #0x18] - add r0, r0, r4 - ldr r1, [r0, #0x64] - cmp r1, #0 - beq _0224779C - bl ov95_022477B8 -_0224779C: - ldr r0, [r5, #0x1c] - add r6, r6, #1 - add r4, #0x8c - cmp r6, r0 - blo _0224778E -_022477A6: - mov r2, #1 - mov r0, #0x12 - add r1, sp, #0 - str r2, [sp] - bl sub_020B275C - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov95_02247770 - - thumb_func_start ov95_022477B8 -ov95_022477B8: ; 0x022477B8 - push {r4, lr} - sub sp, #0x50 - add r4, r0, #0 - add r0, sp, #0x2c - bl sub_020BB4C8 - add r0, r4, #0 - add r0, #0x80 - ldrh r0, [r0] - ldr r3, _02247864 ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #8 - bl sub_020BB5AC - add r1, sp, #0x2c - add r0, sp, #8 - add r2, r1, #0 - bl sub_020BB8EC - add r0, r4, #0 - add r0, #0x82 - ldrh r0, [r0] - ldr r3, _02247864 ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #8 - bl sub_020BB5C8 - add r1, sp, #0x2c - add r0, sp, #8 - add r2, r1, #0 - bl sub_020BB8EC - add r0, r4, #0 - add r0, #0x84 - ldrh r0, [r0] - ldr r3, _02247864 ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #8 - bl sub_020BB5E4 - add r1, sp, #0x2c - add r0, sp, #8 - add r2, r1, #0 - bl sub_020BB8EC - add r0, r4, #0 - add r0, #0x88 - ldr r0, [r0, #0] - cmp r0, #0x1f - beq _02247850 - str r0, [sp] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - str r0, [sp, #4] - bl sub_020AF5B4 -_02247850: - add r1, r4, #0 - add r0, r4, #4 - add r4, #0x74 - add r1, #0x68 - add r2, sp, #0x2c - add r3, r4, #0 - bl sub_0201CA74 - add sp, #0x50 - pop {r4, pc} - ; .align 2, 0 -_02247864: .word 0x020F983C - thumb_func_end ov95_022477B8 - - thumb_func_start ov95_02247868 -ov95_02247868: ; 0x02247868 - mov r1, #0 - str r1, [r0, #0x64] - add r2, r0, #0 - str r1, [r0, #0] - add r2, #0x84 - strh r1, [r2] - mov r2, #0x84 - ldrsh r3, [r0, r2] - add r2, r0, #0 - add r2, #0x82 - strh r3, [r2] - mov r2, #0x82 - ldrsh r3, [r0, r2] - add r2, r0, #0 - add r2, #0x80 - strh r3, [r2] - mov r2, #1 - lsl r2, r2, #0xc - str r2, [r0, #0x7c] - str r2, [r0, #0x78] - str r2, [r0, #0x74] - str r1, [r0, #0x70] - str r1, [r0, #0x6c] - str r1, [r0, #0x68] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02247868 - - thumb_func_start ov95_0224789C -ov95_0224789C: ; 0x0224789C - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _022478B0 - bl sub_020181C4 - mov r0, #0 - str r0, [r4, #0] - str r0, [r4, #0x64] -_022478B0: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224789C - - thumb_func_start ov95_022478B4 -ov95_022478B4: ; 0x022478B4 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - ldr r4, [r0, #0x18] - add r6, r1, #0 - mov r0, #0x8c - mul r6, r0 - add r7, r2, #0 - mov r0, #1 - str r0, [sp] - str r3, [sp, #4] - add r1, r3, #0 - add r0, r7, #0 - mov r2, #0 - mov r3, #0x3a - add r5, r4, r6 - bl sub_02006FE8 - str r0, [r4, r6] - ldr r1, [sp, #4] - add r0, r7, #0 - bl sub_02006B58 - add r1, r0, #0 - ldr r0, [r4, r6] - bl sub_020C2C54 - ldr r0, [r4, r6] - cmp r0, #0 - beq _02247950 - bl sub_020B3C0C - str r0, [r5, #0x58] - cmp r0, #0 - beq _02247918 - add r2, r0, #0 - add r2, #8 - beq _0224790C - ldrb r1, [r0, #9] - cmp r1, #0 - bls _0224790C - ldrh r1, [r0, #0xe] - add r1, r2, r1 - add r1, r1, #4 - b _0224790E -_0224790C: - mov r1, #0 -_0224790E: - cmp r1, #0 - beq _02247918 - ldr r1, [r1, #0] - add r0, r0, r1 - b _0224791A -_02247918: - mov r0, #0 -_0224791A: - str r0, [r5, #0x5c] - ldr r0, [r5, #0] - bl sub_020B3C1C - str r0, [r5, #0x60] - bl sub_0201CBCC - ldr r0, [r5, #0] - ldr r1, [r5, #0x60] - bl sub_0201CBB0 - ldr r1, [r5, #0x5c] - add r0, r5, #4 - bl sub_020AE608 - ldr r0, [sp, #0x20] - mov r1, #0x1f - str r0, [r5, #0x68] - ldr r0, [sp, #0x24] - str r0, [r5, #0x6c] - ldr r0, [sp, #0x28] - str r0, [r5, #0x70] - add r0, r5, #0 - add r0, #0x88 - str r1, [r0, #0] - ldr r0, [sp, #0x2c] - str r0, [r5, #0x64] -_02247950: - add r0, r5, #0 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov95_022478B4 - - thumb_func_start ov95_02247958 -ov95_02247958: ; 0x02247958 - add r2, r0, #0 - add r2, #0x68 - add r3, r1, #0 - ldmia r2!, {r0, r1} - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - bx lr - thumb_func_end ov95_02247958 - - thumb_func_start ov95_02247968 -ov95_02247968: ; 0x02247968 - add r3, r1, #0 - add r2, r0, #0 - ldmia r3!, {r0, r1} - add r2, #0x68 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - bx lr - thumb_func_end ov95_02247968 - - thumb_func_start ov95_02247978 -ov95_02247978: ; 0x02247978 - add r2, r0, #0 - add r2, #0x80 - ldrh r2, [r2] - strh r2, [r1] - add r2, r0, #0 - add r2, #0x82 - ldrh r2, [r2] - add r0, #0x84 - strh r2, [r1, #2] - ldrh r0, [r0] - strh r0, [r1, #4] - bx lr - thumb_func_end ov95_02247978 - - thumb_func_start ov95_02247990 -ov95_02247990: ; 0x02247990 - ldrh r3, [r1] - add r2, r0, #0 - add r2, #0x80 - strh r3, [r2] - add r2, r0, #0 - ldrh r3, [r1, #2] - add r2, #0x82 - add r0, #0x84 - strh r3, [r2] - ldrh r1, [r1, #4] - strh r1, [r0] - bx lr - thumb_func_end ov95_02247990 - - thumb_func_start ov95_022479A8 -ov95_022479A8: ; 0x022479A8 - str r1, [r0, #0x64] - bx lr - thumb_func_end ov95_022479A8 - - thumb_func_start ov95_022479AC -ov95_022479AC: ; 0x022479AC - push {r3, lr} - add r2, r0, #0 - add r2, #0x88 - str r1, [r2, #0] - cmp r1, #0x1f - ldr r0, [r0, #0x5c] - beq _022479C6 - mov r2, #0x1f - mov r1, #0 - lsl r2, r2, #0x10 - bl sub_020B2D8C - pop {r3, pc} -_022479C6: - mov r2, #0x1f - mov r1, #1 - lsl r2, r2, #0x10 - bl sub_020B2D8C - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov95_022479AC - - thumb_func_start ov95_022479D4 -ov95_022479D4: ; 0x022479D4 - str r1, [r0, #0x74] - str r1, [r0, #0x78] - str r1, [r0, #0x7c] - bx lr - thumb_func_end ov95_022479D4 - - thumb_func_start ov95_022479DC -ov95_022479DC: ; 0x022479DC - push {r3, r4, lr} - sub sp, #0x4c - add r4, r0, #0 - add r0, sp, #0x28 - bl sub_020BB4C8 - add r0, r4, #0 - add r0, #0x80 - ldrh r0, [r0] - ldr r3, _02247A8C ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #4 - bl sub_020BB5AC - add r1, sp, #0x28 - add r0, sp, #4 - add r2, r1, #0 - bl sub_020BB8EC - add r0, r4, #0 - add r0, #0x82 - ldrh r0, [r0] - ldr r3, _02247A8C ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #4 - bl sub_020BB5C8 - add r1, sp, #0x28 - add r0, sp, #4 - add r2, r1, #0 - bl sub_020BB8EC - add r0, r4, #0 - add r0, #0x84 - ldrh r0, [r0] - ldr r3, _02247A8C ; =0x020F983C - asr r0, r0, #4 - lsl r2, r0, #1 - lsl r1, r2, #1 - add r2, r2, #1 - lsl r2, r2, #1 - ldrsh r1, [r3, r1] - ldrsh r2, [r3, r2] - add r0, sp, #4 - bl sub_020BB5E4 - add r1, sp, #0x28 - add r0, sp, #4 - add r2, r1, #0 - bl sub_020BB8EC - mov r1, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - bl sub_020203EC - add r1, r4, #0 - ldr r0, [r4, #0x5c] - add r4, #0x74 - add r1, #0x68 - add r2, sp, #0x28 - add r3, r4, #0 - bl sub_0201CED8 - add r4, r0, #0 - mov r2, #1 - mov r0, #0x12 - add r1, sp, #0 - str r2, [sp] - bl sub_020B275C - add r0, r4, #0 - add sp, #0x4c - pop {r3, r4, pc} - ; .align 2, 0 -_02247A8C: .word 0x020F983C - thumb_func_end ov95_022479DC - - thumb_func_start ov95_02247A90 -ov95_02247A90: ; 0x02247A90 - push {r3, r4, lr} - sub sp, #0xc - add r2, r0, #0 - add r4, r1, #0 - ldr r1, [r2, #0] - add r0, sp, #0 - bl sub_02020ABC - add r2, sp, #0 - ldmia r2!, {r0, r1} - stmia r4!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r4, #0] - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02247A90 - - thumb_func_start ov95_02247AB0 -ov95_02247AB0: ; 0x02247AB0 - ldr r3, _02247ABC ; =sub_020209D4 - add r2, r0, #0 - add r0, r1, #0 - ldr r1, [r2, #0] - bx r3 - nop -_02247ABC: .word sub_020209D4 - thumb_func_end ov95_02247AB0 - - thumb_func_start ov95_02247AC0 -ov95_02247AC0: ; 0x02247AC0 - ldr r3, _02247ACC ; =sub_020209F8 - add r2, r0, #0 - add r0, r1, #0 - ldr r1, [r2, #0] - bx r3 - nop -_02247ACC: .word sub_020209F8 - thumb_func_end ov95_02247AC0 - - thumb_func_start ov95_02247AD0 -ov95_02247AD0: ; 0x02247AD0 - ldr r3, _02247ADC ; =sub_02020854 - add r2, r0, #0 - add r0, r1, #0 - ldr r1, [r2, #0] - bx r3 - nop -_02247ADC: .word sub_02020854 - thumb_func_end ov95_02247AD0 - - thumb_func_start ov95_02247AE0 -ov95_02247AE0: ; 0x02247AE0 - ldr r3, _02247AEC ; =sub_02020910 - add r2, r0, #0 - add r0, r1, #0 - ldr r1, [r2, #0] - bx r3 - nop -_02247AEC: .word sub_02020910 - thumb_func_end ov95_02247AE0 - - thumb_func_start ov95_02247AF0 -ov95_02247AF0: ; 0x02247AF0 - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x18 - add r5, r0, #0 - mov r0, #0x3a - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - bl sub_020203AC - str r0, [r5, #0] - str r4, [r5, #4] - str r6, [r5, #8] - mov r1, #0x4b - add r2, r5, #0 - str r7, [r5, #0xc] - mov r0, #0 - strh r0, [r5, #0x10] - strh r0, [r5, #0x12] - strh r0, [r5, #0x14] - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r5, #0] - ldr r3, _02247B58 ; =0x00000FA4 - str r0, [sp, #8] - add r0, r5, #4 - lsl r1, r1, #0xe - add r2, #0x10 - bl sub_020206D0 - mov r1, #0 - mov r0, #1 - lsl r0, r0, #0xc - str r0, [sp, #0x10] - str r1, [sp, #0xc] - str r1, [sp, #0x14] - ldr r1, [r5, #0] - add r0, sp, #0xc - bl sub_02020680 - ldr r0, [r5, #0] - bl sub_020203D4 - mov r1, #0xfa - ldr r2, [r5, #0] - mov r0, #0 - lsl r1, r1, #0xe - bl sub_020206BC - add sp, #0x18 - pop {r3, r4, r5, r6, r7, pc} - nop -_02247B58: .word 0x00000FA4 - thumb_func_end ov95_02247AF0 - - thumb_func_start ov95_02247B5C -ov95_02247B5C: ; 0x02247B5C - push {r4, lr} - add r4, r0, #0 - bl sub_020203E0 - ldr r0, [r4, #0] - bl sub_020203B8 - pop {r4, pc} - thumb_func_end ov95_02247B5C - - thumb_func_start ov95_02247B6C -ov95_02247B6C: ; 0x02247B6C - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0x84 - bl sub_02018144 - add r4, r0, #0 - beq _02247BC2 - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - str r0, [r4, #0x54] - mov r0, #0x3a - bl sub_0200762C - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x10] - mov r0, #0x4b - lsl r0, r0, #2 - mov r1, #0x3a - bl sub_02023790 - str r0, [r4, #0x68] - mov r0, #0x4b - lsl r0, r0, #2 - mov r1, #0x3a - bl sub_02023790 - str r0, [r4, #0x6c] - mov r0, #0 - str r0, [r4, #0x78] - str r0, [r4, #0x7c] - mov r0, #0x93 - mov r1, #0x3a - bl sub_02006C24 - add r1, r4, #0 - add r1, #0x80 - str r0, [r1, #0] -_02247BC2: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_02247B6C - - thumb_func_start ov95_02247BC8 -ov95_02247BC8: ; 0x02247BC8 - push {r4, lr} - add r4, r0, #0 - beq _02247C30 - bl ov95_022483C4 - add r0, r4, #0 - bl ov95_02248490 - add r0, r4, #0 - bl ov95_02248340 - ldr r0, [r4, #0x68] - bl sub_020237BC - ldr r0, [r4, #0x6c] - bl sub_020237BC - ldr r0, [r4, #0x70] - bl ov95_0224773C - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0x54] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0x54] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - add r0, #0x58 - bl sub_0201A8FC - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl sub_02006CA8 - ldr r0, [r4, #0x10] - cmp r0, #0 - beq _02247C24 - bl sub_02007DC8 -_02247C24: - ldr r0, [r4, #0xc] - bl sub_02007B6C - add r0, r4, #0 - bl sub_020181C4 -_02247C30: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02247BC8 - - thumb_func_start ov95_02247C34 -ov95_02247C34: ; 0x02247C34 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #4 - bhs _02247C62 - lsl r3, r2, #2 - ldr r2, _02247C68 ; =0x0224BF04 - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _02247C58 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_02247C58: - add r0, r5, #0 - bl ov95_02247C6C - mov r0, #0 - pop {r3, r4, r5, pc} -_02247C62: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_02247C68: .word 0x0224BF04 - thumb_func_end ov95_02247C34 - - thumb_func_start ov95_02247C6C -ov95_02247C6C: ; 0x02247C6C - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_020BFAB8 - mov r1, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - bl sub_020B2628 - bl sub_020A73C0 - ldr r0, [r4, #0xc] - bl sub_02008A94 - ldr r0, [r4, #0xc] - bl sub_02007768 - mov r2, #1 - str r2, [sp] - mov r0, #0x12 - add r1, sp, #0 - bl sub_020B275C - ldr r0, [r4, #0x70] - bl ov95_02247770 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02247C6C - - thumb_func_start ov95_02247CB4 -ov95_02247CB4: ; 0x02247CB4 - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, _02247EB0 ; =0x0224BF5C - bl sub_0201FE94 - ldr r2, _02247EB4 ; =0x04000304 - ldr r0, _02247EB8 ; =0xFFFF7FFF - ldrh r1, [r2] - and r0, r1 - strh r0, [r2] - ldr r0, _02247EBC ; =0x0224BF14 - bl sub_02018368 - ldr r0, [r4, #0x54] - ldr r2, _02247EC0 ; =0x0224BF24 - mov r1, #1 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x54] - ldr r2, _02247EC4 ; =0x0224BF40 - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x54] - ldr r2, _02247EC4 ; =0x0224BF40 - mov r1, #6 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r2, _02247EC8 ; =0x04000008 - mov r0, #3 - ldrh r3, [r2] - mov r1, #1 - bic r3, r0 - add r0, r3, #0 - orr r0, r1 - strh r0, [r2] - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0x54] - add r3, r1, #0 - bl sub_020196C0 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r4, #0x54] - mov r1, #1 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r4, #0] - bl ov95_02247674 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3a - str r0, [sp, #4] - ldr r0, [r4, #0x54] - mov r1, #1 - mov r2, #0x6d - mov r3, #2 - bl sub_0200DD0C - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - add r1, r4, #0 - str r0, [sp, #8] - mov r2, #1 - str r2, [sp, #0xc] - str r2, [sp, #0x10] - ldr r0, [r4, #0x54] - add r1, #0x58 - mov r3, #2 - bl sub_0201A7E8 - add r0, r4, #0 - add r0, #0x58 - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0x20 - str r3, [sp] - mov r0, #0x3a - str r0, [sp, #4] - mov r0, #0xe - mov r1, #7 - mov r2, #0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x54] - mov r0, #0x5d - mov r1, #0x16 - mov r3, #2 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x54] - mov r0, #0x5d - mov r1, #0x15 - mov r3, #2 - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0x17 - add r3, r2, #0 - bl sub_02006E84 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x54] - mov r0, #0x5d - mov r1, #0x16 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x54] - mov r0, #0x5d - mov r1, #0x15 - mov r3, #6 - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0x17 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - ldr r0, [r4, #0x54] - mov r1, #1 - bl sub_02019448 - add r0, r4, #0 - bl ov95_02248174 - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - add r3, r1, #0 - bl ov95_022476F0 - str r0, [r4, #0x70] - add r0, r4, #0 - bl ov95_02248240 - str r0, [r4, #0x10] - mov r1, #0 - mov r0, #0x6a - str r1, [sp] - lsl r0, r0, #0xa - str r0, [sp, #4] - ldr r0, _02247ECC ; =0x00073800 - mov r2, #0x5d - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r4, #0x70] - mov r3, #0x1b - bl ov95_022478B4 - ldr r2, _02247ED0 ; =0x0224BEFC - str r0, [r4, #0x74] - ldrh r3, [r2] - add r0, sp, #0x14 - add r1, sp, #0x14 - strh r3, [r0] - ldrh r3, [r2, #2] - ldrh r2, [r2, #4] - strh r3, [r0, #2] - strh r2, [r0, #4] - ldr r0, [r4, #0x74] - bl ov95_02247990 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add r0, r4, #0 - bl ov95_0224829C - ldr r0, _02247ED4 ; =0x04000050 - mov r1, #0 - strh r1, [r0] - bl sub_02039734 - mov r0, #1 - mov r1, #0x39 - bl sub_020397C8 - mov r0, #0x10 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_02247EB0: .word 0x0224BF5C -_02247EB4: .word 0x04000304 -_02247EB8: .word 0xFFFF7FFF -_02247EBC: .word 0x0224BF14 -_02247EC0: .word 0x0224BF24 -_02247EC4: .word 0x0224BF40 -_02247EC8: .word 0x04000008 -_02247ECC: .word 0x00073800 -_02247ED0: .word 0x0224BEFC -_02247ED4: .word 0x04000050 - thumb_func_end ov95_02247CB4 - - thumb_func_start ov95_02247ED8 -ov95_02247ED8: ; 0x02247ED8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0] - cmp r0, #0 - bne _02247EFE - bl sub_0200F2AC - cmp r0, #0 - beq _02247EFE - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r4, #0x3c] - mov r1, #1 - bl sub_02021CAC - mov r0, #1 - pop {r4, pc} -_02247EFE: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02247ED8 - - thumb_func_start ov95_02247F04 -ov95_02247F04: ; 0x02247F04 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - add r4, r0, #0 - ldr r0, [r5, #0] - cmp r0, #4 - bhi _02247F3E - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_02247F1E: ; jump table - .short _02247F28 - _02247F1E - 2 ; case 0 - .short _02247F34 - _02247F1E - 2 ; case 1 - .short _02247FA8 - _02247F1E - 2 ; case 2 - .short _02248058 - _02247F1E - 2 ; case 3 - .short _02248078 - _02247F1E - 2 ; case 4 -_02247F28: - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _02248088 -_02247F34: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0xa - bgt _02247F40 -_02247F3E: - b _02248088 -_02247F40: - ldr r0, [r4, #0] - bl ov95_02247630 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - bl ov95_0224762C - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov95_02247680 - cmp r0, #1 - bne _02247F60 - mov r1, #0 - mov r6, #2 - b _02247F64 -_02247F60: - mov r1, #4 - mov r6, #3 -_02247F64: - ldr r0, [sp, #0xc] - ldr r2, [r4, #0x68] - bl sub_0200B1B8 - ldr r1, [r4, #0x6c] - ldr r2, [r4, #0x68] - add r0, r7, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x6c] - add r0, #0x58 - mov r1, #1 - bl sub_0201D738 - add r0, r4, #0 - add r0, #0x58 - mov r1, #0x6d - mov r2, #2 - bl sub_0200E010 - add r0, r4, #0 - add r0, #0x58 - bl sub_0201A954 - mov r0, #0 - str r0, [r4, #8] - str r6, [r5, #0] - b _02248088 -_02247FA8: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x3c - ble _02248088 - ldr r0, [r4, #0] - bl ov95_02247630 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov95_0224762C - add r7, r0, #0 - ldr r2, [r4, #0x68] - add r0, r6, #0 - mov r1, #1 - bl sub_0200B1B8 - ldr r1, [r4, #0x6c] - ldr r2, [r4, #0x68] - add r0, r7, #0 - bl sub_0200C388 - ldr r0, [r4, #0] - bl ov95_02247634 - mov r1, #0x4c - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _02248024 - ldr r0, [r4, #0x10] - mov r1, #1 - bl sub_02007B98 - ldr r0, [r4, #0] - bl ov95_0224764C - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r1, sp, #0x10 - mov r3, #1 - bl sub_02078A4C - ldr r0, [r4, #0] - bl ov95_0224764C - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov95_02247654 - add r2, r0, #0 - add r1, sp, #0x10 - lsl r2, r2, #0x18 - ldrb r1, [r1] - add r0, r6, #0 - lsr r2, r2, #0x18 - bl sub_0200590C -_02248024: - add r0, r4, #0 - add r0, #0x58 - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x6c] - add r0, #0x58 - mov r1, #1 - bl sub_0201D738 - add r0, r4, #0 - add r0, #0x58 - bl sub_0201ACCC - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _02248088 -_02248058: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x3c - ble _02248088 - add r0, r4, #0 - add r0, #0x58 - mov r1, #0 - bl sub_0200E084 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _02248088 -_02248078: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x14 - ble _02248088 - add sp, #0x14 - mov r0, #1 - pop {r4, r5, r6, r7, pc} -_02248088: - mov r0, #0 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov95_02247F04 - - thumb_func_start ov95_02248090 -ov95_02248090: ; 0x02248090 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - ldr r1, [r4, #0] - add r5, r0, #0 - cmp r1, #4 - bhi _0224816A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022480AA: ; jump table - .short _022480B4 - _022480AA - 2 ; case 0 - .short _022480CE - _022480AA - 2 ; case 1 - .short _022480F4 - _022480AA - 2 ; case 2 - .short _02248120 - _022480AA - 2 ; case 3 - .short _02248152 - _022480AA - 2 ; case 4 -_022480B4: - ldr r0, _02248170 ; =0x000006A8 - bl sub_02005748 - add r0, r5, #0 - mov r1, #0 - mov r2, #0x10 - mov r3, #0xc - bl ov95_02248364 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224816A -_022480CE: - bl ov95_022483B4 - cmp r0, #0 - beq _0224816A - ldr r0, [r5, #0x10] - bl sub_02007DC8 - ldr r0, [r5, #0x40] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r5, #0x40] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224816A -_022480F4: - ldr r0, [r5, #0x40] - bl sub_02021FD0 - cmp r0, #0 - bne _0224816A - ldr r0, [r5, #0x74] - mov r1, #1 - bl ov95_022479A8 - mov r1, #0x10 - add r0, r5, #0 - mov r2, #0 - add r3, r1, #0 - bl ov95_02248364 - add r0, r5, #0 - bl ov95_02248420 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224816A -_02248120: - bl ov95_0224847C - cmp r0, #2 - bge _02248132 - add r0, r5, #0 - bl ov95_0224846C - cmp r0, #1 - bne _0224816A -_02248132: - mov r0, #0x18 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224816A -_02248152: - bl sub_0200F2AC - cmp r0, #0 - beq _0224816A - add r0, r5, #0 - bl ov95_0224846C - cmp r0, #0 - beq _0224816A - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0224816A: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_02248170: .word 0x000006A8 - thumb_func_end ov95_02248090 - - thumb_func_start ov95_02248174 -ov95_02248174: ; 0x02248174 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _0224821C ; =0x04000060 - ldr r2, _02248220 ; =0xFFFFCFFD - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - ldrh r3, [r0] - add r1, r2, #2 - and r3, r1 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0] - ldr r1, _02248224 ; =0x0000CFFB - and r1, r3 - strh r1, [r0] - add r1, r2, #2 - ldrh r3, [r0] - lsr r2, r2, #0x11 - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _02248228 ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _0224822C ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - ldr r3, _02248230 ; =0x02100DEC - mov r0, #1 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _02248234 ; =0x02100DF4 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - mov r1, #0 - mov r2, #1 - blx r3 - ldr r2, _02248238 ; =0x7FFF0000 - add r6, r0, #0 - and r2, r4 - lsl r1, r4, #0x10 - lsr r2, r2, #0x10 - ldr r0, [r5, #0xc] - lsr r1, r1, #0xd - lsl r2, r2, #4 - bl sub_02008A78 - ldr r2, _0224823C ; =0xFFFF0000 - lsl r1, r6, #0x10 - and r2, r6 - lsr r2, r2, #0x10 - ldr r0, [r5, #0xc] - lsr r1, r1, #0xd - lsl r2, r2, #3 - bl sub_02008A84 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224821C: .word 0x04000060 -_02248220: .word 0xFFFFCFFD -_02248224: .word 0x0000CFFB -_02248228: .word 0x04000540 -_0224822C: .word 0xBFFF0000 -_02248230: .word 0x02100DEC -_02248234: .word 0x02100DF4 -_02248238: .word 0x7FFF0000 -_0224823C: .word 0xFFFF0000 - thumb_func_end ov95_02248174 - - thumb_func_start ov95_02248240 -ov95_02248240: ; 0x02248240 - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov95_02247634 - add r4, r0, #0 - add r0, sp, #0x10 - add r1, r4, #0 - mov r2, #2 - mov r3, #0 - bl sub_02075F0C - ldr r0, [r5, #0] - bl ov95_0224764C - add r2, r0, #0 - add r0, r5, #0 - add r0, #0x80 - add r1, r5, #0 - ldr r0, [r0, #0] - add r1, #0x14 - mov r3, #1 - bl sub_020789BC - add r0, r4, #0 - mov r1, #2 - mov r2, #0 - bl sub_020765C4 - add r3, r0, #0 - mov r1, #0 - str r1, [sp] - add r0, r5, #0 - str r1, [sp, #4] - add r0, #0x14 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0xc] - add r3, #0x50 - add r1, sp, #0x10 - mov r2, #0x80 - bl sub_02007C34 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov95_02248240 - - thumb_func_start ov95_0224829C -ov95_0224829C: ; 0x0224829C - push {r4, lr} - sub sp, #0x70 - add r4, r0, #0 - add r0, #0x44 - mov r1, #0x5d - mov r2, #7 - mov r3, #8 - bl ov95_02247568 - add r0, sp, #0x5c - bl sub_020A81D0 - add r0, sp, #0x38 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r0, sp, #0x38 - str r0, [sp, #0x10] - mov r0, #0x5d - mov r1, #9 - bl sub_02006F00 - mov r0, #0x3a - str r0, [sp] - add r0, sp, #0x5c - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl sub_02006EE0 - mov r0, #2 - add r1, r4, #0 - str r0, [sp] - add r0, sp, #0x14 - add r1, #0x44 - add r2, sp, #0x38 - add r3, sp, #0x5c - bl ov95_022475C4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r2, #0x80 - mov r3, #0x64 - bl ov95_022475E4 - str r0, [r4, #0x3c] - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r2, #0x80 - mov r3, #0x5a - bl ov95_022475E4 - str r0, [r4, #0x40] - mov r1, #1 - bl sub_02021E80 - ldr r0, [r4, #0x3c] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_02021CAC - add sp, #0x70 - pop {r4, pc} - thumb_func_end ov95_0224829C - - thumb_func_start ov95_02248340 -ov95_02248340: ; 0x02248340 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02248348: - ldr r0, [r5, #0x3c] - cmp r0, #0 - beq _02248352 - bl sub_02021BD4 -_02248352: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _02248348 - add r6, #0x44 - add r0, r6, #0 - bl ov95_022475A0 - pop {r4, r5, r6, pc} - thumb_func_end ov95_02248340 - - thumb_func_start ov95_02248364 -ov95_02248364: ; 0x02248364 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x3a - mov r1, #0x14 - str r2, [sp] - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - beq _022483AA - str r5, [r4, #0] - lsl r0, r6, #0xc - str r0, [r4, #4] - ldr r0, [sp] - lsl r1, r0, #0xc - str r1, [r4, #8] - ldr r0, [r4, #4] - sub r0, r1, r0 - add r1, r7, #0 - bl sub_020E1F6C - str r0, [r4, #0xc] - ldr r0, _022483AC ; =ov95_022483E4 - str r7, [r4, #0x10] - add r1, r4, #0 - mov r2, #0 - bl sub_0200DA04 - str r0, [r5, #0x78] - ldr r0, _022483B0 ; =0x04000050 - mov r1, #1 - add r2, r6, #0 - bl sub_020BF578 -_022483AA: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_022483AC: .word ov95_022483E4 -_022483B0: .word 0x04000050 - thumb_func_end ov95_02248364 - - thumb_func_start ov95_022483B4 -ov95_022483B4: ; 0x022483B4 - ldr r0, [r0, #0x78] - cmp r0, #0 - bne _022483BE - mov r0, #1 - bx lr -_022483BE: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov95_022483B4 - - thumb_func_start ov95_022483C4 -ov95_022483C4: ; 0x022483C4 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x78] - cmp r0, #0 - beq _022483E0 - bl sub_0201CED0 - bl ov95_022476C8 - ldr r0, [r4, #0x78] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x78] -_022483E0: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_022483C4 - - thumb_func_start ov95_022483E4 -ov95_022483E4: ; 0x022483E4 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #0 - ble _02248406 - ldr r1, [r4, #4] - ldr r0, [r4, #0xc] - add r2, r1, r0 - str r2, [r4, #4] - ldr r0, _0224841C ; =0x04000050 - mov r1, #1 - asr r2, r2, #0xc - bl sub_020BF578 - pop {r4, pc} -_02248406: - ldr r2, [r4, #8] - ldr r0, _0224841C ; =0x04000050 - mov r1, #1 - asr r2, r2, #0xc - bl sub_020BF578 - ldr r0, [r4, #0] - bl ov95_022483C4 - pop {r4, pc} - nop -_0224841C: .word 0x04000050 - thumb_func_end ov95_022483E4 - - thumb_func_start ov95_02248420 -ov95_02248420: ; 0x02248420 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0x30 - bl sub_02018144 - add r4, r0, #0 - beq _02248460 - str r5, [r4, #0] - ldr r0, [r5, #0x74] - add r1, r4, #0 - str r0, [r4, #4] - add r1, #8 - bl ov95_02247958 - add r1, r4, #0 - ldr r0, [r4, #4] - add r1, #0x14 - bl ov95_02247978 - ldr r0, _02248464 ; =0x00002F60 - mov r2, #0 - str r0, [r4, #0x1c] - str r2, [r4, #0x20] - strh r2, [r4, #0x2c] - str r2, [r4, #0x24] - ldr r0, _02248468 ; =ov95_022484B0 - add r1, r4, #0 - str r2, [r4, #0x28] - bl sub_0200D9E8 - str r0, [r5, #0x7c] -_02248460: - pop {r3, r4, r5, pc} - nop -_02248464: .word 0x00002F60 -_02248468: .word ov95_022484B0 - thumb_func_end ov95_02248420 - - thumb_func_start ov95_0224846C -ov95_0224846C: ; 0x0224846C - ldr r0, [r0, #0x7c] - cmp r0, #0 - bne _02248476 - mov r0, #1 - bx lr -_02248476: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov95_0224846C - - thumb_func_start ov95_0224847C -ov95_0224847C: ; 0x0224847C - push {r3, lr} - ldr r0, [r0, #0x7c] - cmp r0, #0 - beq _0224848C - bl sub_0201CED0 - ldr r0, [r0, #0x20] - pop {r3, pc} -_0224848C: - mov r0, #0 - pop {r3, pc} - thumb_func_end ov95_0224847C - - thumb_func_start ov95_02248490 -ov95_02248490: ; 0x02248490 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x7c] - cmp r0, #0 - beq _022484AC - bl sub_0201CED0 - bl sub_020181C4 - ldr r0, [r4, #0x7c] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x7c] -_022484AC: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02248490 - - thumb_func_start ov95_022484B0 -ov95_022484B0: ; 0x022484B0 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r0, [r4, #0x24] - cmp r0, #0 - bne _02248524 - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x1c] - add r0, r1, r0 - str r0, [r4, #0xc] - ldr r1, [r4, #0x1c] - cmp r1, #0 - blt _022484D2 - mov r0, #0x1e - lsl r0, r0, #6 - sub r0, r1, r0 - str r0, [r4, #0x1c] - b _02248524 -_022484D2: - mov r0, #0x1e - lsl r0, r0, #6 - sub r0, r1, r0 - str r0, [r4, #0x1c] - ldr r1, [r4, #0xc] - ldr r0, _02248588 ; =0xFFFFC000 - cmp r1, r0 - bgt _02248524 - str r0, [r4, #0xc] - ldr r1, [r4, #0x1c] - mov r0, #0x2c - mul r0, r1 - mov r1, #0x64 - bl sub_020E1F6C - neg r1, r0 - mov r0, #0xfa - lsl r0, r0, #4 - str r1, [r4, #0x1c] - cmp r1, r0 - bge _02248500 - mov r0, #1 - str r0, [r4, #0x24] -_02248500: - ldr r0, _0224858C ; =0x000005E6 - bl sub_02005748 - ldr r0, [r4, #0x20] - add r0, r0, #1 - str r0, [r4, #0x20] - cmp r0, #1 - beq _02248516 - cmp r0, #3 - beq _0224851C - b _02248524 -_02248516: - mov r0, #0xb0 - strh r0, [r4, #0x2c] - b _02248524 -_0224851C: - mov r0, #0x2c - ldrsh r0, [r4, r0] - add r0, #0x50 - strh r0, [r4, #0x2c] -_02248524: - mov r0, #0x14 - mov r2, #0x2c - ldrsh r3, [r4, r0] - ldrsh r0, [r4, r2] - add r1, r4, #0 - add r1, #0x14 - add r0, r3, r0 - strh r0, [r4, #0x14] - mov r0, #0x18 - ldrsh r3, [r4, r0] - ldrsh r0, [r4, r2] - sub r0, r3, r0 - strh r0, [r4, #0x18] - ldr r0, [r4, #4] - bl ov95_02247990 - mov r2, #0x2c - ldrsh r3, [r4, r2] - ldr r5, [r4, #8] - add r1, r4, #0 - lsl r0, r3, #2 - add r0, r3, r0 - add r0, r5, r0 - str r0, [r4, #8] - ldrsh r2, [r4, r2] - ldr r3, [r4, #0x10] - add r1, #8 - lsl r0, r2, #2 - add r0, r2, r0 - add r0, r3, r0 - str r0, [r4, #0x10] - ldr r0, [r4, #4] - bl ov95_02247968 - ldr r0, [r4, #0x24] - cmp r0, #0 - beq _02248586 - mov r0, #0x2c - ldrsh r0, [r4, r0] - sub r0, #0xe - strh r0, [r4, #0x2c] - ldr r0, [r4, #0x28] - add r0, r0, #1 - str r0, [r4, #0x28] - cmp r0, #0x1e - ble _02248586 - ldr r0, [r4, #0] - bl ov95_02248490 -_02248586: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02248588: .word 0xFFFFC000 -_0224858C: .word 0x000005E6 - thumb_func_end ov95_022484B0 - - thumb_func_start ov95_02248590 -ov95_02248590: ; 0x02248590 - push {r3, r4, r5, lr} - mov r1, #0x5b - add r5, r0, #0 - mov r0, #0x3a - lsl r1, r1, #2 - bl sub_02018144 - add r4, r0, #0 - beq _022485F2 - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - add r1, r4, #0 - add r1, #0xc0 - str r0, [r1, #0] - add r0, r4, #0 - mov r1, #0 - add r0, #0xd4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xc4 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0xcc - str r1, [r0, #0] - mov r0, #0x16 - lsl r0, r0, #4 - str r1, [r4, r0] - add r0, r0, #4 - str r1, [r4, r0] - bl sub_0201D35C - add r1, r4, #0 - add r1, #0xbc - str r0, [r1, #0] - add r0, r4, #0 - mov r2, #0 - add r0, #0xd0 - str r2, [r0, #0] - mov r0, #0x5a - lsl r0, r0, #2 - str r2, [r4, r0] - ldr r0, _022485F8 ; =ov95_02248E00 - add r1, r4, #0 - bl sub_0200DA3C -_022485F2: - add r0, r4, #0 - pop {r3, r4, r5, pc} - nop -_022485F8: .word ov95_02248E00 - thumb_func_end ov95_02248590 - - thumb_func_start ov95_022485FC -ov95_022485FC: ; 0x022485FC - push {r3, r4, r5, lr} - add r5, r0, #0 - bl sub_020C3D98 - add r4, r0, #0 - cmp r5, #0 - beq _02248648 - add r0, r5, #0 - bl ov95_02248B3C - add r0, r5, #0 - bl ov95_02248C98 - add r0, r5, #0 - bl ov95_02248DC4 - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r5, r0] - cmp r0, #0 - beq _0224862A - bl sub_0200DA58 -_0224862A: - mov r0, #0x59 - lsl r0, r0, #2 - ldr r0, [r5, r0] - cmp r0, #0 - beq _02248638 - bl ov95_022490A4 -_02248638: - add r0, r5, #0 - add r0, #0xbc - ldr r0, [r0, #0] - bl sub_0201D318 - add r0, r5, #0 - bl sub_020181C4 -_02248648: - add r0, r4, #0 - bl sub_020C3DAC - pop {r3, r4, r5, pc} - thumb_func_end ov95_022485FC - - thumb_func_start ov95_02248650 -ov95_02248650: ; 0x02248650 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #4 - bhs _0224867E - lsl r3, r2, #2 - ldr r2, _02248684 ; =0x0224BF9C - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _02248674 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_02248674: - add r0, r5, #0 - bl ov95_02248688 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224867E: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_02248684: .word 0x0224BF9C - thumb_func_end ov95_02248650 - - thumb_func_start ov95_02248688 -ov95_02248688: ; 0x02248688 - push {r4, lr} - add r4, r0, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022486A8 - bl sub_020BFAB8 - add r4, #0xd4 - ldr r0, [r4, #0] - bl ov95_02247770 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_022486A8: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02248688 - - thumb_func_start ov95_022486AC -ov95_022486AC: ; 0x022486AC - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov95_022488A4 - add r0, r4, #0 - bl ov95_02248B84 - add r0, r4, #0 - bl ov95_02248CA8 - mov r0, #8 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - add r2, r1, #0 - add r3, r0, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov95_022486AC - - thumb_func_start ov95_022486E0 -ov95_022486E0: ; 0x022486E0 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0] - cmp r1, #0 - beq _022486F0 - cmp r1, #1 - beq _02248706 - b _0224871E -_022486F0: - bl sub_0200F2AC - cmp r0, #0 - beq _0224871E - ldr r0, _02248724 ; =0x0224C364 - mov r1, #0 - str r1, [r0, #0] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224871E -_02248706: - ldr r1, _02248724 ; =0x0224C364 - ldr r2, [r1, #0] - cmp r2, #0x1e - bge _02248712 - add r2, r2, #1 - str r2, [r1, #0] -_02248712: - add r0, #0xd0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224871E - mov r0, #1 - pop {r4, pc} -_0224871E: - mov r0, #0 - pop {r4, pc} - nop -_02248724: .word 0x0224C364 - thumb_func_end ov95_022486E0 - - thumb_func_start ov95_02248728 -ov95_02248728: ; 0x02248728 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #4 - bhi _022487CE - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02248740: ; jump table - .short _0224874A - _02248740 - 2 ; case 0 - .short _02248756 - _02248740 - 2 ; case 1 - .short _0224879A - _02248740 - 2 ; case 2 - .short _022487B0 - _02248740 - 2 ; case 3 - .short _022487C6 - _02248740 - 2 ; case 4 -_0224874A: - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022487CE -_02248756: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #8 - ble _022487CE - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r1, #0 - mov r2, #0x1f - mov r3, #0x18 - bl ov95_022490D0 - add r0, r4, #0 - bl ov95_02249154 - mov r1, #0x16 - lsl r1, r1, #4 - str r0, [r4, r1] - add r0, r4, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - mov r1, #0 - bl ov95_022479AC - add r4, #0xd8 - ldr r0, [r4, #0] - mov r1, #1 - bl ov95_022479A8 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022487CE -_0224879A: - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov95_02249500 - cmp r0, #0 - beq _022487CE - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022487CE -_022487B0: - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov95_022494F4 - cmp r0, #0 - beq _022487CE - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _022487CE -_022487C6: - bl ov95_02248DF4 - mov r0, #1 - pop {r3, r4, r5, pc} -_022487CE: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_02248728 - - thumb_func_start ov95_022487D4 -ov95_022487D4: ; 0x022487D4 - push {r4, r5, lr} - sub sp, #0xc - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #4 - bhi _0224889A - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_022487EE: ; jump table - .short _022487F8 - _022487EE - 2 ; case 0 - .short _0224880E - _022487EE - 2 ; case 1 - .short _0224882C - _022487EE - 2 ; case 2 - .short _02248848 - _022487EE - 2 ; case 3 - .short _0224888C - _022487EE - 2 ; case 4 -_022487F8: - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov95_0224950C - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224889A -_0224880E: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #2 - ble _0224889A - mov r0, #0 - str r0, [r4, #8] - add r4, #0xc4 - ldr r0, [r4, #0] - bl ov95_02247004 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224889A -_0224882C: - add r1, r4, #0 - add r1, #0xc8 - ldr r1, [r1, #0] - cmp r1, #0 - bne _0224889A - mov r1, #0x59 - lsl r1, r1, #2 - add r1, r4, r1 - bl ov95_02248FAC - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224889A -_02248848: - ldr r0, [r4, #8] - cmp r0, #0x28 - bge _0224885E - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x28 - bne _0224885E - mov r0, #0x6b - lsl r0, r0, #4 - bl sub_02005748 -_0224885E: - mov r0, #0x16 - lsl r0, r0, #4 - ldr r0, [r4, r0] - bl ov95_022494F4 - cmp r0, #0 - beq _0224889A - mov r0, #4 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - ldr r3, _022488A0 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224889A -_0224888C: - bl sub_0200F2AC - cmp r0, #0 - beq _0224889A - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0224889A: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_022488A0: .word 0x00007FFF - thumb_func_end ov95_022487D4 - - thumb_func_start ov95_022488A4 -ov95_022488A4: ; 0x022488A4 - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _02248B20 ; =0x0224BFF4 - bl sub_0201FE94 - ldr r2, _02248B24 ; =0x04000304 - ldr r0, _02248B28 ; =0xFFFF7FFF - ldrh r1, [r2] - and r0, r1 - strh r0, [r2] - ldr r0, _02248B2C ; =0x0224BF8C - bl sub_02018368 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r2, _02248B30 ; =0x0224BFBC - mov r1, #2 - mov r3, #1 - bl sub_020183C4 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r2, _02248B30 ; =0x0224BFBC - mov r1, #6 - mov r3, #1 - bl sub_020183C4 - bl sub_020C3D98 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r2, _02248B34 ; =0x0224BFD8 - mov r1, #3 - mov r3, #2 - bl sub_020183C4 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - ldr r2, _02248B34 ; =0x0224BFD8 - mov r1, #7 - mov r3, #2 - bl sub_020183C4 - add r0, r5, #0 - bl sub_020C3DAC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - mov r1, #2 - ldr r2, [r2, #0] - mov r0, #0x5d - add r3, r1, #0 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r1, #2 - mov r3, #6 - bl sub_02006E3C - mov r1, #0 - str r1, [sp] - add r2, r4, #0 - str r1, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r3, #2 - bl sub_02006E60 - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r3, #6 - bl sub_02006E60 - ldr r0, [r4, #0] - bl ov95_02247644 - add r5, r0, #0 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #3 - add r3, r2, #0 - bl sub_02006E84 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #3 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - ldr r0, _02248B38 ; =0x0224BF84 - lsl r1, r5, #1 - ldrh r5, [r0, r1] - mov r0, #0x20 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - mov r1, #3 - mov r2, #0 - add r3, r5, #0 - bl sub_02006E9C - mov r0, #0x20 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - mov r1, #3 - mov r2, #4 - add r3, r5, #0 - bl sub_02006E9C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r1, #5 - mov r3, #3 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r1, #5 - mov r3, #7 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r1, #4 - mov r3, #3 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - add r2, r4, #0 - str r0, [sp, #0xc] - add r2, #0xc0 - ldr r2, [r2, #0] - mov r0, #0x5d - mov r1, #4 - mov r3, #7 - bl sub_02006E60 - mov r0, #0x3a - mov r1, #0x60 - bl sub_02018144 - add r5, r0, #0 - beq _02248AAA - mov r0, #0 - add r1, r5, #0 - mov r2, #0x60 - bl sub_020C4B4C - add r0, r5, #0 - mov r1, #0x60 - bl sub_020C2C54 - bl sub_020C096C - bl sub_020C0BBC - mov r1, #6 - add r0, r5, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0A0C - mov r1, #6 - add r0, r5, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0BD4 - bl sub_020C0A7C - bl sub_020C0C38 - add r0, r5, #0 - bl sub_020181C4 -_02248AAA: - add r0, r4, #0 - add r0, #0xc0 - mov r3, #0xff - ldr r0, [r0, #0] - mov r1, #6 - mov r2, #3 - mvn r3, r3 - bl sub_02019184 - mov r0, #7 - mov r1, #0 - bl sub_02019120 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add r0, r4, #0 - add r0, #0xc0 - mov r1, #3 - ldr r0, [r0, #0] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - add r0, r4, #0 - add r0, #0xc8 - mov r1, #1 - bl ov95_02246F30 - add r1, r4, #0 - add r1, #0xc4 - str r0, [r1, #0] - mov r0, #0x4a - lsl r0, r0, #2 - str r0, [sp] - mov r0, #0 - str r0, [sp, #4] - add r0, r4, #0 - add r0, #0xd0 - str r0, [sp, #8] - add r0, r4, #0 - add r0, #0xc0 - mov r1, #0x12 - mov r2, #1 - ldr r0, [r0, #0] - lsl r1, r1, #6 - lsl r2, r2, #0xc - mov r3, #1 - bl ov95_022472C4 - add r4, #0xcc - str r0, [r4, #0] - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02248B20: .word 0x0224BFF4 -_02248B24: .word 0x04000304 -_02248B28: .word 0xFFFF7FFF -_02248B2C: .word 0x0224BF8C -_02248B30: .word 0x0224BFBC -_02248B34: .word 0x0224BFD8 -_02248B38: .word 0x0224BF84 - thumb_func_end ov95_022488A4 - - thumb_func_start ov95_02248B3C -ov95_02248B3C: ; 0x02248B3C - push {r4, lr} - add r4, r0, #0 - add r0, #0xc8 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02248B52 - add r0, r4, #0 - add r0, #0xc4 - ldr r0, [r0, #0] - bl ov95_02247018 -_02248B52: - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r1, #2 - bl sub_02019044 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r1, #6 - bl sub_02019044 - add r0, r4, #0 - add r0, #0xc0 - ldr r0, [r0, #0] - mov r1, #3 - bl sub_02019044 - add r4, #0xc0 - ldr r0, [r4, #0] - mov r1, #7 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02248B3C - - thumb_func_start ov95_02248B84 -ov95_02248B84: ; 0x02248B84 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _02248C64 ; =0x04000060 - ldr r1, _02248C68 ; =0xFFFFCFFD - ldrh r2, [r0] - and r2, r1 - strh r2, [r0] - ldrh r3, [r0] - add r2, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _02248C6C ; =0x0000CFFB - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #8 - orr r2, r3 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldr r0, _02248C70 ; =0x0224BFAC - bl sub_020BFD2C - mov r1, #0 - ldr r0, _02248C74 ; =0x000043FF - ldr r2, _02248C78 ; =0x00007FFF - mov r3, #0x3f - str r1, [sp] - bl sub_020BFD58 - ldr r1, _02248C7C ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _02248C80 ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r1, _02248C84 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - strh r2, [r1] - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - add r3, r1, #0 - bl ov95_022476F0 - add r1, r4, #0 - add r1, #0xd4 - str r0, [r1, #0] - mov r1, #0 - ldr r0, _02248C88 ; =0xFFFC8800 - str r1, [sp] - str r0, [sp, #4] - str r1, [sp, #8] - add r0, r4, #0 - str r1, [sp, #0xc] - add r0, #0xd4 - ldr r0, [r0, #0] - mov r2, #0x5d - mov r3, #0x1b - bl ov95_022478B4 - add r1, r4, #0 - add r1, #0xd8 - str r0, [r1, #0] - ldr r1, _02248C8C ; =0x0000EBE0 - ldr r0, _02248C90 ; =0x0224C364 - strh r1, [r0, #4] - mov r1, #0 - strh r1, [r0, #6] - strh r1, [r0, #8] - add r0, r4, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - ldr r1, _02248C94 ; =0x0224C368 - bl ov95_02247AB0 - add r4, #0xd8 - mov r1, #7 - ldr r0, [r4, #0] - lsl r1, r1, #0xa - bl ov95_022479D4 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_02248C64: .word 0x04000060 -_02248C68: .word 0xFFFFCFFD -_02248C6C: .word 0x0000CFFB -_02248C70: .word 0x0224BFAC -_02248C74: .word 0x000043FF -_02248C78: .word 0x00007FFF -_02248C7C: .word 0x04000540 -_02248C80: .word 0xBFFF0000 -_02248C84: .word 0x04000008 -_02248C88: .word 0xFFFC8800 -_02248C8C: .word 0x0000EBE0 -_02248C90: .word 0x0224C364 -_02248C94: .word 0x0224C368 - thumb_func_end ov95_02248B84 - - thumb_func_start ov95_02248C98 -ov95_02248C98: ; 0x02248C98 - push {r3, lr} - add r0, #0xd4 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02248CA6 - bl ov95_0224773C -_02248CA6: - pop {r3, pc} - thumb_func_end ov95_02248C98 - - thumb_func_start ov95_02248CA8 -ov95_02248CA8: ; 0x02248CA8 - push {r4, r5, r6, r7, lr} - sub sp, #0x74 - add r7, r0, #0 - add r0, #0xc - mov r1, #0x5d - mov r2, #0xb - mov r3, #0xc - bl ov95_02247568 - add r0, sp, #0x60 - bl sub_020A81D0 - add r0, sp, #0x3c - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r0, sp, #0x3c - str r0, [sp, #0x10] - mov r0, #0x5d - mov r1, #0xd - bl sub_02006F00 - mov r3, #0 - str r3, [sp] - mov r0, #2 - str r0, [sp, #4] - str r3, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r0, sp, #0x3c - str r0, [sp, #0x10] - mov r0, #0x5d - mov r1, #0xd - mov r2, #1 - bl sub_02006F00 - mov r0, #0x3a - str r0, [sp] - add r0, sp, #0x60 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0xe - mov r2, #1 - mov r3, #0 - bl sub_02006EE0 - mov r0, #0x3a - str r0, [sp] - add r0, sp, #0x60 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0xe - mov r2, #2 - mov r3, #0 - bl sub_02006EE0 - mov r0, #1 - add r1, r7, #0 - str r0, [sp] - add r0, sp, #0x18 - add r1, #0xc - add r2, sp, #0x3c - add r3, sp, #0x60 - bl ov95_022475C4 - ldr r0, _02248DC0 ; =0x035947D1 - bl sub_0201D318 - mov r0, #0 - str r0, [sp, #0x14] - add r4, r7, #0 -_02248D42: - bl sub_0201D35C - mov r1, #0xe8 - bl sub_020E2178 - add r6, r1, #0 - add r6, #0xc - bl sub_0201D35C - mov r1, #0x71 - lsl r1, r1, #2 - bl sub_020E2178 - add r5, r1, #0 - mov r0, #0 - str r0, [sp] - mov r0, #1 - sub r5, #0x1c - str r0, [sp, #4] - ldr r0, [r7, #0] - add r1, sp, #0x18 - add r2, r6, #0 - add r3, r5, #0 - bl ov95_022475E4 - str r0, [r4, #0x1c] - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - add r5, #0x38 - ldr r0, [r7, #0] - add r1, sp, #0x18 - add r2, r6, #0 - add r3, r5, #0 - bl ov95_022475E4 - str r0, [r4, #0x20] - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_02021D6C - ldr r0, [r4, #0x20] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r4, #0x1c] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x20] - mov r1, #0 - bl sub_02021CAC - ldr r0, [sp, #0x14] - add r4, #8 - add r0, r0, #1 - str r0, [sp, #0x14] - cmp r0, #0x14 - blt _02248D42 - add sp, #0x74 - pop {r4, r5, r6, r7, pc} - nop -_02248DC0: .word 0x035947D1 - thumb_func_end ov95_02248CA8 - - thumb_func_start ov95_02248DC4 -ov95_02248DC4: ; 0x02248DC4 - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_02248DCC: - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _02248DD6 - bl sub_02021BD4 -_02248DD6: - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _02248DE0 - bl sub_02021BD4 -_02248DE0: - add r4, r4, #1 - add r5, #8 - cmp r4, #0x14 - blt _02248DCC - add r6, #0xc - add r0, r6, #0 - bl ov95_022475A0 - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov95_02248DC4 - - thumb_func_start ov95_02248DF4 -ov95_02248DF4: ; 0x02248DF4 - mov r1, #0x5a - mov r2, #1 - lsl r1, r1, #2 - str r2, [r0, r1] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02248DF4 - - thumb_func_start ov95_02248E00 -ov95_02248E00: ; 0x02248E00 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x5a - add r4, r1, #0 - lsl r0, r0, #2 - ldr r1, [r4, r0] - cmp r1, #0 - beq _02248E54 - mov r1, #0 - str r1, [r4, r0] - add r0, r4, #0 - add r0, #0xc0 - mov r3, #0xff - ldr r0, [r0, #0] - mov r1, #2 - mov r2, #3 - mvn r3, r3 - bl sub_02019184 - add r4, #0xc0 - ldr r0, [r4, #0] - mov r1, #6 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r0, #3 - mov r1, #0 - bl sub_02019120 - mov r0, #7 - mov r1, #1 - bl sub_02019120 - ldr r2, _02248E58 ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - add r0, r5, #0 - bl sub_0200DA58 -_02248E54: - pop {r3, r4, r5, pc} - nop -_02248E58: .word 0x04000304 - thumb_func_end ov95_02248E00 - - thumb_func_start ov95_02248E5C -ov95_02248E5C: ; 0x02248E5C - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - str r5, [r2, #4] - add r0, r2, #0 - str r1, [r0, #0] - mov r1, #0x52 - mov r7, #0 - lsl r1, r1, #2 - str r7, [r0, r1] - add r1, r1, #4 - str r2, [sp] - str r7, [r0, r1] - add r4, r2, #0 - add r6, r2, #0 -_02248E78: - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0x1c] - bl sub_02021D28 - add r2, r6, #0 - add r3, r0, #0 - ldmia r3!, {r0, r1} - add r2, #0x58 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - add r7, r7, #1 - str r0, [r2, #0] - add r4, r4, #4 - add r5, #8 - add r6, #0xc - cmp r7, #0x14 - blt _02248E78 - ldr r0, _02248EC0 ; =ov95_02248EC4 - ldr r1, [sp] - mov r2, #0 - bl sub_0200D9E8 - ldr r1, [sp] - ldr r1, [r1, #0] - str r0, [r1, #0] - ldr r0, [sp] - ldr r0, [r0, #0] - ldr r0, [r0, #0] - cmp r0, #0 - bne _02248EBC - ldr r0, [sp] - bl sub_020181C4 -_02248EBC: - pop {r3, r4, r5, r6, r7, pc} - nop -_02248EC0: .word ov95_02248EC4 - thumb_func_end ov95_02248E5C - - thumb_func_start ov95_02248EC4 -ov95_02248EC4: ; 0x02248EC4 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r5, r1, #0 - mov r1, #0x52 - lsl r1, r1, #2 - ldr r0, [r5, r1] - add r0, r0, #1 - str r0, [r5, r1] - ldr r0, [r5, r1] - cmp r0, #0xc - ble _02248EF8 - mov r0, #0 - str r0, [r5, r1] - add r0, r1, #4 - ldr r0, [r5, r0] - cmp r0, #0x14 - bge _02248EF8 - lsl r0, r0, #2 - mov r2, #1 - add r0, r5, r0 - str r2, [r0, #8] - add r0, r1, #4 - ldr r0, [r5, r0] - add r2, r0, #1 - add r0, r1, #4 - str r2, [r5, r0] -_02248EF8: - mov r0, #0 - add r7, r5, #0 - str r0, [sp, #4] - add r6, r5, #0 - str r5, [sp] - add r4, r0, #0 - add r7, #0x58 -_02248F06: - mov r1, #0x21 - ldr r2, [r6, #0x5c] - lsl r1, r1, #0xc - add r2, r2, r1 - mov r1, #0x6a - add r0, r6, #0 - lsl r1, r1, #0xe - add r0, #0x5c - str r2, [r6, #0x5c] - cmp r2, r1 - blt _02248F46 - mov r1, #0x71 - ldr r2, [r0, #0] - lsl r1, r1, #0xe - sub r1, r2, r1 - str r1, [r0, #0] - ldr r0, [sp] - ldr r0, [r0, #8] - cmp r0, #0 - beq _02248F46 - ldr r0, [r5, #4] - mov r1, #1 - add r0, r0, r4 - ldr r0, [r0, #0x1c] - bl sub_02021CAC - ldr r0, [r5, #4] - mov r1, #1 - add r0, r0, r4 - ldr r0, [r0, #0x20] - bl sub_02021CAC -_02248F46: - ldr r0, [r5, #4] - add r1, r7, #0 - add r0, r0, r4 - ldr r0, [r0, #0x1c] - bl sub_02021C50 - add r2, r6, #0 - add r2, #0x58 - add r3, sp, #8 - ldmia r2!, {r0, r1} - mov ip, r3 - stmia r3!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r3, #0] - mov r0, #0xe - ldr r1, [sp, #0xc] - lsl r0, r0, #0xe - add r0, r1, r0 - str r0, [sp, #0xc] - ldr r0, [r5, #4] - mov r1, ip - add r0, r0, r4 - ldr r0, [r0, #0x20] - bl sub_02021C50 - ldr r0, [sp] - add r6, #0xc - add r0, r0, #4 - str r0, [sp] - ldr r0, [sp, #4] - add r4, #8 - add r0, r0, #1 - add r7, #0xc - str r0, [sp, #4] - cmp r0, #0x14 - blt _02248F06 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov95_02248EC4 - - thumb_func_start ov95_02248F94 -ov95_02248F94: ; 0x02248F94 - push {r4, lr} - add r4, r0, #0 - beq _02248FAA - bl sub_0201CED0 - ldr r0, [r0, #0] - mov r1, #0 - str r1, [r0, #0] - add r0, r4, #0 - bl sub_0200DA58 -_02248FAA: - pop {r4, pc} - thumb_func_end ov95_02248F94 - - thumb_func_start ov95_02248FAC -ov95_02248FAC: ; 0x02248FAC - push {r4, r5, r6, lr} - add r5, r1, #0 - mov r1, #0x17 - add r6, r0, #0 - mov r0, #0x3a - lsl r1, r1, #4 - bl sub_02018144 - add r4, r0, #0 - beq _02249018 - str r6, [r4, #0] - add r6, #0xc0 - mov r0, #0x55 - ldr r1, [r6, #0] - lsl r0, r0, #2 - str r1, [r4, r0] - ldr r0, [r4, r0] - mov r1, #2 - bl sub_020192F8 - lsl r1, r0, #0xc - mov r0, #0x56 - lsl r0, r0, #2 - str r1, [r4, r0] - sub r0, r0, #4 - ldr r0, [r4, r0] - mov r1, #6 - bl sub_020192F8 - mov r1, #0x57 - lsl r0, r0, #0xc - lsl r1, r1, #2 - str r0, [r4, r1] - mov r2, #0 - add r0, r1, #4 - str r2, [r4, r0] - add r0, r1, #0 - add r0, #8 - str r2, [r4, r0] - add r0, r1, #0 - add r0, #0xc - str r5, [r4, r0] - add r1, #0x10 - str r2, [r4, r1] - ldr r0, _0224901C ; =ov95_02249020 - add r1, r4, #0 - bl sub_0200DA04 - str r0, [r5, #0] - cmp r0, #0 - bne _02249018 - add r0, r4, #0 - bl sub_020181C4 -_02249018: - pop {r4, r5, r6, pc} - nop -_0224901C: .word ov95_02249020 - thumb_func_end ov95_02248FAC - - thumb_func_start ov95_02249020 -ov95_02249020: ; 0x02249020 - push {r4, r5, r6, lr} - mov r3, #0x59 - add r4, r1, #0 - lsl r3, r3, #2 - mov r0, #2 - ldr r1, [r4, r3] - lsl r0, r0, #0x14 - cmp r1, r0 - bge _022490A2 - sub r0, r3, #4 - ldr r1, [r4, r0] - add r0, r3, #0 - sub r0, #0x44 - add r1, r1, r0 - sub r0, r3, #4 - str r1, [r4, r0] - add r5, r3, #0 - ldr r1, [r4, r3] - ldr r0, [r4, r0] - sub r5, #0xc - add r0, r1, r0 - str r0, [r4, r3] - add r0, r3, #0 - sub r0, #0x10 - ldr r5, [r4, r5] - ldr r3, [r4, r3] - ldr r0, [r4, r0] - sub r3, r5, r3 - mov r1, #2 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - mov r5, #0x55 - lsl r5, r5, #2 - add r3, r5, #0 - ldr r0, [r4, r5] - add r3, #8 - add r5, #0x10 - ldr r6, [r4, r3] - ldr r3, [r4, r5] - mov r1, #6 - sub r3, r6, r3 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - mov r1, #0x59 - lsl r1, r1, #2 - mov r0, #2 - ldr r2, [r4, r1] - lsl r0, r0, #0x12 - cmp r2, r0 - blt _022490A2 - add r0, r1, #0 - add r0, #8 - ldr r0, [r4, r0] - cmp r0, #0 - bne _022490A2 - add r1, #8 - ldr r0, [r4, #0] - add r1, r4, r1 - add r2, r4, #4 - bl ov95_02248E5C -_022490A2: - pop {r4, r5, r6, pc} - thumb_func_end ov95_02249020 - - thumb_func_start ov95_022490A4 -ov95_022490A4: ; 0x022490A4 - push {r3, r4, r5, lr} - add r5, r0, #0 - beq _022490CE - bl sub_0201CED0 - add r4, r0, #0 - mov r0, #0x5a - lsl r0, r0, #2 - ldr r1, [r4, r0] - mov r2, #0 - str r2, [r1, #0] - add r0, r0, #4 - ldr r0, [r4, r0] - bl ov95_02248F94 - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 -_022490CE: - pop {r3, r4, r5, pc} - thumb_func_end ov95_022490A4 - - thumb_func_start ov95_022490D0 -ov95_022490D0: ; 0x022490D0 - push {r3, r4, r5, r6, r7, lr} - str r0, [sp] - add r5, r1, #0 - mov r0, #0x3a - mov r1, #0x14 - add r7, r2, #0 - add r6, r3, #0 - bl sub_02018144 - add r4, r0, #0 - beq _02249110 - lsl r0, r5, #0xc - str r0, [r4, #0] - lsl r1, r7, #0xc - str r1, [r4, #8] - ldr r0, [r4, #0] - sub r0, r1, r0 - add r1, r6, #0 - bl sub_020E1F6C - str r0, [r4, #4] - ldr r0, [sp] - str r6, [r4, #0xc] - add r1, r5, #0 - str r0, [r4, #0x10] - bl ov95_022479AC - ldr r0, _02249114 ; =ov95_02249118 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 -_02249110: - pop {r3, r4, r5, r6, r7, pc} - nop -_02249114: .word ov95_02249118 - thumb_func_end ov95_022490D0 - - thumb_func_start ov95_02249118 -ov95_02249118: ; 0x02249118 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - sub r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0 - ble _0224913A - ldr r1, [r4, #0] - ldr r0, [r4, #4] - add r1, r1, r0 - str r1, [r4, #0] - ldr r0, [r4, #0x10] - asr r1, r1, #0xc - bl ov95_022479AC - pop {r3, r4, r5, pc} -_0224913A: - ldr r1, [r4, #8] - ldr r0, [r4, #0x10] - asr r1, r1, #0xc - bl ov95_022479AC - add r0, r4, #0 - bl sub_020181C4 - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_02249118 - - thumb_func_start ov95_02249154 -ov95_02249154: ; 0x02249154 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r5, #0 - add r4, #0xdc - add r0, #0xd8 - add r1, r4, #0 - ldr r0, [r0, #0] - add r1, #8 - bl ov95_02247958 - add r0, r5, #0 - add r0, #0xd8 - add r1, r4, #0 - ldr r0, [r0, #0] - add r1, #0x20 - bl ov95_02247978 - add r3, r4, #0 - add r3, #8 - add r2, r4, #0 - ldmia r3!, {r0, r1} - add r2, #0x14 - stmia r2!, {r0, r1} - ldr r0, [r3, #0] - str r0, [r2, #0] - add r0, r5, #0 - add r0, #0xd4 - ldr r0, [r0, #0] - str r0, [r4, #4] - add r0, r5, #0 - add r0, #0xd8 - ldr r0, [r0, #0] - add r5, #0xdc - str r0, [r5, #0] - ldr r0, [r4, #0xc] - str r0, [r4, #0x28] - ldr r1, [r4, #0xc] - ldr r0, _02249224 ; =0xFFFF8000 - sub r0, r0, r1 - mov r1, #0x1e - bl sub_020E1F6C - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r2, #1 - mov r1, #0x1e - add r0, #0x80 - str r1, [r0, #0] - mov r1, #0 - str r1, [r4, #0x38] - str r1, [r4, #0x3c] - str r1, [r4, #0x40] - add r0, r4, #0 - str r1, [r4, #0x44] - add r0, #0x54 - strh r1, [r0] - add r0, r4, #0 - lsl r2, r2, #0xe - add r0, #0x56 - strh r2, [r0] - add r0, r4, #0 - add r0, #0x5a - strh r1, [r0] - str r1, [r4, #0x7c] - add r2, r4, #0 - add r0, r1, #0 -_022491D8: - add r3, r2, #0 - add r3, #0x5c - strh r0, [r3] - add r3, r2, #0 - add r3, #0x5e - strh r0, [r3] - add r3, r2, #0 - add r3, #0x60 - strh r0, [r3] - add r3, r2, #0 - add r3, #0x62 - add r1, r1, #1 - add r2, #8 - strh r0, [r3] - cmp r1, #3 - blt _022491D8 - mov r1, #0xd - str r0, [r4, #0x78] - add r0, r4, #0 - lsl r1, r1, #8 - mov r2, #0x1e - bl ov95_0224922C - mov r1, #0x29 - mov r2, #5 - add r0, r4, #0 - lsl r1, r1, #0xc - lsl r2, r2, #0xe - mov r3, #0x1e - bl ov95_02249268 - ldr r0, _02249228 ; =ov95_02249424 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - pop {r3, r4, r5, pc} - nop -_02249224: .word 0xFFFF8000 -_02249228: .word ov95_02249424 - thumb_func_end ov95_02249154 - - thumb_func_start ov95_0224922C -ov95_0224922C: ; 0x0224922C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - beq _0224925A - mov r0, #0x56 - ldrsh r0, [r5, r0] - add r1, r6, #0 - sub r0, r4, r0 - bl sub_020E1F6C - add r1, r5, #0 - add r1, #0x5a - strh r0, [r1] - mov r0, #0x56 - ldrsh r1, [r5, r0] - mov r0, #0x5a - ldrsh r0, [r5, r0] - add r1, r1, r0 - add r0, r5, #0 - add r0, #0x56 - strh r1, [r0] - b _0224925E -_0224925A: - add r0, #0x56 - strh r4, [r0] -_0224925E: - add r0, r5, #0 - add r0, #0x58 - strh r4, [r0] - str r6, [r5, #0x74] - pop {r4, r5, r6, pc} - thumb_func_end ov95_0224922C - - thumb_func_start ov95_02249268 -ov95_02249268: ; 0x02249268 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - beq _022492A0 - ldr r0, [r5, #0x38] - add r1, r7, #0 - sub r0, r4, r0 - bl sub_020E1F6C - str r0, [r5, #0x40] - ldr r0, [r5, #0x3c] - add r1, r7, #0 - sub r0, r6, r0 - bl sub_020E1F6C - str r0, [r5, #0x44] - ldr r1, [r5, #0x38] - ldr r0, [r5, #0x40] - add r0, r1, r0 - str r0, [r5, #0x38] - ldr r1, [r5, #0x3c] - ldr r0, [r5, #0x44] - add r0, r1, r0 - str r0, [r5, #0x3c] - str r4, [r5, #0x48] - str r6, [r5, #0x4c] -_022492A0: - str r7, [r5, #0x50] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov95_02249268 - - thumb_func_start ov95_022492A4 -ov95_022492A4: ; 0x022492A4 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - beq _022492CA - lsl r0, r4, #3 - str r0, [sp] - add r1, r5, r0 - mov r0, #0x5c - ldrsh r0, [r1, r0] - add r1, r7, #0 - sub r0, r6, r0 - bl sub_020E1F6C - ldr r1, [sp] - add r1, r5, r1 - add r1, #0x5e - strh r0, [r1] -_022492CA: - lsl r1, r4, #3 - add r0, r5, r1 - add r0, #0x60 - strh r6, [r0] - add r0, r5, r1 - add r0, #0x62 - strh r7, [r0] - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov95_022492A4 - - thumb_func_start ov95_022492DC -ov95_022492DC: ; 0x022492DC - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [r5, #0x74] - cmp r0, #0 - beq _02249308 - sub r0, r0, #1 - str r0, [r5, #0x74] - beq _022492FE - mov r0, #0x56 - ldrsh r1, [r5, r0] - mov r0, #0x5a - ldrsh r0, [r5, r0] - add r1, r1, r0 - add r0, r5, #0 - add r0, #0x56 - strh r1, [r0] - b _02249308 -_022492FE: - mov r0, #0x58 - ldrsh r1, [r5, r0] - add r0, r5, #0 - add r0, #0x56 - strh r1, [r0] -_02249308: - mov r0, #0x54 - ldrsh r1, [r5, r0] - mov r0, #0x56 - ldrsh r0, [r5, r0] - add r1, r1, r0 - add r0, r5, #0 - add r0, #0x54 - strh r1, [r0] - add r0, r5, #0 - add r0, #0x54 - ldrh r0, [r0] - mov r1, #0xb6 - bl sub_020E1F6C - add r4, r0, #0 - mov r0, #0x5a - lsl r0, r0, #2 - cmp r4, r0 - blt _02249330 - sub r4, r4, r0 -_02249330: - ldr r0, [r5, #0x50] - cmp r0, #0 - beq _02249356 - ldr r1, [r5, #0x38] - ldr r0, [r5, #0x40] - add r0, r1, r0 - str r0, [r5, #0x38] - ldr r1, [r5, #0x3c] - ldr r0, [r5, #0x44] - add r0, r1, r0 - str r0, [r5, #0x3c] - ldr r0, [r5, #0x50] - sub r0, r0, #1 - str r0, [r5, #0x50] - bne _02249356 - ldr r0, [r5, #0x48] - str r0, [r5, #0x38] - ldr r0, [r5, #0x4c] - str r0, [r5, #0x3c] -_02249356: - lsl r0, r4, #0x10 - ldr r6, [r5, #0x38] - lsr r0, r0, #0x10 - bl sub_0201D1D4 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r3, #2 - mov r6, #0 - lsl r3, r3, #0xa - add r3, r0, r3 - adc r1, r6 - lsl r0, r1, #0x14 - lsr r1, r3, #0xc - ldr r2, [r5, #8] - orr r1, r0 - add r0, r2, r1 - str r0, [r5, #0x14] - lsl r0, r4, #0x10 - ldr r6, [r5, #0x3c] - lsr r0, r0, #0x10 - bl sub_0201D15C - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r4, #2 - mov r3, #0 - lsl r4, r4, #0xa - add r4, r0, r4 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r4, #0xc - ldr r2, [r5, #0x10] - orr r1, r0 - add r0, r2, r1 - str r0, [r5, #0x1c] - mov r0, #0x22 - ldrsh r1, [r5, r0] - mov r0, #0x56 - ldrsh r0, [r5, r0] - mov r2, #0x5e - mov r6, #0x60 - add r0, r1, r0 - strh r0, [r5, #0x22] - add r0, r5, #0 - mov r1, #0x5c -_022493BE: - add r4, r0, #0 - add r4, #0x62 - ldrh r4, [r4] - cmp r4, #0 - beq _022493F6 - add r4, r0, #0 - add r4, #0x62 - ldrh r4, [r4] - sub r7, r4, #1 - add r4, r0, #0 - add r4, #0x62 - strh r7, [r4] - add r4, r0, #0 - add r4, #0x62 - ldrh r4, [r4] - cmp r4, #0 - bne _022493EA - ldrsh r7, [r0, r6] - add r4, r0, #0 - add r4, #0x5c - strh r7, [r4] - b _022493F6 -_022493EA: - ldrsh r7, [r0, r1] - ldrsh r4, [r0, r2] - add r7, r7, r4 - add r4, r0, #0 - add r4, #0x5c - strh r7, [r4] -_022493F6: - add r3, r3, #1 - add r0, #8 - cmp r3, #3 - blt _022493BE - mov r0, #0x20 - ldrsh r1, [r5, r0] - mov r0, #0x5c - ldrsh r0, [r5, r0] - add r0, r1, r0 - strh r0, [r5, #0x20] - mov r0, #0x22 - ldrsh r1, [r5, r0] - mov r0, #0x64 - ldrsh r0, [r5, r0] - add r0, r1, r0 - strh r0, [r5, #0x22] - mov r0, #0x24 - ldrsh r1, [r5, r0] - mov r0, #0x6c - ldrsh r0, [r5, r0] - add r0, r1, r0 - strh r0, [r5, #0x24] - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov95_022492DC - - thumb_func_start ov95_02249424 -ov95_02249424: ; 0x02249424 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02249484 - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x2c] - add r0, r1, r0 - str r0, [r4, #0x28] - str r0, [r4, #0x18] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - bgt _02249484 - mov r1, #2 - lsl r1, r1, #8 - str r1, [r4, #0x30] - mov r0, #0 - lsl r1, r1, #5 - str r0, [r4, #0x2c] - add r0, r4, #0 - add r2, r1, #0 - mov r3, #0x3c - bl ov95_02249268 - ldr r2, _022494A0 ; =0xFFFFF800 - add r0, r4, #0 - mov r1, #0 - mov r3, #0x1e - bl ov95_022492A4 - mov r0, #1 - str r0, [r4, #0x7c] - ldr r1, _022494A4 ; =ov95_022494A8 - add r0, r5, #0 - bl sub_0201CECC -_02249484: - add r0, r4, #0 - bl ov95_022492DC - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - ldr r0, [r4, #0] - add r4, #0x20 - add r1, r4, #0 - bl ov95_02247990 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022494A0: .word 0xFFFFF800 -_022494A4: .word ov95_022494A8 - thumb_func_end ov95_02249424 - - thumb_func_start ov95_022494A8 -ov95_022494A8: ; 0x022494A8 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x78] - cmp r0, #0 - bne _022494F2 - ldr r1, [r4, #0x2c] - ldr r0, [r4, #0x30] - add r1, r1, r0 - str r1, [r4, #0x2c] - ldr r0, [r4, #0x28] - add r0, r0, r1 - str r0, [r4, #0x28] - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_022492DC - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x20 - bl ov95_02247990 - ldr r0, [r4, #0] - bl ov95_022479DC - cmp r0, #0 - bne _022494F2 - ldr r0, [r4, #0] - mov r1, #0 - bl ov95_022479A8 - mov r0, #1 - str r0, [r4, #0x78] -_022494F2: - pop {r4, pc} - thumb_func_end ov95_022494A8 - - thumb_func_start ov95_022494F4 -ov95_022494F4: ; 0x022494F4 - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #0x78] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov95_022494F4 - - thumb_func_start ov95_02249500 -ov95_02249500: ; 0x02249500 - push {r3, lr} - bl sub_0201CED0 - ldr r0, [r0, #0x7c] - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov95_02249500 - - thumb_func_start ov95_0224950C -ov95_0224950C: ; 0x0224950C - push {r3, r4, r5, lr} - sub sp, #8 - add r5, r0, #0 - bl sub_0201CED0 - add r4, r0, #0 - mov r1, #0 - str r1, [r4, #0x78] - add r0, sp, #0 - strh r1, [r0, #4] - ldrh r1, [r0, #4] - strh r1, [r0, #2] - strh r1, [r0] - ldr r0, [r4, #4] - mov r1, #1 - bl ov95_02247AD0 - ldr r0, [r4, #4] - add r1, sp, #0 - bl ov95_02247AB0 - ldr r1, _02249594 ; =0x000058CC - mov r0, #2 - lsl r0, r0, #0x12 - str r1, [r4, #0x2c] - sub r0, r1, r0 - str r0, [r4, #0x28] - add r0, r4, #0 - mov r1, #0 - mov r3, #0x14 - add r0, #0x80 - str r3, [r0, #0] - ldr r0, [r4, #0x28] - add r2, r1, #0 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_02249268 - mov r2, #0x56 - ldrsh r2, [r4, r2] - add r0, r4, #0 - mov r1, #1 - neg r2, r2 - mov r3, #0x1e - bl ov95_022492A4 - mov r1, #2 - add r2, r1, #0 - add r0, r4, #0 - add r2, #0xfe - mov r3, #0x32 - bl ov95_022492A4 - mov r1, #2 - ldr r0, [r4, #0] - lsl r1, r1, #0xc - bl ov95_022479D4 - ldr r0, [r4, #0] - mov r1, #1 - bl ov95_022479A8 - ldr r1, _02249598 ; =ov95_0224959C - add r0, r5, #0 - bl sub_0201CECC - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02249594: .word 0x000058CC -_02249598: .word ov95_0224959C - thumb_func_end ov95_0224950C - - thumb_func_start ov95_0224959C -ov95_0224959C: ; 0x0224959C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov95_022492DC - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - beq _022495DC - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x2c] - add r0, r1, r0 - str r0, [r4, #0x28] - str r0, [r4, #0x18] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - bne _022495DC - ldr r1, _022495F4 ; =ov95_022495F8 - add r0, r5, #0 - bl sub_0201CECC -_022495DC: - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - ldr r0, [r4, #0] - add r4, #0x20 - add r1, r4, #0 - bl ov95_02247990 - pop {r3, r4, r5, pc} - nop -_022495F4: .word ov95_022495F8 - thumb_func_end ov95_0224959C - - thumb_func_start ov95_022495F8 -ov95_022495F8: ; 0x022495F8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov95_022492DC - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0x6e - ble _0224963A - ldr r1, [r4, #0x28] - ldr r0, _02249650 ; =0xFFFC5800 - sub r0, r0, r1 - mov r1, #0x35 - bl sub_020E1F6C - str r0, [r4, #0x2c] - add r0, r4, #0 - mov r1, #0x35 - add r0, #0x80 - str r1, [r0, #0] - ldr r1, _02249654 ; =ov95_02249658 - add r0, r5, #0 - bl sub_0201CECC -_0224963A: - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - ldr r0, [r4, #0] - add r4, #0x20 - add r1, r4, #0 - bl ov95_02247990 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02249650: .word 0xFFFC5800 -_02249654: .word ov95_02249658 - thumb_func_end ov95_022495F8 - - thumb_func_start ov95_02249658 -ov95_02249658: ; 0x02249658 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov95_022492DC - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - beq _02249698 - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x2c] - add r0, r1, r0 - str r0, [r4, #0x28] - str r0, [r4, #0x18] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - sub r1, r0, #1 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - bne _02249698 - ldr r1, _022496B0 ; =ov95_022496B4 - add r0, r5, #0 - bl sub_0201CECC -_02249698: - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - ldr r0, [r4, #0] - add r4, #0x20 - add r1, r4, #0 - bl ov95_02247990 - pop {r3, r4, r5, pc} - nop -_022496B0: .word ov95_022496B4 - thumb_func_end ov95_02249658 - - thumb_func_start ov95_022496B4 -ov95_022496B4: ; 0x022496B4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov95_022492DC - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - add r1, r0, #1 - add r0, r4, #0 - add r0, #0x80 - str r1, [r0, #0] - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #1 - ble _022496E6 - mov r0, #2 - lsl r0, r0, #0x10 - str r0, [r4, #0x2c] - ldr r1, _022496FC ; =ov95_02249700 - add r0, r5, #0 - bl sub_0201CECC -_022496E6: - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - ldr r0, [r4, #0] - add r4, #0x20 - add r1, r4, #0 - bl ov95_02247990 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_022496FC: .word ov95_02249700 - thumb_func_end ov95_022496B4 - - thumb_func_start ov95_02249700 -ov95_02249700: ; 0x02249700 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x78] - cmp r0, #0 - bne _0224973C - add r0, r4, #0 - bl ov95_022492DC - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x2c] - add r0, r1, r0 - str r0, [r4, #0x28] - str r0, [r4, #0x18] - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x14 - bl ov95_02247968 - add r1, r4, #0 - ldr r0, [r4, #0] - add r1, #0x20 - bl ov95_02247990 - ldr r0, [r4, #0] - bl ov95_022479DC - cmp r0, #0 - bne _0224973C - mov r0, #1 - str r0, [r4, #0x78] -_0224973C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02249700 - - thumb_func_start ov95_02249740 -ov95_02249740: ; 0x02249740 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0xa4 - bl sub_02018144 - add r4, r0, #0 - beq _0224976A - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - str r0, [r4, #0x24] - mov r0, #0 - str r0, [r4, #0x28] - add r0, r4, #0 - add r0, #0x34 - bl ov95_02249C28 -_0224976A: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_02249740 - - thumb_func_start ov95_02249770 -ov95_02249770: ; 0x02249770 - push {r4, lr} - add r4, r0, #0 - beq _0224979E - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - add r0, r4, #0 - bl ov95_02249A68 - add r0, r4, #0 - bl ov95_02249B80 - add r0, r4, #0 - bl ov95_02249C10 - add r0, r4, #0 - add r0, #0x34 - bl ov95_02249C30 - add r0, r4, #0 - bl sub_020181C4 -_0224979E: - pop {r4, pc} - thumb_func_end ov95_02249770 - - thumb_func_start ov95_022497A0 -ov95_022497A0: ; 0x022497A0 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #2 - bhs _022497CE - lsl r3, r2, #2 - ldr r2, _022497D4 ; =0x0224C01C - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _022497C4 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_022497C4: - add r0, r5, #0 - bl ov95_022497D8 - mov r0, #0 - pop {r3, r4, r5, pc} -_022497CE: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_022497D4: .word 0x0224C01C - thumb_func_end ov95_022497A0 - - thumb_func_start ov95_022497D8 -ov95_022497D8: ; 0x022497D8 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _022497F4 - bl sub_020BFAB8 - ldr r0, [r4, #0x28] - bl ov95_02247770 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_022497F4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_022497D8 - - thumb_func_start ov95_022497F8 -ov95_022497F8: ; 0x022497F8 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov95_02249910 - add r0, r4, #0 - bl ov95_02249A80 - add r0, r4, #0 - bl ov95_02249B90 - mov r2, #0 - ldr r0, _02249838 ; =ov95_02249F38 - add r1, r4, #0 - str r2, [r4, #0xc] - bl sub_0200DA3C - mov r0, #3 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - ldr r3, _0224983C ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - nop -_02249838: .word ov95_02249F38 -_0224983C: .word 0x00007FFF - thumb_func_end ov95_022497F8 - - thumb_func_start ov95_02249840 -ov95_02249840: ; 0x02249840 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #4 - bhi _022498FC - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224985A: ; jump table - .short _02249864 - _0224985A - 2 ; case 0 - .short _02249870 - _0224985A - 2 ; case 1 - .short _0224989A - _0224985A - 2 ; case 2 - .short _022498C4 - _0224985A - 2 ; case 3 - .short _022498EE - _0224985A - 2 ; case 4 -_02249864: - mov r0, #0 - str r0, [r5, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022498FC -_02249870: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - cmp r0, #0xa - ble _022498FC - ldr r0, _02249904 ; =0x000006AC - bl sub_02005748 - add r1, r5, #0 - add r0, r5, #0 - add r1, #0x34 - bl ov95_02249C44 - ldr r0, [r5, #0x2c] - mov r1, #1 - bl ov95_022479A8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022498FC -_0224989A: - add r0, r5, #0 - add r0, #0x34 - bl ov95_02249CF0 - cmp r0, #0 - beq _022498FC - ldr r0, _02249908 ; =0x000006AD - bl sub_02005748 - ldr r0, [r5, #0x20] - mov r1, #3 - bl sub_02021D6C - ldr r0, [r5, #0x20] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022498FC -_022498C4: - ldr r0, [r5, #0x20] - bl sub_02021FD0 - cmp r0, #0 - bne _022498FC - mov r0, #0x10 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - ldr r3, _0224990C ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _022498FC -_022498EE: - bl sub_0200F2AC - cmp r0, #0 - beq _022498FC - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_022498FC: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_02249904: .word 0x000006AC -_02249908: .word 0x000006AD -_0224990C: .word 0x00007FFF - thumb_func_end ov95_02249840 - - thumb_func_start ov95_02249910 -ov95_02249910: ; 0x02249910 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, _02249A54 ; =0x0224C060 - bl sub_0201FE94 - ldr r2, _02249A58 ; =0x04000304 - ldr r0, _02249A5C ; =0xFFFF7FFF - ldrh r1, [r2] - and r0, r1 - strh r0, [r2] - ldr r0, _02249A60 ; =0x0224C024 - bl sub_02018368 - ldr r0, [r4, #0x24] - ldr r2, _02249A64 ; =0x0224C044 - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x24] - ldr r2, _02249A64 ; =0x0224C044 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0] - bl ov95_02247644 - cmp r0, #3 - bhi _02249962 - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224995A: ; jump table - .short _02249962 - _0224995A - 2 ; case 0 - .short _0224996E - _0224995A - 2 ; case 1 - .short _0224997A - _0224995A - 2 ; case 2 - .short _02249986 - _0224995A - 2 ; case 3 -_02249962: - mov r0, #0xf - str r0, [sp, #0x10] - mov r7, #0x10 - mov r6, #0x11 - mov r5, #0 - b _02249990 -_0224996E: - mov r0, #0xf - str r0, [sp, #0x10] - mov r7, #0x10 - mov r6, #0x11 - mov r5, #0x20 - b _02249990 -_0224997A: - mov r0, #0xf - str r0, [sp, #0x10] - mov r7, #0x10 - mov r6, #0x11 - mov r5, #0x40 - b _02249990 -_02249986: - mov r0, #0x18 - str r0, [sp, #0x10] - mov r7, #0x19 - mov r6, #0x1a - mov r5, #0 -_02249990: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x24] - mov r0, #0x5d - add r1, r7, #0 - mov r3, #3 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x24] - mov r0, #0x5d - add r1, r7, #0 - mov r3, #7 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r2, [r4, #0x24] - mov r0, #0x5d - mov r3, #3 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r2, [r4, #0x24] - mov r0, #0x5d - mov r3, #7 - bl sub_02006E60 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - add r1, r6, #0 - add r3, r5, #0 - bl sub_02006E9C - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - add r1, r6, #0 - mov r2, #4 - add r3, r5, #0 - bl sub_02006E9C - mov r1, #3 - add r3, r1, #0 - ldr r0, [r4, #0x24] - add r2, r1, #0 - add r3, #0xfd - bl sub_02019184 - ldr r0, [r4, #0x24] - mov r1, #7 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_02249A54: .word 0x0224C060 -_02249A58: .word 0x04000304 -_02249A5C: .word 0xFFFF7FFF -_02249A60: .word 0x0224C024 -_02249A64: .word 0x0224C044 - thumb_func_end ov95_02249910 - - thumb_func_start ov95_02249A68 -ov95_02249A68: ; 0x02249A68 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02249A68 - - thumb_func_start ov95_02249A80 -ov95_02249A80: ; 0x02249A80 - push {r3, r4, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _02249B54 ; =0x04000060 - ldr r1, _02249B58 ; =0xFFFFCFFD - ldrh r2, [r0] - and r2, r1 - strh r2, [r0] - ldrh r3, [r0] - add r2, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _02249B5C ; =0x0000CFFB - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #8 - orr r2, r3 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldr r0, _02249B60 ; =0x0224C034 - bl sub_020BFD2C - mov r1, #0 - ldr r0, _02249B64 ; =0x000043FF - ldr r2, _02249B68 ; =0x00007FFF - mov r3, #0x3f - str r1, [sp] - bl sub_020BFD58 - ldr r1, _02249B6C ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _02249B70 ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r1, _02249B74 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - strh r2, [r1] - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - add r3, r1, #0 - bl ov95_022476F0 - str r0, [r4, #0x28] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r4, #0x28] - mov r2, #0x5d - mov r3, #0x1b - bl ov95_022478B4 - ldr r1, _02249B78 ; =0x000018E3 - str r0, [r4, #0x2c] - add r0, sp, #0x10 - strh r1, [r0] - mov r1, #0 - strh r1, [r0, #2] - strh r1, [r0, #4] - ldr r0, [r4, #0x28] - add r1, sp, #0x10 - bl ov95_02247AB0 - ldr r0, [r4, #0x28] - ldr r1, _02249B7C ; =0x000007D2 - bl ov95_02247AE0 - ldr r0, [r4, #0x28] - add r1, sp, #0x18 - bl ov95_02247A90 - add sp, #0x24 - pop {r3, r4, pc} - nop -_02249B54: .word 0x04000060 -_02249B58: .word 0xFFFFCFFD -_02249B5C: .word 0x0000CFFB -_02249B60: .word 0x0224C034 -_02249B64: .word 0x000043FF -_02249B68: .word 0x00007FFF -_02249B6C: .word 0x04000540 -_02249B70: .word 0xBFFF0000 -_02249B74: .word 0x04000008 -_02249B78: .word 0x000018E3 -_02249B7C: .word 0x000007D2 - thumb_func_end ov95_02249A80 - - thumb_func_start ov95_02249B80 -ov95_02249B80: ; 0x02249B80 - push {r3, lr} - ldr r0, [r0, #0x28] - cmp r0, #0 - beq _02249B8C - bl ov95_0224773C -_02249B8C: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov95_02249B80 - - thumb_func_start ov95_02249B90 -ov95_02249B90: ; 0x02249B90 - push {r4, lr} - sub sp, #0x70 - add r4, r0, #0 - add r0, #0x10 - mov r1, #0x5d - mov r2, #7 - mov r3, #8 - bl ov95_02247568 - add r0, sp, #0x5c - bl sub_020A81D0 - add r0, sp, #0x38 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r0, sp, #0x38 - str r0, [sp, #0x10] - mov r0, #0x5d - mov r1, #9 - bl sub_02006F00 - mov r0, #0x3a - str r0, [sp] - add r0, sp, #0x5c - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl sub_02006EE0 - mov r0, #0 - add r1, r4, #0 - str r0, [sp] - add r0, sp, #0x14 - add r1, #0x10 - add r2, sp, #0x38 - add r3, sp, #0x5c - bl ov95_022475C4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r2, #0x80 - mov r3, #0x60 - bl ov95_022475E4 - mov r1, #0 - str r0, [r4, #0x20] - bl sub_02021CAC - add sp, #0x70 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02249B90 - - thumb_func_start ov95_02249C10 -ov95_02249C10: ; 0x02249C10 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _02249C1E - bl sub_02021BD4 -_02249C1E: - add r4, #0x10 - add r0, r4, #0 - bl ov95_022475A0 - pop {r4, pc} - thumb_func_end ov95_02249C10 - - thumb_func_start ov95_02249C28 -ov95_02249C28: ; 0x02249C28 - mov r1, #0 - str r1, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02249C28 - - thumb_func_start ov95_02249C30 -ov95_02249C30: ; 0x02249C30 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _02249C42 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] -_02249C42: - pop {r4, pc} - thumb_func_end ov95_02249C30 - - thumb_func_start ov95_02249C44 -ov95_02249C44: ; 0x02249C44 - push {r4, lr} - add r4, r1, #0 - str r0, [r4, #0] - ldr r1, [r0, #0x2c] - ldr r2, _02249CD4 ; =0xFFFFD870 - str r1, [r4, #0xc] - ldr r0, [r0, #0x28] - ldr r1, _02249CD8 ; =0xFFF50E00 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0x10] - str r1, [r4, #0x14] - mov r1, #0xe2 - lsl r1, r1, #0xc - str r1, [r4, #0x18] - add r1, r4, #0 - add r1, #0x6c - strh r2, [r1] - add r1, r4, #0 - ldr r2, _02249CDC ; =0xFFFFF550 - add r1, #0x6e - strh r2, [r1] - ldr r1, _02249CE0 ; =0x000134C4 - str r1, [r4, #0x3c] - ldr r1, _02249CE4 ; =0xFFFF4D56 - str r1, [r4, #0x40] - str r0, [r4, #0x60] - str r0, [r4, #0x64] - mov r1, #2 - str r0, [r4, #0x68] - lsl r1, r1, #0xc - strh r1, [r4, #0x34] - ldr r1, _02249CE8 ; =0xFFFFE000 - strh r1, [r4, #0x36] - strh r0, [r4, #0x38] - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x34 - bl ov95_02247990 - mov r0, #1 - lsl r0, r0, #0xc - str r0, [r4, #0x54] - mov r0, #0x4a - lsl r0, r0, #0xa - str r0, [r4, #0x44] - mov r0, #0x63 - lsl r0, r0, #0xa - str r0, [r4, #0x48] - mov r0, #0 - str r0, [r4, #0x5c] - add r0, r4, #0 - bl ov95_02249D38 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x34 - bl ov95_02247978 - ldr r0, _02249CEC ; =ov95_02249E04 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - pop {r4, pc} - nop -_02249CD4: .word 0xFFFFD870 -_02249CD8: .word 0xFFF50E00 -_02249CDC: .word 0xFFFFF550 -_02249CE0: .word 0x000134C4 -_02249CE4: .word 0xFFFF4D56 -_02249CE8: .word 0xFFFFE000 -_02249CEC: .word ov95_02249E04 - thumb_func_end ov95_02249C44 - - thumb_func_start ov95_02249CF0 -ov95_02249CF0: ; 0x02249CF0 - ldr r0, [r0, #4] - cmp r0, #0 - bne _02249CFA - mov r0, #1 - bx lr -_02249CFA: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov95_02249CF0 - - thumb_func_start ov95_02249D00 -ov95_02249D00: ; 0x02249D00 - push {r3, r4, r5, r6, r7, lr} - ldr r4, [sp, #0x18] - add r5, r0, #0 - add r6, r2, #0 - add r7, r3, #0 - cmp r4, #0 - beq _02249D36 - ldr r0, [r5, #0x44] - sub r0, r1, r0 - add r1, r4, #0 - bl sub_020E1F6C - str r0, [r5, #0x4c] - ldr r0, [r5, #0x48] - add r1, r4, #0 - sub r0, r6, r0 - bl sub_020E1F6C - str r0, [r5, #0x50] - ldr r0, [r5, #0x54] - add r1, r4, #0 - sub r0, r7, r0 - bl sub_020E1F6C - str r0, [r5, #0x58] - ldr r0, [sp, #0x18] - str r0, [r5, #0x5c] -_02249D36: - pop {r3, r4, r5, r6, r7, pc} - thumb_func_end ov95_02249D00 - - thumb_func_start ov95_02249D38 -ov95_02249D38: ; 0x02249D38 - push {r4, r5, r6, lr} - add r5, r0, #0 - add r0, #0x6c - ldrh r0, [r0] - mov r1, #0xb6 - bl sub_020E1F6C - add r4, r0, #0 - mov r0, #0x5a - lsl r0, r0, #2 - cmp r4, r0 - blt _02249D52 - sub r4, r4, r0 -_02249D52: - mov r0, #0x6c - ldrsh r1, [r5, r0] - mov r0, #0x6e - ldrsh r0, [r5, r0] - add r1, r1, r0 - add r0, r5, #0 - add r0, #0x6c - strh r1, [r0] - ldr r0, [r5, #0x5c] - cmp r0, #0 - beq _02249D8C - ldr r1, [r5, #0x44] - ldr r0, [r5, #0x4c] - add r0, r1, r0 - str r0, [r5, #0x44] - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x50] - add r0, r1, r0 - str r0, [r5, #0x48] - ldr r1, [r5, #0x54] - ldr r0, [r5, #0x58] - add r1, r1, r0 - str r1, [r5, #0x54] - ldr r0, [r5, #0xc] - bl ov95_022479D4 - ldr r0, [r5, #0x5c] - sub r0, r0, #1 - str r0, [r5, #0x5c] -_02249D8C: - lsl r0, r4, #0x10 - ldr r6, [r5, #0x44] - lsr r0, r0, #0x10 - bl sub_0201D1D4 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r5, #0x1c] - lsl r0, r4, #0x10 - ldr r6, [r5, #0x48] - lsr r0, r0, #0x10 - bl sub_0201D15C - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r5, #0x20] - add r1, r5, #0 - str r3, [r5, #0x24] - mov r0, #0x34 - ldrsh r2, [r5, r0] - mov r0, #3 - lsl r0, r0, #8 - add r0, r2, r0 - strh r0, [r5, #0x34] - ldr r0, [r5, #0xc] - add r1, #0x34 - bl ov95_02247990 - add r0, r5, #0 - add r1, r5, #0 - add r5, #0x28 - add r0, #0x1c - add r1, #0x10 - add r2, r5, #0 - bl sub_020BD17C - pop {r4, r5, r6, pc} - ; .align 2, 0 - thumb_func_end ov95_02249D38 - - thumb_func_start ov95_02249E04 -ov95_02249E04: ; 0x02249E04 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - ldr r1, [r4, #0x68] - cmp r1, #0x3c - bge _02249E14 - add r1, r1, #1 - str r1, [r4, #0x68] -_02249E14: - ldr r1, [r4, #0x60] - cmp r1, #4 - bls _02249E1C - b _02249F2C -_02249E1C: - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_02249E28: ; jump table - .short _02249E32 - _02249E28 - 2 ; case 0 - .short _02249E66 - _02249E28 - 2 ; case 1 - .short _02249EA4 - _02249E28 - 2 ; case 2 - .short _02249EEA - _02249E28 - 2 ; case 3 - .short _02249F1A - _02249E28 - 2 ; case 4 -_02249E32: - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x3c] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x40] - add r0, r1, r0 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_02249D38 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - ldr r0, [r4, #0xc] - bl ov95_022479DC - cmp r0, #0 - beq _02249F2C - ldr r0, [r4, #0x60] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0x60] - pop {r3, r4, pc} -_02249E66: - ldr r0, [r4, #0xc] - bl ov95_022479DC - cmp r0, #0 - bne _02249E80 - ldr r0, [r4, #0] - bl ov95_02249F30 - ldr r0, [r4, #0x60] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0x60] - pop {r3, r4, pc} -_02249E80: - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x3c] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x40] - add r0, r1, r0 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_02249D38 - ldr r0, [r4, #0xc] - add r4, #0x28 - add r1, r4, #0 - bl ov95_02247968 - add sp, #4 - pop {r3, r4, pc} -_02249EA4: - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x3c] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x40] - add r0, r1, r0 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_02249D38 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - ldr r0, [r4, #0x68] - cmp r0, #0x3c - blt _02249F2C - mov r1, #2 - lsl r1, r1, #0xa - mov r0, #0xc - str r0, [sp] - add r0, r4, #0 - add r2, r1, #0 - lsr r3, r1, #2 - bl ov95_02249D00 - mov r0, #0 - str r0, [r4, #0x64] - ldr r0, [r4, #0x60] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0x60] - pop {r3, r4, pc} -_02249EEA: - add r0, r4, #0 - bl ov95_02249D38 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - ldr r0, [r4, #0x64] - add r0, r0, #1 - str r0, [r4, #0x64] - cmp r0, #0xc - blt _02249F2C - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov95_022479A8 - mov r0, #0 - str r0, [r4, #0x64] - ldr r0, [r4, #0x60] - add sp, #4 - add r0, r0, #1 - str r0, [r4, #0x60] - pop {r3, r4, pc} -_02249F1A: - ldr r1, [r4, #0x64] - add r1, r1, #1 - str r1, [r4, #0x64] - cmp r1, #8 - ble _02249F2C - mov r1, #0 - str r1, [r4, #4] - bl sub_0200DA58 -_02249F2C: - add sp, #4 - pop {r3, r4, pc} - thumb_func_end ov95_02249E04 - - thumb_func_start ov95_02249F30 -ov95_02249F30: ; 0x02249F30 - mov r1, #1 - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov95_02249F30 - - thumb_func_start ov95_02249F38 -ov95_02249F38: ; 0x02249F38 - push {r3, r4, r5, lr} - sub sp, #8 - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _02249F84 - mov r3, #0 - ldr r1, _02249F88 ; =0x00001150 - str r3, [r4, #0xc] - add r0, sp, #0 - strh r1, [r0] - strh r3, [r0, #2] - strh r3, [r0, #4] - mov r1, #3 - ldr r0, [r4, #0x24] - add r2, r1, #0 - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x24] - mov r1, #7 - add r3, #0xfd - bl sub_02019184 - ldr r0, [r4, #0x28] - add r1, sp, #0 - bl ov95_02247AC0 - ldr r2, _02249F8C ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - add r0, r5, #0 - bl sub_0200DA58 -_02249F84: - add sp, #8 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02249F88: .word 0x00001150 -_02249F8C: .word 0x04000304 - thumb_func_end ov95_02249F38 - - thumb_func_start ov95_02249F90 -ov95_02249F90: ; 0x02249F90 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0x24 - bl sub_02018144 - add r4, r0, #0 - beq _02249FAE - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - str r0, [r4, #0xc] -_02249FAE: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_02249F90 - - thumb_func_start ov95_02249FB4 -ov95_02249FB4: ; 0x02249FB4 - push {r4, lr} - add r4, r0, #0 - beq _02249FC4 - bl ov95_0224A320 - add r0, r4, #0 - bl sub_020181C4 -_02249FC4: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_02249FB4 - - thumb_func_start ov95_02249FC8 -ov95_02249FC8: ; 0x02249FC8 - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #2 - bhs _02249FF0 - lsl r3, r2, #2 - ldr r2, _02249FF4 ; =0x0224C088 - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _02249FEC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_02249FEC: - mov r0, #0 - pop {r3, r4, r5, pc} -_02249FF0: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_02249FF4: .word 0x0224C088 - thumb_func_end ov95_02249FC8 - - thumb_func_start ov95_02249FF8 -ov95_02249FF8: ; 0x02249FF8 - push {lr} - sub sp, #0xc - bl ov95_0224A10C - mov r0, #8 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - ldr r3, _0224A01C ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0xc - pop {pc} - ; .align 2, 0 -_0224A01C: .word 0x00007FFF - thumb_func_end ov95_02249FF8 - - thumb_func_start ov95_0224A020 -ov95_0224A020: ; 0x0224A020 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0224A038 - cmp r0, #1 - beq _0224A06A - cmp r0, #2 - beq _0224A096 - b _0224A0A4 -_0224A038: - bl sub_0200F2AC - cmp r0, #0 - beq _0224A0A4 - ldr r0, _0224A0AC ; =0xFFE80000 - mov r2, #0 - str r0, [r5, #0x10] - mov r0, #5 - lsl r0, r0, #0x10 - str r0, [r5, #0x14] - ldr r0, _0224A0B0 ; =0x00005999 - add r1, r5, #0 - str r0, [r5, #0x18] - ldr r0, _0224A0B4 ; =0xFFFFDDDE - str r0, [r5, #0x1c] - mov r0, #0x3c - str r0, [r5, #8] - ldr r0, _0224A0B8 ; =ov95_0224A0C4 - str r2, [r5, #0x20] - bl sub_0200DA04 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224A0A4 -_0224A06A: - ldr r0, [r5, #0x20] - cmp r0, #0 - beq _0224A0A4 - ldr r0, _0224A0BC ; =0x000006A9 - bl sub_02005748 - mov r0, #0x10 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - ldr r3, _0224A0C0 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224A0A4 -_0224A096: - bl sub_0200F2AC - cmp r0, #0 - beq _0224A0A4 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0224A0A4: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - nop -_0224A0AC: .word 0xFFE80000 -_0224A0B0: .word 0x00005999 -_0224A0B4: .word 0xFFFFDDDE -_0224A0B8: .word ov95_0224A0C4 -_0224A0BC: .word 0x000006A9 -_0224A0C0: .word 0x00007FFF - thumb_func_end ov95_0224A020 - - thumb_func_start ov95_0224A0C4 -ov95_0224A0C4: ; 0x0224A0C4 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _0224A0F2 - sub r0, r0, #1 - str r0, [r4, #8] - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x1c] - add r2, r1, r0 - str r2, [r4, #0x14] - ldr r1, [r4, #0x10] - ldr r0, [r4, #0xc] - asr r1, r1, #0xc - asr r2, r2, #0xc - bl ov95_0224A358 - pop {r3, r4, r5, pc} -_0224A0F2: - mov r1, #0x2f - mvn r1, r1 - ldr r0, [r4, #0xc] - add r2, r1, #0 - bl ov95_0224A358 - mov r0, #1 - str r0, [r4, #0x20] - add r0, r5, #0 - bl sub_0200DA58 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224A0C4 - - thumb_func_start ov95_0224A10C -ov95_0224A10C: ; 0x0224A10C - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _0224A304 ; =0x0224C0F4 - bl sub_0201FE94 - ldr r2, _0224A308 ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - ldr r0, _0224A30C ; =0x0224C090 - bl sub_02018368 - ldr r0, [r4, #0xc] - ldr r2, _0224A310 ; =0x0224C0A0 - mov r1, #1 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - ldr r2, _0224A310 ; =0x0224C0A0 - mov r1, #5 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - ldr r2, _0224A314 ; =0x0224C0BC - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - ldr r2, _0224A318 ; =0x0224C0D8 - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0xc] - ldr r2, _0224A318 ; =0x0224C0D8 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #0x13 - mov r3, #3 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #0x13 - mov r3, #7 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #0x12 - mov r3, #3 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #0x12 - mov r3, #7 - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0x14 - add r3, r2, #0 - bl sub_02006E84 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0x14 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - mov r0, #0xc8 - str r0, [sp] - mov r1, #1 - ldr r0, [r4, #0xc] - mov r2, #0 - add r3, r1, #0 - bl sub_020196C0 - mov r0, #0xc8 - str r0, [sp] - ldr r0, [r4, #0xc] - mov r1, #5 - mov r2, #0 - mov r3, #1 - bl sub_020196C0 - mov r0, #0xc8 - str r0, [sp] - ldr r0, [r4, #0xc] - mov r1, #2 - mov r2, #0 - mov r3, #1 - bl sub_020196C0 - mov r1, #0 - str r1, [sp] - ldr r0, [r4, #0] - mov r2, #1 - mov r3, #0xe - bl ov95_022473E8 - mov r1, #0 - str r1, [sp] - ldr r0, [r4, #0] - mov r2, #5 - mov r3, #0xe - bl ov95_022473E8 - mov r0, #0 - str r0, [sp] - ldr r0, [r4, #0] - mov r1, #1 - mov r2, #2 - mov r3, #0xf - bl ov95_022473E8 - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x40 - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r4, #0xc] - mov r1, #1 - mov r2, #0xc8 - bl sub_02019CB8 - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x40 - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r4, #0xc] - mov r1, #5 - mov r2, #0xc8 - bl sub_02019CB8 - mov r3, #0 - str r3, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x40 - str r0, [sp, #8] - str r3, [sp, #0xc] - ldr r0, [r4, #0xc] - mov r1, #2 - mov r2, #0xc8 - bl sub_02019CB8 - mov r0, #0x14 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - ldr r0, [r4, #0] - mov r2, #1 - mov r3, #0xe - bl ov95_022474D4 - mov r0, #0x14 - str r0, [sp] - mov r1, #0 - str r1, [sp, #4] - ldr r0, [r4, #0] - mov r2, #5 - mov r3, #0xe - bl ov95_022474D4 - mov r2, #2 - str r2, [sp] - mov r0, #0 - str r0, [sp, #4] - ldr r0, [r4, #0] - mov r1, #1 - mov r3, #0xf - bl ov95_022474D4 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02019448 - ldr r0, [r4, #0xc] - mov r1, #5 - bl sub_02019448 - ldr r0, [r4, #0xc] - mov r1, #2 - bl sub_02019448 - ldr r0, [r4, #0xc] - ldr r2, _0224A31C ; =0xFFFFFE80 - mov r1, #0x50 - bl ov95_0224A358 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x10 - pop {r4, pc} - ; .align 2, 0 -_0224A304: .word 0x0224C0F4 -_0224A308: .word 0x04000304 -_0224A30C: .word 0x0224C090 -_0224A310: .word 0x0224C0A0 -_0224A314: .word 0x0224C0BC -_0224A318: .word 0x0224C0D8 -_0224A31C: .word 0xFFFFFE80 - thumb_func_end ov95_0224A10C - - thumb_func_start ov95_0224A320 -ov95_0224A320: ; 0x0224A320 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0xc] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #7 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #6 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #1 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #5 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224A320 - - thumb_func_start ov95_0224A358 -ov95_0224A358: ; 0x0224A358 - push {r4, r5, r6, lr} - ldr r3, _0224A38C ; =0x000001FF - add r4, r1, #0 - add r6, r2, #0 - and r4, r3 - add r5, r0, #0 - mov r1, #2 - mov r2, #3 - and r3, r6 - bl sub_02019184 - add r0, r5, #0 - mov r1, #1 - mov r2, #3 - add r3, r4, #0 - bl sub_02019184 - add r4, #0xc0 - add r0, r5, #0 - mov r1, #5 - mov r2, #3 - add r3, r4, #0 - bl sub_02019184 - pop {r4, r5, r6, pc} - nop -_0224A38C: .word 0x000001FF - thumb_func_end ov95_0224A358 - - thumb_func_start ov95_0224A390 -ov95_0224A390: ; 0x0224A390 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0xb0 - bl sub_02018144 - add r4, r0, #0 - beq _0224A3C4 - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - str r0, [r4, #0x24] - mov r0, #0 - str r0, [r4, #0x28] - str r0, [r4, #0xc] - add r0, r4, #0 - add r0, #0x34 - bl ov95_0224A848 - ldr r0, _0224A3C8 ; =ov95_0224AB50 - add r1, r4, #0 - bl sub_02017798 -_0224A3C4: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224A3C8: .word ov95_0224AB50 - thumb_func_end ov95_0224A390 - - thumb_func_start ov95_0224A3CC -ov95_0224A3CC: ; 0x0224A3CC - push {r4, lr} - add r4, r0, #0 - beq _0224A3FA - mov r0, #0 - add r1, r0, #0 - bl sub_02017798 - add r0, r4, #0 - bl ov95_0224A678 - add r0, r4, #0 - bl ov95_0224A7A0 - add r0, r4, #0 - bl ov95_0224A830 - add r0, r4, #0 - add r0, #0x34 - bl ov95_0224A850 - add r0, r4, #0 - bl sub_020181C4 -_0224A3FA: - pop {r4, pc} - thumb_func_end ov95_0224A3CC - - thumb_func_start ov95_0224A3FC -ov95_0224A3FC: ; 0x0224A3FC - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #2 - bhs _0224A424 - lsl r3, r2, #2 - ldr r2, _0224A428 ; =0x0224C11C - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _0224A420 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_0224A420: - mov r0, #0 - pop {r3, r4, r5, pc} -_0224A424: - mov r0, #1 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224A428: .word 0x0224C11C - thumb_func_end ov95_0224A3FC - - thumb_func_start ov95_0224A42C -ov95_0224A42C: ; 0x0224A42C - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov95_0224A518 - add r0, r4, #0 - bl ov95_0224A690 - add r0, r4, #0 - bl ov95_0224A7B0 - mov r0, #8 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - ldr r3, _0224A460 ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - nop -_0224A460: .word 0x00007FFF - thumb_func_end ov95_0224A42C - - thumb_func_start ov95_0224A464 -ov95_0224A464: ; 0x0224A464 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #3 - bhi _0224A50A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224A47E: ; jump table - .short _0224A486 - _0224A47E - 2 ; case 0 - .short _0224A4A6 - _0224A47E - 2 ; case 1 - .short _0224A4D0 - _0224A47E - 2 ; case 2 - .short _0224A4FC - _0224A47E - 2 ; case 3 -_0224A486: - bl sub_0200F2AC - cmp r0, #0 - beq _0224A50A - ldr r0, [r5, #0x20] - mov r1, #3 - bl sub_02021D6C - ldr r0, [r5, #0x20] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224A50A -_0224A4A6: - ldr r0, [r5, #0x20] - bl sub_02021FD0 - cmp r0, #0 - bne _0224A50A - ldr r0, _0224A510 ; =0x000006AB - bl sub_02005748 - add r1, r5, #0 - add r0, r5, #0 - add r1, #0x34 - bl ov95_0224A864 - ldr r0, [r5, #0x2c] - mov r1, #1 - bl ov95_022479A8 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224A50A -_0224A4D0: - add r5, #0x34 - add r0, r5, #0 - bl ov95_0224A924 - cmp r0, #0 - beq _0224A50A - mov r0, #0x10 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - ldr r3, _0224A514 ; =0x00007FFF - add r1, r0, #0 - add r2, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224A50A -_0224A4FC: - bl sub_0200F2AC - cmp r0, #0 - beq _0224A50A - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0224A50A: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - ; .align 2, 0 -_0224A510: .word 0x000006AB -_0224A514: .word 0x00007FFF - thumb_func_end ov95_0224A464 - - thumb_func_start ov95_0224A518 -ov95_0224A518: ; 0x0224A518 - push {r4, r5, r6, r7, lr} - sub sp, #0x14 - add r4, r0, #0 - ldr r0, _0224A668 ; =0x0224C160 - bl sub_0201FE94 - ldr r2, _0224A66C ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - ldr r0, _0224A670 ; =0x0224C124 - bl sub_02018368 - ldr r0, [r4, #0x24] - ldr r2, _0224A674 ; =0x0224C144 - mov r1, #3 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x24] - ldr r2, _0224A674 ; =0x0224C144 - mov r1, #7 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0] - bl ov95_02247644 - cmp r0, #3 - bhi _0224A56A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224A562: ; jump table - .short _0224A56A - _0224A562 - 2 ; case 0 - .short _0224A576 - _0224A562 - 2 ; case 1 - .short _0224A582 - _0224A562 - 2 ; case 2 - .short _0224A58E - _0224A562 - 2 ; case 3 -_0224A56A: - mov r0, #0xf - str r0, [sp, #0x10] - mov r7, #0x10 - mov r6, #0x11 - mov r5, #0 - b _0224A598 -_0224A576: - mov r0, #0xf - str r0, [sp, #0x10] - mov r7, #0x10 - mov r6, #0x11 - mov r5, #0x20 - b _0224A598 -_0224A582: - mov r0, #0xf - str r0, [sp, #0x10] - mov r7, #0x10 - mov r6, #0x11 - mov r5, #0x40 - b _0224A598 -_0224A58E: - mov r0, #0x18 - str r0, [sp, #0x10] - mov r7, #0x19 - mov r6, #0x1a - mov r5, #0 -_0224A598: - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x24] - mov r0, #0x5d - add r1, r7, #0 - mov r3, #3 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x24] - mov r0, #0x5d - add r1, r7, #0 - mov r3, #7 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r2, [r4, #0x24] - mov r0, #0x5d - mov r3, #3 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r1, [sp, #0x10] - ldr r2, [r4, #0x24] - mov r0, #0x5d - mov r3, #7 - bl sub_02006E60 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - add r1, r6, #0 - add r3, r5, #0 - bl sub_02006E9C - mov r0, #0 - str r0, [sp] - mov r0, #0x20 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - add r1, r6, #0 - mov r2, #4 - add r3, r5, #0 - bl sub_02006E9C - mov r1, #3 - ldr r0, [r4, #0x24] - add r2, r1, #0 - mov r3, #0 - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0x24] - mov r1, #7 - add r3, #0xfd - bl sub_02019184 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - bl sub_02039734 - mov r0, #1 - mov r1, #0x39 - bl sub_020397C8 - add sp, #0x14 - pop {r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224A668: .word 0x0224C160 -_0224A66C: .word 0x04000304 -_0224A670: .word 0x0224C124 -_0224A674: .word 0x0224C144 - thumb_func_end ov95_0224A518 - - thumb_func_start ov95_0224A678 -ov95_0224A678: ; 0x0224A678 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x24] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0x24] - mov r1, #7 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224A678 - - thumb_func_start ov95_0224A690 -ov95_0224A690: ; 0x0224A690 - push {r3, r4, lr} - sub sp, #0x24 - add r4, r0, #0 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _0224A770 ; =0x04000060 - ldr r1, _0224A774 ; =0xFFFFCFFD - ldrh r2, [r0] - and r2, r1 - strh r2, [r0] - ldrh r3, [r0] - add r2, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0224A778 ; =0x0000CFFB - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #8 - orr r2, r3 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldr r0, _0224A77C ; =0x0224C134 - bl sub_020BFD2C - mov r1, #0 - ldr r0, _0224A780 ; =0x000043FF - ldr r2, _0224A784 ; =0x00007FFF - mov r3, #0x3f - str r1, [sp] - bl sub_020BFD58 - ldr r1, _0224A788 ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _0224A78C ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r1, _0224A790 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - strh r2, [r1] - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - add r3, r1, #0 - bl ov95_022476F0 - str r0, [r4, #0x28] - mov r1, #0 - str r1, [sp] - str r1, [sp, #4] - str r1, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r4, #0x28] - mov r2, #0x5d - mov r3, #0x1b - bl ov95_022478B4 - ldr r1, _0224A794 ; =0x000018E3 - str r0, [r4, #0x2c] - add r0, sp, #0x10 - strh r1, [r0] - mov r1, #0 - strh r1, [r0, #2] - strh r1, [r0, #4] - ldr r0, [r4, #0x28] - add r1, sp, #0x10 - bl ov95_02247AB0 - ldr r1, _0224A798 ; =0x00001150 - add r0, sp, #0x10 - strh r1, [r0] - ldr r0, [r4, #0x28] - add r1, sp, #0x10 - bl ov95_02247AC0 - ldr r0, [r4, #0x28] - ldr r1, _0224A79C ; =0x000007D2 - bl ov95_02247AE0 - ldr r0, [r4, #0x28] - add r1, sp, #0x18 - bl ov95_02247A90 - add sp, #0x24 - pop {r3, r4, pc} - ; .align 2, 0 -_0224A770: .word 0x04000060 -_0224A774: .word 0xFFFFCFFD -_0224A778: .word 0x0000CFFB -_0224A77C: .word 0x0224C134 -_0224A780: .word 0x000043FF -_0224A784: .word 0x00007FFF -_0224A788: .word 0x04000540 -_0224A78C: .word 0xBFFF0000 -_0224A790: .word 0x04000008 -_0224A794: .word 0x000018E3 -_0224A798: .word 0x00001150 -_0224A79C: .word 0x000007D2 - thumb_func_end ov95_0224A690 - - thumb_func_start ov95_0224A7A0 -ov95_0224A7A0: ; 0x0224A7A0 - push {r3, lr} - ldr r0, [r0, #0x28] - cmp r0, #0 - beq _0224A7AC - bl ov95_0224773C -_0224A7AC: - pop {r3, pc} - ; .align 2, 0 - thumb_func_end ov95_0224A7A0 - - thumb_func_start ov95_0224A7B0 -ov95_0224A7B0: ; 0x0224A7B0 - push {r4, lr} - sub sp, #0x70 - add r4, r0, #0 - add r0, #0x10 - mov r1, #0x5d - mov r2, #7 - mov r3, #8 - bl ov95_02247568 - add r0, sp, #0x5c - bl sub_020A81D0 - add r0, sp, #0x38 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r0, sp, #0x38 - str r0, [sp, #0x10] - mov r0, #0x5d - mov r1, #9 - bl sub_02006F00 - mov r0, #0x3a - str r0, [sp] - add r0, sp, #0x5c - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl sub_02006EE0 - mov r0, #1 - add r1, r4, #0 - str r0, [sp] - add r0, sp, #0x14 - add r1, #0x10 - add r2, sp, #0x38 - add r3, sp, #0x5c - bl ov95_022475C4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r2, #0x80 - mov r3, #0x60 - bl ov95_022475E4 - mov r1, #0 - str r0, [r4, #0x20] - bl sub_02021CAC - add sp, #0x70 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224A7B0 - - thumb_func_start ov95_0224A830 -ov95_0224A830: ; 0x0224A830 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224A83E - bl sub_02021BD4 -_0224A83E: - add r4, #0x10 - add r0, r4, #0 - bl ov95_022475A0 - pop {r4, pc} - thumb_func_end ov95_0224A830 - - thumb_func_start ov95_0224A848 -ov95_0224A848: ; 0x0224A848 - mov r1, #0 - str r1, [r0, #4] - bx lr - ; .align 2, 0 - thumb_func_end ov95_0224A848 - - thumb_func_start ov95_0224A850 -ov95_0224A850: ; 0x0224A850 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _0224A862 - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #4] -_0224A862: - pop {r4, pc} - thumb_func_end ov95_0224A850 - - thumb_func_start ov95_0224A864 -ov95_0224A864: ; 0x0224A864 - push {r3, r4, lr} - sub sp, #4 - add r4, r1, #0 - str r0, [r4, #0] - ldr r1, [r0, #0x2c] - ldr r2, _0224A904 ; =0xFFFFD870 - str r1, [r4, #0xc] - ldr r0, [r0, #0x28] - ldr r1, _0224A908 ; =0x003D6C00 - str r0, [r4, #8] - mov r0, #0 - str r0, [r4, #0x10] - str r1, [r4, #0x14] - ldr r1, _0224A90C ; =0xFFE44000 - str r1, [r4, #0x18] - add r1, r4, #0 - add r1, #0x78 - strh r2, [r1] - add r1, r4, #0 - ldr r2, _0224A910 ; =0xFFFFF550 - add r1, #0x7a - strh r2, [r1] - ldr r1, _0224A914 ; =0xFFFEF2C6 - str r1, [r4, #0x3c] - ldr r1, _0224A918 ; =0x0000936D - str r1, [r4, #0x40] - str r0, [r4, #0x6c] - str r0, [r4, #0x70] - mov r1, #2 - str r0, [r4, #0x74] - lsl r1, r1, #0xc - strh r1, [r4, #0x34] - ldr r1, _0224A91C ; =0xFFFFE000 - strh r1, [r4, #0x36] - strh r0, [r4, #0x38] - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x34 - bl ov95_02247990 - mov r3, #2 - lsl r3, r3, #8 - mov r1, #0x4a - mov r2, #0x63 - str r3, [r4, #0x5c] - lsl r0, r3, #2 - str r0, [r4, #0x44] - str r0, [r4, #0x48] - mov r0, #0 - str r0, [r4, #0x68] - mov r0, #0xc - str r0, [sp] - add r0, r4, #0 - lsl r1, r1, #0xa - lsl r2, r2, #0xa - lsl r3, r3, #3 - bl ov95_0224A934 - add r0, r4, #0 - bl ov95_0224A978 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x34 - bl ov95_02247978 - ldr r0, _0224A920 ; =ov95_0224AA70 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r4, #4] - add sp, #4 - pop {r3, r4, pc} - nop -_0224A904: .word 0xFFFFD870 -_0224A908: .word 0x003D6C00 -_0224A90C: .word 0xFFE44000 -_0224A910: .word 0xFFFFF550 -_0224A914: .word 0xFFFEF2C6 -_0224A918: .word 0x0000936D -_0224A91C: .word 0xFFFFE000 -_0224A920: .word ov95_0224AA70 - thumb_func_end ov95_0224A864 - - thumb_func_start ov95_0224A924 -ov95_0224A924: ; 0x0224A924 - ldr r0, [r0, #4] - cmp r0, #0 - bne _0224A92E - mov r0, #1 - bx lr -_0224A92E: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov95_0224A924 - - thumb_func_start ov95_0224A934 -ov95_0224A934: ; 0x0224A934 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - ldr r0, [sp, #0x18] - add r4, r1, #0 - add r6, r2, #0 - add r7, r3, #0 - str r0, [sp] - cmp r0, #0 - beq _0224A974 - ldr r0, [r5, #0x44] - ldr r1, [sp] - sub r0, r4, r0 - bl sub_020E1F6C - str r0, [r5, #0x4c] - ldr r0, [r5, #0x48] - ldr r1, [sp] - sub r0, r6, r0 - bl sub_020E1F6C - str r0, [r5, #0x50] - ldr r0, [r5, #0x5c] - ldr r1, [sp] - sub r0, r7, r0 - bl sub_020E1F6C - str r0, [r5, #0x60] - str r4, [r5, #0x54] - str r6, [r5, #0x58] - ldr r0, [sp, #0x18] - str r7, [r5, #0x64] - str r0, [r5, #0x68] -_0224A974: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 - thumb_func_end ov95_0224A934 - - thumb_func_start ov95_0224A978 -ov95_0224A978: ; 0x0224A978 - push {r4, r5, r6, lr} - add r5, r0, #0 - ldr r0, _0224AA6C ; =0x0224C2C0 - ldr r0, [r0, #0] - cmp r0, #0 - beq _0224AA5A - add r0, r5, #0 - add r0, #0x78 - ldrh r0, [r0] - mov r1, #0xb6 - bl sub_020E1F6C - add r4, r0, #0 - mov r0, #0x5a - lsl r0, r0, #2 - cmp r4, r0 - blt _0224A99C - sub r4, r4, r0 -_0224A99C: - mov r0, #0x78 - ldrsh r1, [r5, r0] - mov r0, #0x7a - ldrsh r0, [r5, r0] - sub r1, r1, r0 - add r0, r5, #0 - add r0, #0x78 - strh r1, [r0] - ldr r0, [r5, #0x68] - cmp r0, #0 - beq _0224A9E4 - sub r0, r0, #1 - str r0, [r5, #0x68] - beq _0224A9D0 - ldr r1, [r5, #0x44] - ldr r0, [r5, #0x4c] - add r0, r1, r0 - str r0, [r5, #0x44] - ldr r1, [r5, #0x48] - ldr r0, [r5, #0x50] - add r0, r1, r0 - str r0, [r5, #0x48] - ldr r1, [r5, #0x5c] - ldr r0, [r5, #0x60] - add r0, r1, r0 - b _0224A9DA -_0224A9D0: - ldr r0, [r5, #0x54] - str r0, [r5, #0x44] - ldr r0, [r5, #0x58] - str r0, [r5, #0x48] - ldr r0, [r5, #0x64] -_0224A9DA: - str r0, [r5, #0x5c] - ldr r0, [r5, #0xc] - ldr r1, [r5, #0x5c] - bl ov95_022479D4 -_0224A9E4: - lsl r0, r4, #0x10 - ldr r6, [r5, #0x44] - lsr r0, r0, #0x10 - bl sub_0201D1D4 - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r5, #0x1c] - lsl r0, r4, #0x10 - ldr r6, [r5, #0x48] - lsr r0, r0, #0x10 - bl sub_0201D15C - asr r1, r0, #0x1f - asr r3, r6, #0x1f - add r2, r6, #0 - bl sub_020E1F1C - mov r2, #2 - mov r3, #0 - lsl r2, r2, #0xa - add r2, r0, r2 - adc r1, r3 - lsl r0, r1, #0x14 - lsr r1, r2, #0xc - orr r1, r0 - str r1, [r5, #0x20] - add r1, r5, #0 - str r3, [r5, #0x24] - mov r0, #0x34 - ldrsh r2, [r5, r0] - mov r0, #3 - lsl r0, r0, #8 - sub r0, r2, r0 - strh r0, [r5, #0x34] - ldr r0, [r5, #0xc] - add r1, #0x34 - bl ov95_02247990 - add r0, r5, #0 - add r1, r5, #0 - add r5, #0x28 - add r0, #0x1c - add r1, #0x10 - add r2, r5, #0 - bl sub_020BD17C - pop {r4, r5, r6, pc} -_0224AA5A: - add r2, r5, #0 - add r2, #0x10 - ldmia r2!, {r0, r1} - add r5, #0x28 - stmia r5!, {r0, r1} - ldr r0, [r2, #0] - str r0, [r5, #0] - pop {r4, r5, r6, pc} - nop -_0224AA6C: .word 0x0224C2C0 - thumb_func_end ov95_0224A978 - - thumb_func_start ov95_0224AA70 -ov95_0224AA70: ; 0x0224AA70 - push {r4, lr} - add r4, r1, #0 - ldr r1, [r4, #0x74] - cmp r1, #0x46 - bge _0224AA7E - add r1, r1, #1 - str r1, [r4, #0x74] -_0224AA7E: - ldr r1, [r4, #0x6c] - cmp r1, #3 - bhi _0224AB44 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224AA90: ; jump table - .short _0224AA98 - _0224AA90 - 2 ; case 0 - .short _0224AABE - _0224AA90 - 2 ; case 1 - .short _0224AAF8 - _0224AA90 - 2 ; case 2 - .short _0224AB32 - _0224AA90 - 2 ; case 3 -_0224AA98: - add r0, r4, #0 - bl ov95_0224A978 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - ldr r0, [r4, #0x74] - add r0, r0, #1 - str r0, [r4, #0x74] - cmp r0, #0xc - blt _0224AB44 - mov r0, #0 - str r0, [r4, #0x74] - ldr r0, [r4, #0x6c] - add r0, r0, #1 - str r0, [r4, #0x6c] - pop {r4, pc} -_0224AABE: - ldr r0, [r4, #0xc] - bl ov95_022479DC - cmp r0, #0 - bne _0224AAD6 - ldr r0, [r4, #0] - bl ov95_0224AB48 - ldr r0, [r4, #0x6c] - add r0, r0, #1 - str r0, [r4, #0x6c] - pop {r4, pc} -_0224AAD6: - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x3c] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x40] - add r0, r1, r0 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_0224A978 - ldr r0, [r4, #0xc] - add r4, #0x28 - add r1, r4, #0 - bl ov95_02247968 - pop {r4, pc} -_0224AAF8: - ldr r1, [r4, #0x14] - ldr r0, [r4, #0x3c] - add r0, r1, r0 - str r0, [r4, #0x14] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x40] - add r0, r1, r0 - str r0, [r4, #0x18] - add r0, r4, #0 - bl ov95_0224A978 - add r1, r4, #0 - ldr r0, [r4, #0xc] - add r1, #0x28 - bl ov95_02247968 - ldr r0, [r4, #0x74] - cmp r0, #0x46 - blt _0224AB44 - ldr r0, [r4, #0xc] - mov r1, #0 - bl ov95_022479A8 - mov r0, #0 - str r0, [r4, #0x70] - ldr r0, [r4, #0x6c] - add r0, r0, #1 - str r0, [r4, #0x6c] - pop {r4, pc} -_0224AB32: - ldr r1, [r4, #0x70] - add r1, r1, #1 - str r1, [r4, #0x70] - cmp r1, #8 - ble _0224AB44 - mov r1, #0 - str r1, [r4, #4] - bl sub_0200DA58 -_0224AB44: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224AA70 - - thumb_func_start ov95_0224AB48 -ov95_0224AB48: ; 0x0224AB48 - mov r1, #1 - str r1, [r0, #0xc] - bx lr - ; .align 2, 0 - thumb_func_end ov95_0224AB48 - - thumb_func_start ov95_0224AB50 -ov95_0224AB50: ; 0x0224AB50 - push {r4, lr} - sub sp, #8 - add r4, r0, #0 - ldr r0, [r4, #0x28] - cmp r0, #0 - beq _0224AB6E - bl sub_020BFAB8 - ldr r0, [r4, #0x28] - bl ov95_02247770 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_0224AB6E: - ldr r0, [r4, #0xc] - cmp r0, #0 - beq _0224ABB0 - ldr r1, _0224ABB4 ; =0x0000EEB0 - add r0, sp, #0 - strh r1, [r0] - mov r1, #0 - strh r1, [r0, #2] - strh r1, [r0, #4] - mov r1, #3 - add r3, r1, #0 - ldr r0, [r4, #0x24] - add r2, r1, #0 - add r3, #0xfd - bl sub_02019184 - ldr r0, [r4, #0x24] - mov r1, #7 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #0x28] - add r1, sp, #0 - bl ov95_02247AC0 - ldr r2, _0224ABB8 ; =0x04000304 - ldr r0, _0224ABBC ; =0xFFFF7FFF - ldrh r1, [r2] - and r0, r1 - strh r0, [r2] - mov r0, #0 - str r0, [r4, #0xc] -_0224ABB0: - add sp, #8 - pop {r4, pc} - ; .align 2, 0 -_0224ABB4: .word 0x0000EEB0 -_0224ABB8: .word 0x04000304 -_0224ABBC: .word 0xFFFF7FFF - thumb_func_end ov95_0224AB50 - - thumb_func_start ov95_0224ABC0 -ov95_0224ABC0: ; 0x0224ABC0 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0x3c - bl sub_02018144 - add r4, r0, #0 - beq _0224ABEE - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - str r0, [r4, #0xc] - mov r0, #0 - str r0, [r4, #0x20] - str r0, [r4, #0x10] - str r0, [r4, #0x14] - str r0, [r4, #0x18] - str r0, [r4, #0x30] - str r0, [r4, #0x34] - str r0, [r4, #0x38] -_0224ABEE: - add r0, r4, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224ABC0 - - thumb_func_start ov95_0224ABF4 -ov95_0224ABF4: ; 0x0224ABF4 - push {r4, lr} - add r4, r0, #0 - beq _0224AC28 - bl ov95_0224B050 - add r0, r4, #0 - bl ov95_0224B194 - ldr r0, [r4, #0x30] - cmp r0, #0 - beq _0224AC0E - bl ov95_0224B308 -_0224AC0E: - ldr r0, [r4, #0x34] - cmp r0, #0 - beq _0224AC18 - bl ov95_0224B258 -_0224AC18: - ldr r0, [r4, #0x38] - cmp r0, #0 - beq _0224AC22 - bl ov95_0224B3BC -_0224AC22: - add r0, r4, #0 - bl sub_020181C4 -_0224AC28: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224ABF4 - - thumb_func_start ov95_0224AC2C -ov95_0224AC2C: ; 0x0224AC2C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #3 - bhs _0224AC5A - lsl r3, r2, #2 - ldr r2, _0224AC60 ; =0x0224C190 - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _0224AC50 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_0224AC50: - add r0, r5, #0 - bl ov95_0224AC64 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224AC5A: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_0224AC60: .word 0x0224C190 - thumb_func_end ov95_0224AC2C - - thumb_func_start ov95_0224AC64 -ov95_0224AC64: ; 0x0224AC64 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224AC96 - mov r0, #0x2a - ldrsh r1, [r4, r0] - mov r0, #1 - lsl r0, r0, #0xc - add r0, r1, r0 - strh r0, [r4, #0x2a] - add r1, r4, #0 - ldr r0, [r4, #0x24] - add r1, #0x28 - bl ov95_02247990 - bl sub_020BFAB8 - ldr r0, [r4, #0x20] - bl ov95_02247770 - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC -_0224AC96: - pop {r4, pc} - thumb_func_end ov95_0224AC64 - - thumb_func_start ov95_0224AC98 -ov95_0224AC98: ; 0x0224AC98 - push {r3, r4, lr} - sub sp, #0xc - add r4, r0, #0 - bl ov95_0224AE1C - add r0, r4, #0 - bl ov95_0224B084 - mov r0, #8 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - ldr r3, _0224ACC4 ; =0x00007FFF - mov r0, #0 - add r2, r1, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0xc - pop {r3, r4, pc} - ; .align 2, 0 -_0224ACC4: .word 0x00007FFF - thumb_func_end ov95_0224AC98 - - thumb_func_start ov95_0224ACC8 -ov95_0224ACC8: ; 0x0224ACC8 - push {r3, r4, r5, lr} - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #6 - bhi _0224AD92 - add r2, r1, r1 - add r2, pc - ldrh r2, [r2, #6] - lsl r2, r2, #0x10 - asr r2, r2, #0x10 - add pc, r2 -_0224ACE0: ; jump table - .short _0224ACEE - _0224ACE0 - 2 ; case 0 - .short _0224AD0C - _0224ACE0 - 2 ; case 1 - .short _0224AD26 - _0224ACE0 - 2 ; case 2 - .short _0224AD38 - _0224ACE0 - 2 ; case 3 - .short _0224AD50 - _0224ACE0 - 2 ; case 4 - .short _0224AD74 - _0224ACE0 - 2 ; case 5 - .short _0224AD88 - _0224ACE0 - 2 ; case 6 -_0224ACEE: - bl sub_0200F2AC - cmp r0, #0 - beq _0224AD92 - mov r0, #0 - str r0, [r4, #8] - add r0, r4, #0 - add r4, #0x30 - add r1, r4, #0 - bl ov95_0224B274 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224AD92 -_0224AD0C: - ldr r1, [r4, #8] - add r1, r1, #1 - str r1, [r4, #8] - cmp r1, #8 - ble _0224AD92 - add r4, #0x34 - add r1, r4, #0 - bl ov95_0224B1A8 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224AD92 -_0224AD26: - ldr r0, [r4, #0x34] - cmp r0, #0 - bne _0224AD92 - ldr r0, [r4, #0x30] - cmp r0, #0 - bne _0224AD92 - add r0, r1, #1 - str r0, [r5, #0] - b _0224AD92 -_0224AD38: - mov r1, #0 - add r0, #0x14 - mvn r1, r1 - bl ov95_02246F30 - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224AD92 -_0224AD50: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x1e - ble _0224AD92 - add r0, r4, #0 - add r0, #0x38 - str r0, [sp] - ldr r0, [r4, #0x24] - mov r1, #0x1f - mov r2, #0 - mov r3, #0x28 - bl ov95_0224B324 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224AD92 -_0224AD74: - ldr r0, [r4, #0x38] - cmp r0, #0 - bne _0224AD92 - ldr r0, [r4, #0x10] - bl ov95_02247004 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224AD92 -_0224AD88: - ldr r0, [r4, #0x14] - cmp r0, #0 - bne _0224AD92 - mov r0, #1 - pop {r3, r4, r5, pc} -_0224AD92: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224ACC8 - - thumb_func_start ov95_0224AD98 -ov95_0224AD98: ; 0x0224AD98 - push {r4, r5, lr} - sub sp, #0xc - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #0] - cmp r0, #0 - beq _0224ADB0 - cmp r0, #1 - beq _0224ADD8 - cmp r0, #2 - beq _0224AE02 - b _0224AE16 -_0224ADB0: - mov r0, #0x4a - lsl r0, r0, #2 - mov r3, #1 - str r0, [sp] - add r0, r5, #0 - str r3, [sp, #4] - add r0, #0x1c - str r0, [sp, #8] - ldr r0, [r5, #0xc] - lsl r1, r3, #0xc - lsl r2, r3, #0xa - bl ov95_022472C4 - str r0, [r5, #0x18] - mov r0, #0 - str r0, [r5, #8] - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224AE16 -_0224ADD8: - ldr r0, [r5, #8] - add r0, r0, #1 - str r0, [r5, #8] - cmp r0, #0xd - ble _0224AE16 - mov r0, #8 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0 - add r1, r0, #0 - add r2, r0, #0 - add r3, r0, #0 - bl sub_0200F174 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - b _0224AE16 -_0224AE02: - bl sub_0200F2AC - cmp r0, #0 - beq _0224AE16 - ldr r0, [r5, #0x1c] - cmp r0, #0 - beq _0224AE16 - add sp, #0xc - mov r0, #1 - pop {r4, r5, pc} -_0224AE16: - mov r0, #0 - add sp, #0xc - pop {r4, r5, pc} - thumb_func_end ov95_0224AD98 - - thumb_func_start ov95_0224AE1C -ov95_0224AE1C: ; 0x0224AE1C - push {r3, r4, r5, lr} - sub sp, #0x10 - add r4, r0, #0 - ldr r0, _0224B034 ; =0x0224C1F4 - bl sub_0201FE94 - ldr r2, _0224B038 ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - ldr r0, _0224B03C ; =0x0224C19C - bl sub_02018368 - ldr r0, [r4, #0xc] - ldr r2, _0224B040 ; =0x0224C1BC - mov r1, #2 - mov r3, #1 - bl sub_020183C4 - ldr r0, [r4, #0xc] - ldr r2, _0224B040 ; =0x0224C1BC - mov r1, #6 - mov r3, #1 - bl sub_020183C4 - bl sub_020C3D98 - add r5, r0, #0 - ldr r0, [r4, #0xc] - ldr r2, _0224B044 ; =0x0224C1D8 - mov r1, #3 - mov r3, #2 - bl sub_020183C4 - ldr r0, [r4, #0xc] - ldr r2, _0224B044 ; =0x0224C1D8 - mov r1, #7 - mov r3, #2 - bl sub_020183C4 - add r0, r5, #0 - bl sub_020C3DAC - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - mov r1, #2 - ldr r2, [r4, #0xc] - mov r0, #0x5d - add r3, r1, #0 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #2 - mov r3, #6 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r3, #2 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r1, #1 - str r1, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r3, #6 - bl sub_02006E60 - ldr r0, [r4, #0] - bl ov95_02247644 - add r5, r0, #0 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #3 - add r3, r2, #0 - bl sub_02006E84 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #3 - mov r2, #4 - mov r3, #0 - bl sub_02006E84 - ldr r0, _0224B048 ; =0x0224C188 - lsl r1, r5, #1 - ldrh r5, [r0, r1] - mov r0, #0x20 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - mov r1, #3 - mov r2, #0 - add r3, r5, #0 - bl sub_02006E9C - mov r0, #0x20 - str r0, [sp] - mov r0, #0x40 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #0x5d - mov r1, #3 - mov r2, #4 - add r3, r5, #0 - bl sub_02006E9C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #5 - mov r3, #3 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #5 - mov r3, #7 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #4 - mov r3, #3 - bl sub_02006E60 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0xc] - mov r0, #0x5d - mov r1, #4 - mov r3, #7 - bl sub_02006E60 - mov r0, #0x3a - mov r1, #0x60 - bl sub_02018144 - add r5, r0, #0 - beq _0224AFF2 - mov r0, #0 - add r1, r5, #0 - mov r2, #0x60 - bl sub_020C4B4C - add r0, r5, #0 - mov r1, #0x60 - bl sub_020C2C54 - bl sub_020C096C - bl sub_020C0BBC - mov r1, #6 - add r0, r5, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0A0C - mov r1, #6 - add r0, r5, #0 - lsl r1, r1, #0xc - mov r2, #0x60 - bl sub_020C0BD4 - bl sub_020C0A7C - bl sub_020C0C38 - add r0, r5, #0 - bl sub_020181C4 -_0224AFF2: - ldr r0, [r4, #0xc] - ldr r3, _0224B04C ; =0xFFFFFE80 - mov r1, #2 - mov r2, #3 - bl sub_02019184 - mov r2, #3 - add r3, r2, #0 - ldr r0, [r4, #0xc] - mov r1, #6 - sub r3, #0xc3 - bl sub_02019184 - mov r1, #3 - ldr r0, [r4, #0xc] - add r2, r1, #0 - mov r3, #0x43 - bl sub_02019184 - mov r0, #7 - mov r1, #0 - bl sub_02019120 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - add sp, #0x10 - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224B034: .word 0x0224C1F4 -_0224B038: .word 0x04000304 -_0224B03C: .word 0x0224C19C -_0224B040: .word 0x0224C1BC -_0224B044: .word 0x0224C1D8 -_0224B048: .word 0x0224C188 -_0224B04C: .word 0xFFFFFE80 - thumb_func_end ov95_0224AE1C - - thumb_func_start ov95_0224B050 -ov95_0224B050: ; 0x0224B050 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0224B060 - ldr r0, [r4, #0x10] - bl ov95_02247018 -_0224B060: - ldr r0, [r4, #0xc] - mov r1, #2 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #6 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #3 - bl sub_02019044 - ldr r0, [r4, #0xc] - mov r1, #7 - bl sub_02019044 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B050 - - thumb_func_start ov95_0224B084 -ov95_0224B084: ; 0x0224B084 - push {r4, lr} - sub sp, #0x10 - add r4, r0, #0 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _0224B168 ; =0x04000060 - ldr r1, _0224B16C ; =0xFFFFCFFD - ldrh r2, [r0] - and r2, r1 - strh r2, [r0] - ldrh r3, [r0] - add r2, r1, #2 - and r3, r2 - mov r2, #0x10 - orr r2, r3 - strh r2, [r0] - ldrh r3, [r0] - ldr r2, _0224B170 ; =0x0000CFFB - and r2, r3 - strh r2, [r0] - add r2, r1, #2 - ldrh r3, [r0] - add r1, r1, #2 - and r3, r2 - mov r2, #8 - orr r2, r3 - strh r2, [r0] - ldrh r2, [r0] - and r2, r1 - mov r1, #0x20 - orr r1, r2 - strh r1, [r0] - ldr r0, _0224B174 ; =0x0224C1AC - bl sub_020BFD2C - mov r1, #0 - ldr r0, _0224B178 ; =0x000043FF - ldr r2, _0224B17C ; =0x00007FFF - mov r3, #0x3f - str r1, [sp] - bl sub_020BFD58 - ldr r1, _0224B180 ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _0224B184 ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r1, _0224B188 ; =0x04000008 - mov r0, #3 - ldrh r2, [r1] - bic r2, r0 - strh r2, [r1] - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - add r3, r1, #0 - bl ov95_022476F0 - str r0, [r4, #0x20] - mov r1, #0 - mov r0, #0x23 - str r1, [sp] - lsl r0, r0, #0xe - str r0, [sp, #4] - str r1, [sp, #8] - mov r0, #1 - str r0, [sp, #0xc] - ldr r0, [r4, #0x20] - mov r2, #0x5d - mov r3, #0x1b - bl ov95_022478B4 - str r0, [r4, #0x24] - ldr r0, _0224B18C ; =0x0224C370 - mov r1, #0 - strh r1, [r0] - strh r1, [r0, #2] - strh r1, [r0, #4] - ldr r0, [r4, #0x20] - ldr r1, _0224B190 ; =0x0224C370 - bl ov95_02247AB0 - ldr r0, [r4, #0x20] - mov r1, #1 - bl ov95_02247AD0 - mov r1, #2 - ldr r0, [r4, #0x24] - lsl r1, r1, #0xc - bl ov95_022479D4 - ldr r0, [r4, #0x24] - add r4, #0x28 - add r1, r4, #0 - bl ov95_02247978 - add sp, #0x10 - pop {r4, pc} - nop -_0224B168: .word 0x04000060 -_0224B16C: .word 0xFFFFCFFD -_0224B170: .word 0x0000CFFB -_0224B174: .word 0x0224C1AC -_0224B178: .word 0x000043FF -_0224B17C: .word 0x00007FFF -_0224B180: .word 0x04000540 -_0224B184: .word 0xBFFF0000 -_0224B188: .word 0x04000008 -_0224B18C: .word 0x0224C370 -_0224B190: .word 0x0224C370 - thumb_func_end ov95_0224B084 - - thumb_func_start ov95_0224B194 -ov95_0224B194: ; 0x0224B194 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224B1A6 - bl ov95_0224773C - mov r0, #0 - str r0, [r4, #0x20] -_0224B1A6: - pop {r4, pc} - thumb_func_end ov95_0224B194 - - thumb_func_start ov95_0224B1A8 -ov95_0224B1A8: ; 0x0224B1A8 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #0x3a - mov r1, #0x24 - bl sub_02018144 - add r4, r0, #0 - beq _0224B1E8 - str r6, [r4, #0] - ldr r0, [r6, #0xc] - add r1, r4, #0 - str r0, [r4, #4] - ldr r0, _0224B1EC ; =0xFFE80000 - mov r2, #0 - str r0, [r4, #0xc] - asr r0, r0, #1 - str r0, [r4, #0x10] - ldr r0, _0224B1F0 ; =0x00009999 - str r0, [r4, #0x14] - mov r0, #0x28 - str r0, [r4, #8] - ldr r0, _0224B1F4 ; =ov95_0224B1F8 - str r5, [r4, #0x1c] - bl sub_0200DA04 - str r0, [r5, #0] - cmp r0, #0 - bne _0224B1E8 - add r0, r4, #0 - bl sub_020181C4 -_0224B1E8: - pop {r4, r5, r6, pc} - nop -_0224B1EC: .word 0xFFE80000 -_0224B1F0: .word 0x00009999 -_0224B1F4: .word ov95_0224B1F8 - thumb_func_end ov95_0224B1A8 - - thumb_func_start ov95_0224B1F8 -ov95_0224B1F8: ; 0x0224B1F8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #8] - cmp r0, #0 - beq _0224B238 - ldr r1, [r4, #0xc] - ldr r0, [r4, #0x14] - mov r2, #3 - add r0, r1, r0 - str r0, [r4, #0xc] - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x14] - add r0, r1, r0 - str r0, [r4, #0x10] - ldr r3, [r4, #0xc] - ldr r0, [r4, #4] - mov r1, #2 - asr r3, r3, #0xc - bl sub_02019184 - ldr r3, [r4, #0x10] - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #3 - asr r3, r3, #0xc - bl sub_02019184 - ldr r0, [r4, #8] - sub r0, r0, #1 - str r0, [r4, #8] - pop {r3, r4, r5, pc} -_0224B238: - ldr r0, [r4, #4] - mov r1, #2 - mov r2, #3 - mov r3, #0 - bl sub_02019184 - ldr r0, [r4, #4] - mov r1, #6 - mov r2, #3 - mov r3, #0xc0 - bl sub_02019184 - add r0, r5, #0 - bl ov95_0224B258 - pop {r3, r4, r5, pc} - thumb_func_end ov95_0224B1F8 - - thumb_func_start ov95_0224B258 -ov95_0224B258: ; 0x0224B258 - push {r4, lr} - add r4, r0, #0 - beq _0224B272 - bl sub_0201CED0 - ldr r1, [r0, #0x1c] - mov r2, #0 - str r2, [r1, #0] - bl ov95_022476C8 - add r0, r4, #0 - bl sub_0200DA58 -_0224B272: - pop {r4, pc} - thumb_func_end ov95_0224B258 - - thumb_func_start ov95_0224B274 -ov95_0224B274: ; 0x0224B274 - push {r4, r5, r6, lr} - add r6, r0, #0 - add r5, r1, #0 - mov r0, #0x3a - mov r1, #0x1c - bl sub_02018144 - add r4, r0, #0 - beq _0224B2C0 - str r5, [r4, #0] - ldr r0, [r6, #0x24] - add r1, r4, #0 - str r0, [r4, #8] - add r1, #0xc - bl ov95_02247958 - mov r0, #0x32 - ldr r1, [r4, #0x10] - lsl r0, r0, #0xc - sub r1, r0, r1 - asr r0, r1, #3 - lsr r0, r0, #0x1c - add r0, r1, r0 - asr r0, r0, #4 - str r0, [r4, #0x18] - mov r0, #0x10 - str r0, [r4, #4] - ldr r0, _0224B2C4 ; =ov95_0224B2C8 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r5, #0] - cmp r0, #0 - bne _0224B2C0 - add r0, r4, #0 - bl sub_020181C4 -_0224B2C0: - pop {r4, r5, r6, pc} - nop -_0224B2C4: .word ov95_0224B2C8 - thumb_func_end ov95_0224B274 - - thumb_func_start ov95_0224B2C8 -ov95_0224B2C8: ; 0x0224B2C8 - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - ldr r0, [r4, #4] - cmp r0, #0 - beq _0224B2EE - ldr r1, [r4, #0x10] - ldr r0, [r4, #0x18] - add r0, r1, r0 - str r0, [r4, #0x10] - add r1, r4, #0 - ldr r0, [r4, #8] - add r1, #0xc - bl ov95_02247968 - ldr r0, [r4, #4] - sub r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0224B2EE: - mov r0, #0x32 - lsl r0, r0, #0xc - str r0, [r4, #0x10] - ldr r0, [r4, #8] - add r4, #0xc - add r1, r4, #0 - bl ov95_02247968 - add r0, r5, #0 - bl ov95_0224B308 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B2C8 - - thumb_func_start ov95_0224B308 -ov95_0224B308: ; 0x0224B308 - push {r4, lr} - add r4, r0, #0 - beq _0224B322 - bl sub_0201CED0 - ldr r1, [r0, #0] - mov r2, #0 - str r2, [r1, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224B322: - pop {r4, pc} - thumb_func_end ov95_0224B308 - - thumb_func_start ov95_0224B324 -ov95_0224B324: ; 0x0224B324 - push {r3, r4, r5, r6, r7, lr} - sub sp, #8 - str r0, [sp] - add r6, r1, #0 - mov r0, #0x3a - mov r1, #0x18 - str r2, [sp, #4] - add r7, r3, #0 - ldr r5, [sp, #0x20] - bl sub_02018144 - add r4, r0, #0 - beq _0224B37C - str r5, [r4, #0] - lsl r0, r6, #0xc - str r0, [r4, #4] - ldr r0, [sp, #4] - lsl r1, r0, #0xc - str r1, [r4, #0xc] - ldr r0, [r4, #4] - sub r0, r1, r0 - add r1, r7, #0 - bl sub_020E1F6C - str r0, [r4, #8] - ldr r0, [sp] - str r7, [r4, #0x10] - add r1, r6, #0 - str r0, [r4, #0x14] - bl ov95_022479AC - ldr r0, _0224B384 ; =ov95_0224B388 - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r5, #0] - cmp r0, #0 - bne _0224B380 - add r0, r4, #0 - bl sub_020181C4 - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} -_0224B37C: - mov r0, #0 - str r0, [r5, #0] -_0224B380: - add sp, #8 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B384: .word ov95_0224B388 - thumb_func_end ov95_0224B324 - - thumb_func_start ov95_0224B388 -ov95_0224B388: ; 0x0224B388 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0x10] - sub r0, r0, #1 - str r0, [r1, #0x10] - cmp r0, #0 - ble _0224B3A8 - ldr r2, [r1, #4] - ldr r0, [r1, #8] - add r2, r2, r0 - str r2, [r1, #4] - ldr r0, [r1, #0x14] - asr r1, r2, #0xc - bl ov95_022479AC - pop {r4, pc} -_0224B3A8: - ldr r0, [r1, #0x14] - ldr r1, [r1, #0xc] - asr r1, r1, #0xc - bl ov95_022479AC - add r0, r4, #0 - bl ov95_0224B3BC - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B388 - - thumb_func_start ov95_0224B3BC -ov95_0224B3BC: ; 0x0224B3BC - push {r4, lr} - add r4, r0, #0 - beq _0224B3D6 - bl sub_0201CED0 - ldr r1, [r0, #0] - mov r2, #0 - str r2, [r1, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224B3D6: - pop {r4, pc} - thumb_func_end ov95_0224B3BC - - thumb_func_start ov95_0224B3D8 -ov95_0224B3D8: ; 0x0224B3D8 - push {r3, r4, r5, lr} - add r5, r0, #0 - mov r0, #0x3a - mov r1, #0x88 - bl sub_02018144 - add r4, r0, #0 - beq _0224B434 - str r5, [r4, #0] - mov r0, #0 - str r0, [r4, #4] - add r0, r5, #0 - bl ov95_02247628 - str r0, [r4, #0x58] - mov r0, #0x3a - bl sub_0200762C - str r0, [r4, #0x10] - mov r0, #0 - str r0, [r4, #0x14] - mov r0, #0x4b - lsl r0, r0, #2 - mov r1, #0x3a - bl sub_02023790 - str r0, [r4, #0x6c] - mov r0, #0x4b - lsl r0, r0, #2 - mov r1, #0x3a - bl sub_02023790 - str r0, [r4, #0x70] - mov r1, #0 - add r0, r4, #0 - str r1, [r4, #0x7c] - add r0, #0x80 - str r1, [r0, #0] - str r1, [r4, #0x74] - mov r0, #0x93 - mov r1, #0x3a - bl sub_02006C24 - add r1, r4, #0 - add r1, #0x84 - str r0, [r1, #0] -_0224B434: - add r0, r4, #0 - pop {r3, r4, r5, pc} - thumb_func_end ov95_0224B3D8 - - thumb_func_start ov95_0224B438 -ov95_0224B438: ; 0x0224B438 - push {r4, lr} - add r4, r0, #0 - beq _0224B498 - bl ov95_0224BC10 - add r0, r4, #0 - bl ov95_0224BB8C - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - bl ov95_0224BCE8 - ldr r0, [r4, #0x6c] - bl sub_020237BC - ldr r0, [r4, #0x70] - bl sub_020237BC - ldr r0, [r4, #0x74] - cmp r0, #0 - beq _0224B468 - bl ov95_0224773C -_0224B468: - ldr r0, [r4, #0x58] - mov r1, #1 - bl sub_02019044 - add r0, r4, #0 - add r0, #0x5c - bl sub_0201A8FC - ldr r0, [r4, #0x14] - cmp r0, #0 - beq _0224B482 - bl sub_02007DC8 -_0224B482: - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - bl sub_02006CA8 - ldr r0, [r4, #0x10] - bl sub_02007B6C - add r0, r4, #0 - bl sub_020181C4 -_0224B498: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B438 - - thumb_func_start ov95_0224B49C -ov95_0224B49C: ; 0x0224B49C - push {r3, r4, r5, lr} - add r4, r1, #0 - ldr r2, [r4, #0] - add r5, r0, #0 - cmp r2, #4 - bhs _0224B4CA - lsl r3, r2, #2 - ldr r2, _0224B4D0 ; =0x0224C224 - add r1, r5, #4 - ldr r2, [r2, r3] - blx r2 - cmp r0, #0 - beq _0224B4C0 - ldr r0, [r4, #0] - add r0, r0, #1 - str r0, [r4, #0] - mov r0, #0 - str r0, [r5, #4] -_0224B4C0: - add r0, r5, #0 - bl ov95_0224B4D4 - mov r0, #0 - pop {r3, r4, r5, pc} -_0224B4CA: - mov r0, #1 - pop {r3, r4, r5, pc} - nop -_0224B4D0: .word 0x0224C224 - thumb_func_end ov95_0224B49C - - thumb_func_start ov95_0224B4D4 -ov95_0224B4D4: ; 0x0224B4D4 - push {r3, r4, lr} - sub sp, #4 - add r4, r0, #0 - bl sub_020BFAB8 - mov r1, #0 - mov r0, #0x11 - add r2, r1, #0 - bl sub_020B275C - bl sub_020B2628 - bl sub_020A73C0 - ldr r0, [r4, #0x10] - bl sub_02008A94 - ldr r0, [r4, #0x10] - bl sub_02007768 - mov r2, #1 - str r2, [sp] - mov r0, #0x12 - add r1, sp, #0 - bl sub_020B275C - ldr r0, [r4, #0x74] - cmp r0, #0 - beq _0224B512 - bl ov95_02247770 -_0224B512: - mov r0, #0 - add r1, r0, #0 - bl sub_020241BC - add sp, #4 - pop {r3, r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B4D4 - - thumb_func_start ov95_0224B520 -ov95_0224B520: ; 0x0224B520 - push {r3, r4, lr} - sub sp, #0x1c - add r4, r0, #0 - ldr r0, _0224B6D0 ; =0x0224C27C - bl sub_0201FE94 - ldr r2, _0224B6D4 ; =0x04000304 - ldrh r1, [r2] - lsr r0, r2, #0xb - orr r0, r1 - strh r0, [r2] - ldr r0, _0224B6D8 ; =0x0224C234 - bl sub_02018368 - ldr r0, [r4, #0x58] - ldr r2, _0224B6DC ; =0x0224C244 - mov r1, #1 - mov r3, #0 - bl sub_020183C4 - ldr r0, [r4, #0x58] - ldr r2, _0224B6E0 ; =0x0224C260 - mov r1, #2 - mov r3, #0 - bl sub_020183C4 - mov r0, #1 - add r1, r0, #0 - bl sub_0201FF0C - ldr r2, _0224B6E4 ; =0x04000008 - mov r0, #3 - ldrh r3, [r2] - mov r1, #1 - bic r3, r0 - add r0, r3, #0 - orr r0, r1 - strh r0, [r2] - mov r2, #0 - str r2, [sp] - ldr r0, [r4, #0x58] - add r3, r1, #0 - bl sub_020196C0 - mov r2, #0 - str r2, [sp] - mov r0, #0x20 - str r0, [sp, #4] - str r0, [sp, #8] - str r2, [sp, #0xc] - ldr r0, [r4, #0x58] - mov r1, #1 - add r3, r2, #0 - bl sub_02019CB8 - ldr r0, [r4, #0] - bl ov95_02247674 - lsl r0, r0, #0x18 - lsr r0, r0, #0x18 - str r0, [sp] - mov r0, #0x3a - str r0, [sp, #4] - ldr r0, [r4, #0x58] - mov r1, #1 - mov r2, #0x6d - mov r3, #2 - bl sub_0200DD0C - mov r0, #0x13 - str r0, [sp] - mov r0, #0x1b - str r0, [sp, #4] - mov r0, #4 - add r1, r4, #0 - str r0, [sp, #8] - mov r2, #1 - str r2, [sp, #0xc] - str r2, [sp, #0x10] - ldr r0, [r4, #0x58] - add r1, #0x5c - mov r3, #2 - bl sub_0201A7E8 - add r0, r4, #0 - add r0, #0x5c - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0x20 - str r3, [sp] - mov r0, #0x3a - str r0, [sp, #4] - mov r0, #0xe - mov r1, #7 - mov r2, #0 - bl sub_02006E84 - ldr r0, [r4, #0x58] - mov r1, #1 - bl sub_02019448 - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x58] - mov r0, #0x5d - mov r1, #0x16 - mov r3, #2 - bl sub_02006E3C - mov r0, #0 - str r0, [sp] - str r0, [sp, #4] - mov r0, #1 - str r0, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - ldr r2, [r4, #0x58] - mov r0, #0x5d - mov r1, #0x15 - mov r3, #2 - bl sub_02006E60 - mov r0, #0x20 - str r0, [sp] - mov r0, #0x3a - mov r2, #0 - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0x17 - add r3, r2, #0 - bl sub_02006E84 - add r0, r4, #0 - bl ov95_0224B9C0 - mov r1, #0 - mov r0, #1 - add r2, r1, #0 - add r3, r1, #0 - bl ov95_022476F0 - str r0, [r4, #0x74] - add r0, r4, #0 - bl ov95_0224BA8C - mov r1, #6 - mov r2, #1 - str r0, [r4, #0x14] - bl sub_02007DEC - mov r1, #0 - mov r0, #0x13 - str r1, [sp] - lsl r0, r0, #0xc - str r0, [sp, #4] - mov r0, #0x1e - lsl r0, r0, #0xe - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r4, #0x74] - mov r2, #0x5d - mov r3, #0x1b - bl ov95_022478B4 - ldr r2, _0224B6E8 ; =0x0224C21C - str r0, [r4, #0x78] - ldrh r3, [r2] - add r0, sp, #0x14 - add r1, sp, #0x14 - strh r3, [r0] - ldrh r3, [r2, #2] - ldrh r2, [r2, #4] - strh r3, [r0, #2] - strh r2, [r0, #4] - ldr r0, [r4, #0x78] - bl ov95_02247990 - add r0, r4, #0 - bl ov95_0224BAE8 - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF0C - mov r0, #0x10 - mov r1, #1 - bl sub_0201FF74 - mov r0, #0 - str r0, [sp] - ldr r0, _0224B6EC ; =0x04000050 - mov r1, #1 - mov r2, #4 - mov r3, #0x10 - bl sub_020BF55C - mov r0, #0x10 - str r0, [sp] - mov r1, #1 - str r1, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - mov r3, #0 - bl sub_0200F174 - mov r0, #1 - add sp, #0x1c - pop {r3, r4, pc} - ; .align 2, 0 -_0224B6D0: .word 0x0224C27C -_0224B6D4: .word 0x04000304 -_0224B6D8: .word 0x0224C234 -_0224B6DC: .word 0x0224C244 -_0224B6E0: .word 0x0224C260 -_0224B6E4: .word 0x04000008 -_0224B6E8: .word 0x0224C21C -_0224B6EC: .word 0x04000050 - thumb_func_end ov95_0224B520 - - thumb_func_start ov95_0224B6F0 -ov95_0224B6F0: ; 0x0224B6F0 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r1, #0] - cmp r0, #0 - bne _0224B716 - bl sub_0200F2AC - cmp r0, #0 - beq _0224B716 - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02021D6C - ldr r0, [r4, #0x40] - mov r1, #1 - bl sub_02021CAC - mov r0, #1 - pop {r4, pc} -_0224B716: - mov r0, #0 - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B6F0 - - thumb_func_start ov95_0224B71C -ov95_0224B71C: ; 0x0224B71C - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #4 - bhi _0224B816 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224B736: ; jump table - .short _0224B740 - _0224B736 - 2 ; case 0 - .short _0224B74E - _0224B736 - 2 ; case 1 - .short _0224B77C - _0224B736 - 2 ; case 2 - .short _0224B7A4 - _0224B736 - 2 ; case 3 - .short _0224B806 - _0224B736 - 2 ; case 4 -_0224B740: - add r1, r4, #0 - add r1, #0x80 - bl ov95_0224BC6C - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] -_0224B74E: - add r0, r4, #0 - add r0, #0x80 - ldr r0, [r0, #0] - cmp r0, #0 - bne _0224B816 - ldr r0, [r4, #0x44] - mov r1, #2 - bl sub_02021D6C - ldr r0, [r4, #0x44] - mov r1, #1 - bl sub_02021CAC - ldr r0, [r4, #0x78] - mov r1, #0 - bl ov95_022479A8 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224B816 -_0224B77C: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0xa - ble _0224B816 - ldr r0, [r4, #0x14] - mov r1, #6 - mov r2, #0 - bl sub_02007DEC - add r0, r4, #0 - mov r1, #0x10 - mov r2, #0 - mov r3, #0xc - bl ov95_0224BBB0 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - b _0224B816 -_0224B7A4: - bl ov95_0224BC00 - cmp r0, #0 - beq _0224B816 - ldr r0, [r4, #0] - bl ov95_0224763C - mov r1, #0x4c - mov r2, #0 - bl sub_02074570 - cmp r0, #0 - bne _0224B7FA - ldr r0, [r4, #0] - bl ov95_02247660 - add r2, r0, #0 - add r0, r4, #0 - add r0, #0x84 - ldr r0, [r0, #0] - add r1, sp, #0 - mov r3, #1 - bl sub_02078A4C - ldr r0, [r4, #0] - bl ov95_02247660 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov95_02247668 - add r2, r0, #0 - add r1, sp, #0 - lsl r2, r2, #0x18 - ldrb r1, [r1] - add r0, r6, #0 - lsr r2, r2, #0x18 - bl sub_0200590C - ldr r0, [r4, #0x14] - mov r1, #1 - bl sub_02007B98 -_0224B7FA: - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224B816 -_0224B806: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0x1e - ble _0224B816 - add sp, #4 - mov r0, #1 - pop {r3, r4, r5, r6, pc} -_0224B816: - mov r0, #0 - add sp, #4 - pop {r3, r4, r5, r6, pc} - thumb_func_end ov95_0224B71C - - thumb_func_start ov95_0224B81C -ov95_0224B81C: ; 0x0224B81C - push {r3, r4, r5, r6, r7, lr} - sub sp, #0x10 - add r5, r1, #0 - ldr r1, [r5, #0] - add r4, r0, #0 - cmp r1, #5 - bhi _0224B858 - add r1, r1, r1 - add r1, pc - ldrh r1, [r1, #6] - lsl r1, r1, #0x10 - asr r1, r1, #0x10 - add pc, r1 -_0224B836: ; jump table - .short _0224B842 - _0224B836 - 2 ; case 0 - .short _0224B84E - _0224B836 - 2 ; case 1 - .short _0224B8CC - _0224B836 - 2 ; case 2 - .short _0224B92E - _0224B836 - 2 ; case 3 - .short _0224B94E - _0224B836 - 2 ; case 4 - .short _0224B978 - _0224B836 - 2 ; case 5 -_0224B842: - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224B986 -_0224B84E: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0xa - bgt _0224B85A -_0224B858: - b _0224B986 -_0224B85A: - ldr r0, [r4, #0] - bl ov95_02247630 - str r0, [sp, #0xc] - ldr r0, [r4, #0] - bl ov95_0224762C - add r7, r0, #0 - ldr r0, [r4, #0] - bl ov95_02247680 - cmp r0, #1 - bne _0224B87A - mov r1, #2 - add r6, r1, #0 - b _0224B87E -_0224B87A: - mov r1, #5 - mov r6, #3 -_0224B87E: - ldr r0, [sp, #0xc] - ldr r2, [r4, #0x6c] - bl sub_0200B1B8 - ldr r1, [r4, #0x70] - ldr r2, [r4, #0x6c] - add r0, r7, #0 - bl sub_0200C388 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x70] - add r0, #0x5c - mov r1, #1 - bl sub_0201D738 - add r0, r4, #0 - add r0, #0x5c - mov r1, #0x6d - mov r2, #2 - bl sub_0200E010 - add r0, r4, #0 - add r0, #0x5c - bl sub_0201A954 - ldr r0, _0224B98C ; =0x00000484 - bl sub_02006150 - mov r0, #0 - str r0, [r4, #8] - mov r0, #1 - str r0, [r4, #0xc] - str r6, [r5, #0] - b _0224B986 -_0224B8CC: - mov r1, #0x3c - bl ov95_0224B990 - cmp r0, #0 - beq _0224B986 - ldr r0, [r4, #0] - bl ov95_02247630 - add r6, r0, #0 - ldr r0, [r4, #0] - bl ov95_0224762C - add r7, r0, #0 - ldr r2, [r4, #0x6c] - add r0, r6, #0 - mov r1, #3 - bl sub_0200B1B8 - ldr r1, [r4, #0x70] - ldr r2, [r4, #0x6c] - add r0, r7, #0 - bl sub_0200C388 - add r0, r4, #0 - add r0, #0x5c - mov r1, #0xf - bl sub_0201ADA4 - mov r3, #0 - str r3, [sp] - mov r0, #0xff - str r0, [sp, #4] - str r3, [sp, #8] - add r0, r4, #0 - ldr r2, [r4, #0x70] - add r0, #0x5c - mov r1, #1 - bl sub_0201D738 - add r0, r4, #0 - add r0, #0x5c - bl sub_0201ACCC - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224B986 -_0224B92E: - mov r1, #0x3c - bl ov95_0224B990 - cmp r0, #0 - beq _0224B986 - add r0, r4, #0 - add r0, #0x5c - mov r1, #0 - bl sub_0200E084 - mov r0, #0 - str r0, [r4, #8] - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224B986 -_0224B94E: - ldr r0, [r4, #8] - add r0, r0, #1 - str r0, [r4, #8] - cmp r0, #0xa - ble _0224B986 - mov r0, #0x10 - str r0, [sp] - mov r1, #0 - mov r0, #1 - str r0, [sp, #4] - mov r0, #0x3a - str r0, [sp, #8] - mov r0, #3 - add r2, r1, #0 - add r3, r1, #0 - bl sub_0200F174 - ldr r0, [r5, #0] - add r0, r0, #1 - str r0, [r5, #0] - b _0224B986 -_0224B978: - bl sub_0200F2AC - cmp r0, #0 - beq _0224B986 - add sp, #0x10 - mov r0, #1 - pop {r3, r4, r5, r6, r7, pc} -_0224B986: - mov r0, #0 - add sp, #0x10 - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224B98C: .word 0x00000484 - thumb_func_end ov95_0224B81C - - thumb_func_start ov95_0224B990 -ov95_0224B990: ; 0x0224B990 - push {r3, r4, r5, lr} - add r5, r0, #0 - ldr r0, [r5, #0xc] - add r4, r1, #0 - cmp r0, #0 - beq _0224B9A2 - bl sub_020061E4 - str r0, [r5, #0xc] -_0224B9A2: - ldr r0, [r5, #8] - cmp r0, r4 - bge _0224B9B0 - add r0, r0, #1 - str r0, [r5, #8] - mov r0, #0 - pop {r3, r4, r5, pc} -_0224B9B0: - ldr r0, [r5, #0xc] - cmp r0, #0 - bne _0224B9BA - mov r0, #1 - pop {r3, r4, r5, pc} -_0224B9BA: - mov r0, #0 - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224B990 - - thumb_func_start ov95_0224B9C0 -ov95_0224B9C0: ; 0x0224B9C0 - push {r3, r4, r5, r6, lr} - sub sp, #4 - add r5, r0, #0 - bl sub_020B28CC - bl sub_020BFB4C - ldr r0, _0224BA68 ; =0x04000060 - ldr r2, _0224BA6C ; =0xFFFFCFFD - ldrh r1, [r0] - and r1, r2 - strh r1, [r0] - ldrh r3, [r0] - add r1, r2, #2 - and r3, r1 - mov r1, #0x10 - orr r1, r3 - strh r1, [r0] - ldrh r3, [r0] - ldr r1, _0224BA70 ; =0x0000CFFB - and r1, r3 - strh r1, [r0] - add r1, r2, #2 - ldrh r3, [r0] - lsr r2, r2, #0x11 - and r3, r1 - mov r1, #8 - orr r1, r3 - strh r1, [r0] - mov r0, #0 - add r1, r0, #0 - mov r3, #0x3f - str r0, [sp] - bl sub_020BFD58 - ldr r1, _0224BA74 ; =0x04000540 - mov r0, #2 - str r0, [r1, #0] - ldr r0, _0224BA78 ; =0xBFFF0000 - str r0, [r1, #0x40] - mov r0, #1 - add r1, r0, #0 - bl sub_020A5A94 - mov r0, #1 - lsl r0, r0, #0xe - mov r1, #1 - bl sub_020A5D88 - ldr r3, _0224BA7C ; =0x02100DEC - mov r0, #1 - mov r1, #0 - ldr r3, [r3, #0] - lsl r0, r0, #0xe - add r2, r1, #0 - blx r3 - ldr r3, _0224BA80 ; =0x02100DF4 - add r4, r0, #0 - ldr r3, [r3, #0] - mov r0, #0x80 - mov r1, #0 - mov r2, #1 - blx r3 - ldr r2, _0224BA84 ; =0x7FFF0000 - add r6, r0, #0 - and r2, r4 - lsl r1, r4, #0x10 - lsr r2, r2, #0x10 - ldr r0, [r5, #0x10] - lsr r1, r1, #0xd - lsl r2, r2, #4 - bl sub_02008A78 - ldr r2, _0224BA88 ; =0xFFFF0000 - lsl r1, r6, #0x10 - and r2, r6 - lsr r2, r2, #0x10 - ldr r0, [r5, #0x10] - lsr r1, r1, #0xd - lsl r2, r2, #3 - bl sub_02008A84 - add sp, #4 - pop {r3, r4, r5, r6, pc} - ; .align 2, 0 -_0224BA68: .word 0x04000060 -_0224BA6C: .word 0xFFFFCFFD -_0224BA70: .word 0x0000CFFB -_0224BA74: .word 0x04000540 -_0224BA78: .word 0xBFFF0000 -_0224BA7C: .word 0x02100DEC -_0224BA80: .word 0x02100DF4 -_0224BA84: .word 0x7FFF0000 -_0224BA88: .word 0xFFFF0000 - thumb_func_end ov95_0224B9C0 - - thumb_func_start ov95_0224BA8C -ov95_0224BA8C: ; 0x0224BA8C - push {r3, r4, r5, lr} - sub sp, #0x20 - add r5, r0, #0 - ldr r0, [r5, #0] - bl ov95_0224763C - add r4, r0, #0 - add r0, sp, #0x10 - add r1, r4, #0 - mov r2, #2 - mov r3, #0 - bl sub_02075F0C - ldr r0, [r5, #0] - bl ov95_02247660 - add r2, r0, #0 - add r0, r5, #0 - add r0, #0x84 - add r1, r5, #0 - ldr r0, [r0, #0] - add r1, #0x18 - mov r3, #1 - bl sub_020789BC - add r0, r4, #0 - mov r1, #2 - mov r2, #0 - bl sub_020765C4 - add r3, r0, #0 - mov r1, #0 - str r1, [sp] - add r0, r5, #0 - str r1, [sp, #4] - add r0, #0x18 - str r0, [sp, #8] - str r1, [sp, #0xc] - ldr r0, [r5, #0x10] - add r3, #0x50 - add r1, sp, #0x10 - mov r2, #0x80 - bl sub_02007C34 - add sp, #0x20 - pop {r3, r4, r5, pc} - thumb_func_end ov95_0224BA8C - - thumb_func_start ov95_0224BAE8 -ov95_0224BAE8: ; 0x0224BAE8 - push {r4, lr} - sub sp, #0x70 - add r4, r0, #0 - add r0, #0x48 - mov r1, #0x5d - mov r2, #7 - mov r3, #8 - bl ov95_02247568 - add r0, sp, #0x5c - bl sub_020A81D0 - add r0, sp, #0x38 - bl sub_020A818C - mov r3, #0 - str r3, [sp] - mov r2, #1 - str r2, [sp, #4] - str r3, [sp, #8] - mov r0, #0x3a - str r0, [sp, #0xc] - add r0, sp, #0x38 - str r0, [sp, #0x10] - mov r0, #0x5d - mov r1, #9 - bl sub_02006F00 - mov r0, #0x3a - str r0, [sp] - add r0, sp, #0x5c - str r0, [sp, #4] - mov r0, #0x5d - mov r1, #0xa - mov r2, #1 - mov r3, #0 - bl sub_02006EE0 - mov r0, #2 - add r1, r4, #0 - str r0, [sp] - add r0, sp, #0x14 - add r1, #0x48 - add r2, sp, #0x38 - add r3, sp, #0x5c - bl ov95_022475C4 - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r2, #0x80 - mov r3, #0x64 - bl ov95_022475E4 - str r0, [r4, #0x40] - mov r0, #0 - str r0, [sp] - mov r0, #1 - str r0, [sp, #4] - ldr r0, [r4, #0] - add r1, sp, #0x14 - mov r2, #0x80 - mov r3, #0x5a - bl ov95_022475E4 - str r0, [r4, #0x44] - mov r1, #1 - bl sub_02021E80 - ldr r0, [r4, #0x40] - mov r1, #0 - bl sub_02021CAC - ldr r0, [r4, #0x44] - mov r1, #0 - bl sub_02021CAC - add sp, #0x70 - pop {r4, pc} - thumb_func_end ov95_0224BAE8 - - thumb_func_start ov95_0224BB8C -ov95_0224BB8C: ; 0x0224BB8C - push {r4, r5, r6, lr} - add r6, r0, #0 - mov r4, #0 - add r5, r6, #0 -_0224BB94: - ldr r0, [r5, #0x40] - cmp r0, #0 - beq _0224BB9E - bl sub_02021BD4 -_0224BB9E: - add r4, r4, #1 - add r5, r5, #4 - cmp r4, #2 - blt _0224BB94 - add r6, #0x48 - add r0, r6, #0 - bl ov95_022475A0 - pop {r4, r5, r6, pc} - thumb_func_end ov95_0224BB8C - - thumb_func_start ov95_0224BBB0 -ov95_0224BBB0: ; 0x0224BBB0 - push {r3, r4, r5, r6, r7, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x3a - mov r1, #0x14 - str r2, [sp] - add r7, r3, #0 - bl sub_02018144 - add r4, r0, #0 - beq _0224BBF6 - str r5, [r4, #0] - lsl r0, r6, #0xc - str r0, [r4, #4] - ldr r0, [sp] - lsl r1, r0, #0xc - str r1, [r4, #8] - ldr r0, [r4, #4] - sub r0, r1, r0 - add r1, r7, #0 - bl sub_020E1F6C - str r0, [r4, #0xc] - ldr r0, _0224BBF8 ; =ov95_0224BC30 - str r7, [r4, #0x10] - add r1, r4, #0 - mov r2, #0 - bl sub_0200DA04 - str r0, [r5, #0x7c] - ldr r0, _0224BBFC ; =0x04000050 - mov r1, #1 - add r2, r6, #0 - bl sub_020BF578 -_0224BBF6: - pop {r3, r4, r5, r6, r7, pc} - ; .align 2, 0 -_0224BBF8: .word ov95_0224BC30 -_0224BBFC: .word 0x04000050 - thumb_func_end ov95_0224BBB0 - - thumb_func_start ov95_0224BC00 -ov95_0224BC00: ; 0x0224BC00 - ldr r0, [r0, #0x7c] - cmp r0, #0 - bne _0224BC0A - mov r0, #1 - bx lr -_0224BC0A: - mov r0, #0 - bx lr - ; .align 2, 0 - thumb_func_end ov95_0224BC00 - - thumb_func_start ov95_0224BC10 -ov95_0224BC10: ; 0x0224BC10 - push {r4, lr} - add r4, r0, #0 - ldr r0, [r4, #0x7c] - cmp r0, #0 - beq _0224BC2C - bl sub_0201CED0 - bl ov95_022476C8 - ldr r0, [r4, #0x7c] - bl sub_0200DA58 - mov r0, #0 - str r0, [r4, #0x7c] -_0224BC2C: - pop {r4, pc} - ; .align 2, 0 - thumb_func_end ov95_0224BC10 - - thumb_func_start ov95_0224BC30 -ov95_0224BC30: ; 0x0224BC30 - push {r4, lr} - add r4, r1, #0 - ldr r0, [r4, #0x10] - sub r0, r0, #1 - str r0, [r4, #0x10] - cmp r0, #0 - ble _0224BC52 - ldr r1, [r4, #4] - ldr r0, [r4, #0xc] - add r2, r1, r0 - str r2, [r4, #4] - ldr r0, _0224BC68 ; =0x04000050 - mov r1, #1 - asr r2, r2, #0xc - bl sub_020BF578 - pop {r4, pc} -_0224BC52: - ldr r2, [r4, #8] - ldr r0, _0224BC68 ; =0x04000050 - mov r1, #1 - asr r2, r2, #0xc - bl sub_020BF578 - ldr r0, [r4, #0] - bl ov95_0224BC10 - pop {r4, pc} - nop -_0224BC68: .word 0x04000050 - thumb_func_end ov95_0224BC30 - - thumb_func_start ov95_0224BC6C -ov95_0224BC6C: ; 0x0224BC6C - push {r4, r5, r6, lr} - add r5, r0, #0 - add r6, r1, #0 - mov r0, #0x3a - mov r1, #0x44 - bl sub_02018144 - add r4, r0, #0 - beq _0224BCDA - mov r1, #0 - str r1, [r4, #4] - str r6, [r4, #0] - ldr r0, [r5, #0x74] - str r0, [r4, #0x10] - ldr r0, [r5, #0x78] - str r0, [r4, #0x14] - str r5, [r4, #8] - ldr r0, _0224BCE0 ; =0x000018CC - str r1, [r4, #0x18] - str r0, [r4, #0x1c] - mov r0, #0x14 - str r0, [r4, #0x20] - mov r0, #1 - lsl r0, r0, #0xc - strh r0, [r4, #0x3a] - str r1, [r4, #0x40] - ldr r0, [r4, #0x14] - bl ov95_022479AC - ldr r0, [r4, #0x14] - mov r1, #1 - bl ov95_022479A8 - add r1, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x24 - bl ov95_02247958 - add r1, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x34 - bl ov95_02247978 - ldr r0, _0224BCE4 ; =ov95_0224BD5C - add r1, r4, #0 - mov r2, #0 - bl sub_0200D9E8 - str r0, [r6, #0] - cmp r0, #0 - bne _0224BCDE - add r0, r4, #0 - bl sub_020181C4 - pop {r4, r5, r6, pc} -_0224BCDA: - mov r0, #0 - str r0, [r6, #0] -_0224BCDE: - pop {r4, r5, r6, pc} - ; .align 2, 0 -_0224BCE0: .word 0x000018CC -_0224BCE4: .word ov95_0224BD5C - thumb_func_end ov95_0224BC6C - - thumb_func_start ov95_0224BCE8 -ov95_0224BCE8: ; 0x0224BCE8 - push {r4, lr} - add r4, r0, #0 - beq _0224BD02 - bl sub_0201CED0 - ldr r1, [r0, #0] - mov r2, #0 - str r2, [r1, #0] - bl sub_020181C4 - add r0, r4, #0 - bl sub_0200DA58 -_0224BD02: - pop {r4, pc} - thumb_func_end ov95_0224BCE8 - - thumb_func_start ov95_0224BD04 -ov95_0224BD04: ; 0x0224BD04 - add r1, r0, #0 - ldr r0, [r1, #0x40] - cmp r0, #0 - beq _0224BD26 - mov r0, #0x3a - ldrsh r2, [r1, r0] - mov r0, #0x3c - ldrsh r0, [r1, r0] - add r0, r2, r0 - strh r0, [r1, #0x3a] - ldr r0, [r1, #0x40] - sub r0, r0, #1 - str r0, [r1, #0x40] - bne _0224BD26 - mov r0, #0x3e - ldrsh r0, [r1, r0] - strh r0, [r1, #0x3a] -_0224BD26: - mov r0, #0x36 - ldrsh r2, [r1, r0] - mov r0, #0x3a - ldrsh r0, [r1, r0] - ldr r3, _0224BD3C ; =ov95_02247990 - add r0, r2, r0 - strh r0, [r1, #0x36] - ldr r0, [r1, #0x14] - add r1, #0x34 - bx r3 - nop -_0224BD3C: .word ov95_02247990 - thumb_func_end ov95_0224BD04 - - thumb_func_start ov95_0224BD40 -ov95_0224BD40: ; 0x0224BD40 - push {r3, r4, r5, lr} - add r5, r0, #0 - add r4, r2, #0 - beq _0224BD58 - mov r0, #0x3a - ldrsh r0, [r5, r0] - sub r0, r1, r0 - add r1, r4, #0 - bl sub_020E1F6C - strh r0, [r5, #0x3c] - str r4, [r5, #0x40] -_0224BD58: - pop {r3, r4, r5, pc} - ; .align 2, 0 - thumb_func_end ov95_0224BD40 - - thumb_func_start ov95_0224BD5C -ov95_0224BD5C: ; 0x0224BD5C - push {r3, r4, r5, lr} - add r4, r1, #0 - add r5, r0, #0 - add r0, r4, #0 - bl ov95_0224BD04 - ldr r0, [r4, #4] - cmp r0, #5 - bhi _0224BE6A - add r0, r0, r0 - add r0, pc - ldrh r0, [r0, #6] - lsl r0, r0, #0x10 - asr r0, r0, #0x10 - add pc, r0 -_0224BD7A: ; jump table - .short _0224BD86 - _0224BD7A - 2 ; case 0 - .short _0224BDB6 - _0224BD7A - 2 ; case 1 - .short _0224BDCE - _0224BD7A - 2 ; case 2 - .short _0224BDE4 - _0224BD7A - 2 ; case 3 - .short _0224BE2C - _0224BD7A - 2 ; case 4 - .short _0224BE5A - _0224BD7A - 2 ; case 5 -_0224BD86: - ldr r0, [r4, #0x20] - cmp r0, #0 - beq _0224BDA6 - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x1c] - add r0, r1, r0 - str r0, [r4, #0x18] - ldr r0, [r4, #0x20] - sub r0, r0, #1 - str r0, [r4, #0x20] - ldr r1, [r4, #0x18] - ldr r0, [r4, #0x14] - asr r1, r1, #0xc - bl ov95_022479AC - pop {r3, r4, r5, pc} -_0224BDA6: - ldr r0, [r4, #0x14] - mov r1, #0x1f - bl ov95_022479AC - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0224BDB6: - mov r1, #6 - add r0, r4, #0 - lsl r1, r1, #6 - mov r2, #0x1e - bl ov95_0224BD40 - mov r0, #0 - str r0, [r4, #0xc] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0224BDCE: - ldr r0, [r4, #0xc] - add r0, r0, #1 - str r0, [r4, #0xc] - cmp r0, #0xa - ble _0224BE6A - mov r0, #0 - str r0, [r4, #0x30] - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0224BDE4: - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x30] - add r0, r1, r0 - str r0, [r4, #0x28] - mov r0, #0x1e - ldr r1, [r4, #0x30] - lsl r0, r0, #6 - sub r0, r1, r0 - str r0, [r4, #0x30] - add r1, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x24 - bl ov95_02247968 - ldr r1, [r4, #0x28] - ldr r0, _0224BE6C ; =0xFFFF5000 - cmp r1, r0 - bge _0224BE6A - ldr r0, _0224BE70 ; =0x000005E6 - bl sub_02005748 - mov r0, #0 - ldr r1, [r4, #0x30] - mvn r0, r0 - mul r0, r1 - str r0, [r4, #0x30] - ldr r0, [r4, #8] - mov r1, #0 - mov r2, #0x10 - mov r3, #8 - bl ov95_0224BBB0 - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0224BE2C: - ldr r1, [r4, #0x28] - ldr r0, [r4, #0x30] - add r1, r1, r0 - mov r0, #0x13 - lsl r0, r0, #0xc - str r1, [r4, #0x28] - cmp r1, r0 - blt _0224BE3E - str r0, [r4, #0x28] -_0224BE3E: - add r1, r4, #0 - ldr r0, [r4, #0x14] - add r1, #0x24 - bl ov95_02247968 - mov r0, #0x13 - ldr r1, [r4, #0x28] - lsl r0, r0, #0xc - cmp r1, r0 - bne _0224BE6A - ldr r0, [r4, #4] - add r0, r0, #1 - str r0, [r4, #4] - pop {r3, r4, r5, pc} -_0224BE5A: - ldr r0, [r4, #8] - bl ov95_0224BC00 - cmp r0, #0 - beq _0224BE6A - add r0, r5, #0 - bl ov95_0224BCE8 -_0224BE6A: - pop {r3, r4, r5, pc} - ; .align 2, 0 -_0224BE6C: .word 0xFFFF5000 -_0224BE70: .word 0x000005E6 - thumb_func_end ov95_0224BD5C - ; 0x0224BE74 - - - .rodata - .incbin "incbin/overlay95_rodata.bin" - - .data - .incbin "incbin/overlay95_data.bin" - - .bss - .space 0xA0 diff --git a/main.lsf b/main.lsf index 1e52e5276..91023a80c 100644 --- a/main.lsf +++ b/main.lsf @@ -59,7 +59,7 @@ Overlay overlay0 Overlay overlay1 { After main - Object asm/overlay1.o + Object asm/ov1_021D0D80.o } Overlay overlay2 @@ -84,61 +84,219 @@ Overlay overlay4 Overlay overlay5 { After main - Object asm/overlay5.o + Object asm/ov5_021D0D80.o + Object asm/ov5_021D1A94.o + Object asm/ov5_021D1C30.o + Object asm/ov5_021D2F14.o + Object asm/ov5_021D37AC.o + Object asm/ov5_021D431C.o + Object asm/ov5_021D521C.o + Object asm/ov5_021D56BC.o + Object asm/ov5_021D57BC.o + Object asm/ov5_021D5878.o + Object asm/ov5_021D5B40.o + Object asm/ov5_021D5BC0.o + Object asm/ov5_021D5CB0.o + Object asm/ov5_021D5EB8.o + Object asm/ov5_021DB888.o + Object asm/ov5_021DC018.o + Object asm/ov5_021DD42C.o + Object asm/ov5_021DD6FC.o + Object asm/ov5_021DDAE4.o + Object asm/ov5_021DDBE8.o + Object asm/ov5_021DF440.o + Object asm/ov5_021DFB54.o + Object asm/ov5_021E1154.o + Object asm/ov5_021E135C.o + Object asm/ov5_021E15F4.o + Object asm/ov5_021E1B08.o + Object asm/ov5_021E1D20.o + Object asm/ov5_021E2098.o + Object asm/ov5_021E22B0.o + Object asm/ov5_021E2338.o + Object asm/ov5_021E622C.o + Object asm/ov5_021E779C.o + Object asm/ov5_021EA714.o + Object asm/ov5_021EA874.o + Object asm/ov5_021EAFA4.o + Object asm/ov5_021FAF40.o + Object asm/ov5_021EB1A0.o + Object asm/ov5_021ECA70.o + Object asm/ov5_021ECC20.o + Object asm/ov5_021ECE40.o + Object asm/ov5_021EE75C.o + Object asm/ov5_021EE7D4.o + Object asm/ov5_021EEAC8.o + Object asm/ov5_021EEC68.o + Object asm/ov5_021EEF34.o + Object asm/ov5_021EF250.o + Object asm/ov5_021EF3A8.o + Object asm/ov5_021EF4BC.o + Object asm/ov5_021EF75C.o + Object asm/ov5_021EFB0C.o + Object asm/ov5_021F007C.o + Object asm/ov5_021FF6B8.o + Object asm/ov5_021F067C.o + Object asm/ov5_021F0824.o + Object asm/ov5_021F08CC.o + Object asm/ov5_021F0E84.o + Object asm/ov5_021F0EB0.o + Object asm/ov5_021F101C.o + Object asm/ov5_021F10E8.o + Object asm/ov5_021F134C.o + Object asm/ov5_021F17B8.o + Object asm/ov5_021F1CC8.o + Object asm/ov5_021F204C.o + Object asm/ov5_021F23D0.o + Object asm/ov5_021F25C0.o + Object asm/ov5_021F2850.o + Object asm/ov5_021F2A7C.o + Object asm/ov5_021F2BD0.o + Object asm/ov5_021F2D20.o + Object asm/ov5_021F3284.o + Object asm/ov5_021F348C.o + Object asm/ov5_021F37A8.o + Object asm/ov5_021F3A50.o + Object asm/ov5_021F3D00.o + Object asm/ov5_021F3E74.o + Object asm/ov5_021F4018.o + Object asm/ov5_021F428C.o + Object asm/ov5_021F47B0.o + Object asm/ov5_021F4DAC.o + Object asm/ov5_021F4E08.o + Object asm/ov5_021F5060.o + Object asm/ov5_021F50BC.o + Object asm/ov5_021F5284.o + Object asm/ov5_021F5428.o + Object asm/ov5_021F55CC.o + Object asm/ov5_021F575C.o + Object asm/ov5_021F5894.o + Object asm/ov5_021F5A10.o + Object asm/ov5_021F600C.o + Object asm/ov5_021F61BC.o + Object asm/ov5_021F6454.o + Object asm/ov5_021F77A8.o + Object asm/ov5_021F8370.o + Object asm/ov5_021F8560.o } Overlay overlay6 { After overlay5 - Object asm/overlay6.o + Object asm/ov6_0223E140.o + Object asm/ov6_02240C9C.o + Object asm/ov6_022426AC.o + Object asm/ov6_02242984.o + Object asm/ov6_02242AF0.o + Object asm/ov6_02242F74.o + Object asm/ov6_02243004.o + Object asm/ov6_022430C4.o + Object asm/ov6_02243218.o + Object asm/ov6_02243258.o + Object asm/ov6_02246034.o + Object asm/ov6_02246184.o + Object asm/ov6_02246444.o + Object asm/ov6_022465FC.o + Object asm/ov6_02246A30.o + Object asm/ov6_02246B74.o + Object asm/ov6_02246BF4.o + Object asm/ov6_02246C24.o + Object asm/ov6_02246F00.o + Object asm/ov6_02247078.o + Object asm/ov6_02247100.o + Object asm/ov6_022475B0.o + Object asm/ov6_02247660.o + Object asm/ov6_022477B8.o + Object asm/ov6_02247830.o + Object asm/ov6_02247A0C.o + Object asm/ov6_02247D30.o + Object asm/ov6_02247F5C.o + Object asm/ov6_02248050.o + Object asm/ov6_02248948.o + Object asm/ov6_022489E4.o } Overlay overlay7 { After overlay6 - Object asm/overlay7.o + Object asm/ov7_02249960.o + Object asm/ov7_0224B4E8.o + Object asm/ov7_0224BE9C.o + Object asm/ov7_0224CD28.o } Overlay overlay8 { After overlay6 - Object asm/overlay8.o + Object asm/ov8_02249960.o } Overlay overlay9 { After overlay6 - Object asm/overlay9.o + Object asm/ov9_02249960.o } Overlay overlay10 { After overlay4 - Object asm/overlay10.o + Object asm/ov10_0221F800.o } Overlay overlay11 { After overlay4 - Object asm/overlay11.o + Object asm/ov11_0221F800.o + Object asm/ov11_0221F840.o } Overlay overlay12 { After overlay11 - Object asm/overlay12.o + Object asm/ov12_0221FC20.o + Object asm/ov12_022237EC.o + Object asm/ov12_0222389C.o + Object asm/ov12_0222421C.o + Object asm/ov12_02225104.o + Object asm/ov12_02225640.o + Object asm/ov12_02225864.o + Object asm/ov12_02226998.o + Object asm/ov12_022269C0.o + Object asm/ov12_02226B84.o + Object asm/ov12_0222AC70.o + Object asm/ov12_0222D6B0.o + Object asm/ov12_0222E784.o + Object asm/ov12_0222E91C.o + Object asm/ov12_0222F700.o + Object asm/ov12_022346A4.o + Object asm/ov12_02234E44.o + Object asm/ov12_02235254.o + Object asm/ov12_02235E94.o + Object asm/ov12_02237E54.o + Object asm/ov12_02237EFC.o + Object asm/ov12_022380BC.o + Object asm/ov12_022384F0.o } Overlay overlay13 { After overlay11 - Object asm/overlay13.o + Object asm/ov13_0221FC20.o + Object asm/ov13_02221A88.o + Object asm/ov13_02224500.o + Object asm/ov13_02225710.o + Object asm/ov13_022264F4.o + Object asm/ov13_02227288.o + Object asm/ov13_02227A4C.o + Object asm/ov13_02227BDC.o + Object asm/ov13_02228128.o + Object asm/ov13_02228A38.o } Overlay overlay14 { After overlay11 - Object asm/overlay14.o + Object asm/ov14_0221FC20.o } Overlay overlay15 @@ -150,13 +308,52 @@ Overlay overlay15 Overlay overlay16 { After overlay12 - Object asm/overlay16.o + Object asm/ov16_0223B140.o + Object asm/ov16_0223DF00.o + Object asm/ov16_022405FC.o + Object asm/ov16_0224B940.o + Object asm/ov16_0225177C.o + Object asm/ov16_0225BFFC.o + Object asm/ov16_0225CBB8.o + Object asm/ov16_02264798.o + Object asm/ov16_0226485C.o + Object asm/ov16_02266F1C.o + Object asm/ov16_02268520.o + Object asm/ov16_0226871C.o + Object asm/ov16_0226D094.o + Object asm/ov16_0226DB7C.o + Object asm/ov16_0226DE44.o + Object asm/ov16_0226E148.o } Overlay overlay17 { After overlay12 - Object asm/overlay17.o + Object asm/ov17_0223B140.o + Object asm/ov17_0223CB1C.o + Object asm/ov17_0223DAD0.o + Object asm/ov17_0223F118.o + Object asm/ov17_0223F7E4.o + Object asm/ov17_02241270.o + Object asm/ov17_022413D8.o + Object asm/ov17_02243AC4.o + Object asm/ov17_02243C28.o + Object asm/ov17_02245F14.o + Object asm/ov17_02246ECC.o + Object asm/ov17_022476F8.o + Object asm/ov17_02247A48.o + Object asm/ov17_022492DC.o + Object asm/ov17_0224A0FC.o + Object asm/ov17_0224CFB8.o + Object asm/ov17_0224E930.o + Object asm/ov17_0224F080.o + Object asm/ov17_0224F18C.o + Object asm/ov17_0224F4D4.o + Object asm/ov17_02250744.o + Object asm/ov17_02251D6C.o + Object asm/ov17_02252A70.o + Object asm/ov17_02252AB0.o + Object asm/ov17_02252CEC.o } Overlay overlay18 @@ -171,247 +368,373 @@ Overlay overlay18 Overlay overlay19 { After main - Object asm/overlay19.o + Object asm/ov19_021D0D80.o + Object asm/ov19_021D603C.o + Object asm/ov19_021D61B0.o + Object asm/ov19_021D79F8.o + Object asm/ov19_021D8B54.o + Object asm/ov19_021DA270.o + Object asm/ov19_021DA814.o + Object asm/ov19_021DA92C.o + Object asm/ov19_021DB2FC.o + Object asm/ov19_021DB8E4.o + Object asm/ov19_021DC5F0.o + Object asm/ov19_021DCF88.o + Object asm/ov19_021DE3E8.o + Object asm/ov19_021DEC04.o + Object asm/ov19_021DF964.o } Overlay overlay20 { After main - Object asm/overlay20.o + Object asm/ov20_021D0D80.o + Object asm/ov20_021D2098.o + Object asm/ov20_021D2EA4.o + Object asm/ov20_021D3864.o + Object asm/ov20_021D3A54.o + Object asm/ov20_021D40E8.o + Object asm/ov20_021D4728.o + Object asm/ov20_021D4E38.o + Object asm/ov20_021D5044.o } Overlay overlay21 { After main - Object asm/overlay21.o + Object asm/ov21_021D0D80.o + Object asm/ov21_021D1F90.o + Object asm/ov21_021D1FA4.o + Object asm/ov21_021D3208.o + Object asm/ov21_021D3FE0.o + Object asm/ov21_021D423C.o + Object asm/ov21_021D4340.o + Object asm/ov21_021D4C0C.o + Object asm/ov21_021D4EE4.o + Object asm/ov21_021D517C.o + Object asm/ov21_021D5600.o + Object asm/ov21_021D57B4.o + Object asm/ov21_021D5AEC.o + Object asm/ov21_021D76B0.o + Object asm/ov21_021D85B0.o + Object asm/ov21_021D94BC.o + Object asm/ov21_021DC9BC.o + Object asm/ov21_021DDD2C.o + Object asm/ov21_021DE668.o + Object asm/ov21_021DF734.o + Object asm/ov21_021E0C68.o + Object asm/ov21_021E1924.o + Object asm/ov21_021E29DC.o + Object asm/ov21_021E3FFC.o + Object asm/ov21_021E4CA4.o + Object asm/ov21_021E6014.o + Object asm/ov21_021E68F4.o + Object asm/ov21_021E737C.o + Object asm/ov21_021E8484.o + Object asm/ov21_021E8D48.o } Overlay overlay22 { After overlay17 - Object asm/overlay22.o + Object asm/ov22_02254DE0.o + Object asm/ov22_02255094.o + Object asm/ov22_02255D44.o + Object asm/ov22_022578F4.o + Object asm/ov22_02257F50.o + Object asm/ov22_022588F0.o + Object asm/ov22_0225894C.o + Object asm/ov22_022589E0.o + Object asm/ov22_02259098.o + Object asm/ov22_02259484.o + Object asm/ov22_02259560.o + Object asm/ov22_022597BC.o + Object asm/ov22_02259C58.o + Object asm/ov22_0225A428.o + Object asm/ov22_0225AF44.o + Object asm/ov22_0225AF8C.o + Object asm/ov22_0225B660.o } Overlay overlay23 { After overlay5 - Object asm/overlay23.o + Object asm/ov23_0223E140.o + Object asm/ov23_022416A8.o + Object asm/ov23_02241F74.o + Object asm/ov23_0224340C.o + Object asm/ov23_02248C08.o + Object asm/ov23_02248F1C.o + Object asm/ov23_02249918.o + Object asm/ov23_022499E4.o + Object asm/ov23_0224A1D0.o + Object asm/ov23_0224B05C.o + Object asm/ov23_0224DC40.o + Object asm/ov23_0224F294.o + Object asm/ov23_0225128C.o + Object asm/ov23_022521F0.o + Object asm/ov23_02253598.o + Object asm/ov23_02253D40.o + Object asm/ov23_0225426C.o + Object asm/ov23_0225429C.o + Object asm/ov23_022542CC.o + Object asm/ov23_02254A14.o } Overlay overlay24 { After overlay9 - Object asm/overlay24.o + Object asm/ov24_02253CE0.o } Overlay overlay25 { After overlay9 - Object asm/overlay25.o + Object asm/ov25_02253CE0.o + Object asm/ov25_02254560.o + Object asm/ov25_02255090.o + Object asm/ov25_02255540.o + Object asm/ov25_02255ACC.o + Object asm/ov25_02255DBC.o } Overlay overlay26 { After overlay25 - Object asm/overlay26.o + Object asm/ov26_022561C0.o + Object asm/ov26_02256404.o } Overlay overlay27 { After overlay25 - Object asm/overlay27.o + Object asm/ov27_022561C0.o + Object asm/ov27_0225680C.o } Overlay overlay28 { After overlay25 - Object asm/overlay28.o + Object asm/ov28_022561C0.o + Object asm/ov28_0225697C.o + Object asm/ov28_02256E9C.o } Overlay overlay29 { After overlay25 - Object asm/overlay29.o + Object asm/ov29_022561C0.o + Object asm/ov29_022566C8.o } Overlay overlay30 { After overlay25 - Object asm/overlay30.o + Object asm/ov30_022561C0.o + Object asm/ov30_022563EC.o } Overlay overlay31 { After overlay25 - Object asm/overlay31.o + Object asm/ov31_022561C0.o + Object asm/ov31_02256554.o } Overlay overlay32 { After overlay25 - Object asm/overlay32.o + Object asm/ov32_022561C0.o + Object asm/ov32_02256470.o } Overlay overlay33 { After overlay25 - Object asm/overlay33.o + Object asm/ov33_022561C0.o + Object asm/ov33_02256474.o } Overlay overlay34 { After overlay25 - Object asm/overlay34.o + Object asm/ov34_022561C0.o + Object asm/ov34_02256540.o } Overlay overlay35 { After overlay25 - Object asm/overlay35.o + Object asm/ov35_022561C0.o + Object asm/ov35_02256410.o } Overlay overlay36 { After overlay25 - Object asm/overlay36.o + Object asm/ov36_022561C0.o + Object asm/ov36_02256404.o } Overlay overlay37 { After overlay25 - Object asm/overlay37.o + Object asm/ov37_022561C0.o + Object asm/ov37_022563D4.o } Overlay overlay38 { After overlay25 - Object asm/overlay38.o + Object asm/ov38_022561C0.o + Object asm/ov38_0225632C.o } Overlay overlay39 { After overlay25 - Object asm/overlay39.o + Object asm/ov39_022561C0.o + Object asm/ov39_022563DC.o } Overlay overlay40 { After overlay25 - Object asm/overlay40.o + Object asm/ov40_022561C0.o + Object asm/ov40_0225645C.o } Overlay overlay41 { After overlay25 - Object asm/overlay41.o + Object asm/ov41_022561C0.o + Object asm/ov41_022567B0.o } Overlay overlay42 { After overlay25 - Object asm/overlay42.o + Object asm/ov42_022561C0.o + Object asm/ov42_022563D4.o } Overlay overlay43 { After overlay25 - Object asm/overlay43.o + Object asm/ov43_022561C0.o + Object asm/ov43_02256544.o } Overlay overlay44 { After overlay25 - Object asm/overlay44.o + Object asm/ov44_022561C0.o + Object asm/ov44_022565BC.o } Overlay overlay45 { After overlay25 - Object asm/overlay45.o + Object asm/ov45_022561C0.o + Object asm/ov45_022566EC.o } Overlay overlay46 { After overlay25 - Object asm/overlay46.o + Object asm/ov46_022561C0.o + Object asm/ov46_02256BCC.o } Overlay overlay47 { After overlay25 - Object asm/overlay47.o + Object asm/ov47_022561C0.o + Object asm/ov47_02256634.o } Overlay overlay48 { After overlay25 - Object asm/overlay48.o + Object asm/ov48_022561C0.o + Object asm/ov48_0225650C.o } Overlay overlay49 { After overlay25 - Object asm/overlay49.o + Object asm/ov49_022561C0.o + Object asm/ov49_022563D4.o } Overlay overlay50 { After overlay25 - Object asm/overlay50.o + Object asm/ov50_022561C0.o + Object asm/ov50_02256510.o } Overlay overlay51 { After overlay25 - Object asm/overlay51.o + Object asm/ov51_022561C0.o + Object asm/ov51_0225632C.o } Overlay overlay52 { After overlay25 - Object asm/overlay52.o + Object asm/ov52_022561C0.o + Object asm/ov52_02256694.o } Overlay overlay53 { After overlay25 - Object asm/overlay53.o + Object asm/ov53_022561C0.o + Object asm/ov53_02256420.o } Overlay overlay54 { After overlay25 - Object asm/overlay54.o + Object asm/ov54_022561C0.o + Object asm/ov54_0225642C.o } Overlay overlay55 { After overlay25 - Object asm/overlay55.o + Object asm/ov55_022561C0.o + Object asm/ov55_0225632C.o } Overlay overlay56 { After overlay25 - Object asm/overlay56.o + Object asm/ov56_022561C0.o } Overlay overlay57 { After main - Object asm/overlay57.o + Object asm/ov57_021D0D80.o + Object asm/ov57_021D0F30.o } Overlay overlay58 { After main - Object asm/overlay58.o + Object asm/ov58_021D0D80.o } Overlay overlay59 { After main - Object asm/overlay59.o + Object asm/ov59_021D0D80.o + Object asm/ov59_021D2A2C.o + Object asm/ov59_021D2B44.o + Object asm/ov59_021D2F88.o } Overlay overlay60 @@ -431,25 +754,50 @@ Overlay overlay61 Overlay overlay62 { After overlay61 - Object asm/overlay62.o + Object asm/ov62_0222F2C0.o + Object asm/ov62_022300D8.o + Object asm/ov62_02231690.o + Object asm/ov62_02234A10.o + Object asm/ov62_02235278.o + Object asm/ov62_02235E64.o + Object asm/ov62_02236CBC.o + Object asm/ov62_02237D24.o + Object asm/ov62_02239D60.o + Object asm/ov62_0223CAEC.o + Object asm/ov62_0223DFA8.o + Object asm/ov62_0224112C.o + Object asm/ov62_02241204.o + Object asm/ov62_02246B00.o + Object asm/ov62_02247D74.o + Object asm/ov62_02248408.o } Overlay overlay63 { After overlay60 - Object asm/overlay63.o + Object asm/ov63_0222AE60.o + Object asm/ov63_0222BCE8.o + Object asm/ov63_0222BE18.o + Object asm/ov63_0222CA88.o + Object asm/ov63_0222CCE4.o + Object asm/ov63_0222D160.o + Object asm/ov63_0222D1C0.o + Object asm/ov63_0222D77C.o } Overlay overlay64 { After overlay63 - Object asm/overlay64.o + Object asm/ov64_0222DCE0.o } Overlay overlay65 { After overlay63 - Object asm/overlay65.o + Object asm/ov65_0222DCE0.o + Object asm/ov65_02235060.o + Object asm/ov65_02236474.o + Object asm/ov65_0223648C.o } Overlay overlay66 @@ -462,133 +810,178 @@ Overlay overlay66 Overlay overlay67 { After overlay66 - Object asm/overlay67.o + Object asm/ov67_0225C700.o } Overlay overlay68 { After overlay66 - Object asm/overlay68.o + Object asm/ov68_0225C700.o } Overlay overlay69 { After overlay66 - Object asm/overlay69.o + Object asm/ov69_0225C700.o } Overlay overlay70 { After overlay66 - Object asm/overlay70.o + Object asm/ov70_0225C700.o + Object asm/ov70_0225C858.o + Object asm/ov70_0225C9B4.o + Object asm/ov70_0225D9A4.o + Object asm/ov70_02260A70.o + Object asm/ov70_02260B44.o + Object asm/ov70_02261E10.o + Object asm/ov70_02262DA8.o + Object asm/ov70_022630A4.o + Object asm/ov70_02265F38.o + Object asm/ov70_02266E9C.o + Object asm/ov70_02269190.o + Object asm/ov70_0226C338.o + Object asm/ov70_0226C60C.o + Object asm/ov70_0226C8B4.o + Object asm/ov70_0226CC74.o + Object asm/ov70_0226CE54.o } Overlay overlay71 { After overlay12 - Object asm/overlay71.o + Object asm/ov71_0223B140.o + Object asm/ov71_0223C69C.o + Object asm/ov71_0223CF0C.o + Object asm/ov71_0223D324.o } Overlay overlay72 { After overlay71 - Object asm/overlay72.o + Object asm/ov72_0223D7A0.o } Overlay overlay73 { After main - Object asm/overlay73.o + Object asm/ov73_021D0D80.o + Object asm/ov73_021D3250.o } Overlay overlay74 { After main - Object asm/overlay74.o + Object asm/ov74_021D0D80.o } Overlay overlay75 { After main - Object asm/overlay75.o + Object asm/ov75_021D0D80.o } Overlay overlay76 { After overlay12 - Object asm/overlay76.o + Object asm/ov76_0223B140.o + Object asm/ov76_0223B870.o + Object asm/ov76_0223D338.o } Overlay overlay77 { After main - Object asm/overlay77.o + Object asm/ov77_021D0D80.o + Object asm/ov77_021D25B0.o + Object asm/ov77_021D54B0.o + Object asm/ov77_021D6670.o + Object asm/ov77_021D6C70.o } Overlay overlay78 { After main - Object asm/overlay78.o + Object asm/ov78_021D0D80.o } Overlay overlay79 { After main - Object asm/overlay79.o + Object asm/ov79_021D0D80.o + Object asm/ov79_021D183C.o + Object asm/ov79_021D20F4.o + Object asm/ov79_021D2268.o + Object asm/ov79_021D3768.o } Overlay overlay80 { After main - Object asm/overlay80.o + Object asm/ov80_021D0D80.o + Object asm/ov80_021D1458.o + Object asm/ov80_021D2A08.o + Object asm/ov80_021D2AF4.o } Overlay overlay81 { After main - Object asm/overlay81.o + Object asm/ov81_021D0D80.o + Object asm/ov81_021D1610.o } Overlay overlay82 { After overlay12 - Object asm/overlay82.o + Object asm/ov82_0223B140.o + Object asm/ov82_0223B2E0.o } Overlay overlay83 { After overlay82 - Object asm/overlay83.o + Object asm/ov83_0223B5A0.o + Object asm/ov83_0223C958.o + Object asm/ov83_0223D144.o + Object asm/ov83_0223D150.o + Object asm/ov83_0223D4CC.o + Object asm/ov83_0223D6A8.o + Object asm/ov83_0223F7F4.o } Overlay overlay84 { After overlay82 - Object asm/overlay84.o + Object asm/ov84_0223B5A0.o + Object asm/ov84_0223F040.o + Object asm/ov84_022403F4.o } Overlay overlay85 { After overlay84 - Object asm/overlay85.o + Object asm/ov85_02241440.o } Overlay overlay86 { After overlay12 - Object asm/overlay86.o + Object asm/ov86_0223B140.o } Overlay overlay87 { After main - Object asm/overlay87.o + Object asm/ov87_021D0D80.o + Object asm/ov87_021D106C.o } Overlay overlay88 { After overlay12 - Object asm/overlay88.o + Object asm/ov88_0223B140.o + Object asm/ov88_0223E9C4.o } Overlay overlay89 @@ -600,43 +993,66 @@ Overlay overlay89 Overlay overlay90 { After main - Object asm/overlay90.o + Object asm/ov90_021D0D80.o } Overlay overlay91 { After main - Object asm/overlay91.o + Object asm/ov91_021D0D80.o } Overlay overlay92 { After main - Object asm/overlay92.o + Object asm/ov92_021D0D80.o } Overlay overlay93 { After main - Object asm/overlay93.o + Object asm/ov93_021D0D80.o + Object asm/ov93_021D111C.o } Overlay overlay94 { After overlay12 - Object asm/overlay94.o + Object asm/ov94_0223B140.o + Object asm/ov94_0223BCB0.o + Object asm/ov94_0223C610.o + Object asm/ov94_0223D0C4.o + Object asm/ov94_0223DC04.o + Object asm/ov94_0223E46C.o + Object asm/ov94_0223FB48.o + Object asm/ov94_022414B8.o + Object asm/ov94_02242AD0.o + Object asm/ov94_02243EF8.o + Object asm/ov94_022443E0.o + Object asm/ov94_022444C8.o + Object asm/ov94_02244950.o } Overlay overlay95 { After overlay94 - Object asm/overlay95.o + Object asm/ov95_02246C20.o + Object asm/ov95_022476F0.o + Object asm/ov95_02247B6C.o + Object asm/ov95_02248590.o + Object asm/ov95_02249740.o + Object asm/ov95_02249F90.o + Object asm/ov95_0224A390.o + Object asm/ov95_0224ABC0.o + Object asm/ov95_0224B3D8.o } Overlay overlay96 { After overlay12 - Object asm/overlay96.o + Object asm/ov96_0223B140.o + Object asm/ov96_0223B6A0.o + Object asm/ov96_0223BCE0.o } Overlay overlay97